diff --git a/486.js b/486.js deleted file mode 100644 index bc76b8b..0000000 --- a/486.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkworldmap_3d=self.webpackChunkworldmap_3d||[]).push([[486],{486:()=>{}}]); \ No newline at end of file diff --git a/514.js b/514.js deleted file mode 100644 index 5534083..0000000 --- a/514.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkworldmap_3d=self.webpackChunkworldmap_3d||[]).push([[514],{514:()=>{}}]); \ No newline at end of file diff --git a/645.js b/645.js deleted file mode 100644 index 5051d82..0000000 --- a/645.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkworldmap_3d=self.webpackChunkworldmap_3d||[]).push([[645],{283:()=>{}}]); \ No newline at end of file diff --git a/800.js b/800.js deleted file mode 100644 index 910ec5c..0000000 --- a/800.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkworldmap_3d=self.webpackChunkworldmap_3d||[]).push([[800],{800:()=>{}}]); \ No newline at end of file diff --git a/Assets/approximateTerrainHeights.json b/Assets/approximateTerrainHeights.json index 92e52a3..259b1cb 100644 --- a/Assets/approximateTerrainHeights.json +++ b/Assets/approximateTerrainHeights.json @@ -1 +1 @@ -{"6-0-0":[10.66,26.9],"6-0-1":[6.74,20.61],"6-0-2":[4.04,14.2],"6-0-3":[2.99,8.89],"6-0-4":[0.89,6.8],"6-0-5":[0.83,4.22],"6-0-6":[1.01,996.64],"6-0-7":[1.65,1473.8],"6-0-8":[4.23,1405.42],"6-0-9":[3.78,9.42],"6-0-10":[0.33,10.41],"6-0-11":[0.37,9.42],"6-0-12":[-1.21,10.72],"6-0-13":[-24.75,1797.13],"6-0-14":[-25.53,3.24],"6-0-15":[-12.72,0.06],"6-0-16":[-21.01,-5.62],"6-0-17":[-25.65,-10.79],"6-0-18":[-25.81,-11.56],"6-0-19":[-23.99,-9.29],"6-0-20":[-21.03,-8.01],"6-0-21":[-17.26,28.36],"6-0-22":[-10.44,-0.18],"6-0-23":[-6.09,1.27],"6-0-24":[0.2,8.96],"6-0-25":[4.5,13.87],"6-0-26":[6.42,18.94],"6-0-27":[9.26,23.03],"6-0-28":[10.92,27.13],"6-0-29":[12.68,32.43],"6-0-30":[15.67,36.44],"6-0-31":[17.17,41.7],"6-0-32":[18.65,43.91],"6-0-33":[19.85,48.69],"6-0-34":[21.11,56.5],"6-0-35":[26.26,79],"6-0-36":[33,95.12],"6-0-37":[17.36,1242.86],"6-0-38":[17.56,1197.83],"6-0-39":[46.88,149.88],"6-0-40":[49.39,105.09],"6-0-41":[41.61,101.97],"6-0-42":[20.68,550.11],"6-0-43":[17.2,92.57],"6-0-44":[16.92,77.99],"6-0-45":[18.56,46.63],"6-0-46":[12.38,43.07],"6-0-47":[3.4,29.35],"6-0-48":[-19.81,6.49],"6-0-49":[-39.19,-4.52],"6-0-50":[-57.57,-19.1],"6-0-51":[-76.36,-29.46],"6-0-52":[-88.35,-37.9],"6-0-53":[-97.62,-44.45],"6-0-54":[-101.65,-48.19],"6-0-55":[-119.7,-51.12],"6-0-56":[-126.97,-57.56],"6-0-57":[-126.3,-60.82],"6-0-58":[-126.26,-59.93],"6-0-59":[-119.1,-54.84],"6-0-60":[-110.88,-48.64],"6-0-61":[-96.62,258.8],"6-0-62":[-90.74,2997.38],"6-0-63":[-31.67,3098.17],"6-1-0":[10.71,26.95],"6-1-1":[7.14,20.8],"5-0-0":[6.74,26.95],"6-1-2":[3.89,15.04],"6-1-3":[3.37,8.36],"5-0-1":[2.99,15.04],"6-1-4":[-0.61,6.83],"6-1-5":[-0.55,4.83],"5-0-2":[-0.61,6.83],"6-1-6":[-0.38,343.9],"6-1-7":[0.43,308.3],"5-0-3":[-0.38,1473.8],"6-1-8":[1.88,906.96],"6-1-9":[4.01,286.65],"5-0-4":[1.88,1405.42],"6-1-10":[3.66,14],"6-1-11":[1.5,14.18],"5-0-5":[0.33,14.18],"6-1-12":[2.47,10.46],"6-1-13":[-22.06,1734.24],"5-0-6":[-24.75,1797.13],"6-1-14":[-20.71,6.52],"6-1-15":[-11.23,1.31],"5-0-7":[-25.53,6.52],"6-1-16":[-20.51,-4.75],"6-1-17":[-25.7,-10],"5-0-8":[-25.7,-4.75],"6-1-18":[-26.19,-12.15],"6-1-19":[-25.87,-9.22],"5-0-9":[-26.19,-9.22],"6-1-20":[-22.92,-7.87],"6-1-21":[-16.03,0.26],"5-0-10":[-22.92,28.36],"6-1-22":[-9.59,9.27],"6-1-23":[-2.9,6.54],"5-0-11":[-10.44,9.27],"6-1-24":[0.86,11.17],"6-1-25":[4.31,18.66],"5-0-12":[0.2,18.66],"6-1-26":[6.61,18.19],"6-1-27":[8.7,22.85],"5-0-13":[6.42,23.03],"6-1-28":[9.96,23.64],"6-1-29":[9.97,31.23],"5-0-14":[9.96,32.43],"6-1-30":[13.01,34.4],"6-1-31":[16.28,38.74],"5-0-15":[13.01,41.7],"6-1-32":[16.81,39.97],"6-1-33":[17.68,44.11],"5-0-16":[16.81,48.69],"6-1-34":[18.54,49.53],"6-1-35":[22.64,65.95],"5-0-17":[18.54,79],"6-1-36":[28.21,188.59],"6-1-37":[34.36,262.29],"5-0-18":[17.36,1242.86],"6-1-38":[45.21,1074.21],"6-1-39":[25.48,561.48],"5-0-19":[17.56,1197.83],"6-1-40":[23.5,105.17],"6-1-41":[23.63,99.7],"5-0-20":[23.5,105.17],"6-1-42":[19.32,82.54],"6-1-43":[18.61,61.85],"5-0-21":[17.2,550.11],"6-1-44":[20.07,55.81],"6-1-45":[18.77,46.46],"5-0-22":[16.92,77.99],"6-1-46":[8.68,36.12],"6-1-47":[-36.78,306.25],"5-0-23":[-36.78,306.25],"6-1-48":[-22.66,5.19],"6-1-49":[-42.82,-11.13],"5-0-24":[-42.82,6.49],"6-1-50":[-57.85,-19.1],"6-1-51":[-75.69,-29.65],"5-0-25":[-76.36,-19.1],"6-1-52":[-86.83,-37.51],"6-1-53":[-96.13,-43.07],"5-0-26":[-97.62,-37.51],"6-1-54":[-101.17,-47.18],"6-1-55":[-120.92,-50.74],"5-0-27":[-120.92,-47.18],"6-1-56":[-127.84,-59.08],"6-1-57":[-130.41,-62.14],"5-0-28":[-130.41,-57.56],"6-1-58":[-130.18,-59.59],"6-1-59":[-119.25,-55.12],"5-0-29":[-130.18,-54.84],"6-1-60":[-110.99,-49.4],"6-1-61":[-97.87,-11.15],"5-0-30":[-110.99,258.8],"6-1-62":[-91.52,3443.81],"6-1-63":[-29.54,3102.34],"5-0-31":[-91.52,3443.81],"6-2-0":[10.72,26.98],"6-2-1":[7.83,20.82],"6-2-2":[3.58,15.73],"6-2-3":[2.54,7.2],"6-2-4":[-0.61,5.79],"6-2-5":[-0.51,5.62],"6-2-6":[-0.51,2.52],"6-2-7":[0.49,3.57],"6-2-8":[1.45,1107.58],"6-2-9":[4.33,935.49],"6-2-10":[6.38,447.82],"6-2-11":[2.78,22.33],"6-2-12":[4.36,15.33],"6-2-13":[-21.97,1546.34],"6-2-14":[-15.6,10.11],"6-2-15":[-8.94,3.51],"6-2-16":[-19.28,-3.75],"6-2-17":[-25.1,-8.48],"6-2-18":[-26.22,-11.53],"6-2-19":[-26.62,-11.45],"6-2-20":[-24.22,-7.64],"6-2-21":[-15.31,-2.94],"6-2-22":[-9.58,22.84],"6-2-23":[0.06,13.16],"6-2-24":[3.65,16.58],"6-2-25":[5.95,18.75],"6-2-26":[7.56,18.27],"6-2-27":[8.72,22.69],"6-2-28":[9.83,22.16],"6-2-29":[9.86,26.06],"6-2-30":[12.2,32.28],"6-2-31":[13.89,34.73],"6-2-32":[14.45,36.73],"6-2-33":[14.44,38.35],"6-2-34":[17.75,45.33],"6-2-35":[20.66,56.51],"6-2-36":[14.56,1897.33],"6-2-37":[21.73,602.11],"6-2-38":[6.52,258.3],"6-2-39":[23.9,87.93],"6-2-40":[24.73,68.5],"6-2-41":[28.76,71.42],"6-2-42":[24.12,69.11],"6-2-43":[21.79,60.23],"6-2-44":[16.26,53.69],"6-2-45":[9.6,38.48],"6-2-46":[4.35,25.76],"6-2-47":[-8.34,16.06],"6-2-48":[-23.66,-1.78],"6-2-49":[-43.1,-12.47],"6-2-50":[-57.44,-20.26],"6-2-51":[-75.02,-28.99],"6-2-52":[-85.43,-36.15],"6-2-53":[-94.37,-42.32],"6-2-54":[-100.35,-45.74],"6-2-55":[-118.16,-50.3],"6-2-56":[-127.84,-57.37],"6-2-57":[-132.46,-63.72],"6-2-58":[-131.21,-59.33],"6-2-59":[-117.94,-55.1],"6-2-60":[-110.83,-49.58],"6-2-61":[-98.68,-43.95],"6-2-62":[-90.63,3904.3],"6-2-63":[-29.54,3104.92],"6-3-0":[10.72,27.03],"6-3-1":[7.91,20.82],"5-1-0":[7.83,27.03],"6-3-2":[3.44,16.58],"6-3-3":[2.11,6.48],"5-1-1":[2.11,16.58],"4-0-0":[2.11,27.03],"6-3-4":[-0.03,6.76],"6-3-5":[-0.56,6.63],"5-1-2":[-0.61,6.76],"6-3-6":[-1.04,3.03],"6-3-7":[0.58,2.79],"5-1-3":[-1.04,3.57],"4-0-1":[-1.04,1473.8],"6-3-8":[1.26,912.84],"6-3-9":[4.33,618.8],"5-1-4":[1.26,1107.58],"6-3-10":[6.38,21.82],"6-3-11":[-9.62,311.37],"5-1-5":[-9.62,447.82],"4-0-2":[-9.62,1405.42],"6-3-12":[5.53,24.46],"6-3-13":[-16.08,1745.85],"5-1-6":[-21.97,1745.85],"6-3-14":[-2.94,13.6],"6-3-15":[-7.31,5.28],"5-1-7":[-15.6,13.6],"4-0-3":[-25.53,1797.13],"6-3-16":[-15.66,-3.16],"6-3-17":[-22.96,-8.29],"5-1-8":[-25.1,-3.16],"6-3-18":[-26.21,-10.93],"6-3-19":[-27.23,-12.17],"5-1-9":[-27.23,-10.93],"4-0-4":[-27.23,-3.16],"6-3-20":[-24.81,-7.64],"6-3-21":[-14.34,0.47],"5-1-10":[-24.81,0.47],"6-3-22":[-3.34,23.06],"6-3-23":[2.58,22.37],"5-1-11":[-9.58,23.06],"4-0-5":[-24.81,28.36],"6-3-24":[6.28,19.36],"6-3-25":[8.08,21.32],"5-1-12":[3.65,21.32],"6-3-26":[1.66,34.68],"6-3-27":[8.88,23.51],"5-1-13":[1.66,34.68],"4-0-6":[0.2,34.68],"6-3-28":[10.27,25.7],"6-3-29":[10.85,24.86],"5-1-14":[9.83,26.06],"6-3-30":[11.93,28.27],"6-3-31":[13.63,30.64],"5-1-15":[11.93,34.73],"4-0-7":[9.83,41.7],"6-3-32":[14.74,33.87],"6-3-33":[11.58,35.79],"5-1-16":[11.58,38.35],"6-3-34":[16.56,41.34],"6-3-35":[18.05,51.07],"5-1-17":[16.56,56.51],"4-0-8":[11.58,79],"6-3-36":[19.63,771.39],"6-3-37":[21.73,997.06],"5-1-18":[14.56,1897.33],"6-3-38":[22.85,125.79],"6-3-39":[22.68,58.96],"5-1-19":[6.52,258.3],"4-0-9":[6.52,1897.33],"6-3-40":[21.12,59.21],"6-3-41":[21.12,57.29],"5-1-20":[21.12,71.42],"6-3-42":[19,55.57],"6-3-43":[19,45.14],"5-1-21":[19,69.11],"4-0-10":[17.2,550.11],"6-3-44":[12.68,42.37],"6-3-45":[7.26,30.69],"5-1-22":[7.26,53.69],"6-3-46":[1.07,18.1],"6-3-47":[-14.03,6.67],"5-1-23":[-14.03,25.76],"4-0-11":[-36.78,306.25],"6-3-48":[-25.52,-4.53],"6-3-49":[-40.76,-13.01],"5-1-24":[-43.1,-1.78],"6-3-50":[-55.85,-20.05],"6-3-51":[-71.88,-27.95],"5-1-25":[-75.02,-20.05],"4-0-12":[-76.36,6.49],"6-3-52":[-83.23,-35.08],"6-3-53":[-91.13,-41.07],"5-1-26":[-94.37,-35.08],"6-3-54":[-99.02,-44.5],"6-3-55":[-114.54,-49.53],"5-1-27":[-118.16,-44.5],"4-0-13":[-120.92,-35.08],"6-3-56":[-126.73,-56.74],"6-3-57":[-132.79,-63.72],"5-1-28":[-132.79,-56.74],"6-3-58":[-132.21,-59.46],"6-3-59":[-117.45,-55.06],"5-1-29":[-132.21,-55.06],"4-0-14":[-132.79,-54.84],"6-3-60":[-110.9,-50.05],"6-3-61":[-98.89,-43.58],"5-1-30":[-110.9,-43.58],"6-3-62":[-87.67,3970.41],"6-3-63":[-29.54,3106.07],"5-1-31":[-90.63,3970.41],"4-0-15":[-110.99,3970.41],"6-4-0":[10.72,27.07],"6-4-1":[8.58,20.88],"6-4-2":[3.21,17.11],"6-4-3":[2.1,7.09],"6-4-4":[1.19,8.01],"6-4-5":[-0.22,6.22],"6-4-6":[-1.08,2.41],"6-4-7":[0.39,611.05],"6-4-8":[1.07,1101.35],"6-4-9":[4.69,428.48],"6-4-10":[9.22,653.36],"6-4-11":[10.76,27.57],"6-4-12":[-14.99,1825.97],"6-4-13":[-15.6,2084.32],"6-4-14":[3.47,18.16],"6-4-15":[-5.56,6.15],"6-4-16":[-15.54,-2.51],"6-4-17":[-23.21,-7.81],"6-4-18":[-26.71,-10.93],"6-4-19":[-28,-11.62],"6-4-20":[-24.27,-7.94],"6-4-21":[-14.62,0.97],"6-4-22":[-0.2,17.55],"6-4-23":[2.53,28.15],"6-4-24":[7.62,19.59],"6-4-25":[8.14,21.94],"6-4-26":[9.01,22.24],"6-4-27":[10.38,25.71],"6-4-28":[11.65,27.19],"6-4-29":[12.01,27.84],"6-4-30":[12.52,28.27],"6-4-31":[13.6,29.58],"6-4-32":[14.29,32.89],"6-4-33":[15.45,34.86],"6-4-34":[16.24,35.6],"6-4-35":[15.79,39.9],"6-4-36":[15.18,43.72],"6-4-37":[15.33,45.71],"6-4-38":[15.37,48.56],"6-4-39":[15.29,45.88],"6-4-40":[15.09,44.41],"6-4-41":[14.97,42.29],"6-4-42":[13.73,42.26],"6-4-43":[12.06,37.32],"6-4-44":[10.39,32.28],"6-4-45":[5.84,25.33],"6-4-46":[-0.37,17.65],"6-4-47":[-16.61,1.08],"6-4-48":[-26.32,-7.42],"6-4-49":[-40.76,-13.57],"6-4-50":[-53.73,-20.05],"6-4-51":[-70.17,-26.95],"6-4-52":[-80.79,-33.29],"6-4-53":[-89,-39.39],"6-4-54":[-97.35,-43.1],"6-4-55":[-113.49,-49.01],"6-4-56":[-126.75,-56.1],"6-4-57":[-131.59,-62.78],"6-4-58":[-131.91,-58.9],"6-4-59":[-117.3,-55.06],"6-4-60":[-111.07,-49.97],"6-4-61":[-98.75,-43.61],"6-4-62":[-87.85,3807.76],"6-4-63":[-29.54,3106.13],"6-5-0":[10.78,27.12],"6-5-1":[8.58,21.1],"5-2-0":[8.58,27.12],"6-5-2":[3.17,17.66],"6-5-3":[0.92,7.26],"5-2-1":[0.92,17.66],"6-5-4":[-0.48,8],"6-5-5":[-2.17,1.64],"5-2-2":[-2.17,8.01],"6-5-6":[-0.74,0.57],"6-5-7":[-0.44,977.81],"5-2-3":[-1.08,977.81],"6-5-8":[1.07,1285.63],"6-5-9":[5.92,689.98],"5-2-4":[1.07,1285.63],"6-5-10":[9.22,574.41],"6-5-11":[12.46,29.76],"5-2-5":[9.22,653.36],"6-5-12":[-36.25,2863.96],"6-5-13":[-3.12,25.08],"5-2-6":[-36.25,2863.96],"6-5-14":[3.54,19.59],"6-5-15":[-6.33,5.94],"5-2-7":[-6.33,19.59],"6-5-16":[-17.4,-2.51],"6-5-17":[-24.54,-7.99],"5-2-8":[-24.54,-2.51],"6-5-18":[-27.22,-11.55],"6-5-19":[-27.57,-11.81],"5-2-9":[-28,-10.93],"6-5-20":[-24.98,-7.94],"6-5-21":[-15.88,-0.19],"5-2-10":[-24.98,0.97],"6-5-22":[-3.57,8.23],"6-5-23":[3.2,68.18],"5-2-11":[-3.57,68.18],"6-5-24":[7.47,18.67],"6-5-25":[7.19,18.1],"5-2-12":[7.19,21.94],"6-5-26":[7.38,20.47],"6-5-27":[8.56,27.76],"5-2-13":[7.38,27.76],"6-5-28":[11.8,30.78],"6-5-29":[12.82,30.66],"5-2-14":[11.65,30.78],"6-5-30":[13.61,32.3],"6-5-31":[13.86,32.65],"5-2-15":[12.52,32.65],"6-5-32":[14.35,32.3],"6-5-33":[15.09,34.31],"5-2-16":[14.29,34.86],"6-5-34":[14.43,33.96],"6-5-35":[14.39,37.54],"5-2-17":[14.39,39.9],"6-5-36":[12.64,37.44],"6-5-37":[11.66,31.1],"5-2-18":[11.66,45.71],"6-5-38":[11.75,38.62],"6-5-39":[12.15,31.7],"5-2-19":[11.75,48.56],"6-5-40":[10.41,30.13],"6-5-41":[10.41,29.27],"5-2-20":[10.41,44.41],"6-5-42":[10.26,28.59],"6-5-43":[8.59,25.16],"5-2-21":[8.59,42.26],"6-5-44":[6.7,23.39],"6-5-45":[4.27,19.09],"5-2-22":[4.27,32.28],"6-5-46":[-1.36,10.74],"6-5-47":[-17.27,-0.35],"5-2-23":[-17.27,17.65],"6-5-48":[-26.4,-8.28],"6-5-49":[-40.48,-13.41],"5-2-24":[-40.76,-7.42],"6-5-50":[-51.99,-19.83],"6-5-51":[-66.22,-25.93],"5-2-25":[-70.17,-19.83],"6-5-52":[-77.24,-31.84],"6-5-53":[-85.9,-37.71],"5-2-26":[-89,-31.84],"6-5-54":[-96.28,-42.09],"6-5-55":[-112.03,-48.58],"5-2-27":[-113.49,-42.09],"6-5-56":[-123.43,-55.02],"6-5-57":[-130.93,-62.4],"5-2-28":[-131.59,-55.02],"6-5-58":[-131.32,-59.02],"6-5-59":[-121.42,-54.72],"5-2-29":[-131.91,-54.72],"6-5-60":[-111.23,146.66],"6-5-61":[-98.4,-43.74],"5-2-30":[-111.23,146.66],"6-5-62":[-87.94,3579.75],"6-5-63":[-29.55,3100.28],"5-2-31":[-87.94,3807.76],"6-6-0":[10.89,27.18],"6-6-1":[8.99,21.34],"6-6-2":[3.2,17.98],"6-6-3":[0.5,6.62],"6-6-4":[-2.95,6.62],"6-6-5":[-3.68,0.42],"6-6-6":[-2.02,37.03],"6-6-7":[-1.02,1376.89],"6-6-8":[3.71,982.62],"6-6-9":[7.43,985.82],"6-6-10":[11.94,1234.98],"6-6-11":[13.11,705.14],"6-6-12":[-89.41,2536.32],"6-6-13":[3.4,22.83],"6-6-14":[2.65,19.52],"6-6-15":[-7.99,5.64],"6-6-16":[-18.67,-3.61],"6-6-17":[-26.52,-9.15],"6-6-18":[-29.62,-12.33],"6-6-19":[-29.54,-12.54],"6-6-20":[-27.32,-8.27],"6-6-21":[-18.45,-1.95],"6-6-22":[-6.48,7.14],"6-6-23":[3.01,190.01],"6-6-24":[6.51,138.47],"6-6-25":[5.69,15.96],"6-6-26":[5.4,16.51],"6-6-27":[6.05,22.74],"6-6-28":[9.02,28.21],"6-6-29":[-17.46,51.55],"6-6-30":[13.15,50.16],"6-6-31":[15.34,33.27],"6-6-32":[14.32,31.91],"6-6-33":[13.67,32.66],"6-6-34":[12.2,30.79],"6-6-35":[8.78,41.94],"6-6-36":[9.46,29.88],"6-6-37":[9.15,25.29],"6-6-38":[9.38,32.55],"6-6-39":[9.54,25.04],"6-6-40":[7.99,24.13],"6-6-41":[6.63,21.25],"6-6-42":[6.03,21.21],"6-6-43":[5.82,20.07],"6-6-44":[4.24,16.55],"6-6-45":[2.14,12.64],"6-6-46":[-4.05,7.66],"6-6-47":[-16.62,-0.23],"6-6-48":[-26.47,-8.01],"6-6-49":[-39.59,-13.39],"6-6-50":[-50.27,-19.08],"6-6-51":[-63.69,-24.71],"6-6-52":[-73.99,-30.15],"6-6-53":[-84.19,-35.56],"6-6-54":[-95.47,-40.93],"6-6-55":[-110.06,-48.04],"6-6-56":[-123.5,-54.77],"6-6-57":[-129.75,-61.69],"6-6-58":[-129.75,-62.06],"6-6-59":[-121.74,-53.84],"6-6-60":[-109.45,382.35],"6-6-61":[-98.13,-36.44],"6-6-62":[-87.49,3110.85],"6-6-63":[-29.55,3090.17],"6-7-0":[11.05,27.23],"6-7-1":[8.99,21.62],"5-3-0":[8.99,27.23],"6-7-2":[3.11,18.02],"6-7-3":[-1.88,4.75],"5-3-1":[-1.88,18.02],"4-1-0":[-1.88,27.23],"6-7-4":[-2.23,3.16],"6-7-5":[-10.48,-0.69],"5-3-2":[-10.48,6.62],"6-7-6":[-6.6,40.51],"6-7-7":[4.26,1489.28],"5-3-3":[-6.6,1489.28],"4-1-1":[-10.48,1489.28],"3-0-0":[-10.48,1489.28],"6-7-8":[5.88,1063.92],"6-7-9":[20.7,1104.57],"5-3-4":[3.71,1104.57],"6-7-10":[14.91,1599.96],"6-7-11":[-8.97,1740.57],"5-3-5":[-8.97,1740.57],"4-1-2":[-8.97,1740.57],"6-7-12":[-61.85,2512.65],"6-7-13":[5.57,22.76],"5-3-6":[-89.41,2536.32],"6-7-14":[0.64,18.21],"6-7-15":[-12.27,3.05],"5-3-7":[-12.27,19.52],"4-1-3":[-89.41,2863.96],"3-0-1":[-89.41,2863.96],"6-7-16":[-22.25,-4.09],"6-7-17":[-29.14,-10.07],"5-3-8":[-29.14,-3.61],"6-7-18":[-31.98,-13.47],"6-7-19":[-31.86,-13.83],"5-3-9":[-31.98,-12.33],"4-1-4":[-31.98,-2.51],"6-7-20":[-30.11,-10],"6-7-21":[-23.56,-3.54],"5-3-10":[-30.11,-1.95],"6-7-22":[-13.91,4.69],"6-7-23":[0.99,14.6],"5-3-11":[-13.91,190.01],"4-1-5":[-30.11,190.01],"3-0-2":[-31.98,190.01],"6-7-24":[3.42,1613.09],"6-7-25":[5.02,15.52],"5-3-12":[3.42,1613.09],"6-7-26":[3.25,11],"6-7-27":[3.44,17.46],"5-3-13":[3.25,22.74],"4-1-6":[3.25,1613.09],"6-7-28":[7.09,27.01],"6-7-29":[10.93,32.99],"5-3-14":[-17.46,51.55],"6-7-30":[11.96,44.95],"6-7-31":[15.14,36.64],"5-3-15":[11.96,50.16],"4-1-7":[-17.46,51.55],"3-0-3":[-17.46,1613.09],"6-7-32":[14.44,33.46],"6-7-33":[12.08,29.13],"5-3-16":[12.08,33.46],"6-7-34":[9.43,27.02],"6-7-35":[7.86,36.94],"5-3-17":[7.86,41.94],"4-1-8":[7.86,41.94],"6-7-36":[7.22,22.36],"6-7-37":[6.79,18.93],"5-3-18":[6.79,29.88],"6-7-38":[1.56,124.3],"6-7-39":[2.32,568.37],"5-3-19":[1.56,568.37],"4-1-9":[1.56,568.37],"3-0-4":[1.56,1897.33],"6-7-40":[4.25,19.09],"6-7-41":[3.01,14.77],"5-3-20":[3.01,24.13],"6-7-42":[2.34,12.33],"6-7-43":[2.29,11.63],"5-3-21":[2.29,21.21],"4-1-10":[2.29,44.41],"6-7-44":[1.26,10.73],"6-7-45":[0.76,8.15],"5-3-22":[0.76,16.55],"6-7-46":[-6.78,4.11],"6-7-47":[-16.16,-2.7],"5-3-23":[-16.62,7.66],"4-1-11":[-17.27,32.28],"3-0-5":[-36.78,550.11],"6-7-48":[-26.58,-6.48],"6-7-49":[-40.15,-13.72],"5-3-24":[-40.15,-6.48],"6-7-50":[-47.56,-19.18],"6-7-51":[-60.03,-23.45],"5-3-25":[-63.69,-19.08],"4-1-12":[-70.17,-6.48],"6-7-52":[-69.12,-28.3],"6-7-53":[-81.45,-33.85],"5-3-26":[-84.19,-28.3],"6-7-54":[-93.97,-39.48],"6-7-55":[-109.85,-47.07],"5-3-27":[-110.06,-39.48],"4-1-13":[-113.49,-28.3],"3-0-6":[-120.92,6.49],"6-7-56":[-122.72,-54.61],"6-7-57":[-128.44,-60.84],"5-3-28":[-129.75,-54.61],"6-7-58":[-128.99,-62.74],"6-7-59":[-122.71,340.29],"5-3-29":[-129.75,340.29],"4-1-14":[-131.91,340.29],"6-7-60":[-107.62,329.56],"6-7-61":[-97.3,5.39],"5-3-30":[-109.45,382.35],"6-7-62":[-86.37,3872.33],"6-7-63":[-29.55,3078.77],"5-3-31":[-87.49,3872.33],"4-1-15":[-111.23,3872.33],"3-0-7":[-132.79,3970.41],"6-8-0":[11.25,27.28],"6-8-1":[8.74,21.81],"6-8-2":[2.69,17.9],"6-8-3":[-2.96,4.36],"6-8-4":[-4.02,0.26],"6-8-5":[-11.5,-1.15],"6-8-6":[-10.53,46.22],"6-8-7":[12.55,2230.09],"6-8-8":[36.02,2322.75],"6-8-9":[40.43,1231.31],"6-8-10":[15.75,1286.11],"6-8-11":[-30.38,2365.52],"6-8-12":[7.93,340.69],"6-8-13":[5.51,23.37],"6-8-14":[-1.67,15.39],"6-8-15":[-16.52,0.65],"6-8-16":[-24.69,-6.49],"6-8-17":[-32.29,-11.47],"6-8-18":[-35.39,-14.68],"6-8-19":[-34.56,-15.15],"6-8-20":[-31.71,-12.28],"6-8-21":[-26.05,-7.16],"6-8-22":[-18.78,1],"6-8-23":[-3.52,7.31],"6-8-24":[-3.45,4224.76],"6-8-25":[1,4199.19],"6-8-26":[0.32,10.2],"6-8-27":[0.52,13.28],"6-8-28":[4.26,20.81],"6-8-29":[8.36,29.82],"6-8-30":[12.88,34],"6-8-31":[-1.72,39.3],"6-8-32":[14.17,33.54],"6-8-33":[6.64,33.65],"6-8-34":[6.42,29.43],"6-8-35":[5.61,18.21],"6-8-36":[5.17,15.57],"6-8-37":[5.39,18.43],"6-8-38":[3.83,14.4],"6-8-39":[3.25,45.92],"6-8-40":[1.53,11.5],"6-8-41":[0.06,8],"6-8-42":[-0.02,5.43],"6-8-43":[0.21,5.22],"6-8-44":[-2.28,4.54],"6-8-45":[-2.62,2.59],"6-8-46":[-8.98,1.16],"6-8-47":[-17.03,-3.98],"6-8-48":[-25.84,-6.48],"6-8-49":[-38.78,-13.07],"6-8-50":[-45.69,-18.94],"6-8-51":[-56.6,-22.56],"6-8-52":[-66.31,-26.79],"6-8-53":[-78.98,-32.27],"6-8-54":[-91.83,-38.18],"6-8-55":[-109.23,-46.25],"6-8-56":[-120.92,-53.72],"6-8-57":[-127.6,-60.42],"6-8-58":[-128.14,-62.51],"6-8-59":[-122.71,772.25],"6-8-60":[-106.38,254.93],"6-8-61":[-97.02,77.33],"6-8-62":[-84.41,3797.09],"6-8-63":[-29.55,3066.33],"6-9-0":[11.45,27.35],"6-9-1":[8.74,22.1],"5-4-0":[8.74,27.35],"6-9-2":[2.31,17.45],"6-9-3":[-4.87,3.84],"5-4-1":[-4.87,17.9],"6-9-4":[-6.12,-0.5],"6-9-5":[-15.2,-2.83],"5-4-2":[-15.2,0.26],"6-9-6":[-15.2,52.5],"6-9-7":[4.19,2249.45],"5-4-3":[-15.2,2249.45],"6-9-8":[56.64,1957.92],"6-9-9":[69.73,3549.52],"5-4-4":[36.02,3549.52],"6-9-10":[-8.73,3498.22],"6-9-11":[-44.9,2301.61],"5-4-5":[-44.9,3498.22],"6-9-12":[6.61,28.12],"6-9-13":[5.07,22.28],"5-4-6":[5.07,340.69],"6-9-14":[-6.22,10.49],"6-9-15":[-22.36,-1.66],"5-4-7":[-22.36,15.39],"6-9-16":[-30.48,-8.53],"6-9-17":[-38.55,-13.07],"5-4-8":[-38.55,-6.49],"6-9-18":[-40.53,-16.27],"6-9-19":[-40.96,-16.03],"5-4-9":[-40.96,-14.68],"6-9-20":[-37.32,-13.34],"6-9-21":[-28.36,-9.72],"5-4-10":[-37.32,-7.16],"6-9-22":[-23.57,-3.51],"6-9-23":[-16.83,1.38],"5-4-11":[-23.57,7.31],"6-9-24":[-11.52,8.24],"6-9-25":[-7.91,8.27],"5-4-12":[-11.52,4224.76],"6-9-26":[-7.04,2.76],"6-9-27":[-5.19,7.73],"5-4-13":[-7.04,13.28],"6-9-28":[1.39,14.78],"6-9-29":[5.73,25.09],"5-4-14":[1.39,29.82],"6-9-30":[10.36,28.45],"6-9-31":[12.39,30.86],"5-4-15":[-1.72,39.3],"6-9-32":[13.54,31.34],"6-9-33":[10.49,28.46],"5-4-16":[6.64,33.65],"6-9-34":[7.62,22.63],"6-9-35":[4.58,15.89],"5-4-17":[4.58,29.43],"6-9-36":[2.95,11.11],"6-9-37":[-14.06,364.92],"5-4-18":[-14.06,364.92],"6-9-38":[1.83,11.45],"6-9-39":[-0.79,7.86],"5-4-19":[-0.79,45.92],"6-9-40":[-2.81,87.14],"6-9-41":[-2.9,2.06],"5-4-20":[-2.9,87.14],"6-9-42":[-3.32,0.4],"6-9-43":[-4.29,0.66],"5-4-21":[-4.29,5.43],"6-9-44":[-7.14,0.22],"6-9-45":[-8.9,-1.28],"5-4-22":[-8.9,4.54],"6-9-46":[-12.57,-1.34],"6-9-47":[-20.7,-5.15],"5-4-23":[-20.7,1.16],"6-9-48":[-26.09,-8.73],"6-9-49":[-37.6,-13.13],"5-4-24":[-38.78,-6.48],"6-9-50":[-45.9,-17.8],"6-9-51":[-53.38,-22.53],"5-4-25":[-56.6,-17.8],"6-9-52":[-62.81,-25.9],"6-9-53":[-76.09,-30.77],"5-4-26":[-78.98,-25.9],"6-9-54":[-90.63,-37.36],"6-9-55":[-107.41,-45.63],"5-4-27":[-109.23,-37.36],"6-9-56":[-119.96,-53.04],"6-9-57":[-125.63,-58.67],"5-4-28":[-127.6,-53.04],"6-9-58":[-126.31,-58.13],"6-9-59":[-119.94,1007.23],"5-4-29":[-128.14,1007.23],"6-9-60":[-106.59,462.57],"6-9-61":[-96,462.57],"5-4-30":[-106.59,462.57],"6-9-62":[-84.94,2783.57],"6-9-63":[-29.55,3039.73],"5-4-31":[-84.94,3797.09],"6-10-0":[11.66,27.39],"6-10-1":[8.8,22.47],"6-10-2":[2.11,17.55],"6-10-3":[-5.07,2.92],"6-10-4":[-6.14,-2.32],"6-10-5":[-16.63,-2.83],"6-10-6":[-16.98,31.96],"6-10-7":[-2.48,2250.87],"6-10-8":[75.19,1714.22],"6-10-9":[30.42,6207.28],"6-10-10":[-317.19,2318.12],"6-10-11":[5.09,380.19],"6-10-12":[6.09,24.81],"6-10-13":[0.81,18.21],"6-10-14":[-11.19,6.41],"6-10-15":[-27.78,-4.11],"6-10-16":[-35.96,-11.54],"6-10-17":[-43.9,-15.64],"6-10-18":[-45.01,-19.38],"6-10-19":[-44.42,-18.81],"6-10-20":[-43.08,-14.67],"6-10-21":[-34.29,-11.93],"6-10-22":[-28.41,-8.91],"6-10-23":[-23.59,-5.93],"6-10-24":[-20.03,-3.95],"6-10-25":[-15.21,-3.18],"6-10-26":[-11.97,-2.83],"6-10-27":[-7.59,2.35],"6-10-28":[-2.35,10.55],"6-10-29":[2.75,19.96],"6-10-30":[6.93,24.2],"6-10-31":[9.9,28.1],"6-10-32":[11.26,27.88],"6-10-33":[8.09,27.31],"6-10-34":[4.97,20.7],"6-10-35":[0.28,29.22],"6-10-36":[0.02,34.33],"6-10-37":[-7.05,982.44],"6-10-38":[-47,1738.21],"6-10-39":[-8.61,368.88],"6-10-40":[-9.1,399.3],"6-10-41":[-6.13,-0.9],"6-10-42":[-5.03,-1.07],"6-10-43":[-7.02,-1.37],"6-10-44":[-10.1,-2.29],"6-10-45":[-14.95,-3.92],"6-10-46":[-16.66,-4.4],"6-10-47":[-23.64,-6.94],"6-10-48":[-27.68,-10.44],"6-10-49":[-35.5,-13.58],"6-10-50":[-42.84,-16.97],"6-10-51":[-51.64,-20.99],"6-10-52":[-60.08,-24.38],"6-10-53":[-74.73,-29.94],"6-10-54":[-88.65,-36.56],"6-10-55":[-106.09,-44.4],"6-10-56":[-116.67,-51.74],"6-10-57":[-123.8,-57.34],"6-10-58":[-124.5,-55.65],"6-10-59":[-112.82,883.88],"6-10-60":[-105.11,570.37],"6-10-61":[-5.84,549.47],"6-10-62":[-84.94,2425.34],"6-10-63":[-29.55,3008.67],"6-11-0":[11.74,27.45],"6-11-1":[8.8,23.16],"5-5-0":[8.8,27.45],"6-11-2":[1.89,18.15],"6-11-3":[-6.35,2.66],"5-5-1":[-6.35,18.15],"4-2-0":[-6.35,27.45],"6-11-4":[-8.07,-2.32],"6-11-5":[-16.52,-3.47],"5-5-2":[-16.63,-2.32],"6-11-6":[-17.37,5.59],"6-11-7":[-2.46,2337.17],"5-5-3":[-17.37,2337.17],"4-2-1":[-17.37,2337.17],"6-11-8":[96.66,1624.53],"6-11-9":[111.02,4180.16],"5-5-4":[30.42,6207.28],"6-11-10":[-100.65,4014.2],"6-11-11":[5.56,27.09],"5-5-5":[-317.19,4014.2],"4-2-2":[-317.19,6207.28],"6-11-12":[4.91,20.02],"6-11-13":[-4.06,12.89],"5-5-6":[-4.06,24.81],"6-11-14":[-18.2,1.04],"6-11-15":[-33.3,-7.02],"5-5-7":[-33.3,6.41],"4-2-3":[-33.3,340.69],"6-11-16":[-42.2,-14.25],"6-11-17":[-50.16,-18.62],"5-5-8":[-50.16,-11.54],"6-11-18":[-52.64,-21.88],"6-11-19":[-51.01,-21.95],"5-5-9":[-52.64,-18.81],"4-2-4":[-52.64,-6.49],"6-11-20":[-49.53,-17.94],"6-11-21":[-42.64,-14.48],"5-5-10":[-49.53,-11.93],"6-11-22":[-34.91,-12.52],"6-11-23":[-31.5,-10.6],"5-5-11":[-34.91,-5.93],"4-2-5":[-49.53,7.31],"6-11-24":[-29.55,-8.2],"6-11-25":[-23.86,-6.38],"5-5-12":[-29.55,-3.18],"6-11-26":[-19.87,-4.46],"6-11-27":[-13.37,-1.47],"5-5-13":[-19.87,2.35],"4-2-6":[-29.55,4224.76],"6-11-28":[-8.39,3.39],"6-11-29":[-0.38,13.1],"5-5-14":[-8.39,19.96],"6-11-30":[3.79,18.24],"6-11-31":[7.04,23.18],"5-5-15":[3.79,28.1],"4-2-7":[-8.39,39.3],"6-11-32":[8.41,23.23],"6-11-33":[6.61,21.8],"5-5-16":[6.61,27.88],"6-11-34":[1.94,15.53],"6-11-35":[-0.83,8.74],"5-5-17":[-0.83,29.22],"4-2-8":[-0.83,33.65],"6-11-36":[-5.27,4.25],"6-11-37":[-19.17,108.86],"5-5-18":[-19.17,982.44],"6-11-38":[-10.07,418.12],"6-11-39":[-13.37,-1.41],"5-5-19":[-47,1738.21],"4-2-9":[-47,1738.21],"6-11-40":[-14.02,394.12],"6-11-41":[-9.37,-2.74],"5-5-20":[-14.02,399.3],"6-11-42":[-11.22,-2.09],"6-11-43":[-11.68,-2.6],"5-5-21":[-11.68,-1.07],"4-2-10":[-14.02,399.3],"6-11-44":[-14.51,-3.6],"6-11-45":[-18.66,-5.6],"5-5-22":[-18.66,-2.29],"6-11-46":[-22.45,-7.76],"6-11-47":[-26.05,-8.93],"5-5-23":[-26.05,-4.4],"4-2-11":[-26.05,4.54],"6-11-48":[-29.53,-11.9],"6-11-49":[-34.85,-13.59],"5-5-24":[-35.5,-10.44],"6-11-50":[-40.97,-16.5],"6-11-51":[-48.53,-20.15],"5-5-25":[-51.64,-16.5],"4-2-12":[-56.6,-6.48],"6-11-52":[-58.21,-23.76],"6-11-53":[-72.99,-29.48],"5-5-26":[-74.73,-23.76],"6-11-54":[-86.21,-36.12],"6-11-55":[-103.18,-43.08],"5-5-27":[-106.09,-36.12],"4-2-13":[-109.23,-23.76],"6-11-56":[-113.79,-50.3],"6-11-57":[-120.63,-55.96],"5-5-28":[-123.8,-50.3],"6-11-58":[-122.11,-30.17],"6-11-59":[-109.73,896.34],"5-5-29":[-124.5,896.34],"4-2-14":[-128.14,1007.23],"6-11-60":[-50.89,667.99],"6-11-61":[119.31,564.8],"5-5-30":[-105.11,667.99],"6-11-62":[-24.93,3379.23],"6-11-63":[-29.55,2977.45],"5-5-31":[-84.94,3379.23],"4-2-15":[-106.59,3797.09],"6-12-0":[11.81,27.54],"6-12-1":[9.27,23.85],"6-12-2":[1.81,18.51],"6-12-3":[-7.36,2.56],"6-12-4":[-10.2,-3.36],"6-12-5":[-14.2,-3.64],"6-12-6":[-17.25,-1.46],"6-12-7":[-2.4,2626.58],"6-12-8":[127.44,1971.14],"6-12-9":[267.44,4964.36],"6-12-10":[-3.84,5003.13],"6-12-11":[5.53,17.77],"6-12-12":[1.22,17.44],"6-12-13":[-9.28,8.08],"6-12-14":[-24.33,-2.54],"6-12-15":[-38.37,-10.05],"6-12-16":[-46.59,-16.83],"6-12-17":[-57.08,-21.69],"6-12-18":[-58.76,-25],"6-12-19":[-58.51,-24.8],"6-12-20":[-55.3,-22.36],"6-12-21":[-47.72,-17.53],"6-12-22":[-42.01,-15.94],"6-12-23":[-37.95,-14.94],"6-12-24":[-36.96,-12.18],"6-12-25":[-32.38,-10.05],"6-12-26":[-27.79,-7.26],"6-12-27":[-19.35,-4.41],"6-12-28":[-13.92,-0.37],"6-12-29":[-6.27,6.6],"6-12-30":[-0.21,13.43],"6-12-31":[3.37,18.86],"6-12-32":[5.2,19.08],"6-12-33":[3.85,16.44],"6-12-34":[1,12.4],"6-12-35":[-5.91,3.06],"6-12-36":[-9.39,-0.47],"6-12-37":[-17.5,26.39],"6-12-38":[-14.85,15.85],"6-12-39":[-17.05,13.14],"6-12-40":[-17.31,-5.04],"6-12-41":[-154.99,367.1],"6-12-42":[-15.2,-4.66],"6-12-43":[-16.85,-5.49],"6-12-44":[-17.72,-5.68],"6-12-45":[-20.88,-7.48],"6-12-46":[-23.23,-9.37],"6-12-47":[-28.2,-11.32],"6-12-48":[-31.15,-13.01],"6-12-49":[-35.22,-15.16],"6-12-50":[-39.72,-16.79],"6-12-51":[-47.41,-19.15],"6-12-52":[-57.34,-23.29],"6-12-53":[-72.24,-28.77],"6-12-54":[-84.64,-35.59],"6-12-55":[-100.6,-41.81],"6-12-56":[-110.81,-48.6],"6-12-57":[-116.73,-54.27],"6-12-58":[-118.77,732.21],"6-12-59":[-106.63,1118.71],"6-12-60":[70.79,697.82],"6-12-61":[154.07,547.44],"6-12-62":[132.66,3177.52],"6-12-63":[-29.55,2958.4],"6-13-0":[11.89,27.69],"6-13-1":[9.27,24.72],"5-6-0":[9.27,27.69],"6-13-2":[1.77,18.69],"6-13-3":[-8.12,2.29],"5-6-1":[-8.12,18.69],"6-13-4":[-12.79,-3.7],"6-13-5":[-16.12,-5.11],"5-6-2":[-16.12,-3.36],"6-13-6":[-16.46,-1.51],"6-13-7":[-4.5,2443.65],"5-6-3":[-17.25,2626.58],"6-13-8":[159.96,1955.52],"6-13-9":[264.67,3305.19],"5-6-4":[127.44,4964.36],"6-13-10":[-0.63,5501.18],"6-13-11":[3.4,16.19],"5-6-5":[-3.84,5501.18],"6-13-12":[-4.33,12.53],"6-13-13":[-18.11,1.23],"5-6-6":[-18.11,17.44],"6-13-14":[-32.01,-5.03],"6-13-15":[-45.8,-13.68],"5-6-7":[-45.8,-2.54],"6-13-16":[-52.61,-19.6],"6-13-17":[-65.07,-24.29],"5-6-8":[-65.07,-16.83],"6-13-18":[-66.2,-29.09],"6-13-19":[-65.62,-28.05],"5-6-9":[-66.2,-24.8],"6-13-20":[-61.26,-25.11],"6-13-21":[-55.52,-21.57],"5-6-10":[-61.26,-17.53],"6-13-22":[-51.8,-19.25],"6-13-23":[-47.07,-19.08],"5-6-11":[-51.8,-14.94],"6-13-24":[-46.24,-17.09],"6-13-25":[-43.41,-14.52],"5-6-12":[-46.24,-10.05],"6-13-26":[-38.71,-10.51],"6-13-27":[-27.96,-7.34],"5-6-13":[-38.71,-4.41],"6-13-28":[-23.22,-4.17],"6-13-29":[-16.97,-0.2],"5-6-14":[-23.22,6.6],"6-13-30":[-9.11,5.15],"6-13-31":[-0.62,10.05],"5-6-15":[-9.11,18.86],"6-13-32":[1.62,10.97],"6-13-33":[1.64,9.15],"5-6-16":[1.62,19.08],"6-13-34":[-12.01,574],"6-13-35":[-8.4,3.2],"5-6-17":[-12.01,574],"6-13-36":[-12.41,-2.96],"6-13-37":[-12.61,18.94],"5-6-18":[-17.5,26.39],"6-13-38":[-17.05,15.14],"6-13-39":[-23.08,21.33],"5-6-19":[-23.08,21.33],"6-13-40":[-20.89,-7.97],"6-13-41":[-20.89,-4.36],"5-6-20":[-154.99,367.1],"6-13-42":[-17.41,-4.92],"6-13-43":[-19.71,-8.03],"5-6-21":[-19.71,-4.66],"6-13-44":[-19.71,-8.36],"6-13-45":[-23.09,-9.22],"5-6-22":[-23.09,-5.68],"6-13-46":[-26.22,-10.62],"6-13-47":[-29.93,-11.92],"5-6-23":[-29.93,-9.37],"6-13-48":[-33.2,-14.27],"6-13-49":[-36.69,-15.88],"5-6-24":[-36.69,-13.01],"6-13-50":[-37.72,-16.79],"6-13-51":[-46.58,-18.04],"5-6-25":[-47.41,-16.79],"6-13-52":[-56.13,-21.69],"6-13-53":[-71.1,-28.36],"5-6-26":[-72.24,-21.69],"6-13-54":[-82.17,-35.16],"6-13-55":[-96.84,-41.49],"5-6-27":[-100.6,-35.16],"6-13-56":[-107.17,-47.12],"6-13-57":[-113.4,-52.39],"5-6-28":[-116.73,-47.12],"6-13-58":[-113.8,799.79],"6-13-59":[542.77,1415.24],"5-6-29":[-118.77,1415.24],"6-13-60":[220.94,696.8],"6-13-61":[196.25,578.81],"5-6-30":[70.79,697.82],"6-13-62":[157.82,2807.42],"6-13-63":[-29.55,2933.27],"5-6-31":[-29.55,3177.52],"6-14-0":[11.98,27.81],"6-14-1":[9.31,25.28],"6-14-2":[1.78,18.69],"6-14-3":[-8.42,2.84],"6-14-4":[-14.71,-4.24],"6-14-5":[-17.71,-6.65],"6-14-6":[-16.95,-3.21],"6-14-7":[-6.95,1629.08],"6-14-8":[241.64,2195.84],"6-14-9":[291.07,2352.25],"6-14-10":[-17.81,5990.12],"6-14-11":[-1.23,1250.79],"6-14-12":[-8.91,5.47],"6-14-13":[-24.35,-2.9],"6-14-14":[-37.36,-9.51],"6-14-15":[-50.8,-17],"6-14-16":[-57.16,-23.13],"6-14-17":[-69.06,-26.79],"6-14-18":[-71.13,-32.26],"6-14-19":[-70.57,-30.63],"6-14-20":[-66.49,-28.02],"6-14-21":[-61.06,-25.99],"6-14-22":[-58.98,-23.49],"6-14-23":[-55.47,-22.95],"6-14-24":[-54.23,-21.9],"6-14-25":[-50.55,-19.65],"6-14-26":[-46.21,-14.46],"6-14-27":[-36.47,-11.82],"6-14-28":[-32.84,-8.88],"6-14-29":[-24.98,-4.86],"6-14-30":[-17.66,-0.54],"6-14-31":[-8.29,3.14],"6-14-32":[-4.33,4.38],"6-14-33":[-3.04,4.04],"6-14-34":[-30.12,444.87],"6-14-35":[-45.64,1253.85],"6-14-36":[-15.82,-4.2],"6-14-37":[-18.57,11.81],"6-14-38":[-20.38,12.56],"6-14-39":[-34.53,29.28],"6-14-40":[-23.61,-9.96],"6-14-41":[-23.65,-8.25],"6-14-42":[-22.26,-7.63],"6-14-43":[-21.36,-8.79],"6-14-44":[-21.36,-9.44],"6-14-45":[-23.95,-9.8],"6-14-46":[-26.93,-11.59],"6-14-47":[-30.83,-13.34],"6-14-48":[-34.25,-14.96],"6-14-49":[-36.46,-16.64],"6-14-50":[-38.97,-17.15],"6-14-51":[-43.17,-17.84],"6-14-52":[-55.2,-20.47],"6-14-53":[-70.32,-27.45],"6-14-54":[-81.47,-34.2],"6-14-55":[-94.24,-40.37],"6-14-56":[-103.99,-46.19],"6-14-57":[-110.48,-50.32],"6-14-58":[-111.11,1501.65],"6-14-59":[649.8,1730.64],"6-14-60":[290.61,752.21],"6-14-61":[298.29,587.99],"6-14-62":[230.04,3232.04],"6-14-63":[-29.54,2914.46],"6-15-0":[12.07,27.95],"6-15-1":[9.31,25.8],"5-7-0":[9.31,27.95],"6-15-2":[2,18.62],"6-15-3":[-9.36,3.57],"5-7-1":[-9.36,18.69],"4-3-0":[-9.36,27.95],"6-15-4":[-15.66,-4.24],"6-15-5":[-19.9,-7.76],"5-7-2":[-19.9,-4.24],"6-15-6":[-18.71,-3.02],"6-15-7":[-10.73,1677.33],"5-7-3":[-18.71,1677.33],"4-3-1":[-19.9,2626.58],"3-1-0":[-19.9,2626.58],"6-15-8":[6.28,2201.64],"6-15-9":[372.06,2244.89],"5-7-4":[6.28,2352.25],"6-15-10":[-3.5,3286.53],"6-15-11":[-24.01,4338.49],"5-7-5":[-24.01,5990.12],"4-3-2":[-24.01,5990.12],"6-15-12":[-16,0.26],"6-15-13":[-30.5,-5.77],"5-7-6":[-30.5,5.47],"6-15-14":[-41.91,-12.56],"6-15-15":[-54.89,-19.83],"5-7-7":[-54.89,-9.51],"4-3-3":[-54.89,17.44],"3-1-1":[-317.19,6207.28],"2-0-0":[-317.19,6207.28],"6-15-16":[-61.53,-25.72],"6-15-17":[-71.96,-29.35],"5-7-8":[-71.96,-23.13],"6-15-18":[-74.97,-34.5],"6-15-19":[-75.35,-33.7],"5-7-9":[-75.35,-30.63],"4-3-4":[-75.35,-16.83],"6-15-20":[-73.32,-31.19],"6-15-21":[-69.11,-29.89],"5-7-10":[-73.32,-25.99],"6-15-22":[-67.31,-28.48],"6-15-23":[-66.05,-27.68],"5-7-11":[-67.31,-22.95],"4-3-5":[-73.32,-14.94],"3-1-2":[-75.35,7.31],"6-15-24":[-64.91,-26.11],"6-15-25":[-62.05,-23.7],"5-7-12":[-64.91,-19.65],"6-15-26":[-58.25,-19.12],"6-15-27":[-49.51,-17.07],"5-7-13":[-58.25,-11.82],"4-3-6":[-64.91,-4.41],"6-15-28":[-44.78,-13.51],"6-15-29":[-35.93,-9.36],"5-7-14":[-44.78,-4.86],"6-15-30":[-28.32,-5.14],"6-15-31":[-19.14,-2.71],"5-7-15":[-28.32,3.14],"4-3-7":[-44.78,18.86],"3-1-3":[-64.91,4224.76],"2-0-1":[-75.35,4224.76],"6-15-32":[-13.73,-1.71],"6-15-33":[-10.63,-1.49],"5-7-16":[-13.73,4.38],"6-15-34":[-10.78,-2.12],"6-15-35":[-13.93,-2.93],"5-7-17":[-45.64,1253.85],"4-3-8":[-45.64,1253.85],"6-15-36":[-18.78,-4.46],"6-15-37":[-22.12,-7.9],"5-7-18":[-22.12,11.81],"6-15-38":[-22.48,7.98],"6-15-39":[-23.83,16.82],"5-7-19":[-34.53,29.28],"4-3-9":[-34.53,29.28],"3-1-4":[-47,1738.21],"6-15-40":[-25.6,210.54],"6-15-41":[-26.63,-11.38],"5-7-20":[-26.63,210.54],"6-15-42":[-26.15,-10.1],"6-15-43":[-23.47,-10.22],"5-7-21":[-26.15,-7.63],"4-3-10":[-154.99,367.1],"6-15-44":[-23.37,-10.28],"6-15-45":[-24.8,-10.38],"5-7-22":[-24.8,-9.44],"6-15-46":[-27.57,-12.05],"6-15-47":[-31.68,-13.68],"5-7-23":[-31.68,-11.59],"4-3-11":[-31.68,-5.68],"3-1-5":[-154.99,399.3],"2-0-2":[-154.99,1897.33],"6-15-48":[-33.83,-15.28],"6-15-49":[-36.24,-16.57],"5-7-24":[-36.46,-14.96],"6-15-50":[-40.85,-17.93],"6-15-51":[-40.81,-17.17],"5-7-25":[-43.17,-17.15],"4-3-12":[-47.41,-13.01],"6-15-52":[-53.46,-20.29],"6-15-53":[-68.22,-26.61],"5-7-26":[-70.32,-20.29],"6-15-54":[-79.48,-33.55],"6-15-55":[-91.99,-40.09],"5-7-27":[-94.24,-33.55],"4-3-13":[-100.6,-20.29],"3-1-6":[-109.23,-6.48],"6-15-56":[-99.15,-44.2],"6-15-57":[-105.53,-47.94],"5-7-28":[-110.48,-44.2],"6-15-58":[-105.53,1582.81],"6-15-59":[752.2,3280.76],"5-7-29":[-111.11,3280.76],"4-3-14":[-118.77,3280.76],"6-15-60":[370.12,1055.95],"6-15-61":[342.75,583.66],"5-7-30":[290.61,1055.95],"6-15-62":[359.13,3299.77],"6-15-63":[-29.54,2899.4],"5-7-31":[-29.54,3299.77],"4-3-15":[-29.55,3299.77],"3-1-7":[-128.14,3797.09],"2-0-3":[-132.79,3970.41],"6-16-0":[12.18,28.06],"6-16-1":[9.42,26.44],"6-16-2":[2.35,18.81],"6-16-3":[-9.47,3.62],"6-16-4":[-15.5,-4.65],"6-16-5":[-19.9,-6.14],"6-16-6":[-18.71,-2.92],"6-16-7":[-13.51,358.63],"6-16-8":[4.93,2700.74],"6-16-9":[524.03,2379.96],"6-16-10":[138.16,2349.52],"6-16-11":[-19.04,3089.83],"6-16-12":[-32.37,1191.79],"6-16-13":[-32.78,1099.24],"6-16-14":[-42.73,-15.25],"6-16-15":[-55.78,-21.82],"6-16-16":[-62.13,-27.45],"6-16-17":[-73.82,-31.05],"6-16-18":[-77.86,-35.86],"6-16-19":[-79.19,-36.66],"6-16-20":[-78.8,-34.53],"6-16-21":[-75.08,-33.65],"6-16-22":[-74.19,-33.08],"6-16-23":[-73.6,-32.44],"6-16-24":[-71.56,-31.17],"6-16-25":[-70.97,-29.12],"6-16-26":[-66.99,-25.12],"6-16-27":[-59.8,-22.61],"6-16-28":[-53.63,-18.47],"6-16-29":[-44.99,-14.42],"6-16-30":[-35.2,-9.88],"6-16-31":[-25.62,-7.01],"6-16-32":[-19.94,-5.38],"6-16-33":[-16.2,-5.07],"6-16-34":[-15.92,-4.9],"6-16-35":[-16.42,-5.38],"6-16-36":[-19.23,-6.96],"6-16-37":[-22.12,-9.38],"6-16-38":[-22.83,-10.64],"6-16-39":[-23.64,-10.88],"6-16-40":[-25.6,395.5],"6-16-41":[-27.18,-12.58],"6-16-42":[-27.19,-11.89],"6-16-43":[-25.25,-11.48],"6-16-44":[-23.89,-10.73],"6-16-45":[-25.51,-11.64],"6-16-46":[-27.55,-12.42],"6-16-47":[-30.38,-13.83],"6-16-48":[-32.72,-14.63],"6-16-49":[-36.23,-15.29],"6-16-50":[-40.57,-17.57],"6-16-51":[-40.62,-17.17],"6-16-52":[-52.6,-20.03],"6-16-53":[-67.1,-26.24],"6-16-54":[-78.95,-32.27],"6-16-55":[-88.41,-38.74],"6-16-56":[-94.87,-42.36],"6-16-57":[-102.31,-45.37],"6-16-58":[-102.31,2780.28],"6-16-59":[1055.94,3057.06],"6-16-60":[561.63,1251.61],"6-16-61":[360.22,729.54],"6-16-62":[569.39,3324.73],"6-16-63":[-29.54,2887.59],"6-17-0":[12.28,28.2],"6-17-1":[9.42,27.09],"5-8-0":[9.42,28.2],"6-17-2":[2.44,19.47],"6-17-3":[-9.26,3.4],"5-8-1":[-9.47,19.47],"6-17-4":[-12.46,-4.27],"6-17-5":[-17.6,-3.54],"5-8-2":[-19.9,-3.54],"6-17-6":[-16.97,-3.57],"6-17-7":[-17.03,450.81],"5-8-3":[-18.71,450.81],"6-17-8":[-1,2409.04],"6-17-9":[729.41,2941.77],"5-8-4":[-1,2941.77],"6-17-10":[639.5,2300.19],"6-17-11":[-7.73,3041.41],"5-8-5":[-19.04,3089.83],"6-17-12":[-40.41,2709.89],"6-17-13":[-36.12,1110.77],"5-8-6":[-40.41,2709.89],"6-17-14":[-44.38,-16.38],"6-17-15":[-55.37,-22.03],"5-8-7":[-55.78,-15.25],"6-17-16":[-62.03,-26.24],"6-17-17":[-74.43,-30.62],"5-8-8":[-74.43,-26.24],"6-17-18":[-79.53,-36.84],"6-17-19":[-81.78,-38.94],"5-8-9":[-81.78,-35.86],"6-17-20":[-81.39,-38.14],"6-17-21":[-82.89,-37.3],"5-8-10":[-82.89,-33.65],"6-17-22":[-83.1,-37.32],"6-17-23":[-82.35,-36.18],"5-8-11":[-83.1,-32.44],"6-17-24":[-81.19,-36.06],"6-17-25":[-80.32,-33.99],"5-8-12":[-81.19,-29.12],"6-17-26":[-77.62,-31.19],"6-17-27":[-70.94,-27.45],"5-8-13":[-77.62,-22.61],"6-17-28":[-64.31,-23.68],"6-17-29":[-54,-18.06],"5-8-14":[-64.31,-14.42],"6-17-30":[-43.73,-13.82],"6-17-31":[-34.31,-10.34],"5-8-15":[-43.73,-7.01],"6-17-32":[-28.04,-8.32],"6-17-33":[-22.53,-7.81],"5-8-16":[-28.04,-5.07],"6-17-34":[-20.71,-7.81],"6-17-35":[-20.22,-8],"5-8-17":[-20.71,-4.9],"6-17-36":[-18.91,-8.25],"6-17-37":[-21.69,-9.44],"5-8-18":[-22.12,-6.96],"6-17-38":[-22.79,-10.07],"6-17-39":[-23.64,-11.06],"5-8-19":[-23.64,-10.07],"6-17-40":[-25.6,315.4],"6-17-41":[-27.15,-11.32],"5-8-20":[-27.18,395.5],"6-17-42":[-27.2,-12.55],"6-17-43":[-25.3,-11.22],"5-8-21":[-27.2,-11.22],"6-17-44":[-23.39,-10.83],"6-17-45":[-25.69,-11.63],"5-8-22":[-25.69,-10.73],"6-17-46":[-27.32,-12.29],"6-17-47":[-29.02,-13.43],"5-8-23":[-30.38,-12.29],"6-17-48":[-30.31,-14],"6-17-49":[-34.83,-14.43],"5-8-24":[-36.23,-14],"6-17-50":[-36.28,-15.71],"6-17-51":[-39.91,-16.54],"5-8-25":[-40.62,-15.71],"6-17-52":[-49.95,-19.22],"6-17-53":[-64.39,-24.43],"5-8-26":[-67.1,-19.22],"6-17-54":[-75.83,-31.35],"6-17-55":[-84.15,-37.16],"5-8-27":[-88.41,-31.35],"6-17-56":[-89.73,-39.94],"6-17-57":[-97.13,-43.44],"5-8-28":[-102.31,-39.94],"6-17-58":[-96.35,2730.02],"6-17-59":[1251.6,2341.32],"5-8-29":[-102.31,3057.06],"6-17-60":[646.73,1350.33],"6-17-61":[434.89,803.49],"5-8-30":[360.22,1350.33],"6-17-62":[729.53,3573.17],"6-17-63":[-29.54,2879.05],"5-8-31":[-29.54,3573.17],"6-18-0":[12.4,28.31],"6-18-1":[10.07,27.6],"6-18-2":[2.4,20.08],"6-18-3":[-8.33,2.75],"6-18-4":[-10.4,-2.36],"6-18-5":[-18.83,-3.43],"6-18-6":[-22.53,142.08],"6-18-7":[-18.17,429.97],"6-18-8":[-0.16,2151.79],"6-18-9":[348.42,2614.23],"6-18-10":[9.51,2710.75],"6-18-11":[294.75,2698.9],"6-18-12":[-24.66,2746.59],"6-18-13":[-259.61,2747.57],"6-18-14":[-46.28,1843.49],"6-18-15":[-53.35,-22.18],"6-18-16":[-60.66,-26.44],"6-18-17":[-73.74,-29.66],"6-18-18":[-79.72,-35.92],"6-18-19":[-82.56,-39.87],"6-18-20":[-83.14,-40.29],"6-18-21":[-87.25,-40.68],"6-18-22":[-88.44,-41.38],"6-18-23":[-87.74,-40.45],"6-18-24":[-87.08,-40.24],"6-18-25":[-86.36,-38.8],"6-18-26":[-83.25,-35.89],"6-18-27":[-78.02,-32.16],"6-18-28":[-71.88,-27.65],"6-18-29":[-60.18,-22.1],"6-18-30":[-49.79,-17.75],"6-18-31":[-40.43,-14.23],"6-18-32":[-34.17,-11.43],"6-18-33":[-27.72,-10.12],"6-18-34":[-24.22,-9.98],"6-18-35":[-22.71,-9.16],"6-18-36":[-19.05,-9.09],"6-18-37":[-20.03,-8.96],"6-18-38":[-21.83,-9.07],"6-18-39":[-23.26,-10.05],"6-18-40":[-22.96,30.18],"6-18-41":[-25.64,-10.66],"6-18-42":[-26.07,-11.58],"6-18-43":[-24.63,-10.9],"6-18-44":[-23.29,-10.9],"6-18-45":[-24.95,-11.37],"6-18-46":[-26.58,-12.17],"6-18-47":[-27.96,-12.57],"6-18-48":[-28.66,-12.73],"6-18-49":[-31.29,-12.64],"6-18-50":[-33.1,-13.52],"6-18-51":[-38.3,-14.77],"6-18-52":[-46.75,-18.61],"6-18-53":[-62.71,-23.22],"6-18-54":[-73.11,-30.4],"6-18-55":[-79.89,-35.13],"6-18-56":[-85.72,-38.01],"6-18-57":[-91.81,-40.53],"6-18-58":[-89.38,2750.5],"6-18-59":[1350.32,2817.84],"6-18-60":[749.4,1490.05],"6-18-61":[552.13,901.46],"6-18-62":[803.48,3682.63],"6-18-63":[-29.54,2878.07],"6-19-0":[12.49,28.44],"6-19-1":[10.07,28.63],"5-9-0":[10.07,28.63],"6-19-2":[2.33,20.54],"6-19-3":[-8.14,2.42],"5-9-1":[-8.33,20.54],"4-4-0":[-9.47,28.63],"6-19-4":[-13.58,-2.05],"6-19-5":[-21.21,283.5],"5-9-2":[-21.21,283.5],"6-19-6":[-26.63,317.55],"6-19-7":[-24.44,581.34],"5-9-3":[-26.63,581.34],"4-4-1":[-26.63,581.34],"6-19-8":[-7.43,973.14],"6-19-9":[6.63,2480.85],"5-9-4":[-7.43,2614.23],"6-19-10":[-1.43,2228.73],"6-19-11":[399.03,2929.86],"5-9-5":[-1.43,2929.86],"4-4-2":[-19.04,3089.83],"6-19-12":[587.41,2399.44],"6-19-13":[-30.31,3974.94],"5-9-6":[-259.61,3974.94],"6-19-14":[-46.53,2829.29],"6-19-15":[-55.15,2131.34],"5-9-7":[-55.15,2829.29],"4-4-3":[-259.61,3974.94],"6-19-16":[-60.39,1592.47],"6-19-17":[-71.31,1595.59],"5-9-8":[-73.74,1595.59],"6-19-18":[-78.96,251.63],"6-19-19":[-83.12,-38.05],"5-9-9":[-83.12,251.63],"4-4-4":[-83.12,1595.59],"6-19-20":[-84.9,-41.29],"6-19-21":[-89.63,-42.03],"5-9-10":[-89.63,-40.29],"6-19-22":[-92.74,-43.78],"6-19-23":[-93.19,-43.92],"5-9-11":[-93.19,-40.45],"4-4-5":[-93.19,-32.44],"6-19-24":[-93.06,-43.61],"6-19-25":[-92.29,-42.14],"5-9-12":[-93.06,-38.8],"6-19-26":[-89.24,-39.76],"6-19-27":[-85.23,-36.36],"5-9-13":[-89.24,-32.16],"4-4-6":[-93.06,-22.61],"6-19-28":[-78.96,-31.27],"6-19-29":[-67.42,-25.3],"5-9-14":[-78.96,-22.1],"6-19-30":[-57.07,-21.14],"6-19-31":[-48.07,-17.54],"5-9-15":[-57.07,-14.23],"4-4-7":[-78.96,-7.01],"6-19-32":[-41.41,-14.6],"6-19-33":[-33.3,-12.43],"5-9-16":[-41.41,-10.12],"6-19-34":[-28.55,-11.75],"6-19-35":[-23.48,-9.55],"5-9-17":[-28.55,-9.16],"4-4-8":[-41.41,-4.9],"6-19-36":[-19.4,-8.58],"6-19-37":[-18.07,-7.73],"5-9-18":[-20.03,-7.73],"6-19-38":[-19.41,-7.69],"6-19-39":[-21.4,-8.18],"5-9-19":[-23.26,-7.69],"4-4-9":[-23.64,-6.96],"6-19-40":[-21.19,0.38],"6-19-41":[-23.26,-9.49],"5-9-20":[-25.64,30.18],"6-19-42":[-23.81,-10.86],"6-19-43":[-23.19,-10.71],"5-9-21":[-26.07,-10.71],"4-4-10":[-27.2,395.5],"6-19-44":[-23.63,-10.75],"6-19-45":[-24.65,-11.33],"5-9-22":[-24.95,-10.75],"6-19-46":[-24.92,-11.97],"6-19-47":[-25.67,-11.81],"5-9-23":[-27.96,-11.81],"4-4-11":[-30.38,-10.73],"6-19-48":[-25.62,-11.54],"6-19-49":[-26.6,-11.36],"5-9-24":[-31.29,-11.36],"6-19-50":[-29.05,-11.87],"6-19-51":[-37.03,-13.23],"5-9-25":[-38.3,-11.87],"4-4-12":[-40.62,-11.36],"6-19-52":[-44.46,-17.75],"6-19-53":[-60.61,-22.7],"5-9-26":[-62.71,-17.75],"6-19-54":[-69.03,-29.59],"6-19-55":[-75.62,-33.5],"5-9-27":[-79.89,-29.59],"4-4-13":[-88.41,-17.75],"6-19-56":[-80.8,-36.68],"6-19-57":[-87.74,-39.43],"5-9-28":[-91.81,-36.68],"6-19-58":[-80.06,2986.57],"6-19-59":[1490.04,3530.83],"5-9-29":[-89.38,3530.83],"4-4-14":[-102.31,3530.83],"6-19-60":[865.9,1514.1],"6-19-61":[606.22,956.54],"5-9-30":[552.13,1514.1],"6-19-62":[901.45,3114.64],"6-19-63":[-29.54,2878.57],"5-9-31":[-29.54,3682.63],"4-4-15":[-29.54,3682.63],"6-20-0":[12.6,28.55],"6-20-1":[10.43,29.48],"6-20-2":[2.27,20.82],"6-20-3":[-7.48,2.38],"6-20-4":[-13.58,105.36],"6-20-5":[-22.77,360.51],"6-20-6":[-29.85,693.54],"6-20-7":[-27.48,842.66],"6-20-8":[101.52,662.44],"6-20-9":[38.73,1501.83],"6-20-10":[-7.86,1335.36],"6-20-11":[265.12,2410.7],"6-20-12":[394.15,2580.47],"6-20-13":[176.29,3118.01],"6-20-14":[-26.42,3265.41],"6-20-15":[-24.65,4373.52],"6-20-16":[-14.17,3180.62],"6-20-17":[-27.55,4292.74],"6-20-18":[-76.12,2093.71],"6-20-19":[-82.77,1757.21],"6-20-20":[-84.77,-39.45],"6-20-21":[-90.02,-41.79],"6-20-22":[-93.63,-44.7],"6-20-23":[-95.18,-46.27],"6-20-24":[-95.41,-46.25],"6-20-25":[-94.65,-44.61],"6-20-26":[-91.54,-43],"6-20-27":[-87.87,-39.48],"6-20-28":[-81.88,-34.42],"6-20-29":[-70.45,-28.53],"6-20-30":[-61.33,-24.48],"6-20-31":[-52.2,-20.85],"6-20-32":[-45.21,-17.01],"6-20-33":[-35.82,-14.29],"6-20-34":[-30,-12.23],"6-20-35":[-24.98,-9.38],"6-20-36":[-19.21,-7.52],"6-20-37":[-16.88,-6.21],"6-20-38":[-16.13,-6.04],"6-20-39":[-17.89,-6.16],"6-20-40":[-18.62,-6.82],"6-20-41":[-21.61,-7.83],"6-20-42":[-22.22,-9.86],"6-20-43":[-23.83,-10.66],"6-20-44":[-24.73,-11.26],"6-20-45":[-25.79,-11.42],"6-20-46":[-25.8,-11.97],"6-20-47":[-24.13,-11.21],"6-20-48":[-23.48,-10.65],"6-20-49":[-23.65,-10.31],"6-20-50":[-26.04,-10.7],"6-20-51":[-35.46,-11.92],"6-20-52":[-44.23,-15.93],"6-20-53":[-59.19,-21.91],"6-20-54":[-66.26,-28.4],"6-20-55":[-73.37,-32.29],"6-20-56":[-79.03,-35.55],"6-20-57":[-84.12,-37.56],"6-20-58":[-79.02,1956.61],"6-20-59":[1514.09,2297.87],"6-20-60":[953.69,1535.12],"6-20-61":[812.01,1063],"6-20-62":[956.53,2865.19],"6-20-63":[-29.59,2878.57],"6-21-0":[12.69,28.95],"6-21-1":[10.43,30.37],"5-10-0":[10.43,30.37],"6-21-2":[2.27,21.72],"6-21-3":[-4.05,2.72],"5-10-1":[-7.48,21.72],"6-21-4":[-14.88,306.82],"6-21-5":[-25.82,454.87],"5-10-2":[-25.82,454.87],"6-21-6":[-33.35,413.74],"6-21-7":[-35.21,781.37],"5-10-3":[-35.21,842.66],"6-21-8":[126.37,696.58],"6-21-9":[137.72,880.39],"5-10-4":[38.73,1501.83],"6-21-10":[-10.46,833.93],"6-21-11":[299.05,1099.39],"5-10-5":[-10.46,2410.7],"6-21-12":[314.78,3253.8],"6-21-13":[300.79,3939.1],"5-10-6":[176.29,3939.1],"6-21-14":[196.37,2946.16],"6-21-15":[15.24,2851.96],"5-10-7":[-26.42,4373.52],"6-21-16":[351.22,2953.97],"6-21-17":[661.98,3100.13],"5-10-8":[-27.55,4292.74],"6-21-18":[-17.49,4387.58],"6-21-19":[-41.7,4242],"5-10-9":[-82.77,4387.58],"6-21-20":[-83.6,610.58],"6-21-21":[-89.13,1248.21],"5-10-10":[-90.02,1248.21],"6-21-22":[-93.13,-43.26],"6-21-23":[-95.04,-45.42],"5-10-11":[-95.18,-43.26],"6-21-24":[-95.32,-46.3],"6-21-25":[-94.74,-45.23],"5-10-12":[-95.41,-44.61],"6-21-26":[-91.98,-43.77],"6-21-27":[-87.81,-40.96],"5-10-13":[-91.98,-39.48],"6-21-28":[-82.67,-36.11],"6-21-29":[-71.2,-30.73],"5-10-14":[-82.67,-28.53],"6-21-30":[-63.31,-26.83],"6-21-31":[-54.81,-22.8],"5-10-15":[-63.31,-20.85],"6-21-32":[-47.82,-18.67],"6-21-33":[-38.41,-15.13],"5-10-16":[-47.82,-14.29],"6-21-34":[-32.21,-12.89],"6-21-35":[-25.63,-9.33],"5-10-17":[-32.21,-9.33],"6-21-36":[-19.3,-6.07],"6-21-37":[-14.54,-4.67],"5-10-18":[-19.3,-4.67],"6-21-38":[-12.06,-4.21],"6-21-39":[-13.18,-4.21],"5-10-19":[-17.89,-4.21],"6-21-40":[-15.05,-5.08],"6-21-41":[-19.58,-6.52],"5-10-20":[-21.61,-5.08],"6-21-42":[-21.17,-9.26],"6-21-43":[-22.89,-10.44],"5-10-21":[-23.83,-9.26],"6-21-44":[-24.5,-11.31],"6-21-45":[-26.05,-12.01],"5-10-22":[-26.05,-11.26],"6-21-46":[-26.03,-11.96],"6-21-47":[-24,-10.76],"5-10-23":[-26.03,-10.76],"6-21-48":[-22.24,-10.03],"6-21-49":[-21.6,-9.78],"5-10-24":[-23.65,-9.78],"6-21-50":[-23.2,-10.14],"6-21-51":[-31.43,-11.33],"5-10-25":[-35.46,-10.14],"6-21-52":[-42.02,-14.72],"6-21-53":[-56.28,-21.16],"5-10-26":[-59.19,-14.72],"6-21-54":[-63.59,-26.87],"6-21-55":[-71.43,-31.11],"5-10-27":[-73.37,-26.87],"6-21-56":[-74.31,-34.39],"6-21-57":[-79.17,-34.74],"5-10-28":[-84.12,-34.39],"6-21-58":[-75.47,1699.95],"6-21-59":[1495.5,2538.05],"5-10-29":[-79.02,2538.05],"6-21-60":[1062.99,1626.41],"6-21-61":[869.71,1241.73],"5-10-30":[812.01,1626.41],"6-21-62":[1025.91,2638.67],"6-21-63":[-29.63,2874.63],"5-10-31":[-29.63,2878.57],"6-22-0":[12.8,29.12],"6-22-1":[11.43,30.77],"6-22-2":[2.33,22.89],"6-22-3":[-2.3,5.53],"6-22-4":[-15.36,459.75],"6-22-5":[-28.86,707.55],"6-22-6":[-33.69,562.23],"6-22-7":[-36.83,561.11],"6-22-8":[106.74,731.19],"6-22-9":[124.49,633.28],"6-22-10":[-20.19,980.63],"6-22-11":[221.72,953.84],"6-22-12":[291.67,1945.45],"6-22-13":[407.7,3751.07],"6-22-14":[373.13,3467.23],"6-22-15":[143.66,2981.68],"6-22-16":[498.91,2953.81],"6-22-17":[1005.33,3455.03],"6-22-18":[-109.13,3616.13],"6-22-19":[-115.5,3677.07],"6-22-20":[-106.82,3055.54],"6-22-21":[-87.07,2579.5],"6-22-22":[-90.86,227.36],"6-22-23":[-93.31,-36.74],"6-22-24":[-93.47,-43.31],"6-22-25":[-92.56,-42.61],"6-22-26":[-90.46,-41.08],"6-22-27":[-87.11,-38.63],"6-22-28":[-81.94,-34.92],"6-22-29":[-71.11,-31.11],"6-22-30":[-63.37,-27.03],"6-22-31":[-54.82,-23.61],"6-22-32":[-48,-19.66],"6-22-33":[-38.67,-15.78],"6-22-34":[-32.33,-12.28],"6-22-35":[-25.13,-8],"6-22-36":[-18.53,-4.62],"6-22-37":[-11.89,-3.04],"6-22-38":[-9.24,-2.78],"6-22-39":[-10.03,-2.97],"6-22-40":[-12.55,-3.88],"6-22-41":[-18.46,-5.52],"6-22-42":[-20.42,-8.14],"6-22-43":[-22.66,-9.88],"6-22-44":[-24.44,-11.12],"6-22-45":[-25.51,-11.47],"6-22-46":[-25.48,-11.33],"6-22-47":[-23.5,-10.26],"6-22-48":[-21.38,-9.66],"6-22-49":[-20.27,-9.52],"6-22-50":[-22.59,-10.1],"6-22-51":[-29.7,-11.32],"6-22-52":[-41.54,-14.53],"6-22-53":[-53.67,-21.14],"6-22-54":[-61.27,-25.86],"6-22-55":[-68.78,-29.95],"6-22-56":[-72.33,-32.84],"6-22-57":[-76.5,-32.9],"6-22-58":[-76.53,3383.56],"6-22-59":[1286.48,3626.49],"6-22-60":[1241.72,1694.94],"6-22-61":[987.52,1432.98],"6-22-62":[1168.67,2576.08],"6-22-63":[-29.54,2863.29],"6-23-0":[12.92,29.14],"6-23-1":[11.53,30.89],"5-11-0":[11.43,30.89],"6-23-2":[2.57,24.53],"6-23-3":[-2.86,9.47],"5-11-1":[-2.86,24.53],"4-5-0":[-7.48,30.89],"6-23-4":[-17.92,409.2],"6-23-5":[-35.37,754.53],"5-11-2":[-35.37,754.53],"6-23-6":[-35.77,628.59],"6-23-7":[-51.79,437.77],"5-11-3":[-51.79,628.59],"4-5-1":[-51.79,842.66],"3-2-0":[-51.79,842.66],"6-23-8":[212,620.34],"6-23-9":[126.79,595],"5-11-4":[106.74,731.19],"6-23-10":[-25.96,952.89],"6-23-11":[181.68,969.04],"5-11-5":[-25.96,980.63],"4-5-2":[-25.96,2410.7],"6-23-12":[362.56,1217.71],"6-23-13":[599.34,3152.73],"5-11-6":[291.67,3751.07],"6-23-14":[584.02,3396.83],"6-23-15":[496.5,3385.15],"5-11-7":[143.66,3467.23],"4-5-3":[-26.42,4373.52],"3-2-1":[-259.61,4373.52],"6-23-16":[739.26,3846.98],"6-23-17":[1261.06,3659.45],"5-11-8":[498.91,3846.98],"6-23-18":[342.66,3960.27],"6-23-19":[53.25,2781.72],"5-11-9":[-115.5,3960.27],"4-5-4":[-115.5,4387.58],"6-23-20":[-43.42,2074.25],"6-23-21":[-53.91,2324.4],"5-11-10":[-106.82,3055.54],"6-23-22":[-86.07,1902.28],"6-23-23":[-86.2,-37.16],"5-11-11":[-93.31,1902.28],"4-5-5":[-106.82,3055.54],"3-2-2":[-115.5,4387.58],"6-23-24":[-86.54,-38.53],"6-23-25":[-85.65,238.06],"5-11-12":[-93.47,238.06],"6-23-26":[-84.32,-36.65],"6-23-27":[-80.64,-34.81],"5-11-13":[-90.46,-34.81],"4-5-6":[-95.41,238.06],"6-23-28":[-76.59,-32.08],"6-23-29":[-68.37,-29.04],"5-11-14":[-81.94,-29.04],"6-23-30":[-61.8,-25.29],"6-23-31":[-52.78,-21.98],"5-11-15":[-63.37,-21.98],"4-5-7":[-82.67,-20.85],"3-2-3":[-95.41,238.06],"6-23-32":[-46.8,-18.42],"6-23-33":[-38.04,-15],"5-11-16":[-48,-15],"6-23-34":[-31.41,-10.65],"6-23-35":[-23.03,-6.84],"5-11-17":[-32.33,-6.84],"4-5-8":[-48,-6.84],"6-23-36":[-15.57,-3.94],"6-23-37":[-8.42,-2.35],"5-11-18":[-18.53,-2.35],"6-23-38":[-5.83,-1.99],"6-23-39":[-7.6,-2.19],"5-11-19":[-10.03,-1.99],"4-5-9":[-19.3,-1.99],"3-2-4":[-48,-1.99],"6-23-40":[-10.38,-3.43],"6-23-41":[-16.03,-5],"5-11-20":[-18.46,-3.43],"6-23-42":[-19.19,-6.88],"6-23-43":[-22.06,-9.07],"5-11-21":[-22.66,-6.88],"4-5-10":[-23.83,-3.43],"6-23-44":[-22.86,-10.1],"6-23-45":[-23.63,-10.53],"5-11-22":[-25.51,-10.1],"6-23-46":[-23.44,-10.4],"6-23-47":[-22.17,-9.8],"5-11-23":[-25.48,-9.8],"4-5-11":[-26.05,-9.8],"3-2-5":[-30.38,395.5],"6-23-48":[-20.39,-9.35],"6-23-49":[-21.17,-9.35],"5-11-24":[-21.38,-9.35],"6-23-50":[-23.21,-10.18],"6-23-51":[-30.13,-11.53],"5-11-25":[-30.13,-10.1],"4-5-12":[-35.46,-9.35],"6-23-52":[-43.45,-14.72],"6-23-53":[-51.53,-21.48],"5-11-26":[-53.67,-14.53],"6-23-54":[-58.95,-25.37],"6-23-55":[-65.3,-28.82],"5-11-27":[-68.78,-25.37],"4-5-13":[-73.37,-14.53],"3-2-6":[-88.41,-9.35],"6-23-56":[-69.37,-31.18],"6-23-57":[-72.56,-32.31],"5-11-28":[-76.5,-31.18],"6-23-58":[-73.42,2010.01],"6-23-59":[1105.43,2194.6],"5-11-29":[-76.53,3626.49],"4-5-14":[-84.12,3626.49],"6-23-60":[1418.33,1763.02],"6-23-61":[1252.11,1638.58],"5-11-30":[987.52,1763.02],"6-23-62":[1432.97,2755.16],"6-23-63":[-29.54,2834.96],"5-11-31":[-29.54,2863.29],"4-5-15":[-29.63,2878.57],"3-2-7":[-102.31,3682.63],"6-24-0":[13.08,29.1],"6-24-1":[12.77,30.89],"6-24-2":[3.36,25.8],"6-24-3":[-3.5,11.12],"6-24-4":[-19.26,404.18],"6-24-5":[-38.9,404.18],"6-24-6":[-40.02,637.43],"6-24-7":[-57.55,369.52],"6-24-8":[70.59,618.66],"6-24-9":[123.35,643.83],"6-24-10":[-27.38,442.7],"6-24-11":[174.59,841.05],"6-24-12":[373.57,849.8],"6-24-13":[495.56,1071.09],"6-24-14":[572.57,2114.96],"6-24-15":[720.4,3889.28],"6-24-16":[1325.33,4191.26],"6-24-17":[1258.65,4109.88],"6-24-18":[857.52,3690.6],"6-24-19":[364.31,3824.21],"6-24-20":[-26.57,3235.29],"6-24-21":[-39.57,2589.58],"6-24-22":[-71.54,1702.94],"6-24-23":[-79.57,2045.21],"6-24-24":[-78.3,-33.29],"6-24-25":[-77.08,268.06],"6-24-26":[-75.28,-31.52],"6-24-27":[-72.83,-29.62],"6-24-28":[-69.63,-28.02],"6-24-29":[-63.34,-25.65],"6-24-30":[-58.09,-23.11],"6-24-31":[-49.64,-20.2],"6-24-32":[-43.76,-17.27],"6-24-33":[-35.9,-13.42],"6-24-34":[-29.87,-9.91],"6-24-35":[-20.23,-6.43],"6-24-36":[-13.61,-3.86],"6-24-37":[-7.43,-2.32],"6-24-38":[-4.95,-1.94],"6-24-39":[-7.06,-2.13],"6-24-40":[-9.67,-3.32],"6-24-41":[-13.81,-4.7],"6-24-42":[-17.75,-6.09],"6-24-43":[-20.18,-8.32],"6-24-44":[-21.4,-9.34],"6-24-45":[-21.96,-9.83],"6-24-46":[-21.96,-10],"6-24-47":[-20.69,-9.66],"6-24-48":[-19.53,-9.43],"6-24-49":[-21.86,-9.46],"6-24-50":[-23.63,-10.52],"6-24-51":[-30.13,-11.8],"6-24-52":[-42.54,-14.64],"6-24-53":[-50.73,-20.34],"6-24-54":[-56.68,-24.59],"6-24-55":[-62.37,-27.15],"6-24-56":[-67.75,-29.51],"6-24-57":[-69.33,-30.92],"6-24-58":[-67.75,2438.84],"6-24-59":[821.95,3441.15],"6-24-60":[1593.3,1871.81],"6-24-61":[1391.7,1816.7],"6-24-62":[1638.57,2575.14],"6-24-63":[-29.54,2813.19],"6-25-0":[13.28,29.06],"6-25-1":[12.99,30.67],"5-12-0":[12.77,30.89],"6-25-2":[4.33,27.3],"6-25-3":[-3.6,11.88],"5-12-1":[-3.6,27.3],"6-25-4":[-18.48,293.97],"6-25-5":[-39.75,334.46],"5-12-2":[-39.75,404.18],"6-25-6":[-44.82,387.52],"6-25-7":[-63.28,308.5],"5-12-3":[-63.28,637.43],"6-25-8":[-63.06,598.61],"6-25-9":[119.88,600.19],"5-12-4":[-63.06,643.83],"6-25-10":[-28.15,610.76],"6-25-11":[175.34,613.75],"5-12-5":[-28.15,841.05],"6-25-12":[357,741.32],"6-25-13":[154.24,852.58],"5-12-6":[154.24,1071.09],"6-25-14":[529.75,2093.28],"6-25-15":[667.15,3842.68],"5-12-7":[529.75,3889.28],"6-25-16":[1046.96,4204.45],"6-25-17":[1396.76,3751.43],"5-12-8":[1046.96,4204.45],"6-25-18":[1174.25,4348.39],"6-25-19":[1345.74,3458.34],"5-12-9":[364.31,4348.39],"6-25-20":[852.06,3295.69],"6-25-21":[84.61,3091.23],"5-12-10":[-39.57,3295.69],"6-25-22":[-38.22,3268.31],"6-25-23":[-66.41,2081.23],"5-12-11":[-79.57,3268.31],"6-25-24":[-67.95,-28.52],"6-25-25":[-66.59,-26.44],"5-12-12":[-78.3,268.06],"6-25-26":[-65.05,-25.22],"6-25-27":[-63.06,-24.16],"5-12-13":[-75.28,-24.16],"6-25-28":[-59.26,-15.52],"6-25-29":[-54.35,-22.31],"5-12-14":[-69.63,-15.52],"6-25-30":[-50.44,-20.5],"6-25-31":[-45,-18.74],"5-12-15":[-58.09,-18.74],"6-25-32":[-39.97,-16.22],"6-25-33":[-33.52,-12.95],"5-12-16":[-43.76,-12.95],"6-25-34":[-26.73,-9.78],"6-25-35":[-19.19,-6.51],"5-12-17":[-29.87,-6.43],"6-25-36":[-14.52,-4.01],"6-25-37":[-8.87,-2.5],"5-12-18":[-14.52,-2.32],"6-25-38":[-6.34,-2.18],"6-25-39":[-6.84,-2.3],"5-12-19":[-7.06,-1.94],"6-25-40":[-9.41,-3.32],"6-25-41":[-32.1,501.96],"5-12-20":[-32.1,501.96],"6-25-42":[-16.08,-5.36],"6-25-43":[-18.48,-7.5],"5-12-21":[-20.18,-5.36],"6-25-44":[-19.58,-8.5],"6-25-45":[-20.51,-9.34],"5-12-22":[-21.96,-8.5],"6-25-46":[-20.66,-9.34],"6-25-47":[-19.83,-8.98],"5-12-23":[-21.96,-8.98],"6-25-48":[-19.6,-9.09],"6-25-49":[-22.09,-9.67],"5-12-24":[-22.09,-9.09],"6-25-50":[-24.31,-10.8],"6-25-51":[-29.53,-11.99],"5-12-25":[-30.13,-10.52],"6-25-52":[-38.65,-14.61],"6-25-53":[-48.88,-19.4],"5-12-26":[-50.73,-14.61],"6-25-54":[-53.27,-23.18],"6-25-55":[-58.77,-25.88],"5-12-27":[-62.37,-23.18],"6-25-56":[-65.35,-28.74],"6-25-57":[-65.63,-29.51],"5-12-28":[-69.33,-28.74],"6-25-58":[-63.65,821.96],"6-25-59":[726.87,1676.69],"5-12-29":[-67.75,3441.15],"6-25-60":[1630.88,1996.28],"6-25-61":[1569.89,1996.28],"5-12-30":[1391.7,1996.28],"6-25-62":[1816.69,2606.34],"6-25-63":[-29.54,2795.26],"5-12-31":[-29.54,2813.19],"6-26-0":[13.54,29.14],"6-26-1":[13.94,30.48],"6-26-2":[5.28,27.87],"6-26-3":[-3.32,281.71],"6-26-4":[-18.48,308.77],"6-26-5":[-40.42,381.74],"6-26-6":[-46.86,317.75],"6-26-7":[-64.69,215.89],"6-26-8":[-2.27,571.32],"6-26-9":[116.78,565.77],"6-26-10":[-32.41,599.94],"6-26-11":[208.28,611.84],"6-26-12":[299.93,731.39],"6-26-13":[318.89,749.4],"6-26-14":[470.62,993.24],"6-26-15":[555.47,1446.2],"6-26-16":[932.52,3114.6],"6-26-17":[1209.86,4338.56],"6-26-18":[1296.53,4383.25],"6-26-19":[1070.65,3998.98],"6-26-20":[855.68,3617.02],"6-26-21":[658.3,2970.04],"6-26-22":[417.64,3258.01],"6-26-23":[-28.6,3307.88],"6-26-24":[-62.73,2734.41],"6-26-25":[-59.49,2861.69],"6-26-26":[-52.9,-18.54],"6-26-27":[-50.46,-18.19],"6-26-28":[-48.34,-18.13],"6-26-29":[-46.35,-18.06],"6-26-30":[-44.41,-17.73],"6-26-31":[-40.44,-17.02],"6-26-32":[-37.32,-15.49],"6-26-33":[-31.86,-12.9],"6-26-34":[-26.47,-10],"6-26-35":[-21.25,-7.31],"6-26-36":[-17.78,-4.66],"6-26-37":[-11.76,-3.18],"6-26-38":[-7.87,-2.8],"6-26-39":[-6.79,-2.9],"6-26-40":[-7.79,-2.88],"6-26-41":[-10.71,8.49],"6-26-42":[-14.63,-4.56],"6-26-43":[-16.88,-6.59],"6-26-44":[-18.57,-7.39],"6-26-45":[-19.41,-7.99],"6-26-46":[-19.51,-8.34],"6-26-47":[-18.58,-8.35],"6-26-48":[-19.11,-8.37],"6-26-49":[-22.08,-9.26],"6-26-50":[-24.14,-10.47],"6-26-51":[-29.38,-11.82],"6-26-52":[-38.33,-14.03],"6-26-53":[-46.19,-17.49],"6-26-54":[-51.2,-21.67],"6-26-55":[-57.5,-24.38],"6-26-56":[-63.64,-27.72],"6-26-57":[-62.82,189.45],"6-26-58":[-60.91,881.64],"6-26-59":[740.64,1748.55],"6-26-60":[1676.68,2076.65],"6-26-61":[1756.34,2181.07],"6-26-62":[1948.76,2606.49],"6-26-63":[-29.54,2777.84],"6-27-0":[13.6,29.49],"6-27-1":[13.94,31.09],"5-13-0":[13.54,31.09],"6-27-2":[6.45,27.9],"6-27-3":[-0.42,320.5],"5-13-1":[-3.32,320.5],"4-6-0":[-3.6,320.5],"6-27-4":[-16.49,372.69],"6-27-5":[-40.21,294.13],"5-13-2":[-40.42,381.74],"6-27-6":[-53.85,132.2],"6-27-7":[-71.25,117.7],"5-13-3":[-71.25,317.75],"4-6-1":[-71.25,637.43],"6-27-8":[-10.85,325.53],"6-27-9":[25.92,428.65],"5-13-4":[-10.85,571.32],"6-27-10":[-36.63,567.14],"6-27-11":[275.4,510.84],"5-13-5":[-36.63,611.84],"4-6-2":[-63.06,841.05],"6-27-12":[177.93,779.83],"6-27-13":[230.46,797.9],"5-13-6":[177.93,797.9],"6-27-14":[353.23,843.62],"6-27-15":[486.44,1208.11],"5-13-7":[353.23,1446.2],"4-6-3":[154.24,3889.28],"6-27-16":[469.53,2194.75],"6-27-17":[827.22,1798.51],"5-13-8":[469.53,4338.56],"6-27-18":[821.28,2635.83],"6-27-19":[656.62,2159.53],"5-13-9":[656.62,4383.25],"4-6-4":[364.31,4383.25],"6-27-20":[633.52,1925.95],"6-27-21":[300.28,2697.84],"5-13-10":[300.28,3617.02],"6-27-22":[335.31,2999.92],"6-27-23":[921.89,3424.3],"5-13-11":[-28.6,3424.3],"4-6-5":[-79.57,3617.02],"6-27-24":[401.21,3479.94],"6-27-25":[-46.8,4234.29],"5-13-12":[-62.73,4234.29],"6-27-26":[-39.05,-13],"6-27-27":[-35.28,-12.54],"5-13-13":[-52.9,-12.54],"4-6-6":[-78.3,4234.29],"6-27-28":[-35.2,-12.85],"6-27-29":[-35.34,-13.41],"5-13-14":[-48.34,-12.85],"6-27-30":[-35.17,-14.09],"6-27-31":[-34.89,-14.93],"5-13-15":[-44.41,-14.09],"4-6-7":[-69.63,-12.85],"6-27-32":[-33.67,-14.66],"6-27-33":[-30.24,-13.29],"5-13-16":[-37.32,-12.9],"6-27-34":[-28.13,-11.02],"6-27-35":[-24.66,-9.21],"5-13-17":[-28.13,-7.31],"4-6-8":[-43.76,-6.43],"6-27-36":[-20.45,-6.32],"6-27-37":[-14.71,-4.11],"5-13-18":[-20.45,-3.18],"6-27-38":[-10.7,-3.46],"6-27-39":[-7.82,-2.95],"5-13-19":[-10.7,-2.8],"4-6-9":[-20.45,-1.94],"6-27-40":[-6.36,-2.12],"6-27-41":[-8.91,-2.07],"5-13-20":[-10.71,8.49],"6-27-42":[-12.62,-3.64],"6-27-43":[-14.88,-5.64],"5-13-21":[-16.88,-3.64],"4-6-10":[-32.1,501.96],"6-27-44":[-15.67,-6.12],"6-27-45":[-17.16,-6.68],"5-13-22":[-19.41,-6.12],"6-27-46":[-17.14,-7.46],"6-27-47":[-16.64,-6.9],"5-13-23":[-19.51,-6.9],"4-6-11":[-21.96,-6.12],"6-27-48":[-18.13,-7.16],"6-27-49":[-20.76,-8.23],"5-13-24":[-22.08,-7.16],"6-27-50":[-23.03,-9.75],"6-27-51":[-27.57,-10.56],"5-13-25":[-29.38,-9.75],"4-6-12":[-30.13,-7.16],"6-27-52":[-33.04,-12.47],"6-27-53":[-43.05,-16],"5-13-26":[-46.19,-12.47],"6-27-54":[-47.85,-20.49],"6-27-55":[-55.33,-23.04],"5-13-27":[-57.5,-20.49],"4-6-13":[-62.37,-12.47],"6-27-56":[-59.57,-26.31],"6-27-57":[-57.3,647.09],"5-13-28":[-63.64,647.09],"6-27-58":[-55.25,899.06],"6-27-59":[799.61,1803.34],"5-13-29":[-60.91,1803.34],"4-6-14":[-69.33,3441.15],"6-27-60":[1748.54,2159.56],"6-27-61":[1868.06,2197.16],"5-13-30":[1676.68,2197.16],"6-27-62":[2095.95,2581.41],"6-27-63":[-29.54,2769.5],"5-13-31":[-29.54,2777.84],"4-6-15":[-29.54,2813.19],"6-28-0":[13.6,29.98],"6-28-1":[13.97,31.76],"6-28-2":[7.61,27.9],"6-28-3":[-0.98,311.23],"6-28-4":[-14.04,373.55],"6-28-5":[-35.5,302.69],"6-28-6":[-52.23,269.04],"6-28-7":[-71.46,37.53],"6-28-8":[-13.78,273.39],"6-28-9":[-36.74,404.25],"6-28-10":[-38.45,438.24],"6-28-11":[60.84,436.49],"6-28-12":[151.71,375.47],"6-28-13":[182.44,807.5],"6-28-14":[219.33,785.89],"6-28-15":[355.34,755.87],"6-28-16":[348.26,1090.39],"6-28-17":[415.18,1115.44],"6-28-18":[336.8,1003.31],"6-28-19":[247.09,1013.68],"6-28-20":[245.51,909.81],"6-28-21":[22.35,784.58],"6-28-22":[2.36,3697.19],"6-28-23":[-6.03,3685.36],"6-28-24":[-7.33,3903.97],"6-28-25":[-32.6,5379.65],"6-28-26":[-33.85,1685.03],"6-28-27":[-25.73,-8.02],"6-28-28":[-27.14,-9.26],"6-28-29":[-28.13,-9.53],"6-28-30":[-29.73,-10.39],"6-28-31":[-30.49,-11.78],"6-28-32":[-30.3,-13.08],"6-28-33":[-29.11,-13.91],"6-28-34":[-28.13,-12.68],"6-28-35":[-25.46,-10.25],"6-28-36":[-21.32,-7.52],"6-28-37":[-14.78,-5.33],"6-28-38":[-12.03,-4.05],"6-28-39":[-8.07,-2.41],"6-28-40":[-6.04,-1.06],"6-28-41":[-7.12,-1.06],"6-28-42":[-10.83,-2.79],"6-28-43":[-12.78,-4.7],"6-28-44":[-13.74,-5.3],"6-28-45":[-14.99,-5.28],"6-28-46":[-15.4,-5.56],"6-28-47":[-15.79,-5.29],"6-28-48":[-15.93,-5.65],"6-28-49":[-19.25,-6.88],"6-28-50":[-20.66,-7.71],"6-28-51":[-24.63,-9.26],"6-28-52":[-31.19,-11.53],"6-28-53":[-40.85,-14.84],"6-28-54":[-45.75,-18.97],"6-28-55":[-52.39,-21.7],"6-28-56":[-55.08,-24.38],"6-28-57":[-50.79,721.39],"6-28-58":[-51.45,799.62],"6-28-59":[687.23,1812.13],"6-28-60":[1803.33,2299.62],"6-28-61":[1923.59,2175.98],"6-28-62":[1878.69,2429.87],"6-28-63":[-29.54,2761.57],"6-29-0":[13.6,30.78],"6-29-1":[13.97,32.5],"5-14-0":[13.6,32.5],"6-29-2":[8.58,28.94],"6-29-3":[-0.22,604.78],"5-14-1":[-0.98,604.78],"6-29-4":[-10.79,424.86],"6-29-5":[-29.34,367.02],"5-14-2":[-35.5,424.86],"6-29-6":[-48.96,423.04],"6-29-7":[-71.03,188.06],"5-14-3":[-71.46,423.04],"6-29-8":[-71.03,258.97],"6-29-9":[-40.7,265.48],"5-14-4":[-71.03,404.25],"6-29-10":[-45.67,362.54],"6-29-11":[35.43,333.9],"5-14-5":[-45.67,438.24],"6-29-12":[69.29,353.36],"6-29-13":[176.64,297.08],"5-14-6":[69.29,807.5],"6-29-14":[185.4,507.51],"6-29-15":[216.94,624.77],"5-14-7":[185.4,785.89],"6-29-16":[248.19,602.11],"6-29-17":[227.87,668.28],"5-14-8":[227.87,1115.44],"6-29-18":[151.81,558.27],"6-29-19":[87.66,500.16],"5-14-9":[87.66,1013.68],"6-29-20":[11.41,489.46],"6-29-21":[-74.48,534.68],"5-14-10":[-74.48,909.81],"6-29-22":[-59.51,197.1],"6-29-23":[-60.32,1437.08],"5-14-11":[-60.32,3697.19],"6-29-24":[-52.89,3376.08],"6-29-25":[-16.39,5601.19],"5-14-12":[-52.89,5601.19],"6-29-26":[-23.21,3710.87],"6-29-27":[-17.72,-5.43],"5-14-13":[-33.85,3710.87],"6-29-28":[-18.29,-5.37],"6-29-29":[-20.02,-5.8],"5-14-14":[-28.13,-5.37],"6-29-30":[-22.85,-7.34],"6-29-31":[-25.68,-8.54],"5-14-15":[-30.49,-7.34],"6-29-32":[-27.33,-11.17],"6-29-33":[-28.21,-12.92],"5-14-16":[-30.3,-11.17],"6-29-34":[-27.93,-12.74],"6-29-35":[-25.57,-10.37],"5-14-17":[-28.13,-10.25],"6-29-36":[-21.38,-7.55],"6-29-37":[-14.75,-5.87],"5-14-18":[-21.38,-5.33],"6-29-38":[-12.1,-3.7],"6-29-39":[-7.93,-1.6],"5-14-19":[-12.1,-1.6],"6-29-40":[-4.73,-0.26],"6-29-41":[-5.16,-0.14],"5-14-20":[-7.12,-0.14],"6-29-42":[-8.49,-1.41],"6-29-43":[-11.27,-3.5],"5-14-21":[-12.78,-1.41],"6-29-44":[-11.15,-3.82],"6-29-45":[-11.69,-3.55],"5-14-22":[-14.99,-3.55],"6-29-46":[-12.81,-3.56],"6-29-47":[-11.24,-3.95],"5-14-23":[-15.79,-3.56],"6-29-48":[-12.87,-3.81],"6-29-49":[-15.22,-6.07],"5-14-24":[-19.25,-3.81],"6-29-50":[-18.28,-7.31],"6-29-51":[-22.81,-8.44],"5-14-25":[-24.63,-7.31],"6-29-52":[-28.28,-10.9],"6-29-53":[-37.41,-12.86],"5-14-26":[-40.85,-10.9],"6-29-54":[-42.1,-16.84],"6-29-55":[-48.36,-19.69],"5-14-27":[-52.39,-16.84],"6-29-56":[-54.2,-22.1],"6-29-57":[-47.44,695.16],"5-14-28":[-55.08,721.39],"6-29-58":[-44.62,1067.53],"6-29-59":[697.67,1825.18],"5-14-29":[-51.45,1825.18],"6-29-60":[1812.12,2484.31],"6-29-61":[1887.54,2200.25],"5-14-30":[1803.33,2484.31],"6-29-62":[1867.75,2364.99],"6-29-63":[-29.54,2744.46],"5-14-31":[-29.54,2761.57],"6-30-0":[13.6,31.47],"6-30-1":[14.83,32.77],"6-30-2":[9.25,30.01],"6-30-3":[1.4,1609.72],"6-30-4":[-8.83,717.95],"6-30-5":[-23.57,477.26],"6-30-6":[-38.7,559.29],"6-30-7":[-70.31,433.78],"6-30-8":[-70.31,458.53],"6-30-9":[-96.36,174.74],"6-30-10":[-99.28,106.11],"6-30-11":[-98.53,228.76],"6-30-12":[-14.62,294.27],"6-30-13":[195.65,456.57],"6-30-14":[57.99,564.92],"6-30-15":[181.53,584.49],"6-30-16":[173.46,471.28],"6-30-17":[26.59,446.09],"6-30-18":[123.08,490.81],"6-30-19":[2.26,806.41],"6-30-20":[-9.4,204.36],"6-30-21":[-55.44,125.4],"6-30-22":[-65.74,-25.61],"6-30-23":[-65.69,-25.42],"6-30-24":[-54.87,-14.04],"6-30-25":[-36.51,2490.71],"6-30-26":[-21.02,2540.82],"6-30-27":[-19.24,-2.77],"6-30-28":[-11.27,-1.84],"6-30-29":[-14.57,-2.28],"6-30-30":[-17.25,-4.28],"6-30-31":[-22.13,-5.31],"6-30-32":[-25.32,-8.63],"6-30-33":[-27.51,-11.24],"6-30-34":[-27.51,-12.14],"6-30-35":[-24.98,-9.83],"6-30-36":[-20.94,-7.4],"6-30-37":[-14.81,-5.53],"6-30-38":[-11.87,-2.8],"6-30-39":[-6.86,-0.38],"6-30-40":[-3,1.26],"6-30-41":[-2.62,1.53],"6-30-42":[-6.47,0.16],"6-30-43":[-9.48,-1.41],"6-30-44":[-9.48,-2.83],"6-30-45":[-7.66,-2.16],"6-30-46":[-9.07,-1.93],"6-30-47":[-9.84,-2.8],"6-30-48":[-11.72,-2.88],"6-30-49":[-14.44,-4.07],"6-30-50":[-16.72,-6.13],"6-30-51":[-22.37,-7.94],"6-30-52":[-24.41,-9.85],"6-30-53":[-33.43,-11.71],"6-30-54":[-38.58,-14.81],"6-30-55":[-43.96,-16.85],"6-30-56":[-52.81,-19.97],"6-30-57":[-46.56,310.04],"6-30-58":[-43.55,1562.01],"6-30-59":[790.59,1824.22],"6-30-60":[1816.77,2275.03],"6-30-61":[1789.45,2180.52],"6-30-62":[1867.26,2328.81],"6-30-63":[-29.54,2744.46],"6-31-0":[13.6,32.23],"6-31-1":[15.06,32.84],"5-15-0":[13.6,32.84],"6-31-2":[10.78,881.84],"6-31-3":[4.92,2250.64],"5-15-1":[1.4,2250.64],"4-7-0":[-0.98,2250.64],"6-31-4":[-5.46,1374.08],"6-31-5":[-22.85,583.45],"5-15-2":[-23.57,1374.08],"6-31-6":[-45.86,413.34],"6-31-7":[-57.79,429.71],"5-15-3":[-70.31,559.29],"4-7-1":[-71.46,1374.08],"3-3-0":[-71.46,2250.64],"6-31-8":[-36.15,577.62],"6-31-9":[-96.7,282.12],"5-15-4":[-96.7,577.62],"6-31-10":[-99.12,-46.98],"6-31-11":[-98.49,190.58],"5-15-5":[-99.28,228.76],"4-7-2":[-99.28,577.62],"6-31-12":[-15.94,324],"6-31-13":[204.84,447.15],"5-15-6":[-15.94,456.57],"6-31-14":[150.72,671.12],"6-31-15":[147.71,604.9],"5-15-7":[57.99,671.12],"4-7-3":[-15.94,807.5],"3-3-1":[-99.28,3889.28],"2-1-0":[-259.61,4373.52],"6-31-16":[142.69,422.75],"6-31-17":[82.02,300.32],"5-15-8":[26.59,471.28],"6-31-18":[37.49,509.53],"6-31-19":[3.75,590.45],"5-15-9":[2.26,806.41],"4-7-4":[2.26,1115.44],"6-31-20":[-28.13,146.09],"6-31-21":[-51.46,78.7],"5-15-10":[-55.44,204.36],"6-31-22":[-60.53,-24.95],"6-31-23":[-60.55,-17],"5-15-11":[-65.74,-17],"4-7-5":[-74.48,3697.19],"3-3-2":[-79.57,4383.25],"6-31-24":[-51.3,129.8],"6-31-25":[-28.09,2495.76],"5-15-12":[-54.87,2495.76],"6-31-26":[-31.81,4217.93],"6-31-27":[-39.22,1667.28],"5-15-13":[-39.22,4217.93],"4-7-6":[-54.87,5601.19],"6-31-28":[-3.69,3.56],"6-31-29":[-7.94,1.79],"5-15-14":[-14.57,3.56],"6-31-30":[-10.64,-0.95],"6-31-31":[-23.38,1700.45],"5-15-15":[-23.38,1700.45],"4-7-7":[-30.49,1700.45],"3-3-3":[-78.3,5601.19],"2-1-1":[-115.5,5601.19],"1-0-0":[-317.19,6207.28],"6-31-32":[-321.59,1684.42],"6-31-33":[-25.17,-8.12],"5-15-16":[-321.59,1684.42],"6-31-34":[-25.23,-10.22],"6-31-35":[-23.47,-8.63],"5-15-17":[-27.51,-8.63],"4-7-8":[-321.59,1684.42],"6-31-36":[-19.5,-5.98],"6-31-37":[-14.17,-4.58],"5-15-18":[-20.94,-4.58],"6-31-38":[-10.89,-1.76],"6-31-39":[-4.99,1.04],"5-15-19":[-11.87,1.04],"4-7-9":[-21.38,1.04],"3-3-4":[-321.59,1684.42],"6-31-40":[-0.46,3.59],"6-31-41":[0.15,3.57],"5-15-20":[-3,3.59],"6-31-42":[-1.87,3.33],"6-31-43":[-5.77,-0.19],"5-15-21":[-9.48,3.33],"4-7-10":[-12.78,3.59],"6-31-44":[-6.17,-2.1],"6-31-45":[-5.45,-1.19],"5-15-22":[-9.48,-1.19],"6-31-46":[-4.53,-0.73],"6-31-47":[-5.48,-0.93],"5-15-23":[-9.84,-0.73],"4-7-11":[-15.79,-0.73],"3-3-5":[-32.1,501.96],"2-1-2":[-321.59,1684.42],"6-31-48":[-7.3,-1.03],"6-31-49":[-11.96,-1.38],"5-15-24":[-14.44,-1.03],"6-31-50":[-15.08,-4.16],"6-31-51":[-19.15,-5.73],"5-15-25":[-22.37,-4.16],"4-7-12":[-24.63,-1.03],"6-31-52":[-21.76,-8.28],"6-31-53":[-29.28,-9.98],"5-15-26":[-33.43,-8.28],"6-31-54":[-34.04,-12.93],"6-31-55":[-39.77,-14.37],"5-15-27":[-43.96,-12.93],"4-7-13":[-52.39,-8.28],"3-3-6":[-62.37,-1.03],"6-31-56":[-43.43,1365.62],"6-31-57":[-44.81,282.19],"5-15-28":[-52.81,1365.62],"6-31-58":[-39.76,1267.01],"6-31-59":[957.9,1887.87],"5-15-29":[-43.55,1887.87],"4-7-14":[-55.08,1887.87],"6-31-60":[1730.62,2175.26],"6-31-61":[1639.46,1987.13],"5-15-30":[1639.46,2275.03],"6-31-62":[1752.65,2714.87],"6-31-63":[-29.54,2744.46],"5-15-31":[-29.54,2744.46],"4-7-15":[-29.54,2761.57],"3-3-7":[-69.33,3441.15],"2-1-3":[-102.31,3682.63],"1-0-1":[-321.59,3970.41],"6-32-0":[13.6,32.71],"6-32-1":[15.63,32.84],"6-32-2":[12.53,1148.73],"6-32-3":[3.54,1723.08],"6-32-4":[-3.48,1337.96],"6-32-5":[-22.64,684.11],"6-32-6":[-45.53,367.14],"6-32-7":[-63.11,395.57],"6-32-8":[-72.93,546.23],"6-32-9":[-93.99,248.1],"6-32-10":[-96.39,-44.47],"6-32-11":[-97.86,87.35],"6-32-12":[-57.46,240.44],"6-32-13":[116.07,415.1],"6-32-14":[116.17,599.34],"6-32-15":[138.68,568.7],"6-32-16":[-2.59,551.43],"6-32-17":[75.12,291.63],"6-32-18":[-24.24,294.32],"6-32-19":[4.68,321.49],"6-32-20":[-31.39,211.56],"6-32-21":[-63.34,90.38],"6-32-22":[-63.11,-25.22],"6-32-23":[-57.23,-7.65],"6-32-24":[-31.37,200.24],"6-32-25":[-33.45,1010.31],"6-32-26":[-35.51,3009.32],"6-32-27":[-28.36,2376.93],"6-32-28":[-3.22,10.91],"6-32-29":[-1.77,10.51],"6-32-30":[-4.68,6.74],"6-32-31":[-7.35,73.07],"6-32-32":[-18.67,716.38],"6-32-33":[-20.88,-4.49],"6-32-34":[-21.38,-6.53],"6-32-35":[-20.18,-6.02],"6-32-36":[-17.05,-4.75],"6-32-37":[-11.75,-2.76],"6-32-38":[-9,-0.28],"6-32-39":[-2.87,3.56],"6-32-40":[0.59,5.45],"6-32-41":[1.56,6.31],"6-32-42":[-0.2,5.55],"6-32-43":[-3.93,1.13],"6-32-44":[-5.26,-0.57],"6-32-45":[-4.78,-0.14],"6-32-46":[-2.44,1.43],"6-32-47":[-2.43,2.72],"6-32-48":[-2.64,1.56],"6-32-49":[-7.99,-0.1],"6-32-50":[-11.84,-1.81],"6-32-51":[-16.4,-4.23],"6-32-52":[-18.97,-6.57],"6-32-53":[-25.69,-8.31],"6-32-54":[-28.75,-11.31],"6-32-55":[-35.05,-12.68],"6-32-56":[-41.26,-14.17],"6-32-57":[-36.6,248.01],"6-32-58":[-36.6,1290.61],"6-32-59":[1072.47,2685.38],"6-32-60":[1460.89,2381.84],"6-32-61":[1444.34,1985.53],"6-32-62":[1435.21,2244.93],"6-32-63":[-29.54,2744.46],"6-33-0":[13.6,33.18],"6-33-1":[15.63,33.39],"5-16-0":[13.6,33.39],"6-33-2":[13.83,1617.96],"6-33-3":[3.54,1701.03],"5-16-1":[3.54,1723.08],"6-33-4":[-1.3,1540.67],"6-33-5":[-21.29,1009.47],"5-16-2":[-22.64,1540.67],"6-33-6":[-36.75,819.86],"6-33-7":[-62.77,557.56],"5-16-3":[-63.11,819.86],"6-33-8":[-72.83,444.35],"6-33-9":[-88.51,366.68],"5-16-4":[-93.99,546.23],"6-33-10":[-95.62,-42.25],"6-33-11":[-97.09,-45.96],"5-16-5":[-97.86,87.35],"6-33-12":[-96.12,205.42],"6-33-13":[26.23,323.91],"5-16-6":[-96.12,415.1],"6-33-14":[40.15,604.67],"6-33-15":[99.8,613.05],"5-16-7":[40.15,613.05],"6-33-16":[103.99,486.54],"6-33-17":[42.02,356.67],"5-16-8":[-2.59,551.43],"6-33-18":[73.98,611.43],"6-33-19":[-2.39,1256.4],"5-16-9":[-24.24,1256.4],"6-33-20":[-18.21,703.65],"6-33-21":[-62.86,133.72],"5-16-10":[-63.34,703.65],"6-33-22":[-63.05,-24.55],"6-33-23":[-54.77,-15.6],"5-16-11":[-63.11,-7.65],"6-33-24":[-55.01,38.89],"6-33-25":[-31.18,-5.73],"5-16-12":[-55.01,1010.31],"6-33-26":[-16.7,2458.87],"6-33-27":[-29.38,2108.97],"5-16-13":[-35.51,3009.32],"6-33-28":[-12.99,2165.37],"6-33-29":[3.88,21.34],"5-16-14":[-12.99,2165.37],"6-33-30":[-9.95,580.04],"6-33-31":[-3.66,9.28],"5-16-15":[-9.95,580.04],"6-33-32":[-8.84,4.83],"6-33-33":[-12.48,2.13],"5-16-16":[-20.88,716.38],"6-33-34":[-13.36,-2.74],"6-33-35":[-13.27,-2.88],"5-16-17":[-21.38,-2.74],"6-33-36":[-11.47,-2.69],"6-33-37":[-8.95,-0.74],"5-16-18":[-17.05,-0.74],"6-33-38":[-5.14,2.74],"6-33-39":[-0.29,8.08],"5-16-19":[-9,8.08],"6-33-40":[1.94,9.43],"6-33-41":[2.8,10.75],"5-16-20":[0.59,10.75],"6-33-42":[0.89,8.51],"6-33-43":[-0.58,5.53],"5-16-21":[-3.93,8.51],"6-33-44":[-2.13,3.55],"6-33-45":[-1.46,3.29],"5-16-22":[-5.26,3.55],"6-33-46":[-0.15,6.87],"6-33-47":[1.07,7.73],"5-16-23":[-2.44,7.73],"6-33-48":[-0.11,7.04],"6-33-49":[-2.91,4.01],"5-16-24":[-7.99,7.04],"6-33-50":[-7.73,0.65],"6-33-51":[-12.58,-2.01],"5-16-25":[-16.4,0.65],"6-33-52":[-14.99,-3.66],"6-33-53":[-21.95,-5.75],"5-16-26":[-25.69,-3.66],"6-33-54":[-24.52,-9.25],"6-33-55":[-29.3,-10.49],"5-16-27":[-35.05,-9.25],"6-33-56":[-30.53,-11.38],"6-33-57":[-34.54,-11.65],"5-16-28":[-41.26,248.01],"6-33-58":[-34.69,1304.63],"6-33-59":[163.09,4721.94],"5-16-29":[-36.6,4721.94],"6-33-60":[441.12,2555.4],"6-33-61":[1232.67,1732.44],"5-16-30":[441.12,2555.4],"6-33-62":[1251.83,2245.57],"6-33-63":[-29.54,2744.47],"5-16-31":[-29.54,2744.47],"6-34-0":[13.6,33.57],"6-34-1":[16.2,34.27],"6-34-2":[15.09,1823.83],"6-34-3":[5.88,1627.27],"6-34-4":[0.78,1272.1],"6-34-5":[-16.01,1913.68],"6-34-6":[-22.87,1056.55],"6-34-7":[-53.19,570.75],"6-34-8":[-67.08,613.97],"6-34-9":[-84.49,433.17],"6-34-10":[-91.94,-38.64],"6-34-11":[-96.06,-44.35],"6-34-12":[-95.88,171.79],"6-34-13":[-46,145.12],"6-34-14":[-3.04,594.92],"6-34-15":[117.38,614.36],"6-34-16":[124.05,432.14],"6-34-17":[17.53,436.84],"6-34-18":[94.64,1652.42],"6-34-19":[35.46,2004.7],"6-34-20":[-31.34,358.2],"6-34-21":[-56.91,76.45],"6-34-22":[-52.24,86.32],"6-34-23":[-53.41,678.56],"6-34-24":[-46.91,565.42],"6-34-25":[-34.3,19.57],"6-34-26":[-32.9,735.54],"6-34-27":[-24.67,729.46],"6-34-28":[-18.58,3818.31],"6-34-29":[-17.79,1199.76],"6-34-30":[0.98,213.98],"6-34-31":[2.04,21.13],"6-34-32":[2.12,20.08],"6-34-33":[-5.46,10.12],"6-34-34":[-5.77,0.8],"6-34-35":[-6.05,2.96],"6-34-36":[-5.94,2.96],"6-34-37":[-5.13,6.17],"6-34-38":[-1.3,9.8],"6-34-39":[1.64,14.13],"6-34-40":[4.23,15.17],"6-34-41":[4.47,14.04],"6-34-42":[3.4,12.02],"6-34-43":[3.4,11.01],"6-34-44":[1.55,10.91],"6-34-45":[1.48,9.3],"6-34-46":[1.54,11.81],"6-34-47":[3.72,12.77],"6-34-48":[2.17,11.75],"6-34-49":[0.41,7.88],"6-34-50":[-3.25,5.77],"6-34-51":[-6.93,1.5],"6-34-52":[-11.33,-1.44],"6-34-53":[-18.26,-3.74],"6-34-54":[-20.79,-6.34],"6-34-55":[-25.29,-7.54],"6-34-56":[-27.01,-9.25],"6-34-57":[-33.98,-10.94],"6-34-58":[-34.8,1241.13],"6-34-59":[-52.36,1732.84],"6-34-60":[-52.36,2250.43],"6-34-61":[873,1480.75],"6-34-62":[1247.41,2251.13],"6-34-63":[-29.54,2745.47],"6-35-0":[13.6,34.16],"6-35-1":[16.51,35.76],"5-17-0":[13.6,35.76],"6-35-2":[16.38,1923.59],"6-35-3":[9.49,2313.91],"5-17-1":[5.88,2313.91],"4-8-0":[3.54,2313.91],"6-35-4":[3.3,2252.73],"6-35-5":[-8.04,1712.44],"5-17-2":[-16.01,2252.73],"6-35-6":[-16.63,1559.44],"6-35-7":[-53.78,272.32],"5-17-3":[-53.78,1559.44],"4-8-1":[-63.11,2252.73],"6-35-8":[-65.49,185.61],"6-35-9":[-76.1,184.52],"5-17-4":[-84.49,613.97],"6-35-10":[-88.72,293.27],"6-35-11":[-92.71,81.87],"5-17-5":[-96.06,293.27],"4-8-2":[-97.86,613.97],"6-35-12":[-92.66,123.7],"6-35-13":[-45.82,181.36],"5-17-6":[-95.88,181.36],"6-35-14":[-26.92,536.17],"6-35-15":[122.02,651.7],"5-17-7":[-26.92,651.7],"4-8-3":[-96.12,651.7],"6-35-16":[27.96,701.76],"6-35-17":[-8.6,951.43],"5-17-8":[-8.6,951.43],"6-35-18":[-44.79,1713.99],"6-35-19":[-37.13,1476.72],"5-17-9":[-44.79,2004.7],"4-8-4":[-44.79,2004.7],"6-35-20":[-74.33,139.84],"6-35-21":[-74.18,28.94],"5-17-10":[-74.33,358.2],"6-35-22":[-68.27,63.37],"6-35-23":[-53.75,293.76],"5-17-11":[-68.27,678.56],"4-8-5":[-74.33,703.65],"6-35-24":[-62.66,1104.62],"6-35-25":[-46.42,14.26],"5-17-12":[-62.66,1104.62],"6-35-26":[-24.54,8.26],"6-35-27":[-12.35,357.63],"5-17-13":[-32.9,735.54],"4-8-6":[-62.66,3009.32],"6-35-28":[-9.05,1960.73],"6-35-29":[-38,1563.96],"5-17-14":[-38,3818.31],"6-35-30":[10.56,29.2],"6-35-31":[-34,2816.32],"5-17-15":[-34,2816.32],"4-8-7":[-38,3818.31],"6-35-32":[-39.36,6286.78],"6-35-33":[-56.73,4458.62],"5-17-16":[-56.73,6286.78],"6-35-34":[-63.32,4118.74],"6-35-35":[-8.38,458.91],"5-17-17":[-63.32,4118.74],"4-8-8":[-63.32,6286.78],"6-35-36":[-1.45,18],"6-35-37":[2.19,21.77],"5-17-18":[-5.94,21.77],"6-35-38":[3.78,22.14],"6-35-39":[5.81,20.12],"5-17-19":[-1.3,22.14],"4-8-9":[-17.05,22.14],"6-35-40":[6.54,19.83],"6-35-41":[-22.92,470.08],"5-17-20":[-22.92,470.08],"6-35-42":[5.5,19.63],"6-35-43":[-88.44,1091.31],"5-17-21":[-88.44,1091.31],"4-8-10":[-88.44,1091.31],"6-35-44":[-23.76,1289.29],"6-35-45":[4.72,16.91],"5-17-22":[-23.76,1289.29],"6-35-46":[4.86,18.8],"6-35-47":[6.11,18.78],"5-17-23":[1.54,18.8],"4-8-11":[-23.76,1289.29],"6-35-48":[4.51,19.18],"6-35-49":[3.21,14.36],"5-17-24":[0.41,19.18],"6-35-50":[1.45,11.01],"6-35-51":[-2.17,8.59],"5-17-25":[-6.93,11.01],"4-8-12":[-16.4,19.18],"6-35-52":[-5.6,3.45],"6-35-53":[-12,-1.41],"5-17-26":[-18.26,3.45],"6-35-54":[-13.82,-3.08],"6-35-55":[-20.59,-4.15],"5-17-27":[-25.29,-3.08],"4-8-13":[-35.05,3.45],"6-35-56":[-21.6,-7],"6-35-57":[-30.21,327.46],"5-17-28":[-33.98,327.46],"6-35-58":[-30.73,1088.67],"6-35-59":[-49.4,1067.5],"5-17-29":[-52.36,1732.84],"4-8-14":[-52.36,4721.94],"6-35-60":[-49.4,1223.59],"6-35-61":[548.47,1388.03],"5-17-30":[-52.36,2250.43],"6-35-62":[1139.79,2260.72],"6-35-63":[-29.54,2745.47],"5-17-31":[-29.54,2745.47],"4-8-15":[-52.36,2745.47],"6-36-0":[13.6,34.61],"6-36-1":[16.93,36.8],"6-36-2":[17.48,2230.75],"6-36-3":[8.2,2258.08],"6-36-4":[6.48,1817.36],"6-36-5":[1.34,2118.71],"6-36-6":[-14.9,1862.67],"6-36-7":[-49.69,611.89],"6-36-8":[-62.21,282.83],"6-36-9":[-68.81,575.77],"6-36-10":[-79.91,428.02],"6-36-11":[-45.31,430.05],"6-36-12":[-47.68,408.97],"6-36-13":[-44.52,406.33],"6-36-14":[126.58,610.85],"6-36-15":[16.43,575.3],"6-36-16":[12.09,700.02],"6-36-17":[-45.25,927.51],"6-36-18":[-64.5,1201.61],"6-36-19":[-85.54,191.41],"6-36-20":[-89.06,-36.24],"6-36-21":[-93.16,-34.13],"6-36-22":[-90.89,29.15],"6-36-23":[-82.17,55.76],"6-36-24":[-67.36,1947.58],"6-36-25":[-49.86,2231.33],"6-36-26":[-37.01,0.98],"6-36-27":[-29.93,-2.92],"6-36-28":[-18.96,1449.86],"6-36-29":[-29.88,4212.67],"6-36-30":[-37.47,5414.88],"6-36-31":[-328.06,5809.48],"6-36-32":[167.64,5906.18],"6-36-33":[112.46,4149.93],"6-36-34":[77.11,5607.45],"6-36-35":[-116.39,6754.44],"6-36-36":[-49.49,5914.69],"6-36-37":[-7.04,824.13],"6-36-38":[10.05,32.11],"6-36-39":[9.18,30.01],"6-36-40":[9.06,28.91],"6-36-41":[9.77,29.26],"6-36-42":[8.85,27.55],"6-36-43":[7.85,26.75],"6-36-44":[8.15,25.78],"6-36-45":[8.09,22.48],"6-36-46":[8.44,23.14],"6-36-47":[9.17,22.91],"6-36-48":[7.17,22.45],"6-36-49":[4.69,22.45],"6-36-50":[4.05,19.43],"6-36-51":[1.95,10.14],"6-36-52":[-2.07,8.34],"6-36-53":[-5.89,2.43],"6-36-54":[-7.67,1],"6-36-55":[-16.43,-0.39],"6-36-56":[-17.96,4.83],"6-36-57":[-24.97,322.6],"6-36-58":[-25.5,1069.77],"6-36-59":[-46.79,1055.47],"6-36-60":[-49.8,832.48],"6-36-61":[240.99,1288.62],"6-36-62":[1054.14,2281.25],"6-36-63":[-29.54,2745.47],"6-37-0":[13.6,35.4],"6-37-1":[17.14,38.45],"5-18-0":[13.6,38.45],"6-37-2":[18.24,2437.47],"6-37-3":[7.27,2148.92],"5-18-1":[7.27,2437.47],"6-37-4":[7.89,1260.24],"6-37-5":[4.77,32.77],"5-18-2":[1.34,2118.71],"6-37-6":[-1.92,1808.19],"6-37-7":[-40.5,1101.49],"5-18-3":[-49.69,1862.67],"6-37-8":[-50.59,282.61],"6-37-9":[-60.82,642.27],"5-18-4":[-68.81,642.27],"6-37-10":[-29.59,648.16],"6-37-11":[-23.76,410.19],"5-18-5":[-79.91,648.16],"6-37-12":[-40.73,516.43],"6-37-13":[163.41,654.15],"5-18-6":[-47.68,654.15],"6-37-14":[225.34,700.01],"6-37-15":[-96.6,889.43],"5-18-7":[-96.6,889.43],"6-37-16":[-33.29,1597.57],"6-37-17":[-113.29,1241.62],"5-18-8":[-113.29,1597.57],"6-37-18":[-86.48,7.41],"6-37-19":[-97.81,-12.11],"5-18-9":[-97.81,1201.61],"6-37-20":[-102.6,-42.73],"6-37-21":[-100.62,-43.8],"5-18-10":[-102.6,-34.13],"6-37-22":[-95.92,-41.08],"6-37-23":[-92.86,26.27],"5-18-11":[-95.92,55.76],"6-37-24":[-83.2,1217.95],"6-37-25":[-62.64,2330.69],"5-18-12":[-83.2,2330.69],"6-37-26":[-56.44,-14.96],"6-37-27":[-48.4,871.95],"5-18-13":[-56.44,871.95],"6-37-28":[-49.02,5700.22],"6-37-29":[-23.52,3844.52],"5-18-14":[-49.02,5700.22],"6-37-30":[169,5315.89],"6-37-31":[170.25,3836.77],"5-18-15":[-328.06,5809.48],"6-37-32":[117.06,443.38],"6-37-33":[81.67,324.59],"5-18-16":[81.67,5906.18],"6-37-34":[90.99,2362.22],"6-37-35":[136.3,5683.59],"5-18-17":[-116.39,6754.44],"6-37-36":[213.99,5564.58],"6-37-37":[-123.53,5547.75],"5-18-18":[-123.53,5914.69],"6-37-38":[11.41,41.12],"6-37-39":[13.52,40.44],"5-18-19":[9.18,41.12],"6-37-40":[13.77,39.3],"6-37-41":[13.66,37.5],"5-18-20":[9.06,39.3],"6-37-42":[12.71,34.42],"6-37-43":[9.07,32.14],"5-18-21":[7.85,34.42],"6-37-44":[8.29,34.46],"6-37-45":[-18.71,1376.54],"5-18-22":[-18.71,1376.54],"6-37-46":[-29.59,1061.25],"6-37-47":[-7.31,1414.25],"5-18-23":[-29.59,1414.25],"6-37-48":[-36.85,4026.29],"6-37-49":[-269.44,3587.09],"5-18-24":[-269.44,4026.29],"6-37-50":[-96.77,2789.91],"6-37-51":[-222.29,1172.63],"5-18-25":[-222.29,2789.91],"6-37-52":[1.79,13.51],"6-37-53":[0.72,11.28],"5-18-26":[-5.89,13.51],"6-37-54":[-0.4,8.59],"6-37-55":[-7.66,4.36],"5-18-27":[-16.43,8.59],"6-37-56":[-8.53,510.52],"6-37-57":[-19.03,669.28],"5-18-28":[-24.97,669.28],"6-37-58":[-21.41,1660.76],"6-37-59":[-46.84,796.88],"5-18-29":[-46.84,1660.76],"6-37-60":[-52.31,243.32],"6-37-61":[219.34,1153.83],"5-18-30":[-52.31,1288.62],"6-37-62":[921.3,2321.18],"6-37-63":[-29.54,2745.47],"5-18-31":[-29.54,2745.47],"6-38-0":[13.6,36.29],"6-38-1":[17.42,39.8],"6-38-2":[18.96,2116.63],"6-38-3":[6.6,2052.81],"6-38-4":[10,1115.32],"6-38-5":[12.54,35.55],"6-38-6":[0.83,1713.29],"6-38-7":[-34.12,1625.19],"6-38-8":[-39.93,332.82],"6-38-9":[-52.52,633.8],"6-38-10":[-48.57,658.27],"6-38-11":[-23.61,464.64],"6-38-12":[271.57,704.35],"6-38-13":[334.3,1114.61],"6-38-14":[-30.94,1053.24],"6-38-15":[-69.08,1266.55],"6-38-16":[-76.04,1888.88],"6-38-17":[-77.04,507.57],"6-38-18":[-86.89,-36.02],"6-38-19":[-98.41,-42.87],"6-38-20":[-103.24,-47.88],"6-38-21":[-104.42,-47.93],"6-38-22":[-104.14,-46.84],"6-38-23":[-103.56,-41.22],"6-38-24":[-101.46,1152.74],"6-38-25":[-85.84,3067.99],"6-38-26":[-70.73,-20.78],"6-38-27":[-65.4,833.1],"6-38-28":[-114.23,4925.73],"6-38-29":[10.54,5356.84],"6-38-30":[61.91,3882.23],"6-38-31":[106.5,839.2],"6-38-32":[68.16,474.29],"6-38-33":[63.39,249.13],"6-38-34":[103.34,384.58],"6-38-35":[184.94,644.83],"6-38-36":[252.99,6360.34],"6-38-37":[-22.39,6449.41],"6-38-38":[-1.33,5847.77],"6-38-39":[12.47,42.32],"6-38-40":[-9.89,2677.33],"6-38-41":[-3.78,2243.25],"6-38-42":[5.25,5156.32],"6-38-43":[2.3,5062.63],"6-38-44":[-10.81,5023.3],"6-38-45":[10.45,4724.4],"6-38-46":[-49.62,3766.16],"6-38-47":[-60.04,2585.5],"6-38-48":[-22.3,3553.09],"6-38-49":[7.67,3257.62],"6-38-50":[-72.84,2695.15],"6-38-51":[-106.71,1949.61],"6-38-52":[4.99,21.78],"6-38-53":[5.46,21.13],"6-38-54":[2.62,15.36],"6-38-55":[0.1,12.23],"6-38-56":[-3.35,2784.58],"6-38-57":[-15.5,1731.59],"6-38-58":[-15.5,1790.22],"6-38-59":[-44.23,1401.52],"6-38-60":[-50.33,332.2],"6-38-61":[241.75,1029.44],"6-38-62":[742.55,2346.02],"6-38-63":[-29.54,2745.47],"6-39-0":[13.6,37.58],"6-39-1":[17.68,41.29],"5-19-0":[13.6,41.29],"6-39-2":[16.51,1723.34],"6-39-3":[6.84,1651.25],"5-19-1":[6.6,2116.63],"4-9-0":[6.6,2437.47],"6-39-4":[11.11,1535.69],"6-39-5":[13.7,38.14],"5-19-2":[10,1535.69],"6-39-6":[2.98,1492.45],"6-39-7":[-1.86,1664.51],"5-19-3":[-34.12,1713.29],"4-9-1":[-49.69,2118.71],"3-4-0":[-63.11,2437.47],"6-39-8":[-16.42,932.96],"6-39-9":[-42.68,781.05],"5-19-4":[-52.52,932.96],"6-39-10":[-44.28,360.51],"6-39-11":[-41.88,596.29],"5-19-5":[-48.57,658.27],"4-9-2":[-79.91,932.96],"6-39-12":[51.44,869.29],"6-39-13":[188,1077.82],"5-19-6":[51.44,1114.61],"6-39-14":[-31.13,916.29],"6-39-15":[-25.79,1579.36],"5-19-7":[-69.08,1579.36],"4-9-3":[-96.6,1579.36],"3-4-1":[-97.86,1579.36],"6-39-16":[-56.2,1114.21],"6-39-17":[-75.76,23.87],"5-19-8":[-77.04,1888.88],"6-39-18":[-85.75,-37.02],"6-39-19":[-95.04,-41.17],"5-19-9":[-98.41,-36.02],"4-9-4":[-113.29,1888.88],"6-39-20":[-101.46,-44.35],"6-39-21":[-103.88,-46.85],"5-19-10":[-104.42,-44.35],"6-39-22":[-105.29,-49.02],"6-39-23":[-104.93,-50.05],"5-19-11":[-105.29,-41.22],"4-9-5":[-105.29,55.76],"3-4-2":[-113.29,2004.7],"6-39-24":[-129.9,-42.27],"6-39-25":[-132.42,1440.94],"5-19-12":[-132.42,3067.99],"6-39-26":[-85.88,-29.52],"6-39-27":[-89.53,1217.96],"5-19-13":[-89.53,1217.96],"4-9-6":[-132.42,3067.99],"6-39-28":[-34.01,3550.67],"6-39-29":[-4.7,404.14],"5-19-14":[-114.23,5356.84],"6-39-30":[19.1,759.95],"6-39-31":[49.74,984.95],"5-19-15":[19.1,3882.23],"4-9-7":[-328.06,5809.48],"3-4-3":[-328.06,5809.48],"6-39-32":[-0.58,880.62],"6-39-33":[34.67,244.67],"5-19-16":[-0.58,880.62],"6-39-34":[68,300.39],"6-39-35":[108.3,433.23],"5-19-17":[68,644.83],"4-9-8":[-116.39,6754.44],"6-39-36":[155.88,5347.83],"6-39-37":[202.17,6455.95],"5-19-18":[-22.39,6455.95],"6-39-38":[2.92,6600.28],"6-39-39":[3.78,6222.25],"5-19-19":[-1.33,6600.28],"4-9-9":[-123.53,6600.28],"3-4-4":[-123.53,6754.44],"6-39-40":[25.81,6775.96],"6-39-41":[366.3,6919.9],"5-19-20":[-9.89,6919.9],"6-39-42":[645.96,6300.89],"6-39-43":[493.64,6969.13],"5-19-21":[2.3,6969.13],"4-9-10":[-9.89,6969.13],"6-39-44":[407.92,5888.33],"6-39-45":[231.75,3998.13],"5-19-22":[-10.81,5888.33],"6-39-46":[248.58,2022.28],"6-39-47":[173.83,1957.39],"5-19-23":[-60.04,3766.16],"4-9-11":[-60.04,5888.33],"3-4-5":[-88.44,6969.13],"6-39-48":[-0.14,1353.11],"6-39-49":[-111.83,1097.15],"5-19-24":[-111.83,3553.09],"6-39-50":[-1.5,605.9],"6-39-51":[-63.31,2581.84],"5-19-25":[-106.71,2695.15],"4-9-12":[-269.44,4026.29],"6-39-52":[7.24,30.32],"6-39-53":[8.16,28.42],"5-19-26":[4.99,30.32],"6-39-54":[5.99,24.52],"6-39-55":[4.94,1701.66],"5-19-27":[0.1,1701.66],"4-9-13":[-16.43,1701.66],"3-4-6":[-269.44,4026.29],"6-39-56":[2.04,2876.77],"6-39-57":[-5.16,2323.88],"5-19-28":[-15.5,2876.77],"6-39-58":[-5.16,2011.29],"6-39-59":[-38.71,1401.52],"5-19-29":[-44.23,2011.29],"4-9-14":[-46.84,2876.77],"6-39-60":[-48.69,398.96],"6-39-61":[152.3,947.43],"5-19-30":[-50.33,1029.44],"6-39-62":[609.13,2348.16],"6-39-63":[-29.54,2745.47],"5-19-31":[-29.54,2745.47],"4-9-15":[-52.31,2745.47],"3-4-7":[-52.36,4721.94],"6-40-0":[13.58,38.54],"6-40-1":[18.42,42.48],"6-40-2":[14.03,1837.18],"6-40-3":[9.2,1301.31],"6-40-4":[16.61,1474.89],"6-40-5":[15.16,294.75],"6-40-6":[5.31,35.39],"6-40-7":[0.08,1690.53],"6-40-8":[-12.78,2057.19],"6-40-9":[-31.21,1148.56],"6-40-10":[-39,1032.11],"6-40-11":[-38.87,935.94],"6-40-12":[283.81,898.04],"6-40-13":[24.76,1031.68],"6-40-14":[-26.02,1255.33],"6-40-15":[-50.51,787.13],"6-40-16":[-51.94,269.07],"6-40-17":[-74.05,-24.93],"6-40-18":[-82.04,-34.93],"6-40-19":[-88.7,-36.77],"6-40-20":[-92.93,48.35],"6-40-21":[-98.06,-42.9],"6-40-22":[-101.84,-47.14],"6-40-23":[-104.68,-50.45],"6-40-24":[-138.65,-50.2],"6-40-25":[-141.12,1288.29],"6-40-26":[-90.28,-35.91],"6-40-27":[-82.71,92.4],"6-40-28":[-60.97,2718.19],"6-40-29":[-37.5,2385.74],"6-40-30":[52.53,2826.62],"6-40-31":[41.04,2785.87],"6-40-32":[-10.01,1058.3],"6-40-33":[7.09,158.16],"6-40-34":[23.99,203.5],"6-40-35":[68.74,470.48],"6-40-36":[117.6,267.64],"6-40-37":[126.79,5469.94],"6-40-38":[191.91,5778.21],"6-40-39":[986.52,6050.05],"6-40-40":[396.34,6388.87],"6-40-41":[262.61,6039.42],"6-40-42":[156.73,4549.07],"6-40-43":[232.7,2816.12],"6-40-44":[196.61,812.73],"6-40-45":[94.32,598.59],"6-40-46":[-102.43,1675.56],"6-40-47":[0.8,1125.83],"6-40-48":[-8.45,672.86],"6-40-49":[1.67,282.56],"6-40-50":[9.92,25.99],"6-40-51":[-12.01,1141.97],"6-40-52":[12.59,33.62],"6-40-53":[14.04,33.98],"6-40-54":[10.79,32.1],"6-40-55":[7.94,2110.84],"6-40-56":[7.14,2245.41],"6-40-57":[1.76,2040.57],"6-40-58":[-14.94,2090.43],"6-40-59":[-38.71,870.91],"6-40-60":[-48.69,230.81],"6-40-61":[-53.09,864.87],"6-40-62":[549.51,2344.27],"6-40-63":[-29.59,2745.47],"6-41-0":[13.58,39.48],"6-41-1":[19.11,44.26],"5-20-0":[13.58,44.26],"6-41-2":[13.19,951.78],"6-41-3":[11.37,1019.58],"5-20-1":[9.2,1837.18],"6-41-4":[17.37,1639.31],"6-41-5":[16.47,47.31],"5-20-2":[15.16,1639.31],"6-41-6":[12.24,47.31],"6-41-7":[6.36,1076.43],"5-20-3":[0.08,1690.53],"6-41-8":[-2.21,1785.63],"6-41-9":[-5.15,768.08],"5-20-4":[-31.21,2057.19],"6-41-10":[-18.25,1491.48],"6-41-11":[-32.03,1587.28],"5-20-5":[-39,1587.28],"6-41-12":[-13.09,864.36],"6-41-13":[25.94,1005.83],"5-20-6":[-13.09,1031.68],"6-41-14":[-40.09,588],"6-41-15":[-62.23,347.02],"5-20-7":[-62.23,1255.33],"6-41-16":[-51.62,265.73],"6-41-17":[-68.99,-25.54],"5-20-8":[-74.05,269.07],"6-41-18":[-71.61,-29.96],"6-41-19":[-78.01,-32.58],"5-20-9":[-88.7,-29.96],"6-41-20":[-85.81,18.12],"6-41-21":[-94.07,-39.59],"5-20-10":[-98.06,48.35],"6-41-22":[-102.75,-46.49],"6-41-23":[-105.57,-50.83],"5-20-11":[-105.57,-46.49],"6-41-24":[-129.54,-50.47],"6-41-25":[-129.48,1103.9],"5-20-12":[-141.12,1288.29],"6-41-26":[-90.4,869.54],"6-41-27":[-83.95,203.34],"5-20-13":[-90.4,869.54],"6-41-28":[-92.41,2565.59],"6-41-29":[-92.52,2449.21],"5-20-14":[-92.52,2718.19],"6-41-30":[126.29,2659.72],"6-41-31":[-0.89,2129.57],"5-20-15":[-0.89,2826.62],"6-41-32":[-35.4,103.23],"6-41-33":[-58.32,106.3],"5-20-16":[-58.32,1058.3],"6-41-34":[-8.15,187.29],"6-41-35":[3.69,1127.71],"5-20-17":[-8.15,1127.71],"6-41-36":[121.95,684.67],"6-41-37":[141.32,910.63],"5-20-18":[117.6,5469.94],"6-41-38":[214.18,4327.46],"6-41-39":[236.72,4098.61],"5-20-19":[191.91,6050.05],"6-41-40":[173.14,2622.25],"6-41-41":[94.42,1259.46],"5-20-20":[94.42,6388.87],"6-41-42":[68.09,1956.16],"6-41-43":[84.73,1847.62],"5-20-21":[68.09,4549.07],"6-41-44":[37.81,370.32],"6-41-45":[-42.53,1242.87],"5-20-22":[-42.53,1242.87],"6-41-46":[-22.19,172.48],"6-41-47":[-31.67,129.69],"5-20-23":[-102.43,1675.56],"6-41-48":[11.07,24.28],"6-41-49":[10.94,26.76],"5-20-24":[-8.45,672.86],"6-41-50":[10.24,27.93],"6-41-51":[-32.01,987.97],"5-20-25":[-32.01,1141.97],"6-41-52":[13.89,37.69],"6-41-53":[15.64,37.01],"5-20-26":[12.59,37.69],"6-41-54":[14.31,2255.29],"6-41-55":[8.72,2099.32],"5-20-27":[7.94,2255.29],"6-41-56":[6.99,2890.49],"6-41-57":[-1.96,2528.76],"5-20-28":[-1.96,2890.49],"6-41-58":[-28.3,1987.4],"6-41-59":[-36.07,-12.83],"5-20-29":[-38.71,2090.43],"6-41-60":[-47.6,-17.93],"6-41-61":[-51.95,806.53],"5-20-30":[-53.09,864.87],"6-41-62":[471.29,2332.43],"6-41-63":[-29.59,2745.47],"5-20-31":[-29.59,2745.47],"6-42-0":[13.6,39.87],"6-42-1":[20.07,45.77],"6-42-2":[13.39,636.09],"6-42-3":[13.39,1412.39],"6-42-4":[19.15,1850.85],"6-42-5":[16.99,99.21],"6-42-6":[19.11,50.32],"6-42-7":[14.3,47.47],"6-42-8":[7.19,1284.77],"6-42-9":[7.19,31.28],"6-42-10":[-1.45,19.12],"6-42-11":[-15.72,1027.48],"6-42-12":[-15.45,846.11],"6-42-13":[-12.9,704.1],"6-42-14":[-35.16,560.68],"6-42-15":[-28.74,626.18],"6-42-16":[-51.65,12.82],"6-42-17":[-59.93,-22.72],"6-42-18":[-63.96,-25.31],"6-42-19":[-70.71,-27.67],"6-42-20":[-79.19,-32.63],"6-42-21":[-92.99,-37.86],"6-42-22":[-102.26,-44.04],"6-42-23":[-104.51,-48.01],"6-42-24":[-109.89,-46.13],"6-42-25":[-127.72,350.69],"6-42-26":[-127.8,1415.28],"6-42-27":[-108.65,1174.77],"6-42-28":[-95.38,906.03],"6-42-29":[-54.23,2236.77],"6-42-30":[-7.39,2551.06],"6-42-31":[-5.06,1982.48],"6-42-32":[-47.66,394.84],"6-42-33":[-73.31,139.4],"6-42-34":[-32.27,379.21],"6-42-35":[37.28,586.16],"6-42-36":[152.35,742.16],"6-42-37":[128.07,1176.05],"6-42-38":[126.79,1325.79],"6-42-39":[110.1,644.34],"6-42-40":[97.77,249.8],"6-42-41":[34.67,233.97],"6-42-42":[2.15,142.11],"6-42-43":[-47.95,159.46],"6-42-44":[8.07,171.01],"6-42-45":[-24.24,773.01],"6-42-46":[11.51,27.54],"6-42-47":[5.16,24.63],"6-42-48":[5.16,23.27],"6-42-49":[8.2,25.72],"6-42-50":[-14.47,710.18],"6-42-51":[7.63,36.26],"6-42-52":[18.27,39.83],"6-42-53":[15.15,41.77],"6-42-54":[17.24,2109.78],"6-42-55":[9.82,2069.8],"6-42-56":[4.32,269.27],"6-42-57":[-10.08,1250.11],"6-42-58":[-23.74,1211.47],"6-42-59":[-36.14,-12.1],"6-42-60":[-49.12,-17.94],"6-42-61":[-51.95,889.65],"6-42-62":[706.64,2326.44],"6-42-63":[-29.54,2745.48],"6-43-0":[13.6,39.93],"6-43-1":[20.42,46.12],"5-21-0":[13.6,46.12],"6-43-2":[15.74,633.11],"6-43-3":[17.13,1941.41],"5-21-1":[13.39,1941.41],"4-10-0":[9.2,1941.41],"6-43-4":[99.2,2238.22],"6-43-5":[18.2,1021.33],"5-21-2":[16.99,2238.22],"6-43-6":[19.11,56.07],"6-43-7":[20.15,55.35],"5-21-3":[14.3,56.07],"4-10-1":[0.08,2238.22],"6-43-8":[17.02,49.44],"6-43-9":[9.89,42.39],"5-21-4":[7.19,1284.77],"6-43-10":[5.25,33.28],"6-43-11":[0.68,23.83],"5-21-5":[-15.72,1027.48],"4-10-2":[-39,2057.19],"6-43-12":[-8.86,1193.16],"6-43-13":[-13.28,895.93],"5-21-6":[-15.45,1193.16],"6-43-14":[-20.12,804.73],"6-43-15":[-48.44,566.65],"5-21-7":[-48.44,804.73],"4-10-3":[-62.23,1255.33],"6-43-16":[-45.14,-4.42],"6-43-17":[-49.88,-13.27],"5-21-8":[-59.93,12.82],"6-43-18":[-53.59,-19.77],"6-43-19":[-63.3,-23.07],"5-21-9":[-70.71,-19.77],"4-10-4":[-88.7,269.07],"6-43-20":[-73.49,-28.47],"6-43-21":[-87.06,-33.6],"5-21-10":[-92.99,-28.47],"6-43-22":[-94.59,-38.95],"6-43-23":[-97.23,-43.01],"5-21-11":[-104.51,-38.95],"4-10-5":[-105.57,48.35],"6-43-24":[-97.15,-43.83],"6-43-25":[-102.43,-45.56],"5-21-12":[-127.72,350.69],"6-43-26":[-113.66,-45.85],"6-43-27":[-108.06,-44.72],"5-21-13":[-127.8,1415.28],"4-10-6":[-141.12,1415.28],"6-43-28":[-95.84,-31.87],"6-43-29":[-77.21,502.55],"5-21-14":[-95.84,2236.77],"6-43-30":[-149.21,1207.52],"6-43-31":[87.42,1109.8],"5-21-15":[-149.21,2551.06],"4-10-7":[-149.21,2826.62],"6-43-32":[-59.96,483.8],"6-43-33":[-57.01,412.4],"5-21-16":[-73.31,483.8],"6-43-34":[2.73,657.03],"6-43-35":[87.58,621.44],"5-21-17":[-32.27,657.03],"4-10-8":[-73.31,1127.71],"6-43-36":[215.28,689.04],"6-43-37":[74.01,949.21],"5-21-18":[74.01,1176.05],"6-43-38":[58.91,1245.78],"6-43-39":[66.15,856.34],"5-21-19":[58.91,1325.79],"4-10-9":[58.91,6050.05],"6-43-40":[22.81,738.99],"6-43-41":[-2.88,703.38],"5-21-20":[-2.88,738.99],"6-43-42":[24.1,362.62],"6-43-43":[-5.9,395.29],"5-21-21":[-47.95,395.29],"4-10-10":[-47.95,6388.87],"6-43-44":[-44.85,228.24],"6-43-45":[-41.29,445.18],"5-21-22":[-44.85,773.01],"6-43-46":[2.65,26.5],"6-43-47":[0.53,19.67],"5-21-23":[0.53,27.54],"4-10-11":[-102.43,1675.56],"6-43-48":[0.24,14.06],"6-43-49":[3.69,25.65],"5-21-24":[0.24,25.72],"6-43-50":[3.62,714.59],"6-43-51":[5.69,38.8],"5-21-25":[-14.47,714.59],"4-10-12":[-32.01,1141.97],"6-43-52":[18.27,41.03],"6-43-53":[15.15,44.21],"5-21-26":[15.15,44.21],"6-43-54":[19.28,1728.16],"6-43-55":[9.82,37.01],"5-21-27":[9.82,2109.78],"4-10-13":[7.94,2255.29],"6-43-56":[1.8,22.37],"6-43-57":[-9.86,6.91],"5-21-28":[-10.08,1250.11],"6-43-58":[-23.43,-4.86],"6-43-59":[-35.85,-11.97],"5-21-29":[-36.14,1211.47],"4-10-14":[-38.71,2890.49],"6-43-60":[-50.63,-17.94],"6-43-61":[-51.01,1371.37],"5-21-30":[-51.95,1371.37],"6-43-62":[889.64,2317.26],"6-43-63":[-29.54,2745.48],"5-21-31":[-29.54,2745.48],"4-10-15":[-53.09,2745.48],"6-44-0":[13.6,39.84],"6-44-1":[20.3,45.86],"6-44-2":[17.47,772.13],"6-44-3":[19.23,2089.38],"6-44-4":[1020.94,2319.04],"6-44-5":[23.12,1708.39],"6-44-6":[23.37,1880.96],"6-44-7":[23.02,1854.07],"6-44-8":[21.54,1029.06],"6-44-9":[17.35,54.28],"6-44-10":[12.02,44.62],"6-44-11":[7.84,35.64],"6-44-12":[1.92,148.72],"6-44-13":[-20.3,486.61],"6-44-14":[-16.93,577.05],"6-44-15":[-12.05,408.54],"6-44-16":[-25.93,8.57],"6-44-17":[-39.16,-6.77],"6-44-18":[-44.89,-11.09],"6-44-19":[-56.94,-15.52],"6-44-20":[-66.17,-21.28],"6-44-21":[-77.89,-27.12],"6-44-22":[-85.04,-32.05],"6-44-23":[-89.27,-36.06],"6-44-24":[-91.01,-38.75],"6-44-25":[-96.71,-40.68],"6-44-26":[-98.96,-43.31],"6-44-27":[-95.93,-44.41],"6-44-28":[-95.18,-38.68],"6-44-29":[-81.6,14.37],"6-44-30":[-61.24,1030.82],"6-44-31":[94.48,889.3],"6-44-32":[-68.02,823.15],"6-44-33":[-38.49,487.97],"6-44-34":[67.74,694.41],"6-44-35":[161.68,753.33],"6-44-36":[228.41,612.29],"6-44-37":[103.13,914.71],"6-44-38":[86.09,880.42],"6-44-39":[114.58,752.75],"6-44-40":[106.53,799.57],"6-44-41":[70.48,899.62],"6-44-42":[35.31,584.15],"6-44-43":[1.97,482.27],"6-44-44":[-15.03,526.4],"6-44-45":[1.5,25.03],"6-44-46":[-0.35,22.2],"6-44-47":[-1.19,4.24],"6-44-48":[-2.11,6.22],"6-44-49":[-0.03,20.82],"6-44-50":[4.52,23.4],"6-44-51":[4.37,37.14],"6-44-52":[17.75,41.14],"6-44-53":[20.43,1523.88],"6-44-54":[16.01,578.59],"6-44-55":[7.53,38.03],"6-44-56":[-1.38,22.22],"6-44-57":[-9.33,2.32],"6-44-58":[-22.52,-3.02],"6-44-59":[-35.85,-11.88],"6-44-60":[-51.01,204.79],"6-44-61":[-50.72,1540.95],"6-44-62":[1083.33,2298.91],"6-44-63":[-29.54,2745.48],"6-45-0":[13.6,39.31],"6-45-1":[20,45.87],"5-22-0":[13.6,45.87],"6-45-2":[18.2,829.3],"6-45-3":[45.54,2185.38],"5-22-1":[17.47,2185.38],"6-45-4":[1552.61,2333.41],"6-45-5":[1247.03,2344.97],"5-22-2":[23.12,2344.97],"6-45-6":[26.83,2399.4],"6-45-7":[22.92,1842.92],"5-22-3":[22.92,2399.4],"6-45-8":[27.1,2229.6],"6-45-9":[22.31,1280.25],"5-22-4":[17.35,2229.6],"6-45-10":[19.37,59.8],"6-45-11":[16.17,52.29],"5-22-5":[7.84,59.8],"6-45-12":[14.52,48.25],"6-45-13":[12.67,43.66],"5-22-6":[-20.3,486.61],"6-45-14":[-9.6,301],"6-45-15":[-18.2,337.49],"5-22-7":[-18.2,577.05],"6-45-16":[-9.43,30.39],"6-45-17":[-20.11,6.02],"5-22-8":[-39.16,30.39],"6-45-18":[-27.17,-1.97],"6-45-19":[-40.58,-6.64],"5-22-9":[-56.94,-1.97],"6-45-20":[-50.81,-12.66],"6-45-21":[-62.29,-18.14],"5-22-10":[-77.89,-12.66],"6-45-22":[-68.68,-23.39],"6-45-23":[-75.93,-27.38],"5-22-11":[-89.27,-23.39],"6-45-24":[-80.15,-31.4],"6-45-25":[-85.3,-34.94],"5-22-12":[-96.71,-31.4],"6-45-26":[-89.68,-37.87],"6-45-27":[-90.85,-41.31],"5-22-13":[-98.96,-37.87],"6-45-28":[-90.85,-40.13],"6-45-29":[-87.64,-32.13],"5-22-14":[-95.18,14.37],"6-45-30":[-71.92,795.54],"6-45-31":[-78.81,615.02],"5-22-15":[-78.81,1030.82],"6-45-32":[-60.65,667.42],"6-45-33":[-29.07,524.34],"5-22-16":[-68.02,823.15],"6-45-34":[114.46,806.95],"6-45-35":[140.16,772.15],"5-22-17":[67.74,806.95],"6-45-36":[148.33,508.2],"6-45-37":[188.03,1020.26],"5-22-18":[103.13,1020.26],"6-45-38":[279.54,1043.99],"6-45-39":[226.83,630.24],"5-22-19":[86.09,1043.99],"6-45-40":[218.51,1344.63],"6-45-41":[192.34,1399.29],"5-22-20":[70.48,1399.29],"6-45-42":[-18.16,1093.19],"6-45-43":[-20.19,529.24],"5-22-21":[-20.19,1093.19],"6-45-44":[-0.71,38.77],"6-45-45":[-4.23,9.67],"5-22-22":[-15.03,526.4],"6-45-46":[-4.6,2.28],"6-45-47":[-5.77,-0.34],"5-22-23":[-5.77,22.2],"6-45-48":[-6.99,-0.02],"6-45-49":[-2.71,15],"5-22-24":[-6.99,20.82],"6-45-50":[5.01,17.57],"6-45-51":[6.24,35.37],"5-22-25":[4.37,37.14],"6-45-52":[17.75,40.41],"6-45-53":[20.22,47.29],"5-22-26":[17.75,1523.88],"6-45-54":[13.66,45.08],"6-45-55":[7.53,29.37],"5-22-27":[7.53,578.59],"6-45-56":[-1.7,15.36],"6-45-57":[-5.7,-0.8],"5-22-28":[-9.33,22.22],"6-45-58":[-21.59,-2.49],"6-45-59":[-34.95,-11.26],"5-22-29":[-35.85,-2.49],"6-45-60":[-51.02,354.31],"6-45-61":[-49.77,1979.94],"5-22-30":[-51.02,1979.94],"6-45-62":[1259.39,2275.47],"6-45-63":[-29.54,2745.48],"5-22-31":[-29.54,2745.48],"6-46-0":[13.6,38.72],"6-46-1":[19.71,46.42],"6-46-2":[19.83,660.34],"6-46-3":[405.24,2285.51],"6-46-4":[1894.84,2457.14],"6-46-5":[1860.54,2475.02],"6-46-6":[29.19,2542.84],"6-46-7":[26.42,1831.68],"6-46-8":[29.81,2027.72],"6-46-9":[29.48,2175.1],"6-46-10":[26.25,1494.43],"6-46-11":[24.84,68.28],"6-46-12":[21.59,63.25],"6-46-13":[21.59,55.81],"6-46-14":[17.39,52.22],"6-46-15":[15.17,53.92],"6-46-16":[5.41,41.06],"6-46-17":[-3.66,21.16],"6-46-18":[-11.78,10.12],"6-46-19":[-24.71,1.96],"6-46-20":[-35.15,-2.52],"6-46-21":[-46.25,-7.81],"6-46-22":[-53.6,-12.92],"6-46-23":[-62.78,-17.62],"6-46-24":[-68.86,-22.4],"6-46-25":[-75.75,-26.93],"6-46-26":[-82.25,-30.53],"6-46-27":[-86.6,-34.57],"6-46-28":[-87.21,-38.79],"6-46-29":[-85.59,-35.95],"6-46-30":[-76.08,-28.51],"6-46-31":[-60.98,35.72],"6-46-32":[-80.07,69.74],"6-46-33":[-95.49,521.39],"6-46-34":[51.02,882.74],"6-46-35":[105.36,737.91],"6-46-36":[127.52,1154.07],"6-46-37":[227.19,1475.44],"6-46-38":[312.64,1034.42],"6-46-39":[301.73,1075.16],"6-46-40":[-51.68,1855.39],"6-46-41":[-37.26,1825.17],"6-46-42":[-24.64,1827.75],"6-46-43":[-6.23,13.98],"6-46-44":[-9.69,10.93],"6-46-45":[-8.47,-0.7],"6-46-46":[-8.58,-1.87],"6-46-47":[-7.32,-2.14],"6-46-48":[-8.38,-2.22],"6-46-49":[-4.74,9.5],"6-46-50":[1.02,14.82],"6-46-51":[8.24,36.85],"6-46-52":[18.32,40.45],"6-46-53":[18.15,42.54],"6-46-54":[13.5,40.62],"6-46-55":[8,27.69],"6-46-56":[-0.82,15.99],"6-46-57":[-4.02,0.15],"6-46-58":[-20.54,-1.51],"6-46-59":[-34.25,437.71],"6-46-60":[-50.27,631.96],"6-46-61":[-48.16,1965.25],"6-46-62":[1373.28,2268.09],"6-46-63":[-29.54,2745.48],"6-47-0":[13.6,37.99],"6-47-1":[19.55,47.53],"5-23-0":[13.6,47.53],"6-47-2":[20.29,700.91],"6-47-3":[443.21,2373.94],"5-23-1":[19.83,2373.94],"4-11-0":[13.6,2373.94],"6-47-4":[2285.5,2625.24],"6-47-5":[2286.78,2882.05],"5-23-2":[1860.54,2882.05],"6-47-6":[1707.24,2840.8],"6-47-7":[1101.27,2476.32],"5-23-3":[26.42,2840.8],"4-11-1":[22.92,2882.05],"3-5-0":[0.08,2882.05],"6-47-8":[1301.32,2769.8],"6-47-9":[1356.57,2769.95],"5-23-4":[29.48,2769.95],"6-47-10":[33.06,2452.69],"6-47-11":[31.62,81.26],"5-23-5":[24.84,2452.69],"4-11-2":[7.84,2769.95],"6-47-12":[29.54,78.26],"6-47-13":[24.7,72.82],"5-23-6":[21.59,78.26],"6-47-14":[23.65,69.47],"6-47-15":[21.38,70.1],"5-23-7":[15.17,70.1],"4-11-3":[-20.3,577.05],"3-5-1":[-62.23,2769.95],"2-2-0":[-97.86,2882.05],"6-47-16":[13.6,55.71],"6-47-17":[5.96,40.64],"5-23-8":[-3.66,55.71],"6-47-18":[1.95,29.54],"6-47-19":[-2.64,22.06],"5-23-9":[-24.71,29.54],"4-11-4":[-56.94,55.71],"6-47-20":[-11.83,15.19],"6-47-21":[-23.15,4.78],"5-23-10":[-46.25,15.19],"6-47-22":[-31.32,-2.17],"6-47-23":[-42.51,-7.52],"5-23-11":[-62.78,-2.17],"4-11-5":[-89.27,15.19],"3-5-2":[-105.57,269.07],"6-47-24":[-50.68,-13.69],"6-47-25":[-59.08,-19.14],"5-23-12":[-75.75,-13.69],"6-47-26":[-65.46,-24.58],"6-47-27":[-76.9,-25.66],"5-23-13":[-86.6,-24.58],"4-11-6":[-98.96,-13.69],"6-47-28":[-76.9,-30.33],"6-47-29":[-77.77,-32.04],"5-23-14":[-87.21,-30.33],"6-47-30":[-72.57,-28.65],"6-47-31":[-64.4,-23.15],"5-23-15":[-76.08,35.72],"4-11-7":[-95.18,1030.82],"3-5-3":[-149.21,2826.62],"2-2-1":[-328.06,5809.48],"6-47-32":[-64.98,198.92],"6-47-33":[-52.12,442.32],"5-23-16":[-95.49,521.39],"6-47-34":[64.01,663.07],"6-47-35":[165.38,868.81],"5-23-17":[51.02,882.74],"4-11-8":[-95.49,882.74],"6-47-36":[242.55,1657.87],"6-47-37":[397.4,1576.13],"5-23-18":[127.52,1657.87],"6-47-38":[443.95,1269.93],"6-47-39":[482.05,2353.32],"5-23-19":[301.73,2353.32],"4-11-9":[86.09,2353.32],"3-5-4":[-95.49,6050.05],"6-47-40":[-47.11,2413.32],"6-47-41":[-19.83,2.39],"5-23-20":[-51.68,2413.32],"6-47-42":[-16.52,2.77],"6-47-43":[-15,-2.9],"5-23-21":[-24.64,1827.75],"4-11-10":[-51.68,2413.32],"6-47-44":[-12.7,-3.31],"6-47-45":[-12.43,-4],"5-23-22":[-12.7,10.93],"6-47-46":[-12.93,-3],"6-47-47":[-9.68,-2.76],"5-23-23":[-12.93,-1.87],"4-11-11":[-15.03,526.4],"3-5-5":[-102.43,6388.87],"2-2-2":[-123.53,6969.13],"6-47-48":[-7.97,-2.42],"6-47-49":[-5.09,12.36],"5-23-24":[-8.38,12.36],"6-47-50":[0.94,19.2],"6-47-51":[9.93,36.67],"5-23-25":[0.94,36.85],"4-11-12":[-8.38,37.14],"6-47-52":[18.32,42.39],"6-47-53":[18.15,853.58],"5-23-26":[18.15,853.58],"6-47-54":[14.52,46.03],"6-47-55":[8,29.24],"5-23-27":[8,46.03],"4-11-13":[7.53,1523.88],"3-5-6":[-32.01,2255.29],"6-47-56":[0.14,16.45],"6-47-57":[-4.25,0.82],"5-23-28":[-4.25,16.45],"6-47-58":[-18.57,-1.51],"6-47-59":[-29.56,457.63],"5-23-29":[-34.25,457.63],"4-11-14":[-35.85,457.63],"6-47-60":[-47.37,731.02],"6-47-61":[-47.53,1373.29],"5-23-30":[-50.27,1965.25],"6-47-62":[1353.9,2263.16],"6-47-63":[-29.54,2745.98],"5-23-31":[-29.54,2745.98],"4-11-15":[-51.02,2745.98],"3-5-7":[-53.09,2890.49],"2-2-3":[-269.44,4721.94],"6-48-0":[13.6,37.61],"6-48-1":[19.52,48.06],"6-48-2":[23.04,949.4],"6-48-3":[418.15,2469.75],"6-48-4":[2373.93,2812.59],"6-48-5":[2625.23,3024.06],"6-48-6":[2476.31,3047.68],"6-48-7":[2357.41,2826.07],"6-48-8":[1710.88,2785.17],"6-48-9":[45.47,2833.9],"6-48-10":[-226.59,2803.26],"6-48-11":[39.09,92.57],"6-48-12":[36.79,90.15],"6-48-13":[33.05,85.22],"6-48-14":[32.05,78.86],"6-48-15":[27.85,72.39],"6-48-16":[21.23,65.89],"6-48-17":[15.6,54.55],"6-48-18":[11.42,45.38],"6-48-19":[8.36,39.31],"6-48-20":[2.88,32.2],"6-48-21":[-3.8,23.36],"6-48-22":[-13.7,10.3],"6-48-23":[-26.69,-1.49],"6-48-24":[-36.66,-9.03],"6-48-25":[-48.75,-14.66],"6-48-26":[-52.31,-19.6],"6-48-27":[-60.66,-21.73],"6-48-28":[-65.09,-22.59],"6-48-29":[-65.14,-24.57],"6-48-30":[-64.07,-23.02],"6-48-31":[-58.56,-22.33],"6-48-32":[-70.5,80.25],"6-48-33":[-60.53,366.28],"6-48-34":[46.82,588.21],"6-48-35":[175.94,1298.57],"6-48-36":[374.95,1756.49],"6-48-37":[264.86,1788.77],"6-48-38":[158.3,2047.81],"6-48-39":[-0.94,2789.25],"6-48-40":[-170.49,2060.99],"6-48-41":[-22.35,-6.95],"6-48-42":[-21.25,-7.27],"6-48-43":[-16.43,-5.74],"6-48-44":[-15.08,-5.85],"6-48-45":[-14.74,-5.73],"6-48-46":[-15.44,-5.21],"6-48-47":[-14.07,-3.49],"6-48-48":[-9.34,-1.35],"6-48-49":[-3.65,16.97],"6-48-50":[3.91,17.53],"6-48-51":[9.5,35.69],"6-48-52":[17.4,41.28],"6-48-53":[19.29,277.84],"6-48-54":[14.49,46.03],"6-48-55":[8.34,28.56],"6-48-56":[0.81,16.97],"6-48-57":[-6.67,1.37],"6-48-58":[-16.22,-2.35],"6-48-59":[-31.72,213.73],"6-48-60":[-45.8,701.38],"6-48-61":[-47.53,1548.87],"6-48-62":[1362.57,2265.71],"6-48-63":[-29.54,2746.48],"6-49-0":[13.6,37.46],"6-49-1":[19.53,48.73],"5-24-0":[13.6,48.73],"6-49-2":[24.05,1459.96],"6-49-3":[919.34,2462.17],"5-24-1":[23.04,2469.75],"6-49-4":[2354.99,2812.59],"6-49-5":[2629.11,3141.21],"5-24-2":[2354.99,3141.21],"6-49-6":[2784.52,3182.09],"6-49-7":[2634.56,3042.62],"5-24-3":[2357.41,3182.09],"6-49-8":[44.4,2652.87],"6-49-9":[44.54,2012.55],"5-24-4":[44.4,2833.9],"6-49-10":[46.28,334.77],"6-49-11":[44.97,101.28],"5-24-5":[-226.59,2803.26],"6-49-12":[43.91,102],"6-49-13":[40.13,98.24],"5-24-6":[33.05,102],"6-49-14":[36.75,93.09],"6-49-15":[33.71,86.06],"5-24-7":[27.85,93.09],"6-49-16":[28.95,81.48],"6-49-17":[23.81,73.88],"5-24-8":[15.6,81.48],"6-49-18":[21.4,66.2],"6-49-19":[17.36,60.53],"5-24-9":[8.36,66.2],"6-49-20":[13.7,55.5],"6-49-21":[5.84,39.04],"5-24-10":[-3.8,55.5],"6-49-22":[-1.5,22.35],"6-49-23":[-16.89,4.59],"5-24-11":[-26.69,22.35],"6-49-24":[-26.78,-4.39],"6-49-25":[-37.71,-9.55],"5-24-12":[-48.75,-4.39],"6-49-26":[-42.33,-13.76],"6-49-27":[-43.85,-16.48],"5-24-13":[-60.66,-13.76],"6-49-28":[-45.31,-15.23],"6-49-29":[-49.21,-15.42],"5-24-14":[-65.14,-15.23],"6-49-30":[-47.15,-16.29],"6-49-31":[-46.81,-15.86],"5-24-15":[-64.07,-15.86],"6-49-32":[-46.81,79.72],"6-49-33":[-74.23,1125.05],"5-24-16":[-74.23,1125.05],"6-49-34":[53.15,966.21],"6-49-35":[149.22,1272.47],"5-24-17":[46.82,1298.57],"6-49-36":[99.05,2017.31],"6-49-37":[0.38,1423.16],"5-24-18":[0.38,2017.31],"6-49-38":[-51.4,1567.33],"6-49-39":[-41.56,2863.35],"5-24-19":[-51.4,2863.35],"6-49-40":[-24.02,694.74],"6-49-41":[-23.57,-9.82],"5-24-20":[-170.49,2060.99],"6-49-42":[-21.49,-7.66],"6-49-43":[-17.46,-7.18],"5-24-21":[-21.49,-5.74],"6-49-44":[-15.24,-6.72],"6-49-45":[-14.63,-6.41],"5-24-22":[-15.24,-5.73],"6-49-46":[-15.67,-6.33],"6-49-47":[-14.71,-4.79],"5-24-23":[-15.67,-3.49],"6-49-48":[-10.04,-0.71],"6-49-49":[-1.58,15],"5-24-24":[-10.04,16.97],"6-49-50":[3.4,15.14],"6-49-51":[6.24,37.34],"5-24-25":[3.4,37.34],"6-49-52":[17.4,40.03],"6-49-53":[19.24,44.9],"5-24-26":[17.4,277.84],"6-49-54":[14.63,42.23],"6-49-55":[8.34,28.46],"5-24-27":[8.34,46.03],"6-49-56":[1.36,16.69],"6-49-57":[-9.07,1.88],"5-24-28":[-9.07,16.97],"6-49-58":[-13.8,-3.51],"6-49-59":[-31.95,-7.78],"5-24-29":[-31.95,213.73],"6-49-60":[-42.5,467.1],"6-49-61":[-22.1,1679.35],"5-24-30":[-47.53,1679.35],"6-49-62":[1548.86,2265.71],"6-49-63":[-29.54,2746.48],"5-24-31":[-29.54,2746.48],"6-50-0":[13.6,37.63],"6-50-1":[19.61,49.96],"6-50-2":[24.84,1457.67],"6-50-3":[1097.61,2355],"6-50-4":[2249.23,2629.12],"6-50-5":[2558.1,3200.74],"6-50-6":[3042.61,3253.39],"6-50-7":[2639.66,3209.33],"6-50-8":[45.07,3108.37],"6-50-9":[45.74,106.81],"6-50-10":[49.27,105.78],"6-50-11":[49.5,111.91],"6-50-12":[49.85,112.69],"6-50-13":[46.54,108.32],"6-50-14":[43.24,103.27],"6-50-15":[40.73,96.8],"6-50-16":[37.48,93],"6-50-17":[33.1,87.83],"6-50-18":[30.85,80.4],"6-50-19":[27.75,76.44],"6-50-20":[20.59,68.85],"6-50-21":[12.03,47.85],"6-50-22":[3.31,31.01],"6-50-23":[-8.2,12.45],"6-50-24":[-17.97,2.19],"6-50-25":[-27.35,-2.98],"6-50-26":[-32.47,-5.75],"6-50-27":[-35.27,-10.36],"6-50-28":[-34.69,-9.18],"6-50-29":[-34.54,-8.11],"6-50-30":[-34.03,-8.32],"6-50-31":[-34.84,-8.32],"6-50-32":[-34.84,-10.92],"6-50-33":[-44.76,1106.52],"6-50-34":[4.53,1190.32],"6-50-35":[-49.15,1083.8],"6-50-36":[-42.94,626.82],"6-50-37":[-28.08,986.18],"6-50-38":[-23.73,124.34],"6-50-39":[-23.06,-5.86],"6-50-40":[-23.22,-8.26],"6-50-41":[-22.24,-6.03],"6-50-42":[-20.02,-1.95],"6-50-43":[-15.06,-2.36],"6-50-44":[-14.73,-4.64],"6-50-45":[-13.41,-4.06],"6-50-46":[-13.54,-3.83],"6-50-47":[-13.35,-3.1],"6-50-48":[-9.2,0.55],"6-50-49":[-0.72,12.98],"6-50-50":[2.9,23.35],"6-50-51":[-44.49,2738.7],"6-50-52":[19.49,41.64],"6-50-53":[20.4,44],"6-50-54":[14.13,41.06],"6-50-55":[7.93,28.3],"6-50-56":[1.73,16.49],"6-50-57":[-9.57,2.54],"6-50-58":[-12.44,-2.31],"6-50-59":[-30.93,-7.27],"6-50-60":[-38.74,776.2],"6-50-61":[467.09,1715.15],"6-50-62":[1679.34,2262.46],"6-50-63":[-29.54,2746.48],"6-51-0":[13.6,37.87],"6-51-1":[19.71,51.91],"5-25-0":[13.6,51.91],"6-51-2":[25.09,1225.55],"6-51-3":[563.18,2251.74],"5-25-1":[24.84,2355],"4-12-0":[13.6,2469.75],"6-51-4":[2064.18,2558.11],"6-51-5":[2479.15,3116.18],"5-25-2":[2064.18,3200.74],"6-51-6":[2863.3,3190.72],"6-51-7":[842.84,3318.44],"5-25-3":[842.84,3318.44],"4-12-1":[842.84,3318.44],"6-51-8":[51.79,2952.11],"6-51-9":[51.81,111.55],"5-25-4":[45.07,3108.37],"6-51-10":[52.28,118.01],"6-51-11":[54.03,122.71],"5-25-5":[49.27,122.71],"4-12-2":[-226.59,3108.37],"6-51-12":[56.06,122.31],"6-51-13":[52.06,118.71],"5-25-6":[46.54,122.31],"6-51-14":[49.47,113.3],"6-51-15":[47.29,108.7],"5-25-7":[40.73,113.3],"4-12-3":[27.85,122.31],"6-51-16":[45.13,107.59],"6-51-17":[41.29,102.26],"5-25-8":[33.1,107.59],"6-51-18":[39.59,98.78],"6-51-19":[34.86,94.27],"5-25-9":[27.75,98.78],"4-12-4":[8.36,107.59],"6-51-20":[25.6,77.17],"6-51-21":[16.22,56.25],"5-25-10":[12.03,77.17],"6-51-22":[7.85,41.92],"6-51-23":[2.04,22.97],"5-25-11":[-8.2,41.92],"4-12-5":[-26.69,77.17],"6-51-24":[-2.99,19.11],"6-51-25":[-9.54,11.37],"5-25-12":[-27.35,19.11],"6-51-26":[-18.24,4.22],"6-51-27":[-22.86,-3.86],"5-25-13":[-35.27,4.22],"4-12-6":[-60.66,19.11],"6-51-28":[-21.86,-3.45],"6-51-29":[-16.16,0.32],"5-25-14":[-34.69,0.32],"6-51-30":[-15.02,0.32],"6-51-31":[-23.52,-1.06],"5-25-15":[-34.84,0.32],"4-12-7":[-65.14,0.32],"6-51-32":[-24.99,-5.27],"6-51-33":[-25.2,315.67],"5-25-16":[-44.76,1106.52],"6-51-34":[-43.64,1194.05],"6-51-35":[-34.81,1027.17],"5-25-17":[-49.15,1194.05],"4-12-8":[-74.23,1298.57],"6-51-36":[-25.89,-9.5],"6-51-37":[-26.03,-8.12],"5-25-18":[-42.94,986.18],"6-51-38":[-21.09,-6.58],"6-51-39":[-20.12,-3.54],"5-25-19":[-23.73,124.34],"4-12-9":[-51.4,2863.35],"6-51-40":[-17.91,-6.14],"6-51-41":[-15.72,-2.7],"5-25-20":[-23.22,-2.7],"6-51-42":[-11.25,4.88],"6-51-43":[-8.51,4.82],"5-25-21":[-20.02,4.88],"4-12-10":[-170.49,2060.99],"6-51-44":[-8.8,-0.42],"6-51-45":[-8.93,-0.49],"5-25-22":[-14.73,-0.42],"6-51-46":[-7.5,-0.3],"6-51-47":[-7.21,0.52],"5-25-23":[-13.54,0.52],"4-12-11":[-15.67,0.52],"6-51-48":[-5.84,5.1],"6-51-49":[0.54,16.37],"5-25-24":[-9.2,16.37],"6-51-50":[6.57,28.17],"6-51-51":[0.07,2916.19],"5-25-25":[-44.49,2916.19],"4-12-12":[-44.49,2916.19],"6-51-52":[19.49,44.42],"6-51-53":[20.67,45.57],"5-25-26":[19.49,45.57],"6-51-54":[13.2,41.85],"6-51-55":[7.93,27.24],"5-25-27":[7.93,41.85],"4-12-13":[7.93,277.84],"6-51-56":[1.43,15.82],"6-51-57":[-8.96,2.59],"5-25-28":[-9.57,16.49],"6-51-58":[-10.69,-0.69],"6-51-59":[-26.21,682.83],"5-25-29":[-30.93,682.83],"4-12-14":[-31.95,682.83],"6-51-60":[-38.69,818.98],"6-51-61":[776.19,1785.3],"5-25-30":[-38.74,1785.3],"6-51-62":[1715.14,2257.85],"6-51-63":[-29.54,2746.48],"5-25-31":[-29.54,2746.48],"4-12-15":[-47.53,2746.48],"6-52-0":[13.6,38],"6-52-1":[19.75,52.83],"6-52-2":[26.3,1141.68],"6-52-3":[39.31,2076.74],"6-52-4":[1811.24,2521.51],"6-52-5":[2242.7,2887.36],"6-52-6":[2056.01,3023.83],"6-52-7":[55.87,3002.57],"6-52-8":[54.97,1206.68],"6-52-9":[54.3,120.01],"6-52-10":[55.78,125.87],"6-52-11":[59.31,126.28],"6-52-12":[59.58,122.56],"6-52-13":[56.65,121.98],"6-52-14":[54.49,120.69],"6-52-15":[53.73,118.59],"6-52-16":[51.45,117.92],"6-52-17":[49.39,956.08],"6-52-18":[47.13,292.1],"6-52-19":[38.59,98.45],"6-52-20":[29.29,80.32],"6-52-21":[22.35,62.32],"6-52-22":[12.18,49.65],"6-52-23":[9.78,32.21],"6-52-24":[6.18,30.74],"6-52-25":[2.46,27.03],"6-52-26":[-6.88,18.42],"6-52-27":[-11.61,3.79],"6-52-28":[-11.61,1.81],"6-52-29":[-6.04,9.77],"6-52-30":[-1.63,10.1],"6-52-31":[-11.81,9.72],"6-52-32":[-15.72,1.12],"6-52-33":[-24.61,236.48],"6-52-34":[-22.93,-6.99],"6-52-35":[-23.03,-9.64],"6-52-36":[-21.93,-7.29],"6-52-37":[-18.49,-6.71],"6-52-38":[-16.29,-5.18],"6-52-39":[-15.68,-4.33],"6-52-40":[-15.61,-5.17],"6-52-41":[-11.29,0.3],"6-52-42":[-4.72,5.27],"6-52-43":[-1.14,6.16],"6-52-44":[-1.59,8.81],"6-52-45":[-1.75,7.35],"6-52-46":[-1.79,8.03],"6-52-47":[-1.07,9.11],"6-52-48":[0.32,11.62],"6-52-49":[3.14,20.83],"6-52-50":[10.63,31.49],"6-52-51":[8.47,44.15],"6-52-52":[20.98,48.11],"6-52-53":[20.05,47.57],"6-52-54":[12.4,39.99],"6-52-55":[6.84,24.84],"6-52-56":[1.3,15.07],"6-52-57":[-6.52,2.36],"6-52-58":[-10.53,-0.06],"6-52-59":[-21.87,1124.55],"6-52-60":[-37.76,910.74],"6-52-61":[818.39,1887.29],"6-52-62":[1785.29,2271.2],"6-52-63":[-29.54,2746.48],"6-53-0":[13.6,38.04],"6-53-1":[19.67,53.58],"5-26-0":[13.6,53.58],"6-53-2":[26.45,988.3],"6-53-3":[357.17,1866.38],"5-26-1":[26.3,2076.74],"6-53-4":[1590.54,2511.91],"6-53-5":[1504.88,2633.93],"5-26-2":[1504.88,2887.36],"6-53-6":[50.54,2633.93],"6-53-7":[54.99,3982.86],"5-26-3":[50.54,3982.86],"6-53-8":[57.33,121.21],"6-53-9":[57.33,128.08],"5-26-4":[54.3,1206.68],"6-53-10":[60.52,129.5],"6-53-11":[60.77,127.45],"5-26-5":[55.78,129.5],"6-53-12":[59.99,122.28],"6-53-13":[59.83,127.23],"5-26-6":[56.65,127.23],"6-53-14":[60.04,129.8],"6-53-15":[59.64,129.69],"5-26-7":[53.73,129.8],"6-53-16":[58.28,129.28],"6-53-17":[56.51,123.07],"5-26-8":[49.39,956.08],"6-53-18":[49.22,2346.09],"6-53-19":[40.38,100.63],"5-26-9":[38.59,2346.09],"6-53-20":[31.82,83.95],"6-53-21":[25.24,69.72],"5-26-10":[22.35,83.95],"6-53-22":[17.36,52.25],"6-53-23":[15.16,40.62],"5-26-11":[9.78,52.25],"6-53-24":[15.01,37.08],"6-53-25":[10.17,36.9],"5-26-12":[2.46,37.08],"6-53-26":[3.36,31.78],"6-53-27":[0.38,19.03],"5-26-13":[-11.61,31.78],"6-53-28":[0.23,13.16],"6-53-29":[1.8,18.26],"5-26-14":[-11.61,18.26],"6-53-30":[5.2,18.06],"6-53-31":[0.58,16.65],"5-26-15":[-11.81,18.06],"6-53-32":[-9.18,11.61],"6-53-33":[-14,-1.77],"5-26-16":[-24.61,236.48],"6-53-34":[-21.18,-5.37],"6-53-35":[-21.12,-7.87],"5-26-17":[-23.03,-5.37],"6-53-36":[-19.03,-7.1],"6-53-37":[-14.64,-6.55],"5-26-18":[-21.93,-6.55],"6-53-38":[-14.32,-5.31],"6-53-39":[-22.84,584.18],"5-26-19":[-22.84,584.18],"6-53-40":[-12.77,-3.59],"6-53-41":[-8.93,2.46],"5-26-20":[-15.61,2.46],"6-53-42":[0.26,10.35],"6-53-43":[2.82,13.56],"5-26-21":[-4.72,13.56],"6-53-44":[2.99,18.1],"6-53-45":[3.74,19.28],"5-26-22":[-1.75,19.28],"6-53-46":[4.18,19.28],"6-53-47":[4.92,20.12],"5-26-23":[-1.79,20.12],"6-53-48":[4.93,21.48],"6-53-49":[6.89,25.29],"5-26-24":[0.32,25.29],"6-53-50":[10.63,32.32],"6-53-51":[8.47,44.34],"5-26-25":[8.47,44.34],"6-53-52":[22.07,48.37],"6-53-53":[20.05,48.14],"5-26-26":[20.05,48.37],"6-53-54":[11.81,40.04],"6-53-55":[6.84,22.99],"5-26-27":[6.84,40.04],"6-53-56":[1.22,13.57],"6-53-57":[-4.92,1.98],"5-26-28":[-6.52,15.07],"6-53-58":[-10.25,-0.09],"6-53-59":[-16.53,1294.14],"5-26-29":[-21.87,1294.14],"6-53-60":[-35.54,1634.18],"6-53-61":[910.73,1960.78],"5-26-30":[-37.76,1960.78],"6-53-62":[1887.28,2301.31],"6-53-63":[-29.54,2746.48],"5-26-31":[-29.54,2746.48],"6-54-0":[13.6,38.03],"6-54-1":[19.6,54.55],"6-54-2":[26.58,989.93],"6-54-3":[31.94,1631.63],"6-54-4":[1236.12,2416.2],"6-54-5":[47.32,2217.34],"6-54-6":[48.05,2458.39],"6-54-7":[54.4,2560.61],"6-54-8":[59.36,127.95],"6-54-9":[61.22,130.4],"6-54-10":[62.35,130.18],"6-54-11":[60.84,126.55],"6-54-12":[60.65,122.78],"6-54-13":[60.63,127.15],"6-54-14":[62.98,131.06],"6-54-15":[64.62,132.17],"6-54-16":[60.84,129.76],"6-54-17":[57.33,122.83],"6-54-18":[41.12,1086.32],"6-54-19":[38.34,100.89],"6-54-20":[31.04,82.99],"6-54-21":[26.81,66.49],"6-54-22":[21.12,53.95],"6-54-23":[17.1,42.86],"6-54-24":[18.44,45.39],"6-54-25":[15.88,1434.62],"6-54-26":[10.32,41.69],"6-54-27":[7.13,30.03],"6-54-28":[6.53,22.91],"6-54-29":[6.71,23.82],"6-54-30":[8.3,22.61],"6-54-31":[6.31,20.6],"6-54-32":[-2.33,18.27],"6-54-33":[-10.41,1.49],"6-54-34":[-15.53,-1.98],"6-54-35":[-16.6,-5.32],"6-54-36":[-16.29,-6.18],"6-54-37":[-15.52,-6.1],"6-54-38":[-15.32,-6.3],"6-54-39":[-13.65,-5.14],"6-54-40":[-12.51,-0.74],"6-54-41":[-6.03,5.66],"6-54-42":[1.39,12.5],"6-54-43":[4.87,19.2],"6-54-44":[7.12,24.93],"6-54-45":[8.92,26.98],"6-54-46":[9.52,27.23],"6-54-47":[9.52,28],"6-54-48":[10.95,28.86],"6-54-49":[10.95,32.39],"6-54-50":[15.14,35.56],"6-54-51":[2.7,43.39],"6-54-52":[3.95,1349.09],"6-54-53":[10.78,1035.34],"6-54-54":[10.99,38.39],"6-54-55":[6.04,21.85],"6-54-56":[1.32,12.69],"6-54-57":[-4.19,2.98],"6-54-58":[-8.55,102.38],"6-54-59":[-11.49,1507.45],"6-54-60":[282.95,1787.39],"6-54-61":[1151.7,2012.99],"6-54-62":[1960.77,2336.23],"6-54-63":[-29.54,2746.48],"6-55-0":[13.6,37.95],"6-55-1":[19.57,55.69],"5-27-0":[13.6,55.69],"6-55-2":[26.3,766.89],"6-55-3":[31.3,1410.95],"5-27-1":[26.3,1631.63],"4-13-0":[13.6,2076.74],"6-55-4":[33.45,2030.68],"6-55-5":[42.85,2071.97],"5-27-2":[33.45,2416.2],"6-55-6":[49.24,2327.64],"6-55-7":[55.03,1988.61],"5-27-3":[48.05,2560.61],"4-13-1":[33.45,3982.86],"3-6-0":[13.6,3982.86],"6-55-8":[59.61,1471.32],"6-55-9":[64.12,194.14],"5-27-4":[59.36,1471.32],"6-55-10":[60.83,129.91],"6-55-11":[60.83,126.1],"5-27-5":[60.83,130.18],"4-13-2":[54.3,1471.32],"6-55-12":[59.88,126.1],"6-55-13":[60,126.13],"5-27-6":[59.88,127.15],"6-55-14":[62.57,129.01],"6-55-15":[62.57,131.88],"5-27-7":[62.57,132.17],"4-13-3":[53.73,132.17],"3-6-1":[-226.59,3108.37],"6-55-16":[59.45,129.91],"6-55-17":[53.56,120.26],"5-27-8":[53.56,129.91],"6-55-18":[41.9,1131.62],"6-55-19":[36.6,100.95],"5-27-9":[36.6,1131.62],"4-13-4":[36.6,2346.09],"6-55-20":[30.32,76.17],"6-55-21":[26.98,63.94],"5-27-10":[26.81,82.99],"6-55-22":[22.3,55.85],"6-55-23":[20.15,50.59],"5-27-11":[17.1,55.85],"4-13-5":[9.78,83.95],"3-6-2":[-26.69,2346.09],"6-55-24":[19.98,51.75],"6-55-25":[2.58,2003.8],"5-27-12":[2.58,2003.8],"6-55-26":[-31.78,2815.55],"6-55-27":[12.13,37.39],"5-27-13":[-31.78,2815.55],"4-13-6":[-31.78,2815.55],"6-55-28":[11.03,31.14],"6-55-29":[11.25,32.89],"5-27-14":[6.53,32.89],"6-55-30":[10.59,30.93],"6-55-31":[9.61,23.87],"5-27-15":[6.31,30.93],"4-13-7":[-11.81,32.89],"3-6-3":[-65.14,2815.55],"6-55-32":[1.48,20.71],"6-55-33":[-3.02,8.19],"5-27-16":[-10.41,20.71],"6-55-34":[-9.54,4],"6-55-35":[-12.07,-1.23],"5-27-17":[-16.6,4],"4-13-8":[-24.61,236.48],"6-55-36":[-12.66,-2.77],"6-55-37":[-14.13,-3.24],"5-27-18":[-16.29,-2.77],"6-55-38":[-14.42,-3.25],"6-55-39":[-12.99,-2.51],"5-27-19":[-15.32,-2.51],"4-13-9":[-22.84,584.18],"3-6-4":[-74.23,2863.35],"6-55-40":[-10.22,3.34],"6-55-41":[-0.75,11.75],"5-27-20":[-12.51,11.75],"6-55-42":[3.17,18.07],"6-55-43":[7.05,25.53],"5-27-21":[1.39,25.53],"4-13-10":[-15.61,25.53],"6-55-44":[9.9,32.41],"6-55-45":[13.07,35.35],"5-27-22":[7.12,35.35],"6-55-46":[13.58,36.95],"6-55-47":[13.63,36.98],"5-27-23":[9.52,36.98],"4-13-11":[-1.79,36.98],"3-6-5":[-170.49,2060.99],"6-55-48":[14.16,36.96],"6-55-49":[14.19,37.24],"5-27-24":[10.95,37.24],"6-55-50":[16.34,39.76],"6-55-51":[3.61,42.27],"5-27-25":[2.7,43.39],"4-13-12":[0.32,44.34],"6-55-52":[3.95,37.89],"6-55-53":[9.63,38.97],"5-27-26":[3.95,1349.09],"6-55-54":[10.3,35.96],"6-55-55":[6.04,20.47],"5-27-27":[6.04,38.39],"4-13-13":[3.95,1349.09],"3-6-6":[-44.49,2916.19],"6-55-56":[1.74,12.02],"6-55-57":[-4.2,3.22],"5-27-28":[-4.2,12.69],"6-55-58":[-6.28,557.2],"6-55-59":[102.37,1604.48],"5-27-29":[-11.49,1604.48],"4-13-14":[-21.87,1604.48],"6-55-60":[378.53,1737.31],"6-55-61":[1187.19,2103.65],"5-27-30":[282.95,2103.65],"6-55-62":[2012.98,2360.08],"6-55-63":[-29.54,2746.48],"5-27-31":[-29.54,2746.48],"4-13-15":[-37.76,2746.48],"3-6-7":[-47.53,2746.48],"6-56-0":[13.6,37.87],"6-56-1":[19.57,55.73],"6-56-2":[25.75,654.04],"6-56-3":[28.03,1529.13],"6-56-4":[28.03,995.54],"6-56-5":[38.36,1653.87],"6-56-6":[49.95,1002],"6-56-7":[55.4,671.1],"6-56-8":[61.97,1784.7],"6-56-9":[62.67,1475.57],"6-56-10":[60.06,128.25],"6-56-11":[60.24,126.29],"6-56-12":[59.56,126.29],"6-56-13":[59.86,126.21],"6-56-14":[61.49,126.55],"6-56-15":[60.3,127.18],"6-56-16":[56.77,126.5],"6-56-17":[50.99,117.02],"6-56-18":[43.52,106.96],"6-56-19":[36.6,92.67],"6-56-20":[32.36,81.82],"6-56-21":[27.93,72.03],"6-56-22":[25.77,65.54],"6-56-23":[23.87,64.24],"6-56-24":[23.73,52.11],"6-56-25":[24.85,53.98],"6-56-26":[18.69,52.63],"6-56-27":[15.51,44.22],"6-56-28":[15.28,40.2],"6-56-29":[15.58,37.67],"6-56-30":[12.32,36.23],"6-56-31":[11.02,26.97],"6-56-32":[4.25,25.11],"6-56-33":[2.15,15.56],"6-56-34":[-2.11,11.93],"6-56-35":[-5.35,8.47],"6-56-36":[-7.16,4.11],"6-56-37":[-7.33,0.85],"6-56-38":[-8.48,0.68],"6-56-39":[-8.31,1.89],"6-56-40":[-4.64,8.4],"6-56-41":[2.15,16.04],"6-56-42":[6.23,22.14],"6-56-43":[9.62,30.63],"6-56-44":[15.59,36.65],"6-56-45":[16.37,40.5],"6-56-46":[18.42,43.37],"6-56-47":[18.42,44.13],"6-56-48":[18.16,43.98],"6-56-49":[18.16,41.79],"6-56-50":[20.3,41.65],"6-56-51":[20.3,42.33],"6-56-52":[17.44,40.96],"6-56-53":[15.9,41.96],"6-56-54":[9.77,33.92],"6-56-55":[6.16,19.63],"6-56-56":[1.72,12.29],"6-56-57":[-2.06,3.98],"6-56-58":[-5.82,819.33],"6-56-59":[421.04,1695.38],"6-56-60":[516.59,1629.01],"6-56-61":[1285.43,2172.84],"6-56-62":[2103.64,2379.92],"6-56-63":[-29.54,2746.48],"6-57-0":[13.6,37.8],"6-57-1":[19.62,55.09],"5-28-0":[13.6,55.73],"6-57-2":[25.6,59.23],"6-57-3":[28.3,1436.69],"5-28-1":[25.6,1529.13],"6-57-4":[28.3,681.94],"6-57-5":[38.01,949.92],"5-28-2":[28.03,1653.87],"6-57-6":[51.09,115.49],"6-57-7":[57.7,126.66],"5-28-3":[49.95,1002],"6-57-8":[62.46,1937.43],"6-57-9":[60.84,2123.62],"5-28-4":[60.84,2123.62],"6-57-10":[59.7,124.91],"6-57-11":[58.97,123.99],"5-28-5":[58.97,128.25],"6-57-12":[58.91,123.99],"6-57-13":[57.13,122.5],"5-28-6":[57.13,126.29],"6-57-14":[58.08,124.14],"6-57-15":[58.53,123],"5-28-7":[58.08,127.18],"6-57-16":[54.18,119.6],"6-57-17":[49.49,110.36],"5-28-8":[49.49,126.5],"6-57-18":[43.12,101.63],"6-57-19":[40.71,95.46],"5-28-9":[36.6,106.96],"6-57-20":[36.01,1880.85],"6-57-21":[32.18,2439.69],"5-28-10":[27.93,2439.69],"6-57-22":[30.53,1522.97],"6-57-23":[25.18,68.01],"5-28-11":[23.87,1522.97],"6-57-24":[-14.49,116.51],"6-57-25":[25.65,60.59],"5-28-12":[-14.49,116.51],"6-57-26":[1.56,171.48],"6-57-27":[18.28,57.96],"5-28-13":[1.56,171.48],"6-57-28":[17.32,53.31],"6-57-29":[17.61,43.04],"5-28-14":[15.28,53.31],"6-57-30":[14.23,37.19],"6-57-31":[11.87,33.41],"5-28-15":[11.02,37.19],"6-57-32":[8.76,34.41],"6-57-33":[6.71,26.59],"5-28-16":[2.15,34.41],"6-57-34":[4.93,24.73],"6-57-35":[2.81,19.54],"5-28-17":[-5.35,24.73],"6-57-36":[0.84,14.19],"6-57-37":[0.34,10.34],"5-28-18":[-7.33,14.19],"6-57-38":[-0.06,10.45],"6-57-39":[-0.17,10.33],"5-28-19":[-8.48,10.45],"6-57-40":[1.37,15.84],"6-57-41":[5.03,21.64],"5-28-20":[-4.64,21.64],"6-57-42":[8.34,26.94],"6-57-43":[11.9,34.46],"5-28-21":[6.23,34.46],"6-57-44":[15.59,40.42],"6-57-45":[18.81,45.89],"5-28-22":[15.59,45.89],"6-57-46":[20.61,49.37],"6-57-47":[22.02,50.19],"5-28-23":[18.42,50.19],"6-57-48":[21.38,50.16],"6-57-49":[20.47,48.13],"5-28-24":[18.16,50.16],"6-57-50":[20.4,45.48],"6-57-51":[20.34,44.16],"5-28-25":[20.3,45.48],"6-57-52":[19.71,42.18],"6-57-53":[15.9,42.48],"5-28-26":[15.9,42.48],"6-57-54":[9.16,31.18],"6-57-55":[6.21,18.19],"5-28-27":[6.16,33.92],"6-57-56":[2.3,13.36],"6-57-57":[0.42,11.7],"5-28-28":[-2.06,13.36],"6-57-58":[-1.9,1093.26],"6-57-59":[819.32,1811.71],"5-28-29":[-5.82,1811.71],"6-57-60":[814.02,1663.61],"6-57-61":[1522.35,2225.4],"5-28-30":[516.59,2225.4],"6-57-62":[2172.83,2420.8],"6-57-63":[-29.54,2746.48],"5-28-31":[-29.54,2746.48],"6-58-0":[13.6,37.78],"6-58-1":[19.71,53.62],"6-58-2":[25.56,61.94],"6-58-3":[29.9,345.15],"6-58-4":[30,79.45],"6-58-5":[38.66,105.36],"6-58-6":[50.37,116.37],"6-58-7":[58.46,124.92],"6-58-8":[60.43,1885.38],"6-58-9":[60.01,2140.58],"6-58-10":[58.42,121.69],"6-58-11":[57.73,123.87],"6-58-12":[56.63,123.87],"6-58-13":[57.04,123.14],"6-58-14":[55.87,119.28],"6-58-15":[55.11,118.34],"6-58-16":[50.41,118.05],"6-58-17":[47.21,106.08],"6-58-18":[45.73,104.94],"6-58-19":[42.88,99.37],"6-58-20":[28.43,1402.2],"6-58-21":[13.23,3730.85],"6-58-22":[29.84,1980.83],"6-58-23":[-10.67,745.87],"6-58-24":[-18.64,535.71],"6-58-25":[-14.6,356.34],"6-58-26":[-1.62,135.29],"6-58-27":[-20.7,301.55],"6-58-28":[0.18,458.6],"6-58-29":[18.93,63.46],"6-58-30":[15.77,41.91],"6-58-31":[13.35,38.21],"6-58-32":[13.47,38.21],"6-58-33":[12.71,33.98],"6-58-34":[-2.23,864.67],"6-58-35":[7.45,27.57],"6-58-36":[5.05,20.06],"6-58-37":[4.98,16.73],"6-58-38":[4.46,16.62],"6-58-39":[4.41,17.65],"6-58-40":[5.55,22.04],"6-58-41":[8.28,26.07],"6-58-42":[11.11,30.34],"6-58-43":[13.85,35.77],"6-58-44":[17.65,40.21],"6-58-45":[20.04,47.1],"6-58-46":[23.2,50.18],"6-58-47":[24.78,52.72],"6-58-48":[24.35,54.26],"6-58-49":[24.35,51.82],"6-58-50":[22.38,49.92],"6-58-51":[21.5,46.02],"6-58-52":[18.45,42.72],"6-58-53":[13.3,41.86],"6-58-54":[9.11,28.68],"6-58-55":[6.73,17.29],"6-58-56":[3.08,13.48],"6-58-57":[2.25,357.87],"6-58-58":[2.48,1674.63],"6-58-59":[1093.25,1949.57],"6-58-60":[1289.31,1790.34],"6-58-61":[1663.6,2289.94],"6-58-62":[2225.39,2460.86],"6-58-63":[-29.54,2746.48],"6-59-0":[13.6,37.79],"6-59-1":[19.8,52.18],"5-29-0":[13.6,53.62],"6-59-2":[25.75,63.75],"6-59-3":[30.49,64.24],"5-29-1":[25.56,345.15],"4-14-0":[13.6,1529.13],"6-59-4":[30.51,84.68],"6-59-5":[41.87,100.49],"5-29-2":[30,105.36],"6-59-6":[50.16,115.8],"6-59-7":[56.81,119.95],"5-29-3":[50.16,124.92],"4-14-1":[28.03,1653.87],"6-59-8":[57.71,1189.75],"6-59-9":[59.83,125.87],"5-29-4":[57.71,2140.58],"6-59-10":[55.41,120.74],"6-59-11":[54.59,121.48],"5-29-5":[54.59,123.87],"4-14-2":[54.59,2140.58],"6-59-12":[54.73,121.88],"6-59-13":[57.85,123],"5-29-6":[54.73,123.87],"6-59-14":[52.82,118.25],"6-59-15":[49.92,112.43],"5-29-7":[49.92,119.28],"4-14-3":[49.92,127.18],"6-59-16":[47.92,112.43],"6-59-17":[45.53,102.32],"5-29-8":[45.53,118.05],"6-59-18":[43.5,103.1],"6-59-19":[40.18,98.54],"5-29-9":[40.18,104.94],"4-14-4":[36.6,126.5],"6-59-20":[40.18,88.87],"6-59-21":[34.44,731.97],"5-29-10":[13.23,3730.85],"6-59-22":[-35.01,609.23],"6-59-23":[182.63,951.26],"5-29-11":[-35.01,1980.83],"4-14-5":[-35.01,3730.85],"6-59-24":[63.41,838.62],"6-59-25":[2.52,699.41],"5-29-12":[-18.64,838.62],"6-59-26":[4.84,480.98],"6-59-27":[22.18,1567.34],"5-29-13":[-20.7,1567.34],"4-14-6":[-20.7,1567.34],"6-59-28":[-24.77,1463.87],"6-59-29":[1.22,935.28],"5-29-14":[-24.77,1463.87],"6-59-30":[17.76,49.38],"6-59-31":[15.91,40.51],"5-29-15":[13.35,49.38],"4-14-7":[-24.77,1463.87],"6-59-32":[17.61,40.61],"6-59-33":[15.36,39.26],"5-29-16":[12.71,40.61],"6-59-34":[13.68,36.87],"6-59-35":[10.36,29.33],"5-29-17":[-2.23,864.67],"4-14-8":[-5.35,864.67],"6-59-36":[8.78,22.54],"6-59-37":[8.23,21.11],"5-29-18":[4.98,22.54],"6-59-38":[8.08,23.26],"6-59-39":[8.16,24.61],"5-29-19":[4.41,24.61],"4-14-9":[-8.48,24.61],"6-59-40":[9.22,25.8],"6-59-41":[11.68,28.54],"5-29-20":[5.55,28.54],"6-59-42":[13.34,31.4],"6-59-43":[15.33,35.12],"5-29-21":[11.11,35.77],"4-14-10":[-4.64,35.77],"6-59-44":[17.37,39.98],"6-59-45":[15,2060.11],"5-29-22":[15,2060.11],"6-59-46":[22.8,50.12],"6-59-47":[24.47,52.47],"5-29-23":[22.8,52.72],"4-14-11":[15,2060.11],"6-59-48":[25.92,55.19],"6-59-49":[25.17,55.91],"5-29-24":[24.35,55.91],"6-59-50":[23.47,53.48],"6-59-51":[21.5,49.06],"5-29-25":[21.5,53.48],"4-14-12":[18.16,55.91],"6-59-52":[18.45,44.55],"6-59-53":[13.3,39.12],"5-29-26":[13.3,44.55],"6-59-54":[8.95,26.98],"6-59-55":[6.73,17.28],"5-29-27":[6.73,28.68],"4-14-13":[6.16,44.55],"6-59-56":[4.68,14.62],"6-59-57":[4.84,608.1],"5-29-28":[2.25,608.1],"6-59-58":[10.52,2647.27],"6-59-59":[1580.6,2213.91],"5-29-29":[2.48,2647.27],"4-14-14":[-5.82,2647.27],"6-59-60":[1486.82,1899.59],"6-59-61":[1790.33,2337.34],"5-29-30":[1289.31,2337.34],"6-59-62":[2289.93,2494.91],"6-59-63":[-29.54,2746.48],"5-29-31":[-29.54,2746.48],"4-14-15":[-29.54,2746.48],"6-60-0":[13.6,37.78],"6-60-1":[19.82,52.11],"6-60-2":[26.07,63.8],"6-60-3":[31.53,68.91],"6-60-4":[32.12,88.61],"6-60-5":[43.35,100.59],"6-60-6":[50.16,660.73],"6-60-7":[54.73,115.86],"6-60-8":[55.53,123.35],"6-60-9":[56.93,123.85],"6-60-10":[54.77,119.67],"6-60-11":[36.3,467.08],"6-60-12":[54.66,847.15],"6-60-13":[31.72,1061.19],"6-60-14":[50.82,118.9],"6-60-15":[46.84,106.06],"6-60-16":[46.52,848.03],"6-60-17":[45.68,934.31],"6-60-18":[43.52,948.19],"6-60-19":[36.29,97.22],"6-60-20":[36.5,3428.78],"6-60-21":[36.12,3435.16],"6-60-22":[183.32,753.26],"6-60-23":[203.99,625.45],"6-60-24":[208.98,621.86],"6-60-25":[126.64,616.33],"6-60-26":[54.15,571.22],"6-60-27":[72.56,986.01],"6-60-28":[266.59,1965.58],"6-60-29":[-0.28,1465.14],"6-60-30":[10.1,448.45],"6-60-31":[17.88,41.59],"6-60-32":[19,40.1],"6-60-33":[17.4,38.62],"6-60-34":[14.28,36.87],"6-60-35":[11.08,29.16],"6-60-36":[9.95,23.09],"6-60-37":[10.09,23.78],"6-60-38":[10.53,25.27],"6-60-39":[11.82,25.49],"6-60-40":[12.34,27.11],"6-60-41":[13.01,29.48],"6-60-42":[14.24,30.5],"6-60-43":[15.07,32.66],"6-60-44":[15.81,38.1],"6-60-45":[18.29,45.5],"6-60-46":[6.47,931.45],"6-60-47":[23.42,51.85],"6-60-48":[24.91,56.45],"6-60-49":[26.78,56.31],"6-60-50":[24.85,54.12],"6-60-51":[23.88,51.29],"6-60-52":[18.84,47.16],"6-60-53":[13.07,37.45],"6-60-54":[8.97,27.21],"6-60-55":[7.29,18.18],"6-60-56":[6.69,18.97],"6-60-57":[8.72,1445.48],"6-60-58":[608.09,2647.27],"6-60-59":[1819.4,2378.63],"6-60-60":[1773.2,2084.27],"6-60-61":[1899.58,2371.33],"6-60-62":[2337.33,2524.96],"6-60-63":[-29.54,2746.49],"6-61-0":[13.6,37.76],"6-61-1":[19.78,52.5],"5-30-0":[13.6,52.5],"6-61-2":[26.07,61.81],"6-61-3":[29.91,75.45],"5-30-1":[26.07,75.45],"6-61-4":[34.23,88.45],"6-61-5":[43.49,100.68],"5-30-2":[32.12,100.68],"6-61-6":[49.89,2067.72],"6-61-7":[51.02,110.49],"5-30-3":[49.89,2067.72],"6-61-8":[51.94,113.62],"6-61-9":[52.94,792.85],"5-30-4":[51.94,792.85],"6-61-10":[54.18,472.86],"6-61-11":[40.34,998.82],"5-30-5":[36.3,998.82],"6-61-12":[47.75,911.33],"6-61-13":[45.76,978.67],"5-30-6":[31.72,1061.19],"6-61-14":[51.83,275.17],"6-61-15":[44.76,105.85],"5-30-7":[44.76,275.17],"6-61-16":[42.99,2441.8],"6-61-17":[63.03,2479.29],"5-30-8":[42.99,2479.29],"6-61-18":[21.6,1153.69],"6-61-19":[35.43,1045.54],"5-30-9":[21.6,1153.69],"6-61-20":[43.2,3969.25],"6-61-21":[321.36,3240.15],"5-30-10":[36.12,3969.25],"6-61-22":[327.42,538.03],"6-61-23":[228.84,581.24],"5-30-11":[183.32,753.26],"6-61-24":[207.9,518.07],"6-61-25":[135.48,456.49],"5-30-12":[126.64,621.86],"6-61-26":[189.7,487.98],"6-61-27":[282.45,725.34],"5-30-13":[54.15,986.01],"6-61-28":[245.42,1263.81],"6-61-29":[98.59,1793.46],"5-30-14":[-0.28,1965.58],"6-61-30":[9.64,563.59],"6-61-31":[17.84,40.64],"5-30-15":[9.64,563.59],"6-61-32":[18.11,39.27],"6-61-33":[16.27,37.52],"5-30-16":[16.27,40.1],"6-61-34":[14.28,34.25],"6-61-35":[11.71,28.84],"5-30-17":[11.08,36.87],"6-61-36":[11.3,28.82],"6-61-37":[-99.67,814.4],"5-30-18":[-99.67,814.4],"6-61-38":[11.9,26.07],"6-61-39":[12.45,26.9],"5-30-19":[10.53,26.9],"6-61-40":[12.64,30.04],"6-61-41":[13.85,32.62],"5-30-20":[12.34,32.62],"6-61-42":[14.87,32.51],"6-61-43":[15.14,33.46],"5-30-21":[14.24,33.46],"6-61-44":[15.81,36.25],"6-61-45":[17.74,44.2],"5-30-22":[15.81,45.5],"6-61-46":[21.26,47.29],"6-61-47":[22.24,50.55],"5-30-23":[6.47,931.45],"6-61-48":[24.62,53.23],"6-61-49":[25.06,55.27],"5-30-24":[24.62,56.45],"6-61-50":[26.01,56.2],"6-61-51":[23.88,54.1],"5-30-25":[23.88,56.2],"6-61-52":[17.85,50.82],"6-61-53":[13.07,35.17],"5-30-26":[13.07,50.82],"6-61-54":[9.42,26.81],"6-61-55":[7.57,20.65],"5-30-27":[7.29,27.21],"6-61-56":[7.48,20.76],"6-61-57":[10.04,2119.03],"5-30-28":[6.69,2119.03],"6-61-58":[1445.47,2720.05],"6-61-59":[2045.49,2519.15],"5-30-29":[608.09,2720.05],"6-61-60":[1905.59,2242.55],"6-61-61":[1958.12,2404.88],"5-30-30":[1773.2,2404.88],"6-61-62":[2371.32,2555.1],"6-61-63":[-29.54,2747.47],"5-30-31":[-29.54,2747.47],"6-62-0":[13.6,37.73],"6-62-1":[19.73,53.01],"6-62-2":[26.54,59.25],"6-62-3":[28.63,75.62],"6-62-4":[36.2,85.28],"6-62-5":[42.31,99.8],"6-62-6":[49.28,108.11],"6-62-7":[49.78,103.88],"6-62-8":[50.57,107.83],"6-62-9":[49.7,111.74],"6-62-10":[49.66,298.22],"6-62-11":[49.96,1388.09],"6-62-12":[41.71,1035.94],"6-62-13":[45.89,1109.06],"6-62-14":[20.27,639.9],"6-62-15":[44.39,219.03],"6-62-16":[32.45,2687.22],"6-62-17":[297.06,2577.79],"6-62-18":[44.23,3501.33],"6-62-19":[32.49,2419.81],"6-62-20":[632.45,3718.38],"6-62-21":[368.61,1721.06],"6-62-22":[218.45,696.4],"6-62-23":[131.07,471.46],"6-62-24":[138.86,407.06],"6-62-25":[256.95,487.53],"6-62-26":[239.52,1006.14],"6-62-27":[249.3,631.61],"6-62-28":[194.06,789.75],"6-62-29":[15.13,766.66],"6-62-30":[-46.15,332.62],"6-62-31":[17.31,38.68],"6-62-32":[17.52,38.48],"6-62-33":[15.74,36.14],"6-62-34":[14.55,33.16],"6-62-35":[12.03,28.93],"6-62-36":[12.1,28.82],"6-62-37":[12.83,26.82],"6-62-38":[12.65,28.5],"6-62-39":[13.05,31.28],"6-62-40":[13.65,34.28],"6-62-41":[15.43,36.13],"6-62-42":[16.17,36.67],"6-62-43":[16.17,37.77],"6-62-44":[16.2,37.77],"6-62-45":[16.2,40.32],"6-62-46":[17.78,44.64],"6-62-47":[19.75,49.26],"6-62-48":[22.32,50.13],"6-62-49":[23.73,54.94],"6-62-50":[26.51,56.37],"6-62-51":[24.74,55.65],"6-62-52":[17.74,50.79],"6-62-53":[13.06,33.87],"6-62-54":[10.42,25.96],"6-62-55":[9.91,22.36],"6-62-56":[8.78,20.96],"6-62-57":[10.28,2479.23],"6-62-58":[1813.36,2850.41],"6-62-59":[2242.54,2618.27],"6-62-60":[1991.4,2314.66],"6-62-61":[1993.14,2457.95],"6-62-62":[2404.87,2581.14],"6-62-63":[-29.54,2749.47],"6-63-0":[13.6,37.73],"6-63-1":[19.72,53.59],"5-31-0":[13.6,53.59],"6-63-2":[26.54,62.24],"6-63-3":[28.85,73.73],"5-31-1":[26.54,75.62],"4-15-0":[13.6,75.62],"6-63-4":[35.88,86.28],"6-63-5":[42.26,98.34],"5-31-2":[35.88,99.8],"6-63-6":[48.49,104.24],"6-63-7":[48.27,101.1],"5-31-3":[48.27,108.11],"4-15-1":[32.12,2067.72],"3-7-0":[13.6,2067.72],"6-63-8":[48.82,103.66],"6-63-9":[48.93,103.55],"5-31-4":[48.82,111.74],"6-63-10":[46.96,500.18],"6-63-11":[46.68,821.88],"5-31-5":[46.68,1388.09],"4-15-2":[36.3,1388.09],"6-63-12":[-1.23,942.82],"6-63-13":[5.01,686.85],"5-31-6":[-1.23,1109.06],"6-63-14":[29.66,466.81],"6-63-15":[17.32,332.21],"5-31-7":[17.32,639.9],"4-15-3":[-1.23,1109.06],"3-7-1":[-1.23,2140.58],"2-3-0":[-226.59,3982.86],"6-63-16":[16.62,3299.64],"6-63-17":[40.73,2357.66],"5-31-8":[16.62,3299.64],"6-63-18":[40.99,2423.37],"6-63-19":[45.96,1802.73],"5-31-9":[32.49,3501.33],"4-15-4":[16.62,3501.33],"6-63-20":[585.28,2177.76],"6-63-21":[198.79,856.94],"5-31-10":[198.79,3718.38],"6-63-22":[154.1,519.6],"6-63-23":[95.92,407.48],"5-31-11":[95.92,696.4],"4-15-5":[36.12,3969.25],"3-7-2":[-35.01,3969.25],"6-63-24":[189.24,556.84],"6-63-25":[243.53,577.03],"5-31-12":[138.86,577.03],"6-63-26":[242.09,1303.84],"6-63-27":[216.62,572.26],"5-31-13":[216.62,1303.84],"4-15-6":[54.15,1303.84],"6-63-28":[63.8,555.42],"6-63-29":[21.37,874.92],"5-31-14":[15.13,874.92],"6-63-30":[-6.39,370.77],"6-63-31":[16.48,36.2],"5-31-15":[-46.15,370.77],"4-15-7":[-46.15,1965.58],"3-7-3":[-46.15,1965.58],"2-3-1":[-65.14,3969.25],"1-1-0":[-328.06,5809.48],"6-63-32":[17.15,36.78],"6-63-33":[16.29,37.08],"5-31-16":[15.74,38.48],"6-63-34":[12.34,34.98],"6-63-35":[10.7,28.64],"5-31-17":[10.7,34.98],"4-15-8":[10.7,40.1],"6-63-36":[11.05,26.16],"6-63-37":[12.72,29.22],"5-31-18":[11.05,29.22],"6-63-38":[13.43,32.73],"6-63-39":[14.75,35.32],"5-31-19":[12.65,35.32],"4-15-9":[-99.67,814.4],"3-7-4":[-99.67,864.67],"6-63-40":[15.89,39.67],"6-63-41":[17.66,41.82],"5-31-20":[13.65,41.82],"6-63-42":[18.18,43.48],"6-63-43":[17.22,42.55],"5-31-21":[16.17,43.48],"4-15-10":[12.34,43.48],"6-63-44":[15.94,39.03],"6-63-45":[15.92,35.62],"5-31-22":[15.92,40.32],"6-63-46":[17.78,43.75],"6-63-47":[19.65,46.9],"5-31-23":[17.78,49.26],"4-15-11":[6.47,931.45],"3-7-5":[-4.64,2060.11],"2-3-2":[-170.49,2863.35],"6-63-48":[22.32,46.83],"6-63-49":[23.17,52.87],"5-31-24":[22.32,54.94],"6-63-50":[25.95,55.44],"6-63-51":[24.74,55.59],"5-31-25":[24.74,56.37],"4-15-12":[22.32,56.45],"6-63-52":[17.56,49.36],"6-63-53":[13.06,33.43],"5-31-26":[13.06,50.79],"6-63-54":[11.45,27.14],"6-63-55":[10.4,26.46],"5-31-27":[9.91,27.14],"4-15-13":[7.29,50.82],"3-7-6":[6.16,56.45],"6-63-56":[8.78,27.93],"6-63-57":[10.28,2064.74],"5-31-28":[8.78,2479.23],"6-63-58":[6.29,2924.47],"6-63-59":[-4.17,2804.3],"5-31-29":[-4.17,2924.47],"4-15-14":[-4.17,2924.47],"6-63-60":[-10.23,2430.85],"6-63-61":[-15.15,2498.87],"5-31-30":[-15.15,2498.87],"6-63-62":[-22.79,2597.05],"6-63-63":[-29.54,2749.47],"5-31-31":[-29.54,2749.47],"4-15-15":[-29.54,2749.47],"3-7-7":[-29.54,2924.47],"2-3-3":[-47.53,2924.47],"1-1-1":[-269.44,6969.13],"0-0-0":[-328.06,6969.13],"6-64-0":[13.6,37.78],"6-64-1":[19.72,53.59],"6-64-2":[26.6,62.89],"6-64-3":[31.41,76.27],"6-64-4":[36.86,86.28],"6-64-5":[42.7,96.99],"6-64-6":[47,101.29],"6-64-7":[46.73,97.64],"6-64-8":[45.83,101.59],"6-64-9":[45.04,100.52],"6-64-10":[45.18,100.56],"6-64-11":[44.21,95.58],"6-64-12":[41.57,93.35],"6-64-13":[34.37,320.14],"6-64-14":[39.88,478.36],"6-64-15":[62.72,1880.44],"6-64-16":[53.23,3439.27],"6-64-17":[36.39,2431.2],"6-64-18":[43.43,942.66],"6-64-19":[44.68,1847.74],"6-64-20":[490.98,1993.84],"6-64-21":[201.86,739.39],"6-64-22":[138.19,750.53],"6-64-23":[240.33,1166.19],"6-64-24":[334.09,962.42],"6-64-25":[276.69,863.32],"6-64-26":[184.15,556.46],"6-64-27":[168.62,439.96],"6-64-28":[61.71,880.1],"6-64-29":[-17.91,1022.44],"6-64-30":[14.82,41.3],"6-64-31":[15.22,34.38],"6-64-32":[16.21,36.77],"6-64-33":[11.49,36.62],"6-64-34":[9.51,33.23],"6-64-35":[9.43,23.73],"6-64-36":[10.62,24.95],"6-64-37":[12.53,29.78],"6-64-38":[14.73,33.26],"6-64-39":[16.29,40.92],"6-64-40":[19.97,44.49],"6-64-41":[19.97,48.03],"6-64-42":[20.9,49.27],"6-64-43":[20.23,48.27],"6-64-44":[16.76,40.95],"6-64-45":[16.76,37.18],"6-64-46":[18.63,43.85],"6-64-47":[20.07,44.45],"6-64-48":[21.17,45.85],"6-64-49":[22.33,51.91],"6-64-50":[24.99,54.93],"6-64-51":[23.66,55.36],"6-64-52":[17.25,48.1],"6-64-53":[13.73,33.44],"6-64-54":[13.39,34.01],"6-64-55":[11.02,33.97],"6-64-56":[10.25,28.87],"6-64-57":[11.81,2706.61],"6-64-58":[6.29,2970.03],"6-64-59":[-4.17,2947.12],"6-64-60":[-10.23,2543.75],"6-64-61":[-15.15,2526.16],"6-64-62":[-22.79,2618.03],"6-64-63":[-29.54,2752.45],"6-65-0":[13.6,37.81],"6-65-1":[19.76,53.09],"5-32-0":[13.6,53.59],"6-65-2":[26.31,62.46],"6-65-3":[31.01,77.1],"5-32-1":[26.31,77.1],"6-65-4":[38.18,84.8],"6-65-5":[42.64,95.66],"5-32-2":[36.86,96.99],"6-65-6":[44.99,96.88],"6-65-7":[43.49,94.7],"5-32-3":[43.49,101.29],"6-65-8":[42.8,94.18],"6-65-9":[35.63,935.72],"5-32-4":[35.63,935.72],"6-65-10":[20.82,1428.23],"6-65-11":[40.95,136.3],"5-32-5":[20.82,1428.23],"6-65-12":[36.37,88.77],"6-65-13":[-46.66,286.33],"5-32-6":[-46.66,320.14],"6-65-14":[-132.68,643.32],"6-65-15":[137.99,2274.24],"5-32-7":[-132.68,2274.24],"6-65-16":[38.05,2373.31],"6-65-17":[38.96,1377.73],"5-32-8":[36.39,3439.27],"6-65-18":[41.7,1623.57],"6-65-19":[89.48,2161.99],"5-32-9":[41.7,2161.99],"6-65-20":[100.21,941.46],"6-65-21":[185.69,739.39],"5-32-10":[100.21,1993.84],"6-65-22":[257.46,1758.12],"6-65-23":[380.48,2914.18],"5-32-11":[138.19,2914.18],"6-65-24":[426.07,1308.02],"6-65-25":[280.09,733.03],"5-32-12":[276.69,1308.02],"6-65-26":[222.19,683.02],"6-65-27":[143.28,527.99],"5-32-13":[143.28,683.02],"6-65-28":[62.64,650.86],"6-65-29":[-15.66,1095.61],"5-32-14":[-17.91,1095.61],"6-65-30":[-13.75,66.62],"6-65-31":[14.48,33.9],"5-32-15":[-13.75,66.62],"6-65-32":[-19.14,391.88],"6-65-33":[8.66,29.85],"5-32-16":[-19.14,391.88],"6-65-34":[8.35,21.97],"6-65-35":[8.94,22.61],"5-32-17":[8.35,33.23],"6-65-36":[10.62,25.98],"6-65-37":[12.58,30.79],"5-32-18":[10.62,30.79],"6-65-38":[14.93,37.7],"6-65-39":[17.15,49.91],"5-32-19":[14.73,49.91],"6-65-40":[20.87,54.91],"6-65-41":[22.64,56],"5-32-20":[19.97,56],"6-65-42":[22.51,51.03],"6-65-43":[20.23,46.2],"5-32-21":[20.23,51.03],"6-65-44":[17.99,42.51],"6-65-45":[17.84,41.99],"5-32-22":[16.76,42.51],"6-65-46":[18.63,42.48],"6-65-47":[19.73,46.07],"5-32-23":[18.63,46.07],"6-65-48":[21.17,46.4],"6-65-49":[22.33,50.98],"5-32-24":[21.17,51.91],"6-65-50":[24.64,53.8],"6-65-51":[11.85,778.86],"5-32-25":[11.85,778.86],"6-65-52":[17.24,47.71],"6-65-53":[14.74,34.75],"5-32-26":[13.73,48.1],"6-65-54":[14.81,35.37],"6-65-55":[11.99,34.42],"5-32-27":[11.02,35.37],"6-65-56":[10.65,29.79],"6-65-57":[13.9,3054.91],"5-32-28":[10.25,3054.91],"6-65-58":[2706.6,3100.96],"6-65-59":[2543.75,3103.71],"5-32-29":[-4.17,3103.71],"6-65-60":[2255.43,2692.57],"6-65-61":[2248.98,2548.45],"5-32-30":[-15.15,2692.57],"6-65-62":[2526.15,2639.22],"6-65-63":[-29.54,2753.44],"5-32-31":[-29.54,2753.44],"6-66-0":[13.6,37.83],"6-66-1":[19.78,52.14],"6-66-2":[25.64,63.1],"6-66-3":[31.05,77.42],"6-66-4":[38.55,84.66],"6-66-5":[41.57,92.58],"6-66-6":[43.18,93.1],"6-66-7":[40.62,90.09],"6-66-8":[40.54,87.08],"6-66-9":[20.94,2049.01],"6-66-10":[19.29,2462.53],"6-66-11":[4.23,1233.38],"6-66-12":[30.98,117],"6-66-13":[-180.54,876.36],"6-66-14":[90.73,1537.53],"6-66-15":[147.78,4840.9],"6-66-16":[39.23,4069.35],"6-66-17":[43.9,838.48],"6-66-18":[39.99,1553.78],"6-66-19":[-16.37,2250.36],"6-66-20":[30.28,336.76],"6-66-21":[186.56,611.03],"6-66-22":[377.14,1857.82],"6-66-23":[773.49,2746.4],"6-66-24":[408.81,1769.87],"6-66-25":[324.43,1672.93],"6-66-26":[317.13,774.79],"6-66-27":[281.36,874.43],"6-66-28":[46.87,1294.91],"6-66-29":[5.32,816.36],"6-66-30":[-26.99,431.08],"6-66-31":[-28.03,2007.45],"6-66-32":[7.57,607.86],"6-66-33":[6.06,24.36],"6-66-34":[7.09,17.3],"6-66-35":[8.79,26.37],"6-66-36":[11.61,28.98],"6-66-37":[13.1,31.91],"6-66-38":[15.69,39.68],"6-66-39":[19.55,50.83],"6-66-40":[22.63,56.5],"6-66-41":[24.02,57.13],"6-66-42":[22.8,49.96],"6-66-43":[22.8,49.11],"6-66-44":[20.77,46.17],"6-66-45":[20.77,46.35],"6-66-46":[21.39,48.2],"6-66-47":[21.39,49.68],"6-66-48":[23.35,51.88],"6-66-49":[23.35,52.26],"6-66-50":[25.43,54.25],"6-66-51":[21.38,55.21],"6-66-52":[17.56,44.14],"6-66-53":[17.56,39.22],"6-66-54":[17.07,39.22],"6-66-55":[14.68,33.84],"6-66-56":[12.76,30.48],"6-66-57":[13.3,3138.57],"6-66-58":[3003.04,3267.05],"6-66-59":[2692.56,3207.22],"6-66-60":[2381.28,2800.27],"6-66-61":[2355.2,2565.62],"6-66-62":[2548.44,2666.15],"6-66-63":[-29.54,2755.44],"6-67-0":[13.6,37.79],"6-67-1":[19.71,51.23],"5-33-0":[13.6,52.14],"6-67-2":[25.62,63.16],"6-67-3":[30.33,786.22],"5-33-1":[25.62,786.22],"4-16-0":[13.6,786.22],"6-67-4":[37.26,946.45],"6-67-5":[39.53,88.35],"5-33-2":[37.26,946.45],"6-67-6":[40.82,88.5],"6-67-7":[39.27,85.5],"5-33-3":[39.27,93.1],"4-16-1":[36.86,946.45],"6-67-8":[31.58,197.75],"6-67-9":[20.72,2315.19],"5-33-4":[20.72,2315.19],"6-67-10":[28.83,2472.36],"6-67-11":[32.5,847.8],"5-33-5":[4.23,2472.36],"4-16-2":[4.23,2472.36],"6-67-12":[-50.52,217.69],"6-67-13":[33.14,1186.21],"5-33-6":[-180.54,1186.21],"6-67-14":[128.81,1069.93],"6-67-15":[40.08,4029.26],"5-33-7":[40.08,4840.9],"4-16-3":[-180.54,4840.9],"6-67-16":[38.15,2694.01],"6-67-17":[43.45,2374.38],"5-33-8":[38.15,4069.35],"6-67-18":[34.1,1143.75],"6-67-19":[27.14,1413.3],"5-33-9":[-16.37,2250.36],"4-16-4":[-16.37,4069.35],"6-67-20":[23.52,728.47],"6-67-21":[219.62,762.97],"5-33-10":[23.52,762.97],"6-67-22":[420.92,1483.6],"6-67-23":[607.73,1924.9],"5-33-11":[377.14,2746.4],"4-16-5":[23.52,2914.18],"6-67-24":[396.41,1977.29],"6-67-25":[374.52,2023.83],"5-33-12":[324.43,2023.83],"6-67-26":[327.64,714.89],"6-67-27":[323.67,784.44],"5-33-13":[281.36,874.43],"4-16-6":[143.28,2023.83],"6-67-28":[100.15,1784.96],"6-67-29":[31.38,3028.39],"5-33-14":[5.32,3028.39],"6-67-30":[-10.88,4049.43],"6-67-31":[-22.22,1231.48],"5-33-15":[-28.03,4049.43],"4-16-7":[-28.03,4049.43],"6-67-32":[-63.62,953.44],"6-67-33":[-6.6,932.44],"5-33-16":[-63.62,953.44],"6-67-34":[7.15,22.92],"6-67-35":[9.03,31.46],"5-33-17":[7.09,31.46],"4-16-8":[-63.62,953.44],"6-67-36":[13.46,35.43],"6-67-37":[14.74,42.09],"5-33-18":[11.61,42.09],"6-67-38":[16.09,47],"6-67-39":[20.85,47.74],"5-33-19":[15.69,50.83],"4-16-9":[10.62,50.83],"6-67-40":[22.3,48.5],"6-67-41":[23.96,51.6],"5-33-20":[22.3,57.13],"6-67-42":[24.8,52.66],"6-67-43":[23.02,51.42],"5-33-21":[22.8,52.66],"4-16-10":[19.97,57.13],"6-67-44":[22.69,50.41],"6-67-45":[22.33,50.5],"5-33-22":[20.77,50.5],"6-67-46":[22.35,53.75],"6-67-47":[24.22,55.21],"5-33-23":[21.39,55.21],"4-16-11":[16.76,55.21],"6-67-48":[24.66,54.21],"6-67-49":[23.85,53.66],"5-33-24":[23.35,54.21],"6-67-50":[25.43,58.28],"6-67-51":[21.38,55.28],"5-33-25":[21.38,58.28],"4-16-12":[11.85,778.86],"6-67-52":[18.43,43.35],"6-67-53":[18.43,44.37],"5-33-26":[17.56,44.37],"6-67-54":[17.07,44.32],"6-67-55":[14.72,36.1],"5-33-27":[14.68,44.32],"4-16-13":[11.02,48.1],"6-67-56":[12.67,32.07],"6-67-57":[11.97,3175.51],"5-33-28":[11.97,3175.51],"6-67-58":[3138.56,3414.15],"6-67-59":[2800.26,3300.16],"5-33-29":[2692.56,3414.15],"4-16-14":[-4.17,3414.15],"6-67-60":[2458.67,2920.73],"6-67-61":[2439.79,2579.65],"5-33-30":[2355.2,2920.73],"6-67-62":[2565.61,2681.47],"6-67-63":[-29.54,2759.37],"5-33-31":[-29.54,2759.37],"4-16-15":[-29.54,2920.73],"6-68-0":[13.6,37.69],"6-68-1":[19.57,50.91],"6-68-2":[25.25,62.3],"6-68-3":[29.49,1385.65],"6-68-4":[33.18,1035.73],"6-68-5":[38.99,85.09],"6-68-6":[39.15,85.09],"6-68-7":[15.05,1058.54],"6-68-8":[9.73,1750.98],"6-68-9":[19.45,1810.17],"6-68-10":[36.63,1715.33],"6-68-11":[31.96,400.65],"6-68-12":[-23.11,248.2],"6-68-13":[-7.79,988.47],"6-68-14":[94.57,1845.84],"6-68-15":[33.77,3777.17],"6-68-16":[31.24,2893.68],"6-68-17":[26.5,2503.27],"6-68-18":[-23.32,2005.15],"6-68-19":[31.76,209.56],"6-68-20":[27.57,965.23],"6-68-21":[218.9,1068.73],"6-68-22":[308.04,1178.67],"6-68-23":[533.61,1310.69],"6-68-24":[378.5,1156.09],"6-68-25":[344.83,602.11],"6-68-26":[267.07,715.39],"6-68-27":[261.24,609.87],"6-68-28":[128.64,1857.59],"6-68-29":[216.86,2461.39],"6-68-30":[390.81,1585.63],"6-68-31":[140.91,1076.94],"6-68-32":[52.66,1044.68],"6-68-33":[-17.85,885.8],"6-68-34":[-25.08,923.81],"6-68-35":[-3.35,613.65],"6-68-36":[-2.05,2521.11],"6-68-37":[-19.61,2407.1],"6-68-38":[-21.61,2094.46],"6-68-39":[-59.49,1680.35],"6-68-40":[23.13,60.77],"6-68-41":[24.24,62.61],"6-68-42":[25.75,60.9],"6-68-43":[25.75,56.47],"6-68-44":[24.76,52.16],"6-68-45":[24.76,57.31],"6-68-46":[26.02,57.32],"6-68-47":[26.76,56.45],"6-68-48":[26.26,55.86],"6-68-49":[26.26,59.36],"6-68-50":[26.82,62.99],"6-68-51":[23.62,56.76],"6-68-52":[20.02,46.58],"6-68-53":[20.02,47.69],"6-68-54":[18.37,47.1],"6-68-55":[15.04,38.61],"6-68-56":[12.83,47.95],"6-68-57":[11.4,3169.81],"6-68-58":[3108.39,3460.36],"6-68-59":[2920.72,3384.4],"6-68-60":[2494.45,3077.24],"6-68-61":[2482.53,2588.56],"6-68-62":[2579.64,2693.73],"6-68-63":[-29.54,2763.36],"6-69-0":[13.6,37.44],"6-69-1":[19.4,50.44],"5-34-0":[13.6,50.91],"6-69-2":[25.03,60.03],"6-69-3":[29.14,1634.3],"5-34-1":[25.03,1634.3],"6-69-4":[31.42,1233.17],"6-69-5":[35.11,82.7],"5-34-2":[31.42,1233.17],"6-69-6":[35.26,81.82],"6-69-7":[6.63,1592.64],"5-34-3":[6.63,1592.64],"6-69-8":[4.87,1958.98],"6-69-9":[47.04,1310.43],"5-34-4":[4.87,1958.98],"6-69-10":[25.33,797.68],"6-69-11":[26.18,411.97],"5-34-5":[25.33,1715.33],"6-69-12":[19.39,280.51],"6-69-13":[17.14,1624.81],"5-34-6":[-23.11,1624.81],"6-69-14":[154.38,1918.97],"6-69-15":[39.77,2548.59],"5-34-7":[33.77,3777.17],"6-69-16":[16.47,1992.85],"6-69-17":[37.95,2820.36],"5-34-8":[16.47,2893.68],"6-69-18":[29.13,3340.97],"6-69-19":[28.62,288.67],"5-34-9":[-23.32,3340.97],"6-69-20":[9.01,392.95],"6-69-21":[69.58,877.11],"5-34-10":[9.01,1068.73],"6-69-22":[310.38,889.96],"6-69-23":[406.17,1202.42],"5-34-11":[308.04,1310.69],"6-69-24":[27.24,3331.17],"6-69-25":[184,850],"5-34-12":[27.24,3331.17],"6-69-26":[148.07,439.62],"6-69-27":[260.59,551.37],"5-34-13":[148.07,715.39],"6-69-28":[213.54,1124.79],"6-69-29":[275.12,1747.94],"5-34-14":[128.64,2461.39],"6-69-30":[354.28,1070.44],"6-69-31":[276.49,830.16],"5-34-15":[140.91,1585.63],"6-69-32":[252.96,879.81],"6-69-33":[167.87,929.4],"5-34-16":[-17.85,1044.68],"6-69-34":[256.14,1488.2],"6-69-35":[12.55,2127.16],"5-34-17":[-25.08,2127.16],"6-69-36":[166.21,2639.31],"6-69-37":[859.22,2023.5],"5-34-18":[-19.61,2639.31],"6-69-38":[730.14,1749.24],"6-69-39":[10.84,2585.59],"5-34-19":[-59.49,2585.59],"6-69-40":[-162.31,2386.26],"6-69-41":[-159.88,2015.68],"5-34-20":[-162.31,2386.26],"6-69-42":[18.98,704.83],"6-69-43":[26.09,62.3],"5-34-21":[18.98,704.83],"6-69-44":[25.43,58.48],"6-69-45":[25.82,55.17],"5-34-22":[24.76,58.48],"6-69-46":[26.02,58.49],"6-69-47":[27.55,60.1],"5-34-23":[26.02,60.1],"6-69-48":[27.02,60.61],"6-69-49":[27.99,64.2],"5-34-24":[26.26,64.2],"6-69-50":[29.22,67.45],"6-69-51":[23.62,62.15],"5-34-25":[23.62,67.45],"6-69-52":[21.62,53.1],"6-69-53":[22.44,49.65],"5-34-26":[20.02,53.1],"6-69-54":[19.27,47.76],"6-69-55":[15.24,39.44],"5-34-27":[15.04,47.76],"6-69-56":[14.46,300.15],"6-69-57":[14.89,3108.4],"5-34-28":[11.4,3169.81],"6-69-58":[3052.07,3514.26],"6-69-59":[3077.23,3446.22],"5-34-29":[2920.72,3514.26],"6-69-60":[2544.2,3147.37],"6-69-61":[2511.13,2608.3],"5-34-30":[2482.53,3147.37],"6-69-62":[2588.55,2704.02],"6-69-63":[-29.54,2767.34],"5-34-31":[-29.54,2767.34],"6-70-0":[13.6,37.16],"6-70-1":[19.22,49.87],"6-70-2":[24.52,56.84],"6-70-3":[28.6,1635.74],"6-70-4":[29.16,1193.37],"6-70-5":[30.17,441.82],"6-70-6":[29.72,72.1],"6-70-7":[12.72,2122.75],"6-70-8":[199.39,2096.53],"6-70-9":[20.3,735.36],"6-70-10":[18.93,350.95],"6-70-11":[-25.11,119.82],"6-70-12":[22.14,358.72],"6-70-13":[35.6,462.61],"6-70-14":[142.49,2057.45],"6-70-15":[100,1043.38],"6-70-16":[27.8,2489.77],"6-70-17":[24.67,2049.01],"6-70-18":[22.69,753.24],"6-70-19":[22.41,59.3],"6-70-20":[23.96,142.33],"6-70-21":[-25.04,490.94],"6-70-22":[198.02,1063.16],"6-70-23":[343.56,1540.59],"6-70-24":[27.16,3468.04],"6-70-25":[108.1,1729.27],"6-70-26":[121.91,428.48],"6-70-27":[274.16,1624.07],"6-70-28":[322.1,1063.08],"6-70-29":[354.64,767.3],"6-70-30":[305.29,833.8],"6-70-31":[254.18,533.95],"6-70-32":[223.98,448.91],"6-70-33":[192.31,886.28],"6-70-34":[403.12,1242.7],"6-70-35":[605.84,1757.04],"6-70-36":[1116.78,1831.76],"6-70-37":[1104.79,1687.18],"6-70-38":[1028.6,2162.84],"6-70-39":[1184.99,2171.43],"6-70-40":[1018.03,2505.72],"6-70-41":[47.81,2222.4],"6-70-42":[7.61,1720.53],"6-70-43":[18.25,2268.67],"6-70-44":[2.17,2017.39],"6-70-45":[26.72,58.31],"6-70-46":[27.58,59.46],"6-70-47":[29.09,64.51],"6-70-48":[29.91,64.57],"6-70-49":[29.84,67.11],"6-70-50":[31.81,70.73],"6-70-51":[27.49,66.41],"6-70-52":[24.04,57.39],"6-70-53":[24.04,50.76],"6-70-54":[19.07,48.88],"6-70-55":[15.38,38.05],"6-70-56":[14,268.92],"6-70-57":[15.56,3052.08],"6-70-58":[2944.42,3536.78],"6-70-59":[3147.36,3480.29],"6-70-60":[2608.29,3239.33],"6-70-61":[2539.62,2709.23],"6-70-62":[2602.1,2724.91],"6-70-63":[-29.54,2768.65],"6-71-0":[13.6,36.76],"6-71-1":[19.1,48.94],"5-35-0":[13.6,49.87],"6-71-2":[24.15,54.01],"6-71-3":[27.72,709.89],"5-35-1":[24.15,1635.74],"4-17-0":[13.6,1635.74],"6-71-4":[28.01,684.19],"6-71-5":[27.24,62.75],"5-35-2":[27.24,1193.37],"6-71-6":[19.67,948.29],"6-71-7":[4.84,1854.14],"5-35-3":[4.84,2122.75],"4-17-1":[4.84,2122.75],"3-8-0":[4.84,2122.75],"6-71-8":[19.05,851.76],"6-71-9":[17.77,511.56],"5-35-4":[17.77,2096.53],"6-71-10":[17.31,158.69],"6-71-11":[17.94,214.15],"5-35-5":[-25.11,350.95],"4-17-2":[-25.11,2096.53],"6-71-12":[11.89,342.67],"6-71-13":[80.4,644.43],"5-35-6":[11.89,644.43],"6-71-14":[118.41,2648.45],"6-71-15":[68.74,1842.42],"5-35-7":[68.74,2648.45],"4-17-3":[-23.11,3777.17],"3-8-1":[-180.54,4840.9],"6-71-16":[65.18,2700.03],"6-71-17":[23.06,2930.53],"5-35-8":[23.06,2930.53],"6-71-18":[13.5,2524.92],"6-71-19":[8.99,1090.39],"5-35-9":[8.99,2524.92],"4-17-4":[-23.32,3340.97],"6-71-20":[18.37,903.81],"6-71-21":[-31.98,311.99],"5-35-10":[-31.98,903.81],"6-71-22":[94.19,388.14],"6-71-23":[273.49,1038.12],"5-35-11":[94.19,1540.59],"4-17-5":[-31.98,1540.59],"3-8-2":[-31.98,4069.35],"6-71-24":[452.55,932.86],"6-71-25":[308.29,1368.77],"5-35-12":[27.16,3468.04],"6-71-26":[326.68,1327.69],"6-71-27":[373.83,1212.84],"5-35-13":[121.91,1624.07],"4-17-6":[27.16,3468.04],"6-71-28":[371.4,934.47],"6-71-29":[382.62,935.02],"5-35-14":[322.1,1063.08],"6-71-30":[291.34,761.73],"6-71-31":[282.28,549.06],"5-35-15":[254.18,833.8],"4-17-7":[128.64,2461.39],"3-8-3":[-28.03,4049.43],"6-71-32":[271.34,592.5],"6-71-33":[253.5,758.09],"5-35-16":[192.31,886.28],"6-71-34":[404.13,1099.25],"6-71-35":[753.17,1385.35],"5-35-17":[403.12,1757.04],"4-17-8":[-25.08,2127.16],"6-71-36":[1050.78,1507.74],"6-71-37":[1011.55,1380.25],"5-35-18":[1011.55,1831.76],"6-71-38":[960.55,1371.66],"6-71-39":[940.67,1497.56],"5-35-19":[940.67,2171.43],"4-17-9":[-59.49,2639.31],"3-8-4":[-63.62,2639.31],"6-71-40":[991.87,1399.38],"6-71-41":[722.23,1582.99],"5-35-20":[47.81,2505.72],"6-71-42":[427.66,1667.49],"6-71-43":[142.44,2341.81],"5-35-21":[7.61,2341.81],"4-17-10":[-162.31,2505.72],"6-71-44":[-5.94,1732.68],"6-71-45":[27.22,59.84],"5-35-22":[-5.94,2017.39],"6-71-46":[29.17,63.24],"6-71-47":[30.14,66.91],"5-35-23":[27.58,66.91],"4-17-11":[-5.94,2017.39],"3-8-5":[-162.31,2505.72],"6-71-48":[31.75,66.91],"6-71-49":[32.11,69.56],"5-35-24":[29.84,69.56],"6-71-50":[33.7,73.57],"6-71-51":[28.8,72.3],"5-35-25":[27.49,73.57],"4-17-12":[23.62,73.57],"6-71-52":[25.57,60.85],"6-71-53":[24.42,53.17],"5-35-26":[24.04,60.85],"6-71-54":[19.18,48.85],"6-71-55":[15.38,38.12],"5-35-27":[15.38,48.88],"4-17-13":[15.04,60.85],"3-8-6":[11.02,778.86],"6-71-56":[14.98,187.97],"6-71-57":[15.79,2944.43],"5-35-28":[14,3052.08],"6-71-58":[2840.08,3600.93],"6-71-59":[3239.32,3598.47],"5-35-29":[2840.08,3600.93],"4-17-14":[11.4,3600.93],"6-71-60":[2709.22,3295.33],"6-71-61":[2568.24,2810.96],"5-35-30":[2539.62,3295.33],"6-71-62":[2621.33,2751.92],"6-71-63":[-29.54,2771.32],"5-35-31":[-29.54,2771.32],"4-17-15":[-29.54,3295.33],"3-8-7":[-29.54,3600.93],"6-72-0":[13.6,36.49],"6-72-1":[19.01,48.14],"6-72-2":[23.6,52.85],"6-72-3":[25.14,753.17],"6-72-4":[25.05,528.08],"6-72-5":[22.7,56.98],"6-72-6":[22.55,1086.58],"6-72-7":[21.13,1167.12],"6-72-8":[17.66,435.24],"6-72-9":[17.52,286.65],"6-72-10":[15.17,241.92],"6-72-11":[12.2,275.13],"6-72-12":[29.06,318.56],"6-72-13":[28.38,382.74],"6-72-14":[135.43,1998.12],"6-72-15":[147.15,2540.92],"6-72-16":[49.82,2847.57],"6-72-17":[30.85,2950.99],"6-72-18":[21.06,2427.62],"6-72-19":[7.76,2464.23],"6-72-20":[7.73,425.6],"6-72-21":[-11.66,284.94],"6-72-22":[88.27,639.17],"6-72-23":[289.98,1107.43],"6-72-24":[470.56,1912.86],"6-72-25":[498.02,1340.77],"6-72-26":[593.56,1710.7],"6-72-27":[454.32,3017.52],"6-72-28":[444.14,1371.36],"6-72-29":[477.29,1047.83],"6-72-30":[352.38,768.89],"6-72-31":[319.72,630.52],"6-72-32":[322.07,733.63],"6-72-33":[332.54,807.65],"6-72-34":[430.54,1119.46],"6-72-35":[723.96,1534.31],"6-72-36":[1022.28,1643.41],"6-72-37":[961.73,1249.5],"6-72-38":[916.89,1116.92],"6-72-39":[892.54,1255.26],"6-72-40":[958.51,1498.79],"6-72-41":[975.82,1901.6],"6-72-42":[928.72,1783.15],"6-72-43":[77.74,2501.84],"6-72-44":[12.69,1649.02],"6-72-45":[28,66.27],"6-72-46":[29.82,70.25],"6-72-47":[32.16,68.24],"6-72-48":[32.45,66.93],"6-72-49":[32.5,71.41],"6-72-50":[34.78,76.35],"6-72-51":[30.32,73.61],"6-72-52":[26.6,61.36],"6-72-53":[24.54,54.43],"6-72-54":[19.54,49.25],"6-72-55":[15.45,38.72],"6-72-56":[15.31,41.8],"6-72-57":[21.91,3236.81],"6-72-58":[2872.27,3666.27],"6-72-59":[3295.32,3666.27],"6-72-60":[2810.95,3378.93],"6-72-61":[2625.94,2968.07],"6-72-62":[2649.64,2779.15],"6-72-63":[-29.54,2774.31],"6-73-0":[13.6,36.21],"6-73-1":[18.97,47.61],"5-36-0":[13.6,48.14],"6-73-2":[22.99,49.57],"6-73-3":[23.45,674.04],"5-36-1":[22.99,753.17],"6-73-4":[23.04,204.98],"6-73-5":[22,51.05],"5-36-2":[22,528.08],"6-73-6":[18.61,696.6],"6-73-7":[22.39,1083.56],"5-36-3":[18.61,1167.12],"6-73-8":[17.69,559.12],"6-73-9":[46.96,398.6],"5-36-4":[17.52,559.12],"6-73-10":[10.3,258.06],"6-73-11":[18.42,338.7],"5-36-5":[10.3,338.7],"6-73-12":[21.07,371.65],"6-73-13":[119.02,309.64],"5-36-6":[21.07,382.74],"6-73-14":[82.56,1369.76],"6-73-15":[13.61,2520.59],"5-36-7":[13.61,2540.92],"6-73-16":[28.54,1559.76],"6-73-17":[28.77,1798.35],"5-36-8":[28.54,2950.99],"6-73-18":[23.18,2185.74],"6-73-19":[-52.99,2137.5],"5-36-9":[-52.99,2464.23],"6-73-20":[1.3,266.06],"6-73-21":[-117.56,282.94],"5-36-10":[-117.56,425.6],"6-73-22":[27.75,574.35],"6-73-23":[275.3,1131.98],"5-36-11":[27.75,1131.98],"6-73-24":[280.09,1082.02],"6-73-25":[366.24,841.26],"5-36-12":[280.09,1912.86],"6-73-26":[428.45,2020.89],"6-73-27":[423.73,1156.65],"5-36-13":[423.73,3017.52],"6-73-28":[386.96,960.04],"6-73-29":[394.88,977.62],"5-36-14":[386.96,1371.36],"6-73-30":[497.33,946.04],"6-73-31":[366.87,1103.17],"5-36-15":[319.72,1103.17],"6-73-32":[379.78,1540.39],"6-73-33":[413.29,1685.26],"5-36-16":[322.07,1685.26],"6-73-34":[504.55,1701.66],"6-73-35":[515.18,1902.71],"5-36-17":[430.54,1902.71],"6-73-36":[935.23,1683.01],"6-73-37":[473.44,1546.43],"5-36-18":[473.44,1683.01],"6-73-38":[414.32,1440.16],"6-73-39":[758.78,1496.99],"5-36-19":[414.32,1496.99],"6-73-40":[770.57,2110.34],"6-73-41":[993.88,1898.28],"5-36-20":[770.57,2110.34],"6-73-42":[1210.08,3126.88],"6-73-43":[4.71,2790.11],"5-36-21":[4.71,3126.88],"6-73-44":[11.68,321.06],"6-73-45":[28.82,68.52],"5-36-22":[11.68,1649.02],"6-73-46":[33.04,71.86],"6-73-47":[33.1,68.84],"5-36-23":[29.82,71.86],"6-73-48":[32.88,69.45],"6-73-49":[33.33,74.64],"5-36-24":[32.45,74.64],"6-73-50":[35.38,76.55],"6-73-51":[30.59,74.13],"5-36-25":[30.32,76.55],"6-73-52":[27.68,63.59],"6-73-53":[24.54,58.28],"5-36-26":[24.54,63.59],"6-73-54":[20.07,51.54],"6-73-55":[15.99,40.58],"5-36-27":[15.45,51.54],"6-73-56":[15.99,41.88],"6-73-57":[19.59,3236.81],"5-36-28":[15.31,3236.81],"6-73-58":[2976.86,3671.29],"6-73-59":[3378.92,3685.99],"5-36-29":[2872.27,3685.99],"6-73-60":[2968.06,3441.2],"6-73-61":[2691.68,3024.01],"5-36-30":[2625.94,3441.2],"6-73-62":[2691.68,2818.12],"6-73-63":[-29.54,2780.49],"5-36-31":[-29.54,2818.12],"6-74-0":[13.6,36.07],"6-74-1":[18.96,46.86],"6-74-2":[22.03,47],"6-74-3":[20.96,289.51],"6-74-4":[19.84,46.66],"6-74-5":[17.55,45.75],"6-74-6":[11.97,739.68],"6-74-7":[14.65,736.85],"6-74-8":[-6.7,3219.23],"6-74-9":[-7.7,401.9],"6-74-10":[-74.06,523.35],"6-74-11":[30.86,314.28],"6-74-12":[121.32,307.64],"6-74-13":[94.68,347.09],"6-74-14":[53.31,387.19],"6-74-15":[16.89,488.72],"6-74-16":[26.92,429.54],"6-74-17":[0.6,2570.69],"6-74-18":[-38.2,3075.92],"6-74-19":[2.74,3021.97],"6-74-20":[2.74,110.17],"6-74-21":[-52.61,355.67],"6-74-22":[11.08,602.67],"6-74-23":[11.91,551.02],"6-74-24":[164.06,713.34],"6-74-25":[187.45,639.47],"6-74-26":[300.4,1130.48],"6-74-27":[439.11,1410.14],"6-74-28":[346.35,1323.82],"6-74-29":[356.78,738.69],"6-74-30":[452.9,1580.59],"6-74-31":[534,5024.49],"6-74-32":[645.87,4495.21],"6-74-33":[625.99,3461],"6-74-34":[590.29,2489.57],"6-74-35":[742.27,1708.52],"6-74-36":[432.19,1881.89],"6-74-37":[298.55,1739.34],"6-74-38":[466.8,1752.71],"6-74-39":[255.5,1623.82],"6-74-40":[350.82,2352.72],"6-74-41":[677.23,2369.87],"6-74-42":[12.4,3510.35],"6-74-43":[4.61,2075.35],"6-74-44":[25.51,57.03],"6-74-45":[28.71,66.1],"6-74-46":[31.87,69.33],"6-74-47":[32.66,69.51],"6-74-48":[33.21,80.25],"6-74-49":[35.21,80.16],"6-74-50":[35.5,79.81],"6-74-51":[31.79,73.11],"6-74-52":[29.44,68],"6-74-53":[26.69,59.41],"6-74-54":[20.92,53.21],"6-74-55":[18.14,42.59],"6-74-56":[17.26,359.2],"6-74-57":[18.72,2976.87],"6-74-58":[2510.84,3667.35],"6-74-59":[3441.19,3732.45],"6-74-60":[3024,3510.17],"6-74-61":[2783.25,3119.66],"6-74-62":[2780.48,2893.13],"6-74-63":[-29.54,2805.44],"6-75-0":[13.6,35.99],"6-75-1":[18.94,45.05],"5-37-0":[13.6,46.86],"6-75-2":[21.42,45.15],"6-75-3":[20.74,291.18],"5-37-1":[20.74,291.18],"4-18-0":[13.6,753.17],"6-75-4":[17.8,41.45],"6-75-5":[17.26,39.32],"5-37-2":[17.26,46.66],"6-75-6":[15.55,177.14],"6-75-7":[15.55,1181.22],"5-37-3":[11.97,1181.22],"4-18-1":[11.97,1181.22],"6-75-8":[16.77,712.47],"6-75-9":[-32.14,4110.39],"5-37-4":[-32.14,4110.39],"6-75-10":[-19.3,318.43],"6-75-11":[30.72,357.76],"5-37-5":[-74.06,523.35],"4-18-2":[-74.06,4110.39],"6-75-12":[140.07,313.84],"6-75-13":[123.47,252.12],"5-37-6":[94.68,347.09],"6-75-14":[-181.36,293.98],"6-75-15":[-133.08,195.69],"5-37-7":[-181.36,488.72],"4-18-3":[-181.36,2540.92],"6-75-16":[12.44,673.31],"6-75-17":[25.7,2438.12],"5-37-8":[0.6,2570.69],"6-75-18":[22.51,3012.55],"6-75-19":[6.7,2342.54],"5-37-9":[-38.2,3075.92],"4-18-4":[-52.99,3075.92],"6-75-20":[8.83,223.67],"6-75-21":[-4.5,1970.91],"5-37-10":[-52.61,1970.91],"6-75-22":[11.16,2002.31],"6-75-23":[78.71,726.15],"5-37-11":[11.08,2002.31],"4-18-5":[-117.56,2002.31],"6-75-24":[172.21,1207.85],"6-75-25":[212.55,942.11],"5-37-12":[164.06,1207.85],"6-75-26":[305.98,740.02],"6-75-27":[352.02,1457.61],"5-37-13":[300.4,1457.61],"4-18-6":[164.06,3017.52],"6-75-28":[354.16,988.64],"6-75-29":[356.57,725.3],"5-37-14":[346.35,1323.82],"6-75-30":[389.82,3166.22],"6-75-31":[594.3,2060.9],"5-37-15":[389.82,5024.49],"4-18-7":[319.72,5024.49],"6-75-32":[1072.57,1787.81],"6-75-33":[1016.16,1756.25],"5-37-16":[625.99,4495.21],"6-75-34":[735.53,2443.31],"6-75-35":[493.17,2943.5],"5-37-17":[493.17,2943.5],"4-18-8":[322.07,4495.21],"6-75-36":[446.63,1864.36],"6-75-37":[93.22,1716.39],"5-37-18":[93.22,1881.89],"6-75-38":[74.67,2583.3],"6-75-39":[57.48,2427.44],"5-37-19":[57.48,2583.3],"4-18-9":[57.48,2583.3],"6-75-40":[-242.83,1442.62],"6-75-41":[-31.19,1914.13],"5-37-20":[-242.83,2369.87],"6-75-42":[2.04,1636.59],"6-75-43":[21.63,58.03],"5-37-21":[2.04,3510.35],"4-18-10":[-242.83,3510.35],"6-75-44":[25.62,61.17],"6-75-45":[29.14,66.22],"5-37-22":[25.51,66.22],"6-75-46":[31.94,69.34],"6-75-47":[33.03,82.96],"5-37-23":[31.87,82.96],"4-18-11":[11.68,1649.02],"6-75-48":[35.18,89.62],"6-75-49":[39.2,86.77],"5-37-24":[33.21,89.62],"6-75-50":[36.6,80.48],"6-75-51":[34.25,78.22],"5-37-25":[31.79,80.48],"4-18-12":[30.32,89.62],"6-75-52":[30.27,72.13],"6-75-53":[26.69,63.45],"5-37-26":[26.69,72.13],"6-75-54":[20.79,54.64],"6-75-55":[18.14,45.98],"5-37-27":[18.14,54.64],"4-18-13":[15.45,72.13],"6-75-56":[18.66,861.26],"6-75-57":[359.19,2787.68],"5-37-28":[17.26,2976.87],"6-75-58":[2576.62,3670.33],"6-75-59":[3510.16,3745.57],"5-37-29":[2510.84,3745.57],"4-18-14":[15.31,3745.57],"6-75-60":[3119.65,3590.97],"6-75-61":[2882.5,3236.16],"5-37-30":[2783.25,3590.97],"6-75-62":[2805.43,2971.57],"6-75-63":[-29.54,2839.82],"5-37-31":[-29.54,2971.57],"4-18-15":[-29.54,3590.97],"6-76-0":[13.6,35.96],"6-76-1":[18.88,43.71],"6-76-2":[20.05,43.82],"6-76-3":[17.55,47.61],"6-76-4":[15.48,38.46],"6-76-5":[14.03,35.52],"6-76-6":[13.19,32.09],"6-76-7":[13.64,1139.05],"6-76-8":[15.76,538.64],"6-76-9":[14.86,306.08],"6-76-10":[21.95,316.75],"6-76-11":[80.98,357.69],"6-76-12":[126.53,332.1],"6-76-13":[34.69,291.25],"6-76-14":[4.45,251.97],"6-76-15":[11.09,721.64],"6-76-16":[16.18,1541.99],"6-76-17":[17.64,2603.85],"6-76-18":[19.98,3897.68],"6-76-19":[14.59,3093.99],"6-76-20":[-398.55,2689.12],"6-76-21":[-349.48,2516.84],"6-76-22":[7.34,2262.38],"6-76-23":[-21.6,1972.68],"6-76-24":[-6.69,2173.07],"6-76-25":[324.79,1591.14],"6-76-26":[356.19,1104.11],"6-76-27":[401.98,2729.65],"6-76-28":[392.01,3267.45],"6-76-29":[375.1,3342.07],"6-76-30":[309.01,2770.25],"6-76-31":[236.85,4305.91],"6-76-32":[545.42,3396.04],"6-76-33":[671.25,3634.02],"6-76-34":[206.1,2462.72],"6-76-35":[230.19,2952.42],"6-76-36":[-18.37,1938.4],"6-76-37":[7.99,2969.88],"6-76-38":[-27.14,1841.51],"6-76-39":[-30.93,319.69],"6-76-40":[-13.74,244.16],"6-76-41":[8.65,35.45],"6-76-42":[14.14,44.71],"6-76-43":[19.2,58.81],"6-76-44":[24.23,61.33],"6-76-45":[27.4,65.6],"6-76-46":[32.33,76.23],"6-76-47":[35.63,92.82],"6-76-48":[41.49,92.94],"6-76-49":[40.23,88.72],"6-76-50":[39.23,85.78],"6-76-51":[36.06,83.62],"6-76-52":[32.25,75.93],"6-76-53":[27.56,65.48],"6-76-54":[22.21,58.44],"6-76-55":[22.21,48.62],"6-76-56":[20.39,1400],"6-76-57":[861.25,2930.46],"6-76-58":[2787.67,3670.26],"6-76-59":[3590.96,3781.61],"6-76-60":[2776.72,3628.25],"6-76-61":[2954.99,3346.55],"6-76-62":[2839.81,3092.47],"6-76-63":[-29.54,2876.01],"6-77-0":[13.6,35.87],"6-77-1":[18.74,42.43],"5-38-0":[13.6,43.71],"6-77-2":[19.64,42.43],"6-77-3":[17.24,120.99],"5-38-1":[17.24,120.99],"6-77-4":[12.81,34.8],"6-77-5":[12.61,29.58],"5-38-2":[12.61,38.46],"6-77-6":[10.81,27.52],"6-77-7":[10.81,395.4],"5-38-3":[10.81,1139.05],"6-77-8":[13.48,352.95],"6-77-9":[13.48,366.87],"5-38-4":[13.48,538.64],"6-77-10":[35.39,327.96],"6-77-11":[93.37,306.61],"5-38-5":[21.95,357.69],"6-77-12":[105.39,311.33],"6-77-13":[-117.36,300.03],"5-38-6":[-117.36,332.1],"6-77-14":[44.47,375.52],"6-77-15":[2.57,323.22],"5-38-7":[2.57,721.64],"6-77-16":[12.38,1062.09],"6-77-17":[17.22,3382.16],"5-38-8":[12.38,3382.16],"6-77-18":[227.32,3297.16],"6-77-19":[120.11,2377.57],"5-38-9":[14.59,3897.68],"6-77-20":[501.73,1781.74],"6-77-21":[534.04,1378.43],"5-38-10":[-398.55,2689.12],"6-77-22":[6.85,2032.54],"6-77-23":[-26.43,2355.84],"5-38-11":[-26.43,2355.84],"6-77-24":[-82.73,2168.09],"6-77-25":[-31.31,2735.56],"5-38-12":[-82.73,2735.56],"6-77-26":[-27.84,3016.69],"6-77-27":[581.81,4526.44],"5-38-13":[-27.84,4526.44],"6-77-28":[713.31,4259.18],"6-77-29":[510.69,4177.49],"5-38-14":[375.1,4259.18],"6-77-30":[298.72,2764.05],"6-77-31":[167.98,3442.17],"5-38-15":[167.98,4305.91],"6-77-32":[136.09,5158.31],"6-77-33":[-45.68,5869.55],"5-38-16":[-45.68,5869.55],"6-77-34":[-49.58,2618.18],"6-77-35":[-48.06,1490.1],"5-38-17":[-49.58,2952.42],"6-77-36":[-18.95,1408.41],"6-77-37":[-43.82,2305.1],"5-38-18":[-43.82,2969.88],"6-77-38":[-55.16,506.56],"6-77-39":[-23.77,1.33],"5-38-19":[-55.16,1841.51],"6-77-40":[-2.89,15.32],"6-77-41":[4.2,25.41],"5-38-20":[-13.74,244.16],"6-77-42":[9.2,34.13],"6-77-43":[15.55,46.33],"5-38-21":[9.2,58.81],"6-77-44":[24.23,56.57],"6-77-45":[27.4,71.28],"5-38-22":[24.23,71.28],"6-77-46":[32.88,83.08],"6-77-47":[39.51,93.26],"5-38-23":[32.33,93.26],"6-77-48":[38.04,1277.56],"6-77-49":[42.15,90.89],"5-38-24":[38.04,1277.56],"6-77-50":[42.47,93.63],"6-77-51":[38.18,92.27],"5-38-25":[36.06,93.63],"6-77-52":[33.28,80.44],"6-77-53":[29.46,68.79],"5-38-26":[27.56,80.44],"6-77-54":[25.28,62.82],"6-77-55":[22.68,52.06],"5-38-27":[22.21,62.82],"6-77-56":[18.95,1400],"6-77-57":[751.85,3035.01],"5-38-28":[18.95,3035.01],"6-77-58":[2930.45,3670.15],"6-77-59":[3628.25,3814.29],"5-38-29":[2787.67,3814.29],"6-77-60":[3346.54,3652.21],"6-77-61":[3073.2,3460.18],"5-38-30":[2776.72,3652.21],"6-77-62":[2876,3182.27],"6-77-63":[-29.54,2907.97],"5-38-31":[-29.54,3182.27],"6-78-0":[13.6,35.71],"6-78-1":[18.5,41.37],"6-78-2":[18.62,41.37],"6-78-3":[14.08,41.71],"6-78-4":[10.33,32.25],"6-78-5":[8.69,25.05],"6-78-6":[8.19,22.55],"6-78-7":[9.2,327.91],"6-78-8":[11.6,314.82],"6-78-9":[12.9,268.49],"6-78-10":[44.72,286.2],"6-78-11":[79.76,279.53],"6-78-12":[76.55,258.22],"6-78-13":[77.59,248.68],"6-78-14":[14.28,340.26],"6-78-15":[2.68,680.41],"6-78-16":[13.14,3881.85],"6-78-17":[13.73,3918.41],"6-78-18":[321,3209.2],"6-78-19":[147.38,1446.37],"6-78-20":[267.19,949.71],"6-78-21":[374.43,1047.17],"6-78-22":[737.12,1974.55],"6-78-23":[99.43,2149.19],"6-78-24":[-38.59,2651.93],"6-78-25":[-18.11,2755.96],"6-78-26":[-202.91,3297.68],"6-78-27":[-172.94,3970.6],"6-78-28":[208.62,3839.48],"6-78-29":[250.57,4373.18],"6-78-30":[130.76,1692.99],"6-78-31":[-26.1,881.98],"6-78-32":[-77.85,278.94],"6-78-33":[-77.15,504.42],"6-78-34":[-74.93,56.49],"6-78-35":[-67.51,634.05],"6-78-36":[-58.21,1404.07],"6-78-37":[-82.52,980.89],"6-78-38":[-39.1,-9.7],"6-78-39":[-22.61,25.58],"6-78-40":[-3.87,7.79],"6-78-41":[3.4,20.43],"6-78-42":[8.86,32.47],"6-78-43":[15.8,49.23],"6-78-44":[24.72,59.67],"6-78-45":[29.26,78.45],"6-78-46":[35.64,87.67],"6-78-47":[42.4,92.7],"6-78-48":[42.73,92.7],"6-78-49":[43.34,91.97],"6-78-50":[45.44,100.71],"6-78-51":[40.21,95.44],"6-78-52":[34.91,81.61],"6-78-53":[31.4,70.9],"6-78-54":[26.8,64.39],"6-78-55":[25.07,54.85],"6-78-56":[20.74,1829.25],"6-78-57":[790.9,3049.46],"6-78-58":[3035,3654.4],"6-78-59":[3633.12,3814.29],"6-78-60":[3460.17,3676.48],"6-78-61":[3182.26,3515.55],"6-78-62":[2907.96,3278.24],"6-78-63":[-29.54,2956.72],"6-79-0":[13.6,35.35],"6-79-1":[18.17,40.15],"5-39-0":[13.6,41.37],"6-79-2":[18.31,40.92],"6-79-3":[14.08,38.78],"5-39-1":[14.08,41.71],"4-19-0":[13.6,120.99],"6-79-4":[8.85,27.87],"6-79-5":[7.69,19.46],"5-39-2":[7.69,32.25],"6-79-6":[6.77,17.55],"6-79-7":[7.34,252.89],"5-39-3":[6.77,327.91],"4-19-1":[6.77,1139.05],"3-9-0":[6.77,1181.22],"6-79-8":[10.65,224],"6-79-9":[12.58,273.71],"5-39-4":[10.65,314.82],"6-79-10":[36.18,309.09],"6-79-11":[67.88,297.07],"5-39-5":[36.18,309.09],"4-19-2":[10.65,538.64],"6-79-12":[65.82,294.44],"6-79-13":[86.91,291.7],"5-39-6":[65.82,294.44],"6-79-14":[-19.35,260.4],"6-79-15":[-9.6,476.12],"5-39-7":[-19.35,680.41],"4-19-3":[-117.36,721.64],"3-9-1":[-181.36,4110.39],"2-4-0":[-181.36,4840.9],"6-79-16":[37.86,5616.16],"6-79-17":[25.49,5133.37],"5-39-8":[13.14,5616.16],"6-79-18":[263.18,4058.15],"6-79-19":[31.48,3448.78],"5-39-9":[31.48,4058.15],"4-19-4":[12.38,5616.16],"6-79-20":[2.31,377.37],"6-79-21":[110.72,790.42],"5-39-10":[2.31,1047.17],"6-79-22":[400.54,1407.05],"6-79-23":[692.97,1499.62],"5-39-11":[99.43,2149.19],"4-19-5":[-398.55,2689.12],"3-9-2":[-398.55,5616.16],"6-79-24":[612.19,1721.97],"6-79-25":[-26.78,2990.34],"5-39-12":[-38.59,2990.34],"6-79-26":[-70.23,3647.39],"6-79-27":[-179.38,3223.81],"5-39-13":[-202.91,3970.6],"4-19-6":[-202.91,4526.44],"6-79-28":[-41.82,3002.22],"6-79-29":[152.09,1451.56],"5-39-14":[-41.82,4373.18],"6-79-30":[61.26,913.05],"6-79-31":[-86.74,587.03],"5-39-15":[-86.74,1692.99],"4-19-7":[-86.74,4373.18],"3-9-3":[-202.91,5024.49],"2-4-1":[-398.55,5616.16],"6-79-32":[-87.58,65.61],"6-79-33":[-86.64,-37.76],"5-39-16":[-87.58,504.42],"6-79-34":[-81.84,-34.75],"6-79-35":[-71.3,-26.58],"5-39-17":[-81.84,634.05],"4-19-8":[-87.58,5869.55],"6-79-36":[-59.05,2336.88],"6-79-37":[-52.97,605.98],"5-39-18":[-82.52,2336.88],"6-79-38":[-43.74,926.36],"6-79-39":[-68.11,1064.17],"5-39-19":[-68.11,1064.17],"4-19-9":[-82.52,2969.88],"3-9-4":[-87.58,5869.55],"6-79-40":[-18.99,1347.93],"6-79-41":[-12.01,199.04],"5-39-20":[-18.99,1347.93],"6-79-42":[8.42,42.61],"6-79-43":[17.67,65.21],"5-39-21":[8.42,65.21],"4-19-10":[-18.99,1347.93],"6-79-44":[24.72,70.25],"6-79-45":[31.3,83.27],"5-39-22":[24.72,83.27],"6-79-46":[39.48,87.78],"6-79-47":[43.03,91.28],"5-39-23":[35.64,92.7],"4-19-11":[24.23,93.26],"3-9-5":[-242.83,3510.35],"2-4-2":[-242.83,5869.55],"6-79-48":[42.49,94.03],"6-79-49":[43.22,91.87],"5-39-24":[42.49,94.03],"6-79-50":[45.58,101.84],"6-79-51":[40.61,94.5],"5-39-25":[40.21,101.84],"4-19-12":[36.06,1277.56],"6-79-52":[35.82,81.74],"6-79-53":[31.85,70.92],"5-39-26":[31.4,81.74],"6-79-54":[28.07,64.4],"6-79-55":[25.07,56.23],"5-39-27":[25.07,64.4],"4-19-13":[22.21,81.74],"3-9-6":[15.45,1277.56],"6-79-56":[24.51,2238.4],"6-79-57":[1829.24,3044.79],"5-39-28":[20.74,3049.46],"6-79-58":[3023.55,3633.13],"6-79-59":[3590.92,3703.54],"5-39-29":[3023.55,3814.29],"4-19-14":[18.95,3814.29],"6-79-60":[3515.54,3739.77],"6-79-61":[3278.23,3596.54],"5-39-30":[3182.26,3739.77],"6-79-62":[2956.71,3326.45],"6-79-63":[-29.54,2985.88],"5-39-31":[-29.54,3326.45],"4-19-15":[-29.54,3739.77],"3-9-7":[-29.54,3814.29],"2-4-3":[-29.54,3814.29],"6-80-0":[13.6,34.92],"6-80-1":[17.78,39.27],"6-80-2":[16.68,40.65],"6-80-3":[11.49,517.11],"6-80-4":[7.13,26.45],"6-80-5":[4.68,16.89],"6-80-6":[4.58,15.08],"6-80-7":[4.73,237.51],"6-80-8":[7.54,245.48],"6-80-9":[34.12,285.08],"6-80-10":[9.18,302.02],"6-80-11":[61.24,248.97],"6-80-12":[48.7,347.27],"6-80-13":[6.35,372.83],"6-80-14":[-41.25,355.61],"6-80-15":[-76.27,115.89],"6-80-16":[-56.46,4485.88],"6-80-17":[-15.96,4116.85],"6-80-18":[161.31,4577.24],"6-80-19":[32.18,3588.07],"6-80-20":[-43.59,2783.91],"6-80-21":[-86.23,444.94],"6-80-22":[151.78,925.69],"6-80-23":[340.2,1343.13],"6-80-24":[285.31,1028.07],"6-80-25":[400.89,1455.51],"6-80-26":[79.57,2444.71],"6-80-27":[-65.02,2493.24],"6-80-28":[-50.69,2422.23],"6-80-29":[62.25,1006.97],"6-80-30":[-93.25,501.55],"6-80-31":[-99.6,235.87],"6-80-32":[-97.89,-42.83],"6-80-33":[-90.45,-40.91],"6-80-34":[-87.49,-33.55],"6-80-35":[-79.14,8.71],"6-80-36":[-62.55,621.18],"6-80-37":[-52.79,1207.88],"6-80-38":[-3.35,2631.65],"6-80-39":[-45.58,2635.66],"6-80-40":[-13.4,1977.92],"6-80-41":[3.13,244.27],"6-80-42":[12.3,42.61],"6-80-43":[19.05,65.05],"6-80-44":[27.43,70.26],"6-80-45":[35.59,85.76],"6-80-46":[41.63,87.78],"6-80-47":[42.87,92.37],"6-80-48":[44.13,94.46],"6-80-49":[43.94,91.87],"6-80-50":[45.05,99.84],"6-80-51":[40.48,92.21],"6-80-52":[35.29,81.74],"6-80-53":[31.46,70.92],"6-80-54":[28.44,63.71],"6-80-55":[27.25,572.15],"6-80-56":[26.34,2427.48],"6-80-57":[2238.39,3127.78],"6-80-58":[3023.7,3590.93],"6-80-59":[3513.32,3615.32],"6-80-60":[3595.11,3741.77],"6-80-61":[3326.44,3655.25],"6-80-62":[2985.87,3360.65],"6-80-63":[-29.54,3013.02],"6-81-0":[13.6,34.28],"6-81-1":[17.42,38.06],"5-40-0":[13.6,39.27],"6-81-2":[16.06,37.38],"6-81-3":[11.14,453.1],"5-40-1":[11.14,517.11],"6-81-4":[5.36,22.49],"6-81-5":[2.51,12.86],"5-40-2":[2.51,26.45],"6-81-6":[2.24,9.59],"6-81-7":[2.54,195.71],"5-40-3":[2.24,237.51],"6-81-8":[7.96,467.27],"6-81-9":[65.32,477.07],"5-40-4":[7.54,477.07],"6-81-10":[7.84,275.89],"6-81-11":[59.53,298.46],"5-40-5":[7.84,302.02],"6-81-12":[19.86,367.95],"6-81-13":[0.32,377.5],"5-40-6":[0.32,377.5],"6-81-14":[-51.54,65.52],"6-81-15":[-57.25,5.04],"5-40-7":[-76.27,355.61],"6-81-16":[-43.48,748.23],"6-81-17":[-65.9,4455.71],"5-40-8":[-65.9,4485.88],"6-81-18":[-73,4802.09],"6-81-19":[473.29,3898.23],"5-40-9":[-73,4802.09],"6-81-20":[-93.21,4173.89],"6-81-21":[-121.55,2032.48],"5-40-10":[-121.55,4173.89],"6-81-22":[-85.21,483.61],"6-81-23":[-57.81,539.09],"5-40-11":[-85.21,1343.13],"6-81-24":[77.98,467.81],"6-81-25":[176.55,1015.61],"5-40-12":[77.98,1455.51],"6-81-26":[-51.14,2138.39],"6-81-27":[-58.49,2078.28],"5-40-13":[-65.02,2493.24],"6-81-28":[-83.94,1996.26],"6-81-29":[-102.99,846.67],"5-40-14":[-102.99,2422.23],"6-81-30":[-103.29,410.82],"6-81-31":[-103.34,-46.62],"5-40-15":[-103.34,501.55],"6-81-32":[-99.7,-45.29],"6-81-33":[-91.37,-41.35],"5-40-16":[-99.7,-40.91],"6-81-34":[-87.05,-35.59],"6-81-35":[-80.36,-28.86],"5-40-17":[-87.49,8.71],"6-81-36":[-95.35,2866.35],"6-81-37":[-44.05,2817.4],"5-40-18":[-95.35,2866.35],"6-81-38":[-37.94,1755.56],"6-81-39":[-49.87,1687.3],"5-40-19":[-49.87,2635.66],"6-81-40":[-10.79,75],"6-81-41":[1.07,25.08],"5-40-20":[-13.4,1977.92],"6-81-42":[8.34,34.81],"6-81-43":[16.88,54.43],"5-40-21":[8.34,65.05],"6-81-44":[27.43,70.86],"6-81-45":[35.92,83.88],"5-40-22":[27.43,85.76],"6-81-46":[39.83,85.23],"6-81-47":[42.1,89.88],"5-40-23":[39.83,92.37],"6-81-48":[10.5,895.68],"6-81-49":[44.14,90.78],"5-40-24":[10.5,895.68],"6-81-50":[42.93,94.4],"6-81-51":[38.91,91.87],"5-40-25":[38.91,99.84],"6-81-52":[33.96,80.53],"6-81-53":[30.7,68.94],"5-40-26":[30.7,81.74],"6-81-54":[28.32,62.75],"6-81-55":[29.72,1099.75],"5-40-27":[27.25,1099.75],"6-81-56":[30.45,2482.8],"6-81-57":[2427.47,3161.72],"5-40-28":[26.34,3161.72],"6-81-58":[3127.77,3513.33],"6-81-59":[3362.15,3613.49],"5-40-29":[3023.7,3615.32],"6-81-60":[3596.57,3745.47],"6-81-61":[3360.64,3699.75],"5-40-30":[3326.44,3745.47],"6-81-62":[3013.01,3382.27],"6-81-63":[-29.54,3034.71],"5-40-31":[-29.54,3382.27],"6-82-0":[13.6,33.76],"6-82-1":[17,37.12],"6-82-2":[15.53,35.52],"6-82-3":[8.15,574.46],"6-82-4":[4.35,19.3],"6-82-5":[1.27,79.61],"6-82-6":[0.56,585.93],"6-82-7":[0.54,166.68],"6-82-8":[5.53,263.89],"6-82-9":[23.58,441.34],"6-82-10":[5.37,321.16],"6-82-11":[52.24,337.16],"6-82-12":[32.72,384.64],"6-82-13":[-1.79,320.68],"6-82-14":[-63.46,173.57],"6-82-15":[-85.87,-10.01],"6-82-16":[-173.82,522.27],"6-82-17":[-63.16,294.16],"6-82-18":[-61.41,3417.02],"6-82-19":[-32.51,5595.76],"6-82-20":[768.45,4411.42],"6-82-21":[-91.09,4366.48],"6-82-22":[-64.72,1761.32],"6-82-23":[-110.57,170.47],"6-82-24":[-44.95,274.33],"6-82-25":[68.28,1114.62],"6-82-26":[-145.36,1466.69],"6-82-27":[-88.55,1380.57],"6-82-28":[-104.68,723.52],"6-82-29":[-111.56,-41.96],"6-82-30":[-110.83,-50.61],"6-82-31":[-104.52,-49.03],"6-82-32":[-100.44,-45.11],"6-82-33":[-93.4,-10.81],"6-82-34":[-83.72,5.08],"6-82-35":[-74.96,-0.2],"6-82-36":[-62.66,-19.8],"6-82-37":[-49.14,-15.48],"6-82-38":[-35.86,-11.67],"6-82-39":[-24.06,-4.21],"6-82-40":[-11.33,1.34],"6-82-41":[0.88,15.42],"6-82-42":[7.73,31.56],"6-82-43":[16.23,52.89],"6-82-44":[26.35,70.9],"6-82-45":[33.59,79.74],"6-82-46":[36.43,83.44],"6-82-47":[40.09,89.7],"6-82-48":[31.65,1115.13],"6-82-49":[43.67,90.18],"6-82-50":[42.26,91.9],"6-82-51":[37.84,90.05],"6-82-52":[33.96,77.84],"6-82-53":[30.52,67.42],"6-82-54":[28.32,61.42],"6-82-55":[29.72,1774.62],"6-82-56":[1099.74,2729.04],"6-82-57":[2482.79,3157.08],"6-82-58":[3040.04,3362.16],"6-82-59":[3161.66,3614.29],"6-82-60":[3541.01,3772.23],"6-82-61":[3382.26,3728.18],"6-82-62":[3034.7,3397.85],"6-82-63":[-29.54,3048.46],"6-83-0":[13.6,33.14],"6-83-1":[16.83,36.08],"5-41-0":[13.6,37.12],"6-83-2":[15.31,35.22],"6-83-3":[8.15,497.91],"5-41-1":[8.15,574.46],"4-20-0":[8.15,574.46],"6-83-4":[2.83,16.01],"6-83-5":[1.2,1212.81],"5-41-2":[1.2,1212.81],"6-83-6":[-2.49,1230.82],"6-83-7":[-3.49,212.13],"5-41-3":[-3.49,1230.82],"4-20-1":[-3.49,1230.82],"6-83-8":[21.02,244.39],"6-83-9":[32.38,331.03],"5-41-4":[5.53,441.34],"6-83-10":[0.65,350.47],"6-83-11":[53.02,469.81],"5-41-5":[0.65,469.81],"4-20-2":[0.65,477.07],"6-83-12":[50.86,476.59],"6-83-13":[40.69,627.4],"5-41-6":[-1.79,627.4],"6-83-14":[-46.59,323.7],"6-83-15":[-87.65,232.09],"5-41-7":[-87.65,323.7],"4-20-3":[-87.65,627.4],"6-83-16":[-161.11,321.64],"6-83-17":[-92.99,1858.17],"5-41-8":[-173.82,1858.17],"6-83-18":[-78.58,3878.24],"6-83-19":[299.23,3814.01],"5-41-9":[-78.58,5595.76],"4-20-4":[-173.82,5595.76],"6-83-20":[674.01,4034.31],"6-83-21":[627.23,3448.75],"5-41-10":[-91.09,4411.42],"6-83-22":[-84.08,2931.28],"6-83-23":[-93.5,1395.64],"5-41-11":[-110.57,2931.28],"4-20-5":[-121.55,4411.42],"6-83-24":[-29.8,300.19],"6-83-25":[-71.95,1727.17],"5-41-12":[-71.95,1727.17],"6-83-26":[-76.15,1060.42],"6-83-27":[-94.46,1466.16],"5-41-13":[-145.36,1466.69],"4-20-6":[-145.36,2493.24],"6-83-28":[-107.49,-44.27],"6-83-29":[-112.89,-51.27],"5-41-14":[-112.89,723.52],"6-83-30":[-112.22,-52.38],"6-83-31":[-111.92,-50.21],"5-41-15":[-112.22,-49.03],"4-20-7":[-112.89,2422.23],"6-83-32":[-107.44,-46.38],"6-83-33":[-100.55,862.8],"5-41-16":[-107.44,862.8],"6-83-34":[-86.9,-10.47],"6-83-35":[-74.63,-31.32],"5-41-17":[-86.9,5.08],"4-20-8":[-107.44,862.8],"6-83-36":[-65.81,-24.56],"6-83-37":[-50.21,-9.89],"5-41-18":[-65.81,-9.89],"6-83-38":[-36.27,-11.19],"6-83-39":[-27.02,3059.56],"5-41-19":[-36.27,3059.56],"4-20-9":[-95.35,3059.56],"6-83-40":[-8.14,2.28],"6-83-41":[0.88,16.25],"5-41-20":[-11.33,16.25],"6-83-42":[7.73,33.52],"6-83-43":[16.98,55.76],"5-41-21":[7.73,55.76],"4-20-10":[-13.4,1977.92],"6-83-44":[26.42,65.98],"6-83-45":[28.62,71.78],"5-41-22":[26.35,79.74],"6-83-46":[31.75,77.92],"6-83-47":[36.38,85.71],"5-41-23":[31.75,89.7],"4-20-11":[26.35,92.37],"6-83-48":[41.07,88.96],"6-83-49":[41.42,88.26],"5-41-24":[31.65,1115.13],"6-83-50":[40.86,86.86],"6-83-51":[37.02,83.45],"5-41-25":[37.02,91.9],"4-20-12":[10.5,1115.13],"6-83-52":[33.5,75.38],"6-83-53":[30.59,67.43],"5-41-26":[30.52,77.84],"6-83-54":[28.68,62.32],"6-83-55":[29.58,2242.91],"5-41-27":[28.32,2242.91],"4-20-13":[27.25,2242.91],"6-83-56":[568.49,2841.08],"6-83-57":[2729.03,3100.22],"5-41-28":[568.49,3157.08],"6-83-58":[2651.98,3161.67],"6-83-59":[2944.39,3541.02],"5-41-29":[2651.98,3614.29],"4-20-14":[26.34,3615.32],"6-83-60":[3405.03,3807.22],"6-83-61":[3397.84,3762.75],"5-41-30":[3382.26,3807.22],"6-83-62":[3048.45,3423.55],"6-83-63":[-29.54,3056.25],"5-41-31":[-29.54,3423.55],"4-20-15":[-29.54,3807.22],"6-84-0":[13.6,32.73],"6-84-1":[15.68,35.52],"6-84-2":[14.45,462.92],"6-84-3":[6.06,600.63],"6-84-4":[1.87,99.91],"6-84-5":[-4.13,1436.73],"6-84-6":[-6.38,243.89],"6-84-7":[-6.07,220.04],"6-84-8":[14.07,1250.98],"6-84-9":[44.8,1096.24],"6-84-10":[-0.2,1512.31],"6-84-11":[81.33,975.89],"6-84-12":[69.62,1624.4],"6-84-13":[-109.79,1020.66],"6-84-14":[69.5,630.85],"6-84-15":[-35.73,381.12],"6-84-16":[-25.96,265.27],"6-84-17":[-108.09,292.44],"6-84-18":[2.44,3050.69],"6-84-19":[657.64,3289.8],"6-84-20":[218.2,3513.08],"6-84-21":[84.19,4466.14],"6-84-22":[-257.75,3206.24],"6-84-23":[-71.96,2955.44],"6-84-24":[-79.76,1006.29],"6-84-25":[-89.61,187.1],"6-84-26":[-101.44,-35.61],"6-84-27":[-105.8,-39.16],"6-84-28":[-108.15,-47.23],"6-84-29":[-116.74,-51.27],"6-84-30":[-120.83,-54.73],"6-84-31":[-121.14,-53.64],"6-84-32":[-120.53,-50.27],"6-84-33":[-111.77,-41.47],"6-84-34":[-97.72,-15.91],"6-84-35":[-82.46,-11.7],"6-84-36":[-73.49,-25.08],"6-84-37":[-58.26,-16.99],"6-84-38":[-39.63,-4.4],"6-84-39":[-29.1,810.67],"6-84-40":[-9.76,2.28],"6-84-41":[0.83,15.41],"6-84-42":[7.34,34.61],"6-84-43":[17.48,52.91],"6-84-44":[21.66,56.56],"6-84-45":[24.5,63.5],"6-84-46":[28.48,71.79],"6-84-47":[33.69,82.14],"6-84-48":[37.05,84.5],"6-84-49":[39.19,84.88],"6-84-50":[37.64,82.95],"6-84-51":[36.03,81.01],"6-84-52":[33.47,74.05],"6-84-53":[30.96,66.44],"6-84-54":[28.91,62.37],"6-84-55":[28.43,1169.19],"6-84-56":[306.84,2834.46],"6-84-57":[2494.94,2971.6],"6-84-58":[2350.48,2944.4],"6-84-59":[2693.02,3405.04],"6-84-60":[3368.56,3828.34],"6-84-61":[3423.54,3798.94],"6-84-62":[3056.21,3451.5],"6-84-63":[-29.54,3061.98],"6-85-0":[13.6,32.27],"6-85-1":[15.62,35.54],"5-42-0":[13.6,35.54],"6-85-2":[13.83,255.88],"6-85-3":[6.06,601.05],"5-42-1":[6.06,601.05],"6-85-4":[1.27,851.35],"6-85-5":[-6.92,1078],"5-42-2":[-6.92,1436.73],"6-85-6":[-11.51,152.24],"6-85-7":[-9.86,400.74],"5-42-3":[-11.51,400.74],"6-85-8":[20.67,1773.8],"6-85-9":[-5.63,1487.95],"5-42-4":[-5.63,1773.8],"6-85-10":[-53.11,1559.37],"6-85-11":[-77.24,864.4],"5-42-5":[-77.24,1559.37],"6-85-12":[-233.11,1394.5],"6-85-13":[29.59,600.13],"5-42-6":[-233.11,1624.4],"6-85-14":[24.54,429.21],"6-85-15":[-30.91,315.69],"5-42-7":[-35.73,630.85],"6-85-16":[-30.47,243.14],"6-85-17":[32.63,430.08],"5-42-8":[-108.09,430.08],"6-85-18":[50.89,3092.4],"6-85-19":[225.19,3228.78],"5-42-9":[2.44,3289.8],"6-85-20":[429.56,2831.82],"6-85-21":[250.94,3905.23],"5-42-10":[84.19,4466.14],"6-85-22":[-102.11,3453.88],"6-85-23":[-86,2164.41],"5-42-11":[-257.75,3453.88],"6-85-24":[-99.8,1992.49],"6-85-25":[-110.95,-39.87],"5-42-12":[-110.95,1992.49],"6-85-26":[-117.41,-43.92],"6-85-27":[-127.52,-50.66],"5-42-13":[-127.52,-35.61],"6-85-28":[-132,-54.32],"6-85-29":[-131.84,-55.09],"5-42-14":[-132,-47.23],"6-85-30":[-135.58,-59.06],"6-85-31":[-136.23,-60.26],"5-42-15":[-136.23,-53.64],"6-85-32":[-135.19,-55.88],"6-85-33":[-126.29,-49.83],"5-42-16":[-135.19,-41.47],"6-85-34":[-114.17,-41.73],"6-85-35":[-93.31,-35.72],"5-42-17":[-114.17,-11.7],"6-85-36":[-76.7,-25.51],"6-85-37":[-60.92,12.57],"5-42-18":[-76.7,12.57],"6-85-38":[-42.13,-11.51],"6-85-39":[-26.51,-4.38],"5-42-19":[-42.13,810.67],"6-85-40":[-10.15,1.03],"6-85-41":[0.61,18.41],"5-42-20":[-10.15,18.41],"6-85-42":[7.34,33.4],"6-85-43":[14.16,42.27],"5-42-21":[7.34,52.91],"6-85-44":[20.8,47.97],"6-85-45":[23.87,56.43],"5-42-22":[20.8,63.5],"6-85-46":[27.26,65.1],"6-85-47":[30.36,73.18],"5-42-23":[27.26,82.14],"6-85-48":[33.17,77.75],"6-85-49":[36.61,78.57],"5-42-24":[33.17,84.88],"6-85-50":[36.35,77.83],"6-85-51":[34.92,75.64],"5-42-25":[34.92,82.95],"6-85-52":[32.62,71.77],"6-85-53":[30.3,66.45],"5-42-26":[30.3,74.05],"6-85-54":[27.35,61.96],"6-85-55":[26.88,470.02],"5-42-27":[26.88,1169.19],"6-85-56":[29.8,2724.67],"6-85-57":[1711.99,2726.3],"5-42-28":[29.8,2971.6],"6-85-58":[1711.99,2693.03],"6-85-59":[2435.24,3395.87],"5-42-29":[1711.99,3405.04],"6-85-60":[3366.59,3894.08],"6-85-61":[3451.49,3860.75],"5-42-30":[3366.59,3894.08],"6-85-62":[3061.9,3477.38],"6-85-63":[-29.54,3064.64],"5-42-31":[-29.54,3477.38],"6-86-0":[13.59,31.92],"6-86-1":[14.49,35.54],"6-86-2":[11.81,372.35],"6-86-3":[3.34,515.4],"6-86-4":[1.06,851.78],"6-86-5":[-8.29,891.68],"6-86-6":[-14.79,-3.6],"6-86-7":[-14.04,414.42],"6-86-8":[-7.9,1361.22],"6-86-9":[-6.91,250.25],"6-86-10":[-12.46,219.71],"6-86-11":[30.07,213.66],"6-86-12":[40.86,217.01],"6-86-13":[-251.81,281.46],"6-86-14":[1.35,248.91],"6-86-15":[3.27,244.16],"6-86-16":[-29.82,713.35],"6-86-17":[-65.15,925.05],"6-86-18":[118.27,769.1],"6-86-19":[259.05,3625.13],"6-86-20":[437.51,4120.59],"6-86-21":[417.86,2348.74],"6-86-22":[-70.2,2575.17],"6-86-23":[-95.29,426.39],"6-86-24":[-105.6,-40.84],"6-86-25":[-120.89,-49.19],"6-86-26":[-133.2,-54.84],"6-86-27":[-143.88,-59.25],"6-86-28":[-150.34,-63.76],"6-86-29":[-151.57,-65.77],"6-86-30":[-150.84,-65.78],"6-86-31":[-149.1,-67.58],"6-86-32":[-147.35,-64],"6-86-33":[-138.48,-57.09],"6-86-34":[-126.92,-47.83],"6-86-35":[-107,-36.76],"6-86-36":[-89.42,-30.07],"6-86-37":[-64.88,-21.06],"6-86-38":[-48.23,209.37],"6-86-39":[-26.28,376.48],"6-86-40":[-11.57,0.81],"6-86-41":[0.26,18.37],"6-86-42":[7.71,27.18],"6-86-43":[12.56,39.03],"6-86-44":[18.37,47.62],"6-86-45":[23.48,52.93],"6-86-46":[25.88,59.58],"6-86-47":[28.88,66.34],"6-86-48":[31.73,72.21],"6-86-49":[35.04,79.61],"6-86-50":[34.66,75.08],"6-86-51":[34.42,72.8],"6-86-52":[31.27,70.56],"6-86-53":[28.81,64.55],"6-86-54":[26.88,60.6],"6-86-55":[24.41,59.6],"6-86-56":[27.96,2407.49],"6-86-57":[1004.17,2407.49],"6-86-58":[953.72,2435.25],"6-86-59":[2297.21,3458.7],"6-86-60":[3395.86,3925.85],"6-86-61":[3477.37,3915.12],"6-86-62":[3064.43,3500.58],"6-86-63":[-29.54,3065.4],"6-87-0":[13.59,31.44],"6-87-1":[14.36,35.37],"5-43-0":[13.59,35.54],"6-87-2":[10.38,28.84],"6-87-3":[2.68,330.3],"5-43-1":[2.68,515.4],"4-21-0":[2.68,601.05],"6-87-4":[-2.16,1077],"6-87-5":[-10.36,397.96],"5-43-2":[-10.36,1077],"6-87-6":[-15.86,38],"6-87-7":[-16.5,1223.93],"5-43-3":[-16.5,1223.93],"4-21-1":[-16.5,1436.73],"3-10-0":[-16.5,1436.73],"6-87-8":[-9.11,1275.39],"6-87-9":[-9.42,200.27],"5-43-4":[-9.42,1361.22],"6-87-10":[-16.29,154.26],"6-87-11":[12.98,142.53],"5-43-5":[-16.29,219.71],"4-21-2":[-77.24,1773.8],"6-87-12":[33.77,210.72],"6-87-13":[8.93,447.9],"5-43-6":[-251.81,447.9],"6-87-14":[78.72,1084.54],"6-87-15":[-9.6,566.99],"5-43-7":[-9.6,1084.54],"4-21-3":[-251.81,1624.4],"3-10-1":[-251.81,1773.8],"6-87-16":[64.29,821.12],"6-87-17":[59.56,2139.17],"5-43-8":[-65.15,2139.17],"6-87-18":[168.8,4103.6],"6-87-19":[306.05,4599.84],"5-43-9":[118.27,4599.84],"4-21-4":[-108.09,4599.84],"6-87-20":[773.43,4772.12],"6-87-21":[-3.55,3524.89],"5-43-10":[-3.55,4772.12],"6-87-22":[-79.15,2437.68],"6-87-23":[-101.84,529.04],"5-43-11":[-101.84,2575.17],"4-21-5":[-257.75,4772.12],"3-10-2":[-257.75,5595.76],"6-87-24":[-118.44,-45.37],"6-87-25":[-141.93,-54.11],"5-43-12":[-141.93,-40.84],"6-87-26":[-150.7,-61.38],"6-87-27":[-163.78,-68.36],"5-43-13":[-163.78,-54.84],"4-21-6":[-163.78,1992.49],"6-87-28":[-170.56,-73.16],"6-87-29":[-174.45,-76.65],"5-43-14":[-174.45,-63.76],"6-87-30":[-173.2,-74.88],"6-87-31":[-167.31,-74.44],"5-43-15":[-173.2,-65.78],"4-21-7":[-174.45,-47.23],"3-10-3":[-174.45,2493.24],"6-87-32":[-162.11,-70.63],"6-87-33":[-151.07,-64.32],"5-43-16":[-162.11,-57.09],"6-87-34":[-139.14,-55.61],"6-87-35":[-119.37,-45.34],"5-43-17":[-139.14,-36.76],"4-21-8":[-162.11,-11.7],"6-87-36":[-99.82,-34.09],"6-87-37":[-73.91,-24.11],"5-43-18":[-99.82,-21.06],"6-87-38":[-54.69,-13.14],"6-87-39":[-30.91,-5.98],"5-43-19":[-54.69,376.48],"4-21-9":[-99.82,810.67],"3-10-4":[-162.11,3059.56],"6-87-40":[-16.87,0.27],"6-87-41":[-1.52,14.6],"5-43-20":[-16.87,18.37],"6-87-42":[5.69,23.57],"6-87-43":[10.55,36.11],"5-43-21":[5.69,39.03],"4-21-10":[-16.87,52.91],"6-87-44":[18.37,45.54],"6-87-45":[20.45,51.47],"5-43-22":[18.37,52.93],"6-87-46":[25.88,56.59],"6-87-47":[28.04,63.44],"5-43-23":[25.88,66.34],"4-21-11":[18.37,82.14],"3-10-5":[-16.87,1977.92],"6-87-48":[31.01,78.85],"6-87-49":[35.15,81.15],"5-43-24":[31.01,81.15],"6-87-50":[34.57,74.84],"6-87-51":[33.74,72.48],"5-43-25":[33.74,75.08],"4-21-12":[31.01,84.88],"6-87-52":[30.61,72.75],"6-87-53":[28.03,63.27],"5-43-26":[28.03,72.75],"6-87-54":[25.92,57.16],"6-87-55":[24.41,55.46],"5-43-27":[24.41,60.6],"4-21-13":[24.41,1169.19],"3-10-6":[10.5,2242.91],"6-87-56":[25.66,1925.54],"6-87-57":[136.32,1897.68],"5-43-28":[25.66,2407.49],"6-87-58":[355.79,2297.22],"6-87-59":[2244.47,3491.07],"5-43-29":[355.79,3491.07],"4-21-14":[25.66,3491.07],"6-87-60":[3458.69,3965.2],"6-87-61":[3500.57,3965.2],"5-43-30":[3395.86,3965.2],"6-87-62":[3065.04,3512.38],"6-87-63":[-29.54,3065.32],"5-43-31":[-29.54,3512.38],"4-21-15":[-29.54,3965.2],"3-10-7":[-29.54,3965.2],"6-88-0":[13.58,31.01],"6-88-1":[13.27,34.8],"6-88-2":[9.6,27.7],"6-88-3":[1.29,19.28],"6-88-4":[-5.14,793.47],"6-88-5":[-12.58,3.96],"6-88-6":[-14.53,64.34],"6-88-7":[-18.34,249.41],"6-88-8":[-13.24,223.3],"6-88-9":[3.21,226.52],"6-88-10":[-20.98,136.47],"6-88-11":[2.46,131.78],"6-88-12":[34.5,332.5],"6-88-13":[145.85,893.06],"6-88-14":[222.12,731.79],"6-88-15":[55.49,447.99],"6-88-16":[49.18,2106.12],"6-88-17":[156.79,5451.96],"6-88-18":[244.11,5411.27],"6-88-19":[361.44,5666.76],"6-88-20":[181.3,4714.77],"6-88-21":[-15.14,3432.07],"6-88-22":[-77.27,1024.24],"6-88-23":[-103.33,403.18],"6-88-24":[-126.49,569.02],"6-88-25":[-152.38,-59.6],"6-88-26":[-167.17,-70.97],"6-88-27":[-179.31,-76.12],"6-88-28":[-187.08,-81.89],"6-88-29":[-189.2,-85.59],"6-88-30":[-189.78,-83.95],"6-88-31":[-187.17,-81.05],"6-88-32":[-180.89,-76.23],"6-88-33":[-170.46,-69.57],"6-88-34":[-155.68,-60.53],"6-88-35":[-133.85,-49.91],"6-88-36":[-111.17,-38.44],"6-88-37":[-86,-27.34],"6-88-38":[-66.93,-16.67],"6-88-39":[-40.72,-8.66],"6-88-40":[-24.16,-1.51],"6-88-41":[-5.67,10.45],"6-88-42":[1.91,19.79],"6-88-43":[7.53,31.3],"6-88-44":[12.64,39.85],"6-88-45":[17.05,49.39],"6-88-46":[21.65,55.46],"6-88-47":[26.11,62.12],"6-88-48":[30.67,79.28],"6-88-49":[-55.82,1713.79],"6-88-50":[33.89,78.24],"6-88-51":[33.4,70.95],"6-88-52":[29.73,72.08],"6-88-53":[27.21,63.18],"6-88-54":[24.13,56.07],"6-88-55":[22.3,50.78],"6-88-56":[16.28,1116.82],"6-88-57":[13.9,1564.5],"6-88-58":[355.79,2295.88],"6-88-59":[2244.13,3490.99],"6-88-60":[3476.04,3997.79],"6-88-61":[3512.37,4001.34],"6-88-62":[3064.8,3523.63],"6-88-63":[-29.54,3065.05],"6-89-0":[13.6,30.41],"6-89-1":[13.24,33.54],"5-44-0":[13.24,34.8],"6-89-2":[9.34,26.43],"6-89-3":[1.06,16.79],"5-44-1":[1.06,27.7],"6-89-4":[-9.36,2.28],"6-89-5":[-14.35,7.89],"5-44-2":[-14.35,793.47],"6-89-6":[-19.83,60.3],"6-89-7":[-28.71,104.27],"5-44-3":[-28.71,249.41],"6-89-8":[-30.59,100.53],"6-89-9":[14.74,139.63],"5-44-4":[-30.59,226.52],"6-89-10":[-23.64,118.52],"6-89-11":[12.07,117.67],"5-44-5":[-23.64,136.47],"6-89-12":[-17.42,204.12],"6-89-13":[-52.7,749.66],"5-44-6":[-52.7,893.06],"6-89-14":[235.46,1122.49],"6-89-15":[163.09,1082.6],"5-44-7":[55.49,1122.49],"6-89-16":[148.14,4445.78],"6-89-17":[252.71,5979.55],"5-44-8":[49.18,5979.55],"6-89-18":[784.14,7425.22],"6-89-20":[59.84,2777.08],"6-89-19":[190.61,7670.17],"5-44-9":[190.61,7670.17],"6-89-21":[3.23,1028.73],"5-44-10":[-15.14,4714.77],"6-89-22":[-10.18,913.48],"6-89-23":[-89.16,1654.1],"5-44-11":[-103.33,1654.1],"6-89-24":[-133.04,1010.35],"6-89-25":[-155.77,598.43],"5-44-12":[-155.77,1010.35],"6-89-26":[-173.23,-75.99],"6-89-27":[-184.16,-67.66],"5-44-13":[-184.16,-67.66],"6-89-28":[-193.17,-72.32],"6-89-29":[-194.63,-67.67],"5-44-14":[-194.63,-67.67],"6-89-30":[-195.24,-67.2],"6-89-31":[-194.81,-43.56],"5-44-15":[-195.24,-43.56],"6-89-32":[-191.21,-78.05],"6-89-33":[-180.97,-40.52],"5-44-16":[-191.21,-40.52],"6-89-34":[-165.05,-37.6],"6-89-35":[-149.67,-56.07],"5-44-17":[-165.05,-37.6],"6-89-36":[-128.73,-45.3],"6-89-37":[-102.87,-34.29],"5-44-18":[-128.73,-27.34],"6-89-38":[-81.85,-22.52],"6-89-39":[-54.75,-12.77],"5-44-19":[-81.85,-8.66],"6-89-40":[-37.19,-4.34],"6-89-41":[-16.37,3.13],"5-44-20":[-37.19,10.45],"6-89-42":[-2.98,13.04],"6-89-43":[4.23,24.34],"5-44-21":[-2.98,31.3],"6-89-44":[9.98,32.16],"6-89-45":[13.89,42.42],"5-44-22":[9.98,49.39],"6-89-46":[21.65,50.58],"6-89-47":[23.2,61.35],"5-44-23":[21.65,62.12],"6-89-48":[28.47,76.1],"6-89-49":[32.48,302.78],"5-44-24":[-55.82,1713.79],"6-89-50":[6.34,315.35],"6-89-51":[32.78,72.05],"5-44-25":[6.34,315.35],"6-89-52":[28.91,68.61],"6-89-53":[26.94,58.88],"5-44-26":[26.94,72.08],"6-89-54":[21.2,53.9],"6-89-55":[21.2,49.06],"5-44-27":[21.2,56.07],"6-89-56":[16.07,392.26],"6-89-57":[13.9,1769.28],"5-44-28":[13.9,1769.28],"6-89-58":[1383.42,2436.17],"6-89-59":[2295.87,3484.93],"5-44-29":[355.79,3490.99],"6-89-60":[3476.04,4020.7],"6-89-61":[3523.62,4020.7],"5-44-30":[3476.04,4020.7],"6-89-62":[3063.59,3529.73],"6-89-63":[-29.54,3064.81],"5-44-31":[-29.54,3529.73],"6-90-0":[13.56,29.93],"6-90-1":[12.18,32.39],"6-90-2":[9.21,25.5],"6-90-3":[0.25,16.06],"6-90-4":[-11.93,1.31],"6-90-5":[-15.18,-4.47],"6-90-6":[-19.83,102.14],"6-90-7":[-28.89,97.21],"6-90-8":[-30.59,91.65],"6-90-9":[11.33,169.41],"6-90-10":[-26.48,102.52],"6-90-11":[16.21,130.71],"6-90-12":[-4.57,132.71],"6-90-13":[-44.99,965.27],"6-90-14":[341.61,1507.27],"6-90-15":[71.29,1151.88],"6-90-16":[241.76,4807.35],"6-90-17":[805.57,6513.21],"6-90-18":[1232.72,7543.41],"6-90-20":[101.67,5343.32],"6-90-21":[81.23,447.8],"6-90-22":[129.06,998],"6-90-19":[396.49,8087.96],"6-90-23":[-71.01,1264.93],"6-90-24":[-72.08,1499.22],"6-90-25":[-97.09,1527.78],"6-90-26":[-172.11,969.76],"6-90-27":[-189.5,1943.78],"6-90-28":[-199.61,132.05],"6-90-29":[-204.11,-76.78],"6-90-30":[-205.07,-73.55],"6-90-31":[-204.43,-69.28],"6-90-32":[-200.91,-74.1],"6-90-33":[-190.7,-82.52],"6-90-34":[-178.25,-74.83],"6-90-35":[-156.76,-64.37],"6-90-36":[-137.02,-52.73],"6-90-37":[-110.72,-40.93],"6-90-38":[-90.74,-28.8],"6-90-39":[-64.94,-19.04],"6-90-40":[-47.65,-9.27],"6-90-41":[-26.36,-1.84],"6-90-42":[-11.95,7.04],"6-90-43":[1.09,18.97],"6-90-44":[6.57,26.74],"6-90-45":[11.56,36.44],"6-90-46":[16.22,45.25],"6-90-47":[21.29,56.94],"6-90-48":[26.15,64.98],"6-90-49":[29.48,73.84],"6-90-50":[27.75,2779.41],"6-90-51":[30.57,74.05],"6-90-52":[29.34,65.8],"6-90-53":[23.63,58.34],"6-90-54":[20.44,50.44],"6-90-55":[17.32,44.95],"6-90-56":[15.75,1525.64],"6-90-57":[392.25,2210.25],"6-90-58":[1769.27,2619.19],"6-90-59":[2436.16,3487.6],"6-90-60":[3484.48,4037.87],"6-90-61":[3527.59,4030.9],"6-90-62":[3063.36,3530.31],"6-90-63":[-29.54,3064.82],"6-91-0":[13.58,29.33],"6-91-1":[12.18,31.01],"5-45-0":[12.18,32.39],"6-91-2":[8.56,24.24],"6-91-3":[-0.35,15.89],"5-45-1":[-0.35,25.5],"4-22-0":[-0.35,34.8],"6-91-4":[-13.02,0.37],"6-91-5":[-17.46,-5.58],"5-45-2":[-17.46,1.31],"6-91-6":[-20,102],"6-91-7":[-29.05,103.01],"5-45-3":[-29.05,103.01],"4-22-1":[-29.05,793.47],"6-91-8":[-29.05,81.75],"6-91-9":[-9.54,122.72],"5-45-4":[-30.59,169.41],"6-91-10":[-28.84,110.81],"6-91-11":[16.8,118.68],"5-45-5":[-28.84,130.71],"4-22-2":[-30.59,226.52],"6-91-12":[41.21,133.68],"6-91-13":[17.89,487.76],"5-45-6":[-44.99,965.27],"6-91-14":[131.95,1504.92],"6-91-15":[271.47,1384.81],"5-45-7":[71.29,1507.27],"4-22-3":[-52.7,1507.27],"6-91-16":[329.52,4930.95],"6-91-17":[1039.82,5827.63],"5-45-8":[241.76,6513.21],"6-91-18":[1051.98,6379.76],"6-91-19":[2249.39,8560.58],"5-45-9":[396.49,8560.58],"4-22-4":[49.18,8560.58],"6-91-20":[176.06,6725.08],"6-91-21":[96.74,4563.58],"5-45-10":[81.23,6725.08],"6-91-22":[31.65,732.76],"6-91-23":[133.09,994.23],"5-45-11":[-71.01,1264.93],"4-22-5":[-103.33,6725.08],"6-91-24":[88.59,1273.26],"6-91-25":[133.67,698.38],"5-45-12":[-97.09,1527.78],"6-91-26":[29.03,1069.77],"6-91-27":[-98.98,2543.22],"5-45-13":[-189.5,2543.22],"4-22-6":[-189.5,2543.22],"6-91-28":[-197.25,2590.24],"6-91-29":[-213.05,1544.94],"5-45-14":[-213.05,2590.24],"6-91-30":[-213.9,-102.05],"6-91-31":[-208.09,-100.58],"5-45-15":[-213.9,-69.28],"4-22-7":[-213.9,2590.24],"6-91-32":[-205.64,-96.41],"6-91-33":[-194.02,-89.47],"5-45-16":[-205.64,-74.1],"6-91-34":[-182.42,-79.86],"6-91-35":[-161.36,-69.08],"5-45-17":[-182.42,-64.37],"4-22-8":[-205.64,-37.6],"6-91-36":[-142.2,-57.49],"6-91-37":[-116.73,-45.58],"5-45-18":[-142.2,-40.93],"6-91-38":[-98.13,-34.54],"6-91-39":[-76.39,-24.5],"5-45-19":[-98.13,-19.04],"4-22-9":[-142.2,-8.66],"6-91-40":[-59.57,-14.97],"6-91-41":[-39.69,-6.64],"5-45-20":[-59.57,-1.84],"6-91-42":[-24.55,1.1],"6-91-43":[-6.24,12.33],"5-45-21":[-24.55,18.97],"4-22-10":[-59.57,31.3],"6-91-44":[3.69,23.13],"6-91-45":[-0.46,882.59],"5-45-22":[-0.46,882.59],"6-91-46":[14.12,40.84],"6-91-47":[18.73,51.83],"5-45-23":[14.12,56.94],"4-22-11":[-0.46,882.59],"6-91-48":[26.15,57.63],"6-91-49":[26.58,64.22],"5-45-24":[26.15,73.84],"6-91-50":[28.51,71.32],"6-91-51":[27.46,68.43],"5-45-25":[27.46,2779.41],"4-22-12":[-55.82,2779.41],"6-91-52":[27.54,61.22],"6-91-53":[23.63,57.26],"5-45-26":[23.63,65.8],"6-91-54":[18.37,46.65],"6-91-55":[17.3,38.66],"5-45-27":[17.3,50.44],"4-22-13":[17.3,72.08],"6-91-56":[15.75,1873.55],"6-91-57":[1472.92,2662.65],"5-45-28":[15.75,2662.65],"6-91-58":[2210.24,2841.83],"6-91-59":[2619.18,3506.71],"5-45-29":[1769.27,3506.71],"4-22-14":[13.9,3506.71],"6-91-60":[3487.59,4042.04],"6-91-61":[3516.4,4030.73],"5-45-30":[3484.48,4042.04],"6-91-62":[3063.05,3527.6],"6-91-63":[-29.54,3066.42],"5-45-31":[-29.54,3530.31],"4-22-15":[-29.54,4042.04],"6-92-0":[13.55,28.88],"6-92-1":[11.24,30.24],"6-92-2":[7.88,23.28],"6-92-3":[-1.45,283.89],"6-92-4":[-12.53,-0.34],"6-92-5":[-17.94,255.31],"6-92-6":[-21.31,243.75],"6-92-7":[-24.37,117.76],"6-92-8":[-24.37,64.43],"6-92-9":[-19.87,203.65],"6-92-10":[-30.16,114.52],"6-92-11":[9.32,125.15],"6-92-12":[63.09,235.48],"6-92-13":[48.15,478.3],"6-92-14":[109.62,1419.87],"6-92-15":[276.31,4532.62],"6-92-16":[432.35,6633.62],"6-92-17":[908.55,7087.4],"6-92-18":[1029.39,4976.93],"6-92-19":[1276.56,7022.3],"6-92-20":[2453.79,7194.47],"6-92-21":[35.37,7787.57],"6-92-22":[-15.2,295.99],"6-92-23":[-6.93,1069.67],"6-92-24":[29.9,1095.71],"6-92-25":[-88.56,1197.87],"6-92-26":[-182.75,1006.73],"6-92-27":[-197.07,1132.42],"6-92-28":[-198.18,434.8],"6-92-29":[-212.75,2430.45],"6-92-30":[-213.9,-101.01],"6-92-31":[-207.87,-100.16],"6-92-32":[-205.79,-94.42],"6-92-33":[-195,-88.59],"6-92-34":[-182.48,-79.41],"6-92-35":[-161.34,-70.63],"6-92-36":[-142.37,-59.67],"6-92-37":[-120.53,-49.07],"6-92-38":[-104.92,-39.42],"6-92-39":[-84.27,-29.78],"6-92-40":[-67.56,-20.85],"6-92-41":[-47.53,-12.67],"6-92-42":[-33.56,-4.07],"6-92-43":[-15.92,6.04],"6-92-44":[-3.11,19.27],"6-92-45":[3.14,28.24],"6-92-46":[9.41,36.29],"6-92-47":[15.61,46.42],"6-92-48":[19.59,52.39],"6-92-49":[23.34,58.26],"6-92-50":[24.55,61.51],"6-92-51":[20.83,56.57],"6-92-52":[20.97,56.29],"6-92-53":[20.93,53.7],"6-92-54":[15.67,43.92],"6-92-55":[14.25,36.25],"6-92-56":[15.39,2339.17],"6-92-57":[1873.54,2935.32],"6-92-58":[2662.64,3173.47],"6-92-59":[2841.82,3593.63],"6-92-60":[3506.7,4042.04],"6-92-61":[3499.19,4001.04],"6-92-62":[3062.85,3516.41],"6-92-63":[-29.54,3066.46],"6-93-0":[13.56,28.31],"6-93-1":[11.24,29.45],"5-46-0":[11.24,30.24],"6-93-2":[7.36,22.43],"6-93-3":[-1.93,13.28],"5-46-1":[-1.93,283.89],"6-93-4":[-12.52,9.42],"6-93-5":[-19.04,346.14],"5-46-2":[-19.04,346.14],"6-93-6":[-25.93,405.51],"6-93-7":[-28.7,174.16],"5-46-3":[-28.7,405.51],"6-93-8":[-19.06,149.97],"6-93-9":[-3.71,236.06],"5-46-4":[-24.37,236.06],"6-93-10":[-30.26,155.46],"6-93-11":[10.19,162.81],"5-46-5":[-30.26,162.81],"6-93-12":[-1.52,446.71],"6-93-13":[73.33,2380.4],"5-46-6":[-1.52,2380.4],"6-93-14":[23.35,2712],"6-93-15":[124.82,3961.77],"5-46-7":[23.35,4532.62],"6-93-16":[105.62,5107.74],"6-93-17":[837.93,3794.4],"5-46-8":[105.62,7087.4],"6-93-18":[954.9,6062.91],"6-93-19":[1693.3,6911.73],"5-46-9":[954.9,7022.3],"6-93-20":[4293.12,6600.18],"6-93-21":[81.18,8103.55],"5-46-10":[35.37,8103.55],"6-93-22":[-46.13,2512.35],"6-93-23":[-31.32,1178.46],"5-46-11":[-46.13,2512.35],"6-93-24":[-19.46,1262.43],"6-93-25":[-161.45,1608.79],"5-46-12":[-161.45,1608.79],"6-93-26":[-181.92,-37.98],"6-93-27":[-194.57,-86.28],"5-46-13":[-197.07,1132.42],"6-93-28":[-196.82,-88.67],"6-93-29":[-203.21,351.9],"5-46-14":[-212.75,2430.45],"6-93-30":[-206.92,-92.98],"6-93-31":[-203.79,-91.46],"5-46-15":[-213.9,-91.46],"6-93-32":[-197.97,-88.46],"6-93-33":[-185.94,-84.21],"5-46-16":[-205.79,-84.21],"6-93-34":[-175.59,-76.82],"6-93-35":[-155.42,-69.13],"5-46-17":[-182.48,-69.13],"6-93-36":[-142.66,-61.65],"6-93-37":[-126.46,-53.23],"5-46-18":[-142.66,-49.07],"6-93-38":[-113.57,-44.2],"6-93-39":[-92.35,-34.33],"5-46-19":[-113.57,-29.78],"6-93-40":[-75.45,-25.32],"6-93-41":[-57.43,-17.51],"5-46-20":[-75.45,-12.67],"6-93-42":[-43.87,-9.49],"6-93-43":[-26.53,-2.26],"5-46-21":[-43.87,6.04],"6-93-44":[-14.66,3.69],"6-93-45":[-1.24,17.7],"5-46-22":[-14.66,28.24],"6-93-46":[5.93,28.99],"6-93-47":[11.24,38.3],"5-46-23":[5.93,46.42],"6-93-48":[19.38,44.79],"6-93-49":[19.38,49.77],"5-46-24":[19.38,58.26],"6-93-50":[20.9,50.43],"6-93-51":[20.83,47.65],"5-46-25":[20.83,61.51],"6-93-52":[18.26,48.46],"6-93-53":[18.26,48.79],"5-46-26":[18.26,56.29],"6-93-54":[14.04,41],"6-93-55":[13.54,635.17],"5-46-27":[13.54,635.17],"6-93-56":[15.52,2519.02],"6-93-57":[2339.16,3197.54],"5-46-28":[15.39,3197.54],"6-93-58":[2935.31,3364.13],"6-93-59":[3109.51,3621.13],"5-46-29":[2662.64,3621.13],"6-93-60":[3593.62,4025.51],"6-93-61":[3480.01,3923.74],"5-46-30":[3480.01,4042.04],"6-93-62":[3063.46,3499.2],"6-93-63":[-29.54,3067.15],"5-46-31":[-29.54,3516.41],"6-94-0":[13.47,27.85],"6-94-1":[10.93,28.85],"6-94-2":[6.21,22.12],"6-94-3":[-2.74,11.48],"6-94-4":[-13.52,-1.43],"6-94-5":[-19.79,311.63],"6-94-6":[-11.52,248.42],"6-94-7":[-28.7,355.11],"6-94-8":[-17.9,176.8],"6-94-9":[-7.94,232.96],"6-94-10":[-30.83,204.28],"6-94-11":[21.88,252.1],"6-94-12":[-18.21,544.69],"6-94-13":[103.65,2652.03],"6-94-14":[329.84,4375.85],"6-94-15":[163.35,3786.97],"6-94-16":[217.97,5220.28],"6-94-17":[745.63,3644.02],"6-94-18":[804.64,6686.7],"6-94-19":[4212.17,6437.5],"6-94-20":[4352.91,6733.83],"6-94-21":[458.23,8019.76],"6-94-22":[-62.15,8777.15],"6-94-23":[-49.51,1317.62],"6-94-24":[-131.49,1124.07],"6-94-25":[-161,1331.06],"6-94-26":[-174.06,-73.06],"6-94-27":[-177.34,-76.23],"6-94-28":[-181.5,-77.26],"6-94-29":[-187.4,-77.29],"6-94-30":[-187.32,-78.62],"6-94-31":[-187.52,-78.17],"6-94-32":[-182.92,-76.46],"6-94-33":[-176.4,-74.65],"6-94-34":[-168.43,-71.13],"6-94-35":[-151.14,-67.72],"6-94-36":[-139.6,-60.57],"6-94-37":[-126.46,-54.12],"6-94-38":[-114.22,-45.3],"6-94-39":[-93.08,-37.72],"6-94-40":[-77.95,-29.61],"6-94-41":[-61.78,-22.17],"6-94-42":[-50.7,-14.14],"6-94-43":[-33.49,-7.53],"6-94-44":[-21.33,-1.23],"6-94-45":[-8.99,10.6],"6-94-46":[0.56,21.41],"6-94-47":[7.51,31.9],"6-94-48":[11.75,38.12],"6-94-49":[15.47,42.62],"6-94-50":[16.83,42.88],"6-94-51":[15.6,40.98],"6-94-52":[12.93,36.12],"6-94-53":[11.48,39.7],"6-94-54":[10.61,32.65],"6-94-55":[10.62,1029.1],"6-94-56":[635.16,2637.61],"6-94-57":[2519.01,3300.48],"6-94-58":[3197.53,3450.97],"6-94-59":[3321.28,3672.41],"6-94-60":[3621.12,3954.97],"6-94-61":[3420.25,3850.88],"6-94-62":[3064.94,3480.02],"6-94-63":[-29.54,3067.91],"6-95-0":[13.31,27.3],"6-95-1":[10.93,27.94],"5-47-0":[10.93,28.85],"6-95-2":[6.2,21.84],"6-95-3":[-3.28,10.22],"5-47-1":[-3.28,22.12],"4-23-0":[-3.28,283.89],"6-95-4":[-13.57,46.56],"6-95-5":[-14.69,348.59],"5-47-2":[-19.79,348.59],"6-95-6":[-9.39,401.33],"6-95-7":[-9.94,941.07],"5-47-3":[-28.7,941.07],"4-23-1":[-28.7,941.07],"3-11-0":[-29.05,941.07],"6-95-8":[-21.59,733.23],"6-95-9":[-13.86,628.73],"5-47-4":[-21.59,733.23],"6-95-10":[-32.57,242.85],"6-95-11":[53.1,262.78],"5-47-5":[-32.57,262.78],"4-23-2":[-32.57,733.23],"6-95-12":[74.14,2173.74],"6-95-13":[176.51,3529.7],"5-47-6":[-18.21,3529.7],"6-95-14":[474.07,4279.84],"6-95-15":[301.44,3328.41],"5-47-7":[163.35,4375.85],"4-23-3":[-18.21,4532.62],"3-11-1":[-52.7,4532.62],"2-5-0":[-251.81,4532.62],"6-95-16":[-260.5,4987.09],"6-95-17":[619.6,2654.79],"5-47-8":[-260.5,5220.28],"6-95-18":[731.86,6201.27],"6-95-19":[4444.41,6890.4],"5-47-9":[731.86,6890.4],"4-23-4":[-260.5,7087.4],"6-95-20":[4425.14,6254.63],"6-95-21":[988.33,7070.27],"5-47-10":[458.23,8019.76],"6-95-22":[-69.58,8478.4],"6-95-23":[-139.77,533.63],"5-47-11":[-139.77,8777.15],"4-23-5":[-139.77,8777.15],"3-11-2":[-260.5,8777.15],"6-95-24":[-131.42,26.16],"6-95-25":[-146.13,-61.4],"5-47-12":[-161,1331.06],"6-95-26":[-150.96,-63.4],"6-95-27":[-152.36,-64.19],"5-47-13":[-177.34,-63.4],"4-23-6":[-197.07,1608.79],"6-95-28":[-152.61,-62.12],"6-95-29":[-153.05,-59.77],"5-47-14":[-187.4,-59.77],"6-95-30":[-153.22,-59.81],"6-95-31":[-153.97,-60.33],"5-47-15":[-187.52,-59.81],"4-23-7":[-213.9,2430.45],"3-11-3":[-213.9,2590.24],"2-5-1":[-260.5,8777.15],"1-2-0":[-398.55,8777.15],"6-95-32":[-153.84,-61.96],"6-95-33":[-150.16,-62.76],"5-47-16":[-182.92,-61.96],"6-95-34":[-147.07,-63.18],"6-95-35":[-139.29,-62.21],"5-47-17":[-168.43,-62.21],"4-23-8":[-205.79,-61.96],"6-95-36":[-135.36,-58.3],"6-95-37":[-121.04,-51.25],"5-47-18":[-139.6,-51.25],"6-95-38":[-111.37,-44.8],"6-95-39":[-96.39,-38.31],"5-47-19":[-114.22,-37.72],"4-23-9":[-142.66,-29.78],"3-11-4":[-205.79,-8.66],"6-95-40":[-87.28,-30.97],"6-95-41":[-73.3,-25.9],"5-47-20":[-87.28,-22.17],"6-95-42":[-61.25,-17.39],"6-95-43":[-45.22,-11.38],"5-47-21":[-61.25,-7.53],"4-23-10":[-87.28,6.04],"6-95-44":[-34.87,-6.02],"6-95-45":[-20.9,0.57],"5-47-22":[-34.87,10.6],"6-95-46":[-8.31,12.66],"6-95-47":[2.81,22.59],"5-47-23":[-8.31,31.9],"4-23-11":[-34.87,46.42],"3-11-5":[-87.28,882.59],"2-5-2":[-205.79,3059.56],"6-95-48":[11.13,29.29],"6-95-49":[11.13,33.22],"5-47-24":[11.13,42.62],"6-95-50":[13.37,33.58],"6-95-51":[13.37,32.64],"5-47-25":[13.37,42.88],"4-23-12":[11.13,61.51],"6-95-52":[10.23,30.49],"6-95-53":[10.23,23.8],"5-47-26":[10.23,39.7],"6-95-54":[6.78,21.99],"6-95-55":[6.78,1290.06],"5-47-27":[6.78,1290.06],"4-23-13":[6.78,1290.06],"3-11-6":[-55.82,2779.41],"6-95-56":[1007.52,2688.65],"6-95-57":[2637.6,3479.02],"5-47-28":[635.16,3479.02],"6-95-58":[3300.47,3627.63],"6-95-59":[3450.96,3738.39],"5-47-29":[3197.53,3738.39],"4-23-14":[15.39,3738.39],"6-95-60":[3672.4,3883.62],"6-95-61":[3372.97,3781.94],"5-47-30":[3372.97,3954.97],"6-95-62":[3066.6,3420.26],"6-95-63":[-29.54,3069.78],"5-47-31":[-29.54,3480.02],"4-23-15":[-29.54,4042.04],"3-11-7":[-29.54,4042.04],"2-5-3":[-55.82,4042.04],"1-2-1":[-242.83,5869.55],"6-96-0":[13.05,27.12],"6-96-1":[10.66,27.25],"6-96-2":[6.32,21.6],"6-96-3":[-3.81,327.9],"6-96-4":[-13.97,41.97],"6-96-5":[-14.52,491.93],"6-96-6":[-12.84,766.61],"6-96-7":[15.52,1577.7],"6-96-8":[23.06,974.81],"6-96-9":[0.51,751.03],"6-96-10":[-32.17,917.02],"6-96-11":[22.51,457.27],"6-96-12":[87.23,1266.17],"6-96-13":[216.38,3266],"6-96-14":[707.82,4151.48],"6-96-15":[820.5,4116.23],"6-96-16":[-31.39,3824.31],"6-96-17":[290.2,2504.01],"6-96-18":[1263.81,5909.96],"6-96-19":[3248.18,6767.17],"6-96-20":[4109.93,6522.84],"6-96-21":[2989.51,7463.69],"6-96-22":[-83.69,7512.84],"6-96-23":[-109,1663.78],"6-96-24":[-122.52,1062.24],"6-96-25":[-126.56,-53.86],"6-96-26":[-128.85,-59.44],"6-96-27":[-129.38,407.51],"6-96-28":[-128.18,114.95],"6-96-29":[-123.94,-53.59],"6-96-30":[-121.58,-48.89],"6-96-31":[-126.69,-47.66],"6-96-32":[-127.67,-47.94],"6-96-33":[-128.62,-48.79],"6-96-34":[-129.46,-51.46],"6-96-35":[-129.43,-54.63],"6-96-36":[-128.76,-55.19],"6-96-37":[-118.48,-52.16],"6-96-38":[-109.45,-47.88],"6-96-39":[-96.5,-43.64],"6-96-40":[-90.53,-37.51],"6-96-41":[-79.29,-30.63],"6-96-42":[-69.21,-23.04],"6-96-43":[-55.83,-17.8],"6-96-44":[-44.21,-11.23],"6-96-45":[-29.81,-4.63],"6-96-46":[-17.32,4.18],"6-96-47":[-2.33,15.19],"6-96-48":[3,21.54],"6-96-49":[6.76,26.13],"6-96-50":[9.32,27.61],"6-96-51":[9.2,26.58],"6-96-52":[7.16,26.06],"6-96-53":[2.39,19.5],"6-96-54":[2.39,14.94],"6-96-55":[3.38,1584.77],"6-96-56":[1290.05,2802.12],"6-96-57":[2688.64,3518.93],"6-96-58":[3479.01,3704.38],"6-96-59":[3627.62,3756.39],"6-96-60":[3652.33,3799.9],"6-96-61":[3341.14,3696.84],"6-96-62":[3068.58,3372.98],"6-96-63":[-29.54,3073.17],"6-97-0":[12.85,27.04],"6-97-1":[10.66,26.67],"5-48-0":[10.66,27.25],"6-97-2":[5.88,21.3],"6-97-3":[-5.43,785.33],"5-48-1":[-5.43,785.33],"6-97-4":[-15.46,476.72],"6-97-5":[-7.89,604.4],"5-48-2":[-15.46,604.4],"6-97-6":[-13.92,806.23],"6-97-7":[44.76,1618.98],"5-48-3":[-13.92,1618.98],"6-97-8":[91.31,1177.41],"6-97-9":[10.89,764.98],"5-48-4":[0.51,1177.41],"6-97-10":[-24.59,1092.04],"6-97-11":[-3.1,823.06],"5-48-5":[-32.17,1092.04],"6-97-12":[74.37,2561.56],"6-97-13":[260.85,2677.49],"5-48-6":[74.37,3266],"6-97-14":[697.66,2882.06],"6-97-15":[906.92,4155.27],"5-48-7":[697.66,4155.27],"6-97-16":[219.52,4825.04],"6-97-17":[271.2,4733.64],"5-48-8":[-31.39,4825.04],"6-97-18":[2241.79,5772.12],"6-97-19":[2644.39,6131.65],"5-48-9":[1263.81,6767.17],"6-97-20":[3253.98,6237.58],"6-97-21":[107.58,7221.31],"5-48-10":[107.58,7463.69],"6-97-22":[-53.33,5335.5],"6-97-23":[-92.67,2777.96],"5-48-11":[-109,7512.84],"6-97-24":[-99.38,3021.9],"6-97-25":[-120.76,1489.97],"5-48-12":[-126.56,3021.9],"6-97-26":[-124.46,365.67],"6-97-27":[-120.57,671.16],"5-48-13":[-129.38,671.16],"6-97-28":[-127.91,253.16],"6-97-29":[-120.45,634.69],"5-48-14":[-128.18,634.69],"6-97-30":[-106.53,2140.29],"6-97-31":[-94.44,-30.37],"5-48-15":[-126.69,2140.29],"6-97-32":[-93.37,-30.41],"6-97-33":[-100.58,-33.35],"5-48-16":[-128.62,-30.41],"6-97-34":[-105.96,-38.16],"6-97-35":[-109.16,-42.72],"5-48-17":[-129.46,-38.16],"6-97-36":[-110.94,-44.59],"6-97-37":[-107.55,-47.06],"5-48-18":[-128.76,-44.59],"6-97-38":[-103.96,-48.28],"6-97-39":[-97.49,-45.28],"5-48-19":[-109.45,-43.64],"6-97-40":[-91.36,-40.59],"6-97-41":[-84.52,-34.82],"5-48-20":[-91.36,-30.63],"6-97-42":[-74.46,-27.37],"6-97-43":[-60.54,-22.77],"5-48-21":[-74.46,-17.8],"6-97-44":[-55.82,-16.33],"6-97-45":[-41.68,-9.34],"5-48-22":[-55.82,-4.63],"6-97-46":[-29.34,-2.32],"6-97-47":[-13.57,4.79],"5-48-23":[-29.34,15.19],"6-97-48":[-3.72,11.69],"6-97-49":[2.56,17.71],"5-48-24":[-3.72,26.13],"6-97-50":[5.93,18.3],"6-97-51":[6.01,18.13],"5-48-25":[5.93,27.61],"6-97-52":[3.78,17.87],"6-97-53":[-1.51,12.15],"5-48-26":[-1.51,26.06],"6-97-54":[-2.2,7.25],"6-97-55":[-0.05,1584.77],"5-48-27":[-2.2,1584.77],"6-97-56":[1497.42,2824.51],"6-97-57":[2802.11,3500.23],"5-48-28":[1290.05,3518.93],"6-97-58":[3409.99,3719.54],"6-97-59":[3704.37,3755.97],"5-48-29":[3409.99,3756.39],"6-97-60":[3612.81,3775.22],"6-97-61":[3317.34,3652.34],"5-48-30":[3317.34,3799.9],"6-97-62":[3069.22,3341.15],"6-97-63":[-29.54,3074.67],"5-48-31":[-29.54,3372.98],"6-98-0":[12.57,27.03],"6-98-1":[10.26,26.35],"6-98-2":[4.57,21],"6-98-3":[-6.42,915.41],"6-98-4":[-16.48,237.04],"6-98-5":[-7.98,810.48],"6-98-6":[-11.47,688.57],"6-98-7":[12.53,1569.96],"6-98-8":[124.42,1090.5],"6-98-9":[50.44,887.64],"6-98-10":[-27,775.1],"6-98-11":[69.08,615.55],"6-98-12":[151.22,2887.36],"6-98-13":[660.12,2999.01],"6-98-14":[1179.37,3482.56],"6-98-15":[1006.26,3928.85],"6-98-16":[422.97,2953.75],"6-98-17":[1074.68,5415.08],"6-98-18":[2272.72,5725.81],"6-98-19":[2617.61,5462.57],"6-98-20":[3023.42,5731.48],"6-98-21":[133.36,6535.05],"6-98-22":[23.08,5106.11],"6-98-23":[12.3,3346.34],"6-98-24":[-17.38,2464.8],"6-98-25":[-86.67,2574.03],"6-98-26":[-135.7,1748.97],"6-98-27":[-96.39,1498.37],"6-98-28":[-92.56,1085.71],"6-98-29":[-80.53,550.46],"6-98-30":[-71.73,3433.72],"6-98-31":[-71.07,1843.03],"6-98-32":[-66.71,243],"6-98-33":[-76.31,-20.39],"6-98-34":[-86.19,-23.44],"6-98-35":[-91.28,-29.19],"6-98-36":[-94.14,-13.36],"6-98-37":[-101.07,-41.41],"6-98-38":[-100.77,-44.67],"6-98-39":[-96.25,-45.32],"6-98-40":[-93.34,-42.41],"6-98-41":[-85,-35.94],"6-98-42":[-76.44,-31.6],"6-98-43":[-68.5,-27.91],"6-98-44":[-62.86,-21.68],"6-98-45":[-50.56,-14.99],"6-98-46":[-38.51,-7.65],"6-98-47":[-23.36,-2.19],"6-98-48":[-12.63,4.07],"6-98-49":[-1.83,10.05],"6-98-50":[0.77,11.74],"6-98-51":[1.97,12.17],"6-98-52":[-0.24,11.35],"6-98-53":[-6.56,6.36],"6-98-54":[-6.92,6.59],"6-98-55":[-6.32,1715.72],"6-98-56":[1527.57,2802.84],"6-98-57":[2705.17,3410],"6-98-58":[3387.34,3708.3],"6-98-59":[3611.48,3736.73],"6-98-60":[3543.29,3737.71],"6-98-61":[3284.66,3612.82],"6-98-62":[3070.76,3317.35],"6-98-63":[-29.54,3075.47],"6-99-0":[12.31,27.01],"6-99-1":[10.26,25.84],"5-49-0":[10.26,27.03],"6-99-2":[4.57,20.48],"6-99-3":[-6.18,969.4],"5-49-1":[-6.42,969.4],"4-24-0":[-6.42,969.4],"6-99-4":[-16.18,517.22],"6-99-5":[-8.15,590],"5-49-2":[-16.48,810.48],"6-99-6":[-11.65,855.64],"6-99-7":[102.24,1354.63],"5-49-3":[-11.65,1569.96],"4-24-1":[-16.48,1618.98],"6-99-8":[120.14,1086.98],"6-99-9":[86.63,868.73],"5-49-4":[50.44,1090.5],"6-99-10":[-31.02,599.89],"6-99-11":[80.02,729.83],"5-49-5":[-31.02,775.1],"4-24-2":[-32.17,1177.41],"6-99-12":[187.08,2274.47],"6-99-13":[527.52,3424.72],"5-49-6":[151.22,3424.72],"6-99-14":[1035.39,3181.14],"6-99-15":[1160.58,3821.64],"5-49-7":[1006.26,3928.85],"4-24-3":[74.37,4155.27],"6-99-16":[637.58,3902.64],"6-99-17":[836.31,3828.18],"5-49-8":[422.97,5415.08],"6-99-18":[1288.02,5499.12],"6-99-19":[2175.47,6216.6],"5-49-9":[1288.02,6216.6],"4-24-4":[-31.39,6767.17],"6-99-20":[2779.55,6063.79],"6-99-21":[1586.78,6434.65],"5-49-10":[133.36,6535.05],"6-99-22":[657.1,5432.09],"6-99-23":[300.67,3530.75],"5-49-11":[12.3,5432.09],"4-24-5":[-109,7512.84],"6-99-24":[129.64,2554.75],"6-99-25":[-17.17,2536.99],"5-49-12":[-86.67,2574.03],"6-99-26":[-78.1,2080.04],"6-99-27":[-90.57,2009.72],"5-49-13":[-135.7,2080.04],"4-24-6":[-135.7,3021.9],"6-99-28":[-65.06,1760.05],"6-99-29":[-72.95,1543.06],"5-49-14":[-92.56,1760.05],"6-99-30":[-57.01,2251.47],"6-99-31":[-38.89,2884.86],"5-49-15":[-71.73,3433.72],"4-24-7":[-128.18,3433.72],"6-99-32":[-81.91,3098.13],"6-99-33":[-45.75,302.5],"5-49-16":[-81.91,3098.13],"6-99-34":[-54.35,-15.47],"6-99-35":[-71.17,-18.5],"5-49-17":[-91.28,-15.47],"4-24-8":[-129.46,3098.13],"6-99-36":[-82.83,-25.9],"6-99-37":[-88.25,-33.31],"5-49-18":[-101.07,-13.36],"6-99-38":[-94.27,-41.22],"6-99-39":[-95.18,-42.76],"5-49-19":[-100.77,-41.22],"4-24-9":[-128.76,-13.36],"6-99-40":[-92.2,-40.17],"6-99-41":[-83.68,-35.94],"5-49-20":[-93.34,-35.94],"6-99-42":[-78.69,-34.93],"6-99-43":[-74.99,-31.99],"5-49-21":[-78.69,-27.91],"4-24-10":[-93.34,-17.8],"6-99-44":[-72.56,-26.45],"6-99-45":[-59.76,-19.83],"5-49-22":[-72.56,-14.99],"6-99-46":[-48.96,-13.12],"6-99-47":[-34.76,-6.95],"5-49-23":[-48.96,-2.19],"4-24-11":[-72.56,15.19],"6-99-48":[-22.48,-1.82],"6-99-49":[-11.77,0.78],"5-49-24":[-22.48,10.05],"6-99-50":[-6.68,3.52],"6-99-51":[-3.06,3.63],"5-49-25":[-6.68,12.17],"4-24-12":[-22.48,27.61],"6-99-52":[-6.11,2.94],"6-99-53":[-14.49,-0.23],"5-49-26":[-14.49,11.35],"6-99-54":[-16.12,2.4],"6-99-55":[-5.53,1741.17],"5-49-27":[-16.12,1741.17],"4-24-13":[-16.12,1741.17],"6-99-56":[1318.62,2705.18],"6-99-57":[2640.6,3387.35],"5-49-28":[1318.62,3410],"6-99-58":[3292.46,3611.49],"6-99-59":[3525.75,3694.95],"5-49-29":[3292.46,3736.73],"4-24-14":[1290.05,3756.39],"6-99-60":[3433.71,3696.05],"6-99-61":[3240.36,3543.3],"5-49-30":[3240.36,3737.71],"6-99-62":[3070.72,3284.67],"6-99-63":[-29.54,3075.96],"5-49-31":[-29.54,3317.35],"4-24-15":[-29.54,3799.9],"6-100-0":[12.14,26.99],"6-100-1":[10.27,25.24],"6-100-2":[3.43,20.53],"6-100-3":[-0.76,788.17],"6-100-4":[-13.05,864.96],"6-100-5":[-6.27,624.53],"6-100-6":[-13.4,737.36],"6-100-7":[45.51,676.85],"6-100-8":[147.98,958.88],"6-100-9":[114.45,855.83],"6-100-10":[-24.8,555.66],"6-100-11":[130.97,852.88],"6-100-12":[253.49,918],"6-100-13":[346.44,3194.59],"6-100-14":[732.53,2295.19],"6-100-15":[986.95,3379.04],"6-100-16":[844.64,3558.09],"6-100-17":[745.38,1902.58],"6-100-18":[1168.55,5176.87],"6-100-19":[1398.27,4952.19],"6-100-20":[475.77,6100.38],"6-100-21":[222.1,7111.28],"6-100-22":[347.18,4334.26],"6-100-23":[41.06,3117.27],"6-100-24":[36.19,3084.02],"6-100-25":[52.6,2792.64],"6-100-26":[-35.3,1323.34],"6-100-27":[-72.12,1726.89],"6-100-28":[-49.94,1062.2],"6-100-29":[-35.14,1503.56],"6-100-30":[-117.38,2181.1],"6-100-31":[-68.74,1252.6],"6-100-32":[-20.47,3783.24],"6-100-33":[-69.41,3170.1],"6-100-34":[-37.01,1.6],"6-100-35":[-51.44,-9.86],"6-100-36":[-64.35,-13.79],"6-100-37":[-82.44,-27.14],"6-100-38":[-86.64,-34.46],"6-100-39":[-87.84,-34.63],"6-100-40":[-85.52,-36.5],"6-100-41":[-80.19,-37.62],"6-100-42":[-78.68,-37.25],"6-100-43":[-81.4,-35.65],"6-100-44":[-80.06,-30.59],"6-100-45":[-66.32,-24.76],"6-100-46":[-55.39,-18.12],"6-100-47":[-41.05,-11.56],"6-100-48":[-30.56,-6.29],"6-100-49":[-19.26,-3.51],"6-100-50":[-13.29,-1.45],"6-100-51":[-9.52,-0.85],"6-100-52":[-12.52,-1.6],"6-100-53":[-17.41,-3.38],"6-100-54":[-19.91,-2],"6-100-55":[-15.87,1791.71],"6-100-56":[1558.66,2640.61],"6-100-57":[2600.88,3292.47],"6-100-58":[3117.94,3525.76],"6-100-59":[3441.92,3605.31],"6-100-60":[3363.73,3601.4],"6-100-61":[3196.66,3433.72],"6-100-62":[3070.69,3240.37],"6-100-63":[-29.54,3075.89],"6-101-0":[12.06,26.97],"6-101-1":[10.27,24.01],"5-50-0":[10.27,26.99],"6-101-2":[1.88,20.61],"6-101-3":[-0.04,776.54],"5-50-1":[-0.76,788.17],"6-101-4":[-9.34,841.94],"6-101-5":[-23.59,832.71],"5-50-2":[-23.59,864.96],"6-101-6":[-24.81,718.4],"6-101-7":[121.13,1011.68],"5-50-3":[-24.81,1011.68],"6-101-8":[224.5,929.44],"6-101-9":[162.57,836.04],"5-50-4":[114.45,958.88],"6-101-10":[-27.02,706.58],"6-101-11":[88.71,984.1],"5-50-5":[-27.02,984.1],"6-101-12":[253.55,1472.91],"6-101-13":[369.08,2280.07],"5-50-6":[253.49,3194.59],"6-101-14":[518.21,1985.15],"6-101-15":[932.38,2132.01],"5-50-7":[518.21,3379.04],"6-101-16":[778.87,2678.17],"6-101-17":[651.88,2311.12],"5-50-8":[651.88,3558.09],"6-101-18":[992.38,3502.2],"6-101-19":[629.17,4106.19],"5-50-9":[629.17,5176.87],"6-101-20":[194.36,4524.83],"6-101-21":[96.37,1942.57],"5-50-10":[96.37,7111.28],"6-101-22":[245.14,2858.21],"6-101-23":[21.03,2530.43],"5-50-11":[21.03,4334.26],"6-101-24":[-94.3,2937.63],"6-101-25":[-56.68,2686.47],"5-50-12":[-94.3,3084.02],"6-101-26":[-2.53,1984.96],"6-101-27":[-62.53,1793.02],"5-50-13":[-72.12,1984.96],"6-101-28":[-88.98,988.31],"6-101-29":[-13.69,296.81],"5-50-14":[-88.98,1503.56],"6-101-30":[-7.26,564.09],"6-101-31":[-34.24,1041.7],"5-50-15":[-117.38,2181.1],"6-101-32":[-50.63,1126.85],"6-101-33":[-55.36,2229.43],"5-50-16":[-69.41,3783.24],"6-101-34":[-36.88,2218.28],"6-101-35":[-23.97,362.89],"5-50-17":[-51.44,2218.28],"6-101-36":[-50.01,-8.05],"6-101-37":[-67.22,-17.95],"5-50-18":[-82.44,-8.05],"6-101-38":[-72.92,-27.95],"6-101-39":[-72.68,-32.21],"5-50-19":[-87.84,-27.95],"6-101-40":[-76.24,-33.32],"6-101-41":[-78.06,-36.98],"5-50-20":[-85.52,-33.32],"6-101-42":[-80.1,-38.14],"6-101-43":[-82.02,-39.33],"5-50-21":[-82.02,-35.65],"6-101-44":[-82.43,-34.06],"6-101-45":[-71.27,-28.18],"5-50-22":[-82.43,-24.76],"6-101-46":[-62.71,-21.81],"6-101-47":[-49.64,-15.77],"5-50-23":[-62.71,-11.56],"6-101-48":[-39.39,-10.57],"6-101-49":[-28.16,-7.19],"5-50-24":[-39.39,-3.51],"6-101-50":[-21.77,-4.94],"6-101-51":[-17.14,-4.86],"5-50-25":[-21.77,-0.85],"6-101-52":[-18.23,-5.13],"6-101-53":[-25.73,-6.91],"5-50-26":[-25.73,-1.6],"6-101-54":[-26.47,-8.94],"6-101-55":[-27.05,1793.86],"5-50-27":[-27.05,1793.86],"6-101-56":[1569.31,2600.89],"6-101-57":[2518.51,3117.95],"5-50-28":[1558.66,3292.47],"6-101-58":[2973.88,3441.93],"6-101-59":[3288.11,3528.69],"5-50-29":[2973.88,3605.31],"6-101-60":[3280.25,3498.6],"6-101-61":[3169.63,3363.74],"5-50-30":[3169.63,3601.4],"6-101-62":[3069.83,3196.67],"6-101-63":[-29.54,3075.29],"5-50-31":[-29.54,3240.37],"6-102-0":[12.03,26.96],"6-102-1":[10.02,23.17],"6-102-2":[1.63,20.52],"6-102-3":[-0.71,3.6],"6-102-4":[-9.34,927.44],"6-102-5":[-21.44,1119.08],"6-102-6":[-21.06,734.39],"6-102-7":[132.34,887.81],"6-102-8":[166.72,947.89],"6-102-9":[178.95,743.5],"6-102-10":[-23.46,607.14],"6-102-11":[188.2,1969.85],"6-102-12":[317.03,2509.72],"6-102-13":[401.97,1987.12],"6-102-14":[522.51,2758.43],"6-102-15":[862.62,2221.84],"6-102-16":[705.9,1397.18],"6-102-17":[902.24,2304.17],"6-102-18":[874.91,1918.57],"6-102-19":[285.5,3718.19],"6-102-20":[36.4,3019.64],"6-102-21":[48.41,2199.58],"6-102-22":[81.86,2506.96],"6-102-23":[-4.49,1720.45],"6-102-24":[-110.94,1495.1],"6-102-25":[-45.58,1791.56],"6-102-26":[-43.69,2581.3],"6-102-27":[-24.82,2426.49],"6-102-28":[-33.45,1298.21],"6-102-29":[2.64,41.22],"6-102-30":[-11.18,1014.85],"6-102-31":[-30.38,1601.85],"6-102-32":[-4.18,1034.19],"6-102-33":[5.39,373.32],"6-102-34":[-27.49,3442.9],"6-102-35":[-16.46,32.46],"6-102-36":[-35.92,-0.17],"6-102-37":[-55.89,-9.77],"6-102-38":[-63.68,-20.55],"6-102-39":[-67.07,-25.59],"6-102-40":[-74.45,-31.39],"6-102-41":[-78.87,-34.22],"6-102-42":[-80.62,-38.59],"6-102-43":[-81.5,-37.5],"6-102-44":[-81.55,-36.82],"6-102-45":[-75.32,-31.36],"6-102-46":[-66.17,-25.52],"6-102-47":[-55.15,-19.95],"6-102-48":[-45.84,-14.58],"6-102-49":[-34.14,-11.03],"6-102-50":[-27.4,-8.6],"6-102-51":[-22.98,-8.32],"6-102-52":[-24.4,-8.55],"6-102-53":[-30.23,-9.28],"6-102-54":[-36.54,-12.51],"6-102-55":[-33.13,1569.32],"6-102-56":[1087.42,2518.52],"6-102-57":[2491.99,2973.89],"6-102-58":[2898.38,3288.12],"6-102-59":[3218.55,3458.77],"6-102-60":[3217.24,3410.38],"6-102-61":[3122.29,3280.26],"6-102-62":[3068.02,3169.64],"6-102-63":[-29.54,3074.68],"6-103-0":[11.81,26.94],"6-103-1":[10.02,22.97],"5-51-0":[10.02,26.96],"6-103-2":[1.76,20.03],"6-103-3":[-4.68,2.37],"5-51-1":[-4.68,20.52],"4-25-0":[-4.68,788.17],"6-103-4":[-7.07,732.27],"6-103-5":[-18.39,1038.7],"5-51-2":[-21.44,1119.08],"6-103-6":[-8.22,689.79],"6-103-7":[42.21,820.66],"5-51-3":[-21.06,887.81],"4-25-1":[-24.81,1119.08],"3-12-0":[-24.81,1618.98],"6-103-8":[142.66,871.07],"6-103-9":[190.73,581.35],"5-51-4":[142.66,947.89],"6-103-10":[-22.83,599.15],"6-103-11":[157.28,2526.11],"5-51-5":[-23.46,2526.11],"4-25-2":[-27.02,2526.11],"6-103-12":[409.57,2781.93],"6-103-13":[538.79,2000.38],"5-51-6":[317.03,2781.93],"6-103-14":[796.86,2483.46],"6-103-15":[786,1631.54],"5-51-7":[522.51,2758.43],"4-25-3":[253.49,3379.04],"3-12-1":[-32.17,4155.27],"6-103-16":[657.03,1440.56],"6-103-17":[814.48,2312.81],"5-51-8":[657.03,2312.81],"6-103-18":[461.77,2785.32],"6-103-19":[90.97,2608.85],"5-51-9":[90.97,3718.19],"4-25-4":[90.97,5176.87],"6-103-20":[-14.6,3075.61],"6-103-21":[-41.04,2284.9],"5-51-10":[-41.04,3075.61],"6-103-22":[6.19,2090.39],"6-103-23":[-33.9,1930.57],"5-51-11":[-33.9,2506.96],"4-25-5":[-41.04,7111.28],"3-12-2":[-109,7512.84],"6-103-24":[-68.73,1683.1],"6-103-25":[-50.32,1775.49],"5-51-12":[-110.94,1791.56],"6-103-26":[-15.99,22.84],"6-103-27":[-1.31,35.12],"5-51-13":[-43.69,2581.3],"4-25-6":[-110.94,3084.02],"6-103-28":[7.05,50.12],"6-103-29":[13.68,63.16],"5-51-14":[-33.45,1298.21],"6-103-30":[17.55,93.68],"6-103-31":[-60.48,1707.53],"5-51-15":[-60.48,1707.53],"4-25-7":[-117.38,2181.1],"3-12-3":[-135.7,3433.72],"6-103-32":[-5.21,1767.47],"6-103-33":[16.48,98.63],"5-51-16":[-5.21,1767.47],"6-103-34":[-32.43,3363.43],"6-103-35":[-8.1,36.62],"5-51-17":[-32.43,3442.9],"4-25-8":[-69.41,3783.24],"6-103-36":[-20.48,14.72],"6-103-37":[-39.42,-2.58],"5-51-18":[-55.89,14.72],"6-103-38":[-48.07,-12.98],"6-103-39":[-62.92,-19.51],"5-51-19":[-67.07,-12.98],"4-25-9":[-87.84,14.72],"3-12-4":[-129.46,3783.24],"6-103-40":[-67.31,-22.53],"6-103-41":[-76.31,-23.36],"5-51-20":[-78.87,-22.53],"6-103-42":[-79.55,-31.81],"6-103-43":[-79.53,-36.31],"5-51-21":[-81.5,-31.81],"4-25-10":[-85.52,-22.53],"6-103-44":[-81.64,-36.17],"6-103-45":[-78.43,-33.2],"5-51-22":[-81.64,-31.36],"6-103-46":[-69.24,-28.58],"6-103-47":[-59.94,-23.25],"5-51-23":[-69.24,-19.95],"4-25-11":[-82.43,-11.56],"3-12-5":[-93.34,15.19],"6-103-48":[-51.3,-17.94],"6-103-49":[-40.42,-14.13],"5-51-24":[-51.3,-11.03],"6-103-50":[-34.48,-12.04],"6-103-51":[-30.95,-11.71],"5-51-25":[-34.48,-8.32],"4-25-12":[-51.3,-0.85],"6-103-52":[-31.64,-11.83],"6-103-53":[-39.3,-12.7],"5-51-26":[-39.3,-8.55],"6-103-54":[-43.14,-15.55],"6-103-55":[-38.79,1241.72],"5-51-27":[-43.14,1569.32],"4-25-13":[-43.14,1793.86],"3-12-6":[-51.3,1793.86],"6-103-56":[767.03,2536.98],"6-103-57":[2496.32,2925.63],"5-51-28":[767.03,2973.89],"6-103-58":[2895.28,3218.56],"6-103-59":[3190.5,3373.24],"5-51-29":[2895.28,3458.77],"4-25-14":[767.03,3605.31],"6-103-60":[3144.58,3368.42],"6-103-61":[3056.95,3217.25],"5-51-30":[3056.95,3410.38],"6-103-62":[3059.08,3122.3],"6-103-63":[-29.54,3072.12],"5-51-31":[-29.54,3169.64],"4-25-15":[-29.54,3601.4],"3-12-7":[-29.54,3799.9],"6-104-0":[11.39,26.93],"6-104-1":[9.9,23.02],"6-104-2":[2.36,20.31],"6-104-3":[-6,3.25],"6-104-4":[-6,82.84],"6-104-5":[-17.31,495.96],"6-104-6":[-8.77,399.1],"6-104-7":[13.61,491.06],"6-104-8":[115.43,750.89],"6-104-9":[116.1,561.53],"6-104-10":[-21.96,1677.59],"6-104-11":[150.22,2530.45],"6-104-12":[479.34,2992.37],"6-104-13":[504.85,1634.35],"6-104-14":[575.67,1654.73],"6-104-15":[617.47,1754.54],"6-104-16":[880.33,1742.15],"6-104-17":[128.34,2838.35],"6-104-18":[-3.88,3047.6],"6-104-19":[5.77,1847.96],"6-104-20":[-14.28,1280.51],"6-104-21":[-154.55,1772.77],"6-104-22":[-30.87,2103.76],"6-104-23":[-95.56,1877.29],"6-104-24":[-70.08,953.51],"6-104-25":[-6.17,27.99],"6-104-26":[3.36,44.5],"6-104-27":[10.3,55.83],"6-104-28":[17.56,73.24],"6-104-29":[25.67,79.68],"6-104-30":[10.65,2422.76],"6-104-31":[29.67,2305.23],"6-104-32":[6.49,2345.05],"6-104-33":[23.54,1325.52],"6-104-34":[-20.93,3699.18],"6-104-35":[4.34,1042.4],"6-104-36":[-2.59,22.64],"6-104-37":[-24.91,7.42],"6-104-38":[-38.06,-5.3],"6-104-39":[-58.73,307.87],"6-104-40":[-68.83,370.75],"6-104-41":[-63.64,291.1],"6-104-42":[-75.39,303.79],"6-104-43":[-77.46,189.43],"6-104-44":[-81.92,202.32],"6-104-45":[-78.44,-34.62],"6-104-46":[-69.89,-30.52],"6-104-47":[-61.52,-25.77],"6-104-48":[-54.23,-20.78],"6-104-49":[-44.26,-17.39],"6-104-50":[-39.25,-15.56],"6-104-51":[-36.43,-15.24],"6-104-52":[-37.17,-15.45],"6-104-53":[-45.54,-15.94],"6-104-54":[-46.98,-19.12],"6-104-55":[-44.18,1300.89],"6-104-56":[486.82,2508.46],"6-104-57":[2399.34,2971.73],"6-104-58":[2925.62,3190.51],"6-104-59":[3187.99,3320.02],"6-104-60":[3081.53,3317.03],"6-104-61":[2940.53,3144.59],"6-104-62":[3024.22,3080.43],"6-104-63":[-29.54,3069.68],"6-105-0":[11.09,26.9],"6-105-1":[9.45,22.95],"5-52-0":[9.45,26.93],"6-105-2":[2.76,20.29],"6-105-3":[-5.31,3.8],"5-52-1":[-6,20.31],"6-105-4":[-5.65,-0.65],"6-105-5":[-15.13,237.7],"5-52-2":[-17.31,495.96],"6-105-6":[-2.03,277.08],"6-105-7":[17.85,385.91],"5-52-3":[-8.77,491.06],"6-105-8":[110.65,448.35],"6-105-9":[56.9,380.42],"5-52-4":[56.9,750.89],"6-105-10":[-16.13,1615.07],"6-105-11":[217.51,2962.65],"5-52-5":[-21.96,2962.65],"6-105-12":[454.52,2450.24],"6-105-13":[406.43,1532.32],"5-52-6":[406.43,2992.37],"6-105-14":[432.23,1232.86],"6-105-15":[549.84,1464.19],"5-52-7":[432.23,1754.54],"6-105-16":[730.4,2060.03],"6-105-17":[-64.08,2407.63],"5-52-8":[-64.08,2838.35],"6-105-18":[-63.81,805.59],"6-105-19":[-16.17,1519.8],"5-52-9":[-63.81,3047.6],"6-105-20":[-33.57,1755.88],"6-105-21":[-69.59,1735.53],"5-52-10":[-154.55,1772.77],"6-105-22":[4.65,2160.72],"6-105-23":[-47.98,1800.52],"5-52-11":[-95.56,2160.72],"6-105-24":[1.5,35.14],"6-105-25":[6.58,52.59],"5-52-12":[-70.08,953.51],"6-105-26":[13.99,67.42],"6-105-27":[22.24,82.34],"5-52-13":[3.36,82.34],"6-105-28":[30.08,2125.15],"6-105-29":[13.27,4108.68],"5-52-14":[13.27,4108.68],"6-105-30":[17.77,2687.61],"6-105-31":[15.58,2267.3],"5-52-15":[10.65,2687.61],"6-105-32":[-40.37,1916.44],"6-105-33":[6.53,1738.04],"5-52-16":[-40.37,2345.05],"6-105-34":[14.43,3755.88],"6-105-35":[-28.54,2972.87],"5-52-17":[-28.54,3755.88],"6-105-36":[3.7,35.22],"6-105-37":[-12.09,21.02],"5-52-18":[-24.91,35.22],"6-105-38":[-24.32,2.72],"6-105-39":[-35.25,1205.98],"5-52-19":[-58.73,1205.98],"6-105-40":[29.13,1196.06],"6-105-41":[167.75,715.25],"5-52-20":[-68.83,1196.06],"6-105-42":[-14.21,662],"6-105-43":[-99.76,566.35],"5-52-21":[-99.76,662],"6-105-44":[-78.53,969.34],"6-105-45":[-78.21,-34.74],"5-52-22":[-81.92,969.34],"6-105-46":[-69.94,-30.98],"6-105-47":[-61.91,-27.2],"5-52-23":[-69.94,-25.77],"6-105-48":[-54.84,-22.89],"6-105-49":[-47.73,-19.91],"5-52-24":[-54.84,-17.39],"6-105-50":[-42.44,-18.56],"6-105-51":[-41.44,-18.27],"5-52-25":[-42.44,-15.24],"6-105-52":[-43.24,-18.39],"6-105-53":[-52.02,-19.12],"5-52-26":[-52.02,-15.45],"6-105-54":[-54.04,-21.06],"6-105-55":[-53.1,680.38],"5-52-27":[-54.04,1300.89],"6-105-56":[536.8,2408.3],"6-105-57":[2392.94,3030.32],"5-52-28":[486.82,3030.32],"6-105-58":[2971.72,3188.16],"6-105-59":[3108.98,3235.61],"5-52-29":[2925.62,3320.02],"6-105-60":[3012.27,3197.29],"6-105-61":[2926.36,3081.54],"5-52-30":[2926.36,3317.03],"6-105-62":[2976.46,3060.18],"6-105-63":[-29.54,3063.52],"5-52-31":[-29.54,3080.43],"6-106-0":[10.64,26.89],"6-106-1":[8.53,22.53],"6-106-2":[2.49,19.46],"6-106-3":[-5.7,3.75],"6-106-4":[-6.56,0.13],"6-106-5":[-15.63,39.75],"6-106-6":[-15.63,346.26],"6-106-7":[14.94,411.14],"6-106-8":[91.15,443.53],"6-106-9":[32.4,383.49],"6-106-10":[-14.77,717.41],"6-106-11":[169.48,2548.26],"6-106-12":[315.35,2226.52],"6-106-13":[309.69,1486.61],"6-106-14":[471.52,1598.44],"6-106-15":[383.84,1743.81],"6-106-16":[236.1,1936.12],"6-106-17":[-59.35,1887.25],"6-106-18":[-120.47,785.42],"6-106-19":[-39.04,1101.77],"6-106-20":[-105.16,584.53],"6-106-21":[-78.25,1795.67],"6-106-22":[-35.2,1934.56],"6-106-23":[-36.2,3691.21],"6-106-24":[-4.52,1951.28],"6-106-25":[17.56,2501.63],"6-106-26":[-6.79,2962.21],"6-106-27":[26.54,2343.09],"6-106-28":[24.22,1769.36],"6-106-29":[30.27,536.54],"6-106-30":[32.1,935.33],"6-106-31":[37.62,2935.4],"6-106-32":[39.93,3132.81],"6-106-33":[-11.89,3490.23],"6-106-34":[19.97,1959.49],"6-106-35":[5.42,2405.04],"6-106-36":[10.5,52.7],"6-106-37":[1.57,42.5],"6-106-38":[-1.29,35.06],"6-106-39":[-31.05,1152.3],"6-106-40":[340.66,1241.42],"6-106-41":[303.97,737.39],"6-106-42":[254.05,673.8],"6-106-43":[-1.49,507.31],"6-106-44":[-78.18,1063.1],"6-106-45":[-78.01,-33.81],"6-106-46":[-69.49,-30.79],"6-106-47":[-61.11,-27.35],"6-106-48":[-54.99,-24.24],"6-106-49":[-48.72,-21.27],"6-106-50":[-45.04,-20.59],"6-106-51":[-45.09,-20.39],"6-106-52":[-47.54,-20.76],"6-106-53":[-57.28,-21.9],"6-106-54":[-61.21,-25.94],"6-106-55":[-59.83,845.24],"6-106-56":[519.85,2462.74],"6-106-57":[2401.53,3046.36],"6-106-58":[3030.31,3177.4],"6-106-59":[2994.82,3172.35],"6-106-60":[2931.11,3109.06],"6-106-61":[2879.88,3012.28],"6-106-62":[2930.22,3048.31],"6-106-63":[-29.59,3060.25],"6-107-0":[10.15,26.87],"6-107-1":[8.13,21.47],"5-53-0":[8.13,26.89],"6-107-2":[2.41,16.79],"6-107-3":[-5.35,4.39],"5-53-1":[-5.7,19.46],"4-26-0":[-6,26.93],"6-107-4":[-5.79,0.24],"6-107-5":[-13.91,13.68],"5-53-2":[-15.63,39.75],"6-107-6":[-13.91,479.01],"6-107-7":[3.58,427.06],"5-53-3":[-15.63,479.01],"4-26-1":[-17.31,495.96],"6-107-8":[3.9,342.41],"6-107-9":[56.97,417.22],"5-53-4":[3.9,443.53],"6-107-10":[-10.31,1200.19],"6-107-11":[142.11,2000.95],"5-53-5":[-14.77,2548.26],"4-26-2":[-21.96,2962.65],"6-107-12":[249.54,1644.22],"6-107-13":[260.32,1523.39],"5-53-6":[249.54,2226.52],"6-107-14":[165.96,1600.44],"6-107-15":[117.12,1541.69],"5-53-7":[117.12,1743.81],"4-26-3":[117.12,2992.37],"6-107-16":[42.3,816.14],"6-107-17":[-150.51,1174.47],"5-53-8":[-150.51,1936.12],"6-107-18":[-29.13,918.27],"6-107-19":[3.79,96.9],"5-53-9":[-120.47,1101.77],"4-26-4":[-150.51,3047.6],"6-107-20":[-52.47,121.19],"6-107-21":[-35.84,1218.7],"5-53-10":[-105.16,1795.67],"6-107-22":[0.69,450.06],"6-107-23":[-53.71,3956.01],"5-53-11":[-53.71,3956.01],"4-26-5":[-154.55,3956.01],"6-107-24":[11.3,1042.66],"6-107-25":[-10.65,2731.61],"5-53-12":[-10.65,2731.61],"6-107-26":[-0.27,2712.33],"6-107-27":[-54.19,2627.63],"5-53-13":[-54.19,2962.21],"4-26-6":[-70.08,2962.21],"6-107-28":[-134.19,2528.23],"6-107-29":[21.9,2469.27],"5-53-14":[-134.19,2528.23],"6-107-30":[58.38,136.19],"6-107-31":[24.07,2286.44],"5-53-15":[24.07,2935.4],"4-26-7":[-134.19,4108.68],"6-107-32":[0.84,2955.49],"6-107-33":[28.66,2702.65],"5-53-16":[-11.89,3490.23],"6-107-34":[15.94,1676.82],"6-107-35":[5.35,2244.61],"5-53-17":[5.35,2405.04],"4-26-8":[-40.37,3755.88],"6-107-36":[21.36,72.31],"6-107-37":[-21.63,280.29],"5-53-18":[-21.63,280.29],"6-107-38":[-20.07,284.71],"6-107-39":[-14.22,553.65],"5-53-19":[-31.05,1152.3],"4-26-9":[-58.73,1205.98],"6-107-40":[235.6,710.82],"6-107-41":[292.36,692.66],"5-53-20":[235.6,1241.42],"6-107-42":[104.9,561.35],"6-107-43":[-30.26,610.87],"5-53-21":[-30.26,673.8],"4-26-10":[-99.76,1241.42],"6-107-44":[-76.09,322.34],"6-107-45":[-73.83,-32.37],"5-53-22":[-78.18,1063.1],"6-107-46":[-67.41,-29.79],"6-107-47":[-60.78,-27.09],"5-53-23":[-69.49,-27.09],"4-26-11":[-81.92,1063.1],"6-107-48":[-54.95,-24.93],"6-107-49":[-49.55,-22.67],"5-53-24":[-54.99,-21.27],"6-107-50":[-47.09,-22.05],"6-107-51":[-49,-22.03],"5-53-25":[-49,-20.39],"4-26-12":[-54.99,-15.24],"6-107-52":[-52.14,-22.78],"6-107-53":[-62.69,-24.36],"5-53-26":[-62.69,-20.76],"6-107-54":[-67.4,-28.92],"6-107-55":[-64.36,1172.91],"5-53-27":[-67.4,1172.91],"4-26-13":[-67.4,1300.89],"6-107-56":[845.23,2590.73],"6-107-57":[2462.73,3089.34],"5-53-28":[519.85,3089.34],"6-107-58":[3046.35,3196.31],"6-107-59":[2917.96,3163.37],"5-53-29":[2917.96,3196.31],"4-26-14":[486.82,3320.02],"6-107-60":[2826.82,2994.83],"6-107-61":[2826.82,2932.32],"5-53-30":[2826.82,3109.06],"6-107-62":[2871.64,3035.5],"6-107-63":[-29.58,3058.07],"5-53-31":[-29.59,3060.25],"4-26-15":[-29.59,3317.03],"6-108-0":[10.04,26.86],"6-108-1":[7.6,20.19],"6-108-2":[2.41,15.36],"6-108-3":[-5.02,4.8],"6-108-4":[-5,0.2],"6-108-5":[-10.53,23.3],"6-108-6":[-6.11,487.14],"6-108-7":[-1.85,1127.4],"6-108-8":[-14.61,1401.18],"6-108-9":[9.01,816.9],"6-108-10":[0.99,804.47],"6-108-11":[261.28,1845.92],"6-108-12":[224.24,1706.86],"6-108-13":[169.56,1269.14],"6-108-14":[159.24,878.23],"6-108-15":[100.27,339.07],"6-108-16":[60.86,1264.57],"6-108-17":[-268.7,1987.41],"6-108-18":[-101.36,1234.98],"6-108-19":[-7.79,581.2],"6-108-20":[16.92,1941.55],"6-108-21":[18.57,59.8],"6-108-22":[22.07,60.97],"6-108-23":[8,553.56],"6-108-24":[22.25,69.87],"6-108-25":[31.05,86.5],"6-108-26":[38.77,279.06],"6-108-27":[15.22,1607.31],"6-108-28":[-24.5,2547.07],"6-108-29":[21.53,3011.04],"6-108-30":[36.96,1410.92],"6-108-31":[-6.95,2053.63],"6-108-32":[33.67,1465.3],"6-108-33":[35.26,2752.59],"6-108-34":[-4.86,1869.57],"6-108-35":[7.81,2985.2],"6-108-36":[18.74,169.89],"6-108-37":[-47.89,844.91],"6-108-38":[-13.38,967.01],"6-108-39":[127.51,455.4],"6-108-40":[265.28,557.1],"6-108-41":[312.18,555.5],"6-108-42":[124.91,497.24],"6-108-43":[-59.03,276.5],"6-108-44":[-71.44,115.27],"6-108-45":[-69.83,-30.39],"6-108-46":[-64.74,-28.34],"6-108-47":[-58.68,-26.12],"6-108-48":[-54.09,-24.3],"6-108-49":[-49.45,-23.51],"6-108-50":[-48.53,-23.46],"6-108-51":[-51.56,-23.6],"6-108-52":[-55.45,-24.6],"6-108-53":[-65.39,-26.41],"6-108-54":[-71.76,-31.34],"6-108-55":[-65.99,1359.83],"6-108-56":[1164.44,2630.58],"6-108-57":[2590.72,3151.32],"6-108-58":[3089.33,3203.64],"6-108-59":[2882.88,3159.64],"6-108-60":[2697.34,2917.97],"6-108-61":[2697.34,2871.65],"6-108-62":[2844.51,3023.22],"6-108-63":[-29.54,3057.86],"6-109-0":[10.07,26.84],"6-109-1":[7.6,19.56],"5-54-0":[7.6,26.86],"6-109-2":[1.94,15.3],"6-109-3":[-4.59,4.34],"5-54-1":[-5.02,15.36],"6-109-4":[-4.59,1.33],"6-109-5":[-11.15,-0.27],"5-54-2":[-11.15,23.3],"6-109-6":[-13.23,1068.55],"6-109-7":[49.78,2201.02],"5-54-3":[-13.23,2201.02],"6-109-8":[105.58,2117.99],"6-109-9":[2.06,1848.18],"5-54-4":[-14.61,2117.99],"6-109-10":[2.81,676.85],"6-109-11":[199.21,2240.33],"5-54-5":[0.99,2240.33],"6-109-12":[203.07,2048.94],"6-109-13":[137.94,905.39],"5-54-6":[137.94,2048.94],"6-109-14":[100.62,1057.62],"6-109-15":[12.1,1445.43],"5-54-7":[12.1,1445.43],"6-109-16":[169.25,1718.97],"6-109-17":[-9.27,2763.77],"5-54-8":[-268.7,2763.77],"6-109-18":[-16.31,1727.04],"6-109-19":[-43.56,1925.58],"5-54-9":[-101.36,1925.58],"6-109-20":[-39.24,1453.61],"6-109-21":[16.04,722.76],"5-54-10":[-39.24,1941.55],"6-109-22":[13.17,672.79],"6-109-23":[24.41,69.74],"5-54-11":[8,672.79],"6-109-24":[29.92,74.99],"6-109-25":[35.9,87.33],"5-54-12":[22.25,87.33],"6-109-26":[42.78,100.04],"6-109-27":[47.35,114.52],"5-54-13":[15.22,1607.31],"6-109-28":[47.35,127.22],"6-109-29":[45.25,289.5],"5-54-14":[-24.5,3011.04],"6-109-30":[39.86,726.39],"6-109-31":[-77.81,1820.67],"5-54-15":[-77.81,2053.63],"6-109-32":[-16.98,2152.95],"6-109-33":[17.04,2555.71],"5-54-16":[-16.98,2752.59],"6-109-34":[33.44,1415.76],"6-109-35":[30.37,2395.35],"5-54-17":[-4.86,2985.2],"6-109-36":[4.41,198.32],"6-109-37":[-3.57,755.14],"5-54-18":[-47.89,844.91],"6-109-38":[123.22,1012.77],"6-109-39":[240.33,556.98],"5-54-19":[-13.38,1012.77],"6-109-40":[305.48,1049.45],"6-109-41":[288.49,1051.49],"5-54-20":[265.28,1051.49],"6-109-42":[117.95,457.28],"6-109-43":[-68.16,175.13],"5-54-21":[-68.16,497.24],"6-109-44":[-66.21,-23.79],"6-109-45":[-63.97,-28.21],"5-54-22":[-71.44,115.27],"6-109-46":[-60.3,-26.68],"6-109-47":[-55.65,-25.02],"5-54-23":[-64.74,-25.02],"6-109-48":[-52.05,-23.14],"6-109-49":[-47.99,-22.51],"5-54-24":[-54.09,-22.51],"6-109-50":[-47.82,-22.39],"6-109-51":[-52.39,-23.56],"5-54-25":[-52.39,-22.39],"6-109-52":[-58.59,-25.84],"6-109-53":[-69.44,-28.36],"5-54-26":[-69.44,-24.6],"6-109-54":[-76.93,-32.97],"6-109-55":[-75.43,1185.13],"5-54-27":[-76.93,1359.83],"6-109-56":[945.1,2622.61],"6-109-57":[2578.38,3171.09],"5-54-28":[945.1,3171.09],"6-109-58":[3008.62,3189.23],"6-109-59":[2819.28,3116.04],"5-54-29":[2819.28,3203.64],"6-109-60":[2623.1,2882.89],"6-109-61":[2629.61,2844.52],"5-54-30":[2623.1,2917.97],"6-109-62":[2805.68,3011.97],"6-109-63":[-29.54,3059.53],"5-54-31":[-29.54,3059.53],"6-110-0":[10.54,26.83],"6-110-1":[6.87,20.99],"6-110-2":[1.92,15.13],"6-110-3":[-4.55,2.92],"6-110-4":[-4.02,4.86],"6-110-5":[-10.86,-0.21],"6-110-6":[-13.9,856.13],"6-110-7":[47.14,1828.99],"6-110-8":[120.23,1922.66],"6-110-9":[31.37,2002.65],"6-110-10":[5.26,531.48],"6-110-11":[163.23,2290.58],"6-110-12":[207.26,2374.21],"6-110-13":[182.49,1509.02],"6-110-14":[66.2,1216.44],"6-110-15":[10.1,1386.01],"6-110-16":[4.32,1509.87],"6-110-17":[10.26,1774.19],"6-110-18":[-48.7,999.37],"6-110-19":[-18.69,1373.1],"6-110-20":[-17.54,1801.42],"6-110-21":[-19.03,1948.19],"6-110-22":[24,290.95],"6-110-23":[28.82,74.19],"6-110-24":[34.84,77.85],"6-110-25":[38.27,88.57],"6-110-26":[43.53,99.45],"6-110-27":[49.52,113.8],"6-110-28":[55.44,127.03],"6-110-29":[62.11,137.95],"6-110-30":[67.63,149.08],"6-110-31":[62.22,363.49],"6-110-32":[-56.46,1519.04],"6-110-33":[-10.59,3088.67],"6-110-34":[26.67,862.43],"6-110-35":[40.62,116.33],"6-110-36":[-0.62,359.52],"6-110-37":[-20.35,453.11],"6-110-38":[138.03,558.61],"6-110-39":[237.65,915.42],"6-110-40":[389.72,1429.68],"6-110-41":[289.78,1437.62],"6-110-42":[27.63,482.51],"6-110-43":[-47.6,188.18],"6-110-44":[-60.49,-16.06],"6-110-45":[-58.01,-25.18],"6-110-46":[-56.42,-23.9],"6-110-47":[-52.82,-22.85],"6-110-48":[-49.85,-21.48],"6-110-49":[-46.08,-21.12],"6-110-50":[-46.52,-21.31],"6-110-51":[-52.46,-23.05],"6-110-52":[-59.62,-26.04],"6-110-53":[-71.74,-29.78],"6-110-54":[-80.19,-34.71],"6-110-55":[-74.89,1382.72],"6-110-56":[948.42,2601.74],"6-110-57":[2573.54,3136.57],"6-110-58":[2893.92,3137.89],"6-110-59":[2675.26,3008.63],"6-110-60":[2578.01,2819.29],"6-110-61":[2594.09,2805.69],"6-110-62":[2759.42,2999.73],"6-110-63":[-29.54,3062.38],"6-111-0":[11.53,28.02],"6-111-1":[6.59,23.68],"5-55-0":[6.59,28.02],"6-111-2":[2.12,13.54],"6-111-3":[-4.24,2.58],"5-55-1":[-4.55,15.13],"4-27-0":[-5.02,28.02],"6-111-4":[-1.34,4.98],"6-111-5":[-6.9,-0.37],"5-55-2":[-10.86,4.98],"6-111-6":[-9.76,462.09],"6-111-7":[19.54,1221.31],"5-55-3":[-13.9,1828.99],"4-27-1":[-13.9,2201.02],"3-13-0":[-17.31,2201.02],"6-111-8":[105.45,1652.58],"6-111-9":[35.47,2070.51],"5-55-4":[31.37,2070.51],"6-111-10":[7.84,825.86],"6-111-11":[208.63,1856.83],"5-55-5":[5.26,2290.58],"4-27-2":[-14.61,2290.58],"6-111-12":[30.93,2358.55],"6-111-13":[242.51,2286.52],"5-55-6":[30.93,2374.21],"6-111-14":[42.21,2263.84],"6-111-15":[-27.41,1447.73],"5-55-7":[-27.41,2263.84],"4-27-3":[-27.41,2374.21],"3-13-1":[-27.41,2992.37],"2-6-0":[-32.17,4155.27],"6-111-16":[-79.7,1878.55],"6-111-17":[23.24,62.05],"5-55-8":[-79.7,1878.55],"6-111-18":[25.69,66.77],"6-111-19":[-16.84,1986.11],"5-55-9":[-48.7,1986.11],"4-27-4":[-268.7,2763.77],"6-111-20":[-0.37,1882.11],"6-111-21":[27.45,74.09],"5-55-10":[-19.03,1948.19],"6-111-22":[33.04,75.05],"6-111-23":[33.91,80.5],"5-55-11":[24,290.95],"4-27-5":[-39.24,1948.19],"3-13-2":[-268.7,3956.01],"6-111-24":[37.06,83.13],"6-111-25":[39.61,93.95],"5-55-12":[34.84,93.95],"6-111-26":[44.33,102.28],"6-111-27":[49.63,114.34],"5-55-13":[43.53,114.34],"4-27-6":[15.22,1607.31],"6-111-28":[55.18,125.8],"6-111-29":[59.47,301.73],"5-55-14":[55.18,301.73],"6-111-30":[66.39,148.84],"6-111-31":[69.38,149.75],"5-55-15":[62.22,363.49],"4-27-7":[-77.81,3011.04],"3-13-3":[-134.19,4108.68],"2-6-1":[-268.7,7512.84],"6-111-32":[15.14,3028.24],"6-111-33":[-92.74,2016.59],"5-55-16":[-92.74,3088.67],"6-111-34":[38.32,670.15],"6-111-35":[39.61,131.25],"5-55-17":[26.67,862.43],"4-27-8":[-92.74,3088.67],"6-111-36":[-50.67,610.22],"6-111-37":[37.9,457.36],"5-55-18":[-50.67,610.22],"6-111-38":[212.43,466.21],"6-111-39":[278.13,1152.22],"5-55-19":[138.03,1152.22],"4-27-9":[-50.67,1152.22],"3-13-4":[-92.74,3755.88],"6-111-40":[234.53,1528.53],"6-111-41":[101.81,1002.66],"5-55-20":[101.81,1528.53],"6-111-42":[72.04,400.15],"6-111-43":[-50.51,399.93],"5-55-21":[-50.51,482.51],"4-27-10":[-68.16,1528.53],"6-111-44":[-51.73,212.32],"6-111-45":[-50.87,-20.77],"5-55-22":[-60.49,212.32],"6-111-46":[-49.69,-20.97],"6-111-47":[-47.09,-20.45],"5-55-23":[-56.42,-20.45],"4-27-11":[-71.44,212.32],"3-13-5":[-99.76,1528.53],"2-6-2":[-129.46,3783.24],"6-111-48":[-45.23,-19.5],"6-111-49":[-42.63,-19.5],"5-55-24":[-49.85,-19.5],"6-111-50":[-45.55,-20.17],"6-111-51":[-51.95,-22.67],"5-55-25":[-52.46,-20.17],"4-27-12":[-54.09,-19.5],"6-111-52":[-60.12,-25.88],"6-111-53":[-74.09,-30.6],"5-55-26":[-74.09,-25.88],"6-111-54":[-82.21,-35.97],"6-111-55":[-78.66,1711.28],"5-55-27":[-82.21,1711.28],"4-27-13":[-82.21,1711.28],"3-13-6":[-82.21,1711.28],"6-111-56":[1382.71,2605.54],"6-111-57":[2513.78,2976.73],"5-55-28":[948.42,3136.57],"6-111-58":[2794.54,2992.85],"6-111-59":[2564.77,2893.93],"5-55-29":[2564.77,3137.89],"4-27-14":[945.1,3203.64],"6-111-60":[2500.69,2687.3],"6-111-61":[2526.81,2763.19],"5-55-30":[2500.69,2819.29],"6-111-62":[2709.28,2987.5],"6-111-63":[-29.54,3065.26],"5-55-31":[-29.54,3065.26],"4-27-15":[-29.54,3065.26],"3-13-7":[-29.59,3320.02],"2-6-3":[-82.21,3799.9],"6-112-0":[12.7,28.89],"6-112-1":[6.42,25.49],"6-112-2":[2.23,12.87],"6-112-3":[-4.13,4.1],"6-112-4":[-0.69,55.51],"6-112-5":[-5.99,225.27],"6-112-6":[-8.16,496.12],"6-112-7":[13.72,1767.28],"6-112-8":[107.91,1681.65],"6-112-9":[91.8,1766.67],"6-112-10":[12.16,1755.07],"6-112-11":[24.97,1915.02],"6-112-12":[3.84,2099.48],"6-112-13":[23.28,2155.76],"6-112-14":[6.54,1965.97],"6-112-15":[15.76,2024.26],"6-112-16":[12.72,1410.98],"6-112-17":[25.6,66.52],"6-112-18":[-24.3,3037.73],"6-112-19":[-29.59,3225.44],"6-112-20":[16.39,1148.96],"6-112-21":[35.65,80.83],"6-112-22":[36.81,83.26],"6-112-23":[36.79,87.96],"6-112-24":[39.76,92.17],"6-112-25":[41.96,97.91],"6-112-26":[46.97,104.85],"6-112-27":[51.71,114.88],"6-112-28":[56.92,128.34],"6-112-29":[57.72,134.69],"6-112-30":[65.91,141.57],"6-112-31":[67.63,143.17],"6-112-32":[6.63,1532.53],"6-112-33":[44.6,4900.75],"6-112-34":[45.11,141.56],"6-112-35":[56.19,138.86],"6-112-36":[28.28,417.68],"6-112-37":[-0.95,370.77],"6-112-38":[108.64,478.74],"6-112-39":[201.08,643.8],"6-112-40":[73.33,1103.75],"6-112-41":[-45.74,301.67],"6-112-42":[-38.95,426.73],"6-112-43":[-35.05,487.73],"6-112-44":[-41.29,417.28],"6-112-45":[-43.35,-6.75],"6-112-46":[-43.03,-16.66],"6-112-47":[-41.89,-17.81],"6-112-48":[-40.82,-17.53],"6-112-49":[-40.23,-17.58],"6-112-50":[-44.52,-18.84],"6-112-51":[-52.08,-21.66],"6-112-52":[-60.31,-25.8],"6-112-53":[-75.15,-30.77],"6-112-54":[-83.59,-37.04],"6-112-55":[-84.73,1701.91],"6-112-56":[1598.15,2525.84],"6-112-57":[2453.63,2840.96],"6-112-58":[2629.4,2867.37],"6-112-59":[2498.34,2794.55],"6-112-60":[2390.04,2564.78],"6-112-61":[2390.04,2709.29],"6-112-62":[2666.35,2977.76],"6-112-63":[-29.54,3068.14],"6-113-0":[13.21,29.53],"6-113-1":[6.55,26.2],"5-56-0":[6.42,29.53],"6-113-2":[2.65,15.62],"6-113-3":[-3.24,6.86],"5-56-1":[-4.13,15.62],"6-113-4":[0.26,195.82],"6-113-5":[-4.34,347.8],"5-56-2":[-5.99,347.8],"6-113-6":[-5.98,370.97],"6-113-7":[44.86,2177.91],"5-56-3":[-8.16,2177.91],"6-113-8":[234.82,2476.55],"6-113-9":[401.32,2650.27],"5-56-4":[91.8,2650.27],"6-113-10":[23.8,2153.15],"6-113-11":[-0.3,1760.98],"5-56-5":[-0.3,2153.15],"6-113-12":[-14.43,1103.01],"6-113-13":[1.7,1633.71],"5-56-6":[-14.43,2155.76],"6-113-14":[6.02,2108.2],"6-113-15":[5.38,1700.99],"5-56-7":[5.38,2108.2],"6-113-16":[25.39,1549.63],"6-113-17":[-8.62,1641.19],"5-56-8":[-8.62,1641.19],"6-113-18":[-22.8,2604.93],"6-113-19":[-48.47,3800.26],"5-56-9":[-48.47,3800.26],"6-113-20":[33.11,892.01],"6-113-21":[38.38,417.51],"5-56-10":[16.39,1148.96],"6-113-22":[40.6,91.39],"6-113-23":[42.43,95.06],"5-56-11":[36.79,95.06],"6-113-24":[44.58,97.8],"6-113-25":[46.59,101.92],"5-56-12":[39.76,101.92],"6-113-26":[49.34,105.97],"6-113-27":[48.14,115.83],"5-56-13":[46.97,115.83],"6-113-28":[47.63,237.05],"6-113-29":[57.2,131.84],"5-56-14":[47.63,237.05],"6-113-30":[64.56,137.12],"6-113-31":[68.18,144.76],"5-56-15":[64.56,144.76],"6-113-32":[42.04,2301.21],"6-113-33":[54.12,5227.39],"5-56-16":[6.63,5227.39],"6-113-34":[38.04,203.53],"6-113-35":[58.85,141.09],"5-56-17":[38.04,203.53],"6-113-36":[54.67,131.12],"6-113-37":[-15.46,223.46],"5-56-18":[-15.46,417.68],"6-113-38":[7.1,475.97],"6-113-39":[134.5,657.09],"5-56-19":[7.1,657.09],"6-113-40":[48.52,421.94],"6-113-41":[-34.6,242.02],"5-56-20":[-45.74,1103.75],"6-113-42":[-55.11,1079.1],"6-113-43":[-15.57,1164.85],"5-56-21":[-55.11,1164.85],"6-113-44":[-38.17,716.99],"6-113-45":[-33.33,267.94],"5-56-22":[-43.35,716.99],"6-113-46":[-34.86,-12.78],"6-113-47":[-35.43,-15.73],"5-56-23":[-43.03,-12.78],"6-113-48":[-35.41,-16.8],"6-113-49":[-37.65,-17.05],"5-56-24":[-40.82,-16.8],"6-113-50":[-42.35,-18.33],"6-113-51":[-51.23,-20.46],"5-56-25":[-52.08,-18.33],"6-113-52":[-59.96,-25.01],"6-113-53":[-76.66,-30.45],"5-56-26":[-76.66,-25.01],"6-113-54":[-85.09,-37.69],"6-113-55":[-88.87,1616.15],"5-56-27":[-88.87,1701.91],"6-113-56":[1284.64,2522.11],"6-113-57":[2297.97,2629.41],"5-56-28":[1284.64,2840.96],"6-113-58":[2577.31,2726.71],"6-113-59":[2407.17,2693.87],"5-56-29":[2407.17,2867.37],"6-113-60":[2235.7,2498.35],"6-113-61":[2303.19,2666.36],"5-56-30":[2235.7,2709.29],"6-113-62":[2636.28,2970.03],"6-113-63":[-29.54,3070.04],"5-56-31":[-29.54,3070.04],"6-114-0":[13.2,29.62],"6-114-1":[8.14,26.14],"6-114-2":[3.61,17.19],"6-114-3":[0.69,7.07],"6-114-4":[0.49,25.1],"6-114-5":[-2,264.4],"6-114-6":[-2.41,486.19],"6-114-7":[19.72,1696.85],"6-114-8":[77.22,2512.73],"6-114-9":[497.57,2822.43],"6-114-10":[9.71,2513.43],"6-114-11":[10.97,1227.42],"6-114-12":[11.66,627.07],"6-114-13":[3.09,1624.43],"6-114-14":[7.46,1440.11],"6-114-15":[-16.78,1737.87],"6-114-16":[-15.87,2312.97],"6-114-17":[-84.13,2061.69],"6-114-18":[-17.62,1666.14],"6-114-19":[-16.18,124.82],"6-114-20":[11.53,77.38],"6-114-21":[17.61,96.43],"6-114-22":[9.96,768.11],"6-114-23":[28.86,604.84],"6-114-24":[41.43,100.45],"6-114-25":[48.83,105.19],"6-114-26":[50.73,109.47],"6-114-27":[34.45,109.76],"6-114-28":[34.45,123],"6-114-29":[59.18,129.68],"6-114-30":[63.45,136.26],"6-114-31":[66.37,144.7],"6-114-32":[64.3,1467.8],"6-114-33":[33.02,4032.23],"6-114-34":[24.72,3694.06],"6-114-35":[31.23,439.48],"6-114-36":[-3.39,882.4],"6-114-37":[7.79,520.58],"6-114-38":[-0.72,739.41],"6-114-39":[40.06,660.81],"6-114-40":[66.17,435.75],"6-114-41":[40.88,374.96],"6-114-42":[42.73,458.66],"6-114-43":[12.46,485.33],"6-114-44":[-17.44,336.86],"6-114-45":[-41.04,1170.09],"6-114-46":[-31.63,-2.93],"6-114-47":[-33.62,-14.07],"6-114-48":[-34.78,-15.38],"6-114-49":[-37.5,-16.54],"6-114-50":[-40.37,-17.47],"6-114-51":[-49.64,-19.17],"6-114-52":[-59.34,-23.21],"6-114-53":[-75.38,-29.25],"6-114-54":[-88.58,-36.54],"6-114-55":[-89.56,1284.65],"6-114-56":[522.14,2298.07],"6-114-57":[2001.43,2577.32],"6-114-58":[2428.59,2638.08],"6-114-59":[2355.27,2612.99],"6-114-60":[2205.2,2407.18],"6-114-61":[2221.1,2636.29],"6-114-62":[2602.74,2964.79],"6-114-63":[-29.54,3070.97],"6-115-0":[12.07,29.55],"6-115-1":[8.62,24.47],"5-57-0":[8.14,29.62],"6-115-2":[2.39,17.3],"6-115-3":[1.82,6.24],"5-57-1":[0.69,17.3],"4-28-0":[-4.13,29.62],"6-115-4":[0.8,5.87],"6-115-5":[-0.82,73.43],"5-57-2":[-2,264.4],"6-115-6":[-0.82,115.08],"6-115-7":[1.77,672.76],"5-57-3":[-2.41,1696.85],"4-28-1":[-8.16,2177.91],"6-115-8":[49.51,2830.65],"6-115-9":[503.96,2291.47],"5-57-4":[49.51,2830.65],"6-115-10":[9.12,2265.18],"6-115-11":[12.44,34.94],"5-57-5":[9.12,2513.43],"4-28-2":[-0.3,2830.65],"6-115-12":[15.26,35.92],"6-115-13":[10.83,820.94],"5-57-6":[3.09,1624.43],"6-115-14":[14.24,1183.3],"6-115-15":[9.98,553.47],"5-57-7":[-16.78,1737.87],"4-28-3":[-16.78,2155.76],"6-115-16":[9.03,1740.56],"6-115-17":[8.77,43.6],"5-57-8":[-84.13,2312.97],"6-115-18":[14.8,45.02],"6-115-19":[16.45,54.08],"5-57-9":[-17.62,1666.14],"4-28-4":[-84.13,3800.26],"6-115-20":[24.53,58.31],"6-115-21":[25.92,65.71],"5-57-10":[11.53,96.43],"6-115-22":[27.14,79.03],"6-115-23":[25.23,82.85],"5-57-11":[9.96,768.11],"4-28-5":[9.96,1148.96],"6-115-24":[19.75,904.42],"6-115-25":[34.27,1005.01],"5-57-12":[19.75,1005.01],"6-115-26":[39.75,844.84],"6-115-27":[31.11,457.05],"5-57-13":[31.11,844.84],"4-28-6":[19.75,1005.01],"6-115-28":[39.7,118.49],"6-115-29":[57.52,126.91],"5-57-14":[34.45,129.68],"6-115-30":[61.37,131.2],"6-115-31":[64.24,143.3],"5-57-15":[61.37,144.7],"4-28-7":[34.45,237.05],"6-115-32":[67.54,296.18],"6-115-33":[36.6,3477.99],"5-57-16":[33.02,4032.23],"6-115-34":[32.51,4553.66],"6-115-35":[36.3,265.77],"5-57-17":[24.72,4553.66],"4-28-8":[6.63,5227.39],"6-115-36":[59.75,573.48],"6-115-37":[29.75,1449.42],"5-57-18":[-3.39,1449.42],"6-115-38":[28.52,1670.14],"6-115-39":[244.17,1064.78],"5-57-19":[-0.72,1670.14],"4-28-9":[-15.46,1670.14],"6-115-40":[176.38,727.4],"6-115-41":[119.67,517.69],"5-57-20":[40.88,727.4],"6-115-42":[67.33,518.96],"6-115-43":[59.37,560.11],"5-57-21":[12.46,560.11],"4-28-10":[-55.11,1164.85],"6-115-44":[34.38,521.33],"6-115-45":[-56.77,1522.55],"5-57-22":[-56.77,1522.55],"6-115-46":[-46.81,1610.49],"6-115-47":[-195.28,1424.55],"5-57-23":[-195.28,1610.49],"4-28-11":[-195.28,1610.49],"6-115-48":[-32.35,-13.51],"6-115-49":[-36.1,-15.23],"5-57-24":[-37.5,-13.51],"6-115-50":[-39.15,-17.16],"6-115-51":[-46.49,-18.91],"5-57-25":[-49.64,-17.16],"4-28-12":[-52.08,-13.51],"6-115-52":[-56.64,-22.55],"6-115-53":[-73,-28.38],"5-57-26":[-75.38,-22.55],"6-115-54":[-88.66,-36.23],"6-115-55":[-97.84,759.79],"5-57-27":[-97.84,1284.65],"4-28-13":[-97.84,1701.91],"6-115-56":[-97.84,2001.44],"6-115-57":[1792.1,2428.6],"5-57-28":[-97.84,2577.32],"6-115-58":[2305.92,2560],"6-115-59":[2344.15,2552.69],"5-57-29":[2305.92,2638.08],"4-28-14":[-97.84,2867.37],"6-115-60":[2100.93,2355.28],"6-115-61":[2117.14,2602.75],"5-57-30":[2100.93,2636.29],"6-115-62":[2569.81,2959.59],"6-115-63":[-29.54,3076],"5-57-31":[-29.54,3076],"4-28-15":[-29.54,3076],"6-116-0":[10.66,29.12],"6-116-1":[7.22,22.06],"6-116-2":[2.25,16.65],"6-116-3":[1.8,6.88],"6-116-4":[1.2,361.97],"6-116-5":[-0.57,89.29],"6-116-6":[-0.78,341.42],"6-116-7":[1.77,925.79],"6-116-8":[39.12,2260.37],"6-116-9":[440.9,2390.56],"6-116-10":[-3.36,1856.79],"6-116-11":[13.8,37.51],"6-116-12":[16.01,37.9],"6-116-13":[16.01,37.4],"6-116-14":[18.59,40.87],"6-116-15":[10.25,1590.34],"6-116-16":[-1.61,1786.57],"6-116-17":[8.34,43.6],"6-116-18":[15.48,44.53],"6-116-19":[15.73,47.62],"6-116-20":[16.81,51.48],"6-116-21":[19.43,63.16],"6-116-22":[23.95,70.37],"6-116-23":[29.01,74.37],"6-116-24":[26.61,82.69],"6-116-25":[30.18,93.33],"6-116-26":[30.98,99.51],"6-116-27":[30.96,99.08],"6-116-28":[45.57,117.31],"6-116-29":[55.18,122.74],"6-116-30":[58.42,127.66],"6-116-31":[60.62,135.09],"6-116-32":[62.05,783.66],"6-116-33":[65.85,1907.63],"6-116-34":[31.24,4188.78],"6-116-35":[53.93,4099.51],"6-116-36":[62.28,139.92],"6-116-37":[59.3,129.47],"6-116-38":[36.96,1285.71],"6-116-39":[26.9,1325.23],"6-116-40":[126.78,1296.76],"6-116-41":[189.96,988.43],"6-116-42":[97.05,430.67],"6-116-43":[131.13,1421.13],"6-116-44":[85.41,2241.03],"6-116-45":[-70.56,1999.21],"6-116-46":[-19.93,1568.36],"6-116-47":[-160.77,1420.87],"6-116-48":[-29.69,-12.33],"6-116-49":[-36.45,-13.09],"6-116-50":[-40.73,-17.24],"6-116-51":[-47.3,-19.53],"6-116-52":[-54.93,-22.38],"6-116-53":[-72.48,-27.53],"6-116-54":[-87.53,-35.51],"6-116-55":[-101.33,-44.71],"6-116-56":[-102.54,1792.11],"6-116-57":[1600.89,2338.91],"6-116-58":[2295.63,2481.09],"6-116-59":[2291.17,2481.96],"6-116-60":[1899.8,2344.16],"6-116-61":[1943.7,2569.82],"6-116-62":[2529.66,2955.42],"6-116-63":[-29.54,3081.95],"6-117-0":[9.48,28.14],"6-117-1":[6.76,18.88],"5-58-0":[6.76,29.12],"6-117-2":[2.28,14.99],"6-117-3":[1.62,7.39],"5-58-1":[1.62,16.65],"6-117-4":[1.48,155.99],"6-117-5":[0.48,58.1],"5-58-2":[-0.57,361.97],"6-117-6":[0.39,341.42],"6-117-7":[3.51,692.04],"5-58-3":[-0.78,925.79],"6-117-8":[22.34,2175.65],"6-117-9":[114.09,2203.44],"5-58-4":[22.34,2390.56],"6-117-10":[5.55,2094.72],"6-117-11":[-0.47,1541.51],"5-58-5":[-3.36,2094.72],"6-117-12":[17.95,39.7],"6-117-13":[17.96,40.77],"5-58-6":[16.01,40.77],"6-117-14":[18.87,43.2],"6-117-15":[-7.87,1533.21],"5-58-7":[-7.87,1590.34],"6-117-16":[-7.88,45.41],"6-117-17":[12.99,36.86],"5-58-8":[-7.88,1786.57],"6-117-18":[10.18,34.61],"6-117-19":[10.18,33.01],"5-58-9":[10.18,47.62],"6-117-20":[12.59,37.84],"6-117-21":[14.56,46.1],"5-58-10":[12.59,63.16],"6-117-22":[19.38,56.88],"6-117-23":[25.61,72.87],"5-58-11":[19.38,74.37],"6-117-24":[31.14,82.56],"6-117-25":[36.51,88.5],"5-58-12":[26.61,93.33],"6-117-26":[38.76,89.46],"6-117-27":[39.86,92.44],"5-58-13":[30.96,99.51],"6-117-28":[41.99,110.83],"6-117-29":[35.45,503.73],"5-58-14":[35.45,503.73],"6-117-30":[53.07,118.8],"6-117-31":[54.68,129.03],"5-58-15":[53.07,135.09],"6-117-32":[53.24,964.38],"6-117-33":[57.1,2427.64],"5-58-16":[53.24,2427.64],"6-117-34":[58.87,2022.98],"6-117-35":[-78.97,3071.93],"5-58-17":[-78.97,4188.78],"6-117-36":[62.08,143.56],"6-117-37":[61.21,128.82],"5-58-18":[59.3,143.56],"6-117-38":[57.56,126.23],"6-117-39":[30.2,869.8],"5-58-19":[26.9,1325.23],"6-117-40":[0.01,1008.41],"6-117-41":[75.28,1199.98],"5-58-20":[0.01,1296.76],"6-117-42":[145.68,1550.43],"6-117-43":[-25.52,1629.02],"5-58-21":[-25.52,1629.02],"6-117-44":[-80.43,1622.97],"6-117-45":[-23.03,1262.52],"5-58-22":[-80.43,2241.03],"6-117-46":[-14.62,1.67],"6-117-47":[-24.71,-5.89],"5-58-23":[-160.77,1568.36],"6-117-48":[-29.37,-11.35],"6-117-49":[-35.65,-13.2],"5-58-24":[-36.45,-11.35],"6-117-50":[-40.45,-17.24],"6-117-51":[-48.21,-20.04],"5-58-25":[-48.21,-17.24],"6-117-52":[-53.69,-23.2],"6-117-53":[-71.28,-27.26],"5-58-26":[-72.48,-22.38],"6-117-54":[-86.62,-34.15],"6-117-55":[-101.99,-43.8],"5-58-27":[-101.99,-34.15],"6-117-56":[-106.25,1600.9],"6-117-57":[1442.23,2342.57],"5-58-28":[-106.25,2342.57],"6-117-58":[2216.37,2456.95],"6-117-59":[2218.72,2466.51],"5-58-29":[2216.37,2481.96],"6-117-60":[1411.35,2291.18],"6-117-61":[1690.08,2529.67],"5-58-30":[1411.35,2569.82],"6-117-62":[2447.36,2953.28],"6-117-63":[-29.54,3084.91],"5-58-31":[-29.54,3084.91],"6-118-0":[8.81,27.71],"6-118-1":[6.64,17.18],"6-118-2":[1.82,14.17],"6-118-3":[1.29,7.13],"6-118-4":[1.8,112.12],"6-118-5":[0.82,6.14],"6-118-6":[0.71,75.94],"6-118-7":[3.53,559.13],"6-118-8":[15.46,1102.21],"6-118-9":[92.72,1636.07],"6-118-10":[2.35,1813.48],"6-118-11":[1.21,1062.27],"6-118-12":[17.21,43.51],"6-118-13":[19.63,45.98],"6-118-14":[0.73,1460.13],"6-118-15":[-7.91,1395.62],"6-118-16":[-7.92,30.44],"6-118-17":[6.23,30.2],"6-118-18":[4.7,24.25],"6-118-19":[4.92,23.71],"6-118-20":[6.29,28.34],"6-118-21":[10.46,37.16],"6-118-22":[12.98,50.32],"6-118-23":[19.09,62.28],"6-118-24":[25.96,72.19],"6-118-25":[29.55,81.26],"6-118-26":[33.77,84.41],"6-118-27":[35.3,83.99],"6-118-28":[39.24,102.12],"6-118-29":[44.51,337.7],"6-118-30":[50.71,111.44],"6-118-31":[54.6,118.9],"6-118-32":[58.04,435.72],"6-118-33":[2.74,2388.16],"6-118-34":[53.28,143.46],"6-118-35":[58.58,1094.58],"6-118-36":[60.49,866.24],"6-118-37":[60.7,127.95],"6-118-38":[55.23,126.07],"6-118-39":[48.72,114.91],"6-118-40":[16.01,468.23],"6-118-41":[-7.43,1263.13],"6-118-42":[3.55,1616.85],"6-118-43":[-3.46,1396.93],"6-118-44":[7.57,40.32],"6-118-45":[0.66,22.42],"6-118-46":[-11.28,6.94],"6-118-47":[-22.43,-3.98],"6-118-48":[-29.37,-9.38],"6-118-49":[-35.15,-14.48],"6-118-50":[-40.65,-17.23],"6-118-51":[-48.88,-20.43],"6-118-52":[-56.68,-24.15],"6-118-53":[-69.25,-27.35],"6-118-54":[-85.12,-33.76],"6-118-55":[-101.8,-42.74],"6-118-56":[-107,1522.76],"6-118-57":[1441.77,2294.89],"6-118-58":[1910.74,2319.46],"6-118-59":[1821.95,2399.61],"6-118-60":[803.63,2218.73],"6-118-61":[1627.45,2447.37],"6-118-62":[2363.53,2959.26],"6-118-63":[-29.54,3089.37],"6-119-0":[8.67,27.14],"6-119-1":[6.4,16.74],"5-59-0":[6.4,27.71],"6-119-2":[1.77,13.16],"6-119-3":[1.21,7.08],"5-59-1":[1.21,14.17],"4-29-0":[1.21,29.12],"6-119-4":[2.01,7.08],"6-119-5":[0.49,6.94],"5-59-2":[0.49,112.12],"6-119-6":[1.29,81.65],"6-119-7":[3.24,433.72],"5-59-3":[0.71,559.13],"4-29-1":[-0.78,925.79],"3-14-0":[-8.16,2177.91],"6-119-8":[15.62,1098.37],"6-119-9":[80.42,1766.68],"5-59-4":[15.46,1766.68],"6-119-10":[-12.75,1878.57],"6-119-11":[15.7,935.54],"5-59-5":[-12.75,1878.57],"4-29-2":[-12.75,2390.56],"6-119-12":[13.95,2005.12],"6-119-13":[17.08,2477.12],"5-59-6":[13.95,2477.12],"6-119-14":[1.03,1817.92],"6-119-15":[3.25,33.35],"5-59-7":[-7.91,1817.92],"4-29-3":[-7.91,2477.12],"3-14-1":[-16.78,2830.65],"6-119-16":[4.27,23.39],"6-119-17":[1.7,17.38],"5-59-8":[-7.92,30.44],"6-119-18":[0.23,11.21],"6-119-19":[1.53,11.2],"5-59-9":[0.23,24.25],"4-29-4":[-7.92,1786.57],"6-119-20":[4.13,19.59],"6-119-21":[6.49,25.03],"5-59-10":[4.13,37.16],"6-119-22":[9,34.94],"6-119-23":[13.7,51.55],"5-59-11":[9,62.28],"4-29-5":[4.13,74.37],"3-14-2":[-84.13,3800.26],"6-119-24":[20.27,58.63],"6-119-25":[26.32,64.62],"5-59-12":[20.27,81.26],"6-119-26":[29.21,76.13],"6-119-27":[31.51,78.92],"5-59-13":[29.21,84.41],"4-29-6":[20.27,99.51],"6-119-28":[34.89,91.62],"6-119-29":[42.31,102.14],"5-59-14":[34.89,337.7],"6-119-30":[49.88,110.56],"6-119-31":[51.58,118.67],"5-59-15":[49.88,118.9],"4-29-7":[34.89,503.73],"3-14-3":[19.75,1005.01],"6-119-32":[55.15,126.21],"6-119-33":[55.72,960.88],"5-59-16":[2.74,2388.16],"6-119-34":[6.18,2782.57],"6-119-35":[49.89,1115.42],"5-59-17":[6.18,2782.57],"4-29-8":[-78.97,4188.78],"6-119-36":[63.79,138.91],"6-119-37":[60.58,131.76],"5-59-18":[60.49,866.24],"6-119-38":[55.49,123.47],"6-119-39":[49.44,110.92],"5-59-19":[48.72,126.07],"4-29-9":[26.9,1325.23],"3-14-4":[-78.97,5227.39],"6-119-40":[40.76,99.59],"6-119-41":[33.8,84.71],"5-59-20":[-7.43,1263.13],"6-119-42":[26.01,74.04],"6-119-43":[18.31,59.16],"5-59-21":[-3.46,1616.85],"4-29-10":[-25.52,1629.02],"6-119-44":[11.24,40.96],"6-119-45":[3.47,25.39],"5-59-22":[0.66,40.96],"6-119-46":[-5.63,10.69],"6-119-47":[-18.52,-2.2],"5-59-23":[-22.43,10.69],"4-29-11":[-160.77,2241.03],"3-14-5":[-195.28,2241.03],"6-119-48":[-27.89,-8.1],"6-119-49":[-34.87,-13.33],"5-59-24":[-35.15,-8.1],"6-119-50":[-42.15,-16.71],"6-119-51":[-55.48,-20.53],"5-59-25":[-55.48,-16.71],"4-29-12":[-55.48,-8.1],"6-119-52":[-67.25,-24.47],"6-119-53":[-69.99,-28.77],"5-59-26":[-69.99,-24.15],"6-119-54":[-84.63,-34.47],"6-119-55":[-101.06,-42.64],"5-59-27":[-101.8,-33.76],"4-29-13":[-101.99,-22.38],"3-14-6":[-101.99,1701.91],"6-119-56":[-106.67,1594.21],"6-119-57":[1522.75,2260.16],"5-59-28":[-107,2294.89],"6-119-58":[1520.8,2260.16],"6-119-59":[1378.35,2352.82],"5-59-29":[1378.35,2399.61],"4-29-14":[-107,2481.96],"6-119-60":[115.06,3169.82],"6-119-61":[1392.87,2470.74],"5-59-30":[115.06,3169.82],"6-119-62":[2356.79,2967.24],"6-119-63":[-29.54,3091.37],"5-59-31":[-29.54,3091.37],"4-29-15":[-29.54,3169.82],"3-14-7":[-107,3169.82],"6-120-0":[8.69,26.75],"6-120-1":[5.52,17.4],"6-120-2":[1.82,12.04],"6-120-3":[0.59,7.08],"6-120-4":[2.09,7.08],"6-120-5":[0.74,5.17],"6-120-6":[1.05,56.9],"6-120-7":[2.85,903.95],"6-120-8":[56.39,1454.04],"6-120-9":[12.61,1757.61],"6-120-10":[12.59,947.68],"6-120-11":[15.29,2605.13],"6-120-12":[7.08,3631.59],"6-120-13":[-0.7,3468.03],"6-120-14":[1.4,40.12],"6-120-15":[4.12,24.95],"6-120-16":[-0.27,17.95],"6-120-17":[-4.97,7.43],"6-120-18":[-6.56,3],"6-120-19":[-3.98,7.47],"6-120-20":[-0.58,12.98],"6-120-21":[2.19,17.28],"6-120-22":[4.58,25.53],"6-120-23":[8.89,39.89],"6-120-24":[15.15,49.5],"6-120-25":[21.3,58.42],"6-120-26":[25.24,62.27],"6-120-27":[28.53,69.78],"6-120-28":[32.36,84.63],"6-120-29":[37.3,831.89],"6-120-30":[42.45,102.95],"6-120-31":[46.51,110.31],"6-120-32":[48.73,118.16],"6-120-33":[52.39,128.82],"6-120-34":[36.32,1251.14],"6-120-35":[16.84,2387.59],"6-120-36":[45.89,264.39],"6-120-37":[59.17,130.22],"6-120-38":[55.65,121.69],"6-120-39":[49.17,115.94],"6-120-40":[42.96,105.9],"6-120-41":[35.4,90.52],"6-120-42":[28.58,74.62],"6-120-43":[8.57,495.66],"6-120-44":[12.8,48.16],"6-120-45":[5.96,25.68],"6-120-46":[-2.48,12.37],"6-120-47":[-16.47,-0.49],"6-120-48":[-25.27,-6.4],"6-120-49":[-33.37,-10.64],"6-120-50":[-42.5,-14.52],"6-120-51":[-55.8,383.74],"6-120-52":[-67.98,-26.3],"6-120-53":[-72.63,-30.51],"6-120-54":[-84.73,-34.99],"6-120-55":[-104.1,-43.28],"6-120-56":[-112.02,1627.11],"6-120-57":[475.75,2656.26],"6-120-58":[867.53,2268.9],"6-120-59":[1045.7,2732.99],"6-120-60":[-105.78,3191.81],"6-120-61":[347.55,2726.57],"6-120-62":[2344.78,2977.2],"6-120-63":[-29.54,3090.38],"6-121-0":[8.97,26.75],"6-121-1":[5.52,18.2],"5-60-0":[5.52,26.75],"6-121-2":[1.99,11],"6-121-3":[0.42,4.82],"5-60-1":[0.42,12.04],"6-121-4":[2.25,7.43],"6-121-5":[0.71,4.93],"5-60-2":[0.71,7.43],"6-121-6":[1.29,271.44],"6-121-7":[2.85,1052.69],"5-60-3":[1.05,1052.69],"6-121-8":[37.86,1653.57],"6-121-9":[11.56,1415.31],"5-60-4":[11.56,1757.61],"6-121-10":[10.82,1872.79],"6-121-11":[9.11,3277.23],"5-60-5":[9.11,3277.23],"6-121-12":[-5.06,4774.23],"6-121-13":[-5.97,28.14],"5-60-6":[-5.97,4774.23],"6-121-14":[3.79,18.42],"6-121-15":[-1.09,16.76],"5-60-7":[-1.09,40.12],"6-121-16":[-7.93,7.27],"6-121-17":[-11.57,-0.26],"5-60-8":[-11.57,17.95],"6-121-18":[-11.9,-2.7],"6-121-19":[-13.5,-0.57],"5-60-9":[-13.5,7.47],"6-121-20":[-13.4,2.2],"6-121-21":[-4.89,8.56],"5-60-10":[-13.4,17.28],"6-121-22":[1.31,15.96],"6-121-23":[6.08,30.18],"5-60-11":[1.31,39.89],"6-121-24":[11.75,45.27],"6-121-25":[17.54,49.7],"5-60-12":[11.75,58.42],"6-121-26":[24.65,60.14],"6-121-27":[25.47,66.56],"5-60-13":[24.65,69.78],"6-121-28":[28.73,75.09],"6-121-29":[32.36,84.91],"5-60-14":[28.73,831.89],"6-121-30":[37.91,673.97],"6-121-31":[41.13,96.35],"5-60-15":[37.91,673.97],"6-121-32":[43.4,101.5],"6-121-33":[46.93,118.89],"5-60-16":[43.4,128.82],"6-121-34":[49.6,839.37],"6-121-35":[9.56,1980.07],"5-60-17":[9.56,2387.59],"6-121-36":[44.87,241.22],"6-121-37":[58.56,129.2],"5-60-18":[44.87,264.39],"6-121-38":[56.18,122.21],"6-121-39":[50.7,116.7],"5-60-19":[49.17,122.21],"6-121-40":[45.59,106.12],"6-121-41":[37.73,94.44],"5-60-20":[35.4,106.12],"6-121-42":[32.38,82.35],"6-121-43":[24.79,66.27],"5-60-21":[8.57,495.66],"6-121-44":[14.55,55.75],"6-121-45":[6.51,35.28],"5-60-22":[5.96,55.75],"6-121-46":[-0.5,21.22],"6-121-47":[-12.26,3.98],"5-60-23":[-16.47,21.22],"6-121-48":[-19.81,-3.49],"6-121-49":[-29.02,-8.06],"5-60-24":[-33.37,-3.49],"6-121-50":[-41.05,-10.84],"6-121-51":[-63.16,-19.98],"5-60-25":[-63.16,383.74],"6-121-52":[-72.98,-28.17],"6-121-53":[-77.22,-33.82],"5-60-26":[-77.22,-26.3],"6-121-54":[-88.46,-36.59],"6-121-55":[-106.46,1402.86],"5-60-27":[-106.46,1402.86],"6-121-56":[-114.63,475.76],"6-121-57":[-117.59,2620.78],"5-60-28":[-117.59,2656.26],"6-121-58":[-116.47,3433.82],"6-121-59":[-115.52,3317.92],"5-60-29":[-116.47,3433.82],"6-121-60":[-115.69,2320.2],"6-121-61":[-91.83,4077.78],"5-60-30":[-115.69,4077.78],"6-121-62":[1924.9,2984.14],"6-121-63":[-29.54,3088.17],"5-60-31":[-29.54,3090.38],"6-122-0":[9.42,26.76],"6-122-1":[5.65,18.59],"6-122-2":[2.49,11.4],"6-122-3":[0.26,4.81],"6-122-4":[1.95,7.47],"6-122-5":[0.77,4.8],"6-122-6":[1.14,7.62],"6-122-7":[3.84,1528.57],"6-122-8":[108.15,1757.51],"6-122-9":[10.94,1582.28],"6-122-10":[6.8,1233.67],"6-122-11":[7.89,932.54],"6-122-12":[-3.4,850.98],"6-122-13":[1.64,20.11],"6-122-14":[0.48,16.34],"6-122-15":[-7.21,6.88],"6-122-16":[-12.07,-0.71],"6-122-17":[-17.59,-4.25],"6-122-18":[-18.55,-5.37],"6-122-19":[-18.72,-6.19],"6-122-20":[-17.57,-2.87],"6-122-21":[-10.75,2.46],"6-122-22":[-3.63,10.62],"6-122-23":[1.49,22.49],"6-122-24":[7.72,36.85],"6-122-25":[14.12,46.47],"6-122-26":[19.28,54.72],"6-122-27":[23.59,60.99],"6-122-28":[26.75,65.91],"6-122-29":[28.53,72.29],"6-122-30":[31.65,81.32],"6-122-31":[36.02,86.88],"6-122-32":[39.15,92.44],"6-122-33":[41.65,106.03],"6-122-34":[46.65,119.42],"6-122-35":[48.07,866.32],"6-122-36":[45.55,126.93],"6-122-37":[53.7,127.16],"6-122-38":[52.98,340.77],"6-122-39":[35.29,1689.03],"6-122-40":[46.98,106.61],"6-122-41":[40,96.95],"6-122-42":[33.4,82.62],"6-122-43":[27.67,66.13],"6-122-44":[18.65,57.54],"6-122-45":[14.32,44.27],"6-122-46":[3,29.21],"6-122-47":[-11.15,13.47],"6-122-48":[-19.42,-2.93],"6-122-49":[-27.38,-6.28],"6-122-50":[-46.34,517.88],"6-122-51":[-65.39,-20.43],"6-122-52":[-77.62,-31.58],"6-122-53":[-81.78,-37.06],"6-122-54":[-91.49,-38.57],"6-122-55":[-105.7,-45.16],"6-122-56":[-117.38,-51.89],"6-122-57":[-60.46,3075.8],"6-122-58":[-117.89,3148.6],"6-122-59":[-115.52,2551.83],"6-122-60":[-111.82,209.78],"6-122-61":[-93.22,3800.64],"6-122-62":[1431.84,3358.99],"6-122-63":[-29.54,3084.48],"6-123-0":[9.85,26.78],"6-123-1":[5.73,18.86],"5-61-0":[5.65,26.78],"6-123-2":[2.93,12],"6-123-3":[0.14,5.41],"5-61-1":[0.14,12],"4-30-0":[0.14,26.78],"6-123-4":[0.92,8.02],"6-123-5":[1.11,5.42],"5-61-2":[0.77,8.02],"6-123-6":[1.15,7.19],"6-123-7":[3.59,1680.33],"5-61-3":[1.14,1680.33],"4-30-1":[0.71,1680.33],"6-123-8":[102.27,1646.59],"6-123-9":[12.03,1328.47],"5-61-4":[10.94,1757.51],"6-123-10":[4.75,1210.93],"6-123-11":[5.38,20.59],"5-61-5":[4.75,1233.67],"4-30-2":[4.75,3277.23],"6-123-12":[-6.75,744.81],"6-123-13":[-5.24,18.85],"5-61-6":[-6.75,850.98],"6-123-14":[-6.42,11.45],"6-123-15":[-19.48,0.49],"5-61-7":[-19.48,16.34],"4-30-3":[-19.48,4774.23],"6-123-16":[-20.74,-3.9],"6-123-17":[-25.13,-6.72],"5-61-8":[-25.13,-0.71],"6-123-18":[-25.13,-8.71],"6-123-19":[-20.44,-8.81],"5-61-9":[-25.13,-5.37],"4-30-4":[-25.13,17.95],"6-123-20":[-19,-6.48],"6-123-21":[-14.63,-2.18],"5-61-10":[-19,2.46],"6-123-22":[-8.94,1.5],"6-123-23":[-0.85,14.41],"5-61-11":[-8.94,22.49],"4-30-5":[-19,39.89],"6-123-24":[5.5,29.61],"6-123-25":[10.76,38.58],"5-61-12":[5.5,46.47],"6-123-26":[16.15,50.77],"6-123-27":[19.03,52.37],"5-61-13":[16.15,60.99],"4-30-6":[5.5,69.78],"6-123-28":[20.24,74.26],"6-123-29":[19.92,68.93],"5-61-14":[19.92,74.26],"6-123-30":[27.6,72.06],"6-123-31":[30.84,78.32],"5-61-15":[27.6,86.88],"4-30-7":[19.92,831.89],"6-123-32":[9.9,105.9],"6-123-33":[38.55,93.32],"5-61-16":[9.9,106.03],"6-123-34":[42.04,104.47],"6-123-35":[26.89,608.86],"5-61-17":[26.89,866.32],"4-30-8":[9.56,2387.59],"6-123-36":[44.53,1017.74],"6-123-37":[-166.26,1941.75],"5-61-18":[-166.26,1941.75],"6-123-38":[49.91,717.25],"6-123-39":[18.08,1664.47],"5-61-19":[18.08,1689.03],"4-30-9":[-166.26,1941.75],"6-123-40":[48.47,309.11],"6-123-41":[41.3,105.67],"5-61-20":[40,309.11],"6-123-42":[34.67,357.87],"6-123-43":[28.79,77.86],"5-61-21":[27.67,357.87],"4-30-10":[8.57,495.66],"6-123-44":[23.62,65.38],"6-123-45":[14.32,51.14],"5-61-22":[14.32,65.38],"6-123-46":[6.73,41.96],"6-123-47":[-345.62,2939.6],"5-61-23":[-345.62,2939.6],"4-30-11":[-345.62,2939.6],"6-123-48":[-74.06,2088.42],"6-123-49":[-22.42,566.58],"5-61-24":[-74.06,2088.42],"6-123-50":[-82.31,649.83],"6-123-51":[-70.1,-20.38],"5-61-25":[-82.31,649.83],"4-30-12":[-82.31,2088.42],"6-123-52":[-83.38,-32.37],"6-123-53":[-91.85,-39.81],"5-61-26":[-91.85,-31.58],"6-123-54":[-95.58,-41.02],"6-123-55":[-108.17,-46.75],"5-61-27":[-108.17,-38.57],"4-30-13":[-108.17,1402.86],"6-123-56":[-118.68,-52.76],"6-123-57":[-116.81,3530.38],"5-61-28":[-118.68,3530.38],"6-123-58":[-117.58,2686.35],"6-123-59":[-114.23,3368.3],"5-61-29":[-117.89,3368.3],"4-30-14":[-118.68,3530.38],"6-123-60":[-105.65,-47.93],"6-123-61":[-94.72,4324.92],"5-61-30":[-111.82,4324.92],"6-123-62":[1173.34,3260.29],"6-123-63":[-29.54,3084.24],"5-61-31":[-29.54,3358.99],"4-30-15":[-115.69,4324.92],"6-124-0":[10.16,26.79],"6-124-1":[6.14,19.04],"6-124-2":[3.03,12.26],"6-124-3":[0.14,5.75],"6-124-4":[0.89,8.06],"6-124-5":[1.26,5.67],"6-124-6":[1.39,7.36],"6-124-7":[3.52,1617.82],"6-124-8":[8.51,1409.69],"6-124-9":[10.13,2305.88],"6-124-10":[0.45,2164.88],"6-124-11":[2.56,14.63],"6-124-12":[-3.24,14.32],"6-124-13":[-10.59,10.54],"6-124-14":[-10.36,8.76],"6-124-15":[-21.04,0],"6-124-16":[-24.64,-2.76],"6-124-17":[-31.2,-3.85],"6-124-18":[-30.75,-6.47],"6-124-19":[-26.11,-2.49],"6-124-20":[-24.31,-7.51],"6-124-21":[-15.23,-4.76],"6-124-22":[-13.59,-0.84],"6-124-23":[-4.55,9.7],"6-124-24":[2.35,21.54],"6-124-25":[7.35,32.3],"6-124-26":[12.55,38.19],"6-124-27":[15.94,48.53],"6-124-28":[21.55,62.2],"6-124-29":[18.5,57.21],"6-124-30":[24.34,61.69],"6-124-31":[27.97,68.96],"6-124-32":[29.89,114.26],"6-124-33":[33.15,84.09],"6-124-34":[36.93,96.35],"6-124-35":[42.03,117.27],"6-124-36":[44.94,447.27],"6-124-37":[62.06,132.91],"6-124-38":[41.71,1137.87],"6-124-39":[34.07,895.97],"6-124-40":[47.96,131.97],"6-124-41":[46.43,105.92],"6-124-42":[39.86,96.09],"6-124-43":[32.69,85.75],"6-124-44":[26.31,75.44],"6-124-45":[20.78,56.69],"6-124-46":[8.98,1441.5],"6-124-47":[-4.07,3719.73],"6-124-48":[-31.98,2290.2],"6-124-49":[-23.42,-3.78],"6-124-50":[-84.41,535.73],"6-124-51":[-73.94,-20.62],"6-124-52":[-86.86,-35.05],"6-124-53":[-95.4,-42.17],"6-124-54":[-98.04,-43.58],"6-124-55":[-110.57,-48.45],"6-124-56":[-118.68,-54.08],"6-124-57":[-117.84,3544.4],"6-124-58":[-118.43,1962.19],"6-124-59":[-115.85,2252.06],"6-124-60":[-105.91,-48.57],"6-124-61":[-95.38,3812.59],"6-124-62":[594.22,3705.94],"6-124-63":[-29.54,3085.39],"6-125-0":[10.35,26.81],"6-125-1":[6.14,19.41],"5-62-0":[6.14,26.81],"6-125-2":[3.26,12.44],"6-125-3":[0.9,6.39],"5-62-1":[0.14,12.44],"6-125-4":[1.27,6.49],"6-125-5":[1.13,5.32],"5-62-2":[0.89,8.06],"6-125-6":[1.29,6.47],"6-125-7":[3.14,1111.24],"5-62-3":[1.29,1617.82],"6-125-8":[7.11,1048.77],"6-125-9":[6.89,1518.99],"5-62-4":[6.89,2305.88],"6-125-10":[-2.91,1665.46],"6-125-11":[0,6.86],"5-62-5":[-2.91,2164.88],"6-125-12":[-2.34,8.77],"6-125-13":[-14.46,953.56],"5-62-6":[-14.46,953.56],"6-125-14":[-5.06,5.28],"6-125-15":[-17.98,-2.39],"5-62-7":[-21.04,8.76],"6-125-16":[-24.4,-7.68],"6-125-17":[-28.6,-10.11],"5-62-8":[-31.2,-2.76],"6-125-18":[-28.6,-11],"6-125-19":[-25.62,-2.41],"5-62-9":[-30.75,-2.41],"6-125-20":[-22.75,-4.66],"6-125-21":[-15.81,-6.04],"5-62-10":[-24.31,-4.66],"6-125-22":[-14.02,-3.42],"6-125-23":[-6.77,4.64],"5-62-11":[-14.02,9.7],"6-125-24":[1.21,15.8],"6-125-25":[6.11,24.94],"5-62-12":[1.21,32.3],"6-125-26":[10.22,30.26],"6-125-27":[13.87,41.98],"5-62-13":[10.22,48.53],"6-125-28":[18.08,48.13],"6-125-29":[17.79,54.5],"5-62-14":[17.79,62.2],"6-125-30":[22.38,56.85],"6-125-31":[16.56,59.8],"5-62-15":[16.56,68.96],"6-125-32":[25.85,66.31],"6-125-33":[27.99,72.87],"5-62-16":[25.85,114.26],"6-125-34":[33,81.65],"6-125-35":[38.91,103.05],"5-62-17":[33,117.27],"6-125-36":[47.5,124.13],"6-125-37":[57.22,130.49],"5-62-18":[44.94,447.27],"6-125-38":[61.15,131.46],"6-125-39":[52.54,288.83],"5-62-19":[34.07,1137.87],"6-125-40":[48.88,107.87],"6-125-41":[48.01,104.69],"5-62-20":[46.43,131.97],"6-125-42":[42.87,97.22],"6-125-43":[37.6,89.45],"5-62-21":[32.69,97.22],"6-125-44":[6.97,816.34],"6-125-45":[-0.97,2517.08],"5-62-22":[-0.97,2517.08],"6-125-46":[-17.88,2863.4],"6-125-47":[-35.65,2605.15],"5-62-23":[-35.65,3719.73],"6-125-48":[-10.05,11.03],"6-125-49":[-27.68,-4.71],"5-62-24":[-31.98,2290.2],"6-125-50":[-48.98,-11.91],"6-125-51":[-75.78,-21.91],"5-62-25":[-84.41,535.73],"6-125-52":[-88.21,-37.16],"6-125-53":[-96.9,-44.36],"5-62-26":[-96.9,-35.05],"6-125-54":[-99.71,-46.22],"6-125-55":[-113.95,-50.03],"5-62-27":[-113.95,-43.58],"6-125-56":[-118.23,-55.58],"6-125-57":[-119.6,-57.02],"5-62-28":[-119.6,3544.4],"6-125-58":[-119.13,-57.36],"6-125-59":[-115.13,-52.66],"5-62-29":[-119.13,2252.06],"6-125-60":[-106.04,-48.63],"6-125-61":[-95.54,2586.73],"5-62-30":[-106.04,3812.59],"6-125-62":[617.47,3991.97],"6-125-63":[-29.54,3087.55],"5-62-31":[-29.54,3991.97],"6-126-0":[10.48,26.83],"6-126-1":[6.39,19.79],"6-126-2":[3.59,12.74],"6-126-3":[1.34,7.32],"6-126-4":[1.23,5.6],"6-126-5":[1.15,4.51],"6-126-6":[1.24,5.95],"6-126-7":[2.53,1644.02],"6-126-8":[4.57,1334.46],"6-126-9":[2.53,1348.08],"6-126-10":[-4.55,360.68],"6-126-11":[-0.22,3.75],"6-126-12":[-4.16,11.04],"6-126-13":[-20.67,663.5],"6-126-14":[-17.18,1.9],"6-126-15":[-17.03,-2.13],"6-126-16":[-23.5,-6.98],"6-126-17":[-25.32,-10.8],"6-126-18":[-24.77,-10.53],"6-126-19":[-22.17,-7.92],"6-126-20":[-19.02,-6.36],"6-126-21":[-15.67,-4.68],"6-126-22":[-13.71,-4.14],"6-126-23":[-8.08,4.18],"6-126-24":[0.43,12.94],"6-126-25":[5.52,20.01],"6-126-26":[9,27.01],"6-126-27":[12.09,34.89],"6-126-28":[14.82,40.97],"6-126-29":[17.43,44.78],"6-126-30":[17.98,49.65],"6-126-31":[20.75,52.08],"6-126-32":[19.19,56],"6-126-33":[25.26,66],"6-126-34":[28.98,76.55],"6-126-35":[34.87,95.02],"6-126-36":[41.34,297.72],"6-126-37":[52.33,122.31],"6-126-38":[55.22,587.24],"6-126-39":[52.13,124.15],"6-126-40":[49.8,107.99],"6-126-41":[47.34,102.99],"6-126-42":[43.4,96.7],"6-126-43":[39.32,87],"6-126-44":[-5.9,921.24],"6-126-45":[-23.78,2784.98],"6-126-46":[-12.29,1743.24],"6-126-47":[4.88,29.21],"6-126-48":[-9.96,11.4],"6-126-49":[-34.93,-4.57],"6-126-50":[-54.64,-14.05],"6-126-51":[-75.71,-26.38],"6-126-52":[-89.11,-37.37],"6-126-53":[-98.36,-44.98],"6-126-54":[-101.06,-48.44],"6-126-55":[-115.57,-50.65],"6-126-56":[-120.87,-56.97],"6-126-57":[-122.6,-57.42],"6-126-58":[-120.57,-57.41],"6-126-59":[-115.91,-52.64],"6-126-60":[-106.89,-48.23],"6-126-61":[-95.56,3164.9],"6-126-62":[1096.86,4009.42],"6-126-63":[-29.54,3089.77],"6-127-0":[10.58,26.87],"6-127-1":[6.39,20.25],"5-63-0":[6.39,26.87],"6-127-2":[3.82,13.4],"6-127-3":[2.41,8.63],"5-63-1":[1.34,13.4],"4-31-0":[0.14,26.87],"6-127-4":[1.13,6.79],"6-127-5":[1.13,4.39],"5-63-2":[1.13,6.79],"6-127-6":[1.24,612.64],"6-127-7":[2.31,1712.25],"5-63-3":[1.24,1712.25],"4-31-1":[0.89,1712.25],"3-15-0":[0.14,1712.25],"6-127-8":[4.5,1465.56],"6-127-9":[3.01,918.23],"5-63-4":[2.53,1465.56],"6-127-10":[-3.08,11.47],"6-127-11":[-0.12,3.44],"5-63-5":[-4.55,360.68],"4-31-2":[-4.55,2305.88],"6-127-12":[-1.99,11.61],"6-127-13":[-24.8,1210.91],"5-63-6":[-24.8,1210.91],"6-127-14":[-25.57,1.39],"6-127-15":[-13.94,-1.38],"5-63-7":[-25.57,1.9],"4-31-3":[-25.57,1210.91],"3-15-1":[-25.57,4774.23],"2-7-0":[-25.57,4774.23],"6-127-16":[-21,-6.43],"6-127-17":[-25.9,-10.68],"5-63-8":[-25.9,-6.43],"6-127-18":[-26.05,-10.54],"6-127-19":[-22.59,-7.92],"5-63-9":[-26.05,-7.92],"4-31-4":[-31.2,-2.41],"6-127-20":[-19,-7.92],"6-127-21":[-16.82,-4.7],"5-63-10":[-19.02,-4.68],"6-127-22":[-10.69,-3.04],"6-127-23":[-8.26,1.26],"5-63-11":[-13.71,4.18],"4-31-5":[-24.31,9.7],"3-15-2":[-31.2,39.89],"6-127-24":[0.43,9.72],"6-127-25":[4.5,17.61],"5-63-12":[0.43,20.01],"6-127-26":[6.9,22.78],"6-127-27":[8.89,29.21],"5-63-13":[6.9,34.89],"4-31-6":[0.43,48.53],"6-127-28":[12.01,35],"6-127-29":[14.22,37.73],"5-63-14":[12.01,44.78],"6-127-30":[15.67,40.09],"6-127-31":[19.02,46.55],"5-63-15":[15.67,52.08],"4-31-7":[12.01,68.96],"3-15-3":[0.43,831.89],"2-7-1":[-84.13,3800.26],"1-3-0":[-268.7,7512.84],"6-127-32":[20.92,50.53],"6-127-33":[22.89,57.98],"5-63-16":[19.19,66],"6-127-34":[25.27,69.75],"6-127-35":[27.53,86.05],"5-63-17":[25.27,95.02],"4-31-8":[19.19,117.27],"6-127-36":[39.54,104.68],"6-127-37":[22.06,1069.23],"5-63-18":[22.06,1069.23],"6-127-38":[20.15,1371.15],"6-127-39":[49.74,108.66],"5-63-19":[20.15,1371.15],"4-31-9":[20.15,1371.15],"3-15-4":[-166.26,2387.59],"6-127-40":[48.93,103.15],"6-127-41":[47.07,98.56],"5-63-20":[47.07,107.99],"6-127-42":[43.96,94.48],"6-127-43":[38.98,91.71],"5-63-21":[38.98,96.7],"4-31-10":[32.69,131.97],"6-127-44":[20.8,83.16],"6-127-45":[-12.67,1759.88],"5-63-22":[-23.78,2784.98],"6-127-46":[11.75,42.6],"6-127-47":[3.24,30.55],"5-63-23":[-12.29,1743.24],"4-31-11":[-35.65,3719.73],"3-15-5":[-345.62,3719.73],"2-7-2":[-345.62,5227.39],"6-127-48":[-9.45,37.42],"6-127-49":[-38.82,351.39],"5-63-24":[-38.82,351.39],"6-127-50":[-56.24,-17.74],"6-127-51":[-75.79,-28.67],"5-63-25":[-75.79,-14.05],"4-31-12":[-84.41,2290.2],"6-127-52":[-88.85,-37.45],"6-127-53":[-98.42,-44.71],"5-63-26":[-98.42,-37.37],"6-127-54":[-101.55,-48.81],"6-127-55":[-117.07,-50.94],"5-63-27":[-117.07,-48.44],"4-31-13":[-117.07,-35.05],"3-15-6":[-117.07,2290.2],"6-127-56":[-123.45,-57.63],"6-127-57":[-123.93,-60.36],"5-63-28":[-123.93,-56.97],"6-127-58":[-123.3,-58.62],"6-127-59":[-117.49,-53.65],"5-63-29":[-123.3,-52.64],"4-31-14":[-123.93,3544.4],"6-127-60":[-109.53,-48.22],"6-127-61":[-95.58,1201.67],"5-63-30":[-109.53,3164.9],"6-127-62":[-43.08,3227.47],"6-127-63":[-31.68,3092.98],"5-63-31":[-43.08,4009.42],"4-31-15":[-109.53,4009.42],"3-15-7":[-123.93,4324.92],"2-7-3":[-123.93,4324.92],"1-3-1":[-345.62,5227.39],"0-1-0":[-398.55,8777.15]} \ No newline at end of file +{"6-0-0":[-60.9,1359.39],"6-0-1":[-734.16,2871.77],"6-0-2":[-860.34,14.2],"6-0-3":[-820.07,8.89],"6-0-4":[-822.21,6.8],"6-0-5":[-1287.68,4.22],"6-0-6":[-3806.44,996.64],"6-0-7":[-4083.09,1473.8],"6-0-8":[-4254.47,1405.42],"6-0-9":[-4909.7,9.42],"6-0-10":[-5356.65,10.41],"6-0-11":[-5779.14,9.42],"6-0-12":[-5680.2,10.72],"6-0-13":[-5633.18,1797.13],"6-0-14":[-5473.11,3.24],"6-0-15":[-5073.82,0.06],"6-0-16":[-3112.78,-5.62],"6-0-17":[-4278.61,-10.79],"6-0-18":[-5776.01,-11.56],"6-0-19":[-8664.64,-9.29],"6-0-20":[-10108.73,43.72],"6-0-21":[-6315.74,480.3],"6-0-22":[-3138.45,-0.18],"6-0-23":[-3177.81,259.94],"6-0-24":[-4361.69,195.8],"6-0-25":[-4176.86,1120.83],"6-0-26":[-3604,1188.85],"6-0-27":[-4874.82,377.59],"6-0-28":[-5555.91,212.64],"6-0-29":[-6808.91,32.43],"6-0-30":[-6537.63,36.44],"6-0-31":[-5876.58,41.7],"6-0-32":[-6002.84,43.91],"6-0-33":[-6383.26,48.69],"6-0-34":[-6458.42,56.5],"6-0-35":[-6608.86,79],"6-0-36":[-6499.38,95.12],"6-0-37":[-6382.42,1242.86],"6-0-38":[-5476.07,1197.83],"6-0-39":[-6577.17,149.88],"6-0-40":[-5871.43,105.09],"6-0-41":[-5691.18,101.97],"6-0-42":[-6084.14,550.11],"6-0-43":[-6456.25,92.57],"6-0-44":[-5403.21,77.99],"6-0-45":[-7722.74,46.63],"6-0-46":[-8051.96,43.07],"6-0-47":[-7228.07,29.35],"6-0-48":[-6696.32,6.49],"6-0-49":[-7347.5,-4.52],"6-0-50":[-5663.37,1731.13],"6-0-51":[-4025.96,-29.46],"6-0-52":[-4181.98,-37.9],"6-0-53":[-3554.43,-44.45],"6-0-54":[-175.4,-32.99],"6-0-55":[-119.7,1412.43],"6-0-56":[-126.97,1474.79],"6-0-57":[-126.3,982.63],"6-0-58":[-1295.62,-59.46],"6-0-59":[-1696.92,-54.84],"6-0-60":[-2540.06,-48.64],"6-0-61":[-2969.81,258.8],"6-0-62":[-3982.53,2997.38],"6-0-63":[-4339.64,3098.17],"6-1-0":[-62.92,1400.78],"6-1-1":[-811.24,3723.38],"5-0-0":[-811.24,3723.38],"6-1-2":[-822.56,15.04],"6-1-3":[-767.63,8.36],"5-0-1":[-860.34,15.04],"6-1-4":[-730.48,6.83],"6-1-5":[-3128.49,4.83],"5-0-2":[-3128.49,6.83],"6-1-6":[-4134.79,343.9],"6-1-7":[-4441.09,308.3],"5-0-3":[-4441.09,1473.8],"6-1-8":[-4533.36,906.96],"6-1-9":[-4556.62,286.65],"5-0-4":[-4909.7,1405.42],"6-1-10":[-5768.3,14],"6-1-11":[-5899.35,14.18],"5-0-5":[-5899.35,14.18],"6-1-12":[-5651.2,10.46],"6-1-13":[-6362.61,1734.24],"5-0-6":[-6362.61,1797.13],"6-1-14":[-5667.12,6.52],"6-1-15":[-5396,1.31],"5-0-7":[-5667.12,6.52],"6-1-16":[-3687.33,294.62],"6-1-17":[-5765.96,-10],"5-0-8":[-5765.96,294.62],"6-1-18":[-5729.6,-12.15],"6-1-19":[-6079.81,-9.22],"5-0-9":[-8664.64,-9.22],"6-1-20":[-10076.36,-7.87],"6-1-21":[-9964.92,0.26],"5-0-10":[-10108.73,480.3],"6-1-22":[-9820.47,9.27],"6-1-23":[-10731.15,6.54],"5-0-11":[-10731.15,259.94],"6-1-24":[-8128.35,538.48],"6-1-25":[-3473,974.2],"5-0-12":[-8128.35,1120.83],"6-1-26":[-5852,229.74],"6-1-27":[-5790.22,521.25],"5-0-13":[-5852,1188.85],"6-1-28":[-5704.51,327.62],"6-1-29":[-6687.63,31.23],"5-0-14":[-6808.91,327.62],"6-1-30":[-6552.55,34.4],"6-1-31":[-6370.48,38.74],"5-0-15":[-6552.55,41.7],"6-1-32":[-5715.64,39.97],"6-1-33":[-5857.02,44.11],"5-0-16":[-6383.26,48.69],"6-1-34":[-6145.81,49.53],"6-1-35":[-6715.64,65.95],"5-0-17":[-6715.64,79],"6-1-36":[-5845.01,188.59],"6-1-37":[-5976.36,262.29],"5-0-18":[-6499.38,1242.86],"6-1-38":[-5615.55,1074.21],"6-1-39":[-5961.75,561.48],"5-0-19":[-6577.17,1197.83],"6-1-40":[-5749.3,105.17],"6-1-41":[-5646.26,99.7],"5-0-20":[-5871.43,105.17],"6-1-42":[-6209.24,82.54],"6-1-43":[-6165.22,61.85],"5-0-21":[-6456.25,550.11],"6-1-44":[-6248.43,55.81],"6-1-45":[-7562.16,46.46],"5-0-22":[-7722.74,77.99],"6-1-46":[-6645.44,36.12],"6-1-47":[-7451.64,306.25],"5-0-23":[-8051.96,306.25],"6-1-48":[-6155.38,5.19],"6-1-49":[-7337.43,-11.13],"5-0-24":[-7347.5,6.49],"6-1-50":[-7328.11,1663.23],"6-1-51":[-4298.74,-29.65],"5-0-25":[-7328.11,1731.13],"6-1-52":[-3730.44,-37.51],"6-1-53":[-191.66,-43.07],"5-0-26":[-4181.98,-37.51],"6-1-54":[-117.87,309.64],"6-1-55":[-120.92,886.84],"5-0-27":[-175.4,1412.43],"6-1-56":[-127.84,338.3],"6-1-57":[-130.41,309.89],"5-0-28":[-130.41,1474.79],"6-1-58":[-2110.87,-59.59],"6-1-59":[-2239.39,-55.12],"5-0-29":[-2239.39,-54.84],"6-1-60":[-3264.35,-49.4],"6-1-61":[-3093.55,-11.15],"5-0-30":[-3264.35,258.8],"6-1-62":[-4063.46,3443.81],"6-1-63":[-4241.6,3102.34],"5-0-31":[-4339.64,3443.81],"6-2-0":[-65.96,1535.56],"6-2-1":[-726.95,3893.49],"6-2-2":[-822.56,15.73],"6-2-3":[-756.52,7.2],"6-2-4":[-976.58,5.79],"6-2-5":[-3873.63,5.62],"6-2-6":[-4273.11,2.52],"6-2-7":[-4730.1,3.57],"6-2-8":[-4275.1,1107.58],"6-2-9":[-4203.77,935.49],"6-2-10":[-5335.51,447.82],"6-2-11":[-5754.56,22.33],"6-2-12":[-5580.99,15.33],"6-2-13":[-6324.53,1546.34],"6-2-14":[-5877.47,10.11],"6-2-15":[-5605.22,3.51],"6-2-16":[-5451.88,-3.75],"6-2-17":[-5191.5,-8.48],"6-2-18":[-5888.86,-11.53],"6-2-19":[-6170.07,-11.45],"6-2-20":[-6231.35,-7.64],"6-2-21":[-6591.66,-2.94],"6-2-22":[-6564.98,22.84],"6-2-23":[-9845.18,13.16],"6-2-24":[-9880.17,66.19],"6-2-25":[-9681.78,234.26],"6-2-26":[-9135.58,489.1],"6-2-27":[-5127.54,1851.33],"6-2-28":[-5847.04,276.4],"6-2-29":[-6984.98,26.06],"6-2-30":[-6587.38,259.45],"6-2-31":[-6810.43,34.73],"6-2-32":[-5944.71,36.73],"6-2-33":[-6196.39,38.35],"6-2-34":[-6274.62,45.33],"6-2-35":[-6655.12,56.51],"6-2-36":[-6233.79,1897.33],"6-2-37":[-6086.2,602.11],"6-2-38":[-5770.59,258.3],"6-2-39":[-5644.12,87.93],"6-2-40":[-5280.45,68.5],"6-2-41":[-5640.3,90.18],"6-2-42":[-5794.61,69.11],"6-2-43":[-6212.25,60.23],"6-2-44":[-6473.07,53.69],"6-2-45":[-6649.88,38.48],"6-2-46":[-6137.71,25.76],"6-2-47":[-7286.95,16.06],"6-2-48":[-6428.91,-1.78],"6-2-49":[-7302.54,-12.47],"6-2-50":[-7770.99,1478.35],"6-2-51":[-3880.57,-28.99],"6-2-52":[-3448.8,-36.15],"6-2-53":[-178.92,439.82],"6-2-54":[-123.47,902.48],"6-2-55":[-118.16,1085.57],"6-2-56":[-127.84,-21.84],"6-2-57":[-132.46,-19.72],"6-2-58":[-2110.87,-59.33],"6-2-59":[-2528.11,-55.1],"6-2-60":[-3347.91,-49.58],"6-2-61":[-3384.08,-43.95],"6-2-62":[-3950.67,3904.3],"6-2-63":[-4226.49,3104.92],"6-3-0":[-67.96,1730.59],"6-3-1":[-816.29,4033.51],"5-1-0":[-816.29,4033.51],"6-3-2":[-811.11,16.58],"6-3-3":[-756.52,6.48],"5-1-1":[-822.56,16.58],"4-0-0":[-860.34,4033.51],"6-3-4":[-1287.47,6.76],"6-3-5":[-4053.9,6.63],"5-1-2":[-4053.9,6.76],"6-3-6":[-4347.97,3.03],"6-3-7":[-4616.06,2.79],"5-1-3":[-4730.1,3.57],"4-0-1":[-4730.1,1473.8],"6-3-8":[-4631.95,912.84],"6-3-9":[-3872.37,618.8],"5-1-4":[-4631.95,1107.58],"6-3-10":[-5400.71,21.82],"6-3-11":[-5589.06,311.37],"5-1-5":[-5754.56,447.82],"4-0-2":[-5899.35,1405.42],"6-3-12":[-5676.31,24.46],"6-3-13":[-5899.59,1745.85],"5-1-6":[-6324.53,1745.85],"6-3-14":[-5693.6,13.6],"6-3-15":[-6424.28,5.28],"5-1-7":[-6424.28,13.6],"4-0-3":[-6424.28,1797.13],"6-3-16":[-5503.34,-3.16],"6-3-17":[-5293.32,-8.29],"5-1-8":[-5503.34,-3.16],"6-3-18":[-5706.05,-10.93],"6-3-19":[-5968.6,-12.17],"5-1-9":[-6170.07,-10.93],"4-0-4":[-8664.64,294.62],"6-3-20":[-6353.54,-7.64],"6-3-21":[-6004.34,0.47],"5-1-10":[-6591.66,0.47],"6-3-22":[-6626.4,23.06],"6-3-23":[-7232.28,22.37],"5-1-11":[-9845.18,23.06],"4-0-5":[-10731.15,480.3],"6-3-24":[-6517.94,19.36],"6-3-25":[-5787.28,113.77],"5-1-12":[-9880.17,234.26],"6-3-26":[-5603.42,996.87],"6-3-27":[-5500.68,711.38],"5-1-13":[-9135.58,1851.33],"4-0-6":[-9880.17,1851.33],"6-3-28":[-6128.57,217.04],"6-3-29":[-5976.44,24.86],"5-1-14":[-6984.98,276.4],"6-3-30":[-6431.75,177.46],"6-3-31":[-7363.73,30.64],"5-1-15":[-7363.73,259.45],"4-0-7":[-7363.73,327.62],"6-3-32":[-5957,33.87],"6-3-33":[-6180.13,35.79],"5-1-16":[-6196.39,38.35],"6-3-34":[-6378.4,41.34],"6-3-35":[-5963.3,51.07],"5-1-17":[-6655.12,56.51],"4-0-8":[-6715.64,79],"6-3-36":[-6145.95,771.39],"6-3-37":[-6134.23,997.06],"5-1-18":[-6233.79,1897.33],"6-3-38":[-5498.8,125.79],"6-3-39":[-5122.04,58.96],"5-1-19":[-5770.59,258.3],"4-0-9":[-6577.17,1897.33],"6-3-40":[-5350.19,59.21],"6-3-41":[-5359.87,68.85],"5-1-20":[-5640.3,90.18],"6-3-42":[-5855.5,55.57],"6-3-43":[-6391.29,45.14],"5-1-21":[-6391.29,69.11],"4-0-10":[-6456.25,550.11],"6-3-44":[-6435.56,42.37],"6-3-45":[-6707.23,30.69],"5-1-22":[-6707.23,53.69],"6-3-46":[-6686.73,18.1],"6-3-47":[-7092.52,6.67],"5-1-23":[-7286.95,25.76],"4-0-11":[-8051.96,306.25],"6-3-48":[-6953.08,-4.53],"6-3-49":[-5732.35,-13.01],"5-1-24":[-7302.54,-1.78],"6-3-50":[-7284.14,1619.84],"6-3-51":[-3483.9,-27.95],"5-1-25":[-7770.99,1619.84],"4-0-12":[-7770.99,1731.13],"6-3-52":[-2236.21,269.38],"6-3-53":[-158.69,-15.42],"5-1-26":[-3448.8,439.82],"6-3-54":[-99.02,616.8],"6-3-55":[-114.54,911.84],"5-1-27":[-123.47,1085.57],"4-0-13":[-4181.98,1412.43],"6-3-56":[-126.73,-22.99],"6-3-57":[-132.79,-17.75],"5-1-28":[-132.79,-17.75],"6-3-58":[-1869.44,-59.46],"6-3-59":[-2920.48,-55.06],"5-1-29":[-2920.48,-55.06],"4-0-14":[-2920.48,1474.79],"6-3-60":[-3346.96,-50.05],"6-3-61":[-3572.53,-43.58],"5-1-30":[-3572.53,-43.58],"6-3-62":[-3949.75,3970.41],"6-3-63":[-4299.54,3106.07],"5-1-31":[-4299.54,3970.41],"4-0-15":[-4339.64,3970.41],"6-4-0":[-67.96,1783.47],"6-4-1":[-1161.5,3926.7],"6-4-2":[-828.82,17.11],"6-4-3":[-704.94,7.09],"6-4-4":[-1407.45,8.01],"6-4-5":[-4181.68,6.22],"6-4-6":[-4383.79,2.41],"6-4-7":[-4623.83,611.05],"6-4-8":[-4397.23,1101.35],"6-4-9":[-3605.91,428.48],"6-4-10":[-5268.98,653.36],"6-4-11":[-5379.79,27.57],"6-4-12":[-5644.48,1825.97],"6-4-13":[-5659.92,2084.32],"6-4-14":[-5581.4,18.16],"6-4-15":[-6069.3,6.15],"6-4-16":[-5732.91,-2.51],"6-4-17":[-5561.06,-7.81],"6-4-18":[-5467.07,-10.93],"6-4-19":[-6445.04,-11.62],"6-4-20":[-6164.47,-7.94],"6-4-21":[-5852.56,0.97],"6-4-22":[-6692.69,17.55],"6-4-23":[-6202.21,28.15],"6-4-24":[-6698.19,19.59],"6-4-25":[-9080.84,56.94],"6-4-26":[-6082.57,22.24],"6-4-27":[-5919.39,25.71],"6-4-28":[-5822.56,27.19],"6-4-29":[-6220.26,27.84],"6-4-30":[-6622.88,28.27],"6-4-31":[-8273.64,29.58],"6-4-32":[-6224.53,32.89],"6-4-33":[-6221.95,34.86],"6-4-34":[-5718.7,35.6],"6-4-35":[-5595.88,39.9],"6-4-36":[-5808.46,43.72],"6-4-37":[-5899.51,45.71],"6-4-38":[-6912.49,48.56],"6-4-39":[-6145.04,45.88],"6-4-40":[-5619.26,863.24],"6-4-41":[-5186.7,42.29],"6-4-42":[-6049.87,42.26],"6-4-43":[-6355.98,37.32],"6-4-44":[-6622.78,32.28],"6-4-45":[-6960.65,25.33],"6-4-46":[-6793.71,17.65],"6-4-47":[-6566.43,1.08],"6-4-48":[-6377.69,-7.42],"6-4-49":[-5865.62,-13.57],"6-4-50":[-7273.09,1965.32],"6-4-51":[-5208.92,1802.98],"6-4-52":[-514.98,6.05],"6-4-53":[-481.77,671.37],"6-4-54":[-97.35,455.48],"6-4-55":[-113.49,1067.35],"6-4-56":[-126.75,528.03],"6-4-57":[-131.59,-27.82],"6-4-58":[-546.1,-58.9],"6-4-59":[-2622.06,-55.06],"6-4-60":[-3507.79,-49.97],"6-4-61":[-3821.97,-43.61],"6-4-62":[-3936.9,3807.76],"6-4-63":[-4312.53,3106.13],"6-5-0":[-65.96,1809.17],"6-5-1":[-1123.74,3611.78],"5-2-0":[-1161.5,3926.7],"6-5-2":[-783.29,17.66],"6-5-3":[-769.58,7.26],"5-2-1":[-828.82,17.66],"6-5-4":[-2373.31,8],"6-5-5":[-4237.37,1.64],"5-2-2":[-4237.37,8.01],"6-5-6":[-4523.95,0.57],"6-5-7":[-4449.41,977.81],"5-2-3":[-4623.83,977.81],"6-5-8":[-4776.71,1285.63],"6-5-9":[-3809.51,689.98],"5-2-4":[-4776.71,1285.63],"6-5-10":[-5160.02,574.41],"6-5-11":[-5484.51,29.76],"5-2-5":[-5484.51,653.36],"6-5-12":[-5463.02,2863.96],"6-5-13":[-5510.9,25.08],"5-2-6":[-5659.92,2863.96],"6-5-14":[-5633.47,19.59],"6-5-15":[-6371.35,5.94],"5-2-7":[-6371.35,19.59],"6-5-16":[-5828.33,-2.51],"6-5-17":[-6421.22,-7.99],"5-2-8":[-6421.22,-2.51],"6-5-18":[-5982.99,-11.55],"6-5-19":[-6565.05,-11.81],"5-2-9":[-6565.05,-10.93],"6-5-20":[-6784.16,-7.94],"6-5-21":[-6028.23,-0.19],"5-2-10":[-6784.16,0.97],"6-5-22":[-6399.53,8.23],"6-5-23":[-6135.89,68.18],"5-2-11":[-6692.69,68.18],"6-5-24":[-6055.38,18.67],"6-5-25":[-5836.09,998.66],"5-2-12":[-9080.84,998.66],"6-5-26":[-6060.91,20.47],"6-5-27":[-5996.07,196.74],"5-2-13":[-6082.57,196.74],"6-5-28":[-5155.46,84.53],"6-5-29":[-6004.46,30.66],"5-2-14":[-6220.26,84.53],"6-5-30":[-5896.13,32.3],"6-5-31":[-6776.17,32.65],"5-2-15":[-8273.64,32.65],"6-5-32":[-5810.52,32.3],"6-5-33":[-5562.23,34.31],"5-2-16":[-6224.53,34.86],"6-5-34":[-5388.87,33.96],"6-5-35":[-5395.61,37.54],"5-2-17":[-5718.7,39.9],"6-5-36":[-5752.23,37.44],"6-5-37":[-5924.58,31.1],"5-2-18":[-5924.58,45.71],"6-5-38":[-6440.59,38.62],"6-5-39":[-5463.5,31.7],"5-2-19":[-6912.49,48.56],"6-5-40":[-5484.19,50.2],"6-5-41":[-5747.8,29.27],"5-2-20":[-5747.8,863.24],"6-5-42":[-5919.79,28.59],"6-5-43":[-6218.64,25.16],"5-2-21":[-6355.98,42.26],"6-5-44":[-7345.46,23.39],"6-5-45":[-6835.24,19.09],"5-2-22":[-7345.46,32.28],"6-5-46":[-6802.21,10.74],"6-5-47":[-5979.18,-0.35],"5-2-23":[-6802.21,17.65],"6-5-48":[-5777.25,-8.28],"6-5-49":[-5982.59,-13.41],"5-2-24":[-6377.69,-7.42],"6-5-50":[-7131.76,-19.83],"6-5-51":[-4248.36,2750.95],"5-2-25":[-7273.09,2750.95],"6-5-52":[-82.49,0.95],"6-5-53":[-85.9,583.42],"5-2-26":[-514.98,671.37],"6-5-54":[-96.28,649.97],"6-5-55":[-112.03,1302.63],"5-2-27":[-113.49,1302.63],"6-5-56":[-123.43,899.72],"6-5-57":[-130.93,-28.8],"5-2-28":[-131.59,899.72],"6-5-58":[-2065.53,-59.02],"6-5-59":[-2302.29,-54.72],"5-2-29":[-2622.06,-54.72],"6-5-60":[-3827.92,146.66],"6-5-61":[-3883.39,-43.74],"5-2-30":[-3883.39,146.66],"6-5-62":[-4110.64,3579.75],"6-5-63":[-4229.45,3100.28],"5-2-31":[-4312.53,3807.76],"6-6-0":[-94.11,1778.04],"6-6-1":[-1591.32,2998.88],"6-6-2":[-746.81,17.98],"6-6-3":[-770.17,6.62],"6-6-4":[-3154.74,6.62],"6-6-5":[-4196.81,0.42],"6-6-6":[-4609.89,37.03],"6-6-7":[-4642.27,1376.89],"6-6-8":[-4626.96,982.62],"6-6-9":[-4855.42,985.82],"6-6-10":[-5061.5,1234.98],"6-6-11":[-4882.7,705.14],"6-6-12":[-5664.91,2536.32],"6-6-13":[-5500.81,22.83],"6-6-14":[-5641.77,19.52],"6-6-15":[-6089.63,5.64],"6-6-16":[-6504.35,-3.61],"6-6-17":[-6018.21,-9.15],"6-6-18":[-5722.93,-12.33],"6-6-19":[-6011.9,-12.54],"6-6-20":[-6422.91,-8.27],"6-6-21":[-6422.91,-1.95],"6-6-22":[-6254.61,7.14],"6-6-23":[-5852.12,190.01],"6-6-24":[-5518.96,138.47],"6-6-25":[-5674.11,119.03],"6-6-26":[-6452.43,16.51],"6-6-27":[-5818.55,191.73],"6-6-28":[-5208.22,135.96],"6-6-29":[-6149.2,51.55],"6-6-30":[-6208.7,50.16],"6-6-31":[-5562.63,33.27],"6-6-32":[-5937.47,31.91],"6-6-33":[-5302.58,272.18],"6-6-34":[-5325.41,52.97],"6-6-35":[-5599.08,41.94],"6-6-36":[-6146.87,29.88],"6-6-37":[-6482.14,25.29],"6-6-38":[-6038.67,32.55],"6-6-39":[-5338.91,25.04],"6-6-40":[-5281.24,46.05],"6-6-41":[-5779.94,21.25],"6-6-42":[-6126.98,21.21],"6-6-43":[-6173.19,20.07],"6-6-44":[-6250.7,16.55],"6-6-45":[-7523.68,12.64],"6-6-46":[-6434.49,7.66],"6-6-47":[-5854.24,-0.23],"6-6-48":[-5883.17,-8.01],"6-6-49":[-5303.84,-13.39],"6-6-50":[-6978.57,-19.08],"6-6-51":[-6793.58,2398.31],"6-6-52":[-80.36,612.17],"6-6-53":[-89.66,1323.98],"6-6-54":[-95.47,955.8],"6-6-55":[-110.06,986.95],"6-6-56":[-123.5,1457.88],"6-6-57":[-267.02,37.04],"6-6-58":[-2483.25,-62.06],"6-6-59":[-2735.7,-53.84],"6-6-60":[-3837.89,382.35],"6-6-61":[-3859.19,-36.44],"6-6-62":[-4111.64,3110.85],"6-6-63":[-4265.4,3090.17],"6-7-0":[-114.12,1993.53],"6-7-1":[-1659.34,3802.26],"5-3-0":[-1659.34,3802.26],"6-7-2":[-726.96,18.02],"6-7-3":[-856.88,4.75],"5-3-1":[-856.88,18.02],"4-1-0":[-1659.34,3926.7],"6-7-4":[-3515.76,174.18],"6-7-5":[-4316.77,-0.69],"5-3-2":[-4316.77,174.18],"6-7-6":[-4525.93,40.51],"6-7-7":[-4826.23,1489.28],"5-3-3":[-4826.23,1489.28],"4-1-1":[-4826.23,1489.28],"3-0-0":[-4826.23,4033.51],"6-7-8":[-4705.16,1063.92],"6-7-9":[-4508.79,1104.57],"5-3-4":[-4855.42,1104.57],"6-7-10":[-4405.97,1599.96],"6-7-11":[-4732.4,1740.57],"5-3-5":[-5061.5,1740.57],"4-1-2":[-5484.51,1740.57],"6-7-12":[-5035.8,2512.65],"6-7-13":[-6007.55,22.76],"5-3-6":[-6007.55,2536.32],"6-7-14":[-5655.69,18.21],"6-7-15":[-5490.55,3.05],"5-3-7":[-6089.63,19.52],"4-1-3":[-6371.35,2863.96],"3-0-1":[-6424.28,2863.96],"6-7-16":[-5742.76,-4.09],"6-7-17":[-5608.7,-10.07],"5-3-8":[-6504.35,-3.61],"6-7-18":[-5790.02,-13.47],"6-7-19":[-5942.52,-13.83],"5-3-9":[-6011.9,-12.33],"4-1-4":[-6565.05,-2.51],"6-7-20":[-6122.28,-10],"6-7-21":[-5983.9,-3.54],"5-3-10":[-6422.91,-1.95],"6-7-22":[-5652.19,4.69],"6-7-23":[-5471.5,14.6],"5-3-11":[-6254.61,190.01],"4-1-5":[-6784.16,190.01],"3-0-2":[-10731.15,480.3],"6-7-24":[-5211.11,1613.09],"6-7-25":[-10751.44,366.35],"5-3-12":[-10751.44,1613.09],"6-7-26":[-5776.41,11],"6-7-27":[-6202.43,17.46],"5-3-13":[-6452.43,191.73],"4-1-6":[-10751.44,1613.09],"6-7-28":[-6652.2,1903.24],"6-7-29":[-6197.55,32.99],"5-3-14":[-6652.2,1903.24],"6-7-30":[-5754.01,44.95],"6-7-31":[-5455.55,41.99],"5-3-15":[-6208.7,50.16],"4-1-7":[-8273.64,1903.24],"3-0-3":[-10751.44,1903.24],"6-7-32":[-5343.6,107.13],"6-7-33":[-4698.31,110.78],"5-3-16":[-5937.47,272.18],"6-7-34":[-5062.03,27.02],"6-7-35":[-5630.37,36.94],"5-3-17":[-5630.37,52.97],"4-1-8":[-6224.53,272.18],"6-7-36":[-6164.69,22.36],"6-7-37":[-5971.41,18.93],"5-3-18":[-6482.14,29.88],"6-7-38":[-5951.46,124.3],"6-7-39":[-4961.01,1612.94],"5-3-19":[-6038.67,1612.94],"4-1-9":[-6912.49,1612.94],"3-0-4":[-6912.49,1897.33],"6-7-40":[-6841.68,19.09],"6-7-41":[-6117.84,14.77],"5-3-20":[-6841.68,46.05],"6-7-42":[-6969.86,12.33],"6-7-43":[-6304.07,11.63],"5-3-21":[-6969.86,21.21],"4-1-10":[-6969.86,863.24],"6-7-44":[-6236.81,10.73],"6-7-45":[-6777.07,8.15],"5-3-22":[-7523.68,16.55],"6-7-46":[-5942.92,4.11],"6-7-47":[-6327.91,-2.7],"5-3-23":[-6434.49,7.66],"4-1-11":[-7523.68,32.28],"3-0-5":[-8051.96,863.24],"6-7-48":[-5660.04,-6.48],"6-7-49":[-5377.17,-13.72],"5-3-24":[-5883.17,-6.48],"6-7-50":[-6003.68,-19.18],"6-7-51":[-7476.07,2467.65],"5-3-25":[-7476.07,2467.65],"4-1-12":[-7476.07,2750.95],"6-7-52":[-294.64,1671.56],"6-7-53":[-81.45,1454.97],"5-3-26":[-294.64,1671.56],"6-7-54":[-93.97,1100.59],"6-7-55":[-109.85,1114.85],"5-3-27":[-110.06,1114.85],"4-1-13":[-514.98,1671.56],"3-0-6":[-7770.99,2750.95],"6-7-56":[-122.72,1462.27],"6-7-57":[-2671.74,44.62],"5-3-28":[-2671.74,1462.27],"6-7-58":[-3895.05,-62.74],"6-7-59":[-3863.74,340.29],"5-3-29":[-3895.05,340.29],"4-1-14":[-3895.05,1462.27],"6-7-60":[-3837.37,329.56],"6-7-61":[-3854.32,5.39],"5-3-30":[-3859.19,382.35],"6-7-62":[-3894.65,3872.33],"6-7-63":[-4253.4,3078.77],"5-3-31":[-4265.4,3872.33],"4-1-15":[-4312.53,3872.33],"3-0-7":[-4339.64,3970.41],"6-8-0":[-133.19,2418.18],"6-8-1":[-1497.67,3630.69],"6-8-2":[-725.49,17.9],"6-8-3":[-860.75,4.36],"6-8-4":[-3573.59,698.67],"6-8-5":[-4331.48,-1.15],"6-8-6":[-4503.3,46.22],"6-8-7":[-4850,2230.09],"6-8-8":[-4712.88,2322.75],"6-8-9":[-4566.51,1231.31],"6-8-10":[-4355.63,1286.11],"6-8-11":[-4501.55,2365.52],"6-8-12":[-4660.11,340.69],"6-8-13":[-5966.24,23.37],"6-8-14":[-5682.56,15.39],"6-8-15":[-5231.54,0.65],"6-8-16":[-5608.95,-6.49],"6-8-17":[-5431.41,-11.47],"6-8-18":[-5762.65,-14.68],"6-8-19":[-5770,-15.15],"6-8-20":[-6098.74,-12.28],"6-8-21":[-5777.78,-7.16],"6-8-22":[-5728.06,1],"6-8-23":[-5391.55,7.31],"6-8-24":[-5807.69,4224.76],"6-8-25":[-5219.34,4199.19],"6-8-26":[-9303.29,93.4],"6-8-27":[-5769.45,13.28],"6-8-28":[-6531.38,20.81],"6-8-29":[-6133.11,227.93],"6-8-30":[-5459.96,441.43],"6-8-31":[-5482.43,39.3],"6-8-32":[-5063.73,105.79],"6-8-33":[-4939.68,33.65],"6-8-34":[-5381.15,29.43],"6-8-35":[-5847.02,18.21],"6-8-36":[-6404.77,15.57],"6-8-37":[-6114.51,18.43],"6-8-38":[-5763.74,4199.19],"6-8-39":[-6049.76,4224.65],"6-8-40":[-5216.39,11.5],"6-8-41":[-6204.87,8],"6-8-42":[-6753.63,5.43],"6-8-43":[-6639.76,5.22],"6-8-44":[-6145.45,4.54],"6-8-45":[-6369.08,2.59],"6-8-46":[-6009.01,1.16],"6-8-47":[-6003.66,-3.98],"6-8-48":[-5816.42,-6.48],"6-8-49":[-5499.75,-13.07],"6-8-50":[-5244.21,-18.94],"6-8-51":[-6022.65,229.61],"6-8-52":[-333.13,2312.51],"6-8-53":[-78.98,1236.1],"6-8-54":[-91.83,1205.31],"6-8-55":[-109.23,2269.75],"6-8-56":[-120.92,2154.43],"6-8-57":[-3744.55,41.81],"6-8-58":[-4090.38,-62.51],"6-8-59":[-3900.79,772.25],"6-8-60":[-3952.21,254.93],"6-8-61":[-3830.41,77.33],"6-8-62":[-3849.56,3797.09],"6-8-63":[-4233.39,3066.33],"6-9-0":[-133.33,2625.88],"6-9-1":[-1543.8,2875.32],"5-4-0":[-1543.8,3630.69],"6-9-2":[-750.6,17.45],"6-9-3":[-948.63,3.84],"5-4-1":[-948.63,17.9],"6-9-4":[-3712.36,882.14],"6-9-5":[-4355.95,-2.83],"5-4-2":[-4355.95,882.14],"6-9-6":[-4514.92,52.5],"6-9-7":[-4691.52,2249.45],"5-4-3":[-4850,2249.45],"6-9-8":[-4726.41,1957.92],"6-9-9":[-4515.51,3549.52],"5-4-4":[-4726.41,3549.52],"6-9-10":[-3523.27,3498.22],"6-9-11":[-3809.98,2301.61],"5-4-5":[-4501.55,3498.22],"6-9-12":[-5184.02,28.12],"6-9-13":[-5526.88,22.28],"5-4-6":[-5966.24,340.69],"6-9-14":[-5637.58,10.49],"6-9-15":[-6327.22,-1.66],"5-4-7":[-6327.22,15.39],"6-9-16":[-6383.59,-8.53],"6-9-17":[-5698.62,-13.07],"5-4-8":[-6383.59,-6.49],"6-9-18":[-5820.88,-16.27],"6-9-19":[-5844.73,-16.03],"5-4-9":[-5844.73,-14.68],"6-9-20":[-5753.67,-13.34],"6-9-21":[-5997.64,-9.72],"5-4-10":[-6098.74,-7.16],"6-9-22":[-6149.97,-3.51],"6-9-23":[-5554.04,244.22],"5-4-11":[-6149.97,244.22],"6-9-24":[-5257.94,211.35],"6-9-25":[-5050.78,8.27],"5-4-12":[-5807.69,4224.76],"6-9-26":[-6105.07,325.78],"6-9-27":[-5717.79,7.73],"5-4-13":[-9303.29,325.78],"6-9-28":[-6191.84,3407.2],"6-9-29":[-6202.92,25.09],"5-4-14":[-6531.38,3407.2],"6-9-30":[-6482.71,28.45],"6-9-31":[-5201.78,30.86],"5-4-15":[-6482.71,441.43],"6-9-32":[-5182.24,31.34],"6-9-33":[-5362.99,28.46],"5-4-16":[-5362.99,105.79],"6-9-34":[-5789.15,22.63],"6-9-35":[-5533.58,15.89],"5-4-17":[-5847.02,29.43],"6-9-36":[-6622.39,11.11],"6-9-37":[-6497.61,364.92],"5-4-18":[-6622.39,364.92],"6-9-38":[-5642.43,11.45],"6-9-39":[-5994.03,7.86],"5-4-19":[-6049.76,4224.65],"6-9-40":[-5922.92,87.14],"6-9-41":[-6445.99,2.06],"5-4-20":[-6445.99,87.14],"6-9-42":[-6639.94,0.4],"6-9-43":[-5881.49,0.66],"5-4-21":[-6753.63,5.43],"6-9-44":[-6260.21,0.22],"6-9-45":[-6305.46,-1.28],"5-4-22":[-6369.08,4.54],"6-9-46":[-6130.83,-1.34],"6-9-47":[-6127.19,-5.15],"5-4-23":[-6130.83,1.16],"6-9-48":[-6167.65,-8.73],"6-9-49":[-5701.32,-13.13],"5-4-24":[-6167.65,-6.48],"6-9-50":[-5808.68,-17.8],"6-9-51":[-5585.66,-22.53],"5-4-25":[-6022.65,229.61],"6-9-52":[-3994.2,2166.51],"6-9-53":[-554.63,3405.43],"5-4-26":[-3994.2,3405.43],"6-9-54":[-90.63,3271.87],"6-9-55":[-107.41,1943.8],"5-4-27":[-109.23,3271.87],"6-9-56":[-119.96,2151.83],"6-9-57":[-3879.83,50.13],"5-4-28":[-3879.83,2154.43],"6-9-58":[-3936.01,-58.13],"6-9-59":[-3930.23,1007.23],"5-4-29":[-4090.38,1007.23],"6-9-60":[-3961.21,462.57],"6-9-61":[-3866.34,462.57],"5-4-30":[-3961.21,462.57],"6-9-62":[-3785.04,2783.57],"6-9-63":[-4243.39,3039.73],"5-4-31":[-4243.39,3797.09],"6-10-0":[-168.35,2478.84],"6-10-1":[-1188.55,2541.84],"6-10-2":[-835.74,17.55],"6-10-3":[-1077.31,67.73],"6-10-4":[-1634.85,417.41],"6-10-5":[-4329.28,-2.83],"6-10-6":[-4516.89,31.96],"6-10-7":[-4681.61,2250.87],"6-10-8":[-5159.84,1714.22],"6-10-9":[-4538.5,6207.28],"6-10-10":[-3782.64,2318.12],"6-10-11":[-3750.01,380.19],"6-10-12":[-5228.22,24.81],"6-10-13":[-5185.35,18.21],"6-10-14":[-5553.54,6.41],"6-10-15":[-6417.51,-4.11],"6-10-16":[-5662.92,-11.54],"6-10-17":[-5774.67,-15.64],"6-10-18":[-6844.62,-19.38],"6-10-19":[-6254.77,-18.81],"6-10-20":[-6338.1,-14.67],"6-10-21":[-6350.66,-11.93],"6-10-22":[-5752.27,-8.91],"6-10-23":[-5626.96,337.29],"6-10-24":[-5190.17,300.87],"6-10-25":[-6327.94,1587.33],"6-10-26":[-4919.76,858.44],"6-10-27":[-5755.82,266.32],"6-10-28":[-5400.68,1458.3],"6-10-29":[-5831.18,19.96],"6-10-30":[-5587.29,24.2],"6-10-31":[-5535.76,28.1],"6-10-32":[-5166.66,27.88],"6-10-33":[-5404.48,27.31],"6-10-34":[-5750.11,20.7],"6-10-35":[-5655.89,29.22],"6-10-36":[-6415.07,34.33],"6-10-37":[-6463.93,982.44],"6-10-38":[-5795.6,1738.21],"6-10-39":[-6460.21,368.88],"6-10-40":[-6468.28,399.3],"6-10-41":[-7036.1,-0.9],"6-10-42":[-6744.24,-1.07],"6-10-43":[-6358.02,-1.37],"6-10-44":[-6201.6,-2.29],"6-10-45":[-6329.6,-3.92],"6-10-46":[-5996.93,-4.4],"6-10-47":[-5697.46,-6.94],"6-10-48":[-5653.13,-10.44],"6-10-49":[-5656,-13.58],"6-10-50":[-5893.86,-16.97],"6-10-51":[-5523.63,-20.99],"6-10-52":[-5381.5,346.13],"6-10-53":[-1809.46,2120.75],"6-10-54":[-88.65,6095.63],"6-10-55":[-106.09,1765.96],"6-10-56":[-116.67,2185.42],"6-10-57":[-3874.65,26.49],"6-10-58":[-3919.09,-55.65],"6-10-59":[-3927.57,883.88],"6-10-60":[-3907.83,570.37],"6-10-61":[-3613.14,549.47],"6-10-62":[-3644,2425.34],"6-10-63":[-4227.35,3008.67],"6-11-0":[-183.38,2377.6],"6-11-1":[-1234.31,3176.27],"5-5-0":[-1234.31,3176.27],"6-11-2":[-902.26,18.15],"6-11-3":[-1164.72,75.57],"5-5-1":[-1164.72,75.57],"4-2-0":[-1543.8,3630.69],"6-11-4":[-2094.06,663.6],"6-11-5":[-4260.3,-3.47],"5-5-2":[-4329.28,663.6],"6-11-6":[-4409.85,5.59],"6-11-7":[-4506.16,2337.17],"5-5-3":[-4681.61,2337.17],"4-2-1":[-4850,2337.17],"6-11-8":[-5196.88,1624.53],"6-11-9":[-4768.63,4180.16],"5-5-4":[-5196.88,6207.28],"6-11-10":[-4182.3,4014.2],"6-11-11":[-3864.66,27.09],"5-5-5":[-4182.3,4014.2],"4-2-2":[-5196.88,6207.28],"6-11-12":[-4863.31,20.02],"6-11-13":[-5098.5,12.89],"5-5-6":[-5228.22,24.81],"6-11-14":[-5577.52,1.04],"6-11-15":[-5517.12,-7.02],"5-5-7":[-6417.51,6.41],"4-2-3":[-6417.51,340.69],"6-11-16":[-5726.26,-14.25],"6-11-17":[-6014.63,-18.62],"5-5-8":[-6014.63,-11.54],"6-11-18":[-6047.97,-21.88],"6-11-19":[-5954.95,-21.95],"5-5-9":[-6844.62,-18.81],"4-2-4":[-6844.62,-6.49],"6-11-20":[-6376.27,-17.94],"6-11-21":[-5426.35,-14.48],"5-5-10":[-6376.27,-11.93],"6-11-22":[-5074.5,-12.52],"6-11-23":[-5623.64,309.11],"5-5-11":[-5752.27,337.29],"4-2-5":[-6376.27,337.29],"6-11-24":[-6007.69,-8.2],"6-11-25":[-4854.06,287.11],"5-5-12":[-6327.94,1587.33],"6-11-26":[-4603.51,322.84],"6-11-27":[-5478.68,40.87],"5-5-13":[-5755.82,858.44],"4-2-6":[-9303.29,4224.76],"6-11-28":[-6630.7,3.39],"6-11-29":[-5892.13,13.1],"5-5-14":[-6630.7,1458.3],"6-11-30":[-5587.29,18.24],"6-11-31":[-5106.24,23.18],"5-5-15":[-5587.29,28.1],"4-2-7":[-6630.7,3407.2],"6-11-32":[-5002.41,23.23],"6-11-33":[-5509.79,21.8],"5-5-16":[-5509.79,27.88],"6-11-34":[-5851.53,15.53],"6-11-35":[-5631.96,8.74],"5-5-17":[-5851.53,29.22],"4-2-8":[-5851.53,105.79],"6-11-36":[-6312.55,4.25],"6-11-37":[-6661.84,108.86],"5-5-18":[-6661.84,982.44],"6-11-38":[-6246.69,418.12],"6-11-39":[-6396.35,-1.41],"5-5-19":[-6460.21,1738.21],"4-2-9":[-6661.84,4224.65],"6-11-40":[-6560.2,394.12],"6-11-41":[-6052.54,-2.74],"5-5-20":[-7036.1,399.3],"6-11-42":[-6502.29,-2.09],"6-11-43":[-6219.92,-2.6],"5-5-21":[-6744.24,-1.07],"4-2-10":[-7036.1,399.3],"6-11-44":[-5862.36,-3.6],"6-11-45":[-6436.13,-5.6],"5-5-22":[-6436.13,-2.29],"6-11-46":[-5819.59,-7.76],"6-11-47":[-5495.45,-8.93],"5-5-23":[-5996.93,-4.4],"4-2-11":[-6436.13,4.54],"6-11-48":[-5200.05,-11.9],"6-11-49":[-8103.44,-13.59],"5-5-24":[-8103.44,-10.44],"6-11-50":[-5232.18,-16.5],"6-11-51":[-4750.88,-20.15],"5-5-25":[-5893.86,-16.5],"4-2-12":[-8103.44,229.61],"6-11-52":[-5077.5,-23.76],"6-11-53":[-2754.79,3834.03],"5-5-26":[-5381.5,3834.03],"6-11-54":[-86.21,3972.34],"6-11-55":[-103.18,1602.16],"5-5-27":[-106.09,6095.63],"4-2-13":[-5381.5,6095.63],"6-11-56":[-113.79,2293.15],"6-11-57":[-3765.29,6.83],"5-5-28":[-3874.65,2293.15],"6-11-58":[-3865.62,-30.17],"6-11-59":[-3941.99,896.34],"5-5-29":[-3941.99,896.34],"4-2-14":[-4090.38,2293.15],"6-11-60":[-3893.37,667.99],"6-11-61":[-3732.8,564.8],"5-5-30":[-3907.83,667.99],"6-11-62":[-3422.03,3379.23],"6-11-63":[-4222.37,2977.45],"5-5-31":[-4227.35,3379.23],"4-2-15":[-4243.39,3797.09],"6-12-0":[-181.36,1693.13],"6-12-1":[-1455.74,2871.83],"6-12-2":[-1098.55,18.51],"6-12-3":[-1119.23,2.56],"6-12-4":[-1551.27,1171.54],"6-12-5":[-4185.02,252.83],"6-12-6":[-4455.12,-1.46],"6-12-7":[-4548.47,2626.58],"6-12-8":[-4886.04,1971.14],"6-12-9":[-4860.51,4964.36],"6-12-10":[-4561.15,5003.13],"6-12-11":[-4330.54,17.77],"6-12-12":[-5941.24,17.44],"6-12-13":[-5681.57,8.08],"6-12-14":[-5679.46,-2.54],"6-12-15":[-5618.32,-10.05],"6-12-16":[-5733.88,-16.83],"6-12-17":[-6117.04,-21.69],"6-12-18":[-6699.21,-25],"6-12-19":[-6042.47,-24.8],"6-12-20":[-6163.38,-22.36],"6-12-21":[-5676.67,-17.53],"6-12-22":[-4728.02,419.05],"6-12-23":[-5762.93,154.67],"6-12-24":[-5637.54,138.75],"6-12-25":[-5061.96,265.8],"6-12-26":[-4719.59,549.53],"6-12-27":[-5417.45,-4.41],"6-12-28":[-5746,-0.37],"6-12-29":[-5483.02,6.6],"6-12-30":[-5099.46,13.43],"6-12-31":[-4938.09,18.86],"6-12-32":[-4792.79,19.08],"6-12-33":[-6222.37,16.44],"6-12-34":[-5876.68,12.4],"6-12-35":[-5719.46,3.06],"6-12-36":[-6252.33,-0.47],"6-12-37":[-6689.38,26.39],"6-12-38":[-6041.73,15.85],"6-12-39":[-6382.53,13.14],"6-12-40":[-6633.54,-5.04],"6-12-41":[-5606.01,367.1],"6-12-42":[-6254.81,-4.66],"6-12-43":[-6442.49,-5.49],"6-12-44":[-6251.77,-5.68],"6-12-45":[-5961.27,-7.48],"6-12-46":[-6225.81,-9.37],"6-12-47":[-5200.68,-11.32],"6-12-48":[-4973.03,-13.01],"6-12-49":[-4891.62,-15.16],"6-12-50":[-4935.48,-16.79],"6-12-51":[-4684.63,-19.15],"6-12-52":[-4852.85,-23.29],"6-12-53":[-4722.62,4901.79],"6-12-54":[-84.64,4907.93],"6-12-55":[-100.6,1849.36],"6-12-56":[-110.81,2580.94],"6-12-57":[-3674.95,-28.39],"6-12-58":[-3819.03,732.21],"6-12-59":[-3893.84,1118.71],"6-12-60":[-3872.09,697.82],"6-12-61":[-3706.18,547.44],"6-12-62":[-3461.9,3177.52],"6-12-63":[-4221.36,2958.4],"6-13-0":[-161.34,1474.13],"6-13-1":[-1652.61,2990.28],"5-6-0":[-1652.61,2990.28],"6-13-2":[-922.38,18.69],"6-13-3":[-1307.85,2.29],"5-6-1":[-1307.85,18.69],"6-13-4":[-1245.45,1086.26],"6-13-5":[-4159.76,828.09],"5-6-2":[-4185.02,1171.54],"6-13-6":[-4531.15,-1.51],"6-13-7":[-4629.72,2443.65],"5-6-3":[-4629.72,2626.58],"6-13-8":[-4866.08,1955.52],"6-13-9":[-4896.44,3305.19],"5-6-4":[-4896.44,4964.36],"6-13-10":[-4581.53,5501.18],"6-13-11":[-5943.29,16.19],"5-6-5":[-5943.29,5501.18],"6-13-12":[-6014.26,12.53],"6-13-13":[-5533.57,1.23],"5-6-6":[-6014.26,17.44],"6-13-14":[-5250.64,-5.03],"6-13-15":[-5500.84,-13.68],"5-6-7":[-5679.46,-2.54],"6-13-16":[-5716.49,-19.6],"6-13-17":[-6636.39,-24.29],"5-6-8":[-6636.39,-16.83],"6-13-18":[-6228.62,-29.09],"6-13-19":[-5856.69,-28.05],"5-6-9":[-6699.21,-24.8],"6-13-20":[-5910.84,-25.11],"6-13-21":[-5256.1,-21.57],"5-6-10":[-6163.38,-17.53],"6-13-22":[-4830.29,-19.25],"6-13-23":[-5393,-19.08],"5-6-11":[-5762.93,419.05],"6-13-24":[-5111.43,229.65],"6-13-25":[-4776.85,276.62],"5-6-12":[-5637.54,276.62],"6-13-26":[-4587.09,1606.36],"6-13-27":[-5913.51,-7.34],"5-6-13":[-5913.51,1606.36],"6-13-28":[-5787.05,27.02],"6-13-29":[-4722.33,528.03],"5-6-14":[-5787.05,528.03],"6-13-30":[-5229.34,5.15],"6-13-31":[-5127.76,10.05],"5-6-15":[-5229.34,18.86],"6-13-32":[-4776.14,10.97],"6-13-33":[-5127.13,9.15],"5-6-16":[-6222.37,19.08],"6-13-34":[-5659.07,574],"6-13-35":[-7447.7,3.2],"5-6-17":[-7447.7,574],"6-13-36":[-6016.23,-2.96],"6-13-37":[-6776.68,18.94],"5-6-18":[-6776.68,26.39],"6-13-38":[-5885.01,15.14],"6-13-39":[-6294.03,21.33],"5-6-19":[-6382.53,21.33],"6-13-40":[-6242.29,-7.97],"6-13-41":[-5471.92,-4.36],"5-6-20":[-6633.54,367.1],"6-13-42":[-5640.19,-4.92],"6-13-43":[-6405.01,-8.03],"5-6-21":[-6442.49,-4.66],"6-13-44":[-6316.29,-8.36],"6-13-45":[-6352.55,-9.22],"5-6-22":[-6352.55,-5.68],"6-13-46":[-6171.18,-10.62],"6-13-47":[-5055.96,-11.92],"5-6-23":[-6225.81,-9.37],"6-13-48":[-4727.1,-14.27],"6-13-49":[-6709.55,-15.88],"5-6-24":[-6709.55,-13.01],"6-13-50":[-4532.06,-16.79],"6-13-51":[-4206.32,-18.04],"5-6-25":[-4935.48,-16.79],"6-13-52":[-3930.24,-21.69],"6-13-53":[-3805.7,5374.27],"5-6-26":[-4852.85,5374.27],"6-13-54":[-82.17,3164.74],"6-13-55":[-96.84,1843.66],"5-6-27":[-100.6,4907.93],"6-13-56":[-192.46,2256.65],"6-13-57":[-3560.52,-45.32],"5-6-28":[-3674.95,2580.94],"6-13-58":[-3777.45,799.79],"6-13-59":[-3830.96,1415.24],"5-6-29":[-3893.84,1415.24],"6-13-60":[-3818.7,696.8],"6-13-61":[-3786.2,578.81],"5-6-30":[-3872.09,697.82],"6-13-62":[-3456.9,2807.42],"6-13-63":[-4223.36,2933.27],"5-6-31":[-4223.36,3177.52],"6-14-0":[-215.89,1760.1],"6-14-1":[-1678.19,3160.02],"6-14-2":[-1200.9,18.69],"6-14-3":[-1245.84,2.84],"6-14-4":[-1486.78,1054.84],"6-14-5":[-4124.23,874.8],"6-14-6":[-4464.26,-3.21],"6-14-7":[-4716.03,1629.08],"6-14-8":[-4779.66,2195.84],"6-14-9":[-5029.49,2352.25],"6-14-10":[-4887.53,5990.12],"6-14-11":[-5167.06,1250.79],"6-14-12":[-3998.63,5.47],"6-14-13":[-5641.75,-2.9],"6-14-14":[-5640.26,-9.51],"6-14-15":[-6063.37,-17],"6-14-16":[-6353.19,-23.13],"6-14-17":[-6412.37,-26.79],"6-14-18":[-5979.38,-32.26],"6-14-19":[-5645.82,-30.63],"6-14-20":[-5195.75,-28.02],"6-14-21":[-4903.61,-1.91],"6-14-22":[-4940.46,-23.49],"6-14-23":[-5190.71,-22.95],"6-14-24":[-4875.96,295.99],"6-14-25":[-4544.85,145.6],"6-14-26":[-4451.65,78.85],"6-14-27":[-4792.38,-11.82],"6-14-28":[-4507.28,1173.83],"6-14-29":[-4839.24,388.87],"6-14-30":[-4916.53,-0.54],"6-14-31":[-4887.14,3.14],"6-14-32":[-4975.78,4.38],"6-14-33":[-5142.66,4.04],"6-14-34":[-5322.02,444.87],"6-14-35":[-5384.02,1253.85],"6-14-36":[-6344.65,-4.2],"6-14-37":[-5851.42,11.81],"6-14-38":[-5795.76,12.56],"6-14-39":[-5701.16,29.28],"6-14-40":[-6003.76,-9.96],"6-14-41":[-5477.38,-8.25],"6-14-42":[-5257.35,-7.63],"6-14-43":[-6050.14,-8.79],"6-14-44":[-6456.24,-9.44],"6-14-45":[-6312.83,-9.8],"6-14-46":[-5960.56,-11.59],"6-14-47":[-4585.8,-13.34],"6-14-48":[-4683.62,-14.96],"6-14-49":[-4721.83,-16.64],"6-14-50":[-3984.97,-17.15],"6-14-51":[-3687.61,-17.84],"6-14-52":[-3668.18,1159.79],"6-14-53":[-434.8,5828.29],"6-14-54":[-81.47,2178.34],"6-14-55":[-94.24,2088.55],"6-14-56":[-557.25,1489.78],"6-14-57":[-3334.1,-50.32],"6-14-58":[-3731.79,1501.65],"6-14-59":[-3805.12,1730.64],"6-14-60":[-3800.65,752.21],"6-14-61":[-3796.21,587.99],"6-14-62":[-3065.97,3232.04],"6-14-63":[-4227.36,2914.46],"6-15-0":[-252.92,1750.21],"6-15-1":[-1586.85,3417.75],"5-7-0":[-1678.19,3417.75],"6-15-2":[-1307.4,18.62],"6-15-3":[-1291.03,3.57],"5-7-1":[-1307.4,18.69],"4-3-0":[-1678.19,3417.75],"6-15-4":[-1008.08,3235.77],"6-15-5":[-3901.52,1165.61],"5-7-2":[-4124.23,3235.77],"6-15-6":[-4460.99,-3.02],"6-15-7":[-4699.29,1677.33],"5-7-3":[-4716.03,1677.33],"4-3-1":[-4716.03,3235.77],"3-1-0":[-4850,3630.69],"6-15-8":[-5027.23,2201.64],"6-15-9":[-5359.93,2244.89],"5-7-4":[-5359.93,2352.25],"6-15-10":[-5092.31,3286.53],"6-15-11":[-4715.56,4338.49],"5-7-5":[-5167.06,5990.12],"4-3-2":[-5943.29,5990.12],"6-15-12":[-4457.58,0.26],"6-15-13":[-5147.09,-5.77],"5-7-6":[-5641.75,5.47],"6-15-14":[-5959.55,-12.56],"6-15-15":[-6660.79,-19.83],"5-7-7":[-6660.79,-9.51],"4-3-3":[-6660.79,17.44],"3-1-1":[-6660.79,6207.28],"2-0-0":[-6660.79,6207.28],"6-15-16":[-6324.33,-25.72],"6-15-17":[-6080.83,-29.35],"5-7-8":[-6412.37,-23.13],"6-15-18":[-5404.77,-34.5],"6-15-19":[-5340.82,-33.7],"5-7-9":[-5979.38,-30.63],"4-3-4":[-6699.21,-16.83],"6-15-20":[-5105.14,-31.19],"6-15-21":[-4617.63,-29.89],"5-7-10":[-5195.75,-1.91],"6-15-22":[-4638.21,-28.48],"6-15-23":[-4781.63,1449.55],"5-7-11":[-5190.71,1449.55],"4-3-5":[-6163.38,1449.55],"3-1-2":[-6844.62,1449.55],"6-15-24":[-4774.4,187.4],"6-15-25":[-4764.79,87.27],"5-7-12":[-4875.96,295.99],"6-15-26":[-4780.15,-19.12],"6-15-27":[-5089.12,-17.07],"5-7-13":[-5089.12,78.85],"4-3-6":[-5913.51,1606.36],"6-15-28":[-4769.36,-13.51],"6-15-29":[-4843.95,-9.36],"5-7-14":[-4843.95,1173.83],"6-15-30":[-4850.25,-5.14],"6-15-31":[-4785.05,-2.71],"5-7-15":[-4916.53,3.14],"4-3-7":[-5787.05,1173.83],"3-1-3":[-9303.29,4224.76],"2-0-1":[-10751.44,4224.76],"6-15-32":[-4660.98,-1.71],"6-15-33":[-5517.77,-1.49],"5-7-16":[-5517.77,4.38],"6-15-34":[-5355.58,-2.12],"6-15-35":[-5221.35,-2.93],"5-7-17":[-5384.02,1253.85],"4-3-8":[-7447.7,1253.85],"6-15-36":[-5945.39,-4.46],"6-15-37":[-5896.5,-7.9],"5-7-18":[-6344.65,11.81],"6-15-38":[-5714.69,7.98],"6-15-39":[-5642.41,16.82],"5-7-19":[-5795.76,29.28],"4-3-9":[-6776.68,29.28],"3-1-4":[-7447.7,4224.65],"6-15-40":[-5681.96,210.54],"6-15-41":[-5264.79,-11.38],"5-7-20":[-6003.76,210.54],"6-15-42":[-5490.76,-10.1],"6-15-43":[-6114.44,-10.22],"5-7-21":[-6114.44,-7.63],"4-3-10":[-6633.54,367.1],"6-15-44":[-5810.62,-10.28],"6-15-45":[-6078.66,-10.38],"5-7-22":[-6456.24,-9.44],"6-15-46":[-5516.56,-12.05],"6-15-47":[-5004.1,-13.68],"5-7-23":[-5960.56,-11.59],"4-3-11":[-6456.24,-5.68],"3-1-5":[-7036.1,399.3],"2-0-2":[-8051.96,4224.65],"6-15-48":[-4386.38,-15.28],"6-15-49":[-4351.89,-16.57],"5-7-24":[-4721.83,-14.96],"6-15-50":[-3798.21,-17.93],"6-15-51":[-3479.92,-17.17],"5-7-25":[-3984.97,-17.15],"4-3-12":[-6709.55,-13.01],"6-15-52":[-3159.54,4170.48],"6-15-53":[-822.27,3102.72],"5-7-26":[-3668.18,5828.29],"6-15-54":[-79.48,2084.36],"6-15-55":[-91.99,2173.62],"5-7-27":[-94.24,2178.34],"4-3-13":[-4852.85,5828.29],"3-1-6":[-8103.44,6095.63],"6-15-56":[-143.51,1622.37],"6-15-57":[-2992.58,-47.94],"5-7-28":[-3334.1,1622.37],"6-15-58":[-3641,1582.81],"6-15-59":[-3753.24,3280.76],"5-7-29":[-3805.12,3280.76],"4-3-14":[-3893.84,3280.76],"6-15-60":[-3755.03,1055.95],"6-15-61":[-3729.99,583.66],"5-7-30":[-3800.65,1055.95],"6-15-62":[-2999.82,3299.77],"6-15-63":[-4222.86,2899.4],"5-7-31":[-4227.36,3299.77],"4-3-15":[-4227.36,3299.77],"3-1-7":[-4243.39,3797.09],"2-0-3":[-8103.44,6095.63],"6-16-0":[-250.92,1810.14],"6-16-1":[-1292.23,3415.68],"6-16-2":[-1365.82,18.81],"6-16-3":[-1466.32,3.62],"6-16-4":[-1138.15,2724.76],"6-16-5":[-3589.89,2752.29],"6-16-6":[-4465.85,-2.92],"6-16-7":[-4699.29,358.63],"6-16-8":[-5027.84,2700.74],"6-16-9":[-5450.75,2379.96],"6-16-10":[-5052.16,2349.52],"6-16-11":[-4766.48,3089.83],"6-16-12":[-5372.47,1191.79],"6-16-13":[-5318.08,1099.24],"6-16-14":[-5414.76,-15.25],"6-16-15":[-6829.25,-21.82],"6-16-16":[-6240.03,-27.45],"6-16-17":[-5540.11,-31.05],"6-16-18":[-5487.51,-35.86],"6-16-19":[-5353.62,20.74],"6-16-20":[-5006.12,-34.53],"6-16-21":[-4672.99,-33.65],"6-16-22":[-4556.55,-33.08],"6-16-23":[-4527.94,2112.46],"6-16-24":[-4781.49,-31.17],"6-16-25":[-4721.21,-29.12],"6-16-26":[-4621.98,-25.12],"6-16-27":[-4958.22,-22.61],"6-16-28":[-4911.16,-18.47],"6-16-29":[-5018.64,-14.42],"6-16-30":[-5681.41,-9.88],"6-16-31":[-4890.89,-7.01],"6-16-32":[-4847.19,-5.38],"6-16-33":[-4875.66,-5.07],"6-16-34":[-5164.7,-4.9],"6-16-35":[-6115.42,-5.38],"6-16-36":[-5822.7,-6.96],"6-16-37":[-6357.23,-9.38],"6-16-38":[-5707.43,-10.64],"6-16-39":[-5588.39,-10.88],"6-16-40":[-5367.6,395.5],"6-16-41":[-5450.06,-12.58],"6-16-42":[-5481.79,-11.89],"6-16-43":[-5542.03,-11.48],"6-16-44":[-6548.04,-10.73],"6-16-45":[-5665.39,-11.64],"6-16-46":[-5185,-12.42],"6-16-47":[-4202.64,-13.83],"6-16-48":[-4574.57,-14.63],"6-16-49":[-5094.21,-15.29],"6-16-50":[-3625.99,971.36],"6-16-51":[-3183.7,1215.57],"6-16-52":[-870.18,2897.13],"6-16-53":[-67.1,2248.84],"6-16-54":[-78.95,2468.64],"6-16-55":[-88.41,2460.72],"6-16-56":[-94.87,332.64],"6-16-57":[-2771.85,-36.44],"6-16-58":[-3499.69,2780.28],"6-16-59":[-3699.81,3057.06],"6-16-60":[-3732.88,1251.61],"6-16-61":[-3718.56,729.54],"6-16-62":[-2843.18,3324.73],"6-16-63":[-4214.39,2887.59],"6-17-0":[-199.93,1456.34],"6-17-1":[-1768,3620.15],"5-8-0":[-1768,3620.15],"6-17-2":[-1475.26,19.47],"6-17-3":[-1402.55,3.4],"5-8-1":[-1475.26,19.47],"6-17-4":[-1180.97,1470.8],"6-17-5":[-2625.03,2591.07],"5-8-2":[-3589.89,2752.29],"6-17-6":[-4466.16,-3.57],"6-17-7":[-4549.31,450.81],"5-8-3":[-4699.29,450.81],"6-17-8":[-5008.75,2409.04],"6-17-9":[-5233.55,2941.77],"5-8-4":[-5450.75,2941.77],"6-17-10":[-5119.82,2300.19],"6-17-11":[-4890.47,3041.41],"5-8-5":[-5119.82,3089.83],"6-17-12":[-6658.81,2709.89],"6-17-13":[-4851.18,1110.77],"5-8-6":[-6658.81,2709.89],"6-17-14":[-5821.52,-16.38],"6-17-15":[-5674.88,-22.03],"5-8-7":[-6829.25,-15.25],"6-17-16":[-5851.22,-26.24],"6-17-17":[-5301.91,-30.62],"5-8-8":[-6240.03,-26.24],"6-17-18":[-5466.61,-36.84],"6-17-19":[-5104.24,-38.94],"5-8-9":[-5487.51,20.74],"6-17-20":[-4709.73,-38.14],"6-17-21":[-4666.22,-37.3],"5-8-10":[-5006.12,-33.65],"6-17-22":[-4992.97,-37.32],"6-17-23":[-4460.76,239.39],"5-8-11":[-4992.97,2112.46],"6-17-24":[-4823.9,-36.06],"6-17-25":[-5006.1,-33.99],"5-8-12":[-5006.1,-29.12],"6-17-26":[-4437.45,-31.19],"6-17-27":[-4609.57,-27.45],"5-8-13":[-4958.22,-22.61],"6-17-28":[-4932.8,-23.68],"6-17-29":[-5183.75,-18.06],"5-8-14":[-5183.75,-14.42],"6-17-30":[-5106.77,-13.82],"6-17-31":[-4902.56,-10.34],"5-8-15":[-5681.41,-7.01],"6-17-32":[-4738.9,-8.32],"6-17-33":[-4738.24,-7.81],"5-8-16":[-4875.66,-5.07],"6-17-34":[-5231.72,-7.81],"6-17-35":[-5297.05,-8],"5-8-17":[-6115.42,-4.9],"6-17-36":[-5635.03,-8.25],"6-17-37":[-5415.4,-9.44],"5-8-18":[-6357.23,-6.96],"6-17-38":[-6887.6,-10.07],"6-17-39":[-5911.14,-11.06],"5-8-19":[-6887.6,-10.07],"6-17-40":[-5556.7,315.4],"6-17-41":[-5276.82,-11.32],"5-8-20":[-5556.7,395.5],"6-17-42":[-5701.15,-12.55],"6-17-43":[-5607.75,-11.22],"5-8-21":[-5701.15,-11.22],"6-17-44":[-6593.4,-10.83],"6-17-45":[-5575.85,-11.63],"5-8-22":[-6593.4,-10.73],"6-17-46":[-4741.3,-12.29],"6-17-47":[-4894.74,-13.43],"5-8-23":[-5185,-12.29],"6-17-48":[-4122.26,-14],"6-17-49":[-3621.62,-14.43],"5-8-24":[-5094.21,-14],"6-17-50":[-3957.44,993.74],"6-17-51":[-771.77,2522.54],"5-8-25":[-3957.44,2522.54],"6-17-52":[-216.42,2808.07],"6-17-53":[-64.39,2249.4],"5-8-26":[-870.18,2897.13],"6-17-54":[-75.83,2758.77],"6-17-55":[-84.15,2323.38],"5-8-27":[-88.41,2758.77],"6-17-56":[-89.73,401.81],"6-17-57":[-2441.75,-16.49],"5-8-28":[-2771.85,401.81],"6-17-58":[-2973.68,2730.02],"6-17-59":[-3594.22,2341.32],"5-8-29":[-3699.81,3057.06],"6-17-60":[-3727.72,1350.33],"6-17-61":[-3692.53,803.49],"5-8-30":[-3732.88,1350.33],"6-17-62":[-2811.27,3573.17],"6-17-63":[-4214.39,2879.05],"5-8-31":[-4214.39,3573.17],"6-18-0":[-239.93,1305.63],"6-18-1":[-1961.07,3782.46],"6-18-2":[-1554.87,20.08],"6-18-3":[-1327.79,253.46],"6-18-4":[-1088.12,3239.67],"6-18-5":[-1217.67,3108.19],"6-18-6":[-4824.35,142.08],"6-18-7":[-4475.98,429.97],"6-18-8":[-5097.66,2151.79],"6-18-9":[-5286.88,2614.23],"6-18-10":[-5383.94,2710.75],"6-18-11":[-4674.83,2698.9],"6-18-12":[-6208.63,2746.59],"6-18-13":[-5145.3,2747.57],"6-18-14":[-5330.71,1843.49],"6-18-15":[-5251.84,-22.18],"6-18-16":[-5203.52,-26.44],"6-18-17":[-5196.89,-29.66],"6-18-18":[-5294.47,-35.92],"6-18-19":[-4940.34,-39.87],"6-18-20":[-4969.7,-40.29],"6-18-21":[-4577.18,-40.68],"6-18-22":[-4373.32,-41.38],"6-18-23":[-4278.81,36.16],"6-18-24":[-4720.03,-40.24],"6-18-25":[-5013.32,-38.8],"6-18-26":[-4588.47,-35.89],"6-18-27":[-4400.12,-32.16],"6-18-28":[-5008.64,-27.65],"6-18-29":[-6174.12,-22.1],"6-18-30":[-4934.3,-17.75],"6-18-31":[-4842.18,-14.23],"6-18-32":[-4876.31,-11.43],"6-18-33":[-4758.41,-10.12],"6-18-34":[-5086.71,-9.98],"6-18-35":[-5093.33,-9.16],"6-18-36":[-5155.12,-9.09],"6-18-37":[-5307.78,-8.96],"6-18-38":[-5730.1,-9.07],"6-18-39":[-5129.31,-10.05],"6-18-40":[-5279.34,30.18],"6-18-41":[-5425.68,-10.66],"6-18-42":[-5345.64,-11.58],"6-18-43":[-5141.56,-10.9],"6-18-44":[-5415.73,-10.9],"6-18-45":[-5030.18,-11.37],"6-18-46":[-4788.93,-12.17],"6-18-47":[-4459,-12.57],"6-18-48":[-3487.82,-12.73],"6-18-49":[-3561.32,1575.89],"6-18-50":[-1988.24,2584.28],"6-18-51":[-538.42,2544.16],"6-18-52":[-46.75,2552.9],"6-18-53":[-62.71,2504.4],"6-18-54":[-73.11,2557.92],"6-18-55":[-79.89,2151.24],"6-18-56":[-258.64,398.97],"6-18-57":[-798.4,126.06],"6-18-58":[-1790.31,2750.5],"6-18-59":[-3353.04,2817.84],"6-18-60":[-3629.63,1490.05],"6-18-61":[-3621.66,901.46],"6-18-62":[-2800.02,3682.63],"6-18-63":[-4215.33,2878.07],"6-19-0":[-379.17,1287.38],"6-19-1":[-1593.06,3146.76],"5-9-0":[-1961.07,3782.46],"6-19-2":[-1890.58,20.54],"6-19-3":[-1414.05,2.42],"5-9-1":[-1890.58,253.46],"4-4-0":[-1961.07,3782.46],"6-19-4":[-1211.44,4101.76],"6-19-5":[-1382.71,2119.92],"5-9-2":[-1382.71,4101.76],"6-19-6":[-3876.71,317.55],"6-19-7":[-4530.82,581.34],"5-9-3":[-4824.35,581.34],"4-4-1":[-4824.35,4101.76],"6-19-8":[-4995.54,973.14],"6-19-9":[-5321.16,2480.85],"5-9-4":[-5321.16,2614.23],"6-19-10":[-5607.39,2228.73],"6-19-11":[-4754.48,2929.86],"5-9-5":[-5607.39,2929.86],"4-4-2":[-5607.39,3089.83],"6-19-12":[-6114.42,2399.44],"6-19-13":[-4562,3974.94],"5-9-6":[-6208.63,3974.94],"6-19-14":[-4492.89,2829.29],"6-19-15":[-5013.47,2131.34],"5-9-7":[-5330.71,2829.29],"4-4-3":[-6829.25,3974.94],"6-19-16":[-4953.87,1592.47],"6-19-17":[-4866.48,1595.59],"5-9-8":[-5203.52,1595.59],"6-19-18":[-5637.2,251.63],"6-19-19":[-5637.2,-38.05],"5-9-9":[-5637.2,251.63],"4-4-4":[-6240.03,1595.59],"6-19-20":[-4758.37,-41.29],"6-19-21":[-4461.38,-42.03],"5-9-10":[-4969.7,-40.29],"6-19-22":[-4510.74,-43.78],"6-19-23":[-4246.08,165.38],"5-9-11":[-4510.74,165.38],"4-4-5":[-5006.12,2112.46],"6-19-24":[-4386.55,-43.61],"6-19-25":[-4787.48,-42.14],"5-9-12":[-5013.32,-38.8],"6-19-26":[-4592.84,-39.76],"6-19-27":[-4940.84,-36.36],"5-9-13":[-4940.84,-32.16],"4-4-6":[-5013.32,-22.61],"6-19-28":[-4653.41,-31.27],"6-19-29":[-5351.52,-25.3],"5-9-14":[-6174.12,-22.1],"6-19-30":[-5449.15,-21.14],"6-19-31":[-5024.53,-17.54],"5-9-15":[-5449.15,-14.23],"4-4-7":[-6174.12,-7.01],"6-19-32":[-5169.3,-14.6],"6-19-33":[-5203.96,-12.43],"5-9-16":[-5203.96,-10.12],"6-19-34":[-5208.9,-11.75],"6-19-35":[-5361.21,-9.55],"5-9-17":[-5361.21,-9.16],"4-4-8":[-6115.42,-4.9],"6-19-36":[-5037.02,-8.58],"6-19-37":[-4920.17,-7.73],"5-9-18":[-5307.78,-7.73],"6-19-38":[-5156.8,-7.69],"6-19-39":[-5026.43,-8.18],"5-9-19":[-5730.1,-7.69],"4-4-9":[-6887.6,-6.96],"6-19-40":[-5045.17,0.38],"6-19-41":[-5538.83,-9.49],"5-9-20":[-5538.83,30.18],"6-19-42":[-5356.53,-10.86],"6-19-43":[-5215.62,-10.71],"5-9-21":[-5356.53,-10.71],"4-4-10":[-5701.15,395.5],"6-19-44":[-5127.44,-10.75],"6-19-45":[-5197.76,258.9],"5-9-22":[-5415.73,258.9],"6-19-46":[-4421.91,1557.91],"6-19-47":[-3471,1551.49],"5-9-23":[-4788.93,1557.91],"4-4-11":[-6593.4,1557.91],"6-19-48":[-3140.15,2121.88],"6-19-49":[-2469.93,2675.95],"5-9-24":[-3561.32,2675.95],"6-19-50":[-626.92,3796.99],"6-19-51":[-37.03,2275.43],"5-9-25":[-1988.24,3796.99],"4-4-12":[-5094.21,3796.99],"6-19-52":[-44.46,2778.85],"6-19-53":[-60.61,2131.71],"5-9-26":[-62.71,2778.85],"6-19-54":[-69.03,2392.98],"6-19-55":[-75.62,968.87],"5-9-27":[-79.89,2557.92],"4-4-13":[-870.18,2897.13],"6-19-56":[-347.17,572.32],"6-19-57":[-601.74,288.87],"5-9-28":[-798.4,572.32],"6-19-58":[-515.17,2986.57],"6-19-59":[-2994.68,3530.83],"5-9-29":[-3353.04,3530.83],"4-4-14":[-3699.81,3530.83],"6-19-60":[-3551.26,1514.1],"6-19-61":[-3519.87,956.54],"5-9-30":[-3629.63,1514.1],"6-19-62":[-2747.86,3114.64],"6-19-63":[-4214.39,2878.57],"5-9-31":[-4215.33,3682.63],"4-4-15":[-4215.33,3682.63],"6-20-0":[-417.32,1224.41],"6-20-1":[-1370.96,2452.93],"6-20-2":[-1973.46,20.82],"6-20-3":[-1633.9,2.38],"6-20-4":[-1302.3,1894.43],"6-20-5":[-1304.79,801.61],"6-20-6":[-3626.95,693.54],"6-20-7":[-4536.9,842.66],"6-20-8":[-5055.43,662.44],"6-20-9":[-5264.21,1501.83],"6-20-10":[-5515.35,1335.36],"6-20-11":[-5331.65,2410.7],"6-20-12":[-6105.34,2580.47],"6-20-13":[-4265.75,3118.01],"6-20-14":[-4519.48,3265.41],"6-20-15":[-4565.58,4373.52],"6-20-16":[-4835.84,3180.62],"6-20-17":[-4743.31,4292.74],"6-20-18":[-6588.28,2093.71],"6-20-19":[-4944.06,1757.21],"6-20-20":[-4796.65,-39.45],"6-20-21":[-4565.81,-41.79],"6-20-22":[-4128.01,-44.7],"6-20-23":[-3987,-46.27],"6-20-24":[-4050.55,-46.25],"6-20-25":[-4341.52,-44.61],"6-20-26":[-4080.21,-43],"6-20-27":[-4829.5,-39.48],"6-20-28":[-5119.06,-34.42],"6-20-29":[-5269.86,-28.53],"6-20-30":[-4689.02,-24.48],"6-20-31":[-4770.8,-20.85],"6-20-32":[-5202.52,-17.01],"6-20-33":[-4890.99,-14.29],"6-20-34":[-5023.56,-12.23],"6-20-35":[-4964.45,-9.38],"6-20-36":[-4986.97,-7.52],"6-20-37":[-4880.33,-6.21],"6-20-38":[-4961.7,-6.04],"6-20-39":[-4755.38,-6.16],"6-20-40":[-4689.63,-6.82],"6-20-41":[-4833.3,-7.83],"6-20-42":[-4861.26,-9.86],"6-20-43":[-4844.73,-10.66],"6-20-44":[-5134.28,1750.54],"6-20-45":[-3868.94,2051.18],"6-20-46":[-46.03,4249.41],"6-20-47":[-44.93,3135.77],"6-20-48":[-291.98,4326.16],"6-20-49":[-419.89,3212.16],"6-20-50":[-26.04,3002.43],"6-20-51":[-35.46,2455.47],"6-20-52":[-44.23,2254.26],"6-20-53":[-59.19,1409.29],"6-20-54":[-66.26,1525.83],"6-20-55":[-73.37,629.49],"6-20-56":[-489.3,852.51],"6-20-57":[-671.27,681.52],"6-20-58":[-552.12,1956.61],"6-20-59":[-2448.23,2297.87],"6-20-60":[-3307.66,1535.12],"6-20-61":[-3393.94,1063],"6-20-62":[-2705,2865.19],"6-20-63":[-4214.39,2878.57],"6-21-0":[-337.42,1346.84],"6-21-1":[-1233.6,2030.55],"5-10-0":[-1370.96,2452.93],"6-21-2":[-1772.55,89.14],"6-21-3":[-1871.86,2.72],"5-10-1":[-1973.46,89.14],"6-21-4":[-2467.23,2541.55],"6-21-5":[-1623.25,454.87],"5-10-2":[-2467.23,2541.55],"6-21-6":[-3359.57,413.74],"6-21-7":[-4538.31,781.37],"5-10-3":[-4538.31,842.66],"6-21-8":[-5075.96,696.58],"6-21-9":[-5249.7,880.39],"5-10-4":[-5264.21,1501.83],"6-21-10":[-5445.64,833.93],"6-21-11":[-5899.2,1099.39],"5-10-5":[-5899.2,2410.7],"6-21-12":[-4299.21,3253.8],"6-21-13":[-3763.46,3939.1],"5-10-6":[-6105.34,3939.1],"6-21-14":[-4281.45,2946.16],"6-21-15":[-4207.65,2851.96],"5-10-7":[-4565.58,4373.52],"6-21-16":[-4394.17,2953.97],"6-21-17":[-5603.84,3100.13],"5-10-8":[-5603.84,4292.74],"6-21-18":[-5251.97,4387.58],"6-21-19":[-4621.58,4242],"5-10-9":[-6588.28,4387.58],"6-21-20":[-4530.92,610.58],"6-21-21":[-4249.27,1248.21],"5-10-10":[-4796.65,1248.21],"6-21-22":[-4100.77,-43.26],"6-21-23":[-3917.92,-45.42],"5-10-11":[-4128.01,-43.26],"6-21-24":[-3839.51,-46.3],"6-21-25":[-4146.3,-45.23],"5-10-12":[-4341.52,-44.61],"6-21-26":[-4034.73,-43.77],"6-21-27":[-4622.19,-40.96],"5-10-13":[-4829.5,-39.48],"6-21-28":[-5026.68,-36.11],"6-21-29":[-4710.14,-30.73],"5-10-14":[-5269.86,-28.53],"6-21-30":[-4711.56,-26.83],"6-21-31":[-4649.73,-22.8],"5-10-15":[-4770.8,-20.85],"6-21-32":[-5165.04,-18.67],"6-21-33":[-5124.61,-15.13],"5-10-16":[-5202.52,-14.29],"6-21-34":[-4928.38,-12.89],"6-21-35":[-4817.72,-9.33],"5-10-17":[-5023.56,-9.33],"6-21-36":[-4751.47,-6.07],"6-21-37":[-4705.07,-4.67],"5-10-18":[-4986.97,-4.67],"6-21-38":[-4736.47,-4.21],"6-21-39":[-4814.85,-4.21],"5-10-19":[-4961.7,-4.21],"6-21-40":[-4826.11,-5.08],"6-21-41":[-5135.13,-6.52],"5-10-20":[-5135.13,-5.08],"6-21-42":[-5265.07,1190.2],"6-21-43":[-4590.1,596.6],"5-10-21":[-5265.07,1190.2],"6-21-44":[-2985.45,4155.23],"6-21-45":[-26.05,4282.35],"5-10-22":[-5134.28,4282.35],"6-21-46":[-26.03,3002.91],"6-21-47":[-24,2907.88],"5-10-23":[-46.03,4249.41],"6-21-48":[-22.24,2814],"6-21-49":[-21.6,2800.67],"5-10-24":[-419.89,4326.16],"6-21-50":[-23.2,3778.63],"6-21-51":[-31.43,3065.26],"5-10-25":[-35.46,3778.63],"6-21-52":[-42.02,1088.13],"6-21-53":[-56.28,798.49],"5-10-26":[-59.19,2254.26],"6-21-54":[-63.59,815.62],"6-21-55":[-71.43,688.52],"5-10-27":[-73.37,1525.83],"6-21-56":[-537.59,775.33],"6-21-57":[-441.32,399.72],"5-10-28":[-671.27,852.51],"6-21-58":[-523.41,1699.95],"6-21-59":[-1766.91,2538.05],"5-10-29":[-2448.23,2538.05],"6-21-60":[-3331.72,1626.41],"6-21-61":[-3355.23,1241.73],"5-10-30":[-3393.94,1626.41],"6-21-62":[-2622.98,2638.67],"6-21-63":[-4214.39,2874.63],"5-10-31":[-4214.39,2878.57],"6-22-0":[-398.63,1167.08],"6-22-1":[-651.33,2264.33],"6-22-2":[-1498.06,363.46],"6-22-3":[-1848.36,1220.89],"6-22-4":[-2407.5,3509.49],"6-22-5":[-1967.05,3362.6],"6-22-6":[-3532.52,562.23],"6-22-7":[-4708.86,561.11],"6-22-8":[-5102.62,731.19],"6-22-9":[-5406.44,633.28],"6-22-10":[-5616.21,980.63],"6-22-11":[-5777.27,953.84],"6-22-12":[-4339.32,1945.45],"6-22-13":[-3575.12,3751.07],"6-22-14":[-5353.78,3467.23],"6-22-15":[-3948.99,2981.68],"6-22-16":[-4230.11,2953.81],"6-22-17":[-4698.67,3455.03],"6-22-18":[-4417.21,3616.13],"6-22-19":[-4614.73,3677.07],"6-22-20":[-4612.07,3055.54],"6-22-21":[-4169.26,2579.5],"6-22-22":[-4121.9,227.36],"6-22-23":[-4832.83,-36.74],"6-22-24":[-4589.1,-43.31],"6-22-25":[-6924.66,-42.61],"6-22-26":[-3909.53,-41.08],"6-22-27":[-4173.36,-38.63],"6-22-28":[-5079.89,-34.92],"6-22-29":[-4716.43,-31.11],"6-22-30":[-4620.67,-27.03],"6-22-31":[-4566.09,-23.61],"6-22-32":[-4502.76,-19.66],"6-22-33":[-4557.38,-15.78],"6-22-34":[-4533.81,-12.28],"6-22-35":[-4814.45,-8],"6-22-36":[-4853.38,-4.62],"6-22-37":[-4430.16,-3.04],"6-22-38":[-4409.56,-2.78],"6-22-39":[-4975.84,-2.97],"6-22-40":[-4329.8,195.98],"6-22-41":[-4894.06,155.36],"6-22-42":[-4774.93,2577.48],"6-22-43":[-2521.79,3006.53],"6-22-44":[-112.74,3560.31],"6-22-45":[-107.66,3555.42],"6-22-46":[-25.48,3327.82],"6-22-47":[-23.5,2834],"6-22-48":[-21.38,2971.69],"6-22-49":[-20.27,3240.49],"6-22-50":[-22.59,3550.72],"6-22-51":[-29.7,1888.48],"6-22-52":[-41.54,948.84],"6-22-53":[-53.67,976.63],"6-22-54":[-61.27,681.33],"6-22-55":[-68.78,730.22],"6-22-56":[-498.55,541.09],"6-22-57":[-457.73,551.22],"6-22-58":[-534.91,3383.56],"6-22-59":[-664.24,3626.49],"6-22-60":[-2942.53,1694.94],"6-22-61":[-3274.61,1432.98],"6-22-62":[-2650.99,2576.08],"6-22-63":[-4214.39,2863.29],"6-23-0":[-421.11,1136.69],"6-23-1":[-833.08,2882.18],"5-11-0":[-833.08,2882.18],"6-23-2":[-1737.91,525.6],"6-23-3":[-2333.53,9.47],"5-11-1":[-2333.53,1220.89],"4-5-0":[-2333.53,2882.18],"6-23-4":[-2030.12,2135.73],"6-23-5":[-2116.36,1778.2],"5-11-2":[-2407.5,3509.49],"6-23-6":[-3602.71,628.59],"6-23-7":[-4632.63,437.77],"5-11-3":[-4708.86,628.59],"4-5-1":[-4708.86,3509.49],"3-2-0":[-4824.35,4101.76],"6-23-8":[-5155.37,620.34],"6-23-9":[-5302.33,595],"5-11-4":[-5406.44,731.19],"6-23-10":[-5557.74,952.89],"6-23-11":[-5636.66,969.04],"5-11-5":[-5777.27,980.63],"4-5-2":[-5899.2,2410.7],"6-23-12":[-4315.7,1217.71],"6-23-13":[-3848.72,3152.73],"5-11-6":[-4339.32,3751.07],"6-23-14":[-5731.78,3396.83],"6-23-15":[-3515.08,3385.15],"5-11-7":[-5731.78,3467.23],"4-5-3":[-6105.34,4373.52],"3-2-1":[-6829.25,4373.52],"6-23-16":[-3720.8,3846.98],"6-23-17":[-3729.31,3659.45],"5-11-8":[-4698.67,3846.98],"6-23-18":[-3857.79,3960.27],"6-23-19":[-4665.03,2781.72],"5-11-9":[-4665.03,3960.27],"4-5-4":[-6588.28,4387.58],"6-23-20":[-4586.57,2074.25],"6-23-21":[-3908.44,2324.4],"5-11-10":[-4612.07,3055.54],"6-23-22":[-4234.4,1902.28],"6-23-23":[-4248.98,-37.16],"5-11-11":[-4832.83,1902.28],"4-5-5":[-4832.83,3055.54],"3-2-2":[-6588.28,4387.58],"6-23-24":[-4096.4,-38.53],"6-23-25":[-3684.54,238.06],"5-11-12":[-6924.66,238.06],"6-23-26":[-4079.58,-36.65],"6-23-27":[-4195.46,-34.81],"5-11-13":[-4195.46,-34.81],"4-5-6":[-6924.66,238.06],"6-23-28":[-5581.2,-32.08],"6-23-29":[-5226.21,-29.04],"5-11-14":[-5581.2,-29.04],"6-23-30":[-4536.94,-25.29],"6-23-31":[-4550.37,-21.98],"5-11-15":[-4620.67,-21.98],"4-5-7":[-5581.2,-20.85],"3-2-3":[-6924.66,238.06],"6-23-32":[-4255.85,-18.42],"6-23-33":[-4442.94,-15],"5-11-16":[-4557.38,-15],"6-23-34":[-5616.78,-10.65],"6-23-35":[-4625.81,-6.84],"5-11-17":[-5616.78,-6.84],"4-5-8":[-5616.78,-6.84],"6-23-36":[-4390.47,-3.94],"6-23-37":[-4586.73,-2.35],"5-11-18":[-4853.38,-2.35],"6-23-38":[-4741.58,182.06],"6-23-39":[-4374.02,-2.19],"5-11-19":[-4975.84,182.06],"4-5-9":[-4986.97,182.06],"3-2-4":[-6887.6,182.06],"6-23-40":[-4592.1,-3.43],"6-23-41":[-4363.36,1835.28],"5-11-20":[-4894.06,1835.28],"6-23-42":[-1649.44,2317.4],"6-23-43":[-253.34,2074.33],"5-11-21":[-4774.93,3006.53],"4-5-10":[-5265.07,3006.53],"6-23-44":[-22.86,2716.48],"6-23-45":[-23.63,3833.28],"5-11-22":[-112.74,3833.28],"6-23-46":[-23.44,3527.63],"6-23-47":[-22.17,3624.57],"5-11-23":[-25.48,3624.57],"4-5-11":[-5134.28,4282.35],"3-2-5":[-6593.4,4282.35],"6-23-48":[-20.39,3270.25],"6-23-49":[-21.17,3156.76],"5-11-24":[-21.38,3270.25],"6-23-50":[-23.21,2985.77],"6-23-51":[-30.13,1202.75],"5-11-25":[-30.13,3550.72],"4-5-12":[-419.89,4326.16],"6-23-52":[-43.45,965.03],"6-23-53":[-51.53,945.27],"5-11-26":[-53.67,976.63],"6-23-54":[-58.95,477.09],"6-23-55":[-65.3,616.4],"5-11-27":[-68.78,730.22],"4-5-13":[-73.37,2254.26],"3-2-6":[-5094.21,4326.16],"6-23-56":[-381.19,424.76],"6-23-57":[-248.43,630.55],"5-11-28":[-498.55,630.55],"6-23-58":[-530.93,2010.01],"6-23-59":[-510.12,2194.6],"5-11-29":[-664.24,3626.49],"4-5-14":[-2448.23,3626.49],"6-23-60":[-2788.93,1763.02],"6-23-61":[-3206.53,1638.58],"5-11-30":[-3274.61,1763.02],"6-23-62":[-2569.85,2755.16],"6-23-63":[-4214.39,2834.96],"5-11-31":[-4214.39,2863.29],"4-5-15":[-4214.39,2878.57],"3-2-7":[-4215.33,3682.63],"6-24-0":[-444.11,1186.8],"6-24-1":[-1081.56,1860.38],"6-24-2":[-884.27,780.39],"6-24-3":[-2481.46,11.12],"6-24-4":[-1806.9,3362.09],"6-24-5":[-1623.32,2494.83],"6-24-6":[-3546.49,637.43],"6-24-7":[-4475.39,369.52],"6-24-8":[-5232.42,618.66],"6-24-9":[-5302.19,643.83],"6-24-10":[-5599.09,442.7],"6-24-11":[-5552.22,841.05],"6-24-12":[-4529.43,849.8],"6-24-13":[-4302.91,1071.09],"6-24-14":[-4466.8,2114.96],"6-24-15":[-3366.56,3889.28],"6-24-16":[-3659.9,4191.26],"6-24-17":[-3400.71,4109.88],"6-24-18":[-3545.38,3690.6],"6-24-19":[-4815.26,3824.21],"6-24-20":[-4264.88,3235.29],"6-24-21":[-3729.77,2589.58],"6-24-22":[-4007.02,1702.94],"6-24-23":[-5911.74,2045.21],"6-24-24":[-4035.63,-33.29],"6-24-25":[-4136.33,268.06],"6-24-26":[-4161.32,-31.52],"6-24-27":[-5001.37,-29.62],"6-24-28":[-4128.07,-28.02],"6-24-29":[-4975.29,-25.65],"6-24-30":[-4578.48,-23.11],"6-24-31":[-4349.57,-20.2],"6-24-32":[-4541,-17.27],"6-24-33":[-4341.2,-13.42],"6-24-34":[-4969.11,-9.91],"6-24-35":[-4622.82,-6.43],"6-24-36":[-6027.68,-3.86],"6-24-37":[-4987.2,-2.32],"6-24-38":[-4501.51,906.1],"6-24-39":[-4247.65,-2.13],"6-24-40":[-3703.92,2006.2],"6-24-41":[-3317.83,1625.93],"6-24-42":[-1102.76,2496.57],"6-24-43":[-20.18,3193.33],"6-24-44":[-21.4,3709.46],"6-24-45":[-21.96,3624.72],"6-24-46":[-21.96,3997.5],"6-24-47":[-20.69,3958.09],"6-24-48":[-19.53,3750.79],"6-24-49":[-21.86,2056.55],"6-24-50":[-23.63,1056.01],"6-24-51":[-30.13,836.55],"6-24-52":[-42.54,834.09],"6-24-53":[-50.73,423.69],"6-24-54":[-56.68,479.95],"6-24-55":[-62.37,620.69],"6-24-56":[-397.73,366.7],"6-24-57":[-327.26,618.35],"6-24-58":[-578.4,2438.84],"6-24-59":[-539.33,3441.15],"6-24-60":[-2590.64,1871.81],"6-24-61":[-3123.2,1816.7],"6-24-62":[-2650.65,2575.14],"6-24-63":[-4214.39,2813.19],"6-25-0":[-303.71,1053.33],"6-25-1":[-651.82,1708.98],"5-12-0":[-1081.56,1860.38],"6-25-2":[-922.35,1020.06],"6-25-3":[-2433.51,33.82],"5-12-1":[-2481.46,1020.06],"6-25-4":[-1734.73,293.97],"6-25-5":[-1461.69,334.46],"5-12-2":[-1806.9,3362.09],"6-25-6":[-3803.3,387.52],"6-25-7":[-4628.98,308.5],"5-12-3":[-4628.98,637.43],"6-25-8":[-5084.99,598.61],"6-25-9":[-5252.45,600.19],"5-12-4":[-5302.19,643.83],"6-25-10":[-5484.86,610.76],"6-25-11":[-5604.4,613.75],"5-12-5":[-5604.4,841.05],"6-25-12":[-4715.59,741.32],"6-25-13":[-4517.04,852.58],"5-12-6":[-4715.59,1071.09],"6-25-14":[-4478.47,2093.28],"6-25-15":[-3966.59,3842.68],"5-12-7":[-4478.47,3889.28],"6-25-16":[-3770.45,4204.45],"6-25-17":[-3937.86,3751.43],"5-12-8":[-3937.86,4204.45],"6-25-18":[-4104.8,4348.39],"6-25-19":[-5472.45,3458.34],"5-12-9":[-5472.45,4348.39],"6-25-20":[-5358.88,3295.69],"6-25-21":[-3924,3091.23],"5-12-10":[-5358.88,3295.69],"6-25-22":[-4181.74,3268.31],"6-25-23":[-4107.01,2081.23],"5-12-11":[-5911.74,3268.31],"6-25-24":[-4139.43,-28.52],"6-25-25":[-4417.91,-26.44],"5-12-12":[-4417.91,268.06],"6-25-26":[-4796.18,-25.22],"6-25-27":[-3903.47,-24.16],"5-12-13":[-5001.37,-24.16],"6-25-28":[-4620.9,-15.52],"6-25-29":[-4156.21,-22.31],"5-12-14":[-4975.29,-15.52],"6-25-30":[-4696.61,-20.5],"6-25-31":[-4184.51,-18.74],"5-12-15":[-4696.61,-18.74],"6-25-32":[-4009.76,-16.22],"6-25-33":[-4172.12,-12.95],"5-12-16":[-4541,-12.95],"6-25-34":[-4842.46,-9.78],"6-25-35":[-5609.97,98.48],"5-12-17":[-5609.97,98.48],"6-25-36":[-5165.76,-4.01],"6-25-37":[-5237.78,-2.5],"5-12-18":[-6027.68,-2.32],"6-25-38":[-5867.09,-2.18],"6-25-39":[-5887.61,-2.3],"5-12-19":[-5887.61,906.1],"6-25-40":[-3836.87,2005.22],"6-25-41":[-2624.66,3194.32],"5-12-20":[-3836.87,3194.32],"6-25-42":[-16.08,3023.14],"6-25-43":[-18.48,3241.73],"5-12-21":[-1102.76,3241.73],"6-25-44":[-19.58,3410.37],"6-25-45":[-20.51,4171.18],"5-12-22":[-21.96,4171.18],"6-25-46":[-20.66,3695.94],"6-25-47":[-19.83,4048.21],"5-12-23":[-21.96,4048.21],"6-25-48":[-19.6,3764.34],"6-25-49":[-22.09,1976.48],"5-12-24":[-22.09,3764.34],"6-25-50":[-24.31,843.14],"6-25-51":[-29.53,749.28],"5-12-25":[-30.13,1056.01],"6-25-52":[-38.65,583.75],"6-25-53":[-48.88,527.66],"5-12-26":[-50.73,834.09],"6-25-54":[-53.27,454.9],"6-25-55":[-321.18,564.64],"5-12-27":[-321.18,620.69],"6-25-56":[-365.61,281.37],"6-25-57":[-401.21,416.56],"5-12-28":[-401.21,618.35],"6-25-58":[-659.6,821.96],"6-25-59":[-553.58,1676.69],"5-12-29":[-659.6,3441.15],"6-25-60":[-2291.56,1996.28],"6-25-61":[-3041.73,1996.28],"5-12-30":[-3123.2,1996.28],"6-25-62":[-2813.69,2606.34],"6-25-63":[-4215.39,2795.26],"5-12-31":[-4215.39,2813.19],"6-26-0":[-439.71,1000.01],"6-26-1":[-730.5,1772.1],"6-26-2":[-897.49,2298.54],"6-26-3":[-1713.07,281.71],"6-26-4":[-1913.82,308.77],"6-26-5":[-1684.72,381.74],"6-26-6":[-3787.14,317.75],"6-26-7":[-4740.18,215.89],"6-26-8":[-5062.53,571.32],"6-26-9":[-5238.49,565.77],"6-26-10":[-6488.99,599.94],"6-26-11":[-6644.9,611.84],"6-26-12":[-4903.49,731.39],"6-26-13":[-5400.04,749.4],"6-26-14":[-4879.74,993.24],"6-26-15":[-4103.16,1446.2],"6-26-16":[-4120.52,3114.6],"6-26-17":[-4230.7,4338.56],"6-26-18":[-4413.49,4383.25],"6-26-19":[-5096.75,3998.98],"6-26-20":[-4111.25,3617.02],"6-26-21":[-3860.99,2970.04],"6-26-22":[-4545.1,3258.01],"6-26-23":[-4215.41,3307.88],"6-26-24":[-4394.09,2734.41],"6-26-25":[-4782.29,2861.69],"6-26-26":[-5685.17,-18.54],"6-26-27":[-4949.82,-18.19],"6-26-28":[-5202.13,-18.13],"6-26-29":[-4328.88,-18.06],"6-26-30":[-4889.01,-17.73],"6-26-31":[-4042.13,-17.02],"6-26-32":[-3932.99,-15.49],"6-26-33":[-4611.24,-12.9],"6-26-34":[-4215.41,-10],"6-26-35":[-4437.77,-7.31],"6-26-36":[-4454.44,-4.66],"6-26-37":[-4569.44,-3.18],"6-26-38":[-5094.37,2826.68],"6-26-39":[-4696.56,2654.65],"6-26-40":[-1698.12,3217.88],"6-26-41":[-10.71,3238.99],"6-26-42":[-14.63,2817.94],"6-26-43":[-16.88,3502.89],"6-26-44":[-18.57,3901.67],"6-26-45":[-19.41,4305.19],"6-26-46":[-19.51,4229.83],"6-26-47":[-18.58,3014],"6-26-48":[-19.11,1409.63],"6-26-49":[-22.08,981.78],"6-26-50":[-24.14,734.9],"6-26-51":[-29.38,727.51],"6-26-52":[-38.33,598.01],"6-26-53":[-46.19,511.34],"6-26-54":[-51.2,426.83],"6-26-55":[-57.5,452.88],"6-26-56":[-155.67,204.81],"6-26-57":[-311.85,196.31],"6-26-58":[-599.85,881.64],"6-26-59":[-578.3,1748.55],"6-26-60":[-1765.96,2076.65],"6-26-61":[-2851.24,2181.07],"6-26-62":[-2859.69,2606.49],"6-26-63":[-4215.39,2777.84],"6-27-0":[-553.59,784.94],"6-27-1":[-488.74,1493.87],"5-13-0":[-730.5,1772.1],"6-27-2":[-1148.95,2712.56],"6-27-3":[-2045.61,320.5],"5-13-1":[-2045.61,2712.56],"4-6-0":[-2481.46,2712.56],"6-27-4":[-2032.29,372.69],"6-27-5":[-1445.53,449.81],"5-13-2":[-2032.29,449.81],"6-27-6":[-3787.98,283.15],"6-27-7":[-4721.05,117.7],"5-13-3":[-4740.18,317.75],"4-6-1":[-4740.18,3362.09],"6-27-8":[-5023.3,325.53],"6-27-9":[-5311.91,428.65],"5-13-4":[-5311.91,571.32],"6-27-10":[-6550.67,567.14],"6-27-11":[-5322.93,510.84],"5-13-5":[-6644.9,611.84],"4-6-2":[-6644.9,841.05],"6-27-12":[-5100.87,779.83],"6-27-13":[-4957,797.9],"5-13-6":[-5400.04,797.9],"6-27-14":[-4562.1,843.62],"6-27-15":[-4900.36,1208.11],"5-13-7":[-4900.36,1446.2],"4-6-3":[-5400.04,3889.28],"6-27-16":[-4715.92,2194.75],"6-27-17":[-6020.76,1798.51],"5-13-8":[-6020.76,4338.56],"6-27-18":[-4494.59,2635.83],"6-27-19":[-4926.46,2159.53],"5-13-9":[-5096.75,4383.25],"4-6-4":[-6020.76,4383.25],"6-27-20":[-4552.08,1925.95],"6-27-21":[-3967.39,2697.84],"5-13-10":[-4552.08,3617.02],"6-27-22":[-4104.46,2999.92],"6-27-23":[-4228.95,3424.3],"5-13-11":[-4545.1,3424.3],"4-6-5":[-5911.74,3617.02],"6-27-24":[-4620.51,3479.94],"6-27-25":[-4583.52,4234.29],"5-13-12":[-4782.29,4234.29],"6-27-26":[-5549.86,-13],"6-27-27":[-5063.91,-12.54],"5-13-13":[-5685.17,-12.54],"4-6-6":[-5685.17,4234.29],"6-27-28":[-5516.32,-12.85],"6-27-29":[-5126.11,-13.41],"5-13-14":[-5516.32,-12.85],"6-27-30":[-4940.44,-14.09],"6-27-31":[-3922.85,-14.93],"5-13-15":[-4940.44,-14.09],"4-6-7":[-5516.32,-12.85],"6-27-32":[-10287.73,-14.66],"6-27-33":[-3838.8,-13.29],"5-13-16":[-10287.73,-12.9],"6-27-34":[-3952.86,-11.02],"6-27-35":[-4397.75,-9.21],"5-13-17":[-4437.77,-7.31],"4-6-8":[-10287.73,98.48],"6-27-36":[-3846.19,-6.32],"6-27-37":[-5411.31,-4.11],"5-13-18":[-5411.31,-3.18],"6-27-38":[-5381.88,4089.29],"6-27-39":[-7.82,3353.19],"5-13-19":[-5381.88,4089.29],"4-6-9":[-6027.68,4089.29],"6-27-40":[-6.36,3366.29],"6-27-41":[-8.91,2906.92],"5-13-20":[-1698.12,3366.29],"6-27-42":[-12.62,2615.39],"6-27-43":[-14.88,1857.98],"5-13-21":[-16.88,3502.89],"4-6-10":[-3836.87,3502.89],"6-27-44":[-15.67,2106.54],"6-27-45":[-17.16,2595.28],"5-13-22":[-19.41,4305.19],"6-27-46":[-17.14,1790.4],"6-27-47":[-16.64,2157.81],"5-13-23":[-19.51,4229.83],"4-6-11":[-21.96,4305.19],"6-27-48":[-18.13,1197.65],"6-27-49":[-20.76,806.78],"5-13-24":[-22.08,1409.63],"6-27-50":[-23.03,796.95],"6-27-51":[-27.57,771.94],"5-13-25":[-29.38,796.95],"4-6-12":[-30.13,3764.34],"6-27-52":[-33.04,487.72],"6-27-53":[-43.05,509.42],"5-13-26":[-46.19,598.01],"6-27-54":[-47.85,403.44],"6-27-55":[-55.33,313.6],"5-13-27":[-57.5,452.88],"4-6-13":[-321.18,834.09],"6-27-56":[-165.48,97.2],"6-27-57":[-389.09,647.09],"5-13-28":[-389.09,647.09],"6-27-58":[-464.97,899.06],"6-27-59":[-578.3,1803.34],"5-13-29":[-599.85,1803.34],"4-6-14":[-659.6,3441.15],"6-27-60":[-1164.05,2159.56],"6-27-61":[-2655.88,2197.16],"5-13-30":[-2851.24,2197.16],"6-27-62":[-2735.67,2581.41],"6-27-63":[-4215.89,2769.5],"5-13-31":[-4215.89,2777.84],"4-6-15":[-4215.89,2813.19],"6-28-0":[-589.49,895.88],"6-28-1":[-904.43,1735],"6-28-2":[-1112.91,1235.69],"6-28-3":[-2043.07,844.52],"6-28-4":[-2281.87,373.55],"6-28-5":[-1363.66,836.38],"6-28-6":[-4066.69,674.51],"6-28-7":[-4710.07,37.53],"6-28-8":[-5012.79,273.39],"6-28-9":[-5266.71,404.25],"6-28-10":[-5706.52,438.24],"6-28-11":[-5494.65,436.49],"6-28-12":[-5263.46,375.47],"6-28-13":[-5318.9,807.5],"6-28-14":[-4751.14,785.89],"6-28-15":[-4761.28,755.87],"6-28-16":[-5205.32,1090.39],"6-28-17":[-6497.54,1115.44],"6-28-18":[-4875.35,1003.31],"6-28-19":[-5278.57,1013.68],"6-28-20":[-4266.28,909.81],"6-28-21":[-4277.75,784.58],"6-28-22":[-4135.64,3697.19],"6-28-23":[-5658.77,3685.36],"6-28-24":[-4615.83,3903.97],"6-28-25":[-4879.2,5379.65],"6-28-26":[-6091.1,1685.03],"6-28-27":[-5229.41,-8.02],"6-28-28":[-5370.65,-9.26],"6-28-29":[-5029.2,-9.53],"6-28-30":[-5149.38,-10.39],"6-28-31":[-3741.68,-11.78],"6-28-32":[-4859.21,-13.08],"6-28-33":[-4605.78,-13.91],"6-28-34":[-3888.71,-12.68],"6-28-35":[-4747.63,-10.25],"6-28-36":[-4599.95,-7.52],"6-28-37":[-5655.38,1591.03],"6-28-38":[-3254.97,5307.64],"6-28-39":[-8.33,3851.97],"6-28-40":[-6.04,3653.33],"6-28-41":[-7.12,3606.16],"6-28-42":[-10.83,781.34],"6-28-43":[-12.78,907.4],"6-28-44":[-13.74,1016.87],"6-28-45":[-14.99,1005.18],"6-28-46":[-15.4,1103.03],"6-28-47":[-15.79,1073.93],"6-28-48":[-15.93,729.34],"6-28-49":[-19.25,738.55],"6-28-50":[-20.66,791.33],"6-28-51":[-24.63,359.46],"6-28-52":[-31.19,426.97],"6-28-53":[-40.85,427.93],"6-28-54":[-45.75,331.13],"6-28-55":[-52.39,260.77],"6-28-56":[-249.03,31.77],"6-28-57":[-291.84,721.39],"6-28-58":[-258.27,799.62],"6-28-59":[-519.66,1812.13],"6-28-60":[-695.6,2299.62],"6-28-61":[-2450.61,2175.98],"6-28-62":[-2467.84,2429.87],"6-28-63":[-4216.39,2761.57],"6-29-0":[-670.41,737.08],"6-29-1":[-665.35,1980.27],"5-14-0":[-904.43,1980.27],"6-29-2":[-1176.89,984.33],"6-29-3":[-2142.75,2066.14],"5-14-1":[-2142.75,2066.14],"6-29-4":[-2246.48,424.86],"6-29-5":[-1485.53,801.98],"5-14-2":[-2281.87,836.38],"6-29-6":[-4086.72,546.17],"6-29-7":[-4691.99,188.06],"5-14-3":[-4710.07,674.51],"6-29-8":[-4933.06,258.97],"6-29-9":[-5287.28,265.48],"5-14-4":[-5287.28,404.25],"6-29-10":[-5484.98,362.54],"6-29-11":[-5715.5,333.9],"5-14-5":[-5715.5,438.24],"6-29-12":[-5465.58,353.36],"6-29-13":[-5431.27,297.08],"5-14-6":[-5465.58,807.5],"6-29-14":[-4814.21,507.51],"6-29-15":[-5139.28,624.77],"5-14-7":[-5139.28,785.89],"6-29-16":[-4901.17,602.11],"6-29-17":[-6258.5,668.28],"5-14-8":[-6497.54,1115.44],"6-29-18":[-4824.97,558.27],"6-29-19":[-4787.72,500.16],"5-14-9":[-5278.57,1013.68],"6-29-20":[-4729.79,489.46],"6-29-21":[-4326.7,534.68],"5-14-10":[-4729.79,909.81],"6-29-22":[-4200.36,197.1],"6-29-23":[-5409.91,1437.08],"5-14-11":[-5658.77,3697.19],"6-29-24":[-4759.9,3376.08],"6-29-25":[-5145.15,5601.19],"5-14-12":[-5145.15,5601.19],"6-29-26":[-5646.48,3710.87],"6-29-27":[-5111.49,-5.43],"5-14-13":[-6091.1,3710.87],"6-29-28":[-5198.68,-5.37],"6-29-29":[-4685.05,-5.8],"5-14-14":[-5370.65,-5.37],"6-29-30":[-4562.98,-7.34],"6-29-31":[-3766.53,-8.54],"5-14-15":[-5149.38,-7.34],"6-29-32":[-4270.36,-11.17],"6-29-33":[-4267.65,-12.92],"5-14-16":[-4859.21,-11.17],"6-29-34":[-4304.77,-12.74],"6-29-35":[-5036.16,-10.37],"5-14-17":[-5036.16,-10.25],"6-29-36":[-4927.2,-7.55],"6-29-37":[-5616.3,3669.89],"5-14-18":[-5655.38,3669.89],"6-29-38":[-1835.13,5523.17],"6-29-39":[-3149.73,3283.09],"5-14-19":[-3254.97,5523.17],"6-29-40":[-3378.56,1345.28],"6-29-41":[-1756.43,193.62],"5-14-20":[-3378.56,3653.33],"6-29-42":[-70.76,507.97],"6-29-43":[-11.27,487.69],"5-14-21":[-70.76,907.4],"6-29-44":[-11.15,502.01],"6-29-45":[-11.69,556.71],"5-14-22":[-14.99,1016.87],"6-29-46":[-12.81,657.33],"6-29-47":[-11.24,593.9],"5-14-23":[-15.79,1103.03],"6-29-48":[-12.87,609.26],"6-29-49":[-15.22,481.25],"5-14-24":[-19.25,738.55],"6-29-50":[-18.28,290.43],"6-29-51":[-22.81,343.35],"5-14-25":[-24.63,791.33],"6-29-52":[-28.28,328.57],"6-29-53":[-37.41,365.55],"5-14-26":[-40.85,427.93],"6-29-54":[-82.28,245.7],"6-29-55":[-48.36,222.95],"5-14-27":[-82.28,331.13],"6-29-56":[-184.27,180.06],"6-29-57":[-496.2,695.16],"5-14-28":[-496.2,721.39],"6-29-58":[-343.95,1067.53],"6-29-59":[-491.39,1825.18],"5-14-29":[-519.66,1825.18],"6-29-60":[-664.28,2484.31],"6-29-61":[-2275.16,2200.25],"5-14-30":[-2450.61,2484.31],"6-29-62":[-2669.75,2364.99],"6-29-63":[-4216.39,2744.46],"5-14-31":[-4216.39,2761.57],"6-30-0":[-683.41,733.6],"6-30-1":[-703.44,2104.03],"6-30-2":[-1390.04,936.6],"6-30-3":[-1958,1609.72],"6-30-4":[-2316.35,717.95],"6-30-5":[-1776.88,1397.15],"6-30-6":[-3459.86,559.29],"6-30-7":[-4646.45,433.78],"6-30-8":[-5124.1,458.53],"6-30-9":[-5123.08,174.74],"6-30-10":[-5282.92,106.11],"6-30-11":[-6403.12,228.76],"6-30-12":[-7162.59,294.27],"6-30-13":[-6116.46,456.57],"6-30-14":[-5551.79,564.92],"6-30-15":[-5146.8,584.49],"6-30-16":[-5033.92,471.28],"6-30-17":[-5140.65,446.09],"6-30-18":[-5034.68,490.81],"6-30-19":[-4387.03,806.41],"6-30-20":[-5194.52,204.36],"6-30-21":[-4444.26,125.4],"6-30-22":[-4421.26,-25.61],"6-30-23":[-4321.97,-25.42],"6-30-24":[-4680.88,-14.04],"6-30-25":[-5059.77,2490.71],"6-30-26":[-4874.36,2540.82],"6-30-27":[-4690.19,-2.77],"6-30-28":[-5085.57,-1.84],"6-30-29":[-4909.25,-2.28],"6-30-30":[-4430.52,-4.28],"6-30-31":[-3787.91,-5.31],"6-30-32":[-3813.24,-8.63],"6-30-33":[-4282.62,-11.24],"6-30-34":[-4055.16,-12.14],"6-30-35":[-4888.98,-9.83],"6-30-36":[-6739.12,-7.4],"6-30-37":[-6668.56,2406.1],"6-30-38":[-2535.05,2428.71],"6-30-39":[-3785.54,-0.38],"6-30-40":[-3944.08,1.26],"6-30-41":[-3640.72,1.53],"6-30-42":[-109.86,126.71],"6-30-43":[-9.48,205.26],"6-30-44":[-9.48,795.12],"6-30-45":[-7.66,480.69],"6-30-46":[-9.07,435.79],"6-30-47":[-9.84,460.48],"6-30-48":[-11.72,559.47],"6-30-49":[-14.44,443.49],"6-30-50":[-16.72,447.4],"6-30-51":[-22.37,278.21],"6-30-52":[-110.99,220.76],"6-30-53":[-173.11,114.06],"6-30-54":[-118.63,158.11],"6-30-55":[-48.98,462.53],"6-30-56":[-132.66,437.71],"6-30-57":[-419.5,576.27],"6-30-58":[-337.86,1562.01],"6-30-59":[-652.43,1824.22],"6-30-60":[-559.27,2275.03],"6-30-61":[-2146.95,2180.52],"6-30-62":[-2620.12,2328.81],"6-30-63":[-4214.89,2744.46],"6-31-0":[-632.33,642.36],"6-31-1":[-1311.87,2619.83],"5-15-0":[-1311.87,2619.83],"6-31-2":[-1670.02,1700.11],"6-31-3":[-1505.89,2250.64],"5-15-1":[-1958,2250.64],"4-7-0":[-2142.75,2619.83],"6-31-4":[-2104.87,1374.08],"6-31-5":[-1565.53,583.45],"5-15-2":[-2316.35,1397.15],"6-31-6":[-3638.82,413.34],"6-31-7":[-4686.95,1580.64],"5-15-3":[-4686.95,1580.64],"4-7-1":[-4710.07,1580.64],"3-3-0":[-4740.18,3362.09],"6-31-8":[-5042.89,577.62],"6-31-9":[-4980.95,282.12],"5-15-4":[-5124.1,577.62],"6-31-10":[-5310.1,-46.98],"6-31-11":[-5722.75,190.58],"5-15-5":[-6403.12,228.76],"4-7-2":[-6403.12,577.62],"6-31-12":[-6291.76,324],"6-31-13":[-5111.3,447.15],"5-15-6":[-7162.59,456.57],"6-31-14":[-5530.61,671.12],"6-31-15":[-5164.36,604.9],"5-15-7":[-5551.79,671.12],"4-7-3":[-7162.59,807.5],"3-3-1":[-7162.59,3889.28],"2-1-0":[-7162.59,4373.52],"6-31-16":[-4822.44,422.75],"6-31-17":[-4823.05,300.32],"5-15-8":[-5140.65,471.28],"6-31-18":[-4833.5,509.53],"6-31-19":[-4467.91,590.45],"5-15-9":[-5034.68,806.41],"4-7-4":[-6497.54,1115.44],"6-31-20":[-4946.44,146.09],"6-31-21":[-4407.4,78.7],"5-15-10":[-5194.52,204.36],"6-31-22":[-4533.97,-24.95],"6-31-23":[-5033.68,-3.53],"5-15-11":[-5033.68,-3.53],"4-7-5":[-5658.77,3697.19],"3-3-2":[-6497.54,4383.25],"6-31-24":[-5131.34,129.8],"6-31-25":[-4759.71,2495.76],"5-15-12":[-5131.34,2495.76],"6-31-26":[-4820.52,4217.93],"6-31-27":[-4834.53,1667.28],"5-15-13":[-4874.36,4217.93],"4-7-6":[-6091.1,5601.19],"6-31-28":[-5293.16,3.56],"6-31-29":[-4500.18,1.79],"5-15-14":[-5293.16,3.56],"6-31-30":[-4189.47,-0.95],"6-31-31":[-4104.28,1700.45],"5-15-15":[-4430.52,1700.45],"4-7-7":[-5370.65,1700.45],"3-3-3":[-6091.1,5601.19],"2-1-1":[-6924.66,5601.19],"1-0-0":[-10751.44,6207.28],"6-31-32":[-3510.08,1684.42],"6-31-33":[-4070.18,-8.12],"5-15-16":[-4282.62,1684.42],"6-31-34":[-3905.47,-10.22],"6-31-35":[-4170.38,-8.63],"5-15-17":[-4888.98,-8.63],"4-7-8":[-5036.16,1684.42],"6-31-36":[-6565.97,1589.27],"6-31-37":[-1812.77,4112.94],"5-15-18":[-6739.12,4112.94],"6-31-38":[-859.48,2424.67],"6-31-39":[-3743.15,104.44],"5-15-19":[-3785.54,2428.71],"4-7-9":[-6739.12,5523.17],"3-3-4":[-10287.73,5523.17],"6-31-40":[-3908.65,3.59],"6-31-41":[-3567.18,3.57],"5-15-20":[-3944.08,3.59],"6-31-42":[-397.92,76.86],"6-31-43":[-58.3,146.46],"5-15-21":[-397.92,205.26],"4-7-10":[-3944.08,3653.33],"6-31-44":[-6.17,569.71],"6-31-45":[-5.45,505.58],"5-15-22":[-9.48,795.12],"6-31-46":[-4.53,291.79],"6-31-47":[-5.48,416.99],"5-15-23":[-9.84,460.48],"4-7-11":[-15.79,1103.03],"3-3-5":[-3944.08,4305.19],"2-1-2":[-10287.73,5523.17],"6-31-48":[-132.81,589.98],"6-31-49":[-11.96,638.88],"5-15-24":[-132.81,638.88],"6-31-50":[-15.08,443],"6-31-51":[-19.15,311.46],"5-15-25":[-22.37,447.4],"4-7-12":[-132.81,791.33],"6-31-52":[-198.6,182.6],"6-31-53":[-208.92,-9.98],"5-15-26":[-208.92,220.76],"6-31-54":[-201.71,281.1],"6-31-55":[-39.77,576.62],"5-15-27":[-201.71,576.62],"4-7-13":[-208.92,576.62],"3-3-6":[-321.18,3764.34],"6-31-56":[-270.99,1365.62],"6-31-57":[-502.2,424.34],"5-15-28":[-502.2,1365.62],"6-31-58":[-502.24,1267.01],"6-31-59":[-500.79,1887.87],"5-15-29":[-652.43,1887.87],"4-7-14":[-652.43,1887.87],"6-31-60":[-838.7,2175.26],"6-31-61":[-2146.95,1987.13],"5-15-30":[-2146.95,2275.03],"6-31-62":[-2638.31,2714.87],"6-31-63":[-4214.39,2744.46],"5-15-31":[-4214.89,2744.46],"4-7-15":[-4216.39,2761.57],"3-3-7":[-4216.39,3441.15],"2-1-3":[-5094.21,4326.16],"1-0-1":[-10287.73,6095.63],"6-32-0":[-651.16,891.44],"6-32-1":[-1552.49,1948.79],"6-32-2":[-1753.91,2344.15],"6-32-3":[-1288.78,1880.89],"6-32-4":[-1721.76,2029.25],"6-32-5":[-1511.31,684.11],"6-32-6":[-2539.96,367.14],"6-32-7":[-4349.76,395.57],"6-32-8":[-4839.06,546.23],"6-32-9":[-5001.37,248.1],"6-32-10":[-5439.68,-44.47],"6-32-11":[-5724.72,87.35],"6-32-12":[-6336.83,240.44],"6-32-13":[-5142.35,415.1],"6-32-14":[-5460.52,599.34],"6-32-15":[-4689.89,568.7],"6-32-16":[-4679.1,551.43],"6-32-17":[-5583.01,291.63],"6-32-18":[-5370.29,294.32],"6-32-19":[-5027.02,321.49],"6-32-20":[-4299.38,211.56],"6-32-21":[-4681.53,90.38],"6-32-22":[-4375.93,-7.81],"6-32-23":[-4439.29,-7.65],"6-32-24":[-5208.19,200.24],"6-32-25":[-5459.67,1010.31],"6-32-26":[-4966.32,3009.32],"6-32-27":[-4803.68,2376.93],"6-32-28":[-5024,10.91],"6-32-29":[-4552.19,10.51],"6-32-30":[-4518.06,6.74],"6-32-31":[-3413.49,663.37],"6-32-32":[-3814.72,716.38],"6-32-33":[-4502.59,-4.49],"6-32-34":[-3766.35,-6.53],"6-32-35":[-5498.08,-6.02],"6-32-36":[-6062.39,2332.91],"6-32-37":[-3402.81,2916.82],"6-32-38":[-3812.19,964.29],"6-32-39":[-1204.75,182.66],"6-32-40":[-3737.48,5.45],"6-32-41":[-3492.01,6.31],"6-32-42":[-2792.42,86.86],"6-32-43":[-49.18,196.98],"6-32-44":[-5.26,309.51],"6-32-45":[-4.78,279.02],"6-32-46":[-2.44,284.12],"6-32-47":[-68.64,505.12],"6-32-48":[-161.62,554.68],"6-32-49":[-174.75,577.05],"6-32-50":[-11.84,403.02],"6-32-51":[-80.26,236.41],"6-32-52":[-241.21,84.28],"6-32-53":[-273.09,-8.31],"6-32-54":[-233.27,253.41],"6-32-55":[-129.67,539.22],"6-32-56":[-348.03,403.5],"6-32-57":[-470.07,449.89],"6-32-58":[-496.76,1290.61],"6-32-59":[-472.31,2685.38],"6-32-60":[-800.22,2381.84],"6-32-61":[-1910.19,1985.53],"6-32-62":[-2730.3,2244.93],"6-32-63":[-4214.39,2744.46],"6-33-0":[-350.03,366.89],"6-33-1":[-1236.85,1500.73],"5-16-0":[-1552.49,1948.79],"6-33-2":[-1749.59,1693.18],"6-33-3":[-1626.27,2653.23],"5-16-1":[-1753.91,2653.23],"6-33-4":[-2555.32,4704.79],"6-33-5":[-1385.22,1009.47],"5-16-2":[-2555.32,4704.79],"6-33-6":[-1100.12,819.86],"6-33-7":[-4304.38,557.56],"5-16-3":[-4349.76,819.86],"6-33-8":[-4717.53,444.35],"6-33-9":[-5014.69,366.68],"5-16-4":[-5014.69,546.23],"6-33-10":[-5580.11,-42.25],"6-33-11":[-6310.58,-45.96],"5-16-5":[-6310.58,87.35],"6-33-12":[-5887.78,205.42],"6-33-13":[-5096.82,323.91],"5-16-6":[-6336.83,415.1],"6-33-14":[-5141.14,604.67],"6-33-15":[-5045.87,613.05],"5-16-7":[-5460.52,613.05],"6-33-16":[-4428.48,486.54],"6-33-17":[-5579.29,356.67],"5-16-8":[-5583.01,551.43],"6-33-18":[-5095.04,611.43],"6-33-19":[-4956.22,1256.4],"5-16-9":[-5370.29,1256.4],"6-33-20":[-4459.43,703.65],"6-33-21":[-4536.16,133.72],"5-16-10":[-4681.53,703.65],"6-33-22":[-4327.34,-9.17],"6-33-23":[-5710.56,-15.6],"5-16-11":[-5710.56,-7.65],"6-33-24":[-4728.77,38.89],"6-33-25":[-5255.71,-5.73],"5-16-12":[-5459.67,1010.31],"6-33-26":[-5088.65,2458.87],"6-33-27":[-5143.3,2108.97],"5-16-13":[-5143.3,3009.32],"6-33-28":[-5077.06,2165.37],"6-33-29":[-4768.23,21.34],"5-16-14":[-5077.06,2165.37],"6-33-30":[-4621.04,580.04],"6-33-31":[-3768.75,9.28],"5-16-15":[-4621.04,663.37],"6-33-32":[-4778.61,4.83],"6-33-33":[-3866.48,493.04],"5-16-16":[-4778.61,716.38],"6-33-34":[-3463.64,-2.74],"6-33-35":[-5264.94,2112.86],"5-16-17":[-5498.08,2112.86],"6-33-36":[-1265.04,2015.96],"6-33-37":[-5834.04,2371.84],"5-16-18":[-6062.39,2916.82],"6-33-38":[-5561.97,2.74],"6-33-39":[-4850.21,12.09],"5-16-19":[-5561.97,964.29],"6-33-40":[-3721.53,9.43],"6-33-41":[-3446.02,10.75],"5-16-20":[-3737.48,10.75],"6-33-42":[-2926.21,85.16],"6-33-43":[-6.76,670.08],"5-16-21":[-2926.21,670.08],"6-33-44":[-2.13,1191.3],"6-33-45":[-1.46,564.53],"5-16-22":[-5.26,1191.3],"6-33-46":[-0.15,347.1],"6-33-47":[-135.47,473.44],"5-16-23":[-135.47,505.12],"6-33-48":[-256.34,566.65],"6-33-49":[-167.37,570.37],"5-16-24":[-256.34,577.05],"6-33-50":[-7.73,310.25],"6-33-51":[-187.94,187.42],"5-16-25":[-187.94,403.02],"6-33-52":[-241.18,-3.66],"6-33-53":[-285.94,-5.75],"5-16-26":[-285.94,84.28],"6-33-54":[-219.87,399.59],"6-33-55":[-497.41,430.98],"5-16-27":[-497.41,539.22],"6-33-56":[-420.6,576.62],"6-33-57":[-736.8,864.62],"5-16-28":[-736.8,864.62],"6-33-58":[-774.19,1304.63],"6-33-59":[-793.68,4721.94],"5-16-29":[-793.68,4721.94],"6-33-60":[-800.68,2555.4],"6-33-61":[-1816.41,1732.44],"5-16-30":[-1910.19,2555.4],"6-33-62":[-2782.86,2245.57],"6-33-63":[-4214.89,2744.47],"5-16-31":[-4214.89,2744.47],"6-34-0":[-454.83,542.8],"6-34-1":[-1478.32,428.27],"6-34-2":[-1866.74,1823.83],"6-34-3":[-2047.48,2270.95],"6-34-4":[-2606.71,1556.84],"6-34-5":[-2627.94,1913.68],"6-34-6":[-1191.1,1056.55],"6-34-7":[-4260.54,570.75],"6-34-8":[-4632.93,613.97],"6-34-9":[-4928.09,433.17],"6-34-10":[-5263.71,-38.64],"6-34-11":[-6036.97,-44.35],"6-34-12":[-6155.38,171.79],"6-34-13":[-5688.04,145.12],"6-34-14":[-4849.44,594.92],"6-34-15":[-4302.63,614.36],"6-34-16":[-4708.92,432.14],"6-34-17":[-5187.86,436.84],"6-34-18":[-4796.58,1652.42],"6-34-19":[-4753.59,2004.7],"6-34-20":[-4390.66,358.2],"6-34-21":[-4342.5,76.45],"6-34-22":[-5078.47,86.32],"6-34-23":[-4795.27,678.56],"6-34-24":[-4711.24,565.42],"6-34-25":[-4864.62,19.57],"6-34-26":[-5307.29,735.54],"6-34-27":[-5583.4,729.46],"6-34-28":[-5386.72,3818.31],"6-34-29":[-5922.69,1199.76],"6-34-30":[-5526.33,213.98],"6-34-31":[-4419.31,21.13],"6-34-32":[-4679.46,20.08],"6-34-33":[-4932.19,93.97],"6-34-34":[-4711.18,1158.76],"6-34-35":[-3210.82,3734.31],"6-34-36":[-3366.76,691.45],"6-34-37":[-1999.35,687.54],"6-34-38":[-6807.88,9.8],"6-34-39":[-4726.82,503.41],"6-34-40":[-3500.23,611.32],"6-34-41":[-344.47,88.56],"6-34-42":[-83.1,82.28],"6-34-43":[-41.18,336.97],"6-34-44":[1.55,1938.99],"6-34-45":[1.48,1607.82],"6-34-46":[1.54,428.39],"6-34-47":[-71.85,420.82],"6-34-48":[-80.29,600.77],"6-34-49":[-1.02,564.78],"6-34-50":[-56.04,146.55],"6-34-51":[-187.94,168.79],"6-34-52":[-252.94,-1.44],"6-34-53":[-311.22,-3.74],"6-34-54":[-313.66,517.83],"6-34-55":[-438.4,576.97],"6-34-56":[-237.34,538.73],"6-34-57":[-161.05,1030.58],"6-34-58":[-811.08,1906.63],"6-34-59":[-838.51,1732.84],"6-34-60":[-783.24,2250.43],"6-34-61":[-1769.21,1753.86],"6-34-62":[-2783.53,2251.13],"6-34-63":[-4219.24,2745.47],"6-35-0":[-459.62,452.64],"6-35-1":[-1463.64,603.08],"5-17-0":[-1478.32,603.08],"6-35-2":[-1858.56,1923.59],"6-35-3":[-2344.57,2313.91],"5-17-1":[-2344.57,2313.91],"4-8-0":[-2344.57,2653.23],"6-35-4":[-2871.64,2252.73],"6-35-5":[-2571.35,1712.44],"5-17-2":[-2871.64,2252.73],"6-35-6":[-1027.03,1559.44],"6-35-7":[-4207.3,272.32],"5-17-3":[-4260.54,1559.44],"4-8-1":[-4349.76,4704.79],"6-35-8":[-4447.9,185.61],"6-35-9":[-5050.87,184.52],"5-17-4":[-5050.87,613.97],"6-35-10":[-5719.26,293.27],"6-35-11":[-5529.33,81.87],"5-17-5":[-6036.97,293.27],"4-8-2":[-6310.58,613.97],"6-35-12":[-5305.72,123.7],"6-35-13":[-4672.46,181.36],"5-17-6":[-6155.38,181.36],"6-35-14":[-4394.81,536.17],"6-35-15":[-4785.62,651.7],"5-17-7":[-4849.44,651.7],"4-8-3":[-6336.83,651.7],"6-35-16":[-5189.33,701.76],"6-35-17":[-5118.02,951.43],"5-17-8":[-5189.33,951.43],"6-35-18":[-4407.59,1713.99],"6-35-19":[-4331.47,1476.72],"5-17-9":[-4796.58,2004.7],"4-8-4":[-5583.01,2004.7],"6-35-20":[-4392,1834.6],"6-35-21":[-4783.03,28.94],"5-17-10":[-4783.03,1834.6],"6-35-22":[-4621.18,840.08],"6-35-23":[-4947.87,293.76],"5-17-11":[-5078.47,840.08],"4-8-5":[-5710.56,1834.6],"6-35-24":[-5282.94,1104.62],"6-35-25":[-4816.41,14.26],"5-17-12":[-5282.94,1104.62],"6-35-26":[-5347.3,8.26],"6-35-27":[-6488.32,357.63],"5-17-13":[-6488.32,735.54],"4-8-6":[-6488.32,3009.32],"6-35-28":[-6906.46,1960.73],"6-35-29":[-6336.37,4007.75],"5-17-14":[-6906.46,4007.75],"6-35-30":[-4440.69,4388.45],"6-35-31":[-4459.71,6213.75],"5-17-15":[-5526.33,6213.75],"4-8-7":[-6906.46,6213.75],"6-35-32":[-5218.74,6286.78],"6-35-33":[-5042.7,4458.62],"5-17-16":[-5218.74,6286.78],"6-35-34":[-4708.73,4118.74],"6-35-35":[-4012.1,1896.73],"5-17-17":[-4711.18,4118.74],"4-8-8":[-5498.08,6286.78],"6-35-36":[-3818.41,288.63],"6-35-37":[-2951.15,21.77],"5-17-18":[-3818.41,691.45],"6-35-38":[-7357.49,22.14],"6-35-39":[-4359.2,1048.6],"5-17-19":[-7357.49,1048.6],"4-8-9":[-7357.49,2916.82],"6-35-40":[-1553.17,257.76],"6-35-41":[-946.57,470.08],"5-17-20":[-3500.23,611.32],"6-35-42":[-1053.62,27.72],"6-35-43":[-866.11,1091.31],"5-17-21":[-1053.62,1091.31],"4-8-10":[-3737.48,1091.31],"6-35-44":[-69.43,1392.94],"6-35-45":[4.72,1677.79],"5-17-22":[-69.43,1938.99],"6-35-46":[4.86,939.44],"6-35-47":[-106.62,672.4],"5-17-23":[-106.62,939.44],"4-8-11":[-135.47,1938.99],"6-35-48":[-33.74,618.24],"6-35-49":[-3.08,519.17],"5-17-24":[-80.29,618.24],"6-35-50":[-125.18,177.05],"6-35-51":[-247.54,111.71],"5-17-25":[-247.54,177.05],"4-8-12":[-256.34,618.24],"6-35-52":[-237.66,68.63],"6-35-53":[-245.4,250.26],"5-17-26":[-311.22,250.26],"6-35-54":[-548.44,169.55],"6-35-55":[-478.9,182.61],"5-17-27":[-548.44,576.97],"4-8-13":[-548.44,576.97],"6-35-56":[-197.41,197.49],"6-35-57":[-850.85,1559.44],"5-17-28":[-850.85,1559.44],"6-35-58":[-952.94,1784.85],"6-35-59":[-708.27,2036.4],"5-17-29":[-952.94,2036.4],"4-8-14":[-952.94,4721.94],"6-35-60":[-528.88,2299.86],"6-35-61":[-1592.98,1971.3],"5-17-30":[-1769.21,2299.86],"6-35-62":[-2784.06,2260.72],"6-35-63":[-4215.39,2745.47],"5-17-31":[-4219.24,2745.47],"4-8-15":[-4219.24,2745.47],"6-36-0":[-489.79,822.76],"6-36-1":[-1366.27,1154.63],"6-36-2":[-1683.51,2230.75],"6-36-3":[-1884.8,2258.08],"6-36-4":[-2367.54,1817.36],"6-36-5":[-2385.15,2118.71],"6-36-6":[-1364.35,1862.67],"6-36-7":[-4087.74,611.89],"6-36-8":[-4262.94,282.83],"6-36-9":[-5089.76,575.77],"6-36-10":[-5139.84,428.02],"6-36-11":[-5274.38,430.05],"6-36-12":[-4997.51,408.97],"6-36-13":[-4177.36,406.33],"6-36-14":[-4221.39,610.85],"6-36-15":[-4309.16,575.3],"6-36-16":[-5063.08,700.02],"6-36-17":[-4764.18,927.51],"6-36-18":[-4804.48,1201.61],"6-36-19":[-4436.54,191.41],"6-36-20":[-4791.15,-36.24],"6-36-21":[-4697.14,-34.13],"6-36-22":[-4820.37,29.15],"6-36-23":[-5032.56,55.76],"6-36-24":[-6376.98,1947.58],"6-36-25":[-5043.08,2231.33],"6-36-26":[-5556.63,807.13],"6-36-27":[-6025.05,5673.66],"6-36-28":[-2187.54,6657.51],"6-36-29":[-180.23,4957.44],"6-36-30":[-37.47,5414.88],"6-36-31":[-328.06,5809.48],"6-36-32":[-623.84,5906.18],"6-36-33":[-4269.78,5319.85],"6-36-34":[-4417.62,5607.45],"6-36-35":[-4208.62,6754.44],"6-36-36":[-4176.44,5914.69],"6-36-37":[-4288.99,824.13],"6-36-38":[-6848.89,2167.33],"6-36-39":[-6923.15,1828.57],"6-36-40":[-4947.98,411.38],"6-36-41":[-5170.05,422.7],"6-36-42":[-5116.4,27.55],"6-36-43":[-3615.81,26.75],"6-36-44":[-1006.26,156.63],"6-36-45":[-89.15,1138.15],"6-36-46":[-54.04,900.59],"6-36-47":[-201.99,692.08],"6-36-48":[7.17,548.17],"6-36-49":[4.69,580.92],"6-36-50":[-48.23,396.38],"6-36-51":[-242.98,388.95],"6-36-52":[-185.02,401.03],"6-36-53":[-180.3,428.06],"6-36-54":[-562.17,511.81],"6-36-55":[-206.42,273.04],"6-36-56":[-156.47,519.49],"6-36-57":[-1062.12,1733.71],"6-36-58":[-1087.43,1801.07],"6-36-59":[-759.94,1748.06],"6-36-60":[-275.14,2158.52],"6-36-61":[-1442.57,2325.18],"6-36-62":[-2787.79,2281.25],"6-36-63":[-4215.39,2745.47],"6-37-0":[-529.7,950.33],"6-37-1":[-1610.79,1129.6],"5-18-0":[-1610.79,1154.63],"6-37-2":[-1851.99,2437.47],"6-37-3":[-1683.51,2148.92],"5-18-1":[-1884.8,2437.47],"6-37-4":[-1556.76,1260.24],"6-37-5":[-1695.95,1184.79],"5-18-2":[-2385.15,2118.71],"6-37-6":[-1120.23,1808.19],"6-37-7":[-3519.71,1101.49],"5-18-3":[-4087.74,1862.67],"6-37-8":[-4147.78,282.61],"6-37-9":[-4780.41,642.27],"5-18-4":[-5089.76,642.27],"6-37-10":[-5266.36,648.16],"6-37-11":[-5260.84,410.19],"5-18-5":[-5274.38,648.16],"6-37-12":[-4472.73,1084.61],"6-37-13":[-3802.59,2661.91],"5-18-6":[-4997.51,2661.91],"6-37-14":[-1764.59,3481.08],"6-37-15":[-3424.87,3901.29],"5-18-7":[-4309.16,3901.29],"6-37-16":[-3865.32,1597.57],"6-37-17":[-4566.1,1241.62],"5-18-8":[-5063.08,1597.57],"6-37-18":[-5188.07,1352.53],"6-37-19":[-5441.31,-10.6],"5-18-9":[-5441.31,1352.53],"6-37-20":[-5453.77,-42.73],"6-37-21":[-4766.46,-43.8],"5-18-10":[-5453.77,-34.13],"6-37-22":[-5001.2,-41.08],"6-37-23":[-5070.1,26.27],"5-18-11":[-5070.1,55.76],"6-37-24":[-6091.51,1217.95],"6-37-25":[-7536.97,2330.69],"5-18-12":[-7536.97,2330.69],"6-37-26":[-7556.84,5459.75],"6-37-27":[-346.06,5421.57],"5-18-13":[-7556.84,5673.66],"6-37-28":[-49.02,5700.22],"6-37-29":[-23.52,3844.52],"5-18-14":[-2187.54,6657.51],"6-37-30":[-114.49,5315.89],"6-37-31":[-8.04,3836.77],"5-18-15":[-328.06,5809.48],"6-37-32":[117.06,3769.75],"6-37-33":[-136.42,5266.88],"5-18-16":[-4269.78,5906.18],"6-37-34":[-34.08,3760.52],"6-37-35":[-2679.16,5683.59],"5-18-17":[-4417.62,6754.44],"6-37-36":[-4297.04,5564.58],"6-37-37":[-4632.8,5547.75],"5-18-18":[-4632.8,5914.69],"6-37-38":[-5938.07,2250.67],"6-37-39":[-4564.93,1130.92],"5-18-19":[-6923.15,2250.67],"6-37-40":[-5547.39,781.66],"6-37-41":[-5471.37,37.5],"5-18-20":[-5547.39,781.66],"6-37-42":[-5342.72,34.42],"6-37-43":[-5384.9,32.14],"5-18-21":[-5384.9,34.42],"6-37-44":[-4916.35,34.46],"6-37-45":[-3432.19,1376.54],"5-18-22":[-4916.35,1376.54],"6-37-46":[-122.33,1199.69],"6-37-47":[-70.31,1528.77],"5-18-23":[-201.99,1528.77],"6-37-48":[-68.87,4026.29],"6-37-49":[-269.44,3587.09],"5-18-24":[-269.44,4026.29],"6-37-50":[-96.77,2789.91],"6-37-51":[-222.29,1172.63],"5-18-25":[-242.98,2789.91],"6-37-52":[-5.66,395.16],"6-37-53":[-1.67,603.79],"5-18-26":[-185.02,603.79],"6-37-54":[-542.06,589.74],"6-37-55":[-65.58,231.36],"5-18-27":[-562.17,589.74],"6-37-56":[-96.03,1105.5],"6-37-57":[-923.87,1832.24],"5-18-28":[-1062.12,1832.24],"6-37-58":[-1032.37,1660.76],"6-37-59":[-1613.33,1225.22],"5-18-29":[-1613.33,1801.07],"6-37-60":[-479.28,2166.62],"6-37-61":[-1311.15,2452.46],"5-18-30":[-1442.57,2452.46],"6-37-62":[-2784.78,2321.18],"6-37-63":[-4220.26,2745.47],"5-18-31":[-4220.26,2745.47],"6-38-0":[-519.6,681.02],"6-38-1":[-2198.47,1253.78],"6-38-2":[-2189.44,2116.63],"6-38-3":[-1281.64,2052.81],"6-38-4":[-1351.54,1194.93],"6-38-5":[-1749.15,1667.87],"6-38-6":[-1095.72,1736.55],"6-38-7":[-1549.9,2969.55],"6-38-8":[-3766.38,332.82],"6-38-9":[-4402.36,633.8],"6-38-10":[-4964.76,658.27],"6-38-11":[-5005.56,464.64],"6-38-12":[-4494.31,1846.61],"6-38-13":[-982.8,2481.75],"6-38-14":[-30.94,2821.86],"6-38-15":[-404.7,3452.08],"6-38-16":[-470.67,2451.53],"6-38-17":[-481.26,3626.15],"6-38-18":[-86.89,4659.39],"6-38-19":[-8228.12,4831.22],"6-38-20":[-6381.71,4956.12],"6-38-21":[-6742.27,5115.31],"6-38-22":[-7913.93,2168.25],"6-38-23":[-7969.31,2607.62],"6-38-24":[-8050.34,1152.74],"6-38-25":[-8983.51,5763.75],"6-38-26":[-1820.84,6405.39],"6-38-27":[-65.4,6266.34],"6-38-28":[-114.23,4925.73],"6-38-29":[-32.53,5356.84],"6-38-30":[-54.2,3882.23],"6-38-31":[-58.3,839.2],"6-38-32":[68.16,826.19],"6-38-33":[63.39,3838.4],"6-38-34":[43.63,5193.89],"6-38-35":[-82.22,4760.78],"6-38-36":[-5251.11,6360.34],"6-38-37":[-4600.41,6449.41],"6-38-38":[-4723.57,5847.77],"6-38-39":[-5617.49,1104.68],"6-38-40":[-5800.95,2677.33],"6-38-41":[-5756.35,2243.25],"6-38-42":[-5801.58,5156.32],"6-38-43":[-5646.47,5062.63],"6-38-44":[-5456.02,5023.3],"6-38-45":[-4488.42,4724.4],"6-38-46":[-2637.57,3766.16],"6-38-47":[-218.88,2585.5],"6-38-48":[-268.93,3553.09],"6-38-49":[-290.78,3257.62],"6-38-50":[-72.84,2695.15],"6-38-51":[-106.71,1949.61],"6-38-52":[-22.58,448.63],"6-38-53":[-345.6,645.25],"6-38-54":[-425.69,601.83],"6-38-55":[-34.96,322.36],"6-38-56":[-362.66,2784.58],"6-38-57":[-1715.35,1767.29],"6-38-58":[-1598.79,1790.22],"6-38-59":[-1058.75,1401.52],"6-38-60":[-492.06,2004.84],"6-38-61":[-1191,2082.48],"6-38-62":[-2626.37,2346.02],"6-38-63":[-4248.26,2745.47],"6-39-0":[-540.35,1101.15],"6-39-1":[-2345.14,1569.05],"5-19-0":[-2345.14,1569.05],"6-39-2":[-2346.92,1723.34],"6-39-3":[-1117.86,1651.25],"5-19-1":[-2346.92,2116.63],"4-9-0":[-2346.92,2437.47],"6-39-4":[-1326.57,1535.69],"6-39-5":[-1071.1,1564.82],"5-19-2":[-1749.15,1667.87],"6-39-6":[-1194.75,2245.82],"6-39-7":[-1603.15,2751.69],"5-19-3":[-1603.15,2969.55],"4-9-1":[-4087.74,2969.55],"3-4-0":[-4349.76,4704.79],"6-39-8":[-3410.04,1942.94],"6-39-9":[-4259.66,781.05],"5-19-4":[-4402.36,1942.94],"6-39-10":[-4838.54,360.51],"6-39-11":[-4796.57,596.29],"5-19-5":[-5005.56,658.27],"4-9-2":[-5274.38,1942.94],"6-39-12":[-1992.23,2555.83],"6-39-13":[-110,1077.82],"5-19-6":[-4494.31,2555.83],"6-39-14":[-97.91,1073.14],"6-39-15":[-70.35,1579.36],"5-19-7":[-404.7,3452.08],"4-9-3":[-4997.51,3901.29],"3-4-1":[-6336.83,3901.29],"6-39-16":[-56.2,1927.38],"6-39-17":[-75.76,1953.98],"5-19-8":[-481.26,3626.15],"6-39-18":[-85.75,3926.12],"6-39-19":[-95.04,5824.32],"5-19-9":[-8228.12,5824.32],"4-9-4":[-8228.12,5824.32],"6-39-20":[-101.46,6819.12],"6-39-21":[-103.88,6238.9],"5-19-10":[-6742.27,6819.12],"6-39-22":[-105.29,6823.9],"6-39-23":[-347.5,6678.96],"5-19-11":[-7969.31,6823.9],"4-9-5":[-7969.31,6823.9],"3-4-2":[-8228.12,6823.9],"6-39-24":[-1003.53,6134.25],"6-39-25":[-603.21,6488.27],"5-19-12":[-8983.51,6488.27],"6-39-26":[-133.8,6313.82],"6-39-27":[-89.53,5209.77],"5-19-13":[-1820.84,6405.39],"4-9-6":[-8983.51,6488.27],"6-39-28":[-34.01,3550.67],"6-39-29":[-4.7,404.14],"5-19-14":[-114.23,5356.84],"6-39-30":[-66.26,759.95],"6-39-31":[-103.64,984.95],"5-19-15":[-103.64,3882.23],"4-9-7":[-2187.54,6657.51],"3-4-3":[-8983.51,6657.51],"6-39-32":[-0.58,914.93],"6-39-33":[34.67,648.95],"5-19-16":[-0.58,3838.4],"6-39-34":[29.78,308.24],"6-39-35":[-1861.76,3455.66],"5-19-17":[-1861.76,5193.89],"4-9-8":[-4417.62,6754.44],"6-39-36":[-5294.02,5347.83],"6-39-37":[-5290.9,6455.95],"5-19-18":[-5294.02,6455.95],"6-39-38":[-8591.11,6600.28],"6-39-39":[-8438.23,6222.25],"5-19-19":[-8591.11,6600.28],"4-9-9":[-8591.11,6600.28],"3-4-4":[-8591.11,6754.44],"6-39-40":[-5981.36,6775.96],"6-39-41":[-6284.61,6919.9],"5-19-20":[-6284.61,6919.9],"6-39-42":[-5637.46,6300.89],"6-39-43":[-5662.35,6969.13],"5-19-21":[-5801.58,6969.13],"4-9-10":[-6284.61,6969.13],"6-39-44":[-5728.78,5888.33],"6-39-45":[-5031.43,3998.13],"5-19-22":[-5728.78,5888.33],"6-39-46":[-3807.89,2022.28],"6-39-47":[-332.14,1957.39],"5-19-23":[-3807.89,3766.16],"4-9-11":[-5728.78,5888.33],"3-4-5":[-6284.61,6969.13],"6-39-48":[-175.48,1477.25],"6-39-49":[-384.07,1097.15],"5-19-24":[-384.07,3553.09],"6-39-50":[-1.5,1051.93],"6-39-51":[-63.31,2581.84],"5-19-25":[-106.71,2695.15],"4-9-12":[-384.07,4026.29],"6-39-52":[-197.52,578.19],"6-39-53":[-600.93,341.52],"5-19-26":[-600.93,645.25],"6-39-54":[-718.65,797.88],"6-39-55":[-24.6,1701.66],"5-19-27":[-718.65,1701.66],"4-9-13":[-718.65,1701.66],"3-4-6":[-718.65,4026.29],"6-39-56":[-498.94,2876.77],"6-39-57":[-2351.44,2323.88],"5-19-28":[-2351.44,2876.77],"6-39-58":[-2355.6,2011.29],"6-39-59":[-1040.24,1401.52],"5-19-29":[-2355.6,2011.29],"4-9-14":[-2355.6,2876.77],"6-39-60":[-450.15,1746.17],"6-39-61":[-1380.02,1850.39],"5-19-30":[-1380.02,2082.48],"6-39-62":[-2491.33,2348.16],"6-39-63":[-4221.26,2745.47],"5-19-31":[-4248.26,2745.47],"4-9-15":[-4248.26,2745.47],"3-4-7":[-4248.26,4721.94],"6-40-0":[-518.26,955.16],"6-40-1":[-1903.37,2049.21],"6-40-2":[-2397.96,1837.18],"6-40-3":[-1139.43,1301.31],"6-40-4":[-1317.34,1474.89],"6-40-5":[-852.66,1902.88],"6-40-6":[-1199.74,1790.09],"6-40-7":[-1039.02,2087.2],"6-40-8":[-1484.99,2121.08],"6-40-9":[-4113.48,1148.56],"6-40-10":[-5256.25,1032.11],"6-40-11":[-5559.15,935.94],"6-40-12":[-4034.62,1017.96],"6-40-13":[-239.87,1031.68],"6-40-14":[-129.01,1255.33],"6-40-15":[-156.96,787.13],"6-40-16":[-112.19,1095.82],"6-40-17":[-149.28,1612.57],"6-40-18":[-82.04,560.77],"6-40-19":[-88.7,797.37],"6-40-20":[-92.93,2767.12],"6-40-21":[-98.06,4454.06],"6-40-22":[-101.84,6008.42],"6-40-23":[-104.68,6321.87],"6-40-24":[-138.65,5950.05],"6-40-25":[-141.12,5674.19],"6-40-26":[-90.28,5257.92],"6-40-27":[-82.71,249.83],"6-40-28":[-60.97,2718.19],"6-40-29":[-37.5,2385.74],"6-40-30":[-52.83,2826.62],"6-40-31":[-121.52,2785.87],"6-40-32":[-10.01,2582.86],"6-40-33":[7.09,2809.61],"6-40-34":[-11.96,2317.75],"6-40-35":[-1931.5,2634.17],"6-40-36":[-5900.26,415.46],"6-40-37":[-5292.46,5469.94],"6-40-38":[-8473.44,5778.21],"6-40-39":[-8765.31,6050.05],"6-40-40":[-6184.48,6388.87],"6-40-41":[-6021.8,6039.42],"6-40-42":[-6469.31,4549.07],"6-40-43":[-5770.41,2816.12],"6-40-44":[-5499.84,812.73],"6-40-45":[-5107.82,598.59],"6-40-46":[-4907.4,1675.56],"6-40-47":[-1909.77,1125.83],"6-40-48":[-144.12,739.39],"6-40-49":[-415.2,1230.12],"6-40-50":[9.92,1016.65],"6-40-51":[-12.01,1141.97],"6-40-52":[-177.35,907.17],"6-40-53":[-969.23,971.12],"6-40-54":[-709.63,1167.51],"6-40-55":[-1316.7,2130.8],"6-40-56":[-1953,2245.41],"6-40-57":[-2399.4,2040.57],"6-40-58":[-2406.73,2090.43],"6-40-59":[-957.04,1300.57],"6-40-60":[-820.36,1398.5],"6-40-61":[-1488.61,1801.27],"6-40-62":[-2390.21,2344.27],"6-40-63":[-4215.39,2745.47],"6-41-0":[-375.14,788.95],"6-41-1":[-626.85,1980.15],"5-20-0":[-1903.37,2049.21],"6-41-2":[-2305.3,951.78],"6-41-3":[-1106.51,1019.58],"5-20-1":[-2397.96,1837.18],"6-41-4":[-897.08,1639.31],"6-41-5":[-1223.78,1899.16],"5-20-2":[-1317.34,1902.88],"6-41-6":[-1257.9,2841.54],"6-41-7":[-1237.22,3005.49],"5-20-3":[-1257.9,3005.49],"6-41-8":[-1400.73,2174.82],"6-41-9":[-4875.59,2640.33],"5-20-4":[-4875.59,2640.33],"6-41-10":[-4863.8,1491.48],"6-41-11":[-4557.28,1587.28],"5-20-5":[-5559.15,1587.28],"6-41-12":[-4321.84,864.36],"6-41-13":[-562.25,1005.83],"5-20-6":[-4321.84,1031.68],"6-41-14":[-181.17,588],"6-41-15":[-141.59,347.02],"5-20-7":[-181.17,1255.33],"6-41-16":[-162.09,265.73],"6-41-17":[-160.53,167.98],"5-20-8":[-162.09,1612.57],"6-41-18":[-71.61,1130.86],"6-41-19":[-78.01,364.32],"5-20-9":[-88.7,1130.86],"6-41-20":[-85.81,1807.61],"6-41-21":[-94.07,1879.15],"5-20-10":[-98.06,4454.06],"6-41-22":[-102.75,1192.45],"6-41-23":[-105.57,2546.24],"5-20-11":[-105.57,6321.87],"6-41-24":[-129.54,4079.61],"6-41-25":[-129.48,4284.46],"5-20-12":[-141.12,5950.05],"6-41-26":[-90.4,875.94],"6-41-27":[-83.95,666.67],"5-20-13":[-90.4,5257.92],"6-41-28":[-92.41,2565.59],"6-41-29":[-92.52,2449.21],"5-20-14":[-92.52,2718.19],"6-41-30":[4.52,2659.72],"6-41-31":[-1083.88,2129.57],"5-20-15":[-1083.88,2826.62],"6-41-32":[-35.4,2040.48],"6-41-33":[-58.32,2642.7],"5-20-16":[-58.32,2809.61],"6-41-34":[-21.58,2230.21],"6-41-35":[-1469.01,2467.61],"5-20-17":[-1931.5,2634.17],"6-41-36":[-4732.86,684.67],"6-41-37":[-4486.55,910.63],"5-20-18":[-5900.26,5469.94],"6-41-38":[-7810.98,4327.46],"6-41-39":[-8307.1,4098.61],"5-20-19":[-8765.31,6050.05],"6-41-40":[-6255.3,2622.25],"6-41-41":[-6370.08,1259.46],"5-20-20":[-6370.08,6388.87],"6-41-42":[-6091.27,1956.16],"6-41-43":[-5359.24,1847.62],"5-20-21":[-6469.31,4549.07],"6-41-44":[-5477.52,370.32],"6-41-45":[-5478.14,1242.87],"5-20-22":[-5499.84,1242.87],"6-41-46":[-5151.26,172.48],"6-41-47":[-3392.7,258.78],"5-20-23":[-5151.26,1675.56],"6-41-48":[-137.1,330.93],"6-41-49":[-460.55,546.49],"5-20-24":[-460.55,1230.12],"6-41-50":[10.24,988.83],"6-41-51":[-147.13,987.97],"5-20-25":[-147.13,1141.97],"6-41-52":[-427.03,1511.26],"6-41-53":[-750.68,1408.43],"5-20-26":[-969.23,1511.26],"6-41-54":[-589.21,2255.29],"6-41-55":[-772.02,2099.32],"5-20-27":[-1316.7,2255.29],"6-41-56":[-2123.37,2890.49],"6-41-57":[-2314.58,2528.76],"5-20-28":[-2399.4,2890.49],"6-41-58":[-2174.37,1987.4],"6-41-59":[-704.38,1390.38],"5-20-29":[-2406.73,2090.43],"6-41-60":[-1053.08,1209.84],"6-41-61":[-1736.3,967.78],"5-20-30":[-1736.3,1801.27],"6-41-62":[-2104.34,2332.43],"6-41-63":[-4222.3,2745.47],"5-20-31":[-4222.3,2745.47],"6-42-0":[-453.13,803.72],"6-42-1":[-1912.63,1447.17],"6-42-2":[-2173.89,636.09],"6-42-3":[-1352.22,1412.39],"6-42-4":[-879.27,1850.85],"6-42-5":[-1795.07,1425.68],"6-42-6":[-1103.4,1254.23],"6-42-7":[-613.53,109.47],"6-42-8":[-1048.58,2037.53],"6-42-9":[-4655.1,2218.59],"6-42-10":[-5197,19.12],"6-42-11":[-4779.19,1027.48],"6-42-12":[-4818.14,846.11],"6-42-13":[-1704.28,704.1],"6-42-14":[-1339.29,560.68],"6-42-15":[-2117.74,626.18],"6-42-16":[-2434.12,12.82],"6-42-17":[-97.7,9.64],"6-42-18":[-63.96,727.01],"6-42-19":[-70.71,146.41],"6-42-20":[-79.19,153.45],"6-42-21":[-92.99,121.66],"6-42-22":[-102.26,227.97],"6-42-23":[-104.51,246.54],"6-42-24":[-109.89,620.33],"6-42-25":[-127.72,1291.8],"6-42-26":[-127.8,1415.28],"6-42-27":[-108.65,1174.77],"6-42-28":[-95.38,906.03],"6-42-29":[-54.23,2236.77],"6-42-30":[-10.46,2551.06],"6-42-31":[-8.06,1982.48],"6-42-32":[-47.66,1810.47],"6-42-33":[-73.31,2410.43],"6-42-34":[-221.29,2194.7],"6-42-35":[-2087.24,851],"6-42-36":[-3955.53,1044.76],"6-42-37":[-6015.39,1316.28],"6-42-38":[-7426.7,1325.79],"6-42-39":[-6458.04,644.34],"6-42-40":[-6448.9,249.8],"6-42-41":[-7561.67,233.97],"6-42-42":[-7274.89,142.11],"6-42-43":[-6028.69,159.46],"6-42-44":[-5656.3,171.01],"6-42-45":[-5488.93,773.01],"6-42-46":[-5388.86,27.54],"6-42-47":[-4682.72,24.63],"6-42-48":[-546.32,617.18],"6-42-49":[-1069.25,540.69],"6-42-50":[-212.17,710.18],"6-42-51":[-710.71,831.11],"6-42-52":[-2466.84,974.47],"6-42-53":[-2642.04,41.77],"6-42-54":[-2230.11,2109.78],"6-42-55":[-1447.8,2069.8],"6-42-56":[-1941.74,269.27],"6-42-57":[-1984.8,1250.11],"6-42-58":[-1167.28,1211.47],"6-42-59":[-877.97,1082.45],"6-42-60":[-1133.93,1364.36],"6-42-61":[-1831.57,889.65],"6-42-62":[-2119.05,2326.44],"6-42-63":[-4223.29,2745.48],"6-43-0":[-435.12,768.15],"6-43-1":[-1633.64,761.78],"5-21-0":[-1912.63,1447.17],"6-43-2":[-1955.14,1359.43],"6-43-3":[-1586.09,1941.41],"5-21-1":[-2173.89,1941.41],"4-10-0":[-2397.96,2049.21],"6-43-4":[-843.7,2238.22],"6-43-5":[-674.96,1021.33],"5-21-2":[-1795.07,2238.22],"6-43-6":[-944.44,56.07],"6-43-7":[-951.56,55.35],"5-21-3":[-1103.4,1254.23],"4-10-1":[-1795.07,3005.49],"6-43-8":[-650.15,49.44],"6-43-9":[-2315.61,1677.31],"5-21-4":[-4655.1,2218.59],"6-43-10":[-5276.84,55.02],"6-43-11":[-5621.9,23.83],"5-21-5":[-5621.9,1027.48],"4-10-2":[-5621.9,2640.33],"6-43-12":[-5554.84,1193.16],"6-43-13":[-2774.99,895.93],"5-21-6":[-5554.84,1193.16],"6-43-14":[-4993.64,804.73],"6-43-15":[-5579.67,566.65],"5-21-7":[-5579.67,804.73],"4-10-3":[-5579.67,1255.33],"6-43-16":[-5390.46,-4.42],"6-43-17":[-4092.11,-13.27],"5-21-8":[-5390.46,12.82],"6-43-18":[-95.28,432.02],"6-43-19":[-63.3,214.23],"5-21-9":[-95.28,727.01],"4-10-4":[-5390.46,1612.57],"6-43-20":[-73.49,367.29],"6-43-21":[-87.06,352.61],"5-21-10":[-92.99,367.29],"6-43-22":[-94.59,661.37],"6-43-23":[-97.23,692.98],"5-21-11":[-104.51,692.98],"4-10-5":[-105.57,6321.87],"6-43-24":[-97.15,809.32],"6-43-25":[-102.43,1167.79],"5-21-12":[-127.72,1291.8],"6-43-26":[-113.66,921.21],"6-43-27":[-108.06,686.04],"5-21-13":[-127.8,1415.28],"4-10-6":[-141.12,5950.05],"6-43-28":[-95.84,602.42],"6-43-29":[-77.21,647.02],"5-21-14":[-95.84,2236.77],"6-43-30":[-149.21,1207.52],"6-43-31":[-18.35,1109.8],"5-21-15":[-149.21,2551.06],"4-10-7":[-1083.88,2826.62],"6-43-32":[-59.96,1027.78],"6-43-33":[-57.01,1121.51],"5-21-16":[-73.31,2410.43],"6-43-34":[-2930.18,657.03],"6-43-35":[-4527.52,621.44],"5-21-17":[-4527.52,2194.7],"4-10-8":[-4527.52,2809.61],"6-43-36":[-5297.58,689.04],"6-43-37":[-6039.3,949.21],"5-21-18":[-6039.3,1316.28],"6-43-38":[-6230.06,1245.78],"6-43-39":[-7317.05,856.34],"5-21-19":[-7426.7,1325.79],"4-10-9":[-8765.31,6050.05],"6-43-40":[-7777.47,738.99],"6-43-41":[-8245.68,703.38],"5-21-20":[-8245.68,738.99],"6-43-42":[-6689.99,362.62],"6-43-43":[-6202.56,395.29],"5-21-21":[-7274.89,395.29],"4-10-10":[-8245.68,6388.87],"6-43-44":[-6937.73,228.24],"6-43-45":[-5692.36,445.18],"5-21-22":[-6937.73,773.01],"6-43-46":[-5434.99,26.5],"6-43-47":[-4811.38,19.67],"5-21-23":[-5434.99,27.54],"4-10-11":[-6937.73,1675.56],"6-43-48":[-516.46,521.4],"6-43-49":[-513.94,786.22],"5-21-24":[-1069.25,786.22],"6-43-50":[-303.89,858.37],"6-43-51":[-2693.23,1148.31],"5-21-25":[-2693.23,1148.31],"4-10-12":[-2693.23,1230.12],"6-43-52":[-3342.42,41.03],"6-43-53":[-3212.72,44.21],"5-21-26":[-3342.42,974.47],"6-43-54":[-2665.55,1728.16],"6-43-55":[-1317.01,37.01],"5-21-27":[-2665.55,2109.78],"4-10-13":[-3342.42,2255.29],"6-43-56":[-1257.74,22.37],"6-43-57":[-970.28,259.92],"5-21-28":[-1984.8,1250.11],"6-43-58":[-1268.2,1118.73],"6-43-59":[-649.94,512.61],"5-21-29":[-1268.2,1211.47],"4-10-14":[-2406.73,2890.49],"6-43-60":[-599.83,1177.05],"6-43-61":[-1811.25,1371.37],"5-21-30":[-1831.57,1371.37],"6-43-62":[-2242.68,2317.26],"6-43-63":[-4215.39,2745.48],"5-21-31":[-4223.29,2745.48],"4-10-15":[-4223.29,2745.48],"6-44-0":[-401.99,533.78],"6-44-1":[-1084.56,771.47],"6-44-2":[-1764.29,1711.26],"6-44-3":[-1608.19,2089.38],"6-44-4":[-815.35,2319.04],"6-44-5":[-552.8,1708.39],"6-44-6":[-2155.62,1880.96],"6-44-7":[-2812.72,1854.07],"6-44-8":[-2870.71,1029.06],"6-44-9":[-2580.17,758.51],"6-44-10":[-4212.93,1786.88],"6-44-11":[-5974.95,35.64],"6-44-12":[-5589.14,148.72],"6-44-13":[-3396.26,486.61],"6-44-14":[-6359.32,577.05],"6-44-15":[-6549.98,408.54],"6-44-16":[-5888.74,8.57],"6-44-17":[-5613.75,-6.77],"6-44-18":[-4438.41,0.15],"6-44-19":[-1095.24,485.4],"6-44-20":[-431.29,464.32],"6-44-21":[-77.89,558.14],"6-44-22":[-85.04,878.92],"6-44-23":[-89.27,777.81],"6-44-24":[-91.01,742.52],"6-44-25":[-96.71,869.35],"6-44-26":[-98.96,900.05],"6-44-27":[-95.93,596.31],"6-44-28":[-95.18,733.32],"6-44-29":[-81.6,685.36],"6-44-30":[-61.24,1030.82],"6-44-31":[-99.31,889.3],"6-44-32":[-68.02,823.15],"6-44-33":[-45.24,1008.83],"6-44-34":[-2993.36,694.41],"6-44-35":[-4943.53,753.33],"6-44-36":[-5604.1,612.29],"6-44-37":[-5946.15,914.71],"6-44-38":[-6280.97,880.42],"6-44-39":[-7026.06,752.75],"6-44-40":[-7602.91,799.57],"6-44-41":[-6892.43,899.62],"6-44-42":[-6396.59,584.15],"6-44-43":[-5958.12,482.27],"6-44-44":[-5830.6,526.4],"6-44-45":[-5636.92,25.03],"6-44-46":[-5566.01,22.2],"6-44-47":[-5012.17,4.24],"6-44-48":[-1354.96,372.42],"6-44-49":[-617.47,514.04],"6-44-50":[-571.38,465.61],"6-44-51":[-3493,125.75],"6-44-52":[-3733.16,41.14],"6-44-53":[-3548.01,1523.88],"6-44-54":[-2867.09,578.59],"6-44-55":[-915.51,1108.35],"6-44-56":[-963.76,1813.61],"6-44-57":[-968.04,1896.59],"6-44-58":[-1231.82,1033.64],"6-44-59":[-144.3,780.38],"6-44-60":[-408.65,1172.05],"6-44-61":[-1797.59,1540.95],"6-44-62":[-2498.95,2298.91],"6-44-63":[-4215.39,2745.48],"6-45-0":[-514.14,579.03],"6-45-1":[-1079.97,716.42],"5-22-0":[-1084.56,771.47],"6-45-2":[-1682.8,1919.3],"6-45-3":[-1622.24,2185.38],"5-22-1":[-1764.29,2185.38],"6-45-4":[-758.02,2333.41],"6-45-5":[-564,2344.97],"5-22-2":[-815.35,2344.97],"6-45-6":[-3106.06,2399.4],"6-45-7":[-3469.32,1842.92],"5-22-3":[-3469.32,2399.4],"6-45-8":[-3594.96,2229.6],"6-45-9":[-3416.97,1280.25],"5-22-4":[-3594.96,2229.6],"6-45-10":[-5404.29,59.8],"6-45-11":[-5903.43,52.29],"5-22-5":[-5974.95,1786.88],"6-45-12":[-5584.37,48.25],"6-45-13":[-3699.42,43.66],"5-22-6":[-5589.14,486.61],"6-45-14":[-6475.73,301],"6-45-15":[-6553.82,337.49],"5-22-7":[-6553.82,577.05],"6-45-16":[-6157.36,30.39],"6-45-17":[-5825.15,6.02],"5-22-8":[-6157.36,30.39],"6-45-18":[-5323.59,-1.97],"6-45-19":[-4325.6,21.81],"5-22-9":[-5323.59,485.4],"6-45-20":[-1151.79,503.24],"6-45-21":[-62.29,1073.19],"5-22-10":[-1151.79,1073.19],"6-45-22":[-68.68,1362.48],"6-45-23":[-75.93,1318.62],"5-22-11":[-89.27,1362.48],"6-45-24":[-80.15,605.26],"6-45-25":[-85.3,1036.98],"5-22-12":[-96.71,1036.98],"6-45-26":[-89.68,1009.26],"6-45-27":[-90.85,499.44],"5-22-13":[-98.96,1009.26],"6-45-28":[-90.85,721.91],"6-45-29":[-87.64,772.95],"5-22-14":[-95.18,772.95],"6-45-30":[-71.92,795.54],"6-45-31":[-95.64,654.41],"5-22-15":[-99.31,1030.82],"6-45-32":[-74.95,667.42],"6-45-33":[-2803.2,777.54],"5-22-16":[-2803.2,1008.83],"6-45-34":[-4763.78,806.95],"6-45-35":[-5170.62,772.15],"5-22-17":[-5170.62,806.95],"6-45-36":[-5575.31,508.2],"6-45-37":[-6275.55,1020.26],"5-22-18":[-6275.55,1020.26],"6-45-38":[-6065.98,1043.99],"6-45-39":[-6587.67,630.24],"5-22-19":[-7026.06,1043.99],"6-45-40":[-6536.49,1344.63],"6-45-41":[-6510.29,1399.29],"5-22-20":[-7602.91,1399.29],"6-45-42":[-6285.66,1093.19],"6-45-43":[-6352.74,529.24],"5-22-21":[-6396.59,1093.19],"6-45-44":[-6945.4,38.77],"6-45-45":[-5841.63,9.67],"5-22-22":[-6945.4,526.4],"6-45-46":[-5569.08,2.28],"6-45-47":[-4979.43,-0.34],"5-22-23":[-5569.08,22.2],"6-45-48":[-281.94,314.96],"6-45-49":[-741.17,281],"5-22-24":[-1354.96,514.04],"6-45-50":[-3288.47,17.57],"6-45-51":[-3678.29,35.37],"5-22-25":[-3678.29,465.61],"6-45-52":[-3705.27,40.41],"6-45-53":[-3555.83,47.29],"5-22-26":[-3733.16,1523.88],"6-45-54":[-2954.33,1497.68],"6-45-55":[-561.55,2058.1],"5-22-27":[-2954.33,2058.1],"6-45-56":[-871.87,1991.65],"6-45-57":[-1444.63,2162.43],"5-22-28":[-1444.63,2162.43],"6-45-58":[-213.42,734.96],"6-45-59":[-176.36,717.06],"5-22-29":[-1231.82,1033.64],"6-45-60":[-307.69,1258.22],"6-45-61":[-2043.57,1979.94],"5-22-30":[-2043.57,1979.94],"6-45-62":[-2799.05,2275.47],"6-45-63":[-4215.39,2745.48],"5-22-31":[-4215.39,2745.48],"6-46-0":[-600.57,253.52],"6-46-1":[-1161.49,110.47],"6-46-2":[-1608.38,1909.74],"6-46-3":[-1608.38,2285.51],"6-46-4":[-660.02,2457.14],"6-46-5":[-587.75,2475.02],"6-46-6":[-3468.61,2542.84],"6-46-7":[-3842.71,1831.68],"6-46-8":[-4135.6,2027.72],"6-46-9":[-4164.77,2175.1],"6-46-10":[-5695.74,1494.43],"6-46-11":[-5636.52,68.28],"6-46-12":[-5418.75,63.25],"6-46-13":[-4699.06,55.81],"6-46-14":[-6555.82,52.22],"6-46-15":[-6273.74,53.92],"6-46-16":[-5934.72,41.06],"6-46-17":[-5945.64,21.16],"6-46-18":[-5476.11,10.12],"6-46-19":[-5080.14,1.96],"6-46-20":[-3726.88,-2.52],"6-46-21":[-2797.96,1768.73],"6-46-22":[-304.2,1772.18],"6-46-23":[-114.49,1703.39],"6-46-24":[-68.86,1058.15],"6-46-25":[-75.75,1031.41],"6-46-26":[-82.25,1437.44],"6-46-27":[-86.6,1104.08],"6-46-28":[-87.21,724.61],"6-46-29":[-85.59,850.74],"6-46-30":[-76.08,432.39],"6-46-31":[-188.32,61.63],"6-46-32":[-465.17,69.74],"6-46-33":[-3641.86,521.39],"6-46-34":[-5009.6,882.74],"6-46-35":[-5227.39,737.91],"6-46-36":[-5366.84,1154.07],"6-46-37":[-6065.49,1475.44],"6-46-38":[-5796.67,1034.42],"6-46-39":[-5802.83,1075.16],"6-46-40":[-6118.27,1855.39],"6-46-41":[-6014.32,1825.17],"6-46-42":[-5802.8,1827.75],"6-46-43":[-6312.21,13.98],"6-46-44":[-5836.48,10.93],"6-46-45":[-5773.27,-0.7],"6-46-46":[-5581.92,-1.87],"6-46-47":[-3927.84,-2.14],"6-46-48":[-3192.19,-2.22],"6-46-49":[-2704.45,9.5],"6-46-50":[-4015.33,14.82],"6-46-51":[-4109.31,36.85],"6-46-52":[-3815.7,40.45],"6-46-53":[-3570.03,1495.91],"6-46-54":[-1414.56,1745.13],"6-46-55":[-499.08,1430.54],"6-46-56":[-1211.42,796],"6-46-57":[-792.03,1400.19],"6-46-58":[-20.54,682.53],"6-46-59":[-312.54,445.25],"6-46-60":[-852.59,814.06],"6-46-61":[-2162.89,1965.25],"6-46-62":[-3090.6,2268.09],"6-46-63":[-4215.39,2745.48],"6-47-0":[-904.59,189.53],"6-47-1":[-1300.87,465.89],"5-23-0":[-1300.87,465.89],"6-47-2":[-1956.75,700.91],"6-47-3":[-1479.71,2373.94],"5-23-1":[-1956.75,2373.94],"4-11-0":[-1956.75,2373.94],"6-47-4":[-904.62,2625.24],"6-47-5":[-979.12,2882.05],"5-23-2":[-979.12,2882.05],"6-47-6":[-3656.18,2840.8],"6-47-7":[-4133.21,2476.32],"5-23-3":[-4133.21,2840.8],"4-11-1":[-4133.21,2882.05],"3-5-0":[-4133.21,3005.49],"6-47-8":[-4535.63,2769.8],"6-47-9":[-4542.9,2769.95],"5-23-4":[-4542.9,2769.95],"6-47-10":[-5649.71,2452.69],"6-47-11":[-4390.16,81.26],"5-23-5":[-5695.74,2452.69],"4-11-2":[-5974.95,2769.95],"6-47-12":[-5320.13,78.26],"6-47-13":[-3965.58,72.82],"5-23-6":[-5418.75,78.26],"6-47-14":[-6582.96,69.47],"6-47-15":[-6227.22,70.1],"5-23-7":[-6582.96,70.1],"4-11-3":[-6582.96,577.05],"3-5-1":[-6582.96,2769.95],"2-2-0":[-6582.96,4704.79],"6-47-16":[-5550.89,55.71],"6-47-17":[-5717.71,40.64],"5-23-8":[-5945.64,55.71],"6-47-18":[-5463.7,29.54],"6-47-19":[-5150.83,22.06],"5-23-9":[-5476.11,29.54],"4-11-4":[-6157.36,485.4],"6-47-20":[-4302.71,15.19],"6-47-21":[-3829.03,4.78],"5-23-10":[-4302.71,1768.73],"6-47-22":[-3450.87,-2.17],"6-47-23":[-169.03,2244.32],"5-23-11":[-3450.87,2244.32],"4-11-5":[-4302.71,2244.32],"3-5-2":[-6157.36,6321.87],"6-47-24":[-50.68,2250.32],"6-47-25":[-59.08,1259.93],"5-23-12":[-75.75,2250.32],"6-47-26":[-65.46,1510.11],"6-47-27":[-76.9,1617.75],"5-23-13":[-86.6,1617.75],"4-11-6":[-98.96,2250.32],"6-47-28":[-76.9,862.81],"6-47-29":[-77.77,653.06],"5-23-14":[-87.21,862.81],"6-47-30":[-72.57,423.19],"6-47-31":[-135.46,169.45],"5-23-15":[-188.32,432.39],"4-11-7":[-188.32,1030.82],"3-5-3":[-1083.88,5950.05],"2-2-1":[-8983.51,6823.9],"6-47-32":[-4004.8,198.92],"6-47-33":[-4253.5,442.32],"5-23-16":[-4253.5,521.39],"6-47-34":[-4745.48,663.07],"6-47-35":[-5210.95,868.81],"5-23-17":[-5227.39,882.74],"4-11-8":[-5227.39,1008.83],"6-47-36":[-5300,1657.87],"6-47-37":[-5463.79,1576.13],"5-23-18":[-6065.49,1657.87],"6-47-38":[-4906.81,1269.93],"6-47-39":[-5194.04,2353.32],"5-23-19":[-5802.83,2353.32],"4-11-9":[-7026.06,2353.32],"3-5-4":[-8765.31,6050.05],"6-47-40":[-6046.99,2413.32],"6-47-41":[-5047.25,2.39],"5-23-20":[-6118.27,2413.32],"6-47-42":[-5501.03,2.77],"6-47-43":[-5758.32,-2.9],"5-23-21":[-6312.21,1827.75],"4-11-10":[-7602.91,2413.32],"6-47-44":[-6089.22,-3.31],"6-47-45":[-5767.68,-4],"5-23-22":[-6089.22,10.93],"6-47-46":[-5390.06,-3],"6-47-47":[-5265.74,-2.76],"5-23-23":[-5581.92,-1.87],"4-11-11":[-6945.4,526.4],"3-5-5":[-8245.68,6388.87],"2-2-2":[-8765.31,6969.13],"6-47-48":[-4565.83,-2.42],"6-47-49":[-4375.17,12.36],"5-23-24":[-4565.83,12.36],"6-47-50":[-4451.86,19.2],"6-47-51":[-4093.83,36.67],"5-23-25":[-4451.86,36.85],"4-11-12":[-4565.83,514.04],"6-47-52":[-3679.12,42.39],"6-47-53":[-3118.44,2073.1],"5-23-26":[-3815.7,2073.1],"6-47-54":[14.52,1814.36],"6-47-55":[-56.43,1185.43],"5-23-27":[-1414.56,1814.36],"4-11-13":[-3815.7,2073.1],"3-5-6":[-4565.83,2255.29],"6-47-56":[-821.49,371.23],"6-47-57":[-206.04,937.06],"5-23-28":[-1211.42,1400.19],"6-47-58":[-257.19,355.03],"6-47-59":[-408.52,457.63],"5-23-29":[-408.52,682.53],"4-11-14":[-1444.63,2162.43],"6-47-60":[-393.65,962.23],"6-47-61":[-2075.98,1373.29],"5-23-30":[-2162.89,1965.25],"6-47-62":[-3803.43,2263.16],"6-47-63":[-4215.39,2745.98],"5-23-31":[-4215.39,2745.98],"4-11-15":[-4215.39,2745.98],"3-5-7":[-4223.29,2890.49],"2-2-3":[-4565.83,4721.94],"6-48-0":[-1002.56,89.53],"6-48-1":[-1625.52,784.32],"6-48-2":[-1856.43,949.4],"6-48-3":[-1397.31,2469.75],"6-48-4":[-934.43,2812.59],"6-48-5":[-1655.77,3024.06],"6-48-6":[-3835.14,3047.68],"6-48-7":[-4422.64,2826.07],"6-48-8":[-4694.59,2785.17],"6-48-9":[-4814.83,2833.9],"6-48-10":[-5546.05,2803.26],"6-48-11":[-4563.38,92.57],"6-48-12":[-5098.13,90.15],"6-48-13":[-3690.49,85.22],"6-48-14":[-6580.29,78.86],"6-48-15":[-6151.22,72.39],"6-48-16":[-6074.8,65.89],"6-48-17":[-5427.71,54.55],"6-48-18":[-6129.36,45.38],"6-48-19":[-5109.91,39.31],"6-48-20":[-4602.01,32.2],"6-48-21":[-4278.58,23.36],"6-48-22":[-3719.52,10.3],"6-48-23":[-2324.46,1973.99],"6-48-24":[-36.66,2699.24],"6-48-25":[-48.75,1971.8],"6-48-26":[-52.31,1656.77],"6-48-27":[-60.66,1603.49],"6-48-28":[-65.09,1259.07],"6-48-29":[-65.14,586.2],"6-48-30":[-85.29,344.01],"6-48-31":[-3865.9,57.26],"6-48-32":[-4518.8,80.25],"6-48-33":[-4888.4,366.28],"6-48-34":[-5293.87,588.21],"6-48-35":[-5433.96,1298.57],"6-48-36":[-5101.32,1756.49],"6-48-37":[-5420.55,1788.77],"6-48-38":[-5745.06,2047.81],"6-48-39":[-5639.86,2789.25],"6-48-40":[-6236.13,2060.99],"6-48-41":[-4727.7,-6.95],"6-48-42":[-5242.68,-7.27],"6-48-43":[-5266.3,-5.74],"6-48-44":[-5333.57,-5.85],"6-48-45":[-5726.45,-5.73],"6-48-46":[-5196.72,-5.21],"6-48-47":[-5068.54,-3.49],"6-48-48":[-4815.61,-1.35],"6-48-49":[-4598.65,16.97],"6-48-50":[-4840.96,17.53],"6-48-51":[-3842.65,35.69],"6-48-52":[-4250.99,41.28],"6-48-53":[-2309.22,2448.9],"6-48-54":[-833.91,2176.59],"6-48-55":[-163.3,1316.63],"6-48-56":[-625.27,364.42],"6-48-57":[-429.12,233.82],"6-48-58":[-370.87,131.2],"6-48-59":[-405.36,213.73],"6-48-60":[-403.85,1124.93],"6-48-61":[-2027.94,1548.87],"6-48-62":[-3799.43,2265.71],"6-48-63":[-4215.39,2746.48],"6-49-0":[-884.4,67.53],"6-49-1":[-1576.67,792.41],"5-24-0":[-1625.52,792.41],"6-49-2":[-968.6,1459.96],"6-49-3":[-1449.32,2462.17],"5-24-1":[-1856.43,2469.75],"6-49-4":[-1271.56,2812.59],"6-49-5":[-2510.28,3141.21],"5-24-2":[-2510.28,3141.21],"6-49-6":[-4105.65,3182.09],"6-49-7":[-4433.76,3042.62],"5-24-3":[-4433.76,3182.09],"6-49-8":[-4797.43,2652.87],"6-49-9":[-5015.21,2012.55],"5-24-4":[-5015.21,2833.9],"6-49-10":[-6312.12,334.77],"6-49-11":[-4263.69,101.28],"5-24-5":[-6312.12,2803.26],"6-49-12":[-4042.22,102],"6-49-13":[-4218.24,98.24],"5-24-6":[-5098.13,102],"6-49-14":[-6403.93,93.09],"6-49-15":[-6267.83,86.06],"5-24-7":[-6580.29,93.09],"6-49-16":[-6293.49,81.48],"6-49-17":[-5597.43,73.88],"5-24-8":[-6293.49,81.48],"6-49-18":[-5448.01,66.2],"6-49-19":[-5367.78,60.53],"5-24-9":[-6129.36,66.2],"6-49-20":[-4884.47,55.5],"6-49-21":[-4997.91,39.04],"5-24-10":[-4997.91,55.5],"6-49-22":[-4463.39,22.35],"6-49-23":[-3796.85,590.73],"5-24-11":[-4463.39,1973.99],"6-49-24":[-2425.07,2757.34],"6-49-25":[-305.26,1443.38],"5-24-12":[-2425.07,2757.34],"6-49-26":[-42.33,1372.15],"6-49-27":[-43.85,1922.31],"5-24-13":[-60.66,1922.31],"6-49-28":[-45.31,1258.47],"6-49-29":[-49.21,961.21],"5-24-14":[-65.14,1259.07],"6-49-30":[-109.15,1068.98],"6-49-31":[-4222.06,110.24],"5-24-15":[-4222.06,1068.98],"6-49-32":[-4682.57,79.72],"6-49-33":[-4896.78,1125.05],"5-24-16":[-4896.78,1125.05],"6-49-34":[-5688.41,966.21],"6-49-35":[-5559.66,1272.47],"5-24-17":[-5688.41,1298.57],"6-49-36":[-5912.92,2017.31],"6-49-37":[-5804.87,1423.16],"5-24-18":[-5912.92,2017.31],"6-49-38":[-6106.25,1567.33],"6-49-39":[-6381.23,2863.35],"5-24-19":[-6381.23,2863.35],"6-49-40":[-6341.73,694.74],"6-49-41":[-5511.51,-9.82],"5-24-20":[-6341.73,2060.99],"6-49-42":[-4982.01,-7.66],"6-49-43":[-5465.76,-7.18],"5-24-21":[-5465.76,-5.74],"6-49-44":[-4910.54,-6.72],"6-49-45":[-5277.97,-6.41],"5-24-22":[-5726.45,-5.73],"6-49-46":[-5311.51,-6.33],"6-49-47":[-5095.47,-4.79],"5-24-23":[-5311.51,-3.49],"6-49-48":[-4913.48,-0.71],"6-49-49":[-4767.83,15],"5-24-24":[-4913.48,16.97],"6-49-50":[-5488.9,15.14],"6-49-51":[-3939.76,37.34],"5-24-25":[-5488.9,37.34],"6-49-52":[-3572.36,40.03],"6-49-53":[-3055.63,450.7],"5-24-26":[-4250.99,2448.9],"6-49-54":[-2100.15,1967.18],"6-49-55":[-830.24,1959.77],"5-24-27":[-2100.15,2176.59],"6-49-56":[-499.68,462.22],"6-49-57":[-211.12,297.17],"5-24-28":[-625.27,462.22],"6-49-58":[-274.87,210.95],"6-49-59":[-342.73,50.33],"5-24-29":[-405.36,213.73],"6-49-60":[-160.19,1081.6],"6-49-61":[-2028.98,1679.35],"5-24-30":[-2028.98,1679.35],"6-49-62":[-3790.08,2265.71],"6-49-63":[-4219.2,2746.48],"5-24-31":[-4219.2,2746.48],"6-50-0":[-934.9,69.52],"6-50-1":[-1469.25,976.22],"6-50-2":[-737.71,1457.67],"6-50-3":[-1618.91,2355],"6-50-4":[-1269.34,2629.12],"6-50-5":[-3058.83,3200.74],"6-50-6":[-4224.36,3253.39],"6-50-7":[-4528.57,3209.33],"6-50-8":[-4867.96,3108.37],"6-50-9":[-5389.9,106.81],"6-50-10":[-5404.37,105.78],"6-50-11":[-3936.37,111.91],"6-50-12":[-3975.13,2633.15],"6-50-13":[-5213.59,108.32],"6-50-14":[-6122.93,103.27],"6-50-15":[-6062.21,96.8],"6-50-16":[-5451.29,93],"6-50-17":[-5793.05,87.83],"6-50-18":[-5441.17,80.4],"6-50-19":[-5078.03,76.44],"6-50-20":[-4896.54,68.85],"6-50-21":[-5006.6,47.85],"6-50-22":[-4983.72,31.01],"6-50-23":[-4241.18,12.45],"6-50-24":[-4270.18,2.19],"6-50-25":[-3977.54,109.32],"6-50-26":[-4394.4,914.15],"6-50-27":[-4327.88,559.81],"6-50-28":[-2118.33,1063.79],"6-50-29":[-34.54,1141.75],"6-50-30":[-3552.2,1000.51],"6-50-31":[-4554.15,-8.32],"6-50-32":[-5281.5,-10.92],"6-50-33":[-4950.78,1106.52],"6-50-34":[-6051.37,1190.32],"6-50-35":[-5728.2,1083.8],"6-50-36":[-6319.68,626.82],"6-50-37":[-6294.95,986.18],"6-50-38":[-7008.06,124.34],"6-50-39":[-6739.38,-5.86],"6-50-40":[-6851.27,-8.26],"6-50-41":[-5929.45,-6.03],"6-50-42":[-5432.53,-1.95],"6-50-43":[-4629.98,-2.36],"6-50-44":[-4319.88,-4.64],"6-50-45":[-5375.44,-4.06],"6-50-46":[-5352.82,-3.83],"6-50-47":[-4886.28,-3.1],"6-50-48":[-4927.65,0.55],"6-50-49":[-4878.3,12.98],"6-50-50":[-4465.96,23.35],"6-50-51":[-3742.67,2738.7],"6-50-52":[-3572.36,41.64],"6-50-53":[-3233.45,44],"6-50-54":[-2680.33,41.06],"6-50-55":[-1017.21,3258.28],"6-50-56":[-385.83,2270.17],"6-50-57":[-210.97,833.52],"6-50-58":[-293.35,735.1],"6-50-59":[-224.42,580.16],"6-50-60":[-151.03,1003.54],"6-50-61":[-1755.39,1715.15],"6-50-62":[-3795.59,2262.46],"6-50-63":[-4236.22,2746.48],"6-51-0":[-907.39,120.52],"6-51-1":[-1308.24,740.14],"5-25-0":[-1469.25,976.22],"6-51-2":[-1060.28,1225.55],"6-51-3":[-1586.02,2251.74],"5-25-1":[-1618.91,2355],"4-12-0":[-1856.43,2469.75],"6-51-4":[-1120.27,2558.11],"6-51-5":[-3440.48,3116.18],"5-25-2":[-3440.48,3200.74],"6-51-6":[-4327.81,3190.72],"6-51-7":[-4613.28,3318.44],"5-25-3":[-4613.28,3318.44],"4-12-1":[-4613.28,3318.44],"6-51-8":[-4928.05,2952.11],"6-51-9":[-5317.04,111.55],"5-25-4":[-5389.9,3108.37],"6-51-10":[-5773.22,118.01],"6-51-11":[-3983.49,122.71],"5-25-5":[-5773.22,122.71],"4-12-2":[-6312.12,3108.37],"6-51-12":[-4736.44,2776.21],"6-51-13":[-5062.61,118.71],"5-25-6":[-5213.59,2776.21],"6-51-14":[-5842.32,113.3],"6-51-15":[-5917.21,108.7],"5-25-7":[-6122.93,113.3],"4-12-3":[-6580.29,2776.21],"6-51-16":[-5510.34,107.59],"6-51-17":[-5386.95,102.26],"5-25-8":[-5793.05,107.59],"6-51-18":[-5246.88,98.78],"6-51-19":[-5023.93,94.27],"5-25-9":[-5441.17,98.78],"4-12-4":[-6293.49,107.59],"6-51-20":[-4702.21,77.17],"6-51-21":[-4520.84,56.25],"5-25-10":[-5006.6,77.17],"6-51-22":[-4931.19,41.92],"6-51-23":[-5003.58,22.97],"5-25-11":[-5003.58,41.92],"4-12-5":[-5006.6,1973.99],"6-51-24":[-4927.8,19.11],"6-51-25":[-4549.86,11.37],"5-25-12":[-4927.8,109.32],"6-51-26":[-4810.57,4.22],"6-51-27":[-4861.84,-3.86],"5-25-13":[-4861.84,914.15],"4-12-6":[-4927.8,2757.34],"6-51-28":[-4937.15,981.16],"6-51-29":[-4430.45,1135.93],"5-25-14":[-4937.15,1141.75],"6-51-30":[-4404.87,305.41],"6-51-31":[-4637.59,-1.06],"5-25-15":[-4637.59,1000.51],"4-12-7":[-4937.15,1259.07],"6-51-32":[-5219.05,-5.27],"6-51-33":[-4625.84,315.67],"5-25-16":[-5281.5,1106.52],"6-51-34":[-5717.47,1194.05],"6-51-35":[-6295.78,1027.17],"5-25-17":[-6295.78,1194.05],"4-12-8":[-6295.78,1298.57],"6-51-36":[-6924.46,-9.5],"6-51-37":[-6878,-8.12],"5-25-18":[-6924.46,986.18],"6-51-38":[-6234.42,-6.58],"6-51-39":[-6390.19,-3.54],"5-25-19":[-7008.06,124.34],"4-12-9":[-7008.06,2863.35],"6-51-40":[-7677.07,-6.14],"6-51-41":[-6648.02,-2.7],"5-25-20":[-7677.07,-2.7],"6-51-42":[-5887.74,4.88],"6-51-43":[-4881.84,4.82],"5-25-21":[-5887.74,4.88],"4-12-10":[-7677.07,2060.99],"6-51-44":[-4683.33,-0.42],"6-51-45":[-4718.71,-0.49],"5-25-22":[-5375.44,-0.42],"6-51-46":[-4904.66,-0.3],"6-51-47":[-4464.49,0.52],"5-25-23":[-5352.82,0.52],"4-12-11":[-5726.45,0.52],"6-51-48":[-4783.84,5.1],"6-51-49":[-5104.6,16.37],"5-25-24":[-5104.6,16.37],"6-51-50":[-4801.07,28.17],"6-51-51":[-3120.41,2916.19],"5-25-25":[-4801.07,2916.19],"4-12-12":[-5488.9,2916.19],"6-51-52":[-3181.33,44.42],"6-51-53":[-3383.44,45.57],"5-25-26":[-3572.36,45.57],"6-51-54":[-2894.6,41.85],"6-51-55":[-1321.25,3107.62],"5-25-27":[-2894.6,3258.28],"4-12-13":[-4250.99,3258.28],"6-51-56":[-153.79,2672.67],"6-51-57":[-145.78,1240.65],"5-25-28":[-385.83,2672.67],"6-51-58":[-210.99,1318.26],"6-51-59":[-468.11,682.83],"5-25-29":[-468.11,1318.26],"4-12-14":[-625.27,2672.67],"6-51-60":[-296.25,994.66],"6-51-61":[-1099.16,1785.3],"5-25-30":[-1755.39,1785.3],"6-51-62":[-3959.51,2257.85],"6-51-63":[-4228.8,2746.48],"5-25-31":[-4236.22,2746.48],"4-12-15":[-4236.22,2746.48],"6-52-0":[-733.46,128.52],"6-52-1":[-1214.07,792.32],"6-52-2":[-1144.24,1141.68],"6-52-3":[-1607.7,2076.74],"6-52-4":[-959.91,2521.51],"6-52-5":[-3476.54,2887.36],"6-52-6":[-4419.2,3023.83],"6-52-7":[-4739.83,3002.57],"6-52-8":[-4949.2,1206.68],"6-52-9":[-5254.67,120.01],"6-52-10":[-5012.8,125.87],"6-52-11":[-4183.89,126.28],"6-52-12":[-7086.05,122.56],"6-52-13":[-4742.87,121.98],"6-52-14":[-5741.02,120.69],"6-52-15":[-5712.7,118.59],"6-52-16":[-5649.06,117.92],"6-52-17":[-5750.86,956.08],"6-52-18":[-5457.64,292.1],"6-52-19":[-5232.26,98.45],"6-52-20":[-5260.33,80.32],"6-52-21":[-4887.73,62.32],"6-52-22":[-5495.99,49.65],"6-52-23":[-5492.27,32.21],"6-52-24":[-5015.71,30.74],"6-52-25":[-5073.96,27.03],"6-52-26":[-5048.05,18.42],"6-52-27":[-5662.8,3.79],"6-52-28":[-5485.53,1.81],"6-52-29":[-5441.5,9.77],"6-52-30":[-5026.25,1799.5],"6-52-31":[-4933.34,9.72],"6-52-32":[-4854.58,1.12],"6-52-33":[-5356.72,236.48],"6-52-34":[-5355.94,-6.99],"6-52-35":[-6308.17,-9.64],"6-52-36":[-7469.7,-7.29],"6-52-37":[-6466.58,-6.71],"6-52-38":[-5677.51,-5.18],"6-52-39":[-5879.9,-4.33],"6-52-40":[-6914.98,-5.17],"6-52-41":[-6668.6,0.3],"6-52-42":[-5783.44,5.27],"6-52-43":[-4800.88,6.16],"6-52-44":[-3657.96,8.81],"6-52-45":[-3599.29,299.98],"6-52-46":[-4106.24,909.05],"6-52-47":[-4134.65,9.11],"6-52-48":[-4445.46,11.62],"6-52-49":[-4535.08,20.83],"6-52-50":[-4818.88,31.49],"6-52-51":[-3539.4,44.15],"6-52-52":[-3219.89,48.11],"6-52-53":[-3059.39,47.57],"6-52-54":[-2932.62,39.99],"6-52-55":[-2319.46,1511.36],"6-52-56":[-1028.73,3019.59],"6-52-57":[-6.52,1863.6],"6-52-58":[-117.54,2132.8],"6-52-59":[-470.01,1124.55],"6-52-60":[-286.17,1099.18],"6-52-61":[-908.43,1887.29],"6-52-62":[-4139.66,2271.2],"6-52-63":[-4259.41,2746.48],"6-53-0":[-809.92,127.52],"6-53-1":[-947.44,1084.84],"5-26-0":[-1214.07,1084.84],"6-53-2":[-956.82,1208.94],"6-53-3":[-2013.41,1866.38],"5-26-1":[-2013.41,2076.74],"6-53-4":[-1764.48,2511.91],"6-53-5":[-3618.3,2633.93],"5-26-2":[-3618.3,2887.36],"6-53-6":[-4517.43,2633.93],"6-53-7":[-4776.29,3982.86],"5-26-3":[-4776.29,3982.86],"6-53-8":[-4996.61,121.21],"6-53-9":[-5272.07,128.08],"5-26-4":[-5272.07,1206.68],"6-53-10":[-5305.35,129.5],"6-53-11":[-4591.49,127.45],"5-26-5":[-5305.35,129.5],"6-53-12":[-8129.66,122.28],"6-53-13":[-5430.02,127.23],"5-26-6":[-8129.66,127.23],"6-53-14":[-5642.1,129.8],"6-53-15":[-5516.49,129.69],"5-26-7":[-5741.02,129.8],"6-53-16":[-5390.18,129.28],"6-53-17":[-5280.21,123.07],"5-26-8":[-5750.86,956.08],"6-53-18":[-4871.36,2346.09],"6-53-19":[-5425.47,100.63],"5-26-9":[-5457.64,2346.09],"6-53-20":[-4690.2,83.95],"6-53-21":[-5286.82,69.72],"5-26-10":[-5286.82,83.95],"6-53-22":[-5993.62,52.25],"6-53-23":[-5992.94,40.62],"5-26-11":[-5993.62,52.25],"6-53-24":[-5509.86,1698.2],"6-53-25":[-6172.64,36.9],"5-26-12":[-6172.64,1698.2],"6-53-26":[-5853.26,31.78],"6-53-27":[-6369.72,19.03],"5-26-13":[-6369.72,31.78],"6-53-28":[-5966.33,13.16],"6-53-29":[-5889.03,18.26],"5-26-14":[-5966.33,18.26],"6-53-30":[-5882.35,18.06],"6-53-31":[-5211.23,16.65],"5-26-15":[-5882.35,1799.5],"6-53-32":[-4558.97,11.61],"6-53-33":[-4701.82,-1.77],"5-26-16":[-5356.72,236.48],"6-53-34":[-5295.87,-5.37],"6-53-35":[-6621.27,-7.87],"5-26-17":[-6621.27,-5.37],"6-53-36":[-6149.42,-7.1],"6-53-37":[-6059.63,-6.55],"5-26-18":[-7469.7,-6.55],"6-53-38":[-5287.23,-5.31],"6-53-39":[-6580.97,584.18],"5-26-19":[-6580.97,584.18],"6-53-40":[-6305.15,-3.59],"6-53-41":[-6288.64,2.46],"5-26-20":[-6914.98,2.46],"6-53-42":[-5252.94,10.35],"6-53-43":[-4611.72,13.56],"5-26-21":[-5783.44,13.56],"6-53-44":[-3688.88,18.1],"6-53-45":[-3553.03,2273.57],"5-26-22":[-3688.88,2273.57],"6-53-46":[-3357.17,19.28],"6-53-47":[-3667.73,20.12],"5-26-23":[-4134.65,909.05],"6-53-48":[-3844.29,21.48],"6-53-49":[-4138.56,25.29],"5-26-24":[-4535.08,25.29],"6-53-50":[-4790.72,32.32],"6-53-51":[-3440.33,44.34],"5-26-25":[-4818.88,44.34],"6-53-52":[-3980.63,48.37],"6-53-53":[-2353.14,48.14],"5-26-26":[-3980.63,48.37],"6-53-54":[-2657.56,40.04],"6-53-55":[-2300.41,22.99],"5-26-27":[-2932.62,1511.36],"6-53-56":[-606.79,3601.13],"6-53-57":[-1293.17,2772.76],"5-26-28":[-1293.17,3601.13],"6-53-58":[-778.68,2578.34],"6-53-59":[-343.06,1326.38],"5-26-29":[-778.68,2578.34],"6-53-60":[-301.96,1634.18],"6-53-61":[-1086.2,1960.78],"5-26-30":[-1086.2,1960.78],"6-53-62":[-4340.78,2301.31],"6-53-63":[-4271.39,2746.48],"5-26-31":[-4340.78,2746.48],"6-54-0":[-754.78,88.51],"6-54-1":[-695.88,963.85],"6-54-2":[-418.94,1073.68],"6-54-3":[-2490,1676.23],"6-54-4":[-1598.54,2416.2],"6-54-5":[-3641.22,2217.34],"6-54-6":[-4536.45,2458.39],"6-54-7":[-4805.67,2560.61],"6-54-8":[-5052.79,127.95],"6-54-9":[-5437.3,130.4],"6-54-10":[-7400.45,984.27],"6-54-11":[-6940.26,1259.84],"6-54-12":[-8445.16,122.78],"6-54-13":[-5307.61,127.15],"6-54-14":[-5355.46,131.06],"6-54-15":[-5217.86,132.17],"6-54-16":[-5140.39,129.76],"6-54-17":[-4935.97,122.83],"6-54-18":[-4706.91,1086.32],"6-54-19":[-5082.4,100.89],"6-54-20":[-5179.26,82.99],"6-54-21":[-5666.62,66.49],"6-54-22":[-6090.48,53.95],"6-54-23":[-6169.21,42.86],"6-54-24":[-6313.67,45.39],"6-54-25":[-6126.45,1434.62],"6-54-26":[-6062.27,41.69],"6-54-27":[-6226.38,30.03],"6-54-28":[-6103.99,22.91],"6-54-29":[-6024.65,23.82],"6-54-30":[-6448.31,22.61],"6-54-31":[-5649.85,20.6],"6-54-32":[-5202.51,18.27],"6-54-33":[-5070.73,1.49],"6-54-34":[-5639,-1.98],"6-54-35":[-5982.46,-5.32],"6-54-36":[-6017.65,-6.18],"6-54-37":[-5355.92,-6.1],"6-54-38":[-4934.39,1347.61],"6-54-39":[-5602.69,-5.14],"6-54-40":[-5816.35,-0.74],"6-54-41":[-5840.06,5.66],"6-54-42":[-5618.61,12.5],"6-54-43":[-5587.6,19.2],"6-54-44":[-5458.07,24.93],"6-54-45":[-3690.54,1045.93],"6-54-46":[-4181.35,27.23],"6-54-47":[-3525.7,28],"6-54-48":[-4185.13,28.86],"6-54-49":[-4218.21,32.39],"6-54-50":[-4267.86,35.56],"6-54-51":[-3736.27,43.39],"6-54-52":[-3618.08,1349.09],"6-54-53":[-3154.88,1035.34],"6-54-54":[-1757.64,38.39],"6-54-55":[-1268.84,21.85],"6-54-56":[-1242.39,2823.54],"6-54-57":[-1478.9,2688.59],"6-54-58":[-756.79,2458.1],"6-54-59":[-426.59,2385.99],"6-54-60":[-450.17,1787.39],"6-54-61":[-1732.42,2012.99],"6-54-62":[-4431.77,2336.23],"6-54-63":[-4266.36,2746.48],"6-55-0":[-773.63,75.52],"6-55-1":[-909.04,906.14],"5-27-0":[-909.04,963.85],"6-55-2":[-384.43,939.66],"6-55-3":[-2740.34,1854.31],"5-27-1":[-2740.34,1854.31],"4-13-0":[-2740.34,2076.74],"6-55-4":[-1511.29,2030.68],"6-55-5":[-3639.12,2071.97],"5-27-2":[-3641.22,2416.2],"6-55-6":[-4571.3,2327.64],"6-55-7":[-4921.03,1988.61],"5-27-3":[-4921.03,2560.61],"4-13-1":[-4921.03,3982.86],"3-6-0":[-4921.03,3982.86],"6-55-8":[-5022.04,1471.32],"6-55-9":[-5224.27,194.14],"5-27-4":[-5437.3,1471.32],"6-55-10":[-7788.44,129.91],"6-55-11":[-8273.63,126.1],"5-27-5":[-8273.63,1259.84],"4-13-2":[-8273.63,1471.32],"6-55-12":[-7837.58,126.1],"6-55-13":[-5124.34,126.13],"5-27-6":[-8445.16,127.15],"6-55-14":[-5117.88,129.01],"6-55-15":[-4967.25,131.88],"5-27-7":[-5355.46,132.17],"4-13-3":[-8445.16,132.17],"3-6-1":[-8445.16,3108.37],"6-55-16":[-4833.04,129.91],"6-55-17":[-4637.36,120.26],"5-27-8":[-5140.39,129.91],"6-55-18":[-4526.53,1131.62],"6-55-19":[-4501.61,100.95],"5-27-9":[-5082.4,1131.62],"4-13-4":[-5750.86,2346.09],"6-55-20":[-5093.86,76.17],"6-55-21":[-5753.2,63.94],"5-27-10":[-5753.2,82.99],"6-55-22":[-5978.68,55.85],"6-55-23":[-6224.65,50.59],"5-27-11":[-6224.65,55.85],"4-13-5":[-6224.65,83.95],"3-6-2":[-6293.49,2346.09],"6-55-24":[-6228.02,51.75],"6-55-25":[-6270.35,2003.8],"5-27-12":[-6313.67,2003.8],"6-55-26":[-6240.19,2815.55],"6-55-27":[-6433.11,37.39],"5-27-13":[-6433.11,2815.55],"4-13-6":[-6433.11,2815.55],"6-55-28":[-6295.21,31.14],"6-55-29":[-6099.62,32.89],"5-27-14":[-6295.21,32.89],"6-55-30":[-6399.44,30.93],"6-55-31":[-5954.07,23.87],"5-27-15":[-6448.31,30.93],"4-13-7":[-6448.31,1799.5],"3-6-3":[-6448.31,2815.55],"6-55-32":[-5049.31,20.71],"6-55-33":[-4783.68,8.19],"5-27-16":[-5202.51,20.71],"6-55-34":[-5310.1,4],"6-55-35":[-5627.49,-1.23],"5-27-17":[-5982.46,4],"4-13-8":[-6621.27,236.48],"6-55-36":[-5557.2,-2.77],"6-55-37":[-4574.29,2699.54],"5-27-18":[-6017.65,2699.54],"6-55-38":[-4364.05,1963.83],"6-55-39":[-5227.73,-2.51],"5-27-19":[-5602.69,1963.83],"4-13-9":[-7469.7,2699.54],"3-6-4":[-7469.7,2863.35],"6-55-40":[-5398.44,3.34],"6-55-41":[-5418.06,11.75],"5-27-20":[-5840.06,11.75],"6-55-42":[-5567.95,18.07],"6-55-43":[-5910.79,25.53],"5-27-21":[-5910.79,25.53],"4-13-10":[-6914.98,25.53],"6-55-44":[-5858.3,32.41],"6-55-45":[-5328.4,1066.57],"5-27-22":[-5858.3,1066.57],"6-55-46":[-4416.42,36.95],"6-55-47":[-4492.85,36.98],"5-27-23":[-4492.85,36.98],"4-13-11":[-5858.3,2273.57],"3-6-5":[-7677.07,2273.57],"6-55-48":[-4477.06,36.96],"6-55-49":[-4483.64,37.24],"5-27-24":[-4483.64,37.24],"6-55-50":[-4294.04,39.76],"6-55-51":[-4067.88,42.27],"5-27-25":[-4294.04,43.39],"4-13-12":[-4818.88,44.34],"6-55-52":[-3984.71,37.89],"6-55-53":[-3551.53,38.97],"5-27-26":[-3984.71,1349.09],"6-55-54":[-1641.24,173.11],"6-55-55":[-1355.39,1438.49],"5-27-27":[-1757.64,1438.49],"4-13-13":[-3984.71,1511.36],"3-6-6":[-5488.9,3258.28],"6-55-56":[-1512.26,2044.53],"6-55-57":[-1226.91,2666.25],"5-27-28":[-1512.26,2823.54],"6-55-58":[-678.79,2014.72],"6-55-59":[-910.8,2088.28],"5-27-29":[-910.8,2458.1],"4-13-14":[-1512.26,3601.13],"6-55-60":[-652.73,1737.31],"6-55-61":[-3251.34,2103.65],"5-27-30":[-3251.34,2103.65],"6-55-62":[-4488.79,2360.08],"6-55-63":[-4270.87,2746.48],"5-27-31":[-4488.79,2746.48],"4-13-15":[-4488.79,2746.48],"3-6-7":[-4488.79,3601.13],"6-56-0":[-774.61,63.52],"6-56-1":[-909.04,872.66],"6-56-2":[-422.73,1232.27],"6-56-3":[-2742.33,1544.62],"6-56-4":[-1114.07,1035.02],"6-56-5":[-3179.65,1653.87],"6-56-6":[-4594.77,1002],"6-56-7":[-4924.28,671.1],"6-56-8":[-5019,1784.7],"6-56-9":[-5199.04,1475.57],"6-56-10":[-6481.97,128.25],"6-56-11":[-5268.9,126.29],"6-56-12":[-5631.13,126.29],"6-56-13":[-5336.55,126.21],"6-56-14":[-4959.12,126.55],"6-56-15":[-4734.53,127.18],"6-56-16":[-4920.4,126.5],"6-56-17":[-4441.83,117.02],"6-56-18":[-4364.6,106.96],"6-56-19":[-4479.79,92.67],"6-56-20":[-4807.92,81.82],"6-56-21":[-5147.88,72.03],"6-56-22":[-5777.15,65.54],"6-56-23":[-5742.39,64.24],"6-56-24":[-6087.05,52.11],"6-56-25":[-5930.72,53.98],"6-56-26":[-5982.95,52.63],"6-56-27":[-6107.29,44.22],"6-56-28":[-6675.95,40.2],"6-56-29":[-5957.58,37.67],"6-56-30":[-5964.89,36.23],"6-56-31":[-7097.01,26.97],"6-56-32":[-5371.34,25.11],"6-56-33":[-4808.56,15.56],"6-56-34":[-4714.13,11.93],"6-56-35":[-5258.45,18.59],"6-56-36":[-5112.44,4.11],"6-56-37":[-4736.03,0.85],"6-56-38":[-3880.88,0.68],"6-56-39":[-4794.46,1.89],"6-56-40":[-4889.28,8.4],"6-56-41":[-5026.05,16.04],"6-56-42":[-5214.14,22.14],"6-56-43":[-5362.66,30.63],"6-56-44":[-5615.35,36.65],"6-56-45":[-5576.93,40.5],"6-56-46":[-5354.96,43.37],"6-56-47":[-6001.14,44.13],"6-56-48":[-4965.81,43.98],"6-56-49":[-4608.39,41.79],"6-56-50":[-4520.54,41.65],"6-56-51":[-4015.97,42.33],"6-56-52":[-3435.94,40.96],"6-56-53":[-4034.45,41.96],"6-56-54":[-1992.34,1450.89],"6-56-55":[-566.09,1695.97],"6-56-56":[-1528.23,1011.13],"6-56-57":[-608.36,1329.89],"6-56-58":[-531.53,1771.7],"6-56-59":[-1105.87,1695.38],"6-56-60":[-1294.97,1632.27],"6-56-61":[-3320.58,2172.84],"6-56-62":[-4500.76,2379.92],"6-56-63":[-4387.83,2746.48],"6-57-0":[-830.8,52.51],"6-57-1":[-644.38,541.88],"5-28-0":[-909.04,872.66],"6-57-2":[-469.54,919.88],"6-57-3":[-1635.29,1436.69],"5-28-1":[-2742.33,1544.62],"6-57-4":[-1835.91,748.02],"6-57-5":[-1621.7,949.92],"5-28-2":[-3179.65,1653.87],"6-57-6":[-4643.42,115.49],"6-57-7":[-4970.55,126.66],"5-28-3":[-4970.55,1002],"6-57-8":[-5107.08,1937.43],"6-57-9":[-5242.54,2123.62],"5-28-4":[-5242.54,2123.62],"6-57-10":[-5693.64,124.91],"6-57-11":[-5329.67,123.99],"5-28-5":[-6481.97,128.25],"6-57-12":[-5384.49,123.99],"6-57-13":[-4791.5,122.5],"5-28-6":[-5631.13,126.29],"6-57-14":[-4728.1,124.14],"6-57-15":[-4503.56,123],"5-28-7":[-4959.12,127.18],"6-57-16":[-4242.46,119.6],"6-57-17":[-4149.79,110.36],"5-28-8":[-4920.4,126.5],"6-57-18":[-4243.75,101.63],"6-57-19":[-4386.42,95.46],"5-28-9":[-4479.79,106.96],"6-57-20":[-4570.43,1880.85],"6-57-21":[-4843.17,2439.69],"5-28-10":[-5147.88,2439.69],"6-57-22":[-5236.17,1522.97],"6-57-23":[-5741.26,68.01],"5-28-11":[-5777.15,1522.97],"6-57-24":[-5614.52,116.51],"6-57-25":[-5297.41,60.59],"5-28-12":[-6087.05,116.51],"6-57-26":[-5603.59,171.48],"6-57-27":[-5382.72,57.96],"5-28-13":[-6107.29,171.48],"6-57-28":[-5194.58,53.31],"6-57-29":[-5536.19,43.04],"5-28-14":[-6675.95,53.31],"6-57-30":[-5589.52,37.19],"6-57-31":[-7749.42,33.41],"5-28-15":[-7749.42,37.19],"6-57-32":[-6535.92,34.41],"6-57-33":[-5119.28,26.59],"5-28-16":[-6535.92,34.41],"6-57-34":[-5045.49,24.73],"6-57-35":[-5489.86,64.15],"5-28-17":[-5489.86,64.15],"6-57-36":[-4822.11,32.17],"6-57-37":[-4030.39,167.47],"5-28-18":[-5112.44,167.47],"6-57-38":[-3442.1,26.06],"6-57-39":[-4106.03,77.57],"5-28-19":[-4794.46,77.57],"6-57-40":[-3840.8,15.84],"6-57-41":[-4457.53,1486.33],"5-28-20":[-5026.05,1486.33],"6-57-42":[-4775,2391.26],"6-57-43":[-4880.59,1794.09],"5-28-21":[-5362.66,2391.26],"6-57-44":[-5715.96,40.42],"6-57-45":[-5874.66,45.89],"5-28-22":[-5874.66,45.89],"6-57-46":[-5731.84,49.37],"6-57-47":[-5915.23,50.19],"5-28-23":[-6001.14,50.19],"6-57-48":[-5019.61,50.16],"6-57-49":[-4959.49,48.13],"5-28-24":[-5019.61,50.16],"6-57-50":[-4915.16,45.48],"6-57-51":[-2574.6,44.16],"5-28-25":[-4915.16,45.48],"6-57-52":[-2779.21,42.18],"6-57-53":[-2770.8,42.48],"5-28-26":[-4034.45,42.48],"6-57-54":[-2250.06,2074.83],"6-57-55":[-937.18,1823.2],"5-28-27":[-2250.06,2074.83],"6-57-56":[-2391.06,13.36],"6-57-57":[-1732.19,11.7],"5-28-28":[-2391.06,1329.89],"6-57-58":[-480,1116.85],"6-57-59":[-648.11,1811.71],"5-28-29":[-1105.87,1811.71],"6-57-60":[-581.27,1663.61],"6-57-61":[-3797.26,2225.4],"5-28-30":[-3797.26,2225.4],"6-57-62":[-4462.42,2420.8],"6-57-63":[-4395.9,2746.48],"5-28-31":[-4500.76,2746.48],"6-58-0":[-1148.46,66.14],"6-58-1":[-665.78,663],"6-58-2":[-313.37,1111.16],"6-58-3":[-1468.54,664.4],"6-58-4":[-1187.8,1036.71],"6-58-5":[-1368.34,949.82],"6-58-6":[-4702.71,116.37],"6-58-7":[-4948.55,124.92],"6-58-8":[-5107.83,1885.38],"6-58-9":[-5547.42,2140.58],"6-58-10":[-5606.58,121.69],"6-58-11":[-6067.01,123.87],"6-58-12":[-5079.01,123.87],"6-58-13":[-4653.01,123.14],"6-58-14":[-4703.6,119.28],"6-58-15":[-4200.54,118.34],"6-58-16":[-4449.71,118.05],"6-58-17":[-4235.37,106.08],"6-58-18":[-4790.67,104.94],"6-58-19":[-4811.33,99.37],"6-58-20":[-4716.62,1402.2],"6-58-21":[-4379.44,3730.85],"6-58-22":[-4656.43,1980.83],"6-58-23":[-5347.55,745.87],"6-58-24":[-5267.8,535.71],"6-58-25":[-5167.21,356.34],"6-58-26":[-4869.58,135.29],"6-58-27":[-4636.76,301.55],"6-58-28":[-4670.67,458.6],"6-58-29":[-4517.78,728.66],"6-58-30":[-4838.32,41.91],"6-58-31":[-5688.29,38.21],"6-58-32":[-5734.08,38.21],"6-58-33":[-5055.81,33.98],"6-58-34":[-5032.26,864.67],"6-58-35":[-4600.32,429.6],"6-58-36":[-54.18,293.54],"6-58-37":[-1031.12,160.54],"6-58-38":[-1535.05,305.33],"6-58-39":[-68.02,458.89],"6-58-40":[-2869.5,631.86],"6-58-41":[-3974.67,1938.63],"6-58-42":[-4394.56,3619.16],"6-58-43":[-4562.11,1377.96],"6-58-44":[-5087.64,40.21],"6-58-45":[-5651.93,47.1],"6-58-46":[-5721.22,50.18],"6-58-47":[-5752.16,52.72],"6-58-48":[-4937.63,54.26],"6-58-49":[-4956.28,51.82],"6-58-50":[-4777.71,49.92],"6-58-51":[-3124.35,46.02],"6-58-52":[-1653.76,42.72],"6-58-53":[-2623.27,41.86],"6-58-54":[-2249.64,2067.07],"6-58-55":[-1286.31,1823.02],"6-58-56":[-1838.64,13.48],"6-58-57":[-2627.31,357.87],"6-58-58":[-2489.23,1674.63],"6-58-59":[-525.93,1949.57],"6-58-60":[-412.71,1790.34],"6-58-61":[-3836.73,2289.94],"6-58-62":[-4429.02,2460.86],"6-58-63":[-4376.9,2746.48],"6-59-0":[-1206.49,37.79],"6-59-1":[-771.79,804.61],"5-29-0":[-1206.49,804.61],"6-59-2":[-502.92,913.12],"6-59-3":[-1477.39,666.92],"5-29-1":[-1477.39,1111.16],"4-14-0":[-2742.33,1544.62],"6-59-4":[-1221.06,985.85],"6-59-5":[-1102.26,2634.47],"5-29-2":[-1368.34,2634.47],"6-59-6":[-4507.92,590.06],"6-59-7":[-5028.45,119.95],"5-29-3":[-5028.45,590.06],"4-14-1":[-5028.45,2634.47],"6-59-8":[-5146.03,1189.75],"6-59-9":[-5583.49,125.87],"5-29-4":[-5583.49,2140.58],"6-59-10":[-5586.8,120.74],"6-59-11":[-6953.14,121.48],"5-29-5":[-6953.14,123.87],"4-14-2":[-6953.14,2140.58],"6-59-12":[-5147.12,121.88],"6-59-13":[-4354.82,123],"5-29-6":[-5147.12,123.87],"6-59-14":[-4318.08,118.25],"6-59-15":[-5252.69,112.43],"5-29-7":[-5252.69,119.28],"4-14-3":[-5631.13,127.18],"6-59-16":[-4267.14,112.43],"6-59-17":[-4115.34,102.32],"5-29-8":[-4449.71,118.05],"6-59-18":[-4149.18,1976.1],"6-59-19":[-4477.69,98.54],"5-29-9":[-4811.33,1976.1],"4-14-4":[-4920.4,1976.1],"6-59-20":[-4890.61,88.87],"6-59-21":[-4996.43,731.97],"5-29-10":[-4996.43,3730.85],"6-59-22":[-5046.75,609.23],"6-59-23":[-5769,951.26],"5-29-11":[-5769,1980.83],"4-14-5":[-5777.15,3730.85],"6-59-24":[-5613.69,838.62],"6-59-25":[-4980.13,699.41],"5-29-12":[-5613.69,838.62],"6-59-26":[-4879.62,480.98],"6-59-27":[-4556.45,1567.34],"5-29-13":[-4879.62,1567.34],"4-14-6":[-6107.29,1567.34],"6-59-28":[-3942.58,1463.87],"6-59-29":[-5153.94,935.28],"5-29-14":[-5153.94,1463.87],"6-59-30":[-4808.82,49.38],"6-59-31":[-5536.73,40.51],"5-29-15":[-5688.29,49.38],"4-14-7":[-7749.42,1463.87],"6-59-32":[-5359.65,40.61],"6-59-33":[-4901.26,39.26],"5-29-16":[-5734.08,40.61],"6-59-34":[-4767.54,846.28],"6-59-35":[-25.15,1448.88],"5-29-17":[-5032.26,1448.88],"4-14-8":[-6535.92,1448.88],"6-59-36":[8.78,1514.42],"6-59-37":[8.23,473.97],"5-29-18":[-1031.12,1514.42],"6-59-38":[8.08,659.04],"6-59-39":[8.16,820.4],"5-29-19":[-1535.05,820.4],"4-14-9":[-5112.44,1514.42],"6-59-40":[9.22,900.26],"6-59-41":[-1973.23,613.04],"5-29-20":[-3974.67,1938.63],"6-59-42":[-3432.46,677.68],"6-59-43":[-4528.95,35.12],"5-29-21":[-4562.11,3619.16],"4-14-10":[-5362.66,3619.16],"6-59-44":[-5013.92,39.98],"6-59-45":[-5484.61,2060.11],"5-29-22":[-5651.93,2060.11],"6-59-46":[-5484.61,50.12],"6-59-47":[-5342,52.47],"5-29-23":[-5752.16,52.72],"4-14-11":[-6001.14,2060.11],"6-59-48":[-5782.44,55.19],"6-59-49":[-4748.58,55.91],"5-29-24":[-5782.44,55.91],"6-59-50":[-2644.4,53.48],"6-59-51":[-2954.78,49.06],"5-29-25":[-4777.71,53.48],"4-14-12":[-5782.44,55.91],"6-59-52":[-2619.14,44.55],"6-59-53":[-2018.58,39.12],"5-29-26":[-2623.27,44.55],"6-59-54":[-1697.04,33.19],"6-59-55":[-1710.62,1126.25],"5-29-27":[-2249.64,2067.07],"4-14-13":[-4034.45,2074.83],"6-59-56":[-2070.49,14.62],"6-59-57":[-3062.21,608.1],"5-29-28":[-3062.21,608.1],"6-59-58":[-2999.86,2647.27],"6-59-59":[-474.44,2213.91],"5-29-29":[-2999.86,2647.27],"4-14-14":[-3062.21,2647.27],"6-59-60":[-374.42,1899.59],"6-59-61":[-3953.82,2337.34],"5-29-30":[-3953.82,2337.34],"6-59-62":[-4440.83,2494.91],"6-59-63":[-4361.23,2746.48],"5-29-31":[-4440.83,2746.48],"4-14-15":[-4500.76,2746.48],"6-60-0":[-1299.63,37.78],"6-60-1":[-925.01,799.08],"6-60-2":[-888.63,844.65],"6-60-3":[-1564.59,1285.49],"6-60-4":[-1370.09,821.15],"6-60-5":[-861.46,2604.03],"6-60-6":[-2131.54,850.01],"6-60-7":[-5034.9,115.86],"6-60-8":[-5132.02,123.35],"6-60-9":[-5381,123.85],"6-60-10":[-5892.44,119.67],"6-60-11":[-6972.08,467.08],"6-60-12":[-5129.93,847.15],"6-60-13":[-4115.41,1061.19],"6-60-14":[-5149.97,118.9],"6-60-15":[-4197.74,106.06],"6-60-16":[-4496.35,848.03],"6-60-17":[-4334.49,934.31],"6-60-18":[-4285.89,948.19],"6-60-19":[-4575.69,97.22],"6-60-20":[-4698.24,3428.78],"6-60-21":[-4892.13,3435.16],"6-60-22":[-4748.59,753.26],"6-60-23":[-5350.38,625.45],"6-60-24":[-4910.61,621.86],"6-60-25":[-4648.03,616.33],"6-60-26":[-4676.41,571.22],"6-60-27":[-4867.15,986.01],"6-60-28":[-4699.54,1965.58],"6-60-29":[-4703.7,1465.14],"6-60-30":[-4667.95,448.45],"6-60-31":[-5397.54,41.59],"6-60-32":[-5480.26,40.1],"6-60-33":[-4905.17,384.5],"6-60-34":[-3030.57,1362.69],"6-60-35":[11.08,1866.57],"6-60-36":[9.95,974],"6-60-37":[10.09,560.21],"6-60-38":[10.53,590.61],"6-60-39":[11.82,617.24],"6-60-40":[12.34,504.44],"6-60-41":[13.01,728.38],"6-60-42":[-2724.53,3423.9],"6-60-43":[-4462.04,3558.63],"6-60-44":[-4869.33,38.1],"6-60-45":[-5088.63,920.71],"6-60-46":[-5053.46,931.45],"6-60-47":[-5012.51,826.02],"6-60-48":[-5033.05,56.45],"6-60-49":[-4522.14,56.31],"6-60-50":[-1171.04,965.28],"6-60-51":[-2688.99,777.38],"6-60-52":[-2494.46,322.12],"6-60-53":[-2239.43,37.45],"6-60-54":[-2334.36,27.21],"6-60-55":[-2566.02,18.18],"6-60-56":[-2200.43,18.97],"6-60-57":[-2916.5,1445.48],"6-60-58":[-3327.48,2647.27],"6-60-59":[-1547.91,2378.63],"6-60-60":[-2292.77,2084.27],"6-60-61":[-3981.16,2371.33],"6-60-62":[-4419.87,2524.96],"6-60-63":[-4393.27,2746.49],"6-61-0":[-1249.62,37.76],"6-61-1":[-1112.88,587.07],"5-30-0":[-1299.63,799.08],"6-61-2":[-1546.38,649.12],"6-61-3":[-1554.59,1436.28],"5-30-1":[-1564.59,1436.28],"6-61-4":[-1101.76,882.21],"6-61-5":[-477.94,2622.95],"5-30-2":[-1370.09,2622.95],"6-61-6":[-1793.98,2094.27],"6-61-7":[-4983.68,110.49],"5-30-3":[-5034.9,2094.27],"6-61-8":[-5222.84,113.62],"6-61-9":[-5428.09,792.85],"5-30-4":[-5428.09,792.85],"6-61-10":[-5710.62,472.86],"6-61-11":[-5248.33,998.82],"5-30-5":[-6972.08,998.82],"6-61-12":[-4485.39,911.33],"6-61-13":[-3387.91,978.67],"5-30-6":[-5129.93,1061.19],"6-61-14":[-4788.04,275.17],"6-61-15":[-4478.72,105.85],"5-30-7":[-5149.97,275.17],"6-61-16":[-4586.88,2441.8],"6-61-17":[-4535.47,2479.29],"5-30-8":[-4586.88,2479.29],"6-61-18":[-4473.78,1153.69],"6-61-19":[-4636.74,1045.54],"5-30-9":[-4636.74,1153.69],"6-61-20":[-4641.17,3969.25],"6-61-21":[-4928.56,3240.15],"5-30-10":[-4928.56,3969.25],"6-61-22":[-4945.72,538.03],"6-61-23":[-5865.09,581.24],"5-30-11":[-5865.09,753.26],"6-61-24":[-5850.78,518.07],"6-61-25":[-5370.23,456.49],"5-30-12":[-5850.78,621.86],"6-61-26":[-4853.21,2075.33],"6-61-27":[-5280.81,725.34],"5-30-13":[-5280.81,2075.33],"6-61-28":[-4922.18,1263.81],"6-61-29":[-5222.98,1793.46],"5-30-14":[-5222.98,1965.58],"6-61-30":[-5291.44,563.59],"6-61-31":[-5622.65,40.64],"5-30-15":[-5622.65,563.59],"6-61-32":[-5631.84,39.27],"6-61-33":[-4922.72,482.59],"5-30-16":[-5631.84,482.59],"6-61-34":[14.28,1670.46],"6-61-35":[11.71,1228.8],"5-30-17":[-3030.57,1866.57],"6-61-36":[11.3,718.33],"6-61-37":[-99.67,814.4],"5-30-18":[-99.67,974],"6-61-38":[11.9,417.33],"6-61-39":[12.45,434.7],"5-30-19":[10.53,617.24],"6-61-40":[12.64,544.46],"6-61-41":[13.85,536.59],"5-30-20":[12.34,728.38],"6-61-42":[-160.95,3255.79],"6-61-43":[-137.3,4091.3],"5-30-21":[-4462.04,4091.3],"6-61-44":[-3374.34,1009.54],"6-61-45":[-1542.98,1097.45],"5-30-22":[-5088.63,1097.45],"6-61-46":[21.26,2425.69],"6-61-47":[-4937.09,2341.94],"5-30-23":[-5053.46,2425.69],"6-61-48":[-4955.38,53.23],"6-61-49":[-2050.17,264.6],"5-30-24":[-5033.05,264.6],"6-61-50":[-85.62,935.9],"6-61-51":[-216.07,827.24],"5-30-25":[-2688.99,965.28],"6-61-52":[-1523.2,893.55],"6-61-53":[-1457.29,582.89],"5-30-26":[-2494.46,893.55],"6-61-54":[-3630.65,832.57],"6-61-55":[-3897.67,20.65],"5-30-27":[-3897.67,832.57],"6-61-56":[-3381.61,20.76],"6-61-57":[-3738.02,2173.37],"5-30-28":[-3738.02,2173.37],"6-61-58":[-3509.49,2720.05],"6-61-59":[-2958.98,2519.15],"5-30-29":[-3509.49,2720.05],"6-61-60":[-3517.99,2242.55],"6-61-61":[-4835.02,2404.88],"5-30-30":[-4835.02,2404.88],"6-61-62":[-4382.08,2555.1],"6-61-63":[-4356.44,2747.47],"5-30-31":[-4419.87,2747.47],"6-62-0":[-1240.53,37.73],"6-62-1":[-744.04,572.31],"6-62-2":[-1580.4,576.58],"6-62-3":[-1451.86,615.97],"6-62-4":[-1027.1,702.71],"6-62-5":[-541.12,2552.32],"6-62-6":[-1283.7,2664.01],"6-62-7":[-4784.72,103.88],"6-62-8":[-5202.61,107.83],"6-62-9":[-5387.25,111.74],"6-62-10":[-5726.24,298.22],"6-62-11":[-5787.56,1388.09],"6-62-12":[-5721.89,1035.94],"6-62-13":[-3686.08,1109.06],"6-62-14":[-4480.28,639.9],"6-62-15":[-4790.76,219.03],"6-62-16":[-4896.5,2687.22],"6-62-17":[-5213.44,2577.79],"6-62-18":[-5267.5,3501.33],"6-62-19":[-4911.78,2419.81],"6-62-20":[-5018.1,3718.38],"6-62-21":[-5389.78,1721.06],"6-62-22":[-5293.41,696.4],"6-62-23":[-6394.68,471.46],"6-62-24":[-6204.36,407.06],"6-62-25":[-6073.72,487.53],"6-62-26":[-5931.72,1006.14],"6-62-27":[-5677.56,631.61],"6-62-28":[-6118.85,789.75],"6-62-29":[-6377.35,766.66],"6-62-30":[-5920.61,332.62],"6-62-31":[-5347.75,38.68],"6-62-32":[-5283.42,38.48],"6-62-33":[-5043.38,317.61],"6-62-34":[14.55,749.67],"6-62-35":[12.03,765.74],"6-62-36":[12.1,606.6],"6-62-37":[12.83,948.09],"6-62-38":[12.65,466.53],"6-62-39":[13.05,375.52],"6-62-40":[13.65,421.27],"6-62-41":[15.43,679.87],"6-62-42":[16.17,1792.55],"6-62-43":[16.17,3730.02],"6-62-44":[-1802.42,2423.6],"6-62-45":[-795.86,3440.21],"6-62-46":[17.78,2505.49],"6-62-47":[-4748.41,2581.45],"6-62-48":[-4763.6,209.81],"6-62-49":[-141.99,627.25],"6-62-50":[-120.06,1059.5],"6-62-51":[-251.76,960.71],"6-62-52":[-247.14,1324.16],"6-62-53":[-1590.71,281.57],"6-62-54":[-3485.5,25.96],"6-62-55":[-3904.05,22.36],"6-62-56":[-3764.97,20.96],"6-62-57":[-3158.94,2479.23],"6-62-58":[-3693.62,2850.41],"6-62-59":[-3705.92,2618.27],"6-62-60":[-4289.29,2314.66],"6-62-61":[-4712.91,2457.95],"6-62-62":[-4452.31,2581.14],"6-62-63":[-4363.32,2749.47],"6-63-0":[-1319.19,37.73],"6-63-1":[-591,629.84],"5-31-0":[-1319.19,629.84],"6-63-2":[-1565.59,582.77],"6-63-3":[-787.72,708.63],"5-31-1":[-1580.4,708.63],"4-15-0":[-1580.4,1436.28],"6-63-4":[-1062.91,441.27],"6-63-5":[-825.64,2411.62],"5-31-2":[-1062.91,2552.32],"6-63-6":[-2079.21,2153.36],"6-63-7":[-4632.1,101.1],"5-31-3":[-4784.72,2664.01],"4-15-1":[-5034.9,2664.01],"3-7-0":[-5034.9,2664.01],"6-63-8":[-5168.36,103.66],"6-63-9":[-5405.65,103.55],"5-31-4":[-5405.65,111.74],"6-63-10":[-5625.94,500.18],"6-63-11":[-5368.78,821.88],"5-31-5":[-5787.56,1388.09],"4-15-2":[-6972.08,1388.09],"6-63-12":[-5779.91,942.82],"6-63-13":[-3150.45,686.85],"5-31-6":[-5779.91,1109.06],"6-63-14":[-4455.82,466.81],"6-63-15":[-4710.93,332.21],"5-31-7":[-4790.76,639.9],"4-15-3":[-5779.91,1109.06],"3-7-1":[-6972.08,2140.58],"2-3-0":[-8445.16,3982.86],"6-63-16":[-4828.77,3299.64],"6-63-17":[-5389.17,2357.66],"5-31-8":[-5389.17,3299.64],"6-63-18":[-5668.97,2423.37],"6-63-19":[-5265.41,1802.73],"5-31-9":[-5668.97,3501.33],"4-15-4":[-5668.97,3501.33],"6-63-20":[-5105.1,2177.76],"6-63-21":[-5430.78,856.94],"5-31-10":[-5430.78,3718.38],"6-63-22":[-6103,519.6],"6-63-23":[-6129.72,407.48],"5-31-11":[-6394.68,696.4],"4-15-5":[-6394.68,3969.25],"3-7-2":[-6394.68,3969.25],"6-63-24":[-6145.98,556.84],"6-63-25":[-6723.66,577.03],"5-31-12":[-6723.66,577.03],"6-63-26":[-6115.4,1303.84],"6-63-27":[-6907.8,572.26],"5-31-13":[-6907.8,1303.84],"4-15-6":[-6907.8,2075.33],"6-63-28":[-6077.21,555.42],"6-63-29":[-5349.22,874.92],"5-31-14":[-6377.35,874.92],"6-63-30":[-5907.53,370.77],"6-63-31":[-5392.83,36.2],"5-31-15":[-5920.61,370.77],"4-15-7":[-6377.35,1965.58],"3-7-3":[-7749.42,2075.33],"2-3-1":[-7749.42,3969.25],"1-1-0":[-8983.51,6823.9],"6-63-32":[-5237.08,36.78],"6-63-33":[-5332.47,337.3],"5-31-16":[-5332.47,337.3],"6-63-34":[12.34,850.91],"6-63-35":[10.7,534.42],"5-31-17":[10.7,850.91],"4-15-8":[-5631.84,1866.57],"6-63-36":[11.05,535.26],"6-63-37":[12.72,1059.45],"5-31-18":[11.05,1059.45],"6-63-38":[13.43,539.26],"6-63-39":[14.75,528.02],"5-31-19":[12.65,539.26],"4-15-9":[-99.67,1059.45],"3-7-4":[-6535.92,1866.57],"6-63-40":[15.89,392.77],"6-63-41":[17.66,514.08],"5-31-20":[13.65,679.87],"6-63-42":[18.18,854.51],"6-63-43":[17.22,2207.98],"5-31-21":[16.17,3730.02],"4-15-10":[-4462.04,4091.3],"6-63-44":[-2692.96,1819.27],"6-63-45":[-2727.24,2335.87],"5-31-22":[-2727.24,3440.21],"6-63-46":[-94.68,2294.55],"6-63-47":[-3267.83,3213.77],"5-31-23":[-4748.41,3213.77],"4-15-11":[-5088.63,3440.21],"3-7-5":[-6001.14,4091.3],"2-3-2":[-7677.07,4091.3],"6-63-48":[-2413.96,314.06],"6-63-49":[-125.93,458.45],"5-31-24":[-4763.6,627.25],"6-63-50":[-10.71,680.68],"6-63-51":[-74.8,920.28],"5-31-25":[-251.76,1059.5],"4-15-12":[-5033.05,1059.5],"6-63-52":[-207.69,768.72],"6-63-53":[-1592.49,477.85],"5-31-26":[-1592.49,1324.16],"6-63-54":[-3090.17,27.14],"6-63-55":[-3709.78,26.46],"5-31-27":[-3904.05,27.14],"4-15-13":[-3904.05,1324.16],"3-7-6":[-5782.44,2074.83],"6-63-56":[-3741.06,27.93],"6-63-57":[-3312.16,2064.74],"5-31-28":[-3764.97,2479.23],"6-63-58":[-3792.48,2924.47],"6-63-59":[-3755.19,2804.3],"5-31-29":[-3792.48,2924.47],"4-15-14":[-3792.48,2924.47],"6-63-60":[-4389.4,2430.85],"6-63-61":[-4358.46,2498.87],"5-31-30":[-4712.91,2498.87],"6-63-62":[-4399.93,2597.05],"6-63-63":[-4364.12,2749.47],"5-31-31":[-4452.31,2749.47],"4-15-15":[-4835.02,2749.47],"3-7-7":[-4835.02,2924.47],"2-3-3":[-5782.44,3601.13],"1-1-1":[-8765.31,6969.13],"0-0-0":[-10751.44,6969.13],"6-64-0":[-1334.18,71.4],"6-64-1":[-500.53,635.35],"6-64-2":[-1479.4,533.01],"6-64-3":[-727.38,868.41],"6-64-4":[-758.4,672.79],"6-64-5":[-493.96,1542.28],"6-64-6":[-1124.19,2748.59],"6-64-7":[-4705.66,97.64],"6-64-8":[-4703.7,101.59],"6-64-9":[-5432.74,100.52],"6-64-10":[-5630.75,100.56],"6-64-11":[-5630.75,95.58],"6-64-12":[-5345.91,93.35],"6-64-13":[-3563.83,320.14],"6-64-14":[-4443.47,478.36],"6-64-15":[-5021.66,1880.44],"6-64-16":[-5151.99,3439.27],"6-64-17":[-5464.6,2431.2],"6-64-18":[-5552.88,942.66],"6-64-19":[-5435.68,1847.74],"6-64-20":[-5111.48,1993.84],"6-64-21":[-5001.86,739.39],"6-64-22":[-5851.42,750.53],"6-64-23":[-5757.84,1166.19],"6-64-24":[-5891.23,962.42],"6-64-25":[-6214.46,863.32],"6-64-26":[-6405.06,556.46],"6-64-27":[-5931.02,439.96],"6-64-28":[-5910,880.1],"6-64-29":[-5948.93,1022.44],"6-64-30":[-5525.52,111.21],"6-64-31":[-5035.82,34.38],"6-64-32":[-5581.84,36.77],"6-64-33":[-4837,36.62],"6-64-34":[-3062.65,975.32],"6-64-35":[9.43,830.09],"6-64-36":[10.62,427.95],"6-64-37":[12.53,530.46],"6-64-38":[14.73,818.13],"6-64-39":[16.29,941.03],"6-64-40":[19.97,1131.19],"6-64-41":[19.97,747.03],"6-64-42":[20.9,738.64],"6-64-43":[20.23,1991.34],"6-64-44":[-2678.87,1870.96],"6-64-45":[-3009.41,892.45],"6-64-46":[-2298.84,2396.54],"6-64-47":[20.07,3307.05],"6-64-48":[21.17,1814.23],"6-64-49":[-19.17,460.22],"6-64-50":[-31.06,303.6],"6-64-51":[-119.99,69.5],"6-64-52":[-193.68,48.1],"6-64-53":[-365.14,33.44],"6-64-54":[-2807.25,34.01],"6-64-55":[-3663.22,33.97],"6-64-56":[-3651.68,28.87],"6-64-57":[-3375.09,2706.61],"6-64-58":[-3885.42,2970.03],"6-64-59":[-3243.34,2947.12],"6-64-60":[-5524.14,2543.75],"6-64-61":[-4267.84,2526.16],"6-64-62":[-4884.95,2618.03],"6-64-63":[-4358.43,2752.45],"6-65-0":[-1098.57,57.45],"6-65-1":[-389.02,564.12],"5-32-0":[-1334.18,635.35],"6-65-2":[-1174.16,508.61],"6-65-3":[-740.81,668.75],"5-32-1":[-1479.4,868.41],"6-65-4":[-627.75,699.43],"6-65-5":[-30.98,1367.57],"5-32-2":[-758.4,1542.28],"6-65-6":[-873.13,2772.09],"6-65-7":[-4574.33,94.7],"5-32-3":[-4705.66,2772.09],"6-65-8":[-4519.12,94.18],"6-65-9":[-5430.79,935.72],"5-32-4":[-5432.74,935.72],"6-65-10":[-5726.93,1428.23],"6-65-11":[-6027.37,136.3],"5-32-5":[-6027.37,1428.23],"6-65-12":[-5142.23,676.88],"6-65-13":[-4740.25,286.33],"5-32-6":[-5345.91,676.88],"6-65-14":[-4635.6,643.32],"6-65-15":[-5295.44,2274.24],"5-32-7":[-5295.44,2274.24],"6-65-16":[-5773.02,2373.31],"6-65-17":[-5528.15,1377.73],"5-32-8":[-5773.02,3439.27],"6-65-18":[-5597.07,1623.57],"6-65-19":[-5634.6,2161.99],"5-32-9":[-5634.6,2161.99],"6-65-20":[-5459.42,941.46],"6-65-21":[-5394.57,739.39],"5-32-10":[-5459.42,1993.84],"6-65-22":[-5524.01,1758.12],"6-65-23":[-5571.83,2914.18],"5-32-11":[-5851.42,2914.18],"6-65-24":[-5683.47,1308.02],"6-65-25":[-6049.62,733.03],"5-32-12":[-6214.46,1308.02],"6-65-26":[-5647.11,683.02],"6-65-27":[-5806.28,527.99],"5-32-13":[-6405.06,683.02],"6-65-28":[-5769.39,650.86],"6-65-29":[-5697.53,1095.61],"5-32-14":[-5948.93,1095.61],"6-65-30":[-5530.49,66.62],"6-65-31":[-4657.52,281.88],"5-32-15":[-5530.49,281.88],"6-65-32":[-4440.82,391.88],"6-65-33":[-4218.77,47.91],"5-32-16":[-5581.84,391.88],"6-65-34":[-2997.79,933.61],"6-65-35":[8.94,572.18],"5-32-17":[-3062.65,975.32],"6-65-36":[10.62,508.69],"6-65-37":[12.58,666.01],"5-32-18":[10.62,666.01],"6-65-38":[14.93,725.01],"6-65-39":[17.15,1254.61],"5-32-19":[14.73,1254.61],"6-65-40":[20.87,2815.18],"6-65-41":[22.64,1798.58],"5-32-20":[19.97,2815.18],"6-65-42":[22.51,738.64],"6-65-43":[20.23,937.99],"5-32-21":[20.23,1991.34],"6-65-44":[17.99,2193.6],"6-65-45":[-2963.47,1675],"5-32-22":[-3009.41,2193.6],"6-65-46":[-2928.08,1301.3],"6-65-47":[-2362.09,2234.57],"5-32-23":[-2928.08,3307.05],"6-65-48":[21.17,2126.31],"6-65-49":[-49.16,634.25],"5-32-24":[-49.16,2126.31],"6-65-50":[-3.62,255.51],"6-65-51":[-34.57,778.86],"5-32-25":[-119.99,778.86],"6-65-52":[-310.82,125.03],"6-65-53":[-1207.43,1371.74],"5-32-26":[-1207.43,1371.74],"6-65-54":[-2395.72,894.58],"6-65-55":[-2359.67,34.42],"5-32-27":[-3663.22,894.58],"6-65-56":[-3251.41,29.79],"6-65-57":[-3500.86,3054.91],"5-32-28":[-3651.68,3054.91],"6-65-58":[-3769.91,3100.96],"6-65-59":[-3303.24,3103.71],"5-32-29":[-3885.42,3103.71],"6-65-60":[-5524.14,2692.57],"6-65-61":[-4197.79,2548.45],"5-32-30":[-5524.14,2692.57],"6-65-62":[-5404.2,2639.22],"6-65-63":[-4369.78,2753.44],"5-32-31":[-5404.2,2753.44],"6-66-0":[-1299.53,57.45],"6-66-1":[-546.13,504.13],"6-66-2":[-1357.4,434.6],"6-66-3":[-827.83,430.64],"6-66-4":[-325.44,548.76],"6-66-5":[-25.54,1298.81],"6-66-6":[-925.44,3079.8],"6-66-7":[-4327.24,90.09],"6-66-8":[-4943.8,87.08],"6-66-9":[-5452.19,2049.01],"6-66-10":[-5694.43,2462.53],"6-66-11":[-5794.53,1233.38],"6-66-12":[-5386.45,117],"6-66-13":[-4487.2,876.36],"6-66-14":[-4794.62,1537.53],"6-66-15":[-5225.42,4840.9],"6-66-16":[-5125.62,4069.35],"6-66-17":[-6457.04,838.48],"6-66-18":[-5626.94,1553.78],"6-66-19":[-5791.54,2250.36],"6-66-20":[-5551.91,336.76],"6-66-21":[-5781.56,611.03],"6-66-22":[-5219.71,1857.82],"6-66-23":[-4876.68,2746.4],"6-66-24":[-5426.1,1769.87],"6-66-25":[-5582.63,1672.93],"6-66-26":[-5492.86,774.79],"6-66-27":[-5473.4,874.43],"6-66-28":[-5417.7,1294.91],"6-66-29":[-5122.17,816.36],"6-66-30":[-4914.13,431.08],"6-66-31":[-4204.51,2007.45],"6-66-32":[-3670.86,1816.45],"6-66-33":[-2644.22,362.07],"6-66-34":[7.09,766.35],"6-66-35":[8.79,1258.09],"6-66-36":[11.61,820.42],"6-66-37":[13.1,766.79],"6-66-38":[15.69,1619.97],"6-66-39":[19.55,1713.86],"6-66-40":[22.63,2725.4],"6-66-41":[24.02,1802.55],"6-66-42":[22.8,608.18],"6-66-43":[22.8,289.7],"6-66-44":[-3.93,2284.42],"6-66-45":[-3107.33,1585.24],"6-66-46":[-2944.98,813.79],"6-66-47":[-2724.13,3919.02],"6-66-48":[23.35,4706.54],"6-66-49":[23.35,1505.08],"6-66-50":[-149.54,861.98],"6-66-51":[-21.04,111.68],"6-66-52":[-546.34,1206.24],"6-66-53":[-1225.97,2364.91],"6-66-54":[-740.87,2008.92],"6-66-55":[-1651.18,33.84],"6-66-56":[-3214.03,30.48],"6-66-57":[-3430.56,3138.57],"6-66-58":[-3550.91,3267.05],"6-66-59":[-3667.44,3207.22],"6-66-60":[-2502.69,2800.27],"6-66-61":[-4064.25,2565.62],"6-66-62":[-5150.03,2666.15],"6-66-63":[-4380.24,2755.44],"6-67-0":[-1411.07,38.77],"6-67-1":[-777.85,325.07],"5-33-0":[-1411.07,504.13],"6-67-2":[-1008.17,301.02],"6-67-3":[-841.35,786.22],"5-33-1":[-1357.4,786.22],"4-16-0":[-1479.4,868.41],"6-67-4":[-120.01,946.45],"6-67-5":[24.93,1165.91],"5-33-2":[-325.44,1298.81],"6-67-6":[-675.67,2826.89],"6-67-7":[-4145.22,85.5],"5-33-3":[-4327.24,3079.8],"4-16-1":[-4705.66,3079.8],"6-67-8":[-5265.72,197.75],"6-67-9":[-6317.1,2315.19],"5-33-4":[-6317.1,2315.19],"6-67-10":[-5541.28,2472.36],"6-67-11":[-6275.45,847.8],"5-33-5":[-6275.45,2472.36],"4-16-2":[-6317.1,2472.36],"6-67-12":[-5974.42,217.69],"6-67-13":[-6088.36,1186.21],"5-33-6":[-6088.36,1186.21],"6-67-14":[-4895.96,1069.93],"6-67-15":[-5222.06,4029.26],"5-33-7":[-5225.42,4840.9],"4-16-3":[-6088.36,4840.9],"6-67-16":[-5683.46,2694.01],"6-67-17":[-5551.89,2374.38],"5-33-8":[-6457.04,4069.35],"6-67-18":[-6708.74,1143.75],"6-67-19":[-5720.89,1413.3],"5-33-9":[-6708.74,2250.36],"4-16-4":[-6708.74,4069.35],"6-67-20":[-5387.04,728.47],"6-67-21":[-5364.72,762.97],"5-33-10":[-5781.56,762.97],"6-67-22":[-5068.72,1483.6],"6-67-23":[-4831.99,1924.9],"5-33-11":[-5219.71,2746.4],"4-16-5":[-5851.42,2914.18],"6-67-24":[-5042.96,1977.29],"6-67-25":[-5197.69,2023.83],"5-33-12":[-5582.63,2023.83],"6-67-26":[-5129.75,714.89],"6-67-27":[-4799.44,784.44],"5-33-13":[-5492.86,874.43],"4-16-6":[-6405.06,2023.83],"6-67-28":[-4895.37,1784.96],"6-67-29":[-4493.72,3028.39],"5-33-14":[-5417.7,3028.39],"6-67-30":[-4058.35,4049.43],"6-67-31":[-2094.93,1231.48],"5-33-15":[-4914.13,4049.43],"4-16-7":[-5948.93,4049.43],"6-67-32":[-2544.85,1215.48],"6-67-33":[-2020.52,4000.43],"5-33-16":[-3670.86,4000.43],"6-67-34":[7.15,2977.39],"6-67-35":[9.03,1719.96],"5-33-17":[7.09,2977.39],"4-16-8":[-5581.84,4000.43],"6-67-36":[13.46,738.44],"6-67-37":[14.74,703.93],"5-33-18":[11.61,820.42],"6-67-38":[16.09,1946.83],"6-67-39":[20.85,1936.29],"5-33-19":[15.69,1946.83],"4-16-9":[10.62,1946.83],"6-67-40":[22.3,1877.89],"6-67-41":[23.96,1519.31],"5-33-20":[22.3,2725.4],"6-67-42":[24.8,762.58],"6-67-43":[-5.04,735.58],"5-33-21":[-5.04,762.58],"4-16-10":[-5.04,2815.18],"6-67-44":[-201.67,1518.16],"6-67-45":[-2914.72,1093.52],"5-33-22":[-3107.33,2284.42],"6-67-46":[-3023.85,2311.56],"6-67-47":[-2615.5,2568.33],"5-33-23":[-3023.85,3919.02],"4-16-11":[-3107.33,3919.02],"6-67-48":[-59.72,3904.84],"6-67-49":[23.85,1041.93],"5-33-24":[-59.72,4706.54],"6-67-50":[25.43,1154.04],"6-67-51":[-23.45,205.77],"5-33-25":[-149.54,1154.04],"4-16-12":[-149.54,4706.54],"6-67-52":[-660.53,831.59],"6-67-53":[-319.12,2383.62],"5-33-26":[-1225.97,2383.62],"6-67-54":[-558.14,2178.23],"6-67-55":[-1422.15,180.11],"5-33-27":[-1651.18,2178.23],"4-16-13":[-3663.22,2383.62],"6-67-56":[-3048.46,32.07],"6-67-57":[-2893.81,3175.51],"5-33-28":[-3430.56,3175.51],"6-67-58":[-3427.44,3414.15],"6-67-59":[-2366.66,3300.16],"5-33-29":[-3667.44,3414.15],"4-16-14":[-3885.42,3414.15],"6-67-60":[-2060.67,2920.73],"6-67-61":[-4046.55,2579.65],"5-33-30":[-4064.25,2920.73],"6-67-62":[-5067.2,2681.47],"6-67-63":[-4376.88,2759.37],"5-33-31":[-5150.03,2759.37],"4-16-15":[-5524.14,2920.73],"6-68-0":[-1395.97,228.71],"6-68-1":[-746.57,344.56],"6-68-2":[-1204.84,600.81],"6-68-3":[-573.03,1385.65],"6-68-4":[-211.37,1035.73],"6-68-5":[-227.53,1514.04],"6-68-6":[-1218.75,2800.76],"6-68-7":[-3690.64,1058.54],"6-68-8":[-5160.84,1750.98],"6-68-9":[-6317.1,1810.17],"6-68-10":[-5667.86,1715.33],"6-68-11":[-6260.37,400.65],"6-68-12":[-5691.62,248.2],"6-68-13":[-4704.67,988.47],"6-68-14":[-7020.16,1845.84],"6-68-15":[-5826.45,3777.17],"6-68-16":[-6188.92,2893.68],"6-68-17":[-5692.66,2503.27],"6-68-18":[-5375.56,2005.15],"6-68-19":[-5450.8,209.56],"6-68-20":[-4919.36,965.23],"6-68-21":[-4692.14,1068.73],"6-68-22":[-4667.49,1178.67],"6-68-23":[-4122.01,1310.69],"6-68-24":[-3252.84,1657.37],"6-68-25":[-1445.59,2062.81],"6-68-26":[-3234.01,2330.5],"6-68-27":[-3799.02,2407.12],"6-68-28":[-3849.29,1857.59],"6-68-29":[-2704.63,2461.39],"6-68-30":[-1235.92,1585.63],"6-68-31":[88.63,1076.94],"6-68-32":[52.66,1044.68],"6-68-33":[-17.85,1463.62],"6-68-34":[-25.08,2402.42],"6-68-35":[-3.35,1798.57],"6-68-36":[-2.05,2521.11],"6-68-37":[-19.61,2407.1],"6-68-38":[-21.61,2094.46],"6-68-39":[-59.49,1680.35],"6-68-40":[23.13,1273.22],"6-68-41":[24.24,1174.97],"6-68-42":[25.75,1094.83],"6-68-43":[-510.76,969.01],"6-68-44":[-1838.28,128.05],"6-68-45":[-3559.2,1968.98],"6-68-46":[-3590.74,2422.35],"6-68-47":[-77.86,2768.43],"6-68-48":[-48.75,3568.74],"6-68-49":[26.26,1796.66],"6-68-50":[26.82,970.67],"6-68-51":[-12.7,243.29],"6-68-52":[-81.09,392.83],"6-68-53":[8.74,1613.82],"6-68-54":[-371.45,1720.18],"6-68-55":[-731.98,1680.62],"6-68-56":[-2957.29,876.47],"6-68-57":[-2789.98,3169.81],"6-68-58":[-2473.32,3460.36],"6-68-59":[-2118.53,3384.4],"6-68-60":[-2469.5,3077.24],"6-68-61":[-4044.31,2588.56],"6-68-62":[-5294.54,2693.73],"6-68-63":[-4390.55,2763.36],"6-69-0":[-1534.01,353.71],"6-69-1":[-850.67,488.28],"5-34-0":[-1534.01,488.28],"6-69-2":[-1116.49,724.24],"6-69-3":[-389.05,1634.3],"5-34-1":[-1204.84,1634.3],"6-69-4":[-114.79,1233.17],"6-69-5":[-167.07,1537.33],"5-34-2":[-227.53,1537.33],"6-69-6":[-893.03,2579.46],"6-69-7":[-4333.93,1592.64],"5-34-3":[-4333.93,2800.76],"6-69-8":[-5100.83,1958.98],"6-69-9":[-5438.85,1310.43],"5-34-4":[-6317.1,1958.98],"6-69-10":[-5731.52,797.68],"6-69-11":[-6054.28,411.97],"5-34-5":[-6260.37,1715.33],"6-69-12":[-5152.25,280.51],"6-69-13":[-4670.89,1624.81],"5-34-6":[-5691.62,1624.81],"6-69-14":[-5444.08,1918.97],"6-69-15":[-5602.62,2548.59],"5-34-7":[-7020.16,3777.17],"6-69-16":[-5880.21,1992.85],"6-69-17":[-5615.19,2820.36],"5-34-8":[-6188.92,2893.68],"6-69-18":[-5076.52,3340.97],"6-69-19":[-5031.26,288.67],"5-34-9":[-5450.8,3340.97],"6-69-20":[-4517.89,392.95],"6-69-21":[-2713.93,877.11],"5-34-10":[-4919.36,1068.73],"6-69-22":[-1587.65,1976.43],"6-69-23":[-179.5,2379.26],"5-34-11":[-4667.49,2379.26],"6-69-24":[-76.51,3331.17],"6-69-25":[184,1663.86],"5-34-12":[-3252.84,3331.17],"6-69-26":[148.07,1957.8],"6-69-27":[176.23,2555.3],"5-34-13":[-3799.02,2555.3],"6-69-28":[29.61,2065.15],"6-69-29":[275.12,1747.94],"5-34-14":[-3849.29,2461.39],"6-69-30":[175.88,1070.44],"6-69-31":[253.73,861.8],"5-34-15":[-1235.92,1585.63],"6-69-32":[-26.92,879.81],"6-69-33":[167.87,1051.06],"5-34-16":[-26.92,1463.62],"6-69-34":[256.14,1735.94],"6-69-35":[12.55,2127.16],"5-34-17":[-25.08,2402.42],"6-69-36":[166.21,2639.31],"6-69-37":[175.08,2023.5],"5-34-18":[-19.61,2639.31],"6-69-38":[215,1749.24],"6-69-39":[10.84,3232.15],"5-34-19":[-59.49,3232.15],"6-69-40":[-162.31,2386.26],"6-69-41":[-159.88,2015.68],"5-34-20":[-162.31,2386.26],"6-69-42":[18.98,938.39],"6-69-43":[-2052.93,390.74],"5-34-21":[-2052.93,1094.83],"6-69-44":[-4025.63,257.63],"6-69-45":[-3561.57,3305.09],"5-34-22":[-4025.63,3305.09],"6-69-46":[-3491.33,2729.6],"6-69-47":[-498.59,1910.02],"5-34-23":[-3590.74,2768.43],"6-69-48":[-34.71,2419.32],"6-69-49":[27.99,1810.92],"5-34-24":[-48.75,3568.74],"6-69-50":[27.14,1580.34],"6-69-51":[-65.55,271.04],"5-34-25":[-65.55,1580.34],"6-69-52":[-38.22,401.67],"6-69-53":[22.44,782.08],"5-34-26":[-81.09,1613.82],"6-69-54":[19.27,1264.46],"6-69-55":[-516.11,1855.33],"5-34-27":[-731.98,1855.33],"6-69-56":[-2615.8,1502.36],"6-69-57":[-2563.83,3108.4],"5-34-28":[-2957.29,3169.81],"6-69-58":[-2060.43,3514.26],"6-69-59":[-931.16,3446.22],"5-34-29":[-2473.32,3514.26],"6-69-60":[-2662.69,3147.37],"6-69-61":[-4050.55,2608.3],"5-34-30":[-4050.55,3147.37],"6-69-62":[-4985.7,2704.02],"6-69-63":[-4378.1,2767.34],"5-34-31":[-5294.54,2767.34],"6-70-0":[-1296.53,146.9],"6-70-1":[-771.95,377.43],"6-70-2":[-1112.58,582.7],"6-70-3":[-12.71,1635.74],"6-70-4":[-143.04,1193.37],"6-70-5":[30.17,1777.45],"6-70-6":[-870.06,2266.17],"6-70-7":[-4579.35,2122.75],"6-70-8":[-5091.86,2096.53],"6-70-9":[-5441.27,735.36],"6-70-10":[-5521.23,350.95],"6-70-11":[-5870.11,119.82],"6-70-12":[-5490.68,358.72],"6-70-13":[-4850.2,462.61],"6-70-14":[-5849.2,2057.45],"6-70-15":[-5313.8,1043.38],"6-70-16":[-5533.8,2489.77],"6-70-17":[-5647.65,2049.01],"6-70-18":[-5270.37,753.24],"6-70-19":[-4446.22,1946.4],"6-70-20":[-2062.42,2219.67],"6-70-21":[-190.7,1622.53],"6-70-22":[68.85,2131.4],"6-70-23":[343.56,2428.71],"6-70-24":[27.16,3468.04],"6-70-25":[108.1,2059.93],"6-70-26":[121.91,1646.91],"6-70-27":[274.16,1823.65],"6-70-28":[322.1,1743.04],"6-70-29":[354.64,1235.68],"6-70-30":[262.03,872.26],"6-70-31":[254.18,533.95],"6-70-32":[223.98,518.93],"6-70-33":[192.31,886.28],"6-70-34":[374.92,1242.7],"6-70-35":[339.89,1757.04],"6-70-36":[292.26,1831.76],"6-70-37":[178.82,1687.18],"6-70-38":[175.77,2162.84],"6-70-39":[527.04,3422.04],"6-70-40":[356.51,2505.72],"6-70-41":[47.81,2222.4],"6-70-42":[-651.9,1720.53],"6-70-43":[-3892.14,2268.67],"6-70-44":[-4167.54,2017.39],"6-70-45":[-4024.78,727.91],"6-70-46":[-2423.02,1931.45],"6-70-47":[-1183.92,2422.92],"6-70-48":[29.91,1026.9],"6-70-49":[29.84,2002.07],"6-70-50":[31.81,455.04],"6-70-51":[-106.87,346],"6-70-52":[-425.67,109.12],"6-70-53":[-275.99,320.25],"6-70-54":[-257.87,689.96],"6-70-55":[15.38,1949.22],"6-70-56":[-1496.13,2034.64],"6-70-57":[-1371.09,3052.08],"6-70-58":[-472.27,3536.78],"6-70-59":[-295.51,3480.29],"6-70-60":[-2571.36,3239.33],"6-70-61":[-4037.07,2709.23],"6-70-62":[-4806.88,2724.91],"6-70-63":[-4397.11,2768.65],"6-71-0":[-1366.5,180.42],"6-71-1":[-1045.85,177.35],"5-35-0":[-1366.5,377.43],"6-71-2":[-1106.99,577.96],"6-71-3":[-139.06,862.17],"5-35-1":[-1112.58,1635.74],"4-17-0":[-1534.01,1635.74],"6-71-4":[-31.29,779.54],"6-71-5":[27.24,1826.93],"5-35-2":[-143.04,1826.93],"6-71-6":[-972.15,2236.9],"6-71-7":[-4515.43,1854.14],"5-35-3":[-4579.35,2266.17],"4-17-1":[-4579.35,2800.76],"3-8-0":[-4705.66,3079.8],"6-71-8":[-5083,851.76],"6-71-9":[-5368.62,511.56],"5-35-4":[-5441.27,2096.53],"6-71-10":[-5717.96,158.69],"6-71-11":[-6002.07,214.15],"5-35-5":[-6002.07,350.95],"4-17-2":[-6317.1,2096.53],"6-71-12":[-5985.81,342.67],"6-71-13":[-4829.82,644.43],"5-35-6":[-5985.81,644.43],"6-71-14":[-5630.52,2648.45],"6-71-15":[-5696.39,1842.42],"5-35-7":[-5849.2,2648.45],"4-17-3":[-7020.16,3777.17],"3-8-1":[-7020.16,4840.9],"6-71-16":[-5400.18,2700.03],"6-71-17":[-5606.51,2930.53],"5-35-8":[-5647.65,2930.53],"6-71-18":[-5476.96,2524.92],"6-71-19":[-2974.28,1636.67],"5-35-9":[-5476.96,2524.92],"4-17-4":[-6188.92,3340.97],"6-71-20":[18.37,2264.81],"6-71-21":[-31.98,1643.49],"5-35-10":[-2062.42,2264.81],"6-71-22":[94.19,1557.97],"6-71-23":[273.49,1396.87],"5-35-11":[68.85,2428.71],"4-17-5":[-4919.36,2428.71],"3-8-2":[-6708.74,4069.35],"6-71-24":[452.55,1492.56],"6-71-25":[308.29,1368.77],"5-35-12":[27.16,3468.04],"6-71-26":[326.68,1369.26],"6-71-27":[373.83,1499.67],"5-35-13":[121.91,1823.65],"4-17-6":[-3799.02,3468.04],"6-71-28":[371.4,1383.2],"6-71-29":[382.62,1091.79],"5-35-14":[322.1,1743.04],"6-71-30":[291.34,761.73],"6-71-31":[282.28,584.48],"5-35-15":[254.18,872.26],"4-17-7":[-3849.29,2461.39],"3-8-3":[-6405.06,4049.43],"6-71-32":[271.34,592.5],"6-71-33":[253.5,758.09],"5-35-16":[192.31,886.28],"6-71-34":[393.62,1099.25],"6-71-35":[383.62,1385.35],"5-35-17":[339.89,1757.04],"4-17-8":[-26.92,2402.42],"6-71-36":[388.19,1507.74],"6-71-37":[353.84,1380.25],"5-35-18":[178.82,1831.76],"6-71-38":[344.8,1371.66],"6-71-39":[487.74,1497.56],"5-35-19":[175.77,3422.04],"4-17-9":[-59.49,3422.04],"3-8-4":[-5581.84,4000.43],"6-71-40":[291.96,1399.38],"6-71-41":[101.97,1582.99],"5-35-20":[47.81,2505.72],"6-71-42":[-192.85,1667.49],"6-71-43":[-3939.79,2341.81],"5-35-21":[-3939.79,2341.81],"4-17-10":[-3939.79,2505.72],"6-71-44":[-5096.78,1732.68],"6-71-45":[-5096.08,2430.31],"5-35-22":[-5096.78,2430.31],"6-71-46":[-1220.58,2821.28],"6-71-47":[30.14,2550.27],"5-35-23":[-2423.02,2821.28],"4-17-11":[-5096.78,3305.09],"3-8-5":[-5096.78,3919.02],"6-71-48":[31.75,1822.33],"6-71-49":[32.11,2509.12],"5-35-24":[29.84,2509.12],"6-71-50":[33.7,620.24],"6-71-51":[-70.85,335.96],"5-35-25":[-106.87,620.24],"4-17-12":[-106.87,3568.74],"6-71-52":[-218.92,210.85],"6-71-53":[-209.1,157.78],"5-35-26":[-425.67,320.25],"6-71-54":[-161.71,548.2],"6-71-55":[-109.75,820.05],"5-35-27":[-257.87,1949.22],"4-17-13":[-731.98,1949.22],"3-8-6":[-3663.22,4706.54],"6-71-56":[-427.72,1800.79],"6-71-57":[-457.25,2944.43],"5-35-28":[-1496.13,3052.08],"6-71-58":[-482.06,3600.93],"6-71-59":[-266.53,3598.47],"5-35-29":[-482.06,3600.93],"4-17-14":[-2957.29,3600.93],"6-71-60":[-2661.25,3295.33],"6-71-61":[-4172.92,2810.96],"5-35-30":[-4172.92,3295.33],"6-71-62":[-5181.02,2751.92],"6-71-63":[-4390.32,2771.32],"5-35-31":[-5181.02,2771.32],"4-17-15":[-5294.54,3295.33],"3-8-7":[-5524.14,3600.93],"6-72-0":[-1151.65,235.57],"6-72-1":[-1116.99,366.1],"6-72-2":[-1218.03,841.26],"6-72-3":[-155.53,753.17],"6-72-4":[18.55,948.27],"6-72-5":[22.7,1790.98],"6-72-6":[-847.11,2859.42],"6-72-7":[-4432.93,1167.12],"6-72-8":[-5028.12,435.24],"6-72-9":[-5233.47,286.65],"6-72-10":[-5869.59,241.92],"6-72-11":[-6044.56,275.13],"6-72-12":[-6053.24,318.56],"6-72-13":[-5914.13,382.74],"6-72-14":[-5764.94,1998.12],"6-72-15":[-6150.11,2540.92],"6-72-16":[-5652.67,2847.57],"6-72-17":[-5293.94,2950.99],"6-72-18":[-5648.78,2427.62],"6-72-19":[-5036.24,2464.23],"6-72-20":[7.73,2380.96],"6-72-21":[-11.66,1773.15],"6-72-22":[88.27,1869.59],"6-72-23":[289.98,1464.79],"6-72-24":[470.56,1912.86],"6-72-25":[498.02,1340.77],"6-72-26":[593.56,1710.7],"6-72-27":[454.32,3017.52],"6-72-28":[444.14,1527.59],"6-72-29":[442.37,1113.75],"6-72-30":[352.38,786.57],"6-72-31":[319.72,701.62],"6-72-32":[322.07,733.63],"6-72-33":[332.54,807.65],"6-72-34":[430.54,1119.46],"6-72-35":[449.14,1534.31],"6-72-36":[468.39,2938.51],"6-72-37":[634.18,1558.71],"6-72-38":[538.7,1314.77],"6-72-39":[480.56,1888.87],"6-72-40":[305.79,1498.79],"6-72-41":[87.14,1901.6],"6-72-42":[-6.16,1783.15],"6-72-43":[-3410.48,2501.84],"6-72-44":[-4635.36,2392.7],"6-72-45":[-1535.43,2378.1],"6-72-46":[-1546.81,2846.24],"6-72-47":[32.16,2746.21],"6-72-48":[32.45,2472.37],"6-72-49":[32.5,2002.61],"6-72-50":[34.78,369.41],"6-72-51":[30.32,312.78],"6-72-52":[-33.81,268.25],"6-72-53":[-115.27,236.4],"6-72-54":[-93.35,289.52],"6-72-55":[-118.26,410.07],"6-72-56":[-452.6,1137.67],"6-72-57":[-498.31,3236.81],"6-72-58":[-447.32,3666.27],"6-72-59":[-205.86,3666.27],"6-72-60":[-1730.17,3378.93],"6-72-61":[-4033.67,2968.07],"6-72-62":[-5182.3,2779.15],"6-72-63":[-4400.75,2774.31],"6-73-0":[-1098.45,386.48],"6-73-1":[-252.17,589.35],"5-36-0":[-1151.65,589.35],"6-73-2":[-246.65,1025.36],"6-73-3":[23.45,1256.47],"5-36-1":[-1218.03,1256.47],"6-73-4":[23.04,1575.59],"6-73-5":[22,2167.88],"5-36-2":[18.55,2167.88],"6-73-6":[-768.66,2661.08],"6-73-7":[-4274.15,1083.56],"5-36-3":[-4432.93,2859.42],"6-73-8":[-5101.12,559.12],"6-73-9":[-5237.91,398.6],"5-36-4":[-5237.91,559.12],"6-73-10":[-5410.92,258.06],"6-73-11":[-5818.04,338.7],"5-36-5":[-6044.56,338.7],"6-73-12":[-5916.34,371.65],"6-73-13":[-6576.21,309.64],"5-36-6":[-6576.21,382.74],"6-73-14":[-6043.8,1369.76],"6-73-15":[-6226.23,2520.59],"5-36-7":[-6226.23,2540.92],"6-73-16":[-6031.72,1559.76],"6-73-17":[-4388.63,1798.35],"5-36-8":[-6031.72,2950.99],"6-73-18":[-4756.13,2185.74],"6-73-19":[-4900.81,2137.5],"5-36-9":[-5648.78,2464.23],"6-73-20":[-3072.54,2714.39],"6-73-21":[-117.56,3028.87],"5-36-10":[-3072.54,3028.87],"6-73-22":[27.75,1855.23],"6-73-23":[275.3,2052.36],"5-36-11":[27.75,2052.36],"6-73-24":[280.09,1490.96],"6-73-25":[366.24,1373.07],"5-36-12":[280.09,1912.86],"6-73-26":[428.45,2020.89],"6-73-27":[423.73,1615.01],"5-36-13":[423.73,3017.52],"6-73-28":[386.96,1897.94],"6-73-29":[394.88,1695.64],"5-36-14":[386.96,1897.94],"6-73-30":[425.75,1632.25],"6-73-31":[366.87,1474.32],"5-36-15":[319.72,1632.25],"6-73-32":[374.33,1540.39],"6-73-33":[413.29,1685.26],"5-36-16":[322.07,1685.26],"6-73-34":[408.77,1701.66],"6-73-35":[399.36,1902.71],"5-36-17":[399.36,1902.71],"6-73-36":[436.55,1683.01],"6-73-37":[454.43,2005.89],"5-36-18":[436.55,2938.51],"6-73-38":[387.47,1440.16],"6-73-39":[313.56,1496.99],"5-36-19":[313.56,1888.87],"6-73-40":[303.1,2110.34],"6-73-41":[35.21,1898.28],"5-36-20":[35.21,2110.34],"6-73-42":[-115.12,3126.88],"6-73-43":[-3277.96,2790.11],"5-36-21":[-3410.48,3126.88],"6-73-44":[-4410.36,2087.17],"6-73-45":[-1533.08,2111.08],"5-36-22":[-4635.36,2392.7],"6-73-46":[-1407.82,1782.34],"6-73-47":[-132.5,1515.81],"5-36-23":[-1546.81,2846.24],"6-73-48":[-48.96,2476.4],"6-73-49":[33.33,1341.89],"5-36-24":[-48.96,2476.4],"6-73-50":[35.38,302.26],"6-73-51":[30.59,367.74],"5-36-25":[30.32,369.41],"6-73-52":[27.68,312.58],"6-73-53":[-91.02,254.41],"5-36-26":[-115.27,312.58],"6-73-54":[20.07,387],"6-73-55":[-0.77,495.19],"5-36-27":[-118.26,495.19],"6-73-56":[-62.28,1042.73],"6-73-57":[-430.03,3236.81],"5-36-28":[-498.31,3236.81],"6-73-58":[-439.32,3671.29],"6-73-59":[-323.86,3685.99],"5-36-29":[-447.32,3685.99],"6-73-60":[-1858.42,3441.2],"6-73-61":[-4051.29,3024.01],"5-36-30":[-4051.29,3441.2],"6-73-62":[-4957.74,2818.12],"6-73-63":[-4411.94,2780.49],"5-36-31":[-5182.3,2818.12],"6-74-0":[-1236.82,554.52],"6-74-1":[-115.89,808.27],"6-74-2":[22.03,898.1],"6-74-3":[-214.68,1339.53],"6-74-4":[-109.83,1733.48],"6-74-5":[-19.14,1828.63],"6-74-6":[-1043.71,2004.49],"6-74-7":[-4151.29,736.85],"6-74-8":[-5058.32,3219.23],"6-74-9":[-5278.16,401.9],"6-74-10":[-5420.6,523.35],"6-74-11":[-5510.77,314.28],"6-74-12":[-5800,307.64],"6-74-13":[-6626.98,347.09],"6-74-14":[-6537.35,387.19],"6-74-15":[-6142.73,488.72],"6-74-16":[-6021.75,429.54],"6-74-17":[-5675.14,2570.69],"6-74-18":[-5047.31,3075.92],"6-74-19":[-4902.23,3021.97],"6-74-20":[-3976.43,2037.33],"6-74-21":[-2943.73,3474.34],"6-74-22":[11.08,2304.86],"6-74-23":[11.91,2318.87],"6-74-24":[164.06,1564.06],"6-74-25":[187.45,1723.71],"6-74-26":[300.4,1719.44],"6-74-27":[439.11,1802.88],"6-74-28":[346.35,1700.51],"6-74-29":[356.78,2454.65],"6-74-30":[452.9,3419],"6-74-31":[534,5024.49],"6-74-32":[553.03,4938.48],"6-74-33":[461.33,3461],"6-74-34":[382.42,2489.57],"6-74-35":[381.96,1708.52],"6-74-36":[432.19,1881.89],"6-74-37":[298.55,1739.34],"6-74-38":[217.88,1752.71],"6-74-39":[183.38,1623.82],"6-74-40":[18.19,2352.72],"6-74-41":[18.19,2369.87],"6-74-42":[-47.25,3510.35],"6-74-43":[-3200.67,2075.35],"6-74-44":[-4452.12,2962.7],"6-74-45":[-1603.77,2988.35],"6-74-46":[-2119.52,2510.29],"6-74-47":[-2188.57,416.42],"6-74-48":[-230.72,445.51],"6-74-49":[35.21,379.33],"6-74-50":[35.5,351.6],"6-74-51":[31.79,306.62],"6-74-52":[29.44,332.57],"6-74-53":[-27.17,205.8],"6-74-54":[20.92,394.56],"6-74-55":[18.14,656.54],"6-74-56":[-392.13,716.25],"6-74-57":[-410.17,2976.87],"6-74-58":[-426.08,3667.35],"6-74-59":[-338.34,3732.45],"6-74-60":[-1620.83,3510.17],"6-74-61":[-4272.22,3119.66],"6-74-62":[-4960.26,2893.13],"6-74-63":[-4388.84,2805.44],"6-75-0":[-1220.82,637.81],"6-75-1":[18.94,947.66],"5-37-0":[-1236.82,947.66],"6-75-2":[21.42,1165.87],"6-75-3":[-335.37,1205.39],"5-37-1":[-335.37,1339.53],"4-18-0":[-1236.82,1339.53],"6-75-4":[-108.22,1531.11],"6-75-5":[17.26,1406.61],"5-37-2":[-109.83,1828.63],"6-75-6":[-680,2529.86],"6-75-7":[-3764.21,1181.22],"5-37-3":[-4151.29,2529.86],"4-18-1":[-4432.93,2859.42],"6-75-8":[-4934.93,712.47],"6-75-9":[-5173.02,4110.39],"5-37-4":[-5278.16,4110.39],"6-75-10":[-5338.72,318.43],"6-75-11":[-5582.3,357.76],"5-37-5":[-5582.3,523.35],"4-18-2":[-6044.56,4110.39],"6-75-12":[-5891.33,313.84],"6-75-13":[-5966.26,252.12],"5-37-6":[-6626.98,347.09],"6-75-14":[-6187.44,293.98],"6-75-15":[-5647.59,195.69],"5-37-7":[-6537.35,488.72],"4-18-3":[-6626.98,2540.92],"6-75-16":[-6289.49,673.31],"6-75-17":[-6185.21,2438.12],"5-37-8":[-6289.49,2570.69],"6-75-18":[-5007.04,3012.55],"6-75-19":[-4544.81,2342.54],"5-37-9":[-5047.31,3075.92],"4-18-4":[-6289.49,3075.92],"6-75-20":[-4169.53,223.67],"6-75-21":[-3183.61,1970.91],"5-37-10":[-4169.53,3474.34],"6-75-22":[-1688.18,2002.31],"6-75-23":[-207.39,1362.61],"5-37-11":[-1688.18,2318.87],"4-18-5":[-4169.53,3474.34],"6-75-24":[65.06,2320.42],"6-75-25":[91.67,2518.28],"5-37-12":[65.06,2518.28],"6-75-26":[104.79,1669.47],"6-75-27":[352.02,1809.35],"5-37-13":[104.79,1809.35],"4-18-6":[65.06,3017.52],"6-75-28":[354.16,2864.49],"6-75-29":[356.57,2398.3],"5-37-14":[346.35,2864.49],"6-75-30":[389.82,3166.22],"6-75-31":[594.3,2060.9],"5-37-15":[389.82,5024.49],"4-18-7":[319.72,5024.49],"6-75-32":[585.06,2012.4],"6-75-33":[416.69,3105.21],"5-37-16":[416.69,4938.48],"6-75-34":[392.48,2443.31],"6-75-35":[382.84,2943.5],"5-37-17":[381.96,2943.5],"4-18-8":[322.07,4938.48],"6-75-36":[378.03,1864.36],"6-75-37":[93.22,1716.39],"5-37-18":[93.22,1881.89],"6-75-38":[74.67,2583.3],"6-75-39":[57.48,2427.44],"5-37-19":[57.48,2583.3],"4-18-9":[57.48,2938.51],"6-75-40":[-242.83,1442.62],"6-75-41":[-91.25,2018.31],"5-37-20":[-242.83,2369.87],"6-75-42":[-83.43,1989.17],"6-75-43":[-2707.91,240.08],"5-37-21":[-3200.67,3510.35],"4-18-10":[-3410.48,3510.35],"6-75-44":[-2823.85,2320.44],"6-75-45":[-1210.6,2953.57],"5-37-22":[-4452.12,2988.35],"6-75-46":[-2177.38,2379.21],"6-75-47":[-2265.89,699.95],"5-37-23":[-2265.89,2510.29],"4-18-11":[-4635.36,2988.35],"6-75-48":[-215.43,194.97],"6-75-49":[-173.62,295.62],"5-37-24":[-230.72,445.51],"6-75-50":[36.6,248.97],"6-75-51":[34.25,310.31],"5-37-25":[31.79,351.6],"4-18-12":[-230.72,2476.4],"6-75-52":[30.27,360.14],"6-75-53":[-41.42,701.92],"5-37-26":[-41.42,701.92],"6-75-54":[20.79,428.74],"6-75-55":[-121.89,777.04],"5-37-27":[-121.89,777.04],"4-18-13":[-121.89,777.04],"6-75-56":[-384.7,1213.92],"6-75-57":[-447.71,2787.68],"5-37-28":[-447.71,2976.87],"6-75-58":[-375.05,3670.33],"6-75-59":[-331.06,3745.57],"5-37-29":[-426.08,3745.57],"4-18-14":[-498.31,3745.57],"6-75-60":[-1033.03,3590.97],"6-75-61":[-4324.73,3236.16],"5-37-30":[-4324.73,3590.97],"6-75-62":[-4687.77,2971.57],"6-75-63":[-4404.37,2839.82],"5-37-31":[-4960.26,2971.57],"4-18-15":[-5182.3,3590.97],"6-76-0":[-1100.37,787.46],"6-76-1":[18.88,1369.31],"6-76-2":[20.05,1230.96],"6-76-3":[-173.13,1383.91],"6-76-4":[15.48,1488.42],"6-76-5":[14.03,1534.77],"6-76-6":[-164.43,2313.76],"6-76-7":[-3852.41,1139.05],"6-76-8":[-4903.69,538.64],"6-76-9":[-5169.28,306.08],"6-76-10":[-5362.81,316.75],"6-76-11":[-5483.38,357.69],"6-76-12":[-5573.62,332.1],"6-76-13":[-5588.1,291.25],"6-76-14":[-5682.31,251.97],"6-76-15":[-5514.79,721.64],"6-76-16":[-5255.82,1541.99],"6-76-17":[-5815.38,2603.85],"6-76-18":[-6277.37,3897.68],"6-76-19":[-5944.74,3093.99],"6-76-20":[-4889.87,2689.12],"6-76-21":[-3229.67,2516.84],"6-76-22":[-2487.96,2262.38],"6-76-23":[-2603.95,1972.68],"6-76-24":[-2073.83,2173.07],"6-76-25":[-93.96,1794.5],"6-76-26":[28.49,2849.88],"6-76-27":[217.45,2729.65],"6-76-28":[235.12,3267.45],"6-76-29":[230.59,3342.07],"6-76-30":[309.01,3564.01],"6-76-31":[236.85,4305.91],"6-76-32":[258.3,4251.91],"6-76-33":[330.21,3634.02],"6-76-34":[206.1,3310.07],"6-76-35":[230.19,3133.45],"6-76-36":[-18.37,2712.65],"6-76-37":[7.99,2969.88],"6-76-38":[-27.14,1841.51],"6-76-39":[-90.16,2064.08],"6-76-40":[-2173.17,1805.67],"6-76-41":[-2277.59,2225.38],"6-76-42":[-1756.08,2563.86],"6-76-43":[-2149.83,2801.7],"6-76-44":[-2247.85,3074.25],"6-76-45":[-318.31,3812.51],"6-76-46":[-2278.18,2525.74],"6-76-47":[-2641.23,1537.39],"6-76-48":[-60.34,737.51],"6-76-49":[-15.68,250.51],"6-76-50":[5.94,290.32],"6-76-51":[36.06,326.5],"6-76-52":[32.25,359.97],"6-76-53":[20.17,425.42],"6-76-54":[0.26,323.5],"6-76-55":[-203.89,540.75],"6-76-56":[-284.94,1400],"6-76-57":[-321.47,2930.46],"6-76-58":[-321.94,3670.26],"6-76-59":[-308.26,3781.61],"6-76-60":[-353.67,3628.25],"6-76-61":[-4071.22,3346.55],"6-76-62":[-5122.48,3092.47],"6-76-63":[-4415.19,2876.01],"6-77-0":[-1124.35,1055.36],"6-77-1":[18.74,1392.41],"5-38-0":[-1124.35,1392.41],"6-77-2":[19.64,1229.3],"6-77-3":[-94.34,1373.41],"5-38-1":[-173.13,1383.91],"6-77-4":[12.81,1634.75],"6-77-5":[12.61,1743.61],"5-38-2":[12.61,1743.61],"6-77-6":[-352.38,1813.53],"6-77-7":[-4089.95,676.92],"5-38-3":[-4089.95,2313.76],"6-77-8":[-4882.69,352.95],"6-77-9":[-5215.5,366.87],"5-38-4":[-5215.5,538.64],"6-77-10":[-5498.32,327.96],"6-77-11":[-5772.44,306.61],"5-38-5":[-5772.44,357.69],"6-77-12":[-5701.29,311.33],"6-77-13":[-5196.38,300.03],"5-38-6":[-5701.29,332.1],"6-77-14":[-5259.29,375.52],"6-77-15":[-4338.29,1214.51],"5-38-7":[-5682.31,1214.51],"6-77-16":[-4941.4,1062.09],"6-77-17":[-5667.66,3382.16],"5-38-8":[-5815.38,3382.16],"6-77-18":[-5914.86,3297.16],"6-77-19":[-5911.63,2377.57],"5-38-9":[-6277.37,3897.68],"6-77-20":[-5580.5,1781.74],"6-77-21":[-5357.43,1378.43],"5-38-10":[-5580.5,2689.12],"6-77-22":[-5016.07,2032.54],"6-77-23":[-4117.39,2355.84],"5-38-11":[-5016.07,2355.84],"6-77-24":[-3411.94,2168.09],"6-77-25":[-2838.58,2735.56],"5-38-12":[-3411.94,2735.56],"6-77-26":[-70.43,3016.69],"6-77-27":[82.06,4526.44],"5-38-13":[-70.43,4526.44],"6-77-28":[-83.3,4259.18],"6-77-29":[-358.33,4177.49],"5-38-14":[-358.33,4259.18],"6-77-30":[-934.21,5793.53],"6-77-31":[142.08,4892.29],"5-38-15":[-934.21,5793.53],"6-77-32":[136.09,5158.31],"6-77-33":[-45.68,5869.55],"5-38-16":[-45.68,5869.55],"6-77-34":[-49.58,4123.49],"6-77-35":[-48.06,4205.18],"5-38-17":[-49.58,4205.18],"6-77-36":[-18.95,4458.44],"6-77-37":[-438.11,2927.68],"5-38-18":[-438.11,4458.44],"6-77-38":[-2829.96,2650.56],"6-77-39":[-2796.31,2037.87],"5-38-19":[-2829.96,2650.56],"6-77-40":[-2472.44,2270.84],"6-77-41":[-1743.75,2075.54],"5-38-20":[-2472.44,2270.84],"6-77-42":[9.2,1378.06],"6-77-43":[15.55,1800.57],"5-38-21":[-2149.83,2801.7],"6-77-44":[24.23,2378.7],"6-77-45":[27.4,3201.77],"5-38-22":[-2247.85,3812.51],"6-77-46":[-2116.73,3332.16],"6-77-47":[-2192.81,1046.56],"5-38-23":[-2641.23,3332.16],"6-77-48":[-40.14,1277.56],"6-77-49":[42.15,369.81],"5-38-24":[-60.34,1277.56],"6-77-50":[-102.73,298.77],"6-77-51":[38.18,305.31],"5-38-25":[-102.73,326.5],"6-77-52":[33.28,305.57],"6-77-53":[29.46,331.34],"5-38-26":[20.17,425.42],"6-77-54":[-0.19,369.05],"6-77-55":[-189.27,356.35],"5-38-27":[-203.89,540.75],"6-77-56":[-235.14,1400],"6-77-57":[-372.29,3035.01],"5-38-28":[-372.29,3035.01],"6-77-58":[-287.74,3670.15],"6-77-59":[-274.5,3814.29],"5-38-29":[-321.94,3814.29],"6-77-60":[-469.71,3652.21],"6-77-61":[-3993.76,3460.18],"5-38-30":[-4071.22,3652.21],"6-77-62":[-5243.84,3182.27],"6-77-63":[-4424.23,2907.97],"5-38-31":[-5243.84,3182.27],"6-78-0":[-970.38,939.18],"6-78-1":[18.5,1250.32],"6-78-2":[-30.99,1167.04],"6-78-3":[14.08,1218.6],"6-78-4":[10.33,1687.01],"6-78-5":[8.69,1466.36],"6-78-6":[-400.01,1386.1],"6-78-7":[-3581.29,518.66],"6-78-8":[-4793.25,314.82],"6-78-9":[-5180.83,268.49],"6-78-10":[-5348.63,286.2],"6-78-11":[-5412.25,279.53],"6-78-12":[-4944.88,258.22],"6-78-13":[-4186.19,248.68],"6-78-14":[-4793.25,340.26],"6-78-15":[-4143.61,680.41],"6-78-16":[-5893.98,3881.85],"6-78-17":[-4967.62,3918.41],"6-78-18":[-5507.69,3209.2],"6-78-19":[-5894.31,1446.37],"6-78-20":[-5402.84,949.71],"6-78-21":[-5248.75,1047.17],"6-78-22":[-4866.76,1974.55],"6-78-23":[-4208.66,2149.19],"6-78-24":[-4061.47,2651.93],"6-78-25":[-3288.6,2755.96],"6-78-26":[-3098.02,3297.68],"6-78-27":[-3315.48,3970.6],"6-78-28":[-3578.64,3839.48],"6-78-29":[-3580.79,4373.18],"6-78-30":[-3657.85,1692.99],"6-78-31":[-3167.58,881.98],"6-78-32":[-77.85,835.18],"6-78-33":[-77.15,1678.99],"6-78-34":[-74.93,4326.17],"6-78-35":[-67.51,3769.59],"6-78-36":[-130.64,3880.6],"6-78-37":[-2000.23,3253.67],"6-78-38":[-2030.7,2669.71],"6-78-39":[-711.3,2607.92],"6-78-40":[-3.87,2060.19],"6-78-41":[3.4,2044.8],"6-78-42":[8.86,1048.06],"6-78-43":[15.8,951.21],"6-78-44":[24.72,1433.82],"6-78-45":[29.26,3156.2],"6-78-46":[-2024.01,3821.45],"6-78-47":[-2001.31,3842.94],"6-78-48":[-74.88,677.36],"6-78-49":[11.18,337.93],"6-78-50":[45.44,248.74],"6-78-51":[40.21,253.02],"6-78-52":[34.91,285.29],"6-78-53":[31.4,287.71],"6-78-54":[-3.31,270.42],"6-78-55":[-81.06,316.21],"6-78-56":[-257.78,1829.25],"6-78-57":[-388.9,3049.46],"6-78-58":[-347.69,3654.4],"6-78-59":[-343.6,3814.29],"6-78-60":[-573.3,3676.48],"6-78-61":[-3981.03,3515.55],"6-78-62":[-5253.05,3278.24],"6-78-63":[-4405.8,2956.72],"6-79-0":[-613.35,1108.07],"6-79-1":[-682.84,1001.69],"5-39-0":[-970.38,1250.32],"6-79-2":[-353.21,781.43],"6-79-3":[-157.61,1344.7],"5-39-1":[-353.21,1344.7],"4-19-0":[-1124.35,1392.41],"6-79-4":[-36.17,1629.79],"6-79-5":[7.69,1296.92],"5-39-2":[-36.17,1687.01],"6-79-6":[-355.26,1171.38],"6-79-7":[-2386.01,1544.08],"5-39-3":[-3581.29,1544.08],"4-19-1":[-4089.95,2313.76],"3-9-0":[-4432.93,2859.42],"6-79-8":[-4562.76,224],"6-79-9":[-5148.85,273.71],"5-39-4":[-5180.83,314.82],"6-79-10":[-5415.85,309.09],"6-79-11":[-5462.34,297.07],"5-39-5":[-5462.34,309.09],"4-19-2":[-5772.44,538.64],"6-79-12":[-5180.01,294.44],"6-79-13":[-4272.35,291.7],"5-39-6":[-5180.01,294.44],"6-79-14":[-5007.92,260.4],"6-79-15":[-4145.05,476.12],"5-39-7":[-5007.92,680.41],"4-19-3":[-5701.29,1214.51],"3-9-1":[-6626.98,4110.39],"2-4-0":[-7020.16,4840.9],"6-79-16":[-5156.24,5616.16],"6-79-17":[-5348.51,5133.37],"5-39-8":[-5893.98,5616.16],"6-79-18":[-4972.35,4058.15],"6-79-19":[-4829.8,3448.78],"5-39-9":[-5894.31,4058.15],"4-19-4":[-6277.37,5616.16],"6-79-20":[-4587.19,377.37],"6-79-21":[-4872.25,790.42],"5-39-10":[-5402.84,1047.17],"6-79-22":[-4701.53,1407.05],"6-79-23":[-4057.57,1499.62],"5-39-11":[-4866.76,2149.19],"4-19-5":[-5580.5,2689.12],"3-9-2":[-6289.49,5616.16],"6-79-24":[-3209.08,1721.97],"6-79-25":[-2548.5,2990.34],"5-39-12":[-4061.47,2990.34],"6-79-26":[-3723.11,3647.39],"6-79-27":[-3701.88,3223.81],"5-39-13":[-3723.11,3970.6],"4-19-6":[-4061.47,4526.44],"6-79-28":[-4216.96,3002.22],"6-79-29":[-4531.33,1451.56],"5-39-14":[-4531.33,4373.18],"6-79-30":[-4682.65,913.05],"6-79-31":[-4288.31,587.03],"5-39-15":[-4682.65,1692.99],"4-19-7":[-4682.65,5793.53],"3-9-3":[-4682.65,5793.53],"2-4-1":[-6708.74,5793.53],"6-79-32":[-3596.12,522.02],"6-79-33":[-86.64,869.52],"5-39-16":[-3596.12,1678.99],"6-79-34":[-81.84,1423.53],"6-79-35":[-1528.24,2909.22],"5-39-17":[-1528.24,4326.17],"4-19-8":[-3596.12,5869.55],"6-79-36":[-1674.39,3169.82],"6-79-37":[-933.73,3564.38],"5-39-18":[-2000.23,3880.6],"6-79-38":[-93.44,2963.33],"6-79-39":[-68.11,1691.97],"5-39-19":[-2030.7,2963.33],"4-19-9":[-2829.96,4458.44],"3-9-4":[-3596.12,5869.55],"6-79-40":[-18.99,1441.6],"6-79-41":[-12.01,1436.47],"5-39-20":[-18.99,2060.19],"6-79-42":[8.42,786.4],"6-79-43":[7.66,379.51],"5-39-21":[7.66,1048.06],"4-19-10":[-2472.44,2801.7],"6-79-44":[24.72,3388.51],"6-79-45":[31.3,4034.49],"5-39-22":[24.72,4034.49],"6-79-46":[30.84,5065.49],"6-79-47":[39.44,5582.77],"5-39-23":[-2024.01,5582.77],"4-19-11":[-2641.23,5582.77],"3-9-5":[-4635.36,5582.77],"2-4-2":[-5581.84,5869.55],"6-79-48":[-6.88,476.03],"6-79-49":[-45.43,262.45],"5-39-24":[-74.88,677.36],"6-79-50":[45.58,287.29],"6-79-51":[40.61,298.27],"5-39-25":[40.21,298.27],"4-19-12":[-102.73,1277.56],"6-79-52":[35.82,293.08],"6-79-53":[31.85,306.15],"5-39-26":[31.4,306.15],"6-79-54":[11.02,265.84],"6-79-55":[-22.65,224.63],"5-39-27":[-81.06,316.21],"4-19-13":[-203.89,540.75],"3-9-6":[-230.72,2476.4],"6-79-56":[-132.5,2238.4],"6-79-57":[-376.73,3044.79],"5-39-28":[-388.9,3049.46],"6-79-58":[-382.68,3633.13],"6-79-59":[-360.54,3703.54],"5-39-29":[-382.68,3814.29],"4-19-14":[-388.9,3814.29],"6-79-60":[-487.25,3739.77],"6-79-61":[-3962.4,3596.54],"5-39-30":[-3981.03,3739.77],"6-79-62":[-5147.9,3326.45],"6-79-63":[-4431.66,2985.88],"5-39-31":[-5253.05,3326.45],"4-19-15":[-5253.05,3739.77],"3-9-7":[-5253.05,3814.29],"2-4-3":[-5524.14,4706.54],"6-80-0":[-607.91,1052.02],"6-80-1":[-695.37,916.87],"6-80-2":[-313.43,688.23],"6-80-3":[-506.03,1590.08],"6-80-4":[-302.45,1299.84],"6-80-5":[-41.81,1102.37],"6-80-6":[-257.53,933.24],"6-80-7":[-884.89,1429.72],"6-80-8":[-4242.68,436.57],"6-80-9":[-5126.54,285.08],"6-80-10":[-5387.21,302.02],"6-80-11":[-5405.84,248.97],"6-80-12":[-5239.46,347.27],"6-80-13":[-4483.75,372.83],"6-80-14":[-5189.69,355.61],"6-80-15":[-3747.5,115.89],"6-80-16":[-3686.91,4485.88],"6-80-17":[-5781.09,4116.85],"6-80-18":[-5034.39,4577.24],"6-80-19":[-4691.4,3588.07],"6-80-20":[-4381.02,2783.91],"6-80-21":[-3952.44,444.94],"6-80-22":[-4308.52,925.69],"6-80-23":[-3977.26,1950.83],"6-80-24":[1.69,2559.62],"6-80-25":[11.6,2551.64],"6-80-26":[-3601.77,2444.71],"6-80-27":[-4091.03,2493.24],"6-80-28":[-4677.41,2422.23],"6-80-29":[-4881.94,1006.97],"6-80-30":[-4951.46,501.55],"6-80-31":[-4954.17,235.87],"6-80-32":[-4709.84,231.65],"6-80-33":[-3470.76,497.87],"6-80-34":[-87.49,977.44],"6-80-35":[-1955.8,2394.22],"6-80-36":[-4238.65,2432.86],"6-80-37":[-52.79,2399.7],"6-80-38":[-3.35,2631.65],"6-80-39":[-45.58,2635.66],"6-80-40":[-13.4,1977.92],"6-80-41":[3.13,907.5],"6-80-42":[-48.51,443.94],"6-80-43":[-13.11,2710.9],"6-80-44":[27.43,3527.05],"6-80-45":[35.59,4482.23],"6-80-46":[-2.1,3994.84],"6-80-47":[-76.02,4318.89],"6-80-48":[-36.78,116.54],"6-80-49":[-45.44,351.6],"6-80-50":[4.21,362.82],"6-80-51":[40.48,339.43],"6-80-52":[35.29,243.79],"6-80-53":[31.46,421.25],"6-80-54":[28.44,286.08],"6-80-55":[-16.19,572.15],"6-80-56":[-122.56,2427.48],"6-80-57":[-344.52,3127.78],"6-80-58":[-354.02,3590.93],"6-80-59":[-359.54,3615.32],"6-80-60":[-594.45,3741.77],"6-80-61":[-3969.31,3655.25],"6-80-62":[-5188.16,3360.65],"6-80-63":[-4417.84,3013.02],"6-81-0":[-445.47,790.85],"6-81-1":[-579.87,425.58],"5-40-0":[-695.37,1052.02],"6-81-2":[-242.37,1171.88],"6-81-3":[-234.37,703.61],"5-40-1":[-506.03,1590.08],"6-81-4":[-375.85,887.16],"6-81-5":[-161.15,1045.3],"5-40-2":[-375.85,1299.84],"6-81-6":[-62.37,1221.56],"6-81-7":[-1167.31,1508.82],"5-40-3":[-1167.31,1508.82],"6-81-8":[-4170.54,1226.45],"6-81-9":[-5147.46,477.07],"5-40-4":[-5147.46,1226.45],"6-81-10":[-5384.89,275.89],"6-81-11":[-5567.68,298.46],"5-40-5":[-5567.68,302.02],"6-81-12":[-5556.1,367.95],"6-81-13":[-5033.22,377.5],"5-40-6":[-5556.1,377.5],"6-81-14":[-5015.18,65.52],"6-81-15":[-4002.56,841.67],"5-40-7":[-5189.69,841.67],"6-81-16":[-3685,748.23],"6-81-17":[-4092.46,4455.71],"5-40-8":[-5781.09,4485.88],"6-81-18":[-4444.4,4802.09],"6-81-19":[-4794.15,3898.23],"5-40-9":[-5034.39,4802.09],"6-81-20":[-5198.95,4173.89],"6-81-21":[-5598.2,2032.48],"5-40-10":[-5598.2,4173.89],"6-81-22":[-5621.37,483.61],"6-81-23":[-5224.64,539.09],"5-40-11":[-5621.37,1950.83],"6-81-24":[-5022.02,1587.94],"6-81-25":[-4903.94,1702.56],"5-40-12":[-5022.02,2559.62],"6-81-26":[-3390.66,2723.38],"6-81-27":[-4200.55,2795.35],"5-40-13":[-4200.55,2795.35],"6-81-28":[-5482.93,1996.26],"6-81-29":[-5374.08,846.67],"5-40-14":[-5482.93,2422.23],"6-81-30":[-5361.33,410.82],"6-81-31":[-5223.91,-46.62],"5-40-15":[-5361.33,501.55],"6-81-32":[-5354.28,-45.29],"6-81-33":[-5202.96,382.82],"5-40-16":[-5354.28,497.87],"6-81-34":[-4772.87,840.63],"6-81-35":[-1909.66,1978.24],"5-40-17":[-4772.87,2394.22],"6-81-36":[-4295.27,2866.35],"6-81-37":[-2474.56,2817.4],"5-40-18":[-4295.27,2866.35],"6-81-38":[-37.94,1755.56],"6-81-39":[-49.87,1687.3],"5-40-19":[-49.87,2635.66],"6-81-40":[-57.71,536.44],"6-81-41":[-101.18,464.66],"5-40-20":[-101.18,1977.92],"6-81-42":[-87.87,1944.41],"6-81-43":[-12.99,4091.88],"5-40-21":[-87.87,4091.88],"6-81-44":[27.43,3768.23],"6-81-45":[-1031.88,4731.09],"5-40-22":[-1031.88,4731.09],"6-81-46":[-918.65,4364.68],"6-81-47":[-755.34,705.21],"5-40-23":[-918.65,4364.68],"6-81-48":[-47.43,895.68],"6-81-49":[-43.18,90.78],"5-40-24":[-47.43,895.68],"6-81-50":[2.4,372.49],"6-81-51":[21.02,334.11],"5-40-25":[2.4,372.49],"6-81-52":[33.96,288.46],"6-81-53":[30.7,269.64],"5-40-26":[30.7,421.25],"6-81-54":[28.32,478.06],"6-81-55":[3.1,1099.75],"5-40-27":[-16.19,1099.75],"6-81-56":[-100.26,2482.8],"6-81-57":[-290.32,3161.72],"5-40-28":[-344.52,3161.72],"6-81-58":[-314.37,3513.33],"6-81-59":[-375.95,3613.49],"5-40-29":[-375.95,3615.32],"6-81-60":[-590.56,3745.47],"6-81-61":[-3970.26,3699.75],"5-40-30":[-3970.26,3745.47],"6-81-62":[-5105.72,3382.27],"6-81-63":[-4656.2,3034.71],"5-40-31":[-5188.16,3382.27],"6-82-0":[-599.47,1070.76],"6-82-1":[-348.88,540.96],"6-82-2":[-38.22,899.07],"6-82-3":[-212.45,846.93],"6-82-4":[-648.98,789.11],"6-82-5":[1.27,1323.62],"6-82-6":[-313.5,1189.76],"6-82-7":[-260.3,2246.69],"6-82-8":[-3969.17,1587.85],"6-82-9":[-5168.42,441.34],"6-82-10":[-5365.38,321.16],"6-82-11":[-5536.76,337.16],"6-82-12":[-5534.93,384.64],"6-82-13":[-4880.9,320.68],"6-82-14":[-4736.9,173.57],"6-82-15":[-3958,982.13],"6-82-16":[-4319.35,522.27],"6-82-17":[-4720.05,294.16],"6-82-18":[-6332.17,3417.02],"6-82-19":[-6279.16,5595.76],"6-82-20":[-5617.22,4411.42],"6-82-21":[-5768.11,4366.48],"6-82-22":[-5860.36,1761.32],"6-82-23":[-5726.87,170.47],"6-82-24":[-5743.21,274.33],"6-82-25":[-5255.34,1114.62],"6-82-26":[-4888.06,1466.69],"6-82-27":[-5072.73,1380.57],"6-82-28":[-5232.44,723.52],"6-82-29":[-5364.53,27.68],"6-82-30":[-5545.23,11.01],"6-82-31":[-5332.59,-49.03],"6-82-32":[-5272.06,-45.11],"6-82-33":[-5358.16,-10.81],"6-82-34":[-5287.25,5.08],"6-82-35":[-5185.25,703.52],"6-82-36":[-5425.29,1352.56],"6-82-37":[-5630.71,1423.68],"6-82-38":[-35.86,1084.1],"6-82-39":[-24.06,227.43],"6-82-40":[-103.37,153.45],"6-82-41":[-202.87,1732.32],"6-82-42":[-86.69,4285.49],"6-82-43":[16.23,4287.41],"6-82-44":[-28.43,5494.75],"6-82-45":[-1068.46,3402],"6-82-46":[-987.88,286.16],"6-82-47":[-578.39,474.26],"6-82-48":[-51.84,1115.13],"6-82-49":[-50.16,171.52],"6-82-50":[-1.25,299.67],"6-82-51":[36.22,375.64],"6-82-52":[33.96,329.16],"6-82-53":[30.52,319.15],"6-82-54":[28.32,438.32],"6-82-55":[5.56,1774.62],"6-82-56":[-124.12,2729.04],"6-82-57":[-198.79,3157.08],"6-82-58":[-295.24,3362.16],"6-82-59":[-353.36,3614.29],"6-82-60":[-539.75,3772.23],"6-82-61":[-3953.55,3728.18],"6-82-62":[-5186.27,3397.85],"6-82-63":[-4702.29,3048.46],"6-83-0":[-564.45,1069.71],"6-83-1":[-153.79,796.8],"5-41-0":[-599.47,1070.76],"6-83-2":[15.31,951.14],"6-83-3":[-113.51,904.5],"5-41-1":[-212.45,951.14],"4-20-0":[-695.37,1590.08],"6-83-4":[-485.6,1019.15],"6-83-5":[-11.14,1503.33],"5-41-2":[-648.98,1503.33],"6-83-6":[-272.38,1230.82],"6-83-7":[-311.37,1993.91],"5-41-3":[-313.5,2246.69],"4-20-1":[-1167.31,2246.69],"6-83-8":[-4634.74,1908.12],"6-83-9":[-5125.14,331.03],"5-41-4":[-5168.42,1908.12],"6-83-10":[-5243.09,350.47],"6-83-11":[-5406.52,469.81],"5-41-5":[-5536.76,469.81],"4-20-2":[-5567.68,1908.12],"6-83-12":[-5439.07,476.59],"6-83-13":[-5360.87,627.4],"5-41-6":[-5534.93,627.4],"6-83-14":[-4630.33,323.7],"6-83-15":[-4323.21,232.09],"5-41-7":[-4736.9,982.13],"4-20-3":[-5556.1,982.13],"6-83-16":[-4496.34,321.64],"6-83-17":[-4885.79,1858.17],"5-41-8":[-4885.79,1858.17],"6-83-18":[-5123.35,3878.24],"6-83-19":[-6718.3,3814.01],"5-41-9":[-6718.3,5595.76],"4-20-4":[-6718.3,5595.76],"6-83-20":[-6774,4034.31],"6-83-21":[-6839.22,3448.75],"5-41-10":[-6839.22,4411.42],"6-83-22":[-5620.75,2931.28],"6-83-23":[-5595.05,1395.64],"5-41-11":[-5860.36,2931.28],"4-20-5":[-6839.22,4411.42],"6-83-24":[-5025.44,2920.56],"6-83-25":[-5267.5,1727.17],"5-41-12":[-5743.21,2920.56],"6-83-26":[-5123.87,1060.42],"6-83-27":[-5029.91,1466.16],"5-41-13":[-5123.87,1466.69],"4-20-6":[-5743.21,2920.56],"6-83-28":[-5508.98,-44.27],"6-83-29":[-4389.05,214.21],"5-41-14":[-5508.98,723.52],"6-83-30":[-4357.02,782.79],"6-83-31":[-5137.86,-50.21],"5-41-15":[-5545.23,782.79],"4-20-7":[-5545.23,2422.23],"6-83-32":[-5314.12,-46.38],"6-83-33":[-5614.7,862.8],"5-41-16":[-5614.7,862.8],"6-83-34":[-5577.79,-10.47],"6-83-35":[-5182.77,-31.32],"5-41-17":[-5577.79,703.52],"4-20-8":[-5614.7,2394.22],"6-83-36":[-4511.57,1412.17],"6-83-37":[-3831.85,1030.52],"5-41-18":[-5630.71,1423.68],"6-83-38":[-3585.77,1700.21],"6-83-39":[-27.02,3059.56],"5-41-19":[-3585.77,3059.56],"4-20-9":[-5630.71,3059.56],"6-83-40":[-134.31,1310.57],"6-83-41":[-191.43,2787.3],"5-41-20":[-202.87,2787.3],"6-83-42":[7.73,3357.26],"6-83-43":[16.98,3964.31],"5-41-21":[-86.69,4287.41],"4-20-10":[-202.87,4287.41],"6-83-44":[26.42,3759],"6-83-45":[-63.56,3836.25],"5-41-22":[-1068.46,5494.75],"6-83-46":[-60.94,1827.16],"6-83-47":[-114.1,314.63],"5-41-23":[-987.88,1827.16],"4-20-11":[-1068.46,5494.75],"6-83-48":[-83.21,231.08],"6-83-49":[-35.06,320.69],"5-41-24":[-83.21,1115.13],"6-83-50":[40.86,616.39],"6-83-51":[37.02,459.58],"5-41-25":[-1.25,616.39],"4-20-12":[-83.21,1115.13],"6-83-52":[33.5,442.85],"6-83-53":[30.59,339.47],"5-41-26":[30.52,442.85],"6-83-54":[28.68,337.03],"6-83-55":[18.67,2242.91],"5-41-27":[5.56,2242.91],"4-20-13":[-16.19,2242.91],"6-83-56":[-158.29,2841.08],"6-83-57":[-247.05,3100.22],"5-41-28":[-247.05,3157.08],"6-83-58":[-252.23,3161.67],"6-83-59":[-384,3541.02],"5-41-29":[-384,3614.29],"4-20-14":[-384,3615.32],"6-83-60":[-572.12,3807.22],"6-83-61":[-3879.34,3762.75],"5-41-30":[-3953.55,3807.22],"6-83-62":[-4903.55,3423.55],"6-83-63":[-4589.93,3056.25],"5-41-31":[-5186.27,3423.55],"4-20-15":[-5188.16,3807.22],"6-84-0":[-462.49,582.84],"6-84-1":[-328.81,1037.36],"6-84-2":[14.45,1081.68],"6-84-3":[-387.99,886.04],"6-84-4":[-216.46,1023.47],"6-84-5":[-70.1,1436.73],"6-84-6":[-103.35,1295.71],"6-84-7":[-303.02,1934.97],"6-84-8":[-4182.74,1250.98],"6-84-9":[-4917.61,1096.24],"6-84-10":[-5110.65,1512.31],"6-84-11":[-5270.52,975.89],"6-84-12":[-5290.16,1624.4],"6-84-13":[-5400.11,1020.66],"6-84-14":[-4894.48,630.85],"6-84-15":[-4745.05,381.12],"6-84-16":[-4987.2,265.27],"6-84-17":[-5281.48,292.44],"6-84-18":[-5836.1,3050.69],"6-84-19":[-5818.9,3289.8],"6-84-20":[-6578.1,3513.08],"6-84-21":[-5878.98,4466.14],"6-84-22":[-6534.79,3206.24],"6-84-23":[-5720.73,2955.44],"6-84-24":[-5516.96,1006.29],"6-84-25":[-4756.9,187.1],"6-84-26":[-4678.6,-35.61],"6-84-27":[-4654.95,-39.16],"6-84-28":[-4518.41,-28.72],"6-84-29":[-4208.2,213.94],"6-84-30":[-4538.58,-42.82],"6-84-31":[-4857.68,-53.64],"6-84-32":[-5394.31,-44.62],"6-84-33":[-5613.24,-41.47],"6-84-34":[-5297.8,-15.91],"6-84-35":[-5101.96,-11.7],"6-84-36":[-5499.36,-25.08],"6-84-37":[-4713.67,-16.99],"6-84-38":[-4301.04,185.08],"6-84-39":[-2980.26,961.28],"6-84-40":[-3378.52,2918.44],"6-84-41":[-1151.89,3127.26],"6-84-42":[7.34,4351.1],"6-84-43":[17.48,3400.07],"6-84-44":[21.66,3212.8],"6-84-45":[6.6,2997.69],"6-84-46":[-102.22,286.43],"6-84-47":[-22.51,261.98],"6-84-48":[-26.82,374.17],"6-84-49":[39.19,591.85],"6-84-50":[37.64,993.66],"6-84-51":[36.03,1601.39],"6-84-52":[33.47,925.89],"6-84-53":[30.96,1461.81],"6-84-54":[28.91,1084.24],"6-84-55":[16.37,1261.04],"6-84-56":[-130.15,2834.46],"6-84-57":[-396.29,2971.6],"6-84-58":[-396.29,2944.4],"6-84-59":[-328.25,3405.04],"6-84-60":[-597.8,3828.34],"6-84-61":[-3788.87,3798.94],"6-84-62":[-4848.77,3451.5],"6-84-63":[-4510.96,3061.98],"6-85-0":[-690,433.63],"6-85-1":[-457.37,975.82],"5-42-0":[-690,1037.36],"6-85-2":[13.83,1299.01],"6-85-3":[-419.89,1019.11],"5-42-1":[-419.89,1299.01],"6-85-4":[-830.07,1360.06],"6-85-5":[-695.45,2999.15],"5-42-2":[-830.07,2999.15],"6-85-6":[-266.96,2295.42],"6-85-7":[-1076.55,1778.99],"5-42-3":[-1076.55,2295.42],"6-85-8":[-4190.64,1773.8],"6-85-9":[-4762.25,1487.95],"5-42-4":[-4917.61,1773.8],"6-85-10":[-4948.41,1559.37],"6-85-11":[-5080.07,864.4],"5-42-5":[-5270.52,1559.37],"6-85-12":[-5419.76,1394.5],"6-85-13":[-5594.69,600.13],"5-42-6":[-5594.69,1624.4],"6-85-14":[-5097.9,429.21],"6-85-15":[-4796.18,315.69],"5-42-7":[-5097.9,630.85],"6-85-16":[-5524.4,243.14],"6-85-17":[-5768.88,430.08],"5-42-8":[-5768.88,430.08],"6-85-18":[-5589.1,3092.4],"6-85-19":[-5934.6,3228.78],"5-42-9":[-5934.6,3289.8],"6-85-20":[-6770.5,2831.82],"6-85-21":[-6817.28,3905.23],"5-42-10":[-6817.28,4466.14],"6-85-22":[-6709.38,3453.88],"6-85-23":[-5792.46,2164.41],"5-42-11":[-6709.38,3453.88],"6-85-24":[-5484.88,1992.49],"6-85-25":[-5286.66,25.87],"5-42-12":[-5516.96,1992.49],"6-85-26":[-4248.87,28.92],"6-85-27":[-4210.77,43.52],"5-42-13":[-4678.6,43.52],"6-85-28":[-3781.28,-37.67],"6-85-29":[-4287.62,-44.2],"5-42-14":[-4518.41,213.94],"6-85-30":[-4861.17,-59.06],"6-85-31":[-5132.57,-60.26],"5-42-15":[-5132.57,-42.82],"6-85-32":[-5556.87,-55.88],"6-85-33":[-5144.84,-49.83],"5-42-16":[-5613.24,-41.47],"6-85-34":[-4770.64,-41.73],"6-85-35":[-4833.5,-35.72],"5-42-17":[-5297.8,-11.7],"6-85-36":[-4832.9,-25.51],"6-85-37":[-4426.33,12.57],"5-42-18":[-5499.36,12.57],"6-85-38":[-4177.52,-11.51],"6-85-39":[-4112.02,1927.5],"5-42-19":[-4301.04,1927.5],"6-85-40":[-3664.51,2127.4],"6-85-41":[-89.15,3375.88],"5-42-20":[-3664.51,3375.88],"6-85-42":[7.34,3828.19],"6-85-43":[14.16,2719],"5-42-21":[7.34,4351.1],"6-85-44":[20.8,3176.76],"6-85-45":[23.87,3046.38],"5-42-22":[6.6,3212.8],"6-85-46":[27.26,405.08],"6-85-47":[-1.52,242.14],"5-42-23":[-102.22,405.08],"6-85-48":[-3.54,294.72],"6-85-49":[36.61,408.2],"5-42-24":[-26.82,591.85],"6-85-50":[36.35,551.14],"6-85-51":[-160.1,1362.49],"5-42-25":[-160.1,1601.39],"6-85-52":[-21.22,833.36],"6-85-53":[-20.09,1506.37],"5-42-26":[-21.22,1506.37],"6-85-54":[-4.67,1533.95],"6-85-55":[21.69,1802.8],"5-42-27":[-4.67,1802.8],"6-85-56":[-203.29,2724.67],"6-85-57":[-396.29,2726.3],"5-42-28":[-396.31,2971.6],"6-85-58":[-499.48,2693.03],"6-85-59":[-348.85,3395.87],"5-42-29":[-499.48,3405.04],"6-85-60":[-369.01,3894.08],"6-85-61":[-3796.88,3860.75],"5-42-30":[-3796.88,3894.08],"6-85-62":[-4719.26,3477.38],"6-85-63":[-4513.54,3064.64],"5-42-31":[-4848.77,3477.38],"6-86-0":[-753.27,251.12],"6-86-1":[-466.99,1030.05],"6-86-2":[11.81,1938.39],"6-86-3":[3.34,1421.23],"6-86-4":[-801.92,1600.86],"6-86-5":[-1082.04,3054.14],"6-86-6":[-700.69,2012.28],"6-86-7":[-806.03,2132.78],"6-86-8":[-3912.94,1361.22],"6-86-9":[-4585.29,250.25],"6-86-10":[-4946.48,219.71],"6-86-11":[-5126.76,213.66],"6-86-12":[-5068.99,217.01],"6-86-13":[-5140.98,281.46],"6-86-14":[-4858.96,248.91],"6-86-15":[-4878.06,244.16],"6-86-16":[-5684.41,713.35],"6-86-17":[-5765.18,925.05],"6-86-18":[-5641.98,769.1],"6-86-19":[-5615.16,3625.13],"6-86-20":[-5640.46,4120.59],"6-86-21":[-6897.64,2348.74],"6-86-22":[-6025.99,2575.17],"6-86-23":[-5754.46,426.39],"6-86-24":[-5012.35,324.48],"6-86-25":[-4448.42,182.37],"6-86-26":[-4638.51,-54.84],"6-86-27":[-4395.85,-37.12],"6-86-28":[-4402.76,-38.59],"6-86-29":[-4565.06,-65.77],"6-86-30":[-4843.92,-65.78],"6-86-31":[-5276.07,-67.58],"6-86-32":[-5038.14,-64],"6-86-33":[-4993.52,-57.09],"6-86-34":[-5251.52,-47.83],"6-86-35":[-5106.74,-36.76],"6-86-36":[-4516.21,-30.07],"6-86-37":[-4252,-21.06],"6-86-38":[-4015.79,209.37],"6-86-39":[-4236.3,376.48],"6-86-40":[-4436.02,387.36],"6-86-41":[-173.17,2468.93],"6-86-42":[7.71,2226.7],"6-86-43":[12.56,3995.58],"6-86-44":[18.37,3592.12],"6-86-45":[23.48,762.48],"6-86-46":[-48.04,901.05],"6-86-47":[-23.79,672.29],"6-86-48":[14.5,229.04],"6-86-49":[16.37,243.99],"6-86-50":[-198.8,279.58],"6-86-51":[34.42,205.49],"6-86-52":[31.27,211.66],"6-86-53":[23.66,225.7],"6-86-54":[-6.69,255.71],"6-86-55":[-6.75,1361.22],"6-86-56":[-210.37,2407.49],"6-86-57":[-215.22,2407.49],"6-86-58":[-397.61,2435.25],"6-86-59":[-355.94,3458.7],"6-86-60":[-377.17,3925.85],"6-86-61":[-3648.94,3915.12],"6-86-62":[-4993.61,3500.58],"6-86-63":[-4383.74,3065.4],"6-87-0":[-770.81,59.22],"6-87-1":[-454.18,910.5],"5-43-0":[-770.81,1030.05],"6-87-2":[10.38,2261.07],"6-87-3":[-386.02,2071.45],"5-43-1":[-386.02,2261.07],"4-21-0":[-770.81,2261.07],"6-87-4":[-383.96,1917.49],"6-87-5":[-3800.21,2042.55],"5-43-2":[-3800.21,3054.14],"6-87-6":[-2884.07,2117.36],"6-87-7":[-1727.04,2087.2],"5-43-3":[-2884.07,2132.78],"4-21-1":[-3800.21,3054.14],"3-10-0":[-3800.21,3054.14],"6-87-8":[-3759.02,1275.39],"6-87-9":[-4471.39,200.27],"5-43-4":[-4585.29,1361.22],"6-87-10":[-4763.91,154.26],"6-87-11":[-4755.98,142.53],"5-43-5":[-5126.76,219.71],"4-21-2":[-5270.52,1773.8],"6-87-12":[-4690.1,210.72],"6-87-13":[-5090.98,447.9],"5-43-6":[-5140.98,447.9],"6-87-14":[-3386.43,1084.54],"6-87-15":[-4735.27,566.99],"5-43-7":[-4878.06,1084.54],"4-21-3":[-5594.69,1624.4],"3-10-1":[-5594.69,1908.12],"6-87-16":[-5449.05,821.12],"6-87-17":[-5622.74,2139.17],"5-43-8":[-5765.18,2139.17],"6-87-18":[-5271.62,4103.6],"6-87-19":[-4991.34,4599.84],"5-43-9":[-5641.98,4599.84],"4-21-4":[-5934.6,4599.84],"6-87-20":[-5574.64,4772.12],"6-87-21":[-5572.75,3524.89],"5-43-10":[-6897.64,4772.12],"6-87-22":[-5739.76,2437.68],"6-87-23":[-5238.92,529.04],"5-43-11":[-6025.99,2575.17],"4-21-5":[-6897.64,4772.12],"3-10-2":[-6897.64,5595.76],"6-87-24":[-4481.3,-45.37],"6-87-25":[-6299.64,-54.11],"5-43-12":[-6299.64,324.48],"6-87-26":[-4518.2,-61.38],"6-87-27":[-5566.79,-68.36],"5-43-13":[-5566.79,-37.12],"4-21-6":[-6299.64,1992.49],"6-87-28":[-6365.04,-73.16],"6-87-29":[-4813.22,-76.65],"5-43-14":[-6365.04,-38.59],"6-87-30":[-4724.02,-74.88],"6-87-31":[-4950.65,-74.44],"5-43-15":[-5276.07,-65.78],"4-21-7":[-6365.04,213.94],"3-10-3":[-6365.04,2920.56],"6-87-32":[-5184.39,-70.63],"6-87-33":[-5209.14,-64.32],"5-43-16":[-5209.14,-57.09],"6-87-34":[-5299.08,-55.61],"6-87-35":[-4792.16,-45.34],"5-43-17":[-5299.08,-36.76],"4-21-8":[-5613.24,-11.7],"6-87-36":[-4585.57,-34.09],"6-87-37":[-4374.05,-24.11],"5-43-18":[-4585.57,-21.06],"6-87-38":[-3814.21,-13.14],"6-87-39":[-3394.78,-5.98],"5-43-19":[-4236.3,376.48],"4-21-9":[-5499.36,1927.5],"3-10-4":[-5630.71,3059.56],"6-87-40":[-3357.38,497.04],"6-87-41":[-93,2342.65],"5-43-20":[-4436.02,2468.93],"6-87-42":[5.69,3445.88],"6-87-43":[10.55,4709.11],"5-43-21":[5.69,4709.11],"4-21-10":[-4436.02,4709.11],"6-87-44":[18.37,4506.23],"6-87-45":[20.45,4004.61],"5-43-22":[18.37,4506.23],"6-87-46":[25.88,2081.25],"6-87-47":[28.04,795.12],"5-43-23":[-48.04,2081.25],"4-21-11":[-102.22,4506.23],"3-10-5":[-4436.02,5494.75],"6-87-48":[15.28,553.96],"6-87-49":[35.15,1026.53],"5-43-24":[14.5,1026.53],"6-87-50":[34.57,409.9],"6-87-51":[33.74,203.46],"5-43-25":[-198.8,409.9],"4-21-12":[-198.8,1601.39],"6-87-52":[16.11,133.57],"6-87-53":[-2.86,157.13],"5-43-26":[-2.86,225.7],"6-87-54":[-10.31,212.3],"6-87-55":[-10.62,1282.39],"5-43-27":[-10.62,1361.22],"4-21-13":[-21.22,1802.8],"3-10-6":[-198.8,2242.91],"6-87-56":[-79.71,1925.54],"6-87-57":[-164.03,1897.68],"5-43-28":[-215.22,2407.49],"6-87-58":[-346.65,2297.22],"6-87-59":[-393.73,3491.07],"5-43-29":[-397.61,3491.07],"4-21-14":[-499.48,3491.07],"6-87-60":[-577.11,3965.2],"6-87-61":[-3620.25,3965.2],"5-43-30":[-3648.94,3965.2],"6-87-62":[-5015.61,3512.38],"6-87-63":[-4383.62,3065.32],"5-43-31":[-5015.61,3512.38],"4-21-15":[-5015.61,3965.2],"3-10-7":[-5188.16,3965.2],"6-88-0":[-767.86,36.5],"6-88-1":[-428.44,959.04],"6-88-2":[9.6,2322.15],"6-88-3":[-39.25,2104.93],"6-88-4":[-606.74,2084.95],"6-88-5":[-2859.78,1815.24],"6-88-6":[-2822.2,1622.18],"6-88-7":[-1642.56,344.05],"6-88-8":[-3225.87,223.3],"6-88-9":[-4395.86,226.52],"6-88-10":[-4629.63,136.47],"6-88-11":[-4715.75,131.78],"6-88-12":[-4678.56,332.5],"6-88-13":[-4662.12,893.06],"6-88-14":[-1886.34,1554.79],"6-88-15":[-3945.89,447.99],"6-88-16":[-4579.02,2106.12],"6-88-17":[-4768.15,5451.96],"6-88-18":[-4851.07,5411.27],"6-88-19":[-5345.82,5666.76],"6-88-20":[-5826.83,4714.77],"6-88-21":[-5490.03,3432.07],"6-88-22":[-5665.99,1024.24],"6-88-23":[-4919.76,403.18],"6-88-24":[-4401.41,569.02],"6-88-25":[-4766.29,-59.6],"6-88-26":[-5085.97,-70.97],"6-88-27":[-4713.83,-76.12],"6-88-28":[-6296.59,-81.89],"6-88-29":[-5415.32,-85.59],"6-88-30":[-5415.58,-83.95],"6-88-31":[-5034.84,-81.05],"6-88-32":[-4678.13,-76.23],"6-88-33":[-5091.68,-69.57],"6-88-34":[-5315.04,-60.53],"6-88-35":[-4910.61,-49.91],"6-88-36":[-4700.31,-38.44],"6-88-37":[-4340.52,-27.34],"6-88-38":[-3775.62,-16.67],"6-88-39":[-3259.24,482.01],"6-88-40":[-197.97,378.18],"6-88-41":[-45.65,1001.24],"6-88-42":[1.91,3360.06],"6-88-43":[7.53,4608.76],"6-88-44":[12.64,5486.75],"6-88-45":[17.05,5223.27],"6-88-46":[21.65,5206.96],"6-88-47":[26.11,2040.12],"6-88-48":[30.67,440.1],"6-88-49":[-55.82,1713.79],"6-88-50":[33.89,827.05],"6-88-51":[33.4,306.53],"6-88-52":[7.42,123.77],"6-88-53":[-39.7,327.42],"6-88-54":[3.08,230.49],"6-88-55":[-15.39,234.28],"6-88-56":[-22.57,1116.82],"6-88-57":[-96.74,1564.5],"6-88-58":[-334.85,2295.88],"6-88-59":[-547.49,3490.99],"6-88-60":[-643.72,3997.79],"6-88-61":[-3594.02,4001.34],"6-88-62":[-4474.87,3523.63],"6-88-63":[-4558.49,3065.05],"6-89-0":[-706.47,30.41],"6-89-1":[-440.72,977.07],"5-44-0":[-767.86,977.07],"6-89-2":[9.34,2464.93],"6-89-3":[1.06,2473.48],"5-44-1":[-39.25,2473.48],"6-89-4":[-936.59,2332.14],"6-89-5":[-1376.15,981.03],"5-44-2":[-2859.78,2332.14],"6-89-6":[-1438.63,1303.35],"6-89-7":[-1336.73,318.58],"5-44-3":[-2822.2,1622.18],"6-89-8":[-3587.69,100.53],"6-89-9":[-4154.48,139.63],"5-44-4":[-4395.86,226.52],"6-89-10":[-4569.43,118.52],"6-89-11":[-4715.57,117.67],"5-44-5":[-4715.75,136.47],"6-89-12":[-4169.96,204.12],"6-89-13":[-3830.5,749.66],"5-44-6":[-4678.56,893.06],"6-89-14":[-2468.19,1122.49],"6-89-15":[-4016.9,1082.6],"5-44-7":[-4016.9,1554.79],"6-89-16":[-4414.85,4445.78],"6-89-17":[-4631.89,5979.55],"5-44-8":[-4768.15,5979.55],"6-89-18":[-4974.01,7425.22],"6-89-20":[-5304.14,2777.08],"6-89-19":[-5513.3,7670.17],"5-44-9":[-5513.3,7670.17],"6-89-21":[-5172.38,1028.73],"5-44-10":[-5826.83,4714.77],"6-89-22":[-4626.02,913.48],"6-89-23":[-5042.76,1654.1],"5-44-11":[-5665.99,1654.1],"6-89-24":[-5314.43,1010.35],"6-89-25":[-5903.05,598.43],"5-44-12":[-5903.05,1010.35],"6-89-26":[-6180.12,-75.99],"6-89-27":[-5778.91,-67.66],"5-44-13":[-6180.12,-67.66],"6-89-28":[-5869.67,-72.32],"6-89-29":[-4365.43,48.53],"5-44-14":[-6296.59,48.53],"6-89-30":[-4791.83,15.48],"6-89-31":[-5071.12,1.04],"5-44-15":[-5415.58,15.48],"6-89-32":[-4576.94,-3.46],"6-89-33":[-4785.27,6.33],"5-44-16":[-5091.68,6.33],"6-89-34":[-4574.62,105.2],"6-89-35":[-4689.33,94.67],"5-44-17":[-5315.04,105.2],"6-89-36":[-4438.32,200.09],"6-89-37":[-3765.77,-34.29],"5-44-18":[-4700.31,200.09],"6-89-38":[-3494.6,568.44],"6-89-39":[-182.94,902.33],"5-44-19":[-3775.62,902.33],"6-89-40":[-76.25,1584.1],"6-89-41":[-16.37,827.48],"5-44-20":[-197.97,1584.1],"6-89-42":[-2.98,985.73],"6-89-43":[4.23,2682.07],"5-44-21":[-2.98,4608.76],"6-89-44":[9.98,7438.17],"6-89-45":[13.89,7210.21],"5-44-22":[9.98,7438.17],"6-89-46":[21.65,5961.54],"6-89-47":[23.2,4291.76],"5-44-23":[21.65,5961.54],"6-89-48":[28.47,1036.59],"6-89-49":[32.48,1064.49],"5-44-24":[-55.82,1713.79],"6-89-50":[6.34,715.49],"6-89-51":[-9.37,197.65],"5-44-25":[-9.37,827.05],"6-89-52":[15.38,111.68],"6-89-53":[-3.32,343.8],"5-44-26":[-39.7,343.8],"6-89-54":[14.74,147.43],"6-89-55":[-17.33,117.58],"5-44-27":[-17.33,234.28],"6-89-56":[-17.83,392.26],"6-89-57":[-29.56,1769.28],"5-44-28":[-96.74,1769.28],"6-89-58":[-272.69,2436.17],"6-89-59":[-510.33,3484.93],"5-44-29":[-547.49,3490.99],"6-89-60":[-640.09,4020.7],"6-89-61":[-3575.47,4020.7],"5-44-30":[-3594.02,4020.7],"6-89-62":[-4236.46,3529.73],"6-89-63":[-4514.53,3064.81],"5-44-31":[-4558.49,3529.73],"6-90-0":[-640.98,61.26],"6-90-1":[-390.9,805.39],"6-90-2":[9.21,2183.68],"6-90-3":[0.25,2469.66],"6-90-4":[-1304.8,2425.45],"6-90-5":[-1149.32,1548.99],"6-90-6":[-414.72,2224.46],"6-90-7":[-1632.86,499.7],"6-90-8":[-3548.24,91.65],"6-90-9":[-4053.7,169.41],"6-90-10":[-4212.58,102.52],"6-90-11":[-4304.91,130.71],"6-90-12":[-3505.98,132.71],"6-90-13":[-2934.53,2598.41],"6-90-14":[-3135.99,1507.27],"6-90-15":[-4279.42,1151.88],"6-90-16":[-4489.05,4807.35],"6-90-17":[-4479.4,6513.21],"6-90-18":[-5017.58,7543.41],"6-90-20":[-5217.14,5343.32],"6-90-21":[-4488.37,447.8],"6-90-22":[-4547.42,998],"6-90-19":[-5325.59,8087.96],"6-90-23":[-5040.15,1264.93],"6-90-24":[-5735.98,1499.22],"6-90-25":[-5813.09,1527.78],"6-90-26":[-6081.85,969.76],"6-90-27":[-5744.78,1943.78],"6-90-28":[-5599.69,132.05],"6-90-29":[-5614.43,-76.78],"6-90-30":[-5738.79,-73.55],"6-90-31":[-5224.71,100.88],"6-90-32":[-4737.85,203.27],"6-90-33":[-3727.92,187.82],"6-90-34":[-3145.88,89.54],"6-90-35":[-2988.52,52.04],"6-90-36":[-2425.97,1816.78],"6-90-37":[-1039.44,953.76],"6-90-38":[-113.99,1391.73],"6-90-39":[-64.94,1364.22],"6-90-40":[-47.65,1160.93],"6-90-41":[-26.36,959.99],"6-90-42":[-11.95,366.79],"6-90-43":[1.09,5121.48],"6-90-44":[6.57,7900.96],"6-90-45":[11.56,7428.15],"6-90-46":[16.22,6455.21],"6-90-47":[21.29,4685.71],"6-90-48":[26.15,1023.87],"6-90-49":[29.48,1442.28],"6-90-50":[-31.98,2779.41],"6-90-51":[0.44,113.69],"6-90-52":[21.05,124.69],"6-90-53":[-11.69,331.23],"6-90-54":[10.84,175.41],"6-90-55":[-17.9,105.1],"6-90-56":[-21.34,1525.64],"6-90-57":[-32.68,2210.25],"6-90-58":[-120.9,2619.19],"6-90-59":[-433.61,3487.6],"6-90-60":[-567.12,4037.87],"6-90-61":[-3570.81,4030.9],"6-90-62":[-4219.09,3530.31],"6-90-63":[-4406.28,3064.82],"6-91-0":[-639.31,189.19],"6-91-1":[-384.95,834.08],"5-45-0":[-640.98,834.08],"6-91-2":[8.56,2367.16],"6-91-3":[-0.35,2551.86],"5-45-1":[-0.35,2551.86],"4-22-0":[-767.86,2551.86],"6-91-4":[-1479.06,2480.04],"6-91-5":[-281.82,1619.37],"5-45-2":[-1479.06,2480.04],"6-91-6":[-498.16,1605.36],"6-91-7":[-1553.63,731.58],"5-45-3":[-1632.86,2224.46],"4-22-1":[-2859.78,2480.04],"6-91-8":[-3586.88,81.75],"6-91-9":[-4086.33,122.72],"5-45-4":[-4086.33,169.41],"6-91-10":[-4014.01,110.81],"6-91-11":[-2910.87,118.68],"5-45-5":[-4304.91,130.71],"4-22-2":[-4715.75,226.52],"6-91-12":[-2973.92,133.68],"6-91-13":[-3695.85,487.76],"5-45-6":[-3695.85,2598.41],"6-91-14":[-3738.3,1504.92],"6-91-15":[-4043.82,1384.81],"5-45-7":[-4279.42,1507.27],"4-22-3":[-4678.56,2598.41],"6-91-16":[-4375.35,4930.95],"6-91-17":[-4265.58,5827.63],"5-45-8":[-4489.05,6513.21],"6-91-18":[-4366.17,6379.76],"6-91-19":[-4748.48,8560.58],"5-45-9":[-5325.59,8560.58],"4-22-4":[-5513.3,8560.58],"6-91-20":[-4652.94,6725.08],"6-91-21":[-4609.1,4563.58],"5-45-10":[-5217.14,6725.08],"6-91-22":[-4986.87,732.76],"6-91-23":[-5274.33,994.23],"5-45-11":[-5274.33,1264.93],"4-22-5":[-5826.83,6725.08],"6-91-24":[-5529.09,1273.26],"6-91-25":[-6647.67,698.38],"5-45-12":[-6647.67,1527.78],"6-91-26":[-5942.01,1069.77],"6-91-27":[-5762.94,2543.22],"5-45-13":[-6081.85,2543.22],"4-22-6":[-6647.67,2543.22],"6-91-28":[-5774.81,2590.24],"6-91-29":[-5738.63,1544.94],"5-45-14":[-5774.81,2590.24],"6-91-30":[-5469.78,-102.05],"6-91-31":[-5216.17,-100.58],"5-45-15":[-5738.79,100.88],"4-22-7":[-6296.59,2590.24],"6-91-32":[-5076.96,-96.41],"6-91-33":[-4415.5,-89.47],"5-45-16":[-5076.96,203.27],"6-91-34":[-3876.39,1456.94],"6-91-35":[-1368.49,2500.59],"5-45-17":[-3876.39,2500.59],"4-22-8":[-5315.04,2500.59],"6-91-36":[-142.2,2482.21],"6-91-37":[-116.73,1003.95],"5-45-18":[-2425.97,2482.21],"6-91-38":[-98.13,689.37],"6-91-39":[-76.39,1212.26],"5-45-19":[-113.99,1391.73],"4-22-9":[-4700.31,2482.21],"6-91-40":[-59.57,977.73],"6-91-41":[-39.69,677.26],"5-45-20":[-59.57,1160.93],"6-91-42":[-24.55,4424.66],"6-91-43":[-6.24,6545.87],"5-45-21":[-24.55,6545.87],"4-22-10":[-197.97,6545.87],"6-91-44":[3.69,8392.58],"6-91-45":[-0.46,6247.71],"5-45-22":[-0.46,8392.58],"6-91-46":[14.12,5742.63],"6-91-47":[18.73,4840.78],"5-45-23":[14.12,6455.21],"4-22-11":[-0.46,8392.58],"6-91-48":[26.15,1330.33],"6-91-49":[26.58,1464.91],"5-45-24":[26.15,1464.91],"6-91-50":[19.97,460.76],"6-91-51":[27.46,101.74],"5-45-25":[-31.98,2779.41],"4-22-12":[-55.82,2779.41],"6-91-52":[20.79,113.28],"6-91-53":[-17.77,113.81],"5-45-26":[-17.77,331.23],"6-91-54":[-9.28,129.12],"6-91-55":[-14.96,98.12],"5-45-27":[-17.9,175.41],"4-22-13":[-39.7,343.8],"6-91-56":[-19.59,1873.55],"6-91-57":[-21.81,2662.65],"5-45-28":[-32.68,2662.65],"6-91-58":[-80.34,2841.83],"6-91-59":[-317.86,3506.71],"5-45-29":[-433.61,3506.71],"4-22-14":[-547.49,3506.71],"6-91-60":[-233.74,4042.04],"6-91-61":[-3602.62,4030.73],"5-45-30":[-3602.62,4042.04],"6-91-62":[-4392.18,3527.6],"6-91-63":[-4471.35,3066.42],"5-45-31":[-4471.35,3530.31],"4-22-15":[-4558.49,4042.04],"6-92-0":[-645.12,227.14],"6-92-1":[-397.86,937.13],"6-92-2":[7.88,2366.12],"6-92-3":[-1.45,2837.93],"6-92-4":[-1235.35,2211.57],"6-92-5":[-686.65,1122.37],"6-92-6":[-162.24,1378.61],"6-92-7":[-774.24,1072.09],"6-92-8":[-3708.87,64.43],"6-92-9":[-3896.11,203.65],"6-92-10":[-3247.71,114.52],"6-92-11":[-4588.27,125.15],"6-92-12":[-4759.65,235.48],"6-92-13":[-4573.21,478.3],"6-92-14":[-4218.85,1419.87],"6-92-15":[-4033.49,4532.62],"6-92-16":[-3758.83,6633.62],"6-92-17":[-3919.79,7087.4],"6-92-18":[-4298.67,4976.93],"6-92-19":[-4525.92,7022.3],"6-92-20":[-4589.42,7194.47],"6-92-21":[-4677.75,7787.57],"6-92-22":[-4830.92,295.99],"6-92-23":[-5268.63,1069.67],"6-92-24":[-5627.16,1095.71],"6-92-25":[-6029.63,1197.87],"6-92-26":[-6091.69,1006.73],"6-92-27":[-6323.49,1132.42],"6-92-28":[-5678.07,434.8],"6-92-29":[-5900.81,2430.45],"6-92-30":[-5399.93,-101.01],"6-92-31":[-5206.63,-100.16],"6-92-32":[-5022.99,-94.42],"6-92-33":[-4622.89,-88.59],"6-92-34":[-4222.18,2382.44],"6-92-35":[-3966.9,367.8],"6-92-36":[-3737.67,1082.42],"6-92-37":[-3408.68,924.73],"6-92-38":[-104.92,1135.87],"6-92-39":[-84.27,1075.71],"6-92-40":[-67.56,1049.67],"6-92-41":[-47.53,244.26],"6-92-42":[-33.56,7477.1],"6-92-43":[-15.92,6783.47],"6-92-44":[-3.11,6972.29],"6-92-45":[3.14,4850.94],"6-92-46":[9.41,6956.38],"6-92-47":[15.61,6473.62],"6-92-48":[19.59,4411.61],"6-92-49":[23.34,1366.87],"6-92-50":[24.55,472.32],"6-92-51":[20.83,226.49],"6-92-52":[12.33,118.27],"6-92-53":[-1.93,111.49],"6-92-54":[-18.83,205.66],"6-92-55":[-19.8,76.05],"6-92-56":[-14.79,2339.17],"6-92-57":[-28.39,2935.32],"6-92-58":[-72.76,3173.47],"6-92-59":[-191.46,3593.63],"6-92-60":[-328.07,4042.04],"6-92-61":[-3603.54,4001.04],"6-92-62":[-4413.7,3516.41],"6-92-63":[-4414.53,3066.46],"6-93-0":[-598.54,447.74],"6-93-1":[-405.36,559.4],"5-46-0":[-645.12,937.13],"6-93-2":[7.36,2052.06],"6-93-3":[-1.93,2388.42],"5-46-1":[-1.93,2837.93],"6-93-4":[-825.37,1419.34],"6-93-5":[-321.04,1310.48],"5-46-2":[-1235.35,2211.57],"6-93-6":[-535.25,796.65],"6-93-7":[-1525.55,783.16],"5-46-3":[-1525.55,1378.61],"6-93-8":[-3607.56,149.97],"6-93-9":[-3782.36,236.06],"5-46-4":[-3896.11,236.06],"6-93-10":[-3244.4,155.46],"6-93-11":[-4940.09,162.81],"5-46-5":[-4940.09,162.81],"6-93-12":[-4915.47,446.71],"6-93-13":[-4738.91,2380.4],"5-46-6":[-4915.47,2380.4],"6-93-14":[-4289.66,2712],"6-93-15":[-4355.64,3961.77],"5-46-7":[-4355.64,4532.62],"6-93-16":[-4432.86,5107.74],"6-93-17":[-3773.11,3794.4],"5-46-8":[-4432.86,7087.4],"6-93-18":[-4143.17,6062.91],"6-93-19":[-4597.94,6911.73],"5-46-9":[-4597.94,7022.3],"6-93-20":[-4953.08,6600.18],"6-93-21":[-4693,8103.55],"5-46-10":[-4953.08,8103.55],"6-93-22":[-5242.48,2512.35],"6-93-23":[-5502.72,1178.46],"5-46-11":[-5502.72,2512.35],"6-93-24":[-5927.26,1262.43],"6-93-25":[-5842.24,1608.79],"5-46-12":[-6029.63,1608.79],"6-93-26":[-6117.19,-37.98],"6-93-27":[-6121.17,-86.28],"5-46-13":[-6323.49,1132.42],"6-93-28":[-5759.02,-88.67],"6-93-29":[-5683.35,351.9],"5-46-14":[-5900.81,2430.45],"6-93-30":[-5408.99,-92.98],"6-93-31":[-5189.72,-91.46],"5-46-15":[-5408.99,-91.46],"6-93-32":[-4779.36,-88.46],"6-93-33":[-4502,-84.21],"5-46-16":[-5022.99,-84.21],"6-93-34":[-4405.78,250.19],"6-93-35":[-4122.18,-69.13],"5-46-17":[-4405.78,2382.44],"6-93-36":[-3761.1,-61.65],"6-93-37":[-3546.44,-21.32],"5-46-18":[-3761.1,1082.42],"6-93-38":[-2986.65,1526.78],"6-93-39":[-92.35,1210.44],"5-46-19":[-2986.65,1526.78],"6-93-40":[-75.45,1148.44],"6-93-41":[-57.43,2392.36],"5-46-20":[-75.45,2392.36],"6-93-42":[-43.87,7996.56],"6-93-43":[-26.53,6529.17],"5-46-21":[-43.87,7996.56],"6-93-44":[-14.66,6785.68],"6-93-45":[-1.24,5925.82],"5-46-22":[-14.66,6972.29],"6-93-46":[5.93,3698.38],"6-93-47":[11.24,4974.72],"5-46-23":[5.93,6956.38],"6-93-48":[19.38,3851.93],"6-93-49":[19.38,2590],"5-46-24":[19.38,4411.61],"6-93-50":[20.9,2292.4],"6-93-51":[20.83,411.7],"5-46-25":[20.83,2292.4],"6-93-52":[12.97,151.82],"6-93-53":[18.26,165.91],"5-46-26":[-1.93,165.91],"6-93-54":[-9.15,247.3],"6-93-55":[-19.02,635.17],"5-46-27":[-19.8,635.17],"6-93-56":[-16.08,2519.02],"6-93-57":[-14.95,3197.54],"5-46-28":[-28.39,3197.54],"6-93-58":[-59.02,3364.13],"6-93-59":[-200.6,3621.13],"5-46-29":[-200.6,3621.13],"6-93-60":[-383.88,4025.51],"6-93-61":[-3638.41,3923.74],"5-46-30":[-3638.41,4042.04],"6-93-62":[-4412.72,3499.2],"6-93-63":[-4412.72,3067.15],"5-46-31":[-4414.53,3516.41],"6-94-0":[-576.96,447.74],"6-94-1":[-490.72,533.51],"6-94-2":[-88.61,1993.81],"6-94-3":[-25.35,2256.16],"6-94-4":[-65.53,916.49],"6-94-5":[-226.99,650.86],"6-94-6":[-535.25,744.12],"6-94-7":[-952.38,1128.23],"6-94-8":[-3523.31,216.58],"6-94-9":[-3903.39,232.96],"6-94-10":[-4655.36,204.28],"6-94-11":[-4953.77,252.1],"6-94-12":[-5052.19,544.69],"6-94-13":[-4860.03,2652.03],"6-94-14":[-4450.02,4375.85],"6-94-15":[-4317.75,3786.97],"6-94-16":[-4383.8,5220.28],"6-94-17":[-4658.52,3644.02],"6-94-18":[-4060.5,6686.7],"6-94-19":[-4111.06,6437.5],"6-94-20":[-4733.64,6733.83],"6-94-21":[-4909.98,8019.76],"6-94-22":[-4884.18,8777.15],"6-94-23":[-5346.94,1317.62],"6-94-24":[-5660.98,1124.07],"6-94-25":[-5665.75,1331.06],"6-94-26":[-5692.51,-73.06],"6-94-27":[-5733.14,-76.23],"6-94-28":[-5947.08,-77.26],"6-94-29":[-5808.81,-77.29],"6-94-30":[-5433.18,-78.62],"6-94-31":[-5040.3,-78.17],"6-94-32":[-4752.82,-76.46],"6-94-33":[-4483.87,-74.65],"6-94-34":[-4218.61,-71.13],"6-94-35":[-3868.68,-67.72],"6-94-36":[-3569.03,-60.57],"6-94-37":[-3265.74,-54.12],"6-94-38":[-2992,1261.05],"6-94-39":[-1598.7,1080.07],"6-94-40":[-77.95,1222.62],"6-94-41":[-61.78,8598.15],"6-94-42":[-50.7,7880.79],"6-94-43":[-33.49,6616.83],"6-94-44":[-21.33,6332.71],"6-94-45":[-8.99,6551.71],"6-94-46":[0.56,3604.04],"6-94-47":[7.51,4970.26],"6-94-48":[11.75,3721.8],"6-94-49":[15.47,4235.84],"6-94-50":[16.83,2541.05],"6-94-51":[15.6,525.74],"6-94-52":[12.93,239.09],"6-94-53":[11.48,204.28],"6-94-54":[-14.13,238.32],"6-94-55":[-18.6,1029.1],"6-94-56":[-15.92,2637.61],"6-94-57":[-11.52,3300.48],"6-94-58":[-61.57,3450.97],"6-94-59":[-198.69,3672.41],"6-94-60":[-397.08,3954.97],"6-94-61":[-3665.4,3850.88],"6-94-62":[-4412.06,3480.02],"6-94-63":[-4409.04,3067.91],"6-95-0":[-602.77,562.41],"6-95-1":[-460.9,424.48],"5-47-0":[-602.77,562.41],"6-95-2":[6.2,1674.74],"6-95-3":[-126.18,1339.78],"5-47-1":[-126.18,2256.16],"4-23-0":[-645.12,2837.93],"6-95-4":[-501.23,855.62],"6-95-5":[-355.11,859.48],"5-47-2":[-501.23,916.49],"6-95-6":[-433.11,1054.02],"6-95-7":[-816.66,941.07],"5-47-3":[-952.38,1128.23],"4-23-1":[-1525.55,2211.57],"3-11-0":[-2859.78,2837.93],"6-95-8":[-3578.67,733.23],"6-95-9":[-4260.32,628.73],"5-47-4":[-4260.32,733.23],"6-95-10":[-4696.15,242.85],"6-95-11":[-4872.34,262.78],"5-47-5":[-4953.77,262.78],"4-23-2":[-4953.77,733.23],"6-95-12":[-4878.33,2173.74],"6-95-13":[-4844.26,3529.7],"5-47-6":[-5052.19,3529.7],"6-95-14":[-4336.73,4279.84],"6-95-15":[-4012.33,3328.41],"5-47-7":[-4450.02,4375.85],"4-23-3":[-5052.19,4532.62],"3-11-1":[-5052.19,4532.62],"2-5-0":[-5594.69,4532.62],"6-95-16":[-3897.48,4987.09],"6-95-17":[-4190.29,2654.79],"5-47-8":[-4658.52,5220.28],"6-95-18":[-4529.97,6201.27],"6-95-19":[-4902.77,6890.4],"5-47-9":[-4902.77,6890.4],"4-23-4":[-4902.77,7087.4],"6-95-20":[-4279.48,6254.63],"6-95-21":[-4679.07,7070.27],"5-47-10":[-4909.98,8019.76],"6-95-22":[-5271.01,8478.4],"6-95-23":[-5469.35,533.63],"5-47-11":[-5469.35,8777.15],"4-23-5":[-5502.72,8777.15],"3-11-2":[-5826.83,8777.15],"6-95-24":[-6170.59,26.16],"6-95-25":[-6029.46,-61.4],"5-47-12":[-6170.59,1331.06],"6-95-26":[-6233.8,-63.4],"6-95-27":[-6168.75,-64.19],"5-47-13":[-6233.8,-63.4],"4-23-6":[-6323.49,1608.79],"6-95-28":[-5946.53,-62.12],"6-95-29":[-5563.77,-59.77],"5-47-14":[-5947.08,-59.77],"6-95-30":[-5415.34,-59.81],"6-95-31":[-5091.48,-60.33],"5-47-15":[-5433.18,-59.81],"4-23-7":[-5947.08,2430.45],"3-11-3":[-6647.67,2590.24],"2-5-1":[-6897.64,8777.15],"1-2-0":[-7020.16,8777.15],"6-95-32":[-4840.71,-61.96],"6-95-33":[-4477.56,-62.76],"5-47-16":[-4840.71,-61.96],"6-95-34":[-4145.89,-63.18],"6-95-35":[-4001.9,-62.21],"5-47-17":[-4218.61,-62.21],"4-23-8":[-5022.99,2382.44],"6-95-36":[-3450.75,-58.3],"6-95-37":[-3372.07,-51.25],"5-47-18":[-3569.03,-51.25],"6-95-38":[-2676.42,-44.8],"6-95-39":[-2060.04,21.7],"5-47-19":[-2992,1261.05],"4-23-9":[-3761.1,1526.78],"3-11-4":[-5315.04,2500.59],"6-95-40":[-87.28,515.63],"6-95-41":[-73.3,8337.38],"5-47-20":[-87.28,8598.15],"6-95-42":[-61.25,6940.28],"6-95-43":[-45.22,6206.62],"5-47-21":[-61.25,7880.79],"4-23-10":[-87.28,8598.15],"6-95-44":[-34.87,6723.39],"6-95-45":[-20.9,6097.25],"5-47-22":[-34.87,6723.39],"6-95-46":[-8.31,2575.12],"6-95-47":[-220.5,5153.81],"5-47-23":[-220.5,5153.81],"4-23-11":[-220.5,6972.29],"3-11-5":[-220.5,8598.15],"2-5-2":[-5630.71,8598.15],"6-95-48":[11.13,3250.14],"6-95-49":[11.13,4186.84],"5-47-24":[11.13,4235.84],"6-95-50":[13.37,3407.69],"6-95-51":[13.37,2121.23],"5-47-25":[13.37,3407.69],"4-23-12":[11.13,4411.61],"6-95-52":[10.23,254.78],"6-95-53":[-6.6,249.74],"5-47-26":[-6.6,254.78],"6-95-54":[-14.83,629.23],"6-95-55":[-23.34,1290.06],"5-47-27":[-23.34,1290.06],"4-23-13":[-23.34,1290.06],"3-11-6":[-55.82,4411.61],"6-95-56":[-11.92,2688.65],"6-95-57":[-12.05,3479.02],"5-47-28":[-15.92,3479.02],"6-95-58":[-66.28,3627.63],"6-95-59":[-225.58,3738.39],"5-47-29":[-225.58,3738.39],"4-23-14":[-225.58,3738.39],"6-95-60":[-389.39,3883.62],"6-95-61":[-3689.24,3781.94],"5-47-30":[-3689.24,3954.97],"6-95-62":[-4427.44,3420.26],"6-95-63":[-4395.91,3069.78],"5-47-31":[-4427.44,3480.02],"4-23-15":[-4427.44,4042.04],"3-11-7":[-4558.49,4042.04],"2-5-3":[-5188.16,4411.61],"1-2-1":[-5630.71,8598.15],"6-96-0":[-507.95,550.11],"6-96-1":[-395.05,585.56],"6-96-2":[6.32,1424.65],"6-96-3":[-31.33,1441.83],"6-96-4":[-453.58,1344.57],"6-96-5":[-201.96,1305.47],"6-96-6":[-290.34,1334],"6-96-7":[-358.6,1577.7],"6-96-8":[-3477.28,974.81],"6-96-9":[-4185.57,751.03],"6-96-10":[-4564.8,917.02],"6-96-11":[-4753.73,457.27],"6-96-12":[-4737.6,1266.17],"6-96-13":[-4756.71,3266],"6-96-14":[-4510.66,4151.48],"6-96-15":[-4069.46,4116.23],"6-96-16":[-3473.69,3824.31],"6-96-17":[-3788.26,2504.01],"6-96-18":[-4700.84,5909.96],"6-96-19":[-4874.41,6767.17],"6-96-20":[-5176.8,6522.84],"6-96-21":[-4920.94,7463.69],"6-96-22":[-5332.86,7512.84],"6-96-23":[-5984.55,1663.78],"6-96-24":[-5819.56,1062.24],"6-96-25":[-6172.54,-53.86],"6-96-26":[-6470.49,-59.44],"6-96-27":[-6334.52,407.51],"6-96-28":[-6436.56,114.95],"6-96-29":[-5830.63,-53.59],"6-96-30":[-5438.79,-48.89],"6-96-31":[-4933.77,-47.66],"6-96-32":[-4971.61,-47.94],"6-96-33":[-4598.44,-48.79],"6-96-34":[-4770.86,-51.46],"6-96-35":[-3985.12,95.94],"6-96-36":[-3493.93,364.5],"6-96-37":[-3068.68,-52.16],"6-96-38":[-2570.27,-47.88],"6-96-39":[-1611.51,971.23],"6-96-40":[-110.58,1645.76],"6-96-41":[-79.29,7274.95],"6-96-42":[-69.21,7054.69],"6-96-43":[-55.83,6428.04],"6-96-44":[-44.21,6604.16],"6-96-45":[-29.81,5836.96],"6-96-46":[-17.32,2435],"6-96-47":[-19.04,3762.29],"6-96-48":[3,4053.22],"6-96-49":[6.76,4099.84],"6-96-50":[9.32,3157.99],"6-96-51":[9.2,1217.16],"6-96-52":[7.16,445.77],"6-96-53":[-41.06,924.54],"6-96-54":[2.39,754.02],"6-96-55":[3.38,1584.77],"6-96-56":[14.61,2802.12],"6-96-57":[-13.87,3518.93],"6-96-58":[-60.39,3704.38],"6-96-59":[-114.78,3756.39],"6-96-60":[-212.46,3799.9],"6-96-61":[-3739.84,3696.84],"6-96-62":[-4393.72,3372.98],"6-96-63":[-4412.76,3073.17],"6-97-0":[-364.14,494.02],"6-97-1":[-399.12,366.65],"5-48-0":[-507.95,585.56],"6-97-2":[5.88,988],"6-97-3":[-5.43,1653.63],"5-48-1":[-31.33,1653.63],"6-97-4":[-15.46,1661.74],"6-97-5":[-282.65,1274.66],"5-48-2":[-453.58,1661.74],"6-97-6":[-438.53,1165.53],"6-97-7":[-407.85,1618.98],"5-48-3":[-438.53,1618.98],"6-97-8":[-2713.91,1177.41],"6-97-9":[-4143.19,764.98],"5-48-4":[-4185.57,1177.41],"6-97-10":[-4571.83,1092.04],"6-97-11":[-4667.26,823.06],"5-48-5":[-4753.73,1092.04],"6-97-12":[-4992.04,2561.56],"6-97-13":[-4442.71,2677.49],"5-48-6":[-4992.04,3266],"6-97-14":[-4214.57,2882.06],"6-97-15":[-4045.73,4155.27],"5-48-7":[-4510.66,4155.27],"6-97-16":[-3751.2,4825.04],"6-97-17":[-4087.17,4733.64],"5-48-8":[-4087.17,4825.04],"6-97-18":[-4588.68,5772.12],"6-97-19":[-4985.77,6131.65],"5-48-9":[-4985.77,6767.17],"6-97-20":[-5603.67,6237.58],"6-97-21":[-4539.45,7221.31],"5-48-10":[-5603.67,7463.69],"6-97-22":[-5521.12,5335.5],"6-97-23":[-6178.41,2777.96],"5-48-11":[-6178.41,7512.84],"6-97-24":[-5874.71,3021.9],"6-97-25":[-6475.28,1489.97],"5-48-12":[-6475.28,3021.9],"6-97-26":[-6434.12,365.67],"6-97-27":[-6299.38,671.16],"5-48-13":[-6470.49,671.16],"6-97-28":[-6037.15,253.16],"6-97-29":[-5599.45,634.69],"5-48-14":[-6436.56,634.69],"6-97-30":[-5263.17,2140.29],"6-97-31":[-5140.67,-30.37],"5-48-15":[-5438.79,2140.29],"6-97-32":[-5106.69,-30.41],"6-97-33":[-4931.92,2040.29],"5-48-16":[-5106.69,2040.29],"6-97-34":[-4661.45,548.69],"6-97-35":[-4636.64,171.14],"5-48-17":[-4770.86,548.69],"6-97-36":[-3316.65,618.15],"6-97-37":[-2881.1,316.65],"5-48-18":[-3493.93,618.15],"6-97-38":[-2676.29,1443.77],"6-97-39":[-137.79,2960.9],"5-48-19":[-2676.29,2960.9],"6-97-40":[-91.36,2693.99],"6-97-41":[-84.52,5200.27],"5-48-20":[-110.58,7274.95],"6-97-42":[-74.46,7161.3],"6-97-43":[-60.54,6144.57],"5-48-21":[-74.46,7161.3],"6-97-44":[-55.82,6036.64],"6-97-45":[-41.68,5696.1],"5-48-22":[-55.82,6604.16],"6-97-46":[-29.34,4612.61],"6-97-47":[-13.57,4736.04],"5-48-23":[-29.34,4736.04],"6-97-48":[-3.72,4132.25],"6-97-49":[2.56,2840.06],"5-48-24":[-3.72,4132.25],"6-97-50":[5.93,2600.03],"6-97-51":[6.01,2378.55],"5-48-25":[5.93,3157.99],"6-97-52":[3.78,811.06],"6-97-53":[-1.51,1061.04],"5-48-26":[-41.06,1061.04],"6-97-54":[-2.2,784.39],"6-97-55":[-0.05,1584.77],"5-48-27":[-2.2,1584.77],"6-97-56":[43.27,2824.51],"6-97-57":[-14.89,3500.23],"5-48-28":[-14.89,3518.93],"6-97-58":[-24.5,3719.54],"6-97-59":[-126.51,3755.97],"5-48-29":[-126.51,3756.39],"6-97-60":[-221.84,3775.22],"6-97-61":[-3792.88,3652.34],"5-48-30":[-3792.88,3799.9],"6-97-62":[-4477.7,3341.15],"6-97-63":[-4401.04,3074.67],"5-48-31":[-4477.7,3372.98],"6-98-0":[-371.51,448.58],"6-98-1":[-316.46,300.99],"6-98-2":[4.57,1060.02],"6-98-3":[-254.89,1807.12],"6-98-4":[-16.48,1774.8],"6-98-5":[-298.82,1169.06],"6-98-6":[-774.09,715.29],"6-98-7":[-2340.07,1569.96],"6-98-8":[-1082.6,1090.5],"6-98-9":[-4200.3,887.64],"6-98-10":[-4568.5,775.1],"6-98-11":[-4834.4,615.55],"6-98-12":[-4862.94,2887.36],"6-98-13":[-4329.53,2999.01],"6-98-14":[-4764.12,3482.56],"6-98-15":[-4080.63,3928.85],"6-98-16":[-4130.05,2953.75],"6-98-17":[-4647.34,5415.08],"6-98-18":[-4790.05,5725.81],"6-98-19":[-4988.02,5462.57],"6-98-20":[-5720.28,5731.48],"6-98-21":[-4587.04,6535.05],"6-98-22":[-5777.18,5106.11],"6-98-23":[-6446.93,3346.34],"6-98-24":[-6216.81,2464.8],"6-98-25":[-6329.09,2574.03],"6-98-26":[-6412.8,1748.97],"6-98-27":[-6111.95,1498.37],"6-98-28":[-6037.15,1085.71],"6-98-29":[-6003.77,550.46],"6-98-30":[-5871.84,3433.72],"6-98-31":[-5614.47,1843.03],"6-98-32":[-5471.08,1698.95],"6-98-33":[-1424.27,3384.6],"6-98-34":[-2250.26,448.92],"6-98-35":[-2791.74,954.7],"6-98-36":[-2811.05,1369.36],"6-98-37":[-388.5,1662.98],"6-98-38":[-190.16,2513.02],"6-98-39":[-96.25,2383.84],"6-98-40":[-93.34,3253.33],"6-98-41":[-85,4949.11],"6-98-42":[-76.44,6337.06],"6-98-43":[-68.5,5603.47],"6-98-44":[-62.86,5366.56],"6-98-45":[-50.56,5626.81],"6-98-46":[-38.51,5318.07],"6-98-47":[-23.36,2894.75],"6-98-48":[-12.63,3815.84],"6-98-49":[-1.83,3449.56],"6-98-50":[0.77,2894.03],"6-98-51":[1.97,2716.31],"6-98-52":[-0.24,590.54],"6-98-53":[-6.56,774.1],"6-98-54":[-6.92,878.64],"6-98-55":[-6.32,1715.72],"6-98-56":[12.62,2802.84],"6-98-57":[-12.46,3410],"6-98-58":[-22.47,3708.3],"6-98-59":[-214.72,3736.73],"6-98-60":[-1142.49,3737.71],"6-98-61":[-3792.91,3612.82],"6-98-62":[-4469.7,3317.35],"6-98-63":[-4417.4,3075.47],"6-99-0":[-364.52,447.51],"6-99-1":[-290.13,155.66],"5-49-0":[-371.51,448.58],"6-99-2":[-22.28,953.5],"6-99-3":[-482.07,1748.05],"5-49-1":[-482.07,1807.12],"4-24-0":[-507.95,1807.12],"6-99-4":[-813.43,1651.8],"6-99-5":[-218.72,590],"5-49-2":[-813.43,1774.8],"6-99-6":[-285.15,855.64],"6-99-7":[-3731.89,1480.74],"5-49-3":[-3731.89,1569.96],"4-24-1":[-3731.89,1774.8],"6-99-8":[-3736.42,1436.53],"6-99-9":[-4507.24,868.73],"5-49-4":[-4507.24,1436.53],"6-99-10":[-4621.74,599.89],"6-99-11":[-4707.79,729.83],"5-49-5":[-4834.4,775.1],"4-24-2":[-4834.4,1436.53],"6-99-12":[-5090.06,2274.47],"6-99-13":[-4188.76,3424.72],"5-49-6":[-5090.06,3424.72],"6-99-14":[-4292.66,3181.14],"6-99-15":[-4676.48,3821.64],"5-49-7":[-4764.12,3928.85],"4-24-3":[-5090.06,4155.27],"6-99-16":[-4251.07,3902.64],"6-99-17":[-4738.26,3828.18],"5-49-8":[-4738.26,5415.08],"6-99-18":[-4876.5,5499.12],"6-99-19":[-5960.03,6216.6],"5-49-9":[-5960.03,6216.6],"4-24-4":[-5960.03,6767.17],"6-99-20":[-6992.72,6063.79],"6-99-21":[-4952.91,6434.65],"5-49-10":[-6992.72,6535.05],"6-99-22":[-5781.88,5432.09],"6-99-23":[-6502.07,3530.75],"5-49-11":[-6502.07,5432.09],"4-24-5":[-6992.72,7512.84],"6-99-24":[-7339.17,2554.75],"6-99-25":[-6570.41,2536.99],"5-49-12":[-7339.17,2574.03],"6-99-26":[-6827.32,2080.04],"6-99-27":[-6445.11,2009.72],"5-49-13":[-6827.32,2080.04],"4-24-6":[-7339.17,3021.9],"6-99-28":[-6607.43,1760.05],"6-99-29":[-6362.58,1543.06],"5-49-14":[-6607.43,1760.05],"6-99-30":[-6442.03,2251.47],"6-99-31":[-5733.72,3054.12],"5-49-15":[-6442.03,3433.72],"4-24-7":[-6607.43,3433.72],"6-99-32":[-195.98,3098.13],"6-99-33":[-150.19,2196.47],"5-49-16":[-5471.08,3384.6],"6-99-34":[-147.54,1442.07],"6-99-35":[-118.78,1686.04],"5-49-17":[-2791.74,1686.04],"4-24-8":[-5471.08,3384.6],"6-99-36":[-143.43,1862.71],"6-99-37":[-88.25,2022.05],"5-49-18":[-2811.05,2022.05],"6-99-38":[-94.27,2510.97],"6-99-39":[-95.18,2501.75],"5-49-19":[-190.16,2513.02],"4-24-9":[-3493.93,2960.9],"6-99-40":[-92.2,3411.71],"6-99-41":[-83.68,5229.16],"5-49-20":[-93.34,5229.16],"6-99-42":[-78.69,6352.65],"6-99-43":[-74.99,5945.78],"5-49-21":[-78.69,6352.65],"4-24-10":[-110.58,7274.95],"6-99-44":[-72.56,6157.61],"6-99-45":[-59.76,5387.12],"5-49-22":[-72.56,6157.61],"6-99-46":[-48.96,3739.65],"6-99-47":[-34.76,3871.64],"5-49-23":[-48.96,5318.07],"4-24-11":[-72.56,6604.16],"6-99-48":[-22.48,3771.63],"6-99-49":[-11.77,3171.14],"5-49-24":[-22.48,3815.84],"6-99-50":[-6.68,3321.72],"6-99-51":[-3.06,2161.47],"5-49-25":[-6.68,3321.72],"4-24-12":[-22.48,4132.25],"6-99-52":[-6.11,696.82],"6-99-53":[-14.49,592.88],"5-49-26":[-14.49,774.1],"6-99-54":[-16.12,865.7],"6-99-55":[-5.53,1741.17],"5-49-27":[-16.12,1741.17],"4-24-13":[-41.06,1741.17],"6-99-56":[108.04,2705.18],"6-99-57":[-11.7,3387.35],"5-49-28":[-12.46,3410],"6-99-58":[-9.12,3611.49],"6-99-59":[-229.47,3694.95],"5-49-29":[-229.47,3736.73],"4-24-14":[-229.47,3756.39],"6-99-60":[-2254.34,3696.05],"6-99-61":[-3851.31,3543.3],"5-49-30":[-3851.31,3737.71],"6-99-62":[-4412.98,3284.67],"6-99-63":[-4408.48,3075.96],"5-49-31":[-4469.7,3317.35],"4-24-15":[-4477.7,3799.9],"6-100-0":[-390.94,351.58],"6-100-1":[-450.17,176.67],"6-100-2":[-337.26,852.14],"6-100-3":[-92.47,1463.97],"6-100-4":[-1198.63,1680.37],"6-100-5":[-276.63,702.17],"6-100-6":[-847.1,737.36],"6-100-7":[-779.5,1198.23],"6-100-8":[-1490.09,958.88],"6-100-9":[-4561.87,855.83],"6-100-10":[-4756.31,555.66],"6-100-11":[-4695.48,852.88],"6-100-12":[-4493.8,918],"6-100-13":[-4524.26,3194.59],"6-100-14":[-4412.44,2295.19],"6-100-15":[-4058.81,3379.04],"6-100-16":[-4869.14,3558.09],"6-100-17":[-5072.75,1902.58],"6-100-18":[-5507.87,5176.87],"6-100-19":[-6806.78,4952.19],"6-100-20":[-7047.82,6100.38],"6-100-21":[-5422.5,7111.28],"6-100-22":[-5589.41,4334.26],"6-100-23":[-6273.7,3117.27],"6-100-24":[-6680.93,3084.02],"6-100-25":[-7178.68,2792.64],"6-100-26":[-6925.86,1323.34],"6-100-27":[-5898.05,1726.89],"6-100-28":[-6590.9,1062.2],"6-100-29":[-6749.52,1503.56],"6-100-30":[-4431.14,3063.08],"6-100-31":[-68.74,3673.24],"6-100-32":[-174.08,3783.24],"6-100-33":[-79.57,3170.1],"6-100-34":[-114.16,1437.39],"6-100-35":[-109.27,1036.2],"6-100-36":[-136.16,1688.89],"6-100-37":[-82.44,1262.34],"6-100-38":[-86.64,2743.63],"6-100-39":[-87.84,2954.02],"6-100-40":[-85.52,3019.27],"6-100-41":[-80.19,4227.26],"6-100-42":[-78.68,7011.33],"6-100-43":[-81.4,5829.36],"6-100-44":[-80.06,4840.27],"6-100-45":[-66.32,5057.87],"6-100-46":[-55.39,1867.69],"6-100-47":[-41.05,3437.08],"6-100-48":[-30.56,3288.03],"6-100-49":[-19.26,2279.18],"6-100-50":[-931.09,3069.79],"6-100-51":[-9.52,911],"6-100-52":[-12.52,823.95],"6-100-53":[-17.41,557.51],"6-100-54":[-19.91,858.74],"6-100-55":[-15.87,1791.71],"6-100-56":[62.06,2640.61],"6-100-57":[-13.37,3292.47],"6-100-58":[-6.91,3525.76],"6-100-59":[-234.59,3605.31],"6-100-60":[-2981.06,3601.4],"6-100-61":[-3897.97,3433.72],"6-100-62":[-4391.74,3240.37],"6-100-63":[-4393.37,3075.89],"6-101-0":[-421.01,313.54],"6-101-1":[-512.44,178.89],"5-50-0":[-512.44,351.58],"6-101-2":[-361.24,1063.19],"6-101-3":[-0.04,1302.37],"5-50-1":[-361.24,1463.97],"6-101-4":[-1405.91,935.03],"6-101-5":[-772.36,832.71],"5-50-2":[-1405.91,1680.37],"6-101-6":[-1534.94,728.03],"6-101-7":[-1407.76,1011.68],"5-50-3":[-1534.94,1198.23],"6-101-8":[-2600.51,929.44],"6-101-9":[-4397.62,836.04],"5-50-4":[-4561.87,958.88],"6-101-10":[-4770.73,706.58],"6-101-11":[-4773,984.1],"5-50-5":[-4773,984.1],"6-101-12":[-4525.52,1472.91],"6-101-13":[-4274.01,2280.07],"5-50-6":[-4525.52,3194.59],"6-101-14":[-5036.77,1985.15],"6-101-15":[-4218.02,2132.01],"5-50-7":[-5036.77,3379.04],"6-101-16":[-5245.63,2678.17],"6-101-17":[-5049.38,2311.12],"5-50-8":[-5245.63,3558.09],"6-101-18":[-6178.58,3502.2],"6-101-19":[-6836.91,4106.19],"5-50-9":[-6836.91,5176.87],"6-101-20":[-6222.74,4524.83],"6-101-21":[-6183.09,1942.57],"5-50-10":[-7047.82,7111.28],"6-101-22":[-6217.18,2858.21],"6-101-23":[-6156.22,2530.43],"5-50-11":[-6273.7,4334.26],"6-101-24":[-6127.32,2937.63],"6-101-25":[-6187.88,2686.47],"5-50-12":[-7178.68,3084.02],"6-101-26":[-6708.63,1984.96],"6-101-27":[-6304.3,1793.02],"5-50-13":[-6925.86,1984.96],"6-101-28":[-6890.34,988.31],"6-101-29":[-6807.99,2085.28],"5-50-14":[-6890.34,2085.28],"6-101-30":[-827.51,2120.45],"6-101-31":[-91.17,1041.7],"5-50-15":[-4431.14,3673.24],"6-101-32":[-97.78,1126.85],"6-101-33":[-741.62,2229.43],"5-50-16":[-741.62,3783.24],"6-101-34":[-86,2218.28],"6-101-35":[-91.75,972.31],"5-50-17":[-114.16,2218.28],"6-101-36":[-82.03,1722.02],"6-101-37":[-67.22,1888.96],"5-50-18":[-136.16,1888.96],"6-101-38":[-84.9,2609.46],"6-101-39":[-73.16,2809.62],"5-50-19":[-87.84,2954.02],"6-101-40":[-76.24,2431.42],"6-101-41":[-78.06,2794.21],"5-50-20":[-85.52,4227.26],"6-101-42":[-80.1,1837.51],"6-101-43":[-82.02,4346.82],"5-50-21":[-82.02,7011.33],"6-101-44":[-82.43,4015.21],"6-101-45":[-71.27,3380.19],"5-50-22":[-82.43,5057.87],"6-101-46":[-62.71,2269.12],"6-101-47":[-49.64,2628.18],"5-50-23":[-62.71,3437.08],"6-101-48":[-39.39,2089],"6-101-49":[-28.16,1965.15],"5-50-24":[-39.39,3288.03],"6-101-50":[-1045.89,2237.07],"6-101-51":[-17.14,1465.9],"5-50-25":[-1045.89,3069.79],"6-101-52":[-18.23,975.1],"6-101-53":[-25.73,697.58],"5-50-26":[-25.73,975.1],"6-101-54":[-26.47,842.08],"6-101-55":[-27.05,1793.86],"5-50-27":[-27.05,1793.86],"6-101-56":[130.63,2600.89],"6-101-57":[-15.79,3117.95],"5-50-28":[-15.79,3292.47],"6-101-58":[-21.12,3441.93],"6-101-59":[-223.25,3528.69],"5-50-29":[-234.59,3605.31],"6-101-60":[-3261.12,3498.6],"6-101-61":[-4152.25,3363.74],"5-50-30":[-4152.25,3601.4],"6-101-62":[-4394.82,3196.67],"6-101-63":[-4379.5,3075.29],"5-50-31":[-4394.82,3240.37],"6-102-0":[-536.22,303.03],"6-102-1":[-458.93,93],"6-102-2":[-523.45,1394.62],"6-102-3":[-340.76,1118.35],"6-102-4":[-637.66,963.87],"6-102-5":[-1006.67,1119.08],"6-102-6":[-1697.74,734.39],"6-102-7":[-1650.38,887.81],"6-102-8":[-3194.12,947.89],"6-102-9":[-4309.08,743.5],"6-102-10":[-4735.62,607.14],"6-102-11":[-4787.15,1969.85],"6-102-12":[-4697.47,2509.72],"6-102-13":[-4218.23,1987.12],"6-102-14":[-4472.05,2758.43],"6-102-15":[-4465.68,2221.84],"6-102-16":[-4700.72,1397.18],"6-102-17":[-5315.38,2304.17],"6-102-18":[-6259.92,1918.57],"6-102-19":[-6187.94,3718.19],"6-102-20":[-5971.58,3019.64],"6-102-21":[-5845.44,2199.58],"6-102-22":[-6124.87,2506.96],"6-102-23":[-6381.94,1720.45],"6-102-24":[-5579.24,1495.1],"6-102-25":[-5964.56,1791.56],"6-102-26":[-6228.05,2581.3],"6-102-27":[-6191.63,2426.49],"6-102-28":[-7237.19,1298.21],"6-102-29":[-3650.72,3393.89],"6-102-30":[-84.28,1014.85],"6-102-31":[-93.44,1601.85],"6-102-32":[-104.01,1543.85],"6-102-33":[-125.97,901.87],"6-102-34":[-1367.07,3442.9],"6-102-35":[-1855.07,1260.19],"6-102-36":[-322.96,2328.48],"6-102-37":[-1009.39,2525.3],"6-102-38":[-380.49,1743.52],"6-102-39":[-142.48,1395.18],"6-102-40":[-83.25,1596.45],"6-102-41":[-78.87,2416.96],"6-102-42":[-80.62,2152.58],"6-102-43":[-81.5,2932.67],"6-102-44":[-81.55,3630.19],"6-102-45":[-75.32,1896.56],"6-102-46":[-66.17,2239.16],"6-102-47":[-55.15,1390.17],"6-102-48":[-45.84,2203.77],"6-102-49":[-34.14,2652.43],"6-102-50":[-1232.75,1976.12],"6-102-51":[-1190.99,2418.74],"6-102-52":[-24.4,1885.73],"6-102-53":[-30.23,601.14],"6-102-54":[-36.54,759.49],"6-102-55":[-33.13,1569.32],"6-102-56":[133.31,2518.52],"6-102-57":[-10.76,2973.89],"6-102-58":[-33.46,3288.12],"6-102-59":[-305.74,3458.77],"6-102-60":[-3439.58,3410.38],"6-102-61":[-4199.53,3280.26],"6-102-62":[-4394.84,3169.64],"6-102-63":[-4385.62,3074.68],"6-103-0":[-664.29,385.94],"6-103-1":[-607.48,87.39],"5-51-0":[-664.29,385.94],"6-103-2":[-559,1207.8],"6-103-3":[-287.93,790.24],"5-51-1":[-559,1394.62],"4-25-0":[-664.29,1463.97],"6-103-4":[-231.49,809.08],"6-103-5":[-1283.43,1038.7],"5-51-2":[-1283.43,1119.08],"6-103-6":[-1537.95,689.79],"6-103-7":[-1465.17,820.66],"5-51-3":[-1697.74,887.81],"4-25-1":[-1697.74,1680.37],"3-12-0":[-3731.89,1807.12],"6-103-8":[-3174.17,871.07],"6-103-9":[-4207.91,581.35],"5-51-4":[-4309.08,947.89],"6-103-10":[-4597.12,599.15],"6-103-11":[-4821.39,2526.11],"5-51-5":[-4821.39,2526.11],"4-25-2":[-4821.39,2526.11],"6-103-12":[-4544.45,2781.93],"6-103-13":[-4167.75,2000.38],"5-51-6":[-4697.47,2781.93],"6-103-14":[-4476.17,2483.46],"6-103-15":[-4442.04,1631.54],"5-51-7":[-4476.17,2758.43],"4-25-3":[-5036.77,3379.04],"3-12-1":[-5090.06,4155.27],"6-103-16":[-4817.91,1440.56],"6-103-17":[-5610.41,2312.81],"5-51-8":[-5610.41,2312.81],"6-103-18":[-6311.98,2785.32],"6-103-19":[-6138.44,2608.85],"5-51-9":[-6311.98,3718.19],"4-25-4":[-6836.91,5176.87],"6-103-20":[-5508.45,3075.61],"6-103-21":[-5886.75,2284.9],"5-51-10":[-5971.58,3075.61],"6-103-22":[-6066.19,2090.39],"6-103-23":[-5457.66,1930.57],"5-51-11":[-6381.94,2506.96],"4-25-5":[-7047.82,7111.28],"3-12-2":[-7047.82,7512.84],"6-103-24":[-5713.12,1683.1],"6-103-25":[-5757.33,1775.49],"5-51-12":[-5964.56,1791.56],"6-103-26":[-5922.59,22.84],"6-103-27":[-5849.17,35.12],"5-51-13":[-6228.05,2581.3],"4-25-6":[-7178.68,3084.02],"6-103-28":[-7243.99,50.12],"6-103-29":[-1454.02,3260.42],"5-51-14":[-7243.99,3393.89],"6-103-30":[-58.02,93.68],"6-103-31":[-60.48,1707.53],"5-51-15":[-93.44,1707.53],"4-25-7":[-7243.99,3673.24],"3-12-3":[-7339.17,3673.24],"6-103-32":[-162.28,1767.47],"6-103-33":[-1017.75,98.63],"5-51-16":[-1017.75,1767.47],"6-103-34":[-2341.53,3363.43],"6-103-35":[-4457.98,275.89],"5-51-17":[-4457.98,3442.9],"4-25-8":[-4457.98,3783.24],"6-103-36":[-4499.26,14.72],"6-103-37":[-3941.7,93.37],"5-51-18":[-4499.26,2525.3],"6-103-38":[-2622.21,1699.47],"6-103-39":[-141.96,1600.09],"5-51-19":[-2622.21,1743.52],"4-25-9":[-4499.26,2954.02],"3-12-4":[-5471.08,3783.24],"6-103-40":[-137.39,1823.56],"6-103-41":[-76.31,2004.38],"5-51-20":[-137.39,2416.96],"6-103-42":[-79.55,2165.55],"6-103-43":[-79.53,2984.61],"5-51-21":[-81.5,2984.61],"4-25-10":[-137.39,7011.33],"6-103-44":[-81.64,2519.86],"6-103-45":[-78.43,2732.28],"5-51-22":[-81.64,3630.19],"6-103-46":[-69.24,2273.81],"6-103-47":[-59.94,1433.55],"5-51-23":[-69.24,2273.81],"4-25-11":[-82.43,5057.87],"3-12-5":[-137.39,7274.95],"6-103-48":[-51.3,1616.53],"6-103-49":[-40.42,2462.04],"5-51-24":[-51.3,2652.43],"6-103-50":[-34.48,1978.37],"6-103-51":[-292.05,2624.92],"5-51-25":[-1232.75,2624.92],"4-25-12":[-1232.75,3288.03],"6-103-52":[-31.64,2452.11],"6-103-53":[-39.3,580.7],"5-51-26":[-39.3,2452.11],"6-103-54":[-43.14,595.46],"6-103-55":[-38.79,1241.72],"5-51-27":[-43.14,1569.32],"4-25-13":[-43.14,2452.11],"3-12-6":[-1232.75,4132.25],"6-103-56":[41.8,2536.98],"6-103-57":[-10.42,2925.63],"5-51-28":[-10.76,2973.89],"6-103-58":[-41.3,3218.56],"6-103-59":[-864.59,3373.24],"5-51-29":[-864.59,3458.77],"4-25-14":[-864.59,3605.31],"6-103-60":[-3543.19,3368.42],"6-103-61":[-4192.59,3217.25],"5-51-30":[-4199.53,3410.38],"6-103-62":[-4418.45,3122.3],"6-103-63":[-4379.77,3072.12],"5-51-31":[-4418.45,3169.64],"4-25-15":[-4418.45,3601.4],"3-12-7":[-4477.7,3799.9],"6-104-0":[-526.41,278.25],"6-104-1":[-607.48,84.32],"6-104-2":[-567.79,1215.23],"6-104-3":[-136.97,496.59],"6-104-4":[-530.59,368.79],"6-104-5":[-1286.3,495.96],"6-104-6":[-1290.23,483.95],"6-104-7":[-1728.3,491.06],"6-104-8":[-2795.06,750.89],"6-104-9":[-4321.31,561.53],"6-104-10":[-4660.95,1677.59],"6-104-11":[-4755.16,2530.45],"6-104-12":[-4867.13,2992.37],"6-104-13":[-4319.24,1634.35],"6-104-14":[-4861.02,1654.73],"6-104-15":[-4590.03,1754.54],"6-104-16":[-4680.89,1742.15],"6-104-17":[-5021.65,2838.35],"6-104-18":[-6327.49,3047.6],"6-104-19":[-6022.91,1847.96],"6-104-20":[-5238.09,1280.51],"6-104-21":[-5427.73,1772.77],"6-104-22":[-1527.77,2103.76],"6-104-23":[-3176.09,1877.29],"6-104-24":[-4631.17,953.51],"6-104-25":[-4908.55,27.99],"6-104-26":[-6087.43,44.5],"6-104-27":[-6964.5,55.83],"6-104-28":[-7180.91,944.4],"6-104-29":[-1168.01,3611.18],"6-104-30":[-48.05,2422.76],"6-104-31":[29.67,2305.23],"6-104-32":[-137.09,2345.05],"6-104-33":[-2420.97,2313.76],"6-104-34":[-3121.56,3699.18],"6-104-35":[-4705.71,1042.4],"6-104-36":[-4651.58,248.09],"6-104-37":[-4548.6,171.3],"6-104-38":[-3947.09,13.11],"6-104-39":[-1918.04,879.5],"6-104-40":[-160.75,1768.37],"6-104-41":[-63.64,2023.75],"6-104-42":[-75.39,1680.76],"6-104-43":[-77.46,1192.5],"6-104-44":[-81.92,1797.89],"6-104-45":[-78.44,2994.6],"6-104-46":[-69.89,2749.34],"6-104-47":[-61.52,1693.13],"6-104-48":[-54.23,1689.54],"6-104-49":[-44.26,1624.78],"6-104-50":[-39.25,1606.81],"6-104-51":[-36.43,2574.37],"6-104-52":[-37.17,2397.44],"6-104-53":[-45.54,1602.59],"6-104-54":[-46.98,571.52],"6-104-55":[-44.18,1300.89],"6-104-56":[14.72,2508.46],"6-104-57":[-9.19,2971.73],"6-104-58":[-48.98,3190.51],"6-104-59":[-1971.26,3320.02],"6-104-60":[-3543.17,3317.03],"6-104-61":[-4270.15,3144.59],"6-104-62":[-4463.8,3080.43],"6-104-63":[-4359.14,3069.68],"6-105-0":[-386.63,295.13],"6-105-1":[-530.27,104.53],"5-52-0":[-607.48,295.13],"6-105-2":[-57.63,673.64],"6-105-3":[-142.54,382.73],"5-52-1":[-567.79,1215.23],"6-105-4":[-1219.69,24.28],"6-105-5":[-1293.1,453.82],"5-52-2":[-1293.1,495.96],"6-105-6":[-1282.86,471.8],"6-105-7":[-1513.06,385.91],"5-52-3":[-1728.3,491.06],"6-105-8":[-3081.89,448.35],"6-105-9":[-4301.03,380.42],"5-52-4":[-4321.31,750.89],"6-105-10":[-4774.33,1615.07],"6-105-11":[-4753.47,2962.65],"5-52-5":[-4774.33,2962.65],"6-105-12":[-4793.17,2450.24],"6-105-13":[-4635.6,1532.32],"5-52-6":[-4867.13,2992.37],"6-105-14":[-5474.7,1232.86],"6-105-15":[-4765.11,1464.19],"5-52-7":[-5474.7,1754.54],"6-105-16":[-5081.47,2060.03],"6-105-17":[-5649.49,2407.63],"5-52-8":[-5649.49,2838.35],"6-105-18":[-6192.35,805.59],"6-105-19":[-5515.95,1519.8],"5-52-9":[-6327.49,3047.6],"6-105-20":[-153.64,1755.88],"6-105-21":[-69.59,1735.53],"5-52-10":[-5427.73,1772.77],"6-105-22":[4.65,2160.72],"6-105-23":[-47.98,1800.52],"5-52-11":[-3176.09,2160.72],"6-105-24":[-983.55,1138.97],"6-105-25":[-4898.89,52.59],"5-52-12":[-4908.55,1138.97],"6-105-26":[-6006.98,67.42],"6-105-27":[-7165.68,82.34],"5-52-13":[-7165.68,82.34],"6-105-28":[-7107.38,2813.87],"6-105-29":[-2789.9,4108.68],"5-52-14":[-7180.91,4108.68],"6-105-30":[-2046.22,2687.61],"6-105-31":[-2203.42,2267.3],"5-52-15":[-2203.42,2687.61],"6-105-32":[-2023.09,2189.3],"6-105-33":[-475.58,2628.6],"5-52-16":[-2420.97,2628.6],"6-105-34":[-2993.96,4026.67],"6-105-35":[-3073,2972.87],"5-52-17":[-4705.71,4026.67],"6-105-36":[-5007.8,38.1],"6-105-37":[-4418.38,27.92],"5-52-18":[-5007.8,248.09],"6-105-38":[-4679.05,2.72],"6-105-39":[-3358.64,1205.98],"5-52-19":[-4679.05,1205.98],"6-105-40":[-100.62,1717.53],"6-105-41":[13.76,2116.73],"5-52-20":[-160.75,2116.73],"6-105-42":[-14.21,1651.52],"6-105-43":[-99.76,1646.92],"5-52-21":[-99.76,1680.76],"6-105-44":[-78.53,1437.77],"6-105-45":[-78.21,708.59],"5-52-22":[-81.92,2994.6],"6-105-46":[-69.94,2304.63],"6-105-47":[-61.91,2016.37],"5-52-23":[-69.94,2749.34],"6-105-48":[-54.84,1440.18],"6-105-49":[-47.73,1222.85],"5-52-24":[-54.84,1689.54],"6-105-50":[-42.44,1502.32],"6-105-51":[-41.44,2344.1],"5-52-25":[-42.44,2574.37],"6-105-52":[-43.24,2813.61],"6-105-53":[-52.02,1580.09],"5-52-26":[-52.02,2813.61],"6-105-54":[-54.04,379.62],"6-105-55":[-53.1,680.38],"5-52-27":[-54.04,1300.89],"6-105-56":[19.16,2408.3],"6-105-57":[-6.33,3030.32],"5-52-28":[-9.19,3030.32],"6-105-58":[-48.95,3188.16],"6-105-59":[-2420.07,3235.61],"5-52-29":[-2420.07,3320.02],"6-105-60":[-3653.6,3197.29],"6-105-61":[-4402.41,3081.54],"5-52-30":[-4402.41,3317.03],"6-105-62":[-4442.47,3060.18],"6-105-63":[-4335.36,3063.52],"5-52-31":[-4463.8,3080.43],"6-106-0":[-382.69,518.1],"6-106-1":[-442,276.46],"6-106-2":[-281.26,561.88],"6-106-3":[-169.68,522.34],"6-106-4":[-1384.91,0.13],"6-106-5":[-1025.1,460.29],"6-106-6":[-1225,454.78],"6-106-7":[-1960.43,411.14],"6-106-8":[-3522.54,443.53],"6-106-9":[-4277.44,383.49],"6-106-10":[-4763.29,717.41],"6-106-11":[-4792.44,2548.26],"6-106-12":[-4965.29,2226.52],"6-106-13":[-4754.24,1486.61],"6-106-14":[-5102.45,1598.44],"6-106-15":[-4846.65,1743.81],"6-106-16":[-5136.73,1936.12],"6-106-17":[-5992.39,1887.25],"6-106-18":[-6270.11,785.42],"6-106-19":[-5555.1,1101.77],"6-106-20":[-105.16,584.53],"6-106-21":[-78.25,1795.67],"6-106-22":[-35.2,1934.56],"6-106-23":[-36.2,3691.21],"6-106-24":[-55.29,1951.28],"6-106-25":[-2434.64,2501.63],"6-106-26":[-5844.39,2962.21],"6-106-27":[-7088.95,2343.09],"6-106-28":[-7127.73,2288.03],"6-106-29":[-5085.75,1818.49],"6-106-30":[-2226.25,3403.08],"6-106-31":[-2614.6,3030.91],"6-106-32":[-5551.59,3132.81],"6-106-33":[-5187.49,3490.23],"6-106-34":[-4798.95,1959.49],"6-106-35":[-4231.66,2405.04],"6-106-36":[-5091.52,2311.11],"6-106-37":[-5322.52,2857.2],"6-106-38":[-4356.76,2411.64],"6-106-39":[-4709.05,1867.27],"6-106-40":[-1353.88,3536.2],"6-106-41":[-232.12,1847.54],"6-106-42":[-29.3,1738.68],"6-106-43":[-76.47,544.69],"6-106-44":[-78.18,1063.1],"6-106-45":[-82.72,673.36],"6-106-46":[-69.49,1847.24],"6-106-47":[-61.11,1904.12],"6-106-48":[-54.99,1698.78],"6-106-49":[-48.72,1558.94],"6-106-50":[-45.04,1454.59],"6-106-51":[-45.09,2182.46],"6-106-52":[-47.54,2446.34],"6-106-53":[-57.28,707.41],"6-106-54":[-61.21,389.51],"6-106-55":[-59.83,845.24],"6-106-56":[15,2462.74],"6-106-57":[-18.09,3046.36],"6-106-58":[-77.59,3177.4],"6-106-59":[-2784.49,3172.35],"6-106-60":[-5343.81,3109.06],"6-106-61":[-5227.4,3012.28],"6-106-62":[-4422.66,3048.31],"6-106-63":[-4439.18,3060.25],"6-107-0":[-286.77,546.08],"6-107-1":[-378.19,115.12],"5-53-0":[-442,546.08],"6-107-2":[-455.31,408.6],"6-107-3":[-333.04,478.27],"5-53-1":[-455.31,561.88],"4-26-0":[-607.48,1215.23],"6-107-4":[-681.52,0.24],"6-107-5":[-883.51,565.28],"5-53-2":[-1384.91,565.28],"6-107-6":[-779.35,479.01],"6-107-7":[-986.72,427.06],"5-53-3":[-1960.43,479.01],"4-26-1":[-1960.43,565.28],"6-107-8":[-3454.89,342.41],"6-107-9":[-4321.54,417.22],"5-53-4":[-4321.54,443.53],"6-107-10":[-4617.61,1200.19],"6-107-11":[-4818.58,2000.95],"5-53-5":[-4818.58,2548.26],"4-26-2":[-4818.58,2962.65],"6-107-12":[-5173.19,1644.22],"6-107-13":[-5052,1523.39],"5-53-6":[-5173.19,2226.52],"6-107-14":[-5421.41,1600.44],"6-107-15":[-5348.99,1541.69],"5-53-7":[-5421.41,1743.81],"4-26-3":[-5474.7,2992.37],"6-107-16":[-5283.07,816.14],"6-107-17":[-5990.04,1174.47],"5-53-8":[-5992.39,1936.12],"6-107-18":[-6455.15,918.27],"6-107-19":[-5625.24,284.34],"5-53-9":[-6455.15,1101.77],"4-26-4":[-6455.15,3047.6],"6-107-20":[-52.47,526.37],"6-107-21":[-35.84,1218.7],"5-53-10":[-105.16,1795.67],"6-107-22":[0.69,665.65],"6-107-23":[-53.71,3956.01],"5-53-11":[-53.71,3956.01],"4-26-5":[-5427.73,3956.01],"6-107-24":[11.3,1042.66],"6-107-25":[-140.92,2731.61],"5-53-12":[-2434.64,2731.61],"6-107-26":[-2442.89,2712.33],"6-107-27":[-3959.71,2627.63],"5-53-13":[-7088.95,2962.21],"4-26-6":[-7165.68,2962.21],"6-107-28":[-4124.69,2528.23],"6-107-29":[-5178.42,2469.27],"5-53-14":[-7127.73,2528.23],"6-107-30":[-6397.3,2587.77],"6-107-31":[-4678.95,2851.48],"5-53-15":[-6397.3,3403.08],"4-26-7":[-7180.91,4108.68],"6-107-32":[-5755.48,2955.49],"6-107-33":[-5453.9,2702.65],"5-53-16":[-5755.48,3490.23],"6-107-34":[-5829.92,2335.3],"6-107-35":[-5067.92,2392.22],"5-53-17":[-5829.92,2405.04],"4-26-8":[-5829.92,4026.67],"6-107-36":[-3178.2,2496.62],"6-107-37":[-5674.08,2665.32],"5-53-18":[-5674.08,2857.2],"6-107-38":[-5493.89,2656.26],"6-107-39":[-5934.3,936.67],"5-53-19":[-5934.3,2656.26],"4-26-9":[-5934.3,2857.2],"6-107-40":[-6907.12,3813],"6-107-41":[-1957.5,692.66],"5-53-20":[-6907.12,3813],"6-107-42":[-102.58,1162.16],"6-107-43":[-51.74,610.87],"5-53-21":[-102.58,1738.68],"4-26-10":[-6907.12,3813],"6-107-44":[-79.98,322.34],"6-107-45":[-103.15,850.26],"5-53-22":[-103.15,1063.1],"6-107-46":[-98.51,1077.53],"6-107-47":[-60.78,748.14],"5-53-23":[-98.51,1904.12],"4-26-11":[-103.15,2994.6],"6-107-48":[-54.95,1479.71],"6-107-49":[-49.55,1565.44],"5-53-24":[-54.99,1698.78],"6-107-50":[-47.09,1490.38],"6-107-51":[-49,1610.21],"5-53-25":[-49,2182.46],"4-26-12":[-54.99,2574.37],"6-107-52":[-52.14,1975.45],"6-107-53":[-62.69,1147.18],"5-53-26":[-62.69,2446.34],"6-107-54":[-67.4,422.24],"6-107-55":[-64.36,1172.91],"5-53-27":[-67.4,1172.91],"4-26-13":[-67.4,2813.61],"6-107-56":[0.38,2590.73],"6-107-57":[-18.89,3089.34],"5-53-28":[-18.89,3089.34],"6-107-58":[-68.11,3196.31],"6-107-59":[-2999.96,3163.37],"5-53-29":[-2999.96,3196.31],"4-26-14":[-2999.96,3320.02],"6-107-60":[-5139.66,2994.83],"6-107-61":[-4603,2932.32],"5-53-30":[-5343.81,3109.06],"6-107-62":[-4447.14,3035.5],"6-107-63":[-4391.36,3058.07],"5-53-31":[-4447.14,3060.25],"4-26-15":[-5343.81,3317.03],"6-108-0":[-269.86,460.52],"6-108-1":[-909.85,103.01],"6-108-2":[-934.43,448.87],"6-108-3":[-448.87,410.23],"6-108-4":[-1134.26,783.32],"6-108-5":[-1014.64,707.83],"6-108-6":[-803.54,487.14],"6-108-7":[-492.37,1127.4],"6-108-8":[-3410.5,1401.18],"6-108-9":[-4432.32,816.9],"6-108-10":[-4679.36,804.47],"6-108-11":[-4901.46,1845.92],"6-108-12":[-4877.43,1706.86],"6-108-13":[-5078.78,1269.14],"6-108-14":[-5485.84,878.23],"6-108-15":[-5416.22,339.07],"6-108-16":[-5311.85,1264.57],"6-108-17":[-5872.94,1987.41],"6-108-18":[-6139.97,1234.98],"6-108-19":[-5744.12,581.2],"6-108-20":[-1210.92,1941.55],"6-108-21":[18.57,485.34],"6-108-22":[22.07,547.54],"6-108-23":[8,553.56],"6-108-24":[22.25,451.89],"6-108-25":[12.35,918.99],"6-108-26":[-100.52,825.9],"6-108-27":[-1028.33,1607.31],"6-108-28":[-3782.32,2883.2],"6-108-29":[-5712.91,3011.04],"6-108-30":[-5919.23,2699.58],"6-108-31":[-6130.93,2053.63],"6-108-32":[-5581.72,1989.62],"6-108-33":[-5856.99,2752.59],"6-108-34":[-5125.09,2931.03],"6-108-35":[-9837.42,2985.2],"6-108-36":[-9176.01,1499.32],"6-108-37":[-7403.24,844.91],"6-108-38":[-6431.65,967.01],"6-108-39":[-6750.67,455.4],"6-108-40":[-8904.47,557.1],"6-108-41":[-2245.02,555.5],"6-108-42":[-155.54,497.24],"6-108-43":[-143.34,1897.55],"6-108-44":[-116.63,504.19],"6-108-45":[-69.83,1160],"6-108-46":[-133.68,1895.04],"6-108-47":[-58.68,1225.25],"6-108-48":[-54.09,331.06],"6-108-49":[-49.45,858.23],"6-108-50":[-48.53,1246.12],"6-108-51":[-51.56,1690.85],"6-108-52":[-55.45,1790.32],"6-108-53":[-65.39,785.47],"6-108-54":[-71.76,816.92],"6-108-55":[-65.99,1394.18],"6-108-56":[-2.53,2630.58],"6-108-57":[-6.92,3151.32],"6-108-58":[-53.92,3203.64],"6-108-59":[-2992.28,3159.64],"6-108-60":[-4112.67,2917.97],"6-108-61":[-4420.65,2871.65],"6-108-62":[-4443.67,3023.22],"6-108-63":[-4394.23,3057.86],"6-109-0":[-270.44,656.94],"6-109-1":[-827.99,51.45],"5-54-0":[-909.85,656.94],"6-109-2":[-881.02,445.4],"6-109-3":[-438.51,348.03],"5-54-1":[-934.43,448.87],"6-109-4":[-755.24,1075.1],"6-109-5":[-1021.66,875.53],"5-54-2":[-1134.26,1075.1],"6-109-6":[-964.92,1068.55],"6-109-7":[-1389.91,2201.02],"5-54-3":[-1389.91,2201.02],"6-109-8":[-2933.34,2117.99],"6-109-9":[-4505.72,1848.18],"5-54-4":[-4505.72,2117.99],"6-109-10":[-4787.22,676.85],"6-109-11":[-4862.28,2240.33],"5-54-5":[-4901.46,2240.33],"6-109-12":[-4826.2,2048.94],"6-109-13":[-4454.84,905.39],"5-54-6":[-5078.78,2048.94],"6-109-14":[-5226.57,1057.62],"6-109-15":[-5811.86,1445.43],"5-54-7":[-5811.86,1445.43],"6-109-16":[-6600.71,1718.97],"6-109-17":[-5848.43,2763.77],"5-54-8":[-6600.71,2763.77],"6-109-18":[-6128.18,1727.04],"6-109-19":[-5755.9,1925.58],"5-54-9":[-6139.97,1925.58],"6-109-20":[-2873.02,1453.61],"6-109-21":[16.04,722.76],"5-54-10":[-2873.02,1941.55],"6-109-22":[13.17,993.49],"6-109-23":[24.41,997.46],"5-54-11":[8,997.46],"6-109-24":[29.92,532.19],"6-109-25":[35.9,997.76],"5-54-12":[12.35,997.76],"6-109-26":[-62.41,705.14],"6-109-27":[-155.45,192.69],"5-54-13":[-1028.33,1607.31],"6-109-28":[-3320.92,2276.38],"6-109-29":[-5565.73,1372.75],"5-54-14":[-5712.91,3011.04],"6-109-30":[-5326.65,2446.71],"6-109-31":[-5439.11,2066.98],"5-54-15":[-6130.93,2699.58],"6-109-32":[-5242.54,2152.95],"6-109-33":[-9088.35,2555.71],"5-54-16":[-9088.35,2752.59],"6-109-34":[-9658.18,1415.76],"6-109-35":[-10034.76,2395.35],"5-54-17":[-10034.76,2985.2],"6-109-36":[-7677.31,198.32],"6-109-37":[-6489.8,755.14],"5-54-18":[-9176.01,1499.32],"6-109-38":[-6783.71,1012.77],"6-109-39":[-6707.72,556.98],"5-54-19":[-6783.71,1012.77],"6-109-40":[-7531.73,1049.45],"6-109-41":[-7516.23,1051.49],"5-54-20":[-8904.47,1051.49],"6-109-42":[-1415.28,657.78],"6-109-43":[-917.74,1418.1],"5-54-21":[-1415.28,1897.55],"6-109-44":[-203.47,1825.58],"6-109-45":[-2529.02,1649.03],"5-54-22":[-2529.02,1825.58],"6-109-46":[-2502.26,2676.78],"6-109-47":[-55.65,1688.92],"5-54-23":[-2502.26,2676.78],"6-109-48":[-52.05,1423.43],"6-109-49":[-47.99,1021.62],"5-54-24":[-54.09,1423.43],"6-109-50":[-47.82,876.38],"6-109-51":[-52.39,1918.93],"5-54-25":[-52.39,1918.93],"6-109-52":[-58.59,2139.52],"6-109-53":[-69.44,671.86],"5-54-26":[-69.44,2139.52],"6-109-54":[-76.93,1835.17],"6-109-55":[-75.43,2142.74],"5-54-27":[-76.93,2142.74],"6-109-56":[54.7,2622.61],"6-109-57":[-13.76,3171.09],"5-54-28":[-13.76,3171.09],"6-109-58":[-51.27,3189.23],"6-109-59":[-2937.77,3116.04],"5-54-29":[-2992.28,3203.64],"6-109-60":[-4129.79,2882.89],"6-109-61":[-4476.03,2844.52],"5-54-30":[-4476.03,2917.97],"6-109-62":[-4360.94,3011.97],"6-109-63":[-4379.14,3059.53],"5-54-31":[-4443.67,3059.53],"6-110-0":[-250.66,758.26],"6-110-1":[-639.76,157.09],"6-110-2":[-685.8,661.06],"6-110-3":[-268.85,380.05],"6-110-4":[-297.72,699.79],"6-110-5":[-929.59,824.82],"6-110-6":[-1441.83,856.13],"6-110-7":[-1340.2,1828.99],"6-110-8":[-2191.42,1922.66],"6-110-9":[-4584.62,2002.65],"6-110-10":[-4755.66,531.48],"6-110-11":[-4922.75,2290.58],"6-110-12":[-4734.98,2374.21],"6-110-13":[-4033.09,1509.02],"6-110-14":[-5177.97,1216.44],"6-110-15":[-5122.6,1386.01],"6-110-16":[-5852.6,1509.87],"6-110-17":[-6019.33,1774.19],"6-110-18":[-5925.45,999.37],"6-110-19":[-5864.11,1373.1],"6-110-20":[-1399.53,1801.42],"6-110-21":[-19.03,1948.19],"6-110-22":[24,1394.61],"6-110-23":[28.82,1297.55],"6-110-24":[34.84,856.67],"6-110-25":[38.27,554.6],"6-110-26":[-37.78,444.1],"6-110-27":[-141.33,346.26],"6-110-28":[-2350.94,127.03],"6-110-29":[-7570.28,837.45],"6-110-30":[-7572.68,2981.67],"6-110-31":[-4811.97,1446.01],"6-110-32":[-5014.78,1519.04],"6-110-33":[-5712.41,3088.67],"6-110-34":[-6523.63,862.43],"6-110-35":[-6612.97,116.33],"6-110-36":[-6757,359.52],"6-110-37":[-7622.08,453.11],"6-110-38":[-7728.22,558.61],"6-110-39":[-6469.64,915.42],"6-110-40":[-6273.13,1429.68],"6-110-41":[-6885.04,1437.62],"6-110-42":[-5789.08,1847.18],"6-110-43":[-2607.79,1764.42],"6-110-44":[-2139.1,1318.08],"6-110-45":[-3282.63,927.36],"6-110-46":[-3638.83,1736.18],"6-110-47":[-2977.08,1480.88],"6-110-48":[-49.85,1362.03],"6-110-49":[-46.08,1189.43],"6-110-50":[-46.52,1475],"6-110-51":[-52.46,2242.57],"6-110-52":[-59.62,2260.57],"6-110-53":[-71.74,522.46],"6-110-54":[-80.19,1992.64],"6-110-55":[-74.89,1933.66],"6-110-56":[37.2,2601.74],"6-110-57":[-29.38,3136.57],"6-110-58":[-51.27,3137.89],"6-110-59":[-2933.37,3008.63],"6-110-60":[-4048.36,2819.29],"6-110-61":[-4427.04,2805.69],"6-110-62":[-4352,2999.73],"6-110-63":[-4305.39,3062.38],"6-111-0":[-323.33,754.83],"6-111-1":[-702.85,187.17],"5-55-0":[-702.85,758.26],"6-111-2":[-737.84,648.26],"6-111-3":[-469.89,449.75],"5-55-1":[-737.84,661.06],"4-27-0":[-934.43,758.26],"6-111-4":[-1182.43,490.13],"6-111-5":[-1362,1088.07],"5-55-2":[-1362,1088.07],"6-111-6":[-1166.96,1035.63],"6-111-7":[-1423.87,1221.31],"5-55-3":[-1441.83,1828.99],"4-27-1":[-1441.83,2201.02],"3-13-0":[-1960.43,2201.02],"6-111-8":[-2163.91,1652.58],"6-111-9":[-4546.4,2070.51],"5-55-4":[-4584.62,2070.51],"6-111-10":[-4788.65,825.86],"6-111-11":[-4913.95,1856.83],"5-55-5":[-4922.75,2290.58],"4-27-2":[-4922.75,2290.58],"6-111-12":[-4533.1,2358.55],"6-111-13":[-4006.46,2286.52],"5-55-6":[-4734.98,2374.21],"6-111-14":[-4355.03,2263.84],"6-111-15":[-4810.31,1447.73],"5-55-7":[-5177.97,2263.84],"4-27-3":[-5811.86,2374.21],"3-13-1":[-5811.86,2992.37],"2-6-0":[-5811.86,4155.27],"6-111-16":[-5292.31,1878.55],"6-111-17":[-5825.22,62.05],"5-55-8":[-6019.33,1878.55],"6-111-18":[-5782.95,66.77],"6-111-19":[-6031.55,1986.11],"5-55-9":[-6031.55,1986.11],"4-27-4":[-6600.71,2763.77],"6-111-20":[-178.07,1882.11],"6-111-21":[27.45,387.12],"5-55-10":[-1399.53,1948.19],"6-111-22":[33.04,937.65],"6-111-23":[33.91,1419.55],"5-55-11":[24,1419.55],"4-27-5":[-2873.02,1948.19],"3-13-2":[-6600.71,3956.01],"6-111-24":[37.06,1087.22],"6-111-25":[39.61,455.2],"5-55-12":[34.84,1087.22],"6-111-26":[44.33,446.87],"6-111-27":[0.43,554.22],"5-55-13":[-141.33,554.22],"4-27-6":[-1028.33,1607.31],"6-111-28":[-342.38,125.8],"6-111-29":[-3693.35,614.14],"5-55-14":[-7570.28,837.45],"6-111-30":[-3688.89,1913.09],"6-111-31":[-4778.06,2928.23],"5-55-15":[-7572.68,2981.67],"4-27-7":[-7572.68,3011.04],"3-13-3":[-7572.68,4108.68],"2-6-1":[-7572.68,7512.84],"6-111-32":[-5480.06,3028.24],"6-111-33":[-6076.26,2016.59],"5-55-16":[-6076.26,3088.67],"6-111-34":[-8930.19,670.15],"6-111-35":[-6319.86,174.3],"5-55-17":[-8930.19,862.43],"4-27-8":[-10034.76,3088.67],"6-111-36":[-6662.31,610.22],"6-111-37":[-6727.95,457.36],"5-55-18":[-7622.08,610.22],"6-111-38":[-6703.37,466.21],"6-111-39":[-7157.32,1152.22],"5-55-19":[-7728.22,1152.22],"4-27-9":[-9176.01,1499.32],"3-13-4":[-10034.76,4026.67],"6-111-40":[-5842.52,1528.53],"6-111-41":[-5775.21,1002.66],"5-55-20":[-6885.04,1528.53],"6-111-42":[-5651.27,400.15],"6-111-43":[-4946.41,1791.1],"5-55-21":[-5789.08,1847.18],"4-27-10":[-8904.47,1897.55],"6-111-44":[-1567.69,1916.11],"6-111-45":[-3584.66,-20.77],"5-55-22":[-3584.66,1916.11],"6-111-46":[-3855.55,-20.97],"6-111-47":[-3726.44,1812.54],"5-55-23":[-3855.55,1812.54],"4-27-11":[-3855.55,2676.78],"3-13-5":[-8904.47,3813],"2-6-2":[-10034.76,7274.95],"6-111-48":[-45.23,1405.74],"6-111-49":[-42.63,2153.84],"5-55-24":[-49.85,2153.84],"6-111-50":[-45.55,2160.52],"6-111-51":[-51.95,2239.63],"5-55-25":[-52.46,2242.57],"4-27-12":[-54.09,2242.57],"6-111-52":[-60.12,1808.82],"6-111-53":[-74.09,806.78],"5-55-26":[-74.09,2260.57],"6-111-54":[-82.21,2067.49],"6-111-55":[-78.66,1711.28],"5-55-27":[-82.21,2067.49],"4-27-13":[-82.21,2260.57],"3-13-6":[-82.21,2813.61],"6-111-56":[18.81,2605.54],"6-111-57":[-26.45,2976.73],"5-55-28":[-29.38,3136.57],"6-111-58":[-46.21,2992.85],"6-111-59":[-3028.17,2893.93],"5-55-29":[-3028.17,3137.89],"4-27-14":[-3028.17,3203.64],"6-111-60":[-4045.52,2687.3],"6-111-61":[-4452.97,2763.19],"5-55-30":[-4452.97,2819.29],"6-111-62":[-4321.84,2987.5],"6-111-63":[-4305.39,3065.26],"5-55-31":[-4352,3065.26],"4-27-15":[-4476.03,3065.26],"3-13-7":[-5343.81,3320.02],"2-6-3":[-5343.81,4132.25],"6-112-0":[-315.35,703.8],"6-112-1":[-500.97,188.17],"6-112-2":[-672.54,426.09],"6-112-3":[-637.86,265.05],"6-112-4":[-1182.43,535.81],"6-112-5":[-1178.5,965.91],"6-112-6":[-1309.88,1017.56],"6-112-7":[-2150.48,1767.28],"6-112-8":[-3092.96,1681.65],"6-112-9":[-4395.44,1766.67],"6-112-10":[-4664.57,1755.07],"6-112-11":[-4741.98,1915.02],"6-112-12":[-4452.89,2099.48],"6-112-13":[-3978.01,2155.76],"6-112-14":[-4196.3,1965.97],"6-112-15":[-4806.19,2024.26],"6-112-16":[-5271.91,1410.98],"6-112-17":[-5632.69,66.52],"6-112-18":[-5870.55,3037.73],"6-112-19":[-5099.73,3225.44],"6-112-20":[-42.36,1148.96],"6-112-21":[-8.1,410.71],"6-112-22":[-5.97,293.67],"6-112-23":[36.79,1063.75],"6-112-24":[39.76,637.58],"6-112-25":[41.96,467.74],"6-112-26":[-2.18,358.76],"6-112-27":[-1.62,407.82],"6-112-28":[-55.19,128.34],"6-112-29":[-53.86,134.69],"6-112-30":[-1512.17,4766.85],"6-112-31":[-5137.94,1479.51],"6-112-32":[-5372.95,1532.53],"6-112-33":[-5738.8,4900.75],"6-112-34":[-8241.06,152.9],"6-112-35":[-7154.87,138.86],"6-112-36":[-6266.86,417.68],"6-112-37":[-6347.65,370.77],"6-112-38":[-6180.93,478.74],"6-112-39":[-6935.69,643.8],"6-112-40":[-6887.3,1103.75],"6-112-41":[-6044.18,301.67],"6-112-42":[-5342,426.73],"6-112-43":[-4826.53,1062.96],"6-112-44":[-2697.25,3130.43],"6-112-45":[-3480.96,2969.74],"6-112-46":[-3690.31,-16.66],"6-112-47":[-3710.67,1366.96],"6-112-48":[-2085.48,1915.25],"6-112-49":[-40.23,1848.97],"6-112-50":[-44.52,2039.75],"6-112-51":[-174.25,1981.47],"6-112-52":[-60.31,1859.99],"6-112-53":[-75.15,1697.18],"6-112-54":[-83.59,1769.68],"6-112-55":[-84.73,1703.65],"6-112-56":[14.74,2525.84],"6-112-57":[-27.87,2840.96],"6-112-58":[-40.15,2867.37],"6-112-59":[-2183.56,2794.55],"6-112-60":[-3705.32,2564.78],"6-112-61":[-4506.77,2709.29],"6-112-62":[-4289.6,2977.76],"6-112-63":[-4281.74,3068.14],"6-113-0":[-237.9,609.54],"6-113-1":[-654.94,258.06],"5-56-0":[-654.94,703.8],"6-113-2":[-681.4,461.37],"6-113-3":[-773.18,6.86],"5-56-1":[-773.18,461.37],"6-113-4":[-684.38,493.31],"6-113-5":[-626.54,608.12],"5-56-2":[-1182.43,965.91],"6-113-6":[-1337.5,609.54],"6-113-7":[-1015.02,2177.91],"5-56-3":[-2150.48,2177.91],"6-113-8":[-3386.76,2476.55],"6-113-9":[-4330.29,2650.27],"5-56-4":[-4395.44,2650.27],"6-113-10":[-4642.34,2153.15],"6-113-11":[-4825.16,1760.98],"5-56-5":[-4825.16,2153.15],"6-113-12":[-4357.22,1103.01],"6-113-13":[-4344.99,1633.71],"5-56-6":[-4452.89,2155.76],"6-113-14":[-5073.4,2108.2],"6-113-15":[-5648.56,1700.99],"5-56-7":[-5648.56,2108.2],"6-113-16":[-5457.85,1549.63],"6-113-17":[-5625.96,1641.19],"5-56-8":[-5632.69,1641.19],"6-113-18":[-5664.55,2604.93],"6-113-19":[-78.76,3800.26],"5-56-9":[-5870.55,3800.26],"6-113-20":[-8.36,1074.29],"6-113-21":[-5.83,1038.21],"5-56-10":[-42.36,1148.96],"6-113-22":[6.51,236.01],"6-113-23":[42.43,387.89],"5-56-11":[-5.97,1063.75],"6-113-24":[44.58,634.08],"6-113-25":[-5.67,464.96],"5-56-12":[-5.67,637.58],"6-113-26":[-99.13,216.97],"6-113-27":[-11.67,115.83],"5-56-13":[-99.13,407.82],"6-113-28":[0.49,237.05],"6-113-29":[3.59,230.31],"5-56-14":[-55.19,237.05],"6-113-30":[6.27,4681.3],"6-113-31":[-4723.47,2263.2],"5-56-15":[-5137.94,4766.85],"6-113-32":[-4812.96,2301.21],"6-113-33":[-5291.95,5227.39],"5-56-16":[-5738.8,5227.39],"6-113-34":[-8740.43,203.53],"6-113-35":[-8879.14,194.76],"5-56-17":[-8879.14,203.53],"6-113-36":[-7669.24,131.12],"6-113-37":[-6711.73,223.46],"5-56-18":[-7669.24,417.68],"6-113-38":[-7963.6,475.97],"6-113-39":[-6789.64,657.09],"5-56-19":[-7963.6,657.09],"6-113-40":[-5735.69,421.94],"6-113-41":[-5809.94,242.02],"5-56-20":[-6887.3,1103.75],"6-113-42":[-4854.7,1079.1],"6-113-43":[-4237.08,1164.85],"5-56-21":[-5342,1164.85],"6-113-44":[-6405.63,3720.25],"6-113-45":[-2520.67,2507.92],"5-56-22":[-6405.63,3720.25],"6-113-46":[-4096.61,1520.18],"6-113-47":[-3742.35,1494.65],"5-56-23":[-4096.61,1520.18],"6-113-48":[-2201.39,1675.03],"6-113-49":[-792.69,2012.19],"5-56-24":[-2201.39,2012.19],"6-113-50":[-191.23,1604.7],"6-113-51":[-162.88,1067.01],"5-56-25":[-191.23,2039.75],"6-113-52":[-197.34,1704.07],"6-113-53":[-76.66,2148.55],"5-56-26":[-197.34,2148.55],"6-113-54":[-85.09,2671.32],"6-113-55":[-88.87,2502.55],"5-56-27":[-88.87,2671.32],"6-113-56":[48.36,2522.11],"6-113-57":[-29.31,2629.41],"5-56-28":[-29.31,2840.96],"6-113-58":[-26.26,2726.71],"6-113-59":[-670.83,2693.87],"5-56-29":[-2183.56,2867.37],"6-113-60":[-3387.1,2498.35],"6-113-61":[-4352.21,2666.36],"5-56-30":[-4506.77,2709.29],"6-113-62":[-4113.81,2970.03],"6-113-63":[-4290.72,3070.04],"5-56-31":[-4290.72,3070.04],"6-114-0":[-217.29,631.52],"6-114-1":[-652.96,593.83],"6-114-2":[-652.96,502.69],"6-114-3":[-711.39,7.07],"6-114-4":[-962.46,35.46],"6-114-5":[-969.37,264.4],"6-114-6":[-2060.35,486.19],"6-114-7":[-1457.34,1696.85],"6-114-8":[-3458.33,2512.73],"6-114-9":[-4383.62,2822.43],"6-114-10":[-4900.81,2513.43],"6-114-11":[-4971.59,1227.42],"6-114-12":[-4627.64,627.07],"6-114-13":[-4444.85,1624.43],"6-114-14":[-5259.1,2346.04],"6-114-15":[-6433.58,1737.87],"6-114-16":[-5970.29,2312.97],"6-114-17":[-5424.99,2061.69],"6-114-18":[-4050.6,1666.14],"6-114-19":[-16.18,315.6],"6-114-20":[11.53,433.31],"6-114-21":[17.61,444.66],"6-114-22":[9.96,768.11],"6-114-23":[28.86,604.84],"6-114-24":[41.43,641.31],"6-114-25":[6.21,732.92],"6-114-26":[-2.3,520.43],"6-114-27":[-5.85,880.74],"6-114-28":[7.56,438.76],"6-114-29":[20.35,3629.05],"6-114-30":[-3441.73,3943.74],"6-114-31":[-4244.85,1426.8],"6-114-32":[-4340.52,1467.8],"6-114-33":[-4413.15,4032.23],"6-114-34":[-5477.02,3694.06],"6-114-35":[-10049.63,439.48],"6-114-36":[-10883.73,882.4],"6-114-37":[-5760.92,520.58],"6-114-38":[-8182.96,739.41],"6-114-39":[-5356.9,660.81],"6-114-40":[-8476.64,710.83],"6-114-41":[-9287.43,750.15],"6-114-42":[-9851.17,458.66],"6-114-43":[-9796.6,485.33],"6-114-44":[-9315.04,336.86],"6-114-45":[-7698.82,1596.14],"6-114-46":[-2831.4,1994.69],"6-114-47":[-793.5,2215.96],"6-114-48":[-1277.31,1574.86],"6-114-49":[-960.62,1356.08],"6-114-50":[-94.37,1531.42],"6-114-51":[-709.67,522.06],"6-114-52":[-430.47,1139.42],"6-114-53":[-75.38,2490.43],"6-114-54":[-88.58,2850.78],"6-114-55":[-89.56,2551.72],"6-114-56":[16.7,2298.07],"6-114-57":[-19.08,2577.32],"6-114-58":[-24.95,2638.08],"6-114-59":[-83.74,2612.99],"6-114-60":[-2174.13,2407.18],"6-114-61":[-3518.73,2636.29],"6-114-62":[-3712.95,2964.79],"6-114-63":[-4283.73,3070.97],"6-115-0":[-187.04,530.93],"6-115-1":[-99.37,430.8],"5-57-0":[-652.96,631.52],"6-115-2":[-563.41,825.96],"6-115-3":[-731.31,170.94],"5-57-1":[-731.31,825.96],"4-28-0":[-773.18,825.96],"6-115-4":[-1100.27,5.87],"6-115-5":[-1251.66,73.43],"5-57-2":[-1251.66,264.4],"6-115-6":[-1636.04,115.08],"6-115-7":[-2093.35,672.76],"5-57-3":[-2093.35,1696.85],"4-28-1":[-2150.48,2177.91],"6-115-8":[-3667.84,2830.65],"6-115-9":[-4258.51,2291.47],"5-57-4":[-4383.62,2830.65],"6-115-10":[-4724.92,2265.18],"6-115-11":[-4195.94,34.94],"5-57-5":[-4971.59,2513.43],"4-28-2":[-4971.59,2830.65],"6-115-12":[-3868.98,35.92],"6-115-13":[-5231.94,820.94],"5-57-6":[-5231.94,1624.43],"6-115-14":[-6647.87,1183.3],"6-115-15":[-5281.18,553.47],"5-57-7":[-6647.87,2346.04],"4-28-3":[-6647.87,2346.04],"6-115-16":[-5068.24,1740.56],"6-115-17":[-4365.04,1514.48],"5-57-8":[-5970.29,2312.97],"6-115-18":[-126.48,1481.35],"6-115-19":[16.45,488.33],"5-57-9":[-4050.6,1666.14],"4-28-4":[-5970.29,3800.26],"6-115-20":[24.53,517.03],"6-115-21":[25.92,466.97],"5-57-10":[11.53,517.03],"6-115-22":[27.14,504.64],"6-115-23":[25.23,721.3],"5-57-11":[9.96,768.11],"4-28-5":[-42.36,1148.96],"6-115-24":[19.75,1064.3],"6-115-25":[-5.67,1668.89],"5-57-12":[-5.67,1668.89],"6-115-26":[-2825.97,1447.2],"6-115-27":[-3615.64,572.29],"5-57-13":[-3615.64,1447.2],"4-28-6":[-3615.64,1668.89],"6-115-28":[-2126.29,211.74],"6-115-29":[-404.43,4475.65],"5-57-14":[-2126.29,4475.65],"6-115-30":[-2695.19,3432.98],"6-115-31":[-5029,210.19],"5-57-15":[-5029,3943.74],"4-28-7":[-5137.94,4766.85],"6-115-32":[-4771.84,296.18],"6-115-33":[-5123.4,3477.99],"5-57-16":[-5123.4,4032.23],"6-115-34":[-4997.92,4553.66],"6-115-35":[-7320.04,488.1],"5-57-17":[-10049.63,4553.66],"4-28-8":[-10049.63,5227.39],"6-115-36":[-10739.69,573.48],"6-115-37":[-5915.41,1449.42],"5-57-18":[-10883.73,1449.42],"6-115-38":[-5524.22,1670.14],"6-115-39":[-8932.24,1064.78],"5-57-19":[-8932.24,1670.14],"4-28-9":[-10883.73,1670.14],"6-115-40":[-8812,727.4],"6-115-41":[-8392.96,517.69],"5-57-20":[-9287.43,750.15],"6-115-42":[-7872.39,518.96],"6-115-43":[-6764.45,560.11],"5-57-21":[-9851.17,560.11],"4-28-10":[-9851.17,1164.85],"6-115-44":[-7018.42,521.33],"6-115-45":[-7799.77,1522.55],"5-57-22":[-9315.04,1596.14],"6-115-46":[-7614.84,1610.49],"6-115-47":[-6336.52,1704.56],"5-57-23":[-7614.84,2215.96],"4-28-11":[-9315.04,3720.25],"6-115-48":[-3744.4,504.45],"6-115-49":[-2649.47,1115.29],"5-57-24":[-3744.4,1574.86],"6-115-50":[-1798.94,796.94],"6-115-51":[-1884.46,1.57],"5-57-25":[-1884.46,1531.42],"4-28-12":[-3744.4,2039.75],"6-115-52":[-486.07,-22.55],"6-115-53":[-197.82,2231.18],"5-57-26":[-486.07,2490.43],"6-115-54":[-88.66,2288.35],"6-115-55":[-97.84,2886.75],"5-57-27":[-97.84,2886.75],"4-28-13":[-486.07,2886.75],"6-115-56":[-97.84,2001.44],"6-115-57":[-13.4,2428.6],"5-57-28":[-97.84,2577.32],"6-115-58":[-28.88,2560],"6-115-59":[-79.49,2552.69],"5-57-29":[-83.74,2638.08],"4-28-14":[-2183.56,2867.37],"6-115-60":[-2354.66,2355.28],"6-115-61":[-3053.46,2602.75],"5-57-30":[-3518.73,2636.29],"6-115-62":[-3317.66,2959.59],"6-115-63":[-4448.78,3076],"5-57-31":[-4448.78,3076],"4-28-15":[-4506.77,3076],"6-116-0":[-157.27,588],"6-116-1":[-30.91,619.39],"6-116-2":[-86.06,857.81],"6-116-3":[-594.94,584.08],"6-116-4":[-868.16,361.97],"6-116-5":[-1058.27,89.29],"6-116-6":[-1566.39,341.42],"6-116-7":[-2001.59,925.79],"6-116-8":[-3618.3,2260.37],"6-116-9":[-4360.2,2390.56],"6-116-10":[-4749.94,1856.79],"6-116-11":[-4365.05,37.51],"6-116-12":[-4921.25,37.9],"6-116-13":[-5623.28,37.4],"6-116-14":[-6034.38,40.87],"6-116-15":[-5248.79,1590.34],"6-116-16":[-4152.47,1786.57],"6-116-17":[-3533.65,1543.35],"6-116-18":[-3081.9,1965.18],"6-116-19":[15.73,2197.03],"6-116-20":[16.81,1387.12],"6-116-21":[19.43,339.66],"6-116-22":[23.95,968.42],"6-116-23":[29.01,1287.75],"6-116-24":[-77.95,1323.71],"6-116-25":[-1556,1284.39],"6-116-26":[-4497.18,99.51],"6-116-27":[-5262.69,99.08],"6-116-28":[-3029.54,3997.49],"6-116-29":[-6385.09,4112.66],"6-116-30":[-2568.6,1782.61],"6-116-31":[-6288.19,740.66],"6-116-32":[-7111.28,783.66],"6-116-33":[-5493.91,1907.63],"6-116-34":[-4683.48,4188.78],"6-116-35":[-7034.25,4099.51],"6-116-36":[-9875.02,139.92],"6-116-37":[-9525.81,129.47],"6-116-38":[-8773.83,1285.71],"6-116-39":[-7921.08,1325.23],"6-116-40":[-6582.23,1296.76],"6-116-41":[-6316.23,988.43],"6-116-42":[-8465.08,430.67],"6-116-43":[-6438.18,1421.13],"6-116-44":[-7095.88,2241.03],"6-116-45":[-7675.74,1999.21],"6-116-46":[-7337.56,1568.36],"6-116-47":[-9334.83,1737.57],"6-116-48":[-3739.03,1541.1],"6-116-49":[-3476.14,-13.09],"6-116-50":[-1798.94,-17.24],"6-116-51":[-1811.87,-19.53],"6-116-52":[-301.26,-22.38],"6-116-53":[-167.42,1885.71],"6-116-54":[-87.53,2398.56],"6-116-55":[-101.33,2286.69],"6-116-56":[-102.54,1792.11],"6-116-57":[-13.65,2338.91],"6-116-58":[-31.04,2481.09],"6-116-59":[-75.07,2481.96],"6-116-60":[-2584.8,2344.16],"6-116-61":[-2779.5,2569.82],"6-116-62":[-2768.05,2955.42],"6-116-63":[-4427.28,3081.95],"6-117-0":[-117.15,889.5],"6-117-1":[-8.17,1165.42],"5-58-0":[-157.27,1165.42],"6-117-2":[-333.27,1098.87],"6-117-3":[-364.55,1029.82],"5-58-1":[-594.94,1098.87],"6-117-4":[-777.9,446.39],"6-117-5":[-981.65,58.1],"5-58-2":[-1058.27,446.39],"6-117-6":[-1431.07,341.42],"6-117-7":[-1846.36,692.04],"5-58-3":[-2001.59,925.79],"6-117-8":[-3562.75,2175.65],"6-117-9":[-4180.76,2203.44],"5-58-4":[-4360.2,2390.56],"6-117-10":[-4281.24,2094.72],"6-117-11":[-4335.23,1541.51],"5-58-5":[-4749.94,2094.72],"6-117-12":[-4618.79,39.7],"6-117-13":[-4806.12,40.77],"5-58-6":[-5623.28,40.77],"6-117-14":[-5012.17,43.2],"6-117-15":[-6446.55,1533.21],"5-58-7":[-6446.55,1590.34],"6-117-16":[-4699.4,45.41],"6-117-17":[-4932.33,36.86],"5-58-8":[-4932.33,1786.57],"6-117-18":[-4982.4,1251.5],"6-117-19":[-4968.05,1583.75],"5-58-9":[-4982.4,2197.03],"6-117-20":[-528.87,1608.21],"6-117-21":[14.56,1512.08],"5-58-10":[-528.87,1608.21],"6-117-22":[19.38,1197.94],"6-117-23":[-32.07,1008.31],"5-58-11":[-32.07,1287.75],"6-117-24":[-324.64,868.08],"6-117-25":[-1824.42,88.5],"5-58-12":[-1824.42,1323.71],"6-117-26":[-4890.42,89.46],"6-117-27":[-4788.85,120.54],"5-58-13":[-5262.69,120.54],"6-117-28":[-3189.37,3000.93],"6-117-29":[-8146.74,1965.94],"5-58-14":[-8146.74,4112.66],"6-117-30":[-2812.73,2341.64],"6-117-31":[-7174.86,935.38],"5-58-15":[-7174.86,2341.64],"6-117-32":[-7126.95,964.38],"6-117-33":[-5915.39,2427.64],"5-58-16":[-7126.95,2427.64],"6-117-34":[-5061.26,2022.98],"6-117-35":[-6177.77,3071.93],"5-58-17":[-7034.25,4188.78],"6-117-36":[-6298.8,143.56],"6-117-37":[-6635.98,128.82],"5-58-18":[-9875.02,143.56],"6-117-38":[-6274.6,126.23],"6-117-39":[-6113.61,869.8],"5-58-19":[-8773.83,1325.23],"6-117-40":[-5929.23,1008.41],"6-117-41":[-6305.98,1199.98],"5-58-20":[-6582.23,1296.76],"6-117-42":[-6805.26,1550.43],"6-117-43":[-7008.26,1629.02],"5-58-21":[-8465.08,1629.02],"6-117-44":[-8681.6,1622.97],"6-117-45":[-8183.55,1262.52],"5-58-22":[-8681.6,2241.03],"6-117-46":[-6895.09,1.67],"6-117-47":[-9654.63,-5.89],"5-58-23":[-9654.63,1737.57],"6-117-48":[-7416.93,1460.21],"6-117-49":[-3583.39,-13.2],"5-58-24":[-7416.93,1541.1],"6-117-50":[-1433.49,-17.24],"6-117-51":[-1442.55,-20.04],"5-58-25":[-1811.87,-17.24],"6-117-52":[-456.12,1447.51],"6-117-53":[-164.68,2081.72],"5-58-26":[-456.12,2081.72],"6-117-54":[-86.62,2232.56],"6-117-55":[-101.99,2194.66],"5-58-27":[-101.99,2398.56],"6-117-56":[-106.25,1600.9],"6-117-57":[-18.37,2342.57],"5-58-28":[-106.25,2342.57],"6-117-58":[-30.84,2456.95],"6-117-59":[-74.54,2466.51],"5-58-29":[-75.07,2481.96],"6-117-60":[-2625.71,2291.18],"6-117-61":[-2781.74,2529.67],"5-58-30":[-2781.74,2569.82],"6-117-62":[-2248.52,2953.28],"6-117-63":[-4401.78,3084.91],"5-58-31":[-4427.28,3084.91],"6-118-0":[-129.02,911.99],"6-118-1":[6.64,1219.86],"6-118-2":[-297.72,2134.22],"6-118-3":[-2190.37,2133.38],"6-118-4":[-543.46,1022.63],"6-118-5":[-987.51,871.83],"6-118-6":[-1170.75,75.94],"6-118-7":[-2295.81,559.13],"6-118-8":[-3542.04,1102.21],"6-118-9":[-3936.44,1636.07],"6-118-10":[-4037.5,1813.48],"6-118-11":[-4143.24,1062.27],"6-118-12":[-4447.72,43.51],"6-118-13":[-4632.72,45.98],"6-118-14":[-5518.07,1460.13],"6-118-15":[-5586.61,1395.62],"6-118-16":[-6399.77,30.44],"6-118-17":[-5185.87,30.2],"6-118-18":[-5078.26,24.25],"6-118-19":[-5133.45,23.71],"6-118-20":[-5212.89,1371.43],"6-118-21":[-7297.49,1596.89],"6-118-22":[-4793.53,1262.63],"6-118-23":[-4385.58,466.32],"6-118-24":[-3305.66,72.19],"6-118-25":[-3117.27,81.26],"6-118-26":[-4793.75,84.41],"6-118-27":[-4811.89,769.24],"6-118-28":[-5121.46,987.57],"6-118-29":[-8895.66,337.7],"6-118-30":[-6033.07,2324.77],"6-118-31":[-6318.75,396.72],"6-118-32":[-4831.85,435.72],"6-118-33":[-4739.98,2388.16],"6-118-34":[-5400.43,419.14],"6-118-35":[-6063.11,1094.58],"6-118-36":[-8213.52,866.24],"6-118-37":[-6352.85,127.95],"6-118-38":[-5939.1,126.07],"6-118-39":[-6146.39,114.91],"6-118-40":[-5790.02,468.23],"6-118-41":[-6284.8,1263.13],"6-118-42":[-6559.51,1616.85],"6-118-43":[-6354.62,1396.93],"6-118-44":[-6695.74,40.32],"6-118-45":[-8749.81,22.42],"6-118-46":[-9912.03,6.94],"6-118-47":[-9502.69,-3.98],"6-118-48":[-9591.92,1305.84],"6-118-49":[-3423.16,1389.12],"6-118-50":[-1280.44,-10.19],"6-118-51":[-927.75,-20.43],"6-118-52":[-1013.08,982.96],"6-118-53":[-160.55,1825.48],"6-118-54":[-85.12,1590.07],"6-118-55":[-101.8,1107.21],"6-118-56":[-107,1522.76],"6-118-57":[-31.01,2294.89],"6-118-58":[-31.98,2319.46],"6-118-59":[-91.3,2399.61],"6-118-60":[-2793.15,2218.73],"6-118-61":[-2881.88,2447.37],"6-118-62":[-3368.66,2959.26],"6-118-63":[-4393.23,3089.37],"6-119-0":[-54.55,760],"6-119-1":[6.4,1341.53],"5-59-0":[-129.02,1341.53],"6-119-2":[-449.12,2688.82],"6-119-3":[-3165.15,3402.83],"5-59-1":[-3165.15,3402.83],"4-29-0":[-3165.15,3402.83],"6-119-4":[-610.56,1715.86],"6-119-5":[-1075.15,1249.44],"5-59-2":[-1075.15,1715.86],"6-119-6":[-1268.32,341.83],"6-119-7":[-1805.28,795.87],"5-59-3":[-2295.81,795.87],"4-29-1":[-2295.81,1715.86],"3-14-0":[-3165.15,3402.83],"6-119-8":[-3519.24,1098.37],"6-119-9":[-3570.74,1766.68],"5-59-4":[-3936.44,1766.68],"6-119-10":[-3550.32,1878.57],"6-119-11":[-6470.11,935.54],"5-59-5":[-6470.11,1878.57],"4-29-2":[-6470.11,2390.56],"6-119-12":[-4628.34,2005.12],"6-119-13":[-4845.41,2477.12],"5-59-6":[-4845.41,2477.12],"6-119-14":[-5636.3,1817.92],"6-119-15":[-5622.88,33.35],"5-59-7":[-5636.3,1817.92],"4-29-3":[-6446.55,2477.12],"3-14-1":[-6647.87,2830.65],"6-119-16":[-5611.37,23.39],"6-119-17":[-5516.39,17.38],"5-59-8":[-6399.77,30.44],"6-119-18":[-5476.01,11.21],"6-119-19":[-5309.53,11.2],"5-59-9":[-5476.01,24.25],"4-29-4":[-6399.77,2197.03],"6-119-20":[-5347.62,19.59],"6-119-21":[-5080.75,25.03],"5-59-10":[-7297.49,1596.89],"6-119-22":[-5020.66,34.94],"6-119-23":[-4903.3,56.89],"5-59-11":[-5020.66,1262.63],"4-29-5":[-7297.49,1608.21],"3-14-2":[-7297.49,3800.26],"6-119-24":[-3435.85,58.63],"6-119-25":[-3571.58,64.62],"5-59-12":[-3571.58,81.26],"6-119-26":[-4795.19,76.13],"6-119-27":[-4536.58,78.92],"5-59-13":[-4811.89,769.24],"4-29-6":[-5262.69,1323.71],"6-119-28":[-5330.86,1020.41],"6-119-29":[-7295.87,2736.56],"5-59-14":[-8895.66,2736.56],"6-119-30":[-3608.32,909.88],"6-119-31":[-3154.36,118.67],"5-59-15":[-6318.75,2324.77],"4-29-7":[-8895.66,4112.66],"3-14-3":[-8895.66,4766.85],"6-119-32":[-3114.22,260.46],"6-119-33":[-4255.39,960.88],"5-59-16":[-4831.85,2388.16],"6-119-34":[-5297.69,2782.57],"6-119-35":[-6052.62,1115.42],"5-59-17":[-6063.11,2782.57],"4-29-8":[-7126.95,4188.78],"6-119-36":[-6402.6,138.91],"6-119-37":[-6824.02,131.76],"5-59-18":[-8213.52,866.24],"6-119-38":[-6498.7,123.47],"6-119-39":[-5918.74,110.92],"5-59-19":[-6498.7,126.07],"4-29-9":[-9875.02,1325.23],"3-14-4":[-10883.73,5227.39],"6-119-40":[-6128.03,99.59],"6-119-41":[-6519.49,84.71],"5-59-20":[-6519.49,1263.13],"6-119-42":[-9176.7,74.04],"6-119-43":[-10680.3,59.16],"5-59-21":[-10680.3,1616.85],"4-29-10":[-10680.3,1629.02],"6-119-44":[-6763.45,40.96],"6-119-45":[-6519.66,25.39],"5-59-22":[-8749.81,40.96],"6-119-46":[-9445.89,10.69],"6-119-47":[-6123.65,-2.2],"5-59-23":[-9912.03,10.69],"4-29-11":[-9912.03,2241.03],"3-14-5":[-10680.3,3720.25],"6-119-48":[-10853.54,-8.1],"6-119-49":[-8574.57,1748.92],"5-59-24":[-10853.54,1748.92],"6-119-50":[-1223.57,2383.12],"6-119-51":[-217.21,1893.12],"5-59-25":[-1280.44,2383.12],"4-29-12":[-10853.54,2383.12],"6-119-52":[-433.74,838.54],"6-119-53":[-451.42,1902.57],"5-59-26":[-1013.08,1902.57],"6-119-54":[-84.63,1806.68],"6-119-55":[-101.06,1131.36],"5-59-27":[-101.8,1806.68],"4-29-13":[-1013.08,2398.56],"3-14-6":[-10853.54,2886.75],"6-119-56":[-106.67,1594.21],"6-119-57":[-31.01,2260.16],"5-59-28":[-107,2294.89],"6-119-58":[-40.57,2260.16],"6-119-59":[-122.46,2352.82],"5-59-29":[-122.46,2399.61],"4-29-14":[-122.46,2481.96],"6-119-60":[-2866.22,3169.82],"6-119-61":[-2914.69,2470.74],"5-59-30":[-2914.69,3169.82],"6-119-62":[-3553,2967.24],"6-119-63":[-4413.73,3091.37],"5-59-31":[-4413.73,3091.37],"4-29-15":[-4427.28,3169.82],"3-14-7":[-4506.77,3169.82],"6-120-0":[-55.55,724.25],"6-120-1":[5.52,1874.12],"6-120-2":[-955.47,2936.62],"6-120-3":[-2180.06,3414.83],"6-120-4":[-69.75,2856.44],"6-120-5":[-897.88,2143.79],"6-120-6":[-1157.78,2764.3],"6-120-7":[-2619.95,1481.77],"6-120-8":[-3296.34,1454.04],"6-120-9":[-3345.62,1757.61],"6-120-10":[-6609.18,947.68],"6-120-11":[-6590.7,2605.13],"6-120-12":[-5687.86,3631.59],"6-120-13":[-5276.6,3468.03],"6-120-14":[-5872.65,40.12],"6-120-15":[-5614.35,24.95],"6-120-16":[-5664,17.95],"6-120-17":[-5402.66,7.43],"6-120-18":[-5497,3],"6-120-19":[-5339.46,7.47],"6-120-20":[-4782.38,525.64],"6-120-21":[-4754.25,112.06],"6-120-22":[-4204.44,41.18],"6-120-23":[-3361.51,128.34],"6-120-24":[-2901.96,320.52],"6-120-25":[-4792.78,312.66],"6-120-26":[-5489.9,62.27],"6-120-27":[-4823.71,320.6],"6-120-28":[-5326.13,2329.59],"6-120-29":[-4282.44,1183.15],"6-120-30":[-2845.84,307.69],"6-120-31":[-3113.14,110.31],"6-120-32":[-3457.59,118.16],"6-120-33":[-4809.47,128.82],"6-120-34":[-5306.33,1251.14],"6-120-35":[-5928.98,2387.59],"6-120-36":[-6390.47,264.39],"6-120-37":[-6457.12,130.22],"6-120-38":[-6076.57,121.69],"6-120-39":[-5927.65,115.94],"6-120-40":[-5955.92,105.9],"6-120-41":[-6311.98,90.52],"6-120-42":[-6153.64,74.62],"6-120-43":[-5805.65,495.66],"6-120-44":[-5548.65,48.16],"6-120-45":[-6239.76,25.68],"6-120-46":[-7151.59,12.37],"6-120-47":[-6409.75,-0.49],"6-120-48":[-8360.13,-6.4],"6-120-49":[-7969.09,-10.64],"6-120-50":[-7897.4,3297.03],"6-120-51":[-1959.34,3585.59],"6-120-52":[-113.8,2516.12],"6-120-53":[-197.28,960.68],"6-120-54":[-84.73,1792.6],"6-120-55":[-104.1,1485.04],"6-120-56":[-112.02,1627.11],"6-120-57":[-24.77,2656.26],"6-120-58":[-47.85,2268.9],"6-120-59":[-172.93,2732.99],"6-120-60":[-3015.38,3191.81],"6-120-61":[-3572.17,2726.57],"6-120-62":[-4035.09,2977.2],"6-120-63":[-4362.3,3090.38],"6-121-0":[-56.54,784.16],"6-121-1":[-119.82,2728.02],"5-60-0":[-119.82,2728.02],"6-121-2":[-1558.73,4094.57],"6-121-3":[-1548.62,2241.19],"5-60-1":[-2180.06,4094.57],"6-121-4":[-1757.29,3832.91],"6-121-5":[-2241.05,3569.68],"5-60-2":[-2241.05,3832.91],"6-121-6":[-1300.6,2695.9],"6-121-7":[-2708.34,1052.69],"5-60-3":[-2708.34,2764.3],"6-121-8":[-3358.21,1653.57],"6-121-9":[-4131.5,1415.31],"5-60-4":[-4131.5,1757.61],"6-121-10":[-4858.1,1872.79],"6-121-11":[-5472.05,3277.23],"5-60-5":[-6609.18,3277.23],"6-121-12":[-5350.87,4774.23],"6-121-13":[-5927.84,28.14],"5-60-6":[-5927.84,4774.23],"6-121-14":[-7062.03,18.42],"6-121-15":[-5638.62,16.76],"5-60-7":[-7062.03,40.12],"6-121-16":[-5398.32,7.27],"6-121-17":[-5249.74,-0.26],"5-60-8":[-5664,17.95],"6-121-18":[-5445.67,-2.7],"6-121-19":[-4935,-0.57],"5-60-9":[-5497,7.47],"6-121-20":[-2281.98,2.2],"6-121-21":[-2412.8,8.56],"5-60-10":[-4782.38,525.64],"6-121-22":[-2319.41,15.96],"6-121-23":[-2554.81,30.18],"5-60-11":[-4204.44,128.34],"6-121-24":[-3725.28,107.41],"6-121-25":[-4952.98,278.42],"5-60-12":[-4952.98,320.52],"6-121-26":[-5302.77,60.14],"6-121-27":[-8432.48,310],"5-60-13":[-8432.48,320.6],"6-121-28":[-8445.91,1874.06],"6-121-29":[-4394.15,798.37],"5-60-14":[-8445.91,2329.59],"6-121-30":[-4214.87,673.97],"6-121-31":[-4909.25,96.35],"5-60-15":[-4909.25,673.97],"6-121-32":[-4524.53,101.5],"6-121-33":[-4708.54,1195.58],"5-60-16":[-4809.47,1195.58],"6-121-34":[-5263.16,839.37],"6-121-35":[-5431.78,1980.07],"5-60-17":[-5928.98,2387.59],"6-121-36":[-5881.53,241.22],"6-121-37":[-5906.24,129.2],"5-60-18":[-6457.12,264.39],"6-121-38":[-6153.29,122.21],"6-121-39":[-5665.94,116.7],"5-60-19":[-6153.29,122.21],"6-121-40":[-6068.98,106.12],"6-121-41":[-6769.5,94.44],"5-60-20":[-6769.5,106.12],"6-121-42":[-6326.71,82.35],"6-121-43":[-6475.65,66.27],"5-60-21":[-6475.65,495.66],"6-121-44":[-6585.85,55.75],"6-121-45":[-5665.02,35.28],"5-60-22":[-6585.85,55.75],"6-121-46":[-5980.55,21.22],"6-121-47":[-8565.41,3.98],"5-60-23":[-8565.41,21.22],"6-121-48":[-7688.98,-3.49],"6-121-49":[-6094.09,-8.06],"5-60-24":[-8360.13,-3.49],"6-121-50":[-7925.02,-10.84],"6-121-51":[-7262.98,4714.21],"5-60-25":[-7925.02,4714.21],"6-121-52":[-1254.34,3173.24],"6-121-53":[-279.33,1760.54],"5-60-26":[-1254.34,3173.24],"6-121-54":[-88.46,1430.3],"6-121-55":[-106.46,1636.79],"5-60-27":[-106.46,1792.6],"6-121-56":[-114.63,1037.69],"6-121-57":[-117.59,2620.78],"5-60-28":[-117.59,2656.26],"6-121-58":[-116.47,3433.82],"6-121-59":[-326.4,3317.92],"5-60-29":[-326.4,3433.82],"6-121-60":[-2852.26,2320.2],"6-121-61":[-3608.19,4077.78],"5-60-30":[-3608.19,4077.78],"6-121-62":[-4027.06,2984.14],"6-121-63":[-4301.84,3088.17],"5-60-31":[-4362.3,3090.38],"6-122-0":[-56.54,1014.6],"6-122-1":[-109.77,3546.5],"6-122-2":[-1210.31,4044.71],"6-122-3":[-1409.05,4.81],"6-122-4":[-1085.99,2572.72],"6-122-5":[-1350.81,3255.72],"6-122-6":[-1368.16,3402.98],"6-122-7":[-2794.56,1528.57],"6-122-8":[-3475.81,2107.47],"6-122-9":[-4413.25,1582.28],"6-122-10":[-5290.8,1233.67],"6-122-11":[-5917.39,932.54],"6-122-12":[-5796.65,850.98],"6-122-13":[-4791.57,472.87],"6-122-14":[-9889.98,16.34],"6-122-15":[-5992.39,6.88],"6-122-16":[-5621.81,-0.71],"6-122-17":[-5005.96,-4.25],"6-122-18":[-4194.8,-5.37],"6-122-19":[-3160.01,-6.19],"6-122-20":[-3411.31,-2.87],"6-122-21":[-3636.98,2.46],"6-122-22":[-3840.52,10.62],"6-122-23":[-3781.57,22.49],"6-122-24":[-4206.98,1627.03],"6-122-25":[-6101.98,333.75],"6-122-26":[-5952.12,54.72],"6-122-27":[-9079.48,60.99],"6-122-28":[-8454.89,738.31],"6-122-29":[-5441.79,72.29],"6-122-30":[-4625.54,81.32],"6-122-31":[-4641.51,86.88],"6-122-32":[-4517.57,92.44],"6-122-33":[-4923.32,106.03],"6-122-34":[-5332.06,119.42],"6-122-35":[-5557.99,866.32],"6-122-36":[-5705.71,218.89],"6-122-37":[-5889.42,127.16],"6-122-38":[-5897.43,340.77],"6-122-39":[-6007.07,1689.03],"6-122-40":[-6305.73,106.61],"6-122-41":[-6283.84,96.95],"6-122-42":[-6920.2,82.62],"6-122-43":[-7795.55,66.13],"6-122-44":[-6961.36,57.54],"6-122-45":[-6797.87,44.27],"6-122-46":[-6318.08,29.21],"6-122-47":[-7616.71,13.47],"6-122-48":[-10312.48,-2.93],"6-122-49":[-6228.89,-6.28],"6-122-50":[-6196.34,517.88],"6-122-51":[-6991.8,775.99],"6-122-52":[-4261.65,866.52],"6-122-53":[-1470.63,1246.67],"6-122-54":[-91.49,1594.29],"6-122-55":[-105.7,1756.51],"6-122-56":[-117.38,1533.57],"6-122-57":[-60.46,3075.8],"6-122-58":[-117.89,3148.6],"6-122-59":[-1054.95,2551.83],"6-122-60":[-2851.46,209.78],"6-122-61":[-3431.75,3800.64],"6-122-62":[-3988.49,3358.99],"6-122-63":[-4295.78,3084.48],"6-123-0":[-56.54,1244.65],"6-123-1":[-232.32,3676.75],"5-61-0":[-232.32,3676.75],"6-123-2":[-3382.75,4354.84],"6-123-3":[-1294.36,5.41],"5-61-1":[-3382.75,4354.84],"4-30-0":[-3382.75,4354.84],"6-123-4":[-2791.43,3682.29],"6-123-5":[-1170.46,3170.38],"5-61-2":[-2791.43,3682.29],"6-123-6":[-2127.24,3838.38],"6-123-7":[-3347.99,1680.33],"5-61-3":[-3347.99,3838.38],"4-30-1":[-3347.99,3838.38],"6-123-8":[-3635.38,1646.59],"6-123-9":[-3647.76,1328.47],"5-61-4":[-4413.25,2107.47],"6-123-10":[-5327.86,1210.93],"6-123-11":[-5689.06,20.59],"5-61-5":[-5917.39,1233.67],"4-30-2":[-6609.18,3277.23],"6-123-12":[-5306.98,744.81],"6-123-13":[-1323.94,597.84],"5-61-6":[-5796.65,850.98],"6-123-14":[-3360.99,467.59],"6-123-15":[-4513.17,2234.46],"5-61-7":[-9889.98,2234.46],"4-30-3":[-9889.98,4774.23],"6-123-16":[-4699.05,2752.59],"6-123-17":[-4390.06,-6.72],"5-61-8":[-5621.81,2752.59],"6-123-18":[-3204.99,-8.71],"6-123-19":[-3164.59,-8.81],"5-61-9":[-4194.8,-5.37],"4-30-4":[-5664,2752.59],"6-123-20":[-4217.52,33.69],"6-123-21":[-4274.01,312.86],"5-61-10":[-4274.01,312.86],"6-123-22":[-3827.4,1.5],"6-123-23":[-3830.58,209.11],"5-61-11":[-3840.52,209.11],"4-30-5":[-4782.38,525.64],"6-123-24":[-7245.18,1610.47],"6-123-25":[-7349.14,684.13],"5-61-12":[-7349.14,1627.03],"6-123-26":[-6517.45,1790.76],"6-123-27":[-9033.13,917.4],"5-61-13":[-9079.48,1790.76],"4-30-6":[-9079.48,1790.76],"6-123-28":[-5951.42,556.87],"6-123-29":[-5497.1,68.93],"5-61-14":[-8454.89,738.31],"6-123-30":[-4910.82,72.06],"6-123-31":[-4464.67,236.83],"5-61-15":[-4910.82,236.83],"4-30-7":[-8454.89,2329.59],"6-123-32":[-4593.18,105.9],"6-123-33":[-5101.41,189.87],"5-61-16":[-5101.41,189.87],"6-123-34":[-5266.67,289.81],"6-123-35":[-5291.73,608.86],"5-61-17":[-5557.99,866.32],"4-30-8":[-5928.98,2387.59],"6-123-36":[-5767.79,1017.74],"6-123-37":[-6472.3,1941.75],"5-61-18":[-6472.3,1941.75],"6-123-38":[-5832.98,717.25],"6-123-39":[-9233.31,1664.47],"5-61-19":[-9233.31,1689.03],"4-30-9":[-9233.31,1941.75],"6-123-40":[-6592.72,309.11],"6-123-41":[-6481.34,105.67],"5-61-20":[-6592.72,309.11],"6-123-42":[-6303.27,357.87],"6-123-43":[-6844.66,77.86],"5-61-21":[-7795.55,357.87],"4-30-10":[-7795.55,495.66],"6-123-44":[-7086.51,65.38],"6-123-45":[-5939.97,51.14],"5-61-22":[-7086.51,65.38],"6-123-46":[-6464.77,41.96],"6-123-47":[-5894.23,2939.6],"5-61-23":[-7616.71,2939.6],"4-30-11":[-8565.41,2939.6],"6-123-48":[-6765.22,2088.42],"6-123-49":[-7225.31,566.58],"5-61-24":[-10312.48,2088.42],"6-123-50":[-7023.81,649.83],"6-123-51":[-7022.87,934.21],"5-61-25":[-7023.81,934.21],"4-30-12":[-10312.48,4714.21],"6-123-52":[-4126.33,-32.37],"6-123-53":[-3406.12,1230.43],"5-61-26":[-4261.65,1246.67],"6-123-54":[-95.58,1329.47],"6-123-55":[-108.17,1683.59],"5-61-27":[-108.17,1756.51],"4-30-13":[-4261.65,3173.24],"6-123-56":[-118.68,1650.33],"6-123-57":[-116.81,3530.38],"5-61-28":[-118.68,3530.38],"6-123-58":[-159.87,2686.35],"6-123-59":[-2076.04,3368.3],"5-61-29":[-2076.04,3368.3],"4-30-14":[-2076.04,3530.38],"6-123-60":[-2853.15,-47.93],"6-123-61":[-3435.37,4324.92],"5-61-30":[-3435.37,4324.92],"6-123-62":[-3977.47,3260.29],"6-123-63":[-4287.81,3084.24],"5-61-31":[-4295.78,3358.99],"4-30-15":[-4362.3,4324.92],"6-124-0":[-56.54,1301.6],"6-124-1":[-1191.92,3708.01],"6-124-2":[-1848.48,3644.05],"6-124-3":[-995.03,5.75],"6-124-4":[-1020.34,2277.07],"6-124-5":[-1133.6,1872.18],"6-124-6":[-2735.85,3841.38],"6-124-7":[-3498.04,1617.82],"6-124-8":[-3588.31,1409.69],"6-124-9":[-4799.27,2305.88],"6-124-10":[-5503.23,2164.88],"6-124-11":[-6053.23,14.63],"6-124-12":[-5956.51,14.32],"6-124-13":[-796.01,475.72],"6-124-14":[-1475.84,8.76],"6-124-15":[-1676.68,2157.34],"6-124-16":[-2008.55,3583.72],"6-124-17":[-2140.02,1384.49],"6-124-18":[-2382.68,-6.47],"6-124-19":[-3086.24,3.63],"6-124-20":[-4605.92,-7.51],"6-124-21":[-4715.27,-4.76],"6-124-22":[-4322.05,-0.84],"6-124-23":[-7577.19,199.74],"6-124-24":[-7373.16,963.85],"6-124-25":[-4229.08,1044.88],"6-124-26":[-3856.45,38.19],"6-124-27":[-4605.43,656.26],"6-124-28":[-6193.84,78.61],"6-124-29":[-5618.92,57.21],"6-124-30":[-4139.69,61.69],"6-124-31":[-4704.02,110.26],"6-124-32":[-4720.62,114.26],"6-124-33":[-4885.21,199.85],"6-124-34":[-5006.81,1181.19],"6-124-35":[-5183.38,353.36],"6-124-36":[-5749.76,447.27],"6-124-37":[-5836.57,1039.27],"6-124-38":[-6631,1137.87],"6-124-39":[-6170.25,895.97],"6-124-40":[-6352.28,131.97],"6-124-41":[-6401.53,105.92],"6-124-42":[-6323.16,96.09],"6-124-43":[-6035.82,85.75],"6-124-44":[-6040.28,75.44],"6-124-45":[-6821.76,56.69],"6-124-46":[-7017.19,1441.5],"6-124-47":[-6967.66,3719.73],"6-124-48":[-6885.19,2290.2],"6-124-49":[-6816.74,-3.78],"6-124-50":[-7342.18,535.73],"6-124-51":[-4825.77,-20.62],"6-124-52":[-4087.83,-35.05],"6-124-53":[-3238.86,2185.88],"6-124-54":[-98.04,2328.88],"6-124-55":[-110.57,1461.98],"6-124-56":[-118.68,1628.36],"6-124-57":[-117.84,3544.4],"6-124-58":[-196.58,1962.19],"6-124-59":[-2437.77,2252.06],"6-124-60":[-2814.21,-48.57],"6-124-61":[-3412.93,3812.59],"6-124-62":[-4012.16,3705.94],"6-124-63":[-4284.77,3085.39],"6-125-0":[-56.54,1317.16],"6-125-1":[-572.69,3995.42],"5-62-0":[-1191.92,3995.42],"6-125-2":[-1311.11,2953.97],"6-125-3":[-964.64,6.39],"5-62-1":[-1848.48,3644.05],"6-125-4":[-964.64,6.49],"6-125-5":[-641.47,5.32],"5-62-2":[-1133.6,2277.07],"6-125-6":[-2768.91,6.47],"6-125-7":[-4295,1111.24],"5-62-3":[-4295,3841.38],"6-125-8":[-4019.88,1048.77],"6-125-9":[-4953.31,1518.99],"5-62-4":[-4953.31,2305.88],"6-125-10":[-5798.48,1665.46],"6-125-11":[-5866.14,6.86],"5-62-5":[-6053.23,2164.88],"6-125-12":[-5760.7,8.77],"6-125-13":[-4633.32,953.56],"5-62-6":[-5956.51,953.56],"6-125-14":[-1469.18,5.28],"6-125-15":[-2476.63,-2.39],"5-62-7":[-2476.63,2157.34],"6-125-16":[-2350.31,2480.82],"6-125-17":[-1065.55,2703.39],"5-62-8":[-2350.31,3583.72],"6-125-18":[-2048.5,2435.06],"6-125-19":[-2432.05,771.91],"5-62-9":[-3086.24,2435.06],"6-125-20":[-3878.8,43.61],"6-125-21":[-4100.08,-6.04],"5-62-10":[-4715.27,43.61],"6-125-22":[-5196.44,-3.42],"6-125-23":[-7758.52,4.64],"5-62-11":[-7758.52,199.74],"6-125-24":[-4709.36,513.79],"6-125-25":[-3752.38,24.94],"5-62-12":[-7373.16,1044.88],"6-125-26":[-6621.91,30.26],"6-125-27":[-5178.35,388.48],"5-62-13":[-6621.91,656.26],"6-125-28":[-5685.04,48.13],"6-125-29":[-5834.84,54.5],"5-62-14":[-6193.84,78.61],"6-125-30":[-5675.27,56.85],"6-125-31":[-4961.08,80.57],"5-62-15":[-5675.27,110.26],"6-125-32":[-5122.01,216.12],"6-125-33":[-5296.87,448.44],"5-62-16":[-5296.87,448.44],"6-125-34":[-5462.36,652.65],"6-125-35":[-5659.88,103.05],"5-62-17":[-5659.88,1181.19],"6-125-36":[-5926.4,124.13],"6-125-37":[-5839.93,130.49],"5-62-18":[-5926.4,1039.27],"6-125-38":[-5706.76,131.46],"6-125-39":[-5894.32,288.83],"5-62-19":[-6631,1137.87],"6-125-40":[-6238.28,107.87],"6-125-41":[-6426.06,104.69],"5-62-20":[-6426.06,131.97],"6-125-42":[-6389.68,97.22],"6-125-43":[-5810.29,89.45],"5-62-21":[-6389.68,97.22],"6-125-44":[-6349.71,816.34],"6-125-45":[-6401.67,2517.08],"5-62-22":[-6821.76,2517.08],"6-125-46":[-6548.04,2863.4],"6-125-47":[-7577.65,2605.15],"5-62-23":[-7577.74,3719.73],"6-125-48":[-7742.5,11.03],"6-125-49":[-6175.39,-4.71],"5-62-24":[-7742.5,2290.2],"6-125-50":[-7297.08,855.48],"6-125-51":[-4515.77,-21.91],"5-62-25":[-7342.18,855.48],"6-125-52":[-4005.44,-37.16],"6-125-53":[-3534.25,1715.44],"5-62-26":[-4087.83,2185.88],"6-125-54":[-99.71,1567.95],"6-125-55":[-113.95,1055.77],"5-62-27":[-113.95,2328.88],"6-125-56":[-118.23,1132.25],"6-125-57":[-119.6,-21.59],"5-62-28":[-119.6,3544.4],"6-125-58":[-269.84,-35.5],"6-125-59":[-2414.97,-52.66],"5-62-29":[-2437.77,2252.06],"6-125-60":[-2787.87,-48.63],"6-125-61":[-3242.97,2586.73],"5-62-30":[-3412.93,3812.59],"6-125-62":[-4002.19,3991.97],"6-125-63":[-4279.77,3087.55],"5-62-31":[-4284.77,3991.97],"6-126-0":[-56.54,1326.01],"6-126-1":[6.39,4136.33],"6-126-2":[-1110.71,3023.78],"6-126-3":[-832.6,7.32],"6-126-4":[-882.14,5.6],"6-126-5":[-714.62,4.51],"6-126-6":[-3402.46,5.95],"6-126-7":[-3875.2,1644.02],"6-126-8":[-5179.44,1334.46],"6-126-9":[-4806.11,1348.08],"6-126-10":[-5608.88,360.68],"6-126-11":[-5709.67,3.75],"6-126-12":[-5642.23,11.04],"6-126-13":[-5402.41,663.5],"6-126-14":[-3878.3,1.9],"6-126-15":[-3026,-2.13],"6-126-16":[-2994.81,-6.98],"6-126-17":[-3629.85,1723.22],"6-126-18":[-3098.11,2690.97],"6-126-19":[-3270.73,861.23],"6-126-20":[-4248.84,-6.36],"6-126-21":[-4689.77,-4.68],"6-126-22":[-4958.08,-4.14],"6-126-23":[-5774.74,4.18],"6-126-24":[-5415.15,260.52],"6-126-25":[-4431.02,483.23],"6-126-26":[-5087.7,174.6],"6-126-27":[-4511.06,229.72],"6-126-28":[-5530.34,40.97],"6-126-29":[-5978.96,401.29],"6-126-30":[-5867.38,423.39],"6-126-31":[-5805.77,165.51],"6-126-32":[-6483.05,56],"6-126-33":[-6671.64,66],"6-126-34":[-6545.42,76.55],"6-126-35":[-6624.72,95.02],"6-126-36":[-5934.9,297.72],"6-126-37":[-5555.83,122.31],"6-126-38":[-5267.64,587.24],"6-126-39":[-5478.95,124.15],"6-126-40":[-6264.23,107.99],"6-126-41":[-6215.65,102.99],"6-126-42":[-5936.66,96.7],"6-126-43":[-5953.59,87],"6-126-44":[-5339.24,921.24],"6-126-45":[-5656.73,2784.98],"6-126-46":[-6788.78,1743.24],"6-126-47":[-7214.84,29.21],"6-126-48":[-6130.94,11.4],"6-126-49":[-7290.53,-4.57],"6-126-50":[-7355,491.49],"6-126-51":[-5551.08,-26.38],"6-126-52":[-4441.49,-37.37],"6-126-53":[-3701.8,418.22],"6-126-54":[-122.63,1368.07],"6-126-55":[-115.57,1359.45],"6-126-56":[-120.87,1643.02],"6-126-57":[-122.6,-15.98],"6-126-58":[-624.79,-39.61],"6-126-59":[-2268.14,-52.64],"6-126-60":[-2705.49,-48.23],"6-126-61":[-3105.89,3164.9],"6-126-62":[-4043.65,4009.42],"6-126-63":[-4253.65,3089.77],"6-127-0":[-56.54,1334.33],"6-127-1":[-210.07,3234.37],"5-63-0":[-210.07,4136.33],"6-127-2":[-982.23,1050.27],"6-127-3":[-866.89,8.63],"5-63-1":[-1110.71,3023.78],"4-31-0":[-1848.48,4136.33],"6-127-4":[-866.24,6.79],"6-127-5":[-934.59,4.39],"5-63-2":[-934.59,6.79],"6-127-6":[-3725.21,612.64],"6-127-7":[-4050.17,1712.25],"5-63-3":[-4050.17,1712.25],"4-31-1":[-4295,3841.38],"3-15-0":[-4295,4354.84],"6-127-8":[-5328.81,1465.56],"6-127-9":[-4628.49,918.23],"5-63-4":[-5328.81,1465.56],"6-127-10":[-5971.35,11.47],"6-127-11":[-5641.74,3.44],"5-63-5":[-5971.35,360.68],"4-31-2":[-6053.23,2305.88],"6-127-12":[-5548.55,11.61],"6-127-13":[-5408.37,1210.91],"5-63-6":[-5642.23,1210.91],"6-127-14":[-5040.03,327.38],"6-127-15":[-3895.37,12.41],"5-63-7":[-5040.03,327.38],"4-31-3":[-5956.51,2157.34],"3-15-1":[-9889.98,4774.23],"2-7-0":[-9889.98,4774.23],"6-127-16":[-3066.41,-6.43],"6-127-17":[-4084.12,-10.68],"5-63-8":[-4084.12,1723.22],"6-127-18":[-4617.02,1681.88],"6-127-19":[-4460.78,-7.92],"5-63-9":[-4617.02,2690.97],"4-31-4":[-4617.02,3583.72],"6-127-20":[-4339.84,-7.92],"6-127-21":[-4478.85,40.71],"5-63-10":[-4689.77,40.71],"6-127-22":[-4490.23,-3.04],"6-127-23":[-4568.72,1.26],"5-63-11":[-5774.74,4.18],"4-31-5":[-7758.52,199.74],"3-15-2":[-7758.52,3583.72],"6-127-24":[-4711.94,9.72],"6-127-25":[-4084.66,1312.41],"5-63-12":[-5415.15,1312.41],"6-127-26":[-4195.61,981.61],"6-127-27":[-4943.02,64.11],"5-63-13":[-5087.7,981.61],"4-31-6":[-7373.16,1312.41],"6-127-28":[-5249.7,472.52],"6-127-29":[-5962.93,523.86],"5-63-14":[-5978.96,523.86],"6-127-30":[-6244.65,40.09],"6-127-31":[-5963.28,46.55],"5-63-15":[-6244.65,423.39],"4-31-7":[-6244.65,523.86],"3-15-3":[-9079.48,2329.59],"2-7-1":[-9079.48,4766.85],"1-3-0":[-9889.98,7512.84],"6-127-32":[-5882.89,50.53],"6-127-33":[-6530.92,57.98],"5-63-16":[-6671.64,66],"6-127-34":[-6610.51,69.75],"6-127-35":[-6659.17,86.05],"5-63-17":[-6659.17,95.02],"4-31-8":[-6671.64,1181.19],"6-127-36":[-6695.83,104.68],"6-127-37":[-5931.51,1069.23],"5-63-18":[-6695.83,1069.23],"6-127-38":[-5463.07,1371.15],"6-127-39":[-5548.25,108.66],"5-63-19":[-5548.25,1371.15],"4-31-9":[-6695.83,1371.15],"3-15-4":[-9233.31,2387.59],"6-127-40":[-6217.08,103.15],"6-127-41":[-6232.24,98.56],"5-63-20":[-6264.23,107.99],"6-127-42":[-6540.92,94.48],"6-127-43":[-5834.93,91.71],"5-63-21":[-6540.92,96.7],"4-31-10":[-6540.92,131.97],"6-127-44":[-5276.76,83.16],"6-127-45":[-5718.98,1759.88],"5-63-22":[-5718.98,2784.98],"6-127-46":[-6872.58,42.6],"6-127-47":[-7215.56,30.55],"5-63-23":[-7215.56,1743.24],"4-31-11":[-7577.65,3719.73],"3-15-5":[-8565.41,3719.73],"2-7-2":[-10883.73,5227.39],"6-127-48":[-6546.41,37.42],"6-127-49":[-7350.29,351.39],"5-63-24":[-7350.29,351.39],"6-127-50":[-7318.33,1130.9],"6-127-51":[-4299.75,-28.67],"5-63-25":[-7355,1130.9],"4-31-12":[-7742.5,2290.2],"6-127-52":[-4544.67,-37.45],"6-127-53":[-3726.9,-44.71],"5-63-26":[-4544.67,418.22],"6-127-54":[-175.46,962.23],"6-127-55":[-117.07,1527.58],"5-63-27":[-175.46,1527.58],"4-31-13":[-4544.67,2328.88],"3-15-6":[-10312.48,4714.21],"6-127-56":[-123.45,1789.28],"6-127-57":[-123.93,639.49],"5-63-28":[-123.93,1789.28],"6-127-58":[-1148.1,-47.82],"6-127-59":[-1910.34,-53.65],"5-63-29":[-2268.14,-39.61],"4-31-14":[-2437.77,3544.4],"6-127-60":[-2503.26,-48.22],"6-127-61":[-2903.07,1201.67],"5-63-30":[-3105.89,3164.9],"6-127-62":[-3966.1,3227.47],"6-127-63":[-4341.65,3092.98],"5-63-31":[-4341.65,4009.42],"4-31-15":[-4341.65,4009.42],"3-15-7":[-4362.3,4324.92],"2-7-3":[-10853.54,4714.21],"1-3-1":[-10883.73,7274.95],"0-1-0":[-10883.73,8777.15]} diff --git a/ThirdParty/Workers/z-worker-pako.js b/ThirdParty/Workers/z-worker-pako.js index 0fa231b..f0cdf00 100644 --- a/ThirdParty/Workers/z-worker-pako.js +++ b/ThirdParty/Workers/z-worker-pako.js @@ -1 +1 @@ -!function(){"use strict";const{Array:t,Object:e,Math:n,Error:s,Uint8Array:r,Uint16Array:a,Uint32Array:i,Int32Array:c,DataView:o,TextEncoder:l,crypto:h,postMessage:p}=globalThis,d=[];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)1&e?e=e>>>1^3988292384:e>>>=1;d[t]=e}class u{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,s=0|t.length;s>n;n++)e=e>>>8^d[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const f={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],s=f.getPartial(n);return 32===s?t.concat(e):f._shiftRight(e,s,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+f.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[s-1]=f.partial(e,t[s-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>n.round(t/1099511627776)||32,_shiftRight(t,e,n,s){for(void 0===s&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(0===e)return s.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=f.getPartial(r);return s.push(f.partial(e+a&31,e+a>32?n:s.pop(),1)),s}},g={bytes:{fromBits(t){const e=f.bitLength(t)/8,n=new r(e);let s;for(let r=0;e>r;r++)!(3&r)&&(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(t){const e=[];let n,s=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const c=new i(n);let o=0;for(let t=e.blockSize+r-(e.blockSize+r&e.blockSize-1);a>=t;t+=e.blockSize)e._block(c.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),e},finalize:function(){const t=this;let e=t._buffer;const s=t._h;e=f.concat(e,[f.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(n.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),s},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(t,e,n,s)=>t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s,_S:(t,e)=>e<>>32-t,_block:function(e){const s=this,r=s._h,a=t(80);for(let t=0;16>t;t++)a[t]=e[t];let i=r[0],c=r[1],o=r[2],l=r[3],h=r[4];for(let t=0;79>=t;t++){16>t||(a[t]=s._S(1,a[t-3]^a[t-8]^a[t-14]^a[t-16]));const e=s._S(5,i)+s._f(t,c,o,l)+h+a[t]+s._key[n.floor(t/20)]|0;h=l,l=o,o=s._S(30,c),c=i,i=e}r[0]=r[0]+i|0,r[1]=r[1]+c|0,r[2]=r[2]+o|0,r[3]=r[3]+l|0,r[4]=r[4]+h|0}};const y={getRandomValues(t){const e=new i(t.buffer),s=t=>{let e=987654321;const s=4294967295;return()=>(e=36969*(65535&e)+(e>>16)&s,(((e<<16)+(t=18e3*(65535&t)+(t>>16)&s)&s)/4294967296+.5)*(n.random()>.5?1:-1))};for(let r,a=0;anew _.hmacSha1(g.bytes.toBits(t)),pbkdf2(t,e,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const a=1+(r>>5)<<2;let i,c,l,h,p;const d=new ArrayBuffer(a),u=new o(d);let w=0;const y=f;for(e=g.bytes.toBits(e),p=1;(a||1)>w;p++){for(i=c=t.encrypt(y.concat(e,[p])),l=1;n>l;l++)for(c=t.encrypt(c),h=0;hw&&lr&&(t=n.hash(t));for(let e=0;r>e;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}encrypt(t){if(this._updated)throw new s("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},m="Invalid pasword",b=16,k={name:"PBKDF2"},v=e.assign({hash:{name:"HMAC"}},k),z=e.assign({iterations:1e3,hash:{name:"SHA-1"}},k),C=["deriveBits"],S=[8,12,16],B=[16,24,32],I=10,D=[0,0,0,0],V=void 0!==h,H=V&&void 0!==h.subtle,K=g.bytes,A=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],r=e._tables[1],a=t.length;let i,c,o,l=1;if(4!==a&&6!==a&&8!==a)throw new s("invalid aes key size");for(e._key=[c=t.slice(0),o=[]],i=a;4*a+28>i;i++){let t=c[i-1];(i%a==0||8===a&&i%a==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],i%a==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-a]^t}for(let t=0;i;t++,i--){const e=c[3&t?i:i-4];o[t]=4>=i||4>t?e:r[0][n[e>>>24]]^r[1][n[e>>16&255]]^r[2][n[e>>8&255]]^r[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],s=e[4],r=[],a=[];let i,c,o,l;for(let t=0;256>t;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let h=i=0;!n[h];h^=c||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,s[a]=h,l=r[o=r[c=r[h]]];let p=16843009*l^65537*o^257*c^16843008*h,d=257*r[a]^16843008*a;for(let n=0;4>n;n++)t[n][h]=d=d<<24^d>>>8,e[n][a]=p=p<<24^p>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new s("invalid aes block size");const n=this._key[e],r=n.length/4-2,a=[0,0,0,0],i=this._tables[e],c=i[0],o=i[1],l=i[2],h=i[3],p=i[4];let d,u,f,g=t[0]^n[0],w=t[e?3:1]^n[1],y=t[2]^n[2],_=t[e?1:3]^n[3],m=4;for(let t=0;r>t;t++)d=c[g>>>24]^o[w>>16&255]^l[y>>8&255]^h[255&_]^n[m],u=c[w>>>24]^o[y>>16&255]^l[_>>8&255]^h[255&g]^n[m+1],f=c[y>>>24]^o[_>>16&255]^l[g>>8&255]^h[255&w]^n[m+2],_=c[_>>>24]^o[g>>16&255]^l[w>>8&255]^h[255&y]^n[m+3],m+=4,g=d,w=u,y=f;for(let t=0;4>t;t++)a[e?3&-t:t]=p[g>>>24]<<24^p[w>>16&255]<<16^p[y>>8&255]<<8^p[255&_]^n[m++],d=g,g=w,w=y,y=_,_=d;return a}},R=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let s;if(!(s=e.length))return[];const r=f.bitLength(e);for(let r=0;s>r;r+=4){this.incCounter(n);const s=t.encrypt(n);e[r]^=s[0],e[r+1]^=s[1],e[r+2]^=s[2],e[r+3]^=s[3]}return f.clamp(e,r)}},W=_.hmacSha1;class T{constructor(t,n,s){e.assign(this,{password:t,signed:n,strength:s-1,pendingInput:new r(0)})}async append(e){const n=this;if(n.password){const r=E(e,0,S[n.strength]+2);await(async(t,e,n)=>{await L(t,n,E(e,0,S[t.strength]));const r=E(e,S[t.strength]),a=t.keys.passwordVerification;if(a[0]!=r[0]||a[1]!=r[1])throw new s(m)})(n,r,n.password),n.password=null,n.aesCtrGladman=new R(new A(n.keys.key),t.from(D)),n.hmac=new W(n.keys.authentication),e=E(e,S[n.strength]+2)}return G(n,e,new r(e.length-I-(e.length-I)%b),0,I,!0)}flush(){const t=this,e=t.pendingInput,n=E(e,0,e.length-I),s=E(e,e.length-I);let a=new r(0);if(n.length){const e=K.toBits(n);t.hmac.update(e);const s=t.aesCtrGladman.update(e);a=K.fromBits(s)}let i=!0;if(t.signed){const e=E(K.fromBits(t.hmac.digest()),0,I);for(let t=0;I>t;t++)e[t]!=s[t]&&(i=!1)}return{valid:i,data:a}}}class U{constructor(t,n){e.assign(this,{password:t,strength:n-1,pendingInput:new r(0)})}async append(e){const n=this;let s=new r(0);n.password&&(s=await(async(t,e)=>{const n=(s=new r(S[t.strength]),V&&"function"==typeof h.getRandomValues?h.getRandomValues(s):y.getRandomValues(s));var s;return await L(t,e,n),P(n,t.keys.passwordVerification)})(n,n.password),n.password=null,n.aesCtrGladman=new R(new A(n.keys.key),t.from(D)),n.hmac=new W(n.keys.authentication));const a=new r(s.length+e.length-e.length%b);return a.set(s,0),G(n,e,a,s.length,0)}flush(){const t=this;let e=new r(0);if(t.pendingInput.length){const n=t.aesCtrGladman.update(K.toBits(t.pendingInput));t.hmac.update(n),e=K.fromBits(n)}const n=E(K.fromBits(t.hmac.digest()),0,I);return{data:P(e,n),signature:n}}}function G(t,e,n,s,a,i){const c=e.length-a;let o;for(t.pendingInput.length&&(e=P(t.pendingInput,e),n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new r(e)).set(n,0)}return t})(n,c-c%b)),o=0;c-b>=o;o+=b){const r=K.toBits(E(e,o,o+b));i&&t.hmac.update(r);const a=t.aesCtrGladman.update(r);i||t.hmac.update(a),n.set(K.fromBits(a),o+s)}return t.pendingInput=E(e,o),n}async function L(t,n,s){const a=(t=>{if(void 0===l){const e=new r((t=unescape(encodeURIComponent(t))).length);for(let n=0;nV&&H&&"function"==typeof h.subtle.deriveBits?await h.subtle.deriveBits(t,e,n):_.pbkdf2(e,t.salt,z.iterations,n))(e.assign({salt:s},z),i,8*(2*B[t.strength]+2)),o=new r(c);var p,d,u;t.keys={key:K.toBits(E(o,0,B[t.strength])),authentication:K.toBits(E(o,B[t.strength],2*B[t.strength])),passwordVerification:E(o,2*B[t.strength])}}function P(t,e){let n=t;return t.length+e.length&&(n=new r(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function E(t,e,n){return t.subarray(e,n)}class M{constructor(t,n){e.assign(this,{password:t,passwordVerification:n}),O(this,t)}append(t){const e=this;if(e.password){const n=x(e,t.subarray(0,12));if(e.password=null,n[11]!=e.passwordVerification)throw new s(m);t=t.subarray(12)}return x(e,t)}flush(){return{valid:!0,data:new r(0)}}}class j{constructor(t,n){e.assign(this,{password:t,passwordVerification:n}),O(this,t)}append(t){const e=this;let n,s;if(e.password){e.password=null;const a=h.getRandomValues(new r(12));a[11]=e.passwordVerification,n=new r(t.length+a.length),n.set(F(e,a),0),s=12}else n=new r(t.length),s=0;return n.set(F(e,t),s),n}flush(){return{data:new r(0)}}}function x(t,e){const n=new r(e.length);for(let s=0;s>>24]),t.keys[2]=~t.crcKey2.get()}function J(t){const e=2|t.keys[2];return N(n.imul(e,1^e)>>>8)}function N(t){return 255&t}function Q(t){return 4294967295&t}const X="deflate",Y="inflate",Z="Invalid signature";class ${constructor(t,{signature:n,password:s,signed:r,compressed:a,zipCrypto:i,passwordVerification:c,encryptionStrength:o},{chunkSize:l}){const h=!!s;e.assign(this,{signature:n,encrypted:h,signed:r,compressed:a,inflate:a&&new t({chunkSize:l}),crc32:r&&new u,zipCrypto:i,decrypt:h&&i?new M(s,c):new T(s,r,o)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new r(0);if(t.encrypted){const e=t.decrypt.flush();if(!e.valid)throw new s(Z);n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new o(new r(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.signature!=n.getUint32(0,!1))throw new s(Z)}return t.compressed&&(n=await t.inflate.append(n)||new r(0),await t.inflate.flush()),{data:n,signature:e}}}class tt{constructor(t,{encrypted:n,signed:s,compressed:r,level:a,zipCrypto:i,password:c,passwordVerification:o,encryptionStrength:l},{chunkSize:h}){e.assign(this,{encrypted:n,signed:s,compressed:r,deflate:r&&new t({level:a||5,chunkSize:h}),crc32:s&&new u,zipCrypto:i,encrypt:n&&i?new j(c,o):new U(c,l)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new r(0);if(t.compressed&&(n=await t.deflate.flush()||new r(0)),t.encrypted){n=await t.encrypt.append(n);const s=t.encrypt.flush();e=s.signature;const a=new r(n.length+s.data.length);a.set(n,0),a.set(s.data,n.length),n=a}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const et={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;var s,r,a;self.initCodec&&self.initCodec(),e.codecType.startsWith(X)?n=self.Deflate:e.codecType.startsWith(Y)&&(n=self.Inflate),s=n,r=e,a=t.config,nt=r.codecType.startsWith(X)?new tt(s,r,a):r.codecType.startsWith(Y)?new $(s,r,a):void 0},append:async t=>({data:await nt.append(t.data)}),flush:()=>nt.flush()};let nt;function st(t,n,s){return class{constructor(a){const i=this;i.codec=new t(e.assign({},n,a)),s(i.codec,(t=>{if(i.pendingData){const e=i.pendingData;i.pendingData=new r(e.length+t.length),i.pendingData.set(e,0),i.pendingData.set(t,e.length)}else i.pendingData=new r(t)}))}append(t){return this.codec.push(t),a(this)}flush(){return this.codec.push(new r(0),!0),a(this)}};function a(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new r(0)}}addEventListener("message",(async t=>{const e=t.data,n=e.type,s=et[n];if(s)try{e.data&&(e.data=new r(e.data));const t=await s(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,p(t,[t.data])}catch{p(t)}else p(t)}catch(t){p({type:n,error:{message:t.message,stack:t.stack}})}})),self.initCodec=()=>{const{Deflate:t,Inflate:e}=((t,e={},n)=>({Deflate:st(t.Deflate,e.deflate,n),Inflate:st(t.Inflate,e.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((t,e)=>t.onData=e));self.Deflate=t,self.Inflate=e}}(); \ No newline at end of file +!function(){"use strict";const{Array:e,Object:t,Number:n,Math:s,Error:r,Uint8Array:a,Uint16Array:o,Uint32Array:i,Int32Array:c,Map:l,DataView:u,Promise:h,TextEncoder:f,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:y,CompressionStream:m,DecompressionStream:_}=self,b=void 0,S="undefined",v="function";class k{constructor(e){return class extends g{constructor(t,n){const s=new e(n);super({transform(e,t){t.enqueue(s.append(e))},flush(e){const t=s.flush();t&&e.enqueue(t)}})}}}}const z=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;z[e]=t}class D{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^z[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class C extends g{constructor(){let e;const t=new D;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new u(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const I={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=I.getPartial(n);return 32===s?e.concat(t):I._shiftRight(t,s,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+I.getPartial(n)},clamp(e,t){if(32*e.length0&&t&&(e[n-1]=I.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=I.getPartial(r);return s.push(I.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},A={bytes:{fromBits(e){const t=I.bitLength(e)/8,n=new a(t);let s;for(let r=0;t>r;r++)!(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+s-(t.blockSize+s&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=I.concat(t,[I.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,s){return e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s}_S(e,t){return t<>>32-e}_block(t){const n=this,r=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let o=r[0],i=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,i,c,l)+u+a[e]+n._key[s.floor(e/20)]|0;u=l,l=c,c=n._S(30,i),i=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},R={getRandomValues(e){const t=new i(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,a=0;anew H.hmacSha1(A.bytes.toBits(e)),pbkdf2(e,t,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const a=1+(s>>5)<<2;let o,i,c,l,h;const f=new ArrayBuffer(a),p=new u(f);let d=0;const g=I;for(t=A.bytes.toBits(t),h=1;(a||1)>d;h++){for(o=i=e.encrypt(g.concat(t,[h])),c=1;n>c;c++)for(i=e.encrypt(i),l=0;ld&&cr&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new r("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},P=typeof p!=S&&typeof p.getRandomValues==v,B="Invalid password",K="Invalid signature",T="zipjs-abort-check-password";function V(e){return P?p.getRandomValues(e):R.getRandomValues(e)}const x=16,E={name:"PBKDF2"},U=t.assign({hash:{name:"HMAC"}},E),W=t.assign({iterations:1e3,hash:{name:"SHA-1"}},E),M=["deriveBits"],N=[8,12,16],O=[16,24,32],L=10,F=[0,0,0,0],j=typeof p!=S,G=j&&p.subtle,X=j&&typeof G!=S,J=A.bytes,Q=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],s=t._tables[1],a=e.length;let o,i,c,l=1;if(4!==a&&6!==a&&8!==a)throw new r("invalid aes key size");for(t._key=[i=e.slice(0),c=[]],o=a;4*a+28>o;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];c[e]=4>=o||4>e?t:s[0][n[t>>>24]]^s[1][n[t>>16&255]]^s[2][n[t>>8&255]]^s[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],s=t[4],r=[],a=[];let o,i,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!n[u];u^=i||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,n[u]=a,s[a]=u,l=r[c=r[i=r[u]]];let h=16843009*l^65537*c^257*i^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=h=h<<24^h>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new r("invalid aes block size");const n=this._key[t],s=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],c=o[1],l=o[2],u=o[3],h=o[4];let f,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;s>e;e++)f=i[g>>>24]^c[w>>16&255]^l[y>>8&255]^u[255&m]^n[_],p=i[w>>>24]^c[y>>16&255]^l[m>>8&255]^u[255&g]^n[_+1],d=i[y>>>24]^c[m>>16&255]^l[g>>8&255]^u[255&w]^n[_+2],m=i[m>>>24]^c[g>>16&255]^l[w>>8&255]^u[255&y]^n[_+3],_+=4,g=f,w=p,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=h[g>>>24]<<24^h[w>>16&255]<<16^h[y>>8&255]<<8^h[255&m]^n[_++],f=g,g=w,w=y,y=m,m=f;return a}},Y=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let s;if(!(s=t.length))return[];const r=I.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return I.clamp(t,r)}},Z=H.hmacSha1;let $=j&&X&&typeof G.importKey==v,ee=j&&X&&typeof G.deriveBits==v;class te extends g{constructor({password:e,rawPassword:n,signed:s,encryptionStrength:o,checkPasswordOnly:i}){super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:ae(e,n),signed:s,strength:o-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:o,resolveReady:c,ready:l}=n;s?(await(async(e,t,n,s)=>{const a=await re(e,t,n,ie(s,0,N[t])),o=ie(s,N[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new r(B)})(n,o,s,ie(e,0,N[o]+2)),e=ie(e,N[o]+2),i?t.error(new r(T)):c()):await l;const u=new a(e.length-L-(e.length-L)%x);t.enqueue(se(n,e,u,0,L,!0))},async flush(e){const{signed:t,ctr:n,hmac:s,pending:o,ready:i}=this;if(s&&n){await i;const c=ie(o,0,o.length-L),l=ie(o,o.length-L);let u=new a;if(c.length){const e=le(J,c);s.update(e);const t=n.update(e);u=ce(J,t)}if(t){const e=ie(ce(J,s.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=l[t])throw new r(K)}e.enqueue(u)}}})}}class ne extends g{constructor({password:e,rawPassword:n,encryptionStrength:s}){let r;super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:ae(e,n),strength:s-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:r,resolveReady:o,ready:i}=n;let c=new a;s?(c=await(async(e,t,n)=>{const s=V(new a(N[t]));return oe(s,await re(e,t,n,s))})(n,r,s),o()):await i;const l=new a(c.length+e.length-e.length%x);l.set(c,0),t.enqueue(se(n,e,l,c.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:o}=this;if(n&&t){await o;let i=new a;if(s.length){const e=t.update(le(J,s));n.update(e),i=ce(J,e)}r.signature=ce(J,n.digest()).slice(0,L),e.enqueue(oe(i,r.signature))}}}),r=this}}function se(e,t,n,s,r,o){const{ctr:i,hmac:c,pending:l}=e,u=t.length-r;let h;for(l.length&&(t=oe(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,u-u%x)),h=0;u-x>=h;h+=x){const e=le(J,ie(t,h,h+x));o&&c.update(e);const r=i.update(e);o||c.update(r),n.set(ce(J,r),h+s)}return e.pending=ie(t,h),n}async function re(n,s,r,o){n.password=null;const i=await(async(e,t,n,s,r)=>{if(!$)return H.importKey(t);try{return await G.importKey("raw",t,n,!1,r)}catch{return $=!1,H.importKey(t)}})(0,r,U,0,M),c=await(async(e,t,n)=>{if(!ee)return H.pbkdf2(t,e.salt,W.iterations,n);try{return await G.deriveBits(e,t,n)}catch{return ee=!1,H.pbkdf2(t,e.salt,W.iterations,n)}})(t.assign({salt:o},W),i,8*(2*O[s]+2)),l=new a(c),u=le(J,ie(l,0,O[s])),h=le(J,ie(l,O[s],2*O[s])),f=ie(l,2*O[s]);return t.assign(n,{keys:{key:u,authentication:h,passwordVerification:f},ctr:new Y(new Q(u),e.from(F)),hmac:new Z(h)}),f}function ae(e,t){return t===b?(e=>{if(typeof f==S){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function we(e){const t=2|e.keys[2];return ye(s.imul(t,1^t)>>>8)}function ye(e){return 255&e}function me(e){return 4294967295&e}const _e="deflate-raw";class be extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:s}){super({});const{compressed:r,encrypted:a,useCompressionStream:o,zipCrypto:i,signed:c,level:l}=e,h=this;let f,p,d=ve(super.readable);a&&!i||!c||(f=new C,d=De(d,f)),r&&(d=ze(d,o,{level:l,chunkSize:t},s,n)),a&&(i?d=De(d,new he(e)):(p=new ne(e),d=De(d,p))),ke(h,d,(()=>{let e;a&&!i&&(e=p.signature),a&&!i||!c||(e=new u(f.value.buffer).getUint32(0)),h.signature=e}))}}class Se extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:s}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:c,compressed:l,useCompressionStream:h}=e;let f,p,d=ve(super.readable);o&&(a?d=De(d,new ue(e)):(p=new te(e),d=De(d,p))),l&&(d=ze(d,h,{chunkSize:t},s,n)),o&&!a||!i||(f=new C,d=De(d,f)),ke(this,d,(()=>{if((!o||a)&&i){const e=new u(f.value.buffer);if(c!=e.getUint32(0,!1))throw new r(K)}}))}}function ve(e){return De(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ke(e,n,s){n=De(n,new g({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}function ze(e,t,n,s,r){try{e=De(e,new(t&&s?s:r)(_e,n))}catch{if(!t)return e;try{e=De(e,new r(_e,n))}catch{return e}}return e}function De(e,t){return e.pipeThrough(t)}const Ce="data",Ie="close";class Ae extends g{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=be:r.startsWith("inflate")&&(a=Se);let o=0,i=0;const c=new a(e,n),l=super.readable,u=new g({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){t.assign(s,{inputSize:i})}}),h=new g({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(s,{signature:e,outputSize:o,inputSize:i})}});t.defineProperty(s,"readable",{get:()=>l.pipeThrough(u).pipeThrough(c).pipeThrough(h)})}}class qe extends g{constructor(e){let t;super({transform:function n(s,r){if(t){const e=new a(t.length+s.length);e.set(t),e.set(s,t.length),s=e,t=null}s.length>e?(r.enqueue(s.slice(0,e)),n(s.slice(e),r)):t=s},flush(e){t&&t.length&&e.enqueue(t)}})}}const Re=new l,He=new l;let Pe,Be=0,Ke=!0;async function Te(e){for(const t of e)await import(t)}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch{d(e)}else d(e);else d(e)}function xe(e=new r("Unknown error")){const{message:t,stack:n,code:s,name:a}=e;d({error:{message:t,stack:n,code:s,name:a}})}function Ee(e,n,s){return class{constructor(r){const o=this;var i,c;i=r,c="level",(typeof t.hasOwn===v?t.hasOwn(i,c):i.hasOwnProperty(c))&&r.level===b&&delete r.level,o.codec=new e(t.assign({},n,r)),s(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new a(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new a(e)}))}append(e){return this.codec.push(e),r(this)}flush(){return this.codec.push(new a,!0),r(this)}};function r(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}addEventListener("message",(({data:e})=>{const{type:t,messageId:s,value:r,done:o}=e;try{if("start"==t&&async function(e){try{const{options:t,scripts:s,config:r}=e;if(s&&s.length)try{Ke?importScripts.apply(b,s):await Te(s)}catch{Ke=!1,await Te(s)}self.initCodec&&self.initCodec(),r.CompressionStreamNative=self.CompressionStream,r.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(r.CompressionStream=new k(self.Deflate)),self.Inflate&&(r.DecompressionStream=new k(self.Inflate));const a={highWaterMark:1},o=e.readable||new w({async pull(e){const t=new h((e=>Re.set(Be,e)));Ve({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await t;e.enqueue(s),r&&e.close()}},a),i=e.writable||new y({async write(e){let t;const s=new h((e=>t=e));He.set(Be,t),Ve({type:Ce,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await s}},a),c=new Ae(t,r);Pe=new AbortController;const{signal:l}=Pe;await o.pipeThrough(c).pipeThrough(new qe(r.chunkSize)).pipeTo(i,{signal:l,preventClose:!0,preventAbort:!0});try{await i.getWriter().close()}catch{}const{signature:u,inputSize:f,outputSize:p}=c;Ve({type:Ie,result:{signature:u,inputSize:f,outputSize:p}})}catch(e){xe(e)}}(e),t==Ce){const e=Re.get(s);Re.delete(s),e({value:new a(r),done:o})}if("ack"==t){const e=He.get(s);He.delete(s),e()}t==Ie&&Pe.abort()}catch(e){xe(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Ee(e.Deflate,t.deflate,n),Inflate:Ee(e.Inflate,t.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((e,t)=>e.onData=t));self.Deflate=e,self.Inflate=t}}(); \ No newline at end of file diff --git a/ThirdParty/draco_decoder.wasm b/ThirdParty/draco_decoder.wasm index e5a5e06..4138f55 100644 Binary files a/ThirdParty/draco_decoder.wasm and b/ThirdParty/draco_decoder.wasm differ diff --git a/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css b/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css new file mode 100644 index 0000000..34def22 --- /dev/null +++ b/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css @@ -0,0 +1,27 @@ +/* packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css */ +ul { + list-style-type: none; +} +.layersList { + padding: 0; +} +input { + margin: 0 3px 0 0; +} +.expandItem { + cursor: pointer; + user-select: none; + width: 20px; +} +.nested, +#bsl-wrapper { + display: none; +} +.active { + display: block; +} +.li-wrapper { + display: flex; + flex-direction: row; + align-content: center; +} diff --git a/Widgets/Timeline/Timeline.css b/Widgets/Timeline/Timeline.css index 6a9603e..adb8b99 100644 --- a/Widgets/Timeline/Timeline.css +++ b/Widgets/Timeline/Timeline.css @@ -40,7 +40,14 @@ cursor: pointer; width: 100%; height: 1.7em; - background: linear-gradient(to bottom, rgba(116, 117, 119, 0.8) 0%, rgba(58, 68, 82, 0.8) 11%, rgba(46, 50, 56, 0.8) 46%, rgba(53, 53, 53, 0.8) 81%, rgba(53, 53, 53, 0.8) 100%); + background: + linear-gradient( + to bottom, + rgba(116, 117, 119, 0.8) 0%, + rgba(58, 68, 82, 0.8) 11%, + rgba(46, 50, 56, 0.8) 46%, + rgba(53, 53, 53, 0.8) 81%, + rgba(53, 53, 53, 0.8) 100%); } .cesium-timeline-ruler { visibility: hidden; diff --git a/Widgets/Timeline/lighter.css b/Widgets/Timeline/lighter.css index b311f3d..f2acaa2 100644 --- a/Widgets/Timeline/lighter.css +++ b/Widgets/Timeline/lighter.css @@ -1,6 +1,11 @@ /* packages/widgets/Source/Timeline/lighter.css */ .cesium-lighter .cesium-timeline-bar { - background: linear-gradient(to bottom, #eeeeee 0%, #ffffff 50%, #fafafa 100%); + background: + linear-gradient( + to bottom, + #eeeeee 0%, + #ffffff 50%, + #fafafa 100%); } .cesium-lighter .cesium-timeline-ticLabel { color: #000; diff --git a/Widgets/lighter.css b/Widgets/lighter.css index bb69e63..c6cc48d 100644 --- a/Widgets/lighter.css +++ b/Widgets/lighter.css @@ -173,7 +173,12 @@ /* packages/widgets/Source/Timeline/lighter.css */ .cesium-lighter .cesium-timeline-bar { - background: linear-gradient(to bottom, #eeeeee 0%, #ffffff 50%, #fafafa 100%); + background: + linear-gradient( + to bottom, + #eeeeee 0%, + #ffffff 50%, + #fafafa 100%); } .cesium-lighter .cesium-timeline-ticLabel { color: #000; diff --git a/Widgets/widgets.css b/Widgets/widgets.css index e49ae97..ddc7e1f 100644 --- a/Widgets/widgets.css +++ b/Widgets/widgets.css @@ -1145,7 +1145,14 @@ span.cesium-projectionPicker-wrapper { cursor: pointer; width: 100%; height: 1.7em; - background: linear-gradient(to bottom, rgba(116, 117, 119, 0.8) 0%, rgba(58, 68, 82, 0.8) 11%, rgba(46, 50, 56, 0.8) 46%, rgba(53, 53, 53, 0.8) 81%, rgba(53, 53, 53, 0.8) 100%); + background: + linear-gradient( + to bottom, + rgba(116, 117, 119, 0.8) 0%, + rgba(58, 68, 82, 0.8) 11%, + rgba(46, 50, 56, 0.8) 46%, + rgba(53, 53, 53, 0.8) 81%, + rgba(53, 53, 53, 0.8) 100%); } .cesium-timeline-ruler { visibility: hidden; @@ -1308,4 +1315,32 @@ span.cesium-projectionPicker-wrapper { overflow-x: hidden; } +/* packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css */ +ul { + list-style-type: none; +} +.layersList { + padding: 0; +} +input { + margin: 0 3px 0 0; +} +.expandItem { + cursor: pointer; + user-select: none; + width: 20px; +} +.nested, +#bsl-wrapper { + display: none; +} +.active { + display: block; +} +.li-wrapper { + display: flex; + flex-direction: row; + align-content: center; +} + /* packages/widgets/Source/widgets.css */ diff --git a/Workers/chunk-2F7QWDFC.js b/Workers/chunk-2F7QWDFC.js deleted file mode 100644 index 0541bbf..0000000 --- a/Workers/chunk-2F7QWDFC.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see chunk-2F7QWDFC.js.LICENSE.txt */ -import{a as w}from"./chunk-VZ2RFJ3P.js";var C={computePositions:function(t,o,a,r,n){let s,e=.5*t,i=-e,c=r+r,u=new Float64Array(3*(n?2*c:c)),f=0,h=0,l=n?3*c:0,m=n?3*(c+r):3*r;for(s=0;s4)throw new N("options.componentsPerAttribute must be between 1 and 4.");if(!I(t.values))throw new N("options.values is required.");this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=s(t.normalize,!1),this.values=t.values}var Ot=ot;export{M as a,F as b,Lt as c,Ot as d}; \ No newline at end of file +/*! For license information please see chunk-3G4OCZJT.js.LICENSE.txt */ +import{e as O,h as G}from"./chunk-LYPPBP4Q.js";import{b as l,c as R,d as L}from"./chunk-S7TTFAYA.js";import{a as A,b as h,c as a,e as y}from"./chunk-PYVDHCDQ.js";import{a as c}from"./chunk-DNO4OWAM.js";import{a as s}from"./chunk-Z3SYNMQT.js";import{a as N,b as w}from"./chunk-4KGDZUZQ.js";import{e as I}from"./chunk-F3TINEFX.js";var U={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},M=Object.freeze(U),r={POINTS:c.POINTS,LINES:c.LINES,LINE_LOOP:c.LINE_LOOP,LINE_STRIP:c.LINE_STRIP,TRIANGLES:c.TRIANGLES,TRIANGLE_STRIP:c.TRIANGLE_STRIP,TRIANGLE_FAN:c.TRIANGLE_FAN,isLines:function(t){return t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP},isTriangles:function(t){return t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN},validate:function(t){return t===r.POINTS||t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP||t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN}},F=Object.freeze(r);function _(t){t=s(t,s.EMPTY_OBJECT),w.typeOf.object("options.attributes",t.attributes),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=s(t.primitiveType,F.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=s(t.geometryType,M.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}_.computeNumberOfVertices=function(t){w.typeOf.object("geometry",t);let e=-1;for(let r in t.attributes)if(t.attributes.hasOwnProperty(r)&&I(t.attributes[r])&&I(t.attributes[r].values)){let n=t.attributes[r],i=n.values.length/n.componentsPerAttribute;if(e!==i&&-1!==e)throw new N("All attribute lists must have the same number of attributes.");e=i}return e};var W=new h,H=new A,V=new l,Z=[new h,new h,new h],K=[new a,new a,new a],$=[new a,new a,new a],tt=new A,et=new O,rt=new l,nt=new L;_._textureCoordinateRotationPoints=function(t,e,r,n){let i,o=R.center(n,W),s=h.toCartesian(o,r,H),u=G.eastNorthUpToFixedFrame(s,r,V),I=l.inverse(u,V),N=K,m=Z;m[0].longitude=n.west,m[0].latitude=n.south,m[1].longitude=n.west,m[1].latitude=n.north,m[2].longitude=n.east,m[2].latitude=n.south;let c=tt;for(i=0;i<3;i++)h.toCartesian(m[i],r,c),c=l.multiplyByPointAsVector(I,c,c),N[i].x=c.x,N[i].y=c.y;let p=O.fromAxisAngle(A.UNIT_Z,-e,et),T=y.fromQuaternion(p,rt),b=t.length,E=Number.POSITIVE_INFINITY,f=Number.POSITIVE_INFINITY,P=Number.NEGATIVE_INFINITY,w=Number.NEGATIVE_INFINITY;for(i=0;i4)throw new N("options.componentsPerAttribute must be between 1 and 4.");if(!I(t.values))throw new N("options.values is required.");this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=s(t.normalize,!1),this.values=t.values}var Ot=ot;export{M as a,F as b,Lt as c,Ot as d}; \ No newline at end of file diff --git a/Workers/chunk-2DNLGXTL.js.LICENSE.txt b/Workers/chunk-3G4OCZJT.js.LICENSE.txt similarity index 97% rename from Workers/chunk-2DNLGXTL.js.LICENSE.txt rename to Workers/chunk-3G4OCZJT.js.LICENSE.txt index 7f5f415..521c7d2 100644 --- a/Workers/chunk-2DNLGXTL.js.LICENSE.txt +++ b/Workers/chunk-3G4OCZJT.js.LICENSE.txt @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 + * Version 1.115 * * Copyright 2011-2022 Cesium Contributors * diff --git a/Workers/chunk-BIYNNQRQ.js b/Workers/chunk-4KGDZUZQ.js similarity index 94% rename from Workers/chunk-BIYNNQRQ.js rename to Workers/chunk-4KGDZUZQ.js index bd25af7..3ecc2cc 100644 --- a/Workers/chunk-BIYNNQRQ.js +++ b/Workers/chunk-4KGDZUZQ.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-BIYNNQRQ.js.LICENSE.txt */ -import{e as u}from"./chunk-ZLUSVROX.js";function f(t){let e;this.name="DeveloperError",this.message=t;try{throw new Error}catch(t){e=t.stack}this.stack=e}u(Object.create)&&(f.prototype=Object.create(Error.prototype),f.prototype.constructor=f),f.prototype.toString=function(){let t=`${this.name}: ${this.message}`;return u(this.stack)&&(t+=`\n${this.stack.toString()}`),t},f.throwInstantiationError=function(){throw new f("This function defines an interface and should not be called directly.")};var r=f,n={};function c(t){return`${t} is required, actual value was undefined`}function a(t,e,n){return`Expected ${n} to be typeof ${e}, actual typeof was ${t}`}n.typeOf={},n.defined=function(t,e){if(!u(e))throw new r(c(t))},n.typeOf.func=function(t,e){if("function"!=typeof e)throw new r(a(typeof e,"function",t))},n.typeOf.string=function(t,e){if("string"!=typeof e)throw new r(a(typeof e,"string",t))},n.typeOf.number=function(t,e){if("number"!=typeof e)throw new r(a(typeof e,"number",t))},n.typeOf.number.lessThan=function(t,e,o){if(n.typeOf.number(t,e),e>=o)throw new r(`Expected ${t} to be less than ${o}, actual value was ${e}`)},n.typeOf.number.lessThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e>o)throw new r(`Expected ${t} to be less than or equal to ${o}, actual value was ${e}`)},n.typeOf.number.greaterThan=function(t,e,o){if(n.typeOf.number(t,e),e<=o)throw new r(`Expected ${t} to be greater than ${o}, actual value was ${e}`)},n.typeOf.number.greaterThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e=o)throw new r(`Expected ${t} to be less than ${o}, actual value was ${e}`)},n.typeOf.number.lessThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e>o)throw new r(`Expected ${t} to be less than or equal to ${o}, actual value was ${e}`)},n.typeOf.number.greaterThan=function(t,e,o){if(n.typeOf.number(t,e),e<=o)throw new r(`Expected ${t} to be greater than ${o}, actual value was ${e}`)},n.typeOf.number.greaterThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e10&&2*e>t.length&&(this._array=t.slice(e),e=0),this._offset=e,this._length--,n},R.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},R.prototype.contains=function(t){return-1!==this._array.indexOf(t)},R.prototype.clear=function(){this._array.length=this._offset=this._length=0},R.prototype.sort=function(t){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(t)};var $=R,b={computeHierarchyPackedLength:function(t,e){let n=0,i=[t];for(;i.length>0;){let t=i.pop();if(!x(t))continue;n+=2;let o=t.positions,r=t.holes;if(x(o)&&o.length>0&&(n+=o.length*e.packedLength),x(r)){let t=r.length;for(let e=0;e0;){let t=o.pop();if(!x(t))continue;let r=t.positions,s=t.holes;if(e[n++]=x(r)?r.length:0,e[n++]=x(s)?s.length:0,x(r)){let t=r.length;for(let o=0;o0?new Array(o):void 0;for(let o=0;oI.PI){let t=s;s=a,a=t}return r.longitudea?void 0:n.cartographicToCartesian(r)}function Et(t,e,n,i){if(i===M.RHUMB)return Tt(t,e,n);let o=it.lineSegmentPlane(t,e,ct.ORIGIN_XY_PLANE);return x(o)?n.scaleToGeodeticSurface(o,o):void 0}var vt=new q;function Ct(t,e,n){let i,o,r,s,a,l=[],u=0;for(;ue.cartesianToCartographic(t,vt).longitude;if(0===r)l.push({position:u,type:r,visited:!1,next:s,theta:h(i)});else if(0!==s){if(a=Et(i,o,e,n),++u,!x(a))continue;t.splice(u,0,a),l.push({position:u,type:r,visited:!1,next:s,theta:h(a)})}++u}return l}function lt(t,e,n,i,o,r,s){let a=[],l=r,u=t=>e=>e.position===t,h=[];do{let t=n[l];a.push(t);let e=i.findIndex(u(l)),o=i[e];if(!x(o)){++l;continue}let{visited:c,type:f,next:p}=o;if(o.visited=!0,0===f){if(0===p){let t=i[e-(s?1:-1)];if(t?.position!==l+1){++l;continue}t.visited=!0}if(!c&&s&&p>0||r===l&&!s&&p<0){++l;continue}}if(!(s?f>=0:f<=0)){++l;continue}c||h.push(l);let g=i[e+(s?1:-1)];x(g)?l=g.position:++l}while(l=0&&l!==r&&a.lengtht.theta-e.theta)),o=lt(i,o,r,s,1,0,r[0].z>=0))}return i},b.polygonsFromHierarchy=function(t,e,n,i,o,r){let s=[],a=[],l=new $;l.enqueue(t);let u=x(r);for(;0!==l.length;){let t,h,c=l.dequeue(),f=c.positions,p=c.holes;if(i)for(h=f.length,t=0;t1){for(let e of t)l.enqueue(new rt(e,p));continue}}let y,b=f.slice(),I=x(p)?p.length:0,v=[];for(t=0;t0&&(P=!0,y+=c-1),o0&&l!==_-1&&0!==f&&f!==d-1&&(g[X]=!0),X++;for(p=0,l=1;l<_-2;l++)for(S=l*d,W=(l+1)*d,f=1;f=n&&li?R.TWO_PI-g+i:i-g;let w=Math.ceil(S/n)+1,m=Math.ceil(C/n)+1,O=S/(w-1),d=C/(m-1),X=I.northwest(t,s),Y=I.center(t,F);(0!==a||0!==r)&&(Y.longitudeR.PI_OVER_TWO||l<-R.PI_OVER_TWO||l>R.PI_OVER_TWO)throw new k("Rotated rectangle is invalid. It crosses over either the north or south pole.");V.granYCos=t.granYCos,V.granYSin=t.granYSin,V.granXCos=t.granXCos,V.granXSin=t.granXSin,f.north=h,f.south=l,f.east=i,f.west=g}if(0!==r){a-=r;let t=I.northwest(f,e),n=B(t,a,O,d,Y,w,m);V.stGranYCos=n.granYCos,V.stGranXCos=n.granXCos,V.stGranYSin=n.granYSin,V.stGranXSin=n.granXSin,V.stNwCorner=t,V.stWest=n.west,V.stSouth=n.south}return V};var nt=L;export{nt as a}; \ No newline at end of file diff --git a/Workers/chunk-CVXUMG7J.js.LICENSE.txt b/Workers/chunk-CVXUMG7J.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-CVXUMG7J.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-CXKSXL5C.js.LICENSE.txt b/Workers/chunk-CXKSXL5C.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-CXKSXL5C.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-D6NO7OEC.js.LICENSE.txt b/Workers/chunk-D6NO7OEC.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-D6NO7OEC.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-DCNVB4XC.js.LICENSE.txt b/Workers/chunk-DCNVB4XC.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-DCNVB4XC.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-RN5GA5QZ.js b/Workers/chunk-DNO4OWAM.js similarity index 99% rename from Workers/chunk-RN5GA5QZ.js rename to Workers/chunk-DNO4OWAM.js index aa33ada..3778158 100644 --- a/Workers/chunk-RN5GA5QZ.js +++ b/Workers/chunk-DNO4OWAM.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-RN5GA5QZ.js.LICENSE.txt */ +/*! For license information please see chunk-DNO4OWAM.js.LICENSE.txt */ var E={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,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,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,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,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,COPY_WRITE_BUFFER_BINDING:36663,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,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},_=Object.freeze(E);export{_ as a}; \ No newline at end of file diff --git a/Workers/chunk-DNO4OWAM.js.LICENSE.txt b/Workers/chunk-DNO4OWAM.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-DNO4OWAM.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-E7SCGOHT.js.LICENSE.txt b/Workers/chunk-E7SCGOHT.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-E7SCGOHT.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-2EHQCUJI.js b/Workers/chunk-EKKRJHD7.js similarity index 60% rename from Workers/chunk-2EHQCUJI.js rename to Workers/chunk-EKKRJHD7.js index 2a0a17b..d9d13ff 100644 --- a/Workers/chunk-2EHQCUJI.js +++ b/Workers/chunk-EKKRJHD7.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-2EHQCUJI.js.LICENSE.txt */ -import{a as C}from"./chunk-VZ2RFJ3P.js";import{a as g}from"./chunk-RKPKWH3Z.js";import{b as d}from"./chunk-BIYNNQRQ.js";import{e as i}from"./chunk-ZLUSVROX.js";var u=C.EPSILON10;function x(r,e,s,n){if(d.defined("equalsEpsilon",e),!i(r))return;s=g(s,!1);let t=i(n),o=r.length;if(o<2)return r;let a,h,l,p=r[0],f=0,c=-1;for(a=1;ai&&i/t0?[o/e,r/o]:[r/o,o/e]};var T=nt,ot={};function rt(e,t,r,n){let i,o,a=e,u=t/3,s=r/3,l=n,w=a*s,f=u*l,c=u*u,h=s*s,m=a*s-c,d=a*l-u*s,g=u*l-h,p=4*m*g-d*d;if(p<0){let e,t,r;c*f>=w*h?(e=a,t=m,r=-2*u*m+a*d):(e=l,t=g,r=-l*d+2*s*g);let n=-(r<0?-1:1)*Math.abs(e)*Math.sqrt(-p);o=-r+n;let b=o/2,R=b<0?-Math.pow(-b,1/3):Math.pow(b,1/3),q=o===n?-R:-t/R;return i=t<=0?R+q:-r/(R*R+q*q+t),c*f>=w*h?[(i-u)/a]:[-l/(i+s)]}let b=m,R=-2*u*m+a*d,q=g,O=-l*d+2*s*g,M=Math.sqrt(p),y=Math.sqrt(3)/2,S=Math.abs(Math.atan2(a*M,-R)/3);i=2*Math.sqrt(-b);let P=Math.cos(S);o=i*P;let N=i*(-P/2-y*Math.sin(S)),L=o+N>2*u?o-u:N-u,E=a,I=L/E;S=Math.abs(Math.atan2(l*M,-O)/3),i=2*Math.sqrt(-q),P=Math.cos(S),o=i*P,N=i*(-P/2-y*Math.sin(S));let v=-l,T=o+N<2*s?o+s:N+s,z=v/T,x=-L*T-E*v,C=(s*x-u*(L*v))/(-u*x+s*(E*T));return I<=C?I<=z?C<=z?[I,C,z]:[I,z,C]:[z,I,C]:I<=z?[C,I,z]:C<=z?[C,z,I]:[z,C,I]}ot.computeDiscriminant=function(e,t,r,n){if("number"!=typeof e)throw new w("a is a required number.");if("number"!=typeof t)throw new w("b is a required number.");if("number"!=typeof r)throw new w("c is a required number.");if("number"!=typeof n)throw new w("d is a required number.");let i=t*t,o=r*r;return 18*e*t*r*n+i*o-e*e*27*(n*n)-4*(e*o*r+i*t*n)},ot.computeRealRoots=function(e,t,r,n){if("number"!=typeof e)throw new w("a is a required number.");if("number"!=typeof t)throw new w("b is a required number.");if("number"!=typeof r)throw new w("c is a required number.");if("number"!=typeof n)throw new w("d is a required number.");let i,o;if(0===e)return T.computeRealRoots(t,r,n);if(0===t){if(0===r){if(0===n)return[0,0,0];o=-n/e;let t=o<0?-Math.pow(-o,1/3):Math.pow(o,1/3);return[t,t,t]}return 0===n?(i=T.computeRealRoots(e,0,r),0===i.Length?[0]:[i[0],0,i[1]]):rt(e,0,r,n)}return 0===r?0===n?(o=-t/e,o<0?[o,0,0]:[0,0,o]):rt(e,t,0,n):0===n?(i=T.computeRealRoots(e,t,r),0===i.length?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]):rt(e,t,r,n)};var F=ot,it={};function z(e,t,r,n){let i=e*e,o=t-3*i/8,a=r-t*e/2+i*e/8,u=n-r*e/4+t*i/16-3*i*i/256,s=F.computeRealRoots(1,2*o,o*o-4*u,-a*a);if(s.length>0){let t=-e/4,r=s[s.length-1];if(Math.abs(r)=0&&i>=0){let e=Math.sqrt(n),r=Math.sqrt(i);return[t-r,t-e,t+e,t+r]}if(n>=0&&i<0)return r=Math.sqrt(n),[t-r,t+r];if(n<0&&i>=0)return r=Math.sqrt(i),[t-r,t+r]}return[]}if(r>0){let e=Math.sqrt(r),n=(o+r-a/e)/2,i=(o+r+a/e)/2,u=T.computeRealRoots(1,e,n),s=T.computeRealRoots(1,-e,i);return 0!==u.length?(u[0]+=t,u[1]+=t,0!==s.length?(s[0]+=t,s[1]+=t,u[1]<=s[0]?[u[0],u[1],s[0],s[1]]:s[1]<=u[0]?[s[0],s[1],u[0],u[1]]:u[0]>=s[0]&&u[1]<=s[1]?[s[0],u[0],u[1],s[1]]:s[0]>=u[0]&&s[1]<=u[1]?[u[0],s[0],s[1],u[1]]:u[0]>s[0]&&u[0]0){let o,a,u,l,w,f,c=s[0],h=t-c,m=h*h,d=e/2,g=h/2,p=m-4*n,b=m+4*Math.abs(n),q=i-4*c,O=i+4*Math.abs(c);if(c<0||p*O=y[0]&&M[1]<=y[1]?[y[0],M[0],M[1],y[1]]:y[0]>=M[0]&&y[1]<=M[1]?[M[0],y[0],y[1],M[1]]:M[0]>y[0]&&M[0]b)||(u=o.cross(a,m,ht),l=o.dot(h,u),l<0||s+l>b))return;f=o.dot(d,u)/b}else{if(Math.abs(b)1||(u=o.cross(a,m,ht),l=o.dot(h,u)*e,l<0||s+l>1))return;f=o.dot(d,u)*e}return f},O.rayTriangle=function(e,t,r,n,i,a){let u=O.rayTriangleParametric(e,t,r,n,i);if(g(u)&&!(u<0))return g(a)||(a=new o),o.multiplyByScalar(e.direction,u,a),o.add(e.origin,a,a)};var Ct=new st;function Et(e,t,r,n){let i=t*t-4*e*r;if(i<0)return;if(i>0){let r=1/(2*e),o=Math.sqrt(i),a=(-t+o)*r,u=(-t-o)*r;return ao.distance(e,t)))return g(u)||(u=new o),o.multiplyByScalar(s.direction,l,u),o.add(s.origin,u,u)};var Nt={root0:0,root1:0};function Rt(e,t,r){g(r)||(r=new Z);let n=e.origin,i=e.direction,a=t.center,u=t.radius*t.radius,s=o.subtract(n,a,Mt),l=Et(o.dot(i,i),2*o.dot(i,s),o.magnitudeSquared(s)-u,Nt);if(g(l))return r.start=l.root0,r.stop=l.root1,r}O.raySphere=function(e,t,r){if(!g(e))throw new w("ray is required.");if(!g(t))throw new w("sphere is required.");if(r=Rt(e,t,r),g(r)&&!(r.stop<0))return r.start=Math.max(r.start,0),r};var Lt=new st;O.lineSegmentSphere=function(e,t,r,n){if(!g(e))throw new w("p0 is required.");if(!g(t))throw new w("p1 is required.");if(!g(r))throw new w("sphere is required.");let i=Lt;o.clone(e,i.origin);let a=o.subtract(t,e,i.direction),u=o.magnitude(a);if(o.normalize(a,a),n=Rt(i,r,n),!(!g(n)||n.stop<0||n.start>u))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,u),n};var It=new o,Dt=new o;function Q(e,t,r){let n=e+t;return R.sign(e)!==R.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))0?m.push(new o(n,i*r,i*-d)):0!==d?(m.push(new o(n,i*r,i*-d)),m.push(new o(n,i*r,i*d)),++e):m.push(new o(n,i*r,i*d))}return m}O.rayEllipsoid=function(e,t){if(!g(e))throw new w("ray is required.");if(!g(t))throw new w("ellipsoid is required.");let r,n,i,a,u,s=t.oneOverRadii,l=o.multiplyComponents(s,e.origin,It),f=o.multiplyComponents(s,e.direction,Dt),c=o.magnitudeSquared(l),h=o.dot(l,f);if(c>1){if(h>=0)return;let e=h*h;if(r=c-1,n=o.magnitudeSquared(f),i=n*r,ei){a=h*h-i,u=-h+Math.sqrt(a);let e=u/n,t=r/u;return e=0)return r}let i=g(this.rayEllipsoid(e,t)),a=t.transformPositionToScaledSpace(n,ct),u=o.normalize(a,a),s=o.mostOrthogonalAxis(a,K),l=o.normalize(o.cross(s,u,wt),wt),f=o.normalize(o.cross(u,l,qt),qt),c=Tt;c[0]=u.x,c[1]=u.y,c[2]=u.z,c[3]=l.x,c[4]=l.y,c[5]=l.z,c[6]=f.x,c[7]=f.y,c[8]=f.z;let h=b.transpose(c,zt),m=b.fromScale(t.radii,Wt),d=b.fromScale(t.oneOverRadii,Vt),p=vt;p[0]=0,p[1]=-n.z,p[2]=n.y,p[3]=n.z,p[4]=0,p[5]=-n.x,p[6]=-n.y,p[7]=n.x,p[8]=0;let q,O,M=b.multiply(b.multiply(h,d,gt),p,gt),y=b.multiply(b.multiply(M,m,pt),c,pt),S=b.multiplyByVector(M,r,xt),P=Bt(y,o.negate(S,ct),0,0,1),N=P.length;if(N>0){let e=o.clone(o.ZERO,Ut),a=Number.NEGATIVE_INFINITY;for(let t=0;ta&&(a=u,e=o.clone(q,e))}let u=t.cartesianToCartographic(e,Qt);return a=R.clamp(a,0,1),O=o.magnitude(o.subtract(e,r,K))*Math.sqrt(1-a*a),O=i?-O:O,u.height=O,t.cartographicToCartesian(u,new o)}};var At=new o;O.lineSegmentPlane=function(e,t,r,n){if(!g(e))throw new w("endPoint0 is required.");if(!g(t))throw new w("endPoint1 is required.");if(!g(r))throw new w("plane is required.");g(n)||(n=new o);let i=o.subtract(t,e,At),a=r.normal,u=o.dot(a,i);if(Math.abs(u)1?void 0:(o.multiplyByScalar(i,l,n),o.add(e,n,n),n)},O.trianglePlaneIntersection=function(e,t,r,n){if(!(g(e)&&g(t)&&g(r)&&g(n)))throw new w("p0, p1, p2, and plane are required.");let i,a,u=n.normal,s=n.distance,l=o.dot(u,e)+s<0,f=o.dot(u,t)+s<0,c=o.dot(u,r)+s<0,h=0;if(h+=l?1:0,h+=f?1:0,h+=c?1:0,(1===h||2===h)&&(i=new o,a=new o),1===h){if(l)return O.lineSegmentPlane(e,t,n,i),O.lineSegmentPlane(e,r,n,a),{positions:[e,t,r,i,a],indices:[0,3,4,1,2,4,1,4,3]};if(f)return O.lineSegmentPlane(t,r,n,i),O.lineSegmentPlane(t,e,n,a),{positions:[e,t,r,i,a],indices:[1,3,4,2,0,4,2,4,3]};if(c)return O.lineSegmentPlane(r,e,n,i),O.lineSegmentPlane(r,t,n,a),{positions:[e,t,r,i,a],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===h){if(!l)return O.lineSegmentPlane(t,e,n,i),O.lineSegmentPlane(r,e,n,a),{positions:[e,t,r,i,a],indices:[1,2,4,1,4,3,0,3,4]};if(!f)return O.lineSegmentPlane(r,t,n,i),O.lineSegmentPlane(e,t,n,a),{positions:[e,t,r,i,a],indices:[2,0,4,2,4,3,1,3,4]};if(!c)return O.lineSegmentPlane(e,r,n,i),O.lineSegmentPlane(t,r,n,a),{positions:[e,t,r,i,a],indices:[0,1,4,0,4,3,2,3,4]}}};var qe=O;export{st as a,qe as b}; \ No newline at end of file +/*! For license information please see chunk-EQAHH27B.js.LICENSE.txt */ +import{c as Z}from"./chunk-LYPPBP4Q.js";import{a as o,b as ft,e as b}from"./chunk-PYVDHCDQ.js";import{a as R}from"./chunk-JMWWNZHX.js";import{a as H}from"./chunk-Z3SYNMQT.js";import{a as w,b as et}from"./chunk-4KGDZUZQ.js";import{e as g}from"./chunk-F3TINEFX.js";var nt={};function mt(e,t,r){let n=e+t;return R.sign(e)!==R.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))i&&i/t0?[o/e,r/o]:[r/o,o/e]};var T=nt,ot={};function rt(e,t,r,n){let i,o,a=e,u=t/3,s=r/3,l=n,w=a*s,f=u*l,c=u*u,h=s*s,m=a*s-c,d=a*l-u*s,g=u*l-h,p=4*m*g-d*d;if(p<0){let e,t,r;c*f>=w*h?(e=a,t=m,r=-2*u*m+a*d):(e=l,t=g,r=-l*d+2*s*g);let n=-(r<0?-1:1)*Math.abs(e)*Math.sqrt(-p);o=-r+n;let b=o/2,R=b<0?-Math.pow(-b,1/3):Math.pow(b,1/3),q=o===n?-R:-t/R;return i=t<=0?R+q:-r/(R*R+q*q+t),c*f>=w*h?[(i-u)/a]:[-l/(i+s)]}let b=m,R=-2*u*m+a*d,q=g,O=-l*d+2*s*g,M=Math.sqrt(p),y=Math.sqrt(3)/2,S=Math.abs(Math.atan2(a*M,-R)/3);i=2*Math.sqrt(-b);let P=Math.cos(S);o=i*P;let N=i*(-P/2-y*Math.sin(S)),L=o+N>2*u?o-u:N-u,E=a,I=L/E;S=Math.abs(Math.atan2(l*M,-O)/3),i=2*Math.sqrt(-q),P=Math.cos(S),o=i*P,N=i*(-P/2-y*Math.sin(S));let T=-l,v=o+N<2*s?o+s:N+s,x=T/v,z=-L*v-E*T,C=(s*z-u*(L*T))/(-u*z+s*(E*v));return I<=C?I<=x?C<=x?[I,C,x]:[I,x,C]:[x,I,C]:I<=x?[C,I,x]:C<=x?[C,x,I]:[x,C,I]}ot.computeDiscriminant=function(e,t,r,n){if("number"!=typeof e)throw new w("a is a required number.");if("number"!=typeof t)throw new w("b is a required number.");if("number"!=typeof r)throw new w("c is a required number.");if("number"!=typeof n)throw new w("d is a required number.");let i=t*t,o=r*r;return 18*e*t*r*n+i*o-e*e*27*(n*n)-4*(e*o*r+i*t*n)},ot.computeRealRoots=function(e,t,r,n){if("number"!=typeof e)throw new w("a is a required number.");if("number"!=typeof t)throw new w("b is a required number.");if("number"!=typeof r)throw new w("c is a required number.");if("number"!=typeof n)throw new w("d is a required number.");let i,o;if(0===e)return T.computeRealRoots(t,r,n);if(0===t){if(0===r){if(0===n)return[0,0,0];o=-n/e;let t=o<0?-Math.pow(-o,1/3):Math.pow(o,1/3);return[t,t,t]}return 0===n?(i=T.computeRealRoots(e,0,r),0===i.Length?[0]:[i[0],0,i[1]]):rt(e,0,r,n)}return 0===r?0===n?(o=-t/e,o<0?[o,0,0]:[0,0,o]):rt(e,t,0,n):0===n?(i=T.computeRealRoots(e,t,r),0===i.length?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]):rt(e,t,r,n)};var F=ot,it={};function z(e,t,r,n){let i=e*e,o=t-3*i/8,a=r-t*e/2+i*e/8,u=n-r*e/4+t*i/16-3*i*i/256,s=F.computeRealRoots(1,2*o,o*o-4*u,-a*a);if(s.length>0){let t=-e/4,r=s[s.length-1];if(Math.abs(r)=0&&i>=0){let e=Math.sqrt(n),r=Math.sqrt(i);return[t-r,t-e,t+e,t+r]}if(n>=0&&i<0)return r=Math.sqrt(n),[t-r,t+r];if(n<0&&i>=0)return r=Math.sqrt(i),[t-r,t+r]}return[]}if(r>0){let e=Math.sqrt(r),n=(o+r-a/e)/2,i=(o+r+a/e)/2,u=T.computeRealRoots(1,e,n),s=T.computeRealRoots(1,-e,i);return 0!==u.length?(u[0]+=t,u[1]+=t,0!==s.length?(s[0]+=t,s[1]+=t,u[1]<=s[0]?[u[0],u[1],s[0],s[1]]:s[1]<=u[0]?[s[0],s[1],u[0],u[1]]:u[0]>=s[0]&&u[1]<=s[1]?[s[0],u[0],u[1],s[1]]:s[0]>=u[0]&&s[1]<=u[1]?[u[0],s[0],s[1],u[1]]:u[0]>s[0]&&u[0]0){let o,a,u,l,w,f,c=s[0],h=t-c,m=h*h,d=e/2,g=h/2,p=m-4*n,b=m+4*Math.abs(n),q=i-4*c,O=i+4*Math.abs(c);if(c<0||p*O=y[0]&&M[1]<=y[1]?[y[0],M[0],M[1],y[1]]:y[0]>=M[0]&&y[1]<=M[1]?[M[0],y[0],y[1],M[1]]:M[0]>y[0]&&M[0]b)||(u=o.cross(a,m,ht),l=o.dot(h,u),l<0||s+l>b))return;f=o.dot(d,u)/b}else{if(Math.abs(b)1||(u=o.cross(a,m,ht),l=o.dot(h,u)*e,l<0||s+l>1))return;f=o.dot(d,u)*e}return f},O.rayTriangle=function(e,t,r,n,i,a){let u=O.rayTriangleParametric(e,t,r,n,i);if(g(u)&&!(u<0))return g(a)||(a=new o),o.multiplyByScalar(e.direction,u,a),o.add(e.origin,a,a)};var Et=new st;function Ct(e,t,r,n){let i=t*t-4*e*r;if(i<0)return;if(i>0){let r=1/(2*e),o=Math.sqrt(i),a=(-t+o)*r,u=(-t-o)*r;return ao.distance(e,t)))return g(u)||(u=new o),o.multiplyByScalar(s.direction,l,u),o.add(s.origin,u,u)};var Nt={root0:0,root1:0};function Rt(e,t,r){g(r)||(r=new Z);let n=e.origin,i=e.direction,a=t.center,u=t.radius*t.radius,s=o.subtract(n,a,Mt),l=Ct(o.dot(i,i),2*o.dot(i,s),o.magnitudeSquared(s)-u,Nt);if(g(l))return r.start=l.root0,r.stop=l.root1,r}O.raySphere=function(e,t,r){if(!g(e))throw new w("ray is required.");if(!g(t))throw new w("sphere is required.");if(r=Rt(e,t,r),g(r)&&!(r.stop<0))return r.start=Math.max(r.start,0),r};var Lt=new st;O.lineSegmentSphere=function(e,t,r,n){if(!g(e))throw new w("p0 is required.");if(!g(t))throw new w("p1 is required.");if(!g(r))throw new w("sphere is required.");let i=Lt;o.clone(e,i.origin);let a=o.subtract(t,e,i.direction),u=o.magnitude(a);if(o.normalize(a,a),n=Rt(i,r,n),!(!g(n)||n.stop<0||n.start>u))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,u),n};var It=new o,Dt=new o;function Q(e,t,r){let n=e+t;return R.sign(e)!==R.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))1){if(h>=0)return;let e=h*h;if(r=c-1,n=o.magnitudeSquared(f),i=n*r,ei){a=h*h-i,u=-h+Math.sqrt(a);let e=u/n,t=r/u;return e0?m.push(new o(n,i*r,i*-d)):0!==d?(m.push(new o(n,i*r,i*-d)),m.push(new o(n,i*r,i*d)),++e):m.push(new o(n,i*r,i*d))}return m};var ct=new o,wt=new o,qt=new o,K=new o,Bt=new o,xt=new b,Tt=new b,zt=new b,Wt=new b,Vt=new b,gt=new b,pt=new b,St=new o,vt=new o,Ut=new ft;O.grazingAltitudeLocation=function(e,t){if(!g(e))throw new w("ray is required.");if(!g(t))throw new w("ellipsoid is required.");let r=e.origin,n=e.direction;if(!o.equals(r,o.ZERO)){let e=t.geodeticSurfaceNormal(r,ct);if(o.dot(n,e)>=0)return r}let i=g(this.rayEllipsoid(e,t)),a=t.transformPositionToScaledSpace(n,ct),u=o.normalize(a,a),s=o.mostOrthogonalAxis(a,K),l=o.normalize(o.cross(s,u,wt),wt),f=o.normalize(o.cross(u,l,qt),qt),c=xt;c[0]=u.x,c[1]=u.y,c[2]=u.z,c[3]=l.x,c[4]=l.y,c[5]=l.z,c[6]=f.x,c[7]=f.y,c[8]=f.z;let h=b.transpose(c,Tt),m=b.fromScale(t.radii,zt),d=b.fromScale(t.oneOverRadii,Wt),p=Vt;p[0]=0,p[1]=-n.z,p[2]=n.y,p[3]=n.z,p[4]=0,p[5]=-n.x,p[6]=-n.y,p[7]=n.x,p[8]=0;let q,M,y=b.multiply(b.multiply(h,d,gt),p,gt),S=b.multiply(b.multiply(y,m,pt),c,pt),P=b.multiplyByVector(y,r,Bt),N=O.quadraticVectorExpression(S,o.negate(P,ct),0,0,1),L=N.length;if(L>0){let e=o.clone(o.ZERO,vt),a=Number.NEGATIVE_INFINITY;for(let t=0;ta&&(a=u,e=o.clone(q,e))}let u=t.cartesianToCartographic(e,Ut);return a=R.clamp(a,0,1),M=o.magnitude(o.subtract(e,r,K))*Math.sqrt(1-a*a),M=i?-M:M,u.height=M,t.cartographicToCartesian(u,new o)}};var Qt=new o;O.lineSegmentPlane=function(e,t,r,n){if(!g(e))throw new w("endPoint0 is required.");if(!g(t))throw new w("endPoint1 is required.");if(!g(r))throw new w("plane is required.");g(n)||(n=new o);let i=o.subtract(t,e,Qt),a=r.normal,u=o.dot(a,i);if(Math.abs(u)1?void 0:(o.multiplyByScalar(i,l,n),o.add(e,n,n),n)},O.trianglePlaneIntersection=function(e,t,r,n){if(!(g(e)&&g(t)&&g(r)&&g(n)))throw new w("p0, p1, p2, and plane are required.");let i,a,u=n.normal,s=n.distance,l=o.dot(u,e)+s<0,f=o.dot(u,t)+s<0,c=o.dot(u,r)+s<0,h=0;if(h+=l?1:0,h+=f?1:0,h+=c?1:0,(1===h||2===h)&&(i=new o,a=new o),1===h){if(l)return O.lineSegmentPlane(e,t,n,i),O.lineSegmentPlane(e,r,n,a),{positions:[e,t,r,i,a],indices:[0,3,4,1,2,4,1,4,3]};if(f)return O.lineSegmentPlane(t,r,n,i),O.lineSegmentPlane(t,e,n,a),{positions:[e,t,r,i,a],indices:[1,3,4,2,0,4,2,4,3]};if(c)return O.lineSegmentPlane(r,e,n,i),O.lineSegmentPlane(r,t,n,a),{positions:[e,t,r,i,a],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===h){if(!l)return O.lineSegmentPlane(t,e,n,i),O.lineSegmentPlane(r,e,n,a),{positions:[e,t,r,i,a],indices:[1,2,4,1,4,3,0,3,4]};if(!f)return O.lineSegmentPlane(r,t,n,i),O.lineSegmentPlane(e,t,n,a),{positions:[e,t,r,i,a],indices:[2,0,4,2,4,3,1,3,4]};if(!c)return O.lineSegmentPlane(e,r,n,i),O.lineSegmentPlane(t,r,n,a),{positions:[e,t,r,i,a],indices:[0,1,4,0,4,3,2,3,4]}}};var we=O;export{st as a,we as b}; \ No newline at end of file diff --git a/Workers/chunk-EQAHH27B.js.LICENSE.txt b/Workers/chunk-EQAHH27B.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-EQAHH27B.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-ERAZHWPC.js b/Workers/chunk-ERAZHWPC.js new file mode 100644 index 0000000..12dbd56 --- /dev/null +++ b/Workers/chunk-ERAZHWPC.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-ERAZHWPC.js.LICENSE.txt */ +import{a as _}from"./chunk-GNAFTO6Q.js";import{a as te}from"./chunk-JATOGJGF.js";import{e as Z,h as me}from"./chunk-LYPPBP4Q.js";import{a as fe,b as j}from"./chunk-S7TTFAYA.js";import{a as e,b as ie,c as ee,e as O}from"./chunk-PYVDHCDQ.js";import{a as Q}from"./chunk-JMWWNZHX.js";import{a as se}from"./chunk-Z3SYNMQT.js";import{a as le}from"./chunk-4KGDZUZQ.js";import{e as $}from"./chunk-F3TINEFX.js";var Se={ROUNDED:0,MITERED:1,BEVELED:2},G=Object.freeze(Se),ue={};function P(e,t){if(!$(e))throw new le("identifier is required.");$(ue[e])||(ue[e]=!0,console.warn(se(t,e)))}P.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.",P.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",P.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",P.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var he=P,w=[new e,new e],Te=new e,Be=new e,Ce=new e,ze=new e,Ae=new e,be=new e,Oe=new e,ve=new e,De=new e,I=new e,W=new e,R={},re=new ie;function je(e,t){let n=new Array(e.length);for(let r=0;r=0?-c:c}var Me=new e(-1,0,0),H=new j,Ve=new j,oe=new O,Ne=O.IDENTITY.clone(),Fe=new e,Ge=new fe,de=new e;function v(t,n,r,o,a,l,i,c){let s=Fe,u=Ge;H=me.eastNorthUpToFixedFrame(t,a,H),s=j.multiplyByPointAsVector(H,Me,s),s=e.normalize(s,s);let d=He(s,n,t,a);oe=O.fromRotationZ(d,oe),de.z=l,H=j.multiplyTransformation(H,j.fromRotationTranslation(oe,de,Ve),H);let w=Ne;w[0]=i;for(let t=0;t0){let r=u?2:1;for(let o=0;o=0};var qe=new e,Pe=new e;R.computePositions=function(t,n,r,o,a){let l=o._ellipsoid,i=je(t,l),c=o._granularity,s=o._cornerType,u=a?Le(n,r):ge(n,r),d=a?ge(n,r):void 0,m=r.height/2,h=r.width/2,g=t.length,y=[],f=a?[]:void 0,p=Te,x=Be,P=Ce,E=ze,b=Ae,O=be,j=Oe,T=ve,B=De,A=t[0],z=t[1];E=l.geodeticSurfaceNormal(A,E),p=e.subtract(z,A,p),p=e.normalize(p,p),T=e.cross(E,p,T),T=e.normalize(T,T);let S,D,H=i[0],N=i[1];a&&(f=v(A,T,d,f,l,H+m,1,1)),B=e.clone(A,B),A=z,x=e.negate(p,x);for(let n=1;nh.width?h.width=i:i<0&&(h.width-=i,h.x=e.x),n>h.height?h.height=n:n<0&&(h.height-=n,h.y=e.y),h},o.intersect=function(t,e){m.typeOf.object("left",t),m.typeOf.object("right",e);let h=t.x,i=t.y,n=e.x,o=e.y;return h>n+e.width||h+t.widtho+e.height?d.OUTSIDE:d.INTERSECTING},o.equals=function(t,e){return t===e||f(t)&&f(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},o.prototype.clone=function(t){return o.clone(this,t)},o.prototype.intersect=function(t){return o.intersect(this,t)},o.prototype.equals=function(t){return o.equals(this,t)};var S=o;export{S as a}; \ No newline at end of file +/*! For license information please see chunk-ESZR37FT.js.LICENSE.txt */ +import{a as g,b as d}from"./chunk-LYPPBP4Q.js";import{c as R}from"./chunk-S7TTFAYA.js";import{b as p,c as O}from"./chunk-PYVDHCDQ.js";import{a as w}from"./chunk-Z3SYNMQT.js";import{b as m}from"./chunk-4KGDZUZQ.js";import{e as f}from"./chunk-F3TINEFX.js";function o(t,e,h,i){this.x=w(t,0),this.y=w(e,0),this.width=w(h,0),this.height=w(i,0)}o.packedLength=4,o.pack=function(t,e,h){return m.typeOf.object("value",t),m.defined("array",e),h=w(h,0),e[h++]=t.x,e[h++]=t.y,e[h++]=t.width,e[h]=t.height,e},o.unpack=function(t,e,h){return m.defined("array",t),e=w(e,0),f(h)||(h=new o),h.x=t[e++],h.y=t[e++],h.width=t[e++],h.height=t[e],h},o.fromPoints=function(t,e){if(f(e)||(e=new o),!f(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;let h=t.length,i=t[0].x,n=t[0].y,r=t[0].x,c=t[0].y;for(let e=1;eh.width?h.width=i:i<0&&(h.width-=i,h.x=e.x),n>h.height?h.height=n:n<0&&(h.height-=n,h.y=e.y),h},o.intersect=function(t,e){m.typeOf.object("left",t),m.typeOf.object("right",e);let h=t.x,i=t.y,n=e.x,o=e.y;return h>n+e.width||h+t.widtho+e.height?d.OUTSIDE:d.INTERSECTING},o.equals=function(t,e){return t===e||f(t)&&f(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},o.prototype.clone=function(t){return o.clone(this,t)},o.prototype.intersect=function(t){return o.intersect(this,t)},o.prototype.equals=function(t){return o.equals(this,t)};var S=o;export{S as a}; \ No newline at end of file diff --git a/Workers/chunk-ESZR37FT.js.LICENSE.txt b/Workers/chunk-ESZR37FT.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-ESZR37FT.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-HPQQGA4G.js b/Workers/chunk-EUD5C47L.js similarity index 97% rename from Workers/chunk-HPQQGA4G.js rename to Workers/chunk-EUD5C47L.js index 3d02ce6..662c166 100644 --- a/Workers/chunk-HPQQGA4G.js +++ b/Workers/chunk-EUD5C47L.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-HPQQGA4G.js.LICENSE.txt */ -import{a as fn,c as Tn}from"./chunk-ZLUSVROX.js";var Dn=Tn(((t,e)=>{var r=r||{};r.scope={},r.arrayIteratorImpl=function(t){var e=0;return function(){return e>>0,r.propertyToPolyfillSymbol[_]=r.IS_SYMBOL_NATIVE?r.global.Symbol(_):r.POLYFILL_PREFIX+n+"$"+_),r.defineProperty(o,r.propertyToPolyfillSymbol[_],{configurable:!0,writable:!0,value:e})))},r.polyfill("Promise",(function(t){function e(){this.batch_=null}function n(t){return t instanceof _?t:new _((function(e,r){e(t)}))}if(t&&(!(r.FORCE_POLYFILL_PROMISE||r.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&typeof r.global.PromiseRejectionEvent>"u")||!r.global.Promise||-1===r.global.Promise.toString().indexOf("[native code]")))return t;e.prototype.asyncExecute=function(t){if(null==this.batch_){this.batch_=[];var e=this;this.asyncExecuteFunction((function(){e.executeBatch_()}))}this.batch_.push(t)};var o=r.global.setTimeout;e.prototype.asyncExecuteFunction=function(t){o(t,0)},e.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var t=this.batch_;this.batch_=[];for(var e=0;e"u"||("function"==typeof t?t=new t("unhandledrejection",{cancelable:!0}):"function"==typeof e?t=new e("unhandledrejection",{cancelable:!0}):(t=r.global.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,t),t.promise=this,t.reason=this.result_,n(t))},_.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var t=0;t=_}}),"es6","es3"),r.polyfill("Array.prototype.copyWithin",(function(t){function e(t){return(t=Number(t))===1/0||t===-1/0?t:0|t}return t||function(t,r,n){var o=this.length;if(t=e(t),r=e(r),n=void 0===n?o:e(n),t=0>t?Math.max(o+t,0):Math.min(t,o),r=0>r?Math.max(o+r,0):Math.min(r,o),n=0>n?Math.max(o+n,0):Math.min(n,o),tr;)--n in this?this[--t]=this[n]:delete this[--t];return this}}),"es6","es3"),r.typedArrayCopyWithin=function(t){return t||Array.prototype.copyWithin},r.polyfill("Int8Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Uint8Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Uint8ClampedArray.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Int16Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Uint16Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Int32Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Uint32Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Float32Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Float64Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5");var n,o=(n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,typeof __filename<"u"&&(n=n||__filename),function(t){function e(t,e,r){var n=e+r;for(r=e;t[r]&&!(r>=n);)++r;if(16(o=224==(240&o)?(15&o)<<12|_<<6|i:(7&o)<<18|_<<12|i<<6|63&t[e++])?n+=String.fromCharCode(o):(o-=65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o))}}else n+=String.fromCharCode(o)}return n}function r(t,r){return t?e(et,t,r):""}function o(){var t=$.buffer;C.HEAP8=tt=new Int8Array(t),C.HEAP16=new Int16Array(t),C.HEAP32=rt=new Int32Array(t),C.HEAPU8=et=new Uint8Array(t),C.HEAPU16=new Uint16Array(t),C.HEAPU32=nt=new Uint32Array(t),C.HEAPF32=new Float32Array(t),C.HEAPF64=new Float64Array(t)}function _(t){throw C.onAbort&&C.onAbort(t),J(t="Aborted("+t+")"),_t=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),L(t),t}function i(t){try{if(t==ft&&K)return new Uint8Array(K);if(q)return q(t);throw"both async and sync fetching of the wasm failed"}catch(t){_(t)}}function p(t){for(;0>2]=t},this.get_type=function(){return nt[this.ptr+4>>2]},this.set_destructor=function(t){nt[this.ptr+8>>2]=t},this.get_destructor=function(){return nt[this.ptr+8>>2]},this.set_refcount=function(t){rt[this.ptr>>2]=t},this.set_caught=function(t){tt[this.ptr+12>>0]=t?1:0},this.get_caught=function(){return 0!=tt[this.ptr+12>>0]},this.set_rethrown=function(t){tt[this.ptr+13>>0]=t?1:0},this.get_rethrown=function(){return 0!=tt[this.ptr+13>>0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){rt[this.ptr>>2]+=1},this.release_ref=function(){var t=rt[this.ptr>>2];return rt[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){nt[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return nt[this.ptr+16>>2]},this.get_exception_ptr=function(){if($r(this.get_type()))return nt[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}function c(){function t(){if(!Jr&&(Jr=!0,C.calledRun=!0,!_t)){if(ut=!0,p(at),F(C),C.onRuntimeInitialized&&C.onRuntimeInitialized(),C.postRun)for("function"==typeof C.postRun&&(C.postRun=[C.postRun]);C.postRun.length;)ct.unshift(C.postRun.shift());p(ct)}}if(!(0=n?e++:2047>=n?e+=2:55296<=n&&57343>=n?(e+=4,++r):e+=3}if(r=0,0<(n=(e=Array(e+1)).length)){n=r+n-1;for(var o=0;o=_&&(_=65536+((1023&_)<<10)|1023&t.charCodeAt(++o)),127>=_){if(r>=n)break;e[r++]=_}else{if(2047>=_){if(r+1>=n)break;e[r++]=192|_>>6}else{if(65535>=_){if(r+2>=n)break;e[r++]=224|_>>12}else{if(r+3>=n)break;e[r++]=240|_>>18,e[r++]=128|_>>12&63}e[r++]=128|_>>6&63}e[r++]=128|63&_}}e[r]=0}return t=tn.alloc(e,tt),tn.copy(e,tt,t),t}return t}function f(t){if("object"==typeof t){var e=tn.alloc(t,tt);return tn.copy(t,tt,e),e}return t}function d(){throw"cannot construct a VoidPtr, no constructor in IDL"}function m(){this.ptr=ht(),s(m)[this.ptr]=this}function b(){this.ptr=Dt(),s(b)[this.ptr]=this}function h(){this.ptr=Gt(),s(h)[this.ptr]=this}function A(){this.ptr=vt(),s(A)[this.ptr]=this}function T(){this.ptr=Ct(),s(T)[this.ptr]=this}function D(){this.ptr=kt(),s(D)[this.ptr]=this}function I(){this.ptr=Ht(),s(I)[this.ptr]=this}function E(){this.ptr=Zt(),s(E)[this.ptr]=this}function G(){this.ptr=re(),s(G)[this.ptr]=this}function O(){throw"cannot construct a Status, no constructor in IDL"}function v(){this.ptr=ae(),s(v)[this.ptr]=this}function j(){this.ptr=ye(),s(j)[this.ptr]=this}function P(){this.ptr=me(),s(P)[this.ptr]=this}function R(){this.ptr=Te(),s(R)[this.ptr]=this}function S(){this.ptr=Ge(),s(S)[this.ptr]=this}function N(){this.ptr=Pe(),s(N)[this.ptr]=this}function M(){this.ptr=Me(),s(M)[this.ptr]=this}function U(){this.ptr=Le(),s(U)[this.ptr]=this}function g(){this.ptr=xe(),s(g)[this.ptr]=this}var F,L,C=typeof(t=void 0===t?{}:t)<"u"?t:{};C.ready=new Promise((function(t,e){F=t,L=e}));var w=!1,z=!1;C.onRuntimeInitialized=function(){w=!0,z&&"function"==typeof C.onModuleLoaded&&C.onModuleLoaded(C)},C.onModuleParsed=function(){z=!0,w&&"function"==typeof C.onModuleLoaded&&C.onModuleLoaded(C)},C.isVersionSupported=function(t){return"string"==typeof t&&!(2>(t=t.split(".")).length||3=t[1]||!(0!=t[0]||10>>=0))return!1;for(var r=1;4>=r;r*=2){var n=e*(1+.2/r);n=Math.min(n,t+100663296);var _=Math;n=Math.max(t,n),_=_.min.call(_,2147483648,n+(65536-n%65536)%65536);t:{n=$.buffer;try{$.grow(_-n.byteLength+65535>>>16),o();var i=1;break t}catch{}i=void 0}if(i)return!0}return!1},f:function(t){return 52},d:function(t,e,r,n,o){return 70},c:function(t,r,n,o){for(var _=0,i=0;i>2],a=nt[r+4>>2];r+=8;for(var c=0;c>2]=_,0}};!function(){function t(t,e){C.asm=t.exports,$=C.asm.h,o(),at.unshift(C.asm.i),st--,C.monitorRunDependencies&&C.monitorRunDependencies(st),0==st&&(null!==yt&&(clearInterval(yt),yt=null),lt&&(t=lt,lt=null,t()))}function e(e){t(e.instance)}function r(t){return function(){if(!K&&(B||W)){if("function"==typeof fetch&&!ft.startsWith("file://"))return fetch(ft,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+ft+"'";return t.arrayBuffer()})).catch((function(){return i(ft)}));if(X)return new Promise((function(t,e){X(ft,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return i(ft)}))}().then((function(t){return WebAssembly.instantiate(t,n)})).then((function(t){return t})).then(t,(function(t){J("failed to asynchronously prepare wasm: "+t),_(t)}))}var n={a:mt};if(st++,C.monitorRunDependencies&&C.monitorRunDependencies(st),C.instantiateWasm)try{return C.instantiateWasm(n,t)}catch(t){J("Module.instantiateWasm callback failed with error: "+t),L(t)}(K||"function"!=typeof WebAssembly.instantiateStreaming||ft.startsWith("data:application/octet-stream;base64,")||ft.startsWith("file://")||k||"function"!=typeof fetch?r(e):fetch(ft,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,n).then(e,(function(t){return J("wasm streaming compile failed: "+t),J("falling back to ArrayBuffer instantiation"),r(e)}))}))).catch(L)}();var bt=C._emscripten_bind_VoidPtr___destroy___0=function(){return(bt=C._emscripten_bind_VoidPtr___destroy___0=C.asm.k).apply(null,arguments)},ht=C._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(ht=C._emscripten_bind_DecoderBuffer_DecoderBuffer_0=C.asm.l).apply(null,arguments)},At=C._emscripten_bind_DecoderBuffer_Init_2=function(){return(At=C._emscripten_bind_DecoderBuffer_Init_2=C.asm.m).apply(null,arguments)},Tt=C._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Tt=C._emscripten_bind_DecoderBuffer___destroy___0=C.asm.n).apply(null,arguments)},Dt=C._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Dt=C._emscripten_bind_AttributeTransformData_AttributeTransformData_0=C.asm.o).apply(null,arguments)},It=C._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(It=C._emscripten_bind_AttributeTransformData_transform_type_0=C.asm.p).apply(null,arguments)},Et=C._emscripten_bind_AttributeTransformData___destroy___0=function(){return(Et=C._emscripten_bind_AttributeTransformData___destroy___0=C.asm.q).apply(null,arguments)},Gt=C._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Gt=C._emscripten_bind_GeometryAttribute_GeometryAttribute_0=C.asm.r).apply(null,arguments)},Ot=C._emscripten_bind_GeometryAttribute___destroy___0=function(){return(Ot=C._emscripten_bind_GeometryAttribute___destroy___0=C.asm.s).apply(null,arguments)},vt=C._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(vt=C._emscripten_bind_PointAttribute_PointAttribute_0=C.asm.t).apply(null,arguments)},jt=C._emscripten_bind_PointAttribute_size_0=function(){return(jt=C._emscripten_bind_PointAttribute_size_0=C.asm.u).apply(null,arguments)},Pt=C._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(Pt=C._emscripten_bind_PointAttribute_GetAttributeTransformData_0=C.asm.v).apply(null,arguments)},Rt=C._emscripten_bind_PointAttribute_attribute_type_0=function(){return(Rt=C._emscripten_bind_PointAttribute_attribute_type_0=C.asm.w).apply(null,arguments)},St=C._emscripten_bind_PointAttribute_data_type_0=function(){return(St=C._emscripten_bind_PointAttribute_data_type_0=C.asm.x).apply(null,arguments)},Nt=C._emscripten_bind_PointAttribute_num_components_0=function(){return(Nt=C._emscripten_bind_PointAttribute_num_components_0=C.asm.y).apply(null,arguments)},Mt=C._emscripten_bind_PointAttribute_normalized_0=function(){return(Mt=C._emscripten_bind_PointAttribute_normalized_0=C.asm.z).apply(null,arguments)},Ut=C._emscripten_bind_PointAttribute_byte_stride_0=function(){return(Ut=C._emscripten_bind_PointAttribute_byte_stride_0=C.asm.A).apply(null,arguments)},gt=C._emscripten_bind_PointAttribute_byte_offset_0=function(){return(gt=C._emscripten_bind_PointAttribute_byte_offset_0=C.asm.B).apply(null,arguments)},Ft=C._emscripten_bind_PointAttribute_unique_id_0=function(){return(Ft=C._emscripten_bind_PointAttribute_unique_id_0=C.asm.C).apply(null,arguments)},Lt=C._emscripten_bind_PointAttribute___destroy___0=function(){return(Lt=C._emscripten_bind_PointAttribute___destroy___0=C.asm.D).apply(null,arguments)},Ct=C._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Ct=C._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=C.asm.E).apply(null,arguments)},wt=C._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return(wt=C._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=C.asm.F).apply(null,arguments)},zt=C._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(zt=C._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=C.asm.G).apply(null,arguments)},Vt=C._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(Vt=C._emscripten_bind_AttributeQuantizationTransform_min_value_1=C.asm.H).apply(null,arguments)},Bt=C._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(Bt=C._emscripten_bind_AttributeQuantizationTransform_range_0=C.asm.I).apply(null,arguments)},Wt=C._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(Wt=C._emscripten_bind_AttributeQuantizationTransform___destroy___0=C.asm.J).apply(null,arguments)},kt=C._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(kt=C._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=C.asm.K).apply(null,arguments)},Qt=C._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(Qt=C._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=C.asm.L).apply(null,arguments)},xt=C._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(xt=C._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=C.asm.M).apply(null,arguments)},Yt=C._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(Yt=C._emscripten_bind_AttributeOctahedronTransform___destroy___0=C.asm.N).apply(null,arguments)},Ht=C._emscripten_bind_PointCloud_PointCloud_0=function(){return(Ht=C._emscripten_bind_PointCloud_PointCloud_0=C.asm.O).apply(null,arguments)},qt=C._emscripten_bind_PointCloud_num_attributes_0=function(){return(qt=C._emscripten_bind_PointCloud_num_attributes_0=C.asm.P).apply(null,arguments)},Xt=C._emscripten_bind_PointCloud_num_points_0=function(){return(Xt=C._emscripten_bind_PointCloud_num_points_0=C.asm.Q).apply(null,arguments)},Kt=C._emscripten_bind_PointCloud___destroy___0=function(){return(Kt=C._emscripten_bind_PointCloud___destroy___0=C.asm.R).apply(null,arguments)},Zt=C._emscripten_bind_Mesh_Mesh_0=function(){return(Zt=C._emscripten_bind_Mesh_Mesh_0=C.asm.S).apply(null,arguments)},Jt=C._emscripten_bind_Mesh_num_faces_0=function(){return(Jt=C._emscripten_bind_Mesh_num_faces_0=C.asm.T).apply(null,arguments)},$t=C._emscripten_bind_Mesh_num_attributes_0=function(){return($t=C._emscripten_bind_Mesh_num_attributes_0=C.asm.U).apply(null,arguments)},te=C._emscripten_bind_Mesh_num_points_0=function(){return(te=C._emscripten_bind_Mesh_num_points_0=C.asm.V).apply(null,arguments)},ee=C._emscripten_bind_Mesh___destroy___0=function(){return(ee=C._emscripten_bind_Mesh___destroy___0=C.asm.W).apply(null,arguments)},re=C._emscripten_bind_Metadata_Metadata_0=function(){return(re=C._emscripten_bind_Metadata_Metadata_0=C.asm.X).apply(null,arguments)},ne=C._emscripten_bind_Metadata___destroy___0=function(){return(ne=C._emscripten_bind_Metadata___destroy___0=C.asm.Y).apply(null,arguments)},oe=C._emscripten_bind_Status_code_0=function(){return(oe=C._emscripten_bind_Status_code_0=C.asm.Z).apply(null,arguments)},_e=C._emscripten_bind_Status_ok_0=function(){return(_e=C._emscripten_bind_Status_ok_0=C.asm._).apply(null,arguments)},ie=C._emscripten_bind_Status_error_msg_0=function(){return(ie=C._emscripten_bind_Status_error_msg_0=C.asm.$).apply(null,arguments)},pe=C._emscripten_bind_Status___destroy___0=function(){return(pe=C._emscripten_bind_Status___destroy___0=C.asm.aa).apply(null,arguments)},ae=C._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(ae=C._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=C.asm.ba).apply(null,arguments)},ce=C._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(ce=C._emscripten_bind_DracoFloat32Array_GetValue_1=C.asm.ca).apply(null,arguments)},ue=C._emscripten_bind_DracoFloat32Array_size_0=function(){return(ue=C._emscripten_bind_DracoFloat32Array_size_0=C.asm.da).apply(null,arguments)},se=C._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(se=C._emscripten_bind_DracoFloat32Array___destroy___0=C.asm.ea).apply(null,arguments)},ye=C._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(ye=C._emscripten_bind_DracoInt8Array_DracoInt8Array_0=C.asm.fa).apply(null,arguments)},le=C._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(le=C._emscripten_bind_DracoInt8Array_GetValue_1=C.asm.ga).apply(null,arguments)},fe=C._emscripten_bind_DracoInt8Array_size_0=function(){return(fe=C._emscripten_bind_DracoInt8Array_size_0=C.asm.ha).apply(null,arguments)},de=C._emscripten_bind_DracoInt8Array___destroy___0=function(){return(de=C._emscripten_bind_DracoInt8Array___destroy___0=C.asm.ia).apply(null,arguments)},me=C._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(me=C._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=C.asm.ja).apply(null,arguments)},be=C._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(be=C._emscripten_bind_DracoUInt8Array_GetValue_1=C.asm.ka).apply(null,arguments)},he=C._emscripten_bind_DracoUInt8Array_size_0=function(){return(he=C._emscripten_bind_DracoUInt8Array_size_0=C.asm.la).apply(null,arguments)},Ae=C._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ae=C._emscripten_bind_DracoUInt8Array___destroy___0=C.asm.ma).apply(null,arguments)},Te=C._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Te=C._emscripten_bind_DracoInt16Array_DracoInt16Array_0=C.asm.na).apply(null,arguments)},De=C._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(De=C._emscripten_bind_DracoInt16Array_GetValue_1=C.asm.oa).apply(null,arguments)},Ie=C._emscripten_bind_DracoInt16Array_size_0=function(){return(Ie=C._emscripten_bind_DracoInt16Array_size_0=C.asm.pa).apply(null,arguments)},Ee=C._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Ee=C._emscripten_bind_DracoInt16Array___destroy___0=C.asm.qa).apply(null,arguments)},Ge=C._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Ge=C._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=C.asm.ra).apply(null,arguments)},Oe=C._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Oe=C._emscripten_bind_DracoUInt16Array_GetValue_1=C.asm.sa).apply(null,arguments)},ve=C._emscripten_bind_DracoUInt16Array_size_0=function(){return(ve=C._emscripten_bind_DracoUInt16Array_size_0=C.asm.ta).apply(null,arguments)},je=C._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(je=C._emscripten_bind_DracoUInt16Array___destroy___0=C.asm.ua).apply(null,arguments)},Pe=C._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(Pe=C._emscripten_bind_DracoInt32Array_DracoInt32Array_0=C.asm.va).apply(null,arguments)},Re=C._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Re=C._emscripten_bind_DracoInt32Array_GetValue_1=C.asm.wa).apply(null,arguments)},Se=C._emscripten_bind_DracoInt32Array_size_0=function(){return(Se=C._emscripten_bind_DracoInt32Array_size_0=C.asm.xa).apply(null,arguments)},Ne=C._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Ne=C._emscripten_bind_DracoInt32Array___destroy___0=C.asm.ya).apply(null,arguments)},Me=C._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Me=C._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=C.asm.za).apply(null,arguments)},Ue=C._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(Ue=C._emscripten_bind_DracoUInt32Array_GetValue_1=C.asm.Aa).apply(null,arguments)},ge=C._emscripten_bind_DracoUInt32Array_size_0=function(){return(ge=C._emscripten_bind_DracoUInt32Array_size_0=C.asm.Ba).apply(null,arguments)},Fe=C._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(Fe=C._emscripten_bind_DracoUInt32Array___destroy___0=C.asm.Ca).apply(null,arguments)},Le=C._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Le=C._emscripten_bind_MetadataQuerier_MetadataQuerier_0=C.asm.Da).apply(null,arguments)},Ce=C._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(Ce=C._emscripten_bind_MetadataQuerier_HasEntry_2=C.asm.Ea).apply(null,arguments)},we=C._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(we=C._emscripten_bind_MetadataQuerier_GetIntEntry_2=C.asm.Fa).apply(null,arguments)},ze=C._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(ze=C._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=C.asm.Ga).apply(null,arguments)},Ve=C._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(Ve=C._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=C.asm.Ha).apply(null,arguments)},Be=C._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(Be=C._emscripten_bind_MetadataQuerier_GetStringEntry_2=C.asm.Ia).apply(null,arguments)},We=C._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(We=C._emscripten_bind_MetadataQuerier_NumEntries_1=C.asm.Ja).apply(null,arguments)},ke=C._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(ke=C._emscripten_bind_MetadataQuerier_GetEntryName_2=C.asm.Ka).apply(null,arguments)},Qe=C._emscripten_bind_MetadataQuerier___destroy___0=function(){return(Qe=C._emscripten_bind_MetadataQuerier___destroy___0=C.asm.La).apply(null,arguments)},xe=C._emscripten_bind_Decoder_Decoder_0=function(){return(xe=C._emscripten_bind_Decoder_Decoder_0=C.asm.Ma).apply(null,arguments)},Ye=C._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(Ye=C._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=C.asm.Na).apply(null,arguments)},He=C._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(He=C._emscripten_bind_Decoder_DecodeArrayToMesh_3=C.asm.Oa).apply(null,arguments)},qe=C._emscripten_bind_Decoder_GetAttributeId_2=function(){return(qe=C._emscripten_bind_Decoder_GetAttributeId_2=C.asm.Pa).apply(null,arguments)},Xe=C._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(Xe=C._emscripten_bind_Decoder_GetAttributeIdByName_2=C.asm.Qa).apply(null,arguments)},Ke=C._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(Ke=C._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=C.asm.Ra).apply(null,arguments)},Ze=C._emscripten_bind_Decoder_GetAttribute_2=function(){return(Ze=C._emscripten_bind_Decoder_GetAttribute_2=C.asm.Sa).apply(null,arguments)},Je=C._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(Je=C._emscripten_bind_Decoder_GetAttributeByUniqueId_2=C.asm.Ta).apply(null,arguments)},$e=C._emscripten_bind_Decoder_GetMetadata_1=function(){return($e=C._emscripten_bind_Decoder_GetMetadata_1=C.asm.Ua).apply(null,arguments)},tr=C._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(tr=C._emscripten_bind_Decoder_GetAttributeMetadata_2=C.asm.Va).apply(null,arguments)},er=C._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(er=C._emscripten_bind_Decoder_GetFaceFromMesh_3=C.asm.Wa).apply(null,arguments)},rr=C._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(rr=C._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=C.asm.Xa).apply(null,arguments)},nr=C._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(nr=C._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=C.asm.Ya).apply(null,arguments)},or=C._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(or=C._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=C.asm.Za).apply(null,arguments)},_r=C._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(_r=C._emscripten_bind_Decoder_GetAttributeFloat_3=C.asm._a).apply(null,arguments)},ir=C._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(ir=C._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=C.asm.$a).apply(null,arguments)},pr=C._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(pr=C._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=C.asm.ab).apply(null,arguments)},ar=C._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(ar=C._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=C.asm.bb).apply(null,arguments)},cr=C._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(cr=C._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=C.asm.cb).apply(null,arguments)},ur=C._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(ur=C._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=C.asm.db).apply(null,arguments)},sr=C._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(sr=C._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=C.asm.eb).apply(null,arguments)},yr=C._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(yr=C._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=C.asm.fb).apply(null,arguments)},lr=C._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(lr=C._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=C.asm.gb).apply(null,arguments)},fr=C._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(fr=C._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=C.asm.hb).apply(null,arguments)},dr=C._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(dr=C._emscripten_bind_Decoder_SkipAttributeTransform_1=C.asm.ib).apply(null,arguments)},mr=C._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(mr=C._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=C.asm.jb).apply(null,arguments)},br=C._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(br=C._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=C.asm.kb).apply(null,arguments)},hr=C._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(hr=C._emscripten_bind_Decoder_DecodeBufferToMesh_2=C.asm.lb).apply(null,arguments)},Ar=C._emscripten_bind_Decoder___destroy___0=function(){return(Ar=C._emscripten_bind_Decoder___destroy___0=C.asm.mb).apply(null,arguments)},Tr=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Tr=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=C.asm.nb).apply(null,arguments)},Dr=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Dr=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=C.asm.ob).apply(null,arguments)},Ir=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Ir=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=C.asm.pb).apply(null,arguments)},Er=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Er=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=C.asm.qb).apply(null,arguments)},Gr=C._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Gr=C._emscripten_enum_draco_GeometryAttribute_Type_INVALID=C.asm.rb).apply(null,arguments)},Or=C._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Or=C._emscripten_enum_draco_GeometryAttribute_Type_POSITION=C.asm.sb).apply(null,arguments)},vr=C._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(vr=C._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=C.asm.tb).apply(null,arguments)},jr=C._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(jr=C._emscripten_enum_draco_GeometryAttribute_Type_COLOR=C.asm.ub).apply(null,arguments)},Pr=C._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Pr=C._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=C.asm.vb).apply(null,arguments)},Rr=C._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Rr=C._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=C.asm.wb).apply(null,arguments)},Sr=C._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Sr=C._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=C.asm.xb).apply(null,arguments)},Nr=C._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Nr=C._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=C.asm.yb).apply(null,arguments)},Mr=C._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Mr=C._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=C.asm.zb).apply(null,arguments)},Ur=C._emscripten_enum_draco_DataType_DT_INVALID=function(){return(Ur=C._emscripten_enum_draco_DataType_DT_INVALID=C.asm.Ab).apply(null,arguments)},gr=C._emscripten_enum_draco_DataType_DT_INT8=function(){return(gr=C._emscripten_enum_draco_DataType_DT_INT8=C.asm.Bb).apply(null,arguments)},Fr=C._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Fr=C._emscripten_enum_draco_DataType_DT_UINT8=C.asm.Cb).apply(null,arguments)},Lr=C._emscripten_enum_draco_DataType_DT_INT16=function(){return(Lr=C._emscripten_enum_draco_DataType_DT_INT16=C.asm.Db).apply(null,arguments)},Cr=C._emscripten_enum_draco_DataType_DT_UINT16=function(){return(Cr=C._emscripten_enum_draco_DataType_DT_UINT16=C.asm.Eb).apply(null,arguments)},wr=C._emscripten_enum_draco_DataType_DT_INT32=function(){return(wr=C._emscripten_enum_draco_DataType_DT_INT32=C.asm.Fb).apply(null,arguments)},zr=C._emscripten_enum_draco_DataType_DT_UINT32=function(){return(zr=C._emscripten_enum_draco_DataType_DT_UINT32=C.asm.Gb).apply(null,arguments)},Vr=C._emscripten_enum_draco_DataType_DT_INT64=function(){return(Vr=C._emscripten_enum_draco_DataType_DT_INT64=C.asm.Hb).apply(null,arguments)},Br=C._emscripten_enum_draco_DataType_DT_UINT64=function(){return(Br=C._emscripten_enum_draco_DataType_DT_UINT64=C.asm.Ib).apply(null,arguments)},Wr=C._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(Wr=C._emscripten_enum_draco_DataType_DT_FLOAT32=C.asm.Jb).apply(null,arguments)},kr=C._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(kr=C._emscripten_enum_draco_DataType_DT_FLOAT64=C.asm.Kb).apply(null,arguments)},Qr=C._emscripten_enum_draco_DataType_DT_BOOL=function(){return(Qr=C._emscripten_enum_draco_DataType_DT_BOOL=C.asm.Lb).apply(null,arguments)},xr=C._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(xr=C._emscripten_enum_draco_DataType_DT_TYPES_COUNT=C.asm.Mb).apply(null,arguments)},Yr=C._emscripten_enum_draco_StatusCode_OK=function(){return(Yr=C._emscripten_enum_draco_StatusCode_OK=C.asm.Nb).apply(null,arguments)},Hr=C._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(Hr=C._emscripten_enum_draco_StatusCode_DRACO_ERROR=C.asm.Ob).apply(null,arguments)},qr=C._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(qr=C._emscripten_enum_draco_StatusCode_IO_ERROR=C.asm.Pb).apply(null,arguments)},Xr=C._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(Xr=C._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=C.asm.Qb).apply(null,arguments)},Kr=C._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(Kr=C._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=C.asm.Rb).apply(null,arguments)},Zr=C._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(Zr=C._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=C.asm.Sb).apply(null,arguments)};C._malloc=function(){return(C._malloc=C.asm.Tb).apply(null,arguments)},C._free=function(){return(C._free=C.asm.Ub).apply(null,arguments)};var Jr,$r=function(){return($r=C.asm.Vb).apply(null,arguments)};if(C.___start_em_js=15856,C.___stop_em_js=15954,lt=function t(){Jr||c(),Jr||(lt=t)},C.preInit)for("function"==typeof C.preInit&&(C.preInit=[C.preInit]);0=tn.size?(0>>=0,e.BYTES_PER_ELEMENT){case 2:r>>>=1;break;case 4:r>>>=2;break;case 8:r>>>=3}for(var n=0;nt.byteLength)return C.INVALID_GEOMETRY_TYPE;switch(t[7]){case 0:return C.POINT_CLOUD;case 1:return C.TRIANGULAR_MESH;default:return C.INVALID_GEOMETRY_TYPE}},t.ready});"object"==typeof t&&"object"==typeof e?e.exports=o:"function"==typeof define&&define.amd?define([],(function(){return o})):"object"==typeof t&&(t.DracoDecoderModule=o)}));export{Dn as a}; \ No newline at end of file +/*! For license information please see chunk-EUD5C47L.js.LICENSE.txt */ +import{a as fn,c as Tn}from"./chunk-F3TINEFX.js";var Dn=Tn(((t,e)=>{var r=r||{};r.scope={},r.arrayIteratorImpl=function(t){var e=0;return function(){return e>>0,r.propertyToPolyfillSymbol[_]=r.IS_SYMBOL_NATIVE?r.global.Symbol(_):r.POLYFILL_PREFIX+n+"$"+_),r.defineProperty(o,r.propertyToPolyfillSymbol[_],{configurable:!0,writable:!0,value:e})))},r.polyfill("Promise",(function(t){function e(){this.batch_=null}function n(t){return t instanceof _?t:new _((function(e,r){e(t)}))}if(t&&(!(r.FORCE_POLYFILL_PROMISE||r.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&typeof r.global.PromiseRejectionEvent>"u")||!r.global.Promise||-1===r.global.Promise.toString().indexOf("[native code]")))return t;e.prototype.asyncExecute=function(t){if(null==this.batch_){this.batch_=[];var e=this;this.asyncExecuteFunction((function(){e.executeBatch_()}))}this.batch_.push(t)};var o=r.global.setTimeout;e.prototype.asyncExecuteFunction=function(t){o(t,0)},e.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var t=this.batch_;this.batch_=[];for(var e=0;e"u"||("function"==typeof t?t=new t("unhandledrejection",{cancelable:!0}):"function"==typeof e?t=new e("unhandledrejection",{cancelable:!0}):(t=r.global.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,t),t.promise=this,t.reason=this.result_,n(t))},_.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var t=0;t=_}}),"es6","es3"),r.polyfill("Array.prototype.copyWithin",(function(t){function e(t){return(t=Number(t))===1/0||t===-1/0?t:0|t}return t||function(t,r,n){var o=this.length;if(t=e(t),r=e(r),n=void 0===n?o:e(n),t=0>t?Math.max(o+t,0):Math.min(t,o),r=0>r?Math.max(o+r,0):Math.min(r,o),n=0>n?Math.max(o+n,0):Math.min(n,o),tr;)--n in this?this[--t]=this[n]:delete this[--t];return this}}),"es6","es3"),r.typedArrayCopyWithin=function(t){return t||Array.prototype.copyWithin},r.polyfill("Int8Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Uint8Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Uint8ClampedArray.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Int16Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Uint16Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Int32Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Uint32Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Float32Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5"),r.polyfill("Float64Array.prototype.copyWithin",r.typedArrayCopyWithin,"es6","es5");var n,o=(n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,typeof __filename<"u"&&(n=n||__filename),function(t){function e(t,e,r){var n=e+r;for(r=e;t[r]&&!(r>=n);)++r;if(16(o=224==(240&o)?(15&o)<<12|_<<6|i:(7&o)<<18|_<<12|i<<6|63&t[e++])?n+=String.fromCharCode(o):(o-=65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o))}}else n+=String.fromCharCode(o)}return n}function r(t,r){return t?e(et,t,r):""}function o(){var t=$.buffer;C.HEAP8=tt=new Int8Array(t),C.HEAP16=new Int16Array(t),C.HEAP32=rt=new Int32Array(t),C.HEAPU8=et=new Uint8Array(t),C.HEAPU16=new Uint16Array(t),C.HEAPU32=nt=new Uint32Array(t),C.HEAPF32=new Float32Array(t),C.HEAPF64=new Float64Array(t)}function _(t){throw C.onAbort&&C.onAbort(t),Z(t="Aborted("+t+")"),_t=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),L(t),t}function i(t){try{if(t==ft&&K)return new Uint8Array(K);if(q)return q(t);throw"both async and sync fetching of the wasm failed"}catch(t){_(t)}}function p(t){for(;0>2]=t},this.get_type=function(){return nt[this.ptr+4>>2]},this.set_destructor=function(t){nt[this.ptr+8>>2]=t},this.get_destructor=function(){return nt[this.ptr+8>>2]},this.set_refcount=function(t){rt[this.ptr>>2]=t},this.set_caught=function(t){tt[this.ptr+12>>0]=t?1:0},this.get_caught=function(){return 0!=tt[this.ptr+12>>0]},this.set_rethrown=function(t){tt[this.ptr+13>>0]=t?1:0},this.get_rethrown=function(){return 0!=tt[this.ptr+13>>0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){rt[this.ptr>>2]+=1},this.release_ref=function(){var t=rt[this.ptr>>2];return rt[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){nt[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return nt[this.ptr+16>>2]},this.get_exception_ptr=function(){if($r(this.get_type()))return nt[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}function c(){function t(){if(!Zr&&(Zr=!0,C.calledRun=!0,!_t)){if(ut=!0,p(at),F(C),C.onRuntimeInitialized&&C.onRuntimeInitialized(),C.postRun)for("function"==typeof C.postRun&&(C.postRun=[C.postRun]);C.postRun.length;)ct.unshift(C.postRun.shift());p(ct)}}if(!(0=n?e++:2047>=n?e+=2:55296<=n&&57343>=n?(e+=4,++r):e+=3}if(r=0,0<(n=(e=Array(e+1)).length)){n=r+n-1;for(var o=0;o=_&&(_=65536+((1023&_)<<10)|1023&t.charCodeAt(++o)),127>=_){if(r>=n)break;e[r++]=_}else{if(2047>=_){if(r+1>=n)break;e[r++]=192|_>>6}else{if(65535>=_){if(r+2>=n)break;e[r++]=224|_>>12}else{if(r+3>=n)break;e[r++]=240|_>>18,e[r++]=128|_>>12&63}e[r++]=128|_>>6&63}e[r++]=128|63&_}}e[r]=0}return t=tn.alloc(e,tt),tn.copy(e,tt,t),t}return t}function f(t){if("object"==typeof t){var e=tn.alloc(t,tt);return tn.copy(t,tt,e),e}return t}function d(){throw"cannot construct a VoidPtr, no constructor in IDL"}function m(){this.ptr=ht(),s(m)[this.ptr]=this}function b(){this.ptr=Dt(),s(b)[this.ptr]=this}function h(){this.ptr=Gt(),s(h)[this.ptr]=this}function A(){this.ptr=vt(),s(A)[this.ptr]=this}function T(){this.ptr=Ct(),s(T)[this.ptr]=this}function D(){this.ptr=kt(),s(D)[this.ptr]=this}function I(){this.ptr=Ht(),s(I)[this.ptr]=this}function E(){this.ptr=Jt(),s(E)[this.ptr]=this}function G(){this.ptr=re(),s(G)[this.ptr]=this}function O(){throw"cannot construct a Status, no constructor in IDL"}function v(){this.ptr=ae(),s(v)[this.ptr]=this}function j(){this.ptr=ye(),s(j)[this.ptr]=this}function P(){this.ptr=me(),s(P)[this.ptr]=this}function R(){this.ptr=Te(),s(R)[this.ptr]=this}function S(){this.ptr=Ge(),s(S)[this.ptr]=this}function N(){this.ptr=Pe(),s(N)[this.ptr]=this}function M(){this.ptr=Me(),s(M)[this.ptr]=this}function U(){this.ptr=Le(),s(U)[this.ptr]=this}function g(){this.ptr=xe(),s(g)[this.ptr]=this}var F,L,C=typeof(t=void 0===t?{}:t)<"u"?t:{};C.ready=new Promise((function(t,e){F=t,L=e}));var w=!1,z=!1;C.onRuntimeInitialized=function(){w=!0,z&&"function"==typeof C.onModuleLoaded&&C.onModuleLoaded(C)},C.onModuleParsed=function(){z=!0,w&&"function"==typeof C.onModuleLoaded&&C.onModuleLoaded(C)},C.isVersionSupported=function(t){return"string"==typeof t&&!(2>(t=t.split(".")).length||3=t[1]||!(0!=t[0]||10>>=0))return!1;for(var r=1;4>=r;r*=2){var n=e*(1+.2/r);n=Math.min(n,t+100663296);var _=Math;n=Math.max(t,n),_=_.min.call(_,2147483648,n+(65536-n%65536)%65536);t:{n=$.buffer;try{$.grow(_-n.byteLength+65535>>>16),o();var i=1;break t}catch{}i=void 0}if(i)return!0}return!1},f:function(t){return 52},d:function(t,e,r,n,o){return 70},c:function(t,r,n,o){for(var _=0,i=0;i>2],a=nt[r+4>>2];r+=8;for(var c=0;c>2]=_,0}};!function(){function t(t,e){C.asm=t.exports,$=C.asm.h,o(),at.unshift(C.asm.i),st--,C.monitorRunDependencies&&C.monitorRunDependencies(st),0==st&&(null!==yt&&(clearInterval(yt),yt=null),lt&&(t=lt,lt=null,t()))}function e(e){t(e.instance)}function r(t){return function(){if(!K&&(B||W)){if("function"==typeof fetch&&!ft.startsWith("file://"))return fetch(ft,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+ft+"'";return t.arrayBuffer()})).catch((function(){return i(ft)}));if(X)return new Promise((function(t,e){X(ft,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return i(ft)}))}().then((function(t){return WebAssembly.instantiate(t,n)})).then((function(t){return t})).then(t,(function(t){Z("failed to asynchronously prepare wasm: "+t),_(t)}))}var n={a:mt};if(st++,C.monitorRunDependencies&&C.monitorRunDependencies(st),C.instantiateWasm)try{return C.instantiateWasm(n,t)}catch(t){Z("Module.instantiateWasm callback failed with error: "+t),L(t)}(K||"function"!=typeof WebAssembly.instantiateStreaming||ft.startsWith("data:application/octet-stream;base64,")||ft.startsWith("file://")||k||"function"!=typeof fetch?r(e):fetch(ft,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,n).then(e,(function(t){return Z("wasm streaming compile failed: "+t),Z("falling back to ArrayBuffer instantiation"),r(e)}))}))).catch(L)}();var bt=C._emscripten_bind_VoidPtr___destroy___0=function(){return(bt=C._emscripten_bind_VoidPtr___destroy___0=C.asm.k).apply(null,arguments)},ht=C._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(ht=C._emscripten_bind_DecoderBuffer_DecoderBuffer_0=C.asm.l).apply(null,arguments)},At=C._emscripten_bind_DecoderBuffer_Init_2=function(){return(At=C._emscripten_bind_DecoderBuffer_Init_2=C.asm.m).apply(null,arguments)},Tt=C._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Tt=C._emscripten_bind_DecoderBuffer___destroy___0=C.asm.n).apply(null,arguments)},Dt=C._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Dt=C._emscripten_bind_AttributeTransformData_AttributeTransformData_0=C.asm.o).apply(null,arguments)},It=C._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(It=C._emscripten_bind_AttributeTransformData_transform_type_0=C.asm.p).apply(null,arguments)},Et=C._emscripten_bind_AttributeTransformData___destroy___0=function(){return(Et=C._emscripten_bind_AttributeTransformData___destroy___0=C.asm.q).apply(null,arguments)},Gt=C._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Gt=C._emscripten_bind_GeometryAttribute_GeometryAttribute_0=C.asm.r).apply(null,arguments)},Ot=C._emscripten_bind_GeometryAttribute___destroy___0=function(){return(Ot=C._emscripten_bind_GeometryAttribute___destroy___0=C.asm.s).apply(null,arguments)},vt=C._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(vt=C._emscripten_bind_PointAttribute_PointAttribute_0=C.asm.t).apply(null,arguments)},jt=C._emscripten_bind_PointAttribute_size_0=function(){return(jt=C._emscripten_bind_PointAttribute_size_0=C.asm.u).apply(null,arguments)},Pt=C._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(Pt=C._emscripten_bind_PointAttribute_GetAttributeTransformData_0=C.asm.v).apply(null,arguments)},Rt=C._emscripten_bind_PointAttribute_attribute_type_0=function(){return(Rt=C._emscripten_bind_PointAttribute_attribute_type_0=C.asm.w).apply(null,arguments)},St=C._emscripten_bind_PointAttribute_data_type_0=function(){return(St=C._emscripten_bind_PointAttribute_data_type_0=C.asm.x).apply(null,arguments)},Nt=C._emscripten_bind_PointAttribute_num_components_0=function(){return(Nt=C._emscripten_bind_PointAttribute_num_components_0=C.asm.y).apply(null,arguments)},Mt=C._emscripten_bind_PointAttribute_normalized_0=function(){return(Mt=C._emscripten_bind_PointAttribute_normalized_0=C.asm.z).apply(null,arguments)},Ut=C._emscripten_bind_PointAttribute_byte_stride_0=function(){return(Ut=C._emscripten_bind_PointAttribute_byte_stride_0=C.asm.A).apply(null,arguments)},gt=C._emscripten_bind_PointAttribute_byte_offset_0=function(){return(gt=C._emscripten_bind_PointAttribute_byte_offset_0=C.asm.B).apply(null,arguments)},Ft=C._emscripten_bind_PointAttribute_unique_id_0=function(){return(Ft=C._emscripten_bind_PointAttribute_unique_id_0=C.asm.C).apply(null,arguments)},Lt=C._emscripten_bind_PointAttribute___destroy___0=function(){return(Lt=C._emscripten_bind_PointAttribute___destroy___0=C.asm.D).apply(null,arguments)},Ct=C._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Ct=C._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=C.asm.E).apply(null,arguments)},wt=C._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return(wt=C._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=C.asm.F).apply(null,arguments)},zt=C._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(zt=C._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=C.asm.G).apply(null,arguments)},Vt=C._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(Vt=C._emscripten_bind_AttributeQuantizationTransform_min_value_1=C.asm.H).apply(null,arguments)},Bt=C._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(Bt=C._emscripten_bind_AttributeQuantizationTransform_range_0=C.asm.I).apply(null,arguments)},Wt=C._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(Wt=C._emscripten_bind_AttributeQuantizationTransform___destroy___0=C.asm.J).apply(null,arguments)},kt=C._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(kt=C._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=C.asm.K).apply(null,arguments)},Qt=C._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(Qt=C._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=C.asm.L).apply(null,arguments)},xt=C._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(xt=C._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=C.asm.M).apply(null,arguments)},Yt=C._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(Yt=C._emscripten_bind_AttributeOctahedronTransform___destroy___0=C.asm.N).apply(null,arguments)},Ht=C._emscripten_bind_PointCloud_PointCloud_0=function(){return(Ht=C._emscripten_bind_PointCloud_PointCloud_0=C.asm.O).apply(null,arguments)},qt=C._emscripten_bind_PointCloud_num_attributes_0=function(){return(qt=C._emscripten_bind_PointCloud_num_attributes_0=C.asm.P).apply(null,arguments)},Xt=C._emscripten_bind_PointCloud_num_points_0=function(){return(Xt=C._emscripten_bind_PointCloud_num_points_0=C.asm.Q).apply(null,arguments)},Kt=C._emscripten_bind_PointCloud___destroy___0=function(){return(Kt=C._emscripten_bind_PointCloud___destroy___0=C.asm.R).apply(null,arguments)},Jt=C._emscripten_bind_Mesh_Mesh_0=function(){return(Jt=C._emscripten_bind_Mesh_Mesh_0=C.asm.S).apply(null,arguments)},Zt=C._emscripten_bind_Mesh_num_faces_0=function(){return(Zt=C._emscripten_bind_Mesh_num_faces_0=C.asm.T).apply(null,arguments)},$t=C._emscripten_bind_Mesh_num_attributes_0=function(){return($t=C._emscripten_bind_Mesh_num_attributes_0=C.asm.U).apply(null,arguments)},te=C._emscripten_bind_Mesh_num_points_0=function(){return(te=C._emscripten_bind_Mesh_num_points_0=C.asm.V).apply(null,arguments)},ee=C._emscripten_bind_Mesh___destroy___0=function(){return(ee=C._emscripten_bind_Mesh___destroy___0=C.asm.W).apply(null,arguments)},re=C._emscripten_bind_Metadata_Metadata_0=function(){return(re=C._emscripten_bind_Metadata_Metadata_0=C.asm.X).apply(null,arguments)},ne=C._emscripten_bind_Metadata___destroy___0=function(){return(ne=C._emscripten_bind_Metadata___destroy___0=C.asm.Y).apply(null,arguments)},oe=C._emscripten_bind_Status_code_0=function(){return(oe=C._emscripten_bind_Status_code_0=C.asm.Z).apply(null,arguments)},_e=C._emscripten_bind_Status_ok_0=function(){return(_e=C._emscripten_bind_Status_ok_0=C.asm._).apply(null,arguments)},ie=C._emscripten_bind_Status_error_msg_0=function(){return(ie=C._emscripten_bind_Status_error_msg_0=C.asm.$).apply(null,arguments)},pe=C._emscripten_bind_Status___destroy___0=function(){return(pe=C._emscripten_bind_Status___destroy___0=C.asm.aa).apply(null,arguments)},ae=C._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(ae=C._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=C.asm.ba).apply(null,arguments)},ce=C._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(ce=C._emscripten_bind_DracoFloat32Array_GetValue_1=C.asm.ca).apply(null,arguments)},ue=C._emscripten_bind_DracoFloat32Array_size_0=function(){return(ue=C._emscripten_bind_DracoFloat32Array_size_0=C.asm.da).apply(null,arguments)},se=C._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(se=C._emscripten_bind_DracoFloat32Array___destroy___0=C.asm.ea).apply(null,arguments)},ye=C._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(ye=C._emscripten_bind_DracoInt8Array_DracoInt8Array_0=C.asm.fa).apply(null,arguments)},le=C._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(le=C._emscripten_bind_DracoInt8Array_GetValue_1=C.asm.ga).apply(null,arguments)},fe=C._emscripten_bind_DracoInt8Array_size_0=function(){return(fe=C._emscripten_bind_DracoInt8Array_size_0=C.asm.ha).apply(null,arguments)},de=C._emscripten_bind_DracoInt8Array___destroy___0=function(){return(de=C._emscripten_bind_DracoInt8Array___destroy___0=C.asm.ia).apply(null,arguments)},me=C._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(me=C._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=C.asm.ja).apply(null,arguments)},be=C._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(be=C._emscripten_bind_DracoUInt8Array_GetValue_1=C.asm.ka).apply(null,arguments)},he=C._emscripten_bind_DracoUInt8Array_size_0=function(){return(he=C._emscripten_bind_DracoUInt8Array_size_0=C.asm.la).apply(null,arguments)},Ae=C._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ae=C._emscripten_bind_DracoUInt8Array___destroy___0=C.asm.ma).apply(null,arguments)},Te=C._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Te=C._emscripten_bind_DracoInt16Array_DracoInt16Array_0=C.asm.na).apply(null,arguments)},De=C._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(De=C._emscripten_bind_DracoInt16Array_GetValue_1=C.asm.oa).apply(null,arguments)},Ie=C._emscripten_bind_DracoInt16Array_size_0=function(){return(Ie=C._emscripten_bind_DracoInt16Array_size_0=C.asm.pa).apply(null,arguments)},Ee=C._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Ee=C._emscripten_bind_DracoInt16Array___destroy___0=C.asm.qa).apply(null,arguments)},Ge=C._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Ge=C._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=C.asm.ra).apply(null,arguments)},Oe=C._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Oe=C._emscripten_bind_DracoUInt16Array_GetValue_1=C.asm.sa).apply(null,arguments)},ve=C._emscripten_bind_DracoUInt16Array_size_0=function(){return(ve=C._emscripten_bind_DracoUInt16Array_size_0=C.asm.ta).apply(null,arguments)},je=C._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(je=C._emscripten_bind_DracoUInt16Array___destroy___0=C.asm.ua).apply(null,arguments)},Pe=C._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(Pe=C._emscripten_bind_DracoInt32Array_DracoInt32Array_0=C.asm.va).apply(null,arguments)},Re=C._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Re=C._emscripten_bind_DracoInt32Array_GetValue_1=C.asm.wa).apply(null,arguments)},Se=C._emscripten_bind_DracoInt32Array_size_0=function(){return(Se=C._emscripten_bind_DracoInt32Array_size_0=C.asm.xa).apply(null,arguments)},Ne=C._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Ne=C._emscripten_bind_DracoInt32Array___destroy___0=C.asm.ya).apply(null,arguments)},Me=C._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Me=C._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=C.asm.za).apply(null,arguments)},Ue=C._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(Ue=C._emscripten_bind_DracoUInt32Array_GetValue_1=C.asm.Aa).apply(null,arguments)},ge=C._emscripten_bind_DracoUInt32Array_size_0=function(){return(ge=C._emscripten_bind_DracoUInt32Array_size_0=C.asm.Ba).apply(null,arguments)},Fe=C._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(Fe=C._emscripten_bind_DracoUInt32Array___destroy___0=C.asm.Ca).apply(null,arguments)},Le=C._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Le=C._emscripten_bind_MetadataQuerier_MetadataQuerier_0=C.asm.Da).apply(null,arguments)},Ce=C._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(Ce=C._emscripten_bind_MetadataQuerier_HasEntry_2=C.asm.Ea).apply(null,arguments)},we=C._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(we=C._emscripten_bind_MetadataQuerier_GetIntEntry_2=C.asm.Fa).apply(null,arguments)},ze=C._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(ze=C._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=C.asm.Ga).apply(null,arguments)},Ve=C._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(Ve=C._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=C.asm.Ha).apply(null,arguments)},Be=C._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(Be=C._emscripten_bind_MetadataQuerier_GetStringEntry_2=C.asm.Ia).apply(null,arguments)},We=C._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(We=C._emscripten_bind_MetadataQuerier_NumEntries_1=C.asm.Ja).apply(null,arguments)},ke=C._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(ke=C._emscripten_bind_MetadataQuerier_GetEntryName_2=C.asm.Ka).apply(null,arguments)},Qe=C._emscripten_bind_MetadataQuerier___destroy___0=function(){return(Qe=C._emscripten_bind_MetadataQuerier___destroy___0=C.asm.La).apply(null,arguments)},xe=C._emscripten_bind_Decoder_Decoder_0=function(){return(xe=C._emscripten_bind_Decoder_Decoder_0=C.asm.Ma).apply(null,arguments)},Ye=C._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(Ye=C._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=C.asm.Na).apply(null,arguments)},He=C._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(He=C._emscripten_bind_Decoder_DecodeArrayToMesh_3=C.asm.Oa).apply(null,arguments)},qe=C._emscripten_bind_Decoder_GetAttributeId_2=function(){return(qe=C._emscripten_bind_Decoder_GetAttributeId_2=C.asm.Pa).apply(null,arguments)},Xe=C._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(Xe=C._emscripten_bind_Decoder_GetAttributeIdByName_2=C.asm.Qa).apply(null,arguments)},Ke=C._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(Ke=C._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=C.asm.Ra).apply(null,arguments)},Je=C._emscripten_bind_Decoder_GetAttribute_2=function(){return(Je=C._emscripten_bind_Decoder_GetAttribute_2=C.asm.Sa).apply(null,arguments)},Ze=C._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(Ze=C._emscripten_bind_Decoder_GetAttributeByUniqueId_2=C.asm.Ta).apply(null,arguments)},$e=C._emscripten_bind_Decoder_GetMetadata_1=function(){return($e=C._emscripten_bind_Decoder_GetMetadata_1=C.asm.Ua).apply(null,arguments)},tr=C._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(tr=C._emscripten_bind_Decoder_GetAttributeMetadata_2=C.asm.Va).apply(null,arguments)},er=C._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(er=C._emscripten_bind_Decoder_GetFaceFromMesh_3=C.asm.Wa).apply(null,arguments)},rr=C._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(rr=C._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=C.asm.Xa).apply(null,arguments)},nr=C._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(nr=C._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=C.asm.Ya).apply(null,arguments)},or=C._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(or=C._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=C.asm.Za).apply(null,arguments)},_r=C._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(_r=C._emscripten_bind_Decoder_GetAttributeFloat_3=C.asm._a).apply(null,arguments)},ir=C._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(ir=C._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=C.asm.$a).apply(null,arguments)},pr=C._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(pr=C._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=C.asm.ab).apply(null,arguments)},ar=C._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(ar=C._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=C.asm.bb).apply(null,arguments)},cr=C._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(cr=C._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=C.asm.cb).apply(null,arguments)},ur=C._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(ur=C._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=C.asm.db).apply(null,arguments)},sr=C._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(sr=C._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=C.asm.eb).apply(null,arguments)},yr=C._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(yr=C._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=C.asm.fb).apply(null,arguments)},lr=C._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(lr=C._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=C.asm.gb).apply(null,arguments)},fr=C._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(fr=C._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=C.asm.hb).apply(null,arguments)},dr=C._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(dr=C._emscripten_bind_Decoder_SkipAttributeTransform_1=C.asm.ib).apply(null,arguments)},mr=C._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(mr=C._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=C.asm.jb).apply(null,arguments)},br=C._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(br=C._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=C.asm.kb).apply(null,arguments)},hr=C._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(hr=C._emscripten_bind_Decoder_DecodeBufferToMesh_2=C.asm.lb).apply(null,arguments)},Ar=C._emscripten_bind_Decoder___destroy___0=function(){return(Ar=C._emscripten_bind_Decoder___destroy___0=C.asm.mb).apply(null,arguments)},Tr=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Tr=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=C.asm.nb).apply(null,arguments)},Dr=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Dr=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=C.asm.ob).apply(null,arguments)},Ir=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Ir=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=C.asm.pb).apply(null,arguments)},Er=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Er=C._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=C.asm.qb).apply(null,arguments)},Gr=C._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Gr=C._emscripten_enum_draco_GeometryAttribute_Type_INVALID=C.asm.rb).apply(null,arguments)},Or=C._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Or=C._emscripten_enum_draco_GeometryAttribute_Type_POSITION=C.asm.sb).apply(null,arguments)},vr=C._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(vr=C._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=C.asm.tb).apply(null,arguments)},jr=C._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(jr=C._emscripten_enum_draco_GeometryAttribute_Type_COLOR=C.asm.ub).apply(null,arguments)},Pr=C._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Pr=C._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=C.asm.vb).apply(null,arguments)},Rr=C._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Rr=C._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=C.asm.wb).apply(null,arguments)},Sr=C._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Sr=C._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=C.asm.xb).apply(null,arguments)},Nr=C._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Nr=C._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=C.asm.yb).apply(null,arguments)},Mr=C._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Mr=C._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=C.asm.zb).apply(null,arguments)},Ur=C._emscripten_enum_draco_DataType_DT_INVALID=function(){return(Ur=C._emscripten_enum_draco_DataType_DT_INVALID=C.asm.Ab).apply(null,arguments)},gr=C._emscripten_enum_draco_DataType_DT_INT8=function(){return(gr=C._emscripten_enum_draco_DataType_DT_INT8=C.asm.Bb).apply(null,arguments)},Fr=C._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Fr=C._emscripten_enum_draco_DataType_DT_UINT8=C.asm.Cb).apply(null,arguments)},Lr=C._emscripten_enum_draco_DataType_DT_INT16=function(){return(Lr=C._emscripten_enum_draco_DataType_DT_INT16=C.asm.Db).apply(null,arguments)},Cr=C._emscripten_enum_draco_DataType_DT_UINT16=function(){return(Cr=C._emscripten_enum_draco_DataType_DT_UINT16=C.asm.Eb).apply(null,arguments)},wr=C._emscripten_enum_draco_DataType_DT_INT32=function(){return(wr=C._emscripten_enum_draco_DataType_DT_INT32=C.asm.Fb).apply(null,arguments)},zr=C._emscripten_enum_draco_DataType_DT_UINT32=function(){return(zr=C._emscripten_enum_draco_DataType_DT_UINT32=C.asm.Gb).apply(null,arguments)},Vr=C._emscripten_enum_draco_DataType_DT_INT64=function(){return(Vr=C._emscripten_enum_draco_DataType_DT_INT64=C.asm.Hb).apply(null,arguments)},Br=C._emscripten_enum_draco_DataType_DT_UINT64=function(){return(Br=C._emscripten_enum_draco_DataType_DT_UINT64=C.asm.Ib).apply(null,arguments)},Wr=C._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(Wr=C._emscripten_enum_draco_DataType_DT_FLOAT32=C.asm.Jb).apply(null,arguments)},kr=C._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(kr=C._emscripten_enum_draco_DataType_DT_FLOAT64=C.asm.Kb).apply(null,arguments)},Qr=C._emscripten_enum_draco_DataType_DT_BOOL=function(){return(Qr=C._emscripten_enum_draco_DataType_DT_BOOL=C.asm.Lb).apply(null,arguments)},xr=C._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(xr=C._emscripten_enum_draco_DataType_DT_TYPES_COUNT=C.asm.Mb).apply(null,arguments)},Yr=C._emscripten_enum_draco_StatusCode_OK=function(){return(Yr=C._emscripten_enum_draco_StatusCode_OK=C.asm.Nb).apply(null,arguments)},Hr=C._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(Hr=C._emscripten_enum_draco_StatusCode_DRACO_ERROR=C.asm.Ob).apply(null,arguments)},qr=C._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(qr=C._emscripten_enum_draco_StatusCode_IO_ERROR=C.asm.Pb).apply(null,arguments)},Xr=C._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(Xr=C._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=C.asm.Qb).apply(null,arguments)},Kr=C._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(Kr=C._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=C.asm.Rb).apply(null,arguments)},Jr=C._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(Jr=C._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=C.asm.Sb).apply(null,arguments)};C._malloc=function(){return(C._malloc=C.asm.Tb).apply(null,arguments)},C._free=function(){return(C._free=C.asm.Ub).apply(null,arguments)};var Zr,$r=function(){return($r=C.asm.Vb).apply(null,arguments)};if(C.___start_em_js=15856,C.___stop_em_js=15954,lt=function t(){Zr||c(),Zr||(lt=t)},C.preInit)for("function"==typeof C.preInit&&(C.preInit=[C.preInit]);0=tn.size?(0>>=0,e.BYTES_PER_ELEMENT){case 2:r>>>=1;break;case 4:r>>>=2;break;case 8:r>>>=3}for(var n=0;nt.byteLength)return C.INVALID_GEOMETRY_TYPE;switch(t[7]){case 0:return C.POINT_CLOUD;case 1:return C.TRIANGULAR_MESH;default:return C.INVALID_GEOMETRY_TYPE}},t.ready});"object"==typeof t&&"object"==typeof e?e.exports=o:"function"==typeof define&&define.amd?define([],(function(){return o})):"object"==typeof t&&(t.DracoDecoderModule=o)}));export{Dn as a}; \ No newline at end of file diff --git a/Workers/chunk-EUD5C47L.js.LICENSE.txt b/Workers/chunk-EUD5C47L.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-EUD5C47L.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-EXHN5NWQ.js b/Workers/chunk-EXHN5NWQ.js new file mode 100644 index 0000000..4899fc0 --- /dev/null +++ b/Workers/chunk-EXHN5NWQ.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-EXHN5NWQ.js.LICENSE.txt */ +import{a as M}from"./chunk-AJBZ3ZYP.js";import{a as st}from"./chunk-NNNHC2WA.js";import{a as Z,b as H}from"./chunk-SUQSMXXT.js";import{a as V}from"./chunk-EKKRJHD7.js";import{a as U}from"./chunk-KZVVSHMS.js";import{b as it}from"./chunk-EQAHH27B.js";import{a as ct}from"./chunk-LWO5EUNN.js";import{a as ot}from"./chunk-SPMRTIBU.js";import{a as nt}from"./chunk-U6MIZ4IC.js";import{b as K,c as X,d as z}from"./chunk-3G4OCZJT.js";import{e as J}from"./chunk-LYPPBP4Q.js";import{a as k}from"./chunk-TLYHKSDJ.js";import{a as w,b as q,c as A,d as et,e as F}from"./chunk-PYVDHCDQ.js";import{a as I}from"./chunk-JMWWNZHX.js";import{a as tt}from"./chunk-Z3SYNMQT.js";import{e as x}from"./chunk-F3TINEFX.js";function dt(t,e){this.positions=x(t)?t:[],this.holes=x(e)?e:[]}var rt=dt;function R(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(R.prototype,{length:{get:function(){return this._length}}}),R.prototype.enqueue=function(t){this._array.push(t),this._length++},R.prototype.dequeue=function(){if(0===this._length)return;let t=this._array,e=this._offset,n=t[e];return t[e]=void 0,e++,e>10&&2*e>t.length&&(this._array=t.slice(e),e=0),this._offset=e,this._length--,n},R.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},R.prototype.contains=function(t){return-1!==this._array.indexOf(t)},R.prototype.clear=function(){this._array.length=this._offset=this._length=0},R.prototype.sort=function(t){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(t)};var $=R,b={computeHierarchyPackedLength:function(t,e){let n=0,i=[t];for(;i.length>0;){let t=i.pop();if(!x(t))continue;n+=2;let o=t.positions,r=t.holes;if(x(o)&&o.length>0&&(n+=o.length*e.packedLength),x(r)){let t=r.length;for(let e=0;e0;){let t=o.pop();if(!x(t))continue;let r=t.positions,s=t.holes;if(e[n++]=x(r)?r.length:0,e[n++]=x(s)?s.length:0,x(r)){let t=r.length;for(let o=0;o0?new Array(o):void 0;for(let o=0;oI.PI){let t=s;s=a,a=t}return r.longitudea?void 0:n.cartographicToCartesian(r)}function Et(t,e,n,i){if(i===M.RHUMB)return Tt(t,e,n);let o=it.lineSegmentPlane(t,e,ct.ORIGIN_XY_PLANE);return x(o)?n.scaleToGeodeticSurface(o,o):void 0}var vt=new q;function Ct(t,e,n){let i,o,r,s,a,l=[],u=0;for(;ue.cartesianToCartographic(t,vt).longitude;if(0===r)l.push({position:u,type:r,visited:!1,next:s,theta:h(i)});else if(0!==s){if(a=Et(i,o,e,n),++u,!x(a))continue;t.splice(u,0,a),l.push({position:u,type:r,visited:!1,next:s,theta:h(a)})}++u}return l}function lt(t,e,n,i,o,r,s){let a=[],l=r,u=t=>e=>e.position===t,h=[];do{let t=n[l];a.push(t);let e=i.findIndex(u(l)),o=i[e];if(!x(o)){++l;continue}let{visited:c,type:f,next:p}=o;if(o.visited=!0,0===f){if(0===p){let t=i[e-(s?1:-1)];if(t?.position!==l+1){++l;continue}t.visited=!0}if(!c&&s&&p>0||r===l&&!s&&p<0){++l;continue}}if(!(s?f>=0:f<=0)){++l;continue}c||h.push(l);let g=i[e+(s?1:-1)];x(g)?l=g.position:++l}while(l=0&&l!==r&&a.lengtht.theta-e.theta)),o=lt(i,o,r,s,1,0,r[0].z>=0))}return i},b.polygonsFromHierarchy=function(t,e,n,i,o,r){let s=[],a=[],l=new $;l.enqueue(t);let u=x(r);for(;0!==l.length;){let t,h,c=l.dequeue(),f=c.positions,p=c.holes;if(i)for(h=f.length,t=0;t1){for(let e of t)l.enqueue(new rt(e,p));continue}}let y,b=f.slice(),I=x(p)?p.length:0,v=[];for(t=0;ttypeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):e)((function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')})),b=e=>r=>{var t=e[r];if(t)return t();throw new Error("Module not found in bundle: "+r)},g=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),p=(e,t,o,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let p of l(t))!c.call(e,p)&&p!==o&&u(e,p,{get:()=>t[p],enumerable:!(n=r(t,p))||n.enumerable});return e},h=(e,r,t)=>(t=null!=e?i(o(e)):{},p(!r&&e&&e.__esModule?t:u(t,"default",{value:e,enumerable:!0}),e));function x(e){return null!=e}var k=x;export{a,b,g as c,h as d,k as e}; \ No newline at end of file diff --git a/Workers/chunk-F3TINEFX.js.LICENSE.txt b/Workers/chunk-F3TINEFX.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-F3TINEFX.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-C4L7HN6T.js b/Workers/chunk-FD76FI2G.js similarity index 56% rename from Workers/chunk-C4L7HN6T.js rename to Workers/chunk-FD76FI2G.js index 2be9013..06b3c13 100644 --- a/Workers/chunk-C4L7HN6T.js +++ b/Workers/chunk-FD76FI2G.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-C4L7HN6T.js.LICENSE.txt */ -import{b as t}from"./chunk-KDW4RGIR.js";import{a as r}from"./chunk-RKPKWH3Z.js";import{a as m}from"./chunk-BIYNNQRQ.js";import{e as i}from"./chunk-ZLUSVROX.js";function d(e){if(e=r(e,r.EMPTY_OBJECT),!i(e.geometry))throw new m("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=t.clone(r(e.modelMatrix,t.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=r(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var s=d;export{s as a}; \ No newline at end of file +/*! For license information please see chunk-FD76FI2G.js.LICENSE.txt */ +import{b as t}from"./chunk-S7TTFAYA.js";import{a as r}from"./chunk-Z3SYNMQT.js";import{a as m}from"./chunk-4KGDZUZQ.js";import{e as i}from"./chunk-F3TINEFX.js";function d(e){if(e=r(e,r.EMPTY_OBJECT),!i(e.geometry))throw new m("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=t.clone(r(e.modelMatrix,t.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=r(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var s=d;export{s as a}; \ No newline at end of file diff --git a/Workers/chunk-FD76FI2G.js.LICENSE.txt b/Workers/chunk-FD76FI2G.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-FD76FI2G.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-FDDSRMXI.js.LICENSE.txt b/Workers/chunk-FDDSRMXI.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-FDDSRMXI.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-63CO7A5M.js b/Workers/chunk-FHUOX7Q3.js similarity index 80% rename from Workers/chunk-63CO7A5M.js rename to Workers/chunk-FHUOX7Q3.js index 007b567..e0170d8 100644 --- a/Workers/chunk-63CO7A5M.js +++ b/Workers/chunk-FHUOX7Q3.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-63CO7A5M.js.LICENSE.txt */ -import{a as c}from"./chunk-V624RX7A.js";import{b as t}from"./chunk-BIYNNQRQ.js";import{e as g}from"./chunk-ZLUSVROX.js";function f(){this.high=c.clone(c.ZERO),this.low=c.clone(c.ZERO)}f.encode=function(e,o){let n;return t.typeOf.number("value",e),g(o)||(o={high:0,low:0}),e>=0?(n=65536*Math.floor(e/65536),o.high=n,o.low=e-n):(n=65536*Math.floor(-e/65536),o.high=-n,o.low=e+n),o};var e={high:0,low:0};f.fromCartesian=function(o,n){t.typeOf.object("cartesian",o),g(n)||(n=new f);let r=n.high,h=n.low;return f.encode(o.x,e),r.x=e.high,h.x=e.low,f.encode(o.y,e),r.y=e.high,h.y=e.low,f.encode(o.z,e),r.z=e.high,h.z=e.low,n};var m=new f;f.writeElements=function(e,o,n){t.defined("cartesianArray",o),t.typeOf.number("index",n),t.typeOf.number.greaterThanOrEquals("index",n,0),f.fromCartesian(e,m);let r=m.high,h=m.low;o[n]=r.x,o[n+1]=r.y,o[n+2]=r.z,o[n+3]=h.x,o[n+4]=h.y,o[n+5]=h.z};var O=f;export{O as a}; \ No newline at end of file +/*! For license information please see chunk-FHUOX7Q3.js.LICENSE.txt */ +import{a as c}from"./chunk-PYVDHCDQ.js";import{b as t}from"./chunk-4KGDZUZQ.js";import{e as g}from"./chunk-F3TINEFX.js";function f(){this.high=c.clone(c.ZERO),this.low=c.clone(c.ZERO)}f.encode=function(e,o){let n;return t.typeOf.number("value",e),g(o)||(o={high:0,low:0}),e>=0?(n=65536*Math.floor(e/65536),o.high=n,o.low=e-n):(n=65536*Math.floor(-e/65536),o.high=-n,o.low=e+n),o};var e={high:0,low:0};f.fromCartesian=function(o,n){t.typeOf.object("cartesian",o),g(n)||(n=new f);let r=n.high,h=n.low;return f.encode(o.x,e),r.x=e.high,h.x=e.low,f.encode(o.y,e),r.y=e.high,h.y=e.low,f.encode(o.z,e),r.z=e.high,h.z=e.low,n};var m=new f;f.writeElements=function(e,o,n){t.defined("cartesianArray",o),t.typeOf.number("index",n),t.typeOf.number.greaterThanOrEquals("index",n,0),f.fromCartesian(e,m);let r=m.high,h=m.low;o[n]=r.x,o[n+1]=r.y,o[n+2]=r.z,o[n+3]=h.x,o[n+4]=h.y,o[n+5]=h.z};var O=f;export{O as a}; \ No newline at end of file diff --git a/Workers/chunk-FHUOX7Q3.js.LICENSE.txt b/Workers/chunk-FHUOX7Q3.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-FHUOX7Q3.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-IYTTCRXN.js b/Workers/chunk-FZIR7YHL.js similarity index 64% rename from Workers/chunk-IYTTCRXN.js rename to Workers/chunk-FZIR7YHL.js index 3459344..3fcd567 100644 --- a/Workers/chunk-IYTTCRXN.js +++ b/Workers/chunk-FZIR7YHL.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-IYTTCRXN.js.LICENSE.txt */ -import{a as w,b as z,d as T,e as S}from"./chunk-KDW4RGIR.js";import{a as y}from"./chunk-VNDUYYBJ.js";import{a as C,d as x}from"./chunk-V624RX7A.js";import{a as h}from"./chunk-VZ2RFJ3P.js";import{a as u,b as a}from"./chunk-BIYNNQRQ.js";import{e as b}from"./chunk-ZLUSVROX.js";var c={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",getMathType:function(e){switch(e){case c.SCALAR:return Number;case c.VEC2:return T;case c.VEC3:return C;case c.VEC4:return w;case c.MAT2:return S;case c.MAT3:return x;case c.MAT4:return z;default:throw new u("attributeType is not a valid value.")}},getNumberOfComponents:function(e){switch(e){case c.SCALAR:return 1;case c.VEC2:return 2;case c.VEC3:return 3;case c.VEC4:case c.MAT2:return 4;case c.MAT3:return 9;case c.MAT4:return 16;default:throw new u("attributeType is not a valid value.")}},getAttributeLocationCount:function(e){switch(e){case c.SCALAR:case c.VEC2:case c.VEC3:case c.VEC4:return 1;case c.MAT2:return 2;case c.MAT3:return 3;case c.MAT4:return 4;default:throw new u("attributeType is not a valid value.")}},getGlslType:function(e){switch(a.typeOf.string("attributeType",e),e){case c.SCALAR:return"float";case c.VEC2:return"vec2";case c.VEC3:return"vec3";case c.VEC4:return"vec4";case c.MAT2:return"mat2";case c.MAT3:return"mat3";case c.MAT4:return"mat4";default:throw new u("attributeType is not a valid value.")}}},N=Object.freeze(c),V=1/256,D=256,r={octEncodeInRange:function(e,t,r){a.defined("vector",e),a.defined("result",r);let n=C.magnitudeSquared(e);if(Math.abs(n-1)>h.EPSILON6)throw new u("vector must be normalized.");if(r.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),r.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let e=r.x,t=r.y;r.x=(1-Math.abs(t))*h.signNotZero(e),r.y=(1-Math.abs(e))*h.signNotZero(t)}return r.x=h.toSNorm(r.x,t),r.y=h.toSNorm(r.y,t),r},octEncode:function(e,t){return r.octEncodeInRange(e,255,t)}},A=new T,F=new Uint8Array(1);function E(e){return F[0]=e,F[0]}r.octEncodeToCartesian4=function(e,t){return r.octEncodeInRange(e,65535,A),t.x=E(A.x*V),t.y=E(A.x),t.z=E(A.y*V),t.w=E(A.y),t},r.octDecodeInRange=function(e,t,r,n){if(a.defined("result",n),e<0||e>r||t<0||t>r)throw new u(`x and y must be unsigned normalized integers between 0 and ${r}`);if(n.x=h.fromSNorm(e,r),n.y=h.fromSNorm(t,r),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){let e=n.x;n.x=(1-Math.abs(n.y))*h.signNotZero(e),n.y=(1-Math.abs(e))*h.signNotZero(n.y)}return C.normalize(n,n)},r.octDecode=function(e,t,n){return r.octDecodeInRange(e,t,255,n)},r.octDecodeFromCartesian4=function(e,t){a.typeOf.object("encoded",e),a.typeOf.object("result",t);let n=e.x,o=e.y,c=e.z,s=e.w;if(n<0||n>255||o<0||o>255||c<0||c>255||s<0||s>255)throw new u("x, y, z, and w must be unsigned normalized integers between 0 and 255");let d=n*D+o,i=c*D+s;return r.octDecodeInRange(d,i,65535,t)},r.octPackFloat=function(e){return a.defined("encoded",e),256*e.x+e.y};var l=new T;function g(e){return e>>1^-(1&e)}r.octEncodeFloat=function(e){return r.octEncode(e,l),r.octPackFloat(l)},r.octDecodeFloat=function(e,t){a.defined("value",e);let n=e/256,o=Math.floor(n),c=256*(n-o);return r.octDecode(o,c,t)},r.octPack=function(e,t,n,o){a.defined("v1",e),a.defined("v2",t),a.defined("v3",n),a.defined("result",o);let c=r.octEncodeFloat(e),u=r.octEncodeFloat(t),s=r.octEncode(n,l);return o.x=65536*s.x+c,o.y=65536*s.y+u,o},r.octUnpack=function(e,t,n,o){a.defined("packed",e),a.defined("v1",t),a.defined("v2",n),a.defined("v3",o);let c=e.x/65536,u=Math.floor(c),s=65536*(c-u);c=e.y/65536;let d=Math.floor(c),i=65536*(c-d);r.octDecodeFloat(s,t),r.octDecodeFloat(i,n),r.octDecode(u,d,o)},r.compressTextureCoordinates=function(e){return a.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},r.decompressTextureCoordinates=function(e,t){a.defined("compressed",e),a.defined("result",t);let r=e/4096,n=Math.floor(r);return t.x=n/4095,t.y=(e-4096*n)/4095,t},r.zigZagDeltaDecode=function(e,t,r){a.defined("uBuffer",e),a.defined("vBuffer",t),a.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),b(r)&&a.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,r.length);let n=e.length,o=0,c=0,u=0;for(let a=0;a>11,c=n>>5&63,u=31&n,s=3*r;t[s]=a*o,t[s+1]=.015873015873015872*c,t[s+2]=u*o}return t};var W=r;export{W as a}; \ No newline at end of file +/*! For license information please see chunk-FZIR7YHL.js.LICENSE.txt */ +import{a as w,b as z,d as S}from"./chunk-S7TTFAYA.js";import{a as y}from"./chunk-TLYHKSDJ.js";import{a as C,c as T,e as x}from"./chunk-PYVDHCDQ.js";import{a as h}from"./chunk-JMWWNZHX.js";import{a as u,b as a}from"./chunk-4KGDZUZQ.js";import{e as b}from"./chunk-F3TINEFX.js";var c={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",getMathType:function(e){switch(e){case c.SCALAR:return Number;case c.VEC2:return T;case c.VEC3:return C;case c.VEC4:return w;case c.MAT2:return S;case c.MAT3:return x;case c.MAT4:return z;default:throw new u("attributeType is not a valid value.")}},getNumberOfComponents:function(e){switch(e){case c.SCALAR:return 1;case c.VEC2:return 2;case c.VEC3:return 3;case c.VEC4:case c.MAT2:return 4;case c.MAT3:return 9;case c.MAT4:return 16;default:throw new u("attributeType is not a valid value.")}},getAttributeLocationCount:function(e){switch(e){case c.SCALAR:case c.VEC2:case c.VEC3:case c.VEC4:return 1;case c.MAT2:return 2;case c.MAT3:return 3;case c.MAT4:return 4;default:throw new u("attributeType is not a valid value.")}},getGlslType:function(e){switch(a.typeOf.string("attributeType",e),e){case c.SCALAR:return"float";case c.VEC2:return"vec2";case c.VEC3:return"vec3";case c.VEC4:return"vec4";case c.MAT2:return"mat2";case c.MAT3:return"mat3";case c.MAT4:return"mat4";default:throw new u("attributeType is not a valid value.")}}},N=Object.freeze(c),V=1/256,D=256,r={octEncodeInRange:function(e,t,r){a.defined("vector",e),a.defined("result",r);let n=C.magnitudeSquared(e);if(Math.abs(n-1)>h.EPSILON6)throw new u("vector must be normalized.");if(r.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),r.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let e=r.x,t=r.y;r.x=(1-Math.abs(t))*h.signNotZero(e),r.y=(1-Math.abs(e))*h.signNotZero(t)}return r.x=h.toSNorm(r.x,t),r.y=h.toSNorm(r.y,t),r},octEncode:function(e,t){return r.octEncodeInRange(e,255,t)}},A=new T,F=new Uint8Array(1);function E(e){return F[0]=e,F[0]}r.octEncodeToCartesian4=function(e,t){return r.octEncodeInRange(e,65535,A),t.x=E(A.x*V),t.y=E(A.x),t.z=E(A.y*V),t.w=E(A.y),t},r.octDecodeInRange=function(e,t,r,n){if(a.defined("result",n),e<0||e>r||t<0||t>r)throw new u(`x and y must be unsigned normalized integers between 0 and ${r}`);if(n.x=h.fromSNorm(e,r),n.y=h.fromSNorm(t,r),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){let e=n.x;n.x=(1-Math.abs(n.y))*h.signNotZero(e),n.y=(1-Math.abs(e))*h.signNotZero(n.y)}return C.normalize(n,n)},r.octDecode=function(e,t,n){return r.octDecodeInRange(e,t,255,n)},r.octDecodeFromCartesian4=function(e,t){a.typeOf.object("encoded",e),a.typeOf.object("result",t);let n=e.x,c=e.y,o=e.z,s=e.w;if(n<0||n>255||c<0||c>255||o<0||o>255||s<0||s>255)throw new u("x, y, z, and w must be unsigned normalized integers between 0 and 255");let d=n*D+c,i=o*D+s;return r.octDecodeInRange(d,i,65535,t)},r.octPackFloat=function(e){return a.defined("encoded",e),256*e.x+e.y};var l=new T;function g(e){return e>>1^-(1&e)}r.octEncodeFloat=function(e){return r.octEncode(e,l),r.octPackFloat(l)},r.octDecodeFloat=function(e,t){a.defined("value",e);let n=e/256,c=Math.floor(n),o=256*(n-c);return r.octDecode(c,o,t)},r.octPack=function(e,t,n,c){a.defined("v1",e),a.defined("v2",t),a.defined("v3",n),a.defined("result",c);let o=r.octEncodeFloat(e),u=r.octEncodeFloat(t),s=r.octEncode(n,l);return c.x=65536*s.x+o,c.y=65536*s.y+u,c},r.octUnpack=function(e,t,n,c){a.defined("packed",e),a.defined("v1",t),a.defined("v2",n),a.defined("v3",c);let o=e.x/65536,u=Math.floor(o),s=65536*(o-u);o=e.y/65536;let d=Math.floor(o),i=65536*(o-d);r.octDecodeFloat(s,t),r.octDecodeFloat(i,n),r.octDecode(u,d,c)},r.compressTextureCoordinates=function(e){return a.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},r.decompressTextureCoordinates=function(e,t){a.defined("compressed",e),a.defined("result",t);let r=e/4096,n=Math.floor(r);return t.x=n/4095,t.y=(e-4096*n)/4095,t},r.zigZagDeltaDecode=function(e,t,r){a.defined("uBuffer",e),a.defined("vBuffer",t),a.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),b(r)&&a.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,r.length);let n=e.length,c=0,o=0,u=0;for(let a=0;a>11,o=n>>5&63,u=31&n,s=3*r;t[s]=a*c,t[s+1]=.015873015873015872*o,t[s+2]=u*c}return t};var W=r;export{W as a}; \ No newline at end of file diff --git a/Workers/chunk-FZIR7YHL.js.LICENSE.txt b/Workers/chunk-FZIR7YHL.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-FZIR7YHL.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-D6NO7OEC.js b/Workers/chunk-GNAFTO6Q.js similarity index 86% rename from Workers/chunk-D6NO7OEC.js rename to Workers/chunk-GNAFTO6Q.js index 2740912..505c418 100644 --- a/Workers/chunk-D6NO7OEC.js +++ b/Workers/chunk-GNAFTO6Q.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-D6NO7OEC.js.LICENSE.txt */ -import{a as _}from"./chunk-NXLA2DOI.js";import{a as G}from"./chunk-EOT3UPEC.js";import{b as B}from"./chunk-ZKNXHPHD.js";import{a as b}from"./chunk-W5ZMPE2M.js";import{b as L}from"./chunk-KDW4RGIR.js";import{a,b as D,c as z}from"./chunk-V624RX7A.js";import{a as E}from"./chunk-VZ2RFJ3P.js";import{a as C}from"./chunk-RKPKWH3Z.js";import{a as I}from"./chunk-BIYNNQRQ.js";import{e as T}from"./chunk-ZLUSVROX.js";var p={numberOfPoints:function(e,t,r){let n=a.distance(e,t);return Math.ceil(n/r)},numberOfPointsRhumbLine:function(e,t,a){let r=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(r/(a*a))))}},V=new D;p.extractHeights=function(e,t){let a=e.length,r=new Array(a);for(let n=0;n0){t=C(t,L.IDENTITY);let i=L.inverseTransformation(t,Y),o=L.multiplyByPoint(i,a.ZERO,W),c=a.normalize(L.multiplyByPointAsVector(i,a.UNIT_Y,v),v),l=b.fromPointNormal(o,c,F),s=a.normalize(L.multiplyByPointAsVector(i,a.UNIT_X,H),H),u=b.fromPointNormal(o,s,j),h=1;r.push(a.clone(e[0]));let p=r[0],f=e.length;for(let t=1;t0){t=C(t,L.IDENTITY);let i=L.inverseTransformation(t,Y),o=L.multiplyByPoint(i,a.ZERO,W),c=a.normalize(L.multiplyByPointAsVector(i,a.UNIT_Y,v),v),l=b.fromPointNormal(o,c,F),s=a.normalize(L.multiplyByPointAsVector(i,a.UNIT_X,H),H),u=b.fromPointNormal(o,s,j),h=1;r.push(a.clone(e[0]));let p=r[0],f=e.length;for(let t=1;t1&&(t-=1),6*t<1?e+6*(r-e)*t:2*t<1?r:3*t<2?e+(r-e)*(2/3-t)*6:e}function e(e,r,t,o){this.red=C(e,1),this.green=C(r,1),this.blue=C(t,1),this.alpha=C(o,1)}var A,g,m;e.fromCartesian4=function(r,t){return n.typeOf.object("cartesian",r),O(t)?(t.red=r.x,t.green=r.y,t.blue=r.z,t.alpha=r.w,t):new e(r.x,r.y,r.z,r.w)},e.fromBytes=function(r,t,o,n,s){return r=e.byteToFloat(C(r,255)),t=e.byteToFloat(C(t,255)),o=e.byteToFloat(C(o,255)),n=e.byteToFloat(C(n,255)),O(s)?(s.red=r,s.green=t,s.blue=o,s.alpha=n,s):new e(r,t,o,n)},e.fromAlpha=function(r,t,o){return n.typeOf.object("color",r),n.typeOf.number("alpha",t),O(o)?(o.red=r.red,o.green=r.green,o.blue=r.blue,o.alpha=t,o):new e(r.red,r.green,r.blue,t)},j.supportsTypedArrays()&&(A=new ArrayBuffer(4),g=new Uint32Array(A),m=new Uint8Array(A)),e.fromRgba=function(r,t){return g[0]=r,e.fromBytes(m[0],m[1],m[2],m[3],t)},e.fromHsl=function(r,t,o,n,s){r=C(r,0)%1,t=C(t,0),o=C(o,0),n=C(n,1);let f=o,i=o,a=o;if(0!==t){let e;e=o<.5?o*(1+t):o+t-o*t;let n=2*o-e;f=l(n,e,r+1/3),i=l(n,e,r),a=l(n,e,r-1/3)}return O(s)?(s.red=f,s.green=i,s.blue=a,s.alpha=n,s):new e(f,i,a,n)},e.fromRandom=function(r,t){let o=(r=C(r,C.EMPTY_OBJECT)).red;if(!O(o)){let e=C(r.minimumRed,0),t=C(r.maximumRed,1);n.typeOf.number.lessThanOrEquals("minimumRed",e,t),o=e+E.nextRandomNumber()*(t-e)}let s=r.green;if(!O(s)){let e=C(r.minimumGreen,0),t=C(r.maximumGreen,1);n.typeOf.number.lessThanOrEquals("minimumGreen",e,t),s=e+E.nextRandomNumber()*(t-e)}let f=r.blue;if(!O(f)){let e=C(r.minimumBlue,0),t=C(r.maximumBlue,1);n.typeOf.number.lessThanOrEquals("minimumBlue",e,t),f=e+E.nextRandomNumber()*(t-e)}let l=r.alpha;if(!O(l)){let e=C(r.minimumAlpha,0),t=C(r.maximumAlpha,1);n.typeOf.number.lessThanOrEquals("minumumAlpha",e,t),l=e+E.nextRandomNumber()*(t-e)}return O(t)?(t.red=o,t.green=s,t.blue=f,t.alpha=l,t):new e(o,s,f,l)};var a=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,z=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,p=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,R=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;e.fromCssColorString=function(r,t){n.typeOf.string("color",r),O(t)||(t=new e);let o=e[(r=r.trim()).toUpperCase()];if(O(o))return e.clone(o,t),t;let s=a.exec(r);return null!==s?(t.red=parseInt(s[1],16)/15,t.green=parseInt(s[2],16)/15,t.blue=parseInt(s[3],16)/15,t.alpha=parseInt(C(s[4],"f"),16)/15,t):(s=z.exec(r),null!==s?(t.red=parseInt(s[1],16)/255,t.green=parseInt(s[2],16)/255,t.blue=parseInt(s[3],16)/255,t.alpha=parseInt(C(s[4],"ff"),16)/255,t):(s=p.exec(r),null!==s?(t.red=parseFloat(s[1])/("%"===s[1].substr(-1)?100:255),t.green=parseFloat(s[2])/("%"===s[2].substr(-1)?100:255),t.blue=parseFloat(s[3])/("%"===s[3].substr(-1)?100:255),t.alpha=parseFloat(C(s[4],"1.0")),t):(s=R.exec(r),null!==s?e.fromHsl(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,parseFloat(C(s[4],"1.0")),t):t=void 0)))},e.packedLength=4,e.pack=function(e,r,t){return n.typeOf.object("value",e),n.defined("array",r),t=C(t,0),r[t++]=e.red,r[t++]=e.green,r[t++]=e.blue,r[t]=e.alpha,r},e.unpack=function(r,t,o){return n.defined("array",r),t=C(t,0),O(o)||(o=new e),o.red=r[t++],o.green=r[t++],o.blue=r[t++],o.alpha=r[t],o},e.byteToFloat=function(e){return e/255},e.floatToByte=function(e){return 1===e?255:256*e|0},e.clone=function(r,t){if(O(r))return O(t)?(t.red=r.red,t.green=r.green,t.blue=r.blue,t.alpha=r.alpha,t):new e(r.red,r.green,r.blue,r.alpha)},e.equals=function(e,r){return e===r||O(e)&&O(r)&&e.red===r.red&&e.green===r.green&&e.blue===r.blue&&e.alpha===r.alpha},e.equalsArray=function(e,r,t){return e.red===r[t]&&e.green===r[t+1]&&e.blue===r[t+2]&&e.alpha===r[t+3]},e.prototype.clone=function(r){return e.clone(this,r)},e.prototype.equals=function(r){return e.equals(this,r)},e.prototype.equalsEpsilon=function(e,r){return this===e||O(e)&&Math.abs(this.red-e.red)<=r&&Math.abs(this.green-e.green)<=r&&Math.abs(this.blue-e.blue)<=r&&Math.abs(this.alpha-e.alpha)<=r},e.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`},e.prototype.toCssColorString=function(){let r=e.floatToByte(this.red),t=e.floatToByte(this.green),o=e.floatToByte(this.blue);return 1===this.alpha?`rgb(${r},${t},${o})`:`rgba(${r},${t},${o},${this.alpha})`},e.prototype.toCssHexString=function(){let r=e.floatToByte(this.red).toString(16);r.length<2&&(r=`0${r}`);let t=e.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let o=e.floatToByte(this.blue).toString(16);if(o.length<2&&(o=`0${o}`),this.alpha<1){let n=e.floatToByte(this.alpha).toString(16);return n.length<2&&(n=`0${n}`),`#${r}${t}${o}${n}`}return`#${r}${t}${o}`},e.prototype.toBytes=function(r){let t=e.floatToByte(this.red),o=e.floatToByte(this.green),n=e.floatToByte(this.blue),s=e.floatToByte(this.alpha);return O(r)?(r[0]=t,r[1]=o,r[2]=n,r[3]=s,r):[t,o,n,s]},e.prototype.toRgba=function(){return m[0]=e.floatToByte(this.red),m[1]=e.floatToByte(this.green),m[2]=e.floatToByte(this.blue),m[3]=e.floatToByte(this.alpha),g[0]},e.prototype.brighten=function(e,r){return n.typeOf.number("magnitude",e),n.typeOf.number.greaterThanOrEquals("magnitude",e,0),n.typeOf.object("result",r),e=1-e,r.red=1-(1-this.red)*e,r.green=1-(1-this.green)*e,r.blue=1-(1-this.blue)*e,r.alpha=this.alpha,r},e.prototype.darken=function(e,r){return n.typeOf.number("magnitude",e),n.typeOf.number.greaterThanOrEquals("magnitude",e,0),n.typeOf.object("result",r),e=1-e,r.red=this.red*e,r.green=this.green*e,r.blue=this.blue*e,r.alpha=this.alpha,r},e.prototype.withAlpha=function(r,t){return e.fromAlpha(this,r,t)},e.add=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red+r.red,t.green=e.green+r.green,t.blue=e.blue+r.blue,t.alpha=e.alpha+r.alpha,t},e.subtract=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red-r.red,t.green=e.green-r.green,t.blue=e.blue-r.blue,t.alpha=e.alpha-r.alpha,t},e.multiply=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red*r.red,t.green=e.green*r.green,t.blue=e.blue*r.blue,t.alpha=e.alpha*r.alpha,t},e.divide=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red/r.red,t.green=e.green/r.green,t.blue=e.blue/r.blue,t.alpha=e.alpha/r.alpha,t},e.mod=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red%r.red,t.green=e.green%r.green,t.blue=e.blue%r.blue,t.alpha=e.alpha%r.alpha,t},e.lerp=function(e,r,t,o){return n.typeOf.object("start",e),n.typeOf.object("end",r),n.typeOf.number("t",t),n.typeOf.object("result",o),o.red=E.lerp(e.red,r.red,t),o.green=E.lerp(e.green,r.green,t),o.blue=E.lerp(e.blue,r.blue,t),o.alpha=E.lerp(e.alpha,r.alpha,t),o},e.multiplyByScalar=function(e,r,t){return n.typeOf.object("color",e),n.typeOf.number("scalar",r),n.typeOf.object("result",t),t.red=e.red*r,t.green=e.green*r,t.blue=e.blue*r,t.alpha=e.alpha*r,t},e.divideByScalar=function(e,r,t){return n.typeOf.object("color",e),n.typeOf.number("scalar",r),n.typeOf.object("result",t),t.red=e.red/r,t.green=e.green/r,t.blue=e.blue/r,t.alpha=e.alpha/r,t},e.ALICEBLUE=Object.freeze(e.fromCssColorString("#F0F8FF")),e.ANTIQUEWHITE=Object.freeze(e.fromCssColorString("#FAEBD7")),e.AQUA=Object.freeze(e.fromCssColorString("#00FFFF")),e.AQUAMARINE=Object.freeze(e.fromCssColorString("#7FFFD4")),e.AZURE=Object.freeze(e.fromCssColorString("#F0FFFF")),e.BEIGE=Object.freeze(e.fromCssColorString("#F5F5DC")),e.BISQUE=Object.freeze(e.fromCssColorString("#FFE4C4")),e.BLACK=Object.freeze(e.fromCssColorString("#000000")),e.BLANCHEDALMOND=Object.freeze(e.fromCssColorString("#FFEBCD")),e.BLUE=Object.freeze(e.fromCssColorString("#0000FF")),e.BLUEVIOLET=Object.freeze(e.fromCssColorString("#8A2BE2")),e.BROWN=Object.freeze(e.fromCssColorString("#A52A2A")),e.BURLYWOOD=Object.freeze(e.fromCssColorString("#DEB887")),e.CADETBLUE=Object.freeze(e.fromCssColorString("#5F9EA0")),e.CHARTREUSE=Object.freeze(e.fromCssColorString("#7FFF00")),e.CHOCOLATE=Object.freeze(e.fromCssColorString("#D2691E")),e.CORAL=Object.freeze(e.fromCssColorString("#FF7F50")),e.CORNFLOWERBLUE=Object.freeze(e.fromCssColorString("#6495ED")),e.CORNSILK=Object.freeze(e.fromCssColorString("#FFF8DC")),e.CRIMSON=Object.freeze(e.fromCssColorString("#DC143C")),e.CYAN=Object.freeze(e.fromCssColorString("#00FFFF")),e.DARKBLUE=Object.freeze(e.fromCssColorString("#00008B")),e.DARKCYAN=Object.freeze(e.fromCssColorString("#008B8B")),e.DARKGOLDENROD=Object.freeze(e.fromCssColorString("#B8860B")),e.DARKGRAY=Object.freeze(e.fromCssColorString("#A9A9A9")),e.DARKGREEN=Object.freeze(e.fromCssColorString("#006400")),e.DARKGREY=e.DARKGRAY,e.DARKKHAKI=Object.freeze(e.fromCssColorString("#BDB76B")),e.DARKMAGENTA=Object.freeze(e.fromCssColorString("#8B008B")),e.DARKOLIVEGREEN=Object.freeze(e.fromCssColorString("#556B2F")),e.DARKORANGE=Object.freeze(e.fromCssColorString("#FF8C00")),e.DARKORCHID=Object.freeze(e.fromCssColorString("#9932CC")),e.DARKRED=Object.freeze(e.fromCssColorString("#8B0000")),e.DARKSALMON=Object.freeze(e.fromCssColorString("#E9967A")),e.DARKSEAGREEN=Object.freeze(e.fromCssColorString("#8FBC8F")),e.DARKSLATEBLUE=Object.freeze(e.fromCssColorString("#483D8B")),e.DARKSLATEGRAY=Object.freeze(e.fromCssColorString("#2F4F4F")),e.DARKSLATEGREY=e.DARKSLATEGRAY,e.DARKTURQUOISE=Object.freeze(e.fromCssColorString("#00CED1")),e.DARKVIOLET=Object.freeze(e.fromCssColorString("#9400D3")),e.DEEPPINK=Object.freeze(e.fromCssColorString("#FF1493")),e.DEEPSKYBLUE=Object.freeze(e.fromCssColorString("#00BFFF")),e.DIMGRAY=Object.freeze(e.fromCssColorString("#696969")),e.DIMGREY=e.DIMGRAY,e.DODGERBLUE=Object.freeze(e.fromCssColorString("#1E90FF")),e.FIREBRICK=Object.freeze(e.fromCssColorString("#B22222")),e.FLORALWHITE=Object.freeze(e.fromCssColorString("#FFFAF0")),e.FORESTGREEN=Object.freeze(e.fromCssColorString("#228B22")),e.FUCHSIA=Object.freeze(e.fromCssColorString("#FF00FF")),e.GAINSBORO=Object.freeze(e.fromCssColorString("#DCDCDC")),e.GHOSTWHITE=Object.freeze(e.fromCssColorString("#F8F8FF")),e.GOLD=Object.freeze(e.fromCssColorString("#FFD700")),e.GOLDENROD=Object.freeze(e.fromCssColorString("#DAA520")),e.GRAY=Object.freeze(e.fromCssColorString("#808080")),e.GREEN=Object.freeze(e.fromCssColorString("#008000")),e.GREENYELLOW=Object.freeze(e.fromCssColorString("#ADFF2F")),e.GREY=e.GRAY,e.HONEYDEW=Object.freeze(e.fromCssColorString("#F0FFF0")),e.HOTPINK=Object.freeze(e.fromCssColorString("#FF69B4")),e.INDIANRED=Object.freeze(e.fromCssColorString("#CD5C5C")),e.INDIGO=Object.freeze(e.fromCssColorString("#4B0082")),e.IVORY=Object.freeze(e.fromCssColorString("#FFFFF0")),e.KHAKI=Object.freeze(e.fromCssColorString("#F0E68C")),e.LAVENDER=Object.freeze(e.fromCssColorString("#E6E6FA")),e.LAVENDAR_BLUSH=Object.freeze(e.fromCssColorString("#FFF0F5")),e.LAWNGREEN=Object.freeze(e.fromCssColorString("#7CFC00")),e.LEMONCHIFFON=Object.freeze(e.fromCssColorString("#FFFACD")),e.LIGHTBLUE=Object.freeze(e.fromCssColorString("#ADD8E6")),e.LIGHTCORAL=Object.freeze(e.fromCssColorString("#F08080")),e.LIGHTCYAN=Object.freeze(e.fromCssColorString("#E0FFFF")),e.LIGHTGOLDENRODYELLOW=Object.freeze(e.fromCssColorString("#FAFAD2")),e.LIGHTGRAY=Object.freeze(e.fromCssColorString("#D3D3D3")),e.LIGHTGREEN=Object.freeze(e.fromCssColorString("#90EE90")),e.LIGHTGREY=e.LIGHTGRAY,e.LIGHTPINK=Object.freeze(e.fromCssColorString("#FFB6C1")),e.LIGHTSEAGREEN=Object.freeze(e.fromCssColorString("#20B2AA")),e.LIGHTSKYBLUE=Object.freeze(e.fromCssColorString("#87CEFA")),e.LIGHTSLATEGRAY=Object.freeze(e.fromCssColorString("#778899")),e.LIGHTSLATEGREY=e.LIGHTSLATEGRAY,e.LIGHTSTEELBLUE=Object.freeze(e.fromCssColorString("#B0C4DE")),e.LIGHTYELLOW=Object.freeze(e.fromCssColorString("#FFFFE0")),e.LIME=Object.freeze(e.fromCssColorString("#00FF00")),e.LIMEGREEN=Object.freeze(e.fromCssColorString("#32CD32")),e.LINEN=Object.freeze(e.fromCssColorString("#FAF0E6")),e.MAGENTA=Object.freeze(e.fromCssColorString("#FF00FF")),e.MAROON=Object.freeze(e.fromCssColorString("#800000")),e.MEDIUMAQUAMARINE=Object.freeze(e.fromCssColorString("#66CDAA")),e.MEDIUMBLUE=Object.freeze(e.fromCssColorString("#0000CD")),e.MEDIUMORCHID=Object.freeze(e.fromCssColorString("#BA55D3")),e.MEDIUMPURPLE=Object.freeze(e.fromCssColorString("#9370DB")),e.MEDIUMSEAGREEN=Object.freeze(e.fromCssColorString("#3CB371")),e.MEDIUMSLATEBLUE=Object.freeze(e.fromCssColorString("#7B68EE")),e.MEDIUMSPRINGGREEN=Object.freeze(e.fromCssColorString("#00FA9A")),e.MEDIUMTURQUOISE=Object.freeze(e.fromCssColorString("#48D1CC")),e.MEDIUMVIOLETRED=Object.freeze(e.fromCssColorString("#C71585")),e.MIDNIGHTBLUE=Object.freeze(e.fromCssColorString("#191970")),e.MINTCREAM=Object.freeze(e.fromCssColorString("#F5FFFA")),e.MISTYROSE=Object.freeze(e.fromCssColorString("#FFE4E1")),e.MOCCASIN=Object.freeze(e.fromCssColorString("#FFE4B5")),e.NAVAJOWHITE=Object.freeze(e.fromCssColorString("#FFDEAD")),e.NAVY=Object.freeze(e.fromCssColorString("#000080")),e.OLDLACE=Object.freeze(e.fromCssColorString("#FDF5E6")),e.OLIVE=Object.freeze(e.fromCssColorString("#808000")),e.OLIVEDRAB=Object.freeze(e.fromCssColorString("#6B8E23")),e.ORANGE=Object.freeze(e.fromCssColorString("#FFA500")),e.ORANGERED=Object.freeze(e.fromCssColorString("#FF4500")),e.ORCHID=Object.freeze(e.fromCssColorString("#DA70D6")),e.PALEGOLDENROD=Object.freeze(e.fromCssColorString("#EEE8AA")),e.PALEGREEN=Object.freeze(e.fromCssColorString("#98FB98")),e.PALETURQUOISE=Object.freeze(e.fromCssColorString("#AFEEEE")),e.PALEVIOLETRED=Object.freeze(e.fromCssColorString("#DB7093")),e.PAPAYAWHIP=Object.freeze(e.fromCssColorString("#FFEFD5")),e.PEACHPUFF=Object.freeze(e.fromCssColorString("#FFDAB9")),e.PERU=Object.freeze(e.fromCssColorString("#CD853F")),e.PINK=Object.freeze(e.fromCssColorString("#FFC0CB")),e.PLUM=Object.freeze(e.fromCssColorString("#DDA0DD")),e.POWDERBLUE=Object.freeze(e.fromCssColorString("#B0E0E6")),e.PURPLE=Object.freeze(e.fromCssColorString("#800080")),e.RED=Object.freeze(e.fromCssColorString("#FF0000")),e.ROSYBROWN=Object.freeze(e.fromCssColorString("#BC8F8F")),e.ROYALBLUE=Object.freeze(e.fromCssColorString("#4169E1")),e.SADDLEBROWN=Object.freeze(e.fromCssColorString("#8B4513")),e.SALMON=Object.freeze(e.fromCssColorString("#FA8072")),e.SANDYBROWN=Object.freeze(e.fromCssColorString("#F4A460")),e.SEAGREEN=Object.freeze(e.fromCssColorString("#2E8B57")),e.SEASHELL=Object.freeze(e.fromCssColorString("#FFF5EE")),e.SIENNA=Object.freeze(e.fromCssColorString("#A0522D")),e.SILVER=Object.freeze(e.fromCssColorString("#C0C0C0")),e.SKYBLUE=Object.freeze(e.fromCssColorString("#87CEEB")),e.SLATEBLUE=Object.freeze(e.fromCssColorString("#6A5ACD")),e.SLATEGRAY=Object.freeze(e.fromCssColorString("#708090")),e.SLATEGREY=e.SLATEGRAY,e.SNOW=Object.freeze(e.fromCssColorString("#FFFAFA")),e.SPRINGGREEN=Object.freeze(e.fromCssColorString("#00FF7F")),e.STEELBLUE=Object.freeze(e.fromCssColorString("#4682B4")),e.TAN=Object.freeze(e.fromCssColorString("#D2B48C")),e.TEAL=Object.freeze(e.fromCssColorString("#008080")),e.THISTLE=Object.freeze(e.fromCssColorString("#D8BFD8")),e.TOMATO=Object.freeze(e.fromCssColorString("#FF6347")),e.TURQUOISE=Object.freeze(e.fromCssColorString("#40E0D0")),e.VIOLET=Object.freeze(e.fromCssColorString("#EE82EE")),e.WHEAT=Object.freeze(e.fromCssColorString("#F5DEB3")),e.WHITE=Object.freeze(e.fromCssColorString("#FFFFFF")),e.WHITESMOKE=Object.freeze(e.fromCssColorString("#F5F5F5")),e.YELLOW=Object.freeze(e.fromCssColorString("#FFFF00")),e.YELLOWGREEN=Object.freeze(e.fromCssColorString("#9ACD32")),e.TRANSPARENT=Object.freeze(new e(0,0,0,0));var h=e;export{h as a}; \ No newline at end of file +/*! For license information please see chunk-GUUUD723.js.LICENSE.txt */ +import{a as j}from"./chunk-PCFGFNNQ.js";import{a as E}from"./chunk-JMWWNZHX.js";import{a as C}from"./chunk-Z3SYNMQT.js";import{b as n}from"./chunk-4KGDZUZQ.js";import{e as O}from"./chunk-F3TINEFX.js";function l(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),6*t<1?e+6*(r-e)*t:2*t<1?r:3*t<2?e+(r-e)*(2/3-t)*6:e}function e(e,r,t,o){this.red=C(e,1),this.green=C(r,1),this.blue=C(t,1),this.alpha=C(o,1)}var A,g,m;e.fromCartesian4=function(r,t){return n.typeOf.object("cartesian",r),O(t)?(t.red=r.x,t.green=r.y,t.blue=r.z,t.alpha=r.w,t):new e(r.x,r.y,r.z,r.w)},e.fromBytes=function(r,t,o,n,s){return r=e.byteToFloat(C(r,255)),t=e.byteToFloat(C(t,255)),o=e.byteToFloat(C(o,255)),n=e.byteToFloat(C(n,255)),O(s)?(s.red=r,s.green=t,s.blue=o,s.alpha=n,s):new e(r,t,o,n)},e.fromAlpha=function(r,t,o){return n.typeOf.object("color",r),n.typeOf.number("alpha",t),O(o)?(o.red=r.red,o.green=r.green,o.blue=r.blue,o.alpha=t,o):new e(r.red,r.green,r.blue,t)},j.supportsTypedArrays()&&(A=new ArrayBuffer(4),g=new Uint32Array(A),m=new Uint8Array(A)),e.fromRgba=function(r,t){return g[0]=r,e.fromBytes(m[0],m[1],m[2],m[3],t)},e.fromHsl=function(r,t,o,n,s){r=C(r,0)%1,t=C(t,0),o=C(o,0),n=C(n,1);let f=o,i=o,a=o;if(0!==t){let e;e=o<.5?o*(1+t):o+t-o*t;let n=2*o-e;f=l(n,e,r+1/3),i=l(n,e,r),a=l(n,e,r-1/3)}return O(s)?(s.red=f,s.green=i,s.blue=a,s.alpha=n,s):new e(f,i,a,n)},e.fromRandom=function(r,t){let o=(r=C(r,C.EMPTY_OBJECT)).red;if(!O(o)){let e=C(r.minimumRed,0),t=C(r.maximumRed,1);n.typeOf.number.lessThanOrEquals("minimumRed",e,t),o=e+E.nextRandomNumber()*(t-e)}let s=r.green;if(!O(s)){let e=C(r.minimumGreen,0),t=C(r.maximumGreen,1);n.typeOf.number.lessThanOrEquals("minimumGreen",e,t),s=e+E.nextRandomNumber()*(t-e)}let f=r.blue;if(!O(f)){let e=C(r.minimumBlue,0),t=C(r.maximumBlue,1);n.typeOf.number.lessThanOrEquals("minimumBlue",e,t),f=e+E.nextRandomNumber()*(t-e)}let l=r.alpha;if(!O(l)){let e=C(r.minimumAlpha,0),t=C(r.maximumAlpha,1);n.typeOf.number.lessThanOrEquals("minumumAlpha",e,t),l=e+E.nextRandomNumber()*(t-e)}return O(t)?(t.red=o,t.green=s,t.blue=f,t.alpha=l,t):new e(o,s,f,l)};var a=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,z=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,p=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,R=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;e.fromCssColorString=function(r,t){n.typeOf.string("color",r),O(t)||(t=new e);let o=e[(r=r.trim()).toUpperCase()];if(O(o))return e.clone(o,t),t;let s=a.exec(r);return null!==s?(t.red=parseInt(s[1],16)/15,t.green=parseInt(s[2],16)/15,t.blue=parseInt(s[3],16)/15,t.alpha=parseInt(C(s[4],"f"),16)/15,t):(s=z.exec(r),null!==s?(t.red=parseInt(s[1],16)/255,t.green=parseInt(s[2],16)/255,t.blue=parseInt(s[3],16)/255,t.alpha=parseInt(C(s[4],"ff"),16)/255,t):(s=p.exec(r),null!==s?(t.red=parseFloat(s[1])/("%"===s[1].substr(-1)?100:255),t.green=parseFloat(s[2])/("%"===s[2].substr(-1)?100:255),t.blue=parseFloat(s[3])/("%"===s[3].substr(-1)?100:255),t.alpha=parseFloat(C(s[4],"1.0")),t):(s=R.exec(r),null!==s?e.fromHsl(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,parseFloat(C(s[4],"1.0")),t):t=void 0)))},e.packedLength=4,e.pack=function(e,r,t){return n.typeOf.object("value",e),n.defined("array",r),t=C(t,0),r[t++]=e.red,r[t++]=e.green,r[t++]=e.blue,r[t]=e.alpha,r},e.unpack=function(r,t,o){return n.defined("array",r),t=C(t,0),O(o)||(o=new e),o.red=r[t++],o.green=r[t++],o.blue=r[t++],o.alpha=r[t],o},e.byteToFloat=function(e){return e/255},e.floatToByte=function(e){return 1===e?255:256*e|0},e.clone=function(r,t){if(O(r))return O(t)?(t.red=r.red,t.green=r.green,t.blue=r.blue,t.alpha=r.alpha,t):new e(r.red,r.green,r.blue,r.alpha)},e.equals=function(e,r){return e===r||O(e)&&O(r)&&e.red===r.red&&e.green===r.green&&e.blue===r.blue&&e.alpha===r.alpha},e.equalsArray=function(e,r,t){return e.red===r[t]&&e.green===r[t+1]&&e.blue===r[t+2]&&e.alpha===r[t+3]},e.prototype.clone=function(r){return e.clone(this,r)},e.prototype.equals=function(r){return e.equals(this,r)},e.prototype.equalsEpsilon=function(e,r){return this===e||O(e)&&Math.abs(this.red-e.red)<=r&&Math.abs(this.green-e.green)<=r&&Math.abs(this.blue-e.blue)<=r&&Math.abs(this.alpha-e.alpha)<=r},e.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`},e.prototype.toCssColorString=function(){let r=e.floatToByte(this.red),t=e.floatToByte(this.green),o=e.floatToByte(this.blue);return 1===this.alpha?`rgb(${r},${t},${o})`:`rgba(${r},${t},${o},${this.alpha})`},e.prototype.toCssHexString=function(){let r=e.floatToByte(this.red).toString(16);r.length<2&&(r=`0${r}`);let t=e.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let o=e.floatToByte(this.blue).toString(16);if(o.length<2&&(o=`0${o}`),this.alpha<1){let n=e.floatToByte(this.alpha).toString(16);return n.length<2&&(n=`0${n}`),`#${r}${t}${o}${n}`}return`#${r}${t}${o}`},e.prototype.toBytes=function(r){let t=e.floatToByte(this.red),o=e.floatToByte(this.green),n=e.floatToByte(this.blue),s=e.floatToByte(this.alpha);return O(r)?(r[0]=t,r[1]=o,r[2]=n,r[3]=s,r):[t,o,n,s]},e.prototype.toRgba=function(){return m[0]=e.floatToByte(this.red),m[1]=e.floatToByte(this.green),m[2]=e.floatToByte(this.blue),m[3]=e.floatToByte(this.alpha),g[0]},e.prototype.brighten=function(e,r){return n.typeOf.number("magnitude",e),n.typeOf.number.greaterThanOrEquals("magnitude",e,0),n.typeOf.object("result",r),e=1-e,r.red=1-(1-this.red)*e,r.green=1-(1-this.green)*e,r.blue=1-(1-this.blue)*e,r.alpha=this.alpha,r},e.prototype.darken=function(e,r){return n.typeOf.number("magnitude",e),n.typeOf.number.greaterThanOrEquals("magnitude",e,0),n.typeOf.object("result",r),e=1-e,r.red=this.red*e,r.green=this.green*e,r.blue=this.blue*e,r.alpha=this.alpha,r},e.prototype.withAlpha=function(r,t){return e.fromAlpha(this,r,t)},e.add=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red+r.red,t.green=e.green+r.green,t.blue=e.blue+r.blue,t.alpha=e.alpha+r.alpha,t},e.subtract=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red-r.red,t.green=e.green-r.green,t.blue=e.blue-r.blue,t.alpha=e.alpha-r.alpha,t},e.multiply=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red*r.red,t.green=e.green*r.green,t.blue=e.blue*r.blue,t.alpha=e.alpha*r.alpha,t},e.divide=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red/r.red,t.green=e.green/r.green,t.blue=e.blue/r.blue,t.alpha=e.alpha/r.alpha,t},e.mod=function(e,r,t){return n.typeOf.object("left",e),n.typeOf.object("right",r),n.typeOf.object("result",t),t.red=e.red%r.red,t.green=e.green%r.green,t.blue=e.blue%r.blue,t.alpha=e.alpha%r.alpha,t},e.lerp=function(e,r,t,o){return n.typeOf.object("start",e),n.typeOf.object("end",r),n.typeOf.number("t",t),n.typeOf.object("result",o),o.red=E.lerp(e.red,r.red,t),o.green=E.lerp(e.green,r.green,t),o.blue=E.lerp(e.blue,r.blue,t),o.alpha=E.lerp(e.alpha,r.alpha,t),o},e.multiplyByScalar=function(e,r,t){return n.typeOf.object("color",e),n.typeOf.number("scalar",r),n.typeOf.object("result",t),t.red=e.red*r,t.green=e.green*r,t.blue=e.blue*r,t.alpha=e.alpha*r,t},e.divideByScalar=function(e,r,t){return n.typeOf.object("color",e),n.typeOf.number("scalar",r),n.typeOf.object("result",t),t.red=e.red/r,t.green=e.green/r,t.blue=e.blue/r,t.alpha=e.alpha/r,t},e.ALICEBLUE=Object.freeze(e.fromCssColorString("#F0F8FF")),e.ANTIQUEWHITE=Object.freeze(e.fromCssColorString("#FAEBD7")),e.AQUA=Object.freeze(e.fromCssColorString("#00FFFF")),e.AQUAMARINE=Object.freeze(e.fromCssColorString("#7FFFD4")),e.AZURE=Object.freeze(e.fromCssColorString("#F0FFFF")),e.BEIGE=Object.freeze(e.fromCssColorString("#F5F5DC")),e.BISQUE=Object.freeze(e.fromCssColorString("#FFE4C4")),e.BLACK=Object.freeze(e.fromCssColorString("#000000")),e.BLANCHEDALMOND=Object.freeze(e.fromCssColorString("#FFEBCD")),e.BLUE=Object.freeze(e.fromCssColorString("#0000FF")),e.BLUEVIOLET=Object.freeze(e.fromCssColorString("#8A2BE2")),e.BROWN=Object.freeze(e.fromCssColorString("#A52A2A")),e.BURLYWOOD=Object.freeze(e.fromCssColorString("#DEB887")),e.CADETBLUE=Object.freeze(e.fromCssColorString("#5F9EA0")),e.CHARTREUSE=Object.freeze(e.fromCssColorString("#7FFF00")),e.CHOCOLATE=Object.freeze(e.fromCssColorString("#D2691E")),e.CORAL=Object.freeze(e.fromCssColorString("#FF7F50")),e.CORNFLOWERBLUE=Object.freeze(e.fromCssColorString("#6495ED")),e.CORNSILK=Object.freeze(e.fromCssColorString("#FFF8DC")),e.CRIMSON=Object.freeze(e.fromCssColorString("#DC143C")),e.CYAN=Object.freeze(e.fromCssColorString("#00FFFF")),e.DARKBLUE=Object.freeze(e.fromCssColorString("#00008B")),e.DARKCYAN=Object.freeze(e.fromCssColorString("#008B8B")),e.DARKGOLDENROD=Object.freeze(e.fromCssColorString("#B8860B")),e.DARKGRAY=Object.freeze(e.fromCssColorString("#A9A9A9")),e.DARKGREEN=Object.freeze(e.fromCssColorString("#006400")),e.DARKGREY=e.DARKGRAY,e.DARKKHAKI=Object.freeze(e.fromCssColorString("#BDB76B")),e.DARKMAGENTA=Object.freeze(e.fromCssColorString("#8B008B")),e.DARKOLIVEGREEN=Object.freeze(e.fromCssColorString("#556B2F")),e.DARKORANGE=Object.freeze(e.fromCssColorString("#FF8C00")),e.DARKORCHID=Object.freeze(e.fromCssColorString("#9932CC")),e.DARKRED=Object.freeze(e.fromCssColorString("#8B0000")),e.DARKSALMON=Object.freeze(e.fromCssColorString("#E9967A")),e.DARKSEAGREEN=Object.freeze(e.fromCssColorString("#8FBC8F")),e.DARKSLATEBLUE=Object.freeze(e.fromCssColorString("#483D8B")),e.DARKSLATEGRAY=Object.freeze(e.fromCssColorString("#2F4F4F")),e.DARKSLATEGREY=e.DARKSLATEGRAY,e.DARKTURQUOISE=Object.freeze(e.fromCssColorString("#00CED1")),e.DARKVIOLET=Object.freeze(e.fromCssColorString("#9400D3")),e.DEEPPINK=Object.freeze(e.fromCssColorString("#FF1493")),e.DEEPSKYBLUE=Object.freeze(e.fromCssColorString("#00BFFF")),e.DIMGRAY=Object.freeze(e.fromCssColorString("#696969")),e.DIMGREY=e.DIMGRAY,e.DODGERBLUE=Object.freeze(e.fromCssColorString("#1E90FF")),e.FIREBRICK=Object.freeze(e.fromCssColorString("#B22222")),e.FLORALWHITE=Object.freeze(e.fromCssColorString("#FFFAF0")),e.FORESTGREEN=Object.freeze(e.fromCssColorString("#228B22")),e.FUCHSIA=Object.freeze(e.fromCssColorString("#FF00FF")),e.GAINSBORO=Object.freeze(e.fromCssColorString("#DCDCDC")),e.GHOSTWHITE=Object.freeze(e.fromCssColorString("#F8F8FF")),e.GOLD=Object.freeze(e.fromCssColorString("#FFD700")),e.GOLDENROD=Object.freeze(e.fromCssColorString("#DAA520")),e.GRAY=Object.freeze(e.fromCssColorString("#808080")),e.GREEN=Object.freeze(e.fromCssColorString("#008000")),e.GREENYELLOW=Object.freeze(e.fromCssColorString("#ADFF2F")),e.GREY=e.GRAY,e.HONEYDEW=Object.freeze(e.fromCssColorString("#F0FFF0")),e.HOTPINK=Object.freeze(e.fromCssColorString("#FF69B4")),e.INDIANRED=Object.freeze(e.fromCssColorString("#CD5C5C")),e.INDIGO=Object.freeze(e.fromCssColorString("#4B0082")),e.IVORY=Object.freeze(e.fromCssColorString("#FFFFF0")),e.KHAKI=Object.freeze(e.fromCssColorString("#F0E68C")),e.LAVENDER=Object.freeze(e.fromCssColorString("#E6E6FA")),e.LAVENDAR_BLUSH=Object.freeze(e.fromCssColorString("#FFF0F5")),e.LAWNGREEN=Object.freeze(e.fromCssColorString("#7CFC00")),e.LEMONCHIFFON=Object.freeze(e.fromCssColorString("#FFFACD")),e.LIGHTBLUE=Object.freeze(e.fromCssColorString("#ADD8E6")),e.LIGHTCORAL=Object.freeze(e.fromCssColorString("#F08080")),e.LIGHTCYAN=Object.freeze(e.fromCssColorString("#E0FFFF")),e.LIGHTGOLDENRODYELLOW=Object.freeze(e.fromCssColorString("#FAFAD2")),e.LIGHTGRAY=Object.freeze(e.fromCssColorString("#D3D3D3")),e.LIGHTGREEN=Object.freeze(e.fromCssColorString("#90EE90")),e.LIGHTGREY=e.LIGHTGRAY,e.LIGHTPINK=Object.freeze(e.fromCssColorString("#FFB6C1")),e.LIGHTSEAGREEN=Object.freeze(e.fromCssColorString("#20B2AA")),e.LIGHTSKYBLUE=Object.freeze(e.fromCssColorString("#87CEFA")),e.LIGHTSLATEGRAY=Object.freeze(e.fromCssColorString("#778899")),e.LIGHTSLATEGREY=e.LIGHTSLATEGRAY,e.LIGHTSTEELBLUE=Object.freeze(e.fromCssColorString("#B0C4DE")),e.LIGHTYELLOW=Object.freeze(e.fromCssColorString("#FFFFE0")),e.LIME=Object.freeze(e.fromCssColorString("#00FF00")),e.LIMEGREEN=Object.freeze(e.fromCssColorString("#32CD32")),e.LINEN=Object.freeze(e.fromCssColorString("#FAF0E6")),e.MAGENTA=Object.freeze(e.fromCssColorString("#FF00FF")),e.MAROON=Object.freeze(e.fromCssColorString("#800000")),e.MEDIUMAQUAMARINE=Object.freeze(e.fromCssColorString("#66CDAA")),e.MEDIUMBLUE=Object.freeze(e.fromCssColorString("#0000CD")),e.MEDIUMORCHID=Object.freeze(e.fromCssColorString("#BA55D3")),e.MEDIUMPURPLE=Object.freeze(e.fromCssColorString("#9370DB")),e.MEDIUMSEAGREEN=Object.freeze(e.fromCssColorString("#3CB371")),e.MEDIUMSLATEBLUE=Object.freeze(e.fromCssColorString("#7B68EE")),e.MEDIUMSPRINGGREEN=Object.freeze(e.fromCssColorString("#00FA9A")),e.MEDIUMTURQUOISE=Object.freeze(e.fromCssColorString("#48D1CC")),e.MEDIUMVIOLETRED=Object.freeze(e.fromCssColorString("#C71585")),e.MIDNIGHTBLUE=Object.freeze(e.fromCssColorString("#191970")),e.MINTCREAM=Object.freeze(e.fromCssColorString("#F5FFFA")),e.MISTYROSE=Object.freeze(e.fromCssColorString("#FFE4E1")),e.MOCCASIN=Object.freeze(e.fromCssColorString("#FFE4B5")),e.NAVAJOWHITE=Object.freeze(e.fromCssColorString("#FFDEAD")),e.NAVY=Object.freeze(e.fromCssColorString("#000080")),e.OLDLACE=Object.freeze(e.fromCssColorString("#FDF5E6")),e.OLIVE=Object.freeze(e.fromCssColorString("#808000")),e.OLIVEDRAB=Object.freeze(e.fromCssColorString("#6B8E23")),e.ORANGE=Object.freeze(e.fromCssColorString("#FFA500")),e.ORANGERED=Object.freeze(e.fromCssColorString("#FF4500")),e.ORCHID=Object.freeze(e.fromCssColorString("#DA70D6")),e.PALEGOLDENROD=Object.freeze(e.fromCssColorString("#EEE8AA")),e.PALEGREEN=Object.freeze(e.fromCssColorString("#98FB98")),e.PALETURQUOISE=Object.freeze(e.fromCssColorString("#AFEEEE")),e.PALEVIOLETRED=Object.freeze(e.fromCssColorString("#DB7093")),e.PAPAYAWHIP=Object.freeze(e.fromCssColorString("#FFEFD5")),e.PEACHPUFF=Object.freeze(e.fromCssColorString("#FFDAB9")),e.PERU=Object.freeze(e.fromCssColorString("#CD853F")),e.PINK=Object.freeze(e.fromCssColorString("#FFC0CB")),e.PLUM=Object.freeze(e.fromCssColorString("#DDA0DD")),e.POWDERBLUE=Object.freeze(e.fromCssColorString("#B0E0E6")),e.PURPLE=Object.freeze(e.fromCssColorString("#800080")),e.RED=Object.freeze(e.fromCssColorString("#FF0000")),e.ROSYBROWN=Object.freeze(e.fromCssColorString("#BC8F8F")),e.ROYALBLUE=Object.freeze(e.fromCssColorString("#4169E1")),e.SADDLEBROWN=Object.freeze(e.fromCssColorString("#8B4513")),e.SALMON=Object.freeze(e.fromCssColorString("#FA8072")),e.SANDYBROWN=Object.freeze(e.fromCssColorString("#F4A460")),e.SEAGREEN=Object.freeze(e.fromCssColorString("#2E8B57")),e.SEASHELL=Object.freeze(e.fromCssColorString("#FFF5EE")),e.SIENNA=Object.freeze(e.fromCssColorString("#A0522D")),e.SILVER=Object.freeze(e.fromCssColorString("#C0C0C0")),e.SKYBLUE=Object.freeze(e.fromCssColorString("#87CEEB")),e.SLATEBLUE=Object.freeze(e.fromCssColorString("#6A5ACD")),e.SLATEGRAY=Object.freeze(e.fromCssColorString("#708090")),e.SLATEGREY=e.SLATEGRAY,e.SNOW=Object.freeze(e.fromCssColorString("#FFFAFA")),e.SPRINGGREEN=Object.freeze(e.fromCssColorString("#00FF7F")),e.STEELBLUE=Object.freeze(e.fromCssColorString("#4682B4")),e.TAN=Object.freeze(e.fromCssColorString("#D2B48C")),e.TEAL=Object.freeze(e.fromCssColorString("#008080")),e.THISTLE=Object.freeze(e.fromCssColorString("#D8BFD8")),e.TOMATO=Object.freeze(e.fromCssColorString("#FF6347")),e.TURQUOISE=Object.freeze(e.fromCssColorString("#40E0D0")),e.VIOLET=Object.freeze(e.fromCssColorString("#EE82EE")),e.WHEAT=Object.freeze(e.fromCssColorString("#F5DEB3")),e.WHITE=Object.freeze(e.fromCssColorString("#FFFFFF")),e.WHITESMOKE=Object.freeze(e.fromCssColorString("#F5F5F5")),e.YELLOW=Object.freeze(e.fromCssColorString("#FFFF00")),e.YELLOWGREEN=Object.freeze(e.fromCssColorString("#9ACD32")),e.TRANSPARENT=Object.freeze(new e(0,0,0,0));var h=e;export{h as a}; \ No newline at end of file diff --git a/Workers/chunk-GUUUD723.js.LICENSE.txt b/Workers/chunk-GUUUD723.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-GUUUD723.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-ZLPZ2L4F.js b/Workers/chunk-GWMEMIDW.js similarity index 87% rename from Workers/chunk-ZLPZ2L4F.js rename to Workers/chunk-GWMEMIDW.js index a801bc5..5de0bb9 100644 --- a/Workers/chunk-ZLPZ2L4F.js +++ b/Workers/chunk-GWMEMIDW.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-ZLPZ2L4F.js.LICENSE.txt */ -import{a as t}from"./chunk-RKPKWH3Z.js";import{a as O}from"./chunk-BIYNNQRQ.js";import{e as f}from"./chunk-ZLUSVROX.js";function n(n){n=t(n,t.EMPTY_OBJECT),this.position=t(n.position,!1),this.normal=t(n.normal,!1),this.st=t(n.st,!1),this.bitangent=t(n.bitangent,!1),this.tangent=t(n.tangent,!1),this.color=t(n.color,!1)}n.POSITION_ONLY=Object.freeze(new n({position:!0})),n.POSITION_AND_NORMAL=Object.freeze(new n({position:!0,normal:!0})),n.POSITION_NORMAL_AND_ST=Object.freeze(new n({position:!0,normal:!0,st:!0})),n.POSITION_AND_ST=Object.freeze(new n({position:!0,st:!0})),n.POSITION_AND_COLOR=Object.freeze(new n({position:!0,color:!0})),n.ALL=Object.freeze(new n({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),n.DEFAULT=n.POSITION_NORMAL_AND_ST,n.packedLength=6,n.pack=function(n,e,o){if(!f(n))throw new O("value is required");if(!f(e))throw new O("array is required");return o=t(o,0),e[o++]=n.position?1:0,e[o++]=n.normal?1:0,e[o++]=n.st?1:0,e[o++]=n.tangent?1:0,e[o++]=n.bitangent?1:0,e[o]=n.color?1:0,e},n.unpack=function(e,o,i){if(!f(e))throw new O("array is required");return o=t(o,0),f(i)||(i=new n),i.position=1===e[o++],i.normal=1===e[o++],i.st=1===e[o++],i.tangent=1===e[o++],i.bitangent=1===e[o++],i.color=1===e[o],i},n.clone=function(t,e){if(f(t))return f(e)||(e=new n),e.position=t.position,e.normal=t.normal,e.st=t.st,e.tangent=t.tangent,e.bitangent=t.bitangent,e.color=t.color,e};var _=n;export{_ as a}; \ No newline at end of file +/*! For license information please see chunk-GWMEMIDW.js.LICENSE.txt */ +import{a as t}from"./chunk-Z3SYNMQT.js";import{a as O}from"./chunk-4KGDZUZQ.js";import{e as f}from"./chunk-F3TINEFX.js";function n(n){n=t(n,t.EMPTY_OBJECT),this.position=t(n.position,!1),this.normal=t(n.normal,!1),this.st=t(n.st,!1),this.bitangent=t(n.bitangent,!1),this.tangent=t(n.tangent,!1),this.color=t(n.color,!1)}n.POSITION_ONLY=Object.freeze(new n({position:!0})),n.POSITION_AND_NORMAL=Object.freeze(new n({position:!0,normal:!0})),n.POSITION_NORMAL_AND_ST=Object.freeze(new n({position:!0,normal:!0,st:!0})),n.POSITION_AND_ST=Object.freeze(new n({position:!0,st:!0})),n.POSITION_AND_COLOR=Object.freeze(new n({position:!0,color:!0})),n.ALL=Object.freeze(new n({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),n.DEFAULT=n.POSITION_NORMAL_AND_ST,n.packedLength=6,n.pack=function(n,e,o){if(!f(n))throw new O("value is required");if(!f(e))throw new O("array is required");return o=t(o,0),e[o++]=n.position?1:0,e[o++]=n.normal?1:0,e[o++]=n.st?1:0,e[o++]=n.tangent?1:0,e[o++]=n.bitangent?1:0,e[o]=n.color?1:0,e},n.unpack=function(e,o,i){if(!f(e))throw new O("array is required");return o=t(o,0),f(i)||(i=new n),i.position=1===e[o++],i.normal=1===e[o++],i.st=1===e[o++],i.tangent=1===e[o++],i.bitangent=1===e[o++],i.color=1===e[o],i},n.clone=function(t,e){if(f(t))return f(e)||(e=new n),e.position=t.position,e.normal=t.normal,e.st=t.st,e.tangent=t.tangent,e.bitangent=t.bitangent,e.color=t.color,e};var _=n;export{_ as a}; \ No newline at end of file diff --git a/Workers/chunk-GWMEMIDW.js.LICENSE.txt b/Workers/chunk-GWMEMIDW.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-GWMEMIDW.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-HCYU7WEB.js b/Workers/chunk-HCYU7WEB.js new file mode 100644 index 0000000..7ddcc8c --- /dev/null +++ b/Workers/chunk-HCYU7WEB.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-HCYU7WEB.js.LICENSE.txt */ +import{a as y}from"./chunk-FZIR7YHL.js";import{d as L}from"./chunk-LYPPBP4Q.js";import{b as d,c as W}from"./chunk-S7TTFAYA.js";import{a as R}from"./chunk-TLYHKSDJ.js";import{a as s,c as T,d as q}from"./chunk-PYVDHCDQ.js";import{a as w}from"./chunk-JMWWNZHX.js";import{a as P}from"./chunk-Z3SYNMQT.js";import{a as A,b as z}from"./chunk-4KGDZUZQ.js";import{e as l}from"./chunk-F3TINEFX.js";function x(t,e){z.typeOf.object("ellipsoid",t),this._ellipsoid=t,this._cameraPosition=new s,this._cameraPositionInScaledSpace=new s,this._distanceToLimbInScaledSpaceSquared=0,l(e)&&(this.cameraPosition=e)}Object.defineProperties(x.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(t){let e=this._ellipsoid.transformPositionToScaledSpace(t,this._cameraPositionInScaledSpace),i=s.magnitudeSquared(e)-1;s.clone(t,this._cameraPosition),this._cameraPositionInScaledSpace=e,this._distanceToLimbInScaledSpaceSquared=i}}});var j=new s;x.prototype.isPointVisible=function(t){return F(this._ellipsoid.transformPositionToScaledSpace(t,j),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},x.prototype.isScaledSpacePointVisible=function(t){return F(t,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var it=new s;x.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(t,e){let i,o,r=this._ellipsoid;return l(e)&&e<0&&r.minimumRadius>-e?(o=it,o.x=this._cameraPosition.x/(r.radii.x+e),o.y=this._cameraPosition.y/(r.radii.y+e),o.z=this._cameraPosition.z/(r.radii.z+e),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),F(t,o,i)},x.prototype.computeHorizonCullingPoint=function(t,e,i){return Z(this._ellipsoid,t,e,i)};var U=q.clone(q.UNIT_SPHERE);x.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(t,e,i,o){return Z(v(this._ellipsoid,i,U),t,e,o)},x.prototype.computeHorizonCullingPointFromVertices=function(t,e,i,o,r){return Q(this._ellipsoid,t,e,i,o,r)},x.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(t,e,i,o,r,s){return Q(v(this._ellipsoid,r,U),t,e,i,o,s)};var nt=[];x.prototype.computeHorizonCullingPointFromRectangle=function(t,e,i){z.typeOf.object("rectangle",t);let o=W.subsample(t,e,0,nt),r=L.fromPoints(o);if(!(s.magnitude(r.center)<.1*e.minimumRadius))return this.computeHorizonCullingPoint(r.center,o,i)};var at=new s;function v(t,e,i){if(l(e)&&e<0&&t.minimumRadius>-e){let o=s.fromElements(t.radii.x+e,t.radii.y+e,t.radii.z+e,at);t=q.fromCartesian3(o,i)}return t}function Z(t,e,i,o){z.typeOf.object("directionToPoint",e),z.defined("positions",i),l(o)||(o=new s);let r=X(t,e),a=0;for(let e=0,o=i.length;e0:n>r&&n*n/s.magnitudeSquared(a)>r)}var st=new s,ct=new s;function J(t,e,i){let o=t.transformPositionToScaledSpace(e,st),r=s.magnitudeSquared(o),a=Math.sqrt(r),n=s.divideByScalar(o,a,ct);r=Math.max(1,r),a=Math.max(1,a);let c=1/a;return 1/(s.dot(n,i)*c-s.magnitude(s.cross(n,i,n))*(Math.sqrt(r-1)*c))}function K(t,e,i){if(!(e<=0||e===1/0||e!=e))return s.multiplyByScalar(t,e,i)}var D=new s;function X(t,e){return s.equals(e,s.ZERO)?e:(t.transformPositionToScaledSpace(e,D),s.normalize(D,D))}var zt=x,O={getHeight:function(t,e,i){if(!Number.isFinite(e))throw new A("scale must be a finite number.");if(!Number.isFinite(i))throw new A("relativeHeight must be a finite number.");return(t-i)*e+i}},rt=new s;O.getPosition=function(t,e,i,o,r){let a=e.cartesianToCartographic(t,rt);if(!l(a))return s.clone(t,r);let n=O.getHeight(a.height,i,o);return s.fromRadians(a.longitude,a.latitude,n,e,r)};var Y=O,mt={NONE:0,BITS12:1},S=Object.freeze(mt),E=new s,dt=new s,f=new T,V=new d,lt=new d,ht=Math.pow(2,12);function p(t,e,i,o,r,a,n,c,m,u){let h,f,p=S.NONE;if(l(e)&&l(i)&&l(o)&&l(r)){let t=e.minimum,a=e.maximum,n=s.subtract(a,t,dt),c=o-i;p=Math.max(s.maximumComponent(n),c)g.TWO_PI)throw new b("Rectangle width must be between 0 and 2 * pi");if(e.height<0||e.height>g.PI)throw new b("Rectangle height must be between 0 and pi");if(p(r)&&!g.equalsEpsilon(r.radii.x,r.radii.y,g.EPSILON15))throw new b("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");let i,s,c,d,u,l,m;if(n=W(n,0),a=W(a,0),r=W(r,F.WGS84),e.width<=g.PI){let t=k.center(e,$),h=r.cartographicToCartesian(t,bt),p=new K(h,r);m=p.plane;let f=t.longitude,w=e.south<0&&e.north>0?0:t.latitude,b=T.fromRadians(f,e.north,a,St),x=T.fromRadians(e.west,e.north,a,Tt),y=T.fromRadians(e.west,w,a,gt),g=T.fromRadians(e.west,e.south,a,Et),M=T.fromRadians(f,e.south,a,Rt),N=r.cartographicToCartesian(b,Wt),O=r.cartographicToCartesian(x,H),A=r.cartographicToCartesian(y,zt),I=r.cartographicToCartesian(g,tt),C=r.cartographicToCartesian(M,It),P=p.projectPointToNearestOnPlane(N,Lt),R=p.projectPointToNearestOnPlane(O,Ut),E=p.projectPointToNearestOnPlane(A,qt),z=p.projectPointToNearestOnPlane(I,jt),S=p.projectPointToNearestOnPlane(C,Bt);return i=Math.min(R.x,E.x,z.x),s=-i,d=Math.max(R.y,P.y),c=Math.min(z.y,S.y),x.height=g.height=n,O=r.cartographicToCartesian(x,H),I=r.cartographicToCartesian(g,tt),u=Math.min(L.getPointDistance(m,O),L.getPointDistance(m,I)),l=a,Q(p.origin,p.xAxis,p.yAxis,p.zAxis,i,s,c,d,u,l,o)}let h=e.south>0,f=e.north<0,w=h?e.south:f?e.north:0,x=k.center(e,$).longitude,y=t.fromRadians(x,w,a,r,vt);y.z=0;let M=Math.abs(y.x)=u?v.INSIDE:v.INTERSECTING};var at=new t,ct=new t,rt=new t,Ft=new t,et=new t,Jt=new t;m.distanceSquaredTo=function(e,n){if(!p(e))throw new b("box is required.");if(!p(n))throw new b("cartesian is required.");let a=t.subtract(n,e.center,nt),r=e.halfAxes,o=d.getColumn(r,0,at),i=d.getColumn(r,1,ct),s=d.getColumn(r,2,rt),c=t.magnitude(o),u=t.magnitude(i),l=t.magnitude(s),m=!0,h=!0,f=!0;c>0?t.divideByScalar(o,c,o):m=!1,u>0?t.divideByScalar(i,u,i):h=!1,l>0?t.divideByScalar(s,l,s):f=!1;let w,x,y,T=!m+!h+!f;if(1===T){let e=o;w=i,x=s,h?f||(e=s,x=o):(e=i,w=o),y=t.cross(w,x,et),e===o?o=y:e===i?i=y:e===s&&(s=y)}else if(2===T){w=o,h?w=i:f&&(w=s);let e=t.UNIT_Y;e.equalsEpsilon(w,g.EPSILON3)&&(e=t.UNIT_X),x=t.cross(w,e,Ft),t.normalize(x,x),y=t.cross(w,x,et),t.normalize(y,y),w===o?(i=x,s=y):w===i?(s=x,o=y):w===s&&(o=x,i=y)}else 3===T&&(o=t.UNIT_X,i=t.UNIT_Y,s=t.UNIT_Z);let M=Jt;M.x=t.dot(a,o),M.y=t.dot(a,i),M.z=t.dot(a,s);let N,O=0;return M.x<-c?(N=M.x+c,O+=N*N):M.x>c&&(N=M.x-c,O+=N*N),M.y<-u?(N=M.y+u,O+=N*N):M.y>u&&(N=M.y-u,O+=N*N),M.z<-l?(N=M.z+l,O+=N*N):M.z>l&&(N=M.z-l,O+=N*N),O};var Kt=new t,Qt=new t;m.computePlaneDistances=function(e,n,a,r){if(!p(e))throw new b("box is required.");if(!p(n))throw new b("position is required.");if(!p(a))throw new b("direction is required.");p(r)||(r=new J);let o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,s=e.center,c=e.halfAxes,u=d.getColumn(c,0,at),l=d.getColumn(c,1,ct),m=d.getColumn(c,2,rt),h=t.add(u,l,Kt);t.add(h,m,h),t.add(h,s,h);let f=t.subtract(h,n,Qt),w=t.dot(a,f);return o=Math.min(w,o),i=Math.max(w,i),t.add(s,u,h),t.add(h,l,h),t.subtract(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.add(s,u,h),t.subtract(h,l,h),t.add(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.add(s,u,h),t.subtract(h,l,h),t.subtract(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.subtract(s,u,h),t.add(h,l,h),t.add(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.subtract(s,u,h),t.add(h,l,h),t.subtract(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.subtract(s,u,h),t.subtract(h,l,h),t.add(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.subtract(s,u,h),t.subtract(h,l,h),t.subtract(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),r.start=o,r.stop=i,r};var $t=new t,Ht=new t,te=new t;m.computeCorners=function(e,n){z.typeOf.object("box",e),p(n)||(n=[new t,new t,new t,new t,new t,new t,new t,new t]);let a=e.center,r=e.halfAxes,o=d.getColumn(r,0,$t),i=d.getColumn(r,1,Ht),s=d.getColumn(r,2,te);return t.clone(a,n[0]),t.subtract(n[0],o,n[0]),t.subtract(n[0],i,n[0]),t.subtract(n[0],s,n[0]),t.clone(a,n[1]),t.subtract(n[1],o,n[1]),t.subtract(n[1],i,n[1]),t.add(n[1],s,n[1]),t.clone(a,n[2]),t.subtract(n[2],o,n[2]),t.add(n[2],i,n[2]),t.subtract(n[2],s,n[2]),t.clone(a,n[3]),t.subtract(n[3],o,n[3]),t.add(n[3],i,n[3]),t.add(n[3],s,n[3]),t.clone(a,n[4]),t.add(n[4],o,n[4]),t.subtract(n[4],i,n[4]),t.subtract(n[4],s,n[4]),t.clone(a,n[5]),t.add(n[5],o,n[5]),t.subtract(n[5],i,n[5]),t.add(n[5],s,n[5]),t.clone(a,n[6]),t.add(n[6],o,n[6]),t.add(n[6],i,n[6]),t.subtract(n[6],s,n[6]),t.clone(a,n[7]),t.add(n[7],o,n[7]),t.add(n[7],i,n[7]),t.add(n[7],s,n[7]),n};var ee=new d;m.computeTransformation=function(t,e){z.typeOf.object("box",t),p(e)||(e=new B);let n=t.center,a=d.multiplyByUniformScale(t.halfAxes,2,ee);return B.fromRotationTranslation(a,n,e)};var ne=new Z;m.isOccluded=function(t,e){if(!p(t))throw new b("box is required.");if(!p(e))throw new b("occluder is required.");let n=Z.fromOrientedBoundingBox(t,ne);return!e.isBoundingSphereVisible(n)},m.prototype.intersectPlane=function(t){return m.intersectPlane(this,t)},m.prototype.distanceSquaredTo=function(t){return m.distanceSquaredTo(this,t)},m.prototype.computePlaneDistances=function(t,e,n){return m.computePlaneDistances(this,t,e,n)},m.prototype.computeCorners=function(t){return m.computeCorners(this,t)},m.prototype.computeTransformation=function(t){return m.computeTransformation(this,t)},m.prototype.isOccluded=function(t){return m.isOccluded(this,t)},m.equals=function(e,n){return e===n||p(e)&&p(n)&&t.equals(e.center,n.center)&&d.equals(e.halfAxes,n.halfAxes)},m.prototype.clone=function(t){return m.clone(this,t)},m.prototype.equals=function(t){return m.equals(this,t)};var ye=m;export{ye as a}; \ No newline at end of file diff --git a/Workers/chunk-HRTRKKEE.js.LICENSE.txt b/Workers/chunk-HRTRKKEE.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-HRTRKKEE.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-IC7R2T5Y.js b/Workers/chunk-IC7R2T5Y.js new file mode 100644 index 0000000..bd24c07 --- /dev/null +++ b/Workers/chunk-IC7R2T5Y.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-IC7R2T5Y.js.LICENSE.txt */ +import{e as C}from"./chunk-LYPPBP4Q.js";import{a as n,e as b}from"./chunk-PYVDHCDQ.js";import{a as w}from"./chunk-JMWWNZHX.js";var j={},q=new n,L=new n,Q=new C,G=new b;function W(e,t,r,a,o,i,l,s,y,c){let m=e+t;n.multiplyByScalar(a,Math.cos(m),q),n.multiplyByScalar(r,Math.sin(m),L),n.add(q,L,q);let u=Math.cos(e);u*=u;let w=Math.sin(e);w*=w;let x=i/Math.sqrt(l*u+o*w)/s;return C.fromAxisAngle(q,x,Q),b.fromQuaternion(Q,G),b.multiplyByVector(G,y,c),n.normalize(c,c),n.multiplyByScalar(c,s,c),c}var U=new n,Z=new n,N=new n,v=new n;j.raisePositionsToHeight=function(e,t,r){let a=t.ellipsoid,o=t.height,i=t.extrudedHeight,l=r?e.length/3*2:e.length/3,s=new Float64Array(3*l),y=e.length,c=r?y:0;for(let t=0;t1;--p){if(_=w.PI_OVER_TWO-(p-1)*P,V=W(-_,i,z,h,y,m,c,u,x,V),E=W(_+Math.PI,i,z,h,y,m,c,u,x,E),t){for(T[g++]=V.x,T[g++]=V.y,T[g++]=V.z,d=2*(p-1)+2,O=1;O{var n=function(t){null==t&&(t=(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,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};n.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0},n.prototype.init_by_array=function(t,r){var n,e,i;for(this.init_seed(19650218),n=1,e=0,i=this.N>r?this.N:r;i;i--){var o=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(1664525*((4294901760&o)>>>16)<<16)+1664525*(65535&o))+t[e]+e,this.mt[n]>>>=0,e++,++n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),e>=r&&(e=0)}for(i=this.N-1;i;i--)o=this.mt[n-1]^this.mt[n-1]>>>30,this.mt[n]=(this.mt[n]^(1566083941*((4294901760&o)>>>16)<<16)+1566083941*(65535&o))-n,this.mt[n]>>>=0,++n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1);this.mt[0]=2147483648},n.prototype.random_int=function(){var t,r=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>>1^r[1&t];for(;n>>1^r[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^r[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,(t^=t>>>18)>>>0},n.prototype.random_int31=function(){return this.random_int()>>>1},n.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},n.prototype.random=function(){return this.random_int()*(1/4294967296)},n.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},n.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)},r.exports=n})),m=_(P(),1),r={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536,FOUR_GIGABYTES:4294967296};r.sign=f(Math.sign,(function(t){return 0==(t=+t)||t!=t?t:t>0?1:-1})),r.signNotZero=function(t){return t<0?-1:1},r.toSNorm=function(t,n){return n=f(n,255),Math.round((.5*r.clamp(t,-1,1)+.5)*n)},r.fromSNorm=function(t,n){return n=f(n,255),r.clamp(t,0,n)/n*2-1},r.normalize=function(t,n,e){return 0===(e=Math.max(e-n,0))?0:r.clamp((t-n)/e,0,1)},r.sinh=f(Math.sinh,(function(t){return(Math.exp(t)-Math.exp(-t))/2})),r.cosh=f(Math.cosh,(function(t){return(Math.exp(t)+Math.exp(-t))/2})),r.lerp=function(t,r,n){return(1-n)*t+n*r},r.PI=Math.PI,r.ONE_OVER_PI=1/Math.PI,r.PI_OVER_TWO=Math.PI/2,r.PI_OVER_THREE=Math.PI/3,r.PI_OVER_FOUR=Math.PI/4,r.PI_OVER_SIX=Math.PI/6,r.THREE_PI_OVER_TWO=3*Math.PI/2,r.TWO_PI=2*Math.PI,r.ONE_OVER_TWO_PI=1/(2*Math.PI),r.RADIANS_PER_DEGREE=Math.PI/180,r.DEGREES_PER_RADIAN=180/Math.PI,r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600,r.toRadians=function(t){if(!o(t))throw new n("degrees is required.");return t*r.RADIANS_PER_DEGREE},r.toDegrees=function(t){if(!o(t))throw new n("radians is required.");return t*r.DEGREES_PER_RADIAN},r.convertLongitudeRange=function(t){if(!o(t))throw new n("angle is required.");let e=r.TWO_PI,i=t-Math.floor(t/e)*e;return i<-Math.PI?i+e:i>=Math.PI?i-e:i},r.clampToLatitudeRange=function(t){if(!o(t))throw new n("angle is required.");return r.clamp(t,-1*r.PI_OVER_TWO,r.PI_OVER_TWO)},r.negativePiToPi=function(t){if(!o(t))throw new n("angle is required.");return t>=-r.PI&&t<=r.PI?t:r.zeroToTwoPi(t+r.PI)-r.PI},r.zeroToTwoPi=function(t){if(!o(t))throw new n("angle is required.");if(t>=0&&t<=r.TWO_PI)return t;let e=r.mod(t,r.TWO_PI);return Math.abs(e)r.EPSILON14?r.TWO_PI:e},r.mod=function(t,e){if(!o(t))throw new n("m is required.");if(!o(e))throw new n("n is required.");if(0===e)throw new n("divisor cannot be 0.");return r.sign(t)===r.sign(e)&&Math.abs(t)e},r.greaterThanOrEquals=function(t,r,e){if(!o(t))throw new n("first is required.");if(!o(r))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-r>-e};var w=[1];r.factorial=function(t){if("number"!=typeof t||t<0)throw new n("A number greater than or equal to 0 is required.");let r=w.length;if(t>=r){let n=w[r-1];for(let e=r;e<=t;e++){let t=n*e;w.push(t),n=t}}return w[t]},r.incrementWrap=function(t,r,e){if(e=f(e,0),!o(t))throw new n("n is required.");if(r<=e)throw new n("maximumValue must be greater than minimumValue.");return++t>r&&(t=e),t},r.isPowerOfTwo=function(t){if("number"!=typeof t||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return 0!==t&&0==(t&t-1)},r.nextPowerOfTwo=function(t){if("number"!=typeof t||t<0||t>2147483648)throw new n("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},r.previousPowerOfTwo=function(t){if("number"!=typeof t||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,((t|=t>>32)>>>0)-(t>>>1)},r.clamp=function(t,r,n){return c.typeOf.number("value",t),c.typeOf.number("min",r),c.typeOf.number("max",n),tn?n:t};var E=new m.default;r.setRandomNumberSeed=function(t){if(!o(t))throw new n("seed is required.");E=new m.default(t)},r.nextRandomNumber=function(){return E.random()},r.randomBetween=function(t,n){return r.nextRandomNumber()*(n-t)+t},r.acosClamped=function(t){if(!o(t))throw new n("value is required.");return Math.acos(r.clamp(t,-1,1))},r.asinClamped=function(t){if(!o(t))throw new n("value is required.");return Math.asin(r.clamp(t,-1,1))},r.chordLength=function(t,r){if(!o(t))throw new n("angle is required.");if(!o(r))throw new n("radius is required.");return 2*r*Math.sin(.5*t)},r.logBase=function(t,r){if(!o(t))throw new n("number is required.");if(!o(r))throw new n("base is required.");return Math.log(t)/Math.log(r)},r.cbrt=f(Math.cbrt,(function(t){let r=Math.pow(Math.abs(t),.3333333333333333);return t<0?-r:r})),r.log2=f(Math.log2,(function(t){return Math.log(t)*Math.LOG2E})),r.fog=function(t,r){let n=t*r;return 1-Math.exp(-n*n)},r.fastApproximateAtan=function(t){return c.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)},r.fastApproximateAtan2=function(t,e){c.typeOf.number("x",t),c.typeOf.number("y",e);let i,o=Math.abs(t);i=Math.abs(e);let s=Math.max(o,i);i=Math.min(o,i);let h=i/s;if(isNaN(h))throw new n("either x or y must be nonzero");return o=r.fastApproximateAtan(h),o=Math.abs(e)>Math.abs(t)?r.PI_OVER_TWO-o:o,o=t<0?r.PI-o:o,o=e<0?-o:o,o};var A=r;export{A as a}; \ No newline at end of file +/*! For license information please see chunk-JMWWNZHX.js.LICENSE.txt */ +import{a as f}from"./chunk-Z3SYNMQT.js";import{a as n,b as c}from"./chunk-4KGDZUZQ.js";import{c as I,d as _,e as o}from"./chunk-F3TINEFX.js";var P=I(((t,r)=>{var n=function(t){null==t&&(t=(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,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};n.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0},n.prototype.init_by_array=function(t,r){var n,e,i;for(this.init_seed(19650218),n=1,e=0,i=this.N>r?this.N:r;i;i--){var o=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(1664525*((4294901760&o)>>>16)<<16)+1664525*(65535&o))+t[e]+e,this.mt[n]>>>=0,e++,++n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),e>=r&&(e=0)}for(i=this.N-1;i;i--)o=this.mt[n-1]^this.mt[n-1]>>>30,this.mt[n]=(this.mt[n]^(1566083941*((4294901760&o)>>>16)<<16)+1566083941*(65535&o))-n,this.mt[n]>>>=0,++n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1);this.mt[0]=2147483648},n.prototype.random_int=function(){var t,r=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>>1^r[1&t];for(;n>>1^r[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^r[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,(t^=t>>>18)>>>0},n.prototype.random_int31=function(){return this.random_int()>>>1},n.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},n.prototype.random=function(){return this.random_int()*(1/4294967296)},n.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},n.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)},r.exports=n})),m=_(P(),1),r={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536,FOUR_GIGABYTES:4294967296};r.sign=f(Math.sign,(function(t){return 0==(t=+t)||t!=t?t:t>0?1:-1})),r.signNotZero=function(t){return t<0?-1:1},r.toSNorm=function(t,n){return n=f(n,255),Math.round((.5*r.clamp(t,-1,1)+.5)*n)},r.fromSNorm=function(t,n){return n=f(n,255),r.clamp(t,0,n)/n*2-1},r.normalize=function(t,n,e){return 0===(e=Math.max(e-n,0))?0:r.clamp((t-n)/e,0,1)},r.sinh=f(Math.sinh,(function(t){return(Math.exp(t)-Math.exp(-t))/2})),r.cosh=f(Math.cosh,(function(t){return(Math.exp(t)+Math.exp(-t))/2})),r.lerp=function(t,r,n){return(1-n)*t+n*r},r.PI=Math.PI,r.ONE_OVER_PI=1/Math.PI,r.PI_OVER_TWO=Math.PI/2,r.PI_OVER_THREE=Math.PI/3,r.PI_OVER_FOUR=Math.PI/4,r.PI_OVER_SIX=Math.PI/6,r.THREE_PI_OVER_TWO=3*Math.PI/2,r.TWO_PI=2*Math.PI,r.ONE_OVER_TWO_PI=1/(2*Math.PI),r.RADIANS_PER_DEGREE=Math.PI/180,r.DEGREES_PER_RADIAN=180/Math.PI,r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600,r.toRadians=function(t){if(!o(t))throw new n("degrees is required.");return t*r.RADIANS_PER_DEGREE},r.toDegrees=function(t){if(!o(t))throw new n("radians is required.");return t*r.DEGREES_PER_RADIAN},r.convertLongitudeRange=function(t){if(!o(t))throw new n("angle is required.");let e=r.TWO_PI,i=t-Math.floor(t/e)*e;return i<-Math.PI?i+e:i>=Math.PI?i-e:i},r.clampToLatitudeRange=function(t){if(!o(t))throw new n("angle is required.");return r.clamp(t,-1*r.PI_OVER_TWO,r.PI_OVER_TWO)},r.negativePiToPi=function(t){if(!o(t))throw new n("angle is required.");return t>=-r.PI&&t<=r.PI?t:r.zeroToTwoPi(t+r.PI)-r.PI},r.zeroToTwoPi=function(t){if(!o(t))throw new n("angle is required.");if(t>=0&&t<=r.TWO_PI)return t;let e=r.mod(t,r.TWO_PI);return Math.abs(e)r.EPSILON14?r.TWO_PI:e},r.mod=function(t,e){if(!o(t))throw new n("m is required.");if(!o(e))throw new n("n is required.");if(0===e)throw new n("divisor cannot be 0.");return r.sign(t)===r.sign(e)&&Math.abs(t)e},r.greaterThanOrEquals=function(t,r,e){if(!o(t))throw new n("first is required.");if(!o(r))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-r>-e};var w=[1];r.factorial=function(t){if("number"!=typeof t||t<0)throw new n("A number greater than or equal to 0 is required.");let r=w.length;if(t>=r){let n=w[r-1];for(let e=r;e<=t;e++){let t=n*e;w.push(t),n=t}}return w[t]},r.incrementWrap=function(t,r,e){if(e=f(e,0),!o(t))throw new n("n is required.");if(r<=e)throw new n("maximumValue must be greater than minimumValue.");return++t>r&&(t=e),t},r.isPowerOfTwo=function(t){if("number"!=typeof t||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return 0!==t&&0==(t&t-1)},r.nextPowerOfTwo=function(t){if("number"!=typeof t||t<0||t>2147483648)throw new n("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},r.previousPowerOfTwo=function(t){if("number"!=typeof t||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,((t|=t>>32)>>>0)-(t>>>1)},r.clamp=function(t,r,n){return c.typeOf.number("value",t),c.typeOf.number("min",r),c.typeOf.number("max",n),tn?n:t};var E=new m.default;r.setRandomNumberSeed=function(t){if(!o(t))throw new n("seed is required.");E=new m.default(t)},r.nextRandomNumber=function(){return E.random()},r.randomBetween=function(t,n){return r.nextRandomNumber()*(n-t)+t},r.acosClamped=function(t){if(!o(t))throw new n("value is required.");return Math.acos(r.clamp(t,-1,1))},r.asinClamped=function(t){if(!o(t))throw new n("value is required.");return Math.asin(r.clamp(t,-1,1))},r.chordLength=function(t,r){if(!o(t))throw new n("angle is required.");if(!o(r))throw new n("radius is required.");return 2*r*Math.sin(.5*t)},r.logBase=function(t,r){if(!o(t))throw new n("number is required.");if(!o(r))throw new n("base is required.");return Math.log(t)/Math.log(r)},r.cbrt=f(Math.cbrt,(function(t){let r=Math.pow(Math.abs(t),.3333333333333333);return t<0?-r:r})),r.log2=f(Math.log2,(function(t){return Math.log(t)*Math.LOG2E})),r.fog=function(t,r){let n=t*r;return 1-Math.exp(-n*n)},r.fastApproximateAtan=function(t){return c.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)},r.fastApproximateAtan2=function(t,e){c.typeOf.number("x",t),c.typeOf.number("y",e);let i,o=Math.abs(t);i=Math.abs(e);let s=Math.max(o,i);i=Math.min(o,i);let h=i/s;if(isNaN(h))throw new n("either x or y must be nonzero");return o=r.fastApproximateAtan(h),o=Math.abs(e)>Math.abs(t)?r.PI_OVER_TWO-o:o,o=t<0?r.PI-o:o,o=e<0?-o:o,o};var A=r;export{A as a}; \ No newline at end of file diff --git a/Workers/chunk-JMWWNZHX.js.LICENSE.txt b/Workers/chunk-JMWWNZHX.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-JMWWNZHX.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-NXLA2DOI.js b/Workers/chunk-JXMT2ZQS.js similarity index 62% rename from Workers/chunk-NXLA2DOI.js rename to Workers/chunk-JXMT2ZQS.js index aa37410..854e1b8 100644 --- a/Workers/chunk-NXLA2DOI.js +++ b/Workers/chunk-JXMT2ZQS.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-NXLA2DOI.js.LICENSE.txt */ -import{a as y,b as P,c as W}from"./chunk-V624RX7A.js";import{a as L}from"./chunk-VZ2RFJ3P.js";import{a as B}from"./chunk-RKPKWH3Z.js";import{b as q}from"./chunk-BIYNNQRQ.js";import{e as T}from"./chunk-ZLUSVROX.js";function Y(t){let a=t._uSquared,i=t._ellipsoid.maximumRadius,n=t._ellipsoid.minimumRadius,e=(i-n)/i,s=Math.cos(t._startHeading),h=Math.sin(t._startHeading),r=(1-e)*Math.tan(t._start.latitude),o=1/Math.sqrt(1+r*r),d=o*r,c=Math.atan2(r,s),u=o*h,l=u*u,M=1-l,_=Math.sqrt(M),g=a/4,p=g*g,f=p*g,m=p*p,q=1+g-3*p/4+5*f/4-175*m/64,v=1-g+15*p/8-35*f/8,H=1-3*g+35*p/4,O=1-5*g,P=q*c-v*Math.sin(2*c)*g/2-H*Math.sin(4*c)*p/16-O*Math.sin(6*c)*f/48-5*Math.sin(8*c)*m/512,y=t._constants;y.a=i,y.b=n,y.f=e,y.cosineHeading=s,y.sineHeading=h,y.tanU=r,y.cosineU=o,y.sineU=d,y.sigma=c,y.sineAlpha=u,y.sineSquaredAlpha=l,y.cosineSquaredAlpha=M,y.cosineAlpha=_,y.u2Over4=g,y.u4Over16=p,y.u6Over64=f,y.u8Over256=m,y.a0=q,y.a1=v,y.a2=H,y.a3=O,y.distanceRatio=P}function Z(t,a){return t*a*(4+t*(4-3*a))/16}function k(t,a,i,n,e,s,h){let r=Z(t,i);return(1-r)*t*a*(n+r*e*(h+r*s*(2*h*h-1)))}function $(t,a,i,n,e,s,h){let r,o,d,c,u,l=(a-i)/a,M=s-n,_=Math.atan((1-l)*Math.tan(e)),g=Math.atan((1-l)*Math.tan(h)),p=Math.cos(_),f=Math.sin(_),m=Math.cos(g),q=Math.sin(g),v=p*m,H=p*q,O=f*q,P=f*m,y=M,R=L.TWO_PI,S=Math.cos(y),b=Math.sin(y);do{S=Math.cos(y),b=Math.sin(y);let t,a=H-P*S;d=Math.sqrt(m*m*b*b+a*a),o=O+v*S,r=Math.atan2(d,o),0===d?(t=0,c=1):(t=v*b/d,c=1-t*t),R=y,u=o-2*O/c,isFinite(u)||(u=0),y=M+k(l,t,c,r,d,o,u)}while(Math.abs(y-R)>L.EPSILON12);let E=c*(a*a-i*i)/(i*i),U=E*(256+E*(E*(74-47*E)-128))/1024,j=u*u,A=i*(1+E*(4096+E*(E*(320-175*E)-768))/16384)*(r-U*d*(u+U*(o*(2*j-1)-U*u*(4*d*d-3)*(4*j-3)/6)/4)),T=Math.atan2(m*b,H-P*S),w=Math.atan2(p*b,H*S-P);t._distance=A,t._startHeading=T,t._endHeading=w,t._uSquared=E}var j=new y,x=new y;function N(t,a,i,n){let e=y.normalize(n.cartographicToCartesian(a,x),j),s=y.normalize(n.cartographicToCartesian(i,x),x);q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(y.angleBetween(e,s))-Math.PI),.0125),$(t,n.maximumRadius,n.minimumRadius,a.longitude,a.latitude,i.longitude,i.latitude),t._start=P.clone(a,t._start),t._end=P.clone(i,t._end),t._start.height=0,t._end.height=0,Y(t)}function E(t,a,i){let n=B(i,W.WGS84);this._ellipsoid=n,this._start=new P,this._end=new P,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,T(t)&&T(a)&&N(this,t,a,n)}Object.defineProperties(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return q.defined("distance",this._distance),this._endHeading}}}),E.prototype.setEndPoints=function(t,a){q.defined("start",t),q.defined("end",a),N(this,t,a,this._ellipsoid)},E.prototype.interpolateUsingFraction=function(t,a){return this.interpolateUsingSurfaceDistance(this._distance*t,a)},E.prototype.interpolateUsingSurfaceDistance=function(t,a){q.defined("distance",this._distance);let i=this._constants,n=i.distanceRatio+t/i.b,e=Math.cos(2*n),s=Math.cos(4*n),h=Math.cos(6*n),r=Math.sin(2*n),o=Math.sin(4*n),d=Math.sin(6*n),c=Math.sin(8*n),u=n*n,l=n*u,M=i.u8Over256,_=i.u2Over4,g=i.u6Over64,p=i.u4Over16,f=2*l*M*e/3+n*(1-_+7*p/4-15*g/4+579*M/64-(p-15*g/4+187*M/16)*e-(5*g/4-115*M/16)*s-29*M*h/16)+(_/2-p+71*g/32-85*M/16)*r+(5*p/16-5*g/4+383*M/96)*o-u*((g-11*M/2)*r+5*M*o/2)+(29*g/96-29*M/16)*d+539*M*c/1536,m=Math.asin(Math.sin(f)*i.cosineAlpha),v=Math.atan(i.a/i.b*Math.tan(m));f-=i.sigma;let H=Math.cos(2*i.sigma+f),O=Math.sin(f),y=Math.cos(f),R=i.cosineU*y,S=i.sineU*O,b=Math.atan2(O*i.sineHeading,R-S*i.cosineHeading)-k(i.f,i.sineAlpha,i.cosineSquaredAlpha,f,O,y,H);return T(a)?(a.longitude=this._start.longitude+b,a.latitude=v,a.height=0,a):new P(this._start.longitude+b,v,0)};var ct=E;export{ct as a}; \ No newline at end of file +/*! For license information please see chunk-JXMT2ZQS.js.LICENSE.txt */ +import{a as y,b as P,d as W}from"./chunk-PYVDHCDQ.js";import{a as L}from"./chunk-JMWWNZHX.js";import{a as B}from"./chunk-Z3SYNMQT.js";import{b as q}from"./chunk-4KGDZUZQ.js";import{e as T}from"./chunk-F3TINEFX.js";function Y(t){let a=t._uSquared,i=t._ellipsoid.maximumRadius,n=t._ellipsoid.minimumRadius,e=(i-n)/i,s=Math.cos(t._startHeading),h=Math.sin(t._startHeading),r=(1-e)*Math.tan(t._start.latitude),o=1/Math.sqrt(1+r*r),d=o*r,c=Math.atan2(r,s),u=o*h,l=u*u,M=1-l,_=Math.sqrt(M),g=a/4,p=g*g,f=p*g,m=p*p,q=1+g-3*p/4+5*f/4-175*m/64,H=1-g+15*p/8-35*f/8,v=1-3*g+35*p/4,O=1-5*g,P=q*c-H*Math.sin(2*c)*g/2-v*Math.sin(4*c)*p/16-O*Math.sin(6*c)*f/48-5*Math.sin(8*c)*m/512,y=t._constants;y.a=i,y.b=n,y.f=e,y.cosineHeading=s,y.sineHeading=h,y.tanU=r,y.cosineU=o,y.sineU=d,y.sigma=c,y.sineAlpha=u,y.sineSquaredAlpha=l,y.cosineSquaredAlpha=M,y.cosineAlpha=_,y.u2Over4=g,y.u4Over16=p,y.u6Over64=f,y.u8Over256=m,y.a0=q,y.a1=H,y.a2=v,y.a3=O,y.distanceRatio=P}function Z(t,a){return t*a*(4+t*(4-3*a))/16}function k(t,a,i,n,e,s,h){let r=Z(t,i);return(1-r)*t*a*(n+r*e*(h+r*s*(2*h*h-1)))}function $(t,a,i,n,e,s,h){let r,o,d,c,u,l=(a-i)/a,M=s-n,_=Math.atan((1-l)*Math.tan(e)),g=Math.atan((1-l)*Math.tan(h)),p=Math.cos(_),f=Math.sin(_),m=Math.cos(g),q=Math.sin(g),H=p*m,v=p*q,O=f*q,P=f*m,y=M,S=L.TWO_PI,b=Math.cos(y),E=Math.sin(y);do{b=Math.cos(y),E=Math.sin(y);let t,a=v-P*b;d=Math.sqrt(m*m*E*E+a*a),o=O+H*b,r=Math.atan2(d,o),0===d?(t=0,c=1):(t=H*E/d,c=1-t*t),S=y,u=o-2*O/c,isFinite(u)||(u=0),y=M+k(l,t,c,r,d,o,u)}while(Math.abs(y-S)>L.EPSILON12);let T=c*(a*a-i*i)/(i*i),U=T*(256+T*(T*(74-47*T)-128))/1024,j=u*u,w=i*(1+T*(4096+T*(T*(320-175*T)-768))/16384)*(r-U*d*(u+U*(o*(2*j-1)-U*u*(4*d*d-3)*(4*j-3)/6)/4)),x=Math.atan2(m*E,v-P*b),A=Math.atan2(p*E,v*b-P);t._distance=w,t._startHeading=x,t._endHeading=A,t._uSquared=T}var j=new y,x=new y;function N(t,a,i,n){let e=y.normalize(n.cartographicToCartesian(a,x),j),s=y.normalize(n.cartographicToCartesian(i,x),x);q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(y.angleBetween(e,s))-Math.PI),.0125),$(t,n.maximumRadius,n.minimumRadius,a.longitude,a.latitude,i.longitude,i.latitude),t._start=P.clone(a,t._start),t._end=P.clone(i,t._end),t._start.height=0,t._end.height=0,Y(t)}function E(t,a,i){let n=B(i,W.WGS84);this._ellipsoid=n,this._start=new P,this._end=new P,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,T(t)&&T(a)&&N(this,t,a,n)}Object.defineProperties(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return q.defined("distance",this._distance),this._endHeading}}}),E.prototype.setEndPoints=function(t,a){q.defined("start",t),q.defined("end",a),N(this,t,a,this._ellipsoid)},E.prototype.interpolateUsingFraction=function(t,a){return this.interpolateUsingSurfaceDistance(this._distance*t,a)},E.prototype.interpolateUsingSurfaceDistance=function(t,a){q.defined("distance",this._distance);let i=this._constants,n=i.distanceRatio+t/i.b,e=Math.cos(2*n),s=Math.cos(4*n),h=Math.cos(6*n),r=Math.sin(2*n),o=Math.sin(4*n),d=Math.sin(6*n),c=Math.sin(8*n),u=n*n,l=n*u,M=i.u8Over256,_=i.u2Over4,g=i.u6Over64,p=i.u4Over16,f=2*l*M*e/3+n*(1-_+7*p/4-15*g/4+579*M/64-(p-15*g/4+187*M/16)*e-(5*g/4-115*M/16)*s-29*M*h/16)+(_/2-p+71*g/32-85*M/16)*r+(5*p/16-5*g/4+383*M/96)*o-u*((g-11*M/2)*r+5*M*o/2)+(29*g/96-29*M/16)*d+539*M*c/1536,m=Math.asin(Math.sin(f)*i.cosineAlpha),H=Math.atan(i.a/i.b*Math.tan(m));f-=i.sigma;let v=Math.cos(2*i.sigma+f),O=Math.sin(f),y=Math.cos(f),S=i.cosineU*y,b=i.sineU*O,E=Math.atan2(O*i.sineHeading,S-b*i.cosineHeading)-k(i.f,i.sineAlpha,i.cosineSquaredAlpha,f,O,y,v);return T(a)?(a.longitude=this._start.longitude+E,a.latitude=H,a.height=0,a):new P(this._start.longitude+E,H,0)};var ct=E;export{ct as a}; \ No newline at end of file diff --git a/Workers/chunk-JXMT2ZQS.js.LICENSE.txt b/Workers/chunk-JXMT2ZQS.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-JXMT2ZQS.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-KDW4RGIR.js b/Workers/chunk-KDW4RGIR.js deleted file mode 100644 index 0f36797..0000000 --- a/Workers/chunk-KDW4RGIR.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see chunk-KDW4RGIR.js.LICENSE.txt */ -import{a as L,b as x,c as dn,d as cn}from"./chunk-V624RX7A.js";import{a as E}from"./chunk-VZ2RFJ3P.js";import{a as Rn}from"./chunk-TWC6ISJU.js";import{a as T}from"./chunk-RKPKWH3Z.js";import{a as H,b as f}from"./chunk-BIYNNQRQ.js";import{e as M}from"./chunk-ZLUSVROX.js";function b(t,e,n,r){this.x=T(t,0),this.y=T(e,0),this.z=T(n,0),this.w=T(r,0)}b.fromElements=function(t,e,n,r,f){return M(f)?(f.x=t,f.y=e,f.z=n,f.w=r,f):new b(t,e,n,r)},b.fromColor=function(t,e){return f.typeOf.object("color",t),M(e)?(e.x=t.red,e.y=t.green,e.z=t.blue,e.w=t.alpha,e):new b(t.red,t.green,t.blue,t.alpha)},b.clone=function(t,e){if(M(t))return M(e)?(e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e):new b(t.x,t.y,t.z,t.w)},b.packedLength=4,b.pack=function(t,e,n){return f.typeOf.object("value",t),f.defined("array",e),n=T(n,0),e[n++]=t.x,e[n++]=t.y,e[n++]=t.z,e[n]=t.w,e},b.unpack=function(t,e,n){return f.defined("array",t),e=T(e,0),M(n)||(n=new b),n.x=t[e++],n.y=t[e++],n.z=t[e++],n.w=t[e],n},b.packArray=function(t,e){f.defined("array",t);let n=t.length,r=4*n;if(M(e)){if(!Array.isArray(e)&&e.length!==r)throw new H("If result is a typed array, it must have exactly array.length * 4 elements");e.length!==r&&(e.length=r)}else e=new Array(r);for(let r=0;r=0?f.longitude:f.longitude+E.TWO_PI;a=Math.min(a,c),o=Math.max(o,c)}return r-n>o-a&&(n=a,r=o,r>E.PI&&(r-=E.TWO_PI),n>E.PI&&(n-=E.TWO_PI)),M(e)?(e.west=n,e.south=u,e.east=r,e.north=i,e):new q(n,u,r,i)},q.fromCartesianArray=function(t,e,n){f.defined("cartesians",t),e=T(e,dn.WGS84);let r=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=Number.MAX_VALUE,u=-Number.MAX_VALUE,i=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let n=0,f=t.length;n=0?f.longitude:f.longitude+E.TWO_PI;o=Math.min(o,s),u=Math.max(u,s)}return a-r>u-o&&(r=o,a=u,a>E.PI&&(a-=E.TWO_PI),r>E.PI&&(r-=E.TWO_PI)),M(n)?(n.west=r,n.south=i,n.east=a,n.north=c,n):new q(r,i,a,c)},q.clone=function(t,e){if(M(t))return M(e)?(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e):new q(t.west,t.south,t.east,t.north)},q.equalsEpsilon=function(t,e,n){return n=T(n,0),t===e||M(t)&&M(e)&&Math.abs(t.west-e.west)<=n&&Math.abs(t.south-e.south)<=n&&Math.abs(t.east-e.east)<=n&&Math.abs(t.north-e.north)<=n},q.prototype.clone=function(t){return q.clone(this,t)},q.prototype.equals=function(t){return q.equals(this,t)},q.equals=function(t,e){return t===e||M(t)&&M(e)&&t.west===e.west&&t.south===e.south&&t.east===e.east&&t.north===e.north},q.prototype.equalsEpsilon=function(t,e){return q.equalsEpsilon(this,t,e)},q.validate=function(t){f.typeOf.object("rectangle",t);let e=t.north;f.typeOf.number.greaterThanOrEquals("north",e,-E.PI_OVER_TWO),f.typeOf.number.lessThanOrEquals("north",e,E.PI_OVER_TWO);let n=t.south;f.typeOf.number.greaterThanOrEquals("south",n,-E.PI_OVER_TWO),f.typeOf.number.lessThanOrEquals("south",n,E.PI_OVER_TWO);let r=t.west;f.typeOf.number.greaterThanOrEquals("west",r,-Math.PI),f.typeOf.number.lessThanOrEquals("west",r,Math.PI);let a=t.east;f.typeOf.number.greaterThanOrEquals("east",a,-Math.PI),f.typeOf.number.lessThanOrEquals("east",a,Math.PI)},q.southwest=function(t,e){return f.typeOf.object("rectangle",t),M(e)?(e.longitude=t.west,e.latitude=t.south,e.height=0,e):new x(t.west,t.south)},q.northwest=function(t,e){return f.typeOf.object("rectangle",t),M(e)?(e.longitude=t.west,e.latitude=t.north,e.height=0,e):new x(t.west,t.north)},q.northeast=function(t,e){return f.typeOf.object("rectangle",t),M(e)?(e.longitude=t.east,e.latitude=t.north,e.height=0,e):new x(t.east,t.north)},q.southeast=function(t,e){return f.typeOf.object("rectangle",t),M(e)?(e.longitude=t.east,e.latitude=t.south,e.height=0,e):new x(t.east,t.south)},q.center=function(t,e){f.typeOf.object("rectangle",t);let n=t.east,r=t.west;n0?r+=E.TWO_PI:o0&&(o+=E.TWO_PI),r=l?void 0:M(n)?(n.west=i,n.south=s,n.east=c,n.north=l,n):new q(i,s,c,l)},q.simpleIntersection=function(t,e,n){f.typeOf.object("rectangle",t),f.typeOf.object("otherRectangle",e);let r=Math.max(t.west,e.west),a=Math.max(t.south,e.south),o=Math.min(t.east,e.east),u=Math.min(t.north,e.north);if(!(a>=u||r>=o))return M(n)?(n.west=r,n.south=a,n.east=o,n.north=u,n):new q(r,a,o,u)},q.union=function(t,e,n){f.typeOf.object("rectangle",t),f.typeOf.object("otherRectangle",e),M(n)||(n=new q);let r=t.east,a=t.west,o=e.east,u=e.west;r0?r+=E.TWO_PI:o0&&(o+=E.TWO_PI),ra||E.equalsEpsilon(n,a,E.EPSILON14))&&(n=t.south&&r<=t.north};var Jn=new x;q.subsample=function(t,e,n,r){f.typeOf.object("rectangle",t),e=T(e,dn.WGS84),n=T(n,0),M(r)||(r=[]);let a=0,o=t.north,u=t.south,i=t.east,c=t.west,s=Jn;s.height=n,s.longitude=c,s.latitude=o,r[a]=e.cartographicToCartesian(s,r[a]),a++,s.longitude=i,r[a]=e.cartographicToCartesian(s,r[a]),a++,s.latitude=u,r[a]=e.cartographicToCartesian(s,r[a]),a++,s.longitude=c,r[a]=e.cartographicToCartesian(s,r[a]),a++,s.latitude=o<0?o:u>0?u:0;for(let n=1;n<8;++n)s.longitude=-Math.PI+n*E.PI_OVER_TWO,q.contains(t,s)&&(r[a]=e.cartographicToCartesian(s,r[a]),a++);return 0===s.latitude&&(s.longitude=c,r[a]=e.cartographicToCartesian(s,r[a]),a++,s.longitude=i,r[a]=e.cartographicToCartesian(s,r[a]),a++),r.length=a,r},q.subsection=function(t,e,n,r,a,o){if(f.typeOf.object("rectangle",t),f.typeOf.number.greaterThanOrEquals("westLerp",e,0),f.typeOf.number.lessThanOrEquals("westLerp",e,1),f.typeOf.number.greaterThanOrEquals("southLerp",n,0),f.typeOf.number.lessThanOrEquals("southLerp",n,1),f.typeOf.number.greaterThanOrEquals("eastLerp",r,0),f.typeOf.number.lessThanOrEquals("eastLerp",r,1),f.typeOf.number.greaterThanOrEquals("northLerp",a,0),f.typeOf.number.lessThanOrEquals("northLerp",a,1),f.typeOf.number.lessThanOrEquals("westLerp",e,r),f.typeOf.number.lessThanOrEquals("southLerp",n,a),M(o)||(o=new q),t.west<=t.east){let n=t.east-t.west;o.west=t.west+e*n,o.east=t.west+r*n}else{let n=E.TWO_PI+t.east-t.west;o.west=E.negativePiToPi(t.west+e*n),o.east=E.negativePiToPi(t.west+r*n)}let u=t.north-t.south;return o.south=t.south+n*u,o.north=t.south+a*u,1===e&&(o.west=t.east),1===r&&(o.east=t.east),1===n&&(o.south=t.north),1===a&&(o.north=t.north),o},q.MAX_VALUE=Object.freeze(new q(-Math.PI,-E.PI_OVER_TWO,Math.PI,E.PI_OVER_TWO));var mo=q;function w(t,e){this.x=T(t,0),this.y=T(e,0)}w.fromElements=function(t,e,n){return M(n)?(n.x=t,n.y=e,n):new w(t,e)},w.clone=function(t,e){if(M(t))return M(e)?(e.x=t.x,e.y=t.y,e):new w(t.x,t.y)},w.fromCartesian3=w.clone,w.fromCartesian4=w.clone,w.packedLength=2,w.pack=function(t,e,n){return f.typeOf.object("value",t),f.defined("array",e),n=T(n,0),e[n++]=t.x,e[n]=t.y,e},w.unpack=function(t,e,n){return f.defined("array",t),e=T(e,0),M(n)||(n=new w),n.x=t[e++],n.y=t[e],n},w.packArray=function(t,e){f.defined("array",t);let n=t.length,r=2*n;if(M(e)){if(!Array.isArray(e)&&e.length!==r)throw new H("If result is a typed array, it must have exactly array.length * 2 elements");e.length!==r&&(e.length=r)}else e=new Array(r);for(let r=0;r1;--p){if(_=w.PI_OVER_TWO-(p-1)*O,g=W(-_,i,f,h,y,m,c,u,x,g),A=W(_+Math.PI,i,f,h,y,m,c,u,x,A),e){for(T[V++]=g.x,T[V++]=g.y,T[V++]=g.z,P=2*(p-1)+2,d=1;da.EPSILON8)if(u=z(y(s,n,t.latitude)+e*Math.cos(i),s,n),Math.abs(i)0?a.negativePiToPi(t.longitude+d):a.negativePiToPi(t.longitude-d)}return l(h)?(h.longitude=o,h.latitude=u,h.height=0,h):new P(o,u,0)}function m(t,i,e){let a=T(e,q.WGS84);this._ellipsoid=a,this._start=new P,this._end=new P,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(t)&&l(i)&&D(this,t,i,a)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return g.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return g.defined("distance",this._distance),this._heading}}}),m.fromStartHeadingDistance=function(t,i,e,n,s){g.defined("start",t),g.defined("heading",i),g.defined("distance",e),g.typeOf.number.greaterThan("distance",e,0);let h=T(n,q.WGS84),o=h.maximumRadius,u=h.minimumRadius,d=o*o,r=u*u,c=Math.sqrt((d-r)/d),_=v(t,i=a.negativePiToPi(i),e,h.maximumRadius,c);return!l(s)||l(n)&&!n.equals(s.ellipsoid)?new m(t,_,h):(s.setEndPoints(t,_),s)},m.prototype.setEndPoints=function(t,i){g.defined("start",t),g.defined("end",i),D(this,t,i,this._ellipsoid)},m.prototype.interpolateUsingFraction=function(t,i){return this.interpolateUsingSurfaceDistance(t*this._distance,i)},m.prototype.interpolateUsingSurfaceDistance=function(t,i){if(g.typeOf.number("distance",t),!l(this._distance)||0===this._distance)throw new S("EllipsoidRhumbLine must have distinct start and end set.");return v(this._start,this._heading,t,this._ellipsoid.maximumRadius,this._ellipticity,i)},m.prototype.findIntersectionWithLongitude=function(t,i){if(g.typeOf.number("intersectionLongitude",t),!l(this._distance)||0===this._distance)throw new S("EllipsoidRhumbLine must have distinct start and end set.");let e=this._ellipticity,n=this._heading,s=Math.abs(n),h=this._start;if(t=a.negativePiToPi(t),a.equalsEpsilon(Math.abs(t),Math.PI,a.EPSILON14)&&(t=a.sign(h.longitude)*Math.PI),l(i)||(i=new P),Math.abs(a.PI_OVER_TWO-s)<=a.EPSILON8)return i.longitude=t,i.latitude=h.latitude,i.height=0,i;if(a.equalsEpsilon(Math.abs(a.PI_OVER_TWO-s),a.PI_OVER_TWO,a.EPSILON8))return a.equalsEpsilon(t,h.longitude,a.EPSILON12)?void 0:(i.longitude=t,i.latitude=a.PI_OVER_TWO*a.sign(a.PI_OVER_TWO-n),i.height=0,i);let o,u=h.latitude,d=e*Math.sin(u),r=Math.tan(.5*(a.PI_OVER_TWO+u))*Math.exp((t-h.longitude)/Math.tan(n)),c=(1+d)/(1-d),_=h.latitude;do{o=_;let t=e*Math.sin(o),i=(1+t)/(1-t);_=2*Math.atan(r*Math.pow(i/c,e/2))-a.PI_OVER_TWO}while(!a.equalsEpsilon(_,o,a.EPSILON12));return i.longitude=t,i.latitude=_,i.height=0,i},m.prototype.findIntersectionWithLatitude=function(t,i){if(g.typeOf.number("intersectionLatitude",t),!l(this._distance)||0===this._distance)throw new S("EllipsoidRhumbLine must have distinct start and end set.");let e=this._ellipticity,n=this._heading,s=this._start;if(a.equalsEpsilon(Math.abs(n),a.PI_OVER_TWO,a.EPSILON8))return;let h=O(e,s.latitude),o=O(e,t),u=Math.tan(n)*(o-h),d=a.negativePiToPi(s.longitude+u);return l(i)?(i.longitude=d,i.latitude=t,i.height=0,i):new P(d,t,0)};var $=m;export{$ as a}; \ No newline at end of file +/*! For license information please see chunk-KZVVSHMS.js.LICENSE.txt */ +import{a as p,b as P,d as q}from"./chunk-PYVDHCDQ.js";import{a}from"./chunk-JMWWNZHX.js";import{a as T}from"./chunk-Z3SYNMQT.js";import{a as S,b as g}from"./chunk-4KGDZUZQ.js";import{e as l}from"./chunk-F3TINEFX.js";function y(t,i,e){if(0===t)return i*e;let a=t*t,n=a*a,s=n*a,l=s*a,h=l*a,o=h*a,d=e;return i*((1-a/4-3*n/64-5*s/256-175*l/16384-441*h/65536-4851*o/1048576)*d-(3*a/8+3*n/32+45*s/1024+105*l/4096+2205*h/131072+6237*o/524288)*Math.sin(2*d)+(15*n/256+45*s/1024+525*l/16384+1575*h/65536+155925*o/8388608)*Math.sin(4*d)-(35*s/3072+175*l/12288+3675*h/262144+13475*o/1048576)*Math.sin(6*d)+(315*l/131072+2205*h/524288+43659*o/8388608)*Math.sin(8*d)-(693*h/1310720+6237*o/5242880)*Math.sin(10*d)+1001*o/8388608*Math.sin(12*d))}function z(t,i,e){let a=t/e;if(0===i)return a;let n=a*a,s=n*a,l=s*a,h=i*i,o=h*h,d=o*h,u=d*h,r=u*h,c=r*h,g=Math.sin(2*a),_=Math.cos(2*a),p=Math.sin(4*a),M=Math.cos(4*a),f=Math.sin(6*a),m=Math.cos(6*a),P=Math.sin(8*a),O=Math.cos(8*a),E=Math.sin(10*a);return a+a*h/4+7*a*o/64+15*a*d/256+579*a*u/16384+1515*a*r/65536+16837*a*c/1048576+(3*a*o/16+45*a*d/256-a*(32*n-561)*u/4096-a*(232*n-1677)*r/16384+a*(399985-90560*n+512*l)*c/5242880)*_+(21*a*d/256+483*a*u/4096-a*(224*n-1969)*r/16384-a*(33152*n-112599)*c/1048576)*M+(151*a*u/4096+4681*a*r/65536+1479*a*c/16384-453*s*c/32768)*m+(1097*a*r/65536+42783*a*c/1048576)*O+8011*a*c/1048576*Math.cos(10*a)+(3*h/8+3*o/16+213*d/2048-3*n*d/64+255*u/4096-33*n*u/512+20861*r/524288-33*n*r/512+l*r/1024+28273*c/1048576-471*n*c/8192+9*l*c/4096)*g+(21*o/256+21*d/256+533*u/8192-21*n*u/512+197*r/4096-315*n*r/4096+584039*c/16777216-12517*n*c/131072+7*l*c/2048)*p+(151*d/6144+151*u/4096+5019*r/131072-453*n*r/16384+26965*c/786432-8607*n*c/131072)*f+(1097*u/131072+1097*r/65536+225797*c/10485760-1097*n*c/65536)*P+(8011*r/2621440+8011*c/1048576)*E+293393*c/251658240*Math.sin(12*a)}function O(t,i){if(0===t)return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)));let e=t*Math.sin(i);return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)))-t/2*Math.log((1+e)/(1-e))}function G(t,i,e,n,s){let l=O(t._ellipticity,e),h=O(t._ellipticity,s);return Math.atan2(a.negativePiToPi(n-i),h-l)}function k(t,i,e,n,s,l,h){let o=t._heading,d=l-n,u=0;if(a.equalsEpsilon(Math.abs(o),a.PI_OVER_TWO,a.EPSILON8))if(i===e)u=i*Math.cos(s)*a.negativePiToPi(d);else{let e=Math.sin(s);u=i*Math.cos(s)*a.negativePiToPi(d)/Math.sqrt(1-t._ellipticitySquared*e*e)}else{let e=y(t._ellipticity,i,s);u=(y(t._ellipticity,i,h)-e)/Math.cos(o)}return Math.abs(u)}var A=new p,w=new p;function D(t,i,e,a){let n=p.normalize(a.cartographicToCartesian(i,w),A),s=p.normalize(a.cartographicToCartesian(e,w),w);g.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(p.angleBetween(n,s))-Math.PI),.0125);let l=a.maximumRadius,h=a.minimumRadius,o=l*l,d=h*h;t._ellipticitySquared=(o-d)/o,t._ellipticity=Math.sqrt(t._ellipticitySquared),t._start=P.clone(i,t._start),t._start.height=0,t._end=P.clone(e,t._end),t._end.height=0,t._heading=G(t,i.longitude,i.latitude,e.longitude,e.latitude),t._distance=k(t,a.maximumRadius,a.minimumRadius,i.longitude,i.latitude,e.longitude,e.latitude)}function v(t,i,e,n,s,h){if(0===e)return P.clone(t,h);let o,d,u,r=s*s;if(Math.abs(a.PI_OVER_TWO-Math.abs(i))>a.EPSILON8)if(d=z(y(s,n,t.latitude)+e*Math.cos(i),s,n),Math.abs(i)0?a.negativePiToPi(t.longitude+u):a.negativePiToPi(t.longitude-u)}return l(h)?(h.longitude=o,h.latitude=d,h.height=0,h):new P(o,d,0)}function m(t,i,e){let a=T(e,q.WGS84);this._ellipsoid=a,this._start=new P,this._end=new P,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(t)&&l(i)&&D(this,t,i,a)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return g.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return g.defined("distance",this._distance),this._heading}}}),m.fromStartHeadingDistance=function(t,i,e,n,s){g.defined("start",t),g.defined("heading",i),g.defined("distance",e),g.typeOf.number.greaterThan("distance",e,0);let h=T(n,q.WGS84),o=h.maximumRadius,d=h.minimumRadius,u=o*o,r=d*d,c=Math.sqrt((u-r)/u),_=v(t,i=a.negativePiToPi(i),e,h.maximumRadius,c);return!l(s)||l(n)&&!n.equals(s.ellipsoid)?new m(t,_,h):(s.setEndPoints(t,_),s)},m.prototype.setEndPoints=function(t,i){g.defined("start",t),g.defined("end",i),D(this,t,i,this._ellipsoid)},m.prototype.interpolateUsingFraction=function(t,i){return this.interpolateUsingSurfaceDistance(t*this._distance,i)},m.prototype.interpolateUsingSurfaceDistance=function(t,i){if(g.typeOf.number("distance",t),!l(this._distance)||0===this._distance)throw new S("EllipsoidRhumbLine must have distinct start and end set.");return v(this._start,this._heading,t,this._ellipsoid.maximumRadius,this._ellipticity,i)},m.prototype.findIntersectionWithLongitude=function(t,i){if(g.typeOf.number("intersectionLongitude",t),!l(this._distance)||0===this._distance)throw new S("EllipsoidRhumbLine must have distinct start and end set.");let e=this._ellipticity,n=this._heading,s=Math.abs(n),h=this._start;if(t=a.negativePiToPi(t),a.equalsEpsilon(Math.abs(t),Math.PI,a.EPSILON14)&&(t=a.sign(h.longitude)*Math.PI),l(i)||(i=new P),Math.abs(a.PI_OVER_TWO-s)<=a.EPSILON8)return i.longitude=t,i.latitude=h.latitude,i.height=0,i;if(a.equalsEpsilon(Math.abs(a.PI_OVER_TWO-s),a.PI_OVER_TWO,a.EPSILON8))return a.equalsEpsilon(t,h.longitude,a.EPSILON12)?void 0:(i.longitude=t,i.latitude=a.PI_OVER_TWO*a.sign(a.PI_OVER_TWO-n),i.height=0,i);let o,d=h.latitude,u=e*Math.sin(d),r=Math.tan(.5*(a.PI_OVER_TWO+d))*Math.exp((t-h.longitude)/Math.tan(n)),c=(1+u)/(1-u),_=h.latitude;do{o=_;let t=e*Math.sin(o),i=(1+t)/(1-t);_=2*Math.atan(r*Math.pow(i/c,e/2))-a.PI_OVER_TWO}while(!a.equalsEpsilon(_,o,a.EPSILON12));return i.longitude=t,i.latitude=_,i.height=0,i},m.prototype.findIntersectionWithLatitude=function(t,i){if(g.typeOf.number("intersectionLatitude",t),!l(this._distance)||0===this._distance)throw new S("EllipsoidRhumbLine must have distinct start and end set.");let e=this._ellipticity,n=this._heading,s=this._start;if(a.equalsEpsilon(Math.abs(n),a.PI_OVER_TWO,a.EPSILON8))return;let h=O(e,s.latitude),o=O(e,t),d=Math.tan(n)*(o-h),u=a.negativePiToPi(s.longitude+d);return l(i)?(i.longitude=u,i.latitude=t,i.height=0,i):new P(u,t,0)};var $=m;export{$ as a}; \ No newline at end of file diff --git a/Workers/chunk-KZVVSHMS.js.LICENSE.txt b/Workers/chunk-KZVVSHMS.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-KZVVSHMS.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-L2YBWJCT.js b/Workers/chunk-L2YBWJCT.js new file mode 100644 index 0000000..766b144 --- /dev/null +++ b/Workers/chunk-L2YBWJCT.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-L2YBWJCT.js.LICENSE.txt */ +import{a as w}from"./chunk-JMWWNZHX.js";var C={computePositions:function(t,o,a,r,n){let s,e=.5*t,i=-e,c=r+r,u=new Float64Array(3*(n?2*c:c)),f=0,h=0,l=n?3*c:0,m=n?3*(c+r):3*r;for(s=0;s{!function(r){var n="object"==typeof e&&e&&!e.nodeType&&e,o="object"==typeof t&&t&&!t.nodeType&&t,i="object"==typeof global&&global;(i.global===i||i.window===i||i.self===i)&&(r=i);var s,a,u=2147483647,l=36,c=26,f=38,d=700,p=/^xn--/,h=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=l-1,v=Math.floor,w=String.fromCharCode;function b(e){throw new RangeError(y[e])}function _(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function x(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+_((e=e.replace(m,".")).split("."),t).join(".")}function O(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=w((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+w(e)})).join("")}function S(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:l}function C(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,r){var n=0;for(e=r?v(e/d):e>>1,e+=v(e/t);e>g*c>>1;n+=l)e=v(e/g);return v(n+(g+1)*e/(e+f))}function A(e){var t,r,n,o,i,s,a,f,d,p,h=[],m=e.length,y=0,g=128,w=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&b("not-basic"),h.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=m&&b("invalid-input"),((f=S(e.charCodeAt(o++)))>=l||f>v((u-y)/s))&&b("overflow"),y+=f*s,!(f<(d=a<=w?1:a>=w+c?c:a-w));a+=l)s>v(u/(p=l-d))&&b("overflow"),s*=p;w=T(y-i,t=h.length+1,0==i),v(y/t)>u-g&&b("overflow"),g+=v(y/t),y%=t,h.splice(y++,0,g)}return E(h)}function q(e){var t,r,n,o,i,s,a,f,d,p,h,m,y,g,_,x=[];for(m=(e=O(e)).length,t=128,r=0,i=72,s=0;s=t&&hv((u-r)/(y=n+1))&&b("overflow"),r+=(a-t)*y,t=a,s=0;su&&b("overflow"),h==t){for(f=r,d=l;!(f<(p=d<=i?1:d>=i+c?c:d-i));d+=l)_=f-p,g=l-p,x.push(w(C(p+_%g,0))),f=v(_/g);x.push(w(C(f,0))),i=T(r,y,n==o),r=0,++n}++r,++t}return x.join("")}if(s={version:"1.3.2",ucs2:{decode:O,encode:E},decode:A,encode:q,toASCII:function(e){return x(e,(function(e){return h.test(e)?"xn--"+q(e):e}))},toUnicode:function(e){return x(e,(function(e){return p.test(e)?A(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return s}));else if(n&&o)if(t.exports==n)o.exports=s;else for(a in s)s.hasOwnProperty(a)&&(n[a]=s[a]);else r.punycode=s}(e)})),jn=pt(((e,t)=>{!function(e,r){"use strict";"object"==typeof t&&t.exports?t.exports=r():"function"==typeof define&&define.amd?define(r):e.IPv6=r(e)}(e,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r=e.toLowerCase().split(":"),n=r.length,o=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[n-1]&&""===r[n-2]&&r.pop(),-1!==r[(n=r.length)-1].indexOf(".")&&(o=7),t=0;t1;a++)i.splice(0,1);r[s]=i.join("")}var u=-1,l=0,c=0,f=-1,d=!1;for(s=0;sl&&(u=f,l=c)):"0"===r[s]&&(d=!0,f=s,c=1);c>l&&(u=f,l=c),l>1&&r.splice(u,l,""),n=r.length;var p="";for(""===r[0]&&(p=":"),s=0;s{!function(e,r){"use strict";"object"==typeof t&&t.exports?t.exports=r():"function"==typeof define&&define.amd?define(r):e.SecondLevelDomains=r(e)}(e,(function(e){"use strict";var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return!o||o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))})),je=pt(((e,t)=>{!function(e,r){"use strict";"object"==typeof t&&t.exports?t.exports=r(Mn(),jn(),Fn()):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],r):e.URI=r(e.punycode,e.IPv6,e.SecondLevelDomains,e)}(e,(function(e,t,r,n){"use strict";var o=n&&n.URI;function i(e,t){var r=arguments.length>=1;if(!(this instanceof i))return r?arguments.length>=2?new i(e,t):new i(e):new i;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e=typeof location<"u"?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.11";var s=i.prototype,a=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function c(e){return"Array"===l(e)}function f(e,t){var r,n,o={};if("RegExp"===l(t))o=null;else if(c(t))for(r=0,n=t.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=y,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=y,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var r=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch{return e}};var g,v={encode:"encode",decode:"decode"},w=function(e,t){return function(r){try{return i[t](r+"").replace(i.characters[e][t].expression,(function(r){return i.characters[e][t].map[r]}))}catch{return r}}};for(g in v)i[g+"PathSegment"]=w("pathname",v[g]),i[g+"UrnPathSegment"]=w("urnpath",v[g]);var b=function(e,t,r){return function(n){var o;o=r?function(e){return i[t](i[r](e))}:i[t];for(var s=(n+"").split(e),a=0,u=s.length;a-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),u=e.indexOf(":",s+1);-1!==u&&(-1===a||u-1?o:e.length-1);return s>-1&&(-1===o||s-1?p.slice(0,h)+p.slice(h).replace(s,""):p.replace(s,"")).length<=l[0].length||r.ignore&&r.ignore.test(p))){var g=t(p,c,d=c+p.length,e);if(void 0===g){n.lastIndex=d;continue}g=String(g),e=e.slice(0,c)+g+e.slice(d),n.lastIndex=c+g.length}}return n.lastIndex=0,e},i.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=d(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(function(e){return/^[0-9]+$/.test(e)}(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},s.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new i(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=_("protocol"),s.username=_("username"),s.password=_("password"),s.hostname=_("hostname"),s.port=_("port"),s.query=x("query","?"),s.fragment=x("fragment","#"),s.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},s.path=s.pathname,s.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var n=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[i.getDomAttribute(e)]||"",o=!1),!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var s=n?e._parts:e;for(r in s)"query"!==r&&a.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!t),this},s.is=function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=!1,l=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),a=(s=!(t=n||o))&&r&&r.has(this._parts.hostname),u=s&&i.idn_expression.test(this._parts.hostname),l=s&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var O=s.protocol,E=s.port,S=s.hostname;s.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return O.call(this,e,t)},s.scheme=s.protocol,s.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),E.call(this,e,t))},s.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return S.call(this,e,t)},s.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},s.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=i.buildUserinfo(this._parts);return r&&r.substring(0,r.length-1)}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},s.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},s.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),s=new RegExp("^"+u(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},s.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},s.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},s.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),a=new RegExp("^"+u(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},s.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?i.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var s=new RegExp(u(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),o?this.normalizePath(t):this.build(!t),this},s.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(r=o.substring(s+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,l=this.suffix();if(l)a=e?new RegExp(u(l)+"$"):new RegExp(u("."+l)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return a&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},s.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),s=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(c(t)){s=[];for(var a=0,u=t.length;aa.x&&f.clone(n,a),cu.y&&f.clone(n,u),dl.z&&f.clone(n,l)}let p=f.magnitudeSquared(f.subtract(a,o,ae)),h=f.magnitudeSquared(f.subtract(u,i,ae)),m=f.magnitudeSquared(f.subtract(l,s,ae)),y=o,g=a,v=p;h>v&&(v=h,y=i,g=u),m>v&&(v=m,y=s,g=l);let w=en;w.x=.5*(y.x+g.x),w.y=.5*(y.y+g.y),w.z=.5*(y.z+g.z);let b=f.magnitudeSquared(f.subtract(g,w,ae)),_=Math.sqrt(b),x=tn;x.x=o.x,x.y=i.y,x.z=s.z;let O=nn;O.x=a.x,O.y=u.y,O.z=l.z;let E=f.midpoint(x,O,rn),S=0;for(r=0;rS&&(S=t);let o=f.magnitudeSquared(f.subtract(n,w,ae));if(o>b){let e=Math.sqrt(o);_=.5*(_+e),b=_*_;let t=e-_;w.x=(_*w.x+t*n.x)/e,w.y=(_*w.y+t*n.y)/e,w.z=(_*w.z+t*n.z)/e}}return _l.x&&f.clone(o,l),nc.y&&f.clone(o,c),dp.z&&f.clone(o,p)}let m=f.magnitudeSquared(f.subtract(l,s,ae)),g=f.magnitudeSquared(f.subtract(c,a,ae)),w=f.magnitudeSquared(f.subtract(p,u,ae)),b=s,_=l,x=m;g>x&&(x=g,b=a,_=c),w>x&&(x=w,b=u,_=p);let O=en;O.x=.5*(b.x+_.x),O.y=.5*(b.y+_.y),O.z=.5*(b.z+_.z);let E=f.magnitudeSquared(f.subtract(_,O,ae)),S=Math.sqrt(E),C=tn;C.x=s.x,C.y=a.y,C.z=u.z;let T=nn;T.x=l.x,T.y=c.y,T.z=p.z;let A=f.midpoint(C,T,rn),q=0;for(i=0;iq&&(q=r);let n=f.magnitudeSquared(f.subtract(o,O,ae));if(n>E){let e=Math.sqrt(n);S=.5*(S+e),E=S*S;let t=e-S;O.x=(S*O.x+t*o.x)/e,O.y=(S*O.y+t*o.y)/e,O.z=(S*O.z+t*o.z)/e}}return Su.x&&f.clone(n,u),dl.y&&f.clone(n,l),pc.z&&f.clone(n,c)}let h=f.magnitudeSquared(f.subtract(u,i,ae)),m=f.magnitudeSquared(f.subtract(l,s,ae)),y=f.magnitudeSquared(f.subtract(c,a,ae)),g=i,v=u,w=h;m>w&&(w=m,g=s,v=l),y>w&&(w=y,g=a,v=c);let b=en;b.x=.5*(g.x+v.x),b.y=.5*(g.y+v.y),b.z=.5*(g.z+v.z);let _=f.magnitudeSquared(f.subtract(v,b,ae)),x=Math.sqrt(_),O=tn;O.x=i.x,O.y=s.y,O.z=a.z;let E=nn;E.x=u.x,E.y=l.y,E.z=c.z;let S=f.midpoint(O,E,rn),C=0;for(o=0;oC&&(C=r);let i=f.magnitudeSquared(f.subtract(n,b,ae));if(i>_){let e=Math.sqrt(i);x=.5*(x+e),_=x*x;let t=e-x;b.x=(x*b.x+t*n.x)/e,b.y=(x*b.y+t*n.y)/e,b.z=(x*b.z+t*n.z)/e}}return x=u+s)return e.clone(r),r;if(s>=u+o)return t.clone(r),r;let l=.5*(o+u+s),c=f.multiplyByScalar(a,(-o+l)/u,Vr);return f.add(c,n,c),f.clone(c,r.center),r.radius=l,r};var Zr=new f;D.expand=function(e,t,r){y.typeOf.object("sphere",e),y.typeOf.object("point",t),r=D.clone(e,r);let n=f.magnitude(f.subtract(t,r.center,Zr));return n>r.radius&&(r.radius=n),r},D.intersectPlane=function(e,t){y.typeOf.object("sphere",e),y.typeOf.object("plane",t);let r=e.center,n=e.radius,o=t.normal,i=f.dot(o,r)+t.distance;return i<-n?gt.OUTSIDE:i0))return n;s=n-1}return~(s+1)}var ke=oo;function io(e,t,r,n,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=r,this.yPoleOffset=n,this.ut1MinusUtc=o}var nt=io;function so(e){if(null===e||isNaN(e))throw new T("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}var rt=so,Dn=[31,28,31,30,31,30,31,31,30,31,30,31];function ao(e,t,r,n,o,i,s,a){e=v(e,1),t=v(t,1),r=v(r,1),n=v(n,0),o=v(o,0),i=v(i,0),s=v(s,0),a=v(a,!1),y.typeOf.number.greaterThanOrEquals("Year",e,1),y.typeOf.number.lessThanOrEquals("Year",e,9999),y.typeOf.number.greaterThanOrEquals("Month",t,1),y.typeOf.number.lessThanOrEquals("Month",t,12),y.typeOf.number.greaterThanOrEquals("Day",r,1),y.typeOf.number.lessThanOrEquals("Day",r,31),y.typeOf.number.greaterThanOrEquals("Hour",n,0),y.typeOf.number.lessThanOrEquals("Hour",n,23),y.typeOf.number.greaterThanOrEquals("Minute",o,0),y.typeOf.number.lessThanOrEquals("Minute",o,59),y.typeOf.bool("IsLeapSecond",a),y.typeOf.number.greaterThanOrEquals("Second",i,0),y.typeOf.number.lessThanOrEquals("Second",i,a?60:59),y.typeOf.number.greaterThanOrEquals("Millisecond",s,0),y.typeOf.number.lessThan("Millisecond",s,1e3),function(){let n=2===t&&rt(e)?Dn[t-1]+1:Dn[t-1];if(r>n)throw new T("Month and Day represents invalid date")}(),this.year=e,this.month=t,this.day=r,this.hour=n,this.minute=o,this.second=i,this.millisecond=s,this.isLeapSecond=a}var wt=ao;function co(e,t){this.julianDate=e,this.offset=t}var Z=co,uo={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5},K=Object.freeze(uo),fo={UTC:0,TAI:1},F=Object.freeze(fo),zn=new wt,bt=[31,28,31,30,31,30,31,31,30,31,30,31],_t=29;function on(e,t){return C.compare(e.julianDate,t.julianDate)}var We=new Z;function xt(e){We.julianDate=e;let t=C.leapSeconds,r=ke(t,We,on);r<0&&(r=~r),r>=t.length&&(r=t.length-1);let n=t[r].offset;r>0&&C.secondsDifference(t[r].julianDate,e)>n&&(r--,n=t[r].offset),C.addSeconds(e,n,e)}function qn(e,t){We.julianDate=e;let r=C.leapSeconds,n=ke(r,We,on);if(n<0&&(n=~n),0===n)return C.addSeconds(e,-r[0].offset,t);if(n>=r.length)return C.addSeconds(e,-r[n-1].offset,t);let o=C.secondsDifference(r[n].julianDate,e);return 0===o?C.addSeconds(e,-r[n].offset,t):o<=1?void 0:C.addSeconds(e,-r[--n].offset,t)}function Ie(e,t,r){let n=t/K.SECONDS_PER_DAY|0;return e+=n,(t-=K.SECONDS_PER_DAY*n)<0&&(e--,t+=K.SECONDS_PER_DAY),r.dayNumber=e,r.secondsOfDay=t,r}function sn(e,t,r,n,o,i,s){let a=(t-14)/12|0,u=e+4800+a,l=(1461*u/4|0)+(367*(t-2-12*a)/12|0)-(3*((u+100)/100|0)/4|0)+r-32075;(n-=12)<0&&(n+=24);let c=i+(n*K.SECONDS_PER_HOUR+o*K.SECONDS_PER_MINUTE+s*K.SECONDS_PER_MILLISECOND);return c>=43200&&(l-=1),[l,c]}var lo=/^(\d{4})$/,po=/^(\d{4})-(\d{2})$/,mo=/^(\d{4})-?(\d{3})$/,ho=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,yo=/^(\d{4})-?(\d{2})-?(\d{2})$/,an=/([Z+\-])?(\d{2})?:?(\d{2})?$/,go=/^(\d{2})(\.\d+)?/.source+an.source,wo=/^(\d{2}):?(\d{2})(\.\d+)?/.source+an.source,bo=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+an.source,we="Invalid ISO 8601 date.";function C(e,t,r){this.dayNumber=void 0,this.secondsOfDay=void 0,e=v(e,0),t=v(t,0),r=v(r,F.UTC);let n=0|e;Ie(n,t+=(e-n)*K.SECONDS_PER_DAY,this),r===F.UTC&&xt(this)}C.fromGregorianDate=function(e,t){if(!(e instanceof wt))throw new T("date must be a valid GregorianDate.");let r=sn(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return d(t)?(Ie(r[0],r[1],t),xt(t),t):new C(r[0],r[1],F.UTC)},C.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new T("date must be a valid JavaScript Date.");let r=sn(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return d(t)?(Ie(r[0],r[1],t),xt(t),t):new C(r[0],r[1],F.UTC)},C.fromIso8601=function(e,t){if("string"!=typeof e)throw new T(we);let r,n,o,i,s,a=(e=e.replace(",",".")).split("T"),u=1,l=1,c=0,f=0,p=0,h=0,m=a[0],y=a[1];if(!d(m))throw new T(we);if(a=m.match(yo),null!==a){if(i=m.split("-").length-1,i>0&&2!==i)throw new T(we);r=+a[1],u=+a[2],l=+a[3]}else if(a=m.match(po),null!==a)r=+a[1],u=+a[2];else if(a=m.match(lo),null!==a)r=+a[1];else{let e;if(a=m.match(mo),null!==a){if(r=+a[1],e=+a[2],o=rt(r),e<1||o&&e>366||!o&&e>365)throw new T(we)}else{if(a=m.match(ho),null===a)throw new T(we);{r=+a[1];let t=+a[2],n=+a[3]||0;if(i=m.split("-").length-1,i>0&&(!d(a[3])&&1!==i||d(a[3])&&2!==i))throw new T(we);e=7*t+n-new Date(Date.UTC(r,0,4)).getUTCDay()-3}}n=new Date(Date.UTC(r,0,1)),n.setUTCDate(e),u=n.getUTCMonth()+1,l=n.getUTCDate()}if(o=rt(r),u<1||u>12||l<1||(2!==u||!o)&&l>bt[u-1]||o&&2===u&&l>_t)throw new T(we);if(d(y)){if(a=y.match(bo),null!==a){if(i=y.split(":").length-1,i>0&&2!==i&&3!==i)throw new T(we);c=+a[1],f=+a[2],p=+a[3],h=1e3*+(a[4]||0),s=5}else if(a=y.match(wo),null!==a){if(i=y.split(":").length-1,i>2)throw new T(we);c=+a[1],f=+a[2],p=60*+(a[3]||0),s=4}else{if(a=y.match(go),null===a)throw new T(we);c=+a[1],f=60*+(a[2]||0),s=3}if(f>=60||p>=61||c>24||24===c&&(f>0||p>0||h>0))throw new T(we);let e=a[s],t=+a[s+1],n=+(a[s+2]||0);switch(e){case"+":c-=t,f-=n;break;case"-":c+=t,f+=n;break;case"Z":break;default:f+=new Date(Date.UTC(r,u-1,l,c,f)).getTimezoneOffset()}}let g=60===p;for(g&&p--;f>=60;)f-=60,c++;for(;c>=24;)c-=24,l++;for(n=o&&2===u?_t:bt[u-1];l>n;)l-=n,u++,u>12&&(u-=12,r++),n=o&&2===u?_t:bt[u-1];for(;f<0;)f+=60,c--;for(;c<0;)c+=24,l--;for(;l<1;)u--,u<1&&(u+=12,r--),n=o&&2===u?_t:bt[u-1],l+=n;let v=sn(r,u,l,c,f,p,h);return d(t)?(Ie(v[0],v[1],t),xt(t)):t=new C(v[0],v[1],F.UTC),g&&C.addSeconds(t,1,t),t},C.now=function(e){return C.fromDate(new Date,e)};var St=new C(0,0,F.TAI);C.toGregorianDate=function(e,t){if(!d(e))throw new T("julianDate is required.");let r=!1,n=qn(e,St);d(n)||(C.addSeconds(e,-1,St),n=qn(St,St),r=!0);let o=n.dayNumber,i=n.secondsOfDay;i>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let u=4e3*(s+1)/1461001|0;s=s-(1461*u/4|0)+31|0;let l=80*s/2447|0,c=s-(2447*l/80|0)|0;s=l/11|0;let f=l+2-12*s|0,p=100*(a-49)+u+s|0,h=i/K.SECONDS_PER_HOUR|0,m=i-h*K.SECONDS_PER_HOUR,y=m/K.SECONDS_PER_MINUTE|0;m-=y*K.SECONDS_PER_MINUTE;let g=0|m,v=(m-g)/K.SECONDS_PER_MILLISECOND;return h+=12,h>23&&(h-=24),r&&(g+=1),d(t)?(t.year=p,t.month=f,t.day=c,t.hour=h,t.minute=y,t.second=g,t.millisecond=v,t.isLeapSecond=r,t):new wt(p,f,c,h,y,g,v,r)},C.toDate=function(e){if(!d(e))throw new T("julianDate is required.");let t=C.toGregorianDate(e,zn),r=t.second;return t.isLeapSecond&&(r-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,r,t.millisecond))},C.toIso8601=function(e,t){if(!d(e))throw new T("julianDate is required.");let r,n=C.toGregorianDate(e,zn),o=n.year,i=n.month,s=n.day,a=n.hour,u=n.minute,l=n.second,c=n.millisecond;return 1e4===o&&1===i&&1===s&&0===a&&0===u&&0===l&&0===c&&(o=9999,i=12,s=31,a=24),d(t)||0===c?d(t)&&0!==t?(r=(.01*c).toFixed(t).replace(".","").slice(0,t),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${r}Z`):`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}Z`:(r=(.01*c).toString().replace(".",""),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${r}Z`)},C.clone=function(e,t){if(d(e))return d(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new C(e.dayNumber,e.secondsOfDay,F.TAI)},C.compare=function(e,t){if(!d(e))throw new T("left is required.");if(!d(t))throw new T("right is required.");let r=e.dayNumber-t.dayNumber;return 0!==r?r:e.secondsOfDay-t.secondsOfDay},C.equals=function(e,t){return e===t||d(e)&&d(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},C.equalsEpsilon=function(e,t,r){return r=v(r,0),e===t||d(e)&&d(t)&&Math.abs(C.secondsDifference(e,t))<=r},C.totalDays=function(e){if(!d(e))throw new T("julianDate is required.");return e.dayNumber+e.secondsOfDay/K.SECONDS_PER_DAY},C.secondsDifference=function(e,t){if(!d(e))throw new T("left is required.");if(!d(t))throw new T("right is required.");return(e.dayNumber-t.dayNumber)*K.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},C.daysDifference=function(e,t){if(!d(e))throw new T("left is required.");if(!d(t))throw new T("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/K.SECONDS_PER_DAY},C.computeTaiMinusUtc=function(e){We.julianDate=e;let t=C.leapSeconds,r=ke(t,We,on);return r<0&&(r=~r,--r,r<0&&(r=0)),t[r].offset},C.addSeconds=function(e,t,r){if(!d(e))throw new T("julianDate is required.");if(!d(t))throw new T("seconds is required.");if(!d(r))throw new T("result is required.");return Ie(e.dayNumber,e.secondsOfDay+t,r)},C.addMinutes=function(e,t,r){if(!d(e))throw new T("julianDate is required.");if(!d(t))throw new T("minutes is required.");if(!d(r))throw new T("result is required.");let n=e.secondsOfDay+t*K.SECONDS_PER_MINUTE;return Ie(e.dayNumber,n,r)},C.addHours=function(e,t,r){if(!d(e))throw new T("julianDate is required.");if(!d(t))throw new T("hours is required.");if(!d(r))throw new T("result is required.");let n=e.secondsOfDay+t*K.SECONDS_PER_HOUR;return Ie(e.dayNumber,n,r)},C.addDays=function(e,t,r){if(!d(e))throw new T("julianDate is required.");if(!d(t))throw new T("days is required.");if(!d(r))throw new T("result is required.");return Ie(e.dayNumber+t,e.secondsOfDay,r)},C.lessThan=function(e,t){return C.compare(e,t)<0},C.lessThanOrEquals=function(e,t){return C.compare(e,t)<=0},C.greaterThan=function(e,t){return C.compare(e,t)>0},C.greaterThanOrEquals=function(e,t){return C.compare(e,t)>=0},C.prototype.clone=function(e){return C.clone(this,e)},C.prototype.equals=function(e){return C.equals(this,e)},C.prototype.equalsEpsilon=function(e,t){return C.equalsEpsilon(this,e,t)},C.prototype.toString=function(){return C.toIso8601(this)},C.leapSeconds=[new Z(new C(2441317,43210,F.TAI),10),new Z(new C(2441499,43211,F.TAI),11),new Z(new C(2441683,43212,F.TAI),12),new Z(new C(2442048,43213,F.TAI),13),new Z(new C(2442413,43214,F.TAI),14),new Z(new C(2442778,43215,F.TAI),15),new Z(new C(2443144,43216,F.TAI),16),new Z(new C(2443509,43217,F.TAI),17),new Z(new C(2443874,43218,F.TAI),18),new Z(new C(2444239,43219,F.TAI),19),new Z(new C(2444786,43220,F.TAI),20),new Z(new C(2445151,43221,F.TAI),21),new Z(new C(2445516,43222,F.TAI),22),new Z(new C(2446247,43223,F.TAI),23),new Z(new C(2447161,43224,F.TAI),24),new Z(new C(2447892,43225,F.TAI),25),new Z(new C(2448257,43226,F.TAI),26),new Z(new C(2448804,43227,F.TAI),27),new Z(new C(2449169,43228,F.TAI),28),new Z(new C(2449534,43229,F.TAI),29),new Z(new C(2450083,43230,F.TAI),30),new Z(new C(2450630,43231,F.TAI),31),new Z(new C(2451179,43232,F.TAI),32),new Z(new C(2453736,43233,F.TAI),33),new Z(new C(2454832,43234,F.TAI),34),new Z(new C(2456109,43235,F.TAI),35),new Z(new C(2457204,43236,F.TAI),36),new Z(new C(2457754,43237,F.TAI),37)];var ce=C,lr=$e(je(),1);function _o(e){return(0===e.length||"/"!==e[e.length-1])&&(e=`${e}/`),e}var Ln=_o;function Qn(e,t){if(null===e||"object"!=typeof e)return e;t=v(t,!1);let r=new e.constructor;for(let n in e)if(e.hasOwnProperty(n)){let o=e[n];t&&(o=Qn(o,t)),r[n]=o}return r}var Ze=Qn;function So(){let e,t,r=new Promise((function(r,n){e=r,t=n}));return{resolve:e,reject:t,promise:r}}var Ne=So,Hn=$e(je(),1);function cn(e,t){let r;return typeof document<"u"&&(r=document),cn._implementation(e,t,r)}cn._implementation=function(e,t,r){if(!d(e))throw new T("relative uri is required.");if(!d(t)){if(typeof r>"u")return e;t=v(r.baseURI,r.location.href)}let n=new Hn.default(e);return""!==n.scheme()?n.toString():n.absoluteTo(t).toString()};var ot=cn,$n=$e(je(),1);function xo(e,t){if(!d(e))throw new T("uri is required.");let r="",n=e.lastIndexOf("/");return-1!==n&&(r=e.substring(0,n+1)),t&&(0!==(e=new $n.default(e)).query().length&&(r+=`?${e.query()}`),0!==e.fragment().length&&(r+=`#${e.fragment()}`)),r}var Wn=xo,Yn=$e(je(),1);function Oo(e){if(!d(e))throw new T("uri is required.");let t=new Yn.default(e);t.normalize();let r=t.path(),n=r.lastIndexOf("/");return-1!==n&&(r=r.substr(n+1)),n=r.lastIndexOf("."),r=-1===n?"":r.substr(n+1),r}var Vn=Oo,Zn={};function vo(e,t,r){d(t)||(t=e.width),d(r)||(r=e.height);let n=Zn[t];d(n)||(n={},Zn[t]=n);let o=n[r];if(!d(o)){let e=document.createElement("canvas");e.width=t,e.height=r,o=e.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",n[r]=o}return o.drawImage(e,0,0,t,r),o.getImageData(0,0,t,r).data}var un=vo,Eo=/^blob:/i;function Co(e){return y.typeOf.string("uri",e),Eo.test(e)}var _e,Ct=Co;function To(e){d(_e)||(_e=document.createElement("a")),_e.href=window.location.href;let t=_e.host,r=_e.protocol;return _e.href=e,_e.href=_e.href,r!==_e.protocol||t!==_e.host}var Xn=To,Ro=/^data:/i;function Po(e){return y.typeOf.string("uri",e),Ro.test(e)}var Tt=Po;function Ao(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise(((e,r)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let n=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,n.removeChild(t),e()},t.onerror=function(e){r(e)},n.appendChild(t)}))}var Jn=Ao;function Io(e){if(!d(e))throw new T("obj is required.");let t="";for(let r in e)if(e.hasOwnProperty(r)){let n=e[r],o=`${encodeURIComponent(r)}=`;if(Array.isArray(n))for(let e=0,r=n.length;e0){let e=n.substring(0,o),r=n.substring(o+2);t[e]=r}}return t}var nr=zo;function rr(e,t,r){this.statusCode=e,this.response=t,this.responseHeaders=r,"string"==typeof this.responseHeaders&&(this.responseHeaders=nr(this.responseHeaders))}rr.prototype.toString=function(){let e="Request has failed.";return d(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var it=rr,Pt=$e(je(),1);function st(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function Mo(e,t){return t-e}Object.defineProperties(st.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),st.prototype.addEventListener=function(e,t){y.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);let r=this;return function(){r.removeEventListener(e,t)}},st.prototype.removeEventListener=function(e,t){y.typeOf.func("listener",e);let r=this._listeners,n=this._scopes,o=-1;for(let i=0;i0){for(o.sort(Mo),e=0;e=0;--t)this.heapify(t)},Fe.prototype.insert=function(e){y.defined("element",e);let t,r=this._array,n=this._comparator,o=this._maximumLength,i=this._length++;for(io&&(t=r[o],this._length=o),t},Fe.prototype.pop=function(e){if(e=v(e,0),0===this._length)return;y.typeOf.number.lessThan("index",e,this._length);let t=this._array,r=t[e];return fn(t,e,--this._length),this.heapify(e),t[this._length]=void 0,r};var ir=Fe;function ko(e,t){return e.priority-t.priority}var V={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},Xe=20,fe=new ir({comparator:ko});fe.maximumLength=Xe,fe.reserve(Xe);var Se=[],ve={},jo=typeof document<"u"?new Pt.default(document.location.href):new Pt.default,At=new or;function ee(){}function sr(e){d(e.priorityFunction)&&(e.priority=e.priorityFunction())}function ar(e){return e.state===te.UNISSUED&&(e.state=te.ISSUED,e.deferred=Ne()),e.deferred.promise}function No(e){return function(t){if(e.state===te.CANCELLED)return;let r=e.deferred;--V.numberOfActiveRequests,--ve[e.serverKey],At.raiseEvent(),e.state=te.RECEIVED,e.deferred=void 0,r.resolve(t)}}function Fo(e){return function(t){e.state!==te.CANCELLED&&(++V.numberOfFailedRequests,--V.numberOfActiveRequests,--ve[e.serverKey],At.raiseEvent(t),e.state=te.FAILED,e.deferred.reject(t))}}function cr(e){let t=ar(e);return e.state=te.ACTIVE,Se.push(e),++V.numberOfActiveRequests,++V.numberOfActiveRequestsEver,++ve[e.serverKey],e.requestFunction().then(No(e)).catch(Fo(e)),t}function Be(e){let t=e.state===te.ACTIVE;if(e.state=te.CANCELLED,++V.numberOfCancelledRequests,d(e.deferred)){let t=e.deferred;e.deferred=void 0,t.reject()}t&&(--V.numberOfActiveRequests,--ve[e.serverKey],++V.numberOfCancelledActiveRequests),d(e.cancelFunction)&&e.cancelFunction()}function Bo(){ee.debugShowStatistics&&(0===V.numberOfActiveRequests&&V.lastNumberOfActiveRequests>0&&(V.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${V.numberOfAttemptedRequests}`),V.numberOfAttemptedRequests=0),V.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${V.numberOfCancelledRequests}`),V.numberOfCancelledRequests=0),V.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${V.numberOfCancelledActiveRequests}`),V.numberOfCancelledActiveRequests=0),V.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${V.numberOfFailedRequests}`),V.numberOfFailedRequests=0)),V.lastNumberOfActiveRequests=V.numberOfActiveRequests)}ee.maximumRequests=50,ee.maximumRequestsPerServer=18,ee.requestsByServer={},ee.throttleRequests=!0,ee.debugShowStatistics=!1,ee.requestCompletedEvent=At,Object.defineProperties(ee,{statistics:{get:function(){return V}},priorityHeapLength:{get:function(){return Xe},set:function(e){if(ee;)Be(fe.pop());Xe=e,fe.maximumLength=e,fe.reserve(e)}}}),ee.serverHasOpenSlots=function(e,t){t=v(t,1);let r=v(ee.requestsByServer[e],ee.maximumRequestsPerServer);return ve[e]+t<=r},ee.heapHasOpenSlots=function(e){return fe.length+e<=Xe},ee.update=function(){let e,t,r=0,n=Se.length;for(e=0;e0&&(Se[e-r]=t):++r;Se.length-=r;let o=fe.internalArray,i=fe.length;for(e=0;e0;)t=fe.pop(),t.cancelled?Be(t):!t.throttleByServer||ee.serverHasOpenSlots(t.serverKey)?(cr(t),++a):Be(t);Bo()},ee.getServerKey=function(e){y.typeOf.string("url",e);let t=new Pt.default(e);""===t.scheme()&&(t=t.absoluteTo(jo),t.normalize());let r=t.authority();/:/.test(r)||(r=`${r}:${"https"===t.scheme()?"443":"80"}`);let n=ve[r];return d(n)||(ve[r]=0),r},ee.request=function(e){if(y.typeOf.object("request",e),y.typeOf.string("request.url",e.url),y.typeOf.func("request.requestFunction",e.requestFunction),Tt(e.url)||Ct(e.url))return At.raiseEvent(),e.state=te.RECEIVED,e.requestFunction();if(++V.numberOfAttemptedRequests,d(e.serverKey)||(e.serverKey=ee.getServerKey(e.url)),ee.throttleRequests&&e.throttleByServer&&!ee.serverHasOpenSlots(e.serverKey))return;if(!ee.throttleRequests||!e.throttle)return cr(e);if(Se.length>=ee.maximumRequests)return;sr(e);let t=fe.insert(e);if(d(t)){if(t===e)return;Be(t)}return ar(e)},ee.clearForSpecs=function(){for(;fe.length>0;)Be(fe.pop());let e=Se.length;for(let t=0;t0}},credits:{get:function(){return this._credits}}}),E.prototype.toString=function(){return this.getUrlComponent(!0,!0)},E.prototype.parseUrl=function(e,t,r,n){let o=new lr.default(e),i=Qo(o.query());this._queryParameters=t?Dt(i,this.queryParameters,r):i,o.search(""),o.fragment(""),d(n)&&""===o.scheme()&&(o=o.absoluteTo(ot(n))),this._url=o.toString()},E.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let r=this._url;e&&(r=`${r}${Ho(this.queryParameters)}`),r=r.replace(/%7B/g,"{").replace(/%7D/g,"}");let n=this._templateValues;return Object.keys(n).length>0&&(r=r.replace(/{(.*?)}/g,(function(e,t){let r=n[t];return d(r)?encodeURIComponent(r):e}))),t&&d(this.proxy)&&(r=this.proxy.getURL(r)),r},E.prototype.setQueryParameters=function(e,t){this._queryParameters=t?Dt(this._queryParameters,e,!1):Dt(e,this._queryParameters,!1)},E.prototype.appendQueryParameters=function(e){this._queryParameters=Dt(e,this._queryParameters,!0)},E.prototype.setTemplateValues=function(e,t){this._templateValues=t?Ae(this._templateValues,e):Ae(e,this._templateValues)},E.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,d(e.url)){let r=v(e.preserveQueryParameters,!1);t.parseUrl(e.url,!0,r,this._url)}return d(e.queryParameters)&&(t._queryParameters=Ae(e.queryParameters,t.queryParameters)),d(e.templateValues)&&(t._templateValues=Ae(e.templateValues,t.templateValues)),d(e.headers)&&(t.headers=Ae(e.headers,t.headers)),d(e.proxy)&&(t.proxy=e.proxy),d(e.request)&&(t.request=e.request),d(e.retryCallback)&&(t.retryCallback=e.retryCallback),d(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},E.prototype.retryOnError=function(e){let t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let r=this;return Promise.resolve(t(this,e)).then((function(e){return++r._retryCount,e}))},E.prototype.clone=function(e){return d(e)?(e._url=this._url,e._queryParameters=Ze(this._queryParameters),e._templateValues=Ze(this._templateValues),e.headers=Ze(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new E({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:!1,credits:d(this.credits)?this.credits.slice():void 0})},E.prototype.getBaseUri=function(e){return Wn(this.getUrlComponent(e),e)},E.prototype.appendForwardSlash=function(){this._url=Ln(this._url)},E.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},E.fetchArrayBuffer=function(e){return new E(e).fetchArrayBuffer()},E.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},E.fetchBlob=function(e){return new E(e).fetchBlob()},E.prototype.fetchImage=function(e){e=v(e,v.EMPTY_OBJECT);let t=v(e.preferImageBitmap,!1),r=v(e.preferBlob,!1),n=v(e.flipY,!1),o=v(e.skipColorSpaceConversion,!1);if(pn(this.request),!dr||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!r)return dn({resource:this,flipY:n,skipColorSpaceConversion:o,preferImageBitmap:t});let i,s,a,u,l=this.fetchBlob();return d(l)?E.supportsImageBitmapOptions().then((function(e){return i=e,s=i&&t,l})).then((function(e){if(!d(e))return;if(u=e,s)return E.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1,skipColorSpaceConversion:o});let t=window.URL.createObjectURL(e);return a=new E({url:t}),dn({resource:a,flipY:n,skipColorSpaceConversion:o,preferImageBitmap:!1})})).then((function(e){if(d(e))return e.blob=u,s||window.URL.revokeObjectURL(a.url),e})).catch((function(e){return d(a)&&window.URL.revokeObjectURL(a.url),e.blob=u,Promise.reject(e)})):void 0},E.fetchImage=function(e){return new E(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},E.prototype.fetchText=function(){return this.fetch({responseType:"text"})},E.fetchText=function(e){return new E(e).fetchText()},E.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(d(e))return e.then((function(e){if(d(e))return JSON.parse(e)}))},E.fetchJson=function(e){return new E(e).fetchJson()},E.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},E.fetchXML=function(e){return new E(e).fetchXML()},E.prototype.fetchJsonp=function(e){let t;e=v(e,"callback"),pn(this.request);do{t=`loadJsonp${X.nextRandomNumber().toString().substring(2,8)}`}while(d(window[t]));return pr(this,e,t)},E.fetchJsonp=function(e){return new E(e).fetchJsonp(e.callbackParameterName)},E.prototype._makeRequest=function(e){let t=this;pn(t.request);let r=t.request,n=t.url;r.url=n,r.requestFunction=function(){let o=e.responseType,i=Ae(e.headers,t.headers),s=e.overrideMimeType,a=e.method,u=e.data,l=Ne(),c=E._Implementations.loadWithXhr(n,o,a,u,i,l,s);return d(c)&&d(c.abort)&&(r.cancelFunction=function(){c.abort()}),l.promise};let o=It.request(r);if(d(o))return o.then((function(e){return r.cancelFunction=void 0,e})).catch((function(n){return r.cancelFunction=void 0,r.state!==te.FAILED?Promise.reject(n):t.retryOnError(n).then((function(o){return o?(r.state=te.UNISSUED,r.deferred=void 0,t.fetch(e)):Promise.reject(n)}))}))};var $o=/^data:(.*?)(;base64)?,(.*)$/;function Ut(e,t){let r=decodeURIComponent(t);return e?atob(r):r}function fr(e,t){let r=Ut(e,t),n=new ArrayBuffer(r.length),o=new Uint8Array(n);for(let e=0;e{if(!e.ok){let t={};return e.headers.forEach(((e,r)=>{t[r]=e})),void i.reject(new it(e.status,e,t))}switch(t){case"text":i.resolve(e.text());break;case"json":i.resolve(e.json());break;default:i.resolve(new Uint8Array(await e.arrayBuffer()).buffer)}})).catch((()=>{i.reject(new it)}))}E.prototype.fetch=function(e){return(e=xe(e,{})).method="GET",this._makeRequest(e)},E.fetch=function(e){return new E(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.delete=function(e){return(e=xe(e,{})).method="DELETE",this._makeRequest(e)},E.delete=function(e){return new E(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},E.prototype.head=function(e){return(e=xe(e,{})).method="HEAD",this._makeRequest(e)},E.head=function(e){return new E(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.options=function(e){return(e=xe(e,{})).method="OPTIONS",this._makeRequest(e)},E.options=function(e){return new E(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.post=function(e,t){return y.defined("data",e),(t=xe(t,{})).method="POST",t.data=e,this._makeRequest(t)},E.post=function(e){return new E(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.put=function(e,t){return y.defined("data",e),(t=xe(t,{})).method="PUT",t.data=e,this._makeRequest(t)},E.put=function(e){return new E(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.patch=function(e,t){return y.defined("data",e),(t=xe(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},E.patch=function(e){return new E(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E._Implementations={},E._Implementations.loadImageElement=function(e,t,r){let n=new Image;n.onload=function(){0===n.naturalWidth&&0===n.naturalHeight&&0===n.width&&0===n.height&&(n.width=300,n.height=150),r.resolve(n)},n.onerror=function(e){r.reject(e)},t&&(ln.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e},E._Implementations.createImage=function(e,t,r,n,o,i){let s=e.url;E.supportsImageBitmapOptions().then((function(a){if(!a||!i)return void E._Implementations.loadImageElement(s,t,r);let u=Ne(),l=E._Implementations.loadWithXhr(s,"blob","GET",void 0,void 0,u,void 0,void 0,void 0);return d(l)&&d(l.abort)&&(e.cancelFunction=function(){l.abort()}),u.promise.then((function(e){if(d(e))return E.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1,skipColorSpaceConversion:o});r.reject(new Oe(`Successfully retrieved ${s} but it contained no content.`))})).then((function(e){r.resolve(e)}))})).catch((function(e){r.reject(e)}))},E.createImageBitmapFromBlob=function(e,t){return y.defined("options",t),y.typeOf.bool("options.flipY",t.flipY),y.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),y.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};var Vo=typeof XMLHttpRequest>"u";E._Implementations.loadWithXhr=function(e,t,r,n,o,i,s){let a=$o.exec(e);if(null!==a)return void i.resolve(Wo(a,t));if(Vo)return void Yo(e,t,r,n,o,i,s);let u=new XMLHttpRequest;if(ln.contains(e)&&(u.withCredentials=!0),u.open(r,e,!0),d(s)&&d(u.overrideMimeType)&&u.overrideMimeType(s),d(o))for(let e in o)o.hasOwnProperty(e)&&u.setRequestHeader(e,o[e]);d(t)&&(u.responseType=t);let l=!1;return"string"==typeof e&&(l=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),u.onload=function(){if((u.status<200||u.status>=300)&&(!l||0!==u.status))return void i.reject(new it(u.status,u.response,u.getAllResponseHeaders()));let e=u.response,n=u.responseType;if("HEAD"===r||"OPTIONS"===r){let e=u.getAllResponseHeaders().trim().split(/[\r\n]+/),t={};return e.forEach((function(e){let r=e.split(": "),n=r.shift();t[n]=r.join(": ")})),void i.resolve(t)}if(204===u.status)i.resolve(void 0);else if(!d(e)||d(t)&&n!==t)if("json"===t&&"string"==typeof e)try{i.resolve(JSON.parse(e))}catch(e){i.reject(e)}else(""===n||"document"===n)&&d(u.responseXML)&&u.responseXML.hasChildNodes()?i.resolve(u.responseXML):""!==n&&"text"!==n||!d(u.responseText)?i.reject(new Oe("Invalid XMLHttpRequest response type.")):i.resolve(u.responseText);else i.resolve(e)},u.onerror=function(e){i.reject(new it)},u.send(n),u},E._Implementations.loadAndExecuteScript=function(e,t,r){return Jn(e,t).catch((function(e){r.reject(e)}))},E._DefaultImplementations={},E._DefaultImplementations.createImage=E._Implementations.createImage,E._DefaultImplementations.loadWithXhr=E._Implementations.loadWithXhr,E._DefaultImplementations.loadAndExecuteScript=E._Implementations.loadAndExecuteScript,E.DEFAULT=Object.freeze(new E({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var Ue=E;function ut(e){e=v(e,v.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=v(e.addNewLeapSeconds,!0),d(e.data)?mr(this,e.data):mr(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function Zo(e,t){return ce.compare(e.julianDate,t)}function mr(e,t){if(!d(t.columnNames))throw new Oe("Error in loaded EOP data: The columnNames property is required.");if(!d(t.samples))throw new Oe("Error in loaded EOP data: The samples property is required.");let r=t.columnNames.indexOf("modifiedJulianDateUtc"),n=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),i=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("taiMinusUtcSeconds");if(r<0||n<0||o<0||i<0||s<0||a<0||u<0)throw new Oe("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let l=e._samples=t.samples,c=e._dates=[];e._dateColumn=r,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=i,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=u,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let f,p=e._addNewLeapSeconds;for(let t=0,n=l.length;tt.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let u=t[o],l=t[i];if(u.equals(l)||n.equals(u))return hr(e,r,o,a,s),s;if(n.equals(l))return hr(e,r,i,a,s),s;let c=ce.secondsDifference(n,u)/ce.secondsDifference(l,u),f=o*a,d=i*a,p=r[f+e._ut1MinusUtcSecondsColumn],h=r[d+e._ut1MinusUtcSecondsColumn],m=h-p;if(m>.5||m<-.5){let t=r[f+e._taiMinusUtcSecondsColumn],o=r[d+e._taiMinusUtcSecondsColumn];t!==o&&(l.equals(n)?p=h:h-=o-t)}return s.xPoleWander=ct(c,r[f+e._xPoleWanderRadiansColumn],r[d+e._xPoleWanderRadiansColumn]),s.yPoleWander=ct(c,r[f+e._yPoleWanderRadiansColumn],r[d+e._yPoleWanderRadiansColumn]),s.xPoleOffset=ct(c,r[f+e._xCelestialPoleOffsetRadiansColumn],r[d+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=ct(c,r[f+e._yCelestialPoleOffsetRadiansColumn],r[d+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=ct(c,p,h),s}ut.fromUrl=async function(e,t){y.defined("url",e),t=v(t,v.EMPTY_OBJECT);let r,n=Ue.createIfNeeded(e);try{r=await n.fetchJson()}catch{throw new Oe(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new ut({addNewLeapSeconds:t.addNewLeapSeconds,data:r})},ut.NONE=Object.freeze({compute:function(e,t){return d(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new nt(0,0,0,0,0),t}}),ut.prototype.compute=function(e,t){if(!d(this._samples))return;if(d(t)||(t=new nt(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let r=this._dates,n=this._lastIndex,o=0,i=0;if(d(n)){let s=r[n],a=r[n+1],u=ce.lessThanOrEquals(s,e),l=!d(a),c=l||ce.greaterThanOrEquals(a,e);if(u&&c)return o=n,!l&&a.equals(e)&&++o,i=o+1,yr(this,r,this._samples,e,o,i,t),t}let s=ke(r,e,ce.compare,this._dateColumn);return s>=0?(s"u"?e:(d(qt)||(qt=document.createElement("a")),qt.href=e,qt.href)}function _r(){if(d(Le))return Le;let e;if(e=typeof CESIUM_BASE_URL<"u"?CESIUM_BASE_URL:d(import.meta?.url)?ot(".",import.meta.url):"object"==typeof define&&d(define.amd)&&!define.amd.toUrlUndefined&&d(dt.toUrl)?ot("..",Qe("Core/buildModuleUrl.js")):Xo(),!d(e))throw new T("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return(Le=new Ue({url:br(e)})).appendForwardSlash(),Le}function Jo(e){return br(dt.toUrl(`../${e}`))}function Sr(e){return _r().getDerivedResource({url:e}).url}function Qe(e){return d(zt)||(zt="object"==typeof define&&d(define.amd)&&!define.amd.toUrlUndefined&&d(dt.toUrl)?Jo:Sr),zt(e)}Qe._cesiumScriptRegex=wr,Qe._buildModuleUrlFromBaseUrl=Sr,Qe._clearBaseResource=function(){Le=void 0},Qe.setBaseUrl=function(e){Le=Ue.DEFAULT.getDerivedResource({url:e})},Qe.getCesiumBaseUrl=_r;var xr=Qe;function Go(e,t,r){this.x=e,this.y=t,this.s=r}var Mt=Go;function gn(e){e=v(e,v.EMPTY_OBJECT),this._xysFileUrlTemplate=Ue.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=v(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=v(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new ce(this._sampleZeroJulianEphemerisDate,0,F.TAI),this._stepSizeDays=v(e.stepSizeDays,1),this._samplesPerXysFile=v(e.samplesPerXysFile,1e3),this._totalSamples=v(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,r=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let e=0;e<=t;++e){r[e]=o,n[e]=e*this._stepSizeDays;for(let n=0;n<=t;++n)n!==e&&(r[e]*=e-n);r[e]=1/r[e]}this._work=new Array(t+1),this._coef=new Array(t+1)}var Ko=new ce(0,0,F.TAI);function hn(e,t,r){let n=Ko;return n.dayNumber=t,n.secondsOfDay=r,ce.daysDifference(n,e._sampleZeroDateTT)}function yn(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let r,n=e._xysFileUrlTemplate;r=d(n)?n.getDerivedResource({templateValues:{0:t}}):new Ue({url:xr(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=r.fetchJson().then((function(r){e._chunkDownloadsInProgress[t]=!1;let n=e._samples,o=r.samples,i=t*e._samplesPerXysFile*3;for(let e=0,t=o.length;e=this._totalSamples&&(a=this._totalSamples-1);let u=s/this._samplesPerXysFile|0,l=a/this._samplesPerXysFile|0,c=[];for(let e=u;e<=l;++e)c.push(yn(this,e));return Promise.all(c)},gn.prototype.computeXysRadians=function(e,t,r){let n=hn(this,e,t);if(n<0)return;let o=n/this._stepSizeDays|0;if(o>=this._totalSamples)return;let i=this._interpolationOrder,s=o-(i/2|0);s<0&&(s=0);let a=s+i;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-i,s<0&&(s=0));let u=!1,l=this._samples;if(d(l[3*s])||(yn(this,s/this._samplesPerXysFile|0),u=!0),d(l[3*a])||(yn(this,a/this._samplesPerXysFile|0),u=!0),u)return;d(r)?(r.x=0,r.y=0,r.s=0):r=new Mt(0,0,0);let c,f,p=n-s*this._stepSizeDays,h=this._work,m=this._denominators,y=this._coef,g=this._xTable;for(c=0;c<=i;++c)h[c]=p-g[c];for(c=0;c<=i;++c){for(y[c]=1,f=0;f<=i;++f)f!==c&&(y[c]*=h[f]);y[c]*=m[c];let e=3*(s+c);r.x+=y[c]*l[e++],r.y+=y[c]*l[e++],r.s+=y[c]*l[e]}return r};var Or=gn;function x(e,t,r,n){this.x=v(e,0),this.y=v(t,0),this.z=v(r,0),this.w=v(n,0)}var ft=new f;x.fromAxisAngle=function(e,t,r){y.typeOf.object("axis",e),y.typeOf.number("angle",t);let n=t/2,o=Math.sin(n),i=(ft=f.normalize(e,ft)).x*o,s=ft.y*o,a=ft.z*o,u=Math.cos(n);return d(r)?(r.x=i,r.y=s,r.z=a,r.w=u,r):new x(i,s,a,u)};var ei=[1,2,0],ti=new Array(3);x.fromRotationMatrix=function(e,t){y.typeOf.object("matrix",e);let r,n,o,i,s,a=e[B.COLUMN0ROW0],u=e[B.COLUMN1ROW1],l=e[B.COLUMN2ROW2],c=a+u+l;if(c>0)r=Math.sqrt(c+1),s=.5*r,r=.5/r,n=(e[B.COLUMN1ROW2]-e[B.COLUMN2ROW1])*r,o=(e[B.COLUMN2ROW0]-e[B.COLUMN0ROW2])*r,i=(e[B.COLUMN0ROW1]-e[B.COLUMN1ROW0])*r;else{let t=ei,c=0;u>a&&(c=1),l>a&&l>u&&(c=2);let f=t[c],d=t[f];r=Math.sqrt(e[B.getElementIndex(c,c)]-e[B.getElementIndex(f,f)]-e[B.getElementIndex(d,d)]+1);let p=ti;p[c]=.5*r,r=.5/r,s=(e[B.getElementIndex(d,f)]-e[B.getElementIndex(f,d)])*r,p[f]=(e[B.getElementIndex(f,c)]+e[B.getElementIndex(c,f)])*r,p[d]=(e[B.getElementIndex(d,c)]+e[B.getElementIndex(c,d)])*r,n=-p[0],o=-p[1],i=-p[2]}return d(t)?(t.x=n,t.y=o,t.z=i,t.w=s,t):new x(n,o,i,s)};var vr=new x,Er=new x,wn=new x,Cr=new x;x.fromHeadingPitchRoll=function(e,t){return y.typeOf.object("headingPitchRoll",e),Cr=x.fromAxisAngle(f.UNIT_X,e.roll,vr),wn=x.fromAxisAngle(f.UNIT_Y,-e.pitch,t),t=x.multiply(wn,Cr,wn),Er=x.fromAxisAngle(f.UNIT_Z,-e.heading,vr),x.multiply(Er,t,t)};var kt=new f,bn=new f,be=new x,Tr=new x,jt=new x;x.packedLength=4,x.pack=function(e,t,r){return y.typeOf.object("value",e),y.defined("array",t),r=v(r,0),t[r++]=e.x,t[r++]=e.y,t[r++]=e.z,t[r]=e.w,t},x.unpack=function(e,t,r){return y.defined("array",e),t=v(t,0),d(r)||(r=new x),r.x=e[t],r.y=e[t+1],r.z=e[t+2],r.w=e[t+3],r},x.packedInterpolationLength=3,x.convertPackedArrayForInterpolation=function(e,t,r,n){x.unpack(e,4*r,jt),x.conjugate(jt,jt);for(let o=0,i=r-t+1;o=0?o=1:(o=-1,i=-i);let s=i-1,a=1-r,u=r*r,l=a*a;for(let e=7;e>=0;--e)Ee[e]=(Nt[e]*u-Ft[e])*s,Ce[e]=(Nt[e]*l-Ft[e])*s;let c=o*r*(1+Ee[0]*(1+Ee[1]*(1+Ee[2]*(1+Ee[3]*(1+Ee[4]*(1+Ee[5]*(1+Ee[6]*(1+Ee[7])))))))),f=a*(1+Ce[0]*(1+Ce[1]*(1+Ce[2]*(1+Ce[3]*(1+Ce[4]*(1+Ce[5]*(1+Ce[6]*(1+Ce[7])))))))),d=x.multiplyByScalar(e,f,oi);return x.multiplyByScalar(t,c,n),x.add(d,n,n)},x.fastSquad=function(e,t,r,n,o,i){y.typeOf.object("q0",e),y.typeOf.object("q1",t),y.typeOf.object("s0",r),y.typeOf.object("s1",n),y.typeOf.number("t",o),y.typeOf.object("result",i);let s=x.fastSlerp(e,t,o,lt),a=x.fastSlerp(r,n,o,Ke);return x.fastSlerp(s,a,2*o*(1-o),i)},x.equals=function(e,t){return e===t||d(e)&&d(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},x.equalsEpsilon=function(e,t,r){return r=v(r,0),e===t||d(e)&&d(t)&&Math.abs(e.x-t.x)<=r&&Math.abs(e.y-t.y)<=r&&Math.abs(e.z-t.z)<=r&&Math.abs(e.w-t.w)<=r},x.ZERO=Object.freeze(new x(0,0,0,0)),x.IDENTITY=Object.freeze(new x(0,0,0,1)),x.prototype.clone=function(e){return x.clone(this,e)},x.prototype.equals=function(e){return x.equals(this,e)},x.prototype.equalsEpsilon=function(e,t){return x.equalsEpsilon(this,e,t)},x.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var He=x,H={},On={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"}},et={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},vn={},me={east:new f,north:new f,up:new f,west:new f,south:new f,down:new f},De=new f,qe=new f,ze=new f;H.localFrameToFixedFrameGenerator=function(e,t){if(!On.hasOwnProperty(e)||!On[e].hasOwnProperty(t))throw new T("firstAxis and secondAxis must be east, north, up, west, south or down.");let r,n=On[e][t],o=e+t;return d(vn[o])?r=vn[o]:(r=function(r,o,i){if(!d(r))throw new T("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))throw new T("origin has a NaN component");if(d(i)||(i=new L),f.equalsEpsilon(r,f.ZERO,X.EPSILON14))f.unpack(et[e],0,De),f.unpack(et[t],0,qe),f.unpack(et[n],0,ze);else if(X.equalsEpsilon(r.x,0,X.EPSILON14)&&X.equalsEpsilon(r.y,0,X.EPSILON14)){let o=X.sign(r.z);f.unpack(et[e],0,De),"east"!==e&&"west"!==e&&f.multiplyByScalar(De,o,De),f.unpack(et[t],0,qe),"east"!==t&&"west"!==t&&f.multiplyByScalar(qe,o,qe),f.unpack(et[n],0,ze),"east"!==n&&"west"!==n&&f.multiplyByScalar(ze,o,ze)}else{(o=v(o,Pe.WGS84)).geodeticSurfaceNormal(r,me.up);let i=me.up,s=me.east;s.x=-r.y,s.y=r.x,s.z=0,f.normalize(s,me.east),f.cross(i,s,me.north),f.multiplyByScalar(me.up,-1,me.down),f.multiplyByScalar(me.east,-1,me.west),f.multiplyByScalar(me.north,-1,me.south),De=me[e],qe=me[t],ze=me[n]}return i[0]=De.x,i[1]=De.y,i[2]=De.z,i[3]=0,i[4]=qe.x,i[5]=qe.y,i[6]=qe.z,i[7]=0,i[8]=ze.x,i[9]=ze.y,i[10]=ze.z,i[11]=0,i[12]=r.x,i[13]=r.y,i[14]=r.z,i[15]=1,i},vn[o]=r),r},H.eastNorthUpToFixedFrame=H.localFrameToFixedFrameGenerator("east","north"),H.northEastDownToFixedFrame=H.localFrameToFixedFrameGenerator("north","east"),H.northUpEastToFixedFrame=H.localFrameToFixedFrameGenerator("north","up"),H.northWestUpToFixedFrame=H.localFrameToFixedFrameGenerator("north","west");var ii=new He,si=new f(1,1,1),ai=new L;H.headingPitchRollToFixedFrame=function(e,t,r,n,o){y.typeOf.object("HeadingPitchRoll",t),n=v(n,H.eastNorthUpToFixedFrame);let i=He.fromHeadingPitchRoll(t,ii),s=L.fromTranslationQuaternionRotationScale(f.ZERO,i,si,ai);return o=n(e,r,o),L.multiply(o,s,o)};var ci=new L,ui=new B;H.headingPitchRollQuaternion=function(e,t,r,n,o){y.typeOf.object("HeadingPitchRoll",t);let i=H.headingPitchRollToFixedFrame(e,t,r,n,ci),s=L.getMatrix3(i,ui);return He.fromRotationMatrix(s,o)};var fi=new f(1,1,1),li=new f,Ar=new L,di=new L,pi=new B,mi=new He;H.fixedFrameToHeadingPitchRoll=function(e,t,r,n){y.defined("transform",e),t=v(t,Pe.WGS84),r=v(r,H.eastNorthUpToFixedFrame),d(n)||(n=new mn);let o=L.getTranslation(e,li);if(f.equals(o,f.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;let i=L.inverseTransformation(r(o,t,Ar),Ar),s=L.setScale(e,fi,di);s=L.setTranslation(s,f.ZERO,s),i=L.multiply(i,s,i);let a=He.fromRotationMatrix(L.getMatrix3(i,pi),mi);return a=He.normalize(a,a),mn.fromQuaternion(a,n)};var hi=24110.54841,yi=8640184.812866,gi=.093104,wi=-62e-7,bi=11772758384668e-32,_i=72921158553e-15,Si=X.TWO_PI/86400,Bt=new ce;H.computeTemeToPseudoFixedMatrix=function(e,t){if(!d(e))throw new T("date is required.");let r,n=(Bt=ce.addSeconds(e,-ce.computeTaiMinusUtc(e),Bt)).dayNumber,o=Bt.secondsOfDay,i=n-2451545;r=o>=43200?(i+.5)/K.DAYS_PER_JULIAN_CENTURY:(i-.5)/K.DAYS_PER_JULIAN_CENTURY;let s=(hi+r*(yi+r*(gi+r*wi)))*Si%X.TWO_PI+(_i+bi*(n-2451545.5))*((o+.5*K.SECONDS_PER_DAY)%K.SECONDS_PER_DAY),a=Math.cos(s),u=Math.sin(s);return d(t)?(t[0]=a,t[1]=-u,t[2]=0,t[3]=u,t[4]=a,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new B(a,u,0,-u,a,0,0,0,1)},H.iau2006XysData=new Or,H.earthOrientationParameters=gr.NONE;var Tn=32.184,xi=2451545;H.preloadIcrfFixed=function(e){let t=e.start.dayNumber,r=e.start.secondsOfDay+Tn,n=e.stop.dayNumber,o=e.stop.secondsOfDay+Tn;return H.iau2006XysData.preload(t,r,n,o)},H.computeIcrfToFixedMatrix=function(e,t){if(!d(e))throw new T("date is required.");d(t)||(t=new B);let r=H.computeFixedToIcrfMatrix(e,t);if(d(r))return B.transpose(r,t)};var Oi=new Mt(0,0,0),vi=new nt(0,0,0,0,0,0),En=new B,Cn=new B;H.computeFixedToIcrfMatrix=function(e,t){if(!d(e))throw new T("date is required.");d(t)||(t=new B);let r=H.earthOrientationParameters.compute(e,vi);if(!d(r))return;let n=e.dayNumber,o=e.secondsOfDay+Tn,i=H.iau2006XysData.computeXysRadians(n,o,Oi);if(!d(i))return;let s=i.x+r.xPoleOffset,a=i.y+r.yPoleOffset,u=1/(1+Math.sqrt(1-s*s-a*a)),l=En;l[0]=1-u*s*s,l[3]=-u*s*a,l[6]=s,l[1]=-u*s*a,l[4]=1-u*a*a,l[7]=a,l[2]=-s,l[5]=-a,l[8]=1-u*(s*s+a*a);let c=B.fromRotationZ(-i.s,Cn),f=B.multiply(l,c,En),p=e.dayNumber-2451545,h=(e.secondsOfDay-ce.computeTaiMinusUtc(e)+r.ut1MinusUtc)/K.SECONDS_PER_DAY,m=.779057273264+h+.00273781191135448*(p+h);m=m%1*X.TWO_PI;let y=B.fromRotationZ(m,Cn),g=B.multiply(f,y,En),v=Math.cos(r.xPoleWander),w=Math.cos(r.yPoleWander),b=Math.sin(r.xPoleWander),_=Math.sin(r.yPoleWander),x=n-xi+o/K.SECONDS_PER_DAY;x/=36525;let O=-47e-6*x*X.RADIANS_PER_DEGREE/3600,E=Math.cos(O),S=Math.sin(O),C=Cn;return C[0]=v*E,C[1]=v*S,C[2]=b,C[3]=-w*S+_*b*E,C[4]=w*E+_*b*S,C[5]=-_*v,C[6]=-_*S-w*b*E,C[7]=_*E-w*b*S,C[8]=w*v,B.multiply(g,C,t)};var Ei=new mt;H.pointToWindowCoordinates=function(e,t,r,n){return(n=H.pointToGLWindowCoordinates(e,t,r,n)).y=2*t[5]-n.y,n},H.pointToGLWindowCoordinates=function(e,t,r,n){if(!d(e))throw new T("modelViewProjectionMatrix is required.");if(!d(t))throw new T("viewportTransformation is required.");if(!d(r))throw new T("point is required.");d(n)||(n=new Qt);let o=Ei;return L.multiplyByVector(e,mt.fromElements(r.x,r.y,r.z,1,o),o),mt.multiplyByScalar(o,1/o.w,o),L.multiplyByVector(t,o,o),Qt.fromCartesian4(o,n)};var Ci=new f,Ti=new f,Ri=new f;H.rotationMatrixFromPositionVelocity=function(e,t,r,n){if(!d(e))throw new T("position is required.");if(!d(t))throw new T("velocity is required.");let o=v(r,Pe.WGS84).geodeticSurfaceNormal(e,Ci),i=f.cross(t,o,Ti);f.equalsEpsilon(i,f.ZERO,X.EPSILON6)&&(i=f.clone(f.UNIT_X,i));let s=f.cross(i,t,Ri);return f.normalize(s,s),f.cross(t,s,i),f.negate(i,i),f.normalize(i,i),d(n)||(n=new B),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=i.x,n[4]=i.y,n[5]=i.z,n[6]=s.x,n[7]=s.y,n[8]=s.z,n};var Ir=new L(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Ur=new Re,Rn=new f,Pi=new f,Ai=new B,Pn=new L,Dr=new L;H.basisTo2D=function(e,t,r){if(!d(e))throw new T("projection is required.");if(!d(t))throw new T("matrix is required.");if(!d(r))throw new T("result is required.");let n,o=L.getTranslation(t,Pi),i=e.ellipsoid;if(f.equals(o,f.ZERO))n=f.clone(f.ZERO,Rn);else{let t=i.cartesianToCartographic(o,Ur);n=e.project(t,Rn),f.fromElements(n.z,n.x,n.y,n)}let s=H.eastNorthUpToFixedFrame(o,i,Pn),a=L.inverseTransformation(s,Dr),u=L.getMatrix3(t,Ai),l=L.multiplyByMatrix3(a,u,r);return L.multiply(Ir,l,r),L.setTranslation(r,n,r),r},H.wgs84To2DModelMatrix=function(e,t,r){if(!d(e))throw new T("projection is required.");if(!d(t))throw new T("center is required.");if(!d(r))throw new T("result is required.");let n=e.ellipsoid,o=H.eastNorthUpToFixedFrame(t,n,Pn),i=L.inverseTransformation(o,Dr),s=n.cartesianToCartographic(t,Ur),a=e.project(s,Rn);f.fromElements(a.z,a.x,a.y,a);let u=L.fromTranslation(a,Pn);return L.multiply(Ir,i,r),L.multiply(u,r,r),r};var uu=H;export{Ht as a,gt as b,An as c,es as d,He as e,Ue as f,xr as g,uu as h}; \ No newline at end of file diff --git a/Workers/chunk-YIFABOF6.js.LICENSE.txt b/Workers/chunk-LYPPBP4Q.js.LICENSE.txt similarity index 98% rename from Workers/chunk-YIFABOF6.js.LICENSE.txt rename to Workers/chunk-LYPPBP4Q.js.LICENSE.txt index e2a778d..9b6a810 100644 --- a/Workers/chunk-YIFABOF6.js.LICENSE.txt +++ b/Workers/chunk-LYPPBP4Q.js.LICENSE.txt @@ -44,7 +44,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 + * Version 1.115 * * Copyright 2011-2022 Cesium Contributors * diff --git a/Workers/chunk-E7SCGOHT.js b/Workers/chunk-MEKIO5L4.js similarity index 85% rename from Workers/chunk-E7SCGOHT.js rename to Workers/chunk-MEKIO5L4.js index e28915e..4f11ea2 100644 --- a/Workers/chunk-E7SCGOHT.js +++ b/Workers/chunk-MEKIO5L4.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-E7SCGOHT.js.LICENSE.txt */ -import{a as L}from"./chunk-KW7R7J2E.js";import{a as j}from"./chunk-2DNLGXTL.js";import{a as D}from"./chunk-EQ7PMEBC.js";import{a as V}from"./chunk-FDDSRMXI.js";import{b as T,c as B,d as x}from"./chunk-YYYI3I6L.js";import{d as O}from"./chunk-YIFABOF6.js";import{a as S}from"./chunk-VNDUYYBJ.js";import{a as c,c as l}from"./chunk-V624RX7A.js";import{a as E}from"./chunk-VZ2RFJ3P.js";import{a as m}from"./chunk-RKPKWH3Z.js";import{a as _}from"./chunk-BIYNNQRQ.js";import{e as d}from"./chunk-ZLUSVROX.js";var q=new c,M=new c;function U(e){let t=e.center;M=c.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,M),e.height,M),M=c.add(t,M,M);let i=new O(M,e.semiMajorAxis),r=L.computeEllipsePositions(e,!1,!0).outerPositions,n=new V({position:new x({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:L.raisePositionsToHeight(r,e,!1)})}),o=r.length/3,s=D.createTypedArray(o,2*o),a=0;for(let e=0;e0){let e=Math.min(u,l);p=Math.round(l/e);let t=Math.min(p*u,l);for(h=0;h0){let e=Math.min(u,l);p=Math.round(l/e);let t=Math.min(p*u,l);for(h=0;ht.right)throw new w("right must be greater than left.");if(t.bottom>t.top)throw new w("top must be greater than bottom.");if(t.near<=0||t.near>t.far)throw new w("near must be greater than zero and less than far.");t._left=t.left,t._right=t.right,t._top=t.top,t._bottom=t.bottom,t._near=t.near,t._far=t.far,t._orthographicMatrix=O.computeOrthographicOffCenter(t.left,t.right,t.bottom,t.top,t.near,t.far,t._orthographicMatrix)}}Object.defineProperties(k.prototype,{projectionMatrix:{get:function(){return ce(this),this._orthographicMatrix}}});var me=new r,ye=new r,ge=new r,ee=new r;k.prototype.computeCullingVolume=function(t,e,i){if(!a(t))throw new w("position is required.");if(!a(e))throw new w("direction is required.");if(!a(i))throw new w("up is required.");let o=this._cullingVolume.planes,n=this.top,s=this.bottom,f=this.right,h=this.left,u=this.near,p=this.far,l=r.cross(e,i,me);r.normalize(l,l);let c=ye;r.multiplyByScalar(e,u,c),r.add(t,c,c);let m=ge;r.multiplyByScalar(l,h,m),r.add(c,m,m);let d=o[0];return a(d)||(d=o[0]=new b),d.x=l.x,d.y=l.y,d.z=l.z,d.w=-r.dot(l,m),r.multiplyByScalar(l,f,m),r.add(c,m,m),d=o[1],a(d)||(d=o[1]=new b),d.x=-l.x,d.y=-l.y,d.z=-l.z,d.w=-r.dot(r.negate(l,ee),m),r.multiplyByScalar(i,s,m),r.add(c,m,m),d=o[2],a(d)||(d=o[2]=new b),d.x=i.x,d.y=i.y,d.z=i.z,d.w=-r.dot(i,m),r.multiplyByScalar(i,n,m),r.add(c,m,m),d=o[3],a(d)||(d=o[3]=new b),d.x=-i.x,d.y=-i.y,d.z=-i.z,d.w=-r.dot(r.negate(i,ee),m),d=o[4],a(d)||(d=o[4]=new b),d.x=e.x,d.y=e.y,d.z=e.z,d.w=-r.dot(e,c),r.multiplyByScalar(e,p,m),r.add(t,m,m),d=o[5],a(d)||(d=o[5]=new b),d.x=-e.x,d.y=-e.y,d.z=-e.z,d.w=-r.dot(r.negate(e,ee),m),this._cullingVolume},k.prototype.getPixelDimensions=function(t,e,r,i,o){if(ce(this),!a(t)||!a(e))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(t<=0)throw new w("drawingBufferWidth must be greater than zero.");if(e<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!a(r))throw new w("distance is required.");if(!a(i))throw new w("pixelRatio is required.");if(i<=0)throw new w("pixelRatio must be greater than zero.");if(!a(o))throw new w("A result object is required.");let n=i*(this.right-this.left)/t,s=i*(this.top-this.bottom)/e;return o.x=n,o.y=s,o},k.prototype.clone=function(t){return a(t)||(t=new k),t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},k.prototype.equals=function(t){return a(t)&&t instanceof k&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},k.prototype.equalsEpsilon=function(t,e,r){return t===this||a(t)&&t instanceof k&&P.equalsEpsilon(this.right,t.right,e,r)&&P.equalsEpsilon(this.left,t.left,e,r)&&P.equalsEpsilon(this.top,t.top,e,r)&&P.equalsEpsilon(this.bottom,t.bottom,e,r)&&P.equalsEpsilon(this.near,t.near,e,r)&&P.equalsEpsilon(this.far,t.far,e,r)};var he=k;function v(t){t=m(t,m.EMPTY_OBJECT),this._offCenterFrustum=new he,this.width=t.width,this._width=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=m(t.near,1),this._near=this.near,this.far=m(t.far,5e8),this._far=this.far}function j(t){if(!(a(t.width)&&a(t.aspectRatio)&&a(t.near)&&a(t.far)))throw new w("width, aspectRatio, near, or far parameters are not set.");let e=t._offCenterFrustum;if(t.width!==t._width||t.aspectRatio!==t._aspectRatio||t.near!==t._near||t.far!==t._far){if(t.aspectRatio<0)throw new w("aspectRatio must be positive.");if(t.near<0||t.near>t.far)throw new w("near must be greater than zero and less than far.");t._aspectRatio=t.aspectRatio,t._width=t.width,t._near=t.near,t._far=t.far;let r=1/t.aspectRatio;e.right=.5*t.width,e.left=-e.right,e.top=r*e.right,e.bottom=-e.top,e.near=t.near,e.far=t.far}}v.packedLength=4,v.pack=function(t,e,r){return F.typeOf.object("value",t),F.defined("array",e),r=m(r,0),e[r++]=t.width,e[r++]=t.aspectRatio,e[r++]=t.near,e[r]=t.far,e},v.unpack=function(t,e,r){return F.defined("array",t),e=m(e,0),a(r)||(r=new v),r.width=t[e++],r.aspectRatio=t[e++],r.near=t[e++],r.far=t[e],r},Object.defineProperties(v.prototype,{projectionMatrix:{get:function(){return j(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return j(this),this._offCenterFrustum}}}),v.prototype.computeCullingVolume=function(t,e,r){return j(this),this._offCenterFrustum.computeCullingVolume(t,e,r)},v.prototype.getPixelDimensions=function(t,e,r,i,a){return j(this),this._offCenterFrustum.getPixelDimensions(t,e,r,i,a)},v.prototype.clone=function(t){return a(t)||(t=new v),t.aspectRatio=this.aspectRatio,t.width=this.width,t.near=this.near,t.far=this.far,t._aspectRatio=void 0,t._width=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},v.prototype.equals=function(t){return!!(a(t)&&t instanceof v)&&(j(this),j(t),this.width===t.width&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},v.prototype.equalsEpsilon=function(t,e,r){return!!(a(t)&&t instanceof v)&&(j(this),j(t),P.equalsEpsilon(this.width,t.width,e,r)&&P.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,r)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,r))};var B=v;function S(t){t=m(t,m.EMPTY_OBJECT),this.left=t.left,this._left=void 0,this.right=t.right,this._right=void 0,this.top=t.top,this._top=void 0,this.bottom=t.bottom,this._bottom=void 0,this.near=m(t.near,1),this._near=this.near,this.far=m(t.far,5e8),this._far=this.far,this._cullingVolume=new $,this._perspectiveMatrix=new O,this._infinitePerspective=new O}function te(t){if(!(a(t.right)&&a(t.left)&&a(t.top)&&a(t.bottom)&&a(t.near)&&a(t.far)))throw new w("right, left, top, bottom, near, or far parameters are not set.");let e=t.top,r=t.bottom,i=t.right,o=t.left,n=t.near,s=t.far;if(e!==t._top||r!==t._bottom||o!==t._left||i!==t._right||n!==t._near||s!==t._far){if(t.near<=0||t.near>t.far)throw new w("near must be greater than zero and less than far.");t._left=o,t._right=i,t._top=e,t._bottom=r,t._near=n,t._far=s,t._perspectiveMatrix=O.computePerspectiveOffCenter(o,i,r,e,n,s,t._perspectiveMatrix),t._infinitePerspective=O.computeInfinitePerspectiveOffCenter(o,i,r,e,n,t._infinitePerspective)}}Object.defineProperties(S.prototype,{projectionMatrix:{get:function(){return te(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return te(this),this._infinitePerspective}}});var Ce=new r,be=new r,Pe=new r,Oe=new r;S.prototype.computeCullingVolume=function(t,e,i){if(!a(t))throw new w("position is required.");if(!a(e))throw new w("direction is required.");if(!a(i))throw new w("up is required.");let o=this._cullingVolume.planes,n=this.top,s=this.bottom,f=this.right,h=this.left,u=this.near,p=this.far,l=r.cross(e,i,Ce),c=be;r.multiplyByScalar(e,u,c),r.add(t,c,c);let m=Pe;r.multiplyByScalar(e,p,m),r.add(t,m,m);let d=Oe;r.multiplyByScalar(l,h,d),r.add(c,d,d),r.subtract(d,t,d),r.normalize(d,d),r.cross(d,i,d),r.normalize(d,d);let _=o[0];return a(_)||(_=o[0]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,t),r.multiplyByScalar(l,f,d),r.add(c,d,d),r.subtract(d,t,d),r.cross(i,d,d),r.normalize(d,d),_=o[1],a(_)||(_=o[1]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,t),r.multiplyByScalar(i,s,d),r.add(c,d,d),r.subtract(d,t,d),r.cross(l,d,d),r.normalize(d,d),_=o[2],a(_)||(_=o[2]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,t),r.multiplyByScalar(i,n,d),r.add(c,d,d),r.subtract(d,t,d),r.cross(d,l,d),r.normalize(d,d),_=o[3],a(_)||(_=o[3]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,t),_=o[4],a(_)||(_=o[4]=new b),_.x=e.x,_.y=e.y,_.z=e.z,_.w=-r.dot(e,c),r.negate(e,d),_=o[5],a(_)||(_=o[5]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,m),this._cullingVolume},S.prototype.getPixelDimensions=function(t,e,r,i,o){if(te(this),!a(t)||!a(e))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(t<=0)throw new w("drawingBufferWidth must be greater than zero.");if(e<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!a(r))throw new w("distance is required.");if(!a(i))throw new w("pixelRatio is required");if(i<=0)throw new w("pixelRatio must be greater than zero.");if(!a(o))throw new w("A result object is required.");let n=1/this.near,s=this.top*n,f=2*i*r*s/e;s=this.right*n;let h=2*i*r*s/t;return o.x=h,o.y=f,o},S.prototype.clone=function(t){return a(t)||(t=new S),t.right=this.right,t.left=this.left,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},S.prototype.equals=function(t){return a(t)&&t instanceof S&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},S.prototype.equalsEpsilon=function(t,e,r){return t===this||a(t)&&t instanceof S&&P.equalsEpsilon(this.right,t.right,e,r)&&P.equalsEpsilon(this.left,t.left,e,r)&&P.equalsEpsilon(this.top,t.top,e,r)&&P.equalsEpsilon(this.bottom,t.bottom,e,r)&&P.equalsEpsilon(this.near,t.near,e,r)&&P.equalsEpsilon(this.far,t.far,e,r)};var pe=S;function R(t){t=m(t,m.EMPTY_OBJECT),this._offCenterFrustum=new pe,this.fov=t.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=m(t.near,1),this._near=this.near,this.far=m(t.far,5e8),this._far=this.far,this.xOffset=m(t.xOffset,0),this._xOffset=this.xOffset,this.yOffset=m(t.yOffset,0),this._yOffset=this.yOffset}function T(t){if(!(a(t.fov)&&a(t.aspectRatio)&&a(t.near)&&a(t.far)))throw new w("fov, aspectRatio, near, or far parameters are not set.");let e=t._offCenterFrustum;if(t.fov!==t._fov||t.aspectRatio!==t._aspectRatio||t.near!==t._near||t.far!==t._far||t.xOffset!==t._xOffset||t.yOffset!==t._yOffset){if(t.fov<0||t.fov>=Math.PI)throw new w("fov must be in the range [0, PI).");if(t.aspectRatio<0)throw new w("aspectRatio must be positive.");if(t.near<0||t.near>t.far)throw new w("near must be greater than zero and less than far.");t._aspectRatio=t.aspectRatio,t._fov=t.fov,t._fovy=t.aspectRatio<=1?t.fov:2*Math.atan(Math.tan(.5*t.fov)/t.aspectRatio),t._near=t.near,t._far=t.far,t._sseDenominator=2*Math.tan(.5*t._fovy),t._xOffset=t.xOffset,t._yOffset=t.yOffset,e.top=t.near*Math.tan(.5*t._fovy),e.bottom=-e.top,e.right=t.aspectRatio*e.top,e.left=-e.right,e.near=t.near,e.far=t.far,e.right+=t.xOffset,e.left+=t.xOffset,e.top+=t.yOffset,e.bottom+=t.yOffset}}R.packedLength=6,R.pack=function(t,e,r){return F.typeOf.object("value",t),F.defined("array",e),r=m(r,0),e[r++]=t.fov,e[r++]=t.aspectRatio,e[r++]=t.near,e[r++]=t.far,e[r++]=t.xOffset,e[r]=t.yOffset,e},R.unpack=function(t,e,r){return F.defined("array",t),e=m(e,0),a(r)||(r=new R),r.fov=t[e++],r.aspectRatio=t[e++],r.near=t[e++],r.far=t[e++],r.xOffset=t[e++],r.yOffset=t[e],r},Object.defineProperties(R.prototype,{projectionMatrix:{get:function(){return T(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return T(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return T(this),this._fovy}},sseDenominator:{get:function(){return T(this),this._sseDenominator}},offCenterFrustum:{get:function(){return T(this),this._offCenterFrustum}}}),R.prototype.computeCullingVolume=function(t,e,r){return T(this),this._offCenterFrustum.computeCullingVolume(t,e,r)},R.prototype.getPixelDimensions=function(t,e,r,i,a){return T(this),this._offCenterFrustum.getPixelDimensions(t,e,r,i,a)},R.prototype.clone=function(t){return a(t)||(t=new R),t.aspectRatio=this.aspectRatio,t.fov=this.fov,t.near=this.near,t.far=this.far,t._aspectRatio=void 0,t._fov=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},R.prototype.equals=function(t){return!!(a(t)&&t instanceof R)&&(T(this),T(t),this.fov===t.fov&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},R.prototype.equalsEpsilon=function(t,e,r){return!!(a(t)&&t instanceof R)&&(T(this),T(t),P.equalsEpsilon(this.fov,t.fov,e,r)&&P.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,r)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,r))};var L=R,I=0,Fe=1;function Y(t){F.typeOf.object("options",t),F.typeOf.object("options.frustum",t.frustum),F.typeOf.object("options.origin",t.origin),F.typeOf.object("options.orientation",t.orientation);let e,i,a=t.frustum,o=t.orientation,n=t.origin,s=m(t.vertexFormat,A.DEFAULT),f=m(t._drawNearPlane,!0);a instanceof L?(e=I,i=L.packedLength):a instanceof B&&(e=Fe,i=B.packedLength),this._frustumType=e,this._frustum=a.clone(),this._origin=r.clone(n),this._orientation=N.clone(o),this._drawNearPlane=f,this._vertexFormat=s,this._workerName="createFrustumGeometry",this.packedLength=2+i+r.packedLength+N.packedLength+A.packedLength}Y.pack=function(t,e,i){F.typeOf.object("value",t),F.defined("array",e),i=m(i,0);let a=t._frustumType,o=t._frustum;return e[i++]=a,a===I?(L.pack(o,e,i),i+=L.packedLength):(B.pack(o,e,i),i+=B.packedLength),r.pack(t._origin,e,i),i+=r.packedLength,N.pack(t._orientation,e,i),i+=N.packedLength,A.pack(t._vertexFormat,e,i),e[i+=A.packedLength]=t._drawNearPlane?1:0,e};var xe=new L,ze=new B,ve=new N,Re=new r,qe=new A;function W(t,e,r,i,o,n,s,f){let h=t/3*2;for(let o=0;o<4;++o)a(e)&&(e[t]=n.x,e[t+1]=n.y,e[t+2]=n.z),a(r)&&(r[t]=s.x,r[t+1]=s.y,r[t+2]=s.z),a(i)&&(i[t]=f.x,i[t+1]=f.y,i[t+2]=f.z),t+=3;o[h]=0,o[h+1]=0,o[h+2]=1,o[h+3]=0,o[h+4]=1,o[h+5]=1,o[h+6]=0,o[h+7]=1}Y.unpack=function(t,e,i){F.defined("array",t),e=m(e,0);let o,n=t[e++];n===I?(o=L.unpack(t,e,xe),e+=L.packedLength):(o=B.unpack(t,e,ze),e+=B.packedLength);let s=r.unpack(t,e,Re);e+=r.packedLength;let f=N.unpack(t,e,ve);e+=N.packedLength;let h=A.unpack(t,e,qe),u=1===t[e+=A.packedLength];if(!a(i))return new Y({frustum:o,origin:s,orientation:f,vertexFormat:h,_drawNearPlane:u});let p=n===i._frustumType?i._frustum:void 0;return i._frustum=o.clone(p),i._frustumType=n,i._origin=r.clone(s,i._origin),i._orientation=N.clone(f,i._orientation),i._vertexFormat=A.clone(h,i._vertexFormat),i._drawNearPlane=u,i};var Te=new u,Me=new O,ne=new O,se=new r,le=new r,we=new r,ke=new r,Se=new r,De=new r,U=new Array(3),Z=new Array(4);Z[0]=new b(-1,-1,1,1),Z[1]=new b(1,-1,1,1),Z[2]=new b(1,1,1,1),Z[3]=new b(-1,1,1,1);var _e=new Array(4);for(let t=0;t<4;++t)_e[t]=new b;Y._computeNearFarPlanes=function(t,e,i,o,n,s,f,h){let p=u.fromQuaternion(e,Te),l=m(s,se),c=m(f,le),w=m(h,we);l=u.getColumn(p,0,l),c=u.getColumn(p,1,c),w=u.getColumn(p,2,w),r.normalize(l,l),r.normalize(c,c),r.normalize(w,w),r.negate(l,l);let d,_,g=O.computeView(t,w,c,l,Me),y=o.projectionMatrix;if(i===I){let t=O.multiply(y,g,ne);_=O.inverse(t,ne)}else d=O.inverseTransformation(g,ne);a(_)?(U[0]=o.near,U[1]=o.far):(U[0]=0,U[1]=o.near,U[2]=o.far);for(let e=0;e<2;++e)for(let i=0;i<4;++i){let s=b.clone(Z[i],_e[i]);if(a(_)){s=O.multiplyByVector(_,s,s);let i=1/s.w;r.multiplyByScalar(s,i,s),r.subtract(s,t,s),r.normalize(s,s);let a=r.dot(w,s);r.multiplyByScalar(s,U[e]/a,s),r.add(s,t,s)}else{let t=o.offCenterFrustum;a(t)&&(o=t);let r=U[e],i=U[e+1];s.x=.5*(s.x*(o.right-o.left)+o.left+o.right),s.y=.5*(s.y*(o.top-o.bottom)+o.bottom+o.top),s.z=.5*(s.z*(r-i)-r-i),s.w=1,O.multiplyByVector(d,s,s)}n[12*e+3*i]=s.x,n[12*e+3*i+1]=s.y,n[12*e+3*i+2]=s.z}},Y.createGeometry=function(t){let e=t._frustumType,i=t._frustum,o=t._origin,n=t._orientation,s=t._drawNearPlane,f=t._vertexFormat,h=s?6:5,u=new Float64Array(72);Y._computeNearFarPlanes(o,n,e,i,u);let p=24;u[p]=u[12],u[p+1]=u[13],u[p+2]=u[14],u[p+3]=u[0],u[p+4]=u[1],u[p+5]=u[2],u[p+6]=u[9],u[p+7]=u[10],u[p+8]=u[11],u[p+9]=u[21],u[p+10]=u[22],u[p+11]=u[23],p+=12,u[p]=u[15],u[p+1]=u[16],u[p+2]=u[17],u[p+3]=u[3],u[p+4]=u[4],u[p+5]=u[5],u[p+6]=u[0],u[p+7]=u[1],u[p+8]=u[2],u[p+9]=u[12],u[p+10]=u[13],u[p+11]=u[14],p+=12,u[p]=u[3],u[p+1]=u[4],u[p+2]=u[5],u[p+3]=u[15],u[p+4]=u[16],u[p+5]=u[17],u[p+6]=u[18],u[p+7]=u[19],u[p+8]=u[20],u[p+9]=u[6],u[p+10]=u[7],u[p+11]=u[8],p+=12,u[p]=u[6],u[p+1]=u[7],u[p+2]=u[8],u[p+3]=u[18],u[p+4]=u[19],u[p+5]=u[20],u[p+6]=u[21],u[p+7]=u[22],u[p+8]=u[23],u[p+9]=u[9],u[p+10]=u[10],u[p+11]=u[11],s||(u=u.subarray(12));let l=new ae({position:new J({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:u})});if(a(f.normal)||a(f.tangent)||a(f.bitangent)||a(f.st)){let t=a(f.normal)?new Float32Array(12*h):void 0,e=a(f.tangent)?new Float32Array(12*h):void 0,i=a(f.bitangent)?new Float32Array(12*h):void 0,o=a(f.st)?new Float32Array(8*h):void 0,n=se,u=le,c=we,m=r.negate(n,ke),w=r.negate(u,Se),d=r.negate(c,De);p=0,s&&(W(p,t,e,i,o,d,n,u),p+=12),W(p,t,e,i,o,c,m,u),p+=12,W(p,t,e,i,o,m,d,u),p+=12,W(p,t,e,i,o,w,d,m),p+=12,W(p,t,e,i,o,n,c,u),p+=12,W(p,t,e,i,o,u,c,m),a(t)&&(l.normal=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:t})),a(e)&&(l.tangent=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:e})),a(i)&&(l.bitangent=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:i})),a(o)&&(l.st=new J({componentDatatype:H.FLOAT,componentsPerAttribute:2,values:o}))}let c=new Uint16Array(6*h);for(let t=0;tt.right)throw new w("right must be greater than left.");if(t.bottom>t.top)throw new w("top must be greater than bottom.");if(t.near<=0||t.near>t.far)throw new w("near must be greater than zero and less than far.");t._left=t.left,t._right=t.right,t._top=t.top,t._bottom=t.bottom,t._near=t.near,t._far=t.far,t._orthographicMatrix=O.computeOrthographicOffCenter(t.left,t.right,t.bottom,t.top,t.near,t.far,t._orthographicMatrix)}}Object.defineProperties(k.prototype,{projectionMatrix:{get:function(){return ce(this),this._orthographicMatrix}}});var me=new r,ye=new r,ge=new r,ee=new r;k.prototype.computeCullingVolume=function(t,e,i){if(!a(t))throw new w("position is required.");if(!a(e))throw new w("direction is required.");if(!a(i))throw new w("up is required.");let o=this._cullingVolume.planes,n=this.top,s=this.bottom,f=this.right,h=this.left,u=this.near,p=this.far,l=r.cross(e,i,me);r.normalize(l,l);let c=ye;r.multiplyByScalar(e,u,c),r.add(t,c,c);let m=ge;r.multiplyByScalar(l,h,m),r.add(c,m,m);let d=o[0];return a(d)||(d=o[0]=new b),d.x=l.x,d.y=l.y,d.z=l.z,d.w=-r.dot(l,m),r.multiplyByScalar(l,f,m),r.add(c,m,m),d=o[1],a(d)||(d=o[1]=new b),d.x=-l.x,d.y=-l.y,d.z=-l.z,d.w=-r.dot(r.negate(l,ee),m),r.multiplyByScalar(i,s,m),r.add(c,m,m),d=o[2],a(d)||(d=o[2]=new b),d.x=i.x,d.y=i.y,d.z=i.z,d.w=-r.dot(i,m),r.multiplyByScalar(i,n,m),r.add(c,m,m),d=o[3],a(d)||(d=o[3]=new b),d.x=-i.x,d.y=-i.y,d.z=-i.z,d.w=-r.dot(r.negate(i,ee),m),d=o[4],a(d)||(d=o[4]=new b),d.x=e.x,d.y=e.y,d.z=e.z,d.w=-r.dot(e,c),r.multiplyByScalar(e,p,m),r.add(t,m,m),d=o[5],a(d)||(d=o[5]=new b),d.x=-e.x,d.y=-e.y,d.z=-e.z,d.w=-r.dot(r.negate(e,ee),m),this._cullingVolume},k.prototype.getPixelDimensions=function(t,e,r,i,o){if(ce(this),!a(t)||!a(e))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(t<=0)throw new w("drawingBufferWidth must be greater than zero.");if(e<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!a(r))throw new w("distance is required.");if(!a(i))throw new w("pixelRatio is required.");if(i<=0)throw new w("pixelRatio must be greater than zero.");if(!a(o))throw new w("A result object is required.");let n=i*(this.right-this.left)/t,s=i*(this.top-this.bottom)/e;return o.x=n,o.y=s,o},k.prototype.clone=function(t){return a(t)||(t=new k),t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},k.prototype.equals=function(t){return a(t)&&t instanceof k&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},k.prototype.equalsEpsilon=function(t,e,r){return t===this||a(t)&&t instanceof k&&P.equalsEpsilon(this.right,t.right,e,r)&&P.equalsEpsilon(this.left,t.left,e,r)&&P.equalsEpsilon(this.top,t.top,e,r)&&P.equalsEpsilon(this.bottom,t.bottom,e,r)&&P.equalsEpsilon(this.near,t.near,e,r)&&P.equalsEpsilon(this.far,t.far,e,r)};var he=k;function v(t){t=m(t,m.EMPTY_OBJECT),this._offCenterFrustum=new he,this.width=t.width,this._width=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=m(t.near,1),this._near=this.near,this.far=m(t.far,5e8),this._far=this.far}function j(t){if(!(a(t.width)&&a(t.aspectRatio)&&a(t.near)&&a(t.far)))throw new w("width, aspectRatio, near, or far parameters are not set.");let e=t._offCenterFrustum;if(t.width!==t._width||t.aspectRatio!==t._aspectRatio||t.near!==t._near||t.far!==t._far){if(t.aspectRatio<0)throw new w("aspectRatio must be positive.");if(t.near<0||t.near>t.far)throw new w("near must be greater than zero and less than far.");t._aspectRatio=t.aspectRatio,t._width=t.width,t._near=t.near,t._far=t.far;let r=1/t.aspectRatio;e.right=.5*t.width,e.left=-e.right,e.top=r*e.right,e.bottom=-e.top,e.near=t.near,e.far=t.far}}v.packedLength=4,v.pack=function(t,e,r){return F.typeOf.object("value",t),F.defined("array",e),r=m(r,0),e[r++]=t.width,e[r++]=t.aspectRatio,e[r++]=t.near,e[r]=t.far,e},v.unpack=function(t,e,r){return F.defined("array",t),e=m(e,0),a(r)||(r=new v),r.width=t[e++],r.aspectRatio=t[e++],r.near=t[e++],r.far=t[e],r},Object.defineProperties(v.prototype,{projectionMatrix:{get:function(){return j(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return j(this),this._offCenterFrustum}}}),v.prototype.computeCullingVolume=function(t,e,r){return j(this),this._offCenterFrustum.computeCullingVolume(t,e,r)},v.prototype.getPixelDimensions=function(t,e,r,i,a){return j(this),this._offCenterFrustum.getPixelDimensions(t,e,r,i,a)},v.prototype.clone=function(t){return a(t)||(t=new v),t.aspectRatio=this.aspectRatio,t.width=this.width,t.near=this.near,t.far=this.far,t._aspectRatio=void 0,t._width=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},v.prototype.equals=function(t){return!!(a(t)&&t instanceof v)&&(j(this),j(t),this.width===t.width&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},v.prototype.equalsEpsilon=function(t,e,r){return!!(a(t)&&t instanceof v)&&(j(this),j(t),P.equalsEpsilon(this.width,t.width,e,r)&&P.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,r)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,r))};var B=v;function S(t){t=m(t,m.EMPTY_OBJECT),this.left=t.left,this._left=void 0,this.right=t.right,this._right=void 0,this.top=t.top,this._top=void 0,this.bottom=t.bottom,this._bottom=void 0,this.near=m(t.near,1),this._near=this.near,this.far=m(t.far,5e8),this._far=this.far,this._cullingVolume=new $,this._perspectiveMatrix=new O,this._infinitePerspective=new O}function te(t){if(!(a(t.right)&&a(t.left)&&a(t.top)&&a(t.bottom)&&a(t.near)&&a(t.far)))throw new w("right, left, top, bottom, near, or far parameters are not set.");let e=t.top,r=t.bottom,i=t.right,o=t.left,n=t.near,s=t.far;if(e!==t._top||r!==t._bottom||o!==t._left||i!==t._right||n!==t._near||s!==t._far){if(t.near<=0||t.near>t.far)throw new w("near must be greater than zero and less than far.");t._left=o,t._right=i,t._top=e,t._bottom=r,t._near=n,t._far=s,t._perspectiveMatrix=O.computePerspectiveOffCenter(o,i,r,e,n,s,t._perspectiveMatrix),t._infinitePerspective=O.computeInfinitePerspectiveOffCenter(o,i,r,e,n,t._infinitePerspective)}}Object.defineProperties(S.prototype,{projectionMatrix:{get:function(){return te(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return te(this),this._infinitePerspective}}});var Ce=new r,be=new r,Pe=new r,Oe=new r;S.prototype.computeCullingVolume=function(t,e,i){if(!a(t))throw new w("position is required.");if(!a(e))throw new w("direction is required.");if(!a(i))throw new w("up is required.");let o=this._cullingVolume.planes,n=this.top,s=this.bottom,f=this.right,h=this.left,u=this.near,p=this.far,l=r.cross(e,i,Ce),c=be;r.multiplyByScalar(e,u,c),r.add(t,c,c);let m=Pe;r.multiplyByScalar(e,p,m),r.add(t,m,m);let d=Oe;r.multiplyByScalar(l,h,d),r.add(c,d,d),r.subtract(d,t,d),r.normalize(d,d),r.cross(d,i,d),r.normalize(d,d);let _=o[0];return a(_)||(_=o[0]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,t),r.multiplyByScalar(l,f,d),r.add(c,d,d),r.subtract(d,t,d),r.cross(i,d,d),r.normalize(d,d),_=o[1],a(_)||(_=o[1]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,t),r.multiplyByScalar(i,s,d),r.add(c,d,d),r.subtract(d,t,d),r.cross(l,d,d),r.normalize(d,d),_=o[2],a(_)||(_=o[2]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,t),r.multiplyByScalar(i,n,d),r.add(c,d,d),r.subtract(d,t,d),r.cross(d,l,d),r.normalize(d,d),_=o[3],a(_)||(_=o[3]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,t),_=o[4],a(_)||(_=o[4]=new b),_.x=e.x,_.y=e.y,_.z=e.z,_.w=-r.dot(e,c),r.negate(e,d),_=o[5],a(_)||(_=o[5]=new b),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-r.dot(d,m),this._cullingVolume},S.prototype.getPixelDimensions=function(t,e,r,i,o){if(te(this),!a(t)||!a(e))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(t<=0)throw new w("drawingBufferWidth must be greater than zero.");if(e<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!a(r))throw new w("distance is required.");if(!a(i))throw new w("pixelRatio is required");if(i<=0)throw new w("pixelRatio must be greater than zero.");if(!a(o))throw new w("A result object is required.");let n=1/this.near,s=this.top*n,f=2*i*r*s/e;s=this.right*n;let h=2*i*r*s/t;return o.x=h,o.y=f,o},S.prototype.clone=function(t){return a(t)||(t=new S),t.right=this.right,t.left=this.left,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},S.prototype.equals=function(t){return a(t)&&t instanceof S&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},S.prototype.equalsEpsilon=function(t,e,r){return t===this||a(t)&&t instanceof S&&P.equalsEpsilon(this.right,t.right,e,r)&&P.equalsEpsilon(this.left,t.left,e,r)&&P.equalsEpsilon(this.top,t.top,e,r)&&P.equalsEpsilon(this.bottom,t.bottom,e,r)&&P.equalsEpsilon(this.near,t.near,e,r)&&P.equalsEpsilon(this.far,t.far,e,r)};var pe=S;function R(t){t=m(t,m.EMPTY_OBJECT),this._offCenterFrustum=new pe,this.fov=t.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=m(t.near,1),this._near=this.near,this.far=m(t.far,5e8),this._far=this.far,this.xOffset=m(t.xOffset,0),this._xOffset=this.xOffset,this.yOffset=m(t.yOffset,0),this._yOffset=this.yOffset}function T(t){if(!(a(t.fov)&&a(t.aspectRatio)&&a(t.near)&&a(t.far)))throw new w("fov, aspectRatio, near, or far parameters are not set.");let e=t._offCenterFrustum;if(t.fov!==t._fov||t.aspectRatio!==t._aspectRatio||t.near!==t._near||t.far!==t._far||t.xOffset!==t._xOffset||t.yOffset!==t._yOffset){if(t.fov<0||t.fov>=Math.PI)throw new w("fov must be in the range [0, PI).");if(t.aspectRatio<0)throw new w("aspectRatio must be positive.");if(t.near<0||t.near>t.far)throw new w("near must be greater than zero and less than far.");t._aspectRatio=t.aspectRatio,t._fov=t.fov,t._fovy=t.aspectRatio<=1?t.fov:2*Math.atan(Math.tan(.5*t.fov)/t.aspectRatio),t._near=t.near,t._far=t.far,t._sseDenominator=2*Math.tan(.5*t._fovy),t._xOffset=t.xOffset,t._yOffset=t.yOffset,e.top=t.near*Math.tan(.5*t._fovy),e.bottom=-e.top,e.right=t.aspectRatio*e.top,e.left=-e.right,e.near=t.near,e.far=t.far,e.right+=t.xOffset,e.left+=t.xOffset,e.top+=t.yOffset,e.bottom+=t.yOffset}}R.packedLength=6,R.pack=function(t,e,r){return F.typeOf.object("value",t),F.defined("array",e),r=m(r,0),e[r++]=t.fov,e[r++]=t.aspectRatio,e[r++]=t.near,e[r++]=t.far,e[r++]=t.xOffset,e[r]=t.yOffset,e},R.unpack=function(t,e,r){return F.defined("array",t),e=m(e,0),a(r)||(r=new R),r.fov=t[e++],r.aspectRatio=t[e++],r.near=t[e++],r.far=t[e++],r.xOffset=t[e++],r.yOffset=t[e],r},Object.defineProperties(R.prototype,{projectionMatrix:{get:function(){return T(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return T(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return T(this),this._fovy}},sseDenominator:{get:function(){return T(this),this._sseDenominator}},offCenterFrustum:{get:function(){return T(this),this._offCenterFrustum}}}),R.prototype.computeCullingVolume=function(t,e,r){return T(this),this._offCenterFrustum.computeCullingVolume(t,e,r)},R.prototype.getPixelDimensions=function(t,e,r,i,a){return T(this),this._offCenterFrustum.getPixelDimensions(t,e,r,i,a)},R.prototype.clone=function(t){return a(t)||(t=new R),t.aspectRatio=this.aspectRatio,t.fov=this.fov,t.near=this.near,t.far=this.far,t._aspectRatio=void 0,t._fov=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},R.prototype.equals=function(t){return!!(a(t)&&t instanceof R)&&(T(this),T(t),this.fov===t.fov&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},R.prototype.equalsEpsilon=function(t,e,r){return!!(a(t)&&t instanceof R)&&(T(this),T(t),P.equalsEpsilon(this.fov,t.fov,e,r)&&P.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,r)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,r))};var L=R,I=0,Fe=1;function Y(t){F.typeOf.object("options",t),F.typeOf.object("options.frustum",t.frustum),F.typeOf.object("options.origin",t.origin),F.typeOf.object("options.orientation",t.orientation);let e,i,a=t.frustum,o=t.orientation,n=t.origin,s=m(t.vertexFormat,A.DEFAULT),f=m(t._drawNearPlane,!0);a instanceof L?(e=I,i=L.packedLength):a instanceof B&&(e=Fe,i=B.packedLength),this._frustumType=e,this._frustum=a.clone(),this._origin=r.clone(n),this._orientation=N.clone(o),this._drawNearPlane=f,this._vertexFormat=s,this._workerName="createFrustumGeometry",this.packedLength=2+i+r.packedLength+N.packedLength+A.packedLength}Y.pack=function(t,e,i){F.typeOf.object("value",t),F.defined("array",e),i=m(i,0);let a=t._frustumType,o=t._frustum;return e[i++]=a,a===I?(L.pack(o,e,i),i+=L.packedLength):(B.pack(o,e,i),i+=B.packedLength),r.pack(t._origin,e,i),i+=r.packedLength,N.pack(t._orientation,e,i),i+=N.packedLength,A.pack(t._vertexFormat,e,i),e[i+=A.packedLength]=t._drawNearPlane?1:0,e};var xe=new L,ze=new B,ve=new N,Re=new r,qe=new A;function W(t,e,r,i,o,n,s,f){let h=t/3*2;for(let o=0;o<4;++o)a(e)&&(e[t]=n.x,e[t+1]=n.y,e[t+2]=n.z),a(r)&&(r[t]=s.x,r[t+1]=s.y,r[t+2]=s.z),a(i)&&(i[t]=f.x,i[t+1]=f.y,i[t+2]=f.z),t+=3;o[h]=0,o[h+1]=0,o[h+2]=1,o[h+3]=0,o[h+4]=1,o[h+5]=1,o[h+6]=0,o[h+7]=1}Y.unpack=function(t,e,i){F.defined("array",t),e=m(e,0);let o,n=t[e++];n===I?(o=L.unpack(t,e,xe),e+=L.packedLength):(o=B.unpack(t,e,ze),e+=B.packedLength);let s=r.unpack(t,e,Re);e+=r.packedLength;let f=N.unpack(t,e,ve);e+=N.packedLength;let h=A.unpack(t,e,qe),u=1===t[e+=A.packedLength];if(!a(i))return new Y({frustum:o,origin:s,orientation:f,vertexFormat:h,_drawNearPlane:u});let p=n===i._frustumType?i._frustum:void 0;return i._frustum=o.clone(p),i._frustumType=n,i._origin=r.clone(s,i._origin),i._orientation=N.clone(f,i._orientation),i._vertexFormat=A.clone(h,i._vertexFormat),i._drawNearPlane=u,i};var Te=new u,Me=new O,ne=new O,se=new r,le=new r,we=new r,ke=new r,Se=new r,De=new r,U=new Array(3),Z=new Array(4);Z[0]=new b(-1,-1,1,1),Z[1]=new b(1,-1,1,1),Z[2]=new b(1,1,1,1),Z[3]=new b(-1,1,1,1);var _e=new Array(4);for(let t=0;t<4;++t)_e[t]=new b;Y._computeNearFarPlanes=function(t,e,i,o,n,s,f,h){let p=u.fromQuaternion(e,Te),l=m(s,se),c=m(f,le),w=m(h,we);l=u.getColumn(p,0,l),c=u.getColumn(p,1,c),w=u.getColumn(p,2,w),r.normalize(l,l),r.normalize(c,c),r.normalize(w,w),r.negate(l,l);let d,_,g=O.computeView(t,w,c,l,Me),y=o.projectionMatrix;if(i===I){let t=O.multiply(y,g,ne);_=O.inverse(t,ne)}else d=O.inverseTransformation(g,ne);a(_)?(U[0]=o.near,U[1]=o.far):(U[0]=0,U[1]=o.near,U[2]=o.far);for(let e=0;e<2;++e)for(let i=0;i<4;++i){let s=b.clone(Z[i],_e[i]);if(a(_)){s=O.multiplyByVector(_,s,s);let i=1/s.w;r.multiplyByScalar(s,i,s),r.subtract(s,t,s),r.normalize(s,s);let a=r.dot(w,s);r.multiplyByScalar(s,U[e]/a,s),r.add(s,t,s)}else{let t=o.offCenterFrustum;a(t)&&(o=t);let r=U[e],i=U[e+1];s.x=.5*(s.x*(o.right-o.left)+o.left+o.right),s.y=.5*(s.y*(o.top-o.bottom)+o.bottom+o.top),s.z=.5*(s.z*(r-i)-r-i),s.w=1,O.multiplyByVector(d,s,s)}n[12*e+3*i]=s.x,n[12*e+3*i+1]=s.y,n[12*e+3*i+2]=s.z}},Y.createGeometry=function(t){let e=t._frustumType,i=t._frustum,o=t._origin,n=t._orientation,s=t._drawNearPlane,f=t._vertexFormat,h=s?6:5,u=new Float64Array(72);Y._computeNearFarPlanes(o,n,e,i,u);let p=24;u[p]=u[12],u[p+1]=u[13],u[p+2]=u[14],u[p+3]=u[0],u[p+4]=u[1],u[p+5]=u[2],u[p+6]=u[9],u[p+7]=u[10],u[p+8]=u[11],u[p+9]=u[21],u[p+10]=u[22],u[p+11]=u[23],p+=12,u[p]=u[15],u[p+1]=u[16],u[p+2]=u[17],u[p+3]=u[3],u[p+4]=u[4],u[p+5]=u[5],u[p+6]=u[0],u[p+7]=u[1],u[p+8]=u[2],u[p+9]=u[12],u[p+10]=u[13],u[p+11]=u[14],p+=12,u[p]=u[3],u[p+1]=u[4],u[p+2]=u[5],u[p+3]=u[15],u[p+4]=u[16],u[p+5]=u[17],u[p+6]=u[18],u[p+7]=u[19],u[p+8]=u[20],u[p+9]=u[6],u[p+10]=u[7],u[p+11]=u[8],p+=12,u[p]=u[6],u[p+1]=u[7],u[p+2]=u[8],u[p+3]=u[18],u[p+4]=u[19],u[p+5]=u[20],u[p+6]=u[21],u[p+7]=u[22],u[p+8]=u[23],u[p+9]=u[9],u[p+10]=u[10],u[p+11]=u[11],s||(u=u.subarray(12));let l=new ae({position:new J({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:u})});if(a(f.normal)||a(f.tangent)||a(f.bitangent)||a(f.st)){let t=a(f.normal)?new Float32Array(12*h):void 0,e=a(f.tangent)?new Float32Array(12*h):void 0,i=a(f.bitangent)?new Float32Array(12*h):void 0,o=a(f.st)?new Float32Array(8*h):void 0,n=se,u=le,c=we,m=r.negate(n,ke),w=r.negate(u,Se),d=r.negate(c,De);p=0,s&&(W(p,t,e,i,o,d,n,u),p+=12),W(p,t,e,i,o,c,m,u),p+=12,W(p,t,e,i,o,m,d,u),p+=12,W(p,t,e,i,o,w,d,m),p+=12,W(p,t,e,i,o,n,c,u),p+=12,W(p,t,e,i,o,u,c,m),a(t)&&(l.normal=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:t})),a(e)&&(l.tangent=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:e})),a(i)&&(l.bitangent=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:i})),a(o)&&(l.st=new J({componentDatatype:H.FLOAT,componentsPerAttribute:2,values:o}))}let c=new Uint16Array(6*h);for(let t=0;tr&&(r=i),++e,i=t[e]}let o=[];for(let e=0;ei&&(o[t[e]]=s,++s);return(s-i+1)/(n/3)},tipsify:function(e){let t,r=(e=K(e,K.EMPTY_OBJECT)).indices,i=e.maximumIndex,n=K(e.cacheSize,24);function o(e,r,i,n,o,s,a){let u,l=-1,f=-1,p=0;for(;pf||-1===f)&&(f=u,l=e)),++p}return-1===l?function(e,r,i,n){for(;r.length>=1;){let t=r[r.length-1];if(r.splice(r.length-1,1),e[t].numLiveTriangles>0)return t}for(;t0)return++t,t-1;++t}return-1}(n,s,0,a):l}if(!f(r))throw new I("indices is required.");let s=r.length;if(s<3||s%3!=0)throw new I("indices length must be a multiple of three.");if(i<=0)throw new I("maximumIndex must be greater than zero.");if(n<3)throw new I("cacheSize must be greater than two.");let a=0,u=0,l=r[u],p=s;if(f(i))a=i+1;else{for(;ua&&(a=l),++u,l=r[u];if(-1===a)return 0;++a}let c,m=[];for(c=0;cn&&(v.timeStamp=d,++d),++u}h=o(0,n,T,m,d,A,a)}return x}},Wt=Nt,F={};function St(e,t,r,i,n){e[t++]=r,e[t++]=i,e[t++]=i,e[t++]=n,e[t++]=n,e[t]=r}function de(e){let t=e.length,r=t/3*6,i=j.createTypedArray(t,r),n=0;for(let r=0;r=3){let r=6*(t-2),i=j.createTypedArray(t,r);St(i,0,e[0],e[1],e[2]);let n=6;for(let r=3;r0){let t=e.length-1,r=6*(t-1),i=j.createTypedArray(t,r),n=e[0],o=0;for(let r=1;rn&&(n=r[e]);e.indices=Wt.tipsify({indices:r,maximumIndex:n,cacheSize:t})}return e},F.fitToUnsignedShortIndices=function(e){if(!f(e))throw new I("geometry is required.");if(f(e.indices)&&e.primitiveType!==D.TRIANGLES&&e.primitiveType!==D.LINES&&e.primitiveType!==D.POINTS)throw new I("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");let t=[],r=B.computeNumberOfVertices(e);if(f(e.indices)&&r>=N.SIXTY_FOUR_KILOBYTES){let r,i=[],n=[],o=0,s=$t(e.attributes),a=e.indices,u=a.length;e.primitiveType===D.TRIANGLES?r=3:e.primitiveType===D.LINES?r=2:e.primitiveType===D.POINTS&&(r=1);for(let l=0;l=N.SIXTY_FOUR_KILOBYTES&&(t.push(new B({attributes:s,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],n=[],o=0,s=$t(e.attributes))}0!==n.length&&t.push(new B({attributes:s,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var Jt=new r,we=new Mt;F.projectTo2D=function(e,t,i,n,o){if(!f(e))throw new I("geometry is required.");if(!f(t))throw new I("attributeName is required.");if(!f(i))throw new I("attributeName3D is required.");if(!f(n))throw new I("attributeName2D is required.");if(!f(e.attributes[t]))throw new I(`geometry must have attribute matching the attributeName argument: ${t}.`);if(e.attributes[t].componentDatatype!==k.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let s=e.attributes[t],a=(o=f(o)?o:new _t).ellipsoid,u=s.values,l=new Float64Array(u.length),p=0;for(let e=0;ew&&(w=i)}return new B({attributes:d,indices:h,primitiveType:p,boundingSphere:f(b)?new rt(b,w):void 0})}F.combineInstances=function(e){if(!f(e)||e.length<1)throw new I("instances is required and must have length greater than zero.");let t=[],r=[],i=e.length;for(let n=0;n0&&n.push(Vt(t,"geometry")),r.length>0&&(n.push(Vt(r,"westHemisphereGeometry")),n.push(Vt(r,"eastHemisphereGeometry"))),n};var Z=new r,ht=new r,ct=new r,at=new r;F.computeNormal=function(e){if(!f(e))throw new I("geometry is required.");if(!f(e.attributes.position)||!f(e.attributes.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(e.indices))throw new I("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let t,i=e.indices,n=e.attributes,o=n.position.values,s=n.position.values.length/3,a=i.length,u=new Array(s),l=new Array(a/3),p=new Array(a);for(t=0;t0){for(c=0;c3&&(r[3]=0,r[4]=2,r[5]=3);let i=6;for(let e=3;eo?n>s?N.sign(e.y):N.sign(r.y):o>s?N.sign(t.y):N.sign(r.y);let a=i<0;tt(e,a),tt(t,a),tt(r,a)}F.compressVertices=function(e){if(!f(e))throw new I("geometry is required.");let t,i,n=e.attributes.extrudeDirection;if(f(n)){let o=n.values;i=o.length/3;let s=new Float32Array(2*i),a=0;for(t=0;t=0||t.x>=0||r.x>=0)return;Ee(e,t,r);let i=e.y<0,n=t.y<0,o=r.y<0,s=0;s+=i?1:0,s+=n?1:0,s+=o?1:0;let a=Rt.indices;1===s?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(X(e,t,nt,st),X(e,r,it,ot),a[0]=0,a[3]=1,a[4]=2,a[6]=1):n?(X(t,r,nt,st),X(t,e,it,ot),a[0]=1,a[3]=2,a[4]=0,a[6]=2):o&&(X(r,e,nt,st),X(r,t,it,ot),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):2===s&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?n?o||(X(r,e,nt,st),X(r,t,it,ot),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(X(t,r,nt,st),X(t,e,it,ot),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(X(e,t,nt,st),X(e,r,it,ot),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let u=Rt.positions;return u[0]=e,u[1]=t,u[2]=r,u.length=3,(1===s||2===s)&&(u[3]=nt,u[4]=it,u[5]=st,u[6]=ot,u.length=7),Rt}function ne(e,t){let r=e.attributes;if(0===r.position.values.length)return;for(let e in r)if(r.hasOwnProperty(e)&&f(r[e])&&f(r[e].values)){let t=r[e];t.values=k.createTypedArray(t.componentDatatype,t.values)}let i=B.computeNumberOfVertices(e);return e.indices=j.createTypedArray(i,e.indices),t&&(e.boundingSphere=rt.fromVertices(r.position.values)),e}function lt(e){let t=e.attributes,r={};for(let e in t)if(t.hasOwnProperty(e)&&f(t[e])&&f(t[e].values)){let i=t[e];r[e]=new U({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return new B({attributes:r,indices:[],primitiveType:e.primitiveType})}function kt(e,t,r){let i=f(e.geometry.boundingSphere);t=ne(t,i),r=ne(r,i),f(r)&&!f(t)?e.geometry=r:!f(r)&&f(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=r,e.geometry=void 0)}function Ft(e,t){let r=new e,i=new e,n=new e;return function(o,s,a,u,l,f,p,c){let m=e.fromArray(l,o*t,r),y=e.fromArray(l,s*t,i),h=e.fromArray(l,a*t,n);e.multiplyByScalar(m,u.x,m),e.multiplyByScalar(y,u.y,y),e.multiplyByScalar(h,u.z,h);let d=e.add(m,y,m);e.add(d,h,d),c&&e.normalize(d,d),e.pack(d,f,p*t)}}var ze=Ft(dt,4),It=Ft(r,3),ae=Ft(R,2),De=function(e,t,r,i,n,o,s){let a=n[e]*i.x,u=n[t]*i.y,l=n[r]*i.z;o[s]=a+u+l>N.EPSILON6?1:0},wt=new r,Gt=new r,Ct=new r,qe=new r;function Tt(e,t,i,n,o,s,a,u,l,p,c,m,y,h,d,v){if(!(f(s)||f(a)||f(u)||f(l)||f(p)||0!==h))return;let b=r.fromArray(o,3*e,wt),w=r.fromArray(o,3*t,Gt),g=r.fromArray(o,3*i,Ct),I=Ht(n,b,w,g,qe);if(f(I)){if(f(s)&&It(e,t,i,I,s,m.normal.values,v,!0),f(p)){let n,o=r.fromArray(p,3*e,wt),s=r.fromArray(p,3*t,Gt),a=r.fromArray(p,3*i,Ct);r.multiplyByScalar(o,I.x,o),r.multiplyByScalar(s,I.y,s),r.multiplyByScalar(a,I.z,a),r.equals(o,r.ZERO)&&r.equals(s,r.ZERO)&&r.equals(a,r.ZERO)?(n=wt,n.x=0,n.y=0,n.z=0):(n=r.add(o,s,o),r.add(n,a,n),r.normalize(n,n)),r.pack(n,m.extrudeDirection.values,3*v)}if(f(c)&&De(e,t,i,I,c,m.applyOffset.values,v),f(a)&&It(e,t,i,I,a,m.tangent.values,v,!0),f(u)&&It(e,t,i,I,u,m.bitangent.values,v,!0),f(l)&&ae(e,t,i,I,l,m.st.values,v),h>0)for(let r=0;r3){let r=E.positions,f=E.indices,x=f.length;for(let S=0;S0)continue;let a=r.unpack(n,e,fe);(t.y<0&&a.y>0||t.y>0&&a.y<0)&&(e-3>0?(n[e]=i[e-3],n[e+1]=i[e-2],n[e+2]=i[e-1]):r.pack(t,n,e));let u=r.unpack(o,e,Bt);(t.y<0&&u.y>0||t.y>0&&u.y<0)&&(e+30||rt.intersectPlane(r,Et.ORIGIN_ZX_PLANE)!==Ut.INTERSECTING))return e;if(t.geometryType!==mt.NONE)switch(t.geometryType){case mt.POLYLINES:Ue(e);break;case mt.TRIANGLES:ie(e);break;case mt.LINES:se(e)}else Le(t),t.primitiveType===D.TRIANGLES?ie(e):t.primitiveType===D.LINES&&se(e);return e};var gn=F;export{gn as a}; \ No newline at end of file +/*! For license information please see chunk-NNNHC2WA.js.LICENSE.txt */ +import{a as et}from"./chunk-FZIR7YHL.js";import{a as jt}from"./chunk-FHUOX7Q3.js";import{b as Lt}from"./chunk-EQAHH27B.js";import{a as Et}from"./chunk-LWO5EUNN.js";import{a as j}from"./chunk-SPMRTIBU.js";import{a as mt,b as D,c as B,d as U}from"./chunk-3G4OCZJT.js";import{a as _t,b as Ut,d as rt}from"./chunk-LYPPBP4Q.js";import{a as dt,b as H}from"./chunk-S7TTFAYA.js";import{a as k}from"./chunk-TLYHKSDJ.js";import{a as r,b as Mt,c as R,e as Ot}from"./chunk-PYVDHCDQ.js";import{a as N}from"./chunk-JMWWNZHX.js";import{a as K}from"./chunk-Z3SYNMQT.js";import{a as I,b as pt}from"./chunk-4KGDZUZQ.js";import{e as f}from"./chunk-F3TINEFX.js";var Yt=new r,Zt=new r,Xt=new r;function pe(e,t,i,n,o){let s,a,u,l,p,c,m,y;if(pt.defined("point",e),pt.defined("p0",t),pt.defined("p1",i),pt.defined("p2",n),f(o)||(o=new r),f(t.z)){if(r.equalsEpsilon(e,t,N.EPSILON14))return r.clone(r.UNIT_X,o);if(r.equalsEpsilon(e,i,N.EPSILON14))return r.clone(r.UNIT_Y,o);if(r.equalsEpsilon(e,n,N.EPSILON14))return r.clone(r.UNIT_Z,o);s=r.subtract(i,t,Yt),a=r.subtract(n,t,Zt),u=r.subtract(e,t,Xt),l=r.dot(s,s),p=r.dot(s,a),c=r.dot(s,u),m=r.dot(a,a),y=r.dot(a,u)}else{if(R.equalsEpsilon(e,t,N.EPSILON14))return r.clone(r.UNIT_X,o);if(R.equalsEpsilon(e,i,N.EPSILON14))return r.clone(r.UNIT_Y,o);if(R.equalsEpsilon(e,n,N.EPSILON14))return r.clone(r.UNIT_Z,o);s=R.subtract(i,t,Yt),a=R.subtract(n,t,Zt),u=R.subtract(e,t,Xt),l=R.dot(s,s),p=R.dot(s,a),c=R.dot(s,u),m=R.dot(a,a),y=R.dot(a,u)}o.y=m*c-p*y,o.z=l*y-p*c;let h=l*m-p*p;if(0!==h)return o.y/=h,o.z/=h,o.x=1-o.y-o.z,o}var Ht=pe,Nt={calculateACMR:function(e){let t=(e=K(e,K.EMPTY_OBJECT)).indices,r=e.maximumIndex,i=K(e.cacheSize,24);if(!f(t))throw new I("indices is required.");let n=t.length;if(n<3||n%3!=0)throw new I("indices length must be a multiple of three.");if(r<=0)throw new I("maximumIndex must be greater than zero.");if(i<3)throw new I("cacheSize must be greater than two.");if(!f(r)){r=0;let e=0,i=t[e];for(;er&&(r=i),++e,i=t[e]}let o=[];for(let e=0;ei&&(o[t[e]]=s,++s);return(s-i+1)/(n/3)},tipsify:function(e){let t,r=(e=K(e,K.EMPTY_OBJECT)).indices,i=e.maximumIndex,n=K(e.cacheSize,24);function o(e,r,i,n,o,s,a){let u,l=-1,f=-1,p=0;for(;pf||-1===f)&&(f=u,l=e)),++p}return-1===l?function(e,r,i,n){for(;r.length>=1;){let t=r[r.length-1];if(r.splice(r.length-1,1),e[t].numLiveTriangles>0)return t}for(;t0)return++t,t-1;++t}return-1}(n,s,0,a):l}if(!f(r))throw new I("indices is required.");let s=r.length;if(s<3||s%3!=0)throw new I("indices length must be a multiple of three.");if(i<=0)throw new I("maximumIndex must be greater than zero.");if(n<3)throw new I("cacheSize must be greater than two.");let a=0,u=0,l=r[u],p=s;if(f(i))a=i+1;else{for(;ua&&(a=l),++u,l=r[u];if(-1===a)return 0;++a}let c,m=[];for(c=0;cn&&(v.timeStamp=d,++d),++u}h=o(0,n,T,m,d,A,a)}return S}},Wt=Nt,F={};function St(e,t,r,i,n){e[t++]=r,e[t++]=i,e[t++]=i,e[t++]=n,e[t++]=n,e[t]=r}function de(e){let t=e.length,r=t/3*6,i=j.createTypedArray(t,r),n=0;for(let r=0;r=3){let r=6*(t-2),i=j.createTypedArray(t,r);St(i,0,e[0],e[1],e[2]);let n=6;for(let r=3;r0){let t=e.length-1,r=6*(t-1),i=j.createTypedArray(t,r),n=e[0],o=0;for(let r=1;rn&&(n=r[e]);e.indices=Wt.tipsify({indices:r,maximumIndex:n,cacheSize:t})}return e},F.fitToUnsignedShortIndices=function(e){if(!f(e))throw new I("geometry is required.");if(f(e.indices)&&e.primitiveType!==D.TRIANGLES&&e.primitiveType!==D.LINES&&e.primitiveType!==D.POINTS)throw new I("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");let t=[],r=B.computeNumberOfVertices(e);if(f(e.indices)&&r>=N.SIXTY_FOUR_KILOBYTES){let r,i=[],n=[],o=0,s=$t(e.attributes),a=e.indices,u=a.length;e.primitiveType===D.TRIANGLES?r=3:e.primitiveType===D.LINES?r=2:e.primitiveType===D.POINTS&&(r=1);for(let l=0;l=N.SIXTY_FOUR_KILOBYTES&&(t.push(new B({attributes:s,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],n=[],o=0,s=$t(e.attributes))}0!==n.length&&t.push(new B({attributes:s,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var Jt=new r,we=new Mt;F.projectTo2D=function(e,t,i,n,o){if(!f(e))throw new I("geometry is required.");if(!f(t))throw new I("attributeName is required.");if(!f(i))throw new I("attributeName3D is required.");if(!f(n))throw new I("attributeName2D is required.");if(!f(e.attributes[t]))throw new I(`geometry must have attribute matching the attributeName argument: ${t}.`);if(e.attributes[t].componentDatatype!==k.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let s=e.attributes[t],a=(o=f(o)?o:new _t).ellipsoid,u=s.values,l=new Float64Array(u.length),p=0;for(let e=0;ew&&(w=i)}return new B({attributes:d,indices:h,primitiveType:p,boundingSphere:f(b)?new rt(b,w):void 0})}F.combineInstances=function(e){if(!f(e)||e.length<1)throw new I("instances is required and must have length greater than zero.");let t=[],r=[],i=e.length;for(let n=0;n0&&n.push(Vt(t,"geometry")),r.length>0&&(n.push(Vt(r,"westHemisphereGeometry")),n.push(Vt(r,"eastHemisphereGeometry"))),n};var Z=new r,ht=new r,ct=new r,at=new r;F.computeNormal=function(e){if(!f(e))throw new I("geometry is required.");if(!f(e.attributes.position)||!f(e.attributes.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(e.indices))throw new I("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let t,i=e.indices,n=e.attributes,o=n.position.values,s=n.position.values.length/3,a=i.length,u=new Array(s),l=new Array(a/3),p=new Array(a);for(t=0;t0){for(c=0;c3&&(r[3]=0,r[4]=2,r[5]=3);let i=6;for(let e=3;eo?n>s?N.sign(e.y):N.sign(r.y):o>s?N.sign(t.y):N.sign(r.y);let a=i<0;tt(e,a),tt(t,a),tt(r,a)}F.compressVertices=function(e){if(!f(e))throw new I("geometry is required.");let t,i,n=e.attributes.extrudeDirection;if(f(n)){let o=n.values;i=o.length/3;let s=new Float32Array(2*i),a=0;for(t=0;t=0||t.x>=0||r.x>=0)return;Ee(e,t,r);let i=e.y<0,n=t.y<0,o=r.y<0,s=0;s+=i?1:0,s+=n?1:0,s+=o?1:0;let a=Rt.indices;1===s?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(X(e,t,nt,st),X(e,r,it,ot),a[0]=0,a[3]=1,a[4]=2,a[6]=1):n?(X(t,r,nt,st),X(t,e,it,ot),a[0]=1,a[3]=2,a[4]=0,a[6]=2):o&&(X(r,e,nt,st),X(r,t,it,ot),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):2===s&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?n?o||(X(r,e,nt,st),X(r,t,it,ot),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(X(t,r,nt,st),X(t,e,it,ot),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(X(e,t,nt,st),X(e,r,it,ot),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let u=Rt.positions;return u[0]=e,u[1]=t,u[2]=r,u.length=3,(1===s||2===s)&&(u[3]=nt,u[4]=it,u[5]=st,u[6]=ot,u.length=7),Rt}function ne(e,t){let r=e.attributes;if(0===r.position.values.length)return;for(let e in r)if(r.hasOwnProperty(e)&&f(r[e])&&f(r[e].values)){let t=r[e];t.values=k.createTypedArray(t.componentDatatype,t.values)}let i=B.computeNumberOfVertices(e);return e.indices=j.createTypedArray(i,e.indices),t&&(e.boundingSphere=rt.fromVertices(r.position.values)),e}function lt(e){let t=e.attributes,r={};for(let e in t)if(t.hasOwnProperty(e)&&f(t[e])&&f(t[e].values)){let i=t[e];r[e]=new U({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return new B({attributes:r,indices:[],primitiveType:e.primitiveType})}function kt(e,t,r){let i=f(e.geometry.boundingSphere);t=ne(t,i),r=ne(r,i),f(r)&&!f(t)?e.geometry=r:!f(r)&&f(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=r,e.geometry=void 0)}function Ft(e,t){let r=new e,i=new e,n=new e;return function(o,s,a,u,l,f,p,c){let m=e.fromArray(l,o*t,r),y=e.fromArray(l,s*t,i),h=e.fromArray(l,a*t,n);e.multiplyByScalar(m,u.x,m),e.multiplyByScalar(y,u.y,y),e.multiplyByScalar(h,u.z,h);let d=e.add(m,y,m);e.add(d,h,d),c&&e.normalize(d,d),e.pack(d,f,p*t)}}var ze=Ft(dt,4),It=Ft(r,3),ae=Ft(R,2),De=function(e,t,r,i,n,o,s){let a=n[e]*i.x,u=n[t]*i.y,l=n[r]*i.z;o[s]=a+u+l>N.EPSILON6?1:0},wt=new r,Gt=new r,Ct=new r,qe=new r;function Tt(e,t,i,n,o,s,a,u,l,p,c,m,y,h,d,v){if(!(f(s)||f(a)||f(u)||f(l)||f(p)||0!==h))return;let b=r.fromArray(o,3*e,wt),w=r.fromArray(o,3*t,Gt),g=r.fromArray(o,3*i,Ct),I=Ht(n,b,w,g,qe);if(f(I)){if(f(s)&&It(e,t,i,I,s,m.normal.values,v,!0),f(p)){let n,o=r.fromArray(p,3*e,wt),s=r.fromArray(p,3*t,Gt),a=r.fromArray(p,3*i,Ct);r.multiplyByScalar(o,I.x,o),r.multiplyByScalar(s,I.y,s),r.multiplyByScalar(a,I.z,a),r.equals(o,r.ZERO)&&r.equals(s,r.ZERO)&&r.equals(a,r.ZERO)?(n=wt,n.x=0,n.y=0,n.z=0):(n=r.add(o,s,o),r.add(n,a,n),r.normalize(n,n)),r.pack(n,m.extrudeDirection.values,3*v)}if(f(c)&&De(e,t,i,I,c,m.applyOffset.values,v),f(a)&&It(e,t,i,I,a,m.tangent.values,v,!0),f(u)&&It(e,t,i,I,u,m.bitangent.values,v,!0),f(l)&&ae(e,t,i,I,l,m.st.values,v),h>0)for(let r=0;r3){let r=E.positions,f=E.indices,S=f.length;for(let x=0;x0)continue;let a=r.unpack(n,e,fe);(t.y<0&&a.y>0||t.y>0&&a.y<0)&&(e-3>0?(n[e]=i[e-3],n[e+1]=i[e-2],n[e+2]=i[e-1]):r.pack(t,n,e));let u=r.unpack(o,e,Bt);(t.y<0&&u.y>0||t.y>0&&u.y<0)&&(e+30||rt.intersectPlane(r,Et.ORIGIN_ZX_PLANE)!==Ut.INTERSECTING))return e;if(t.geometryType!==mt.NONE)switch(t.geometryType){case mt.POLYLINES:Ue(e);break;case mt.TRIANGLES:ie(e);break;case mt.LINES:se(e)}else Le(t),t.primitiveType===D.TRIANGLES?ie(e):t.primitiveType===D.LINES&&se(e);return e};var gn=F;export{gn as a}; \ No newline at end of file diff --git a/Workers/chunk-NNNHC2WA.js.LICENSE.txt b/Workers/chunk-NNNHC2WA.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-NNNHC2WA.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-NXLA2DOI.js.LICENSE.txt b/Workers/chunk-NXLA2DOI.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-NXLA2DOI.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-PCFGFNNQ.js b/Workers/chunk-PCFGFNNQ.js new file mode 100644 index 0000000..ad4e683 --- /dev/null +++ b/Workers/chunk-PCFGFNNQ.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-PCFGFNNQ.js.LICENSE.txt */ +import{a as _}from"./chunk-Z3SYNMQT.js";import{a as B,b as S}from"./chunk-4KGDZUZQ.js";import{e as i}from"./chunk-F3TINEFX.js";var c,r={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},l={};Object.defineProperties(l,{element:{get:function(){if(l.supportsFullscreen())return document[r.fullscreenElement]}},changeEventName:{get:function(){if(l.supportsFullscreen())return r.fullscreenchange}},errorEventName:{get:function(){if(l.supportsFullscreen())return r.fullscreenerror}},enabled:{get:function(){if(l.supportsFullscreen())return document[r.fullscreenEnabled]}},fullscreen:{get:function(){if(l.supportsFullscreen())return null!==l.element}}}),l.supportsFullscreen=function(){if(i(c))return c;c=!1;let e=document.body;if("function"==typeof e.requestFullscreen)return r.requestFullscreen="requestFullscreen",r.exitFullscreen="exitFullscreen",r.fullscreenEnabled="fullscreenEnabled",r.fullscreenElement="fullscreenElement",r.fullscreenchange="fullscreenchange",r.fullscreenerror="fullscreenerror",c=!0;let n,t=["webkit","moz","o","ms","khtml"];for(let u=0,l=t.length;u{let r=new Image;r.onload=function(){u._result=r.width>0&&r.height>0,e(u._result)},r.onerror=function(){u._result=!1,e(u._result)},r.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"}))),u._promise},Object.defineProperties(u,{initialized:{get:function(){return i(u._result)}}});var d=[];typeof ArrayBuffer<"u"&&(d.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&d.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&d.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&d.push(BigInt64Array),typeof BigUint64Array<"u"&&d.push(BigUint64Array));var f={isChrome:w,chromeVersion:T,isSafari:$,safariVersion:Q,isWebkit:q,webkitVersion:j,isInternetExplorer:O,internetExplorerVersion:J,isEdge:x,edgeVersion:Y,isFirefox:h,firefoxVersion:X,isWindows:G,isIPadOrIOS:K,hardwareConcurrency:_(s.hardwareConcurrency,3),supportsPointerEvents:H,supportsImageRenderingPixelated:z,supportsWebP:u,imageRenderingValue:L,typedArrayTypes:d,supportsBasis:function(e){return f.supportsWebAssembly()&&e.context.supportsBasis},supportsFullscreen:function(){return C.supportsFullscreen()},supportsTypedArrays:function(){return typeof ArrayBuffer<"u"},supportsBigInt64Array:function(){return typeof BigInt64Array<"u"},supportsBigUint64Array:function(){return typeof BigUint64Array<"u"},supportsBigInt:function(){return typeof BigInt<"u"},supportsWebWorkers:function(){return typeof Worker<"u"},supportsWebAssembly:function(){return typeof WebAssembly<"u"},supportsWebgl2:function(e){return S.defined("scene",e),e.context.webgl2},supportsEsmWebWorkers:function(){return!h()||parseInt(v)>=114}},se=f;export{se as a}; \ No newline at end of file diff --git a/Workers/chunk-PCFGFNNQ.js.LICENSE.txt b/Workers/chunk-PCFGFNNQ.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-PCFGFNNQ.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-PQVQONHO.js.LICENSE.txt b/Workers/chunk-PQVQONHO.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-PQVQONHO.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-PYQRNF73.js b/Workers/chunk-PYQRNF73.js deleted file mode 100644 index 5c0fc2b..0000000 --- a/Workers/chunk-PYQRNF73.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see chunk-PYQRNF73.js.LICENSE.txt */ -import{a as K}from"./chunk-QCBYIBZJ.js";import{a as L}from"./chunk-W5ZMPE2M.js";import{b as v,c as J,d as Z}from"./chunk-YIFABOF6.js";import{b as B,c as k,d as I}from"./chunk-KDW4RGIR.js";import{a as t,b as T,c as F,d}from"./chunk-V624RX7A.js";import{a as g}from"./chunk-VZ2RFJ3P.js";import{a as W}from"./chunk-RKPKWH3Z.js";import{a as b,b as z}from"./chunk-BIYNNQRQ.js";import{e as p}from"./chunk-ZLUSVROX.js";function m(e,n){this.center=t.clone(W(e,t.ZERO)),this.halfAxes=d.clone(W(n,d.ZERO))}m.packedLength=t.packedLength+d.packedLength,m.pack=function(e,n,a){return z.typeOf.object("value",e),z.defined("array",n),a=W(a,0),t.pack(e.center,n,a),d.pack(e.halfAxes,n,a+t.packedLength),n},m.unpack=function(e,n,a){return z.defined("array",e),n=W(n,0),p(a)||(a=new m),t.unpack(e,n,a.center),d.unpack(e,n+t.packedLength,a.halfAxes),a};var Ct=new t,ut=new t,Pt=new t,xt=new t,yt=new t,At=new t,Nt=new d,Mt={unitary:new d,diagonal:new d};m.fromPoints=function(e,n){if(p(n)||(n=new m),!p(e)||0===e.length)return n.halfAxes=d.ZERO,n.center=t.ZERO,n;let a,r=e.length,o=t.clone(e[0],Ct);for(a=1;ag.TWO_PI)throw new b("Rectangle width must be between 0 and 2 * pi");if(e.height<0||e.height>g.PI)throw new b("Rectangle height must be between 0 and pi");if(p(r)&&!g.equalsEpsilon(r.radii.x,r.radii.y,g.EPSILON15))throw new b("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");let i,s,c,d,u,l,m;if(n=W(n,0),a=W(a,0),r=W(r,F.WGS84),e.width<=g.PI){let t=k.center(e,$),h=r.cartographicToCartesian(t,bt),p=new K(h,r);m=p.plane;let f=t.longitude,w=e.south<0&&e.north>0?0:t.latitude,b=T.fromRadians(f,e.north,a,St),x=T.fromRadians(e.west,e.north,a,Tt),y=T.fromRadians(e.west,w,a,gt),g=T.fromRadians(e.west,e.south,a,Et),M=T.fromRadians(f,e.south,a,Rt),O=r.cartographicToCartesian(b,Wt),N=r.cartographicToCartesian(x,H),A=r.cartographicToCartesian(y,zt),I=r.cartographicToCartesian(g,tt),C=r.cartographicToCartesian(M,It),R=p.projectPointToNearestOnPlane(O,Lt),P=p.projectPointToNearestOnPlane(N,Ut),z=p.projectPointToNearestOnPlane(A,qt),E=p.projectPointToNearestOnPlane(I,jt),S=p.projectPointToNearestOnPlane(C,Bt);return i=Math.min(P.x,z.x,E.x),s=-i,d=Math.max(P.y,R.y),c=Math.min(E.y,S.y),x.height=g.height=n,N=r.cartographicToCartesian(x,H),I=r.cartographicToCartesian(g,tt),u=Math.min(L.getPointDistance(m,N),L.getPointDistance(m,I)),l=a,Q(p.origin,p.xAxis,p.yAxis,p.zAxis,i,s,c,d,u,l,o)}let h=e.south>0,f=e.north<0,w=h?e.south:f?e.north:0,x=k.center(e,$).longitude,y=t.fromRadians(x,w,a,r,vt);y.z=0;let M=Math.abs(y.x)=u?v.INSIDE:v.INTERSECTING};var at=new t,ct=new t,rt=new t,Ft=new t,et=new t,Jt=new t;m.distanceSquaredTo=function(e,n){if(!p(e))throw new b("box is required.");if(!p(n))throw new b("cartesian is required.");let a=t.subtract(n,e.center,nt),r=e.halfAxes,o=d.getColumn(r,0,at),i=d.getColumn(r,1,ct),s=d.getColumn(r,2,rt),c=t.magnitude(o),u=t.magnitude(i),l=t.magnitude(s),m=!0,h=!0,f=!0;c>0?t.divideByScalar(o,c,o):m=!1,u>0?t.divideByScalar(i,u,i):h=!1,l>0?t.divideByScalar(s,l,s):f=!1;let w,x,y,T=!m+!h+!f;if(1===T){let e=o;w=i,x=s,h?f||(e=s,x=o):(e=i,w=o),y=t.cross(w,x,et),e===o?o=y:e===i?i=y:e===s&&(s=y)}else if(2===T){w=o,h?w=i:f&&(w=s);let e=t.UNIT_Y;e.equalsEpsilon(w,g.EPSILON3)&&(e=t.UNIT_X),x=t.cross(w,e,Ft),t.normalize(x,x),y=t.cross(w,x,et),t.normalize(y,y),w===o?(i=x,s=y):w===i?(s=x,o=y):w===s&&(o=x,i=y)}else 3===T&&(o=t.UNIT_X,i=t.UNIT_Y,s=t.UNIT_Z);let M=Jt;M.x=t.dot(a,o),M.y=t.dot(a,i),M.z=t.dot(a,s);let O,N=0;return M.x<-c?(O=M.x+c,N+=O*O):M.x>c&&(O=M.x-c,N+=O*O),M.y<-u?(O=M.y+u,N+=O*O):M.y>u&&(O=M.y-u,N+=O*O),M.z<-l?(O=M.z+l,N+=O*O):M.z>l&&(O=M.z-l,N+=O*O),N};var Kt=new t,Qt=new t;m.computePlaneDistances=function(e,n,a,r){if(!p(e))throw new b("box is required.");if(!p(n))throw new b("position is required.");if(!p(a))throw new b("direction is required.");p(r)||(r=new J);let o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,s=e.center,c=e.halfAxes,u=d.getColumn(c,0,at),l=d.getColumn(c,1,ct),m=d.getColumn(c,2,rt),h=t.add(u,l,Kt);t.add(h,m,h),t.add(h,s,h);let f=t.subtract(h,n,Qt),w=t.dot(a,f);return o=Math.min(w,o),i=Math.max(w,i),t.add(s,u,h),t.add(h,l,h),t.subtract(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.add(s,u,h),t.subtract(h,l,h),t.add(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.add(s,u,h),t.subtract(h,l,h),t.subtract(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.subtract(s,u,h),t.add(h,l,h),t.add(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.subtract(s,u,h),t.add(h,l,h),t.subtract(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.subtract(s,u,h),t.subtract(h,l,h),t.add(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),t.subtract(s,u,h),t.subtract(h,l,h),t.subtract(h,m,h),t.subtract(h,n,f),w=t.dot(a,f),o=Math.min(w,o),i=Math.max(w,i),r.start=o,r.stop=i,r};var $t=new t,Ht=new t,te=new t;m.computeCorners=function(e,n){z.typeOf.object("box",e),p(n)||(n=[new t,new t,new t,new t,new t,new t,new t,new t]);let a=e.center,r=e.halfAxes,o=d.getColumn(r,0,$t),i=d.getColumn(r,1,Ht),s=d.getColumn(r,2,te);return t.clone(a,n[0]),t.subtract(n[0],o,n[0]),t.subtract(n[0],i,n[0]),t.subtract(n[0],s,n[0]),t.clone(a,n[1]),t.subtract(n[1],o,n[1]),t.subtract(n[1],i,n[1]),t.add(n[1],s,n[1]),t.clone(a,n[2]),t.subtract(n[2],o,n[2]),t.add(n[2],i,n[2]),t.subtract(n[2],s,n[2]),t.clone(a,n[3]),t.subtract(n[3],o,n[3]),t.add(n[3],i,n[3]),t.add(n[3],s,n[3]),t.clone(a,n[4]),t.add(n[4],o,n[4]),t.subtract(n[4],i,n[4]),t.subtract(n[4],s,n[4]),t.clone(a,n[5]),t.add(n[5],o,n[5]),t.subtract(n[5],i,n[5]),t.add(n[5],s,n[5]),t.clone(a,n[6]),t.add(n[6],o,n[6]),t.add(n[6],i,n[6]),t.subtract(n[6],s,n[6]),t.clone(a,n[7]),t.add(n[7],o,n[7]),t.add(n[7],i,n[7]),t.add(n[7],s,n[7]),n};var ee=new d;m.computeTransformation=function(t,e){z.typeOf.object("box",t),p(e)||(e=new B);let n=t.center,a=d.multiplyByUniformScale(t.halfAxes,2,ee);return B.fromRotationTranslation(a,n,e)};var ne=new Z;m.isOccluded=function(t,e){if(!p(t))throw new b("box is required.");if(!p(e))throw new b("occluder is required.");let n=Z.fromOrientedBoundingBox(t,ne);return!e.isBoundingSphereVisible(n)},m.prototype.intersectPlane=function(t){return m.intersectPlane(this,t)},m.prototype.distanceSquaredTo=function(t){return m.distanceSquaredTo(this,t)},m.prototype.computePlaneDistances=function(t,e,n){return m.computePlaneDistances(this,t,e,n)},m.prototype.computeCorners=function(t){return m.computeCorners(this,t)},m.prototype.computeTransformation=function(t){return m.computeTransformation(this,t)},m.prototype.isOccluded=function(t){return m.isOccluded(this,t)},m.equals=function(e,n){return e===n||p(e)&&p(n)&&t.equals(e.center,n.center)&&d.equals(e.halfAxes,n.halfAxes)},m.prototype.clone=function(t){return m.clone(this,t)},m.prototype.equals=function(t){return m.equals(this,t)};var ye=m;export{ye as a}; \ No newline at end of file diff --git a/Workers/chunk-PYQRNF73.js.LICENSE.txt b/Workers/chunk-PYQRNF73.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-PYQRNF73.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-PYVDHCDQ.js b/Workers/chunk-PYVDHCDQ.js new file mode 100644 index 0000000..b5f4378 --- /dev/null +++ b/Workers/chunk-PYVDHCDQ.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-PYVDHCDQ.js.LICENSE.txt */ +import{a as w}from"./chunk-JMWWNZHX.js";import{a as u}from"./chunk-Z3SYNMQT.js";import{a as M,b as c}from"./chunk-4KGDZUZQ.js";import{e as a}from"./chunk-F3TINEFX.js";function f(e,t,n){this.x=u(e,0),this.y=u(t,0),this.z=u(n,0)}f.fromSpherical=function(e,t){c.typeOf.object("spherical",e),a(t)||(t=new f);let n=e.clock,r=e.cone,i=u(e.magnitude,1),o=i*Math.sin(r);return t.x=o*Math.cos(n),t.y=o*Math.sin(n),t.z=i*Math.cos(r),t},f.fromElements=function(e,t,n,r){return a(r)?(r.x=e,r.y=t,r.z=n,r):new f(e,t,n)},f.clone=function(e,t){if(a(e))return a(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new f(e.x,e.y,e.z)},f.fromCartesian4=f.clone,f.packedLength=3,f.pack=function(e,t,n){return c.typeOf.object("value",e),c.defined("array",t),n=u(n,0),t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t},f.unpack=function(e,t,n){return c.defined("array",e),t=u(t,0),a(n)||(n=new f),n.x=e[t++],n.y=e[t++],n.z=e[t],n},f.packArray=function(e,t){c.defined("array",e);let n=e.length,r=3*n;if(a(t)){if(!Array.isArray(t)&&t.length!==r)throw new M("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(let r=0;rw.EPSILON12);return a(i)?(i.x=c*R,i.y=o*v,i.z=u*_,i):new O(c*R,o*v,u*_)}var X=rn;function R(e,t,n){this.longitude=u(e,0),this.latitude=u(t,0),this.height=u(n,0)}R.fromRadians=function(e,t,n,r){return c.typeOf.number("longitude",e),c.typeOf.number("latitude",t),n=u(n,0),a(r)?(r.longitude=e,r.latitude=t,r.height=n,r):new R(e,t,n)},R.fromDegrees=function(e,t,n,r){return c.typeOf.number("longitude",e),c.typeOf.number("latitude",t),e=w.toRadians(e),t=w.toRadians(t),R.fromRadians(e,t,n,r)};var zn=new O,Sn=new O,Mn=new O,qn=new O(1/6378137,1/6378137,1/6356752.314245179),Rn=new O(1/40680631590769,1/40680631590769,1/40408299984661.445),gn=w.EPSILON1;R.fromCartesian=function(e,t,n){let r=a(t)?t.oneOverRadii:qn,i=a(t)?t.oneOverRadiiSquared:Rn,c=a(t)?t._centerToleranceSquared:gn,o=X(e,r,i,c,Sn);if(!a(o))return;let u=O.multiplyComponents(o,i,zn);u=O.normalize(u,u);let f=O.subtract(e,o,Mn),y=Math.atan2(u.y,u.x),l=Math.asin(u.z),s=w.sign(O.dot(f,e))*O.magnitude(f);return a(n)?(n.longitude=y,n.latitude=l,n.height=s,n):new R(y,l,s)},R.toCartesian=function(e,t,n){return c.defined("cartographic",e),O.fromRadians(e.longitude,e.latitude,e.height,t,n)},R.clone=function(e,t){if(a(e))return a(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new R(e.longitude,e.latitude,e.height)},R.equals=function(e,t){return e===t||a(e)&&a(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},R.equalsEpsilon=function(e,t,n){return n=u(n,0),e===t||a(e)&&a(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n},R.ZERO=Object.freeze(new R(0,0,0)),R.prototype.clone=function(e){return R.clone(this,e)},R.prototype.equals=function(e){return R.equals(this,e)},R.prototype.equalsEpsilon=function(e,t){return R.equalsEpsilon(this,e,t)},R.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var cn=R;function d(e,t){this.x=u(e,0),this.y=u(t,0)}d.fromElements=function(e,t,n){return a(n)?(n.x=e,n.y=t,n):new d(e,t)},d.clone=function(e,t){if(a(e))return a(t)?(t.x=e.x,t.y=e.y,t):new d(e.x,e.y)},d.fromCartesian3=d.clone,d.fromCartesian4=d.clone,d.packedLength=2,d.pack=function(e,t,n){return c.typeOf.object("value",e),c.defined("array",t),n=u(n,0),t[n++]=e.x,t[n]=e.y,t},d.unpack=function(e,t,n){return c.defined("array",e),t=u(t,0),a(n)||(n=new d),n.x=e[t++],n.y=e[t],n},d.packArray=function(e,t){c.defined("array",e);let n=e.length,r=2*n;if(a(t)){if(!Array.isArray(t)&&t.length!==r)throw new M("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(let r=0;r=this._radii.z-t))return n};var An=new O;r.prototype.getLocalCurvature=function(e,t){c.typeOf.object("surfacePosition",e),a(t)||(t=new G);let n=this.getSurfaceNormalIntersectionWithZAxis(e,0,An),r=O.distance(e,n),i=r*(this.minimumRadius*r/this.maximumRadius**2)**2;return G.fromElements(1/r,1/i,t)};var kn=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],Ln=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function an(e,t,n){c.typeOf.number("a",e),c.typeOf.number("b",t),c.typeOf.func("func",n);let r=.5*(t+e),a=.5*(t-e),i=0;for(let e=0;e<5;e++){let t=a*kn[e];i+=Ln[e]*(n(r+t)+n(r-t))}return i*=a,i}r.prototype.surfaceArea=function(e){c.typeOf.object("rectangle",e);let t=e.west,n=e.east,r=e.south,a=e.north;for(;nr&&(a=t,r=n)}let i=1,c=0,o=K[a],u=Q[a];if(Math.abs(e[y.getElementIndex(u,o)])>n){let t,n=(e[y.getElementIndex(u,u)]-e[y.getElementIndex(o,o)])/2/e[y.getElementIndex(u,o)];t=n<0?-1/(-n+Math.sqrt(1+n*n)):1/(n+Math.sqrt(1+n*n)),i=1/Math.sqrt(1+t*t),c=t*i}return(t=y.clone(y.IDENTITY,t))[y.getElementIndex(o,o)]=t[y.getElementIndex(u,u)]=i,t[y.getElementIndex(u,o)]=c,t[y.getElementIndex(o,u)]=-c,t}var $=new y,On=new y;y.computeEigenDecomposition=function(e,t){c.typeOf.object("matrix",e);let n=w.EPSILON20,r=0,i=0;a(t)||(t={});let o=t.unitary=y.clone(y.IDENTITY,t.unitary),u=t.diagonal=y.clone(e,t.diagonal),f=n*Dn(u);for(;i<10&&Pn(u)>f;)Xn(u,$),y.transpose($,On),y.multiply(u,$,u),y.multiply(On,u,u),y.multiply(o,$,o),++r>2&&(++i,r=0);return t},y.abs=function(e,t){return c.typeOf.object("matrix",e),c.typeOf.object("result",t),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},y.determinant=function(e){c.typeOf.object("matrix",e);let t=e[0],n=e[3],r=e[6],a=e[1],i=e[4],o=e[7],u=e[2],f=e[5],y=e[8];return t*(i*y-f*o)+a*(f*r-n*y)+u*(n*o-i*r)},y.inverse=function(e,t){c.typeOf.object("matrix",e),c.typeOf.object("result",t);let n=e[0],r=e[1],a=e[2],i=e[3],o=e[4],u=e[5],f=e[6],l=e[7],s=e[8],d=y.determinant(e);if(Math.abs(d)<=w.EPSILON15)throw new M("matrix is not invertible");t[0]=o*s-l*u,t[1]=l*a-r*s,t[2]=r*u-o*a,t[3]=f*u-i*s,t[4]=n*s-f*a,t[5]=i*a-n*u,t[6]=i*l-f*o,t[7]=f*r-n*l,t[8]=n*o-i*r;let p=1/d;return y.multiplyByScalar(t,p,t)};var Yn=new y;y.inverseTranspose=function(e,t){return c.typeOf.object("matrix",e),c.typeOf.object("result",t),y.inverse(y.transpose(e,Yn),t)},y.equals=function(e,t){return e===t||a(e)&&a(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]},y.equalsEpsilon=function(e,t,n){return n=u(n,0),e===t||a(e)&&a(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},y.IDENTITY=Object.freeze(new y(1,0,0,0,1,0,0,0,1)),y.ZERO=Object.freeze(new y(0,0,0,0,0,0,0,0,0)),y.COLUMN0ROW0=0,y.COLUMN0ROW1=1,y.COLUMN0ROW2=2,y.COLUMN1ROW0=3,y.COLUMN1ROW1=4,y.COLUMN1ROW2=5,y.COLUMN2ROW0=6,y.COLUMN2ROW1=7,y.COLUMN2ROW2=8,Object.defineProperties(y.prototype,{length:{get:function(){return y.packedLength}}}),y.prototype.clone=function(e){return y.clone(this,e)},y.prototype.equals=function(e){return y.equals(this,e)},y.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]},y.prototype.equalsEpsilon=function(e,t){return y.equalsEpsilon(this,e,t)},y.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`};var so=y;export{O as a,cn as b,G as c,qo as d,so as e}; \ No newline at end of file diff --git a/Workers/chunk-PYVDHCDQ.js.LICENSE.txt b/Workers/chunk-PYVDHCDQ.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-PYVDHCDQ.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-EXJ3OQJJ.js b/Workers/chunk-Q3ITDG7Y.js similarity index 75% rename from Workers/chunk-EXJ3OQJJ.js rename to Workers/chunk-Q3ITDG7Y.js index 71edec8..cd1b5ed 100644 --- a/Workers/chunk-EXJ3OQJJ.js +++ b/Workers/chunk-Q3ITDG7Y.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-EXJ3OQJJ.js.LICENSE.txt */ -import{a as c,b as p,c as f}from"./chunk-V624RX7A.js";import{a as d}from"./chunk-VZ2RFJ3P.js";import{a as u}from"./chunk-RKPKWH3Z.js";import{a as s}from"./chunk-BIYNNQRQ.js";import{e as a}from"./chunk-ZLUSVROX.js";function e(e){this._ellipsoid=u(e,f.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(e.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),e.mercatorAngleToGeodeticLatitude=function(e){return d.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},e.geodeticLatitudeToMercatorAngle=function(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let i=Math.sin(t);return.5*Math.log((1+i)/(1-i))},e.MaximumLatitude=e.mercatorAngleToGeodeticLatitude(Math.PI),e.prototype.project=function(t,i){let o=this._semimajorAxis,r=t.longitude*o,u=e.geodeticLatitudeToMercatorAngle(t.latitude)*o,s=t.height;return a(i)?(i.x=r,i.y=u,i.z=s,i):new c(r,u,s)},e.prototype.unproject=function(t,i){if(!a(t))throw new s("cartesian is required");let o=this._oneOverSemimajorAxis,r=t.x*o,u=e.mercatorAngleToGeodeticLatitude(t.y*o),n=t.z;return a(i)?(i.longitude=r,i.latitude=u,i.height=n,i):new p(r,u,n)};var L=e;export{L as a}; \ No newline at end of file +/*! For license information please see chunk-Q3ITDG7Y.js.LICENSE.txt */ +import{a as c,b as p,d as f}from"./chunk-PYVDHCDQ.js";import{a as d}from"./chunk-JMWWNZHX.js";import{a as u}from"./chunk-Z3SYNMQT.js";import{a as s}from"./chunk-4KGDZUZQ.js";import{e as a}from"./chunk-F3TINEFX.js";function e(e){this._ellipsoid=u(e,f.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(e.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),e.mercatorAngleToGeodeticLatitude=function(e){return d.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},e.geodeticLatitudeToMercatorAngle=function(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let i=Math.sin(t);return.5*Math.log((1+i)/(1-i))},e.MaximumLatitude=e.mercatorAngleToGeodeticLatitude(Math.PI),e.prototype.project=function(t,i){let o=this._semimajorAxis,r=t.longitude*o,u=e.geodeticLatitudeToMercatorAngle(t.latitude)*o,s=t.height;return a(i)?(i.x=r,i.y=u,i.z=s,i):new c(r,u,s)},e.prototype.unproject=function(t,i){if(!a(t))throw new s("cartesian is required");let o=this._oneOverSemimajorAxis,r=t.x*o,u=e.mercatorAngleToGeodeticLatitude(t.y*o),n=t.z;return a(i)?(i.longitude=r,i.latitude=u,i.height=n,i):new p(r,u,n)};var L=e;export{L as a}; \ No newline at end of file diff --git a/Workers/chunk-Q3ITDG7Y.js.LICENSE.txt b/Workers/chunk-Q3ITDG7Y.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-Q3ITDG7Y.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-QCBYIBZJ.js.LICENSE.txt b/Workers/chunk-QCBYIBZJ.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-QCBYIBZJ.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-QWROH3R2.js b/Workers/chunk-QWROH3R2.js new file mode 100644 index 0000000..c515deb --- /dev/null +++ b/Workers/chunk-QWROH3R2.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-QWROH3R2.js.LICENSE.txt */ +import{a as Q}from"./chunk-L2YBWJCT.js";import{a as z}from"./chunk-4VIV3K4J.js";import{a as _}from"./chunk-GWMEMIDW.js";import{a as K}from"./chunk-SPMRTIBU.js";import{a as H}from"./chunk-U6MIZ4IC.js";import{b as J,c as W,d as P}from"./chunk-3G4OCZJT.js";import{d as j}from"./chunk-LYPPBP4Q.js";import{a as L}from"./chunk-TLYHKSDJ.js";import{a as b,c as k}from"./chunk-PYVDHCDQ.js";import{a as Z}from"./chunk-JMWWNZHX.js";import{a as x}from"./chunk-Z3SYNMQT.js";import{a as F}from"./chunk-4KGDZUZQ.js";import{e as g}from"./chunk-F3TINEFX.js";var M=new k,ot=new b,nt=new b,it=new b,st=new b;function O(t){let e=(t=x(t,x.EMPTY_OBJECT)).length,o=t.topRadius,n=t.bottomRadius,r=x(t.vertexFormat,_.DEFAULT),a=x(t.slices,128);if(!g(e))throw new F("options.length must be defined.");if(!g(o))throw new F("options.topRadius must be defined.");if(!g(n))throw new F("options.bottomRadius must be defined.");if(a<3)throw new F("options.slices must be greater than or equal to 3.");if(g(t.offsetAttribute)&&t.offsetAttribute===z.TOP)throw new F("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=o,this._bottomRadius=n,this._vertexFormat=_.clone(r),this._slices=a,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}O.packedLength=_.packedLength+5,O.pack=function(t,e,o){if(!g(t))throw new F("value is required");if(!g(e))throw new F("array is required");return o=x(o,0),_.pack(t._vertexFormat,e,o),o+=_.packedLength,e[o++]=t._length,e[o++]=t._topRadius,e[o++]=t._bottomRadius,e[o++]=t._slices,e[o]=x(t._offsetAttribute,-1),e};var G,X=new _,C={vertexFormat:X,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};O.unpack=function(t,e,o){if(!g(t))throw new F("array is required");e=x(e,0);let n=_.unpack(t,e,X);e+=_.packedLength;let r=t[e++],a=t[e++],i=t[e++],s=t[e++],u=t[e];return g(o)?(o._vertexFormat=_.clone(n,o._vertexFormat),o._length=r,o._topRadius=a,o._bottomRadius=i,o._slices=s,o._offsetAttribute=-1===u?void 0:u,o):(C.length=r,C.topRadius=a,C.bottomRadius=i,C.slices=s,C.offsetAttribute=-1===u?void 0:u,new O(C))},O.createGeometry=function(t){let e=t._length,o=t._topRadius,n=t._bottomRadius,r=t._vertexFormat,a=t._slices;if(e<=0||o<0||n<0||0===o&&0===n)return;let i,s=a+a,u=a+s,m=s+s,f=Q.computePositions(e,o,n,a,!0),p=r.st?new Float32Array(2*m):void 0,l=r.normal?new Float32Array(3*m):void 0,c=r.tangent?new Float32Array(3*m):void 0,h=r.bitangent?new Float32Array(3*m):void 0,d=r.normal||r.tangent||r.bitangent;if(d){let t=r.tangent||r.bitangent,s=0,u=0,m=0,f=Math.atan2(n-o,e),p=ot;p.z=Math.sin(f);let g=Math.cos(f),_=it,w=nt;for(i=0;i-e?(o=et,o.x=this._cameraPosition.x/(r.radii.x+e),o.y=this._cameraPosition.y/(r.radii.y+e),o.z=this._cameraPosition.z/(r.radii.z+e),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),D(t,o,i)},T.prototype.computeHorizonCullingPoint=function(t,e,i){return Z(this._ellipsoid,t,e,i)};var j=M.clone(M.UNIT_SPHERE);T.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(t,e,i,o){return Z(U(this._ellipsoid,i,j),t,e,o)},T.prototype.computeHorizonCullingPointFromVertices=function(t,e,i,o,r){return v(this._ellipsoid,t,e,i,o,r)},T.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(t,e,i,o,r,s){return v(U(this._ellipsoid,r,j),t,e,i,o,s)};var it=[];T.prototype.computeHorizonCullingPointFromRectangle=function(t,e,i){z.typeOf.object("rectangle",t);let o=W.subsample(t,e,0,it),r=F.fromPoints(o);if(!(s.magnitude(r.center)<.1*e.minimumRadius))return this.computeHorizonCullingPoint(r.center,o,i)};var at=new s;function U(t,e,i){if(u(e)&&e<0&&t.minimumRadius>-e){let o=s.fromElements(t.radii.x+e,t.radii.y+e,t.radii.z+e,at);t=M.fromCartesian3(o,i)}return t}function Z(t,e,i,o){z.typeOf.object("directionToPoint",e),z.defined("positions",i),u(o)||(o=new s);let r=K(t,e),a=0;for(let e=0,o=i.length;e0:n>r&&n*n/s.magnitudeSquared(a)>r)}var nt=new s,st=new s;function Q(t,e,i){let o=t.transformPositionToScaledSpace(e,nt),r=s.magnitudeSquared(o),a=Math.sqrt(r),n=s.divideByScalar(o,a,st);r=Math.max(1,r),a=Math.max(1,a);let c=1/a;return 1/(s.dot(n,i)*c-s.magnitude(s.cross(n,i,n))*(Math.sqrt(r-1)*c))}function J(t,e,i){if(!(e<=0||e===1/0||e!=e))return s.multiplyByScalar(t,e,i)}var R=new s;function K(t,e){return s.equals(e,s.ZERO)?e:(t.transformPositionToScaledSpace(e,R),s.normalize(R,R))}var xt=T,b={getHeight:function(t,e,i){return(t-i)*e+i}},ct=new s;b.getPosition=function(t,e,i,o,r){let a=e.cartesianToCartographic(t,ct),n=b.getHeight(a.height,i,o);return s.fromRadians(a.longitude,a.latitude,n,e,r)};var X=b,rt={NONE:0,BITS12:1},S=Object.freeze(rt),C=new s,mt=new s,f=new x,G=new d,dt=new d,lt=Math.pow(2,12);function h(t,e,i,o,r,a,n,c,l,m){let h,f,p=S.NONE;if(u(e)&&u(i)&&u(o)&&u(r)){let t=e.minimum,a=e.maximum,n=s.subtract(a,t,mt),c=o-i;p=Math.max(s.maximumComponent(n),c)=0?y.longitude:y.longitude+d.TWO_PI;a=Math.min(a,s),o=Math.max(o,s)}return r-n>o-a&&(n=a,r=o,r>d.PI&&(r-=d.TWO_PI),n>d.PI&&(n-=d.TWO_PI)),z(e)?(e.west=n,e.south=u,e.east=r,e.north=i,e):new q(n,u,r,i)},q.fromCartesianArray=function(t,e,n){y.defined("cartesians",t),e=T(e,jn.WGS84);let r=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=Number.MAX_VALUE,u=-Number.MAX_VALUE,i=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(let n=0,y=t.length;n=0?y.longitude:y.longitude+d.TWO_PI;o=Math.min(o,c),u=Math.max(u,c)}return a-r>u-o&&(r=o,a=u,a>d.PI&&(a-=d.TWO_PI),r>d.PI&&(r-=d.TWO_PI)),z(n)?(n.west=r,n.south=i,n.east=a,n.north=s,n):new q(r,i,a,s)},q.clone=function(t,e){if(z(t))return z(e)?(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e):new q(t.west,t.south,t.east,t.north)},q.equalsEpsilon=function(t,e,n){return n=T(n,0),t===e||z(t)&&z(e)&&Math.abs(t.west-e.west)<=n&&Math.abs(t.south-e.south)<=n&&Math.abs(t.east-e.east)<=n&&Math.abs(t.north-e.north)<=n},q.prototype.clone=function(t){return q.clone(this,t)},q.prototype.equals=function(t){return q.equals(this,t)},q.equals=function(t,e){return t===e||z(t)&&z(e)&&t.west===e.west&&t.south===e.south&&t.east===e.east&&t.north===e.north},q.prototype.equalsEpsilon=function(t,e){return q.equalsEpsilon(this,t,e)},q.validate=function(t){y.typeOf.object("rectangle",t);let e=t.north;y.typeOf.number.greaterThanOrEquals("north",e,-d.PI_OVER_TWO),y.typeOf.number.lessThanOrEquals("north",e,d.PI_OVER_TWO);let n=t.south;y.typeOf.number.greaterThanOrEquals("south",n,-d.PI_OVER_TWO),y.typeOf.number.lessThanOrEquals("south",n,d.PI_OVER_TWO);let r=t.west;y.typeOf.number.greaterThanOrEquals("west",r,-Math.PI),y.typeOf.number.lessThanOrEquals("west",r,Math.PI);let a=t.east;y.typeOf.number.greaterThanOrEquals("east",a,-Math.PI),y.typeOf.number.lessThanOrEquals("east",a,Math.PI)},q.southwest=function(t,e){return y.typeOf.object("rectangle",t),z(e)?(e.longitude=t.west,e.latitude=t.south,e.height=0,e):new u(t.west,t.south)},q.northwest=function(t,e){return y.typeOf.object("rectangle",t),z(e)?(e.longitude=t.west,e.latitude=t.north,e.height=0,e):new u(t.west,t.north)},q.northeast=function(t,e){return y.typeOf.object("rectangle",t),z(e)?(e.longitude=t.east,e.latitude=t.north,e.height=0,e):new u(t.east,t.north)},q.southeast=function(t,e){return y.typeOf.object("rectangle",t),z(e)?(e.longitude=t.east,e.latitude=t.south,e.height=0,e):new u(t.east,t.south)},q.center=function(t,e){y.typeOf.object("rectangle",t);let n=t.east,r=t.west;n0?r+=d.TWO_PI:o0&&(o+=d.TWO_PI),r=f?void 0:z(n)?(n.west=i,n.south=c,n.east=s,n.north=f,n):new q(i,c,s,f)},q.simpleIntersection=function(t,e,n){y.typeOf.object("rectangle",t),y.typeOf.object("otherRectangle",e);let r=Math.max(t.west,e.west),a=Math.max(t.south,e.south),o=Math.min(t.east,e.east),u=Math.min(t.north,e.north);if(!(a>=u||r>=o))return z(n)?(n.west=r,n.south=a,n.east=o,n.north=u,n):new q(r,a,o,u)},q.union=function(t,e,n){y.typeOf.object("rectangle",t),y.typeOf.object("otherRectangle",e),z(n)||(n=new q);let r=t.east,a=t.west,o=e.east,u=e.west;r0?r+=d.TWO_PI:o0&&(o+=d.TWO_PI),ra||d.equalsEpsilon(n,a,d.EPSILON14))&&(n=t.south&&r<=t.north};var In=new u;q.subsample=function(t,e,n,r){y.typeOf.object("rectangle",t),e=T(e,jn.WGS84),n=T(n,0),z(r)||(r=[]);let a=0,o=t.north,u=t.south,i=t.east,s=t.west,c=In;c.height=n,c.longitude=s,c.latitude=o,r[a]=e.cartographicToCartesian(c,r[a]),a++,c.longitude=i,r[a]=e.cartographicToCartesian(c,r[a]),a++,c.latitude=u,r[a]=e.cartographicToCartesian(c,r[a]),a++,c.longitude=s,r[a]=e.cartographicToCartesian(c,r[a]),a++,c.latitude=o<0?o:u>0?u:0;for(let n=1;n<8;++n)c.longitude=-Math.PI+n*d.PI_OVER_TWO,q.contains(t,c)&&(r[a]=e.cartographicToCartesian(c,r[a]),a++);return 0===c.latitude&&(c.longitude=s,r[a]=e.cartographicToCartesian(c,r[a]),a++,c.longitude=i,r[a]=e.cartographicToCartesian(c,r[a]),a++),r.length=a,r},q.subsection=function(t,e,n,r,a,o){if(y.typeOf.object("rectangle",t),y.typeOf.number.greaterThanOrEquals("westLerp",e,0),y.typeOf.number.lessThanOrEquals("westLerp",e,1),y.typeOf.number.greaterThanOrEquals("southLerp",n,0),y.typeOf.number.lessThanOrEquals("southLerp",n,1),y.typeOf.number.greaterThanOrEquals("eastLerp",r,0),y.typeOf.number.lessThanOrEquals("eastLerp",r,1),y.typeOf.number.greaterThanOrEquals("northLerp",a,0),y.typeOf.number.lessThanOrEquals("northLerp",a,1),y.typeOf.number.lessThanOrEquals("westLerp",e,r),y.typeOf.number.lessThanOrEquals("southLerp",n,a),z(o)||(o=new q),t.west<=t.east){let n=t.east-t.west;o.west=t.west+e*n,o.east=t.west+r*n}else{let n=d.TWO_PI+t.east-t.west;o.west=d.negativePiToPi(t.west+e*n),o.east=d.negativePiToPi(t.west+r*n)}let u=t.north-t.south;return o.south=t.south+n*u,o.north=t.south+a*u,1===e&&(o.west=t.east),1===r&&(o.east=t.east),1===n&&(o.south=t.north),1===a&&(o.north=t.north),o},q.MAX_VALUE=Object.freeze(new q(-Math.PI,-d.PI_OVER_TWO,Math.PI,d.PI_OVER_TWO));var jo=q;function M(t,e,n,r){this[0]=T(t,0),this[1]=T(n,0),this[2]=T(e,0),this[3]=T(r,0)}M.packedLength=4,M.pack=function(t,e,n){return y.typeOf.object("value",t),y.defined("array",e),n=T(n,0),e[n++]=t[0],e[n++]=t[1],e[n++]=t[2],e[n++]=t[3],e},M.unpack=function(t,e,n){return y.defined("array",t),e=T(e,0),z(n)||(n=new M),n[0]=t[e++],n[1]=t[e++],n[2]=t[e++],n[3]=t[e++],n},M.packArray=function(t,e){y.defined("array",t);let n=t.length,r=4*n;if(z(e)){if(!Array.isArray(e)&&e.length!==r)throw new J("If result is a typed array, it must have exactly array.length * 4 elements");e.length!==r&&(e.length=r)}else e=new Array(r);for(let r=0;r=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(e):new Uint16Array(e)},createTypedArrayFromArrayBuffer:function(r,e,n,N){if(!i(r))throw new t("numberOfVertices is required.");if(!i(e))throw new t("sourceArray is required.");if(!i(n))throw new t("byteOffset is required.");return r>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(e,n,N):new Uint16Array(e,n,N)},fromTypedArray:function(e){if(e instanceof Uint8Array)return r.UNSIGNED_BYTE;if(e instanceof Uint16Array)return r.UNSIGNED_SHORT;if(e instanceof Uint32Array)return r.UNSIGNED_INT;throw new t("array must be a Uint8Array, Uint16Array, or Uint32Array.")}},u=Object.freeze(r);export{u as a}; \ No newline at end of file +/*! For license information please see chunk-SPMRTIBU.js.LICENSE.txt */ +import{a}from"./chunk-JMWWNZHX.js";import{a as N}from"./chunk-DNO4OWAM.js";import{a as t}from"./chunk-4KGDZUZQ.js";import{e as i}from"./chunk-F3TINEFX.js";var r={UNSIGNED_BYTE:N.UNSIGNED_BYTE,UNSIGNED_SHORT:N.UNSIGNED_SHORT,UNSIGNED_INT:N.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return r.UNSIGNED_SHORT;case 4:return r.UNSIGNED_INT;case 1:return r.UNSIGNED_BYTE;default:throw new t("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return i(e)&&(e===r.UNSIGNED_BYTE||e===r.UNSIGNED_SHORT||e===r.UNSIGNED_INT)},createTypedArray:function(r,e){if(!i(r))throw new t("numberOfVertices is required.");return r>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(e):new Uint16Array(e)},createTypedArrayFromArrayBuffer:function(r,e,n,N){if(!i(r))throw new t("numberOfVertices is required.");if(!i(e))throw new t("sourceArray is required.");if(!i(n))throw new t("byteOffset is required.");return r>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(e,n,N):new Uint16Array(e,n,N)},fromTypedArray:function(e){if(e instanceof Uint8Array)return r.UNSIGNED_BYTE;if(e instanceof Uint16Array)return r.UNSIGNED_SHORT;if(e instanceof Uint32Array)return r.UNSIGNED_INT;throw new t("array must be a Uint8Array, Uint16Array, or Uint32Array.")}},u=Object.freeze(r);export{u as a}; \ No newline at end of file diff --git a/Workers/chunk-SPMRTIBU.js.LICENSE.txt b/Workers/chunk-SPMRTIBU.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-SPMRTIBU.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-SUQSMXXT.js b/Workers/chunk-SUQSMXXT.js new file mode 100644 index 0000000..4ea0f94 --- /dev/null +++ b/Workers/chunk-SUQSMXXT.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-SUQSMXXT.js.LICENSE.txt */ +import{a as ue}from"./chunk-KZVVSHMS.js";import{b as he,c as pe,d as ne}from"./chunk-3G4OCZJT.js";import{a as te}from"./chunk-TLYHKSDJ.js";import{a as p,b as ee,c as w,d as Se}from"./chunk-PYVDHCDQ.js";import{a as Y}from"./chunk-JMWWNZHX.js";import{a as le}from"./chunk-DNO4OWAM.js";import{a as K}from"./chunk-Z3SYNMQT.js";import{b}from"./chunk-4KGDZUZQ.js";import{c as We,d as Ge,e as D}from"./chunk-F3TINEFX.js";var Oe=We(((e,t)=>{"use strict";function n(e,t,n){n=n||2;var i,u,p,o,x,h,f,c=t&&t.length,v=c?t[0]*n:e.length,m=r(e,0,v,n,!0),d=[];if(!m||m.next===m.prev)return d;if(c&&(m=function(e,t,n,i){var a,u,p,o=[];for(a=0,u=t.length;a80*n){i=p=e[0],u=o=e[1];for(var w=n;wp&&(p=x),h>o&&(o=h);f=0!==(f=Math.max(p-i,o-u))?32767/f:0}return a(m,d,n,i,u,f,0),d}function r(e,t,n,r,i){var a,u;if(i===M(e,t,n,r)>0)for(a=t;a=t;a-=r)u=A(a,e[a],e[a+1],u);return u&&d(u,u.next)&&(D(u),u=u.next),u}function i(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!d(r,r.next)&&0!==m(r.prev,r,r.next))r=r.next;else{if(D(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,l,s,h){if(e){!h&&s&&function(e,t,n,r){var i=e;do{0===i.z&&(i.z=f(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,a,u,p,o,x=1;do{for(n=e,e=null,a=null,u=0;n;){for(u++,r=n,p=0,t=0;t0||o>0&&r;)0!==p&&(0===o||!r||n.z<=r.z)?(i=n,n=n.nextZ,p--):(i=r,r=r.nextZ,o--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,x*=2}while(u>1)}(i)}(e,r,l,s);for(var y,c,v=e;e.prev!==e.next;)if(y=e.prev,c=e.next,s?p(e,r,l,s):u(e))t.push(y.i/n|0),t.push(e.i/n|0),t.push(c.i/n|0),D(e),e=c.next,v=c.next;else if((e=c)===v){h?1===h?a(e=o(i(e),t,n),t,n,r,l,s,2):2===h&&x(e,t,n,r,l,s):a(i(e),t,n,r,l,s,1);break}}}function u(e){var t=e.prev,n=e,r=e.next;if(m(t,n,r)>=0)return!1;for(var i=t.x,a=n.x,u=r.x,p=t.y,o=n.y,x=r.y,l=ia?i>u?i:u:a>u?a:u,f=p>o?p>x?p:x:o>x?o:x,y=r.next;y!==t;){if(y.x>=l&&y.x<=h&&y.y>=s&&y.y<=f&&c(i,p,a,o,u,x,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function p(e,t,n,r){var i=e.prev,a=e,u=e.next;if(m(i,a,u)>=0)return!1;for(var p=i.x,o=a.x,x=u.x,l=i.y,s=a.y,h=u.y,y=po?p>x?p:x:o>x?o:x,w=l>s?l>h?l:h:s>h?s:h,g=f(y,v,t,n,r),b=f(d,w,t,n,r),S=e.prevZ,Z=e.nextZ;S&&S.z>=g&&Z&&Z.z<=b;){if(S.x>=y&&S.x<=d&&S.y>=v&&S.y<=w&&S!==i&&S!==u&&c(p,l,o,s,x,h,S.x,S.y)&&m(S.prev,S,S.next)>=0||(S=S.prevZ,Z.x>=y&&Z.x<=d&&Z.y>=v&&Z.y<=w&&Z!==i&&Z!==u&&c(p,l,o,s,x,h,Z.x,Z.y)&&m(Z.prev,Z,Z.next)>=0))return!1;Z=Z.nextZ}for(;S&&S.z>=g;){if(S.x>=y&&S.x<=d&&S.y>=v&&S.y<=w&&S!==i&&S!==u&&c(p,l,o,s,x,h,S.x,S.y)&&m(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;Z&&Z.z<=b;){if(Z.x>=y&&Z.x<=d&&Z.y>=v&&Z.y<=w&&Z!==i&&Z!==u&&c(p,l,o,s,x,h,Z.x,Z.y)&&m(Z.prev,Z,Z.next)>=0)return!1;Z=Z.nextZ}return!0}function o(e,t,n){var r=e;do{var a=r.prev,u=r.next.next;!d(a,u)&&w(a,r,r.next,u)&&S(a,u)&&S(u,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(u.i/n|0),D(r),D(r.next),r=e=u),r=r.next}while(r!==e);return i(r)}function x(e,t,n,r,u,p){var o=e;do{for(var x=o.next.next;x!==o.prev;){if(o.i!==x.i&&v(o,x)){var l=Z(o,x);return o=i(o,o.next),l=i(l,l.next),a(o,t,n,r,u,p,0),void a(l,t,n,r,u,p,0)}x=x.next}o=o.next}while(o!==e)}function l(e,t){return e.x-t.x}function s(e,t){var n=function(e,t){var n,r=t,i=e.x,a=e.y,u=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var p=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(p<=i&&p>u&&(u=p,n=r.x=r.x&&r.x>=l&&i!==r.x&&c(an.x||r.x===n.x&&h(n,r)))&&(n=r,f=o)),r=r.next}while(r!==x);return n}(e,t);if(!n)return t;var r=Z(n,e);return i(r,r.next),i(n,n.next)}function h(e,t){return m(e.prev,e,t.prev)<0&&m(t.next,e,e.next)<0}function f(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function y(e){var t=e,n=e;do{(t.x=(e-u)*(a-p)&&(e-u)*(r-p)>=(n-u)*(t-p)&&(n-u)*(a-p)>=(i-u)*(r-p)}function v(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(S(e,t)&&S(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(m(e.prev,e,t.prev)||m(e,t.prev,t))||d(e,t)&&m(e.prev,e,e.next)>0&&m(t.prev,t,t.next)>0)}function m(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function d(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var i=b(m(e,t,n)),a=b(m(e,t,r)),u=b(m(n,r,e)),p=b(m(n,r,t));return!!(i!==a&&u!==p||0===i&&g(e,n,t)||0===a&&g(e,r,t)||0===u&&g(n,e,r)||0===p&&g(n,t,r))}function g(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 b(e){return e>0?1:e<0?-1:0}function S(e,t){return m(e.prev,e,e.next)<0?m(e,t,e.next)>=0&&m(e,e.prev,t)>=0:m(e,t,e.prev)<0||m(e,e.next,t)<0}function Z(e,t){var n=new O(e.i,e.x,e.y),r=new O(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function A(e,t,n,r){var i=new O(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function D(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 O(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,n,r){for(var i=0,a=t,u=n-r;a0&&(r+=e[i-1].length,n.holes.push(r))}return n}})),se={CLOCKWISE:le.CW,COUNTER_CLOCKWISE:le.CCW,validate:function(e){return e===se.CLOCKWISE||e===se.COUNTER_CLOCKWISE}},ve=Object.freeze(se),Le=Ge(Oe(),1),et=new p,tt=new p,B={computeArea2D:function(e){b.defined("positions",e),b.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);let t=e.length,n=0;for(let r=t-1,i=0;i0?ve.COUNTER_CLOCKWISE:ve.CLOCKWISE},triangulate:function(e,t){b.defined("positions",e);let n=w.packArray(e);return(0,Le.default)(n,t,2)}},De=new p,Fe=new p,Pe=new p,Te=new p,Me=new p,Ze=new p,R=new p,Re=new w,ze=new w,Be=new w,q=new w;B.computeSubdivision=function(e,t,n,r,i){i=K(i,Y.RADIANS_PER_DEGREE);let a=D(r);b.typeOf.object("ellipsoid",e),b.defined("positions",t),b.defined("indices",n),b.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),b.typeOf.number.equals("indices.length % 3","0",n.length%3,0),b.typeOf.number.greaterThan("granularity",i,0);let u,o=n.slice(0),x=t.length,l=new Array(3*x),s=new Array(2*x),h=0,f=0;for(u=0;u0;){let e,t,n,r=o.pop(),i=o.pop(),x=o.pop(),h=p.fromArray(l,3*x,De),f=p.fromArray(l,3*i,Fe),m=p.fromArray(l,3*r,Pe);a&&(e=w.fromArray(s,2*x,Re),t=w.fromArray(s,2*i,ze),n=w.fromArray(s,2*r,Be));let g,b,S,Z=p.multiplyByScalar(p.normalize(h,Te),v,Te),A=p.multiplyByScalar(p.normalize(f,Me),v,Me),O=p.multiplyByScalar(p.normalize(m,Ze),v,Ze),M=p.magnitudeSquared(p.subtract(Z,A,R)),E=p.magnitudeSquared(p.subtract(A,O,R)),T=p.magnitudeSquared(p.subtract(O,Z,R)),z=Math.max(M,E,T);z>d?M===z?(g=`${Math.min(x,i)} ${Math.max(x,i)}`,u=c[g],D(u)||(b=p.add(h,f,R),p.multiplyByScalar(b,.5,b),l.push(b.x,b.y,b.z),u=l.length/3-1,c[g]=u,a&&(S=w.add(e,t,q),w.multiplyByScalar(S,.5,S),s.push(S.x,S.y))),o.push(x,u,r),o.push(u,i,r)):E===z?(g=`${Math.min(i,r)} ${Math.max(i,r)}`,u=c[g],D(u)||(b=p.add(f,m,R),p.multiplyByScalar(b,.5,b),l.push(b.x,b.y,b.z),u=l.length/3-1,c[g]=u,a&&(S=w.add(t,n,q),w.multiplyByScalar(S,.5,S),s.push(S.x,S.y))),o.push(i,u,x),o.push(u,r,x)):T===z&&(g=`${Math.min(r,x)} ${Math.max(r,x)}`,u=c[g],D(u)||(b=p.add(m,h,R),p.multiplyByScalar(b,.5,b),l.push(b.x,b.y,b.z),u=l.length/3-1,c[g]=u,a&&(S=w.add(n,e,q),w.multiplyByScalar(S,.5,S),s.push(S.x,S.y))),o.push(r,u,i),o.push(u,x,i)):(y.push(x),y.push(i),y.push(r))}let g={attributes:{position:new ne({componentDatatype:te.DOUBLE,componentsPerAttribute:3,values:l})},indices:y,primitiveType:he.TRIANGLES};return a&&(g.attributes.st=new ne({componentDatatype:te.FLOAT,componentsPerAttribute:2,values:s})),new pe(g)};var nt=new ee,rt=new ee,it=new ee,we=new ee;B.computeRhumbLineSubdivision=function(e,t,n,r,i){i=K(i,Y.RADIANS_PER_DEGREE);let a=D(r);b.typeOf.object("ellipsoid",e),b.defined("positions",t),b.defined("indices",n),b.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),b.typeOf.number.equals("indices.length % 3","0",n.length%3,0),b.typeOf.number.greaterThan("granularity",i,0);let u,o=n.slice(0),x=t.length,l=new Array(3*x),s=new Array(2*x),h=0,f=0;for(u=0;u0;){let t,n,r,i=o.pop(),x=o.pop(),h=o.pop(),f=p.fromArray(l,3*h,De),v=p.fromArray(l,3*x,Fe),b=p.fromArray(l,3*i,Pe);a&&(t=w.fromArray(s,2*h,Re),n=w.fromArray(s,2*x,ze),r=w.fromArray(s,2*i,Be));let Z=e.cartesianToCartographic(f,nt),A=e.cartesianToCartographic(v,rt),O=e.cartesianToCartographic(b,it);d.setEndPoints(Z,A);let M=d.surfaceDistance;g.setEndPoints(A,O);let E=g.surfaceDistance;S.setEndPoints(O,Z);let T,z,B,C,L,K=S.surfaceDistance,W=Math.max(M,E,K);W>m?M===W?(T=`${Math.min(h,x)} ${Math.max(h,x)}`,u=c[T],D(u)||(z=d.interpolateUsingFraction(.5,we),B=.5*(Z.height+A.height),C=p.fromRadians(z.longitude,z.latitude,B,e,R),l.push(C.x,C.y,C.z),u=l.length/3-1,c[T]=u,a&&(L=w.add(t,n,q),w.multiplyByScalar(L,.5,L),s.push(L.x,L.y))),o.push(h,u,i),o.push(u,x,i)):E===W?(T=`${Math.min(x,i)} ${Math.max(x,i)}`,u=c[T],D(u)||(z=g.interpolateUsingFraction(.5,we),B=.5*(A.height+O.height),C=p.fromRadians(z.longitude,z.latitude,B,e,R),l.push(C.x,C.y,C.z),u=l.length/3-1,c[T]=u,a&&(L=w.add(n,r,q),w.multiplyByScalar(L,.5,L),s.push(L.x,L.y))),o.push(x,u,h),o.push(u,i,h)):K===W&&(T=`${Math.min(i,h)} ${Math.max(i,h)}`,u=c[T],D(u)||(z=S.interpolateUsingFraction(.5,we),B=.5*(O.height+Z.height),C=p.fromRadians(z.longitude,z.latitude,B,e,R),l.push(C.x,C.y,C.z),u=l.length/3-1,c[T]=u,a&&(L=w.add(r,t,q),w.multiplyByScalar(L,.5,L),s.push(L.x,L.y))),o.push(i,u,x),o.push(u,h,x)):(y.push(h),y.push(x),y.push(i))}let Z={attributes:{position:new ne({componentDatatype:te.DOUBLE,componentsPerAttribute:3,values:l})},indices:y,primitiveType:he.TRIANGLES};return a&&(Z.attributes.st=new ne({componentDatatype:te.FLOAT,componentsPerAttribute:2,values:s})),new pe(Z)},B.scaleToGeodeticHeight=function(e,t,n,r){n=K(n,Se.WGS84);let i=et,a=tt;if(t=K(t,0),r=K(r,!0),D(e)){let u=e.length;for(let o=0;o1){let t=e[0].modelMatrix;for(n=1;n=0){let e=n[c];o=e.offset+e.count,s=e.index,i=r[s].indices.length}else o=0,s=0,i=r[s].indices.length;let l=e.length;for(let c=0;ci&&(o=0,i=r[++s].indices.length),n.push({index:s,offset:o,count:u}),o+=u}}function X(e,t){let r=[];return T(e,"geometry",t,r),T(e,"westHemisphereGeometry",t,r),T(e,"eastHemisphereGeometry",t,r),r}var S={};function Y(e,t){let r=e.attributes;for(let e in r)if(r.hasOwnProperty(e)){let n=r[e];a(n)&&a(n.values)&&t.push(n.values.buffer)}a(e.indices)&&t.push(e.indices.buffer)}function Z(e,t){let r=e.length;for(let n=0;n0&&(t=Q(e),t.length>0&&(r=b.createAttributeLocations(t[0]),e.createPickOffsets&&(n=X(i,t))),a(i[0].attributes)&&a(i[0].attributes.offset)&&(o=new Array(s),c=!0));let l=new Array(s),u=new Array(s);for(let e=0;e0&&(r.set(i.indices,s),s+=m)}return t.push(r.buffer),{stringTable:n,packedData:r}},S.unpackCreateGeometryResults=function(e){let t,r=e.stringTable,n=e.packedData,o=new Array(n[0]),i=0,a=1;for(;a0){let e=f.length/m;for(h=U.createTypedArray(e,p),t=0;t1){let t=e[0].modelMatrix;for(n=1;n=0){let e=n[c];o=e.offset+e.count,s=e.index,i=r[s].indices.length}else o=0,s=0,i=r[s].indices.length;let l=e.length;for(let c=0;ci&&(o=0,i=r[++s].indices.length),n.push({index:s,offset:o,count:u}),o+=u}}function X(e,t){let r=[];return T(e,"geometry",t,r),T(e,"westHemisphereGeometry",t,r),T(e,"eastHemisphereGeometry",t,r),r}var S={};function Y(e,t){let r=e.attributes;for(let e in r)if(r.hasOwnProperty(e)){let n=r[e];a(n)&&a(n.values)&&t.push(n.values.buffer)}a(e.indices)&&t.push(e.indices.buffer)}function Z(e,t){let r=e.length;for(let n=0;n0&&(t=Q(e),t.length>0&&(r=b.createAttributeLocations(t[0]),e.createPickOffsets&&(n=X(i,t))),a(i[0].attributes)&&a(i[0].attributes.offset)&&(o=new Array(s),c=!0));let l=new Array(s),u=new Array(s);for(let e=0;e0&&(r.set(i.indices,s),s+=m)}return t.push(r.buffer),{stringTable:n,packedData:r}},S.unpackCreateGeometryResults=function(e){let t,r=e.stringTable,n=e.packedData,o=new Array(n[0]),i=0,a=1;for(;a0){let e=f.length/m;for(h=U.createTypedArray(e,p),t=0;t{"use strict";function n(e,t,n){n=n||2;var i,u,p,o,x,h,f,c=t&&t.length,v=c?t[0]*n:e.length,m=r(e,0,v,n,!0),d=[];if(!m||m.next===m.prev)return d;if(c&&(m=function(e,t,n,i){var a,u,p,o=[];for(a=0,u=t.length;a80*n){i=p=e[0],u=o=e[1];for(var w=n;wp&&(p=x),h>o&&(o=h);f=0!==(f=Math.max(p-i,o-u))?32767/f:0}return a(m,d,n,i,u,f,0),d}function r(e,t,n,r,i){var a,u;if(i===O(e,t,n,r)>0)for(a=t;a=t;a-=r)u=S(a,e[a],e[a+1],u);return u&&d(u,u.next)&&(Z(u),u=u.next),u}function i(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!d(r,r.next)&&0!==m(r.prev,r,r.next))r=r.next;else{if(Z(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,l,s,h){if(e){!h&&s&&function(e,t,n,r){var i=e;do{0===i.z&&(i.z=f(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,a,u,p,o,x=1;do{for(n=e,e=null,a=null,u=0;n;){for(u++,r=n,p=0,t=0;t0||o>0&&r;)0!==p&&(0===o||!r||n.z<=r.z)?(i=n,n=n.nextZ,p--):(i=r,r=r.nextZ,o--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,x*=2}while(u>1)}(i)}(e,r,l,s);for(var y,c,v=e;e.prev!==e.next;)if(y=e.prev,c=e.next,s?p(e,r,l,s):u(e))t.push(y.i/n|0),t.push(e.i/n|0),t.push(c.i/n|0),Z(e),e=c.next,v=c.next;else if((e=c)===v){h?1===h?a(e=o(i(e),t,n),t,n,r,l,s,2):2===h&&x(e,t,n,r,l,s):a(i(e),t,n,r,l,s,1);break}}}function u(e){var t=e.prev,n=e,r=e.next;if(m(t,n,r)>=0)return!1;for(var i=t.x,a=n.x,u=r.x,p=t.y,o=n.y,x=r.y,l=ia?i>u?i:u:a>u?a:u,f=p>o?p>x?p:x:o>x?o:x,y=r.next;y!==t;){if(y.x>=l&&y.x<=h&&y.y>=s&&y.y<=f&&c(i,p,a,o,u,x,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function p(e,t,n,r){var i=e.prev,a=e,u=e.next;if(m(i,a,u)>=0)return!1;for(var p=i.x,o=a.x,x=u.x,l=i.y,s=a.y,h=u.y,y=po?p>x?p:x:o>x?o:x,w=l>s?l>h?l:h:s>h?s:h,g=f(y,v,t,n,r),b=f(d,w,t,n,r),R=e.prevZ,A=e.nextZ;R&&R.z>=g&&A&&A.z<=b;){if(R.x>=y&&R.x<=d&&R.y>=v&&R.y<=w&&R!==i&&R!==u&&c(p,l,o,s,x,h,R.x,R.y)&&m(R.prev,R,R.next)>=0||(R=R.prevZ,A.x>=y&&A.x<=d&&A.y>=v&&A.y<=w&&A!==i&&A!==u&&c(p,l,o,s,x,h,A.x,A.y)&&m(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;R&&R.z>=g;){if(R.x>=y&&R.x<=d&&R.y>=v&&R.y<=w&&R!==i&&R!==u&&c(p,l,o,s,x,h,R.x,R.y)&&m(R.prev,R,R.next)>=0)return!1;R=R.prevZ}for(;A&&A.z<=b;){if(A.x>=y&&A.x<=d&&A.y>=v&&A.y<=w&&A!==i&&A!==u&&c(p,l,o,s,x,h,A.x,A.y)&&m(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function o(e,t,n){var r=e;do{var a=r.prev,u=r.next.next;!d(a,u)&&w(a,r,r.next,u)&&R(a,u)&&R(u,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(u.i/n|0),Z(r),Z(r.next),r=e=u),r=r.next}while(r!==e);return i(r)}function x(e,t,n,r,u,p){var o=e;do{for(var x=o.next.next;x!==o.prev;){if(o.i!==x.i&&v(o,x)){var l=A(o,x);return o=i(o,o.next),l=i(l,l.next),a(o,t,n,r,u,p,0),void a(l,t,n,r,u,p,0)}x=x.next}o=o.next}while(o!==e)}function l(e,t){return e.x-t.x}function s(e,t){var n=function(e,t){var n,r=t,i=e.x,a=e.y,u=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var p=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(p<=i&&p>u&&(u=p,n=r.x=r.x&&r.x>=l&&i!==r.x&&c(an.x||r.x===n.x&&h(n,r)))&&(n=r,f=o)),r=r.next}while(r!==x);return n}(e,t);if(!n)return t;var r=A(n,e);return i(r,r.next),i(n,n.next)}function h(e,t){return m(e.prev,e,t.prev)<0&&m(t.next,e,e.next)<0}function f(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function y(e){var t=e,n=e;do{(t.x=(e-u)*(a-p)&&(e-u)*(r-p)>=(n-u)*(t-p)&&(n-u)*(a-p)>=(i-u)*(r-p)}function v(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(R(e,t)&&R(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(m(e.prev,e,t.prev)||m(e,t.prev,t))||d(e,t)&&m(e.prev,e,e.next)>0&&m(t.prev,t,t.next)>0)}function m(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function d(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var i=b(m(e,t,n)),a=b(m(e,t,r)),u=b(m(n,r,e)),p=b(m(n,r,t));return!!(i!==a&&u!==p||0===i&&g(e,n,t)||0===a&&g(e,r,t)||0===u&&g(n,e,r)||0===p&&g(n,t,r))}function g(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 b(e){return e>0?1:e<0?-1:0}function R(e,t){return m(e.prev,e,e.next)<0?m(e,t,e.next)>=0&&m(e,e.prev,t)>=0:m(e,t,e.prev)<0||m(e,e.next,t)<0}function A(e,t){var n=new D(e.i,e.x,e.y),r=new D(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function S(e,t,n,r){var i=new D(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Z(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 D(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(e,t,n,r){for(var i=0,a=t,u=n-r;a0&&(r+=e[i-1].length,n.holes.push(r))}return n}})),se={CLOCKWISE:le.CW,COUNTER_CLOCKWISE:le.CCW,validate:function(e){return e===se.CLOCKWISE||e===se.COUNTER_CLOCKWISE}},ve=Object.freeze(se),Le=Ge(Oe(),1),et=new p,tt=new p,B={computeArea2D:function(e){b.defined("positions",e),b.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);let t=e.length,n=0;for(let r=t-1,i=0;i0?ve.COUNTER_CLOCKWISE:ve.CLOCKWISE},triangulate:function(e,t){b.defined("positions",e);let n=w.packArray(e);return(0,Le.default)(n,t,2)}},De=new p,Fe=new p,Pe=new p,Te=new p,Me=new p,Ze=new p,R=new p,Re=new w,ze=new w,Be=new w,q=new w;B.computeSubdivision=function(e,t,n,r,i){i=K(i,Y.RADIANS_PER_DEGREE);let a=D(r);b.typeOf.object("ellipsoid",e),b.defined("positions",t),b.defined("indices",n),b.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),b.typeOf.number.equals("indices.length % 3","0",n.length%3,0),b.typeOf.number.greaterThan("granularity",i,0);let u,o=n.slice(0),x=t.length,l=new Array(3*x),s=new Array(2*x),h=0,f=0;for(u=0;u0;){let e,t,n,r=o.pop(),i=o.pop(),x=o.pop(),h=p.fromArray(l,3*x,De),f=p.fromArray(l,3*i,Fe),m=p.fromArray(l,3*r,Pe);a&&(e=w.fromArray(s,2*x,Re),t=w.fromArray(s,2*i,ze),n=w.fromArray(s,2*r,Be));let g,b,A,S=p.multiplyByScalar(p.normalize(h,Te),v,Te),Z=p.multiplyByScalar(p.normalize(f,Me),v,Me),O=p.multiplyByScalar(p.normalize(m,Ze),v,Ze),E=p.magnitudeSquared(p.subtract(S,Z,R)),M=p.magnitudeSquared(p.subtract(Z,O,R)),B=p.magnitudeSquared(p.subtract(O,S,R)),z=Math.max(E,M,B);z>d?E===z?(g=`${Math.min(x,i)} ${Math.max(x,i)}`,u=c[g],D(u)||(b=p.add(h,f,R),p.multiplyByScalar(b,.5,b),l.push(b.x,b.y,b.z),u=l.length/3-1,c[g]=u,a&&(A=w.add(e,t,q),w.multiplyByScalar(A,.5,A),s.push(A.x,A.y))),o.push(x,u,r),o.push(u,i,r)):M===z?(g=`${Math.min(i,r)} ${Math.max(i,r)}`,u=c[g],D(u)||(b=p.add(f,m,R),p.multiplyByScalar(b,.5,b),l.push(b.x,b.y,b.z),u=l.length/3-1,c[g]=u,a&&(A=w.add(t,n,q),w.multiplyByScalar(A,.5,A),s.push(A.x,A.y))),o.push(i,u,x),o.push(u,r,x)):B===z&&(g=`${Math.min(r,x)} ${Math.max(r,x)}`,u=c[g],D(u)||(b=p.add(m,h,R),p.multiplyByScalar(b,.5,b),l.push(b.x,b.y,b.z),u=l.length/3-1,c[g]=u,a&&(A=w.add(n,e,q),w.multiplyByScalar(A,.5,A),s.push(A.x,A.y))),o.push(r,u,i),o.push(u,x,i)):(y.push(x),y.push(i),y.push(r))}let g={attributes:{position:new ne({componentDatatype:te.DOUBLE,componentsPerAttribute:3,values:l})},indices:y,primitiveType:he.TRIANGLES};return a&&(g.attributes.st=new ne({componentDatatype:te.FLOAT,componentsPerAttribute:2,values:s})),new pe(g)};var nt=new ee,rt=new ee,it=new ee,we=new ee;B.computeRhumbLineSubdivision=function(e,t,n,r,i){i=K(i,Y.RADIANS_PER_DEGREE);let a=D(r);b.typeOf.object("ellipsoid",e),b.defined("positions",t),b.defined("indices",n),b.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),b.typeOf.number.equals("indices.length % 3","0",n.length%3,0),b.typeOf.number.greaterThan("granularity",i,0);let u,o=n.slice(0),x=t.length,l=new Array(3*x),s=new Array(2*x),h=0,f=0;for(u=0;u0;){let t,n,r,i=o.pop(),x=o.pop(),h=o.pop(),f=p.fromArray(l,3*h,De),v=p.fromArray(l,3*x,Fe),b=p.fromArray(l,3*i,Pe);a&&(t=w.fromArray(s,2*h,Re),n=w.fromArray(s,2*x,ze),r=w.fromArray(s,2*i,Be));let S=e.cartesianToCartographic(f,nt),Z=e.cartesianToCartographic(v,rt),O=e.cartesianToCartographic(b,it);d.setEndPoints(S,Z);let E=d.surfaceDistance;g.setEndPoints(Z,O);let M=g.surfaceDistance;A.setEndPoints(O,S);let B,z,T,C,L,K=A.surfaceDistance,P=Math.max(E,M,K);P>m?E===P?(B=`${Math.min(h,x)} ${Math.max(h,x)}`,u=c[B],D(u)||(z=d.interpolateUsingFraction(.5,we),T=.5*(S.height+Z.height),C=p.fromRadians(z.longitude,z.latitude,T,e,R),l.push(C.x,C.y,C.z),u=l.length/3-1,c[B]=u,a&&(L=w.add(t,n,q),w.multiplyByScalar(L,.5,L),s.push(L.x,L.y))),o.push(h,u,i),o.push(u,x,i)):M===P?(B=`${Math.min(x,i)} ${Math.max(x,i)}`,u=c[B],D(u)||(z=g.interpolateUsingFraction(.5,we),T=.5*(Z.height+O.height),C=p.fromRadians(z.longitude,z.latitude,T,e,R),l.push(C.x,C.y,C.z),u=l.length/3-1,c[B]=u,a&&(L=w.add(n,r,q),w.multiplyByScalar(L,.5,L),s.push(L.x,L.y))),o.push(x,u,h),o.push(u,i,h)):K===P&&(B=`${Math.min(i,h)} ${Math.max(i,h)}`,u=c[B],D(u)||(z=A.interpolateUsingFraction(.5,we),T=.5*(O.height+S.height),C=p.fromRadians(z.longitude,z.latitude,T,e,R),l.push(C.x,C.y,C.z),u=l.length/3-1,c[B]=u,a&&(L=w.add(r,t,q),w.multiplyByScalar(L,.5,L),s.push(L.x,L.y))),o.push(i,u,x),o.push(u,h,x)):(y.push(h),y.push(x),y.push(i))}let S={attributes:{position:new ne({componentDatatype:te.DOUBLE,componentsPerAttribute:3,values:l})},indices:y,primitiveType:he.TRIANGLES};return a&&(S.attributes.st=new ne({componentDatatype:te.FLOAT,componentsPerAttribute:2,values:s})),new pe(S)},B.scaleToGeodeticHeight=function(e,t,n,r){n=K(n,Se.WGS84);let i=et,a=tt;if(t=K(t,0),r=K(r,!0),D(e)){let u=e.length;for(let o=0;o0?d.INSIDE:c+u<0?d.OUTSIDE:d.INTERSECTING},t.prototype.clone=function(i){return t.clone(this,i)},t.prototype.intersectPlane=function(i){return t.intersectPlane(this,i)},t.prototype.equals=function(i){return t.equals(this,i)};var P=t;export{P as a}; \ No newline at end of file +/*! For license information please see chunk-U54QHQ4X.js.LICENSE.txt */ +import{b as d}from"./chunk-LYPPBP4Q.js";import{a as i}from"./chunk-PYVDHCDQ.js";import{a as z}from"./chunk-Z3SYNMQT.js";import{b as r}from"./chunk-4KGDZUZQ.js";import{e as c}from"./chunk-F3TINEFX.js";function t(m,n,t){this.minimum=i.clone(z(m,i.ZERO)),this.maximum=i.clone(z(n,i.ZERO)),t=c(t)?i.clone(t):i.midpoint(this.minimum,this.maximum,new i),this.center=t}t.fromCorners=function(m,n,e){return r.defined("minimum",m),r.defined("maximum",n),c(e)||(e=new t),e.minimum=i.clone(m,e.minimum),e.maximum=i.clone(n,e.maximum),e.center=i.midpoint(m,n,e.center),e},t.fromPoints=function(m,n){if(c(n)||(n=new t),!c(m)||0===m.length)return n.minimum=i.clone(i.ZERO,n.minimum),n.maximum=i.clone(i.ZERO,n.maximum),n.center=i.clone(i.ZERO,n.center),n;let e=m[0].x,r=m[0].y,u=m[0].z,a=m[0].x,o=m[0].y,l=m[0].z,s=m.length;for(let i=1;i0?d.INSIDE:c+u<0?d.OUTSIDE:d.INTERSECTING},t.prototype.clone=function(i){return t.clone(this,i)},t.prototype.intersectPlane=function(i){return t.intersectPlane(this,i)},t.prototype.equals=function(i){return t.equals(this,i)};var P=t;export{P as a}; \ No newline at end of file diff --git a/Workers/chunk-U54QHQ4X.js.LICENSE.txt b/Workers/chunk-U54QHQ4X.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-U54QHQ4X.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-FDDSRMXI.js b/Workers/chunk-U6MIZ4IC.js similarity index 57% rename from Workers/chunk-FDDSRMXI.js rename to Workers/chunk-U6MIZ4IC.js index 75537c1..a4f321a 100644 --- a/Workers/chunk-FDDSRMXI.js +++ b/Workers/chunk-U6MIZ4IC.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-FDDSRMXI.js.LICENSE.txt */ -import{a as e}from"./chunk-RKPKWH3Z.js";function a(t){t=e(t,e.EMPTY_OBJECT),this.position=t.position,this.normal=t.normal,this.st=t.st,this.bitangent=t.bitangent,this.tangent=t.tangent,this.color=t.color}var i=a;export{i as a}; \ No newline at end of file +/*! For license information please see chunk-U6MIZ4IC.js.LICENSE.txt */ +import{a as e}from"./chunk-Z3SYNMQT.js";function a(t){t=e(t,e.EMPTY_OBJECT),this.position=t.position,this.normal=t.normal,this.st=t.st,this.bitangent=t.bitangent,this.tangent=t.tangent,this.color=t.color}var i=a;export{i as a}; \ No newline at end of file diff --git a/Workers/chunk-U6MIZ4IC.js.LICENSE.txt b/Workers/chunk-U6MIZ4IC.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-U6MIZ4IC.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-U6VP4ZRF.js b/Workers/chunk-U6VP4ZRF.js new file mode 100644 index 0000000..9eeee7f --- /dev/null +++ b/Workers/chunk-U6VP4ZRF.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-U6VP4ZRF.js.LICENSE.txt */ +import{a as O}from"./chunk-LYPPBP4Q.js";import{c as I,d as V}from"./chunk-S7TTFAYA.js";import{a as W,b as v}from"./chunk-PYVDHCDQ.js";import{a as R}from"./chunk-JMWWNZHX.js";import{a as k}from"./chunk-4KGDZUZQ.js";import{e as N}from"./chunk-F3TINEFX.js";var z=Math.cos,Z=Math.sin,D=Math.sqrt,L={computePosition:function(t,n,a,r,o,s,e){let i=n.radiiSquared,g=t.nwCorner,h=t.boundingRectangle,l=g.latitude-t.granYCos*r+o*t.granXSin,u=z(l),c=Z(l),C=i.z*c,S=g.longitude+r*t.granYSin+o*t.granXCos,w=u*z(S),m=u*Z(S),d=i.x*w,R=i.y*m,Y=D(d*w+R*m+C*c);if(s.x=d/Y,s.y=R/Y,s.z=C/Y,a){let n=t.stNwCorner;N(n)?(l=n.latitude-t.stGranYCos*r+o*t.stGranXSin,S=n.longitude+r*t.stGranYSin+o*t.stGranXCos,e.x=(S-t.stWest)*t.lonScalar,e.y=(l-t.stSouth)*t.latScalar):(e.x=(S-h.west)*t.lonScalar,e.y=(l-h.south)*t.latScalar)}}},A=new V,g=new W,F=new v,b=new W,q=new O;function B(t,n,a,r,o,s,e){let i=Math.cos(n),h=r*i,l=a*i,u=Math.sin(n),c=r*u,C=a*u;g=q.project(t,g),g=W.subtract(g,b,g);let S=V.fromRotation(n,A);g=V.multiplyByVector(S,g,g),g=W.add(g,b,g),s-=1,e-=1;let w=(t=q.unproject(g,t)).latitude,m=w+s*C,d=w-h*e,R=w-h*e+s*C,Y=Math.max(w,m,d,R),X=Math.min(w,m,d,R),p=t.longitude,O=p+s*l,I=p+e*c,f=p+e*c+s*l;return{north:Y,south:X,east:Math.max(p,O,I,f),west:Math.min(p,O,I,f),granYCos:h,granYSin:c,granXCos:l,granXSin:C,nwCorner:t}}L.computeOptions=function(t,n,a,r,o,s,e){let i=t.east,g=t.west,h=t.north,l=t.south,u=!1,c=!1;h===R.PI_OVER_TWO&&(u=!0),l===-R.PI_OVER_TWO&&(c=!0);let C,S=h-l;C=g>i?R.TWO_PI-g+i:i-g;let w=Math.ceil(C/n)+1,m=Math.ceil(S/n)+1,d=C/(w-1),Y=S/(m-1),X=I.northwest(t,s),p=I.center(t,F);(0!==a||0!==r)&&(p.longitudeR.PI_OVER_TWO||l<-R.PI_OVER_TWO||l>R.PI_OVER_TWO)throw new k("Rotated rectangle is invalid. It crosses over either the north or south pole.");_.granYCos=t.granYCos,_.granYSin=t.granYSin,_.granXCos=t.granXCos,_.granXSin=t.granXSin,f.north=h,f.south=l,f.east=i,f.west=g}if(0!==r){a-=r;let t=I.northwest(f,e),n=B(t,a,d,Y,p,w,m);_.stGranYCos=n.granYCos,_.stGranXCos=n.granXCos,_.stGranYSin=n.granYSin,_.stGranXSin=n.granXSin,_.stNwCorner=t,_.stWest=n.west,_.stSouth=n.south}return _};var nt=L;export{nt as a}; \ No newline at end of file diff --git a/Workers/chunk-U6VP4ZRF.js.LICENSE.txt b/Workers/chunk-U6VP4ZRF.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-U6VP4ZRF.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-UHM4ND4S.js b/Workers/chunk-UHM4ND4S.js new file mode 100644 index 0000000..9ca07ef --- /dev/null +++ b/Workers/chunk-UHM4ND4S.js @@ -0,0 +1,2 @@ +/*! For license information please see chunk-UHM4ND4S.js.LICENSE.txt */ +import{a as wt}from"./chunk-4VIV3K4J.js";import{a as k}from"./chunk-GWMEMIDW.js";import{a as kt}from"./chunk-SPMRTIBU.js";import{a as Ct}from"./chunk-U6MIZ4IC.js";import{b as dt,c as _t,d as R}from"./chunk-3G4OCZJT.js";import{d as ht}from"./chunk-LYPPBP4Q.js";import{a as N}from"./chunk-TLYHKSDJ.js";import{a as s,c as pt,d as ot}from"./chunk-PYVDHCDQ.js";import{a as M}from"./chunk-JMWWNZHX.js";import{a as p}from"./chunk-Z3SYNMQT.js";import{a as z}from"./chunk-4KGDZUZQ.js";import{e as E}from"./chunk-F3TINEFX.js";var yt=new s,vt=new s,Et=new s,Mt=new s,Nt=new s,Rt=new s(1,1,1),Pt=Math.cos,At=Math.sin;function O(t){t=p(t,p.EMPTY_OBJECT);let e=p(t.radii,Rt),i=p(t.innerRadii,e),n=p(t.minimumClock,0),a=p(t.maximumClock,M.TWO_PI),r=p(t.minimumCone,0),o=p(t.maximumCone,M.PI),m=Math.round(p(t.stackPartitions,64)),c=Math.round(p(t.slicePartitions,64)),u=p(t.vertexFormat,k.DEFAULT);if(c<3)throw new z("options.slicePartitions cannot be less than three.");if(m<3)throw new z("options.stackPartitions cannot be less than three.");this._radii=s.clone(e),this._innerRadii=s.clone(i),this._minimumClock=n,this._maximumClock=a,this._minimumCone=r,this._maximumCone=o,this._stackPartitions=m,this._slicePartitions=c,this._vertexFormat=k.clone(u),this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidGeometry"}O.packedLength=2*s.packedLength+k.packedLength+7,O.pack=function(t,e,i){if(!E(t))throw new z("value is required");if(!E(e))throw new z("array is required");return i=p(i,0),s.pack(t._radii,e,i),i+=s.packedLength,s.pack(t._innerRadii,e,i),i+=s.packedLength,k.pack(t._vertexFormat,e,i),i+=k.packedLength,e[i++]=t._minimumClock,e[i++]=t._maximumClock,e[i++]=t._minimumCone,e[i++]=t._maximumCone,e[i++]=t._stackPartitions,e[i++]=t._slicePartitions,e[i]=p(t._offsetAttribute,-1),e};var mt,bt=new s,xt=new s,Ot=new k,y={radii:bt,innerRadii:xt,vertexFormat:Ot,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};O.unpack=function(t,e,i){if(!E(t))throw new z("array is required");e=p(e,0);let n=s.unpack(t,e,bt);e+=s.packedLength;let a=s.unpack(t,e,xt);e+=s.packedLength;let r=k.unpack(t,e,Ot);e+=k.packedLength;let o=t[e++],m=t[e++],c=t[e++],u=t[e++],l=t[e++],f=t[e++],h=t[e];return E(i)?(i._radii=s.clone(n,i._radii),i._innerRadii=s.clone(a,i._innerRadii),i._vertexFormat=k.clone(r,i._vertexFormat),i._minimumClock=o,i._maximumClock=m,i._minimumCone=c,i._maximumCone=u,i._stackPartitions=l,i._slicePartitions=f,i._offsetAttribute=-1===h?void 0:h,i):(y.minimumClock=o,y.maximumClock=m,y.minimumCone=c,y.maximumCone=u,y.stackPartitions=l,y.slicePartitions=f,y.offsetAttribute=-1===h?void 0:h,new O(y))},O.createGeometry=function(t){let e=t._radii;if(e.x<=0||e.y<=0||e.z<=0)return;let i=t._innerRadii;if(i.x<=0||i.y<=0||i.z<=0)return;let n=t._minimumClock,a=t._maximumClock,r=t._minimumCone,o=t._maximumCone,m=t._vertexFormat,c=t._slicePartitions+1,u=t._stackPartitions+1;c=Math.round(c*Math.abs(a-n)/M.TWO_PI),u=Math.round(u*Math.abs(o-r)/M.PI),c<2&&(c=2),u<2&&(u=2);let l,f,p=0,k=[r],h=[n];for(l=0;l0&&(A=!0,y+=c-1),o0&&l!==_-1&&0!==f&&f!==d-1&&(O[K]=!0),K++;for(p=0,l=1;l<_-2;l++)for(Y=l*d,Z=(l+1)*d,f=1;f=n&&l0&&(d=!0,c+=u),a0&&(h=!0,c+=u),az.EPSILON12);return h(i)?(i.x=o*S,i.y=c*v,i.z=u*_,i):new O(o*S,c*v,u*_)}var X=hn;function R(e,t,n){this.longitude=u(e,0),this.latitude=u(t,0),this.height=u(n,0)}R.fromRadians=function(e,t,n,r){return c.typeOf.number("longitude",e),c.typeOf.number("latitude",t),n=u(n,0),h(r)?(r.longitude=e,r.latitude=t,r.height=n,r):new R(e,t,n)},R.fromDegrees=function(e,t,n,r){return c.typeOf.number("longitude",e),c.typeOf.number("latitude",t),e=z.toRadians(e),t=z.toRadians(t),R.fromRadians(e,t,n,r)};var mn=new O,bn=new O,un=new O,wn=new O(1/6378137,1/6378137,1/6356752.314245179),jn=new O(1/40680631590769,1/40680631590769,1/40408299984661.445),zn=z.EPSILON1;R.fromCartesian=function(e,t,n){let r=h(t)?t.oneOverRadii:wn,a=h(t)?t.oneOverRadiiSquared:jn,i=h(t)?t._centerToleranceSquared:zn,o=X(e,r,a,i,bn);if(!h(o))return;let c=O.multiplyComponents(o,a,mn);c=O.normalize(c,c);let u=O.subtract(e,o,un),f=Math.atan2(c.y,c.x),l=Math.asin(c.z),s=z.sign(O.dot(u,e))*O.magnitude(u);return h(n)?(n.longitude=f,n.latitude=l,n.height=s,n):new R(f,l,s)},R.toCartesian=function(e,t,n){return c.defined("cartographic",e),O.fromRadians(e.longitude,e.latitude,e.height,t,n)},R.clone=function(e,t){if(h(e))return h(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new R(e.longitude,e.latitude,e.height)},R.equals=function(e,t){return e===t||h(e)&&h(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},R.equalsEpsilon=function(e,t,n){return n=u(n,0),e===t||h(e)&&h(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n},R.ZERO=Object.freeze(new R(0,0,0)),R.prototype.clone=function(e){return R.clone(this,e)},R.prototype.equals=function(e){return R.equals(this,e)},R.prototype.equalsEpsilon=function(e,t){return R.equalsEpsilon(this,e,t)},R.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var on=R;function tn(e,t,n,r){t=u(t,0),n=u(n,0),r=u(r,0),c.typeOf.number.greaterThanOrEquals("x",t,0),c.typeOf.number.greaterThanOrEquals("y",n,0),c.typeOf.number.greaterThanOrEquals("z",r,0),e._radii=new O(t,n,r),e._radiiSquared=new O(t*t,n*n,r*r),e._radiiToTheFourth=new O(t*t*t*t,n*n*n*n,r*r*r*r),e._oneOverRadii=new O(0===t?0:1/t,0===n?0:1/n,0===r?0:1/r),e._oneOverRadiiSquared=new O(0===t?0:1/(t*t),0===n?0:1/(n*n),0===r?0:1/(r*r)),e._minimumRadius=Math.min(t,n,r),e._maximumRadius=Math.max(t,n,r),e._centerToleranceSquared=z.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function w(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,tn(this,e,t,n)}Object.defineProperties(w.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),w.clone=function(e,t){if(!h(e))return;let n=e._radii;return h(t)?(O.clone(n,t._radii),O.clone(e._radiiSquared,t._radiiSquared),O.clone(e._radiiToTheFourth,t._radiiToTheFourth),O.clone(e._oneOverRadii,t._oneOverRadii),O.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new w(n.x,n.y,n.z)},w.fromCartesian3=function(e,t){return h(t)||(t=new w),h(e)&&tn(t,e.x,e.y,e.z),t},w.WGS84=Object.freeze(new w(6378137,6378137,6356752.314245179)),w.UNIT_SPHERE=Object.freeze(new w(1,1,1)),w.MOON=Object.freeze(new w(z.LUNAR_RADIUS,z.LUNAR_RADIUS,z.LUNAR_RADIUS)),w.prototype.clone=function(e){return w.clone(this,e)},w.packedLength=O.packedLength,w.pack=function(e,t,n){return c.typeOf.object("value",e),c.defined("array",t),n=u(n,0),O.pack(e._radii,t,n),t},w.unpack=function(e,t,n){c.defined("array",e),t=u(t,0);let r=O.unpack(e,t);return w.fromCartesian3(r,n)},w.prototype.geocentricSurfaceNormal=O.normalize,w.prototype.geodeticSurfaceNormalCartographic=function(e,t){c.typeOf.object("cartographic",e);let n=e.longitude,r=e.latitude,a=Math.cos(r),i=a*Math.cos(n),o=a*Math.sin(n),u=Math.sin(r);return h(t)||(t=new O),t.x=i,t.y=o,t.z=u,O.normalize(t,t)},w.prototype.geodeticSurfaceNormal=function(e,t){if(!O.equalsEpsilon(e,O.ZERO,z.EPSILON14))return h(t)||(t=new O),t=O.multiplyComponents(e,this._oneOverRadiiSquared,t),O.normalize(t,t)};var Sn=new O,Mn=new O;w.prototype.cartographicToCartesian=function(e,t){let n=Sn,r=Mn;this.geodeticSurfaceNormalCartographic(e,n),O.multiplyComponents(this._radiiSquared,n,r);let a=Math.sqrt(O.dot(n,r));return O.divideByScalar(r,a,r),O.multiplyByScalar(n,e.height,n),h(t)||(t=new O),O.add(r,n,t)},w.prototype.cartographicArrayToCartesianArray=function(e,t){c.defined("cartographics",e);let n=e.length;h(t)?t.length=n:t=new Array(n);for(let r=0;r=this._radii.z-t))return n};var Tn=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],gn=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function en(e,t,n){c.typeOf.number("a",e),c.typeOf.number("b",t),c.typeOf.func("func",n);let r=.5*(t+e),a=.5*(t-e),i=0;for(let e=0;e<5;e++){let t=a*Tn[e];i+=gn[e]*(n(r+t)+n(r-t))}return i*=a,i}w.prototype.surfaceArea=function(e){c.typeOf.object("rectangle",e);let t=e.west,n=e.east,r=e.south,a=e.north;for(;nr&&(a=t,r=n)}let i=1,o=0,c=V[a],u=H[a];if(Math.abs(e[p.getElementIndex(u,c)])>n){let t,n=(e[p.getElementIndex(u,u)]-e[p.getElementIndex(c,c)])/2/e[p.getElementIndex(u,c)];t=n<0?-1/(-n+Math.sqrt(1+n*n)):1/(n+Math.sqrt(1+n*n)),i=1/Math.sqrt(1+t*t),o=t*i}return(t=p.clone(p.IDENTITY,t))[p.getElementIndex(c,c)]=t[p.getElementIndex(u,u)]=i,t[p.getElementIndex(u,c)]=o,t[p.getElementIndex(c,u)]=-o,t}var Y=new p,fn=new p;p.computeEigenDecomposition=function(e,t){c.typeOf.object("matrix",e);let n=z.EPSILON20,r=0,a=0;h(t)||(t={});let i=t.unitary=p.clone(p.IDENTITY,t.unitary),o=t.diagonal=p.clone(e,t.diagonal),u=n*Nn(o);for(;a<10&&An(o)>u;)Ln(o,Y),p.transpose(Y,fn),p.multiply(o,Y,o),p.multiply(fn,o,o),p.multiply(i,Y,i),++r>2&&(++a,r=0);return t},p.abs=function(e,t){return c.typeOf.object("matrix",e),c.typeOf.object("result",t),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},p.determinant=function(e){c.typeOf.object("matrix",e);let t=e[0],n=e[3],r=e[6],a=e[1],i=e[4],o=e[7],u=e[2],f=e[5],l=e[8];return t*(i*l-f*o)+a*(f*r-n*l)+u*(n*o-i*r)},p.inverse=function(e,t){c.typeOf.object("matrix",e),c.typeOf.object("result",t);let n=e[0],a=e[1],i=e[2],o=e[3],u=e[4],f=e[5],l=e[6],s=e[7],h=e[8],y=p.determinant(e);if(Math.abs(y)<=z.EPSILON15)throw new r("matrix is not invertible");t[0]=u*h-s*f,t[1]=s*i-a*h,t[2]=a*f-u*i,t[3]=l*f-o*h,t[4]=n*h-l*i,t[5]=o*i-n*f,t[6]=o*s-l*u,t[7]=l*a-n*s,t[8]=n*u-o*a;let d=1/y;return p.multiplyByScalar(t,d,t)};var kn=new p;p.inverseTranspose=function(e,t){return c.typeOf.object("matrix",e),c.typeOf.object("result",t),p.inverse(p.transpose(e,kn),t)},p.equals=function(e,t){return e===t||h(e)&&h(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]},p.equalsEpsilon=function(e,t,n){return n=u(n,0),e===t||h(e)&&h(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},p.IDENTITY=Object.freeze(new p(1,0,0,0,1,0,0,0,1)),p.ZERO=Object.freeze(new p(0,0,0,0,0,0,0,0,0)),p.COLUMN0ROW0=0,p.COLUMN0ROW1=1,p.COLUMN0ROW2=2,p.COLUMN1ROW0=3,p.COLUMN1ROW1=4,p.COLUMN1ROW2=5,p.COLUMN2ROW0=6,p.COLUMN2ROW1=7,p.COLUMN2ROW2=8,Object.defineProperties(p.prototype,{length:{get:function(){return p.packedLength}}}),p.prototype.clone=function(e){return p.clone(this,e)},p.prototype.equals=function(e){return p.equals(this,e)},p.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]},p.prototype.equalsEpsilon=function(e,t){return p.equalsEpsilon(this,e,t)},p.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`};var uo=p;export{O as a,on as b,fo as c,uo as d}; \ No newline at end of file diff --git a/Workers/chunk-V624RX7A.js.LICENSE.txt b/Workers/chunk-V624RX7A.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-V624RX7A.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-S2J5SDV4.js b/Workers/chunk-VJWVYKOS.js similarity index 74% rename from Workers/chunk-S2J5SDV4.js rename to Workers/chunk-VJWVYKOS.js index f9a3805..1d28e1c 100644 --- a/Workers/chunk-S2J5SDV4.js +++ b/Workers/chunk-VJWVYKOS.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-S2J5SDV4.js.LICENSE.txt */ -import{a as tt}from"./chunk-KW7R7J2E.js";import{a as At}from"./chunk-C4L7HN6T.js";import{a as yt}from"./chunk-IW442OVT.js";import{a as G}from"./chunk-2DNLGXTL.js";import{a as z}from"./chunk-ZLPZ2L4F.js";import{a as at}from"./chunk-EQ7PMEBC.js";import{a as ht}from"./chunk-FDDSRMXI.js";import{b as mt,c as st,d as F}from"./chunk-YYYI3I6L.js";import{a as dt,d as it,f as rt}from"./chunk-YIFABOF6.js";import{c as bt,d as Q}from"./chunk-KDW4RGIR.js";import{a as S}from"./chunk-VNDUYYBJ.js";import{a,b as _t,c as v,d as R}from"./chunk-V624RX7A.js";import{a as I}from"./chunk-VZ2RFJ3P.js";import{a as T}from"./chunk-RKPKWH3Z.js";import{a as nt,b as H}from"./chunk-BIYNNQRQ.js";import{e as K}from"./chunk-ZLUSVROX.js";var et=new a,pt=new a,xt=new a,wt=new a,w=new Q,Mt=new R,Vt=new R,gt=new rt,Tt=new a,Nt=new a,Et=new a,lt=new _t,Pt=new a,St=new Q,Ft=new Q;function Ot(t,e,i){let o=e.vertexFormat,r=e.center,n=e.semiMajorAxis,s=e.semiMinorAxis,l=e.ellipsoid,u=e.stRotation,m=i?t.length/3*2:t.length/3,c=e.shadowVolume,p=o.st?new Float32Array(2*m):void 0,f=o.normal?new Float32Array(3*m):void 0,h=o.tangent?new Float32Array(3*m):void 0,d=o.bitangent?new Float32Array(3*m):void 0,y=c?new Float32Array(3*m):void 0,A=0,x=Tt,g=Nt,_=Et,T=new dt(l),b=T.project(l.cartesianToCartographic(r,lt),Pt),I=l.scaleToGeodeticSurface(r,et);l.geodeticSurfaceNormal(I,I);let v=Mt,N=Vt;if(0!==u){let t=rt.fromAxisAngle(I,u,gt);v=R.fromQuaternion(t,v),t=rt.fromAxisAngle(I,-u,gt),N=R.fromQuaternion(t,N)}else v=R.clone(R.IDENTITY,v),N=R.clone(R.IDENTITY,N);let M=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,St),E=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ft),P=t.length,j=i?P:0,O=j/3*2;for(let e=0;e1;--r){for(a[s++]=e++,a[s++]=e,a[s++]=o,i=2*r,n=0;nI.PI&&(c.north=c.north>0?I.PI_OVER_TWO-I.EPSILON7:c.north,c.south=c.south<0?I.EPSILON7-I.PI_OVER_TWO:c.south,c.east=I.PI,c.west=-I.PI),c}function U(t){let e=(t=T(t,T.EMPTY_OBJECT)).center,i=T(t.ellipsoid,v.WGS84),o=t.semiMajorAxis,r=t.semiMinorAxis,n=T(t.granularity,I.RADIANS_PER_DEGREE),s=T(t.vertexFormat,z.DEFAULT);if(H.defined("options.center",e),H.typeOf.number("options.semiMajorAxis",o),H.typeOf.number("options.semiMinorAxis",r),o1;--r){for(a[s++]=e++,a[s++]=e,a[s++]=o,i=2*r,n=0;nI.PI&&(c.north=c.north>0?I.PI_OVER_TWO-I.EPSILON7:c.north,c.south=c.south<0?I.EPSILON7-I.PI_OVER_TWO:c.south,c.east=I.PI,c.west=-I.PI),c}function U(t){let e=(t=T(t,T.EMPTY_OBJECT)).center,i=T(t.ellipsoid,v.WGS84),o=t.semiMajorAxis,r=t.semiMinorAxis,n=T(t.granularity,I.RADIANS_PER_DEGREE),s=T(t.vertexFormat,z.DEFAULT);if(H.defined("options.center",e),H.typeOf.number("options.semiMajorAxis",o),H.typeOf.number("options.semiMinorAxis",r),o{!function(r){var n="object"==typeof e&&e&&!e.nodeType&&e,o="object"==typeof t&&t&&!t.nodeType&&t,i="object"==typeof global&&global;(i.global===i||i.window===i||i.self===i)&&(r=i);var s,a,u=2147483647,l=36,c=26,f=38,d=700,p=/^xn--/,h=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=l-1,w=Math.floor,v=String.fromCharCode;function b(e){throw new RangeError(g[e])}function _(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function x(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+_((e=e.replace(m,".")).split("."),t).join(".")}function O(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=v((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+v(e)})).join("")}function S(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:l}function A(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function C(e,t,r){var n=0;for(e=r?w(e/d):e>>1,e+=w(e/t);e>y*c>>1;n+=l)e=w(e/y);return w(n+(y+1)*e/(e+f))}function R(e){var t,r,n,o,i,s,a,f,d,p,h=[],m=e.length,g=0,y=128,v=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&b("not-basic"),h.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=m&&b("invalid-input"),((f=S(e.charCodeAt(o++)))>=l||f>w((u-g)/s))&&b("overflow"),g+=f*s,!(f<(d=a<=v?1:a>=v+c?c:a-v));a+=l)s>w(u/(p=l-d))&&b("overflow"),s*=p;v=C(g-i,t=h.length+1,0==i),w(g/t)>u-y&&b("overflow"),y+=w(g/t),g%=t,h.splice(g++,0,y)}return E(h)}function q(e){var t,r,n,o,i,s,a,f,d,p,h,m,g,y,_,x=[];for(m=(e=O(e)).length,t=128,r=0,i=72,s=0;s=t&&hw((u-r)/(g=n+1))&&b("overflow"),r+=(a-t)*g,t=a,s=0;su&&b("overflow"),h==t){for(f=r,d=l;!(f<(p=d<=i?1:d>=i+c?c:d-i));d+=l)_=f-p,y=l-p,x.push(v(A(p+_%y,0))),f=w(_/y);x.push(v(A(f,0))),i=C(r,g,n==o),r=0,++n}++r,++t}return x.join("")}if(s={version:"1.3.2",ucs2:{decode:O,encode:E},decode:R,encode:q,toASCII:function(e){return x(e,(function(e){return h.test(e)?"xn--"+q(e):e}))},toUnicode:function(e){return x(e,(function(e){return p.test(e)?R(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return s}));else if(n&&o)if(t.exports==n)o.exports=s;else for(a in s)s.hasOwnProperty(a)&&(n[a]=s[a]);else r.punycode=s}(e)})),sr=St(((e,t)=>{!function(e,r){"use strict";"object"==typeof t&&t.exports?t.exports=r():"function"==typeof define&&define.amd?define(r):e.IPv6=r(e)}(e,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r=e.toLowerCase().split(":"),n=r.length,o=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[n-1]&&""===r[n-2]&&r.pop(),-1!==r[(n=r.length)-1].indexOf(".")&&(o=7),t=0;t1;a++)i.splice(0,1);r[s]=i.join("")}var u=-1,l=0,c=0,f=-1,d=!1;for(s=0;sl&&(u=f,l=c)):"0"===r[s]&&(d=!0,f=s,c=1);c>l&&(u=f,l=c),l>1&&r.splice(u,l,""),n=r.length;var p="";for(""===r[0]&&(p=":"),s=0;s{!function(e,r){"use strict";"object"==typeof t&&t.exports?t.exports=r():"function"==typeof define&&define.amd?define(r):e.SecondLevelDomains=r(e)}(e,(function(e){"use strict";var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return!o||o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))})),$e=St(((e,t)=>{!function(e,r){"use strict";"object"==typeof t&&t.exports?t.exports=r(or(),sr(),cr()):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],r):e.URI=r(e.punycode,e.IPv6,e.SecondLevelDomains,e)}(e,(function(e,t,r,n){"use strict";var o=n&&n.URI;function i(e,t){var r=arguments.length>=1;if(!(this instanceof i))return r?arguments.length>=2?new i(e,t):new i(e):new i;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e=typeof location<"u"?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.11";var s=i.prototype,a=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function c(e){return"Array"===l(e)}function f(e,t){var r,n,o={};if("RegExp"===l(t))o=null;else if(c(t))for(r=0,n=t.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var r=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch{return e}};var y,w={encode:"encode",decode:"decode"},v=function(e,t){return function(r){try{return i[t](r+"").replace(i.characters[e][t].expression,(function(r){return i.characters[e][t].map[r]}))}catch{return r}}};for(y in w)i[y+"PathSegment"]=v("pathname",w[y]),i[y+"UrnPathSegment"]=v("urnpath",w[y]);var b=function(e,t,r){return function(n){var o;o=r?function(e){return i[t](i[r](e))}:i[t];for(var s=(n+"").split(e),a=0,u=s.length;a-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),u=e.indexOf(":",s+1);-1!==u&&(-1===a||u-1?o:e.length-1);return s>-1&&(-1===o||s-1?p.slice(0,h)+p.slice(h).replace(s,""):p.replace(s,"")).length<=l[0].length||r.ignore&&r.ignore.test(p))){var y=t(p,c,d=c+p.length,e);if(void 0===y){n.lastIndex=d;continue}y=String(y),e=e.slice(0,c)+y+e.slice(d),n.lastIndex=c+y.length}}return n.lastIndex=0,e},i.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=d(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(function(e){return/^[0-9]+$/.test(e)}(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},s.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new i(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=_("protocol"),s.username=_("username"),s.password=_("password"),s.hostname=_("hostname"),s.port=_("port"),s.query=x("query","?"),s.fragment=x("fragment","#"),s.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},s.path=s.pathname,s.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var n=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[i.getDomAttribute(e)]||"",o=!1),!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var s=n?e._parts:e;for(r in s)"query"!==r&&a.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!t),this},s.is=function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=!1,l=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),a=(s=!(t=n||o))&&r&&r.has(this._parts.hostname),u=s&&i.idn_expression.test(this._parts.hostname),l=s&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var O=s.protocol,E=s.port,S=s.hostname;s.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return O.call(this,e,t)},s.scheme=s.protocol,s.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),E.call(this,e,t))},s.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return S.call(this,e,t)},s.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},s.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=i.buildUserinfo(this._parts);return r&&r.substring(0,r.length-1)}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},s.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},s.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),s=new RegExp("^"+u(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},s.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},s.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},s.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),a=new RegExp("^"+u(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},s.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?i.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var s=new RegExp(u(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),o?this.normalizePath(t):this.build(!t),this},s.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(r=o.substring(s+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,l=this.suffix();if(l)a=e?new RegExp(u(l)+"$"):new RegExp(u("."+l)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return a&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},s.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),s=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(c(t)){s=[];for(var a=0,u=t.length;aa.x&&f.clone(n,a),cu.y&&f.clone(n,u),dl.z&&f.clone(n,l)}let p=f.magnitudeSquared(f.subtract(a,o,ce)),h=f.magnitudeSquared(f.subtract(u,i,ce)),m=f.magnitudeSquared(f.subtract(l,s,ce)),g=o,y=a,w=p;h>w&&(w=h,g=i,y=u),m>w&&(w=m,g=s,y=l);let v=gn;v.x=.5*(g.x+y.x),v.y=.5*(g.y+y.y),v.z=.5*(g.z+y.z);let b=f.magnitudeSquared(f.subtract(y,v,ce)),_=Math.sqrt(b),x=wn;x.x=o.x,x.y=i.y,x.z=s.z;let O=bn;O.x=a.x,O.y=u.y,O.z=l.z;let E=f.midpoint(x,O,_n),S=0;for(r=0;rS&&(S=t);let o=f.magnitudeSquared(f.subtract(n,v,ce));if(o>b){let e=Math.sqrt(o);_=.5*(_+e),b=_*_;let t=e-_;v.x=(_*v.x+t*n.x)/e,v.y=(_*v.y+t*n.y)/e,v.z=(_*v.z+t*n.z)/e}}return _l.x&&f.clone(o,l),nc.y&&f.clone(o,c),dp.z&&f.clone(o,p)}let m=f.magnitudeSquared(f.subtract(l,s,ce)),g=f.magnitudeSquared(f.subtract(c,a,ce)),y=f.magnitudeSquared(f.subtract(p,u,ce)),v=s,b=l,_=m;g>_&&(_=g,v=a,b=c),y>_&&(_=y,v=u,b=p);let x=gn;x.x=.5*(v.x+b.x),x.y=.5*(v.y+b.y),x.z=.5*(v.z+b.z);let E=f.magnitudeSquared(f.subtract(b,x,ce)),S=Math.sqrt(E),A=wn;A.x=s.x,A.y=a.y,A.z=u.z;let C=bn;C.x=l.x,C.y=c.y,C.z=p.z;let R=f.midpoint(A,C,_n),q=0;for(i=0;iq&&(q=r);let n=f.magnitudeSquared(f.subtract(o,x,ce));if(n>E){let e=Math.sqrt(n);S=.5*(S+e),E=S*S;let t=e-S;x.x=(S*x.x+t*o.x)/e,x.y=(S*x.y+t*o.y)/e,x.z=(S*x.z+t*o.z)/e}}return Su.x&&f.clone(n,u),dl.y&&f.clone(n,l),pc.z&&f.clone(n,c)}let h=f.magnitudeSquared(f.subtract(u,i,ce)),m=f.magnitudeSquared(f.subtract(l,s,ce)),g=f.magnitudeSquared(f.subtract(c,a,ce)),y=i,w=u,v=h;m>v&&(v=m,y=s,w=l),g>v&&(v=g,y=a,w=c);let b=gn;b.x=.5*(y.x+w.x),b.y=.5*(y.y+w.y),b.z=.5*(y.z+w.z);let _=f.magnitudeSquared(f.subtract(w,b,ce)),x=Math.sqrt(_),O=wn;O.x=i.x,O.y=s.y,O.z=a.z;let E=bn;E.x=u.x,E.y=l.y,E.z=c.z;let S=f.midpoint(O,E,_n),A=0;for(o=0;oA&&(A=r);let i=f.magnitudeSquared(f.subtract(n,b,ce));if(i>_){let e=Math.sqrt(i);x=.5*(x+e),_=x*x;let t=e-x;b.x=(x*b.x+t*n.x)/e,b.y=(x*b.y+t*n.y)/e,b.z=(x*b.z+t*n.z)/e}}return x=u+s)return e.clone(r),r;if(s>=u+o)return t.clone(r),r;let l=.5*(o+u+s),c=f.multiplyByScalar(a,(-o+l)/u,Ro);return f.add(c,n,c),f.clone(c,r.center),r.radius=l,r};var Po=new f;U.expand=function(e,t,r){w.typeOf.object("sphere",e),w.typeOf.object("point",t),r=U.clone(e,r);let n=f.magnitude(f.subtract(t,r.center,Po));return n>r.radius&&(r.radius=n),r},U.intersectPlane=function(e,t){w.typeOf.object("sphere",e),w.typeOf.object("plane",t);let r=e.center,n=e.radius,o=t.normal,i=f.dot(o,r)+t.distance;return i<-n?Et.OUTSIDE:i0))return n;s=n-1}return~(s+1)}var Qe=Mo;function jo(e,t,r,n,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=r,this.yPoleOffset=n,this.ut1MinusUtc=o}var ut=jo;function No(e,t,r,n,o,i,s,a){this.year=e,this.month=t,this.day=r,this.hour=n,this.minute=o,this.second=i,this.millisecond=s,this.isLeapSecond=a}var Ct=No;function Bo(e){if(null===e||isNaN(e))throw new R("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}var Sn=Bo;function Lo(e,t){this.julianDate=e,this.offset=t}var Z=Lo,Qo={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5},K=Object.freeze(Qo),$o={UTC:0,TAI:1},j=Object.freeze($o),rr=new Ct,At=[31,28,31,30,31,30,31,31,30,31,30,31],Rt=29;function xn(e,t){return C.compare(e.julianDate,t.julianDate)}var Ke=new Z;function Tt(e){Ke.julianDate=e;let t=C.leapSeconds,r=Qe(t,Ke,xn);r<0&&(r=~r),r>=t.length&&(r=t.length-1);let n=t[r].offset;r>0&&C.secondsDifference(t[r].julianDate,e)>n&&(r--,n=t[r].offset),C.addSeconds(e,n,e)}function nr(e,t){Ke.julianDate=e;let r=C.leapSeconds,n=Qe(r,Ke,xn);if(n<0&&(n=~n),0===n)return C.addSeconds(e,-r[0].offset,t);if(n>=r.length)return C.addSeconds(e,-r[n-1].offset,t);let o=C.secondsDifference(r[n].julianDate,e);return 0===o?C.addSeconds(e,-r[n].offset,t):o<=1?void 0:C.addSeconds(e,-r[--n].offset,t)}function ke(e,t,r){let n=t/K.SECONDS_PER_DAY|0;return e+=n,(t-=K.SECONDS_PER_DAY*n)<0&&(e--,t+=K.SECONDS_PER_DAY),r.dayNumber=e,r.secondsOfDay=t,r}function vn(e,t,r,n,o,i,s){let a=(t-14)/12|0,u=e+4800+a,l=(1461*u/4|0)+(367*(t-2-12*a)/12|0)-(3*((u+100)/100|0)/4|0)+r-32075;(n-=12)<0&&(n+=24);let c=i+(n*K.SECONDS_PER_HOUR+o*K.SECONDS_PER_MINUTE+s*K.SECONDS_PER_MILLISECOND);return c>=43200&&(l-=1),[l,c]}var Wo=/^(\d{4})$/,Vo=/^(\d{4})-(\d{2})$/,Ho=/^(\d{4})-?(\d{3})$/,Yo=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,Zo=/^(\d{4})-?(\d{2})-?(\d{2})$/,On=/([Z+\-])?(\d{2})?:?(\d{2})?$/,Jo=/^(\d{2})(\.\d+)?/.source+On.source,Xo=/^(\d{2}):?(\d{2})(\.\d+)?/.source+On.source,Go=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+On.source,ve="Invalid ISO 8601 date.";function C(e,t,r){this.dayNumber=void 0,this.secondsOfDay=void 0,e=O(e,0),t=O(t,0),r=O(r,j.UTC);let n=0|e;ke(n,t+=(e-n)*K.SECONDS_PER_DAY,this),r===j.UTC&&Tt(this)}C.fromGregorianDate=function(e,t){if(!(e instanceof Ct))throw new R("date must be a valid GregorianDate.");let r=vn(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return d(t)?(ke(r[0],r[1],t),Tt(t),t):new C(r[0],r[1],j.UTC)},C.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new R("date must be a valid JavaScript Date.");let r=vn(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return d(t)?(ke(r[0],r[1],t),Tt(t),t):new C(r[0],r[1],j.UTC)},C.fromIso8601=function(e,t){if("string"!=typeof e)throw new R(ve);let r,n,o,i,s,a=(e=e.replace(",",".")).split("T"),u=1,l=1,c=0,f=0,p=0,h=0,m=a[0],g=a[1];if(!d(m))throw new R(ve);if(a=m.match(Zo),null!==a){if(i=m.split("-").length-1,i>0&&2!==i)throw new R(ve);r=+a[1],u=+a[2],l=+a[3]}else if(a=m.match(Vo),null!==a)r=+a[1],u=+a[2];else if(a=m.match(Wo),null!==a)r=+a[1];else{let e;if(a=m.match(Ho),null!==a){if(r=+a[1],e=+a[2],o=Sn(r),e<1||o&&e>366||!o&&e>365)throw new R(ve)}else{if(a=m.match(Yo),null===a)throw new R(ve);{r=+a[1];let t=+a[2],n=+a[3]||0;if(i=m.split("-").length-1,i>0&&(!d(a[3])&&1!==i||d(a[3])&&2!==i))throw new R(ve);e=7*t+n-new Date(Date.UTC(r,0,4)).getUTCDay()-3}}n=new Date(Date.UTC(r,0,1)),n.setUTCDate(e),u=n.getUTCMonth()+1,l=n.getUTCDate()}if(o=Sn(r),u<1||u>12||l<1||(2!==u||!o)&&l>At[u-1]||o&&2===u&&l>Rt)throw new R(ve);if(d(g)){if(a=g.match(Go),null!==a){if(i=g.split(":").length-1,i>0&&2!==i&&3!==i)throw new R(ve);c=+a[1],f=+a[2],p=+a[3],h=1e3*+(a[4]||0),s=5}else if(a=g.match(Xo),null!==a){if(i=g.split(":").length-1,i>2)throw new R(ve);c=+a[1],f=+a[2],p=60*+(a[3]||0),s=4}else{if(a=g.match(Jo),null===a)throw new R(ve);c=+a[1],f=60*+(a[2]||0),s=3}if(f>=60||p>=61||c>24||24===c&&(f>0||p>0||h>0))throw new R(ve);let e=a[s],t=+a[s+1],n=+(a[s+2]||0);switch(e){case"+":c-=t,f-=n;break;case"-":c+=t,f+=n;break;case"Z":break;default:f+=new Date(Date.UTC(r,u-1,l,c,f)).getTimezoneOffset()}}let y=60===p;for(y&&p--;f>=60;)f-=60,c++;for(;c>=24;)c-=24,l++;for(n=o&&2===u?Rt:At[u-1];l>n;)l-=n,u++,u>12&&(u-=12,r++),n=o&&2===u?Rt:At[u-1];for(;f<0;)f+=60,c--;for(;c<0;)c+=24,l--;for(;l<1;)u--,u<1&&(u+=12,r--),n=o&&2===u?Rt:At[u-1],l+=n;let w=vn(r,u,l,c,f,p,h);return d(t)?(ke(w[0],w[1],t),Tt(t)):t=new C(w[0],w[1],j.UTC),y&&C.addSeconds(t,1,t),t},C.now=function(e){return C.fromDate(new Date,e)};var Pt=new C(0,0,j.TAI);C.toGregorianDate=function(e,t){if(!d(e))throw new R("julianDate is required.");let r=!1,n=nr(e,Pt);d(n)||(C.addSeconds(e,-1,Pt),n=nr(Pt,Pt),r=!0);let o=n.dayNumber,i=n.secondsOfDay;i>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let u=4e3*(s+1)/1461001|0;s=s-(1461*u/4|0)+31|0;let l=80*s/2447|0,c=s-(2447*l/80|0)|0;s=l/11|0;let f=l+2-12*s|0,p=100*(a-49)+u+s|0,h=i/K.SECONDS_PER_HOUR|0,m=i-h*K.SECONDS_PER_HOUR,g=m/K.SECONDS_PER_MINUTE|0;m-=g*K.SECONDS_PER_MINUTE;let y=0|m,w=(m-y)/K.SECONDS_PER_MILLISECOND;return h+=12,h>23&&(h-=24),r&&(y+=1),d(t)?(t.year=p,t.month=f,t.day=c,t.hour=h,t.minute=g,t.second=y,t.millisecond=w,t.isLeapSecond=r,t):new Ct(p,f,c,h,g,y,w,r)},C.toDate=function(e){if(!d(e))throw new R("julianDate is required.");let t=C.toGregorianDate(e,rr),r=t.second;return t.isLeapSecond&&(r-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,r,t.millisecond))},C.toIso8601=function(e,t){if(!d(e))throw new R("julianDate is required.");let r,n=C.toGregorianDate(e,rr),o=n.year,i=n.month,s=n.day,a=n.hour,u=n.minute,l=n.second,c=n.millisecond;return 1e4===o&&1===i&&1===s&&0===a&&0===u&&0===l&&0===c&&(o=9999,i=12,s=31,a=24),d(t)||0===c?d(t)&&0!==t?(r=(.01*c).toFixed(t).replace(".","").slice(0,t),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${r}Z`):`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}Z`:(r=(.01*c).toString().replace(".",""),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${r}Z`)},C.clone=function(e,t){if(d(e))return d(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new C(e.dayNumber,e.secondsOfDay,j.TAI)},C.compare=function(e,t){if(!d(e))throw new R("left is required.");if(!d(t))throw new R("right is required.");let r=e.dayNumber-t.dayNumber;return 0!==r?r:e.secondsOfDay-t.secondsOfDay},C.equals=function(e,t){return e===t||d(e)&&d(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},C.equalsEpsilon=function(e,t,r){return r=O(r,0),e===t||d(e)&&d(t)&&Math.abs(C.secondsDifference(e,t))<=r},C.totalDays=function(e){if(!d(e))throw new R("julianDate is required.");return e.dayNumber+e.secondsOfDay/K.SECONDS_PER_DAY},C.secondsDifference=function(e,t){if(!d(e))throw new R("left is required.");if(!d(t))throw new R("right is required.");return(e.dayNumber-t.dayNumber)*K.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},C.daysDifference=function(e,t){if(!d(e))throw new R("left is required.");if(!d(t))throw new R("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/K.SECONDS_PER_DAY},C.computeTaiMinusUtc=function(e){Ke.julianDate=e;let t=C.leapSeconds,r=Qe(t,Ke,xn);return r<0&&(r=~r,--r,r<0&&(r=0)),t[r].offset},C.addSeconds=function(e,t,r){if(!d(e))throw new R("julianDate is required.");if(!d(t))throw new R("seconds is required.");if(!d(r))throw new R("result is required.");return ke(e.dayNumber,e.secondsOfDay+t,r)},C.addMinutes=function(e,t,r){if(!d(e))throw new R("julianDate is required.");if(!d(t))throw new R("minutes is required.");if(!d(r))throw new R("result is required.");let n=e.secondsOfDay+t*K.SECONDS_PER_MINUTE;return ke(e.dayNumber,n,r)},C.addHours=function(e,t,r){if(!d(e))throw new R("julianDate is required.");if(!d(t))throw new R("hours is required.");if(!d(r))throw new R("result is required.");let n=e.secondsOfDay+t*K.SECONDS_PER_HOUR;return ke(e.dayNumber,n,r)},C.addDays=function(e,t,r){if(!d(e))throw new R("julianDate is required.");if(!d(t))throw new R("days is required.");if(!d(r))throw new R("result is required.");return ke(e.dayNumber+t,e.secondsOfDay,r)},C.lessThan=function(e,t){return C.compare(e,t)<0},C.lessThanOrEquals=function(e,t){return C.compare(e,t)<=0},C.greaterThan=function(e,t){return C.compare(e,t)>0},C.greaterThanOrEquals=function(e,t){return C.compare(e,t)>=0},C.prototype.clone=function(e){return C.clone(this,e)},C.prototype.equals=function(e){return C.equals(this,e)},C.prototype.equalsEpsilon=function(e,t){return C.equalsEpsilon(this,e,t)},C.prototype.toString=function(){return C.toIso8601(this)},C.leapSeconds=[new Z(new C(2441317,43210,j.TAI),10),new Z(new C(2441499,43211,j.TAI),11),new Z(new C(2441683,43212,j.TAI),12),new Z(new C(2442048,43213,j.TAI),13),new Z(new C(2442413,43214,j.TAI),14),new Z(new C(2442778,43215,j.TAI),15),new Z(new C(2443144,43216,j.TAI),16),new Z(new C(2443509,43217,j.TAI),17),new Z(new C(2443874,43218,j.TAI),18),new Z(new C(2444239,43219,j.TAI),19),new Z(new C(2444786,43220,j.TAI),20),new Z(new C(2445151,43221,j.TAI),21),new Z(new C(2445516,43222,j.TAI),22),new Z(new C(2446247,43223,j.TAI),23),new Z(new C(2447161,43224,j.TAI),24),new Z(new C(2447892,43225,j.TAI),25),new Z(new C(2448257,43226,j.TAI),26),new Z(new C(2448804,43227,j.TAI),27),new Z(new C(2449169,43228,j.TAI),28),new Z(new C(2449534,43229,j.TAI),29),new Z(new C(2450083,43230,j.TAI),30),new Z(new C(2450630,43231,j.TAI),31),new Z(new C(2451179,43232,j.TAI),32),new Z(new C(2453736,43233,j.TAI),33),new Z(new C(2454832,43234,j.TAI),34),new Z(new C(2456109,43235,j.TAI),35),new Z(new C(2457204,43236,j.TAI),36),new Z(new C(2457754,43237,j.TAI),37)];var ue=C,zr=Ge($e(),1);function Ko(e){return(0===e.length||"/"!==e[e.length-1])&&(e=`${e}/`),e}var fr=Ko;function lr(e,t){if(null===e||"object"!=typeof e)return e;t=O(t,!1);let r=new e.constructor;for(let n in e)if(e.hasOwnProperty(n)){let o=e[n];t&&(o=lr(o,t)),r[n]=o}return r}var nt=lr;function ei(){let e,t,r=new Promise((function(r,n){e=r,t=n}));return{resolve:e,reject:t,promise:r}}var We=ei,dr=Ge($e(),1);function En(e,t){let r;return typeof document<"u"&&(r=document),En._implementation(e,t,r)}En._implementation=function(e,t,r){if(!d(e))throw new R("relative uri is required.");if(!d(t)){if(typeof r>"u")return e;t=O(r.baseURI,r.location.href)}let n=new dr.default(e);return""!==n.scheme()?n.toString():n.absoluteTo(t).toString()};var ft=En,pr=Ge($e(),1);function ti(e,t){if(!d(e))throw new R("uri is required.");let r="",n=e.lastIndexOf("/");return-1!==n&&(r=e.substring(0,n+1)),t&&(0!==(e=new pr.default(e)).query().length&&(r+=`?${e.query()}`),0!==e.fragment().length&&(r+=`#${e.fragment()}`)),r}var mr=ti,hr=Ge($e(),1);function ni(e){if(!d(e))throw new R("uri is required.");let t=new hr.default(e);t.normalize();let r=t.path(),n=r.lastIndexOf("/");return-1!==n&&(r=r.substr(n+1)),n=r.lastIndexOf("."),r=-1===n?"":r.substr(n+1),r}var yr=ni,gr={};function ri(e,t,r){d(t)||(t=e.width),d(r)||(r=e.height);let n=gr[t];d(n)||(n={},gr[t]=n);let o=n[r];if(!d(o)){let e=document.createElement("canvas");e.width=t,e.height=r,o=e.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",n[r]=o}return o.drawImage(e,0,0,t,r),o.getImageData(0,0,t,r).data}var Cn=ri,oi=/^blob:/i;function ii(e){return w.typeOf.string("uri",e),oi.test(e)}var Ce,zt=ii;function si(e){d(Ce)||(Ce=document.createElement("a")),Ce.href=window.location.href;let t=Ce.host,r=Ce.protocol;return Ce.href=e,Ce.href=Ce.href,r!==Ce.protocol||t!==Ce.host}var wr=si,ai=/^data:/i;function ci(e){return w.typeOf.string("uri",e),ai.test(e)}var qt=ci;function ui(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise(((e,r)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let n=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,n.removeChild(t),e()},t.onerror=function(e){r(e)},n.appendChild(t)}))}var br=ui;function fi(e){if(!d(e))throw new R("obj is required.");let t="";for(let r in e)if(e.hasOwnProperty(r)){let n=e[r],o=`${encodeURIComponent(r)}=`;if(Array.isArray(n))for(let e=0,r=n.length;e0){let e=n.substring(0,o),r=n.substring(o+2);t[e]=r}}return t}var Or=mi;function Er(e,t,r){this.statusCode=e,this.response=t,this.responseHeaders=r,"string"==typeof this.responseHeaders&&(this.responseHeaders=Or(this.responseHeaders))}Er.prototype.toString=function(){let e="Request has failed.";return d(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var lt=Er,Ft=Ge($e(),1);function dt(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function hi(e,t){return t-e}Object.defineProperties(dt.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),dt.prototype.addEventListener=function(e,t){w.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);let r=this;return function(){r.removeEventListener(e,t)}},dt.prototype.removeEventListener=function(e,t){w.typeOf.func("listener",e);let r=this._listeners,n=this._scopes,o=-1;for(let i=0;i0){for(o.sort(hi),e=0;e=0;--t)this.heapify(t)},Ve.prototype.insert=function(e){w.defined("element",e);let t,r=this._array,n=this._comparator,o=this._maximumLength,i=this._length++;for(io&&(t=r[o],this._length=o),t},Ve.prototype.pop=function(e){if(e=O(e,0),0===this._length)return;w.typeOf.number.lessThan("index",e,this._length);let t=this._array,r=t[e];return An(t,e,--this._length),this.heapify(e),t[this._length]=void 0,r};var Ar=Ve;function yi(e,t){return e.priority-t.priority}var H={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},rt=20,le=new Ar({comparator:yi});le.maximumLength=rt,le.reserve(rt);var Ae=[],Pe={},gi=typeof document<"u"?new Ft.default(document.location.href):new Ft.default,Mt=new Cr;function ee(){}function Rr(e){d(e.priorityFunction)&&(e.priority=e.priorityFunction())}function Pr(e){return e.state===te.UNISSUED&&(e.state=te.ISSUED,e.deferred=We()),e.deferred.promise}function wi(e){return function(t){if(e.state===te.CANCELLED)return;let r=e.deferred;--H.numberOfActiveRequests,--Pe[e.serverKey],Mt.raiseEvent(),e.state=te.RECEIVED,e.deferred=void 0,r.resolve(t)}}function bi(e){return function(t){e.state!==te.CANCELLED&&(++H.numberOfFailedRequests,--H.numberOfActiveRequests,--Pe[e.serverKey],Mt.raiseEvent(t),e.state=te.FAILED,e.deferred.reject(t))}}function Tr(e){let t=Pr(e);return e.state=te.ACTIVE,Ae.push(e),++H.numberOfActiveRequests,++H.numberOfActiveRequestsEver,++Pe[e.serverKey],e.requestFunction().then(wi(e)).catch(bi(e)),t}function He(e){let t=e.state===te.ACTIVE;if(e.state=te.CANCELLED,++H.numberOfCancelledRequests,d(e.deferred)){let t=e.deferred;e.deferred=void 0,t.reject()}t&&(--H.numberOfActiveRequests,--Pe[e.serverKey],++H.numberOfCancelledActiveRequests),d(e.cancelFunction)&&e.cancelFunction()}function _i(){ee.debugShowStatistics&&(0===H.numberOfActiveRequests&&H.lastNumberOfActiveRequests>0&&(H.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${H.numberOfAttemptedRequests}`),H.numberOfAttemptedRequests=0),H.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${H.numberOfCancelledRequests}`),H.numberOfCancelledRequests=0),H.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${H.numberOfCancelledActiveRequests}`),H.numberOfCancelledActiveRequests=0),H.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${H.numberOfFailedRequests}`),H.numberOfFailedRequests=0)),H.lastNumberOfActiveRequests=H.numberOfActiveRequests)}ee.maximumRequests=50,ee.maximumRequestsPerServer=6,ee.requestsByServer={"api.cesium.com:443":18,"assets.ion.cesium.com:443":18,"ibasemaps-api.arcgis.com:443":18,"tile.googleapis.com:443":18,"tile.openstreetmap.org:443":18},ee.throttleRequests=!0,ee.debugShowStatistics=!1,ee.requestCompletedEvent=Mt,Object.defineProperties(ee,{statistics:{get:function(){return H}},priorityHeapLength:{get:function(){return rt},set:function(e){if(ee;)He(le.pop());rt=e,le.maximumLength=e,le.reserve(e)}}}),ee.serverHasOpenSlots=function(e,t){t=O(t,1);let r=O(ee.requestsByServer[e],ee.maximumRequestsPerServer);return Pe[e]+t<=r},ee.heapHasOpenSlots=function(e){return le.length+e<=rt},ee.update=function(){let e,t,r=0,n=Ae.length;for(e=0;e0&&(Ae[e-r]=t):++r;Ae.length-=r;let o=le.internalArray,i=le.length;for(e=0;e0;)t=le.pop(),t.cancelled?He(t):!t.throttleByServer||ee.serverHasOpenSlots(t.serverKey)?(Tr(t),++a):He(t);_i()},ee.getServerKey=function(e){w.typeOf.string("url",e);let t=new Ft.default(e);""===t.scheme()&&(t=t.absoluteTo(gi),t.normalize());let r=t.authority();/:/.test(r)||(r=`${r}:${"https"===t.scheme()?"443":"80"}`);let n=Pe[r];return d(n)||(Pe[r]=0),r},ee.request=function(e){if(w.typeOf.object("request",e),w.typeOf.string("request.url",e.url),w.typeOf.func("request.requestFunction",e.requestFunction),qt(e.url)||zt(e.url))return Mt.raiseEvent(),e.state=te.RECEIVED,e.requestFunction();if(++H.numberOfAttemptedRequests,d(e.serverKey)||(e.serverKey=ee.getServerKey(e.url)),ee.throttleRequests&&e.throttleByServer&&!ee.serverHasOpenSlots(e.serverKey))return;if(!ee.throttleRequests||!e.throttle)return Tr(e);if(Ae.length>=ee.maximumRequests)return;Rr(e);let t=le.insert(e);if(d(t)){if(t===e)return;He(t)}return Pr(e)},ee.clearForSpecs=function(){for(;le.length>0;)He(le.pop());let e=Ae.length;for(let t=0;t0}},credits:{get:function(){return this._credits}}}),E.prototype.toString=function(){return this.getUrlComponent(!0,!0)},E.prototype.parseUrl=function(e,t,r,n){let o=new zr.default(e),i=xi(o.query());this._queryParameters=t?Bt(i,this.queryParameters,r):i,o.search(""),o.fragment(""),d(n)&&""===o.scheme()&&(o=o.absoluteTo(ft(n))),this._url=o.toString()},E.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let r=this._url;e&&(r=`${r}${vi(this.queryParameters)}`),r=r.replace(/%7B/g,"{").replace(/%7D/g,"}");let n=this._templateValues;return Object.keys(n).length>0&&(r=r.replace(/{(.*?)}/g,(function(e,t){let r=n[t];return d(r)?encodeURIComponent(r):e}))),t&&d(this.proxy)&&(r=this.proxy.getURL(r)),r},E.prototype.setQueryParameters=function(e,t){this._queryParameters=t?Bt(this._queryParameters,e,!1):Bt(e,this._queryParameters,!1)},E.prototype.appendQueryParameters=function(e){this._queryParameters=Bt(e,this._queryParameters,!0)},E.prototype.setTemplateValues=function(e,t){this._templateValues=t?qe(this._templateValues,e):qe(e,this._templateValues)},E.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,d(e.url)){let r=O(e.preserveQueryParameters,!1);t.parseUrl(e.url,!0,r,this._url)}return d(e.queryParameters)&&(t._queryParameters=qe(e.queryParameters,t.queryParameters)),d(e.templateValues)&&(t._templateValues=qe(e.templateValues,t.templateValues)),d(e.headers)&&(t.headers=qe(e.headers,t.headers)),d(e.proxy)&&(t.proxy=e.proxy),d(e.request)&&(t.request=e.request),d(e.retryCallback)&&(t.retryCallback=e.retryCallback),d(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},E.prototype.retryOnError=function(e){let t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let r=this;return Promise.resolve(t(this,e)).then((function(e){return++r._retryCount,e}))},E.prototype.clone=function(e){return d(e)?(e._url=this._url,e._queryParameters=nt(this._queryParameters),e._templateValues=nt(this._templateValues),e.headers=nt(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new E({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:!1,credits:d(this.credits)?this.credits.slice():void 0})},E.prototype.getBaseUri=function(e){return mr(this.getUrlComponent(e),e)},E.prototype.appendForwardSlash=function(){this._url=fr(this._url)},E.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},E.fetchArrayBuffer=function(e){return new E(e).fetchArrayBuffer()},E.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},E.fetchBlob=function(e){return new E(e).fetchBlob()},E.prototype.fetchImage=function(e){e=O(e,O.EMPTY_OBJECT);let t=O(e.preferImageBitmap,!1),r=O(e.preferBlob,!1),n=O(e.flipY,!1),o=O(e.skipColorSpaceConversion,!1);if(Tn(this.request),!qr||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!r)return Pn({resource:this,flipY:n,skipColorSpaceConversion:o,preferImageBitmap:t});let i,s,a,u,l=this.fetchBlob();return d(l)?E.supportsImageBitmapOptions().then((function(e){return i=e,s=i&&t,l})).then((function(e){if(!d(e))return;if(u=e,s)return E.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1,skipColorSpaceConversion:o});let t=window.URL.createObjectURL(e);return a=new E({url:t}),Pn({resource:a,flipY:n,skipColorSpaceConversion:o,preferImageBitmap:!1})})).then((function(e){if(d(e))return e.blob=u,s||window.URL.revokeObjectURL(a.url),e})).catch((function(e){return d(a)&&window.URL.revokeObjectURL(a.url),e.blob=u,Promise.reject(e)})):void 0},E.fetchImage=function(e){return new E(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},E.prototype.fetchText=function(){return this.fetch({responseType:"text"})},E.fetchText=function(e){return new E(e).fetchText()},E.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(d(e))return e.then((function(e){if(d(e))return JSON.parse(e)}))},E.fetchJson=function(e){return new E(e).fetchJson()},E.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},E.fetchXML=function(e){return new E(e).fetchXML()},E.prototype.fetchJsonp=function(e){let t;e=O(e,"callback"),Tn(this.request);do{t=`loadJsonp${J.nextRandomNumber().toString().substring(2,8)}`}while(d(window[t]));return kr(this,e,t)},E.fetchJsonp=function(e){return new E(e).fetchJsonp(e.callbackParameterName)},E.prototype._makeRequest=function(e){let t=this;Tn(t.request);let r=t.request,n=t.url;r.url=n,r.requestFunction=function(){let o=e.responseType,i=qe(e.headers,t.headers),s=e.overrideMimeType,a=e.method,u=e.data,l=We(),c=E._Implementations.loadWithXhr(n,o,a,u,i,l,s);return d(c)&&d(c.abort)&&(r.cancelFunction=function(){c.abort()}),l.promise};let o=jt.request(r);if(d(o))return o.then((function(e){return r.cancelFunction=void 0,e})).catch((function(n){return r.cancelFunction=void 0,r.state!==te.FAILED?Promise.reject(n):t.retryOnError(n).then((function(o){return o?(r.state=te.UNISSUED,r.deferred=void 0,t.fetch(e)):Promise.reject(n)}))}))};var Oi=/^data:(.*?)(;base64)?,(.*)$/;function Nt(e,t){let r=decodeURIComponent(t);return e?atob(r):r}function Ur(e,t){let r=Nt(e,t),n=new ArrayBuffer(r.length),o=new Uint8Array(n);for(let e=0;e(a=t.parse(e),u=r,"https:"===a.protocol?import("https"):import("http")))).then((e=>{let n={protocol:a.protocol,hostname:a.hostname,port:a.port,path:a.path,query:a.query,method:r,headers:o};e.request(n).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)return void i.reject(new lt(e.statusCode,e,e.headers));let r=[];e.on("data",(function(e){r.push(e)})),e.on("end",(function(){let n=Buffer.concat(r);"gzip"===e.headers["content-encoding"]?u.gunzip(n,(function(e,r){e?i.reject(new Ee("Error decompressing response.")):i.resolve(Dr(r,t))})):i.resolve(Dr(n,t))}))})).on("error",(function(e){i.reject(new lt)})).end()}))}E.prototype.fetch=function(e){return(e=Re(e,{})).method="GET",this._makeRequest(e)},E.fetch=function(e){return new E(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.delete=function(e){return(e=Re(e,{})).method="DELETE",this._makeRequest(e)},E.delete=function(e){return new E(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},E.prototype.head=function(e){return(e=Re(e,{})).method="HEAD",this._makeRequest(e)},E.head=function(e){return new E(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.options=function(e){return(e=Re(e,{})).method="OPTIONS",this._makeRequest(e)},E.options=function(e){return new E(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.post=function(e,t){return w.defined("data",e),(t=Re(t,{})).method="POST",t.data=e,this._makeRequest(t)},E.post=function(e){return new E(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.put=function(e,t){return w.defined("data",e),(t=Re(t,{})).method="PUT",t.data=e,this._makeRequest(t)},E.put=function(e){return new E(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E.prototype.patch=function(e,t){return w.defined("data",e),(t=Re(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},E.patch=function(e){return new E(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},E._Implementations={},E._Implementations.loadImageElement=function(e,t,r){let n=new Image;n.onload=function(){0===n.naturalWidth&&0===n.naturalHeight&&0===n.width&&0===n.height&&(n.width=300,n.height=150),r.resolve(n)},n.onerror=function(e){r.reject(e)},t&&(Rn.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e},E._Implementations.createImage=function(e,t,r,n,o,i){let s=e.url;E.supportsImageBitmapOptions().then((function(a){if(!a||!i)return void E._Implementations.loadImageElement(s,t,r);let u=We(),l=E._Implementations.loadWithXhr(s,"blob","GET",void 0,void 0,u,void 0,void 0,void 0);return d(l)&&d(l.abort)&&(e.cancelFunction=function(){l.abort()}),u.promise.then((function(e){if(d(e))return E.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1,skipColorSpaceConversion:o});r.reject(new Ee(`Successfully retrieved ${s} but it contained no content.`))})).then((function(e){r.resolve(e)}))})).catch((function(e){r.reject(e)}))},E.createImageBitmapFromBlob=function(e,t){return w.defined("options",t),w.typeOf.bool("options.flipY",t.flipY),w.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),w.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};var Ai=typeof XMLHttpRequest>"u";E._Implementations.loadWithXhr=function(e,t,r,n,o,i,s){let a=Oi.exec(e);if(null!==a)return void i.resolve(Ei(a,t));if(Ai)return void Ci(e,t,r,n,o,i,s);let u=new XMLHttpRequest;if(Rn.contains(e)&&(u.withCredentials=!0),u.open(r,e,!0),d(s)&&d(u.overrideMimeType)&&u.overrideMimeType(s),d(o))for(let e in o)o.hasOwnProperty(e)&&u.setRequestHeader(e,o[e]);d(t)&&(u.responseType=t);let l=!1;return"string"==typeof e&&(l=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),u.onload=function(){if((u.status<200||u.status>=300)&&(!l||0!==u.status))return void i.reject(new lt(u.status,u.response,u.getAllResponseHeaders()));let e=u.response,n=u.responseType;if("HEAD"===r||"OPTIONS"===r){let e=u.getAllResponseHeaders().trim().split(/[\r\n]+/),t={};return e.forEach((function(e){let r=e.split(": "),n=r.shift();t[n]=r.join(": ")})),void i.resolve(t)}if(204===u.status)i.resolve();else if(!d(e)||d(t)&&n!==t)if("json"===t&&"string"==typeof e)try{i.resolve(JSON.parse(e))}catch(e){i.reject(e)}else(""===n||"document"===n)&&d(u.responseXML)&&u.responseXML.hasChildNodes()?i.resolve(u.responseXML):""!==n&&"text"!==n||!d(u.responseText)?i.reject(new Ee("Invalid XMLHttpRequest response type.")):i.resolve(u.responseText);else i.resolve(e)},u.onerror=function(e){i.reject(new lt)},u.send(n),u},E._Implementations.loadAndExecuteScript=function(e,t,r){return br(e,t).catch((function(e){r.reject(e)}))},E._DefaultImplementations={},E._DefaultImplementations.createImage=E._Implementations.createImage,E._DefaultImplementations.loadWithXhr=E._Implementations.loadWithXhr,E._DefaultImplementations.loadAndExecuteScript=E._Implementations.loadAndExecuteScript,E.DEFAULT=Object.freeze(new E({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var Fe=E;function ht(e){e=O(e,O.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=O(e.addNewLeapSeconds,!0),d(e.data)?Fr(this,e.data):Fr(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function Ri(e,t){return ue.compare(e.julianDate,t)}function Fr(e,t){if(!d(t.columnNames))throw new Ee("Error in loaded EOP data: The columnNames property is required.");if(!d(t.samples))throw new Ee("Error in loaded EOP data: The samples property is required.");let r=t.columnNames.indexOf("modifiedJulianDateUtc"),n=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),i=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("taiMinusUtcSeconds");if(r<0||n<0||o<0||i<0||s<0||a<0||u<0)throw new Ee("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let l=e._samples=t.samples,c=e._dates=[];e._dateColumn=r,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=i,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=u,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let f,p=e._addNewLeapSeconds;for(let t=0,n=l.length;tt.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let u=t[o],l=t[i];if(u.equals(l)||n.equals(u))return Mr(e,r,o,a,s),s;if(n.equals(l))return Mr(e,r,i,a,s),s;let c=ue.secondsDifference(n,u)/ue.secondsDifference(l,u),f=o*a,d=i*a,p=r[f+e._ut1MinusUtcSecondsColumn],h=r[d+e._ut1MinusUtcSecondsColumn],m=h-p;if(m>.5||m<-.5){let t=r[f+e._taiMinusUtcSecondsColumn],o=r[d+e._taiMinusUtcSecondsColumn];t!==o&&(l.equals(n)?p=h:h-=o-t)}return s.xPoleWander=mt(c,r[f+e._xPoleWanderRadiansColumn],r[d+e._xPoleWanderRadiansColumn]),s.yPoleWander=mt(c,r[f+e._yPoleWanderRadiansColumn],r[d+e._yPoleWanderRadiansColumn]),s.xPoleOffset=mt(c,r[f+e._xCelestialPoleOffsetRadiansColumn],r[d+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=mt(c,r[f+e._yCelestialPoleOffsetRadiansColumn],r[d+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=mt(c,p,h),s}ht.fromUrl=async function(e,t){w.defined("url",e),t=O(t,O.EMPTY_OBJECT);let r,n=Fe.createIfNeeded(e);try{r=await n.fetchJson()}catch{throw new Ee(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new ht({addNewLeapSeconds:t.addNewLeapSeconds,data:r})},ht.NONE=Object.freeze({compute:function(e,t){return d(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new ut(0,0,0,0,0),t}}),ht.prototype.compute=function(e,t){if(!d(this._samples))return;if(d(t)||(t=new ut(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let r=this._dates,n=this._lastIndex,o=0,i=0;if(d(n)){let s=r[n],a=r[n+1],u=ue.lessThanOrEquals(s,e),l=!d(a),c=l||ue.greaterThanOrEquals(a,e);if(u&&c)return o=n,!l&&a.equals(e)&&++o,i=o+1,jr(this,r,this._samples,e,o,i,t),t}let s=Qe(r,e,ue.compare,this._dateColumn);return s>=0?(s"u"?e:(d(Lt)||(Lt=document.createElement("a")),Lt.href=e,Lt.href)}function Qr(){if(d(Ye))return Ye;let e;if(e=typeof CESIUM_BASE_URL<"u"?CESIUM_BASE_URL:d(import.meta?.url)?ft(".",import.meta.url):"object"==typeof define&&d(define.amd)&&!define.amd.toUrlUndefined&&d(_t.toUrl)?ft("..",Ze("Core/buildModuleUrl.js")):Pi(),!d(e))throw new R("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return(Ye=new Fe({url:Lr(e)})).appendForwardSlash(),Ye}function Ti(e){return Lr(_t.toUrl(`../${e}`))}function $r(e){return Qr().getDerivedResource({url:e}).url}function Ze(e){return d(Qt)||(Qt="object"==typeof define&&d(define.amd)&&!define.amd.toUrlUndefined&&d(_t.toUrl)?Ti:$r),Qt(e)}Ze._cesiumScriptRegex=Br,Ze._buildModuleUrlFromBaseUrl=$r,Ze._clearBaseResource=function(){Ye=void 0},Ze.setBaseUrl=function(e){Ye=Fe.DEFAULT.getDerivedResource({url:e})},Ze.getCesiumBaseUrl=Qr;var Wr=Ze;function Ii(e,t,r){this.x=e,this.y=t,this.s=r}var $t=Ii;function zn(e){e=O(e,O.EMPTY_OBJECT),this._xysFileUrlTemplate=Fe.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=O(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=O(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new ue(this._sampleZeroJulianEphemerisDate,0,j.TAI),this._stepSizeDays=O(e.stepSizeDays,1),this._samplesPerXysFile=O(e.samplesPerXysFile,1e3),this._totalSamples=O(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,r=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let e=0;e<=t;++e){r[e]=o,n[e]=e*this._stepSizeDays;for(let n=0;n<=t;++n)n!==e&&(r[e]*=e-n);r[e]=1/r[e]}this._work=new Array(t+1),this._coef=new Array(t+1)}var Ui=new ue(0,0,j.TAI);function Un(e,t,r){let n=Ui;return n.dayNumber=t,n.secondsOfDay=r,ue.daysDifference(n,e._sampleZeroDateTT)}function Dn(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let r,n=e._xysFileUrlTemplate;r=d(n)?n.getDerivedResource({templateValues:{0:t}}):new Fe({url:Wr(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=r.fetchJson().then((function(r){e._chunkDownloadsInProgress[t]=!1;let n=e._samples,o=r.samples,i=t*e._samplesPerXysFile*3;for(let e=0,t=o.length;e=this._totalSamples&&(a=this._totalSamples-1);let u=s/this._samplesPerXysFile|0,l=a/this._samplesPerXysFile|0,c=[];for(let e=u;e<=l;++e)c.push(Dn(this,e));return Promise.all(c)},zn.prototype.computeXysRadians=function(e,t,r){let n=Un(this,e,t);if(n<0)return;let o=n/this._stepSizeDays|0;if(o>=this._totalSamples)return;let i=this._interpolationOrder,s=o-(i/2|0);s<0&&(s=0);let a=s+i;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-i,s<0&&(s=0));let u=!1,l=this._samples;if(d(l[3*s])||(Dn(this,s/this._samplesPerXysFile|0),u=!0),d(l[3*a])||(Dn(this,a/this._samplesPerXysFile|0),u=!0),u)return;d(r)?(r.x=0,r.y=0,r.s=0):r=new $t(0,0,0);let c,f,p=n-s*this._stepSizeDays,h=this._work,m=this._denominators,g=this._coef,y=this._xTable;for(c=0;c<=i;++c)h[c]=p-y[c];for(c=0;c<=i;++c){for(g[c]=1,f=0;f<=i;++f)f!==c&&(g[c]*=h[f]);g[c]*=m[c];let e=3*(s+c);r.x+=g[c]*l[e++],r.y+=g[c]*l[e++],r.s+=g[c]*l[e]}return r};var Me,Vr=zn,re={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},ge={};Object.defineProperties(ge,{element:{get:function(){if(ge.supportsFullscreen())return document[re.fullscreenElement]}},changeEventName:{get:function(){if(ge.supportsFullscreen())return re.fullscreenchange}},errorEventName:{get:function(){if(ge.supportsFullscreen())return re.fullscreenerror}},enabled:{get:function(){if(ge.supportsFullscreen())return document[re.fullscreenEnabled]}},fullscreen:{get:function(){if(ge.supportsFullscreen())return null!==ge.element}}}),ge.supportsFullscreen=function(){if(d(Me))return Me;Me=!1;let e=document.body;if("function"==typeof e.requestFullscreen)return re.requestFullscreen="requestFullscreen",re.exitFullscreen="exitFullscreen",re.fullscreenEnabled="fullscreenEnabled",re.fullscreenElement="fullscreenElement",re.fullscreenchange="fullscreenchange",re.fullscreenerror="fullscreenerror",Me=!0;let t,r=["webkit","moz","o","ms","khtml"];for(let n=0,o=r.length;n{let t=new Image;t.onload=function(){pe._result=t.width>0&&t.height>0,e(pe._result)},t.onerror=function(){pe._result=!1,e(pe._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"}))),pe._promise},Object.defineProperties(pe,{initialized:{get:function(){return d(pe._result)}}});var st=[];typeof ArrayBuffer<"u"&&(st.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&st.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&st.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&st.push(BigInt64Array),typeof BigUint64Array<"u"&&st.push(BigUint64Array));var Se={isChrome:Nn,chromeVersion:Di,isSafari:Jr,safariVersion:zi,isWebkit:Xr,webkitVersion:qi,isInternetExplorer:Gr,internetExplorerVersion:ki,isEdge:Xt,edgeVersion:Fi,isFirefox:Gt,firefoxVersion:Ni,isWindows:Mi,isIPadOrIOS:ji,hardwareConcurrency:O(me.hardwareConcurrency,3),supportsPointerEvents:Bi,supportsImageRenderingPixelated:to,supportsWebP:pe,imageRenderingValue:Li,typedArrayTypes:st,supportsBasis:function(e){return Se.supportsWebAssembly()&&e.context.supportsBasis},supportsFullscreen:function(){return Hr.supportsFullscreen()},supportsTypedArrays:function(){return typeof ArrayBuffer<"u"},supportsBigInt64Array:function(){return typeof BigInt64Array<"u"},supportsBigUint64Array:function(){return typeof BigUint64Array<"u"},supportsBigInt:function(){return typeof BigInt<"u"},supportsWebWorkers:function(){return typeof Worker<"u"},supportsWebAssembly:function(){return typeof WebAssembly<"u"},supportsWebgl2:function(e){return w.defined("scene",e),e.context.webgl2},supportsEsmWebWorkers:function(){return!Gt()||parseInt(Bn)>=114}},gt=Se;function x(e,t,r,n){this.x=O(e,0),this.y=O(t,0),this.z=O(r,0),this.w=O(n,0)}var wt=new f;x.fromAxisAngle=function(e,t,r){w.typeOf.object("axis",e),w.typeOf.number("angle",t);let n=t/2,o=Math.sin(n),i=(wt=f.normalize(e,wt)).x*o,s=wt.y*o,a=wt.z*o,u=Math.cos(n);return d(r)?(r.x=i,r.y=s,r.z=a,r.w=u,r):new x(i,s,a,u)};var Qi=[1,2,0],$i=new Array(3);x.fromRotationMatrix=function(e,t){w.typeOf.object("matrix",e);let r,n,o,i,s,a=e[B.COLUMN0ROW0],u=e[B.COLUMN1ROW1],l=e[B.COLUMN2ROW2],c=a+u+l;if(c>0)r=Math.sqrt(c+1),s=.5*r,r=.5/r,n=(e[B.COLUMN1ROW2]-e[B.COLUMN2ROW1])*r,o=(e[B.COLUMN2ROW0]-e[B.COLUMN0ROW2])*r,i=(e[B.COLUMN0ROW1]-e[B.COLUMN1ROW0])*r;else{let t=Qi,c=0;u>a&&(c=1),l>a&&l>u&&(c=2);let f=t[c],d=t[f];r=Math.sqrt(e[B.getElementIndex(c,c)]-e[B.getElementIndex(f,f)]-e[B.getElementIndex(d,d)]+1);let p=$i;p[c]=.5*r,r=.5/r,s=(e[B.getElementIndex(d,f)]-e[B.getElementIndex(f,d)])*r,p[f]=(e[B.getElementIndex(f,c)]+e[B.getElementIndex(c,f)])*r,p[d]=(e[B.getElementIndex(d,c)]+e[B.getElementIndex(c,d)])*r,n=-p[0],o=-p[1],i=-p[2]}return d(t)?(t.x=n,t.y=o,t.z=i,t.w=s,t):new x(n,o,i,s)};var no=new x,ro=new x,Ln=new x,oo=new x;x.fromHeadingPitchRoll=function(e,t){return w.typeOf.object("headingPitchRoll",e),oo=x.fromAxisAngle(f.UNIT_X,e.roll,no),Ln=x.fromAxisAngle(f.UNIT_Y,-e.pitch,t),t=x.multiply(Ln,oo,Ln),ro=x.fromAxisAngle(f.UNIT_Z,-e.heading,no),x.multiply(ro,t,t)};var Kt=new f,Qn=new f,Oe=new x,io=new x,en=new x;x.packedLength=4,x.pack=function(e,t,r){return w.typeOf.object("value",e),w.defined("array",t),r=O(r,0),t[r++]=e.x,t[r++]=e.y,t[r++]=e.z,t[r]=e.w,t},x.unpack=function(e,t,r){return w.defined("array",e),t=O(t,0),d(r)||(r=new x),r.x=e[t],r.y=e[t+1],r.z=e[t+2],r.w=e[t+3],r},x.packedInterpolationLength=3,x.convertPackedArrayForInterpolation=function(e,t,r,n){x.unpack(e,4*r,en),x.conjugate(en,en);for(let o=0,i=r-t+1;o=0?o=1:(o=-1,i=-i);let s=i-1,a=1-r,u=r*r,l=a*a;for(let e=7;e>=0;--e)Te[e]=(tn[e]*u-nn[e])*s,Ie[e]=(tn[e]*l-nn[e])*s;let c=o*r*(1+Te[0]*(1+Te[1]*(1+Te[2]*(1+Te[3]*(1+Te[4]*(1+Te[5]*(1+Te[6]*(1+Te[7])))))))),f=a*(1+Ie[0]*(1+Ie[1]*(1+Ie[2]*(1+Ie[3]*(1+Ie[4]*(1+Ie[5]*(1+Ie[6]*(1+Ie[7])))))))),d=x.multiplyByScalar(e,f,Hi);return x.multiplyByScalar(t,c,n),x.add(d,n,n)},x.fastSquad=function(e,t,r,n,o,i){w.typeOf.object("q0",e),w.typeOf.object("q1",t),w.typeOf.object("s0",r),w.typeOf.object("s1",n),w.typeOf.number("t",o),w.typeOf.object("result",i);let s=x.fastSlerp(e,t,o,bt),a=x.fastSlerp(r,n,o,at);return x.fastSlerp(s,a,2*o*(1-o),i)},x.equals=function(e,t){return e===t||d(e)&&d(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},x.equalsEpsilon=function(e,t,r){return r=O(r,0),e===t||d(e)&&d(t)&&Math.abs(e.x-t.x)<=r&&Math.abs(e.y-t.y)<=r&&Math.abs(e.z-t.z)<=r&&Math.abs(e.w-t.w)<=r},x.ZERO=Object.freeze(new x(0,0,0,0)),x.IDENTITY=Object.freeze(new x(0,0,0,1)),x.prototype.clone=function(e){return x.clone(this,e)},x.prototype.equals=function(e){return x.equals(this,e)},x.prototype.equalsEpsilon=function(e,t){return x.equalsEpsilon(this,e,t)},x.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Xe=x,$={},Hn={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"}},ct={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Yn={},we={east:new f,north:new f,up:new f,west:new f,south:new f,down:new f},je=new f,Ne=new f,Be=new f;$.localFrameToFixedFrameGenerator=function(e,t){if(!Hn.hasOwnProperty(e)||!Hn[e].hasOwnProperty(t))throw new R("firstAxis and secondAxis must be east, north, up, west, south or down.");let r,n=Hn[e][t],o=e+t;return d(Yn[o])?r=Yn[o]:(r=function(r,o,i){if(!d(r))throw new R("origin is required.");if(d(i)||(i=new L),f.equalsEpsilon(r,f.ZERO,J.EPSILON14))f.unpack(ct[e],0,je),f.unpack(ct[t],0,Ne),f.unpack(ct[n],0,Be);else if(J.equalsEpsilon(r.x,0,J.EPSILON14)&&J.equalsEpsilon(r.y,0,J.EPSILON14)){let o=J.sign(r.z);f.unpack(ct[e],0,je),"east"!==e&&"west"!==e&&f.multiplyByScalar(je,o,je),f.unpack(ct[t],0,Ne),"east"!==t&&"west"!==t&&f.multiplyByScalar(Ne,o,Ne),f.unpack(ct[n],0,Be),"east"!==n&&"west"!==n&&f.multiplyByScalar(Be,o,Be)}else{(o=O(o,ze.WGS84)).geodeticSurfaceNormal(r,we.up);let i=we.up,s=we.east;s.x=-r.y,s.y=r.x,s.z=0,f.normalize(s,we.east),f.cross(i,s,we.north),f.multiplyByScalar(we.up,-1,we.down),f.multiplyByScalar(we.east,-1,we.west),f.multiplyByScalar(we.north,-1,we.south),je=we[e],Ne=we[t],Be=we[n]}return i[0]=je.x,i[1]=je.y,i[2]=je.z,i[3]=0,i[4]=Ne.x,i[5]=Ne.y,i[6]=Ne.z,i[7]=0,i[8]=Be.x,i[9]=Be.y,i[10]=Be.z,i[11]=0,i[12]=r.x,i[13]=r.y,i[14]=r.z,i[15]=1,i},Yn[o]=r),r},$.eastNorthUpToFixedFrame=$.localFrameToFixedFrameGenerator("east","north"),$.northEastDownToFixedFrame=$.localFrameToFixedFrameGenerator("north","east"),$.northUpEastToFixedFrame=$.localFrameToFixedFrameGenerator("north","up"),$.northWestUpToFixedFrame=$.localFrameToFixedFrameGenerator("north","west");var Yi=new Xe,Zi=new f(1,1,1),Ji=new L;$.headingPitchRollToFixedFrame=function(e,t,r,n,o){w.typeOf.object("HeadingPitchRoll",t),n=O(n,$.eastNorthUpToFixedFrame);let i=Xe.fromHeadingPitchRoll(t,Yi),s=L.fromTranslationQuaternionRotationScale(f.ZERO,i,Zi,Ji);return o=n(e,r,o),L.multiply(o,s,o)};var Xi=new L,Gi=new B;$.headingPitchRollQuaternion=function(e,t,r,n,o){w.typeOf.object("HeadingPitchRoll",t);let i=$.headingPitchRollToFixedFrame(e,t,r,n,Xi),s=L.getMatrix3(i,Gi);return Xe.fromRotationMatrix(s,o)};var Ki=new f(1,1,1),es=new f,co=new L,ts=new L,ns=new B,rs=new Xe;$.fixedFrameToHeadingPitchRoll=function(e,t,r,n){w.defined("transform",e),t=O(t,ze.WGS84),r=O(r,$.eastNorthUpToFixedFrame),d(n)||(n=new In);let o=L.getTranslation(e,es);if(f.equals(o,f.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;let i=L.inverseTransformation(r(o,t,co),co),s=L.setScale(e,Ki,ts);s=L.setTranslation(s,f.ZERO,s),i=L.multiply(i,s,i);let a=Xe.fromRotationMatrix(L.getMatrix3(i,ns),rs);return a=Xe.normalize(a,a),In.fromQuaternion(a,n)};var os=24110.54841,is=8640184.812866,ss=.093104,as=-62e-7,cs=11772758384668e-32,us=72921158553e-15,fs=J.TWO_PI/86400,rn=new ue;$.computeTemeToPseudoFixedMatrix=function(e,t){if(!d(e))throw new R("date is required.");let r,n=(rn=ue.addSeconds(e,-ue.computeTaiMinusUtc(e),rn)).dayNumber,o=rn.secondsOfDay,i=n-2451545;r=o>=43200?(i+.5)/K.DAYS_PER_JULIAN_CENTURY:(i-.5)/K.DAYS_PER_JULIAN_CENTURY;let s=(os+r*(is+r*(ss+r*as)))*fs%J.TWO_PI+(us+cs*(n-2451545.5))*((o+.5*K.SECONDS_PER_DAY)%K.SECONDS_PER_DAY),a=Math.cos(s),u=Math.sin(s);return d(t)?(t[0]=a,t[1]=-u,t[2]=0,t[3]=u,t[4]=a,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new B(a,u,0,-u,a,0,0,0,1)},$.iau2006XysData=new Vr,$.earthOrientationParameters=Nr.NONE;var Xn=32.184,ls=2451545;$.preloadIcrfFixed=function(e){let t=e.start.dayNumber,r=e.start.secondsOfDay+Xn,n=e.stop.dayNumber,o=e.stop.secondsOfDay+Xn;return $.iau2006XysData.preload(t,r,n,o)},$.computeIcrfToFixedMatrix=function(e,t){if(!d(e))throw new R("date is required.");d(t)||(t=new B);let r=$.computeFixedToIcrfMatrix(e,t);if(d(r))return B.transpose(r,t)};var ds=new $t(0,0,0),ps=new ut(0,0,0,0,0,0),Zn=new B,Jn=new B;$.computeFixedToIcrfMatrix=function(e,t){if(!d(e))throw new R("date is required.");d(t)||(t=new B);let r=$.earthOrientationParameters.compute(e,ps);if(!d(r))return;let n=e.dayNumber,o=e.secondsOfDay+Xn,i=$.iau2006XysData.computeXysRadians(n,o,ds);if(!d(i))return;let s=i.x+r.xPoleOffset,a=i.y+r.yPoleOffset,u=1/(1+Math.sqrt(1-s*s-a*a)),l=Zn;l[0]=1-u*s*s,l[3]=-u*s*a,l[6]=s,l[1]=-u*s*a,l[4]=1-u*a*a,l[7]=a,l[2]=-s,l[5]=-a,l[8]=1-u*(s*s+a*a);let c=B.fromRotationZ(-i.s,Jn),f=B.multiply(l,c,Zn),p=e.dayNumber-2451545,h=(e.secondsOfDay-ue.computeTaiMinusUtc(e)+r.ut1MinusUtc)/K.SECONDS_PER_DAY,m=.779057273264+h+.00273781191135448*(p+h);m=m%1*J.TWO_PI;let g=B.fromRotationZ(m,Jn),y=B.multiply(f,g,Zn),w=Math.cos(r.xPoleWander),v=Math.cos(r.yPoleWander),b=Math.sin(r.xPoleWander),_=Math.sin(r.yPoleWander),x=n-ls+o/K.SECONDS_PER_DAY;x/=36525;let O=-47e-6*x*J.RADIANS_PER_DEGREE/3600,E=Math.cos(O),S=Math.sin(O),A=Jn;return A[0]=w*E,A[1]=w*S,A[2]=b,A[3]=-v*S+_*b*E,A[4]=v*E+_*b*S,A[5]=-_*w,A[6]=-_*S-v*b*E,A[7]=_*E-v*b*S,A[8]=v*w,B.multiply(y,A,t)};var ms=new xt;$.pointToWindowCoordinates=function(e,t,r,n){return(n=$.pointToGLWindowCoordinates(e,t,r,n)).y=2*t[5]-n.y,n},$.pointToGLWindowCoordinates=function(e,t,r,n){if(!d(e))throw new R("modelViewProjectionMatrix is required.");if(!d(t))throw new R("viewportTransformation is required.");if(!d(r))throw new R("point is required.");d(n)||(n=new sn);let o=ms;return L.multiplyByVector(e,xt.fromElements(r.x,r.y,r.z,1,o),o),xt.multiplyByScalar(o,1/o.w,o),L.multiplyByVector(t,o,o),sn.fromCartesian4(o,n)};var hs=new f,ys=new f,gs=new f;$.rotationMatrixFromPositionVelocity=function(e,t,r,n){if(!d(e))throw new R("position is required.");if(!d(t))throw new R("velocity is required.");let o=O(r,ze.WGS84).geodeticSurfaceNormal(e,hs),i=f.cross(t,o,ys);f.equalsEpsilon(i,f.ZERO,J.EPSILON6)&&(i=f.clone(f.UNIT_X,i));let s=f.cross(i,t,gs);return f.normalize(s,s),f.cross(t,s,i),f.negate(i,i),f.normalize(i,i),d(n)||(n=new B),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=i.x,n[4]=i.y,n[5]=i.z,n[6]=s.x,n[7]=s.y,n[8]=s.z,n};var uo=new L(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),fo=new De,lo=new f,ws=new f,bs=new B,Gn=new L,po=new L;$.basisTo2D=function(e,t,r){if(!d(e))throw new R("projection is required.");if(!d(t))throw new R("matrix is required.");if(!d(r))throw new R("result is required.");let n=L.getTranslation(t,ws),o=e.ellipsoid,i=o.cartesianToCartographic(n,fo),s=e.project(i,lo);f.fromElements(s.z,s.x,s.y,s);let a=$.eastNorthUpToFixedFrame(n,o,Gn),u=L.inverseTransformation(a,po),l=L.getMatrix3(t,bs),c=L.multiplyByMatrix3(u,l,r);return L.multiply(uo,c,r),L.setTranslation(r,s,r),r},$.wgs84To2DModelMatrix=function(e,t,r){if(!d(e))throw new R("projection is required.");if(!d(t))throw new R("center is required.");if(!d(r))throw new R("result is required.");let n=e.ellipsoid,o=$.eastNorthUpToFixedFrame(t,n,Gn),i=L.inverseTransformation(o,po),s=n.cartesianToCartographic(t,fo),a=e.project(s,lo);f.fromElements(a.z,a.x,a.y,a);let u=L.fromTranslation(a,Gn);return L.multiply(uo,i,r),L.multiply(u,r,r),r};var nf=$;export{an as a,Et as b,Kn as c,Qs as d,gt as e,Xe as f,Fe as g,Wr as h,nf as i}; \ No newline at end of file diff --git a/Workers/chunk-YYYI3I6L.js.LICENSE.txt b/Workers/chunk-YYYI3I6L.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-YYYI3I6L.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-RKPKWH3Z.js b/Workers/chunk-Z3SYNMQT.js similarity index 58% rename from Workers/chunk-RKPKWH3Z.js rename to Workers/chunk-Z3SYNMQT.js index d2682cf..ebbf32b 100644 --- a/Workers/chunk-RKPKWH3Z.js +++ b/Workers/chunk-Z3SYNMQT.js @@ -1,2 +1,2 @@ -/*! For license information please see chunk-RKPKWH3Z.js.LICENSE.txt */ +/*! For license information please see chunk-Z3SYNMQT.js.LICENSE.txt */ function u(e,t){return e??t}u.EMPTY_OBJECT=Object.freeze({});var t=u;export{t as a}; \ No newline at end of file diff --git a/Workers/chunk-Z3SYNMQT.js.LICENSE.txt b/Workers/chunk-Z3SYNMQT.js.LICENSE.txt new file mode 100644 index 0000000..521c7d2 --- /dev/null +++ b/Workers/chunk-Z3SYNMQT.js.LICENSE.txt @@ -0,0 +1,24 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.115 + * + * 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. + */ diff --git a/Workers/chunk-ZKNXHPHD.js.LICENSE.txt b/Workers/chunk-ZKNXHPHD.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-ZKNXHPHD.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-ZLPZ2L4F.js.LICENSE.txt b/Workers/chunk-ZLPZ2L4F.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-ZLPZ2L4F.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-ZLUSVROX.js.LICENSE.txt b/Workers/chunk-ZLUSVROX.js.LICENSE.txt deleted file mode 100644 index 7f5f415..0000000 --- a/Workers/chunk-ZLUSVROX.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 - * - * 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. - */ diff --git a/Workers/chunk-ZZR53QFZ.js b/Workers/chunk-ZZR53QFZ.js deleted file mode 100644 index 6bc9266..0000000 --- a/Workers/chunk-ZZR53QFZ.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see chunk-ZZR53QFZ.js.LICENSE.txt */ -import{a as le}from"./chunk-RQI6QM4Q.js";import{a as Z}from"./chunk-D6NO7OEC.js";import{a as R}from"./chunk-QCBYIBZJ.js";import{f as _,i as se}from"./chunk-YIFABOF6.js";import{a as ae,b as v,d as $}from"./chunk-KDW4RGIR.js";import{a as e,b as ce,d as j}from"./chunk-V624RX7A.js";import{a as Q}from"./chunk-VZ2RFJ3P.js";var we={ROUNDED:0,MITERED:1,BEVELED:2},L=Object.freeze(we),g=[new e,new e],ge=new e,pe=new e,xe=new e,Se=new e,Te=new e,Ee=new e,Be=new e,Ce=new e,ze=new e,P=new e,W=new e,I={},ee=new ce;function Ae(e,t){let n=new Array(e.length);for(let r=0;r=0?-c:c}var je=new e(-1,0,0),N=new v,De=new v,re=new j,Me=j.IDENTITY.clone(),ve=new e,Ne=new ae,ie=new e;function D(t,n,r,a,o,l,i,c){let s=ve,u=Ne;N=se.eastNorthUpToFixedFrame(t,o,N),s=v.multiplyByPointAsVector(N,je,s),s=e.normalize(s,s);let g=Oe(s,n,t,o);re=j.fromRotationZ(g,re),ie.z=l,N=v.multiplyTransformation(N,v.fromRotationTranslation(re,ie,De),N);let m=Me;m[0]=i;for(let t=0;t0){let r=u?2:1;for(let a=0;a=0};var Fe=new e,Ge=new e;I.computePositions=function(t,n,r,a,o){let l=a._ellipsoid,i=Ae(t,l),c=a._granularity,s=a._cornerType,u=o?be(n,r):fe(n,r),m=o?fe(n,r):void 0,f=r.height/2,y=r.width/2,d=t.length,h=[],p=o?[]:void 0,w=ge,B=pe,j=xe,E=Se,v=Te,A=Ee,N=Be,x=Ce,z=ze,S=t[0],b=t[1];E=l.geodeticSurfaceNormal(S,E),w=e.subtract(b,S,w),w=e.normalize(w,w),x=e.cross(E,w,x),x=e.normalize(x,x);let T,R,O=i[0],V=i[1];o&&(p=D(S,x,m,p,l,O+f,1,1)),z=e.clone(S,z),S=b,B=e.negate(w,B);for(let n=1;ns;a--)n=st.PI_OVER_TWO-a*i,o[r++]=1-t*(1+Math.cos(n)),o[r++]=.5*(1+Math.sin(n));for(a=s;a>0;a--)n=st.PI_OVER_TWO-i*a,o[r++]=1-e*(1+Math.cos(n)),o[r++]=.5*(1+Math.sin(n));for(a=c-g;a>0;a--)o[r++]=a*e,o[r++]=1;for(a=1;a0;a--)o[r++]=(a-1)*e,o[r++]=1}h.st=new x({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:o})}return e.normal&&(h.normal=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:k.normals})),e.tangent&&(h.tangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:k.tangents})),e.bitangent&&(h.bitangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:k.bitangents})),{attributes:h,indices:D}}function qt(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;let r,i,a=t.position.values;(e.normal||e.bitangent)&&(r=t.normal.values,i=t.bitangent.values);let n,s=t.position.values.length/18,l=3*s,u=2*s,d=2*l;if(e.normal||e.bitangent||e.tangent){let s=e.normal?new Float32Array(6*l):void 0,u=e.tangent?new Float32Array(6*l):void 0,m=e.bitangent?new Float32Array(6*l):void 0,h=zt,c=kt,f=wt,p=Tt,g=jt,A=Ht,b=d;for(n=0;ns;a--)n=st.PI_OVER_TWO-a*i,o[r++]=1-t*(1+Math.cos(n)),o[r++]=.5*(1+Math.sin(n));for(a=s;a>0;a--)n=st.PI_OVER_TWO-i*a,o[r++]=1-e*(1+Math.cos(n)),o[r++]=.5*(1+Math.sin(n));for(a=c-g;a>0;a--)o[r++]=a*e,o[r++]=1;for(a=1;a0;a--)o[r++]=(a-1)*e,o[r++]=1}h.st=new x({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:o})}return e.normal&&(h.normal=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:k.normals})),e.tangent&&(h.tangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:k.tangents})),e.bitangent&&(h.bitangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:k.bitangents})),{attributes:h,indices:S}}function qt(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;let r,i,a=t.position.values;(e.normal||e.bitangent)&&(r=t.normal.values,i=t.bitangent.values);let n,s=t.position.values.length/18,l=3*s,u=2*s,d=2*l;if(e.normal||e.bitangent||e.tangent){let s=e.normal?new Float32Array(6*l):void 0,u=e.tangent?new Float32Array(6*l):void 0,m=e.bitangent?new Float32Array(6*l):void 0,h=zt,c=kt,f=wt,p=Tt,g=jt,A=Ht,b=d;for(n=0;n0){let t=Math.min(r,s);n=Math.round(s/t),f+=t}let m,c=N.createTypedArray(a,2*f),p=0;for(m=0;m0)for(m=0;m0){let t=Math.min(r,s);n=Math.round(s/t),m+=t}let f,c=N.createTypedArray(a,2*m),p=0;for(f=0;f0)for(f=0;fimport("./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")}),c={};async function k(e){let r=c[e];return i(r)||("object"==typeof exports?c[r]=r=f(`Workers/${e}`):(r=(await b(`./${e}.js`)).default,c[r]=r)),r}async function g(e,r){let t=e.subTasks,o=t.length,s=new Array(o);for(let e=0;ee(o,r.offset))):s[e]=o}return Promise.all(s).then((function(e){return p.packCreateGeometryResults(e,r)}))}var C=y(g);export{C as default}; \ No newline at end of file +import{a as d}from"./chunk-TQBVVLQA.js";import{a as w}from"./chunk-R7GRRUJS.js";import"./chunk-Q3ITDG7Y.js";import"./chunk-NNNHC2WA.js";import"./chunk-FZIR7YHL.js";import"./chunk-FHUOX7Q3.js";import"./chunk-EQAHH27B.js";import"./chunk-LWO5EUNN.js";import"./chunk-SPMRTIBU.js";import"./chunk-U6MIZ4IC.js";import"./chunk-3G4OCZJT.js";import"./chunk-LYPPBP4Q.js";import"./chunk-PCFGFNNQ.js";import"./chunk-V2SDNSQR.js";import"./chunk-S7TTFAYA.js";import"./chunk-TLYHKSDJ.js";import"./chunk-PYVDHCDQ.js";import"./chunk-JMWWNZHX.js";import"./chunk-DNO4OWAM.js";import"./chunk-XDVDNOI4.js";import{a as k}from"./chunk-Z3SYNMQT.js";import{a as y}from"./chunk-4KGDZUZQ.js";import{a,b as p,e as r}from"./chunk-F3TINEFX.js";var b=p({"./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")}),f={};async function h(e,t){let o=k(f[t]??f[e]);return r(o)?o:r(t)?(o="object"==typeof exports?a(t):(await import(t)).default,f[t]=o,o):(o="object"==typeof exports?a(`Workers/${e}`):(r(t)?await import(t):await b(`./${e}.js`)).default,f[e]=o,o)}async function x(e,t){let o=e.subTasks,s=o.length,i=new Array(s);for(let e=0;ee(s,t.offset))):i[e]=s}return Promise.all(i).then((function(e){return d.packCreateGeometryResults(e,t)}))}var P=w(x);export{P as default}; \ No newline at end of file diff --git a/Workers/createGeometry.js.LICENSE.txt b/Workers/createGeometry.js.LICENSE.txt index 7f5f415..521c7d2 100644 --- a/Workers/createGeometry.js.LICENSE.txt +++ b/Workers/createGeometry.js.LICENSE.txt @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 + * Version 1.115 * * Copyright 2011-2022 Cesium Contributors * diff --git a/Workers/createGroundPolylineGeometry.js b/Workers/createGroundPolylineGeometry.js index 1360a3b..5b70760 100644 --- a/Workers/createGroundPolylineGeometry.js +++ b/Workers/createGroundPolylineGeometry.js @@ -1,2 +1,2 @@ /*! For license information please see createGroundPolylineGeometry.js.LICENSE.txt */ -import{a as _e}from"./chunk-EXJ3OQJJ.js";import{a as Z}from"./chunk-CXKSXL5C.js";import{a as _t}from"./chunk-63CO7A5M.js";import{a as Oe}from"./chunk-NXLA2DOI.js";import{a as Le}from"./chunk-2EHQCUJI.js";import{a as te}from"./chunk-EOT3UPEC.js";import{b as Qt}from"./chunk-ZKNXHPHD.js";import{a as jt}from"./chunk-W5ZMPE2M.js";import{c as Ce,d as zt}from"./chunk-YYYI3I6L.js";import{a as Pt,d as U,f as Kt,g as xe,h as Ne}from"./chunk-YIFABOF6.js";import"./chunk-PQVQONHO.js";import{c as G,d as Bt}from"./chunk-KDW4RGIR.js";import{a as vt}from"./chunk-VNDUYYBJ.js";import{a as t,b as u,c as z,d as bt}from"./chunk-V624RX7A.js";import{a as p}from"./chunk-VZ2RFJ3P.js";import"./chunk-RN5GA5QZ.js";import"./chunk-TWC6ISJU.js";import{a as O}from"./chunk-RKPKWH3Z.js";import{a as St,b as et}from"./chunk-BIYNNQRQ.js";import{e as g}from"./chunk-ZLUSVROX.js";function rt(t){t=O(t,O.EMPTY_OBJECT),this._ellipsoid=O(t.ellipsoid,z.WGS84),this._rectangle=O(t.rectangle,G.MAX_VALUE),this._projection=new Pt(this._ellipsoid),this._numberOfLevelZeroTilesX=O(t.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=O(t.numberOfLevelZeroTilesY,1)}Object.defineProperties(rt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),rt.prototype.getNumberOfXTilesAtLevel=function(t){return this._numberOfLevelZeroTilesX<=i&&(u=i-1);let c=(r.north-t.latitude)/l|0;return c>=a&&(c=a-1),g(n)?(n.x=u,n.y=c,n):new Bt(u,c)};var De=rt,Ie=new t,He=new t,ke=new u,ee=new t,hn=new t,ye=new U,pn=new De,Lt=[new u,new u,new u,new u],Ot=new Bt,w={};function Ae(t){u.fromRadians(t.east,t.north,0,Lt[0]),u.fromRadians(t.west,t.north,0,Lt[1]),u.fromRadians(t.east,t.south,0,Lt[2]),u.fromRadians(t.west,t.south,0,Lt[3]);let e,n=0,r=0,i=0,a=0,o=w._terrainHeightsMaxLevel;for(e=0;e<=o;++e){let t=!1;for(let n=0;n<4;++n){let r=Lt[n];if(pn.positionToTileXY(r,e,Ot),0===n)i=Ot.x,a=Ot.y;else if(i!==Ot.x||a!==Ot.y){t=!0;break}}if(t)break;n=i,r=a}if(0!==e)return{x:n,y:r,level:e>o?o:e-1}}w.initialize=function(){let t=w._initPromise;return g(t)||(t=xe.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then((function(t){w._terrainHeights=t})),w._initPromise=t),t},w.getMinimumMaximumHeights=function(e,n){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");n=O(n,z.WGS84);let r=Ae(e),i=w._defaultMinTerrainHeight,a=w._defaultMaxTerrainHeight;if(g(r)){let o=`${r.level}-${r.x}-${r.y}`,l=w._terrainHeights[o];g(l)&&(i=l[0],a=l[1]),n.cartographicToCartesian(G.northeast(e,ke),Ie),n.cartographicToCartesian(G.southwest(e,ke),He),t.midpoint(He,Ie,ee);let s=n.scaleToGeodeticSurface(ee,hn);if(g(s)){let e=t.distance(ee,s);i=Math.min(i,-e)}else i=w._defaultMinTerrainHeight}return i=Math.max(w._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:a}},w.getBoundingSphere=function(t,e){if(et.defined("rectangle",t),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");e=O(e,z.WGS84);let n=Ae(t),r=w._defaultMaxTerrainHeight;if(g(n)){let t=`${n.level}-${n.x}-${n.y}`,e=w._terrainHeights[t];g(e)&&(r=e[1])}let i=U.fromRectangle3D(t,e,0);return U.fromRectangle3D(t,e,r,ye),U.union(i,ye,i)},w._terrainHeightsMaxLevel=6,w._defaultMaxTerrainHeight=9e3,w._defaultMinTerrainHeight=-1e5,w._terrainHeights=void 0,w._initPromise=void 0,Object.defineProperties(w,{initialized:{get:function(){return g(w._terrainHeights)}}});var Xt=w,le=[Pt,_e],dn=le.length,Ke=Math.cos(p.toRadians(30)),Me=Math.cos(p.toRadians(150)),Qe=0,tn=1e3;function ct(t){let e=(t=O(t,O.EMPTY_OBJECT)).positions;if(!g(e)||e.length<2)throw new St("At least two positions are required.");if(g(t.arcType)&&t.arcType!==Z.GEODESIC&&t.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=O(t.width,1),this._positions=e,this.granularity=O(t.granularity,9999),this.loop=O(t.loop,!1),this.arcType=O(t.arcType,Z.GEODESIC),this._ellipsoid=z.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+z.packedLength+1+1}}}),ct.setProjectionAndEllipsoid=function(t,e){let n=0;for(let t=0;tKe||op.PI_OVER_TWO&&(s=!0,l=t.subtract(o,r,Xe),h=c.cartesianToCartographic(l,je)),h.height=0;let g=e.project(h,a);return(a=t.subtract(g,i,a)).z=0,a=t.normalize(a,a),s&&t.negate(a,a),a}var An=new t,Ye=new t;function Fe(e,n,r,i,a,o){let l=t.subtract(n,e,An);t.normalize(l,l);let s=r-Qe,u=t.multiplyByScalar(l,s,Ye);t.add(e,u,a);let c=i-tn;u=t.multiplyByScalar(l,c,Ye),t.add(n,u,o)}var Mn=new t;function Gt(e,n){let r=jt.getPointDistance(Ut,e),i=jt.getPointDistance(Ut,n),a=Mn;p.equalsEpsilon(r,0,p.EPSILON2)?(a=nt(n,e,a),t.multiplyByScalar(a,p.EPSILON2,a),t.add(e,a,e)):p.equalsEpsilon(i,0,p.EPSILON2)&&(a=nt(e,n,a),t.multiplyByScalar(a,p.EPSILON2,a),t.add(n,a,n))}function Rn(t,e){let n=Math.abs(t.longitude),r=Math.abs(e.longitude);if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let r=p.sign(e.longitude);return t.longitude=r*(n-p.EPSILON11),1}if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let n=p.sign(t.longitude);return e.longitude=n*(r-p.EPSILON11),2}return 0}var nn=new u,on=new u,Ge=new t,re=new t,Ue=new t,We=new t,Pn=new t,qe=new t,bn=[nn,on],vn=new G,Bn=new t,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,ae=new t,ce=new t,Gn=new t,Un=new t,Wn=new t,Ze=new t,qn=new t,Zn=new t,Vn=new _t,$n=new _t,Ve=new t,Jn=new t,$e=new t,Kn=[new U,new U],rn=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Je=rn.length;function Qn(e,n,r,i,a,o,l){let s,u,c,h,g,d,f=n._ellipsoid,w=r.length/3-1,m=8*w,O=4*m,y=36*w,T=m>65535?new Uint32Array(y):new Uint16Array(y),_=new Float64Array(3*m),P=new Float32Array(O),k=new Float32Array(O),E=new Float32Array(O),L=new Float32Array(O),b=new Float32Array(O);l&&(c=new Float32Array(O),h=new Float32Array(O),g=new Float32Array(O),d=new Float32Array(2*m));let A=o.length/2,I=0,v=nn;v.height=0;let S=on;S.height=0;let N=Ge,j=re;if(l)for(u=0,s=1;sKe?(w=Dt(n,v,T,e,ae),m=Dt(n,S,B,s,ce)):1===r?(m=Dt(n,S,B,s,ce),w.x=0,w.y=p.sign(v.longitude-Math.abs(S.longitude)),w.z=0):(w=Dt(n,v,T,e,ae),m.x=0,m.y=p.sign(v.longitude-S.longitude),m.z=0)}let A=t.distance(y,X),N=_t.fromCartesian(O,Vn),j=t.subtract(Z,O,Gn),z=t.normalize(j,Ze),U=t.subtract(y,O,Un);U=t.normalize(U,U);let V=t.cross(z,U,Ze);V=t.normalize(V,V);let Q=t.cross(U,T,qn);Q=t.normalize(Q,Q);let J=t.subtract(X,Z,Wn);J=t.normalize(J,J);let K=t.cross(B,J,Zn);K=t.normalize(K,K);let $,tt,et,rt=A/x,it=F/x,at=0,ot=0,lt=0;if(l){at=t.distance(e,s),$=_t.fromCartesian(e,$n),tt=t.subtract(s,e,Ve),et=t.normalize(tt,Jn);let n=et.x;et.x=et.y,et.y=-n,ot=at/I,lt=q/I}for(D=0;D<8;D++){let e=R+4*D,n=M+2*D,r=e+3,i=D<4?1:-1,a=2===D||3===D||6===D||7===D?1:-1;t.pack(N.high,P,e),P[r]=j.x,t.pack(N.low,k,e),k[r]=j.y,t.pack(Q,E,e),E[r]=j.z,t.pack(K,L,e),L[r]=rt*i,t.pack(V,b,e);let o=it*a;0===o&&a<0&&(o=9),b[r]=o,l&&(c[e]=$.high.x,c[e+1]=$.high.y,c[e+2]=$.low.x,c[e+3]=$.low.y,g[e]=-w.y,g[e+1]=w.x,g[e+2]=m.y,g[e+3]=-m.x,h[e]=tt.x,h[e+1]=tt.y,h[e+2]=et.x,h[e+3]=et.y,d[n]=ot*i,o=lt*a,0===o&&a<0&&(o=9),d[n+1]=o)}let st=jn,ut=Xn,ct=Bn,pt=zn,ht=G.fromCartographicArray(bn,vn),gt=Xt.getMinimumMaximumHeights(ht,f),dt=gt.minimumTerrainHeight,ft=gt.maximumTerrainHeight;W+=Math.abs(dt),W+=Math.abs(ft),Fe(O,y,dt,ft,st,ct),Fe(Z,X,dt,ft,ut,pt);let wt=t.multiplyByScalar(V,p.EPSILON5,$e);t.add(st,wt,st),t.add(ut,wt,ut),t.add(ct,wt,ct),t.add(pt,wt,pt),Gt(st,ut),Gt(ct,pt),t.pack(st,_,C),t.pack(ut,_,C+3),t.pack(pt,_,C+6),t.pack(ct,_,C+9),wt=t.multiplyByScalar(V,-2*p.EPSILON5,$e),t.add(st,wt,st),t.add(ut,wt,ut),t.add(ct,wt,ct),t.add(pt,wt,pt),Gt(st,ut),Gt(ct,pt),t.pack(st,_,C+12),t.pack(ut,_,C+15),t.pack(pt,_,C+18),t.pack(ct,_,C+21),H+=2,u+=3,M+=16,C+=24,R+=32,F+=A,q+=at}u=0;let V=0;for(s=0;s=i&&(u=i-1);let c=(r.north-t.latitude)/l|0;return c>=a&&(c=a-1),g(n)?(n.x=u,n.y=c,n):new Pt(u,c)};var De=rt,Ie=new t,He=new t,ke=new u,ee=new t,hn=new t,ye=new U,pn=new De,Lt=[new u,new u,new u,new u],Ot=new Pt,w={};function Ae(t){u.fromRadians(t.east,t.north,0,Lt[0]),u.fromRadians(t.west,t.north,0,Lt[1]),u.fromRadians(t.east,t.south,0,Lt[2]),u.fromRadians(t.west,t.south,0,Lt[3]);let e,n=0,r=0,i=0,a=0,o=w._terrainHeightsMaxLevel;for(e=0;e<=o;++e){let t=!1;for(let n=0;n<4;++n){let r=Lt[n];if(pn.positionToTileXY(r,e,Ot),0===n)i=Ot.x,a=Ot.y;else if(i!==Ot.x||a!==Ot.y){t=!0;break}}if(t)break;n=i,r=a}if(0!==e)return{x:n,y:r,level:e>o?o:e-1}}w.initialize=function(){let t=w._initPromise;return g(t)||(t=xe.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then((function(t){w._terrainHeights=t})),w._initPromise=t),t},w.getMinimumMaximumHeights=function(e,n){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");n=O(n,z.WGS84);let r=Ae(e),i=w._defaultMinTerrainHeight,a=w._defaultMaxTerrainHeight;if(g(r)){let o=`${r.level}-${r.x}-${r.y}`,l=w._terrainHeights[o];g(l)&&(i=l[0],a=l[1]),n.cartographicToCartesian(G.northeast(e,ke),Ie),n.cartographicToCartesian(G.southwest(e,ke),He),t.midpoint(He,Ie,ee);let s=n.scaleToGeodeticSurface(ee,hn);if(g(s)){let e=t.distance(ee,s);i=Math.min(i,-e)}else i=w._defaultMinTerrainHeight}return i=Math.max(w._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:a}},w.getBoundingSphere=function(t,e){if(et.defined("rectangle",t),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");e=O(e,z.WGS84);let n=Ae(t),r=w._defaultMaxTerrainHeight;if(g(n)){let t=`${n.level}-${n.x}-${n.y}`,e=w._terrainHeights[t];g(e)&&(r=e[1])}let i=U.fromRectangle3D(t,e,0);return U.fromRectangle3D(t,e,r,ye),U.union(i,ye,i)},w._terrainHeightsMaxLevel=6,w._defaultMaxTerrainHeight=9e3,w._defaultMinTerrainHeight=-1e5,w._terrainHeights=void 0,w._initPromise=void 0,Object.defineProperties(w,{initialized:{get:function(){return g(w._terrainHeights)}}});var Xt=w,le=[bt,_e],dn=le.length,Ke=Math.cos(p.toRadians(30)),Me=Math.cos(p.toRadians(150)),Qe=0,tn=1e3;function ct(t){let e=(t=O(t,O.EMPTY_OBJECT)).positions;if(!g(e)||e.length<2)throw new St("At least two positions are required.");if(g(t.arcType)&&t.arcType!==Z.GEODESIC&&t.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=O(t.width,1),this._positions=e,this.granularity=O(t.granularity,9999),this.loop=O(t.loop,!1),this.arcType=O(t.arcType,Z.GEODESIC),this._ellipsoid=z.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+z.packedLength+1+1}}}),ct.setProjectionAndEllipsoid=function(t,e){let n=0;for(let t=0;tKe||op.PI_OVER_TWO&&(s=!0,l=t.subtract(o,r,Xe),h=c.cartesianToCartographic(l,je)),h.height=0;let g=e.project(h,a);return(a=t.subtract(g,i,a)).z=0,a=t.normalize(a,a),s&&t.negate(a,a),a}var An=new t,Ye=new t;function Fe(e,n,r,i,a,o){let l=t.subtract(n,e,An);t.normalize(l,l);let s=r-Qe,u=t.multiplyByScalar(l,s,Ye);t.add(e,u,a);let c=i-tn;u=t.multiplyByScalar(l,c,Ye),t.add(n,u,o)}var Mn=new t;function Gt(e,n){let r=jt.getPointDistance(Ut,e),i=jt.getPointDistance(Ut,n),a=Mn;p.equalsEpsilon(r,0,p.EPSILON2)?(a=nt(n,e,a),t.multiplyByScalar(a,p.EPSILON2,a),t.add(e,a,e)):p.equalsEpsilon(i,0,p.EPSILON2)&&(a=nt(e,n,a),t.multiplyByScalar(a,p.EPSILON2,a),t.add(n,a,n))}function Rn(t,e){let n=Math.abs(t.longitude),r=Math.abs(e.longitude);if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let r=p.sign(e.longitude);return t.longitude=r*(n-p.EPSILON11),1}if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let n=p.sign(t.longitude);return e.longitude=n*(r-p.EPSILON11),2}return 0}var nn=new u,on=new u,Ge=new t,re=new t,Ue=new t,We=new t,Pn=new t,qe=new t,bn=[nn,on],vn=new G,Bn=new t,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,ae=new t,ce=new t,Gn=new t,Un=new t,Wn=new t,Ze=new t,qn=new t,Zn=new t,Vn=new _t,$n=new _t,Ve=new t,Jn=new t,$e=new t,Kn=[new U,new U],rn=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Je=rn.length;function Qn(e,n,r,i,a,o,l){let s,u,c,h,g,d,f=n._ellipsoid,w=r.length/3-1,m=8*w,O=4*m,y=36*w,T=m>65535?new Uint32Array(y):new Uint16Array(y),_=new Float64Array(3*m),k=new Float32Array(O),P=new Float32Array(O),E=new Float32Array(O),L=new Float32Array(O),S=new Float32Array(O);l&&(c=new Float32Array(O),h=new Float32Array(O),g=new Float32Array(O),d=new Float32Array(2*m));let A=o.length/2,N=0,b=nn;b.height=0;let v=on;v.height=0;let D=Ge,j=re;if(l)for(u=0,s=1;sKe?(w=Dt(n,b,T,e,ae),m=Dt(n,v,B,s,ce)):1===r?(m=Dt(n,v,B,s,ce),w.x=0,w.y=p.sign(b.longitude-Math.abs(v.longitude)),w.z=0):(w=Dt(n,b,T,e,ae),m.x=0,m.y=p.sign(b.longitude-v.longitude),m.z=0)}let A=t.distance(y,R),D=_t.fromCartesian(O,Vn),j=t.subtract(F,O,Gn),z=t.normalize(j,Ze),U=t.subtract(y,O,Un);U=t.normalize(U,U);let W=t.cross(z,U,Ze);W=t.normalize(W,W);let V=t.cross(U,T,qn);V=t.normalize(V,V);let J=t.subtract(R,F,Wn);J=t.normalize(J,J);let K=t.cross(B,J,Zn);K=t.normalize(K,K);let $,tt,et,rt=A/H,it=X/H,at=0,ot=0,lt=0;if(l){at=t.distance(e,s),$=_t.fromCartesian(e,$n),tt=t.subtract(s,e,Ve),et=t.normalize(tt,Jn);let n=et.x;et.x=et.y,et.y=-n,ot=at/N,lt=q/N}for(I=0;I<8;I++){let e=C+4*I,n=M+2*I,r=e+3,i=I<4?1:-1,a=2===I||3===I||6===I||7===I?1:-1;t.pack(D.high,k,e),k[r]=j.x,t.pack(D.low,P,e),P[r]=j.y,t.pack(V,E,e),E[r]=j.z,t.pack(K,L,e),L[r]=rt*i,t.pack(W,S,e);let o=it*a;0===o&&a<0&&(o=9),S[r]=o,l&&(c[e]=$.high.x,c[e+1]=$.high.y,c[e+2]=$.low.x,c[e+3]=$.low.y,g[e]=-w.y,g[e+1]=w.x,g[e+2]=m.y,g[e+3]=-m.x,h[e]=tt.x,h[e+1]=tt.y,h[e+2]=et.x,h[e+3]=et.y,d[n]=ot*i,o=lt*a,0===o&&a<0&&(o=9),d[n+1]=o)}let st=jn,ut=Xn,ct=Bn,pt=zn,ht=G.fromCartographicArray(bn,vn),gt=Xt.getMinimumMaximumHeights(ht,f),dt=gt.minimumTerrainHeight,ft=gt.maximumTerrainHeight;Q+=Math.abs(dt),Q+=Math.abs(ft),Fe(O,y,dt,ft,st,ct),Fe(F,R,dt,ft,ut,pt);let wt=t.multiplyByScalar(W,p.EPSILON5,$e);t.add(st,wt,st),t.add(ut,wt,ut),t.add(ct,wt,ct),t.add(pt,wt,pt),Gt(st,ut),Gt(ct,pt),t.pack(st,_,Y),t.pack(ut,_,Y+3),t.pack(pt,_,Y+6),t.pack(ct,_,Y+9),wt=t.multiplyByScalar(W,-2*p.EPSILON5,$e),t.add(st,wt,st),t.add(ut,wt,ut),t.add(ct,wt,ct),t.add(pt,wt,pt),Gt(st,ut),Gt(ct,pt),t.pack(st,_,Y+12),t.pack(ut,_,Y+15),t.pack(pt,_,Y+18),t.pack(ct,_,Y+21),x+=2,u+=3,M+=16,Y+=24,C+=32,X+=A,q+=at}u=0;let W=0;for(s=0;sMath.PI&&(t-=c.TWO_PI),t}}});var st=new Z,Vt=new f;b.prototype.getLatitude=function(t){P(t)||(t=v.WGS84),st.latitude=this.conformalLatitude,st.longitude=this.longitude,st.height=0;let e=this.ellipsoid.cartographicToCartesian(st,Vt);return t.cartesianToCartographic(e,st),st.latitude};var Mt=new bt,Bt=new f,jt=new f;b.fromCartesian=function(t,e){G.defined("cartesian",t);let o=c.signNotZero(t.z),n=b.NORTH_POLE_TANGENT_PLANE,r=b.SOUTH_POLE;o<0&&(n=b.SOUTH_POLE_TANGENT_PLANE,r=b.NORTH_POLE);let i=Mt;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=f.subtract(i.origin,r,Bt),f.normalize(i.direction,i.direction);let a=Et.rayPlane(i,n.plane,jt),s=f.subtract(a,r,a),l=f.dot(n.xAxis,s),u=o*f.dot(n.yAxis,s);return P(e)?(e.position=new E(l,u),e.tangentPlane=n,e):new b(new E(l,u),n)},b.fromCartesianArray=function(t,e){G.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;nnt.eastOverIDL-nt.westOverIDL&&(r.west=nt.westOverIDL,r.east=nt.eastOverIDL,r.east>c.PI&&(r.east=r.east-c.TWO_PI),r.west>c.PI&&(r.west=r.west-c.TWO_PI)),r}var ne=new Z;function Rt(t,e,o,n){let r=t.surfaceDistance,i=Math.ceil(r*e),a=i>0?r/(i-1):Number.POSITIVE_INFINITY,s=0;for(let e=0;e=0?r:r+c.TWO_PI;n.westOverIDL=Math.min(n.westOverIDL,l),n.eastOverIDL=Math.max(n.eastOverIDL,l)}}var Lt=[];function ie(t,e,o,n,r,i,a,s,l,c){let u,h={walls:[]};if(a||s){let r,p,g=S.createGeometryFromPositions(t,e,o,n,i,l,c),m=g.attributes.position.values,f=g.indices;if(a&&s){let t=m.concat(m);r=t.length/3,p=ut.createTypedArray(r,2*f.length),p.set(f);let e=f.length,n=r/2;for(u=0;u=0?a:a+c.TWO_PI;r.westOverIdl=Math.min(r.westOverIdl,s),r.eastOverIdl=Math.max(r.eastOverIdl,s),i.west=Math.min(i.west,a),i.east=Math.max(i.east,a);let l=t.getLatitude(o),u=l;if(i.south=Math.min(i.south,l),i.north=Math.max(i.north,l),n!==X.RHUMB){let n=E.subtract(e.position,t.position,ce),r=E.dot(e.position,n)/E.dot(n,n);if(r>0&&r<1){let t=E.add(e.position,E.multiplyByScalar(n,-r,n),he),a=k.clone(e,fe);a.position=t;let s=a.getLatitude(o);i.south=Math.min(i.south,s),i.north=Math.max(i.north,s),Math.abs(l)>Math.abs(s)&&(u=s)}}let h=e.x*t.y-t.x*e.y,p=Math.sign(h);0!==p&&(p*=E.angleBetween(e.position,t.position)),u>=0&&(r.northAngle+=p),u<=0&&(r.southAngle+=p)}var St=new k,le=new k,Y={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};z.computeRectangleFromPositions=function(t,e,o,n){if(G.defined("positions",t),P(n)||(n=new lt),t.length<3)return n;n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,Y.northAngle=0,Y.southAngle=0,Y.westOverIdl=Number.POSITIVE_INFINITY,Y.eastOverIdl=Number.NEGATIVE_INFINITY;let r=t.length,i=k.fromCartesian(t[0],le);for(let a=1;aY.eastOverIdl-Y.westOverIdl&&(n.west=Y.westOverIdl,n.east=Y.eastOverIdl,n.east>c.PI&&(n.east=n.east-c.TWO_PI),n.west>c.PI&&(n.west=n.west-c.TWO_PI)),c.equalsEpsilon(Math.abs(Y.northAngle),c.TWO_PI,c.EPSILON10)&&(n.north=c.PI_OVER_TWO,n.east=c.PI,n.west=-c.PI),c.equalsEpsilon(Math.abs(Y.southAngle),c.TWO_PI,c.EPSILON10)&&(n.south=-c.PI_OVER_TWO,n.east=c.PI,n.west=-c.PI),n},z.computeRectangle=function(t,e){G.typeOf.object("options",t),G.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),Nt("PolygonGeometry.computeRectangle","PolygonGeometry.computeRectangle was deprecated in CesiumJS 1.110. It will be removed in CesiumJS 1.112. Use PolygonGeometry.computeRectangleFromPositions instead.");let o=N(t.granularity,c.RADIANS_PER_DEGREE),n=N(t.arcType,X.GEODESIC);if(n!==X.GEODESIC&&n!==X.RHUMB)throw new rt("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let r=t.polygonHierarchy,i=N(t.ellipsoid,v.WGS84);return oe(r.positions,i,n,o,e)};var me=new k;function ue(t,e,o){return t.height>=c.PI||t.width>=c.PI?k.fromCartesian(e[0],me).tangentPlane:K.fromPoints(e,o)}var Ft=new Z;function de(t,e,o){return(n,r)=>{if(t.height>=c.PI||t.width>=c.PI){if(t.south<0&&t.north>0){P(r)||(r=[]);for(let t=0;t=c.PI||t.width>=c.PI)return(e,n)=>{if(t.south<0&&t.north>0){let t=o.cartesianToCartographic(e,Ft);return P(n)||(n=new E),n.x=t.longitude/c.PI,n.y=t.latitude/c.PI_OVER_TWO,n}return k.fromCartesian(e,n)};let n=K.fromPoints(e,o);return(t,e)=>n.projectPointsOntoPlane(t,e)}function pe(t,e,o,n){return(r,i)=>!n&&(t.height>=c.PI_OVER_TWO||t.width>=2*c.PI_OVER_THREE)?S.splitPolygonsOnEquator(r,e,o,i):r}function Pe(t,e,o,n){if(e.height>=c.PI||e.width>=c.PI)return Pt.fromRectangle(e,void 0,Ct);let r=t,i=K.fromPoints(r,o);return S.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),r,n,Ct)}function _e(t){let e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,r=t.rectangle;return pt._textureCoordinateRotationPoints(n,e,o,r)}z.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,r=t._stRotation,i=t._polygonHierarchy,a=t._perPositionHeight,s=t._closeTop,l=t._closeBottom,u=t._arcType,h=t._textureCoordinates,p=P(h),g=i.positions;if(g.length<3)return;let m=t.rectangle,f=S.polygonsFromHierarchy(i,p,de(m,g,o),!a,o,pe(m,o,u,a)),d=f.hierarchy,y=f.polygons,_=p?S.polygonsFromHierarchy(h,!0,(function(t){return t}),!1,o).polygons:void 0;if(0===d.length)return;let I,T=d[0].outerRing,w=Pe(T,m,o,r),b=[],E=t._height,O=t._extrudedHeight,N=t._perPositionHeightExtrude||!c.equalsEpsilon(E,O,0,c.EPSILON2),v={perPositionHeight:a,vertexFormat:e,geometry:void 0,rotationAxis:ue(m,T,o).plane.normal,projectTo2d:ge(m,T,o),boundingRectangle:w,ellipsoid:o,stRotation:r,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u};if(N)for(v.extrude=!0,v.top=s,v.bottom=l,v.shadowVolume=t._shadowVolume,v.offsetAttribute=t._offsetAttribute,I=0;IMath.PI&&(t-=l.TWO_PI),t}}});var it=new ot,Rt=new c;b.prototype.getLatitude=function(t){P(t)||(t=V.WGS84),it.latitude=this.conformalLatitude,it.longitude=this.longitude,it.height=0;let e=this.ellipsoid.cartographicToCartesian(it,Rt);return t.cartesianToCartographic(e,it),it.latitude};var It=new wt,Lt=new c,Ft=new c;b.fromCartesian=function(t,e){q.defined("cartesian",t);let o=l.signNotZero(t.z),i=b.NORTH_POLE_TANGENT_PLANE,n=b.SOUTH_POLE;o<0&&(i=b.SOUTH_POLE_TANGENT_PLANE,n=b.NORTH_POLE);let r=It;r.origin=i.ellipsoid.scaleToGeocentricSurface(t,r.origin),r.direction=c.subtract(r.origin,n,Lt),c.normalize(r.direction,r.direction);let a=yt.rayPlane(r,i.plane,Ft),s=c.subtract(a,n,a),u=c.dot(i.xAxis,s),h=o*c.dot(i.yAxis,s);return P(e)?(e.position=new O(u,h),e.tangentPlane=i,e):new b(new O(u,h),i)},b.fromCartesianArray=function(t,e){q.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let i=0;i=0?a:a+l.TWO_PI;n.westOverIdl=Math.min(n.westOverIdl,s),n.eastOverIdl=Math.max(n.eastOverIdl,s),r.west=Math.min(r.west,a),r.east=Math.max(r.east,a);let c=t.getLatitude(o),u=c;if(r.south=Math.min(r.south,c),r.north=Math.max(r.north,c),i!==at.RHUMB){let i=O.subtract(e.position,t.position,Jt),n=O.dot(e.position,i)/O.dot(i,i);if(n>0&&n<1){let t=O.add(e.position,O.multiplyByScalar(i,-n,i),Xt),a=D.clone(e,$t);a.position=t;let s=a.getLatitude(o);r.south=Math.min(r.south,s),r.north=Math.max(r.north,s),Math.abs(c)>Math.abs(s)&&(u=s)}}let h=e.x*t.y-t.x*e.y,p=Math.sign(h);0!==p&&(p*=O.angleBetween(e.position,t.position)),u>=0&&(n.northAngle+=p),u<=0&&(n.southAngle+=p)}var Ct=new D,te=new D,U={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};G.computeRectangleFromPositions=function(t,e,o,i){if(q.defined("positions",t),P(i)||(i=new _t),t.length<3)return i;i.west=Number.POSITIVE_INFINITY,i.east=Number.NEGATIVE_INFINITY,i.south=Number.POSITIVE_INFINITY,i.north=Number.NEGATIVE_INFINITY,U.northAngle=0,U.southAngle=0,U.westOverIdl=Number.POSITIVE_INFINITY,U.eastOverIdl=Number.NEGATIVE_INFINITY;let n=t.length,r=D.fromCartesian(t[0],te);for(let a=1;aU.eastOverIdl-U.westOverIdl&&(i.west=U.westOverIdl,i.east=U.eastOverIdl,i.east>l.PI&&(i.east=i.east-l.TWO_PI),i.west>l.PI&&(i.west=i.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(U.northAngle),l.TWO_PI,l.EPSILON10)&&(i.north=l.PI_OVER_TWO,i.east=l.PI,i.west=-l.PI),l.equalsEpsilon(Math.abs(U.southAngle),l.TWO_PI,l.EPSILON10)&&(i.south=-l.PI_OVER_TWO,i.east=l.PI,i.west=-l.PI),i};var ee=new D;function oe(t,e,o){return t.height>=l.PI||t.width>=l.PI?D.fromCartesian(e[0],ee).tangentPlane:K.fromPoints(e,o)}var Nt=new ot;function ne(t,e,o){return(i,n)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(n)||(n=[]);for(let t=0;t=l.PI||t.width>=l.PI)return(e,i)=>{if(t.south<0&&t.north>0){let t=o.cartesianToCartographic(e,Nt);return P(i)||(i=new O),i.x=t.longitude/l.PI,i.y=t.latitude/l.PI_OVER_TWO,i}return D.fromCartesian(e,i)};let i=K.fromPoints(e,o);return(t,e)=>i.projectPointsOntoPlane(t,e)}function re(t,e,o,i){return(n,r)=>!i&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?F.splitPolygonsOnEquator(n,e,o,r):n}function se(t,e,o,i){if(e.height>=l.PI||e.width>=l.PI)return dt.fromRectangle(e,void 0,Et);let n=t,r=K.fromPoints(n,o);return F.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),n,i,Et)}function ae(t){let e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];let o=t._ellipsoid,i=t._polygonHierarchy.positions,n=t.rectangle;return mt._textureCoordinateRotationPoints(i,e,o,n)}G.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,i=t._granularity,n=t._stRotation,r=t._polygonHierarchy,a=t._perPositionHeight,s=t._closeTop,c=t._closeBottom,u=t._arcType,h=t._textureCoordinates,p=P(h),g=r.positions;if(g.length<3)return;let m=t.rectangle,d=F.polygonsFromHierarchy(r,p,ne(m,g,o),!a,o,re(m,o,u,a)),f=d.hierarchy,y=d.polygons,_=p?F.polygonsFromHierarchy(h,!0,(function(t){return t}),!1,o).polygons:void 0;if(0===f.length)return;let O,T=f[0].outerRing,b=se(T,m,o,n),w=[],I=t._height,A=t._extrudedHeight,E=t._perPositionHeightExtrude||!l.equalsEpsilon(I,A,0,l.EPSILON2),H={perPositionHeight:a,vertexFormat:e,geometry:void 0,rotationAxis:oe(m,T,o).plane.normal,projectTo2d:ie(m,T,o),boundingRectangle:b,ellipsoid:o,stRotation:n,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u};if(E)for(H.extrude=!0,H.top=s,H.bottom=c,H.shadowVolume=t._shadowVolume,H.offsetAttribute=t._offsetAttribute,O=0;O0?new Array(n):void 0;for(o=0;o0){let e=0,t=d[0];i=i.filter((function(r,o){let n=!1;return n=s?o===t||0===o&&1===t:o+1===t,!n||(e++,t=d[e],!1)}))}let k=f.length;if(k<2||n<=0)return;if(l===N.GEODESIC||l===N.RHUMB){let e,o;l===N.GEODESIC?(e=J.chordLength(c,u.maximumRadius),o=U.numberOfPoints):(e=c,o=U.numberOfPointsRhumbLine);let n=U.extractHeights(f,u);if(h(i)){let n=1;for(t=0;t0?new Array(n):void 0;for(o=0;o0){let e=0,t=d[0];i=i.filter((function(r,o){let n=!1;return n=s?o===t||0===o&&1===t:o+1===t,!n||(e++,t=d[e],!1)}))}let f=k.length;if(f<2||n<=0)return;if(l===N.GEODESIC||l===N.RHUMB){let e,o;l===N.GEODESIC?(e=J.chordLength(c,u.maximumRadius),o=U.numberOfPoints):(e=c,o=U.numberOfPointsRhumbLine);let n=U.extractHeights(k,u);if(h(i)){let n=1;for(t=0;t1||A>1))for(let t=0;t0;n-=c)Q=3*n,G=ht(G,J,Q,m,d),J+=6,r.st&&(V=pt(V,z,2*n,y),z+=4),o&&(B+=3,M[B++]=w[Q],M[B++]=w[Q+1],M[B++]=w[Q+2]),U&&(C[Z++]=1,Z+=1);if(S){let t=K;for(Q=3*t,n=0;n<2;n++)G=ht(G,J,Q,m,d),J+=6,r.st&&(V=pt(V,z,2*t,y),z+=4),o&&(B+=3,M[B++]=w[Q],M[B++]=w[Q+1],M[B++]=w[Q+2]),U&&(C[Z++]=1,Z+=1)}else for(n=c-1;n>=0;n--)Q=3*n,G=ht(G,J,Q,m,d),J+=6,r.st&&(V=pt(V,z,2*n,y),z+=4),o&&(B+=3,M[B++]=w[Q],M[B++]=w[Q+1],M[B++]=w[Q+2]),U&&(C[Z++]=1,Z+=1);let tt=te(G,r,l);r.st&&(tt.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),o&&(tt.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:M})),R&&(tt.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:C}));let et,nt,ot,at,rt=yt.createTypedArray(I,6*H);h=G.length/3;let it=0;for(n=0;n1||A>1))for(let t=0;t0;n-=c)C=3*n,G=ht(G,J,C,m,d),J+=6,r.st&&(Q=pt(Q,z,2*n,y),z+=4),o&&(B+=3,M[B++]=w[C],M[B++]=w[C+1],M[B++]=w[C+2]),U&&(V[Z++]=1,Z+=1);if(P){let t=K;for(C=3*t,n=0;n<2;n++)G=ht(G,J,C,m,d),J+=6,r.st&&(Q=pt(Q,z,2*t,y),z+=4),o&&(B+=3,M[B++]=w[C],M[B++]=w[C+1],M[B++]=w[C+2]),U&&(V[Z++]=1,Z+=1)}else for(n=c-1;n>=0;n--)C=3*n,G=ht(G,J,C,m,d),J+=6,r.st&&(Q=pt(Q,z,2*n,y),z+=4),o&&(B+=3,M[B++]=w[C],M[B++]=w[C+1],M[B++]=w[C+2]),U&&(V[Z++]=1,Z+=1);let tt=te(G,r,l);r.st&&(tt.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:Q})),o&&(tt.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:M})),F&&(tt.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:V}));let et,nt,ot,at,rt=yt.createTypedArray(I,6*D);h=G.length/3;let it=0;for(n=0;n=0;h--)N.computePosition(e,i,!1,m,h,g),p[f++]=g.x,p[f++]=g.y,p[f++]=g.z;for(h=0,m=r-2;m>0;m--)N.computePosition(e,i,!1,m,h,g),p[f++]=g.x,p[f++]=g.y,p[f++]=g.z;let d=p.length/3*2,_=O.createTypedArray(p.length/3,d),b=0;for(let t=0;t=0;h--)C.computePosition(e,i,!1,d,h,g),p[f++]=g.x,p[f++]=g.y,p[f++]=g.z;for(h=0,d=r-2;d>0;d--)C.computePosition(e,i,!1,d,h,g),p[f++]=g.x,p[f++]=g.y,p[f++]=g.z;let m=p.length/3*2,_=O.createTypedArray(p.length/3,m),b=0;for(let t=0;t0?new Array(n):void 0;for(a=0;a0&&(k.pack(a,o,e),e+=3,i=s[t-1],n[c++]=r.floatToByte(i.red),n[c++]=r.floatToByte(i.green),n[c++]=r.floatToByte(i.blue),n[c++]=r.floatToByte(i.alpha)),y&&t===g-1)break;k.pack(a,o,e),e+=3,u(s)&&(i=s[t],n[c++]=r.floatToByte(i.red),n[c++]=r.floatToByte(i.green),n[c++]=r.floatToByte(i.blue),n[c++]=r.floatToByte(i.alpha))}}let T=new Q;T.position=new Y({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:o}),u(s)&&(T.color=new Y({componentDatatype:H.UNSIGNED_BYTE,componentsPerAttribute:4,values:n,normalize:!0})),a=o.length/3;let w=2*(a-1),_=X.createTypedArray(a,w),B=0;for(t=0;t0?new Array(n):void 0;for(a=0;a0&&(k.pack(a,o,e),e+=3,i=s[t-1],n[p++]=r.floatToByte(i.red),n[p++]=r.floatToByte(i.green),n[p++]=r.floatToByte(i.blue),n[p++]=r.floatToByte(i.alpha)),y&&t===g-1)break;k.pack(a,o,e),e+=3,u(s)&&(i=s[t],n[p++]=r.floatToByte(i.red),n[p++]=r.floatToByte(i.green),n[p++]=r.floatToByte(i.blue),n[p++]=r.floatToByte(i.alpha))}}let T=new Q;T.position=new Y({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:o}),u(s)&&(T.color=new Y({componentDatatype:H.UNSIGNED_BYTE,componentsPerAttribute:4,values:n,normalize:!0})),a=o.length/3;let w=2*(a-1),_=X.createTypedArray(a,w),B=0;for(t=0;t0&&z.length>0){let t=Z[0].index,e=nt,n=z[z.length-1].index,i=O.length-1;X.push(n,i,e,e,t,n)}W=O.length;let at,ut=zt.fromPoints(O);ht(i)&&(at=Dt.fromRectangle(i,B,y,n));let st=new Gt(n).computeHorizonCullingPointPossiblyUnderEllipsoid(e,O,B),ct=new qt(F,v,e),dt=new Xt(e,ct,rt.hMin,y,w,!1,h,A,a,s),pt=new Float32Array(W*dt.stride),It=0;for(let t=0;t0&&i.push(i[f]),o.length>0&&o.push(o[f]),$.multiplyByPoint(s.toENU,S,G);let w=s.minimum,k=s.maximum;P.minimumByComponent(G,w,w),P.maximumByComponent(G,k,k);let A=s.lastBorderPoint;if(ht(A)){let t=A.index;a.push(t,E-1,E,E,f,t)}s.lastBorderPoint=p}}var Ae=kt(oe);export{Ae as default}; \ No newline at end of file +import{a as Gt,b as Xt}from"./chunk-HCYU7WEB.js";import{a as kt}from"./chunk-R7GRRUJS.js";import{a as lt}from"./chunk-Q3ITDG7Y.js";import{a as Dt}from"./chunk-HRTRKKEE.js";import"./chunk-FZIR7YHL.js";import"./chunk-JATOGJGF.js";import{a as qt}from"./chunk-U54QHQ4X.js";import"./chunk-EQAHH27B.js";import"./chunk-LWO5EUNN.js";import{d as zt,h as Lt}from"./chunk-LYPPBP4Q.js";import"./chunk-PCFGFNNQ.js";import"./chunk-V2SDNSQR.js";import{b as $,c as Ot}from"./chunk-S7TTFAYA.js";import"./chunk-TLYHKSDJ.js";import{a as P,b as N,c as wt,d as Ht}from"./chunk-PYVDHCDQ.js";import{a as r}from"./chunk-JMWWNZHX.js";import"./chunk-DNO4OWAM.js";import{a as Vt}from"./chunk-XDVDNOI4.js";import{a as Ut}from"./chunk-Z3SYNMQT.js";import"./chunk-4KGDZUZQ.js";import{e as ht}from"./chunk-F3TINEFX.js";var te=Uint16Array.BYTES_PER_ELEMENT,mt=Int32Array.BYTES_PER_ELEMENT,Pt=Uint32Array.BYTES_PER_ELEMENT,ee=Float32Array.BYTES_PER_ELEMENT,H=Float64Array.BYTES_PER_ELEMENT;function tt(t,e,n){n=Ut(n,r);let i=t.length;for(let o=0;o0&&K.length>0){let t=z[0].index,e=nt,n=K[K.length-1].index,i=O.length-1;X.push(n,i,e,e,t,n)}Y=O.length;let at,ut=zt.fromPoints(O);ht(i)&&(at=Dt.fromRectangle(i,F,y,n));let st=new Gt(n).computeHorizonCullingPointPossiblyUnderEllipsoid(e,O,F),ct=new qt(B,M,e),dt=new Xt(e,ct,rt.hMin,y,k,!1,h,R,a,s),pt=new Float32Array(Y*dt.stride),It=0;for(let t=0;t0&&i.push(i[E]),o.length>0&&o.push(o[E]),$.multiplyByPoint(s.toENU,w,G);let k=s.minimum,A=s.maximum;P.minimumByComponent(G,k,k),P.maximumByComponent(G,A,A);let H=s.lastBorderPoint;if(ht(H)){let t=H.index;a.push(t,T-1,T,T,E,t)}s.lastBorderPoint=p}}var Ae=kt(oe);export{Ae as default}; \ No newline at end of file diff --git a/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js.LICENSE.txt b/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js.LICENSE.txt index 7f5f415..521c7d2 100644 --- a/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js.LICENSE.txt +++ b/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js.LICENSE.txt @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 + * Version 1.115 * * Copyright 2011-2022 Cesium Contributors * diff --git a/Workers/createVerticesFromHeightmap.js b/Workers/createVerticesFromHeightmap.js index 5838323..ef4f3c5 100644 --- a/Workers/createVerticesFromHeightmap.js +++ b/Workers/createVerticesFromHeightmap.js @@ -1,2 +1,2 @@ /*! For license information please see createVerticesFromHeightmap.js.LICENSE.txt */ -import{a as sr,b as fr}from"./chunk-RILDKADO.js";import{a as tr}from"./chunk-2SKW2VRQ.js";import{a as Ue}from"./chunk-EXJ3OQJJ.js";import{a as ar}from"./chunk-PYQRNF73.js";import"./chunk-IYTTCRXN.js";import"./chunk-QCBYIBZJ.js";import{a as nr}from"./chunk-5XT3QCZD.js";import"./chunk-ZKNXHPHD.js";import"./chunk-W5ZMPE2M.js";import{d as er,i as ir}from"./chunk-YIFABOF6.js";import"./chunk-PQVQONHO.js";import{b as xe,c as ae,d as rr}from"./chunk-KDW4RGIR.js";import"./chunk-VNDUYYBJ.js";import{a as ie,c as Ie}from"./chunk-V624RX7A.js";import{a as ge}from"./chunk-VZ2RFJ3P.js";import"./chunk-RN5GA5QZ.js";import{a as He}from"./chunk-TWC6ISJU.js";import{a as Y}from"./chunk-RKPKWH3Z.js";import{a as he}from"./chunk-BIYNNQRQ.js";import{c as Ir,d as xr,e as G}from"./chunk-ZLUSVROX.js";var ur=Ir(((e,t)=>{!function(){var e,i,r,a,n,s,l=(e={defaultNoDataValue:-34027999387901484e22,decode:function(t,s){var l=(s=s||{}).encodedMaskData||null===s.encodedMaskData,o=n(t,s.inputOffset||0,l),f=null!==s.noDataValue?s.noDataValue:e.defaultNoDataValue,u=i(o,s.pixelType||Float32Array,s.encodedMaskData,f,s.returnMask),h={width:o.width,height:o.height,pixelData:u.resultPixels,minValue:u.minValue,maxValue:o.pixels.maxValue,noDataValue:f};return u.resultMask&&(h.maskData=u.resultMask),s.returnEncodedMask&&o.mask&&(h.encodedMaskData=o.mask.bitset?o.mask.bitset:null),s.returnFileInfo&&(h.fileInfo=r(o),s.computeUsedBitDepths&&(h.fileInfo.bitDepths=a(o))),h}},i=function(e,t,i,r,a){var n,l,o,f=0,u=e.pixels.numBlocksX,h=e.pixels.numBlocksY,c=Math.floor(e.width/u),m=Math.floor(e.height/h),d=2*e.maxZError,g=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),l=new t(e.width*e.height),a&&i&&(o=new Uint8Array(e.width*e.height));for(var p,w,x=new Float32Array(c*m),k=0;k<=h;k++){var y=k!==h?m:e.height%h;if(0!==y)for(var I=0;I<=u;I++){var U=I!==u?c:e.width%u;if(0!==U){var b,v,T,V,A=k*e.width*m+I*c,M=e.width-U,D=e.pixels.blocks[f];if(D.encoding<2?(0===D.encoding?b=D.rawData:(s(D.stuffedData,D.bitsPerPixel,D.numValidPixels,D.offset,d,x,e.pixels.maxValue),b=x),v=0):T=2===D.encoding?0:D.offset,i)for(w=0;w>3],V<<=7&A),p=0;p>3]),128&V?(o&&(o[A]=1),g=g>(n=D.encoding<2?b[v++]:T)?n:g,l[A++]=n):(o&&(o[A]=0),l[A++]=r),V<<=1;A+=M}else if(D.encoding<2)for(w=0;w(n=b[v++])?n:g,l[A++]=n;A+=M}else for(g=g>T?T:g,w=0;w0){var s=new Uint8Array(Math.ceil(r.width*r.height/8)),l=(n=new DataView(e,t,r.mask.numBytes)).getInt16(0,!0),o=2,f=0;do{if(l>0)for(;l--;)s[f++]=n.getUint8(o++);else{var u=n.getUint8(o++);for(l=-l;l--;)s[f++]=u}l=n.getInt16(o,!0),o+=2}while(o0?1:0),d=c+(r.height%c>0?1:0);r.pixels.blocks=new Array(m*d);for(var g=0,p=0;p3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==I&&2!==I){if(I>>=6,y.offsetType=I,2===I)y.offset=n.getInt8(1),x++;else if(1===I)y.offset=n.getInt16(1,!0),x+=2;else{if(0!==I)throw"Invalid block offset type";y.offset=n.getFloat32(1,!0),x+=4}if(1===y.encoding)if(I=n.getUint8(x),x++,y.bitsPerPixel=63&I,I>>=6,y.numValidPixelsType=I,2===I)y.numValidPixels=n.getUint8(x),x++;else if(1===I)y.numValidPixels=n.getUint16(x,!0),x+=2;else{if(0!==I)throw"Invalid valid pixel count type";y.numValidPixels=n.getUint32(x,!0),x+=4}}var U;if(t+=x,3!==y.encoding)if(0===y.encoding){var b=(r.pixels.numBytes-1)/4;if(b!==Math.floor(b))throw"uncompressed block has invalid length";U=new ArrayBuffer(4*b),new Uint8Array(U).set(new Uint8Array(e,t,4*b));var v=new Float32Array(U);y.rawData=v,t+=4*b}else if(1===y.encoding){var T=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),V=Math.ceil(T/4);U=new ArrayBuffer(4*V),new Uint8Array(U).set(new Uint8Array(e,t,T)),y.stuffedData=new Uint32Array(U),t+=T}}else t++}return r.eofOffset=t,r},s=function(e,t,i,r,a,n,s){var l,o,f,u=(1<=t)o=f>>>c-t&u,c-=t;else{var g=t-c;o=(f&u)<>>(c=32-g)}n[l]=o=i?(f=u>>>g-i&m,g-=i):(f=(u&m)<<(h=i-g)&m,f+=(u=e[d++])>>>(g=32-h)),t[o]=a[f];else for(c=Math.ceil((l-n)/s),o=0;o=i?(f=u>>>g-i&m,g-=i):(f=(u&m)<<(h=i-g)&m,f+=(u=e[d++])>>>(g=32-h)),t[o]=f=i?(f=u>>>g&c,d-=i,g+=i):(f=u>>>g&c,d=32-(h=i-d),f|=((u=e[m++])&(1<=i?(f=u>>>g&c,d-=i,g+=i):(f=u>>>g&c,d=32-(h=i-d),f|=((u=e[m++])&(1<=359?359:a;a-=s;do{t+=e[n++]<<8,i+=t+=e[n++]}while(--s);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&r&&(i+=t+=e[n]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,r=new Uint8Array(e,i,6),a={};if(a.fileIdentifierString=String.fromCharCode.apply(null,r),0!==a.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+a.fileIdentifierString;i+=6;var n,s=new DataView(e,i,8),l=s.getInt32(0,!0);if(a.fileVersion=l,i+=4,l>=3&&(a.checksum=s.getUint32(4,!0),i+=4),s=new DataView(e,i,12),a.height=s.getUint32(0,!0),a.width=s.getUint32(4,!0),i+=8,l>=4?(a.numDims=s.getUint32(8,!0),i+=4):a.numDims=1,s=new DataView(e,i,40),a.numValidPixel=s.getUint32(0,!0),a.microBlockSize=s.getInt32(4,!0),a.blobSize=s.getInt32(8,!0),a.imageType=s.getInt32(12,!0),a.maxZError=s.getFloat64(16,!0),a.zMin=s.getFloat64(24,!0),a.zMax=s.getFloat64(32,!0),i+=40,t.headerInfo=a,t.ptr=i,l>=3&&(n=l>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-n,a.blobSize-14))!==a.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,r=this.getDataTypeArray(i.imageType),a=i.numDims*this.getDataTypeSize(i.imageType),n=this.readSubArray(e,t.ptr,r,a),s=this.readSubArray(e,t.ptr+a,r,a);t.ptr+=2*a;var l,o=!0;for(l=0;l0){i=new Uint8Array(Math.ceil(s/8));var u=(o=new DataView(e,a,f.numBytes)).getInt16(0,!0),h=2,c=0,m=0;do{if(u>0)for(;u--;)i[c++]=o.getUint8(h++);else for(m=o.getUint8(h++),u=-u;u--;)i[c++]=m;u=o.getInt16(h,!0),h+=2}while(h>3],d<<=7&g):d=i[g>>3],128&d&&(r[g]=1);t.pixels.resultMask=r,f.bitset=i,a+=f.numBytes}return t.ptr=a,t.mask=f,!0},readDataOneSweep:function(e,t,r){var a,n=t.ptr,s=t.headerInfo,l=s.numDims,o=s.width*s.height,f=s.imageType,u=s.numValidPixel*i.getDataTypeSize(f)*l,h=t.pixels.resultMask;if(r===Uint8Array)a=new Uint8Array(e,n,u);else{var c=new ArrayBuffer(u);new Uint8Array(c).set(new Uint8Array(e,n,u)),a=new r(c)}if(a.length===o*l)t.pixels.resultPixels=a;else{t.pixels.resultPixels=new r(o*l);var m=0,d=0,g=0,p=0;if(l>1)for(g=0;g=o)return!1;var f=new Uint32Array(o-l);i.decodeBits(e,t,f);var u,h,c,m,d=[];for(u=l;u0&&(d[h].second=x<>>32-m,32-y>=m?32===(y+=m)&&(y=0,x=k[++I]):(y+=m-32,x=k[++I],d[h].second|=x>>>32-y));var U,b=0,v=new r;for(u=0;u=a?a:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var T,V,A,M,D,B=[];for(u=l;u0)if(T=[m,h],m<=U)for(V=d[h].second<=0;M--)V>>>M&1?(D.right||(D.right=new r),D=D.right):(D.left||(D.left=new r),D=D.left),0===M&&!D.val&&(D.val=T[1]);return{decodeLut:B,numBitsLUTQick:U,numBitsLUT:b,tree:v,stuffedData:k,srcPtr:I,bitPos:y}},readHuffman:function(e,t,i){var r,a,n,s,l,o,f,u,h,c=t.headerInfo,m=c.numDims,d=t.headerInfo.height,g=t.headerInfo.width,p=g*d,w=this.readHuffmanTree(e,t),x=w.decodeLut,k=w.tree,y=w.stuffedData,I=w.srcPtr,U=w.bitPos,b=w.numBitsLUTQick,v=w.numBitsLUT,T=0===t.headerInfo.imageType?128:0,V=t.pixels.resultMask,A=0;U>0&&(I++,U=0);var M,D=y[I],B=1===t.encodeMode,S=new i(p*m),P=S;for(M=0;M1&&(P=new i(S.buffer,p*M,p),A=0),t.headerInfo.numValidPixel===g*d)for(u=0,o=0;o>>32-b,32-U>>64-U-b),x[l])a=x[l][1],U+=x[l][0];else for(l=s=D<>>32-v,32-U>>64-U-v),r=k,h=0;h>>v-h-1&1?r.right:r.left).left&&!r.right){a=r.val,U=U+h+1;break}U>=32&&(U-=32,D=y[++I]),n=a-T,B?(n+=f>0?A:o>0?P[u-g]:A,n&=255,P[u]=n,A=n):P[u]=n}else for(u=0,o=0;o>>32-b,32-U>>64-U-b),x[l])a=x[l][1],U+=x[l][0];else for(l=s=D<>>32-v,32-U>>64-U-v),r=k,h=0;h>>v-h-1&1?r.right:r.left).left&&!r.right){a=r.val,U=U+h+1;break}U>=32&&(U-=32,D=y[++I]),n=a-T,B?(f>0&&V[u-1]?n+=A:o>0&&V[u-g]?n+=P[u-g]:n+=A,n&=255,P[u]=n,A=n):P[u]=n}t.ptr=t.ptr+4*(I+1)+(U>0?4:0)}t.pixels.resultPixels=S},decodeBits:function(i,r,a,n,s){var l=r.headerInfo,o=l.fileVersion,f=0,u=new DataView(i,r.ptr,5),h=u.getUint8(0);f++;var c=h>>6,m=0===c?4:3-c,d=(32&h)>0,g=31&h,p=0;if(1===m)p=u.getUint8(f),f++;else if(2===m)p=u.getUint16(f,!0),f+=2;else{if(4!==m)throw"Invalid valid pixel count type";p=u.getUint32(f,!0),f+=4}var w,x,k,y,I,U,b,v,T,V=2*l.maxZError,A=l.numDims>1?l.maxValues[s]:l.zMax;if(d){for(r.counter.lut++,v=u.getUint8(f),f++,y=Math.ceil((v-1)*g/8),I=Math.ceil(y/4),x=new ArrayBuffer(4*I),k=new Uint8Array(x),r.ptr+=f,k.set(new Uint8Array(i,r.ptr,y)),b=new Uint32Array(x),r.ptr+=y,T=0;v-1>>>T;)T++;y=Math.ceil(p*T/8),I=Math.ceil(y/4),x=new ArrayBuffer(4*I),(k=new Uint8Array(x)).set(new Uint8Array(i,r.ptr,y)),w=new Uint32Array(x),r.ptr+=y,U=o>=3?function(e,t,i,r,a,n){var s,l=(1<=t?(c=s>>>m&l,h-=t,m+=t):(c=s>>>m&l,h=32-(u=t-h),c|=((s=e[o++])&(1<=t?(c=s>>>h-t&l,h-=t):(c=(s&l)<<(u=t-h)&l,c+=(s=e[o++])>>>(h=32-u)),m[f]=c=3?t(w,a,T,p,U):e(w,a,T,p,U)}else r.counter.bitstuffer++,T=g,r.ptr+=f,T>0&&(y=Math.ceil(p*T/8),I=Math.ceil(y/4),x=new ArrayBuffer(4*I),(k=new Uint8Array(x)).set(new Uint8Array(i,r.ptr,y)),w=new Uint32Array(x),r.ptr+=y,o>=3?null==n?function(e,t,i,r){var a,n,s,l,o=(1<=i?(n=s>>>h&o,u-=i,h+=i):(n=s>>>h&o,u=32-(l=i-u),n|=((s=e[f++])&(1<=i?(n=s>>>u-i&o,u-=i):(n=(s&o)<<(l=i-u)&o,n+=(s=e[f++])>>>(u=32-l)),t[a]=n}(w,a,T,p):e(w,a,T,p,!1,n,V,A))},readTiles:function(e,t,r){var a=t.headerInfo,n=a.width,s=a.height,l=a.microBlockSize,o=a.imageType,f=i.getDataTypeSize(o),u=Math.ceil(n/l),h=Math.ceil(s/l);t.pixels.numBlocksY=h,t.pixels.numBlocksX=u,t.pixels.ptr=0;var c,m,d,g,p,w,x,k,y=0,I=0,U=0,b=0,v=0,T=0,V=0,A=0,M=0,D=0,B=0,S=0,P=0,E=0,F=0,N=new r(l*l),R=s%l||l,Y=n%l||l,O=a.numDims,L=t.pixels.resultMask,C=t.pixels.resultPixels;for(U=0;U1&&(C=new r(t.pixels.resultPixels.buffer,n*s*k*f,n*s)),V=e.byteLength-t.ptr,m={},F=0,F++,M=(A=(c=new DataView(e,t.ptr,Math.min(10,V))).getUint8(0))>>6&255,(A>>2&15)!=(b*l>>3&15))throw"integrity issue";if((p=3&A)>3)throw t.ptr+=F,"Invalid block encoding ("+p+")";if(2!==p)if(0===p){if(t.counter.uncompressed++,t.ptr+=F,S=(S=v*T*f)<(P=e.byteLength-t.ptr)?S:P,d=new ArrayBuffer(S%f==0?S:S+f-S%f),new Uint8Array(d).set(new Uint8Array(e,t.ptr,S)),g=new r(d),E=0,L)for(y=0;y1)for(n=0;n=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,r){var a=0;switch(i){case 0:a=r.getInt8(t);break;case 1:a=r.getUint8(t);break;case 2:a=r.getInt16(t,!0);break;case 3:a=r.getUint16(t,!0);break;case 4:a=r.getInt32(t,!0);break;case 5:a=r.getUInt32(t,!0);break;case 6:a=r.getFloat32(t,!0);break;case 7:a=r.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return a}},r=function(e,t,i){this.val=e,this.left=t,this.right=i},a={decode:function(e,t){var r=(t=t||{}).noDataValue,a=0,n={};if(n.ptr=t.inputOffset||0,n.pixels={},i.readHeaderInfo(e,n)){var s=n.headerInfo,l=s.fileVersion,o=i.getDataTypeArray(s.imageType);i.readMask(e,n),s.numValidPixel!==s.width*s.height&&!n.pixels.resultMask&&(n.pixels.resultMask=t.maskData);var f,u=s.width*s.height;if(n.pixels.resultPixels=new o(u*s.numDims),n.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==s.numValidPixel)if(s.zMax===s.zMin)i.constructConstantSurface(n);else if(l>=4&&i.checkMinMaxRanges(e,n))i.constructConstantSurface(n);else{var h=new DataView(e,n.ptr,2),c=h.getUint8(0);if(n.ptr++,c)i.readDataOneSweep(e,n,o);else if(l>1&&s.imageType<=1&&Math.abs(s.maxZError-.5)<1e-5){var m=h.getUint8(1);if(n.ptr++,n.encodeMode=m,m>2||l<4&&m>1)throw"Invalid Huffman flag "+m;m?i.readHuffman(e,n,o):i.readTiles(e,n,o)}else i.readTiles(e,n,o)}n.eofOffset=n.ptr,t.inputOffset?(f=n.headerInfo.blobSize+t.inputOffset-n.ptr,Math.abs(f)>=1&&(n.eofOffset=t.inputOffset+n.headerInfo.blobSize)):(f=n.headerInfo.blobSize-n.ptr,Math.abs(f)>=1&&(n.eofOffset=n.headerInfo.blobSize));var d={width:s.width,height:s.height,pixelData:n.pixels.resultPixels,minValue:s.zMin,maxValue:s.zMax,validPixelCount:s.numValidPixel,dimCount:s.numDims,dimStats:{minValues:s.minValues,maxValues:s.maxValues},maskData:n.pixels.resultMask};if(n.pixels.resultMask&&i.isValidPixelValue(s.imageType,r)){var g=n.pixels.resultMask;for(a=0;a1&&y.fileInfo.mask&&y.fileInfo.mask.numBytes>0&&x.push(y.maskData),p++,k.pixels.push(y.pixelData),k.statistics.push({minValue:y.minValue,maxValue:y.maxValue,noDataValue:y.noDataValue,dimStats:y.dimStats})}if(r>1&&x.length>1){for(s=k.width*k.height,k.bandMasks=x,(g=new Uint8Array(s)).set(x[0]),a=1;a0,w=Y(e.isGeographic,!0),x=Y(e.ellipsoid,Ie.WGS84),k=1/x.maximumRadius,y=ae.clone(e.nativeRectangle),I=ae.clone(e.rectangle);G(I)?(t=I.west,i=I.south,r=I.east,a=I.north):w?(t=h(y.west),i=h(y.south),r=h(y.east),a=h(y.north)):(t=y.west*k,i=u-2*o(f(-y.south*k)),r=y.east*k,a=u-2*o(f(-y.north*k)));let U=e.relativeToCenter,b=G(U);U=b?U:ie.ZERO;let v=Y(e.includeWebMercatorT,!1),T=Y(e.exaggeration,1),V=Y(e.exaggerationRelativeHeight,0),A=1!==T,M=Y(e.structure,Q.DEFAULT_STRUCTURE),D=Y(M.heightScale,Q.DEFAULT_STRUCTURE.heightScale),B=Y(M.heightOffset,Q.DEFAULT_STRUCTURE.heightOffset),S=Y(M.elementsPerHeight,Q.DEFAULT_STRUCTURE.elementsPerHeight),P=Y(M.stride,Q.DEFAULT_STRUCTURE.stride),E=Y(M.elementMultiplier,Q.DEFAULT_STRUCTURE.elementMultiplier),F=Y(M.isBigEndian,Q.DEFAULT_STRUCTURE.isBigEndian),N=ae.computeWidth(y),R=ae.computeHeight(y),O=N/(m-1),L=R/(d-1);w||(N*=k,R*=k);let C,z,H=x.radiiSquared,_=H.x,j=H.y,X=H.z,Z=65536,W=-65536,J=ir.eastNorthUpToFixedFrame(U,x),q=xe.inverseTransformation(J,Tr);v&&(C=Ue.geodeticLatitudeToMercatorAngle(i),z=1/(Ue.geodeticLatitudeToMercatorAngle(a)-C));let K=kr;K.x=Number.POSITIVE_INFINITY,K.y=Number.POSITIVE_INFINITY,K.z=Number.POSITIVE_INFINITY;let $=yr;$.x=Number.NEGATIVE_INFINITY,$.y=Number.NEGATIVE_INFINITY,$.z=Number.NEGATIVE_INFINITY;let ee=Number.POSITIVE_INFINITY,te=m*d,re=te+(g>0?2*m+2*d:0),ne=new Array(re),se=new Array(re),le=new Array(re),oe=v?new Array(re):[],fe=A?new Array(re):[],ue=0,ce=d,me=0,de=m;p&&(--ue,++ce,--me,++de);let pe=1e-5;for(let e=ue;e=d&&(p=d-1);let I=y.north-L*p;I=w?h(I):u-2*o(f(-I*k));let U=(I-i)/(a-i);U=ge.clamp(U,0,1);let b=e===ue,T=e===ce-1;g>0&&(b?I+=pe*R:T&&(I-=pe*R));let V,M=n(I),Y=s(I),H=X*Y;v&&(V=(Ue.geodeticLatitudeToMercatorAngle(I)-C)*z);for(let e=me;e=m&&(i=m-1);let a,o=p*(m*P)+i*P;if(1===S)a=c[o];else{let e;if(a=0,F)for(e=0;e=0;--e)a=a*E+c[o+e]}a=a*D+B,W=Math.max(W,a),Z=Math.min(Z,a);let f=y.west+O*i;w?f=h(f):f*=k;let u=(f-t)/(r-t);u=ge.clamp(u,0,1);let I=p*m+i;if(g>0){let t=e===me,r=e===de-1,n=b||T||t||r;if((b||T)&&(t||r))continue;n&&(a-=g,t?(I=te+(d-p-1),f-=pe*N):T?I=te+d+(m-i-1):r?(I=te+d+m+p,f+=pe*N):b&&(I=te+d+m+d+i))}let R=M*n(f),L=M*s(f),C=_*R,z=j*L,Q=1/l(C*R+z*L+H*Y),X=C*Q,G=z*Q,J=H*Q,re=new ie;re.x=X+R*a,re.y=G+L*a,re.z=J+Y*a,xe.multiplyByPoint(q,re,Ye),ie.minimumByComponent(Ye,K,K),ie.maximumByComponent(Ye,$,$),ee=Math.min(ee,a),ne[I]=re,le[I]=new rr(u,U),se[I]=a,v&&(oe[I]=V),A&&(fe[I]=x.geodeticSurfaceNormal(re))}}let we,ke,ye=er.fromPoints(ne);G(I)&&(we=ar.fromRectangle(I,Z,W,x)),b&&(ke=new sr(x).computeHorizonCullingPointPossiblyUnderEllipsoid(U,ne,Z));let be=new nr(K,$,U),ve=new fr(U,be,ee,W,J,!1,v,A,T,V),Te=new Float32Array(re*ve.stride),Ve=0;for(let e=0;e{!function(){var e,i,r,a,n,s,l=(e={defaultNoDataValue:-34027999387901484e22,decode:function(t,s){var l=(s=s||{}).encodedMaskData||null===s.encodedMaskData,o=n(t,s.inputOffset||0,l),f=null!==s.noDataValue?s.noDataValue:e.defaultNoDataValue,u=i(o,s.pixelType||Float32Array,s.encodedMaskData,f,s.returnMask),h={width:o.width,height:o.height,pixelData:u.resultPixels,minValue:u.minValue,maxValue:o.pixels.maxValue,noDataValue:f};return u.resultMask&&(h.maskData=u.resultMask),s.returnEncodedMask&&o.mask&&(h.encodedMaskData=o.mask.bitset?o.mask.bitset:null),s.returnFileInfo&&(h.fileInfo=r(o),s.computeUsedBitDepths&&(h.fileInfo.bitDepths=a(o))),h}},i=function(e,t,i,r,a){var n,l,o,f=0,u=e.pixels.numBlocksX,h=e.pixels.numBlocksY,c=Math.floor(e.width/u),m=Math.floor(e.height/h),d=2*e.maxZError,g=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),l=new t(e.width*e.height),a&&i&&(o=new Uint8Array(e.width*e.height));for(var p,w,k=new Float32Array(c*m),x=0;x<=h;x++){var y=x!==h?m:e.height%h;if(0!==y)for(var I=0;I<=u;I++){var U=I!==u?c:e.width%u;if(0!==U){var b,T,v,A,M=x*e.width*m+I*c,V=e.width-U,D=e.pixels.blocks[f];if(D.encoding<2?(0===D.encoding?b=D.rawData:(s(D.stuffedData,D.bitsPerPixel,D.numValidPixels,D.offset,d,k,e.pixels.maxValue),b=k),T=0):v=2===D.encoding?0:D.offset,i)for(w=0;w>3],A<<=7&M),p=0;p>3]),128&A?(o&&(o[M]=1),g=g>(n=D.encoding<2?b[T++]:v)?n:g,l[M++]=n):(o&&(o[M]=0),l[M++]=r),A<<=1;M+=V}else if(D.encoding<2)for(w=0;w(n=b[T++])?n:g,l[M++]=n;M+=V}else for(g=g>v?v:g,w=0;w0){var s=new Uint8Array(Math.ceil(r.width*r.height/8)),l=(n=new DataView(e,t,r.mask.numBytes)).getInt16(0,!0),o=2,f=0;do{if(l>0)for(;l--;)s[f++]=n.getUint8(o++);else{var u=n.getUint8(o++);for(l=-l;l--;)s[f++]=u}l=n.getInt16(o,!0),o+=2}while(o0?1:0),d=c+(r.height%c>0?1:0);r.pixels.blocks=new Array(m*d);for(var g=0,p=0;p3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==I&&2!==I){if(I>>=6,y.offsetType=I,2===I)y.offset=n.getInt8(1),k++;else if(1===I)y.offset=n.getInt16(1,!0),k+=2;else{if(0!==I)throw"Invalid block offset type";y.offset=n.getFloat32(1,!0),k+=4}if(1===y.encoding)if(I=n.getUint8(k),k++,y.bitsPerPixel=63&I,I>>=6,y.numValidPixelsType=I,2===I)y.numValidPixels=n.getUint8(k),k++;else if(1===I)y.numValidPixels=n.getUint16(k,!0),k+=2;else{if(0!==I)throw"Invalid valid pixel count type";y.numValidPixels=n.getUint32(k,!0),k+=4}}var U;if(t+=k,3!==y.encoding)if(0===y.encoding){var b=(r.pixels.numBytes-1)/4;if(b!==Math.floor(b))throw"uncompressed block has invalid length";U=new ArrayBuffer(4*b),new Uint8Array(U).set(new Uint8Array(e,t,4*b));var T=new Float32Array(U);y.rawData=T,t+=4*b}else if(1===y.encoding){var v=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),A=Math.ceil(v/4);U=new ArrayBuffer(4*A),new Uint8Array(U).set(new Uint8Array(e,t,v)),y.stuffedData=new Uint32Array(U),t+=v}}else t++}return r.eofOffset=t,r},s=function(e,t,i,r,a,n,s){var l,o,f,u=(1<=t)o=f>>>c-t&u,c-=t;else{var g=t-c;o=(f&u)<>>(c=32-g)}n[l]=o=i?(f=u>>>g-i&m,g-=i):(f=(u&m)<<(h=i-g)&m,f+=(u=e[d++])>>>(g=32-h)),t[o]=a[f];else for(c=Math.ceil((l-n)/s),o=0;o=i?(f=u>>>g-i&m,g-=i):(f=(u&m)<<(h=i-g)&m,f+=(u=e[d++])>>>(g=32-h)),t[o]=f=i?(f=u>>>g&c,d-=i,g+=i):(f=u>>>g&c,d=32-(h=i-d),f|=((u=e[m++])&(1<=i?(f=u>>>g&c,d-=i,g+=i):(f=u>>>g&c,d=32-(h=i-d),f|=((u=e[m++])&(1<=359?359:a;a-=s;do{t+=e[n++]<<8,i+=t+=e[n++]}while(--s);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&r&&(i+=t+=e[n]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,r=new Uint8Array(e,i,6),a={};if(a.fileIdentifierString=String.fromCharCode.apply(null,r),0!==a.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+a.fileIdentifierString;i+=6;var n,s=new DataView(e,i,8),l=s.getInt32(0,!0);if(a.fileVersion=l,i+=4,l>=3&&(a.checksum=s.getUint32(4,!0),i+=4),s=new DataView(e,i,12),a.height=s.getUint32(0,!0),a.width=s.getUint32(4,!0),i+=8,l>=4?(a.numDims=s.getUint32(8,!0),i+=4):a.numDims=1,s=new DataView(e,i,40),a.numValidPixel=s.getUint32(0,!0),a.microBlockSize=s.getInt32(4,!0),a.blobSize=s.getInt32(8,!0),a.imageType=s.getInt32(12,!0),a.maxZError=s.getFloat64(16,!0),a.zMin=s.getFloat64(24,!0),a.zMax=s.getFloat64(32,!0),i+=40,t.headerInfo=a,t.ptr=i,l>=3&&(n=l>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-n,a.blobSize-14))!==a.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,r=this.getDataTypeArray(i.imageType),a=i.numDims*this.getDataTypeSize(i.imageType),n=this.readSubArray(e,t.ptr,r,a),s=this.readSubArray(e,t.ptr+a,r,a);t.ptr+=2*a;var l,o=!0;for(l=0;l0){i=new Uint8Array(Math.ceil(s/8));var u=(o=new DataView(e,a,f.numBytes)).getInt16(0,!0),h=2,c=0,m=0;do{if(u>0)for(;u--;)i[c++]=o.getUint8(h++);else for(m=o.getUint8(h++),u=-u;u--;)i[c++]=m;u=o.getInt16(h,!0),h+=2}while(h>3],d<<=7&g):d=i[g>>3],128&d&&(r[g]=1);t.pixels.resultMask=r,f.bitset=i,a+=f.numBytes}return t.ptr=a,t.mask=f,!0},readDataOneSweep:function(e,t,r){var a,n=t.ptr,s=t.headerInfo,l=s.numDims,o=s.width*s.height,f=s.imageType,u=s.numValidPixel*i.getDataTypeSize(f)*l,h=t.pixels.resultMask;if(r===Uint8Array)a=new Uint8Array(e,n,u);else{var c=new ArrayBuffer(u);new Uint8Array(c).set(new Uint8Array(e,n,u)),a=new r(c)}if(a.length===o*l)t.pixels.resultPixels=a;else{t.pixels.resultPixels=new r(o*l);var m=0,d=0,g=0,p=0;if(l>1)for(g=0;g=o)return!1;var f=new Uint32Array(o-l);i.decodeBits(e,t,f);var u,h,c,m,d=[];for(u=l;u0&&(d[h].second=k<>>32-m,32-y>=m?32===(y+=m)&&(y=0,k=x[++I]):(y+=m-32,k=x[++I],d[h].second|=k>>>32-y));var U,b=0,T=new r;for(u=0;u=a?a:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var v,A,M,V,D,B=[];for(u=l;u0)if(v=[m,h],m<=U)for(A=d[h].second<=0;V--)A>>>V&1?(D.right||(D.right=new r),D=D.right):(D.left||(D.left=new r),D=D.left),0===V&&!D.val&&(D.val=v[1]);return{decodeLut:B,numBitsLUTQick:U,numBitsLUT:b,tree:T,stuffedData:x,srcPtr:I,bitPos:y}},readHuffman:function(e,t,i){var r,a,n,s,l,o,f,u,h,c=t.headerInfo,m=c.numDims,d=t.headerInfo.height,g=t.headerInfo.width,p=g*d,w=this.readHuffmanTree(e,t),k=w.decodeLut,x=w.tree,y=w.stuffedData,I=w.srcPtr,U=w.bitPos,b=w.numBitsLUTQick,T=w.numBitsLUT,v=0===t.headerInfo.imageType?128:0,A=t.pixels.resultMask,M=0;U>0&&(I++,U=0);var V,D=y[I],B=1===t.encodeMode,S=new i(p*m),P=S;for(V=0;V1&&(P=new i(S.buffer,p*V,p),M=0),t.headerInfo.numValidPixel===g*d)for(u=0,o=0;o>>32-b,32-U>>64-U-b),k[l])a=k[l][1],U+=k[l][0];else for(l=s=D<>>32-T,32-U>>64-U-T),r=x,h=0;h>>T-h-1&1?r.right:r.left).left&&!r.right){a=r.val,U=U+h+1;break}U>=32&&(U-=32,D=y[++I]),n=a-v,B?(n+=f>0?M:o>0?P[u-g]:M,n&=255,P[u]=n,M=n):P[u]=n}else for(u=0,o=0;o>>32-b,32-U>>64-U-b),k[l])a=k[l][1],U+=k[l][0];else for(l=s=D<>>32-T,32-U>>64-U-T),r=x,h=0;h>>T-h-1&1?r.right:r.left).left&&!r.right){a=r.val,U=U+h+1;break}U>=32&&(U-=32,D=y[++I]),n=a-v,B?(f>0&&A[u-1]?n+=M:o>0&&A[u-g]?n+=P[u-g]:n+=M,n&=255,P[u]=n,M=n):P[u]=n}t.ptr=t.ptr+4*(I+1)+(U>0?4:0)}t.pixels.resultPixels=S},decodeBits:function(i,r,a,n,s){var l=r.headerInfo,o=l.fileVersion,f=0,u=new DataView(i,r.ptr,5),h=u.getUint8(0);f++;var c=h>>6,m=0===c?4:3-c,d=(32&h)>0,g=31&h,p=0;if(1===m)p=u.getUint8(f),f++;else if(2===m)p=u.getUint16(f,!0),f+=2;else{if(4!==m)throw"Invalid valid pixel count type";p=u.getUint32(f,!0),f+=4}var w,k,x,y,I,U,b,T,v,A=2*l.maxZError,M=l.numDims>1?l.maxValues[s]:l.zMax;if(d){for(r.counter.lut++,T=u.getUint8(f),f++,y=Math.ceil((T-1)*g/8),I=Math.ceil(y/4),k=new ArrayBuffer(4*I),x=new Uint8Array(k),r.ptr+=f,x.set(new Uint8Array(i,r.ptr,y)),b=new Uint32Array(k),r.ptr+=y,v=0;T-1>>>v;)v++;y=Math.ceil(p*v/8),I=Math.ceil(y/4),k=new ArrayBuffer(4*I),(x=new Uint8Array(k)).set(new Uint8Array(i,r.ptr,y)),w=new Uint32Array(k),r.ptr+=y,U=o>=3?function(e,t,i,r,a,n){var s,l=(1<=t?(c=s>>>m&l,h-=t,m+=t):(c=s>>>m&l,h=32-(u=t-h),c|=((s=e[o++])&(1<=t?(c=s>>>h-t&l,h-=t):(c=(s&l)<<(u=t-h)&l,c+=(s=e[o++])>>>(h=32-u)),m[f]=c=3?t(w,a,v,p,U):e(w,a,v,p,U)}else r.counter.bitstuffer++,v=g,r.ptr+=f,v>0&&(y=Math.ceil(p*v/8),I=Math.ceil(y/4),k=new ArrayBuffer(4*I),(x=new Uint8Array(k)).set(new Uint8Array(i,r.ptr,y)),w=new Uint32Array(k),r.ptr+=y,o>=3?null==n?function(e,t,i,r){var a,n,s,l,o=(1<=i?(n=s>>>h&o,u-=i,h+=i):(n=s>>>h&o,u=32-(l=i-u),n|=((s=e[f++])&(1<=i?(n=s>>>u-i&o,u-=i):(n=(s&o)<<(l=i-u)&o,n+=(s=e[f++])>>>(u=32-l)),t[a]=n}(w,a,v,p):e(w,a,v,p,!1,n,A,M))},readTiles:function(e,t,r){var a=t.headerInfo,n=a.width,s=a.height,l=a.microBlockSize,o=a.imageType,f=i.getDataTypeSize(o),u=Math.ceil(n/l),h=Math.ceil(s/l);t.pixels.numBlocksY=h,t.pixels.numBlocksX=u,t.pixels.ptr=0;var c,m,d,g,p,w,k,x,y=0,I=0,U=0,b=0,T=0,v=0,A=0,M=0,V=0,D=0,B=0,S=0,P=0,E=0,F=0,N=new r(l*l),Y=s%l||l,O=n%l||l,L=a.numDims,H=t.pixels.resultMask,R=t.pixels.resultPixels;for(U=0;U1&&(R=new r(t.pixels.resultPixels.buffer,n*s*x*f,n*s)),A=e.byteLength-t.ptr,m={},F=0,F++,V=(M=(c=new DataView(e,t.ptr,Math.min(10,A))).getUint8(0))>>6&255,(M>>2&15)!=(b*l>>3&15))throw"integrity issue";if((p=3&M)>3)throw t.ptr+=F,"Invalid block encoding ("+p+")";if(2!==p)if(0===p){if(t.counter.uncompressed++,t.ptr+=F,S=(S=T*v*f)<(P=e.byteLength-t.ptr)?S:P,d=new ArrayBuffer(S%f==0?S:S+f-S%f),new Uint8Array(d).set(new Uint8Array(e,t.ptr,S)),g=new r(d),E=0,H)for(y=0;y1)for(n=0;n=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,r){var a=0;switch(i){case 0:a=r.getInt8(t);break;case 1:a=r.getUint8(t);break;case 2:a=r.getInt16(t,!0);break;case 3:a=r.getUint16(t,!0);break;case 4:a=r.getInt32(t,!0);break;case 5:a=r.getUInt32(t,!0);break;case 6:a=r.getFloat32(t,!0);break;case 7:a=r.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return a}},r=function(e,t,i){this.val=e,this.left=t,this.right=i},a={decode:function(e,t){var r=(t=t||{}).noDataValue,a=0,n={};if(n.ptr=t.inputOffset||0,n.pixels={},i.readHeaderInfo(e,n)){var s=n.headerInfo,l=s.fileVersion,o=i.getDataTypeArray(s.imageType);i.readMask(e,n),s.numValidPixel!==s.width*s.height&&!n.pixels.resultMask&&(n.pixels.resultMask=t.maskData);var f,u=s.width*s.height;if(n.pixels.resultPixels=new o(u*s.numDims),n.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==s.numValidPixel)if(s.zMax===s.zMin)i.constructConstantSurface(n);else if(l>=4&&i.checkMinMaxRanges(e,n))i.constructConstantSurface(n);else{var h=new DataView(e,n.ptr,2),c=h.getUint8(0);if(n.ptr++,c)i.readDataOneSweep(e,n,o);else if(l>1&&s.imageType<=1&&Math.abs(s.maxZError-.5)<1e-5){var m=h.getUint8(1);if(n.ptr++,n.encodeMode=m,m>2||l<4&&m>1)throw"Invalid Huffman flag "+m;m?i.readHuffman(e,n,o):i.readTiles(e,n,o)}else i.readTiles(e,n,o)}n.eofOffset=n.ptr,t.inputOffset?(f=n.headerInfo.blobSize+t.inputOffset-n.ptr,Math.abs(f)>=1&&(n.eofOffset=t.inputOffset+n.headerInfo.blobSize)):(f=n.headerInfo.blobSize-n.ptr,Math.abs(f)>=1&&(n.eofOffset=n.headerInfo.blobSize));var d={width:s.width,height:s.height,pixelData:n.pixels.resultPixels,minValue:s.zMin,maxValue:s.zMax,validPixelCount:s.numValidPixel,dimCount:s.numDims,dimStats:{minValues:s.minValues,maxValues:s.maxValues},maskData:n.pixels.resultMask};if(n.pixels.resultMask&&i.isValidPixelValue(s.imageType,r)){var g=n.pixels.resultMask;for(a=0;a1&&y.fileInfo.mask&&y.fileInfo.mask.numBytes>0&&k.push(y.maskData),p++,x.pixels.push(y.pixelData),x.statistics.push({minValue:y.minValue,maxValue:y.maxValue,noDataValue:y.noDataValue,dimStats:y.dimStats})}if(r>1&&k.length>1){for(s=x.width*x.height,x.bandMasks=k,(g=new Uint8Array(s)).set(k[0]),a=1;a0,w=Y(e.isGeographic,!0),k=Y(e.ellipsoid,Ie.WGS84),x=1/k.maximumRadius,y=ae.clone(e.nativeRectangle),I=ae.clone(e.rectangle);G(I)?(t=I.west,i=I.south,r=I.east,a=I.north):w?(t=h(y.west),i=h(y.south),r=h(y.east),a=h(y.north)):(t=y.west*x,i=u-2*o(f(-y.south*x)),r=y.east*x,a=u-2*o(f(-y.north*x)));let U=e.relativeToCenter,b=G(U);U=b?U:ie.ZERO;let T=Y(e.includeWebMercatorT,!1),v=Y(e.exaggeration,1),A=Y(e.exaggerationRelativeHeight,0),M=1!==v,V=Y(e.structure,Q.DEFAULT_STRUCTURE),D=Y(V.heightScale,Q.DEFAULT_STRUCTURE.heightScale),B=Y(V.heightOffset,Q.DEFAULT_STRUCTURE.heightOffset),S=Y(V.elementsPerHeight,Q.DEFAULT_STRUCTURE.elementsPerHeight),P=Y(V.stride,Q.DEFAULT_STRUCTURE.stride),E=Y(V.elementMultiplier,Q.DEFAULT_STRUCTURE.elementMultiplier),F=Y(V.isBigEndian,Q.DEFAULT_STRUCTURE.isBigEndian),N=ae.computeWidth(y),O=ae.computeHeight(y),L=N/(m-1),H=O/(d-1);w||(N*=x,O*=x);let R,C,z=k.radiiSquared,_=z.x,j=z.y,X=z.z,Z=65536,W=-65536,q=ir.eastNorthUpToFixedFrame(U,k),J=xe.inverseTransformation(q,Tr);T&&(R=Ue.geodeticLatitudeToMercatorAngle(i),C=1/(Ue.geodeticLatitudeToMercatorAngle(a)-R));let K=kr;K.x=Number.POSITIVE_INFINITY,K.y=Number.POSITIVE_INFINITY,K.z=Number.POSITIVE_INFINITY;let $=yr;$.x=Number.NEGATIVE_INFINITY,$.y=Number.NEGATIVE_INFINITY,$.z=Number.NEGATIVE_INFINITY;let ee=Number.POSITIVE_INFINITY,te=m*d,re=te+(g>0?2*m+2*d:0),ne=new Array(re),se=new Array(re),le=new Array(re),oe=T?new Array(re):[],fe=M?new Array(re):[],ue=0,ce=d,me=0,de=m;p&&(--ue,++ce,--me,++de);let pe=1e-5;for(let e=ue;e=d&&(p=d-1);let I=y.north-H*p;I=w?h(I):u-2*o(f(-I*x));let U=(I-i)/(a-i);U=ge.clamp(U,0,1);let b=e===ue,v=e===ce-1;g>0&&(b?I+=pe*O:v&&(I-=pe*O));let A,V=n(I),Y=s(I),z=X*Y;T&&(A=(Ue.geodeticLatitudeToMercatorAngle(I)-R)*C);for(let e=me;e=m&&(i=m-1);let a,o=p*(m*P)+i*P;if(1===S)a=c[o];else{let e;if(a=0,F)for(e=0;e=0;--e)a=a*E+c[o+e]}a=a*D+B,W=Math.max(W,a),Z=Math.min(Z,a);let f=y.west+L*i;w?f=h(f):f*=x;let u=(f-t)/(r-t);u=ge.clamp(u,0,1);let I=p*m+i;if(g>0){let t=e===me,r=e===de-1,n=b||v||t||r;if((b||v)&&(t||r))continue;n&&(a-=g,t?(I=te+(d-p-1),f-=pe*N):v?I=te+d+(m-i-1):r?(I=te+d+m+p,f+=pe*N):b&&(I=te+d+m+d+i))}let O=V*n(f),H=V*s(f),R=_*O,C=j*H,Q=1/l(R*O+C*H+z*Y),G=R*Q,X=C*Q,q=z*Q,re=new ie;re.x=G+O*a,re.y=X+H*a,re.z=q+Y*a,xe.multiplyByPoint(J,re,Ye),ie.minimumByComponent(Ye,K,K),ie.maximumByComponent(Ye,$,$),ee=Math.min(ee,a),ne[I]=re,le[I]=new er(u,U),se[I]=a,T&&(oe[I]=A),M&&(fe[I]=k.geodeticSurfaceNormal(re))}}let we,ke,ye=rr.fromPoints(ne);G(I)&&(we=ar.fromRectangle(I,Z,W,k)),b&&(ke=new sr(k).computeHorizonCullingPointPossiblyUnderEllipsoid(U,ne,Z));let be=new nr(K,$,U),Te=new fr(U,be,ee,W,q,!1,T,M,v,A),ve=new Float32Array(re*Te.stride),Ae=0;for(let e=0;e=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let r=Ot[t];w(r)||(Ot[t]=r=[]);let n=r[e];return w(n)||(n=t*e=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let r=Gt[t];w(r)||(Gt[t]=r=[]);let n=r[e];if(!w(n)){let i=T.getRegularGridIndices(t,e),o=Lt(t,e),a=o.westIndicesSouthToNorth,s=o.southIndicesEastToWest,h=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;n=r[e]={indices:i,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:h,northIndicesWestToEast:u}}return n};var kt=[];function Lt(t,e){let r,n=new Array(e),i=new Array(t),o=new Array(e),a=new Array(t);for(r=0;r=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let r=kt[t];w(r)||(kt[t]=r=[]);let n=r[e];if(!w(n)){let i=t*e,o=(t-1)*(e-1)*6,a=2*t+2*e,s=i+a,h=o+6*Math.max(0,a-4),u=Lt(t,e),c=u.westIndicesSouthToNorth,l=u.southIndicesEastToWest,I=u.eastIndicesNorthToSouth,d=u.northIndicesWestToEast,m=X.createTypedArray(s,h);Pt(t,e,m,0),T.addSkirtIndices(c,l,I,d,i,m,o),n=r[e]={indices:m,westIndicesSouthToNorth:c,southIndicesEastToWest:l,eastIndicesNorthToSouth:I,northIndicesWestToEast:d,indexCountWithoutSkirts:o}}return n},T.addSkirtIndices=function(t,e,r,n,i,o,a){let s=i;a=Z(t,s,o,a),s+=t.length,a=Z(e,s,o,a),s+=e.length,a=Z(r,s,o,a),s+=r.length,Z(n,s,o,a)},T.heightmapTerrainQuality=.25,T.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,e,r){return 2*t.maximumRadius*Math.PI*T.heightmapTerrainQuality/(e*r)},T.prototype.requestTileGeometry=m.throwInstantiationError,T.prototype.getLevelMaximumGeometricError=m.throwInstantiationError,T.prototype.getTileDataAvailable=m.throwInstantiationError,T.prototype.loadTileDataAvailability=m.throwInstantiationError;var Vt=T,ht=32767,D=new P,Xt=new P,Zt=new P,u=new wt,Y=new lt;function Jt(t,e){let r,n,i=t.quantizedVertices,o=i.length/3,a=t.octEncodedNormals,s=t.westIndices.length+t.eastIndices.length+t.southIndices.length+t.northIndices.length,h=t.includeWebMercatorT,c=t.exaggeration,l=t.exaggerationRelativeHeight,I=1!==c,d=bt.clone(t.rectangle),m=d.west,T=d.south,g=d.east,p=d.north,N=pt.clone(t.ellipsoid),E=t.minimumHeight,y=t.maximumHeight,S=t.relativeToCenter,A=At.eastNorthUpToFixedFrame(S,N),b=U.inverseTransformation(A,new U);h&&(r=z.geodeticLatitudeToMercatorAngle(T),n=1/(z.geodeticLatitudeToMercatorAngle(p)-r));let k=i.subarray(0,o),x=i.subarray(o,2*o),W=i.subarray(2*o,3*o),G=w(a),M=new Array(o),O=new Array(o),v=new Array(o),F=h?new Array(o):[],R=I?new Array(o):[],V=Xt;V.x=Number.POSITIVE_INFINITY,V.y=Number.POSITIVE_INFINITY,V.z=Number.POSITIVE_INFINITY;let j=Zt;j.x=Number.NEGATIVE_INFINITY,j.y=Number.NEGATIVE_INFINITY,j.z=Number.NEGATIVE_INFINITY;let _=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,H=Number.POSITIVE_INFINITY,B=Number.NEGATIVE_INFINITY;for(let t=0;t=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let r=Ot[t];w(r)||(Ot[t]=r=[]);let n=r[e];return w(n)||(n=t*e=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let r=Gt[t];w(r)||(Gt[t]=r=[]);let n=r[e];if(!w(n)){let i=T.getRegularGridIndices(t,e),o=Lt(t,e),s=o.westIndicesSouthToNorth,a=o.southIndicesEastToWest,h=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;n=r[e]={indices:i,westIndicesSouthToNorth:s,southIndicesEastToWest:a,eastIndicesNorthToSouth:h,northIndicesWestToEast:u}}return n};var kt=[];function Lt(t,e){let r,n=new Array(e),i=new Array(t),o=new Array(e),s=new Array(t);for(r=0;r=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let r=kt[t];w(r)||(kt[t]=r=[]);let n=r[e];if(!w(n)){let i=t*e,o=(t-1)*(e-1)*6,s=2*t+2*e,a=i+s,h=o+6*Math.max(0,s-4),u=Lt(t,e),c=u.westIndicesSouthToNorth,l=u.southIndicesEastToWest,d=u.eastIndicesNorthToSouth,m=u.northIndicesWestToEast,I=X.createTypedArray(a,h);Pt(t,e,I,0),T.addSkirtIndices(c,l,d,m,i,I,o),n=r[e]={indices:I,westIndicesSouthToNorth:c,southIndicesEastToWest:l,eastIndicesNorthToSouth:d,northIndicesWestToEast:m,indexCountWithoutSkirts:o}}return n},T.addSkirtIndices=function(t,e,r,n,i,o,s){let a=i;s=Z(t,a,o,s),a+=t.length,s=Z(e,a,o,s),a+=e.length,s=Z(r,a,o,s),a+=r.length,Z(n,a,o,s)},T.heightmapTerrainQuality=.25,T.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,e,r){return 2*t.maximumRadius*Math.PI*T.heightmapTerrainQuality/(e*r)},T.prototype.requestTileGeometry=m.throwInstantiationError,T.prototype.getLevelMaximumGeometricError=m.throwInstantiationError,T.prototype.getTileDataAvailable=m.throwInstantiationError,T.prototype.loadTileDataAvailability=m.throwInstantiationError;var Vt=T,ht=32767,D=new P,Xt=new P,Zt=new P,u=new wt,Y=new lt;function Jt(t,e){let r,n,i=t.quantizedVertices,o=i.length/3,s=t.octEncodedNormals,a=t.westIndices.length+t.eastIndices.length+t.southIndices.length+t.northIndices.length,h=t.includeWebMercatorT,c=t.exaggeration,l=t.exaggerationRelativeHeight,d=1!==c,m=bt.clone(t.rectangle),I=m.west,T=m.south,g=m.east,N=m.north,p=pt.clone(t.ellipsoid),E=t.minimumHeight,S=t.maximumHeight,y=t.relativeToCenter,A=At.eastNorthUpToFixedFrame(y,p),b=U.inverseTransformation(A,new U);h&&(r=z.geodeticLatitudeToMercatorAngle(T),n=1/(z.geodeticLatitudeToMercatorAngle(N)-r));let k=i.subarray(0,o),x=i.subarray(o,2*o),G=i.subarray(2*o,3*o),M=w(s),F=new Array(o),W=new Array(o),v=new Array(o),H=h?new Array(o):[],O=d?new Array(o):[],j=Xt;j.x=Number.POSITIVE_INFINITY,j.y=Number.POSITIVE_INFINITY,j.z=Number.POSITIVE_INFINITY;let V=Zt;V.x=Number.NEGATIVE_INFINITY,V.y=Number.NEGATIVE_INFINITY,V.z=Number.NEGATIVE_INFINITY;let _=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,R=Number.POSITIVE_INFINITY,B=Number.NEGATIVE_INFINITY;for(let t=0;t0)for(o=new Array(m),n=0;n0)for(a=new Array(m),n=0;n0)for(o=new Array(m),n=0;n0)for(a=new Array(m),n=0;n0)for(n=new Array(s),o=0;o0)for(r=new Array(s),o=0;o0)for(n=new Array(s),o=0;o0)for(r=new Array(s),o=0;o{"use strict";t.exports=(e,t,i,r)=>{let n=65535&e|0,a=e>>>16&65535|0,s=0;for(;0!==i;){s=i>2e3?2e3:i,i-=s;do{n=n+t[r++]|0,a=a+n|0}while(--s);n%=65521,a%=65521}return n|a<<16|0}})),De=R(((e,t)=>{"use strict";var i=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());t.exports=(e,t,r,n)=>{let a=i,s=n+r;e^=-1;for(let i=n;i>>8^a[255&(e^t[i])];return-1^e}})),Oe=R(((e,t)=>{"use strict";t.exports=function(e,t){let i,r,n,a,s,o,l,f,d,h,c,u,w,b,m,g,k,_,p,v,y,x,R,E,A=e.state;i=e.next_in,R=e.input,r=i+(e.avail_in-5),n=e.next_out,E=e.output,a=n-(t-e.avail_out),s=n+(e.avail_out-257),o=A.dmax,l=A.wsize,f=A.whave,d=A.wnext,h=A.window,c=A.hold,u=A.bits,w=A.lencode,b=A.distcode,m=(1<>>24,c>>>=_,u-=_,_=k>>>16&255,0===_)E[n++]=65535&k;else{if(!(16&_)){if(64&_){if(32&_){A.mode=16191;break e}e.msg="invalid literal/length code",A.mode=16209;break e}k=w[(65535&k)+(c&(1<<_)-1)];continue t}for(p=65535&k,_&=15,_&&(u<_&&(c+=R[i++]<>>=_,u-=_),u<15&&(c+=R[i++]<>>24,c>>>=_,u-=_,_=k>>>16&255,16&_){if(v=65535&k,_&=15,u<_&&(c+=R[i++]<o){e.msg="invalid distance too far back",A.mode=16209;break e}if(c>>>=_,u-=_,_=n-a,v>_){if(_=v-_,_>f&&A.sane){e.msg="invalid distance too far back",A.mode=16209;break e}if(y=0,x=h,0===d){if(y+=l-_,_2;)E[n++]=x[y++],E[n++]=x[y++],E[n++]=x[y++],p-=3;p&&(E[n++]=x[y++],p>1&&(E[n++]=x[y++]))}else{y=n-v;do{E[n++]=E[y++],E[n++]=E[y++],E[n++]=E[y++],p-=3}while(p>2);p&&(E[n++]=E[y++],p>1&&(E[n++]=E[y++]))}break}if(64&_){e.msg="invalid distance code",A.mode=16209;break e}k=b[(65535&k)+(c&(1<<_)-1)]}}break}}while(i>3,i-=p,u-=p<<3,c&=(1<{"use strict";var i=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),r=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),n=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),a=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);t.exports=(e,t,s,o,l,f,d,h)=>{let c,u,w,b,m,g,k,_,p,v=h.bits,y=0,x=0,R=0,E=0,A=0,T=0,D=0,U=0,S=0,Z=0,I=null,O=new Uint16Array(16),N=new Uint16Array(16),C=null;for(y=0;y<=15;y++)O[y]=0;for(x=0;x=1&&0===O[E];E--);if(A>E&&(A=E),0===E)return l[f++]=20971520,l[f++]=20971520,h.bits=1,0;for(R=1;R0&&(0===e||1!==E))return-1;for(N[1]=0,y=1;y<15;y++)N[y+1]=N[y]+O[y];for(x=0;x852||2===e&&S>592)return 1;for(;;){k=y-D,d[x]+1=g?(_=C[d[x]-g],p=I[d[x]-g]):(_=96,p=0),c=1<>D)+u]=k<<24|_<<16|p|0}while(0!==u);for(c=1<>=1;if(0!==c?(Z&=c-1,Z+=c):Z=0,x++,0==--O[y]){if(y===E)break;y=t[s+d[x]]}if(y>A&&(Z&b)!==w){for(0===D&&(D=A),m+=R,T=y-D,U=1<852||2===e&&S>592)return 1;w=Z&b,l[w]=A<<24|T<<16|m-f|0}}return 0!==Z&&(l[m+Z]=y-D<<24|64<<16|0),h.bits=A,0}})),J=R(((e,t)=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}})),bt=R(((e,t)=>{"use strict";var i=Ie(),r=De(),n=Oe(),a=Me(),{Z_FINISH:s,Z_BLOCK:o,Z_TREES:l,Z_OK:f,Z_STREAM_END:d,Z_NEED_DICT:h,Z_STREAM_ERROR:c,Z_DATA_ERROR:u,Z_MEM_ERROR:w,Z_BUF_ERROR:b,Z_DEFLATED:m}=J(),g=16180,k=16190,_=16191,p=16192,v=16194,y=16199,x=16200,R=16206,E=16209,A=16210,T=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function D(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var U,S,Z=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.mode16211?1:0},I=e=>{if(Z(e))return c;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=g,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,f},O=e=>{if(Z(e))return c;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,I(e)},N=(e,t)=>{let i;if(Z(e))return c;let r=e.state;return t<0?(i=0,t=-t):(i=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?c:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=i,r.wbits=t,O(e))},C=(e,t)=>{if(!e)return c;let i=new D;e.state=i,i.strm=e,i.window=null,i.mode=g;let r=N(e,t);return r!==f&&(e.state=null),r},B=!0,M=e=>{if(B){U=new Int32Array(512),S=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,U,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,S,0,e.work,{bits:5}),B=!1}e.lencode=U,e.lenbits=9,e.distcode=S,e.distbits=5},F=(e,t,i,r)=>{let n,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(a.window.set(t.subarray(i-a.wsize,i),0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>r&&(n=r),a.window.set(t.subarray(i-r,i-r+n),a.wnext),(r-=n)?(a.window.set(t.subarray(i-r,i),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whaveC(e,15),t.exports.inflateInit2=C,t.exports.inflate=(e,t)=>{let D,U,S,I,O,N,C,B,L,H,P,z,V,Y,j,G,K,J,Q,W,X,q,$,ee,te=0,ie=new Uint8Array(4),re=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Z(e)||!e.output||!e.input&&0!==e.avail_in)return c;D=e.state,D.mode===_&&(D.mode=p),O=e.next_out,S=e.output,C=e.avail_out,I=e.next_in,U=e.input,N=e.avail_in,B=D.hold,L=D.bits,H=N,P=C,q=f;e:for(;;)switch(D.mode){case g:if(0===D.wrap){D.mode=p;break}for(;L<16;){if(0===N)break e;N--,B+=U[I++]<>>8&255,D.check=r(D.check,ie,2,0),B=0,L=0,D.mode=16181;break}if(D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&B)<<8)+(B>>8))%31){e.msg="incorrect header check",D.mode=E;break}if((15&B)!==m){e.msg="unknown compression method",D.mode=E;break}if(B>>>=4,L-=4,X=8+(15&B),0===D.wbits&&(D.wbits=X),X>15||X>D.wbits){e.msg="invalid window size",D.mode=E;break}D.dmax=1<>8&1),512&D.flags&&4&D.wrap&&(ie[0]=255&B,ie[1]=B>>>8&255,D.check=r(D.check,ie,2,0)),B=0,L=0,D.mode=16182;case 16182:for(;L<32;){if(0===N)break e;N--,B+=U[I++]<>>8&255,ie[2]=B>>>16&255,ie[3]=B>>>24&255,D.check=r(D.check,ie,4,0)),B=0,L=0,D.mode=16183;case 16183:for(;L<16;){if(0===N)break e;N--,B+=U[I++]<>8),512&D.flags&&4&D.wrap&&(ie[0]=255&B,ie[1]=B>>>8&255,D.check=r(D.check,ie,2,0)),B=0,L=0,D.mode=16184;case 16184:if(1024&D.flags){for(;L<16;){if(0===N)break e;N--,B+=U[I++]<>>8&255,D.check=r(D.check,ie,2,0)),B=0,L=0}else D.head&&(D.head.extra=null);D.mode=16185;case 16185:if(1024&D.flags&&(z=D.length,z>N&&(z=N),z&&(D.head&&(X=D.head.extra_len-D.length,D.head.extra||(D.head.extra=new Uint8Array(D.head.extra_len)),D.head.extra.set(U.subarray(I,I+z),X)),512&D.flags&&4&D.wrap&&(D.check=r(D.check,U,z,I)),N-=z,I+=z,D.length-=z),D.length))break e;D.length=0,D.mode=16186;case 16186:if(2048&D.flags){if(0===N)break e;z=0;do{X=U[I+z++],D.head&&X&&D.length<65536&&(D.head.name+=String.fromCharCode(X))}while(X&&z>9&1,D.head.done=!0),e.adler=D.check=0,D.mode=_;break;case 16189:for(;L<32;){if(0===N)break e;N--,B+=U[I++]<>>=7&L,L-=7&L,D.mode=R;break}for(;L<3;){if(0===N)break e;N--,B+=U[I++]<>>=1,L-=1,3&B){case 0:D.mode=16193;break;case 1:if(M(D),D.mode=y,t===l){B>>>=2,L-=2;break e}break;case 2:D.mode=16196;break;case 3:e.msg="invalid block type",D.mode=E}B>>>=2,L-=2;break;case 16193:for(B>>>=7&L,L-=7&L;L<32;){if(0===N)break e;N--,B+=U[I++]<>>16^65535)){e.msg="invalid stored block lengths",D.mode=E;break}if(D.length=65535&B,B=0,L=0,D.mode=v,t===l)break e;case v:D.mode=16195;case 16195:if(z=D.length,z){if(z>N&&(z=N),z>C&&(z=C),0===z)break e;S.set(U.subarray(I,I+z),O),N-=z,I+=z,C-=z,O+=z,D.length-=z;break}D.mode=_;break;case 16196:for(;L<14;){if(0===N)break e;N--,B+=U[I++]<>>=5,L-=5,D.ndist=1+(31&B),B>>>=5,L-=5,D.ncode=4+(15&B),B>>>=4,L-=4,D.nlen>286||D.ndist>30){e.msg="too many length or distance symbols",D.mode=E;break}D.have=0,D.mode=16197;case 16197:for(;D.have>>=3,L-=3}for(;D.have<19;)D.lens[re[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,$={bits:D.lenbits},q=a(0,D.lens,0,19,D.lencode,0,D.work,$),D.lenbits=$.bits,q){e.msg="invalid code lengths set",D.mode=E;break}D.have=0,D.mode=16198;case 16198:for(;D.have>>24,G=te>>>16&255,K=65535&te,!(j<=L);){if(0===N)break e;N--,B+=U[I++]<>>=j,L-=j,D.lens[D.have++]=K;else{if(16===K){for(ee=j+2;L>>=j,L-=j,0===D.have){e.msg="invalid bit length repeat",D.mode=E;break}X=D.lens[D.have-1],z=3+(3&B),B>>>=2,L-=2}else if(17===K){for(ee=j+3;L>>=j,L-=j,X=0,z=3+(7&B),B>>>=3,L-=3}else{for(ee=j+7;L>>=j,L-=j,X=0,z=11+(127&B),B>>>=7,L-=7}if(D.have+z>D.nlen+D.ndist){e.msg="invalid bit length repeat",D.mode=E;break}for(;z--;)D.lens[D.have++]=X}}if(D.mode===E)break;if(0===D.lens[256]){e.msg="invalid code -- missing end-of-block",D.mode=E;break}if(D.lenbits=9,$={bits:D.lenbits},q=a(1,D.lens,0,D.nlen,D.lencode,0,D.work,$),D.lenbits=$.bits,q){e.msg="invalid literal/lengths set",D.mode=E;break}if(D.distbits=6,D.distcode=D.distdyn,$={bits:D.distbits},q=a(2,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,$),D.distbits=$.bits,q){e.msg="invalid distances set",D.mode=E;break}if(D.mode=y,t===l)break e;case y:D.mode=x;case x:if(N>=6&&C>=258){e.next_out=O,e.avail_out=C,e.next_in=I,e.avail_in=N,D.hold=B,D.bits=L,n(e,P),O=e.next_out,S=e.output,C=e.avail_out,I=e.next_in,U=e.input,N=e.avail_in,B=D.hold,L=D.bits,D.mode===_&&(D.back=-1);break}for(D.back=0;te=D.lencode[B&(1<>>24,G=te>>>16&255,K=65535&te,!(j<=L);){if(0===N)break e;N--,B+=U[I++]<>J)],j=te>>>24,G=te>>>16&255,K=65535&te,!(J+j<=L);){if(0===N)break e;N--,B+=U[I++]<>>=J,L-=J,D.back+=J}if(B>>>=j,L-=j,D.back+=j,D.length=K,0===G){D.mode=16205;break}if(32&G){D.back=-1,D.mode=_;break}if(64&G){e.msg="invalid literal/length code",D.mode=E;break}D.extra=15&G,D.mode=16201;case 16201:if(D.extra){for(ee=D.extra;L>>=D.extra,L-=D.extra,D.back+=D.extra}D.was=D.length,D.mode=16202;case 16202:for(;te=D.distcode[B&(1<>>24,G=te>>>16&255,K=65535&te,!(j<=L);){if(0===N)break e;N--,B+=U[I++]<>J)],j=te>>>24,G=te>>>16&255,K=65535&te,!(J+j<=L);){if(0===N)break e;N--,B+=U[I++]<>>=J,L-=J,D.back+=J}if(B>>>=j,L-=j,D.back+=j,64&G){e.msg="invalid distance code",D.mode=E;break}D.offset=K,D.extra=15&G,D.mode=16203;case 16203:if(D.extra){for(ee=D.extra;L>>=D.extra,L-=D.extra,D.back+=D.extra}if(D.offset>D.dmax){e.msg="invalid distance too far back",D.mode=E;break}D.mode=16204;case 16204:if(0===C)break e;if(z=P-C,D.offset>z){if(z=D.offset-z,z>D.whave&&D.sane){e.msg="invalid distance too far back",D.mode=E;break}z>D.wnext?(z-=D.wnext,V=D.wsize-z):V=D.wnext-z,z>D.length&&(z=D.length),Y=D.window}else Y=S,V=O-D.offset,z=D.length;z>C&&(z=C),C-=z,D.length-=z;do{S[O++]=Y[V++]}while(--z);0===D.length&&(D.mode=x);break;case 16205:if(0===C)break e;S[O++]=D.length,C--,D.mode=x;break;case R:if(D.wrap){for(;L<32;){if(0===N)break e;N--,B|=U[I++]<{if(Z(e))return c;let t=e.state;return t.window&&(t.window=null),e.state=null,f},t.exports.inflateGetHeader=(e,t)=>{if(Z(e))return c;let i=e.state;return 2&i.wrap?(i.head=t,t.done=!1,f):c},t.exports.inflateSetDictionary=(e,t)=>{let r,n,a,s=t.length;return Z(e)||(r=e.state,0!==r.wrap&&r.mode!==k)?c:r.mode===k&&(n=1,n=i(n,t,s,0),n!==r.check)?u:(a=F(e,t,s,s),a?(r.mode=A,w):(r.havedict=1,f))},t.exports.inflateInfo="pako inflate (from Nodeca project)"})),_t=R(((e,t)=>{"use strict";var i=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);t.exports.assign=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(let t in r)i(r,t)&&(e[t]=r[t])}}return e},t.exports.flattenChunks=e=>{let t=0;for(let i=0,r=e.length;i{"use strict";var i=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}var r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,t.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,r,n,a,s=e.length,o=0;for(n=0;n>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t},t.exports.buf2string=(e,t)=>{let n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let a,s,o=new Array(2*n);for(s=0,a=0;a4)o[s++]=65533,a+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&a1?o[s++]=65533:t<65536?o[s++]=t:(t-=65536,o[s++]=55296|t>>10&1023,o[s++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&i)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let i=0;i{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+r[e[i]]>t?i:t}})),Et=R(((e,t)=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}})),St=R(((e,t)=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}})),vt=R(((e,t)=>{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}})),Rt=R(((e,t)=>{"use strict";var i=bt(),r=_t(),n=kt(),a=Et(),s=St(),o=vt(),l=Object.prototype.toString,{Z_NO_FLUSH:f,Z_FINISH:d,Z_OK:h,Z_STREAM_END:c,Z_NEED_DICT:u,Z_STREAM_ERROR:w,Z_DATA_ERROR:b,Z_MEM_ERROR:m}=J();function g(e){this.options=r.assign({chunkSize:65536,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let f=i.inflateInit2(this.strm,t.windowBits);if(f!==h)throw new Error(a[f]);if(this.header=new o,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=n.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(f=i.inflateSetDictionary(this.strm,t.dictionary),f!==h)))throw new Error(a[f])}function k(e,t){let i=new g(t);if(i.push(e),i.err)throw i.msg||a[i.err];return i.result}g.prototype.push=function(e,t){let r,a,s,o=this.strm,g=this.options.chunkSize,k=this.options.dictionary;if(this.ended)return!1;for(a=t===~~t?t:!0===t?d:f,"[object ArrayBuffer]"===l.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;;){for(0===o.avail_out&&(o.output=new Uint8Array(g),o.next_out=0,o.avail_out=g),r=i.inflate(o,a),r===u&&k&&(r=i.inflateSetDictionary(o,k),r===h?r=i.inflate(o,a):r===b&&(r=u));o.avail_in>0&&r===c&&o.state.wrap>0&&0!==e[o.next_in];)i.inflateReset(o),r=i.inflate(o,a);switch(r){case w:case b:case u:case m:return this.onEnd(r),this.ended=!0,!1}if(s=o.avail_out,o.next_out&&(0===o.avail_out||r===c))if("string"===this.options.to){let e=n.utf8border(o.output,o.next_out),t=o.next_out-e,i=n.buf2string(o.output,e);o.next_out=t,o.avail_out=g-t,t&&o.output.set(o.output.subarray(e,e+t),0),this.onData(i)}else this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out));if(r!==h||0!==s){if(r===c)return r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===o.avail_in)break}}return!0},g.prototype.onData=function(e){this.chunks.push(e)},g.prototype.onEnd=function(e){e===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.exports.Inflate=g,t.exports.inflate=k,t.exports.inflateRaw=function(e,t){return(t=t||{}).raw=!0,k(e,t)},t.exports.ungzip=k,t.exports.constants=J()})),Nt=1953029805,Mt=2917034100;function oe(e,t){if(oe.passThroughDataForTesting)return t;ae.typeOf.object("key",e),ae.typeOf.object("data",t);let i=e.byteLength;if(0===i||i%4!=0)throw new D("The length of key must be greater than 0 and a multiple of 4.");let r=new DataView(t),n=r.getUint32(0,!0);if(n===Nt||n===Mt)return t;let a,s=new DataView(e),o=0,l=t.byteLength,f=l-l%8,d=i,h=8;for(;o=d&&(h=(h+8)%24,a=h);ot)throw new D("Malformed terrain packet found.")}return e},a=0,s=[];for(;s.length{"use strict";t.exports=(e,t,i,r)=>{let n=65535&e|0,a=e>>>16&65535|0,s=0;for(;0!==i;){s=i>2e3?2e3:i,i-=s;do{n=n+t[r++]|0,a=a+n|0}while(--s);n%=65521,a%=65521}return n|a<<16|0}})),De=R(((e,t)=>{"use strict";var i=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());t.exports=(e,t,r,n)=>{let a=i,s=n+r;e^=-1;for(let i=n;i>>8^a[255&(e^t[i])];return-1^e}})),Oe=R(((e,t)=>{"use strict";t.exports=function(e,t){let i,r,n,a,s,o,l,f,d,h,c,u,w,b,m,g,k,_,p,v,y,x,R,E,A=e.state;i=e.next_in,R=e.input,r=i+(e.avail_in-5),n=e.next_out,E=e.output,a=n-(t-e.avail_out),s=n+(e.avail_out-257),o=A.dmax,l=A.wsize,f=A.whave,d=A.wnext,h=A.window,c=A.hold,u=A.bits,w=A.lencode,b=A.distcode,m=(1<>>24,c>>>=_,u-=_,_=k>>>16&255,0===_)E[n++]=65535&k;else{if(!(16&_)){if(64&_){if(32&_){A.mode=16191;break e}e.msg="invalid literal/length code",A.mode=16209;break e}k=w[(65535&k)+(c&(1<<_)-1)];continue t}for(p=65535&k,_&=15,_&&(u<_&&(c+=R[i++]<>>=_,u-=_),u<15&&(c+=R[i++]<>>24,c>>>=_,u-=_,_=k>>>16&255,16&_){if(v=65535&k,_&=15,u<_&&(c+=R[i++]<o){e.msg="invalid distance too far back",A.mode=16209;break e}if(c>>>=_,u-=_,_=n-a,v>_){if(_=v-_,_>f&&A.sane){e.msg="invalid distance too far back",A.mode=16209;break e}if(y=0,x=h,0===d){if(y+=l-_,_2;)E[n++]=x[y++],E[n++]=x[y++],E[n++]=x[y++],p-=3;p&&(E[n++]=x[y++],p>1&&(E[n++]=x[y++]))}else{y=n-v;do{E[n++]=E[y++],E[n++]=E[y++],E[n++]=E[y++],p-=3}while(p>2);p&&(E[n++]=E[y++],p>1&&(E[n++]=E[y++]))}break}if(64&_){e.msg="invalid distance code",A.mode=16209;break e}k=b[(65535&k)+(c&(1<<_)-1)]}}break}}while(i>3,i-=p,u-=p<<3,c&=(1<{"use strict";var i=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),r=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),n=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),a=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);t.exports=(e,t,s,o,l,f,d,h)=>{let c,u,w,b,m,g,k,_,p,v=h.bits,y=0,x=0,R=0,E=0,A=0,T=0,D=0,U=0,S=0,Z=0,I=null,O=new Uint16Array(16),N=new Uint16Array(16),C=null;for(y=0;y<=15;y++)O[y]=0;for(x=0;x=1&&0===O[E];E--);if(A>E&&(A=E),0===E)return l[f++]=20971520,l[f++]=20971520,h.bits=1,0;for(R=1;R0&&(0===e||1!==E))return-1;for(N[1]=0,y=1;y<15;y++)N[y+1]=N[y]+O[y];for(x=0;x852||2===e&&S>592)return 1;for(;;){k=y-D,d[x]+1=g?(_=C[d[x]-g],p=I[d[x]-g]):(_=96,p=0),c=1<>D)+u]=k<<24|_<<16|p|0}while(0!==u);for(c=1<>=1;if(0!==c?(Z&=c-1,Z+=c):Z=0,x++,0==--O[y]){if(y===E)break;y=t[s+d[x]]}if(y>A&&(Z&b)!==w){for(0===D&&(D=A),m+=R,T=y-D,U=1<852||2===e&&S>592)return 1;w=Z&b,l[w]=A<<24|T<<16|m-f|0}}return 0!==Z&&(l[m+Z]=y-D<<24|64<<16|0),h.bits=A,0}})),J=R(((e,t)=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}})),bt=R(((e,t)=>{"use strict";var i=Ie(),r=De(),n=Oe(),a=Me(),{Z_FINISH:s,Z_BLOCK:o,Z_TREES:l,Z_OK:f,Z_STREAM_END:d,Z_NEED_DICT:h,Z_STREAM_ERROR:c,Z_DATA_ERROR:u,Z_MEM_ERROR:w,Z_BUF_ERROR:b,Z_DEFLATED:m}=J(),g=16180,k=16190,_=16191,p=16192,v=16194,y=16199,x=16200,R=16206,E=16209,A=16210,T=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function D(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var U,S,Z=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.mode16211?1:0},I=e=>{if(Z(e))return c;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=g,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,f},O=e=>{if(Z(e))return c;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,I(e)},N=(e,t)=>{let i;if(Z(e))return c;let r=e.state;return t<0?(i=0,t=-t):(i=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?c:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=i,r.wbits=t,O(e))},C=(e,t)=>{if(!e)return c;let i=new D;e.state=i,i.strm=e,i.window=null,i.mode=g;let r=N(e,t);return r!==f&&(e.state=null),r},B=!0,F=e=>{if(B){U=new Int32Array(512),S=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,U,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,S,0,e.work,{bits:5}),B=!1}e.lencode=U,e.lenbits=9,e.distcode=S,e.distbits=5},M=(e,t,i,r)=>{let n,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(a.window.set(t.subarray(i-a.wsize,i),0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>r&&(n=r),a.window.set(t.subarray(i-r,i-r+n),a.wnext),(r-=n)?(a.window.set(t.subarray(i-r,i),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whaveC(e,15),t.exports.inflateInit2=C,t.exports.inflate=(e,t)=>{let D,U,S,I,O,N,C,B,H,L,P,z,V,j,Y,G,K,J,X,Q,q,W,$,ee,te=0,ie=new Uint8Array(4),re=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Z(e)||!e.output||!e.input&&0!==e.avail_in)return c;D=e.state,D.mode===_&&(D.mode=p),O=e.next_out,S=e.output,C=e.avail_out,I=e.next_in,U=e.input,N=e.avail_in,B=D.hold,H=D.bits,L=N,P=C,W=f;e:for(;;)switch(D.mode){case g:if(0===D.wrap){D.mode=p;break}for(;H<16;){if(0===N)break e;N--,B+=U[I++]<>>8&255,D.check=r(D.check,ie,2,0),B=0,H=0,D.mode=16181;break}if(D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&B)<<8)+(B>>8))%31){e.msg="incorrect header check",D.mode=E;break}if((15&B)!==m){e.msg="unknown compression method",D.mode=E;break}if(B>>>=4,H-=4,q=8+(15&B),0===D.wbits&&(D.wbits=q),q>15||q>D.wbits){e.msg="invalid window size",D.mode=E;break}D.dmax=1<>8&1),512&D.flags&&4&D.wrap&&(ie[0]=255&B,ie[1]=B>>>8&255,D.check=r(D.check,ie,2,0)),B=0,H=0,D.mode=16182;case 16182:for(;H<32;){if(0===N)break e;N--,B+=U[I++]<>>8&255,ie[2]=B>>>16&255,ie[3]=B>>>24&255,D.check=r(D.check,ie,4,0)),B=0,H=0,D.mode=16183;case 16183:for(;H<16;){if(0===N)break e;N--,B+=U[I++]<>8),512&D.flags&&4&D.wrap&&(ie[0]=255&B,ie[1]=B>>>8&255,D.check=r(D.check,ie,2,0)),B=0,H=0,D.mode=16184;case 16184:if(1024&D.flags){for(;H<16;){if(0===N)break e;N--,B+=U[I++]<>>8&255,D.check=r(D.check,ie,2,0)),B=0,H=0}else D.head&&(D.head.extra=null);D.mode=16185;case 16185:if(1024&D.flags&&(z=D.length,z>N&&(z=N),z&&(D.head&&(q=D.head.extra_len-D.length,D.head.extra||(D.head.extra=new Uint8Array(D.head.extra_len)),D.head.extra.set(U.subarray(I,I+z),q)),512&D.flags&&4&D.wrap&&(D.check=r(D.check,U,z,I)),N-=z,I+=z,D.length-=z),D.length))break e;D.length=0,D.mode=16186;case 16186:if(2048&D.flags){if(0===N)break e;z=0;do{q=U[I+z++],D.head&&q&&D.length<65536&&(D.head.name+=String.fromCharCode(q))}while(q&&z>9&1,D.head.done=!0),e.adler=D.check=0,D.mode=_;break;case 16189:for(;H<32;){if(0===N)break e;N--,B+=U[I++]<>>=7&H,H-=7&H,D.mode=R;break}for(;H<3;){if(0===N)break e;N--,B+=U[I++]<>>=1,H-=1,3&B){case 0:D.mode=16193;break;case 1:if(F(D),D.mode=y,t===l){B>>>=2,H-=2;break e}break;case 2:D.mode=16196;break;case 3:e.msg="invalid block type",D.mode=E}B>>>=2,H-=2;break;case 16193:for(B>>>=7&H,H-=7&H;H<32;){if(0===N)break e;N--,B+=U[I++]<>>16^65535)){e.msg="invalid stored block lengths",D.mode=E;break}if(D.length=65535&B,B=0,H=0,D.mode=v,t===l)break e;case v:D.mode=16195;case 16195:if(z=D.length,z){if(z>N&&(z=N),z>C&&(z=C),0===z)break e;S.set(U.subarray(I,I+z),O),N-=z,I+=z,C-=z,O+=z,D.length-=z;break}D.mode=_;break;case 16196:for(;H<14;){if(0===N)break e;N--,B+=U[I++]<>>=5,H-=5,D.ndist=1+(31&B),B>>>=5,H-=5,D.ncode=4+(15&B),B>>>=4,H-=4,D.nlen>286||D.ndist>30){e.msg="too many length or distance symbols",D.mode=E;break}D.have=0,D.mode=16197;case 16197:for(;D.have>>=3,H-=3}for(;D.have<19;)D.lens[re[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,$={bits:D.lenbits},W=a(0,D.lens,0,19,D.lencode,0,D.work,$),D.lenbits=$.bits,W){e.msg="invalid code lengths set",D.mode=E;break}D.have=0,D.mode=16198;case 16198:for(;D.have>>24,G=te>>>16&255,K=65535&te,!(Y<=H);){if(0===N)break e;N--,B+=U[I++]<>>=Y,H-=Y,D.lens[D.have++]=K;else{if(16===K){for(ee=Y+2;H>>=Y,H-=Y,0===D.have){e.msg="invalid bit length repeat",D.mode=E;break}q=D.lens[D.have-1],z=3+(3&B),B>>>=2,H-=2}else if(17===K){for(ee=Y+3;H>>=Y,H-=Y,q=0,z=3+(7&B),B>>>=3,H-=3}else{for(ee=Y+7;H>>=Y,H-=Y,q=0,z=11+(127&B),B>>>=7,H-=7}if(D.have+z>D.nlen+D.ndist){e.msg="invalid bit length repeat",D.mode=E;break}for(;z--;)D.lens[D.have++]=q}}if(D.mode===E)break;if(0===D.lens[256]){e.msg="invalid code -- missing end-of-block",D.mode=E;break}if(D.lenbits=9,$={bits:D.lenbits},W=a(1,D.lens,0,D.nlen,D.lencode,0,D.work,$),D.lenbits=$.bits,W){e.msg="invalid literal/lengths set",D.mode=E;break}if(D.distbits=6,D.distcode=D.distdyn,$={bits:D.distbits},W=a(2,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,$),D.distbits=$.bits,W){e.msg="invalid distances set",D.mode=E;break}if(D.mode=y,t===l)break e;case y:D.mode=x;case x:if(N>=6&&C>=258){e.next_out=O,e.avail_out=C,e.next_in=I,e.avail_in=N,D.hold=B,D.bits=H,n(e,P),O=e.next_out,S=e.output,C=e.avail_out,I=e.next_in,U=e.input,N=e.avail_in,B=D.hold,H=D.bits,D.mode===_&&(D.back=-1);break}for(D.back=0;te=D.lencode[B&(1<>>24,G=te>>>16&255,K=65535&te,!(Y<=H);){if(0===N)break e;N--,B+=U[I++]<>J)],Y=te>>>24,G=te>>>16&255,K=65535&te,!(J+Y<=H);){if(0===N)break e;N--,B+=U[I++]<>>=J,H-=J,D.back+=J}if(B>>>=Y,H-=Y,D.back+=Y,D.length=K,0===G){D.mode=16205;break}if(32&G){D.back=-1,D.mode=_;break}if(64&G){e.msg="invalid literal/length code",D.mode=E;break}D.extra=15&G,D.mode=16201;case 16201:if(D.extra){for(ee=D.extra;H>>=D.extra,H-=D.extra,D.back+=D.extra}D.was=D.length,D.mode=16202;case 16202:for(;te=D.distcode[B&(1<>>24,G=te>>>16&255,K=65535&te,!(Y<=H);){if(0===N)break e;N--,B+=U[I++]<>J)],Y=te>>>24,G=te>>>16&255,K=65535&te,!(J+Y<=H);){if(0===N)break e;N--,B+=U[I++]<>>=J,H-=J,D.back+=J}if(B>>>=Y,H-=Y,D.back+=Y,64&G){e.msg="invalid distance code",D.mode=E;break}D.offset=K,D.extra=15&G,D.mode=16203;case 16203:if(D.extra){for(ee=D.extra;H>>=D.extra,H-=D.extra,D.back+=D.extra}if(D.offset>D.dmax){e.msg="invalid distance too far back",D.mode=E;break}D.mode=16204;case 16204:if(0===C)break e;if(z=P-C,D.offset>z){if(z=D.offset-z,z>D.whave&&D.sane){e.msg="invalid distance too far back",D.mode=E;break}z>D.wnext?(z-=D.wnext,V=D.wsize-z):V=D.wnext-z,z>D.length&&(z=D.length),j=D.window}else j=S,V=O-D.offset,z=D.length;z>C&&(z=C),C-=z,D.length-=z;do{S[O++]=j[V++]}while(--z);0===D.length&&(D.mode=x);break;case 16205:if(0===C)break e;S[O++]=D.length,C--,D.mode=x;break;case R:if(D.wrap){for(;H<32;){if(0===N)break e;N--,B|=U[I++]<{if(Z(e))return c;let t=e.state;return t.window&&(t.window=null),e.state=null,f},t.exports.inflateGetHeader=(e,t)=>{if(Z(e))return c;let i=e.state;return 2&i.wrap?(i.head=t,t.done=!1,f):c},t.exports.inflateSetDictionary=(e,t)=>{let r,n,a,s=t.length;return Z(e)||(r=e.state,0!==r.wrap&&r.mode!==k)?c:r.mode===k&&(n=1,n=i(n,t,s,0),n!==r.check)?u:(a=M(e,t,s,s),a?(r.mode=A,w):(r.havedict=1,f))},t.exports.inflateInfo="pako inflate (from Nodeca project)"})),_t=R(((e,t)=>{"use strict";var i=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);t.exports.assign=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(let t in r)i(r,t)&&(e[t]=r[t])}}return e},t.exports.flattenChunks=e=>{let t=0;for(let i=0,r=e.length;i{"use strict";var i=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}var r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,t.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,r,n,a,s=e.length,o=0;for(n=0;n>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t},t.exports.buf2string=(e,t)=>{let n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let a,s,o=new Array(2*n);for(s=0,a=0;a4)o[s++]=65533,a+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&a1?o[s++]=65533:t<65536?o[s++]=t:(t-=65536,o[s++]=55296|t>>10&1023,o[s++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&i)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let i=0;i{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+r[e[i]]>t?i:t}})),Et=R(((e,t)=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}})),St=R(((e,t)=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}})),vt=R(((e,t)=>{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}})),Rt=R(((e,t)=>{"use strict";var i=bt(),r=_t(),n=kt(),a=Et(),s=St(),o=vt(),l=Object.prototype.toString,{Z_NO_FLUSH:f,Z_FINISH:d,Z_OK:h,Z_STREAM_END:c,Z_NEED_DICT:u,Z_STREAM_ERROR:w,Z_DATA_ERROR:b,Z_MEM_ERROR:m}=J();function g(e){this.options=r.assign({chunkSize:65536,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let f=i.inflateInit2(this.strm,t.windowBits);if(f!==h)throw new Error(a[f]);if(this.header=new o,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=n.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(f=i.inflateSetDictionary(this.strm,t.dictionary),f!==h)))throw new Error(a[f])}function k(e,t){let i=new g(t);if(i.push(e),i.err)throw i.msg||a[i.err];return i.result}g.prototype.push=function(e,t){let r,a,s,o=this.strm,g=this.options.chunkSize,k=this.options.dictionary;if(this.ended)return!1;for(a=t===~~t?t:!0===t?d:f,"[object ArrayBuffer]"===l.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;;){for(0===o.avail_out&&(o.output=new Uint8Array(g),o.next_out=0,o.avail_out=g),r=i.inflate(o,a),r===u&&k&&(r=i.inflateSetDictionary(o,k),r===h?r=i.inflate(o,a):r===b&&(r=u));o.avail_in>0&&r===c&&o.state.wrap>0&&0!==e[o.next_in];)i.inflateReset(o),r=i.inflate(o,a);switch(r){case w:case b:case u:case m:return this.onEnd(r),this.ended=!0,!1}if(s=o.avail_out,o.next_out&&(0===o.avail_out||r===c))if("string"===this.options.to){let e=n.utf8border(o.output,o.next_out),t=o.next_out-e,i=n.buf2string(o.output,e);o.next_out=t,o.avail_out=g-t,t&&o.output.set(o.output.subarray(e,e+t),0),this.onData(i)}else this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out));if(r!==h||0!==s){if(r===c)return r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===o.avail_in)break}}return!0},g.prototype.onData=function(e){this.chunks.push(e)},g.prototype.onEnd=function(e){e===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.exports.Inflate=g,t.exports.inflate=k,t.exports.inflateRaw=function(e,t){return(t=t||{}).raw=!0,k(e,t)},t.exports.ungzip=k,t.exports.constants=J()})),Nt=1953029805,Mt=2917034100;function oe(e,t){if(oe.passThroughDataForTesting)return t;ae.typeOf.object("key",e),ae.typeOf.object("data",t);let i=e.byteLength;if(0===i||i%4!=0)throw new D("The length of key must be greater than 0 and a multiple of 4.");let r=new DataView(t),n=r.getUint32(0,!0);if(n===Nt||n===Mt)return t;let a,s=new DataView(e),o=0,l=t.byteLength,f=l-l%8,d=i,h=8;for(;o=d&&(h=(h+8)%24,a=h);ot)throw new D("Malformed terrain packet found.")}return e},a=0,s=[];for(;s.lengtho.west&&a.xo.south&&a.y0&&nt(e.vertexCount,e.positions,e.scale_x,e.scale_y,t.cartographicCenter,t.geoidDataList,!1),rt(e.vertexCount,e.positions,e.normals,t.cartographicCenter,t.cartesianCenter,t.parentRotation,t.ellipsoidRadiiSquare,e.scale_x,e.scale_y),f(e.uv0s)&&f(e["uv-region"])&&ot(e.vertexCount,e.uv0s,e["uv-region"]);let r=st(e.vertexCount,e.indices,e.positions,e.normals,e.uv0s,e.colors),n={};if(f(e["feature-index"]))n.positions=e.positions,n.indices=e.indices,n.featureIndex=e["feature-index"],n.cartesianCenter=t.cartesianCenter,n.parentRotation=t.parentRotation;else if(f(e.faceRange)){n.positions=e.positions,n.indices=e.indices,n.sourceURL=t.url,n.cartesianCenter=t.cartesianCenter,n.parentRotation=t.parentRotation,n.featureIndex=new Array(e.positions.length);for(let t=0;to.west&&a.xo.south&&a.ye[t]:t=>t,i=0;if(r&&h(n)){let e=t=>n[4*a(t)+3]<255;for(let n=0;n0){let n=i;for(let r=0;r1){let t=r.length===o.length;for(let a=0;a0?new Uint32Array(i):void 0}function St(t){let e=new Float32Array(t.length);for(let n=0;n0&&(f.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:m,type:"SCALAR"}),W.push({attributes:z,indices:f.length-1,material:W.length,extensions:H})),m0&&Lt(n.vertexCount,n.positions,n.scale_x,n.scale_y,t.cartographicCenter,t.geoidDataList,!1),Ot(n.vertexCount,n.positions,n.normals,t.cartographicCenter,t.cartesianCenter,t.parentRotation,t.ellipsoidRadiiSquare,n.scale_x,n.scale_y),h(n.uv0s)&&h(n["uv-region"])&&Tt(n.vertexCount,n.uv0s,n["uv-region"]),h(n["feature-index"]))e=n["feature-index"];else if(h(n.faceRange)){e=new Array(n.vertexCount);for(let t=0;t{var r,n=(r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,typeof __filename<"u"&&(r=r||__filename),function(e){var t,n,_=typeof(e=e||{})<"u"?e:{};_.ready=new Promise((function(e,r){t=e,n=r}));var o,i={};for(o in _)_.hasOwnProperty(o)&&(i[o]=_[o]);var a,s,u,R,A=[];u="object"==typeof window,R="function"==typeof importScripts,a="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,s=!u&&!a&&!R;var c,T,f,l,O,p="";a?(p=R?Gt("path").dirname(p)+"/":__dirname+"/",c=function(e,t){return l||(l=Gt("fs")),O||(O=Gt("path")),e=O.normalize(e),l.readFileSync(e,t?null:"utf8")},f=function(e){var t=c(e,!0);return t.buffer||(t=new Uint8Array(t)),d(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),A=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof yt))throw e})),process.on("unhandledRejection",J),_.inspect=function(){return"[Emscripten Module object]"}):s?(typeof read<"u"&&(c=function(e){return read(e)}),f=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(d("object"==typeof(t=read(e,"binary"))),t)},typeof scriptArgs<"u"?A=scriptArgs:typeof arguments<"u"&&(A=arguments),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(u||R)&&(R?p=self.location.href:typeof document<"u"&&document.currentScript&&(p=document.currentScript.src),r&&(p=r),p=0!==p.indexOf("blob:")?p.substr(0,p.lastIndexOf("/")+1):"",c=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},R&&(f=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),T=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var C,B=_.print||console.log.bind(console),K=_.printErr||console.warn.bind(console);for(o in i)i.hasOwnProperty(o)&&(_[o]=i[o]);i=null,_.arguments&&(A=_.arguments),_.thisProgram&&_.thisProgram,_.quit&&_.quit,_.wasmBinary&&(C=_.wasmBinary),_.noExitRuntime,"object"!=typeof WebAssembly&&J("no native wasm support detected");var h,M=!1;function d(e,t){e||J("Assertion failed: "+t)}var F=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function G(e,t,r){for(var n=t+r,_=t;e[_]&&!(_>=n);)++_;if(_-t>16&&e.subarray&&F)return F.decode(e.subarray(t,_));for(var o="";t<_;){var i=e[t++];if(128&i){var a=63&e[t++];if(192!=(224&i)){var s=63&e[t++];if((i=224==(240&i)?(15&i)<<12|a<<6|s:(7&i)<<18|a<<12|s<<6|63&e[t++])<65536)o+=String.fromCharCode(i);else{var u=i-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&i)<<6|a)}else o+=String.fromCharCode(i)}return o}function y(e,t){return e?G(v,e,t):""}var N,P,v,S,V,m,E,U,g,L=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function w(e,t){for(var r=e,n=r>>1,_=n+t/2;!(n>=_)&&V[n];)++n;if((r=n<<1)-e>32&&L)return L.decode(v.subarray(e,r));for(var o="",i=0;!(i>=t/2);++i){var a=S[e+2*i>>1];if(0==a)break;o+=String.fromCharCode(a)}return o}function b(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,_=(r-=2)<2*e.length?r/2:e.length,o=0;o<_;++o){var i=e.charCodeAt(o);S[t>>1]=i,t+=2}return S[t>>1]=0,t-n}function D(e){return 2*e.length}function I(e,t){for(var r=0,n="";!(r>=t/4);){var _=m[e+4*r>>2];if(0==_)break;if(++r,_>=65536){var o=_-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(_)}return n}function X(e,t,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,_=n+r-4,o=0;o=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++o)),m[t>>2]=i,(t+=4)+4>_)break}return m[t>>2]=0,t-n}function x(e){for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t}function $(e,t){return e%t>0&&(e+=t-e%t),e}function H(e){N=e,_.HEAP8=P=new Int8Array(e),_.HEAP16=S=new Int16Array(e),_.HEAP32=m=new Int32Array(e),_.HEAPU8=v=new Uint8Array(e),_.HEAPU16=V=new Uint16Array(e),_.HEAPU32=E=new Uint32Array(e),_.HEAPF32=U=new Float32Array(e),_.HEAPF64=g=new Float64Array(e)}_.INITIAL_MEMORY;var k,W=[],j=[],z=[],Y=[],q=0,Z=null,Q=null;function J(e){_.onAbort&&_.onAbort(e),K(e+=""),M=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function ee(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}_.preloadedImages={},_.preloadedAudios={};function te(e){return ee(e,"data:application/octet-stream;base64,")}function re(e){return ee(e,"file://")}var ne,_e="basis_transcoder.wasm";function oe(e){try{if(e==_e&&C)return new Uint8Array(C);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}catch(e){J(e)}}function ie(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?k.get(r)():k.get(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(_)}}te(_e)||(ne=_e,_e=_.locateFile?_.locateFile(ne,p):p+ne);var ae={};function se(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function ue(e){return this.fromWireType(E[e>>2])}var Re={},Ae={},ce={},Te=48,fe=57;function le(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Te&&t<=fe?"_"+e:e}function Oe(e,t){return e=le(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function pe(e,t){var r=Oe(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var Ce=void 0;function Be(e){throw new Ce(e)}function Ke(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Be("Mismatched type converter count");for(var _=0;_"u"?(me=function(e){return e},e):(ve=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next()){var r=t.value;r.ptr?Ve(r):console.warn("object already deleted: "+r.ptr)}})),Se=function(e){ve.unregister(e.$$)},(me=function(e){return ve.register(e,e.$$,e.$$),e})(e))}var Ee=void 0,Ue=[];function ge(){for(;Ue.length;){var e=Ue.pop();e.$$.deleteScheduled=!1,e.delete()}}function Le(){}var we={};function be(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ge("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function De(e,t,r){_.hasOwnProperty(e)?((void 0===r||void 0!==_[e].overloadTable&&void 0!==_[e].overloadTable[r])&&Ge("Cannot register public name '"+e+"' twice"),be(_,e,e),_.hasOwnProperty(r)&&Ge("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),_[e].overloadTable[r]=t):(_[e]=t,void 0!==r&&(_[e].numArguments=r))}function Ie(e,t,r,n,_,o,i,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=_,this.getActualType=o,this.upcast=i,this.downcast=a,this.pureVirtualFunctions=[]}function Xe(e,t,r){for(;t!==r;)t.upcast||Ge("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function xe(e,t){if(null===t)return this.isReference&&Ge("null is not a valid "+this.name),0;t.$$||Ge('Cannot pass "'+ut(t)+'" as a '+this.name),t.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Xe(t.$$.ptr,r,this.registeredClass)}function $e(e,t){var r;if(null===t)return this.isReference&&Ge("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ge('Cannot pass "'+ut(t)+'" as a '+this.name),t.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&Ge("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=Xe(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ge("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ge("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var _=t.clone();r=this.rawShare(r,it((function(){_.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ge("Unsupporting sharing policy")}return r}function He(e,t){if(null===t)return this.isReference&&Ge("null is not a valid "+this.name),0;t.$$||Ge('Cannot pass "'+ut(t)+'" as a '+this.name),t.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&Ge("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Xe(t.$$.ptr,r,this.registeredClass)}function ke(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=ke(e,t,r.baseClass);return null===n?null:r.downcast(n)}var We={};function je(e,t){return(!t.ptrType||!t.ptr)&&Be("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Be("Both smartPtrType and smartPtr must be specified"),t.count={value:1},me(Object.create(e,{$$:{value:t}}))}function ze(e,t,r,n,_,o,i,a,s,u,R){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=_,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=a,this.rawConstructor=s,this.rawShare=u,this.rawDestructor=R,_||void 0!==t.baseClass?this.toWireType=$e:n?(this.toWireType=xe,this.destructorFunction=null):(this.toWireType=He,this.destructorFunction=null)}function Ye(e,t,r){_.hasOwnProperty(e)||Be("Replacing nonexistant public symbol"),void 0!==_[e].overloadTable&&void 0!==r?_[e].overloadTable[r]=t:(_[e]=t,_[e].argCount=r)}function qe(e,t){var r=-1!=(e=de(e)).indexOf("j")?function(e,t){var r=[];return function(){r.length=arguments.length;for(var n=0;n>2)+n]);return r}function tt(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Oe(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,_=e.apply(n,t);return _ instanceof Object?_:n}function rt(e,t,r,n,_){var o=t.length;o<2&&Ge("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var i=null!==t[1]&&null!==r,a=!1,s=1;s0?", ":"")+A),c+=(u?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)c+="runDestructors(destructors);\n";else for(s=i?1:2;s4&&0==--_t[e].refcount&&(_t[e]=void 0,nt.push(e))}function it(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=nt.length?nt.pop():_t.length;return _t[t]={refcount:1,value:e},t}}function at(e,t,r){switch(t){case 0:return function(e){var t=r?P:v;return this.fromWireType(t[e])};case 1:return function(e){var t=r?S:V;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?m:E;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function st(e,t){var r=Ae[e];return void 0===r&&Ge(t+" has unknown type "+Qe(e)),r}function ut(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Rt(e,t){switch(t){case 2:return function(e){return this.fromWireType(U[e>>2])};case 3:return function(e){return this.fromWireType(g[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function At(e,t,r){switch(t){case 0:return r?function(e){return P[e]}:function(e){return v[e]};case 1:return r?function(e){return S[e>>1]}:function(e){return V[e>>1]};case 2:return r?function(e){return m[e>>2]}:function(e){return E[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function ct(e){return e||Ge("Cannot use deleted val. handle = "+e),_t[e].value}var Tt={};function ft(e){var t=Tt[e];return void 0===t?de(e):t}var lt=[];function Ot(){return"object"==typeof globalThis?globalThis:Function("return this")()}var pt={};function Ct(e){try{return h.grow(e-N.byteLength+65535>>>16),H(h.buffer),1}catch{}}var Bt={mappings:{},buffers:[null,[],[]],printChar:function(e,t){var r=Bt.buffers[e];0===t||10===t?((1===e?B:K)(G(r,0)),r.length=0):r.push(t)},varargs:void 0,get:function(){return Bt.varargs+=4,m[Bt.varargs-4>>2]},getStr:function(e){return y(e)},get64:function(e,t){return e}};Ce=_.InternalError=pe(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Me=e}(),Fe=_.BindingError=pe(Error,"BindingError"),Le.prototype.isAliasOf=function(e){if(!(this instanceof Le&&e instanceof Le))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,_=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)_=n.upcast(_),n=n.baseClass;return t===n&&r===_},Le.prototype.clone=function(){if(this.$$.ptr||Pe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=me(Object.create(Object.getPrototypeOf(this),{$$:{value:Ne(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},Le.prototype.delete=function(){this.$$.ptr||Pe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ge("Object already scheduled for deletion"),Se(this),Ve(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Le.prototype.isDeleted=function(){return!this.$$.ptr},Le.prototype.deleteLater=function(){return this.$$.ptr||Pe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ge("Object already scheduled for deletion"),Ue.push(this),1===Ue.length&&Ee&&Ee(ge),this.$$.deleteScheduled=!0,this},ze.prototype.getPointee=function(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},ze.prototype.destructor=function(e){this.rawDestructor&&this.rawDestructor(e)},ze.prototype.argPackAdvance=8,ze.prototype.readValueFromPointer=ue,ze.prototype.deleteObject=function(e){null!==e&&e.delete()},ze.prototype.fromWireType=function(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=function(e,t){return t=function(e,t){for(void 0===t&&Ge("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),We[t]}(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function _(){return this.isSmartPointer?je(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):je(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,i=this.registeredClass.getActualType(t),a=we[i];if(!a)return _.call(this);o=this.isConst?a.constPointerType:a.pointerType;var s=ke(t,this.registeredClass,o.registeredClass);return null===s?_.call(this):this.isSmartPointer?je(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):je(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})},_.getInheritedInstanceCount=function(){return Object.keys(We).length},_.getLiveInheritedInstances=function(){var e=[];for(var t in We)We.hasOwnProperty(t)&&e.push(We[t]);return e},_.flushPendingDeletes=ge,_.setDelayFunction=function(e){Ee=e,Ue.length&&Ee&&Ee(ge)},Ze=_.UnboundTypeError=pe(Error,"UnboundTypeError"),_.count_emval_handles=function(){for(var e=0,t=5;t<_t.length;++t)void 0!==_t[t]&&++e;return e},_.get_first_emval=function(){for(var e=5;e<_t.length;++e)if(void 0!==_t[e])return _t[e];return null};var Kt,ht={t:function(e){var t=ae[e];delete ae[e];var r=t.rawConstructor,n=t.rawDestructor,_=t.fields;Ke([e],_.map((function(e){return e.getterReturnType})).concat(_.map((function(e){return e.setterArgumentType}))),(function(e){var o={};return _.forEach((function(t,r){var n=t.fieldName,i=e[r],a=t.getter,s=t.getterContext,u=e[r+_.length],R=t.setter,A=t.setterContext;o[n]={read:function(e){return i.fromWireType(a(s,e))},write:function(e,t){var r=[];R(A,e,u.toWireType(r,t)),se(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in o)t[r]=o[r].read(e);return n(e),t},toWireType:function(e,t){for(var _ in o)if(!(_ in t))throw new TypeError('Missing field: "'+_+'"');var i=r();for(_ in o)o[_].write(i,t[_]);return null!==e&&e.push(n,i),i},argPackAdvance:8,readValueFromPointer:ue,destructorFunction:n}]}))},I:function(e,t,r,n,_){var o=he(r);ye(e,{name:t=de(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:_},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=P;else if(2===r)n=S;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=m}return this.fromWireType(n[e>>o])},destructorFunction:null})},x:function(e,t,r,n,_,o,i,a,s,u,R,A,c){R=de(R),o=qe(_,o),a&&(a=qe(i,a)),u&&(u=qe(s,u)),c=qe(A,c);var T=le(R);De(T,(function(){Je("Cannot construct "+R+" due to unbound types",[n])})),Ke([e,t,r],n?[n]:[],(function(t){var r,_;t=t[0],_=n?(r=t.registeredClass).instancePrototype:Le.prototype;var i=Oe(T,(function(){if(Object.getPrototypeOf(this)!==s)throw new Fe("Use 'new' to construct "+R);if(void 0===A.constructor_body)throw new Fe(R+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new Fe("Tried to invoke ctor of "+R+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),s=Object.create(_,{constructor:{value:i}});i.prototype=s;var A=new Ie(R,i,s,c,r,o,a,u),f=new ze(R,A,!0,!1,!1),l=new ze(R+"*",A,!1,!1,!1),O=new ze(R+" const*",A,!1,!0,!1);return we[e]={pointerType:l,constPointerType:O},Ye(T,i),[f,l,O]}))},w:function(e,t,r,n,_,o){d(t>0);var i=et(t,r);_=qe(n,_);var a=[o],s=[];Ke([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Fe("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){Je("Cannot construct "+e.name+" due to unbound types",i)},Ke([],i,(function(n){return e.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&Ge(r+" called with "+arguments.length+" arguments, expected "+(t-1)),s.length=0,a.length=t;for(var e=1;e>>a}}var s=-1!=t.indexOf("unsigned");ye(e,{name:t,fromWireType:i,toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+ut(r)+'" to '+this.name);if(r_)throw new TypeError('Passing a number "'+ut(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+_+"]!");return s?r>>>0:0|r},argPackAdvance:8,readValueFromPointer:At(t,o,0!==n),destructorFunction:null})},h:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function _(e){var t=E,r=t[e>>=2],_=t[e+1];return new n(N,_,r)}ye(e,{name:r=de(r),fromWireType:_,argPackAdvance:8,readValueFromPointer:_},{ignoreDuplicateRegistrations:!0})},B:function(e,t){var r="std::string"===(t=de(t));ye(e,{name:t,fromWireType:function(e){var t,n=E[e>>2];if(r)for(var _=e+4,o=0;o<=n;++o){var i=e+4+o;if(o==n||0==v[i]){var a=y(_,i-_);void 0===t?t=a:(t+="\0",t+=a),_=i+1}}else{var s=new Array(n);for(o=0;o=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}(t)}:function(){return t.length};var o=n(),i=Mt(4+o+1);if(E[i>>2]=o,r&&_)!function(e,t,r){!function(e,t,r,n){if(!(n>0))return 0;for(var _=r+n-1,o=0;o=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++o)),i<=127){if(r>=_)break;t[r++]=i}else if(i<=2047){if(r+1>=_)break;t[r++]=192|i>>6,t[r++]=128|63&i}else if(i<=65535){if(r+2>=_)break;t[r++]=224|i>>12,t[r++]=128|i>>6&63,t[r++]=128|63&i}else{if(r+3>=_)break;t[r++]=240|i>>18,t[r++]=128|i>>12&63,t[r++]=128|i>>6&63,t[r++]=128|63&i}}t[r]=0}(e,v,t,r)}(t,i+4,o+1);else if(_)for(var a=0;a255&&(dt(i),Ge("String has UTF-16 code units that do not fit in 8 bits")),v[i+4+a]=s}else for(a=0;a>2],i=o(),s=e+4,u=0;u<=_;++u){var R=e+4+u*t;if(u==_||0==i[R>>a]){var A=n(s,R-s);void 0===r?r=A:(r+="\0",r+=A),s=R+t}}return dt(e),r},toWireType:function(e,n){"string"!=typeof n&&Ge("Cannot pass non-string to C++ string type "+r);var o=i(n),s=Mt(4+o+t);return E[s>>2]=o>>a,_(n,s+4,o+t),null!==e&&e.push(dt,s),s},argPackAdvance:8,readValueFromPointer:ue,destructorFunction:function(e){dt(e)}})},u:function(e,t,r,n,_,o){ae[e]={name:de(t),rawConstructor:qe(r,n),rawDestructor:qe(_,o),fields:[]}},c:function(e,t,r,n,_,o,i,a,s,u){ae[e].fields.push({fieldName:de(t),getterReturnType:r,getter:qe(n,_),getterContext:o,setterArgumentType:i,setter:qe(a,s),setterContext:u})},J:function(e,t){ye(e,{isVoid:!0,name:t=de(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},m:function(e,t,r){e=ct(e),t=st(t,"emval::as");var n=[],_=it(n);return m[r>>2]=_,t.toWireType(n,e)},s:function(e,t,r,n){(e=lt[e])(t=ct(t),r=ft(r),null,n)},b:ot,y:function(e){return 0===e?it(Ot()):(e=ft(e),it(Ot()[e]))},p:function(e,t){for(var r=function(e,t){for(var r=new Array(e),n=0;n>2)+n],"parameter "+n);return r}(e,t),n=r[0],_=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",o=["retType"],i=[n],a="",s=0;s4&&(_t[e].refcount+=1)},q:function(e,t,r,n){e=ct(e);var o=pt[t];return o||(o=function(e){for(var t="",r=0;r>> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(st,_,it)}(t),pt[t]=o),o(e,r,n)},f:function(e){return it(ft(e))},l:function(e){se(_t[e].value),ot(e)},o:function(){J()},E:function(e,t,r){v.copyWithin(e,t,t+r)},F:function(e){var t=v.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var _=t*(1+.2/n);if(_=Math.min(_,e+100663296),Ct(Math.min(r,$(Math.max(e,_),65536))))return!0}return!1},G:function(e){return 0},C:function(e,t,r,n,_){},z:function(e,t,r,n){for(var _=0,o=0;o>2],a=m[t+(8*o+4)>>2],s=0;s>2]=_,0},D:function(e){}},Mt=(function(){var e={a:ht};function t(e,t){var r=e.exports;_.asm=r,H((h=_.asm.K).buffer),k=_.asm.O,function(e){j.unshift(e)}(_.asm.L),function(e){if(q--,_.monitorRunDependencies&&_.monitorRunDependencies(q),0==q&&(null!==Z&&(clearInterval(Z),Z=null),Q)){var t=Q;Q=null,t()}}()}function r(e){t(e.instance)}function o(t){return function(){if(!C&&(u||R)){if("function"==typeof fetch&&!re(_e))return fetch(_e,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+_e+"'";return e.arrayBuffer()})).catch((function(){return oe(_e)}));if(T)return new Promise((function(e,t){T(_e,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return oe(_e)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){K("failed to asynchronously prepare wasm: "+e),J(e)}))}if(q++,_.monitorRunDependencies&&_.monitorRunDependencies(q),_.instantiateWasm)try{return _.instantiateWasm(e,t)}catch(e){return K("Module.instantiateWasm callback failed with error: "+e),!1}(C||"function"!=typeof WebAssembly.instantiateStreaming||te(_e)||re(_e)||"function"!=typeof fetch?o(r):fetch(_e,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return K("wasm streaming compile failed: "+e),K("falling back to ArrayBuffer instantiation"),o(r)}))}))).catch(n)}(),_.___wasm_call_ctors=function(){return(_.___wasm_call_ctors=_.asm.L).apply(null,arguments)},_._malloc=function(){return(Mt=_._malloc=_.asm.M).apply(null,arguments)}),dt=_._free=function(){return(dt=_._free=_.asm.N).apply(null,arguments)},Ft=_.___getTypeName=function(){return(Ft=_.___getTypeName=_.asm.P).apply(null,arguments)};function yt(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Nt(e){function r(){Kt||(Kt=!0,_.calledRun=!0,!M&&(ie(j),ie(z),t(_),_.onRuntimeInitialized&&_.onRuntimeInitialized(),function(){if(_.postRun)for("function"==typeof _.postRun&&(_.postRun=[_.postRun]);_.postRun.length;)e=_.postRun.shift(),Y.unshift(e);var e;ie(Y)}()))}e=e||A,q>0||(function(){if(_.preRun)for("function"==typeof _.preRun&&(_.preRun=[_.preRun]);_.preRun.length;)e=_.preRun.shift(),W.unshift(e);var e;ie(W)}(),q>0)||(_.setStatus?(_.setStatus("Running..."),setTimeout((function(){setTimeout((function(){_.setStatus("")}),1),r()}),1)):r())}if(_.___embind_register_native_and_builtin_types=function(){return(_.___embind_register_native_and_builtin_types=_.asm.Q).apply(null,arguments)},_.dynCall_jiji=function(){return(_.dynCall_jiji=_.asm.R).apply(null,arguments)},Q=function e(){Kt||Nt(),Kt||(Q=e)},_.run=Nt,_.preInit)for("function"==typeof _.preInit&&(_.preInit=[_.preInit]);_.preInit.length>0;)_.preInit.pop()();return Nt(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=n:"function"==typeof define&&define.amd?define([],(function(){return n})):"object"==typeof e&&(e.BASIS=n)})),F={UNSIGNED_BYTE:K.UNSIGNED_BYTE,UNSIGNED_SHORT:K.UNSIGNED_SHORT,UNSIGNED_INT:K.UNSIGNED_INT,FLOAT:K.FLOAT,HALF_FLOAT:K.HALF_FLOAT_OES,UNSIGNED_INT_24_8:K.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:K.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:K.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:K.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(e,t){switch(e){case F.UNSIGNED_BYTE:return K.UNSIGNED_BYTE;case F.UNSIGNED_SHORT:return K.UNSIGNED_SHORT;case F.UNSIGNED_INT:return K.UNSIGNED_INT;case F.FLOAT:return K.FLOAT;case F.HALF_FLOAT:return t.webgl2?K.HALF_FLOAT:K.HALF_FLOAT_OES;case F.UNSIGNED_INT_24_8:return K.UNSIGNED_INT_24_8;case F.UNSIGNED_SHORT_4_4_4_4:return K.UNSIGNED_SHORT_4_4_4_4;case F.UNSIGNED_SHORT_5_5_5_1:return K.UNSIGNED_SHORT_5_5_5_1;case F.UNSIGNED_SHORT_5_6_5:return F.UNSIGNED_SHORT_5_6_5}},isPacked:function(e){return e===F.UNSIGNED_INT_24_8||e===F.UNSIGNED_SHORT_4_4_4_4||e===F.UNSIGNED_SHORT_5_5_5_1||e===F.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case F.UNSIGNED_BYTE:return 1;case F.UNSIGNED_SHORT:case F.UNSIGNED_SHORT_4_4_4_4:case F.UNSIGNED_SHORT_5_5_5_1:case F.UNSIGNED_SHORT_5_6_5:case F.HALF_FLOAT:return 2;case F.UNSIGNED_INT:case F.FLOAT:case F.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===F.UNSIGNED_BYTE||e===F.UNSIGNED_SHORT||e===F.UNSIGNED_INT||e===F.FLOAT||e===F.HALF_FLOAT||e===F.UNSIGNED_INT_24_8||e===F.UNSIGNED_SHORT_4_4_4_4||e===F.UNSIGNED_SHORT_5_5_5_1||e===F.UNSIGNED_SHORT_5_6_5}},b=Object.freeze(F),A={DEPTH_COMPONENT:K.DEPTH_COMPONENT,DEPTH_STENCIL:K.DEPTH_STENCIL,ALPHA:K.ALPHA,RED:K.RED,RG:K.RG,RGB:K.RGB,RGBA:K.RGBA,LUMINANCE:K.LUMINANCE,LUMINANCE_ALPHA:K.LUMINANCE_ALPHA,RGB_DXT1:K.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:K.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:K.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:K.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:K.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:K.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:K.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:K.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:K.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:K.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:K.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:K.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:K.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case A.RGB:return 3;case A.RGBA:return 4;case A.LUMINANCE_ALPHA:case A.RG:return 2;case A.ALPHA:case A.RED:case A.LUMINANCE:default:return 1}},validate:function(e){return e===A.DEPTH_COMPONENT||e===A.DEPTH_STENCIL||e===A.ALPHA||e===A.RED||e===A.RG||e===A.RGB||e===A.RGBA||e===A.LUMINANCE||e===A.LUMINANCE_ALPHA||e===A.RGB_DXT1||e===A.RGBA_DXT1||e===A.RGBA_DXT3||e===A.RGBA_DXT5||e===A.RGB_PVRTC_4BPPV1||e===A.RGB_PVRTC_2BPPV1||e===A.RGBA_PVRTC_4BPPV1||e===A.RGBA_PVRTC_2BPPV1||e===A.RGBA_ASTC||e===A.RGB_ETC1||e===A.RGB8_ETC2||e===A.RGBA8_ETC2_EAC||e===A.RGBA_BC7},isColorFormat:function(e){return e===A.ALPHA||e===A.RGB||e===A.RGBA||e===A.LUMINANCE||e===A.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===A.DEPTH_COMPONENT||e===A.DEPTH_STENCIL},isCompressedFormat:function(e){return e===A.RGB_DXT1||e===A.RGBA_DXT1||e===A.RGBA_DXT3||e===A.RGBA_DXT5||e===A.RGB_PVRTC_4BPPV1||e===A.RGB_PVRTC_2BPPV1||e===A.RGBA_PVRTC_4BPPV1||e===A.RGBA_PVRTC_2BPPV1||e===A.RGBA_ASTC||e===A.RGB_ETC1||e===A.RGB8_ETC2||e===A.RGBA8_ETC2_EAC||e===A.RGBA_BC7},isDXTFormat:function(e){return e===A.RGB_DXT1||e===A.RGBA_DXT1||e===A.RGBA_DXT3||e===A.RGBA_DXT5},isPVRTCFormat:function(e){return e===A.RGB_PVRTC_4BPPV1||e===A.RGB_PVRTC_2BPPV1||e===A.RGBA_PVRTC_4BPPV1||e===A.RGBA_PVRTC_2BPPV1},isASTCFormat:function(e){return e===A.RGBA_ASTC},isETC1Format:function(e){return e===A.RGB_ETC1},isETC2Format:function(e){return e===A.RGB8_ETC2||e===A.RGBA8_ETC2_EAC},isBC7Format:function(e){return e===A.RGBA_BC7},compressedTextureSizeInBytes:function(e,t,r){switch(e){case A.RGB_DXT1:case A.RGBA_DXT1:case A.RGB_ETC1:case A.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((r+3)/4)*8;case A.RGBA_DXT3:case A.RGBA_DXT5:case A.RGBA_ASTC:case A.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((r+3)/4)*16;case A.RGB_PVRTC_4BPPV1:case A.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(r,8)*4+7)/8);case A.RGB_PVRTC_2BPPV1:case A.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(r,8)*2+7)/8);case A.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(r/4)*16;default:return 0}},textureSizeInBytes:function(e,t,r,n){let _=A.componentsLength(e);return b.isPacked(t)&&(_=1),_*b.sizeInBytes(t)*r*n},alignmentInBytes:function(e,t,r){let n=A.textureSizeInBytes(e,t,r,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,r,n){let _,o=b.sizeInBytes(t);return _=o===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:o===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:o===Float32Array.BYTES_PER_ELEMENT&&t===b.FLOAT?Float32Array:Uint32Array,new _(A.componentsLength(e)*r*n)},flipY:function(e,t,r,n,_){if(1===_)return e;let o=A.createTypedArray(t,r,n,_),i=A.componentsLength(t),a=n*i;for(let t=0;t<_;++t){let r=t*n*i,s=(_-t-1)*n*i;for(let t=0;t>_,s=e.pixelHeight>>_,u=a*s*E.componentsLength(n);for(let t=0;t0&&s>0&&u>0))throw i.close(),i.delete(),new oe("Invalid KTX2 file");let A,c,T=t.dataFormatDescriptor[0],f=n.transcoder_texture_format;if(T.colorModel===c_)if(r.etc)A=R?E.RGBA8_ETC2_EAC:E.RGB8_ETC2,c=R?f.cTFETC2_RGBA:f.cTFETC1_RGB;else if(r.etc1&&!R)A=E.RGB_ETC1,c=f.cTFETC1_RGB;else if(r.s3tc)A=R?E.RGBA_DXT5:E.RGB_DXT1,c=R?f.cTFBC3_RGBA:f.cTFBC1_RGB;else if(r.pvrtc)A=R?E.RGBA_PVRTC_4BPPV1:E.RGB_PVRTC_4BPPV1,c=R?f.cTFPVRTC1_4_RGBA:f.cTFPVRTC1_4_RGB;else if(r.astc)A=E.RGBA_ASTC,c=f.cTFASTC_4x4_RGBA;else{if(!r.bc7)throw new oe("No transcoding format target available for ETC1S compressed ktx2.");A=E.RGBA_BC7,c=f.cTFBC7_RGBA}else if(T.colorModel===A_)if(r.astc)A=E.RGBA_ASTC,c=f.cTFASTC_4x4_RGBA;else if(r.bc7)A=E.RGBA_BC7,c=f.cTFBC7_RGBA;else if(r.s3tc)A=R?E.RGBA_DXT5:E.RGB_DXT1,c=R?f.cTFBC3_RGBA:f.cTFBC1_RGB;else if(r.etc)A=R?E.RGBA8_ETC2_EAC:E.RGB8_ETC2,c=R?f.cTFETC2_RGBA:f.cTFETC1_RGB;else if(r.etc1&&!R)A=E.RGB_ETC1,c=f.cTFETC1_RGB;else{if(!r.pvrtc)throw new oe("No transcoding format target available for UASTC compressed ktx2.");A=R?E.RGBA_PVRTC_4BPPV1:E.RGB_PVRTC_4BPPV1,c=R?f.cTFPVRTC1_4_RGBA:f.cTFPVRTC1_4_RGB}if(!i.startTranscoding())throw i.close(),i.delete(),new oe("startTranscoding() failed");for(let e=0;e>e,s=t.pixelHeight>>e;let n=i.getImageTranscodedSizeInBytes(e,0,0,c.value),u=new Uint8Array(n),R=i.transcodeImage(u,e,0,0,c.value,0,-1,-1);if(!ge(R))throw new oe("transcodeImage() failed.");_.push(u.buffer),r[a_[0]]={internalFormat:A,width:a,height:s,levelBuffer:u}}return i.close(),i.delete(),o}async function fr(e,t){let r=e.webAssemblyConfig,n=n_(R_.default,self.BASIS);return(me=ge(r.wasmBinaryFile)?await n(r):await n()).initializeBasis(),!0}function Tr(e,t){let r=e.webAssemblyConfig;return ge(r)?fr(e,t):ar(e,t)}var yr=r_(Tr);export{yr as default}; \ No newline at end of file +import{a as r_}from"./chunk-R7GRRUJS.js";import{a as K}from"./chunk-DNO4OWAM.js";import{a as ie}from"./chunk-XDVDNOI4.js";import{a as n_}from"./chunk-Z3SYNMQT.js";import{b as __}from"./chunk-4KGDZUZQ.js";import{a as Gt,c as sr,d as or,e as ge}from"./chunk-F3TINEFX.js";var o_=sr(((e,t)=>{var r,n=(r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,typeof __filename<"u"&&(r=r||__filename),function(e){var t,n,_=typeof(e=e||{})<"u"?e:{};_.ready=new Promise((function(e,r){t=e,n=r}));var i,o={};for(i in _)_.hasOwnProperty(i)&&(o[i]=_[i]);var a,s,u,R,A=[];u="object"==typeof window,R="function"==typeof importScripts,a="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,s=!u&&!a&&!R;var c,T,f,l,O,p="";a?(p=R?Gt("path").dirname(p)+"/":__dirname+"/",c=function(e,t){return l||(l=Gt("fs")),O||(O=Gt("path")),e=O.normalize(e),l.readFileSync(e,t?null:"utf8")},f=function(e){var t=c(e,!0);return t.buffer||(t=new Uint8Array(t)),d(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),A=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof yt))throw e})),process.on("unhandledRejection",Q),_.inspect=function(){return"[Emscripten Module object]"}):s?(typeof read<"u"&&(c=function(e){return read(e)}),f=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(d("object"==typeof(t=read(e,"binary"))),t)},typeof scriptArgs<"u"?A=scriptArgs:typeof arguments<"u"&&(A=arguments),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(u||R)&&(R?p=self.location.href:typeof document<"u"&&document.currentScript&&(p=document.currentScript.src),r&&(p=r),p=0!==p.indexOf("blob:")?p.substr(0,p.lastIndexOf("/")+1):"",c=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},R&&(f=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),T=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var C,B=_.print||console.log.bind(console),K=_.printErr||console.warn.bind(console);for(i in o)o.hasOwnProperty(i)&&(_[i]=o[i]);o=null,_.arguments&&(A=_.arguments),_.thisProgram&&_.thisProgram,_.quit&&_.quit,_.wasmBinary&&(C=_.wasmBinary),_.noExitRuntime,"object"!=typeof WebAssembly&&Q("no native wasm support detected");var M,h=!1;function d(e,t){e||Q("Assertion failed: "+t)}var F=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function G(e,t,r){for(var n=t+r,_=t;e[_]&&!(_>=n);)++_;if(_-t>16&&e.subarray&&F)return F.decode(e.subarray(t,_));for(var i="";t<_;){var o=e[t++];if(128&o){var a=63&e[t++];if(192!=(224&o)){var s=63&e[t++];if((o=224==(240&o)?(15&o)<<12|a<<6|s:(7&o)<<18|a<<12|s<<6|63&e[t++])<65536)i+=String.fromCharCode(o);else{var u=o-65536;i+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else i+=String.fromCharCode((31&o)<<6|a)}else i+=String.fromCharCode(o)}return i}function y(e,t){return e?G(v,e,t):""}var N,P,v,S,V,m,E,U,g,L=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function w(e,t){for(var r=e,n=r>>1,_=n+t/2;!(n>=_)&&V[n];)++n;if((r=n<<1)-e>32&&L)return L.decode(v.subarray(e,r));for(var i="",o=0;!(o>=t/2);++o){var a=S[e+2*o>>1];if(0==a)break;i+=String.fromCharCode(a)}return i}function b(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,_=(r-=2)<2*e.length?r/2:e.length,i=0;i<_;++i){var o=e.charCodeAt(i);S[t>>1]=o,t+=2}return S[t>>1]=0,t-n}function D(e){return 2*e.length}function I(e,t){for(var r=0,n="";!(r>=t/4);){var _=m[e+4*r>>2];if(0==_)break;if(++r,_>=65536){var i=_-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(_)}return n}function X(e,t,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,_=n+r-4,i=0;i=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++i)),m[t>>2]=o,(t+=4)+4>_)break}return m[t>>2]=0,t-n}function x(e){for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t}function $(e,t){return e%t>0&&(e+=t-e%t),e}function H(e){N=e,_.HEAP8=P=new Int8Array(e),_.HEAP16=S=new Int16Array(e),_.HEAP32=m=new Int32Array(e),_.HEAPU8=v=new Uint8Array(e),_.HEAPU16=V=new Uint16Array(e),_.HEAPU32=E=new Uint32Array(e),_.HEAPF32=U=new Float32Array(e),_.HEAPF64=g=new Float64Array(e)}_.INITIAL_MEMORY;var k,W=[],j=[],z=[],Y=[],q=0,Z=null,J=null;function Q(e){_.onAbort&&_.onAbort(e),K(e+=""),h=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function ee(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}_.preloadedImages={},_.preloadedAudios={};function te(e){return ee(e,"data:application/octet-stream;base64,")}function re(e){return ee(e,"file://")}var ne,_e="basis_transcoder.wasm";function ie(e){try{if(e==_e&&C)return new Uint8Array(C);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}catch(e){Q(e)}}function oe(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?k.get(r)():k.get(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(_)}}te(_e)||(ne=_e,_e=_.locateFile?_.locateFile(ne,p):p+ne);var ae={};function se(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function ue(e){return this.fromWireType(E[e>>2])}var Re={},Ae={},ce={},Te=48,fe=57;function le(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Te&&t<=fe?"_"+e:e}function Oe(e,t){return e=le(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function pe(e,t){var r=Oe(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var Ce=void 0;function Be(e){throw new Ce(e)}function Ke(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Be("Mismatched type converter count");for(var _=0;_"u"?(me=function(e){return e},e):(ve=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next()){var r=t.value;r.ptr?Ve(r):console.warn("object already deleted: "+r.ptr)}})),Se=function(e){ve.unregister(e.$$)},(me=function(e){return ve.register(e,e.$$,e.$$),e})(e))}var Ee=void 0,Ue=[];function ge(){for(;Ue.length;){var e=Ue.pop();e.$$.deleteScheduled=!1,e.delete()}}function Le(){}var we={};function be(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ge("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function De(e,t,r){_.hasOwnProperty(e)?((void 0===r||void 0!==_[e].overloadTable&&void 0!==_[e].overloadTable[r])&&Ge("Cannot register public name '"+e+"' twice"),be(_,e,e),_.hasOwnProperty(r)&&Ge("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),_[e].overloadTable[r]=t):(_[e]=t,void 0!==r&&(_[e].numArguments=r))}function Ie(e,t,r,n,_,i,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=_,this.getActualType=i,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}function Xe(e,t,r){for(;t!==r;)t.upcast||Ge("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function xe(e,t){if(null===t)return this.isReference&&Ge("null is not a valid "+this.name),0;t.$$||Ge('Cannot pass "'+ut(t)+'" as a '+this.name),t.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Xe(t.$$.ptr,r,this.registeredClass)}function $e(e,t){var r;if(null===t)return this.isReference&&Ge("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ge('Cannot pass "'+ut(t)+'" as a '+this.name),t.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&Ge("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=Xe(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ge("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ge("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var _=t.clone();r=this.rawShare(r,ot((function(){_.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ge("Unsupporting sharing policy")}return r}function He(e,t){if(null===t)return this.isReference&&Ge("null is not a valid "+this.name),0;t.$$||Ge('Cannot pass "'+ut(t)+'" as a '+this.name),t.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&Ge("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Xe(t.$$.ptr,r,this.registeredClass)}function ke(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=ke(e,t,r.baseClass);return null===n?null:r.downcast(n)}var We={};function je(e,t){return(!t.ptrType||!t.ptr)&&Be("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Be("Both smartPtrType and smartPtr must be specified"),t.count={value:1},me(Object.create(e,{$$:{value:t}}))}function ze(e,t,r,n,_,i,o,a,s,u,R){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=_,this.pointeeType=i,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=s,this.rawShare=u,this.rawDestructor=R,_||void 0!==t.baseClass?this.toWireType=$e:n?(this.toWireType=xe,this.destructorFunction=null):(this.toWireType=He,this.destructorFunction=null)}function Ye(e,t,r){_.hasOwnProperty(e)||Be("Replacing nonexistant public symbol"),void 0!==_[e].overloadTable&&void 0!==r?_[e].overloadTable[r]=t:(_[e]=t,_[e].argCount=r)}function qe(e,t){var r=-1!=(e=de(e)).indexOf("j")?function(e,t){var r=[];return function(){r.length=arguments.length;for(var n=0;n>2)+n]);return r}function tt(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Oe(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,_=e.apply(n,t);return _ instanceof Object?_:n}function rt(e,t,r,n,_){var i=t.length;i<2&&Ge("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,a=!1,s=1;s0?", ":"")+A),c+=(u?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)c+="runDestructors(destructors);\n";else for(s=o?1:2;s4&&0==--_t[e].refcount&&(_t[e]=void 0,nt.push(e))}function ot(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=nt.length?nt.pop():_t.length;return _t[t]={refcount:1,value:e},t}}function at(e,t,r){switch(t){case 0:return function(e){var t=r?P:v;return this.fromWireType(t[e])};case 1:return function(e){var t=r?S:V;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?m:E;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function st(e,t){var r=Ae[e];return void 0===r&&Ge(t+" has unknown type "+Je(e)),r}function ut(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Rt(e,t){switch(t){case 2:return function(e){return this.fromWireType(U[e>>2])};case 3:return function(e){return this.fromWireType(g[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function At(e,t,r){switch(t){case 0:return r?function(e){return P[e]}:function(e){return v[e]};case 1:return r?function(e){return S[e>>1]}:function(e){return V[e>>1]};case 2:return r?function(e){return m[e>>2]}:function(e){return E[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function ct(e){return e||Ge("Cannot use deleted val. handle = "+e),_t[e].value}var Tt={};function ft(e){var t=Tt[e];return void 0===t?de(e):t}var lt=[];function Ot(){return"object"==typeof globalThis?globalThis:Function("return this")()}var pt={};function Ct(e){try{return M.grow(e-N.byteLength+65535>>>16),H(M.buffer),1}catch{}}var Bt={mappings:{},buffers:[null,[],[]],printChar:function(e,t){var r=Bt.buffers[e];0===t||10===t?((1===e?B:K)(G(r,0)),r.length=0):r.push(t)},varargs:void 0,get:function(){return Bt.varargs+=4,m[Bt.varargs-4>>2]},getStr:function(e){return y(e)},get64:function(e,t){return e}};Ce=_.InternalError=pe(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);he=e}(),Fe=_.BindingError=pe(Error,"BindingError"),Le.prototype.isAliasOf=function(e){if(!(this instanceof Le&&e instanceof Le))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,_=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)_=n.upcast(_),n=n.baseClass;return t===n&&r===_},Le.prototype.clone=function(){if(this.$$.ptr||Pe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=me(Object.create(Object.getPrototypeOf(this),{$$:{value:Ne(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},Le.prototype.delete=function(){this.$$.ptr||Pe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ge("Object already scheduled for deletion"),Se(this),Ve(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Le.prototype.isDeleted=function(){return!this.$$.ptr},Le.prototype.deleteLater=function(){return this.$$.ptr||Pe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ge("Object already scheduled for deletion"),Ue.push(this),1===Ue.length&&Ee&&Ee(ge),this.$$.deleteScheduled=!0,this},ze.prototype.getPointee=function(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},ze.prototype.destructor=function(e){this.rawDestructor&&this.rawDestructor(e)},ze.prototype.argPackAdvance=8,ze.prototype.readValueFromPointer=ue,ze.prototype.deleteObject=function(e){null!==e&&e.delete()},ze.prototype.fromWireType=function(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=function(e,t){return t=function(e,t){for(void 0===t&&Ge("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),We[t]}(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function _(){return this.isSmartPointer?je(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):je(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,o=this.registeredClass.getActualType(t),a=we[o];if(!a)return _.call(this);i=this.isConst?a.constPointerType:a.pointerType;var s=ke(t,this.registeredClass,i.registeredClass);return null===s?_.call(this):this.isSmartPointer?je(i.registeredClass.instancePrototype,{ptrType:i,ptr:s,smartPtrType:this,smartPtr:e}):je(i.registeredClass.instancePrototype,{ptrType:i,ptr:s})},_.getInheritedInstanceCount=function(){return Object.keys(We).length},_.getLiveInheritedInstances=function(){var e=[];for(var t in We)We.hasOwnProperty(t)&&e.push(We[t]);return e},_.flushPendingDeletes=ge,_.setDelayFunction=function(e){Ee=e,Ue.length&&Ee&&Ee(ge)},Ze=_.UnboundTypeError=pe(Error,"UnboundTypeError"),_.count_emval_handles=function(){for(var e=0,t=5;t<_t.length;++t)void 0!==_t[t]&&++e;return e},_.get_first_emval=function(){for(var e=5;e<_t.length;++e)if(void 0!==_t[e])return _t[e];return null};var Kt,Mt={t:function(e){var t=ae[e];delete ae[e];var r=t.rawConstructor,n=t.rawDestructor,_=t.fields;Ke([e],_.map((function(e){return e.getterReturnType})).concat(_.map((function(e){return e.setterArgumentType}))),(function(e){var i={};return _.forEach((function(t,r){var n=t.fieldName,o=e[r],a=t.getter,s=t.getterContext,u=e[r+_.length],R=t.setter,A=t.setterContext;i[n]={read:function(e){return o.fromWireType(a(s,e))},write:function(e,t){var r=[];R(A,e,u.toWireType(r,t)),se(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in i)t[r]=i[r].read(e);return n(e),t},toWireType:function(e,t){for(var _ in i)if(!(_ in t))throw new TypeError('Missing field: "'+_+'"');var o=r();for(_ in i)i[_].write(o,t[_]);return null!==e&&e.push(n,o),o},argPackAdvance:8,readValueFromPointer:ue,destructorFunction:n}]}))},I:function(e,t,r,n,_){var i=Me(r);ye(e,{name:t=de(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:_},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=P;else if(2===r)n=S;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=m}return this.fromWireType(n[e>>i])},destructorFunction:null})},x:function(e,t,r,n,_,i,o,a,s,u,R,A,c){R=de(R),i=qe(_,i),a&&(a=qe(o,a)),u&&(u=qe(s,u)),c=qe(A,c);var T=le(R);De(T,(function(){Qe("Cannot construct "+R+" due to unbound types",[n])})),Ke([e,t,r],n?[n]:[],(function(t){var r,_;t=t[0],_=n?(r=t.registeredClass).instancePrototype:Le.prototype;var o=Oe(T,(function(){if(Object.getPrototypeOf(this)!==s)throw new Fe("Use 'new' to construct "+R);if(void 0===A.constructor_body)throw new Fe(R+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new Fe("Tried to invoke ctor of "+R+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),s=Object.create(_,{constructor:{value:o}});o.prototype=s;var A=new Ie(R,o,s,c,r,i,a,u),f=new ze(R,A,!0,!1,!1),l=new ze(R+"*",A,!1,!1,!1),O=new ze(R+" const*",A,!1,!0,!1);return we[e]={pointerType:l,constPointerType:O},Ye(T,o),[f,l,O]}))},w:function(e,t,r,n,_,i){d(t>0);var o=et(t,r);_=qe(n,_);var a=[i],s=[];Ke([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Fe("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){Qe("Cannot construct "+e.name+" due to unbound types",o)},Ke([],o,(function(n){return e.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&Ge(r+" called with "+arguments.length+" arguments, expected "+(t-1)),s.length=0,a.length=t;for(var e=1;e>>a}}var s=-1!=t.indexOf("unsigned");ye(e,{name:t,fromWireType:o,toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+ut(r)+'" to '+this.name);if(r_)throw new TypeError('Passing a number "'+ut(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+_+"]!");return s?r>>>0:0|r},argPackAdvance:8,readValueFromPointer:At(t,i,0!==n),destructorFunction:null})},h:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function _(e){var t=E,r=t[e>>=2],_=t[e+1];return new n(N,_,r)}ye(e,{name:r=de(r),fromWireType:_,argPackAdvance:8,readValueFromPointer:_},{ignoreDuplicateRegistrations:!0})},B:function(e,t){var r="std::string"===(t=de(t));ye(e,{name:t,fromWireType:function(e){var t,n=E[e>>2];if(r)for(var _=e+4,i=0;i<=n;++i){var o=e+4+i;if(i==n||0==v[o]){var a=y(_,o-_);void 0===t?t=a:(t+="\0",t+=a),_=o+1}}else{var s=new Array(n);for(i=0;i=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}(t)}:function(){return t.length};var i=n(),o=ht(4+i+1);if(E[o>>2]=i,r&&_)!function(e,t,r){!function(e,t,r,n){if(!(n>0))return 0;for(var _=r+n-1,i=0;i=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++i)),o<=127){if(r>=_)break;t[r++]=o}else if(o<=2047){if(r+1>=_)break;t[r++]=192|o>>6,t[r++]=128|63&o}else if(o<=65535){if(r+2>=_)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|63&o}else{if(r+3>=_)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|63&o}}t[r]=0}(e,v,t,r)}(t,o+4,i+1);else if(_)for(var a=0;a255&&(dt(o),Ge("String has UTF-16 code units that do not fit in 8 bits")),v[o+4+a]=s}else for(a=0;a>2],o=i(),s=e+4,u=0;u<=_;++u){var R=e+4+u*t;if(u==_||0==o[R>>a]){var A=n(s,R-s);void 0===r?r=A:(r+="\0",r+=A),s=R+t}}return dt(e),r},toWireType:function(e,n){"string"!=typeof n&&Ge("Cannot pass non-string to C++ string type "+r);var i=o(n),s=ht(4+i+t);return E[s>>2]=i>>a,_(n,s+4,i+t),null!==e&&e.push(dt,s),s},argPackAdvance:8,readValueFromPointer:ue,destructorFunction:function(e){dt(e)}})},u:function(e,t,r,n,_,i){ae[e]={name:de(t),rawConstructor:qe(r,n),rawDestructor:qe(_,i),fields:[]}},c:function(e,t,r,n,_,i,o,a,s,u){ae[e].fields.push({fieldName:de(t),getterReturnType:r,getter:qe(n,_),getterContext:i,setterArgumentType:o,setter:qe(a,s),setterContext:u})},J:function(e,t){ye(e,{isVoid:!0,name:t=de(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},m:function(e,t,r){e=ct(e),t=st(t,"emval::as");var n=[],_=ot(n);return m[r>>2]=_,t.toWireType(n,e)},s:function(e,t,r,n){(e=lt[e])(t=ct(t),r=ft(r),null,n)},b:it,y:function(e){return 0===e?ot(Ot()):(e=ft(e),ot(Ot()[e]))},p:function(e,t){for(var r=function(e,t){for(var r=new Array(e),n=0;n>2)+n],"parameter "+n);return r}(e,t),n=r[0],_=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=["retType"],o=[n],a="",s=0;s4&&(_t[e].refcount+=1)},q:function(e,t,r,n){e=ct(e);var i=pt[t];return i||(i=function(e){for(var t="",r=0;r>> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(st,_,ot)}(t),pt[t]=i),i(e,r,n)},f:function(e){return ot(ft(e))},l:function(e){se(_t[e].value),it(e)},o:function(){Q()},E:function(e,t,r){v.copyWithin(e,t,t+r)},F:function(e){var t=v.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var _=t*(1+.2/n);if(_=Math.min(_,e+100663296),Ct(Math.min(r,$(Math.max(e,_),65536))))return!0}return!1},G:function(e){return 0},C:function(e,t,r,n,_){},z:function(e,t,r,n){for(var _=0,i=0;i>2],a=m[t+(8*i+4)>>2],s=0;s>2]=_,0},D:function(e){}},ht=(function(){var e={a:Mt};function t(e,t){var r=e.exports;_.asm=r,H((M=_.asm.K).buffer),k=_.asm.O,function(e){j.unshift(e)}(_.asm.L),function(e){if(q--,_.monitorRunDependencies&&_.monitorRunDependencies(q),0==q&&(null!==Z&&(clearInterval(Z),Z=null),J)){var t=J;J=null,t()}}()}function r(e){t(e.instance)}function i(t){return function(){if(!C&&(u||R)){if("function"==typeof fetch&&!re(_e))return fetch(_e,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+_e+"'";return e.arrayBuffer()})).catch((function(){return ie(_e)}));if(T)return new Promise((function(e,t){T(_e,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return ie(_e)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){K("failed to asynchronously prepare wasm: "+e),Q(e)}))}if(q++,_.monitorRunDependencies&&_.monitorRunDependencies(q),_.instantiateWasm)try{return _.instantiateWasm(e,t)}catch(e){return K("Module.instantiateWasm callback failed with error: "+e),!1}(C||"function"!=typeof WebAssembly.instantiateStreaming||te(_e)||re(_e)||"function"!=typeof fetch?i(r):fetch(_e,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return K("wasm streaming compile failed: "+e),K("falling back to ArrayBuffer instantiation"),i(r)}))}))).catch(n)}(),_.___wasm_call_ctors=function(){return(_.___wasm_call_ctors=_.asm.L).apply(null,arguments)},_._malloc=function(){return(ht=_._malloc=_.asm.M).apply(null,arguments)}),dt=_._free=function(){return(dt=_._free=_.asm.N).apply(null,arguments)},Ft=_.___getTypeName=function(){return(Ft=_.___getTypeName=_.asm.P).apply(null,arguments)};function yt(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Nt(e){function r(){Kt||(Kt=!0,_.calledRun=!0,!h&&(oe(j),oe(z),t(_),_.onRuntimeInitialized&&_.onRuntimeInitialized(),function(){if(_.postRun)for("function"==typeof _.postRun&&(_.postRun=[_.postRun]);_.postRun.length;)e=_.postRun.shift(),Y.unshift(e);var e;oe(Y)}()))}e=e||A,q>0||(function(){if(_.preRun)for("function"==typeof _.preRun&&(_.preRun=[_.preRun]);_.preRun.length;)e=_.preRun.shift(),W.unshift(e);var e;oe(W)}(),q>0)||(_.setStatus?(_.setStatus("Running..."),setTimeout((function(){setTimeout((function(){_.setStatus("")}),1),r()}),1)):r())}if(_.___embind_register_native_and_builtin_types=function(){return(_.___embind_register_native_and_builtin_types=_.asm.Q).apply(null,arguments)},_.dynCall_jiji=function(){return(_.dynCall_jiji=_.asm.R).apply(null,arguments)},J=function e(){Kt||Nt(),Kt||(J=e)},_.run=Nt,_.preInit)for("function"==typeof _.preInit&&(_.preInit=[_.preInit]);_.preInit.length>0;)_.preInit.pop()();return Nt(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=n:"function"==typeof define&&define.amd?define([],(function(){return n})):"object"==typeof e&&(e.BASIS=n)})),F={UNSIGNED_BYTE:K.UNSIGNED_BYTE,UNSIGNED_SHORT:K.UNSIGNED_SHORT,UNSIGNED_INT:K.UNSIGNED_INT,FLOAT:K.FLOAT,HALF_FLOAT:K.HALF_FLOAT_OES,UNSIGNED_INT_24_8:K.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:K.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:K.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:K.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(e,t){switch(e){case F.UNSIGNED_BYTE:return K.UNSIGNED_BYTE;case F.UNSIGNED_SHORT:return K.UNSIGNED_SHORT;case F.UNSIGNED_INT:return K.UNSIGNED_INT;case F.FLOAT:return K.FLOAT;case F.HALF_FLOAT:return t.webgl2?K.HALF_FLOAT:K.HALF_FLOAT_OES;case F.UNSIGNED_INT_24_8:return K.UNSIGNED_INT_24_8;case F.UNSIGNED_SHORT_4_4_4_4:return K.UNSIGNED_SHORT_4_4_4_4;case F.UNSIGNED_SHORT_5_5_5_1:return K.UNSIGNED_SHORT_5_5_5_1;case F.UNSIGNED_SHORT_5_6_5:return F.UNSIGNED_SHORT_5_6_5}},isPacked:function(e){return e===F.UNSIGNED_INT_24_8||e===F.UNSIGNED_SHORT_4_4_4_4||e===F.UNSIGNED_SHORT_5_5_5_1||e===F.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case F.UNSIGNED_BYTE:return 1;case F.UNSIGNED_SHORT:case F.UNSIGNED_SHORT_4_4_4_4:case F.UNSIGNED_SHORT_5_5_5_1:case F.UNSIGNED_SHORT_5_6_5:case F.HALF_FLOAT:return 2;case F.UNSIGNED_INT:case F.FLOAT:case F.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===F.UNSIGNED_BYTE||e===F.UNSIGNED_SHORT||e===F.UNSIGNED_INT||e===F.FLOAT||e===F.HALF_FLOAT||e===F.UNSIGNED_INT_24_8||e===F.UNSIGNED_SHORT_4_4_4_4||e===F.UNSIGNED_SHORT_5_5_5_1||e===F.UNSIGNED_SHORT_5_6_5}},b=Object.freeze(F),A={DEPTH_COMPONENT:K.DEPTH_COMPONENT,DEPTH_STENCIL:K.DEPTH_STENCIL,ALPHA:K.ALPHA,RED:K.RED,RG:K.RG,RGB:K.RGB,RGBA:K.RGBA,LUMINANCE:K.LUMINANCE,LUMINANCE_ALPHA:K.LUMINANCE_ALPHA,RGB_DXT1:K.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:K.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:K.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:K.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:K.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:K.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:K.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:K.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:K.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:K.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:K.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:K.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:K.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case A.RGB:return 3;case A.RGBA:return 4;case A.LUMINANCE_ALPHA:case A.RG:return 2;case A.ALPHA:case A.RED:case A.LUMINANCE:default:return 1}},validate:function(e){return e===A.DEPTH_COMPONENT||e===A.DEPTH_STENCIL||e===A.ALPHA||e===A.RED||e===A.RG||e===A.RGB||e===A.RGBA||e===A.LUMINANCE||e===A.LUMINANCE_ALPHA||e===A.RGB_DXT1||e===A.RGBA_DXT1||e===A.RGBA_DXT3||e===A.RGBA_DXT5||e===A.RGB_PVRTC_4BPPV1||e===A.RGB_PVRTC_2BPPV1||e===A.RGBA_PVRTC_4BPPV1||e===A.RGBA_PVRTC_2BPPV1||e===A.RGBA_ASTC||e===A.RGB_ETC1||e===A.RGB8_ETC2||e===A.RGBA8_ETC2_EAC||e===A.RGBA_BC7},isColorFormat:function(e){return e===A.ALPHA||e===A.RGB||e===A.RGBA||e===A.LUMINANCE||e===A.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===A.DEPTH_COMPONENT||e===A.DEPTH_STENCIL},isCompressedFormat:function(e){return e===A.RGB_DXT1||e===A.RGBA_DXT1||e===A.RGBA_DXT3||e===A.RGBA_DXT5||e===A.RGB_PVRTC_4BPPV1||e===A.RGB_PVRTC_2BPPV1||e===A.RGBA_PVRTC_4BPPV1||e===A.RGBA_PVRTC_2BPPV1||e===A.RGBA_ASTC||e===A.RGB_ETC1||e===A.RGB8_ETC2||e===A.RGBA8_ETC2_EAC||e===A.RGBA_BC7},isDXTFormat:function(e){return e===A.RGB_DXT1||e===A.RGBA_DXT1||e===A.RGBA_DXT3||e===A.RGBA_DXT5},isPVRTCFormat:function(e){return e===A.RGB_PVRTC_4BPPV1||e===A.RGB_PVRTC_2BPPV1||e===A.RGBA_PVRTC_4BPPV1||e===A.RGBA_PVRTC_2BPPV1},isASTCFormat:function(e){return e===A.RGBA_ASTC},isETC1Format:function(e){return e===A.RGB_ETC1},isETC2Format:function(e){return e===A.RGB8_ETC2||e===A.RGBA8_ETC2_EAC},isBC7Format:function(e){return e===A.RGBA_BC7},compressedTextureSizeInBytes:function(e,t,r){switch(e){case A.RGB_DXT1:case A.RGBA_DXT1:case A.RGB_ETC1:case A.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((r+3)/4)*8;case A.RGBA_DXT3:case A.RGBA_DXT5:case A.RGBA_ASTC:case A.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((r+3)/4)*16;case A.RGB_PVRTC_4BPPV1:case A.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(r,8)*4+7)/8);case A.RGB_PVRTC_2BPPV1:case A.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(r,8)*2+7)/8);case A.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(r/4)*16;default:return 0}},textureSizeInBytes:function(e,t,r,n){let _=A.componentsLength(e);return b.isPacked(t)&&(_=1),_*b.sizeInBytes(t)*r*n},alignmentInBytes:function(e,t,r){let n=A.textureSizeInBytes(e,t,r,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,r,n){let _,i=b.sizeInBytes(t);return _=i===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:i===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:i===Float32Array.BYTES_PER_ELEMENT&&t===b.FLOAT?Float32Array:Uint32Array,new _(A.componentsLength(e)*r*n)},flipY:function(e,t,r,n,_){if(1===_)return e;let i=A.createTypedArray(t,r,n,_),o=A.componentsLength(t),a=n*o;for(let t=0;t<_;++t){let r=t*n*o,s=(_-t-1)*n*o;for(let t=0;t>_,s=e.pixelHeight>>_,u=a*s*E.componentsLength(n);for(let t=0;t0&&s>0&&u>0))throw o.close(),o.delete(),new ie("Invalid KTX2 file");let A,c,T=t.dataFormatDescriptor[0],f=n.transcoder_texture_format;if(T.colorModel===c_)if(r.etc)A=R?E.RGBA8_ETC2_EAC:E.RGB8_ETC2,c=R?f.cTFETC2_RGBA:f.cTFETC1_RGB;else if(r.etc1&&!R)A=E.RGB_ETC1,c=f.cTFETC1_RGB;else if(r.s3tc)A=R?E.RGBA_DXT5:E.RGB_DXT1,c=R?f.cTFBC3_RGBA:f.cTFBC1_RGB;else if(r.pvrtc)A=R?E.RGBA_PVRTC_4BPPV1:E.RGB_PVRTC_4BPPV1,c=R?f.cTFPVRTC1_4_RGBA:f.cTFPVRTC1_4_RGB;else if(r.astc)A=E.RGBA_ASTC,c=f.cTFASTC_4x4_RGBA;else{if(!r.bc7)throw new ie("No transcoding format target available for ETC1S compressed ktx2.");A=E.RGBA_BC7,c=f.cTFBC7_RGBA}else if(T.colorModel===A_)if(r.astc)A=E.RGBA_ASTC,c=f.cTFASTC_4x4_RGBA;else if(r.bc7)A=E.RGBA_BC7,c=f.cTFBC7_RGBA;else if(r.s3tc)A=R?E.RGBA_DXT5:E.RGB_DXT1,c=R?f.cTFBC3_RGBA:f.cTFBC1_RGB;else if(r.etc)A=R?E.RGBA8_ETC2_EAC:E.RGB8_ETC2,c=R?f.cTFETC2_RGBA:f.cTFETC1_RGB;else if(r.etc1&&!R)A=E.RGB_ETC1,c=f.cTFETC1_RGB;else{if(!r.pvrtc)throw new ie("No transcoding format target available for UASTC compressed ktx2.");A=R?E.RGBA_PVRTC_4BPPV1:E.RGB_PVRTC_4BPPV1,c=R?f.cTFPVRTC1_4_RGBA:f.cTFPVRTC1_4_RGB}if(!o.startTranscoding())throw o.close(),o.delete(),new ie("startTranscoding() failed");for(let e=0;e>e,s=t.pixelHeight>>e;let n=o.getImageTranscodedSizeInBytes(e,0,0,c.value),u=new Uint8Array(n),R=o.transcodeImage(u,e,0,0,c.value,0,-1,-1);if(!ge(R))throw new ie("transcodeImage() failed.");_.push(u.buffer),r[a_[0]]={internalFormat:A,width:a,height:s,levelBuffer:u}}return o.close(),o.delete(),i}async function fr(e,t){let r=e.webAssemblyConfig,n=n_(R_.default,self.BASIS);return(me=ge(r.wasmBinaryFile)?await n(r):await n()).initializeBasis(),!0}function Tr(e,t){let r=e.webAssemblyConfig;return ge(r)?fr(e,t):ar(e,t)}var yr=r_(Tr);export{yr as default}; \ No newline at end of file diff --git a/Workers/transcodeKTX2.js.LICENSE.txt b/Workers/transcodeKTX2.js.LICENSE.txt index 7f5f415..521c7d2 100644 --- a/Workers/transcodeKTX2.js.LICENSE.txt +++ b/Workers/transcodeKTX2.js.LICENSE.txt @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 + * Version 1.115 * * Copyright 2011-2022 Cesium Contributors * diff --git a/Workers/transferTypedArrayTest.js.LICENSE.txt b/Workers/transferTypedArrayTest.js.LICENSE.txt index 7f5f415..521c7d2 100644 --- a/Workers/transferTypedArrayTest.js.LICENSE.txt +++ b/Workers/transferTypedArrayTest.js.LICENSE.txt @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.112 + * Version 1.115 * * Copyright 2011-2022 Cesium Contributors * diff --git a/Workers/upsampleQuantizedTerrainMesh.js b/Workers/upsampleQuantizedTerrainMesh.js index d9988f6..bfac120 100644 --- a/Workers/upsampleQuantizedTerrainMesh.js +++ b/Workers/upsampleQuantizedTerrainMesh.js @@ -1,2 +1,2 @@ /*! For license information please see upsampleQuantizedTerrainMesh.js.LICENSE.txt */ -import{a as be,b as Ne}from"./chunk-RILDKADO.js";import{a as Ae}from"./chunk-2SKW2VRQ.js";import{a as ue}from"./chunk-PYQRNF73.js";import{a as ee}from"./chunk-IYTTCRXN.js";import"./chunk-QCBYIBZJ.js";import"./chunk-5XT3QCZD.js";import"./chunk-ZKNXHPHD.js";import"./chunk-W5ZMPE2M.js";import{a as Ve}from"./chunk-EQ7PMEBC.js";import{d as de}from"./chunk-YIFABOF6.js";import"./chunk-PQVQONHO.js";import{c as Se,d as Z}from"./chunk-KDW4RGIR.js";import"./chunk-VNDUYYBJ.js";import{a as A,b as Ie,c as Ce}from"./chunk-V624RX7A.js";import{a as N}from"./chunk-VZ2RFJ3P.js";import"./chunk-RN5GA5QZ.js";import"./chunk-TWC6ISJU.js";import"./chunk-RKPKWH3Z.js";import{a as V,b as q}from"./chunk-BIYNNQRQ.js";import{e as f}from"./chunk-ZLUSVROX.js";var ne={clipTriangleAtAxisAlignedThreshold:function(e,t,i,n,s,r){if(!f(e))throw new V("threshold is required.");if(!f(t))throw new V("keepAbove is required.");if(!f(i))throw new V("u0 is required.");if(!f(n))throw new V("u1 is required.");if(!f(s))throw new V("u2 is required.");let h,u,o;f(r)?r.length=0:r=[],t?(h=ie,u=n>e,o=s>e);let p,l,d,a,m,c,g=h+u+o;return 1===g?h?(p=(e-i)/(n-i),l=(e-i)/(s-i),r.push(1),r.push(2),1!==l&&(r.push(-1),r.push(0),r.push(2),r.push(l)),1!==p&&(r.push(-1),r.push(0),r.push(1),r.push(p))):u?(d=(e-n)/(s-n),a=(e-n)/(i-n),r.push(2),r.push(0),1!==a&&(r.push(-1),r.push(1),r.push(0),r.push(a)),1!==d&&(r.push(-1),r.push(1),r.push(2),r.push(d))):o&&(m=(e-s)/(i-s),c=(e-s)/(n-s),r.push(0),r.push(1),1!==c&&(r.push(-1),r.push(2),r.push(1),r.push(c)),1!==m&&(r.push(-1),r.push(2),r.push(0),r.push(m))):2===g?h||i===e?u||n===e?!o&&s!==e&&(l=(e-i)/(s-i),d=(e-n)/(s-n),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(l),r.push(-1),r.push(1),r.push(2),r.push(d)):(c=(e-s)/(n-s),p=(e-i)/(n-i),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(c),r.push(-1),r.push(0),r.push(1),r.push(p)):(a=(e-n)/(i-n),m=(e-s)/(i-s),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(a),r.push(-1),r.push(2),r.push(0),r.push(m)):3!==g&&(r.push(0),r.push(1),r.push(2)),r},computeBarycentricCoordinates:function(e,t,i,n,s,r,h,u,o){if(!f(e))throw new V("x is required.");if(!f(t))throw new V("y is required.");if(!f(i))throw new V("x1 is required.");if(!f(n))throw new V("y1 is required.");if(!f(s))throw new V("x2 is required.");if(!f(r))throw new V("y2 is required.");if(!f(h))throw new V("x3 is required.");if(!f(u))throw new V("y3 is required.");let p=i-h,l=h-s,d=r-u,a=n-u,m=1/(d*p+l*a),c=t-u,g=e-h,w=(d*g+l*c)*m,x=(-a*g+p*c)*m,y=1-w-x;return f(o)?(o.x=w,o.y=x,o.z=y,o):new A(w,x,y)},computeLineSegmentLineSegmentIntersection:function(e,t,i,n,s,r,h,u,o){q.typeOf.number("x00",e),q.typeOf.number("y00",t),q.typeOf.number("x01",i),q.typeOf.number("y01",n),q.typeOf.number("x10",s),q.typeOf.number("y10",r),q.typeOf.number("x11",h),q.typeOf.number("y11",u);let p=(u-r)*(i-e)-(h-s)*(n-t);if(0===p)return;let l=((h-s)*(t-r)-(u-r)*(e-s))/p,d=((i-e)*(t-r)-(n-t)*(e-s))/p;return l>=0&&l<=1&&d>=0&&d<=1?(f(o)||(o=new Z),o.x=e+l*(i-e),o.y=t+l*(n-t),o):void 0}},ie=ne,a=32767,z=a/2|0,Me=[],ze=[],Xe=[],te=new Ie,E=new A,Ke=[],We=[],Ye=[],Le=[],_e=[],Je=new A,Qe=new de,Ze=new ue,Ge=new Z,$e=new A;function je(e,t){let i=e.isEastChild,n=e.isNorthChild,s=i?z:0,r=i?a:z,h=n?z:0,u=n?a:z,o=Ke,p=We,f=Ye,l=_e;o.length=0,p.length=0,f.length=0,l.length=0;let d=Le;d.length=0;let c={},g=e.vertices,w=e.indices;w=w.subarray(0,e.indexCountWithoutSkirts);let x,y,V,I,B,v=Ne.clone(e.encoding),S=v.hasVertexNormals,b=0,k=e.vertexCountWithoutSkirts,j=e.minimumHeight,q=e.maximumHeight,C=new Array(k),O=new Array(k),R=new Array(k),T=S?new Array(2*k):void 0;for(y=0,V=0;y=z||!i&&I<=z)&&(n&&B>=z||!n&&B<=z)&&(c[y]=b,o.push(I),p.push(B),f.push(R[y]),S&&(l.push(T[V]),l.push(T[V+1])),++b)}let K=[];K.push(new m),K.push(new m),K.push(new m);let Z,H,Y=[];for(Y.push(new m),Y.push(new m),Y.push(new m),y=0;y=a.length)&&(Z=Y[0].initializeFromClipResult(a,Z,K),!(Z>=a.length)&&(Z=Y[1].initializeFromClipResult(a,Z,K),!(Z>=a.length)&&(Z=Y[2].initializeFromClipResult(a,Z,K),H=ie.clipTriangleAtAxisAlignedThreshold(z,n,Y[0].getV(),Y[1].getV(),Y[2].getV(),ze),Oe(o,p,f,l,d,c,H,Y,S),Z=r?(U.push(y),I=a):I=2*I+Q,o[y]=I,B=Math.round(p[y]),B<=h?(P.push(y),B=0):B>=u?(W.push(y),B=a):B=2*B+X,p[y]=B,x=N.lerp(j,q,f[y]/a),xM&&(M=x),f[y]=x,te.longitude=N.lerp(ne,ee,I/a),te.latitude=N.lerp($,_,B/a),te.height=x,L.cartographicToCartesian(te,E),J.push(E.x),J.push(E.y),J.push(E.z);let se=de.fromVertices(J,A.ZERO,3,Qe),re=ue.fromRectangle(G,D,M,L,Ze),he=new be(L).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(se.center,J,3,se.center,D,Je),oe=M-D,pe=new Uint16Array(o.length+p.length+f.length);for(y=0;ye,u=n>e,o=s>e);let p,l,d,a,m,c,g=h+u+o;return 1===g?h?(p=(e-i)/(n-i),l=(e-i)/(s-i),r.push(1),r.push(2),1!==l&&(r.push(-1),r.push(0),r.push(2),r.push(l)),1!==p&&(r.push(-1),r.push(0),r.push(1),r.push(p))):u?(d=(e-n)/(s-n),a=(e-n)/(i-n),r.push(2),r.push(0),1!==a&&(r.push(-1),r.push(1),r.push(0),r.push(a)),1!==d&&(r.push(-1),r.push(1),r.push(2),r.push(d))):o&&(m=(e-s)/(i-s),c=(e-s)/(n-s),r.push(0),r.push(1),1!==c&&(r.push(-1),r.push(2),r.push(1),r.push(c)),1!==m&&(r.push(-1),r.push(2),r.push(0),r.push(m))):2===g?h||i===e?u||n===e?!o&&s!==e&&(l=(e-i)/(s-i),d=(e-n)/(s-n),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(l),r.push(-1),r.push(1),r.push(2),r.push(d)):(c=(e-s)/(n-s),p=(e-i)/(n-i),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(c),r.push(-1),r.push(0),r.push(1),r.push(p)):(a=(e-n)/(i-n),m=(e-s)/(i-s),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(a),r.push(-1),r.push(2),r.push(0),r.push(m)):3!==g&&(r.push(0),r.push(1),r.push(2)),r},computeBarycentricCoordinates:function(e,t,i,n,s,r,h,u,o){if(!f(e))throw new V("x is required.");if(!f(t))throw new V("y is required.");if(!f(i))throw new V("x1 is required.");if(!f(n))throw new V("y1 is required.");if(!f(s))throw new V("x2 is required.");if(!f(r))throw new V("y2 is required.");if(!f(h))throw new V("x3 is required.");if(!f(u))throw new V("y3 is required.");let p=i-h,l=h-s,d=r-u,a=n-u,m=1/(d*p+l*a),c=t-u,g=e-h,w=(d*g+l*c)*m,x=(-a*g+p*c)*m,y=1-w-x;return f(o)?(o.x=w,o.y=x,o.z=y,o):new A(w,x,y)},computeLineSegmentLineSegmentIntersection:function(e,t,i,n,s,r,h,u,o){q.typeOf.number("x00",e),q.typeOf.number("y00",t),q.typeOf.number("x01",i),q.typeOf.number("y01",n),q.typeOf.number("x10",s),q.typeOf.number("y10",r),q.typeOf.number("x11",h),q.typeOf.number("y11",u);let p=(u-r)*(i-e)-(h-s)*(n-t);if(0===p)return;let l=((h-s)*(t-r)-(u-r)*(e-s))/p,d=((i-e)*(t-r)-(n-t)*(e-s))/p;return l>=0&&l<=1&&d>=0&&d<=1?(f(o)||(o=new Z),o.x=e+l*(i-e),o.y=t+l*(n-t),o):void 0}},ie=ne,a=32767,z=a/2|0,Me=[],ze=[],Xe=[],te=new Ie,E=new A,Ke=[],We=[],Ye=[],Le=[],_e=[],Je=new A,Qe=new de,Ze=new ue,Ge=new Z,$e=new A;function je(e,t){let i=e.isEastChild,n=e.isNorthChild,s=i?z:0,r=i?a:z,h=n?z:0,u=n?a:z,o=Ke,p=We,f=Ye,l=_e;o.length=0,p.length=0,f.length=0,l.length=0;let d=Le;d.length=0;let c={},g=e.vertices,w=e.indices;w=w.subarray(0,e.indexCountWithoutSkirts);let x,y,V,I,S,B=Ne.clone(e.encoding),v=B.hasVertexNormals,b=0,k=e.vertexCountWithoutSkirts,j=e.minimumHeight,T=e.maximumHeight,q=new Array(k),O=new Array(k),C=new Array(k),H=v?new Array(2*k):void 0;for(y=0,V=0;y=z||!i&&I<=z)&&(n&&S>=z||!n&&S<=z)&&(c[y]=b,o.push(I),p.push(S),f.push(C[y]),v&&(l.push(H[V]),l.push(H[V+1])),++b)}let R=[];R.push(new m),R.push(new m),R.push(new m);let K,F,U=[];for(U.push(new m),U.push(new m),U.push(new m),y=0;y=a.length)&&(K=U[0].initializeFromClipResult(a,K,R),!(K>=a.length)&&(K=U[1].initializeFromClipResult(a,K,R),!(K>=a.length)&&(K=U[2].initializeFromClipResult(a,K,R),F=ie.clipTriangleAtAxisAlignedThreshold(z,n,U[0].getV(),U[1].getV(),U[2].getV(),ze),Oe(o,p,f,l,d,c,F,U,v),K=r?(D.push(y),I=a):I=2*I+Y,o[y]=I,S=Math.round(p[y]),S<=h?(X.push(y),S=0):S>=u?(P.push(y),S=a):S=2*S+Z,p[y]=S,x=N.lerp(j,T,f[y]/a),xL&&(L=x),f[y]=x,te.longitude=N.lerp(ne,ee,I/a),te.latitude=N.lerp($,_,S/a),te.height=x,J.cartographicToCartesian(te,E),M.push(E.x),M.push(E.y),M.push(E.z);let se=de.fromVertices(M,A.ZERO,3,Qe),re=ue.fromRectangle(G,W,L,J,Ze),he=new be(J).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(se.center,M,3,se.center,W,Je),oe=L-W,pe=new Uint16Array(o.length+p.length+f.length);for(y=0;y{var e,t,n,i,r={385:function(e){var t;"undefined"!=typeof self?self:"undefined"!=typeof global&&global,t=()=>(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.d(t,{default:()=>yO});var n={};e.r(n),e.d(n,{AxesViewer:()=>uu,BoneAxesViewer:()=>hu,DebugLayer:()=>du,DebugLayerTab:()=>su,DirectionalLightFrustumViewer:()=>Uh,PhysicsViewer:()=>Lh,RayHelper:()=>Fh,SkeletonViewer:()=>Bh});var i={};e.r(i),e.d(i,{AbstractActionManager:()=>s,AbstractAssetTask:()=>yS,AbstractMesh:()=>kr,AbstractScene:()=>o,AcquireNativeObjectAsync:()=>Gd,Action:()=>V,ActionEvent:()=>z,ActionManager:()=>de,AddBlock:()=>Yy,AddressMode:()=>ip,AdvancedTimer:()=>E_,AlignBlock:()=>iE,AlphaState:()=>jt,AmmoJSPlugin:()=>dg,AnaglyphArcRotateCamera:()=>wc,AnaglyphFreeCamera:()=>Mc,AnaglyphGamepadCamera:()=>Dc,AnaglyphPostProcess:()=>Rc,AnaglyphUniversalCamera:()=>Nc,Analyser:()=>co,AndOrNotEvaluator:()=>me,Angle:()=>Li,Animatable:()=>Oi,AnimatedInputBlockTypes:()=>va,Animation:()=>Je,AnimationAssetTask:()=>ES,AnimationEvent:()=>Ji,AnimationGroup:()=>tr,AnimationGroupMask:()=>ir,AnimationGroupMaskMode:()=>Di,AnimationKeyInterpolation:()=>Ue,AnimationPropertiesOverride:()=>Mi,AnimationRange:()=>ze,AnisotropyBlock:()=>Nv,ApplyPostProcess:()=>rd,Arc2:()=>Fi,ArcFollowCamera:()=>yc,ArcRotateCamera:()=>uc,ArcRotateCameraGamepadInput:()=>ks,ArcRotateCameraInputsManager:()=>Hs,ArcRotateCameraKeyboardMoveInput:()=>Vs,ArcRotateCameraMouseWheelInput:()=>zs,ArcRotateCameraPointersInput:()=>Gs,ArcRotateCameraVRDeviceOrientationInput:()=>js,ArcTan2Block:()=>_v,AssetContainer:()=>so,AssetTaskState:()=>mS,AssetsManager:()=>OS,AssetsProgressEvent:()=>vS,AsyncLoop:()=>Rn,AttachToBoxBehavior:()=>Mo,AudioEngine:()=>lo,AudioSceneComponent:()=>po,AutoLayoutMode:()=>fp,AutoReleaseWorkerPool:()=>Km,AutoRotationBehavior:()=>Io,AxesViewer:()=>uu,Axis:()=>Ii,AxisDragGizmo:()=>lu,AxisScaleGizmo:()=>Xf,BRDFTextureTools:()=>gm,BabylonFileLoaderConfiguration:()=>mg,BackEase:()=>Gi,BackgroundMaterial:()=>hm,BakedVertexAnimationManager:()=>mo,BallAndSocketConstraint:()=>yA,BaseCameraMouseWheelInput:()=>Ms,BaseCameraPointersInput:()=>Ds,BaseError:()=>ht,BaseParticleSystem:()=>qa,BaseSixDofDragBehavior:()=>Go,BaseTexture:()=>go,BasisTools:()=>oy,BasisToolsOptions:()=>Zg,BasisTranscodeConfiguration:()=>Qg,BezierCurve:()=>Ni,BezierCurveEase:()=>$i,BiPlanarBlock:()=>Qv,BinaryFileAssetTask:()=>xS,BlackAndWhitePostProcess:()=>XA,BlendFactor:()=>vp,BlendOperation:()=>bp,BloomEffect:()=>QA,BloomMergePostProcess:()=>KA,BlurPostProcess:()=>sm,Bone:()=>Ri,BoneAxesViewer:()=>hu,BoneIKController:()=>Ps,BoneLookController:()=>Is,BonesBlock:()=>yy,BooleanGeometryBlock:()=>xE,BooleanGeometryOperations:()=>EE,BounceEase:()=>Hi,BouncingBehavior:()=>Ro,BoundingBlock:()=>AE,BoundingBox:()=>fr,BoundingBoxGizmo:()=>Yf,BoundingBoxRenderer:()=>Bx,BoundingInfo:()=>br,BoundingSphere:()=>mr,BoxBlock:()=>gT,BoxBuilder:()=>_u,BoxParticleEmitter:()=>Ua,Buffer:()=>Xn,BufferBindingType:()=>cp,BufferMapState:()=>Kd,BufferUsage:()=>Qd,CSG:()=>Ub,Camera:()=>dr,CameraGizmo:()=>am,CameraInputTypes:()=>Ns,CameraInputsManager:()=>Ls,CannonJSPlugin:()=>ug,CanvasAlphaMode:()=>Op,CapsuleBlock:()=>PT,CapsuleBuilder:()=>Eu,CascadedShadowGenerator:()=>Z_,ChromaticAberrationPostProcess:()=>ZA,CircleEase:()=>zi,CircleOfConfusionPostProcess:()=>$A,ClampBlock:()=>Ky,ClearCoatBlock:()=>Fv,ClipPlanesBlock:()=>Hy,ClipboardEventTypes:()=>jf,ClipboardInfo:()=>Wf,CloudBlock:()=>Xv,CloudPoint:()=>qE,Collider:()=>Wl,Color3:()=>B,Color3Gradient:()=>DE,Color4:()=>U,ColorCorrectionPostProcess:()=>JA,ColorCurves:()=>Nn,ColorGradient:()=>ME,ColorGradingTexture:()=>Rg,ColorMergerBlock:()=>ev,ColorSplitterBlock:()=>Ka,ColorWrite:()=>yp,CombineAction:()=>se,CompareFunction:()=>ap,CompatibilityOptions:()=>Ir,CompilationMessageType:()=>dp,CompleteGreasedLineColorTable:()=>uT,CompleteGreasedLineWidthTable:()=>lT,ComputeBindingType:()=>Yl,ComputeEffect:()=>ql,ComputeNormalsBlock:()=>XT,ComputePassTimestampLocation:()=>Sp,ComputeShader:()=>Ql,ComputeShaderParticleSystem:()=>OE,Condition:()=>K,ConditionBlock:()=>VT,ConditionBlockTests:()=>BT,ConditionalBlock:()=>Wv,ConditionalBlockConditions:()=>Hv,ConeParticleEmitter:()=>ka,Constants:()=>a,ContainerAssetTask:()=>bS,ConversionMode:()=>nS,ConvolutionPostProcess:()=>ex,Coordinate:()=>Pi,CopyTextureToTexture:()=>oS,CopyTools:()=>To,CreateBox:()=>mu,CreateBoxVertexData:()=>pu,CreateCapsule:()=>Tu,CreateCapsuleVertexData:()=>bu,CreateCylinder:()=>tu,CreateCylinderVertexData:()=>eu,CreateDashedLines:()=>Xu,CreateDashedLinesVertexData:()=>Hu,CreateDecal:()=>bh,CreateDisc:()=>Pu,CreateDiscVertexData:()=>Cu,CreateEnvTextureAsync:()=>yd,CreateGeodesic:()=>Ch,CreateGoldberg:()=>Rh,CreateGoldbergVertexData:()=>Ih,CreateGreasedLine:()=>cT,CreateGreasedLineMaterial:()=>sT,CreateGround:()=>Dl,CreateGroundFromHeightMap:()=>Ll,CreateGroundFromHeightMapVertexData:()=>Ml,CreateGroundVertexData:()=>Ol,CreateHemisphere:()=>nm,CreateIcoSphere:()=>ps,CreateIcoSphereVertexData:()=>ds,CreateImageDataArrayBufferViews:()=>bd,CreateLathe:()=>ah,CreateLineSystem:()=>ju,CreateLineSystemVertexData:()=>Gu,CreateLines:()=>Wu,CreatePlane:()=>Bo,CreatePlaneVertexData:()=>Fo,CreatePolygon:()=>Ju,CreatePolygonVertexData:()=>$u,CreatePolyhedron:()=>hh,CreatePolyhedronVertexData:()=>uh,CreateResizedCopy:()=>id,CreateRibbon:()=>xu,CreateRibbonVertexData:()=>Au,CreateScreenshot:()=>JS,CreateScreenshotAsync:()=>eC,CreateScreenshotUsingRenderTarget:()=>nC,CreateScreenshotUsingRenderTargetAsync:()=>iC,CreateScreenshotWithResizeAsync:()=>tC,CreateSegmentedBoxVertexData:()=>fu,CreateSphere:()=>yu,CreateSphereVertexData:()=>gu,CreateText:()=>Dh,CreateTextShapePaths:()=>Mh,CreateTiledBox:()=>Du,CreateTiledBoxVertexData:()=>Mu,CreateTiledGround:()=>Nl,CreateTiledGroundVertexData:()=>wl,CreateTiledPlane:()=>Ou,CreateTiledPlaneVertexData:()=>Ru,CreateTorus:()=>Ul,CreateTorusKnot:()=>Fu,CreateTorusKnotVertexData:()=>Lu,CreateTorusVertexData:()=>Bl,CreateTube:()=>ch,CrossBlock:()=>Qy,CubeMapToSphericalPolynomialTools:()=>dd,CubeTexture:()=>lm,CubeTextureAssetTask:()=>PS,CubicEase:()=>ji,CullMode:()=>gp,CurrentScreenBlock:()=>Ca,Curve3:()=>ki,CurveBlock:()=>nb,CurveBlockTypes:()=>eb,CustomBlock:()=>Zy,CustomOptimization:()=>zS,CustomParticleEmitter:()=>Xa,CustomProceduralTexture:()=>hy,CylinderBlock:()=>CT,CylinderBuilder:()=>nu,CylinderDirectedParticleEmitter:()=>za,CylinderParticleEmitter:()=>Va,DDSTools:()=>zm,DataBuffer:()=>Qt,DataReader:()=>cC,DataStorage:()=>lC,Database:()=>PE,DebugBlock:()=>pE,DebugLayer:()=>du,DebugLayerTab:()=>su,DecalBuilder:()=>Th,DecalMapConfiguration:()=>ub,DecalMapDefines:()=>lb,Decode:()=>_t,DecodeBase64ToBinary:()=>vt,DecodeBase64ToString:()=>yt,DecodeBase64UrlToBinary:()=>bn,DecodeBase64UrlToString:()=>En,DeepCopier:()=>he,DefaultCollisionCoordinator:()=>Xl,DefaultKTX2DecoderOptions:()=>Zm,DefaultLoadingScreen:()=>eg,DefaultRenderingPipeline:()=>Tx,Deferred:()=>wS,DepthCullingState:()=>Gt,DepthOfFieldBlurPostProcess:()=>tx,DepthOfFieldEffect:()=>rx,DepthOfFieldEffectBlurLevel:()=>nx,DepthOfFieldMergePostProcess:()=>ix,DepthPeelingRenderer:()=>Vx,DepthPeelingSceneComponent:()=>zx,DepthReducer:()=>W_,DepthRenderer:()=>H_,DepthRendererSceneComponent:()=>Ux,DepthSortedParticle:()=>WE,DerivativeBlock:()=>Py,DesaturateBlock:()=>Mv,DetailMapConfiguration:()=>dl,DeviceInputEventType:()=>jn,DeviceLostReason:()=>wp,DeviceOrientationCamera:()=>hc,DeviceSource:()=>fi,DeviceSourceManager:()=>_i,DeviceType:()=>Bn,DirectionalLight:()=>tm,DirectionalLightFrustumViewer:()=>Uh,DiscBlock:()=>IT,DiscBuilder:()=>Iu,DiscardBlock:()=>Sy,DisplayPassPostProcess:()=>ox,DistanceBlock:()=>hv,DistanceConstraint:()=>vA,DistanceJoint:()=>Qo,DivideBlock:()=>iv,DoNothingAction:()=>ae,DomManagement:()=>st,DotBlock:()=>$y,DracoCompression:()=>wb,DrawWrapper:()=>en,DualSenseInput:()=>zn,DualShockButton:()=>vc,DualShockDpad:()=>bc,DualShockInput:()=>Vn,DualShockPad:()=>Ec,DumpTools:()=>is,DynamicFloat32Array:()=>yC,DynamicTexture:()=>yl,EasingFunction:()=>Vi,EdgesRenderer:()=>Hx,Effect:()=>zt,EffectFallbacks:()=>Oa,EffectLayer:()=>M_,EffectLayerSceneComponent:()=>D_,EffectRenderer:()=>Za,EffectWrapper:()=>$a,ElasticEase:()=>Wi,ElbowBlock:()=>qv,EncodeArrayBufferToBase64:()=>gt,EndsWith:()=>ft,Engine:()=>Dr,EngineFactory:()=>Hf,EngineFormat:()=>Xm,EngineInstrumentation:()=>O_,EngineStore:()=>A,EngineView:()=>jh,EnvironmentHelper:()=>dm,EnvironmentTextureTools:()=>Cd,Epsilon:()=>m,EquiRectangularCubeTexture:()=>Og,EquiRectangularCubeTextureAssetTask:()=>RS,ErrorCodes:()=>dt,ErrorFilter:()=>Mp,EventConstants:()=>li,EventState:()=>c,ExecuteCodeAction:()=>ce,ExponentialEase:()=>Xi,ExternalTexture:()=>df,ExtractHighlightsPostProcess:()=>qA,ExtrudePolygon:()=>eh,ExtrudeShape:()=>nh,ExtrudeShapeCustom:()=>ih,FactorGradient:()=>NE,FadeInOutBehavior:()=>Do,FeatureName:()=>qd,FileTools:()=>Tn,FileToolsOptions:()=>un,FilesInput:()=>DS,FilesInputStore:()=>lt,FilterMode:()=>rp,FilterPostProcess:()=>ax,FlowGraph:()=>qP,FlowGraphAbsBlock:()=>mR,FlowGraphAcosBlock:()=>jR,FlowGraphAcoshBlock:()=>ZR,FlowGraphAddBlock:()=>rR,FlowGraphAsinBlock:()=>HR,FlowGraphAsinhBlock:()=>QR,FlowGraphAtan2Block:()=>XR,FlowGraphAtanBlock:()=>WR,FlowGraphAtanhBlock:()=>$R,FlowGraphBitwiseAndBlock:()=>kI,FlowGraphBitwiseLeftShiftBlock:()=>HI,FlowGraphBitwiseNotBlock:()=>GI,FlowGraphBitwiseOrBlock:()=>VI,FlowGraphBitwiseRightShiftBlock:()=>jI,FlowGraphBitwiseXorBlock:()=>zI,FlowGraphBlock:()=>kP,FlowGraphBranchBlock:()=>rI,FlowGraphCeilBlock:()=>vR,FlowGraphClampBlock:()=>IR,FlowGraphConditionalDataBlock:()=>bI,FlowGraphConnection:()=>yP,FlowGraphConnectionType:()=>mP,FlowGraphConsoleLogBlock:()=>JP,FlowGraphConstantBlock:()=>AI,FlowGraphContext:()=>jP,FlowGraphContextLogger:()=>ZP,FlowGraphCoordinateTransformBlock:()=>EI,FlowGraphCoordinator:()=>QP,FlowGraphCosBlock:()=>zR,FlowGraphCoshBlock:()=>qR,FlowGraphCountLeadingZerosBlock:()=>WI,FlowGraphCountTrailingZerosBlock:()=>XI,FlowGraphCounterBlock:()=>dI,FlowGraphCrossBlock:()=>cO,FlowGraphCubeRootBlock:()=>rO,FlowGraphDataConnection:()=>MP,FlowGraphDebounceBlock:()=>fI,FlowGraphDegToRadBlock:()=>UR,FlowGraphDivideBlock:()=>sR,FlowGraphDoNBlock:()=>oI,FlowGraphDotBlock:()=>lR,FlowGraphEBlock:()=>uR,FlowGraphEqBlock:()=>wR,FlowGraphEventBlock:()=>HP,FlowGraphExecutionBlock:()=>zP,FlowGraphExpBlock:()=>JR,FlowGraphFlipFlopBlock:()=>mI,FlowGraphFloorBlock:()=>yR,FlowGraphForLoopBlock:()=>aI,FlowGraphFractBlock:()=>bR,FlowGraphGetPropertyBlock:()=>xI,FlowGraphGetVariableBlock:()=>TI,FlowGraphGreaterThanBlock:()=>NR,FlowGraphGreaterThanOrEqualBlock:()=>LR,FlowGraphInfBlock:()=>dR,FlowGraphInterpolateBlock:()=>OR,FlowGraphIsInfBlock:()=>BR,FlowGraphIsNanBlock:()=>FR,FlowGraphLengthBlock:()=>aO,FlowGraphLessThanBlock:()=>MR,FlowGraphLessThanOrEqualBlock:()=>DR,FlowGraphLog10Block:()=>nO,FlowGraphLog2Block:()=>tO,FlowGraphLogBlock:()=>eO,FlowGraphLogicAndBlock:()=>ZI,FlowGraphLogicNotBlock:()=>JI,FlowGraphLogicOrBlock:()=>$I,FlowGraphMaxBlock:()=>SR,FlowGraphMeshPickEventBlock:()=>YP,FlowGraphMinBlock:()=>xR,FlowGraphMultiGateBlock:()=>lI,FlowGraphMultiplyBlock:()=>aR,FlowGraphNaNBlock:()=>pR,FlowGraphNegBlock:()=>TR,FlowGraphNormalizeBlock:()=>sO,FlowGraphPath:()=>NP,FlowGraphPauseAnimationBlock:()=>vI,FlowGraphPiBlock:()=>hR,FlowGraphPlayAnimationBlock:()=>gI,FlowGraphPowBlock:()=>oO,FlowGraphRadToDegBlock:()=>kR,FlowGraphRandomBlock:()=>cR,FlowGraphReceiveCustomEventBlock:()=>dO,FlowGraphRemainderBlock:()=>AR,FlowGraphRotate2DBlock:()=>lO,FlowGraphRotate3DBlock:()=>uO,FlowGraphSaturateBlock:()=>RR,FlowGraphSceneReadyEventBlock:()=>hO,FlowGraphSceneTickEventBlock:()=>pO,FlowGraphSendCustomEventBlock:()=>iI,FlowGraphSequenceBlock:()=>_I,FlowGraphSetPropertyBlock:()=>nI,FlowGraphSetVariableBlock:()=>eI,FlowGraphSignBlock:()=>_R,FlowGraphSignalConnection:()=>VP,FlowGraphSinBlock:()=>VR,FlowGraphSinhBlock:()=>YR,FlowGraphSqrtBlock:()=>iO,FlowGraphState:()=>XP,FlowGraphStopAnimationBlock:()=>yI,FlowGraphSubtractBlock:()=>oR,FlowGraphSwitchBlock:()=>uI,FlowGraphTanBlock:()=>GR,FlowGraphTanhBlock:()=>KR,FlowGraphThrottleBlock:()=>sI,FlowGraphTimerBlock:()=>cI,FlowGraphTruncBlock:()=>gR,FlowGraphWaitAllBlock:()=>hI,FlowGraphWhileLoopBlock:()=>pI,FluidRenderer:()=>lS,FluidRendererSceneComponent:()=>cS,FluidRenderingDebug:()=>Zx,FluidRenderingObject:()=>Jx,FluidRenderingObjectCustomParticles:()=>rS,FluidRenderingObjectParticleSystem:()=>eS,FluidRenderingTargetRenderer:()=>iS,FlyCamera:()=>pc,FlyCameraInputsManager:()=>dc,FlyCameraKeyboardInput:()=>Ws,FlyCameraMouseInput:()=>Xs,FogBlock:()=>Fy,FollowBehavior:()=>Wo,FollowCamera:()=>gc,FollowCameraInputsManager:()=>fc,FollowCameraKeyboardMoveInput:()=>Ys,FollowCameraMouseWheelInput:()=>qs,FollowCameraPointersInput:()=>Ks,FragCoordBlock:()=>Iy,FragDepthBlock:()=>Dy,FragmentOutputBlock:()=>ya,FramingBehavior:()=>Oo,FreeCamera:()=>cc,FreeCameraDeviceOrientationInput:()=>nc,FreeCameraGamepadInput:()=>rc,FreeCameraInputsManager:()=>tc,FreeCameraKeyboardMoveInput:()=>Qs,FreeCameraMouseInput:()=>$s,FreeCameraMouseWheelInput:()=>Js,FreeCameraTouchInput:()=>ec,FreeCameraVirtualJoystickInput:()=>ac,FresnelBlock:()=>cv,FresnelParameters:()=>xg,FromHalfFloat:()=>ad,FrontFace:()=>_p,FrontFacingBlock:()=>Cy,Frustum:()=>Ti,FxaaPostProcess:()=>sx,GPUParticleSystem:()=>kE,GUID:()=>Cn,Gamepad:()=>Bs,GamepadCamera:()=>Cc,GamepadManager:()=>Ac,GamepadSystemSceneComponent:()=>xc,GaussianSplatting:()=>uS,GenerateBase64StringFromPixelData:()=>yo,GenerateBase64StringFromTexture:()=>vo,GenerateBase64StringFromTextureAsync:()=>bo,GenericPad:()=>Us,GeodesicData:()=>Sh,Geometry:()=>Rr,GeometryBufferRenderer:()=>dx,GeometryBufferRendererSceneComponent:()=>fx,GeometryCollectionBlock:()=>jT,GeometryElbowBlock:()=>WT,GeometryInfoBlock:()=>mE,GeometryInputBlock:()=>_T,GeometryOptimizeBlock:()=>vT,GeometryOutputBlock:()=>fT,GeometryTextureBlock:()=>bE,GeometryTextureFetchBlock:()=>TE,GeometryTransformBlock:()=>$T,GeometryTrigonometryBlock:()=>ZT,GeometryTrigonometryBlockOperations:()=>KT,GetClass:()=>T,GetDOMTextContent:()=>ot,GetEnvInfo:()=>_d,GetEnvironmentBRDFTexture:()=>_m,GetInternalFormatFromBasisFormat:()=>$g,GetTGAHeader:()=>jg,GetTextureDataAsync:()=>cd,Gizmo:()=>cu,GizmoAnchorPoint:()=>iu,GizmoCoordinatesMode:()=>ru,GizmoManager:()=>Jf,GlowLayer:()=>N_,GoldbergMesh:()=>Ph,GradientBlock:()=>xv,GradientBlockColorStep:()=>Av,GradientHelper:()=>LE,GrainPostProcess:()=>cx,GreasedLineBaseMesh:()=>Jb,GreasedLineMaterialDefaults:()=>yb,GreasedLineMesh:()=>eT,GreasedLineMeshColorDistribution:()=>tT,GreasedLineMeshColorDistributionType:()=>ob,GreasedLineMeshColorMode:()=>rb,GreasedLineMeshMaterialType:()=>ib,GreasedLineMeshWidthDistribution:()=>nT,GreasedLinePluginMaterial:()=>Tb,GreasedLineRibbonAutoDirectionMode:()=>Zb,GreasedLineRibbonFacesMode:()=>Qb,GreasedLineRibbonMesh:()=>aT,GreasedLineRibbonPointsMode:()=>Kb,GreasedLineSimpleMaterial:()=>Ab,GreasedLineTools:()=>vb,GridBlock:()=>xT,GroundBuilder:()=>Fl,GroundMesh:()=>Rl,HDRCubeTexture:()=>rg,HDRCubeTextureAssetTask:()=>IS,HDRFiltering:()=>ig,HDRTools:()=>ng,HandConstraintBehavior:()=>Cs,HandConstraintOrientation:()=>vs,HandConstraintVisibility:()=>bs,HandConstraintZone:()=>ys,HandPart:()=>ms,HardwareScalingOptimization:()=>BS,HavokPlugin:()=>DA,HeightToNormalBlock:()=>My,HemisphereBuilder:()=>im,HemisphericLight:()=>ou,HemisphericParticleEmitter:()=>Ga,HighlightLayer:()=>F_,HighlightsPostProcess:()=>lx,Hinge2Joint:()=>Jo,HingeConstraint:()=>bA,HingeJoint:()=>$o,HtmlElementTexture:()=>wg,IFlowGraphCoordinatorConfiguration:()=>KP,IWebXRControllerPhysicsOptions:()=>DC,IcoSphereBlock:()=>ET,IcoSphereBuilder:()=>gs,ImageAssetTask:()=>SS,ImageProcessingBlock:()=>Ey,ImageProcessingConfiguration:()=>Fn,ImageProcessingConfigurationDefines:()=>Ln,ImageProcessingPostProcess:()=>ux,ImageSourceBlock:()=>Uy,IncrementValueAction:()=>ie,IndexFormat:()=>Ep,InputBlock:()=>Sa,InspectableType:()=>oC,InstancedLinesMesh:()=>zu,InstancedMesh:()=>io,InstancesBlock:()=>vy,InstantiateBlock:()=>lE,InstantiateLinearBlock:()=>uE,InstantiateOnFacesBlock:()=>aE,InstantiateOnVerticesBlock:()=>oE,InstantiateOnVolumeBlock:()=>sE,InstantiateRadialBlock:()=>hE,InstantiatedEntries:()=>ao,IntFloatConverterBlock:()=>dE,InternalTexture:()=>Xt,InternalTextureSource:()=>wt,InterpolateValueAction:()=>et,IntersectionInfo:()=>pr,IsBase64DataUrl:()=>yn,IsDocumentAvailable:()=>rt,IsFileURL:()=>gn,IsNavigatorAvailable:()=>it,IsWindowObjectExist:()=>nt,JoystickAxis:()=>ic,KeepAssets:()=>oo,KeyboardEventTypes:()=>oi,KeyboardInfo:()=>ai,KeyboardInfoPre:()=>si,KhronosTextureContainer:()=>Ym,KhronosTextureContainer2:()=>$m,LatheBuilder:()=>sh,Layer:()=>U_,LayerSceneComponent:()=>B_,LengthBlock:()=>dv,LensFlare:()=>k_,LensFlareSystem:()=>V_,LensFlareSystemSceneComponent:()=>z_,LensFlaresOptimization:()=>VS,LensRenderingPipeline:()=>Ex,LerpBlock:()=>nv,Light:()=>ro,LightBlock:()=>By,LightGizmo:()=>om,LightInformationBlock:()=>Ty,LineEdgesRenderer:()=>jx,LinesBuilder:()=>Yu,LinesMesh:()=>Vu,LoadFile:()=>mn,LoadFileError:()=>sn,LoadImage:()=>pn,LoadOp:()=>Pp,LoadTextureFromTranscodeResult:()=>ry,LockConstraint:()=>EA,Logger:()=>J,MapMode:()=>Zd,MapRangeBlock:()=>UT,MappingBlock:()=>_E,MappingTypes:()=>fE,Material:()=>qr,MaterialAnisotropicDefines:()=>xm,MaterialClearCoatDefines:()=>bm,MaterialDefines:()=>Dn,MaterialDetailMapDefines:()=>hl,MaterialFlags:()=>tl,MaterialGreasedLineDefines:()=>bb,MaterialHelper:()=>Xr,MaterialIridescenceDefines:()=>Em,MaterialPluginBase:()=>ul,MaterialPluginEvent:()=>Wr,MaterialPluginManager:()=>il,MaterialSheenDefines:()=>Cm,MaterialSubSurfaceDefines:()=>Im,MathBlock:()=>FT,MathBlockOperations:()=>NT,Matrix:()=>R,MatrixBuilderBlock:()=>jv,MatrixComposeBlock:()=>gE,MatrixDeterminantBlock:()=>Zv,MatrixTransposeBlock:()=>Jv,MaxBlock:()=>lv,MergeGeometryBlock:()=>HT,MergeMeshesOptimization:()=>jS,Mesh:()=>no,MeshAssetTask:()=>TS,MeshAttributeExistsBlock:()=>tb,MeshAttributeExistsBlockTypes:()=>$v,MeshBlock:()=>TT,MeshBuilder:()=>Nh,MeshDebugMode:()=>Eb,MeshDebugPluginMaterial:()=>Cb,MeshExploder:()=>MS,MeshLODLevel:()=>Qr,MeshParticleEmitter:()=>Ya,MeshUVSpaceRenderer:()=>kb,MeshoptCompression:()=>Mb,MinBlock:()=>uv,MinMaxReducer:()=>j_,MipmapFilterMode:()=>op,MirrorTexture:()=>cm,ModBlock:()=>Gv,ModelShape:()=>jE,MorphTarget:()=>og,MorphTargetManager:()=>sg,MorphTargetsBlock:()=>by,MotionBlurPostProcess:()=>mx,MotorEnabledJoint:()=>Zo,MultiMaterial:()=>Kr,MultiObserver:()=>NS,MultiPointerScaleBehavior:()=>zo,MultiRenderTarget:()=>cy,MultiplyBlock:()=>Ba,NLerpBlock:()=>Sv,NativeDataStream:()=>Qh,NativeEngine:()=>Xd,NativePointerInput:()=>kn,NativeXRFrame:()=>gP,NativeXRLayerRenderTargetTextureProvider:()=>Cl,NativeXRLayerWrapper:()=>Sl,NativeXRRenderTarget:()=>Pl,NegateBlock:()=>pv,Node:()=>He,NodeGeometry:()=>yT,NodeGeometryBlock:()=>pT,NodeGeometryBlockConnectionPointTypes:()=>iT,NodeGeometryBuildState:()=>mT,NodeGeometryConnectionPoint:()=>dT,NodeGeometryConnectionPointCompatibilityStates:()=>rT,NodeGeometryConnectionPointDirection:()=>oT,NodeGeometryContextualSources:()=>hT,NodeMaterial:()=>hs,NodeMaterialBlock:()=>ha,NodeMaterialBlockConnectionPointMode:()=>_a,NodeMaterialBlockConnectionPointTypes:()=>na,NodeMaterialBlockTargets:()=>ia,NodeMaterialConnectionPoint:()=>ua,NodeMaterialConnectionPointCompatibilityStates:()=>aa,NodeMaterialConnectionPointCustomObject:()=>gy,NodeMaterialConnectionPointDirection:()=>sa,NodeMaterialDefines:()=>us,NodeMaterialModes:()=>Fa,NodeMaterialOptimizer:()=>ab,NodeMaterialSystemValues:()=>ga,NodeMaterialTeleportInBlock:()=>Wy,NodeMaterialTeleportOutBlock:()=>Xy,NoiseBlock:()=>GT,NoiseProceduralTexture:()=>dy,NormalBlendBlock:()=>Iv,NormalizeBlock:()=>Jy,NormalizeVectorBlock:()=>qT,NullBlock:()=>RT,NullEngine:()=>Vh,NullEngineOptions:()=>kh,Observable:()=>u,Observer:()=>l,OcclusionMaterial:()=>Sg,Octree:()=>$l,OctreeBlock:()=>Zl,OctreeSceneComponent:()=>Jl,OimoJSPlugin:()=>hg,OnAfterEnteringVRObservableEvent:()=>Gl,OneMinusBlock:()=>av,Orientation:()=>wi,OutlineRenderer:()=>$x,PBRAnisotropicConfiguration:()=>Sm,PBRBaseMaterial:()=>Mm,PBRBaseSimpleMaterial:()=>Cg,PBRClearCoatConfiguration:()=>Tm,PBRIridescenceConfiguration:()=>Am,PBRMaterial:()=>Dm,PBRMaterialDefines:()=>wm,PBRMetallicRoughnessBlock:()=>zv,PBRMetallicRoughnessMaterial:()=>Pg,PBRSheenConfiguration:()=>Pm,PBRSpecularGlossinessMaterial:()=>Ig,PBRSubSurfaceConfiguration:()=>Rm,PHI:()=>f,PadNumber:()=>bt,PanoramaToCubeMapTools:()=>tg,Particle:()=>FE,ParticleBlendMultiplyBlock:()=>Ra,ParticleHelper:()=>zE,ParticleRampGradientBlock:()=>Ia,ParticleSystem:()=>UE,ParticleSystemSet:()=>VE,ParticleTextureBlock:()=>Pa,ParticlesOptimization:()=>GS,PassCubePostProcess:()=>Ic,PassPostProcess:()=>Pc,Path2:()=>Bi,Path3D:()=>Ui,PathCursor:()=>nr,PerfCollectionStrategy:()=>SC,PerfCounter:()=>vi,PerformanceConfigurator:()=>E,PerformanceMonitor:()=>Or,PerformanceViewerCollector:()=>AC,PerturbNormalBlock:()=>xy,PhotoDome:()=>fm,Physics6DoFConstraint:()=>gA,Physics6DoFLimit:()=>_A,PhysicsAggregate:()=>SA,PhysicsBody:()=>oA,PhysicsConstraint:()=>mA,PhysicsConstraintAxis:()=>$E,PhysicsConstraintAxisLimitMode:()=>ZE,PhysicsConstraintMotorType:()=>tA,PhysicsConstraintType:()=>JE,PhysicsEngine:()=>lg,PhysicsEngineV2:()=>rA,PhysicsEventType:()=>nA,PhysicsHelper:()=>UA,PhysicsImpostor:()=>ta,PhysicsJoint:()=>Ko,PhysicsMaterialCombineMode:()=>aA,PhysicsMotionType:()=>iA,PhysicsRadialExplosionEventOptions:()=>HA,PhysicsRadialImpulseFalloff:()=>LA,PhysicsRaycastResult:()=>cg,PhysicsShape:()=>sA,PhysicsShapeBox:()=>hA,PhysicsShapeCapsule:()=>lA,PhysicsShapeContainer:()=>fA,PhysicsShapeConvexHull:()=>dA,PhysicsShapeCylinder:()=>uA,PhysicsShapeMesh:()=>pA,PhysicsShapeSphere:()=>cA,PhysicsShapeType:()=>eA,PhysicsUpdraftEventOptions:()=>jA,PhysicsUpdraftMode:()=>FA,PhysicsViewer:()=>Lh,PhysicsVortexEventOptions:()=>WA,PickingInfo:()=>qn,PipelineErrorReason:()=>pp,PivotTools:()=>Lo,Plane:()=>bi,PlaneBlock:()=>bT,PlaneBuilder:()=>Uo,PlaneDragGizmo:()=>Qf,PlaneRotationGizmo:()=>qf,PlayAnimationAction:()=>re,PlaySoundAction:()=>pe,PointColor:()=>GE,PointLight:()=>J_,PointParticleEmitter:()=>Ha,PointerDragBehavior:()=>Vo,PointerEventTypes:()=>ti,PointerInfo:()=>ri,PointerInfoBase:()=>ni,PointerInfoPre:()=>ii,PointerInput:()=>Un,PointsCloudSystem:()=>QE,PointsGroup:()=>KE,Polar:()=>Pb,Polygon:()=>Qu,PolygonBuilder:()=>th,PolygonMeshBuilder:()=>Zu,PolyhedronBuilder:()=>dh,PolyhedronData:()=>xh,PositionGizmo:()=>Zf,PositionNormalTextureVertex:()=>Ta,PositionNormalVertex:()=>ba,PostProcess:()=>Da,PostProcessManager:()=>Kn,PostProcessRenderEffect:()=>YA,PostProcessRenderPipeline:()=>yx,PostProcessRenderPipelineManager:()=>vx,PostProcessRenderPipelineManagerSceneComponent:()=>bx,PostProcessesOptimization:()=>kS,PosterizeBlock:()=>Tv,PowBlock:()=>fv,PowerEase:()=>Yi,PowerPreference:()=>Yd,PrePassOutputBlock:()=>Ly,PrePassRenderer:()=>Xx,PrePassRendererSceneComponent:()=>Yx,PrePassTextureBlock:()=>jy,PrecisionDate:()=>ct,PredicateCondition:()=>Z,PressureObserverWrapper:()=>gC,PrimitiveTopology:()=>mp,PrismaticConstraint:()=>AA,ProceduralTexture:()=>ss,ProceduralTextureSceneComponent:()=>os,PropertyTypeForEdition:()=>pa,PushMaterial:()=>oa,QuadraticEase:()=>qi,QuadraticErrorSimplification:()=>qb,QuarticEase:()=>Ki,Quaternion:()=>I,QueryType:()=>Rp,QuinticEase:()=>Qi,RGBDTextureTools:()=>ud,Ragdoll:()=>PA,RagdollBoneProperties:()=>CA,RandomBlock:()=>zT,RandomBlockLocks:()=>kT,RandomGUID:()=>Sn,RandomNumberBlock:()=>mv,RawCubeTexture:()=>py,RawTexture:()=>Co,RawTexture2DArray:()=>ag,RawTexture3D:()=>fy,Ray:()=>No,RayHelper:()=>Fh,ReadFile:()=>fn,ReadFileError:()=>ln,RecastJSCrowd:()=>CE,RecastJSPlugin:()=>SE,ReciprocalBlock:()=>yv,ReflectBlock:()=>Ov,ReflectionBlock:()=>Lv,ReflectionProbe:()=>pg,ReflectionTextureBlock:()=>zy,Reflector:()=>_C,RefractBlock:()=>wv,RefractionBlock:()=>Uv,RefractionPostProcess:()=>_x,RefractionTexture:()=>my,RegisterClass:()=>b,RegisterMaterialPlugin:()=>sl,RegisterNativeTypeAsync:()=>Hd,RemapBlock:()=>La,RenderPassTimestampLocation:()=>Cp,RenderTargetTexture:()=>rs,RenderTargetWrapper:()=>wa,RenderTargetsOptimization:()=>HS,RenderingGroup:()=>Qn,RenderingGroupInfo:()=>Zn,RenderingManager:()=>$n,ReplaceColorBlock:()=>vv,RequestFile:()=>_n,RequestFileError:()=>cn,RetryStrategy:()=>ut,RibbonBuilder:()=>Su,RichType:()=>vP,RichTypeAny:()=>bP,RichTypeBoolean:()=>AP,RichTypeColor3:()=>IP,RichTypeColor4:()=>RP,RichTypeMatrix:()=>PP,RichTypeNumber:()=>EP,RichTypeQuaternion:()=>OP,RichTypeString:()=>TP,RichTypeVector2:()=>xP,RichTypeVector3:()=>SP,RichTypeVector4:()=>CP,RollingAverage:()=>wr,Rotate2dBlock:()=>Rv,RotationGizmo:()=>Kf,RotationXBlock:()=>JT,RotationYBlock:()=>eE,RotationZBlock:()=>tE,RuntimeAnimation:()=>tt,RuntimeError:()=>pt,SSAO2RenderingPipeline:()=>xx,SSAORenderingPipeline:()=>Sx,SSRRenderingPipeline:()=>Dx,SamplerBindingType:()=>lp,Scalar:()=>h,ScaleBlock:()=>qy,ScaleGizmo:()=>$f,ScalingBlock:()=>nE,Scene:()=>Ci,SceneComponentConstants:()=>Jn,SceneDepthBlock:()=>Gy,SceneInstrumentation:()=>w_,SceneLoader:()=>ra,SceneLoaderAnimationGroupLoadingMode:()=>ea,SceneLoaderFlags:()=>Pr,SceneOptimization:()=>LS,SceneOptimizer:()=>XS,SceneOptimizerOptions:()=>WS,ScenePerformancePriority:()=>ci,SceneRecorder:()=>uC,SceneSerializer:()=>QS,ScreenSizeBlock:()=>Ry,ScreenSpaceBlock:()=>Oy,ScreenSpaceCurvaturePostProcess:()=>Fx,ScreenSpaceReflectionPostProcess:()=>Px,ScreenshotTools:()=>aC,SerializationHelper:()=>ke,SetColorsBlock:()=>DT,SetCorsBehavior:()=>dn,SetMaterialIDBlock:()=>QT,SetNormalsBlock:()=>wT,SetParentAction:()=>le,SetPositionsBlock:()=>OT,SetStateAction:()=>te,SetTangentsBlock:()=>LT,SetUVsBlock:()=>MT,SetValueAction:()=>ne,ShaderCodeInliner:()=>Md,ShaderLanguage:()=>at,ShaderMaterial:()=>ku,ShaderStage:()=>sp,ShaderStore:()=>Vt,ShadowDepthWrapper:()=>cb,ShadowGenerator:()=>G_,ShadowGeneratorSceneComponent:()=>$_,ShadowLight:()=>em,ShadowMapBlock:()=>Ny,ShadowsOptimization:()=>US,ShapeBuilder:()=>oh,SharpenPostProcess:()=>gx,SheenBlock:()=>Dv,SimplexPerlin3DBlock:()=>Pv,SimplicationQueueSceneComponent:()=>$b,SimplificationQueue:()=>Hb,SimplificationSettings:()=>Gb,SimplificationType:()=>Vb,SineEase:()=>Zi,SixDofDragBehavior:()=>Ho,Size:()=>je,Skeleton:()=>Rs,SkeletonViewer:()=>Bh,SliderConstraint:()=>TA,SmartArray:()=>On,SmartArrayNoDuplicate:()=>wn,SmoothStepBlock:()=>gv,SolidParticle:()=>HE,SolidParticleSystem:()=>YE,SolidParticleVertex:()=>XE,Sound:()=>uo,SoundTrack:()=>ho,SourceTextureFormat:()=>jm,Space:()=>Si,SphereBlock:()=>AT,SphereBuilder:()=>vu,SphereDirectedParticleEmitter:()=>Wa,SphereParticleEmitter:()=>ja,Spherical:()=>Ib,SphericalHarmonics:()=>td,SphericalPolynomial:()=>nd,SpotLight:()=>rm,SpringConstraint:()=>xA,Sprite:()=>hS,SpriteManager:()=>fS,SpriteMap:()=>_S,SpritePackedManager:()=>gS,SpriteSceneComponent:()=>dS,Stage:()=>ei,StandardMaterial:()=>ml,StandardMaterialDefines:()=>fl,StandardRenderingPipeline:()=>Ix,StartsWith:()=>mt,StateCondition:()=>$,StencilOperation:()=>Tp,StencilState:()=>Ht,StencilStateComposer:()=>tn,StepBlock:()=>ov,StereoscopicArcRotateCamera:()=>Uc,StereoscopicFreeCamera:()=>kc,StereoscopicGamepadCamera:()=>Vc,StereoscopicInterlacePostProcess:()=>Fc,StereoscopicInterlacePostProcessI:()=>Lc,StereoscopicScreenUniversalCamera:()=>Gc,StereoscopicUniversalCamera:()=>zc,StickValues:()=>Fs,StopAnimationAction:()=>oe,StopSoundAction:()=>fe,StorageBuffer:()=>Os,StorageTextureAccess:()=>hp,StoreOp:()=>Ip,StringDictionary:()=>Mn,StringTools:()=>Tt,SubEmitter:()=>BE,SubEmitterType:()=>wE,SubMesh:()=>xr,SubSurfaceBlock:()=>kv,SubSurfaceSceneComponent:()=>Qx,SubtractBlock:()=>rv,SurfaceMagnetismBehavior:()=>jo,SwitchBooleanAction:()=>ee,SwitchInput:()=>Hn,TBNBlock:()=>Ay,TGATools:()=>Xg,Tags:()=>_e,TargetCamera:()=>sc,TargetedAnimation:()=>er,TeleportInBlock:()=>yE,TeleportOutBlock:()=>vE,TestBase64DataUrl:()=>vn,TextFileAssetTask:()=>AS,Texture:()=>Eo,TextureAspect:()=>tp,TextureAssetTask:()=>CS,TextureBlock:()=>ky,TextureDimension:()=>$d,TextureFormat:()=>np,TextureOptimization:()=>FS,TexturePacker:()=>uy,TexturePackerFrame:()=>ly,TextureSampleType:()=>up,TextureSampler:()=>Wt,TextureTools:()=>ld,TextureUsage:()=>Jd,TextureViewDimension:()=>ep,ThinEngine:()=>rn,ThinRenderTargetTexture:()=>_y,ThinTexture:()=>_o,TiledBoxBuilder:()=>Nu,TiledPlaneBuilder:()=>wu,TimerState:()=>g_,TmpColors:()=>k,TmpVectors:()=>w,ToGammaSpace:()=>d,ToHalfFloat:()=>od,ToLinearSpace:()=>p,TonemapPostProcess:()=>Nx,TonemappingOperator:()=>Ox,Tools:()=>Pn,TorusBlock:()=>ST,TorusBuilder:()=>kl,TorusKnotBuilder:()=>Bu,TouchCamera:()=>lc,TrailMesh:()=>zb,Trajectory:()=>hC,TrajectoryClassifier:()=>mC,TranscodeAsync:()=>ny,TranscodeTarget:()=>Wm,TransformBlock:()=>da,TransformNode:()=>Lr,TranslationBlock:()=>rE,TriPlanarBlock:()=>Kv,TrigonometryBlock:()=>cs,TrigonometryBlockOperations:()=>as,TubeBuilder:()=>lh,TwirlBlock:()=>wy,UniformBuffer:()=>Wn,UniversalCamera:()=>Sc,UnregisterAllMaterialPlugins:()=>ll,UnregisterMaterialPlugin:()=>cl,UploadContent:()=>Wg,UploadEnvLevelsAsync:()=>Td,UploadEnvSpherical:()=>xd,UploadLevelsAsync:()=>Ad,UtilityLayerRenderer:()=>au,VRCameraMetrics:()=>jc,VRDeviceOrientationArcRotateCamera:()=>Zc,VRDeviceOrientationFreeCamera:()=>$c,VRDeviceOrientationGamepadCamera:()=>Jc,VRDistortionCorrectionPostProcess:()=>Wc,VRExperienceHelper:()=>Hl,VRMultiviewToSingleviewPostProcess:()=>Kc,ValidatedNativeDataStream:()=>Dp,ValueCondition:()=>Q,Vector2:()=>S,Vector3:()=>C,Vector4:()=>P,VectorConverterBlock:()=>YT,VectorMergerBlock:()=>Na,VectorSplitterBlock:()=>tv,VertexAnimationBaker:()=>Po,VertexBuffer:()=>Yn,VertexData:()=>Cr,VertexDataMaterialInfo:()=>Sr,VertexFormat:()=>Ap,VertexOutputBlock:()=>fa,VertexStepMode:()=>xp,VideoDome:()=>R_,VideoRecorder:()=>ZS,VideoTexture:()=>I_,ViewDirectionBlock:()=>sv,Viewport:()=>hr,VirtualJoystick:()=>oc,VirtualJoysticksCamera:()=>Hc,VolumetricLightScatteringPostProcess:()=>Lx,VoronoiNoiseBlock:()=>Yv,WaveBlock:()=>Ev,WaveBlockKind:()=>bv,WebGL2ParticleSystem:()=>RE,WebGL2ShaderProcessor:()=>Kt,WebGLDataBuffer:()=>Zt,WebGLHardwareTexture:()=>Jt,WebGLPipelineContext:()=>$t,WebGPUCacheBindGroups:()=>_f,WebGPUCacheRenderPipeline:()=>sf,WebGPUCacheRenderPipelineTree:()=>lf,WebGPUCacheSampler:()=>nf,WebGPUDataBuffer:()=>Zp,WebGPUDrawContext:()=>ff,WebGPUEngine:()=>Ff,WebGPURenderTargetWrapper:()=>Gf,WebGPUTintWASM:()=>Of,WebRequest:()=>We,WebXRAbstractFeature:()=>qo,WebXRAbstractMotionController:()=>r_,WebXRAnchorSystem:()=>RC,WebXRBackgroundRemover:()=>MC,WebXRCamera:()=>t_,WebXRCompositionLayerWrapper:()=>QC,WebXRControllerComponent:()=>i_,WebXRControllerMovement:()=>GC,WebXRControllerPhysics:()=>NC,WebXRControllerPointerSelection:()=>m_,WebXRDefaultExperience:()=>S_,WebXRDefaultExperienceOptions:()=>x_,WebXRDepthSensing:()=>iP,WebXRDomOverlay:()=>zC,WebXREnterExitUI:()=>b_,WebXREnterExitUIButton:()=>y_,WebXREnterExitUIOptions:()=>v_,WebXRExperienceHelper:()=>n_,WebXREyeTracking:()=>jC,WebXRFeatureName:()=>Xo,WebXRFeaturePointSystem:()=>FC,WebXRFeaturesManager:()=>Yo,WebXRGenericHandController:()=>cP,WebXRGenericTriggerMotionController:()=>o_,WebXRHTCViveMotionController:()=>fP,WebXRHand:()=>As,WebXRHandJoint:()=>_s,WebXRHandTracking:()=>xs,WebXRHitTest:()=>LC,WebXRHitTestLegacy:()=>PC,WebXRImageTracking:()=>VC,WebXRInput:()=>f_,WebXRInputSource:()=>p_,WebXRLayers:()=>nP,WebXRLightEstimation:()=>HC,WebXRManagedOutputCanvas:()=>xl,WebXRManagedOutputCanvasOptions:()=>Al,WebXRMeshDetector:()=>kC,WebXRMicrosoftMixedRealityController:()=>uP,WebXRMotionControllerManager:()=>l_,WebXRMotionControllerTeleportation:()=>A_,WebXRNearControllerMode:()=>h_,WebXRNearInteraction:()=>__,WebXROculusTouchMotionController:()=>dP,WebXRPlaneDetector:()=>wC,WebXRProfiledMotionController:()=>s_,WebXRProjectionLayerWrapper:()=>$C,WebXRRawCameraAccess:()=>sP,WebXRSessionManager:()=>Il,WebXRSpaceWarp:()=>aP,WebXRSpaceWarpRenderTargetTextureProvider:()=>oP,WebXRState:()=>_l,WebXRTrackingState:()=>gl,WebXRWalkingLocomotion:()=>KC,WeightedSound:()=>fo,WorkerPool:()=>qm,WorleyNoise3DBlock:()=>Cv,XRSpaceWarpRenderTarget:()=>rP,Xbox360Button:()=>mc,Xbox360Dpad:()=>_c,Xbox360Pad:()=>Tc,XboxInput:()=>Gn,_BabylonLoaderRegistered:()=>fg,_BasisTextureLoader:()=>sy,_CreationDataStorage:()=>Zr,_DDSTextureLoader:()=>Gm,_ENVTextureLoader:()=>Hm,_HDRTextureLoader:()=>qg,_InstancesBatch:()=>Jr,_KTXTextureLoader:()=>e_,_MeshCollisionData:()=>Fr,_OcclusionDataStorage:()=>Gh,_PrimaryIsoTriangle:()=>Ah,_TGATextureLoader:()=>Yg,_TimeToken:()=>zh,_UpdateRGBDAsync:()=>Sd,_forceSceneHelpersToBundle:()=>C_,_forceTransformFeedbackToBundle:()=>Hh,_injectLTSFileTools:()=>An,_staticOffsetValueColor3:()=>Qe,_staticOffsetValueColor4:()=>Ze,_staticOffsetValueQuaternion:()=>Xe,_staticOffsetValueSize:()=>Ke,_staticOffsetValueVector2:()=>qe,_staticOffsetValueVector3:()=>Ye,addClipPlaneUniforms:()=>Vr,allocateAndCopyTypedBuffer:()=>Mr,bindClipPlane:()=>Hr,captureEquirectangularFromScene:()=>CC,className:()=>In,createDetailMapPlugin:()=>gb,createPBRAnisotropicPlugin:()=>hb,createPBRBRDFPlugin:()=>db,createPBRClearCoatPlugin:()=>pb,createPBRIridescencePlugin:()=>fb,createPBRSheenPlugin:()=>mb,createPBRSubSurfacePlugin:()=>_b,createYieldingScheduler:()=>or,editableInPropertyPage:()=>ma,expandToProperty:()=>xe,extractMinAndMax:()=>Ar,extractMinAndMaxIndexed:()=>Er,getRichTypeFromValue:()=>wP,inlineScheduler:()=>rr,makeAsyncFunction:()=>ur,makeSyncFunction:()=>lr,nativeOverride:()=>Ve,normalizeEnvInfo:()=>gd,prepareDefinesForClipPlanes:()=>Gr,prepareStringDefinesForClipPlanes:()=>zr,runCoroutine:()=>ar,runCoroutineAsync:()=>cr,runCoroutineSync:()=>sr,serialize:()=>Se,serializeAsCameraReference:()=>Be,serializeAsColor3:()=>Pe,serializeAsColor4:()=>De,serializeAsColorCurves:()=>Me,serializeAsFresnelParameters:()=>Ie,serializeAsImageProcessingConfiguration:()=>Ne,serializeAsMatrix:()=>Fe,serializeAsMeshReference:()=>we,serializeAsQuaternion:()=>Le,serializeAsTexture:()=>Ce,serializeAsVector2:()=>Re,serializeAsVector3:()=>Oe,setAndStartTimer:()=>T_,setStereoscopicAnaglyphRigMode:()=>Oc,setStereoscopicRigMode:()=>Bc,setVRRigMode:()=>Qc});var r={};e.r(r),e.d(r,{AbstractActionManager:()=>s,AbstractAssetTask:()=>yS,AbstractMesh:()=>kr,AbstractScene:()=>o,AcquireNativeObjectAsync:()=>Gd,Action:()=>V,ActionEvent:()=>z,ActionManager:()=>de,AddBlock:()=>Yy,AddressMode:()=>ip,AdvancedTimer:()=>E_,AlignBlock:()=>iE,AlphaState:()=>jt,AmmoJSPlugin:()=>dg,AnaglyphArcRotateCamera:()=>wc,AnaglyphFreeCamera:()=>Mc,AnaglyphGamepadCamera:()=>Dc,AnaglyphPostProcess:()=>Rc,AnaglyphUniversalCamera:()=>Nc,Analyser:()=>co,AndOrNotEvaluator:()=>me,Angle:()=>Li,Animatable:()=>Oi,AnimatedInputBlockTypes:()=>va,Animation:()=>Je,AnimationAssetTask:()=>ES,AnimationEvent:()=>Ji,AnimationGroup:()=>tr,AnimationGroupMask:()=>ir,AnimationGroupMaskMode:()=>Di,AnimationKeyInterpolation:()=>Ue,AnimationPropertiesOverride:()=>Mi,AnimationRange:()=>ze,AnisotropyBlock:()=>Nv,ApplyPostProcess:()=>rd,Arc2:()=>Fi,ArcFollowCamera:()=>yc,ArcRotateCamera:()=>uc,ArcRotateCameraGamepadInput:()=>ks,ArcRotateCameraInputsManager:()=>Hs,ArcRotateCameraKeyboardMoveInput:()=>Vs,ArcRotateCameraMouseWheelInput:()=>zs,ArcRotateCameraPointersInput:()=>Gs,ArcRotateCameraVRDeviceOrientationInput:()=>js,ArcTan2Block:()=>_v,AssetContainer:()=>so,AssetTaskState:()=>mS,AssetsManager:()=>OS,AssetsProgressEvent:()=>vS,AsyncLoop:()=>Rn,AttachToBoxBehavior:()=>Mo,AudioEngine:()=>lo,AudioSceneComponent:()=>po,AutoLayoutMode:()=>fp,AutoReleaseWorkerPool:()=>Km,AutoRotationBehavior:()=>Io,AxesViewer:()=>uu,Axis:()=>Ii,AxisDragGizmo:()=>lu,AxisScaleGizmo:()=>Xf,BRDFTextureTools:()=>gm,BabylonFileLoaderConfiguration:()=>mg,BackEase:()=>Gi,BackgroundMaterial:()=>hm,BakedVertexAnimationManager:()=>mo,BallAndSocketConstraint:()=>yA,BaseCameraMouseWheelInput:()=>Ms,BaseCameraPointersInput:()=>Ds,BaseError:()=>ht,BaseParticleSystem:()=>qa,BaseSixDofDragBehavior:()=>Go,BaseTexture:()=>go,BasisTools:()=>oy,BasisToolsOptions:()=>Zg,BasisTranscodeConfiguration:()=>Qg,BezierCurve:()=>Ni,BezierCurveEase:()=>$i,BiPlanarBlock:()=>Qv,BinaryFileAssetTask:()=>xS,BlackAndWhitePostProcess:()=>XA,BlendFactor:()=>vp,BlendOperation:()=>bp,BloomEffect:()=>QA,BloomMergePostProcess:()=>KA,BlurPostProcess:()=>sm,Bone:()=>Ri,BoneAxesViewer:()=>hu,BoneIKController:()=>Ps,BoneLookController:()=>Is,BonesBlock:()=>yy,BooleanGeometryBlock:()=>xE,BooleanGeometryOperations:()=>EE,BounceEase:()=>Hi,BouncingBehavior:()=>Ro,BoundingBlock:()=>AE,BoundingBox:()=>fr,BoundingBoxGizmo:()=>Yf,BoundingBoxRenderer:()=>Bx,BoundingInfo:()=>br,BoundingSphere:()=>mr,BoxBlock:()=>gT,BoxBuilder:()=>_u,BoxParticleEmitter:()=>Ua,Buffer:()=>Xn,BufferBindingType:()=>cp,BufferMapState:()=>Kd,BufferUsage:()=>Qd,CSG:()=>Ub,Camera:()=>dr,CameraGizmo:()=>am,CameraInputTypes:()=>Ns,CameraInputsManager:()=>Ls,CannonJSPlugin:()=>ug,CanvasAlphaMode:()=>Op,CapsuleBlock:()=>PT,CapsuleBuilder:()=>Eu,CascadedShadowGenerator:()=>Z_,ChromaticAberrationPostProcess:()=>ZA,CircleEase:()=>zi,CircleOfConfusionPostProcess:()=>$A,ClampBlock:()=>Ky,ClearCoatBlock:()=>Fv,ClipPlanesBlock:()=>Hy,ClipboardEventTypes:()=>jf,ClipboardInfo:()=>Wf,CloudBlock:()=>Xv,CloudPoint:()=>qE,Collider:()=>Wl,Color3:()=>B,Color3Gradient:()=>DE,Color4:()=>U,ColorCorrectionPostProcess:()=>JA,ColorCurves:()=>Nn,ColorGradient:()=>ME,ColorGradingTexture:()=>Rg,ColorMergerBlock:()=>ev,ColorSplitterBlock:()=>Ka,ColorWrite:()=>yp,CombineAction:()=>se,CompareFunction:()=>ap,CompatibilityOptions:()=>Ir,CompilationMessageType:()=>dp,CompleteGreasedLineColorTable:()=>uT,CompleteGreasedLineWidthTable:()=>lT,ComputeBindingType:()=>Yl,ComputeEffect:()=>ql,ComputeNormalsBlock:()=>XT,ComputePassTimestampLocation:()=>Sp,ComputeShader:()=>Ql,ComputeShaderParticleSystem:()=>OE,Condition:()=>K,ConditionBlock:()=>VT,ConditionBlockTests:()=>BT,ConditionalBlock:()=>Wv,ConditionalBlockConditions:()=>Hv,ConeParticleEmitter:()=>ka,Constants:()=>a,ContainerAssetTask:()=>bS,ConversionMode:()=>nS,ConvolutionPostProcess:()=>ex,Coordinate:()=>Pi,CopyTextureToTexture:()=>oS,CopyTools:()=>To,CreateBox:()=>mu,CreateBoxVertexData:()=>pu,CreateCapsule:()=>Tu,CreateCapsuleVertexData:()=>bu,CreateCylinder:()=>tu,CreateCylinderVertexData:()=>eu,CreateDashedLines:()=>Xu,CreateDashedLinesVertexData:()=>Hu,CreateDecal:()=>bh,CreateDisc:()=>Pu,CreateDiscVertexData:()=>Cu,CreateEnvTextureAsync:()=>yd,CreateGeodesic:()=>Ch,CreateGoldberg:()=>Rh,CreateGoldbergVertexData:()=>Ih,CreateGreasedLine:()=>cT,CreateGreasedLineMaterial:()=>sT,CreateGround:()=>Dl,CreateGroundFromHeightMap:()=>Ll,CreateGroundFromHeightMapVertexData:()=>Ml,CreateGroundVertexData:()=>Ol,CreateHemisphere:()=>nm,CreateIcoSphere:()=>ps,CreateIcoSphereVertexData:()=>ds,CreateImageDataArrayBufferViews:()=>bd,CreateLathe:()=>ah,CreateLineSystem:()=>ju,CreateLineSystemVertexData:()=>Gu,CreateLines:()=>Wu,CreatePlane:()=>Bo,CreatePlaneVertexData:()=>Fo,CreatePolygon:()=>Ju,CreatePolygonVertexData:()=>$u,CreatePolyhedron:()=>hh,CreatePolyhedronVertexData:()=>uh,CreateResizedCopy:()=>id,CreateRibbon:()=>xu,CreateRibbonVertexData:()=>Au,CreateScreenshot:()=>JS,CreateScreenshotAsync:()=>eC,CreateScreenshotUsingRenderTarget:()=>nC,CreateScreenshotUsingRenderTargetAsync:()=>iC,CreateScreenshotWithResizeAsync:()=>tC,CreateSegmentedBoxVertexData:()=>fu,CreateSphere:()=>yu,CreateSphereVertexData:()=>gu,CreateText:()=>Dh,CreateTextShapePaths:()=>Mh,CreateTiledBox:()=>Du,CreateTiledBoxVertexData:()=>Mu,CreateTiledGround:()=>Nl,CreateTiledGroundVertexData:()=>wl,CreateTiledPlane:()=>Ou,CreateTiledPlaneVertexData:()=>Ru,CreateTorus:()=>Ul,CreateTorusKnot:()=>Fu,CreateTorusKnotVertexData:()=>Lu,CreateTorusVertexData:()=>Bl,CreateTube:()=>ch,CrossBlock:()=>Qy,CubeMapToSphericalPolynomialTools:()=>dd,CubeTexture:()=>lm,CubeTextureAssetTask:()=>PS,CubicEase:()=>ji,CullMode:()=>gp,CurrentScreenBlock:()=>Ca,Curve3:()=>ki,CurveBlock:()=>nb,CurveBlockTypes:()=>eb,CustomBlock:()=>Zy,CustomOptimization:()=>zS,CustomParticleEmitter:()=>Xa,CustomProceduralTexture:()=>hy,CylinderBlock:()=>CT,CylinderBuilder:()=>nu,CylinderDirectedParticleEmitter:()=>za,CylinderParticleEmitter:()=>Va,DDSTools:()=>zm,DataBuffer:()=>Qt,DataReader:()=>cC,DataStorage:()=>lC,Database:()=>PE,Debug:()=>gO,DebugBlock:()=>pE,DebugLayer:()=>du,DebugLayerTab:()=>su,DecalBuilder:()=>Th,DecalMapConfiguration:()=>ub,DecalMapDefines:()=>lb,Decode:()=>_t,DecodeBase64ToBinary:()=>vt,DecodeBase64ToString:()=>yt,DecodeBase64UrlToBinary:()=>bn,DecodeBase64UrlToString:()=>En,DeepCopier:()=>he,DefaultCollisionCoordinator:()=>Xl,DefaultKTX2DecoderOptions:()=>Zm,DefaultLoadingScreen:()=>eg,DefaultRenderingPipeline:()=>Tx,Deferred:()=>wS,DepthCullingState:()=>Gt,DepthOfFieldBlurPostProcess:()=>tx,DepthOfFieldEffect:()=>rx,DepthOfFieldEffectBlurLevel:()=>nx,DepthOfFieldMergePostProcess:()=>ix,DepthPeelingRenderer:()=>Vx,DepthPeelingSceneComponent:()=>zx,DepthReducer:()=>W_,DepthRenderer:()=>H_,DepthRendererSceneComponent:()=>Ux,DepthSortedParticle:()=>WE,DerivativeBlock:()=>Py,DesaturateBlock:()=>Mv,DetailMapConfiguration:()=>dl,DeviceInputEventType:()=>jn,DeviceLostReason:()=>wp,DeviceOrientationCamera:()=>hc,DeviceSource:()=>fi,DeviceSourceManager:()=>_i,DeviceType:()=>Bn,DirectionalLight:()=>tm,DirectionalLightFrustumViewer:()=>Uh,DiscBlock:()=>IT,DiscBuilder:()=>Iu,DiscardBlock:()=>Sy,DisplayPassPostProcess:()=>ox,DistanceBlock:()=>hv,DistanceConstraint:()=>vA,DistanceJoint:()=>Qo,DivideBlock:()=>iv,DoNothingAction:()=>ae,DomManagement:()=>st,DotBlock:()=>$y,DracoCompression:()=>wb,DrawWrapper:()=>en,DualSenseInput:()=>zn,DualShockButton:()=>vc,DualShockDpad:()=>bc,DualShockInput:()=>Vn,DualShockPad:()=>Ec,DumpTools:()=>is,DynamicFloat32Array:()=>yC,DynamicTexture:()=>yl,EasingFunction:()=>Vi,EdgesRenderer:()=>Hx,Effect:()=>zt,EffectFallbacks:()=>Oa,EffectLayer:()=>M_,EffectLayerSceneComponent:()=>D_,EffectRenderer:()=>Za,EffectWrapper:()=>$a,ElasticEase:()=>Wi,ElbowBlock:()=>qv,EncodeArrayBufferToBase64:()=>gt,EndsWith:()=>ft,Engine:()=>Dr,EngineFactory:()=>Hf,EngineFormat:()=>Xm,EngineInstrumentation:()=>O_,EngineStore:()=>A,EngineView:()=>jh,EnvironmentHelper:()=>dm,EnvironmentTextureTools:()=>Cd,Epsilon:()=>m,EquiRectangularCubeTexture:()=>Og,EquiRectangularCubeTextureAssetTask:()=>RS,ErrorCodes:()=>dt,ErrorFilter:()=>Mp,EventConstants:()=>li,EventState:()=>c,ExecuteCodeAction:()=>ce,ExponentialEase:()=>Xi,ExternalTexture:()=>df,ExtractHighlightsPostProcess:()=>qA,ExtrudePolygon:()=>eh,ExtrudeShape:()=>nh,ExtrudeShapeCustom:()=>ih,FactorGradient:()=>NE,FadeInOutBehavior:()=>Do,FeatureName:()=>qd,FileTools:()=>Tn,FileToolsOptions:()=>un,FilesInput:()=>DS,FilesInputStore:()=>lt,FilterMode:()=>rp,FilterPostProcess:()=>ax,FlowGraph:()=>qP,FlowGraphAbsBlock:()=>mR,FlowGraphAcosBlock:()=>jR,FlowGraphAcoshBlock:()=>ZR,FlowGraphAddBlock:()=>rR,FlowGraphAsinBlock:()=>HR,FlowGraphAsinhBlock:()=>QR,FlowGraphAtan2Block:()=>XR,FlowGraphAtanBlock:()=>WR,FlowGraphAtanhBlock:()=>$R,FlowGraphBitwiseAndBlock:()=>kI,FlowGraphBitwiseLeftShiftBlock:()=>HI,FlowGraphBitwiseNotBlock:()=>GI,FlowGraphBitwiseOrBlock:()=>VI,FlowGraphBitwiseRightShiftBlock:()=>jI,FlowGraphBitwiseXorBlock:()=>zI,FlowGraphBlock:()=>kP,FlowGraphBranchBlock:()=>rI,FlowGraphCeilBlock:()=>vR,FlowGraphClampBlock:()=>IR,FlowGraphConditionalDataBlock:()=>bI,FlowGraphConnection:()=>yP,FlowGraphConnectionType:()=>mP,FlowGraphConsoleLogBlock:()=>JP,FlowGraphConstantBlock:()=>AI,FlowGraphContext:()=>jP,FlowGraphContextLogger:()=>ZP,FlowGraphCoordinateTransformBlock:()=>EI,FlowGraphCoordinator:()=>QP,FlowGraphCosBlock:()=>zR,FlowGraphCoshBlock:()=>qR,FlowGraphCountLeadingZerosBlock:()=>WI,FlowGraphCountTrailingZerosBlock:()=>XI,FlowGraphCounterBlock:()=>dI,FlowGraphCrossBlock:()=>cO,FlowGraphCubeRootBlock:()=>rO,FlowGraphDataConnection:()=>MP,FlowGraphDebounceBlock:()=>fI,FlowGraphDegToRadBlock:()=>UR,FlowGraphDivideBlock:()=>sR,FlowGraphDoNBlock:()=>oI,FlowGraphDotBlock:()=>lR,FlowGraphEBlock:()=>uR,FlowGraphEqBlock:()=>wR,FlowGraphEventBlock:()=>HP,FlowGraphExecutionBlock:()=>zP,FlowGraphExpBlock:()=>JR,FlowGraphFlipFlopBlock:()=>mI,FlowGraphFloorBlock:()=>yR,FlowGraphForLoopBlock:()=>aI,FlowGraphFractBlock:()=>bR,FlowGraphGetPropertyBlock:()=>xI,FlowGraphGetVariableBlock:()=>TI,FlowGraphGreaterThanBlock:()=>NR,FlowGraphGreaterThanOrEqualBlock:()=>LR,FlowGraphInfBlock:()=>dR,FlowGraphInterpolateBlock:()=>OR,FlowGraphIsInfBlock:()=>BR,FlowGraphIsNanBlock:()=>FR,FlowGraphLengthBlock:()=>aO,FlowGraphLessThanBlock:()=>MR,FlowGraphLessThanOrEqualBlock:()=>DR,FlowGraphLog10Block:()=>nO,FlowGraphLog2Block:()=>tO,FlowGraphLogBlock:()=>eO,FlowGraphLogicAndBlock:()=>ZI,FlowGraphLogicNotBlock:()=>JI,FlowGraphLogicOrBlock:()=>$I,FlowGraphMaxBlock:()=>SR,FlowGraphMeshPickEventBlock:()=>YP,FlowGraphMinBlock:()=>xR,FlowGraphMultiGateBlock:()=>lI,FlowGraphMultiplyBlock:()=>aR,FlowGraphNaNBlock:()=>pR,FlowGraphNegBlock:()=>TR,FlowGraphNormalizeBlock:()=>sO,FlowGraphPath:()=>NP,FlowGraphPauseAnimationBlock:()=>vI,FlowGraphPiBlock:()=>hR,FlowGraphPlayAnimationBlock:()=>gI,FlowGraphPowBlock:()=>oO,FlowGraphRadToDegBlock:()=>kR,FlowGraphRandomBlock:()=>cR,FlowGraphReceiveCustomEventBlock:()=>dO,FlowGraphRemainderBlock:()=>AR,FlowGraphRotate2DBlock:()=>lO,FlowGraphRotate3DBlock:()=>uO,FlowGraphSaturateBlock:()=>RR,FlowGraphSceneReadyEventBlock:()=>hO,FlowGraphSceneTickEventBlock:()=>pO,FlowGraphSendCustomEventBlock:()=>iI,FlowGraphSequenceBlock:()=>_I,FlowGraphSetPropertyBlock:()=>nI,FlowGraphSetVariableBlock:()=>eI,FlowGraphSignBlock:()=>_R,FlowGraphSignalConnection:()=>VP,FlowGraphSinBlock:()=>VR,FlowGraphSinhBlock:()=>YR,FlowGraphSqrtBlock:()=>iO,FlowGraphState:()=>XP,FlowGraphStopAnimationBlock:()=>yI,FlowGraphSubtractBlock:()=>oR,FlowGraphSwitchBlock:()=>uI,FlowGraphTanBlock:()=>GR,FlowGraphTanhBlock:()=>KR,FlowGraphThrottleBlock:()=>sI,FlowGraphTimerBlock:()=>cI,FlowGraphTruncBlock:()=>gR,FlowGraphWaitAllBlock:()=>hI,FlowGraphWhileLoopBlock:()=>pI,FluidRenderer:()=>lS,FluidRendererSceneComponent:()=>cS,FluidRenderingDebug:()=>Zx,FluidRenderingObject:()=>Jx,FluidRenderingObjectCustomParticles:()=>rS,FluidRenderingObjectParticleSystem:()=>eS,FluidRenderingTargetRenderer:()=>iS,FlyCamera:()=>pc,FlyCameraInputsManager:()=>dc,FlyCameraKeyboardInput:()=>Ws,FlyCameraMouseInput:()=>Xs,FogBlock:()=>Fy,FollowBehavior:()=>Wo,FollowCamera:()=>gc,FollowCameraInputsManager:()=>fc,FollowCameraKeyboardMoveInput:()=>Ys,FollowCameraMouseWheelInput:()=>qs,FollowCameraPointersInput:()=>Ks,FragCoordBlock:()=>Iy,FragDepthBlock:()=>Dy,FragmentOutputBlock:()=>ya,FramingBehavior:()=>Oo,FreeCamera:()=>cc,FreeCameraDeviceOrientationInput:()=>nc,FreeCameraGamepadInput:()=>rc,FreeCameraInputsManager:()=>tc,FreeCameraKeyboardMoveInput:()=>Qs,FreeCameraMouseInput:()=>$s,FreeCameraMouseWheelInput:()=>Js,FreeCameraTouchInput:()=>ec,FreeCameraVirtualJoystickInput:()=>ac,FresnelBlock:()=>cv,FresnelParameters:()=>xg,FromHalfFloat:()=>ad,FrontFace:()=>_p,FrontFacingBlock:()=>Cy,Frustum:()=>Ti,FxaaPostProcess:()=>sx,GPUParticleSystem:()=>kE,GUID:()=>Cn,Gamepad:()=>Bs,GamepadCamera:()=>Cc,GamepadManager:()=>Ac,GamepadSystemSceneComponent:()=>xc,GaussianSplatting:()=>uS,GenerateBase64StringFromPixelData:()=>yo,GenerateBase64StringFromTexture:()=>vo,GenerateBase64StringFromTextureAsync:()=>bo,GenericPad:()=>Us,GeodesicData:()=>Sh,Geometry:()=>Rr,GeometryBufferRenderer:()=>dx,GeometryBufferRendererSceneComponent:()=>fx,GeometryCollectionBlock:()=>jT,GeometryElbowBlock:()=>WT,GeometryInfoBlock:()=>mE,GeometryInputBlock:()=>_T,GeometryOptimizeBlock:()=>vT,GeometryOutputBlock:()=>fT,GeometryTextureBlock:()=>bE,GeometryTextureFetchBlock:()=>TE,GeometryTransformBlock:()=>$T,GeometryTrigonometryBlock:()=>ZT,GeometryTrigonometryBlockOperations:()=>KT,GetClass:()=>T,GetDOMTextContent:()=>ot,GetEnvInfo:()=>_d,GetEnvironmentBRDFTexture:()=>_m,GetInternalFormatFromBasisFormat:()=>$g,GetTGAHeader:()=>jg,GetTextureDataAsync:()=>cd,Gizmo:()=>cu,GizmoAnchorPoint:()=>iu,GizmoCoordinatesMode:()=>ru,GizmoManager:()=>Jf,GlowLayer:()=>N_,GoldbergMesh:()=>Ph,GradientBlock:()=>xv,GradientBlockColorStep:()=>Av,GradientHelper:()=>LE,GrainPostProcess:()=>cx,GreasedLineBaseMesh:()=>Jb,GreasedLineMaterialDefaults:()=>yb,GreasedLineMesh:()=>eT,GreasedLineMeshColorDistribution:()=>tT,GreasedLineMeshColorDistributionType:()=>ob,GreasedLineMeshColorMode:()=>rb,GreasedLineMeshMaterialType:()=>ib,GreasedLineMeshWidthDistribution:()=>nT,GreasedLinePluginMaterial:()=>Tb,GreasedLineRibbonAutoDirectionMode:()=>Zb,GreasedLineRibbonFacesMode:()=>Qb,GreasedLineRibbonMesh:()=>aT,GreasedLineRibbonPointsMode:()=>Kb,GreasedLineSimpleMaterial:()=>Ab,GreasedLineTools:()=>vb,GridBlock:()=>xT,GroundBuilder:()=>Fl,GroundMesh:()=>Rl,HDRCubeTexture:()=>rg,HDRCubeTextureAssetTask:()=>IS,HDRFiltering:()=>ig,HDRTools:()=>ng,HandConstraintBehavior:()=>Cs,HandConstraintOrientation:()=>vs,HandConstraintVisibility:()=>bs,HandConstraintZone:()=>ys,HandPart:()=>ms,HardwareScalingOptimization:()=>BS,HavokPlugin:()=>DA,HeightToNormalBlock:()=>My,HemisphereBuilder:()=>im,HemisphericLight:()=>ou,HemisphericParticleEmitter:()=>Ga,HighlightLayer:()=>F_,HighlightsPostProcess:()=>lx,Hinge2Joint:()=>Jo,HingeConstraint:()=>bA,HingeJoint:()=>$o,HtmlElementTexture:()=>wg,IFlowGraphCoordinatorConfiguration:()=>KP,IWebXRControllerPhysicsOptions:()=>DC,IcoSphereBlock:()=>ET,IcoSphereBuilder:()=>gs,ImageAssetTask:()=>SS,ImageProcessingBlock:()=>Ey,ImageProcessingConfiguration:()=>Fn,ImageProcessingConfigurationDefines:()=>Ln,ImageProcessingPostProcess:()=>ux,ImageSourceBlock:()=>Uy,IncrementValueAction:()=>ie,IndexFormat:()=>Ep,InputBlock:()=>Sa,InspectableType:()=>oC,InstancedLinesMesh:()=>zu,InstancedMesh:()=>io,InstancesBlock:()=>vy,InstantiateBlock:()=>lE,InstantiateLinearBlock:()=>uE,InstantiateOnFacesBlock:()=>aE,InstantiateOnVerticesBlock:()=>oE,InstantiateOnVolumeBlock:()=>sE,InstantiateRadialBlock:()=>hE,InstantiatedEntries:()=>ao,IntFloatConverterBlock:()=>dE,InternalTexture:()=>Xt,InternalTextureSource:()=>wt,InterpolateValueAction:()=>et,IntersectionInfo:()=>pr,IsBase64DataUrl:()=>yn,IsDocumentAvailable:()=>rt,IsFileURL:()=>gn,IsNavigatorAvailable:()=>it,IsWindowObjectExist:()=>nt,JoystickAxis:()=>ic,KeepAssets:()=>oo,KeyboardEventTypes:()=>oi,KeyboardInfo:()=>ai,KeyboardInfoPre:()=>si,KhronosTextureContainer:()=>Ym,KhronosTextureContainer2:()=>$m,LatheBuilder:()=>sh,Layer:()=>U_,LayerSceneComponent:()=>B_,LengthBlock:()=>dv,LensFlare:()=>k_,LensFlareSystem:()=>V_,LensFlareSystemSceneComponent:()=>z_,LensFlaresOptimization:()=>VS,LensRenderingPipeline:()=>Ex,LerpBlock:()=>nv,Light:()=>ro,LightBlock:()=>By,LightGizmo:()=>om,LightInformationBlock:()=>Ty,LineEdgesRenderer:()=>jx,LinesBuilder:()=>Yu,LinesMesh:()=>Vu,LoadFile:()=>mn,LoadFileError:()=>sn,LoadImage:()=>pn,LoadOp:()=>Pp,LoadTextureFromTranscodeResult:()=>ry,LockConstraint:()=>EA,Logger:()=>J,MapMode:()=>Zd,MapRangeBlock:()=>UT,MappingBlock:()=>_E,MappingTypes:()=>fE,Material:()=>qr,MaterialAnisotropicDefines:()=>xm,MaterialClearCoatDefines:()=>bm,MaterialDefines:()=>Dn,MaterialDetailMapDefines:()=>hl,MaterialFlags:()=>tl,MaterialGreasedLineDefines:()=>bb,MaterialHelper:()=>Xr,MaterialIridescenceDefines:()=>Em,MaterialPluginBase:()=>ul,MaterialPluginEvent:()=>Wr,MaterialPluginManager:()=>il,MaterialSheenDefines:()=>Cm,MaterialSubSurfaceDefines:()=>Im,MathBlock:()=>FT,MathBlockOperations:()=>NT,Matrix:()=>R,MatrixBuilderBlock:()=>jv,MatrixComposeBlock:()=>gE,MatrixDeterminantBlock:()=>Zv,MatrixTransposeBlock:()=>Jv,MaxBlock:()=>lv,MergeGeometryBlock:()=>HT,MergeMeshesOptimization:()=>jS,Mesh:()=>no,MeshAssetTask:()=>TS,MeshAttributeExistsBlock:()=>tb,MeshAttributeExistsBlockTypes:()=>$v,MeshBlock:()=>TT,MeshBuilder:()=>Nh,MeshDebugMode:()=>Eb,MeshDebugPluginMaterial:()=>Cb,MeshExploder:()=>MS,MeshLODLevel:()=>Qr,MeshParticleEmitter:()=>Ya,MeshUVSpaceRenderer:()=>kb,MeshoptCompression:()=>Mb,MinBlock:()=>uv,MinMaxReducer:()=>j_,MipmapFilterMode:()=>op,MirrorTexture:()=>cm,ModBlock:()=>Gv,ModelShape:()=>jE,MorphTarget:()=>og,MorphTargetManager:()=>sg,MorphTargetsBlock:()=>by,MotionBlurPostProcess:()=>mx,MotorEnabledJoint:()=>Zo,MultiMaterial:()=>Kr,MultiObserver:()=>NS,MultiPointerScaleBehavior:()=>zo,MultiRenderTarget:()=>cy,MultiplyBlock:()=>Ba,NLerpBlock:()=>Sv,NativeDataStream:()=>Qh,NativeEngine:()=>Xd,NativePointerInput:()=>kn,NativeXRFrame:()=>gP,NativeXRLayerRenderTargetTextureProvider:()=>Cl,NativeXRLayerWrapper:()=>Sl,NativeXRRenderTarget:()=>Pl,NegateBlock:()=>pv,Node:()=>He,NodeGeometry:()=>yT,NodeGeometryBlock:()=>pT,NodeGeometryBlockConnectionPointTypes:()=>iT,NodeGeometryBuildState:()=>mT,NodeGeometryConnectionPoint:()=>dT,NodeGeometryConnectionPointCompatibilityStates:()=>rT,NodeGeometryConnectionPointDirection:()=>oT,NodeGeometryContextualSources:()=>hT,NodeMaterial:()=>hs,NodeMaterialBlock:()=>ha,NodeMaterialBlockConnectionPointMode:()=>_a,NodeMaterialBlockConnectionPointTypes:()=>na,NodeMaterialBlockTargets:()=>ia,NodeMaterialConnectionPoint:()=>ua,NodeMaterialConnectionPointCompatibilityStates:()=>aa,NodeMaterialConnectionPointCustomObject:()=>gy,NodeMaterialConnectionPointDirection:()=>sa,NodeMaterialDefines:()=>us,NodeMaterialModes:()=>Fa,NodeMaterialOptimizer:()=>ab,NodeMaterialSystemValues:()=>ga,NodeMaterialTeleportInBlock:()=>Wy,NodeMaterialTeleportOutBlock:()=>Xy,NoiseBlock:()=>GT,NoiseProceduralTexture:()=>dy,NormalBlendBlock:()=>Iv,NormalizeBlock:()=>Jy,NormalizeVectorBlock:()=>qT,NullBlock:()=>RT,NullEngine:()=>Vh,NullEngineOptions:()=>kh,Observable:()=>u,Observer:()=>l,OcclusionMaterial:()=>Sg,Octree:()=>$l,OctreeBlock:()=>Zl,OctreeSceneComponent:()=>Jl,OimoJSPlugin:()=>hg,OnAfterEnteringVRObservableEvent:()=>Gl,OneMinusBlock:()=>av,Orientation:()=>wi,OutlineRenderer:()=>$x,PBRAnisotropicConfiguration:()=>Sm,PBRBaseMaterial:()=>Mm,PBRBaseSimpleMaterial:()=>Cg,PBRClearCoatConfiguration:()=>Tm,PBRIridescenceConfiguration:()=>Am,PBRMaterial:()=>Dm,PBRMaterialDefines:()=>wm,PBRMetallicRoughnessBlock:()=>zv,PBRMetallicRoughnessMaterial:()=>Pg,PBRSheenConfiguration:()=>Pm,PBRSpecularGlossinessMaterial:()=>Ig,PBRSubSurfaceConfiguration:()=>Rm,PHI:()=>f,PadNumber:()=>bt,PanoramaToCubeMapTools:()=>tg,Particle:()=>FE,ParticleBlendMultiplyBlock:()=>Ra,ParticleHelper:()=>zE,ParticleRampGradientBlock:()=>Ia,ParticleSystem:()=>UE,ParticleSystemSet:()=>VE,ParticleTextureBlock:()=>Pa,ParticlesOptimization:()=>GS,PassCubePostProcess:()=>Ic,PassPostProcess:()=>Pc,Path2:()=>Bi,Path3D:()=>Ui,PathCursor:()=>nr,PerfCollectionStrategy:()=>SC,PerfCounter:()=>vi,PerformanceConfigurator:()=>E,PerformanceMonitor:()=>Or,PerformanceViewerCollector:()=>AC,PerturbNormalBlock:()=>xy,PhotoDome:()=>fm,Physics6DoFConstraint:()=>gA,Physics6DoFLimit:()=>_A,PhysicsAggregate:()=>SA,PhysicsBody:()=>oA,PhysicsConstraint:()=>mA,PhysicsConstraintAxis:()=>$E,PhysicsConstraintAxisLimitMode:()=>ZE,PhysicsConstraintMotorType:()=>tA,PhysicsConstraintType:()=>JE,PhysicsEngine:()=>lg,PhysicsEngineV2:()=>rA,PhysicsEventType:()=>nA,PhysicsHelper:()=>UA,PhysicsImpostor:()=>ta,PhysicsJoint:()=>Ko,PhysicsMaterialCombineMode:()=>aA,PhysicsMotionType:()=>iA,PhysicsRadialExplosionEventOptions:()=>HA,PhysicsRadialImpulseFalloff:()=>LA,PhysicsRaycastResult:()=>cg,PhysicsShape:()=>sA,PhysicsShapeBox:()=>hA,PhysicsShapeCapsule:()=>lA,PhysicsShapeContainer:()=>fA,PhysicsShapeConvexHull:()=>dA,PhysicsShapeCylinder:()=>uA,PhysicsShapeMesh:()=>pA,PhysicsShapeSphere:()=>cA,PhysicsShapeType:()=>eA,PhysicsUpdraftEventOptions:()=>jA,PhysicsUpdraftMode:()=>FA,PhysicsViewer:()=>Lh,PhysicsVortexEventOptions:()=>WA,PickingInfo:()=>qn,PipelineErrorReason:()=>pp,PivotTools:()=>Lo,Plane:()=>bi,PlaneBlock:()=>bT,PlaneBuilder:()=>Uo,PlaneDragGizmo:()=>Qf,PlaneRotationGizmo:()=>qf,PlayAnimationAction:()=>re,PlaySoundAction:()=>pe,PointColor:()=>GE,PointLight:()=>J_,PointParticleEmitter:()=>Ha,PointerDragBehavior:()=>Vo,PointerEventTypes:()=>ti,PointerInfo:()=>ri,PointerInfoBase:()=>ni,PointerInfoPre:()=>ii,PointerInput:()=>Un,PointsCloudSystem:()=>QE,PointsGroup:()=>KE,Polar:()=>Pb,Polygon:()=>Qu,PolygonBuilder:()=>th,PolygonMeshBuilder:()=>Zu,PolyhedronBuilder:()=>dh,PolyhedronData:()=>xh,PositionGizmo:()=>Zf,PositionNormalTextureVertex:()=>Ta,PositionNormalVertex:()=>ba,PostProcess:()=>Da,PostProcessManager:()=>Kn,PostProcessRenderEffect:()=>YA,PostProcessRenderPipeline:()=>yx,PostProcessRenderPipelineManager:()=>vx,PostProcessRenderPipelineManagerSceneComponent:()=>bx,PostProcessesOptimization:()=>kS,PosterizeBlock:()=>Tv,PowBlock:()=>fv,PowerEase:()=>Yi,PowerPreference:()=>Yd,PrePassOutputBlock:()=>Ly,PrePassRenderer:()=>Xx,PrePassRendererSceneComponent:()=>Yx,PrePassTextureBlock:()=>jy,PrecisionDate:()=>ct,PredicateCondition:()=>Z,PressureObserverWrapper:()=>gC,PrimitiveTopology:()=>mp,PrismaticConstraint:()=>AA,ProceduralTexture:()=>ss,ProceduralTextureSceneComponent:()=>os,PropertyTypeForEdition:()=>pa,PushMaterial:()=>oa,QuadraticEase:()=>qi,QuadraticErrorSimplification:()=>qb,QuarticEase:()=>Ki,Quaternion:()=>I,QueryType:()=>Rp,QuinticEase:()=>Qi,RGBDTextureTools:()=>ud,Ragdoll:()=>PA,RagdollBoneProperties:()=>CA,RandomBlock:()=>zT,RandomBlockLocks:()=>kT,RandomGUID:()=>Sn,RandomNumberBlock:()=>mv,RawCubeTexture:()=>py,RawTexture:()=>Co,RawTexture2DArray:()=>ag,RawTexture3D:()=>fy,Ray:()=>No,RayHelper:()=>Fh,ReadFile:()=>fn,ReadFileError:()=>ln,RecastJSCrowd:()=>CE,RecastJSPlugin:()=>SE,ReciprocalBlock:()=>yv,ReflectBlock:()=>Ov,ReflectionBlock:()=>Lv,ReflectionProbe:()=>pg,ReflectionTextureBlock:()=>zy,Reflector:()=>_C,RefractBlock:()=>wv,RefractionBlock:()=>Uv,RefractionPostProcess:()=>_x,RefractionTexture:()=>my,RegisterClass:()=>b,RegisterMaterialPlugin:()=>sl,RegisterNativeTypeAsync:()=>Hd,RemapBlock:()=>La,RenderPassTimestampLocation:()=>Cp,RenderTargetTexture:()=>rs,RenderTargetWrapper:()=>wa,RenderTargetsOptimization:()=>HS,RenderingGroup:()=>Qn,RenderingGroupInfo:()=>Zn,RenderingManager:()=>$n,ReplaceColorBlock:()=>vv,RequestFile:()=>_n,RequestFileError:()=>cn,RetryStrategy:()=>ut,RibbonBuilder:()=>Su,RichType:()=>vP,RichTypeAny:()=>bP,RichTypeBoolean:()=>AP,RichTypeColor3:()=>IP,RichTypeColor4:()=>RP,RichTypeMatrix:()=>PP,RichTypeNumber:()=>EP,RichTypeQuaternion:()=>OP,RichTypeString:()=>TP,RichTypeVector2:()=>xP,RichTypeVector3:()=>SP,RichTypeVector4:()=>CP,RollingAverage:()=>wr,Rotate2dBlock:()=>Rv,RotationGizmo:()=>Kf,RotationXBlock:()=>JT,RotationYBlock:()=>eE,RotationZBlock:()=>tE,RuntimeAnimation:()=>tt,RuntimeError:()=>pt,SSAO2RenderingPipeline:()=>xx,SSAORenderingPipeline:()=>Sx,SSRRenderingPipeline:()=>Dx,SamplerBindingType:()=>lp,Scalar:()=>h,ScaleBlock:()=>qy,ScaleGizmo:()=>$f,ScalingBlock:()=>nE,Scene:()=>Ci,SceneComponentConstants:()=>Jn,SceneDepthBlock:()=>Gy,SceneInstrumentation:()=>w_,SceneLoader:()=>ra,SceneLoaderAnimationGroupLoadingMode:()=>ea,SceneLoaderFlags:()=>Pr,SceneOptimization:()=>LS,SceneOptimizer:()=>XS,SceneOptimizerOptions:()=>WS,ScenePerformancePriority:()=>ci,SceneRecorder:()=>uC,SceneSerializer:()=>QS,ScreenSizeBlock:()=>Ry,ScreenSpaceBlock:()=>Oy,ScreenSpaceCurvaturePostProcess:()=>Fx,ScreenSpaceReflectionPostProcess:()=>Px,ScreenshotTools:()=>aC,SerializationHelper:()=>ke,SetColorsBlock:()=>DT,SetCorsBehavior:()=>dn,SetMaterialIDBlock:()=>QT,SetNormalsBlock:()=>wT,SetParentAction:()=>le,SetPositionsBlock:()=>OT,SetStateAction:()=>te,SetTangentsBlock:()=>LT,SetUVsBlock:()=>MT,SetValueAction:()=>ne,ShaderCodeInliner:()=>Md,ShaderLanguage:()=>at,ShaderMaterial:()=>ku,ShaderStage:()=>sp,ShaderStore:()=>Vt,ShadowDepthWrapper:()=>cb,ShadowGenerator:()=>G_,ShadowGeneratorSceneComponent:()=>$_,ShadowLight:()=>em,ShadowMapBlock:()=>Ny,ShadowsOptimization:()=>US,ShapeBuilder:()=>oh,SharpenPostProcess:()=>gx,SheenBlock:()=>Dv,SimplexPerlin3DBlock:()=>Pv,SimplicationQueueSceneComponent:()=>$b,SimplificationQueue:()=>Hb,SimplificationSettings:()=>Gb,SimplificationType:()=>Vb,SineEase:()=>Zi,SixDofDragBehavior:()=>Ho,Size:()=>je,Skeleton:()=>Rs,SkeletonViewer:()=>Bh,SliderConstraint:()=>TA,SmartArray:()=>On,SmartArrayNoDuplicate:()=>wn,SmoothStepBlock:()=>gv,SolidParticle:()=>HE,SolidParticleSystem:()=>YE,SolidParticleVertex:()=>XE,Sound:()=>uo,SoundTrack:()=>ho,SourceTextureFormat:()=>jm,Space:()=>Si,SphereBlock:()=>AT,SphereBuilder:()=>vu,SphereDirectedParticleEmitter:()=>Wa,SphereParticleEmitter:()=>ja,Spherical:()=>Ib,SphericalHarmonics:()=>td,SphericalPolynomial:()=>nd,SpotLight:()=>rm,SpringConstraint:()=>xA,Sprite:()=>hS,SpriteManager:()=>fS,SpriteMap:()=>_S,SpritePackedManager:()=>gS,SpriteSceneComponent:()=>dS,Stage:()=>ei,StandardMaterial:()=>ml,StandardMaterialDefines:()=>fl,StandardRenderingPipeline:()=>Ix,StartsWith:()=>mt,StateCondition:()=>$,StencilOperation:()=>Tp,StencilState:()=>Ht,StencilStateComposer:()=>tn,StepBlock:()=>ov,StereoscopicArcRotateCamera:()=>Uc,StereoscopicFreeCamera:()=>kc,StereoscopicGamepadCamera:()=>Vc,StereoscopicInterlacePostProcess:()=>Fc,StereoscopicInterlacePostProcessI:()=>Lc,StereoscopicScreenUniversalCamera:()=>Gc,StereoscopicUniversalCamera:()=>zc,StickValues:()=>Fs,StopAnimationAction:()=>oe,StopSoundAction:()=>fe,StorageBuffer:()=>Os,StorageTextureAccess:()=>hp,StoreOp:()=>Ip,StringDictionary:()=>Mn,StringTools:()=>Tt,SubEmitter:()=>BE,SubEmitterType:()=>wE,SubMesh:()=>xr,SubSurfaceBlock:()=>kv,SubSurfaceSceneComponent:()=>Qx,SubtractBlock:()=>rv,SurfaceMagnetismBehavior:()=>jo,SwitchBooleanAction:()=>ee,SwitchInput:()=>Hn,TBNBlock:()=>Ay,TGATools:()=>Xg,Tags:()=>_e,TargetCamera:()=>sc,TargetedAnimation:()=>er,TeleportInBlock:()=>yE,TeleportOutBlock:()=>vE,TestBase64DataUrl:()=>vn,TextFileAssetTask:()=>AS,Texture:()=>Eo,TextureAspect:()=>tp,TextureAssetTask:()=>CS,TextureBlock:()=>ky,TextureDimension:()=>$d,TextureFormat:()=>np,TextureOptimization:()=>FS,TexturePacker:()=>uy,TexturePackerFrame:()=>ly,TextureSampleType:()=>up,TextureSampler:()=>Wt,TextureTools:()=>ld,TextureUsage:()=>Jd,TextureViewDimension:()=>ep,ThinEngine:()=>rn,ThinRenderTargetTexture:()=>_y,ThinTexture:()=>_o,TiledBoxBuilder:()=>Nu,TiledPlaneBuilder:()=>wu,TimerState:()=>g_,TmpColors:()=>k,TmpVectors:()=>w,ToGammaSpace:()=>d,ToHalfFloat:()=>od,ToLinearSpace:()=>p,TonemapPostProcess:()=>Nx,TonemappingOperator:()=>Ox,Tools:()=>Pn,TorusBlock:()=>ST,TorusBuilder:()=>kl,TorusKnotBuilder:()=>Bu,TouchCamera:()=>lc,TrailMesh:()=>zb,Trajectory:()=>hC,TrajectoryClassifier:()=>mC,TranscodeAsync:()=>ny,TranscodeTarget:()=>Wm,TransformBlock:()=>da,TransformNode:()=>Lr,TranslationBlock:()=>rE,TriPlanarBlock:()=>Kv,TrigonometryBlock:()=>cs,TrigonometryBlockOperations:()=>as,TubeBuilder:()=>lh,TwirlBlock:()=>wy,UniformBuffer:()=>Wn,UniversalCamera:()=>Sc,UnregisterAllMaterialPlugins:()=>ll,UnregisterMaterialPlugin:()=>cl,UploadContent:()=>Wg,UploadEnvLevelsAsync:()=>Td,UploadEnvSpherical:()=>xd,UploadLevelsAsync:()=>Ad,UtilityLayerRenderer:()=>au,VRCameraMetrics:()=>jc,VRDeviceOrientationArcRotateCamera:()=>Zc,VRDeviceOrientationFreeCamera:()=>$c,VRDeviceOrientationGamepadCamera:()=>Jc,VRDistortionCorrectionPostProcess:()=>Wc,VRExperienceHelper:()=>Hl,VRMultiviewToSingleviewPostProcess:()=>Kc,ValidatedNativeDataStream:()=>Dp,ValueCondition:()=>Q,Vector2:()=>S,Vector3:()=>C,Vector4:()=>P,VectorConverterBlock:()=>YT,VectorMergerBlock:()=>Na,VectorSplitterBlock:()=>tv,VertexAnimationBaker:()=>Po,VertexBuffer:()=>Yn,VertexData:()=>Cr,VertexDataMaterialInfo:()=>Sr,VertexFormat:()=>Ap,VertexOutputBlock:()=>fa,VertexStepMode:()=>xp,VideoDome:()=>R_,VideoRecorder:()=>ZS,VideoTexture:()=>I_,ViewDirectionBlock:()=>sv,Viewport:()=>hr,VirtualJoystick:()=>oc,VirtualJoysticksCamera:()=>Hc,VolumetricLightScatteringPostProcess:()=>Lx,VoronoiNoiseBlock:()=>Yv,WaveBlock:()=>Ev,WaveBlockKind:()=>bv,WebGL2ParticleSystem:()=>RE,WebGL2ShaderProcessor:()=>Kt,WebGLDataBuffer:()=>Zt,WebGLHardwareTexture:()=>Jt,WebGLPipelineContext:()=>$t,WebGPUCacheBindGroups:()=>_f,WebGPUCacheRenderPipeline:()=>sf,WebGPUCacheRenderPipelineTree:()=>lf,WebGPUCacheSampler:()=>nf,WebGPUDataBuffer:()=>Zp,WebGPUDrawContext:()=>ff,WebGPUEngine:()=>Ff,WebGPURenderTargetWrapper:()=>Gf,WebGPUTintWASM:()=>Of,WebRequest:()=>We,WebXRAbstractFeature:()=>qo,WebXRAbstractMotionController:()=>r_,WebXRAnchorSystem:()=>RC,WebXRBackgroundRemover:()=>MC,WebXRCamera:()=>t_,WebXRCompositionLayerWrapper:()=>QC,WebXRControllerComponent:()=>i_,WebXRControllerMovement:()=>GC,WebXRControllerPhysics:()=>NC,WebXRControllerPointerSelection:()=>m_,WebXRDefaultExperience:()=>S_,WebXRDefaultExperienceOptions:()=>x_,WebXRDepthSensing:()=>iP,WebXRDomOverlay:()=>zC,WebXREnterExitUI:()=>b_,WebXREnterExitUIButton:()=>y_,WebXREnterExitUIOptions:()=>v_,WebXRExperienceHelper:()=>n_,WebXREyeTracking:()=>jC,WebXRFeatureName:()=>Xo,WebXRFeaturePointSystem:()=>FC,WebXRFeaturesManager:()=>Yo,WebXRGenericHandController:()=>cP,WebXRGenericTriggerMotionController:()=>o_,WebXRHTCViveMotionController:()=>fP,WebXRHand:()=>As,WebXRHandJoint:()=>_s,WebXRHandTracking:()=>xs,WebXRHitTest:()=>LC,WebXRHitTestLegacy:()=>PC,WebXRImageTracking:()=>VC,WebXRInput:()=>f_,WebXRInputSource:()=>p_,WebXRLayers:()=>nP,WebXRLightEstimation:()=>HC,WebXRManagedOutputCanvas:()=>xl,WebXRManagedOutputCanvasOptions:()=>Al,WebXRMeshDetector:()=>kC,WebXRMicrosoftMixedRealityController:()=>uP,WebXRMotionControllerManager:()=>l_,WebXRMotionControllerTeleportation:()=>A_,WebXRNearControllerMode:()=>h_,WebXRNearInteraction:()=>__,WebXROculusTouchMotionController:()=>dP,WebXRPlaneDetector:()=>wC,WebXRProfiledMotionController:()=>s_,WebXRProjectionLayerWrapper:()=>$C,WebXRRawCameraAccess:()=>sP,WebXRSessionManager:()=>Il,WebXRSpaceWarp:()=>aP,WebXRSpaceWarpRenderTargetTextureProvider:()=>oP,WebXRState:()=>_l,WebXRTrackingState:()=>gl,WebXRWalkingLocomotion:()=>KC,WeightedSound:()=>fo,WorkerPool:()=>qm,WorleyNoise3DBlock:()=>Cv,XRSpaceWarpRenderTarget:()=>rP,Xbox360Button:()=>mc,Xbox360Dpad:()=>_c,Xbox360Pad:()=>Tc,XboxInput:()=>Gn,_BabylonLoaderRegistered:()=>fg,_BasisTextureLoader:()=>sy,_CreationDataStorage:()=>Zr,_DDSTextureLoader:()=>Gm,_ENVTextureLoader:()=>Hm,_HDRTextureLoader:()=>qg,_InstancesBatch:()=>Jr,_KTXTextureLoader:()=>e_,_MeshCollisionData:()=>Fr,_OcclusionDataStorage:()=>Gh,_PrimaryIsoTriangle:()=>Ah,_TGATextureLoader:()=>Yg,_TimeToken:()=>zh,_UpdateRGBDAsync:()=>Sd,_forceSceneHelpersToBundle:()=>C_,_forceTransformFeedbackToBundle:()=>Hh,_injectLTSFileTools:()=>An,_staticOffsetValueColor3:()=>Qe,_staticOffsetValueColor4:()=>Ze,_staticOffsetValueQuaternion:()=>Xe,_staticOffsetValueSize:()=>Ke,_staticOffsetValueVector2:()=>qe,_staticOffsetValueVector3:()=>Ye,addClipPlaneUniforms:()=>Vr,allocateAndCopyTypedBuffer:()=>Mr,bindClipPlane:()=>Hr,captureEquirectangularFromScene:()=>CC,className:()=>In,createDetailMapPlugin:()=>gb,createPBRAnisotropicPlugin:()=>hb,createPBRBRDFPlugin:()=>db,createPBRClearCoatPlugin:()=>pb,createPBRIridescencePlugin:()=>fb,createPBRSheenPlugin:()=>mb,createPBRSubSurfacePlugin:()=>_b,createYieldingScheduler:()=>or,editableInPropertyPage:()=>ma,expandToProperty:()=>xe,extractMinAndMax:()=>Ar,extractMinAndMaxIndexed:()=>Er,getRichTypeFromValue:()=>wP,inlineScheduler:()=>rr,makeAsyncFunction:()=>ur,makeSyncFunction:()=>lr,nativeOverride:()=>Ve,normalizeEnvInfo:()=>gd,prepareDefinesForClipPlanes:()=>Gr,prepareStringDefinesForClipPlanes:()=>zr,runCoroutine:()=>ar,runCoroutineAsync:()=>cr,runCoroutineSync:()=>sr,serialize:()=>Se,serializeAsCameraReference:()=>Be,serializeAsColor3:()=>Pe,serializeAsColor4:()=>De,serializeAsColorCurves:()=>Me,serializeAsFresnelParameters:()=>Ie,serializeAsImageProcessingConfiguration:()=>Ne,serializeAsMatrix:()=>Fe,serializeAsMeshReference:()=>we,serializeAsQuaternion:()=>Le,serializeAsTexture:()=>Ce,serializeAsVector2:()=>Re,serializeAsVector3:()=>Oe,setAndStartTimer:()=>T_,setStereoscopicAnaglyphRigMode:()=>Oc,setStereoscopicRigMode:()=>Bc,setVRRigMode:()=>Qc});var o=function(){function e(){this.rootNodes=[],this.cameras=[],this.lights=[],this.meshes=[],this.skeletons=[],this.particleSystems=[],this.animations=[],this.animationGroups=[],this.multiMaterials=[],this.materials=[],this.morphTargetManagers=[],this.geometries=[],this.transformNodes=[],this.actionManagers=[],this.textures=[],this._environmentTexture=null,this.postProcesses=[]}return e.AddParser=function(e,t){this._BabylonFileParsers[e]=t},e.GetParser=function(e){return this._BabylonFileParsers[e]?this._BabylonFileParsers[e]:null},e.AddIndividualParser=function(e,t){this._IndividualBabylonFileParsers[e]=t},e.GetIndividualParser=function(e){return this._IndividualBabylonFileParsers[e]?this._IndividualBabylonFileParsers[e]:null},e.Parse=function(e,t,n,i){for(var r in this._BabylonFileParsers)Object.prototype.hasOwnProperty.call(this._BabylonFileParsers,r)&&this._BabylonFileParsers[r](e,t,n,i)},Object.defineProperty(e.prototype,"environmentTexture",{get:function(){return this._environmentTexture},set:function(e){this._environmentTexture=e},enumerable:!1,configurable:!0}),e.prototype.getNodes=function(){var e=[];return e=(e=(e=(e=e.concat(this.meshes)).concat(this.lights)).concat(this.cameras)).concat(this.transformNodes),this.skeletons.forEach((function(t){return e=e.concat(t.bones)})),e},e._BabylonFileParsers={},e._IndividualBabylonFileParsers={},e}(),a=function(){function e(){}return e.ALPHA_DISABLE=0,e.ALPHA_ADD=1,e.ALPHA_COMBINE=2,e.ALPHA_SUBTRACT=3,e.ALPHA_MULTIPLY=4,e.ALPHA_MAXIMIZED=5,e.ALPHA_ONEONE=6,e.ALPHA_PREMULTIPLIED=7,e.ALPHA_PREMULTIPLIED_PORTERDUFF=8,e.ALPHA_INTERPOLATE=9,e.ALPHA_SCREENMODE=10,e.ALPHA_ONEONE_ONEONE=11,e.ALPHA_ALPHATOCOLOR=12,e.ALPHA_REVERSEONEMINUS=13,e.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,e.ALPHA_ONEONE_ONEZERO=15,e.ALPHA_EXCLUSION=16,e.ALPHA_LAYER_ACCUMULATE=17,e.ALPHA_EQUATION_ADD=0,e.ALPHA_EQUATION_SUBSTRACT=1,e.ALPHA_EQUATION_REVERSE_SUBTRACT=2,e.ALPHA_EQUATION_MAX=3,e.ALPHA_EQUATION_MIN=4,e.ALPHA_EQUATION_DARKEN=5,e.DELAYLOADSTATE_NONE=0,e.DELAYLOADSTATE_LOADED=1,e.DELAYLOADSTATE_LOADING=2,e.DELAYLOADSTATE_NOTLOADED=4,e.NEVER=512,e.ALWAYS=519,e.LESS=513,e.EQUAL=514,e.LEQUAL=515,e.GREATER=516,e.GEQUAL=518,e.NOTEQUAL=517,e.KEEP=7680,e.ZERO=0,e.REPLACE=7681,e.INCR=7682,e.DECR=7683,e.INVERT=5386,e.INCR_WRAP=34055,e.DECR_WRAP=34056,e.TEXTURE_CLAMP_ADDRESSMODE=0,e.TEXTURE_WRAP_ADDRESSMODE=1,e.TEXTURE_MIRROR_ADDRESSMODE=2,e.TEXTURE_CREATIONFLAG_STORAGE=1,e.TEXTUREFORMAT_ALPHA=0,e.TEXTUREFORMAT_LUMINANCE=1,e.TEXTUREFORMAT_LUMINANCE_ALPHA=2,e.TEXTUREFORMAT_RGB=4,e.TEXTUREFORMAT_RGBA=5,e.TEXTUREFORMAT_RED=6,e.TEXTUREFORMAT_R=6,e.TEXTUREFORMAT_RG=7,e.TEXTUREFORMAT_RED_INTEGER=8,e.TEXTUREFORMAT_R_INTEGER=8,e.TEXTUREFORMAT_RG_INTEGER=9,e.TEXTUREFORMAT_RGB_INTEGER=10,e.TEXTUREFORMAT_RGBA_INTEGER=11,e.TEXTUREFORMAT_BGRA=12,e.TEXTUREFORMAT_DEPTH24_STENCIL8=13,e.TEXTUREFORMAT_DEPTH32_FLOAT=14,e.TEXTUREFORMAT_DEPTH16=15,e.TEXTUREFORMAT_DEPTH24=16,e.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,e.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,e.TEXTUREFORMAT_STENCIL8=19,e.TEXTUREFORMAT_UNDEFINED=4294967295,e.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,e.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,e.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,e.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,e.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,e.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,e.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,e.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,e.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,e.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,e.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,e.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,e.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,e.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,e.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,e.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,e.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,e.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,e.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,e.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,e.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,e.TEXTURETYPE_UNSIGNED_BYTE=0,e.TEXTURETYPE_UNSIGNED_INT=0,e.TEXTURETYPE_FLOAT=1,e.TEXTURETYPE_HALF_FLOAT=2,e.TEXTURETYPE_BYTE=3,e.TEXTURETYPE_SHORT=4,e.TEXTURETYPE_UNSIGNED_SHORT=5,e.TEXTURETYPE_INT=6,e.TEXTURETYPE_UNSIGNED_INTEGER=7,e.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,e.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,e.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,e.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,e.TEXTURETYPE_UNSIGNED_INT_24_8=12,e.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,e.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,e.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,e.TEXTURETYPE_UNDEFINED=16,e.TEXTURE_2D=3553,e.TEXTURE_2D_ARRAY=35866,e.TEXTURE_CUBE_MAP=34067,e.TEXTURE_CUBE_MAP_ARRAY=3735928559,e.TEXTURE_3D=32879,e.TEXTURE_NEAREST_SAMPLINGMODE=1,e.TEXTURE_NEAREST_NEAREST=1,e.TEXTURE_BILINEAR_SAMPLINGMODE=2,e.TEXTURE_LINEAR_LINEAR=2,e.TEXTURE_TRILINEAR_SAMPLINGMODE=3,e.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,e.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,e.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,e.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,e.TEXTURE_NEAREST_LINEAR=7,e.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,e.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,e.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,e.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,e.TEXTURE_LINEAR_NEAREST=12,e.TEXTURE_EXPLICIT_MODE=0,e.TEXTURE_SPHERICAL_MODE=1,e.TEXTURE_PLANAR_MODE=2,e.TEXTURE_CUBIC_MODE=3,e.TEXTURE_PROJECTION_MODE=4,e.TEXTURE_SKYBOX_MODE=5,e.TEXTURE_INVCUBIC_MODE=6,e.TEXTURE_EQUIRECTANGULAR_MODE=7,e.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,e.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,e.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,e.TEXTURE_FILTERING_QUALITY_HIGH=64,e.TEXTURE_FILTERING_QUALITY_MEDIUM=16,e.TEXTURE_FILTERING_QUALITY_LOW=8,e.SCALEMODE_FLOOR=1,e.SCALEMODE_NEAREST=2,e.SCALEMODE_CEILING=3,e.MATERIAL_TextureDirtyFlag=1,e.MATERIAL_LightDirtyFlag=2,e.MATERIAL_FresnelDirtyFlag=4,e.MATERIAL_AttributesDirtyFlag=8,e.MATERIAL_MiscDirtyFlag=16,e.MATERIAL_PrePassDirtyFlag=32,e.MATERIAL_AllDirtyFlag=63,e.MATERIAL_TriangleFillMode=0,e.MATERIAL_WireFrameFillMode=1,e.MATERIAL_PointFillMode=2,e.MATERIAL_PointListDrawMode=3,e.MATERIAL_LineListDrawMode=4,e.MATERIAL_LineLoopDrawMode=5,e.MATERIAL_LineStripDrawMode=6,e.MATERIAL_TriangleStripDrawMode=7,e.MATERIAL_TriangleFanDrawMode=8,e.MATERIAL_ClockWiseSideOrientation=0,e.MATERIAL_CounterClockWiseSideOrientation=1,e.ACTION_NothingTrigger=0,e.ACTION_OnPickTrigger=1,e.ACTION_OnLeftPickTrigger=2,e.ACTION_OnRightPickTrigger=3,e.ACTION_OnCenterPickTrigger=4,e.ACTION_OnPickDownTrigger=5,e.ACTION_OnDoublePickTrigger=6,e.ACTION_OnPickUpTrigger=7,e.ACTION_OnPickOutTrigger=16,e.ACTION_OnLongPressTrigger=8,e.ACTION_OnPointerOverTrigger=9,e.ACTION_OnPointerOutTrigger=10,e.ACTION_OnEveryFrameTrigger=11,e.ACTION_OnIntersectionEnterTrigger=12,e.ACTION_OnIntersectionExitTrigger=13,e.ACTION_OnKeyDownTrigger=14,e.ACTION_OnKeyUpTrigger=15,e.PARTICLES_BILLBOARDMODE_Y=2,e.PARTICLES_BILLBOARDMODE_ALL=7,e.PARTICLES_BILLBOARDMODE_STRETCHED=8,e.PARTICLES_BILLBOARDMODE_STRETCHED_LOCAL=9,e.MESHES_CULLINGSTRATEGY_STANDARD=0,e.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,e.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,e.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,e.SCENELOADER_NO_LOGGING=0,e.SCENELOADER_MINIMAL_LOGGING=1,e.SCENELOADER_SUMMARY_LOGGING=2,e.SCENELOADER_DETAILED_LOGGING=3,e.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,e.PREPASS_POSITION_TEXTURE_TYPE=1,e.PREPASS_VELOCITY_TEXTURE_TYPE=2,e.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,e.PREPASS_COLOR_TEXTURE_TYPE=4,e.PREPASS_DEPTH_TEXTURE_TYPE=5,e.PREPASS_NORMAL_TEXTURE_TYPE=6,e.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,e.BUFFER_CREATIONFLAG_READ=1,e.BUFFER_CREATIONFLAG_WRITE=2,e.BUFFER_CREATIONFLAG_READWRITE=3,e.BUFFER_CREATIONFLAG_UNIFORM=4,e.BUFFER_CREATIONFLAG_VERTEX=8,e.BUFFER_CREATIONFLAG_INDEX=16,e.BUFFER_CREATIONFLAG_STORAGE=32,e.RENDERPASS_MAIN=0,e.INPUT_ALT_KEY=18,e.INPUT_CTRL_KEY=17,e.INPUT_META_KEY1=91,e.INPUT_META_KEY2=92,e.INPUT_META_KEY3=93,e.INPUT_SHIFT_KEY=16,e.SNAPSHOTRENDERING_STANDARD=0,e.SNAPSHOTRENDERING_FAST=1,e.PERSPECTIVE_CAMERA=0,e.ORTHOGRAPHIC_CAMERA=1,e.FOVMODE_VERTICAL_FIXED=0,e.FOVMODE_HORIZONTAL_FIXED=1,e.RIG_MODE_NONE=0,e.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,e.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,e.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,e.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,e.RIG_MODE_STEREOSCOPIC_INTERLACED=14,e.RIG_MODE_VR=20,e.RIG_MODE_CUSTOM=22,e.MAX_SUPPORTED_UV_SETS=6,e.GL_ALPHA_EQUATION_ADD=32774,e.GL_ALPHA_EQUATION_MIN=32775,e.GL_ALPHA_EQUATION_MAX=32776,e.GL_ALPHA_EQUATION_SUBTRACT=32778,e.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,e.GL_ALPHA_FUNCTION_SRC=768,e.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,e.GL_ALPHA_FUNCTION_SRC_ALPHA=770,e.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,e.GL_ALPHA_FUNCTION_DST_ALPHA=772,e.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,e.GL_ALPHA_FUNCTION_DST_COLOR=774,e.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,e.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,e.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,e.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,e.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,e.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,e.SnippetUrl="https://snippet.babylonjs.com",e}(),s=function(){function e(){this.hoverCursor="",this.actions=[],this.isRecursive=!1}return Object.defineProperty(e,"HasTriggers",{get:function(){for(var t in e.Triggers)if(Object.prototype.hasOwnProperty.call(e.Triggers,t))return!0;return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e,"HasPickTriggers",{get:function(){for(var t in e.Triggers)if(Object.prototype.hasOwnProperty.call(e.Triggers,t)){var n=parseInt(t);if(n>=a.ACTION_OnPickTrigger&&n<=a.ACTION_OnPickUpTrigger)return!0}return!1},enumerable:!1,configurable:!0}),e.HasSpecificTrigger=function(t){for(var n in e.Triggers)if(Object.prototype.hasOwnProperty.call(e.Triggers,n)&&parseInt(n)===t)return!0;return!1},e.Triggers={},e}(),c=function(){function e(e,t,n,i){void 0===t&&(t=!1),this.initialize(e,t,n,i)}return e.prototype.initialize=function(e,t,n,i){return void 0===t&&(t=!1),this.mask=e,this.skipNextObservers=t,this.target=n,this.currentTarget=i,this},e}(),l=function(){function e(e,t,n){void 0===n&&(n=null),this.callback=e,this.mask=t,this.scope=n,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1,this._remove=null}return e.prototype.remove=function(){this._remove&&this._remove()},e}(),u=function(){function e(e,t){void 0===t&&(t=!1),this.notifyIfTriggered=t,this._observers=new Array,this._numObserversMarkedAsDeleted=0,this._hasNotified=!1,this._eventState=new c(0),e&&(this._onObserverAdded=e)}return e.FromPromise=function(t,n){var i=new e;return t.then((function(e){i.notifyObservers(e)})).catch((function(e){if(!n)throw e;n.notifyObservers(e)})),i},Object.defineProperty(e.prototype,"observers",{get:function(){return this._observers},enumerable:!1,configurable:!0}),e.prototype.add=function(e,t,n,i,r){var o=this;if(void 0===t&&(t=-1),void 0===n&&(n=!1),void 0===i&&(i=null),void 0===r&&(r=!1),!e)return null;var a=new l(e,t,i);return a.unregisterOnNextCall=r,n?this._observers.unshift(a):this._observers.push(a),this._onObserverAdded&&this._onObserverAdded(a),this._hasNotified&&this.notifyIfTriggered&&void 0!==this._lastNotifiedValue&&this.notifyObserver(a,this._lastNotifiedValue),a._remove=function(){o.remove(a)},a},e.prototype.addOnce=function(e){return this.add(e,void 0,void 0,void 0,!0)},e.prototype.remove=function(e){return!!e&&(e._remove=null,-1!==this._observers.indexOf(e)&&(this._deferUnregister(e),!0))},e.prototype.removeCallback=function(e,t){for(var n=0;n0},e.prototype.clear=function(){for(;this._observers.length;){var e=this._observers.pop();e&&(e._remove=null)}this._onObserverAdded=null,this._numObserversMarkedAsDeleted=0,this.cleanLastNotifiedState()},e.prototype.cleanLastNotifiedState=function(){this._hasNotified=!1,this._lastNotifiedValue=void 0},e.prototype.clone=function(){var t=new e;return t._observers=this._observers.slice(0),t},e.prototype.hasSpecificMask=function(e){void 0===e&&(e=-1);for(var t=0,n=this._observers;t0?1:-1},e.Clamp=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),Math.min(n,Math.max(t,e))},e.Log2=function(e){return Math.log(e)*Math.LOG2E},e.ILog2=function(e){if(Math.log2)return Math.floor(Math.log2(e));if(e<0)return NaN;if(0===e)return-1/0;var t=0;if(e<1){for(;e<1;)t++,e*=2;t=-t}else if(e>1)for(;e>1;)t++,e=Math.floor(e/2);return t},e.Repeat=function(e,t){return e-Math.floor(e/t)*t},e.Normalize=function(e,t,n){return(e-t)/(n-t)},e.Denormalize=function(e,t,n){return e*(n-t)+t},e.DeltaAngle=function(t,n){var i=e.Repeat(n-t,360);return i>180&&(i-=360),i},e.PingPong=function(t,n){var i=e.Repeat(t,2*n);return n-Math.abs(i-n)},e.SmoothStep=function(t,n,i){var r=e.Clamp(i);return n*(r=-2*r*r*r+3*r*r)+t*(1-r)},e.MoveTowards=function(t,n,i){return Math.abs(n-t)<=i?n:t+e.Sign(n-t)*i},e.MoveTowardsAngle=function(t,n,i){var r=e.DeltaAngle(t,n),o=0;return-i180&&(r-=360),t+r*e.Clamp(i)},e.InverseLerp=function(t,n,i){return t!=n?e.Clamp((i-t)/(n-t)):0},e.Hermite=function(e,t,n,i,r){var o=r*r,a=r*o;return e*(2*a-3*o+1)+n*(-2*a+3*o)+t*(a-2*o+r)+i*(a-o)},e.Hermite1stDerivative=function(e,t,n,i,r){var o=r*r;return 6*(o-r)*e+(3*o-4*r+1)*t+6*(-o+r)*n+(3*o-2*r)*i},e.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},e.RangeToPercent=function(e,t,n){return(e-t)/(n-t)},e.PercentToRange=function(e,t,n){return(n-t)*e+t},e.NormalizeRadians=function(t){return t-e.TwoPi*Math.floor((t+Math.PI)/e.TwoPi)},e.HCF=function(t,n){var i=t%n;return 0===i?n:e.HCF(n,i)},e.TwoPi=2*Math.PI,e}(),d=1/2.2,p=2.2,f=(1+Math.sqrt(5))/2,m=.001,_=function(){function e(){}return e.BuildArray=function(e,t){for(var n=[],i=0;in.x?n.x:i)n.y?n.y:r)t.x?e.x:t.x,i=e.y>t.y?e.y:t.y;return new e.constructor(n,i)},e.Transform=function(t,n){var i=new t.constructor;return e.TransformToRef(t,n,i),i},e.TransformToRef=function(e,t,n){var i=t.m,r=e.x*i[0]+e.y*i[4]+i[12],o=e.x*i[1]+e.y*i[5]+i[13];return n.x=r,n.y=o,n},e.PointInTriangle=function(e,t,n,i){var r=.5*(-n.y*i.x+t.y*(-n.x+i.x)+t.x*(n.y-i.y)+n.x*i.y),o=r<0?-1:1,a=(t.y*i.x-t.x*i.y+(i.y-t.y)*e.x+(t.x-i.x)*e.y)*o,s=(t.x*n.y-t.y*n.x+(t.y-n.y)*e.x+(n.x-t.x)*e.y)*o;return a>0&&s>0&&a+s<2*r*o},e.Distance=function(t,n){return Math.sqrt(e.DistanceSquared(t,n))},e.DistanceSquared=function(e,t){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i},e.Center=function(t,n){var i=new t.constructor;return e.CenterToRef(t,n,i)},e.CenterToRef=function(e,t,n){return n.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2)},e.DistanceOfPointFromSegment=function(t,n,i){var r=e.DistanceSquared(n,i);if(0===r)return e.Distance(t,n);var o=i.subtract(n),a=Math.max(0,Math.min(1,e.Dot(t.subtract(n),o)/r)),s=n.add(o.multiplyByFloats(a,a));return e.Distance(t,s)},e._ZeroReadOnly=e.Zero(),e}(),C=function(){function e(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),this._isDirty=!0,this._x=e,this._y=t,this._z=n}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z,"}")},e.prototype.getClassName=function(){return"Vector3"},e.prototype.getHashCode=function(){var e=x(this._x);return 397*(e=397*e^x(this._y))^x(this._z)},e.prototype.asArray=function(){var e=[];return this.toArray(e,0),e},e.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,this},e.prototype.fromArray=function(t,n){return void 0===n&&(n=0),e.FromArrayToRef(t,n,this),this},e.prototype.toQuaternion=function(){return I.RotationYawPitchRoll(this._y,this._x,this._z)},e.prototype.addInPlace=function(e){return this.addInPlaceFromFloats(e._x,e._y,e._z)},e.prototype.addInPlaceFromFloats=function(e,t,n){return this._x+=e,this._y+=t,this._z+=n,this._isDirty=!0,this},e.prototype.add=function(e){return new this.constructor(this._x+e._x,this._y+e._y,this._z+e._z)},e.prototype.addToRef=function(e,t){return t.copyFromFloats(this._x+e._x,this._y+e._y,this._z+e._z)},e.prototype.subtractInPlace=function(e){return this._x-=e._x,this._y-=e._y,this._z-=e._z,this._isDirty=!0,this},e.prototype.subtract=function(e){return new this.constructor(this._x-e._x,this._y-e._y,this._z-e._z)},e.prototype.subtractToRef=function(e,t){return this.subtractFromFloatsToRef(e._x,e._y,e._z,t)},e.prototype.subtractFromFloats=function(e,t,n){return new this.constructor(this._x-e,this._y-t,this._z-n)},e.prototype.subtractFromFloatsToRef=function(e,t,n,i){return i.copyFromFloats(this._x-e,this._y-t,this._z-n)},e.prototype.negate=function(){return new this.constructor(-this._x,-this._y,-this._z)},e.prototype.negateInPlace=function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._isDirty=!0,this},e.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this._x,-1*this._y,-1*this._z)},e.prototype.scaleInPlace=function(e){return this._x*=e,this._y*=e,this._z*=e,this._isDirty=!0,this},e.prototype.scale=function(e){return new this.constructor(this._x*e,this._y*e,this._z*e)},e.prototype.scaleToRef=function(e,t){return t.copyFromFloats(this._x*e,this._y*e,this._z*e)},e.prototype.getNormalToRef=function(e){var t=this.length(),n=Math.acos(this.y/t),i=Math.atan2(this.z,this.x);n>Math.PI/2?n-=Math.PI/2:n+=Math.PI/2;var r=t*Math.sin(n)*Math.cos(i),o=t*Math.cos(n),a=t*Math.sin(n)*Math.sin(i);return e.set(r,o,a),e},e.prototype.applyRotationQuaternionToRef=function(e,t){var n=this._x,i=this._y,r=this._z,o=e._x,a=e._y,s=e._z,c=e._w,l=2*(a*r-s*i),u=2*(s*n-o*r),h=2*(o*i-a*n);return t._x=n+c*l+a*h-s*u,t._y=i+c*u+s*l-o*h,t._z=r+c*h+o*u-a*l,t._isDirty=!0,t},e.prototype.applyRotationQuaternionInPlace=function(e){return this.applyRotationQuaternionToRef(e,this)},e.prototype.applyRotationQuaternion=function(e){return this.applyRotationQuaternionToRef(e,new this.constructor)},e.prototype.scaleAndAddToRef=function(e,t){return t.addInPlaceFromFloats(this._x*e,this._y*e,this._z*e)},e.prototype.projectOnPlane=function(e,t){var n=new this.constructor;return this.projectOnPlaneToRef(e,t,n),n},e.prototype.projectOnPlaneToRef=function(t,n,i){var r=t.normal,o=t.d,a=O.Vector3[0];this.subtractToRef(n,a),a.normalize();var s=e.Dot(a,r);if(Math.abs(s)<1e-10)i.setAll(1/0);else{var c=-(e.Dot(n,r)+o)/s,l=a.scaleInPlace(c);n.addToRef(l,i)}return i},e.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z},e.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=m),e&&h.WithinEpsilon(this._x,e._x,t)&&h.WithinEpsilon(this._y,e._y,t)&&h.WithinEpsilon(this._z,e._z,t)},e.prototype.equalsToFloats=function(e,t,n){return this._x===e&&this._y===t&&this._z===n},e.prototype.multiplyInPlace=function(e){return this._x*=e._x,this._y*=e._y,this._z*=e._z,this._isDirty=!0,this},e.prototype.multiply=function(e){return this.multiplyByFloats(e._x,e._y,e._z)},e.prototype.multiplyToRef=function(e,t){return t.copyFromFloats(this._x*e._x,this._y*e._y,this._z*e._z)},e.prototype.multiplyByFloats=function(e,t,n){return new this.constructor(this._x*e,this._y*t,this._z*n)},e.prototype.divide=function(e){return new this.constructor(this._x/e._x,this._y/e._y,this._z/e._z)},e.prototype.divideToRef=function(e,t){return t.copyFromFloats(this._x/e._x,this._y/e._y,this._z/e._z)},e.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},e.prototype.minimizeInPlace=function(e){return this.minimizeInPlaceFromFloats(e._x,e._y,e._z)},e.prototype.maximizeInPlace=function(e){return this.maximizeInPlaceFromFloats(e._x,e._y,e._z)},e.prototype.minimizeInPlaceFromFloats=function(e,t,n){return ethis._x&&(this.x=e),t>this._y&&(this.y=t),n>this._z&&(this.z=n),this},e.prototype.isNonUniformWithinEpsilon=function(e){var t=Math.abs(this._x),n=Math.abs(this._y);if(!h.WithinEpsilon(t,n,e))return!0;var i=Math.abs(this._z);return!h.WithinEpsilon(t,i,e)||!h.WithinEpsilon(n,i,e)},Object.defineProperty(e.prototype,"isNonUniform",{get:function(){var e=Math.abs(this._x);return e!==Math.abs(this._y)||e!==Math.abs(this._z)},enumerable:!1,configurable:!0}),e.prototype.floor=function(){return new this.constructor(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))},e.prototype.fract=function(){return new this.constructor(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))},e.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)},e.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z},Object.defineProperty(e.prototype,"hasAZeroComponent",{get:function(){return this._x*this._y*this._z==0},enumerable:!1,configurable:!0}),e.prototype.normalize=function(){return this.normalizeFromLength(this.length())},e.prototype.reorderInPlace=function(e){if("xyz"===(e=e.toLowerCase()))return this;var t=O.Vector3[0].copyFrom(this);return this.x=t[e[0]],this.y=t[e[1]],this.z=t[e[2]],this},e.prototype.rotateByQuaternionToRef=function(t,n){return t.toRotationMatrix(O.Matrix[0]),e.TransformCoordinatesToRef(this,O.Matrix[0],n),n},e.prototype.rotateByQuaternionAroundPointToRef=function(e,t,n){return this.subtractToRef(t,O.Vector3[0]),O.Vector3[0].rotateByQuaternionToRef(e,O.Vector3[0]),t.addToRef(O.Vector3[0],n),n},e.prototype.cross=function(t){var n=new this.constructor;return e.CrossToRef(this,t,n)},e.prototype.normalizeFromLength=function(e){return 0===e||1===e?this:this.scaleInPlace(1/e)},e.prototype.normalizeToNew=function(){var e=new this.constructor(0,0,0);return this.normalizeToRef(e),e},e.prototype.normalizeToRef=function(e){var t=this.length();return 0===t||1===t?e.copyFromFloats(this._x,this._y,this._z):this.scaleToRef(1/t,e)},e.prototype.clone=function(){return new this.constructor(this._x,this._y,this._z)},e.prototype.copyFrom=function(e){return this.copyFromFloats(e._x,e._y,e._z)},e.prototype.copyFromFloats=function(e,t,n){return this._x=e,this._y=t,this._z=n,this._isDirty=!0,this},e.prototype.set=function(e,t,n){return this.copyFromFloats(e,t,n)},e.prototype.setAll=function(e){return this._x=this._y=this._z=e,this._isDirty=!0,this},e.GetClipFactor=function(t,n,i,r){var o=e.Dot(t,i);return(o-r)/(o-e.Dot(n,i))},e.GetAngleBetweenVectors=function(t,n,i){var r=t.normalizeToRef(O.Vector3[1]),o=n.normalizeToRef(O.Vector3[2]),a=e.Dot(r,o);a=h.Clamp(a,-1,1);var s=Math.acos(a),c=O.Vector3[3];return e.CrossToRef(r,o,c),e.Dot(c,i)>0?isNaN(s)?0:s:isNaN(s)?-Math.PI:-Math.acos(a)},e.GetAngleBetweenVectorsOnPlane=function(t,n,i){O.Vector3[0].copyFrom(t);var r=O.Vector3[0];O.Vector3[1].copyFrom(n);var o=O.Vector3[1];O.Vector3[2].copyFrom(i);var a=O.Vector3[2],s=O.Vector3[3],c=O.Vector3[4];r.normalize(),o.normalize(),a.normalize(),e.CrossToRef(a,r,s),e.CrossToRef(s,a,c);var l=Math.atan2(e.Dot(o,s),e.Dot(o,c));return h.NormalizeRadians(l)},e.PitchYawRollToMoveBetweenPointsToRef=function(e,t,n){var i=w.Vector3[0];return t.subtractToRef(e,i),n._y=Math.atan2(i.x,i.z)||0,n._x=Math.atan2(Math.sqrt(Math.pow(i.x,2)+Math.pow(i.z,2)),i.y)||0,n._z=0,n._isDirty=!0,n},e.PitchYawRollToMoveBetweenPoints=function(t,n){var i=e.Zero();return e.PitchYawRollToMoveBetweenPointsToRef(t,n,i)},e.SlerpToRef=function(t,n,i,r){i=h.Clamp(i,0,1);var o=O.Vector3[0],a=O.Vector3[1];o.copyFrom(t);var s=o.length();o.normalizeFromLength(s),a.copyFrom(n);var c=a.length();a.normalizeFromLength(c);var l,u,d=e.Dot(o,a);if(d<1-m){var p=Math.acos(d),f=1/Math.sin(p);l=Math.sin((1-i)*p)*f,u=Math.sin(i*p)*f}else l=1-i,u=i;return o.scaleInPlace(l),a.scaleInPlace(u),r.copyFrom(o).addInPlace(a),r.scaleInPlace(h.Lerp(s,c,i)),r},e.SmoothToRef=function(t,n,i,r,o){return e.SlerpToRef(t,n,0===r?1:i/r,o),o},e.FromArray=function(t,n){return void 0===n&&(n=0),new e(t[n],t[n+1],t[n+2])},e.FromFloatArray=function(t,n){return e.FromArray(t,n)},e.FromArrayToRef=function(e,t,n){return n._x=e[t],n._y=e[t+1],n._z=e[t+2],n._isDirty=!0,n},e.FromFloatArrayToRef=function(t,n,i){return e.FromArrayToRef(t,n,i)},e.FromFloatsToRef=function(e,t,n,i){return i.copyFromFloats(e,t,n),i},e.Zero=function(){return new e(0,0,0)},e.One=function(){return new e(1,1,1)},e.Up=function(){return new e(0,1,0)},Object.defineProperty(e,"UpReadOnly",{get:function(){return e._UpReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e,"DownReadOnly",{get:function(){return e._DownReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e,"RightReadOnly",{get:function(){return e._RightReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e,"LeftReadOnly",{get:function(){return e._LeftReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e,"LeftHandedForwardReadOnly",{get:function(){return e._LeftHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e,"RightHandedForwardReadOnly",{get:function(){return e._RightHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e,"LeftHandedBackwardReadOnly",{get:function(){return e._LeftHandedBackwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e,"RightHandedBackwardReadOnly",{get:function(){return e._RightHandedBackwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e,"ZeroReadOnly",{get:function(){return e._ZeroReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e,"OneReadOnly",{get:function(){return e._OneReadOnly},enumerable:!1,configurable:!0}),e.Down=function(){return new e(0,-1,0)},e.Forward=function(t){return void 0===t&&(t=!1),new e(0,0,t?-1:1)},e.Backward=function(t){return void 0===t&&(t=!1),new e(0,0,t?1:-1)},e.Right=function(){return new e(1,0,0)},e.Left=function(){return new e(-1,0,0)},e.Random=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=1),new e(h.RandomRange(t,n),h.RandomRange(t,n),h.RandomRange(t,n))},e.TransformCoordinates=function(t,n){var i=e.Zero();return e.TransformCoordinatesToRef(t,n,i),i},e.TransformCoordinatesToRef=function(t,n,i){return e.TransformCoordinatesFromFloatsToRef(t._x,t._y,t._z,n,i),i},e.TransformCoordinatesFromFloatsToRef=function(e,t,n,i,r){var o=i.m,a=e*o[0]+t*o[4]+n*o[8]+o[12],s=e*o[1]+t*o[5]+n*o[9]+o[13],c=e*o[2]+t*o[6]+n*o[10]+o[14],l=1/(e*o[3]+t*o[7]+n*o[11]+o[15]);return r._x=a*l,r._y=s*l,r._z=c*l,r._isDirty=!0,r},e.TransformNormal=function(t,n){var i=e.Zero();return e.TransformNormalToRef(t,n,i),i},e.TransformNormalToRef=function(e,t,n){return this.TransformNormalFromFloatsToRef(e._x,e._y,e._z,t,n),n},e.TransformNormalFromFloatsToRef=function(e,t,n,i,r){var o=i.m;return r._x=e*o[0]+t*o[4]+n*o[8],r._y=e*o[1]+t*o[5]+n*o[9],r._z=e*o[2]+t*o[6]+n*o[10],r._isDirty=!0,r},e.CatmullRom=function(e,t,n,i,r){var o=r*r,a=r*o,s=.5*(2*t._x+(-e._x+n._x)*r+(2*e._x-5*t._x+4*n._x-i._x)*o+(-e._x+3*t._x-3*n._x+i._x)*a),c=.5*(2*t._y+(-e._y+n._y)*r+(2*e._y-5*t._y+4*n._y-i._y)*o+(-e._y+3*t._y-3*n._y+i._y)*a),l=.5*(2*t._z+(-e._z+n._z)*r+(2*e._z-5*t._z+4*n._z-i._z)*o+(-e._z+3*t._z-3*n._z+i._z)*a);return new e.constructor(s,c,l)},e.Clamp=function(t,n,i){var r=new t.constructor;return e.ClampToRef(t,n,i,r),r},e.ClampToRef=function(e,t,n,i){var r=e._x;r=(r=r>n._x?n._x:r)n._y?n._y:o)n._z?n._z:a)0&&P<0?(M.copyFrom(a),I=n,R=i):P>0&&w<0?(M.copyFrom(c),I=i,R=r):(M.copyFrom(s).scaleInPlace(-1),I=r,R=n);var D=O.Vector3[9],N=O.Vector3[4];if(I.subtractToRef(b,x),R.subtractToRef(b,D),e.CrossToRef(x,D,N),!(e.Dot(N,l)<0))return o.copyFrom(b),Math.abs(g*y);var L=O.Vector3[5];e.CrossToRef(M,N,L),L.normalize();var F=O.Vector3[9];F.copyFrom(I).subtractInPlace(b);var B=F.length();if(Bthis.x&&(this.x=e.x),e.y>this.y&&(this.y=e.y),e.z>this.z&&(this.z=e.z),e.w>this.w&&(this.w=e.w),this},e.prototype.floor=function(){return new this.constructor(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},e.prototype.fract=function(){return new this.constructor(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},e.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},e.prototype.normalize=function(){return this.normalizeFromLength(this.length())},e.prototype.normalizeFromLength=function(e){return 0===e||1===e?this:this.scaleInPlace(1/e)},e.prototype.normalizeToNew=function(){var e=new this.constructor(0,0,0,0);return this.normalizeToRef(e),e},e.prototype.normalizeToRef=function(e){var t=this.length();return 0===t||1===t?e.copyFromFloats(this.x,this.y,this.z,this.w):this.scaleToRef(1/t,e)},e.prototype.toVector3=function(){return new C(this.x,this.y,this.z)},e.prototype.clone=function(){return new this.constructor(this.x,this.y,this.z,this.w)},e.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},e.prototype.copyFromFloats=function(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this},e.prototype.set=function(e,t,n,i){return this.copyFromFloats(e,t,n,i)},e.prototype.setAll=function(e){return this.x=this.y=this.z=this.w=e,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},e.FromArray=function(t,n){return n||(n=0),new e(t[n],t[n+1],t[n+2],t[n+3])},e.FromArrayToRef=function(e,t,n){return n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},e.FromFloatArrayToRef=function(t,n,i){return e.FromArrayToRef(t,n,i),i},e.FromFloatsToRef=function(e,t,n,i,r){return r.x=e,r.y=t,r.z=n,r.w=i,r},e.Zero=function(){return new e(0,0,0,0)},e.One=function(){return new e(1,1,1,1)},e.Random=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=1),new e(h.RandomRange(t,n),h.RandomRange(t,n),h.RandomRange(t,n),h.RandomRange(t,n))},Object.defineProperty(e,"ZeroReadOnly",{get:function(){return e._ZeroReadOnly},enumerable:!1,configurable:!0}),e.Normalize=function(t){var n=e.Zero();return e.NormalizeToRef(t,n),n},e.NormalizeToRef=function(e,t){return e.normalizeToRef(t),t},e.Minimize=function(e,t){var n=new e.constructor;return n.copyFrom(e),n.minimizeInPlace(t),n},e.Maximize=function(e,t){var n=new e.constructor;return n.copyFrom(e),n.maximizeInPlace(t),n},e.Distance=function(t,n){return Math.sqrt(e.DistanceSquared(t,n))},e.DistanceSquared=function(e,t){var n=e.x-t.x,i=e.y-t.y,r=e.z-t.z,o=e.w-t.w;return n*n+i*i+r*r+o*o},e.Center=function(t,n){return e.CenterToRef(t,n,e.Zero())},e.CenterToRef=function(e,t,n){return n.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2,(e.z+t.z)/2,(e.w+t.w)/2)},e.TransformCoordinates=function(t,n){var i=e.Zero();return e.TransformCoordinatesToRef(t,n,i),i},e.TransformCoordinatesToRef=function(t,n,i){return e.TransformCoordinatesFromFloatsToRef(t._x,t._y,t._z,n,i),i},e.TransformCoordinatesFromFloatsToRef=function(e,t,n,i,r){var o=i.m,a=e*o[0]+t*o[4]+n*o[8]+o[12],s=e*o[1]+t*o[5]+n*o[9]+o[13],c=e*o[2]+t*o[6]+n*o[10]+o[14],l=e*o[3]+t*o[7]+n*o[11]+o[15];return r.x=a,r.y=s,r.z=c,r.w=l,r},e.TransformNormal=function(t,n){var i=new t.constructor;return e.TransformNormalToRef(t,n,i),i},e.TransformNormalToRef=function(e,t,n){var i=t.m,r=e.x*i[0]+e.y*i[4]+e.z*i[8],o=e.x*i[1]+e.y*i[5]+e.z*i[9],a=e.x*i[2]+e.y*i[6]+e.z*i[10];return n.x=r,n.y=o,n.z=a,n.w=e.w,n},e.TransformNormalFromFloatsToRef=function(e,t,n,i,r,o){var a=r.m;return o.x=e*a[0]+t*a[4]+n*a[8],o.y=e*a[1]+t*a[5]+n*a[9],o.z=e*a[2]+t*a[6]+n*a[10],o.w=i,o},e.FromVector3=function(t,n){return void 0===n&&(n=0),new e(t._x,t._y,t._z,n)},e.Dot=function(e,t){return e.dot(t)},e._ZeroReadOnly=e.Zero(),e}(),I=function(){function e(e,t,n,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=1),this._isDirty=!0,this._x=e,this._y=t,this._z=n,this._w=i}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"w",{get:function(){return this._w},set:function(e){this._w=e,this._isDirty=!0},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z," W: ").concat(this._w,"}")},e.prototype.getClassName=function(){return"Quaternion"},e.prototype.getHashCode=function(){var e=x(this._x);return 397*(e=397*(e=397*e^x(this._y))^x(this._z))^x(this._w)},e.prototype.asArray=function(){return[this._x,this._y,this._z,this._w]},e.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,this},e.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z&&this._w===e._w},e.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=m),e&&h.WithinEpsilon(this._x,e._x,t)&&h.WithinEpsilon(this._y,e._y,t)&&h.WithinEpsilon(this._z,e._z,t)&&h.WithinEpsilon(this._w,e._w,t)},e.prototype.clone=function(){return new this.constructor(this._x,this._y,this._z,this._w)},e.prototype.copyFrom=function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._w=e._w,this._isDirty=!0,this},e.prototype.copyFromFloats=function(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._isDirty=!0,this},e.prototype.set=function(e,t,n,i){return this.copyFromFloats(e,t,n,i)},e.prototype.add=function(e){return new this.constructor(this._x+e._x,this._y+e._y,this._z+e._z,this._w+e._w)},e.prototype.addInPlace=function(e){return this._x+=e._x,this._y+=e._y,this._z+=e._z,this._w+=e._w,this._isDirty=!0,this},e.prototype.subtract=function(e){return new this.constructor(this._x-e._x,this._y-e._y,this._z-e._z,this._w-e._w)},e.prototype.subtractInPlace=function(e){return this._x-=e._x,this._y-=e._y,this._z-=e._z,this._w-=e._w,this._isDirty=!0,this},e.prototype.scale=function(e){return new this.constructor(this._x*e,this._y*e,this._z*e,this._w*e)},e.prototype.scaleToRef=function(e,t){return t._x=this._x*e,t._y=this._y*e,t._z=this._z*e,t._w=this._w*e,t._isDirty=!0,t},e.prototype.scaleInPlace=function(e){return this._x*=e,this._y*=e,this._z*=e,this._w*=e,this._isDirty=!0,this},e.prototype.scaleAndAddToRef=function(e,t){return t._x+=this._x*e,t._y+=this._y*e,t._z+=this._z*e,t._w+=this._w*e,t._isDirty=!0,t},e.prototype.multiply=function(e){var t=new this.constructor(0,0,0,1);return this.multiplyToRef(e,t),t},e.prototype.multiplyToRef=function(e,t){var n=this._x*e._w+this._y*e._z-this._z*e._y+this._w*e._x,i=-this._x*e._z+this._y*e._w+this._z*e._x+this._w*e._y,r=this._x*e._y-this._y*e._x+this._z*e._w+this._w*e._z,o=-this._x*e._x-this._y*e._y-this._z*e._z+this._w*e._w;return t.copyFromFloats(n,i,r,o),t},e.prototype.multiplyInPlace=function(e){return this.multiplyToRef(e,this),this},e.prototype.conjugateToRef=function(e){return e.copyFromFloats(-this._x,-this._y,-this._z,this._w),e},e.prototype.conjugateInPlace=function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._isDirty=!0,this},e.prototype.conjugate=function(){return new this.constructor(-this._x,-this._y,-this._z,this._w)},e.prototype.invert=function(){var e=this.conjugate(),t=this.lengthSquared();return 0==t||1==t||e.scaleInPlace(1/t),e},e.prototype.invertInPlace=function(){this.conjugateInPlace();var e=this.lengthSquared();return 0==e||1==e||this.scaleInPlace(1/e),this},e.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},e.prototype.length=function(){return Math.sqrt(this.lengthSquared())},e.prototype.normalize=function(){return this.normalizeFromLength(this.length())},e.prototype.normalizeFromLength=function(e){return 0===e||1===e?this:this.scaleInPlace(1/e)},e.prototype.normalizeToNew=function(){var e=new this.constructor(0,0,0,1);return this.normalizeToRef(e),e},e.prototype.normalizeToRef=function(e){var t=this.length();return 0===t||1===t?e.copyFromFloats(this._x,this._y,this._z,this._w):this.scaleToRef(1/t,e)},e.prototype.toEulerAngles=function(){var e=C.Zero();return this.toEulerAnglesToRef(e),e},e.prototype.toEulerAnglesToRef=function(e){var t=this._z,n=this._x,i=this._y,r=this._w,o=i*t-n*r,a=.4999999;if(o<-a)e._y=2*Math.atan2(i,r),e._x=Math.PI/2,e._z=0,e._isDirty=!0;else if(o>a)e._y=2*Math.atan2(i,r),e._x=-Math.PI/2,e._z=0,e._isDirty=!0;else{var s=r*r,c=t*t,l=n*n,u=i*i;e._z=Math.atan2(2*(n*i+t*r),-c-l+u+s),e._x=Math.asin(-2*o),e._y=Math.atan2(2*(t*n+i*r),c-l-u+s),e._isDirty=!0}return e},e.prototype.toRotationMatrix=function(e){return R.FromQuaternionToRef(this,e),e},e.prototype.fromRotationMatrix=function(t){return e.FromRotationMatrixToRef(t,this),this},e.prototype.dot=function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},e.FromRotationMatrix=function(t){var n=new e;return e.FromRotationMatrixToRef(t,n),n},e.FromRotationMatrixToRef=function(e,t){var n,i=e.m,r=i[0],o=i[4],a=i[8],s=i[1],c=i[5],l=i[9],u=i[2],h=i[6],d=i[10],p=r+c+d;return p>0?(n=.5/Math.sqrt(p+1),t._w=.25/n,t._x=(h-l)*n,t._y=(a-u)*n,t._z=(s-o)*n,t._isDirty=!0):r>c&&r>d?(n=2*Math.sqrt(1+r-c-d),t._w=(h-l)/n,t._x=.25*n,t._y=(o+s)/n,t._z=(a+u)/n,t._isDirty=!0):c>d?(n=2*Math.sqrt(1+c-r-d),t._w=(a-u)/n,t._x=(o+s)/n,t._y=.25*n,t._z=(l+h)/n,t._isDirty=!0):(n=2*Math.sqrt(1+d-r-c),t._w=(s-o)/n,t._x=(a+u)/n,t._y=(l+h)/n,t._z=.25*n,t._isDirty=!0),t},e.Dot=function(e,t){return e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w},e.AreClose=function(t,n,i){void 0===i&&(i=.1);var r=e.Dot(t,n);return 1-r*r<=i},e.SmoothToRef=function(t,n,i,r,o){var a=0===r?1:i/r;return a=h.Clamp(a,0,1),e.SlerpToRef(t,n,a,o),o},e.Zero=function(){return new e(0,0,0,0)},e.Inverse=function(e){return new e.constructor(-e._x,-e._y,-e._z,e._w)},e.InverseToRef=function(e,t){return t.set(-e._x,-e._y,-e._z,e._w),t},e.Identity=function(){return new e(0,0,0,1)},e.IsIdentity=function(e){return e&&0===e._x&&0===e._y&&0===e._z&&1===e._w},e.RotationAxis=function(t,n){return e.RotationAxisToRef(t,n,new e)},e.RotationAxisToRef=function(e,t,n){var i=Math.sin(t/2);return e.normalize(),n._w=Math.cos(t/2),n._x=e._x*i,n._y=e._y*i,n._z=e._z*i,n._isDirty=!0,n},e.FromArray=function(t,n){return n||(n=0),new e(t[n],t[n+1],t[n+2],t[n+3])},e.FromArrayToRef=function(e,t,n){return n._x=e[t],n._y=e[t+1],n._z=e[t+2],n._w=e[t+3],n._isDirty=!0,n},e.FromEulerAngles=function(t,n,i){var r=new e;return e.RotationYawPitchRollToRef(n,t,i,r),r},e.FromEulerAnglesToRef=function(t,n,i,r){return e.RotationYawPitchRollToRef(n,t,i,r),r},e.FromEulerVector=function(t){var n=new e;return e.RotationYawPitchRollToRef(t._y,t._x,t._z,n),n},e.FromEulerVectorToRef=function(t,n){return e.RotationYawPitchRollToRef(t._y,t._x,t._z,n),n},e.FromUnitVectorsToRef=function(e,t,n,i){void 0===i&&(i=m);var r=C.Dot(e,t)+1;return rMath.abs(e.z)?n.set(-e.y,e.x,0,0):n.set(0,-e.z,e.y,0):(C.CrossToRef(e,t,w.Vector3[0]),n.set(w.Vector3[0].x,w.Vector3[0].y,w.Vector3[0].z,r)),n.normalize()},e.RotationYawPitchRoll=function(t,n,i){var r=new e;return e.RotationYawPitchRollToRef(t,n,i,r),r},e.RotationYawPitchRollToRef=function(e,t,n,i){var r=.5*n,o=.5*t,a=.5*e,s=Math.sin(r),c=Math.cos(r),l=Math.sin(o),u=Math.cos(o),h=Math.sin(a),d=Math.cos(a);return i._x=d*l*c+h*u*s,i._y=h*u*c-d*l*s,i._z=d*u*s-h*l*c,i._w=d*u*c+h*l*s,i._isDirty=!0,i},e.RotationAlphaBetaGamma=function(t,n,i){var r=new e;return e.RotationAlphaBetaGammaToRef(t,n,i,r),r},e.RotationAlphaBetaGammaToRef=function(e,t,n,i){var r=.5*(n+e),o=.5*(n-e),a=.5*t;return i._x=Math.cos(o)*Math.sin(a),i._y=Math.sin(o)*Math.sin(a),i._z=Math.sin(r)*Math.cos(a),i._w=Math.cos(r)*Math.cos(a),i._isDirty=!0,i},e.RotationQuaternionFromAxis=function(t,n,i){var r=new e(0,0,0,0);return e.RotationQuaternionFromAxisToRef(t,n,i,r),r},e.RotationQuaternionFromAxisToRef=function(t,n,i,r){var o=O.Matrix[0];return R.FromXYZAxesToRef(t.normalize(),n.normalize(),i.normalize(),o),e.FromRotationMatrixToRef(o,r),r},e.FromLookDirectionLH=function(t,n){var i=new e;return e.FromLookDirectionLHToRef(t,n,i),i},e.FromLookDirectionLHToRef=function(t,n,i){var r=O.Matrix[0];return R.LookDirectionLHToRef(t,n,r),e.FromRotationMatrixToRef(r,i),i},e.FromLookDirectionRH=function(t,n){var i=new e;return e.FromLookDirectionRHToRef(t,n,i),i},e.FromLookDirectionRHToRef=function(t,n,i){var r=O.Matrix[0];return R.LookDirectionRHToRef(t,n,r),e.FromRotationMatrixToRef(r,i)},e.Slerp=function(t,n,i){var r=e.Identity();return e.SlerpToRef(t,n,i,r),r},e.SlerpToRef=function(e,t,n,i){var r,o,a=e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w,s=!1;if(a<0&&(s=!0,a=-a),a>.999999)o=1-n,r=s?-n:n;else{var c=Math.acos(a),l=1/Math.sin(c);o=Math.sin((1-n)*c)*l,r=s?-Math.sin(n*c)*l:Math.sin(n*c)*l}return i._x=o*e._x+r*t._x,i._y=o*e._y+r*t._y,i._z=o*e._z+r*t._z,i._w=o*e._w+r*t._w,i._isDirty=!0,i},e.Hermite=function(e,t,n,i,r){var o=r*r,a=r*o,s=2*a-3*o+1,c=-2*a+3*o,l=a-2*o+r,u=a-o,h=e._x*s+n._x*c+t._x*l+i._x*u,d=e._y*s+n._y*c+t._y*l+i._y*u,p=e._z*s+n._z*c+t._z*l+i._z*u,f=e._w*s+n._w*c+t._w*l+i._w*u;return new e.constructor(h,d,p,f)},e.Hermite1stDerivative=function(e,t,n,i,r){var o=new e.constructor;return this.Hermite1stDerivativeToRef(e,t,n,i,r,o),o},e.Hermite1stDerivativeToRef=function(e,t,n,i,r,o){var a=r*r;return o._x=6*(a-r)*e._x+(3*a-4*r+1)*t._x+6*(-a+r)*n._x+(3*a-2*r)*i._x,o._y=6*(a-r)*e._y+(3*a-4*r+1)*t._y+6*(-a+r)*n._y+(3*a-2*r)*i._y,o._z=6*(a-r)*e._z+(3*a-4*r+1)*t._z+6*(-a+r)*n._z+(3*a-2*r)*i._z,o._w=6*(a-r)*e._w+(3*a-4*r+1)*t._w+6*(-a+r)*n._w+(3*a-2*r)*i._w,o._isDirty=!0,o},e.Normalize=function(t){var n=e.Zero();return e.NormalizeToRef(t,n),n},e.NormalizeToRef=function(e,t){return e.normalizeToRef(t),t},e}(),R=function(){function e(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,E.MatrixTrackPrecisionChange&&E.MatrixTrackedMatrices.push(this),this._m=new E.MatrixCurrentType(16),this.markAsUpdated()}return Object.defineProperty(e,"Use64Bits",{get:function(){return E.MatrixUse64Bits},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"m",{get:function(){return this._m},enumerable:!1,configurable:!0}),e.prototype.markAsUpdated=function(){this.updateFlag=e._UpdateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},e.prototype._updateIdentityStatus=function(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===i&&(i=!0),this._isIdentity=e,this._isIdentity3x2=e||n,this._isIdentityDirty=!this._isIdentity&&t,this._isIdentity3x2Dirty=!this._isIdentity3x2&&i},e.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var e=this._m;this._isIdentity=1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]}return this._isIdentity},e.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,1!==this._m[0]||1!==this._m[5]||1!==this._m[15]||0!==this._m[1]||0!==this._m[2]||0!==this._m[3]||0!==this._m[4]||0!==this._m[6]||0!==this._m[7]||0!==this._m[8]||0!==this._m[9]||0!==this._m[10]||0!==this._m[11]||0!==this._m[12]||0!==this._m[13]||0!==this._m[14]?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},e.prototype.determinant=function(){if(!0===this._isIdentity)return 1;var e=this._m,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],s=e[6],c=e[7],l=e[8],u=e[9],h=e[10],d=e[11],p=e[12],f=e[13],m=e[14],_=e[15],g=h*_-m*d,y=u*_-f*d,v=u*m-f*h,b=l*_-p*d,T=l*m-h*p,E=l*f-p*u;return t*+(a*g-s*y+c*v)+n*-(o*g-s*b+c*T)+i*+(o*y-a*b+c*E)+r*-(o*v-a*T+s*E)},e.prototype.toString=function(){return"{".concat(this.m[0],", ").concat(this.m[1],", ").concat(this.m[2],", ").concat(this.m[3],"\n").concat(this.m[4],", ").concat(this.m[5],", ").concat(this.m[6],", ").concat(this.m[7],"\n").concat(this.m[8],", ").concat(this.m[9],", ").concat(this.m[10],", ").concat(this.m[11],"\n").concat(this.m[12],", ").concat(this.m[13],", ").concat(this.m[14],", ").concat(this.m[15],"}")},e.prototype.toArray=function(){return this._m},e.prototype.asArray=function(){return this._m},e.prototype.invert=function(){return this.invertToRef(this),this},e.prototype.reset=function(){return e.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},e.prototype.add=function(e){var t=new this.constructor;return this.addToRef(e,t),t},e.prototype.addToRef=function(e,t){for(var n=this._m,i=t._m,r=e.m,o=0;o<16;o++)i[o]=n[o]+r[o];return t.markAsUpdated(),t},e.prototype.addToSelf=function(e){for(var t=this._m,n=e.m,i=0;i<16;i++)t[i]+=n[i];return this.markAsUpdated(),this},e.prototype.invertToRef=function(t){if(!0===this._isIdentity)return e.IdentityToRef(t),t;var n=this._m,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],c=n[5],l=n[6],u=n[7],h=n[8],d=n[9],p=n[10],f=n[11],m=n[12],_=n[13],g=n[14],y=n[15],v=p*y-g*f,b=d*y-_*f,T=d*g-_*p,E=h*y-m*f,A=h*g-p*m,x=h*_-m*d,S=+(c*v-l*b+u*T),C=-(s*v-l*E+u*A),P=+(s*b-c*E+u*x),I=-(s*T-c*A+l*x),R=i*S+r*C+o*P+a*I;if(0===R)return t.copyFrom(this),t;var O=1/R,w=l*y-g*u,M=c*y-_*u,D=c*g-_*l,N=s*y-m*u,L=s*g-m*l,F=s*_-m*c,B=l*f-p*u,U=c*f-d*u,k=c*p-d*l,V=s*f-h*u,z=s*p-h*l,G=s*d-h*c,H=-(r*v-o*b+a*T),j=+(i*v-o*E+a*A),W=-(i*b-r*E+a*x),X=+(i*T-r*A+o*x),Y=+(r*w-o*M+a*D),q=-(i*w-o*N+a*L),K=+(i*M-r*N+a*F),Q=-(i*D-r*L+o*F),Z=-(r*B-o*U+a*k),$=+(i*B-o*V+a*z),J=-(i*U-r*V+a*G),ee=+(i*k-r*z+o*G);return e.FromValuesToRef(S*O,H*O,Y*O,Z*O,C*O,j*O,q*O,$*O,P*O,W*O,K*O,J*O,I*O,X*O,Q*O,ee*O,t),t},e.prototype.addAtIndex=function(e,t){return this._m[e]+=t,this.markAsUpdated(),this},e.prototype.multiplyAtIndex=function(e,t){return this._m[e]*=t,this.markAsUpdated(),this},e.prototype.setTranslationFromFloats=function(e,t,n){return this._m[12]=e,this._m[13]=t,this._m[14]=n,this.markAsUpdated(),this},e.prototype.addTranslationFromFloats=function(e,t,n){return this._m[12]+=e,this._m[13]+=t,this._m[14]+=n,this.markAsUpdated(),this},e.prototype.setTranslation=function(e){return this.setTranslationFromFloats(e._x,e._y,e._z)},e.prototype.getTranslation=function(){return new C(this._m[12],this._m[13],this._m[14])},e.prototype.getTranslationToRef=function(e){return e.x=this._m[12],e.y=this._m[13],e.z=this._m[14],e},e.prototype.removeRotationAndScaling=function(){var t=this.m;return e.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,t[12],t[13],t[14],t[15],this),this._updateIdentityStatus(0===t[12]&&0===t[13]&&0===t[14]&&1===t[15]),this},e.prototype.multiply=function(e){var t=new this.constructor;return this.multiplyToRef(e,t),t},e.prototype.copyFrom=function(e){e.copyToArray(this._m);var t=e;return this.updateFlag=t.updateFlag,this._updateIdentityStatus(t._isIdentity,t._isIdentityDirty,t._isIdentity3x2,t._isIdentity3x2Dirty),this},e.prototype.copyToArray=function(e,t){void 0===t&&(t=0);var n=this._m;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],this},e.prototype.multiplyToRef=function(e,t){return this._isIdentity?(t.copyFrom(e),t):e._isIdentity?(t.copyFrom(this),t):(this.multiplyToArray(e,t._m,0),t.markAsUpdated(),t)},e.prototype.multiplyToArray=function(e,t,n){var i=this._m,r=e.m,o=i[0],a=i[1],s=i[2],c=i[3],l=i[4],u=i[5],h=i[6],d=i[7],p=i[8],f=i[9],m=i[10],_=i[11],g=i[12],y=i[13],v=i[14],b=i[15],T=r[0],E=r[1],A=r[2],x=r[3],S=r[4],C=r[5],P=r[6],I=r[7],R=r[8],O=r[9],w=r[10],M=r[11],D=r[12],N=r[13],L=r[14],F=r[15];return t[n]=o*T+a*S+s*R+c*D,t[n+1]=o*E+a*C+s*O+c*N,t[n+2]=o*A+a*P+s*w+c*L,t[n+3]=o*x+a*I+s*M+c*F,t[n+4]=l*T+u*S+h*R+d*D,t[n+5]=l*E+u*C+h*O+d*N,t[n+6]=l*A+u*P+h*w+d*L,t[n+7]=l*x+u*I+h*M+d*F,t[n+8]=p*T+f*S+m*R+_*D,t[n+9]=p*E+f*C+m*O+_*N,t[n+10]=p*A+f*P+m*w+_*L,t[n+11]=p*x+f*I+m*M+_*F,t[n+12]=g*T+y*S+v*R+b*D,t[n+13]=g*E+y*C+v*O+b*N,t[n+14]=g*A+y*P+v*w+b*L,t[n+15]=g*x+y*I+v*M+b*F,this},e.prototype.equals=function(e){var t=e;if(!t)return!1;if((this._isIdentity||t._isIdentity)&&!this._isIdentityDirty&&!t._isIdentityDirty)return this._isIdentity&&t._isIdentity;var n=this.m,i=t.m;return n[0]===i[0]&&n[1]===i[1]&&n[2]===i[2]&&n[3]===i[3]&&n[4]===i[4]&&n[5]===i[5]&&n[6]===i[6]&&n[7]===i[7]&&n[8]===i[8]&&n[9]===i[9]&&n[10]===i[10]&&n[11]===i[11]&&n[12]===i[12]&&n[13]===i[13]&&n[14]===i[14]&&n[15]===i[15]},e.prototype.clone=function(){var e=new this.constructor;return e.copyFrom(this),e},e.prototype.getClassName=function(){return"Matrix"},e.prototype.getHashCode=function(){for(var e=x(this._m[0]),t=1;t<16;t++)e=397*e^x(this._m[t]);return e},e.prototype.decomposeToTransformNode=function(e){return e.rotationQuaternion=e.rotationQuaternion||new I,this.decompose(e.scaling,e.rotationQuaternion,e.position)},e.prototype.decompose=function(t,n,i,r,o){if(void 0===o&&(o=!0),this._isIdentity)return i&&i.setAll(0),t&&t.setAll(1),n&&n.copyFromFloats(0,0,0,1),!0;var a=this._m;if(i&&i.copyFromFloats(a[12],a[13],a[14]),(t=t||O.Vector3[0]).x=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]),t.y=Math.sqrt(a[4]*a[4]+a[5]*a[5]+a[6]*a[6]),t.z=Math.sqrt(a[8]*a[8]+a[9]*a[9]+a[10]*a[10]),r){var s=(o?r.absoluteScaling.x:r.scaling.x)<0?-1:1,c=(o?r.absoluteScaling.y:r.scaling.y)<0?-1:1,l=(o?r.absoluteScaling.z:r.scaling.z)<0?-1:1;t.x*=s,t.y*=c,t.z*=l}else this.determinant()<=0&&(t.y*=-1);if(0===t._x||0===t._y||0===t._z)return n&&n.copyFromFloats(0,0,0,1),!1;if(n){var u=1/t._x,h=1/t._y,d=1/t._z;e.FromValuesToRef(a[0]*u,a[1]*u,a[2]*u,0,a[4]*h,a[5]*h,a[6]*h,0,a[8]*d,a[9]*d,a[10]*d,0,0,0,0,1,O.Matrix[0]),I.FromRotationMatrixToRef(O.Matrix[0],n)}return!0},e.prototype.getRow=function(e){if(e<0||e>3)return null;var t=4*e;return new P(this._m[t+0],this._m[t+1],this._m[t+2],this._m[t+3])},e.prototype.getRowToRef=function(e,t){if(e>=0&&e<=3){var n=4*e;t.x=this._m[n+0],t.y=this._m[n+1],t.z=this._m[n+2],t.w=this._m[n+3]}return t},e.prototype.setRow=function(e,t){return this.setRowFromFloats(e,t.x,t.y,t.z,t.w)},e.prototype.transpose=function(){var t=new this.constructor;return e.TransposeToRef(this,t),t},e.prototype.transposeToRef=function(t){return e.TransposeToRef(this,t),t},e.prototype.setRowFromFloats=function(e,t,n,i,r){if(e<0||e>3)return this;var o=4*e;return this._m[o+0]=t,this._m[o+1]=n,this._m[o+2]=i,this._m[o+3]=r,this.markAsUpdated(),this},e.prototype.scale=function(e){var t=new this.constructor;return this.scaleToRef(e,t),t},e.prototype.scaleToRef=function(e,t){for(var n=0;n<16;n++)t._m[n]=this._m[n]*e;return t.markAsUpdated(),t},e.prototype.scaleAndAddToRef=function(e,t){for(var n=0;n<16;n++)t._m[n]+=this._m[n]*e;return t.markAsUpdated(),t},e.prototype.toNormalMatrix=function(t){var n=O.Matrix[0];this.invertToRef(n),n.transposeToRef(t);var i=t._m;return e.FromValuesToRef(i[0],i[1],i[2],0,i[4],i[5],i[6],0,i[8],i[9],i[10],0,0,0,0,1,t),t},e.prototype.getRotationMatrix=function(){var e=new this.constructor;return this.getRotationMatrixToRef(e),e},e.prototype.getRotationMatrixToRef=function(t){var n=O.Vector3[0];if(!this.decompose(n))return e.IdentityToRef(t),t;var i=this._m,r=1/n._x,o=1/n._y,a=1/n._z;return e.FromValuesToRef(i[0]*r,i[1]*r,i[2]*r,0,i[4]*o,i[5]*o,i[6]*o,0,i[8]*a,i[9]*a,i[10]*a,0,0,0,0,1,t),t},e.prototype.toggleModelMatrixHandInPlace=function(){var e=this._m;return e[2]*=-1,e[6]*=-1,e[8]*=-1,e[9]*=-1,e[14]*=-1,this.markAsUpdated(),this},e.prototype.toggleProjectionMatrixHandInPlace=function(){var e=this._m;return e[8]*=-1,e[9]*=-1,e[10]*=-1,e[11]*=-1,this.markAsUpdated(),this},e.FromArray=function(t,n){void 0===n&&(n=0);var i=new e;return e.FromArrayToRef(t,n,i),i},e.FromArrayToRef=function(e,t,n){for(var i=0;i<16;i++)n._m[i]=e[i+t];return n.markAsUpdated(),n},e.FromFloat32ArrayToRefScaled=function(e,t,n,i){for(var r=0;r<16;r++)i._m[r]=e[r+t]*n;return i.markAsUpdated(),i},Object.defineProperty(e,"IdentityReadOnly",{get:function(){return e._IdentityReadOnly},enumerable:!1,configurable:!0}),e.FromValuesToRef=function(e,t,n,i,r,o,a,s,c,l,u,h,d,p,f,m,_){var g=_._m;g[0]=e,g[1]=t,g[2]=n,g[3]=i,g[4]=r,g[5]=o,g[6]=a,g[7]=s,g[8]=c,g[9]=l,g[10]=u,g[11]=h,g[12]=d,g[13]=p,g[14]=f,g[15]=m,_.markAsUpdated()},e.FromValues=function(t,n,i,r,o,a,s,c,l,u,h,d,p,f,m,_){var g=new e,y=g._m;return y[0]=t,y[1]=n,y[2]=i,y[3]=r,y[4]=o,y[5]=a,y[6]=s,y[7]=c,y[8]=l,y[9]=u,y[10]=h,y[11]=d,y[12]=p,y[13]=f,y[14]=m,y[15]=_,g.markAsUpdated(),g},e.Compose=function(t,n,i){var r=new e;return e.ComposeToRef(t,n,i,r),r},e.ComposeToRef=function(e,t,n,i){var r=i._m,o=t._x,a=t._y,s=t._z,c=t._w,l=o+o,u=a+a,h=s+s,d=o*l,p=o*u,f=o*h,m=a*u,_=a*h,g=s*h,y=c*l,v=c*u,b=c*h,T=e._x,E=e._y,A=e._z;return r[0]=(1-(m+g))*T,r[1]=(p+b)*T,r[2]=(f-v)*T,r[3]=0,r[4]=(p-b)*E,r[5]=(1-(d+g))*E,r[6]=(_+y)*E,r[7]=0,r[8]=(f+v)*A,r[9]=(_-y)*A,r[10]=(1-(d+m))*A,r[11]=0,r[12]=n._x,r[13]=n._y,r[14]=n._z,r[15]=1,i.markAsUpdated(),i},e.Identity=function(){var t=e.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return t._updateIdentityStatus(!0),t},e.IdentityToRef=function(t){return e.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,t),t._updateIdentityStatus(!0),t},e.Zero=function(){var t=e.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return t._updateIdentityStatus(!1),t},e.RotationX=function(t){var n=new e;return e.RotationXToRef(t,n),n},e.Invert=function(e){var t=new e.constructor;return e.invertToRef(t),t},e.RotationXToRef=function(t,n){var i=Math.sin(t),r=Math.cos(t);return e.FromValuesToRef(1,0,0,0,0,r,i,0,0,-i,r,0,0,0,0,1,n),n._updateIdentityStatus(1===r&&0===i),n},e.RotationY=function(t){var n=new e;return e.RotationYToRef(t,n),n},e.RotationYToRef=function(t,n){var i=Math.sin(t),r=Math.cos(t);return e.FromValuesToRef(r,0,-i,0,0,1,0,0,i,0,r,0,0,0,0,1,n),n._updateIdentityStatus(1===r&&0===i),n},e.RotationZ=function(t){var n=new e;return e.RotationZToRef(t,n),n},e.RotationZToRef=function(t,n){var i=Math.sin(t),r=Math.cos(t);return e.FromValuesToRef(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1,n),n._updateIdentityStatus(1===r&&0===i),n},e.RotationAxis=function(t,n){var i=new e;return e.RotationAxisToRef(t,n,i),i},e.RotationAxisToRef=function(e,t,n){var i=Math.sin(-t),r=Math.cos(-t),o=1-r;e.normalize();var a=n._m;return a[0]=e._x*e._x*o+r,a[1]=e._x*e._y*o-e._z*i,a[2]=e._x*e._z*o+e._y*i,a[3]=0,a[4]=e._y*e._x*o+e._z*i,a[5]=e._y*e._y*o+r,a[6]=e._y*e._z*o-e._x*i,a[7]=0,a[8]=e._z*e._x*o-e._y*i,a[9]=e._z*e._y*o+e._x*i,a[10]=e._z*e._z*o+r,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,n.markAsUpdated(),n},e.RotationAlignToRef=function(e,t,n,i){void 0===i&&(i=!1);var r=C.Dot(t,e),o=n._m;if(r<-1+m)o[0]=-1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=i?1:-1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=i?-1:1,o[11]=0;else{var a=C.Cross(t,e),s=1/(1+r);o[0]=a._x*a._x*s+r,o[1]=a._y*a._x*s-a._z,o[2]=a._z*a._x*s+a._y,o[3]=0,o[4]=a._x*a._y*s+a._z,o[5]=a._y*a._y*s+r,o[6]=a._z*a._y*s-a._x,o[7]=0,o[8]=a._x*a._z*s-a._y,o[9]=a._y*a._z*s+a._x,o[10]=a._z*a._z*s+r,o[11]=0}return o[12]=0,o[13]=0,o[14]=0,o[15]=1,n.markAsUpdated(),n},e.RotationYawPitchRoll=function(t,n,i){var r=new e;return e.RotationYawPitchRollToRef(t,n,i,r),r},e.RotationYawPitchRollToRef=function(e,t,n,i){return I.RotationYawPitchRollToRef(e,t,n,O.Quaternion[0]),O.Quaternion[0].toRotationMatrix(i),i},e.Scaling=function(t,n,i){var r=new e;return e.ScalingToRef(t,n,i,r),r},e.ScalingToRef=function(t,n,i,r){return e.FromValuesToRef(t,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1,r),r._updateIdentityStatus(1===t&&1===n&&1===i),r},e.Translation=function(t,n,i){var r=new e;return e.TranslationToRef(t,n,i,r),r},e.TranslationToRef=function(t,n,i,r){return e.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,t,n,i,1,r),r._updateIdentityStatus(0===t&&0===n&&0===i),r},e.Lerp=function(t,n,i){var r=new t.constructor;return e.LerpToRef(t,n,i,r),r},e.LerpToRef=function(e,t,n,i){for(var r=i._m,o=e.m,a=t.m,s=0;s<16;s++)r[s]=o[s]*(1-n)+a[s]*n;return i.markAsUpdated(),i},e.DecomposeLerp=function(t,n,i){var r=new t.constructor;return e.DecomposeLerpToRef(t,n,i,r),r},e.DecomposeLerpToRef=function(t,n,i,r){var o=O.Vector3[0],a=O.Quaternion[0],s=O.Vector3[1];t.decompose(o,a,s);var c=O.Vector3[2],l=O.Quaternion[1],u=O.Vector3[3];n.decompose(c,l,u);var h=O.Vector3[4];C.LerpToRef(o,c,i,h);var d=O.Quaternion[2];I.SlerpToRef(a,l,i,d);var p=O.Vector3[5];return C.LerpToRef(s,u,i,p),e.ComposeToRef(h,d,p,r),r},e.LookAtLH=function(t,n,i){var r=new e;return e.LookAtLHToRef(t,n,i,r),r},e.LookAtLHToRef=function(t,n,i,r){var o=O.Vector3[0],a=O.Vector3[1],s=O.Vector3[2];n.subtractToRef(t,s),s.normalize(),C.CrossToRef(i,s,o);var c=o.lengthSquared();0===c?o.x=1:o.normalizeFromLength(Math.sqrt(c)),C.CrossToRef(s,o,a),a.normalize();var l=-C.Dot(o,t),u=-C.Dot(a,t),h=-C.Dot(s,t);return e.FromValuesToRef(o._x,a._x,s._x,0,o._y,a._y,s._y,0,o._z,a._z,s._z,0,l,u,h,1,r),r},e.LookAtRH=function(t,n,i){var r=new e;return e.LookAtRHToRef(t,n,i,r),r},e.LookAtRHToRef=function(t,n,i,r){var o=O.Vector3[0],a=O.Vector3[1],s=O.Vector3[2];t.subtractToRef(n,s),s.normalize(),C.CrossToRef(i,s,o);var c=o.lengthSquared();0===c?o.x=1:o.normalizeFromLength(Math.sqrt(c)),C.CrossToRef(s,o,a),a.normalize();var l=-C.Dot(o,t),u=-C.Dot(a,t),h=-C.Dot(s,t);return e.FromValuesToRef(o._x,a._x,s._x,0,o._y,a._y,s._y,0,o._z,a._z,s._z,0,l,u,h,1,r),r},e.LookDirectionLH=function(t,n){var i=new e;return e.LookDirectionLHToRef(t,n,i),i},e.LookDirectionLHToRef=function(t,n,i){var r=O.Vector3[0];r.copyFrom(t),r.scaleInPlace(-1);var o=O.Vector3[1];return C.CrossToRef(n,r,o),e.FromValuesToRef(o._x,o._y,o._z,0,n._x,n._y,n._z,0,r._x,r._y,r._z,0,0,0,0,1,i),i},e.LookDirectionRH=function(t,n){var i=new e;return e.LookDirectionRHToRef(t,n,i),i},e.LookDirectionRHToRef=function(t,n,i){var r=O.Vector3[2];return C.CrossToRef(n,t,r),e.FromValuesToRef(r._x,r._y,r._z,0,n._x,n._y,n._z,0,t._x,t._y,t._z,0,0,0,0,1,i),i},e.OrthoLH=function(t,n,i,r,o){var a=new e;return e.OrthoLHToRef(t,n,i,r,a,o),a},e.OrthoLHToRef=function(t,n,i,r,o,a){var s=2/t,c=2/n,l=2/(r-i),u=-(r+i)/(r-i);return e.FromValuesToRef(s,0,0,0,0,c,0,0,0,0,l,0,0,0,u,1,o),a&&o.multiplyToRef(M,o),o._updateIdentityStatus(1===s&&1===c&&1===l&&0===u),o},e.OrthoOffCenterLH=function(t,n,i,r,o,a,s){var c=new e;return e.OrthoOffCenterLHToRef(t,n,i,r,o,a,c,s),c},e.OrthoOffCenterLHToRef=function(t,n,i,r,o,a,s,c){var l=2/(n-t),u=2/(r-i),h=2/(a-o),d=-(a+o)/(a-o),p=(t+n)/(t-n),f=(r+i)/(i-r);return e.FromValuesToRef(l,0,0,0,0,u,0,0,0,0,h,0,p,f,d,1,s),c&&s.multiplyToRef(M,s),s.markAsUpdated(),s},e.ObliqueOffCenterLHToRef=function(t,n,i,r,o,a,s,c,l,u,h){var d=-s*Math.cos(c),p=-s*Math.sin(c);return e.TranslationToRef(0,0,-l,O.Matrix[1]),e.FromValuesToRef(1,0,0,0,0,1,0,0,d,p,1,0,0,0,0,1,O.Matrix[0]),O.Matrix[1].multiplyToRef(O.Matrix[0],O.Matrix[0]),e.TranslationToRef(0,0,l,O.Matrix[1]),O.Matrix[0].multiplyToRef(O.Matrix[1],O.Matrix[0]),e.OrthoOffCenterLHToRef(t,n,i,r,o,a,u,h),O.Matrix[0].multiplyToRef(u,u),u},e.OrthoOffCenterRH=function(t,n,i,r,o,a,s){var c=new e;return e.OrthoOffCenterRHToRef(t,n,i,r,o,a,c,s),c},e.OrthoOffCenterRHToRef=function(t,n,i,r,o,a,s,c){return e.OrthoOffCenterLHToRef(t,n,i,r,o,a,s,c),s._m[10]*=-1,s},e.ObliqueOffCenterRHToRef=function(t,n,i,r,o,a,s,c,l,u,h){var d=s*Math.cos(c),p=s*Math.sin(c);return e.TranslationToRef(0,0,l,O.Matrix[1]),e.FromValuesToRef(1,0,0,0,0,1,0,0,d,p,1,0,0,0,0,1,O.Matrix[0]),O.Matrix[1].multiplyToRef(O.Matrix[0],O.Matrix[0]),e.TranslationToRef(0,0,-l,O.Matrix[1]),O.Matrix[0].multiplyToRef(O.Matrix[1],O.Matrix[0]),e.OrthoOffCenterRHToRef(t,n,i,r,o,a,u,h),O.Matrix[0].multiplyToRef(u,u),u},e.PerspectiveLH=function(t,n,i,r,o,a){void 0===a&&(a=0);var s=new e,c=2*i/t,l=2*i/n,u=(r+i)/(r-i),h=-2*r*i/(r-i),d=Math.tan(a);return e.FromValuesToRef(c,0,0,0,0,l,0,d,0,0,u,1,0,0,h,0,s),o&&s.multiplyToRef(M,s),s._updateIdentityStatus(!1),s},e.PerspectiveFovLH=function(t,n,i,r,o,a,s){void 0===a&&(a=0),void 0===s&&(s=!1);var c=new e;return e.PerspectiveFovLHToRef(t,n,i,r,c,!0,o,a,s),c},e.PerspectiveFovLHToRef=function(t,n,i,r,o,a,s,c,l){void 0===a&&(a=!0),void 0===c&&(c=0),void 0===l&&(l=!1);var u=i,h=r,d=1/Math.tan(.5*t),p=a?d/n:d,f=a?d:d*n,m=l&&0===u?-1:0!==h?(h+u)/(h-u):1,_=l&&0===u?2*h:0!==h?-2*h*u/(h-u):-2*u,g=Math.tan(c);return e.FromValuesToRef(p,0,0,0,0,f,0,g,0,0,m,1,0,0,_,0,o),s&&o.multiplyToRef(M,o),o._updateIdentityStatus(!1),o},e.PerspectiveFovReverseLHToRef=function(t,n,i,r,o,a,s,c){void 0===a&&(a=!0),void 0===c&&(c=0);var l=1/Math.tan(.5*t),u=a?l/n:l,h=a?l:l*n,d=Math.tan(c);return e.FromValuesToRef(u,0,0,0,0,h,0,d,0,0,-i,1,0,0,1,0,o),s&&o.multiplyToRef(M,o),o._updateIdentityStatus(!1),o},e.PerspectiveFovRH=function(t,n,i,r,o,a,s){void 0===a&&(a=0),void 0===s&&(s=!1);var c=new e;return e.PerspectiveFovRHToRef(t,n,i,r,c,!0,o,a,s),c},e.PerspectiveFovRHToRef=function(t,n,i,r,o,a,s,c,l){void 0===a&&(a=!0),void 0===c&&(c=0),void 0===l&&(l=!1);var u=i,h=r,d=1/Math.tan(.5*t),p=a?d/n:d,f=a?d:d*n,m=l&&0===u?1:0!==h?-(h+u)/(h-u):-1,_=l&&0===u?2*h:0!==h?-2*h*u/(h-u):-2*u,g=Math.tan(c);return e.FromValuesToRef(p,0,0,0,0,f,0,g,0,0,m,-1,0,0,_,0,o),s&&o.multiplyToRef(M,o),o._updateIdentityStatus(!1),o},e.PerspectiveFovReverseRHToRef=function(t,n,i,r,o,a,s,c){void 0===a&&(a=!0),void 0===c&&(c=0);var l=1/Math.tan(.5*t),u=a?l/n:l,h=a?l:l*n,d=Math.tan(c);return e.FromValuesToRef(u,0,0,0,0,h,0,d,0,0,-i,-1,0,0,-1,0,o),s&&o.multiplyToRef(M,o),o._updateIdentityStatus(!1),o},e.GetFinalMatrix=function(t,n,i,r,o,a){var s=t.width,c=t.height,l=t.x,u=t.y,h=e.FromValues(s/2,0,0,0,0,-c/2,0,0,0,0,a-o,0,l+s/2,c/2+u,o,1),d=new n.constructor;return n.multiplyToRef(i,d),d.multiplyToRef(r,d),d.multiplyToRef(h,d)},e.GetAsMatrix2x2=function(e){var t=e.m,n=[t[0],t[1],t[4],t[5]];return E.MatrixUse64Bits?n:new Float32Array(n)},e.GetAsMatrix3x3=function(e){var t=e.m,n=[t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]];return E.MatrixUse64Bits?n:new Float32Array(n)},e.Transpose=function(t){var n=new t.constructor;return e.TransposeToRef(t,n),n},e.TransposeToRef=function(e,t){var n=e.m,i=n[0],r=n[4],o=n[8],a=n[12],s=n[1],c=n[5],l=n[9],u=n[13],h=n[2],d=n[6],p=n[10],f=n[14],m=n[3],_=n[7],g=n[11],y=n[15],v=t._m;return v[0]=i,v[1]=r,v[2]=o,v[3]=a,v[4]=s,v[5]=c,v[6]=l,v[7]=u,v[8]=h,v[9]=d,v[10]=p,v[11]=f,v[12]=m,v[13]=_,v[14]=g,v[15]=y,t.markAsUpdated(),t._updateIdentityStatus(e._isIdentity,e._isIdentityDirty),t},e.Reflection=function(t){var n=new e;return e.ReflectionToRef(t,n),n},e.ReflectionToRef=function(t,n){t.normalize();var i=t.normal.x,r=t.normal.y,o=t.normal.z,a=-2*i,s=-2*r,c=-2*o;return e.FromValuesToRef(a*i+1,s*i,c*i,0,a*r,s*r+1,c*r,0,a*o,s*o,c*o+1,0,a*t.d,s*t.d,c*t.d,1,n),n},e.FromXYZAxesToRef=function(t,n,i,r){return e.FromValuesToRef(t._x,t._y,t._z,0,n._x,n._y,n._z,0,i._x,i._y,i._z,0,0,0,0,1,r),r},e.FromQuaternionToRef=function(e,t){var n=e._x*e._x,i=e._y*e._y,r=e._z*e._z,o=e._x*e._y,a=e._z*e._w,s=e._z*e._x,c=e._y*e._w,l=e._y*e._z,u=e._x*e._w;return t._m[0]=1-2*(i+r),t._m[1]=2*(o+a),t._m[2]=2*(s-c),t._m[3]=0,t._m[4]=2*(o-a),t._m[5]=1-2*(r+n),t._m[6]=2*(l+u),t._m[7]=0,t._m[8]=2*(s+c),t._m[9]=2*(l-u),t._m[10]=1-2*(i+n),t._m[11]=0,t._m[12]=0,t._m[13]=0,t._m[14]=0,t._m[15]=1,t.markAsUpdated(),t},e._UpdateFlagSeed=0,e._IdentityReadOnly=e.Identity(),e}(),O=function(){function e(){}return e.Vector3=_.BuildTuple(11,C.Zero),e.Matrix=_.BuildTuple(2,R.Identity),e.Quaternion=_.BuildTuple(3,I.Zero),e}(),w=function(){function e(){}return e.Vector2=_.BuildTuple(3,S.Zero),e.Vector3=_.BuildTuple(13,C.Zero),e.Vector4=_.BuildTuple(3,P.Zero),e.Quaternion=_.BuildTuple(2,I.Zero),e.Matrix=_.BuildTuple(8,R.Identity),e}();b("BABYLON.Vector2",S),b("BABYLON.Vector3",C),b("BABYLON.Vector4",P),b("BABYLON.Matrix",R);var M=R.FromValues(1,0,0,0,0,1,0,0,0,0,.5,0,0,0,.5,1);function D(e){return Math.pow(e,p)}function N(e){return e<=.04045?.0773993808*e:Math.pow(.947867299*(e+.055),2.4)}function L(e){return Math.pow(e,d)}function F(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}var B=function(){function e(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),this.r=e,this.g=t,this.b=n}return e.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+"}"},e.prototype.getClassName=function(){return"Color3"},e.prototype.getHashCode=function(){var e=255*this.r|0;return 397*(e=397*e^(255*this.g|0))^(255*this.b|0)},e.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,this},e.prototype.fromArray=function(t,n){return void 0===n&&(n=0),e.FromArrayToRef(t,n,this),this},e.prototype.toColor4=function(e){return void 0===e&&(e=1),new U(this.r,this.g,this.b,e)},e.prototype.asArray=function(){return[this.r,this.g,this.b]},e.prototype.toLuminance=function(){return.3*this.r+.59*this.g+.11*this.b},e.prototype.multiply=function(t){return new e(this.r*t.r,this.g*t.g,this.b*t.b)},e.prototype.multiplyToRef=function(e,t){return t.r=this.r*e.r,t.g=this.g*e.g,t.b=this.b*e.b,this},e.prototype.equals=function(e){return e&&this.r===e.r&&this.g===e.g&&this.b===e.b},e.prototype.equalsFloats=function(e,t,n){return this.r===e&&this.g===t&&this.b===n},e.prototype.scale=function(t){return new e(this.r*t,this.g*t,this.b*t)},e.prototype.scaleInPlace=function(e){return this.r*=e,this.g*=e,this.b*=e,this},e.prototype.scaleToRef=function(e,t){return t.r=this.r*e,t.g=this.g*e,t.b=this.b*e,this},e.prototype.scaleAndAddToRef=function(e,t){return t.r+=this.r*e,t.g+=this.g*e,t.b+=this.b*e,this},e.prototype.clampToRef=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=1),n.r=h.Clamp(this.r,e,t),n.g=h.Clamp(this.g,e,t),n.b=h.Clamp(this.b,e,t),this},e.prototype.add=function(t){return new e(this.r+t.r,this.g+t.g,this.b+t.b)},e.prototype.addToRef=function(e,t){return t.r=this.r+e.r,t.g=this.g+e.g,t.b=this.b+e.b,this},e.prototype.subtract=function(t){return new e(this.r-t.r,this.g-t.g,this.b-t.b)},e.prototype.subtractToRef=function(e,t){return t.r=this.r-e.r,t.g=this.g-e.g,t.b=this.b-e.b,this},e.prototype.clone=function(){return new e(this.r,this.g,this.b)},e.prototype.copyFrom=function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},e.prototype.copyFromFloats=function(e,t,n){return this.r=e,this.g=t,this.b=n,this},e.prototype.set=function(e,t,n){return this.copyFromFloats(e,t,n)},e.prototype.toHexString=function(){var e=Math.round(255*this.r),t=Math.round(255*this.g),n=Math.round(255*this.b);return"#"+h.ToHex(e)+h.ToHex(t)+h.ToHex(n)},e.prototype.toHSV=function(){var t=new e;return this.toHSVToRef(t),t},e.prototype.toHSVToRef=function(e){var t=this.r,n=this.g,i=this.b,r=Math.max(t,n,i),o=Math.min(t,n,i),a=0,s=0,c=r,l=r-o;0!==r&&(s=l/r),r!=o&&(r==t?(a=(n-i)/l,n=0&&o<=1?(s=r,c=a):o>=1&&o<=2?(s=a,c=r):o>=2&&o<=3?(c=r,l=a):o>=3&&o<=4?(c=a,l=r):o>=4&&o<=5?(s=a,l=r):o>=5&&o<=6&&(s=r,l=a);var u=n-r;i.set(s+u,c+u,l+u)},e.FromHSV=function(t,n,i){var r=new e(0,0,0);return e.HSVtoRGBToRef(t,n,i,r),r},e.FromHexString=function(t){if("#"!==t.substring(0,1)||7!==t.length)return new e(0,0,0);var n=parseInt(t.substring(1,3),16),i=parseInt(t.substring(3,5),16),r=parseInt(t.substring(5,7),16);return e.FromInts(n,i,r)},e.FromArray=function(t,n){return void 0===n&&(n=0),new e(t[n],t[n+1],t[n+2])},e.FromArrayToRef=function(e,t,n){void 0===t&&(t=0),n.r=e[t],n.g=e[t+1],n.b=e[t+2]},e.FromInts=function(t,n,i){return new e(t/255,n/255,i/255)},e.Lerp=function(t,n,i){var r=new e(0,0,0);return e.LerpToRef(t,n,i,r),r},e.LerpToRef=function(e,t,n,i){i.r=e.r+(t.r-e.r)*n,i.g=e.g+(t.g-e.g)*n,i.b=e.b+(t.b-e.b)*n},e.Hermite=function(t,n,i,r,o){var a=o*o,s=o*a,c=2*s-3*a+1,l=-2*s+3*a,u=s-2*a+o,h=s-a;return new e(t.r*c+i.r*l+n.r*u+r.r*h,t.g*c+i.g*l+n.g*u+r.g*h,t.b*c+i.b*l+n.b*u+r.b*h)},e.Hermite1stDerivative=function(t,n,i,r,o){var a=e.Black();return this.Hermite1stDerivativeToRef(t,n,i,r,o,a),a},e.Hermite1stDerivativeToRef=function(e,t,n,i,r,o){var a=r*r;o.r=6*(a-r)*e.r+(3*a-4*r+1)*t.r+6*(-a+r)*n.r+(3*a-2*r)*i.r,o.g=6*(a-r)*e.g+(3*a-4*r+1)*t.g+6*(-a+r)*n.g+(3*a-2*r)*i.g,o.b=6*(a-r)*e.b+(3*a-4*r+1)*t.b+6*(-a+r)*n.b+(3*a-2*r)*i.b},e.Red=function(){return new e(1,0,0)},e.Green=function(){return new e(0,1,0)},e.Blue=function(){return new e(0,0,1)},e.Black=function(){return new e(0,0,0)},Object.defineProperty(e,"BlackReadOnly",{get:function(){return e._BlackReadOnly},enumerable:!1,configurable:!0}),e.White=function(){return new e(1,1,1)},e.Purple=function(){return new e(.5,0,.5)},e.Magenta=function(){return new e(1,0,1)},e.Yellow=function(){return new e(1,1,0)},e.Gray=function(){return new e(.5,.5,.5)},e.Teal=function(){return new e(0,1,1)},e.Random=function(){return new e(Math.random(),Math.random(),Math.random())},e._BlackReadOnly=e.Black(),e}(),U=function(){function e(e,t,n,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=1),this.r=e,this.g=t,this.b=n,this.a=i}return e.prototype.addInPlace=function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this.a+=e.a,this},e.prototype.asArray=function(){return[this.r,this.g,this.b,this.a]},e.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e[t+3]=this.a,this},e.prototype.fromArray=function(t,n){return void 0===n&&(n=0),e.FromArrayToRef(t,n,this),this},e.prototype.equals=function(e){return e&&this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a},e.prototype.add=function(t){return new e(this.r+t.r,this.g+t.g,this.b+t.b,this.a+t.a)},e.prototype.subtract=function(t){return new e(this.r-t.r,this.g-t.g,this.b-t.b,this.a-t.a)},e.prototype.subtractToRef=function(e,t){return t.r=this.r-e.r,t.g=this.g-e.g,t.b=this.b-e.b,t.a=this.a-e.a,this},e.prototype.scale=function(t){return new e(this.r*t,this.g*t,this.b*t,this.a*t)},e.prototype.scaleInPlace=function(e){return this.r*=e,this.g*=e,this.b*=e,this.a*=e,this},e.prototype.scaleToRef=function(e,t){return t.r=this.r*e,t.g=this.g*e,t.b=this.b*e,t.a=this.a*e,this},e.prototype.scaleAndAddToRef=function(e,t){return t.r+=this.r*e,t.g+=this.g*e,t.b+=this.b*e,t.a+=this.a*e,this},e.prototype.clampToRef=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=1),n.r=h.Clamp(this.r,e,t),n.g=h.Clamp(this.g,e,t),n.b=h.Clamp(this.b,e,t),n.a=h.Clamp(this.a,e,t),this},e.prototype.multiply=function(t){return new e(this.r*t.r,this.g*t.g,this.b*t.b,this.a*t.a)},e.prototype.multiplyToRef=function(e,t){return t.r=this.r*e.r,t.g=this.g*e.g,t.b=this.b*e.b,t.a=this.a*e.a,t},e.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+" A:"+this.a+"}"},e.prototype.getClassName=function(){return"Color4"},e.prototype.getHashCode=function(){var e=255*this.r|0;return 397*(e=397*(e=397*e^(255*this.g|0))^(255*this.b|0))^(255*this.a|0)},e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.a)},e.prototype.copyFrom=function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this},e.prototype.copyFromFloats=function(e,t,n,i){return this.r=e,this.g=t,this.b=n,this.a=i,this},e.prototype.set=function(e,t,n,i){return this.copyFromFloats(e,t,n,i)},e.prototype.toHexString=function(e){void 0===e&&(e=!1);var t=Math.round(255*this.r),n=Math.round(255*this.g),i=Math.round(255*this.b);if(e)return"#"+h.ToHex(t)+h.ToHex(n)+h.ToHex(i);var r=Math.round(255*this.a);return"#"+h.ToHex(t)+h.ToHex(n)+h.ToHex(i)+h.ToHex(r)},e.prototype.toLinearSpace=function(t){void 0===t&&(t=!1);var n=new e;return this.toLinearSpaceToRef(n,t),n},e.prototype.toLinearSpaceToRef=function(e,t){return void 0===t&&(t=!1),t?(e.r=N(this.r),e.g=N(this.g),e.b=N(this.b)):(e.r=D(this.r),e.g=D(this.g),e.b=D(this.b)),e.a=this.a,this},e.prototype.toGammaSpace=function(t){void 0===t&&(t=!1);var n=new e;return this.toGammaSpaceToRef(n,t),n},e.prototype.toGammaSpaceToRef=function(e,t){return void 0===t&&(t=!1),t?(e.r=F(this.r),e.g=F(this.g),e.b=F(this.b)):(e.r=L(this.r),e.g=L(this.g),e.b=L(this.b)),e.a=this.a,this},e.FromHexString=function(t){if("#"!==t.substring(0,1)||9!==t.length&&7!==t.length)return new e(0,0,0,0);var n=parseInt(t.substring(1,3),16),i=parseInt(t.substring(3,5),16),r=parseInt(t.substring(5,7),16),o=9===t.length?parseInt(t.substring(7,9),16):255;return e.FromInts(n,i,r,o)},e.Lerp=function(t,n,i){var r=new e(0,0,0,0);return e.LerpToRef(t,n,i,r),r},e.LerpToRef=function(e,t,n,i){i.r=e.r+(t.r-e.r)*n,i.g=e.g+(t.g-e.g)*n,i.b=e.b+(t.b-e.b)*n,i.a=e.a+(t.a-e.a)*n},e.Hermite=function(t,n,i,r,o){var a=o*o,s=o*a,c=2*s-3*a+1,l=-2*s+3*a,u=s-2*a+o,h=s-a;return new e(t.r*c+i.r*l+n.r*u+r.r*h,t.g*c+i.g*l+n.g*u+r.g*h,t.b*c+i.b*l+n.b*u+r.b*h,t.a*c+i.a*l+n.a*u+r.a*h)},e.Hermite1stDerivative=function(t,n,i,r,o){var a=new e;return this.Hermite1stDerivativeToRef(t,n,i,r,o,a),a},e.Hermite1stDerivativeToRef=function(e,t,n,i,r,o){var a=r*r;o.r=6*(a-r)*e.r+(3*a-4*r+1)*t.r+6*(-a+r)*n.r+(3*a-2*r)*i.r,o.g=6*(a-r)*e.g+(3*a-4*r+1)*t.g+6*(-a+r)*n.g+(3*a-2*r)*i.g,o.b=6*(a-r)*e.b+(3*a-4*r+1)*t.b+6*(-a+r)*n.b+(3*a-2*r)*i.b,o.a=6*(a-r)*e.a+(3*a-4*r+1)*t.a+6*(-a+r)*n.a+(3*a-2*r)*i.a},e.FromColor3=function(t,n){return void 0===n&&(n=1),new e(t.r,t.g,t.b,n)},e.FromArray=function(t,n){return void 0===n&&(n=0),new e(t[n],t[n+1],t[n+2],t[n+3])},e.FromArrayToRef=function(e,t,n){void 0===t&&(t=0),n.r=e[t],n.g=e[t+1],n.b=e[t+2],n.a=e[t+3]},e.FromInts=function(t,n,i,r){return new e(t/255,n/255,i/255,r/255)},e.CheckColors4=function(e,t){if(e.length===3*t){for(var n=[],i=0;i=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function X(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))}function Y(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]this.value;case t.IsLesser:return this._effectiveTarget[this._property]").concat(o,"
");e._AddLogEntry(c),e._GenerateLimitMessage(r,t)}},Object.defineProperty(e,"LogCache",{get:function(){return e._LogCache},enumerable:!1,configurable:!0}),e.ClearLogCache=function(){e._LogCache="",e._LogLimitOutputs={},e.errorsCount=0},Object.defineProperty(e,"LogLevels",{set:function(t){var n=this;e.Log=e._LogDisabled,e.Warn=e._LogDisabled,e.Error=e._LogDisabled,[e.MessageLogLevel,e.WarningLogLevel,e.ErrorLogLevel].forEach((function(i){(t&i)===i&&(e[n._Levels[i].name]=e._LogEnabled.bind(e,i))}))},enumerable:!1,configurable:!0}),e.NoneLogLevel=0,e.MessageLogLevel=1,e.WarningLogLevel=2,e.ErrorLogLevel=4,e.AllLogLevel=7,e.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",e._LogCache="",e._LogLimitOutputs={},e._Levels=[{},{color:"white",logFunc:console.log,name:"Log"},{color:"orange",logFunc:console.warn,name:"Warn"},{},{color:"red",logFunc:console.error,name:"Error"}],e.errorsCount=0,e.Log=e._LogEnabled.bind(e,e.MessageLogLevel),e.Warn=e._LogEnabled.bind(e,e.WarningLogLevel),e.Error=e._LogEnabled.bind(e,e.ErrorLogLevel),e}(),ee=function(e){function t(t,n,i,r){var o=e.call(this,t,r)||this;return o.propertyPath=i,o._target=o._effectiveTarget=n,o}return H(t,e),t.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath)},t.prototype.execute=function(){this._effectiveTarget[this._property]=!this._effectiveTarget[this._property]},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"SwitchBooleanAction",properties:[V._GetTargetProperty(this._target),{name:"propertyPath",value:this.propertyPath}]},t)},t}(V),te=function(e){function t(t,n,i,r){var o=e.call(this,t,r)||this;return o.value=i,o._target=n,o}return H(t,e),t.prototype.execute=function(){this._target.state=this.value},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"SetStateAction",properties:[V._GetTargetProperty(this._target),{name:"value",value:this.value}]},t)},t}(V),ne=function(e){function t(t,n,i,r,o){var a=e.call(this,t,o)||this;return a.propertyPath=i,a.value=r,a._target=a._effectiveTarget=n,a}return H(t,e),t.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath)},t.prototype.execute=function(){this._effectiveTarget[this._property]=this.value,this._target.markAsDirty&&this._target.markAsDirty(this._property)},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"SetValueAction",properties:[V._GetTargetProperty(this._target),{name:"propertyPath",value:this.propertyPath},{name:"value",value:V._SerializeValueAsString(this.value)}]},t)},t}(V),ie=function(e){function t(t,n,i,r,o){var a=e.call(this,t,o)||this;return a.propertyPath=i,a.value=r,a._target=a._effectiveTarget=n,a}return H(t,e),t.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath),"number"!=typeof this._effectiveTarget[this._property]&&J.Warn("Warning: IncrementValueAction can only be used with number values")},t.prototype.execute=function(){this._effectiveTarget[this._property]+=this.value,this._target.markAsDirty&&this._target.markAsDirty(this._property)},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"IncrementValueAction",properties:[V._GetTargetProperty(this._target),{name:"propertyPath",value:this.propertyPath},{name:"value",value:V._SerializeValueAsString(this.value)}]},t)},t}(V),re=function(e){function t(t,n,i,r,o,a){var s=e.call(this,t,a)||this;return s.from=i,s.to=r,s.loop=o,s._target=n,s}return H(t,e),t.prototype._prepare=function(){},t.prototype.execute=function(){this._actionManager.getScene().beginAnimation(this._target,this.from,this.to,this.loop)},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"PlayAnimationAction",properties:[V._GetTargetProperty(this._target),{name:"from",value:String(this.from)},{name:"to",value:String(this.to)},{name:"loop",value:V._SerializeValueAsString(this.loop)||!1}]},t)},t}(V),oe=function(e){function t(t,n,i){var r=e.call(this,t,i)||this;return r._target=n,r}return H(t,e),t.prototype._prepare=function(){},t.prototype.execute=function(){this._actionManager.getScene().stopAnimation(this._target)},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"StopAnimationAction",properties:[V._GetTargetProperty(this._target)]},t)},t}(V),ae=function(e){function t(t,n){return void 0===t&&(t=a.ACTION_NothingTrigger),e.call(this,t,n)||this}return H(t,e),t.prototype.execute=function(){},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"DoNothingAction",properties:[]},t)},t}(V),se=function(e){function t(t,n,i,r){void 0===r&&(r=!0);var o=e.call(this,t,i)||this;return o.children=n,o.enableChildrenConditions=r,o}return H(t,e),t.prototype._prepare=function(){for(var e=0;e0)if("object"==typeof l[0])for(var h=0;h-1&&this._scene.actionManagers.splice(n,1);for(var o=0,a=this._scene.meshes.filter((function(t){return t.actionManager===e}));o-1)return!0}return!1},t.prototype.hasSpecificTriggers2=function(e,t){for(var n=0;n=t.OnPickTrigger&&n.trigger<=t.OnPointerOutTrigger)return!0}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasPickTriggers",{get:function(){for(var e=0;e=t.OnPickTrigger&&n.trigger<=t.OnPickUpTrigger)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.registerAction=function(e){return e.trigger===t.OnEveryFrameTrigger&&this.getScene().actionManager!==this?(J.Warn("OnEveryFrameTrigger can only be used with scene.actionManager"),null):(this.actions.push(e),this.getScene()._registeredActions++,t.Triggers[e.trigger]?t.Triggers[e.trigger]++:t.Triggers[e.trigger]=1,e._actionManager=this,e._prepare(),e)},t.prototype.unregisterAction=function(e){var n=this.actions.indexOf(e);return-1!==n&&(this.actions.splice(n,1),t.Triggers[e.trigger]-=1,0===t.Triggers[e.trigger]&&delete t.Triggers[e.trigger],e._actionManager=null,this.getScene()._registeredActions--,!0)},t.prototype.processTrigger=function(e,n){for(var i=0;i0;if(2===e.type?u.push(r):u.push(n),p){for(var f=[],m=0;m0){var u=l.properties[0].value,h=null===l.properties[0].targetType?u:i.getMeshByName(u);h._meshId&&(h.mesh=i.getMeshById(h._meshId)),c={trigger:t[l.name],parameter:h}}else c=t[l.name];for(var d=0;d1)for(var c=0;c0||e.CustomRequestModifiers.length>0},enumerable:!1,configurable:!0}),e.prototype._injectCustomRequestHeaders=function(){if(!this._shouldSkipRequestModifications(this._requestURL))for(var t in e.CustomRequestHeaders){var n=e.CustomRequestHeaders[t];n&&this._xhr.setRequestHeader(t,n)}},e.prototype._shouldSkipRequestModifications=function(t){return e.SkipRequestModificationForBabylonCDN&&(t.includes("preview.babylonjs.com")||t.includes("cdn.babylonjs.com"))},Object.defineProperty(e.prototype,"onprogress",{get:function(){return this._xhr.onprogress},set:function(e){this._xhr.onprogress=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._xhr.readyState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._xhr.status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statusText",{get:function(){return this._xhr.statusText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._xhr.response},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseURL",{get:function(){return this._xhr.responseURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseText",{get:function(){return this._xhr.responseText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseType",{get:function(){return this._xhr.responseType},set:function(e){this._xhr.responseType=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timeout",{get:function(){return this._xhr.timeout},set:function(e){this._xhr.timeout=e},enumerable:!1,configurable:!0}),e.prototype.addEventListener=function(e,t,n){this._xhr.addEventListener(e,t,n)},e.prototype.removeEventListener=function(e,t,n){this._xhr.removeEventListener(e,t,n)},e.prototype.abort=function(){this._xhr.abort()},e.prototype.send=function(t){e.CustomRequestHeaders&&this._injectCustomRequestHeaders(),this._xhr.send(t)},e.prototype.open=function(t,n){for(var i=0,r=e.CustomRequestModifiers;i=0?c.referenceFrame:0,h=0,d=l._keys[0],p=l._keys.length-1,f=l._keys[p],m={referenceValue:d.value,referencePosition:w.Vector3[0],referenceQuaternion:w.Quaternion[0],referenceScaling:w.Vector3[1],keyPosition:w.Vector3[2],keyQuaternion:w.Quaternion[1],keyScaling:w.Vector3[3]},_=d.frame,g=f.frame;if(c.range){var y=l.getRange(c.range);y&&(_=y.from,g=y.to)}else _=null!==(a=c.fromFrame)&&void 0!==a?a:_,g=null!==(s=c.toFrame)&&void 0!==s?s:g;if(_!==d.frame&&(h=l.createKeyForFrame(_)),g!==f.frame&&(p=l.createKeyForFrame(g)),1===l._keys.length){var v=l._getKeyValue(l._keys[0]);m.referenceValue=v.clone?v.clone():v}else u<=d.frame?(v=l._getKeyValue(d.value),m.referenceValue=v.clone?v.clone():v):u>=f.frame?(v=l._getKeyValue(f.value),m.referenceValue=v.clone?v.clone():v):($e.key=0,v=l._interpolate(u,$e),m.referenceValue=v.clone?v.clone():v);l.dataType===e.ANIMATIONTYPE_QUATERNION?m.referenceValue.normalize().conjugateInPlace():l.dataType===e.ANIMATIONTYPE_MATRIX&&(m.referenceValue.decompose(m.referenceScaling,m.referenceQuaternion,m.referencePosition),m.referenceQuaternion.normalize().conjugateInPlace());for(var b=Number.MAX_VALUE,T=c.clipKeys?[]:null,E=h;E<=p;E++){var A=l._keys[E];if(T&&(A={frame:A.frame,value:A.value.clone?A.value.clone():A.value,inTangent:A.inTangent,outTangent:A.outTangent,interpolation:A.interpolation,lockedTangent:A.lockedTangent},b===Number.MAX_VALUE&&(b=A.frame),A.frame-=b,T.push(A)),!E||l.dataType===e.ANIMATIONTYPE_FLOAT||A.value!==d.value)switch(l.dataType){case e.ANIMATIONTYPE_MATRIX:A.value.decompose(m.keyScaling,m.keyQuaternion,m.keyPosition),m.keyPosition.subtractInPlace(m.referencePosition),m.keyScaling.divideInPlace(m.referenceScaling),m.referenceQuaternion.multiplyToRef(m.keyQuaternion,m.keyQuaternion),R.ComposeToRef(m.keyScaling,m.keyQuaternion,m.keyPosition,A.value);break;case e.ANIMATIONTYPE_QUATERNION:m.referenceValue.multiplyToRef(A.value,A.value);break;case e.ANIMATIONTYPE_VECTOR2:case e.ANIMATIONTYPE_VECTOR3:case e.ANIMATIONTYPE_COLOR3:case e.ANIMATIONTYPE_COLOR4:A.value.subtractToRef(m.referenceValue,A.value);break;case e.ANIMATIONTYPE_SIZE:A.value.width-=m.referenceValue.width,A.value.height-=m.referenceValue.height;break;default:A.value-=m.referenceValue}}return T&&l.setKeys(T,!0),l},e.TransitionTo=function(e,t,n,i,r,o,a,s){if(void 0===s&&(s=null),a<=0)return n[e]=t,s&&s(),null;var c=r*(a/1e3);o.setKeys([{frame:0,value:n[e].clone?n[e].clone():n[e]},{frame:c,value:t}]),n.animations||(n.animations=[]),n.animations.push(o);var l=i.beginAnimation(n,0,c,!1);return l.onAnimationEnd=s,l},Object.defineProperty(e.prototype,"runtimeAnimations",{get:function(){return this._runtimeAnimations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasRunningRuntimeAnimations",{get:function(){for(var e=0,t=this._runtimeAnimations;e=0;o--)this._keys[o].frame>=i&&this._keys[o].frame<=r&&this._keys.splice(o,1);this._ranges[e]=null}},e.prototype.getRange=function(e){return this._ranges[e]},e.prototype.getKeys=function(){return this._keys},e.prototype.getHighestFrame=function(){for(var e=0,t=0,n=this._keys.length;t0)return n.highLimitValue.clone?n.highLimitValue.clone():n.highLimitValue;for(var o=this._keys,a=o.length,s=n.key;s>=0&&t=o[s+1].frame;)++s;if(n.key=s,s<0)return i?void 0:this._getKeyValue(o[0].value);if(s+1>a-1)return i?void 0:this._getKeyValue(o[a-1].value);var c=o[s],l=o[s+1];if(!i||t!==c.frame&&t!==l.frame){var u=this._getKeyValue(c.value),h=this._getKeyValue(l.value);if(c.interpolation===Ue.STEP)return l.frame>t?u:h;var d=void 0!==c.outTangent&&void 0!==l.inTangent,p=l.frame-c.frame,f=(t-c.frame)/p,m=c.easingFunction||this.getEasingFunction();switch(null!==m&&(f=m.ease(f)),this.dataType){case e.ANIMATIONTYPE_FLOAT:var _=d?this.floatInterpolateFunctionWithTangents(u,c.outTangent*p,h,l.inTangent*p,f):this.floatInterpolateFunction(u,h,f);switch(n.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:case e.ANIMATIONLOOPMODE_YOYO:return _;case e.ANIMATIONLOOPMODE_RELATIVE:case e.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return(null!==(r=n.offsetValue)&&void 0!==r?r:0)*n.repeatCount+_}break;case e.ANIMATIONTYPE_QUATERNION:var g=d?this.quaternionInterpolateFunctionWithTangents(u,c.outTangent.scale(p),h,l.inTangent.scale(p),f):this.quaternionInterpolateFunction(u,h,f);switch(n.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:case e.ANIMATIONLOOPMODE_YOYO:return g;case e.ANIMATIONLOOPMODE_RELATIVE:case e.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return g.addInPlace((n.offsetValue||Xe).scale(n.repeatCount))}return g;case e.ANIMATIONTYPE_VECTOR3:var y=d?this.vector3InterpolateFunctionWithTangents(u,c.outTangent.scale(p),h,l.inTangent.scale(p),f):this.vector3InterpolateFunction(u,h,f);switch(n.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:case e.ANIMATIONLOOPMODE_YOYO:return y;case e.ANIMATIONLOOPMODE_RELATIVE:case e.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return y.add((n.offsetValue||Ye).scale(n.repeatCount))}break;case e.ANIMATIONTYPE_VECTOR2:var v=d?this.vector2InterpolateFunctionWithTangents(u,c.outTangent.scale(p),h,l.inTangent.scale(p),f):this.vector2InterpolateFunction(u,h,f);switch(n.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:case e.ANIMATIONLOOPMODE_YOYO:return v;case e.ANIMATIONLOOPMODE_RELATIVE:case e.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return v.add((n.offsetValue||qe).scale(n.repeatCount))}break;case e.ANIMATIONTYPE_SIZE:switch(n.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:case e.ANIMATIONLOOPMODE_YOYO:return this.sizeInterpolateFunction(u,h,f);case e.ANIMATIONLOOPMODE_RELATIVE:case e.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return this.sizeInterpolateFunction(u,h,f).add((n.offsetValue||Ke).scale(n.repeatCount))}break;case e.ANIMATIONTYPE_COLOR3:var b=d?this.color3InterpolateFunctionWithTangents(u,c.outTangent.scale(p),h,l.inTangent.scale(p),f):this.color3InterpolateFunction(u,h,f);switch(n.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:case e.ANIMATIONLOOPMODE_YOYO:return b;case e.ANIMATIONLOOPMODE_RELATIVE:case e.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return b.add((n.offsetValue||Qe).scale(n.repeatCount))}break;case e.ANIMATIONTYPE_COLOR4:var T=d?this.color4InterpolateFunctionWithTangents(u,c.outTangent.scale(p),h,l.inTangent.scale(p),f):this.color4InterpolateFunction(u,h,f);switch(n.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:case e.ANIMATIONLOOPMODE_YOYO:return T;case e.ANIMATIONLOOPMODE_RELATIVE:case e.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return T.add((n.offsetValue||Ze).scale(n.repeatCount))}break;case e.ANIMATIONTYPE_MATRIX:switch(n.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:case e.ANIMATIONLOOPMODE_YOYO:return e.AllowMatricesInterpolation?this.matrixInterpolateFunction(u,h,f,n.workValue):u;case e.ANIMATIONLOOPMODE_RELATIVE:case e.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return u}}return 0}},e.prototype.matrixInterpolateFunction=function(t,n,i,r){return e.AllowMatrixDecomposeForInterpolation?r?(R.DecomposeLerpToRef(t,n,i,r),r):R.DecomposeLerp(t,n,i):r?(R.LerpToRef(t,n,i,r),r):R.Lerp(t,n,i)},e.prototype.clone=function(){var t=new e(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,this._keys&&t.setKeys(this._keys),this._ranges)for(var n in t._ranges={},this._ranges){var i=this._ranges[n];i&&(t._ranges[n]=i.clone())}return t},e.prototype.setKeys=function(e,t){void 0===t&&(t=!1),this._keys=t?e:e.slice(0)},e.prototype.createKeyForFrame=function(e){$e.key=0;var t=this._interpolate(e,$e,!0);if(!t)return this._keys[$e.key].frame===e?$e.key:$e.key+1;var n={frame:e,value:t.clone?t.clone():t};return this._keys.splice($e.key+1,0,n),$e.key+1},e.prototype.serialize=function(){var t={};t.name=this.name,t.property=this.targetProperty,t.framePerSecond=this.framePerSecond,t.dataType=this.dataType,t.loopBehavior=this.loopMode,t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed;var n=this.dataType;t.keys=[];for(var i=this.getKeys(),r=0;r=2&&(c=s.values[1]),s.values.length>=3&&(l=s.values[2]),s.values.length>=4&&(u=s.values[3]);break;case e.ANIMATIONTYPE_QUATERNION:if(n=I.FromArray(s.values),s.values.length>=8){var h=I.FromArray(s.values.slice(4,8));h.equals(I.Zero())||(c=h)}if(s.values.length>=12){var d=I.FromArray(s.values.slice(8,12));d.equals(I.Zero())||(l=d)}s.values.length>=13&&(u=s.values[12]);break;case e.ANIMATIONTYPE_MATRIX:n=R.FromArray(s.values),s.values.length>=17&&(u=s.values[16]);break;case e.ANIMATIONTYPE_COLOR3:n=B.FromArray(s.values),s.values[3]&&(c=B.FromArray(s.values[3])),s.values[4]&&(l=B.FromArray(s.values[4])),s.values[5]&&(u=s.values[5]);break;case e.ANIMATIONTYPE_COLOR4:n=U.FromArray(s.values),s.values[4]&&(c=U.FromArray(s.values[4])),s.values[5]&&(l=U.FromArray(s.values[5])),s.values[6]&&(u=U.FromArray(s.values[6]));break;case e.ANIMATIONTYPE_VECTOR3:default:n=C.FromArray(s.values),s.values[3]&&(c=C.FromArray(s.values[3])),s.values[4]&&(l=C.FromArray(s.values[4])),s.values[5]&&(u=s.values[5])}var p={};p.frame=s.frame,p.value=n,null!=c&&(p.inTangent=c),null!=l&&(p.outTangent=l),null!=u&&(p.interpolation=u),a.push(p)}if(r.setKeys(a),t.ranges)for(i=0;i0&&u.forEach((function(e){r._events.push(e._clone())})),this._enableBlending=e&&e.animationPropertiesOverride?e.animationPropertiesOverride.enableBlending:this._animation.enableBlending}return Object.defineProperty(e.prototype,"currentFrame",{get:function(){return this._currentFrame},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"weight",{get:function(){return this._weight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetPath",{get:function(){return this._targetPath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._currentActiveTarget},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAdditive",{get:function(){return this._host&&this._host.isAdditive},enumerable:!1,configurable:!0}),e.prototype._preparePath=function(e,t){void 0===t&&(t=0);var n=this._animation.targetPropertyPath;if(n.length>1){for(var i=e[n[0]],r=1;r-1&&this._animation.runtimeAnimations.splice(e,1)},e.prototype.setValue=function(e,t){if(this._targetIsArray)for(var n=0;nt[t.length-1].frame&&(e=t[t.length-1].frame);var n=this._events;if(n.length)for(var i=0;ithis._maxFrame)&&(t=this._minFrame),(nthis._maxFrame)&&(n=this._maxFrame);var l,u,h=n-t,d=e*(a.framePerSecond*r)/1e3+this._absoluteFrameOffset,p=0;if(i&&this._animationState.loopMode===Je.ANIMATIONLOOPMODE_YOYO){var f=(d-t)/h;d=Math.abs(Math.sin(f*Math.PI))*h+t}if(this._previousElapsedTime=e,this._previousAbsoluteFrame=d,!i&&n>=t&&d>=h)c=!1,p=a._getKeyValue(this._maxValue);else if(!i&&t>=n&&d<=h)c=!1,p=a._getKeyValue(this._minValue);else if(this._animationState.loopMode!==Je.ANIMATIONLOOPMODE_CYCLE){var m=n.toString()+t.toString();if(!this._offsetsCache[m]){this._animationState.repeatCount=0,this._animationState.loopMode=Je.ANIMATIONLOOPMODE_CYCLE;var _=a._interpolate(t,this._animationState),g=a._interpolate(n,this._animationState);switch(this._animationState.loopMode=this._getCorrectLoopMode(),a.dataType){case Je.ANIMATIONTYPE_FLOAT:this._offsetsCache[m]=g-_;break;case Je.ANIMATIONTYPE_QUATERNION:case Je.ANIMATIONTYPE_VECTOR3:case Je.ANIMATIONTYPE_VECTOR2:case Je.ANIMATIONTYPE_SIZE:case Je.ANIMATIONTYPE_COLOR3:this._offsetsCache[m]=g.subtract(_)}this._highLimitsCache[m]=g}p=this._highLimitsCache[m],l=this._offsetsCache[m]}if(void 0===l)switch(a.dataType){case Je.ANIMATIONTYPE_FLOAT:l=0;break;case Je.ANIMATIONTYPE_QUATERNION:l=Xe;break;case Je.ANIMATIONTYPE_VECTOR3:l=Ye;break;case Je.ANIMATIONTYPE_VECTOR2:l=qe;break;case Je.ANIMATIONTYPE_SIZE:l=Ke;break;case Je.ANIMATIONTYPE_COLOR3:l=Qe;break;case Je.ANIMATIONTYPE_COLOR4:l=Ze}if(this._host&&this._host.syncRoot){var y=this._host.syncRoot;u=t+h*((y.masterFrame-y.fromFrame)/(y.toFrame-y.fromFrame))}else u=d>0&&t>n||d<0&&t0&&this.currentFrame>u||r<0&&this.currentFrame0?0:a.getKeys().length-1}this._currentFrame=u,this._animationState.repeatCount=0===h?0:d/h>>0,this._animationState.highLimitValue=p,this._animationState.offsetValue=l;var T=a._interpolate(u,this._animationState);if(this.setValue(T,o),v.length)for(b=0;b0&&u>=v[b].frame&&v[b].frame>=t||h<0&&u<=v[b].frame&&v[b].frame<=t){var E=v[b];E.isDone||(E.onlyOnce&&(v.splice(b,1),b--),E.isDone=!0,E.action(u))}return c||(this._stopped=!0),c},e}();function nt(){return"undefined"!=typeof window}function it(){return"undefined"!=typeof navigator}function rt(){return"undefined"!=typeof document}function ot(e){for(var t="",n=e.firstChild;n;)3===n.nodeType&&(t+=n.textContent),n=n.nextSibling;return t}var at,st={IsWindowObjectExist:nt,IsNavigatorAvailable:it,IsDocumentAvailable:rt,GetDOMTextContent:ot},ct=function(){function e(){}return Object.defineProperty(e,"Now",{get:function(){return nt()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!1,configurable:!0}),e}(),lt=function(){function e(){}return e.FilesToLoad={},e}(),ut=function(){function e(){}return e.ExponentialBackoff=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=500),function(n,i,r){return 0!==i.status||r>=e||-1!==n.indexOf("file:")?-1:Math.pow(2,r)*t}},e}(),ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t._setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t}(Error),dt={MeshInvalidPositionsError:0,UnsupportedTextureError:1e3,GLTFLoaderUnexpectedMagicError:2e3,SceneLoaderError:3e3,LoadFileError:4e3,RequestFileError:4001,ReadFileError:4002},pt=function(e){function t(n,i,r){var o=e.call(this,n)||this;return o.errorCode=i,o.innerError=r,o.name="RuntimeError",ht._setPrototypeOf(o,t.prototype),o}return H(t,e),t}(ht),ft=function(e,t){return e.endsWith(t)},mt=function(e,t){return!!e&&e.startsWith(t)},_t=function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",n=0;n>2,o=(3&t)<<4|(n=u>4,a=(15&n)<<2|(i=u>6,s=63&i,isNaN(n)?a=s=64:isNaN(i)&&(s=64),l+=c.charAt(r)+c.charAt(o)+c.charAt(a)+c.charAt(s);return l},yt=function(e){return atob(e)},vt=function(e){for(var t=yt(e),n=t.length,i=new Uint8Array(new ArrayBuffer(n)),r=0;r1&&this._lines.push(r);else for(var a=i.split(";"),s=0;s1){for(o();-1!==r&&e._OperatorPriority[s()]>=e._OperatorPriority[d];)i.push(c());a(d),l++}else u+=h;l++}for(o();-1!==r;)"("===s()?c():i.push(c());return e._InfixToPostfixCache.size>=e.InfixToPostfixCacheLimitSize&&e.ClearCache(),e._InfixToPostfixCache.set(t,{result:i,accessTime:Date.now()}),i},e.ClearCache=function(){for(var t=Array.from(e._InfixToPostfixCache.entries()).sort((function(e,t){return e[1].accessTime-t[1].accessTime})),n=0;n":n=i>r;break;case"<":n=i=":n=i>=r;break;case"==":n=i===r;break;case"!=":n=i!==r}return n},t}(Ct);!function(e){e[e.GLSL=0]="GLSL",e[e.WGSL=1]="WGSL"}(at||(at={}));var wt,Mt=/defined\s*?\((.+?)\)/g,Dt=/defined\s*?\[(.+?)\]/g,Nt=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g,Lt=/__decl__/,Ft=/light\{X\}.(\w*)/g,Bt=/\{X\}/g,Ut=[],kt=function(){function e(){}return e.Initialize=function(e){e.processor&&e.processor.initializeShaders&&e.processor.initializeShaders(e.processingContext)},e.Process=function(e,t,n,i){var r,o=this;(null===(r=t.processor)||void 0===r?void 0:r.preProcessShaderCode)&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),this._ProcessIncludes(e,t,(function(e){t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e));var r=o._ProcessShaderConversion(e,t,i);n(r,e)}))},e.PreProcess=function(e,t,n,i){var r,o=this;(null===(r=t.processor)||void 0===r?void 0:r.preProcessShaderCode)&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),this._ProcessIncludes(e,t,(function(e){t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e));var r=o._ApplyPreProcessing(e,t,i);n(r,e)}))},e.Finalize=function(e,t,n){return n.processor&&n.processor.finalizeShaders?n.processor.finalizeShaders(e,t,n.processingContext):{vertexCode:e,fragmentCode:t}},e._ProcessPrecision=function(e,t){var n;if(null===(n=t.processor)||void 0===n?void 0:n.noPrecision)return e;var i=t.shouldUseHighPrecisionShader;return-1===e.indexOf("precision highp float")?e=i?"precision highp float;\n"+e:"precision mediump float;\n"+e:i||(e=e.replace("precision highp float","precision mediump float")),e},e._ExtractOperation=function(e){var t=/defined\((.+)\)/.exec(e);if(t&&t.length)return new Pt(t[1].trim(),"!"===e[0]);for(var n="",i=0,r=0,o=["==","!=",">=","<=","<",">"];r-1));r++);if(-1===i)return new Pt(e);var a=e.substring(0,i).trim(),s=e.substring(i+n.length).trim();return new Ot(a,n,s)},e._BuildSubExpression=function(e){e=e.replace(Mt,"defined[$1]");for(var t=[],n=0,i=Ct.infixToPostfix(e);n=2){var o=t[t.length-1],a=t[t.length-2];t.length-=2;var s="&&"==r?new Rt:new It;"string"==typeof o&&(o=o.replace(Dt,"defined($1)")),"string"==typeof a&&(a=a.replace(Dt,"defined($1)")),s.leftOperand="string"==typeof a?this._ExtractOperation(a):a,s.rightOperand="string"==typeof o?this._ExtractOperation(o):o,t.push(s)}}var c=t[t.length-1];return"string"==typeof c&&(c=c.replace(Dt,"defined($1)")),"string"==typeof c?this._ExtractOperation(c):c},e._BuildExpression=function(e,t){var n=new St,i=e.substring(0,t),r=e.substring(t);return r=r.substring(0,(r.indexOf("//")+1||r.length+1)-1).trim(),n.testExpression="#ifdef"===i?new Pt(r):"#ifndef"===i?new Pt(r,!0):this._BuildSubExpression(r),n},e._MoveCursorWithinIf=function(e,t,n){for(var i=e.currentLine;this._MoveCursor(e,n);){var r=(i=e.currentLine).substring(0,5).toLowerCase();if("#else"===r){var o=new Et;return t.children.push(o),void this._MoveCursor(e,o)}if("#elif"===r){var a=this._BuildExpression(i,5);t.children.push(a),n=a}}},e._MoveCursor=function(t,n){for(;t.canRead;){t.lineIndex++;var i=t.currentLine;if(i.indexOf("#")>=0){var r=e._MoveCursorRegex.exec(i);if(r&&r.length){switch(r[0]){case"#ifdef":var o=new xt;n.children.push(o);var a=this._BuildExpression(i,6);o.children.push(a),this._MoveCursorWithinIf(t,o,a);break;case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":o=new xt,n.children.push(o),a=this._BuildExpression(i,7),o.children.push(a),this._MoveCursorWithinIf(t,o,a);break;case"#if":o=new xt,a=this._BuildExpression(i,3),n.children.push(o),o.children.push(a),this._MoveCursorWithinIf(t,o,a)}continue}}var s=new Et;if(s.line=i,n.children.push(s),"#"===i[0]&&"d"===i[1]){var c=i.replace(";","").split(" ");s.additionalDefineKey=c[1],3===c.length&&(s.additionalDefineValue=c[2])}}return!1},e._EvaluatePreProcessors=function(e,t,n){var i=new Et,r=new At;return r.lineIndex=-1,r.lines=e.split("\n"),this._MoveCursor(r,i),i.process(t,n)},e._PreparePreProcessors=function(e,t){for(var n,i={},r=0,o=e.defines;r1?a[1]:""}return(null===(n=e.processor)||void 0===n?void 0:n.shaderLanguage)===at.GLSL&&(i.GL_ES="true"),i.__VERSION__=e.version,i[e.platformName]="true",t._getGlobalDefines(i),i},e._ProcessShaderConversion=function(e,t,n){var i=this._ProcessPrecision(e,t);if(!t.processor)return i;if(t.processor.shaderLanguage===at.GLSL&&-1!==i.indexOf("#version 3")&&(i=i.replace("#version 300 es",""),!t.processor.parseGLES3))return i;var r=t.defines,o=this._PreparePreProcessors(t,n);return t.processor.preProcessor&&(i=t.processor.preProcessor(i,r,t.isFragment,t.processingContext)),i=this._EvaluatePreProcessors(i,o,t),t.processor.postProcessor&&(i=t.processor.postProcessor(i,r,t.isFragment,t.processingContext,n)),n._features.needShaderCodeInlining&&(i=n.inlineShaderCode(i)),i},e._ApplyPreProcessing=function(e,t,n){var i,r,o=e,a=t.defines,s=this._PreparePreProcessors(t,n);return(null===(i=t.processor)||void 0===i?void 0:i.preProcessor)&&(o=t.processor.preProcessor(o,a,t.isFragment,t.processingContext)),o=this._EvaluatePreProcessors(o,s,t),(null===(r=t.processor)||void 0===r?void 0:r.postProcessor)&&(o=t.processor.postProcessor(o,a,t.isFragment,t.processingContext,n)),n._features.needShaderCodeInlining&&(o=n.inlineShaderCode(o)),o},e._ProcessIncludes=function(t,n,i){var r,o=this;for(Ut.length=0;null!==(r=Nt.exec(t));)Ut.push(r);for(var a=String(t),s=[t],c=!1,l=function(t){var r=t[1];if(-1!==r.indexOf("__decl__")&&(r=r.replace(Lt,""),n.supportsUniformBuffers&&(r=r.replace("Vertex","Ubo").replace("Fragment","Ubo")),r+="Declaration"),!n.includesShadersStore[r]){var a=n.shadersRepository+"ShadersInclude/"+r+".fx";return e._FileToolsLoadFile(a,(function(e){n.includesShadersStore[r]=e,o._ProcessIncludes(s.join(""),n,i)})),{value:void 0}}var l=n.includesShadersStore[r];if(t[2])for(var u=t[3].split(","),h=0;h=0||l.indexOf("#include <")>=0},u=0,h=Ut;u-1?e:Vt.GetShadersRepository(this._shaderLanguage)+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",i))}else i(window.atob(e.substr(7)));else i(e.substr(7))},Object.defineProperty(e.prototype,"vertexSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getVertexShaderCode())&&void 0!==t?t:this._vertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fragmentSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getFragmentShaderCode())&&void 0!==t?t:this._fragmentSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vertexSourceCodeBeforeMigration",{get:function(){return this._vertexSourceCodeBeforeMigration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fragmentSourceCodeBeforeMigration",{get:function(){return this._fragmentSourceCodeBeforeMigration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawVertexSourceCode",{get:function(){return this._rawVertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawFragmentSourceCode",{get:function(){return this._rawFragmentSourceCode},enumerable:!1,configurable:!0}),e.prototype._rebuildProgram=function(e,t,n,i){var r=this;this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=function(e,t){i&&i(t)},this.onCompiled=function(){var e=r.getEngine().scenes;if(e)for(var t=0;t=a&&(r="Offending line [".concat(a,"] in ").concat(n?"fragment":"vertex"," code: ").concat(s[a-1]))}}return[e,r]},e.prototype._processCompilationErrors=function(t,n){var i,r,o,a,s,c=this;void 0===n&&(n=null),this._compilationError=t.message;var l=this._attributesNames,u=this._fallbacks;if(J.Error("Unable to compile effect:"),J.Error("Uniforms: "+this._uniformsNames.map((function(e){return" "+e}))),J.Error("Attributes: "+l.map((function(e){return" "+e}))),J.Error("Defines:\n"+this.defines),e.LogShaderCodeOnCompilationError){var h=null,d=null,p=null;(null===(o=this._pipelineContext)||void 0===o?void 0:o._getVertexShaderCode())&&(p=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1))[0],h=i[1],p&&(J.Error("Vertex code:"),J.Error(p))),(null===(a=this._pipelineContext)||void 0===a?void 0:a._getFragmentShaderCode())&&(p=(r=this._getShaderCodeAndErrorLine(null===(s=this._pipelineContext)||void 0===s?void 0:s._getFragmentShaderCode(),this._compilationError,!0))[0],d=r[1],p&&(J.Error("Fragment code:"),J.Error(p))),h&&J.Error(h),d&&J.Error(d)}J.Error("Error: "+this._compilationError);var f=function(){c.onError&&c.onError(c,c._compilationError),c.onErrorObservable.notifyObservers(c)};n&&(this._pipelineContext=n,this._isReady=!0,f()),u?(this._pipelineContext=null,u.hasMoreFallbacks?(this._allFallbacksProcessed=!1,J.Error("Trying next fallback."),this.defines=u.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,f(),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):(this._allFallbacksProcessed=!0,n||f())},Object.defineProperty(e.prototype,"isSupported",{get:function(){return""===this._compilationError},enumerable:!1,configurable:!0}),e.prototype._bindTexture=function(e,t){this._engine._bindTexture(this._samplers[e],t,e)},e.prototype.setTexture=function(e,t){this._engine.setTexture(this._samplers[e],this._uniforms[e],t,e)},e.prototype.setDepthStencilTexture=function(e,t){this._engine.setDepthStencilTexture(this._samplers[e],this._uniforms[e],t,e)},e.prototype.setTextureArray=function(e,t){var n=e+"Ex";if(-1===this._samplerList.indexOf(n+"0")){for(var i=this._samplerList.indexOf(e),r=1;r0&&parseInt(w[w.length-1])>=O)continue}for(var M=0,D=I;M1?new Kt:new Yt,this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent);var F="Babylon.js v".concat(e.Version);J.Log(F+" - ".concat(this.description)),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",F)}}return Object.defineProperty(e,"NpmPackage",{get:function(){return"babylonjs@6.35.0"},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Version",{get:function(){return"6.35.0"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){var e=this.name+this.webGLVersion;return this._caps.parallelShaderCompile&&(e+=" - Parallel shader compilation"),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._webGLVersion},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),Object.defineProperty(e,"ShadersRepository",{get:function(){return zt.ShadersRepository},set:function(e){zt.ShadersRepository=e},enumerable:!1,configurable:!0}),e.prototype._getShaderProcessor=function(e){return this._shaderProcessor},Object.defineProperty(e.prototype,"useReverseDepthBuffer",{get:function(){return this._useReverseDepthBuffer},set:function(e){e!==this._useReverseDepthBuffer&&(this._useReverseDepthBuffer=e,this._depthCullingState.depthFunc=e?a.GEQUAL:a.LEQUAL)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameId",{get:function(){return this._frameId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportsUniformBuffers",{get:function(){return this.webGLVersion>1&&!this.disableUniformBuffers},enumerable:!1,configurable:!0}),e.prototype.getCreationOptions=function(){return this._creationOptions},Object.defineProperty(e.prototype,"_shouldUseHighPrecisionShader",{get:function(){return!(!this._caps.highPrecisionShaderSupported||!this._highPrecisionShadersAllowed)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needPOTTextures",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeRenderLoops",{get:function(){return this._activeRenderLoops},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doNotHandleContextLost",{get:function(){return this._doNotHandleContextLost},set:function(e){this._doNotHandleContextLost=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"framebufferDimensionsObject",{set:function(e){this._framebufferDimensionsObject=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentViewport",{get:function(){return this._cachedViewport},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"emptyTexture",{get:function(){return this._emptyTexture||(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,a.TEXTUREFORMAT_RGBA,!1,!1,a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"emptyTexture3D",{get:function(){return this._emptyTexture3D||(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,a.TEXTUREFORMAT_RGBA,!1,!1,a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"emptyTexture2DArray",{get:function(){return this._emptyTexture2DArray||(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,a.TEXTUREFORMAT_RGBA,!1,!1,a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture2DArray},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"emptyCubeTexture",{get:function(){if(!this._emptyCubeTexture){var e=new Uint8Array(4),t=[e,e,e,e,e,e];this._emptyCubeTexture=this.createRawCubeTexture(t,1,a.TEXTUREFORMAT_RGBA,a.TEXTURETYPE_UNSIGNED_INT,!1,!1,a.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isWebGPU",{get:function(){return this._isWebGPU},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shaderPlatformName",{get:function(){return this._shaderPlatformName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapshotRendering",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapshotRenderingMode",{get:function(){return this._snapshotRenderingMode},set:function(e){this._snapshotRenderingMode=e},enumerable:!1,configurable:!0}),e.prototype.snapshotRenderingReset=function(){this.snapshotRendering=!1},e._CreateCanvas=function(e,t){if("undefined"==typeof document)return new OffscreenCanvas(e,t);var n=document.createElement("canvas");return n.width=e,n.height=t,n},e.prototype.createCanvas=function(t,n){return e._CreateCanvas(t,n)},e.prototype.createCanvasImage=function(){return document.createElement("img")},e.prototype._setupMobileChecks=function(){var e=this;navigator&&navigator.userAgent&&(this._checkForMobile=function(){var t=navigator.userAgent;e.hostInformation.isMobile=-1!==t.indexOf("Mobile")||-1!==t.indexOf("Mac")&&rt()&&"ontouchend"in document},this._checkForMobile(),nt()&&window.addEventListener("resize",this._checkForMobile))},e.prototype._restoreEngineAfterContextLost=function(e){var t=this;setTimeout((function(){return X(t,void 0,void 0,(function(){var t,n,i,r,o;return Y(this,(function(a){switch(a.label){case 0:return this._dummyFramebuffer=null,t=this._depthCullingState.depthTest,n=this._depthCullingState.depthFunc,i=this._depthCullingState.depthMask,r=this._stencilState.stencilTest,[4,e()];case 1:return a.sent(),this.wipeCaches(!0),this._rebuildEffects(),null===(o=this._rebuildComputeEffects)||void 0===o||o.call(this),this._rebuildBuffers(),this._rebuildInternalTextures(),this._rebuildRenderTargetWrappers(),this.wipeCaches(!0),this._depthCullingState.depthTest=t,this._depthCullingState.depthFunc=n,this._depthCullingState.depthMask=i,this._stencilState.stencilTest=r,J.Warn(this.name+" context successfully restored."),this.onContextRestoredObservable.notifyObservers(this),this._contextWasLost=!1,[2]}}))}))}),0)},e.prototype._sharedInit=function(e){this._renderingCanvas=e},e.prototype._getShaderProcessingContext=function(e){return null},e.prototype._rebuildInternalTextures=function(){for(var e=0,t=this._internalTexturesCache.slice();e1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),supportFloatTexturesResolve:!1,colorBufferHalfFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_half_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),texelFetch:1!==this._webGLVersion,blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_ARRAY_TEXTURE_LAYERS):128,disableMorphTargetTexture:!1},this._caps.supportFloatTexturesResolve=this._caps.colorBufferFloat,this._glVersion=this._gl.getParameter(this._gl.VERSION);var t=this._gl.getExtension("WEBGL_debug_renderer_info");if(null!=t&&(this._glRenderer=this._gl.getParameter(t.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(t.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),this._glRenderer||(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=(null!==(e=this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT))&&void 0!==e?e:0)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES);else{var n=this._gl.getExtension("WEBGL_draw_buffers");if(null!==n){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=n.drawBuffersWEBGL.bind(n),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var i=0;i<16;i++)this._gl["COLOR_ATTACHMENT"+i+"_WEBGL"]=n["COLOR_ATTACHMENT"+i+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{var r=this._gl.getExtension("WEBGL_depth_texture");null!=r&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=r.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{var o=this._gl.getExtension("OES_vertex_array_object");null!=o&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=o.createVertexArrayOES.bind(o),this._gl.bindVertexArray=o.bindVertexArrayOES.bind(o),this._gl.deleteVertexArray=o.deleteVertexArrayOES.bind(o))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{var a=this._gl.getExtension("ANGLE_instanced_arrays");null!=a?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=a.drawArraysInstancedANGLE.bind(a),this._gl.drawElementsInstanced=a.drawElementsInstancedANGLE.bind(a),this._gl.vertexAttribDivisor=a.vertexAttribDivisorANGLE.bind(a)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){var s=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),c=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);s&&c&&(this._caps.highPrecisionShaderSupported=0!==s.precision&&0!==c.precision)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{var l=this._gl.getExtension("EXT_blend_minmax");null!=l&&(this._caps.blendMinMax=!0,this._gl.MAX=l.MAX_EXT,this._gl.MIN=l.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:WebGL2RenderingContext.SRGB,SRGB8:WebGL2RenderingContext.SRGB8,SRGB8_ALPHA8:WebGL2RenderingContext.SRGB8_ALPHA8};else{var u=this._gl.getExtension("EXT_sRGB");null!=u&&(this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:u.SRGB_EXT,SRGB8:u.SRGB_ALPHA_EXT,SRGB8_ALPHA8:u.SRGB_ALPHA_EXT})}this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&!(!this._creationOptions||!this._creationOptions.forceSRGBBufferSupportState)}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var h=0;h=0&&(this._activeRenderLoops.splice(t,1),0==this._activeRenderLoops.length&&this._cancelFrame())},e.prototype._cancelFrame=function(){if(this._renderingQueueLaunched&&this._frameHandler){if(this._renderingQueueLaunched=!1,nt()){var e=(this.getHostWindow()||window).cancelAnimationFrame;if("function"==typeof e)return e(this._frameHandler)}else if("function"==typeof cancelAnimationFrame)return cancelAnimationFrame(this._frameHandler);return clearTimeout(this._frameHandler)}},e.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;if((this._isDisposed||!this.renderEvenInBackground&&this._windowIsBackground)&&(e=!1),e){this.beginFrame();for(var t=0;t0?this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},e.prototype.getRenderingCanvas=function(){return this._renderingCanvas},e.prototype.getAudioContext=function(){return this._audioContext},e.prototype.getAudioDestination=function(){return this._audioDestination},e.prototype.getHostWindow=function(){return nt()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null},e.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth},e.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight},e.prototype._queueNewFrame=function(t,n){return e.QueueNewFrame(t,n)},e.prototype.runRenderLoop=function(e){var t=this;-1===this._activeRenderLoops.indexOf(e)&&(this._activeRenderLoops.push(e),this._renderingQueueLaunched||(this._renderingQueueLaunched=!0,this._boundRenderFunction=function(){return t._renderLoop()},this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())))},e.prototype.clear=function(t,n,i,r){var o,s;void 0===r&&(r=!1);var c=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=c;var l=0;if(n&&t){var u=!0;if(this._currentRenderTarget){var h=null===(o=this._currentRenderTarget.texture)||void 0===o?void 0:o.format;if(h===a.TEXTUREFORMAT_RED_INTEGER||h===a.TEXTUREFORMAT_RG_INTEGER||h===a.TEXTUREFORMAT_RGB_INTEGER||h===a.TEXTUREFORMAT_RGBA_INTEGER){var d=null===(s=this._currentRenderTarget.texture)||void 0===s?void 0:s.type;d===a.TEXTURETYPE_UNSIGNED_INTEGER||d===a.TEXTURETYPE_UNSIGNED_SHORT?(e._TempClearColorUint32[0]=255*t.r,e._TempClearColorUint32[1]=255*t.g,e._TempClearColorUint32[2]=255*t.b,e._TempClearColorUint32[3]=255*t.a,this._gl.clearBufferuiv(this._gl.COLOR,0,e._TempClearColorUint32),u=!1):(e._TempClearColorInt32[0]=255*t.r,e._TempClearColorInt32[1]=255*t.g,e._TempClearColorInt32[2]=255*t.b,e._TempClearColorInt32[3]=255*t.a,this._gl.clearBufferiv(this._gl.COLOR,0,e._TempClearColorInt32),u=!1)}}u&&(this._gl.clearColor(t.r,t.g,t.b,void 0!==t.a?t.a:1),l|=this._gl.COLOR_BUFFER_BIT)}i&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),l|=this._gl.DEPTH_BUFFER_BIT),r&&(this._gl.clearStencil(0),l|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(l)},e.prototype._viewport=function(e,t,n,i){e===this._viewportCached.x&&t===this._viewportCached.y&&n===this._viewportCached.z&&i===this._viewportCached.w||(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=n,this._viewportCached.w=i,this._gl.viewport(e,t,n,i))},e.prototype.setViewport=function(e,t,n){var i=t||this.getRenderWidth(),r=n||this.getRenderHeight(),o=e.x||0,a=e.y||0;this._cachedViewport=e,this._viewport(o*i,a*r,i*e.width,r*e.height)},e.prototype.beginFrame=function(){},e.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer(),this._frameId++},e.prototype.resize=function(e){var t,n;if(void 0===e&&(e=!1),this.adaptToDeviceRatio){var i=nt()&&window.devicePixelRatio||1,r=this._lastDevicePixelRatio/i;this._lastDevicePixelRatio=i,this._hardwareScalingLevel*=r}if(nt()&&rt())if(this._renderingCanvas){var o=this._renderingCanvas.getBoundingClientRect?this._renderingCanvas.getBoundingClientRect():{width:this._renderingCanvas.width*this._hardwareScalingLevel,height:this._renderingCanvas.height*this._hardwareScalingLevel};t=this._renderingCanvas.clientWidth||o.width||this._renderingCanvas.width||100,n=this._renderingCanvas.clientHeight||o.height||this._renderingCanvas.height||100}else t=window.innerWidth,n=window.innerHeight;else t=this._renderingCanvas?this._renderingCanvas.width:100,n=this._renderingCanvas?this._renderingCanvas.height:100;this.setSize(t/this._hardwareScalingLevel,n/this._hardwareScalingLevel,e)},e.prototype.setSize=function(e,t,n){return void 0===n&&(n=!1),!(!this._renderingCanvas||(e|=0,t|=0,!n&&this._renderingCanvas.width===e&&this._renderingCanvas.height===t||(this._renderingCanvas.width=e,this._renderingCanvas.height=t,0)))},e.prototype.bindFramebuffer=function(e,t,n,i,r,o,a){var s,c,l,u,h,d;void 0===t&&(t=0),void 0===o&&(o=0),void 0===a&&(a=0);var p=e;this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(p._MSAAFramebuffer?p._MSAAFramebuffer:p._framebuffer);var f=this._gl;e.isMulti||(e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,null===(s=e.texture._hardwareTexture)||void 0===s?void 0:s.underlyingResource,o,a):e.isCube?f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(c=e.texture._hardwareTexture)||void 0===c?void 0:c.underlyingResource,o):p._currentLOD!==o&&(f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,null===(l=e.texture._hardwareTexture)||void 0===l?void 0:l.underlyingResource,o),p._currentLOD=o));var m=e._depthStencilTexture;if(m){var _=e._depthStencilTextureWithStencil?f.DEPTH_STENCIL_ATTACHMENT:f.DEPTH_ATTACHMENT;e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,_,null===(u=m._hardwareTexture)||void 0===u?void 0:u.underlyingResource,o,a):e.isCube?f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(h=m._hardwareTexture)||void 0===h?void 0:h.underlyingResource,o):f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_2D,null===(d=m._hardwareTexture)||void 0===d?void 0:d.underlyingResource,o)}this._cachedViewport&&!r?this.setViewport(this._cachedViewport,n,i):(n||(n=e.width,o&&(n/=Math.pow(2,o))),i||(i=e.height,o&&(i/=Math.pow(2,o))),this._viewport(0,0,n,i)),this.wipeCaches()},e.prototype.setState=function(e,t,n,i,r,o,a){var s,c;void 0===t&&(t=0),void 0===i&&(i=!1),void 0===a&&(a=0),(this._depthCullingState.cull!==e||n)&&(this._depthCullingState.cull=e);var l=null===(c=null!==(s=this.cullBackFaces)&&void 0!==s?s:r)||void 0===c||c?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==l||n)&&(this._depthCullingState.cullFace=l),this.setZOffset(t),this.setZOffsetUnits(a);var u=i?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==u||n)&&(this._depthCullingState.frontFace=u),this._stencilStateComposer.stencilMaterial=o},e.prototype.getDepthBuffer=function(){return this._depthCullingState.depthTest},e.prototype.setDepthBuffer=function(e){this._depthCullingState.depthTest=e},e.prototype.setZOffset=function(e){this._depthCullingState.zOffset=this.useReverseDepthBuffer?-e:e},e.prototype.getZOffset=function(){var e=this._depthCullingState.zOffset;return this.useReverseDepthBuffer?-e:e},e.prototype.setZOffsetUnits=function(e){this._depthCullingState.zOffsetUnits=this.useReverseDepthBuffer?-e:e},e.prototype.getZOffsetUnits=function(){var e=this._depthCullingState.zOffsetUnits;return this.useReverseDepthBuffer?-e:e},e.prototype._bindUnboundFramebuffer=function(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)},e.prototype._currentFrameBufferIsDefaultFrameBuffer=function(){return null===this._currentFramebuffer},e.prototype.generateMipmaps=function(e){this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)},e.prototype.unBindFramebuffer=function(e,t,n){var i;void 0===t&&(t=!1);var r=e;this._currentRenderTarget=null;var o=this._gl;if(r._MSAAFramebuffer){if(e.isMulti)return void this.unBindMultiColorAttachmentFramebuffer(e,t,n);o.bindFramebuffer(o.READ_FRAMEBUFFER,r._MSAAFramebuffer),o.bindFramebuffer(o.DRAW_FRAMEBUFFER,r._framebuffer),o.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,o.COLOR_BUFFER_BIT,o.NEAREST)}!(null===(i=e.texture)||void 0===i?void 0:i.generateMipMaps)||t||e.isCube||this.generateMipmaps(e.texture),n&&(r._MSAAFramebuffer&&this._bindUnboundFramebuffer(r._framebuffer),n()),this._bindUnboundFramebuffer(null)},e.prototype.flushFramebuffer=function(){this._gl.flush()},e.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},e.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},e.prototype.createVertexBuffer=function(e,t,n){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)},e.prototype._createVertexBuffer=function(e,t){var n=this._gl.createBuffer();if(!n)throw new Error("Unable to create vertex buffer");var i=new Zt(n);return this.bindArrayBuffer(i),e instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t):this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),this._resetVertexBufferBinding(),i.references=1,i},e.prototype.createDynamicVertexBuffer=function(e,t){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)},e.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},e.prototype.createIndexBuffer=function(e,t,n){var i=this._gl.createBuffer(),r=new Zt(i);if(!i)throw new Error("Unable to create index buffer");this.bindIndexBuffer(r);var o=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,o,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),r.references=1,r.is32Bits=4===o.BYTES_PER_ELEMENT,r},e.prototype._normalizeIndexData=function(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;for(var t=0;t=65535)return new Uint32Array(e);return new Uint16Array(e)}return new Uint16Array(e)},e.prototype.bindArrayBuffer=function(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)},e.prototype.bindUniformBlock=function(e,t,n){var i=e.program,r=this._gl.getUniformBlockIndex(i,t);this._gl.uniformBlockBinding(i,r,n)},e.prototype.bindIndexBuffer=function(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)},e.prototype._bindBuffer=function(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)},e.prototype.updateArrayBuffer=function(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)},e.prototype._vertexAttribPointer=function(e,t,n,i,r,o,a){var s=this._currentBufferPointers[t];if(s){var c=!1;s.active?(s.buffer!==e&&(s.buffer=e,c=!0),s.size!==n&&(s.size=n,c=!0),s.type!==i&&(s.type=i,c=!0),s.normalized!==r&&(s.normalized=r,c=!0),s.stride!==o&&(s.stride=o,c=!0),s.offset!==a&&(s.offset=a,c=!0)):(c=!0,s.active=!0,s.index=t,s.size=n,s.type=i,s.normalized=r,s.stride=o,s.offset=a,s.buffer=e),(c||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),i===this._gl.UNSIGNED_INT||i===this._gl.INT?this._gl.vertexAttribIPointer(t,n,i,o,a):this._gl.vertexAttribPointer(t,n,i,r,o,a))}},e.prototype._bindIndexBufferWithCache=function(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)},e.prototype._bindVertexBuffersAttributes=function(e,t,n){var i=t.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var r=0;r=0){var a=i[r],s=null;if(n&&(s=n[a]),s||(s=e[a]),!s)continue;this._gl.enableVertexAttribArray(o),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[o]=!0);var c=s.getBuffer();c&&(this._vertexAttribPointer(c,o,s.getSize(),s.type,s.normalized,s.byteStride,s.byteOffset),s.getIsInstanced()&&(this._gl.vertexAttribDivisor(o,s.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(o),this._currentInstanceBuffers.push(c))))}}},e.prototype.recordVertexArrayObject=function(e,t,n,i){var r=this._gl.createVertexArray();if(!r)throw new Error("Unable to create VAO");return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(r),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,n,i),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),r},e.prototype.bindVertexArrayObject=function(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)},e.prototype.bindBuffersDirectly=function(e,t,n,i,r){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r;var o=r.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var a=0,s=0;s=0&&(this._gl.enableVertexAttribArray(c),this._vertexAttribArraysEnabled[c]=!0,this._vertexAttribPointer(e,c,n[s],this._gl.FLOAT,!1,i,a)),a+=4*n[s]}}this._bindIndexBufferWithCache(t)},e.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},e.prototype.bindBuffers=function(e,t,n,i){this._cachedVertexBuffers===e&&this._cachedEffectForVertexBuffers===n||(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=n,this._bindVertexBuffersAttributes(e,n,i)),this._bindIndexBufferWithCache(t)},e.prototype.unbindInstanceAttributes=function(){for(var e,t=0,n=this._currentInstanceLocations.length;t1?"#version 300 es\n#define WEBGL2 \n":"",s=this._compileShader(t,"vertex",i,a),c=this._compileShader(n,"fragment",i,a);return this._createShaderProgram(e,s,c,r,o)},e.prototype.inlineShaderCode=function(e){return e},e.prototype.createPipelineContext=function(e){var t=new $t;return t.engine=this,this._caps.parallelShaderCompile&&(t.isParallelCompiled=!0),t},e.prototype.createMaterialContext=function(){},e.prototype.createDrawContext=function(){},e.prototype._createShaderProgram=function(e,t,n,i,r){void 0===r&&(r=null);var o=i.createProgram();if(e.program=o,!o)throw new Error("Unable to create program");return i.attachShader(o,t),i.attachShader(o,n),i.linkProgram(o),e.context=i,e.vertexShader=t,e.fragmentShader=n,e.isParallelCompiled||this._finalizePipelineContext(e),o},e.prototype._finalizePipelineContext=function(e){var t=e.context,n=e.vertexShader,i=e.fragmentShader,r=e.program;if(!t.getProgramParameter(r,t.LINK_STATUS)){var o,a;if(!this._gl.getShaderParameter(n,this._gl.COMPILE_STATUS)&&(o=this._gl.getShaderInfoLog(n)))throw e.vertexCompilationError=o,new Error("VERTEX SHADER "+o);if(!this._gl.getShaderParameter(i,this._gl.COMPILE_STATUS)&&(o=this._gl.getShaderInfoLog(i)))throw e.fragmentCompilationError=o,new Error("FRAGMENT SHADER "+o);if(a=t.getProgramInfoLog(r))throw e.programLinkError=a,new Error(a)}if(this.validateShaderPrograms&&(t.validateProgram(r),!t.getProgramParameter(r,t.VALIDATE_STATUS)&&(a=t.getProgramInfoLog(r))))throw e.programValidationError=a,new Error(a);t.deleteShader(n),t.deleteShader(i),e.vertexShader=void 0,e.fragmentShader=void 0,e.onCompiled&&(e.onCompiled(),e.onCompiled=void 0)},e.prototype._preparePipelineContext=function(e,t,n,i,r,o,a,s,c,l){var u=e;u.program=i?this.createRawShaderProgram(u,t,n,void 0,c):this.createShaderProgram(u,t,n,s,void 0,c),u.program.__SPECTOR_rebuildProgram=a},e.prototype._isRenderingStateCompiled=function(e){var t=e;return!(this._isDisposed||t._isDisposed||!this._gl.getProgramParameter(t.program,this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)||(this._finalizePipelineContext(t),0))},e.prototype._executeWhenRenderingStateIsCompiled=function(e,t){var n=e;if(n.isParallelCompiled){var i=n.onCompiled;n.onCompiled=i?function(){i(),t()}:t}else t()},e.prototype.getUniforms=function(e,t){for(var n=new Array,i=e,r=0;r1||this.isWebGPU)),(c!==a.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(c!==a.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(l=a.TEXTURE_NEAREST_SAMPLINGMODE),c!==a.TEXTURETYPE_FLOAT||this._caps.textureFloat||(c=a.TEXTURETYPE_UNSIGNED_INT,J.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));var p=this._gl,f=new Xt(this,i),m=e.width||e,_=e.height||e,g=e.layers||0,y=this._getSamplingParameters(l,s),v=0!==g?p.TEXTURE_2D_ARRAY:p.TEXTURE_2D,b=this._getRGBABufferInternalSizedFormat(c,u,h),T=this._getInternalFormat(u),E=this._getWebGLTextureType(c);return this._bindTextureDirectly(v,f),0!==g?(f.is2DArray=!0,p.texImage3D(v,0,b,m,_,g,0,T,E,null)):p.texImage2D(v,0,b,m,_,0,T,E,null),p.texParameteri(v,p.TEXTURE_MAG_FILTER,y.mag),p.texParameteri(v,p.TEXTURE_MIN_FILTER,y.min),p.texParameteri(v,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(v,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),s&&this._gl.generateMipmap(v),this._bindTextureDirectly(v,null),f._useSRGBBuffer=h,f.baseWidth=m,f.baseHeight=_,f.width=m,f.height=_,f.depth=g,f.isReady=!0,f.samples=d,f.generateMipMaps=s,f.samplingMode=l,f.type=c,f.format=u,f.label=o,this._internalTexturesCache.push(f),f},e.prototype._getUseSRGBBuffer=function(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU||t)},e.prototype._createTextureBase=function(t,n,i,r,o,s,c,l,u,h,d,p,f,m,_,g){var y=this;void 0===o&&(o=a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===s&&(s=null),void 0===c&&(c=null),void 0===h&&(h=null),void 0===d&&(d=null),void 0===p&&(p=null),void 0===f&&(f=null);var v="data:"===(t=t||"").substr(0,5),b="blob:"===t.substr(0,5),T=v&&-1!==t.indexOf(";base64,"),E=d||new Xt(this,wt.Url);E!==d&&(E.label=t.substring(0,60));var x=t;!this._transformTextureUrl||T||d||h||(t=this._transformTextureUrl(t)),x!==t&&(E._originalUrl=x);var S=t.lastIndexOf("."),C=f||(S>-1?t.substring(S).toLowerCase():""),P=null;C.indexOf("?")>-1&&(C=C.split("?")[0]);for(var I=0,R=e._TextureLoaders;Ih||n.height>h||!_._supportsHardwareTextureRescaling)return _._prepareWorkingCanvas(),!(!_._workingCanvas||!_._workingContext||(_._workingCanvas.width=e,_._workingCanvas.height=t,_._workingContext.drawImage(n,0,0,n.width,n.height,0,0,e,t),s.texImage2D(s.TEXTURE_2D,0,l.internalFormat,l.format,l.type,_._workingCanvas),o.width=e,o.height=t,1));var d=new Xt(_,wt.Temp);return _._bindTextureDirectly(s.TEXTURE_2D,d,!0),s.texImage2D(s.TEXTURE_2D,0,l.internalFormat,l.format,l.type,n),_._rescaleTexture(d,o,i,l.format,(function(){_._releaseTexture(d),_._bindTextureDirectly(s.TEXTURE_2D,o,!0),a()})),!0}),c,l,u,h,d,p,m)},e.prototype._getTexImageParametersForCreateTexture=function(e,t,n){var i,r;return null==e&&(e=".jpg"!==t||n?a.TEXTUREFORMAT_RGBA:a.TEXTUREFORMAT_RGB),1===this.webGLVersion?r=i=this._getInternalFormat(e,n):(i=this._getInternalFormat(e,!1),r=this._getRGBABufferInternalSizedFormat(a.TEXTURETYPE_UNSIGNED_BYTE,e,n)),{internalFormat:r,format:i,type:this._gl.UNSIGNED_BYTE}},e._FileToolsLoadImage=function(e,t,n,i,r,o){throw ye("FileTools")},e.prototype._rescaleTexture=function(e,t,n,i,r){},e.prototype.createRawTexture=function(e,t,n,i,r,o,s,c,l,u,h){throw void 0===c&&(c=null),void 0===l&&(l=a.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=0),void 0===h&&(h=!1),ye("Engine.RawTexture")},e.prototype.createRawCubeTexture=function(e,t,n,i,r,o,a,s){throw void 0===s&&(s=null),ye("Engine.RawTexture")},e.prototype.createRawTexture3D=function(e,t,n,i,r,o,s,c,l,u){throw void 0===l&&(l=null),void 0===u&&(u=a.TEXTURETYPE_UNSIGNED_INT),ye("Engine.RawTexture")},e.prototype.createRawTexture2DArray=function(e,t,n,i,r,o,s,c,l,u){throw void 0===l&&(l=null),void 0===u&&(u=a.TEXTURETYPE_UNSIGNED_INT),ye("Engine.RawTexture")},e.prototype._unpackFlipY=function(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,e?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))},e.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},e.prototype._getTextureTarget=function(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D},e.prototype.updateTextureSamplingMode=function(e,t,n){void 0===n&&(n=!1);var i=this._getTextureTarget(t),r=this._getSamplingParameters(e,t.useMipMaps||n);this._setTextureParameterInteger(i,this._gl.TEXTURE_MAG_FILTER,r.mag,t),this._setTextureParameterInteger(i,this._gl.TEXTURE_MIN_FILTER,r.min),n&&(t.generateMipMaps=!0,this._gl.generateMipmap(i)),this._bindTextureDirectly(i,null),t.samplingMode=e},e.prototype.updateTextureDimensions=function(e,t,n,i){void 0===i&&(i=1)},e.prototype.updateTextureWrappingMode=function(e,t,n,i){void 0===n&&(n=null),void 0===i&&(i=null);var r=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==n&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(n),e),e._cachedWrapV=n),(e.is2DArray||e.is3D)&&null!==i&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(i),e),e._cachedWrapR=i),this._bindTextureDirectly(r,null)},e.prototype._setupDepthStencilTexture=function(e,t,n,i,r,o){void 0===o&&(o=1);var s=t.width||t,c=t.height||t,l=t.layers||0;e.baseWidth=s,e.baseHeight=c,e.width=s,e.height=c,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=i?a.TEXTURE_BILINEAR_SAMPLINGMODE:a.TEXTURE_NEAREST_SAMPLINGMODE,e.type=a.TEXTURETYPE_UNSIGNED_INT,e._comparisonFunction=r;var u=this._gl,h=this._getTextureTarget(e),d=this._getSamplingParameters(e.samplingMode,!1);u.texParameteri(h,u.TEXTURE_MAG_FILTER,d.mag),u.texParameteri(h,u.TEXTURE_MIN_FILTER,d.min),u.texParameteri(h,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(h,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),this.webGLVersion>1&&(0===r?(u.texParameteri(h,u.TEXTURE_COMPARE_FUNC,a.LEQUAL),u.texParameteri(h,u.TEXTURE_COMPARE_MODE,u.NONE)):(u.texParameteri(h,u.TEXTURE_COMPARE_FUNC,r),u.texParameteri(h,u.TEXTURE_COMPARE_MODE,u.COMPARE_REF_TO_TEXTURE)))},e.prototype._uploadCompressedDataToTextureDirectly=function(e,t,n,i,r,o,s){void 0===o&&(o=0),void 0===s&&(s=0);var c=this._gl,l=c.TEXTURE_2D;if(e.isCube&&(l=c.TEXTURE_CUBE_MAP_POSITIVE_X+o),e._useSRGBBuffer)switch(t){case a.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:case a.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:this._caps.etc2?t=c.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case a.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:this._caps.etc2?t=c.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case a.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:t=c.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case a.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:t=c.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case a.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:this._caps.s3tc_srgb?t=c.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case a.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:this._caps.s3tc_srgb?t=c.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case a.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:this._caps.s3tc_srgb?t=c.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}this._gl.compressedTexImage2D(l,s,t,n,i,0,r)},e.prototype._uploadDataToTextureDirectly=function(e,t,n,i,r,o){void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=!1);var a=this._gl,s=this._getWebGLTextureType(e.type),c=this._getInternalFormat(e.format),l=void 0===r?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(r,e._useSRGBBuffer);this._unpackFlipY(e.invertY);var u=a.TEXTURE_2D;e.isCube&&(u=a.TEXTURE_CUBE_MAP_POSITIVE_X+n);var h=Math.round(Math.log(e.width)*Math.LOG2E),d=Math.round(Math.log(e.height)*Math.LOG2E),p=o?e.width:Math.pow(2,Math.max(h-i,0)),f=o?e.height:Math.pow(2,Math.max(d-i,0));a.texImage2D(u,i,l,p,f,0,c,s,t)},e.prototype.updateTextureData=function(e,t,n,i,r,o,a,s,c){void 0===a&&(a=0),void 0===s&&(s=0),void 0===c&&(c=!1);var l=this._gl,u=this._getWebGLTextureType(e.type),h=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);var d=l.TEXTURE_2D,p=l.TEXTURE_2D;e.isCube&&(p=l.TEXTURE_CUBE_MAP_POSITIVE_X+a,d=l.TEXTURE_CUBE_MAP),this._bindTextureDirectly(d,e,!0),l.texSubImage2D(p,s,n,i,r,o,h,u,t),c&&this._gl.generateMipmap(p),this._bindTextureDirectly(d,null)},e.prototype._uploadArrayBufferViewToTexture=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0);var r=this._gl,o=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(o,e,!0),this._uploadDataToTextureDirectly(e,t,n,i),this._bindTextureDirectly(o,null,!0)},e.prototype._prepareWebGLTextureContinuation=function(e,t,n,i,r){var o=this._gl;if(o){var a=this._getSamplingParameters(r,!n);o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,a.mag),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,a.min),n||i||o.generateMipmap(o.TEXTURE_2D),this._bindTextureDirectly(o.TEXTURE_2D,null),t&&t.removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}},e.prototype._prepareWebGLTexture=function(t,n,i,r,o,s,c,l,u){var h=this;void 0===u&&(u=a.TEXTURE_TRILINEAR_SAMPLINGMODE);var d=this.getCaps().maxTextureSize,p=Math.min(d,this.needPOTTextures?e.GetExponentOfTwo(r.width,d):r.width),f=Math.min(d,this.needPOTTextures?e.GetExponentOfTwo(r.height,d):r.height),m=this._gl;m&&(t._hardwareTexture?(this._bindTextureDirectly(m.TEXTURE_2D,t,!0),this._unpackFlipY(void 0===o||!!o),t.baseWidth=r.width,t.baseHeight=r.height,t.width=p,t.height=f,t.isReady=!0,t.type=-1!==t.type?t.type:a.TEXTURETYPE_UNSIGNED_BYTE,t.format=-1!==t.format?t.format:".jpg"!==n||t._useSRGBBuffer?a.TEXTUREFORMAT_RGBA:a.TEXTUREFORMAT_RGB,l(p,f,r,n,t,(function(){h._prepareWebGLTextureContinuation(t,i,s,c,u)}))||this._prepareWebGLTextureContinuation(t,i,s,c,u)):i&&i.removePendingData(t))},e.prototype._setupFramebufferDepthAttachments=function(e,t,n,i,r){void 0===r&&(r=1);var o=this._gl;if(e&&t)return this._createRenderBuffer(n,i,r,o.DEPTH_STENCIL,o.DEPTH24_STENCIL8,o.DEPTH_STENCIL_ATTACHMENT);if(t){var a=o.DEPTH_COMPONENT16;return this._webGLVersion>1&&(a=o.DEPTH_COMPONENT32F),this._createRenderBuffer(n,i,r,a,a,o.DEPTH_ATTACHMENT)}return e?this._createRenderBuffer(n,i,r,o.STENCIL_INDEX8,o.STENCIL_INDEX8,o.STENCIL_ATTACHMENT):null},e.prototype._createRenderBuffer=function(e,t,n,i,r,o,a){void 0===a&&(a=!0);var s=this._gl.createRenderbuffer();return this._updateRenderBuffer(s,e,t,n,i,r,o,a)},e.prototype._updateRenderBuffer=function(e,t,n,i,r,o,a,s){void 0===s&&(s=!0);var c=this._gl;return c.bindRenderbuffer(c.RENDERBUFFER,e),i>1&&c.renderbufferStorageMultisample?c.renderbufferStorageMultisample(c.RENDERBUFFER,i,o,t,n):c.renderbufferStorage(c.RENDERBUFFER,r,t,n),c.framebufferRenderbuffer(c.FRAMEBUFFER,a,c.RENDERBUFFER,e),s&&c.bindRenderbuffer(c.RENDERBUFFER,null),e},e.prototype._releaseTexture=function(e){var t;this._deleteTexture(null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource),this.unbindAllTextures();var n=this._internalTexturesCache.indexOf(e);-1!==n&&this._internalTexturesCache.splice(n,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()},e.prototype._releaseRenderTargetWrapper=function(e){var t=this._renderTargetWrapperCache.indexOf(e);-1!==t&&this._renderTargetWrapperCache.splice(t,1)},e.prototype._deleteTexture=function(e){e&&this._gl.deleteTexture(e)},e.prototype._setProgram=function(e){this._currentProgram!==e&&(this._gl.useProgram(e),this._currentProgram=e)},e.prototype.bindSamplers=function(e){var t=e.getPipelineContext();this._setProgram(t.program);for(var n=e.getSamplers(),i=0;i-1;if(n&&s&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||i){if(this._activateCurrentTexture(),t&&t.isMultiview)throw J.Error(["_bindTextureDirectly called with a multiview texture!",e,t]),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,null!==(o=null===(r=null==t?void 0:t._hardwareTexture)||void 0===r?void 0:r.underlyingResource)&&void 0!==o?o:null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else n&&(a=!0,this._activateCurrentTexture());return s&&!n&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),a},e.prototype._bindTexture=function(e,t,n){if(void 0!==e){t&&(t._associatedChannel=e),this._activeChannel=e;var i=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(i,t)}},e.prototype.unbindAllTextures=function(){for(var e=0;e1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))},e.prototype.setTexture=function(e,t,n,i){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,n))},e.prototype._bindSamplerUniformToChannel=function(e,t){var n=this._boundUniforms[e];n&&n._currentState!==t&&(this._gl.uniform1i(n,t),n._currentState=t)},e.prototype._getTextureWrapMode=function(e){switch(e){case a.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case a.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case a.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},e.prototype._setTexture=function(e,t,n,i,r){if(void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===r&&(r=""),!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video){this._activeChannel=e;var o=t.getInternalTexture();o&&(o._associatedChannel=e),t.update()}else if(t.delayLoadState===a.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;var s;s=i?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!n&&s&&(s._associatedChannel=e);var c=!0;this._boundTexturesCache[e]===s&&(n||this._bindSamplerUniformToChannel(s._associatedChannel,e),c=!1),this._activeChannel=e;var l=this._getTextureTarget(s);if(c&&this._bindTextureDirectly(l,s,n),s&&!s.isMultiview){if(s.isCube&&s._cachedCoordinatesMode!==t.coordinatesMode){s._cachedCoordinatesMode=t.coordinatesMode;var u=t.coordinatesMode!==a.TEXTURE_CUBIC_MODE&&t.coordinatesMode!==a.TEXTURE_SKYBOX_MODE?a.TEXTURE_WRAP_ADDRESSMODE:a.TEXTURE_CLAMP_ADDRESSMODE;t.wrapU=u,t.wrapV=u}s._cachedWrapU!==t.wrapU&&(s._cachedWrapU=t.wrapU,this._setTextureParameterInteger(l,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),s)),s._cachedWrapV!==t.wrapV&&(s._cachedWrapV=t.wrapV,this._setTextureParameterInteger(l,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),s)),s.is3D&&s._cachedWrapR!==t.wrapR&&(s._cachedWrapR=t.wrapR,this._setTextureParameterInteger(l,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),s)),this._setAnisotropicLevel(l,s,t.anisotropicFilteringLevel)}return!0},e.prototype.setTextureArray=function(e,t,n,i){if(void 0!==e&&t){this._textureUnits&&this._textureUnits.length===n.length||(this._textureUnits=new Int32Array(n.length));for(var r=0;r=this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[e]||this.disableAttributeByIndex(e)}},e.prototype.releaseEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e].getPipelineContext();this._deletePipelineContext(t)}this._compiledEffects={}},e.prototype.dispose=function(){var e,t;this._isDisposed=!0,this.stopRenderLoop(),this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.releaseEffects(),null===(e=this.releaseComputeEffects)||void 0===e||e.call(this),this.unbindAllAttributes(),this._boundUniforms={},nt()&&this._renderingCanvas&&(this._doNotHandleContextLost||(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),window.removeEventListener("resize",this._checkForMobile)),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers.length=0,this._renderingCanvas=null,this._currentProgram=null,this._boundRenderFunction=null,zt.ResetCache();for(var n=0,i=this._activeRequests;n1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(a.TEXTURETYPE_FLOAT)},e.prototype._canRenderToHalfFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(a.TEXTURETYPE_HALF_FLOAT)},e.prototype._canRenderToFramebuffer=function(e){for(var t=this._gl;t.getError()!==t.NO_ERROR;);var n=!0,i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);var r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0);var o=t.checkFramebufferStatus(t.FRAMEBUFFER);if((n=(n=n&&o===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),n=n&&t.getError()===t.NO_ERROR),n){t.bindFramebuffer(t.FRAMEBUFFER,null);var a=t.RGBA,s=t.UNSIGNED_BYTE,c=new Uint8Array(4);t.readPixels(0,0,1,1,a,s,c),n=n&&t.getError()===t.NO_ERROR}for(t.deleteTexture(i),t.deleteFramebuffer(r),t.bindFramebuffer(t.FRAMEBUFFER,null);!n&&t.getError()!==t.NO_ERROR;);return n},e.prototype._getWebGLTextureType=function(e){if(1===this._webGLVersion){switch(e){case a.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case a.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case a.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case a.TEXTURETYPE_BYTE:return this._gl.BYTE;case a.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case a.TEXTURETYPE_SHORT:return this._gl.SHORT;case a.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case a.TEXTURETYPE_INT:return this._gl.INT;case a.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case a.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case a.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case a.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},e.prototype._getInternalFormat=function(e,t){void 0===t&&(t=!1);var n=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case a.TEXTUREFORMAT_ALPHA:n=this._gl.ALPHA;break;case a.TEXTUREFORMAT_LUMINANCE:n=this._gl.LUMINANCE;break;case a.TEXTUREFORMAT_LUMINANCE_ALPHA:n=this._gl.LUMINANCE_ALPHA;break;case a.TEXTUREFORMAT_RED:n=this._gl.RED;break;case a.TEXTUREFORMAT_RG:n=this._gl.RG;break;case a.TEXTUREFORMAT_RGB:n=t?this._glSRGBExtensionValues.SRGB:this._gl.RGB;break;case a.TEXTUREFORMAT_RGBA:n=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case a.TEXTUREFORMAT_RED_INTEGER:n=this._gl.RED_INTEGER;break;case a.TEXTUREFORMAT_RG_INTEGER:n=this._gl.RG_INTEGER;break;case a.TEXTUREFORMAT_RGB_INTEGER:n=this._gl.RGB_INTEGER;break;case a.TEXTUREFORMAT_RGBA_INTEGER:n=this._gl.RGBA_INTEGER}return n},e.prototype._getRGBABufferInternalSizedFormat=function(e,t,n){if(void 0===n&&(n=!1),1===this._webGLVersion){if(void 0!==t)switch(t){case a.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case a.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case a.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;case a.TEXTUREFORMAT_RGB:return n?this._glSRGBExtensionValues.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case a.TEXTURETYPE_BYTE:switch(t){case a.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case a.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case a.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case a.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case a.TEXTUREFORMAT_RED:return this._gl.R8;case a.TEXTUREFORMAT_RG:return this._gl.RG8;case a.TEXTUREFORMAT_RGB:return n?this._glSRGBExtensionValues.SRGB8:this._gl.RGB8;case a.TEXTUREFORMAT_RGBA:return n?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8;case a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;case a.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case a.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case a.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case a.TEXTURETYPE_SHORT:switch(t){case a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case a.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case a.TEXTURETYPE_INT:switch(t){case a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case a.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case a.TEXTURETYPE_FLOAT:switch(t){case a.TEXTUREFORMAT_RED:return this._gl.R32F;case a.TEXTUREFORMAT_RG:return this._gl.RG32F;case a.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case a.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case a.TEXTURETYPE_HALF_FLOAT:switch(t){case a.TEXTUREFORMAT_RED:return this._gl.R16F;case a.TEXTUREFORMAT_RG:return this._gl.RG16F;case a.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case a.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case a.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return n?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8},e.prototype._loadFile=function(t,n,i,r,o,a){var s=this,c=e._FileToolsLoadFile(t,n,i,r,o,a);return this._activeRequests.push(c),c.onCompleteObservable.add((function(e){s._activeRequests.splice(s._activeRequests.indexOf(e),1)})),c},e._FileToolsLoadFile=function(e,t,n,i,r,o){throw ye("FileTools")},e.prototype.readPixels=function(e,t,n,i,r,o){void 0===r&&(r=!0),void 0===o&&(o=!0);var a=r?4:3,s=r?this._gl.RGBA:this._gl.RGB,c=new Uint8Array(i*n*a);return o&&this.flushFramebuffer(),this._gl.readPixels(e,t,n,i,s,this._gl.UNSIGNED_BYTE,c),Promise.resolve(c)},Object.defineProperty(e,"IsSupportedAsync",{get:function(){return Promise.resolve(this.isSupported())},enumerable:!1,configurable:!0}),Object.defineProperty(e,"IsSupported",{get:function(){return this.isSupported()},enumerable:!1,configurable:!0}),e.isSupported=function(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!window.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported},Object.defineProperty(e,"HasMajorPerformanceCaveat",{get:function(){if(null===this._HasMajorPerformanceCaveat)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat},enumerable:!1,configurable:!0}),e.CeilingPOT=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},e.FloorPOT=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)},e.NearestPOT=function(t){var n=e.CeilingPOT(t),i=e.FloorPOT(t);return n-t>t-i?i:n},e.GetExponentOfTwo=function(t,n,i){var r;switch(void 0===i&&(i=a.SCALEMODE_NEAREST),i){case a.SCALEMODE_FLOOR:r=e.FloorPOT(t);break;case a.SCALEMODE_NEAREST:r=e.NearestPOT(t);break;case a.SCALEMODE_CEILING:default:r=e.CeilingPOT(t)}return Math.min(r,n)},e.QueueNewFrame=function(e,t){if(nt()){var n=(t||window).requestAnimationFrame;if("function"==typeof n)return n(e)}else if("function"==typeof requestAnimationFrame)return requestAnimationFrame(e);return setTimeout(e,16)},e.prototype.getHostDocument=function(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:rt()?document:null},e._TempClearColorUint32=new Uint32Array(4),e._TempClearColorInt32=new Int32Array(4),e.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/12\\d\\..+?Mobile",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],e._TextureLoaders=[],e.CollisionsEpsilon=.001,e._IsSupported=null,e._HasMajorPerformanceCaveat=null,e}(),on=function(){function e(){}return e.SetImmediate=function(e){nt()&&window.setImmediate?window.setImmediate(e):setTimeout(e,1)},e}(),an=new RegExp(/^data:([^,]+\/[^,]+)?;base64,/i),sn=function(e){function t(n,i){var r=e.call(this,n,dt.LoadFileError)||this;return r.name="LoadFileError",ht._setPrototypeOf(r,t.prototype),i instanceof We?r.request=i:r.file=i,r}return H(t,e),t}(pt),cn=function(e){function t(n,i){var r=e.call(this,n,dt.RequestFileError)||this;return r.request=i,r.name="RequestFileError",ht._setPrototypeOf(r,t.prototype),r}return H(t,e),t}(pt),ln=function(e){function t(n,i){var r=e.call(this,n,dt.ReadFileError)||this;return r.file=i,r.name="ReadFileError",ht._setPrototypeOf(r,t.prototype),r}return H(t,e),t}(pt),un={DefaultRetryStrategy:ut.ExponentialBackoff(),BaseUrl:"",CorsBehavior:"anonymous",PreprocessUrl:function(e){return e},ScriptBaseUrl:"",ScriptPreprocessUrl:function(e){return e}},hn=function(e){return e.replace(/#/gm,"%23")},dn=function(e,t){if((!e||0!==e.indexOf("data:"))&&un.CorsBehavior)if("string"==typeof un.CorsBehavior||un.CorsBehavior instanceof String)t.crossOrigin=un.CorsBehavior;else{var n=un.CorsBehavior(e);n&&(t.crossOrigin=n)}},pn=function(e,t,n,i,r,o){void 0===r&&(r="");var a,s=A.LastCreatedEngine;if("undefined"==typeof HTMLImageElement&&!(null==s?void 0:s._features.forceBitmapOverHTMLImageElement))return n("LoadImage is only supported in web or BabylonNative environments."),null;var c=!1;e instanceof ArrayBuffer||ArrayBuffer.isView(e)?"undefined"!=typeof Blob&&"undefined"!=typeof URL?(a=URL.createObjectURL(new Blob([e],{type:r})),c=!0):a="data:".concat(r,";base64,")+gt(e):e instanceof Blob?(a=URL.createObjectURL(e),c=!0):(a=hn(e),a=un.PreprocessUrl(e));var l=function(t){if(n){var i=a||e.toString();n("Error while trying to load image: ".concat(0===i.indexOf("http")||i.length<=128?i:i.slice(0,128)+"..."),t)}};if(null==s?void 0:s._features.forceBitmapOverHTMLImageElement)return mn(a,(function(i){s.createImageBitmap(new Blob([i],{type:r}),j({premultiplyAlpha:"none"},o)).then((function(e){t(e),c&&URL.revokeObjectURL(a)})).catch((function(t){n&&n("Error while trying to load image: "+e,t)}))}),void 0,i||void 0,!0,(function(e,t){l(t)})),null;var u=new Image;dn(a,u);var h=[],d=function(){h.forEach((function(e){e.target.removeEventListener(e.name,e.handler)})),h.length=0};h.push({target:u,name:"load",handler:function(){d(),t(u),c&&u.src&&URL.revokeObjectURL(u.src)}}),h.push({target:u,name:"error",handler:function(e){d(),l(e),c&&u.src&&URL.revokeObjectURL(u.src)}}),h.push({target:document,name:"securitypolicyviolation",handler:function(e){if(e.blockedURI===u.src){d();var t=new Error("CSP violation of policy ".concat(e.effectiveDirective," ").concat(e.blockedURI,". Current policy is ").concat(e.originalPolicy));A.UseFallbackTexture=!1,l(t),c&&u.src&&URL.revokeObjectURL(u.src),u.src=""}}}),h.forEach((function(e){e.target.addEventListener(e.name,e.handler)}));var p="blob:"===a.substring(0,5),f="data:"===a.substring(0,5),m=function(){p||f||!We.IsCustomRequestAvailable?u.src=a:mn(a,(function(e,t,n){var i=new Blob([e],{type:!r&&n?n:r}),o=URL.createObjectURL(i);c=!0,u.src=o}),void 0,i||void 0,!0,(function(e,t){l(t)}))};if(!p&&!f&&i&&i.enableTexturesOffline)i.open((function(){i&&i.loadImage(a,u)}),m);else{if(-1!==a.indexOf("file:")){var _=decodeURIComponent(a.substring(5).toLowerCase());if(lt.FilesToLoad[_]&&"undefined"!=typeof URL){try{var g=void 0;try{g=URL.createObjectURL(lt.FilesToLoad[_])}catch(e){g=URL.createObjectURL(lt.FilesToLoad[_])}u.src=g,c=!0}catch(e){u.src=""}return u}}m()}return u},fn=function(e,t,n,i,r){var o=new FileReader,a={onCompleteObservable:new u,abort:function(){return o.abort()}};return o.onloadend=function(){return a.onCompleteObservable.notifyObservers(a)},r&&(o.onerror=function(){r(new ln("Unable to read ".concat(e.name),e))}),o.onload=function(e){t(e.target.result)},n&&(o.onprogress=n),i?o.readAsArrayBuffer(e):o.readAsText(e),a},mn=function(e,t,n,i,r,o,a){if(e.name)return fn(e,t,n,r,o?function(e){o(void 0,e)}:void 0);var s=e;if(-1!==s.indexOf("file:")){var c=decodeURIComponent(s.substring(5).toLowerCase());0===c.indexOf("./")&&(c=c.substring(2));var l=lt.FilesToLoad[c];if(l)return fn(l,t,n,r,o?function(e){return o(void 0,new sn(e.message,e.file))}:void 0)}var h=vn(s),d=h.match,p=h.type;if(d){var f={onCompleteObservable:new u,abort:function(){return function(){}}};try{var m=r?bn(s):En(s);t(m,void 0,p)}catch(e){o?o(void 0,e):J.Error(e.message||"Failed to parse the Data URL")}return on.SetImmediate((function(){f.onCompleteObservable.notifyObservers(f)})),f}return _n(s,(function(e,n){t(e,null==n?void 0:n.responseURL,null==n?void 0:n.getResponseHeader("content-type"))}),n,i,r,o?function(e){o(e.request,new sn(e.message,e.request))}:void 0,a)},_n=function(e,t,n,i,r,o,a){e=hn(e),e=un.PreprocessUrl(e);var s=un.BaseUrl+e,c=!1,l={onCompleteObservable:new u,abort:function(){return c=!0}},h=function(){var e,i=new We,u=null,h=function(){i&&(n&&i.removeEventListener("progress",n),e&&i.removeEventListener("readystatechange",e),i.removeEventListener("loadend",d))},d=function(){h(),l.onCompleteObservable.notifyObservers(l),l.onCompleteObservable.clear(),n=void 0,e=null,d=null,o=void 0,a=void 0,t=void 0};l.abort=function(){c=!0,d&&d(),i&&i.readyState!==(XMLHttpRequest.DONE||4)&&i.abort(),null!==u&&(clearTimeout(u),u=null),i=null};var p=function(e){var t=e.message||"Unknown error";o&&i?o(new cn(t,i)):J.Error(t)},f=function(l){if(i){if(i.open("GET",s),a)try{a(i)}catch(e){return void p(e)}r&&(i.responseType="arraybuffer"),n&&i.addEventListener("progress",n),d&&i.addEventListener("loadend",d),e=function(){if(!c&&i&&i.readyState===(XMLHttpRequest.DONE||4)){if(e&&i.removeEventListener("readystatechange",e),i.status>=200&&i.status<300||0===i.status&&(!nt()||gn())){try{t&&t(r?i.response:i.responseText,i)}catch(e){p(e)}return}var n=un.DefaultRetryStrategy;if(n){var a=n(s,i,l);if(-1!==a)return h(),i=new We,void(u=setTimeout((function(){return f(l+1)}),a))}var d=new cn("Error status: "+i.status+" "+i.statusText+" - Unable to load "+s,i);o&&o(d)}},i.addEventListener("readystatechange",e),i.send()}};f(0)};if(i&&i.enableSceneOffline){var d=function(e){e&&e.status>400?o&&o(e):h()};i.open((function(){i&&i.loadFile(un.BaseUrl+e,(function(e){!c&&t&&t(e),l.onCompleteObservable.notifyObservers(l)}),n?function(e){!c&&n&&n(e)}:void 0,d,r)}),d)}else h();return l},gn=function(){return"undefined"!=typeof location&&"file:"===location.protocol},yn=function(e){return an.test(e)},vn=function(e){var t=an.exec(e);return null===t||0===t.length?{match:!1,type:""}:{match:!0,type:t[0].replace("data:","").replace("base64,","")}};function bn(e){return vt(e.split(",")[1])}var Tn,En=function(e){return yt(e.split(",")[1])};rn._FileToolsLoadImage=pn,rn._FileToolsLoadFile=mn,kt._FileToolsLoadFile=mn;var An=function(e,t,n,i,r,o,a,s,c,l){Tn={DecodeBase64UrlToBinary:e,DecodeBase64UrlToString:t,DefaultRetryStrategy:n.DefaultRetryStrategy,BaseUrl:n.BaseUrl,CorsBehavior:n.CorsBehavior,PreprocessUrl:n.PreprocessUrl,IsBase64DataUrl:i,IsFileURL:r,LoadFile:o,LoadImage:a,ReadFile:s,RequestFile:c,SetCorsBehavior:l},Object.defineProperty(Tn,"DefaultRetryStrategy",{get:function(){return n.DefaultRetryStrategy},set:function(e){n.DefaultRetryStrategy=e}}),Object.defineProperty(Tn,"BaseUrl",{get:function(){return n.BaseUrl},set:function(e){n.BaseUrl=e}}),Object.defineProperty(Tn,"PreprocessUrl",{get:function(){return n.PreprocessUrl},set:function(e){n.PreprocessUrl=e}}),Object.defineProperty(Tn,"CorsBehavior",{get:function(){return n.CorsBehavior},set:function(e){n.CorsBehavior=e}})};An(bn,En,un,yn,gn,mn,pn,fn,_n,dn);var xn=function(){function e(){}return e.Instantiate=function(e){if(this.RegisteredExternalClasses&&this.RegisteredExternalClasses[e])return this.RegisteredExternalClasses[e];var t=T(e);if(t)return t;J.Warn(e+" not found, you may have missed an import.");for(var n=e.split("."),i=window||this,r=0,o=n.length;re.indexOf("/"))&&(e.indexOf("://")=t)break;if(i(a),o&&o()){e.breakLoop();break}}e.executeNext()}),a)}),r)},e}();A.FallbackTexture="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/AABEIAQABAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APH6KKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z";var On=function(){function e(t){this.length=0,this.data=new Array(t),this._id=e._GlobalId++}return e.prototype.push=function(e){this.data[this.length++]=e,this.length>this.data.length&&(this.data.length*=2)},e.prototype.forEach=function(e){for(var t=0;tthis.data.length&&(this.data.length=2*(this.length+e.length));for(var t=0;t=this.length?-1:t},e.prototype.contains=function(e){return-1!==this.indexOf(e)},e._GlobalId=0,e}(),wn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._duplicateId=0,t}return H(t,e),t.prototype.push=function(t){e.prototype.push.call(this,t),t.__smartArrayFlags||(t.__smartArrayFlags={}),t.__smartArrayFlags[this._id]=this._duplicateId},t.prototype.pushNoDuplicate=function(e){return!(e.__smartArrayFlags&&e.__smartArrayFlags[this._id]===this._duplicateId||(this.push(e),0))},t.prototype.reset=function(){e.prototype.reset.call(this),this._duplicateId++},t.prototype.concatWithNoDuplicate=function(e){if(0!==e.length){this.length+e.length>this.data.length&&(this.data.length=2*(this.length+e.length));for(var t=0;t0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;this._fillAlignment(4),this._uniformArraySizes[e]={strideSize:t,arraySize:n},16==t?t*=n:t=t*n+(4-t)*n,i=[];for(var r=0;r1&&this._buffers[this._bufferIndex][1]){if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1]))return this._needSync=!1,void(this._createBufferOnWrite=this._engine._features.trackUbosInFrame);this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1])}this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._engine._features._collectUbosUpdatedInFrame&&(e._UpdatedUbosInFrame[this._name]||(e._UpdatedUbosInFrame[this._name]=0),e._UpdatedUbosInFrame[this._name]++),this._needSync=!1,this._createBufferOnWrite=this._engine._features.trackUbosInFrame}else this._createBufferOnWrite=this._engine._features.trackUbosInFrame;else this.create()},e.prototype._createNewBuffer=function(){this._bufferIndex+10?(this._needSync=0!==this._bufferIndex,this._bufferIndex=0,this._buffer=this._buffers[this._bufferIndex][0]):this._bufferIndex=-1)},e.prototype.updateUniform=function(e,t,n){this._checkNewFrame();var i=this._uniformLocations[e];if(void 0===i){if(this._buffer)return void J.Error("Cannot add an uniform after UBO has been created.");this.addUniform(e,n),i=this._uniformLocations[e]}if(this._buffer||this.create(),this._dynamic)for(o=0;o0&&n.negateInPlace()}return n.normalize(),n},e.prototype.getTextureCoordinates=function(e){if(void 0===e&&(e=Yn.UVKind),!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(e))return null;var t=this.pickedMesh.getIndices();if(!t)return null;var n=this.pickedMesh.getVerticesData(e);if(!n)return null;var i=S.FromArray(n,2*t[3*this.faceId]),r=S.FromArray(n,2*t[3*this.faceId+1]),o=S.FromArray(n,2*t[3*this.faceId+2]);return i=i.scale(this.bu),r=r.scale(this.bv),o=o.scale(1-this.bu-this.bv),new S(i.x+r.x+o.x,i.y+r.y+o.y)},e}(),Kn=function(){function e(e){this._vertexBuffers={},this._scene=e}return e.prototype._prepareBuffers=function(){if(!this._vertexBuffers[Yn.PositionKind]){var e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[Yn.PositionKind]=new Yn(this._scene.getEngine(),e,Yn.PositionKind,!1,!1,2),this._buildIndexBuffer()}},e.prototype._buildIndexBuffer=function(){var e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)},e.prototype._rebuild=function(){var e=this._vertexBuffers[Yn.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())},e.prototype._prepareFrame=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null);var n=this._scene.activeCamera;return!(!n||!(t=t||n._postProcesses.filter((function(e){return null!=e})))||0===t.length||!this._scene.postProcessesEnabled||(t[0].activate(n,e,null!=t),0))},e.prototype.directRender=function(e,t,n,i,r,o){var s;void 0===t&&(t=null),void 0===n&&(n=!1),void 0===i&&(i=0),void 0===r&&(r=0),void 0===o&&(o=!1);for(var c=this._scene.getEngine(),l=0;ln._alphaIndex?1:t._alphaIndext._distanceToCamera?-1:0},e.frontToBackSortCompare=function(e,t){return e._distanceToCamerat._distanceToCamera?1:0},e.PainterSortCompare=function(e,t){var n=e.getMesh(),i=t.getMesh();return n.material&&i.material?n.material.uniqueId-i.material.uniqueId:n.uniqueId-i.uniqueId},e.prototype.prepare=function(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this.prepareSprites(),this._edgesRenderers.reset(),this._empty=!0},e.prototype.prepareSprites=function(){this._spriteManagers.reset()},e.prototype.dispose=function(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()},e.prototype.dispatch=function(e,t,n){void 0===t&&(t=e.getMesh()),void 0===n&&(n=e.getMaterial()),null!=n&&(n.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):n.needAlphaTesting()?(n.needDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(n.needDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(t._edgesRenderer),this._empty=!1)},e.prototype.dispatchSprites=function(e){this._spriteManagers.push(e),this._empty=!1},e.prototype.dispatchParticles=function(e){this._particleSystems.push(e),this._empty=!1},e.prototype._renderParticles=function(e){if(0!==this._particleSystems.length){var t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(var n=0;n=Un.LeftClick&&n<=Un.RightClick&&(s.type=1===i?"pointerdown":"pointerup",s.button=n-2),s},e._CreateWheelEvent=function(e,t,n,i,r,o){var a=this._CreateMouseEvent(e,t,n,i,r,o);switch(a.pointerId=1,a.type="wheel",a.deltaMode=li.DOM_DELTA_PIXEL,a.deltaX=0,a.deltaY=0,a.deltaZ=0,n){case Un.MouseWheelX:a.deltaX=i;break;case Un.MouseWheelY:a.deltaY=i;break;case Un.MouseWheelZ:a.deltaZ=i}return a},e._CreateMouseEvent=function(e,t,n,i,r,o){var a=this._CreateEvent(o),s=r.pollInput(e,t,Un.Horizontal),c=r.pollInput(e,t,Un.Vertical);return o?(a.movementX=0,a.movementY=0,a.offsetX=a.movementX-o.getBoundingClientRect().x,a.offsetY=a.movementY-o.getBoundingClientRect().y):(a.movementX=r.pollInput(e,t,kn.DeltaHorizontal),a.movementY=r.pollInput(e,t,kn.DeltaVertical),a.offsetX=0,a.offsetY=0),this._CheckNonCharacterKeys(a,r),a.clientX=s,a.clientY=c,a.x=s,a.y=c,a.deviceType=e,a.deviceSlot=t,a.inputIndex=n,a},e._CreateKeyboardEvent=function(e,t,n,i){var r=this._CreateEvent(i);return this._CheckNonCharacterKeys(r,n),r.deviceType=Bn.Keyboard,r.deviceSlot=0,r.inputIndex=e,r.type=1===t?"keydown":"keyup",r.key=String.fromCharCode(e),r.keyCode=e,r},e._CheckNonCharacterKeys=function(e,t){var n=t.isDeviceAvailable(Bn.Keyboard),i=n&&1===t.pollInput(Bn.Keyboard,0,a.INPUT_ALT_KEY),r=n&&1===t.pollInput(Bn.Keyboard,0,a.INPUT_CTRL_KEY),o=n&&(1===t.pollInput(Bn.Keyboard,0,a.INPUT_META_KEY1)||1===t.pollInput(Bn.Keyboard,0,a.INPUT_META_KEY2)||1===t.pollInput(Bn.Keyboard,0,a.INPUT_META_KEY3)),s=n&&1===t.pollInput(Bn.Keyboard,0,a.INPUT_SHIFT_KEY);e.altKey=i,e.ctrlKey=r,e.metaKey=o,e.shiftKey=s},e._CreateEvent=function(e){var t={preventDefault:function(){}};return t.target=e,t},e}(),hi=function(){function e(e,t,n){var i=this;this._nativeInput=_native.DeviceInputSystem?new _native.DeviceInputSystem(e,t,(function(e,t,r,o){var a=ui.CreateDeviceEvent(e,t,r,o,i);n(e,t,a)})):this._createDummyNativeInput()}return e.prototype.pollInput=function(e,t,n){return this._nativeInput.pollInput(e,t,n)},e.prototype.isDeviceAvailable=function(e){return e===Bn.Mouse||e===Bn.Touch},e.prototype.dispose=function(){this._nativeInput.dispose()},e.prototype._createDummyNativeInput=function(){return{pollInput:function(){return 0},isDeviceAvailable:function(){return!1},dispose:function(){}}},e}(),di=Object.keys(Un).length/2,pi=function(){function e(e,t,n,i){var r=this;this._inputs=[],this._keyboardActive=!1,this._pointerActive=!1,this._usingSafari=Pn.IsSafari(),this._usingMacOS=it()&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),this._keyboardDownEvent=function(e){},this._keyboardUpEvent=function(e){},this._keyboardBlurEvent=function(e){},this._pointerMoveEvent=function(e){},this._pointerDownEvent=function(e){},this._pointerUpEvent=function(e){},this._pointerCancelEvent=function(e){},this._pointerWheelEvent=function(e){},this._pointerBlurEvent=function(e){},this._pointerMacOSChromeOutEvent=function(e){},this._eventsAttached=!1,this._mouseId=-1,this._isUsingFirefox=it()&&navigator.userAgent&&-1!==navigator.userAgent.indexOf("Firefox"),this._isUsingChromium=it()&&navigator.userAgent&&-1!==navigator.userAgent.indexOf("Chrome"),this._maxTouchPoints=0,this._pointerInputClearObserver=null,this._gamepadConnectedEvent=function(e){},this._gamepadDisconnectedEvent=function(e){},this._eventPrefix=Pn.GetPointerPrefix(e),this._engine=e,this._onDeviceConnected=t,this._onDeviceDisconnected=n,this._onInputChanged=i,this._mouseId=this._isUsingFirefox?0:1,this._enableEvents(),this._usingMacOS&&(this._metaKeys=[]),this._engine._onEngineViewChanged||(this._engine._onEngineViewChanged=function(){r._enableEvents()})}return e.prototype.pollInput=function(e,t,n){var i=this._inputs[e][t];if(!i)throw"Unable to find device ".concat(Bn[e]);e>=Bn.DualShock&&e<=Bn.DualSense&&this._updateDevice(e,t,n);var r=i[n];if(void 0===r)throw"Unable to find input ".concat(n," for device ").concat(Bn[e]," in slot ").concat(t);return n===Un.Move&&Pn.Warn("Unable to provide information for PointerInput.Move. Try using PointerInput.Horizontal or PointerInput.Vertical for move data."),r},e.prototype.isDeviceAvailable=function(e){return void 0!==this._inputs[e]},e.prototype.dispose=function(){this._onDeviceConnected=function(){},this._onDeviceDisconnected=function(){},this._onInputChanged=function(){},delete this._engine._onEngineViewChanged,this._elementToAttachTo&&this._disableEvents()},e.prototype._enableEvents=function(){var e=null==this?void 0:this._engine.getInputElement();if(e&&(!this._eventsAttached||this._elementToAttachTo!==e)){if(this._disableEvents(),this._inputs)for(var t=0,n=this._inputs;t0){for(var r=0,o=e._metaKeys;r=0))return void Pn.Warn("Max number of touches exceeded. Ignoring touches in excess of ".concat(e._maxTouchPoints));i=r,e._activeTouchIds[r]=t.pointerId,e._onDeviceConnected(n,i)}e._inputs[n]||(e._inputs[n]={}),e._inputs[n][i]||e._addPointerDevice(n,i,t.clientX,t.clientY);var o=e._inputs[n][i];if(o){var a=t;a.inputIndex=Un.Move,o[Un.Horizontal]=t.clientX,o[Un.Vertical]=t.clientY,n===Bn.Touch&&0===o[Un.LeftClick]&&(o[Un.LeftClick]=1),void 0===t.pointerId&&(t.pointerId=e._mouseId),e._onInputChanged(n,i,a),e._usingSafari||-1===t.button||(a.inputIndex=t.button+2,o[t.button+2]=o[t.button+2]?0:1,e._onInputChanged(n,i,a))}},this._pointerDownEvent=function(t){var n=e._getPointerType(t),i=n===Bn.Mouse?0:t.pointerId;if(n===Bn.Touch){var r=e._activeTouchIds.indexOf(-1);if(!(r>=0))return void Pn.Warn("Max number of touches exceeded. Ignoring touches in excess of ".concat(e._maxTouchPoints));i=r,e._activeTouchIds[r]=t.pointerId}e._inputs[n]||(e._inputs[n]={}),e._inputs[n][i]?n===Bn.Touch&&e._onDeviceConnected(n,i):e._addPointerDevice(n,i,t.clientX,t.clientY);var o=e._inputs[n][i];if(o){var a=o[Un.Horizontal],s=o[Un.Vertical];if(n===Bn.Mouse){if(void 0===t.pointerId&&(t.pointerId=e._mouseId),!document.pointerLockElement)try{e._elementToAttachTo.setPointerCapture(e._mouseId)}catch(e){}}else if(t.pointerId&&!document.pointerLockElement)try{e._elementToAttachTo.setPointerCapture(t.pointerId)}catch(e){}o[Un.Horizontal]=t.clientX,o[Un.Vertical]=t.clientY,o[t.button+2]=1;var c=t;c.inputIndex=t.button+2,e._onInputChanged(n,i,c),a===t.clientX&&s===t.clientY||(c.inputIndex=Un.Move,e._onInputChanged(n,i,c))}},this._pointerUpEvent=function(t){var n,i,r,o,a,s=e._getPointerType(t),c=s===Bn.Mouse?0:e._activeTouchIds.indexOf(t.pointerId);if(s===Bn.Touch){if(-1===c)return;e._activeTouchIds[c]=-1}var l=null===(n=e._inputs[s])||void 0===n?void 0:n[c];if(l&&0!==l[t.button+2]){var u=l[Un.Horizontal],h=l[Un.Vertical];l[Un.Horizontal]=t.clientX,l[Un.Vertical]=t.clientY,l[t.button+2]=0;var d=t;void 0===t.pointerId&&(t.pointerId=e._mouseId),u===t.clientX&&h===t.clientY||(d.inputIndex=Un.Move,e._onInputChanged(s,c,d)),d.inputIndex=t.button+2,s===Bn.Mouse&&e._mouseId>=0&&(null===(r=(i=e._elementToAttachTo).hasPointerCapture)||void 0===r?void 0:r.call(i,e._mouseId))?e._elementToAttachTo.releasePointerCapture(e._mouseId):t.pointerId&&(null===(a=(o=e._elementToAttachTo).hasPointerCapture)||void 0===a?void 0:a.call(o,t.pointerId))&&e._elementToAttachTo.releasePointerCapture(t.pointerId),e._onInputChanged(s,c,d),s===Bn.Touch&&e._onDeviceDisconnected(s,c)}},this._pointerCancelEvent=function(t){var n,i,r,o;if("mouse"===t.pointerType){var a=e._inputs[Bn.Mouse][0];e._mouseId>=0&&(null===(i=(n=e._elementToAttachTo).hasPointerCapture)||void 0===i?void 0:i.call(n,e._mouseId))&&e._elementToAttachTo.releasePointerCapture(e._mouseId);for(var s=Un.LeftClick;s<=Un.BrowserForward;s++)if(1===a[s]){a[s]=0;var c=ui.CreateDeviceEvent(Bn.Mouse,0,s,0,e,e._elementToAttachTo);e._onInputChanged(Bn.Mouse,0,c)}}else{var l=e._activeTouchIds.indexOf(t.pointerId);if(-1===l)return;(null===(o=(r=e._elementToAttachTo).hasPointerCapture)||void 0===o?void 0:o.call(r,t.pointerId))&&e._elementToAttachTo.releasePointerCapture(t.pointerId),e._inputs[Bn.Touch][l][Un.LeftClick]=0,c=ui.CreateDeviceEvent(Bn.Touch,l,Un.LeftClick,0,e,e._elementToAttachTo,t.pointerId),e._onInputChanged(Bn.Touch,l,c),e._activeTouchIds[l]=-1,e._onDeviceDisconnected(Bn.Touch,l)}},this._wheelEventName="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";var n=!1,i=function(){};try{var r=Object.defineProperty({},"passive",{get:function(){n=!0}});this._elementToAttachTo.addEventListener("test",i,r),this._elementToAttachTo.removeEventListener("test",i,r)}catch(e){}this._pointerBlurEvent=function(){var t,n,i,r,o;if(e.isDeviceAvailable(Bn.Mouse)){var a=e._inputs[Bn.Mouse][0];e._mouseId>=0&&(null===(n=(t=e._elementToAttachTo).hasPointerCapture)||void 0===n?void 0:n.call(t,e._mouseId))&&e._elementToAttachTo.releasePointerCapture(e._mouseId);for(var s=Un.LeftClick;s<=Un.BrowserForward;s++)if(1===a[s]){a[s]=0;var c=ui.CreateDeviceEvent(Bn.Mouse,0,s,0,e,e._elementToAttachTo);e._onInputChanged(Bn.Mouse,0,c)}}if(e.isDeviceAvailable(Bn.Touch)){a=e._inputs[Bn.Touch];for(var l=0;l1&&e._pointerCancelEvent(t)},this._elementToAttachTo.addEventListener("lostpointercapture",this._pointerMacOSChromeOutEvent)),this._elementToAttachTo.addEventListener(this._eventPrefix+"move",this._pointerMoveEvent),this._elementToAttachTo.addEventListener(this._eventPrefix+"down",this._pointerDownEvent),this._elementToAttachTo.addEventListener(this._eventPrefix+"up",this._pointerUpEvent),this._elementToAttachTo.addEventListener(this._eventPrefix+"cancel",this._pointerCancelEvent),this._elementToAttachTo.addEventListener("blur",this._pointerBlurEvent),this._elementToAttachTo.addEventListener(this._wheelEventName,this._pointerWheelEvent,!!n&&{passive:!1}),this._pointerInputClearObserver=this._engine.onEndFrameObservable.add((function(){if(e.isDeviceAvailable(Bn.Mouse)){var t=e._inputs[Bn.Mouse][0];t[Un.MouseWheelX]=0,t[Un.MouseWheelY]=0,t[Un.MouseWheelZ]=0}}))},e.prototype._handleGamepadActions=function(){var e=this;this._gamepadConnectedEvent=function(t){e._addGamePad(t.gamepad)},this._gamepadDisconnectedEvent=function(t){if(e._gamepads){var n=e._getGamepadDeviceType(t.gamepad.id),i=t.gamepad.index;e._unregisterDevice(n,i),delete e._gamepads[i]}},window.addEventListener("gamepadconnected",this._gamepadConnectedEvent),window.addEventListener("gamepaddisconnected",this._gamepadDisconnectedEvent)},e.prototype._updateDevice=function(e,t,n){var i=navigator.getGamepads()[t];if(i&&e===this._gamepads[t]){var r=this._inputs[e][t];n>=i.buttons.length?r[n]=i.axes[n-i.buttons.length].valueOf():r[n]=i.buttons[n].value}},e.prototype._getGamepadDeviceType=function(e){return-1!==e.indexOf("054c")?-1!==e.indexOf("0ce6")?Bn.DualSense:Bn.DualShock:-1!==e.indexOf("Xbox One")||-1!==e.search("Xbox 360")||-1!==e.search("xinput")?Bn.Xbox:-1!==e.indexOf("057e")?Bn.Switch:Bn.Generic},e.prototype._getPointerType=function(e){var t=Bn.Mouse;return("touch"===e.pointerType||"pen"===e.pointerType||e.touches)&&(t=Bn.Touch),t},e}(),fi=function(){function e(e,t,n){void 0===n&&(n=0),this.deviceType=t,this.deviceSlot=n,this.onInputChangedObservable=new u,this._deviceInputSystem=e}return e.prototype.getInput=function(e){return this._deviceInputSystem.pollInput(this.deviceType,this.deviceSlot,e)},e}(),mi=function(){function e(e){var t=this;this._registeredManagers=new Array,this._refCount=0,this.registerManager=function(e){for(var n=0;n-1&&t._registeredManagers.splice(n,1)};var n=Object.keys(Bn).length/2;this._devices=new Array(n);var i=function(e,n){t._devices[e]||(t._devices[e]=new Array),t._devices[e][n]||(t._devices[e][n]=n);for(var i=0,r=t._registeredManagers;i=Un.MouseWheelX&&t.inputIndex<=Un.MouseWheelZ?ti.POINTERWHEEL:ti.POINTERMOVE;n.onPointerMove&&(e=e||this._pickMove(t),n.onPointerMove(t,e,u)),e?(l=new ri(u,t,e),this._setRayOnPointerInfo(e,t)):(l=new ri(u,t,null,this),this._movePointerInfo=l),n.onPointerObservable.hasObservers()&&n.onPointerObservable.notifyObservers(l,u)},e.prototype._setRayOnPointerInfo=function(e,t){var n=this._scene;e&&n._pickingAvailable&&(e.ray||(e.ray=n.createPickingRay(t.offsetX,t.offsetY,R.Identity(),n.activeCamera)))},e.prototype._addCameraPointerObserver=function(e,t){return this._cameraObserverCount++,this._scene.onPointerObservable.add(e,t)},e.prototype._removeCameraPointerObserver=function(e){return this._cameraObserverCount--,this._scene.onPointerObservable.remove(e)},e.prototype._checkForPicking=function(){return!!(this._scene.onPointerObservable.observers.length>this._cameraObserverCount||this._scene.onPointerPick)},e.prototype._checkPrePointerObservable=function(e,t,n){var i=this._scene,r=new ii(n,t,this._unTranslatedPointerX,this._unTranslatedPointerY);return e&&(r.originalPickingInfo=e,r.ray=e.ray,e.originMesh&&(r.nearInteractionPickingInfo=e)),i.onPrePointerObservable.notifyObservers(r,n),!!r.skipOnPointerObservable},e.prototype._pickMove=function(e){var t=this._scene,n=t.pick(this._unTranslatedPointerX,this._unTranslatedPointerY,t.pointerMovePredicate,t.pointerMoveFastCheck,t.cameraToUseForPointers,t.pointerMoveTrianglePredicate);return this._setCursorAndPointerOverMesh(n,e,t),n},e.prototype._setCursorAndPointerOverMesh=function(e,t,n){var i=n.getEngine().getInputElement();if(null==e?void 0:e.pickedMesh){if(this.setPointerOverMesh(e.pickedMesh,t.pointerId,e,t),!n.doNotHandleCursors&&i&&this._pointerOverMesh){var r=this._pointerOverMesh._getActionManagerForTrigger();r&&r.hasPointerTriggers&&(i.style.cursor=r.hoverCursor||n.hoverCursor)}}else this.setPointerOverMesh(null,t.pointerId,e,t)},e.prototype.simulatePointerMove=function(e,t){var n=new PointerEvent("pointermove",t);n.inputIndex=Un.Move,this._checkPrePointerObservable(e,n,ti.POINTERMOVE)||this._processPointerMove(e,n)},e.prototype.simulatePointerDown=function(e,t){var n=new PointerEvent("pointerdown",t);n.inputIndex=n.button+2,this._checkPrePointerObservable(e,n,ti.POINTERDOWN)||this._processPointerDown(e,n)},e.prototype._processPointerDown=function(t,n){var i,r=this,o=this._scene;if(null==t?void 0:t.pickedMesh){this._pickedDownMesh=t.pickedMesh;var s=t.pickedMesh._getActionManagerForTrigger();if(s){if(s.hasPickTriggers)switch(s.processTrigger(a.ACTION_OnPickDownTrigger,z.CreateNew(t.pickedMesh,n,t)),n.button){case 0:s.processTrigger(a.ACTION_OnLeftPickTrigger,z.CreateNew(t.pickedMesh,n,t));break;case 1:s.processTrigger(a.ACTION_OnCenterPickTrigger,z.CreateNew(t.pickedMesh,n,t));break;case 2:s.processTrigger(a.ACTION_OnRightPickTrigger,z.CreateNew(t.pickedMesh,n,t))}s.hasSpecificTrigger(a.ACTION_OnLongPressTrigger)&&window.setTimeout((function(){var t=o.pick(r._unTranslatedPointerX,r._unTranslatedPointerY,(function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.actionManager&&e.actionManager.hasSpecificTrigger(a.ACTION_OnLongPressTrigger)&&e===r._pickedDownMesh}),!1,o.cameraToUseForPointers);(null==t?void 0:t.pickedMesh)&&s&&0!==r._totalPointersPressed&&Date.now()-r._startingPointerTime>e.LongPressDelay&&!r._isPointerSwiping()&&(r._startingPointerTime=0,s.processTrigger(a.ACTION_OnLongPressTrigger,z.CreateNew(t.pickedMesh,n)))}),e.LongPressDelay)}}else for(var c=0,l=o._pointerDownStage;cthis._cameraObserverCount)){var r=ti.POINTERPICK,o=new ri(r,t,e);this._setRayOnPointerInfo(e,t),i.onPointerObservable.notifyObservers(o,r)}var s=e.pickedMesh._getActionManagerForTrigger();if(s&&!n.ignore){s.processTrigger(a.ACTION_OnPickUpTrigger,z.CreateNew(e.pickedMesh,t,e)),!n.hasSwiped&&n.singleClick&&s.processTrigger(a.ACTION_OnPickTrigger,z.CreateNew(e.pickedMesh,t,e));var c=e.pickedMesh._getActionManagerForTrigger(a.ACTION_OnDoublePickTrigger);n.doubleClick&&c&&c.processTrigger(a.ACTION_OnDoublePickTrigger,z.CreateNew(e.pickedMesh,t,e))}}else if(!n.ignore)for(var l=0,u=i._pointerUpStage;le.DoubleClickDelay&&!o._doubleClickOccured||t!==o._previousButtonPressed)&&(o._doubleClickOccured=!1,n.singleClick=!0,n.ignore=!1,o._delayedClicks[t])){var r=o._delayedClicks[t].evt,a=ti.POINTERTAP,s=new ri(a,r,o._currentPickResult);c.onPointerObservable.hasObservers()&&c.onPointerObservable.hasSpecificMask(a)&&c.onPointerObservable.notifyObservers(s,a),o._delayedClicks[t]=null}},this._initClickEvent=function(t,n,i,r){var c,l,u=new gi;o._currentPickResult=null;var h=null,d=t.hasSpecificMask(ti.POINTERPICK)||n.hasSpecificMask(ti.POINTERPICK)||t.hasSpecificMask(ti.POINTERTAP)||n.hasSpecificMask(ti.POINTERTAP)||t.hasSpecificMask(ti.POINTERDOUBLETAP)||n.hasSpecificMask(ti.POINTERDOUBLETAP);!d&&s&&(h=o._initActionManager(h,u))&&(d=h.hasPickTriggers);var p=!1;if(d){var f=i.button;if(u.hasSwiped=o._isPointerSwiping(),!u.hasSwiped){var m=!e.ExclusiveDoubleClickMode;if(m||(m=!t.hasSpecificMask(ti.POINTERDOUBLETAP)&&!n.hasSpecificMask(ti.POINTERDOUBLETAP))&&!s.HasSpecificTrigger(a.ACTION_OnDoublePickTrigger)&&(h=o._initActionManager(h,u))&&(m=!h.hasSpecificTrigger(a.ACTION_OnDoublePickTrigger)),m)(Date.now()-o._previousStartingPointerTime>e.DoubleClickDelay||f!==o._previousButtonPressed)&&(u.singleClick=!0,r(u,o._currentPickResult),p=!0);else{var _={evt:i,clickInfo:u,timeoutId:window.setTimeout(o._delayedSimpleClick.bind(o,f,u,r),e.DoubleClickDelay)};o._delayedClicks[f]=_}var g=t.hasSpecificMask(ti.POINTERDOUBLETAP)||n.hasSpecificMask(ti.POINTERDOUBLETAP);!g&&s.HasSpecificTrigger(a.ACTION_OnDoublePickTrigger)&&(h=o._initActionManager(h,u))&&(g=h.hasSpecificTrigger(a.ACTION_OnDoublePickTrigger)),g&&(f===o._previousButtonPressed&&Date.now()-o._previousStartingPointerTimee.DragMovementThreshold||Math.abs(o._startingPointerPosition.y-o._pointerY)>e.DragMovementThreshold),l.isPointerLock&&l._verifyPointerLock(),!o._checkPrePointerObservable(null,t,t.inputIndex>=Un.MouseWheelX&&t.inputIndex<=Un.MouseWheelZ?ti.POINTERWHEEL:ti.POINTERMOVE)&&(c.cameraToUseForPointers||c.activeCamera))if(c.skipPointerMovePicking)o._processPointerMove(new qn,t);else{c.pointerMovePredicate||(c.pointerMovePredicate=function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()&&(e.enablePointerMoveEvents||c.constantlyUpdateMeshUnderPointer||null!==e._getActionManagerForTrigger())&&(!c.cameraToUseForPointers||0!=(c.cameraToUseForPointers.layerMask&e.layerMask))});var n=c._registeredActions>0||c.constantlyUpdateMeshUnderPointer?o._pickMove(t):null;o._processPointerMove(n,t)}},this._onPointerDown=function(t){var n,i;if(o._totalPointersPressed++,o._pickedDownMesh=null,o._meshPickProceed=!1,e.ExclusiveDoubleClickMode)for(var a=0;a1&&(o._isMultiTouchGesture=!0)):t&&0===e.getInput(r.inputIndex)&&(o._onPointerUp(r),0===o._totalPointersPressed&&(o._isMultiTouchGesture=!1))),i&&r.inputIndex===Un.Move&&o._onPointerMove(r)})):e.deviceType===Bn.Keyboard&&e.onInputChangedObservable.add((function(e){"keydown"===e.type?o._onKeyDown(e):"keyup"===e.type&&o._onKeyUp(e)}))})),this._alreadyAttached=!0},e.prototype.detachControl=function(){this._alreadyAttached&&(this._deviceSourceManager.dispose(),this._deviceSourceManager=null,this._alreadyAttachedTo&&!this._scene.doNotHandleCursors&&(this._alreadyAttachedTo.style.cursor=this._scene.defaultCursor),this._alreadyAttached=!1,this._alreadyAttachedTo=null)},e.prototype.setPointerOverMesh=function(e,t,n,i){if(void 0===t&&(t=0),this._meshUnderPointerId[t]!==e||e&&e._internalAbstractMeshDataInfo._pointerOverDisableMeshTesting){var r,o=this._meshUnderPointerId[t];o&&(r=o._getActionManagerForTrigger(a.ACTION_OnPointerOutTrigger))&&r.processTrigger(a.ACTION_OnPointerOutTrigger,z.CreateNew(o,i,{pointerId:t})),e?(this._meshUnderPointerId[t]=e,this._pointerOverMesh=e,(r=e._getActionManagerForTrigger(a.ACTION_OnPointerOverTrigger))&&r.processTrigger(a.ACTION_OnPointerOverTrigger,z.CreateNew(e,i,{pointerId:t,pickResult:n}))):(delete this._meshUnderPointerId[t],this._pointerOverMesh=null)}},e.prototype.getPointerOverMesh=function(){return this.meshUnderPointer},e.prototype._invalidateMesh=function(e){for(var t in this._pointerOverMesh===e&&(this._pointerOverMesh=null),this._pickedDownMesh===e&&(this._pickedDownMesh=null),this._pickedUpMesh===e&&(this._pickedUpMesh=null),this._meshUnderPointerId)this._meshUnderPointerId[t]===e&&delete this._meshUnderPointerId[t]},e.DragMovementThreshold=10,e.LongPressDelay=500,e.DoubleClickDelay=300,e.ExclusiveDoubleClickMode=!1,e}(),vi=function(){function e(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}return Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"average",{get:function(){return this._average},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastSecAverage",{get:function(){return this._lastSecAverage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"current",{get:function(){return this._current},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this._totalAccumulated},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._totalValueCount},enumerable:!1,configurable:!0}),e.prototype.fetchNewFrame=function(){this._totalValueCount++,this._current=0,this._lastSecValueCount++},e.prototype.addCount=function(t,n){e.Enabled&&(this._current+=t,n&&this._fetchResult())},e.prototype.beginMonitoring=function(){e.Enabled&&(this._startMonitoringTime=ct.Now)},e.prototype.endMonitoring=function(t){if(void 0===t&&(t=!0),e.Enabled){t&&this.fetchNewFrame();var n=ct.Now;this._current=n-this._startMonitoringTime,t&&this._fetchResult()}},e.prototype.endFrame=function(){this._fetchResult()},e.prototype._fetchResult=function(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;var e=ct.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)},e.Enabled=!0,e}(),bi=function(){function e(e,t,n,i){this.normal=new C(e,t,n),this.d=i}return e.prototype.asArray=function(){return[this.normal.x,this.normal.y,this.normal.z,this.d]},e.prototype.clone=function(){return new e(this.normal.x,this.normal.y,this.normal.z,this.d)},e.prototype.getClassName=function(){return"Plane"},e.prototype.getHashCode=function(){return 397*this.normal.getHashCode()^(0|this.d)},e.prototype.normalize=function(){var e=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),t=0;return 0!==e&&(t=1/e),this.normal.x*=t,this.normal.y*=t,this.normal.z*=t,this.d*=t,this},e.prototype.transform=function(t){var n=e._TmpMatrix;t.invertToRef(n);var i=n.m,r=this.normal.x,o=this.normal.y,a=this.normal.z,s=this.d;return new e(r*i[0]+o*i[1]+a*i[2]+s*i[3],r*i[4]+o*i[5]+a*i[6]+s*i[7],r*i[8]+o*i[9]+a*i[10]+s*i[11],r*i[12]+o*i[13]+a*i[14]+s*i[15])},e.prototype.dotCoordinate=function(e){return this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z+this.d},e.prototype.copyFromPoints=function(e,t,n){var i,r=t.x-e.x,o=t.y-e.y,a=t.z-e.z,s=n.x-e.x,c=n.y-e.y,l=n.z-e.z,u=o*l-a*c,h=a*s-r*l,d=r*c-o*s,p=Math.sqrt(u*u+h*h+d*d);return i=0!==p?1/p:0,this.normal.x=u*i,this.normal.y=h*i,this.normal.z=d*i,this.d=-(this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z),this},e.prototype.isFrontFacingTo=function(e,t){return C.Dot(this.normal,e)<=t},e.prototype.signedDistanceTo=function(e){return C.Dot(e,this.normal)+this.d},e.FromArray=function(t){return new e(t[0],t[1],t[2],t[3])},e.FromPoints=function(t,n,i){var r=new e(0,0,0,0);return r.copyFromPoints(t,n,i),r},e.FromPositionAndNormal=function(t,n){var i=new e(0,0,0,0);return this.FromPositionAndNormalToRef(t,n,i)},e.FromPositionAndNormalToRef=function(e,t,n){return n.normal.copyFrom(t),n.normal.normalize(),n.d=-e.dot(n.normal),n},e.SignedDistanceToPlaneFromPositionAndNormal=function(e,t,n){var i=-(t.x*e.x+t.y*e.y+t.z*e.z);return C.Dot(n,t)+i},e._TmpMatrix=R.Identity(),e}(),Ti=function(){function e(){}return e.GetPlanes=function(t){for(var n=[],i=0;i<6;i++)n.push(new bi(0,0,0,0));return e.GetPlanesToRef(t,n),n},e.GetNearPlaneToRef=function(e,t){var n=e.m;t.normal.x=n[3]+n[2],t.normal.y=n[7]+n[6],t.normal.z=n[11]+n[10],t.d=n[15]+n[14],t.normalize()},e.GetFarPlaneToRef=function(e,t){var n=e.m;t.normal.x=n[3]-n[2],t.normal.y=n[7]-n[6],t.normal.z=n[11]-n[10],t.d=n[15]-n[14],t.normalize()},e.GetLeftPlaneToRef=function(e,t){var n=e.m;t.normal.x=n[3]+n[0],t.normal.y=n[7]+n[4],t.normal.z=n[11]+n[8],t.d=n[15]+n[12],t.normalize()},e.GetRightPlaneToRef=function(e,t){var n=e.m;t.normal.x=n[3]-n[0],t.normal.y=n[7]-n[4],t.normal.z=n[11]-n[8],t.d=n[15]-n[12],t.normalize()},e.GetTopPlaneToRef=function(e,t){var n=e.m;t.normal.x=n[3]-n[1],t.normal.y=n[7]-n[5],t.normal.z=n[11]-n[9],t.d=n[15]-n[13],t.normalize()},e.GetBottomPlaneToRef=function(e,t){var n=e.m;t.normal.x=n[3]+n[1],t.normal.y=n[7]+n[5],t.normal.z=n[11]+n[9],t.d=n[15]+n[13],t.normalize()},e.GetPlanesToRef=function(t,n){e.GetNearPlaneToRef(t,n[0]),e.GetFarPlaneToRef(t,n[1]),e.GetLeftPlaneToRef(t,n[2]),e.GetRightPlaneToRef(t,n[3]),e.GetTopPlaneToRef(t,n[4]),e.GetBottomPlaneToRef(t,n[5])},e.IsPointInFrustum=function(e,t){for(var n=0;n<6;n++)if(t[n].dotCoordinate(e)<0)return!1;return!0},e}(),Ei=function(){function e(){}return Object.defineProperty(e,"UniqueId",{get:function(){var e=this._UniqueIdCounter;return this._UniqueIdCounter++,e},enumerable:!1,configurable:!0}),e._UniqueIdCounter=1,e}(),Ai=function(){function e(){}return e.CompareLightsPriority=function(e,t){return e.shadowEnabled!==t.shadowEnabled?(t.shadowEnabled?1:0)-(e.shadowEnabled?1:0):t.renderPriority-e.renderPriority},e.FALLOFF_DEFAULT=0,e.FALLOFF_PHYSICAL=1,e.FALLOFF_GLTF=2,e.FALLOFF_STANDARD=3,e.LIGHTMAP_DEFAULT=0,e.LIGHTMAP_SPECULAR=1,e.LIGHTMAP_SHADOWSONLY=2,e.INTENSITYMODE_AUTOMATIC=0,e.INTENSITYMODE_LUMINOUSPOWER=1,e.INTENSITYMODE_LUMINOUSINTENSITY=2,e.INTENSITYMODE_ILLUMINANCE=3,e.INTENSITYMODE_LUMINANCE=4,e.LIGHTTYPEID_POINTLIGHT=0,e.LIGHTTYPEID_DIRECTIONALLIGHT=1,e.LIGHTTYPEID_SPOTLIGHT=2,e.LIGHTTYPEID_HEMISPHERICLIGHT=3,e}(),xi=function(){this.pointerDownFastCheck=!1,this.pointerUpFastCheck=!1,this.pointerMoveFastCheck=!1,this.skipPointerMovePicking=!1,this.skipPointerDownPicking=!1,this.skipPointerUpPicking=!1};!function(e){e[e.BackwardCompatible=0]="BackwardCompatible",e[e.Intermediate=1]="Intermediate",e[e.Aggressive=2]="Aggressive"}(ci||(ci={}));var Si,Ci=function(e){function t(n,i){var r=e.call(this)||this;r._inputManager=new yi(r),r.cameraToUseForPointers=null,r._isScene=!0,r._blockEntityCollection=!1,r.autoClear=!0,r.autoClearDepthAndStencil=!0,r.clearColor=new U(.2,.2,.3,1),r.ambientColor=new B(0,0,0),r.environmentIntensity=1,r._performancePriority=ci.BackwardCompatible,r.onScenePerformancePriorityChangedObservable=new u,r._forceWireframe=!1,r._skipFrustumClipping=!1,r._forcePointsCloud=!1,r.animationsEnabled=!0,r._animationPropertiesOverride=null,r.useConstantAnimationDeltaTime=!1,r.constantlyUpdateMeshUnderPointer=!1,r.hoverCursor="pointer",r.defaultCursor="",r.doNotHandleCursors=!1,r.preventDefaultOnPointerDown=!0,r.preventDefaultOnPointerUp=!0,r.metadata=null,r.reservedDataStore=null,r.disableOfflineSupportExceptionRules=[],r.onDisposeObservable=new u,r._onDisposeObserver=null,r.onBeforeRenderObservable=new u,r._onBeforeRenderObserver=null,r.onAfterRenderObservable=new u,r.onAfterRenderCameraObservable=new u,r._onAfterRenderObserver=null,r.onBeforeAnimationsObservable=new u,r.onAfterAnimationsObservable=new u,r.onBeforeDrawPhaseObservable=new u,r.onAfterDrawPhaseObservable=new u,r.onReadyObservable=new u,r.onBeforeCameraRenderObservable=new u,r._onBeforeCameraRenderObserver=null,r.onAfterCameraRenderObservable=new u,r._onAfterCameraRenderObserver=null,r.onBeforeActiveMeshesEvaluationObservable=new u,r.onAfterActiveMeshesEvaluationObservable=new u,r.onBeforeParticlesRenderingObservable=new u,r.onAfterParticlesRenderingObservable=new u,r.onDataLoadedObservable=new u,r.onNewCameraAddedObservable=new u,r.onCameraRemovedObservable=new u,r.onNewLightAddedObservable=new u,r.onLightRemovedObservable=new u,r.onNewGeometryAddedObservable=new u,r.onGeometryRemovedObservable=new u,r.onNewTransformNodeAddedObservable=new u,r.onTransformNodeRemovedObservable=new u,r.onNewMeshAddedObservable=new u,r.onMeshRemovedObservable=new u,r.onNewSkeletonAddedObservable=new u,r.onSkeletonRemovedObservable=new u,r.onNewMaterialAddedObservable=new u,r.onNewMultiMaterialAddedObservable=new u,r.onMaterialRemovedObservable=new u,r.onMultiMaterialRemovedObservable=new u,r.onNewTextureAddedObservable=new u,r.onTextureRemovedObservable=new u,r.onBeforeRenderTargetsRenderObservable=new u,r.onAfterRenderTargetsRenderObservable=new u,r.onBeforeStepObservable=new u,r.onAfterStepObservable=new u,r.onActiveCameraChanged=new u,r.onActiveCamerasChanged=new u,r.onBeforeRenderingGroupObservable=new u,r.onAfterRenderingGroupObservable=new u,r.onMeshImportedObservable=new u,r.onAnimationFileImportedObservable=new u,r._registeredForLateAnimationBindings=new wn(256),r._pointerPickingConfiguration=new xi,r.onPrePointerObservable=new u,r.onPointerObservable=new u,r.onPreKeyboardObservable=new u,r.onKeyboardObservable=new u,r._useRightHandedSystem=!1,r._timeAccumulator=0,r._currentStepId=0,r._currentInternalStep=0,r._fogEnabled=!0,r._fogMode=t.FOGMODE_NONE,r.fogColor=new B(.2,.2,.3),r.fogDensity=.1,r.fogStart=0,r.fogEnd=1e3,r.needsPreviousWorldMatrices=!1,r._shadowsEnabled=!0,r._lightsEnabled=!0,r._unObserveActiveCameras=null,r._texturesEnabled=!0,r.physicsEnabled=!0,r.particlesEnabled=!0,r.spritesEnabled=!0,r._skeletonsEnabled=!0,r.lensFlaresEnabled=!0,r.collisionsEnabled=!0,r.gravity=new C(0,-9.807,0),r.postProcessesEnabled=!0,r.renderTargetsEnabled=!0,r.dumpNextRenderTargets=!1,r.customRenderTargets=[],r.importedMeshesFiles=[],r.probesEnabled=!0,r._meshesForIntersections=new wn(256),r.proceduralTexturesEnabled=!0,r._totalVertices=new vi,r._activeIndices=new vi,r._activeParticles=new vi,r._activeBones=new vi,r._animationTime=0,r.animationTimeScale=1,r._renderId=0,r._frameId=0,r._executeWhenReadyTimeoutId=null,r._intermediateRendering=!1,r._defaultFrameBufferCleared=!1,r._viewUpdateFlag=-1,r._projectionUpdateFlag=-1,r._toBeDisposed=new Array(256),r._activeRequests=new Array,r._pendingData=new Array,r._isDisposed=!1,r.dispatchAllSubMeshesOfActiveMeshes=!1,r._activeMeshes=new On(256),r._processedMaterials=new On(256),r._renderTargets=new wn(256),r._materialsRenderTargets=new wn(256),r._activeParticleSystems=new On(256),r._activeSkeletons=new wn(32),r._softwareSkinnedMeshes=new wn(32),r._activeAnimatables=new Array,r._transformMatrix=R.Zero(),r.requireLightSorting=!1,r._components=[],r._serializableComponents=[],r._transientComponents=[],r._beforeCameraUpdateStage=ei.Create(),r._beforeClearStage=ei.Create(),r._beforeRenderTargetClearStage=ei.Create(),r._gatherRenderTargetsStage=ei.Create(),r._gatherActiveCameraRenderTargetsStage=ei.Create(),r._isReadyForMeshStage=ei.Create(),r._beforeEvaluateActiveMeshStage=ei.Create(),r._evaluateSubMeshStage=ei.Create(),r._preActiveMeshStage=ei.Create(),r._cameraDrawRenderTargetStage=ei.Create(),r._beforeCameraDrawStage=ei.Create(),r._beforeRenderTargetDrawStage=ei.Create(),r._beforeRenderingGroupDrawStage=ei.Create(),r._beforeRenderingMeshStage=ei.Create(),r._afterRenderingMeshStage=ei.Create(),r._afterRenderingGroupDrawStage=ei.Create(),r._afterCameraDrawStage=ei.Create(),r._afterCameraPostProcessStage=ei.Create(),r._afterRenderTargetDrawStage=ei.Create(),r._afterRenderTargetPostProcessStage=ei.Create(),r._afterRenderStage=ei.Create(),r._pointerMoveStage=ei.Create(),r._pointerDownStage=ei.Create(),r._pointerUpStage=ei.Create(),r._geometriesByUniqueId=null,r._defaultMeshCandidates={data:[],length:0},r._defaultSubMeshCandidates={data:[],length:0},r._preventFreeActiveMeshesAndRenderingGroups=!1,r._activeMeshesFrozen=!1,r._activeMeshesFrozenButKeepClipping=!1,r._skipEvaluateActiveMeshesCompletely=!1,r._allowPostProcessClearColor=!0,r.getDeterministicFrameTime=function(){return r._engine.getTimeStep()},r._registeredActions=0,r._blockMaterialDirtyMechanism=!1,r._perfCollector=null,r.activeCameras=[];var o=j({useGeometryUniqueIdsMap:!0,useMaterialMeshMap:!0,useClonedMeshMap:!0,virtual:!1},i);return n=r._engine=n||A.LastCreatedEngine,o.virtual?n._virtualScenes.push(r):(A._LastCreatedScene=r,n.scenes.push(r)),r._uid=null,r._renderingManager=new $n(r),Kn&&(r.postProcessManager=new Kn(r)),nt()&&r.attachControl(),r._createUbo(),Fn&&(r._imageProcessingConfiguration=new Fn),r.setDefaultCandidateProviders(),o.useGeometryUniqueIdsMap&&(r._geometriesByUniqueId={}),r.useMaterialMeshMap=o.useMaterialMeshMap,r.useClonedMeshMap=o.useClonedMeshMap,i&&i.virtual||n.onNewSceneAddedObservable.notifyObservers(r),r}return H(t,e),t.DefaultMaterialFactory=function(e){throw ye("StandardMaterial")},t.CollisionCoordinatorFactory=function(){throw ye("DefaultCollisionCoordinator")},Object.defineProperty(t.prototype,"environmentTexture",{get:function(){return this._environmentTexture},set:function(e){this._environmentTexture!==e&&(this._environmentTexture=e,this.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"performancePriority",{get:function(){return this._performancePriority},set:function(e){if(e!==this._performancePriority){switch(this._performancePriority=e,e){case ci.BackwardCompatible:this.skipFrustumClipping=!1,this._renderingManager.maintainStateBetweenFrames=!1,this.skipPointerMovePicking=!1,this.autoClear=!0;break;case ci.Intermediate:this.skipFrustumClipping=!1,this._renderingManager.maintainStateBetweenFrames=!1,this.skipPointerMovePicking=!0,this.autoClear=!1;break;case ci.Aggressive:this.skipFrustumClipping=!0,this._renderingManager.maintainStateBetweenFrames=!0,this.skipPointerMovePicking=!0,this.autoClear=!1}this.onScenePerformancePriorityChangedObservable.notifyObservers(e)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"forceWireframe",{get:function(){return this._forceWireframe},set:function(e){this._forceWireframe!==e&&(this._forceWireframe=e,this.markAllMaterialsAsDirty(a.MATERIAL_MiscDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skipFrustumClipping",{get:function(){return this._skipFrustumClipping},set:function(e){this._skipFrustumClipping!==e&&(this._skipFrustumClipping=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"forcePointsCloud",{get:function(){return this._forcePointsCloud},set:function(e){this._forcePointsCloud!==e&&(this._forcePointsCloud=e,this.markAllMaterialsAsDirty(a.MATERIAL_MiscDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"beforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),e&&(this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"afterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),e&&(this._onAfterRenderObserver=this.onAfterRenderObservable.add(e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"beforeCameraRender",{set:function(e){this._onBeforeCameraRenderObserver&&this.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=this.onBeforeCameraRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"afterCameraRender",{set:function(e){this._onAfterCameraRenderObserver&&this.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=this.onAfterCameraRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pointerDownPredicate",{get:function(){return this._pointerPickingConfiguration.pointerDownPredicate},set:function(e){this._pointerPickingConfiguration.pointerDownPredicate=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pointerUpPredicate",{get:function(){return this._pointerPickingConfiguration.pointerUpPredicate},set:function(e){this._pointerPickingConfiguration.pointerUpPredicate=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pointerMovePredicate",{get:function(){return this._pointerPickingConfiguration.pointerMovePredicate},set:function(e){this._pointerPickingConfiguration.pointerMovePredicate=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pointerDownFastCheck",{get:function(){return this._pointerPickingConfiguration.pointerDownFastCheck},set:function(e){this._pointerPickingConfiguration.pointerDownFastCheck=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pointerUpFastCheck",{get:function(){return this._pointerPickingConfiguration.pointerUpFastCheck},set:function(e){this._pointerPickingConfiguration.pointerUpFastCheck=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pointerMoveFastCheck",{get:function(){return this._pointerPickingConfiguration.pointerMoveFastCheck},set:function(e){this._pointerPickingConfiguration.pointerMoveFastCheck=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skipPointerMovePicking",{get:function(){return this._pointerPickingConfiguration.skipPointerMovePicking},set:function(e){this._pointerPickingConfiguration.skipPointerMovePicking=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skipPointerDownPicking",{get:function(){return this._pointerPickingConfiguration.skipPointerDownPicking},set:function(e){this._pointerPickingConfiguration.skipPointerDownPicking=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skipPointerUpPicking",{get:function(){return this._pointerPickingConfiguration.skipPointerUpPicking},set:function(e){this._pointerPickingConfiguration.skipPointerUpPicking=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unTranslatedPointer",{get:function(){return this._inputManager.unTranslatedPointer},enumerable:!1,configurable:!0}),Object.defineProperty(t,"DragMovementThreshold",{get:function(){return yi.DragMovementThreshold},set:function(e){yi.DragMovementThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"LongPressDelay",{get:function(){return yi.LongPressDelay},set:function(e){yi.LongPressDelay=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"DoubleClickDelay",{get:function(){return yi.DoubleClickDelay},set:function(e){yi.DoubleClickDelay=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"ExclusiveDoubleClickMode",{get:function(){return yi.ExclusiveDoubleClickMode},set:function(e){yi.ExclusiveDoubleClickMode=e},enumerable:!1,configurable:!0}),t.prototype.bindEyePosition=function(e,t,n){void 0===t&&(t="vEyePosition"),void 0===n&&(n=!1);var i=this._forcedViewPosition?this._forcedViewPosition:this._mirroredCameraPosition?this._mirroredCameraPosition:this.activeCamera.globalPosition,r=this.useRightHandedSystem===(null!=this._mirroredCameraPosition);return w.Vector4[0].set(i.x,i.y,i.z,r?-1:1),e&&(n?e.setFloat3(t,w.Vector4[0].x,w.Vector4[0].y,w.Vector4[0].z):e.setVector4(t,w.Vector4[0])),w.Vector4[0]},t.prototype.finalizeSceneUbo=function(){var e=this.getSceneUniformBuffer(),t=this.bindEyePosition(null);return e.updateFloat4("vEyePosition",t.x,t.y,t.z,t.w),e.update(),e},Object.defineProperty(t.prototype,"useRightHandedSystem",{get:function(){return this._useRightHandedSystem},set:function(e){this._useRightHandedSystem!==e&&(this._useRightHandedSystem=e,this.markAllMaterialsAsDirty(a.MATERIAL_MiscDirtyFlag))},enumerable:!1,configurable:!0}),t.prototype.setStepId=function(e){this._currentStepId=e},t.prototype.getStepId=function(){return this._currentStepId},t.prototype.getInternalStep=function(){return this._currentInternalStep},Object.defineProperty(t.prototype,"fogEnabled",{get:function(){return this._fogEnabled},set:function(e){this._fogEnabled!==e&&(this._fogEnabled=e,this.markAllMaterialsAsDirty(a.MATERIAL_MiscDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fogMode",{get:function(){return this._fogMode},set:function(e){this._fogMode!==e&&(this._fogMode=e,this.markAllMaterialsAsDirty(a.MATERIAL_MiscDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"prePass",{get:function(){return!!this.prePassRenderer&&this.prePassRenderer.defaultRT.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowsEnabled",{get:function(){return this._shadowsEnabled},set:function(e){this._shadowsEnabled!==e&&(this._shadowsEnabled=e,this.markAllMaterialsAsDirty(a.MATERIAL_LightDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightsEnabled",{get:function(){return this._lightsEnabled},set:function(e){this._lightsEnabled!==e&&(this._lightsEnabled=e,this.markAllMaterialsAsDirty(a.MATERIAL_LightDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeCameras",{get:function(){return this._activeCameras},set:function(e){var t=this;this._unObserveActiveCameras&&(this._unObserveActiveCameras(),this._unObserveActiveCameras=null),e&&(this._unObserveActiveCameras=y(e,(function(){t.onActiveCamerasChanged.notifyObservers(t)}))),this._activeCameras=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeCamera",{get:function(){return this._activeCamera},set:function(e){e!==this._activeCamera&&(this._activeCamera=e,this.onActiveCameraChanged.notifyObservers(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultMaterial",{get:function(){return this._defaultMaterial||(this._defaultMaterial=t.DefaultMaterialFactory(this)),this._defaultMaterial},set:function(e){this._defaultMaterial=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"texturesEnabled",{get:function(){return this._texturesEnabled},set:function(e){this._texturesEnabled!==e&&(this._texturesEnabled=e,this.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skeletonsEnabled",{get:function(){return this._skeletonsEnabled},set:function(e){this._skeletonsEnabled!==e&&(this._skeletonsEnabled=e,this.markAllMaterialsAsDirty(a.MATERIAL_AttributesDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"collisionCoordinator",{get:function(){return this._collisionCoordinator||(this._collisionCoordinator=t.CollisionCoordinatorFactory(),this._collisionCoordinator.init(this)),this._collisionCoordinator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderingManager",{get:function(){return this._renderingManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"frustumPlanes",{get:function(){return this._frustumPlanes},enumerable:!1,configurable:!0}),t.prototype._registerTransientComponents=function(){if(this._transientComponents.length>0){for(var e=0,t=this._transientComponents;e0&&(c=!1),null===(i=this.prePassRenderer)||void 0===i||i.update(),this.useOrderIndependentTransparency&&this.depthPeelingRenderer&&c&&(c=this.depthPeelingRenderer.isReady()),e&&(this._processedMaterials.reset(),this._materialsRenderTargets.reset()),r=0;r0,h=0,d=this._isReadyForMeshStage;h0)for(var g=0,y=this.activeCameras;g0},enumerable:!1,configurable:!0}),t.prototype.executeWhenReady=function(e,t){void 0===t&&(t=!1),this.onReadyObservable.addOnce(e),null===this._executeWhenReadyTimeoutId&&this._checkIsReady(t)},t.prototype.whenReadyAsync=function(e){var t=this;return void 0===e&&(e=!1),new Promise((function(n){t.executeWhenReady((function(){n()}),e)}))},t.prototype._checkIsReady=function(e){var t=this;return void 0===e&&(e=!1),this._registerTransientComponents(),this.isReady(e)?(this.onReadyObservable.notifyObservers(this),this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=null)):this._isDisposed?(this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=null)):void(this._executeWhenReadyTimeoutId=setTimeout((function(){t.incrementRenderId(),t._checkIsReady(e)}),100))},Object.defineProperty(t.prototype,"animatables",{get:function(){return this._activeAnimatables},enumerable:!1,configurable:!0}),t.prototype.resetLastAnimationTimeFrame=function(){this._animationTimeLast=ct.Now},t.prototype.getViewMatrix=function(){return this._viewMatrix},t.prototype.getProjectionMatrix=function(){return this._projectionMatrix},t.prototype.getTransformMatrix=function(){return this._transformMatrix},t.prototype.setTransformMatrix=function(e,t,n,i){n||i||!this._multiviewSceneUbo||(this._multiviewSceneUbo.dispose(),this._multiviewSceneUbo=null),this._viewUpdateFlag===e.updateFlag&&this._projectionUpdateFlag===t.updateFlag||(this._viewUpdateFlag=e.updateFlag,this._projectionUpdateFlag=t.updateFlag,this._viewMatrix=e,this._projectionMatrix=t,this._viewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._frustumPlanes?Ti.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=Ti.GetPlanes(this._transformMatrix),this._multiviewSceneUbo&&this._multiviewSceneUbo.useUbo?this._updateMultiviewUbo(n,i):this._sceneUbo.useUbo&&(this._sceneUbo.updateMatrix("viewProjection",this._transformMatrix),this._sceneUbo.updateMatrix("view",this._viewMatrix),this._sceneUbo.updateMatrix("projection",this._projectionMatrix)))},t.prototype.getSceneUniformBuffer=function(){return this._multiviewSceneUbo?this._multiviewSceneUbo:this._sceneUbo},t.prototype.createSceneUniformBuffer=function(e){var t=new Wn(this._engine,void 0,!1,null!=e?e:"scene");return t.addUniform("viewProjection",16),t.addUniform("view",16),t.addUniform("projection",16),t.addUniform("vEyePosition",4),t},t.prototype.setSceneUniformBuffer=function(e){this._sceneUbo=e,this._viewUpdateFlag=-1,this._projectionUpdateFlag=-1},t.prototype.getUniqueId=function(){return Ei.UniqueId},t.prototype.addMesh=function(e,t){var n=this;void 0===t&&(t=!1),this._blockEntityCollection||(this.meshes.push(e),e._resyncLightSources(),e.parent||e._addToSceneRootNodes(),this.onNewMeshAddedObservable.notifyObservers(e),t&&e.getChildMeshes().forEach((function(e){n.addMesh(e)})))},t.prototype.removeMesh=function(e,t){var n=this;void 0===t&&(t=!1);var i=this.meshes.indexOf(e);return-1!==i&&(this.meshes[i]=this.meshes[this.meshes.length-1],this.meshes.pop(),e.parent||e._removeFromSceneRootNodes()),this._inputManager._invalidateMesh(e),this.onMeshRemovedObservable.notifyObservers(e),t&&e.getChildMeshes().forEach((function(e){n.removeMesh(e)})),i},t.prototype.addTransformNode=function(e){this._blockEntityCollection||e.getScene()===this&&-1!==e._indexInSceneTransformNodesArray||(e._indexInSceneTransformNodesArray=this.transformNodes.length,this.transformNodes.push(e),e.parent||e._addToSceneRootNodes(),this.onNewTransformNodeAddedObservable.notifyObservers(e))},t.prototype.removeTransformNode=function(e){var t=e._indexInSceneTransformNodesArray;if(-1!==t){if(t!==this.transformNodes.length-1){var n=this.transformNodes[this.transformNodes.length-1];this.transformNodes[t]=n,n._indexInSceneTransformNodesArray=t}e._indexInSceneTransformNodesArray=-1,this.transformNodes.pop(),e.parent||e._removeFromSceneRootNodes()}return this.onTransformNodeRemovedObservable.notifyObservers(e),t},t.prototype.removeSkeleton=function(e){var t=this.skeletons.indexOf(e);return-1!==t&&(this.skeletons.splice(t,1),this.onSkeletonRemovedObservable.notifyObservers(e),this._executeActiveContainerCleanup(this._activeSkeletons)),t},t.prototype.removeMorphTargetManager=function(e){var t=this.morphTargetManagers.indexOf(e);return-1!==t&&this.morphTargetManagers.splice(t,1),t},t.prototype.removeLight=function(e){var t=this.lights.indexOf(e);if(-1!==t){for(var n=0,i=this.meshes;n0?this.activeCamera=this.cameras[0]:this.activeCamera=null),this.onCameraRemovedObservable.notifyObservers(e),t},t.prototype.removeParticleSystem=function(e){var t=this.particleSystems.indexOf(e);return-1!==t&&(this.particleSystems.splice(t,1),this._executeActiveContainerCleanup(this._activeParticleSystems)),t},t.prototype.removeAnimation=function(e){var t=this.animations.indexOf(e);return-1!==t&&this.animations.splice(t,1),t},t.prototype.stopAnimation=function(e,t,n){},t.prototype.removeAnimationGroup=function(e){var t=this.animationGroups.indexOf(e);return-1!==t&&this.animationGroups.splice(t,1),t},t.prototype.removeMultiMaterial=function(e){var t=this.multiMaterials.indexOf(e);return-1!==t&&this.multiMaterials.splice(t,1),this.onMultiMaterialRemovedObservable.notifyObservers(e),t},t.prototype.removeMaterial=function(e){var t=e._indexInSceneMaterialArray;if(-1!==t&&t=0;n--)if(this.materials[n].id===e)return this.materials[n];if(t)for(n=this.multiMaterials.length-1;n>=0;n--)if(this.multiMaterials[n].id===e)return this.multiMaterials[n];return null},t.prototype.getTextureByUniqueId=function(e){for(var t=0;t=0;t--)if(this.meshes[t].id===e)return this.meshes[t];return null},t.prototype.getLastTransformNodeById=function(e){for(var t=this.transformNodes.length-1;t>=0;t--)if(this.transformNodes[t].id===e)return this.transformNodes[t];return null},t.prototype.getLastEntryById=function(e){var t;for(t=this.meshes.length-1;t>=0;t--)if(this.meshes[t].id===e)return this.meshes[t];for(t=this.transformNodes.length-1;t>=0;t--)if(this.transformNodes[t].id===e)return this.transformNodes[t];for(t=this.cameras.length-1;t>=0;t--)if(this.cameras[t].id===e)return this.cameras[t];for(t=this.lights.length-1;t>=0;t--)if(this.lights[t].id===e)return this.lights[t];return null},t.prototype.getNodeById=function(e){var t=this.getMeshById(e);if(t)return t;var n=this.getTransformNodeById(e);return n||(this.getLightById(e)||this.getCameraById(e)||this.getBoneById(e)||null)},t.prototype.getNodeByName=function(e){var t=this.getMeshByName(e);if(t)return t;var n=this.getTransformNodeByName(e);return n||(this.getLightByName(e)||this.getCameraByName(e)||this.getBoneByName(e)||null)},t.prototype.getMeshByName=function(e){for(var t=0;t=0;t--)if(this.skeletons[t].id===e)return this.skeletons[t];return null},t.prototype.getSkeletonByUniqueId=function(e){for(var t=0;t0&&(null===(e=this.activeCamera)||void 0===e||e._activeMeshes.reset(),this._activeMeshes.reset(),this._renderingManager.reset(),this._processedMaterials.reset(),this._activeParticleSystems.reset(),this._activeSkeletons.reset(),this._softwareSkinnedMeshes.reset());else if(this._activeMeshesFrozen&&this._activeMeshes.length){if(!this._skipEvaluateActiveMeshesCompletely)for(var t=this._activeMeshes.length,n=0;n0&&0!=(l.layerMask&this.activeCamera.layerMask)&&(this._skipFrustumClipping||l.alwaysSelectAsActiveMesh||l.isInFrustum(this._frustumPlanes)))){this._activeMeshes.push(l),this.activeCamera._activeMeshes.push(l),u!==l&&u._activate(this._renderId,!1);for(var h=0,d=this._preActiveMeshStage;h0){var i=this.getActiveSubMeshCandidates(t),r=i.length;n=n||1===r;for(var o=0;o0&&this._renderTargets.concatWithNoDuplicate(e.customRenderTargets),t&&t.customRenderTargets&&t.customRenderTargets.length>0&&this._renderTargets.concatWithNoDuplicate(t.customRenderTargets),this.environmentTexture&&this.environmentTexture.isRenderTarget&&this._renderTargets.pushNoDuplicate(this.environmentTexture);for(var h=0,d=this._gatherActiveCameraRenderTargetsStage;h0){Pn.StartPerformanceCounter("Render targets",this._renderTargets.length>0);for(var f=0;f0),this._renderId++}for(var g=0,y=this._cameraDrawRenderTargetStage;g-1&&(n.trigger===a.ACTION_OnIntersectionExitTrigger&&n._executeCurrent(z.CreateNew(t,void 0,r)),t.actionManager.hasSpecificTrigger(a.ACTION_OnIntersectionExitTrigger,(function(e){var t=e.mesh?e.mesh:e;return r===t}))&&n.trigger!==a.ACTION_OnIntersectionExitTrigger||t._intersectionsInProgress.splice(s,1))}},i=0;t.actionManager&&i0&&r0)for(var c=0;c0),this._intermediateRendering=!0;for(var p=0;p0),this._intermediateRendering=!1,this._renderId++}this._engine.currentRenderPassId=null!==(r=null==d?void 0:d.renderPassId)&&void 0!==r?r:a.RENDERPASS_MAIN,this.activeCamera=d,this._activeCamera&&this._activeCamera.cameraRigMode!==a.RIG_MODE_CUSTOM&&!this.prePass&&this._bindFrameBuffer(this._activeCamera,!1),this.onAfterRenderTargetsRenderObservable.notifyObservers(this);for(var m=0,_=this._beforeClearStage;m<_.length;m++)_[m].action();this._clearFrameBuffer(this.activeCamera);for(var g=0,y=this._gatherRenderTargetsStage;g0)for(c=0;c0);else{if(!this.activeCamera)throw new Error("No camera defined");this._processSubCameras(this.activeCamera,!!this.activeCamera.outputRenderTarget)}this._checkIntersections();for(var v=0,b=this._afterRenderStage;v-1&&this._engine.scenes.splice(r,1),A._LastCreatedScene===this&&(this._engine.scenes.length>0?A._LastCreatedScene=this._engine.scenes[this._engine.scenes.length-1]:A._LastCreatedScene=null),(r=this._engine._virtualScenes.indexOf(this))>-1&&this._engine._virtualScenes.splice(r,1),this._engine.wipeCaches(!0),this.onDisposeObservable.clear(),this.onBeforeRenderObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderTargetsRenderObservable.clear(),this.onAfterRenderTargetsRenderObservable.clear(),this.onAfterStepObservable.clear(),this.onBeforeStepObservable.clear(),this.onBeforeActiveMeshesEvaluationObservable.clear(),this.onAfterActiveMeshesEvaluationObservable.clear(),this.onBeforeParticlesRenderingObservable.clear(),this.onAfterParticlesRenderingObservable.clear(),this.onBeforeDrawPhaseObservable.clear(),this.onAfterDrawPhaseObservable.clear(),this.onBeforeAnimationsObservable.clear(),this.onAfterAnimationsObservable.clear(),this.onDataLoadedObservable.clear(),this.onBeforeRenderingGroupObservable.clear(),this.onAfterRenderingGroupObservable.clear(),this.onMeshImportedObservable.clear(),this.onBeforeCameraRenderObservable.clear(),this.onAfterCameraRenderObservable.clear(),this.onAfterRenderCameraObservable.clear(),this.onReadyObservable.clear(),this.onNewCameraAddedObservable.clear(),this.onCameraRemovedObservable.clear(),this.onNewLightAddedObservable.clear(),this.onLightRemovedObservable.clear(),this.onNewGeometryAddedObservable.clear(),this.onGeometryRemovedObservable.clear(),this.onNewTransformNodeAddedObservable.clear(),this.onTransformNodeRemovedObservable.clear(),this.onNewMeshAddedObservable.clear(),this.onMeshRemovedObservable.clear(),this.onNewSkeletonAddedObservable.clear(),this.onSkeletonRemovedObservable.clear(),this.onNewMaterialAddedObservable.clear(),this.onNewMultiMaterialAddedObservable.clear(),this.onMaterialRemovedObservable.clear(),this.onMultiMaterialRemovedObservable.clear(),this.onNewTextureAddedObservable.clear(),this.onTextureRemovedObservable.clear(),this.onPrePointerObservable.clear(),this.onPointerObservable.clear(),this.onPreKeyboardObservable.clear(),this.onKeyboardObservable.clear(),this.onActiveCameraChanged.clear(),this.onScenePerformancePriorityChangedObservable.clear(),this._isDisposed=!0}},t.prototype._disposeList=function(e,t){t=null!=t?t:function(e){return e.dispose()};for(var n=0,i=e.slice(0);n-1&&(this._scene._activeAnimatables.splice(t,1),this._scene._activeAnimatables.push(this))}return this},e.prototype.getAnimations=function(){return this._runtimeAnimations},e.prototype.appendAnimations=function(e,t){for(var n=this,i=0;i-1){for(var r=(a=this._runtimeAnimations).length-1;r>=0;r--){var o=a[r];e&&o.animation.name!=e||t&&!t(o.target)||(o.dispose(),a.splice(r,1))}0==a.length&&(n||this._scene._activeAnimatables.splice(i,1),this._raiseOnAnimationEnd())}}else if((r=this._scene._activeAnimatables.indexOf(this))>-1){n||this._scene._activeAnimatables.splice(r,1);for(var a=this._runtimeAnimations,s=0;s0)return;this._animationTimeLast=e}this.deltaTime=this.useConstantAnimationDeltaTime?16:(e-this._animationTimeLast)*this.animationTimeScale,this._animationTimeLast=e;var t=this._activeAnimatables;if(0!==t.length){this._animationTime+=this.deltaTime;for(var n=this._animationTime,i=0;in&&r>0&&(r*=-1),s&&this.stopAnimation(e,void 0,c),a||(a=new Oi(this,e,t,n,i,r,o,void 0,l,u));var h=!c||c(e);if(e.animations&&h&&a.appendAnimations(e,e.animations),e.getAnimatables)for(var d=e.getAnimatables(),p=0;pi&&o>0)o*=-1;else if(i>n&&o<0){var l=i;i=n,n=l}return new Oi(this,e,n,i,r,o,a,t,s,c)},Ci.prototype.beginDirectHierarchyAnimation=function(e,t,n,i,r,o,a,s,c,l){void 0===l&&(l=!1);var u=e.getDescendants(t),h=[];h.push(this.beginDirectAnimation(e,n,i,r,o,a,s,c,l));for(var d=0,p=u;d0?c:-c,r),h.scaleAndAddToRef(c,n)}r.normalize()}for(u=0;u0)r.copyFrom(i);else if(1===e.animations.length){if(I.SlerpToRef(i,n.currentValue,Math.min(1,e.totalWeight),r),0===e.totalAdditiveWeight)return r}else if(e.animations.length>1){var o=1,a=void 0,s=void 0;if(e.totalWeight<1){var c=1-e.totalWeight;s=[],(a=[]).push(i),s.push(c)}else{if(2===e.animations.length&&(I.SlerpToRef(e.animations[0].currentValue,e.animations[1].currentValue,e.animations[1].weight/e.totalWeight,t),0===e.totalAdditiveWeight))return t;a=[],s=[],o=e.totalWeight}for(var l=0;l=l&&a.frame<=u&&(i?(c=a.value.clone(),m?(s=c.getTranslation(),c.setTranslation(s.scaleInPlace(_))):g&&r?(s=c.getTranslation(),c.setTranslation(s.multiplyInPlace(r))):c=a.value):c=a.value,y.push({frame:a.frame+n,value:c}));return this.animations[0].createRange(t,l+n,u+n),!0};var wi,Mi=function(){this.enableBlending=!1,this.blendingSpeed=.01,this.loopMode=Je.ANIMATIONLOOPMODE_CYCLE};!function(e){e[e.CW=0]="CW",e[e.CCW=1]="CCW"}(wi||(wi={}));var Di,Ni=function(){function e(){}return e.Interpolate=function(e,t,n,i,r){for(var o=1-3*i+3*t,a=3*i-6*t,s=3*t,c=e,l=0;l<5;l++){var u=c*c;c-=1/(3*o*u+2*a*c+s)*(o*(u*c)+a*u+s*c-e),c=Math.min(1,Math.max(0,c))}return 3*Math.pow(1-c,2)*c*n+3*(1-c)*Math.pow(c,2)*r+Math.pow(c,3)},e}(),Li=function(){function e(e){this._radians=e,this._radians<0&&(this._radians+=2*Math.PI)}return e.prototype.degrees=function(){return 180*this._radians/Math.PI},e.prototype.radians=function(){return this._radians},e.BetweenTwoPoints=function(t,n){var i=n.subtract(t);return new e(Math.atan2(i.y,i.x))},e.BetweenTwoVectors=function(t,n){var i=t.lengthSquared()*n.lengthSquared();if(0===i)return new e(Math.PI/2);i=Math.sqrt(i);var r=t.dot(n)/i;return r=h.Clamp(r,-1,1),new e(Math.acos(r))},e.FromRadians=function(t){return new e(t)},e.FromDegrees=function(t){return new e(t*Math.PI/180)},e}(),Fi=function(e,t,n){this.startPoint=e,this.midPoint=t,this.endPoint=n;var i=Math.pow(t.x,2)+Math.pow(t.y,2),r=(Math.pow(e.x,2)+Math.pow(e.y,2)-i)/2,o=(i-Math.pow(n.x,2)-Math.pow(n.y,2))/2,a=(e.x-t.x)*(t.y-n.y)-(t.x-n.x)*(e.y-t.y);this.centerPoint=new S((r*(t.y-n.y)-o*(e.y-t.y))/a,((e.x-t.x)*o-(t.x-n.x)*r)/a),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=Li.BetweenTwoPoints(this.centerPoint,this.startPoint);var s=this.startAngle.degrees(),c=Li.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),l=Li.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();c-s>180&&(c-=360),c-s<-180&&(c+=360),l-c>180&&(l-=360),l-c<-180&&(l+=360),this.orientation=c-s<0?wi.CW:wi.CCW,this.angle=Li.FromDegrees(this.orientation===wi.CW?s-l:l-s)},Bi=function(){function e(e,t){this._points=new Array,this._length=0,this.closed=!1,this._points.push(new S(e,t))}return e.prototype.addLineTo=function(e,t){if(this.closed)return this;var n=new S(e,t),i=this._points[this._points.length-1];return this._points.push(n),this._length+=n.subtract(i).length(),this},e.prototype.addArcTo=function(e,t,n,i,r){if(void 0===r&&(r=36),this.closed)return this;var o=this._points[this._points.length-1],a=new S(e,t),s=new S(n,i),c=new Fi(o,a,s),l=c.angle.radians()/r;c.orientation===wi.CW&&(l*=-1);for(var u=c.startAngle.radians()+l,h=0;hNumber.EPSILON){if(c<0&&(o=this._points[r],s=-s,a=this._points[i],c=-c),e.ya.y)continue;if(e.y===o.y&&e.x===o.x)return!0;var l=c*(e.x-o.x)-s*(e.y-o.y);if(0===l)return!0;if(l<0)continue;t=!t}else{if(e.y!==o.y)continue;if(a.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=a.x)return!0}}return t},e.prototype.close=function(){return this.closed=!0,this},e.prototype.length=function(){var e=this._length;if(this.closed){var t=this._points[this._points.length-1];e+=this._points[0].subtract(t).length()}return e},e.prototype.area=function(){for(var e=this._points.length,t=0,n=e-1,i=0;i1)return S.Zero();for(var t=e*this.length(),n=0,i=0;i=n&&t<=s){var c=a.normalize(),l=t-n;return new S(o.x+c.x*l,o.y+c.y*l)}n=s}return S.Zero()},e.StartingAt=function(t,n){return new e(t,n)},e}(),Ui=function(){function e(e,t,n,i){void 0===t&&(t=null),void 0===i&&(i=!1),this.path=e,this._curve=new Array,this._distances=new Array,this._tangents=new Array,this._normals=new Array,this._binormals=new Array,this._pointAtData={id:0,point:C.Zero(),previousPointArrayIndex:0,position:0,subPosition:0,interpolateReady:!1,interpolationMatrix:R.Identity()};for(var r=0;rn){var i=t;t=n,n=i}var r=this.getCurve(),o=this.getPointAt(t),a=this.getPreviousPointIndexAt(t),s=this.getPointAt(n),c=this.getPreviousPointIndexAt(n)+1,l=[];return 0!==t&&(a++,l.push(o)),l.push.apply(l,r.slice(a,c)),1===n&&1!==t||l.push(s),new e(l,this.getNormalAt(t),this._raw,this._alignTangentsWithPath)},e.prototype.update=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);for(var i=0;it+1;)t++,n=this._curve[e].subtract(this._curve[e-t]);return n},e.prototype._normalVector=function(e,t){var n,i,r=e.length();return 0===r&&(r=1),null==t?(i=h.WithinEpsilon(Math.abs(e.y)/r,1,m)?h.WithinEpsilon(Math.abs(e.x)/r,1,m)?h.WithinEpsilon(Math.abs(e.z)/r,1,m)?C.Zero():new C(0,0,1):new C(1,0,0):new C(0,-1,0),n=C.Cross(e,i)):(n=C.Cross(e,t),C.CrossToRef(n,e,n)),n.normalize(),n},e.prototype._updatePointAtData=function(e,t){if(void 0===t&&(t=!1),this._pointAtData.id===e)return this._pointAtData.interpolateReady||this._updateInterpolationMatrix(),this._pointAtData;this._pointAtData.id=e;var n=this.getPoints();if(e<=0)return this._setPointAtData(0,0,n[0],0,t);if(e>=1)return this._setPointAtData(1,1,n[n.length-1],n.length-1,t);for(var i,r=n[0],o=0,a=e*this.length(),s=1;sa){var l=(o-a)/c,u=r.subtract(i),h=i.add(u.scaleInPlace(l));return this._setPointAtData(e,1-l,h,s-1,t)}r=i}return this._pointAtData},e.prototype._setPointAtData=function(e,t,n,i,r){return this._pointAtData.point=n,this._pointAtData.position=e,this._pointAtData.subPosition=t,this._pointAtData.previousPointArrayIndex=i,this._pointAtData.interpolateReady=r,r&&this._updateInterpolationMatrix(),this._pointAtData},e.prototype._updateInterpolationMatrix=function(){this._pointAtData.interpolationMatrix=R.Identity();var e=this._pointAtData.previousPointArrayIndex;if(e!==this._tangents.length-1){var t=e+1,n=this._tangents[e].clone(),i=this._normals[e].clone(),r=this._binormals[e].clone(),o=this._tangents[t].clone(),a=this._normals[t].clone(),s=this._binormals[t].clone(),c=I.RotationQuaternionFromAxis(i,r,n),l=I.RotationQuaternionFromAxis(a,s,o);I.Slerp(c,l,this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix)}},e}(),ki=function(){function e(e){this._length=0,this._points=e,this._length=this._computeLength(e)}return e.CreateQuadraticBezier=function(t,n,i,r){r=r>2?r:3;for(var o=[],a=function(e,t,n,i){return(1-e)*(1-e)*t+2*e*(1-e)*n+e*e*i},s=0;s<=r;s++)o.push(new C(a(s/r,t.x,n.x,i.x),a(s/r,t.y,n.y,i.y),a(s/r,t.z,n.z,i.z)));return new e(o)},e.CreateCubicBezier=function(t,n,i,r,o){o=o>3?o:4;for(var a=[],s=function(e,t,n,i,r){return(1-e)*(1-e)*(1-e)*t+3*e*(1-e)*(1-e)*n+3*e*e*(1-e)*i+e*e*e*r},c=0;c<=o;c++)a.push(new C(s(c/o,t.x,n.x,i.x,r.x),s(c/o,t.y,n.y,i.y,r.y),s(c/o,t.z,n.z,i.z,r.z)));return new e(a)},e.CreateHermiteSpline=function(t,n,i,r,o){for(var a=[],s=1/o,c=0;c<=o;c++)a.push(C.Hermite(t,n,i,r,c*s));return new e(a)},e.CreateCatmullRomSpline=function(t,n,i){var r=[],o=1/n,a=0;if(i){for(var s=t.length,c=0;c=.5?.5*(1-this.easeInCore(2*(1-t)))+.5:.5*this.easeInCore(2*t)},e.EASINGMODE_EASEIN=0,e.EASINGMODE_EASEOUT=1,e.EASINGMODE_EASEINOUT=2,e}(),zi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.easeInCore=function(e){return e=Math.max(0,Math.min(1,e)),1-Math.sqrt(1-e*e)},t}(Vi),Gi=function(e){function t(t){void 0===t&&(t=1);var n=e.call(this)||this;return n.amplitude=t,n}return H(t,e),t.prototype.easeInCore=function(e){var t=Math.max(0,this.amplitude);return Math.pow(e,3)-e*t*Math.sin(3.141592653589793*e)},t}(Vi),Hi=function(e){function t(t,n){void 0===t&&(t=3),void 0===n&&(n=2);var i=e.call(this)||this;return i.bounces=t,i.bounciness=n,i}return H(t,e),t.prototype.easeInCore=function(e){var t=Math.max(0,this.bounces),n=this.bounciness;n<=1&&(n=1.001);var i=Math.pow(n,t),r=1-n,o=(1-i)/r+.5*i,a=e*o,s=Math.log(-a*(1-n)+1)/Math.log(n),c=Math.floor(s),l=c+1,u=(1-Math.pow(n,c))/(r*o),h=.5*(u+(1-Math.pow(n,l))/(r*o)),d=e-h,p=h-u;return-Math.pow(1/n,t-c)/(p*p)*(d-p)*(d+p)},t}(Vi),ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.easeInCore=function(e){return e*e*e},t}(Vi),Wi=function(e){function t(t,n){void 0===t&&(t=3),void 0===n&&(n=3);var i=e.call(this)||this;return i.oscillations=t,i.springiness=n,i}return H(t,e),t.prototype.easeInCore=function(e){var t=Math.max(0,this.oscillations),n=Math.max(0,this.springiness);return(0==n?e:(Math.exp(n*e)-1)/(Math.exp(n)-1))*Math.sin((6.283185307179586*t+1.5707963267948966)*e)},t}(Vi),Xi=function(e){function t(t){void 0===t&&(t=2);var n=e.call(this)||this;return n.exponent=t,n}return H(t,e),t.prototype.easeInCore=function(e){return this.exponent<=0?e:(Math.exp(this.exponent*e)-1)/(Math.exp(this.exponent)-1)},t}(Vi),Yi=function(e){function t(t){void 0===t&&(t=2);var n=e.call(this)||this;return n.power=t,n}return H(t,e),t.prototype.easeInCore=function(e){var t=Math.max(0,this.power);return Math.pow(e,t)},t}(Vi),qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.easeInCore=function(e){return e*e},t}(Vi),Ki=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.easeInCore=function(e){return e*e*e*e},t}(Vi),Qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.easeInCore=function(e){return e*e*e*e*e},t}(Vi),Zi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.easeInCore=function(e){return 1-Math.sin(1.5707963267948966*(1-e))},t}(Vi),$i=function(e){function t(t,n,i,r){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=1),void 0===r&&(r=1);var o=e.call(this)||this;return o.x1=t,o.y1=n,o.x2=i,o.y2=r,o}return H(t,e),t.prototype.easeInCore=function(e){return Ni.Interpolate(e,this.x1,this.y1,this.x2,this.y2)},t}(Vi),Ji=function(){function e(e,t,n){this.frame=e,this.action=t,this.onlyOnce=n,this.isDone=!1}return e.prototype._clone=function(){return new e(this.frame,this.action,this.onlyOnce)},e}(),er=function(){function e(){}return e.prototype.getClassName=function(){return"TargetedAnimation"},e.prototype.serialize=function(){var e={};return e.animation=this.animation.serialize(),e.targetId=this.target.id,e},e}(),tr=function(){function e(e,t,n,i){void 0===t&&(t=null),void 0===n&&(n=-1),void 0===i&&(i=0),this.name=e,this._targetedAnimations=new Array,this._animatables=new Array,this._from=Number.MAX_VALUE,this._to=-Number.MAX_VALUE,this._speedRatio=1,this._loopAnimation=!1,this._isAdditive=!1,this._weight=-1,this._playOrder=0,this._enableBlending=null,this._blendingSpeed=null,this._numActiveAnimatables=0,this._parentContainer=null,this.onAnimationEndObservable=new u,this.onAnimationLoopObservable=new u,this.onAnimationGroupLoopObservable=new u,this.onAnimationGroupEndObservable=new u,this.onAnimationGroupPauseObservable=new u,this.onAnimationGroupPlayObservable=new u,this.metadata=null,this._animationLoopFlags=[],this._scene=t||A.LastCreatedScene,this._weight=n,this._playOrder=i,this.uniqueId=this._scene.getUniqueId(),this._scene.addAnimationGroup(this)}return e.prototype.syncWithMask=function(){if(this.mask){this._numActiveAnimatables=0;for(var e=0;e0)){for(var t=0;ta&&(a=d.to);for(var l=new e(t[0].name+"_merged",t[0]._scene,r),u=0,h=t;ui[0].frame&&(this._from=i[0].frame),this._to-1;t--)this._targetedAnimations[t].animation===e&&this._targetedAnimations.splice(t,1)},e.prototype.normalize=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),null==e&&(e=this._from),null==t&&(t=this._to);for(var n=0;ne){var a={frame:e,value:r.value,inTangent:r.inTangent,outTangent:r.outTangent,interpolation:r.interpolation};i.splice(0,0,a)}o.frame0&&(this._scene._activeAnimatables[n++]=i)}return this._scene._activeAnimatables.length=n,this._isStarted=!1,this},e.prototype.setWeightForAllAnimatables=function(e){for(var t=0;t-1&&this._scene.animationGroups.splice(e,1),this._parentContainer){var t=this._parentContainer.animationGroups.indexOf(this);t>-1&&this._parentContainer.animationGroups.splice(t,1),this._parentContainer=null}this.onAnimationEndObservable.clear(),this.onAnimationGroupEndObservable.clear(),this.onAnimationGroupPauseObservable.clear(),this.onAnimationGroupPlayObservable.clear(),this.onAnimationLoopObservable.clear(),this.onAnimationGroupLoopObservable.clear()},e.prototype._checkAnimationGroupEnded=function(e){var t=this._animatables.indexOf(e);t>-1&&this._animatables.splice(t,1),0===this._animatables.length&&(this._isStarted=!1,this.onAnimationGroupEndObservable.notifyObservers(this))},e.prototype.clone=function(t,n,i){void 0===i&&(i=!1);var r=new e(t||this.name,this._scene,this._weight,this._playOrder);r._from=this.from,r._to=this.to,r._speedRatio=this.speedRatio,r._loopAnimation=this.loopAnimation,r._isAdditive=this.isAdditive,r._enableBlending=this.enableBlending,r._blendingSpeed=this.blendingSpeed,r.metadata=this.metadata,r.mask=this.mask;for(var o=0,a=this._targetedAnimations;op[0].frame&&(l=p[0].frame),u=t&&f<=n||r&&m.frame>=t&&m.frame<=n){var _={frame:m.frame,value:m.value.clone?m.value.clone():m.value,inTangent:m.inTangent,outTangent:m.outTangent,interpolation:m.interpolation,lockedTangent:m.lockedTangent};p===Number.MAX_VALUE&&(p=_.frame),_.frame-=p,d.push(_)}}0!==d.length?(o>d[0].frame&&(o=d[0].frame),a1)throw"step size should be less than 1.";return this.value+=e,this._ensureLimits(),this._raiseOnChange(),this},e.prototype._ensureLimits=function(){for(;this.value>1;)this.value-=1;for(;this.value<0;)this.value+=1;return this},e.prototype._raiseOnChange=function(){var e=this;return this._onchange.forEach((function(t){return t(e)})),this},e.prototype.onchange=function(e){return this._onchange.push(e),this},e}();!function(e){e[e.Include=0]="Include",e[e.Exclude=1]="Exclude"}(Di||(Di={}));var ir=function(){function e(e,t){void 0===t&&(t=Di.Include),this.mode=t,this.disabled=!1,this._targetNames=new Set,e&&this.addTargetName(e)}return e.prototype.addTargetName=function(e){if(Array.isArray(e))for(var t=0,n=e;te?(t=o,setTimeout((function(){rr(n,i,r)}),0)):rr(n,i,r)}}function ar(e,t,n,i,r){var o=function(){var a,s=function(e){e.done?n(e.value):void 0===a?a=!0:o()};do{a=void 0,r&&r.aborted?i(new Error("Aborted")):t(e,s,i),void 0===a&&(a=!1)}while(a)};o()}function sr(e,t){var n;return ar(e,rr,(function(e){return n=e}),(function(e){throw e}),t),n}function cr(e,t,n){return new Promise((function(i,r){ar(e,t,i,r,n)}))}function lr(e,t){return function(){for(var n=[],i=0;i-1?(J.Error("You're trying to reuse a post process not defined as reusable."),0):(null==t||t<0?this._postProcesses.push(e):null===this._postProcesses[t]?this._postProcesses[t]=e:this._postProcesses.splice(t,0,e),this._cascadePostProcessesToRigCams(),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._postProcesses.indexOf(e))},t.prototype.detachPostProcess=function(e){var t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses[t]=null),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._cascadePostProcessesToRigCams()},t.prototype.getWorldMatrix=function(){return this._isSynchronizedViewMatrix()||this.getViewMatrix(),this._worldMatrix},t.prototype._getViewMatrix=function(){return R.Identity()},t.prototype.getViewMatrix=function(e){return!e&&this._isSynchronizedViewMatrix()||(this.updateCache(),this._computedViewMatrix=this._getViewMatrix(),this._currentRenderId=this.getScene().getRenderId(),this._childUpdateId++,this._refreshFrustumPlanes=!0,this._cameraRigParams&&this._cameraRigParams.vrPreViewMatrix&&this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix,this._computedViewMatrix),this.parent&&this.parent.onViewMatrixChangedObservable&&this.parent.onViewMatrixChangedObservable.notifyObservers(this.parent),this.onViewMatrixChangedObservable.notifyObservers(this),this._computedViewMatrix.invertToRef(this._worldMatrix)),this._computedViewMatrix},t.prototype.freezeProjectionMatrix=function(e){this._doNotComputeProjectionMatrix=!0,void 0!==e&&(this._projectionMatrix=e)},t.prototype.unfreezeProjectionMatrix=function(){this._doNotComputeProjectionMatrix=!1},t.prototype.getProjectionMatrix=function(e){var n,i,r,o,a,s,c,l,u,h,d,p,f,m,_,g,y,v,b;if(this._doNotComputeProjectionMatrix||!e&&this._isSynchronizedProjectionMatrix())return this._projectionMatrix;this._cache.mode=this.mode,this._cache.minZ=this.minZ,this._cache.maxZ=this.maxZ,this._refreshFrustumPlanes=!0;var T=this.getEngine(),E=this.getScene(),A=T.useReverseDepthBuffer;if(this.mode===t.PERSPECTIVE_CAMERA)this._cache.fov=this.fov,this._cache.fovMode=this.fovMode,this._cache.aspectRatio=T.getAspectRatio(this),this._cache.projectionPlaneTilt=this.projectionPlaneTilt,this.minZ<=0&&(this.minZ=.1),(E.useRightHandedSystem?R.PerspectiveFovRHToRef:R.PerspectiveFovLHToRef)(this.fov,T.getAspectRatio(this),A?this.maxZ:this.minZ,A?this.minZ:this.maxZ,this._projectionMatrix,this.fovMode===t.FOVMODE_VERTICAL_FIXED,T.isNDCHalfZRange,this.projectionPlaneTilt,A);else{var x=T.getRenderWidth()/2,S=T.getRenderHeight()/2;E.useRightHandedSystem?this.oblique?R.ObliqueOffCenterRHToRef(null!==(n=this.orthoLeft)&&void 0!==n?n:-x,null!==(i=this.orthoRight)&&void 0!==i?i:x,null!==(r=this.orthoBottom)&&void 0!==r?r:-S,null!==(o=this.orthoTop)&&void 0!==o?o:S,A?this.maxZ:this.minZ,A?this.minZ:this.maxZ,this.oblique.length,this.oblique.angle,this._computeObliqueDistance(this.oblique.offset),this._projectionMatrix,T.isNDCHalfZRange):R.OrthoOffCenterRHToRef(null!==(a=this.orthoLeft)&&void 0!==a?a:-x,null!==(s=this.orthoRight)&&void 0!==s?s:x,null!==(c=this.orthoBottom)&&void 0!==c?c:-S,null!==(l=this.orthoTop)&&void 0!==l?l:S,A?this.maxZ:this.minZ,A?this.minZ:this.maxZ,this._projectionMatrix,T.isNDCHalfZRange):this.oblique?R.ObliqueOffCenterLHToRef(null!==(u=this.orthoLeft)&&void 0!==u?u:-x,null!==(h=this.orthoRight)&&void 0!==h?h:x,null!==(d=this.orthoBottom)&&void 0!==d?d:-S,null!==(p=this.orthoTop)&&void 0!==p?p:S,A?this.maxZ:this.minZ,A?this.minZ:this.maxZ,this.oblique.length,this.oblique.angle,this._computeObliqueDistance(this.oblique.offset),this._projectionMatrix,T.isNDCHalfZRange):R.OrthoOffCenterLHToRef(null!==(f=this.orthoLeft)&&void 0!==f?f:-x,null!==(m=this.orthoRight)&&void 0!==m?m:x,null!==(_=this.orthoBottom)&&void 0!==_?_:-S,null!==(g=this.orthoTop)&&void 0!==g?g:S,A?this.maxZ:this.minZ,A?this.minZ:this.maxZ,this._projectionMatrix,T.isNDCHalfZRange),this._cache.orthoLeft=this.orthoLeft,this._cache.orthoRight=this.orthoRight,this._cache.orthoBottom=this.orthoBottom,this._cache.orthoTop=this.orthoTop,this._cache.obliqueAngle=null===(y=this.oblique)||void 0===y?void 0:y.angle,this._cache.obliqueLength=null===(v=this.oblique)||void 0===v?void 0:v.length,this._cache.obliqueOffset=null===(b=this.oblique)||void 0===b?void 0:b.offset,this._cache.renderWidth=T.getRenderWidth(),this._cache.renderHeight=T.getRenderHeight()}return this.onProjectionMatrixChangedObservable.notifyObservers(this),this._projectionMatrix},t.prototype.getTransformationMatrix=function(){return this._computedViewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._transformMatrix},t.prototype._computeObliqueDistance=function(e){return(this.radius||(this.target?C.Distance(this.position,this.target):this.position.length()))+e},t.prototype._updateFrustumPlanes=function(){this._refreshFrustumPlanes&&(this.getTransformationMatrix(),this._frustumPlanes?Ti.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=Ti.GetPlanes(this._transformMatrix),this._refreshFrustumPlanes=!1)},t.prototype.isInFrustum=function(e,t){if(void 0===t&&(t=!1),this._updateFrustumPlanes(),t&&this.rigCameras.length>0){var n=!1;return this.rigCameras.forEach((function(t){t._updateFrustumPlanes(),n=n||e.isInFrustum(t._frustumPlanes)})),n}return e.isInFrustum(this._frustumPlanes)},t.prototype.isCompletelyInFrustum=function(e){return this._updateFrustumPlanes(),e.isCompletelyInFrustum(this._frustumPlanes)},t.prototype.getForwardRay=function(e,t,n){throw void 0===e&&(e=100),ye("Ray")},t.prototype.getForwardRayToRef=function(e,t,n,i){throw void 0===t&&(t=100),ye("Ray")},t.prototype.dispose=function(n,i){for(void 0===i&&(i=!1),this.onViewMatrixChangedObservable.clear(),this.onProjectionMatrixChangedObservable.clear(),this.onAfterCheckInputsObservable.clear(),this.onRestoreStateObservable.clear(),this.inputs&&this.inputs.clear(),this.getScene().stopAnimation(this),this.getScene().removeCamera(this);this._rigCameras.length>0;){var r=this._rigCameras.pop();r&&r.dispose()}if(this._parentContainer){var o=this._parentContainer.cameras.indexOf(this);o>-1&&this._parentContainer.cameras.splice(o,1),this._parentContainer=null}if(this._rigPostProcess)this._rigPostProcess.dispose(this),this._rigPostProcess=null,this._postProcesses.length=0;else if(this.cameraRigMode!==t.RIG_MODE_NONE)this._rigPostProcess=null,this._postProcesses.length=0;else for(var a=this._postProcesses.length;--a>=0;){var s=this._postProcesses[a];s&&s.dispose(this)}for(var c=this.customRenderTargets.length;--c>=0;)this.customRenderTargets[c].dispose();this.customRenderTargets.length=0,this._activeMeshes.dispose(),this.getScene().getEngine().releaseRenderPassId(this.renderPassId),e.prototype.dispose.call(this,n,i)},Object.defineProperty(t.prototype,"isLeftCamera",{get:function(){return this._isLeftCamera},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRightCamera",{get:function(){return this._isRightCamera},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftCamera",{get:function(){return this._rigCameras.length<1?null:this._rigCameras[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightCamera",{get:function(){return this._rigCameras.length<2?null:this._rigCameras[1]},enumerable:!1,configurable:!0}),t.prototype.getLeftTarget=function(){return this._rigCameras.length<1?null:this._rigCameras[0].getTarget()},t.prototype.getRightTarget=function(){return this._rigCameras.length<2?null:this._rigCameras[1].getTarget()},t.prototype.setCameraRigMode=function(e,n){if(this.cameraRigMode!==e){for(;this._rigCameras.length>0;){var i=this._rigCameras.pop();i&&i.dispose()}if(this.cameraRigMode=e,this._cameraRigParams={},this._cameraRigParams.interaxialDistance=n.interaxialDistance||.0637,this._cameraRigParams.stereoHalfAngle=Pn.ToRadians(this._cameraRigParams.interaxialDistance/.0637),this.cameraRigMode!==t.RIG_MODE_NONE){var r=this.createRigCamera(this.name+"_L",0);r&&(r._isLeftCamera=!0);var o=this.createRigCamera(this.name+"_R",1);o&&(o._isRightCamera=!0),r&&o&&(this._rigCameras.push(r),this._rigCameras.push(o))}this._setRigMode(n),this._cascadePostProcessesToRigCams(),this.update()}},t.prototype._setRigMode=function(e){},t.prototype._getVRProjectionMatrix=function(){return R.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov,this._cameraRigParams.vrMetrics.aspectRatio,this.minZ,this.maxZ,this._cameraRigParams.vrWorkMatrix,!0,this.getEngine().isNDCHalfZRange),this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix,this._projectionMatrix),this._projectionMatrix},t.prototype.setCameraRigParameter=function(e,t){this._cameraRigParams||(this._cameraRigParams={}),this._cameraRigParams[e]=t,"interaxialDistance"===e&&(this._cameraRigParams.stereoHalfAngle=Pn.ToRadians(t/.0637))},t.prototype.createRigCamera=function(e,t){return null},t.prototype._updateRigCameras=function(){for(var e=0;el-i||s-uu-r||c-hh-o)},e.prototype.intersectsSphere=function(t){return e.IntersectsSphere(this.minimumWorld,this.maximumWorld,t.centerWorld,t.radiusWorld)},e.prototype.intersectsMinMax=function(e,t){var n=this.minimumWorld,i=this.maximumWorld,r=n.x,o=n.y,a=n.z,s=i.x,c=i.y,l=i.z,u=e.x,h=e.y,d=e.z,p=t.x,f=t.y,m=t.z;return!(sp||cf||lm)},e.prototype.dispose=function(){var e,t;null===(e=this._drawWrapperFront)||void 0===e||e.dispose(),null===(t=this._drawWrapperBack)||void 0===t||t.dispose()},e.Intersects=function(e,t){return e.intersectsMinMax(t.minimumWorld,t.maximumWorld)},e.IntersectsSphere=function(t,n,i,r){var o=e._TmpVector3[0];return C.ClampToRef(i,t,n,o),C.DistanceSquared(i,o)<=r*r},e.IsCompletelyInFrustum=function(e,t){for(var n=0;n<6;++n)for(var i=t[n],r=0;r<8;++r)if(i.dotCoordinate(e[r])<0)return!1;return!0},e.IsInFrustum=function(e,t){for(var n=0;n<6;++n){for(var i=!0,r=t[n],o=0;o<8;++o)if(r.dotCoordinate(e[o])>=0){i=!1;break}if(i)return!1}return!0},e._TmpVector3=_.BuildArray(3,C.Zero),e}(),mr=function(){function e(e,t,n){this.center=C.Zero(),this.centerWorld=C.Zero(),this.minimum=C.Zero(),this.maximum=C.Zero(),this.reConstruct(e,t,n)}return e.prototype.reConstruct=function(e,t,n){this.minimum.copyFrom(e),this.maximum.copyFrom(t);var i=C.Distance(e,t);t.addToRef(e,this.center).scaleInPlace(.5),this.radius=.5*i,this._update(n||R.IdentityReadOnly)},e.prototype.scale=function(t){var n=this.radius*t,i=e._TmpVector3,r=i[0].setAll(n),o=this.center.subtractToRef(r,i[1]),a=this.center.addToRef(r,i[2]);return this.reConstruct(o,a,this._worldMatrix),this},e.prototype.getWorldMatrix=function(){return this._worldMatrix},e.prototype._update=function(t){if(t.isIdentity())this.centerWorld.copyFrom(this.center),this.radiusWorld=this.radius;else{C.TransformCoordinatesToRef(this.center,t,this.centerWorld);var n=e._TmpVector3[0];C.TransformNormalFromFloatsToRef(1,1,1,t,n),this.radiusWorld=Math.max(Math.abs(n.x),Math.abs(n.y),Math.abs(n.z))*this.radius}},e.prototype.isInFrustum=function(e){for(var t=this.centerWorld,n=this.radiusWorld,i=0;i<6;i++)if(e[i].dotCoordinate(t)<=-n)return!1;return!0},e.prototype.isCenterInFrustum=function(e){for(var t=this.centerWorld,n=0;n<6;n++)if(e[n].dotCoordinate(t)<0)return!1;return!0},e.prototype.intersectsPoint=function(e){var t=C.DistanceSquared(this.centerWorld,e);return!(this.radiusWorld*this.radiusWorldgr.max||gr.min>_r.max)},br=function(){function e(e,t,n){this._isLocked=!1,this.boundingBox=new fr(e,t,n),this.boundingSphere=new mr(e,t,n)}return e.prototype.reConstruct=function(e,t,n){this.boundingBox.reConstruct(e,t,n),this.boundingSphere.reConstruct(e,t,n)},Object.defineProperty(e.prototype,"minimum",{get:function(){return this.boundingBox.minimum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this.boundingBox.maximum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLocked",{get:function(){return this._isLocked},set:function(e){this._isLocked=e},enumerable:!1,configurable:!0}),e.prototype.update=function(e){this._isLocked||(this.boundingBox._update(e),this.boundingSphere._update(e))},e.prototype.centerOn=function(t,n){var i=e._TmpVector3[0].copyFrom(t).subtractInPlace(n),r=e._TmpVector3[1].copyFrom(t).addInPlace(n);return this.boundingBox.reConstruct(i,r,this.boundingBox.getWorldMatrix()),this.boundingSphere.reConstruct(i,r,this.boundingBox.getWorldMatrix()),this},e.prototype.encapsulate=function(e){var t=C.Minimize(this.minimum,e),n=C.Maximize(this.maximum,e);return this.reConstruct(t,n,this.boundingBox.getWorldMatrix()),this},e.prototype.encapsulateBoundingInfo=function(e){var t=w.Matrix[0];this.boundingBox.getWorldMatrix().invertToRef(t);var n=w.Vector3[0];return C.TransformCoordinatesToRef(e.boundingBox.minimumWorld,t,n),this.encapsulate(n),C.TransformCoordinatesToRef(e.boundingBox.maximumWorld,t,n),this.encapsulate(n),this},e.prototype.scale=function(e){return this.boundingBox.scale(e),this.boundingSphere.scale(e),this},e.prototype.isInFrustum=function(e,t){return void 0===t&&(t=a.MESHES_CULLINGSTRATEGY_STANDARD),!(t!==a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION&&t!==a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY||!this.boundingSphere.isCenterInFrustum(e))||!!this.boundingSphere.isInFrustum(e)&&(!(t!==a.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY&&t!==a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY)||this.boundingBox.isInFrustum(e))},Object.defineProperty(e.prototype,"diagonalLength",{get:function(){var t=this.boundingBox;return t.maximumWorld.subtractToRef(t.minimumWorld,e._TmpVector3[0]).length()},enumerable:!1,configurable:!0}),e.prototype.isCompletelyInFrustum=function(e){return this.boundingBox.isCompletelyInFrustum(e)},e.prototype._checkCollision=function(e){return e._canDoCollision(this.boundingSphere.centerWorld,this.boundingSphere.radiusWorld,this.boundingBox.minimumWorld,this.boundingBox.maximumWorld)},e.prototype.intersectsPoint=function(e){return!!this.boundingSphere.centerWorld&&!!this.boundingSphere.intersectsPoint(e)&&!!this.boundingBox.intersectsPoint(e)},e.prototype.intersects=function(e,t){if(!mr.Intersects(this.boundingSphere,e.boundingSphere))return!1;if(!fr.Intersects(this.boundingBox,e.boundingBox))return!1;if(!t)return!0;var n=this.boundingBox,i=e.boundingBox;return!!(vr(n.directions[0],n,i)&&vr(n.directions[1],n,i)&&vr(n.directions[2],n,i)&&vr(i.directions[0],n,i)&&vr(i.directions[1],n,i)&&vr(i.directions[2],n,i)&&vr(C.Cross(n.directions[0],i.directions[0]),n,i)&&vr(C.Cross(n.directions[0],i.directions[1]),n,i)&&vr(C.Cross(n.directions[0],i.directions[2]),n,i)&&vr(C.Cross(n.directions[1],i.directions[0]),n,i)&&vr(C.Cross(n.directions[1],i.directions[1]),n,i)&&vr(C.Cross(n.directions[1],i.directions[2]),n,i)&&vr(C.Cross(n.directions[2],i.directions[0]),n,i)&&vr(C.Cross(n.directions[2],i.directions[1]),n,i)&&vr(C.Cross(n.directions[2],i.directions[2]),n,i))},e._TmpVector3=_.BuildArray(2,C.Zero),e}(),Tr=function(){function e(){}return e.extractMinAndMaxIndexed=function(e,t,n,i,r,o){for(var a=n;ac&&(c=h)}return new e(t,s,c-s+1,n,i,r,o,a)},e}(),Sr=function(){},Cr=function(){function e(){this.uniqueId=0,this.metadata={},this._applyTo=lr(this._applyToCoroutine.bind(this)),this.uniqueId=e._UniqueIDGenerator,e._UniqueIDGenerator++}return e.prototype.set=function(e,t){switch(e.length||J.Warn("Setting vertex data kind '".concat(t,"' with an empty array")),t){case Yn.PositionKind:this.positions=e;break;case Yn.NormalKind:this.normals=e;break;case Yn.TangentKind:this.tangents=e;break;case Yn.UVKind:this.uvs=e;break;case Yn.UV2Kind:this.uvs2=e;break;case Yn.UV3Kind:this.uvs3=e;break;case Yn.UV4Kind:this.uvs4=e;break;case Yn.UV5Kind:this.uvs5=e;break;case Yn.UV6Kind:this.uvs6=e;break;case Yn.ColorKind:this.colors=e;break;case Yn.MatricesIndicesKind:this.matricesIndices=e;break;case Yn.MatricesWeightsKind:this.matricesWeights=e;break;case Yn.MatricesIndicesExtraKind:this.matricesIndicesExtra=e;break;case Yn.MatricesWeightsExtraKind:this.matricesWeightsExtra=e}},e.prototype.applyToMesh=function(e,t){return this._applyTo(e,t,!1),this},e.prototype.applyToGeometry=function(e,t){return this._applyTo(e,t,!1),this},e.prototype.updateMesh=function(e){return this._update(e),this},e.prototype.updateGeometry=function(e){return this._update(e),this},e.prototype._applyToCoroutine=function(e,t,n){var i,r,o,a;return void 0===t&&(t=!1),Y(this,(function(s){switch(s.label){case 0:return this.positions?(e.setVerticesData(Yn.PositionKind,this.positions,t),n?[4]:[3,2]):[3,2];case 1:s.sent(),s.label=2;case 2:return this.normals?(e.setVerticesData(Yn.NormalKind,this.normals,t),n?[4]:[3,4]):[3,4];case 3:s.sent(),s.label=4;case 4:return this.tangents?(e.setVerticesData(Yn.TangentKind,this.tangents,t),n?[4]:[3,6]):[3,6];case 5:s.sent(),s.label=6;case 6:return this.uvs?(e.setVerticesData(Yn.UVKind,this.uvs,t),n?[4]:[3,8]):[3,8];case 7:s.sent(),s.label=8;case 8:return this.uvs2?(e.setVerticesData(Yn.UV2Kind,this.uvs2,t),n?[4]:[3,10]):[3,10];case 9:s.sent(),s.label=10;case 10:return this.uvs3?(e.setVerticesData(Yn.UV3Kind,this.uvs3,t),n?[4]:[3,12]):[3,12];case 11:s.sent(),s.label=12;case 12:return this.uvs4?(e.setVerticesData(Yn.UV4Kind,this.uvs4,t),n?[4]:[3,14]):[3,14];case 13:s.sent(),s.label=14;case 14:return this.uvs5?(e.setVerticesData(Yn.UV5Kind,this.uvs5,t),n?[4]:[3,16]):[3,16];case 15:s.sent(),s.label=16;case 16:return this.uvs6?(e.setVerticesData(Yn.UV6Kind,this.uvs6,t),n?[4]:[3,18]):[3,18];case 17:s.sent(),s.label=18;case 18:return this.colors?(e.setVerticesData(Yn.ColorKind,this.colors,t),n?[4]:[3,20]):[3,20];case 19:s.sent(),s.label=20;case 20:return this.matricesIndices?(e.setVerticesData(Yn.MatricesIndicesKind,this.matricesIndices,t),n?[4]:[3,22]):[3,22];case 21:s.sent(),s.label=22;case 22:return this.matricesWeights?(e.setVerticesData(Yn.MatricesWeightsKind,this.matricesWeights,t),n?[4]:[3,24]):[3,24];case 23:s.sent(),s.label=24;case 24:return this.matricesIndicesExtra?(e.setVerticesData(Yn.MatricesIndicesExtraKind,this.matricesIndicesExtra,t),n?[4]:[3,26]):[3,26];case 25:s.sent(),s.label=26;case 26:return this.matricesWeightsExtra?(e.setVerticesData(Yn.MatricesWeightsExtraKind,this.matricesWeightsExtra,t),n?[4]:[3,28]):[3,28];case 27:s.sent(),s.label=28;case 28:return this.indices?(e.setIndices(this.indices,null,t),n?[4]:[3,30]):[3,31];case 29:s.sent(),s.label=30;case 30:return[3,32];case 31:e.setIndices([],null),s.label=32;case 32:if(e.subMeshes&&this.materialInfos&&this.materialInfos.length>1)for((i=e).subMeshes=[],r=0,o=this.materialInfos;ri?1:n===i?0:-1})),I=0,R=v;I0))return[3,4];B=null!==(Q=null==F?void 0:F.length)&&void 0!==Q?Q:0,F||(F=new Array(N)),F.length!==N&&(Array.isArray(F)?F.length=N:((U=i||F instanceof Uint32Array?new Uint32Array(N):new Uint16Array(N)).set(F),F=U),t&&t.determinant()<0&&e._FlipFaces(F,0,B)),k=l.positions?l.positions.length/3:0,V=0,z=n,Y.label=1;case 1:if(!(V65535);for(var i=0,r=this._meshes;i0&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices,this._updatable)),e._syncGeometryWithMorphTargetManager(),e.synchronizeInstances()},e.prototype._notifyUpdate=function(e){this.onGeometryUpdated&&this.onGeometryUpdated(this,e),this._vertexArrayObjects&&this._disposeVertexArrayObjects();for(var t=0,n=this._meshes;t0){for(var t=0;t0){for(t=0;t0){for(t=0;t-1&&this._parentContainer.geometries.splice(r,1),this._parentContainer=null}this._isDisposed=!0},e.prototype.copy=function(t){var n=new Cr;n.indices=[];var i=this.getIndices();if(i)for(var r=0;r0){var c=new Float32Array(t,s.positionsAttrDesc.offset,s.positionsAttrDesc.count);n.setVerticesData(Yn.PositionKind,c,!1)}if(s.normalsAttrDesc&&s.normalsAttrDesc.count>0){var l=new Float32Array(t,s.normalsAttrDesc.offset,s.normalsAttrDesc.count);n.setVerticesData(Yn.NormalKind,l,!1)}if(s.tangetsAttrDesc&&s.tangetsAttrDesc.count>0){var u=new Float32Array(t,s.tangetsAttrDesc.offset,s.tangetsAttrDesc.count);n.setVerticesData(Yn.TangentKind,u,!1)}if(s.uvsAttrDesc&&s.uvsAttrDesc.count>0){var h=new Float32Array(t,s.uvsAttrDesc.offset,s.uvsAttrDesc.count);if(Ir.UseOpenGLOrientationForUV)for(var d=1;d0){var p=new Float32Array(t,s.uvs2AttrDesc.offset,s.uvs2AttrDesc.count);if(Ir.UseOpenGLOrientationForUV)for(d=1;d0){var f=new Float32Array(t,s.uvs3AttrDesc.offset,s.uvs3AttrDesc.count);if(Ir.UseOpenGLOrientationForUV)for(d=1;d0){var m=new Float32Array(t,s.uvs4AttrDesc.offset,s.uvs4AttrDesc.count);if(Ir.UseOpenGLOrientationForUV)for(d=1;d0){var _=new Float32Array(t,s.uvs5AttrDesc.offset,s.uvs5AttrDesc.count);if(Ir.UseOpenGLOrientationForUV)for(d=1;d<_.length;d+=2)_[d]=1-_[d];n.setVerticesData(Yn.UV5Kind,_,!1)}if(s.uvs6AttrDesc&&s.uvs6AttrDesc.count>0){var g=new Float32Array(t,s.uvs6AttrDesc.offset,s.uvs6AttrDesc.count);if(Ir.UseOpenGLOrientationForUV)for(d=1;d0){var y=new Float32Array(t,s.colorsAttrDesc.offset,s.colorsAttrDesc.count);n.setVerticesData(Yn.ColorKind,y,!1,s.colorsAttrDesc.stride)}if(s.matricesIndicesAttrDesc&&s.matricesIndicesAttrDesc.count>0){for(var v=new Int32Array(t,s.matricesIndicesAttrDesc.offset,s.matricesIndicesAttrDesc.count),b=[],T=0;T>8),b.push((16711680&d)>>16),b.push(d>>24&255);n.setVerticesData(Yn.MatricesIndicesKind,b,!1)}if(s.matricesIndicesExtraAttrDesc&&s.matricesIndicesExtraAttrDesc.count>0){for(v=new Int32Array(t,s.matricesIndicesExtraAttrDesc.offset,s.matricesIndicesExtraAttrDesc.count),b=[],T=0;T>8),b.push((16711680&d)>>16),b.push(d>>24&255);n.setVerticesData(Yn.MatricesIndicesExtraKind,b,!1)}if(s.matricesWeightsAttrDesc&&s.matricesWeightsAttrDesc.count>0){var E=new Float32Array(t,s.matricesWeightsAttrDesc.offset,s.matricesWeightsAttrDesc.count);n.setVerticesData(Yn.MatricesWeightsKind,E,!1)}if(s.indicesAttrDesc&&s.indicesAttrDesc.count>0){var A=new Int32Array(t,s.indicesAttrDesc.offset,s.indicesAttrDesc.count);n.setIndices(A,null)}if(s.subMeshesAttrDesc&&s.subMeshesAttrDesc.count>0){var x=new Int32Array(t,s.subMeshesAttrDesc.offset,5*s.subMeshesAttrDesc.count);for(n.subMeshes=[],T=0;T>8),b.push((16711680&O)>>16),b.push(O>>24&255)}n.setVerticesData(Yn.MatricesIndicesKind,b,t.matricesIndices._updatable)}if(t.matricesIndicesExtra)if(t.matricesIndicesExtra._isExpanded)delete t.matricesIndices._isExpanded,n.setVerticesData(Yn.MatricesIndicesExtraKind,t.matricesIndicesExtra,t.matricesIndicesExtra._updatable);else{for(b=[],T=0;T>8),b.push((16711680&O)>>16),b.push(O>>24&255);n.setVerticesData(Yn.MatricesIndicesExtraKind,b,t.matricesIndicesExtra._updatable)}t.matricesWeights&&(e._CleanMatricesWeights(t,n),n.setVerticesData(Yn.MatricesWeightsKind,t.matricesWeights,t.matricesWeights._updatable)),t.matricesWeightsExtra&&n.setVerticesData(Yn.MatricesWeightsExtraKind,t.matricesWeightsExtra,t.matricesWeights._updatable),n.setIndices(t.indices,null)}if(t.subMeshes){n.subMeshes=[];for(var w=0;w-1){var r=t.getScene().getLastSkeletonById(e.skeletonId);if(r){i=r.bones.length;for(var o=t.getVerticesData(Yn.MatricesIndicesKind),a=t.getVerticesData(Yn.MatricesIndicesExtraKind),s=e.matricesWeights,c=e.matricesWeightsExtra,l=e.numBoneInfluencer,u=s.length,h=0;hl-1)&&(p=l-1),d>n){var _=1/d;for(f=0;f<4;f++)s[h+f]*=_;if(c)for(f=0;f<4;f++)c[h+f]*=_}else p>=4?(c[h+p-4]=1-d,a[h+p-4]=i):(s[h+p]=1-d,o[h+p]=i)}t.setVerticesData(Yn.MatricesIndicesKind,o),e.matricesWeightsExtra&&t.setVerticesData(Yn.MatricesIndicesExtraKind,a)}}}},e.Parse=function(t,n,i){var r=new e(t.id,n,void 0,t.updatable);return r._loadedUniqueId=t.uniqueId,_e&&_e.AddTagsTo(r,t.tags),t.delayLoadingFile?(r.delayLoadState=a.DELAYLOADSTATE_NOTLOADED,r.delayLoadingFile=i+t.delayLoadingFile,r._boundingInfo=new br(C.FromArray(t.boundingBoxMinimum),C.FromArray(t.boundingBoxMaximum)),r._delayInfo=[],t.hasUVs&&r._delayInfo.push(Yn.UVKind),t.hasUVs2&&r._delayInfo.push(Yn.UV2Kind),t.hasUVs3&&r._delayInfo.push(Yn.UV3Kind),t.hasUVs4&&r._delayInfo.push(Yn.UV4Kind),t.hasUVs5&&r._delayInfo.push(Yn.UV5Kind),t.hasUVs6&&r._delayInfo.push(Yn.UV6Kind),t.hasColors&&r._delayInfo.push(Yn.ColorKind),t.hasMatricesIndices&&r._delayInfo.push(Yn.MatricesIndicesKind),t.hasMatricesWeights&&r._delayInfo.push(Yn.MatricesWeightsKind),r._delayLoadingFunction=Cr.ImportVertexData):Cr.ImportVertexData(t,r),n.pushGeometry(r,!0),r},e}(),Or=function(){function e(e){void 0===e&&(e=30),this._enabled=!0,this._rollingFrameTime=new wr(e)}return e.prototype.sampleFrame=function(e){if(void 0===e&&(e=ct.Now),this._enabled){if(null!=this._lastFrameTimeMs){var t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}},Object.defineProperty(e.prototype,"averageFrameTime",{get:function(){return this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"averageFrameTimeVariance",{get:function(){return this._rollingFrameTime.variance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instantaneousFrameTime",{get:function(){return this._rollingFrameTime.history(0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"averageFPS",{get:function(){return 1e3/this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instantaneousFPS",{get:function(){var e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSaturated",{get:function(){return this._rollingFrameTime.isSaturated()},enumerable:!1,configurable:!0}),e.prototype.enable=function(){this._enabled=!0},e.prototype.disable=function(){this._enabled=!1,this._lastFrameTimeMs=null},Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()},e}(),wr=function(){function e(e){this._samples=new Array(e),this.reset()}return e.prototype.add=function(e){var t;if(this.isSaturated()){var n=this._samples[this._pos];t=n-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(n-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length},e.prototype.history=function(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;var t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]},e.prototype.isSaturated=function(){return this._sampleCount>=this._samples.length},e.prototype.reset=function(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0},e.prototype._wrapPosition=function(e){var t=this._samples.length;return(e%t+t)%t},e}();function Mr(e,t,n,i){switch(void 0===n&&(n=!1),e){case a.TEXTURETYPE_BYTE:var r=(ArrayBuffer,new Int8Array(t));return i&&r.set(new Int8Array(i)),r;case a.TEXTURETYPE_UNSIGNED_BYTE:var o=(ArrayBuffer,new Uint8Array(t));return i&&o.set(new Uint8Array(i)),o;case a.TEXTURETYPE_SHORT:var s=t instanceof ArrayBuffer?new Int16Array(t):new Int16Array(n?t/2:t);return i&&s.set(new Int16Array(i)),s;case a.TEXTURETYPE_UNSIGNED_SHORT:case a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:case a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:case a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:case a.TEXTURETYPE_HALF_FLOAT:var c=t instanceof ArrayBuffer?new Uint16Array(t):new Uint16Array(n?t/2:t);return i&&c.set(new Uint16Array(i)),c;case a.TEXTURETYPE_INT:var l=t instanceof ArrayBuffer?new Int32Array(t):new Int32Array(n?t/4:t);return i&&l.set(new Int32Array(i)),l;case a.TEXTURETYPE_UNSIGNED_INTEGER:case a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:case a.TEXTURETYPE_UNSIGNED_INT_24_8:case a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:case a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:case a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:var u=t instanceof ArrayBuffer?new Uint32Array(t):new Uint32Array(n?t/4:t);return i&&u.set(new Uint32Array(i)),u;case a.TEXTURETYPE_FLOAT:var h=t instanceof ArrayBuffer?new Float32Array(t):new Float32Array(n?t/4:t);return i&&h.set(new Float32Array(i)),h}var d=(ArrayBuffer,new Uint8Array(t));return i&&d.set(new Uint8Array(i)),d}rn.prototype.setAlphaConstants=function(e,t,n,i){this._alphaState.setAlphaBlendConstants(e,t,n,i)},rn.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e){switch(e){case a.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case a.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case a.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case a.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case a.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case a.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case a.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case a.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR,this._gl.ZERO,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case a.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case a.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR,this._gl.ONE_MINUS_CONSTANT_COLOR,this._gl.CONSTANT_ALPHA,this._gl.ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case a.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case a.ALPHA_ONEONE_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case a.ALPHA_ALPHATOCOLOR:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case a.ALPHA_REVERSEONEMINUS:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE_MINUS_DST_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case a.ALPHA_SRC_DSTONEMINUSSRCALPHA:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case a.ALPHA_ONEONE_ONEZERO:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case a.ALPHA_EXCLUSION:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case a.ALPHA_LAYER_ACCUMULATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}t||(this.depthCullingState.depthMask=e===a.ALPHA_DISABLE),this._alphaMode=e}else if(!t){var n=e===a.ALPHA_DISABLE;this.depthCullingState.depthMask!==n&&(this.depthCullingState.depthMask=n)}},rn.prototype.getAlphaMode=function(){return this._alphaMode},rn.prototype.setAlphaEquation=function(e){if(this._alphaEquation!==e){switch(e){case a.ALPHA_EQUATION_ADD:this._alphaState.setAlphaEquationParameters(a.GL_ALPHA_EQUATION_ADD,a.GL_ALPHA_EQUATION_ADD);break;case a.ALPHA_EQUATION_SUBSTRACT:this._alphaState.setAlphaEquationParameters(a.GL_ALPHA_EQUATION_SUBTRACT,a.GL_ALPHA_EQUATION_SUBTRACT);break;case a.ALPHA_EQUATION_REVERSE_SUBTRACT:this._alphaState.setAlphaEquationParameters(a.GL_ALPHA_EQUATION_REVERSE_SUBTRACT,a.GL_ALPHA_EQUATION_REVERSE_SUBTRACT);break;case a.ALPHA_EQUATION_MAX:this._alphaState.setAlphaEquationParameters(a.GL_ALPHA_EQUATION_MAX,a.GL_ALPHA_EQUATION_MAX);break;case a.ALPHA_EQUATION_MIN:this._alphaState.setAlphaEquationParameters(a.GL_ALPHA_EQUATION_MIN,a.GL_ALPHA_EQUATION_MIN);break;case a.ALPHA_EQUATION_DARKEN:this._alphaState.setAlphaEquationParameters(a.GL_ALPHA_EQUATION_MIN,a.GL_ALPHA_EQUATION_ADD)}this._alphaEquation=e}},rn.prototype.getAlphaEquation=function(){return this._alphaEquation},rn.prototype._readTexturePixelsSync=function(e,t,n,i,r,o,a,s,c,l){var u,h;void 0===i&&(i=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===c&&(c=0),void 0===l&&(l=0);var d=this._gl;if(!d)throw new Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){var p=d.createFramebuffer();if(!p)throw new Error("Unable to create dummy framebuffer");this._dummyFramebuffer=p}d.bindFramebuffer(d.FRAMEBUFFER,this._dummyFramebuffer),i>-1?d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+i,null===(u=e._hardwareTexture)||void 0===u?void 0:u.underlyingResource,r):d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,null===(h=e._hardwareTexture)||void 0===h?void 0:h.underlyingResource,r);var f=void 0!==e.type?this._getWebGLTextureType(e.type):d.UNSIGNED_BYTE;return s?o||(o=Mr(e.type,4*t*n)):f===d.UNSIGNED_BYTE?(o||(o=new Uint8Array(4*t*n)),f=d.UNSIGNED_BYTE):(o||(o=new Float32Array(4*t*n)),f=d.FLOAT),a&&this.flushFramebuffer(),d.readPixels(c,l,t,n,d.RGBA,f,o),d.bindFramebuffer(d.FRAMEBUFFER,this._currentFramebuffer),o},rn.prototype._readTexturePixels=function(e,t,n,i,r,o,a,s,c,l){return void 0===i&&(i=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===c&&(c=0),void 0===l&&(l=0),Promise.resolve(this._readTexturePixelsSync(e,t,n,i,r,o,a,s,c,l))},rn.prototype.updateDynamicIndexBuffer=function(e,t,n){var i;void 0===n&&(n=0),this._currentBoundBuffer[this._gl.ELEMENT_ARRAY_BUFFER]=null,this.bindIndexBuffer(e),i=e.is32Bits?t instanceof Uint32Array?t:new Uint32Array(t):t instanceof Uint16Array?t:new Uint16Array(t),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,i,this._gl.DYNAMIC_DRAW),this._resetIndexBufferBinding()},rn.prototype.updateDynamicVertexBuffer=function(e,t,n,i){this.bindArrayBuffer(e),void 0===n&&(n=0);var r=t.byteLength||t.length;void 0===i||i>=r&&0===n?t instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,n,new Float32Array(t)):this._gl.bufferSubData(this._gl.ARRAY_BUFFER,n,t):t instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,new Float32Array(t).subarray(n,n+i)):(t=t instanceof ArrayBuffer?new Uint8Array(t,n,i):new Uint8Array(t.buffer,t.byteOffset+n,i),this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t)),this._resetVertexBufferBinding()};var Dr=function(e){function t(n,i,r,o){void 0===o&&(o=!1);var s=e.call(this,n,i,r,o)||this;if(s.enableOfflineSupport=!1,s.disableManifestCheck=!1,s.disableContextMenu=!0,s.scenes=[],s._virtualScenes=new Array,s.onNewSceneAddedObservable=new u,s.postProcesses=[],s.isPointerLock=!1,s.onResizeObservable=new u,s.onCanvasBlurObservable=new u,s.onCanvasFocusObservable=new u,s.onCanvasPointerOutObservable=new u,s.onBeginFrameObservable=new u,s.customAnimationFrameRequester=null,s.onEndFrameObservable=new u,s.onBeforeShaderCompilationObservable=new u,s.onAfterShaderCompilationObservable=new u,s._deterministicLockstep=!1,s._lockstepMaxSteps=4,s._timeStep=1/60,s._fps=60,s._deltaTime=0,s._drawCalls=new vi,s.canvasTabIndex=1,s.disablePerformanceMonitorInBackground=!1,s._performanceMonitor=new Or,s._compatibilityMode=!0,s.currentRenderPassId=a.RENDERPASS_MAIN,s._renderPassNames=["main"],t.Instances.push(s),!n)return s;if(s._features.supportRenderPasses=!0,r=s._creationOptions,n.getContext){var c=n;s._sharedInit(c)}return s}return H(t,e),Object.defineProperty(t,"NpmPackage",{get:function(){return rn.NpmPackage},enumerable:!1,configurable:!0}),Object.defineProperty(t,"Version",{get:function(){return rn.Version},enumerable:!1,configurable:!0}),Object.defineProperty(t,"Instances",{get:function(){return A.Instances},enumerable:!1,configurable:!0}),Object.defineProperty(t,"LastCreatedEngine",{get:function(){return A.LastCreatedEngine},enumerable:!1,configurable:!0}),Object.defineProperty(t,"LastCreatedScene",{get:function(){return A.LastCreatedScene},enumerable:!1,configurable:!0}),t.prototype._createImageBitmapFromSource=function(e,t){var n=this;return new Promise((function(i,r){var o=new Image;o.onload=function(){o.decode().then((function(){n.createImageBitmap(o,t).then((function(e){i(e)}))}))},o.onerror=function(){r("Error loading image ".concat(o.src))},o.src=e}))},t.prototype.createImageBitmap=function(e,t){return createImageBitmap(e,t)},t.prototype.resizeImageBitmap=function(e,t,n){var i=this.createCanvas(t,n).getContext("2d");if(!i)throw new Error("Unable to get 2d context for resizeImageBitmap");return i.drawImage(e,0,0),i.getImageData(0,0,t,n).data},t.MarkAllMaterialsAsDirty=function(e,n){for(var i=0;i0?this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},t.prototype._renderViews=function(){return!1},t.prototype.switchFullscreen=function(e){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(e)},t.prototype.enterFullscreen=function(e){this.isFullscreen||(this._pointerLockRequested=e,this._renderingCanvas&&t._RequestFullscreen(this._renderingCanvas))},t.prototype.exitFullscreen=function(){this.isFullscreen&&t._ExitFullscreen()},t.prototype.enterPointerlock=function(){this._renderingCanvas&&t._RequestPointerlock(this._renderingCanvas)},t.prototype.exitPointerlock=function(){t._ExitPointerlock()},t.prototype.beginFrame=function(){this._measureFps(),this.onBeginFrameObservable.notifyObservers(this),e.prototype.beginFrame.call(this)},t.prototype.endFrame=function(){e.prototype.endFrame.call(this),this.onEndFrameObservable.notifyObservers(this)},t.prototype.setSize=function(t,n,i){if(void 0===i&&(i=!1),!this._renderingCanvas)return!1;if(!e.prototype.setSize.call(this,t,n,i))return!1;if(this.scenes){for(var r=0;r1&&r){var a=this.createTransformFeedback();this.bindTransformFeedback(a),this.setTranformFeedbackVaryings(o,r),e.transformFeedback=a}return i.linkProgram(o),this.webGLVersion>1&&r&&this.bindTransformFeedback(null),e.context=i,e.vertexShader=t,e.fragmentShader=n,e.isParallelCompiled||this._finalizePipelineContext(e),o},t.prototype._releaseTexture=function(t){e.prototype._releaseTexture.call(this,t)},t.prototype._releaseRenderTargetWrapper=function(t){e.prototype._releaseRenderTargetWrapper.call(this,t),this.scenes.forEach((function(e){e.postProcesses.forEach((function(e){e._outputTexture===t&&(e._outputTexture=null)})),e.cameras.forEach((function(e){e._postProcesses.forEach((function(e){e&&e._outputTexture===t&&(e._outputTexture=null)}))}))}))},t.prototype.getRenderPassNames=function(){return this._renderPassNames},t.prototype.getCurrentRenderPassName=function(){return this._renderPassNames[this.currentRenderPassId]},t.prototype.createRenderPassId=function(e){var n=++t._RenderPassIdCounter;return this._renderPassNames[n]=null!=e?e:"NONAME",n},t.prototype.releaseRenderPassId=function(e){this._renderPassNames[e]=void 0;for(var t=0;t=0&&A.Instances.splice(i,1),t.Instances.length||A.OnEnginesDisposedObservable.notifyObservers(this),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()},t.prototype._disableTouchAction=function(){this._renderingCanvas&&this._renderingCanvas.setAttribute&&(this._renderingCanvas.setAttribute("touch-action","none"),this._renderingCanvas.style.touchAction="none",this._renderingCanvas.style.webkitTapHighlightColor="transparent")},t.prototype.displayLoadingUI=function(){if(nt()){var e=this.loadingScreen;e&&e.displayLoadingUI()}},t.prototype.hideLoadingUI=function(){if(nt()){var e=this._loadingScreen;e&&e.hideLoadingUI()}},Object.defineProperty(t.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=t.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!1,configurable:!0}),t.prototype.createVideoElement=function(e){return document.createElement("video")},t._RequestPointerlock=function(e){if(e.requestPointerLock){var t=e.requestPointerLock();t instanceof Promise?t.then((function(){e.focus()})).catch((function(){})):e.focus()}},t._ExitPointerlock=function(){document.exitPointerLock&&document.exitPointerLock()},t._RequestFullscreen=function(e){var t=e.requestFullscreen||e.webkitRequestFullscreen;t&&t.call(e)},t._ExitFullscreen=function(){var e=document;document.exitFullscreen?document.exitFullscreen():e.webkitCancelFullScreen&&e.webkitCancelFullScreen()},t.prototype.getFontOffset=function(e){var t=document.createElement("span");t.innerHTML="Hg",t.setAttribute("style","font: ".concat(e," !important"));var n=document.createElement("div");n.style.display="inline-block",n.style.width="1px",n.style.height="0px",n.style.verticalAlign="bottom";var i=document.createElement("div");i.style.whiteSpace="nowrap",i.appendChild(t),i.appendChild(n),document.body.appendChild(i);var r=0,o=0;try{o=n.getBoundingClientRect().top-t.getBoundingClientRect().top,n.style.verticalAlign="baseline",r=n.getBoundingClientRect().top-t.getBoundingClientRect().top}finally{document.body.removeChild(i)}return{ascent:r,height:o,descent:o-r}},t.ALPHA_DISABLE=a.ALPHA_DISABLE,t.ALPHA_ADD=a.ALPHA_ADD,t.ALPHA_COMBINE=a.ALPHA_COMBINE,t.ALPHA_SUBTRACT=a.ALPHA_SUBTRACT,t.ALPHA_MULTIPLY=a.ALPHA_MULTIPLY,t.ALPHA_MAXIMIZED=a.ALPHA_MAXIMIZED,t.ALPHA_ONEONE=a.ALPHA_ONEONE,t.ALPHA_PREMULTIPLIED=a.ALPHA_PREMULTIPLIED,t.ALPHA_PREMULTIPLIED_PORTERDUFF=a.ALPHA_PREMULTIPLIED_PORTERDUFF,t.ALPHA_INTERPOLATE=a.ALPHA_INTERPOLATE,t.ALPHA_SCREENMODE=a.ALPHA_SCREENMODE,t.DELAYLOADSTATE_NONE=a.DELAYLOADSTATE_NONE,t.DELAYLOADSTATE_LOADED=a.DELAYLOADSTATE_LOADED,t.DELAYLOADSTATE_LOADING=a.DELAYLOADSTATE_LOADING,t.DELAYLOADSTATE_NOTLOADED=a.DELAYLOADSTATE_NOTLOADED,t.NEVER=a.NEVER,t.ALWAYS=a.ALWAYS,t.LESS=a.LESS,t.EQUAL=a.EQUAL,t.LEQUAL=a.LEQUAL,t.GREATER=a.GREATER,t.GEQUAL=a.GEQUAL,t.NOTEQUAL=a.NOTEQUAL,t.KEEP=a.KEEP,t.REPLACE=a.REPLACE,t.INCR=a.INCR,t.DECR=a.DECR,t.INVERT=a.INVERT,t.INCR_WRAP=a.INCR_WRAP,t.DECR_WRAP=a.DECR_WRAP,t.TEXTURE_CLAMP_ADDRESSMODE=a.TEXTURE_CLAMP_ADDRESSMODE,t.TEXTURE_WRAP_ADDRESSMODE=a.TEXTURE_WRAP_ADDRESSMODE,t.TEXTURE_MIRROR_ADDRESSMODE=a.TEXTURE_MIRROR_ADDRESSMODE,t.TEXTUREFORMAT_ALPHA=a.TEXTUREFORMAT_ALPHA,t.TEXTUREFORMAT_LUMINANCE=a.TEXTUREFORMAT_LUMINANCE,t.TEXTUREFORMAT_LUMINANCE_ALPHA=a.TEXTUREFORMAT_LUMINANCE_ALPHA,t.TEXTUREFORMAT_RGB=a.TEXTUREFORMAT_RGB,t.TEXTUREFORMAT_RGBA=a.TEXTUREFORMAT_RGBA,t.TEXTUREFORMAT_RED=a.TEXTUREFORMAT_RED,t.TEXTUREFORMAT_R=a.TEXTUREFORMAT_R,t.TEXTUREFORMAT_RG=a.TEXTUREFORMAT_RG,t.TEXTUREFORMAT_RED_INTEGER=a.TEXTUREFORMAT_RED_INTEGER,t.TEXTUREFORMAT_R_INTEGER=a.TEXTUREFORMAT_R_INTEGER,t.TEXTUREFORMAT_RG_INTEGER=a.TEXTUREFORMAT_RG_INTEGER,t.TEXTUREFORMAT_RGB_INTEGER=a.TEXTUREFORMAT_RGB_INTEGER,t.TEXTUREFORMAT_RGBA_INTEGER=a.TEXTUREFORMAT_RGBA_INTEGER,t.TEXTURETYPE_UNSIGNED_BYTE=a.TEXTURETYPE_UNSIGNED_BYTE,t.TEXTURETYPE_UNSIGNED_INT=a.TEXTURETYPE_UNSIGNED_INT,t.TEXTURETYPE_FLOAT=a.TEXTURETYPE_FLOAT,t.TEXTURETYPE_HALF_FLOAT=a.TEXTURETYPE_HALF_FLOAT,t.TEXTURETYPE_BYTE=a.TEXTURETYPE_BYTE,t.TEXTURETYPE_SHORT=a.TEXTURETYPE_SHORT,t.TEXTURETYPE_UNSIGNED_SHORT=a.TEXTURETYPE_UNSIGNED_SHORT,t.TEXTURETYPE_INT=a.TEXTURETYPE_INT,t.TEXTURETYPE_UNSIGNED_INTEGER=a.TEXTURETYPE_UNSIGNED_INTEGER,t.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4,t.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1,t.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,t.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV,t.TEXTURETYPE_UNSIGNED_INT_24_8=a.TEXTURETYPE_UNSIGNED_INT_24_8,t.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV,t.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV,t.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV,t.TEXTURE_NEAREST_SAMPLINGMODE=a.TEXTURE_NEAREST_SAMPLINGMODE,t.TEXTURE_BILINEAR_SAMPLINGMODE=a.TEXTURE_BILINEAR_SAMPLINGMODE,t.TEXTURE_TRILINEAR_SAMPLINGMODE=a.TEXTURE_TRILINEAR_SAMPLINGMODE,t.TEXTURE_NEAREST_NEAREST_MIPLINEAR=a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,t.TEXTURE_LINEAR_LINEAR_MIPNEAREST=a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,t.TEXTURE_LINEAR_LINEAR_MIPLINEAR=a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,t.TEXTURE_NEAREST_NEAREST_MIPNEAREST=a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,t.TEXTURE_NEAREST_LINEAR_MIPNEAREST=a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,t.TEXTURE_NEAREST_LINEAR_MIPLINEAR=a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,t.TEXTURE_NEAREST_LINEAR=a.TEXTURE_NEAREST_LINEAR,t.TEXTURE_NEAREST_NEAREST=a.TEXTURE_NEAREST_NEAREST,t.TEXTURE_LINEAR_NEAREST_MIPNEAREST=a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,t.TEXTURE_LINEAR_NEAREST_MIPLINEAR=a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,t.TEXTURE_LINEAR_LINEAR=a.TEXTURE_LINEAR_LINEAR,t.TEXTURE_LINEAR_NEAREST=a.TEXTURE_LINEAR_NEAREST,t.TEXTURE_EXPLICIT_MODE=a.TEXTURE_EXPLICIT_MODE,t.TEXTURE_SPHERICAL_MODE=a.TEXTURE_SPHERICAL_MODE,t.TEXTURE_PLANAR_MODE=a.TEXTURE_PLANAR_MODE,t.TEXTURE_CUBIC_MODE=a.TEXTURE_CUBIC_MODE,t.TEXTURE_PROJECTION_MODE=a.TEXTURE_PROJECTION_MODE,t.TEXTURE_SKYBOX_MODE=a.TEXTURE_SKYBOX_MODE,t.TEXTURE_INVCUBIC_MODE=a.TEXTURE_INVCUBIC_MODE,t.TEXTURE_EQUIRECTANGULAR_MODE=a.TEXTURE_EQUIRECTANGULAR_MODE,t.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,t.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,t.SCALEMODE_FLOOR=a.SCALEMODE_FLOOR,t.SCALEMODE_NEAREST=a.SCALEMODE_NEAREST,t.SCALEMODE_CEILING=a.SCALEMODE_CEILING,t._RescalePostProcessFactory=null,t._RenderPassIdCounter=0,t}(rn),Nr=R.Compose(C.One(),I.FromEulerAngles(0,Math.PI,0),C.Zero()),Lr=function(e){function t(n,i,r){void 0===i&&(i=null),void 0===r&&(r=!0);var o=e.call(this,n,i)||this;return o._forward=new C(0,0,1),o._up=new C(0,1,0),o._right=new C(1,0,0),o._position=C.Zero(),o._rotation=C.Zero(),o._rotationQuaternion=null,o._scaling=C.One(),o._transformToBoneReferal=null,o._isAbsoluteSynced=!1,o._billboardMode=t.BILLBOARDMODE_NONE,o._preserveParentRotationForBillboard=!1,o.scalingDeterminant=1,o._infiniteDistance=!1,o.ignoreNonUniformScaling=!1,o.reIntegrateRotationIntoRotationQuaternion=!1,o._poseMatrix=null,o._localMatrix=R.Zero(),o._usePivotMatrix=!1,o._absolutePosition=C.Zero(),o._absoluteScaling=C.Zero(),o._absoluteRotationQuaternion=I.Identity(),o._pivotMatrix=R.Identity(),o._postMultiplyPivotMatrix=!1,o._isWorldMatrixFrozen=!1,o._indexInSceneTransformNodesArray=-1,o.onAfterWorldMatrixUpdateObservable=new u,o._nonUniformScaling=!1,r&&o.getScene().addTransformNode(o),o}return H(t,e),Object.defineProperty(t.prototype,"billboardMode",{get:function(){return this._billboardMode},set:function(e){this._billboardMode!==e&&(this._billboardMode=e,this._cache.useBillboardPosition=0!=(this._billboardMode&t.BILLBOARDMODE_USE_POSITION),this._computeUseBillboardPath())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"preserveParentRotationForBillboard",{get:function(){return this._preserveParentRotationForBillboard},set:function(e){e!==this._preserveParentRotationForBillboard&&(this._preserveParentRotationForBillboard=e,this._computeUseBillboardPath())},enumerable:!1,configurable:!0}),t.prototype._computeUseBillboardPath=function(){this._cache.useBillboardPath=this._billboardMode!==t.BILLBOARDMODE_NONE&&!this.preserveParentRotationForBillboard},Object.defineProperty(t.prototype,"infiniteDistance",{get:function(){return this._infiniteDistance},set:function(e){this._infiniteDistance!==e&&(this._infiniteDistance=e)},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"TransformNode"},Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this._position=e,this._isDirty=!0},enumerable:!1,configurable:!0}),t.prototype.isUsingPivotMatrix=function(){return this._usePivotMatrix},t.prototype.isUsingPostMultiplyPivotMatrix=function(){return this._postMultiplyPivotMatrix},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._rotation=e,this._rotationQuaternion=null,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this._scaling},set:function(e){this._scaling=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationQuaternion",{get:function(){return this._rotationQuaternion},set:function(e){this._rotationQuaternion=e,e&&this._rotation.setAll(0),this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"forward",{get:function(){return C.TransformNormalFromFloatsToRef(0,0,this.getScene().useRightHandedSystem?-1:1,this.getWorldMatrix(),this._forward),this._forward.normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"up",{get:function(){return C.TransformNormalFromFloatsToRef(0,1,0,this.getWorldMatrix(),this._up),this._up.normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return C.TransformNormalFromFloatsToRef(this.getScene().useRightHandedSystem?-1:1,0,0,this.getWorldMatrix(),this._right),this._right.normalize()},enumerable:!1,configurable:!0}),t.prototype.updatePoseMatrix=function(e){return this._poseMatrix?(this._poseMatrix.copyFrom(e),this):(this._poseMatrix=e.clone(),this)},t.prototype.getPoseMatrix=function(){return this._poseMatrix||(this._poseMatrix=R.Identity()),this._poseMatrix},t.prototype._isSynchronized=function(){var e=this._cache;return!(this._billboardMode!==e.billboardMode||this._billboardMode!==t.BILLBOARDMODE_NONE||e.pivotMatrixUpdated||this._infiniteDistance||this._position._isDirty||this._scaling._isDirty||this._rotationQuaternion&&this._rotationQuaternion._isDirty||this._rotation._isDirty)},t.prototype._initCache=function(){e.prototype._initCache.call(this);var t=this._cache;t.localMatrixUpdated=!1,t.billboardMode=-1,t.infiniteDistance=!1,t.useBillboardPosition=!1,t.useBillboardPath=!1},Object.defineProperty(t.prototype,"absolutePosition",{get:function(){return this.getAbsolutePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"absoluteScaling",{get:function(){return this._syncAbsoluteScalingAndRotation(),this._absoluteScaling},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"absoluteRotationQuaternion",{get:function(){return this._syncAbsoluteScalingAndRotation(),this._absoluteRotationQuaternion},enumerable:!1,configurable:!0}),t.prototype.setPreTransformMatrix=function(e){return this.setPivotMatrix(e,!1)},t.prototype.setPivotMatrix=function(e,t){return void 0===t&&(t=!0),this._pivotMatrix.copyFrom(e),this._usePivotMatrix=!this._pivotMatrix.isIdentity(),this._cache.pivotMatrixUpdated=!0,this._postMultiplyPivotMatrix=t,this._postMultiplyPivotMatrix&&(this._pivotMatrixInverse?this._pivotMatrix.invertToRef(this._pivotMatrixInverse):this._pivotMatrixInverse=R.Invert(this._pivotMatrix)),this},t.prototype.getPivotMatrix=function(){return this._pivotMatrix},t.prototype.instantiateHierarchy=function(e,t,n){void 0===e&&(e=null);var i=this.clone("Clone of "+(this.name||this.id),e||this.parent,!0);i&&n&&n(this,i);for(var r=0,o=this.getChildTransformNodes(!0);r-1&&this._parentContainer.transformNodes.splice(i,1),this._parentContainer=null}if(this.onAfterWorldMatrixUpdateObservable.clear(),t)for(var r=0,o=this.getChildTransformNodes(!0);rDr.CollisionsEpsilon&&r.position.addInPlace(r._internalAbstractMeshDataInfo._meshCollisionData._diffPositionForCollisions),n&&r.onCollideObservable.notifyObservers(n),r.onCollisionPositionChangeObservable.notifyObservers(r.position)},(i=r.getScene()).addMesh(r),r._resyncLightSources(),r._uniformBuffer=new Wn(r.getScene().getEngine(),void 0,void 0,n,!r.getScene().getEngine().isWebGPU),r._buildUniformLayout(),i.performancePriority){case ci.Aggressive:r.doNotSyncBoundingInfo=!0;case ci.Intermediate:r.alwaysSelectAsActiveMesh=!0,r.isPickable=!1}return r}return H(t,e),Object.defineProperty(t,"BILLBOARDMODE_NONE",{get:function(){return Lr.BILLBOARDMODE_NONE},enumerable:!1,configurable:!0}),Object.defineProperty(t,"BILLBOARDMODE_X",{get:function(){return Lr.BILLBOARDMODE_X},enumerable:!1,configurable:!0}),Object.defineProperty(t,"BILLBOARDMODE_Y",{get:function(){return Lr.BILLBOARDMODE_Y},enumerable:!1,configurable:!0}),Object.defineProperty(t,"BILLBOARDMODE_Z",{get:function(){return Lr.BILLBOARDMODE_Z},enumerable:!1,configurable:!0}),Object.defineProperty(t,"BILLBOARDMODE_ALL",{get:function(){return Lr.BILLBOARDMODE_ALL},enumerable:!1,configurable:!0}),Object.defineProperty(t,"BILLBOARDMODE_USE_POSITION",{get:function(){return Lr.BILLBOARDMODE_USE_POSITION},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"facetNb",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetNb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"partitioningSubdivisions",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions},set:function(e){this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"partitioningBBoxRatio",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio},set:function(e){this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mustDepthSortFacets",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSort},set:function(e){this._internalAbstractMeshDataInfo._facetData.facetDepthSort=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"facetDepthSortFrom",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom},set:function(e){this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"collisionRetryCount",{get:function(){return this._internalAbstractMeshDataInfo._collisionRetryCount},set:function(e){this._internalAbstractMeshDataInfo._collisionRetryCount=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFacetDataEnabled",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDataEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"morphTargetManager",{get:function(){return this._internalAbstractMeshDataInfo._morphTargetManager},set:function(e){this._internalAbstractMeshDataInfo._morphTargetManager!==e&&(this._internalAbstractMeshDataInfo._morphTargetManager=e,this._syncGeometryWithMorphTargetManager())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bakedVertexAnimationManager",{get:function(){return this._internalAbstractMeshDataInfo._bakedVertexAnimationManager},set:function(e){this._internalAbstractMeshDataInfo._bakedVertexAnimationManager!==e&&(this._internalAbstractMeshDataInfo._bakedVertexAnimationManager=e,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),t.prototype._syncGeometryWithMorphTargetManager=function(){},t.prototype._updateNonUniformScalingState=function(t){return!!e.prototype._updateNonUniformScalingState.call(this,t)&&(this._markSubMeshesAsMiscDirty(),!0)},Object.defineProperty(t.prototype,"rawBoundingInfo",{get:function(){return this._internalAbstractMeshDataInfo._rawBoundingInfo},set:function(e){this._internalAbstractMeshDataInfo._rawBoundingInfo=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCollide",{set:function(e){this._internalAbstractMeshDataInfo._meshCollisionData._onCollideObserver&&this.onCollideObservable.remove(this._internalAbstractMeshDataInfo._meshCollisionData._onCollideObserver),this._internalAbstractMeshDataInfo._meshCollisionData._onCollideObserver=this.onCollideObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCollisionPositionChange",{set:function(e){this._internalAbstractMeshDataInfo._meshCollisionData._onCollisionPositionChangeObserver&&this.onCollisionPositionChangeObservable.remove(this._internalAbstractMeshDataInfo._meshCollisionData._onCollisionPositionChangeObserver),this._internalAbstractMeshDataInfo._meshCollisionData._onCollisionPositionChangeObserver=this.onCollisionPositionChangeObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibility",{get:function(){return this._internalAbstractMeshDataInfo._visibility},set:function(e){if(this._internalAbstractMeshDataInfo._visibility!==e){var t=this._internalAbstractMeshDataInfo._visibility;this._internalAbstractMeshDataInfo._visibility=e,(1===t&&1!==e||1!==t&&1===e)&&this._markSubMeshesAsDirty((function(e){e.markAsMiscDirty(),e.markAsPrePassDirty()}))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pointerOverDisableMeshTesting",{get:function(){return this._internalAbstractMeshDataInfo._pointerOverDisableMeshTesting},set:function(e){this._internalAbstractMeshDataInfo._pointerOverDisableMeshTesting=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderingGroupId",{get:function(){return this._internalAbstractMeshDataInfo._renderingGroupId},set:function(e){this._internalAbstractMeshDataInfo._renderingGroupId=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._internalAbstractMeshDataInfo._material},set:function(e){this._internalAbstractMeshDataInfo._material!==e&&(this._internalAbstractMeshDataInfo._material&&this._internalAbstractMeshDataInfo._material.meshMap&&(this._internalAbstractMeshDataInfo._material.meshMap[this.uniqueId]=void 0),this._internalAbstractMeshDataInfo._material=e,e&&e.meshMap&&(e.meshMap[this.uniqueId]=this),this.onMaterialChangedObservable.hasObservers()&&this.onMaterialChangedObservable.notifyObservers(this),this.subMeshes&&(this.resetDrawCache(),this._unBindEffect()))},enumerable:!1,configurable:!0}),t.prototype.getMaterialForRenderPass=function(e){var t;return null===(t=this._internalAbstractMeshDataInfo._materialForRenderPass)||void 0===t?void 0:t[e]},t.prototype.setMaterialForRenderPass=function(e,t){this.resetDrawCache(e),this._internalAbstractMeshDataInfo._materialForRenderPass||(this._internalAbstractMeshDataInfo._materialForRenderPass=[]),this._internalAbstractMeshDataInfo._materialForRenderPass[e]=t},Object.defineProperty(t.prototype,"receiveShadows",{get:function(){return this._internalAbstractMeshDataInfo._receiveShadows},set:function(e){this._internalAbstractMeshDataInfo._receiveShadows!==e&&(this._internalAbstractMeshDataInfo._receiveShadows=e,this._markSubMeshesAsLightDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasVertexAlpha",{get:function(){return this._internalAbstractMeshDataInfo._hasVertexAlpha},set:function(e){this._internalAbstractMeshDataInfo._hasVertexAlpha!==e&&(this._internalAbstractMeshDataInfo._hasVertexAlpha=e,this._markSubMeshesAsAttributesDirty(),this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useVertexColors",{get:function(){return this._internalAbstractMeshDataInfo._useVertexColors},set:function(e){this._internalAbstractMeshDataInfo._useVertexColors!==e&&(this._internalAbstractMeshDataInfo._useVertexColors=e,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"computeBonesUsingShaders",{get:function(){return this._internalAbstractMeshDataInfo._computeBonesUsingShaders},set:function(e){this._internalAbstractMeshDataInfo._computeBonesUsingShaders!==e&&(this._internalAbstractMeshDataInfo._computeBonesUsingShaders=e,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"numBoneInfluencers",{get:function(){return this._internalAbstractMeshDataInfo._numBoneInfluencers},set:function(e){this._internalAbstractMeshDataInfo._numBoneInfluencers!==e&&(this._internalAbstractMeshDataInfo._numBoneInfluencers=e,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"applyFog",{get:function(){return this._internalAbstractMeshDataInfo._applyFog},set:function(e){this._internalAbstractMeshDataInfo._applyFog!==e&&(this._internalAbstractMeshDataInfo._applyFog=e,this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableDistantPicking",{get:function(){return this._internalAbstractMeshDataInfo._enableDistantPicking},set:function(e){this._internalAbstractMeshDataInfo._enableDistantPicking=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerMask",{get:function(){return this._internalAbstractMeshDataInfo._layerMask},set:function(e){e!==this._internalAbstractMeshDataInfo._layerMask&&(this._internalAbstractMeshDataInfo._layerMask=e,this._resyncLightSources())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._internalAbstractMeshDataInfo._meshCollisionData._collisionMask},set:function(e){this._internalAbstractMeshDataInfo._meshCollisionData._collisionMask=isNaN(e)?-1:e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"collisionResponse",{get:function(){return this._internalAbstractMeshDataInfo._meshCollisionData._collisionResponse},set:function(e){this._internalAbstractMeshDataInfo._meshCollisionData._collisionResponse=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"collisionGroup",{get:function(){return this._internalAbstractMeshDataInfo._meshCollisionData._collisionGroup},set:function(e){this._internalAbstractMeshDataInfo._meshCollisionData._collisionGroup=isNaN(e)?-1:e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surroundingMeshes",{get:function(){return this._internalAbstractMeshDataInfo._meshCollisionData._surroundingMeshes},set:function(e){this._internalAbstractMeshDataInfo._meshCollisionData._surroundingMeshes=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightSources",{get:function(){return this._lightSources},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_positions",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skeleton",{get:function(){return this._internalAbstractMeshDataInfo._skeleton},set:function(e){var t=this._internalAbstractMeshDataInfo._skeleton;t&&t.needInitialSkinMatrix&&t._unregisterMeshWithPoseMatrix(this),e&&e.needInitialSkinMatrix&&e._registerMeshWithPoseMatrix(this),this._internalAbstractMeshDataInfo._skeleton=e,this._internalAbstractMeshDataInfo._skeleton||(this._bonesTransformMatrices=null),this._markSubMeshesAsAttributesDirty()},enumerable:!1,configurable:!0}),t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("world",16),this._uniformBuffer.addUniform("visibility",1),this._uniformBuffer.create()},t.prototype.transferToEffect=function(e){var t=this._uniformBuffer;t.updateMatrix("world",e),t.updateFloat("visibility",this._internalAbstractMeshDataInfo._visibility),t.update()},t.prototype.getMeshUniformBuffer=function(){return this._uniformBuffer},t.prototype.getClassName=function(){return"AbstractMesh"},t.prototype.toString=function(e){var t="Name: "+this.name+", isInstance: "+("InstancedMesh"!==this.getClassName()?"YES":"NO");t+=", # of submeshes: "+(this.subMeshes?this.subMeshes.length:0);var n=this._internalAbstractMeshDataInfo._skeleton;return n&&(t+=", skeleton: "+n.name),e&&(t+=", billboard mode: "+["NONE","X","Y",null,"Z",null,null,"ALL"][this.billboardMode],t+=", freeze wrld mat: "+(this._isWorldMatrixFrozen||this._waitingData.freezeWorldMatrix?"YES":"NO")),t},t.prototype._getEffectiveParent=function(){return this._masterMesh&&this.billboardMode!==Lr.BILLBOARDMODE_NONE?this._masterMesh:e.prototype._getEffectiveParent.call(this)},t.prototype._getActionManagerForTrigger=function(e,t){if(void 0===t&&(t=!0),this.actionManager&&(t||this.actionManager.isRecursive)){if(!e)return this.actionManager;if(this.actionManager.hasSpecificTrigger(e))return this.actionManager}return this.parent?this.parent._getActionManagerForTrigger(e,!1):null},t.prototype._rebuild=function(e){if(void 0===e&&(e=!1),this.onRebuildObservable.notifyObservers(this),null!==this._occlusionQuery&&(this._occlusionQuery=null),this.subMeshes)for(var t=0,n=this.subMeshes;t4,_=m?this.getVerticesData(Yn.MatricesIndicesExtraKind):null,g=m?this.getVerticesData(Yn.MatricesWeightsExtraKind):null,y=this.skeleton.getTransformMatrices(this),v=w.Vector3[0],b=w.Matrix[0],T=w.Matrix[1],E=0;for(d=0;d0&&(R.FromFloat32ArrayToRefScaled(y,Math.floor(16*p[E+A]),x,T),b.addToSelf(T));if(m)for(A=0;A<4;A++)(x=g[E+A])>0&&(R.FromFloat32ArrayToRefScaled(y,Math.floor(16*_[E+A]),x,T),b.addToSelf(T));i===Yn.NormalKind?C.TransformNormalFromFloatsToRef(n[d],n[d+1],n[d+2],b,v):C.TransformCoordinatesFromFloatsToRef(n[d],n[d+1],n[d+2],b,v),v.toArray(n,d),i===Yn.PositionKind&&this._positions&&this._positions[d/3].copyFrom(v)}}}return n},t.prototype.getNormalsData=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!1),this._getData(e,t,null,Yn.NormalKind)},t.prototype.getPositionData=function(e,t,n){return void 0===e&&(e=!1),void 0===t&&(t=!1),this._getData(e,t,n,Yn.PositionKind)},t.prototype._getPositionData=function(e,t){var n,i=this.getVerticesData(Yn.PositionKind);if(this._internalAbstractMeshDataInfo._positions&&(this._internalAbstractMeshDataInfo._positions=null),i&&(e&&this.skeleton||t&&this.morphTargetManager)){if(i=i.slice(),this._generatePointsArray(),this._positions){var r=this._positions;this._internalAbstractMeshDataInfo._positions=new Array(r.length);for(var o=0;o1||!i.IsGlobal)&&i.updateBoundingInfo(e)}return this},t.prototype._afterComputeWorldMatrix=function(){this.doNotSyncBoundingInfo||(this._boundingInfoIsDirty=!0)},t.prototype.isInFrustum=function(e){return this.getBoundingInfo().isInFrustum(e,this.cullingStrategy)},t.prototype.isCompletelyInFrustum=function(e){return this.getBoundingInfo().isCompletelyInFrustum(e)},t.prototype.intersectsMesh=function(e,t,n){void 0===t&&(t=!1);var i=this.getBoundingInfo(),r=e.getBoundingInfo();if(i.intersects(r,t))return!0;if(n)for(var o=0,a=this.getChildMeshes();o1&&!o._checkCollision(e)||this._collideForSubMesh(o,t,e)}return this},t.prototype._shouldConvertRHS=function(){return!1},t.prototype._checkCollision=function(e){if(!this.getBoundingInfo()._checkCollision(e))return this;var t=w.Matrix[0],n=w.Matrix[1];return R.ScalingToRef(1/e._radius.x,1/e._radius.y,1/e._radius.z,t),this.worldMatrixFromCache.multiplyToRef(t,n),this._processCollisionsForSubMeshes(e,n),this},t.prototype._generatePointsArray=function(){return!1},t.prototype.intersects=function(e,t,n,i,r,o){void 0===i&&(i=!1),void 0===o&&(o=!1);var s=new qn,c=this.getClassName(),l="InstancedLinesMesh"===c||"LinesMesh"===c||"GreasedLineMesh"===c?this.intersectionThreshold:0,u=this.getBoundingInfo();if(!this.subMeshes)return s;if(!(o||e.intersectsSphere(u.boundingSphere,l)&&e.intersectsBox(u.boundingBox,l)))return s;if(i)return s.hit=!o,s.pickedMesh=o?null:this,s.distance=o?0:C.Distance(e.origin,u.boundingSphere.center),s.subMeshId=0,s;if(!this._generatePointsArray())return s;for(var h=null,d=this._scene.getIntersectingSubMeshCandidates(this,e),p=d.length,f=!1,m=0;m1)||o||g.canIntersects(e)){var y=g.intersects(e,this._positions,this.getIndices(),t,n);if(y&&(t||!h||y.distance-1&&this._parentContainer.meshes.splice(l,1),this._parentContainer=null}if(n&&this.material&&("MultiMaterial"===this.material.getClassName()?this.material.dispose(!1,!0,!0):this.material.dispose(!1,!0)),!t)for(i=0;i65535){o=!0;break}e.depthSortedIndices=o?new Uint32Array(n):new Uint16Array(n)}if(e.facetDepthSortFunction=function(e,t){return t.sqDistance-e.sqDistance},!e.facetDepthSortFrom){var s=this.getScene().activeCamera;e.facetDepthSortFrom=s?s.position:C.Zero()}e.depthSortedFacets=[];for(var c=0;cm?r.maximum.x-r.minimum.x:m,e.bbSize.y=r.maximum.y-r.minimum.y>m?r.maximum.y-r.minimum.y:m,e.bbSize.z=r.maximum.z-r.minimum.z>m?r.maximum.z-r.minimum.z:m;var u=e.bbSize.x>e.bbSize.y?e.bbSize.x:e.bbSize.y;if(u=u>e.bbSize.z?u:e.bbSize.z,e.subDiv.max=e.partitioningSubdivisions,e.subDiv.X=Math.floor(e.subDiv.max*e.bbSize.x/u),e.subDiv.Y=Math.floor(e.subDiv.max*e.bbSize.y/u),e.subDiv.Z=Math.floor(e.subDiv.max*e.bbSize.z/u),e.subDiv.X=e.subDiv.X<1?1:e.subDiv.X,e.subDiv.Y=e.subDiv.Y<1?1:e.subDiv.Y,e.subDiv.Z=e.subDiv.Z<1?1:e.subDiv.Z,e.facetParameters.facetNormals=this.getFacetLocalNormals(),e.facetParameters.facetPositions=this.getFacetLocalPositions(),e.facetParameters.facetPartitioning=this.getFacetLocalPartitioning(),e.facetParameters.bInfo=r,e.facetParameters.bbSize=e.bbSize,e.facetParameters.subDiv=e.subDiv,e.facetParameters.ratio=this.partitioningBBoxRatio,e.facetParameters.depthSort=e.facetDepthSort,e.facetDepthSort&&e.facetDepthSortEnabled&&(this.computeWorldMatrix(!0),this._worldMatrix.invertToRef(e.invertedMatrix),C.TransformCoordinatesToRef(e.facetDepthSortFrom,e.invertedMatrix,e.facetDepthSortOrigin),e.facetParameters.distanceTo=e.facetDepthSortOrigin),e.facetParameters.depthSortedFacets=e.depthSortedFacets,i&&Cr.ComputeNormals(t,n,i,e.facetParameters),e.facetDepthSort&&e.facetDepthSortEnabled){e.depthSortedFacets.sort(e.facetDepthSortFunction);var h=e.depthSortedIndices.length/3|0;for(c=0;cr.subDiv.max||a<0||a>r.subDiv.max||s<0||s>r.subDiv.max?null:r.facetPartitioning[o+r.subDiv.max*a+r.subDiv.max*r.subDiv.max*s]},t.prototype.getClosestFacetAtCoordinates=function(e,t,n,i,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0);var a=this.getWorldMatrix(),s=w.Matrix[5];a.invertToRef(s);var c=w.Vector3[8];C.TransformCoordinatesFromFloatsToRef(e,t,n,s,c);var l=this.getClosestFacetAtLocalCoordinates(c.x,c.y,c.z,i,r,o);return i&&C.TransformCoordinatesFromFloatsToRef(i.x,i.y,i.z,a,i),l},t.prototype.getClosestFacetAtLocalCoordinates=function(e,t,n,i,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0);var a=null,s=0,c=0,l=0,u=0,h=0,d=0,p=0,f=0,m=this.getFacetLocalPositions(),_=this.getFacetLocalNormals(),g=this.getFacetsAtLocalCoordinates(e,t,n);if(!g)return null;for(var y,v,b,T=Number.MAX_VALUE,E=T,A=0;A=0||r&&!o&&u<=0)&&(u=v.x*b.x+v.y*b.y+v.z*b.z,h=-(v.x*e+v.y*t+v.z*n-u)/(v.x*v.x+v.y*v.y+v.z*v.z),(E=(s=(d=e+v.x*h)-e)*s+(c=(p=t+v.y*h)-t)*c+(l=(f=n+v.z*h)-n)*l)0,t.NUM_MORPH_INFLUENCERS=n.numInfluencers,t.MORPHTARGETS_TEXTURE=n.isUsingTextureForTargets):(t.MORPHTARGETS_UV=!1,t.MORPHTARGETS_TANGENT=!1,t.MORPHTARGETS_NORMAL=!1,t.MORPHTARGETS=!1,t.NUM_MORPH_INFLUENCERS=0)},e.PrepareDefinesForBakedVertexAnimation=function(e,t){var n=e.bakedVertexAnimationManager;t.BAKED_VERTEX_ANIMATION_TEXTURE=!(!n||!n.isEnabled)},e.PrepareDefinesForAttributes=function(e,t,n,i,r,o,s){if(void 0===r&&(r=!1),void 0===o&&(o=!0),void 0===s&&(s=!0),!t._areAttributesDirty&&t._needNormals===t._normals&&t._needUVs===t._uvs)return!1;t._normals=t._needNormals,t._uvs=t._needUVs,t.NORMAL=t._needNormals&&e.isVerticesDataPresent(Yn.NormalKind),t._needNormals&&e.isVerticesDataPresent(Yn.TangentKind)&&(t.TANGENT=!0);for(var c=1;c<=a.MAX_SUPPORTED_UV_SETS;++c)t["UV"+c]=!!t._needUVs&&e.isVerticesDataPresent("uv".concat(1===c?"":c));if(n){var l=e.useVertexColors&&e.isVerticesDataPresent(Yn.ColorKind);t.VERTEXCOLOR=l,t.VERTEXALPHA=e.hasVertexAlpha&&l&&o}return e.isVerticesDataPresent(Yn.ColorInstanceKind)&&(e.hasInstances||e.hasThinInstances)&&(t.INSTANCESCOLOR=!0),i&&this.PrepareDefinesForBones(e,t),r&&this.PrepareDefinesForMorphTargets(e,t),s&&this.PrepareDefinesForBakedVertexAnimation(e,t),!0},e.PrepareDefinesForMultiview=function(e,t){if(e.activeCamera){var n=t.MULTIVIEW;t.MULTIVIEW=null!==e.activeCamera.outputRenderTarget&&e.activeCamera.outputRenderTarget.getViewCount()>1,t.MULTIVIEW!=n&&t.markAsUnprocessed()}},e.PrepareDefinesForOIT=function(e,t,n){var i=t.ORDER_INDEPENDENT_TRANSPARENCY,r=t.ORDER_INDEPENDENT_TRANSPARENCY_16BITS;t.ORDER_INDEPENDENT_TRANSPARENCY=e.useOrderIndependentTransparency&&n,t.ORDER_INDEPENDENT_TRANSPARENCY_16BITS=!e.getEngine().getCaps().textureFloatLinearFiltering,i===t.ORDER_INDEPENDENT_TRANSPARENCY&&r===t.ORDER_INDEPENDENT_TRANSPARENCY_16BITS||t.markAsUnprocessed()},e.PrepareDefinesForPrePass=function(e,t,n){var i=t.PREPASS;if(t._arePrePassDirty){var r=[{type:a.PREPASS_POSITION_TEXTURE_TYPE,define:"PREPASS_POSITION",index:"PREPASS_POSITION_INDEX"},{type:a.PREPASS_VELOCITY_TEXTURE_TYPE,define:"PREPASS_VELOCITY",index:"PREPASS_VELOCITY_INDEX"},{type:a.PREPASS_REFLECTIVITY_TEXTURE_TYPE,define:"PREPASS_REFLECTIVITY",index:"PREPASS_REFLECTIVITY_INDEX"},{type:a.PREPASS_IRRADIANCE_TEXTURE_TYPE,define:"PREPASS_IRRADIANCE",index:"PREPASS_IRRADIANCE_INDEX"},{type:a.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE,define:"PREPASS_ALBEDO_SQRT",index:"PREPASS_ALBEDO_SQRT_INDEX"},{type:a.PREPASS_DEPTH_TEXTURE_TYPE,define:"PREPASS_DEPTH",index:"PREPASS_DEPTH_INDEX"},{type:a.PREPASS_NORMAL_TEXTURE_TYPE,define:"PREPASS_NORMAL",index:"PREPASS_NORMAL_INDEX"}];if(e.prePassRenderer&&e.prePassRenderer.enabled&&n){t.PREPASS=!0,t.SCENE_MRT_COUNT=e.prePassRenderer.mrtCount,t.PREPASS_NORMAL_WORLDSPACE=e.prePassRenderer.generateNormalsInWorldSpace;for(var o=0;o0&&(a.shadowEnabled=!0,c.prepareDefines(r,i))}}n.lightmapMode!=Ai.LIGHTMAP_DEFAULT?(a.lightmapMode=!0,r["LIGHTMAPEXCLUDED"+i]=!0,r["LIGHTMAPNOSPECULAR"+i]=n.lightmapMode==Ai.LIGHTMAP_SHADOWSONLY):(r["LIGHTMAPEXCLUDED"+i]=!1,r["LIGHTMAPNOSPECULAR"+i]=!1)},e.PrepareDefinesForLights=function(e,t,n,i,r,o){if(void 0===r&&(r=4),void 0===o&&(o=!1),!n._areLightsDirty)return n._needNormals;var a=0,s={needNormals:n._needNormals,needRebuild:!1,lightmapMode:!1,shadowEnabled:!1,specularEnabled:!1};if(e.lightsEnabled&&!o)for(var c=0,l=t.lightSources;c0&&(r=i+o,t.addFallback(r,"LIGHT"+o)),e.SHADOWS||(e["SHADOW"+o]&&t.addFallback(i,"SHADOW"+o),e["SHADOWPCF"+o]&&t.addFallback(i,"SHADOWPCF"+o),e["SHADOWPCSS"+o]&&t.addFallback(i,"SHADOWPCSS"+o),e["SHADOWPOISSON"+o]&&t.addFallback(i,"SHADOWPOISSON"+o),e["SHADOWESM"+o]&&t.addFallback(i,"SHADOWESM"+o),e["SHADOWCLOSEESM"+o]&&t.addFallback(i,"SHADOWCLOSEESM"+o));return r++},e.PrepareAttributesForMorphTargetsInfluencers=function(e,t,n){this._TmpMorphInfluencers.NUM_MORPH_INFLUENCERS=n,this.PrepareAttributesForMorphTargets(e,t,this._TmpMorphInfluencers)},e.PrepareAttributesForMorphTargets=function(e,t,n){var i=n.NUM_MORPH_INFLUENCERS;if(i>0&&A.LastCreatedEngine){var r=A.LastCreatedEngine.getCaps().maxVertexAttribs,o=t.morphTargetManager;if(null==o?void 0:o.isUsingTextureForTargets)return;for(var a=o&&o.supportsNormals&&n.NORMAL,s=o&&o.supportsTangents&&n.TANGENT,c=o&&o.supportsUVs&&n.UV1,l=0;lr&&J.Error("Cannot add more vertex attributes for mesh "+t.name)}},e.PrepareAttributesForBakedVertexAnimation=function(e,t,n){n.BAKED_VERTEX_ANIMATION_TEXTURE&&n.INSTANCES&&e.push("bakedVertexAnimationSettingsInstanced")},e.PrepareAttributesForBones=function(e,t,n,i){n.NUM_BONE_INFLUENCERS>0&&(i.addCPUSkinningFallback(0,t),e.push(Yn.MatricesIndicesKind),e.push(Yn.MatricesWeightsKind),n.NUM_BONE_INFLUENCERS>4&&(e.push(Yn.MatricesIndicesExtraKind),e.push(Yn.MatricesWeightsExtraKind)))},e.PrepareAttributesForInstances=function(e,t){(t.INSTANCES||t.THIN_INSTANCES)&&this.PushAttributesForInstances(e,!!t.PREPASS_VELOCITY),t.INSTANCESCOLOR&&e.push(Yn.ColorInstanceKind)},e.PushAttributesForInstances=function(e,t){void 0===t&&(t=!1),e.push("world0"),e.push("world1"),e.push("world2"),e.push("world3"),t&&(e.push("previousWorld0"),e.push("previousWorld1"),e.push("previousWorld2"),e.push("previousWorld3"))},e.BindLightProperties=function(e,t,n){e.transferToEffect(t,n+"")},e.BindLight=function(e,t,n,i,r,o){void 0===o&&(o=!0),e._bindLight(t,n,i,r,o)},e.BindLights=function(e,t,n,i,r){void 0===r&&(r=4);for(var o=Math.min(t.lightSources.length,r),a=0;a-1){var o=r.getTransformMatrixTexture(t);n.setTexture("boneSampler",o),n.setFloat("boneTextureWidth",4*(r.bones.length+1))}else{var s=r.getTransformMatrices(t);s&&(n.setMatrices("mBones",s),i&&t.getScene().prePassRenderer&&t.getScene().prePassRenderer.getIndex(a.PREPASS_VELOCITY_TEXTURE_TYPE)&&(i.previousBones[t.uniqueId]||(i.previousBones[t.uniqueId]=s.slice()),n.setMatrices("mPreviousBones",i.previousBones[t.uniqueId]),e._CopyBonesTransformationMatrices(s,i.previousBones[t.uniqueId])))}}},e._CopyBonesTransformationMatrices=function(e,t){return t.set(e),t},e.BindMorphTargetParameters=function(e,t){var n=e.morphTargetManager;e&&n&&t.setFloatArray("morphTargetInfluences",n.influences)},e.BindLogDepth=function(e,t,n){if(!e||e.LOGARITHMICDEPTH||e.indexOf&&e.indexOf("LOGARITHMICDEPTH")>=0){var i=n.activeCamera;i.mode===dr.ORTHOGRAPHIC_CAMERA&&J.Error("Logarithmic depth is not compatible with orthographic cameras!",20),t.setFloat("logarithmicDepthConstant",2/(Math.log(i.maxZ+1)/Math.LN2))}},e._TmpMorphInfluencers={NUM_MORPH_INFLUENCERS:0},e._TempFogColor=B.Black(),e}(),Yr=function(){function e(){this.reset()}return e.prototype.reset=function(){this.enabled=!1,this.mask=255,this.func=a.ALWAYS,this.funcRef=1,this.funcMask=255,this.opStencilFail=a.KEEP,this.opDepthFail=a.KEEP,this.opStencilDepthPass=a.REPLACE},Object.defineProperty(e.prototype,"func",{get:function(){return this._func},set:function(e){this._func=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"funcRef",{get:function(){return this._funcRef},set:function(e){this._funcRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"funcMask",{get:function(){return this._funcMask},set:function(e){this._funcMask=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"opStencilFail",{get:function(){return this._opStencilFail},set:function(e){this._opStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"opDepthFail",{get:function(){return this._opDepthFail},set:function(e){this._opDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"opStencilDepthPass",{get:function(){return this._opStencilDepthPass},set:function(e){this._opStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!1,configurable:!0}),e.prototype.getClassName=function(){return"MaterialStencilState"},e.prototype.copyTo=function(e){ke.Clone((function(){return e}),this)},e.prototype.serialize=function(){return ke.Serialize(this)},e.prototype.parse=function(e,t,n){var i=this;ke.Parse((function(){return i}),e,t,n)},W([Se()],e.prototype,"func",null),W([Se()],e.prototype,"funcRef",null),W([Se()],e.prototype,"funcMask",null),W([Se()],e.prototype,"opStencilFail",null),W([Se()],e.prototype,"opDepthFail",null),W([Se()],e.prototype,"opStencilDepthPass",null),W([Se()],e.prototype,"mask",null),W([Se()],e.prototype,"enabled",null),e}();!function(e){e[e.Created=1]="Created",e[e.Disposed=2]="Disposed",e[e.GetDefineNames=4]="GetDefineNames",e[e.PrepareUniformBuffer=8]="PrepareUniformBuffer",e[e.IsReadyForSubMesh=16]="IsReadyForSubMesh",e[e.PrepareDefines=32]="PrepareDefines",e[e.BindForSubMesh=64]="BindForSubMesh",e[e.PrepareEffect=128]="PrepareEffect",e[e.GetAnimatables=256]="GetAnimatables",e[e.GetActiveTextures=512]="GetActiveTextures",e[e.HasTexture=1024]="HasTexture",e[e.FillRenderTargetTextures=2048]="FillRenderTargetTextures",e[e.HasRenderTargetTextures=4096]="HasRenderTargetTextures",e[e.HardBindForSubMesh=8192]="HardBindForSubMesh"}(Wr||(Wr={}));var qr=function(){function e(t,n,i){this.shadowDepthWrapper=null,this.allowShaderHotSwapping=!0,this.metadata=null,this.reservedDataStore=null,this.checkReadyOnEveryCall=!1,this.checkReadyOnlyOnce=!1,this.state="",this._alpha=1,this._backFaceCulling=!0,this._cullBackFaces=!0,this._blockDirtyMechanism=!1,this.onCompiled=null,this.onError=null,this.getRenderTargetTextures=null,this.doNotSerialize=!1,this._storeEffectOnSubMeshes=!1,this.animations=null,this.onDisposeObservable=new u,this._onDisposeObserver=null,this._onUnBindObservable=null,this._onBindObserver=null,this._alphaMode=a.ALPHA_COMBINE,this._needDepthPrePass=!1,this.disableDepthWrite=!1,this.disableColorWrite=!1,this.forceDepthWrite=!1,this.depthFunction=0,this.separateCullingPass=!1,this._fogEnabled=!0,this.pointSize=1,this.zOffset=0,this.zOffsetUnits=0,this.stencil=new Yr,this._useUBO=!1,this._fillMode=e.TriangleFillMode,this._cachedDepthWriteState=!1,this._cachedColorWriteState=!1,this._cachedDepthFunctionState=0,this._indexInSceneMaterialArray=-1,this.meshMap=null,this._parentContainer=null,this._uniformBufferLayoutBuilt=!1,this._eventInfo={},this._callbackPluginEventGeneric=function(){},this._callbackPluginEventIsReadyForSubMesh=function(){},this._callbackPluginEventPrepareDefines=function(){},this._callbackPluginEventPrepareDefinesBeforeAttributes=function(){},this._callbackPluginEventHardBindForSubMesh=function(){},this._callbackPluginEventBindForSubMesh=function(){},this._callbackPluginEventHasRenderTargetTextures=function(){},this._callbackPluginEventFillRenderTargetTextures=function(){},this._forceAlphaTest=!1,this._transparencyMode=null,this.name=t;var r=n||A.LastCreatedScene;r&&(this._scene=r,this._dirtyCallbacks={},this._dirtyCallbacks[a.MATERIAL_TextureDirtyFlag]=this._markAllSubMeshesAsTexturesDirty.bind(this),this._dirtyCallbacks[a.MATERIAL_LightDirtyFlag]=this._markAllSubMeshesAsLightsDirty.bind(this),this._dirtyCallbacks[a.MATERIAL_FresnelDirtyFlag]=this._markAllSubMeshesAsFresnelDirty.bind(this),this._dirtyCallbacks[a.MATERIAL_AttributesDirtyFlag]=this._markAllSubMeshesAsAttributesDirty.bind(this),this._dirtyCallbacks[a.MATERIAL_MiscDirtyFlag]=this._markAllSubMeshesAsMiscDirty.bind(this),this._dirtyCallbacks[a.MATERIAL_PrePassDirtyFlag]=this._markAllSubMeshesAsPrePassDirty.bind(this),this._dirtyCallbacks[a.MATERIAL_AllDirtyFlag]=this._markAllSubMeshesAsAllDirty.bind(this),this.id=t||Pn.RandomId(),this.uniqueId=this._scene.getUniqueId(),this._materialContext=this._scene.getEngine().createMaterialContext(),this._drawWrapper=new en(this._scene.getEngine(),!1),this._drawWrapper.materialContext=this._materialContext,this._scene.useRightHandedSystem?this.sideOrientation=e.ClockWiseSideOrientation:this.sideOrientation=e.CounterClockWiseSideOrientation,this._uniformBuffer=new Wn(this._scene.getEngine(),void 0,void 0,t),this._useUBO=this.getScene().getEngine().supportsUniformBuffers,i||this._scene.addMaterial(this),this._scene.useMaterialMeshMap&&(this.meshMap={}),e.OnEventObservable.notifyObservers(this,Wr.Created))}return Object.defineProperty(e.prototype,"canRenderToMRT",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(t){if(this._alpha!==t){var n=this._alpha;this._alpha=t,1!==n&&1!==t||this.markAsDirty(e.MiscDirtyFlag+e.PrePassDirtyFlag)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backFaceCulling",{get:function(){return this._backFaceCulling},set:function(t){this._backFaceCulling!==t&&(this._backFaceCulling=t,this.markAsDirty(e.TextureDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cullBackFaces",{get:function(){return this._cullBackFaces},set:function(t){this._cullBackFaces!==t&&(this._cullBackFaces=t,this.markAsDirty(e.TextureDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockDirtyMechanism",{get:function(){return this._blockDirtyMechanism},set:function(e){this._blockDirtyMechanism!==e&&(this._blockDirtyMechanism=e,e||this.markDirty())},enumerable:!1,configurable:!0}),e.prototype.atomicMaterialsUpdate=function(e){this.blockDirtyMechanism=!0;try{e(this)}finally{this.blockDirtyMechanism=!1}},Object.defineProperty(e.prototype,"hasRenderTargetTextures",{get:function(){return this._eventInfo.hasRenderTargetTextures=!1,this._callbackPluginEventHasRenderTargetTextures(this._eventInfo),this._eventInfo.hasRenderTargetTextures},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBindObservable",{get:function(){return this._onBindObservable||(this._onBindObservable=new u),this._onBindObservable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBind",{set:function(e){this._onBindObserver&&this.onBindObservable.remove(this._onBindObserver),this._onBindObserver=this.onBindObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onUnBindObservable",{get:function(){return this._onUnBindObservable||(this._onUnBindObservable=new u),this._onUnBindObservable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onEffectCreatedObservable",{get:function(){return this._onEffectCreatedObservable||(this._onEffectCreatedObservable=new u),this._onEffectCreatedObservable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alphaMode",{get:function(){return this._alphaMode},set:function(t){this._alphaMode!==t&&(this._alphaMode=t,this.markAsDirty(e.TextureDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needDepthPrePass",{get:function(){return this._needDepthPrePass},set:function(e){this._needDepthPrePass!==e&&(this._needDepthPrePass=e,this._needDepthPrePass&&(this.checkReadyOnEveryCall=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPrePassCapable",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fogEnabled",{get:function(){return this._fogEnabled},set:function(t){this._fogEnabled!==t&&(this._fogEnabled=t,this.markAsDirty(e.MiscDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wireframe",{get:function(){switch(this._fillMode){case e.WireFrameFillMode:case e.LineListDrawMode:case e.LineLoopDrawMode:case e.LineStripDrawMode:return!0}return this._scene.forceWireframe},set:function(t){this.fillMode=t?e.WireFrameFillMode:e.TriangleFillMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pointsCloud",{get:function(){switch(this._fillMode){case e.PointFillMode:case e.PointListDrawMode:return!0}return this._scene.forcePointsCloud},set:function(t){this.fillMode=t?e.PointFillMode:e.TriangleFillMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fillMode",{get:function(){return this._fillMode},set:function(t){this._fillMode!==t&&(this._fillMode=t,this.markAsDirty(e.MiscDirtyFlag))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useLogarithmicDepth",{get:function(){return this._useLogarithmicDepth},set:function(e){var t=this.getScene().getEngine().getCaps().fragmentDepthSupported;e&&!t&&J.Warn("Logarithmic depth has been requested for a material on a device that doesn't support it."),this._useLogarithmicDepth=e&&t,this._markAllSubMeshesAsMiscDirty()},enumerable:!1,configurable:!0}),e.prototype._getDrawWrapper=function(){return this._drawWrapper},e.prototype._setDrawWrapper=function(e){this._drawWrapper=e},e.prototype.toString=function(e){return"Name: "+this.name},e.prototype.getClassName=function(){return"Material"},Object.defineProperty(e.prototype,"_isMaterial",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFrozen",{get:function(){return this.checkReadyOnlyOnce},enumerable:!1,configurable:!0}),e.prototype.freeze=function(){this.markDirty(),this.checkReadyOnlyOnce=!0},e.prototype.unfreeze=function(){this.markDirty(),this.checkReadyOnlyOnce=!1},e.prototype.isReady=function(e,t){return!0},e.prototype.isReadyForSubMesh=function(e,t,n){var i=t.materialDefines;return!!i&&(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=i,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),this._eventInfo.isReadyForSubMesh)},e.prototype.getEffect=function(){return this._drawWrapper.effect},e.prototype.getScene=function(){return this._scene},Object.defineProperty(e.prototype,"transparencyMode",{get:function(){return this._transparencyMode},set:function(t){this._transparencyMode!==t&&(this._transparencyMode=t,this._forceAlphaTest=t===e.MATERIAL_ALPHATESTANDBLEND,this._markAllSubMeshesAsTexturesAndMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_disableAlphaBlending",{get:function(){return this._transparencyMode===e.MATERIAL_OPAQUE||this._transparencyMode===e.MATERIAL_ALPHATEST},enumerable:!1,configurable:!0}),e.prototype.needAlphaBlending=function(){return!this._disableAlphaBlending&&this.alpha<1},e.prototype.needAlphaBlendingForMesh=function(e){return e.visibility<1||!this._disableAlphaBlending&&(e.hasVertexAlpha||this.needAlphaBlending())},e.prototype.needAlphaTesting=function(){return!!this._forceAlphaTest},e.prototype._shouldTurnAlphaTestOn=function(e){return!this.needAlphaBlendingForMesh(e)&&this.needAlphaTesting()},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.markDirty=function(t){void 0===t&&(t=!1);for(var n=0,i=this.getScene().meshes;n-1&&this._parentContainer.materials.splice(r,1),this._parentContainer=null}if(!0!==n)if(this.meshMap)for(var o in this.meshMap)(c=this.meshMap[o])&&(c.material=null,this.releaseVertexArrayObject(c,e));else for(var a=0,s=i.meshes;a=this.subMaterials.length?this.getScene().defaultMaterial:this.subMaterials[e]},t.prototype.getActiveTextures=function(){var t;return(t=e.prototype.getActiveTextures.call(this)).concat.apply(t,this.subMaterials.map((function(e){return e?e.getActiveTextures():[]})))},t.prototype.hasTexture=function(t){var n;if(e.prototype.hasTexture.call(this,t))return!0;for(var i=0;i=0&&r.multiMaterials.splice(s,1),e.prototype.dispose.call(this,t,n)}},t.ParseMultiMaterial=function(e,n){var i=new t(e.name,n);return i.id=e.id,i._loadedUniqueId=e.uniqueId,_e&&_e.AddTagsTo(i,e.tags),e.materialsUniqueIds?i._waitingSubMaterialsUniqueIds=e.materialsUniqueIds:e.materials.forEach((function(e){return i.subMaterials.push(n.getLastMaterialById(e))})),i},t}(qr);b("BABYLON.MultiMaterial",Kr);var Qr=function(e,t){this.distanceOrScreenCoverage=e,this.mesh=t},Zr=function(){},$r=function(){this.visibleInstances={},this.batchCache=new Jr,this.batchCacheReplacementModeInFrozenMode=new Jr,this.instancesBufferSize=2048},Jr=function(){this.mustReturn=!1,this.visibleInstances=new Array,this.renderSelf=[],this.hardwareInstancedRendering=[]},eo=function(){this.instancesCount=0,this.matrixBuffer=null,this.previousMatrixBuffer=null,this.matrixBufferSize=512,this.matrixData=null,this.boundingVectors=[],this.worldMatrices=null},to=function(){this._areNormalsFrozen=!1,this._source=null,this.meshMap=null,this._preActivateId=-1,this._LODLevels=new Array,this._useLODScreenCoverage=!1,this._effectiveMaterial=null,this._forcedInstanceCount=0,this._overrideRenderingFillMode=null},no=function(e){function t(n,i,r,o,s,c){void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=null),void 0===c&&(c=!0);var l=e.call(this,n,i)||this;if(l._internalMeshDataInfo=new to,l.delayLoadState=a.DELAYLOADSTATE_NONE,l.instances=[],l._creationDataStorage=null,l._geometry=null,l._instanceDataStorage=new $r,l._thinInstanceDataStorage=new eo,l._shouldGenerateFlatShading=!1,l._originalBuilderSideOrientation=t.DEFAULTSIDE,l.overrideMaterialSideOrientation=null,l.ignoreCameraMaxZ=!1,i=l.getScene(),l._onBeforeDraw=function(e,t,n){e&&n&&(l._uniformBuffer?l.transferToEffect(t):n.bindOnlyWorldMatrix(t))},o){if(o._geometry&&o._geometry.applyToMesh(l),he.DeepCopy(o,l,["name","material","skeleton","instances","parent","uniqueId","source","metadata","morphTargetManager","hasInstances","worldMatrixInstancedBuffer","previousWorldMatrixInstancedBuffer","hasLODLevels","geometry","isBlocked","areNormalsFrozen","facetNb","isFacetDataEnabled","lightSources","useBones","isAnInstance","collider","edgesRenderer","forward","up","right","absolutePosition","absoluteScaling","absoluteRotationQuaternion","isWorldMatrixFrozen","nonUniformScaling","behaviors","worldMatrixFromCache","hasThinInstances","cloneMeshMap","hasBoundingInfo","physicsBody","physicsImpostor"],["_poseMatrix"]),l._internalMeshDataInfo._source=o,i.useClonedMeshMap&&(o._internalMeshDataInfo.meshMap||(o._internalMeshDataInfo.meshMap={}),o._internalMeshDataInfo.meshMap[l.uniqueId]=l),l._originalBuilderSideOrientation=o._originalBuilderSideOrientation,l._creationDataStorage=o._creationDataStorage,o._ranges){var h=o._ranges;for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&h[d]&&l.createAnimationRange(d,h[d].from,h[d].to)}if(o.metadata&&o.metadata.clone?l.metadata=o.metadata.clone():l.metadata=o.metadata,l._internalMetadata=o._internalMetadata,_e&&_e.HasTags(o)&&_e.AddTagsTo(l,_e.GetTags(o,!0)),l.setEnabled(o.isEnabled(!1)),l.parent=o.parent,l.setPivotMatrix(o.getPivotMatrix()),l.id=n+"."+o.id,l.material=o.material,!s)for(var p=o.getDescendants(!0),f=0;f0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasThinInstances",{get:function(){return(this.forcedInstanceCount||this._thinInstanceDataStorage.instancesCount||0)>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"forcedInstanceCount",{get:function(){return this._internalMeshDataInfo._forcedInstanceCount},set:function(e){this._internalMeshDataInfo._forcedInstanceCount=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overrideRenderingFillMode",{get:function(){return this._internalMeshDataInfo._overrideRenderingFillMode},set:function(e){this._internalMeshDataInfo._overrideRenderingFillMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._internalMeshDataInfo._source},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cloneMeshMap",{get:function(){return this._internalMeshDataInfo.meshMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUnIndexed",{get:function(){return this._unIndexed},set:function(e){this._unIndexed!==e&&(this._unIndexed=e,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"worldMatrixInstancedBuffer",{get:function(){return this._instanceDataStorage.instancesData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousWorldMatrixInstancedBuffer",{get:function(){return this._instanceDataStorage.instancesPreviousData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"manualUpdateOfWorldMatrixInstancedBuffer",{get:function(){return this._instanceDataStorage.manualUpdate},set:function(e){this._instanceDataStorage.manualUpdate=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"manualUpdateOfPreviousWorldMatrixInstancedBuffer",{get:function(){return this._instanceDataStorage.previousManualUpdate},set:function(e){this._instanceDataStorage.previousManualUpdate=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"forceWorldMatrixInstancedBufferUpdate",{get:function(){return this._instanceDataStorage.forceMatrixUpdates},set:function(e){this._instanceDataStorage.forceMatrixUpdates=e},enumerable:!1,configurable:!0}),t.prototype.instantiateHierarchy=function(e,t,n){void 0===e&&(e=null);var i=0===this.getTotalVertices()||t&&t.doNotInstantiate&&(!0===t.doNotInstantiate||t.doNotInstantiate(this))?this.clone("Clone of "+(this.name||this.id),e||this.parent,!0):this.createInstance("instance of "+(this.name||this.id));i.parent=e||this.parent,i.position=this.position.clone(),i.scaling=this.scaling.clone(),this.rotationQuaternion?i.rotationQuaternion=this.rotationQuaternion.clone():i.rotation=this.rotation.clone(),n&&n(this,i);for(var r=0,o=this.getChildTransformNodes(!0);r0},enumerable:!1,configurable:!0}),t.prototype.getLODLevels=function(){return this._internalMeshDataInfo._LODLevels},t.prototype._sortLODLevels=function(){var e=this._internalMeshDataInfo._useLODScreenCoverage?-1:1;this._internalMeshDataInfo._LODLevels.sort((function(t,n){return t.distanceOrScreenCoveragen.distanceOrScreenCoverage?-e:0}))},t.prototype.addLODLevel=function(e,t){if(t&&t._masterMesh)return J.Warn("You cannot use a mesh as LOD level twice"),this;var n=new Qr(e,t);return this._internalMeshDataInfo._LODLevels.push(n),t&&(t._masterMesh=this),this._sortLODLevels(),this},t.prototype.getLODLevelAtDistance=function(e){for(var t=this._internalMeshDataInfo,n=0;ns*o)return this.onLODLevelSelection&&this.onLODLevelSelection(o,this,this),this;for(var u=0;u0||this.hasThinInstances);this.computeWorldMatrix();var f=this.material||d.defaultMaterial;if(f)if(f._storeEffectOnSubMeshes)for(var m=0,_=this.subMeshes;m<_.length;m++){var g=(R=_[m]).getMaterial();if(g)if(g._storeEffectOnSubMeshes){if(!g.isReadyForSubMesh(this,R,p))return!1}else if(!g.isReady(this,p))return!1}else if(!f.isReady(this,p))return!1;for(var y=h.currentRenderPassId,v=0,b=this.lightSources;v0){var n=this.getIndices();if(!n)return null;var i=n.length,r=!1;if(e)r=!0;else for(var o=0,a=this.subMeshes;oi){r=!0;break}if(s.verticesStart+s.verticesCount>t){r=!0;break}}if(!r)return this.subMeshes[0]}return this.releaseSubMeshes(),new xr(0,0,t,0,this.getTotalIndices(),this)},t.prototype.subdivide=function(e){if(!(e<1)){for(var t=this.getTotalIndices(),n=t/e|0,i=0;n%3!=0;)n++;this.releaseSubMeshes();for(var r=0;r=t);r++)xr.CreateFromIndices(0,i,r===e-1?t-i:n,this,void 0,!1),i+=n;this.refreshBoundingInfo(),this.synchronizeInstances()}},t.prototype.setVerticesData=function(e,t,n,i){if(void 0===n&&(n=!1),this._geometry)this._geometry.setVerticesData(e,t,n,i);else{var r=new Cr;r.set(t,e);var o=this.getScene();new Rr(Rr.RandomId(),o,r,n,this)}return this},t.prototype.removeVerticesData=function(e){this._geometry&&this._geometry.removeVerticesData(e)},t.prototype.markVerticesDataAsUpdatable=function(e,t){void 0===t&&(t=!0);var n=this.getVertexBuffer(e);n&&n.isUpdatable()!==t&&this.setVerticesData(e,this.getVerticesData(e),t)},t.prototype.setVerticesBuffer=function(e,t){return void 0===t&&(t=!0),this._geometry||(this._geometry=Rr.CreateGeometryForMesh(this)),this._geometry.setVerticesBuffer(e,null,t),this},t.prototype.updateVerticesData=function(e,t,n,i){return this._geometry?(i?(this.makeGeometryUnique(),this.updateVerticesData(e,t,n,!1)):this._geometry.updateVerticesData(e,t,n),this):this},t.prototype.updateMeshPositions=function(e,t){void 0===t&&(t=!0);var n=this.getVerticesData(Yn.PositionKind);if(!n)return this;if(e(n),this.updateVerticesData(Yn.PositionKind,n,!1,!1),t){var i=this.getIndices(),r=this.getVerticesData(Yn.NormalKind);if(!r)return this;Cr.ComputeNormals(n,i,r),this.updateVerticesData(Yn.NormalKind,r,!1,!1)}return this},t.prototype.makeGeometryUnique=function(){if(!this._geometry)return this;if(1===this._geometry.meshes.length)return this;var e=this._geometry,t=this._geometry.copy(Rr.RandomId());return e.releaseForMesh(this,!0),t.applyToMesh(this),this},t.prototype.setIndexBuffer=function(e,t,n){var i=this._geometry;i||(i=new Rr(Rr.RandomId(),this.getScene(),void 0,void 0,this)),i.setIndexBuffer(e,t,n)},t.prototype.setIndices=function(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=!1),this._geometry)this._geometry.setIndices(e,t,n);else{var i=new Cr;i.indices=e;var r=this.getScene();new Rr(Rr.RandomId(),r,i,n,this)}return this},t.prototype.updateIndices=function(e,t,n){return void 0===n&&(n=!1),this._geometry?(this._geometry.updateIndices(e,t,n),this):this},t.prototype.toLeftHanded=function(){return this._geometry?(this._geometry.toLeftHanded(),this):this},t.prototype._bind=function(e,t,n,i){if(void 0===i&&(i=!0),!this._geometry)return this;var r,o=this.getScene().getEngine();if(this.morphTargetManager&&this.morphTargetManager.isUsingTextureForTargets&&this.morphTargetManager._bind(t),this._unIndexed)r=null;else switch(this._getRenderingFillMode(n)){case qr.PointFillMode:r=null;break;case qr.WireFrameFillMode:r=e._getLinesIndexBuffer(this.getIndices(),o);break;default:case qr.TriangleFillMode:r=this._geometry.getIndexBuffer()}return i&&this._userInstancedBuffersStorage&&!this.hasThinInstances?this._geometry._bind(t,r,this._userInstancedBuffersStorage.vertexBuffers,this._userInstancedBuffersStorage.vertexArrayObjects):this._geometry._bind(t,r),this},t.prototype._draw=function(e,t,n){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;this._internalMeshDataInfo._onBeforeDrawObservable&&this._internalMeshDataInfo._onBeforeDrawObservable.notifyObservers(this);var i=this.getScene().getEngine();return this._unIndexed||t==qr.PointFillMode?i.drawArraysType(t,e.verticesStart,e.verticesCount,this.forcedInstanceCount||n):t==qr.WireFrameFillMode?i.drawElementsType(t,0,e._linesIndexCount,this.forcedInstanceCount||n):i.drawElementsType(t,e.indexStart,e.indexCount,this.forcedInstanceCount||n),this},t.prototype.registerBeforeRender=function(e){return this.onBeforeRenderObservable.add(e),this},t.prototype.unregisterBeforeRender=function(e){return this.onBeforeRenderObservable.removeCallback(e),this},t.prototype.registerAfterRender=function(e){return this.onAfterRenderObservable.add(e),this},t.prototype.unregisterAfterRender=function(e){return this.onAfterRenderObservable.removeCallback(e),this},t.prototype._getInstancesRenderList=function(e,t){if(void 0===t&&(t=!1),this._instanceDataStorage.isFrozen){if(t)return this._instanceDataStorage.batchCacheReplacementModeInFrozenMode.hardwareInstancedRendering[e]=!1,this._instanceDataStorage.batchCacheReplacementModeInFrozenMode.renderSelf[e]=!0,this._instanceDataStorage.batchCacheReplacementModeInFrozenMode;if(this._instanceDataStorage.previousBatch)return this._instanceDataStorage.previousBatch}var n=this.getScene(),i=n._isInIntermediateRendering(),r=i?this._internalAbstractMeshDataInfo._onlyForInstancesIntermediate:this._internalAbstractMeshDataInfo._onlyForInstances,o=this._instanceDataStorage.batchCache;if(o.mustReturn=!1,o.renderSelf[e]=t||!r&&this.isEnabled()&&this.isVisible,o.visibleInstances[e]=null,this._instanceDataStorage.visibleInstances&&!t){var a=this._instanceDataStorage.visibleInstances,s=n.getRenderId(),c=i?a.intermediateDefaultRenderId:a.defaultRenderId;o.visibleInstances[e]=a[s],!o.visibleInstances[e]&&c&&(o.visibleInstances[e]=a[c])}return o.hardwareInstancedRendering[e]=!t&&this._instanceDataStorage.hardwareInstancedRendering&&null!==o.visibleInstances[e]&&void 0!==o.visibleInstances[e],this._instanceDataStorage.previousBatch=o,o},t.prototype._renderWithInstances=function(e,n,i,r,o){for(var a,s=i.visibleInstances[e._id],c=s?s.length:0,l=this._instanceDataStorage,u=l.instancesBufferSize,h=l.instancesBuffer,d=l.instancesPreviousBuffer,p=16*(c+1)*4;l.instancesBufferSizet._distanceToCamera?-1:e._distanceToCamera1&&c.activeCamera===c.activeCameras[0]||l<=1)&&this._checkOcclusionQuery()&&!this._occlusionDataStorage.forceRenderingWhenOccluded)return this;var u=this._getInstancesRenderList(e._id,!!n);if(u.mustReturn)return this;if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;var h=c.getEngine(),d=0,p=null;this.ignoreCameraMaxZ&&c.activeCamera&&!c._isInIntermediateRendering()&&(d=c.activeCamera.maxZ,p=c.activeCamera,c.activeCamera.maxZ=0,c.updateTransformMatrix(!0)),this._internalMeshDataInfo._onBeforeRenderObservable&&this._internalMeshDataInfo._onBeforeRenderObservable.notifyObservers(this);var f,m=e.getRenderingMesh(),_=u.hardwareInstancedRendering[e._id]||m.hasThinInstances||!!this._userInstancedBuffersStorage&&!e.getMesh()._internalAbstractMeshDataInfo._actAsRegularMesh,g=this._instanceDataStorage,y=e.getMaterial();if(!y)return p&&(p.maxZ=d,c.updateTransformMatrix(!0)),this;if(g.isFrozen&&this._internalMeshDataInfo._effectiveMaterial&&this._internalMeshDataInfo._effectiveMaterial===y){if(y._storeEffectOnSubMeshes&&!(null===(o=e.effect)||void 0===o?void 0:o._wasPreviouslyReady)||!y._storeEffectOnSubMeshes&&!(null===(a=y.getEffect())||void 0===a?void 0:a._wasPreviouslyReady))return p&&(p.maxZ=d,c.updateTransformMatrix(!0)),this}else{if(y._storeEffectOnSubMeshes){if(!y.isReadyForSubMesh(this,e,_))return p&&(p.maxZ=d,c.updateTransformMatrix(!0)),this}else if(!y.isReady(this,_))return p&&(p.maxZ=d,c.updateTransformMatrix(!0)),this;this._internalMeshDataInfo._effectiveMaterial=y}t&&h.setAlphaMode(this._internalMeshDataInfo._effectiveMaterial.alphaMode);for(var v=null!==(s=null==(f=this._internalMeshDataInfo._effectiveMaterial._storeEffectOnSubMeshes?e._drawWrapper:this._internalMeshDataInfo._effectiveMaterial._getDrawWrapper())?void 0:f.effect)&&void 0!==s?s:null,b=0,T=c._beforeRenderingMeshStage;bu&&i++,0!==f&&d++,h+=f,u=f}if(c[d]++,d>o&&(o=d),0===h)r++;else{var m=1/h,_=0;for(p=0;p.001&&a++}}var g=this.skeleton.bones.length,y=this.getVerticesData(Yn.MatricesIndicesKind),v=this.getVerticesData(Yn.MatricesIndicesExtraKind),b=0;for(l=0;l=g||T<0)&&b++}return{skinned:!0,valid:0===r&&0===a&&0===b,report:"Number of Weights = "+n/4+"\nMaximum influences = "+o+"\nMissing Weights = "+r+"\nNot Sorted = "+i+"\nNot Normalized = "+a+"\nWeightCounts = ["+c+"]\nNumber of bones = "+g+"\nBad Bone Indices = "+b}},t.prototype._checkDelayState=function(){var e=this.getScene();return this._geometry?this._geometry.load(e):this.delayLoadState===a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=a.DELAYLOADSTATE_LOADING,this._queueLoad(e)),this},t.prototype._queueLoad=function(e){var t=this;e.addPendingData(this);var n=-1!==this.delayLoadingFile.indexOf(".babylonbinarymeshdata");return Pn.LoadFile(this.delayLoadingFile,(function(n){n instanceof ArrayBuffer?t._delayLoadingFunction(n,t):t._delayLoadingFunction(JSON.parse(n),t),t.instances.forEach((function(e){e.refreshBoundingInfo(),e._syncSubMeshes()})),t.delayLoadState=a.DELAYLOADSTATE_LOADED,e.removePendingData(t)}),(function(){}),e.offlineProvider,n),this},t.prototype.isInFrustum=function(t){return this.delayLoadState!==a.DELAYLOADSTATE_LOADING&&!!e.prototype.isInFrustum.call(this,t)&&(this._checkDelayState(),!0)},t.prototype.setMaterialById=function(e){var t,n=this.getScene().materials;for(t=n.length-1;t>-1;t--)if(n[t].id===e)return this.material=n[t],this;var i=this.getScene().multiMaterials;for(t=i.length-1;t>-1;t--)if(i[t].id===e)return this.material=i[t],this;return this},t.prototype.getAnimatables=function(){var e=[];return this.material&&e.push(this.material),this.skeleton&&e.push(this.skeleton),e},t.prototype.bakeTransformIntoVertices=function(e){if(!this.isVerticesDataPresent(Yn.PositionKind))return this;var t=this.subMeshes.splice(0);this._resetPointsArrayCache();var n,i=this.getVerticesData(Yn.PositionKind),r=C.Zero();for(n=0;n-1&&(r.morphTargetManager=n.getMorphTargetManagerById(e.morphTargetManagerId)),void 0!==e.skeletonId&&null!==e.skeletonId&&(r.skeleton=n.getLastSkeletonById(e.skeletonId),e.numBoneInfluencers&&(r.numBoneInfluencers=e.numBoneInfluencers)),e.animations){for(var o=0;o4,u=l?this.getVerticesData(Yn.MatricesIndicesExtraKind):null,h=l?this.getVerticesData(Yn.MatricesWeightsExtraKind):null,d=e.getTransformMatrices(this),p=C.Zero(),f=new R,m=new R,_=0,g=0;g0&&(R.FromFloat32ArrayToRefScaled(d,Math.floor(16*a[_+c]),y,m),f.addToSelf(m));if(l)for(c=0;c<4;c++)(y=h[_+c])>0&&(R.FromFloat32ArrayToRefScaled(d,Math.floor(16*u[_+c]),y,m),f.addToSelf(m));C.TransformCoordinatesFromFloatsToRef(n._sourcePositions[g],n._sourcePositions[g+1],n._sourcePositions[g+2],f,p),p.toArray(r,g),t&&(C.TransformNormalFromFloatsToRef(n._sourceNormals[g],n._sourceNormals[g+1],n._sourceNormals[g+2],f,p),p.toArray(o,g)),f.reset()}return this.updateVerticesData(Yn.PositionKind,r),t&&this.updateVerticesData(Yn.NormalKind,o),this},t.MinMax=function(e){var t=null,n=null;return e.forEach((function(e){var i=e.getBoundingInfo().boundingBox;t&&n?(t.minimizeInPlace(i.minimumWorld),n.maximizeInPlace(i.maximumWorld)):(t=i.minimumWorld,n=i.maximumWorld)})),t&&n?{min:t,max:n}:{min:C.Zero(),max:C.Zero()}},t.Center=function(e){var n=e instanceof Array?t.MinMax(e):e;return C.Center(n.min,n.max)},t.MergeMeshes=function(e,n,i,r,o,a){return void 0===n&&(n=!0),sr(t._MergeMeshesCoroutine(e,n,i,r,o,a,!1))},t.MergeMeshesAsync=function(e,n,i,r,o,a){return void 0===n&&(n=!0),cr(t._MergeMeshesCoroutine(e,n,i,r,o,a,!0),or())},t._MergeMeshesCoroutine=function(e,n,i,r,o,a,s){var c,l,u,h,d,p,f,m,_,g,y,v,b,T,E,A,x,S,C,P,I,R,O,w,M,D;return void 0===n&&(n=!0),Y(this,(function(N){switch(N.label){case 0:if(0===(e=e.filter(Boolean)).length)return[2,null];if(!i)for(l=0,c=0;c=65536)return J.Warn("Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices"),[2,null];for(a&&(o=!1),u=new Array,h=new Array,d=new Array,p=e[0].overrideMaterialSideOrientation,c=0;c=0!=this._getWorldMatrixDeterminant()>=0)return this._internalAbstractMeshDataInfo._actAsRegularMesh=!0,!0;if(this._internalAbstractMeshDataInfo._actAsRegularMesh=!1,this._currentLOD._registerInstanceForRenderId(this,t),n){if(!this._currentLOD._internalAbstractMeshDataInfo._isActiveIntermediate)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!0,!0}else if(!this._currentLOD._internalAbstractMeshDataInfo._isActive)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstances=!0,!0}return!1},t.prototype._postActivate=function(){this._sourceMesh.edgesShareWithInstances&&this._sourceMesh._edgesRenderer&&this._sourceMesh._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup?(this._sourceMesh._renderingGroup._edgesRenderers.pushNoDuplicate(this._sourceMesh._edgesRenderer),this._sourceMesh._edgesRenderer.customInstances.push(this.getWorldMatrix())):this._edgesRenderer&&this._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup&&this._sourceMesh._renderingGroup._edgesRenderers.push(this._edgesRenderer)},t.prototype.getWorldMatrix=function(){if(this._currentLOD&&this._currentLOD.billboardMode!==Lr.BILLBOARDMODE_NONE&&this._currentLOD._masterMesh!==this){this._billboardWorldMatrix||(this._billboardWorldMatrix=new R);var t=this._currentLOD._masterMesh;return this._currentLOD._masterMesh=this,w.Vector3[7].copyFrom(this._currentLOD.position),this._currentLOD.position.set(0,0,0),this._billboardWorldMatrix.copyFrom(this._currentLOD.computeWorldMatrix(!0)),this._currentLOD.position.copyFrom(w.Vector3[7]),this._currentLOD._masterMesh=t,this._billboardWorldMatrix}return e.prototype.getWorldMatrix.call(this)},Object.defineProperty(t.prototype,"isAnInstance",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getLOD=function(e){if(!e)return this;var t=this.sourceMesh.getLODLevels();if(t&&0!==t.length){var n=this.getBoundingInfo();this._currentLOD=this.sourceMesh.getLOD(e,n.boundingSphere)}else this._currentLOD=this.sourceMesh;return this._currentLOD},t.prototype._preActivateForIntermediateRendering=function(e){return this.sourceMesh._preActivateForIntermediateRendering(e)},t.prototype._syncSubMeshes=function(){if(this.releaseSubMeshes(),this._sourceMesh.subMeshes)for(var e=0;e0&&-1===this.includedOnlyMeshes.indexOf(e)||this.excludedMeshes&&this.excludedMeshes.length>0&&-1!==this.excludedMeshes.indexOf(e)||0!==this.includeOnlyWithLayerMask&&0==(this.includeOnlyWithLayerMask&e.layerMask)||0!==this.excludeWithLayerMask&&this.excludeWithLayerMask&e.layerMask))},t.prototype.dispose=function(t,n){if(void 0===n&&(n=!1),this._shadowGenerators){for(var i=this._shadowGenerators.values(),r=i.next();!0!==r.done;r=i.next())r.value.dispose();this._shadowGenerators=null}if(this.getScene().stopAnimation(this),this._parentContainer){var o=this._parentContainer.lights.indexOf(this);o>-1&&this._parentContainer.lights.splice(o,1),this._parentContainer=null}for(var a=0,s=this.getScene().meshes;a0&&(e.excludedMeshesIds=[],this.excludedMeshes.forEach((function(t){e.excludedMeshesIds.push(t.id)}))),this.includedOnlyMeshes.length>0&&(e.includedOnlyMeshesIds=[],this.includedOnlyMeshes.forEach((function(t){e.includedOnlyMeshesIds.push(t.id)}))),ke.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e.isEnabled=this.isEnabled(),e},t.GetConstructorFromName=function(e,t,n){return He.Construct("Light_Type_"+e,t,n)||null},t.Parse=function(e,n){var i=t.GetConstructorFromName(e.type,e.name,n);if(!i)return null;var r=ke.Parse(i,e,n);if(e.excludedMeshesIds&&(r._excludedMeshesIds=e.excludedMeshesIds),e.includedOnlyMeshesIds&&(r._includedOnlyMeshesIds=e.includedOnlyMeshesIds),void 0!==e.parentId&&(r._waitingParentId=e.parentId),void 0!==e.parentInstanceIndex&&(r._waitingParentInstanceIndex=e.parentInstanceIndex),void 0!==e.falloffType&&(r.falloffType=e.falloffType),void 0!==e.lightmapMode&&(r.lightmapMode=e.lightmapMode),e.animations){for(var o=0;o0;){var E=T.shift();g.push(E);for(var A=o.dependedBy.get(E.uniqueId),x=0,S=Array.from(A.values());x0&&(J.Error("SceneSerializer._topologicalSort: There were unvisited nodes:"),t.forEach((function(e){return J.Error(e.name)}))),g},t.prototype._addNodeAndDescendantsToList=function(e,t,n,i){if(n&&(!i||i(n))&&!t.has(n.uniqueId)){e.push(n),t.add(n.uniqueId);for(var r=0,o=n.getDescendants(!0);r-1&&t.animations.splice(o,1)}},r=0,o=e.animations;r0;){var i=t.pop();if(i instanceof no?(i.geometry&&-1===this.geometries.indexOf(i.geometry)&&this.geometries.push(i.geometry),this.meshes.push(i)):i instanceof Lr?this.transformNodes.push(i):i instanceof ro?this.lights.push(i):i instanceof dr&&this.cameras.push(i),i instanceof kr){if(i.material&&-1===this.materials.indexOf(i.material)){this.materials.push(i.material);for(var r=0,o=i.material.getActiveTextures();r0&&(m=!0,this._soundLoaded(n));break;case"AudioBuffer":this._audioBufferLoaded(n);break;case"String":f.push(n);case"Array":0===f.length&&(f=n);for(var _=function(e){var t=f[e];if(m=o&&o.skipCodecCheck||-1!==t.indexOf(".mp3",t.length-4)&&Dr.audioEngine.isMP3supported||-1!==t.indexOf(".ogg",t.length-4)&&Dr.audioEngine.isOGGsupported||-1!==t.indexOf(".wav",t.length-4)||-1!==t.indexOf(".m4a",t.length-4)||-1!==t.indexOf(".mp4",t.length-4)||-1!==t.indexOf("blob:"))return g._streaming?(g._htmlAudioElement=new Audio(t),g._htmlAudioElement.controls=!1,g._htmlAudioElement.loop=g.loop,Pn.SetCorsBehavior(t,g._htmlAudioElement),g._htmlAudioElement.preload="auto",g._htmlAudioElement.addEventListener("canplaythrough",(function(){d._isReadyToPlay=!0,d.autoplay&&d.play(0,d._offset,d._length),d._readyToPlayCallback&&d._readyToPlayCallback()})),document.body.appendChild(g._htmlAudioElement),g._htmlAudioElement.load()):g._scene._loadFile(t,(function(e){d._soundLoaded(e)}),void 0,!0,!0,(function(e){e&&J.Error("XHR "+e.status+" error on: "+t+"."),J.Error("Sound creation aborted."),d._scene.mainSoundTrack.removeSound(d)})),"break"},g=this,y=0;y0&&(this._htmlAudioElement.currentTime=0)):this._streamingSource.disconnect(),this.isPlaying=!1;else if((null===(t=Dr.audioEngine)||void 0===t?void 0:t.audioContext)&&this._soundSource){var i=e?Dr.audioEngine.audioContext.currentTime+e:void 0;this._soundSource.onended=function(){n.isPlaying=!1,n.isPaused=!1,n._startTime=0,n._currentTime=0,n._soundSource&&(n._soundSource.onended=function(){}),n._onended()},this._soundSource.stop(i)}else this.isPlaying=!1;else this.isPaused&&(this.isPaused=!1,this._startTime=0,this._currentTime=0)},e.prototype.pause=function(){var e;this.isPlaying&&(this._clearTimeoutsAndObservers(),this._streaming?(this._htmlAudioElement?this._htmlAudioElement.pause():this._streamingSource.disconnect(),this.isPlaying=!1,this.isPaused=!0):(null===(e=Dr.audioEngine)||void 0===e?void 0:e.audioContext)&&this._soundSource&&(this._soundSource.onended=function(){},this._soundSource.stop(),this.isPlaying=!1,this.isPaused=!0,this._currentTime+=Dr.audioEngine.audioContext.currentTime-this._startTime))},e.prototype.setVolume=function(e,t){var n;(null===(n=Dr.audioEngine)||void 0===n?void 0:n.canUseWebAudio)&&this._soundGain&&(t&&Dr.audioEngine.audioContext?(this._soundGain.gain.cancelScheduledValues(Dr.audioEngine.audioContext.currentTime),this._soundGain.gain.setValueAtTime(this._soundGain.gain.value,Dr.audioEngine.audioContext.currentTime),this._soundGain.gain.linearRampToValueAtTime(e,Dr.audioEngine.audioContext.currentTime+t)):this._soundGain.gain.value=e),this._volume=e},e.prototype.setPlaybackRate=function(e){this._playbackRate=e,this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate))},e.prototype.getPlaybackRate=function(){return this._playbackRate},e.prototype.getVolume=function(){return this._volume},e.prototype.attachToMesh=function(e){var t=this;this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null),this._connectedTransformNode=e,this._spatialSound||(this._spatialSound=!0,this._createSpatialParameters(),this.isPlaying&&this.loop&&(this.stop(),this.play(0,this._offset,this._length))),this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode),this._registerFunc=function(e){return t._onRegisterAfterWorldMatrixUpdate(e)},this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc)},e.prototype.detachFromMesh=function(){this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null,this._connectedTransformNode=null)},e.prototype._onRegisterAfterWorldMatrixUpdate=function(e){var t;if(e.getBoundingInfo){var n=e.getBoundingInfo();this.setPosition(n.boundingSphere.centerWorld)}else this.setPosition(e.absolutePosition);(null===(t=Dr.audioEngine)||void 0===t?void 0:t.canUseWebAudio)&&this._isDirectional&&this.isPlaying&&this._updateDirection()},e.prototype.clone=function(){var t=this;if(this._streaming)return null;var n=function(){t._isReadyToPlay?(r._audioBuffer=t.getAudioBuffer(),r._isReadyToPlay=!0,r.autoplay&&r.play(0,t._offset,t._length)):setTimeout(n,300)},i={autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this._spatialSound,maxDistance:this.maxDistance,useCustomAttenuation:this.useCustomAttenuation,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel},r=new e(this.name+"_cloned",new ArrayBuffer(0),this._scene,null,i);return this.useCustomAttenuation&&r.setAttenuationFunction(this._customAttenuationFunction),r.setPosition(this._position),r.setPlaybackRate(this._playbackRate),n(),r},e.prototype.getAudioBuffer=function(){return this._audioBuffer},e.prototype.getSoundSource=function(){return this._soundSource},e.prototype.getSoundGain=function(){return this._soundGain},e.prototype.serialize=function(){var e={name:this.name,url:this._url,autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this._spatialSound,maxDistance:this.maxDistance,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel,playbackRate:this._playbackRate,panningModel:this._panningModel,soundTrackId:this.soundTrackId,metadata:this.metadata};return this._spatialSound&&(this._connectedTransformNode&&(e.connectedMeshId=this._connectedTransformNode.id),e.position=this._position.asArray(),e.refDistance=this.refDistance,e.distanceModel=this.distanceModel,e.isDirectional=this._isDirectional,e.localDirectionToMesh=this._localDirection.asArray(),e.coneInnerAngle=this._coneInnerAngle,e.coneOuterAngle=this._coneOuterAngle,e.coneOuterGain=this._coneOuterGain),e},e.Parse=function(t,n,i,r){var o,a=t.name;o=t.url?i+t.url:i+a;var s,c={autoplay:t.autoplay,loop:t.loop,volume:t.volume,spatialSound:t.spatialSound,maxDistance:t.maxDistance,rolloffFactor:t.rolloffFactor,refDistance:t.refDistance,distanceModel:t.distanceModel,playbackRate:t.playbackRate};if(r){var l=function(){r._isReadyToPlay?(s._audioBuffer=r.getAudioBuffer(),s._isReadyToPlay=!0,s.autoplay&&s.play(0,s._offset,s._length)):setTimeout(l,300)};s=new e(a,new ArrayBuffer(0),n,null,c),l()}else s=new e(a,o,n,(function(){n.removePendingData(s)}),c),n.addPendingData(s);if(t.position){var u=C.FromArray(t.position);s.setPosition(u)}if(t.isDirectional&&(s.setDirectionalCone(t.coneInnerAngle||360,t.coneOuterAngle||360,t.coneOuterGain||0),t.localDirectionToMesh)){var h=C.FromArray(t.localDirectionToMesh);s.setLocalDirectionToMesh(h)}if(t.connectedMeshId){var d=n.getMeshById(t.connectedMeshId);d&&s.attachToMesh(d)}return t.metadata&&(s.metadata=t.metadata),s},e.prototype._setOffset=function(e){this._offset!==e&&(this.isPaused&&(this.stop(),this.isPaused=!1),this._offset=e)},e.prototype._clearTimeoutsAndObservers=function(){var e;this._tryToPlayTimeout&&(clearTimeout(this._tryToPlayTimeout),this._tryToPlayTimeout=null),this._audioUnlockedObserver&&(null===(e=Dr.audioEngine)||void 0===e||e.onAudioUnlockedObservable.remove(this._audioUnlockedObserver),this._audioUnlockedObserver=null)},e._SceneComponentInitialization=function(e){throw ye("AudioSceneComponent")},e}(),ho=function(){function e(e,t){void 0===t&&(t={}),this.id=-1,this._isInitialized=!1,(e=e||A.LastCreatedScene)&&(this._scene=e,this.soundCollection=[],this._options=t,!this._options.mainTrack&&this._scene.soundTracks&&(this._scene.soundTracks.push(this),this.id=this._scene.soundTracks.length-1))}return e.prototype._initializeSoundTrackAudioGraph=function(){var e;(null===(e=Dr.audioEngine)||void 0===e?void 0:e.canUseWebAudio)&&Dr.audioEngine.audioContext&&(this._outputAudioNode=Dr.audioEngine.audioContext.createGain(),this._outputAudioNode.connect(Dr.audioEngine.masterGain),this._options&&this._options.volume&&(this._outputAudioNode.gain.value=this._options.volume),this._isInitialized=!0)},e.prototype.dispose=function(){if(Dr.audioEngine&&Dr.audioEngine.canUseWebAudio){for(this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas();this.soundCollection.length;)this.soundCollection[0].dispose();this._outputAudioNode&&this._outputAudioNode.disconnect(),this._outputAudioNode=null}},e.prototype.addSound=function(e){var t;this._isInitialized||this._initializeSoundTrackAudioGraph(),(null===(t=Dr.audioEngine)||void 0===t?void 0:t.canUseWebAudio)&&this._outputAudioNode&&e.connectToSoundTrackAudioNode(this._outputAudioNode),void 0!==e.soundTrackId&&(-1===e.soundTrackId?this._scene.mainSoundTrack.removeSound(e):this._scene.soundTracks&&this._scene.soundTracks[e.soundTrackId].removeSound(e)),this.soundCollection.push(e),e.soundTrackId=this.id},e.prototype.removeSound=function(e){var t=this.soundCollection.indexOf(e);-1!==t&&this.soundCollection.splice(t,1)},e.prototype.setVolume=function(e){var t;(null===(t=Dr.audioEngine)||void 0===t?void 0:t.canUseWebAudio)&&this._outputAudioNode&&(this._outputAudioNode.gain.value=e)},e.prototype.switchPanningModelToHRTF=function(){var e;if(null===(e=Dr.audioEngine)||void 0===e?void 0:e.canUseWebAudio)for(var t=0;t0&&(r=n.activeCameras[0]),this.audioListenerPositionProvider){var o=this.audioListenerPositionProvider();i.audioContext.listener.setPosition(o.x||0,o.y||0,o.z||0)}else r?this._cachedCameraPosition.equals(r.globalPosition)||(this._cachedCameraPosition.copyFrom(r.globalPosition),i.audioContext.listener.setPosition(r.globalPosition.x,r.globalPosition.y,r.globalPosition.z)):i.audioContext.listener.setPosition(0,0,0);if(this.audioListenerRotationProvider){var a=this.audioListenerRotationProvider();i.audioContext.listener.setOrientation(a.x||0,a.y||0,a.z||0,0,1,0)}else r?(r.rigCameras&&r.rigCameras.length>0&&(r=r.rigCameras[0]),r.getViewMatrix().invertToRef(this._invertMatrixTemp),C.TransformNormalToRef(e._CameraDirection,this._invertMatrixTemp,this._cameraDirectionTemp),this._cameraDirectionTemp.normalize(),isNaN(this._cameraDirectionTemp.x)||isNaN(this._cameraDirectionTemp.y)||isNaN(this._cameraDirectionTemp.z)||this._cachedCameraDirection.equals(this._cameraDirectionTemp)||(this._cachedCameraDirection.copyFrom(this._cameraDirectionTemp),i.audioContext.listener.setOrientation(this._cameraDirectionTemp.x,this._cameraDirectionTemp.y,this._cameraDirectionTemp.z,0,1,0))):i.audioContext.listener.setOrientation(0,0,0,0,1,0);var s=void 0;for(s=0;s0?1/r:0,c=0;c=0&&this._scene.textures.splice(t,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null,this._parentContainer){var n=this._parentContainer.textures.indexOf(this);n>-1&&this._parentContainer.textures.splice(n,1),this._parentContainer=null}}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.metadata=null,e.prototype.dispose.call(this)},t.prototype.serialize=function(e){if(void 0===e&&(e=!1),!this.name&&!e)return null;var t=ke.Serialize(this);return ke.AppendSerializedAnimations(this,t),t},t.WhenAllReady=function(e,t){var n=e.length;if(0!==n)for(var i=0;i=0;){var s=e[o];s<0?s=0:s>1&&(s=1),a[o]=255*s}e=a}var c=document.createElement("canvas");c.width=i,c.height=r;var l=c.getContext("2d");if(!l)return null;var u=l.createImageData(i,r);if(u.data.set(e),l.putImageData(u,0,0),n){var h=document.createElement("canvas");h.width=i,h.height=r;var d=h.getContext("2d");return d?(d.translate(0,r),d.scale(1,-1),d.drawImage(c,0,0),h.toDataURL("image/png")):null}return c.toDataURL("image/png")}function vo(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0);var i=e.getInternalTexture();if(!i)return null;var r=e._readPixelsSync(t,n);return r?yo(r,e.getSize(),i.invertY):null}function bo(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),X(this,void 0,void 0,(function(){var i,r;return Y(this,(function(o){switch(o.label){case 0:return(i=e.getInternalTexture())?[4,e.readPixels(t,n)]:[2,null];case 1:return(r=o.sent())?[2,yo(r,e.getSize(),i.invertY)]:[2,null]}}))}))}var To={GenerateBase64StringFromPixelData:yo,GenerateBase64StringFromTexture:vo,GenerateBase64StringFromTextureAsync:bo},Eo=function(e){function t(n,i,r,o,s,c,l,h,d,p,f,m,_,g){void 0===s&&(s=t.TRILINEAR_SAMPLINGMODE),void 0===c&&(c=null),void 0===l&&(l=null),void 0===h&&(h=null),void 0===d&&(d=!1);var y,v,b,T,E,A,x,S,C,P,I,R=this;(R=e.call(this,i)||this).url=null,R.uOffset=0,R.vOffset=0,R.uScale=1,R.vScale=1,R.uAng=0,R.vAng=0,R.wAng=0,R.uRotationCenter=.5,R.vRotationCenter=.5,R.wRotationCenter=.5,R.homogeneousRotationInUVTransform=!1,R.inspectableCustomProperties=null,R._noMipmap=!1,R._invertY=!1,R._rowGenerationMatrix=null,R._cachedTextureMatrix=null,R._projectionModeMatrix=null,R._t0=null,R._t1=null,R._t2=null,R._cachedUOffset=-1,R._cachedVOffset=-1,R._cachedUScale=0,R._cachedVScale=0,R._cachedUAng=-1,R._cachedVAng=-1,R._cachedWAng=-1,R._cachedReflectionProjectionMatrixId=-1,R._cachedURotationCenter=-1,R._cachedVRotationCenter=-1,R._cachedWRotationCenter=-1,R._cachedHomogeneousRotationInUVTransform=!1,R._cachedReflectionTextureMatrix=null,R._cachedReflectionUOffset=-1,R._cachedReflectionVOffset=-1,R._cachedReflectionUScale=0,R._cachedReflectionVScale=0,R._cachedReflectionCoordinatesMode=-1,R._buffer=null,R._deleteBuffer=!1,R._format=null,R._delayedOnLoad=null,R._delayedOnError=null,R.onLoadObservable=new u,R._isBlocking=!0,R.name=n||"",R.url=n;var O=!1,w=null,M=!0;"object"==typeof r&&null!==r?(I=null!==(y=r.noMipmap)&&void 0!==y&&y,o=null!==(v=r.invertY)&&void 0!==v?v:!Ir.UseOpenGLOrientationForUV,s=null!==(b=r.samplingMode)&&void 0!==b?b:t.TRILINEAR_SAMPLINGMODE,c=null!==(T=r.onLoad)&&void 0!==T?T:null,l=null!==(E=r.onError)&&void 0!==E?E:null,h=null!==(A=r.buffer)&&void 0!==A?A:null,d=null!==(x=r.deleteBuffer)&&void 0!==x&&x,p=r.format,f=r.mimeType,m=r.loaderOptions,_=r.creationFlags,O=null!==(S=r.useSRGBBuffer)&&void 0!==S&&S,w=null!==(C=r.internalTexture)&&void 0!==C?C:null,M=null!==(P=r.gammaSpace)&&void 0!==P?P:M):I=!!r,R._gammaSpace=M,R._noMipmap=I,R._invertY=void 0===o?!Ir.UseOpenGLOrientationForUV:o,R._initialSamplingMode=s,R._buffer=h,R._deleteBuffer=d,R._mimeType=f,R._loaderOptions=m,R._creationFlags=_,R._useSRGBBuffer=O,R._forcedExtension=g,p&&(R._format=p);var D=R.getScene(),N=R._getEngine();if(!N)return R;N.onBeforeTextureInitObservable.notifyObservers(R);var L=function(){R._texture&&(R._texture._invertVScale&&(R.vScale*=-1,R.vOffset+=1),null!==R._texture._cachedWrapU&&(R.wrapU=R._texture._cachedWrapU,R._texture._cachedWrapU=null),null!==R._texture._cachedWrapV&&(R.wrapV=R._texture._cachedWrapV,R._texture._cachedWrapV=null),null!==R._texture._cachedWrapR&&(R.wrapR=R._texture._cachedWrapR,R._texture._cachedWrapR=null)),R.onLoadObservable.hasObservers()&&R.onLoadObservable.notifyObservers(R),c&&c(),!R.isBlocking&&D&&D.resetCachedMaterial()},F=function(e,n){R._loadingError=!0,R._errorObject={message:e,exception:n},l&&l(e,n),t.OnTextureLoadErrorObservable.notifyObservers(R)};if(!R.url&&!w)return R._delayedOnLoad=L,R._delayedOnError=F,R;if(R._texture=null!=w?w:R._getFromCache(R.url,I,s,R._invertY,O,R.isCube),R._texture)if(R._texture.isReady)on.SetImmediate((function(){return L()}));else{var B=R._texture.onLoadedObservable.add(L);R._texture.onErrorObservable.add((function(e){var t;F(e.message,e.exception),null===(t=R._texture)||void 0===t||t.onLoadedObservable.remove(B)}))}else if(D&&D.useDelayedTextureLoading)R.delayLoadState=a.DELAYLOADSTATE_NOTLOADED,R._delayedOnLoad=L,R._delayedOnError=F;else{try{R._texture=N.createTexture(R.url,I,R._invertY,D,s,L,F,R._buffer,void 0,R._format,R._forcedExtension,f,m,_,O)}catch(e){throw F("error loading",e),e}d&&(R._buffer=null)}return R}return H(t,e),t._CreateVideoTexture=function(e,n,i,r,o,s,c,l,u){throw void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===s&&(s=t.TRILINEAR_SAMPLINGMODE),void 0===c&&(c={}),void 0===u&&(u=a.TEXTUREFORMAT_RGBA),ye("VideoTexture")},Object.defineProperty(t.prototype,"noMipmap",{get:function(){return this._noMipmap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mimeType",{get:function(){return this._mimeType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isBlocking",{get:function(){return this._isBlocking},set:function(e){this._isBlocking=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"invertY",{get:function(){return this._invertY},enumerable:!1,configurable:!0}),t.prototype.updateURL=function(e,t,n,i){var r=this;void 0===t&&(t=null),this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(r)}))),this.name&&!this.name.startsWith("data:")||(this.name=e),this.url=e,this._buffer=t,this._forcedExtension=i,this.delayLoadState=a.DELAYLOADSTATE_NOTLOADED,n&&(this._delayedOnLoad=n),this.delayLoad()},t.prototype.delayLoad=function(){if(this.delayLoadState===a.DELAYLOADSTATE_NOTLOADED){var e=this.getScene();e&&(this.delayLoadState=a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap,this.samplingMode,this._invertY,this._useSRGBBuffer,this.isCube),this._texture?this._delayedOnLoad&&(this._texture.isReady?on.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(this.url,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format,this._forcedExtension,this._mimeType,this._loaderOptions,this._creationFlags,this._useSRGBBuffer),this._deleteBuffer&&(this._buffer=null)),this._delayedOnLoad=null,this._delayedOnError=null)}},t.prototype._prepareRowForTextureGeneration=function(e,t,n,i){e*=this._cachedUScale,t*=this._cachedVScale,e-=this.uRotationCenter*this._cachedUScale,t-=this.vRotationCenter*this._cachedVScale,n-=this.wRotationCenter,C.TransformCoordinatesFromFloatsToRef(e,t,n,this._rowGenerationMatrix,i),i.x+=this.uRotationCenter*this._cachedUScale+this._cachedUOffset,i.y+=this.vRotationCenter*this._cachedVScale+this._cachedVOffset,i.z+=this.wRotationCenter},t.prototype.checkTransformsAreIdentical=function(e){return null!==e&&this.uOffset===e.uOffset&&this.vOffset===e.vOffset&&this.uScale===e.uScale&&this.vScale===e.vScale&&this.uAng===e.uAng&&this.vAng===e.vAng&&this.wAng===e.wAng},t.prototype.getTextureMatrix=function(e){var t=this;if(void 0===e&&(e=1),this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale*e===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng&&this.uRotationCenter===this._cachedURotationCenter&&this.vRotationCenter===this._cachedVRotationCenter&&this.wRotationCenter===this._cachedWRotationCenter&&this.homogeneousRotationInUVTransform===this._cachedHomogeneousRotationInUVTransform)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale*e,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedURotationCenter=this.uRotationCenter,this._cachedVRotationCenter=this.vRotationCenter,this._cachedWRotationCenter=this.wRotationCenter,this._cachedHomogeneousRotationInUVTransform=this.homogeneousRotationInUVTransform,this._cachedTextureMatrix&&this._rowGenerationMatrix||(this._cachedTextureMatrix=R.Zero(),this._rowGenerationMatrix=new R,this._t0=C.Zero(),this._t1=C.Zero(),this._t2=C.Zero()),R.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this.homogeneousRotationInUVTransform?(R.TranslationToRef(-this._cachedURotationCenter,-this._cachedVRotationCenter,-this._cachedWRotationCenter,w.Matrix[0]),R.TranslationToRef(this._cachedURotationCenter,this._cachedVRotationCenter,this._cachedWRotationCenter,w.Matrix[1]),R.ScalingToRef(this._cachedUScale,this._cachedVScale,0,w.Matrix[2]),R.TranslationToRef(this._cachedUOffset,this._cachedVOffset,0,w.Matrix[3]),w.Matrix[0].multiplyToRef(this._rowGenerationMatrix,this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(w.Matrix[1],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(w.Matrix[2],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(w.Matrix[3],this._cachedTextureMatrix),this._cachedTextureMatrix.setRowFromFloats(2,this._cachedTextureMatrix.m[12],this._cachedTextureMatrix.m[13],this._cachedTextureMatrix.m[14],1)):(this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),R.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix));var n=this.getScene();return n?(this.optimizeUVAllocation&&n.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})),this._cachedTextureMatrix):this._cachedTextureMatrix},t.prototype.getReflectionTextureMatrix=function(){var e=this,n=this.getScene();if(!n)return this._cachedReflectionTextureMatrix;if(this.uOffset===this._cachedReflectionUOffset&&this.vOffset===this._cachedReflectionVOffset&&this.uScale===this._cachedReflectionUScale&&this.vScale===this._cachedReflectionVScale&&this.coordinatesMode===this._cachedReflectionCoordinatesMode){if(this.coordinatesMode!==t.PROJECTION_MODE)return this._cachedReflectionTextureMatrix;if(this._cachedReflectionProjectionMatrixId===n.getProjectionMatrix().updateFlag)return this._cachedReflectionTextureMatrix}this._cachedReflectionTextureMatrix||(this._cachedReflectionTextureMatrix=R.Zero()),this._projectionModeMatrix||(this._projectionModeMatrix=R.Zero());var i=this._cachedReflectionCoordinatesMode!==this.coordinatesMode;switch(this._cachedReflectionUOffset=this.uOffset,this._cachedReflectionVOffset=this.vOffset,this._cachedReflectionUScale=this.uScale,this._cachedReflectionVScale=this.vScale,this._cachedReflectionCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case t.PLANAR_MODE:R.IdentityToRef(this._cachedReflectionTextureMatrix),this._cachedReflectionTextureMatrix[0]=this.uScale,this._cachedReflectionTextureMatrix[5]=this.vScale,this._cachedReflectionTextureMatrix[12]=this.uOffset,this._cachedReflectionTextureMatrix[13]=this.vOffset;break;case t.PROJECTION_MODE:R.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);var r=n.getProjectionMatrix();this._cachedReflectionProjectionMatrixId=r.updateFlag,r.multiplyToRef(this._projectionModeMatrix,this._cachedReflectionTextureMatrix);break;default:R.IdentityToRef(this._cachedReflectionTextureMatrix)}return i&&n.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(t){return t.hasTexture(e)})),this._cachedReflectionTextureMatrix},t.prototype.clone=function(){var e=this,n={noMipmap:this._noMipmap,invertY:this._invertY,samplingMode:this.samplingMode,onLoad:void 0,onError:void 0,buffer:this._texture?this._texture._buffer:void 0,deleteBuffer:this._deleteBuffer,format:this.textureFormat,mimeType:this.mimeType,loaderOptions:this._loaderOptions,creationFlags:this._creationFlags,useSRGBBuffer:this._useSRGBBuffer};return ke.Clone((function(){return new t(e._texture?e._texture.url:null,e.getScene(),n)}),this)},t.prototype.serialize=function(){var n,i,r=this.name;t.SerializeBuffers||this.name.startsWith("data:")&&(this.name=""),this.name.startsWith("data:")&&this.url===this.name&&(this.url="");var o=e.prototype.serialize.call(this,t._SerializeInternalTextureUniqueId);return o?((t.SerializeBuffers||t.ForceSerializeBuffers)&&("string"==typeof this._buffer&&"data:"===this._buffer.substr(0,5)?(o.base64String=this._buffer,o.name=o.name.replace("data:","")):this.url&&this.url.startsWith("data:")&&this._buffer instanceof Uint8Array?o.base64String="data:image/png;base64,"+gt(this._buffer):(t.ForceSerializeBuffers||this.url&&this.url.startsWith("blob:")||this._forceSerialize)&&(o.base64String=!this._engine||this._engine._features.supportSyncTextureRead?vo(this):bo(this))),o.invertY=this._invertY,o.samplingMode=this.samplingMode,o._creationFlags=this._creationFlags,o._useSRGBBuffer=this._useSRGBBuffer,t._SerializeInternalTextureUniqueId&&(o.internalTextureUniqueId=null!==(i=null===(n=this._texture)||void 0===n?void 0:n.uniqueId)&&void 0!==i?i:void 0),o.noMipmap=this._noMipmap,this.name=r,o):null},t.prototype.getClassName=function(){return"Texture"},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null,this._buffer=null},t.Parse=function(e,n,i){if(e.customType){var r=xn.Instantiate(e.customType).Parse(e,n,i);return e.samplingMode&&r.updateSamplingMode&&r._samplingMode&&r._samplingMode!==e.samplingMode&&r.updateSamplingMode(e.samplingMode),r}if(e.isCube&&!e.isRenderTarget)return t._CubeTextureParser(e,n,i);var o,a=void 0!==e.internalTextureUniqueId;if(!e.name&&!e.isRenderTarget&&!a)return null;if(a)for(var s=0,c=n.getEngine().getLoadedTexturesCache();s0||e.name.startsWith("data:"))?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||t.UseSerializedUrlIfAny)&&(_=e.url);var g={noMipmap:!l,invertY:e.invertY,samplingMode:e.samplingMode,onLoad:function(){u(c)},internalTexture:o};c=new t(_,n,g)}return c}),e,n);return h},t.CreateFromBase64String=function(e,n,i,r,o,s,c,l,u,h){return void 0===s&&(s=t.TRILINEAR_SAMPLINGMODE),void 0===c&&(c=null),void 0===l&&(l=null),void 0===u&&(u=a.TEXTUREFORMAT_RGBA),new t("data:"+n,i,r,o,s,c,l,e,!1,u,void 0,void 0,h)},t.LoadFromDataString=function(e,n,i,r,o,s,c,l,u,h,d){return void 0===r&&(r=!1),void 0===s&&(s=!0),void 0===c&&(c=t.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=null),void 0===u&&(u=null),void 0===h&&(h=a.TEXTUREFORMAT_RGBA),"data:"!==e.substr(0,5)&&(e="data:"+e),new t(e,i,o,s,c,l,u,n,r,h,void 0,void 0,d)},t.SerializeBuffers=!0,t.ForceSerializeBuffers=!1,t.OnTextureLoadErrorObservable=new u,t._SerializeInternalTextureUniqueId=!1,t._CubeTextureParser=function(e,t,n){throw ye("CubeTexture")},t._CreateMirror=function(e,t,n,i){throw ye("MirrorTexture")},t._CreateRenderTargetTexture=function(e,t,n,i,r){throw ye("RenderTargetTexture")},t.NEAREST_SAMPLINGMODE=a.TEXTURE_NEAREST_SAMPLINGMODE,t.NEAREST_NEAREST_MIPLINEAR=a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,t.BILINEAR_SAMPLINGMODE=a.TEXTURE_BILINEAR_SAMPLINGMODE,t.LINEAR_LINEAR_MIPNEAREST=a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,t.TRILINEAR_SAMPLINGMODE=a.TEXTURE_TRILINEAR_SAMPLINGMODE,t.LINEAR_LINEAR_MIPLINEAR=a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,t.NEAREST_NEAREST_MIPNEAREST=a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,t.NEAREST_LINEAR_MIPNEAREST=a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,t.NEAREST_LINEAR_MIPLINEAR=a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,t.NEAREST_LINEAR=a.TEXTURE_NEAREST_LINEAR,t.NEAREST_NEAREST=a.TEXTURE_NEAREST_NEAREST,t.LINEAR_NEAREST_MIPNEAREST=a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,t.LINEAR_NEAREST_MIPLINEAR=a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,t.LINEAR_LINEAR=a.TEXTURE_LINEAR_LINEAR,t.LINEAR_NEAREST=a.TEXTURE_LINEAR_NEAREST,t.EXPLICIT_MODE=a.TEXTURE_EXPLICIT_MODE,t.SPHERICAL_MODE=a.TEXTURE_SPHERICAL_MODE,t.PLANAR_MODE=a.TEXTURE_PLANAR_MODE,t.CUBIC_MODE=a.TEXTURE_CUBIC_MODE,t.PROJECTION_MODE=a.TEXTURE_PROJECTION_MODE,t.SKYBOX_MODE=a.TEXTURE_SKYBOX_MODE,t.INVCUBIC_MODE=a.TEXTURE_INVCUBIC_MODE,t.EQUIRECTANGULAR_MODE=a.TEXTURE_EQUIRECTANGULAR_MODE,t.FIXED_EQUIRECTANGULAR_MODE=a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,t.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,t.CLAMP_ADDRESSMODE=a.TEXTURE_CLAMP_ADDRESSMODE,t.WRAP_ADDRESSMODE=a.TEXTURE_WRAP_ADDRESSMODE,t.MIRROR_ADDRESSMODE=a.TEXTURE_MIRROR_ADDRESSMODE,t.UseSerializedUrlIfAny=!1,W([Se()],t.prototype,"url",void 0),W([Se()],t.prototype,"uOffset",void 0),W([Se()],t.prototype,"vOffset",void 0),W([Se()],t.prototype,"uScale",void 0),W([Se()],t.prototype,"vScale",void 0),W([Se()],t.prototype,"uAng",void 0),W([Se()],t.prototype,"vAng",void 0),W([Se()],t.prototype,"wAng",void 0),W([Se()],t.prototype,"uRotationCenter",void 0),W([Se()],t.prototype,"vRotationCenter",void 0),W([Se()],t.prototype,"wRotationCenter",void 0),W([Se()],t.prototype,"homogeneousRotationInUVTransform",void 0),W([Se()],t.prototype,"isBlocking",null),t}(go);function Ao(e,t,n,i){var r,o=1;i===a.TEXTURETYPE_FLOAT?r=new Float32Array(t*n*4):i===a.TEXTURETYPE_HALF_FLOAT?(r=new Uint16Array(t*n*4),o=15360):r=i===a.TEXTURETYPE_UNSIGNED_INTEGER?new Uint32Array(t*n*4):new Uint8Array(t*n*4);for(var s=0;s>y,b=0;b<6;b++){var T=g[y][b];_&&(T=Ao(T,v,v,r)),f.texImage2D(b,y,h,v,v,0,u,a,T)}p._bindTextureDirectly(f.TEXTURE_CUBE_MAP,null)}else p.updateRawCubeTexture(m,o,i,r,d);m.isReady=!0,null==t||t.removePendingData(m),m.onLoadedObservable.notifyObservers(m),m.onLoadedObservable.clear(),l&&l()}}(e)}),void 0,null==t?void 0:t.offlineProvider,!0,(function(e,n){null==t||t.removePendingData(m),u&&e&&u(e.status+" "+e.statusText,n)})),m},rn.prototype.createRawTexture2DArray=xo(!1),rn.prototype.createRawTexture3D=xo(!0),rn.prototype.updateRawTexture2DArray=So(!1),rn.prototype.updateRawTexture3D=So(!0);var Co=function(e){function t(t,n,i,r,o,s,c,l,u,h,d){void 0===s&&(s=!0),void 0===c&&(c=!1),void 0===l&&(l=a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===u&&(u=a.TEXTURETYPE_UNSIGNED_INT);var p=e.call(this,null,o,!s,c,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,h)||this;return p.format=r,p._engine?(p._engine._caps.textureFloatLinearFiltering||u!==a.TEXTURETYPE_FLOAT||(l=a.TEXTURE_NEAREST_SAMPLINGMODE),p._engine._caps.textureHalfFloatLinearFiltering||u!==a.TEXTURETYPE_HALF_FLOAT||(l=a.TEXTURE_NEAREST_SAMPLINGMODE),p._texture=p._engine.createRawTexture(t,n,i,r,s,c,l,null,u,null!=h?h:0,null!=d&&d),p.wrapU=Eo.CLAMP_ADDRESSMODE,p.wrapV=Eo.CLAMP_ADDRESSMODE,p):p}return H(t,e),t.prototype.update=function(e){this._getEngine().updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type,this._texture._useSRGBBuffer)},t.CreateLuminanceTexture=function(e,n,i,r,o,s,c){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===c&&(c=a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,n,i,a.TEXTUREFORMAT_LUMINANCE,r,o,s,c)},t.CreateLuminanceAlphaTexture=function(e,n,i,r,o,s,c){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===c&&(c=a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,n,i,a.TEXTUREFORMAT_LUMINANCE_ALPHA,r,o,s,c)},t.CreateAlphaTexture=function(e,n,i,r,o,s,c){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===c&&(c=a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,n,i,a.TEXTUREFORMAT_ALPHA,r,o,s,c)},t.CreateRGBTexture=function(e,n,i,r,o,s,c,l,u,h){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===c&&(c=a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===l&&(l=a.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=0),void 0===h&&(h=!1),new t(e,n,i,a.TEXTUREFORMAT_RGB,r,o,s,c,l,u,h)},t.CreateRGBATexture=function(e,n,i,r,o,s,c,l,u,h){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===c&&(c=a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===l&&(l=a.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=0),void 0===h&&(h=!1),new t(e,n,i,a.TEXTUREFORMAT_RGBA,r,o,s,c,l,u,h)},t.CreateRGBAStorageTexture=function(e,n,i,r,o,s,c,l,u){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===c&&(c=a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===l&&(l=a.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=!1),new t(e,n,i,a.TEXTUREFORMAT_RGBA,r,o,s,c,l,a.TEXTURE_CREATIONFLAG_STORAGE,u)},t.CreateRTexture=function(e,n,i,r,o,s,c,l){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===c&&(c=Eo.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=a.TEXTURETYPE_FLOAT),new t(e,n,i,a.TEXTUREFORMAT_R,r,o,s,c,l)},t.CreateRStorageTexture=function(e,n,i,r,o,s,c,l){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===c&&(c=Eo.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=a.TEXTURETYPE_FLOAT),new t(e,n,i,a.TEXTUREFORMAT_R,r,o,s,c,l,a.TEXTURE_CREATIONFLAG_STORAGE)},t}(Eo),Po=function(){function e(e,t){this._scene=e,this._mesh=t}return e.prototype.bakeVertexData=function(e){return X(this,void 0,void 0,(function(){var t,n,i,r,o,a,s,c;return Y(this,(function(l){switch(l.label){case 0:if(!this._mesh.skeleton)throw new Error("No skeleton in this mesh.");if(t=this._mesh.skeleton.bones.length,n=e.reduce((function(e,t){return e+t.to-t.from+1}),0),isNaN(n))throw new Error("Invalid animation ranges.");i=0,r=new Float32Array(4*(t+1)*4*n),this._scene.stopAnimation(this._mesh),this._mesh.skeleton.returnToRest(),o=0,a=e,l.label=1;case 1:if(!(o0},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(e){var t=this;this._attachedCamera=e;var n=this._attachedCamera.getScene();this._onPrePointerObservableObserver=n.onPrePointerObservable.add((function(e){e.type!==ti.POINTERDOWN?e.type===ti.POINTERUP&&(t._isPointerDown=!1):t._isPointerDown=!0})),this._onAfterCheckInputsObserver=e.onAfterCheckInputsObservable.add((function(){if(!t._reachTargetAlpha()){var e=ct.Now,n=0;null!=t._lastFrameTime&&(n=e-t._lastFrameTime),t._lastFrameTime=e,t._applyUserInteraction();var i=e-t._lastInteractionTime-t._idleRotationWaitTime,r=Math.max(Math.min(i/t._idleRotationSpinupTime,1),0);t._cameraRotationSpeed=t._idleRotationSpeed*r,t._attachedCamera&&(t._attachedCamera.alpha-=t._cameraRotationSpeed*(n/1e3))}}))},e.prototype.detach=function(){if(this._attachedCamera){var e=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&e.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._attachedCamera=null}},e.prototype.resetLastInteractionTime=function(e){this._lastInteractionTime=null!=e?e:ct.Now},e.prototype._reachTargetAlpha=function(){return!(!this._attachedCamera||!this.targetAlpha)&&Math.abs(this._attachedCamera.alpha-this.targetAlpha)i.upperRadiusLimit?i.upperRadiusLimit:r),r},e.prototype._maintainCameraAboveGround=function(){var t=this;if(!(this._elevationReturnTime<0)){var n=ct.Now-this._lastInteractionTime,i=.5*Math.PI-this._defaultElevation,r=.5*Math.PI;if(this._attachedCamera&&!this._betaIsAnimating&&this._attachedCamera.beta>r&&n>=this._elevationReturnWaitTime){this._betaIsAnimating=!0,this.stopAllAnimations(),this._betaTransition||(this._betaTransition=Je.CreateAnimation("beta",Je.ANIMATIONTYPE_FLOAT,60,e.EasingFunction));var o=Je.TransitionTo("beta",i,this._attachedCamera,this._attachedCamera.getScene(),60,this._betaTransition,this._elevationReturnTime,(function(){t._clearAnimationLocks(),t.stopAllAnimations()}));o&&this._animatables.push(o)}}},e.prototype._clearAnimationLocks=function(){this._betaIsAnimating=!1},e.prototype._applyUserInteraction=function(){this.isUserIsMoving&&(this._lastInteractionTime=ct.Now,this.stopAllAnimations(),this._clearAnimationLocks())},e.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0]&&(this._animatables[0].onAnimationEnd=null,this._animatables[0].stop()),this._animatables.shift()},Object.defineProperty(e.prototype,"isUserIsMoving",{get:function(){return!!this._attachedCamera&&(0!==this._attachedCamera.inertialAlphaOffset||0!==this._attachedCamera.inertialBetaOffset||0!==this._attachedCamera.inertialRadiusOffset||0!==this._attachedCamera.inertialPanningX||0!==this._attachedCamera.inertialPanningY||this._isPointerDown)},enumerable:!1,configurable:!0}),e.EasingFunction=new Xi,e.EasingMode=Vi.EASINGMODE_EASEINOUT,e.IgnoreBoundsSizeMode=0,e.FitFrustumSidesMode=1,e}(),wo=function(e,t,n,i){void 0===t&&(t=new C),void 0===n&&(n=0),void 0===i&&(i=!1),this.direction=e,this.rotatedDirection=t,this.diff=n,this.ignore=i},Mo=function(){function e(e){this._ui=e,this.name="AttachToBoxBehavior",this.distanceAwayFromFace=.15,this.distanceAwayFromBottomOfFace=.15,this._faceVectors=[new wo(C.Up()),new wo(C.Down()),new wo(C.Left()),new wo(C.Right()),new wo(C.Forward()),new wo(C.Forward().scaleInPlace(-1))],this._tmpMatrix=new R,this._tmpVector=new C,this._zeroVector=C.Zero(),this._lookAtTmpMatrix=new R}return e.prototype.init=function(){},e.prototype._closestFace=function(e){var t=this;return this._faceVectors.forEach((function(n){t._target.rotationQuaternion||(t._target.rotationQuaternion=I.RotationYawPitchRoll(t._target.rotation.y,t._target.rotation.x,t._target.rotation.z)),t._target.rotationQuaternion.toRotationMatrix(t._tmpMatrix),C.TransformCoordinatesToRef(n.direction,t._tmpMatrix,n.rotatedDirection),n.diff=C.GetAngleBetweenVectors(n.rotatedDirection,e,C.Cross(n.rotatedDirection,e))})),this._faceVectors.reduce((function(e,t){return e.ignore?t:t.ignore||e.diff1){if(e._setAllVisibility(e._ownerNode,1),e._hoverValue>e._time)return e._hoverValue=e._time,void e._detachObserver()}else if(e._ownerNode.visibility<0&&(e._setAllVisibility(e._ownerNode,0),e._hoverValue<0))return e._hoverValue=0,void e._detachObserver();e._attachObserver()}}}return Object.defineProperty(e.prototype,"delay",{get:function(){return this.fadeInDelay},set:function(e){this.fadeInDelay=e,this.fadeOutDelay=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"FadeInOut"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(e){this._ownerNode=e,this._setAllVisibility(this._ownerNode,0)},e.prototype.detach=function(){this._ownerNode=null},e.prototype.fadeIn=function(e){void 0===e&&(e=!0),this._delay=e?this.fadeInDelay:this.fadeOutDelay,this._time=e?this.fadeInTime:this.fadeOutTime,this._detachObserver(),this._ownerNode&&(e&&this._ownerNode.visibility>=1||!e&&this._ownerNode.visibility<=0)||(this._hovered=e,this._hovered||(this._delay*=-1),this._ownerNode.visibility>=1?this._hoverValue=this._time:this._ownerNode.visibility<=0&&(this._hoverValue=0),this._update())},e.prototype.fadeOut=function(){this.fadeIn(!1)},e.prototype._setAllVisibility=function(e,t){var n=this;e.visibility=t,e.getChildMeshes().forEach((function(e){n._setAllVisibility(e,t)}))},e.prototype._attachObserver=function(){var e;this._onBeforeRenderObserver||(this._onBeforeRenderObserver=null===(e=this._ownerNode)||void 0===e?void 0:e.getScene().onBeforeRenderObservable.add(this._update))},e.prototype._detachObserver=function(){var e;this._onBeforeRenderObserver&&(null===(e=this._ownerNode)||void 0===e||e.getScene().onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=null)},e}(),No=function(){function e(e,t,n){void 0===n&&(n=Number.MAX_VALUE),this.origin=e,this.direction=t,this.length=n}return e.prototype.clone=function(){return new e(this.origin.clone(),this.direction.clone(),this.length)},e.prototype.intersectsBoxMinMax=function(t,n,i){void 0===i&&(i=0);var r,o,a,s,c=e._TmpVector3[0].copyFromFloats(t.x-i,t.y-i,t.z-i),l=e._TmpVector3[1].copyFromFloats(n.x+i,n.y+i,n.z+i),u=0,h=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.xl.x)return!1}else if(r=1/this.direction.x,o=(c.x-this.origin.x)*r,(a=(l.x-this.origin.x)*r)==-1/0&&(a=1/0),o>a&&(s=o,o=a,a=s),(u=Math.max(o,u))>(h=Math.min(a,h)))return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.yl.y)return!1}else if(r=1/this.direction.y,o=(c.y-this.origin.y)*r,(a=(l.y-this.origin.y)*r)==-1/0&&(a=1/0),o>a&&(s=o,o=a,a=s),(u=Math.max(o,u))>(h=Math.min(a,h)))return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.zl.z)return!1}else if(r=1/this.direction.z,o=(c.z-this.origin.z)*r,(a=(l.z-this.origin.z)*r)==-1/0&&(a=1/0),o>a&&(s=o,o=a,a=s),(u=Math.max(o,u))>(h=Math.min(a,h)))return!1;return!0},e.prototype.intersectsBox=function(e,t){return void 0===t&&(t=0),this.intersectsBoxMinMax(e.minimum,e.maximum,t)},e.prototype.intersectsSphere=function(e,t){void 0===t&&(t=0);var n=e.center.x-this.origin.x,i=e.center.y-this.origin.y,r=e.center.z-this.origin.z,o=n*n+i*i+r*r,a=e.radius+t,s=a*a;if(o<=s)return!0;var c=n*this.direction.x+i*this.direction.y+r*this.direction.z;return!(c<0)&&o-c*c<=s},e.prototype.intersectsTriangle=function(t,n,i){var r=e._TmpVector3[0],o=e._TmpVector3[1],a=e._TmpVector3[2],s=e._TmpVector3[3],c=e._TmpVector3[4];n.subtractToRef(t,r),i.subtractToRef(t,o),C.CrossToRef(this.direction,o,a);var l=C.Dot(r,a);if(0===l)return null;var u=1/l;this.origin.subtractToRef(t,s);var h=C.Dot(s,a)*u;if(h<0||h>1)return null;C.CrossToRef(s,r,c);var d=C.Dot(this.direction,c)*u;if(d<0||h+d>1)return null;var p=C.Dot(o,c)*u;return p>this.length?null:new pr(1-h-d,h,p)},e.prototype.intersectsPlane=function(e){var t,n=C.Dot(e.normal,this.direction);if(Math.abs(n)<9.99999997475243e-7)return null;var i=C.Dot(e.normal,this.origin);return(t=(-e.d-i)/n)<0?t<-9.99999997475243e-7?null:0:t},e.prototype.intersectsAxis=function(e,t){switch(void 0===t&&(t=0),e){case"y":return(n=(this.origin.y-t)/this.direction.y)>0?null:new C(this.origin.x+this.direction.x*-n,t,this.origin.z+this.direction.z*-n);case"x":return(n=(this.origin.x-t)/this.direction.x)>0?null:new C(t,this.origin.y+this.direction.y*-n,this.origin.z+this.direction.z*-n);case"z":var n;return(n=(this.origin.z-t)/this.direction.z)>0?null:new C(this.origin.x+this.direction.x*-n,this.origin.y+this.direction.y*-n,t);default:return null}},e.prototype.intersectsMesh=function(t,n,i,r,o,a){void 0===r&&(r=!1),void 0===a&&(a=!1);var s=w.Matrix[0];return t.getWorldMatrix().invertToRef(s),this._tmpRay?e.TransformToRef(this,s,this._tmpRay):this._tmpRay=e.Transform(this,s),t.intersects(this._tmpRay,n,i,r,o,a)},e.prototype.intersectsMeshes=function(e,t,n){n?n.length=0:n=[];for(var i=0;it.distance?1:0},e.prototype.intersectionSegment=function(t,n,i){var r=this.origin,o=w.Vector3[0],a=w.Vector3[1],s=w.Vector3[2],c=w.Vector3[3];n.subtractToRef(t,o),this.direction.scaleToRef(e._Rayl,s),r.addToRef(s,a),t.subtractToRef(r,c);var l,u,h=C.Dot(o,o),d=C.Dot(o,s),p=C.Dot(s,s),f=C.Dot(o,c),m=C.Dot(s,c),_=h*p-d*d,g=_,y=_;_g&&(l=g,u=m+d,y=p)),u<0?(u=0,-f<0?l=0:-f>h?l=g:(l=-f,g=h)):u>y&&(u=y,-f+d<0?l=0:-f+d>h?l=g:(l=-f+d,g=h));var v=Math.abs(l)0&&b<=this.length&&A.lengthSquared()=e.distance?null:l:null},Ci.prototype._internalPick=function(e,t,n,i,r){for(var o=null,a=!!(this.activeCameras&&this.activeCameras.length>1&&this.cameraToUseForPointers!==this.activeCamera),s=this.cameraToUseForPointers||this.activeCamera,c=0;c1&&this.cameraToUseForPointers!==this.activeCamera),o=this.cameraToUseForPointers||this.activeCamera,a=0;a1)throw"Multiple drag modes specified in dragBehavior options. Only one expected"}return Object.defineProperty(e.prototype,"currentDraggingPointerID",{get:function(){return this.currentDraggingPointerId},set:function(e){this.currentDraggingPointerId=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){e!=this._enabled&&this.onEnabledObservable.notifyObservers(e),this._enabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"PointerDrag"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(t,n){var i=this;this._scene=t.getScene(),t.isNearGrabbable=!0,this.attachedNode=t,e._PlaneScene||(this._debugMode?e._PlaneScene=this._scene:(e._PlaneScene=new Ci(this._scene.getEngine(),{virtual:!0}),e._PlaneScene.detachControl(),this._scene.onDisposeObservable.addOnce((function(){e._PlaneScene.dispose(),e._PlaneScene=null})))),this._dragPlane=Bo("pointerDragPlane",{size:this._debugMode?1:1e4,updatable:!1,sideOrientation:no.DOUBLESIDE},e._PlaneScene),this.lastDragPosition=new C(0,0,0);var r=n||function(e){return i.attachedNode==e||e.isDescendantOf(i.attachedNode)};this._pointerObserver=this._scene.onPointerObservable.add((function(t){if(i.enabled){if(t.type==ti.POINTERDOWN)i.startAndReleaseDragOnPointerEvents&&!i.dragging&&t.pickInfo&&t.pickInfo.hit&&t.pickInfo.pickedMesh&&t.pickInfo.pickedPoint&&t.pickInfo.ray&&r(t.pickInfo.pickedMesh)&&-1===i._activeDragButton&&-1!==i.dragButtons.indexOf(t.event.button)&&(i._activeDragButton=t.event.button,i._activePointerInfo=t,i._startDrag(t.event.pointerId,t.pickInfo.ray,t.pickInfo.pickedPoint));else if(t.type==ti.POINTERUP)!i.startAndReleaseDragOnPointerEvents||i.currentDraggingPointerId!=t.event.pointerId||i._activeDragButton!==t.event.button&&-1!==i._activeDragButton||i.releaseDrag();else if(t.type==ti.POINTERMOVE){var n=t.event.pointerId;if(i.currentDraggingPointerId===e._AnyMouseId&&n!==e._AnyMouseId){var o=t.event;("mouse"===o.pointerType||!i._scene.getEngine().hostInformation.isMobile&&o instanceof MouseEvent)&&(i._lastPointerRay[i.currentDraggingPointerId]&&(i._lastPointerRay[n]=i._lastPointerRay[i.currentDraggingPointerId],delete i._lastPointerRay[i.currentDraggingPointerId]),i.currentDraggingPointerId=n)}i._lastPointerRay[n]||(i._lastPointerRay[n]=new No(new C,new C)),t.pickInfo&&t.pickInfo.ray&&(i._lastPointerRay[n].origin.copyFrom(t.pickInfo.ray.origin),i._lastPointerRay[n].direction.copyFrom(t.pickInfo.ray.direction),i.currentDraggingPointerId==n&&i.dragging&&i._moveDrag(t.pickInfo.ray))}}else i._attachedToElement&&i.releaseDrag()})),this._beforeRenderObserver=this._scene.onBeforeRenderObservable.add((function(){if(i._moving&&i.moveAttached){var e=!1;Lo._RemoveAndStorePivotPoint(i.attachedNode),i._targetPosition.subtractToRef(i.attachedNode.absolutePosition,i._tmpVector),i._tmpVector.scaleInPlace(i.dragDeltaRatio),i.attachedNode.getAbsolutePosition().addToRef(i._tmpVector,i._tmpVector),i.validateDrag(i._tmpVector)&&(i.attachedNode.setAbsolutePosition(i._tmpVector),e=!0),Lo._RestorePivotPoint(i.attachedNode),e&&i.attachedNode.computeWorldMatrix()}}))},e.prototype.releaseDrag=function(){if(this.dragging&&(this.dragging=!1,this.onDragEndObservable.notifyObservers({dragPlanePoint:this.lastDragPosition,pointerId:this.currentDraggingPointerId,pointerInfo:this._activePointerInfo})),this.currentDraggingPointerId=-1,this._activeDragButton=-1,this._activePointerInfo=null,this._moving=!1,this.detachCameraControls&&this._attachedToElement&&this._scene.activeCamera&&!this._scene.activeCamera.leftCamera){if("ArcRotateCamera"===this._scene.activeCamera.getClassName()){var e=this._scene.activeCamera;e.attachControl(!e.inputs||e.inputs.noPreventDefault,e._useCtrlForPanning,e._panningMouseButton)}else this._scene.activeCamera.attachControl(!this._scene.activeCamera.inputs||this._scene.activeCamera.inputs.noPreventDefault);this._attachedToElement=!1}},e.prototype.startDrag=function(t,n,i){void 0===t&&(t=e._AnyMouseId),this._startDrag(t,n,i);var r=this._lastPointerRay[t];t===e._AnyMouseId&&(r=this._lastPointerRay[Object.keys(this._lastPointerRay)[0]]),r&&this._moveDrag(r)},e.prototype._startDrag=function(e,t,n){if(this._scene.activeCamera&&!this.dragging&&this.attachedNode){Lo._RemoveAndStorePivotPoint(this.attachedNode),t?(this._startDragRay.direction.copyFrom(t.direction),this._startDragRay.origin.copyFrom(t.origin)):(this._startDragRay.origin.copyFrom(this._scene.activeCamera.position),this.attachedNode.getWorldMatrix().getTranslationToRef(this._tmpVector),this._tmpVector.subtractToRef(this._scene.activeCamera.position,this._startDragRay.direction)),this._updateDragPlanePosition(this._startDragRay,n||this._tmpVector);var i=this._pickWithRayOnDragPlane(this._startDragRay);i?(this.dragging=!0,this.currentDraggingPointerId=e,this.lastDragPosition.copyFrom(i),this.onDragStartObservable.notifyObservers({dragPlanePoint:i,pointerId:this.currentDraggingPointerId,pointerInfo:this._activePointerInfo}),this._targetPosition.copyFrom(this.attachedNode.getAbsolutePosition()),this.detachCameraControls&&this._scene.activeCamera&&this._scene.activeCamera.inputs&&!this._scene.activeCamera.leftCamera&&(this._scene.activeCamera.inputs.attachedToElement?(this._scene.activeCamera.detachControl(),this._attachedToElement=!0):this._attachedToElement=!1)):this.releaseDrag(),Lo._RestorePivotPoint(this.attachedNode)}},e.prototype._moveDrag=function(e){this._moving=!0;var t=this._pickWithRayOnDragPlane(e);if(t){Lo._RemoveAndStorePivotPoint(this.attachedNode),this.updateDragPlane&&this._updateDragPlanePosition(e,t);var n=0;this._options.dragAxis?(this.useObjectOrientationForDragging?C.TransformCoordinatesToRef(this._options.dragAxis,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._worldDragAxis):this._worldDragAxis.copyFrom(this._options.dragAxis),t.subtractToRef(this.lastDragPosition,this._tmpVector),n=C.Dot(this._tmpVector,this._worldDragAxis),this._worldDragAxis.scaleToRef(n,this._dragDelta)):(n=this._dragDelta.length(),t.subtractToRef(this.lastDragPosition,this._dragDelta)),this._targetPosition.addInPlace(this._dragDelta),this.onDragObservable.notifyObservers({dragDistance:n,delta:this._dragDelta,dragPlanePoint:t,dragPlaneNormal:this._dragPlane.forward,pointerId:this.currentDraggingPointerId,pointerInfo:this._activePointerInfo}),this.lastDragPosition.copyFrom(t),Lo._RestorePivotPoint(this.attachedNode)}},e.prototype._pickWithRayOnDragPlane=function(e){if(!e)return null;var t=Math.acos(C.Dot(this._dragPlane.forward,e.direction));if(t>Math.PI/2&&(t=Math.PI-t),this.maxDragAngle>0&&t>this.maxDragAngle){if(this._useAlternatePickedPointAboveMaxDragAngle){this._tmpVector.copyFrom(e.direction),this.attachedNode.absolutePosition.subtractToRef(e.origin,this._alternatePickedPoint),this._alternatePickedPoint.normalize(),this._alternatePickedPoint.scaleInPlace(this._useAlternatePickedPointAboveMaxDragAngleDragSpeed*C.Dot(this._alternatePickedPoint,this._tmpVector)),this._tmpVector.addInPlace(this._alternatePickedPoint);var n=C.Dot(this._dragPlane.forward,this._tmpVector);return this._dragPlane.forward.scaleToRef(-n,this._alternatePickedPoint),this._alternatePickedPoint.addInPlace(this._tmpVector),this._alternatePickedPoint.addInPlace(this.attachedNode.absolutePosition),this._alternatePickedPoint}return null}var i=this._dragPlane.forward,r=this._dragPlane.position,o=e.direction.dot(i);if(Math.abs(o).999?Math.abs(C.Dot(C.UpReadOnly,this._pointC))>.999?this._lookAt.copyFrom(C.Right()):this._lookAt.copyFrom(C.UpReadOnly):(C.CrossToRef(this._localAxis,this._pointC,this._lookAt),C.CrossToRef(this._localAxis,this._lookAt,this._lookAt),this._lookAt.normalize()),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._lookAt,this._lookAt),this._dragPlane.lookAt(this._lookAt)):this._options.dragPlaneNormal?(this.useObjectOrientationForDragging?C.TransformCoordinatesToRef(this._options.dragPlaneNormal,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragPlaneNormal),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._localAxis,this._lookAt),this._dragPlane.lookAt(this._lookAt)):(this._dragPlane.position.copyFrom(this._pointA),this._dragPlane.lookAt(e.origin)),this._dragPlane.position.copyFrom(this.attachedNode.getAbsolutePosition()),this._dragPlane.computeWorldMatrix(!0)},e.prototype.detach=function(){this._lastPointerRay={},this.attachedNode&&(this.attachedNode.isNearGrabbable=!1),this._pointerObserver&&this._scene.onPointerObservable.remove(this._pointerObserver),this._beforeRenderObserver&&this._scene.onBeforeRenderObservable.remove(this._beforeRenderObserver),this._dragPlane&&this._dragPlane.dispose(),this.releaseDrag()},e._AnyMouseId=-2,e}(),zo=function(){function e(){this._startDistance=0,this._initialScale=new C(0,0,0),this._targetScale=new C(0,0,0),this._sceneRenderObserver=null,this._dragBehaviorA=new Vo({}),this._dragBehaviorA.moveAttached=!1,this._dragBehaviorB=new Vo({}),this._dragBehaviorB.moveAttached=!1}return Object.defineProperty(e.prototype,"name",{get:function(){return"MultiPointerScale"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype._getCurrentDistance=function(){return this._dragBehaviorA.lastDragPosition.subtract(this._dragBehaviorB.lastDragPosition).length()},e.prototype.attach=function(e){var t=this;this._ownerNode=e,this._dragBehaviorA.onDragStartObservable.add((function(){t._dragBehaviorA.dragging&&t._dragBehaviorB.dragging&&(t._dragBehaviorA.currentDraggingPointerId==t._dragBehaviorB.currentDraggingPointerId?t._dragBehaviorA.releaseDrag():(t._initialScale.copyFrom(e.scaling),t._startDistance=t._getCurrentDistance()))})),this._dragBehaviorB.onDragStartObservable.add((function(){t._dragBehaviorA.dragging&&t._dragBehaviorB.dragging&&(t._dragBehaviorA.currentDraggingPointerId==t._dragBehaviorB.currentDraggingPointerId?t._dragBehaviorB.releaseDrag():(t._initialScale.copyFrom(e.scaling),t._startDistance=t._getCurrentDistance()))})),[this._dragBehaviorA,this._dragBehaviorB].forEach((function(e){e.onDragObservable.add((function(){if(t._dragBehaviorA.dragging&&t._dragBehaviorB.dragging){var e=t._getCurrentDistance()/t._startDistance;t._initialScale.scaleToRef(e,t._targetScale)}}))})),e.addBehavior(this._dragBehaviorA),e.addBehavior(this._dragBehaviorB),this._sceneRenderObserver=e.getScene().onBeforeRenderObservable.add((function(){if(t._dragBehaviorA.dragging&&t._dragBehaviorB.dragging){var n=t._targetScale.subtract(e.scaling).scaleInPlace(.1);n.length()>.01&&e.scaling.addInPlace(n)}}))},e.prototype.detach=function(){var e=this;this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver),[this._dragBehaviorA,this._dragBehaviorB].forEach((function(t){t.onDragStartObservable.clear(),t.onDragObservable.clear(),e._ownerNode.removeBehavior(t)}))},e}(),Go=function(){function e(){this._attachedToElement=!1,this._virtualMeshesInfo={},this._tmpVector=new C,this._tmpQuaternion=new I,this._dragType={NONE:0,DRAG:1,DRAG_WITH_CONTROLLER:2,NEAR_DRAG:3},this._moving=!1,this._dragging=this._dragType.NONE,this.draggableMeshes=null,this.zDragFactor=3,this.currentDraggingPointerIds=[],this.detachCameraControls=!0,this.onDragStartObservable=new u,this.onDragObservable=new u,this.onDragEndObservable=new u,this.allowMultiPointer=!0}return Object.defineProperty(e.prototype,"currentDraggingPointerId",{get:function(){return void 0!==this.currentDraggingPointerIds[0]?this.currentDraggingPointerIds[0]:-1},set:function(e){this.currentDraggingPointerIds[0]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentDraggingPointerID",{get:function(){return this.currentDraggingPointerId},set:function(e){this.currentDraggingPointerId=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"BaseSixDofDrag"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMoving",{get:function(){return this._moving},enumerable:!1,configurable:!0}),e.prototype.init=function(){},Object.defineProperty(e.prototype,"_pointerCamera",{get:function(){return this._scene.cameraToUseForPointers?this._scene.cameraToUseForPointers:this._scene.activeCamera},enumerable:!1,configurable:!0}),e.prototype._createVirtualMeshInfo=function(){var t=new kr("",e._virtualScene);t.rotationQuaternion=new I;var n=new kr("",e._virtualScene);n.rotationQuaternion=new I;var i=new kr("",e._virtualScene);return i.rotationQuaternion=new I,{dragging:!1,moving:!1,dragMesh:t,originMesh:n,pivotMesh:i,startingPivotPosition:new C,startingPivotOrientation:new I,startingPosition:new C,startingOrientation:new I,lastOriginPosition:new C,lastDragPosition:new C}},e.prototype._resetVirtualMeshesPosition=function(){for(var e=0;eh&&(h=Math.min(.01-u,0)),l.scaleInPlace(h),l.addToRef(r.pivotMesh.absolutePosition,this._tmpVector),r.pivotMesh.setAbsolutePosition(this._tmpVector),l.addToRef(r.dragMesh.absolutePosition,this._tmpVector),r.dragMesh.setAbsolutePosition(this._tmpVector)}},e.prototype.attach=function(t){var n=this;this._ownerNode=t,this._scene=this._ownerNode.getScene(),e._virtualScene||(e._virtualScene=new Ci(this._scene.getEngine(),{virtual:!0}),e._virtualScene.detachControl()),this._pointerObserver=this._scene.onPointerObservable.add((function(e){var t=e.event.pointerId;n._virtualMeshesInfo[t]||(n._virtualMeshesInfo[t]=n._createVirtualMeshInfo());var i,r=n._virtualMeshesInfo[t],o="xr-near"===e.event.pointerType;if(e.type==ti.POINTERDOWN){if(!r.dragging&&e.pickInfo&&e.pickInfo.hit&&e.pickInfo.pickedMesh&&e.pickInfo.pickedPoint&&e.pickInfo.ray&&(!o||e.pickInfo.aimTransform)&&(i=e.pickInfo.pickedMesh,n._ownerNode===i||i.isDescendantOf(n._ownerNode)&&(!n.draggableMeshes||-1!==n.draggableMeshes.indexOf(i)))){if(!n.allowMultiPointer&&n.currentDraggingPointerIds.length>0)return;!n._pointerCamera||n._pointerCamera.cameraRigMode!==dr.RIG_MODE_NONE||n._pointerCamera._isLeftCamera||n._pointerCamera._isRightCamera||e.pickInfo.ray.origin.copyFrom(n._pointerCamera.globalPosition),n._ownerNode.computeWorldMatrix(!0);var a=n._virtualMeshesInfo[t];o?(n._dragging=e.pickInfo.originMesh?n._dragType.NEAR_DRAG:n._dragType.DRAG_WITH_CONTROLLER,a.originMesh.position.copyFrom(e.pickInfo.aimTransform.position),n._dragging===n._dragType.NEAR_DRAG&&e.pickInfo.gripTransform?a.originMesh.rotationQuaternion.copyFrom(e.pickInfo.gripTransform.rotationQuaternion):a.originMesh.rotationQuaternion.copyFrom(e.pickInfo.aimTransform.rotationQuaternion)):(n._dragging=n._dragType.DRAG,a.originMesh.position.copyFrom(e.pickInfo.ray.origin)),a.lastOriginPosition.copyFrom(a.originMesh.position),a.dragMesh.position.copyFrom(e.pickInfo.pickedPoint),a.lastDragPosition.copyFrom(e.pickInfo.pickedPoint),a.pivotMesh.position.copyFrom(n._ownerNode.getAbsolutePivotPoint()),a.pivotMesh.rotationQuaternion.copyFrom(n._ownerNode.absoluteRotationQuaternion),a.startingPosition.copyFrom(a.dragMesh.position),a.startingPivotPosition.copyFrom(a.pivotMesh.position),a.startingOrientation.copyFrom(a.dragMesh.rotationQuaternion),a.startingPivotOrientation.copyFrom(a.pivotMesh.rotationQuaternion),o?(a.originMesh.addChild(a.dragMesh),a.originMesh.addChild(a.pivotMesh)):a.originMesh.lookAt(a.dragMesh.position),a.dragging=!0,-1===n.currentDraggingPointerIds.indexOf(t)&&n.currentDraggingPointerIds.push(t),n.detachCameraControls&&n._pointerCamera&&!n._pointerCamera.leftCamera&&(n._pointerCamera.inputs&&n._pointerCamera.inputs.attachedToElement?(n._pointerCamera.detachControl(),n._attachedToElement=!0):n._attachedToElement=!1),n._targetDragStart(a.pivotMesh.position,a.pivotMesh.rotationQuaternion,t),n.onDragStartObservable.notifyObservers({position:a.pivotMesh.position})}}else if(e.type==ti.POINTERUP||e.type==ti.POINTERDOUBLETAP){var s=n.currentDraggingPointerIds.indexOf(t);r.dragging=!1,-1!==s&&(n.currentDraggingPointerIds.splice(s,1),0===n.currentDraggingPointerIds.length&&(n._moving=!1,n._dragging=n._dragType.NONE,n.detachCameraControls&&n._attachedToElement&&n._pointerCamera&&!n._pointerCamera.leftCamera&&(n._reattachCameraControls(),n._attachedToElement=!1)),r.originMesh.removeChild(r.dragMesh),r.originMesh.removeChild(r.pivotMesh),n._targetDragEnd(t),n.onDragEndObservable.notifyObservers({}))}else if(e.type==ti.POINTERMOVE&&-1!==(s=n.currentDraggingPointerIds.indexOf(t))&&r.dragging&&e.pickInfo&&(e.pickInfo.ray||e.pickInfo.aimTransform)){var c=n.zDragFactor;(n.currentDraggingPointerIds.length>1||e.pickInfo.originMesh)&&(c=0),n._ownerNode.computeWorldMatrix(!0),o?n._pointerUpdateXR(e.pickInfo.aimTransform,e.pickInfo.gripTransform,t,c):n._pointerUpdate2D(e.pickInfo.ray,t,c),n._tmpQuaternion.copyFrom(r.startingPivotOrientation),n._tmpQuaternion.x=-n._tmpQuaternion.x,n._tmpQuaternion.y=-n._tmpQuaternion.y,n._tmpQuaternion.z=-n._tmpQuaternion.z,r.pivotMesh.absoluteRotationQuaternion.multiplyToRef(n._tmpQuaternion,n._tmpQuaternion),r.pivotMesh.absolutePosition.subtractToRef(r.startingPivotPosition,n._tmpVector),n.onDragObservable.notifyObservers({delta:n._tmpVector,position:r.pivotMesh.position,pickInfo:e.pickInfo}),n._targetDrag(n._tmpVector,n._tmpQuaternion,t),r.lastDragPosition.copyFrom(r.dragMesh.absolutePosition),n._moving=!0}}))},e.prototype._applyZOffset=function(e,t,n){e.position.z-=e.position.z<1?t*n:t*n*e.position.z,e.position.z<0&&(e.position.z=0)},e.prototype._targetDragStart=function(e,t,n){},e.prototype._targetDrag=function(e,t,n){},e.prototype._targetDragEnd=function(e){},e.prototype._reattachCameraControls=function(){if(this._pointerCamera)if("ArcRotateCamera"===this._pointerCamera.getClassName()){var e=this._pointerCamera;e.attachControl(!e.inputs||e.inputs.noPreventDefault,e._useCtrlForPanning,e._panningMouseButton)}else this._pointerCamera.attachControl(!this._pointerCamera.inputs||this._pointerCamera.inputs.noPreventDefault)},e.prototype.detach=function(){for(var e in this._scene&&(this.detachCameraControls&&this._attachedToElement&&this._pointerCamera&&!this._pointerCamera.leftCamera&&(this._reattachCameraControls(),this._attachedToElement=!1),this._scene.onPointerObservable.remove(this._pointerObserver)),this._virtualMeshesInfo)this._virtualMeshesInfo[e].originMesh.dispose(),this._virtualMeshesInfo[e].dragMesh.dispose();this.onDragEndObservable.clear(),this.onDragObservable.clear(),this.onDragStartObservable.clear()},e}(),Ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sceneRenderObserver=null,t._targetPosition=new C(0,0,0),t._targetOrientation=new I,t._targetScaling=new C(1,1,1),t._startingPosition=new C(0,0,0),t._startingOrientation=new I,t._startingScaling=new C(1,1,1),t.onPositionChangedObservable=new u,t.dragDeltaRatio=.2,t.rotateDraggedObject=!0,t.rotateAroundYOnly=!1,t.rotateWithMotionController=!0,t.disableMovement=!1,t.faceCameraOnDragStart=!1,t}return H(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"SixDofDrag"},enumerable:!1,configurable:!0}),t.prototype.attach=function(t){var n=this;e.prototype.attach.call(this,t),t.isNearGrabbable=!0,this._virtualTransformNode=new Lr("virtual_sixDof",Go._virtualScene),this._virtualTransformNode.rotationQuaternion=I.Identity(),this._sceneRenderObserver=t.getScene().onBeforeRenderObservable.add((function(){if(1===n.currentDraggingPointerIds.length&&n._moving&&!n.disableMovement){var e=t.parent;t.setParent(null),t.position.addInPlace(n._targetPosition.subtract(t.position).scale(n.dragDeltaRatio)),n.onPositionChangedObservable.notifyObservers({position:t.absolutePosition}),(!e||e.scaling&&!e.scaling.isNonUniformWithinEpsilon(.001))&&I.SlerpToRef(t.rotationQuaternion,n._targetOrientation,n.dragDeltaRatio,t.rotationQuaternion),t.setParent(e)}}))},t.prototype._getPositionOffsetAround=function(e,t,n){var i=w.Matrix[0],r=w.Matrix[1],o=w.Matrix[2],a=w.Matrix[3],s=w.Matrix[4];return R.TranslationToRef(e.x,e.y,e.z,i),R.TranslationToRef(-e.x,-e.y,-e.z,r),R.FromQuaternionToRef(n,o),R.ScalingToRef(t,t,t,a),r.multiplyToRef(o,s),s.multiplyToRef(a,s),s.multiplyToRef(i,s),s.getTranslation()},t.prototype._onePointerPositionUpdated=function(e,t){w.Vector3[0].setAll(0),this._dragging===this._dragType.DRAG?this.rotateDraggedObject&&(this.rotateAroundYOnly?I.RotationYawPitchRollToRef(t.toEulerAngles().y,0,0,w.Quaternion[0]):w.Quaternion[0].copyFrom(t),w.Quaternion[0].multiplyToRef(this._startingOrientation,this._targetOrientation)):(this._dragging===this._dragType.NEAR_DRAG||this._dragging===this._dragType.DRAG_WITH_CONTROLLER&&this.rotateWithMotionController)&&t.multiplyToRef(this._startingOrientation,this._targetOrientation),this._targetPosition.copyFrom(this._startingPosition).addInPlace(e)},t.prototype._twoPointersPositionUpdated=function(){var e=this._virtualMeshesInfo[this.currentDraggingPointerIds[0]].startingPosition,t=this._virtualMeshesInfo[this.currentDraggingPointerIds[1]].startingPosition,n=w.Vector3[0];e.addToRef(t,n),n.scaleInPlace(.5);var i=w.Vector3[1];t.subtractToRef(e,i);var r=this._virtualMeshesInfo[this.currentDraggingPointerIds[0]].dragMesh.absolutePosition,o=this._virtualMeshesInfo[this.currentDraggingPointerIds[1]].dragMesh.absolutePosition,a=w.Vector3[2];r.addToRef(o,a),a.scaleInPlace(.5);var s=w.Vector3[3];o.subtractToRef(r,s);var c=s.length()/i.length(),l=a.subtract(n),u=I.FromEulerAngles(0,C.GetAngleBetweenVectorsOnPlane(i.normalize(),s.normalize(),C.UpReadOnly),0),h=this._ownerNode.parent;this._ownerNode.setParent(null);var d=this._getPositionOffsetAround(n.subtract(this._virtualTransformNode.getAbsolutePivotPoint()),c,u);this._virtualTransformNode.rotationQuaternion.multiplyToRef(u,this._ownerNode.rotationQuaternion),this._virtualTransformNode.scaling.scaleToRef(c,this._ownerNode.scaling),this._virtualTransformNode.position.addToRef(l.addInPlace(d),this._ownerNode.position),this.onPositionChangedObservable.notifyObservers({position:this._ownerNode.position}),this._ownerNode.setParent(h)},t.prototype._targetDragStart=function(){var e=this.currentDraggingPointerIds.length,t=this._ownerNode.parent;this._ownerNode.rotationQuaternion||(this._ownerNode.rotationQuaternion=I.RotationYawPitchRoll(this._ownerNode.rotation.y,this._ownerNode.rotation.x,this._ownerNode.rotation.z));var n=this._ownerNode.getAbsolutePivotPoint();if(this._ownerNode.setParent(null),1===e){if(this._targetPosition.copyFrom(this._ownerNode.position),this._targetOrientation.copyFrom(this._ownerNode.rotationQuaternion),this._targetScaling.copyFrom(this._ownerNode.scaling),this.faceCameraOnDragStart&&this._scene.activeCamera){var i=w.Vector3[0];this._scene.activeCamera.position.subtractToRef(n,i),i.normalize();var r=w.Quaternion[0];this._scene.useRightHandedSystem?I.FromLookDirectionRHToRef(i,new C(0,1,0),r):I.FromLookDirectionLHToRef(i,new C(0,1,0),r),r.normalize(),I.RotationYawPitchRollToRef(r.toEulerAngles().y,0,0,w.Quaternion[0]),this._targetOrientation.copyFrom(w.Quaternion[0])}this._startingPosition.copyFrom(this._targetPosition),this._startingOrientation.copyFrom(this._targetOrientation),this._startingScaling.copyFrom(this._targetScaling)}else 2===e&&(this._virtualTransformNode.setPivotPoint(new C(0,0,0),Si.LOCAL),this._virtualTransformNode.position.copyFrom(this._ownerNode.position),this._virtualTransformNode.scaling.copyFrom(this._ownerNode.scaling),this._virtualTransformNode.rotationQuaternion.copyFrom(this._ownerNode.rotationQuaternion),this._virtualTransformNode.setPivotPoint(n,Si.WORLD),this._resetVirtualMeshesPosition());this._ownerNode.setParent(t)},t.prototype._targetDrag=function(e,t){1===this.currentDraggingPointerIds.length?this._onePointerPositionUpdated(e,t):2===this.currentDraggingPointerIds.length&&this._twoPointersPositionUpdated()},t.prototype._targetDragEnd=function(){if(1===this.currentDraggingPointerIds.length){this._resetVirtualMeshesPosition();var e=this.faceCameraOnDragStart;this.faceCameraOnDragStart=!1,this._targetDragStart(),this.faceCameraOnDragStart=e}},t.prototype.detach=function(){e.prototype.detach.call(this),this._ownerNode&&(this._ownerNode.isNearGrabbable=!1,this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver)),this._virtualTransformNode&&this._virtualTransformNode.dispose()},t}(Go),jo=function(){function e(){this._attachPointLocalOffset=new C,this._workingPosition=new C,this._workingQuaternion=new I,this._lastTick=-1,this._hit=!1,this.hitNormalOffset=.05,this.meshes=[],this.interpolatePose=!0,this.lerpTime=250,this.keepOrientationVertical=!0,this.enabled=!0,this.maxStickingDistance=.8}return Object.defineProperty(e.prototype,"name",{get:function(){return"SurfaceMagnetism"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(e,t){this._attachedMesh=e,this._scene=t||e.getScene(),this._attachedMesh.rotationQuaternion||(this._attachedMesh.rotationQuaternion=I.RotationYawPitchRoll(this._attachedMesh.rotation.y,this._attachedMesh.rotation.x,this._attachedMesh.rotation.z)),this.updateAttachPoint(),this._workingPosition.copyFrom(this._attachedMesh.position),this._workingQuaternion.copyFrom(this._attachedMesh.rotationQuaternion),this._addObservables()},e.prototype.detach=function(){this._attachedMesh=null,this._removeObservables()},e.prototype._getTargetPose=function(e){if(!this._attachedMesh)return null;if(e&&e.hit){var t=e.getNormal(!0,!0),n=e.pickedPoint;if(!t||!n)return null;t.normalize();var i=w.Vector3[0];return i.copyFrom(t),i.scaleInPlace(this.hitNormalOffset),i.addInPlace(n),this._attachedMesh.parent&&(w.Matrix[0].copyFrom(this._attachedMesh.parent.getWorldMatrix()).invert(),C.TransformNormalToRef(i,w.Matrix[0],i)),{position:i,quaternion:I.RotationYawPitchRoll(-Math.atan2(t.x,-t.z),this.keepOrientationVertical?0:Math.atan2(t.y,Math.sqrt(t.z*t.z+t.x*t.x)),0)}}return null},e.prototype.updateAttachPoint=function(){this._getAttachPointOffsetToRef(this._attachPointLocalOffset)},e.prototype.findAndUpdateTarget=function(e){if(this._hit=!1,!e.ray)return!1;var t=e.ray.intersectsMeshes(this.meshes)[0];if(this._attachedMesh&&t&&t.hit&&t.pickedMesh){var n=this._getTargetPose(t);n&&C.Distance(this._attachedMesh.position,n.position)l&&(I.RotationAxisToRef(i,-c+l,a),t.rotateByQuaternionToRef(a,t),o=!0)}var u=this._angleBetweenVectorAndPlane(t,i)*(this._scene.useRightHandedSystem?-1:1),h=this.maxViewHorizontalDegrees*Math.PI/180*.5;return u<-h?(I.RotationAxisToRef(r,-u-h,a),t.rotateByQuaternionToRef(a,t),o=!0):u>h&&(I.RotationAxisToRef(r,-u+h,a),t.rotateByQuaternionToRef(a,t),o=!0),o},e.prototype._orientationClamp=function(e,t){var n,i=this._tmpVectors[0];i.copyFrom(e).scaleInPlace(-1).normalize();var r=this._tmpVectors[1],o=this._tmpVectors[2];r.copyFromFloats(0,1,0),C.CrossToRef(i,r,o);var a=o.length();athis.orientToCameraDeadzoneDegrees},e.prototype._updateLeashing=function(e){if(this.attachedNode&&this._enabled){var t=this.attachedNode.parent;this.attachedNode.setParent(null);var n=this.attachedNode.getWorldMatrix(),i=this._workingPosition,r=this._workingQuaternion,o=this.attachedNode.getPivotPoint(),a=this._tmpInvertView;a.copyFrom(e.getViewMatrix()),a.invert(),C.TransformCoordinatesToRef(o,n,i);var s=this._tmpPosition;s.copyFromFloats(0,0,0),C.TransformCoordinatesToRef(s,n,s),s.scaleInPlace(-1).subtractInPlace(o),i.subtractInPlace(e.globalPosition),this.ignoreCameraPitchAndRoll&&this._applyPitchOffset(a);var c=!1,l=this._tmpForward;l.copyFromFloats(0,0,this._scene.useRightHandedSystem?-1:1),C.TransformNormalToRef(l,a,l);var u=this._tmpNodeForward;if(u.copyFromFloats(0,0,this._scene.useRightHandedSystem?-1:1),C.TransformNormalToRef(u,n,u),this._recenterNextUpdate)i.copyFrom(l).scaleInPlace(this.defaultDistance);else if(this.ignoreAngleClamp){var h=i.length();i.copyFrom(l).scaleInPlace(h)}else c=this._angularClamp(a,i);var d=!1;this.ignoreDistanceClamp||(d=this._distanceClamp(i,c),this._applyVerticalClamp(i)),this.useFixedVerticalOffset&&(i.y=s.y-e.globalPosition.y+this.fixedVerticalOffset),(c||d||this._passedOrientationDeadzone(i,u)||this._recenterNextUpdate)&&this._orientationClamp(i,r),this._workingPosition.subtractInPlace(o),this._recenterNextUpdate=!1,this.attachedNode.setParent(t)}},e.prototype._updateTransformToGoal=function(e){if(this.attachedNode&&this.followedCamera&&this._enabled){this.attachedNode.rotationQuaternion||(this.attachedNode.rotationQuaternion=I.Identity());var t=this.attachedNode.parent;if(this.attachedNode.setParent(null),!this.interpolatePose)return this.attachedNode.position.copyFrom(this.followedCamera.globalPosition).addInPlace(this._workingPosition),void this.attachedNode.rotationQuaternion.copyFrom(this._workingQuaternion);var n=new C;n.copyFrom(this.attachedNode.position).subtractInPlace(this.followedCamera.globalPosition),C.SmoothToRef(n,this._workingPosition,e,this.lerpTime,n),n.addInPlace(this.followedCamera.globalPosition),this.attachedNode.position.copyFrom(n);var i=new I;i.copyFrom(this.attachedNode.rotationQuaternion),I.SmoothToRef(i,this._workingQuaternion,e,this.lerpTime,this.attachedNode.rotationQuaternion),this.attachedNode.setParent(t)}},e.prototype._addObservables=function(){var e=this;this._lastTick=Date.now(),this._onBeforeRender=this._scene.onBeforeRenderObservable.add((function(){if(e.followedCamera){var t=Date.now();e._updateLeashing(e.followedCamera),e._updateTransformToGoal(t-e._lastTick),e._lastTick=t}}))},e.prototype._removeObservables=function(){this._onBeforeRender&&this._scene.onBeforeRenderObservable.remove(this._onBeforeRender)},e}(),Xo=function(){function e(){}return e.ANCHOR_SYSTEM="xr-anchor-system",e.BACKGROUND_REMOVER="xr-background-remover",e.HIT_TEST="xr-hit-test",e.MESH_DETECTION="xr-mesh-detection",e.PHYSICS_CONTROLLERS="xr-physics-controller",e.PLANE_DETECTION="xr-plane-detection",e.POINTER_SELECTION="xr-controller-pointer-selection",e.TELEPORTATION="xr-controller-teleportation",e.FEATURE_POINTS="xr-feature-points",e.HAND_TRACKING="xr-hand-tracking",e.IMAGE_TRACKING="xr-image-tracking",e.NEAR_INTERACTION="xr-near-interaction",e.DOM_OVERLAY="xr-dom-overlay",e.MOVEMENT="xr-controller-movement",e.LIGHT_ESTIMATION="xr-light-estimation",e.EYE_TRACKING="xr-eye-tracking",e.WALKING_LOCOMOTION="xr-walking-locomotion",e.LAYERS="xr-layers",e.DEPTH_SENSING="xr-depth-sensing",e.SPACE_WARP="xr-space-warp",e.RAW_CAMERA_ACCESS="xr-raw-camera-access",e}(),Yo=function(){function e(e){var t=this;this._xrSessionManager=e,this._features={},this._xrSessionManager.onXRSessionInit.add((function(){t.getEnabledFeatures().forEach((function(e){var n=t._features[e];!n.enabled||n.featureImplementation.attached||n.featureImplementation.disableAutoAttach||t.attachFeature(e)}))})),this._xrSessionManager.onXRSessionEnded.add((function(){t.getEnabledFeatures().forEach((function(e){var n=t._features[e];n.enabled&&n.featureImplementation.attached&&t.detachFeature(e)}))}))}return e.AddWebXRFeature=function(e,t,n,i){void 0===n&&(n=1),void 0===i&&(i=!1),this._AvailableFeatures[e]=this._AvailableFeatures[e]||{latest:n},n>this._AvailableFeatures[e].latest&&(this._AvailableFeatures[e].latest=n),i&&(this._AvailableFeatures[e].stable=n),this._AvailableFeatures[e][n]=t},e.ConstructFeature=function(e,t,n,i){void 0===t&&(t=1);var r=this._AvailableFeatures[e][t];if(!r)throw new Error("feature not found");return r(n,i)},e.GetAvailableFeatures=function(){return Object.keys(this._AvailableFeatures)},e.GetAvailableVersions=function(e){return Object.keys(this._AvailableFeatures[e])},e.GetLatestVersionOfFeature=function(e){return this._AvailableFeatures[e]&&this._AvailableFeatures[e].latest||-1},e.GetStableVersionOfFeature=function(e){return this._AvailableFeatures[e]&&this._AvailableFeatures[e].stable||-1},e.prototype.attachFeature=function(e){var t=this._features[e];t&&t.enabled&&!t.featureImplementation.attached&&t.featureImplementation.attach()},e.prototype.detachFeature=function(e){var t=this._features[e];t&&t.featureImplementation.attached&&t.featureImplementation.detach()},e.prototype.disableFeature=function(e){var t="string"==typeof e?e:e.Name,n=this._features[t];return!(!n||!n.enabled||(n.enabled=!1,this.detachFeature(t),n.featureImplementation.dispose(),delete this._features[t],0))},e.prototype.dispose=function(){var e=this;this.getEnabledFeatures().forEach((function(t){e.disableFeature(t)}))},e.prototype.enableFeature=function(t,n,i,r,o){var a=this;void 0===n&&(n="latest"),void 0===i&&(i={}),void 0===r&&(r=!0),void 0===o&&(o=!0);var s="string"==typeof t?t:t.Name,c=0;if("string"==typeof n){if(!n)throw new Error("Error in provided version - ".concat(s," (").concat(n,")"));if(-1===(c="stable"===n?e.GetStableVersionOfFeature(s):"latest"===n?e.GetLatestVersionOfFeature(s):+n)||isNaN(c))throw new Error("feature not found - ".concat(s," (").concat(n,")"))}else c=n;var l=e._ConflictingFeatures[s];if(void 0!==l&&-1!==this.getEnabledFeatures().indexOf(l))throw new Error("Feature ".concat(s," cannot be enabled while ").concat(l," is enabled."));var u=this._features[s],h=e.ConstructFeature(s,c,this._xrSessionManager,i);if(!h)throw new Error("feature not found - ".concat(s));u&&this.disableFeature(s);var d=h();if(d.dependsOn){var p=d.dependsOn.every((function(e){return!!a._features[e]}));if(!p)throw new Error("Dependant features missing. Make sure the following features are enabled - ".concat(d.dependsOn.join(", ")))}if(d.isCompatible())return this._features[s]={featureImplementation:d,enabled:!0,version:c,required:o},r?this._xrSessionManager.session&&!this._features[s].featureImplementation.attached&&this.attachFeature(s):this._features[s].featureImplementation.disableAutoAttach=!0,this._features[s].featureImplementation;if(o)throw new Error("required feature not compatible");return Pn.Warn("Feature ".concat(s," not compatible with the current environment/browser and was not enabled.")),d},e.prototype.getEnabledFeature=function(e){return this._features[e]&&this._features[e].featureImplementation},e.prototype.getEnabledFeatures=function(){return Object.keys(this._features)},e.prototype._extendXRSessionInitObject=function(e){return X(this,void 0,void 0,(function(){var t,n,i,r,o,a,s;return Y(this,(function(c){switch(c.label){case 0:t=this.getEnabledFeatures(),n=0,i=t,c.label=1;case 1:return n100&&(this.soft=!0),this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine?(this.object.rotationQuaternion||(this.object.rotation?this.object.rotationQuaternion=I.RotationYawPitchRoll(this.object.rotation.y,this.object.rotation.x,this.object.rotation.z):this.object.rotationQuaternion=new I),this._options.mass=void 0===i.mass?0:i.mass,this._options.friction=void 0===i.friction?.2:i.friction,this._options.restitution=void 0===i.restitution?.2:i.restitution,this.soft&&(this._options.mass=this._options.mass>0?this._options.mass:1,this._options.pressure=void 0===i.pressure?200:i.pressure,this._options.stiffness=void 0===i.stiffness?1:i.stiffness,this._options.velocityIterations=void 0===i.velocityIterations?20:i.velocityIterations,this._options.positionIterations=void 0===i.positionIterations?20:i.positionIterations,this._options.fixedPoints=void 0===i.fixedPoints?0:i.fixedPoints,this._options.margin=void 0===i.margin?0:i.margin,this._options.damping=void 0===i.damping?0:i.damping,this._options.path=void 0===i.path?null:i.path,this._options.shape=void 0===i.shape?null:i.shape),this._joints=[],!this.object.parent||this._options.ignoreParent?this._init():this.object.parent.physicsImpostor&&J.Warn("You must affect impostors to children before affecting impostor to parent.")):J.Error("Physics not enabled. Please use scene.enablePhysics(...) before creating impostors."))):J.Error("No object was provided. A physics object is obligatory")}return Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mass",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyMass(this):0},set:function(e){this.setMass(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"friction",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyFriction(this):0},set:function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyFriction(this,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"restitution",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyRestitution(this):0},set:function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyRestitution(this,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pressure",{get:function(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.setBodyPressure?e.getBodyPressure(this):0},set:function(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyPressure&&t.setBodyPressure(this,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stiffness",{get:function(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.getBodyStiffness?e.getBodyStiffness(this):0},set:function(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyStiffness&&t.setBodyStiffness(this,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"velocityIterations",{get:function(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.getBodyVelocityIterations?e.getBodyVelocityIterations(this):0},set:function(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyVelocityIterations&&t.setBodyVelocityIterations(this,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positionIterations",{get:function(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.getBodyPositionIterations?e.getBodyPositionIterations(this):0},set:function(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyPositionIterations&&t.setBodyPositionIterations(this,e)}},enumerable:!1,configurable:!0}),e.prototype._init=function(){this._physicsEngine&&(this._physicsEngine.removeImpostor(this),this.physicsBody=null,this._parent=this._parent||this._getPhysicsParent(),this._isDisposed||this.parent&&!this._options.ignoreParent||this._physicsEngine.addImpostor(this))},e.prototype._getPhysicsParent=function(){return this.object.parent instanceof kr?this.object.parent.physicsImpostor:null},e.prototype.isBodyInitRequired=function(){return this._bodyUpdateRequired||!this._physicsBody&&(!this._parent||!!this._options.ignoreParent)},e.prototype.setScalingUpdated=function(){this.forceUpdate()},e.prototype.forceUpdate=function(){this._init(),this.parent&&!this._options.ignoreParent&&this.parent.forceUpdate()},Object.defineProperty(e.prototype,"physicsBody",{get:function(){return this._parent&&!this._options.ignoreParent?this._parent.physicsBody:this._physicsBody},set:function(e){this._physicsBody&&this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this),this._physicsBody=e,this.resetUpdateFlags()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return!this._options.ignoreParent&&this._parent?this._parent:null},set:function(e){this._parent=e},enumerable:!1,configurable:!0}),e.prototype.resetUpdateFlags=function(){this._bodyUpdateRequired=!1},e.prototype.getObjectExtents=function(){if(this.object.getBoundingInfo){var t=this.object.rotationQuaternion,n=this.object.scaling.clone();this.object.rotationQuaternion=e.IDENTITY_QUATERNION;var i=this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0);i&&i.decompose(n,void 0,void 0);var r=this.object.getBoundingInfo().boundingBox.extendSize.scale(2).multiplyInPlace(n);return r.x=Math.abs(r.x),r.y=Math.abs(r.y),r.z=Math.abs(r.z),this.object.rotationQuaternion=t,this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0),r}return e.DEFAULT_OBJECT_SIZE},e.prototype.getObjectCenter=function(){return this.object.getBoundingInfo?this.object.getBoundingInfo().boundingBox.centerWorld:this.object.position},e.prototype.getParam=function(e){return this._options[e]},e.prototype.setParam=function(e,t){this._options[e]=t,this._bodyUpdateRequired=!0},e.prototype.setMass=function(e){this.getParam("mass")!==e&&this.setParam("mass",e),this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyMass(this,e)},e.prototype.getLinearVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getLinearVelocity(this):C.Zero()},e.prototype.setLinearVelocity=function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setLinearVelocity(this,e)},e.prototype.getAngularVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getAngularVelocity(this):C.Zero()},e.prototype.setAngularVelocity=function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setAngularVelocity(this,e)},e.prototype.executeNativeFunction=function(e){this._physicsEngine&&e(this._physicsEngine.getPhysicsPlugin().world,this.physicsBody)},e.prototype.registerBeforePhysicsStep=function(e){this._onBeforePhysicsStepCallbacks.push(e)},e.prototype.unregisterBeforePhysicsStep=function(e){var t=this._onBeforePhysicsStepCallbacks.indexOf(e);t>-1?this._onBeforePhysicsStepCallbacks.splice(t,1):J.Warn("Function to remove was not found")},e.prototype.registerAfterPhysicsStep=function(e){this._onAfterPhysicsStepCallbacks.push(e)},e.prototype.unregisterAfterPhysicsStep=function(e){var t=this._onAfterPhysicsStepCallbacks.indexOf(e);t>-1?this._onAfterPhysicsStepCallbacks.splice(t,1):J.Warn("Function to remove was not found")},e.prototype.registerOnPhysicsCollide=function(e,t){var n=e instanceof Array?e:[e];this._onPhysicsCollideCallbacks.push({callback:t,otherImpostors:n})},e.prototype.unregisterOnPhysicsCollide=function(e,t){var n=e instanceof Array?e:[e],i=-1;this._onPhysicsCollideCallbacks.some((function(e,r){if(e.callback===t&&e.otherImpostors.length===n.length){var o=e.otherImpostors.every((function(e){return n.indexOf(e)>-1}));return o&&(i=r),o}return!1}))?this._onPhysicsCollideCallbacks.splice(i,1):J.Warn("Function to remove was not found")},e.prototype.getParentsRotation=function(){var e=this.object.parent;for(this._tmpQuat.copyFromFloats(0,0,0,1);e;)e.rotationQuaternion?this._tmpQuat2.copyFrom(e.rotationQuaternion):I.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,e.rotation.z,this._tmpQuat2),this._tmpQuat.multiplyToRef(this._tmpQuat2,this._tmpQuat),e=e.parent;return this._tmpQuat},e.prototype.applyForce=function(e,t){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyForce(this,e,t),this},e.prototype.applyImpulse=function(e,t){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyImpulse(this,e,t),this},e.prototype.createJoint=function(e,t,n){var i=new Ko(t,n);return this.addJoint(e,i),this},e.prototype.addJoint=function(e,t){return this._joints.push({otherImpostor:e,joint:t}),this._physicsEngine&&this._physicsEngine.addJoint(this,e,t),this},e.prototype.addAnchor=function(e,t,n,i,r){if(!this._physicsEngine)return this;var o=this._physicsEngine.getPhysicsPlugin();return o.appendAnchor?(this._physicsEngine&&o.appendAnchor(this,e,t,n,i,r),this):this},e.prototype.addHook=function(e,t,n,i){if(!this._physicsEngine)return this;var r=this._physicsEngine.getPhysicsPlugin();return r.appendAnchor?(this._physicsEngine&&r.appendHook(this,e,t,n,i),this):this},e.prototype.sleep=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().sleepBody(this),this},e.prototype.wakeUp=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().wakeUpBody(this),this},e.prototype.clone=function(t){return t?new e(t,this.type,this._options,this._scene):null},e.prototype.dispose=function(){var e=this;this._physicsEngine&&(this._joints.forEach((function(t){e._physicsEngine&&e._physicsEngine.removeJoint(e,t.otherImpostor,t.joint)})),this._physicsEngine.removeImpostor(this),this.parent&&this.parent.forceUpdate(),this._isDisposed=!0)},e.prototype.setDeltaPosition=function(e){this._deltaPosition.copyFrom(e)},e.prototype.setDeltaRotation=function(e){this._deltaRotation||(this._deltaRotation=new I),this._deltaRotation.copyFrom(e),this._deltaRotationConjugated=this._deltaRotation.conjugate()},e.prototype.getBoxSizeToRef=function(e){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().getBoxSizeToRef(this,e),this},e.prototype.getRadius=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getRadius(this):0},e.prototype.syncBoneWithImpostor=function(t,n,i,r,o){var a=e._TmpVecs[0],s=this.object;if(s.rotationQuaternion)if(o){var c=e._TmpQuat;s.rotationQuaternion.multiplyToRef(o,c),t.setRotationQuaternion(c,Si.WORLD,n)}else t.setRotationQuaternion(s.rotationQuaternion,Si.WORLD,n);a.x=0,a.y=0,a.z=0,i&&(a.x=i.x,a.y=i.y,a.z=i.z,t.getDirectionToRef(a,n,a),null==r&&(r=i.length()),a.x*=r,a.y*=r,a.z*=r),t.getParent()?(a.addInPlace(s.getAbsolutePosition()),t.setAbsolutePosition(a,n)):(n.setAbsolutePosition(s.getAbsolutePosition()),n.position.x-=a.x,n.position.y-=a.y,n.position.z-=a.z)},e.prototype.syncImpostorWithBone=function(t,n,i,r,o,a){var s=this.object;if(s.rotationQuaternion)if(o){var c=e._TmpQuat;t.getRotationQuaternionToRef(Si.WORLD,n,c),c.multiplyToRef(o,s.rotationQuaternion)}else t.getRotationQuaternionToRef(Si.WORLD,n,s.rotationQuaternion);var l=e._TmpVecs[0],u=e._TmpVecs[1];a||((a=e._TmpVecs[2]).x=0,a.y=1,a.z=0),t.getDirectionToRef(a,n,u),t.getAbsolutePositionToRef(n,l),null==r&&i&&(r=i.length()),null!=r&&(l.x+=u.x*r,l.y+=u.y*r,l.z+=u.z*r),s.setAbsolutePosition(l)},e.DEFAULT_OBJECT_SIZE=new C(1,1,1),e.IDENTITY_QUATERNION=I.Identity(),e._TmpVecs=_.BuildArray(3,C.Zero),e._TmpQuat=I.Identity(),e.NoImpostor=0,e.SphereImpostor=1,e.BoxImpostor=2,e.PlaneImpostor=3,e.MeshImpostor=4,e.CapsuleImpostor=6,e.CylinderImpostor=7,e.ParticleImpostor=8,e.HeightmapImpostor=9,e.ConvexHullImpostor=10,e.CustomImpostor=100,e.RopeImpostor=101,e.ClothImpostor=102,e.SoftbodyImpostor=103,e}();!function(e){e[e.Clean=0]="Clean",e[e.Stop=1]="Stop",e[e.Sync=2]="Sync",e[e.NoSync=3]="NoSync"}(ea||(ea={}));var na,ia,ra=function(){function e(){}return Object.defineProperty(e,"ForceFullSceneLoadingForIncremental",{get:function(){return Pr.ForceFullSceneLoadingForIncremental},set:function(e){Pr.ForceFullSceneLoadingForIncremental=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"ShowLoadingScreen",{get:function(){return Pr.ShowLoadingScreen},set:function(e){Pr.ShowLoadingScreen=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"loggingLevel",{get:function(){return Pr.loggingLevel},set:function(e){Pr.loggingLevel=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"CleanBoneMatrixWeights",{get:function(){return Pr.CleanBoneMatrixWeights},set:function(e){Pr.CleanBoneMatrixWeights=e},enumerable:!1,configurable:!0}),e.GetDefaultPlugin=function(){return e._RegisteredPlugins[".babylon"]},e._GetPluginForExtension=function(t){return e._RegisteredPlugins[t]||(J.Warn("Unable to find a plugin to load "+t+" files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes"),e.GetDefaultPlugin())},e._GetPluginForDirectLoad=function(t){for(var n in e._RegisteredPlugins){var i=e._RegisteredPlugins[n].plugin;if(i.canDirectLoad&&i.canDirectLoad(t))return e._RegisteredPlugins[n]}return e.GetDefaultPlugin()},e._GetPluginForFilename=function(t){var n=t.indexOf("?");-1!==n&&(t=t.substring(0,n));var i=t.lastIndexOf("."),r=t.substring(i,t.length).toLowerCase();return e._GetPluginForExtension(r)},e._GetDirectLoad=function(e){return"data:"===e.substr(0,5)?e.substr(5):null},e._FormatErrorMessage=function(e,t,n){var i="Unable to load from "+(e.rawData?"binary data":e.url);return t?i+=": ".concat(t):n&&(i+=": ".concat(n)),i},e._LoadData=function(t,n,i,r,o,a,s,c){var l=e._GetDirectLoad(t.url);if(t.rawData&&!s)throw"When using ArrayBufferView to load data the file extension must be provided.";var u,h=s?e._GetPluginForExtension(s):l?e._GetPluginForDirectLoad(t.url):e._GetPluginForFilename(t.url);if(t.rawData&&!h.isBinary)throw"Loading from ArrayBufferView can not be used with plugins that don't support binary loading.";if(!(u=void 0!==h.plugin.createPlugin?h.plugin.createPlugin():h.plugin))throw"The loader plugin corresponding to the file type you are trying to load has not been found. If using es6, please import the plugin you wish to use before.";if(e.OnPluginActivatedObservable.notifyObservers(u),l&&(u.canDirectLoad&&u.canDirectLoad(t.url)||!yn(t.url))){if(u.directLoad){var d=u.directLoad(n,l);d.then?d.then((function(e){i(u,e)})).catch((function(e){o("Error in directLoad of _loadData: "+e,e)})):i(u,d)}else i(u,l);return u}var p=h.isBinary,f=function(e,t){n.isDisposed?o("Scene has been disposed"):i(u,e,t)},m=null,_=!1,g=u.onDisposeObservable;g&&g.add((function(){_=!0,m&&(m.abort(),m=null),a()}));var y=function(){if(!_){var e=function(e,t){o(null==e?void 0:e.statusText,t)};if(!u.loadFile&&t.rawData)throw"Plugin does not support loading ArrayBufferView.";m=u.loadFile?u.loadFile(n,t.rawData||t.file||t.url,t.rootUrl,f,r,p,e,c):n._loadFile(t.file||t.url,f,r,!0,p,e)}},v=n.getEngine(),b=v.enableOfflineSupport;if(b){for(var T=!1,E=0,A=n.disableOfflineSupportExceptionRules;E").concat(n.substitutionVars?"("+n.substitutionVars+")":"","[0..").concat(n.repeatKey,"]\n");var i=zt.IncludesShadersStore[e]+"\n";if(this.sharedData.emitComments&&(i=t+"\n"+i),!n)return i;if(n.replaceStrings)for(var r=0;r").concat(n.substitutionVars?"("+n.substitutionVars+")":"","[0..").concat(n.repeatKey,"]\n"):this.functions[r]="#include<".concat(e,">").concat((null==n?void 0:n.substitutionVars)?"("+(null==n?void 0:n.substitutionVars)+")":"","\n"),void(this.sharedData.emitComments&&(this.functions[r]=t+"\n"+this.functions[r]));if(this.functions[r]=zt.IncludesShadersStore[e],this.sharedData.emitComments&&(this.functions[r]=t+"\n"+this.functions[r]),n.removeIfDef&&(this.functions[r]=this.functions[r].replace(/^\s*?#ifdef.+$/gm,""),this.functions[r]=this.functions[r].replace(/^\s*?#endif.*$/gm,""),this.functions[r]=this.functions[r].replace(/^\s*?#else.*$/gm,""),this.functions[r]=this.functions[r].replace(/^\s*?#elif.*$/gm,"")),n.removeAttributes&&(this.functions[r]=this.functions[r].replace(/\s*?attribute .+?;/g,"\n")),n.removeUniforms&&(this.functions[r]=this.functions[r].replace(/\s*?uniform .*?;/g,"\n")),n.removeVaryings&&(this.functions[r]=this.functions[r].replace(/\s*?(varying|in) .+?;/g,"\n")),n.replaceStrings)for(var o=0;o0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDirectlyConnectedToVertexOutput",{get:function(){if(!this.hasEndpoints)return!1;for(var e=0,t=this._endpoints;e=0)&&(t.isExposedOnFrame=!0,t.exposedPortPosition=this.exposedPortPosition),t},e.prototype.dispose=function(){this.onConnectionObservable.clear()},e}(),ha=function(){function e(e,t,n){void 0===t&&(t=ia.Vertex),void 0===n&&(n=!1),this._isFinalMerger=!1,this._isInput=!1,this._isTeleportOut=!1,this._isTeleportIn=!1,this._name="",this._isUnique=!1,this.inputsAreExclusive=!1,this._codeVariableName="",this._inputs=new Array,this._outputs=new Array,this.comments="",this.visibleInInspector=!1,this.visibleOnFrame=!1,this._target=t,this._originalTargetIsNeutral=t===ia.Neutral,this._isFinalMerger=n,this._isInput="InputBlock"===this.getClassName(),this._isTeleportOut="NodeMaterialTeleportOutBlock"===this.getClassName(),this._isTeleportIn="NodeMaterialTeleportInBlock"===this.getClassName(),this._name=e,this.uniqueId=Ei.UniqueId}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this.validateBlockName(e)&&(this._name=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnique",{get:function(){return this._isUnique},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFinalMerger",{get:function(){return this._isFinalMerger},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInput",{get:function(){return this._isInput},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTeleportOut",{get:function(){return this._isTeleportOut},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTeleportIn",{get:function(){return this._isTeleportIn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buildId",{get:function(){return this._buildId},set:function(e){this._buildId=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},set:function(e){0==(this._target&e)&&(this._target=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inputs",{get:function(){return this._inputs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){return this._outputs},enumerable:!1,configurable:!0}),e.prototype.getInputByName=function(e){var t=this._inputs.filter((function(t){return t.name===e}));return t.length?t[0]:null},e.prototype.getOutputByName=function(e){var t=this._outputs.filter((function(t){return t.name===e}));return t.length?t[0]:null},e.prototype._setInitialTarget=function(e){this._target=e,this._originalTargetIsNeutral=e===ia.Neutral},e.prototype.initialize=function(e){},e.prototype.bind=function(e,t,n,i){},e.prototype._declareOutput=function(e,t){return"".concat(t._getGLType(e.type)," ").concat(e.associatedVariableName)},e.prototype._writeVariable=function(e){return e.connectedPoint?"".concat(e.associatedVariableName):"0."},e.prototype._writeFloat=function(e){var t=e.toString();return-1===t.indexOf(".")&&(t+=".0"),"".concat(t)},e.prototype.getClassName=function(){return"NodeMaterialBlock"},e.prototype.isConnectedInFragmentShader=function(){return this.outputs.some((function(e){return e.isConnectedInFragmentShader}))},e.prototype.registerInput=function(e,t,n,i,r){return void 0===n&&(n=!1),(r=null!=r?r:new ua(e,this,sa.Input)).type=t,r.isOptional=n,i&&(r.target=i),this._inputs.push(r),this},e.prototype.registerOutput=function(e,t,n,i){return(i=null!=i?i:new ua(e,this,sa.Output)).type=t,n&&(i.target=n),this._outputs.push(i),this},e.prototype.getFirstAvailableInput=function(e){void 0===e&&(e=null);for(var t=0,n=this._inputs;t=this._outputs.length?null:this._outputs[t+1]},e.prototype.isAnAncestorOf=function(e){for(var t=0,n=this._outputs;tthis._maxRank&&(this._maxRank=e),this._defines[e]=new Array),this._defines[e].push(t)},e.prototype.addCPUSkinningFallback=function(e,t){this._mesh=t,ethis._maxRank&&(this._maxRank=e)},Object.defineProperty(e.prototype,"hasMoreFallbacks",{get:function(){return this._currentRank<=this._maxRank},enumerable:!1,configurable:!0}),e.prototype.reduce=function(e,t){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,e=e.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),t._bonesComputationForcedToCPU=!0;for(var n=this._mesh.getScene(),i=0;i0&&(r.computeBonesUsingShaders=!1)}}else{var s=this._defines[this._currentRank];if(s)for(i=0;i0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._size.width||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._size.height||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layers",{get:function(){return this._size.layers||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){var e,t;return null!==(t=null===(e=this._textures)||void 0===e?void 0:e[0])&&void 0!==t?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textures",{get:function(){return this._textures},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"faceIndices",{get:function(){return this._faceIndices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layerIndices",{get:function(){return this._layerIndices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"samples",{get:function(){return this._samples},enumerable:!1,configurable:!0}),e.prototype.setSamples=function(e,t,n){if(void 0===t&&(t=!0),void 0===n&&(n=!1),this.samples===e&&!n)return e;var i=this._isMulti?this._engine.updateMultipleRenderTargetTextureSampleCount(this,e,t):this._engine.updateRenderTargetTextureSampleCount(this,e);return this._samples=e,i},e.prototype.setTextures=function(e){Array.isArray(e)?this._textures=e:this._textures=e?[e]:null},e.prototype.setTexture=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!0),this._textures||(this._textures=[]),this._textures[t]!==e&&(this._textures[t]&&n&&this._textures[t].dispose(),this._textures[t]=e)},e.prototype.setLayerAndFaceIndices=function(e,t){this._layerIndices=e,this._faceIndices=t},e.prototype.setLayerAndFaceIndex=function(e,t,n){void 0===e&&(e=0),this._layerIndices||(this._layerIndices=[]),this._faceIndices||(this._faceIndices=[]),void 0!==t&&t>=0&&(this._layerIndices[e]=t),void 0!==n&&n>=0&&(this._faceIndices[e]=n)},e.prototype.createDepthStencilTexture=function(e,t,n,i,r,o){var s;return void 0===e&&(e=0),void 0===t&&(t=!0),void 0===n&&(n=!1),void 0===i&&(i=1),void 0===r&&(r=a.TEXTUREFORMAT_DEPTH32_FLOAT),null===(s=this._depthStencilTexture)||void 0===s||s.dispose(),this._depthStencilTextureWithStencil=n,this._depthStencilTexture=this._engine.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:n,isCube:this._isCube,samples:i,depthTextureFormat:r,label:o},this),this._depthStencilTexture},e.prototype._shareDepth=function(e){this._depthStencilTexture&&(e._depthStencilTexture&&e._depthStencilTexture.dispose(),e._depthStencilTexture=this._depthStencilTexture,this._depthStencilTexture.incrementReferences())},e.prototype._swapAndDie=function(e){this.texture&&this.texture._swapAndDie(e),this._textures=null,this.dispose(!0)},e.prototype._cloneRenderTargetWrapper=function(){var e,t,n,i,r,o,s,c,l=null;if(this._isMulti){var u=this.textures;if(u&&u.length>0){var h=!1,d=u.length,p=u[u.length-1]._source;p!==wt.Depth&&p!==wt.DepthStencil||(h=!0,d--);for(var f=[],m=[],_=[],g=[],y=[],v=[],b=[],T={},E=0;E1&&e.setSamples(this.samples),e._swapRenderTargetWrapper(this),e.dispose()}},e.prototype.releaseTextures=function(){var e,t;if(this._textures)for(var n=0;null!==(t=n<(null===(e=this._textures)||void 0===e?void 0:e.length))&&void 0!==t&&t;++n)this._textures[n].dispose();this._textures=null},e.prototype.dispose=function(e){var t;void 0===e&&(e=!1),e||(null===(t=this._depthStencilTexture)||void 0===t||t.dispose(),this._depthStencilTexture=null,this.releaseTextures()),this._engine._releaseRenderTargetWrapper(this)},e}(),Ma=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,i,r)||this;return a._framebuffer=null,a._depthStencilBuffer=null,a._MSAAFramebuffer=null,a._colorTextureArray=null,a._depthStencilTextureArray=null,a._disposeOnlyFramebuffers=!1,a._currentLOD=0,a._context=o,a}return H(t,e),t.prototype._cloneRenderTargetWrapper=function(){var t=null;return this._colorTextureArray&&this._depthStencilTextureArray?(t=this._engine.createMultiviewRenderTargetTexture(this.width,this.height)).texture.isReady=!0:t=e.prototype._cloneRenderTargetWrapper.call(this),t},t.prototype._swapRenderTargetWrapper=function(t){e.prototype._swapRenderTargetWrapper.call(this,t),t._framebuffer=this._framebuffer,t._depthStencilBuffer=this._depthStencilBuffer,t._MSAAFramebuffer=this._MSAAFramebuffer,t._colorTextureArray=this._colorTextureArray,t._depthStencilTextureArray=this._depthStencilTextureArray,this._framebuffer=this._depthStencilBuffer=this._MSAAFramebuffer=this._colorTextureArray=this._depthStencilTextureArray=null},t.prototype._shareDepth=function(t){e.prototype._shareDepth.call(this,t);var n=this._context,i=this._depthStencilBuffer,r=t._MSAAFramebuffer||t._framebuffer;t._depthStencilBuffer&&t._depthStencilBuffer!==i&&n.deleteRenderbuffer(t._depthStencilBuffer),t._depthStencilBuffer=i;var o=t._generateStencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT;this._engine._bindUnboundFramebuffer(r),n.framebufferRenderbuffer(n.FRAMEBUFFER,o,n.RENDERBUFFER,i),this._engine._bindUnboundFramebuffer(null)},t.prototype._bindTextureRenderTarget=function(e,t,n,i){var r,o,a,s;if(void 0===t&&(t=0),void 0===i&&(i=0),e._hardwareTexture){var c=this._framebuffer,l=this._engine._currentFramebuffer;if(this._engine._bindUnboundFramebuffer(c),this._engine.webGLVersion>1){var u=(h=this._context)["COLOR_ATTACHMENT"+t];e.is2DArray||e.is3D?(n=null!==(o=null!=n?n:null===(r=this.layerIndices)||void 0===r?void 0:r[t])&&void 0!==o?o:0,h.framebufferTextureLayer(h.FRAMEBUFFER,u,e._hardwareTexture.underlyingResource,i,n)):e.isCube?(n=null!==(s=null!=n?n:null===(a=this.faceIndices)||void 0===a?void 0:a[t])&&void 0!==s?s:0,h.framebufferTexture2D(h.FRAMEBUFFER,u,h.TEXTURE_CUBE_MAP_POSITIVE_X+n,e._hardwareTexture.underlyingResource,i)):h.framebufferTexture2D(h.FRAMEBUFFER,u,h.TEXTURE_2D,e._hardwareTexture.underlyingResource,i)}else{u=(h=this._context)["COLOR_ATTACHMENT"+t+"_WEBGL"];var h,d=void 0!==n?h.TEXTURE_CUBE_MAP_POSITIVE_X+n:h.TEXTURE_2D;h.framebufferTexture2D(h.FRAMEBUFFER,u,d,e._hardwareTexture.underlyingResource,i)}this._engine._bindUnboundFramebuffer(l)}},t.prototype.setTexture=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!0),e.prototype.setTexture.call(this,t,n,i),this._bindTextureRenderTarget(t,n)},t.prototype.setLayerAndFaceIndices=function(t,n){var i,r;if(e.prototype.setLayerAndFaceIndices.call(this,t,n),this.textures&&this.layerIndices&&this.faceIndices)for(var o=null!==(r=null===(i=this._attachments)||void 0===i?void 0:i.length)&&void 0!==r?r:this.textures.length,a=0;a1&&(s.format===a.TEXTUREFORMAT_DEPTH16?d=i.DEPTH_COMPONENT16:s.format===a.TEXTUREFORMAT_DEPTH24?d=i.DEPTH_COMPONENT24:s.format===a.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8||s.format===a.TEXTUREFORMAT_DEPTH24_STENCIL8?d=i.DEPTH24_STENCIL8:s.format===a.TEXTUREFORMAT_DEPTH32_FLOAT?d=i.DEPTH_COMPONENT32F:s.format===a.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8&&(d=i.DEPTH32F_STENCIL8)),s.is2DArray?i.texImage3D(o,0,d,s.width,s.height,r,0,h,u,null):i.texImage2D(o,0,d,s.width,s.height,0,h,u,null),this._bindTextureDirectly(o,null),this._internalTexturesCache.push(s);var p=n;if(p._depthStencilBuffer){var f=this._currentFramebuffer;this._bindUnboundFramebuffer(p._framebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,null),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,null),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.STENCIL_ATTACHMENT,i.RENDERBUFFER,null),this._bindUnboundFramebuffer(f),i.deleteRenderbuffer(p._depthStencilBuffer),p._depthStencilBuffer=null}return s},rn.prototype.updateRenderTargetTextureSampleCount=function(e,t){if(this.webGLVersion<2||!e||!e.texture)return 1;if(e.samples===t)return t;var n=this._gl;t=Math.min(t,this.getCaps().maxMSAASamples),e._depthStencilBuffer&&(n.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(n.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null);var i=e.texture._hardwareTexture;if(i.releaseMSAARenderBuffers(),t>1&&"function"==typeof n.renderbufferStorageMultisample){var r=n.createFramebuffer();if(!r)throw new Error("Unable to create multi sampled framebuffer");e._MSAAFramebuffer=r,this._bindUnboundFramebuffer(e._MSAAFramebuffer);var o=this._createRenderBuffer(e.texture.width,e.texture.height,t,-1,this._getRGBABufferInternalSizedFormat(e.texture.type,e.texture.format,e.texture._useSRGBBuffer),n.COLOR_ATTACHMENT0,!1);if(!o)throw new Error("Unable to create multi sampled framebuffer");i.addMSAARenderBuffer(o)}else this._bindUnboundFramebuffer(e._framebuffer);return e.texture.samples=t,e._samples=t,e._depthStencilBuffer=this._setupFramebufferDepthAttachments(e._generateStencilBuffer,e._generateDepthBuffer,e.texture.width,e.texture.height,t),this._bindUnboundFramebuffer(null),t};var Da=function(){function e(e,t,n,i,r,o,s,c,l,h,d,p,f,m,_,g){var y,v,b,T,E,A,x,C,P,I,R,O;void 0===s&&(s=a.TEXTURE_NEAREST_SAMPLINGMODE),void 0===h&&(h=null),void 0===d&&(d=a.TEXTURETYPE_UNSIGNED_INT),void 0===p&&(p="postprocess"),void 0===m&&(m=!1),void 0===_&&(_=a.TEXTUREFORMAT_RGBA),void 0===g&&(g=at.GLSL),this._parentContainer=null,this.width=-1,this.height=-1,this.nodeMaterialSource=null,this._outputTexture=null,this.autoClear=!0,this.forceAutoClearInAlphaMode=!1,this.alphaMode=a.ALPHA_DISABLE,this.animations=[],this.enablePixelPerfectMode=!1,this.forceFullscreenViewport=!0,this.scaleMode=a.SCALEMODE_FLOOR,this.alwaysForcePOT=!1,this._samples=1,this.adaptScaleToCurrentViewport=!1,this._reusable=!1,this._renderId=0,this.externalTextureSamplerBinding=!1,this._textures=new On(2),this._textureCache=[],this._currentRenderTextureInd=0,this._scaleRatio=new S(1,1),this._texelSize=S.Zero(),this.onActivateObservable=new u,this.onSizeChangedObservable=new u,this.onApplyObservable=new u,this.onBeforeRenderObservable=new u,this.onAfterRenderObservable=new u,this.name=e;var w=1,M=null;if(n&&!Array.isArray(n)){var D=n;n=null!==(y=D.uniforms)&&void 0!==y?y:null,i=null!==(v=D.samplers)&&void 0!==v?v:null,w=null!==(b=D.size)&&void 0!==b?b:1,o=null!==(T=D.camera)&&void 0!==T?T:null,s=null!==(E=D.samplingMode)&&void 0!==E?E:a.TEXTURE_NEAREST_SAMPLINGMODE,c=D.engine,l=D.reusable,h=null!==(A=D.defines)&&void 0!==A?A:null,d=null!==(x=D.textureType)&&void 0!==x?x:a.TEXTURETYPE_UNSIGNED_INT,p=null!==(C=D.vertexUrl)&&void 0!==C?C:"postprocess",f=D.indexParameters,m=null!==(P=D.blockCompilation)&&void 0!==P&&P,_=null!==(I=D.textureFormat)&&void 0!==I?I:a.TEXTUREFORMAT_RGBA,g=null!==(R=D.shaderLanguage)&&void 0!==R?R:at.GLSL,M=null!==(O=D.uniformBuffers)&&void 0!==O?O:null}else r&&(w="number"==typeof r?r:{width:r.width,height:r.height});null!=o?(this._camera=o,this._scene=o.getScene(),o.attachPostProcess(this),this._engine=this._scene.getEngine(),this._scene.postProcesses.push(this),this.uniqueId=this._scene.getUniqueId()):c&&(this._engine=c,this._engine.postProcesses.push(this)),this._options=w,this.renderTargetSamplingMode=s||a.TEXTURE_NEAREST_SAMPLINGMODE,this._reusable=l||!1,this._textureType=d,this._textureFormat=_,this._shaderLanguage=g,this._samplers=i||[],this._samplers.push("textureSampler"),this._fragmentUrl=t,this._vertexUrl=p,this._parameters=n||[],this._parameters.push("scale"),this._uniformBuffers=M||[],this._indexParameters=f,this._drawWrapper=new en(this._engine),m||this.updateEffect(h)}return e.RegisterShaderCodeProcessing=function(t,n){n?e._CustomShaderCodeProcessing[null!=t?t:""]=n:delete e._CustomShaderCodeProcessing[null!=t?t:""]},e._GetShaderCodeProcessing=function(t){var n;return null!==(n=e._CustomShaderCodeProcessing[t])&&void 0!==n?n:e._CustomShaderCodeProcessing[""]},Object.defineProperty(e.prototype,"samples",{get:function(){return this._samples},set:function(e){var t=this;this._samples=Math.min(e,this._engine.getCaps().maxMSAASamples),this._textures.forEach((function(e){e.setSamples(t._samples)}))},enumerable:!1,configurable:!0}),e.prototype.getEffectName=function(){return this._fragmentUrl},Object.defineProperty(e.prototype,"onActivate",{set:function(e){this._onActivateObserver&&this.onActivateObservable.remove(this._onActivateObserver),e&&(this._onActivateObserver=this.onActivateObservable.add(e))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSizeChanged",{set:function(e){this._onSizeChangedObserver&&this.onSizeChangedObservable.remove(this._onSizeChangedObserver),this._onSizeChangedObserver=this.onSizeChangedObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onApply",{set:function(e){this._onApplyObserver&&this.onApplyObservable.remove(this._onApplyObserver),this._onApplyObserver=this.onApplyObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBeforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onAfterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inputTexture",{get:function(){return this._textures.data[this._currentRenderTextureInd]},set:function(e){this._forcedOutputTexture=e},enumerable:!1,configurable:!0}),e.prototype.restoreDefaultInputTexture=function(){this._forcedOutputTexture&&(this._forcedOutputTexture=null,this.markTextureDirty())},e.prototype.getCamera=function(){return this._camera},Object.defineProperty(e.prototype,"texelSize",{get:function(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.texelSize:(this._forcedOutputTexture&&this._texelSize.copyFromFloats(1/this._forcedOutputTexture.width,1/this._forcedOutputTexture.height),this._texelSize)},enumerable:!1,configurable:!0}),e.prototype.getClassName=function(){return"PostProcess"},e.prototype.getEngine=function(){return this._engine},e.prototype.getEffect=function(){return this._drawWrapper.effect},e.prototype.shareOutputWith=function(e){return this._disposeTextures(),this._shareOutputWithPostProcess=e,this},e.prototype.useOwnOutput=function(){0==this._textures.length&&(this._textures=new On(2)),this._shareOutputWithPostProcess=null},e.prototype.updateEffect=function(t,n,i,r,o,a,s,c){var l,u,h=this;void 0===t&&(t=null),void 0===n&&(n=null),void 0===i&&(i=null);var d=e._GetShaderCodeProcessing(this.name);if(null==d?void 0:d.defineCustomBindings){var p=null!==(l=null==n?void 0:n.slice())&&void 0!==l?l:[];p.push.apply(p,this._parameters);var f=null!==(u=null==i?void 0:i.slice())&&void 0!==u?u:[];f.push.apply(f,this._samplers),t=d.defineCustomBindings(this.name,t,p,f),n=p,i=f}this._postProcessDefines=t,this._drawWrapper.effect=this._engine.createEffect({vertex:null!=s?s:this._vertexUrl,fragment:null!=c?c:this._fragmentUrl},{attributes:["position"],uniformsNames:n||this._parameters,uniformBuffersNames:this._uniformBuffers,samplers:i||this._samplers,defines:null!==t?t:"",fallbacks:null,onCompiled:null!=o?o:null,onError:null!=a?a:null,indexParameters:r||this._indexParameters,processCodeAfterIncludes:(null==d?void 0:d.processCodeAfterIncludes)?function(e,t){return d.processCodeAfterIncludes(h.name,e,t)}:null,processFinalCode:(null==d?void 0:d.processFinalCode)?function(e,t){return d.processFinalCode(h.name,e,t)}:null,shaderLanguage:this._shaderLanguage},this._engine)},e.prototype.isReusable=function(){return this._reusable},e.prototype.markTextureDirty=function(){this.width=-1},e.prototype._createRenderTargetTexture=function(e,t,n){void 0===n&&(n=0);for(var i=0;i=0;t--)if(e-this._textureCache[t].lastUsedRenderId>100){for(var n=!1,i=0;i0&&this._textures.reset(),this.width=e,this.height=t;var o=null;if(n)for(var a=0;a=0;e--)this._textureCache[e].texture.dispose();this._textureCache.length=0},e.prototype.setPrePassRenderer=function(e){return!!this._prePassEffectConfiguration&&(this._prePassEffectConfiguration=e.addEffectConfiguration(this._prePassEffectConfiguration),this._prePassEffectConfiguration.enabled=!0,!0)},e.prototype.dispose=function(e){var t;if(e=e||this._camera,this._disposeTextures(),this._scene&&-1!==(t=this._scene.postProcesses.indexOf(this))&&this._scene.postProcesses.splice(t,1),this._parentContainer){var n=this._parentContainer.postProcesses.indexOf(this);n>-1&&this._parentContainer.postProcesses.splice(n,1),this._parentContainer=null}if(-1!==(t=this._engine.postProcesses.indexOf(this))&&this._engine.postProcesses.splice(t,1),e){if(e.detachPostProcess(this),0===(t=e._postProcesses.indexOf(this))&&e._postProcesses.length>0){var i=this._camera._getFirstPostProcess();i&&i.markTextureDirty()}this.onActivateObservable.clear(),this.onAfterRenderObservable.clear(),this.onApplyObservable.clear(),this.onBeforeRenderObservable.clear(),this.onSizeChangedObservable.clear()}},e.prototype.serialize=function(){var e=ke.Serialize(this),t=this.getCamera()||this._scene&&this._scene.activeCamera;return e.customType="BABYLON."+this.getClassName(),e.cameraId=t?t.id:null,e.reusable=this._reusable,e.textureType=this._textureType,e.fragmentUrl=this._fragmentUrl,e.parameters=this._parameters,e.samplers=this._samplers,e.options=this._options,e.defines=this._postProcessDefines,e.textureFormat=this._textureFormat,e.vertexUrl=this._vertexUrl,e.indexParameters=this._indexParameters,e},e.prototype.clone=function(){var t=this.serialize();t._engine=this._engine,t.cameraId=null;var n=e.Parse(t,this._scene,"");return n?(n.onActivateObservable=this.onActivateObservable.clone(),n.onSizeChangedObservable=this.onSizeChangedObservable.clone(),n.onApplyObservable=this.onApplyObservable.clone(),n.onBeforeRenderObservable=this.onBeforeRenderObservable.clone(),n.onAfterRenderObservable=this.onAfterRenderObservable.clone(),n._prePassEffectConfiguration=this._prePassEffectConfiguration,n):null},e.Parse=function(e,t,n){var i=T(e.customType);if(!i||!i._Parse)return null;var r=t?t.getCameraById(e.cameraId):null;return i._Parse(e,r,t,n)},e._Parse=function(t,n,i,r){return ke.Parse((function(){return new e(t.name,t.fragmentUrl,t.parameters,t.samplers,t.options,n,t.renderTargetSamplingMode,t._engine,t.reusable,t.defines,t.textureType,t.vertexUrl,t.indexParameters,!1,t.textureFormat)}),t,i,r)},e._CustomShaderCodeProcessing={},W([Se()],e.prototype,"uniqueId",void 0),W([Se()],e.prototype,"name",void 0),W([Se()],e.prototype,"width",void 0),W([Se()],e.prototype,"height",void 0),W([Se()],e.prototype,"renderTargetSamplingMode",void 0),W([De()],e.prototype,"clearColor",void 0),W([Se()],e.prototype,"autoClear",void 0),W([Se()],e.prototype,"forceAutoClearInAlphaMode",void 0),W([Se()],e.prototype,"alphaMode",void 0),W([Se()],e.prototype,"alphaConstants",void 0),W([Se()],e.prototype,"enablePixelPerfectMode",void 0),W([Se()],e.prototype,"forceFullscreenViewport",void 0),W([Se()],e.prototype,"scaleMode",void 0),W([Se()],e.prototype,"alwaysForcePOT",void 0),W([Se("samples")],e.prototype,"_samples",void 0),W([Se()],e.prototype,"adaptScaleToCurrentViewport",void 0),e}();b("BABYLON.PostProcess",Da);var Na=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.xSwizzle="x",n.ySwizzle="y",n.zSwizzle="z",n.wSwizzle="w",n.registerInput("xyzw ",na.Vector4,!0),n.registerInput("xyz ",na.Vector3,!0),n.registerInput("xy ",na.Vector2,!0),n.registerInput("zw ",na.Vector2,!0),n.registerInput("x",na.Float,!0),n.registerInput("y",na.Float,!0),n.registerInput("z",na.Float,!0),n.registerInput("w",na.Float,!0),n.registerOutput("xyzw",na.Vector4),n.registerOutput("xyz",na.Vector3),n.registerOutput("xy",na.Vector2),n.registerOutput("zw",na.Vector2),n}return H(t,e),t.prototype.getClassName=function(){return"VectorMergerBlock"},Object.defineProperty(t.prototype,"xyzwIn",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyzIn",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyIn",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zwIn",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._inputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"z",{get:function(){return this._inputs[6]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"w",{get:function(){return this._inputs[7]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyzw",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyzOut",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyOut",{get:function(){return this._outputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zwOut",{get:function(){return this._outputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xy",{get:function(){return this.xyOut},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyz",{get:function(){return this.xyzOut},enumerable:!1,configurable:!0}),t.prototype._inputRename=function(e){return"xyzw "===e?"xyzwIn":"xyz "===e?"xyzIn":"xy "===e?"xyIn":"zw "===e?"zwIn":e},t.prototype._buildSwizzle=function(e){return"."+(this.xSwizzle+this.ySwizzle+this.zSwizzle+this.wSwizzle).substr(0,e)},t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this.x,i=this.y,r=this.z,o=this.w,a=this.xyIn,s=this.zwIn,c=this.xyzIn,l=this.xyzwIn,u=this._outputs[0],h=this._outputs[1],d=this._outputs[2],p=this._outputs[3];return l.isConnected?(u.hasEndpoints&&(t.compilationString+=this._declareOutput(u,t)+" = ".concat(l.associatedVariableName).concat(this._buildSwizzle(4),";\n")),h.hasEndpoints&&(t.compilationString+=this._declareOutput(h,t)+" = ".concat(l.associatedVariableName).concat(this._buildSwizzle(3),";\n")),d.hasEndpoints&&(t.compilationString+=this._declareOutput(d,t)+" = ".concat(l.associatedVariableName).concat(this._buildSwizzle(2),";\n"))):c.isConnected?(u.hasEndpoints&&(t.compilationString+=this._declareOutput(u,t)+" = vec4(".concat(c.associatedVariableName,", ").concat(o.isConnected?this._writeVariable(o):"0.0",")").concat(this._buildSwizzle(4),";\n")),h.hasEndpoints&&(t.compilationString+=this._declareOutput(h,t)+" = ".concat(c.associatedVariableName).concat(this._buildSwizzle(3),";\n")),d.hasEndpoints&&(t.compilationString+=this._declareOutput(d,t)+" = ".concat(c.associatedVariableName).concat(this._buildSwizzle(2),";\n"))):a.isConnected?(u.hasEndpoints&&(s.isConnected?t.compilationString+=this._declareOutput(u,t)+" = vec4(".concat(a.associatedVariableName,", ").concat(s.associatedVariableName,")").concat(this._buildSwizzle(4),";\n"):t.compilationString+=this._declareOutput(u,t)+" = vec4(".concat(a.associatedVariableName,", ").concat(r.isConnected?this._writeVariable(r):"0.0",", ").concat(o.isConnected?this._writeVariable(o):"0.0",")").concat(this._buildSwizzle(4),";\n")),h.hasEndpoints&&(t.compilationString+=this._declareOutput(h,t)+" = vec3(".concat(a.associatedVariableName,", ").concat(r.isConnected?this._writeVariable(r):"0.0",")").concat(this._buildSwizzle(3),";\n")),d.hasEndpoints&&(t.compilationString+=this._declareOutput(d,t)+" = ".concat(a.associatedVariableName).concat(this._buildSwizzle(2),";\n")),p.hasEndpoints&&(s.isConnected?t.compilationString+=this._declareOutput(p,t)+" = ".concat(s.associatedVariableName).concat(this._buildSwizzle(2),";\n"):t.compilationString+=this._declareOutput(p,t)+" = vec2(".concat(r.isConnected?this._writeVariable(r):"0.0",", ").concat(o.isConnected?this._writeVariable(o):"0.0",")").concat(this._buildSwizzle(2),";\n"))):(u.hasEndpoints&&(s.isConnected?t.compilationString+=this._declareOutput(u,t)+" = vec4(".concat(n.isConnected?this._writeVariable(n):"0.0",", ").concat(i.isConnected?this._writeVariable(i):"0.0",", ").concat(s.associatedVariableName,")").concat(this._buildSwizzle(4),";\n"):t.compilationString+=this._declareOutput(u,t)+" = vec4(".concat(n.isConnected?this._writeVariable(n):"0.0",", ").concat(i.isConnected?this._writeVariable(i):"0.0",", ").concat(r.isConnected?this._writeVariable(r):"0.0",", ").concat(o.isConnected?this._writeVariable(o):"0.0",")").concat(this._buildSwizzle(4),";\n")),h.hasEndpoints&&(t.compilationString+=this._declareOutput(h,t)+" = vec3(".concat(n.isConnected?this._writeVariable(n):"0.0",", ").concat(i.isConnected?this._writeVariable(i):"0.0",", ").concat(r.isConnected?this._writeVariable(r):"0.0",")").concat(this._buildSwizzle(3),";\n")),d.hasEndpoints&&(t.compilationString+=this._declareOutput(d,t)+" = vec2(".concat(n.isConnected?this._writeVariable(n):"0.0",", ").concat(i.isConnected?this._writeVariable(i):"0.0",")").concat(this._buildSwizzle(2),";\n")),p.hasEndpoints&&(s.isConnected?t.compilationString+=this._declareOutput(p,t)+" = ".concat(s.associatedVariableName).concat(this._buildSwizzle(2),";\n"):t.compilationString+=this._declareOutput(p,t)+" = vec2(".concat(r.isConnected?this._writeVariable(r):"0.0",", ").concat(o.isConnected?this._writeVariable(o):"0.0",")").concat(this._buildSwizzle(2),";\n"))),this},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.xSwizzle=this.xSwizzle,t.ySwizzle=this.ySwizzle,t.zSwizzle=this.zSwizzle,t.wSwizzle=this.wSwizzle,t},t.prototype._deserialize=function(t,n,i){var r,o,a,s;e.prototype._deserialize.call(this,t,n,i),this.xSwizzle=null!==(r=t.xSwizzle)&&void 0!==r?r:"x",this.ySwizzle=null!==(o=t.ySwizzle)&&void 0!==o?o:"y",this.zSwizzle=null!==(a=t.zSwizzle)&&void 0!==a?a:"z",this.wSwizzle=null!==(s=t.wSwizzle)&&void 0!==s?s:"w"},t.prototype._dumpPropertiesCode=function(){var t=e.prototype._dumpPropertiesCode.call(this);return t+="".concat(this._codeVariableName,'.xSwizzle = "').concat(this.xSwizzle,'";\n'),t+="".concat(this._codeVariableName,'.ySwizzle = "').concat(this.ySwizzle,'";\n'),(t+="".concat(this._codeVariableName,'.zSwizzle = "').concat(this.zSwizzle,'";\n'))+"".concat(this._codeVariableName,'.wSwizzle = "').concat(this.wSwizzle,'";\n')},t}(ha);b("BABYLON.VectorMergerBlock",Na);var La=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.sourceRange=new S(-1,1),n.targetRange=new S(0,1),n.registerInput("input",na.AutoDetect),n.registerInput("sourceMin",na.Float,!0),n.registerInput("sourceMax",na.Float,!0),n.registerInput("targetMin",na.Float,!0),n.registerInput("targetMax",na.Float,!0),n.registerOutput("output",na.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n}return H(t,e),t.prototype.getClassName=function(){return"RemapBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sourceMin",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sourceMax",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetMin",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetMax",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this._outputs[0],i=this.sourceMin.isConnected?this.sourceMin.associatedVariableName:this._writeFloat(this.sourceRange.x),r=this.sourceMax.isConnected?this.sourceMax.associatedVariableName:this._writeFloat(this.sourceRange.y),o=this.targetMin.isConnected?this.targetMin.associatedVariableName:this._writeFloat(this.targetRange.x),a=this.targetMax.isConnected?this.targetMax.associatedVariableName:this._writeFloat(this.targetRange.y);return t.compilationString+=this._declareOutput(n,t)+" = ".concat(o," + (").concat(this._inputs[0].associatedVariableName," - ").concat(i,") * (").concat(a," - ").concat(o,") / (").concat(r," - ").concat(i,");\n"),this},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".sourceRange = new BABYLON.Vector2(").concat(this.sourceRange.x,", ").concat(this.sourceRange.y,");\n")+"".concat(this._codeVariableName,".targetRange = new BABYLON.Vector2(").concat(this.targetRange.x,", ").concat(this.targetRange.y,");\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.sourceRange=this.sourceRange.asArray(),t.targetRange=this.targetRange.asArray(),t},t.prototype._deserialize=function(t,n,i){e.prototype._deserialize.call(this,t,n,i),this.sourceRange=S.FromArray(t.sourceRange),this.targetRange=S.FromArray(t.targetRange)},W([ma("From",pa.Vector2)],t.prototype,"sourceRange",void 0),W([ma("To",pa.Vector2)],t.prototype,"targetRange",void 0),t}(ha);b("BABYLON.RemapBlock",La);var Fa,Ba=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.registerInput("left",na.AutoDetect),n.registerInput("right",na.AutoDetect),n.registerOutput("output",na.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n._linkConnectionTypes(0,1),n._inputs[0].acceptedConnectionPointTypes.push(na.Float),n._inputs[1].acceptedConnectionPointTypes.push(na.Float),n}return H(t,e),t.prototype.getClassName=function(){return"MultiplyBlock"},Object.defineProperty(t.prototype,"left",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this._outputs[0];return t.compilationString+=this._declareOutput(n,t)+" = ".concat(this.left.associatedVariableName," * ").concat(this.right.associatedVariableName,";\n"),this},t}(ha);b("BABYLON.MultiplyBlock",Ba),function(e){e[e.Material=0]="Material",e[e.PostProcess=1]="PostProcess",e[e.Particle=2]="Particle",e[e.ProceduralTexture=3]="ProceduralTexture"}(Fa||(Fa={}));var Ua=function(){function e(){this.direction1=new C(0,1,0),this.direction2=new C(0,1,0),this.minEmitBox=new C(-.5,-.5,-.5),this.maxEmitBox=new C(.5,.5,.5)}return e.prototype.startDirectionFunction=function(e,t,n,i){var r=h.RandomRange(this.direction1.x,this.direction2.x),o=h.RandomRange(this.direction1.y,this.direction2.y),a=h.RandomRange(this.direction1.z,this.direction2.z);if(i)return t.x=r,t.y=o,void(t.z=a);C.TransformNormalFromFloatsToRef(r,o,a,e,t)},e.prototype.startPositionFunction=function(e,t,n,i){var r=h.RandomRange(this.minEmitBox.x,this.maxEmitBox.x),o=h.RandomRange(this.minEmitBox.y,this.maxEmitBox.y),a=h.RandomRange(this.minEmitBox.z,this.maxEmitBox.z);if(i)return t.x=r,t.y=o,void(t.z=a);C.TransformCoordinatesFromFloatsToRef(r,o,a,e,t)},e.prototype.clone=function(){var t=new e;return he.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2),e.setVector3("minEmitBox",this.minEmitBox),e.setVector3("maxEmitBox",this.maxEmitBox)},e.prototype.buildUniformLayout=function(e){e.addUniform("direction1",3),e.addUniform("direction2",3),e.addUniform("minEmitBox",3),e.addUniform("maxEmitBox",3)},e.prototype.getEffectDefines=function(){return"#define BOXEMITTER"},e.prototype.getClassName=function(){return"BoxParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e.minEmitBox=this.minEmitBox.asArray(),e.maxEmitBox=this.maxEmitBox.asArray(),e},e.prototype.parse=function(e){C.FromArrayToRef(e.direction1,0,this.direction1),C.FromArrayToRef(e.direction2,0,this.direction2),C.FromArrayToRef(e.minEmitBox,0,this.minEmitBox),C.FromArrayToRef(e.maxEmitBox,0,this.maxEmitBox)},e}(),ka=function(){function e(e,t,n){void 0===e&&(e=1),void 0===t&&(t=Math.PI),void 0===n&&(n=0),this.directionRandomizer=n,this.radiusRange=1,this.heightRange=1,this.emitFromSpawnPointOnly=!1,this.angle=t,this.radius=e}return Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(e){this._radius=e,this._buildHeight()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._buildHeight()},enumerable:!1,configurable:!0}),e.prototype._buildHeight=function(){0!==this._angle?this._height=this._radius/Math.tan(this._angle/2):this._height=1},e.prototype.startDirectionFunction=function(e,t,n,i){i?w.Vector3[0].copyFrom(n._localPosition).normalize():n.position.subtractToRef(e.getTranslation(),w.Vector3[0]).normalize();var r=h.RandomRange(0,this.directionRandomizer),o=h.RandomRange(0,this.directionRandomizer),a=h.RandomRange(0,this.directionRandomizer);t.x=w.Vector3[0].x+r,t.y=w.Vector3[0].y+o,t.z=w.Vector3[0].z+a,t.normalize()},e.prototype.startPositionFunction=function(e,t,n,i){var r,o=h.RandomRange(0,2*Math.PI);r=this.emitFromSpawnPointOnly?1e-4:1-(r=h.RandomRange(0,this.heightRange))*r;var a=this._radius-h.RandomRange(0,this._radius*this.radiusRange),s=(a*=r)*Math.sin(o),c=a*Math.cos(o),l=r*this._height;if(i)return t.x=s,t.y=l,void(t.z=c);C.TransformCoordinatesFromFloatsToRef(s,l,c,e,t)},e.prototype.clone=function(){var t=new e(this._radius,this._angle,this.directionRandomizer);return he.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setFloat2("radius",this._radius,this.radiusRange),e.setFloat("coneAngle",this._angle),e.setFloat2("height",this._height,this.heightRange),e.setFloat("directionRandomizer",this.directionRandomizer)},e.prototype.buildUniformLayout=function(e){e.addUniform("radius",2),e.addUniform("coneAngle",1),e.addUniform("height",2),e.addUniform("directionRandomizer",1)},e.prototype.getEffectDefines=function(){var e="#define CONEEMITTER";return this.emitFromSpawnPointOnly&&(e+="\n#define CONEEMITTERSPAWNPOINT"),e},e.prototype.getClassName=function(){return"ConeParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this._radius,e.angle=this._angle,e.directionRandomizer=this.directionRandomizer,e.radiusRange=this.radiusRange,e.heightRange=this.heightRange,e.emitFromSpawnPointOnly=this.emitFromSpawnPointOnly,e},e.prototype.parse=function(e){this.radius=e.radius,this.angle=e.angle,this.directionRandomizer=e.directionRandomizer,this.radiusRange=void 0!==e.radiusRange?e.radiusRange:1,this.heightRange=void 0!==e.radiusRange?e.heightRange:1,this.emitFromSpawnPointOnly=void 0!==e.emitFromSpawnPointOnly&&e.emitFromSpawnPointOnly},e}(),Va=function(){function e(e,t,n,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===n&&(n=1),void 0===i&&(i=0),this.radius=e,this.height=t,this.radiusRange=n,this.directionRandomizer=i,this._tempVector=C.Zero()}return e.prototype.startDirectionFunction=function(e,t,n,i,r){n.position.subtractToRef(e.getTranslation(),this._tempVector),this._tempVector.normalize(),C.TransformNormalToRef(this._tempVector,r,this._tempVector);var o=h.RandomRange(-this.directionRandomizer/2,this.directionRandomizer/2),a=Math.atan2(this._tempVector.x,this._tempVector.z);a+=h.RandomRange(-Math.PI/2,Math.PI/2)*this.directionRandomizer,this._tempVector.y=o,this._tempVector.x=Math.sin(a),this._tempVector.z=Math.cos(a),this._tempVector.normalize(),i?t.copyFrom(this._tempVector):C.TransformNormalFromFloatsToRef(this._tempVector.x,this._tempVector.y,this._tempVector.z,e,t)},e.prototype.startPositionFunction=function(e,t,n,i){var r=h.RandomRange(-this.height/2,this.height/2),o=h.RandomRange(0,2*Math.PI),a=h.RandomRange((1-this.radiusRange)*(1-this.radiusRange),1),s=Math.sqrt(a)*this.radius,c=s*Math.cos(o),l=s*Math.sin(o);i?t.copyFromFloats(c,r,l):C.TransformCoordinatesFromFloatsToRef(c,r,l,e,t)},e.prototype.clone=function(){var t=new e(this.radius,this.directionRandomizer);return he.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("height",this.height),e.setFloat("radiusRange",this.radiusRange),e.setFloat("directionRandomizer",this.directionRandomizer)},e.prototype.buildUniformLayout=function(e){e.addUniform("radius",1),e.addUniform("height",1),e.addUniform("radiusRange",1),e.addUniform("directionRandomizer",1)},e.prototype.getEffectDefines=function(){return"#define CYLINDEREMITTER"},e.prototype.getClassName=function(){return"CylinderParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.height=this.height,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},e.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer},e}(),za=function(e){function t(t,n,i,r,o){void 0===t&&(t=1),void 0===n&&(n=1),void 0===i&&(i=1),void 0===r&&(r=new C(0,1,0)),void 0===o&&(o=new C(0,1,0));var a=e.call(this,t,n,i)||this;return a.direction1=r,a.direction2=o,a}return H(t,e),t.prototype.startDirectionFunction=function(e,t){var n=h.RandomRange(this.direction1.x,this.direction2.x),i=h.RandomRange(this.direction1.y,this.direction2.y),r=h.RandomRange(this.direction1.z,this.direction2.z);C.TransformNormalFromFloatsToRef(n,i,r,e,t)},t.prototype.clone=function(){var e=new t(this.radius,this.height,this.radiusRange,this.direction1,this.direction2);return he.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("height",this.height),e.setFloat("radiusRange",this.radiusRange),e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)},t.prototype.buildUniformLayout=function(e){e.addUniform("radius",1),e.addUniform("height",1),e.addUniform("radiusRange",1),e.addUniform("direction1",3),e.addUniform("direction2",3)},t.prototype.getEffectDefines=function(){return"#define CYLINDEREMITTER\n#define DIRECTEDCYLINDEREMITTER"},t.prototype.getClassName=function(){return"CylinderDirectedParticleEmitter"},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t},t.prototype.parse=function(t){e.prototype.parse.call(this,t),this.direction1.copyFrom(t.direction1),this.direction2.copyFrom(t.direction2)},t}(Va),Ga=function(){function e(e,t,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===n&&(n=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=n}return e.prototype.startDirectionFunction=function(e,t,n,i){var r=n.position.subtract(e.getTranslation()).normalize(),o=h.RandomRange(0,this.directionRandomizer),a=h.RandomRange(0,this.directionRandomizer),s=h.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,r.normalize(),i?t.copyFrom(r):C.TransformNormalFromFloatsToRef(r.x,r.y,r.z,e,t)},e.prototype.startPositionFunction=function(e,t,n,i){var r=this.radius-h.RandomRange(0,this.radius*this.radiusRange),o=h.RandomRange(0,1),a=h.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),c=r*Math.cos(a)*Math.sin(s),l=r*Math.cos(s),u=r*Math.sin(a)*Math.sin(s);i?t.copyFromFloats(c,Math.abs(l),u):C.TransformCoordinatesFromFloatsToRef(c,Math.abs(l),u,e,t)},e.prototype.clone=function(){var t=new e(this.radius,this.directionRandomizer);return he.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("radiusRange",this.radiusRange),e.setFloat("directionRandomizer",this.directionRandomizer)},e.prototype.buildUniformLayout=function(e){e.addUniform("radius",1),e.addUniform("radiusRange",1),e.addUniform("directionRandomizer",1)},e.prototype.getEffectDefines=function(){return"#define HEMISPHERICEMITTER"},e.prototype.getClassName=function(){return"HemisphericParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},e.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer},e}(),Ha=function(){function e(){this.direction1=new C(0,1,0),this.direction2=new C(0,1,0)}return e.prototype.startDirectionFunction=function(e,t,n,i){var r=h.RandomRange(this.direction1.x,this.direction2.x),o=h.RandomRange(this.direction1.y,this.direction2.y),a=h.RandomRange(this.direction1.z,this.direction2.z);i?t.copyFromFloats(r,o,a):C.TransformNormalFromFloatsToRef(r,o,a,e,t)},e.prototype.startPositionFunction=function(e,t,n,i){i?t.copyFromFloats(0,0,0):C.TransformCoordinatesFromFloatsToRef(0,0,0,e,t)},e.prototype.clone=function(){var t=new e;return he.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)},e.prototype.buildUniformLayout=function(e){e.addUniform("direction1",3),e.addUniform("direction2",3)},e.prototype.getEffectDefines=function(){return"#define POINTEMITTER"},e.prototype.getClassName=function(){return"PointParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},e.prototype.parse=function(e){C.FromArrayToRef(e.direction1,0,this.direction1),C.FromArrayToRef(e.direction2,0,this.direction2)},e}(),ja=function(){function e(e,t,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===n&&(n=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=n}return e.prototype.startDirectionFunction=function(e,t,n,i){var r=n.position.subtract(e.getTranslation()).normalize(),o=h.RandomRange(0,this.directionRandomizer),a=h.RandomRange(0,this.directionRandomizer),s=h.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,r.normalize(),i?t.copyFrom(r):C.TransformNormalFromFloatsToRef(r.x,r.y,r.z,e,t)},e.prototype.startPositionFunction=function(e,t,n,i){var r=this.radius-h.RandomRange(0,this.radius*this.radiusRange),o=h.RandomRange(0,1),a=h.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),c=r*Math.cos(a)*Math.sin(s),l=r*Math.cos(s),u=r*Math.sin(a)*Math.sin(s);i?t.copyFromFloats(c,l,u):C.TransformCoordinatesFromFloatsToRef(c,l,u,e,t)},e.prototype.clone=function(){var t=new e(this.radius,this.directionRandomizer);return he.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("radiusRange",this.radiusRange),e.setFloat("directionRandomizer",this.directionRandomizer)},e.prototype.buildUniformLayout=function(e){e.addUniform("radius",1),e.addUniform("radiusRange",1),e.addUniform("directionRandomizer",1)},e.prototype.getEffectDefines=function(){return"#define SPHEREEMITTER"},e.prototype.getClassName=function(){return"SphereParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},e.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer},e}(),Wa=function(e){function t(t,n,i){void 0===t&&(t=1),void 0===n&&(n=new C(0,1,0)),void 0===i&&(i=new C(0,1,0));var r=e.call(this,t)||this;return r.direction1=n,r.direction2=i,r}return H(t,e),t.prototype.startDirectionFunction=function(e,t){var n=h.RandomRange(this.direction1.x,this.direction2.x),i=h.RandomRange(this.direction1.y,this.direction2.y),r=h.RandomRange(this.direction1.z,this.direction2.z);C.TransformNormalFromFloatsToRef(n,i,r,e,t)},t.prototype.clone=function(){var e=new t(this.radius,this.direction1,this.direction2);return he.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("radiusRange",this.radiusRange),e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)},t.prototype.buildUniformLayout=function(e){e.addUniform("radius",1),e.addUniform("radiusRange",1),e.addUniform("direction1",3),e.addUniform("direction2",3)},t.prototype.getEffectDefines=function(){return"#define SPHEREEMITTER\n#define DIRECTEDSPHEREEMITTER"},t.prototype.getClassName=function(){return"SphereDirectedParticleEmitter"},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t},t.prototype.parse=function(t){e.prototype.parse.call(this,t),this.direction1.copyFrom(t.direction1),this.direction2.copyFrom(t.direction2)},t}(ja),Xa=function(){function e(){this.particlePositionGenerator=function(){},this.particleDestinationGenerator=function(){}}return e.prototype.startDirectionFunction=function(e,t,n,i){var r=w.Vector3[0];if(this.particleDestinationGenerator){this.particleDestinationGenerator(-1,n,r);var o=w.Vector3[1];r.subtractToRef(n.position,o),o.scaleToRef(1/n.lifeTime,r)}else r.set(0,0,0);i?t.copyFrom(r):C.TransformNormalToRef(r,e,t)},e.prototype.startPositionFunction=function(e,t,n,i){var r=w.Vector3[0];this.particlePositionGenerator?this.particlePositionGenerator(-1,n,r):r.set(0,0,0),i?t.copyFrom(r):C.TransformCoordinatesToRef(r,e,t)},e.prototype.clone=function(){var t=new e;return he.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){},e.prototype.buildUniformLayout=function(e){},e.prototype.getEffectDefines=function(){return"#define CUSTOMEMITTER"},e.prototype.getClassName=function(){return"CustomParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e},e.prototype.parse=function(e){},e}(),Ya=function(){function e(e){void 0===e&&(e=null),this._indices=null,this._positions=null,this._normals=null,this._storedNormal=C.Zero(),this._mesh=null,this.direction1=new C(0,1,0),this.direction2=new C(0,1,0),this.useMeshNormalsForDirection=!0,this.mesh=e}return Object.defineProperty(e.prototype,"mesh",{get:function(){return this._mesh},set:function(e){this._mesh!==e&&(this._mesh=e,e?(this._indices=e.getIndices(),this._positions=e.getVerticesData(Yn.PositionKind),this._normals=e.getVerticesData(Yn.NormalKind)):(this._indices=null,this._positions=null,this._normals=null))},enumerable:!1,configurable:!0}),e.prototype.startDirectionFunction=function(e,t,n,i){if(this.useMeshNormalsForDirection&&this._normals)C.TransformNormalToRef(this._storedNormal,e,t);else{var r=h.RandomRange(this.direction1.x,this.direction2.x),o=h.RandomRange(this.direction1.y,this.direction2.y),a=h.RandomRange(this.direction1.z,this.direction2.z);i?t.copyFromFloats(r,o,a):C.TransformNormalFromFloatsToRef(r,o,a,e,t)}},e.prototype.startPositionFunction=function(e,t,n,i){if(this._indices&&this._positions){var r=3*Math.random()*(this._indices.length/3)|0,o=Math.random(),a=Math.random()*(1-o),s=1-o-a,c=this._indices[r],l=this._indices[r+1],u=this._indices[r+2],h=w.Vector3[0],d=w.Vector3[1],p=w.Vector3[2],f=w.Vector3[3];C.FromArrayToRef(this._positions,3*c,h),C.FromArrayToRef(this._positions,3*l,d),C.FromArrayToRef(this._positions,3*u,p),f.x=o*h.x+a*d.x+s*p.x,f.y=o*h.y+a*d.y+s*p.y,f.z=o*h.z+a*d.z+s*p.z,i?t.copyFromFloats(f.x,f.y,f.z):C.TransformCoordinatesFromFloatsToRef(f.x,f.y,f.z,e,t),this.useMeshNormalsForDirection&&this._normals&&(C.FromArrayToRef(this._normals,3*c,h),C.FromArrayToRef(this._normals,3*l,d),C.FromArrayToRef(this._normals,3*u,p),this._storedNormal.x=o*h.x+a*d.x+s*p.x,this._storedNormal.y=o*h.y+a*d.y+s*p.y,this._storedNormal.z=o*h.z+a*d.z+s*p.z)}},e.prototype.clone=function(){var t=new e(this.mesh);return he.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)},e.prototype.buildUniformLayout=function(e){e.addUniform("direction1",3),e.addUniform("direction2",3)},e.prototype.getEffectDefines=function(){return""},e.prototype.getClassName=function(){return"MeshParticleEmitter"},e.prototype.serialize=function(){var e,t={};return t.type=this.getClassName(),t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t.meshId=null===(e=this.mesh)||void 0===e?void 0:e.id,t.useMeshNormalsForDirection=this.useMeshNormalsForDirection,t},e.prototype.parse=function(e,t){C.FromArrayToRef(e.direction1,0,this.direction1),C.FromArrayToRef(e.direction2,0,this.direction2),e.meshId&&t&&(this.mesh=t.getLastMeshById(e.meshId)),this.useMeshNormalsForDirection=e.useMeshNormalsForDirection},e}(),qa=function(){function e(t){this.animations=[],this.renderingGroupId=0,this.emitter=C.Zero(),this.emitRate=10,this.manualEmitCount=-1,this.updateSpeed=.01,this.targetStopDuration=0,this.disposeOnStop=!1,this.minEmitPower=1,this.maxEmitPower=1,this.minLifeTime=1,this.maxLifeTime=1,this.minSize=1,this.maxSize=1,this.minScaleX=1,this.maxScaleX=1,this.minScaleY=1,this.maxScaleY=1,this.minInitialRotation=0,this.maxInitialRotation=0,this.minAngularSpeed=0,this.maxAngularSpeed=0,this.layerMask=268435455,this.customShader=null,this.preventAutoStart=!1,this._wasDispatched=!1,this._rootUrl="",this.noiseStrength=new C(10,10,10),this.onAnimationEnd=null,this.blendMode=e.BLENDMODE_ONEONE,this.forceDepthWrite=!1,this.preWarmCycles=0,this.preWarmStepOffset=1,this.spriteCellChangeSpeed=1,this.startSpriteCellID=0,this.endSpriteCellID=0,this.spriteCellWidth=0,this.spriteCellHeight=0,this.spriteCellLoop=!0,this.spriteRandomStartCell=!1,this.translationPivot=new S(0,0),this.beginAnimationOnStart=!1,this.beginAnimationFrom=0,this.beginAnimationTo=60,this.beginAnimationLoop=!1,this.worldOffset=new C(0,0,0),this._useLogarithmicDepth=!1,this.gravity=C.Zero(),this._colorGradients=null,this._sizeGradients=null,this._lifeTimeGradients=null,this._angularSpeedGradients=null,this._velocityGradients=null,this._limitVelocityGradients=null,this._dragGradients=null,this._emitRateGradients=null,this._startSizeGradients=null,this._rampGradients=null,this._colorRemapGradients=null,this._alphaRemapGradients=null,this.startDelay=0,this.limitVelocityDamping=.4,this.color1=new U(1,1,1,1),this.color2=new U(1,1,1,1),this.colorDead=new U(0,0,0,1),this.textureMask=new U(1,1,1,1),this._isSubEmitter=!1,this._billboardMode=a.PARTICLES_BILLBOARDMODE_ALL,this._isBillboardBased=!0,this._imageProcessingConfigurationDefines=new Ln,this.id=t,this.name=t}return Object.defineProperty(e.prototype,"noiseTexture",{get:function(){return this._noiseTexture},set:function(e){this._noiseTexture!==e&&(this._noiseTexture=e,this._reset())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAnimationSheetEnabled",{get:function(){return this._isAnimationSheetEnabled},set:function(e){this._isAnimationSheetEnabled!=e&&(this._isAnimationSheetEnabled=e,this._reset())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useLogarithmicDepth",{get:function(){return this._useLogarithmicDepth},set:function(e){this._useLogarithmicDepth=e&&this.getScene().getEngine().getCaps().fragmentDepthSupported},enumerable:!1,configurable:!0}),e.prototype.getScene=function(){return this._scene},e.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},e.prototype.getDragGradients=function(){return this._dragGradients},e.prototype.getLimitVelocityGradients=function(){return this._limitVelocityGradients},e.prototype.getColorGradients=function(){return this._colorGradients},e.prototype.getSizeGradients=function(){return this._sizeGradients},e.prototype.getColorRemapGradients=function(){return this._colorRemapGradients},e.prototype.getAlphaRemapGradients=function(){return this._alphaRemapGradients},e.prototype.getLifeTimeGradients=function(){return this._lifeTimeGradients},e.prototype.getAngularSpeedGradients=function(){return this._angularSpeedGradients},e.prototype.getVelocityGradients=function(){return this._velocityGradients},e.prototype.getStartSizeGradients=function(){return this._startSizeGradients},e.prototype.getEmitRateGradients=function(){return this._emitRateGradients},Object.defineProperty(e.prototype,"direction1",{get:function(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:C.Zero()},set:function(e){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"direction2",{get:function(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:C.Zero()},set:function(e){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minEmitBox",{get:function(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:C.Zero()},set:function(e){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxEmitBox",{get:function(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:C.Zero()},set:function(e){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"billboardMode",{get:function(){return this._billboardMode},set:function(e){this._billboardMode!==e&&(this._billboardMode=e,this._reset())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBillboardBased",{get:function(){return this._isBillboardBased},set:function(e){this._isBillboardBased!==e&&(this._isBillboardBased=e,this._reset())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e)},enumerable:!1,configurable:!0}),e.prototype._attachImageProcessingConfiguration=function(e){e!==this._imageProcessingConfiguration&&(!e&&this._scene?this._imageProcessingConfiguration=this._scene.imageProcessingConfiguration:this._imageProcessingConfiguration=e)},e.prototype._reset=function(){},e.prototype._removeGradientAndTexture=function(e,t,n){if(!t)return this;for(var i=0,r=0,o=t;r0||0===i)&&(null===(n=I.getScene())||void 0===n||n.meshes.forEach((function(e){e._markSubMeshesAsLightDirty()})))},I.renderParticles=!0,I.renderSprites=!1,I.forceLayerMaskCheck=!1,I.ignoreCameraViewport=!1,I.onBeforeBindObservable=new u,I.onAfterUnbindObservable=new u,I.onBeforeRenderObservable=new u,I.onAfterRenderObservable=new u,I.onClearObservable=new u,I.onResizeObservable=new u,I._cleared=!1,I.skipInitialClear=!1,I._currentRefreshId=-1,I._refreshRate=1,I._samples=1,I._canRescale=!0,I._renderTarget=null,I.boundingBoxPosition=C.Zero(),!(i=I.getScene()))return I;var D=I.getScene().getEngine();return I._gammaSpace=w,I._coordinatesMode=Eo.PROJECTION_MODE,I.renderList=[],I.name=t,I.isRenderTarget=!0,I._initialSizeParameter=n,I._renderPassIds=[],I._isCubeData=c,I._processSizeParameter(n),I.renderPassId=I._renderPassIds[0],I._resizeObserver=D.onResizeObservable.add((function(){})),I._generateMipMaps=!!r,I._doNotChangeAspectRatio=o,I._renderingManager=new $n(i),I._renderingManager._useSceneAutoClearSetup=!0,p||(I._renderTargetOptions={generateMipMaps:r,type:s,format:null!==(P=I._format)&&void 0!==P?P:void 0,samplingMode:I.samplingMode,generateDepthBuffer:h,generateStencilBuffer:d,samples:_,creationFlags:g,noColorAttachment:y,useSRGBBuffer:v,colorAttachment:O,label:I.name},I.samplingMode===Eo.NEAREST_SAMPLINGMODE&&(I.wrapU=Eo.CLAMP_ADDRESSMODE,I.wrapV=Eo.CLAMP_ADDRESSMODE),m||(c?(I._renderTarget=i.getEngine().createRenderTargetCubeTexture(I.getRenderSize(),I._renderTargetOptions),I.coordinatesMode=Eo.INVCUBIC_MODE,I._textureMatrix=R.Identity()):I._renderTarget=i.getEngine().createRenderTargetTexture(I._size,I._renderTargetOptions),I._texture=I._renderTarget.texture,void 0!==_&&(I.samples=_))),I}return H(t,e),Object.defineProperty(t.prototype,"renderList",{get:function(){return this._renderList},set:function(e){this._unObserveRenderList&&(this._unObserveRenderList(),this._unObserveRenderList=null),e&&(this._unObserveRenderList=y(e,this._renderListHasChanged)),this._renderList=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"postProcesses",{get:function(){return this._postProcesses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_prePassEnabled",{get:function(){return!!this._prePassRenderTarget&&this._prePassRenderTarget.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onAfterUnbind",{set:function(e){this._onAfterUnbindObserver&&this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=this.onAfterUnbindObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBeforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onAfterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onClear",{set:function(e){this._onClearObserver&&this.onClearObservable.remove(this._onClearObserver),this._onClearObserver=this.onClearObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderPassIds",{get:function(){return this._renderPassIds},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentRefreshId",{get:function(){return this._currentRefreshId},enumerable:!1,configurable:!0}),t.prototype.setMaterialForRendering=function(e,t){var n;n=Array.isArray(e)?e:[e];for(var i=0;i0&&(this._postProcesses[0].autoClear=!1))}},t.prototype._shouldRender=function(){return-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)},t.prototype.getRenderSize=function(){return this.getRenderWidth()},t.prototype.getRenderWidth=function(){return this._size.width?this._size.width:this._size},t.prototype.getRenderHeight=function(){return this._size.width?this._size.height:this._size},t.prototype.getRenderLayers=function(){return this._size.layers||0},t.prototype.disableRescaling=function(){this._canRescale=!1},Object.defineProperty(t.prototype,"canRescale",{get:function(){return this._canRescale},enumerable:!1,configurable:!0}),t.prototype.scale=function(e){var t=Math.max(1,this.getRenderSize()*e);this.resize(t)},t.prototype.getReflectionTextureMatrix=function(){return this.isCube?this._textureMatrix:e.prototype.getReflectionTextureMatrix.call(this)},t.prototype.resize=function(e){var t,n=this.isCube;null===(t=this._renderTarget)||void 0===t||t.dispose(),this._renderTarget=null;var i=this.getScene();i&&(this._processSizeParameter(e,!1),this._renderTarget=n?i.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):i.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==this._renderTargetOptions.samples&&(this.samples=this._renderTargetOptions.samples),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))},t.prototype.render=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this._render(e,t)},t.prototype.isReadyForRendering=function(){return this._render(!1,!1,!0)},t.prototype._render=function(e,t,n){var i;void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1);var r=this.getScene();if(!r)return n;var o=r.getEngine();if(void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses),this._waitingRenderList){this.renderList=[];for(var a=0;a=0&&n.customRenderTargets.splice(i,1);for(var r=0,o=n.cameras;r=0&&a.customRenderTargets.splice(i,1)}null===(t=this._renderTarget)||void 0===t||t.dispose(),this._renderTarget=null,this._texture=null,e.prototype.dispose.call(this)}},t.prototype._rebuild=function(){this.refreshRate===t.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=t.REFRESHRATE_RENDER_ONCE),this._postProcessManager&&this._postProcessManager._rebuild()},t.prototype.freeRenderingGroups=function(){this._renderingManager&&this._renderingManager.freeRenderingGroups()},t.prototype.getViewCount=function(){return 1},t.REFRESHRATE_RENDER_ONCE=0,t.REFRESHRATE_RENDER_ONEVERYFRAME=1,t.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2,t}(Eo);Eo._CreateRenderTargetTexture=function(e,t,n,i,r){return new rs(e,t,n,i)};var os=function(){function e(e){this.name=Jn.NAME_PROCEDURALTEXTURE,this.scene=e,this.scene.proceduralTextures=[]}return e.prototype.register=function(){this.scene._beforeClearStage.registerStep(Jn.STEP_BEFORECLEAR_PROCEDURALTEXTURE,this,this._beforeClear)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e.prototype._beforeClear=function(){if(this.scene.proceduralTexturesEnabled){Pn.StartPerformanceCounter("Procedural textures",this.scene.proceduralTextures.length>0);for(var e=0;e0)}},e}();Vt.ShadersStore.proceduralVertexShader="attribute vec2 position;varying vec2 vPosition;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvPosition=position;vUV=position*madd+madd;gl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}";var as,ss=function(e){function t(t,n,i,r,o,s,c,l){void 0===o&&(o=null),void 0===s&&(s=!0),void 0===c&&(c=!1),void 0===l&&(l=a.TEXTURETYPE_UNSIGNED_INT);var h=e.call(this,null,r,!s)||this;h.isEnabled=!0,h.autoClear=!0,h.onGeneratedObservable=new u,h.onBeforeGenerationObservable=new u,h.nodeMaterialSource=null,h._textures={},h._currentRefreshId=-1,h._frameId=-1,h._refreshRate=1,h._vertexBuffers={},h._uniforms=new Array,h._samplers=new Array,h._floats={},h._ints={},h._floatsArrays={},h._colors3={},h._colors4={},h._vectors2={},h._vectors3={},h._matrices={},h._fallbackTextureUsed=!1,h._cachedDefines=null,h._contentUpdateId=-1,h._rtWrapper=null;var d=(r=h.getScene()||A.LastCreatedScene)._getComponent(Jn.NAME_PROCEDURALTEXTURE);d||(d=new os(r),r._addComponent(d)),r.proceduralTextures.push(h),h._fullEngine=r.getEngine(),h.name=t,h.isRenderTarget=!0,h._size=n,h._textureType=l,h._generateMipMaps=s,h._drawWrapper=new en(h._fullEngine),h.setFragment(i),h._fallbackTexture=o;var p=h._createRtWrapper(c,n,s,l);h._texture=p.texture;var f=[];return f.push(1,1),f.push(-1,1),f.push(-1,-1),f.push(1,-1),h._vertexBuffers[Yn.PositionKind]=new Yn(h._fullEngine,f,Yn.PositionKind,!1,!1,2),h._createIndexBuffer(),h}return H(t,e),t.prototype._createRtWrapper=function(e,t,n,i){return e?(this._rtWrapper=this._fullEngine.createRenderTargetCubeTexture(t,{generateMipMaps:n,generateDepthBuffer:!1,generateStencilBuffer:!1,type:i}),this.setFloat("face",0)):this._rtWrapper=this._fullEngine.createRenderTargetTexture(t,{generateMipMaps:n,generateDepthBuffer:!1,generateStencilBuffer:!1,type:i}),this._rtWrapper},t.prototype.getEffect=function(){return this._drawWrapper.effect},t.prototype._setEffect=function(e){this._drawWrapper.effect=e},t.prototype.getContent=function(){var e=this;return this._contentData&&this._frameId===this._contentUpdateId||(this._contentData?this._contentData.then((function(t){e._contentData=e.readPixels(0,0,t),e._contentUpdateId=e._frameId})):(this._contentData=this.readPixels(0,0),this._contentUpdateId=this._frameId)),this._contentData},t.prototype._createIndexBuffer=function(){var e=this._fullEngine,t=[];t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),this._indexBuffer=e.createIndexBuffer(t)},t.prototype._rebuild=function(){var e=this._vertexBuffers[Yn.PositionKind];e&&e._rebuild(),this._createIndexBuffer(),this.refreshRate===rs.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=rs.REFRESHRATE_RENDER_ONCE)},t.prototype.reset=function(){var e;null===(e=this._drawWrapper.effect)||void 0===e||e.dispose(),this._drawWrapper.effect=null,this._cachedDefines=null},t.prototype._getDefines=function(){return""},t.prototype.executeWhenReady=function(e){var t=this;if(this.isReady())e(this);else{var n=this.getEffect();n&&n.executeWhenCompiled((function(){e(t)}))}},t.prototype.isReady=function(){var e=this,t=this._fullEngine;if(this.nodeMaterialSource)return this._drawWrapper.effect.isReady();if(!this._fragment)return!1;if(this._fallbackTextureUsed)return!0;if(!this._texture)return!1;var n=this._getDefines();if(this._drawWrapper.effect&&n===this._cachedDefines&&this._drawWrapper.effect.isReady())return!0;var i={vertex:"procedural",fragmentElement:this._fragment.fragmentElement,fragmentSource:this._fragment.fragmentSource,fragment:"string"==typeof this._fragment?this._fragment:void 0};return this._cachedDefines!==n&&(this._cachedDefines=n,this._drawWrapper.effect=t.createEffect(i,[Yn.PositionKind],this._uniforms,this._samplers,n,void 0,void 0,(function(){var t;null===(t=e._rtWrapper)||void 0===t||t.dispose(),e._rtWrapper=e._texture=null,e._fallbackTexture&&(e._texture=e._fallbackTexture._texture,e._texture&&e._texture.incrementReferences()),e._fallbackTextureUsed=!0}))),this._drawWrapper.effect.isReady()},t.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},t.prototype.setFragment=function(e){this._fragment=e},Object.defineProperty(t.prototype,"refreshRate",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!1,configurable:!0}),t.prototype._shouldRender=function(){return this.isEnabled&&this.isReady()&&this._texture?!this._fallbackTextureUsed&&(-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,this._frameId++,!0):(this._currentRefreshId++,!1)):(this._texture&&(this._texture.isReady=!1),!1)},t.prototype.getRenderSize=function(){return this._size},t.prototype.resize=function(e,t){if(!this._fallbackTextureUsed&&this._rtWrapper&&this._texture){var n=this._texture.isCube;this._rtWrapper.dispose();var i=this._createRtWrapper(n,e,t,this._textureType);this._texture=i.texture,this._size=e,this._generateMipMaps=t}},t.prototype._checkUniform=function(e){-1===this._uniforms.indexOf(e)&&this._uniforms.push(e)},t.prototype.setTexture=function(e,t){return-1===this._samplers.indexOf(e)&&this._samplers.push(e),this._textures[e]=t,this},t.prototype.setFloat=function(e,t){return this._checkUniform(e),this._floats[e]=t,this},t.prototype.setInt=function(e,t){return this._checkUniform(e),this._ints[e]=t,this},t.prototype.setFloats=function(e,t){return this._checkUniform(e),this._floatsArrays[e]=t,this},t.prototype.setColor3=function(e,t){return this._checkUniform(e),this._colors3[e]=t,this},t.prototype.setColor4=function(e,t){return this._checkUniform(e),this._colors4[e]=t,this},t.prototype.setVector2=function(e,t){return this._checkUniform(e),this._vectors2[e]=t,this},t.prototype.setVector3=function(e,t){return this._checkUniform(e),this._vectors3[e]=t,this},t.prototype.setMatrix=function(e,t){return this._checkUniform(e),this._matrices[e]=t,this},t.prototype.render=function(e){var t,n,i=this.getScene();if(i){var r=this._fullEngine;if(r.enableEffect(this._drawWrapper),this.onBeforeGenerationObservable.notifyObservers(this),r.setState(!1),!this.nodeMaterialSource){for(var o in this._textures)this._drawWrapper.effect.setTexture(o,this._textures[o]);for(var a in this._ints)this._drawWrapper.effect.setInt(a,this._ints[a]);for(var s in this._floats)this._drawWrapper.effect.setFloat(s,this._floats[s]);for(var c in this._floatsArrays)this._drawWrapper.effect.setArray(c,this._floatsArrays[c]);for(var l in this._colors3)this._drawWrapper.effect.setColor3(l,this._colors3[l]);for(var u in this._colors4){var h=this._colors4[u];this._drawWrapper.effect.setFloat4(u,h.r,h.g,h.b,h.a)}for(var d in this._vectors2)this._drawWrapper.effect.setVector2(d,this._vectors2[d]);for(var p in this._vectors3)this._drawWrapper.effect.setVector3(p,this._vectors3[p]);for(var f in this._matrices)this._drawWrapper.effect.setMatrix(f,this._matrices[f])}if(this._texture&&this._rtWrapper){null===(t=r._debugPushGroup)||void 0===t||t.call(r,"procedural texture generation for ".concat(this.name),1);var m=r.currentViewport;if(this.isCube)for(var _=0;_<6;_++)r.bindFramebuffer(this._rtWrapper,_,void 0,void 0,!0),r.bindBuffers(this._vertexBuffers,this._indexBuffer,this._drawWrapper.effect),this._drawWrapper.effect.setFloat("face",_),this.autoClear&&r.clear(i.clearColor,!0,!1,!1),r.drawElementsType(qr.TriangleFillMode,0,6);else r.bindFramebuffer(this._rtWrapper,0,void 0,void 0,!0),r.bindBuffers(this._vertexBuffers,this._indexBuffer,this._drawWrapper.effect),this.autoClear&&r.clear(i.clearColor,!0,!1,!1),r.drawElementsType(qr.TriangleFillMode,0,6);r.unBindFramebuffer(this._rtWrapper,this.isCube),m&&r.setViewport(m),this.isCube&&r.generateMipMapsForCubemap(this._texture),null===(n=r._debugPopGroup)||void 0===n||n.call(r,1),this.onGenerated&&this.onGenerated(),this.onGeneratedObservable.notifyObservers(this)}}},t.prototype.clone=function(){var e=this.getSize(),n=new t(this.name,e.width,this._fragment,this.getScene(),this._fallbackTexture,this._generateMipMaps);return n.hasAlpha=this.hasAlpha,n.level=this.level,n.coordinatesMode=this.coordinatesMode,n},t.prototype.dispose=function(){var t=this.getScene();if(t){var n=t.proceduralTextures.indexOf(this);n>=0&&t.proceduralTextures.splice(n,1);var i=this._vertexBuffers[Yn.PositionKind];i&&(i.dispose(),this._vertexBuffers[Yn.PositionKind]=null),this._indexBuffer&&this._fullEngine._releaseBuffer(this._indexBuffer)&&(this._indexBuffer=null),this.onGeneratedObservable.clear(),this.onBeforeGenerationObservable.clear(),e.prototype.dispose.call(this)}},W([Se()],t.prototype,"isEnabled",void 0),W([Se()],t.prototype,"autoClear",void 0),W([Se()],t.prototype,"_generateMipMaps",void 0),W([Se()],t.prototype,"_size",void 0),W([Se()],t.prototype,"refreshRate",null),t}(Eo);b("BABYLON.ProceduralTexture",ss),function(e){e[e.Cos=0]="Cos",e[e.Sin=1]="Sin",e[e.Abs=2]="Abs",e[e.Exp=3]="Exp",e[e.Exp2=4]="Exp2",e[e.Round=5]="Round",e[e.Floor=6]="Floor",e[e.Ceiling=7]="Ceiling",e[e.Sqrt=8]="Sqrt",e[e.Log=9]="Log",e[e.Tan=10]="Tan",e[e.ArcTan=11]="ArcTan",e[e.ArcCos=12]="ArcCos",e[e.ArcSin=13]="ArcSin",e[e.Fract=14]="Fract",e[e.Sign=15]="Sign",e[e.Radians=16]="Radians",e[e.Degrees=17]="Degrees"}(as||(as={}));var cs=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.operation=as.Cos,n.registerInput("input",na.AutoDetect),n.registerOutput("output",na.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n}return H(t,e),t.prototype.getClassName=function(){return"TrigonometryBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this._outputs[0],i="";switch(this.operation){case as.Cos:i="cos";break;case as.Sin:i="sin";break;case as.Abs:i="abs";break;case as.Exp:i="exp";break;case as.Exp2:i="exp2";break;case as.Round:i="round";break;case as.Floor:i="floor";break;case as.Ceiling:i="ceil";break;case as.Sqrt:i="sqrt";break;case as.Log:i="log";break;case as.Tan:i="tan";break;case as.ArcTan:i="atan";break;case as.ArcCos:i="acos";break;case as.ArcSin:i="asin";break;case as.Fract:i="fract";break;case as.Sign:i="sign";break;case as.Radians:i="radians";break;case as.Degrees:i="degrees"}return t.compilationString+=this._declareOutput(n,t)+" = ".concat(i,"(").concat(this.input.associatedVariableName,");\n"),this},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.operation=this.operation,t},t.prototype._deserialize=function(t,n,i){e.prototype._deserialize.call(this,t,n,i),this.operation=t.operation},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".operation = BABYLON.TrigonometryBlockOperations.").concat(as[this.operation],";\n")},t}(ha);b("BABYLON.TrigonometryBlock",cs);var ls={effect:null,subMesh:null},us=function(e){function t(){var t=e.call(this)||this;return t.NORMAL=!1,t.TANGENT=!1,t.VERTEXCOLOR_NME=!1,t.UV1=!1,t.UV2=!1,t.UV3=!1,t.UV4=!1,t.UV5=!1,t.UV6=!1,t.PREPASS=!1,t.PREPASS_NORMAL=!1,t.PREPASS_NORMAL_INDEX=-1,t.PREPASS_POSITION=!1,t.PREPASS_POSITION_INDEX=-1,t.PREPASS_DEPTH=!1,t.PREPASS_DEPTH_INDEX=-1,t.SCENE_MRT_COUNT=0,t.NUM_BONE_INFLUENCERS=0,t.BonesPerMesh=0,t.BONETEXTURE=!1,t.MORPHTARGETS=!1,t.MORPHTARGETS_NORMAL=!1,t.MORPHTARGETS_TANGENT=!1,t.MORPHTARGETS_UV=!1,t.NUM_MORPH_INFLUENCERS=0,t.MORPHTARGETS_TEXTURE=!1,t.IMAGEPROCESSING=!1,t.VIGNETTE=!1,t.VIGNETTEBLENDMODEMULTIPLY=!1,t.VIGNETTEBLENDMODEOPAQUE=!1,t.TONEMAPPING=!1,t.TONEMAPPING_ACES=!1,t.CONTRAST=!1,t.EXPOSURE=!1,t.COLORCURVES=!1,t.COLORGRADING=!1,t.COLORGRADING3D=!1,t.SAMPLER3DGREENDEPTH=!1,t.SAMPLER3DBGRMAP=!1,t.DITHER=!1,t.IMAGEPROCESSINGPOSTPROCESS=!1,t.SKIPFINALCOLORCLAMP=!1,t.BUMPDIRECTUV=0,t.CAMERA_ORTHOGRAPHIC=!1,t.CAMERA_PERSPECTIVE=!1,t.rebuild(),t}return H(t,e),t.prototype.setValue=function(e,t,n){void 0===n&&(n=!1),void 0===this[e]&&this._keys.push(e),n&&this[e]!==t&&this.markAsUnprocessed(),this[e]=t},t}(Dn),hs=function(e){function t(n,i,r){void 0===r&&(r={});var o=e.call(this,n,i||A.LastCreatedScene)||this;return o._buildId=t._BuildIdGenerator++,o._buildWasSuccessful=!1,o._cachedWorldViewMatrix=new R,o._cachedWorldViewProjectionMatrix=new R,o._optimizers=new Array,o._animationFrame=-1,o.BJSNODEMATERIALEDITOR=o._getGlobalNodeMaterialEditor(),o.editorData=null,o.ignoreAlpha=!1,o.maxSimultaneousLights=4,o.onBuildObservable=new u,o._vertexOutputNodes=new Array,o._fragmentOutputNodes=new Array,o.attachedBlocks=[],o._mode=Fa.Material,o.forceAlphaBlending=!1,o._options=j({emitComments:!1},r),o._attachImageProcessingConfiguration(null),o}return H(t,e),t._BlockIsTextureBlock=function(e){return"TextureBlock"===e.getClassName()||"ReflectionTextureBaseBlock"===e.getClassName()||"RefractionBlock"===e.getClassName()||"CurrentScreenBlock"===e.getClassName()||"ParticleTextureBlock"===e.getClassName()||"ImageSourceBlock"===e.getClassName()||"TriPlanarBlock"===e.getClassName()||"BiPlanarBlock"===e.getClassName()||"PrePassTextureBlock"===e.getClassName()},t.prototype._getGlobalNodeMaterialEditor=function(){return"undefined"!=typeof NODEEDITOR?NODEEDITOR:"undefined"!=typeof BABYLON&&void 0!==BABYLON.NodeEditor?BABYLON:void 0},Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(e){this._options=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this._mode},set:function(e){this._mode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buildId",{get:function(){return this._buildId},set:function(e){this._buildId=e},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"NodeMaterial"},t.prototype._attachImageProcessingConfiguration=function(e){var t=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add((function(){t._markAllSubMeshesAsImageProcessingDirty()}))))},t.prototype.getBlockByName=function(e){for(var t=null,n=0,i=this.attachedBlocks;n-1))return this._optimizers.push(e),this},t.prototype.unregisterOptimizer=function(e){var t=this._optimizers.indexOf(e);if(-1!==t)return this._optimizers.splice(t,1),this},t.prototype.addOutputNode=function(e){if(null===e.target)throw"This node is not meant to be an output node. You may want to explicitly set its target value.";return 0!=(e.target&ia.Vertex)&&this._addVertexOutputNode(e),0!=(e.target&ia.Fragment)&&this._addFragmentOutputNode(e),this},t.prototype.removeOutputNode=function(e){return null===e.target||(0!=(e.target&ia.Vertex)&&this._removeVertexOutputNode(e),0!=(e.target&ia.Fragment)&&this._removeFragmentOutputNode(e)),this},t.prototype._addVertexOutputNode=function(e){if(-1===this._vertexOutputNodes.indexOf(e))return e.target=ia.Vertex,this._vertexOutputNodes.push(e),this},t.prototype._removeVertexOutputNode=function(e){var t=this._vertexOutputNodes.indexOf(e);if(-1!==t)return this._vertexOutputNodes.splice(t,1),this},t.prototype._addFragmentOutputNode=function(e){if(-1===this._fragmentOutputNodes.indexOf(e))return e.target=ia.Fragment,this._fragmentOutputNodes.push(e),this},t.prototype._removeFragmentOutputNode=function(e){var t=this._fragmentOutputNodes.indexOf(e);if(-1!==t)return this._fragmentOutputNodes.splice(t,1),this},t.prototype.needAlphaBlending=function(){return!this.ignoreAlpha&&(this.forceAlphaBlending||this.alpha<1||this._sharedData&&this._sharedData.hints.needAlphaBlending)},t.prototype.needAlphaTesting=function(){return this._sharedData&&this._sharedData.hints.needAlphaTesting},t.prototype._processInitializeOnLink=function(e,t,n,i){void 0===i&&(i=!0),(e.target===ia.VertexAndFragment||t.target===ia.Fragment&&e.target===ia.Vertex&&e._preparationId!==this._buildId)&&n.push(e),this._initializeBlock(e,t,n,i)},t.prototype._initializeBlock=function(e,t,n,i){if(void 0===i&&(i=!0),e.initialize(t),i&&e.autoConfigure(this),e._preparationId=this._buildId,-1===this.attachedBlocks.indexOf(e)){if(e.isUnique)for(var r=e.getClassName(),o=0,a=this.attachedBlocks;o-1&&this.attachedBlocks.splice(t,1),e.isFinalMerger&&this.removeOutputNode(e)},t.prototype.build=function(e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!0),void 0===i&&(i=!1),this._vertexCompilationState||i||(i=!0),this._buildWasSuccessful=!1;var r=this.getScene().getEngine(),o=this._mode===Fa.Particle;if(0===this._vertexOutputNodes.length&&!o)throw"You must define at least one vertexOutputNode";if(0===this._fragmentOutputNodes.length)throw"You must define at least one fragmentOutputNode";this._vertexCompilationState=new ca,this._vertexCompilationState.supportUniformBuffers=r.supportsUniformBuffers,this._vertexCompilationState.target=ia.Vertex,this._fragmentCompilationState=new ca,this._fragmentCompilationState.supportUniformBuffers=r.supportsUniformBuffers,this._fragmentCompilationState.target=ia.Fragment,this._sharedData=new la,this._sharedData.nodeMaterial=this,this._sharedData.fragmentOutputNodes=this._fragmentOutputNodes,this._vertexCompilationState.sharedData=this._sharedData,this._fragmentCompilationState.sharedData=this._sharedData,this._sharedData.buildId=this._buildId,this._sharedData.emitComments=this._options.emitComments,this._sharedData.verbose=e,this._sharedData.scene=this.getScene(),this._sharedData.allowEmptyVertexProgram=o;for(var a=[],s=[],c=0,l=this._vertexOutputNodes;c1){var n=e.getEffectConfiguration("nodeMaterial");n||(n=e.addEffectConfiguration({enabled:!0,needsImageProcessing:!1,name:"nodeMaterial",texturesRequired:[]}));for(var i=0,r=t;i1},t.prototype.createPostProcess=function(e,t,n,i,r,o,s){return void 0===t&&(t=1),void 0===n&&(n=a.TEXTURE_NEAREST_SAMPLINGMODE),void 0===o&&(o=a.TEXTURETYPE_UNSIGNED_INT),void 0===s&&(s=a.TEXTUREFORMAT_RGBA),this.mode!==Fa.PostProcess?(J.Log("Incompatible material mode"),null):this._createEffectForPostProcess(null,e,t,n,i,r,o,s)},t.prototype.createEffectForPostProcess=function(e){this._createEffectForPostProcess(e)},t.prototype._createEffectForPostProcess=function(e,t,n,i,r,o,s,c){var l=this;void 0===n&&(n=1),void 0===i&&(i=a.TEXTURE_NEAREST_SAMPLINGMODE),void 0===s&&(s=a.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=a.TEXTUREFORMAT_RGBA);var u=this.name+this._buildId,h=new us,d=new kr(u+"PostProcess",this.getScene()),p=this._buildId;return this._processDefines(d,h),zt.RegisterShader(u,this._fragmentCompilationState._builtCompilationString,this._vertexCompilationState._builtCompilationString),e?e.updateEffect(h.toString(),this._fragmentCompilationState.uniforms,this._fragmentCompilationState.samplers,{maxSimultaneousLights:this.maxSimultaneousLights},void 0,void 0,u,u):e=new Da(this.name+"PostProcess",u,this._fragmentCompilationState.uniforms,this._fragmentCompilationState.samplers,n,t,i,r,o,h.toString(),s,u,{maxSimultaneousLights:this.maxSimultaneousLights},!1,c),e.nodeMaterialSource=this,e.onApplyObservable.add((function(t){p!==l._buildId&&(delete zt.ShadersStore[u+"VertexShader"],delete zt.ShadersStore[u+"PixelShader"],u=l.name+l._buildId,h.markAllAsDirty(),p=l._buildId),l._processDefines(d,h)&&(zt.RegisterShader(u,l._fragmentCompilationState._builtCompilationString,l._vertexCompilationState._builtCompilationString),on.SetImmediate((function(){return e.updateEffect(h.toString(),l._fragmentCompilationState.uniforms,l._fragmentCompilationState.samplers,{maxSimultaneousLights:l.maxSimultaneousLights},void 0,void 0,u,u)}))),l._checkInternals(t)})),e},t.prototype.createProceduralTexture=function(e,t){var n=this;if(this.mode!==Fa.ProceduralTexture)return J.Log("Incompatible material mode"),null;var i=this.name+this._buildId,r=new ss(i,e,null,t),o=new kr(i+"Procedural",this.getScene());o.reservedDataStore={hidden:!0};var a=new us,s=this._processDefines(o,a);zt.RegisterShader(i,this._fragmentCompilationState._builtCompilationString,this._vertexCompilationState._builtCompilationString);var c=this.getScene().getEngine().createEffect({vertexElement:i,fragmentElement:i},[Yn.PositionKind],this._fragmentCompilationState.uniforms,this._fragmentCompilationState.samplers,a.toString(),null==s?void 0:s.fallbacks,void 0);r.nodeMaterialSource=this,r._setEffect(c);var l=this._buildId;return r.onBeforeGenerationObservable.add((function(){l!==n._buildId&&(delete zt.ShadersStore[i+"VertexShader"],delete zt.ShadersStore[i+"PixelShader"],i=n.name+n._buildId,a.markAllAsDirty(),l=n._buildId);var e=n._processDefines(o,a);e&&(zt.RegisterShader(i,n._fragmentCompilationState._builtCompilationString,n._vertexCompilationState._builtCompilationString),on.SetImmediate((function(){c=n.getScene().getEngine().createEffect({vertexElement:i,fragmentElement:i},[Yn.PositionKind],n._fragmentCompilationState.uniforms,n._fragmentCompilationState.samplers,a.toString(),null==e?void 0:e.fallbacks,void 0),r._setEffect(c)}))),n._checkInternals(c)})),r},t.prototype._createEffectForParticles=function(e,t,n,i,r,o,a,s){var c=this;void 0===s&&(s="");var l=this.name+this._buildId+"_"+t;o||(o=new us),a||(a=this.getScene().getMeshByName(this.name+"Particle"))||((a=new kr(this.name+"Particle",this.getScene())).reservedDataStore={hidden:!0});var u=this._buildId,h=[],d=s;if(!r){var p=this._processDefines(a,o);zt.RegisterShader(l,this._fragmentCompilationState._builtCompilationString),e.fillDefines(h,t),d=h.join("\n"),r=this.getScene().getEngine().createEffectForParticles(l,this._fragmentCompilationState.uniforms,this._fragmentCompilationState.samplers,o.toString()+"\n"+d,null==p?void 0:p.fallbacks,n,i,e),e.setCustomEffect(r,t)}r.onBindObservable.add((function(r){u!==c._buildId&&(delete zt.ShadersStore[l+"PixelShader"],l=c.name+c._buildId+"_"+t,o.markAllAsDirty(),u=c._buildId),h.length=0,e.fillDefines(h,t);var p=h.join("\n");p!==d&&(o.markAllAsDirty(),d=p);var f=c._processDefines(a,o);if(f)return zt.RegisterShader(l,c._fragmentCompilationState._builtCompilationString),r=c.getScene().getEngine().createEffectForParticles(l,c._fragmentCompilationState.uniforms,c._fragmentCompilationState.samplers,o.toString()+"\n"+d,null==f?void 0:f.fallbacks,n,i,e),e.setCustomEffect(r,t),void c._createEffectForParticles(e,t,n,i,r,o,a,s);c._checkInternals(r)}))},t.prototype._checkInternals=function(e){if(this._sharedData.animatedInputs){var t=this.getScene(),n=t.getFrameId();if(this._animationFrame!==n){for(var i=0,r=this._sharedData.animatedInputs;i0&&a.lengthSquared()-c2*this.palmUpStrictness-1&&(t=!0)}}this._node.setEnabled(t&&n)},e.prototype.detach=function(){this._scene.onBeforeRenderObservable.remove(this._sceneRenderObserver)},e.prototype.linkToXRExperience=function(e){var t=e.featuresManager?e.featuresManager:e;if(t){try{this._eyeTracking=t.getEnabledFeature(Xo.EYE_TRACKING)}catch(e){}try{this._handTracking=t.getEnabledFeature(Xo.HAND_TRACKING)}catch(e){Pn.Error("Hand tracking must be enabled for the Hand Menu to work")}}else Pn.Error("XR features manager must be available or provided directly for the Hand Menu to work")},e}(),Ps=function(){function e(e,t,n){this.targetPosition=C.Zero(),this.poleTargetPosition=C.Zero(),this.poleTargetLocalOffset=C.Zero(),this.poleAngle=0,this.slerpAmount=1,this._bone1Quat=I.Identity(),this._bone1Mat=R.Identity(),this._bone2Ang=Math.PI,this._maxAngle=Math.PI,this._rightHandedSystem=!1,this._bendAxis=C.Right(),this._slerping=!1,this._adjustRoll=0,this._notEnoughInformation=!1,this._bone2=t;var i=t.getParent();if(!i)return this._notEnoughInformation=!0,void J.Error("BoneIKController: bone must have a parent for IK to work.");if(this._bone1=i,0===this._bone2.children.length&&!this._bone2.length)return this._notEnoughInformation=!0,void J.Error("BoneIKController: bone must not be a leaf or it should have a length for IK to work.");this.mesh=e,t.getSkeleton().computeAbsoluteMatrices();var r=t.getPosition();if(t.getAbsoluteMatrix().determinant()>0&&(this._rightHandedSystem=!0,this._bendAxis.x=0,this._bendAxis.y=0,this._bendAxis.z=-1,r.x>r.y&&r.x>r.z&&(this._adjustRoll=.5*Math.PI,this._bendAxis.z=1)),this._bone1.length&&this._bone2.length){var o=this._bone1.getScale(),a=this._bone2.getScale();this._bone1Length=this._bone1.length*o.y*this.mesh.scaling.y,this._bone2Length=this._bone2.length*a.y*this.mesh.scaling.y}else if(this._bone2.children[0]){e.computeWorldMatrix(!0);var s=this._bone2.children[0].getAbsolutePosition(e),c=this._bone2.getAbsolutePosition(e),l=this._bone1.getAbsolutePosition(e);this._bone2Length=C.Distance(s,c),this._bone1Length=C.Distance(c,l)}else e.computeWorldMatrix(!0),a=this._bone2.getScale(),this._bone2Length=this._bone2.length*a.y*this.mesh.scaling.y,c=this._bone2.getAbsolutePosition(e),l=this._bone1.getAbsolutePosition(e),this._bone1Length=C.Distance(c,l);this._bone1.getRotationMatrixToRef(Si.WORLD,e,this._bone1Mat),this.maxAngle=Math.PI,n&&(n.targetMesh&&(this.targetMesh=n.targetMesh,this.targetMesh.computeWorldMatrix(!0)),n.poleTargetMesh?(this.poleTargetMesh=n.poleTargetMesh,this.poleTargetMesh.computeWorldMatrix(!0)):n.poleTargetBone?this.poleTargetBone=n.poleTargetBone:this._bone1.getParent()&&(this.poleTargetBone=this._bone1.getParent()),n.poleTargetLocalOffset&&this.poleTargetLocalOffset.copyFrom(n.poleTargetLocalOffset),n.poleAngle&&(this.poleAngle=n.poleAngle),n.bendAxis&&this._bendAxis.copyFrom(n.bendAxis),n.maxAngle&&(this.maxAngle=n.maxAngle),n.slerpAmount&&(this.slerpAmount=n.slerpAmount))}return Object.defineProperty(e.prototype,"maxAngle",{get:function(){return this._maxAngle},set:function(e){this._setMaxAngle(e)},enumerable:!1,configurable:!0}),e.prototype._setMaxAngle=function(e){e<0&&(e=0),(e>Math.PI||null==e)&&(e=Math.PI),this._maxAngle=e;var t=this._bone1Length,n=this._bone2Length;this._maxReach=Math.sqrt(t*t+n*n-2*t*n*Math.cos(e))},e.prototype.update=function(){if(!this._notEnoughInformation){var t=this.targetPosition,n=this.poleTargetPosition,i=e._TmpMats[0],r=e._TmpMats[1];this.targetMesh&&t.copyFrom(this.targetMesh.getAbsolutePosition()),this.poleTargetBone?this.poleTargetBone.getAbsolutePositionFromLocalToRef(this.poleTargetLocalOffset,this.mesh,n):this.poleTargetMesh&&C.TransformCoordinatesToRef(this.poleTargetLocalOffset,this.poleTargetMesh.getWorldMatrix(),n);var o=e._TmpVecs[0],a=e._TmpVecs[1],s=e._TmpVecs[2],c=e._TmpVecs[3],l=e._TmpVecs[4],u=e._TmpQuat;this._bone1.getAbsolutePositionToRef(this.mesh,o),n.subtractToRef(o,l),0==l.x&&0==l.y&&0==l.z?l.y=1:l.normalize(),t.subtractToRef(o,c),c.normalize(),C.CrossToRef(c,l,a),a.normalize(),C.CrossToRef(c,a,s),s.normalize(),R.FromXYZAxesToRef(s,c,a,i);var h=this._bone1Length,d=this._bone2Length,p=C.Distance(o,t);this._maxReach>0&&(p=Math.min(this._maxReach,p));var f=(d*d+p*p-h*h)/(2*d*p),m=(p*p+h*h-d*d)/(2*p*h);f>1&&(f=1),m>1&&(m=1),f<-1&&(f=-1),m<-1&&(m=-1);var _=Math.acos(f),g=Math.acos(m),y=-_-g;if(this._rightHandedSystem)R.RotationYawPitchRollToRef(0,0,this._adjustRoll,r),r.multiplyToRef(i,i),R.RotationAxisToRef(this._bendAxis,g,r),r.multiplyToRef(i,i);else{var v=e._TmpVecs[5];v.copyFrom(this._bendAxis),v.x*=-1,R.RotationAxisToRef(v,-g,r),r.multiplyToRef(i,i)}this.poleAngle&&(R.RotationAxisToRef(c,this.poleAngle,r),i.multiplyToRef(r,i)),this._bone1&&(this.slerpAmount<1?(this._slerping||I.FromRotationMatrixToRef(this._bone1Mat,this._bone1Quat),I.FromRotationMatrixToRef(i,u),I.SlerpToRef(this._bone1Quat,u,this.slerpAmount,this._bone1Quat),y=this._bone2Ang*(1-this.slerpAmount)+y*this.slerpAmount,this._bone1.setRotationQuaternion(this._bone1Quat,Si.WORLD,this.mesh),this._slerping=!0):(this._bone1.setRotationMatrix(i,Si.WORLD,this.mesh),this._bone1Mat.copyFrom(i),this._slerping=!1),this._updateLinkedTransformRotation(this._bone1)),this._bone2.setAxisAngle(this._bendAxis,y,Si.LOCAL),this._updateLinkedTransformRotation(this._bone2),this._bone2Ang=y}},e.prototype._updateLinkedTransformRotation=function(e){e._linkedTransformNode&&(e._linkedTransformNode.rotationQuaternion||(e._linkedTransformNode.rotationQuaternion=new I),e.getRotationQuaternionToRef(Si.LOCAL,null,e._linkedTransformNode.rotationQuaternion))},e._TmpVecs=[C.Zero(),C.Zero(),C.Zero(),C.Zero(),C.Zero(),C.Zero()],e._TmpQuat=I.Identity(),e._TmpMats=[R.Identity(),R.Identity()],e}(),Is=function(){function e(e,t,n,i){if(this.upAxis=C.Up(),this.upAxisSpace=Si.LOCAL,this.adjustYaw=0,this.adjustPitch=0,this.adjustRoll=0,this.slerpAmount=1,this._boneQuat=I.Identity(),this._slerping=!1,this._firstFrameSkipped=!1,this._fowardAxis=C.Forward(),this.useAbsoluteValueForYaw=!1,this.mesh=e,this.bone=t,this.target=n,i){if(i.adjustYaw&&(this.adjustYaw=i.adjustYaw),i.adjustPitch&&(this.adjustPitch=i.adjustPitch),i.adjustRoll&&(this.adjustRoll=i.adjustRoll),null!=i.maxYaw?this.maxYaw=i.maxYaw:this.maxYaw=Math.PI,null!=i.minYaw?this.minYaw=i.minYaw:this.minYaw=-Math.PI,null!=i.maxPitch?this.maxPitch=i.maxPitch:this.maxPitch=Math.PI,null!=i.minPitch?this.minPitch=i.minPitch:this.minPitch=-Math.PI,null!=i.slerpAmount&&(this.slerpAmount=i.slerpAmount),null!=i.upAxis&&(this.upAxis=i.upAxis),null!=i.upAxisSpace&&(this.upAxisSpace=i.upAxisSpace),null!=i.yawAxis||null!=i.pitchAxis){var r=Ii.Y,o=Ii.X;null!=i.yawAxis&&(r=i.yawAxis.clone()).normalize(),null!=i.pitchAxis&&(o=i.pitchAxis.clone()).normalize();var a=C.Cross(o,r);this._transformYawPitch=R.Identity(),R.FromXYZAxesToRef(o,r,a,this._transformYawPitch),this._transformYawPitchInv=this._transformYawPitch.clone(),this._transformYawPitch.invert()}void 0!==i.useAbsoluteValueForYaw&&(this.useAbsoluteValueForYaw=i.useAbsoluteValueForYaw)}t.getParent()||this.upAxisSpace!=Si.BONE||(this.upAxisSpace=Si.LOCAL)}return Object.defineProperty(e.prototype,"minYaw",{get:function(){return this._minYaw},set:function(e){this._minYaw=e,this._minYawSin=Math.sin(e),this._minYawCos=Math.cos(e),null!=this._maxYaw&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxYaw",{get:function(){return this._maxYaw},set:function(e){this._maxYaw=e,this._maxYawSin=Math.sin(e),this._maxYawCos=Math.cos(e),null!=this._minYaw&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minPitch",{get:function(){return this._minPitch},set:function(e){this._minPitch=e,this._minPitchTan=Math.tan(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxPitch",{get:function(){return this._maxPitch},set:function(e){this._maxPitch=e,this._maxPitchTan=Math.tan(e)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this.slerpAmount<1&&!this._firstFrameSkipped)this._firstFrameSkipped=!0;else{var t=this.bone,n=e._TmpVecs[0];t.getAbsolutePositionToRef(this.mesh,n);var i=this.target,r=e._TmpMats[0],o=e._TmpMats[1],a=this.mesh,s=t.getParent(),c=e._TmpVecs[1];c.copyFrom(this.upAxis),this.upAxisSpace==Si.BONE&&s?(this._transformYawPitch&&C.TransformCoordinatesToRef(c,this._transformYawPitchInv,c),s.getDirectionToRef(c,this.mesh,c)):this.upAxisSpace==Si.LOCAL&&(a.getDirectionToRef(c,c),1==a.scaling.x&&1==a.scaling.y&&1==a.scaling.z||c.normalize());var l=!1,u=!1;if(this._maxYaw==Math.PI&&this._minYaw==-Math.PI||(l=!0),this._maxPitch==Math.PI&&this._minPitch==-Math.PI||(u=!0),l||u){var h=e._TmpMats[2],d=e._TmpMats[3];if(this.upAxisSpace==Si.BONE&&1==c.y&&s)s.getRotationMatrixToRef(Si.WORLD,this.mesh,h);else if(this.upAxisSpace!=Si.LOCAL||1!=c.y||s){var p=e._TmpVecs[2];p.copyFrom(this._fowardAxis),this._transformYawPitch&&C.TransformCoordinatesToRef(p,this._transformYawPitchInv,p),s?s.getDirectionToRef(p,this.mesh,p):a.getDirectionToRef(p,p);var f=C.Cross(c,p);f.normalize(),p=C.Cross(f,c),R.FromXYZAxesToRef(f,c,p,h)}else h.copyFrom(a.getWorldMatrix());h.invertToRef(d);var m=null;if(u){var _=e._TmpVecs[3];i.subtractToRef(n,_),C.TransformCoordinatesToRef(_,d,_),m=Math.sqrt(_.x*_.x+_.z*_.z);var g=Math.atan2(_.y,m),y=g;g>this._maxPitch?(_.y=this._maxPitchTan*m,y=this._maxPitch):gthis._maxYaw||bMath.PI?this._isAngleBetween(v,this._maxYaw,this._midYawConstraint)?(_.z=this._maxYawCos*m,_.x=this._maxYawSin*m,T=this._maxYaw):this._isAngleBetween(v,this._midYawConstraint,this._minYaw)&&(_.z=this._minYawCos*m,_.x=this._minYawSin*m,T=this._minYaw):b>this._maxYaw?(_.z=this._maxYawCos*m,_.x=this._maxYawSin*m,v<0&&this.useAbsoluteValueForYaw&&(_.x*=-1),T=this._maxYaw):bMath.PI){var E=e._TmpVecs[8];E.copyFrom(Ii.Z),this._transformYawPitch&&C.TransformCoordinatesToRef(E,this._transformYawPitchInv,E);var A=e._TmpMats[4];this._boneQuat.toRotationMatrix(A),this.mesh.getWorldMatrix().multiplyToRef(A,A),C.TransformCoordinatesToRef(E,A,E),C.TransformCoordinatesToRef(E,d,E);var x=Math.atan2(E.x,E.z);if(this._getAngleBetween(x,v)>this._getAngleBetween(x,this._midYawConstraint)){null==m&&(m=Math.sqrt(_.x*_.x+_.z*_.z));var S=this._getAngleBetween(x,this._maxYaw);this._getAngleBetween(x,this._minYaw)Math.PI?n-=2*Math.PI:n<-Math.PI&&(n+=2*Math.PI),n},e.prototype._getAngleBetween=function(e,t){var n=0;return(n=(e=(e%=2*Math.PI)<0?e+2*Math.PI:e)<(t=(t%=2*Math.PI)<0?t+2*Math.PI:t)?t-e:e-t)>Math.PI&&(n=2*Math.PI-n),n},e.prototype._isAngleBetween=function(e,t,n){if(e=(e%=2*Math.PI)<0?e+2*Math.PI:e,(t=(t%=2*Math.PI)<0?t+2*Math.PI:t)<(n=(n%=2*Math.PI)<0?n+2*Math.PI:n)){if(e>t&&en&&e0}return Object.defineProperty(e.prototype,"useTextureToStoreBoneMatrices",{get:function(){return this._useTextureToStoreBoneMatrices},set:function(e){this._useTextureToStoreBoneMatrices=e,this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUsingTextureForMatrices",{get:function(){return this.useTextureToStoreBoneMatrices&&this._canUseTextureForBones},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),e.prototype.getClassName=function(){return"Skeleton"},e.prototype.getChildren=function(){return this.bones.filter((function(e){return!e.getParent()}))},e.prototype.getTransformMatrices=function(e){return this.needInitialSkinMatrix?(e._bonesTransformMatrices||this.prepare(),e._bonesTransformMatrices):(this._transformMatrices&&!this._isDirty||this.prepare(),this._transformMatrices)},e.prototype.getTransformMatrixTexture=function(e){return this.needInitialSkinMatrix&&e._transformMatrixTexture?e._transformMatrixTexture:this._transformMatrixTexture},e.prototype.getScene=function(){return this._scene},e.prototype.toString=function(e){var t="Name: ".concat(this.name,", nBones: ").concat(this.bones.length);if(t+=", nAnimationRanges: ".concat(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";var n=!0;for(var i in this._ranges)n&&(t+=", ",n=!1),t+=i;t+="}"}return t},e.prototype.getBoneIndexByName=function(e){for(var t=0,n=this.bones.length;t-1&&this._meshesWithPoseMatrix.splice(t,1)},e.prototype._computeTransformMatrices=function(e,t){this.onBeforeComputeObservable.notifyObservers(this);for(var n=0;n0)for(var n=0,i=this.bones;n-1&&this._parentContainer.skeletons.splice(e,1),this._parentContainer=null}this._transformMatrixTexture&&(this._transformMatrixTexture.dispose(),this._transformMatrixTexture=null)},e.prototype.serialize=function(){var e,t={};t.name=this.name,t.id=this.id,this.dimensionsAtRest&&(t.dimensionsAtRest=this.dimensionsAtRest.asArray()),t.bones=[],t.needInitialSkinMatrix=this.needInitialSkinMatrix;for(var n=0;n0&&(o.animation=i.animations[0].serialize()),t.ranges=[],this._ranges){var s=this._ranges[a];if(s){var c={};c.name=a,c.from=s.from,c.to=s.to,t.ranges.push(c)}}}return t},e.Parse=function(t,n){var i,r=new e(t.name,t.id,n);for(t.dimensionsAtRest&&(r.dimensionsAtRest=C.FromArray(t.dimensionsAtRest)),r.needInitialSkinMatrix=t.needInitialSkinMatrix,i=0;i-1&&(s=r.bones[o.parentBoneIndex]);var c=o.rest?R.FromArray(o.rest):null,l=new Ri(o.name,r,s,R.FromArray(o.matrix),c,null,a);void 0!==o.id&&null!==o.id&&(l.id=o.id),o.length&&(l.length=o.length),o.metadata&&(l.metadata=o.metadata),o.animation&&l.animations.push(Je.Parse(o.animation)),void 0!==o.linkedTransformNodeId&&null!==o.linkedTransformNodeId&&(r._hasWaitingData=!0,l._waitingTransformNodeId=o.linkedTransformNodeId)}if(t.ranges)for(i=0;i0&&(e=this._meshesWithPoseMatrix[0].getPoseMatrix()),e},e.prototype.sortBones=function(){for(var e=[],t=new Array(this.bones.length),n=0;n=2&&(this._leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]}),this.browserGamepad.axes.length>=4&&(this._rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})}return Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._isConnected},enumerable:!1,configurable:!0}),e.prototype.onleftstickchanged=function(e){this._onleftstickchanged=e},e.prototype.onrightstickchanged=function(e){this._onrightstickchanged=e},Object.defineProperty(e.prototype,"leftStick",{get:function(){return this._leftStick},set:function(e){!this._onleftstickchanged||this._leftStick.x===e.x&&this._leftStick.y===e.y||this._onleftstickchanged(e),this._leftStick=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightStick",{get:function(){return this._rightStick},set:function(e){!this._onrightstickchanged||this._rightStick.x===e.x&&this._rightStick.y===e.y||this._onrightstickchanged(e),this._rightStick=e},enumerable:!1,configurable:!0}),e.prototype.update=function(){this._leftStick&&(this.leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]},this._invertLeftStickY&&(this.leftStick.y*=-1)),this._rightStick&&(this.rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})},e.prototype.dispose=function(){},e.GAMEPAD=0,e.GENERIC=1,e.XBOX=2,e.POSE_ENABLED=3,e.DUALSHOCK=4,e}(),Us=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.onButtonDownObservable=new u,r.onButtonUpObservable=new u,r.type=Bs.GENERIC,r._buttons=new Array(i.buttons.length),r}return H(t,e),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype._setButtonValue=function(e,t,n){return e!==t&&(1===e&&(this._onbuttondown&&this._onbuttondown(n),this.onButtonDownObservable.notifyObservers(n)),0===e&&(this._onbuttonup&&this._onbuttonup(n),this.onButtonUpObservable.notifyObservers(n))),e},t.prototype.update=function(){e.prototype.update.call(this);for(var t=0;t.005&&(e.inertialAlphaOffset+=n)}if(0!=t.y){var i=t.y/this.gamepadRotationSensibility*this._yAxisScale;0!=i&&Math.abs(i)>.005&&(e.inertialBetaOffset+=i)}}var r=this.gamepad.leftStick;if(r&&0!=r.y){var o=r.y/this.gamepadMoveSensibility;0!=o&&Math.abs(o)>.005&&(this.camera.inertialRadiusOffset-=o)}}},e.prototype.getClassName=function(){return"ArcRotateCameraGamepadInput"},e.prototype.getSimpleName=function(){return"gamepad"},W([Se()],e.prototype,"gamepadRotationSensibility",void 0),W([Se()],e.prototype,"gamepadMoveSensibility",void 0),e}();Ns.ArcRotateCameraGamepadInput=ks;var Vs=function(){function e(){this.keysUp=[38],this.keysDown=[40],this.keysLeft=[37],this.keysRight=[39],this.keysReset=[220],this.panningSensibility=50,this.zoomingSensibility=25,this.useAltToZoom=!0,this.angularSpeed=.01,this._keys=new Array}return e.prototype.attachControl=function(e){var t=this;e=Pn.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add((function(){t._keys.length=0})),this._onKeyboardObserver=this._scene.onKeyboardObservable.add((function(n){var i,r=n.event;r.metaKey||(n.type===oi.KEYDOWN?(t._ctrlPressed=r.ctrlKey,t._altPressed=r.altKey,(-1!==t.keysUp.indexOf(r.keyCode)||-1!==t.keysDown.indexOf(r.keyCode)||-1!==t.keysLeft.indexOf(r.keyCode)||-1!==t.keysRight.indexOf(r.keyCode)||-1!==t.keysReset.indexOf(r.keyCode))&&(-1===(i=t._keys.indexOf(r.keyCode))&&t._keys.push(r.keyCode),r.preventDefault&&(e||r.preventDefault()))):-1===t.keysUp.indexOf(r.keyCode)&&-1===t.keysDown.indexOf(r.keyCode)&&-1===t.keysLeft.indexOf(r.keyCode)&&-1===t.keysRight.indexOf(r.keyCode)&&-1===t.keysReset.indexOf(r.keyCode)||((i=t._keys.indexOf(r.keyCode))>=0&&t._keys.splice(i,1),r.preventDefault&&(e||r.preventDefault())))})))},e.prototype.detachControl=function(){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys.length=0},e.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var e=this.camera,t=0;t0?n/(1+this.wheelDeltaPercentage):n*(1+this.wheelDeltaPercentage)},e.prototype.attachControl=function(e){var t=this;e=Pn.BackCompatCameraNoPreventDefault(arguments),this._wheel=function(n){if(n.type===ti.POINTERWHEEL){var i=n.event,r=0,o=i.deltaMode===li.DOM_DELTA_LINE?40:1,a=-i.deltaY*o;if(t.customComputeDeltaFromMouseWheel)r=t.customComputeDeltaFromMouseWheel(a,t,i);else if(t.wheelDeltaPercentage){if((r=t._computeDeltaFromMouseWheelLegacyEvent(a,t.camera.radius))>0){for(var s=t.camera.radius,c=t.camera.inertialRadiusOffset+r,l=0;l<20&&Math.abs(c)>.001;l++)s-=c,c*=t.camera.inertia;s=h.Clamp(s,0,Number.MAX_VALUE),r=t._computeDeltaFromMouseWheelLegacyEvent(a,s)}}else r=a/(40*t.wheelPrecision);r&&(t.zoomToMouseLocation?(t._hitPlane||t._updateHitPlane(),t._zoomToMouse(r)):t.camera.inertialRadiusOffset+=r),i.preventDefault&&(e||i.preventDefault())}},this._observer=this.camera.getScene()._inputManager._addCameraPointerObserver(this._wheel,ti.POINTERWHEEL),this.zoomToMouseLocation&&this._inertialPanning.setAll(0)},e.prototype.detachControl=function(){this._observer&&(this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer),this._observer=null,this._wheel=null)},e.prototype.checkInputs=function(){if(this.zoomToMouseLocation){var e=this.camera;0+e.inertialAlphaOffset+e.inertialBetaOffset+e.inertialRadiusOffset&&(this._updateHitPlane(),e.target.addInPlace(this._inertialPanning),this._inertialPanning.scaleInPlace(e.inertia),this._zeroIfClose(this._inertialPanning))}},e.prototype.getClassName=function(){return"ArcRotateCameraMouseWheelInput"},e.prototype.getSimpleName=function(){return"mousewheel"},e.prototype._updateHitPlane=function(){var e=this.camera,t=e.target.subtract(e.position);this._hitPlane=bi.FromPositionAndNormal(e.target,t)},e.prototype._getPosition=function(){var e,t=this.camera,n=t.getScene(),i=n.createPickingRay(n.pointerX,n.pointerY,R.Identity(),t,!1);0===t.targetScreenOffset.x&&0===t.targetScreenOffset.y||(this._viewOffset.set(t.targetScreenOffset.x,t.targetScreenOffset.y,0),t.getViewMatrix().invertToRef(t._cameraTransformMatrix),this._globalOffset=C.TransformNormal(this._viewOffset,t._cameraTransformMatrix),i.origin.addInPlace(this._globalOffset));var r=0;return this._hitPlane&&(r=null!==(e=i.intersectsPlane(this._hitPlane))&&void 0!==e?e:0),i.origin.addInPlace(i.direction.scaleInPlace(r))},e.prototype._zoomToMouse=function(e){var t,n,i=this.camera,r=1-i.inertia;if(i.lowerRadiusLimit){var o=null!==(t=i.lowerRadiusLimit)&&void 0!==t?t:0;i.radius-(i.inertialRadiusOffset+e)/ra&&(e=(i.radius-a)*r-i.inertialRadiusOffset)}var s=e/r/i.radius,c=this._getPosition(),l=w.Vector3[6];c.subtractToRef(i.target,l),l.scaleInPlace(s),l.scaleInPlace(r),this._inertialPanning.addInPlace(l),i.inertialRadiusOffset+=e},e.prototype._zeroIfClose=function(e){Math.abs(e.x)this.camera.pinchToPanMaxDistance?(this._computePinchZoom(n,i),this._isPinching=!0):this._computeMultiTouchPanning(r,o)):this.multiTouchPanning?this._computeMultiTouchPanning(r,o):this.pinchZoom&&this._computePinchZoom(n,i))},t.prototype.onButtonDown=function(e){this._isPanClick=e.button===this.camera._panningMouseButton},t.prototype.onButtonUp=function(e){this._twoFingerActivityCount=0,this._isPinching=!1},t.prototype.onLostFocus=function(){this._isPanClick=!1,this._twoFingerActivityCount=0,this._isPinching=!1},t.MinimumRadiusForPinch=.001,W([Se()],t.prototype,"buttons",void 0),W([Se()],t.prototype,"angularSensibilityX",void 0),W([Se()],t.prototype,"angularSensibilityY",void 0),W([Se()],t.prototype,"pinchPrecision",void 0),W([Se()],t.prototype,"pinchDeltaPercentage",void 0),W([Se()],t.prototype,"useNaturalPinchZoom",void 0),W([Se()],t.prototype,"pinchZoom",void 0),W([Se()],t.prototype,"panningSensibility",void 0),W([Se()],t.prototype,"multiTouchPanning",void 0),W([Se()],t.prototype,"multiTouchPanAndZoom",void 0),t}(Ds);Ns.ArcRotateCameraPointersInput=Gs;var Hs=function(e){function t(t){return e.call(this,t)||this}return H(t,e),t.prototype.addMouseWheel=function(){return this.add(new zs),this},t.prototype.addPointers=function(){return this.add(new Gs),this},t.prototype.addKeyboard=function(){return this.add(new Vs),this},t}(Ls);Hs.prototype.addVRDeviceOrientation=function(){return this.add(new js),this};var js=function(){function e(){var e=this;this.alphaCorrection=1,this.gammaCorrection=1,this._alpha=0,this._gamma=0,this._dirty=!1,this._deviceOrientationHandler=function(t){return e._onOrientationEvent(t)}}return e.prototype.attachControl=function(e){var t=this;e=Pn.BackCompatCameraNoPreventDefault(arguments),this.camera.attachControl(e);var n=this.camera.getScene().getEngine().getHostWindow();n&&("undefined"!=typeof DeviceOrientationEvent&&"function"==typeof DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then((function(e){"granted"===e?n.addEventListener("deviceorientation",t._deviceOrientationHandler):Pn.Warn("Permission not granted.")})).catch((function(e){Pn.Error(e)})):n.addEventListener("deviceorientation",this._deviceOrientationHandler))},e.prototype._onOrientationEvent=function(e){null!==e.alpha&&(this._alpha=(0|+e.alpha)*this.alphaCorrection),null!==e.gamma&&(this._gamma=(0|+e.gamma)*this.gammaCorrection),this._dirty=!0},e.prototype.checkInputs=function(){this._dirty&&(this._dirty=!1,this._gamma<0&&(this._gamma=180+this._gamma),this.camera.alpha=-this._alpha/180*Math.PI%Math.PI*2,this.camera.beta=this._gamma/180*Math.PI)},e.prototype.detachControl=function(){window.removeEventListener("deviceorientation",this._deviceOrientationHandler)},e.prototype.getClassName=function(){return"ArcRotateCameraVRDeviceOrientationInput"},e.prototype.getSimpleName=function(){return"VRDeviceOrientation"},e}();Ns.ArcRotateCameraVRDeviceOrientationInput=js;var Ws=function(){function e(){this.keysForward=[87],this.keysBackward=[83],this.keysUp=[69],this.keysDown=[81],this.keysRight=[68],this.keysLeft=[65],this._keys=new Array}return e.prototype.attachControl=function(e){var t=this;e=Pn.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add((function(){t._keys.length=0})),this._onKeyboardObserver=this._scene.onKeyboardObservable.add((function(n){var i,r=n.event;n.type===oi.KEYDOWN?-1===t.keysForward.indexOf(r.keyCode)&&-1===t.keysBackward.indexOf(r.keyCode)&&-1===t.keysUp.indexOf(r.keyCode)&&-1===t.keysDown.indexOf(r.keyCode)&&-1===t.keysLeft.indexOf(r.keyCode)&&-1===t.keysRight.indexOf(r.keyCode)||(-1===(i=t._keys.indexOf(r.keyCode))&&t._keys.push(r.keyCode),e||r.preventDefault()):-1===t.keysForward.indexOf(r.keyCode)&&-1===t.keysBackward.indexOf(r.keyCode)&&-1===t.keysUp.indexOf(r.keyCode)&&-1===t.keysDown.indexOf(r.keyCode)&&-1===t.keysLeft.indexOf(r.keyCode)&&-1===t.keysRight.indexOf(r.keyCode)||((i=t._keys.indexOf(r.keyCode))>=0&&t._keys.splice(i,1),e||r.preventDefault())})))},e.prototype.detachControl=function(){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys.length=0},e.prototype.getClassName=function(){return"FlyCameraKeyboardInput"},e.prototype._onLostFocus=function(){this._keys.length=0},e.prototype.getSimpleName=function(){return"keyboard"},e.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var e=this.camera,t=0;t=0&&t._keys.splice(i,1),r.preventDefault&&(e||r.preventDefault())))})))},e.prototype.detachControl=function(){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys.length=0},e.prototype.checkInputs=function(){var e=this;this._onKeyboardObserver&&this._keys.forEach((function(t){-1!==e.keysHeightOffsetIncr.indexOf(t)&&e._modifierHeightOffset()?e.camera.heightOffset+=e.heightSensibility:-1!==e.keysHeightOffsetDecr.indexOf(t)&&e._modifierHeightOffset()?e.camera.heightOffset-=e.heightSensibility:-1!==e.keysRotationOffsetIncr.indexOf(t)&&e._modifierRotationOffset()?(e.camera.rotationOffset+=e.rotationSensibility,e.camera.rotationOffset%=360):-1!==e.keysRotationOffsetDecr.indexOf(t)&&e._modifierRotationOffset()?(e.camera.rotationOffset-=e.rotationSensibility,e.camera.rotationOffset%=360):-1!==e.keysRadiusIncr.indexOf(t)&&e._modifierRadius()?e.camera.radius+=e.radiusSensibility:-1!==e.keysRadiusDecr.indexOf(t)&&e._modifierRadius()&&(e.camera.radius-=e.radiusSensibility)}))},e.prototype.getClassName=function(){return"FollowCameraKeyboardMoveInput"},e.prototype.getSimpleName=function(){return"keyboard"},e.prototype._modifierHeightOffset=function(){return this.keysHeightOffsetModifierAlt===this._altPressed&&this.keysHeightOffsetModifierCtrl===this._ctrlPressed&&this.keysHeightOffsetModifierShift===this._shiftPressed},e.prototype._modifierRotationOffset=function(){return this.keysRotationOffsetModifierAlt===this._altPressed&&this.keysRotationOffsetModifierCtrl===this._ctrlPressed&&this.keysRotationOffsetModifierShift===this._shiftPressed},e.prototype._modifierRadius=function(){return this.keysRadiusModifierAlt===this._altPressed&&this.keysRadiusModifierCtrl===this._ctrlPressed&&this.keysRadiusModifierShift===this._shiftPressed},W([Se()],e.prototype,"keysHeightOffsetIncr",void 0),W([Se()],e.prototype,"keysHeightOffsetDecr",void 0),W([Se()],e.prototype,"keysHeightOffsetModifierAlt",void 0),W([Se()],e.prototype,"keysHeightOffsetModifierCtrl",void 0),W([Se()],e.prototype,"keysHeightOffsetModifierShift",void 0),W([Se()],e.prototype,"keysRotationOffsetIncr",void 0),W([Se()],e.prototype,"keysRotationOffsetDecr",void 0),W([Se()],e.prototype,"keysRotationOffsetModifierAlt",void 0),W([Se()],e.prototype,"keysRotationOffsetModifierCtrl",void 0),W([Se()],e.prototype,"keysRotationOffsetModifierShift",void 0),W([Se()],e.prototype,"keysRadiusIncr",void 0),W([Se()],e.prototype,"keysRadiusDecr",void 0),W([Se()],e.prototype,"keysRadiusModifierAlt",void 0),W([Se()],e.prototype,"keysRadiusModifierCtrl",void 0),W([Se()],e.prototype,"keysRadiusModifierShift",void 0),W([Se()],e.prototype,"heightSensibility",void 0),W([Se()],e.prototype,"rotationSensibility",void 0),W([Se()],e.prototype,"radiusSensibility",void 0),e}();Ns.FollowCameraKeyboardMoveInput=Ys;var qs=function(){function e(){this.axisControlRadius=!0,this.axisControlHeight=!1,this.axisControlRotation=!1,this.wheelPrecision=3,this.wheelDeltaPercentage=0}return e.prototype.attachControl=function(e){var t=this;e=Pn.BackCompatCameraNoPreventDefault(arguments),this._wheel=function(n){if(n.type===ti.POINTERWHEEL){var i=n.event,r=0,o=Math.max(-1,Math.min(1,i.deltaY));t.wheelDeltaPercentage?(+t.axisControlRadius+ +t.axisControlHeight+ +t.axisControlRotation&&J.Warn("wheelDeltaPercentage only usable when mouse wheel controls ONE axis. Currently enabled: axisControlRadius: "+t.axisControlRadius+", axisControlHeightOffset: "+t.axisControlHeight+", axisControlRotationOffset: "+t.axisControlRotation),t.axisControlRadius?r=.01*o*t.wheelDeltaPercentage*t.camera.radius:t.axisControlHeight?r=.01*o*t.wheelDeltaPercentage*t.camera.heightOffset:t.axisControlRotation&&(r=.01*o*t.wheelDeltaPercentage*t.camera.rotationOffset)):r=o*t.wheelPrecision,r&&(t.axisControlRadius?t.camera.radius+=r:t.axisControlHeight?t.camera.heightOffset-=r:t.axisControlRotation&&(t.camera.rotationOffset-=r)),i.preventDefault&&(e||i.preventDefault())}},this._observer=this.camera.getScene()._inputManager._addCameraPointerObserver(this._wheel,ti.POINTERWHEEL)},e.prototype.detachControl=function(){this._observer&&(this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer),this._observer=null,this._wheel=null)},e.prototype.getClassName=function(){return"ArcRotateCameraMouseWheelInput"},e.prototype.getSimpleName=function(){return"mousewheel"},W([Se()],e.prototype,"axisControlRadius",void 0),W([Se()],e.prototype,"axisControlHeight",void 0),W([Se()],e.prototype,"axisControlRotation",void 0),W([Se()],e.prototype,"wheelPrecision",void 0),W([Se()],e.prototype,"wheelDeltaPercentage",void 0),e}();Ns.FollowCameraMouseWheelInput=qs;var Ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.angularSensibilityX=1,t.angularSensibilityY=1,t.pinchPrecision=1e4,t.pinchDeltaPercentage=0,t.axisXControlRadius=!1,t.axisXControlHeight=!1,t.axisXControlRotation=!0,t.axisYControlRadius=!1,t.axisYControlHeight=!0,t.axisYControlRotation=!1,t.axisPinchControlRadius=!0,t.axisPinchControlHeight=!1,t.axisPinchControlRotation=!1,t.warningEnable=!0,t._warningCounter=0,t}return H(t,e),t.prototype.getClassName=function(){return"FollowCameraPointersInput"},t.prototype.onTouch=function(e,t,n){this._warning(),this.axisXControlRotation?this.camera.rotationOffset+=t/this.angularSensibilityX:this.axisYControlRotation&&(this.camera.rotationOffset+=n/this.angularSensibilityX),this.axisXControlHeight?this.camera.heightOffset+=t/this.angularSensibilityY:this.axisYControlHeight&&(this.camera.heightOffset+=n/this.angularSensibilityY),this.axisXControlRadius?this.camera.radius-=t/this.angularSensibilityY:this.axisYControlRadius&&(this.camera.radius-=n/this.angularSensibilityY)},t.prototype.onMultiTouch=function(e,t,n,i,r,o){if(!(0===n&&null===r||0===i&&null===o)){var a=(i-n)/(this.pinchPrecision*(this.angularSensibilityX+this.angularSensibilityY)/2);this.pinchDeltaPercentage?(a*=.01*this.pinchDeltaPercentage,this.axisPinchControlRotation&&(this.camera.rotationOffset+=a*this.camera.rotationOffset),this.axisPinchControlHeight&&(this.camera.heightOffset+=a*this.camera.heightOffset),this.axisPinchControlRadius&&(this.camera.radius-=a*this.camera.radius)):(this.axisPinchControlRotation&&(this.camera.rotationOffset+=a),this.axisPinchControlHeight&&(this.camera.heightOffset+=a),this.axisPinchControlRadius&&(this.camera.radius-=a))}},t.prototype._warning=function(){if(this.warningEnable&&this._warningCounter++%100==0){var e="It probably only makes sense to control ONE camera property with each pointer axis. Set 'warningEnable = false' if you are sure. Currently enabled: ";+this.axisXControlRotation+ +this.axisXControlHeight+ +this.axisXControlRadius<=1&&J.Warn(e+"axisXControlRotation: "+this.axisXControlRotation+", axisXControlHeight: "+this.axisXControlHeight+", axisXControlRadius: "+this.axisXControlRadius),+this.axisYControlRotation+ +this.axisYControlHeight+ +this.axisYControlRadius<=1&&J.Warn(e+"axisYControlRotation: "+this.axisYControlRotation+", axisYControlHeight: "+this.axisYControlHeight+", axisYControlRadius: "+this.axisYControlRadius),+this.axisPinchControlRotation+ +this.axisPinchControlHeight+ +this.axisPinchControlRadius<=1&&J.Warn(e+"axisPinchControlRotation: "+this.axisPinchControlRotation+", axisPinchControlHeight: "+this.axisPinchControlHeight+", axisPinchControlRadius: "+this.axisPinchControlRadius)}},W([Se()],t.prototype,"angularSensibilityX",void 0),W([Se()],t.prototype,"angularSensibilityY",void 0),W([Se()],t.prototype,"pinchPrecision",void 0),W([Se()],t.prototype,"pinchDeltaPercentage",void 0),W([Se()],t.prototype,"axisXControlRadius",void 0),W([Se()],t.prototype,"axisXControlHeight",void 0),W([Se()],t.prototype,"axisXControlRotation",void 0),W([Se()],t.prototype,"axisYControlRadius",void 0),W([Se()],t.prototype,"axisYControlHeight",void 0),W([Se()],t.prototype,"axisYControlRotation",void 0),W([Se()],t.prototype,"axisPinchControlRadius",void 0),W([Se()],t.prototype,"axisPinchControlHeight",void 0),W([Se()],t.prototype,"axisPinchControlRotation",void 0),t}(Ds);Ns.FollowCameraPointersInput=Ks;var Qs=function(){function e(){this.keysUp=[38],this.keysUpward=[33],this.keysDown=[40],this.keysDownward=[34],this.keysLeft=[37],this.keysRight=[39],this.rotationSpeed=.5,this.keysRotateLeft=[],this.keysRotateRight=[],this.keysRotateUp=[],this.keysRotateDown=[],this._keys=new Array}return e.prototype.attachControl=function(e){var t=this;e=Pn.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add((function(){t._keys.length=0})),this._onKeyboardObserver=this._scene.onKeyboardObservable.add((function(n){var i,r=n.event;r.metaKey||(n.type===oi.KEYDOWN?-1===t.keysUp.indexOf(r.keyCode)&&-1===t.keysDown.indexOf(r.keyCode)&&-1===t.keysLeft.indexOf(r.keyCode)&&-1===t.keysRight.indexOf(r.keyCode)&&-1===t.keysUpward.indexOf(r.keyCode)&&-1===t.keysDownward.indexOf(r.keyCode)&&-1===t.keysRotateLeft.indexOf(r.keyCode)&&-1===t.keysRotateRight.indexOf(r.keyCode)&&-1===t.keysRotateUp.indexOf(r.keyCode)&&-1===t.keysRotateDown.indexOf(r.keyCode)||(-1===(i=t._keys.indexOf(r.keyCode))&&t._keys.push(r.keyCode),e||r.preventDefault()):-1===t.keysUp.indexOf(r.keyCode)&&-1===t.keysDown.indexOf(r.keyCode)&&-1===t.keysLeft.indexOf(r.keyCode)&&-1===t.keysRight.indexOf(r.keyCode)&&-1===t.keysUpward.indexOf(r.keyCode)&&-1===t.keysDownward.indexOf(r.keyCode)&&-1===t.keysRotateLeft.indexOf(r.keyCode)&&-1===t.keysRotateRight.indexOf(r.keyCode)&&-1===t.keysRotateUp.indexOf(r.keyCode)&&-1===t.keysRotateDown.indexOf(r.keyCode)||((i=t._keys.indexOf(r.keyCode))>=0&&t._keys.splice(i,1),e||r.preventDefault()))})))},e.prototype.detachControl=function(){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys.length=0},e.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var e=this.camera,t=0;t1)e.cameraRotation.x=-this._offsetY/this.touchAngularSensibility;else{var n=e._computeLocalCameraSpeed(),i=new C(0,0,0!==this.touchMoveSensibility?n*this._offsetY/this.touchMoveSensibility:0);R.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,0,e._cameraRotationMatrix),e.cameraDirection.addInPlace(C.TransformCoordinates(i,e._cameraRotationMatrix))}}},e.prototype.getClassName=function(){return"FreeCameraTouchInput"},e.prototype.getSimpleName=function(){return"touch"},W([Se()],e.prototype,"touchAngularSensibility",void 0),W([Se()],e.prototype,"touchMoveSensibility",void 0),e}();Ns.FreeCameraTouchInput=ec;var tc=function(e){function t(t){var n=e.call(this,t)||this;return n._mouseInput=null,n._mouseWheelInput=null,n}return H(t,e),t.prototype.addKeyboard=function(){return this.add(new Qs),this},t.prototype.addMouse=function(e){return void 0===e&&(e=!0),this._mouseInput||(this._mouseInput=new $s(e),this.add(this._mouseInput)),this},t.prototype.removeMouse=function(){return this._mouseInput&&this.remove(this._mouseInput),this},t.prototype.addMouseWheel=function(){return this._mouseWheelInput||(this._mouseWheelInput=new Js,this.add(this._mouseWheelInput)),this},t.prototype.removeMouseWheel=function(){return this._mouseWheelInput&&this.remove(this._mouseWheelInput),this},t.prototype.addTouch=function(){return this.add(new ec),this},t.prototype.clear=function(){e.prototype.clear.call(this),this._mouseInput=null},t}(Ls);tc.prototype.addDeviceOrientation=function(e){return this._deviceOrientationInput||(this._deviceOrientationInput=new nc,e&&(this._deviceOrientationInput.smoothFactor=e),this.add(this._deviceOrientationInput)),this};var nc=function(){function e(){var e=this;this._screenOrientationAngle=0,this._screenQuaternion=new I,this._alpha=0,this._beta=0,this._gamma=0,this.smoothFactor=0,this._onDeviceOrientationChangedObservable=new u,this._orientationChanged=function(){e._screenOrientationAngle=void 0!==window.orientation?+window.orientation:window.screen.orientation&&window.screen.orientation.angle?window.screen.orientation.angle:0,e._screenOrientationAngle=-Pn.ToRadians(e._screenOrientationAngle/2),e._screenQuaternion.copyFromFloats(0,Math.sin(e._screenOrientationAngle),0,Math.cos(e._screenOrientationAngle))},this._deviceOrientation=function(t){e.smoothFactor?(e._alpha=null!==t.alpha?Pn.SmoothAngleChange(e._alpha,t.alpha,e.smoothFactor):0,e._beta=null!==t.beta?Pn.SmoothAngleChange(e._beta,t.beta,e.smoothFactor):0,e._gamma=null!==t.gamma?Pn.SmoothAngleChange(e._gamma,t.gamma,e.smoothFactor):0):(e._alpha=null!==t.alpha?t.alpha:0,e._beta=null!==t.beta?t.beta:0,e._gamma=null!==t.gamma?t.gamma:0),null!==t.alpha&&e._onDeviceOrientationChangedObservable.notifyObservers()},this._constantTranform=new I(-Math.sqrt(.5),0,0,Math.sqrt(.5)),this._orientationChanged()}return e.WaitForOrientationChangeAsync=function(e){return new Promise((function(t,n){var i=!1,r=function(){window.removeEventListener("deviceorientation",r),i=!0,t()};e&&setTimeout((function(){i||(window.removeEventListener("deviceorientation",r),n("WaitForOrientationChangeAsync timed out"))}),e),"undefined"!=typeof DeviceOrientationEvent&&"function"==typeof DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then((function(e){"granted"==e?window.addEventListener("deviceorientation",r):Pn.Warn("Permission not granted.")})).catch((function(e){Pn.Error(e)})):window.addEventListener("deviceorientation",r)}))},Object.defineProperty(e.prototype,"camera",{get:function(){return this._camera},set:function(e){var t=this;this._camera=e,null==this._camera||this._camera.rotationQuaternion||(this._camera.rotationQuaternion=new I),this._camera&&this._camera.onDisposeObservable.add((function(){t._onDeviceOrientationChangedObservable.clear()}))},enumerable:!1,configurable:!0}),e.prototype.attachControl=function(){var e=this,t=this.camera.getScene().getEngine().getHostWindow();if(t){var n=function(){t.addEventListener("orientationchange",e._orientationChanged),t.addEventListener("deviceorientation",e._deviceOrientation),e._orientationChanged()};"undefined"!=typeof DeviceOrientationEvent&&"function"==typeof DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then((function(e){"granted"===e?n():Pn.Warn("Permission not granted.")})).catch((function(e){Pn.Error(e)})):n()}},e.prototype.detachControl=function(){window.removeEventListener("orientationchange",this._orientationChanged),window.removeEventListener("deviceorientation",this._deviceOrientation),this._alpha=0},e.prototype.checkInputs=function(){this._alpha&&(I.RotationYawPitchRollToRef(Pn.ToRadians(this._alpha),Pn.ToRadians(this._beta),-Pn.ToRadians(this._gamma),this.camera.rotationQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._constantTranform),this._camera.rotationQuaternion.z*=-1,this._camera.rotationQuaternion.w*=-1)},e.prototype.getClassName=function(){return"FreeCameraDeviceOrientationInput"},e.prototype.getSimpleName=function(){return"deviceOrientation"},e}();Ns.FreeCameraDeviceOrientationInput=nc;var ic,rc=function(){function e(){this.gamepadAngularSensibility=200,this.gamepadMoveSensibility=40,this.deadzoneDelta=.1,this._yAxisScale=1,this._cameraTransform=R.Identity(),this._deltaTransform=C.Zero(),this._vector3=C.Zero(),this._vector2=S.Zero()}return Object.defineProperty(e.prototype,"invertYAxis",{get:function(){return 1!==this._yAxisScale},set:function(e){this._yAxisScale=e?-1:1},enumerable:!1,configurable:!0}),e.prototype.attachControl=function(){var e=this,t=this.camera.getScene().gamepadManager;this._onGamepadConnectedObserver=t.onGamepadConnectedObservable.add((function(t){t.type!==Bs.POSE_ENABLED&&(e.gamepad&&t.type!==Bs.XBOX||(e.gamepad=t))})),this._onGamepadDisconnectedObserver=t.onGamepadDisconnectedObservable.add((function(t){e.gamepad===t&&(e.gamepad=null)})),this.gamepad=t.getGamepadByType(Bs.XBOX),!this.gamepad&&t.gamepads.length&&(this.gamepad=t.gamepads[0])},e.prototype.detachControl=function(){this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver),this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver),this.gamepad=null},e.prototype.checkInputs=function(){if(this.gamepad&&this.gamepad.leftStick){var e=this.camera,t=this.gamepad.leftStick;0!==this.gamepadMoveSensibility&&(t.x=Math.abs(t.x)>this.deadzoneDelta?t.x/this.gamepadMoveSensibility:0,t.y=Math.abs(t.y)>this.deadzoneDelta?t.y/this.gamepadMoveSensibility:0);var n=this.gamepad.rightStick;n&&0!==this.gamepadAngularSensibility?(n.x=Math.abs(n.x)>this.deadzoneDelta?n.x/this.gamepadAngularSensibility:0,n.y=(Math.abs(n.y)>this.deadzoneDelta?n.y/this.gamepadAngularSensibility:0)*this._yAxisScale):n={x:0,y:0},e.rotationQuaternion?e.rotationQuaternion.toRotationMatrix(this._cameraTransform):R.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,0,this._cameraTransform);var i=50*e._computeLocalCameraSpeed();this._vector3.copyFromFloats(t.x*i,0,-t.y*i),C.TransformCoordinatesToRef(this._vector3,this._cameraTransform,this._deltaTransform),e.cameraDirection.addInPlace(this._deltaTransform),this._vector2.copyFromFloats(n.y,n.x),e.cameraRotation.addInPlace(this._vector2)}},e.prototype.getClassName=function(){return"FreeCameraGamepadInput"},e.prototype.getSimpleName=function(){return"gamepad"},W([Se()],e.prototype,"gamepadAngularSensibility",void 0),W([Se()],e.prototype,"gamepadMoveSensibility",void 0),e}();Ns.FreeCameraGamepadInput=rc,function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(ic||(ic={}));var oc=function(){function e(t,n){var i=this;this._released=!1;var r=j(j({},e._GetDefaultOptions()),n);if(this._leftJoystick=!!t,e._GlobalJoystickIndex++,this._axisTargetedByLeftAndRight=ic.X,this._axisTargetedByUpAndDown=ic.Y,this.reverseLeftRight=!1,this.reverseUpDown=!1,this._touches=new Mn,this.deltaPosition=C.Zero(),this._joystickSensibility=25,this._inversedSensibility=1/(this._joystickSensibility/1e3),this._onResize=function(){e._VJCanvasWidth=window.innerWidth,e._VJCanvasHeight=window.innerHeight,e.Canvas&&(e.Canvas.width=e._VJCanvasWidth,e.Canvas.height=e._VJCanvasHeight),e._HalfWidth=e._VJCanvasWidth/2},!e.Canvas){window.addEventListener("resize",this._onResize,!1),e.Canvas=document.createElement("canvas"),e._VJCanvasWidth=window.innerWidth,e._VJCanvasHeight=window.innerHeight,e.Canvas.width=window.innerWidth,e.Canvas.height=window.innerHeight,e.Canvas.style.width="100%",e.Canvas.style.height="100%",e.Canvas.style.position="absolute",e.Canvas.style.backgroundColor="transparent",e.Canvas.style.top="0px",e.Canvas.style.left="0px",e.Canvas.style.zIndex="5",e.Canvas.style.touchAction="none",e.Canvas.setAttribute("touch-action","none");var o=e.Canvas.getContext("2d");if(!o)throw new Error("Unable to create canvas for virtual joystick");e._VJCanvasContext=o,e._VJCanvasContext.strokeStyle="#ffffff",e._VJCanvasContext.lineWidth=2,document.body.appendChild(e.Canvas)}e._HalfWidth=e.Canvas.width/2,this.pressed=!1,this.limitToContainer=r.limitToContainer,this._joystickColor=r.color,this.containerSize=r.containerSize,this.puckSize=r.puckSize,r.position&&this.setPosition(r.position.x,r.position.y),r.puckImage&&this.setPuckImage(r.puckImage),r.containerImage&&this.setContainerImage(r.containerImage),r.alwaysVisible&&e._AlwaysVisibleSticks++,this.alwaysVisible=r.alwaysVisible,this._joystickPointerId=-1,this._joystickPointerPos=new S(0,0),this._joystickPreviousPointerPos=new S(0,0),this._joystickPointerStartPos=new S(0,0),this._deltaJoystickVector=new S(0,0),this._onPointerDownHandlerRef=function(e){i._onPointerDown(e)},this._onPointerMoveHandlerRef=function(e){i._onPointerMove(e)},this._onPointerUpHandlerRef=function(e){i._onPointerUp(e)},e.Canvas.addEventListener("pointerdown",this._onPointerDownHandlerRef,!1),e.Canvas.addEventListener("pointermove",this._onPointerMoveHandlerRef,!1),e.Canvas.addEventListener("pointerup",this._onPointerUpHandlerRef,!1),e.Canvas.addEventListener("pointerout",this._onPointerUpHandlerRef,!1),e.Canvas.addEventListener("contextmenu",(function(e){e.preventDefault()}),!1),requestAnimationFrame((function(){i._drawVirtualJoystick()}))}return e._GetDefaultOptions=function(){return{puckSize:40,containerSize:60,color:"cyan",puckImage:void 0,containerImage:void 0,position:void 0,alwaysVisible:!1,limitToContainer:!1}},e.prototype.setJoystickSensibility=function(e){this._joystickSensibility=e,this._inversedSensibility=1/(this._joystickSensibility/1e3)},e.prototype._onPointerDown=function(t){t.preventDefault(),(!0===this._leftJoystick?t.clientXe._HalfWidth)&&this._joystickPointerId<0?(this._joystickPointerId=t.pointerId,this._joystickPosition?(this._joystickPointerStartPos=this._joystickPosition.clone(),this._joystickPointerPos=this._joystickPosition.clone(),this._joystickPreviousPointerPos=this._joystickPosition.clone(),this._onPointerMove(t)):(this._joystickPointerStartPos.x=t.clientX,this._joystickPointerStartPos.y=t.clientY,this._joystickPointerPos=this._joystickPointerStartPos.clone(),this._joystickPreviousPointerPos=this._joystickPointerStartPos.clone()),this._deltaJoystickVector.x=0,this._deltaJoystickVector.y=0,this.pressed=!0,this._touches.add(t.pointerId.toString(),t)):e._GlobalJoystickIndex<2&&this._action&&(this._action(),this._touches.add(t.pointerId.toString(),{x:t.clientX,y:t.clientY,prevX:t.clientX,prevY:t.clientY}))},e.prototype._onPointerMove=function(t){if(this._joystickPointerId==t.pointerId){if(this.limitToContainer){var n=new S(t.clientX-this._joystickPointerStartPos.x,t.clientY-this._joystickPointerStartPos.y),i=n.length();i>this.containerSize&&n.scaleInPlace(this.containerSize/i),this._joystickPointerPos.x=this._joystickPointerStartPos.x+n.x,this._joystickPointerPos.y=this._joystickPointerStartPos.y+n.y}else this._joystickPointerPos.x=t.clientX,this._joystickPointerPos.y=t.clientY;this._deltaJoystickVector=this._joystickPointerPos.clone(),this._deltaJoystickVector=this._deltaJoystickVector.subtract(this._joystickPointerStartPos),0=0?this.rotation.y=-Math.atan(t.z/t.x)+Math.PI/2:this.rotation.y=-Math.atan(t.z/t.x)-Math.PI/2,this.rotation.z=0,isNaN(this.rotation.x)&&(this.rotation.x=0),isNaN(this.rotation.y)&&(this.rotation.y=0),isNaN(this.rotation.z)&&(this.rotation.z=0),this.rotationQuaternion&&I.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this.rotationQuaternion)},Object.defineProperty(t.prototype,"target",{get:function(){return this.getTarget()},set:function(e){this.setTarget(e)},enumerable:!1,configurable:!0}),t.prototype.getTarget=function(){return this._currentTarget},t.prototype._decideIfNeedsToMove=function(){return Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){if(this.parent)return this.parent.getWorldMatrix().invertToRef(w.Matrix[0]),C.TransformNormalToRef(this.cameraDirection,w.Matrix[0],w.Vector3[0]),this._deferredPositionUpdate.addInPlace(w.Vector3[0]),void(this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate));this._deferredPositionUpdate.addInPlace(this.cameraDirection),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate)},t.prototype._checkInputs=function(){var t=this.invertRotation?-this.inverseRotationSpeed:1,n=this._decideIfNeedsToMove(),i=this.cameraRotation.x||this.cameraRotation.y;if(this._deferredUpdated=!1,this._deferredRotationUpdate.copyFrom(this.rotation),this._deferredPositionUpdate.copyFrom(this.position),this.rotationQuaternion&&this._deferredRotationQuaternionUpdate.copyFrom(this.rotationQuaternion),n&&this._updatePosition(),i){if(this.rotationQuaternion&&this.rotationQuaternion.toEulerAnglesToRef(this._deferredRotationUpdate),this._deferredRotationUpdate.x+=this.cameraRotation.x*t,this._deferredRotationUpdate.y+=this.cameraRotation.y*t,!this.noRotationConstraint){var r=1.570796;this._deferredRotationUpdate.x>r&&(this._deferredRotationUpdate.x=r),this._deferredRotationUpdate.x<-r&&(this._deferredRotationUpdate.x=-r)}this._deferOnly?this._deferredUpdated=!0:this.rotation.copyFrom(this._deferredRotationUpdate),this.rotationQuaternion&&this._deferredRotationUpdate.lengthSquared()&&(I.RotationYawPitchRollToRef(this._deferredRotationUpdate.y,this._deferredRotationUpdate.x,this._deferredRotationUpdate.z,this._deferredRotationQuaternionUpdate),this._deferOnly?this._deferredUpdated=!0:this.rotationQuaternion.copyFrom(this._deferredRotationQuaternionUpdate))}n&&(Math.abs(this.cameraDirection.x)Dr.CollisionsEpsilon&&(o.position.addToRef(o._diffPosition,o._deferredPositionUpdate),o._deferOnly?o._deferredUpdated=!0:o.position.copyFrom(o._deferredPositionUpdate),o.onCollide&&n&&o.onCollide(n))},o.inputs=new tc(o),o.inputs.addKeyboard().addMouse(),o}return H(t,e),Object.defineProperty(t.prototype,"angularSensibility",{get:function(){var e=this.inputs.attached.mouse;return e?e.angularSensibility:0},set:function(e){var t=this.inputs.attached.mouse;t&&(t.angularSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUpward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUpward:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysUpward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysDown=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDownward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDownward:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysDownward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRight=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRotateLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRotateLeft:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRotateLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRotateRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRotateRight:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRotateRight=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRotateUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRotateUp:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRotateUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRotateDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRotateDown:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRotateDown=e)},enumerable:!1,configurable:!0}),t.prototype.attachControl=function(e,t){t=Pn.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(t)},t.prototype.detachControl=function(){this.inputs.detachElement(),this.cameraDirection=new C(0,0,0),this.cameraRotation=new S(0,0)},Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!1,configurable:!0}),t.prototype._collideWithWorld=function(e){(this.parent?C.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset);var t=this.getScene().collisionCoordinator;this._collider||(this._collider=t.createCollider()),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;var n=e;this.applyGravity&&(n=e.add(this.getScene().gravity)),t.getNewPosition(this._oldPosition,n,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)},t.prototype._checkInputs=function(){this._localDirection||(this._localDirection=C.Zero(),this._transformedDirection=C.Zero()),this.inputs.checkInputs(),e.prototype._checkInputs.call(this)},Object.defineProperty(t.prototype,"needMoveForGravity",{get:function(){return this._needMoveForGravity},set:function(e){this._needMoveForGravity=e},enumerable:!1,configurable:!0}),t.prototype._decideIfNeedsToMove=function(){return this._needMoveForGravity||Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):e.prototype._updatePosition.call(this)},t.prototype.dispose=function(){this.inputs.clear(),e.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"FreeCamera"},W([Oe()],t.prototype,"ellipsoid",void 0),W([Oe()],t.prototype,"ellipsoidOffset",void 0),W([Se()],t.prototype,"checkCollisions",void 0),W([Se()],t.prototype,"applyGravity",void 0),t}(sc);He.AddNodeConstructor("TouchCamera",(function(e,t){return function(){return new lc(e,C.Zero(),t)}}));var lc=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.inputs.addTouch(),r._setupInputs(),r}return H(t,e),Object.defineProperty(t.prototype,"touchAngularSensibility",{get:function(){var e=this.inputs.attached.touch;return e?e.touchAngularSensibility:0},set:function(e){var t=this.inputs.attached.touch;t&&(t.touchAngularSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"touchMoveSensibility",{get:function(){var e=this.inputs.attached.touch;return e?e.touchMoveSensibility:0},set:function(e){var t=this.inputs.attached.touch;t&&(t.touchMoveSensibility=e)},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"TouchCamera"},t.prototype._setupInputs=function(){var e=this.inputs.attached.touch,t=this.inputs.attached.mouse;t?t.touchEnabled=!1:e.allowMouse=!0},t}(cc);He.AddNodeConstructor("ArcRotateCamera",(function(e,t){return function(){return new uc(e,0,0,1,C.Zero(),t)}}));var uc=function(e){function t(t,n,i,r,o,a,s){void 0===s&&(s=!0);var c=e.call(this,t,C.Zero(),a,s)||this;return c.inertialAlphaOffset=0,c.inertialBetaOffset=0,c.inertialRadiusOffset=0,c.lowerAlphaLimit=null,c.upperAlphaLimit=null,c.lowerBetaLimit=.01,c.upperBetaLimit=Math.PI-.01,c.lowerRadiusLimit=null,c.upperRadiusLimit=null,c.inertialPanningX=0,c.inertialPanningY=0,c.pinchToPanMaxDistance=20,c.panningDistanceLimit=null,c.panningOriginTarget=C.Zero(),c.panningInertia=.9,c.zoomOnFactor=1,c.targetScreenOffset=S.Zero(),c.allowUpsideDown=!0,c.useInputToRestoreState=!0,c._viewMatrix=new R,c.panningAxis=new C(1,1,0),c._transformedDirection=new C,c.mapPanning=!1,c.onMeshTargetChangedObservable=new u,c.checkCollisions=!1,c.collisionRadius=new C(.5,.5,.5),c._previousPosition=C.Zero(),c._collisionVelocity=C.Zero(),c._newPosition=C.Zero(),c._computationVector=C.Zero(),c._onCollisionPositionChange=function(e,t,n){void 0===n&&(n=null),n?(c.setPosition(t),c.onCollide&&c.onCollide(n)):c._previousPosition.copyFrom(c._position);var i=Math.cos(c.alpha),r=Math.sin(c.alpha),o=Math.cos(c.beta),a=Math.sin(c.beta);0===a&&(a=1e-4);var s=c._getTargetPosition();c._computationVector.copyFromFloats(c.radius*i*a,c.radius*o,c.radius*r*a),s.addToRef(c._computationVector,c._newPosition),c._position.copyFrom(c._newPosition);var l=c.upVector;c.allowUpsideDown&&c.beta<0&&(l=(l=l.clone()).negate()),c._computeViewMatrix(c._position,s,l),c._viewMatrix.addAtIndex(12,c.targetScreenOffset.x),c._viewMatrix.addAtIndex(13,c.targetScreenOffset.y),c._collisionTriggered=!1},c._target=C.Zero(),o&&c.setTarget(o),c.alpha=n,c.beta=i,c.radius=r,c.getViewMatrix(),c.inputs=new Hs(c),c.inputs.addKeyboard().addMouseWheel().addPointers(),c}return H(t,e),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){this.setTarget(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetHost",{get:function(){return this._targetHost},set:function(e){e&&this.setTarget(e)},enumerable:!1,configurable:!0}),t.prototype.getTarget=function(){return this.target},Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this.setPosition(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"upVector",{get:function(){return this._upVector},set:function(e){this._upToYMatrix||(this._yToUpMatrix=new R,this._upToYMatrix=new R,this._upVector=C.Zero()),e.normalize(),this._upVector.copyFrom(e),this.setMatUp()},enumerable:!1,configurable:!0}),t.prototype.setMatUp=function(){R.RotationAlignToRef(C.UpReadOnly,this._upVector,this._yToUpMatrix),R.RotationAlignToRef(this._upVector,C.UpReadOnly,this._upToYMatrix)},Object.defineProperty(t.prototype,"angularSensibilityX",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityX:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.angularSensibilityX=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angularSensibilityY",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityY:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.angularSensibilityY=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pinchPrecision",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchPrecision:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.pinchPrecision=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pinchDeltaPercentage",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchDeltaPercentage:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.pinchDeltaPercentage=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useNaturalPinchZoom",{get:function(){var e=this.inputs.attached.pointers;return!!e&&e.useNaturalPinchZoom},set:function(e){var t=this.inputs.attached.pointers;t&&(t.useNaturalPinchZoom=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panningSensibility",{get:function(){var e=this.inputs.attached.pointers;return e?e.panningSensibility:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.panningSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysDown=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRight=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wheelPrecision",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelPrecision:0},set:function(e){var t=this.inputs.attached.mousewheel;t&&(t.wheelPrecision=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomToMouseLocation",{get:function(){var e=this.inputs.attached.mousewheel;return!!e&&e.zoomToMouseLocation},set:function(e){var t=this.inputs.attached.mousewheel;t&&(t.zoomToMouseLocation=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wheelDeltaPercentage",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelDeltaPercentage:0},set:function(e){var t=this.inputs.attached.mousewheel;t&&(t.wheelDeltaPercentage=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bouncingBehavior",{get:function(){return this._bouncingBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useBouncingBehavior",{get:function(){return null!=this._bouncingBehavior},set:function(e){e!==this.useBouncingBehavior&&(e?(this._bouncingBehavior=new Ro,this.addBehavior(this._bouncingBehavior)):this._bouncingBehavior&&(this.removeBehavior(this._bouncingBehavior),this._bouncingBehavior=null))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"framingBehavior",{get:function(){return this._framingBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useFramingBehavior",{get:function(){return null!=this._framingBehavior},set:function(e){e!==this.useFramingBehavior&&(e?(this._framingBehavior=new Oo,this.addBehavior(this._framingBehavior)):this._framingBehavior&&(this.removeBehavior(this._framingBehavior),this._framingBehavior=null))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoRotationBehavior",{get:function(){return this._autoRotationBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useAutoRotationBehavior",{get:function(){return null!=this._autoRotationBehavior},set:function(e){e!==this.useAutoRotationBehavior&&(e?(this._autoRotationBehavior=new Io,this.addBehavior(this._autoRotationBehavior)):this._autoRotationBehavior&&(this.removeBehavior(this._autoRotationBehavior),this._autoRotationBehavior=null))},enumerable:!1,configurable:!0}),t.prototype._initCache=function(){e.prototype._initCache.call(this),this._cache._target=new C(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.alpha=void 0,this._cache.beta=void 0,this._cache.radius=void 0,this._cache.targetScreenOffset=S.Zero()},t.prototype._updateCache=function(t){t||e.prototype._updateCache.call(this),this._cache._target.copyFrom(this._getTargetPosition()),this._cache.alpha=this.alpha,this._cache.beta=this.beta,this._cache.radius=this.radius,this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset)},t.prototype._getTargetPosition=function(){if(this._targetHost&&this._targetHost.getAbsolutePosition){var e=this._targetHost.getAbsolutePosition();this._targetBoundingCenter?e.addToRef(this._targetBoundingCenter,this._target):this._target.copyFrom(e)}return this._getLockedTargetPosition()||this._target},t.prototype.storeState=function(){return this._storedAlpha=this.alpha,this._storedBeta=this.beta,this._storedRadius=this.radius,this._storedTarget=this._getTargetPosition().clone(),this._storedTargetScreenOffset=this.targetScreenOffset.clone(),e.prototype.storeState.call(this)},t.prototype._restoreStateValues=function(){return!!e.prototype._restoreStateValues.call(this)&&(this.setTarget(this._storedTarget.clone()),this.alpha=this._storedAlpha,this.beta=this._storedBeta,this.radius=this._storedRadius,this.targetScreenOffset=this._storedTargetScreenOffset.clone(),this.inertialAlphaOffset=0,this.inertialBetaOffset=0,this.inertialRadiusOffset=0,this.inertialPanningX=0,this.inertialPanningY=0,!0)},t.prototype._isSynchronizedViewMatrix=function(){return!!e.prototype._isSynchronizedViewMatrix.call(this)&&this._cache._target.equals(this._getTargetPosition())&&this._cache.alpha===this.alpha&&this._cache.beta===this.beta&&this._cache.radius===this.radius&&this._cache.targetScreenOffset.equals(this.targetScreenOffset)},t.prototype.attachControl=function(e,t,n,i){var r=this;void 0===n&&(n=!0),void 0===i&&(i=2);var o=arguments;t=Pn.BackCompatCameraNoPreventDefault(o),this._useCtrlForPanning=n,this._panningMouseButton=i,"boolean"==typeof o[0]&&(o.length>1&&(this._useCtrlForPanning=o[1]),o.length>2&&(this._panningMouseButton=o[2])),this.inputs.attachElement(t),this._reset=function(){r.inertialAlphaOffset=0,r.inertialBetaOffset=0,r.inertialRadiusOffset=0,r.inertialPanningX=0,r.inertialPanningY=0}},t.prototype.detachControl=function(){this.inputs.detachElement(),this._reset&&this._reset()},t.prototype._checkInputs=function(){if(!this._collisionTriggered){if(this.inputs.checkInputs(),0!==this.inertialAlphaOffset||0!==this.inertialBetaOffset||0!==this.inertialRadiusOffset){var t=this.invertRotation?-1:1,n=this._calculateHandednessMultiplier(),i=this.inertialAlphaOffset*n;this.beta<0&&(i*=-1),this.alpha+=i*t,this.beta+=this.inertialBetaOffset*t,this.radius-=this.inertialRadiusOffset,this.inertialAlphaOffset*=this.inertia,this.inertialBetaOffset*=this.inertia,this.inertialRadiusOffset*=this.inertia,Math.abs(this.inertialAlphaOffset)Math.PI&&(this.beta=this.beta-2*Math.PI):this.betathis.upperBetaLimit&&(this.beta=this.upperBetaLimit),null!==this.lowerAlphaLimit&&this.alphathis.upperAlphaLimit&&(this.alpha=this.upperAlphaLimit),null!==this.lowerRadiusLimit&&this.radiusthis.upperRadiusLimit&&(this.radius=this.upperRadiusLimit,this.inertialRadiusOffset=0)},t.prototype.rebuildAnglesAndRadius=function(){this._position.subtractToRef(this._getTargetPosition(),this._computationVector),0===this._upVector.x&&1===this._upVector.y&&0===this._upVector.z||C.TransformCoordinatesToRef(this._computationVector,this._upToYMatrix,this._computationVector),this.radius=this._computationVector.length(),0===this.radius&&(this.radius=1e-4);var e=this.alpha;0===this._computationVector.x&&0===this._computationVector.z?this.alpha=Math.PI/2:this.alpha=Math.acos(this._computationVector.x/Math.sqrt(Math.pow(this._computationVector.x,2)+Math.pow(this._computationVector.z,2))),this._computationVector.z<0&&(this.alpha=2*Math.PI-this.alpha);var t=Math.round((e-this.alpha)/(2*Math.PI));this.alpha+=2*t*Math.PI,this.beta=Math.acos(this._computationVector.y/this.radius),this._checkLimits()},t.prototype.setPosition=function(e){this._position.equals(e)||(this._position.copyFrom(e),this.rebuildAnglesAndRadius())},t.prototype.setTarget=function(e,t,n,i){var r;if(void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),i=null!==(r=this.overrideCloneAlphaBetaRadius)&&void 0!==r?r:i,e.getBoundingInfo)this._targetBoundingCenter=t?e.getBoundingInfo().boundingBox.centerWorld.clone():null,e.computeWorldMatrix(),this._targetHost=e,this._target=this._getTargetPosition(),this.onMeshTargetChangedObservable.notifyObservers(this._targetHost);else{var o=e,a=this._getTargetPosition();if(a&&!n&&a.equals(o))return;this._targetHost=null,this._target=o,this._targetBoundingCenter=null,this.onMeshTargetChangedObservable.notifyObservers(null)}i||this.rebuildAnglesAndRadius()},t.prototype._getViewMatrix=function(){var e=Math.cos(this.alpha),t=Math.sin(this.alpha),n=Math.cos(this.beta),i=Math.sin(this.beta);0===i&&(i=1e-4),0===this.radius&&(this.radius=1e-4);var r=this._getTargetPosition();if(this._computationVector.copyFromFloats(this.radius*e*i,this.radius*n,this.radius*t*i),0===this._upVector.x&&1===this._upVector.y&&0===this._upVector.z||C.TransformCoordinatesToRef(this._computationVector,this._yToUpMatrix,this._computationVector),r.addToRef(this._computationVector,this._newPosition),this.getScene().collisionsEnabled&&this.checkCollisions){var o=this.getScene().collisionCoordinator;this._collider||(this._collider=o.createCollider()),this._collider._radius=this.collisionRadius,this._newPosition.subtractToRef(this._position,this._collisionVelocity),this._collisionTriggered=!0,o.getNewPosition(this._position,this._collisionVelocity,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)}else{this._position.copyFrom(this._newPosition);var a=this.upVector;this.allowUpsideDown&&i<0&&(a=a.negate()),this._computeViewMatrix(this._position,r,a),this._viewMatrix.addAtIndex(12,this.targetScreenOffset.x),this._viewMatrix.addAtIndex(13,this.targetScreenOffset.y)}return this._currentTarget=r,this._viewMatrix},t.prototype.zoomOn=function(e,t){void 0===t&&(t=!1),e=e||this.getScene().meshes;var n=no.MinMax(e),i=this._calculateLowerRadiusFromModelBoundingSphere(n.min,n.max);i=Math.max(Math.min(i,this.upperRadiusLimit||Number.MAX_VALUE),this.lowerRadiusLimit||0),this.radius=i*this.zoomOnFactor,this.focusOn({min:n.min,max:n.max,distance:i},t)},t.prototype.focusOn=function(e,t){var n,i;if(void 0===t&&(t=!1),void 0===e.min){var r=e||this.getScene().meshes;n=no.MinMax(r),i=C.Distance(n.min,n.max)}else n=e,i=e.distance;this._target=no.Center(n),t||(this.maxZ=2*i)},t.prototype.createRigCamera=function(e,n){var i=0;switch(this.cameraRigMode){case dr.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case dr.RIG_MODE_STEREOSCOPIC_OVERUNDER:case dr.RIG_MODE_STEREOSCOPIC_INTERLACED:case dr.RIG_MODE_VR:i=this._cameraRigParams.stereoHalfAngle*(0===n?1:-1);break;case dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:i=this._cameraRigParams.stereoHalfAngle*(0===n?-1:1)}var r=new t(e,this.alpha+i,this.beta,this.radius,this._target,this.getScene());return r._cameraRigParams={},r.isRigCamera=!0,r.rigParent=this,r.upVector=this.upVector,r.mode=this.mode,r.orthoLeft=this.orthoLeft,r.orthoRight=this.orthoRight,r.orthoBottom=this.orthoBottom,r.orthoTop=this.orthoTop,r},t.prototype._updateRigCameras=function(){var t=this._rigCameras[0],n=this._rigCameras[1];switch(t.beta=n.beta=this.beta,this.cameraRigMode){case dr.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case dr.RIG_MODE_STEREOSCOPIC_OVERUNDER:case dr.RIG_MODE_STEREOSCOPIC_INTERLACED:case dr.RIG_MODE_VR:t.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle,n.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle;break;case dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:t.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle,n.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle}e.prototype._updateRigCameras.call(this)},t.prototype._calculateLowerRadiusFromModelBoundingSphere=function(e,t,n){void 0===n&&(n=1);var i=C.Distance(e,t),r=this.getScene().getEngine().getAspectRatio(this),o=Math.tan(this.fov/2),a=o*r,s=.5*i*n,c=s*Math.sqrt(1+1/(a*a)),l=s*Math.sqrt(1+1/(o*o));return Math.max(c,l)},t.prototype.dispose=function(){this.inputs.clear(),e.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"ArcRotateCamera"},W([Se()],t.prototype,"alpha",void 0),W([Se()],t.prototype,"beta",void 0),W([Se()],t.prototype,"radius",void 0),W([Se()],t.prototype,"overrideCloneAlphaBetaRadius",void 0),W([Oe("target")],t.prototype,"_target",void 0),W([we("targetHost")],t.prototype,"_targetHost",void 0),W([Se()],t.prototype,"inertialAlphaOffset",void 0),W([Se()],t.prototype,"inertialBetaOffset",void 0),W([Se()],t.prototype,"inertialRadiusOffset",void 0),W([Se()],t.prototype,"lowerAlphaLimit",void 0),W([Se()],t.prototype,"upperAlphaLimit",void 0),W([Se()],t.prototype,"lowerBetaLimit",void 0),W([Se()],t.prototype,"upperBetaLimit",void 0),W([Se()],t.prototype,"lowerRadiusLimit",void 0),W([Se()],t.prototype,"upperRadiusLimit",void 0),W([Se()],t.prototype,"inertialPanningX",void 0),W([Se()],t.prototype,"inertialPanningY",void 0),W([Se()],t.prototype,"pinchToPanMaxDistance",void 0),W([Se()],t.prototype,"panningDistanceLimit",void 0),W([Oe()],t.prototype,"panningOriginTarget",void 0),W([Se()],t.prototype,"panningInertia",void 0),W([Se()],t.prototype,"zoomToMouseLocation",null),W([Se()],t.prototype,"zoomOnFactor",void 0),W([Re()],t.prototype,"targetScreenOffset",void 0),W([Se()],t.prototype,"allowUpsideDown",void 0),W([Se()],t.prototype,"useInputToRestoreState",void 0),t}(sc);He.AddNodeConstructor("DeviceOrientationCamera",(function(e,t){return function(){return new hc(e,C.Zero(),t)}}));var hc=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r._tmpDragQuaternion=new I,r._disablePointerInputWhenUsingDeviceOrientation=!0,r._dragFactor=0,r._quaternionCache=new I,r.inputs.addDeviceOrientation(),r.inputs._deviceOrientationInput&&r.inputs._deviceOrientationInput._onDeviceOrientationChangedObservable.addOnce((function(){r._disablePointerInputWhenUsingDeviceOrientation&&r.inputs._mouseInput&&(r.inputs._mouseInput._allowCameraRotation=!1,r.inputs._mouseInput.onPointerMovedObservable.add((function(e){0!=r._dragFactor&&(r._initialQuaternion||(r._initialQuaternion=new I),I.FromEulerAnglesToRef(0,e.offsetX*r._dragFactor,0,r._tmpDragQuaternion),r._initialQuaternion.multiplyToRef(r._tmpDragQuaternion,r._initialQuaternion))})))})),r}return H(t,e),Object.defineProperty(t.prototype,"disablePointerInputWhenUsingDeviceOrientation",{get:function(){return this._disablePointerInputWhenUsingDeviceOrientation},set:function(e){this._disablePointerInputWhenUsingDeviceOrientation=e},enumerable:!1,configurable:!0}),t.prototype.enableHorizontalDragging=function(e){void 0===e&&(e=1/300),this._dragFactor=e},t.prototype.getClassName=function(){return"DeviceOrientationCamera"},t.prototype._checkInputs=function(){e.prototype._checkInputs.call(this),this._quaternionCache.copyFrom(this.rotationQuaternion),this._initialQuaternion&&this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion)},t.prototype.resetToCurrentRotation=function(e){var t=this;void 0===e&&(e=Ii.Y),this.rotationQuaternion&&(this._initialQuaternion||(this._initialQuaternion=new I),this._initialQuaternion.copyFrom(this._quaternionCache||this.rotationQuaternion),["x","y","z"].forEach((function(n){e[n]?t._initialQuaternion[n]*=-1:t._initialQuaternion[n]=0})),this._initialQuaternion.normalize(),this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion))},t}(cc),dc=function(e){function t(t){return e.call(this,t)||this}return H(t,e),t.prototype.addKeyboard=function(){return this.add(new Ws),this},t.prototype.addMouse=function(){return this.add(new Xs),this},t}(Ls),pc=function(e){function t(t,n,i,r){void 0===r&&(r=!0);var o=e.call(this,t,n,i,r)||this;return o.ellipsoid=new C(1,1,1),o.ellipsoidOffset=new C(0,0,0),o.checkCollisions=!1,o.applyGravity=!1,o.cameraDirection=C.Zero(),o._trackRoll=0,o.rollCorrect=100,o.bankedTurn=!1,o.bankedTurnLimit=Math.PI/2,o.bankedTurnMultiplier=1,o._needMoveForGravity=!1,o._oldPosition=C.Zero(),o._diffPosition=C.Zero(),o._newPosition=C.Zero(),o._collisionMask=-1,o._onCollisionPositionChange=function(e,t,n){var i;void 0===n&&(n=null),i=t,o._newPosition.copyFrom(i),o._newPosition.subtractToRef(o._oldPosition,o._diffPosition),o._diffPosition.length()>Dr.CollisionsEpsilon&&(o.position.addInPlace(o._diffPosition),o.onCollide&&n&&o.onCollide(n))},o.inputs=new dc(o),o.inputs.addKeyboard().addMouse(),o}return H(t,e),Object.defineProperty(t.prototype,"angularSensibility",{get:function(){var e=this.inputs.attached.mouse;return e?e.angularSensibility:0},set:function(e){var t=this.inputs.attached.mouse;t&&(t.angularSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysForward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysForward:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysForward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysBackward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysBackward:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysBackward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysDown=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRight=e)},enumerable:!1,configurable:!0}),t.prototype.attachControl=function(e,t){t=Pn.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(t)},t.prototype.detachControl=function(){this.inputs.detachElement(),this.cameraDirection=new C(0,0,0)},Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!1,configurable:!0}),t.prototype._collideWithWorld=function(e){(this.parent?C.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset);var t=this.getScene().collisionCoordinator;this._collider||(this._collider=t.createCollider()),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;var n=e;this.applyGravity&&(n=e.add(this.getScene().gravity)),t.getNewPosition(this._oldPosition,n,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)},t.prototype._checkInputs=function(){this._localDirection||(this._localDirection=C.Zero(),this._transformedDirection=C.Zero()),this.inputs.checkInputs(),e.prototype._checkInputs.call(this)},Object.defineProperty(t.prototype,"needMoveForGravity",{get:function(){return this._needMoveForGravity},set:function(e){this._needMoveForGravity=e},enumerable:!1,configurable:!0}),t.prototype._decideIfNeedsToMove=function(){return this._needMoveForGravity||Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):e.prototype._updatePosition.call(this)},t.prototype.restoreRoll=function(e){var t=this._trackRoll,n=t-this.rotation.z;Math.abs(n)>=.001&&(this.rotation.z+=n/e,Math.abs(t-this.rotation.z)<=.001&&(this.rotation.z=t))},t.prototype.dispose=function(){this.inputs.clear(),e.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"FlyCamera"},W([Oe()],t.prototype,"ellipsoid",void 0),W([Oe()],t.prototype,"ellipsoidOffset",void 0),W([Se()],t.prototype,"checkCollisions",void 0),W([Se()],t.prototype,"applyGravity",void 0),t}(sc),fc=function(e){function t(t){return e.call(this,t)||this}return H(t,e),t.prototype.addKeyboard=function(){return this.add(new Ys),this},t.prototype.addMouseWheel=function(){return this.add(new qs),this},t.prototype.addPointers=function(){return this.add(new Ks),this},t.prototype.addVRDeviceOrientation=function(){return J.Warn("DeviceOrientation support not yet implemented for FollowCamera."),this},t}(Ls);He.AddNodeConstructor("FollowCamera",(function(e,t){return function(){return new gc(e,C.Zero(),t)}})),He.AddNodeConstructor("ArcFollowCamera",(function(e,t){return function(){return new yc(e,0,0,1,null,t)}}));var mc,_c,gc=function(e){function t(t,n,i,r){void 0===r&&(r=null);var o=e.call(this,t,n,i)||this;return o.radius=12,o.lowerRadiusLimit=null,o.upperRadiusLimit=null,o.rotationOffset=0,o.lowerRotationOffsetLimit=null,o.upperRotationOffsetLimit=null,o.heightOffset=4,o.lowerHeightOffsetLimit=null,o.upperHeightOffsetLimit=null,o.cameraAcceleration=.05,o.maxCameraSpeed=20,o.lockedTarget=r,o.inputs=new fc(o),o.inputs.addKeyboard().addMouseWheel().addPointers(),o}return H(t,e),t.prototype._follow=function(e){if(e){var t=w.Matrix[0];e.absoluteRotationQuaternion.toRotationMatrix(t);var n=Math.atan2(t.m[8],t.m[10]),i=Pn.ToRadians(this.rotationOffset)+n,r=e.getAbsolutePosition(),o=r.x+Math.sin(i)*this.radius,a=r.z+Math.cos(i)*this.radius,s=o-this.position.x,c=r.y+this.heightOffset-this.position.y,l=a-this.position.z,u=s*this.cameraAcceleration*2,h=c*this.cameraAcceleration,d=l*this.cameraAcceleration*2;(u>this.maxCameraSpeed||u<-this.maxCameraSpeed)&&(u=u<1?-this.maxCameraSpeed:this.maxCameraSpeed),(h>this.maxCameraSpeed||h<-this.maxCameraSpeed)&&(h=h<1?-this.maxCameraSpeed:this.maxCameraSpeed),(d>this.maxCameraSpeed||d<-this.maxCameraSpeed)&&(d=d<1?-this.maxCameraSpeed:this.maxCameraSpeed),this.position=new C(this.position.x+u,this.position.y+h,this.position.z+d),this.setTarget(r)}},t.prototype.attachControl=function(e,t){t=Pn.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(t),this._reset=function(){}},t.prototype.detachControl=function(){this.inputs.detachElement(),this._reset&&this._reset()},t.prototype._checkInputs=function(){this.inputs.checkInputs(),this._checkLimits(),e.prototype._checkInputs.call(this),this.lockedTarget&&this._follow(this.lockedTarget)},t.prototype._checkLimits=function(){null!==this.lowerRadiusLimit&&this.radiusthis.upperRadiusLimit&&(this.radius=this.upperRadiusLimit),null!==this.lowerHeightOffsetLimit&&this.heightOffsetthis.upperHeightOffsetLimit&&(this.heightOffset=this.upperHeightOffsetLimit),null!==this.lowerRotationOffsetLimit&&this.rotationOffsetthis.upperRotationOffsetLimit&&(this.rotationOffset=this.upperRotationOffsetLimit)},t.prototype.getClassName=function(){return"FollowCamera"},W([Se()],t.prototype,"radius",void 0),W([Se()],t.prototype,"lowerRadiusLimit",void 0),W([Se()],t.prototype,"upperRadiusLimit",void 0),W([Se()],t.prototype,"rotationOffset",void 0),W([Se()],t.prototype,"lowerRotationOffsetLimit",void 0),W([Se()],t.prototype,"upperRotationOffsetLimit",void 0),W([Se()],t.prototype,"heightOffset",void 0),W([Se()],t.prototype,"lowerHeightOffsetLimit",void 0),W([Se()],t.prototype,"upperHeightOffsetLimit",void 0),W([Se()],t.prototype,"cameraAcceleration",void 0),W([Se()],t.prototype,"maxCameraSpeed",void 0),W([we("lockedTargetId")],t.prototype,"lockedTarget",void 0),t}(sc),yc=function(e){function t(t,n,i,r,o,a){var s=e.call(this,t,C.Zero(),a)||this;return s.alpha=n,s.beta=i,s.radius=r,s._cartesianCoordinates=C.Zero(),s.setMeshTarget(o),s}return H(t,e),t.prototype.setMeshTarget=function(e){this._meshTarget=e,this._follow()},t.prototype._follow=function(){if(this._meshTarget){this._cartesianCoordinates.x=this.radius*Math.cos(this.alpha)*Math.cos(this.beta),this._cartesianCoordinates.y=this.radius*Math.sin(this.beta),this._cartesianCoordinates.z=this.radius*Math.sin(this.alpha)*Math.cos(this.beta);var e=this._meshTarget.getAbsolutePosition();this.position=e.add(this._cartesianCoordinates),this.setTarget(e)}},t.prototype._checkInputs=function(){e.prototype._checkInputs.call(this),this._follow()},t.prototype.getClassName=function(){return"ArcFollowCamera"},t}(sc);!function(e){e[e.A=0]="A",e[e.B=1]="B",e[e.X=2]="X",e[e.Y=3]="Y",e[e.LB=4]="LB",e[e.RB=5]="RB",e[e.Back=8]="Back",e[e.Start=9]="Start",e[e.LeftStick=10]="LeftStick",e[e.RightStick=11]="RightStick"}(mc||(mc={})),function(e){e[e.Up=12]="Up",e[e.Down=13]="Down",e[e.Left=14]="Left",e[e.Right=15]="Right"}(_c||(_c={}));var vc,bc,Tc=function(e){function t(t,n,i,r){void 0===r&&(r=!1);var o=e.call(this,t,n,i,0,1,2,3)||this;return o._leftTrigger=0,o._rightTrigger=0,o.onButtonDownObservable=new u,o.onButtonUpObservable=new u,o.onPadDownObservable=new u,o.onPadUpObservable=new u,o._buttonA=0,o._buttonB=0,o._buttonX=0,o._buttonY=0,o._buttonBack=0,o._buttonStart=0,o._buttonLB=0,o._buttonRB=0,o._buttonLeftStick=0,o._buttonRightStick=0,o._dPadUp=0,o._dPadDown=0,o._dPadLeft=0,o._dPadRight=0,o._isXboxOnePad=!1,o.type=Bs.XBOX,o._isXboxOnePad=r,o}return H(t,e),t.prototype.onlefttriggerchanged=function(e){this._onlefttriggerchanged=e},t.prototype.onrighttriggerchanged=function(e){this._onrighttriggerchanged=e},Object.defineProperty(t.prototype,"leftTrigger",{get:function(){return this._leftTrigger},set:function(e){this._onlefttriggerchanged&&this._leftTrigger!==e&&this._onlefttriggerchanged(e),this._leftTrigger=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightTrigger",{get:function(){return this._rightTrigger},set:function(e){this._onrighttriggerchanged&&this._rightTrigger!==e&&this._onrighttriggerchanged(e),this._rightTrigger=e},enumerable:!1,configurable:!0}),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype.ondpaddown=function(e){this._ondpaddown=e},t.prototype.ondpadup=function(e){this._ondpadup=e},t.prototype._setButtonValue=function(e,t,n){return e!==t&&(1===e&&(this._onbuttondown&&this._onbuttondown(n),this.onButtonDownObservable.notifyObservers(n)),0===e&&(this._onbuttonup&&this._onbuttonup(n),this.onButtonUpObservable.notifyObservers(n))),e},t.prototype._setDPadValue=function(e,t,n){return e!==t&&(1===e&&(this._ondpaddown&&this._ondpaddown(n),this.onPadDownObservable.notifyObservers(n)),0===e&&(this._ondpadup&&this._ondpadup(n),this.onPadUpObservable.notifyObservers(n))),e},Object.defineProperty(t.prototype,"buttonA",{get:function(){return this._buttonA},set:function(e){this._buttonA=this._setButtonValue(e,this._buttonA,mc.A)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonB",{get:function(){return this._buttonB},set:function(e){this._buttonB=this._setButtonValue(e,this._buttonB,mc.B)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonX",{get:function(){return this._buttonX},set:function(e){this._buttonX=this._setButtonValue(e,this._buttonX,mc.X)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonY",{get:function(){return this._buttonY},set:function(e){this._buttonY=this._setButtonValue(e,this._buttonY,mc.Y)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonStart",{get:function(){return this._buttonStart},set:function(e){this._buttonStart=this._setButtonValue(e,this._buttonStart,mc.Start)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonBack",{get:function(){return this._buttonBack},set:function(e){this._buttonBack=this._setButtonValue(e,this._buttonBack,mc.Back)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonLB",{get:function(){return this._buttonLB},set:function(e){this._buttonLB=this._setButtonValue(e,this._buttonLB,mc.LB)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonRB",{get:function(){return this._buttonRB},set:function(e){this._buttonRB=this._setButtonValue(e,this._buttonRB,mc.RB)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonLeftStick",{get:function(){return this._buttonLeftStick},set:function(e){this._buttonLeftStick=this._setButtonValue(e,this._buttonLeftStick,mc.LeftStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonRightStick",{get:function(){return this._buttonRightStick},set:function(e){this._buttonRightStick=this._setButtonValue(e,this._buttonRightStick,mc.RightStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadUp",{get:function(){return this._dPadUp},set:function(e){this._dPadUp=this._setDPadValue(e,this._dPadUp,_c.Up)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadDown",{get:function(){return this._dPadDown},set:function(e){this._dPadDown=this._setDPadValue(e,this._dPadDown,_c.Down)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadLeft",{get:function(){return this._dPadLeft},set:function(e){this._dPadLeft=this._setDPadValue(e,this._dPadLeft,_c.Left)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadRight",{get:function(){return this._dPadRight},set:function(e){this._dPadRight=this._setDPadValue(e,this._dPadRight,_c.Right)},enumerable:!1,configurable:!0}),t.prototype.update=function(){e.prototype.update.call(this),this._isXboxOnePad,this.buttonA=this.browserGamepad.buttons[0].value,this.buttonB=this.browserGamepad.buttons[1].value,this.buttonX=this.browserGamepad.buttons[2].value,this.buttonY=this.browserGamepad.buttons[3].value,this.buttonLB=this.browserGamepad.buttons[4].value,this.buttonRB=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.buttons[6].value,this.rightTrigger=this.browserGamepad.buttons[7].value,this.buttonBack=this.browserGamepad.buttons[8].value,this.buttonStart=this.browserGamepad.buttons[9].value,this.buttonLeftStick=this.browserGamepad.buttons[10].value,this.buttonRightStick=this.browserGamepad.buttons[11].value,this.dPadUp=this.browserGamepad.buttons[12].value,this.dPadDown=this.browserGamepad.buttons[13].value,this.dPadLeft=this.browserGamepad.buttons[14].value,this.dPadRight=this.browserGamepad.buttons[15].value},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear(),this.onPadDownObservable.clear(),this.onPadUpObservable.clear()},t}(Bs);!function(e){e[e.Cross=0]="Cross",e[e.Circle=1]="Circle",e[e.Square=2]="Square",e[e.Triangle=3]="Triangle",e[e.L1=4]="L1",e[e.R1=5]="R1",e[e.Share=8]="Share",e[e.Options=9]="Options",e[e.LeftStick=10]="LeftStick",e[e.RightStick=11]="RightStick"}(vc||(vc={})),function(e){e[e.Up=12]="Up",e[e.Down=13]="Down",e[e.Left=14]="Left",e[e.Right=15]="Right"}(bc||(bc={}));var Ec=function(e){function t(t,n,i){var r=e.call(this,t.replace("STANDARD GAMEPAD","SONY PLAYSTATION DUALSHOCK"),n,i,0,1,2,3)||this;return r._leftTrigger=0,r._rightTrigger=0,r.onButtonDownObservable=new u,r.onButtonUpObservable=new u,r.onPadDownObservable=new u,r.onPadUpObservable=new u,r._buttonCross=0,r._buttonCircle=0,r._buttonSquare=0,r._buttonTriangle=0,r._buttonShare=0,r._buttonOptions=0,r._buttonL1=0,r._buttonR1=0,r._buttonLeftStick=0,r._buttonRightStick=0,r._dPadUp=0,r._dPadDown=0,r._dPadLeft=0,r._dPadRight=0,r.type=Bs.DUALSHOCK,r}return H(t,e),t.prototype.onlefttriggerchanged=function(e){this._onlefttriggerchanged=e},t.prototype.onrighttriggerchanged=function(e){this._onrighttriggerchanged=e},Object.defineProperty(t.prototype,"leftTrigger",{get:function(){return this._leftTrigger},set:function(e){this._onlefttriggerchanged&&this._leftTrigger!==e&&this._onlefttriggerchanged(e),this._leftTrigger=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightTrigger",{get:function(){return this._rightTrigger},set:function(e){this._onrighttriggerchanged&&this._rightTrigger!==e&&this._onrighttriggerchanged(e),this._rightTrigger=e},enumerable:!1,configurable:!0}),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype.ondpaddown=function(e){this._ondpaddown=e},t.prototype.ondpadup=function(e){this._ondpadup=e},t.prototype._setButtonValue=function(e,t,n){return e!==t&&(1===e&&(this._onbuttondown&&this._onbuttondown(n),this.onButtonDownObservable.notifyObservers(n)),0===e&&(this._onbuttonup&&this._onbuttonup(n),this.onButtonUpObservable.notifyObservers(n))),e},t.prototype._setDPadValue=function(e,t,n){return e!==t&&(1===e&&(this._ondpaddown&&this._ondpaddown(n),this.onPadDownObservable.notifyObservers(n)),0===e&&(this._ondpadup&&this._ondpadup(n),this.onPadUpObservable.notifyObservers(n))),e},Object.defineProperty(t.prototype,"buttonCross",{get:function(){return this._buttonCross},set:function(e){this._buttonCross=this._setButtonValue(e,this._buttonCross,vc.Cross)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonCircle",{get:function(){return this._buttonCircle},set:function(e){this._buttonCircle=this._setButtonValue(e,this._buttonCircle,vc.Circle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonSquare",{get:function(){return this._buttonSquare},set:function(e){this._buttonSquare=this._setButtonValue(e,this._buttonSquare,vc.Square)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonTriangle",{get:function(){return this._buttonTriangle},set:function(e){this._buttonTriangle=this._setButtonValue(e,this._buttonTriangle,vc.Triangle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonOptions",{get:function(){return this._buttonOptions},set:function(e){this._buttonOptions=this._setButtonValue(e,this._buttonOptions,vc.Options)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonShare",{get:function(){return this._buttonShare},set:function(e){this._buttonShare=this._setButtonValue(e,this._buttonShare,vc.Share)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonL1",{get:function(){return this._buttonL1},set:function(e){this._buttonL1=this._setButtonValue(e,this._buttonL1,vc.L1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonR1",{get:function(){return this._buttonR1},set:function(e){this._buttonR1=this._setButtonValue(e,this._buttonR1,vc.R1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonLeftStick",{get:function(){return this._buttonLeftStick},set:function(e){this._buttonLeftStick=this._setButtonValue(e,this._buttonLeftStick,vc.LeftStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonRightStick",{get:function(){return this._buttonRightStick},set:function(e){this._buttonRightStick=this._setButtonValue(e,this._buttonRightStick,vc.RightStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadUp",{get:function(){return this._dPadUp},set:function(e){this._dPadUp=this._setDPadValue(e,this._dPadUp,bc.Up)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadDown",{get:function(){return this._dPadDown},set:function(e){this._dPadDown=this._setDPadValue(e,this._dPadDown,bc.Down)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadLeft",{get:function(){return this._dPadLeft},set:function(e){this._dPadLeft=this._setDPadValue(e,this._dPadLeft,bc.Left)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadRight",{get:function(){return this._dPadRight},set:function(e){this._dPadRight=this._setDPadValue(e,this._dPadRight,bc.Right)},enumerable:!1,configurable:!0}),t.prototype.update=function(){e.prototype.update.call(this),this.buttonCross=this.browserGamepad.buttons[0].value,this.buttonCircle=this.browserGamepad.buttons[1].value,this.buttonSquare=this.browserGamepad.buttons[2].value,this.buttonTriangle=this.browserGamepad.buttons[3].value,this.buttonL1=this.browserGamepad.buttons[4].value,this.buttonR1=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.buttons[6].value,this.rightTrigger=this.browserGamepad.buttons[7].value,this.buttonShare=this.browserGamepad.buttons[8].value,this.buttonOptions=this.browserGamepad.buttons[9].value,this.buttonLeftStick=this.browserGamepad.buttons[10].value,this.buttonRightStick=this.browserGamepad.buttons[11].value,this.dPadUp=this.browserGamepad.buttons[12].value,this.dPadDown=this.browserGamepad.buttons[13].value,this.dPadLeft=this.browserGamepad.buttons[14].value,this.dPadRight=this.browserGamepad.buttons[15].value},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear(),this.onPadDownObservable.clear(),this.onPadUpObservable.clear()},t}(Bs),Ac=function(){function e(e){var t=this;if(this._scene=e,this._babylonGamepads=[],this._oneGamepadConnected=!1,this._isMonitoring=!1,this.onGamepadDisconnectedObservable=new u,nt()?(this._gamepadEventSupported="GamepadEvent"in window,this._gamepadSupport=navigator&&navigator.getGamepads):this._gamepadEventSupported=!1,this.onGamepadConnectedObservable=new u((function(e){for(var n in t._babylonGamepads){var i=t._babylonGamepads[n];i&&i._isConnected&&t.onGamepadConnectedObservable.notifyObserver(e,i)}})),this._onGamepadConnectedEvent=function(e){var n,i=e.gamepad;i.index in t._babylonGamepads&&t._babylonGamepads[i.index].isConnected||(t._babylonGamepads[i.index]?((n=t._babylonGamepads[i.index]).browserGamepad=i,n._isConnected=!0):n=t._addNewGamepad(i),t.onGamepadConnectedObservable.notifyObservers(n),t._startMonitoringGamepads())},this._onGamepadDisconnectedEvent=function(e){var n=e.gamepad;for(var i in t._babylonGamepads)if(t._babylonGamepads[i].index===n.index){var r=t._babylonGamepads[i];r._isConnected=!1,t.onGamepadDisconnectedObservable.notifyObservers(r),r.dispose&&r.dispose();break}},this._gamepadSupport)if(this._updateGamepadObjects(),this._babylonGamepads.length&&this._startMonitoringGamepads(),this._gamepadEventSupported){var n=this._scene?this._scene.getEngine().getHostWindow():window;n&&(n.addEventListener("gamepadconnected",this._onGamepadConnectedEvent,!1),n.addEventListener("gamepaddisconnected",this._onGamepadDisconnectedEvent,!1))}else this._startMonitoringGamepads()}return Object.defineProperty(e.prototype,"gamepads",{get:function(){return this._babylonGamepads},enumerable:!1,configurable:!0}),e.prototype.getGamepadByType=function(e){void 0===e&&(e=Bs.XBOX);for(var t=0,n=this._babylonGamepads;t5))switch(this._face=e,this._face){case 0:this.updateEffect("#define POSITIVEX");break;case 1:this.updateEffect("#define NEGATIVEX");break;case 2:this.updateEffect("#define POSITIVEY");break;case 3:this.updateEffect("#define NEGATIVEY");break;case 4:this.updateEffect("#define POSITIVEZ");break;case 5:this.updateEffect("#define NEGATIVEZ")}},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"PassCubePostProcess"},t._Parse=function(e,n,i,r){return ke.Parse((function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,e._engine,e.reusable)}),e,i,r)},t}(Da);Dr._RescalePostProcessFactory=function(e){return new Pc("rescale",1,null,a.TEXTURE_BILINEAR_SAMPLINGMODE,e,!1,a.TEXTURETYPE_UNSIGNED_INT)},Vt.ShadersStore.anaglyphPixelShader="varying vec2 vUV;uniform sampler2D textureSampler;uniform sampler2D leftSampler;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{vec4 leftFrag=texture2D(leftSampler,vUV);leftFrag=vec4(1.0,leftFrag.g,leftFrag.b,1.0);vec4 rightFrag=texture2D(textureSampler,vUV);rightFrag=vec4(rightFrag.r,1.0,1.0,1.0);gl_FragColor=vec4(rightFrag.rgb*leftFrag.rgb,1.0);}";var Rc=function(e){function t(t,n,i,r,o,a){var s=e.call(this,t,"anaglyph",null,["leftSampler"],n,i[1],r,o,a)||this;return s._passedProcess=i[0]._rigPostProcess,s.onApplyObservable.add((function(e){e.setTextureFromPostProcess("leftSampler",s._passedProcess)})),s}return H(t,e),t.prototype.getClassName=function(){return"AnaglyphPostProcess"},t}(Da);function Oc(e){e._rigCameras[0]._rigPostProcess=new Pc(e.name+"_passthru",1,e._rigCameras[0]),e._rigCameras[1]._rigPostProcess=new Rc(e.name+"_anaglyph",1,e._rigCameras)}b("BABYLON.AnaglyphPostProcess",Rc),He.AddNodeConstructor("AnaglyphArcRotateCamera",(function(e,t,n){return function(){return new wc(e,0,0,1,C.Zero(),n.interaxial_distance,t)}}));var wc=function(e){function t(t,n,i,r,o,a,s){var c=e.call(this,t,n,i,r,o,s)||this;return c._setRigMode=function(){return Oc(c)},c.interaxialDistance=a,c.setCameraRigMode(dr.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:a}),c}return H(t,e),t.prototype.getClassName=function(){return"AnaglyphArcRotateCamera"},t}(uc);He.AddNodeConstructor("AnaglyphFreeCamera",(function(e,t,n){return function(){return new Mc(e,C.Zero(),n.interaxial_distance,t)}}));var Mc=function(e){function t(t,n,i,r){var o=e.call(this,t,n,r)||this;return o._setRigMode=function(){return Oc(o)},o.interaxialDistance=i,o.setCameraRigMode(dr.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),o}return H(t,e),t.prototype.getClassName=function(){return"AnaglyphFreeCamera"},t}(cc);He.AddNodeConstructor("AnaglyphGamepadCamera",(function(e,t,n){return function(){return new Dc(e,C.Zero(),n.interaxial_distance,t)}}));var Dc=function(e){function t(t,n,i,r){var o=e.call(this,t,n,r)||this;return o._setRigMode=function(){return Oc(o)},o.interaxialDistance=i,o.setCameraRigMode(dr.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),o}return H(t,e),t.prototype.getClassName=function(){return"AnaglyphGamepadCamera"},t}(Cc);He.AddNodeConstructor("AnaglyphUniversalCamera",(function(e,t,n){return function(){return new Nc(e,C.Zero(),n.interaxial_distance,t)}}));var Nc=function(e){function t(t,n,i,r){var o=e.call(this,t,n,r)||this;return o._setRigMode=function(){return Oc(o)},o.interaxialDistance=i,o.setCameraRigMode(dr.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),o}return H(t,e),t.prototype.getClassName=function(){return"AnaglyphUniversalCamera"},t}(Sc);Vt.ShadersStore.stereoscopicInterlacePixelShader="const vec3 TWO=vec3(2.0,2.0,2.0);varying vec2 vUV;uniform sampler2D camASampler;uniform sampler2D textureSampler;uniform vec2 stepSize;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{bool useCamA;bool useCamB;vec2 texCoord1;vec2 texCoord2;vec3 frag1;vec3 frag2;\n#ifdef IS_STEREOSCOPIC_HORIZ\nuseCamB=vUV.x>0.5;useCamA=!useCamB;texCoord1=vec2(useCamB ? (vUV.x-0.5)*2.0 : vUV.x*2.0,vUV.y);texCoord2=vec2(texCoord1.x+stepSize.x,vUV.y);\n#else\n#ifdef IS_STEREOSCOPIC_INTERLACED\nfloat rowNum=floor(vUV.y/stepSize.y);useCamA=mod(rowNum,2.0)==1.0;useCamB=mod(rowNum,2.0)==0.0;texCoord1=vec2(vUV.x,vUV.y);texCoord2=vec2(vUV.x,vUV.y);\n#else\nuseCamB=vUV.y>0.5;useCamA=!useCamB;texCoord1=vec2(vUV.x,useCamB ? (vUV.y-0.5)*2.0 : vUV.y*2.0);texCoord2=vec2(vUV.x,texCoord1.y+stepSize.y);\n#endif\n#endif\nif (useCamB){frag1=texture2D(textureSampler,texCoord1).rgb;frag2=texture2D(textureSampler,texCoord2).rgb;}else if (useCamA){frag1=texture2D(camASampler ,texCoord1).rgb;frag2=texture2D(camASampler ,texCoord2).rgb;}else {discard;}\ngl_FragColor=vec4((frag1+frag2)/TWO,1.0);}\n";var Lc=function(e){function t(t,n,i,r,o,a,s){var c=e.call(this,t,"stereoscopicInterlace",["stepSize"],["camASampler"],1,n[1],o,a,s,r?"#define IS_STEREOSCOPIC_INTERLACED 1":i?"#define IS_STEREOSCOPIC_HORIZ 1":void 0)||this;return c._passedProcess=n[0]._rigPostProcess,c._stepSize=new S(1/c.width,1/c.height),c.onSizeChangedObservable.add((function(){c._stepSize=new S(1/c.width,1/c.height)})),c.onApplyObservable.add((function(e){e.setTextureFromPostProcess("camASampler",c._passedProcess),e.setFloat2("stepSize",c._stepSize.x,c._stepSize.y)})),c}return H(t,e),t.prototype.getClassName=function(){return"StereoscopicInterlacePostProcessI"},t}(Da),Fc=function(e){function t(t,n,i,r,o,a){var s=e.call(this,t,"stereoscopicInterlace",["stepSize"],["camASampler"],1,n[1],r,o,a,i?"#define IS_STEREOSCOPIC_HORIZ 1":void 0)||this;return s._passedProcess=n[0]._rigPostProcess,s._stepSize=new S(1/s.width,1/s.height),s.onSizeChangedObservable.add((function(){s._stepSize=new S(1/s.width,1/s.height)})),s.onApplyObservable.add((function(e){e.setTextureFromPostProcess("camASampler",s._passedProcess),e.setFloat2("stepSize",s._stepSize.x,s._stepSize.y)})),s}return H(t,e),t.prototype.getClassName=function(){return"StereoscopicInterlacePostProcess"},t}(Da);function Bc(e){var t=e.cameraRigMode===dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL||e.cameraRigMode===dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED,n=e.cameraRigMode===dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED;e.cameraRigMode===dr.RIG_MODE_STEREOSCOPIC_INTERLACED?(e._rigCameras[0]._rigPostProcess=new Pc(e.name+"_passthru",1,e._rigCameras[0]),e._rigCameras[1]._rigPostProcess=new Lc(e.name+"_stereoInterlace",e._rigCameras,!1,!0)):(e._rigCameras[n?1:0].viewport=new hr(0,0,t?.5:1,t?1:.5),e._rigCameras[n?0:1].viewport=new hr(t?.5:0,t?0:.5,t?.5:1,t?1:.5))}He.AddNodeConstructor("StereoscopicArcRotateCamera",(function(e,t,n){return function(){return new Uc(e,0,0,1,C.Zero(),n.interaxial_distance,n.isStereoscopicSideBySide,t)}}));var Uc=function(e){function t(t,n,i,r,o,a,s,c){var l=e.call(this,t,n,i,r,o,c)||this;return l._setRigMode=function(){return Bc(l)},l.interaxialDistance=a,l.isStereoscopicSideBySide=s,l.setCameraRigMode(s?dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:dr.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:a}),l}return H(t,e),t.prototype.getClassName=function(){return"StereoscopicArcRotateCamera"},t}(uc);He.AddNodeConstructor("StereoscopicFreeCamera",(function(e,t,n){return function(){return new kc(e,C.Zero(),n.interaxial_distance,n.isStereoscopicSideBySide,t)}}));var kc=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,o)||this;return a._setRigMode=function(){return Bc(a)},a.interaxialDistance=i,a.isStereoscopicSideBySide=r,a.setCameraRigMode(r?dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:dr.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),a}return H(t,e),t.prototype.getClassName=function(){return"StereoscopicFreeCamera"},t}(cc);He.AddNodeConstructor("StereoscopicGamepadCamera",(function(e,t,n){return function(){return new Vc(e,C.Zero(),n.interaxial_distance,n.isStereoscopicSideBySide,t)}}));var Vc=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,o)||this;return a._setRigMode=function(){return Bc(a)},a.interaxialDistance=i,a.isStereoscopicSideBySide=r,a.setCameraRigMode(r?dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:dr.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),a}return H(t,e),t.prototype.getClassName=function(){return"StereoscopicGamepadCamera"},t}(Cc);He.AddNodeConstructor("StereoscopicFreeCamera",(function(e,t,n){return function(){return new zc(e,C.Zero(),n.interaxial_distance,n.isStereoscopicSideBySide,t)}}));var zc=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,o)||this;return a._setRigMode=function(){return Bc(a)},a.interaxialDistance=i,a.isStereoscopicSideBySide=r,a.setCameraRigMode(r?dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:dr.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),a}return H(t,e),t.prototype.getClassName=function(){return"StereoscopicUniversalCamera"},t}(Sc),Gc=function(e){function t(t,n,i,r,o){void 0===r&&(r=1),void 0===o&&(o=.065);var a=e.call(this,t,n,i)||this;return a._distanceBetweenEyes=o,a._distanceToProjectionPlane=r,a.setCameraRigMode(dr.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL,{stereoHalfAngle:0}),a._cameraRigParams.stereoHalfAngle=0,a._cameraRigParams.interaxialDistance=o,a}return H(t,e),Object.defineProperty(t.prototype,"distanceBetweenEyes",{get:function(){return this._distanceBetweenEyes},set:function(e){this._distanceBetweenEyes=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"distanceToProjectionPlane",{get:function(){return this._distanceToProjectionPlane},set:function(e){this._distanceToProjectionPlane=e},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"StereoscopicUniversalCamera"},t.prototype.createRigCamera=function(e){var t=new sc(e,C.Zero(),this.getScene()),n=new Lr("tm_"+e,this.getScene());return t.parent=n,n.setPivotMatrix(R.Identity(),!1),t.isRigCamera=!0,t.rigParent=this,t},t.prototype._updateRigCameras=function(){for(var e=0;e1.0 || tc.y<0.0 || tc.y>1.0)\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);else{gl_FragColor=texture2D(textureSampler,tc);}}";var Wc=function(e){function t(t,n,i,r){var o=e.call(this,t,"vrDistortionCorrection",["LensCenter","Scale","ScaleIn","HmdWarpParam"],null,r.postProcessScaleFactor,n,Eo.BILINEAR_SAMPLINGMODE)||this;return o._isRightEye=i,o._distortionFactors=r.distortionK,o._postProcessScaleFactor=r.postProcessScaleFactor,o._lensCenterOffset=r.lensCenterOffset,o.adaptScaleToCurrentViewport=!0,o.onSizeChangedObservable.add((function(){o._scaleIn=new S(2,2/o.aspectRatio),o._scaleFactor=new S(1/o._postProcessScaleFactor*.5,1/o._postProcessScaleFactor*.5*o.aspectRatio),o._lensCenter=new S(o._isRightEye?.5-.5*o._lensCenterOffset:.5+.5*o._lensCenterOffset,.5)})),o.onApplyObservable.add((function(e){e.setFloat2("LensCenter",o._lensCenter.x,o._lensCenter.y),e.setFloat2("Scale",o._scaleFactor.x,o._scaleFactor.y),e.setFloat2("ScaleIn",o._scaleIn.x,o._scaleIn.y),e.setFloat4("HmdWarpParam",o._distortionFactors[0],o._distortionFactors[1],o._distortionFactors[2],o._distortionFactors[3])})),o}return H(t,e),t.prototype.getClassName=function(){return"VRDistortionCorrectionPostProcess"},t}(Da);Vt.ShadersStore.vrMultiviewToSingleviewPixelShader="precision mediump sampler2DArray;varying vec2 vUV;uniform sampler2DArray multiviewSampler;uniform int imageIndex;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{gl_FragColor=texture2D(multiviewSampler,vec3(vUV,imageIndex));}";var Xc=function(e){function t(t,n){void 0===n&&(n=512);var i=e.call(this,"multiview rtt",n,t,!1,!0,a.TEXTURETYPE_UNSIGNED_INT,!1,void 0,!1,!1,!0,void 0,!0)||this;return i._renderTarget=i.getScene().getEngine().createMultiviewRenderTargetTexture(i.getRenderWidth(),i.getRenderHeight()),i._texture=i._renderTarget.texture,i._texture.isMultiview=!0,i._texture.format=a.TEXTUREFORMAT_RGBA,i.samples=i._getEngine().getCaps().maxSamples||i.samples,i._texture.samples=i._samples,i}return H(t,e),Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){this._samples=e},enumerable:!1,configurable:!0}),t.prototype._bindFrameBuffer=function(){this._renderTarget&&this.getScene().getEngine().bindMultiviewFramebuffer(this._renderTarget)},t.prototype.getViewCount=function(){return 2},t}(rs);function Yc(e,t){var n=new Wn(e,void 0,!0,t);return n.addUniform("viewProjection",16),n.addUniform("viewProjectionR",16),n.addUniform("view",16),n.addUniform("projection",16),n.addUniform("vEyePosition",4),n}Dr.prototype.createMultiviewRenderTargetTexture=function(e,t,n,i){var r=this._gl;if(!this.getCaps().multiview)throw"Multiview is not supported";var o=this._createHardwareRenderTargetWrapper(!1,!1,{width:e,height:t});o._framebuffer=r.createFramebuffer();var a=new Xt(this,wt.Unknown,!0);return a.width=e,a.height=t,a.isMultiview=!0,n||(n=r.createTexture(),r.bindTexture(r.TEXTURE_2D_ARRAY,n),r.texStorage3D(r.TEXTURE_2D_ARRAY,1,r.RGBA8,e,t,2)),o._colorTextureArray=n,i||(i=r.createTexture(),r.bindTexture(r.TEXTURE_2D_ARRAY,i),r.texStorage3D(r.TEXTURE_2D_ARRAY,1,r.DEPTH24_STENCIL8,e,t,2)),o._depthStencilTextureArray=i,a.isReady=!0,o.setTextures(a),o._depthStencilTexture=a,o},Dr.prototype.bindMultiviewFramebuffer=function(e){var t=e,n=this._gl,i=this.getCaps().oculusMultiview||this.getCaps().multiview;if(this.bindFramebuffer(t,void 0,void 0,void 0,!0),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,t._framebuffer),!t._colorTextureArray||!t._depthStencilTextureArray)throw"Invalid multiview frame buffer";this.getCaps().oculusMultiview?(i.framebufferTextureMultisampleMultiviewOVR(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,t._colorTextureArray,0,t.samples,0,2),i.framebufferTextureMultisampleMultiviewOVR(n.DRAW_FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,t._depthStencilTextureArray,0,t.samples,0,2)):(i.framebufferTextureMultiviewOVR(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,t._colorTextureArray,0,0,2),i.framebufferTextureMultiviewOVR(n.DRAW_FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,t._depthStencilTextureArray,0,0,2))},Dr.prototype.bindSpaceWarpFramebuffer=function(e){var t=e,n=this._gl,i=this.getCaps().oculusMultiview||this.getCaps().multiview;if(this.bindFramebuffer(t,void 0,void 0,void 0,!0),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,t._framebuffer),!t._colorTextureArray||!t._depthStencilTextureArray)throw new Error("Invalid Space Warp framebuffer");i.framebufferTextureMultiviewOVR(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,t._colorTextureArray,0,0,2),i.framebufferTextureMultiviewOVR(n.DRAW_FRAMEBUFFER,n.DEPTH_ATTACHMENT,t._depthStencilTextureArray,0,0,2)},dr.prototype._useMultiviewToSingleView=!1,dr.prototype._multiviewTexture=null,dr.prototype._resizeOrCreateMultiviewTexture=function(e,t){this._multiviewTexture?this._multiviewTexture.getRenderWidth()==e&&this._multiviewTexture.getRenderHeight()==t||(this._multiviewTexture.dispose(),this._multiviewTexture=new Xc(this.getScene(),{width:e,height:t})):this._multiviewTexture=new Xc(this.getScene(),{width:e,height:t})};var qc=Ci.prototype.createSceneUniformBuffer;Ci.prototype._transformMatrixR=R.Zero(),Ci.prototype._multiviewSceneUbo=null,Ci.prototype._createMultiviewUbo=function(){this._multiviewSceneUbo=Yc(this.getEngine(),"scene_multiview")},Ci.prototype.createSceneUniformBuffer=function(e){return this._multiviewSceneUbo?Yc(this.getEngine(),e):qc.bind(this)(e)},Ci.prototype._updateMultiviewUbo=function(e,t){e&&t&&e.multiplyToRef(t,this._transformMatrixR),e&&t&&(e.multiplyToRef(t,w.Matrix[0]),Ti.GetRightPlaneToRef(w.Matrix[0],this._frustumPlanes[3])),this._multiviewSceneUbo&&(this._multiviewSceneUbo.updateMatrix("viewProjection",this.getTransformMatrix()),this._multiviewSceneUbo.updateMatrix("viewProjectionR",this._transformMatrixR),this._multiviewSceneUbo.updateMatrix("view",this._viewMatrix),this._multiviewSceneUbo.updateMatrix("projection",this._projectionMatrix))},Ci.prototype._renderMultiviewToSingleView=function(e){e._resizeOrCreateMultiviewTexture(e._rigPostProcess&&e._rigPostProcess&&e._rigPostProcess.width>0?e._rigPostProcess.width:this.getEngine().getRenderWidth(!0),e._rigPostProcess&&e._rigPostProcess&&e._rigPostProcess.height>0?e._rigPostProcess.height:this.getEngine().getRenderHeight(!0)),this._multiviewSceneUbo||this._createMultiviewUbo(),e.outputRenderTarget=e._multiviewTexture,this._renderForCamera(e),e.outputRenderTarget=null;for(var t=0;t0&&(n=a.uniforms).push.apply(n,this._uniformList),this._samplerList.length>0&&(i=a.samplers).push.apply(i,this._samplerList),this._uboList.length>0&&(r=a.uniformBuffersNames).push.apply(r,this._uboList),a.customCode=this._injectCustomCode(a,a.customCode);break;case Wr.PrepareUniformBuffer:a=t,this._uboDeclaration="",this._vertexDeclaration="",this._fragmentDeclaration="",this._uniformList=[],this._samplerList=[],this._uboList=[];for(var v=0,b=this._plugins;v0?"[".concat(S,"]"):"",";\n")}this._uniformList.push(x.name)}T.vertex&&(this._vertexDeclaration+=T.vertex+"\n"),T.fragment&&(this._fragmentDeclaration+=T.fragment+"\n")}y.getSamplers(this._samplerList),y.getUniformBuffersNames(this._uboList)}}},e.prototype._collectPointNames=function(e,t){if(t)for(var n in t)this._codeInjectionPoints[e]||(this._codeInjectionPoints[e]={}),this._codeInjectionPoints[e][n]=!0},e.prototype._injectCustomCode=function(e,t){var n=this;return function(i,r){var o,a;t&&(r=t(i,r)),n._uboDeclaration&&(r=r.replace("#define ADDITIONAL_UBO_DECLARATION",n._uboDeclaration)),n._vertexDeclaration&&(r=r.replace("#define ADDITIONAL_VERTEX_DECLARATION",n._vertexDeclaration)),n._fragmentDeclaration&&(r=r.replace("#define ADDITIONAL_FRAGMENT_DECLARATION",n._fragmentDeclaration));var s=null===(o=n._codeInjectionPoints)||void 0===o?void 0:o[i];if(!s)return r;var c=null;for(var l in s){for(var u="",h=function(t){var r=null===(a=t.getCustomCode(i))||void 0===a?void 0:a[l];if(!r)return"continue";if(t.resolveIncludes){if(null===c){var o=at.GLSL;c={defines:[],indexParameters:e.indexParameters,isFragment:!1,shouldUseHighPrecisionShader:n._engine._shouldUseHighPrecisionShader,processor:void 0,supportsUniformBuffers:n._engine.supportsUniformBuffers,shadersRepository:Vt.GetShadersRepository(o),includesShadersStore:Vt.GetIncludesShadersStore(o),version:void 0,platformName:n._engine.shaderPlatformName,processingContext:void 0,isNDCHalfZRange:n._engine.isNDCHalfZRange,useReverseDepthBuffer:n._engine.useReverseDepthBuffer,processCodeAfterIncludes:void 0}}c.isFragment="fragment"===i,kt._ProcessIncludes(r,c,(function(e){return r=e}))}u+=r+"\n"},d=0,p=n._activePlugins;d0)if("!"===l.charAt(0)){var f="g";if("!"===(l=l.substring(1)).charAt(0))f="",l=l.substring(1);else{var m=nl.exec(l);m&&m.length>=2&&(f=m[1],l=l.substring(f.length+1))}f.indexOf("g")<0&&(f+="g");for(var _=r,g=new RegExp(l,f),y=g.exec(_);null!==y;){for(var v=u,b=0;b0?n[0][1]=t:rl.push([e,t])}function cl(e){for(var t=0;t0&&e.push(this._texture)},t.prototype.dispose=function(e){var t;e&&(null===(t=this._texture)||void 0===t||t.dispose())},t.prototype.getClassName=function(){return"DetailMapConfiguration"},t.prototype.getSamplers=function(e){e.push("detailSampler")},t.prototype.getUniforms=function(){return{ubo:[{name:"vDetailInfos",size:4,type:"vec4"},{name:"detailMatrix",size:16,type:"mat4"}]}},W([Ce("detailTexture"),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"texture",void 0),W([Se()],t.prototype,"diffuseBlendLevel",void 0),W([Se()],t.prototype,"roughnessBlendLevel",void 0),W([Se()],t.prototype,"bumpLevel",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"normalBlendMethod",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"isEnabled",void 0),t}(ul),pl={effect:null,subMesh:null},fl=function(e){function t(t){var n=e.call(this,t)||this;return n.MAINUV1=!1,n.MAINUV2=!1,n.MAINUV3=!1,n.MAINUV4=!1,n.MAINUV5=!1,n.MAINUV6=!1,n.DIFFUSE=!1,n.DIFFUSEDIRECTUV=0,n.BAKED_VERTEX_ANIMATION_TEXTURE=!1,n.AMBIENT=!1,n.AMBIENTDIRECTUV=0,n.OPACITY=!1,n.OPACITYDIRECTUV=0,n.OPACITYRGB=!1,n.REFLECTION=!1,n.EMISSIVE=!1,n.EMISSIVEDIRECTUV=0,n.SPECULAR=!1,n.SPECULARDIRECTUV=0,n.BUMP=!1,n.BUMPDIRECTUV=0,n.PARALLAX=!1,n.PARALLAX_RHS=!1,n.PARALLAXOCCLUSION=!1,n.SPECULAROVERALPHA=!1,n.CLIPPLANE=!1,n.CLIPPLANE2=!1,n.CLIPPLANE3=!1,n.CLIPPLANE4=!1,n.CLIPPLANE5=!1,n.CLIPPLANE6=!1,n.ALPHATEST=!1,n.DEPTHPREPASS=!1,n.ALPHAFROMDIFFUSE=!1,n.POINTSIZE=!1,n.FOG=!1,n.SPECULARTERM=!1,n.DIFFUSEFRESNEL=!1,n.OPACITYFRESNEL=!1,n.REFLECTIONFRESNEL=!1,n.REFRACTIONFRESNEL=!1,n.EMISSIVEFRESNEL=!1,n.FRESNEL=!1,n.NORMAL=!1,n.TANGENT=!1,n.UV1=!1,n.UV2=!1,n.UV3=!1,n.UV4=!1,n.UV5=!1,n.UV6=!1,n.VERTEXCOLOR=!1,n.VERTEXALPHA=!1,n.NUM_BONE_INFLUENCERS=0,n.BonesPerMesh=0,n.BONETEXTURE=!1,n.BONES_VELOCITY_ENABLED=!1,n.INSTANCES=!1,n.THIN_INSTANCES=!1,n.INSTANCESCOLOR=!1,n.GLOSSINESS=!1,n.ROUGHNESS=!1,n.EMISSIVEASILLUMINATION=!1,n.LINKEMISSIVEWITHDIFFUSE=!1,n.REFLECTIONFRESNELFROMSPECULAR=!1,n.LIGHTMAP=!1,n.LIGHTMAPDIRECTUV=0,n.OBJECTSPACE_NORMALMAP=!1,n.USELIGHTMAPASSHADOWMAP=!1,n.REFLECTIONMAP_3D=!1,n.REFLECTIONMAP_SPHERICAL=!1,n.REFLECTIONMAP_PLANAR=!1,n.REFLECTIONMAP_CUBIC=!1,n.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,n.USE_LOCAL_REFRACTIONMAP_CUBIC=!1,n.REFLECTIONMAP_PROJECTION=!1,n.REFLECTIONMAP_SKYBOX=!1,n.REFLECTIONMAP_EXPLICIT=!1,n.REFLECTIONMAP_EQUIRECTANGULAR=!1,n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,n.REFLECTIONMAP_OPPOSITEZ=!1,n.INVERTCUBICMAP=!1,n.LOGARITHMICDEPTH=!1,n.REFRACTION=!1,n.REFRACTIONMAP_3D=!1,n.REFLECTIONOVERALPHA=!1,n.TWOSIDEDLIGHTING=!1,n.SHADOWFLOAT=!1,n.MORPHTARGETS=!1,n.MORPHTARGETS_NORMAL=!1,n.MORPHTARGETS_TANGENT=!1,n.MORPHTARGETS_UV=!1,n.NUM_MORPH_INFLUENCERS=0,n.MORPHTARGETS_TEXTURE=!1,n.NONUNIFORMSCALING=!1,n.PREMULTIPLYALPHA=!1,n.ALPHATEST_AFTERALLALPHACOMPUTATIONS=!1,n.ALPHABLEND=!0,n.PREPASS=!1,n.PREPASS_IRRADIANCE=!1,n.PREPASS_IRRADIANCE_INDEX=-1,n.PREPASS_ALBEDO_SQRT=!1,n.PREPASS_ALBEDO_SQRT_INDEX=-1,n.PREPASS_DEPTH=!1,n.PREPASS_DEPTH_INDEX=-1,n.PREPASS_NORMAL=!1,n.PREPASS_NORMAL_INDEX=-1,n.PREPASS_NORMAL_WORLDSPACE=!1,n.PREPASS_POSITION=!1,n.PREPASS_POSITION_INDEX=-1,n.PREPASS_VELOCITY=!1,n.PREPASS_VELOCITY_INDEX=-1,n.PREPASS_REFLECTIVITY=!1,n.PREPASS_REFLECTIVITY_INDEX=-1,n.SCENE_MRT_COUNT=0,n.RGBDLIGHTMAP=!1,n.RGBDREFLECTION=!1,n.RGBDREFRACTION=!1,n.IMAGEPROCESSING=!1,n.VIGNETTE=!1,n.VIGNETTEBLENDMODEMULTIPLY=!1,n.VIGNETTEBLENDMODEOPAQUE=!1,n.TONEMAPPING=!1,n.TONEMAPPING_ACES=!1,n.CONTRAST=!1,n.COLORCURVES=!1,n.COLORGRADING=!1,n.COLORGRADING3D=!1,n.SAMPLER3DGREENDEPTH=!1,n.SAMPLER3DBGRMAP=!1,n.DITHER=!1,n.IMAGEPROCESSINGPOSTPROCESS=!1,n.SKIPFINALCOLORCLAMP=!1,n.MULTIVIEW=!1,n.ORDER_INDEPENDENT_TRANSPARENCY=!1,n.ORDER_INDEPENDENT_TRANSPARENCY_16BITS=!1,n.CAMERA_ORTHOGRAPHIC=!1,n.CAMERA_PERSPECTIVE=!1,n.IS_REFLECTION_LINEAR=!1,n.IS_REFRACTION_LINEAR=!1,n.EXPOSURE=!1,n.DECAL_AFTER_DETAIL=!1,n.rebuild(),n}return H(t,e),t.prototype.setReflectionMode=function(e){for(var t=0,n=["REFLECTIONMAP_CUBIC","REFLECTIONMAP_EXPLICIT","REFLECTIONMAP_PLANAR","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_SKYBOX","REFLECTIONMAP_SPHERICAL","REFLECTIONMAP_EQUIRECTANGULAR","REFLECTIONMAP_EQUIRECTANGULAR_FIXED","REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED"];t0,o.REFLECTIONOVERALPHA=this._useReflectionOverAlpha,o.INVERTCUBICMAP=this._reflectionTexture.coordinatesMode===Eo.INVCUBIC_MODE,o.REFLECTIONMAP_3D=this._reflectionTexture.isCube,o.REFLECTIONMAP_OPPOSITEZ=o.REFLECTIONMAP_3D&&this.getScene().useRightHandedSystem?!this._reflectionTexture.invertZ:this._reflectionTexture.invertZ,o.RGBDREFLECTION=this._reflectionTexture.isRGBD,this._reflectionTexture.coordinatesMode){case Eo.EXPLICIT_MODE:o.setReflectionMode("REFLECTIONMAP_EXPLICIT");break;case Eo.PLANAR_MODE:o.setReflectionMode("REFLECTIONMAP_PLANAR");break;case Eo.PROJECTION_MODE:o.setReflectionMode("REFLECTIONMAP_PROJECTION");break;case Eo.SKYBOX_MODE:o.setReflectionMode("REFLECTIONMAP_SKYBOX");break;case Eo.SPHERICAL_MODE:o.setReflectionMode("REFLECTIONMAP_SPHERICAL");break;case Eo.EQUIRECTANGULAR_MODE:o.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR");break;case Eo.FIXED_EQUIRECTANGULAR_MODE:o.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR_FIXED");break;case Eo.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:o.setReflectionMode("REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED");break;case Eo.CUBIC_MODE:case Eo.INVCUBIC_MODE:default:o.setReflectionMode("REFLECTIONMAP_CUBIC")}o.USE_LOCAL_REFLECTIONMAP_CUBIC=!!this._reflectionTexture.boundingBoxSize}else o.REFLECTION=!1,o.REFLECTIONMAP_OPPOSITEZ=!1;if(this._emissiveTexture&&t.EmissiveTextureEnabled){if(!this._emissiveTexture.isReadyOrNotBlocking())return!1;Xr.PrepareDefinesForMergedUV(this._emissiveTexture,o,"EMISSIVE")}else o.EMISSIVE=!1;if(this._lightmapTexture&&t.LightmapTextureEnabled){if(!this._lightmapTexture.isReadyOrNotBlocking())return!1;Xr.PrepareDefinesForMergedUV(this._lightmapTexture,o,"LIGHTMAP"),o.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,o.RGBDLIGHTMAP=this._lightmapTexture.isRGBD}else o.LIGHTMAP=!1;if(this._specularTexture&&t.SpecularTextureEnabled){if(!this._specularTexture.isReadyOrNotBlocking())return!1;Xr.PrepareDefinesForMergedUV(this._specularTexture,o,"SPECULAR"),o.GLOSSINESS=this._useGlossinessFromSpecularMapAlpha}else o.SPECULAR=!1;if(r.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&t.BumpTextureEnabled){if(!this._bumpTexture.isReady())return!1;Xr.PrepareDefinesForMergedUV(this._bumpTexture,o,"BUMP"),o.PARALLAX=this._useParallax,o.PARALLAX_RHS=r.useRightHandedSystem,o.PARALLAXOCCLUSION=this._useParallaxOcclusion,o.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap}else o.BUMP=!1,o.PARALLAX=!1,o.PARALLAX_RHS=!1,o.PARALLAXOCCLUSION=!1;if(this._refractionTexture&&t.RefractionTextureEnabled){if(!this._refractionTexture.isReadyOrNotBlocking())return!1;o._needUVs=!0,o.REFRACTION=!0,o.REFRACTIONMAP_3D=this._refractionTexture.isCube,o.RGBDREFRACTION=this._refractionTexture.isRGBD,o.USE_LOCAL_REFRACTIONMAP_CUBIC=!!this._refractionTexture.boundingBoxSize}else o.REFRACTION=!1;o.TWOSIDEDLIGHTING=!this._backFaceCulling&&this._twoSidedLighting}else o.DIFFUSE=!1,o.AMBIENT=!1,o.OPACITY=!1,o.REFLECTION=!1,o.EMISSIVE=!1,o.LIGHTMAP=!1,o.BUMP=!1,o.REFRACTION=!1;o.ALPHAFROMDIFFUSE=this._shouldUseAlphaFromDiffuseTexture(),o.EMISSIVEASILLUMINATION=this._useEmissiveAsIllumination,o.LINKEMISSIVEWITHDIFFUSE=this._linkEmissiveWithDiffuse,o.SPECULAROVERALPHA=this._useSpecularOverAlpha,o.PREMULTIPLYALPHA=this.alphaMode===a.ALPHA_PREMULTIPLIED||this.alphaMode===a.ALPHA_PREMULTIPLIED_PORTERDUFF,o.ALPHATEST_AFTERALLALPHACOMPUTATIONS=null!==this.transparencyMode,o.ALPHABLEND=null===this.transparencyMode||this.needAlphaBlendingForMesh(e)}if(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=o,this._eventInfo.subMesh=n,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),!this._eventInfo.isReadyForSubMesh)return!1;if(o._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(o),o.IS_REFLECTION_LINEAR=null!=this.reflectionTexture&&!this.reflectionTexture.gammaSpace,o.IS_REFRACTION_LINEAR=null!=this.refractionTexture&&!this.refractionTexture.gammaSpace}o._areFresnelDirty&&(t.FresnelEnabled?(this._diffuseFresnelParameters||this._opacityFresnelParameters||this._emissiveFresnelParameters||this._refractionFresnelParameters||this._reflectionFresnelParameters)&&(o.DIFFUSEFRESNEL=this._diffuseFresnelParameters&&this._diffuseFresnelParameters.isEnabled,o.OPACITYFRESNEL=this._opacityFresnelParameters&&this._opacityFresnelParameters.isEnabled,o.REFLECTIONFRESNEL=this._reflectionFresnelParameters&&this._reflectionFresnelParameters.isEnabled,o.REFLECTIONFRESNELFROMSPECULAR=this._useReflectionFresnelFromSpecular,o.REFRACTIONFRESNEL=this._refractionFresnelParameters&&this._refractionFresnelParameters.isEnabled,o.EMISSIVEFRESNEL=this._emissiveFresnelParameters&&this._emissiveFresnelParameters.isEnabled,o._needNormals=!0,o.FRESNEL=!0):o.FRESNEL=!1),Xr.PrepareDefinesForMisc(e,r,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e)||this._forceAlphaTest,o,this._applyDecalMapAfterDetailMap),Xr.PrepareDefinesForFrameBoundValues(r,s,this,o,i,null,n.getRenderingMesh().hasThinInstances),this._eventInfo.defines=o,this._eventInfo.mesh=e,this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo),Xr.PrepareDefinesForAttributes(e,o,!0,!0,!0),this._callbackPluginEventPrepareDefines(this._eventInfo);var u=!1;if(o.isDirty){var h=o._areLightsDisposed;o.markAsProcessed();var d=new Oa;o.REFLECTION&&d.addFallback(0,"REFLECTION"),o.SPECULAR&&d.addFallback(0,"SPECULAR"),o.BUMP&&d.addFallback(0,"BUMP"),o.PARALLAX&&d.addFallback(1,"PARALLAX"),o.PARALLAX_RHS&&d.addFallback(1,"PARALLAX_RHS"),o.PARALLAXOCCLUSION&&d.addFallback(0,"PARALLAXOCCLUSION"),o.SPECULAROVERALPHA&&d.addFallback(0,"SPECULAROVERALPHA"),o.FOG&&d.addFallback(1,"FOG"),o.POINTSIZE&&d.addFallback(0,"POINTSIZE"),o.LOGARITHMICDEPTH&&d.addFallback(0,"LOGARITHMICDEPTH"),Xr.HandleFallbacksForShadows(o,d,this._maxSimultaneousLights),o.SPECULARTERM&&d.addFallback(0,"SPECULARTERM"),o.DIFFUSEFRESNEL&&d.addFallback(1,"DIFFUSEFRESNEL"),o.OPACITYFRESNEL&&d.addFallback(2,"OPACITYFRESNEL"),o.REFLECTIONFRESNEL&&d.addFallback(3,"REFLECTIONFRESNEL"),o.EMISSIVEFRESNEL&&d.addFallback(4,"EMISSIVEFRESNEL"),o.FRESNEL&&d.addFallback(4,"FRESNEL"),o.MULTIVIEW&&d.addFallback(0,"MULTIVIEW");var p=[Yn.PositionKind];for(o.NORMAL&&p.push(Yn.NormalKind),o.TANGENT&&p.push(Yn.TangentKind),l=1;l<=a.MAX_SUPPORTED_UV_SETS;++l)o["UV"+l]&&p.push("uv".concat(1===l?"":l));o.VERTEXCOLOR&&p.push(Yn.ColorKind),Xr.PrepareAttributesForBones(p,e,o,d),Xr.PrepareAttributesForInstances(p,o),Xr.PrepareAttributesForMorphTargets(p,e,o),Xr.PrepareAttributesForBakedVertexAnimation(p,e,o);var f="default",m=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vDiffuseColor","vSpecularColor","vEmissiveColor","visibility","vFogInfos","vFogColor","pointSize","vDiffuseInfos","vAmbientInfos","vOpacityInfos","vReflectionInfos","vEmissiveInfos","vSpecularInfos","vBumpInfos","vLightmapInfos","vRefractionInfos","mBones","diffuseMatrix","ambientMatrix","opacityMatrix","reflectionMatrix","emissiveMatrix","specularMatrix","bumpMatrix","normalMatrix","lightmapMatrix","refractionMatrix","diffuseLeftColor","diffuseRightColor","opacityParts","reflectionLeftColor","reflectionRightColor","emissiveLeftColor","emissiveRightColor","refractionLeftColor","refractionRightColor","vReflectionPosition","vReflectionSize","vRefractionPosition","vRefractionSize","logarithmicDepthConstant","vTangentSpaceParams","alphaCutOff","boneTextureWidth","morphTargetTextureInfo","morphTargetTextureIndices"],_=["diffuseSampler","ambientSampler","opacitySampler","reflectionCubeSampler","reflection2DSampler","emissiveSampler","specularSampler","bumpSampler","lightmapSampler","refractionCubeSampler","refraction2DSampler","boneSampler","morphTargets","oitDepthSampler","oitFrontColorSampler"],g=["Material","Scene","Mesh"],y={maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:o.NUM_MORPH_INFLUENCERS};this._eventInfo.fallbacks=d,this._eventInfo.fallbackRank=0,this._eventInfo.defines=o,this._eventInfo.uniforms=m,this._eventInfo.attributes=p,this._eventInfo.samplers=_,this._eventInfo.uniformBuffersNames=g,this._eventInfo.customCode=void 0,this._eventInfo.mesh=e,this._eventInfo.indexParameters=y,this._callbackPluginEventGeneric(Wr.PrepareEffect,this._eventInfo),el.AddUniforms(m),el.AddSamplers(_),Fn&&(Fn.PrepareUniforms(m,o),Fn.PrepareSamplers(_,o)),Xr.PrepareUniformsAndSamplersList({uniformsNames:m,uniformBuffersNames:g,samplers:_,defines:o,maxSimultaneousLights:this._maxSimultaneousLights}),Vr(m);var v={};this.customShaderNameResolve&&(f=this.customShaderNameResolve(f,m,g,_,o,p,v));var b=o.toString(),T=n.effect,E=r.getEngine().createEffect(f,{attributes:p,uniformsNames:m,uniformBuffersNames:g,samplers:_,defines:b,fallbacks:d,onCompiled:this.onCompiled,onError:this.onError,indexParameters:y,processFinalCode:v.processFinalCode,processCodeAfterIncludes:this._eventInfo.customCode,multiTarget:o.PREPASS},s);if(this._eventInfo.customCode=void 0,E)if(this._onEffectCreatedObservable&&(pl.effect=E,pl.subMesh=n,this._onEffectCreatedObservable.notifyObservers(pl)),this.allowShaderHotSwapping&&T&&!E.isReady()){if(E=T,o.markAsUnprocessed(),u=this.isFrozen,h)return o._areLightsDisposed=!0,!1}else r.resetCachedMaterial(),n.setEffect(E,o,this._materialContext)}return!(!n.effect||!n.effect.isReady()||(o._renderId=r.getRenderId(),n.effect._wasPreviouslyReady=!u,n.effect._wasPreviouslyUsingInstances=i,this._checkScenePerformancePriority(),0))},t.prototype.buildUniformLayout=function(){var t=this._uniformBuffer;t.addUniform("diffuseLeftColor",4),t.addUniform("diffuseRightColor",4),t.addUniform("opacityParts",4),t.addUniform("reflectionLeftColor",4),t.addUniform("reflectionRightColor",4),t.addUniform("refractionLeftColor",4),t.addUniform("refractionRightColor",4),t.addUniform("emissiveLeftColor",4),t.addUniform("emissiveRightColor",4),t.addUniform("vDiffuseInfos",2),t.addUniform("vAmbientInfos",2),t.addUniform("vOpacityInfos",2),t.addUniform("vReflectionInfos",2),t.addUniform("vReflectionPosition",3),t.addUniform("vReflectionSize",3),t.addUniform("vEmissiveInfos",2),t.addUniform("vLightmapInfos",2),t.addUniform("vSpecularInfos",2),t.addUniform("vBumpInfos",3),t.addUniform("diffuseMatrix",16),t.addUniform("ambientMatrix",16),t.addUniform("opacityMatrix",16),t.addUniform("reflectionMatrix",16),t.addUniform("emissiveMatrix",16),t.addUniform("lightmapMatrix",16),t.addUniform("specularMatrix",16),t.addUniform("bumpMatrix",16),t.addUniform("vTangentSpaceParams",2),t.addUniform("pointSize",1),t.addUniform("alphaCutOff",1),t.addUniform("refractionMatrix",16),t.addUniform("vRefractionInfos",4),t.addUniform("vRefractionPosition",3),t.addUniform("vRefractionSize",3),t.addUniform("vSpecularColor",4),t.addUniform("vEmissiveColor",3),t.addUniform("vDiffuseColor",4),t.addUniform("vAmbientColor",3),e.prototype.buildUniformLayout.call(this)},t.prototype.bindForSubMesh=function(e,n,i){var r,o=this.getScene(),a=i.materialDefines;if(a){var s=i.effect;if(s){this._activeEffect=s,n.getMeshUniformBuffer().bindToEffect(s,"Mesh"),n.transferToEffect(e),this._uniformBuffer.bindToEffect(s,"Material"),this.prePassConfiguration.bindForSubMesh(this._activeEffect,o,n,e,this.isFrozen),this._eventInfo.subMesh=i,this._callbackPluginEventHardBindForSubMesh(this._eventInfo),a.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var c=s._forceRebindOnNextCall||this._mustRebind(o,s,n.visibility);Xr.BindBonesParameters(n,s);var l=this._uniformBuffer;if(c){if(this.bindViewProjection(s),!l.useUbo||!this.isFrozen||!l.isSync||s._forceRebindOnNextCall){if(t.FresnelEnabled&&a.FRESNEL&&(this.diffuseFresnelParameters&&this.diffuseFresnelParameters.isEnabled&&(l.updateColor4("diffuseLeftColor",this.diffuseFresnelParameters.leftColor,this.diffuseFresnelParameters.power),l.updateColor4("diffuseRightColor",this.diffuseFresnelParameters.rightColor,this.diffuseFresnelParameters.bias)),this.opacityFresnelParameters&&this.opacityFresnelParameters.isEnabled&&l.updateColor4("opacityParts",new B(this.opacityFresnelParameters.leftColor.toLuminance(),this.opacityFresnelParameters.rightColor.toLuminance(),this.opacityFresnelParameters.bias),this.opacityFresnelParameters.power),this.reflectionFresnelParameters&&this.reflectionFresnelParameters.isEnabled&&(l.updateColor4("reflectionLeftColor",this.reflectionFresnelParameters.leftColor,this.reflectionFresnelParameters.power),l.updateColor4("reflectionRightColor",this.reflectionFresnelParameters.rightColor,this.reflectionFresnelParameters.bias)),this.refractionFresnelParameters&&this.refractionFresnelParameters.isEnabled&&(l.updateColor4("refractionLeftColor",this.refractionFresnelParameters.leftColor,this.refractionFresnelParameters.power),l.updateColor4("refractionRightColor",this.refractionFresnelParameters.rightColor,this.refractionFresnelParameters.bias)),this.emissiveFresnelParameters&&this.emissiveFresnelParameters.isEnabled&&(l.updateColor4("emissiveLeftColor",this.emissiveFresnelParameters.leftColor,this.emissiveFresnelParameters.power),l.updateColor4("emissiveRightColor",this.emissiveFresnelParameters.rightColor,this.emissiveFresnelParameters.bias))),o.texturesEnabled){if(this._diffuseTexture&&t.DiffuseTextureEnabled&&(l.updateFloat2("vDiffuseInfos",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),Xr.BindTextureMatrix(this._diffuseTexture,l,"diffuse")),this._ambientTexture&&t.AmbientTextureEnabled&&(l.updateFloat2("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level),Xr.BindTextureMatrix(this._ambientTexture,l,"ambient")),this._opacityTexture&&t.OpacityTextureEnabled&&(l.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),Xr.BindTextureMatrix(this._opacityTexture,l,"opacity")),this._hasAlphaChannel()&&l.updateFloat("alphaCutOff",this.alphaCutOff),this._reflectionTexture&&t.ReflectionTextureEnabled&&(l.updateFloat2("vReflectionInfos",this._reflectionTexture.level,this.roughness),l.updateMatrix("reflectionMatrix",this._reflectionTexture.getReflectionTextureMatrix()),this._reflectionTexture.boundingBoxSize)){var u=this._reflectionTexture;l.updateVector3("vReflectionPosition",u.boundingBoxPosition),l.updateVector3("vReflectionSize",u.boundingBoxSize)}if(this._emissiveTexture&&t.EmissiveTextureEnabled&&(l.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),Xr.BindTextureMatrix(this._emissiveTexture,l,"emissive")),this._lightmapTexture&&t.LightmapTextureEnabled&&(l.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),Xr.BindTextureMatrix(this._lightmapTexture,l,"lightmap")),this._specularTexture&&t.SpecularTextureEnabled&&(l.updateFloat2("vSpecularInfos",this._specularTexture.coordinatesIndex,this._specularTexture.level),Xr.BindTextureMatrix(this._specularTexture,l,"specular")),this._bumpTexture&&o.getEngine().getCaps().standardDerivatives&&t.BumpTextureEnabled&&(l.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,1/this._bumpTexture.level,this.parallaxScaleBias),Xr.BindTextureMatrix(this._bumpTexture,l,"bump"),o._mirroredCameraPosition?l.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):l.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),this._refractionTexture&&t.RefractionTextureEnabled){var h=1;this._refractionTexture.isCube||(l.updateMatrix("refractionMatrix",this._refractionTexture.getReflectionTextureMatrix()),this._refractionTexture.depth&&(h=this._refractionTexture.depth)),l.updateFloat4("vRefractionInfos",this._refractionTexture.level,this.indexOfRefraction,h,this.invertRefractionY?-1:1),this._refractionTexture.boundingBoxSize&&(u=this._refractionTexture,l.updateVector3("vRefractionPosition",u.boundingBoxPosition),l.updateVector3("vRefractionSize",u.boundingBoxSize))}}this.pointsCloud&&l.updateFloat("pointSize",this.pointSize),a.SPECULARTERM&&l.updateColor4("vSpecularColor",this.specularColor,this.specularPower),l.updateColor3("vEmissiveColor",t.EmissiveTextureEnabled?this.emissiveColor:B.BlackReadOnly),l.updateColor4("vDiffuseColor",this.diffuseColor,this.alpha),o.ambientColor.multiplyToRef(this.ambientColor,this._globalAmbientColor),l.updateColor3("vAmbientColor",this._globalAmbientColor)}o.texturesEnabled&&(this._diffuseTexture&&t.DiffuseTextureEnabled&&s.setTexture("diffuseSampler",this._diffuseTexture),this._ambientTexture&&t.AmbientTextureEnabled&&s.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&t.OpacityTextureEnabled&&s.setTexture("opacitySampler",this._opacityTexture),this._reflectionTexture&&t.ReflectionTextureEnabled&&(this._reflectionTexture.isCube?s.setTexture("reflectionCubeSampler",this._reflectionTexture):s.setTexture("reflection2DSampler",this._reflectionTexture)),this._emissiveTexture&&t.EmissiveTextureEnabled&&s.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&t.LightmapTextureEnabled&&s.setTexture("lightmapSampler",this._lightmapTexture),this._specularTexture&&t.SpecularTextureEnabled&&s.setTexture("specularSampler",this._specularTexture),this._bumpTexture&&o.getEngine().getCaps().standardDerivatives&&t.BumpTextureEnabled&&s.setTexture("bumpSampler",this._bumpTexture),this._refractionTexture&&t.RefractionTextureEnabled&&(this._refractionTexture.isCube?s.setTexture("refractionCubeSampler",this._refractionTexture):s.setTexture("refraction2DSampler",this._refractionTexture))),this.getScene().useOrderIndependentTransparency&&this.needAlphaBlendingForMesh(n)&&this.getScene().depthPeelingRenderer.bind(s),this._eventInfo.subMesh=i,this._callbackPluginEventBindForSubMesh(this._eventInfo),Hr(s,this,o),this.bindEyePosition(s)}else o.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0);!c&&this.isFrozen||(o.lightsEnabled&&!this._disableLighting&&Xr.BindLights(o,n,s,a,this._maxSimultaneousLights),(o.fogEnabled&&n.applyFog&&o.fogMode!==Ci.FOGMODE_NONE||this._reflectionTexture||this._refractionTexture||n.receiveShadows||a.PREPASS)&&this.bindView(s),Xr.BindFogParameters(o,n,s),a.NUM_MORPH_INFLUENCERS&&Xr.BindMorphTargetParameters(n,s),a.BAKED_VERTEX_ANIMATION_TEXTURE&&(null===(r=n.bakedVertexAnimationManager)||void 0===r||r.bind(s,a.INSTANCES)),this.useLogarithmicDepth&&Xr.BindLogDepth(a,s,o),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(this._activeEffect)),this._afterBind(n,this._activeEffect),l.update()}}},t.prototype.getAnimatables=function(){var t=e.prototype.getAnimatables.call(this);return this._diffuseTexture&&this._diffuseTexture.animations&&this._diffuseTexture.animations.length>0&&t.push(this._diffuseTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&t.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&t.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&t.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&t.push(this._emissiveTexture),this._specularTexture&&this._specularTexture.animations&&this._specularTexture.animations.length>0&&t.push(this._specularTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&t.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&t.push(this._lightmapTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&t.push(this._refractionTexture),t},t.prototype.getActiveTextures=function(){var t=e.prototype.getActiveTextures.call(this);return this._diffuseTexture&&t.push(this._diffuseTexture),this._ambientTexture&&t.push(this._ambientTexture),this._opacityTexture&&t.push(this._opacityTexture),this._reflectionTexture&&t.push(this._reflectionTexture),this._emissiveTexture&&t.push(this._emissiveTexture),this._specularTexture&&t.push(this._specularTexture),this._bumpTexture&&t.push(this._bumpTexture),this._lightmapTexture&&t.push(this._lightmapTexture),this._refractionTexture&&t.push(this._refractionTexture),t},t.prototype.hasTexture=function(t){return!!e.prototype.hasTexture.call(this,t)||this._diffuseTexture===t||this._ambientTexture===t||this._opacityTexture===t||this._reflectionTexture===t||this._emissiveTexture===t||this._specularTexture===t||this._bumpTexture===t||this._lightmapTexture===t||this._refractionTexture===t},t.prototype.dispose=function(t,n){var i,r,o,a,s,c,l,u,h;n&&(null===(i=this._diffuseTexture)||void 0===i||i.dispose(),null===(r=this._ambientTexture)||void 0===r||r.dispose(),null===(o=this._opacityTexture)||void 0===o||o.dispose(),null===(a=this._reflectionTexture)||void 0===a||a.dispose(),null===(s=this._emissiveTexture)||void 0===s||s.dispose(),null===(c=this._specularTexture)||void 0===c||c.dispose(),null===(l=this._bumpTexture)||void 0===l||l.dispose(),null===(u=this._lightmapTexture)||void 0===u||u.dispose(),null===(h=this._refractionTexture)||void 0===h||h.dispose()),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e.prototype.dispose.call(this,t,n)},t.prototype.clone=function(e,n,i){var r=this;void 0===n&&(n=!0),void 0===i&&(i="");var o=ke.Clone((function(){return new t(e,r.getScene())}),this,{cloneTexturesOnlyOnce:n});return o.name=e,o.id=e,this.stencil.copyTo(o.stencil),this._clonePlugins(o,i),o},t.Parse=function(e,n,i){var r=ke.Parse((function(){return new t(e.name,n)}),e,n,i);return e.stencil&&r.stencil.parse(e.stencil,n,i),qr._parsePlugins(e,r,n,i),r},Object.defineProperty(t,"DiffuseTextureEnabled",{get:function(){return tl.DiffuseTextureEnabled},set:function(e){tl.DiffuseTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"DetailTextureEnabled",{get:function(){return tl.DetailTextureEnabled},set:function(e){tl.DetailTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"AmbientTextureEnabled",{get:function(){return tl.AmbientTextureEnabled},set:function(e){tl.AmbientTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"OpacityTextureEnabled",{get:function(){return tl.OpacityTextureEnabled},set:function(e){tl.OpacityTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"ReflectionTextureEnabled",{get:function(){return tl.ReflectionTextureEnabled},set:function(e){tl.ReflectionTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"EmissiveTextureEnabled",{get:function(){return tl.EmissiveTextureEnabled},set:function(e){tl.EmissiveTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"SpecularTextureEnabled",{get:function(){return tl.SpecularTextureEnabled},set:function(e){tl.SpecularTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"BumpTextureEnabled",{get:function(){return tl.BumpTextureEnabled},set:function(e){tl.BumpTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"LightmapTextureEnabled",{get:function(){return tl.LightmapTextureEnabled},set:function(e){tl.LightmapTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"RefractionTextureEnabled",{get:function(){return tl.RefractionTextureEnabled},set:function(e){tl.RefractionTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"ColorGradingTextureEnabled",{get:function(){return tl.ColorGradingTextureEnabled},set:function(e){tl.ColorGradingTextureEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"FresnelEnabled",{get:function(){return tl.FresnelEnabled},set:function(e){tl.FresnelEnabled=e},enumerable:!1,configurable:!0}),W([Ce("diffuseTexture")],t.prototype,"_diffuseTexture",void 0),W([xe("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"diffuseTexture",void 0),W([Ce("ambientTexture")],t.prototype,"_ambientTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTexture",void 0),W([Ce("opacityTexture")],t.prototype,"_opacityTexture",void 0),W([xe("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"opacityTexture",void 0),W([Ce("reflectionTexture")],t.prototype,"_reflectionTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),W([Ce("emissiveTexture")],t.prototype,"_emissiveTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveTexture",void 0),W([Ce("specularTexture")],t.prototype,"_specularTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"specularTexture",void 0),W([Ce("bumpTexture")],t.prototype,"_bumpTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"bumpTexture",void 0),W([Ce("lightmapTexture")],t.prototype,"_lightmapTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"lightmapTexture",void 0),W([Ce("refractionTexture")],t.prototype,"_refractionTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"refractionTexture",void 0),W([Pe("ambient")],t.prototype,"ambientColor",void 0),W([Pe("diffuse")],t.prototype,"diffuseColor",void 0),W([Pe("specular")],t.prototype,"specularColor",void 0),W([Pe("emissive")],t.prototype,"emissiveColor",void 0),W([Se()],t.prototype,"specularPower",void 0),W([Se("useAlphaFromDiffuseTexture")],t.prototype,"_useAlphaFromDiffuseTexture",void 0),W([xe("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"useAlphaFromDiffuseTexture",void 0),W([Se("useEmissiveAsIllumination")],t.prototype,"_useEmissiveAsIllumination",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useEmissiveAsIllumination",void 0),W([Se("linkEmissiveWithDiffuse")],t.prototype,"_linkEmissiveWithDiffuse",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"linkEmissiveWithDiffuse",void 0),W([Se("useSpecularOverAlpha")],t.prototype,"_useSpecularOverAlpha",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useSpecularOverAlpha",void 0),W([Se("useReflectionOverAlpha")],t.prototype,"_useReflectionOverAlpha",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useReflectionOverAlpha",void 0),W([Se("disableLighting")],t.prototype,"_disableLighting",void 0),W([xe("_markAllSubMeshesAsLightsDirty")],t.prototype,"disableLighting",void 0),W([Se("useObjectSpaceNormalMap")],t.prototype,"_useObjectSpaceNormalMap",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useObjectSpaceNormalMap",void 0),W([Se("useParallax")],t.prototype,"_useParallax",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallax",void 0),W([Se("useParallaxOcclusion")],t.prototype,"_useParallaxOcclusion",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallaxOcclusion",void 0),W([Se()],t.prototype,"parallaxScaleBias",void 0),W([Se("roughness")],t.prototype,"_roughness",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"roughness",void 0),W([Se()],t.prototype,"indexOfRefraction",void 0),W([Se()],t.prototype,"invertRefractionY",void 0),W([Se()],t.prototype,"alphaCutOff",void 0),W([Se("useLightmapAsShadowmap")],t.prototype,"_useLightmapAsShadowmap",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLightmapAsShadowmap",void 0),W([Ie("diffuseFresnelParameters")],t.prototype,"_diffuseFresnelParameters",void 0),W([xe("_markAllSubMeshesAsFresnelDirty")],t.prototype,"diffuseFresnelParameters",void 0),W([Ie("opacityFresnelParameters")],t.prototype,"_opacityFresnelParameters",void 0),W([xe("_markAllSubMeshesAsFresnelAndMiscDirty")],t.prototype,"opacityFresnelParameters",void 0),W([Ie("reflectionFresnelParameters")],t.prototype,"_reflectionFresnelParameters",void 0),W([xe("_markAllSubMeshesAsFresnelDirty")],t.prototype,"reflectionFresnelParameters",void 0),W([Ie("refractionFresnelParameters")],t.prototype,"_refractionFresnelParameters",void 0),W([xe("_markAllSubMeshesAsFresnelDirty")],t.prototype,"refractionFresnelParameters",void 0),W([Ie("emissiveFresnelParameters")],t.prototype,"_emissiveFresnelParameters",void 0),W([xe("_markAllSubMeshesAsFresnelDirty")],t.prototype,"emissiveFresnelParameters",void 0),W([Se("useReflectionFresnelFromSpecular")],t.prototype,"_useReflectionFresnelFromSpecular",void 0),W([xe("_markAllSubMeshesAsFresnelDirty")],t.prototype,"useReflectionFresnelFromSpecular",void 0),W([Se("useGlossinessFromSpecularMapAlpha")],t.prototype,"_useGlossinessFromSpecularMapAlpha",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useGlossinessFromSpecularMapAlpha",void 0),W([Se("maxSimultaneousLights")],t.prototype,"_maxSimultaneousLights",void 0),W([xe("_markAllSubMeshesAsLightsDirty")],t.prototype,"maxSimultaneousLights",void 0),W([Se("invertNormalMapX")],t.prototype,"_invertNormalMapX",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapX",void 0),W([Se("invertNormalMapY")],t.prototype,"_invertNormalMapY",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapY",void 0),W([Se("twoSidedLighting")],t.prototype,"_twoSidedLighting",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"twoSidedLighting",void 0),W([Se("applyDecalMapAfterDetailMap")],t.prototype,"_applyDecalMapAfterDetailMap",void 0),W([xe("_markAllSubMeshesAsMiscDirty")],t.prototype,"applyDecalMapAfterDetailMap",void 0),t}(oa);b("BABYLON.StandardMaterial",ml),Ci.DefaultMaterialFactory=function(e){return new ml("default material",e)},rn.prototype.createDynamicTexture=function(e,t,n,i){var r=new Xt(this,wt.Dynamic);return r.baseWidth=e,r.baseHeight=t,n&&(e=this.needPOTTextures?rn.GetExponentOfTwo(e,this._caps.maxTextureSize):e,t=this.needPOTTextures?rn.GetExponentOfTwo(t,this._caps.maxTextureSize):t),r.width=e,r.height=t,r.isReady=!1,r.generateMipMaps=n,r.samplingMode=i,this.updateTextureSamplingMode(i,r),this._internalTexturesCache.push(r),r},rn.prototype.updateDynamicTexture=function(e,t,n,i,r,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),e){var s=this._gl,c=s.TEXTURE_2D,l=this._bindTextureDirectly(c,e,!0,o);this._unpackFlipY(void 0===n?e.invertY:n),i&&s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);var u=this._getWebGLTextureType(e.type),h=this._getInternalFormat(r||e.format),d=this._getRGBABufferInternalSizedFormat(e.type,h);s.texImage2D(c,0,d,h,u,t),e.generateMipMaps&&s.generateMipmap(c),l||this._bindTextureDirectly(c,null),i&&s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),r&&(e.format=r),e._dynamicTextureSource=t,e._premulAlpha=i,e.invertY=n||!1,e.isReady=!0}};var _l,gl,yl=function(e){function t(t,n,i,r,o,s,c){void 0===i&&(i=null),void 0===r&&(r=!1),void 0===o&&(o=a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===s&&(s=a.TEXTUREFORMAT_RGBA);var l=e.call(this,null,i,!r,c,o,void 0,void 0,void 0,void 0,s)||this;l.name=t,l.wrapU=Eo.CLAMP_ADDRESSMODE,l.wrapV=Eo.CLAMP_ADDRESSMODE,l._generateMipMaps=r;var u=l._getEngine();if(!u)return l;n.getContext?(l._canvas=n,l._texture=u.createDynamicTexture(n.width,n.height,r,o)):(l._canvas=u.createCanvas(1,1),n.width||0===n.width?l._texture=u.createDynamicTexture(n.width,n.height,r,o):l._texture=u.createDynamicTexture(n,n,r,o));var h=l.getSize();return l._canvas.width!==h.width&&(l._canvas.width=h.width),l._canvas.height!==h.height&&(l._canvas.height=h.height),l._context=l._canvas.getContext("2d"),l}return H(t,e),t.prototype.getClassName=function(){return"DynamicTexture"},Object.defineProperty(t.prototype,"canRescale",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._recreate=function(e){this._canvas.width=e.width,this._canvas.height=e.height,this.releaseInternalTexture(),this._texture=this._getEngine().createDynamicTexture(e.width,e.height,this._generateMipMaps,this.samplingMode)},t.prototype.scale=function(e){var t=this.getSize();t.width*=e,t.height*=e,this._recreate(t)},t.prototype.scaleTo=function(e,t){var n=this.getSize();n.width=e,n.height=t,this._recreate(n)},t.prototype.getContext=function(){return this._context},t.prototype.clear=function(e){var t=this.getSize();e&&(this._context.fillStyle=e),this._context.clearRect(0,0,t.width,t.height)},t.prototype.update=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),this._getEngine().updateDynamicTexture(this._texture,this._canvas,void 0===e||e,t,this._format||void 0,void 0,n)},t.prototype.drawText=function(e,t,n,i,r,o,a,s){void 0===s&&(s=!0);var c=this.getSize();if(o&&(this._context.fillStyle=o,this._context.fillRect(0,0,c.width,c.height)),this._context.font=i,null==t){var l=this._context.measureText(e);t=(c.width-l.width)/2}if(null==n){var u=parseInt(i.replace(/\D/g,""));n=c.height/2+u/3.65}this._context.fillStyle=r||"",this._context.fillText(e,t,n),s&&this.update(a)},t.prototype.clone=function(){var e=this.getScene();if(!e)return this;var n=this.getSize(),i=new t(this.name,n,e,this._generateMipMaps);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.wrapU=this.wrapU,i.wrapV=this.wrapV,i},t.prototype.serialize=function(){var n=this.getScene();n&&!n.isReady()&&J.Warn("The scene must be ready before serializing the dynamic texture");var i=e.prototype.serialize.call(this);return t._IsCanvasElement(this._canvas)&&(i.base64String=this._canvas.toDataURL()),i.invertY=this._invertY,i.samplingMode=this.samplingMode,i},t._IsCanvasElement=function(e){return void 0!==e.toDataURL},t.prototype._rebuild=function(){this.update()},t}(Eo),vl=function(){function e(e,t,n,i,r){this.getWidth=e,this.getHeight=t,this.layer=n,this.layerType=i,this.createRenderTargetTextureProvider=r}return Object.defineProperty(e.prototype,"isFixedFoveationSupported",{get:function(){return"XRWebGLLayer"==this.layerType&&"number"==typeof this.layer.fixedFoveation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fixedFoveation",{get:function(){return this.isFixedFoveationSupported?this.layer.fixedFoveation:null},set:function(e){if(this.isFixedFoveationSupported){var t=Math.max(0,Math.min(1,e||0));this.layer.fixedFoveation=t}},enumerable:!1,configurable:!0}),e}(),bl=function(){function e(e,t){this._scene=e,this.layerWrapper=t,this._renderTargetTextures=new Array,this._engine=e.getEngine()}return e.prototype._createInternalTexture=function(e,t){var n=new Xt(this._engine,wt.Unknown,!0);return n.width=e.width,n.height=e.height,n._hardwareTexture=new Jt(t,this._engine._gl),n.isReady=!0,n},e.prototype._createRenderTargetTexture=function(e,t,n,i,r,o){if(!this._engine)throw new Error("Engine is disposed");var a={width:e,height:t},s=o?new Xc(this._scene,a):new rs("XR renderTargetTexture",a,this._scene),c=s.renderTarget;if(c._samples=s.samples,!n&&i||(c._framebuffer=n),i)if(o)c._colorTextureArray=i;else{var l=this._createInternalTexture(a,i);c.setTexture(l,0),s._texture=l}return r&&(o?c._depthStencilTextureArray=r:c._depthStencilTexture=this._createInternalTexture(a,r)),s.disableRescaling(),"undefined"!=typeof XRWebGLBinding&&(s.skipInitialClear=!0),this._renderTargetTextures.push(s),s},e.prototype._destroyRenderTargetTexture=function(e){this._renderTargetTextures.splice(this._renderTargetTextures.indexOf(e),1),e.dispose()},e.prototype.getFramebufferDimensions=function(){return this._framebufferDimensions},e.prototype.dispose=function(){this._renderTargetTextures.forEach((function(e){return e.dispose()})),this._renderTargetTextures.length=0},e}(),Tl=function(e){function t(t){var n=e.call(this,(function(){return t.framebufferWidth}),(function(){return t.framebufferHeight}),t,"XRWebGLLayer",(function(e){return new El(e.scene,n)}))||this;return n.layer=t,n}return H(t,e),t}(vl),El=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.layerWrapper=n,i._layer=n.layer,i._framebufferDimensions={framebufferWidth:i._layer.framebufferWidth,framebufferHeight:i._layer.framebufferHeight},i}return H(t,e),t.prototype.trySetViewportForView=function(e,t){var n=this._layer.getViewport(t);if(!n)return!1;var i=this._framebufferDimensions.framebufferWidth,r=this._framebufferDimensions.framebufferHeight;return e.x=n.x/i,e.y=n.y/r,e.width=n.width/i,e.height=n.height/r,!0},t.prototype.getRenderTargetTextureForEye=function(e){var t=this._layer.framebufferWidth,n=this._layer.framebufferHeight,i=this._layer.framebuffer;return this._rtt&&t===this._framebufferDimensions.framebufferWidth&&n===this._framebufferDimensions.framebufferHeight&&i===this._framebuffer||(this._rtt=this._createRenderTargetTexture(t,n,i),this._framebufferDimensions.framebufferWidth=t,this._framebufferDimensions.framebufferHeight=n,this._framebuffer=i),this._rtt},t.prototype.getRenderTargetTextureForView=function(e){return this.getRenderTargetTextureForEye(e.eye)},t}(bl),Al=function(){function e(){}return e.GetDefaults=function(t){var n=new e;return n.canvasOptions={antialias:!0,depth:!0,stencil:!t||t.isStencilEnable,alpha:!0,framebufferScaleFactor:1},n.newCanvasCssStyle="position:absolute; bottom:0px;right:0px;z-index:10;width:90%;height:100%;background-color: #000000;",n},e}(),xl=function(){function e(e,t){void 0===t&&(t=Al.GetDefaults());var n=this;if(this._options=t,this._canvas=null,this._engine=null,this.xrLayer=null,this._xrLayerWrapper=null,this.onXRLayerInitObservable=new u,this._engine=e.scene.getEngine(),this._engine.onDisposeObservable.addOnce((function(){n._engine=null})),t.canvasElement)this._setManagedOutputCanvas(t.canvasElement);else{var i=document.createElement("canvas");i.style.cssText=this._options.newCanvasCssStyle||"position:absolute; bottom:0px;right:0px;",this._setManagedOutputCanvas(i)}e.onXRSessionInit.add((function(){n._addCanvas()})),e.onXRSessionEnded.add((function(){n._removeCanvas()}))}return e.prototype.dispose=function(){this._removeCanvas(),this._setManagedOutputCanvas(null)},e.prototype.initializeXRLayerAsync=function(e){return X(this,void 0,void 0,(function(){var t,n=this;return Y(this,(function(i){return t=function(){return n.xrLayer=new XRWebGLLayer(e,n.canvasContext,n._options.canvasOptions),n._xrLayerWrapper=new Tl(n.xrLayer),n.onXRLayerInitObservable.notifyObservers(n.xrLayer),n.xrLayer},this.canvasContext.makeXRCompatible?[2,this.canvasContext.makeXRCompatible().then((function(){}),(function(){Pn.Warn("Error executing makeXRCompatible. This does not mean that the session will work incorrectly.")})).then((function(){return t()}))]:[2,Promise.resolve(t())]}))}))},e.prototype._addCanvas=function(){var e=this;this._canvas&&this._engine&&this._canvas!==this._engine.getRenderingCanvas()&&document.body.appendChild(this._canvas),this.xrLayer?this._setCanvasSize(!0):this.onXRLayerInitObservable.addOnce((function(){e._setCanvasSize(!0)}))},e.prototype._removeCanvas=function(){this._canvas&&this._engine&&document.body.contains(this._canvas)&&this._canvas!==this._engine.getRenderingCanvas()&&document.body.removeChild(this._canvas),this._setCanvasSize(!1)},e.prototype._setCanvasSize=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=this._xrLayerWrapper),this._canvas&&this._engine&&(e?t&&(this._canvas!==this._engine.getRenderingCanvas()?(this._canvas.style.width=t.getWidth()+"px",this._canvas.style.height=t.getHeight()+"px"):this._engine.setSize(t.getWidth(),t.getHeight())):this._originalCanvasSize&&(this._canvas!==this._engine.getRenderingCanvas()?(this._canvas.style.width=this._originalCanvasSize.width+"px",this._canvas.style.height=this._originalCanvasSize.height+"px"):this._engine.setSize(this._originalCanvasSize.width,this._originalCanvasSize.height)))},e.prototype._setManagedOutputCanvas=function(e){this._removeCanvas(),e?(this._originalCanvasSize={width:e.offsetWidth,height:e.offsetHeight},this._canvas=e,this.canvasContext=this._canvas.getContext("webgl2"),this.canvasContext||(this.canvasContext=this._canvas.getContext("webgl"))):(this._canvas=null,this.canvasContext=null)},e}(),Sl=function(e){function t(t){var n=e.call(this,(function(){return t.framebufferWidth}),(function(){return t.framebufferHeight}),t,"XRWebGLLayer",(function(e){return new Cl(e,n)}))||this;return n.layer=t,n}return H(t,e),t}(vl),Cl=function(e){function t(t,n){var i=e.call(this,t.scene,n)||this;return i.layerWrapper=n,i._nativeRTTProvider=navigator.xr.getNativeRenderTargetProvider(t.session,i._createRenderTargetTexture.bind(i),i._destroyRenderTargetTexture.bind(i)),i._nativeLayer=n.layer,i}return H(t,e),t.prototype.trySetViewportForView=function(e){return e.x=0,e.y=0,e.width=1,e.height=1,!0},t.prototype.getRenderTargetTextureForEye=function(e){return this._nativeRTTProvider.getRenderTargetForEye(e)},t.prototype.getRenderTargetTextureForView=function(e){return this._nativeRTTProvider.getRenderTargetForEye(e.eye)},t.prototype.getFramebufferDimensions=function(){return{framebufferWidth:this._nativeLayer.framebufferWidth,framebufferHeight:this._nativeLayer.framebufferHeight}},t}(bl),Pl=function(){function e(e){this._nativeRenderTarget=navigator.xr.getWebXRRenderTarget(e.scene.getEngine())}return e.prototype.initializeXRLayerAsync=function(e){return X(this,void 0,void 0,(function(){return Y(this,(function(t){switch(t.label){case 0:return[4,this._nativeRenderTarget.initializeXRLayerAsync(e)];case 1:return t.sent(),this.xrLayer=this._nativeRenderTarget.xrLayer,[2,this.xrLayer]}}))}))},e.prototype.dispose=function(){},e}(),Il=function(){function e(e){var t=this;this.scene=e,this.currentTimestamp=-1,this.defaultHeightCompensation=1.7,this.onXRFrameObservable=new u,this.onXRReferenceSpaceChanged=new u,this.onXRSessionEnded=new u,this.onXRSessionInit=new u,this.inXRFrameLoop=!1,this.inXRSession=!1,this._engine=e.getEngine(),this._onEngineDisposedObserver=this._engine.onDisposeObservable.addOnce((function(){t._engine=null})),e.onDisposeObservable.addOnce((function(){t.dispose()}))}return Object.defineProperty(e.prototype,"referenceSpace",{get:function(){return this._referenceSpace},set:function(e){this._referenceSpace=e,this.onXRReferenceSpaceChanged.notifyObservers(this._referenceSpace)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionMode",{get:function(){return this._sessionMode},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){var e;this.inXRSession&&this.exitXRAsync(),this.onXRFrameObservable.clear(),this.onXRSessionEnded.clear(),this.onXRReferenceSpaceChanged.clear(),this.onXRSessionInit.clear(),null===(e=this._engine)||void 0===e||e.onDisposeObservable.remove(this._onEngineDisposedObserver),this._engine=null},e.prototype.exitXRAsync=function(){return this.session&&this.inXRSession?(this.inXRSession=!1,this.session.end().catch((function(){J.Warn("Could not end XR session.")}))):Promise.resolve()},e.prototype.trySetViewportForView=function(e,t){var n;return(null===(n=this._baseLayerRTTProvider)||void 0===n?void 0:n.trySetViewportForView(e,t))||!1},e.prototype.getRenderTargetTextureForEye=function(e){var t;return(null===(t=this._baseLayerRTTProvider)||void 0===t?void 0:t.getRenderTargetTextureForEye(e))||null},e.prototype.getRenderTargetTextureForView=function(e){var t;return(null===(t=this._baseLayerRTTProvider)||void 0===t?void 0:t.getRenderTargetTextureForView(e))||null},e.prototype.getWebXRRenderTarget=function(e){var t=this.scene.getEngine();return this._xrNavigator.xr.native?new Pl(this):((e=e||Al.GetDefaults(t)).canvasElement=e.canvasElement||t.getRenderingCanvas()||void 0,new xl(this,e))},e.prototype.initializeAsync=function(){return this._xrNavigator=navigator,this._xrNavigator.xr?Promise.resolve():Promise.reject("WebXR not available")},e.prototype.initializeSessionAsync=function(e,t){var n=this;return void 0===e&&(e="immersive-vr"),void 0===t&&(t={}),this._xrNavigator.xr.requestSession(e,t).then((function(t){return n.session=t,n._sessionMode=e,n.onXRSessionInit.notifyObservers(t),n.inXRSession=!0,n.session.addEventListener("end",(function(){var e;n.inXRSession=!1,n.onXRSessionEnded.notifyObservers(null),n._engine&&(n._engine.framebufferDimensionsObject=null,n._engine.restoreDefaultFramebuffer(),n._engine.customAnimationFrameRequester=null,n._engine._renderLoop()),n.isNative&&(null===(e=n._baseLayerRTTProvider)||void 0===e||e.dispose()),n._baseLayerRTTProvider=null,n._baseLayerWrapper=null}),{once:!0}),n.session}))},e.prototype.isSessionSupportedAsync=function(t){return e.IsSessionSupportedAsync(t)},e.prototype.resetReferenceSpace=function(){this.referenceSpace=this.baseReferenceSpace},e.prototype.runXRRenderLoop=function(){var e,t=this;this.inXRSession&&this._engine&&(this._engine.customAnimationFrameRequester={requestAnimationFrame:function(e){return t.session.requestAnimationFrame(e)},renderFunction:function(e,n){var i;t.inXRSession&&t._engine&&(t.currentFrame=n,t.currentTimestamp=e,n&&(t.inXRFrameLoop=!0,t._engine.framebufferDimensionsObject=(null===(i=t._baseLayerRTTProvider)||void 0===i?void 0:i.getFramebufferDimensions())||null,t.onXRFrameObservable.notifyObservers(n),t._engine._renderLoop(),t._engine.framebufferDimensionsObject=null,t.inXRFrameLoop=!1))}},this._engine.framebufferDimensionsObject=(null===(e=this._baseLayerRTTProvider)||void 0===e?void 0:e.getFramebufferDimensions())||null,"undefined"!=typeof window&&window.cancelAnimationFrame&&window.cancelAnimationFrame(this._engine._frameHandler),this._engine._renderLoop())},e.prototype.setReferenceSpaceTypeAsync=function(e){var t=this;return void 0===e&&(e="local-floor"),this.session.requestReferenceSpace(e).then((function(e){return e}),(function(e){return J.Error("XR.requestReferenceSpace failed for the following reason: "),J.Error(e),J.Log('Defaulting to universally-supported "viewer" reference space type.'),t.session.requestReferenceSpace("viewer").then((function(e){var n=new XRRigidTransform({x:0,y:-t.defaultHeightCompensation,z:0});return e.getOffsetReferenceSpace(n)}),(function(e){throw J.Error(e),'XR initialization failed: required "viewer" reference space type not supported.'}))})).then((function(e){return t.session.requestReferenceSpace("viewer").then((function(n){return t.viewerReferenceSpace=n,e}))})).then((function(e){return t.referenceSpace=t.baseReferenceSpace=e,t.referenceSpace}))},e.prototype.updateRenderStateAsync=function(e){return Promise.resolve(this.session.updateRenderState(e))},e.prototype._setBaseLayerWrapper=function(e){var t,n;this.isNative&&(null===(t=this._baseLayerRTTProvider)||void 0===t||t.dispose()),this._baseLayerWrapper=e,this._baseLayerRTTProvider=(null===(n=this._baseLayerWrapper)||void 0===n?void 0:n.createRenderTargetTextureProvider(this))||null},e.prototype._getBaseLayerWrapper=function(){return this._baseLayerWrapper},e.prototype.updateRenderState=function(e){e.baseLayer&&this._setBaseLayerWrapper(this.isNative?new Sl(e.baseLayer):new Tl(e.baseLayer)),this.session.updateRenderState(e)},e.IsSessionSupportedAsync=function(e){if(!navigator.xr)return Promise.resolve(!1);var t=navigator.xr.isSessionSupported||navigator.xr.supportsSession;return t?t.call(navigator.xr,e).then((function(e){var t=void 0===e||e;return Promise.resolve(t)})).catch((function(e){return J.Warn(e),Promise.resolve(!1)})):Promise.resolve(!1)},Object.defineProperty(e.prototype,"isNative",{get:function(){var e;return null!==(e=this._xrNavigator.xr.native)&&void 0!==e&&e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentFrameRate",{get:function(){var e;return null===(e=this.session)||void 0===e?void 0:e.frameRate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportedFrameRates",{get:function(){var e;return null===(e=this.session)||void 0===e?void 0:e.supportedFrameRates},enumerable:!1,configurable:!0}),e.prototype.updateTargetFrameRate=function(e){return this.session.updateTargetFrameRate(e)},e.prototype.runInXRFrame=function(e,t){void 0===t&&(t=!0),this.inXRFrameLoop?e():!this.inXRSession&&t||this.onXRFrameObservable.addOnce(e)},Object.defineProperty(e.prototype,"isFixedFoveationSupported",{get:function(){var e;return(null===(e=this._baseLayerWrapper)||void 0===e?void 0:e.isFixedFoveationSupported)||!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fixedFoveation",{get:function(){var e;return(null===(e=this._baseLayerWrapper)||void 0===e?void 0:e.fixedFoveation)||null},set:function(e){var t=Math.max(0,Math.min(1,e||0));this._baseLayerWrapper&&(this._baseLayerWrapper.fixedFoveation=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabledFeatures",{get:function(){var e,t;return null!==(t=null===(e=this.session)||void 0===e?void 0:e.enabledFeatures)&&void 0!==t?t:null},enumerable:!1,configurable:!0}),e}();!function(e){e[e.ENTERING_XR=0]="ENTERING_XR",e[e.EXITING_XR=1]="EXITING_XR",e[e.IN_XR=2]="IN_XR",e[e.NOT_IN_XR=3]="NOT_IN_XR"}(_l||(_l={})),function(e){e[e.NOT_TRACKING=0]="NOT_TRACKING",e[e.TRACKING_LOST=1]="TRACKING_LOST",e[e.TRACKING=2]="TRACKING"}(gl||(gl={})),no._GroundMeshParser=function(e,t){return Rl.Parse(e,t)};var Rl=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.generateOctree=!1,i}return H(t,e),t.prototype.getClassName=function(){return"GroundMesh"},Object.defineProperty(t.prototype,"subdivisions",{get:function(){return Math.min(this._subdivisionsX,this._subdivisionsY)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subdivisionsX",{get:function(){return this._subdivisionsX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subdivisionsY",{get:function(){return this._subdivisionsY},enumerable:!1,configurable:!0}),t.prototype.optimize=function(e,t){void 0===t&&(t=32),this._subdivisionsX=e,this._subdivisionsY=e,this.subdivide(e),this.createOrUpdateSubmeshesOctree&&this.createOrUpdateSubmeshesOctree(t)},t.prototype.getHeightAtCoordinates=function(e,t){var n=this.getWorldMatrix(),i=w.Matrix[5];n.invertToRef(i);var r=w.Vector3[8];if(C.TransformCoordinatesFromFloatsToRef(e,0,t,i,r),e=r.x,t=r.z,e=this._maxX||t<=this._minZ||t>this._maxZ)return this.position.y;this._heightQuads&&0!=this._heightQuads.length||(this._initHeightQuads(),this._computeHeightQuads());var o=this._getFacetAt(e,t),a=-(o.x*e+o.z*t+o.w)/o.y;return C.TransformCoordinatesFromFloatsToRef(0,a,0,n,r),r.y},t.prototype.getNormalAtCoordinates=function(e,t){var n=new C(0,1,0);return this.getNormalAtCoordinatesToRef(e,t,n),n},t.prototype.getNormalAtCoordinatesToRef=function(e,t,n){var i=this.getWorldMatrix(),r=w.Matrix[5];i.invertToRef(r);var o=w.Vector3[8];if(C.TransformCoordinatesFromFloatsToRef(e,0,t,r,o),e=o.x,t=o.z,ethis._maxX||tthis._maxZ)return this;this._heightQuads&&0!=this._heightQuads.length||(this._initHeightQuads(),this._computeHeightQuads());var a=this._getFacetAt(e,t);return C.TransformNormalFromFloatsToRef(a.x,a.y,a.z,i,n),this},t.prototype.updateCoordinateHeights=function(){return this._heightQuads&&0!=this._heightQuads.length||this._initHeightQuads(),this._computeHeightQuads(),this},t.prototype._getFacetAt=function(e,t){var n=Math.floor((e+this._maxX)*this._subdivisionsX/this._width),i=Math.floor(-(t+this._maxZ)*this._subdivisionsY/this._height+this._subdivisionsY),r=this._heightQuads[i*this._subdivisionsX+n];return te.maxHeight){l=!0;var u=e.maxHeight;e.maxHeight=e.minHeight,e.minHeight=u}for(t=0;t<=e.subdivisions;t++)for(n=0;n<=e.subdivisions;n++){var h=new C(n*e.width/e.subdivisions-e.width/2,0,(e.subdivisions-t)*e.height/e.subdivisions-e.height/2),d=4*(((h.x+e.width/2)/e.width*(e.bufferWidth-1)|0)+((1-(h.z+e.height/2)/e.height)*(e.bufferHeight-1)|0)*e.bufferWidth),p=e.buffer[d]/255,f=e.buffer[d+1]/255,_=e.buffer[d+2]/255,g=e.buffer[d+3]/255;l&&(p=1-p,f=1-f,_=1-_);var y=p*s.r+f*s.g+_*s.b;h.y=g>=c?e.minHeight+(e.maxHeight-e.minHeight)*y:e.minHeight-m,r.push(h.x,h.y,h.z),o.push(0,0,0),a.push(n/e.subdivisions,1-t/e.subdivisions)}for(t=0;t=e.minHeight,x=r[3*b+1]>=e.minHeight,S=r[3*T+1]>=e.minHeight;A&&x&&S&&(i.push(v),i.push(b),i.push(T)),r[3*E+1]>=e.minHeight&&A&&S&&(i.push(E),i.push(v),i.push(T))}Cr.ComputeNormals(r,i,o);var P=new Cr;return P.indices=i,P.positions=r,P.normals=o,P.uvs=a,P}function Dl(e,t,n){void 0===t&&(t={});var i=new Rl(e,n);return i._setReady(!1),i._subdivisionsX=t.subdivisionsX||t.subdivisions||1,i._subdivisionsY=t.subdivisionsY||t.subdivisions||1,i._width=t.width||1,i._height=t.height||1,i._maxX=i._width/2,i._maxZ=i._height/2,i._minX=-i._maxX,i._minZ=-i._maxZ,Ol(t).applyToMesh(i,t.updatable),i._setReady(!0),i}function Nl(e,t,n){void 0===n&&(n=null);var i=new no(e,n);return wl(t).applyToMesh(i,t.updatable),i}function Ll(e,t,n,i){void 0===n&&(n={}),void 0===i&&(i=null);var r=n.width||10,o=n.height||10,a=n.subdivisions||1,s=n.minHeight||0,c=n.maxHeight||1,l=n.colorFilter||new B(.3,.59,.11),u=n.alphaFilter||0,h=n.updatable,d=n.onReady;i=i||A.LastCreatedScene;var p=new Rl(e,i);p._subdivisionsX=a,p._subdivisionsY=a,p._width=r,p._height=o,p._maxX=p._width/2,p._maxZ=p._height/2,p._minX=-p._maxX,p._minZ=-p._maxZ,p._setReady(!1);var f=function(e,t,n){Ml({width:r,height:o,subdivisions:a,minHeight:s,maxHeight:c,colorFilter:l,buffer:e,bufferWidth:t,bufferHeight:n,alphaFilter:u}).applyToMesh(p,h),d&&d(p),p._setReady(!0)};return"string"==typeof t?Pn.LoadImage(t,(function(e){var t=e.width,n=e.height;if(!i.isDisposed){var r=null==i?void 0:i.getEngine().resizeImageBitmap(e,t,n);f(r,t,n)}}),n.onError?n.onError:function(){},i.offlineProvider):f(t.data,t.width,t.height),p}var Fl={CreateGround:Dl,CreateGroundFromHeightMap:Ll,CreateTiledGround:Nl};function Bl(e){for(var t=[],n=[],i=[],r=[],o=e.diameter||1,a=e.thickness||.5,s=0|(e.tessellation||16),c=0===e.sideOrientation?0:e.sideOrientation||Cr.DEFAULTSIDE,l=s+1,u=0;u<=s;u++)for(var h=u/s,d=u*Math.PI*2/s-Math.PI/2,p=R.Translation(o/2,0,0).multiply(R.RotationY(d)),f=0;f<=s;f++){var m=1-f/s,_=f*Math.PI*2/s+Math.PI,g=Math.cos(_),y=Math.sin(_),v=new C(g,y,0),b=v.scale(a/2),T=new S(h,m);b=C.TransformCoordinates(b,p),v=C.TransformNormal(v,p),n.push(b.x,b.y,b.z),i.push(v.x,v.y,v.z),r.push(T.x,Ir.UseOpenGLOrientationForUV?1-T.y:T.y);var E=(u+1)%l,A=(f+1)%l;t.push(u*l+f),t.push(u*l+A),t.push(E*l+f),t.push(u*l+A),t.push(E*l+A),t.push(E*l+f)}Cr._ComputeSides(c,n,t,i,r,e.frontUVs,e.backUVs);var x=new Cr;return x.indices=t,x.positions=n,x.normals=i,x.uvs=r,x}function Ul(e,t,n){void 0===t&&(t={});var i=new no(e,n);return t.sideOrientation=no._GetDefaultSideOrientation(t.sideOrientation),i._originalBuilderSideOrientation=t.sideOrientation,Bl(t).applyToMesh(i,t.updatable),i}Cr.CreateGround=Ol,Cr.CreateTiledGround=wl,Cr.CreateGroundFromHeightMap=Ml,no.CreateGround=function(e,t,n,i,r,o){return Dl(e,{width:t,height:n,subdivisions:i,updatable:o},r)},no.CreateTiledGround=function(e,t,n,i,r,o,a,s,c){return Nl(e,{xmin:t,zmin:n,xmax:i,zmax:r,subdivisions:o,precision:a,updatable:c},s)},no.CreateGroundFromHeightMap=function(e,t,n,i,r,o,a,s,c,l,u){return Ll(e,t,{width:n,height:i,subdivisions:r,minHeight:o,maxHeight:a,updatable:c,onReady:l,alphaFilter:u},s)};var kl={CreateTorus:Ul};Cr.CreateTorus=Bl,no.CreateTorus=function(e,t,n,i,r,o,a){return Ul(e,{diameter:t,thickness:n,tessellation:i,sideOrientation:a,updatable:o},r)};var Vl,zl=function(e){function t(t,n){var i=e.call(this,n)||this;return i._getCamera=t,i}return H(t,e),t.prototype._getForwardRay=function(e){var t=this._getCamera();return t?t.getForwardRay(e):new No(C.Zero(),C.Forward())},t}(function(){function e(t,n){if(void 0===n&&(n=null),this.scene=t,this._pointerDownOnMeshAsked=!1,this._isActionableMesh=!1,this._teleportationRequestInitiated=!1,this._teleportationBackRequestInitiated=!1,this._rotationRightAsked=!1,this._rotationLeftAsked=!1,this._dpadPressed=!0,this._activePointer=!1,this._id=e._IdCounter++,n)this._gazeTracker=n.clone("gazeTracker");else{this._gazeTracker=Ul("gazeTracker",{diameter:.0035,thickness:.0025,tessellation:20,updatable:!1},t),this._gazeTracker.bakeCurrentTransformIntoVertices(),this._gazeTracker.isPickable=!1,this._gazeTracker.isVisible=!1;var i=new ml("targetMat",t);i.specularColor=B.Black(),i.emissiveColor=new B(.7,.7,.7),i.backFaceCulling=!1,this._gazeTracker.material=i}}return e.prototype._getForwardRay=function(e){return new No(C.Zero(),new C(0,0,e))},e.prototype._selectionPointerDown=function(){this._pointerDownOnMeshAsked=!0,this._currentHit&&this.scene.simulatePointerDown(this._currentHit,{pointerId:this._id})},e.prototype._selectionPointerUp=function(){this._currentHit&&this.scene.simulatePointerUp(this._currentHit,{pointerId:this._id}),this._pointerDownOnMeshAsked=!1},e.prototype._activatePointer=function(){this._activePointer=!0},e.prototype._deactivatePointer=function(){this._activePointer=!1},e.prototype._updatePointerDistance=function(e){void 0===e&&(e=100)},e.prototype.dispose=function(){this._interactionsEnabled=!1,this._teleportationEnabled=!1,this._gazeTracker&&this._gazeTracker.dispose()},e._IdCounter=0,e}()),Gl=function(){},Hl=function(){function e(t,n){void 0===n&&(n={});var i=this;if(this.webVROptions=n,this._fullscreenVRpresenting=!1,this.enableGazeEvenWhenNoPointerLock=!1,this.exitVROnDoubleTap=!0,this.onEnteringVRObservable=new u,this.onAfterEnteringVRObservable=new u,this.onExitingVRObservable=new u,this._useCustomVRButton=!1,this._teleportActive=!1,this._floorMeshesCollection=[],this._teleportationMode=e.TELEPORTATIONMODE_CONSTANTTIME,this._teleportationTime=122,this._teleportationSpeed=20,this._rotationAllowed=!0,this._teleportBackwardsVector=new C(0,-1,-1),this._isDefaultTeleportationTarget=!0,this._teleportationFillColor="#444444",this._teleportationBorderColor="#FFFFFF",this._rotationAngle=0,this._haloCenter=new C(0,0,0),this._padSensibilityUp=.65,this._padSensibilityDown=.35,this._pickedLaserColor=new B(.2,.2,1),this._pickedGazeColor=new B(0,0,1),this.onNewMeshSelected=new u,this.onNewMeshPicked=new u,this.onBeforeCameraTeleport=new u,this.onAfterCameraTeleport=new u,this.onSelectedMeshUnselected=new u,this.teleportationEnabled=!0,this._teleportationInitialized=!1,this._interactionsEnabled=!1,this._displayGaze=!0,this._displayLaserPointer=!0,this.updateGazeTrackerScale=!0,this.updateGazeTrackerColor=!0,this.updateControllerLaserColor=!0,this.requestPointerLockOnFullScreen=!0,this.xrTestDone=!1,this._onResize=function(){i._moveButtonToBottomRight()},this._onFullscreenChange=function(){i._fullscreenVRpresenting=!!document.fullscreenElement,!i._fullscreenVRpresenting&&i._inputElement&&(i.exitVR(),!i._useCustomVRButton&&i._btnVR&&(i._btnVR.style.top=i._inputElement.offsetTop+i._inputElement.offsetHeight-70+"px",i._btnVR.style.left=i._inputElement.offsetLeft+i._inputElement.offsetWidth-100+"px",i._updateButtonVisibility()))},this._cachedAngularSensibility={angularSensibilityX:null,angularSensibilityY:null,angularSensibility:null},this._beforeRender=function(){i._scene.getEngine().isPointerLock||i.enableGazeEvenWhenNoPointerLock||(i._cameraGazer._gazeTracker.isVisible=!1)},this._onNewGamepadConnected=function(e){e.type!==Bs.POSE_ENABLED&&(e.leftStick&&e.onleftstickchanged((function(e){i._teleportationInitialized&&i.teleportationEnabled&&(i._checkTeleportWithRay(e,i._cameraGazer),i._checkTeleportBackwards(e,i._cameraGazer))})),e.rightStick&&e.onrightstickchanged((function(e){i._teleportationInitialized&&i._checkRotate(e,i._cameraGazer)})),e.type===Bs.XBOX&&(e.onbuttondown((function(e){i._interactionsEnabled&&e===mc.A&&i._cameraGazer._selectionPointerDown()})),e.onbuttonup((function(e){i._interactionsEnabled&&e===mc.A&&i._cameraGazer._selectionPointerUp()}))))},this._workingVector=C.Zero(),this._workingQuaternion=I.Identity(),this._workingMatrix=R.Identity(),J.Warn("WebVR is deprecated. Please avoid using this experience helper and use the WebXR experience helper instead"),this._scene=t,this._inputElement=t.getEngine().getInputElement(),"getVRDisplays"in navigator||void 0!==n.useXR||(n.useXR=!0),void 0===n.createFallbackVRDeviceOrientationFreeCamera&&(n.createFallbackVRDeviceOrientationFreeCamera=!0),void 0===n.createDeviceOrientationCamera&&(n.createDeviceOrientationCamera=!0),void 0===n.laserToggle&&(n.laserToggle=!0),this._hasEnteredVR=!1,this._scene.activeCamera?this._position=this._scene.activeCamera.position.clone():this._position=new C(0,this._defaultHeight,0),n.createDeviceOrientationCamera||!this._scene.activeCamera){if(this._deviceOrientationCamera=new hc("deviceOrientationVRHelper",this._position.clone(),t),this._scene.activeCamera&&(this._deviceOrientationCamera.minZ=this._scene.activeCamera.minZ,this._deviceOrientationCamera.maxZ=this._scene.activeCamera.maxZ,this._scene.activeCamera instanceof sc&&this._scene.activeCamera.rotation)){var r=this._scene.activeCamera;r.rotationQuaternion?this._deviceOrientationCamera.rotationQuaternion.copyFrom(r.rotationQuaternion):this._deviceOrientationCamera.rotationQuaternion.copyFrom(I.RotationYawPitchRoll(r.rotation.y,r.rotation.x,r.rotation.z)),this._deviceOrientationCamera.rotation=r.rotation.clone()}this._scene.activeCamera=this._deviceOrientationCamera,this._inputElement&&this._scene.activeCamera.attachControl()}else this._existingCamera=this._scene.activeCamera;this.webVROptions.useXR&&navigator.xr?Il.IsSessionSupportedAsync("immersive-vr").then((function(e){e?(J.Log("Using WebXR. It is recommended to use the WebXRDefaultExperience directly"),t.createDefaultXRExperienceAsync({floorMeshes:n.floorMeshes||[]}).then((function(e){i.xr=e,i.xrTestDone=!0,i._cameraGazer=new zl((function(){return i.xr.baseExperience.camera}),t),i.xr.baseExperience.onStateChangedObservable.add((function(e){switch(e){case _l.ENTERING_XR:i.onEnteringVRObservable.notifyObservers(i),i._interactionsEnabled||i.xr.pointerSelection.detach(),i.xr.pointerSelection.displayLaserPointer=i._displayLaserPointer;break;case _l.EXITING_XR:i.onExitingVRObservable.notifyObservers(i),i._scene.getEngine().resize();break;case _l.IN_XR:i._hasEnteredVR=!0;break;case _l.NOT_IN_XR:i._hasEnteredVR=!1}}))}))):i._completeVRInit(t,n)})):this._completeVRInit(t,n)}return Object.defineProperty(e.prototype,"onEnteringVR",{get:function(){return this.onEnteringVRObservable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onExitingVR",{get:function(){return this.onExitingVRObservable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"teleportationTarget",{get:function(){return this._teleportationTarget},set:function(e){e&&(e.name="teleportationTarget",this._isDefaultTeleportationTarget=!1,this._teleportationTarget=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gazeTrackerMesh",{get:function(){return this._cameraGazer._gazeTracker},set:function(e){e&&(this._cameraGazer._gazeTracker&&this._cameraGazer._gazeTracker.dispose(),this._cameraGazer._gazeTracker=e,this._cameraGazer._gazeTracker.bakeCurrentTransformIntoVertices(),this._cameraGazer._gazeTracker.isPickable=!1,this._cameraGazer._gazeTracker.isVisible=!1,this._cameraGazer._gazeTracker.name="gazeTracker")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayGaze",{get:function(){return this._displayGaze},set:function(e){this._displayGaze=e,e||(this._cameraGazer._gazeTracker.isVisible=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayLaserPointer",{get:function(){return this._displayLaserPointer},set:function(e){this._displayLaserPointer=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deviceOrientationCamera",{get:function(){return this._deviceOrientationCamera},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentVRCamera",{get:function(){return this._scene.activeCamera},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vrDeviceOrientationCamera",{get:function(){return this._vrDeviceOrientationCamera},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vrButton",{get:function(){return this._btnVR},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_teleportationRequestInitiated",{get:function(){return this._cameraGazer._teleportationRequestInitiated},enumerable:!1,configurable:!0}),e.prototype._completeVRInit=function(e,t){var n=this;if(this.xrTestDone=!0,t.createFallbackVRDeviceOrientationFreeCamera&&(this._vrDeviceOrientationCamera=new $c("VRDeviceOrientationVRHelper",this._position,this._scene,!0,t.vrDeviceOrientationCameraMetrics),this._vrDeviceOrientationCamera.angularSensibility=Number.MAX_VALUE),this._cameraGazer=new zl((function(){return n.currentVRCamera}),e),!this._useCustomVRButton){this._btnVR=document.createElement("BUTTON"),this._btnVR.className="babylonVRicon",this._btnVR.id="babylonVRiconbtn",this._btnVR.title="Click to switch to VR";var i=".babylonVRicon { position: absolute; right: 20px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-image: url("+(window.SVGSVGElement?"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%222048%22%20height%3D%221152%22%20viewBox%3D%220%200%202048%201152%22%20version%3D%221.1%22%3E%3Cpath%20transform%3D%22rotate%28180%201024%2C576.0000000000001%29%22%20d%3D%22m1109%2C896q17%2C0%2030%2C-12t13%2C-30t-12.5%2C-30.5t-30.5%2C-12.5l-170%2C0q-18%2C0%20-30.5%2C12.5t-12.5%2C30.5t13%2C30t30%2C12l170%2C0zm-85%2C256q59%2C0%20132.5%2C-1.5t154.5%2C-5.5t164.5%2C-11.5t163%2C-20t150%2C-30t124.5%2C-41.5q23%2C-11%2042%2C-24t38%2C-30q27%2C-25%2041%2C-61.5t14%2C-72.5l0%2C-257q0%2C-123%20-47%2C-232t-128%2C-190t-190%2C-128t-232%2C-47l-81%2C0q-37%2C0%20-68.5%2C14t-60.5%2C34.5t-55.5%2C45t-53%2C45t-53%2C34.5t-55.5%2C14t-55.5%2C-14t-53%2C-34.5t-53%2C-45t-55.5%2C-45t-60.5%2C-34.5t-68.5%2C-14l-81%2C0q-123%2C0%20-232%2C47t-190%2C128t-128%2C190t-47%2C232l0%2C257q0%2C68%2038%2C115t97%2C73q54%2C24%20124.5%2C41.5t150%2C30t163%2C20t164.5%2C11.5t154.5%2C5.5t132.5%2C1.5zm939%2C-298q0%2C39%20-24.5%2C67t-58.5%2C42q-54%2C23%20-122%2C39.5t-143.5%2C28t-155.5%2C19t-157%2C11t-148.5%2C5t-129.5%2C1.5q-59%2C0%20-130%2C-1.5t-148%2C-5t-157%2C-11t-155.5%2C-19t-143.5%2C-28t-122%2C-39.5q-34%2C-14%20-58.5%2C-42t-24.5%2C-67l0%2C-257q0%2C-106%2040.5%2C-199t110%2C-162.5t162.5%2C-109.5t199%2C-40l81%2C0q27%2C0%2052%2C14t50%2C34.5t51%2C44.5t55.5%2C44.5t63.5%2C34.5t74%2C14t74%2C-14t63.5%2C-34.5t55.5%2C-44.5t51%2C-44.5t50%2C-34.5t52%2C-14l14%2C0q37%2C0%2070%2C0.5t64.5%2C4.5t63.5%2C12t68%2C23q71%2C30%20128.5%2C78.5t98.5%2C110t63.5%2C133.5t22.5%2C149l0%2C257z%22%20fill%3D%22white%22%20/%3E%3C/svg%3E%0A":"https://cdn.babylonjs.com/Assets/vrButton.png")+"); background-size: 80%; background-repeat:no-repeat; background-position: center; border: none; outline: none; transition: transform 0.125s ease-out } .babylonVRicon:hover { transform: scale(1.05) } .babylonVRicon:active {background-color: rgba(51,51,51,1) } .babylonVRicon:focus {background-color: rgba(51,51,51,1) }";i+=".babylonVRicon.vrdisplaypresenting { display: none; }";var r=document.createElement("style");r.appendChild(document.createTextNode(i)),document.getElementsByTagName("head")[0].appendChild(r),this._moveButtonToBottomRight()}this._btnVR&&this._btnVR.addEventListener("click",(function(){n.isInVRMode||n.enterVR()}));var o=this._scene.getEngine().getHostWindow();o&&(o.addEventListener("resize",this._onResize),document.addEventListener("fullscreenchange",this._onFullscreenChange,!1),t.createFallbackVRDeviceOrientationFreeCamera&&this._displayVRButton(),this._onKeyDown=function(e){27===e.keyCode&&n.isInVRMode&&n.exitVR()},document.addEventListener("keydown",this._onKeyDown),this._scene.onPrePointerObservable.add((function(){n._hasEnteredVR&&n.exitVROnDoubleTap&&(n.exitVR(),n._fullscreenVRpresenting&&n._scene.getEngine().exitFullscreen())}),ti.POINTERDOUBLETAP,!1),e.onDisposeObservable.add((function(){n.dispose()})),this._updateButtonVisibility(),this._circleEase=new zi,this._circleEase.setEasingMode(Vi.EASINGMODE_EASEINOUT),this._teleportationEasing=this._circleEase,e.onPointerObservable.add((function(t){n._interactionsEnabled&&e.activeCamera===n.vrDeviceOrientationCamera&&"mouse"===t.event.pointerType&&(t.type===ti.POINTERDOWN?n._cameraGazer._selectionPointerDown():t.type===ti.POINTERUP&&n._cameraGazer._selectionPointerUp())})),this.webVROptions.floorMeshes&&this.enableTeleportation({floorMeshes:this.webVROptions.floorMeshes}))},Object.defineProperty(e.prototype,"isInVRMode",{get:function(){return this.xr&&this.webVROptions.useXR&&this.xr.baseExperience.state===_l.IN_XR||this._fullscreenVRpresenting},enumerable:!1,configurable:!0}),e.prototype._moveButtonToBottomRight=function(){if(this._inputElement&&!this._useCustomVRButton&&this._btnVR){var e=this._inputElement.getBoundingClientRect();this._btnVR.style.top=e.top+e.height-70+"px",this._btnVR.style.left=e.left+e.width-100+"px"}},e.prototype._displayVRButton=function(){this._useCustomVRButton||this._btnVRDisplayed||!this._btnVR||(document.body.appendChild(this._btnVR),this._btnVRDisplayed=!0)},e.prototype._updateButtonVisibility=function(){this._btnVR&&!this._useCustomVRButton&&(this._btnVR.className="babylonVRicon",this.isInVRMode&&(this._btnVR.className+=" vrdisplaypresenting"))},e.prototype.enterVR=function(){var e=this;if(this.xr)this.xr.baseExperience.enterXRAsync("immersive-vr","local-floor",this.xr.renderTarget);else{if(this.onEnteringVRObservable)try{this.onEnteringVRObservable.notifyObservers(this)}catch(e){J.Warn("Error in your custom logic onEnteringVR: "+e)}this._scene.activeCamera&&(this._position=this._scene.activeCamera.position.clone(),this.vrDeviceOrientationCamera&&(this.vrDeviceOrientationCamera.rotation=I.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles(),this.vrDeviceOrientationCamera.angularSensibility=2e3),this._existingCamera=this._scene.activeCamera,this._existingCamera.angularSensibilityX&&(this._cachedAngularSensibility.angularSensibilityX=this._existingCamera.angularSensibilityX,this._existingCamera.angularSensibilityX=Number.MAX_VALUE),this._existingCamera.angularSensibilityY&&(this._cachedAngularSensibility.angularSensibilityY=this._existingCamera.angularSensibilityY,this._existingCamera.angularSensibilityY=Number.MAX_VALUE),this._existingCamera.angularSensibility&&(this._cachedAngularSensibility.angularSensibility=this._existingCamera.angularSensibility,this._existingCamera.angularSensibility=Number.MAX_VALUE)),this._vrDeviceOrientationCamera&&(this._vrDeviceOrientationCamera.position=this._position,this._scene.activeCamera&&(this._vrDeviceOrientationCamera.minZ=this._scene.activeCamera.minZ),this._scene.activeCamera=this._vrDeviceOrientationCamera,this._scene.getEngine().enterFullscreen(this.requestPointerLockOnFullScreen),this._updateButtonVisibility(),this._vrDeviceOrientationCamera.onViewMatrixChangedObservable.addOnce((function(){e.onAfterEnteringVRObservable.notifyObservers({success:!0})}))),this._scene.activeCamera&&this._inputElement&&this._scene.activeCamera.attachControl(),this._interactionsEnabled&&this._scene.registerBeforeRender(this._beforeRender),this._hasEnteredVR=!0}},e.prototype.exitVR=function(){if(this.xr)this.xr.baseExperience.exitXRAsync();else if(this._hasEnteredVR){if(this.onExitingVRObservable)try{this.onExitingVRObservable.notifyObservers(this)}catch(e){J.Warn("Error in your custom logic onExitingVR: "+e)}this._scene.activeCamera&&(this._position=this._scene.activeCamera.position.clone()),this.vrDeviceOrientationCamera&&(this.vrDeviceOrientationCamera.angularSensibility=Number.MAX_VALUE),this._deviceOrientationCamera?(this._deviceOrientationCamera.position=this._position,this._scene.activeCamera=this._deviceOrientationCamera,this._cachedAngularSensibility.angularSensibilityX&&(this._deviceOrientationCamera.angularSensibilityX=this._cachedAngularSensibility.angularSensibilityX,this._cachedAngularSensibility.angularSensibilityX=null),this._cachedAngularSensibility.angularSensibilityY&&(this._deviceOrientationCamera.angularSensibilityY=this._cachedAngularSensibility.angularSensibilityY,this._cachedAngularSensibility.angularSensibilityY=null),this._cachedAngularSensibility.angularSensibility&&(this._deviceOrientationCamera.angularSensibility=this._cachedAngularSensibility.angularSensibility,this._cachedAngularSensibility.angularSensibility=null)):this._existingCamera&&(this._existingCamera.position=this._position,this._scene.activeCamera=this._existingCamera,this._inputElement&&this._scene.activeCamera.attachControl(),this._cachedAngularSensibility.angularSensibilityX&&(this._existingCamera.angularSensibilityX=this._cachedAngularSensibility.angularSensibilityX,this._cachedAngularSensibility.angularSensibilityX=null),this._cachedAngularSensibility.angularSensibilityY&&(this._existingCamera.angularSensibilityY=this._cachedAngularSensibility.angularSensibilityY,this._cachedAngularSensibility.angularSensibilityY=null),this._cachedAngularSensibility.angularSensibility&&(this._existingCamera.angularSensibility=this._cachedAngularSensibility.angularSensibility,this._cachedAngularSensibility.angularSensibility=null)),this._updateButtonVisibility(),this._interactionsEnabled&&(this._scene.unregisterBeforeRender(this._beforeRender),this._cameraGazer._gazeTracker.isVisible=!1),this._scene.getEngine().resize(),this._hasEnteredVR=!1}},Object.defineProperty(e.prototype,"position",{get:function(){return this._position},set:function(e){this._position=e,this._scene.activeCamera&&(this._scene.activeCamera.position=e)},enumerable:!1,configurable:!0}),e.prototype.enableInteractions=function(){var e=this;if(!this._interactionsEnabled){if(this.xr)return void(this.xr.baseExperience.state===_l.IN_XR&&this.xr.pointerSelection.attach());this.raySelectionPredicate=function(t){return t.isVisible&&(t.isPickable||t.name===e._floorMeshName)},this.meshSelectionPredicate=function(){return!0},this._raySelectionPredicate=function(t){return!!(e._isTeleportationFloor(t)||-1===t.name.indexOf("gazeTracker")&&-1===t.name.indexOf("teleportationTarget")&&-1===t.name.indexOf("torusTeleportation"))&&e.raySelectionPredicate(t)},this._interactionsEnabled=!0}},e.prototype._isTeleportationFloor=function(e){for(var t=0;t-1||this._floorMeshesCollection.push(e))},e.prototype.removeFloorMesh=function(e){if(this._floorMeshesCollection){var t=this._floorMeshesCollection.indexOf(e);-1!==t&&this._floorMeshesCollection.splice(t,1)}},e.prototype.enableTeleportation=function(e){var t=this;if(void 0===e&&(e={}),!this._teleportationInitialized){if(this.enableInteractions(),this.webVROptions.useXR&&(e.floorMeshes||e.floorMeshName)){var n=e.floorMeshes||[];if(!n.length){var i=this._scene.getMeshByName(e.floorMeshName);i&&n.push(i)}if(this.xr)return n.forEach((function(e){t.xr.teleportation.addFloorMesh(e)})),void(this.xr.teleportation.attached||this.xr.teleportation.attach());if(!this.xrTestDone){var r=function(){t.xrTestDone&&(t._scene.unregisterBeforeRender(r),t.xr?t.xr.teleportation.attached||t.xr.teleportation.attach():t.enableTeleportation(e))};return void this._scene.registerBeforeRender(r)}}e.floorMeshName&&(this._floorMeshName=e.floorMeshName),e.floorMeshes&&(this._floorMeshesCollection=e.floorMeshes),e.teleportationMode&&(this._teleportationMode=e.teleportationMode),e.teleportationTime&&e.teleportationTime>0&&(this._teleportationTime=e.teleportationTime),e.teleportationSpeed&&e.teleportationSpeed>0&&(this._teleportationSpeed=e.teleportationSpeed),void 0!==e.easingFunction&&(this._teleportationEasing=e.easingFunction);var o=new Fn;o.vignetteColor=new U(0,0,0,0),o.vignetteEnabled=!0,this._teleportationInitialized=!0,this._isDefaultTeleportationTarget&&this._createTeleportationCircles()}},e.prototype._checkTeleportWithRay=function(e,t){this._teleportationRequestInitiated&&!t._teleportationRequestInitiated||(t._teleportationRequestInitiated?Math.sqrt(e.y*e.y+e.x*e.x)-this._padSensibilityDown&&(t._rotationLeftAsked=!1):e.x<-this._padSensibilityUp&&t._dpadPressed&&(t._rotationLeftAsked=!0,this._rotationAllowed&&this._rotateCamera(!1)),t._rotationRightAsked?e.xthis._padSensibilityUp&&t._dpadPressed&&(t._rotationRightAsked=!0,this._rotationAllowed&&this._rotateCamera(!0)))},e.prototype._checkTeleportBackwards=function(e,t){if(!t._teleportationRequestInitiated)if(e.y>this._padSensibilityUp&&t._dpadPressed){if(!t._teleportationBackRequestInitiated){if(!this.currentVRCamera)return;var n=I.FromRotationMatrix(this.currentVRCamera.getWorldMatrix().getRotationMatrix()),i=this.currentVRCamera.position;n.toEulerAnglesToRef(this._workingVector),this._workingVector.z=0,this._workingVector.x=0,I.RotationYawPitchRollToRef(this._workingVector.y,this._workingVector.x,this._workingVector.z,this._workingQuaternion),this._workingQuaternion.toRotationMatrix(this._workingMatrix),C.TransformCoordinatesToRef(this._teleportBackwardsVector,this._workingMatrix,this._workingVector);var r=new No(i,this._workingVector),o=this._scene.pickWithRay(r,this._raySelectionPredicate);o&&o.pickedPoint&&o.pickedMesh&&this._isTeleportationFloor(o.pickedMesh)&&o.distance<5&&this.teleportCamera(o.pickedPoint),t._teleportationBackRequestInitiated=!0}}else t._teleportationBackRequestInitiated=!1},e.prototype._createTeleportationCircles=function(){this._teleportationTarget=Dl("teleportationTarget",{width:2,height:2,subdivisions:2},this._scene),this._teleportationTarget.isPickable=!1;var e=new yl("DynamicTexture",512,this._scene,!0);e.hasAlpha=!0;var t=e.getContext();t.beginPath(),t.arc(256,256,200,0,2*Math.PI,!1),t.fillStyle=this._teleportationFillColor,t.fill(),t.lineWidth=10,t.strokeStyle=this._teleportationBorderColor,t.stroke(),t.closePath(),e.update();var n=new ml("TextPlaneMaterial",this._scene);n.diffuseTexture=e,this._teleportationTarget.material=n;var i=Ul("torusTeleportation",{diameter:.75,thickness:.1,tessellation:25,updatable:!1},this._scene);i.isPickable=!1,i.parent=this._teleportationTarget;var r=new Je("animationInnerCircle","position.y",30,Je.ANIMATIONTYPE_FLOAT,Je.ANIMATIONLOOPMODE_CYCLE),o=[];o.push({frame:0,value:0}),o.push({frame:30,value:.4}),o.push({frame:60,value:0}),r.setKeys(o);var a=new Zi;a.setEasingMode(Vi.EASINGMODE_EASEINOUT),r.setEasingFunction(a),i.animations=[],i.animations.push(r),this._scene.beginAnimation(i,0,60,!0),this._hideTeleportationTarget()},e.prototype._hideTeleportationTarget=function(){this._teleportActive=!1,this._teleportationInitialized&&(this._teleportationTarget.isVisible=!1,this._isDefaultTeleportationTarget&&(this._teleportationTarget.getChildren()[0].isVisible=!1))},e.prototype._rotateCamera=function(e){if(this.currentVRCamera instanceof cc){e?this._rotationAngle++:this._rotationAngle--,this.currentVRCamera.animations=[];var t=I.FromRotationMatrix(R.RotationY(Math.PI/4*this._rotationAngle)),n=new Je("animationRotation","rotationQuaternion",90,Je.ANIMATIONTYPE_QUATERNION,Je.ANIMATIONLOOPMODE_CONSTANT),i=[];i.push({frame:0,value:this.currentVRCamera.rotationQuaternion}),i.push({frame:6,value:t}),n.setKeys(i),n.setEasingFunction(this._circleEase),this.currentVRCamera.animations.push(n),this._postProcessMove.animations=[];var r=new Je("animationPP","vignetteWeight",90,Je.ANIMATIONTYPE_FLOAT,Je.ANIMATIONLOOPMODE_CONSTANT),o=[];o.push({frame:0,value:0}),o.push({frame:3,value:4}),o.push({frame:6,value:0}),r.setKeys(o),r.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(r);var a=new Je("animationPP2","vignetteStretch",90,Je.ANIMATIONTYPE_FLOAT,Je.ANIMATIONLOOPMODE_CONSTANT),s=[];s.push({frame:0,value:0}),s.push({frame:3,value:10}),s.push({frame:6,value:0}),a.setKeys(s),a.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(a),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._postProcessMove.samples=4,this._scene.beginAnimation(this.currentVRCamera,0,6,!1,1)}},e.prototype.teleportCamera=function(t){var n=this;if(this.currentVRCamera instanceof cc){var i,r;if(this._workingVector.copyFrom(t),this.isInVRMode||(this._workingVector.y+=this._defaultHeight),this.onBeforeCameraTeleport.notifyObservers(this._workingVector),this._teleportationMode==e.TELEPORTATIONMODE_CONSTANTSPEED){r=90;var o=C.Distance(this.currentVRCamera.position,this._workingVector);i=this._teleportationSpeed/o}else r=Math.round(90*this._teleportationTime/1e3),i=1;this.currentVRCamera.animations=[];var a=new Je("animationCameraTeleportation","position",90,Je.ANIMATIONTYPE_VECTOR3,Je.ANIMATIONLOOPMODE_CONSTANT),s=[{frame:0,value:this.currentVRCamera.position},{frame:r,value:this._workingVector}];a.setKeys(s),a.setEasingFunction(this._teleportationEasing),this.currentVRCamera.animations.push(a),this._postProcessMove.animations=[];var c=Math.round(r/2),l=new Je("animationPP","vignetteWeight",90,Je.ANIMATIONTYPE_FLOAT,Je.ANIMATIONLOOPMODE_CONSTANT),u=[];u.push({frame:0,value:0}),u.push({frame:c,value:8}),u.push({frame:r,value:0}),l.setKeys(u),this._postProcessMove.animations.push(l);var h=new Je("animationPP2","vignetteStretch",90,Je.ANIMATIONTYPE_FLOAT,Je.ANIMATIONLOOPMODE_CONSTANT),d=[];d.push({frame:0,value:0}),d.push({frame:c,value:10}),d.push({frame:r,value:0}),h.setKeys(d),this._postProcessMove.animations.push(h),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._scene.beginAnimation(this.currentVRCamera,0,r,!1,i,(function(){n.onAfterCameraTeleport.notifyObservers(n._workingVector)})),this._hideTeleportationTarget()}},e.prototype.setLaserColor=function(e,t){void 0===t&&(t=this._pickedLaserColor),this._pickedLaserColor=t},e.prototype.setLaserLightingState=function(e){void 0===e&&(e=!0)},e.prototype.setGazeColor=function(e,t){void 0===t&&(t=this._pickedGazeColor),this._pickedGazeColor=t},e.prototype.changeLaserColor=function(e){this.updateControllerLaserColor},e.prototype.changeGazeColor=function(e){this.updateGazeTrackerColor&&this._cameraGazer._gazeTracker.material&&(this._cameraGazer._gazeTracker.material.emissiveColor=e)},e.prototype.dispose=function(){this.isInVRMode&&this.exitVR(),this._postProcessMove&&this._postProcessMove.dispose(),this._vrDeviceOrientationCamera&&this._vrDeviceOrientationCamera.dispose(),!this._useCustomVRButton&&this._btnVR&&this._btnVR.parentNode&&document.body.removeChild(this._btnVR),this._deviceOrientationCamera&&this._scene.activeCamera!=this._deviceOrientationCamera&&this._deviceOrientationCamera.dispose(),this._cameraGazer&&this._cameraGazer.dispose(),this._teleportationTarget&&this._teleportationTarget.dispose(),this.xr&&this.xr.dispose(),this._floorMeshesCollection.length=0,document.removeEventListener("keydown",this._onKeyDown),window.removeEventListener("vrdisplaypresentchange",this._onVrDisplayPresentChangeBind),window.removeEventListener("resize",this._onResize),document.removeEventListener("fullscreenchange",this._onFullscreenChange),this._scene.gamepadManager.onGamepadConnectedObservable.removeCallback(this._onNewGamepadConnected),this._scene.unregisterBeforeRender(this._beforeRender)},e.prototype.getClassName=function(){return"VRExperienceHelper"},e.TELEPORTATIONMODE_CONSTANTTIME=0,e.TELEPORTATIONMODE_CONSTANTSPEED=1,e}(),jl=(Vl={root:0,found:!1},function(e,t,n,i){Vl.root=0,Vl.found=!1;var r=t*t-4*e*n;if(r<0)return Vl;var o=Math.sqrt(r),a=(-t-o)/(2*e),s=(-t+o)/(2*e);if(a>s){var c=s;s=a,a=c}return a>0&&a0&&s=0))},e.prototype._canDoCollision=function(e,t,n,i){var r=C.Distance(this._basePointWorld,e),o=Math.max(this._radius.x,this._radius.y,this._radius.z);return!(r>this._velocityWorldLength+o+t||!function(e,t,n,i){return!(e.x>n.x+i||n.x-i>t.x||e.y>n.y+i||n.y-i>t.y||e.z>n.z+i||n.z-i>t.z)}(n,i,this._basePointWorld,this._velocityWorldLength+o))},e.prototype._testTriangle=function(t,n,i,r,o,a,s){var c,l=!1;n||(n=[]),n[t]||(n[t]=new bi(0,0,0,0),n[t].copyFromPoints(i,r,o));var u=n[t];if(a||u.isFrontFacingTo(this._normalizedVelocity,0)){var h=u.signedDistanceTo(this._basePoint),d=C.Dot(u.normal,this._velocity);if(!(e.DoubleSidedCheck&&d>1e-4)){if(0==d){if(Math.abs(h)>=1)return;l=!0,c=0}else{var p=(1-h)/d;if((c=(-1-h)/d)>p){var f=p;p=c,c=f}if(c>1||p<0)return;c<0&&(c=0),c>1&&(c=1)}this._collisionPoint.copyFromFloats(0,0,0);var m=!1,_=1;if(l||(this._basePoint.subtractToRef(u.normal,this._planeIntersectionPoint),this._velocity.scaleToRef(c,this._tempVector),this._planeIntersectionPoint.addInPlace(this._tempVector),this._checkPointInTriangle(this._planeIntersectionPoint,i,r,o,u.normal)&&(m=!0,_=c,this._collisionPoint.copyFrom(this._planeIntersectionPoint))),!m){var g=this._velocitySquaredLength;this._basePoint.subtractToRef(i,this._tempVector);var y=2*C.Dot(this._velocity,this._tempVector),v=this._tempVector.lengthSquared()-1,b=jl(g,y,v,_);b.found&&(_=b.root,m=!0,this._collisionPoint.copyFrom(i)),this._basePoint.subtractToRef(r,this._tempVector),y=2*C.Dot(this._velocity,this._tempVector),v=this._tempVector.lengthSquared()-1,(b=jl(g,y,v,_)).found&&(_=b.root,m=!0,this._collisionPoint.copyFrom(r)),this._basePoint.subtractToRef(o,this._tempVector),y=2*C.Dot(this._velocity,this._tempVector),v=this._tempVector.lengthSquared()-1,(b=jl(g,y,v,_)).found&&(_=b.root,m=!0,this._collisionPoint.copyFrom(o)),r.subtractToRef(i,this._edge),i.subtractToRef(this._basePoint,this._baseToVertex);var T,E=this._edge.lengthSquared(),A=C.Dot(this._edge,this._velocity),x=C.Dot(this._edge,this._baseToVertex);g=E*-this._velocitySquaredLength+A*A,y=2*(E*C.Dot(this._velocity,this._baseToVertex)-A*x),v=E*(1-this._baseToVertex.lengthSquared())+x*x,(b=jl(g,y,v,_)).found&&(T=(A*b.root-x)/E)>=0&&T<=1&&(_=b.root,m=!0,this._edge.scaleInPlace(T),i.addToRef(this._edge,this._collisionPoint)),o.subtractToRef(r,this._edge),r.subtractToRef(this._basePoint,this._baseToVertex),E=this._edge.lengthSquared(),A=C.Dot(this._edge,this._velocity),x=C.Dot(this._edge,this._baseToVertex),g=E*-this._velocitySquaredLength+A*A,y=2*(E*C.Dot(this._velocity,this._baseToVertex)-A*x),v=E*(1-this._baseToVertex.lengthSquared())+x*x,(b=jl(g,y,v,_)).found&&(T=(A*b.root-x)/E)>=0&&T<=1&&(_=b.root,m=!0,this._edge.scaleInPlace(T),r.addToRef(this._edge,this._collisionPoint)),i.subtractToRef(o,this._edge),o.subtractToRef(this._basePoint,this._baseToVertex),E=this._edge.lengthSquared(),A=C.Dot(this._edge,this._velocity),x=C.Dot(this._edge,this._baseToVertex),g=E*-this._velocitySquaredLength+A*A,y=2*(E*C.Dot(this._velocity,this._baseToVertex)-A*x),v=E*(1-this._baseToVertex.lengthSquared())+x*x,(b=jl(g,y,v,_)).found&&(T=(A*b.root-x)/E)>=0&&T<=1&&(_=b.root,m=!0,this._edge.scaleInPlace(T),o.addToRef(this._edge,this._collisionPoint))}if(m){var S=_*_*this._velocitySquaredLength;(!this.collisionFound||S=i)r.copyFrom(e);else{var s=o?o.collisionMask:n.collisionMask;n._initialize(e,t,a);for(var c=o&&o.surroundingMeshes||this._scene.meshes,l=0;l-1?e:this._shaderRepository+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",i)):i(window.atob(e.substr(7))):i(e.substr(7))},Object.defineProperty(e.prototype,"computeSourceCode",{get:function(){var e,t;return this._computeSourceCodeOverride?this._computeSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getComputeShaderCode())&&void 0!==t?t:this._computeSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawComputeSourceCode",{get:function(){return this._rawComputeSourceCode},enumerable:!1,configurable:!0}),e.prototype._prepareEffect=function(){var e=this,t=this.defines,n=this._pipelineContext;this._isReady=!1;try{var i=this._engine;this._pipelineContext=i.createComputePipelineContext(),this._pipelineContext._name=this._key,i._prepareComputePipelineContext(this._pipelineContext,this._computeSourceCodeOverride?this._computeSourceCodeOverride:this._computeSourceCode,this._rawComputeSourceCode,this._computeSourceCodeOverride?null:t,this._entryPoint),i._executeWhenComputeStateIsCompiled(this._pipelineContext,(function(){e._compilationError="",e._isReady=!0,e.onCompiled&&e.onCompiled(e),e.onCompileObservable.notifyObservers(e),e.onCompileObservable.clear(),n&&e.getEngine()._deleteComputePipelineContext(n)})),this._pipelineContext.isAsync&&this._checkIsReady(n)}catch(e){this._processCompilationErrors(e,n)}},e.prototype._getShaderCodeAndErrorLine=function(e,t){var n=null;if(t&&e){var i=t.match(/COMPUTE SHADER ERROR: 0:(\d+?):/);if(i&&2===i.length){var r=parseInt(i[1]),o=e.split("\n",-1);o.length>=r&&(n="Offending line [".concat(r,"] in compute code: ").concat(o[r-1]))}}return[e,n]},e.prototype._processCompilationErrors=function(t,n){var i,r;if(void 0===n&&(n=null),this._compilationError=t.message,J.Error("Unable to compile compute effect:"),J.Error("Defines:\n"+this.defines),e.LogShaderCodeOnCompilationError){var o=null,a=null;(null===(r=this._pipelineContext)||void 0===r?void 0:r._getComputeShaderCode())&&(a=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getComputeShaderCode(),this._compilationError))[0],o=i[1],a&&(J.Error("Compute code:"),J.Error(a))),o&&J.Error(o)}J.Error("Error: "+this._compilationError),n&&(this._pipelineContext=n,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this))},e.prototype.dispose=function(){this._pipelineContext&&this._pipelineContext.dispose(),this._engine._releaseComputeEffect(this)},e.RegisterShader=function(e,t){Vt.GetShadersStore(at.WGSL)["".concat(e,"ComputeShader")]=t},e._UniqueIdSeed=0,e.LogShaderCodeOnCompilationError=!0,e}();!function(e){e[e.Texture=0]="Texture",e[e.StorageTexture=1]="StorageTexture",e[e.UniformBuffer=2]="UniformBuffer",e[e.StorageBuffer=3]="StorageBuffer",e[e.TextureWithoutSampler=4]="TextureWithoutSampler",e[e.Sampler=5]="Sampler",e[e.ExternalTexture=6]="ExternalTexture"}(Yl||(Yl={})),rn.prototype.createComputeEffect=function(e,t){throw new Error("createComputeEffect: This engine does not support compute shaders!")},rn.prototype.createComputePipelineContext=function(){throw new Error("createComputePipelineContext: This engine does not support compute shaders!")},rn.prototype.createComputeContext=function(){},rn.prototype.computeDispatch=function(e,t,n,i,r,o,a){throw new Error("computeDispatch: This engine does not support compute shaders!")},rn.prototype.areAllComputeEffectsReady=function(){return!0},rn.prototype.releaseComputeEffects=function(){},rn.prototype._prepareComputePipelineContext=function(e,t,n,i,r){},rn.prototype._rebuildComputeEffects=function(){},rn.prototype._executeWhenComputeStateIsCompiled=function(e,t){t()},rn.prototype._releaseComputeEffect=function(e){},rn.prototype._deleteComputePipelineContext=function(e){};var Kl=function(){function e(){this._gpuTimeInFrameId=-1,this.counter=new vi}return e.prototype._addDuration=function(e,t){ethis.capacity&&this._depth-1&&this.entries.splice(n,1)}},e.prototype.addEntries=function(e){for(var t=0;t1)?1:e.arc||1,h=0===e.sideOrientation?0:e.sideOrientation||Cr.DEFAULTSIDE,d=e.faceUV||new Array(3),p=e.faceColors,f=2+(1+(1!==u&&c?2:0))*(s?a:1);for(r=0;r0)):!n._pointerCaptures[s.pointerId]&&o.distance>=a.distance&&(n.mainSceneTrackerPredicate&&n.mainSceneTrackerPredicate(a.pickedMesh)?(n._notifyObservers(t,a,s),t.skipOnPointerObservable=!0):(t.type!==ti.POINTERMOVE&&t.type!==ti.POINTERUP||n._lastPointerEvents[s.pointerId]&&(n.onPointerOutObservable.notifyObservers(s.pointerId),delete n._lastPointerEvents[s.pointerId]),n._notifyObservers(t,o,s))),t.type===ti.POINTERUP&&n._pointerCaptures[s.pointerId]&&(n._pointerCaptures[s.pointerId]=!1))}}}})),this._originalPointerObserver&&e.onPrePointerObservable.makeObserverTopPriority(this._originalPointerObserver)),this.utilityLayerScene.autoClear=!1,this._afterRenderObserver=this.originalScene.onAfterRenderCameraObservable.add((function(e){n.shouldRender&&e==n.getRenderCamera()&&n.render()})),this._sceneDisposeObserver=this.originalScene.onDisposeObservable.add((function(){n.dispose()})),this._updateCamera()}return e.prototype.getRenderCamera=function(e){return this._renderCamera?this._renderCamera:(t=this.originalScene.activeCameras&&this.originalScene.activeCameras.length>1?this.originalScene.activeCameras[this.originalScene.activeCameras.length-1]:this.originalScene.activeCamera,e&&t&&t.isRigCamera?t.rigParent:t);var t},e.prototype.setRenderCamera=function(e){this._renderCamera=e},e.prototype._getSharedGizmoLight=function(){return this._sharedGizmoLight||(this._sharedGizmoLight=new ou("shared gizmo light",new C(0,1,0),this.utilityLayerScene),this._sharedGizmoLight.intensity=2,this._sharedGizmoLight.groundColor=B.Gray()),this._sharedGizmoLight},Object.defineProperty(e,"DefaultUtilityLayer",{get:function(){return null==e._DefaultUtilityLayer?e._CreateDefaultUtilityLayerFromScene(A.LastCreatedScene):e._DefaultUtilityLayer},enumerable:!1,configurable:!0}),e._CreateDefaultUtilityLayerFromScene=function(t){return e._DefaultUtilityLayer=new e(t),e._DefaultUtilityLayer.originalScene.onDisposeObservable.addOnce((function(){e._DefaultUtilityLayer=null})),e._DefaultUtilityLayer},Object.defineProperty(e,"DefaultKeepDepthUtilityLayer",{get:function(){return null==e._DefaultKeepDepthUtilityLayer&&(e._DefaultKeepDepthUtilityLayer=new e(A.LastCreatedScene),e._DefaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,e._DefaultKeepDepthUtilityLayer.originalScene.onDisposeObservable.addOnce((function(){e._DefaultKeepDepthUtilityLayer=null}))),e._DefaultKeepDepthUtilityLayer},enumerable:!1,configurable:!0}),e.prototype._notifyObservers=function(e,t,n){e.skipOnPointerObservable||(this.utilityLayerScene.onPointerObservable.notifyObservers(new ri(e.type,e.event,t),e.type),this._lastPointerEvents[n.pointerId]=!0)},e.prototype.render=function(){if(this._updateCamera(),this.utilityLayerScene.activeCamera){var e=this.utilityLayerScene.activeCamera.getScene(),t=this.utilityLayerScene.activeCamera;t._scene=this.utilityLayerScene,t.leftCamera&&(t.leftCamera._scene=this.utilityLayerScene),t.rightCamera&&(t.rightCamera._scene=this.utilityLayerScene),this.utilityLayerScene.render(!1),t._scene=e,t.leftCamera&&(t.leftCamera._scene=e),t.rightCamera&&(t.rightCamera._scene=e)}},e.prototype.dispose=function(){this.onPointerOutObservable.clear(),this._afterRenderObserver&&this.originalScene.onAfterCameraRenderObservable.remove(this._afterRenderObserver),this._sceneDisposeObserver&&this.originalScene.onDisposeObservable.remove(this._sceneDisposeObserver),this._originalPointerObserver&&this.originalScene.onPrePointerObservable.remove(this._originalPointerObserver),this.utilityLayerScene.dispose()},e.prototype._updateCamera=function(){this.utilityLayerScene.cameraToUseForPointers=this.getRenderCamera(),this.utilityLayerScene.activeCamera=this.getRenderCamera()},e._DefaultUtilityLayer=null,e._DefaultKeepDepthUtilityLayer=null,e}();!function(e){e[e.Origin=0]="Origin",e[e.Pivot=1]="Pivot"}(iu||(iu={})),function(e){e[e.World=0]="World",e[e.Local=1]="Local"}(ru||(ru={}));var su,cu=function(){function e(e){void 0===e&&(e=au.DefaultUtilityLayer);var t=this;this.gizmoLayer=e,this._attachedMesh=null,this._attachedNode=null,this._customRotationQuaternion=null,this._scaleRatio=1,this._isHovered=!1,this._customMeshSet=!1,this._updateGizmoRotationToMatchAttachedMesh=!0,this._updateGizmoPositionToMatchAttachedMesh=!0,this._anchorPoint=iu.Origin,this._updateScale=!0,this._coordinatesMode=ru.Local,this._interactionsEnabled=!0,this._rightHandtoLeftHandMatrix=R.RotationY(Math.PI),this._rootMesh=new no("gizmoRootNode",e.utilityLayerScene),this._rootMesh.rotationQuaternion=I.Identity(),this._beforeRenderObserver=this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add((function(){t._update()}))}return Object.defineProperty(e.prototype,"scaleRatio",{get:function(){return this._scaleRatio},set:function(e){this._scaleRatio=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isHovered",{get:function(){return this._isHovered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attachedMesh",{get:function(){return this._attachedMesh},set:function(e){this._attachedMesh=e,e&&(this._attachedNode=e),this._rootMesh.setEnabled(!!e),this._attachedNodeChanged(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attachedNode",{get:function(){return this._attachedNode},set:function(e){this._attachedNode=e,this._attachedMesh=null,this._rootMesh.setEnabled(!!e),this._attachedNodeChanged(e)},enumerable:!1,configurable:!0}),e.prototype.setCustomMesh=function(e){if(e.getScene()!=this.gizmoLayer.utilityLayerScene)throw"When setting a custom mesh on a gizmo, the custom meshes scene must be the same as the gizmos (eg. gizmo.gizmoLayer.utilityLayerScene)";this._rootMesh.getChildMeshes().forEach((function(e){e.dispose()})),e.parent=this._rootMesh,this._customMeshSet=!0},Object.defineProperty(e.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this._updateGizmoRotationToMatchAttachedMesh},set:function(e){this._updateGizmoRotationToMatchAttachedMesh=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateGizmoPositionToMatchAttachedMesh",{get:function(){return this._updateGizmoPositionToMatchAttachedMesh},set:function(e){this._updateGizmoPositionToMatchAttachedMesh=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchorPoint",{get:function(){return this._anchorPoint},set:function(e){this._anchorPoint=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinatesMode",{get:function(){return this._coordinatesMode},set:function(e){this._coordinatesMode=e;var t=e==ru.Local;this.updateGizmoRotationToMatchAttachedMesh=t,this.updateGizmoPositionToMatchAttachedMesh=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateScale",{get:function(){return this._updateScale},set:function(e){this._updateScale=e},enumerable:!1,configurable:!0}),e.prototype._attachedNodeChanged=function(e){},Object.defineProperty(e.prototype,"customRotationQuaternion",{get:function(){return this._customRotationQuaternion},set:function(e){this._customRotationQuaternion=e},enumerable:!1,configurable:!0}),e.prototype._update=function(){if(this.attachedNode){var t=this.attachedNode;if(this.attachedMesh&&(t=this.attachedMesh||this.attachedNode),this.updateGizmoPositionToMatchAttachedMesh)if(this.anchorPoint==iu.Pivot&&t.getAbsolutePivotPoint){var n=t.getAbsolutePivotPoint();this._rootMesh.position.copyFrom(n)}else{var i=t.getWorldMatrix().getRow(3);n=i?i.toVector3():new C(0,0,0),this._rootMesh.position.copyFrom(n)}if(this.updateGizmoRotationToMatchAttachedMesh){var r=t._isMesh||"AbstractMesh"===t.getClassName()||"TransformNode"===t.getClassName()||"InstancedMesh"===t.getClassName()?t:void 0;t.getWorldMatrix().decompose(void 0,this._rootMesh.rotationQuaternion,void 0,e.PreserveScaling?r:void 0),this._rootMesh.rotationQuaternion.normalize()}else this._customRotationQuaternion?this._rootMesh.rotationQuaternion.copyFrom(this._customRotationQuaternion):this._rootMesh.rotationQuaternion.set(0,0,0,1);if(this.updateScale){var o=this.gizmoLayer.utilityLayerScene.activeCamera,a=o.globalPosition;this._rootMesh.position.subtractToRef(a,w.Vector3[0]);var s=this.scaleRatio;if(o.mode==dr.ORTHOGRAPHIC_CAMERA)o.orthoTop&&o.orthoBottom&&(s*=o.orthoTop-o.orthoBottom);else{var c=o.getScene().useRightHandedSystem?C.RightHandedForwardReadOnly:C.LeftHandedForwardReadOnly,l=o.getDirection(c);s*=C.Dot(w.Vector3[0],l)}this._rootMesh.scaling.setAll(s),t._getWorldMatrixDeterminant()<0&&!e.PreserveScaling&&(this._rootMesh.scaling.y*=-1)}else this._rootMesh.scaling.setAll(this.scaleRatio)}},e.prototype._handlePivotMatrixInverse=function(e,t,n){if(e.isUsingPivotMatrix()&&!e.isUsingPostMultiplyPivotMatrix())return e.getPivotMatrix().invertToRef(w.Matrix[5]),void w.Matrix[5].multiplyToRef(t,n);n.copyFrom(t)},e.prototype._matrixChanged=function(){if(this._attachedNode)if(this._attachedNode._isCamera){var t=this._attachedNode,n=void 0,i=void 0;if(t.parent){var r=w.Matrix[1];t.parent._worldMatrix.invertToRef(r),this._attachedNode._worldMatrix.multiplyToRef(r,w.Matrix[0]),n=w.Matrix[0]}else n=this._attachedNode._worldMatrix;if(t.getScene().useRightHandedSystem?(this._rightHandtoLeftHandMatrix.multiplyToRef(n,w.Matrix[1]),i=w.Matrix[1]):i=n,i.decompose(w.Vector3[1],w.Quaternion[0],w.Vector3[0]),"FreeCamera"===this._attachedNode.getClassName()||"FlyCamera"===this._attachedNode.getClassName()||"ArcFollowCamera"===this._attachedNode.getClassName()||"TargetCamera"===this._attachedNode.getClassName()||"TouchCamera"===this._attachedNode.getClassName()||"UniversalCamera"===this._attachedNode.getClassName()){var o=this._attachedNode;o.rotation=w.Quaternion[0].toEulerAngles(),o.rotationQuaternion&&(o.rotationQuaternion.copyFrom(w.Quaternion[0]),o.rotationQuaternion.normalize())}t.position.copyFrom(w.Vector3[0])}else if(this._attachedNode._isMesh||"AbstractMesh"===this._attachedNode.getClassName()||"TransformNode"===this._attachedNode.getClassName()||"InstancedMesh"===this._attachedNode.getClassName()){var a=this._attachedNode;if(a.parent){r=w.Matrix[0];var s=w.Matrix[1];a.parent.getWorldMatrix().invertToRef(r),this._attachedNode.getWorldMatrix().multiplyToRef(r,s);var c=w.Matrix[4];if(this._handlePivotMatrixInverse(a,s,c),c.decompose(w.Vector3[0],w.Quaternion[0],a.position,e.PreserveScaling?a:void 0,e.UseAbsoluteScaling),w.Quaternion[0].normalize(),a.isUsingPivotMatrix()){var l=w.Quaternion[1];I.RotationYawPitchRollToRef(a.rotation.y,a.rotation.x,a.rotation.z,l);var u=w.Matrix[2];R.ScalingToRef(a.scaling.x,a.scaling.y,a.scaling.z,u);var h=w.Matrix[2];l.toRotationMatrix(h);var d=a.getPivotMatrix(),p=w.Matrix[3];d.invertToRef(p),d.multiplyToRef(u,w.Matrix[4]),w.Matrix[4].multiplyToRef(h,w.Matrix[5]),w.Matrix[5].multiplyToRef(p,w.Matrix[6]),w.Matrix[6].getTranslationToRef(w.Vector3[1]),a.position.subtractInPlace(w.Vector3[1])}}else c=w.Matrix[4],this._handlePivotMatrixInverse(a,this._attachedNode._worldMatrix,c),c.decompose(w.Vector3[0],w.Quaternion[0],a.position,e.PreserveScaling?a:void 0,e.UseAbsoluteScaling);w.Vector3[0].scaleInPlace(1/a.scalingDeterminant),a.scaling.copyFrom(w.Vector3[0]),a.billboardMode||(a.rotationQuaternion?(a.rotationQuaternion.copyFrom(w.Quaternion[0]),a.rotationQuaternion.normalize()):a.rotation=w.Quaternion[0].toEulerAngles())}else if("Bone"===this._attachedNode.getClassName()){var f=this._attachedNode,m=f.getParent();if(m){var _=w.Matrix[0],g=w.Matrix[1];m.getFinalMatrix().invertToRef(_),f.getFinalMatrix().multiplyToRef(_,g),f.getLocalMatrix().copyFrom(g)}else f.getLocalMatrix().copyFrom(f.getFinalMatrix());f.markAsDirty()}else{var y=this._attachedNode;if(y.getTypeID){var v=y.getTypeID();if(v===ro.LIGHTTYPEID_DIRECTIONALLIGHT||v===ro.LIGHTTYPEID_SPOTLIGHT||v===ro.LIGHTTYPEID_POINTLIGHT){var b=y.parent;if(b){_=w.Matrix[0];var T=w.Matrix[1];b.getWorldMatrix().invertToRef(_),y.getWorldMatrix().multiplyToRef(_,T),T.decompose(void 0,w.Quaternion[0],w.Vector3[0])}else this._attachedNode._worldMatrix.decompose(void 0,w.Quaternion[0],w.Vector3[0]);y.position=new C(w.Vector3[0].x,w.Vector3[0].y,w.Vector3[0].z),y.direction&&(y.direction=new C(y.direction.x,y.direction.y,y.direction.z))}}}},e.prototype._setGizmoMeshMaterial=function(e,t){e&&e.forEach((function(e){e.material=t,e.color&&(e.color=t.diffuseColor)}))},e.GizmoAxisPointerObserver=function(e,t){var n=!1,i=e.utilityLayerScene.onPointerObservable.add((function(e){var i,r;if(e.pickInfo){if(e.type===ti.POINTERMOVE){if(n)return;t.forEach((function(t){var n,i;if(t.colliderMeshes&&t.gizmoMeshes){var r=-1!=(null===(n=t.colliderMeshes)||void 0===n?void 0:n.indexOf(null===(i=null==e?void 0:e.pickInfo)||void 0===i?void 0:i.pickedMesh)),o=t.dragBehavior.enabled?r||t.active?t.hoverMaterial:t.material:t.disableMaterial;t.gizmoMeshes.forEach((function(e){e.material=o,e.color&&(e.color=o.diffuseColor)}))}}))}e.type===ti.POINTERDOWN&&t.has(null===(i=e.pickInfo.pickedMesh)||void 0===i?void 0:i.parent)&&(n=!0,t.get(null===(r=e.pickInfo.pickedMesh)||void 0===r?void 0:r.parent).active=!0,t.forEach((function(t){var n,i,r=(-1!=(null===(n=t.colliderMeshes)||void 0===n?void 0:n.indexOf(null===(i=null==e?void 0:e.pickInfo)||void 0===i?void 0:i.pickedMesh))||t.active)&&t.dragBehavior.enabled?t.hoverMaterial:t.disableMaterial;t.gizmoMeshes.forEach((function(e){e.material=r,e.color&&(e.color=r.diffuseColor)}))}))),e.type===ti.POINTERUP&&t.forEach((function(e){e.active=!1,n=!1,e.gizmoMeshes.forEach((function(t){t.material=e.dragBehavior.enabled?e.material:e.disableMaterial,t.color&&(t.color=e.material.diffuseColor)}))}))}}));return i},e.prototype.dispose=function(){this._rootMesh.dispose(),this._beforeRenderObserver&&this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.remove(this._beforeRenderObserver)},e.PreserveScaling=!1,e.UseAbsoluteScaling=!0,e}(),lu=function(e){function t(n,i,r,o,a,s,c){void 0===i&&(i=B.Gray()),void 0===r&&(r=au.DefaultUtilityLayer),void 0===o&&(o=null),void 0===a&&(a=1),void 0===s&&(s=B.Yellow()),void 0===c&&(c=B.Gray());var l,h=this;(h=e.call(this,r)||this)._pointerObserver=null,h.snapDistance=0,h.onSnapObservable=new u,h._isEnabled=!0,h._parent=null,h._dragging=!1,h._parent=o,h._coloredMaterial=new ml("",r.utilityLayerScene),h._coloredMaterial.diffuseColor=i,h._coloredMaterial.specularColor=i.subtract(new B(.1,.1,.1)),h._hoverMaterial=new ml("",r.utilityLayerScene),h._hoverMaterial.diffuseColor=s,h._disableMaterial=new ml("",r.utilityLayerScene),h._disableMaterial.diffuseColor=c,h._disableMaterial.alpha=.4;var d=t._CreateArrow(r.utilityLayerScene,h._coloredMaterial,a),p=t._CreateArrow(r.utilityLayerScene,h._coloredMaterial,a+4,!0);h._gizmoMesh=new no("",r.utilityLayerScene),h._gizmoMesh.addChild(d),h._gizmoMesh.addChild(p),h._gizmoMesh.lookAt(h._rootMesh.position.add(n)),h._gizmoMesh.scaling.scaleInPlace(1/3),h._gizmoMesh.parent=h._rootMesh;var f=0,m={snapDistance:0};h.dragBehavior=new Vo({dragAxis:n}),h.dragBehavior.moveAttached=!1,h.dragBehavior.updateDragPlane=!1,h._rootMesh.addBehavior(h.dragBehavior),h.dragBehavior.onDragObservable.add((function(e){if(h.attachedNode){var t=!1;if(0==h.snapDistance)h.attachedNode.getWorldMatrix().getTranslationToRef(w.Vector3[2]),w.Vector3[2].addInPlace(e.delta),h.dragBehavior.validateDrag(w.Vector3[2])&&(h.attachedNode.position&&h.attachedNode.position.addInPlaceFromFloats(e.delta.x,e.delta.y,e.delta.z),h.attachedNode.getWorldMatrix().addTranslationFromFloats(e.delta.x,e.delta.y,e.delta.z),h.attachedNode.updateCache(),t=!0);else if(f+=e.dragDistance,Math.abs(f)>h.snapDistance){var n=Math.floor(Math.abs(f)/h.snapDistance);f%=h.snapDistance,e.delta.normalizeToRef(w.Vector3[1]),w.Vector3[1].scaleInPlace(h.snapDistance*n),h.attachedNode.getWorldMatrix().getTranslationToRef(w.Vector3[2]),w.Vector3[2].addInPlace(w.Vector3[1]),h.dragBehavior.validateDrag(w.Vector3[2])&&(h.attachedNode.getWorldMatrix().addTranslationFromFloats(w.Vector3[1].x,w.Vector3[1].y,w.Vector3[1].z),h.attachedNode.updateCache(),m.snapDistance=h.snapDistance*n*Math.sign(f),h.onSnapObservable.notifyObservers(m),t=!0)}t&&h._matrixChanged()}})),h.dragBehavior.onDragStartObservable.add((function(){h._dragging=!0})),h.dragBehavior.onDragEndObservable.add((function(){h._dragging=!1}));var _=r._getSharedGizmoLight();_.includedOnlyMeshes=_.includedOnlyMeshes.concat(h._rootMesh.getChildMeshes(!1));var g={gizmoMeshes:d.getChildMeshes(),colliderMeshes:p.getChildMeshes(),material:h._coloredMaterial,hoverMaterial:h._hoverMaterial,disableMaterial:h._disableMaterial,active:!1,dragBehavior:h.dragBehavior};return null===(l=h._parent)||void 0===l||l.addToAxisCache(p,g),h._pointerObserver=r.utilityLayerScene.onPointerObservable.add((function(e){var t;if(!h._customMeshSet&&(h._isHovered=!(-1==g.colliderMeshes.indexOf(null===(t=null==e?void 0:e.pickInfo)||void 0===t?void 0:t.pickedMesh)),!h._parent)){var n=h.dragBehavior.enabled?h._isHovered||h._dragging?h._hoverMaterial:h._coloredMaterial:h._disableMaterial;h._setGizmoMeshMaterial(g.gizmoMeshes,n)}})),h.dragBehavior.onEnabledObservable.add((function(e){h._setGizmoMeshMaterial(g.gizmoMeshes,e?g.material:g.disableMaterial)})),h}return H(t,e),Object.defineProperty(t.prototype,"coloredMaterial",{get:function(){return this._coloredMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hoverMaterial",{get:function(){return this._hoverMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disableMaterial",{get:function(){return this._disableMaterial},enumerable:!1,configurable:!0}),t._CreateArrow=function(e,t,n,i){void 0===n&&(n=1),void 0===i&&(i=!1);var r=new Lr("arrow",e),o=tu("cylinder",{diameterTop:0,height:.075,diameterBottom:.0375*(1+(n-1)/4),tessellation:96},e),a=tu("cylinder",{diameterTop:.005*n,height:.275,diameterBottom:.005*n,tessellation:96},e);return o.parent=r,o.material=t,o.rotation.x=Math.PI/2,o.position.z+=.3,a.parent=r,a.material=t,a.position.z+=.1375,a.rotation.x=Math.PI/2,i&&(a.visibility=0,o.visibility=0),r},t._CreateArrowInstance=function(e,t){for(var n=new Lr("arrow",e),i=0,r=t.getChildMeshes();i0;)f.unshift(f.pop()),_.unshift(_.pop()),h--;for(;d>0;)m.unshift(m.pop()),g.unshift(g.pop()),d--;f=f.flat(),m=m.flat(),p=p.concat(f).concat(m),n.push(_[0],_[2],_[3],_[0],_[1],_[2]),n.push(g[0],g[2],g[3],g[0],g[1],g[2])}var y=[o/2,a/2,s/2];t=p.reduce((function(e,t,n){return e.concat(t*y[n%3])}),[]);for(var v=0===e.sideOrientation?0:e.sideOrientation||Cr.DEFAULTSIDE,b=e.faceUV||new Array(6),T=e.faceColors,E=[],A=0;A<6;A++)void 0===b[A]&&(b[A]=new P(0,0,1,1)),T&&void 0===T[A]&&(T[A]=new U(1,1,1,1));for(var x=0;x<6;x++)if(r.push(b[x].z,Ir.UseOpenGLOrientationForUV?1-b[x].w:b[x].w),r.push(b[x].x,Ir.UseOpenGLOrientationForUV?1-b[x].w:b[x].w),r.push(b[x].x,Ir.UseOpenGLOrientationForUV?1-b[x].y:b[x].y),r.push(b[x].z,Ir.UseOpenGLOrientationForUV?1-b[x].y:b[x].y),T)for(var S=0;S<4;S++)E.push(T[x].r,T[x].g,T[x].b,T[x].a);Cr._ComputeSides(v,t,n,i,r,e.frontUVs,e.backUVs);var C=new Cr;if(C.indices=n,C.positions=t,C.normals=i,C.uvs=r,T){var I=v===Cr.DOUBLESIDE?E.concat(E):E;C.colors=I}return C}function fu(e){var t=e.width||e.size||1,n=e.height||e.size||1,i=e.depth||e.size||1,r=0|(e.widthSegments||e.segments||1),o=0|(e.heightSegments||e.segments||1),a=0|(e.depthSegments||e.segments||1),s=new R,c=new R,l=new R,u=Ol({width:t,height:i,subdivisionsX:r,subdivisionsY:a});R.TranslationToRef(0,-n/2,0,c),R.RotationZToRef(Math.PI,s),s.multiplyToRef(c,l),u.transform(l);var h=Ol({width:t,height:i,subdivisionsX:r,subdivisionsY:a});R.TranslationToRef(0,n/2,0,l),h.transform(l);var d=Ol({width:n,height:i,subdivisionsX:o,subdivisionsY:a});R.TranslationToRef(-t/2,0,0,c),R.RotationZToRef(Math.PI/2,s),s.multiplyToRef(c,l),d.transform(l);var p=Ol({width:n,height:i,subdivisionsX:o,subdivisionsY:a});R.TranslationToRef(t/2,0,0,c),R.RotationZToRef(-Math.PI/2,s),s.multiplyToRef(c,l),p.transform(l);var f=Ol({width:t,height:n,subdivisionsX:r,subdivisionsY:o});R.TranslationToRef(0,0,-i/2,c),R.RotationXToRef(-Math.PI/2,s),s.multiplyToRef(c,l),f.transform(l);var m=Ol({width:t,height:n,subdivisionsX:r,subdivisionsY:o});return R.TranslationToRef(0,0,i/2,c),R.RotationXToRef(Math.PI/2,s),s.multiplyToRef(c,l),m.transform(l),u.merge([h,p,d,f,m],!0),u}function mu(e,t,n){void 0===t&&(t={}),void 0===n&&(n=null);var i=new no(e,n);return t.sideOrientation=no._GetDefaultSideOrientation(t.sideOrientation),i._originalBuilderSideOrientation=t.sideOrientation,pu(t).applyToMesh(i,t.updatable),i}var _u={CreateBox:mu};function gu(e){for(var t=0|(e.segments||32),n=e.diameterX||e.diameter||1,i=e.diameterY||e.diameter||1,r=e.diameterZ||e.diameter||1,o=e.arc&&(e.arc<=0||e.arc>1)?1:e.arc||1,a=e.slice&&e.slice<=0?1:e.slice||1,s=0===e.sideOrientation?0:e.sideOrientation||Cr.DEFAULTSIDE,c=!!e.dedupTopBottomIndices,l=new C(n/2,i/2,r/2),u=2+t,h=2*u,d=[],p=[],f=[],m=[],_=0;_<=u;_++){for(var g=_/u,y=g*Math.PI*a,v=0;v<=h;v++){var b=v/h,T=b*Math.PI*2*o,E=R.RotationZ(-y),A=R.RotationY(T),x=C.TransformCoordinates(C.Up(),E),S=C.TransformCoordinates(x,A),P=S.multiply(l),I=S.divide(l).normalize();p.push(P.x,P.y,P.z),f.push(I.x,I.y,I.z),m.push(b,Ir.UseOpenGLOrientationForUV?1-g:g)}if(_>0)for(var O=p.length/3,w=O-2*(h+1);w+h+21&&(d.push(w),d.push(w+1),d.push(w+h+1)),(_o?o:Math.floor(a);var s,c,l,u,h=0===e.sideOrientation?0:e.sideOrientation||Cr.DEFAULTSIDE,d=e.uvs,p=e.colors,f=[],m=[],_=[],g=[],y=[],v=[],b=[],T=[],E=[],A=[];if(t.length<2){var x=[],S=[];for(l=0;l0&&(I=C[u].subtract(C[u-1]).length()+b[c],y[c].push(I),b[c]=I),u++;i&&(u--,f.push(C[0].x,C[0].y,C[0].z),I=C[u].subtract(C[0]).length()+b[c],y[c].push(I),b[c]=I),E[c]=P+M,A[c]=w,w+=P+M}var D,N,L=null,F=null;for(l=0;l1)?1:e.arc||1,c=0===e.sideOrientation?0:e.sideOrientation||Cr.DEFAULTSIDE;t.push(0,0,0),r.push(.5,.5);for(var l=2*Math.PI*s,u=1===s?l/a:l/(a-1),h=0,d=0;d0||h>0){switch(_=-d,g=-p,y=d,v=p,r){case no.CENTER:_-=c/=2,y+=c;break;case no.LEFT:y+=c,f=-c/2;break;case no.RIGHT:_-=c,f=c/2}switch(o){case no.CENTER:g-=h/=2,v+=h;break;case no.BOTTOM:v+=h,m=-h/2;break;case no.TOP:g-=h,m=h/2}}var b=[],T=[],E=[];E[0]=[0,0,1,0,1,1,0,1],E[1]=[0,0,1,0,1,1,0,1],t!==no.ROTATE_TILE&&t!==no.ROTATE_ROW||(E[1]=[1,1,0,1,0,0,1,0]),t!==no.FLIP_TILE&&t!==no.FLIP_ROW||(E[1]=[1,0,0,0,0,1,1,1]),t!==no.FLIP_N_ROTATE_TILE&&t!==no.FLIP_N_ROTATE_ROW||(E[1]=[0,1,1,1,1,0,0,0]);for(var A=[],x=[],S=[],C=0,P=0;P0||h>0){var R=h>0&&(o===no.CENTER||o===no.TOP),O=h>0&&(o===no.CENTER||o===no.BOTTOM),w=c>0&&(r===no.CENTER||r===no.RIGHT),M=c>0&&(r===no.CENTER||r===no.LEFT),D=[],N=void 0,L=void 0,F=void 0,B=void 0;if(R&&w&&(b.push(_+f,g+m,0),b.push(-d+f,g+m,0),b.push(-d+f,g+h+m,0),b.push(_+f,g+h+m,0),S.push(C,C+1,C+3,C+1,C+2,C+3),C+=4,D=[N=1-c/n,L=1-h/i,F=1,L,F,B=1,N,B],t===no.ROTATE_ROW&&(D=[1-N,1-L,1-F,1-L,1-F,1-B,1-N,1-B]),t===no.FLIP_ROW&&(D=[1-N,L,1-F,L,1-F,B,1-N,B]),t===no.FLIP_N_ROTATE_ROW&&(D=[N,1-L,F,1-L,F,1-B,N,1-B]),A=A.concat(D),x.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),R&&M&&(b.push(d+f,g+m,0),b.push(y+f,g+m,0),b.push(y+f,g+h+m,0),b.push(d+f,g+h+m,0),S.push(C,C+1,C+3,C+1,C+2,C+3),C+=4,D=[N=0,L=1-h/i,F=c/n,L,F,B=1,N,B],(t===no.ROTATE_ROW||t===no.ROTATE_TILE&&s%2==0)&&(D=[1-N,1-L,1-F,1-L,1-F,1-B,1-N,1-B]),(t===no.FLIP_ROW||t===no.FLIP_TILE&&s%2==0)&&(D=[1-N,L,1-F,L,1-F,B,1-N,B]),(t===no.FLIP_N_ROTATE_ROW||t===no.FLIP_N_ROTATE_TILE&&s%2==0)&&(D=[N,1-L,F,1-L,F,1-B,N,1-B]),A=A.concat(D),x.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),O&&w&&(b.push(_+f,p+m,0),b.push(-d+f,p+m,0),b.push(-d+f,v+m,0),b.push(_+f,v+m,0),S.push(C,C+1,C+3,C+1,C+2,C+3),C+=4,D=[N=1-c/n,L=0,F=1,L,F,B=h/i,N,B],(t===no.ROTATE_ROW&&u%2==1||t===no.ROTATE_TILE&&u%1==0)&&(D=[1-N,1-L,1-F,1-L,1-F,1-B,1-N,1-B]),(t===no.FLIP_ROW&&u%2==1||t===no.FLIP_TILE&&u%2==0)&&(D=[1-N,L,1-F,L,1-F,B,1-N,B]),(t===no.FLIP_N_ROTATE_ROW&&u%2==1||t===no.FLIP_N_ROTATE_TILE&&u%2==0)&&(D=[N,1-L,F,1-L,F,1-B,N,1-B]),A=A.concat(D),x.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),O&&M&&(b.push(d+f,p+m,0),b.push(y+f,p+m,0),b.push(y+f,v+m,0),b.push(d+f,v+m,0),S.push(C,C+1,C+3,C+1,C+2,C+3),C+=4,D=[N=0,L=0,F=c/n,L,F,B=h/i,N,B],(t===no.ROTATE_ROW&&u%2==1||t===no.ROTATE_TILE&&(u+s)%2==1)&&(D=[1-N,1-L,1-F,1-L,1-F,1-B,1-N,1-B]),(t===no.FLIP_ROW&&u%2==1||t===no.FLIP_TILE&&(u+s)%2==1)&&(D=[1-N,L,1-F,L,1-F,B,1-N,B]),(t===no.FLIP_N_ROTATE_ROW&&u%2==1||t===no.FLIP_N_ROTATE_TILE&&(u+s)%2==1)&&(D=[N,1-L,F,1-L,F,1-B,N,1-B]),A=A.concat(D),x.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),R){var U=[];for(N=0,L=1-h/i,F=1,B=1,U[0]=[N,L,F,L,F,B,N,B],U[1]=[N,L,F,L,F,B,N,B],t!==no.ROTATE_TILE&&t!==no.ROTATE_ROW||(U[1]=[1-N,1-L,1-F,1-L,1-F,1-B,1-N,1-B]),t!==no.FLIP_TILE&&t!==no.FLIP_ROW||(U[1]=[1-N,L,1-F,L,1-F,B,1-N,B]),t!==no.FLIP_N_ROTATE_TILE&&t!==no.FLIP_N_ROTATE_ROW||(U[1]=[N,1-L,F,1-L,F,1-B,N,1-B]),I=0;I=0&&this.options.defines.splice(i,1),("boolean"!=typeof t||t)&&this.options.defines.push(n+t),this},t.prototype.isReadyForSubMesh=function(e,t,n){return this.isReady(e,n,t)},t.prototype.isReady=function(e,t,n){var i,r,o,a,s=n&&this._storeEffectOnSubMeshes;if(this.isFrozen)if(s){if(n.effect&&n.effect._wasPreviouslyReady)return!0}else{var c=this._drawWrapper.effect;if(c&&c._wasPreviouslyReady&&c._wasPreviouslyUsingInstances===t)return!0}var l=this.getScene(),u=l.getEngine(),h=[],d=[],p=new Oa,f=this._shaderPath,m=this._options.uniforms,_=this._options.uniformBuffers,g=this._options.samplers;u.getCaps().multiview&&l.activeCamera&&l.activeCamera.outputRenderTarget&&l.activeCamera.outputRenderTarget.getViewCount()>1&&(this._multiview=!0,h.push("#define MULTIVIEW"),-1!==this._options.uniforms.indexOf("viewProjection")&&-1===this._options.uniforms.indexOf("viewProjectionR")&&this._options.uniforms.push("viewProjectionR"));for(var y=0;y4&&(d.push(Yn.MatricesIndicesExtraKind),d.push(Yn.MatricesWeightsExtraKind));var b=e.skeleton;h.push("#define NUM_BONE_INFLUENCERS "+e.numBoneInfluencers),p.addCPUSkinningFallback(0,e),b.isUsingTextureForMatrices?(h.push("#define BONETEXTURE"),-1===this._options.uniforms.indexOf("boneTextureWidth")&&this._options.uniforms.push("boneTextureWidth"),-1===this._options.samplers.indexOf("boneSampler")&&this._options.samplers.push("boneSampler")):(h.push("#define BonesPerMesh "+(b.bones.length+1)),-1===this._options.uniforms.indexOf("mBones")&&this._options.uniforms.push("mBones"))}else h.push("#define NUM_BONE_INFLUENCERS 0");var T=0,E=e?e.morphTargetManager:null;if(E){var A=E.supportsUVs&&-1!==h.indexOf("#define UV1"),x=E.supportsTangents&&-1!==h.indexOf("#define TANGENT"),S=E.supportsNormals&&-1!==h.indexOf("#define NORMAL");for(T=E.numInfluencers,A&&h.push("#define MORPHTARGETS_UV"),x&&h.push("#define MORPHTARGETS_TANGENT"),S&&h.push("#define MORPHTARGETS_NORMAL"),T>0&&h.push("#define MORPHTARGETS"),E.isUsingTextureForTargets&&(h.push("#define MORPHTARGETS_TEXTURE"),-1===this._options.uniforms.indexOf("morphTargetTextureIndices")&&this._options.uniforms.push("morphTargetTextureIndices"),-1===this._options.samplers.indexOf("morphTargets")&&this._options.samplers.push("morphTargets")),h.push("#define NUM_MORPH_INFLUENCERS "+T),y=0;y0&&((m=m.slice()).push("morphTargetInfluences"),m.push("morphTargetTextureInfo"),m.push("morphTargetTextureIndices"))}else h.push("#define NUM_MORPH_INFLUENCERS 0");if(e){var C=e.bakedVertexAnimationManager;C&&C.isEnabled&&(h.push("#define BAKED_VERTEX_ANIMATION_TEXTURE"),-1===this._options.uniforms.indexOf("bakedVertexAnimationSettings")&&this._options.uniforms.push("bakedVertexAnimationSettings"),-1===this._options.uniforms.indexOf("bakedVertexAnimationTextureSizeInverted")&&this._options.uniforms.push("bakedVertexAnimationTextureSizeInverted"),-1===this._options.uniforms.indexOf("bakedVertexAnimationTime")&&this._options.uniforms.push("bakedVertexAnimationTime"),-1===this._options.samplers.indexOf("bakedVertexAnimationTexture")&&this._options.samplers.push("bakedVertexAnimationTexture")),Xr.PrepareAttributesForBakedVertexAnimation(d,e,h)}for(var P in this._textures)if(!this._textures[P].isReady())return!1;e&&this._shouldTurnAlphaTestOn(e)&&h.push("#define ALPHATEST"),!1!==this._options.useClipPlane&&(Vr(m),zr(this,l,h)),this._useLogarithmicDepth&&(h.push("#define LOGARITHMICDEPTH"),-1===this._options.uniforms.indexOf("logarithmicDepthConstant")&&this._options.uniforms.push("logarithmicDepthConstant")),this.customShaderNameResolve&&(m=m.slice(),_=_.slice(),g=g.slice(),f=this.customShaderNameResolve(f,m,_,g,h,d));var I=s?n._getDrawWrapper():this._drawWrapper,R=null!==(i=null==I?void 0:I.effect)&&void 0!==i?i:null,O=null!==(r=null==I?void 0:I.defines)&&void 0!==r?r:null,w=h.join("\n"),M=R;return O!==w&&(M=u.createEffect(f,{attributes:d,uniformsNames:m,uniformBuffersNames:_,samplers:g,defines:w,fallbacks:p,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousMorphTargets:T},shaderLanguage:this._options.shaderLanguage},u),s?n.setEffect(M,w,this._materialContext):I&&I.setEffect(M,w),this._onEffectCreatedObservable&&(Uu.effect=M,Uu.subMesh=null!==(o=null!=n?n:null==e?void 0:e.subMeshes[0])&&void 0!==o?o:null,this._onEffectCreatedObservable.notifyObservers(Uu))),M._wasPreviouslyUsingInstances=!!t,null!==(a=!(null==M?void 0:M.isReady()))&&void 0!==a&&!a&&(R!==M&&l.resetCachedMaterial(),M._wasPreviouslyReady=!0,!0)},t.prototype.bindOnlyWorldMatrix=function(e,t){var n=this.getScene(),i=null!=t?t:this.getEffect();i&&(-1!==this._options.uniforms.indexOf("world")&&i.setMatrix("world",e),-1!==this._options.uniforms.indexOf("worldView")&&(e.multiplyToRef(n.getViewMatrix(),this._cachedWorldViewMatrix),i.setMatrix("worldView",this._cachedWorldViewMatrix)),-1!==this._options.uniforms.indexOf("worldViewProjection")&&(e.multiplyToRef(n.getTransformMatrix(),this._cachedWorldViewProjectionMatrix),i.setMatrix("worldViewProjection",this._cachedWorldViewProjectionMatrix)))},t.prototype.bindForSubMesh=function(e,t,n){var i;this.bind(e,t,null===(i=n._drawWrapperOverride)||void 0===i?void 0:i.effect,n)},t.prototype.bind=function(e,t,n,i){var r,o=i&&this._storeEffectOnSubMeshes,a=null!=n?n:o?i.effect:this.getEffect();if(a){var s=this.getScene();this._activeEffect=a,this.bindOnlyWorldMatrix(e,n);var c=this._options.uniformBuffers,l=!1;if(a&&c&&c.length>0&&s.getEngine().supportsUniformBuffers)for(var u=0;u0&&Xr.BindMorphTargetParameters(t,a);var _=t.bakedVertexAnimationManager;_&&_.isEnabled&&(null===(r=t.bakedVertexAnimationManager)||void 0===r||r.bind(a,!!a._wasPreviouslyUsingInstances))}this._afterBind(t,a)}},t.prototype.getActiveTextures=function(){var t=e.prototype.getActiveTextures.call(this);for(var n in this._textures)t.push(this._textures[n]);for(var i in this._textureArrays)for(var r=this._textureArrays[i],o=0;o\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\ngl_FragColor=vColor;\n#else\ngl_FragColor=color;\n#endif\n#define CUSTOM_FRAGMENT_MAIN_END\n}",Vt.ShadersStore.colorVertexShader="attribute vec3 position;\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n#include\n#include\n#include\nuniform mat4 viewProjection;\n#ifdef MULTIVIEW\nuniform mat4 viewProjectionR;\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\n#include\n#include\n#define CUSTOM_VERTEX_MAIN_END\n}",no._LinesMeshParser=function(e,t){return Vu.Parse(e,t)};var Vu=function(e){function t(t,n,i,r,o,a,s,c){void 0===n&&(n=null),void 0===i&&(i=null),void 0===r&&(r=null);var l=e.call(this,t,n,i,r,o)||this;l.useVertexColor=a,l.useVertexAlpha=s,l.color=new B(1,1,1),l.alpha=1,r&&(l.color=r.color.clone(),l.alpha=r.alpha,l.useVertexColor=r.useVertexColor,l.useVertexAlpha=r.useVertexAlpha),l.intersectionThreshold=.1;var u={attributes:[Yn.PositionKind],uniforms:["world","viewProjection"],needAlphaBlending:!0,defines:[],useClipPlane:null};return!1===s?u.needAlphaBlending=!1:u.defines.push("#define VERTEXALPHA"),a?(u.defines.push("#define VERTEXCOLOR"),u.attributes.push(Yn.ColorKind)):(u.uniforms.push("color"),l._color4=new U),c?l.material=c:(l.material=new ku("colorShader",l.getScene(),"color",u,!1),l.material.doNotSerialize=!0),l}return H(t,e),t.prototype._isShaderMaterial=function(e){return"ShaderMaterial"===e.getClassName()},t.prototype.isReady=function(){return!!this._lineMaterial.isReady(this,!!this._userInstancedBuffersStorage||this.hasThinInstances)&&e.prototype.isReady.call(this)},t.prototype.getClassName=function(){return"LinesMesh"},Object.defineProperty(t.prototype,"material",{get:function(){return this._lineMaterial},set:function(e){this._lineMaterial=e,this._lineMaterial.fillMode=qr.LineListDrawMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"checkCollisions",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),t.prototype._bind=function(e,t){if(!this._geometry)return this;var n=this.isUnIndexed?null:this._geometry.getIndexBuffer();if(!this._userInstancedBuffersStorage||this.hasThinInstances?this._geometry._bind(t,n):this._geometry._bind(t,n,this._userInstancedBuffersStorage.vertexBuffers,this._userInstancedBuffersStorage.vertexArrayObjects),!this.useVertexColor&&this._isShaderMaterial(this._lineMaterial)){var i=this.color,r=i.r,o=i.g,a=i.b;this._color4.set(r,o,a,this.alpha),this._lineMaterial.setColor4("color",this._color4)}return this},t.prototype._draw=function(e,t,n){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;var i=this.getScene().getEngine();return this._unIndexed?i.drawArraysType(qr.LineListDrawMode,e.verticesStart,e.verticesCount,n):i.drawElementsType(qr.LineListDrawMode,e.indexStart,e.indexCount,n),this},t.prototype.dispose=function(t,n,i){void 0===n&&(n=!1),i||this._lineMaterial.dispose(!1,!1,!0),e.prototype.dispose.call(this,t)},t.prototype.clone=function(e,n,i){return void 0===n&&(n=null),new t(e,this.getScene(),n,this,i)},t.prototype.createInstance=function(e){var t=new zu(e,this);if(this.instancedBuffers)for(var n in t.instancedBuffers={},this.instancedBuffers)t.instancedBuffers[n]=this.instancedBuffers[n];return t},t.prototype.serialize=function(t){e.prototype.serialize.call(this,t),t.color=this.color.asArray(),t.alpha=this.alpha},t.Parse=function(e,n){var i=new t(e.name,n);return i.color=B.FromArray(e.color),i.alpha=e.alpha,i},t}(no),zu=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.intersectionThreshold=n.intersectionThreshold,i}return H(t,e),t.prototype.getClassName=function(){return"InstancedLinesMesh"},t}(io);function Gu(e){for(var t=[],n=[],i=e.lines,r=e.colors,o=[],a=0,s=0;s0&&(t.push(a-1),t.push(a)),a++}var v=new Cr;return v.indices=t,v.positions=n,r&&(v.colors=o),v}function Hu(e){var t,n,i=e.dashSize||3,r=e.gapSize||1,o=e.dashNb||200,a=e.points,s=[],c=[],l=C.Zero(),u=0,h=0,d=0,p=0,f=0;for(f=0;ft.x&&(t.x=n.x),n.yt.y&&(t.y=n.y)})),{min:e,max:t,width:t.x-e.x,height:t.y-e.y}},e}(),Qu=function(){function e(){}return e.Rectangle=function(e,t,n,i){return[new S(e,t),new S(n,t),new S(n,i),new S(e,i)]},e.Circle=function(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=32);for(var r=[],o=0,a=2*Math.PI/i,s=0;s0){var h=o.length/3;this._points.elements.forEach((function(t){r.push(0,-1,0),o.push(t.x,-e,t.y),a.push(1-(t.x-s.min.x)/s.width,1-(t.y-s.min.y)/s.height)}));var d=c.length;for(u=0;uc?Ac?x0){var _=h[m-1];C.Dot(_,h[m])<0&&h[m].scaleInPlace(-1),_=d[m-1],C.Dot(_,d[m])<0&&d[m].scaleInPlace(-1),_=p[m-1],C.Dot(_,p[m])<0&&p[m].scaleInPlace(-1)}var g=0,y=l&&s?s:function(){return null!==o?o:0},v=l&&a?a:function(){return null!==r?r:1},b=c===no.NO_CAP||c===no.CAP_END?0:2,T=w.Matrix[0];for(m=0;m3?0:l;var x=xu(e,{pathArray:T=E(t,n,b=y?new Ui(n,y):new Ui(n),new Array,i,r,o,a,l,u,v),closeArray:s,closePath:c,updatable:d,sideOrientation:p,invertUV:m,frontUVs:_||void 0,backUVs:g||void 0},h);return x._creationDataStorage.pathArray=T,x._creationDataStorage.path3D=b,x._creationDataStorage.cap=l,x}Cr.CreatePolygon=$u,no.CreatePolygon=function(e,t,n,i,r,o,a){return void 0===a&&(a=earcut),Ju(e,{shape:t,holes:i,updatable:r,sideOrientation:o},n,a)},no.ExtrudePolygon=function(e,t,n,i,r,o,a,s){return void 0===s&&(s=earcut),eh(e,{shape:t,holes:r,depth:n,updatable:o,sideOrientation:a},i,s)};var oh={ExtrudeShape:nh,ExtrudeShapeCustom:ih};function ah(e,t,n){void 0===n&&(n=null);var i,r,o=t.arc?t.arc<=0||t.arc>1?1:t.arc:1,a=void 0===t.closed||t.closed,s=t.shape,c=t.radius||1,l=t.tessellation||64,u=t.clip||0,h=t.updatable,d=no._GetDefaultSideOrientation(t.sideOrientation),p=t.cap||no.NO_CAP,f=2*Math.PI,m=[],_=t.invertUV||!1,g=0,y=0,v=f/l*o;for(g=0;g<=l-u;g++){for(r=[],p!=no.CAP_START&&p!=no.CAP_ALL||(r.push(new C(0,s[0].y,0)),r.push(new C(Math.cos(g*v)*s[0].x*c,s[0].y,Math.sin(g*v)*s[0].x*c))),y=0;y1)?1:t.arc||1;var d,p,f=function(e,t,n,i,r,o,a,s){for(var c,l,u,h,d=t.getTangents(),p=t.getNormals(),f=t.getDistances(),m=2*Math.PI/r*s,_=o||function(){return i},g=w.Matrix[0],y=a===no.NO_CAP||a===no.CAP_END?0:2,v=0;v3?0:c;var g=xu(e,{pathArray:p=f(i,d=new Ui(i),new Array,o,a,s,c,t.arc),closePath:!0,closeArray:!1,updatable:u,sideOrientation:h,invertUV:l,frontUVs:t.frontUVs,backUVs:t.backUVs},n);return g._creationDataStorage.pathArray=p,g._creationDataStorage.path3D=d,g._creationDataStorage.tessellation=a,g._creationDataStorage.cap=c,g._creationDataStorage.arc=t.arc,g._creationDataStorage.radius=o,g}no.CreateLathe=function(e,t,n,i,r,o,a){return ah(e,{shape:t,radius:n,tessellation:i,sideOrientation:a,updatable:o},r)};var lh={CreateTube:ch};function uh(e){var t=[];t[0]={vertex:[[0,0,1.732051],[1.632993,0,-.5773503],[-.8164966,1.414214,-.5773503],[-.8164966,-1.414214,-.5773503]],face:[[0,1,2],[0,2,3],[0,3,1],[1,3,2]]},t[1]={vertex:[[0,0,1.414214],[1.414214,0,0],[0,1.414214,0],[-1.414214,0,0],[0,-1.414214,0],[0,0,-1.414214]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,1],[1,4,5],[1,5,2],[2,5,3],[3,5,4]]},t[2]={vertex:[[0,0,1.070466],[.7136442,0,.7978784],[-.3568221,.618034,.7978784],[-.3568221,-.618034,.7978784],[.7978784,.618034,.3568221],[.7978784,-.618034,.3568221],[-.9341724,.381966,.3568221],[.1362939,1,.3568221],[.1362939,-1,.3568221],[-.9341724,-.381966,.3568221],[.9341724,.381966,-.3568221],[.9341724,-.381966,-.3568221],[-.7978784,.618034,-.3568221],[-.1362939,1,-.3568221],[-.1362939,-1,-.3568221],[-.7978784,-.618034,-.3568221],[.3568221,.618034,-.7978784],[.3568221,-.618034,-.7978784],[-.7136442,0,-.7978784],[0,0,-1.070466]],face:[[0,1,4,7,2],[0,2,6,9,3],[0,3,8,5,1],[1,5,11,10,4],[2,7,13,12,6],[3,9,15,14,8],[4,10,16,13,7],[5,8,14,17,11],[6,12,18,15,9],[10,11,17,19,16],[12,13,16,19,18],[14,15,18,19,17]]},t[3]={vertex:[[0,0,1.175571],[1.051462,0,.5257311],[.3249197,1,.5257311],[-.8506508,.618034,.5257311],[-.8506508,-.618034,.5257311],[.3249197,-1,.5257311],[.8506508,.618034,-.5257311],[.8506508,-.618034,-.5257311],[-.3249197,1,-.5257311],[-1.051462,0,-.5257311],[-.3249197,-1,-.5257311],[0,0,-1.175571]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,5],[0,5,1],[1,5,7],[1,7,6],[1,6,2],[2,6,8],[2,8,3],[3,8,9],[3,9,4],[4,9,10],[4,10,5],[5,10,7],[6,7,11],[6,11,8],[7,10,11],[8,11,9],[9,11,10]]},t[4]={vertex:[[0,0,1.070722],[.7148135,0,.7971752],[-.104682,.7071068,.7971752],[-.6841528,.2071068,.7971752],[-.104682,-.7071068,.7971752],[.6101315,.7071068,.5236279],[1.04156,.2071068,.1367736],[.6101315,-.7071068,.5236279],[-.3574067,1,.1367736],[-.7888348,-.5,.5236279],[-.9368776,.5,.1367736],[-.3574067,-1,.1367736],[.3574067,1,-.1367736],[.9368776,-.5,-.1367736],[.7888348,.5,-.5236279],[.3574067,-1,-.1367736],[-.6101315,.7071068,-.5236279],[-1.04156,-.2071068,-.1367736],[-.6101315,-.7071068,-.5236279],[.104682,.7071068,-.7971752],[.6841528,-.2071068,-.7971752],[.104682,-.7071068,-.7971752],[-.7148135,0,-.7971752],[0,0,-1.070722]],face:[[0,2,3],[1,6,5],[4,9,11],[7,15,13],[8,16,10],[12,14,19],[17,22,18],[20,21,23],[0,1,5,2],[0,3,9,4],[0,4,7,1],[1,7,13,6],[2,5,12,8],[2,8,10,3],[3,10,17,9],[4,11,15,7],[5,6,14,12],[6,13,20,14],[8,12,19,16],[9,17,18,11],[10,16,22,17],[11,18,21,15],[13,15,21,20],[14,20,23,19],[16,19,23,22],[18,22,23,21]]},t[5]={vertex:[[0,0,1.322876],[1.309307,0,.1889822],[-.9819805,.8660254,.1889822],[.1636634,-1.299038,.1889822],[.3273268,.8660254,-.9449112],[-.8183171,-.4330127,-.9449112]],face:[[0,3,1],[2,4,5],[0,1,4,2],[0,2,5,3],[1,3,5,4]]},t[6]={vertex:[[0,0,1.159953],[1.013464,0,.5642542],[-.3501431,.9510565,.5642542],[-.7715208,-.6571639,.5642542],[.6633206,.9510565,-.03144481],[.8682979,-.6571639,-.3996071],[-1.121664,.2938926,-.03144481],[-.2348831,-1.063314,-.3996071],[.5181548,.2938926,-.9953061],[-.5850262,-.112257,-.9953061]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,9,7],[5,7,9,8],[0,3,7,5,1],[2,4,8,9,6]]},t[7]={vertex:[[0,0,1.118034],[.8944272,0,.6708204],[-.2236068,.8660254,.6708204],[-.7826238,-.4330127,.6708204],[.6708204,.8660254,.2236068],[1.006231,-.4330127,-.2236068],[-1.006231,.4330127,.2236068],[-.6708204,-.8660254,-.2236068],[.7826238,.4330127,-.6708204],[.2236068,-.8660254,-.6708204],[-.8944272,0,-.6708204],[0,0,-1.118034]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,10,7],[5,9,11,8],[7,10,11,9],[0,3,7,9,5,1],[2,4,8,11,10,6]]},t[8]={vertex:[[-.729665,.670121,.319155],[-.655235,-.29213,-.754096],[-.093922,-.607123,.537818],[.702196,.595691,.485187],[.776626,-.36656,-.588064]],face:[[1,4,2],[0,1,2],[3,0,2],[4,3,2],[4,1,0,3]]},t[9]={vertex:[[-.868849,-.100041,.61257],[-.329458,.976099,.28078],[-.26629,-.013796,-.477654],[-.13392,-1.034115,.229829],[.738834,.707117,-.307018],[.859683,-.535264,-.338508]],face:[[3,0,2],[5,3,2],[4,5,2],[1,4,2],[0,1,2],[0,3,5,4,1]]},t[10]={vertex:[[-.610389,.243975,.531213],[-.187812,-.48795,-.664016],[-.187812,.9759,-.664016],[.187812,-.9759,.664016],[.798201,.243975,.132803]],face:[[1,3,0],[3,4,0],[3,1,4],[0,2,1],[0,4,2],[2,4,1]]},t[11]={vertex:[[-1.028778,.392027,-.048786],[-.640503,-.646161,.621837],[-.125162,-.395663,-.540059],[.004683,.888447,-.651988],[.125161,.395663,.540059],[.632925,-.791376,.433102],[1.031672,.157063,-.354165]],face:[[3,2,0],[2,1,0],[2,5,1],[0,4,3],[0,1,4],[4,1,5],[2,3,6],[3,4,6],[5,2,6],[4,5,6]]},t[12]={vertex:[[-.669867,.334933,-.529576],[-.669867,.334933,.529577],[-.4043,1.212901,0],[-.334933,-.669867,-.529576],[-.334933,-.669867,.529577],[.334933,.669867,-.529576],[.334933,.669867,.529577],[.4043,-1.212901,0],[.669867,-.334933,-.529576],[.669867,-.334933,.529577]],face:[[8,9,7],[6,5,2],[3,8,7],[5,0,2],[4,3,7],[0,1,2],[9,4,7],[1,6,2],[9,8,5,6],[8,3,0,5],[3,4,1,0],[4,9,6,1]]},t[13]={vertex:[[-.931836,.219976,-.264632],[-.636706,.318353,.692816],[-.613483,-.735083,-.264632],[-.326545,.979634,0],[-.318353,-.636706,.692816],[-.159176,.477529,-.856368],[.159176,-.477529,-.856368],[.318353,.636706,.692816],[.326545,-.979634,0],[.613482,.735082,-.264632],[.636706,-.318353,.692816],[.931835,-.219977,-.264632]],face:[[11,10,8],[7,9,3],[6,11,8],[9,5,3],[2,6,8],[5,0,3],[4,2,8],[0,1,3],[10,4,8],[1,7,3],[10,11,9,7],[11,6,5,9],[6,2,0,5],[2,4,1,0],[4,10,7,1]]},t[14]={vertex:[[-.93465,.300459,-.271185],[-.838689,-.260219,-.516017],[-.711319,.717591,.128359],[-.710334,-.156922,.080946],[-.599799,.556003,-.725148],[-.503838,-.004675,-.969981],[-.487004,.26021,.48049],[-.460089,-.750282,-.512622],[-.376468,.973135,-.325605],[-.331735,-.646985,.084342],[-.254001,.831847,.530001],[-.125239,-.494738,-.966586],[.029622,.027949,.730817],[.056536,-.982543,-.262295],[.08085,1.087391,.076037],[.125583,-.532729,.485984],[.262625,.599586,.780328],[.391387,-.726999,-.716259],[.513854,-.868287,.139347],[.597475,.85513,.326364],[.641224,.109523,.783723],[.737185,-.451155,.538891],[.848705,-.612742,-.314616],[.976075,.365067,.32976],[1.072036,-.19561,.084927]],face:[[15,18,21],[12,20,16],[6,10,2],[3,0,1],[9,7,13],[2,8,4,0],[0,4,5,1],[1,5,11,7],[7,11,17,13],[13,17,22,18],[18,22,24,21],[21,24,23,20],[20,23,19,16],[16,19,14,10],[10,14,8,2],[15,9,13,18],[12,15,21,20],[6,12,16,10],[3,6,2,0],[9,3,1,7],[9,15,12,6,3],[22,17,11,5,4,8,14,19,23,24]]};var n,i,r,o,a,s,c=e.type&&(e.type<0||e.type>=t.length)?0:e.type||0,l=e.size,u=e.sizeX||l||1,h=e.sizeY||l||1,d=e.sizeZ||l||1,p=e.custom||t[c],f=p.face.length,m=e.faceUV||new Array(f),_=e.faceColors,g=void 0===e.flat||e.flat,y=0===e.sideOrientation?0:e.sideOrientation||Cr.DEFAULTSIDE,v=[],b=[],T=[],E=[],A=[],x=0,S=0,C=[],I=0,R=0;if(g)for(R=0;R0){var V=i(L,M[w+k],N,4);R[B]=M[w+k],O[B]=h.Lerp(D[w+k],V>=0?F[V]:0,I),B++}for(k=0;k<4&&B<4;++k){var z=L[N+k];-1===i(M,z,w,4)&&(R[B]=z,O[B]=h.Lerp(0,F[N+k],I),B++)}var G=O[0]+O[1]+O[2]+O[3];O[0]/=G,O[1]/=G,O[2]/=G,O[3]/=G}var H=e.localPositionOverride?e.localPositionOverride[0]:null!==(l=null==f?void 0:f[e.vertexIdx])&&void 0!==l?l:0,j=e.localPositionOverride?e.localPositionOverride[1]:null!==(u=null==f?void 0:f[e.vertexIdx+1])&&void 0!==u?u:0,W=e.localPositionOverride?e.localPositionOverride[2]:null!==(d=null==f?void 0:f[e.vertexIdx+2])&&void 0!==d?d:0,X=r.localPositionOverride?r.localPositionOverride[0]:null!==(p=null==f?void 0:f[r.vertexIdx])&&void 0!==p?p:0,Y=r.localPositionOverride?r.localPositionOverride[1]:null!==(_=null==f?void 0:f[r.vertexIdx+1])&&void 0!==_?_:0,q=r.localPositionOverride?r.localPositionOverride[2]:null!==(v=null==f?void 0:f[r.vertexIdx+2])&&void 0!==v?v:0,K=e.localNormalOverride?e.localNormalOverride[0]:null!==(b=null==m?void 0:m[e.vertexIdx])&&void 0!==b?b:0,Q=e.localNormalOverride?e.localNormalOverride[1]:null!==(T=null==m?void 0:m[e.vertexIdx+1])&&void 0!==T?T:0,Z=e.localNormalOverride?e.localNormalOverride[2]:null!==(E=null==m?void 0:m[e.vertexIdx+2])&&void 0!==E?E:0,$=K+((r.localNormalOverride?r.localNormalOverride[0]:null!==(A=null==m?void 0:m[r.vertexIdx])&&void 0!==A?A:0)-K)*I,J=Q+((r.localNormalOverride?r.localNormalOverride[1]:null!==(x=null==m?void 0:m[r.vertexIdx+1])&&void 0!==x?x:0)-Q)*I,ee=Z+((r.localNormalOverride?r.localNormalOverride[2]:null!==(P=null==m?void 0:m[r.vertexIdx+2])&&void 0!==P?P:0)-Z)*I,te=Math.sqrt($*$+J*J+ee*ee);return new vh(C.Lerp(e.position,r.position,I),C.Lerp(e.normal,r.normal,I).normalize(),S.Lerp(e.uv,r.uv,I),-1,-1,f?[H+(X-H)*I,j+(Y-j)*I,W+(q-W)*I]:null,m?[$/te,J/te,ee/te]:null,R,O)},o=null;e.length>3&&(o=[]);for(var a=0;a0,p=C.Dot(e[a+1].position,t)-n>0,_=C.Dot(e[a+2].position,t)-n>0;switch((d?1:0)+(p?1:0)+(_?1:0)){case 0:e.length>3?(o.push(e[a]),o.push(e[a+1]),o.push(e[a+2])):o=e;break;case 1:if(o=null!=o?o:new Array,d&&(s=e[a+1],c=e[a+2],l=r(e[a],s),u=r(e[a],c)),p){s=e[a],c=e[a+2],l=r(e[a+1],s),u=r(e[a+1],c),o.push(l),o.push(c.clone()),o.push(s.clone()),o.push(c.clone()),o.push(l.clone()),o.push(u);break}_&&(s=e[a],c=e[a+1],l=r(e[a+2],s),u=r(e[a+2],c)),s&&c&&l&&u&&(o.push(s.clone()),o.push(c.clone()),o.push(l),o.push(u),o.push(l.clone()),o.push(c.clone()));break;case 2:o=null!=o?o:new Array,d||(c=r(s=e[a].clone(),e[a+1]),l=r(s,e[a+2]),o.push(s),o.push(c),o.push(l)),p||(c=r(s=e[a+1].clone(),e[a+2]),l=r(s,e[a]),o.push(s),o.push(c),o.push(l)),_||(c=r(s=e[a+2].clone(),e[a]),l=r(s,e[a+1]),o.push(s),o.push(c),o.push(l))}}return o},V=t instanceof no?t:null,z=null==V?void 0:V._thinInstanceDataStorage.matrixData,G=(null==V?void 0:V.thinInstanceCount)||1,H=w.Matrix[0];H.copyFrom(R.IdentityReadOnly);for(var j=0;j2?A[c[p]]=[-x[n][0],x[n][1],c[p]]:A[c[p]]=[E[x[n][0]],x[n][1],c[p]]};this.IDATA.edgematch=[[1,"B"],[2,"B"],[3,"B"],[4,"B"],[0,"B"],[10,"O",14,"A"],[11,"O",10,"A"],[12,"O",11,"A"],[13,"O",12,"A"],[14,"O",13,"A"],[0,"O"],[1,"O"],[2,"O"],[3,"O"],[4,"O"],[19,"B",5,"A"],[15,"B",6,"A"],[16,"B",7,"A"],[17,"B",8,"A"],[18,"B",9,"A"]];for(var C=0;C<20;C++){if(r=(E=this.IDATA.face[C])[2],o=E[1],a=E[0],m=_.x+"|"+_.y,(p=C+"|"+m)in c||(c[p]=r,A[r]=[E[x[m][0]],x[m][1]]),m=g.x+"|"+g.y,(p=C+"|"+m)in c||(c[p]=o,A[o]=[E[x[m][0]],x[m][1]]),m=y.x+"|"+y.y,(p=C+"|"+m)in c||(c[p]=a,A[a]=[E[x[m][0]],x[m][1]]),n=this.IDATA.edgematch[C][0],"B"===(i=this.IDATA.edgematch[C][1]))for(var P=1;P2?A[c[p]]=[-x[m][0],x[m][1],c[p]]:A[c[p]]=[E[x[m][0]],x[m][1],c[p]])}this.closestTo=A,this.vecToidx=c},e.prototype.calcCoeffs=function(){var e=this.m,t=this.n,n=Math.sqrt(3)/3,i=e*e+t*t+e*t;this.coau=(e+t)/i,this.cobu=-t/i,this.coav=-n*(e-t)/i,this.cobv=n*(2*e+t)/i},e.prototype.createInnerFacets=function(){for(var e=this.m,t=this.n,n=0;n0&&i0){for(var c=h.HCF(e,t),l=e/c,u=t/c,d=1;d-1?i[n][1]>0&&t[i[n][0]].push([n,i[n][1]]):t[12].push([n,i[n][0]]);var r=[];for(n=0;n<12;n++)r[n]=n;var o=12;for(n=0;n<12;n++){t[n].sort((function(e,t){return e[1]-t[1]}));for(var a=0;a0;)r=t[s],this.face[r].indexOf(a)>-1?(o=(this.face[r].indexOf(a)+1)%3,a=this.face[r][o],n.push(a),i.push(r),t.splice(s,1),s=0):s++;return this.adjacentFaces.push(n),i},t.prototype.toGoldbergPolyhedronData=function(){var e=this,t=new xh("GeoDual","Goldberg",[],[]);t.name="GD dual";for(var n=this.vertex.length,i=new Array(n),r=0;ri){var o=r;r=i,i=o,J.Warn("n > m therefore m and n swapped")}var a=new Ah;return a.build(i,r),hh(e,{custom:Sh.BuildGeodesicData(a),size:t.size,sizeX:t.sizeX,sizeY:t.sizeY,sizeZ:t.sizeZ,faceUV:t.faceUV,faceColors:t.faceColors,flat:t.flat,updatable:t.updatable,sideOrientation:t.sideOrientation,frontUVs:t.frontUVs,backUVs:t.backUVs},n)}no._GoldbergMeshParser=function(e,t){return Ph.Parse(e,t)};var Ph=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.goldbergData={faceColors:[],faceCenters:[],faceZaxis:[],faceXaxis:[],faceYaxis:[],nbSharedFaces:0,nbUnsharedFaces:0,nbFaces:0,nbFacesAtPole:0,adjacentFaces:[]},t}return H(t,e),t.prototype.relatedGoldbergFace=function(e,t){return void 0===t?(e>this.goldbergData.nbUnsharedFaces-1&&(J.Warn("Maximum number of unshared faces used"),e=this.goldbergData.nbUnsharedFaces-1),this.goldbergData.nbUnsharedFaces+e):(e>11&&(J.Warn("Last pole used"),e=11),t>this.goldbergData.nbFacesAtPole-1&&(J.Warn("Maximum number of faces at a pole used"),t=this.goldbergData.nbFacesAtPole-1),12+e*this.goldbergData.nbFacesAtPole+t)},t.prototype._changeGoldbergFaceColors=function(e){for(var t=0;t1&&(u=1),c.push(u,h);for(d=0;d<6;d++)u=o.x+a*Math.cos(s+d*Math.PI/3),h=o.y+a*Math.sin(s+d*Math.PI/3),u<0&&(u=0),u>1&&(u=1),l.push(u,h);for(var p=i;ps){var l=c;c=s,s=l,J.Warn("n > m therefore m and n swapped")}var u=new Ah;u.build(s,c);var h=Sh.BuildGeodesicData(u),d=h.toGoldbergPolyhedronData(),p=new Ph(e,n);t.sideOrientation=no._GetDefaultSideOrientation(t.sideOrientation),p._originalBuilderSideOrientation=t.sideOrientation,Ih(t,d).applyToMesh(p,t.updatable),p.goldbergData.nbSharedFaces=h.sharedNodes,p.goldbergData.nbUnsharedFaces=h.poleNodes,p.goldbergData.adjacentFaces=h.adjacentFaces,p.goldbergData.nbFaces=p.goldbergData.nbSharedFaces+p.goldbergData.nbUnsharedFaces,p.goldbergData.nbFacesAtPole=(p.goldbergData.nbUnsharedFaces-12)/12;for(var f=0;f0?this._holes.push(n):this._paths.push(n)}if(!this._paths.length&&this._holes.length){var i=this._holes;this._holes=this._paths,this._paths=i}this._tempPaths.length=0},Object.defineProperty(e.prototype,"paths",{get:function(){return this._paths},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"holes",{get:function(){return this._holes},enumerable:!1,configurable:!0}),e}();function wh(e,t,n,i,r,o){var a=o.glyphs[e]||o.glyphs["?"];if(!a)return null;var s=new Oh(r);if(a.o)for(var c=a.o.split(" "),l=0,u=c.length;lm&&(e.x=1*Math.sign(e.x)),Math.abs(e.y-1)>m&&(e.y=1*Math.sign(e.y)),Math.abs(e.z-1)>m&&(e.z=1*Math.sign(e.z))},e.prototype._updateDebugConstraint=function(e,t){var n=this;if(e._initOptions){var i=e._initOptions,r=i.pivotA,o=i.pivotB,a=i.axisA,s=i.axisB,c=i.perpAxisA,l=i.perpAxisB;r&&o&&a&&s&&c&&l&&t.getDescendants(!0).forEach((function(e){var t=e.getDescendants(!0)[0],i=e.getDescendants(!0)[1],u=t.metadata,h=u.parentBody,d=u.parentBodyIndex,p=i.metadata,f=p.childBody,m=p.childBodyIndex,_=n._getTransformFromBodyToRef(h,w.Matrix[0],d),g=n._getTransformFromBodyToRef(f,w.Matrix[1],m);_.decomposeToTransformNode(t),n._makeScalingUnitInPlace(t.scaling),g.decomposeToTransformNode(i),n._makeScalingUnitInPlace(i.scaling);var y=t.getDescendants(!0)[0];y.position.copyFrom(r);var v=i.getDescendants(!0)[0];v.position.copyFrom(o),I.FromRotationMatrixToRef(R.FromXYZAxesToRef(a,c,C.CrossToRef(a,c,w.Vector3[0]),w.Matrix[0]),y.rotationQuaternion),I.FromRotationMatrixToRef(R.FromXYZAxesToRef(s,l,C.CrossToRef(s,l,w.Vector3[1]),w.Matrix[1]),v.rotationQuaternion)}))}},e.prototype.showImpostor=function(e,t){var n=this;if(!this._scene)return null;for(var i=0;i-1&&this._debugMeshMeshes.splice(o,1),this._numMeshes--,this._numMeshes>0?(this._meshes[i]=this._meshes[this._numMeshes],this._impostors[i]=this._impostors[this._numMeshes],this._meshes[this._numMeshes]=null,this._impostors[this._numMeshes]=null):(this._meshes[0]=null,this._impostors[0]=null),t=!0;break}t&&0===this._numMeshes&&this._scene.unregisterBeforeRender(this._renderFunction)}},e.prototype.hideBody=function(e){if(e&&this._scene&&this._utilityLayer){for(var t=!1,n=this._utilityLayer.utilityLayerScene,i=0;i0?(this._bodyMeshes[i]=this._bodyMeshes[this._numBodies],this._bodies[i]=this._bodies[this._numBodies],this._bodyMeshes[this._numBodies]=null,this._bodies[this._numBodies]=null):(this._bodyMeshes[0]=null,this._bodies[0]=null),t=!0;break}t&&0===this._numBodies&&this._scene.unregisterBeforeRender(this._renderFunction)}},e.prototype.hideInertia=function(e){if(e&&this._scene&&this._utilityLayer){for(var t=!1,n=this._utilityLayer.utilityLayerScene,i=0;i0?(this._constraints[i]=this._constraints[this._numConstraints],this._constraintMeshes[i]=this._constraintMeshes[this._numConstraints],this._constraints[this._numConstraints]=null,this._constraintMeshes[this._numConstraints]=null):(this._constraints[0]=null,this._constraintMeshes[0]=null),t=!0;break}t&&0===this._numConstraints&&this._scene.unregisterBeforeRender(this._constraintRenderFunction)}},e.prototype._getDebugMaterial=function(e){return this._debugMaterial||(this._debugMaterial=new ml("",e),this._debugMaterial.wireframe=!0,this._debugMaterial.emissiveColor=B.White(),this._debugMaterial.disableLighting=!0),this._debugMaterial},e.prototype._getDebugInertiaMaterial=function(e){return this._debugInertiaMaterial||(this._debugInertiaMaterial=new ml("",e),this._debugInertiaMaterial.disableLighting=!0,this._debugInertiaMaterial.alpha=0),this._debugInertiaMaterial},e.prototype._getDebugBoxMesh=function(e){return this._debugBoxMesh||(this._debugBoxMesh=mu("physicsBodyBoxViewMesh",{size:1},e),this._debugBoxMesh.rotationQuaternion=I.Identity(),this._debugBoxMesh.material=this._getDebugMaterial(e),this._debugBoxMesh.setEnabled(!1)),this._debugBoxMesh.createInstance("physicsBodyBoxViewInstance")},e.prototype._getDebugSphereMesh=function(e){return this._debugSphereMesh||(this._debugSphereMesh=yu("physicsBodySphereViewMesh",{diameter:1},e),this._debugSphereMesh.rotationQuaternion=I.Identity(),this._debugSphereMesh.material=this._getDebugMaterial(e),this._debugSphereMesh.setEnabled(!1)),this._debugSphereMesh.createInstance("physicsBodySphereViewInstance")},e.prototype._getDebugCapsuleMesh=function(e){return this._debugCapsuleMesh||(this._debugCapsuleMesh=Tu("physicsBodyCapsuleViewMesh",{height:1},e),this._debugCapsuleMesh.rotationQuaternion=I.Identity(),this._debugCapsuleMesh.material=this._getDebugMaterial(e),this._debugCapsuleMesh.setEnabled(!1)),this._debugCapsuleMesh.createInstance("physicsBodyCapsuleViewInstance")},e.prototype._getDebugCylinderMesh=function(e){return this._debugCylinderMesh||(this._debugCylinderMesh=tu("physicsBodyCylinderViewMesh",{diameterTop:1,diameterBottom:1,height:1},e),this._debugCylinderMesh.rotationQuaternion=I.Identity(),this._debugCylinderMesh.material=this._getDebugMaterial(e),this._debugCylinderMesh.setEnabled(!1)),this._debugCylinderMesh.createInstance("physicsBodyCylinderViewInstance")},e.prototype._getDebugMeshMesh=function(e,t){var n=new no(e.name,t,null,e);return n.setParent(e),n.position=C.Zero(),n.material=this._getDebugMaterial(t),this._debugMeshMeshes.push(n),n},e.prototype._getDebugMesh=function(e,t){var n=this;if(!this._utilityLayer)return null;if(t&&t.parent&&t.parent.physicsImpostor)return null;var i=null,r=this._utilityLayer.utilityLayerScene;if(!e.physicsBody)return J.Warn("Unable to get physicsBody of impostor. It might be initialized later by its parent's impostor."),null;switch(e.type){case ta.BoxImpostor:i=this._getDebugBoxMesh(r),e.getBoxSizeToRef(i.scaling);break;case ta.SphereImpostor:i=this._getDebugSphereMesh(r);var o=e.getRadius();i.scaling.x=2*o,i.scaling.y=2*o,i.scaling.z=2*o;break;case ta.CapsuleImpostor:i=this._getDebugCapsuleMesh(r);var a=e.object.getBoundingInfo();i.scaling.x=2*(a.boundingBox.maximum.x-a.boundingBox.minimum.x)*e.object.scaling.x,i.scaling.y=(a.boundingBox.maximum.y-a.boundingBox.minimum.y)*e.object.scaling.y,i.scaling.z=2*(a.boundingBox.maximum.z-a.boundingBox.minimum.z)*e.object.scaling.z;break;case ta.MeshImpostor:t&&(i=this._getDebugMeshMesh(t,r));break;case ta.NoImpostor:t?t.getChildMeshes().filter((function(e){return e.physicsImpostor?1:0})).forEach((function(e){if(e.physicsImpostor&&"Mesh"===e.getClassName()){var t=e.getBoundingInfo(),o=t.boundingBox.minimum,a=t.boundingBox.maximum;switch(e.physicsImpostor.type){case ta.BoxImpostor:(i=n._getDebugBoxMesh(r)).position.copyFrom(o),i.position.addInPlace(a),i.position.scaleInPlace(.5);break;case ta.SphereImpostor:i=n._getDebugSphereMesh(r);break;case ta.CylinderImpostor:i=n._getDebugCylinderMesh(r);break;default:i=null}i&&(i.scaling.x=a.x-o.x,i.scaling.y=a.y-o.y,i.scaling.z=a.z-o.z,i.parent=e)}})):J.Warn("No target mesh parameter provided for NoImpostor. Skipping."),i=null;break;case ta.CylinderImpostor:i=this._getDebugCylinderMesh(r),a=e.object.getBoundingInfo(),i.scaling.x=(a.boundingBox.maximum.x-a.boundingBox.minimum.x)*e.object.scaling.x,i.scaling.y=(a.boundingBox.maximum.y-a.boundingBox.minimum.y)*e.object.scaling.y,i.scaling.z=(a.boundingBox.maximum.z-a.boundingBox.minimum.z)*e.object.scaling.z}return i},e.prototype._getDebugBodyMesh=function(e){if(!this._utilityLayer)return null;var t=this._utilityLayer.utilityLayerScene,n=new no("custom",t),i=new Cr,r=e.getGeometry();if(i.positions=r.positions,i.indices=r.indices,i.applyToMesh(n),e._pluginDataInstances){var o=new Float32Array(16*e._pluginDataInstances.length);n.thinInstanceSetBuffer("matrix",o,16)}return n.material=this._getDebugMaterial(t),n},e.prototype._getMeshDebugInertiaMatrixToRef=function(e,t){var n,i,r,o=null!==(n=e.inertiaOrientation)&&void 0!==n?n:I.Identity(),a=null!==(i=e.inertia)&&void 0!==i?i:C.Zero(),s=null!==(r=e.centerOfMass)&&void 0!==r?r:C.Zero(),c=6*(a.x-a.y+a.z),l=Math.sqrt(Math.max(c,0)),u=12*a.x-c,h=Math.sqrt(Math.max(u,0)),d=12*a.z-c,p=Math.sqrt(Math.max(d,0)),f=w.Vector3[0];f.set(p,l,h);var m=R.ScalingToRef(f.x,f.y,f.z,w.Matrix[0]),_=o.toRotationMatrix(w.Matrix[1]),g=R.TranslationToRef(s.x,s.y,s.z,w.Matrix[2]);return m.multiplyToRef(_,t),t.multiplyToRef(g,t),t},e.prototype._getDebugInertiaMesh=function(e){if(!this._utilityLayer)return null;var t=this._utilityLayer.utilityLayerScene,n=Nh.CreateBox("custom",{size:1},t),i=R.Identity();if(e._pluginDataInstances.length){for(var r=new Float32Array(16*e._pluginDataInstances.length),o=0;o=0?R.FromArrayToRef(i._thinInstanceDataStorage.matrixData,n,t):t.copyFrom(i.getWorldMatrix())},e.prototype._getDebugConstraintMesh=function(e){if(!this._utilityLayer)return null;var t=this._utilityLayer.utilityLayerScene;if(!e._initOptions)return null;var n=e._initOptions,i=n.pivotA,r=n.pivotB,o=n.axisA,a=n.axisB,s=n.perpAxisA,c=n.perpAxisB;if(!(i&&r&&o&&a&&s&&c))return null;for(var l=new no("parentingDebugConstraint",t),u=0,h=e.getBodiesUsingConstraint();u=0;e--)this.hideImpostor(this._impostors[0]);for(e=this._numBodies-1;e>=0;e--)this.hideBody(this._bodies[0]);for(e=this._numInertiaBodies-1;e>=0;e--)this.hideInertia(this._inertiaBodies[0]);this._debugBoxMesh&&this._debugBoxMesh.dispose(),this._debugSphereMesh&&this._debugSphereMesh.dispose(),this._debugCylinderMesh&&this._debugCylinderMesh.dispose(),this._debugMaterial&&this._debugMaterial.dispose(),this._impostors.length=0,this._scene=null,this._physicsEnginePlugin=null,this._utilityLayer&&(this._utilityLayer.dispose(),this._utilityLayer=null)},e}(),Fh=function(){function e(e){this.ray=e}return e.CreateAndShow=function(t,n,i){var r=new e(t);return r.show(n,i),r},e.prototype.show=function(e,t){var n=this;if(!this._renderFunction&&this.ray){var i=this.ray;this._renderFunction=function(){return n._render()},this._scene=e,this._renderPoints=[i.origin,i.origin.add(i.direction.scale(i.length))],this._renderLine=Wu("ray",{points:this._renderPoints,updatable:!0},e),this._renderLine.isPickable=!1,this._renderFunction&&this._scene.registerBeforeRender(this._renderFunction)}t&&this._renderLine&&this._renderLine.color.copyFrom(t)},e.prototype.hide=function(){this._renderFunction&&this._scene&&(this._scene.unregisterBeforeRender(this._renderFunction),this._scene=null,this._renderFunction=null,this._renderLine&&(this._renderLine.dispose(),this._renderLine=null),this._renderPoints=[])},e.prototype._render=function(){var e,t=this.ray;if(t){var n=this._renderPoints[1],i=Math.min(t.length,1e6);n.copyFrom(t.direction),n.scaleInPlace(i),n.addInPlace(t.origin),this._renderPoints[0].copyFrom(t.origin),Wu("ray",{points:this._renderPoints,updatable:!0,instance:this._renderLine},this._scene),null===(e=this._renderLine)||void 0===e||e.refreshBoundingInfo()}},e.prototype.attachToMesh=function(e,t,n,i){var r=this;this._attachedToMesh=e;var o=this.ray;o&&(o.direction||(o.direction=C.Zero()),o.origin||(o.origin=C.Zero()),i&&(o.length=i),n||(n=C.Zero()),t||(t=new C(0,0,-1)),this._scene||(this._scene=e.getScene()),this._meshSpaceDirection?(this._meshSpaceDirection.copyFrom(t),this._meshSpaceOrigin.copyFrom(n)):(this._meshSpaceDirection=t.clone(),this._meshSpaceOrigin=n.clone()),this._onAfterRenderObserver||(this._onAfterRenderObserver=this._scene.onBeforeRenderObservable.add((function(){return r._updateToMesh()})),this._onAfterStepObserver=this._scene.onAfterStepObservable.add((function(){return r._updateToMesh()}))),this._attachedToMesh.computeWorldMatrix(!0),this._updateToMesh())},e.prototype.detachFromMesh=function(){this._attachedToMesh&&this._scene&&(this._onAfterRenderObserver&&(this._scene.onBeforeRenderObservable.remove(this._onAfterRenderObserver),this._scene.onAfterStepObservable.remove(this._onAfterStepObserver)),this._attachedToMesh=null,this._onAfterRenderObserver=null,this._onAfterStepObserver=null,this._scene=null)},e.prototype._updateToMesh=function(){var e=this.ray;this._attachedToMesh&&e&&(this._attachedToMesh.isDisposed()?this.detachFromMesh():(this._attachedToMesh.getDirectionToRef(this._meshSpaceDirection,e.direction),C.TransformCoordinatesToRef(this._meshSpaceOrigin,this._attachedToMesh.getWorldMatrix(),e.origin)))},e.prototype.dispose=function(){this.hide(),this.detachFromMesh(),this.ray=null},e}(),Bh=function(){function e(t,n,i,r,o,a){var s,c,l,u,h,d,p,f,m,_,g,y,v,b;if(void 0===r&&(r=!0),void 0===o&&(o=3),void 0===a&&(a={}),this.skeleton=t,this.mesh=n,this.autoUpdateBonesMatrices=r,this.renderingGroupId=o,this.options=a,this.color=B.White(),this._debugLines=new Array,this._localAxes=null,this._isEnabled=!0,this._obs=null,this._scene=i,this._ready=!1,a.pauseAnimations=null===(s=a.pauseAnimations)||void 0===s||s,a.returnToRest=null!==(c=a.returnToRest)&&void 0!==c&&c,a.displayMode=null!==(l=a.displayMode)&&void 0!==l?l:e.DISPLAY_LINES,a.displayOptions=null!==(u=a.displayOptions)&&void 0!==u?u:{},a.displayOptions.midStep=null!==(h=a.displayOptions.midStep)&&void 0!==h?h:.235,a.displayOptions.midStepFactor=null!==(d=a.displayOptions.midStepFactor)&&void 0!==d?d:.155,a.displayOptions.sphereBaseSize=null!==(p=a.displayOptions.sphereBaseSize)&&void 0!==p?p:.15,a.displayOptions.sphereScaleUnit=null!==(f=a.displayOptions.sphereScaleUnit)&&void 0!==f?f:2,a.displayOptions.sphereFactor=null!==(m=a.displayOptions.sphereFactor)&&void 0!==m?m:.865,a.displayOptions.spurFollowsChild=null!==(_=a.displayOptions.spurFollowsChild)&&void 0!==_&&_,a.displayOptions.showLocalAxes=null!==(g=a.displayOptions.showLocalAxes)&&void 0!==g&&g,a.displayOptions.localAxesSize=null!==(y=a.displayOptions.localAxesSize)&&void 0!==y?y:.075,a.computeBonesUsingShaders=null===(v=a.computeBonesUsingShaders)||void 0===v||v,a.useAllBones=null===(b=a.useAllBones)||void 0===b||b,this._boneIndices=new Set,!a.useAllBones){var T=null==n?void 0:n.getVerticesData(Yn.MatricesIndicesKind),E=null==n?void 0:n.getVerticesData(Yn.MatricesWeightsKind);if(T&&E)for(var A=0;Ae.DISPLAY_SPHERE_AND_SPURS&&(S=e.DISPLAY_LINES),this.displayMode=S,this.update(),this._bindObs()}return e.CreateBoneWeightShader=function(e,t){var n,i,r,o,a,s,c=e.skeleton,l=null!==(n=e.colorBase)&&void 0!==n?n:B.Black(),u=null!==(i=e.colorZero)&&void 0!==i?i:B.Blue(),h=null!==(r=e.colorQuarter)&&void 0!==r?r:B.Green(),d=null!==(o=e.colorHalf)&&void 0!==o?o:B.Yellow(),p=null!==(a=e.colorFull)&&void 0!==a?a:B.Red(),f=null!==(s=e.targetBoneIndex)&&void 0!==s?s:0;zt.ShadersStore["boneWeights:"+c.name+"VertexShader"]="precision highp float;\n\n attribute vec3 position;\n attribute vec2 uv;\n\n uniform mat4 view;\n uniform mat4 projection;\n uniform mat4 worldViewProjection;\n\n #include\n #if NUM_BONE_INFLUENCERS == 0\n attribute vec4 matricesIndices;\n attribute vec4 matricesWeights;\n #endif\n #include\n\n #include\n\n varying vec3 vColor;\n\n uniform vec3 colorBase;\n uniform vec3 colorZero;\n uniform vec3 colorQuarter;\n uniform vec3 colorHalf;\n uniform vec3 colorFull;\n\n uniform float targetBoneIndex;\n\n void main() {\n vec3 positionUpdated = position;\n\n #include\n #include\n #include\n\n vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0);\n\n vec3 color = colorBase;\n float totalWeight = 0.;\n if(matricesIndices[0] == targetBoneIndex && matricesWeights[0] > 0.){\n totalWeight += matricesWeights[0];\n }\n if(matricesIndices[1] == targetBoneIndex && matricesWeights[1] > 0.){\n totalWeight += matricesWeights[1];\n }\n if(matricesIndices[2] == targetBoneIndex && matricesWeights[2] > 0.){\n totalWeight += matricesWeights[2];\n }\n if(matricesIndices[3] == targetBoneIndex && matricesWeights[3] > 0.){\n totalWeight += matricesWeights[3];\n }\n\n color = mix(color, colorZero, smoothstep(0., 0.25, totalWeight));\n color = mix(color, colorQuarter, smoothstep(0.25, 0.5, totalWeight));\n color = mix(color, colorHalf, smoothstep(0.5, 0.75, totalWeight));\n color = mix(color, colorFull, smoothstep(0.75, 1.0, totalWeight));\n vColor = color;\n\n gl_Position = projection * view * worldPos;\n }",zt.ShadersStore["boneWeights:"+c.name+"FragmentShader"]="\n precision highp float;\n varying vec3 vPosition;\n\n varying vec3 vColor;\n\n void main() {\n vec4 color = vec4(vColor, 1.0);\n gl_FragColor = color;\n }\n ";var m=new ku("boneWeight:"+c.name,t,{vertex:"boneWeights:"+c.name,fragment:"boneWeights:"+c.name},{attributes:["position","normal","matricesIndices","matricesWeights"],uniforms:["world","worldView","worldViewProjection","view","projection","viewProjection","colorBase","colorZero","colorQuarter","colorHalf","colorFull","targetBoneIndex"]});return m.setColor3("colorBase",l),m.setColor3("colorZero",u),m.setColor3("colorQuarter",h),m.setColor3("colorHalf",d),m.setColor3("colorFull",p),m.setFloat("targetBoneIndex",f),m.getClassName=function(){return"BoneWeightShader"},m.transparencyMode=qr.MATERIAL_OPAQUE,m},e.CreateSkeletonMapShader=function(t,n){var i,r=t.skeleton,o=null!==(i=t.colorMap)&&void 0!==i?i:[{color:new B(1,.38,.18),location:0},{color:new B(.59,.18,1),location:.2},{color:new B(.59,1,.18),location:.4},{color:new B(1,.87,.17),location:.6},{color:new B(1,.17,.42),location:.8},{color:new B(.17,.68,1),location:1}],a=r.bones.length+1,s=e._CreateBoneMapColorBuffer(a,o,n),c=new ku("boneWeights:"+r.name,n,{vertexSource:"precision highp float;\n\n attribute vec3 position;\n attribute vec2 uv;\n\n uniform mat4 view;\n uniform mat4 projection;\n uniform mat4 worldViewProjection;\n uniform float colorMap["+4*r.bones.length+"];\n\n #include\n #if NUM_BONE_INFLUENCERS == 0\n attribute vec4 matricesIndices;\n attribute vec4 matricesWeights;\n #endif\n #include\n #include\n\n varying vec3 vColor;\n\n void main() {\n vec3 positionUpdated = position;\n\n #include\n #include\n #include\n\n vec3 color = vec3(0.);\n bool first = true;\n\n for (int i = 0; i < 4; i++) {\n int boneIdx = int(matricesIndices[i]);\n float boneWgt = matricesWeights[i];\n\n vec3 c = vec3(colorMap[boneIdx * 4 + 0], colorMap[boneIdx * 4 + 1], colorMap[boneIdx * 4 + 2]);\n\n if (boneWgt > 0.) {\n if (first) {\n first = false;\n color = c;\n } else {\n color = mix(color, c, boneWgt);\n }\n }\n }\n\n vColor = color;\n\n vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0);\n\n gl_Position = projection * view * worldPos;\n }",fragmentSource:"\n precision highp float;\n varying vec3 vColor;\n\n void main() {\n vec4 color = vec4( vColor, 1.0 );\n gl_FragColor = color;\n }\n "},{attributes:["position","normal","matricesIndices","matricesWeights"],uniforms:["world","worldView","worldViewProjection","view","projection","viewProjection","colorMap"]});return c.setFloats("colorMap",s),c.getClassName=function(){return"SkeletonMapShader"},c.transparencyMode=qr.MATERIAL_OPAQUE,c},e._CreateBoneMapColorBuffer=function(e,t,n){var i=new yl("temp",{width:e,height:1},n,!1),r=i.getContext(),o=r.createLinearGradient(0,0,e,0);t.forEach((function(e){o.addColorStop(e.location,e.color.toHexString())})),r.fillStyle=o,r.fillRect(0,0,e,1),i.update();for(var a=[],s=r.getImageData(0,0,e,1).data,c=0;ce.DISPLAY_SPHERE_AND_SPURS&&(t=e.DISPLAY_LINES),this.options.displayMode=t},enumerable:!1,configurable:!0}),e.prototype._bindObs=function(){var t=this;this.displayMode===e.DISPLAY_LINES&&(this._obs=this.scene.onBeforeRenderObservable.add((function(){t._displayLinesUpdate()})))},e.prototype.update=function(){switch(this.displayMode){case e.DISPLAY_LINES:this._displayLinesUpdate();break;case e.DISPLAY_SPHERES:this._buildSpheresAndSpurs(!0);break;case e.DISPLAY_SPHERE_AND_SPURS:this._buildSpheresAndSpurs(!1)}this._buildLocalAxes()},Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this.isEnabled!==e&&(this._isEnabled=e,this.debugMesh&&this.debugMesh.setEnabled(e),e&&!this._obs?this._bindObs():!e&&this._obs&&(this.scene.onBeforeRenderObservable.remove(this._obs),this._obs=null))},enumerable:!1,configurable:!0}),e.prototype._getBonePosition=function(e,t,n,i,r,o){void 0===i&&(i=0),void 0===r&&(r=0),void 0===o&&(o=0);var a=w.Matrix[0],s=t.getParent();if(a.copyFrom(t.getLocalMatrix()),0!==i||0!==r||0!==o){var c=w.Matrix[1];R.IdentityToRef(c),c.setTranslationFromFloats(i,r,o),c.multiplyToRef(a,a)}s&&a.multiplyToRef(s.getAbsoluteMatrix(),a),a.multiplyToRef(n,a),e.x=a.m[12],e.y=a.m[13],e.z=a.m[14]},e.prototype._getLinesForBonesWithLength=function(e,t){var n,i,r=e.length;t?(n=t.getWorldMatrix(),i=t.position):(n=new R,i=e[0].position);for(var o=0,a=0;a=0;a--){var s=e[a],c=s.getParent();if(c&&(this._boneIndices.has(s.getIndex())||this.options.useAllBones)){var l=this._debugLines[r];l||(l=[C.Zero(),C.Zero()],this._debugLines[r]=l),s.getAbsolutePositionToRef(t,l[0]),c.getAbsolutePositionToRef(t,l[1]),l[0].subtractInPlace(n),l[1].subtractInPlace(n),r++}}o||t.dispose()},e.prototype._revert=function(e){this.options.pauseAnimations&&(this.scene.animationsEnabled=e,this.utilityLayer.utilityLayerScene.animationsEnabled=e)},e.prototype._getAbsoluteBindPoseToRef=function(e,t){null!==e&&-1!==e._index?(this._getAbsoluteBindPoseToRef(e.getParent(),t),e.getBindMatrix().multiplyToRef(t,t)):t.copyFrom(R.Identity())},e.prototype._buildSpheresAndSpurs=function(e){var t,n,i;void 0===e&&(e=!0),this._debugMesh&&(this._debugMesh.dispose(),this._debugMesh=null,this.ready=!1),this._ready=!1;var r=null===(n=this.utilityLayer)||void 0===n?void 0:n.utilityLayerScene,o=this.skeleton.bones,a=[],s=[],c=this.scene.animationsEnabled;try{this.options.pauseAnimations&&(this.scene.animationsEnabled=!1,r.animationsEnabled=!1),this.options.returnToRest&&this.skeleton.returnToRest(),this.autoUpdateBonesMatrices&&this.skeleton.computeAbsoluteMatrices();for(var l=Number.NEGATIVE_INFINITY,u=this.options.displayOptions||{},h=function(t){var n=o[t];if(-1===n._index||!d._boneIndices.has(n.getIndex())&&!d.options.useAllBones)return"continue";var i=new R;d._getAbsoluteBindPoseToRef(n,i);var c=new C;i.decompose(void 0,void 0,c),n.children.forEach((function(t){var o=new R;t.getLocalMatrix().multiplyToRef(i,o);var a=new C;o.decompose(void 0,void 0,a);var h=C.Distance(c,a);if(h>l&&(l=h),!e){for(var d=a.clone().subtract(c.clone()),p=d.length(),f=d.normalize().scale(p),m=u.midStep||.165,_=u.midStepFactor||.215,g=f.scale(m),y=ih("skeletonViewer",{shape:[new C(1,-1,0),new C(1,1,0),new C(-1,1,0),new C(-1,-1,0),new C(1,-1,0)],path:[C.Zero(),g,f],scaleFunction:function(e){switch(e){case 0:case 2:return 0;case 1:return p*_}return 0},sideOrientation:no.DEFAULTSIDE,updatable:!1},r),v=y.getTotalVertices(),b=[],T=[],E=0;E9?T.push(t.getIndex(),0,0,0):T.push(n.getIndex(),0,0,0);y.position=c.clone(),y.setVerticesData(Yn.MatricesWeightsKind,b,!1),y.setVerticesData(Yn.MatricesIndicesKind,T,!1),y.convertToFlatShadedMesh(),s.push(y)}}));for(var h=yu("skeletonViewer",{segments:6,diameter:u.sphereBaseSize||.2,updatable:!0},r),p=h.getTotalVertices(),f=[],m=[],_=0;_=6&&e._showPlanes)})),this._oldPosition.set(Number.NaN,Number.NaN,Number.NaN),this._visible=!0},e.prototype.hide=function(){this._lightHelperFrustumMeshes.forEach((function(e){e.setEnabled(!1)})),this._visible=!1},e.prototype.update=function(){var e,t,n,i,r,o;if(this._visible&&(!this._oldPosition.equals(this._light.position)||!this._oldDirection.equals(this._light.direction)||this._oldAutoCalc!==this._light.autoCalcShadowZBounds||this._oldMinZ!==this._light.shadowMinZ||this._oldMaxZ!==this._light.shadowMaxZ)){this._oldPosition.copyFrom(this._light.position),this._oldDirection.copyFrom(this._light.direction),this._oldAutoCalc=this._light.autoCalcShadowZBounds,this._oldMinZ=this._light.shadowMinZ,this._oldMaxZ=this._light.shadowMaxZ,w.Vector3[0].set(this._light.orthoLeft,this._light.orthoBottom,void 0!==this._light.shadowMinZ?this._light.shadowMinZ:this._camera.minZ),w.Vector3[1].set(this._light.orthoRight,this._light.orthoTop,void 0!==this._light.shadowMaxZ?this._light.shadowMaxZ:this._camera.maxZ);var a=this._getInvertViewMatrix();w.Vector3[2].copyFromFloats(w.Vector3[1].x,w.Vector3[1].y,w.Vector3[0].z),w.Vector3[3].copyFromFloats(w.Vector3[1].x,w.Vector3[0].y,w.Vector3[0].z),w.Vector3[4].copyFromFloats(w.Vector3[0].x,w.Vector3[0].y,w.Vector3[0].z),w.Vector3[5].copyFromFloats(w.Vector3[0].x,w.Vector3[1].y,w.Vector3[0].z),C.TransformCoordinatesToRef(w.Vector3[2],a,w.Vector3[2]),C.TransformCoordinatesToRef(w.Vector3[3],a,w.Vector3[3]),C.TransformCoordinatesToRef(w.Vector3[4],a,w.Vector3[4]),C.TransformCoordinatesToRef(w.Vector3[5],a,w.Vector3[5]),w.Vector3[6].copyFromFloats(w.Vector3[1].x,w.Vector3[1].y,w.Vector3[1].z),w.Vector3[7].copyFromFloats(w.Vector3[1].x,w.Vector3[0].y,w.Vector3[1].z),w.Vector3[8].copyFromFloats(w.Vector3[0].x,w.Vector3[0].y,w.Vector3[1].z),w.Vector3[9].copyFromFloats(w.Vector3[0].x,w.Vector3[1].y,w.Vector3[1].z),C.TransformCoordinatesToRef(w.Vector3[6],a,w.Vector3[6]),C.TransformCoordinatesToRef(w.Vector3[7],a,w.Vector3[7]),C.TransformCoordinatesToRef(w.Vector3[8],a,w.Vector3[8]),C.TransformCoordinatesToRef(w.Vector3[9],a,w.Vector3[9]),Wu("nearlines",{updatable:!0,points:this._nearLinesPoints,instance:this._lightHelperFrustumMeshes[0]},this._scene),Wu("farlines",{updatable:!0,points:this._farLinesPoints,instance:this._lightHelperFrustumMeshes[1]},this._scene),Wu("trlines",{updatable:!0,points:this._trLinesPoints,instance:this._lightHelperFrustumMeshes[2]},this._scene),Wu("brlines",{updatable:!0,points:this._brLinesPoints,instance:this._lightHelperFrustumMeshes[3]},this._scene),Wu("tllines",{updatable:!0,points:this._tlLinesPoints,instance:this._lightHelperFrustumMeshes[4]},this._scene),Wu("bllines",{updatable:!0,points:this._blLinesPoints,instance:this._lightHelperFrustumMeshes[5]},this._scene),w.Vector3[2].toArray(this._nearPlaneVertices,0),w.Vector3[3].toArray(this._nearPlaneVertices,3),w.Vector3[4].toArray(this._nearPlaneVertices,6),w.Vector3[5].toArray(this._nearPlaneVertices,9),null===(e=this._lightHelperFrustumMeshes[6].geometry)||void 0===e||e.updateVerticesDataDirectly("position",this._nearPlaneVertices,0),w.Vector3[6].toArray(this._farPlaneVertices,0),w.Vector3[7].toArray(this._farPlaneVertices,3),w.Vector3[8].toArray(this._farPlaneVertices,6),w.Vector3[9].toArray(this._farPlaneVertices,9),null===(t=this._lightHelperFrustumMeshes[7].geometry)||void 0===t||t.updateVerticesDataDirectly("position",this._farPlaneVertices,0),w.Vector3[2].toArray(this._rightPlaneVertices,0),w.Vector3[6].toArray(this._rightPlaneVertices,3),w.Vector3[7].toArray(this._rightPlaneVertices,6),w.Vector3[3].toArray(this._rightPlaneVertices,9),null===(n=this._lightHelperFrustumMeshes[8].geometry)||void 0===n||n.updateVerticesDataDirectly("position",this._rightPlaneVertices,0),w.Vector3[5].toArray(this._leftPlaneVertices,0),w.Vector3[9].toArray(this._leftPlaneVertices,3),w.Vector3[8].toArray(this._leftPlaneVertices,6),w.Vector3[4].toArray(this._leftPlaneVertices,9),null===(i=this._lightHelperFrustumMeshes[9].geometry)||void 0===i||i.updateVerticesDataDirectly("position",this._leftPlaneVertices,0),w.Vector3[2].toArray(this._topPlaneVertices,0),w.Vector3[6].toArray(this._topPlaneVertices,3),w.Vector3[9].toArray(this._topPlaneVertices,6),w.Vector3[5].toArray(this._topPlaneVertices,9),null===(r=this._lightHelperFrustumMeshes[10].geometry)||void 0===r||r.updateVerticesDataDirectly("position",this._topPlaneVertices,0),w.Vector3[3].toArray(this._bottomPlaneVertices,0),w.Vector3[7].toArray(this._bottomPlaneVertices,3),w.Vector3[8].toArray(this._bottomPlaneVertices,6),w.Vector3[4].toArray(this._bottomPlaneVertices,9),null===(o=this._lightHelperFrustumMeshes[11].geometry)||void 0===o||o.updateVerticesDataDirectly("position",this._bottomPlaneVertices,0)}},e.prototype.dispose=function(){this._lightHelperFrustumMeshes.forEach((function(e){var t;null===(t=e.material)||void 0===t||t.dispose(),e.dispose()})),this._rootNode.dispose()},e.prototype._createGeometry=function(){var e=this;this._rootNode=new Lr("directionalLightHelperRoot_"+this._light.name,this._scene),this._rootNode.parent=this._light.parent,this._nearLinesPoints=[C.ZeroReadOnly,C.ZeroReadOnly,C.ZeroReadOnly,C.ZeroReadOnly,C.ZeroReadOnly];var t=Wu("nearlines",{updatable:!0,points:this._nearLinesPoints},this._scene);t.parent=this._rootNode,t.alwaysSelectAsActiveMesh=!0,this._farLinesPoints=[C.ZeroReadOnly,C.ZeroReadOnly,C.ZeroReadOnly,C.ZeroReadOnly,C.ZeroReadOnly];var n=Wu("farlines",{updatable:!0,points:this._farLinesPoints},this._scene);n.parent=this._rootNode,n.alwaysSelectAsActiveMesh=!0,this._trLinesPoints=[C.ZeroReadOnly,C.ZeroReadOnly];var i=Wu("trlines",{updatable:!0,points:this._trLinesPoints},this._scene);i.parent=this._rootNode,i.alwaysSelectAsActiveMesh=!0,this._brLinesPoints=[C.ZeroReadOnly,C.ZeroReadOnly];var r=Wu("brlines",{updatable:!0,points:this._brLinesPoints},this._scene);r.parent=this._rootNode,r.alwaysSelectAsActiveMesh=!0,this._tlLinesPoints=[C.ZeroReadOnly,C.ZeroReadOnly];var o=Wu("tllines",{updatable:!0,points:this._tlLinesPoints},this._scene);o.parent=this._rootNode,o.alwaysSelectAsActiveMesh=!0,this._blLinesPoints=[C.ZeroReadOnly,C.ZeroReadOnly];var a=Wu("bllines",{updatable:!0,points:this._blLinesPoints},this._scene);a.parent=this._rootNode,a.alwaysSelectAsActiveMesh=!0,this._lightHelperFrustumMeshes.push(t,n,i,r,o,a);var s=function(t,n,i){var r=new no(t+"plane",e._scene),o=new ml(t+"PlaneMat",e._scene);r.material=o,r.parent=e._rootNode,r.alwaysSelectAsActiveMesh=!0,o.emissiveColor=n,o.alpha=e.transparency,o.backFaceCulling=!1,o.disableLighting=!0;var a=new Cr;a.positions=i,a.indices=[0,1,2,0,2,3],a.applyToMesh(r,!0),e._lightHelperFrustumMeshes.push(r)};this._nearPlaneVertices=[0,0,0,0,0,0,0,0,0,0,0,0],this._farPlaneVertices=[0,0,0,0,0,0,0,0,0,0,0,0],this._rightPlaneVertices=[0,0,0,0,0,0,0,0,0,0,0,0],this._leftPlaneVertices=[0,0,0,0,0,0,0,0,0,0,0,0],this._topPlaneVertices=[0,0,0,0,0,0,0,0,0,0,0,0],this._bottomPlaneVertices=[0,0,0,0,0,0,0,0,0,0,0,0],s("near",new B(1,0,0),this._nearPlaneVertices),s("far",new B(.3,0,0),this._farPlaneVertices),s("right",new B(0,1,0),this._rightPlaneVertices),s("left",new B(0,.3,0),this._leftPlaneVertices),s("top",new B(0,0,1),this._topPlaneVertices),s("bottom",new B(0,0,.3),this._bottomPlaneVertices),this._nearLinesPoints[0]=w.Vector3[2],this._nearLinesPoints[1]=w.Vector3[3],this._nearLinesPoints[2]=w.Vector3[4],this._nearLinesPoints[3]=w.Vector3[5],this._nearLinesPoints[4]=w.Vector3[2],this._farLinesPoints[0]=w.Vector3[6],this._farLinesPoints[1]=w.Vector3[7],this._farLinesPoints[2]=w.Vector3[8],this._farLinesPoints[3]=w.Vector3[9],this._farLinesPoints[4]=w.Vector3[6],this._trLinesPoints[0]=w.Vector3[2],this._trLinesPoints[1]=w.Vector3[6],this._brLinesPoints[0]=w.Vector3[3],this._brLinesPoints[1]=w.Vector3[7],this._tlLinesPoints[0]=w.Vector3[4],this._tlLinesPoints[1]=w.Vector3[8],this._blLinesPoints[0]=w.Vector3[5],this._blLinesPoints[1]=w.Vector3[9]},e.prototype._getInvertViewMatrix=function(){return R.LookAtLHToRef(this._light.position,this._light.position.add(this._light.direction),C.UpReadOnly,this._inverseViewMatrix),this._inverseViewMatrix.invertToRef(this._inverseViewMatrix),this._inverseViewMatrix},e}(),kh=function(){this.renderWidth=512,this.renderHeight=256,this.textureSize=512,this.deterministicLockstep=!1,this.lockstepMaxSteps=4},Vh=function(t){function n(n){void 0===n&&(n=new kh);var i=t.call(this,null)||this;Dr.Instances.push(i),void 0===n.deterministicLockstep&&(n.deterministicLockstep=!1),void 0===n.lockstepMaxSteps&&(n.lockstepMaxSteps=4),i._options=n,E.SetMatrixPrecision(!!n.useHighPrecisionMatrix),i._caps={maxTexturesImageUnits:16,maxVertexTextureImageUnits:16,maxCombinedTexturesImageUnits:32,maxTextureSize:512,maxCubemapTextureSize:512,maxRenderTextureSize:512,maxVertexAttribs:16,maxVaryingVectors:16,maxFragmentUniformVectors:16,maxVertexUniformVectors:16,standardDerivatives:!1,astc:null,pvrtc:null,etc1:null,etc2:null,bptc:null,maxAnisotropy:0,uintIndices:!1,fragmentDepthSupported:!1,highPrecisionShaderSupported:!0,colorBufferFloat:!1,supportFloatTexturesResolve:!1,textureFloat:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloat:!1,textureHalfFloatLinearFiltering:!1,textureHalfFloatRender:!1,textureLOD:!1,texelFetch:!1,drawBuffersExtension:!1,depthTextureExtension:!1,vertexArrayObject:!1,instancedArrays:!1,supportOcclusionQuery:!1,canUseTimestampForTimerQuery:!1,maxMSAASamples:1,blendMinMax:!1,canUseGLInstanceID:!1,canUseGLVertexID:!1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:!1,textureMaxLevel:!1,texture2DArrayMaxLayerCount:128,disableMorphTargetTexture:!1},i._features={forceBitmapOverHTMLImageElement:!1,supportRenderAndCopyToLodForFloatTextures:!1,supportDepthStencilTexture:!1,supportShadowSamplers:!1,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:!1,trackUbosInFrame:!1,checkUbosContentBeforeUpload:!1,supportCSM:!1,basisNeedsPOT:!1,support3DTextures:!1,needTypeSuffixInShaderConstants:!1,supportMSAA:!1,supportSSAO2:!1,supportExtendedTextureFormats:!1,supportSwitchCaseInShader:!1,supportSyncTextureRead:!1,needsInvertingBitmap:!1,useUBOBindingCache:!1,needShaderCodeInlining:!1,needToAlwaysBindUniformBuffers:!1,supportRenderPasses:!0,supportSpriteInstancing:!1,forceVertexBufferStrideMultiple4Bytes:!1,_collectUbosUpdatedInFrame:!1},J.Log("Babylon.js v".concat(Dr.Version," - Null engine"));var r="undefined"!=typeof self?self:void 0!==e.g?e.g:window;return"undefined"==typeof URL&&(r.URL={createObjectURL:function(){},revokeObjectURL:function(){}}),"undefined"==typeof Blob&&(r.Blob=function(){}),i}return H(n,t),n.prototype.isDeterministicLockStep=function(){return this._options.deterministicLockstep},n.prototype.getLockstepMaxSteps=function(){return this._options.lockstepMaxSteps},n.prototype.getHardwareScalingLevel=function(){return 1},n.prototype.createVertexBuffer=function(e){var t=new Qt;return t.references=1,t},n.prototype.createIndexBuffer=function(e){var t=new Qt;return t.references=1,t},n.prototype.clear=function(e,t,n,i){void 0===i&&(i=!1)},n.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._options.renderWidth},n.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._options.renderHeight},n.prototype.setViewport=function(e,t,n){this._cachedViewport=e},n.prototype.createShaderProgram=function(e,t,n,i,r){return{__SPECTOR_rebuildProgram:null}},n.prototype.getUniforms=function(e,t){return[]},n.prototype.getAttributes=function(e,t){return[]},n.prototype.bindSamplers=function(e){this._currentEffect=null},n.prototype.enableEffect=function(e){e=null!==e&&en.IsWrapper(e)?e.effect:e,this._currentEffect=e,e&&(e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))},n.prototype.setState=function(e,t,n,i,r,o,a){void 0===t&&(t=0),void 0===i&&(i=!1),void 0===a&&(a=0)},n.prototype.setIntArray=function(e,t){return!0},n.prototype.setIntArray2=function(e,t){return!0},n.prototype.setIntArray3=function(e,t){return!0},n.prototype.setIntArray4=function(e,t){return!0},n.prototype.setFloatArray=function(e,t){return!0},n.prototype.setFloatArray2=function(e,t){return!0},n.prototype.setFloatArray3=function(e,t){return!0},n.prototype.setFloatArray4=function(e,t){return!0},n.prototype.setArray=function(e,t){return!0},n.prototype.setArray2=function(e,t){return!0},n.prototype.setArray3=function(e,t){return!0},n.prototype.setArray4=function(e,t){return!0},n.prototype.setMatrices=function(e,t){return!0},n.prototype.setMatrix3x3=function(e,t){return!0},n.prototype.setMatrix2x2=function(e,t){return!0},n.prototype.setFloat=function(e,t){return!0},n.prototype.setFloat2=function(e,t,n){return!0},n.prototype.setFloat3=function(e,t,n,i){return!0},n.prototype.setBool=function(e,t){return!0},n.prototype.setFloat4=function(e,t,n,i,r){return!0},n.prototype.setAlphaMode=function(e,t){void 0===t&&(t=!1),this._alphaMode!==e&&(this.alphaState.alphaBlend=e!==a.ALPHA_DISABLE,t||this.setDepthWrite(e===a.ALPHA_DISABLE),this._alphaMode=e)},n.prototype.bindBuffers=function(e,t,n){},n.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames||(this.resetTextureCache(),this._currentEffect=null,e&&(this._currentProgram=null,this._stencilStateComposer.reset(),this.depthCullingState.reset(),this.alphaState.reset()),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null)},n.prototype.draw=function(e,t,n,i){},n.prototype.drawElementsType=function(e,t,n,i){},n.prototype.drawArraysType=function(e,t,n,i){},n.prototype._createTexture=function(){return{}},n.prototype._releaseTexture=function(e){},n.prototype.createTexture=function(e,t,n,i,r,o,s,c,l,u,h,d){void 0===r&&(r=a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===s&&(s=null),void 0===c&&(c=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===h&&(h=null);var p=new Xt(this,wt.Url),f=String(e);return p.url=f,p.generateMipMaps=!t,p.samplingMode=r,p.invertY=n,p.baseWidth=this._options.textureSize,p.baseHeight=this._options.textureSize,p.width=this._options.textureSize,p.height=this._options.textureSize,u&&(p.format=u),p.isReady=!0,o&&setTimeout((function(){o(p)})),this._internalTexturesCache.push(p),p},n.prototype._createHardwareRenderTargetWrapper=function(e,t,n){var i=new wa(e,t,n,this);return this._renderTargetWrapperCache.push(i),i},n.prototype.createRenderTargetTexture=function(e,t){var n=this._createHardwareRenderTargetWrapper(!1,!1,e),i={};void 0!==t&&"object"==typeof t?(i.generateMipMaps=t.generateMipMaps,i.generateDepthBuffer=void 0===t.generateDepthBuffer||t.generateDepthBuffer,i.generateStencilBuffer=i.generateDepthBuffer&&t.generateStencilBuffer,i.type=void 0===t.type?a.TEXTURETYPE_UNSIGNED_INT:t.type,i.samplingMode=void 0===t.samplingMode?a.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode):(i.generateMipMaps=t,i.generateDepthBuffer=!0,i.generateStencilBuffer=!1,i.type=a.TEXTURETYPE_UNSIGNED_INT,i.samplingMode=a.TEXTURE_TRILINEAR_SAMPLINGMODE);var r=new Xt(this,wt.RenderTarget),o=e.width||e,s=e.height||e;return n._generateDepthBuffer=i.generateDepthBuffer,n._generateStencilBuffer=!!i.generateStencilBuffer,r.baseWidth=o,r.baseHeight=s,r.width=o,r.height=s,r.isReady=!0,r.samples=1,r.generateMipMaps=!!i.generateMipMaps,r.samplingMode=i.samplingMode,r.type=i.type,this._internalTexturesCache.push(r),n},n.prototype.createRenderTargetCubeTexture=function(e,t){var n=this._createHardwareRenderTargetWrapper(!1,!0,e),i=j({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:a.TEXTURETYPE_UNSIGNED_INT,samplingMode:a.TEXTURE_TRILINEAR_SAMPLINGMODE,format:a.TEXTUREFORMAT_RGBA},t);i.generateStencilBuffer=i.generateDepthBuffer&&i.generateStencilBuffer,(i.type!==a.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(i.type!==a.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(i.samplingMode=a.TEXTURE_NEAREST_SAMPLINGMODE),n._generateDepthBuffer=i.generateDepthBuffer,n._generateStencilBuffer=!!i.generateStencilBuffer;var r=new Xt(this,wt.RenderTarget);return r.baseWidth=e,r.baseHeight=e,r.width=e,r.height=e,r.isReady=!0,r.isCube=!0,r.samples=1,r.generateMipMaps=!!i.generateMipMaps,r.samplingMode=i.samplingMode,r.type=i.type,this._internalTexturesCache.push(r),n},n.prototype.updateTextureSamplingMode=function(e,t){t.samplingMode=e},n.prototype.createRawTexture=function(e,t,n,i,r,o,s,c,l,u,h){void 0===c&&(c=null),void 0===l&&(l=a.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=0),void 0===h&&(h=!1);var d=new Xt(this,wt.Raw);return d.baseWidth=t,d.baseHeight=n,d.width=t,d.height=n,d.format=i,d.generateMipMaps=r,d.samplingMode=s,d.invertY=o,d._compression=c,d.type=l,d._useSRGBBuffer=h,this._doNotHandleContextLost||(d._bufferView=e),d},n.prototype.updateRawTexture=function(e,t,n,i,r,o,s){void 0===r&&(r=null),void 0===o&&(o=a.TEXTURETYPE_UNSIGNED_INT),void 0===s&&(s=!1),e&&(e._bufferView=t,e.format=n,e.invertY=i,e._compression=r,e.type=o,e._useSRGBBuffer=s)},n.prototype.bindFramebuffer=function(e,t,n,i,r){this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._currentFramebuffer=null,this._cachedViewport&&!r&&this.setViewport(this._cachedViewport,n,i)},n.prototype.unBindFramebuffer=function(e,t,n){void 0===t&&(t=!1),this._currentRenderTarget=null,n&&n(),this._currentFramebuffer=null},n.prototype.createDynamicVertexBuffer=function(e){var t=new Qt;return t.references=1,t.capacity=1,t},n.prototype.updateDynamicTexture=function(e,t,n,i,r){void 0===i&&(i=!1)},n.prototype.areAllEffectsReady=function(){return!0},n.prototype.getError=function(){return 0},n.prototype._getUnpackAlignement=function(){return 1},n.prototype._unpackFlipY=function(e){},n.prototype.updateDynamicIndexBuffer=function(e,t,n){void 0===n&&(n=0)},n.prototype.updateDynamicVertexBuffer=function(e,t,n,i){},n.prototype._bindTextureDirectly=function(e,t){return this._boundTexturesCache[this._activeChannel]!==t&&(this._boundTexturesCache[this._activeChannel]=t,!0)},n.prototype._bindTexture=function(e,t){e<0||this._bindTextureDirectly(0,t)},n.prototype._deleteBuffer=function(e){},n.prototype.releaseEffects=function(){},n.prototype.displayLoadingUI=function(){},n.prototype.hideLoadingUI=function(){},Object.defineProperty(n.prototype,"loadingUIText",{set:function(e){},enumerable:!1,configurable:!0}),n.prototype._uploadCompressedDataToTextureDirectly=function(e,t,n,i,r,o,a){void 0===o&&(o=0),void 0===a&&(a=0)},n.prototype._uploadDataToTextureDirectly=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0)},n.prototype._uploadArrayBufferViewToTexture=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0)},n.prototype._uploadImageToTexture=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0)},n}(Dr);rn.prototype._debugPushGroup=function(e,t){},rn.prototype._debugPopGroup=function(e){},rn.prototype._debugInsertMarker=function(e,t){},rn.prototype._debugFlushPendingCommands=function(){};var zh=function(){this._timeElapsedQueryEnded=!1},Gh=function(){this.occlusionInternalRetryCounter=0,this.isOcclusionQueryInProgress=!1,this.isOccluded=!1,this.occlusionRetryCount=-1,this.occlusionType=kr.OCCLUSION_TYPE_NONE,this.occlusionQueryAlgorithmType=kr.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE,this.forceRenderingWhenOccluded=!1};Dr.prototype.createQuery=function(){var e=this._gl.createQuery();if(!e)throw new Error("Unable to create Occlusion Query");return e},Dr.prototype.deleteQuery=function(e){return this._gl.deleteQuery(e),this},Dr.prototype.isQueryResultAvailable=function(e){return this._gl.getQueryParameter(e,this._gl.QUERY_RESULT_AVAILABLE)},Dr.prototype.getQueryResult=function(e){return this._gl.getQueryParameter(e,this._gl.QUERY_RESULT)},Dr.prototype.beginOcclusionQuery=function(e,t){var n=this._getGlAlgorithmType(e);return this._gl.beginQuery(n,t),!0},Dr.prototype.endOcclusionQuery=function(e){var t=this._getGlAlgorithmType(e);return this._gl.endQuery(t),this},Dr.prototype._createTimeQuery=function(){var e=this.getCaps().timerQuery;return e.createQueryEXT?e.createQueryEXT():this.createQuery()},Dr.prototype._deleteTimeQuery=function(e){var t=this.getCaps().timerQuery;t.deleteQueryEXT?t.deleteQueryEXT(e):this.deleteQuery(e)},Dr.prototype._getTimeQueryResult=function(e){var t=this.getCaps().timerQuery;return t.getQueryObjectEXT?t.getQueryObjectEXT(e,t.QUERY_RESULT_EXT):this.getQueryResult(e)},Dr.prototype._getTimeQueryAvailability=function(e){var t=this.getCaps().timerQuery;return t.getQueryObjectEXT?t.getQueryObjectEXT(e,t.QUERY_RESULT_AVAILABLE_EXT):this.isQueryResultAvailable(e)},Dr.prototype.startTimeQuery=function(){var e=this.getCaps(),t=e.timerQuery;if(!t)return null;var n=new zh;if(this._gl.getParameter(t.GPU_DISJOINT_EXT),e.canUseTimestampForTimerQuery)n._startTimeQuery=this._createTimeQuery(),t.queryCounterEXT(n._startTimeQuery,t.TIMESTAMP_EXT);else{if(this._currentNonTimestampToken)return this._currentNonTimestampToken;n._timeElapsedQuery=this._createTimeQuery(),t.beginQueryEXT?t.beginQueryEXT(t.TIME_ELAPSED_EXT,n._timeElapsedQuery):this._gl.beginQuery(t.TIME_ELAPSED_EXT,n._timeElapsedQuery),this._currentNonTimestampToken=n}return n},Dr.prototype.endTimeQuery=function(e){var t=this.getCaps(),n=t.timerQuery;if(!n||!e)return-1;if(t.canUseTimestampForTimerQuery){if(!e._startTimeQuery)return-1;e._endTimeQuery||(e._endTimeQuery=this._createTimeQuery(),n.queryCounterEXT(e._endTimeQuery,n.TIMESTAMP_EXT))}else if(!e._timeElapsedQueryEnded){if(!e._timeElapsedQuery)return-1;n.endQueryEXT?n.endQueryEXT(n.TIME_ELAPSED_EXT):(this._gl.endQuery(n.TIME_ELAPSED_EXT),this._currentNonTimestampToken=null),e._timeElapsedQueryEnded=!0}var i=this._gl.getParameter(n.GPU_DISJOINT_EXT),r=!1;if(e._endTimeQuery?r=this._getTimeQueryAvailability(e._endTimeQuery):e._timeElapsedQuery&&(r=this._getTimeQueryAvailability(e._timeElapsedQuery)),r&&!i){var o=0;if(t.canUseTimestampForTimerQuery){if(!e._startTimeQuery||!e._endTimeQuery)return-1;var a=this._getTimeQueryResult(e._startTimeQuery);o=this._getTimeQueryResult(e._endTimeQuery)-a,this._deleteTimeQuery(e._startTimeQuery),this._deleteTimeQuery(e._endTimeQuery),e._startTimeQuery=null,e._endTimeQuery=null}else{if(!e._timeElapsedQuery)return-1;o=this._getTimeQueryResult(e._timeElapsedQuery),this._deleteTimeQuery(e._timeElapsedQuery),e._timeElapsedQuery=null,e._timeElapsedQueryEnded=!1}return o}return-1},Dr.prototype._captureGPUFrameTime=!1,Dr.prototype._gpuFrameTime=new vi,Dr.prototype.getGPUFrameTimeCounter=function(){return this._gpuFrameTime},Dr.prototype.captureGPUFrameTime=function(e){var t=this;e!==this._captureGPUFrameTime&&(this._captureGPUFrameTime=e,e?(this._onBeginFrameObserver=this.onBeginFrameObservable.add((function(){t._gpuFrameTimeToken||(t._gpuFrameTimeToken=t.startTimeQuery())})),this._onEndFrameObserver=this.onEndFrameObservable.add((function(){if(t._gpuFrameTimeToken){var e=t.endTimeQuery(t._gpuFrameTimeToken);e>-1&&(t._gpuFrameTimeToken=null,t._gpuFrameTime.fetchNewFrame(),t._gpuFrameTime.addCount(e,!0))}}))):(this.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null))},Dr.prototype._getGlAlgorithmType=function(e){return e===kr.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE?this._gl.ANY_SAMPLES_PASSED_CONSERVATIVE:this._gl.ANY_SAMPLES_PASSED},Object.defineProperty(kr.prototype,"isOcclusionQueryInProgress",{get:function(){return this._occlusionDataStorage.isOcclusionQueryInProgress},set:function(e){this._occlusionDataStorage.isOcclusionQueryInProgress=e},enumerable:!1,configurable:!0}),Object.defineProperty(kr.prototype,"_occlusionDataStorage",{get:function(){return this.__occlusionDataStorage||(this.__occlusionDataStorage=new Gh),this.__occlusionDataStorage},enumerable:!1,configurable:!0}),Object.defineProperty(kr.prototype,"isOccluded",{get:function(){return this._occlusionDataStorage.isOccluded},set:function(e){this._occlusionDataStorage.isOccluded=e},enumerable:!0,configurable:!0}),Object.defineProperty(kr.prototype,"occlusionQueryAlgorithmType",{get:function(){return this._occlusionDataStorage.occlusionQueryAlgorithmType},set:function(e){this._occlusionDataStorage.occlusionQueryAlgorithmType=e},enumerable:!0,configurable:!0}),Object.defineProperty(kr.prototype,"occlusionType",{get:function(){return this._occlusionDataStorage.occlusionType},set:function(e){this._occlusionDataStorage.occlusionType=e},enumerable:!0,configurable:!0}),Object.defineProperty(kr.prototype,"occlusionRetryCount",{get:function(){return this._occlusionDataStorage.occlusionRetryCount},set:function(e){this._occlusionDataStorage.occlusionRetryCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(kr.prototype,"forceRenderingWhenOccluded",{get:function(){return this._occlusionDataStorage.forceRenderingWhenOccluded},set:function(e){this._occlusionDataStorage.forceRenderingWhenOccluded=e},enumerable:!0,configurable:!0}),kr.prototype._checkOcclusionQuery=function(){var e=this._occlusionDataStorage;if(e.occlusionType===kr.OCCLUSION_TYPE_NONE)return e.isOccluded=!1,!1;var t=this.getEngine();if(!t.getCaps().supportOcclusionQuery)return e.isOccluded=!1,!1;if(!t.isQueryResultAvailable)return e.isOccluded=!1,!1;if(this.isOcclusionQueryInProgress&&null!==this._occlusionQuery&&void 0!==this._occlusionQuery)if(t.isQueryResultAvailable(this._occlusionQuery)){var n=t.getQueryResult(this._occlusionQuery);e.isOcclusionQueryInProgress=!1,e.occlusionInternalRetryCounter=0,e.isOccluded=!(n>0)}else{if(e.occlusionInternalRetryCounter++,!(-1!==e.occlusionRetryCount&&e.occlusionInternalRetryCounter>e.occlusionRetryCount))return e.occlusionType!==kr.OCCLUSION_TYPE_OPTIMISTIC&&e.isOccluded;e.isOcclusionQueryInProgress=!1,e.occlusionInternalRetryCounter=0,e.isOccluded=e.occlusionType!==kr.OCCLUSION_TYPE_OPTIMISTIC&&e.isOccluded}var i=this.getScene();if(i.getBoundingBoxRenderer){var r=i.getBoundingBoxRenderer();null===this._occlusionQuery&&(this._occlusionQuery=t.createQuery()),t.beginOcclusionQuery(e.occlusionQueryAlgorithmType,this._occlusionQuery)&&(r.renderOcclusionBoundingBox(this),t.endOcclusionQuery(e.occlusionQueryAlgorithmType),this._occlusionDataStorage.isOcclusionQueryInProgress=!0)}return e.isOccluded};var Hh=!0;Dr.prototype.createTransformFeedback=function(){var e=this._gl.createTransformFeedback();if(!e)throw new Error("Unable to create Transform Feedback");return e},Dr.prototype.deleteTransformFeedback=function(e){this._gl.deleteTransformFeedback(e)},Dr.prototype.bindTransformFeedback=function(e){this._gl.bindTransformFeedback(this._gl.TRANSFORM_FEEDBACK,e)},Dr.prototype.beginTransformFeedback=function(e){void 0===e&&(e=!0),this._gl.beginTransformFeedback(e?this._gl.POINTS:this._gl.TRIANGLES)},Dr.prototype.endTransformFeedback=function(){this._gl.endTransformFeedback()},Dr.prototype.setTranformFeedbackVaryings=function(e,t){this._gl.transformFeedbackVaryings(e,t,this._gl.INTERLEAVED_ATTRIBS)},Dr.prototype.bindTransformFeedbackBuffer=function(e){this._gl.bindBufferBase(this._gl.TRANSFORM_FEEDBACK_BUFFER,0,e?e.underlyingResource:null)},rn.prototype.createExternalTexture=function(e){return null},rn.prototype.setExternalTexture=function(e,t){throw new Error("setExternalTexture: This engine does not support external textures!")},rn.prototype.updateVideoTexture=function(e,t,n){if(e&&!e._isDisabled){var i=this._getInternalFormat(e.format),r=this._getRGBABufferInternalSizedFormat(a.TEXTURETYPE_UNSIGNED_BYTE,e.format),o=this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0);this._unpackFlipY(!n);try{if(void 0===this._videoTextureSupported&&(this._gl.getError(),this._gl.texImage2D(this._gl.TEXTURE_2D,0,r,i,this._gl.UNSIGNED_BYTE,t),0!==this._gl.getError()?this._videoTextureSupported=!1:this._videoTextureSupported=!0),this._videoTextureSupported)this._gl.texImage2D(this._gl.TEXTURE_2D,0,r,i,this._gl.UNSIGNED_BYTE,t);else{if(!e._workingCanvas){e._workingCanvas=this.createCanvas(e.width,e.height);var s=e._workingCanvas.getContext("2d");if(!s)throw new Error("Unable to get 2d context");e._workingContext=s,e._workingCanvas.width=e.width,e._workingCanvas.height=e.height}e._workingContext.clearRect(0,0,e.width,e.height),e._workingContext.drawImage(t,0,0,t.videoWidth,t.videoHeight,0,0,e.width,e.height),this._gl.texImage2D(this._gl.TEXTURE_2D,0,r,i,this._gl.UNSIGNED_BYTE,e._workingCanvas)}e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),o||this._bindTextureDirectly(this._gl.TEXTURE_2D,null),e.isReady=!0}catch(t){e._isDisabled=!0}}},rn.prototype.restoreSingleAttachment=function(){var e=this._gl;this.bindAttachments([e.BACK])},rn.prototype.restoreSingleAttachmentForRenderTarget=function(){var e=this._gl;this.bindAttachments([e.COLOR_ATTACHMENT0])},rn.prototype.buildTextureLayout=function(e){for(var t=this._gl,n=[],i=0;i1?"COLOR_ATTACHMENT"+a:"COLOR_ATTACHMENT"+a+"_WEBGL"],i.readBuffer(r[a]),i.drawBuffers(r),i.blitFramebuffer(0,0,s.width,s.height,0,0,s.width,s.height,i.COLOR_BUFFER_BIT,i.NEAREST)}for(a=0;a1?"COLOR_ATTACHMENT"+a:"COLOR_ATTACHMENT"+a+"_WEBGL"];i.drawBuffers(r)}for(a=0;a1&&(t.depthTextureFormat===a.TEXTUREFORMAT_DEPTH24_STENCIL8||t.depthTextureFormat===a.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8||t.depthTextureFormat===a.TEXTUREFORMAT_DEPTH24||t.depthTextureFormat===a.TEXTUREFORMAT_DEPTH32_FLOAT||t.depthTextureFormat===a.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8)&&(u=t.depthTextureFormat)),x.label=null!==(i=null==t?void 0:t.label)&&void 0!==i?i:"MultiRenderTargetWrapper";var S=this._gl,C=S.createFramebuffer();this._bindUnboundFramebuffer(C);var P=e.width||e,I=e.height||e,R=[],O=[],w=this.webGLVersion>1&&l&&(t.depthTextureFormat===a.TEXTUREFORMAT_DEPTH24_STENCIL8||t.depthTextureFormat===a.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8||t.depthTextureFormat===a.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8),M=this._setupFramebufferDepthAttachments(!w&&c,!l&&s,P,I);x._framebuffer=C,x._depthStencilBuffer=M,x._generateDepthBuffer=!l&&s,x._generateStencilBuffer=!w&&c,x._attachments=O;for(var D=0;D1||this.isWebGPU);var z=this.webGLVersion>1,G=S[z?"COLOR_ATTACHMENT"+D:"COLOR_ATTACHMENT"+D+"_WEBGL"];if(O.push(G),-1!==U){var H=new Xt(this,wt.MultiRenderTarget);R[D]=H,S.activeTexture(S["TEXTURE"+D]),S.bindTexture(U,H._hardwareTexture.underlyingResource),S.texParameteri(U,S.TEXTURE_MAG_FILTER,V.mag),S.texParameteri(U,S.TEXTURE_MIN_FILTER,V.min),S.texParameteri(U,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(U,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE);var j=this._getRGBABufferInternalSizedFormat(L,B,F),W=this._getInternalFormat(B),X=this._getWebGLTextureType(L);if(!z||U!==a.TEXTURE_2D_ARRAY&&U!==a.TEXTURE_3D)if(U===a.TEXTURE_CUBE_MAP){for(var Y=0;Y<6;Y++)S.texImage2D(S.TEXTURE_CUBE_MAP_POSITIVE_X+Y,0,j,P,I,0,W,X,null);H.isCube=!0}else S.texImage2D(S.TEXTURE_2D,0,j,P,I,0,W,X,null);else U===a.TEXTURE_2D_ARRAY?H.is2DArray=!0:H.is3D=!0,H.baseDepth=H.depth=k,S.texImage3D(U,0,j,P,I,k,0,W,X,null);o&&S.generateMipmap(U),this._bindTextureDirectly(U,null),H.baseWidth=P,H.baseHeight=I,H.width=P,H.height=I,H.isReady=!0,H.samples=1,H.generateMipMaps=o,H.samplingMode=N,H.type=L,H._useSRGBBuffer=F,H.format=B,this._internalTexturesCache.push(H)}}if(l&&this._caps.depthTextureExtension){var q=new Xt(this,wt.Depth),K=a.TEXTURETYPE_UNSIGNED_SHORT,Q=S.DEPTH_COMPONENT16,Z=S.DEPTH_COMPONENT,$=S.UNSIGNED_SHORT,ee=S.DEPTH_ATTACHMENT;this.webGLVersion<2?Q=S.DEPTH_COMPONENT:u===a.TEXTUREFORMAT_DEPTH32_FLOAT?(K=a.TEXTURETYPE_FLOAT,$=S.FLOAT,Q=S.DEPTH_COMPONENT32F):u===a.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8?(K=a.TEXTURETYPE_UNSIGNED_INT,$=S.FLOAT_32_UNSIGNED_INT_24_8_REV,Q=S.DEPTH32F_STENCIL8,Z=S.DEPTH_STENCIL,ee=S.DEPTH_STENCIL_ATTACHMENT):u===a.TEXTUREFORMAT_DEPTH24?(K=a.TEXTURETYPE_UNSIGNED_INT,$=S.UNSIGNED_INT,Q=S.DEPTH_COMPONENT24,ee=S.DEPTH_ATTACHMENT):u!==a.TEXTUREFORMAT_DEPTH24_STENCIL8&&u!==a.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8||(K=a.TEXTURETYPE_UNSIGNED_INT_24_8,$=S.UNSIGNED_INT_24_8,Q=S.DEPTH24_STENCIL8,Z=S.DEPTH_STENCIL,ee=S.DEPTH_STENCIL_ATTACHMENT),S.activeTexture(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,q._hardwareTexture.underlyingResource),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,S.NEAREST),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,S.NEAREST),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),S.texImage2D(S.TEXTURE_2D,0,Q,P,I,0,Z,$,null),S.framebufferTexture2D(S.FRAMEBUFFER,ee,S.TEXTURE_2D,q._hardwareTexture.underlyingResource,0),q.baseWidth=P,q.baseHeight=I,q.width=P,q.height=I,q.isReady=!0,q.samples=1,q.generateMipMaps=o,q.samplingMode=a.TEXTURE_NEAREST_SAMPLINGMODE,q.format=u,q.type=K,R[h]=q,this._internalTexturesCache.push(q)}return x.setTextures(R),n&&S.drawBuffers(O),this._bindUnboundFramebuffer(null),x.setLayerAndFaceIndices(E,T),this.resetTextureCache(),x},rn.prototype.updateMultipleRenderTargetTextureSampleCount=function(e,t,n){if(void 0===n&&(n=!0),this.webGLVersion<2||!e||!e.texture)return 1;if(e.samples===t)return t;var i=e._attachments.length;if(0===i)return 1;var r=this._gl;t=Math.min(t,this.getCaps().maxMSAASamples);var o=!!e._depthStencilBuffer;if(o&&(r.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(r.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null),t>1&&"function"==typeof r.renderbufferStorageMultisample){var a=r.createFramebuffer();if(!a)throw new Error("Unable to create multi sampled framebuffer");e._MSAAFramebuffer=a,this._bindUnboundFramebuffer(a);for(var s=[],c=0;c1?"COLOR_ATTACHMENT"+c:"COLOR_ATTACHMENT"+c+"_WEBGL"],d=this._createRenderBuffer(l.width,l.height,t,-1,this._getRGBABufferInternalSizedFormat(l.type,l.format,l._useSRGBBuffer),h);if(!d)throw new Error("Unable to create multi sampled framebuffer");u.addMSAARenderBuffer(d),l.samples=t,s.push(h)}n&&r.drawBuffers(s)}else this._bindUnboundFramebuffer(e._framebuffer);return o&&(e._depthStencilBuffer=this._setupFramebufferDepthAttachments(e._generateStencilBuffer,e._generateDepthBuffer,e.texture.width,e.texture.height,t)),this._bindUnboundFramebuffer(null),t},rn.prototype._createDepthStencilCubeTexture=function(e,t,n){var i=new Xt(this,wt.DepthStencil);if(i.isCube=!0,1===this.webGLVersion)return J.Error("Depth cube texture is not supported by WebGL 1."),i;var r=j({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1},t),o=this._gl;this._bindTextureDirectly(o.TEXTURE_CUBE_MAP,i,!0),this._setupDepthStencilTexture(i,e,r.generateStencil,r.bilinearFiltering,r.comparisonFunction),n._depthStencilTexture=i,n._depthStencilTextureWithStencil=r.generateStencil;for(var a=0;a<6;a++)r.generateStencil?o.texImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+a,0,o.DEPTH24_STENCIL8,e,e,0,o.DEPTH_STENCIL,o.UNSIGNED_INT_24_8,null):o.texImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+a,0,o.DEPTH_COMPONENT24,e,e,0,o.DEPTH_COMPONENT,o.UNSIGNED_INT,null);return this._bindTextureDirectly(o.TEXTURE_CUBE_MAP,null),this._internalTexturesCache.push(i),i},rn.prototype._partialLoadFile=function(e,t,n,i,r){void 0===r&&(r=null),this._loadFile(e,(function(e){n[t]=e,n._internalCount++,6===n._internalCount&&i(n)}),void 0,void 0,!0,(function(e,t){r&&e&&r(e.status+" "+e.statusText,t)}))},rn.prototype._cascadeLoadFiles=function(e,t,n,i){void 0===i&&(i=null);var r=[];r._internalCount=0;for(var o=0;o<6;o++)this._partialLoadFile(n[o],o,r,t,i)},rn.prototype._cascadeLoadImgs=function(e,t,n,i,r,o){void 0===r&&(r=null);var a=[];a._internalCount=0;for(var s=0;s<6;s++)this._partialLoadImg(i[s],s,a,e,t,n,r,o)},rn.prototype._partialLoadImg=function(e,t,n,i,r,o,a,s){void 0===a&&(a=null);var c=Sn();pn(e,(function(e){n[t]=e,n._internalCount++,i&&i.removePendingData(c),6===n._internalCount&&o&&o(r,n)}),(function(e,t){i&&i.removePendingData(c),a&&a(e,t)}),i?i.offlineProvider:null,s),i&&i.addPendingData(c)},rn.prototype._setCubeMapTextureParams=function(e,t,n){var i=this._gl;i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MIN_FILTER,t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e.samplingMode=t?a.TEXTURE_TRILINEAR_SAMPLINGMODE:a.TEXTURE_LINEAR_LINEAR,t&&this.getCaps().textureMaxLevel&&void 0!==n&&n>0&&(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MAX_LEVEL,n),e._maxLodLevel=n),this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null)},rn.prototype.createCubeTextureBase=function(e,t,n,i,r,o,a,s,c,l,u,h,d,p,f){var m=this;void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===c&&(c=!1),void 0===l&&(l=0),void 0===u&&(u=0),void 0===h&&(h=null),void 0===d&&(d=null),void 0===p&&(p=null),void 0===f&&(f=!1);var _=h||new Xt(this,wt.Cube);_.isCube=!0,_.url=e,_.generateMipMaps=!i,_._lodGenerationScale=l,_._lodGenerationOffset=u,_._useSRGBBuffer=!!f&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU||!!i),_!==h&&(_.label=e.substring(0,60)),this._doNotHandleContextLost||(_._extension=s,_._files=n);var g=e;this._transformTextureUrl&&!h&&(e=this._transformTextureUrl(e));for(var y=e.split("?")[0],v=y.lastIndexOf("."),b=s||(v>-1?y.substring(v).toLowerCase():""),T=null,E=0,A=rn._TextureLoaders;E-1?e.substring(n,e.length):"";return(t>-1?e.substring(0,t):e)+this._textureFormatInUse+i}Object.defineProperty(Dr.prototype,"onBeforeViewRenderObservable",{get:function(){return Wh}}),Object.defineProperty(Dr.prototype,"onAfterViewRenderObservable",{get:function(){return Xh}}),Object.defineProperty(Dr.prototype,"inputElement",{get:function(){return this._inputElement},set:function(e){var t;this._inputElement!==e&&(this._inputElement=e,null===(t=this._onEngineViewChanged)||void 0===t||t.call(this))}}),Dr.prototype.getInputElement=function(){return this.inputElement||this.getRenderingCanvas()},Dr.prototype.registerView=function(e,t,n){var i=this;this.views||(this.views=[]);for(var r=0,o=this.views;rthis._length&&this._flush()},e.prototype._flush=function(){this._nativeDataStream.writeBuffer(this._uint32s.buffer,this._position),this._position=0},e.DEFAULT_BUFFER_SIZE=65536,e}(),Zh=[Math.sqrt(1/(4*Math.PI)),-Math.sqrt(3/(4*Math.PI)),Math.sqrt(3/(4*Math.PI)),-Math.sqrt(3/(4*Math.PI)),Math.sqrt(15/(4*Math.PI)),-Math.sqrt(15/(4*Math.PI)),Math.sqrt(5/(16*Math.PI)),-Math.sqrt(15/(4*Math.PI)),Math.sqrt(15/(16*Math.PI))],$h=[function(){return 1},function(e){return e.y},function(e){return e.z},function(e){return e.x},function(e){return e.x*e.y},function(e){return e.y*e.z},function(e){return 3*e.z*e.z-1},function(e){return e.x*e.z},function(e){return e.x*e.x-e.y*e.y}],Jh=function(e,t){return Zh[e]*$h[e](t)},ed=[Math.PI,2*Math.PI/3,2*Math.PI/3,2*Math.PI/3,Math.PI/4,Math.PI/4,Math.PI/4,Math.PI/4,Math.PI/4],td=function(){function e(){this.preScaled=!1,this.l00=C.Zero(),this.l1_1=C.Zero(),this.l10=C.Zero(),this.l11=C.Zero(),this.l2_2=C.Zero(),this.l2_1=C.Zero(),this.l20=C.Zero(),this.l21=C.Zero(),this.l22=C.Zero()}return e.prototype.addLight=function(e,t,n){w.Vector3[0].set(t.r,t.g,t.b);var i=w.Vector3[0],r=w.Vector3[1];i.scaleToRef(n,r),r.scaleToRef(Jh(0,e),w.Vector3[2]),this.l00.addInPlace(w.Vector3[2]),r.scaleToRef(Jh(1,e),w.Vector3[2]),this.l1_1.addInPlace(w.Vector3[2]),r.scaleToRef(Jh(2,e),w.Vector3[2]),this.l10.addInPlace(w.Vector3[2]),r.scaleToRef(Jh(3,e),w.Vector3[2]),this.l11.addInPlace(w.Vector3[2]),r.scaleToRef(Jh(4,e),w.Vector3[2]),this.l2_2.addInPlace(w.Vector3[2]),r.scaleToRef(Jh(5,e),w.Vector3[2]),this.l2_1.addInPlace(w.Vector3[2]),r.scaleToRef(Jh(6,e),w.Vector3[2]),this.l20.addInPlace(w.Vector3[2]),r.scaleToRef(Jh(7,e),w.Vector3[2]),this.l21.addInPlace(w.Vector3[2]),r.scaleToRef(Jh(8,e),w.Vector3[2]),this.l22.addInPlace(w.Vector3[2])},e.prototype.scaleInPlace=function(e){this.l00.scaleInPlace(e),this.l1_1.scaleInPlace(e),this.l10.scaleInPlace(e),this.l11.scaleInPlace(e),this.l2_2.scaleInPlace(e),this.l2_1.scaleInPlace(e),this.l20.scaleInPlace(e),this.l21.scaleInPlace(e),this.l22.scaleInPlace(e)},e.prototype.convertIncidentRadianceToIrradiance=function(){this.l00.scaleInPlace(ed[0]),this.l1_1.scaleInPlace(ed[1]),this.l10.scaleInPlace(ed[2]),this.l11.scaleInPlace(ed[3]),this.l2_2.scaleInPlace(ed[4]),this.l2_1.scaleInPlace(ed[5]),this.l20.scaleInPlace(ed[6]),this.l21.scaleInPlace(ed[7]),this.l22.scaleInPlace(ed[8])},e.prototype.convertIrradianceToLambertianRadiance=function(){this.scaleInPlace(1/Math.PI)},e.prototype.preScaleForRendering=function(){this.preScaled=!0,this.l00.scaleInPlace(Zh[0]),this.l1_1.scaleInPlace(Zh[1]),this.l10.scaleInPlace(Zh[2]),this.l11.scaleInPlace(Zh[3]),this.l2_2.scaleInPlace(Zh[4]),this.l2_1.scaleInPlace(Zh[5]),this.l20.scaleInPlace(Zh[6]),this.l21.scaleInPlace(Zh[7]),this.l22.scaleInPlace(Zh[8])},e.prototype.updateFromArray=function(e){return C.FromArrayToRef(e[0],0,this.l00),C.FromArrayToRef(e[1],0,this.l1_1),C.FromArrayToRef(e[2],0,this.l10),C.FromArrayToRef(e[3],0,this.l11),C.FromArrayToRef(e[4],0,this.l2_2),C.FromArrayToRef(e[5],0,this.l2_1),C.FromArrayToRef(e[6],0,this.l20),C.FromArrayToRef(e[7],0,this.l21),C.FromArrayToRef(e[8],0,this.l22),this},e.prototype.updateFromFloatsArray=function(e){return C.FromFloatsToRef(e[0],e[1],e[2],this.l00),C.FromFloatsToRef(e[3],e[4],e[5],this.l1_1),C.FromFloatsToRef(e[6],e[7],e[8],this.l10),C.FromFloatsToRef(e[9],e[10],e[11],this.l11),C.FromFloatsToRef(e[12],e[13],e[14],this.l2_2),C.FromFloatsToRef(e[15],e[16],e[17],this.l2_1),C.FromFloatsToRef(e[18],e[19],e[20],this.l20),C.FromFloatsToRef(e[21],e[22],e[23],this.l21),C.FromFloatsToRef(e[24],e[25],e[26],this.l22),this},e.FromArray=function(t){return(new e).updateFromArray(t)},e.FromPolynomial=function(t){var n=new e;return n.l00=t.xx.scale(.376127).add(t.yy.scale(.376127)).add(t.zz.scale(.376126)),n.l1_1=t.y.scale(.977204),n.l10=t.z.scale(.977204),n.l11=t.x.scale(.977204),n.l2_2=t.xy.scale(1.16538),n.l2_1=t.yz.scale(1.16538),n.l20=t.zz.scale(1.34567).subtract(t.xx.scale(.672834)).subtract(t.yy.scale(.672834)),n.l21=t.zx.scale(1.16538),n.l22=t.xx.scale(1.16538).subtract(t.yy.scale(1.16538)),n.l1_1.scaleInPlace(-1),n.l11.scaleInPlace(-1),n.l2_1.scaleInPlace(-1),n.l21.scaleInPlace(-1),n.scaleInPlace(Math.PI),n},e}(),nd=function(){function e(){this.x=C.Zero(),this.y=C.Zero(),this.z=C.Zero(),this.xx=C.Zero(),this.yy=C.Zero(),this.zz=C.Zero(),this.xy=C.Zero(),this.yz=C.Zero(),this.zx=C.Zero()}return Object.defineProperty(e.prototype,"preScaledHarmonics",{get:function(){return this._harmonics||(this._harmonics=td.FromPolynomial(this)),this._harmonics.preScaled||this._harmonics.preScaleForRendering(),this._harmonics},enumerable:!1,configurable:!0}),e.prototype.addAmbient=function(e){w.Vector3[0].copyFromFloats(e.r,e.g,e.b);var t=w.Vector3[0];this.xx.addInPlace(t),this.yy.addInPlace(t),this.zz.addInPlace(t)},e.prototype.scaleInPlace=function(e){this.x.scaleInPlace(e),this.y.scaleInPlace(e),this.z.scaleInPlace(e),this.xx.scaleInPlace(e),this.yy.scaleInPlace(e),this.zz.scaleInPlace(e),this.yz.scaleInPlace(e),this.zx.scaleInPlace(e),this.xy.scaleInPlace(e)},e.prototype.updateFromHarmonics=function(e){return this._harmonics=e,this.x.copyFrom(e.l11),this.x.scaleInPlace(1.02333).scaleInPlace(-1),this.y.copyFrom(e.l1_1),this.y.scaleInPlace(1.02333).scaleInPlace(-1),this.z.copyFrom(e.l10),this.z.scaleInPlace(1.02333),this.xx.copyFrom(e.l00),w.Vector3[0].copyFrom(e.l20).scaleInPlace(.247708),w.Vector3[1].copyFrom(e.l22).scaleInPlace(.429043),this.xx.scaleInPlace(.886277).subtractInPlace(w.Vector3[0]).addInPlace(w.Vector3[1]),this.yy.copyFrom(e.l00),this.yy.scaleInPlace(.886277).subtractInPlace(w.Vector3[0]).subtractInPlace(w.Vector3[1]),this.zz.copyFrom(e.l00),w.Vector3[0].copyFrom(e.l20).scaleInPlace(.495417),this.zz.scaleInPlace(.886277).addInPlace(w.Vector3[0]),this.yz.copyFrom(e.l2_1),this.yz.scaleInPlace(.858086).scaleInPlace(-1),this.zx.copyFrom(e.l21),this.zx.scaleInPlace(.858086).scaleInPlace(-1),this.xy.copyFrom(e.l2_2),this.xy.scaleInPlace(.858086),this.scaleInPlace(1/Math.PI),this},e.FromHarmonics=function(t){return(new e).updateFromHarmonics(t)},e.FromArray=function(t){var n=new e;return C.FromArrayToRef(t[0],0,n.x),C.FromArrayToRef(t[1],0,n.y),C.FromArrayToRef(t[2],0,n.z),C.FromArrayToRef(t[3],0,n.xx),C.FromArrayToRef(t[4],0,n.yy),C.FromArrayToRef(t[5],0,n.zz),C.FromArrayToRef(t[6],0,n.yz),C.FromArrayToRef(t[7],0,n.zx),C.FromArrayToRef(t[8],0,n.xy),n},e}();function id(e,t,n,i){void 0===i&&(i=!0);var r=e.getScene(),o=r.getEngine(),s=new rs("resized"+e.name,{width:t,height:n},r,!e.noMipmap,!0,e._texture.type,!1,e.samplingMode,!1);s.wrapU=e.wrapU,s.wrapV=e.wrapV,s.uOffset=e.uOffset,s.vOffset=e.vOffset,s.uScale=e.uScale,s.vScale=e.vScale,s.uAng=e.uAng,s.vAng=e.vAng,s.wAng=e.wAng,s.coordinatesIndex=e.coordinatesIndex,s.level=e.level,s.anisotropicFilteringLevel=e.anisotropicFilteringLevel,s._texture.isReady=!1,e.wrapU=Eo.CLAMP_ADDRESSMODE,e.wrapV=Eo.CLAMP_ADDRESSMODE;var c=new Pc("pass",1,null,i?Eo.BILINEAR_SAMPLINGMODE:Eo.NEAREST_SAMPLINGMODE,o,!1,a.TEXTURETYPE_UNSIGNED_INT);return c.externalTextureSamplerBinding=!0,c.getEffect().executeWhenCompiled((function(){c.onApply=function(t){t.setTexture("textureSampler",e)};var t=s.renderTarget;t&&(r.postProcessManager.directRender([c],t),o.unBindFramebuffer(t),s.disposeFramebufferObjects(),c.dispose(),s.getInternalTexture().isReady=!0)})),s}function rd(e,t,n,i,r,o,s,c){var l=t.getEngine();return t.isReady=!1,r=null!=r?r:t.samplingMode,i=null!=i?i:t.type,o=null!=o?o:t.format,s=null!=s?s:t.width,c=null!=c?c:t.height,-1===i&&(i=a.TEXTURETYPE_UNSIGNED_BYTE),new Promise((function(u){var h=new Da("postprocess",e,null,null,1,null,r,l,!1,void 0,i,void 0,null,!1,o);h.externalTextureSamplerBinding=!0;var d=l.createRenderTargetTexture({width:s,height:c},{generateDepthBuffer:!1,generateMipMaps:!1,generateStencilBuffer:!1,samplingMode:r,type:i,format:o});h.getEffect().executeWhenCompiled((function(){h.onApply=function(e){e._bindTexture("textureSampler",t),e.setFloat2("scale",1,1)},n.postProcessManager.directRender([h],d,!0),l.restoreDefaultFramebuffer(),l._releaseTexture(t),h&&h.dispose(),d._swapAndDie(t),t.type=i,t.format=a.TEXTUREFORMAT_RGBA,t.isReady=!0,u(t)}))}))}function od(e){qh||(qh=new Float32Array(1),Kh=new Int32Array(qh.buffer)),qh[0]=e;var t=Kh[0],n=t>>16&32768,i=t>>12&2047,r=t>>23&255;return r<103?n:r>142?(n|=31744,n|=(255==r?0:1)&&8388607&t):r<113?n|=((i|=2048)>>114-r)+(i>>113-r&1):(n|=r-112<<10|i>>1,n+=1&i)}function ad(e){var t=(32768&e)>>15,n=(31744&e)>>10,i=1023&e;return 0===n?(t?-1:1)*Math.pow(2,-14)*(i/Math.pow(2,10)):31==n?i?NaN:1/0*(t?-1:1):(t?-1:1)*Math.pow(2,n-15)*(1+i/Math.pow(2,10))}Vt.ShadersStore.rgbdDecodePixelShader="varying vec2 vUV;uniform sampler2D textureSampler;\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}";var sd=function(e,t,n,i,r){return X(void 0,void 0,void 0,(function(){var o,a,s,c,l,u,h,d,p;return Y(this,(function(f){switch(f.label){case 0:return o=e.getScene(),a=o.getEngine(),e.isCube?(c=["#define POSITIVEX","#define NEGATIVEX","#define POSITIVEY","#define NEGATIVEY","#define POSITIVEZ","#define NEGATIVEZ"],s=new Da("lodCube","lodCube",["lod","gamma"],null,1,null,Eo.NEAREST_NEAREST_MIPNEAREST,a,!1,c[i])):s=new Da("lod","lod",["lod","gamma"],null,1,null,Eo.NEAREST_NEAREST_MIPNEAREST,a),[4,new Promise((function(e){s.getEffect().executeWhenCompiled((function(){e(0)}))}))];case 1:f.sent(),l=new rs("temp",{width:t,height:n},o,!1),s.onApply=function(t){t.setTexture("textureSampler",e),t.setFloat("lod",r),t.setBool("gamma",e.gammaSpace)},u=e.getInternalTexture(),f.label=2;case 2:return f.trys.push([2,,6,7]),l.renderTarget&&u?(h=u.samplingMode,0!==r?e.updateSamplingMode(Eo.NEAREST_NEAREST_MIPNEAREST):e.updateSamplingMode(Eo.NEAREST_NEAREST),o.postProcessManager.directRender([s],l.renderTarget,!0),e.updateSamplingMode(h),[4,a.readPixels(0,0,t,n)]):[3,4];case 3:return d=f.sent(),p=new Uint8Array(d.buffer,0,d.byteLength),a.unBindFramebuffer(l.renderTarget),[2,p];case 4:throw Error("Render to texture failed.");case 5:return[3,7];case 6:return l.dispose(),s.dispose(),[7];case 7:return[2]}}))}))};function cd(e,t,n,i,r){return void 0===i&&(i=0),void 0===r&&(r=0),X(this,void 0,void 0,(function(){return Y(this,(function(o){switch(o.label){case 0:return e.isReady()||!e._texture?[3,2]:[4,new Promise((function(t,n){null!==e._texture?e._texture.onLoadedObservable.addOnce((function(){t(0)})):n(0)}))];case 1:o.sent(),o.label=2;case 2:return[4,sd(e,t,n,i,r)];case 3:return[2,o.sent()]}}))}))}var ld={CreateResizedCopy:id,ApplyPostProcess:rd,ToHalfFloat:od,FromHalfFloat:ad,GetTextureDataAsync:cd},ud=function(){function e(){}return e.ExpandRGBDTexture=function(e){var t=e._texture;if(t&&e.isRGBD){var n=t.getEngine(),i=n.getCaps(),r=t.isReady,o=!1;i.textureHalfFloatRender&&i.textureHalfFloatLinearFiltering?(o=!0,t.type=a.TEXTURETYPE_HALF_FLOAT):i.textureFloatRender&&i.textureFloatLinearFiltering&&(o=!0,t.type=a.TEXTURETYPE_FLOAT),o&&(t.isReady=!1,t._isRGBD=!1,t.invertY=!1);var s=function(){if(o){var i=new Da("rgbdDecode","rgbdDecode",null,null,1,null,a.TEXTURE_TRILINEAR_SAMPLINGMODE,n,!1,void 0,t.type,void 0,null,!1);i.externalTextureSamplerBinding=!0;var r=n.createRenderTargetTexture(t.width,{generateDepthBuffer:!1,generateMipMaps:!1,generateStencilBuffer:!1,samplingMode:t.samplingMode,type:t.type,format:a.TEXTUREFORMAT_RGBA});i.getEffect().executeWhenCompiled((function(){i.onApply=function(e){e._bindTexture("textureSampler",t),e.setFloat2("scale",1,1)},e.getScene().postProcessManager.directRender([i],r,!0),n.restoreDefaultFramebuffer(),n._releaseTexture(t),i&&i.dispose(),r._swapAndDie(t),t.isReady=!0}))}};r?s():e.onLoadObservable.addOnce(s)}},e.EncodeTextureToRGBD=function(e,t,n){return void 0===n&&(n=a.TEXTURETYPE_UNSIGNED_BYTE),rd("rgbdEncode",e,t,n,a.TEXTURE_NEAREST_SAMPLINGMODE,a.TEXTUREFORMAT_RGBA)},e}(),hd=function(e,t,n,i){this.name=e,this.worldAxisForNormal=t,this.worldAxisForFileX=n,this.worldAxisForFileY=i},dd=function(){function e(){}return e.ConvertCubeMapTextureToSphericalPolynomial=function(e){var t,n=this;if(!e.isCube)return null;null===(t=e.getScene())||void 0===t||t.getEngine().flushFramebuffer();var i,r,o=e.getSize().width,s=e.readPixels(0,void 0,void 0,!1),c=e.readPixels(1,void 0,void 0,!1);e.isRenderTarget?(i=e.readPixels(3,void 0,void 0,!1),r=e.readPixels(2,void 0,void 0,!1)):(i=e.readPixels(2,void 0,void 0,!1),r=e.readPixels(3,void 0,void 0,!1));var l=e.readPixels(4,void 0,void 0,!1),u=e.readPixels(5,void 0,void 0,!1),h=e.gammaSpace,d=a.TEXTUREFORMAT_RGBA,p=a.TEXTURETYPE_UNSIGNED_INT;return e.textureType!=a.TEXTURETYPE_FLOAT&&e.textureType!=a.TEXTURETYPE_HALF_FLOAT||(p=a.TEXTURETYPE_FLOAT),new Promise((function(e){Promise.all([c,s,i,r,l,u]).then((function(t){var i=t[0],r=t[1],a=t[2],s=t[3],c=t[4],l=t[5],u={size:o,right:r,left:i,up:a,down:s,front:c,back:l,format:d,type:p,gammaSpace:h};e(n.ConvertCubeMapToSphericalPolynomial(u))}))}))},e._AreaElement=function(e,t){return Math.atan2(e*t,Math.sqrt(e*e+t*t+1))},e.ConvertCubeMapToSphericalPolynomial=function(e){for(var t=new td,n=0,i=2/e.size,r=i,o=.5*i,s=o-1,c=0;c<6;c++)for(var l=this._FileFaces[c],u=e[l.name],d=s,f=e.format===a.TEXTUREFORMAT_RGBA?4:3,m=0;mA){var S=A/x;b*=S,T*=S,E*=S}}else b=h.Clamp(b,0,A),T=h.Clamp(T,0,A),E=h.Clamp(E,0,A);var C=new B(b,T,E);t.addLight(y,C,v),n+=v,_+=i}d+=r}var P=4*Math.PI*6/6/n;return t.scaleInPlace(P),t.convertIncidentRadianceToIrradiance(),t.convertIrradianceToLambertianRadiance(),nd.FromHarmonics(t)},e._FileFaces=[new hd("right",new C(1,0,0),new C(0,0,-1),new C(0,-1,0)),new hd("left",new C(-1,0,0),new C(0,0,1),new C(0,-1,0)),new hd("up",new C(0,1,0),new C(1,0,0),new C(0,0,1)),new hd("down",new C(0,-1,0),new C(1,0,0),new C(0,0,-1)),new hd("front",new C(0,0,1),new C(1,0,0),new C(0,-1,0)),new hd("back",new C(0,0,-1),new C(-1,0,0),new C(0,-1,0))],e.MAX_HDRI_VALUE=4096,e.PRESERVE_CLAMPED_COLORS=!1,e}();go.prototype.forceSphericalPolynomialsRecompute=function(){this._texture&&(this._texture._sphericalPolynomial=null,this._texture._sphericalPolynomialPromise=null,this._texture._sphericalPolynomialComputed=!1)},Object.defineProperty(go.prototype,"sphericalPolynomial",{get:function(){var e=this;if(this._texture){if(this._texture._sphericalPolynomial||this._texture._sphericalPolynomialComputed)return this._texture._sphericalPolynomial;if(this._texture.isReady)return this._texture._sphericalPolynomialPromise||(this._texture._sphericalPolynomialPromise=dd.ConvertCubeMapTextureToSphericalPolynomial(this),null===this._texture._sphericalPolynomialPromise?this._texture._sphericalPolynomialComputed=!0:this._texture._sphericalPolynomialPromise.then((function(t){e._texture._sphericalPolynomial=t,e._texture._sphericalPolynomialComputed=!0}))),null}return null},set:function(e){this._texture&&(this._texture._sphericalPolynomial=e)},enumerable:!0,configurable:!0}),Vt.ShadersStore.rgbdEncodePixelShader="varying vec2 vUV;uniform sampler2D textureSampler;\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}";var pd="image/png",fd=2,md=[134,22,135,150,246,214,150,54];function _d(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=0,i=0;ifd)throw new Error('Unsupported babylon environment map version "'.concat(e.version,'". Latest supported version is "').concat(fd,'".'));return 2===e.version?e:e=j(j({},e),{version:2,imageType:pd})}function yd(e,t){var n,i;return void 0===t&&(t={}),X(this,void 0,void 0,(function(){var r,o,s,c,l,u,d,p,f,m,_,g,y,v,b,T,E,A,x,S,C,P,I,R,O,w,M,D,N,L,F,B,U;return Y(this,(function(k){switch(k.label){case 0:if(!(r=e.getInternalTexture()))return[2,Promise.reject("The cube texture is invalid.")];if(o=null!==(n=t.imageType)&&void 0!==n?n:pd,s=r.getEngine(),e.textureType!==a.TEXTURETYPE_HALF_FLOAT&&e.textureType!==a.TEXTURETYPE_FLOAT&&e.textureType!==a.TEXTURETYPE_UNSIGNED_BYTE&&e.textureType!==a.TEXTURETYPE_UNSIGNED_INT&&e.textureType!==a.TEXTURETYPE_UNSIGNED_INTEGER&&-1!==e.textureType)return[2,Promise.reject("The cube texture should allow HDR (Full Float or Half Float).")];if(c=a.TEXTURETYPE_FLOAT,!s.getCaps().textureFloatRender&&(c=a.TEXTURETYPE_HALF_FLOAT,!s.getCaps().textureHalfFloatRender))return[2,Promise.reject("Env texture can only be created when the browser supports half float or full float rendering.")];e.sphericalPolynomial,l=null===(i=e.getInternalTexture())||void 0===i?void 0:i._sphericalPolynomialPromise,u=r.width,d=new Ci(s),p={},s.flushFramebuffer(),f=h.ILog2(r.width),F=0,k.label=1;case 1:if(!(F<=f))return[3,9];m=Math.pow(2,f-F),B=0,k.label=2;case 2:return B<6?[4,e.readPixels(B,F,void 0,!1)]:[3,8];case 3:if((_=k.sent())&&_.byteLength===_.length){for(g=new Float32Array(4*_.byteLength),y=0;y<_.byteLength;y++)g[y]=_[y]/255,g[y]=Math.pow(g[y],2.2);_=g}else if(_&&e.gammaSpace)for(v=_,b=0;b=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||95==t}function Od(e){for(var t=0,n="",i=!1,r=[];t=0&&e.charAt(t)!==n&&(!i||e.charAt(t)!==i);)t--;return t}var Md=function(){function e(e,t){void 0===t&&(t=20),this.debug=!1,this._sourceCode=e,this._numMaxIterations=t,this._functionDescr=[],this.inlineToken="#define inline"}return Object.defineProperty(e.prototype,"code",{get:function(){return this._sourceCode},enumerable:!1,configurable:!0}),e.prototype.processCode=function(){this.debug&&J.Log("Start inlining process (code size=".concat(this._sourceCode.length,")...")),this._collectFunctions(),this._processInlining(this._numMaxIterations),this.debug&&J.Log("End of inlining process.")},e.prototype._collectFunctions=function(){for(var t,n=0;n=0&&f.push(_.substring(g+1))}"void"!==a&&f.push("return"),this._functionDescr.push({name:s,type:a,parameters:f,body:d,callIndex:0}),n=h+1;var y=i>0?this._sourceCode.substring(0,i):"",v=h+1=0},e.prototype._replaceFunctionCallsByCode=function(){for(var e=!1,t=0,n=this._functionDescr;t0?this._sourceCode.substring(0,l):"",b=h+1=0){var c=o[a],l=null;if(r&&(l=r[c]),l||(l=t[c]),l){var u=l.getBuffer();u&&u.nativeVertexBuffer&&this._engine.recordVertexBuffer(e,u.nativeVertexBuffer,s,l.byteOffset,l.byteStride,l.getSize(),kd(l.type),l.normalized,l.getInstanceDivisor())}}}},t.prototype.bindBuffers=function(e,t,n){this._boundBuffersVertexArray&&this._deleteVertexArray(this._boundBuffersVertexArray),this._boundBuffersVertexArray=this._engine.createVertexArray(),this._recordVertexArrayObject(this._boundBuffersVertexArray,e,t,n),this.bindVertexArrayObject(this._boundBuffersVertexArray)},t.prototype.recordVertexArrayObject=function(e,t,n,i){var r=this._engine.createVertexArray();return this._recordVertexArrayObject(r,e,t,n,i),r},t.prototype._deleteVertexArray=function(e){this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_DELETEVERTEXARRAY),this._commandBufferEncoder.encodeCommandArgAsNativeData(e),this._commandBufferEncoder.finishEncodingCommand()},t.prototype.bindVertexArrayObject=function(e){this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_BINDVERTEXARRAY),this._commandBufferEncoder.encodeCommandArgAsNativeData(e),this._commandBufferEncoder.finishEncodingCommand()},t.prototype.releaseVertexArrayObject=function(e){this._deleteVertexArray(e)},t.prototype.getAttributes=function(e,t){var n=e;return this._engine.getAttributes(n.nativeProgram,t)},t.prototype.drawElementsType=function(e,t,n,i){this._drawCalls.addCount(1,!1),i&&_native.Engine.COMMAND_DRAWINDEXEDINSTANCED?(this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_DRAWINDEXEDINSTANCED),this._commandBufferEncoder.encodeCommandArgAsUInt32(e),this._commandBufferEncoder.encodeCommandArgAsUInt32(t),this._commandBufferEncoder.encodeCommandArgAsUInt32(n),this._commandBufferEncoder.encodeCommandArgAsUInt32(i)):(this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_DRAWINDEXED),this._commandBufferEncoder.encodeCommandArgAsUInt32(e),this._commandBufferEncoder.encodeCommandArgAsUInt32(t),this._commandBufferEncoder.encodeCommandArgAsUInt32(n)),this._commandBufferEncoder.finishEncodingCommand()},t.prototype.drawArraysType=function(e,t,n,i){this._drawCalls.addCount(1,!1),i&&_native.Engine.COMMAND_DRAWINSTANCED?(this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_DRAWINSTANCED),this._commandBufferEncoder.encodeCommandArgAsUInt32(e),this._commandBufferEncoder.encodeCommandArgAsUInt32(t),this._commandBufferEncoder.encodeCommandArgAsUInt32(n),this._commandBufferEncoder.encodeCommandArgAsUInt32(i)):(this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_DRAW),this._commandBufferEncoder.encodeCommandArgAsUInt32(e),this._commandBufferEncoder.encodeCommandArgAsUInt32(t),this._commandBufferEncoder.encodeCommandArgAsUInt32(n)),this._commandBufferEncoder.finishEncodingCommand()},t.prototype.createPipelineContext=function(){return new Dd(this)},t.prototype.createMaterialContext=function(){},t.prototype.createDrawContext=function(){},t.prototype._preparePipelineContext=function(e,t,n,i,r,o,a,s){e.nativeProgram=i?this.createRawShaderProgram():this.createShaderProgram(e,t,n,s)},t.prototype.isAsync=function(e){return!(!e.isAsync||!this._engine.createProgramAsync)},t.prototype._executeWhenRenderingStateIsCompiled=function(e,t){var n=e;if(this.isAsync(e)){var i=n.onCompiled;n.onCompiled=i?function(){i(),t()}:t}else t()},t.prototype.createRawShaderProgram=function(){throw new Error("Not Supported")},t.prototype.createShaderProgram=function(e,t,n,i){var r=this,o=e;if(o.nativeProgram)throw new Error("Tried to create a second program in the same NativePipelineContext");this.onBeforeShaderCompilationObservable.notifyObservers(this);var a=new Md(t);a.processCode(),t=a.code;var s=new Md(n);s.processCode(),n=s.code,t=rn._ConcatenateShader(t,i),n=rn._ConcatenateShader(n,i);var c=function(){var e;o.isCompiled=!0,null===(e=o.onCompiled)||void 0===e||e.call(o),r.onAfterShaderCompilationObservable.notifyObservers(r)};if(this.isAsync(e))return this._engine.createProgramAsync(t,n,c,(function(e){o.compilationError=e}));try{var l=o.nativeProgram=this._engine.createProgram(t,n);return c(),l}catch(e){var u=null==e?void 0:e.message;throw new Error("SHADER ERROR"+("string"==typeof u?"\n"+u:""))}},t.prototype.inlineShaderCode=function(e){var t=new Md(e);return t.debug=!1,t.processCode(),t.code},t.prototype._setProgram=function(e){this._currentProgram!==e&&(this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_SETPROGRAM),this._commandBufferEncoder.encodeCommandArgAsNativeData(e),this._commandBufferEncoder.finishEncodingCommand(),this._currentProgram=e)},t.prototype._deletePipelineContext=function(e){var t=e;t&&t.nativeProgram&&(this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_DELETEPROGRAM),this._commandBufferEncoder.encodeCommandArgAsNativeData(t.nativeProgram),this._commandBufferEncoder.finishEncodingCommand())},t.prototype.getUniforms=function(e,t){var n=e;return this._engine.getUniforms(n.nativeProgram,t)},t.prototype.bindUniformBlock=function(e,t,n){throw new Error("Not Implemented")},t.prototype.bindSamplers=function(e){var t=e.getPipelineContext();this._setProgram(t.nativeProgram);for(var n=e.getSamplers(),i=0;i-1?e.substring(T).toLowerCase():""),x=null,S=0,C=Dr._TextureLoaders;S-1?e.substring(g).toLowerCase():""))){if(n&&6===n.length)throw new Error("Multi-file loading not allowed on env files.");this._loadFile(e,(function(e){!function(e){var t=_d(e);_.width=t.width,_.height=t.width,xd(_,t);var n=t.specular;if(!n)throw new Error("Nothing else parsed so far");_._lodGenerationScale=n.lodGenerationScale;var i=bd(e,t);_.format=a.TEXTUREFORMAT_RGBA,_.type=a.TEXTURETYPE_UNSIGNED_INT,_.generateMipMaps=!0,_.getEngine().updateTextureSamplingMode(Eo.TRILINEAR_SAMPLINGMODE,_),_._isRGBD=!0,_.invertY=!0,m._engine.loadCubeTextureWithMips(_._hardwareTexture.underlyingResource,i,!1,_._useSRGBBuffer,(function(){_.isReady=!0,r&&r()}),(function(){throw new Error("Could not load a native cube texture.")}))}(new Uint8Array(e,0,e.byteLength))}),void 0,void 0,!0,(function(e,t){o&&e&&o(e.status+" "+e.statusText,t)}))}else{if(!n||6!==n.length)throw new Error("Cannot load cubemap because 6 files were not defined");var y=[n[0],n[3],n[1],n[4],n[2],n[5]];Promise.all(y.map((function(e){return m._loadFileAsync(e,void 0,!0).then((function(e){return new Uint8Array(e,0,e.byteLength)}))}))).then((function(e){return new Promise((function(t,n){m._engine.loadCubeTexture(_._hardwareTexture.underlyingResource,e,!i,!0,_._useSRGBBuffer,t,n)}))})).then((function(){_.isReady=!0,r&&r()}),(function(e){o&&o("Failed to load cubemap: ".concat(e.message),e)}))}return this._internalTexturesCache.push(_),_},t.prototype._createHardwareTexture=function(){return new Ld(this._createTexture(),this._engine)},t.prototype._createHardwareRenderTargetWrapper=function(e,t,n){var i=new Nd(e,t,n,this);return this._renderTargetWrapperCache.push(i),i},t.prototype._createInternalTexture=function(e,t,n,i){var r,o,s;void 0===n&&(n=!0),void 0===i&&(i=wt.Unknown);var c,l=!1,u=a.TEXTURETYPE_UNSIGNED_INT,h=a.TEXTURE_TRILINEAR_SAMPLINGMODE,d=a.TEXTUREFORMAT_RGBA,p=!1,f=1;void 0!==t&&"object"==typeof t?(l=!!t.generateMipMaps,u=void 0===t.type?a.TEXTURETYPE_UNSIGNED_INT:t.type,h=void 0===t.samplingMode?a.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,d=void 0===t.format?a.TEXTUREFORMAT_RGBA:t.format,p=void 0!==t.useSRGBBuffer&&t.useSRGBBuffer,f=null!==(r=t.samples)&&void 0!==r?r:1,c=t.label):l=!!t,p=this._getUseSRGBBuffer(p,!l),(u!==a.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(u!==a.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(h=a.TEXTURE_NEAREST_SAMPLINGMODE),u!==a.TEXTURETYPE_FLOAT||this._caps.textureFloat||(u=a.TEXTURETYPE_UNSIGNED_INT,J.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));var m=new Xt(this,i),_=null!==(o=e.width)&&void 0!==o?o:e,g=null!==(s=e.height)&&void 0!==s?s:e,y=e.layers||0;if(0!==y)throw new Error("Texture layers are not supported in Babylon Native");var v=m._hardwareTexture.underlyingResource,b=Fd(d,u);return this._engine.initializeTexture(v,_,g,l,b,!0,p,f),this._setTextureSampling(v,Bd(h)),m._useSRGBBuffer=p,m.baseWidth=_,m.baseHeight=g,m.width=_,m.height=g,m.depth=y,m.isReady=!0,m.samples=f,m.generateMipMaps=l,m.samplingMode=h,m.type=u,m.format=d,m.label=c,this._internalTexturesCache.push(m),m},t.prototype.createRenderTargetTexture=function(e,t){var n,i,r,o,a=this._createHardwareRenderTargetWrapper(!1,!1,e),s=!0,c=!1,l=!1,u=void 0,h=1;void 0!==t&&"object"==typeof t&&(s=null===(n=t.generateDepthBuffer)||void 0===n||n,c=!!t.generateStencilBuffer,l=!!t.noColorAttachment,u=t.colorAttachment,h=null!==(i=t.samples)&&void 0!==i?i:1);var d=u||(l?null:this._createInternalTexture(e,t,!0,wt.RenderTarget)),p=null!==(r=e.width)&&void 0!==r?r:e,f=null!==(o=e.height)&&void 0!==o?o:e,m=this._engine.createFrameBuffer(d?d._hardwareTexture.underlyingResource:null,p,f,c,s,h);return a._framebuffer=m,a._generateDepthBuffer=s,a._generateStencilBuffer=c,a._samples=h,a.setTextures(d),a},t.prototype.updateRenderTargetTextureSampleCount=function(e,t){return J.Warn("Updating render target sample count is not currently supported"),e.samples},t.prototype.updateTextureSamplingMode=function(e,t){if(t._hardwareTexture){var n=Bd(e);this._setTextureSampling(t._hardwareTexture.underlyingResource,n)}t.samplingMode=e},t.prototype.bindFramebuffer=function(e,t,n,i,r){var o=e;if(this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,t)throw new Error("Cuboid frame buffers are not yet supported in NativeEngine.");if(n||i)throw new Error("Required width/height for frame buffers not yet supported in NativeEngine.");o._framebufferDepthStencil?this._bindUnboundFramebuffer(o._framebufferDepthStencil):this._bindUnboundFramebuffer(o._framebuffer)},t.prototype.unBindFramebuffer=function(e,t,n){void 0===t&&(t=!1),this._currentRenderTarget=null,n&&n(),this._bindUnboundFramebuffer(null)},t.prototype.createDynamicVertexBuffer=function(e){return this.createVertexBuffer(e,!0)},t.prototype.updateDynamicIndexBuffer=function(e,t,n){void 0===n&&(n=0);var i=e,r=this._normalizeIndexData(t);i.is32Bits=4===r.BYTES_PER_ELEMENT,this._engine.updateDynamicIndexBuffer(i.nativeIndexBuffer,r.buffer,r.byteOffset,r.byteLength,n)},t.prototype.updateDynamicVertexBuffer=function(e,t,n,i){var r=e,o=ArrayBuffer.isView(t)?t:new Float32Array(t);this._engine.updateDynamicVertexBuffer(r.nativeVertexBuffer,o.buffer,o.byteOffset+(null!=n?n:0),null!=i?i:o.byteLength)},t.prototype._setTexture=function(e,t,n,i){void 0===n&&(n=!1),void 0===i&&(i=!1);var r,o=this._boundUniforms[e];if(!o)return!1;if(!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._boundTexturesCache[e]=null),!1;if(t.video)this._activeChannel=e,t.update();else if(t.delayLoadState===a.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;return r=i?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,this._activeChannel=e,!(!r||!r._hardwareTexture||(this._setTextureWrapMode(r._hardwareTexture.underlyingResource,Ud(t.wrapU),Ud(t.wrapV),Ud(t.wrapR)),this._updateAnisotropicLevel(t),this._setTextureCore(o,r._hardwareTexture.underlyingResource),0))},t.prototype._setTextureSampling=function(e,t){this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_SETTEXTURESAMPLING),this._commandBufferEncoder.encodeCommandArgAsNativeData(e),this._commandBufferEncoder.encodeCommandArgAsUInt32(t),this._commandBufferEncoder.finishEncodingCommand()},t.prototype._setTextureWrapMode=function(e,t,n,i){this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_SETTEXTUREWRAPMODE),this._commandBufferEncoder.encodeCommandArgAsNativeData(e),this._commandBufferEncoder.encodeCommandArgAsUInt32(t),this._commandBufferEncoder.encodeCommandArgAsUInt32(n),this._commandBufferEncoder.encodeCommandArgAsUInt32(i),this._commandBufferEncoder.finishEncodingCommand()},t.prototype._setTextureCore=function(e,t){this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_SETTEXTURE),this._commandBufferEncoder.encodeCommandArgAsNativeData(e),this._commandBufferEncoder.encodeCommandArgAsNativeData(t),this._commandBufferEncoder.finishEncodingCommand()},t.prototype._updateAnisotropicLevel=function(e){var t=e.getInternalTexture(),n=e.anisotropicFilteringLevel;t&&t._hardwareTexture&&t._cachedAnisotropicFilteringLevel!==n&&(this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_SETTEXTUREANISOTROPICLEVEL),this._commandBufferEncoder.encodeCommandArgAsNativeData(t._hardwareTexture.underlyingResource),this._commandBufferEncoder.encodeCommandArgAsUInt32(n),this._commandBufferEncoder.finishEncodingCommand(),t._cachedAnisotropicFilteringLevel=n)},t.prototype._bindTexture=function(e,t){var n=this._boundUniforms[e];if(n&&t&&t._hardwareTexture){var i=t._hardwareTexture.underlyingResource;this._setTextureCore(n,i)}},t.prototype._deleteBuffer=function(e){e.nativeIndexBuffer&&(this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_DELETEINDEXBUFFER),this._commandBufferEncoder.encodeCommandArgAsNativeData(e.nativeIndexBuffer),this._commandBufferEncoder.finishEncodingCommand(),delete e.nativeIndexBuffer),e.nativeVertexBuffer&&(this._commandBufferEncoder.startEncodingCommand(_native.Engine.COMMAND_DELETEVERTEXBUFFER),this._commandBufferEncoder.encodeCommandArgAsNativeData(e.nativeVertexBuffer),this._commandBufferEncoder.finishEncodingCommand(),delete e.nativeVertexBuffer)},t.prototype.createCanvas=function(e,t){if(!_native.Canvas)throw new Error("Native Canvas plugin not available.");var n=new _native.Canvas;return n.width=e,n.height=t,n},t.prototype.createCanvasImage=function(){if(!_native.Canvas)throw new Error("Native Canvas plugin not available.");return new _native.Image},t.prototype.updateTextureData=function(e,t,n,i,r,o,a,s,c){throw void 0===a&&(a=0),void 0===s&&(s=0),void 0===c&&(c=!1),new Error("updateTextureData not implemented.")},t.prototype._uploadCompressedDataToTextureDirectly=function(e,t,n,i,r,o,a){throw void 0===o&&(o=0),void 0===a&&(a=0),new Error("_uploadCompressedDataToTextureDirectly not implemented.")},t.prototype._uploadDataToTextureDirectly=function(e,t,n,i){throw void 0===n&&(n=0),void 0===i&&(i=0),new Error("_uploadDataToTextureDirectly not implemented.")},t.prototype._uploadArrayBufferViewToTexture=function(e,t,n,i){throw void 0===n&&(n=0),void 0===i&&(i=0),new Error("_uploadArrayBufferViewToTexture not implemented.")},t.prototype._uploadImageToTexture=function(e,t,n,i){throw void 0===n&&(n=0),void 0===i&&(i=0),new Error("_uploadArrayBufferViewToTexture not implemented.")},t.prototype.getFontOffset=function(e){return{ascent:0,height:0,descent:0}},t.prototype._readTexturePixels=function(e,t,n,i,r,o,a,s,c,l){var u,h,d,p;if(void 0!==i&&-1!==i)throw new Error("Reading cubemap faces is not supported, but faceIndex is ".concat(i,"."));return this._engine.readTexture(null===(u=e._hardwareTexture)||void 0===u?void 0:u.underlyingResource,null!=r?r:0,null!=c?c:0,null!=l?l:0,t,n,null!==(h=null==o?void 0:o.buffer)&&void 0!==h?h:null,null!==(d=null==o?void 0:o.byteOffset)&&void 0!==d?d:0,null!==(p=null==o?void 0:o.byteLength)&&void 0!==p?p:0).then((function(e){return o||(o=new Uint8Array(e)),o}))},t.PROTOCOL_VERSION=8,t}(Dr);Xd._createNativeDataStream=function(){return _native.NativeDataStream.VALIDATION_ENABLED?new Dp:new Qh};var Yd,qd,Kd,Qd,Zd,$d,Jd,ep,tp,np,ip,rp,op,ap,sp,cp,lp,up,hp,dp,pp,fp,mp,_p,gp,yp,vp,bp,Tp,Ep,Ap,xp,Sp,Cp,Pp,Ip,Rp,Op,wp,Mp,Dp=function(e){function t(){return e.call(this)||this}return H(t,e),t.prototype.writeUint32=function(t){e.prototype.writeUint32.call(this,_native.NativeDataStream.VALIDATION_UINT_32),e.prototype.writeUint32.call(this,t)},t.prototype.writeInt32=function(t){e.prototype.writeUint32.call(this,_native.NativeDataStream.VALIDATION_INT_32),e.prototype.writeInt32.call(this,t)},t.prototype.writeFloat32=function(t){e.prototype.writeUint32.call(this,_native.NativeDataStream.VALIDATION_FLOAT_32),e.prototype.writeFloat32.call(this,t)},t.prototype.writeUint32Array=function(t){e.prototype.writeUint32.call(this,_native.NativeDataStream.VALIDATION_UINT_32_ARRAY),e.prototype.writeUint32Array.call(this,t)},t.prototype.writeInt32Array=function(t){e.prototype.writeUint32.call(this,_native.NativeDataStream.VALIDATION_INT_32_ARRAY),e.prototype.writeInt32Array.call(this,t)},t.prototype.writeFloat32Array=function(t){e.prototype.writeUint32.call(this,_native.NativeDataStream.VALIDATION_FLOAT_32_ARRAY),e.prototype.writeFloat32Array.call(this,t)},t.prototype.writeNativeData=function(t){e.prototype.writeUint32.call(this,_native.NativeDataStream.VALIDATION_NATIVE_DATA),e.prototype.writeNativeData.call(this,t)},t.prototype.writeBoolean=function(t){e.prototype.writeUint32.call(this,_native.NativeDataStream.VALIDATION_BOOLEAN),e.prototype.writeBoolean.call(this,t)},t}(Qh);!function(e){e.LowPower="low-power",e.HighPerformance="high-performance"}(Yd||(Yd={})),function(e){e.DepthClipControl="depth-clip-control",e.Depth32FloatStencil8="depth32float-stencil8",e.TextureCompressionBC="texture-compression-bc",e.TextureCompressionETC2="texture-compression-etc2",e.TextureCompressionASTC="texture-compression-astc",e.TimestampQuery="timestamp-query",e.IndirectFirstInstance="indirect-first-instance",e.ShaderF16="shader-f16",e.RG11B10UFloatRenderable="rg11b10ufloat-renderable",e.BGRA8UnormStorage="bgra8unorm-storage",e.Float32Filterable="float32-filterable"}(qd||(qd={})),function(e){e.Unmapped="unmapped",e.Pending="pending",e.Mapped="mapped"}(Kd||(Kd={})),function(e){e[e.MapRead=1]="MapRead",e[e.MapWrite=2]="MapWrite",e[e.CopySrc=4]="CopySrc",e[e.CopyDst=8]="CopyDst",e[e.Index=16]="Index",e[e.Vertex=32]="Vertex",e[e.Uniform=64]="Uniform",e[e.Storage=128]="Storage",e[e.Indirect=256]="Indirect",e[e.QueryResolve=512]="QueryResolve"}(Qd||(Qd={})),function(e){e[e.Read=1]="Read",e[e.Write=2]="Write"}(Zd||(Zd={})),function(e){e.E1d="1d",e.E2d="2d",e.E3d="3d"}($d||($d={})),function(e){e[e.CopySrc=1]="CopySrc",e[e.CopyDst=2]="CopyDst",e[e.TextureBinding=4]="TextureBinding",e[e.StorageBinding=8]="StorageBinding",e[e.RenderAttachment=16]="RenderAttachment"}(Jd||(Jd={})),function(e){e.E1d="1d",e.E2d="2d",e.E2dArray="2d-array",e.Cube="cube",e.CubeArray="cube-array",e.E3d="3d"}(ep||(ep={})),function(e){e.All="all",e.StencilOnly="stencil-only",e.DepthOnly="depth-only"}(tp||(tp={})),function(e){e.R8Unorm="r8unorm",e.R8Snorm="r8snorm",e.R8Uint="r8uint",e.R8Sint="r8sint",e.R16Uint="r16uint",e.R16Sint="r16sint",e.R16Float="r16float",e.RG8Unorm="rg8unorm",e.RG8Snorm="rg8snorm",e.RG8Uint="rg8uint",e.RG8Sint="rg8sint",e.R32Uint="r32uint",e.R32Sint="r32sint",e.R32Float="r32float",e.RG16Uint="rg16uint",e.RG16Sint="rg16sint",e.RG16Float="rg16float",e.RGBA8Unorm="rgba8unorm",e.RGBA8UnormSRGB="rgba8unorm-srgb",e.RGBA8Snorm="rgba8snorm",e.RGBA8Uint="rgba8uint",e.RGBA8Sint="rgba8sint",e.BGRA8Unorm="bgra8unorm",e.BGRA8UnormSRGB="bgra8unorm-srgb",e.RGB9E5UFloat="rgb9e5ufloat",e.RGB10A2UINT="rgb10a2uint",e.RGB10A2Unorm="rgb10a2unorm",e.RG11B10UFloat="rg11b10ufloat",e.RG32Uint="rg32uint",e.RG32Sint="rg32sint",e.RG32Float="rg32float",e.RGBA16Uint="rgba16uint",e.RGBA16Sint="rgba16sint",e.RGBA16Float="rgba16float",e.RGBA32Uint="rgba32uint",e.RGBA32Sint="rgba32sint",e.RGBA32Float="rgba32float",e.Stencil8="stencil8",e.Depth16Unorm="depth16unorm",e.Depth24Plus="depth24plus",e.Depth24PlusStencil8="depth24plus-stencil8",e.Depth32Float="depth32float",e.BC1RGBAUnorm="bc1-rgba-unorm",e.BC1RGBAUnormSRGB="bc1-rgba-unorm-srgb",e.BC2RGBAUnorm="bc2-rgba-unorm",e.BC2RGBAUnormSRGB="bc2-rgba-unorm-srgb",e.BC3RGBAUnorm="bc3-rgba-unorm",e.BC3RGBAUnormSRGB="bc3-rgba-unorm-srgb",e.BC4RUnorm="bc4-r-unorm",e.BC4RSnorm="bc4-r-snorm",e.BC5RGUnorm="bc5-rg-unorm",e.BC5RGSnorm="bc5-rg-snorm",e.BC6HRGBUFloat="bc6h-rgb-ufloat",e.BC6HRGBFloat="bc6h-rgb-float",e.BC7RGBAUnorm="bc7-rgba-unorm",e.BC7RGBAUnormSRGB="bc7-rgba-unorm-srgb",e.ETC2RGB8Unorm="etc2-rgb8unorm",e.ETC2RGB8UnormSRGB="etc2-rgb8unorm-srgb",e.ETC2RGB8A1Unorm="etc2-rgb8a1unorm",e.ETC2RGB8A1UnormSRGB="etc2-rgb8a1unorm-srgb",e.ETC2RGBA8Unorm="etc2-rgba8unorm",e.ETC2RGBA8UnormSRGB="etc2-rgba8unorm-srgb",e.EACR11Unorm="eac-r11unorm",e.EACR11Snorm="eac-r11snorm",e.EACRG11Unorm="eac-rg11unorm",e.EACRG11Snorm="eac-rg11snorm",e.ASTC4x4Unorm="astc-4x4-unorm",e.ASTC4x4UnormSRGB="astc-4x4-unorm-srgb",e.ASTC5x4Unorm="astc-5x4-unorm",e.ASTC5x4UnormSRGB="astc-5x4-unorm-srgb",e.ASTC5x5Unorm="astc-5x5-unorm",e.ASTC5x5UnormSRGB="astc-5x5-unorm-srgb",e.ASTC6x5Unorm="astc-6x5-unorm",e.ASTC6x5UnormSRGB="astc-6x5-unorm-srgb",e.ASTC6x6Unorm="astc-6x6-unorm",e.ASTC6x6UnormSRGB="astc-6x6-unorm-srgb",e.ASTC8x5Unorm="astc-8x5-unorm",e.ASTC8x5UnormSRGB="astc-8x5-unorm-srgb",e.ASTC8x6Unorm="astc-8x6-unorm",e.ASTC8x6UnormSRGB="astc-8x6-unorm-srgb",e.ASTC8x8Unorm="astc-8x8-unorm",e.ASTC8x8UnormSRGB="astc-8x8-unorm-srgb",e.ASTC10x5Unorm="astc-10x5-unorm",e.ASTC10x5UnormSRGB="astc-10x5-unorm-srgb",e.ASTC10x6Unorm="astc-10x6-unorm",e.ASTC10x6UnormSRGB="astc-10x6-unorm-srgb",e.ASTC10x8Unorm="astc-10x8-unorm",e.ASTC10x8UnormSRGB="astc-10x8-unorm-srgb",e.ASTC10x10Unorm="astc-10x10-unorm",e.ASTC10x10UnormSRGB="astc-10x10-unorm-srgb",e.ASTC12x10Unorm="astc-12x10-unorm",e.ASTC12x10UnormSRGB="astc-12x10-unorm-srgb",e.ASTC12x12Unorm="astc-12x12-unorm",e.ASTC12x12UnormSRGB="astc-12x12-unorm-srgb",e.Depth32FloatStencil8="depth32float-stencil8"}(np||(np={})),function(e){e.ClampToEdge="clamp-to-edge",e.Repeat="repeat",e.MirrorRepeat="mirror-repeat"}(ip||(ip={})),function(e){e.Nearest="nearest",e.Linear="linear"}(rp||(rp={})),function(e){e.Nearest="nearest",e.Linear="linear"}(op||(op={})),function(e){e.Never="never",e.Less="less",e.Equal="equal",e.LessEqual="less-equal",e.Greater="greater",e.NotEqual="not-equal",e.GreaterEqual="greater-equal",e.Always="always"}(ap||(ap={})),function(e){e[e.Vertex=1]="Vertex",e[e.Fragment=2]="Fragment",e[e.Compute=4]="Compute"}(sp||(sp={})),function(e){e.Uniform="uniform",e.Storage="storage",e.ReadOnlyStorage="read-only-storage"}(cp||(cp={})),function(e){e.Filtering="filtering",e.NonFiltering="non-filtering",e.Comparison="comparison"}(lp||(lp={})),function(e){e.Float="float",e.UnfilterableFloat="unfilterable-float",e.Depth="depth",e.Sint="sint",e.Uint="uint"}(up||(up={})),function(e){e.WriteOnly="write-only"}(hp||(hp={})),function(e){e.Error="error",e.Warning="warning",e.Info="info"}(dp||(dp={})),function(e){e.Validation="validation",e.Internal="internal"}(pp||(pp={})),function(e){e.Auto="auto"}(fp||(fp={})),function(e){e.PointList="point-list",e.LineList="line-list",e.LineStrip="line-strip",e.TriangleList="triangle-list",e.TriangleStrip="triangle-strip"}(mp||(mp={})),function(e){e.CCW="ccw",e.CW="cw"}(_p||(_p={})),function(e){e.None="none",e.Front="front",e.Back="back"}(gp||(gp={})),function(e){e[e.Red=1]="Red",e[e.Green=2]="Green",e[e.Blue=4]="Blue",e[e.Alpha=8]="Alpha",e[e.All=15]="All"}(yp||(yp={})),function(e){e.Zero="zero",e.One="one",e.Src="src",e.OneMinusSrc="one-minus-src",e.SrcAlpha="src-alpha",e.OneMinusSrcAlpha="one-minus-src-alpha",e.Dst="dst",e.OneMinusDst="one-minus-dst",e.DstAlpha="dst-alpha",e.OneMinusDstAlpha="one-minus-dst-alpha",e.SrcAlphaSaturated="src-alpha-saturated",e.Constant="constant",e.OneMinusConstant="one-minus-constant"}(vp||(vp={})),function(e){e.Add="add",e.Subtract="subtract",e.ReverseSubtract="reverse-subtract",e.Min="min",e.Max="max"}(bp||(bp={})),function(e){e.Keep="keep",e.Zero="zero",e.Replace="replace",e.Invert="invert",e.IncrementClamp="increment-clamp",e.DecrementClamp="decrement-clamp",e.IncrementWrap="increment-wrap",e.DecrementWrap="decrement-wrap"}(Tp||(Tp={})),function(e){e.Uint16="uint16",e.Uint32="uint32"}(Ep||(Ep={})),function(e){e.Uint8x2="uint8x2",e.Uint8x4="uint8x4",e.Sint8x2="sint8x2",e.Sint8x4="sint8x4",e.Unorm8x2="unorm8x2",e.Unorm8x4="unorm8x4",e.Snorm8x2="snorm8x2",e.Snorm8x4="snorm8x4",e.Uint16x2="uint16x2",e.Uint16x4="uint16x4",e.Sint16x2="sint16x2",e.Sint16x4="sint16x4",e.Unorm16x2="unorm16x2",e.Unorm16x4="unorm16x4",e.Snorm16x2="snorm16x2",e.Snorm16x4="snorm16x4",e.Float16x2="float16x2",e.Float16x4="float16x4",e.Float32="float32",e.Float32x2="float32x2",e.Float32x3="float32x3",e.Float32x4="float32x4",e.Uint32="uint32",e.Uint32x2="uint32x2",e.Uint32x3="uint32x3",e.Uint32x4="uint32x4",e.Sint32="sint32",e.Sint32x2="sint32x2",e.Sint32x3="sint32x3",e.Sint32x4="sint32x4",e.UNORM10x10x10x2="unorm10-10-10-2"}(Ap||(Ap={})),function(e){e.Vertex="vertex",e.Instance="instance"}(xp||(xp={})),function(e){e.Beginning="beginning",e.End="end"}(Sp||(Sp={})),function(e){e.Beginning="beginning",e.End="end"}(Cp||(Cp={})),function(e){e.Load="load",e.Clear="clear"}(Pp||(Pp={})),function(e){e.Store="store",e.Discard="discard"}(Ip||(Ip={})),function(e){e.Occlusion="occlusion",e.Timestamp="timestamp"}(Rp||(Rp={})),function(e){e.Opaque="opaque",e.Premultiplied="premultiplied"}(Op||(Op={})),function(e){e.Unknown="unknown",e.Destroyed="destroyed"}(wp||(wp={})),function(e){e.Validation="validation",e.OutOfMemory="out-of-memory",e.Internal="internal"}(Mp||(Mp={}));var Np=function(){function e(){this.shaderLanguage=at.GLSL,this.vertexBufferKindToNumberOfComponents={}}return e.prototype._addUniformToLeftOverUBO=function(e,t,n){var i,r;e=(i=this._getArraySize(e,t,n))[0],t=i[1],r=i[2];for(var o=0;o=0&&(_.push(a[l]),g.push(y))}this.shaderProcessingContext.attributeNamesFromEffect=_,this.shaderProcessingContext.attributeLocationsFromEffect=g},e.prototype.buildUniformLayout=function(){if(this.shaderProcessingContext.leftOverUniforms.length){this.uniformBuffer=new Wn(this.engine,void 0,void 0,"leftOver-"+this._name);for(var e=0,t=this.shaderProcessingContext.leftOverUniforms;e)?$/,"$1"),r=Np.UniformSizes[i];this.uniformBuffer.addUniform(n.name,r,n.length),this._leftOverUniformsByName[n.name]=n.type}this.uniformBuffer.create()}},e.prototype.dispose=function(){this.uniformBuffer&&this.uniformBuffer.dispose()},e.prototype.setInt=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt(e,t)},e.prototype.setInt2=function(e,t,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt2(e,t,n)},e.prototype.setInt3=function(e,t,n,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt3(e,t,n,i)},e.prototype.setInt4=function(e,t,n,i,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt4(e,t,n,i,r)},e.prototype.setIntArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateIntArray(e,t)},e.prototype.setIntArray2=function(e,t){this.setIntArray(e,t)},e.prototype.setIntArray3=function(e,t){this.setIntArray(e,t)},e.prototype.setIntArray4=function(e,t){this.setIntArray(e,t)},e.prototype.setUInt=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateUInt(e,t)},e.prototype.setUInt2=function(e,t,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateUInt2(e,t,n)},e.prototype.setUInt3=function(e,t,n,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateUInt3(e,t,n,i)},e.prototype.setUInt4=function(e,t,n,i,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateUInt4(e,t,n,i,r)},e.prototype.setUIntArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateUIntArray(e,t)},e.prototype.setUIntArray2=function(e,t){this.setUIntArray(e,t)},e.prototype.setUIntArray3=function(e,t){this.setUIntArray(e,t)},e.prototype.setUIntArray4=function(e,t){this.setUIntArray(e,t)},e.prototype.setArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateArray(e,t)},e.prototype.setArray2=function(e,t){this.setArray(e,t)},e.prototype.setArray3=function(e,t){this.setArray(e,t)},e.prototype.setArray4=function(e,t){this.setArray(e,t)},e.prototype.setMatrices=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrices(e,t)},e.prototype.setMatrix=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix(e,t)},e.prototype.setMatrix3x3=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix3x3(e,t)},e.prototype.setMatrix2x2=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix2x2(e,t)},e.prototype.setFloat=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat(e,t)},e.prototype.setVector2=function(e,t){this.setFloat2(e,t.x,t.y)},e.prototype.setFloat2=function(e,t,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat2(e,t,n)},e.prototype.setVector3=function(e,t){this.setFloat3(e,t.x,t.y,t.z)},e.prototype.setFloat3=function(e,t,n,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat3(e,t,n,i)},e.prototype.setVector4=function(e,t){this.setFloat4(e,t.x,t.y,t.z,t.w)},e.prototype.setQuaternion=function(e,t){this.setFloat4(e,t.x,t.y,t.z,t.w)},e.prototype.setFloat4=function(e,t,n,i,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat4(e,t,n,i,r)},e.prototype.setColor3=function(e,t){this.setFloat3(e,t.r,t.g,t.b)},e.prototype.setColor4=function(e,t,n){this.setFloat4(e,t.r,t.g,t.b,n)},e.prototype.setDirectColor4=function(e,t){this.setFloat4(e,t.r,t.g,t.b,t.a)},e.prototype._getVertexShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.vertex},e.prototype._getFragmentShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.fragment},e}(),Fp={mat2:2,mat3:3,mat4:4,mat2x2:2,mat3x3:3,mat4x4:4},Bp=function(){function e(e){this.shaderLanguage=e,this._attributeNextLocation=0,this._varyingNextLocation=0,this.freeGroupIndex=0,this.freeBindingIndex=0,this.availableVaryings={},this.availableAttributes={},this.availableBuffers={},this.availableTextures={},this.availableSamplers={},this.orderedAttributes=[],this.bindGroupLayoutEntries=[],this.bindGroupLayoutEntryInfo=[],this.bindGroupEntries=[],this.bufferNames=[],this.textureNames=[],this.samplerNames=[],this.leftOverUniforms=[],this._findStartingGroupBinding()}return Object.defineProperty(e,"KnownUBOs",{get:function(){return e._SimplifiedKnownBindings?e._SimplifiedKnownUBOs:e._KnownUBOs},enumerable:!1,configurable:!0}),e.prototype._findStartingGroupBinding=function(){var t=e.KnownUBOs,n=[];for(var i in t){var r=t[i].binding;-1!==r.groupIndex&&(void 0===n[r.groupIndex]?n[r.groupIndex]=r.bindingIndex:n[r.groupIndex]=Math.max(n[r.groupIndex],r.bindingIndex))}this.freeGroupIndex=n.length-1,0===this.freeGroupIndex?(this.freeGroupIndex++,this.freeBindingIndex=0):this.freeBindingIndex=n[n.length-1]+1},e.prototype.getAttributeNextLocation=function(e,t){var n;void 0===t&&(t=0);var i=this._attributeNextLocation;return this._attributeNextLocation+=(null!==(n=Fp[e])&&void 0!==n?n:1)*(t||1),i},e.prototype.getVaryingNextLocation=function(e,t){var n;void 0===t&&(t=0);var i=this._varyingNextLocation;return this._varyingNextLocation+=(null!==(n=Fp[e])&&void 0!==n?n:1)*(t||1),i},e.prototype.getNextFreeUBOBinding=function(){return this._getNextFreeBinding(1)},e.prototype._getNextFreeBinding=function(e){if(this.freeBindingIndex>65536-e&&(this.freeGroupIndex++,this.freeBindingIndex=0),4===this.freeGroupIndex)throw"Too many textures or UBOs have been declared and it is not supported in WebGPU.";var t={groupIndex:this.freeGroupIndex,bindingIndex:this.freeBindingIndex};return this.freeBindingIndex+=e,t},e._SimplifiedKnownBindings=!0,e._SimplifiedKnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:-1,bindingIndex:-1}},Light1:{binding:{groupIndex:-1,bindingIndex:-1}},Light2:{binding:{groupIndex:-1,bindingIndex:-1}},Light3:{binding:{groupIndex:-1,bindingIndex:-1}},Light4:{binding:{groupIndex:-1,bindingIndex:-1}},Light5:{binding:{groupIndex:-1,bindingIndex:-1}},Light6:{binding:{groupIndex:-1,bindingIndex:-1}},Light7:{binding:{groupIndex:-1,bindingIndex:-1}},Light8:{binding:{groupIndex:-1,bindingIndex:-1}},Light9:{binding:{groupIndex:-1,bindingIndex:-1}},Light10:{binding:{groupIndex:-1,bindingIndex:-1}},Light11:{binding:{groupIndex:-1,bindingIndex:-1}},Light12:{binding:{groupIndex:-1,bindingIndex:-1}},Light13:{binding:{groupIndex:-1,bindingIndex:-1}},Light14:{binding:{groupIndex:-1,bindingIndex:-1}},Light15:{binding:{groupIndex:-1,bindingIndex:-1}},Light16:{binding:{groupIndex:-1,bindingIndex:-1}},Light17:{binding:{groupIndex:-1,bindingIndex:-1}},Light18:{binding:{groupIndex:-1,bindingIndex:-1}},Light19:{binding:{groupIndex:-1,bindingIndex:-1}},Light20:{binding:{groupIndex:-1,bindingIndex:-1}},Light21:{binding:{groupIndex:-1,bindingIndex:-1}},Light22:{binding:{groupIndex:-1,bindingIndex:-1}},Light23:{binding:{groupIndex:-1,bindingIndex:-1}},Light24:{binding:{groupIndex:-1,bindingIndex:-1}},Light25:{binding:{groupIndex:-1,bindingIndex:-1}},Light26:{binding:{groupIndex:-1,bindingIndex:-1}},Light27:{binding:{groupIndex:-1,bindingIndex:-1}},Light28:{binding:{groupIndex:-1,bindingIndex:-1}},Light29:{binding:{groupIndex:-1,bindingIndex:-1}},Light30:{binding:{groupIndex:-1,bindingIndex:-1}},Light31:{binding:{groupIndex:-1,bindingIndex:-1}},Material:{binding:{groupIndex:-1,bindingIndex:-1}},Mesh:{binding:{groupIndex:-1,bindingIndex:-1}},Internals:{binding:{groupIndex:-1,bindingIndex:-1}}},e._KnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:1,bindingIndex:0}},Light1:{binding:{groupIndex:1,bindingIndex:1}},Light2:{binding:{groupIndex:1,bindingIndex:2}},Light3:{binding:{groupIndex:1,bindingIndex:3}},Light4:{binding:{groupIndex:1,bindingIndex:4}},Light5:{binding:{groupIndex:1,bindingIndex:5}},Light6:{binding:{groupIndex:1,bindingIndex:6}},Light7:{binding:{groupIndex:1,bindingIndex:7}},Light8:{binding:{groupIndex:1,bindingIndex:8}},Light9:{binding:{groupIndex:1,bindingIndex:9}},Light10:{binding:{groupIndex:1,bindingIndex:10}},Light11:{binding:{groupIndex:1,bindingIndex:11}},Light12:{binding:{groupIndex:1,bindingIndex:12}},Light13:{binding:{groupIndex:1,bindingIndex:13}},Light14:{binding:{groupIndex:1,bindingIndex:14}},Light15:{binding:{groupIndex:1,bindingIndex:15}},Light16:{binding:{groupIndex:1,bindingIndex:16}},Light17:{binding:{groupIndex:1,bindingIndex:17}},Light18:{binding:{groupIndex:1,bindingIndex:18}},Light19:{binding:{groupIndex:1,bindingIndex:19}},Light20:{binding:{groupIndex:1,bindingIndex:20}},Light21:{binding:{groupIndex:1,bindingIndex:21}},Light22:{binding:{groupIndex:1,bindingIndex:22}},Light23:{binding:{groupIndex:1,bindingIndex:23}},Light24:{binding:{groupIndex:1,bindingIndex:24}},Light25:{binding:{groupIndex:1,bindingIndex:25}},Light26:{binding:{groupIndex:1,bindingIndex:26}},Light27:{binding:{groupIndex:1,bindingIndex:27}},Light28:{binding:{groupIndex:1,bindingIndex:28}},Light29:{binding:{groupIndex:1,bindingIndex:29}},Light30:{binding:{groupIndex:1,bindingIndex:30}},Light31:{binding:{groupIndex:1,bindingIndex:31}},Material:{binding:{groupIndex:2,bindingIndex:0}},Mesh:{binding:{groupIndex:2,bindingIndex:1}},Internals:{binding:{groupIndex:2,bindingIndex:2}}},e}(),Up=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._missingVaryings=[],t._textureArrayProcessing=[],t._vertexIsGLES3=!1,t._fragmentIsGLES3=!1,t.shaderLanguage=at.GLSL,t.parseGLES3=!0,t}return H(t,e),t.prototype._getArraySize=function(e,t,n){var i=0,r=e.indexOf("["),o=e.indexOf("]");if(r>0&&o>0){var a=e.substring(r+1,o);i=+a,isNaN(i)&&(i=+n[a.trim()]),e=e.substr(0,r)}return[e,t,i]},t.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._missingVaryings.length=0,this._textureArrayProcessing.length=0,this.attributeKeywordName=void 0,this.varyingVertexKeywordName=void 0,this.varyingFragmentKeywordName=void 0},t.prototype.preProcessShaderCode=function(e,t){var n="// Internals UBO\nuniform ".concat(Np.InternalsUBOName," {\nfloat yFactor_;\nfloat textureOutputHeight_;\n};\n"),i=-1!==e.indexOf("// Internals UBO");return t?(this._fragmentIsGLES3=-1!==e.indexOf("#version 3"),this._fragmentIsGLES3&&(this.varyingFragmentKeywordName="in"),i?e:n+"##INJECTCODE##\n"+e):(this._vertexIsGLES3=-1!==e.indexOf("#version 3"),this._vertexIsGLES3&&(this.attributeKeywordName="in",this.varyingVertexKeywordName="out"),i?e:n+e)},t.prototype.varyingCheck=function(e,t){return(t&&this._fragmentIsGLES3?/(flat\s)?\s*\bin\b/:!t&&this._vertexIsGLES3?/(flat\s)?\s*\bout\b/:/(flat\s)?\s*\bvarying\b/).test(e)},t.prototype.varyingProcessor=function(e,t,n){var i;this._preProcessors=n;var r=(t&&this._fragmentIsGLES3?/\s*(flat)?\s*in\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm:!t&&this._vertexIsGLES3?/\s*(flat)?\s*out\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm:/\s*(flat)?\s*varying\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm).exec(e);if(null!==r){var o,a=null!==(i=r[1])&&void 0!==i?i:"",s=r[2],c=r[3];t?(o=this._webgpuProcessingContext.availableVaryings[c],this._missingVaryings[o]="",void 0===o&&J.Warn('Invalid fragment shader: The varying named "'.concat(c,'" is not declared in the vertex shader! This declaration will be ignored.'))):(o=this._webgpuProcessingContext.getVaryingNextLocation(s,this._getArraySize(c,s,n)[2]),this._webgpuProcessingContext.availableVaryings[c]=o,this._missingVaryings[o]="layout(location = ".concat(o,") ").concat(a," in ").concat(s," ").concat(c,";")),e=e.replace(r[0],void 0===o?"":"layout(location = ".concat(o,") ").concat(a," ").concat(t?"in":"out"," ").concat(s," ").concat(c,";"))}return e},t.prototype.attributeProcessor=function(e,t){this._preProcessors=t;var n=(this._vertexIsGLES3?/\s*in\s+(\S+)\s+(\S+)\s*;/gm:/\s*attribute\s+(\S+)\s+(\S+)\s*;/gm).exec(e);if(null!==n){var i=n[1],r=n[2],o=this._webgpuProcessingContext.getAttributeNextLocation(i,this._getArraySize(r,i,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r;var a=this.vertexBufferKindToNumberOfComponents[r];if(void 0!==a){var s=a<0?-1===a?"int":"ivec"+-a:1===a?"uint":"uvec"+a,c="_int_".concat(r,"_");e=e.replace(n[0],"layout(location = ".concat(o,") in ").concat(s," ").concat(c,"; ").concat(i," ").concat(r," = ").concat(i,"(").concat(c,");"))}else e=e.replace(n[0],"layout(location = ".concat(o,") in ").concat(i," ").concat(r,";"))}return e},t.prototype.uniformProcessor=function(e,t,n){var i,r;this._preProcessors=n;var o=/\s*uniform\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!==o){var a=o[1],s=o[2];if(0===a.indexOf("sampler")||1===a.indexOf("sampler")){var c=0;s=(i=this._getArraySize(s,a,n))[0],a=i[1],c=i[2];var l=this._webgpuProcessingContext.availableTextures[s];if(!l){l={autoBindSampler:!0,isTextureArray:c>0,isStorageTexture:!1,textures:[],sampleType:up.Float};for(var u=0;u<(c||1);++u)l.textures.push(this._webgpuProcessingContext.getNextFreeUBOBinding())}var h=null!==(r=Np._SamplerTypeByWebGLSamplerType[a])&&void 0!==r?r:"sampler",d=!!Np._IsComparisonSamplerByWebGPUSamplerType[h],p=d?lp.Comparison:lp.Filtering,f=s+Np.AutoSamplerSuffix,m=this._webgpuProcessingContext.availableSamplers[f];m||(m={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:p});var _="u"===a.charAt(0)?"u":"i"===a.charAt(0)?"i":"";_&&(a=a.substr(1));var g=d?up.Depth:"u"===_?up.Uint:"i"===_?up.Sint:up.Float;l.sampleType=g;var y=c>0,v=m.binding.groupIndex,b=m.binding.bindingIndex,T=Np._SamplerFunctionByWebGLSamplerType[a],E=Np._TextureTypeByWebGLSamplerType[a],A=Np._GpuTextureViewDimensionByWebGPUTextureType[E];if(y){var x=[];for(x.push("layout(set = ".concat(v,", binding = ").concat(b,") uniform ").concat(_).concat(h," ").concat(f,";")),e="\n",u=0;u0?"\n":"","#define ").concat(s).concat(u," ").concat(_).concat(T,"(").concat(s,"Texture").concat(u,", ").concat(f,")")}e=x.join("\n")+e,this._textureArrayProcessing.push(s)}else c=1,e="layout(set = ".concat(v,", binding = ").concat(b,") uniform ").concat(h," ").concat(f,";\n layout(set = ").concat(l.textures[0].groupIndex,", binding = ").concat(l.textures[0].bindingIndex,") uniform ").concat(_).concat(E," ").concat(s,"Texture;\n #define ").concat(s," ").concat(_).concat(T,"(").concat(s,"Texture, ").concat(f,")");for(this._webgpuProcessingContext.availableTextures[s]=l,this._webgpuProcessingContext.availableSamplers[f]=m,this._addSamplerBindingDescription(f,m,!t),u=0;u=0,s=a?"vec4 glFragCoord_;\n":"",c=-1!==e.search(/layout *\(location *= *0\) *out/g);if(e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/gl_FragCoord/g,"glFragCoord_"),this._fragmentIsGLES3){var l=/^\s*out\s+\S+\s+\S+\s*;/gm.exec(e);null!==l&&(e=e.substring(0,l.index)+"layout(location = 0) "+e.substring(l.index))}else e=e.replace(/void\s+?main\s*\(/g,(o||c?"":"layout(location = 0) out vec4 glFragColor;\n")+"void main(");e=(e=e.replace(/dFdy/g,"(-yFactor_)*dFdy")).replace("##INJECTCODE##",s),a&&(e=this._injectStartingAndEndingCode(e,"void main","\n glFragCoord_ = gl_FragCoord;\n if (yFactor_ == 1.) {\n glFragCoord_.y = textureOutputHeight_ - glFragCoord_.y;\n }\n "))}else if(e=(e=e.replace(/gl_InstanceID/g,"gl_InstanceIndex")).replace(/gl_VertexID/g,"gl_VertexIndex"),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e;if(!n){var u=e.lastIndexOf("}");e=e.substring(0,u),e+="gl_Position.y *= yFactor_;\n",r.isNDCHalfZRange||(e+="gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0;\n"),e+="}"}return e},t.prototype._applyTextureArrayProcessing=function(e,t){for(var n=new RegExp(t+"\\s*\\[(.+)?\\]","gm"),i=n.exec(e);null!==i;){var r=i[1],o=+r;this._preProcessors&&isNaN(o)&&(o=+this._preProcessors[r.trim()]),e=e.replace(i[0],t+o),i=n.exec(e)}return e},t.prototype._generateLeftOverUBOCode=function(e,t){for(var n="layout(set = ".concat(t.binding.groupIndex,", binding = ").concat(t.binding.bindingIndex,") uniform ").concat(e," {\n "),i=0,r=this._webgpuProcessingContext.leftOverUniforms;i0?n+=" ".concat(o.type," ").concat(o.name,"[").concat(o.length,"];\n"):n+=" ".concat(o.type," ").concat(o.name,";\n")}return n+"};\n\n"},t.prototype.finalizeShaders=function(e,t){for(var n=0;n0&&(t=r+"\n"+t)}var o=this._buildLeftOverUBO();return e=o+e,t=o+t,this._collectBindingNames(),this._preCreateBindGroupEntries(),this._preProcessors=null,this.vertexBufferKindToNumberOfComponents={},{vertexCode:e,fragmentCode:t}},t}(Np);Vt.IncludesShadersStoreWGSL.bonesDeclaration="#if NUM_BONE_INFLUENCERS>0\nattribute matricesIndices : vec4;attribute matricesWeights : vec4;\n#if NUM_BONE_INFLUENCERS>4\nattribute matricesIndicesExtra : vec4;attribute matricesWeightsExtra : vec4;\n#endif\n#ifndef BAKED_VERTEX_ANIMATION_TEXTURE\n#ifdef BONETEXTURE\nvar boneSampler : texture_2d;uniform boneTextureWidth : f32;\n#else\nuniform mBones : array;\n#ifdef BONES_VELOCITY_ENABLED\nuniform mPreviousBones : array;\n#endif\n#endif\n#ifdef BONETEXTURE\nfn readMatrixFromRawSampler(smp : texture_2d,index : f32)->mat4x4\n{let offset=i32(index) *4; \nlet m0=textureLoad(smp,vec2(offset+0,0),0);let m1=textureLoad(smp,vec2(offset+1,0),0);let m2=textureLoad(smp,vec2(offset+2,0),0);let m3=textureLoad(smp,vec2(offset+3,0),0);return mat4x4(m0,m1,m2,m3);}\n#endif\n#endif\n#endif\n",Vt.IncludesShadersStoreWGSL.bonesVertex="#ifndef BAKED_VERTEX_ANIMATION_TEXTURE\n#if NUM_BONE_INFLUENCERS>0\nvar influence : mat4x4;\n#ifdef BONETEXTURE\ninfluence=readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[0])*vertexInputs.matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\ninfluence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[1])*vertexInputs.matricesWeights[1];\n#endif \n#if NUM_BONE_INFLUENCERS>2\ninfluence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[2])*vertexInputs.matricesWeights[2];\n#endif \n#if NUM_BONE_INFLUENCERS>3\ninfluence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[3])*vertexInputs.matricesWeights[3];\n#endif \n#if NUM_BONE_INFLUENCERS>4\ninfluence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[0])*vertexInputs.matricesWeightsExtra[0];\n#endif \n#if NUM_BONE_INFLUENCERS>5\ninfluence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[1])*vertexInputs.matricesWeightsExtra[1];\n#endif \n#if NUM_BONE_INFLUENCERS>6\ninfluence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[2])*vertexInputs.matricesWeightsExtra[2];\n#endif \n#if NUM_BONE_INFLUENCERS>7\ninfluence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[3])*vertexInputs.matricesWeightsExtra[3];\n#endif \n#else \ninfluence=uniforms.mBones[int(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\ninfluence=influence+uniforms.mBones[int(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];\n#endif \n#if NUM_BONE_INFLUENCERS>2\ninfluence=influence+uniforms.mBones[int(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];\n#endif \n#if NUM_BONE_INFLUENCERS>3\ninfluence=influence+uniforms.mBones[int(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];\n#endif \n#if NUM_BONE_INFLUENCERS>4\ninfluence=influence+uniforms.mBones[int(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];\n#endif \n#if NUM_BONE_INFLUENCERS>5\ninfluence=influence+uniforms.mBones[int(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];\n#endif \n#if NUM_BONE_INFLUENCERS>6\ninfluence=influence+uniforms.mBones[int(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];\n#endif \n#if NUM_BONE_INFLUENCERS>7\ninfluence=influence+uniforms.mBones[int(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];\n#endif \n#endif\nfinalWorld=finalWorld*influence;\n#endif\n#endif\n",Vt.IncludesShadersStoreWGSL.bakedVertexAnimationDeclaration="#ifdef BAKED_VERTEX_ANIMATION_TEXTURE\nuniform bakedVertexAnimationTime: f32;uniform bakedVertexAnimationTextureSizeInverted: vec2;uniform bakedVertexAnimationSettings: vec4;var bakedVertexAnimationTexture : texture_2d;\n#ifdef INSTANCES\nattribute bakedVertexAnimationSettingsInstanced : vec4;\n#endif\nfn readMatrixFromRawSamplerVAT(smp : texture_2d,index : f32,frame : f32)->mat4x4\n{let offset=i32(index)*4;let frameUV=i32(frame);let m0=textureLoad(smp,vec2(offset+0,frameUV),0);let m1=textureLoad(smp,vec2(offset+1,frameUV),0);let m2=textureLoad(smp,vec2(offset+2,frameUV),0);let m3=textureLoad(smp,vec2(offset+3,frameUV),0);return mat4x4(m0,m1,m2,m3);}\n#endif\n",Vt.IncludesShadersStoreWGSL.bakedVertexAnimation="#ifdef BAKED_VERTEX_ANIMATION_TEXTURE\n{\n#ifdef INSTANCES\nlet VATStartFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.x;let VATEndFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.y;let VATOffsetFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.z;let VATSpeed: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.w;\n#else\nlet VATStartFrame: f32=uniforms.bakedVertexAnimationSettings.x;let VATEndFrame: f32=uniforms.bakedVertexAnimationSettings.y;let VATOffsetFrame: f32=uniforms.bakedVertexAnimationSettings.z;let VATSpeed: f32=uniforms.bakedVertexAnimationSettings.w;\n#endif\nlet totalFrames: f32=VATEndFrame-VATStartFrame+1.0;let time: f32=uniforms.bakedVertexAnimationTime*VATSpeed/totalFrames;let frameCorrection: f32=select(1.0,0.0,time<1.0);let numOfFrames: f32=totalFrames-frameCorrection;var VATFrameNum: f32=fract(time)*numOfFrames;VATFrameNum=(VATFrameNum+VATOffsetFrame) % numOfFrames;VATFrameNum=floor(VATFrameNum);VATFrameNum=VATFrameNum+VATStartFrame+frameCorrection;var VATInfluence : mat4x4;VATInfluence=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[0],VATFrameNum)*vertexInputs.matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\nVATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[1],VATFrameNum)*vertexInputs.matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\nVATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[2],VATFrameNum)*vertexInputs.matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\nVATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[3],VATFrameNum)*vertexInputs.matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\nVATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[0],VATFrameNum)*vertexInputs.matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\nVATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[1],VATFrameNum)*vertexInputs.matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\nVATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[2],VATFrameNum)*vertexInputs.matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\nVATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[3],VATFrameNum)*vertexInputs.matricesWeightsExtra[3];\n#endif\nfinalWorld=finalWorld*VATInfluence;}\n#endif\n",Vt.IncludesShadersStoreWGSL.clipPlaneFragment="#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)\nif (false) {}\n#endif\n#ifdef CLIPPLANE\nelse if (fragmentInputs.fClipDistance>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE2\nelse if (fragmentInputs.fClipDistance2>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE3\nelse if (fragmentInputs.fClipDistance3>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE4\nelse if (fragmentInputs.fClipDistance4>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE5\nelse if (fragmentInputs.fClipDistance5>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE6\nelse if (fragmentInputs.fClipDistance6>0.0)\n{discard;}\n#endif\n",Vt.IncludesShadersStoreWGSL.clipPlaneFragmentDeclaration="#ifdef CLIPPLANE\nvarying fClipDistance: f32;\n#endif\n#ifdef CLIPPLANE2\nvarying fClipDistance2: f32;\n#endif\n#ifdef CLIPPLANE3\nvarying fClipDistance3: f32;\n#endif\n#ifdef CLIPPLANE4\nvarying fClipDistance4: f32;\n#endif\n#ifdef CLIPPLANE5\nvarying fClipDistance5: f32;\n#endif\n#ifdef CLIPPLANE6\nvarying fClipDistance6: f32;\n#endif\n",Vt.IncludesShadersStoreWGSL.clipPlaneVertex="#ifdef CLIPPLANE\nvertexOutputs.fClipDistance=dot(worldPos,uniforms.vClipPlane);\n#endif\n#ifdef CLIPPLANE2\nvertexOutputs.fClipDistance2=dot(worldPos,uniforms.vClipPlane2);\n#endif\n#ifdef CLIPPLANE3\nvertexOutputs.fClipDistance3=dot(worldPos,uniforms.vClipPlane3);\n#endif\n#ifdef CLIPPLANE4\nvertexOutputs.fClipDistance4=dot(worldPos,uniforms.vClipPlane4);\n#endif\n#ifdef CLIPPLANE5\nvertexOutputs.fClipDistance5=dot(worldPos,uniforms.vClipPlane5);\n#endif\n#ifdef CLIPPLANE6\nvertexOutputs.fClipDistance6=dot(worldPos,uniforms.vClipPlane6);\n#endif\n",Vt.IncludesShadersStoreWGSL.clipPlaneVertexDeclaration="#ifdef CLIPPLANE\nuniform vClipPlane: vec4;varying fClipDistance: f32;\n#endif\n#ifdef CLIPPLANE2\nuniform vClipPlane2: vec4;varying fClipDistance2: f32;\n#endif\n#ifdef CLIPPLANE3\nuniform vClipPlane3: vec4;varying fClipDistance3: f32;\n#endif\n#ifdef CLIPPLANE4\nuniform vClipPlane4: vec4;varying fClipDistance4: f32;\n#endif\n#ifdef CLIPPLANE5\nuniform vClipPlane5: vec4;varying fClipDistance5: f32;\n#endif\n#ifdef CLIPPLANE6\nuniform vClipPlane6: vec4;varying fClipDistance6: f32;\n#endif\n",Vt.IncludesShadersStoreWGSL.instancesDeclaration="#ifdef INSTANCES\nattribute world0 : vec4;attribute world1 : vec4;attribute world2 : vec4;attribute world3 : vec4;\n#ifdef INSTANCESCOLOR\nattribute instanceColor : vec4;\n#endif\n#if defined(THIN_INSTANCES) && !defined(WORLD_UBO)\nuniform world : mat4x4;\n#endif\n#if defined(VELOCITY) || defined(PREPASS_VELOCITY)\nattribute previousWorld0 : vec4;attribute previousWorld1 : vec4;attribute previousWorld2 : vec4;attribute previousWorld3 : vec4;\n#ifdef THIN_INSTANCES\nuniform previousWorld : mat4x4;\n#endif\n#endif\n#else\n#if !defined(WORLD_UBO)\nuniform world : mat4x4;\n#endif\n#if defined(VELOCITY) || defined(PREPASS_VELOCITY)\nuniform previousWorld : mat4x4;\n#endif\n#endif\n",Vt.IncludesShadersStoreWGSL.instancesVertex="#ifdef INSTANCES\nvar finalWorld=mat4x4(vertexInputs.world0,vertexInputs.world1,vertexInputs.world2,vertexInputs.world3);\n#if defined(PREPASS_VELOCITY) || defined(VELOCITY)\nvar finalPreviousWorld=mat4x4(previousWorld0,previousWorld1,previousWorld2,previousWorld3);\n#endif\n#ifdef THIN_INSTANCES\n#if !defined(WORLD_UBO)\nfinalWorld=uniforms.world*finalWorld;\n#else\nfinalWorld=mesh.world*finalWorld;\n#endif\n#if defined(PREPASS_VELOCITY) || defined(VELOCITY)\nfinalPreviousWorld=previousWorld*finalPreviousWorld;\n#endif\n#endif\n#else\n#if !defined(WORLD_UBO)\nvar finalWorld=uniforms.world;\n#else\nvar finalWorld=mesh.world;\n#endif\n#if defined(PREPASS_VELOCITY) || defined(VELOCITY)\nvar finalPreviousWorld=previousWorld;\n#endif\n#endif\n",Vt.IncludesShadersStoreWGSL.meshUboDeclaration="struct Mesh {world : mat4x4,\nvisibility : f32,};var mesh : Mesh;\n#define WORLD_UBO\n",Vt.IncludesShadersStoreWGSL.morphTargetsVertex="#ifdef MORPHTARGETS\n#ifdef MORPHTARGETS_TEXTURE \nvertexID=f32(vertexInputs.vertexIndex)*uniforms.morphTargetTextureInfo.x;positionUpdated=positionUpdated+(readVector3FromRawSampler({X},vertexID)-vertexInputs.position)*uniforms.morphTargetInfluences[{X}];vertexID=vertexID+1.0;\n#ifdef MORPHTARGETS_NORMAL\nnormalUpdated=normalUpdated+(readVector3FromRawSampler({X},vertexID) -vertexInputs.normal)*uniforms.morphTargetInfluences[{X}];vertexID=vertexID+1.0;\n#endif\n#ifdef MORPHTARGETS_UV\nuvUpdated=uvUpdated+(readVector3FromRawSampler({X},vertexID).xy-vertexInputs.uv)*uniforms.morphTargetInfluences[{X}];vertexID=vertexID+1.0;\n#endif\n#ifdef MORPHTARGETS_TANGENT\ntangentUpdated.xyz=tangentUpdated.xyz+(readVector3FromRawSampler({X},vertexID) -vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[{X}];\n#endif\n#else\npositionUpdated=positionUpdated+(position{X}-vertexInputs.position)*uniforms.morphTargetInfluences[{X}];\n#ifdef MORPHTARGETS_NORMAL\nnormalUpdated+=(normal{X}-vertexInputs.normal)*uniforms.morphTargetInfluences[{X}];\n#endif\n#ifdef MORPHTARGETS_TANGENT\ntangentUpdated.xyz=tangentUpdated.xyz+(tangent{X}-vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[{X}];\n#endif\n#ifdef MORPHTARGETS_UV\nuvUpdated=uvUpdated+(uv_{X}-vertexInputs.uv)*uniforms.morphTargetInfluences[{X}];\n#endif\n#endif\n#endif\n",Vt.IncludesShadersStoreWGSL.morphTargetsVertexDeclaration="#ifdef MORPHTARGETS\n#ifndef MORPHTARGETS_TEXTURE\nattribute position{X} : vec3;\n#ifdef MORPHTARGETS_NORMAL\nattribute normal{X} : vec3;\n#endif\n#ifdef MORPHTARGETS_TANGENT\nattribute tangent{X} : vec3;\n#endif\n#ifdef MORPHTARGETS_UV\nattribute uv_{X} : vec2;\n#endif\n#endif\n#endif\n",Vt.IncludesShadersStoreWGSL.morphTargetsVertexGlobal="#ifdef MORPHTARGETS\n#ifdef MORPHTARGETS_TEXTURE\nvar vertexID : f32;\n#endif\n#endif\n",Vt.IncludesShadersStoreWGSL.morphTargetsVertexGlobalDeclaration="#ifdef MORPHTARGETS\nuniform morphTargetInfluences : array;\n#ifdef MORPHTARGETS_TEXTURE \nuniform morphTargetTextureIndices : array;uniform morphTargetTextureInfo : vec3;var morphTargets : texture_2d_array;var morphTargetsSampler : sampler;fn readVector3FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec3\n{ \nlet y=floor(vertexIndex/uniforms.morphTargetTextureInfo.y);let x=vertexIndex-y*uniforms.morphTargetTextureInfo.y;let textureUV=vec2((x+0.5)/uniforms.morphTargetTextureInfo.y,(y+0.5)/uniforms.morphTargetTextureInfo.z);return textureSampleLevel(morphTargets,morphTargetsSampler,textureUV,i32(uniforms.morphTargetTextureIndices[targetIndex]),0.0).xyz;}\n#endif\n#endif\n",Vt.IncludesShadersStoreWGSL.sceneUboDeclaration="struct Scene {viewProjection : mat4x4,\n#ifdef MULTIVIEW\nviewProjectionR : mat4x4,\n#endif \nview : mat4x4,\nprojection : mat4x4,\nvEyePosition : vec4,};var scene : Scene;\n";var kp,Vp,zp={texture_1d:ep.E1d,texture_2d:ep.E2d,texture_2d_array:ep.E2dArray,texture_3d:ep.E3d,texture_cube:ep.Cube,texture_cube_array:ep.CubeArray,texture_multisampled_2d:ep.E2d,texture_depth_2d:ep.E2d,texture_depth_2d_array:ep.E2dArray,texture_depth_cube:ep.Cube,texture_depth_cube_array:ep.CubeArray,texture_depth_multisampled_2d:ep.E2d,texture_storage_1d:ep.E1d,texture_storage_2d:ep.E2d,texture_storage_2d_array:ep.E2dArray,texture_storage_3d:ep.E3d,texture_external:null},Gp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.shaderLanguage=at.WGSL,t.uniformRegexp=/uniform\s+(\w+)\s*:\s*(.+)\s*;/,t.textureRegexp=/var\s+(\w+)\s*:\s*((array<\s*)?(texture_\w+)\s*(<\s*(.+)\s*>)?\s*(,\s*\w+\s*>\s*)?);/,t.noPrecision=!0,t}return H(t,e),t.prototype._getArraySize=function(e,t,n){var i=0,r=t.lastIndexOf(">");if(t.indexOf("array")>=0&&r>0){for(var o=r;o>0&&" "!==t.charAt(o)&&","!==t.charAt(o);)o--;var a=t.substring(o+1,r);for(i=+a,isNaN(i)&&(i=+n[a.trim()]);o>0&&(" "===t.charAt(o)||","===t.charAt(o));)o--;t=t.substring(t.indexOf("<")+1,o+1)}return[e,t,i]},t.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._attributesInputWGSL=[],this._attributesWGSL=[],this._attributesConversionCodeWGSL=[],this._hasNonFloatAttribute=!1,this._varyingsWGSL=[],this._varyingNamesWGSL=[],this._stridedUniformArrays=[]},t.prototype.preProcessShaderCode=function(e){return"struct ".concat(Np.InternalsUBOName," {\n yFactor_: f32,\n textureOutputHeight_: f32,\n};\nvar ").concat("internals"," : ").concat(Np.InternalsUBOName,";\n")+Od(e)},t.prototype.varyingProcessor=function(e,t,n){var i=/\s*varying\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==i){var r,o=i[2],a=i[1];t?void 0===(r=this._webgpuProcessingContext.availableVaryings[a])&&J.Warn('Invalid fragment shader: The varying named "'.concat(a,'" is not declared in the vertex shader! This declaration will be ignored.')):(r=this._webgpuProcessingContext.getVaryingNextLocation(o,this._getArraySize(a,o,n)[2]),this._webgpuProcessingContext.availableVaryings[a]=r,this._varyingsWGSL.push(" @location(".concat(r,") ").concat(a," : ").concat(o,",")),this._varyingNamesWGSL.push(a)),e=""}return e},t.prototype.attributeProcessor=function(e,t){var n=/\s*attribute\s+(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==n){var i=n[2],r=n[1],o=this._webgpuProcessingContext.getAttributeNextLocation(i,this._getArraySize(r,i,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r;var a=this.vertexBufferKindToNumberOfComponents[r];if(void 0!==a){var s=a<0?-1===a?"i32":"vec"+-a+"":1===a?"u32":"vec"+a+"",c="_int_".concat(r,"_");this._attributesInputWGSL.push("@location(".concat(o,") ").concat(c," : ").concat(s,",")),this._attributesWGSL.push("".concat(r," : ").concat(i,",")),this._attributesConversionCodeWGSL.push("vertexInputs.".concat(r," = ").concat(i,"(vertexInputs_.").concat(c,");")),this._hasNonFloatAttribute=!0}else this._attributesInputWGSL.push("@location(".concat(o,") ").concat(r," : ").concat(i,",")),this._attributesWGSL.push("".concat(r," : ").concat(i,",")),this._attributesConversionCodeWGSL.push("vertexInputs.".concat(r," = vertexInputs_.").concat(r,";"));e=""}return e},t.prototype.uniformProcessor=function(e,t,n){var i=this.uniformRegexp.exec(e);if(null!==i){var r=i[2],o=i[1];this._addUniformToLeftOverUBO(o,r,n),e=""}return e},t.prototype.textureProcessor=function(e,t,n){var i=this.textureRegexp.exec(e);if(null!==i){var r=i[1],o=i[2],a=!!i[3],s=i[4],c=s.indexOf("storage")>0,l=i[6],u=c?l.substring(0,l.indexOf(",")).trim():null,h=a?this._getArraySize(r,o,n)[2]:0,d=this._webgpuProcessingContext.availableTextures[r];if(d)h=d.textures.length;else{d={isTextureArray:h>0,isStorageTexture:c,textures:[],sampleType:up.Float},h=h||1;for(var p=0;p0,m=zp[s],_=f?up.Depth:"u32"===l?up.Uint:"i32"===l?up.Sint:up.Float;if(d.sampleType=_,void 0===m)throw"Can't get the texture dimension corresponding to the texture function \"".concat(s,'"!');for(p=0;p=0?"\n if (internals.yFactor_ == 1.) {\n fragmentInputs.position.y = internals.textureOutputHeight_ - fragmentInputs.position.y;\n }\n ":"";e=this._processSamplers(e,!0),t=this._processSamplers(t,!1),e=this._processCustomBuffers(e,!0),t=this._processCustomBuffers(t,!1);var i=this._buildLeftOverUBO();t=i+t,e=(e=i+e).replace(/#define /g,"//#define "),e=this._processStridedUniformArrays(e);var r="struct VertexInputs {\n @builtin(vertex_index) vertexIndex : u32,\n @builtin(instance_index) instanceIndex : u32,\n";this._attributesInputWGSL.length>0&&(r+=this._attributesInputWGSL.join("\n")),r+="\n};\nvar vertexInputs"+(this._hasNonFloatAttribute?"_":"")+" : VertexInputs;\n",this._hasNonFloatAttribute&&(r+="struct VertexInputs_ {\n vertexIndex : u32, instanceIndex : u32,\n",r+=this._attributesWGSL.join("\n"),r+="\n};\nvar vertexInputs : VertexInputs_;\n");var o="struct FragmentInputs {\n @builtin(position) position : vec4,\n";this._varyingsWGSL.length>0&&(o+=this._varyingsWGSL.join("\n")),e=r+(o+="\n};\nvar vertexOutputs : FragmentInputs;\n")+e;var a="\n vertexInputs".concat(this._hasNonFloatAttribute?"_":""," = input;\n");this._hasNonFloatAttribute&&(a+="vertexInputs.vertexIndex = vertexInputs_.vertexIndex;\nvertexInputs.instanceIndex = vertexInputs_.instanceIndex;\n",a+=this._attributesConversionCodeWGSL.join("\n"),a+="\n"),e=this._injectStartingAndEndingCode(e,"fn main",a," vertexOutputs.position.y = vertexOutputs.position.y * internals.yFactor_;\n return vertexOutputs;"),t=t.replace(/#define /g,"//#define "),t=(t=this._processStridedUniformArrays(t)).replace(/dpdy/g,"(-internals.yFactor_)*dpdy");var s="struct FragmentInputs {\n @builtin(position) position : vec4,\n @builtin(front_facing) frontFacing : bool,\n";this._varyingsWGSL.length>0&&(s+=this._varyingsWGSL.join("\n")),s+="\n};\nvar fragmentInputs : FragmentInputs;\n";for(var c="struct FragmentOutputs {\n @location(0) color : vec4,\n",l=!1,u=0;!(l||(u=t.indexOf("fragmentOutputs.fragDepth",u))<0);){var h=u;for(l=!0;u>1&&"\n"!==t.charAt(u);){if("/"===t.charAt(u)&&"/"===t.charAt(u-1)){l=!1;break}u--}u=h+25}l&&(c+=" @builtin(frag_depth) fragDepth: f32,\n"),t=s+(c+="};\nvar fragmentOutputs : FragmentOutputs;\n")+t;var d=" fragmentInputs = input;\n "+n;return t=this._injectStartingAndEndingCode(t,"fn main",d," return fragmentOutputs;"),this._collectBindingNames(),this._preCreateBindGroupEntries(),this.vertexBufferKindToNumberOfComponents={},{vertexCode:e,fragmentCode:t}},t.prototype._generateLeftOverUBOCode=function(e,t){for(var n="",i="struct ".concat(e," {\n"),r=0,o=this._webgpuProcessingContext.leftOverUniforms;r)?$/,"$1"),c=Np.UniformSizes[s];if(a.length>0)if(c<=2){var l="".concat(e,"_").concat(this._stridedUniformArrays.length,"_strided_arr");n+="struct ".concat(l," {\n @size(16)\n el: ").concat(s,",\n }"),this._stridedUniformArrays.push(a.name),i+=" @align(16) ".concat(a.name," : array<").concat(l,", ").concat(a.length,">,\n")}else i+=" ".concat(a.name," : array<").concat(a.type,", ").concat(a.length,">,\n");else i+=" ".concat(a.name," : ").concat(a.type,",\n")}return i+="};\n",(i="".concat(n,"\n").concat(i))+"@group(".concat(t.binding.groupIndex,") @binding(").concat(t.binding.bindingIndex,") var ").concat("uniforms"," : ").concat(e,";\n")},t.prototype._processSamplers=function(e,t){for(var n=/var\s+(\w+Sampler)\s*:\s*(sampler|sampler_comparison)\s*;/gm;;){var i=n.exec(e);if(null===i)break;var r=i[1],o=i[2],a=r.indexOf(Np.AutoSamplerSuffix)===r.length-Np.AutoSamplerSuffix.length?r.substring(0,r.indexOf(Np.AutoSamplerSuffix)):null,s="sampler_comparison"===o?lp.Comparison:lp.Filtering;if(a){var c=this._webgpuProcessingContext.availableTextures[a];c&&(c.autoBindSampler=!0)}var l=this._webgpuProcessingContext.availableSamplers[r];l||(l={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:s},this._webgpuProcessingContext.availableSamplers[r]=l),this._addSamplerBindingDescription(r,l,t);var u=e.substring(0,i.index),h="@group(".concat(l.binding.groupIndex,") @binding(").concat(l.binding.bindingIndex,") "),d=e.substring(i.index);e=u+h+d,n.lastIndex+=h.length}return e},t.prototype._processCustomBuffers=function(e,t){for(var n=/var<\s*(uniform|storage)\s*(,\s*(read|read_write)\s*)?>\s+(\S+)\s*:\s*(\S+)\s*;/gm;;){var i=n.exec(e);if(null===i)break;var r=i[1],o=i[3],a=i[4],s=i[5],c=this._webgpuProcessingContext.availableBuffers[a];if(!c){var l="uniform"===r?Bp.KnownUBOs[s]:null,u=void 0;l?(a=s,-1===(u=l.binding).groupIndex&&(u=this._webgpuProcessingContext.getNextFreeUBOBinding())):u=this._webgpuProcessingContext.getNextFreeUBOBinding(),c={binding:u},this._webgpuProcessingContext.availableBuffers[a]=c}this._addBufferBindingDescription(a,this._webgpuProcessingContext.availableBuffers[a],"read_write"===o?cp.Storage:"storage"===r?cp.ReadOnlyStorage:cp.Uniform,t);var h=c.binding.groupIndex,d=c.binding.bindingIndex,p=e.substring(0,i.index),f="@group(".concat(h,") @binding(").concat(d,") "),m=e.substring(i.index);e=p+f+m,n.lastIndex+=f.length}return e},t.prototype._processStridedUniformArrays=function(e){for(var t=0,n=this._stridedUniformArrays;t= ofstX + width) {\n discard;\n }\n if (gl_FragCoord.y < ofstY || gl_FragCoord.y >= ofstY + height) {\n discard;\n }\n #ifdef INVERTY\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.x, ofstY + height - (gl_FragCoord.y - ofstY)), 0);\n #else\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.xy), 0);\n #endif\n #ifdef PREMULTIPLYALPHA\n color.rgb *= color.a;\n #endif\n outColor = color;\n }\n "}],Kp={"":0,r8unorm:1,r8uint:2,r8sint:3,r16uint:4,r16sint:5,r16float:6,rg8unorm:7,rg8uint:8,rg8sint:9,r32uint:10,r32sint:11,r32float:12,rg16uint:13,rg16sint:14,rg16float:15,rgba8unorm:16,"rgba8unorm-srgb":17,rgba8uint:18,rgba8sint:19,bgra8unorm:20,"bgra8unorm-srgb":21,rgb10a2uint:22,rgb10a2unorm:23,rg32uint:24,rg32sint:25,rg32float:26,rgba16uint:27,rgba16sint:28,rgba16float:29,rgba32uint:30,rgba32sint:31,rgba32float:32,stencil8:33,depth16unorm:34,depth24plus:35,"depth24plus-stencil8":36,depth32float:37,"depth32float-stencil8":38},Qp=function(){function e(e,t,n,i,r){if(this._pipelines={},this._compiledShaders=[],this._videoPipelines={},this._videoCompiledShaders=[],this._deferredReleaseTextures=[],this._device=e,this._glslang=t,this._tintWASM=n,this._bufferManager=i,-1!==r.indexOf(qd.RG11B10UFloatRenderable)){var o=Object.keys(Kp);Kp[np.RG11B10UFloat]=Kp[o[o.length-1]]+1}this._mipmapSampler=e.createSampler({minFilter:rp.Linear}),this._videoSampler=e.createSampler({minFilter:rp.Linear}),this._ubCopyWithOfst=this._bufferManager.createBuffer(16,Qd.Uniform|Qd.CopyDst,"UBCopyWithOffset").underlyingResource,this._getPipeline(np.RGBA8Unorm),this._getVideoPipeline(np.RGBA8Unorm)}return e.ComputeNumMipmapLevels=function(e,t){return h.ILog2(Math.max(e,t))+1},e.prototype._getPipeline=function(e,t,n){void 0===t&&(t=kp.MipMap);var i=t===kp.MipMap?1:t===kp.InvertYPremultiplyAlpha?((n.invertY?1:0)<<1)+((n.premultiplyAlpha?1:0)<<2):t===kp.Clear?8:t===kp.InvertYPremultiplyAlphaWithOfst?((n.invertY?1:0)<<4)+((n.premultiplyAlpha?1:0)<<5):0;this._pipelines[e]||(this._pipelines[e]=[]);var r=this._pipelines[e][i];if(!r){var o="#version 450\n";t!==kp.InvertYPremultiplyAlpha&&t!==kp.InvertYPremultiplyAlphaWithOfst||(n.invertY&&(o+="#define INVERTY\n"),n.premultiplyAlpha&&(o+="#define PREMULTIPLYALPHA\n"));var a=this._compiledShaders[i];if(!a){var s=this._glslang.compileGLSL(o+qp[t].vertex,"vertex"),c=this._glslang.compileGLSL(o+qp[t].fragment,"fragment");this._tintWASM&&(s=this._tintWASM.convertSpirV2WGSL(s),c=this._tintWASM.convertSpirV2WGSL(c));var l=this._device.createShaderModule({code:s}),u=this._device.createShaderModule({code:c});a=this._compiledShaders[i]=[l,u]}var h=this._device.createRenderPipeline({layout:fp.Auto,vertex:{module:a[0],entryPoint:"main"},fragment:{module:a[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:mp.TriangleStrip,stripIndexFormat:Ep.Uint16}});r=this._pipelines[e][i]=[h,h.getBindGroupLayout(0)]}return r},e.prototype._getVideoPipeline=function(e,t){void 0===t&&(t=Vp.DontInvertY);var n=t===Vp.InvertY?1:0;this._videoPipelines[e]||(this._videoPipelines[e]=[]);var i=this._videoPipelines[e][n];if(!i){var r=this._videoCompiledShaders[n];if(!r){var o=this._device.createShaderModule({code:"\n struct VertexOutput {\n @builtin(position) Position : vec4,\n @location(0) fragUV : vec2\n }\n \n @vertex\n fn main(\n @builtin(vertex_index) VertexIndex : u32\n ) -> VertexOutput {\n var pos = array, 4>(\n vec2(-1.0, 1.0),\n vec2( 1.0, 1.0),\n vec2(-1.0, -1.0),\n vec2( 1.0, -1.0)\n );\n var tex = array, 4>(\n vec2(0.0, 0.0),\n vec2(1.0, 0.0),\n vec2(0.0, 1.0),\n vec2(1.0, 1.0)\n );\n\n var output: VertexOutput;\n\n output.Position = vec4(pos[VertexIndex], 0.0, 1.0);\n output.fragUV = tex[VertexIndex];\n\n return output;\n }\n "}),a=this._device.createShaderModule({code:0===n?"\n @group(0) @binding(0) var videoSampler: sampler;\n @group(0) @binding(1) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2\n ) -> @location(0) vec4 {\n return textureSampleBaseClampToEdge(videoTexture, videoSampler, fragUV);\n }\n ":"\n @group(0) @binding(0) var videoSampler: sampler;\n @group(0) @binding(1) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2\n ) -> @location(0) vec4 {\n return textureSampleBaseClampToEdge(videoTexture, videoSampler, vec2(fragUV.x, 1.0 - fragUV.y));\n }\n "});r=this._videoCompiledShaders[n]=[o,a]}var s=this._device.createRenderPipeline({label:"CopyVideoToTexture_".concat(e,"_").concat(0===n?"DontInvertY":"InvertY"),layout:fp.Auto,vertex:{module:r[0],entryPoint:"main"},fragment:{module:r[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:mp.TriangleStrip,stripIndexFormat:Ep.Uint16}});i=this._videoPipelines[e][n]=[s,s.getBindGroupLayout(0)]}return i},e.GetTextureTypeFromFormat=function(e){switch(e){case np.R8Unorm:case np.R8Snorm:case np.R8Uint:case np.R8Sint:case np.RG8Unorm:case np.RG8Snorm:case np.RG8Uint:case np.RG8Sint:case np.RGBA8Unorm:case np.RGBA8UnormSRGB:case np.RGBA8Snorm:case np.RGBA8Uint:case np.RGBA8Sint:case np.BGRA8Unorm:case np.BGRA8UnormSRGB:case np.RGB10A2UINT:case np.RGB10A2Unorm:case np.RGB9E5UFloat:case np.RG11B10UFloat:case np.BC7RGBAUnorm:case np.BC7RGBAUnormSRGB:case np.BC6HRGBUFloat:case np.BC6HRGBFloat:case np.BC5RGUnorm:case np.BC5RGSnorm:case np.BC3RGBAUnorm:case np.BC3RGBAUnormSRGB:case np.BC2RGBAUnorm:case np.BC2RGBAUnormSRGB:case np.BC4RUnorm:case np.BC4RSnorm:case np.BC1RGBAUnorm:case np.BC1RGBAUnormSRGB:case np.ETC2RGB8Unorm:case np.ETC2RGB8UnormSRGB:case np.ETC2RGB8A1Unorm:case np.ETC2RGB8A1UnormSRGB:case np.ETC2RGBA8Unorm:case np.ETC2RGBA8UnormSRGB:case np.EACR11Unorm:case np.EACR11Snorm:case np.EACRG11Unorm:case np.EACRG11Snorm:case np.ASTC4x4Unorm:case np.ASTC4x4UnormSRGB:case np.ASTC5x4Unorm:case np.ASTC5x4UnormSRGB:case np.ASTC5x5Unorm:case np.ASTC5x5UnormSRGB:case np.ASTC6x5Unorm:case np.ASTC6x5UnormSRGB:case np.ASTC6x6Unorm:case np.ASTC6x6UnormSRGB:case np.ASTC8x5Unorm:case np.ASTC8x5UnormSRGB:case np.ASTC8x6Unorm:case np.ASTC8x6UnormSRGB:case np.ASTC8x8Unorm:case np.ASTC8x8UnormSRGB:case np.ASTC10x5Unorm:case np.ASTC10x5UnormSRGB:case np.ASTC10x6Unorm:case np.ASTC10x6UnormSRGB:case np.ASTC10x8Unorm:case np.ASTC10x8UnormSRGB:case np.ASTC10x10Unorm:case np.ASTC10x10UnormSRGB:case np.ASTC12x10Unorm:case np.ASTC12x10UnormSRGB:case np.ASTC12x12Unorm:case np.ASTC12x12UnormSRGB:case np.Stencil8:return a.TEXTURETYPE_UNSIGNED_BYTE;case np.R16Uint:case np.R16Sint:case np.RG16Uint:case np.RG16Sint:case np.RGBA16Uint:case np.RGBA16Sint:case np.Depth16Unorm:return a.TEXTURETYPE_UNSIGNED_SHORT;case np.R16Float:case np.RG16Float:case np.RGBA16Float:return a.TEXTURETYPE_HALF_FLOAT;case np.R32Uint:case np.R32Sint:case np.RG32Uint:case np.RG32Sint:case np.RGBA32Uint:case np.RGBA32Sint:return a.TEXTURETYPE_UNSIGNED_INTEGER;case np.R32Float:case np.RG32Float:case np.RGBA32Float:case np.Depth32Float:case np.Depth32FloatStencil8:case np.Depth24Plus:case np.Depth24PlusStencil8:return a.TEXTURETYPE_FLOAT}return a.TEXTURETYPE_UNSIGNED_BYTE},e._GetBlockInformationFromFormat=function(e){switch(e){case np.R8Unorm:case np.R8Snorm:case np.R8Uint:case np.R8Sint:return{width:1,height:1,length:1};case np.R16Uint:case np.R16Sint:case np.R16Float:case np.RG8Unorm:case np.RG8Snorm:case np.RG8Uint:case np.RG8Sint:return{width:1,height:1,length:2};case np.R32Uint:case np.R32Sint:case np.R32Float:case np.RG16Uint:case np.RG16Sint:case np.RG16Float:case np.RGBA8Unorm:case np.RGBA8UnormSRGB:case np.RGBA8Snorm:case np.RGBA8Uint:case np.RGBA8Sint:case np.BGRA8Unorm:case np.BGRA8UnormSRGB:case np.RGB9E5UFloat:case np.RGB10A2UINT:case np.RGB10A2Unorm:case np.RG11B10UFloat:return{width:1,height:1,length:4};case np.RG32Uint:case np.RG32Sint:case np.RG32Float:case np.RGBA16Uint:case np.RGBA16Sint:case np.RGBA16Float:return{width:1,height:1,length:8};case np.RGBA32Uint:case np.RGBA32Sint:case np.RGBA32Float:return{width:1,height:1,length:16};case np.Stencil8:throw"No fixed size for Stencil8 format!";case np.Depth16Unorm:return{width:1,height:1,length:2};case np.Depth24Plus:throw"No fixed size for Depth24Plus format!";case np.Depth24PlusStencil8:throw"No fixed size for Depth24PlusStencil8 format!";case np.Depth32Float:return{width:1,height:1,length:4};case np.Depth32FloatStencil8:return{width:1,height:1,length:5};case np.BC7RGBAUnorm:case np.BC7RGBAUnormSRGB:case np.BC6HRGBUFloat:case np.BC6HRGBFloat:case np.BC5RGUnorm:case np.BC5RGSnorm:case np.BC3RGBAUnorm:case np.BC3RGBAUnormSRGB:case np.BC2RGBAUnorm:case np.BC2RGBAUnormSRGB:return{width:4,height:4,length:16};case np.BC4RUnorm:case np.BC4RSnorm:case np.BC1RGBAUnorm:case np.BC1RGBAUnormSRGB:case np.ETC2RGB8Unorm:case np.ETC2RGB8UnormSRGB:case np.ETC2RGB8A1Unorm:case np.ETC2RGB8A1UnormSRGB:case np.EACR11Unorm:case np.EACR11Snorm:return{width:4,height:4,length:8};case np.ETC2RGBA8Unorm:case np.ETC2RGBA8UnormSRGB:case np.EACRG11Unorm:case np.EACRG11Snorm:case np.ASTC4x4Unorm:case np.ASTC4x4UnormSRGB:return{width:4,height:4,length:16};case np.ASTC5x4Unorm:case np.ASTC5x4UnormSRGB:return{width:5,height:4,length:16};case np.ASTC5x5Unorm:case np.ASTC5x5UnormSRGB:return{width:5,height:5,length:16};case np.ASTC6x5Unorm:case np.ASTC6x5UnormSRGB:return{width:6,height:5,length:16};case np.ASTC6x6Unorm:case np.ASTC6x6UnormSRGB:return{width:6,height:6,length:16};case np.ASTC8x5Unorm:case np.ASTC8x5UnormSRGB:return{width:8,height:5,length:16};case np.ASTC8x6Unorm:case np.ASTC8x6UnormSRGB:return{width:8,height:6,length:16};case np.ASTC8x8Unorm:case np.ASTC8x8UnormSRGB:return{width:8,height:8,length:16};case np.ASTC10x5Unorm:case np.ASTC10x5UnormSRGB:return{width:10,height:5,length:16};case np.ASTC10x6Unorm:case np.ASTC10x6UnormSRGB:return{width:10,height:6,length:16};case np.ASTC10x8Unorm:case np.ASTC10x8UnormSRGB:return{width:10,height:8,length:16};case np.ASTC10x10Unorm:case np.ASTC10x10UnormSRGB:return{width:10,height:10,length:16};case np.ASTC12x10Unorm:case np.ASTC12x10UnormSRGB:return{width:12,height:10,length:16};case np.ASTC12x12Unorm:case np.ASTC12x12UnormSRGB:return{width:12,height:12,length:16}}return{width:1,height:1,length:4}},e._IsHardwareTexture=function(e){return!!e.release},e._IsInternalTexture=function(e){return!!e.dispose},e.IsImageBitmap=function(e){return void 0!==e.close},e.IsImageBitmapArray=function(e){return Array.isArray(e)&&void 0!==e[0].close},e.prototype.setCommandEncoder=function(e){this._commandEncoderForCreation=e},e.IsCompressedFormat=function(e){switch(e){case np.BC7RGBAUnormSRGB:case np.BC7RGBAUnorm:case np.BC6HRGBFloat:case np.BC6HRGBUFloat:case np.BC5RGSnorm:case np.BC5RGUnorm:case np.BC4RSnorm:case np.BC4RUnorm:case np.BC3RGBAUnormSRGB:case np.BC3RGBAUnorm:case np.BC2RGBAUnormSRGB:case np.BC2RGBAUnorm:case np.BC1RGBAUnormSRGB:case np.BC1RGBAUnorm:case np.ETC2RGB8Unorm:case np.ETC2RGB8UnormSRGB:case np.ETC2RGB8A1Unorm:case np.ETC2RGB8A1UnormSRGB:case np.ETC2RGBA8Unorm:case np.ETC2RGBA8UnormSRGB:case np.EACR11Unorm:case np.EACR11Snorm:case np.EACRG11Unorm:case np.EACRG11Snorm:case np.ASTC4x4Unorm:case np.ASTC4x4UnormSRGB:case np.ASTC5x4Unorm:case np.ASTC5x4UnormSRGB:case np.ASTC5x5Unorm:case np.ASTC5x5UnormSRGB:case np.ASTC6x5Unorm:case np.ASTC6x5UnormSRGB:case np.ASTC6x6Unorm:case np.ASTC6x6UnormSRGB:case np.ASTC8x5Unorm:case np.ASTC8x5UnormSRGB:case np.ASTC8x6Unorm:case np.ASTC8x6UnormSRGB:case np.ASTC8x8Unorm:case np.ASTC8x8UnormSRGB:case np.ASTC10x5Unorm:case np.ASTC10x5UnormSRGB:case np.ASTC10x6Unorm:case np.ASTC10x6UnormSRGB:case np.ASTC10x8Unorm:case np.ASTC10x8UnormSRGB:case np.ASTC10x10Unorm:case np.ASTC10x10UnormSRGB:case np.ASTC12x10Unorm:case np.ASTC12x10UnormSRGB:case np.ASTC12x12Unorm:case np.ASTC12x12UnormSRGB:return!0}return!1},e.GetWebGPUTextureFormat=function(e,t,n){switch(void 0===n&&(n=!1),t){case a.TEXTUREFORMAT_DEPTH16:return np.Depth16Unorm;case a.TEXTUREFORMAT_DEPTH24:return np.Depth24Plus;case a.TEXTUREFORMAT_DEPTH24_STENCIL8:return np.Depth24PlusStencil8;case a.TEXTUREFORMAT_DEPTH32_FLOAT:return np.Depth32Float;case a.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8:return np.Depth32FloatStencil8;case a.TEXTUREFORMAT_STENCIL8:return np.Stencil8;case a.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:return n?np.BC7RGBAUnormSRGB:np.BC7RGBAUnorm;case a.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:return np.BC6HRGBUFloat;case a.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:return np.BC6HRGBFloat;case a.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:return n?np.BC3RGBAUnormSRGB:np.BC3RGBAUnorm;case a.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3:return n?np.BC2RGBAUnormSRGB:np.BC2RGBAUnorm;case a.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:case a.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:return n?np.BC1RGBAUnormSRGB:np.BC1RGBAUnorm;case a.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:return n?np.ASTC4x4UnormSRGB:np.ASTC4x4Unorm;case a.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:case a.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:return n?np.ETC2RGB8UnormSRGB:np.ETC2RGB8Unorm;case a.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:return n?np.ETC2RGBA8UnormSRGB:np.ETC2RGBA8Unorm}switch(e){case a.TEXTURETYPE_BYTE:switch(t){case a.TEXTUREFORMAT_RED:return np.R8Snorm;case a.TEXTUREFORMAT_RG:return np.RG8Snorm;case a.TEXTUREFORMAT_RGB:throw"RGB format not supported in WebGPU";case a.TEXTUREFORMAT_RED_INTEGER:return np.R8Sint;case a.TEXTUREFORMAT_RG_INTEGER:return np.RG8Sint;case a.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case a.TEXTUREFORMAT_RGBA_INTEGER:return np.RGBA8Sint;default:return np.RGBA8Snorm}case a.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case a.TEXTUREFORMAT_RED:return np.R8Unorm;case a.TEXTUREFORMAT_RG:return np.RG8Unorm;case a.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case a.TEXTUREFORMAT_RGBA:return n?np.RGBA8UnormSRGB:np.RGBA8Unorm;case a.TEXTUREFORMAT_BGRA:return n?np.BGRA8UnormSRGB:np.BGRA8Unorm;case a.TEXTUREFORMAT_RED_INTEGER:return np.R8Uint;case a.TEXTUREFORMAT_RG_INTEGER:return np.RG8Uint;case a.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case a.TEXTUREFORMAT_RGBA_INTEGER:return np.RGBA8Uint;case a.TEXTUREFORMAT_ALPHA:throw"TEXTUREFORMAT_ALPHA format not supported in WebGPU";case a.TEXTUREFORMAT_LUMINANCE:throw"TEXTUREFORMAT_LUMINANCE format not supported in WebGPU";case a.TEXTUREFORMAT_LUMINANCE_ALPHA:throw"TEXTUREFORMAT_LUMINANCE_ALPHA format not supported in WebGPU";default:return np.RGBA8Unorm}case a.TEXTURETYPE_SHORT:switch(t){case a.TEXTUREFORMAT_RED_INTEGER:return np.R16Sint;case a.TEXTUREFORMAT_RG_INTEGER:return np.RG16Sint;case a.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case a.TEXTUREFORMAT_RGBA_INTEGER:default:return np.RGBA16Sint}case a.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case a.TEXTUREFORMAT_RED_INTEGER:return np.R16Uint;case a.TEXTUREFORMAT_RG_INTEGER:return np.RG16Uint;case a.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case a.TEXTUREFORMAT_RGBA_INTEGER:default:return np.RGBA16Uint}case a.TEXTURETYPE_INT:switch(t){case a.TEXTUREFORMAT_RED_INTEGER:return np.R32Sint;case a.TEXTUREFORMAT_RG_INTEGER:return np.RG32Sint;case a.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case a.TEXTUREFORMAT_RGBA_INTEGER:default:return np.RGBA32Sint}case a.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case a.TEXTUREFORMAT_RED_INTEGER:return np.R32Uint;case a.TEXTUREFORMAT_RG_INTEGER:return np.RG32Uint;case a.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case a.TEXTUREFORMAT_RGBA_INTEGER:default:return np.RGBA32Uint}case a.TEXTURETYPE_FLOAT:switch(t){case a.TEXTUREFORMAT_RED:return np.R32Float;case a.TEXTUREFORMAT_RG:return np.RG32Float;case a.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case a.TEXTUREFORMAT_RGBA:default:return np.RGBA32Float}case a.TEXTURETYPE_HALF_FLOAT:switch(t){case a.TEXTUREFORMAT_RED:return np.R16Float;case a.TEXTUREFORMAT_RG:return np.RG16Float;case a.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case a.TEXTUREFORMAT_RGBA:default:return np.RGBA16Float}case a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:throw"TEXTURETYPE_UNSIGNED_SHORT_5_6_5 format not supported in WebGPU";case a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:switch(t){case a.TEXTUREFORMAT_RGBA:return np.RG11B10UFloat;case a.TEXTUREFORMAT_RGBA_INTEGER:throw"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV";default:return np.RG11B10UFloat}case a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:switch(t){case a.TEXTUREFORMAT_RGBA:return np.RGB9E5UFloat;case a.TEXTUREFORMAT_RGBA_INTEGER:throw"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV";default:return np.RGB9E5UFloat}case a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:throw"TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 format not supported in WebGPU";case a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:throw"TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 format not supported in WebGPU";case a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case a.TEXTUREFORMAT_RGBA:return np.RGB10A2Unorm;case a.TEXTUREFORMAT_RGBA_INTEGER:return np.RGB10A2UINT;default:return np.RGB10A2Unorm}}return n?np.RGBA8UnormSRGB:np.RGBA8Unorm},e.GetNumChannelsFromWebGPUTextureFormat=function(e){switch(e){case np.R8Unorm:case np.R8Snorm:case np.R8Uint:case np.R8Sint:case np.BC4RUnorm:case np.BC4RSnorm:case np.R16Uint:case np.R16Sint:case np.Depth16Unorm:case np.R16Float:case np.R32Uint:case np.R32Sint:case np.R32Float:case np.Depth32Float:case np.Stencil8:case np.Depth24Plus:case np.EACR11Unorm:case np.EACR11Snorm:return 1;case np.RG8Unorm:case np.RG8Snorm:case np.RG8Uint:case np.RG8Sint:case np.Depth32FloatStencil8:case np.BC5RGUnorm:case np.BC5RGSnorm:case np.RG16Uint:case np.RG16Sint:case np.RG16Float:case np.RG32Uint:case np.RG32Sint:case np.RG32Float:case np.Depth24PlusStencil8:case np.EACRG11Unorm:case np.EACRG11Snorm:return 2;case np.RGB9E5UFloat:case np.RG11B10UFloat:case np.BC6HRGBUFloat:case np.BC6HRGBFloat:case np.ETC2RGB8Unorm:case np.ETC2RGB8UnormSRGB:return 3;case np.RGBA8Unorm:case np.RGBA8UnormSRGB:case np.RGBA8Snorm:case np.RGBA8Uint:case np.RGBA8Sint:case np.BGRA8Unorm:case np.BGRA8UnormSRGB:case np.RGB10A2UINT:case np.RGB10A2Unorm:case np.BC7RGBAUnorm:case np.BC7RGBAUnormSRGB:case np.BC3RGBAUnorm:case np.BC3RGBAUnormSRGB:case np.BC2RGBAUnorm:case np.BC2RGBAUnormSRGB:case np.BC1RGBAUnorm:case np.BC1RGBAUnormSRGB:case np.RGBA16Uint:case np.RGBA16Sint:case np.RGBA16Float:case np.RGBA32Uint:case np.RGBA32Sint:case np.RGBA32Float:case np.ETC2RGB8A1Unorm:case np.ETC2RGB8A1UnormSRGB:case np.ETC2RGBA8Unorm:case np.ETC2RGBA8UnormSRGB:case np.ASTC4x4Unorm:case np.ASTC4x4UnormSRGB:case np.ASTC5x4Unorm:case np.ASTC5x4UnormSRGB:case np.ASTC5x5Unorm:case np.ASTC5x5UnormSRGB:case np.ASTC6x5Unorm:case np.ASTC6x5UnormSRGB:case np.ASTC6x6Unorm:case np.ASTC6x6UnormSRGB:case np.ASTC8x5Unorm:case np.ASTC8x5UnormSRGB:case np.ASTC8x6Unorm:case np.ASTC8x6UnormSRGB:case np.ASTC8x8Unorm:case np.ASTC8x8UnormSRGB:case np.ASTC10x5Unorm:case np.ASTC10x5UnormSRGB:case np.ASTC10x6Unorm:case np.ASTC10x6UnormSRGB:case np.ASTC10x8Unorm:case np.ASTC10x8UnormSRGB:case np.ASTC10x10Unorm:case np.ASTC10x10UnormSRGB:case np.ASTC12x10Unorm:case np.ASTC12x10UnormSRGB:case np.ASTC12x12Unorm:case np.ASTC12x12UnormSRGB:return 4}throw"Unknown format ".concat(e,"!")},e.HasStencilAspect=function(e){switch(e){case np.Stencil8:case np.Depth32FloatStencil8:case np.Depth24PlusStencil8:return!0}return!1},e.HasDepthAndStencilAspects=function(e){switch(e){case np.Depth32FloatStencil8:case np.Depth24PlusStencil8:return!0}return!1},e.GetDepthFormatOnly=function(e){switch(e){case np.Depth16Unorm:return np.Depth16Unorm;case np.Depth24Plus:case np.Depth24PlusStencil8:return np.Depth24Plus;case np.Depth32Float:case np.Depth32FloatStencil8:return np.Depth32Float}return e},e.GetSample=function(e){return e>1?4:1},e.prototype.copyVideoToTexture=function(e,t,n,i,r){var o,a,s,c;void 0===i&&(i=!1);var l=void 0===r,u=this._getVideoPipeline(n,i?Vp.InvertY:Vp.DontInvertY),h=u[0],d=u[1];l&&(r=this._device.createCommandEncoder({})),null===(a=(o=r).pushDebugGroup)||void 0===a||a.call(o,"copy video to texture - invertY=".concat(i));var p={colorAttachments:[{view:t._hardwareTexture.underlyingResource.createView({format:n,dimension:ep.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:1,aspect:tp.All}),loadOp:Pp.Load,storeOp:Ip.Store}]},f=r.beginRenderPass(p),m={layout:d,entries:[{binding:0,resource:this._videoSampler},{binding:1,resource:this._device.importExternalTexture({source:e.underlyingResource})}]},_=this._device.createBindGroup(m);f.setPipeline(h),f.setBindGroup(0,_),f.draw(4,1,0,0),f.end(),null===(c=(s=r).popDebugGroup)||void 0===c||c.call(s),l&&(this._device.queue.submit([r.finish()]),r=null)},e.prototype.invertYPreMultiplyAlpha=function(t,n,i,r,o,a,s,c,l,u,h,d,p,f,m){var _,g,y,v,b,T;void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===s&&(s=0),void 0===c&&(c=0),void 0===l&&(l=1),void 0===u&&(u=0),void 0===h&&(h=0),void 0===d&&(d=0),void 0===p&&(p=0);var E,A=0!==d,x=void 0===f,S=this._getPipeline(r,A?kp.InvertYPremultiplyAlphaWithOfst:kp.InvertYPremultiplyAlpha,{invertY:o,premultiplyAlpha:a}),C=S[0],P=S[1];if(s=Math.max(s,0),x&&(f=this._device.createCommandEncoder({})),null===(g=(_=f).pushDebugGroup)||void 0===g||g.call(_,"internal process texture - invertY=".concat(o," premultiplyAlpha=").concat(a)),e._IsHardwareTexture(t)?(E=t.underlyingResource,o&&!a&&1===l&&0===s||(t=void 0)):(E=t,t=void 0),E){A&&this._bufferManager.setRawData(this._ubCopyWithOfst,0,new Float32Array([u,h,d,p]),0,16);var I=t,R=null!==(y=null==I?void 0:I._copyInvertYTempTexture)&&void 0!==y?y:this.createTexture({width:n,height:i,layers:1},!1,!1,!1,!1,!1,r,1,f,Jd.CopySrc|Jd.RenderAttachment|Jd.TextureBinding,void 0,"TempTextureForCopyWithInvertY"),O=null!==(v=null==I?void 0:I._copyInvertYRenderPassDescr)&&void 0!==v?v:{colorAttachments:[{view:R.createView({format:r,dimension:ep.E2d,baseMipLevel:0,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:0}),loadOp:Pp.Load,storeOp:Ip.Store}]},w=f.beginRenderPass(O),M=A?null==I?void 0:I._copyInvertYBindGroupWithOfst:null==I?void 0:I._copyInvertYBindGroup;if(!M){var D={layout:P,entries:[{binding:0,resource:E.createView({format:r,dimension:ep.E2d,baseMipLevel:c,mipLevelCount:1,arrayLayerCount:l,baseArrayLayer:s})}]};A&&D.entries.push({binding:1,resource:{buffer:this._ubCopyWithOfst}}),M=this._device.createBindGroup(D)}w.setPipeline(C),w.setBindGroup(0,M),w.draw(4,1,0,0),w.end(),f.copyTextureToTexture({texture:R},{texture:E,mipLevel:c,origin:{x:0,y:0,z:s}},{width:n,height:i,depthOrArrayLayers:1}),I?(I._copyInvertYTempTexture=R,I._copyInvertYRenderPassDescr=O,A?I._copyInvertYBindGroupWithOfst=M:I._copyInvertYBindGroup=M):this._deferredReleaseTextures.push([R,null]),null===(T=(b=f).popDebugGroup)||void 0===T||T.call(b),x&&(this._device.queue.submit([f.finish()]),f=null)}},e.prototype.copyWithInvertY=function(e,t,n,i){var r,o,a,s,c=void 0===i,l=this._getPipeline(t,kp.InvertYPremultiplyAlpha,{invertY:!0,premultiplyAlpha:!1}),u=l[0],h=l[1];c&&(i=this._device.createCommandEncoder({})),null===(o=(r=i).pushDebugGroup)||void 0===o||o.call(r,"internal copy texture with invertY");var d=i.beginRenderPass(n),p=this._device.createBindGroup({layout:h,entries:[{binding:0,resource:e}]});d.setPipeline(u),d.setBindGroup(0,p),d.draw(4,1,0,0),d.end(),null===(s=(a=i).popDebugGroup)||void 0===s||s.call(a),c&&(this._device.queue.submit([i.finish()]),i=null)},e.prototype.createTexture=function(t,n,i,r,o,a,s,c,l,u,h,d){void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===s&&(s=np.RGBA8Unorm),void 0===c&&(c=1),void 0===u&&(u=-1),void 0===h&&(h=0),c=e.GetSample(c);var p=t.layers||1,f={width:t.width,height:t.height,depthOrArrayLayers:p},m=Kp[s]?Jd.RenderAttachment:0,_=e.IsCompressedFormat(s),g=n?e.ComputeNumMipmapLevels(t.width,t.height):1,y=u>=0?u:Jd.CopySrc|Jd.CopyDst|Jd.TextureBinding;h|=n&&!_?Jd.CopySrc|m:0,_||a||(h|=m|Jd.CopyDst);var v=this._device.createTexture({label:"Texture".concat(a?"3D":"2D","_").concat(d?d+"_":"").concat(f.width,"x").concat(f.height,"x").concat(f.depthOrArrayLayers,"_").concat(n?"wmips":"womips","_").concat(s,"_samples").concat(c),size:f,dimension:a?$d.E3d:$d.E2d,format:s,usage:y|h,sampleCount:c,mipLevelCount:g});return e.IsImageBitmap(t)&&(this.updateTexture(t,v,t.width,t.height,p,s,0,0,r,o,0,0),n&&i&&this.generateMipmaps(v,s,g,0,l)),v},e.prototype.createCubeTexture=function(t,n,i,r,o,a,s,c,l,u,h){void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=np.RGBA8Unorm),void 0===s&&(s=1),void 0===l&&(l=-1),void 0===u&&(u=0),s=e.GetSample(s);var d=e.IsImageBitmapArray(t)?t[0].width:t.width,p=e.IsImageBitmapArray(t)?t[0].height:t.height,f=Kp[a]?Jd.RenderAttachment:0,m=e.IsCompressedFormat(a),_=n?e.ComputeNumMipmapLevels(d,p):1,g=l>=0?l:Jd.CopySrc|Jd.CopyDst|Jd.TextureBinding;u|=n&&!m?Jd.CopySrc|f:0,m||(u|=f|Jd.CopyDst);var y=this._device.createTexture({label:"TextureCube_".concat(h?h+"_":"").concat(d,"x").concat(p,"x6_").concat(n?"wmips":"womips","_").concat(a,"_samples").concat(s),size:{width:d,height:p,depthOrArrayLayers:6},dimension:$d.E2d,format:a,usage:g|u,sampleCount:s,mipLevelCount:_});return e.IsImageBitmapArray(t)&&(this.updateCubeTextures(t,y,d,p,a,r,o,0,0),n&&i&&this.generateCubeMipmaps(y,a,_,c)),y},e.prototype.generateCubeMipmaps=function(e,t,n,i){var r,o,a,s,c=void 0===i;c&&(i=this._device.createCommandEncoder({})),null===(o=(r=i).pushDebugGroup)||void 0===o||o.call(r,"create cube mipmaps - ".concat(n," levels"));for(var l=0;l<6;++l)this.generateMipmaps(e,t,n,l,i);null===(s=(a=i).popDebugGroup)||void 0===s||s.call(a),c&&(this._device.queue.submit([i.finish()]),i=null)},e.prototype.generateMipmaps=function(t,n,i,r,o){var a,s,c,l,u,h,d,p;void 0===r&&(r=0);var f,m=void 0===o,_=this._getPipeline(n),g=_[0],y=_[1];if(r=Math.max(r,0),m&&(o=this._device.createCommandEncoder({})),null===(s=(a=o).pushDebugGroup)||void 0===s||s.call(a,"create mipmaps for face #".concat(r," - ").concat(i," levels")),e._IsHardwareTexture(t)?(f=t.underlyingResource,t._mipmapGenRenderPassDescr=t._mipmapGenRenderPassDescr||[],t._mipmapGenBindGroup=t._mipmapGenBindGroup||[]):(f=t,t=void 0),f){for(var v=t,b=1;bu;)this._device.queue.writeBuffer(o,t+h,n.buffer,a+h,u),h+=u;this._device.queue.writeBuffer(o,t+h,n.buffer,a+h,r-h)},e.prototype._getHalfFloatAsFloatRGBAArrayBuffer=function(e,t,n){n||(n=new Float32Array(e));for(var i=new Uint16Array(t);e--;)n[e]=ad(i[e]);return n},e.prototype.readDataFromBuffer=function(e,t,n,i,r,o,s,c,l,u,h){var d=this;void 0===s&&(s=a.TEXTURETYPE_UNSIGNED_BYTE),void 0===c&&(c=0),void 0===l&&(l=null),void 0===u&&(u=!0),void 0===h&&(h=!1);var p=s===a.TEXTURETYPE_FLOAT?2:s===a.TEXTURETYPE_HALF_FLOAT?1:0;return new Promise((function(n,a){e.mapAsync(Zd.Read,c,t).then((function(){var a=e.getMappedRange(c,t),f=l;if(h)f=null===f?Mr(s,t,!0,a):Mr(s,f.buffer,void 0,a);else if(null===f)switch(p){case 0:(f=new Uint8Array(t)).set(new Uint8Array(a));break;case 1:f=d._getHalfFloatAsFloatRGBAArrayBuffer(t/2,a);break;case 2:(f=new Float32Array(t/4)).set(new Float32Array(a))}else switch(p){case 0:(f=new Uint8Array(f.buffer)).set(new Uint8Array(a));break;case 1:f=d._getHalfFloatAsFloatRGBAArrayBuffer(t/2,a,l);break;case 2:(f=new Float32Array(f.buffer)).set(new Float32Array(a))}if(r!==o){1!==p||h||(r*=2,o*=2);for(var m=new Uint8Array(f.buffer),_=r,g=0,y=1;y1?4:1;return Jp[e.samplingMode]+ef[(e._comparisonFunction||514)-512+1]+tf[e.samplingMode]+((null!==(t=e._cachedWrapU)&&void 0!==t?t:1)<<8)+((null!==(n=e._cachedWrapV)&&void 0!==n?n:1)<<10)+((null!==(i=e._cachedWrapR)&&void 0!==i?i:1)<<12)+((e.useMipMaps?1:0)<<14)+(r<<15)},e._GetSamplerFilterDescriptor=function(e,t){var n,i,r,o,s,c=e.useMipMaps;switch(e.samplingMode){case a.TEXTURE_LINEAR_LINEAR_MIPNEAREST:n=rp.Linear,i=rp.Linear,r=rp.Nearest,c||(o=s=0);break;case a.TEXTURE_LINEAR_LINEAR_MIPLINEAR:case a.TEXTURE_TRILINEAR_SAMPLINGMODE:n=rp.Linear,i=rp.Linear,c?r=rp.Linear:(r=rp.Nearest,o=s=0);break;case a.TEXTURE_NEAREST_NEAREST_MIPLINEAR:n=rp.Nearest,i=rp.Nearest,c?r=rp.Linear:(r=rp.Nearest,o=s=0);break;case a.TEXTURE_NEAREST_NEAREST_MIPNEAREST:n=rp.Nearest,i=rp.Nearest,r=rp.Nearest,c||(o=s=0);break;case a.TEXTURE_NEAREST_LINEAR_MIPNEAREST:n=rp.Nearest,i=rp.Linear,r=rp.Nearest,c||(o=s=0);break;case a.TEXTURE_NEAREST_LINEAR_MIPLINEAR:n=rp.Nearest,i=rp.Linear,c?r=rp.Linear:(r=rp.Nearest,o=s=0);break;case a.TEXTURE_NEAREST_LINEAR:n=rp.Nearest,i=rp.Linear,r=rp.Nearest,o=s=0;break;case a.TEXTURE_NEAREST_NEAREST:case a.TEXTURE_NEAREST_SAMPLINGMODE:n=rp.Nearest,i=rp.Nearest,r=rp.Nearest,o=s=0;break;case a.TEXTURE_LINEAR_NEAREST_MIPNEAREST:n=rp.Linear,i=rp.Nearest,r=rp.Nearest,c||(o=s=0);break;case a.TEXTURE_LINEAR_NEAREST_MIPLINEAR:n=rp.Linear,i=rp.Nearest,c?r=rp.Linear:(r=rp.Nearest,o=s=0);break;case a.TEXTURE_LINEAR_LINEAR:case a.TEXTURE_BILINEAR_SAMPLINGMODE:n=rp.Linear,i=rp.Linear,r=rp.Nearest,o=s=0;break;case a.TEXTURE_LINEAR_NEAREST:n=rp.Linear,i=rp.Nearest,r=rp.Nearest,o=s=0;break;default:n=rp.Nearest,i=rp.Nearest,r=rp.Nearest,o=s=0}return t>1&&(0!==o||0!==s)&&r!==rp.Nearest?{magFilter:rp.Linear,minFilter:rp.Linear,mipmapFilter:rp.Linear,anisotropyEnabled:!0}:{magFilter:n,minFilter:i,mipmapFilter:r,lodMinClamp:o,lodMaxClamp:s}},e._GetWrappingMode=function(e){switch(e){case a.TEXTURE_WRAP_ADDRESSMODE:return ip.Repeat;case a.TEXTURE_CLAMP_ADDRESSMODE:return ip.ClampToEdge;case a.TEXTURE_MIRROR_ADDRESSMODE:return ip.MirrorRepeat}return ip.Repeat},e._GetSamplerWrappingDescriptor=function(e){return{addressModeU:this._GetWrappingMode(e._cachedWrapU),addressModeV:this._GetWrappingMode(e._cachedWrapV),addressModeW:this._GetWrappingMode(e._cachedWrapR)}},e._GetSamplerDescriptor=function(t,n){var i=t.useMipMaps&&t._cachedAnisotropicFilteringLevel&&t._cachedAnisotropicFilteringLevel>1?4:1,r=this._GetSamplerFilterDescriptor(t,i);return j(j(j({label:n},r),this._GetSamplerWrappingDescriptor(t)),{compare:t._comparisonFunction?e.GetCompareFunction(t._comparisonFunction):void 0,maxAnisotropy:r.anisotropyEnabled?i:1})},e.GetCompareFunction=function(e){switch(e){case a.ALWAYS:return ap.Always;case a.EQUAL:return ap.Equal;case a.GREATER:return ap.Greater;case a.GEQUAL:return ap.GreaterEqual;case a.LESS:return ap.Less;case a.LEQUAL:return ap.LessEqual;case a.NEVER:return ap.Never;case a.NOTEQUAL:return ap.NotEqual;default:return ap.Less}},e.prototype.getSampler=function(t,n,i,r){if(void 0===n&&(n=!1),void 0===i&&(i=0),this.disabled)return this._device.createSampler(e._GetSamplerDescriptor(t,r));n?i=0:0===i&&(i=e.GetSamplerHashCode(t));var o=n?void 0:this._samplers[i];return o||(o=this._device.createSampler(e._GetSamplerDescriptor(t,r)),n||(this._samplers[i]=o)),o},e}();!function(e){e[e.StencilReadMask=0]="StencilReadMask",e[e.StencilWriteMask=1]="StencilWriteMask",e[e.DepthBias=2]="DepthBias",e[e.DepthBiasSlopeScale=3]="DepthBiasSlopeScale",e[e.DepthStencilState=4]="DepthStencilState",e[e.MRTAttachments1=5]="MRTAttachments1",e[e.MRTAttachments2=6]="MRTAttachments2",e[e.RasterizationState=7]="RasterizationState",e[e.ColorStates=8]="ColorStates",e[e.ShaderStage=9]="ShaderStage",e[e.TextureStage=10]="TextureStage",e[e.VertexState=11]="VertexState",e[e.NumStates=12]="NumStates"}(Yp||(Yp={}));var rf={0:1,1:2,768:3,769:4,770:5,771:6,772:7,773:8,774:9,775:10,776:11,32769:12,32770:13,32771:12,32772:13},of={0:0,7680:1,7681:2,7682:3,7683:4,5386:5,34055:6,34056:7},af=((Xp={})[Yn.PositionKind]=!0,Xp[Yn.NormalKind]=!0,Xp[Yn.TangentKind]=!0,Xp[Yn.UVKind]=!0,Xp[Yn.UV2Kind]=!0,Xp[Yn.UV3Kind]=!0,Xp[Yn.UV4Kind]=!0,Xp[Yn.UV5Kind]=!0,Xp[Yn.UV6Kind]=!0,Xp[Yn.ColorKind]=!0,Xp[Yn.ColorInstanceKind]=!0,Xp[Yn.MatricesIndicesKind]=!0,Xp[Yn.MatricesWeightsKind]=!0,Xp[Yn.MatricesIndicesExtraKind]=!0,Xp[Yn.MatricesWeightsExtraKind]=!0,Xp),sf=function(){function e(e,t){this.mrtTextureCount=0,this._device=e,this._useTextureStage=!0,this._states=new Array(30),this._statesLength=0,this._stateDirtyLowestIndex=0,this._emptyVertexBuffer=t,this._mrtFormats=[],this._parameter={token:void 0,pipeline:null},this.disabled=!1,this.vertexBuffers=[],this._kMaxVertexBufferStride=e.limits.maxVertexBufferArrayStride||2048,this.reset()}return e._IsSignedType=function(e){switch(e){case Yn.BYTE:case Yn.SHORT:case Yn.INT:case Yn.FLOAT:return!0;case Yn.UNSIGNED_BYTE:case Yn.UNSIGNED_SHORT:case Yn.UNSIGNED_INT:return!1;default:throw new Error("Invalid type '".concat(e,"'"))}},e.prototype.reset=function(){this._isDirty=!0,this.vertexBuffers.length=0,this.setAlphaToCoverage(!1),this.resetDepthCullingState(),this.setClampDepth(!1),this.setDepthBias(0),this._webgpuColorFormat=[np.BGRA8Unorm],this.setColorFormat(np.BGRA8Unorm),this.setMRT([]),this.setAlphaBlendEnabled(!1),this.setAlphaBlendFactors([null,null,null,null],[null,null]),this.setWriteMask(15),this.setDepthStencilFormat(np.Depth24PlusStencil8),this.setStencilEnabled(!1),this.resetStencilState(),this.setBuffers(null,null,null),this._setTextureState(0)},Object.defineProperty(e.prototype,"colorFormats",{get:function(){return this._mrtAttachments1>0?this._mrtFormats:this._webgpuColorFormat},enumerable:!1,configurable:!0}),e.prototype.getRenderPipeline=function(t,n,i,r){if(void 0===r&&(r=0),i=Qp.GetSample(i),this.disabled){var o=e._GetTopology(t);return this._setVertexState(n),this._setTextureState(r),this._parameter.pipeline=this._createRenderPipeline(n,o,i),e.NumCacheMiss++,e._NumPipelineCreationCurrentFrame++,this._parameter.pipeline}if(this._setShaderStage(n.uniqueId),this._setRasterizationState(t,i),this._setColorStates(),this._setDepthStencilState(),this._setVertexState(n),this._setTextureState(r),this.lastStateDirtyLowestIndex=this._stateDirtyLowestIndex,!this._isDirty&&this._parameter.pipeline)return this._stateDirtyLowestIndex=this._statesLength,e.NumCacheHitWithoutHash++,this._parameter.pipeline;if(this._getRenderPipeline(this._parameter),this._isDirty=!1,this._stateDirtyLowestIndex=this._statesLength,this._parameter.pipeline)return e.NumCacheHitWithHash++,this._parameter.pipeline;var a=e._GetTopology(t);return this._parameter.pipeline=this._createRenderPipeline(n,a,i),this._setRenderPipeline(this._parameter),e.NumCacheMiss++,e._NumPipelineCreationCurrentFrame++,this._parameter.pipeline},e.prototype.endFrame=function(){e.NumPipelineCreationLastFrame=e._NumPipelineCreationCurrentFrame,e._NumPipelineCreationCurrentFrame=0},e.prototype.setAlphaToCoverage=function(e){this._alphaToCoverageEnabled=e},e.prototype.setFrontFace=function(e){this._frontFace=e},e.prototype.setCullEnabled=function(e){this._cullEnabled=e},e.prototype.setCullFace=function(e){this._cullFace=e},e.prototype.setClampDepth=function(e){this._clampDepth=e},e.prototype.resetDepthCullingState=function(){this.setDepthCullingState(!1,2,1,0,0,!0,!0,a.ALWAYS)},e.prototype.setDepthCullingState=function(e,t,n,i,r,o,s,c){this._depthWriteEnabled=s,this._depthTestEnabled=o,this._depthCompare=(null!=c?c:a.ALWAYS)-512,this._cullFace=n,this._cullEnabled=e,this._frontFace=t,this.setDepthBiasSlopeScale(i),this.setDepthBias(r)},e.prototype.setDepthBias=function(e){this._depthBias!==e&&(this._depthBias=e,this._states[Yp.DepthBias]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,Yp.DepthBias))},e.prototype.setDepthBiasSlopeScale=function(e){this._depthBiasSlopeScale!==e&&(this._depthBiasSlopeScale=e,this._states[Yp.DepthBiasSlopeScale]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,Yp.DepthBiasSlopeScale))},e.prototype.setColorFormat=function(e){this._webgpuColorFormat[0]=e,this._colorFormat=Kp[null!=e?e:""]},e.prototype.setMRTAttachments=function(e){this.mrtAttachments=e;for(var t=0,n=0;n10)throw"Can't handle more than 10 attachments for a MRT in cache render pipeline!";this.mrtTextureArray=e,this.mrtTextureCount=t,this._mrtEnabledMask=65535;for(var r=[0,0],o=0,a=0,s=0,c=0;c=32&&(a=0,o++)}this._mrtFormats.length=s,this._mrtAttachments1===r[0]&&this._mrtAttachments2===r[1]||(this._mrtAttachments1=r[0],this._mrtAttachments2=r[1],this._states[Yp.MRTAttachments1]=r[0],this._states[Yp.MRTAttachments2]=r[1],this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,Yp.MRTAttachments1))},e.prototype.setAlphaBlendEnabled=function(e){this._alphaBlendEnabled=e},e.prototype.setAlphaBlendFactors=function(e,t){this._alphaBlendFuncParams=e,this._alphaBlendEqParams=t},e.prototype.setWriteMask=function(e){this._writeMask=e},e.prototype.setDepthStencilFormat=function(e){this._webgpuDepthStencilFormat=e,this._depthStencilFormat=void 0===e?0:Kp[e]},e.prototype.setDepthTestEnabled=function(e){this._depthTestEnabled=e},e.prototype.setDepthWriteEnabled=function(e){this._depthWriteEnabled=e},e.prototype.setDepthCompare=function(e){this._depthCompare=(null!=e?e:a.ALWAYS)-512},e.prototype.setStencilEnabled=function(e){this._stencilEnabled=e},e.prototype.setStencilCompare=function(e){this._stencilFrontCompare=(null!=e?e:a.ALWAYS)-512},e.prototype.setStencilDepthFailOp=function(e){this._stencilFrontDepthFailOp=null===e?1:of[e]},e.prototype.setStencilPassOp=function(e){this._stencilFrontPassOp=null===e?2:of[e]},e.prototype.setStencilFailOp=function(e){this._stencilFrontFailOp=null===e?1:of[e]},e.prototype.setStencilReadMask=function(e){this._stencilReadMask!==e&&(this._stencilReadMask=e,this._states[Yp.StencilReadMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,Yp.StencilReadMask))},e.prototype.setStencilWriteMask=function(e){this._stencilWriteMask!==e&&(this._stencilWriteMask=e,this._states[Yp.StencilWriteMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,Yp.StencilWriteMask))},e.prototype.resetStencilState=function(){this.setStencilState(!1,a.ALWAYS,a.KEEP,a.REPLACE,a.KEEP,255,255)},e.prototype.setStencilState=function(e,t,n,i,r,o,s){this._stencilEnabled=e,this._stencilFrontCompare=(null!=t?t:a.ALWAYS)-512,this._stencilFrontDepthFailOp=null===n?1:of[n],this._stencilFrontPassOp=null===i?2:of[i],this._stencilFrontFailOp=null===r?1:of[r],this.setStencilReadMask(o),this.setStencilWriteMask(s)},e.prototype.setBuffers=function(e,t,n){this._vertexBuffers=e,this._overrideVertexBuffers=n,this._indexBuffer=t},e._GetTopology=function(e){switch(e){case a.MATERIAL_TriangleFillMode:return mp.TriangleList;case a.MATERIAL_PointFillMode:return mp.PointList;case a.MATERIAL_WireFrameFillMode:return mp.LineList;case a.MATERIAL_PointListDrawMode:return mp.PointList;case a.MATERIAL_LineListDrawMode:return mp.LineList;case a.MATERIAL_LineLoopDrawMode:throw"LineLoop is an unsupported fillmode in WebGPU";case a.MATERIAL_LineStripDrawMode:return mp.LineStrip;case a.MATERIAL_TriangleStripDrawMode:return mp.TriangleStrip;case a.MATERIAL_TriangleFanDrawMode:throw"TriangleFan is an unsupported fillmode in WebGPU";default:return mp.TriangleList}},e._GetAphaBlendOperation=function(e){switch(e){case a.GL_ALPHA_EQUATION_ADD:return bp.Add;case a.GL_ALPHA_EQUATION_SUBTRACT:return bp.Subtract;case a.GL_ALPHA_EQUATION_REVERSE_SUBTRACT:return bp.ReverseSubtract;case a.GL_ALPHA_EQUATION_MIN:return bp.Min;case a.GL_ALPHA_EQUATION_MAX:return bp.Max;default:return bp.Add}},e._GetAphaBlendFactor=function(e){switch(e){case 0:return vp.Zero;case 1:return vp.One;case a.GL_ALPHA_FUNCTION_SRC:return vp.Src;case a.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR:return vp.OneMinusSrc;case a.GL_ALPHA_FUNCTION_SRC_ALPHA:return vp.SrcAlpha;case a.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA:return vp.OneMinusSrcAlpha;case a.GL_ALPHA_FUNCTION_DST_ALPHA:return vp.DstAlpha;case a.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA:return vp.OneMinusDstAlpha;case a.GL_ALPHA_FUNCTION_DST_COLOR:return vp.Dst;case a.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR:return vp.OneMinusDst;case a.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED:return vp.SrcAlphaSaturated;case a.GL_ALPHA_FUNCTION_CONSTANT_COLOR:return vp.Constant;case a.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR:return vp.OneMinusConstant;case a.GL_ALPHA_FUNCTION_CONSTANT_ALPHA:return vp.Constant;case a.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA:return vp.OneMinusConstant;default:return vp.One}},e._GetCompareFunction=function(e){switch(e){case 0:return ap.Never;case 1:return ap.Less;case 2:return ap.Equal;case 3:return ap.LessEqual;case 4:return ap.Greater;case 5:return ap.NotEqual;case 6:return ap.GreaterEqual;case 7:return ap.Always}return ap.Never},e._GetStencilOpFunction=function(e){switch(e){case 0:return Tp.Zero;case 1:return Tp.Keep;case 2:return Tp.Replace;case 3:return Tp.IncrementClamp;case 4:return Tp.DecrementClamp;case 5:return Tp.Invert;case 6:return Tp.IncrementWrap;case 7:return Tp.DecrementWrap}return Tp.Keep},e._GetVertexInputDescriptorFormat=function(e){var t=e.type,n=e.normalized,i=e.getSize();switch(t){case Yn.BYTE:switch(i){case 1:case 2:return n?Ap.Snorm8x2:Ap.Sint8x2;case 3:case 4:return n?Ap.Snorm8x4:Ap.Sint8x4}break;case Yn.UNSIGNED_BYTE:switch(i){case 1:case 2:return n?Ap.Unorm8x2:Ap.Uint8x2;case 3:case 4:return n?Ap.Unorm8x4:Ap.Uint8x4}break;case Yn.SHORT:switch(i){case 1:case 2:return n?Ap.Snorm16x2:Ap.Sint16x2;case 3:case 4:return n?Ap.Snorm16x4:Ap.Sint16x4}break;case Yn.UNSIGNED_SHORT:switch(i){case 1:case 2:return n?Ap.Unorm16x2:Ap.Uint16x2;case 3:case 4:return n?Ap.Unorm16x4:Ap.Uint16x4}break;case Yn.INT:switch(i){case 1:return Ap.Sint32;case 2:return Ap.Sint32x2;case 3:return Ap.Sint32x3;case 4:return Ap.Sint32x4}break;case Yn.UNSIGNED_INT:switch(i){case 1:return Ap.Uint32;case 2:return Ap.Uint32x2;case 3:return Ap.Uint32x3;case 4:return Ap.Uint32x4}break;case Yn.FLOAT:switch(i){case 1:return Ap.Float32;case 2:return Ap.Float32x2;case 3:return Ap.Float32x3;case 4:return Ap.Float32x4}}throw new Error("Invalid Format '".concat(e.getKind(),"' - type=").concat(t,", normalized=").concat(n,", size=").concat(i))},e.prototype._getAphaBlendState=function(){return this._alphaBlendEnabled?{srcFactor:e._GetAphaBlendFactor(this._alphaBlendFuncParams[2]),dstFactor:e._GetAphaBlendFactor(this._alphaBlendFuncParams[3]),operation:e._GetAphaBlendOperation(this._alphaBlendEqParams[1])}:null},e.prototype._getColorBlendState=function(){return this._alphaBlendEnabled?{srcFactor:e._GetAphaBlendFactor(this._alphaBlendFuncParams[0]),dstFactor:e._GetAphaBlendFactor(this._alphaBlendFuncParams[1]),operation:e._GetAphaBlendOperation(this._alphaBlendEqParams[0])}:null},e.prototype._setShaderStage=function(e){this._shaderId!==e&&(this._shaderId=e,this._states[Yp.ShaderStage]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,Yp.ShaderStage))},e.prototype._setRasterizationState=function(e,t){var n=this._frontFace-1+((this._cullEnabled?this._cullFace:0)<<1)+((this._clampDepth?1:0)<<3)+((this._alphaToCoverageEnabled?1:0)<<4)+(e<<5)+(t<<8);this._rasterizationState!==n&&(this._rasterizationState=n,this._states[Yp.RasterizationState]=this._rasterizationState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,Yp.RasterizationState))},e.prototype._setColorStates=function(){var e=((this._writeMask?1:0)<<22)+(this._colorFormat<<23)+((this._depthWriteEnabled?1:0)<<29);this._alphaBlendEnabled&&(e+=((null===this._alphaBlendFuncParams[0]?2:rf[this._alphaBlendFuncParams[0]])<<0)+((null===this._alphaBlendFuncParams[1]?2:rf[this._alphaBlendFuncParams[1]])<<4)+((null===this._alphaBlendFuncParams[2]?2:rf[this._alphaBlendFuncParams[2]])<<8)+((null===this._alphaBlendFuncParams[3]?2:rf[this._alphaBlendFuncParams[3]])<<12)+((null===this._alphaBlendEqParams[0]?1:this._alphaBlendEqParams[0]-32773)<<16)+((null===this._alphaBlendEqParams[1]?1:this._alphaBlendEqParams[1]-32773)<<19)),e!==this._colorStates&&(this._colorStates=e,this._states[Yp.ColorStates]=this._colorStates,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,Yp.ColorStates))},e.prototype._setDepthStencilState=function(){var e=this._stencilEnabled?this._stencilFrontCompare+(this._stencilFrontDepthFailOp<<3)+(this._stencilFrontPassOp<<6)+(this._stencilFrontFailOp<<9):591,t=this._depthStencilFormat+((this._depthTestEnabled?this._depthCompare:7)<<6)+(e<<10);this._depthStencilState!==t&&(this._depthStencilState=t,this._states[Yp.DepthStencilState]=this._depthStencilState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,Yp.DepthStencilState))},e.prototype._setVertexState=function(e){for(var t,n,i,r=this._statesLength,o=Yp.VertexState,a=e._pipelineContext,s=a.shaderProcessingContext.attributeNamesFromEffect,c=a.shaderProcessingContext.attributeLocationsFromEffect,l=0,u=0;u0)for(var p=0;p=this._video.HAVE_CURRENT_DATA},e.prototype.dispose=function(){},e}(),pf=function(){function e(){this.uniqueId=e._Counter++,this.updateId=0,this.textureState=0,this.reset()}return Object.defineProperty(e.prototype,"forceBindGroupCreation",{get:function(){return this._numExternalTextures>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasFloatOrDepthTextures",{get:function(){return this._numFloatOrDepthTextures>0},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.samplers={},this.textures={},this.isDirty=!0,this._numFloatOrDepthTextures=0,this._numExternalTextures=0},e.prototype.setSampler=function(e,t){var n=this.samplers[e],i=-1;n?i=n.hashCode:this.samplers[e]=n={sampler:t,hashCode:0},n.sampler=t,n.hashCode=t?nf.GetSamplerHashCode(t):0;var r=i!==n.hashCode;r&&this.updateId++,this.isDirty||(this.isDirty=r)},e.prototype.setTexture=function(e,t){var n,i,r,o=this.textures[e],s=-1;o?s=null!==(i=null===(n=o.texture)||void 0===n?void 0:n.uniqueId)&&void 0!==i?i:-1:this.textures[e]=o={texture:t,isFloatOrDepthTexture:!1,isExternalTexture:!1},o.isExternalTexture&&this._numExternalTextures--,o.isFloatOrDepthTexture&&this._numFloatOrDepthTextures--,t?(o.isFloatOrDepthTexture=t.type===a.TEXTURETYPE_FLOAT||t.format>=a.TEXTUREFORMAT_DEPTH24_STENCIL8&&t.format<=a.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8,o.isExternalTexture=df.IsExternalTexture(t),o.isFloatOrDepthTexture&&this._numFloatOrDepthTextures++,o.isExternalTexture&&this._numExternalTextures++):(o.isFloatOrDepthTexture=!1,o.isExternalTexture=!1),o.texture=t;var c=s!==(null!==(r=null==t?void 0:t.uniqueId)&&void 0!==r?r:-1);c&&this.updateId++,this.isDirty||(this.isDirty=c)},e._Counter=0,e}(),ff=function(){function e(t){this._bufferManager=t,this.uniqueId=e._Counter++,this._useInstancing=!1,this._currentInstanceCount=0,this.reset()}return e.prototype.isDirty=function(e){return this._isDirty||this._materialContextUpdateId!==e},e.prototype.resetIsDirty=function(e){this._isDirty=!1,this._materialContextUpdateId=e},Object.defineProperty(e.prototype,"useInstancing",{get:function(){return this._useInstancing},set:function(e){this._useInstancing!==e&&(e?(this.indirectDrawBuffer=this._bufferManager.createRawBuffer(20,Qd.CopyDst|Qd.Indirect|Qd.Storage,void 0,"IndirectDrawBuffer"),this._indirectDrawData=new Uint32Array(5),this._indirectDrawData[3]=0,this._indirectDrawData[4]=0):(this.indirectDrawBuffer&&this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this._useInstancing=e,this._currentInstanceCount=-1)},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.buffers={},this._isDirty=!0,this._materialContextUpdateId=0,this.fastBundle=void 0,this.bindGroups=void 0},e.prototype.setBuffer=function(e,t){var n;this._isDirty||(this._isDirty=(null==t?void 0:t.uniqueId)!==(null===(n=this.buffers[e])||void 0===n?void 0:n.uniqueId)),this.buffers[e]=t},e.prototype.setIndirectData=function(e,t,n){t!==this._currentInstanceCount&&this.indirectDrawBuffer&&this._indirectDrawData&&(this._currentInstanceCount=t,this._indirectDrawData[0]=e,this._indirectDrawData[1]=t,this._indirectDrawData[2]=n,this._bufferManager.setRawData(this.indirectDrawBuffer,0,this._indirectDrawData,0,20))},e.prototype.dispose=function(){this.indirectDrawBuffer&&(this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this.fastBundle=void 0,this.bindGroups=void 0,this.buffers=void 0},e._Counter=0,e}(),mf=function(){this.values={}},_f=function(){function e(e,t,n){this.disabled=!1,this._device=e,this._cacheSampler=t,this._engine=n}return Object.defineProperty(e,"Statistics",{get:function(){return{totalCreated:e.NumBindGroupsCreatedTotal,lastFrameCreated:e.NumBindGroupsCreatedLastFrame,lookupLastFrame:e.NumBindGroupsLookupLastFrame,noLookupLastFrame:e.NumBindGroupsNoLookupLastFrame}},enumerable:!1,configurable:!0}),e.prototype.endFrame=function(){e.NumBindGroupsCreatedLastFrame=e._NumBindGroupsCreatedCurrentFrame,e.NumBindGroupsLookupLastFrame=e._NumBindGroupsLookupCurrentFrame,e.NumBindGroupsNoLookupLastFrame=e._NumBindGroupsNoLookupCurrentFrame,e._NumBindGroupsCreatedCurrentFrame=0,e._NumBindGroupsLookupCurrentFrame=0,e._NumBindGroupsNoLookupCurrentFrame=0},e.prototype.getBindGroups=function(t,n,i){var r,o,a,s,c,l,u,h,d,p,f=void 0,m=e._Cache,_=this.disabled||i.forceBindGroupCreation;if(!_){if(!n.isDirty(i.updateId)&&!i.isDirty)return e._NumBindGroupsNoLookupCurrentFrame++,n.bindGroups;for(var g=0,y=t.shaderProcessingContext.bufferNames;g":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}D[N].resource=this._cacheSampler.getSampler(U,!1,V.hashCode,U.label)}else J.Error('Sampler "'.concat(B,'" could not be bound. entry=').concat(JSON.stringify(L),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"":t}))),50);else if(L.texture||L.storageTexture)if(V=i.textures[B]){if(this._engine.dbgSanityChecks&&null===V.texture){J.Error("Trying to bind a null texture! entry=".concat(JSON.stringify(L),", bindingInfo=").concat(JSON.stringify(V,(function(e,t){return"texture"===e?"":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var k=V.texture._hardwareTexture;if(this._engine.dbgSanityChecks&&(!k||L.texture&&!k.view||L.storageTexture&&!k.viewForWriting)){J.Error("Trying to bind a null gpu texture or view! entry=".concat(JSON.stringify(L),", name=").concat(B,", bindingInfo=").concat(JSON.stringify(V,(function(e,t){return"texture"===e?"":t})),", isReady=").concat(null===(d=V.texture)||void 0===d?void 0:d.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}D[N].resource=L.storageTexture?k.viewForWriting:k.view}else J.Error('Texture "'.concat(B,'" could not be bound. entry=').concat(JSON.stringify(L),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"":t}))),50);else if(L.externalTexture){var V;if(V=i.textures[B]){if(this._engine.dbgSanityChecks&&null===V.texture){J.Error("Trying to bind a null external texture! entry=".concat(JSON.stringify(L),", name=").concat(B,", bindingInfo=").concat(JSON.stringify(V,(function(e,t){return"texture"===e?"":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var z=V.texture.underlyingResource;if(this._engine.dbgSanityChecks&&!z){J.Error("Trying to bind a null gpu external texture! entry=".concat(JSON.stringify(L),", name=").concat(B,", bindingInfo=").concat(JSON.stringify(V,(function(e,t){return"texture"===e?"":t})),", isReady=").concat(null===(p=V.texture)||void 0===p?void 0:p.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}D[N].resource=this._device.importExternalTexture({source:z})}else J.Error('Texture "'.concat(B,'" could not be bound. entry=').concat(JSON.stringify(L),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"":t}))),50)}else if(L.buffer){var G=n.buffers[B];if(G){var H=G.underlyingResource;D[N].resource.buffer=H,D[N].resource.size=G.capacity}else J.Error("Can't find buffer \"".concat(B,'". entry=').concat(JSON.stringify(L),", buffers=").concat(JSON.stringify(n.buffers),", drawContext.uniqueId=").concat(n.uniqueId),50)}}var j=O[w];f[w]=this._device.createBindGroup({layout:j,entries:D})}return f},e.NumBindGroupsCreatedTotal=0,e.NumBindGroupsCreatedLastFrame=0,e.NumBindGroupsLookupLastFrame=0,e.NumBindGroupsNoLookupLastFrame=0,e._Cache=new mf,e._NumBindGroupsCreatedCurrentFrame=0,e._NumBindGroupsLookupCurrentFrame=0,e._NumBindGroupsNoLookupCurrentFrame=0,e}();Vt.ShadersStore.clearQuadVertexShader="uniform float depthValue;const vec2 pos[4]={vec2(-1.0,1.0),\nvec2(1.0,1.0),\nvec2(-1.0,-1.0),\nvec2(1.0,-1.0)};\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\ngl_Position=vec4(pos[gl_VertexID],depthValue,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}\n",Vt.ShadersStore.clearQuadPixelShader="uniform vec4 color;void main() {gl_FragColor=color;}\n";var gf=function(){function e(e,t,n){this._bindGroups={},this._bundleCache={},this._keyTemp=[],this._device=e,this._engine=t,this._cacheRenderPipeline=new lf(this._device,n),this._cacheRenderPipeline.setDepthTestEnabled(!1),this._cacheRenderPipeline.setStencilReadMask(255),this._effect=t.createEffect("clearQuad",[],["color","depthValue"])}return e.prototype.setDepthStencilFormat=function(e){this._depthTextureFormat=e,this._cacheRenderPipeline.setDepthStencilFormat(e)},e.prototype.setColorFormat=function(e){this._cacheRenderPipeline.setColorFormat(e)},e.prototype.setMRTAttachments=function(e,t,n){this._cacheRenderPipeline.setMRT(t,n),this._cacheRenderPipeline.setMRTAttachments(e)},e.prototype.clear=function(e,t,n,i,r){var o,s,c;void 0===r&&(r=1);var l,u=null,h=!!this._engine._currentRenderTarget;if(e)c=e;else{var d=0;this._keyTemp.length=0;for(var p=0;p1?Math.pow(2,36):0)+f*Math.pow(2,37),l=this._keyTemp.join("_"),u=this._bundleCache[l])return u;c=this._device.createRenderBundleEncoder({colorFormats:this._cacheRenderPipeline.colorFormats,depthStencilFormat:this._depthTextureFormat,sampleCount:Qp.GetSample(r)})}this._cacheRenderPipeline.setDepthWriteEnabled(!!n),this._cacheRenderPipeline.setStencilEnabled(!!i&&!!this._depthTextureFormat&&Qp.HasStencilAspect(this._depthTextureFormat)),this._cacheRenderPipeline.setStencilWriteMask(i?255:0),this._cacheRenderPipeline.setStencilCompare(i?a.ALWAYS:a.NEVER),this._cacheRenderPipeline.setStencilPassOp(i?a.REPLACE:a.KEEP),this._cacheRenderPipeline.setWriteMask(t?15:0);var m=this._cacheRenderPipeline.getRenderPipeline(a.MATERIAL_TriangleStripDrawMode,this._effect,r),_=this._effect._pipelineContext;t&&this._effect.setDirectColor4("color",t),this._effect.setFloat("depthValue",this._engine.useReverseDepthBuffer?this._engine._clearReverseDepthValue:this._engine._clearDepthValue),_.uniformBuffer.update();var g=h?this._engine._ubInvertY:this._engine._ubDontInvertY,y=_.uniformBuffer.getBuffer(),v=y.uniqueId+"-"+g.uniqueId,b=this._bindGroups[v];if(!b){var T=_.bindGroupLayouts[0];(b=this._bindGroups[v]=[]).push(this._device.createBindGroup({layout:T[0],entries:[]})),Bp._SimplifiedKnownBindings||b.push(this._device.createBindGroup({layout:T[1],entries:[]})),b.push(this._device.createBindGroup({layout:T[Bp._SimplifiedKnownBindings?1:2],entries:[{binding:0,resource:{buffer:g.underlyingResource,size:g.capacity}},{binding:1,resource:{buffer:y.underlyingResource,size:y.capacity}}]}))}for(c.setPipeline(m),p=0;p=0&&(t._gpuFrameTimeCounter.fetchNewFrame(),t._gpuFrameTimeCounter.addCount(e,!0)),t._measureDurationState=0})))},e.prototype.startPass=function(e,t){this._enabled?this._measureDuration.startPass(e,t):e.timestampWrites=void 0},e.prototype.endPass=function(e,t){if(this._enabled&&t){var n=this._engine.frameId;this._measureDuration.stopPass(e).then((function(e){t._addDuration(n,null!==e&&e>0?e:0)}))}},e.prototype.dispose=function(){var e;null===(e=this._measureDuration)||void 0===e||e.dispose()},e}(),If=function(){function e(e,t,n,i,r){void 0===i&&(i=2),this._count=i,this._querySet=new Cf(e,i,Rp.Timestamp,t,n,!0,r)}return e.prototype.start=function(e){var t;null===(t=e.writeTimestamp)||void 0===t||t.call(e,this._querySet.querySet,0)},e.prototype.stop=function(e){var t;return X(this,void 0,void 0,(function(){return Y(this,(function(n){return null===(t=e.writeTimestamp)||void 0===t||t.call(e,this._querySet.querySet,1),[2,e.writeTimestamp?this._querySet.readTwoValuesAndSubtract(0):0]}))}))},e.prototype.startPass=function(e,t){if(t+3>this._count)throw new Error("WebGPUDurationMeasure: index out of range ("+t+")");e.timestampWrites={querySet:this._querySet.querySet,beginningOfPassWriteIndex:t+2,endOfPassWriteIndex:t+3}},e.prototype.stopPass=function(e){return X(this,void 0,void 0,(function(){return Y(this,(function(t){return[2,this._querySet.readTwoValuesAndSubtract(e+2)]}))}))},e.prototype.dispose=function(){this._querySet.dispose()},e}(),Rf=function(){function e(e,t,n,i,r){void 0===i&&(i=50),void 0===r&&(r=100),this._availableIndices=[],this._frameQuerySetIsDirty=-1,this._queryFrameId=[],this._engine=e,this._device=t,this._bufferManager=n,this._frameLastBuffer=-1,this._currentTotalIndices=0,this._countIncrement=r,this._allocateNewIndices(i)}return Object.defineProperty(e.prototype,"querySet",{get:function(){return this._querySet.querySet},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasQueries",{get:function(){return this._currentTotalIndices!==this._availableIndices.length},enumerable:!1,configurable:!0}),e.prototype.canBeginQuery=function(e){if(this._frameQuerySetIsDirty===this._engine.frameId||this._queryFrameId[e]===this._engine.frameId)return!1;var t=void 0!==this._engine._getCurrentRenderPassWrapper().renderPassDescriptor.occlusionQuerySet;return t&&(this._queryFrameId[e]=this._engine.frameId),t},e.prototype.createQuery=function(){0===this._availableIndices.length&&this._allocateNewIndices();var e=this._availableIndices[this._availableIndices.length-1];return this._availableIndices.length--,e},e.prototype.deleteQuery=function(e){this._availableIndices[this._availableIndices.length]=e},e.prototype.isQueryResultAvailable=function(e){return this._retrieveQueryBuffer(),!!this._lastBuffer&&e=this._allBundleLists.length)throw new Error("Invalid playBundleListIndex! Your snapshot is no longer valid for the current frame, you should recreate a new one. playBundleListIndex=".concat(this._playBundleListIndex,", allBundleLists.length=").concat(this._allBundleLists.length,"}"));t=this._allBundleLists[this._playBundleListIndex++]}return t.run(e),this._mode===a.SNAPSHOTRENDERING_FAST&&this._engine._reportDrawCall(t.numDrawCalls),!0},e.prototype.endFrame=function(){this._record&&(this._record=!1,this._play=!0,this._mode=this._modeSaved),this._playBundleListIndex=0},e.prototype.reset=function(){this.enabled=!1,this.enabled=!0},e}();Vt.ShadersStoreWGSL.postprocessVertexShader="attribute position: vec2;uniform scale: vec2;varying vUV: vec2;const madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvertexOutputs.vUV=(vertexInputs.position*madd+madd)*uniforms.scale;vertexOutputs.position=vec4(vertexInputs.position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}\n";var Mf={label:"TextureView_SwapChain_ResolveTarget",dimension:$d.E2d,format:void 0,mipLevelCount:1,arrayLayerCount:1},Df={label:"TextureView_SwapChain",dimension:$d.E2d,format:void 0,mipLevelCount:1,arrayLayerCount:1},Nf="/* disable_uniformity_analysis */",Lf=new U,Ff=function(e){function t(t,n){void 0===n&&(n={});var i,r,o=this;return(o=e.call(this,null,null===(i=n.antialias)||void 0===i||i,n)||this)._uploadEncoderDescriptor={label:"upload"},o._renderEncoderDescriptor={label:"render"},o._clearDepthValue=1,o._clearReverseDepthValue=0,o._clearStencilValue=0,o._defaultSampleCount=4,o._glslang=null,o._tintWASM=null,o._adapterInfo={vendor:"",architecture:"",device:"",description:""},o._timestampIndex=0,o._compiledComputeEffects={},o._counters={numEnableEffects:0,numEnableDrawWrapper:0,numBundleCreationNonCompatMode:0,numBundleReuseNonCompatMode:0},o.countersLastFrame={numEnableEffects:0,numEnableDrawWrapper:0,numBundleCreationNonCompatMode:0,numBundleReuseNonCompatMode:0},o.numMaxUncapturedErrors=20,o._commandBuffers=[null,null],o._currentRenderPass=null,o._mainRenderPassWrapper={renderPassDescriptor:null,colorAttachmentViewDescriptor:null,depthAttachmentViewDescriptor:null,colorAttachmentGPUTextures:[],depthTextureFormat:void 0},o._rttRenderPassWrapper={renderPassDescriptor:null,colorAttachmentViewDescriptor:null,depthAttachmentViewDescriptor:null,colorAttachmentGPUTextures:[],depthTextureFormat:void 0},o._pendingDebugCommands=[],o._currentOverrideVertexBuffers=null,o._currentIndexBuffer=null,o._colorWriteLocal=!0,o._forceEnableEffect=!1,o.dbgShowShaderCode=!1,o.dbgSanityChecks=!0,o.dbgVerboseLogsForFirstFrames=!1,o.dbgVerboseLogsNumFrames=10,o.dbgLogIfNotDrawWrapper=!0,o.dbgShowEmptyEnableEffectCalls=!0,o.isNDCHalfZRange=!0,o.hasOriginBottomLeft=!1,o._viewportsCurrent={x:0,y:0,w:0,h:0},o._scissorsCurrent={x:0,y:0,w:0,h:0},o._scissorCached={x:0,y:0,z:0,w:0},o._stencilRefsCurrent=-1,o._blendColorsCurrent=[null,null,null,null],o._name="WebGPU",n.deviceDescriptor=n.deviceDescriptor||{},n.enableGPUDebugMarkers=null!==(r=n.enableGPUDebugMarkers)&&void 0!==r&&r,J.Log("Babylon.js v".concat(Dr.Version," - ").concat(o.description," engine")),navigator.gpu?(n.swapChainFormat=n.swapChainFormat||navigator.gpu.getPreferredCanvasFormat(),o._isWebGPU=!0,o._shaderPlatformName="WEBGPU",o._renderingCanvas=t,o._options=n,o._mainPassSampleCount=n.antialias?o._defaultSampleCount:1,o._setupMobileChecks(),o._sharedInit(t),o._shaderProcessor=new Up,o._shaderProcessorWGSL=new Gp,o):(J.Error("WebGPU is not supported by your browser."),o)}return H(t,e),Object.defineProperty(t.prototype,"snapshotRenderingMode",{get:function(){return this._snapshotRendering.mode},set:function(e){this._snapshotRendering.mode=e},enumerable:!1,configurable:!0}),t.prototype.snapshotRenderingReset=function(){this._snapshotRendering.reset()},Object.defineProperty(t.prototype,"snapshotRendering",{get:function(){return this._snapshotRendering.enabled},set:function(e){this._snapshotRendering.enabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disableCacheSamplers",{get:function(){return!!this._cacheSampler&&this._cacheSampler.disabled},set:function(e){this._cacheSampler&&(this._cacheSampler.disabled=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disableCacheRenderPipelines",{get:function(){return!!this._cacheRenderPipeline&&this._cacheRenderPipeline.disabled},set:function(e){this._cacheRenderPipeline&&(this._cacheRenderPipeline.disabled=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disableCacheBindGroups",{get:function(){return!!this._cacheBindGroups&&this._cacheBindGroups.disabled},set:function(e){this._cacheBindGroups&&(this._cacheBindGroups.disabled=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsSupportedAsync",{get:function(){return navigator.gpu?navigator.gpu.requestAdapter().then((function(e){return!!e}),(function(){return!1})).catch((function(){return!1})):Promise.resolve(!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsSupported",{get:function(){return J.Warn("You must call IsSupportedAsync for WebGPU!"),!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsUniformBuffers",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportedExtensions",{get:function(){return this._adapterSupportedExtensions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enabledExtensions",{get:function(){return this._deviceEnabledExtensions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportedLimits",{get:function(){return this._adapterSupportedLimits},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentLimits",{get:function(){return this._deviceLimits},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this.name+this.version},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return 1},enumerable:!1,configurable:!0}),t.prototype.getInfo=function(){return{vendor:this._adapterInfo.vendor||"unknown vendor",renderer:this._adapterInfo.architecture||"unknown renderer",version:this._adapterInfo.description||"unknown version"}},Object.defineProperty(t.prototype,"compatibilityMode",{get:function(){return this._compatibilityMode},set:function(e){this._compatibilityMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableGPUTimingMeasurements",{get:function(){return this._timestampQuery.enable},set:function(e){this._timestampQuery.enable!==e&&(this.gpuTimeInFrameForMainPass=e?new Kl:void 0,this._timestampQuery.enable=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentSampleCount",{get:function(){return this._currentRenderTarget?this._currentRenderTarget.samples:this._mainPassSampleCount},enumerable:!1,configurable:!0}),t.CreateAsync=function(e,n){void 0===n&&(n={});var i=new t(e,n);return new Promise((function(e){i.initAsync(n.glslangOptions,n.twgslOptions).then((function(){return e(i)}))}))},t.prototype.initAsync=function(e,n){var i,r=this;return this._initGlslang(null!=e?e:null===(i=this._options)||void 0===i?void 0:i.glslangOptions).then((function(e){var i;return r._glslang=e,r._tintWASM=t.UseTWGSL?new Of:null,r._tintWASM?r._tintWASM.initTwgsl(null!=n?n:null===(i=r._options)||void 0===i?void 0:i.twgslOptions).then((function(){return navigator.gpu.requestAdapter(r._options)}),(function(e){throw J.Error("Can not initialize twgsl!"),J.Error(e),Error("WebGPU initializations stopped.")})):navigator.gpu.requestAdapter(r._options)}),(function(e){throw J.Error("Can not initialize glslang!"),J.Error(e),Error("WebGPU initializations stopped.")})).then((function(e){var t,n,i;if(e){r._adapter=e,r._adapterSupportedExtensions=[],null===(t=r._adapter.features)||void 0===t||t.forEach((function(e){return r._adapterSupportedExtensions.push(e)})),r._adapterSupportedLimits=r._adapter.limits,r._adapter.requestAdapterInfo().then((function(e){r._adapterInfo=e}));var o=null!==(n=r._options.deviceDescriptor)&&void 0!==n?n:{},a=null!==(i=null==o?void 0:o.requiredFeatures)&&void 0!==i?i:r._options.enableAllFeatures?r._adapterSupportedExtensions:void 0;if(a){for(var s=[],c=0,l=a;c=0||void 0,s3tc:this._deviceEnabledExtensions.indexOf(qd.TextureCompressionBC)>=0||void 0,pvrtc:null,etc1:null,etc2:this._deviceEnabledExtensions.indexOf(qd.TextureCompressionETC2)>=0||void 0,bptc:this._deviceEnabledExtensions.indexOf(qd.TextureCompressionBC)>=0||void 0,maxAnisotropy:16,uintIndices:!0,fragmentDepthSupported:!0,highPrecisionShaderSupported:!0,colorBufferFloat:!0,supportFloatTexturesResolve:!1,textureFloat:!0,textureFloatLinearFiltering:this._deviceEnabledExtensions.indexOf(qd.Float32Filterable)>=0,textureFloatRender:!0,textureHalfFloat:!0,textureHalfFloatLinearFiltering:!0,textureHalfFloatRender:!0,textureLOD:!0,texelFetch:!0,drawBuffersExtension:!0,depthTextureExtension:!0,vertexArrayObject:!1,instancedArrays:!0,timerQuery:"undefined"!=typeof BigUint64Array&&-1!==this._deviceEnabledExtensions.indexOf(qd.TimestampQuery)||void 0,supportOcclusionQuery:"undefined"!=typeof BigUint64Array,canUseTimestampForTimerQuery:!0,multiview:!1,oculusMultiview:!1,parallelShaderCompile:void 0,blendMinMax:!0,maxMSAASamples:4,canUseGLInstanceID:!0,canUseGLVertexID:!0,supportComputeShaders:!0,supportSRGBBuffers:!0,supportTransformFeedbacks:!1,textureMaxLevel:!0,texture2DArrayMaxLayerCount:this._deviceLimits.maxTextureArrayLayers,disableMorphTargetTexture:!1},this._caps.parallelShaderCompile=null,this._features={forceBitmapOverHTMLImageElement:!0,supportRenderAndCopyToLodForFloatTextures:!0,supportDepthStencilTexture:!0,supportShadowSamplers:!0,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:!0,trackUbosInFrame:!0,checkUbosContentBeforeUpload:!0,supportCSM:!0,basisNeedsPOT:!1,support3DTextures:!0,needTypeSuffixInShaderConstants:!0,supportMSAA:!0,supportSSAO2:!0,supportExtendedTextureFormats:!0,supportSwitchCaseInShader:!0,supportSyncTextureRead:!1,needsInvertingBitmap:!1,useUBOBindingCache:!1,needShaderCodeInlining:!0,needToAlwaysBindUniformBuffers:!0,supportRenderPasses:!0,supportSpriteInstancing:!0,forceVertexBufferStrideMultiple4Bytes:!0,_collectUbosUpdatedInFrame:!1}},t.prototype._initializeContextAndSwapChain=function(){if(!this._renderingCanvas)throw"The rendering canvas has not been set!";this._context=this._renderingCanvas.getContext("webgpu"),this._configureContext(),this._colorFormat=this._options.swapChainFormat,this._mainRenderPassWrapper.colorAttachmentGPUTextures=[new Hp],this._mainRenderPassWrapper.colorAttachmentGPUTextures[0].format=this._colorFormat,this._setColorFormat(this._mainRenderPassWrapper)},t.prototype._initializeMainAttachments=function(){if(this._bufferManager){this.flushFramebuffer(),this._mainTextureExtends={width:this.getRenderWidth(!0),height:this.getRenderHeight(!0),depthOrArrayLayers:1};var e,t=new Float32Array([this.getRenderHeight(!0)]);if(this._bufferManager.setSubData(this._ubInvertY,4,t),this._bufferManager.setSubData(this._ubDontInvertY,4,t),this._options.antialias){var n={label:"Texture_MainColor_".concat(this._mainTextureExtends.width,"x").concat(this._mainTextureExtends.height,"_antialiasing"),size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:$d.E2d,format:this._options.swapChainFormat,usage:Jd.RenderAttachment};this._mainTexture&&this._textureHelper.releaseTexture(this._mainTexture),this._mainTexture=this._device.createTexture(n),e=[{view:this._mainTexture.createView({label:"TextureView_MainColor_antialiasing",dimension:$d.E2d,format:this._options.swapChainFormat,mipLevelCount:1,arrayLayerCount:1}),clearValue:new U(0,0,0,1),loadOp:Pp.Clear,storeOp:Ip.Store}]}else e=[{view:void 0,clearValue:new U(0,0,0,1),loadOp:Pp.Clear,storeOp:Ip.Store}];this._mainRenderPassWrapper.depthTextureFormat=this.isStencilEnable?np.Depth24PlusStencil8:np.Depth32Float,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper);var i={label:"Texture_MainDepthStencil_".concat(this._mainTextureExtends.width,"x").concat(this._mainTextureExtends.height),size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:$d.E2d,format:this._mainRenderPassWrapper.depthTextureFormat,usage:Jd.RenderAttachment};this._depthTexture&&this._textureHelper.releaseTexture(this._depthTexture),this._depthTexture=this._device.createTexture(i);var r={view:this._depthTexture.createView({label:"TextureView_MainDepthStencil_".concat(this._mainTextureExtends.width,"x").concat(this._mainTextureExtends.height),dimension:$d.E2d,format:this._depthTexture.format,mipLevelCount:1,arrayLayerCount:1}),depthClearValue:this._clearDepthValue,depthLoadOp:Pp.Clear,depthStoreOp:Ip.Store,stencilClearValue:this._clearStencilValue,stencilLoadOp:this.isStencilEnable?Pp.Clear:void 0,stencilStoreOp:this.isStencilEnable?Ip.Store:void 0};this._mainRenderPassWrapper.renderPassDescriptor={label:"MainRenderPass",colorAttachments:e,depthStencilAttachment:r}}},t.prototype._configureContext=function(){this._context.configure({device:this._device,format:this._options.swapChainFormat,usage:Jd.RenderAttachment|Jd.CopySrc,alphaMode:this.premultipliedAlpha?Op.Premultiplied:Op.Opaque})},t.prototype.setSize=function(t,n,i){return void 0===i&&(i=!1),!!e.prototype.setSize.call(this,t,n,i)&&(this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count=0,r=t.indexOf(Nf)>=0,o=n===at.GLSL?this._compileRawShaderToSpirV(e,"vertex"):e,a=n===at.GLSL?this._compileRawShaderToSpirV(t,"fragment"):t;return this._createPipelineStageDescriptor(o,a,n,i,r)},t.prototype._compilePipelineStageDescriptor=function(e,t,n,i){this.onBeforeShaderCompilationObservable.notifyObservers(this);var r=e.indexOf(Nf)>=0,o=t.indexOf(Nf)>=0,a="#version 450\n",s=i===at.GLSL?this._compileShaderToSpirV(e,"vertex",n,a):this._getWGSLShader(e,"vertex",n),c=i===at.GLSL?this._compileShaderToSpirV(t,"fragment",n,a):this._getWGSLShader(t,"fragment",n),l=this._createPipelineStageDescriptor(s,c,i,r,o);return this.onAfterShaderCompilationObservable.notifyObservers(this),l},t.prototype.createRawShaderProgram=function(){throw"Not available on WebGPU"},t.prototype.createShaderProgram=function(){throw"Not available on WebGPU"},t.prototype.inlineShaderCode=function(e){var t=new Md(e);return t.debug=!1,t.processCode(),t.code},t.prototype.createPipelineContext=function(e){return new Lp(e,this)},t.prototype.createMaterialContext=function(){return new pf},t.prototype.createDrawContext=function(){return new ff(this._bufferManager)},t.prototype._preparePipelineContext=function(e,t,n,i,r,o,a,s){var c=e,l=c.shaderProcessingContext.shaderLanguage;this.dbgShowShaderCode&&(J.Log(["defines",s]),J.Log(t),J.Log(n),J.Log("***********************************************")),c.sources={fragment:n,vertex:t,rawVertex:r,rawFragment:o},c.stages=i?this._compileRawPipelineStageDescriptor(t,n,l):this._compilePipelineStageDescriptor(t,n,s,l)},t.prototype.getAttributes=function(e,t){for(var n=new Array(t.length),i=e,r=0;r0,l._cachedWrapU=a.TEXTURE_CLAMP_ADDRESSMODE,l._cachedWrapV=a.TEXTURE_CLAMP_ADDRESSMODE,l._useSRGBBuffer=c.useSRGBBuffer,l.label=c.label,this._internalTexturesCache.push(l),n||this._textureHelper.createGPUTextureForInternalTexture(l,u,h,d||1,c.creationFlags),l},t.prototype.createTexture=function(e,t,n,i,r,o,s,c,l,u,h,d,p,f,m){var _=this;return void 0===r&&(r=a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===s&&(s=null),void 0===c&&(c=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===h&&(h=null),this._createTextureBase(e,t,n,i,r,o,s,(function(e,t,n,i,r,o,s,c){var l,h=i;if(e.baseWidth=h.width,e.baseHeight=h.height,e.width=h.width,e.height=h.height,e.format=-1!==e.format?e.format:null!=u?u:a.TEXTUREFORMAT_RGBA,e.type=-1!==e.type?e.type:a.TEXTURETYPE_UNSIGNED_BYTE,c(e.width,e.height,h,t,e,(function(){})),null===(l=e._hardwareTexture)||void 0===l?void 0:l.underlyingResource)o||s||_._generateMipmaps(e,_._uploadEncoder);else{var d=_._textureHelper.createGPUTextureForInternalTexture(e,h.width,h.height,void 0,f);Qp.IsImageBitmap(h)&&(_._textureHelper.updateTexture(h,e,h.width,h.height,e.depth,d.format,0,0,r,!1,0,0),o||s||_._generateMipmaps(e,_._uploadEncoder))}n&&n.removePendingData(e),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}),(function(){return!1}),c,l,u,h,d,p,m)},t.prototype.wrapWebGPUTexture=function(e){var t=new Hp(e),n=new Xt(this,wt.Unknown,!0);return n._hardwareTexture=t,n.isReady=!0,n},t.prototype.wrapWebGLTexture=function(){throw new Error("wrapWebGLTexture is not supported, use wrapWebGPUTexture instead.")},t.prototype.generateMipMapsForCubemap=function(e){var t;e.generateMipMaps&&((null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource)||this._textureHelper.createGPUTextureForInternalTexture(e),this._generateMipmaps(e))},t.prototype.updateTextureSamplingMode=function(e,t,n){void 0===n&&(n=!1),n&&(t.generateMipMaps=!0,this._generateMipmaps(t)),t.samplingMode=e},t.prototype.updateTextureWrappingMode=function(e,t,n,i){void 0===n&&(n=null),void 0===i&&(i=null),null!==t&&(e._cachedWrapU=t),null!==n&&(e._cachedWrapV=n),(e.is2DArray||e.is3D)&&null!==i&&(e._cachedWrapR=i)},t.prototype.updateTextureDimensions=function(e,t,n,i){if(void 0===i&&(i=1),e._hardwareTexture&&(e.width!==t||e.height!==n||e.depth!==i)){var r=e._hardwareTexture.textureAdditionalUsages;e._hardwareTexture.release(),this._textureHelper.createGPUTextureForInternalTexture(e,t,n,i,r)}},t.prototype._setInternalTexture=function(e,t,n){if(n=null!=n?n:e,this._currentEffect){var i=this._currentEffect._pipelineContext.shaderProcessingContext.availableTextures[n];if(this._currentMaterialContext.setTexture(e,t),i&&i.autoBindSampler){var r=n+Np.AutoSamplerSuffix;this._currentMaterialContext.setSampler(r,t)}}},t.prototype.setTexture=function(e,t,n,i){this._setTexture(e,n,!1,!1,i,i)},t.prototype.setTextureArray=function(e,t,n,i){for(var r=0;r0;for(var r in e){var o=e[r],a=n[r],s=a.group,c=a.binding,l=o.type,u=o.object,h=o.indexInGroupEntries;switch((v=this._bindGroupEntries[s])||(v=this._bindGroupEntries[s]=[]),l){case Yl.Sampler:var d=u;void 0!==h&&i?v[h].resource=this._cacheSampler.getSampler(d):(o.indexInGroupEntries=v.length,v.push({binding:c,resource:this._cacheSampler.getSampler(d)}));break;case Yl.Texture:case Yl.TextureWithoutSampler:var p=(f=u)._texture._hardwareTexture;void 0!==h&&i?(l===Yl.Texture&&(v[h++].resource=this._cacheSampler.getSampler(f._texture)),v[h].resource=p.view):(o.indexInGroupEntries=v.length,l===Yl.Texture&&v.push({binding:c-1,resource:this._cacheSampler.getSampler(f._texture)}),v.push({binding:c,resource:p.view}));break;case Yl.StorageTexture:0==((p=(f=u)._texture._hardwareTexture).textureAdditionalUsages&Jd.StorageBinding)&&J.Error("computeDispatch: The texture (name=".concat(f.name,", uniqueId=").concat(f.uniqueId,") is not a storage texture!"),50),void 0!==h&&i?v[h].resource=p.viewForWriting:(o.indexInGroupEntries=v.length,v.push({binding:c,resource:p.viewForWriting}));break;case Yl.ExternalTexture:var f,m=(f=u).underlyingResource;void 0!==h&&i?v[h].resource=this._device.importExternalTexture({source:m}):(o.indexInGroupEntries=v.length,v.push({binding:c,resource:this._device.importExternalTexture({source:m})}));break;case Yl.UniformBuffer:case Yl.StorageBuffer:var _=(Yl.UniformBuffer,u).getBuffer(),g=_.underlyingResource;void 0!==h&&i?(v[h].resource.buffer=g,v[h].resource.size=_.capacity):(o.indexInGroupEntries=v.length,v.push({binding:c,resource:{buffer:g,offset:0,size:_.capacity}}))}}for(var y=0;y0&&u.dispatchWorkgroups(i,r,o),u.end(),s&&(this._timestampQuery.endPass(this._timestampIndex,s),this._timestampIndex+=2)},Ff.prototype.releaseComputeEffects=function(){for(var e in this._compiledComputeEffects){var t=this._compiledComputeEffects[e].getPipelineContext();this._deleteComputePipelineContext(t)}this._compiledComputeEffects={}},Ff.prototype._prepareComputePipelineContext=function(e,t,n,i,r){var o=e;this.dbgShowShaderCode&&(J.Log(i),J.Log(t)),o.sources={compute:t,rawCompute:n},o.stage=this._createComputePipelineStageDescriptor(t,i,r)},Ff.prototype._releaseComputeEffect=function(e){this._compiledComputeEffects[e._key]&&(delete this._compiledComputeEffects[e._key],this._deleteComputePipelineContext(e.getPipelineContext()))},Ff.prototype._rebuildComputeEffects=function(){for(var e in this._compiledComputeEffects){var t=this._compiledComputeEffects[e];t._pipelineContext=null,t._wasPreviouslyReady=!1,t._prepareEffect()}},Ff.prototype._deleteComputePipelineContext=function(e){e&&e.dispose()},Ff.prototype._createComputePipelineStageDescriptor=function(e,t,n){return t=t?"//"+t.split("\n").join("\n//")+"\n":"",{module:this._device.createShaderModule({code:t+e}),entryPoint:n}},Ff.prototype._createDepthStencilCubeTexture=function(e,t){var n=new Xt(this,wt.DepthStencil);n.isCube=!0;var i=j({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,samples:1},t);return n.format=i.generateStencil?a.TEXTUREFORMAT_DEPTH24_STENCIL8:a.TEXTUREFORMAT_DEPTH32_FLOAT,this._setupDepthStencilTexture(n,e,i.generateStencil,i.bilinearFiltering,i.comparisonFunction,i.samples),this._textureHelper.createGPUTextureForInternalTexture(n),this._internalTexturesCache.push(n),n},Ff.prototype.createCubeTexture=function(e,t,n,i,r,o,a,s,c,l,u,h,d){var p=this;return void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===c&&(c=!1),void 0===l&&(l=0),void 0===u&&(u=0),void 0===h&&(h=null),void 0===d&&(d=!1),this.createCubeTextureBase(e,t,n,!!i,r,o,a,s,c,l,u,h,null,(function(e,t){var n=t,o=n[0].width,s=o;p._setCubeMapTextureParams(e,!i),e.format=null!=a?a:-1;var c=p._textureHelper.createGPUTextureForInternalTexture(e,o,s);p._textureHelper.updateCubeTextures(n,c.underlyingResource,o,s,c.format,!1,!1,0,0),i||p._generateMipmaps(e,p._uploadEncoder),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),r&&r()}),!!d)},Ff.prototype._setCubeMapTextureParams=function(e,t,n){e.samplingMode=t?a.TEXTURE_TRILINEAR_SAMPLINGMODE:a.TEXTURE_BILINEAR_SAMPLINGMODE,e._cachedWrapU=a.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=a.TEXTURE_CLAMP_ADDRESSMODE,n&&(e._maxLodLevel=n)},Ff.prototype._debugPushGroup=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?this._renderEncoder.pushDebugGroup(e):this._currentRenderPass?this._currentRenderPass.pushDebugGroup(e):this._pendingDebugCommands.push(["push",e]))},Ff.prototype._debugPopGroup=function(e){this._options.enableGPUDebugMarkers&&(0===e||1===e?this._renderEncoder.popDebugGroup():this._currentRenderPass?this._currentRenderPass.popDebugGroup():this._pendingDebugCommands.push(["pop",null]))},Ff.prototype._debugInsertMarker=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?this._renderEncoder.insertDebugMarker(e):this._currentRenderPass?this._currentRenderPass.insertDebugMarker(e):this._pendingDebugCommands.push(["insert",e]))},Ff.prototype._debugFlushPendingCommands=function(){for(var e=0;e>y,b=[],T=0;T<6;T++){var E=m[y][g[T]];h&&(E=zf(E,v,v,r)),b.push(new Uint8Array(E.buffer,E.byteOffset,E.byteLength))}p._textureHelper.updateCubeTextures(b,_.underlyingResource,v,v,_.format,d,!1,0,0)}else{for(b=[],T=0;T<6;T++)b.push(o[u[T]]);p.updateRawCubeTexture(f,b,i,r,d)}f.isReady=!0,null==t||t.removePendingData(f),l&&l()}}(e)}),void 0,null==t?void 0:t.offlineProvider,!0,(function(e,n){null==t||t.removePendingData(f),u&&e&&u(e.status+" "+e.statusText,n)})),f},Ff.prototype.createRawTexture3D=function(e,t,n,i,r,o,s,c,l,u,h){void 0===l&&(l=null),void 0===u&&(u=a.TEXTURETYPE_UNSIGNED_INT),void 0===h&&(h=0);var d=wt.Raw3D,p=new Xt(this,d);return p.baseWidth=t,p.baseHeight=n,p.baseDepth=i,p.width=t,p.height=n,p.depth=i,p.format=r,p.type=u,p.generateMipMaps=o,p.samplingMode=c,p.is3D=!0,this._doNotHandleContextLost||(p._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(p,t,n,void 0,h),this.updateRawTexture3D(p,e,r,s,l,u),this._internalTexturesCache.push(p),p},Ff.prototype.updateRawTexture3D=function(e,t,n,i,r,o){if(void 0===r&&(r=null),void 0===o&&(o=a.TEXTURETYPE_UNSIGNED_INT),this._doNotHandleContextLost||(e._bufferView=t,e.format=n,e.invertY=i,e._compression=r),t){var s=e._hardwareTexture;n===a.TEXTUREFORMAT_RGB&&(t=zf(t,e.width,e.height,o));var c=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(c,e,e.width,e.height,e.depth,s.format,0,0,i,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0},Ff.prototype.createRawTexture2DArray=function(e,t,n,i,r,o,s,c,l,u,h){void 0===l&&(l=null),void 0===u&&(u=a.TEXTURETYPE_UNSIGNED_INT),void 0===h&&(h=0);var d=wt.Raw2DArray,p=new Xt(this,d);return p.baseWidth=t,p.baseHeight=n,p.baseDepth=i,p.width=t,p.height=n,p.depth=i,p.format=r,p.type=u,p.generateMipMaps=o,p.samplingMode=c,p.is2DArray=!0,this._doNotHandleContextLost||(p._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(p,t,n,i,h),this.updateRawTexture2DArray(p,e,r,s,l,u),this._internalTexturesCache.push(p),p},Ff.prototype.updateRawTexture2DArray=function(e,t,n,i,r,o){if(void 0===r&&(r=null),void 0===o&&(o=a.TEXTURETYPE_UNSIGNED_INT),this._doNotHandleContextLost||(e._bufferView=t,e.format=n,e.invertY=i,e._compression=r),t){var s=e._hardwareTexture;n===a.TEXTUREFORMAT_RGB&&(t=zf(t,e.width,e.height,o));var c=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(c,e,e.width,e.height,e.depth,s.format,0,0,i,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0},Ff.prototype._readTexturePixels=function(e,t,n,i,r,o,a,s,c,l){void 0===i&&(i=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===c&&(c=0),void 0===l&&(l=0);var u=e._hardwareTexture;return a&&this.flushFramebuffer(),this._textureHelper.readPixels(u.underlyingResource,c,l,t,n,u.format,i,r,o,s)},Ff.prototype._readTexturePixelsSync=function(){throw"_readTexturePixelsSync is unsupported in WebGPU!"};var Gf=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,i,r,o)||this;return r.enableGPUTimingMeasurements&&(a.gpuTimeInFrame=new Kl),a}return H(t,e),t}(wa);Ff.prototype._createHardwareRenderTargetWrapper=function(e,t,n){var i=new Gf(e,t,n,this);return this._renderTargetWrapperCache.push(i),i},Ff.prototype.createRenderTargetTexture=function(e,t){var n,i,r,o=this._createHardwareRenderTargetWrapper(!1,!1,e),s={};void 0!==t&&"object"==typeof t?(s.generateMipMaps=t.generateMipMaps,s.generateDepthBuffer=void 0===t.generateDepthBuffer||t.generateDepthBuffer,s.generateStencilBuffer=s.generateDepthBuffer&&t.generateStencilBuffer,s.samplingMode=void 0===t.samplingMode?a.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,s.creationFlags=null!==(n=t.creationFlags)&&void 0!==n?n:0,s.noColorAttachment=!!t.noColorAttachment,s.samples=t.samples,s.label=t.label):(s.generateMipMaps=t,s.generateDepthBuffer=!0,s.generateStencilBuffer=!1,s.samplingMode=a.TEXTURE_TRILINEAR_SAMPLINGMODE,s.creationFlags=0,s.noColorAttachment=!1);var c=s.noColorAttachment?null:this._createInternalTexture(e,t,!0,wt.RenderTarget);return o.label=null!==(i=s.label)&&void 0!==i?i:"RenderTargetWrapper",o._samples=null!==(r=s.samples)&&void 0!==r?r:1,o._generateDepthBuffer=s.generateDepthBuffer,o._generateStencilBuffer=!!s.generateStencilBuffer,o.setTextures(c),(o._generateDepthBuffer||o._generateStencilBuffer)&&o.createDepthStencilTexture(0,!1,o._generateStencilBuffer,o.samples,s.generateStencilBuffer?a.TEXTUREFORMAT_DEPTH24_STENCIL8:a.TEXTUREFORMAT_DEPTH32_FLOAT,s.label?s.label+"-DepthStencil":void 0),c&&(void 0!==t&&"object"==typeof t&&t.createMipMaps&&!s.generateMipMaps&&(c.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(c,void 0,void 0,void 0,s.creationFlags),void 0!==t&&"object"==typeof t&&t.createMipMaps&&!s.generateMipMaps&&(c.generateMipMaps=!1)),o},Ff.prototype._createDepthStencilTexture=function(e,t){var n=new Xt(this,wt.DepthStencil);n.label=t.label;var i=j({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,samples:1,depthTextureFormat:t.generateStencil?a.TEXTUREFORMAT_DEPTH24_STENCIL8:a.TEXTUREFORMAT_DEPTH32_FLOAT},t);n.format=i.depthTextureFormat,this._setupDepthStencilTexture(n,e,i.generateStencil,i.bilinearFiltering,i.comparisonFunction,i.samples),this._textureHelper.createGPUTextureForInternalTexture(n);var r=n._hardwareTexture;return n.type=Qp.GetTextureTypeFromFormat(r.format),this._internalTexturesCache.push(n),n},Ff.prototype._setupDepthStencilTexture=function(e,t,n,i,r,o){void 0===o&&(o=1);var s=t.width||t,c=t.height||t,l=t.layers||0;e.baseWidth=s,e.baseHeight=c,e.width=s,e.height=c,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=i?a.TEXTURE_BILINEAR_SAMPLINGMODE:a.TEXTURE_NEAREST_SAMPLINGMODE,e.type=a.TEXTURETYPE_FLOAT,e._comparisonFunction=r,e._cachedWrapU=a.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=a.TEXTURE_CLAMP_ADDRESSMODE},Ff.prototype.updateRenderTargetTextureSampleCount=function(e,t){return e&&e.texture&&e.samples!==t?(t=Math.min(t,this.getCaps().maxMSAASamples),this._textureHelper.createMSAATexture(e.texture,t),e._depthStencilTexture&&(this._textureHelper.createMSAATexture(e._depthStencilTexture,t),e._depthStencilTexture.samples=t),e._samples=t,e.texture.samples=t,t):t},Ff.prototype.createRenderTargetCubeTexture=function(e,t){var n,i=this._createHardwareRenderTargetWrapper(!1,!0,e),r=j({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:a.TEXTURETYPE_UNSIGNED_INT,samplingMode:a.TEXTURE_TRILINEAR_SAMPLINGMODE,format:a.TEXTUREFORMAT_RGBA,samples:1},t);r.generateStencilBuffer=r.generateDepthBuffer&&r.generateStencilBuffer,i.label=null!==(n=r.label)&&void 0!==n?n:"RenderTargetWrapper",i._generateDepthBuffer=r.generateDepthBuffer,i._generateStencilBuffer=r.generateStencilBuffer;var o=new Xt(this,wt.RenderTarget);return o.width=e,o.height=e,o.depth=0,o.isReady=!0,o.isCube=!0,o.samples=r.samples,o.generateMipMaps=r.generateMipMaps,o.samplingMode=r.samplingMode,o.type=r.type,o.format=r.format,this._internalTexturesCache.push(o),i.setTextures(o),(i._generateDepthBuffer||i._generateStencilBuffer)&&i.createDepthStencilTexture(0,void 0===r.samplingMode||r.samplingMode===a.TEXTURE_BILINEAR_SAMPLINGMODE||r.samplingMode===a.TEXTURE_LINEAR_LINEAR||r.samplingMode===a.TEXTURE_TRILINEAR_SAMPLINGMODE||r.samplingMode===a.TEXTURE_LINEAR_LINEAR_MIPLINEAR||r.samplingMode===a.TEXTURE_NEAREST_LINEAR_MIPNEAREST||r.samplingMode===a.TEXTURE_NEAREST_LINEAR_MIPLINEAR||r.samplingMode===a.TEXTURE_NEAREST_LINEAR||r.samplingMode===a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,i._generateStencilBuffer,i.samples),t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(o),t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!1),i},zt.prototype.setTextureSampler=function(e,t){this._engine.setTextureSampler(e,t)},Ff.prototype.setTextureSampler=function(e,t){var n;null===(n=this._currentMaterialContext)||void 0===n||n.setSampler(e,t)},zt.prototype.setStorageBuffer=function(e,t){this._engine.setStorageBuffer(e,t)},Ff.prototype.createStorageBuffer=function(e,t,n){return this._createBuffer(e,t|a.BUFFER_CREATIONFLAG_STORAGE,n)},Ff.prototype.updateStorageBuffer=function(e,t,n,i){var r,o=e;void 0===n&&(n=0),void 0===i?i=(r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t).byteLength:r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t,this._bufferManager.setSubData(o,n,r,0,i)},Ff.prototype.readFromStorageBuffer=function(e,t,n,i,r){var o=this;n=n||e.capacity;var a=this._bufferManager.createRawBuffer(n,Qd.MapRead|Qd.CopyDst,void 0,"TempReadFromStorageBuffer");return this._renderEncoder.copyBufferToBuffer(e.underlyingResource,null!=t?t:0,a,0,n),new Promise((function(e,t){var s=function(){a.mapAsync(Zd.Read,0,n).then((function(){var t=a.getMappedRange(0,n),r=i;if(void 0===r)(r=new Uint8Array(n)).set(new Uint8Array(t));else{var s=r.constructor;(r=new s(r.buffer)).set(new s(t))}a.unmap(),o._bufferManager.releaseBuffer(a),e(r)}),(function(n){o.isDisposed?e(new Uint8Array):t(n)}))};r?(o.flushFramebuffer(),s()):o.onEndFrameObservable.addOnce((function(){s()}))}))},Ff.prototype.setStorageBuffer=function(e,t){var n,i;null===(n=this._currentDrawContext)||void 0===n||n.setBuffer(e,null!==(i=null==t?void 0:t.getBuffer())&&void 0!==i?i:null)},Ff.prototype.createUniformBuffer=function(e,t){var n;return n=e instanceof Array?new Float32Array(e):e,this._bufferManager.createBuffer(n,Qd.Uniform|Qd.CopyDst,t)},Ff.prototype.createDynamicUniformBuffer=function(e,t){return this.createUniformBuffer(e,t)},Ff.prototype.updateUniformBuffer=function(e,t,n,i){void 0===n&&(n=0);var r,o=e;void 0===i?i=(r=t instanceof Float32Array?t:new Float32Array(t)).byteLength:r=t instanceof Float32Array?t:new Float32Array(t),this._bufferManager.setSubData(o,n,r,0,i)},Ff.prototype.bindUniformBufferBase=function(e,t,n){this._currentDrawContext.setBuffer(n,e)},Ff.prototype.bindUniformBlock=function(){},Ff.prototype.updateVideoTexture=function(e,t,n){var i,r=this;if(e&&!e._isDisabled){void 0===this._videoTextureSupported&&(this._videoTextureSupported=!0);var o=e._hardwareTexture;(null===(i=e._hardwareTexture)||void 0===i?void 0:i.underlyingResource)||(o=this._textureHelper.createGPUTextureForInternalTexture(e)),function(e){return!(!e||void 0===e.underlyingResource)}(t)?(this._textureHelper.copyVideoToTexture(t,e,o.format,!n),e.generateMipMaps&&this._generateMipmaps(e),e.isReady=!0):t&&this.createImageBitmap(t).then((function(t){r._textureHelper.updateTexture(t,e,e.width,e.height,e.depth,o.format,0,0,!n,!1,0,0),e.generateMipMaps&&r._generateMipmaps(e),e.isReady=!0})).catch((function(){e.isReady=!0}))}};var Hf=function(){function e(){}return e.CreateAsync=function(e,t){return X(this,void 0,void 0,(function(){return Y(this,(function(n){switch(n.label){case 0:return[4,Ff.IsSupportedAsync];case 1:return n.sent()?[2,Ff.CreateAsync(e,t)]:Dr.IsSupported?[2,new Dr(e,void 0,t)]:[2,new Vh(t)]}}))}))},e}(),jf=function(){function e(){}return e.COPY=1,e.CUT=2,e.PASTE=3,e}(),Wf=function(){function e(e,t){this.type=e,this.event=t}return e.GetTypeFromCharacter=function(e){switch(e){case 67:return jf.COPY;case 86:return jf.PASTE;case 88:return jf.CUT;default:return-1}},e}(),Xf=function(e){function t(n,i,r,o,a,s,c){var l;void 0===i&&(i=B.Gray()),void 0===r&&(r=au.DefaultUtilityLayer),void 0===o&&(o=null),void 0===a&&(a=1),void 0===s&&(s=B.Yellow()),void 0===c&&(c=B.Gray());var h,d,p,f,m,_,g,y=this;(y=e.call(this,r)||this)._pointerObserver=null,y.snapDistance=0,y.onSnapObservable=new u,y.uniformScaling=!1,y.sensitivity=1,y.dragScale=1,y.incrementalSnap=!1,y._isEnabled=!0,y._parent=null,y._dragging=!1,y._tmpVector=new C(0,0,0),y._incrementalStartupValue=C.Zero(),y._parent=o,y._coloredMaterial=new ml("",r.utilityLayerScene),y._coloredMaterial.diffuseColor=i,y._coloredMaterial.specularColor=i.subtract(new B(.1,.1,.1)),y._hoverMaterial=new ml("",r.utilityLayerScene),y._hoverMaterial.diffuseColor=s,y._disableMaterial=new ml("",r.utilityLayerScene),y._disableMaterial.diffuseColor=c,y._disableMaterial.alpha=.4,y._gizmoMesh=new no("axis",r.utilityLayerScene);var v=(l=y._createGizmoMesh(y._gizmoMesh,a)).arrowMesh,b=l.arrowTail,T=y._createGizmoMesh(y._gizmoMesh,a+4,!0);y._gizmoMesh.lookAt(y._rootMesh.position.add(n)),y._rootMesh.addChild(y._gizmoMesh,cu.PreserveScaling),y._gizmoMesh.scaling.scaleInPlace(1/3);var E=v.position.clone(),A=b.position.clone(),x=b.scaling.clone(),S=function(e){var t=e*(3/y._rootMesh.scaling.length())*6;v.position.z+=t/3.5,b.scaling.y+=t,y.dragScale=b.scaling.y,b.position.z=v.position.z/2},P=function(){v.position.set(E.x,E.y,E.z),b.position.set(A.x,A.y,A.z),b.scaling.set(x.x,x.y,x.z),y.dragScale=b.scaling.y,y._dragging=!1};y.dragBehavior=new Vo({dragAxis:n}),y.dragBehavior.moveAttached=!1,y.dragBehavior.updateDragPlane=!1,y._rootMesh.addBehavior(y.dragBehavior);var I=0,O=0,M={snapDistance:0};y.dragBehavior.onDragObservable.add((function(e){if(y.attachedNode){var i=y.sensitivity*e.dragDistance*(3*y.scaleRatio/y._rootMesh.scaling.length()),r=y._tmpVector,o=!1,a=0;if(y.uniformScaling?r.setAll(.57735):r.copyFrom(n),0==y.snapDistance)r.scaleToRef(i,r);else{I+=i,O+=i;var s=y.incrementalSnap?O:I;Math.abs(s)>y.snapDistance?(a=Math.floor(Math.abs(s)/y.snapDistance),s<0&&(a*=-1),I%=y.snapDistance,r.scaleToRef(y.snapDistance*a,r),o=!0):r.scaleInPlace(0)}r.addInPlaceFromFloats(1,1,1),r.x=Math.abs(r.x)0&&y.incrementalSnap?(y.attachedNode.getWorldMatrix().decompose(void 0,w.Quaternion[0],w.Vector3[2],cu.PreserveScaling?c:void 0),r.addInPlace(y._incrementalStartupValue),r.addInPlaceFromFloats(-1,-1,-1),r.x=Math.abs(r.x)*(y._incrementalStartupValue.x>0?1:-1),r.y=Math.abs(r.y)*(y._incrementalStartupValue.y>0?1:-1),r.z=Math.abs(r.z)*(y._incrementalStartupValue.z>0?1:-1),R.ComposeToRef(r,w.Quaternion[0],w.Vector3[2],w.Matrix[1])):(R.ScalingToRef(r.x,r.y,r.z,w.Matrix[2]),w.Matrix[2].multiplyToRef(y.attachedNode.getWorldMatrix(),w.Matrix[1])),w.Matrix[1].decompose(w.Vector3[1],void 0,void 0,cu.PreserveScaling?c:void 0);var l=1e5;Math.abs(w.Vector3[1].x)0){var h=Math.floor(Math.abs(s)/i.rotationSnapDistance)*(s<0?-1:1),d=i.rotationSnapDistance*h;u=d-c,c=d}e>=8?I.RotationYawPitchRollToRef(0,0,u,i._tmpQuaternion):e>=4?I.RotationYawPitchRollToRef(u,0,0,i._tmpQuaternion):I.RotationYawPitchRollToRef(0,u,0,i._tmpQuaternion),i.attachedMesh.isUsingPivotMatrix()&&i._anchorMesh.position.copyFrom(i.attachedMesh.position),i._anchorMesh.addChild(i.attachedMesh),i._anchorMesh.getScene().useRightHandedSystem&&i._tmpQuaternion.conjugateInPlace(),i._tmpQuaternion.normalize(),i._anchorMesh.rotationQuaternion.multiplyToRef(i._tmpQuaternion,i._anchorMesh.rotationQuaternion),i._anchorMesh.rotationQuaternion.normalize(),i._anchorMesh.removeChild(i.attachedMesh),i.attachedMesh.setParent(n)}i.updateBoundingBox(),Lo._RestorePivotPoint(i.attachedMesh)}i._updateDummy()})),r.onDragStartObservable.add((function(){i.onDragStartObservable.notifyObservers({}),i._selectNode(t)})),r.onDragEndObservable.add((function(e){i.onRotationSphereDragEndObservable.notifyObservers({}),i._selectNode(null),i._updateDummy(),i._unhoverMeshOnTouchUp(e.pointerInfo,t)})),a._rotateSpheresParent.addChild(t)},a=this,s=0;s<12;s++)o(s);for(i._rootMesh.addChild(i._rotateSpheresParent),i._scaleBoxesParent=new kr("",n.utilityLayerScene),i._scaleBoxesParent.rotationQuaternion=new I,s=0;s<3;s++)for(var c=0;c<3;c++)for(var l=function(e){var t=(1===s?1:0)+(1===c?1:0)+(1===e?1:0);if(1===t||3===t)return"continue";var r=mu("",{size:1},n.utilityLayerScene);r.material=h._coloredMaterial,r._internalMetadata=2===t,r.isNearGrabbable=!0;var o=new C(s-1,c-1,e-1).normalize(),a=new Vo({dragAxis:o});a.updateDragPlane=!1,a.moveAttached=!1;var l=0,u=0;r.addBehavior(a),a.onDragObservable.add((function(e){if(i.onScaleBoxDragObservable.notifyObservers({}),i.attachedMesh){var n=i.attachedMesh.parent;if(n&&n.scaling&&n.scaling.isNonUniformWithinEpsilon(.001))return void J.Warn("BoundingBoxGizmo controls are not supported on child meshes with non-uniform parent scaling");Lo._RemoveAndStorePivotPoint(i.attachedMesh);var a=e.dragDistance/i._boundingDimensions.length()*i._anchorMesh.scaling.length();if(l+=a,i.scalingSnapDistance>0){var s=Math.floor(Math.abs(l)/i.scalingSnapDistance)*(l<0?-1:1),c=i.scalingSnapDistance*s;a=c-u,u=c}var h=new C(a,a,a);2===t&&(h.x*=Math.abs(o.x),h.y*=Math.abs(o.y),h.z*=Math.abs(o.z)),h.scaleInPlace(i._scaleDragSpeed),h.multiplyInPlace(i._axisFactor),i.updateBoundingBox(),i.scalePivot?(i.attachedMesh.getWorldMatrix().getRotationMatrixToRef(i._tmpRotationMatrix),i._boundingDimensions.scaleToRef(.5,i._tmpVector),C.TransformCoordinatesToRef(i._tmpVector,i._tmpRotationMatrix,i._tmpVector),i._anchorMesh.position.subtractInPlace(i._tmpVector),i._boundingDimensions.multiplyToRef(i.scalePivot,i._tmpVector),C.TransformCoordinatesToRef(i._tmpVector,i._tmpRotationMatrix,i._tmpVector),i._anchorMesh.position.addInPlace(i._tmpVector)):(r.absolutePosition.subtractToRef(i._anchorMesh.position,i._tmpVector),i._anchorMesh.position.subtractInPlace(i._tmpVector),i.attachedMesh.isUsingPivotMatrix()&&i._anchorMesh.position.subtractInPlace(i.attachedMesh.getPivotPoint())),i._anchorMesh.addChild(i.attachedMesh),i._anchorMesh.scaling.addInPlace(h),(i._anchorMesh.scaling.x<0||i._anchorMesh.scaling.y<0||i._anchorMesh.scaling.z<0)&&i._anchorMesh.scaling.subtractInPlace(h),i._anchorMesh.removeChild(i.attachedMesh),i.attachedMesh.setParent(n),Lo._RestorePivotPoint(i.attachedMesh)}i._updateDummy()})),a.onDragStartObservable.add((function(){i.onDragStartObservable.notifyObservers({}),i._selectNode(r),l=0,u=0})),a.onDragEndObservable.add((function(e){i.onScaleBoxDragEndObservable.notifyObservers({}),i._selectNode(null),i._updateDummy(),i._unhoverMeshOnTouchUp(e.pointerInfo,r)})),h._scaleBoxesParent.addChild(r)},h=this,d=0;d<3;d++)l(d);i._rootMesh.addChild(i._scaleBoxesParent);var p=[];return i._pointerObserver=n.utilityLayerScene.onPointerObservable.add((function(e){p[e.event.pointerId]?e.pickInfo&&e.pickInfo.pickedMesh!=p[e.event.pointerId]&&(p[e.event.pointerId].material=i._coloredMaterial,delete p[e.event.pointerId],i._isHovered=!1):i._rotateSpheresParent.getChildMeshes().concat(i._scaleBoxesParent.getChildMeshes()).forEach((function(t){e.pickInfo&&e.pickInfo.pickedMesh==t&&(p[e.event.pointerId]=t,t.material=i._hoverColoredMaterial,i._isHovered=!0)}))})),i._renderObserver=i.gizmoLayer.originalScene.onBeforeRenderObservable.add((function(){i.attachedMesh&&!i._existingMeshScale.equals(i.attachedMesh.scaling)?i.updateBoundingBox():(i.fixedDragMeshScreenSize||i.fixedDragMeshBoundsSize)&&(i._updateRotationSpheres(),i._updateScaleBoxes()),i._dragMesh&&i.attachedMesh&&i._pointerDragBehavior.dragging&&(i._lineBoundingBox.position.rotateByQuaternionToRef(i._rootMesh.rotationQuaternion,i._tmpVector),i.attachedMesh.setAbsolutePosition(i._dragMesh.position.add(i._tmpVector.scale(-1))))})),i.updateBoundingBox(),i}return H(t,e),Object.defineProperty(t.prototype,"axisFactor",{get:function(){return this._axisFactor},set:function(e){this._axisFactor=e;for(var t=this._scaleBoxesParent.getChildMeshes(),n=0,i=0;i<3;i++)for(var r=0;r<3;r++)for(var o=0;o<3;o++){var a=(1===i?1:0)+(1===r?1:0)+(1===o?1:0);if(1!==a&&3!==a){if(t[n]){var s=new C(i-1,r-1,o-1);s.multiplyInPlace(this._axisFactor),t[n].setEnabled(s.lengthSquared()>m)}n++}}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleDragSpeed",{get:function(){return this._scaleDragSpeed},set:function(e){this._scaleDragSpeed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"coloredMaterial",{get:function(){return this._coloredMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hoverMaterial",{get:function(){return this._hoverColoredMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pointerDragBehavior",{get:function(){return this._pointerDragBehavior},enumerable:!1,configurable:!0}),t.prototype.setColor=function(e){this._coloredMaterial.emissiveColor=e,this._hoverColoredMaterial.emissiveColor=e.clone().add(new B(.3,.3,.3)),this._lineBoundingBox.getChildren().forEach((function(t){t.color&&(t.color=e)}))},t.prototype._attachedNodeChanged=function(e){var t=this;if(e){this._anchorMesh.scaling.setAll(1),Lo._RemoveAndStorePivotPoint(e);var n=e.parent;this._anchorMesh.addChild(e),this._anchorMesh.removeChild(e),e.setParent(n),Lo._RestorePivotPoint(e),this.updateBoundingBox(),e.getChildMeshes(!1).forEach((function(e){e.markAsDirty("scaling")})),this.gizmoLayer.utilityLayerScene.onAfterRenderObservable.addOnce((function(){t._updateDummy()}))}},t.prototype._selectNode=function(e){this._rotateSpheresParent.getChildMeshes().concat(this._scaleBoxesParent.getChildMeshes()).forEach((function(t){t.isVisible=!e||t==e}))},t.prototype._unhoverMeshOnTouchUp=function(e,t){(null==e?void 0:e.event)instanceof PointerEvent&&"touch"===(null==e?void 0:e.event.pointerType)&&(t.material=this._coloredMaterial)},t.prototype.getScaleBoxes=function(){return this._scaleBoxesParent.getChildMeshes()},t.prototype.updateBoundingBox=function(){if(this.attachedMesh){Lo._RemoveAndStorePivotPoint(this.attachedMesh);var e=this.attachedMesh.parent;this.attachedMesh.setParent(null),this._update(),this.attachedMesh.rotationQuaternion||(this.attachedMesh.rotationQuaternion=I.RotationYawPitchRoll(this.attachedMesh.rotation.y,this.attachedMesh.rotation.x,this.attachedMesh.rotation.z)),this._anchorMesh.rotationQuaternion||(this._anchorMesh.rotationQuaternion=I.RotationYawPitchRoll(this._anchorMesh.rotation.y,this._anchorMesh.rotation.x,this._anchorMesh.rotation.z)),this._anchorMesh.rotationQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpVector.copyFrom(this.attachedMesh.position),this.attachedMesh.rotationQuaternion.set(0,0,0,1),this.attachedMesh.position.set(0,0,0);var t=this.attachedMesh.getHierarchyBoundingVectors(!this.ignoreChildren,this.includeChildPredicate);t.max.subtractToRef(t.min,this._boundingDimensions),this._lineBoundingBox.scaling.copyFrom(this._boundingDimensions),this._lineBoundingBox.position.set((t.max.x+t.min.x)/2,(t.max.y+t.min.y)/2,(t.max.z+t.min.z)/2),this._rotateSpheresParent.position.copyFrom(this._lineBoundingBox.position),this._scaleBoxesParent.position.copyFrom(this._lineBoundingBox.position),this._lineBoundingBox.computeWorldMatrix(),this._anchorMesh.position.copyFrom(this._lineBoundingBox.absolutePosition),this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion),this.attachedMesh.position.copyFrom(this._tmpVector),this.attachedMesh.setParent(e)}this._updateRotationSpheres(),this._updateScaleBoxes(),this.attachedMesh&&(this._existingMeshScale.copyFrom(this.attachedMesh.scaling),Lo._RestorePivotPoint(this.attachedMesh))},t.prototype._updateRotationSpheres=function(){for(var e=this._rotateSpheresParent.getChildMeshes(),t=0;t<3;t++)for(var n=0;n<2;n++)for(var i=0;i<2;i++){var r=4*t+2*n+i;if(0==t&&(e[r].position.set(this._boundingDimensions.x/2,this._boundingDimensions.y*n,this._boundingDimensions.z*i),e[r].position.addInPlace(new C(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[r].lookAt(C.Cross(e[r].position.normalizeToNew(),C.Right()).normalizeToNew().add(e[r].position))),1==t&&(e[r].position.set(this._boundingDimensions.x*n,this._boundingDimensions.y/2,this._boundingDimensions.z*i),e[r].position.addInPlace(new C(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[r].lookAt(C.Cross(e[r].position.normalizeToNew(),C.Up()).normalizeToNew().add(e[r].position))),2==t&&(e[r].position.set(this._boundingDimensions.x*n,this._boundingDimensions.y*i,this._boundingDimensions.z/2),e[r].position.addInPlace(new C(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[r].lookAt(C.Cross(e[r].position.normalizeToNew(),C.Forward()).normalizeToNew().add(e[r].position))),this.fixedDragMeshScreenSize&&this.gizmoLayer.utilityLayerScene.activeCamera){e[r].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);var o=this.rotationSphereSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;e[r].scaling.set(o,o,o)}else this.fixedDragMeshBoundsSize?e[r].scaling.set(this.rotationSphereSize*this._boundingDimensions.x,this.rotationSphereSize*this._boundingDimensions.y,this.rotationSphereSize*this._boundingDimensions.z):e[r].scaling.set(this.rotationSphereSize,this.rotationSphereSize,this.rotationSphereSize)}},t.prototype._updateScaleBoxes=function(){for(var e=this._scaleBoxesParent.getChildMeshes(),t=0,n=0;n<3;n++)for(var i=0;i<3;i++)for(var r=0;r<3;r++){var o=(1===n?1:0)+(1===i?1:0)+(1===r?1:0);if(1!==o&&3!==o){if(e[t])if(e[t].position.set(this._boundingDimensions.x*(n/2),this._boundingDimensions.y*(i/2),this._boundingDimensions.z*(r/2)),e[t].position.addInPlace(new C(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),this.fixedDragMeshScreenSize&&this.gizmoLayer.utilityLayerScene.activeCamera){e[t].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);var a=this.scaleBoxSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;e[t].scaling.set(a,a,a)}else this.fixedDragMeshBoundsSize?e[t].scaling.set(this.scaleBoxSize*this._boundingDimensions.x,this.scaleBoxSize*this._boundingDimensions.y,this.scaleBoxSize*this._boundingDimensions.z):e[t].scaling.set(this.scaleBoxSize,this.scaleBoxSize,this.scaleBoxSize);t++}}},t.prototype.setEnabledRotationAxis=function(e){this._rotateSpheresParent.getChildMeshes().forEach((function(t,n){n<4?t.setEnabled(-1!=e.indexOf("x")):n<8?t.setEnabled(-1!=e.indexOf("y")):t.setEnabled(-1!=e.indexOf("z"))}))},t.prototype.setEnabledScaling=function(e,t){void 0===t&&(t=!1),this._scaleBoxesParent.getChildMeshes().forEach((function(n){var i=e;t&&!0===n._internalMetadata&&(i=!1),n.setEnabled(i)}))},t.prototype._updateDummy=function(){this._dragMesh&&(this._dragMesh.position.copyFrom(this._lineBoundingBox.getAbsolutePosition()),this._dragMesh.scaling.copyFrom(this._lineBoundingBox.scaling),this._dragMesh.rotationQuaternion.copyFrom(this._rootMesh.rotationQuaternion))},t.prototype.enableDragBehavior=function(){this._dragMesh=mu("dummy",{size:1},this.gizmoLayer.utilityLayerScene),this._dragMesh.visibility=0,this._dragMesh.rotationQuaternion=new I,this._pointerDragBehavior.useObjectOrientationForDragging=!1,this._dragMesh.addBehavior(this._pointerDragBehavior)},t.prototype.dispose=function(){this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.gizmoLayer.originalScene.onBeforeRenderObservable.remove(this._renderObserver),this._lineBoundingBox.dispose(),this._rotateSpheresParent.dispose(),this._scaleBoxesParent.dispose(),this._dragMesh&&this._dragMesh.dispose(),e.prototype.dispose.call(this)},t.MakeNotPickableAndWrapInBoundingBox=function(e){var t=function(e){e.isPickable=!1,e.getChildMeshes().forEach((function(e){t(e)}))};t(e),e.rotationQuaternion||(e.rotationQuaternion=I.RotationYawPitchRoll(e.rotation.y,e.rotation.x,e.rotation.z));var n=e.position.clone(),i=e.rotationQuaternion.clone();e.rotationQuaternion.set(0,0,0,1),e.position.set(0,0,0);var r=mu("box",{size:1},e.getScene()),o=e.getHierarchyBoundingVectors();return o.max.subtractToRef(o.min,r.scaling),0===r.scaling.y&&(r.scaling.y=m),0===r.scaling.x&&(r.scaling.x=m),0===r.scaling.z&&(r.scaling.z=m),r.position.set((o.max.x+o.min.x)/2,(o.max.y+o.min.y)/2,(o.max.z+o.min.z)/2),e.addChild(r),e.rotationQuaternion.copyFrom(i),e.position.copyFrom(n),e.removeChild(r),r.addChild(e),r.visibility=0,r},t.prototype.setCustomMesh=function(){J.Error("Custom meshes are not supported on this gizmo")},t}(cu),qf=function(e){function t(n,i,r,o,a,s,c,l,h){var d;void 0===i&&(i=B.Gray()),void 0===r&&(r=au.DefaultUtilityLayer),void 0===o&&(o=32),void 0===a&&(a=null),void 0===s&&(s=!1),void 0===c&&(c=1),void 0===l&&(l=B.Yellow()),void 0===h&&(h=B.Gray());var p,f=this;(f=e.call(this,r)||this)._pointerObserver=null,f.snapDistance=0,f.onSnapObservable=new u,f.angle=0,f.sensitivity=1,f._isEnabled=!0,f._parent=null,f._dragging=!1,f._angles=new C,f._parent=a,f._coloredMaterial=new ml("",r.utilityLayerScene),f._coloredMaterial.diffuseColor=i,f._coloredMaterial.specularColor=i.subtract(new B(.1,.1,.1)),f._hoverMaterial=new ml("",r.utilityLayerScene),f._hoverMaterial.diffuseColor=l,f._hoverMaterial.specularColor=l,f._disableMaterial=new ml("",r.utilityLayerScene),f._disableMaterial.diffuseColor=h,f._disableMaterial.alpha=.4,f._gizmoMesh=new no("",r.utilityLayerScene);var _=(d=f._createGizmoMesh(f._gizmoMesh,c,o)).rotationMesh,g=d.collider;f._rotationDisplayPlane=Bo("rotationDisplay",{size:.6,updatable:!1},f.gizmoLayer.utilityLayerScene),f._rotationDisplayPlane.rotation.z=.5*Math.PI,f._rotationDisplayPlane.parent=f._gizmoMesh,f._rotationDisplayPlane.setEnabled(!1),zt.ShadersStore.rotationGizmoVertexShader=t._RotationGizmoVertexShader,zt.ShadersStore.rotationGizmoFragmentShader=t._RotationGizmoFragmentShader,f._rotationShaderMaterial=new ku("shader",f.gizmoLayer.utilityLayerScene,{vertex:"rotationGizmo",fragment:"rotationGizmo"},{attributes:["position","uv"],uniforms:["worldViewProjection","angles","rotationColor"]}),f._rotationShaderMaterial.backFaceCulling=!1,f.rotationColor=l,f._rotationDisplayPlane.material=f._rotationShaderMaterial,f._rotationDisplayPlane.visibility=.999,f._gizmoMesh.lookAt(f._rootMesh.position.add(n)),f._rootMesh.addChild(f._gizmoMesh,cu.PreserveScaling),f._gizmoMesh.scaling.scaleInPlace(1/3),f.dragBehavior=new Vo({dragPlaneNormal:n}),f.dragBehavior.moveAttached=!1,f.dragBehavior.maxDragAngle=t.MaxDragAngle,f.dragBehavior._useAlternatePickedPointAboveMaxDragAngle=!0,f._rootMesh.addBehavior(f.dragBehavior);var y=new C,v=new R,b=new C,T=new C;f.dragBehavior.onDragStartObservable.add((function(e){f.attachedNode&&(y.copyFrom(e.dragPlanePoint),f._rotationDisplayPlane.setEnabled(!0),f._rotationDisplayPlane.getWorldMatrix().invertToRef(v),C.TransformCoordinatesToRef(e.dragPlanePoint,v,y),f._angles.x=Math.atan2(y.y,y.x)+Math.PI,f._angles.y=0,f._angles.z=f.updateGizmoRotationToMatchAttachedMesh?1:0,f._dragging=!0,y.copyFrom(e.dragPlanePoint),f._rotationShaderMaterial.setVector3("angles",f._angles),f.angle=0)})),f.dragBehavior.onDragEndObservable.add((function(){f._dragging=!1,f._rotationDisplayPlane.setEnabled(!1)}));var E={snapDistance:0},A=0,x=new R,S=new I;f.dragBehavior.onDragObservable.add((function(e){if(f.attachedNode){var t=new C(1,1,1),i=new I(0,0,0,1),o=new C(0,0,0);if(f.attachedNode.getWorldMatrix().decompose(t,i,o),!(Math.abs(Math.abs(t.x)-Math.abs(t.y))<=m&&Math.abs(Math.abs(t.x)-Math.abs(t.z))<=m)&&f.updateGizmoRotationToMatchAttachedMesh)return void J.Warn("Unable to use a rotation gizmo matching mesh rotation with non uniform scaling. Use uniform scaling or set updateGizmoRotationToMatchAttachedMesh to false.");i.normalize();var a=f.updateGizmoPositionToMatchAttachedMesh?o:f._rootMesh.absolutePosition,s=e.dragPlanePoint.subtract(a).normalize(),c=y.subtract(a).normalize(),l=C.Cross(s,c),u=C.Dot(s,c),h=Math.atan2(l.length(),u)*f.sensitivity;b.copyFrom(n),T.copyFrom(n),f.updateGizmoRotationToMatchAttachedMesh&&(i.toRotationMatrix(v),T=C.TransformCoordinates(b,v));var d=!1;if(r.utilityLayerScene.activeCamera){var p=r.utilityLayerScene.activeCamera.position.subtract(a).normalize();C.Dot(p,T)>0&&(b.scaleInPlace(-1),T.scaleInPlace(-1),d=!0)}C.Dot(T,l)>0&&(h=-h),w.Vector3[0].set(h,0,0),f.dragBehavior.validateDrag(w.Vector3[0])||(h=0);var _=!1;if(0!=f.snapDistance)if(A+=h,Math.abs(A)>f.snapDistance){var g=Math.floor(Math.abs(A)/f.snapDistance);A<0&&(g*=-1),A%=f.snapDistance,h=f.snapDistance*g,_=!0}else h=0;var P=Math.sin(h/2);if(S.set(b.x*P,b.y*P,b.z*P,Math.cos(h/2)),x.determinant()>0){var O=new C;S.toEulerAnglesToRef(O),I.RotationYawPitchRollToRef(O.y,-O.x,-O.z,S)}if(f.updateGizmoRotationToMatchAttachedMesh)i.multiplyToRef(S,i),i.normalize(),R.ComposeToRef(t,i,o,f.attachedNode.getWorldMatrix());else{S.toRotationMatrix(w.Matrix[0]);var M=f.attachedNode.getWorldMatrix().getTranslation();f.attachedNode.getWorldMatrix().multiplyToRef(w.Matrix[0],f.attachedNode.getWorldMatrix()),f.attachedNode.getWorldMatrix().setTranslation(M)}y.copyFrom(e.dragPlanePoint),_&&(E.snapDistance=h,f.onSnapObservable.notifyObservers(E)),f._angles.y+=h,f.angle+=d?-h:h,f._rotationShaderMaterial.setVector3("angles",f._angles),f._matrixChanged()}}));var P=r._getSharedGizmoLight();P.includedOnlyMeshes=P.includedOnlyMeshes.concat(f._rootMesh.getChildMeshes(!1));var O={colliderMeshes:[g],gizmoMeshes:[_],material:f._coloredMaterial,hoverMaterial:f._hoverMaterial,disableMaterial:f._disableMaterial,active:!1,dragBehavior:f.dragBehavior};return null===(p=f._parent)||void 0===p||p.addToAxisCache(f._gizmoMesh,O),f._pointerObserver=r.utilityLayerScene.onPointerObservable.add((function(e){var n;if(!f._customMeshSet&&(f.dragBehavior.maxDragAngle=t.MaxDragAngle,f._isHovered=!(-1==O.colliderMeshes.indexOf(null===(n=null==e?void 0:e.pickInfo)||void 0===n?void 0:n.pickedMesh)),!f._parent)){var i=O.dragBehavior.enabled?f._isHovered||f._dragging?f._hoverMaterial:f._coloredMaterial:f._disableMaterial;f._setGizmoMeshMaterial(O.gizmoMeshes,i)}})),f.dragBehavior.onEnabledObservable.add((function(e){f._setGizmoMeshMaterial(O.gizmoMeshes,e?f._coloredMaterial:f._disableMaterial)})),f}return H(t,e),Object.defineProperty(t.prototype,"coloredMaterial",{get:function(){return this._coloredMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hoverMaterial",{get:function(){return this._hoverMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationColor",{set:function(e){this._rotationShaderMaterial.setColor3("rotationColor",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disableMaterial",{get:function(){return this._disableMaterial},enumerable:!1,configurable:!0}),t.prototype._createGizmoMesh=function(e,t,n){var i=Ul("ignore",{diameter:.6,thickness:.03*t,tessellation:n},this.gizmoLayer.utilityLayerScene);i.visibility=0;var r=Ul("",{diameter:.6,thickness:.005*t,tessellation:n},this.gizmoLayer.utilityLayerScene);return r.material=this._coloredMaterial,r.rotation.x=Math.PI/2,i.rotation.x=Math.PI/2,e.addChild(r,cu.PreserveScaling),e.addChild(i,cu.PreserveScaling),{rotationMesh:r,collider:i}},t.prototype._attachedNodeChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e,e?this._parent&&(this.attachedMesh=this._parent.attachedMesh):this.attachedMesh=null},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),this._gizmoMesh&&this._gizmoMesh.dispose(),this._rotationDisplayPlane&&this._rotationDisplayPlane.dispose(),this._rotationShaderMaterial&&this._rotationShaderMaterial.dispose(),[this._coloredMaterial,this._hoverMaterial,this._disableMaterial].forEach((function(e){e&&e.dispose()})),e.prototype.dispose.call(this)},t.MaxDragAngle=9*Math.PI/20,t._RotationGizmoVertexShader="\n precision highp float;\n attribute vec3 position;\n attribute vec2 uv;\n uniform mat4 worldViewProjection;\n varying vec3 vPosition;\n varying vec2 vUV;\n\n void main(void) {\n gl_Position = worldViewProjection * vec4(position, 1.0);\n vUV = uv;\n }",t._RotationGizmoFragmentShader="\n precision highp float;\n varying vec2 vUV;\n varying vec3 vPosition;\n uniform vec3 angles;\n uniform vec3 rotationColor;\n\n #define twopi 6.283185307\n\n void main(void) {\n vec2 uv = vUV - vec2(0.5);\n float angle = atan(uv.y, uv.x) + 3.141592;\n float delta = gl_FrontFacing ? angles.y : -angles.y;\n float begin = angles.x - delta * angles.z;\n float start = (begin < (begin + delta)) ? begin : (begin + delta);\n float end = (begin > (begin + delta)) ? begin : (begin + delta);\n float len = sqrt(dot(uv,uv));\n float opacity = 1. - step(0.5, len);\n\n float base = abs(floor(start / twopi)) * twopi;\n start += base;\n end += base;\n\n float intensity = 0.;\n for (int i = 0; i < 5; i++)\n {\n intensity += max(step(start, angle) - step(end, angle), 0.);\n angle += twopi;\n }\n gl_FragColor = vec4(rotationColor, min(intensity * 0.25, 0.8)) * opacity;\n }\n ",t}(cu),Kf=function(e){function t(t,n,i,r,o,a){void 0===t&&(t=au.DefaultUtilityLayer),void 0===n&&(n=32),void 0===i&&(i=!1),void 0===r&&(r=1);var s=e.call(this,t)||this;s.onDragStartObservable=new u,s.onDragObservable=new u,s.onDragEndObservable=new u,s._observables=[],s._sensitivity=1,s._gizmoAxisCache=new Map;var c=a&&a.xOptions&&a.xOptions.color?a.xOptions.color:B.Red().scale(.5),l=a&&a.yOptions&&a.yOptions.color?a.yOptions.color:B.Green().scale(.5),h=a&&a.zOptions&&a.zOptions.color?a.zOptions.color:B.Blue().scale(.5);return s.xGizmo=new qf(new C(1,0,0),c,t,n,s,i,r),s.yGizmo=new qf(new C(0,1,0),l,t,n,s,i,r),s.zGizmo=new qf(new C(0,0,1),h,t,n,s,i,r),[s.xGizmo,s.yGizmo,s.zGizmo].forEach((function(e){a&&null!=a.updateScale&&(e.updateScale=a.updateScale),e.dragBehavior.onDragStartObservable.add((function(){s.onDragStartObservable.notifyObservers({})})),e.dragBehavior.onDragObservable.add((function(){s.onDragObservable.notifyObservers({})})),e.dragBehavior.onDragEndObservable.add((function(){s.onDragEndObservable.notifyObservers({})}))})),s.attachedMesh=null,s.attachedNode=null,o?o.addToAxisCache(s._gizmoAxisCache):cu.GizmoAxisPointerObserver(t,s._gizmoAxisCache),s}return H(t,e),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this._meshAttached},set:function(e){this._meshAttached=e,this._nodeAttached=e,this._checkBillboardTransform(),[this.xGizmo,this.yGizmo,this.zGizmo].forEach((function(t){t.isEnabled?t.attachedMesh=e:t.attachedMesh=null}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attachedNode",{get:function(){return this._nodeAttached},set:function(e){this._meshAttached=null,this._nodeAttached=e,this._checkBillboardTransform(),[this.xGizmo,this.yGizmo,this.zGizmo].forEach((function(t){t.isEnabled?t.attachedNode=e:t.attachedNode=null}))},enumerable:!1,configurable:!0}),t.prototype._checkBillboardTransform=function(){this._nodeAttached&&this._nodeAttached.billboardMode&&J.Log("Rotation Gizmo will not work with transforms in billboard mode.")},Object.defineProperty(t.prototype,"sensitivity",{get:function(){return this._sensitivity},set:function(e){this._sensitivity=e,[this.xGizmo,this.yGizmo,this.zGizmo].forEach((function(t){t&&(t.sensitivity=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isHovered",{get:function(){return this.xGizmo.isHovered||this.yGizmo.isHovered||this.zGizmo.isHovered},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this.xGizmo.updateGizmoRotationToMatchAttachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.yGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.zGizmo.updateGizmoRotationToMatchAttachedMesh=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoPositionToMatchAttachedMesh",{get:function(){return this.xGizmo.updateGizmoPositionToMatchAttachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.updateGizmoPositionToMatchAttachedMesh=e,this.yGizmo.updateGizmoPositionToMatchAttachedMesh=e,this.zGizmo.updateGizmoPositionToMatchAttachedMesh=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"anchorPoint",{get:function(){return this._anchorPoint},set:function(e){this._anchorPoint=e,[this.xGizmo,this.yGizmo,this.zGizmo].forEach((function(t){t.anchorPoint=e}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"coordinatesMode",{set:function(e){[this.xGizmo,this.yGizmo,this.zGizmo].forEach((function(t){t.coordinatesMode=e}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateScale",{get:function(){return this.xGizmo.updateScale},set:function(e){this.xGizmo&&(this.xGizmo.updateScale=e,this.yGizmo.updateScale=e,this.zGizmo.updateScale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this.xGizmo.snapDistance},set:function(e){this.xGizmo&&(this.xGizmo.snapDistance=e,this.yGizmo.snapDistance=e,this.zGizmo.snapDistance=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this.xGizmo.scaleRatio},set:function(e){this.xGizmo&&(this.xGizmo.scaleRatio=e,this.yGizmo.scaleRatio=e,this.zGizmo.scaleRatio=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customRotationQuaternion",{get:function(){return this._customRotationQuaternion},set:function(e){this._customRotationQuaternion=e,[this.xGizmo,this.yGizmo,this.zGizmo].forEach((function(t){t&&(t.customRotationQuaternion=e)}))},enumerable:!1,configurable:!0}),t.prototype.addToAxisCache=function(e,t){this._gizmoAxisCache.set(e,t)},t.prototype.dispose=function(){var e=this;this.xGizmo.dispose(),this.yGizmo.dispose(),this.zGizmo.dispose(),this.onDragStartObservable.clear(),this.onDragObservable.clear(),this.onDragEndObservable.clear(),this._observables.forEach((function(t){e.gizmoLayer.utilityLayerScene.onPointerObservable.remove(t)}))},t.prototype.setCustomMesh=function(){J.Error("Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo)")},t}(cu),Qf=function(e){function t(n,i,r,o,a,s){void 0===i&&(i=B.Gray()),void 0===r&&(r=au.DefaultUtilityLayer),void 0===o&&(o=null),void 0===a&&(a=B.Yellow()),void 0===s&&(s=B.Gray());var c,l=this;(l=e.call(this,r)||this)._pointerObserver=null,l.snapDistance=0,l.onSnapObservable=new u,l._isEnabled=!1,l._parent=null,l._dragging=!1,l._parent=o,l._coloredMaterial=new ml("",r.utilityLayerScene),l._coloredMaterial.diffuseColor=i,l._coloredMaterial.specularColor=i.subtract(new B(.1,.1,.1)),l._hoverMaterial=new ml("",r.utilityLayerScene),l._hoverMaterial.diffuseColor=a,l._disableMaterial=new ml("",r.utilityLayerScene),l._disableMaterial.diffuseColor=s,l._disableMaterial.alpha=.4,l._gizmoMesh=t._CreatePlane(r.utilityLayerScene,l._coloredMaterial),l._gizmoMesh.lookAt(l._rootMesh.position.add(n)),l._gizmoMesh.scaling.scaleInPlace(1/3),l._gizmoMesh.parent=l._rootMesh;var h=0,d=new C,p={snapDistance:0};l.dragBehavior=new Vo({dragPlaneNormal:n}),l.dragBehavior.moveAttached=!1,l._rootMesh.addBehavior(l.dragBehavior),l.dragBehavior.onDragObservable.add((function(e){if(l.attachedNode){if(0==l.snapDistance)l.attachedNode.getWorldMatrix().getTranslationToRef(w.Vector3[0]),w.Vector3[0].addToRef(e.delta,w.Vector3[0]),l.dragBehavior.validateDrag(w.Vector3[0])&&l.attachedNode.getWorldMatrix().addTranslationFromFloats(e.delta.x,e.delta.y,e.delta.z);else if(h+=e.dragDistance,Math.abs(h)>l.snapDistance){var t=Math.floor(Math.abs(h)/l.snapDistance);h%=l.snapDistance,e.delta.normalizeToRef(d),d.scaleInPlace(l.snapDistance*t),l.attachedNode.getWorldMatrix().getTranslationToRef(w.Vector3[0]),w.Vector3[0].addToRef(d,w.Vector3[0]),l.dragBehavior.validateDrag(w.Vector3[0])&&(l.attachedNode.getWorldMatrix().addTranslationFromFloats(d.x,d.y,d.z),p.snapDistance=l.snapDistance*t,l.onSnapObservable.notifyObservers(p))}l._matrixChanged()}})),l.dragBehavior.onDragStartObservable.add((function(){l._dragging=!0})),l.dragBehavior.onDragEndObservable.add((function(){l._dragging=!1}));var f=r._getSharedGizmoLight();f.includedOnlyMeshes=f.includedOnlyMeshes.concat(l._rootMesh.getChildMeshes(!1));var m={gizmoMeshes:l._gizmoMesh.getChildMeshes(),colliderMeshes:l._gizmoMesh.getChildMeshes(),material:l._coloredMaterial,hoverMaterial:l._hoverMaterial,disableMaterial:l._disableMaterial,active:!1,dragBehavior:l.dragBehavior};return null===(c=l._parent)||void 0===c||c.addToAxisCache(l._gizmoMesh,m),l._pointerObserver=r.utilityLayerScene.onPointerObservable.add((function(e){var t;if(!l._customMeshSet&&(l._isHovered=!(-1==m.colliderMeshes.indexOf(null===(t=null==e?void 0:e.pickInfo)||void 0===t?void 0:t.pickedMesh)),!l._parent)){var n=m.dragBehavior.enabled?l._isHovered||l._dragging?l._hoverMaterial:l._coloredMaterial:l._disableMaterial;l._setGizmoMeshMaterial(m.gizmoMeshes,n)}})),l.dragBehavior.onEnabledObservable.add((function(e){l._setGizmoMeshMaterial(m.gizmoMeshes,e?l._coloredMaterial:l._disableMaterial)})),l}return H(t,e),Object.defineProperty(t.prototype,"coloredMaterial",{get:function(){return this._coloredMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hoverMaterial",{get:function(){return this._hoverMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disableMaterial",{get:function(){return this._disableMaterial},enumerable:!1,configurable:!0}),t._CreatePlane=function(e,t){var n=new Lr("plane",e),i=Bo("dragPlane",{width:.1375,height:.1375,sideOrientation:2},e);return i.material=t,i.parent=n,n},t.prototype._attachedNodeChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e,e?this._parent&&(this.attachedNode=this._parent.attachedNode):this.attachedNode=null},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),e.prototype.dispose.call(this),this._gizmoMesh&&this._gizmoMesh.dispose(),[this._coloredMaterial,this._hoverMaterial,this._disableMaterial].forEach((function(e){e&&e.dispose()}))},t}(cu),Zf=function(e){function t(t,n,i){void 0===t&&(t=au.DefaultUtilityLayer),void 0===n&&(n=1);var r=e.call(this,t)||this;return r._meshAttached=null,r._nodeAttached=null,r._observables=[],r._gizmoAxisCache=new Map,r.onDragStartObservable=new u,r.onDragObservable=new u,r.onDragEndObservable=new u,r._planarGizmoEnabled=!1,r.xGizmo=new lu(new C(1,0,0),B.Red().scale(.5),t,r,n),r.yGizmo=new lu(new C(0,1,0),B.Green().scale(.5),t,r,n),r.zGizmo=new lu(new C(0,0,1),B.Blue().scale(.5),t,r,n),r.xPlaneGizmo=new Qf(new C(1,0,0),B.Red().scale(.5),r.gizmoLayer,r),r.yPlaneGizmo=new Qf(new C(0,1,0),B.Green().scale(.5),r.gizmoLayer,r),r.zPlaneGizmo=new Qf(new C(0,0,1),B.Blue().scale(.5),r.gizmoLayer,r),[r.xGizmo,r.yGizmo,r.zGizmo,r.xPlaneGizmo,r.yPlaneGizmo,r.zPlaneGizmo].forEach((function(e){e.dragBehavior.onDragStartObservable.add((function(){r.onDragStartObservable.notifyObservers({})})),e.dragBehavior.onDragObservable.add((function(){r.onDragObservable.notifyObservers({})})),e.dragBehavior.onDragEndObservable.add((function(){r.onDragEndObservable.notifyObservers({})}))})),r.attachedMesh=null,i?i.addToAxisCache(r._gizmoAxisCache):cu.GizmoAxisPointerObserver(t,r._gizmoAxisCache),r}return H(t,e),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this._meshAttached},set:function(e){this._meshAttached=e,this._nodeAttached=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(t){t.isEnabled?t.attachedMesh=e:t.attachedMesh=null}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attachedNode",{get:function(){return this._nodeAttached},set:function(e){this._meshAttached=null,this._nodeAttached=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(t){t.isEnabled?t.attachedNode=e:t.attachedNode=null}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isHovered",{get:function(){return this.xGizmo.isHovered||this.yGizmo.isHovered||this.zGizmo.isHovered||this.xPlaneGizmo.isHovered||this.yPlaneGizmo.isHovered||this.zPlaneGizmo.isHovered},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"planarGizmoEnabled",{get:function(){return this._planarGizmoEnabled},set:function(e){var t=this;this._planarGizmoEnabled=e,[this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(n){n&&(n.isEnabled=e,e&&(n.attachedMesh?n.attachedMesh=t.attachedMesh:n.attachedNode=t.attachedNode))}),this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customRotationQuaternion",{get:function(){return this._customRotationQuaternion},set:function(e){this._customRotationQuaternion=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(t){t&&(t.customRotationQuaternion=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this._updateGizmoRotationToMatchAttachedMesh},set:function(e){this._updateGizmoRotationToMatchAttachedMesh=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(t){t&&(t.updateGizmoRotationToMatchAttachedMesh=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoPositionToMatchAttachedMesh",{get:function(){return this._updateGizmoPositionToMatchAttachedMesh},set:function(e){this._updateGizmoPositionToMatchAttachedMesh=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(t){t&&(t.updateGizmoPositionToMatchAttachedMesh=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"anchorPoint",{get:function(){return this._anchorPoint},set:function(e){this._anchorPoint=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(t){t.anchorPoint=e}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"coordinatesMode",{set:function(e){[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(t){t.coordinatesMode=e}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateScale",{get:function(){return this.xGizmo.updateScale},set:function(e){this.xGizmo&&(this.xGizmo.updateScale=e,this.yGizmo.updateScale=e,this.zGizmo.updateScale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this._snapDistance},set:function(e){this._snapDistance=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(t){t&&(t.snapDistance=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this._scaleRatio},set:function(e){this._scaleRatio=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(t){t&&(t.scaleRatio=e)}))},enumerable:!1,configurable:!0}),t.prototype.addToAxisCache=function(e,t){this._gizmoAxisCache.set(e,t)},t.prototype.dispose=function(){var e=this;[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach((function(e){e&&e.dispose()})),this._observables.forEach((function(t){e.gizmoLayer.utilityLayerScene.onPointerObservable.remove(t)})),this.onDragStartObservable.clear(),this.onDragObservable.clear(),this.onDragEndObservable.clear()},t.prototype.setCustomMesh=function(){J.Error("Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo,gizmo.xPlaneGizmo, gizmo.yPlaneGizmo, gizmo.zPlaneGizmo)")},t}(cu),$f=function(e){function t(t,n,i){void 0===t&&(t=au.DefaultUtilityLayer),void 0===n&&(n=1);var r=e.call(this,t)||this;return r._meshAttached=null,r._nodeAttached=null,r._incrementalSnap=!1,r._sensitivity=1,r._observables=[],r._gizmoAxisCache=new Map,r.onDragStartObservable=new u,r.onDragObservable=new u,r.onDragEndObservable=new u,r.uniformScaleGizmo=r._createUniformScaleMesh(),r.xGizmo=new Xf(new C(1,0,0),B.Red().scale(.5),t,r,n),r.yGizmo=new Xf(new C(0,1,0),B.Green().scale(.5),t,r,n),r.zGizmo=new Xf(new C(0,0,1),B.Blue().scale(.5),t,r,n),[r.xGizmo,r.yGizmo,r.zGizmo,r.uniformScaleGizmo].forEach((function(e){e.dragBehavior.onDragStartObservable.add((function(){r.onDragStartObservable.notifyObservers({})})),e.dragBehavior.onDragObservable.add((function(){r.onDragObservable.notifyObservers({})})),e.dragBehavior.onDragEndObservable.add((function(){r.onDragEndObservable.notifyObservers({})}))})),r.attachedMesh=null,r.attachedNode=null,i?i.addToAxisCache(r._gizmoAxisCache):cu.GizmoAxisPointerObserver(t,r._gizmoAxisCache),r}return H(t,e),Object.defineProperty(t.prototype,"coloredMaterial",{get:function(){return this._coloredMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hoverMaterial",{get:function(){return this._hoverMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disableMaterial",{get:function(){return this._disableMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this._meshAttached},set:function(e){this._meshAttached=e,this._nodeAttached=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(t){t.isEnabled?t.attachedMesh=e:t.attachedMesh=null}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attachedNode",{get:function(){return this._nodeAttached},set:function(e){this._meshAttached=null,this._nodeAttached=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(t){t.isEnabled?t.attachedNode=e:t.attachedNode=null}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateScale",{get:function(){return this.xGizmo.updateScale},set:function(e){this.xGizmo&&(this.xGizmo.updateScale=e,this.yGizmo.updateScale=e,this.zGizmo.updateScale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isHovered",{get:function(){return this.xGizmo.isHovered||this.yGizmo.isHovered||this.zGizmo.isHovered},enumerable:!1,configurable:!0}),t.prototype._createUniformScaleMesh=function(){this._coloredMaterial=new ml("",this.gizmoLayer.utilityLayerScene),this._coloredMaterial.diffuseColor=B.Gray(),this._hoverMaterial=new ml("",this.gizmoLayer.utilityLayerScene),this._hoverMaterial.diffuseColor=B.Yellow(),this._disableMaterial=new ml("",this.gizmoLayer.utilityLayerScene),this._disableMaterial.diffuseColor=B.Gray(),this._disableMaterial.alpha=.4;var e=new Xf(new C(0,1,0),B.Gray().scale(.5),this.gizmoLayer,this);e.updateGizmoRotationToMatchAttachedMesh=!1,e.uniformScaling=!0,this._uniformScalingMesh=hh("uniform",{type:1},e.gizmoLayer.utilityLayerScene),this._uniformScalingMesh.scaling.scaleInPlace(.01),this._uniformScalingMesh.visibility=0,this._octahedron=hh("",{type:1},e.gizmoLayer.utilityLayerScene),this._octahedron.scaling.scaleInPlace(.007),this._uniformScalingMesh.addChild(this._octahedron),e.setCustomMesh(this._uniformScalingMesh,!0);var t=this.gizmoLayer._getSharedGizmoLight();t.includedOnlyMeshes=t.includedOnlyMeshes.concat(this._octahedron);var n={gizmoMeshes:[this._octahedron,this._uniformScalingMesh],colliderMeshes:[this._uniformScalingMesh],material:this._coloredMaterial,hoverMaterial:this._hoverMaterial,disableMaterial:this._disableMaterial,active:!1,dragBehavior:e.dragBehavior};return this.addToAxisCache(e._rootMesh,n),e},Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this._updateGizmoRotationToMatchAttachedMesh},set:function(e){e?(this._updateGizmoRotationToMatchAttachedMesh=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(t){t&&(t.updateGizmoRotationToMatchAttachedMesh=e)}))):J.Warn("Setting updateGizmoRotationToMatchAttachedMesh = false on scaling gizmo is not supported.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"anchorPoint",{get:function(){return this._anchorPoint},set:function(e){this._anchorPoint=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(t){t&&(t.anchorPoint=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customRotationQuaternion",{get:function(){return this._customRotationQuaternion},set:function(e){this._customRotationQuaternion=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(t){t&&(t.customRotationQuaternion=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"coordinatesMode",{set:function(e){e==ru.World&&J.Warn("Setting coordinates Mode to world on scaling gizmo is not supported."),[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(e){e.coordinatesMode=ru.Local}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this._snapDistance},set:function(e){this._snapDistance=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(t){t&&(t.snapDistance=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"incrementalSnap",{get:function(){return this._incrementalSnap},set:function(e){this._incrementalSnap=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(t){t&&(t.incrementalSnap=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this._scaleRatio},set:function(e){this._scaleRatio=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(t){t&&(t.scaleRatio=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sensitivity",{get:function(){return this._sensitivity},set:function(e){this._sensitivity=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(t){t&&(t.sensitivity=e)}))},enumerable:!1,configurable:!0}),t.prototype.addToAxisCache=function(e,t){this._gizmoAxisCache.set(e,t)},t.prototype.dispose=function(){var e=this;[this.xGizmo,this.yGizmo,this.zGizmo,this.uniformScaleGizmo].forEach((function(e){e&&e.dispose()})),this._observables.forEach((function(t){e.gizmoLayer.utilityLayerScene.onPointerObservable.remove(t)})),this.onDragStartObservable.clear(),this.onDragObservable.clear(),this.onDragEndObservable.clear(),[this._uniformScalingMesh,this._octahedron].forEach((function(e){e&&e.dispose()})),[this._coloredMaterial,this._hoverMaterial,this._disableMaterial].forEach((function(e){e&&e.dispose()}))},t}(cu),Jf=function(){function e(e,t,n,i){void 0===t&&(t=1),void 0===n&&(n=au.DefaultUtilityLayer),void 0===i&&(i=au.DefaultKeepDepthUtilityLayer),this._scene=e,this.clearGizmoOnEmptyPointerEvent=!1,this.enableAutoPicking=!0,this.onAttachedToMeshObservable=new u,this.onAttachedToNodeObservable=new u,this._gizmosEnabled={positionGizmo:!1,rotationGizmo:!1,scaleGizmo:!1,boundingBoxGizmo:!1},this._pointerObservers=[],this._attachedMesh=null,this._attachedNode=null,this._boundingBoxColor=B.FromHexString("#0984e3"),this._thickness=1,this._scaleRatio=1,this._coordinatesMode=ru.Local,this._gizmoAxisCache=new Map,this.boundingBoxDragBehavior=new Ho,this.attachableMeshes=null,this.attachableNodes=null,this.usePointerToAttachGizmos=!0,this._defaultUtilityLayer=n,this._defaultKeepDepthUtilityLayer=i,this._defaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,this._thickness=t,this.gizmos={positionGizmo:null,rotationGizmo:null,scaleGizmo:null,boundingBoxGizmo:null};var r=this._attachToMeshPointerObserver(e),o=cu.GizmoAxisPointerObserver(this._defaultUtilityLayer,this._gizmoAxisCache);this._pointerObservers=[r,o]}return Object.defineProperty(e.prototype,"keepDepthUtilityLayer",{get:function(){return this._defaultKeepDepthUtilityLayer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"utilityLayer",{get:function(){return this._defaultUtilityLayer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isHovered",{get:function(){var e=!1;for(var t in this.gizmos){var n=this.gizmos[t];if(n&&n.isHovered){e=!0;break}}return e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleRatio",{get:function(){return this._scaleRatio},set:function(e){this._scaleRatio=e,[this.gizmos.positionGizmo,this.gizmos.rotationGizmo,this.gizmos.scaleGizmo].forEach((function(t){t&&(t.scaleRatio=e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinatesMode",{get:function(){return this._coordinatesMode},set:function(e){this._coordinatesMode=e,[this.gizmos.positionGizmo,this.gizmos.rotationGizmo,this.gizmos.scaleGizmo].forEach((function(t){t&&(t.coordinatesMode=e)}))},enumerable:!1,configurable:!0}),e.prototype._attachToMeshPointerObserver=function(e){var t=this;return e.onPointerObservable.add((function(e){if(t.usePointerToAttachGizmos&&e.type==ti.POINTERDOWN)if(e.pickInfo&&e.pickInfo.pickedMesh){if(t.enableAutoPicking){var n=e.pickInfo.pickedMesh;if(null==t.attachableMeshes)for(;n&&null!=n.parent;)n=n.parent;else{var i=!1;t.attachableMeshes.forEach((function(e){n&&(n==e||n.isDescendantOf(e))&&(n=e,i=!0)})),i||(n=null)}n instanceof kr?t._attachedMesh!=n&&t.attachToMesh(n):t.clearGizmoOnEmptyPointerEvent&&t.attachToMesh(null)}}else t.clearGizmoOnEmptyPointerEvent&&t.attachToMesh(null)}))},e.prototype.attachToMesh=function(e){for(var t in this._attachedMesh&&this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior),this._attachedNode&&this._attachedNode.removeBehavior(this.boundingBoxDragBehavior),this._attachedMesh=e,this._attachedNode=null,this.gizmos){var n=this.gizmos[t];n&&this._gizmosEnabled[t]&&(n.attachedMesh=e)}this.boundingBoxGizmoEnabled&&this._attachedMesh&&this._attachedMesh.addBehavior(this.boundingBoxDragBehavior),this.onAttachedToMeshObservable.notifyObservers(e)},e.prototype.attachToNode=function(e){for(var t in this._attachedMesh&&this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior),this._attachedNode&&this._attachedNode.removeBehavior(this.boundingBoxDragBehavior),this._attachedMesh=null,this._attachedNode=e,this.gizmos){var n=this.gizmos[t];n&&this._gizmosEnabled[t]&&(n.attachedNode=e)}this.boundingBoxGizmoEnabled&&this._attachedNode&&this._attachedNode.addBehavior(this.boundingBoxDragBehavior),this.onAttachedToNodeObservable.notifyObservers(e)},Object.defineProperty(e.prototype,"positionGizmoEnabled",{get:function(){return this._gizmosEnabled.positionGizmo},set:function(e){e?(this.gizmos.positionGizmo||(this.gizmos.positionGizmo=new Zf(this._defaultUtilityLayer,this._thickness,this)),this._attachedNode?this.gizmos.positionGizmo.attachedNode=this._attachedNode:this.gizmos.positionGizmo.attachedMesh=this._attachedMesh):this.gizmos.positionGizmo&&(this.gizmos.positionGizmo.attachedNode=null),this._gizmosEnabled.positionGizmo=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotationGizmoEnabled",{get:function(){return this._gizmosEnabled.rotationGizmo},set:function(e){e?(this.gizmos.rotationGizmo||(this.gizmos.rotationGizmo=new Kf(this._defaultUtilityLayer,32,!1,this._thickness,this)),this._attachedNode?this.gizmos.rotationGizmo.attachedNode=this._attachedNode:this.gizmos.rotationGizmo.attachedMesh=this._attachedMesh):this.gizmos.rotationGizmo&&(this.gizmos.rotationGizmo.attachedNode=null),this._gizmosEnabled.rotationGizmo=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleGizmoEnabled",{get:function(){return this._gizmosEnabled.scaleGizmo},set:function(e){e?(this.gizmos.scaleGizmo=this.gizmos.scaleGizmo||new $f(this._defaultUtilityLayer,this._thickness,this),this._attachedNode?this.gizmos.scaleGizmo.attachedNode=this._attachedNode:this.gizmos.scaleGizmo.attachedMesh=this._attachedMesh):this.gizmos.scaleGizmo&&(this.gizmos.scaleGizmo.attachedNode=null),this._gizmosEnabled.scaleGizmo=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"boundingBoxGizmoEnabled",{get:function(){return this._gizmosEnabled.boundingBoxGizmo},set:function(e){e?(this.gizmos.boundingBoxGizmo=this.gizmos.boundingBoxGizmo||new Yf(this._boundingBoxColor,this._defaultKeepDepthUtilityLayer),this._attachedMesh?this.gizmos.boundingBoxGizmo.attachedMesh=this._attachedMesh:this.gizmos.boundingBoxGizmo.attachedNode=this._attachedNode,this._attachedMesh?(this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior),this._attachedMesh.addBehavior(this.boundingBoxDragBehavior)):this._attachedNode&&(this._attachedNode.removeBehavior(this.boundingBoxDragBehavior),this._attachedNode.addBehavior(this.boundingBoxDragBehavior))):this.gizmos.boundingBoxGizmo&&(this._attachedMesh?this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior):this._attachedNode&&this._attachedNode.removeBehavior(this.boundingBoxDragBehavior),this.gizmos.boundingBoxGizmo.attachedNode=null),this._gizmosEnabled.boundingBoxGizmo=e},enumerable:!1,configurable:!0}),e.prototype.addToAxisCache=function(e){var t=this;e.size>0&&e.forEach((function(e,n){t._gizmoAxisCache.set(n,e)}))},e.prototype.dispose=function(){var e,t,n=this;for(var i in this._pointerObservers.forEach((function(e){n._scene.onPointerObservable.remove(e)})),this.gizmos){var r=this.gizmos[i];r&&r.dispose()}this._defaultKeepDepthUtilityLayer!==au._DefaultKeepDepthUtilityLayer&&(null===(e=this._defaultKeepDepthUtilityLayer)||void 0===e||e.dispose()),this._defaultUtilityLayer!==au._DefaultUtilityLayer&&(null===(t=this._defaultUtilityLayer)||void 0===t||t.dispose()),this.boundingBoxDragBehavior.detach(),this.onAttachedToMeshObservable.clear()},e}(),em=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._needProjectionMatrixCompute=!0,t._viewMatrix=R.Identity(),t._projectionMatrix=R.Identity(),t}return H(t,e),t.prototype._setPosition=function(e){this._position=e},Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this._setPosition(e)},enumerable:!1,configurable:!0}),t.prototype._setDirection=function(e){this._direction=e},Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction},set:function(e){this._setDirection(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowMinZ",{get:function(){return this._shadowMinZ},set:function(e){this._shadowMinZ=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowMaxZ",{get:function(){return this._shadowMaxZ},set:function(e){this._shadowMaxZ=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),t.prototype.computeTransformedInformation=function(){return!(!this.parent||!this.parent.getWorldMatrix||(this.transformedPosition||(this.transformedPosition=C.Zero()),C.TransformCoordinatesToRef(this.position,this.parent.getWorldMatrix(),this.transformedPosition),this.direction&&(this.transformedDirection||(this.transformedDirection=C.Zero()),C.TransformNormalToRef(this.direction,this.parent.getWorldMatrix(),this.transformedDirection)),0))},t.prototype.getDepthScale=function(){return 50},t.prototype.getShadowDirection=function(e){return this.transformedDirection?this.transformedDirection:this.direction},t.prototype.getAbsolutePosition=function(){return this.transformedPosition?this.transformedPosition:this.position},t.prototype.setDirectionToTarget=function(e){return this.direction=C.Normalize(e.subtract(this.position)),this.direction},t.prototype.getRotation=function(){this.direction.normalize();var e=C.Cross(this.direction,Ii.Y),t=C.Cross(e,this.direction);return C.RotationFromAxis(e,t,this.direction)},t.prototype.needCube=function(){return!1},t.prototype.needProjectionMatrixCompute=function(){return this._needProjectionMatrixCompute},t.prototype.forceProjectionMatrixCompute=function(){this._needProjectionMatrixCompute=!0},t.prototype._initCache=function(){e.prototype._initCache.call(this),this._cache.position=C.Zero()},t.prototype._isSynchronized=function(){return!!this._cache.position.equals(this.position)},t.prototype.computeWorldMatrix=function(e){return!e&&this.isSynchronized()?(this._currentRenderId=this.getScene().getRenderId(),this._worldMatrix):(this._updateCache(),this._cache.position.copyFrom(this.position),this._worldMatrix||(this._worldMatrix=R.Identity()),R.TranslationToRef(this.position.x,this.position.y,this.position.z,this._worldMatrix),this.parent&&this.parent.getWorldMatrix&&(this._worldMatrix.multiplyToRef(this.parent.getWorldMatrix(),this._worldMatrix),this._markSyncedWithParent()),this._worldMatrixDeterminantIsDirty=!0,this._worldMatrix)},t.prototype.getDepthMinZ=function(e){return void 0!==this.shadowMinZ?this.shadowMinZ:e.minZ},t.prototype.getDepthMaxZ=function(e){return void 0!==this.shadowMaxZ?this.shadowMaxZ:e.maxZ},t.prototype.setShadowProjectionMatrix=function(e,t,n){return this.customProjectionMatrixBuilder?this.customProjectionMatrixBuilder(t,n,e):this._setDefaultShadowProjectionMatrix(e,t,n),this},t.prototype._syncParentEnabledState=function(){e.prototype._syncParentEnabledState.call(this),this.parent&&this.parent.getWorldMatrix||(this.transformedPosition=null,this.transformedDirection=null)},t.prototype.getViewMatrix=function(e){var t=w.Vector3[0],n=this.position;this.computeTransformedInformation()&&(n=this.transformedPosition),C.NormalizeToRef(this.getShadowDirection(e),t),1===Math.abs(C.Dot(t,C.Up()))&&(t.z=1e-13);var i=w.Vector3[1];return n.addToRef(t,i),R.LookAtLHToRef(n,i,C.Up(),this._viewMatrix),this._viewMatrix},t.prototype.getProjectionMatrix=function(e,t){return this.setShadowProjectionMatrix(this._projectionMatrix,null!=e?e:this._viewMatrix,null!=t?t:[]),this._projectionMatrix},W([Oe()],t.prototype,"position",null),W([Oe()],t.prototype,"direction",null),W([Se()],t.prototype,"shadowMinZ",null),W([Se()],t.prototype,"shadowMaxZ",null),t}(ro);He.AddNodeConstructor("Light_Type_1",(function(e,t){return function(){return new tm(e,C.Zero(),t)}}));var tm=function(e){function t(t,n,i){var r=e.call(this,t,i)||this;return r._shadowFrustumSize=0,r._shadowOrthoScale=.1,r.autoUpdateExtends=!0,r.autoCalcShadowZBounds=!1,r._orthoLeft=Number.MAX_VALUE,r._orthoRight=Number.MIN_VALUE,r._orthoTop=Number.MIN_VALUE,r._orthoBottom=Number.MAX_VALUE,r.position=n.scale(-1),r.direction=n,r}return H(t,e),Object.defineProperty(t.prototype,"shadowFrustumSize",{get:function(){return this._shadowFrustumSize},set:function(e){this._shadowFrustumSize=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowOrthoScale",{get:function(){return this._shadowOrthoScale},set:function(e){this._shadowOrthoScale=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"orthoLeft",{get:function(){return this._orthoLeft},set:function(e){this._orthoLeft=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"orthoRight",{get:function(){return this._orthoRight},set:function(e){this._orthoRight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"orthoTop",{get:function(){return this._orthoTop},set:function(e){this._orthoTop=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"orthoBottom",{get:function(){return this._orthoBottom},set:function(e){this._orthoBottom=e},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"DirectionalLight"},t.prototype.getTypeID=function(){return ro.LIGHTTYPEID_DIRECTIONALLIGHT},t.prototype._setDefaultShadowProjectionMatrix=function(e,t,n){this.shadowFrustumSize>0?this._setDefaultFixedFrustumShadowProjectionMatrix(e):this._setDefaultAutoExtendShadowProjectionMatrix(e,t,n)},t.prototype._setDefaultFixedFrustumShadowProjectionMatrix=function(e){var t=this.getScene().activeCamera;t&&R.OrthoLHToRef(this.shadowFrustumSize,this.shadowFrustumSize,void 0!==this.shadowMinZ?this.shadowMinZ:t.minZ,void 0!==this.shadowMaxZ?this.shadowMaxZ:t.maxZ,e,this.getScene().getEngine().isNDCHalfZRange)},t.prototype._setDefaultAutoExtendShadowProjectionMatrix=function(e,t,n){var i=this.getScene().activeCamera;if(i){if(this.autoUpdateExtends||this._orthoLeft===Number.MAX_VALUE){var r=C.Zero();this._orthoLeft=Number.MAX_VALUE,this._orthoRight=-Number.MAX_VALUE,this._orthoTop=-Number.MAX_VALUE,this._orthoBottom=Number.MAX_VALUE;for(var o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=0;sthis._orthoRight&&(this._orthoRight=r.x),r.y>this._orthoTop&&(this._orthoTop=r.y),this.autoCalcShadowZBounds&&(r.za&&(a=r.z))}this.autoCalcShadowZBounds&&(this._shadowMinZ=o,this._shadowMaxZ=a)}var h=this._orthoRight-this._orthoLeft,d=this._orthoTop-this._orthoBottom,p=void 0!==this.shadowMinZ?this.shadowMinZ:i.minZ,f=void 0!==this.shadowMaxZ?this.shadowMaxZ:i.maxZ,m=this.getScene().getEngine().useReverseDepthBuffer;R.OrthoOffCenterLHToRef(this._orthoLeft-h*this.shadowOrthoScale,this._orthoRight+h*this.shadowOrthoScale,this._orthoBottom-d*this.shadowOrthoScale,this._orthoTop+d*this.shadowOrthoScale,m?f:p,m?p:f,e,this.getScene().getEngine().isNDCHalfZRange)}},t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype.transferToEffect=function(e,t){return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z,1,t),this):(this._uniformBuffer.updateFloat4("vLightData",this.direction.x,this.direction.y,this.direction.z,1,t),this)},t.prototype.transferToNodeMaterialEffect=function(e,t){return this.computeTransformedInformation()?(e.setFloat3(t,this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z),this):(e.setFloat3(t,this.direction.x,this.direction.y,this.direction.z),this)},t.prototype.getDepthMinZ=function(e){var t=this._scene.getEngine();return!t.useReverseDepthBuffer&&t.isNDCHalfZRange?0:1},t.prototype.getDepthMaxZ=function(e){var t=this._scene.getEngine();return t.useReverseDepthBuffer&&t.isNDCHalfZRange?0:1},t.prototype.prepareLightSpecificDefines=function(e,t){e["DIRLIGHT"+t]=!0},W([Se()],t.prototype,"shadowFrustumSize",null),W([Se()],t.prototype,"shadowOrthoScale",null),W([Se()],t.prototype,"autoUpdateExtends",void 0),W([Se()],t.prototype,"autoCalcShadowZBounds",void 0),W([Se("orthoLeft")],t.prototype,"_orthoLeft",void 0),W([Se("orthoRight")],t.prototype,"_orthoRight",void 0),W([Se("orthoTop")],t.prototype,"_orthoTop",void 0),W([Se("orthoBottom")],t.prototype,"_orthoBottom",void 0),t}(em);function nm(e,t,n){void 0===t&&(t={}),t.diameter||(t.diameter=1),t.segments||(t.segments=16);var i=yu("",{slice:.5,diameter:t.diameter,segments:t.segments},n),r=Pu("",{radius:t.diameter/2,tessellation:3*t.segments+(4-t.segments)},n);r.rotation.x=-Math.PI/2,r.parent=i;var o=no.MergeMeshes([r,i],!0);return o.name=e,o}var im={CreateHemisphere:nm};no.CreateHemisphere=function(e,t,n,i){return nm(e,{segments:t,diameter:n},i)},He.AddNodeConstructor("Light_Type_2",(function(e,t){return function(){return new rm(e,C.Zero(),C.Zero(),0,0,t)}}));var rm=function(e){function t(t,n,i,r,o,a){var s=e.call(this,t,a)||this;return s._innerAngle=0,s._projectionTextureMatrix=R.Zero(),s._projectionTextureLightNear=1e-6,s._projectionTextureLightFar=1e3,s._projectionTextureUpDirection=C.Up(),s._projectionTextureViewLightDirty=!0,s._projectionTextureProjectionLightDirty=!0,s._projectionTextureDirty=!0,s._projectionTextureViewTargetVector=C.Zero(),s._projectionTextureViewLightMatrix=R.Zero(),s._projectionTextureProjectionLightMatrix=R.Zero(),s._projectionTextureScalingMatrix=R.FromValues(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1),s.position=n,s.direction=i,s.angle=r,s.exponent=o,s}return H(t,e),Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._cosHalfAngle=Math.cos(.5*e),this._projectionTextureProjectionLightDirty=!0,this.forceProjectionMatrixCompute(),this._computeAngleValues()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"innerAngle",{get:function(){return this._innerAngle},set:function(e){this._innerAngle=e,this._computeAngleValues()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowAngleScale",{get:function(){return this._shadowAngleScale},set:function(e){this._shadowAngleScale=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureMatrix",{get:function(){return this._projectionTextureMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureLightNear",{get:function(){return this._projectionTextureLightNear},set:function(e){this._projectionTextureLightNear=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureLightFar",{get:function(){return this._projectionTextureLightFar},set:function(e){this._projectionTextureLightFar=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureUpDirection",{get:function(){return this._projectionTextureUpDirection},set:function(e){this._projectionTextureUpDirection=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTexture",{get:function(){return this._projectionTexture},set:function(e){var n=this;this._projectionTexture!==e&&(this._projectionTexture=e,this._projectionTextureDirty=!0,this._projectionTexture&&!this._projectionTexture.isReady()&&(t._IsProceduralTexture(this._projectionTexture)?this._projectionTexture.getEffect().executeWhenCompiled((function(){n._markMeshesAsLightDirty()})):t._IsTexture(this._projectionTexture)&&this._projectionTexture.onLoadObservable.addOnce((function(){n._markMeshesAsLightDirty()}))))},enumerable:!1,configurable:!0}),t._IsProceduralTexture=function(e){return void 0!==e.onGeneratedObservable},t._IsTexture=function(e){return void 0!==e.onLoadObservable},Object.defineProperty(t.prototype,"projectionTextureProjectionLightMatrix",{get:function(){return this._projectionTextureProjectionLightMatrix},set:function(e){this._projectionTextureProjectionLightMatrix=e,this._projectionTextureProjectionLightDirty=!1,this._projectionTextureDirty=!0},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"SpotLight"},t.prototype.getTypeID=function(){return ro.LIGHTTYPEID_SPOTLIGHT},t.prototype._setDirection=function(t){e.prototype._setDirection.call(this,t),this._projectionTextureViewLightDirty=!0},t.prototype._setPosition=function(t){e.prototype._setPosition.call(this,t),this._projectionTextureViewLightDirty=!0},t.prototype._setDefaultShadowProjectionMatrix=function(e,t,n){var i=this.getScene().activeCamera;if(i){this._shadowAngleScale=this._shadowAngleScale||1;var r=this._shadowAngleScale*this._angle,o=void 0!==this.shadowMinZ?this.shadowMinZ:i.minZ,a=void 0!==this.shadowMaxZ?this.shadowMaxZ:i.maxZ,s=this.getScene().getEngine().useReverseDepthBuffer;R.PerspectiveFovLHToRef(r,1,s?a:o,s?o:a,e,!0,this._scene.getEngine().isNDCHalfZRange,void 0,s)}},t.prototype._computeProjectionTextureViewLightMatrix=function(){this._projectionTextureViewLightDirty=!1,this._projectionTextureDirty=!0,this.getAbsolutePosition().addToRef(this.direction,this._projectionTextureViewTargetVector),R.LookAtLHToRef(this.getAbsolutePosition(),this._projectionTextureViewTargetVector,this._projectionTextureUpDirection,this._projectionTextureViewLightMatrix)},t.prototype._computeProjectionTextureProjectionLightMatrix=function(){this._projectionTextureProjectionLightDirty=!1,this._projectionTextureDirty=!0;var e=this.projectionTextureLightFar,t=this.projectionTextureLightNear,n=e/(e-t),i=-n*t,r=1/Math.tan(this._angle/2);R.FromValuesToRef(r/1,0,0,0,0,r,0,0,0,0,n,1,0,0,i,0,this._projectionTextureProjectionLightMatrix)},t.prototype._computeProjectionTextureMatrix=function(){if(this._projectionTextureDirty=!1,this._projectionTextureViewLightMatrix.multiplyToRef(this._projectionTextureProjectionLightMatrix,this._projectionTextureMatrix),this._projectionTexture instanceof Eo){var e=this._projectionTexture.uScale/2,t=this._projectionTexture.vScale/2;R.FromValuesToRef(e,0,0,0,0,t,0,0,0,0,.5,0,.5,.5,.5,1,this._projectionTextureScalingMatrix)}this._projectionTextureMatrix.multiplyToRef(this._projectionTextureScalingMatrix,this._projectionTextureMatrix)},t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("vLightDirection",3),this._uniformBuffer.addUniform("vLightFalloff",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype._computeAngleValues=function(){this._lightAngleScale=1/Math.max(.001,Math.cos(.5*this._innerAngle)-this._cosHalfAngle),this._lightAngleOffset=-this._cosHalfAngle*this._lightAngleScale},t.prototype.transferTexturesToEffect=function(e,t){return this.projectionTexture&&this.projectionTexture.isReady()&&(this._projectionTextureViewLightDirty&&this._computeProjectionTextureViewLightMatrix(),this._projectionTextureProjectionLightDirty&&this._computeProjectionTextureProjectionLightMatrix(),this._projectionTextureDirty&&this._computeProjectionTextureMatrix(),e.setMatrix("textureProjectionMatrix"+t,this._projectionTextureMatrix),e.setTexture("projectionLightSampler"+t,this.projectionTexture)),this},t.prototype.transferToEffect=function(e,t){var n;return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedPosition.x,this.transformedPosition.y,this.transformedPosition.z,this.exponent,t),n=C.Normalize(this.transformedDirection)):(this._uniformBuffer.updateFloat4("vLightData",this.position.x,this.position.y,this.position.z,this.exponent,t),n=C.Normalize(this.direction)),this._uniformBuffer.updateFloat4("vLightDirection",n.x,n.y,n.z,this._cosHalfAngle,t),this._uniformBuffer.updateFloat4("vLightFalloff",this.range,this._inverseSquaredRange,this._lightAngleScale,this._lightAngleOffset,t),this},t.prototype.transferToNodeMaterialEffect=function(e,t){var n;return n=this.computeTransformedInformation()?C.Normalize(this.transformedDirection):C.Normalize(this.direction),this.getScene().useRightHandedSystem?e.setFloat3(t,-n.x,-n.y,-n.z):e.setFloat3(t,n.x,n.y,n.z),this},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._projectionTexture&&this._projectionTexture.dispose()},t.prototype.getDepthMinZ=function(e){var t=this._scene.getEngine(),n=void 0!==this.shadowMinZ?this.shadowMinZ:e.minZ;return t.useReverseDepthBuffer&&t.isNDCHalfZRange?n:this._scene.getEngine().isNDCHalfZRange?0:n},t.prototype.getDepthMaxZ=function(e){var t=this._scene.getEngine(),n=void 0!==this.shadowMaxZ?this.shadowMaxZ:e.maxZ;return t.useReverseDepthBuffer&&t.isNDCHalfZRange?0:n},t.prototype.prepareLightSpecificDefines=function(e,t){e["SPOTLIGHT"+t]=!0,e["PROJECTEDLIGHTTEXTURE"+t]=!(!this.projectionTexture||!this.projectionTexture.isReady())},W([Se()],t.prototype,"angle",null),W([Se()],t.prototype,"innerAngle",null),W([Se()],t.prototype,"shadowAngleScale",null),W([Se()],t.prototype,"exponent",void 0),W([Se()],t.prototype,"projectionTextureLightNear",null),W([Se()],t.prototype,"projectionTextureLightFar",null),W([Se()],t.prototype,"projectionTextureUpDirection",null),W([Ce("projectedLightTexture")],t.prototype,"_projectionTexture",void 0),t}(em),om=function(e){function t(t){void 0===t&&(t=au.DefaultUtilityLayer);var n=e.call(this,t)||this;return n._cachedPosition=new C,n._cachedForward=new C(0,0,1),n._pointerObserver=null,n.onClickedObservable=new u,n._light=null,n.attachedMesh=new kr("",n.gizmoLayer.utilityLayerScene),n._attachedMeshParent=new Lr("parent",n.gizmoLayer.utilityLayerScene),n.attachedMesh.parent=n._attachedMeshParent,n._material=new ml("light",n.gizmoLayer.utilityLayerScene),n._material.diffuseColor=new B(.5,.5,.5),n._material.specularColor=new B(.1,.1,.1),n._pointerObserver=t.utilityLayerScene.onPointerObservable.add((function(e){n._light&&(n._isHovered=!(!e.pickInfo||-1==n._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh)),n._isHovered&&0===e.event.button&&n.onClickedObservable.notifyObservers(n._light))}),ti.POINTERDOWN),n}return H(t,e),Object.defineProperty(t.prototype,"attachedNode",{get:function(){return this.attachedMesh},set:function(e){J.Warn("Nodes cannot be attached to LightGizmo. Attach to a mesh instead.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"light",{get:function(){return this._light},set:function(e){var n=this;if(this._light=e,e){this._lightMesh&&this._lightMesh.dispose(),this._lightMesh=e instanceof ou?t._CreateHemisphericLightMesh(this.gizmoLayer.utilityLayerScene):e instanceof tm?t._CreateDirectionalLightMesh(this.gizmoLayer.utilityLayerScene):e instanceof rm?t._CreateSpotLightMesh(this.gizmoLayer.utilityLayerScene):t._CreatePointLightMesh(this.gizmoLayer.utilityLayerScene),this._lightMesh.getChildMeshes(!1).forEach((function(e){e.material=n._material})),this._lightMesh.parent=this._rootMesh;var i=this.gizmoLayer._getSharedGizmoLight();if(i.includedOnlyMeshes=i.includedOnlyMeshes.concat(this._lightMesh.getChildMeshes(!1)),this._lightMesh.rotationQuaternion=new I,this.attachedMesh.reservedDataStore||(this.attachedMesh.reservedDataStore={}),this.attachedMesh.reservedDataStore.lightGizmo=this,e.parent&&this._attachedMeshParent.freezeWorldMatrix(e.parent.getWorldMatrix()),e.position&&(this.attachedMesh.position.copyFrom(e.position),this.attachedMesh.computeWorldMatrix(!0),this._cachedPosition.copyFrom(this.attachedMesh.position)),e.direction){this.attachedMesh.setDirection(e.direction),this.attachedMesh.computeWorldMatrix(!0);var r=this._getMeshForward();this._cachedForward.copyFrom(r)}this._update()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._material},enumerable:!1,configurable:!0}),t.prototype._getMeshForward=function(){var e=this.attachedMesh.forward;return this.attachedMesh.getScene().useRightHandedSystem&&(e.negateToRef(w.Vector3[0]),e=w.Vector3[0]),e},t.prototype._update=function(){if(e.prototype._update.call(this),this._light){if(this._light.parent&&this._attachedMeshParent.freezeWorldMatrix(this._light.parent.getWorldMatrix()),this._light.position)if(this.attachedMesh.position.equals(this._cachedPosition))this.attachedMesh.position.copyFrom(this._light.position),this.attachedMesh.computeWorldMatrix(!0),this._cachedPosition.copyFrom(this.attachedMesh.position);else{var t=this.attachedMesh.position;this._light.position=new C(t.x,t.y,t.z),this._cachedPosition.copyFrom(this.attachedMesh.position)}if(this._light.direction){var n=this._getMeshForward();if(C.DistanceSquared(n,this._cachedForward)>1e-4){var i=n;this._light.direction=new C(i.x,i.y,i.z),this._cachedForward.copyFrom(n)}else C.DistanceSquared(n,this._light.direction)>1e-4&&(this.attachedMesh.setDirection(this._light.direction),this.attachedMesh.computeWorldMatrix(!0),this._cachedForward.copyFrom(n))}}},t.prototype.dispose=function(){this.onClickedObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this._material.dispose(),e.prototype.dispose.call(this),this._attachedMeshParent.dispose()},t._CreateHemisphericLightMesh=function(e){var n=new no("hemisphereLight",e),i=nm(n.name,{segments:10,diameter:1},e);return i.position.z=-.15,i.rotation.x=Math.PI/2,i.parent=n,this._CreateLightLines(3,e).parent=n,n.scaling.scaleInPlace(t._Scale),n.rotation.x=Math.PI/2,n},t._CreatePointLightMesh=function(e){var n=new no("pointLight",e),i=yu(n.name,{segments:10,diameter:1},e);return i.rotation.x=Math.PI/2,i.parent=n,this._CreateLightLines(5,e).parent=n,n.scaling.scaleInPlace(t._Scale),n.rotation.x=Math.PI/2,n},t._CreateSpotLightMesh=function(e){var n=new no("spotLight",e);yu(n.name,{segments:10,diameter:1},e).parent=n;var i=nm(n.name,{segments:10,diameter:2},e);return i.parent=n,i.rotation.x=-Math.PI/2,this._CreateLightLines(2,e).parent=n,n.scaling.scaleInPlace(t._Scale),n.rotation.x=Math.PI/2,n},t._CreateDirectionalLightMesh=function(e){var n=new no("directionalLight",e),i=new no(n.name,e);i.parent=n,yu(n.name,{diameter:1.2,segments:10},e).parent=i;var r=tu(n.name,{updatable:!1,height:6,diameterTop:.3,diameterBottom:.3,tessellation:6,subdivisions:1},e);r.parent=i;var o=r.clone(n.name);o.scaling.y=.5,o.position.x+=1.25;var a=r.clone(n.name);a.scaling.y=.5,a.position.x+=-1.25;var s=tu(n.name,{updatable:!1,height:1,diameterTop:0,diameterBottom:.6,tessellation:6,subdivisions:1},e);return s.position.y+=3,s.parent=i,(o=s.clone(n.name)).position.y=1.5,o.position.x+=1.25,(a=s.clone(n.name)).position.y=1.5,a.position.x+=-1.25,i.scaling.scaleInPlace(t._Scale),i.rotation.z=Math.PI/2,i.rotation.y=Math.PI/2,n},t._Scale=.007,t._CreateLightLines=function(e,t){var n=new no("root",t);n.rotation.x=Math.PI/2;var i=new no("linePivot",t);i.parent=n;var r=tu("line",{updatable:!1,height:2,diameterTop:.2,diameterBottom:.3,tessellation:6,subdivisions:1},t);if(r.position.y=r.scaling.y/2+1.2,r.parent=i,e<2)return i;for(var o=0;o<4;o++){var a=i.clone("lineParentClone");a.rotation.z=Math.PI/4,a.rotation.y=Math.PI/2+Math.PI/2*o,a.getChildMeshes()[0].scaling.y=.5,a.getChildMeshes()[0].scaling.x=a.getChildMeshes()[0].scaling.z=.8,a.getChildMeshes()[0].position.y=a.getChildMeshes()[0].scaling.y/2+1.2}if(e<3)return n;for(o=0;o<4;o++){var s=i.clone("linePivotClone");s.rotation.z=Math.PI/2,s.rotation.y=Math.PI/2*o}if(e<4)return n;for(o=0;o<4;o++){var c=i.clone("linePivotClone");c.rotation.z=Math.PI+Math.PI/4,c.rotation.y=Math.PI/2+Math.PI/2*o,c.getChildMeshes()[0].scaling.y=.5,c.getChildMeshes()[0].scaling.x=c.getChildMeshes()[0].scaling.z=.8,c.getChildMeshes()[0].position.y=c.getChildMeshes()[0].scaling.y/2+1.2}return e<5||(i.clone("linePivotClone").rotation.z=Math.PI),n},t}(cu),am=function(e){function t(t,n){void 0===t&&(t=au.DefaultUtilityLayer);var i=e.call(this,t)||this;return i._pointerObserver=null,i.onClickedObservable=new u,i._camera=null,i._invProjection=new R,i._material=new ml("cameraGizmoMaterial",i.gizmoLayer.utilityLayerScene),i._gizmoColor=n,i._material.diffuseColor=null!=n?n:new B(.5,.5,.5),i._material.specularColor=new B(.1,.1,.1),i._pointerObserver=t.utilityLayerScene.onPointerObservable.add((function(e){i._camera&&(i._isHovered=!(!e.pickInfo||-1==i._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh)),i._isHovered&&0===e.event.button&&i.onClickedObservable.notifyObservers(i._camera))}),ti.POINTERDOWN),i}return H(t,e),Object.defineProperty(t.prototype,"displayFrustum",{get:function(){return this._cameraLinesMesh.isEnabled()},set:function(e){this._cameraLinesMesh.setEnabled(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"camera",{get:function(){return this._camera},set:function(e){var n,i,r=this;if(this._camera=e,this.attachedNode=e,e){this._cameraMesh&&this._cameraMesh.dispose(),this._cameraLinesMesh&&this._cameraLinesMesh.dispose(),this._cameraMesh=t._CreateCameraMesh(this.gizmoLayer.utilityLayerScene);var o=null!==(i=null===(n=this._gizmoColor)||void 0===n?void 0:n.toColor4(1))&&void 0!==i?i:new U(1,1,1,1);this._cameraLinesMesh=t._CreateCameraFrustum(this.gizmoLayer.utilityLayerScene,o),this._cameraMesh.getChildMeshes(!1).forEach((function(e){e.material=r._material})),this._cameraMesh.parent=this._rootMesh,this._cameraLinesMesh.parent=this._rootMesh,this.gizmoLayer.utilityLayerScene.activeCamera&&this.gizmoLayer.utilityLayerScene.activeCamera.maxZ<1.5*e.maxZ&&(this.gizmoLayer.utilityLayerScene.activeCamera.maxZ=1.5*e.maxZ),this.attachedNode.reservedDataStore||(this.attachedNode.reservedDataStore={}),this.attachedNode.reservedDataStore.cameraGizmo=this;var a=this.gizmoLayer._getSharedGizmoLight();a.includedOnlyMeshes=a.includedOnlyMeshes.concat(this._cameraMesh.getChildMeshes(!1)),this._update()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._material},enumerable:!1,configurable:!0}),t.prototype._update=function(){e.prototype._update.call(this),this._camera&&(this._camera.getProjectionMatrix().invertToRef(this._invProjection),this._cameraLinesMesh.setPivotMatrix(this._invProjection,!1),this._cameraLinesMesh.scaling.x=1/this._rootMesh.scaling.x,this._cameraLinesMesh.scaling.y=1/this._rootMesh.scaling.y,this._cameraLinesMesh.scaling.z=1/this._rootMesh.scaling.z,this._cameraMesh.parent=null,this._cameraMesh.rotation.y=.5*Math.PI*(this._camera.getScene().useRightHandedSystem?1:-1),this._cameraMesh.parent=this._rootMesh)},t.prototype.dispose=function(){this.onClickedObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this._cameraMesh&&this._cameraMesh.dispose(),this._cameraLinesMesh&&this._cameraLinesMesh.dispose(),this._material.dispose(),e.prototype.dispose.call(this)},t._CreateCameraMesh=function(e){var n=new no("rootCameraGizmo",e),i=new no(n.name,e);i.parent=n,mu(n.name,{width:1,height:.8,depth:.5},e).parent=i;var r=tu(n.name,{height:.5,diameterTop:.8,diameterBottom:.8},e);r.parent=i,r.position.y=.3,r.position.x=-.6,r.rotation.x=.5*Math.PI;var o=tu(n.name,{height:.5,diameterTop:.6,diameterBottom:.6},e);o.parent=i,o.position.y=.5,o.position.x=.4,o.rotation.x=.5*Math.PI;var a=tu(n.name,{height:.5,diameterTop:.5,diameterBottom:.5},e);return a.parent=i,a.position.y=0,a.position.x=.6,a.rotation.z=.5*Math.PI,n.scaling.scaleInPlace(t._Scale),i.position.x=-.9,n},t._CreateCameraFrustum=function(e,t){var n=new no("rootCameraGizmo",e),i=new no(n.name,e);i.parent=n;for(var r=0;r<4;r+=2)for(var o=0;o<4;o+=2){var a=Wu("lines",{points:[new C(-1+o,-1+r,-1),new C(-1+o,-1+r,1)],colors:[t,t]},e);a.parent=i,a.alwaysSelectAsActiveMesh=!0,a.isPickable=!1,(a=Wu("lines",{points:[new C(-1,-1+o,-1+r),new C(1,-1+o,-1+r)],colors:[t,t]},e)).parent=i,a.alwaysSelectAsActiveMesh=!0,a.isPickable=!1,(a=Wu("lines",{points:[new C(-1+o,-1,-1+r),new C(-1+o,1,-1+r)],colors:[t,t]},e)).parent=i,a.alwaysSelectAsActiveMesh=!0,a.isPickable=!1}return n},t._Scale=.05,t}(cu);Vt.IncludesShadersStore.kernelBlurVaryingDeclaration="varying vec2 sampleCoord{X};",Vt.IncludesShadersStore.packingFunctions="vec4 pack(float depth)\n{const vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}\nfloat unpack(vec4 color)\n{const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(color,bit_shift);}",Vt.IncludesShadersStore.kernelBlurFragment="#ifdef DOF\nfactor=sampleCoC(sampleCoord{X}); \ncomputedWeight=KERNEL_WEIGHT{X}*factor;sumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCoord{X}))*computedWeight;\n#else\nblend+=texture2D(textureSampler,sampleCoord{X})*computedWeight;\n#endif\n",Vt.IncludesShadersStore.kernelBlurFragment2="#ifdef DOF\nfactor=sampleCoC(sampleCenter+delta*KERNEL_DEP_OFFSET{X});computedWeight=KERNEL_DEP_WEIGHT{X}*factor;sumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_DEP_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X}))*computedWeight;\n#else\nblend+=texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X})*computedWeight;\n#endif\n",Vt.ShadersStore.kernelBlurPixelShader="uniform sampler2D textureSampler;uniform vec2 delta;varying vec2 sampleCenter;\n#ifdef DOF\nuniform sampler2D circleOfConfusionSampler;float sampleCoC(in vec2 offset) {float coc=texture2D(circleOfConfusionSampler,offset).r;return coc; }\n#endif\n#include[0..varyingCount]\n#ifdef PACKEDFLOAT\n#include\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{float computedWeight=0.0;\n#ifdef PACKEDFLOAT\nfloat blend=0.;\n#else\nvec4 blend=vec4(0.);\n#endif\n#ifdef DOF\nfloat sumOfWeights=CENTER_WEIGHT; \nfloat factor=0.0;\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCenter))*CENTER_WEIGHT;\n#else\nblend+=texture2D(textureSampler,sampleCenter)*CENTER_WEIGHT;\n#endif\n#endif\n#include[0..varyingCount]\n#include[0..depCount]\n#ifdef PACKEDFLOAT\ngl_FragColor=pack(blend);\n#else\ngl_FragColor=blend;\n#endif\n#ifdef DOF\ngl_FragColor/=sumOfWeights;\n#endif\n}",Vt.IncludesShadersStore.kernelBlurVertex="sampleCoord{X}=sampleCenter+delta*KERNEL_OFFSET{X};",Vt.ShadersStore.kernelBlurVertexShader="attribute vec2 position;uniform vec2 delta;varying vec2 sampleCenter;\n#include[0..varyingCount]\nconst vec2 madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nsampleCenter=(position*madd+madd);\n#include[0..varyingCount]\ngl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}";var sm=function(e){function t(t,n,i,r,o,s,c,l,u,h,d,p){void 0===s&&(s=Eo.BILINEAR_SAMPLINGMODE),void 0===u&&(u=a.TEXTURETYPE_UNSIGNED_INT),void 0===h&&(h=""),void 0===d&&(d=!1),void 0===p&&(p=a.TEXTUREFORMAT_RGBA);var f=e.call(this,t,"kernelBlur",["delta","direction"],["circleOfConfusionSampler"],r,o,s,c,l,null,u,"kernelBlur",{varyingCount:0,depCount:0},!0,p)||this;return f._blockCompilation=d,f._packedFloat=!1,f._staticDefines="",f._staticDefines=h,f.direction=n,f.onApplyObservable.add((function(e){f._outputTexture?e.setFloat2("delta",1/f._outputTexture.width*f.direction.x,1/f._outputTexture.height*f.direction.y):e.setFloat2("delta",1/f.width*f.direction.x,1/f.height*f.direction.y)})),f.kernel=i,f}return H(t,e),Object.defineProperty(t.prototype,"kernel",{get:function(){return this._idealKernel},set:function(e){this._idealKernel!==e&&(e=Math.max(e,1),this._idealKernel=e,this._kernel=this._nearestBestKernel(e),this._blockCompilation||this._updateParameters())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"packedFloat",{get:function(){return this._packedFloat},set:function(e){this._packedFloat!==e&&(this._packedFloat=e,this._blockCompilation||this._updateParameters())},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"BlurPostProcess"},t.prototype.updateEffect=function(e,t,n,i,r,o){void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=null),this._updateParameters(r,o)},t.prototype._updateParameters=function(t,n){for(var i=this._kernel,r=(i-1)/2,o=[],a=[],s=0,c=0;c0)return Math.max(r,3)}return Math.max(t,3)},t.prototype._gaussianWeight=function(e){var t=1/3,n=-e*e/(2*t*t);return 1/(Math.sqrt(2*Math.PI)*t)*Math.exp(n)},t.prototype._glslFloat=function(e,t){return void 0===t&&(t=8),e.toFixed(t).replace(/0+$/,"")},t._Parse=function(e,n,i,r){return ke.Parse((function(){return new t(e.name,e.direction,e.kernel,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable,e.textureType,void 0,!1)}),e,i,r)},W([Se("kernel")],t.prototype,"_kernel",void 0),W([Se("packedFloat")],t.prototype,"_packedFloat",void 0),W([Re()],t.prototype,"direction",void 0),t}(Da);b("BABYLON.BlurPostProcess",sm);var cm=function(e){function t(t,n,i,r,o,s,c){void 0===o&&(o=a.TEXTURETYPE_UNSIGNED_INT),void 0===s&&(s=Eo.BILINEAR_SAMPLINGMODE),void 0===c&&(c=!0);var l=e.call(this,t,n,i,r,!0,o,!1,s,c)||this;if(l.mirrorPlane=new bi(0,1,0,1),l._transformMatrix=R.Zero(),l._mirrorMatrix=R.Zero(),l._adaptiveBlurKernel=0,l._blurKernelX=0,l._blurKernelY=0,l._blurRatio=1,!(i=l.getScene()))return l;l.ignoreCameraViewport=!0,l._updateGammaSpace(),l._imageProcessingConfigChangeObserver=i.imageProcessingConfiguration.onUpdateParameters.add((function(){l._updateGammaSpace()}));var u,h=i.getEngine();return h.supportsUniformBuffers&&(l._sceneUBO=i.createSceneUniformBuffer('Scene for Mirror Texture (name "'.concat(t,'")'))),l.onBeforeBindObservable.add((function(){var e;null===(e=h._debugPushGroup)||void 0===e||e.call(h,"mirror generation for ".concat(t),1)})),l.onAfterUnbindObservable.add((function(){var e;null===(e=h._debugPopGroup)||void 0===e||e.call(h,1)})),l.onBeforeRenderObservable.add((function(){l._sceneUBO&&(l._currentSceneUBO=i.getSceneUniformBuffer(),i.setSceneUniformBuffer(l._sceneUBO),i.getSceneUniformBuffer().unbindEffect()),R.ReflectionToRef(l.mirrorPlane,l._mirrorMatrix),l._mirrorMatrix.multiplyToRef(i.getViewMatrix(),l._transformMatrix),i.setTransformMatrix(l._transformMatrix,i.getProjectionMatrix()),u=i.clipPlane,i.clipPlane=l.mirrorPlane,i._mirroredCameraPosition=C.TransformCoordinates(i.activeCamera.globalPosition,l._mirrorMatrix)})),l.onAfterRenderObservable.add((function(){l._sceneUBO&&i.setSceneUniformBuffer(l._currentSceneUBO),i.updateTransformMatrix(),i._mirroredCameraPosition=null,i.clipPlane=u})),l}return H(t,e),Object.defineProperty(t.prototype,"blurRatio",{get:function(){return this._blurRatio},set:function(e){this._blurRatio!==e&&(this._blurRatio=e,this._preparePostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adaptiveBlurKernel",{set:function(e){this._adaptiveBlurKernel=e,this._autoComputeBlurKernel()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurKernel",{set:function(e){this.blurKernelX=e,this.blurKernelY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurKernelX",{get:function(){return this._blurKernelX},set:function(e){this._blurKernelX!==e&&(this._blurKernelX=e,this._preparePostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurKernelY",{get:function(){return this._blurKernelY},set:function(e){this._blurKernelY!==e&&(this._blurKernelY=e,this._preparePostProcesses())},enumerable:!1,configurable:!0}),t.prototype._autoComputeBlurKernel=function(){var e=this.getScene().getEngine(),t=this.getRenderWidth()/e.getRenderWidth(),n=this.getRenderHeight()/e.getRenderHeight();this.blurKernelX=this._adaptiveBlurKernel*t,this.blurKernelY=this._adaptiveBlurKernel*n},t.prototype._onRatioRescale=function(){this._sizeRatio&&(this.resize(this._initialSizeParameter),this._adaptiveBlurKernel||this._preparePostProcesses()),this._adaptiveBlurKernel&&this._autoComputeBlurKernel()},t.prototype._updateGammaSpace=function(){var e=this.getScene();e&&(this.gammaSpace=!e.imageProcessingConfiguration.isEnabled||!e.imageProcessingConfiguration.applyByPostProcess)},t.prototype._preparePostProcesses=function(){if(this.clearPostProcesses(!0),this._blurKernelX&&this._blurKernelY){var e=this.getScene().getEngine(),t=e.getCaps().textureFloatRender&&e.getCaps().textureFloatLinearFiltering?a.TEXTURETYPE_FLOAT:a.TEXTURETYPE_HALF_FLOAT;this._blurX=new sm("horizontal blur",new S(1,0),this._blurKernelX,this._blurRatio,null,Eo.BILINEAR_SAMPLINGMODE,e,!1,t),this._blurX.autoClear=!1,1===this._blurRatio&&this.samples<2&&this._texture?this._blurX.inputTexture=this._renderTarget:this._blurX.alwaysForcePOT=!0,this._blurY=new sm("vertical blur",new S(0,1),this._blurKernelY,this._blurRatio,null,Eo.BILINEAR_SAMPLINGMODE,e,!1,t),this._blurY.autoClear=!1,this._blurY.alwaysForcePOT=1!==this._blurRatio,this.addPostProcess(this._blurX),this.addPostProcess(this._blurY)}else this._blurY&&(this.removePostProcess(this._blurY),this._blurY.dispose(),this._blurY=null),this._blurX&&(this.removePostProcess(this._blurX),this._blurX.dispose(),this._blurX=null)},t.prototype.clone=function(){var e=this.getScene();if(!e)return this;var n=this.getSize(),i=new t(this.name,n.width,e,this._renderTargetOptions.generateMipMaps,this._renderTargetOptions.type,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.mirrorPlane=this.mirrorPlane.clone(),this.renderList&&(i.renderList=this.renderList.slice(0)),i},t.prototype.serialize=function(){if(!this.name)return null;var t=e.prototype.serialize.call(this);return t.mirrorPlane=this.mirrorPlane.asArray(),t},t.prototype.dispose=function(){var t;e.prototype.dispose.call(this);var n=this.getScene();n&&n.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver),null===(t=this._sceneUBO)||void 0===t||t.dispose()},t}(rs);Eo._CreateMirror=function(e,t,n,i){return new cm(e,t,n,i)};var lm=function(e){function t(t,n,i,r,o,s,c,l,h,d,p,f,m,_,g){void 0===i&&(i=null),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===s&&(s=null),void 0===c&&(c=null),void 0===l&&(l=a.TEXTUREFORMAT_RGBA),void 0===h&&(h=!1),void 0===d&&(d=null),void 0===p&&(p=!1),void 0===f&&(f=.8),void 0===m&&(m=0);var y,v=this;return(v=e.call(this,n)||this)._lodScale=.8,v._lodOffset=0,v.onLoadObservable=new u,v.boundingBoxPosition=C.Zero(),v._rotationY=0,v._files=null,v._forcedExtension=null,v._extensions=null,v._textureMatrixRefraction=new R,v.name=t,v.url=t,v._noMipmap=r,v.hasAlpha=!1,v._format=l,v.isCube=!0,v._textureMatrix=R.Identity(),v._createPolynomials=p,v.coordinatesMode=Eo.CUBIC_MODE,v._extensions=i,v._files=o,v._forcedExtension=d,v._loaderOptions=_,v._useSRGBBuffer=g,v._lodScale=f,v._lodOffset=m,t||o?(v.updateURL(t,d,s,h,c,i,null===(y=v.getScene())||void 0===y?void 0:y.useDelayedTextureLoading,o),v):v}return H(t,e),Object.defineProperty(t.prototype,"boundingBoxSize",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationY",{get:function(){return this._rotationY},set:function(e){this._rotationY=e,this.setReflectionTextureMatrix(R.RotationY(this._rotationY))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noMipmap",{get:function(){return this._noMipmap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"forcedExtension",{get:function(){return this._forcedExtension},enumerable:!1,configurable:!0}),t.CreateFromImages=function(e,n,i){var r="";return e.forEach((function(e){return r+=e})),new t(r,n,null,i,e)},t.CreateFromPrefilteredData=function(e,n,i,r){void 0===i&&(i=null),void 0===r&&(r=!0);var o=n.useDelayedTextureLoading;n.useDelayedTextureLoading=!1;var a=new t(e,n,null,!1,null,null,null,void 0,!0,i,r);return n.useDelayedTextureLoading=o,a},t.prototype.getClassName=function(){return"CubeTexture"},t.prototype.updateURL=function(e,t,n,i,r,o,s,c){void 0===n&&(n=null),void 0===i&&(i=!1),void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=!1),void 0===c&&(c=null),this.name&&!this.name.startsWith("data:")||(this.name=e),this.url=e,t&&(this._forcedExtension=t);var l=e.lastIndexOf("."),u=t||(l>-1?e.substring(l).toLowerCase():""),h=0===u.indexOf(".dds"),d=0===u.indexOf(".env"),p=0===u.indexOf(".basis");if(d?(this.gammaSpace=!1,this._prefiltered=!1,this.anisotropicFilteringLevel=1):(this._prefiltered=i,i&&(this.gammaSpace=!1,this.anisotropicFilteringLevel=1)),c)this._files=c;else if(p||d||h||o||(o=["_px.jpg","_py.jpg","_pz.jpg","_nx.jpg","_ny.jpg","_nz.jpg"]),this._files=this._files||[],this._files.length=0,o){for(var f=0;f0,r.LODINREFLECTIONALPHA=s.lodLevelInAlpha,r.EQUIRECTANGULAR_RELFECTION_FOV=this.useEquirectangularFOV,r.REFLECTIONBGR=this.switchToBGR,s.coordinatesMode===Eo.INVCUBIC_MODE&&(r.INVERTCUBICMAP=!0),r.REFLECTIONMAP_3D=s.isCube,r.REFLECTIONMAP_OPPOSITEZ=r.REFLECTIONMAP_3D&&this.getScene().useRightHandedSystem?!s.invertZ:s.invertZ,s.coordinatesMode){case Eo.EXPLICIT_MODE:r.REFLECTIONMAP_EXPLICIT=!0;break;case Eo.PLANAR_MODE:r.REFLECTIONMAP_PLANAR=!0;break;case Eo.PROJECTION_MODE:r.REFLECTIONMAP_PROJECTION=!0;break;case Eo.SKYBOX_MODE:r.REFLECTIONMAP_SKYBOX=!0;break;case Eo.SPHERICAL_MODE:r.REFLECTIONMAP_SPHERICAL=!0;break;case Eo.EQUIRECTANGULAR_MODE:r.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case Eo.FIXED_EQUIRECTANGULAR_MODE:r.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case Eo.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:r.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case Eo.CUBIC_MODE:case Eo.INVCUBIC_MODE:default:r.REFLECTIONMAP_CUBIC=!0}this.reflectionFresnel?(r.REFLECTIONFRESNEL=!0,r.REFLECTIONFALLOFF=this.reflectionFalloffDistance>0,this._reflectionControls.x=this.reflectionAmount,this._reflectionControls.y=this.reflectionReflectance0,this._reflectionControls.z=this.reflectionReflectance90,this._reflectionControls.w=1/this.reflectionFalloffDistance):(r.REFLECTIONFRESNEL=!1,r.REFLECTIONFALLOFF=!1)}else r.REFLECTION=!1,r.REFLECTIONFRESNEL=!1,r.REFLECTIONFALLOFF=!1,r.REFLECTIONBLUR=!1,r.REFLECTIONMAP_3D=!1,r.REFLECTIONMAP_SPHERICAL=!1,r.REFLECTIONMAP_PLANAR=!1,r.REFLECTIONMAP_CUBIC=!1,r.REFLECTIONMAP_PROJECTION=!1,r.REFLECTIONMAP_SKYBOX=!1,r.REFLECTIONMAP_EXPLICIT=!1,r.REFLECTIONMAP_EQUIRECTANGULAR=!1,r.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,r.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,r.INVERTCUBICMAP=!1,r.REFLECTIONMAP_OPPOSITEZ=!1,r.LODINREFLECTIONALPHA=!1,r.GAMMAREFLECTION=!1,r.RGBDREFLECTION=!1}r.PREMULTIPLYALPHA=this.alphaMode===a.ALPHA_PREMULTIPLIED||this.alphaMode===a.ALPHA_PREMULTIPLIED_PORTERDUFF,r.USERGBCOLOR=this._useRGBColor,r.NOISE=this._enableNoise}if(r._areLightsDirty&&(r.USEHIGHLIGHTANDSHADOWCOLORS=!this._useRGBColor&&(0!==this._primaryColorShadowLevel||0!==this._primaryColorHighlightLevel),r.BACKMAT_SHADOWONLY=this._shadowOnly),r._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(r)}if(r._areMiscDirty&&(r.REFLECTIONMAP_3D&&this._enableGroundProjection?(r.PROJECTED_GROUND=!0,r.REFLECTIONMAP_SKYBOX=!0):r.PROJECTED_GROUND=!1),Xr.PrepareDefinesForMisc(e,i,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e),r),Xr.PrepareDefinesForFrameBoundValues(i,o,this,r,n,null,t.getRenderingMesh().hasThinInstances),Xr.PrepareDefinesForAttributes(e,r,!1,!0,!1)&&e&&(i.getEngine().getCaps().standardDerivatives||e.isVerticesDataPresent(Yn.NormalKind)||(e.createNormals(!0),J.Warn("BackgroundMaterial: Normals have been created for the mesh: "+e.name))),r.isDirty){r.markAsProcessed(),i.resetCachedMaterial();var c=new Oa;r.FOG&&c.addFallback(0,"FOG"),r.POINTSIZE&&c.addFallback(1,"POINTSIZE"),r.MULTIVIEW&&c.addFallback(0,"MULTIVIEW"),Xr.HandleFallbacksForShadows(r,c,this._maxSimultaneousLights);var l=[Yn.PositionKind];r.NORMAL&&l.push(Yn.NormalKind),r.UV1&&l.push(Yn.UVKind),r.UV2&&l.push(Yn.UV2Kind),Xr.PrepareAttributesForBones(l,e,r,c),Xr.PrepareAttributesForInstances(l,r);var u=["world","view","viewProjection","vEyePosition","vLightsType","vFogInfos","vFogColor","pointSize","mBones","vPrimaryColor","vPrimaryColorShadow","vReflectionInfos","reflectionMatrix","vReflectionMicrosurfaceInfos","fFovMultiplier","shadowLevel","alpha","vBackgroundCenter","vReflectionControl","vDiffuseInfos","diffuseMatrix","projectedGroundInfos","logarithmicDepthConstant"];Vr(u);var h=["diffuseSampler","reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh"],d=["Material","Scene"];Fn&&(Fn.PrepareUniforms(u,r),Fn.PrepareSamplers(h,r)),Xr.PrepareUniformsAndSamplersList({uniformsNames:u,uniformBuffersNames:d,samplers:h,defines:r,maxSimultaneousLights:this._maxSimultaneousLights});var p=r.toString(),f=i.getEngine().createEffect("background",{attributes:l,uniformsNames:u,uniformBuffersNames:d,samplers:h,defines:p,fallbacks:c,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights}},o);t.setEffect(f,r,this._materialContext),this.buildUniformLayout()}return!(!t.effect||!t.effect.isReady()||(r._renderId=i.getRenderId(),t.effect._wasPreviouslyReady=!0,t.effect._wasPreviouslyUsingInstances=n,this._checkScenePerformancePriority(),0))},t.prototype._computePrimaryColorFromPerceptualColor=function(){this.__perceptualColor&&(this._primaryColor.copyFrom(this.__perceptualColor),this._primaryColor.toLinearSpaceToRef(this._primaryColor,this.getScene().getEngine().useExactSrgbConversions),this._imageProcessingConfiguration&&this._primaryColor.scaleToRef(1/this._imageProcessingConfiguration.exposure,this._primaryColor),this._computePrimaryColors())},t.prototype._computePrimaryColors=function(){0===this._primaryColorShadowLevel&&0===this._primaryColorHighlightLevel||(this._primaryColor.scaleToRef(this._primaryColorShadowLevel,this._primaryShadowColor),this._primaryColor.subtractToRef(this._primaryShadowColor,this._primaryShadowColor),this._white.subtractToRef(this._primaryColor,this._primaryHighlightColor),this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel,this._primaryHighlightColor),this._primaryColor.addToRef(this._primaryHighlightColor,this._primaryHighlightColor))},t.prototype.buildUniformLayout=function(){this._uniformBuffer.addUniform("vPrimaryColor",4),this._uniformBuffer.addUniform("vPrimaryColorShadow",4),this._uniformBuffer.addUniform("vDiffuseInfos",2),this._uniformBuffer.addUniform("vReflectionInfos",2),this._uniformBuffer.addUniform("diffuseMatrix",16),this._uniformBuffer.addUniform("reflectionMatrix",16),this._uniformBuffer.addUniform("vReflectionMicrosurfaceInfos",3),this._uniformBuffer.addUniform("fFovMultiplier",1),this._uniformBuffer.addUniform("pointSize",1),this._uniformBuffer.addUniform("shadowLevel",1),this._uniformBuffer.addUniform("alpha",1),this._uniformBuffer.addUniform("vBackgroundCenter",3),this._uniformBuffer.addUniform("vReflectionControl",4),this._uniformBuffer.addUniform("projectedGroundInfos",2),this._uniformBuffer.create()},t.prototype.unbind=function(){this._diffuseTexture&&this._diffuseTexture.isRenderTarget&&this._uniformBuffer.setTexture("diffuseSampler",null),this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&this._uniformBuffer.setTexture("reflectionSampler",null),e.prototype.unbind.call(this)},t.prototype.bindOnlyWorldMatrix=function(e){this._activeEffect.setMatrix("world",e)},t.prototype.bindForSubMesh=function(e,t,n){var i=this.getScene(),r=n.materialDefines;if(r){var o=n.effect;if(o){this._activeEffect=o,this.bindOnlyWorldMatrix(e),Xr.BindBonesParameters(t,this._activeEffect);var a=this._mustRebind(i,o,t.visibility);if(a){this._uniformBuffer.bindToEffect(o,"Material"),this.bindViewProjection(o);var s=this._reflectionTexture;this._uniformBuffer.useUbo&&this.isFrozen&&this._uniformBuffer.isSync||(i.texturesEnabled&&(this._diffuseTexture&&tl.DiffuseTextureEnabled&&(this._uniformBuffer.updateFloat2("vDiffuseInfos",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),Xr.BindTextureMatrix(this._diffuseTexture,this._uniformBuffer,"diffuse")),s&&tl.ReflectionTextureEnabled&&(this._uniformBuffer.updateMatrix("reflectionMatrix",s.getReflectionTextureMatrix()),this._uniformBuffer.updateFloat2("vReflectionInfos",s.level,this._reflectionBlur),this._uniformBuffer.updateFloat3("vReflectionMicrosurfaceInfos",s.getSize().width,s.lodGenerationScale,s.lodGenerationOffset))),this.shadowLevel>0&&this._uniformBuffer.updateFloat("shadowLevel",this.shadowLevel),this._uniformBuffer.updateFloat("alpha",this.alpha),this.pointsCloud&&this._uniformBuffer.updateFloat("pointSize",this.pointSize),r.USEHIGHLIGHTANDSHADOWCOLORS?(this._uniformBuffer.updateColor4("vPrimaryColor",this._primaryHighlightColor,1),this._uniformBuffer.updateColor4("vPrimaryColorShadow",this._primaryShadowColor,1)):this._uniformBuffer.updateColor4("vPrimaryColor",this._primaryColor,1)),this._uniformBuffer.updateFloat("fFovMultiplier",this._fovMultiplier),i.texturesEnabled&&(this._diffuseTexture&&tl.DiffuseTextureEnabled&&this._uniformBuffer.setTexture("diffuseSampler",this._diffuseTexture),s&&tl.ReflectionTextureEnabled&&(r.REFLECTIONBLUR&&r.TEXTURELODSUPPORT?this._uniformBuffer.setTexture("reflectionSampler",s):r.REFLECTIONBLUR?(this._uniformBuffer.setTexture("reflectionSampler",s._lodTextureMid||s),this._uniformBuffer.setTexture("reflectionSamplerLow",s._lodTextureLow||s),this._uniformBuffer.setTexture("reflectionSamplerHigh",s._lodTextureHigh||s)):this._uniformBuffer.setTexture("reflectionSampler",s),r.REFLECTIONFRESNEL&&(this._uniformBuffer.updateFloat3("vBackgroundCenter",this.sceneCenter.x,this.sceneCenter.y,this.sceneCenter.z),this._uniformBuffer.updateFloat4("vReflectionControl",this._reflectionControls.x,this._reflectionControls.y,this._reflectionControls.z,this._reflectionControls.w))),r.PROJECTED_GROUND&&this._uniformBuffer.updateFloat2("projectedGroundInfos",this.projectedGroundRadius,this.projectedGroundHeight)),Hr(this._activeEffect,this,i),i.bindEyePosition(o)}else i.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._uniformBuffer.bindToEffect(o,"Material"),this._needToBindSceneUbo=!0);!a&&this.isFrozen||(i.lightsEnabled&&Xr.BindLights(i,t,this._activeEffect,r,this._maxSimultaneousLights),this.bindView(o),Xr.BindFogParameters(i,t,this._activeEffect,!0),this._useLogarithmicDepth&&Xr.BindLogDepth(r,o,i),this._imageProcessingConfiguration&&this._imageProcessingConfiguration.bind(this._activeEffect)),this._afterBind(t,this._activeEffect),this._uniformBuffer.update()}}},t.prototype.hasTexture=function(t){return!!e.prototype.hasTexture.call(this,t)||this._reflectionTexture===t||this._diffuseTexture===t},t.prototype.dispose=function(t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),n&&(this.diffuseTexture&&this.diffuseTexture.dispose(),this.reflectionTexture&&this.reflectionTexture.dispose()),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e.prototype.dispose.call(this,t)},t.prototype.clone=function(e){var n=this;return ke.Clone((function(){return new t(e,n.getScene())}),this)},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.customType="BABYLON.BackgroundMaterial",t},t.prototype.getClassName=function(){return"BackgroundMaterial"},t.Parse=function(e,n,i){return ke.Parse((function(){return new t(e.name,n)}),e,n,i)},t.StandardReflectance0=.05,t.StandardReflectance90=.5,W([Pe()],t.prototype,"_primaryColor",void 0),W([xe("_markAllSubMeshesAsLightsDirty")],t.prototype,"primaryColor",void 0),W([Pe()],t.prototype,"__perceptualColor",void 0),W([Se()],t.prototype,"_primaryColorShadowLevel",void 0),W([Se()],t.prototype,"_primaryColorHighlightLevel",void 0),W([xe("_markAllSubMeshesAsLightsDirty")],t.prototype,"primaryColorHighlightLevel",null),W([Ce()],t.prototype,"_reflectionTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),W([Se()],t.prototype,"_reflectionBlur",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionBlur",void 0),W([Ce()],t.prototype,"_diffuseTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"diffuseTexture",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"shadowLights",void 0),W([Se()],t.prototype,"_shadowLevel",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"shadowLevel",void 0),W([Oe()],t.prototype,"_sceneCenter",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"sceneCenter",void 0),W([Se()],t.prototype,"_opacityFresnel",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"opacityFresnel",void 0),W([Se()],t.prototype,"_reflectionFresnel",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionFresnel",void 0),W([Se()],t.prototype,"_reflectionFalloffDistance",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionFalloffDistance",void 0),W([Se()],t.prototype,"_reflectionAmount",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionAmount",void 0),W([Se()],t.prototype,"_reflectionReflectance0",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionReflectance0",void 0),W([Se()],t.prototype,"_reflectionReflectance90",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionReflectance90",void 0),W([Se()],t.prototype,"_useRGBColor",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRGBColor",void 0),W([Se()],t.prototype,"_enableNoise",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"enableNoise",void 0),W([Se()],t.prototype,"_maxSimultaneousLights",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"maxSimultaneousLights",void 0),W([Se()],t.prototype,"_shadowOnly",void 0),W([xe("_markAllSubMeshesAsLightsDirty")],t.prototype,"shadowOnly",void 0),W([Ne()],t.prototype,"_imageProcessingConfiguration",void 0),W([Se(),xe("_markAllSubMeshesAsMiscDirty")],t.prototype,"enableGroundProjection",void 0),W([Se()],t.prototype,"projectedGroundRadius",void 0),W([Se()],t.prototype,"projectedGroundHeight",void 0),t}(oa);b("BABYLON.BackgroundMaterial",hm);var dm=function(){function e(t,n){var i=this;this._errorHandler=function(e,t){i.onErrorObservable.notifyObservers({message:e,exception:t})},this._options=j(j({},e._GetDefaultOptions(n)),t),this._scene=n,this.onErrorObservable=new u,this._setupBackground(),this._setupImageProcessing()}return e._GetDefaultOptions=function(e){return{createGround:!0,groundSize:15,groundTexture:this._GroundTextureCDNUrl,groundColor:new B(.2,.2,.3).toLinearSpace(e.getEngine().useExactSrgbConversions).scale(3),groundOpacity:.9,enableGroundShadow:!0,groundShadowLevel:.5,enableGroundMirror:!1,groundMirrorSizeRatio:.3,groundMirrorBlurKernel:64,groundMirrorAmount:1,groundMirrorFresnelWeight:1,groundMirrorFallOffDistance:0,groundMirrorTextureType:a.TEXTURETYPE_UNSIGNED_INT,groundYBias:1e-5,createSkybox:!0,skyboxSize:20,skyboxTexture:this._SkyboxTextureCDNUrl,skyboxColor:new B(.2,.2,.3).toLinearSpace(e.getEngine().useExactSrgbConversions).scale(3),backgroundYRotation:0,sizeAuto:!0,rootPosition:C.Zero(),setupImageProcessing:!0,environmentTexture:this._EnvironmentTextureCDNUrl,cameraExposure:.8,cameraContrast:1.2,toneMappingEnabled:!0}},Object.defineProperty(e.prototype,"rootMesh",{get:function(){return this._rootMesh},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skybox",{get:function(){return this._skybox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skyboxTexture",{get:function(){return this._skyboxTexture},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skyboxMaterial",{get:function(){return this._skyboxMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ground",{get:function(){return this._ground},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groundTexture",{get:function(){return this._groundTexture},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groundMirror",{get:function(){return this._groundMirror},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groundMirrorRenderList",{get:function(){return this._groundMirror?this._groundMirror.renderList:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groundMaterial",{get:function(){return this._groundMaterial},enumerable:!1,configurable:!0}),e.prototype.updateOptions=function(e){var t=j(j({},this._options),e);this._ground&&!t.createGround&&(this._ground.dispose(),this._ground=null),this._groundMaterial&&!t.createGround&&(this._groundMaterial.dispose(),this._groundMaterial=null),this._groundTexture&&this._options.groundTexture!=t.groundTexture&&(this._groundTexture.dispose(),this._groundTexture=null),this._skybox&&!t.createSkybox&&(this._skybox.dispose(),this._skybox=null),this._skyboxMaterial&&!t.createSkybox&&(this._skyboxMaterial.dispose(),this._skyboxMaterial=null),this._skyboxTexture&&this._options.skyboxTexture!=t.skyboxTexture&&(this._skyboxTexture.dispose(),this._skyboxTexture=null),this._groundMirror&&!t.enableGroundMirror&&(this._groundMirror.dispose(),this._groundMirror=null),this._scene.environmentTexture&&this._options.environmentTexture!=t.environmentTexture&&this._scene.environmentTexture.dispose(),this._options=t,this._setupBackground(),this._setupImageProcessing()},e.prototype.setMainColor=function(e){this.groundMaterial&&(this.groundMaterial.primaryColor=e),this.skyboxMaterial&&(this.skyboxMaterial.primaryColor=e),this.groundMirror&&(this.groundMirror.clearColor=new U(e.r,e.g,e.b,1))},e.prototype._setupImageProcessing=function(){this._options.setupImageProcessing&&(this._scene.imageProcessingConfiguration.contrast=this._options.cameraContrast,this._scene.imageProcessingConfiguration.exposure=this._options.cameraExposure,this._scene.imageProcessingConfiguration.toneMappingEnabled=this._options.toneMappingEnabled,this._setupEnvironmentTexture())},e.prototype._setupEnvironmentTexture=function(){if(!this._scene.environmentTexture)if(this._options.environmentTexture instanceof go)this._scene.environmentTexture=this._options.environmentTexture;else{var e=lm.CreateFromPrefilteredData(this._options.environmentTexture,this._scene);this._scene.environmentTexture=e}},e.prototype._setupBackground=function(){this._rootMesh||(this._rootMesh=new no("BackgroundHelper",this._scene)),this._rootMesh.rotation.y=this._options.backgroundYRotation;var e=this._getSceneSize();this._options.createGround&&(this._setupGround(e),this._setupGroundMaterial(),this._setupGroundDiffuseTexture(),this._options.enableGroundMirror&&this._setupGroundMirrorTexture(e),this._setupMirrorInGroundMaterial()),this._options.createSkybox&&(this._setupSkybox(e),this._setupSkyboxMaterial(),this._setupSkyboxReflectionTexture()),this._rootMesh.position.x=e.rootPosition.x,this._rootMesh.position.z=e.rootPosition.z,this._rootMesh.position.y=e.rootPosition.y},e.prototype._getSceneSize=function(){var e=this,t=this._options.groundSize,n=this._options.skyboxSize,i=this._options.rootPosition;if(!this._scene.meshes||1===this._scene.meshes.length)return{groundSize:t,skyboxSize:n,rootPosition:i};var r=this._scene.getWorldExtends((function(t){return t!==e._ground&&t!==e._rootMesh&&t!==e._skybox})),o=r.max.subtract(r.min);if(this._options.sizeAuto){this._scene.activeCamera instanceof uc&&this._scene.activeCamera.upperRadiusLimit&&(n=t=2*this._scene.activeCamera.upperRadiusLimit);var a=o.length();a>t&&(n=t=2*a),t*=1.1,n*=1.5,(i=r.min.add(o.scale(.5))).y=r.min.y-this._options.groundYBias}return{groundSize:t,skyboxSize:n,rootPosition:i}},e.prototype._setupGround=function(e){var t=this;this._ground&&!this._ground.isDisposed()||(this._ground=Bo("BackgroundPlane",{size:e.groundSize},this._scene),this._ground.rotation.x=Math.PI/2,this._ground.parent=this._rootMesh,this._ground.onDisposeObservable.add((function(){t._ground=null}))),this._ground.receiveShadows=this._options.enableGroundShadow},e.prototype._setupGroundMaterial=function(){this._groundMaterial||(this._groundMaterial=new hm("BackgroundPlaneMaterial",this._scene)),this._groundMaterial.alpha=this._options.groundOpacity,this._groundMaterial.alphaMode=a.ALPHA_PREMULTIPLIED_PORTERDUFF,this._groundMaterial.shadowLevel=this._options.groundShadowLevel,this._groundMaterial.primaryColor=this._options.groundColor,this._groundMaterial.useRGBColor=!1,this._groundMaterial.enableNoise=!0,this._ground&&(this._ground.material=this._groundMaterial)},e.prototype._setupGroundDiffuseTexture=function(){this._groundMaterial&&(this._groundTexture||(this._options.groundTexture instanceof go?this._groundMaterial.diffuseTexture=this._options.groundTexture:(this._groundTexture=new Eo(this._options.groundTexture,this._scene,void 0,void 0,void 0,void 0,this._errorHandler),this._groundTexture.gammaSpace=!1,this._groundTexture.hasAlpha=!0,this._groundMaterial.diffuseTexture=this._groundTexture)))},e.prototype._setupGroundMirrorTexture=function(e){var t=Eo.CLAMP_ADDRESSMODE;if(!this._groundMirror&&(this._groundMirror=new cm("BackgroundPlaneMirrorTexture",{ratio:this._options.groundMirrorSizeRatio},this._scene,!1,this._options.groundMirrorTextureType,Eo.BILINEAR_SAMPLINGMODE,!0),this._groundMirror.mirrorPlane=new bi(0,-1,0,e.rootPosition.y),this._groundMirror.anisotropicFilteringLevel=1,this._groundMirror.wrapU=t,this._groundMirror.wrapV=t,this._groundMirror.renderList))for(var n=0;n0&&e.push(this._texture),this._textureRoughness&&this._textureRoughness.animations&&this._textureRoughness.animations.length>0&&e.push(this._textureRoughness),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&e.push(this._bumpTexture),this._tintTexture&&this._tintTexture.animations&&this._tintTexture.animations.length>0&&e.push(this._tintTexture)},t.prototype.dispose=function(e){var t,n,i,r;e&&(null===(t=this._texture)||void 0===t||t.dispose(),null===(n=this._textureRoughness)||void 0===n||n.dispose(),null===(i=this._bumpTexture)||void 0===i||i.dispose(),null===(r=this._tintTexture)||void 0===r||r.dispose())},t.prototype.getClassName=function(){return"PBRClearCoatConfiguration"},t.prototype.addFallbacks=function(e,t,n){return e.CLEARCOAT_BUMP&&t.addFallback(n++,"CLEARCOAT_BUMP"),e.CLEARCOAT_TINT&&t.addFallback(n++,"CLEARCOAT_TINT"),e.CLEARCOAT&&t.addFallback(n++,"CLEARCOAT"),n},t.prototype.getSamplers=function(e){e.push("clearCoatSampler","clearCoatRoughnessSampler","clearCoatBumpSampler","clearCoatTintSampler")},t.prototype.getUniforms=function(){return{ubo:[{name:"vClearCoatParams",size:2,type:"vec2"},{name:"vClearCoatRefractionParams",size:4,type:"vec4"},{name:"vClearCoatInfos",size:4,type:"vec4"},{name:"clearCoatMatrix",size:16,type:"mat4"},{name:"clearCoatRoughnessMatrix",size:16,type:"mat4"},{name:"vClearCoatBumpInfos",size:2,type:"vec2"},{name:"vClearCoatTangentSpaceParams",size:2,type:"vec2"},{name:"clearCoatBumpMatrix",size:16,type:"mat4"},{name:"vClearCoatTintParams",size:4,type:"vec4"},{name:"clearCoatColorAtDistance",size:1,type:"float"},{name:"vClearCoatTintInfos",size:2,type:"vec2"},{name:"clearCoatTintMatrix",size:16,type:"mat4"}]}},t._DefaultIndexOfRefraction=1.5,W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"isEnabled",void 0),W([Se()],t.prototype,"intensity",void 0),W([Se()],t.prototype,"roughness",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"indexOfRefraction",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"texture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMainTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"textureRoughness",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"remapF0OnInterfaceChange",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"bumpTexture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"isTintEnabled",void 0),W([Pe()],t.prototype,"tintColor",void 0),W([Se()],t.prototype,"tintColorAtDistance",void 0),W([Se()],t.prototype,"tintThickness",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"tintTexture",void 0),t}(ul),Em=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.IRIDESCENCE=!1,t.IRIDESCENCE_TEXTURE=!1,t.IRIDESCENCE_TEXTUREDIRECTUV=0,t.IRIDESCENCE_THICKNESS_TEXTURE=!1,t.IRIDESCENCE_THICKNESS_TEXTUREDIRECTUV=0,t.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE=!1,t}return H(t,e),t}(Dn),Am=function(e){function t(n,i){void 0===i&&(i=!0);var r=e.call(this,n,"PBRIridescence",110,new Em,i)||this;return r._isEnabled=!1,r.isEnabled=!1,r.intensity=1,r.minimumThickness=t._DefaultMinimumThickness,r.maximumThickness=t._DefaultMaximumThickness,r.indexOfRefraction=t._DefaultIndexOfRefraction,r._texture=null,r.texture=null,r._thicknessTexture=null,r.thicknessTexture=null,r._internalMarkAllSubMeshesAsTexturesDirty=n._dirtyCallbacks[a.MATERIAL_TextureDirtyFlag],r}return H(t,e),t.prototype._markAllSubMeshesAsTexturesDirty=function(){this._enable(this._isEnabled),this._internalMarkAllSubMeshesAsTexturesDirty()},t.prototype.isReadyForSubMesh=function(e,t){if(!this._isEnabled)return!0;if(e._areTexturesDirty&&t.texturesEnabled){if(this._texture&&tl.IridescenceTextureEnabled&&!this._texture.isReadyOrNotBlocking())return!1;if(this._thicknessTexture&&tl.IridescenceTextureEnabled&&!this._thicknessTexture.isReadyOrNotBlocking())return!1}return!0},t.prototype.prepareDefinesBeforeAttributes=function(e,t){var n;this._isEnabled?(e.IRIDESCENCE=!0,e.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE=null!==this._texture&&this._texture._texture===(null===(n=this._thicknessTexture)||void 0===n?void 0:n._texture)&&this._texture.checkTransformsAreIdentical(this._thicknessTexture),e._areTexturesDirty&&t.texturesEnabled&&(this._texture&&tl.IridescenceTextureEnabled?Xr.PrepareDefinesForMergedUV(this._texture,e,"IRIDESCENCE_TEXTURE"):e.IRIDESCENCE_TEXTURE=!1,!e.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE&&this._thicknessTexture&&tl.IridescenceTextureEnabled?Xr.PrepareDefinesForMergedUV(this._thicknessTexture,e,"IRIDESCENCE_THICKNESS_TEXTURE"):e.IRIDESCENCE_THICKNESS_TEXTURE=!1)):(e.IRIDESCENCE=!1,e.IRIDESCENCE_TEXTURE=!1,e.IRIDESCENCE_THICKNESS_TEXTURE=!1,e.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE=!1,e.IRIDESCENCE_TEXTUREDIRECTUV=0,e.IRIDESCENCE_THICKNESS_TEXTUREDIRECTUV=0)},t.prototype.bindForSubMesh=function(e,t,n,i){var r,o,a,s,c,l,u,h;if(this._isEnabled){var d=i.materialDefines,p=this._material.isFrozen,f=d.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE;e.useUbo&&p&&e.isSync||(f&&tl.IridescenceTextureEnabled?(e.updateFloat4("vIridescenceInfos",this._texture.coordinatesIndex,this._texture.level,-1,-1),Xr.BindTextureMatrix(this._texture,e,"iridescence")):(this._texture||this._thicknessTexture)&&tl.IridescenceTextureEnabled&&(e.updateFloat4("vIridescenceInfos",null!==(o=null===(r=this._texture)||void 0===r?void 0:r.coordinatesIndex)&&void 0!==o?o:0,null!==(s=null===(a=this._texture)||void 0===a?void 0:a.level)&&void 0!==s?s:0,null!==(l=null===(c=this._thicknessTexture)||void 0===c?void 0:c.coordinatesIndex)&&void 0!==l?l:0,null!==(h=null===(u=this._thicknessTexture)||void 0===u?void 0:u.level)&&void 0!==h?h:0),this._texture&&Xr.BindTextureMatrix(this._texture,e,"iridescence"),!this._thicknessTexture||f||d.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE||Xr.BindTextureMatrix(this._thicknessTexture,e,"iridescenceThickness")),e.updateFloat4("vIridescenceParams",this.intensity,this.indexOfRefraction,this.minimumThickness,this.maximumThickness)),t.texturesEnabled&&(this._texture&&tl.IridescenceTextureEnabled&&e.setTexture("iridescenceSampler",this._texture),this._thicknessTexture&&!f&&!d.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE&&tl.IridescenceTextureEnabled&&e.setTexture("iridescenceThicknessSampler",this._thicknessTexture))}},t.prototype.hasTexture=function(e){return this._texture===e||this._thicknessTexture===e},t.prototype.getActiveTextures=function(e){this._texture&&e.push(this._texture),this._thicknessTexture&&e.push(this._thicknessTexture)},t.prototype.getAnimatables=function(e){this._texture&&this._texture.animations&&this._texture.animations.length>0&&e.push(this._texture),this._thicknessTexture&&this._thicknessTexture.animations&&this._thicknessTexture.animations.length>0&&e.push(this._thicknessTexture)},t.prototype.dispose=function(e){var t,n;e&&(null===(t=this._texture)||void 0===t||t.dispose(),null===(n=this._thicknessTexture)||void 0===n||n.dispose())},t.prototype.getClassName=function(){return"PBRIridescenceConfiguration"},t.prototype.addFallbacks=function(e,t,n){return e.IRIDESCENCE&&t.addFallback(n++,"IRIDESCENCE"),n},t.prototype.getSamplers=function(e){e.push("iridescenceSampler","iridescenceThicknessSampler")},t.prototype.getUniforms=function(){return{ubo:[{name:"vIridescenceParams",size:4,type:"vec4"},{name:"vIridescenceInfos",size:4,type:"vec4"},{name:"iridescenceMatrix",size:16,type:"mat4"},{name:"iridescenceThicknessMatrix",size:16,type:"mat4"}]}},t._DefaultMinimumThickness=100,t._DefaultMaximumThickness=400,t._DefaultIndexOfRefraction=1.3,W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"isEnabled",void 0),W([Se()],t.prototype,"intensity",void 0),W([Se()],t.prototype,"minimumThickness",void 0),W([Se()],t.prototype,"maximumThickness",void 0),W([Se()],t.prototype,"indexOfRefraction",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"texture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"thicknessTexture",void 0),t}(ul),xm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ANISOTROPIC=!1,t.ANISOTROPIC_TEXTURE=!1,t.ANISOTROPIC_TEXTUREDIRECTUV=0,t.ANISOTROPIC_LEGACY=!1,t.MAINUV1=!1,t}return H(t,e),t}(Dn),Sm=function(e){function t(t,n){void 0===n&&(n=!0);var i=e.call(this,t,"PBRAnisotropic",110,new xm,n)||this;return i._isEnabled=!1,i.isEnabled=!1,i.intensity=1,i.direction=new S(1,0),i._texture=null,i.texture=null,i._legacy=!1,i.legacy=!1,i._internalMarkAllSubMeshesAsTexturesDirty=t._dirtyCallbacks[a.MATERIAL_TextureDirtyFlag],i._internalMarkAllSubMeshesAsMiscDirty=t._dirtyCallbacks[a.MATERIAL_MiscDirtyFlag],i}return H(t,e),Object.defineProperty(t.prototype,"angle",{get:function(){return Math.atan2(this.direction.y,this.direction.x)},set:function(e){this.direction.x=Math.cos(e),this.direction.y=Math.sin(e)},enumerable:!1,configurable:!0}),t.prototype._markAllSubMeshesAsTexturesDirty=function(){this._enable(this._isEnabled),this._internalMarkAllSubMeshesAsTexturesDirty()},t.prototype._markAllSubMeshesAsMiscDirty=function(){this._enable(this._isEnabled),this._internalMarkAllSubMeshesAsMiscDirty()},t.prototype.isReadyForSubMesh=function(e,t){return!this._isEnabled||!(e._areTexturesDirty&&t.texturesEnabled&&this._texture&&tl.AnisotropicTextureEnabled&&!this._texture.isReadyOrNotBlocking())},t.prototype.prepareDefinesBeforeAttributes=function(e,t,n){this._isEnabled?(e.ANISOTROPIC=this._isEnabled,this._isEnabled&&!n.isVerticesDataPresent(Yn.TangentKind)&&(e._needUVs=!0,e.MAINUV1=!0),e._areTexturesDirty&&t.texturesEnabled&&(this._texture&&tl.AnisotropicTextureEnabled?Xr.PrepareDefinesForMergedUV(this._texture,e,"ANISOTROPIC_TEXTURE"):e.ANISOTROPIC_TEXTURE=!1),e._areMiscDirty&&(e.ANISOTROPIC_LEGACY=this._legacy)):(e.ANISOTROPIC=!1,e.ANISOTROPIC_TEXTURE=!1,e.ANISOTROPIC_TEXTUREDIRECTUV=0,e.ANISOTROPIC_LEGACY=!1)},t.prototype.bindForSubMesh=function(e,t){if(this._isEnabled){var n=this._material.isFrozen;e.useUbo&&n&&e.isSync||(this._texture&&tl.AnisotropicTextureEnabled&&(e.updateFloat2("vAnisotropyInfos",this._texture.coordinatesIndex,this._texture.level),Xr.BindTextureMatrix(this._texture,e,"anisotropy")),e.updateFloat3("vAnisotropy",this.direction.x,this.direction.y,this.intensity)),t.texturesEnabled&&this._texture&&tl.AnisotropicTextureEnabled&&e.setTexture("anisotropySampler",this._texture)}},t.prototype.hasTexture=function(e){return this._texture===e},t.prototype.getActiveTextures=function(e){this._texture&&e.push(this._texture)},t.prototype.getAnimatables=function(e){this._texture&&this._texture.animations&&this._texture.animations.length>0&&e.push(this._texture)},t.prototype.dispose=function(e){e&&this._texture&&this._texture.dispose()},t.prototype.getClassName=function(){return"PBRAnisotropicConfiguration"},t.prototype.addFallbacks=function(e,t,n){return e.ANISOTROPIC&&t.addFallback(n++,"ANISOTROPIC"),n},t.prototype.getSamplers=function(e){e.push("anisotropySampler")},t.prototype.getUniforms=function(){return{ubo:[{name:"vAnisotropy",size:3,type:"vec3"},{name:"vAnisotropyInfos",size:2,type:"vec2"},{name:"anisotropyMatrix",size:16,type:"mat4"}]}},t.prototype.parse=function(t,n,i){e.prototype.parse.call(this,t,n,i),void 0===t.legacy&&(this.legacy=!0)},W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"isEnabled",void 0),W([Se()],t.prototype,"intensity",void 0),W([Re()],t.prototype,"direction",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"texture",void 0),W([Se(),xe("_markAllSubMeshesAsMiscDirty")],t.prototype,"legacy",void 0),t}(ul),Cm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.SHEEN=!1,t.SHEEN_TEXTURE=!1,t.SHEEN_GAMMATEXTURE=!1,t.SHEEN_TEXTURE_ROUGHNESS=!1,t.SHEEN_TEXTUREDIRECTUV=0,t.SHEEN_TEXTURE_ROUGHNESSDIRECTUV=0,t.SHEEN_LINKWITHALBEDO=!1,t.SHEEN_ROUGHNESS=!1,t.SHEEN_ALBEDOSCALING=!1,t.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,t.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL=!1,t}return H(t,e),t}(Dn),Pm=function(e){function t(t,n){void 0===n&&(n=!0);var i=e.call(this,t,"Sheen",120,new Cm,n)||this;return i._isEnabled=!1,i.isEnabled=!1,i._linkSheenWithAlbedo=!1,i.linkSheenWithAlbedo=!1,i.intensity=1,i.color=B.White(),i._texture=null,i.texture=null,i._useRoughnessFromMainTexture=!0,i.useRoughnessFromMainTexture=!0,i._roughness=null,i.roughness=null,i._textureRoughness=null,i.textureRoughness=null,i._albedoScaling=!1,i.albedoScaling=!1,i._internalMarkAllSubMeshesAsTexturesDirty=t._dirtyCallbacks[a.MATERIAL_TextureDirtyFlag],i}return H(t,e),t.prototype._markAllSubMeshesAsTexturesDirty=function(){this._enable(this._isEnabled),this._internalMarkAllSubMeshesAsTexturesDirty()},t.prototype.isReadyForSubMesh=function(e,t){if(!this._isEnabled)return!0;if(e._areTexturesDirty&&t.texturesEnabled){if(this._texture&&tl.SheenTextureEnabled&&!this._texture.isReadyOrNotBlocking())return!1;if(this._textureRoughness&&tl.SheenTextureEnabled&&!this._textureRoughness.isReadyOrNotBlocking())return!1}return!0},t.prototype.prepareDefinesBeforeAttributes=function(e,t){var n;this._isEnabled?(e.SHEEN=!0,e.SHEEN_LINKWITHALBEDO=this._linkSheenWithAlbedo,e.SHEEN_ROUGHNESS=null!==this._roughness,e.SHEEN_ALBEDOSCALING=this._albedoScaling,e.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=this._useRoughnessFromMainTexture,e.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL=null!==this._texture&&this._texture._texture===(null===(n=this._textureRoughness)||void 0===n?void 0:n._texture)&&this._texture.checkTransformsAreIdentical(this._textureRoughness),e._areTexturesDirty&&t.texturesEnabled&&(this._texture&&tl.SheenTextureEnabled?(Xr.PrepareDefinesForMergedUV(this._texture,e,"SHEEN_TEXTURE"),e.SHEEN_GAMMATEXTURE=this._texture.gammaSpace):e.SHEEN_TEXTURE=!1,this._textureRoughness&&tl.SheenTextureEnabled?Xr.PrepareDefinesForMergedUV(this._textureRoughness,e,"SHEEN_TEXTURE_ROUGHNESS"):e.SHEEN_TEXTURE_ROUGHNESS=!1)):(e.SHEEN=!1,e.SHEEN_TEXTURE=!1,e.SHEEN_TEXTURE_ROUGHNESS=!1,e.SHEEN_LINKWITHALBEDO=!1,e.SHEEN_ROUGHNESS=!1,e.SHEEN_ALBEDOSCALING=!1,e.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,e.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL=!1,e.SHEEN_GAMMATEXTURE=!1,e.SHEEN_TEXTUREDIRECTUV=0,e.SHEEN_TEXTURE_ROUGHNESSDIRECTUV=0)},t.prototype.bindForSubMesh=function(e,t,n,i){var r,o,a,s,c,l,u,h;if(this._isEnabled){var d=i.materialDefines,p=this._material.isFrozen,f=d.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL;e.useUbo&&p&&e.isSync||(f&&tl.SheenTextureEnabled?(e.updateFloat4("vSheenInfos",this._texture.coordinatesIndex,this._texture.level,-1,-1),Xr.BindTextureMatrix(this._texture,e,"sheen")):(this._texture||this._textureRoughness)&&tl.SheenTextureEnabled&&(e.updateFloat4("vSheenInfos",null!==(o=null===(r=this._texture)||void 0===r?void 0:r.coordinatesIndex)&&void 0!==o?o:0,null!==(s=null===(a=this._texture)||void 0===a?void 0:a.level)&&void 0!==s?s:0,null!==(l=null===(c=this._textureRoughness)||void 0===c?void 0:c.coordinatesIndex)&&void 0!==l?l:0,null!==(h=null===(u=this._textureRoughness)||void 0===u?void 0:u.level)&&void 0!==h?h:0),this._texture&&Xr.BindTextureMatrix(this._texture,e,"sheen"),!this._textureRoughness||f||d.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE||Xr.BindTextureMatrix(this._textureRoughness,e,"sheenRoughness")),e.updateFloat4("vSheenColor",this.color.r,this.color.g,this.color.b,this.intensity),null!==this._roughness&&e.updateFloat("vSheenRoughness",this._roughness)),t.texturesEnabled&&(this._texture&&tl.SheenTextureEnabled&&e.setTexture("sheenSampler",this._texture),this._textureRoughness&&!f&&!d.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE&&tl.SheenTextureEnabled&&e.setTexture("sheenRoughnessSampler",this._textureRoughness))}},t.prototype.hasTexture=function(e){return this._texture===e||this._textureRoughness===e},t.prototype.getActiveTextures=function(e){this._texture&&e.push(this._texture),this._textureRoughness&&e.push(this._textureRoughness)},t.prototype.getAnimatables=function(e){this._texture&&this._texture.animations&&this._texture.animations.length>0&&e.push(this._texture),this._textureRoughness&&this._textureRoughness.animations&&this._textureRoughness.animations.length>0&&e.push(this._textureRoughness)},t.prototype.dispose=function(e){var t,n;e&&(null===(t=this._texture)||void 0===t||t.dispose(),null===(n=this._textureRoughness)||void 0===n||n.dispose())},t.prototype.getClassName=function(){return"PBRSheenConfiguration"},t.prototype.addFallbacks=function(e,t,n){return e.SHEEN&&t.addFallback(n++,"SHEEN"),n},t.prototype.getSamplers=function(e){e.push("sheenSampler","sheenRoughnessSampler")},t.prototype.getUniforms=function(){return{ubo:[{name:"vSheenColor",size:4,type:"vec4"},{name:"vSheenRoughness",size:1,type:"float"},{name:"vSheenInfos",size:4,type:"vec4"},{name:"sheenMatrix",size:16,type:"mat4"},{name:"sheenRoughnessMatrix",size:16,type:"mat4"}]}},W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"isEnabled",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"linkSheenWithAlbedo",void 0),W([Se()],t.prototype,"intensity",void 0),W([Pe()],t.prototype,"color",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"texture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMainTexture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"roughness",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"textureRoughness",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"albedoScaling",void 0),t}(ul),Im=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.SUBSURFACE=!1,t.SS_REFRACTION=!1,t.SS_REFRACTION_USE_INTENSITY_FROM_TEXTURE=!1,t.SS_TRANSLUCENCY=!1,t.SS_TRANSLUCENCY_USE_INTENSITY_FROM_TEXTURE=!1,t.SS_SCATTERING=!1,t.SS_DISPERSION=!1,t.SS_THICKNESSANDMASK_TEXTURE=!1,t.SS_THICKNESSANDMASK_TEXTUREDIRECTUV=0,t.SS_HAS_THICKNESS=!1,t.SS_REFRACTIONINTENSITY_TEXTURE=!1,t.SS_REFRACTIONINTENSITY_TEXTUREDIRECTUV=0,t.SS_TRANSLUCENCYINTENSITY_TEXTURE=!1,t.SS_TRANSLUCENCYINTENSITY_TEXTUREDIRECTUV=0,t.SS_REFRACTIONMAP_3D=!1,t.SS_REFRACTIONMAP_OPPOSITEZ=!1,t.SS_LODINREFRACTIONALPHA=!1,t.SS_GAMMAREFRACTION=!1,t.SS_RGBDREFRACTION=!1,t.SS_LINEARSPECULARREFRACTION=!1,t.SS_LINKREFRACTIONTOTRANSPARENCY=!1,t.SS_ALBEDOFORREFRACTIONTINT=!1,t.SS_ALBEDOFORTRANSLUCENCYTINT=!1,t.SS_USE_LOCAL_REFRACTIONMAP_CUBIC=!1,t.SS_USE_THICKNESS_AS_DEPTH=!1,t.SS_MASK_FROM_THICKNESS_TEXTURE=!1,t.SS_USE_GLTF_TEXTURES=!1,t}return H(t,e),t}(Dn),Rm=function(e){function t(t,n){void 0===n&&(n=!0);var i=e.call(this,t,"PBRSubSurface",130,new Im,n)||this;return i._isRefractionEnabled=!1,i.isRefractionEnabled=!1,i._isTranslucencyEnabled=!1,i.isTranslucencyEnabled=!1,i._isDispersionEnabled=!1,i.isDispersionEnabled=!1,i._isScatteringEnabled=!1,i.isScatteringEnabled=!1,i._scatteringDiffusionProfileIndex=0,i.refractionIntensity=1,i.translucencyIntensity=1,i.useAlbedoToTintRefraction=!1,i.useAlbedoToTintTranslucency=!1,i._thicknessTexture=null,i.thicknessTexture=null,i._refractionTexture=null,i.refractionTexture=null,i._indexOfRefraction=1.5,i.indexOfRefraction=1.5,i._volumeIndexOfRefraction=-1,i._invertRefractionY=!1,i.invertRefractionY=!1,i._linkRefractionWithTransparency=!1,i.linkRefractionWithTransparency=!1,i.minimumThickness=0,i.maximumThickness=1,i.useThicknessAsDepth=!1,i.tintColor=B.White(),i.tintColorAtDistance=1,i.dispersion=0,i.diffusionDistance=B.White(),i._useMaskFromThicknessTexture=!1,i.useMaskFromThicknessTexture=!1,i._refractionIntensityTexture=null,i.refractionIntensityTexture=null,i._translucencyIntensityTexture=null,i.translucencyIntensityTexture=null,i._useGltfStyleTextures=!1,i.useGltfStyleTextures=!1,i._scene=t.getScene(),i.registerForExtraEvents=!0,i._internalMarkAllSubMeshesAsTexturesDirty=t._dirtyCallbacks[a.MATERIAL_TextureDirtyFlag],i._internalMarkScenePrePassDirty=t._dirtyCallbacks[a.MATERIAL_PrePassDirtyFlag],i}return H(t,e),Object.defineProperty(t.prototype,"scatteringDiffusionProfile",{get:function(){return this._scene.subSurfaceConfiguration?this._scene.subSurfaceConfiguration.ssDiffusionProfileColors[this._scatteringDiffusionProfileIndex]:null},set:function(e){this._scene.enableSubSurfaceForPrePass()&&e&&(this._scatteringDiffusionProfileIndex=this._scene.subSurfaceConfiguration.addDiffusionProfile(e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volumeIndexOfRefraction",{get:function(){return this._volumeIndexOfRefraction>=1?this._volumeIndexOfRefraction:this._indexOfRefraction},set:function(e){this._volumeIndexOfRefraction=e>=1?e:-1},enumerable:!1,configurable:!0}),t.prototype._markAllSubMeshesAsTexturesDirty=function(){this._enable(this._isRefractionEnabled||this._isTranslucencyEnabled||this._isScatteringEnabled),this._internalMarkAllSubMeshesAsTexturesDirty()},t.prototype._markScenePrePassDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty(),this._internalMarkScenePrePassDirty()},t.prototype.isReadyForSubMesh=function(e,t){if(!this._isRefractionEnabled&&!this._isTranslucencyEnabled&&!this._isScatteringEnabled)return!0;if(e._areTexturesDirty&&t.texturesEnabled){if(this._thicknessTexture&&tl.ThicknessTextureEnabled&&!this._thicknessTexture.isReadyOrNotBlocking())return!1;var n=this._getRefractionTexture(t);if(n&&tl.RefractionTextureEnabled&&!n.isReadyOrNotBlocking())return!1}return!0},t.prototype.prepareDefinesBeforeAttributes=function(e,t){if(!this._isRefractionEnabled&&!this._isTranslucencyEnabled&&!this._isScatteringEnabled)return e.SUBSURFACE=!1,e.SS_DISPERSION=!1,e.SS_TRANSLUCENCY=!1,e.SS_SCATTERING=!1,e.SS_REFRACTION=!1,e.SS_REFRACTION_USE_INTENSITY_FROM_TEXTURE=!1,e.SS_TRANSLUCENCY_USE_INTENSITY_FROM_TEXTURE=!1,e.SS_THICKNESSANDMASK_TEXTURE=!1,e.SS_THICKNESSANDMASK_TEXTUREDIRECTUV=0,e.SS_HAS_THICKNESS=!1,e.SS_REFRACTIONINTENSITY_TEXTURE=!1,e.SS_REFRACTIONINTENSITY_TEXTUREDIRECTUV=0,e.SS_TRANSLUCENCYINTENSITY_TEXTURE=!1,e.SS_TRANSLUCENCYINTENSITY_TEXTUREDIRECTUV=0,e.SS_REFRACTIONMAP_3D=!1,e.SS_REFRACTIONMAP_OPPOSITEZ=!1,e.SS_LODINREFRACTIONALPHA=!1,e.SS_GAMMAREFRACTION=!1,e.SS_RGBDREFRACTION=!1,e.SS_LINEARSPECULARREFRACTION=!1,e.SS_LINKREFRACTIONTOTRANSPARENCY=!1,e.SS_ALBEDOFORREFRACTIONTINT=!1,e.SS_ALBEDOFORTRANSLUCENCYTINT=!1,e.SS_USE_LOCAL_REFRACTIONMAP_CUBIC=!1,e.SS_USE_THICKNESS_AS_DEPTH=!1,e.SS_MASK_FROM_THICKNESS_TEXTURE=!1,void(e.SS_USE_GLTF_TEXTURES=!1);if(e._areTexturesDirty){e.SUBSURFACE=!0,e.SS_DISPERSION=this._isDispersionEnabled,e.SS_TRANSLUCENCY=this._isTranslucencyEnabled,e.SS_TRANSLUCENCY_USE_INTENSITY_FROM_TEXTURE=!1,e.SS_SCATTERING=this._isScatteringEnabled,e.SS_THICKNESSANDMASK_TEXTURE=!1,e.SS_REFRACTIONINTENSITY_TEXTURE=!1,e.SS_TRANSLUCENCYINTENSITY_TEXTURE=!1,e.SS_HAS_THICKNESS=!1,e.SS_MASK_FROM_THICKNESS_TEXTURE=!1,e.SS_USE_GLTF_TEXTURES=!1,e.SS_REFRACTION=!1,e.SS_REFRACTION_USE_INTENSITY_FROM_TEXTURE=!1,e.SS_REFRACTIONMAP_3D=!1,e.SS_GAMMAREFRACTION=!1,e.SS_RGBDREFRACTION=!1,e.SS_LINEARSPECULARREFRACTION=!1,e.SS_REFRACTIONMAP_OPPOSITEZ=!1,e.SS_LODINREFRACTIONALPHA=!1,e.SS_LINKREFRACTIONTOTRANSPARENCY=!1,e.SS_ALBEDOFORREFRACTIONTINT=!1,e.SS_ALBEDOFORTRANSLUCENCYTINT=!1,e.SS_USE_LOCAL_REFRACTIONMAP_CUBIC=!1,e.SS_USE_THICKNESS_AS_DEPTH=!1;var n=!!this._thicknessTexture&&!!this._refractionIntensityTexture&&this._refractionIntensityTexture.checkTransformsAreIdentical(this._thicknessTexture)&&this._refractionIntensityTexture._texture===this._thicknessTexture._texture,i=!!this._thicknessTexture&&!!this._translucencyIntensityTexture&&this._translucencyIntensityTexture.checkTransformsAreIdentical(this._thicknessTexture)&&this._translucencyIntensityTexture._texture===this._thicknessTexture._texture,r=(n||!this._refractionIntensityTexture)&&(i||!this._translucencyIntensityTexture);if(e._areTexturesDirty&&t.texturesEnabled&&(this._thicknessTexture&&tl.ThicknessTextureEnabled&&Xr.PrepareDefinesForMergedUV(this._thicknessTexture,e,"SS_THICKNESSANDMASK_TEXTURE"),this._refractionIntensityTexture&&tl.RefractionIntensityTextureEnabled&&!r&&Xr.PrepareDefinesForMergedUV(this._refractionIntensityTexture,e,"SS_REFRACTIONINTENSITY_TEXTURE"),this._translucencyIntensityTexture&&tl.TranslucencyIntensityTextureEnabled&&!r&&Xr.PrepareDefinesForMergedUV(this._translucencyIntensityTexture,e,"SS_TRANSLUCENCYINTENSITY_TEXTURE")),e.SS_HAS_THICKNESS=this.maximumThickness-this.minimumThickness!=0,e.SS_MASK_FROM_THICKNESS_TEXTURE=(this._useMaskFromThicknessTexture||!!this._refractionIntensityTexture||!!this._translucencyIntensityTexture)&&r,e.SS_USE_GLTF_TEXTURES=this._useGltfStyleTextures,e.SS_REFRACTION_USE_INTENSITY_FROM_TEXTURE=(this._useMaskFromThicknessTexture||!!this._refractionIntensityTexture)&&r,e.SS_TRANSLUCENCY_USE_INTENSITY_FROM_TEXTURE=(this._useMaskFromThicknessTexture||!!this._translucencyIntensityTexture)&&r,this._isRefractionEnabled&&t.texturesEnabled){var o=this._getRefractionTexture(t);o&&tl.RefractionTextureEnabled&&(e.SS_REFRACTION=!0,e.SS_REFRACTIONMAP_3D=o.isCube,e.SS_GAMMAREFRACTION=o.gammaSpace,e.SS_RGBDREFRACTION=o.isRGBD,e.SS_LINEARSPECULARREFRACTION=o.linearSpecularLOD,e.SS_REFRACTIONMAP_OPPOSITEZ=this._scene.useRightHandedSystem&&o.isCube?!o.invertZ:o.invertZ,e.SS_LODINREFRACTIONALPHA=o.lodLevelInAlpha,e.SS_LINKREFRACTIONTOTRANSPARENCY=this._linkRefractionWithTransparency,e.SS_ALBEDOFORREFRACTIONTINT=this.useAlbedoToTintRefraction,e.SS_USE_LOCAL_REFRACTIONMAP_CUBIC=o.isCube&&o.boundingBoxSize,e.SS_USE_THICKNESS_AS_DEPTH=this.useThicknessAsDepth)}this._isTranslucencyEnabled&&(e.SS_ALBEDOFORTRANSLUCENCYTINT=this.useAlbedoToTintTranslucency)}},t.prototype.hardBindForSubMesh=function(e,t,n,i){if(this._isRefractionEnabled||this._isTranslucencyEnabled||this._isScatteringEnabled){i.getRenderingMesh().getWorldMatrix().decompose(w.Vector3[0]);var r=Math.max(Math.abs(w.Vector3[0].x),Math.abs(w.Vector3[0].y),Math.abs(w.Vector3[0].z));e.updateFloat2("vThicknessParam",this.minimumThickness*r,(this.maximumThickness-this.minimumThickness)*r)}},t.prototype.bindForSubMesh=function(e,t,n,i){if(this._isRefractionEnabled||this._isTranslucencyEnabled||this._isScatteringEnabled){var r=i.materialDefines,o=this._material.isFrozen,a=this._material.realTimeFiltering,s=r.LODBASEDMICROSFURACE,c=this._getRefractionTexture(t);if(!e.useUbo||!o||!e.isSync){if(this._thicknessTexture&&tl.ThicknessTextureEnabled&&(e.updateFloat2("vThicknessInfos",this._thicknessTexture.coordinatesIndex,this._thicknessTexture.level),Xr.BindTextureMatrix(this._thicknessTexture,e,"thickness")),this._refractionIntensityTexture&&tl.RefractionIntensityTextureEnabled&&r.SS_REFRACTIONINTENSITY_TEXTURE&&(e.updateFloat2("vRefractionIntensityInfos",this._refractionIntensityTexture.coordinatesIndex,this._refractionIntensityTexture.level),Xr.BindTextureMatrix(this._refractionIntensityTexture,e,"refractionIntensity")),this._translucencyIntensityTexture&&tl.TranslucencyIntensityTextureEnabled&&r.SS_TRANSLUCENCYINTENSITY_TEXTURE&&(e.updateFloat2("vTranslucencyIntensityInfos",this._translucencyIntensityTexture.coordinatesIndex,this._translucencyIntensityTexture.level),Xr.BindTextureMatrix(this._translucencyIntensityTexture,e,"translucencyIntensity")),c&&tl.RefractionTextureEnabled){e.updateMatrix("refractionMatrix",c.getRefractionTextureMatrix());var l=1;c.isCube||c.depth&&(l=c.depth);var u=c.getSize().width,d=this.volumeIndexOfRefraction;if(e.updateFloat4("vRefractionInfos",c.level,1/d,l,this._invertRefractionY?-1:1),e.updateFloat4("vRefractionMicrosurfaceInfos",u,c.lodGenerationScale,c.lodGenerationOffset,1/this.indexOfRefraction),a&&e.updateFloat2("vRefractionFilteringInfo",u,h.Log2(u)),c.boundingBoxSize){var p=c;e.updateVector3("vRefractionPosition",p.boundingBoxPosition),e.updateVector3("vRefractionSize",p.boundingBoxSize)}}this._isScatteringEnabled&&e.updateFloat("scatteringDiffusionProfile",this._scatteringDiffusionProfileIndex),e.updateColor3("vDiffusionDistance",this.diffusionDistance),e.updateFloat4("vTintColor",this.tintColor.r,this.tintColor.g,this.tintColor.b,Math.max(1e-5,this.tintColorAtDistance)),e.updateFloat3("vSubSurfaceIntensity",this.refractionIntensity,this.translucencyIntensity,0),e.updateFloat("dispersion",this.dispersion)}t.texturesEnabled&&(this._thicknessTexture&&tl.ThicknessTextureEnabled&&e.setTexture("thicknessSampler",this._thicknessTexture),this._refractionIntensityTexture&&tl.RefractionIntensityTextureEnabled&&r.SS_REFRACTIONINTENSITY_TEXTURE&&e.setTexture("refractionIntensitySampler",this._refractionIntensityTexture),this._translucencyIntensityTexture&&tl.TranslucencyIntensityTextureEnabled&&r.SS_TRANSLUCENCYINTENSITY_TEXTURE&&e.setTexture("translucencyIntensitySampler",this._translucencyIntensityTexture),c&&tl.RefractionTextureEnabled&&(s?e.setTexture("refractionSampler",c):(e.setTexture("refractionSampler",c._lodTextureMid||c),e.setTexture("refractionSamplerLow",c._lodTextureLow||c),e.setTexture("refractionSamplerHigh",c._lodTextureHigh||c))))}},t.prototype._getRefractionTexture=function(e){return this._refractionTexture?this._refractionTexture:this._isRefractionEnabled?e.environmentTexture:null},Object.defineProperty(t.prototype,"disableAlphaBlending",{get:function(){return this._isRefractionEnabled&&this._linkRefractionWithTransparency},enumerable:!1,configurable:!0}),t.prototype.fillRenderTargetTextures=function(e){tl.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget&&e.push(this._refractionTexture)},t.prototype.hasTexture=function(e){return this._thicknessTexture===e||this._refractionTexture===e},t.prototype.hasRenderTargetTextures=function(){return!!(tl.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget)},t.prototype.getActiveTextures=function(e){this._thicknessTexture&&e.push(this._thicknessTexture),this._refractionTexture&&e.push(this._refractionTexture)},t.prototype.getAnimatables=function(e){this._thicknessTexture&&this._thicknessTexture.animations&&this._thicknessTexture.animations.length>0&&e.push(this._thicknessTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&e.push(this._refractionTexture)},t.prototype.dispose=function(e){e&&(this._thicknessTexture&&this._thicknessTexture.dispose(),this._refractionTexture&&this._refractionTexture.dispose())},t.prototype.getClassName=function(){return"PBRSubSurfaceConfiguration"},t.prototype.addFallbacks=function(e,t,n){return e.SS_SCATTERING&&t.addFallback(n++,"SS_SCATTERING"),e.SS_TRANSLUCENCY&&t.addFallback(n++,"SS_TRANSLUCENCY"),n},t.prototype.getSamplers=function(e){e.push("thicknessSampler","refractionIntensitySampler","translucencyIntensitySampler","refractionSampler","refractionSamplerLow","refractionSamplerHigh")},t.prototype.getUniforms=function(){return{ubo:[{name:"vRefractionMicrosurfaceInfos",size:4,type:"vec4"},{name:"vRefractionFilteringInfo",size:2,type:"vec2"},{name:"vTranslucencyIntensityInfos",size:2,type:"vec2"},{name:"vRefractionInfos",size:4,type:"vec4"},{name:"refractionMatrix",size:16,type:"mat4"},{name:"vThicknessInfos",size:2,type:"vec2"},{name:"vRefractionIntensityInfos",size:2,type:"vec2"},{name:"thicknessMatrix",size:16,type:"mat4"},{name:"refractionIntensityMatrix",size:16,type:"mat4"},{name:"translucencyIntensityMatrix",size:16,type:"mat4"},{name:"vThicknessParam",size:2,type:"vec2"},{name:"vDiffusionDistance",size:3,type:"vec3"},{name:"vTintColor",size:4,type:"vec4"},{name:"vSubSurfaceIntensity",size:3,type:"vec3"},{name:"vRefractionPosition",size:3,type:"vec3"},{name:"vRefractionSize",size:3,type:"vec3"},{name:"scatteringDiffusionProfile",size:1,type:"float"},{name:"dispersion",size:1,type:"float"}]}},W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"isRefractionEnabled",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"isTranslucencyEnabled",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"isDispersionEnabled",void 0),W([Se(),xe("_markScenePrePassDirty")],t.prototype,"isScatteringEnabled",void 0),W([Se()],t.prototype,"_scatteringDiffusionProfileIndex",void 0),W([Se()],t.prototype,"refractionIntensity",void 0),W([Se()],t.prototype,"translucencyIntensity",void 0),W([Se()],t.prototype,"useAlbedoToTintRefraction",void 0),W([Se()],t.prototype,"useAlbedoToTintTranslucency",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"thicknessTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"refractionTexture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"indexOfRefraction",void 0),W([Se()],t.prototype,"_volumeIndexOfRefraction",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"volumeIndexOfRefraction",null),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertRefractionY",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"linkRefractionWithTransparency",void 0),W([Se()],t.prototype,"minimumThickness",void 0),W([Se()],t.prototype,"maximumThickness",void 0),W([Se()],t.prototype,"useThicknessAsDepth",void 0),W([Pe()],t.prototype,"tintColor",void 0),W([Se()],t.prototype,"tintColorAtDistance",void 0),W([Se()],t.prototype,"dispersion",void 0),W([Pe()],t.prototype,"diffusionDistance",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useMaskFromThicknessTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"refractionIntensityTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"translucencyIntensityTexture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useGltfStyleTextures",void 0),t}(ul),Om={effect:null,subMesh:null},wm=function(e){function t(t){var n=e.call(this,t)||this;return n.PBR=!0,n.NUM_SAMPLES="0",n.REALTIME_FILTERING=!1,n.MAINUV1=!1,n.MAINUV2=!1,n.MAINUV3=!1,n.MAINUV4=!1,n.MAINUV5=!1,n.MAINUV6=!1,n.UV1=!1,n.UV2=!1,n.UV3=!1,n.UV4=!1,n.UV5=!1,n.UV6=!1,n.ALBEDO=!1,n.GAMMAALBEDO=!1,n.ALBEDODIRECTUV=0,n.VERTEXCOLOR=!1,n.BAKED_VERTEX_ANIMATION_TEXTURE=!1,n.AMBIENT=!1,n.AMBIENTDIRECTUV=0,n.AMBIENTINGRAYSCALE=!1,n.OPACITY=!1,n.VERTEXALPHA=!1,n.OPACITYDIRECTUV=0,n.OPACITYRGB=!1,n.ALPHATEST=!1,n.DEPTHPREPASS=!1,n.ALPHABLEND=!1,n.ALPHAFROMALBEDO=!1,n.ALPHATESTVALUE="0.5",n.SPECULAROVERALPHA=!1,n.RADIANCEOVERALPHA=!1,n.ALPHAFRESNEL=!1,n.LINEARALPHAFRESNEL=!1,n.PREMULTIPLYALPHA=!1,n.EMISSIVE=!1,n.EMISSIVEDIRECTUV=0,n.GAMMAEMISSIVE=!1,n.REFLECTIVITY=!1,n.REFLECTIVITY_GAMMA=!1,n.REFLECTIVITYDIRECTUV=0,n.SPECULARTERM=!1,n.MICROSURFACEFROMREFLECTIVITYMAP=!1,n.MICROSURFACEAUTOMATIC=!1,n.LODBASEDMICROSFURACE=!1,n.MICROSURFACEMAP=!1,n.MICROSURFACEMAPDIRECTUV=0,n.METALLICWORKFLOW=!1,n.ROUGHNESSSTOREINMETALMAPALPHA=!1,n.ROUGHNESSSTOREINMETALMAPGREEN=!1,n.METALLNESSSTOREINMETALMAPBLUE=!1,n.AOSTOREINMETALMAPRED=!1,n.METALLIC_REFLECTANCE=!1,n.METALLIC_REFLECTANCE_GAMMA=!1,n.METALLIC_REFLECTANCEDIRECTUV=0,n.METALLIC_REFLECTANCE_USE_ALPHA_ONLY=!1,n.REFLECTANCE=!1,n.REFLECTANCE_GAMMA=!1,n.REFLECTANCEDIRECTUV=0,n.ENVIRONMENTBRDF=!1,n.ENVIRONMENTBRDF_RGBD=!1,n.NORMAL=!1,n.TANGENT=!1,n.BUMP=!1,n.BUMPDIRECTUV=0,n.OBJECTSPACE_NORMALMAP=!1,n.PARALLAX=!1,n.PARALLAX_RHS=!1,n.PARALLAXOCCLUSION=!1,n.NORMALXYSCALE=!0,n.LIGHTMAP=!1,n.LIGHTMAPDIRECTUV=0,n.USELIGHTMAPASSHADOWMAP=!1,n.GAMMALIGHTMAP=!1,n.RGBDLIGHTMAP=!1,n.REFLECTION=!1,n.REFLECTIONMAP_3D=!1,n.REFLECTIONMAP_SPHERICAL=!1,n.REFLECTIONMAP_PLANAR=!1,n.REFLECTIONMAP_CUBIC=!1,n.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,n.REFLECTIONMAP_PROJECTION=!1,n.REFLECTIONMAP_SKYBOX=!1,n.REFLECTIONMAP_EXPLICIT=!1,n.REFLECTIONMAP_EQUIRECTANGULAR=!1,n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,n.INVERTCUBICMAP=!1,n.USESPHERICALFROMREFLECTIONMAP=!1,n.USEIRRADIANCEMAP=!1,n.USESPHERICALINVERTEX=!1,n.REFLECTIONMAP_OPPOSITEZ=!1,n.LODINREFLECTIONALPHA=!1,n.GAMMAREFLECTION=!1,n.RGBDREFLECTION=!1,n.LINEARSPECULARREFLECTION=!1,n.RADIANCEOCCLUSION=!1,n.HORIZONOCCLUSION=!1,n.INSTANCES=!1,n.THIN_INSTANCES=!1,n.INSTANCESCOLOR=!1,n.PREPASS=!1,n.PREPASS_IRRADIANCE=!1,n.PREPASS_IRRADIANCE_INDEX=-1,n.PREPASS_ALBEDO_SQRT=!1,n.PREPASS_ALBEDO_SQRT_INDEX=-1,n.PREPASS_DEPTH=!1,n.PREPASS_DEPTH_INDEX=-1,n.PREPASS_NORMAL=!1,n.PREPASS_NORMAL_INDEX=-1,n.PREPASS_NORMAL_WORLDSPACE=!1,n.PREPASS_POSITION=!1,n.PREPASS_POSITION_INDEX=-1,n.PREPASS_VELOCITY=!1,n.PREPASS_VELOCITY_INDEX=-1,n.PREPASS_REFLECTIVITY=!1,n.PREPASS_REFLECTIVITY_INDEX=-1,n.SCENE_MRT_COUNT=0,n.NUM_BONE_INFLUENCERS=0,n.BonesPerMesh=0,n.BONETEXTURE=!1,n.BONES_VELOCITY_ENABLED=!1,n.NONUNIFORMSCALING=!1,n.MORPHTARGETS=!1,n.MORPHTARGETS_NORMAL=!1,n.MORPHTARGETS_TANGENT=!1,n.MORPHTARGETS_UV=!1,n.NUM_MORPH_INFLUENCERS=0,n.MORPHTARGETS_TEXTURE=!1,n.IMAGEPROCESSING=!1,n.VIGNETTE=!1,n.VIGNETTEBLENDMODEMULTIPLY=!1,n.VIGNETTEBLENDMODEOPAQUE=!1,n.TONEMAPPING=!1,n.TONEMAPPING_ACES=!1,n.CONTRAST=!1,n.COLORCURVES=!1,n.COLORGRADING=!1,n.COLORGRADING3D=!1,n.SAMPLER3DGREENDEPTH=!1,n.SAMPLER3DBGRMAP=!1,n.DITHER=!1,n.IMAGEPROCESSINGPOSTPROCESS=!1,n.SKIPFINALCOLORCLAMP=!1,n.EXPOSURE=!1,n.MULTIVIEW=!1,n.ORDER_INDEPENDENT_TRANSPARENCY=!1,n.ORDER_INDEPENDENT_TRANSPARENCY_16BITS=!1,n.USEPHYSICALLIGHTFALLOFF=!1,n.USEGLTFLIGHTFALLOFF=!1,n.TWOSIDEDLIGHTING=!1,n.SHADOWFLOAT=!1,n.CLIPPLANE=!1,n.CLIPPLANE2=!1,n.CLIPPLANE3=!1,n.CLIPPLANE4=!1,n.CLIPPLANE5=!1,n.CLIPPLANE6=!1,n.POINTSIZE=!1,n.FOG=!1,n.LOGARITHMICDEPTH=!1,n.CAMERA_ORTHOGRAPHIC=!1,n.CAMERA_PERSPECTIVE=!1,n.FORCENORMALFORWARD=!1,n.SPECULARAA=!1,n.UNLIT=!1,n.DECAL_AFTER_DETAIL=!1,n.DEBUGMODE=0,n.rebuild(),n}return H(t,e),t.prototype.reset=function(){e.prototype.reset.call(this),this.ALPHATESTVALUE="0.5",this.PBR=!0,this.NORMALXYSCALE=!0},t}(Dn),Mm=function(e){function t(n,i){var r=e.call(this,n,i)||this;return r._directIntensity=1,r._emissiveIntensity=1,r._environmentIntensity=1,r._specularIntensity=1,r._lightingInfos=new P(r._directIntensity,r._emissiveIntensity,r._environmentIntensity,r._specularIntensity),r._disableBumpMap=!1,r._albedoTexture=null,r._ambientTexture=null,r._ambientTextureStrength=1,r._ambientTextureImpactOnAnalyticalLights=t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,r._opacityTexture=null,r._reflectionTexture=null,r._emissiveTexture=null,r._reflectivityTexture=null,r._metallicTexture=null,r._metallic=null,r._roughness=null,r._metallicF0Factor=1,r._metallicReflectanceColor=B.White(),r._useOnlyMetallicFromMetallicReflectanceTexture=!1,r._metallicReflectanceTexture=null,r._reflectanceTexture=null,r._microSurfaceTexture=null,r._bumpTexture=null,r._lightmapTexture=null,r._ambientColor=new B(0,0,0),r._albedoColor=new B(1,1,1),r._reflectivityColor=new B(1,1,1),r._reflectionColor=new B(1,1,1),r._emissiveColor=new B(0,0,0),r._microSurface=.9,r._useLightmapAsShadowmap=!1,r._useHorizonOcclusion=!0,r._useRadianceOcclusion=!0,r._useAlphaFromAlbedoTexture=!1,r._useSpecularOverAlpha=!0,r._useMicroSurfaceFromReflectivityMapAlpha=!1,r._useRoughnessFromMetallicTextureAlpha=!0,r._useRoughnessFromMetallicTextureGreen=!1,r._useMetallnessFromMetallicTextureBlue=!1,r._useAmbientOcclusionFromMetallicTextureRed=!1,r._useAmbientInGrayScale=!1,r._useAutoMicroSurfaceFromReflectivityMap=!1,r._lightFalloff=t.LIGHTFALLOFF_PHYSICAL,r._useRadianceOverAlpha=!0,r._useObjectSpaceNormalMap=!1,r._useParallax=!1,r._useParallaxOcclusion=!1,r._parallaxScaleBias=.05,r._disableLighting=!1,r._maxSimultaneousLights=4,r._invertNormalMapX=!1,r._invertNormalMapY=!1,r._twoSidedLighting=!1,r._alphaCutOff=.4,r._forceAlphaTest=!1,r._useAlphaFresnel=!1,r._useLinearAlphaFresnel=!1,r._environmentBRDFTexture=null,r._forceIrradianceInFragment=!1,r._realTimeFiltering=!1,r._realTimeFilteringQuality=a.TEXTURE_FILTERING_QUALITY_LOW,r._forceNormalForward=!1,r._enableSpecularAntiAliasing=!1,r._imageProcessingObserver=null,r._renderTargets=new On(16),r._globalAmbientColor=new B(0,0,0),r._unlit=!1,r._applyDecalMapAfterDetailMap=!1,r._debugMode=0,r.debugMode=0,r.debugLimit=-1,r.debugFactor=1,r._cacheHasRenderTargetTextures=!1,r.brdf=new vm(r),r.clearCoat=new Tm(r),r.iridescence=new Am(r),r.anisotropy=new Sm(r),r.sheen=new Pm(r),r.subSurface=new Rm(r),r.detailMap=new dl(r),r._attachImageProcessingConfiguration(null),r.getRenderTargetTextures=function(){return r._renderTargets.reset(),tl.ReflectionTextureEnabled&&r._reflectionTexture&&r._reflectionTexture.isRenderTarget&&r._renderTargets.push(r._reflectionTexture),r._eventInfo.renderTargets=r._renderTargets,r._callbackPluginEventFillRenderTargetTextures(r._eventInfo),r._renderTargets},r._environmentBRDFTexture=_m(r.getScene()),r.prePassConfiguration=new el,r}return H(t,e),Object.defineProperty(t.prototype,"realTimeFiltering",{get:function(){return this._realTimeFiltering},set:function(e){this._realTimeFiltering=e,this.markAsDirty(a.MATERIAL_TextureDirtyFlag)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realTimeFilteringQuality",{get:function(){return this._realTimeFilteringQuality},set:function(e){this._realTimeFilteringQuality=e,this.markAsDirty(a.MATERIAL_TextureDirtyFlag)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canRenderToMRT",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e){var t=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add((function(){t._markAllSubMeshesAsImageProcessingDirty()}))))},Object.defineProperty(t.prototype,"hasRenderTargetTextures",{get:function(){return!!(tl.ReflectionTextureEnabled&&this._reflectionTexture&&this._reflectionTexture.isRenderTarget)||this._cacheHasRenderTargetTextures},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPrePassCapable",{get:function(){return!this.disableDepthWrite},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"PBRBaseMaterial"},Object.defineProperty(t.prototype,"_disableAlphaBlending",{get:function(){var e;return this._transparencyMode===t.PBRMATERIAL_OPAQUE||this._transparencyMode===t.PBRMATERIAL_ALPHATEST||(null===(e=this.subSurface)||void 0===e?void 0:e.disableAlphaBlending)},enumerable:!1,configurable:!0}),t.prototype.needAlphaBlending=function(){return!this._disableAlphaBlending&&(this.alpha<1||null!=this._opacityTexture||this._shouldUseAlphaFromAlbedoTexture())},t.prototype.needAlphaTesting=function(){var e;return!!this._forceAlphaTest||!(null===(e=this.subSurface)||void 0===e?void 0:e.disableAlphaBlending)&&this._hasAlphaChannel()&&(null==this._transparencyMode||this._transparencyMode===t.PBRMATERIAL_ALPHATEST)},t.prototype._shouldUseAlphaFromAlbedoTexture=function(){return null!=this._albedoTexture&&this._albedoTexture.hasAlpha&&this._useAlphaFromAlbedoTexture&&this._transparencyMode!==t.PBRMATERIAL_OPAQUE},t.prototype._hasAlphaChannel=function(){return null!=this._albedoTexture&&this._albedoTexture.hasAlpha||null!=this._opacityTexture},t.prototype.getAlphaTestTexture=function(){return this._albedoTexture},t.prototype.isReadyForSubMesh=function(e,t,n){var i;if(this._uniformBufferLayoutBuilt||this.buildUniformLayout(),t.effect&&this.isFrozen&&t.effect._wasPreviouslyReady&&t.effect._wasPreviouslyUsingInstances===n)return!0;t.materialDefines||(this._callbackPluginEventGeneric(Wr.GetDefineNames,this._eventInfo),t.materialDefines=new wm(this._eventInfo.defineNames));var r=t.materialDefines;if(this._isReadyForSubMesh(t))return!0;var o=this.getScene(),a=o.getEngine();if(r._areTexturesDirty&&(this._eventInfo.hasRenderTargetTextures=!1,this._callbackPluginEventHasRenderTargetTextures(this._eventInfo),this._cacheHasRenderTargetTextures=this._eventInfo.hasRenderTargetTextures,o.texturesEnabled)){if(this._albedoTexture&&tl.DiffuseTextureEnabled&&!this._albedoTexture.isReadyOrNotBlocking())return!1;if(this._ambientTexture&&tl.AmbientTextureEnabled&&!this._ambientTexture.isReadyOrNotBlocking())return!1;if(this._opacityTexture&&tl.OpacityTextureEnabled&&!this._opacityTexture.isReadyOrNotBlocking())return!1;var s=this._getReflectionTexture();if(s&&tl.ReflectionTextureEnabled){if(!s.isReadyOrNotBlocking())return!1;if(s.irradianceTexture){if(!s.irradianceTexture.isReadyOrNotBlocking())return!1}else if(!s.sphericalPolynomial&&(null===(i=s.getInternalTexture())||void 0===i?void 0:i._sphericalPolynomialPromise))return!1}if(this._lightmapTexture&&tl.LightmapTextureEnabled&&!this._lightmapTexture.isReadyOrNotBlocking())return!1;if(this._emissiveTexture&&tl.EmissiveTextureEnabled&&!this._emissiveTexture.isReadyOrNotBlocking())return!1;if(tl.SpecularTextureEnabled){if(this._metallicTexture){if(!this._metallicTexture.isReadyOrNotBlocking())return!1}else if(this._reflectivityTexture&&!this._reflectivityTexture.isReadyOrNotBlocking())return!1;if(this._metallicReflectanceTexture&&!this._metallicReflectanceTexture.isReadyOrNotBlocking())return!1;if(this._reflectanceTexture&&!this._reflectanceTexture.isReadyOrNotBlocking())return!1;if(this._microSurfaceTexture&&!this._microSurfaceTexture.isReadyOrNotBlocking())return!1}if(a.getCaps().standardDerivatives&&this._bumpTexture&&tl.BumpTextureEnabled&&!this._disableBumpMap&&!this._bumpTexture.isReady())return!1;if(this._environmentBRDFTexture&&tl.ReflectionTextureEnabled&&!this._environmentBRDFTexture.isReady())return!1}if(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=r,this._eventInfo.subMesh=t,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),!this._eventInfo.isReadyForSubMesh)return!1;if(r._areImageProcessingDirty&&this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.isReady())return!1;a.getCaps().standardDerivatives||e.isVerticesDataPresent(Yn.NormalKind)||(e.createNormals(!0),J.Warn("PBRMaterial: Normals have been created for the mesh: "+e.name));var c=t.effect,l=r._areLightsDisposed,u=this._prepareEffect(e,r,this.onCompiled,this.onError,n,null,t.getRenderingMesh().hasThinInstances),h=!1;if(u)if(this._onEffectCreatedObservable&&(Om.effect=u,Om.subMesh=t,this._onEffectCreatedObservable.notifyObservers(Om)),this.allowShaderHotSwapping&&c&&!u.isReady()){if(u=c,r.markAsUnprocessed(),h=this.isFrozen,l)return r._areLightsDisposed=!0,!1}else o.resetCachedMaterial(),t.setEffect(u,r,this._materialContext);return!(!t.effect||!t.effect.isReady()||(r._renderId=o.getRenderId(),t.effect._wasPreviouslyReady=!h,t.effect._wasPreviouslyUsingInstances=!!n,this._checkScenePerformancePriority(),0))},t.prototype.isMetallicWorkflow=function(){return!(null==this._metallic&&null==this._roughness&&!this._metallicTexture)},t.prototype._prepareEffect=function(e,t,n,i,r,o,s){if(void 0===n&&(n=null),void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=null),this._prepareDefines(e,t,r,o,s),!t.isDirty)return null;t.markAsProcessed();var c=this.getScene().getEngine(),l=new Oa,u=0;t.USESPHERICALINVERTEX&&l.addFallback(u++,"USESPHERICALINVERTEX"),t.FOG&&l.addFallback(u,"FOG"),t.SPECULARAA&&l.addFallback(u,"SPECULARAA"),t.POINTSIZE&&l.addFallback(u,"POINTSIZE"),t.LOGARITHMICDEPTH&&l.addFallback(u,"LOGARITHMICDEPTH"),t.PARALLAX&&l.addFallback(u,"PARALLAX"),t.PARALLAX_RHS&&l.addFallback(u,"PARALLAX_RHS"),t.PARALLAXOCCLUSION&&l.addFallback(u++,"PARALLAXOCCLUSION"),t.ENVIRONMENTBRDF&&l.addFallback(u++,"ENVIRONMENTBRDF"),t.TANGENT&&l.addFallback(u++,"TANGENT"),t.BUMP&&l.addFallback(u++,"BUMP"),u=Xr.HandleFallbacksForShadows(t,l,this._maxSimultaneousLights,u++),t.SPECULARTERM&&l.addFallback(u++,"SPECULARTERM"),t.USESPHERICALFROMREFLECTIONMAP&&l.addFallback(u++,"USESPHERICALFROMREFLECTIONMAP"),t.USEIRRADIANCEMAP&&l.addFallback(u++,"USEIRRADIANCEMAP"),t.LIGHTMAP&&l.addFallback(u++,"LIGHTMAP"),t.NORMAL&&l.addFallback(u++,"NORMAL"),t.AMBIENT&&l.addFallback(u++,"AMBIENT"),t.EMISSIVE&&l.addFallback(u++,"EMISSIVE"),t.VERTEXCOLOR&&l.addFallback(u++,"VERTEXCOLOR"),t.MORPHTARGETS&&l.addFallback(u++,"MORPHTARGETS"),t.MULTIVIEW&&l.addFallback(0,"MULTIVIEW");var h=[Yn.PositionKind];t.NORMAL&&h.push(Yn.NormalKind),t.TANGENT&&h.push(Yn.TangentKind);for(var d=1;d<=a.MAX_SUPPORTED_UV_SETS;++d)t["UV"+d]&&h.push("uv".concat(1===d?"":d));t.VERTEXCOLOR&&h.push(Yn.ColorKind),Xr.PrepareAttributesForBones(h,e,t,l),Xr.PrepareAttributesForInstances(h,t),Xr.PrepareAttributesForMorphTargets(h,e,t),Xr.PrepareAttributesForBakedVertexAnimation(h,e,t);var p="pbr",f=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vAlbedoColor","vReflectivityColor","vMetallicReflectanceFactors","vEmissiveColor","visibility","vReflectionColor","vFogInfos","vFogColor","pointSize","vAlbedoInfos","vAmbientInfos","vOpacityInfos","vReflectionInfos","vReflectionPosition","vReflectionSize","vEmissiveInfos","vReflectivityInfos","vReflectionFilteringInfo","vMetallicReflectanceInfos","vReflectanceInfos","vMicroSurfaceSamplerInfos","vBumpInfos","vLightmapInfos","mBones","albedoMatrix","ambientMatrix","opacityMatrix","reflectionMatrix","emissiveMatrix","reflectivityMatrix","normalMatrix","microSurfaceSamplerMatrix","bumpMatrix","lightmapMatrix","metallicReflectanceMatrix","reflectanceMatrix","vLightingIntensity","logarithmicDepthConstant","vSphericalX","vSphericalY","vSphericalZ","vSphericalXX_ZZ","vSphericalYY_ZZ","vSphericalZZ","vSphericalXY","vSphericalYZ","vSphericalZX","vSphericalL00","vSphericalL1_1","vSphericalL10","vSphericalL11","vSphericalL2_2","vSphericalL2_1","vSphericalL20","vSphericalL21","vSphericalL22","vReflectionMicrosurfaceInfos","vTangentSpaceParams","boneTextureWidth","vDebugMode","morphTargetTextureInfo","morphTargetTextureIndices"],m=["albedoSampler","reflectivitySampler","ambientSampler","emissiveSampler","bumpSampler","lightmapSampler","opacitySampler","reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh","irradianceSampler","microSurfaceSampler","environmentBrdfSampler","boneSampler","metallicReflectanceSampler","reflectanceSampler","morphTargets","oitDepthSampler","oitFrontColorSampler"],_=["Material","Scene","Mesh"],g={maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:t.NUM_MORPH_INFLUENCERS};this._eventInfo.fallbacks=l,this._eventInfo.fallbackRank=u,this._eventInfo.defines=t,this._eventInfo.uniforms=f,this._eventInfo.attributes=h,this._eventInfo.samplers=m,this._eventInfo.uniformBuffersNames=_,this._eventInfo.customCode=void 0,this._eventInfo.mesh=e,this._eventInfo.indexParameters=g,this._callbackPluginEventGeneric(Wr.PrepareEffect,this._eventInfo),el.AddUniforms(f),el.AddSamplers(m),Vr(f),Fn&&(Fn.PrepareUniforms(f,t),Fn.PrepareSamplers(m,t)),Xr.PrepareUniformsAndSamplersList({uniformsNames:f,uniformBuffersNames:_,samplers:m,defines:t,maxSimultaneousLights:this._maxSimultaneousLights});var y={};this.customShaderNameResolve&&(p=this.customShaderNameResolve(p,f,_,m,t,h,y));var v=t.toString(),b=c.createEffect(p,{attributes:h,uniformsNames:f,uniformBuffersNames:_,samplers:m,defines:v,fallbacks:l,onCompiled:n,onError:i,indexParameters:g,processFinalCode:y.processFinalCode,processCodeAfterIncludes:this._eventInfo.customCode,multiTarget:t.PREPASS},c);return this._eventInfo.customCode=void 0,b},t.prototype._prepareDefines=function(e,n,i,r,o){var s;void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=!1);var c=this.getScene(),l=c.getEngine();Xr.PrepareDefinesForLights(c,e,n,!0,this._maxSimultaneousLights,this._disableLighting),n._needNormals=!0,Xr.PrepareDefinesForMultiview(c,n);var u=this.needAlphaBlendingForMesh(e)&&this.getScene().useOrderIndependentTransparency;if(Xr.PrepareDefinesForPrePass(c,n,this.canRenderToMRT&&!u),Xr.PrepareDefinesForOIT(c,n,u),n.METALLICWORKFLOW=this.isMetallicWorkflow(),n._areTexturesDirty){n._needUVs=!1;for(var h=1;h<=a.MAX_SUPPORTED_UV_SETS;++h)n["MAINUV"+h]=!1;if(c.texturesEnabled){n.ALBEDODIRECTUV=0,n.AMBIENTDIRECTUV=0,n.OPACITYDIRECTUV=0,n.EMISSIVEDIRECTUV=0,n.REFLECTIVITYDIRECTUV=0,n.MICROSURFACEMAPDIRECTUV=0,n.METALLIC_REFLECTANCEDIRECTUV=0,n.REFLECTANCEDIRECTUV=0,n.BUMPDIRECTUV=0,n.LIGHTMAPDIRECTUV=0,l.getCaps().textureLOD&&(n.LODBASEDMICROSFURACE=!0),this._albedoTexture&&tl.DiffuseTextureEnabled?(Xr.PrepareDefinesForMergedUV(this._albedoTexture,n,"ALBEDO"),n.GAMMAALBEDO=this._albedoTexture.gammaSpace):n.ALBEDO=!1,this._ambientTexture&&tl.AmbientTextureEnabled?(Xr.PrepareDefinesForMergedUV(this._ambientTexture,n,"AMBIENT"),n.AMBIENTINGRAYSCALE=this._useAmbientInGrayScale):n.AMBIENT=!1,this._opacityTexture&&tl.OpacityTextureEnabled?(Xr.PrepareDefinesForMergedUV(this._opacityTexture,n,"OPACITY"),n.OPACITYRGB=this._opacityTexture.getAlphaFromRGB):n.OPACITY=!1;var d=this._getReflectionTexture();if(d&&tl.ReflectionTextureEnabled){switch(n.REFLECTION=!0,n.GAMMAREFLECTION=d.gammaSpace,n.RGBDREFLECTION=d.isRGBD,n.LODINREFLECTIONALPHA=d.lodLevelInAlpha,n.LINEARSPECULARREFLECTION=d.linearSpecularLOD,this.realTimeFiltering&&this.realTimeFilteringQuality>0?(n.NUM_SAMPLES=""+this.realTimeFilteringQuality,l._features.needTypeSuffixInShaderConstants&&(n.NUM_SAMPLES=n.NUM_SAMPLES+"u"),n.REALTIME_FILTERING=!0):n.REALTIME_FILTERING=!1,n.INVERTCUBICMAP=d.coordinatesMode===Eo.INVCUBIC_MODE,n.REFLECTIONMAP_3D=d.isCube,n.REFLECTIONMAP_OPPOSITEZ=n.REFLECTIONMAP_3D&&this.getScene().useRightHandedSystem?!d.invertZ:d.invertZ,n.REFLECTIONMAP_CUBIC=!1,n.REFLECTIONMAP_EXPLICIT=!1,n.REFLECTIONMAP_PLANAR=!1,n.REFLECTIONMAP_PROJECTION=!1,n.REFLECTIONMAP_SKYBOX=!1,n.REFLECTIONMAP_SPHERICAL=!1,n.REFLECTIONMAP_EQUIRECTANGULAR=!1,n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,d.coordinatesMode){case Eo.EXPLICIT_MODE:n.REFLECTIONMAP_EXPLICIT=!0;break;case Eo.PLANAR_MODE:n.REFLECTIONMAP_PLANAR=!0;break;case Eo.PROJECTION_MODE:n.REFLECTIONMAP_PROJECTION=!0;break;case Eo.SKYBOX_MODE:n.REFLECTIONMAP_SKYBOX=!0;break;case Eo.SPHERICAL_MODE:n.REFLECTIONMAP_SPHERICAL=!0;break;case Eo.EQUIRECTANGULAR_MODE:n.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case Eo.FIXED_EQUIRECTANGULAR_MODE:n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case Eo.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case Eo.CUBIC_MODE:case Eo.INVCUBIC_MODE:default:n.REFLECTIONMAP_CUBIC=!0,n.USE_LOCAL_REFLECTIONMAP_CUBIC=!!d.boundingBoxSize}d.coordinatesMode!==Eo.SKYBOX_MODE&&(d.irradianceTexture?(n.USEIRRADIANCEMAP=!0,n.USESPHERICALFROMREFLECTIONMAP=!1):d.isCube&&(n.USESPHERICALFROMREFLECTIONMAP=!0,n.USEIRRADIANCEMAP=!1,this._forceIrradianceInFragment||this.realTimeFiltering||this._twoSidedLighting||l.getCaps().maxVaryingVectors<=8?n.USESPHERICALINVERTEX=!1:n.USESPHERICALINVERTEX=!0))}else n.REFLECTION=!1,n.REFLECTIONMAP_3D=!1,n.REFLECTIONMAP_SPHERICAL=!1,n.REFLECTIONMAP_PLANAR=!1,n.REFLECTIONMAP_CUBIC=!1,n.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,n.REFLECTIONMAP_PROJECTION=!1,n.REFLECTIONMAP_SKYBOX=!1,n.REFLECTIONMAP_EXPLICIT=!1,n.REFLECTIONMAP_EQUIRECTANGULAR=!1,n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,n.INVERTCUBICMAP=!1,n.USESPHERICALFROMREFLECTIONMAP=!1,n.USEIRRADIANCEMAP=!1,n.USESPHERICALINVERTEX=!1,n.REFLECTIONMAP_OPPOSITEZ=!1,n.LODINREFLECTIONALPHA=!1,n.GAMMAREFLECTION=!1,n.RGBDREFLECTION=!1,n.LINEARSPECULARREFLECTION=!1;if(this._lightmapTexture&&tl.LightmapTextureEnabled?(Xr.PrepareDefinesForMergedUV(this._lightmapTexture,n,"LIGHTMAP"),n.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,n.GAMMALIGHTMAP=this._lightmapTexture.gammaSpace,n.RGBDLIGHTMAP=this._lightmapTexture.isRGBD):n.LIGHTMAP=!1,this._emissiveTexture&&tl.EmissiveTextureEnabled?(Xr.PrepareDefinesForMergedUV(this._emissiveTexture,n,"EMISSIVE"),n.GAMMAEMISSIVE=this._emissiveTexture.gammaSpace):n.EMISSIVE=!1,tl.SpecularTextureEnabled){if(this._metallicTexture?(Xr.PrepareDefinesForMergedUV(this._metallicTexture,n,"REFLECTIVITY"),n.ROUGHNESSSTOREINMETALMAPALPHA=this._useRoughnessFromMetallicTextureAlpha,n.ROUGHNESSSTOREINMETALMAPGREEN=!this._useRoughnessFromMetallicTextureAlpha&&this._useRoughnessFromMetallicTextureGreen,n.METALLNESSSTOREINMETALMAPBLUE=this._useMetallnessFromMetallicTextureBlue,n.AOSTOREINMETALMAPRED=this._useAmbientOcclusionFromMetallicTextureRed,n.REFLECTIVITY_GAMMA=!1):this._reflectivityTexture?(Xr.PrepareDefinesForMergedUV(this._reflectivityTexture,n,"REFLECTIVITY"),n.MICROSURFACEFROMREFLECTIVITYMAP=this._useMicroSurfaceFromReflectivityMapAlpha,n.MICROSURFACEAUTOMATIC=this._useAutoMicroSurfaceFromReflectivityMap,n.REFLECTIVITY_GAMMA=this._reflectivityTexture.gammaSpace):n.REFLECTIVITY=!1,this._metallicReflectanceTexture||this._reflectanceTexture){var p=null!==this._metallicReflectanceTexture&&this._metallicReflectanceTexture._texture===(null===(s=this._reflectanceTexture)||void 0===s?void 0:s._texture)&&this._metallicReflectanceTexture.checkTransformsAreIdentical(this._reflectanceTexture);n.METALLIC_REFLECTANCE_USE_ALPHA_ONLY=this._useOnlyMetallicFromMetallicReflectanceTexture&&!p,this._metallicReflectanceTexture?(Xr.PrepareDefinesForMergedUV(this._metallicReflectanceTexture,n,"METALLIC_REFLECTANCE"),n.METALLIC_REFLECTANCE_GAMMA=this._metallicReflectanceTexture.gammaSpace):n.METALLIC_REFLECTANCE=!1,this._reflectanceTexture&&!p&&(!this._metallicReflectanceTexture||this._metallicReflectanceTexture&&this._useOnlyMetallicFromMetallicReflectanceTexture)?(Xr.PrepareDefinesForMergedUV(this._reflectanceTexture,n,"REFLECTANCE"),n.REFLECTANCE_GAMMA=this._reflectanceTexture.gammaSpace):n.REFLECTANCE=!1}else n.METALLIC_REFLECTANCE=!1,n.REFLECTANCE=!1;this._microSurfaceTexture?Xr.PrepareDefinesForMergedUV(this._microSurfaceTexture,n,"MICROSURFACEMAP"):n.MICROSURFACEMAP=!1}else n.REFLECTIVITY=!1,n.MICROSURFACEMAP=!1;l.getCaps().standardDerivatives&&this._bumpTexture&&tl.BumpTextureEnabled&&!this._disableBumpMap?(Xr.PrepareDefinesForMergedUV(this._bumpTexture,n,"BUMP"),this._useParallax&&this._albedoTexture&&tl.DiffuseTextureEnabled?(n.PARALLAX=!0,n.PARALLAX_RHS=c.useRightHandedSystem,n.PARALLAXOCCLUSION=!!this._useParallaxOcclusion):n.PARALLAX=!1,n.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap):(n.BUMP=!1,n.PARALLAX=!1,n.PARALLAX_RHS=!1,n.PARALLAXOCCLUSION=!1,n.OBJECTSPACE_NORMALMAP=!1),this._environmentBRDFTexture&&tl.ReflectionTextureEnabled?(n.ENVIRONMENTBRDF=!0,n.ENVIRONMENTBRDF_RGBD=this._environmentBRDFTexture.isRGBD):(n.ENVIRONMENTBRDF=!1,n.ENVIRONMENTBRDF_RGBD=!1),this._shouldUseAlphaFromAlbedoTexture()?n.ALPHAFROMALBEDO=!0:n.ALPHAFROMALBEDO=!1}n.SPECULAROVERALPHA=this._useSpecularOverAlpha,this._lightFalloff===t.LIGHTFALLOFF_STANDARD?(n.USEPHYSICALLIGHTFALLOFF=!1,n.USEGLTFLIGHTFALLOFF=!1):this._lightFalloff===t.LIGHTFALLOFF_GLTF?(n.USEPHYSICALLIGHTFALLOFF=!1,n.USEGLTFLIGHTFALLOFF=!0):(n.USEPHYSICALLIGHTFALLOFF=!0,n.USEGLTFLIGHTFALLOFF=!1),n.RADIANCEOVERALPHA=this._useRadianceOverAlpha,!this.backFaceCulling&&this._twoSidedLighting?n.TWOSIDEDLIGHTING=!0:n.TWOSIDEDLIGHTING=!1,n.SPECULARAA=l.getCaps().standardDerivatives&&this._enableSpecularAntiAliasing}(n._areTexturesDirty||n._areMiscDirty)&&(n.ALPHATESTVALUE="".concat(this._alphaCutOff).concat(this._alphaCutOff%1==0?".":""),n.PREMULTIPLYALPHA=this.alphaMode===a.ALPHA_PREMULTIPLIED||this.alphaMode===a.ALPHA_PREMULTIPLIED_PORTERDUFF,n.ALPHABLEND=this.needAlphaBlendingForMesh(e),n.ALPHAFRESNEL=this._useAlphaFresnel||this._useLinearAlphaFresnel,n.LINEARALPHAFRESNEL=this._useLinearAlphaFresnel),n._areImageProcessingDirty&&this._imageProcessingConfiguration&&this._imageProcessingConfiguration.prepareDefines(n),n.FORCENORMALFORWARD=this._forceNormalForward,n.RADIANCEOCCLUSION=this._useRadianceOcclusion,n.HORIZONOCCLUSION=this._useHorizonOcclusion,n._areMiscDirty&&(Xr.PrepareDefinesForMisc(e,c,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e)||this._forceAlphaTest,n,this._applyDecalMapAfterDetailMap),n.UNLIT=this._unlit||(this.pointsCloud||this.wireframe)&&!e.isVerticesDataPresent(Yn.NormalKind),n.DEBUGMODE=this._debugMode),Xr.PrepareDefinesForFrameBoundValues(c,l,this,n,!!i,r,o),this._eventInfo.defines=n,this._eventInfo.mesh=e,this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo),Xr.PrepareDefinesForAttributes(e,n,!0,!0,!0,this._transparencyMode!==t.PBRMATERIAL_OPAQUE),this._callbackPluginEventPrepareDefines(this._eventInfo)},t.prototype.forceCompilation=function(e,t,n){var i=this,r=j({clipPlane:!1,useInstances:!1},n);this._uniformBufferLayoutBuilt||this.buildUniformLayout(),this._callbackPluginEventGeneric(Wr.GetDefineNames,this._eventInfo);var o=new wm(this._eventInfo.defineNames),a=this._prepareEffect(e,o,void 0,void 0,r.useInstances,r.clipPlane,e.hasThinInstances);this._onEffectCreatedObservable&&(Om.effect=a,Om.subMesh=null,this._onEffectCreatedObservable.notifyObservers(Om)),a.isReady()?t&&t(this):a.onCompileObservable.add((function(){t&&t(i)}))},t.prototype.buildUniformLayout=function(){var t=this._uniformBuffer;t.addUniform("vAlbedoInfos",2),t.addUniform("vAmbientInfos",4),t.addUniform("vOpacityInfos",2),t.addUniform("vEmissiveInfos",2),t.addUniform("vLightmapInfos",2),t.addUniform("vReflectivityInfos",3),t.addUniform("vMicroSurfaceSamplerInfos",2),t.addUniform("vReflectionInfos",2),t.addUniform("vReflectionFilteringInfo",2),t.addUniform("vReflectionPosition",3),t.addUniform("vReflectionSize",3),t.addUniform("vBumpInfos",3),t.addUniform("albedoMatrix",16),t.addUniform("ambientMatrix",16),t.addUniform("opacityMatrix",16),t.addUniform("emissiveMatrix",16),t.addUniform("lightmapMatrix",16),t.addUniform("reflectivityMatrix",16),t.addUniform("microSurfaceSamplerMatrix",16),t.addUniform("bumpMatrix",16),t.addUniform("vTangentSpaceParams",2),t.addUniform("reflectionMatrix",16),t.addUniform("vReflectionColor",3),t.addUniform("vAlbedoColor",4),t.addUniform("vLightingIntensity",4),t.addUniform("vReflectionMicrosurfaceInfos",3),t.addUniform("pointSize",1),t.addUniform("vReflectivityColor",4),t.addUniform("vEmissiveColor",3),t.addUniform("vAmbientColor",3),t.addUniform("vDebugMode",2),t.addUniform("vMetallicReflectanceFactors",4),t.addUniform("vMetallicReflectanceInfos",2),t.addUniform("metallicReflectanceMatrix",16),t.addUniform("vReflectanceInfos",2),t.addUniform("reflectanceMatrix",16),t.addUniform("vSphericalL00",3),t.addUniform("vSphericalL1_1",3),t.addUniform("vSphericalL10",3),t.addUniform("vSphericalL11",3),t.addUniform("vSphericalL2_2",3),t.addUniform("vSphericalL2_1",3),t.addUniform("vSphericalL20",3),t.addUniform("vSphericalL21",3),t.addUniform("vSphericalL22",3),t.addUniform("vSphericalX",3),t.addUniform("vSphericalY",3),t.addUniform("vSphericalZ",3),t.addUniform("vSphericalXX_ZZ",3),t.addUniform("vSphericalYY_ZZ",3),t.addUniform("vSphericalZZ",3),t.addUniform("vSphericalXY",3),t.addUniform("vSphericalYZ",3),t.addUniform("vSphericalZX",3),e.prototype.buildUniformLayout.call(this)},t.prototype.bindForSubMesh=function(e,t,n){var i,r,o,a,s=this.getScene(),c=n.materialDefines;if(c){var l=n.effect;if(l){this._activeEffect=l,t.getMeshUniformBuffer().bindToEffect(l,"Mesh"),t.transferToEffect(e);var u=s.getEngine();this._uniformBuffer.bindToEffect(l,"Material"),this.prePassConfiguration.bindForSubMesh(this._activeEffect,s,t,e,this.isFrozen),this._eventInfo.subMesh=n,this._callbackPluginEventHardBindForSubMesh(this._eventInfo),c.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var d=l._forceRebindOnNextCall||this._mustRebind(s,l,t.visibility);Xr.BindBonesParameters(t,this._activeEffect,this.prePassConfiguration);var p=null,f=this._uniformBuffer;if(d){if(this.bindViewProjection(l),p=this._getReflectionTexture(),!f.useUbo||!this.isFrozen||!f.isSync||l._forceRebindOnNextCall){if(s.texturesEnabled){if(this._albedoTexture&&tl.DiffuseTextureEnabled&&(f.updateFloat2("vAlbedoInfos",this._albedoTexture.coordinatesIndex,this._albedoTexture.level),Xr.BindTextureMatrix(this._albedoTexture,f,"albedo")),this._ambientTexture&&tl.AmbientTextureEnabled&&(f.updateFloat4("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level,this._ambientTextureStrength,this._ambientTextureImpactOnAnalyticalLights),Xr.BindTextureMatrix(this._ambientTexture,f,"ambient")),this._opacityTexture&&tl.OpacityTextureEnabled&&(f.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),Xr.BindTextureMatrix(this._opacityTexture,f,"opacity")),p&&tl.ReflectionTextureEnabled){if(f.updateMatrix("reflectionMatrix",p.getReflectionTextureMatrix()),f.updateFloat2("vReflectionInfos",p.level,0),p.boundingBoxSize){var m=p;f.updateVector3("vReflectionPosition",m.boundingBoxPosition),f.updateVector3("vReflectionSize",m.boundingBoxSize)}if(this.realTimeFiltering){var _=p.getSize().width;f.updateFloat2("vReflectionFilteringInfo",_,h.Log2(_))}if(!c.USEIRRADIANCEMAP){var g=p.sphericalPolynomial;if(c.USESPHERICALFROMREFLECTIONMAP&&g)if(c.SPHERICAL_HARMONICS){var y=g.preScaledHarmonics;f.updateVector3("vSphericalL00",y.l00),f.updateVector3("vSphericalL1_1",y.l1_1),f.updateVector3("vSphericalL10",y.l10),f.updateVector3("vSphericalL11",y.l11),f.updateVector3("vSphericalL2_2",y.l2_2),f.updateVector3("vSphericalL2_1",y.l2_1),f.updateVector3("vSphericalL20",y.l20),f.updateVector3("vSphericalL21",y.l21),f.updateVector3("vSphericalL22",y.l22)}else f.updateFloat3("vSphericalX",g.x.x,g.x.y,g.x.z),f.updateFloat3("vSphericalY",g.y.x,g.y.y,g.y.z),f.updateFloat3("vSphericalZ",g.z.x,g.z.y,g.z.z),f.updateFloat3("vSphericalXX_ZZ",g.xx.x-g.zz.x,g.xx.y-g.zz.y,g.xx.z-g.zz.z),f.updateFloat3("vSphericalYY_ZZ",g.yy.x-g.zz.x,g.yy.y-g.zz.y,g.yy.z-g.zz.z),f.updateFloat3("vSphericalZZ",g.zz.x,g.zz.y,g.zz.z),f.updateFloat3("vSphericalXY",g.xy.x,g.xy.y,g.xy.z),f.updateFloat3("vSphericalYZ",g.yz.x,g.yz.y,g.yz.z),f.updateFloat3("vSphericalZX",g.zx.x,g.zx.y,g.zx.z)}f.updateFloat3("vReflectionMicrosurfaceInfos",p.getSize().width,p.lodGenerationScale,p.lodGenerationOffset)}this._emissiveTexture&&tl.EmissiveTextureEnabled&&(f.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),Xr.BindTextureMatrix(this._emissiveTexture,f,"emissive")),this._lightmapTexture&&tl.LightmapTextureEnabled&&(f.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),Xr.BindTextureMatrix(this._lightmapTexture,f,"lightmap")),tl.SpecularTextureEnabled&&(this._metallicTexture?(f.updateFloat3("vReflectivityInfos",this._metallicTexture.coordinatesIndex,this._metallicTexture.level,this._ambientTextureStrength),Xr.BindTextureMatrix(this._metallicTexture,f,"reflectivity")):this._reflectivityTexture&&(f.updateFloat3("vReflectivityInfos",this._reflectivityTexture.coordinatesIndex,this._reflectivityTexture.level,1),Xr.BindTextureMatrix(this._reflectivityTexture,f,"reflectivity")),this._metallicReflectanceTexture&&(f.updateFloat2("vMetallicReflectanceInfos",this._metallicReflectanceTexture.coordinatesIndex,this._metallicReflectanceTexture.level),Xr.BindTextureMatrix(this._metallicReflectanceTexture,f,"metallicReflectance")),this._reflectanceTexture&&c.REFLECTANCE&&(f.updateFloat2("vReflectanceInfos",this._reflectanceTexture.coordinatesIndex,this._reflectanceTexture.level),Xr.BindTextureMatrix(this._reflectanceTexture,f,"reflectance")),this._microSurfaceTexture&&(f.updateFloat2("vMicroSurfaceSamplerInfos",this._microSurfaceTexture.coordinatesIndex,this._microSurfaceTexture.level),Xr.BindTextureMatrix(this._microSurfaceTexture,f,"microSurfaceSampler"))),this._bumpTexture&&u.getCaps().standardDerivatives&&tl.BumpTextureEnabled&&!this._disableBumpMap&&(f.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,this._bumpTexture.level,this._parallaxScaleBias),Xr.BindTextureMatrix(this._bumpTexture,f,"bump"),s._mirroredCameraPosition?f.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):f.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1))}if(this.pointsCloud&&f.updateFloat("pointSize",this.pointSize),c.METALLICWORKFLOW){k.Color3[0].r=void 0===this._metallic||null===this._metallic?1:this._metallic,k.Color3[0].g=void 0===this._roughness||null===this._roughness?1:this._roughness,f.updateColor4("vReflectivityColor",k.Color3[0],1);var v=null!==(r=null===(i=this.subSurface)||void 0===i?void 0:i._indexOfRefraction)&&void 0!==r?r:1.5,b=Math.pow((v-1)/(v+1),2);this._metallicReflectanceColor.scaleToRef(b*this._metallicF0Factor,k.Color3[0]);var T=this._metallicF0Factor;f.updateColor4("vMetallicReflectanceFactors",k.Color3[0],T)}else f.updateColor4("vReflectivityColor",this._reflectivityColor,this._microSurface);f.updateColor3("vEmissiveColor",tl.EmissiveTextureEnabled?this._emissiveColor:B.BlackReadOnly),f.updateColor3("vReflectionColor",this._reflectionColor),!c.SS_REFRACTION&&(null===(o=this.subSurface)||void 0===o?void 0:o._linkRefractionWithTransparency)?f.updateColor4("vAlbedoColor",this._albedoColor,1):f.updateColor4("vAlbedoColor",this._albedoColor,this.alpha),this._lightingInfos.x=this._directIntensity,this._lightingInfos.y=this._emissiveIntensity,this._lightingInfos.z=this._environmentIntensity*s.environmentIntensity,this._lightingInfos.w=this._specularIntensity,f.updateVector4("vLightingIntensity",this._lightingInfos),s.ambientColor.multiplyToRef(this._ambientColor,this._globalAmbientColor),f.updateColor3("vAmbientColor",this._globalAmbientColor),f.updateFloat2("vDebugMode",this.debugLimit,this.debugFactor)}s.texturesEnabled&&(this._albedoTexture&&tl.DiffuseTextureEnabled&&f.setTexture("albedoSampler",this._albedoTexture),this._ambientTexture&&tl.AmbientTextureEnabled&&f.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&tl.OpacityTextureEnabled&&f.setTexture("opacitySampler",this._opacityTexture),p&&tl.ReflectionTextureEnabled&&(c.LODBASEDMICROSFURACE?f.setTexture("reflectionSampler",p):(f.setTexture("reflectionSampler",p._lodTextureMid||p),f.setTexture("reflectionSamplerLow",p._lodTextureLow||p),f.setTexture("reflectionSamplerHigh",p._lodTextureHigh||p)),c.USEIRRADIANCEMAP&&f.setTexture("irradianceSampler",p.irradianceTexture)),c.ENVIRONMENTBRDF&&f.setTexture("environmentBrdfSampler",this._environmentBRDFTexture),this._emissiveTexture&&tl.EmissiveTextureEnabled&&f.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&tl.LightmapTextureEnabled&&f.setTexture("lightmapSampler",this._lightmapTexture),tl.SpecularTextureEnabled&&(this._metallicTexture?f.setTexture("reflectivitySampler",this._metallicTexture):this._reflectivityTexture&&f.setTexture("reflectivitySampler",this._reflectivityTexture),this._metallicReflectanceTexture&&f.setTexture("metallicReflectanceSampler",this._metallicReflectanceTexture),this._reflectanceTexture&&c.REFLECTANCE&&f.setTexture("reflectanceSampler",this._reflectanceTexture),this._microSurfaceTexture&&f.setTexture("microSurfaceSampler",this._microSurfaceTexture)),this._bumpTexture&&u.getCaps().standardDerivatives&&tl.BumpTextureEnabled&&!this._disableBumpMap&&f.setTexture("bumpSampler",this._bumpTexture)),this.getScene().useOrderIndependentTransparency&&this.needAlphaBlendingForMesh(t)&&this.getScene().depthPeelingRenderer.bind(l),this._eventInfo.subMesh=n,this._callbackPluginEventBindForSubMesh(this._eventInfo),Hr(this._activeEffect,this,s),this.bindEyePosition(l)}else s.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0);!d&&this.isFrozen||(s.lightsEnabled&&!this._disableLighting&&Xr.BindLights(s,t,this._activeEffect,c,this._maxSimultaneousLights),(s.fogEnabled&&t.applyFog&&s.fogMode!==Ci.FOGMODE_NONE||p||this.subSurface.refractionTexture||t.receiveShadows||c.PREPASS)&&this.bindView(l),Xr.BindFogParameters(s,t,this._activeEffect,!0),c.NUM_MORPH_INFLUENCERS&&Xr.BindMorphTargetParameters(t,this._activeEffect),c.BAKED_VERTEX_ANIMATION_TEXTURE&&(null===(a=t.bakedVertexAnimationManager)||void 0===a||a.bind(l,c.INSTANCES)),this._imageProcessingConfiguration.bind(this._activeEffect),Xr.BindLogDepth(c,this._activeEffect,s)),this._afterBind(t,this._activeEffect),f.update()}}},t.prototype.getAnimatables=function(){var t=e.prototype.getAnimatables.call(this);return this._albedoTexture&&this._albedoTexture.animations&&this._albedoTexture.animations.length>0&&t.push(this._albedoTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&t.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&t.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&t.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&t.push(this._emissiveTexture),this._metallicTexture&&this._metallicTexture.animations&&this._metallicTexture.animations.length>0?t.push(this._metallicTexture):this._reflectivityTexture&&this._reflectivityTexture.animations&&this._reflectivityTexture.animations.length>0&&t.push(this._reflectivityTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&t.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&t.push(this._lightmapTexture),this._metallicReflectanceTexture&&this._metallicReflectanceTexture.animations&&this._metallicReflectanceTexture.animations.length>0&&t.push(this._metallicReflectanceTexture),this._reflectanceTexture&&this._reflectanceTexture.animations&&this._reflectanceTexture.animations.length>0&&t.push(this._reflectanceTexture),this._microSurfaceTexture&&this._microSurfaceTexture.animations&&this._microSurfaceTexture.animations.length>0&&t.push(this._microSurfaceTexture),t},t.prototype._getReflectionTexture=function(){return this._reflectionTexture?this._reflectionTexture:this.getScene().environmentTexture},t.prototype.getActiveTextures=function(){var t=e.prototype.getActiveTextures.call(this);return this._albedoTexture&&t.push(this._albedoTexture),this._ambientTexture&&t.push(this._ambientTexture),this._opacityTexture&&t.push(this._opacityTexture),this._reflectionTexture&&t.push(this._reflectionTexture),this._emissiveTexture&&t.push(this._emissiveTexture),this._reflectivityTexture&&t.push(this._reflectivityTexture),this._metallicTexture&&t.push(this._metallicTexture),this._metallicReflectanceTexture&&t.push(this._metallicReflectanceTexture),this._reflectanceTexture&&t.push(this._reflectanceTexture),this._microSurfaceTexture&&t.push(this._microSurfaceTexture),this._bumpTexture&&t.push(this._bumpTexture),this._lightmapTexture&&t.push(this._lightmapTexture),t},t.prototype.hasTexture=function(t){return!!e.prototype.hasTexture.call(this,t)||this._albedoTexture===t||this._ambientTexture===t||this._opacityTexture===t||this._reflectionTexture===t||this._emissiveTexture===t||this._reflectivityTexture===t||this._metallicTexture===t||this._metallicReflectanceTexture===t||this._reflectanceTexture===t||this._microSurfaceTexture===t||this._bumpTexture===t||this._lightmapTexture===t},t.prototype.setPrePassRenderer=function(){var e;if(!(null===(e=this.subSurface)||void 0===e?void 0:e.isScatteringEnabled))return!1;var t=this.getScene().enableSubSurfaceForPrePass();return t&&(t.enabled=!0),!0},t.prototype.dispose=function(t,n){var i,r,o,a,s,c,l,u,h,d,p,f;n&&(this._environmentBRDFTexture&&this.getScene().environmentBRDFTexture!==this._environmentBRDFTexture&&this._environmentBRDFTexture.dispose(),null===(i=this._albedoTexture)||void 0===i||i.dispose(),null===(r=this._ambientTexture)||void 0===r||r.dispose(),null===(o=this._opacityTexture)||void 0===o||o.dispose(),null===(a=this._reflectionTexture)||void 0===a||a.dispose(),null===(s=this._emissiveTexture)||void 0===s||s.dispose(),null===(c=this._metallicTexture)||void 0===c||c.dispose(),null===(l=this._reflectivityTexture)||void 0===l||l.dispose(),null===(u=this._bumpTexture)||void 0===u||u.dispose(),null===(h=this._lightmapTexture)||void 0===h||h.dispose(),null===(d=this._metallicReflectanceTexture)||void 0===d||d.dispose(),null===(p=this._reflectanceTexture)||void 0===p||p.dispose(),null===(f=this._microSurfaceTexture)||void 0===f||f.dispose()),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e.prototype.dispose.call(this,t,n)},t.PBRMATERIAL_OPAQUE=qr.MATERIAL_OPAQUE,t.PBRMATERIAL_ALPHATEST=qr.MATERIAL_ALPHATEST,t.PBRMATERIAL_ALPHABLEND=qr.MATERIAL_ALPHABLEND,t.PBRMATERIAL_ALPHATESTANDBLEND=qr.MATERIAL_ALPHATESTANDBLEND,t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=0,t.LIGHTFALLOFF_PHYSICAL=0,t.LIGHTFALLOFF_GLTF=1,t.LIGHTFALLOFF_STANDARD=2,W([Ne()],t.prototype,"_imageProcessingConfiguration",void 0),W([xe("_markAllSubMeshesAsMiscDirty")],t.prototype,"debugMode",void 0),t}(oa),Dm=function(e){function t(n,i){var r=e.call(this,n,i)||this;return r.directIntensity=1,r.emissiveIntensity=1,r.environmentIntensity=1,r.specularIntensity=1,r.disableBumpMap=!1,r.ambientTextureStrength=1,r.ambientTextureImpactOnAnalyticalLights=t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,r.metallicF0Factor=1,r.metallicReflectanceColor=B.White(),r.useOnlyMetallicFromMetallicReflectanceTexture=!1,r.ambientColor=new B(0,0,0),r.albedoColor=new B(1,1,1),r.reflectivityColor=new B(1,1,1),r.reflectionColor=new B(1,1,1),r.emissiveColor=new B(0,0,0),r.microSurface=1,r.useLightmapAsShadowmap=!1,r.useAlphaFromAlbedoTexture=!1,r.forceAlphaTest=!1,r.alphaCutOff=.4,r.useSpecularOverAlpha=!0,r.useMicroSurfaceFromReflectivityMapAlpha=!1,r.useRoughnessFromMetallicTextureAlpha=!0,r.useRoughnessFromMetallicTextureGreen=!1,r.useMetallnessFromMetallicTextureBlue=!1,r.useAmbientOcclusionFromMetallicTextureRed=!1,r.useAmbientInGrayScale=!1,r.useAutoMicroSurfaceFromReflectivityMap=!1,r.useRadianceOverAlpha=!0,r.useObjectSpaceNormalMap=!1,r.useParallax=!1,r.useParallaxOcclusion=!1,r.parallaxScaleBias=.05,r.disableLighting=!1,r.forceIrradianceInFragment=!1,r.maxSimultaneousLights=4,r.invertNormalMapX=!1,r.invertNormalMapY=!1,r.twoSidedLighting=!1,r.useAlphaFresnel=!1,r.useLinearAlphaFresnel=!1,r.environmentBRDFTexture=null,r.forceNormalForward=!1,r.enableSpecularAntiAliasing=!1,r.useHorizonOcclusion=!0,r.useRadianceOcclusion=!0,r.unlit=!1,r.applyDecalMapAfterDetailMap=!1,r._environmentBRDFTexture=_m(r.getScene()),r}return H(t,e),Object.defineProperty(t.prototype,"refractionTexture",{get:function(){return this.subSurface.refractionTexture},set:function(e){this.subSurface.refractionTexture=e,e?this.subSurface.isRefractionEnabled=!0:this.subSurface.linkRefractionWithTransparency||(this.subSurface.isRefractionEnabled=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indexOfRefraction",{get:function(){return this.subSurface.indexOfRefraction},set:function(e){this.subSurface.indexOfRefraction=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"invertRefractionY",{get:function(){return this.subSurface.invertRefractionY},set:function(e){this.subSurface.invertRefractionY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linkRefractionWithTransparency",{get:function(){return this.subSurface.linkRefractionWithTransparency},set:function(e){this.subSurface.linkRefractionWithTransparency=e,e&&(this.subSurface.isRefractionEnabled=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"usePhysicalLightFalloff",{get:function(){return this._lightFalloff===Mm.LIGHTFALLOFF_PHYSICAL},set:function(e){e!==this.usePhysicalLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?Mm.LIGHTFALLOFF_PHYSICAL:Mm.LIGHTFALLOFF_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useGLTFLightFalloff",{get:function(){return this._lightFalloff===Mm.LIGHTFALLOFF_GLTF},set:function(e){e!==this.useGLTFLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?Mm.LIGHTFALLOFF_GLTF:Mm.LIGHTFALLOFF_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraToneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraExposure",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraContrast",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingTexture",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this._imageProcessingConfiguration.colorGradingTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurves",{get:function(){return this._imageProcessingConfiguration.colorCurves},set:function(e){this._imageProcessingConfiguration.colorCurves=e},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"PBRMaterial"},t.prototype.clone=function(e,n,i){var r=this;void 0===n&&(n=!0),void 0===i&&(i="");var o=ke.Clone((function(){return new t(e,r.getScene())}),this,{cloneTexturesOnlyOnce:n});return o.id=e,o.name=e,this.stencil.copyTo(o.stencil),this._clonePlugins(o,i),o},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.customType="BABYLON.PBRMaterial",t},t.Parse=function(e,n,i){var r=ke.Parse((function(){return new t(e.name,n)}),e,n,i);return e.stencil&&r.stencil.parse(e.stencil,n,i),qr._parsePlugins(e,r,n,i),e.clearCoat&&r.clearCoat.parse(e.clearCoat,n,i),e.anisotropy&&r.anisotropy.parse(e.anisotropy,n,i),e.brdf&&r.brdf.parse(e.brdf,n,i),e.sheen&&r.sheen.parse(e.sheen,n,i),e.subSurface&&r.subSurface.parse(e.subSurface,n,i),e.iridescence&&r.iridescence.parse(e.iridescence,n,i),r},t.PBRMATERIAL_OPAQUE=Mm.PBRMATERIAL_OPAQUE,t.PBRMATERIAL_ALPHATEST=Mm.PBRMATERIAL_ALPHATEST,t.PBRMATERIAL_ALPHABLEND=Mm.PBRMATERIAL_ALPHABLEND,t.PBRMATERIAL_ALPHATESTANDBLEND=Mm.PBRMATERIAL_ALPHATESTANDBLEND,t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=Mm.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"directIntensity",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveIntensity",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"environmentIntensity",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"specularIntensity",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"disableBumpMap",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"albedoTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTexture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTextureStrength",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTextureImpactOnAnalyticalLights",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"opacityTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectivityTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicTexture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallic",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"roughness",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicF0Factor",void 0),W([Pe(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicReflectanceColor",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useOnlyMetallicFromMetallicReflectanceTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicReflectanceTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectanceTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"microSurfaceTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"bumpTexture",void 0),W([Ce(),xe("_markAllSubMeshesAsTexturesDirty",null)],t.prototype,"lightmapTexture",void 0),W([Pe("ambient"),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientColor",void 0),W([Pe("albedo"),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"albedoColor",void 0),W([Pe("reflectivity"),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectivityColor",void 0),W([Pe("reflection"),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionColor",void 0),W([Pe("emissive"),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveColor",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"microSurface",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLightmapAsShadowmap",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"useAlphaFromAlbedoTexture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"forceAlphaTest",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"alphaCutOff",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useSpecularOverAlpha",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useMicroSurfaceFromReflectivityMapAlpha",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMetallicTextureAlpha",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMetallicTextureGreen",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useMetallnessFromMetallicTextureBlue",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAmbientOcclusionFromMetallicTextureRed",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAmbientInGrayScale",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAutoMicroSurfaceFromReflectivityMap",void 0),W([Se()],t.prototype,"usePhysicalLightFalloff",null),W([Se()],t.prototype,"useGLTFLightFalloff",null),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRadianceOverAlpha",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useObjectSpaceNormalMap",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallax",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallaxOcclusion",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"parallaxScaleBias",void 0),W([Se(),xe("_markAllSubMeshesAsLightsDirty")],t.prototype,"disableLighting",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"forceIrradianceInFragment",void 0),W([Se(),xe("_markAllSubMeshesAsLightsDirty")],t.prototype,"maxSimultaneousLights",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapX",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapY",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"twoSidedLighting",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAlphaFresnel",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLinearAlphaFresnel",void 0),W([xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"environmentBRDFTexture",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"forceNormalForward",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"enableSpecularAntiAliasing",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useHorizonOcclusion",void 0),W([Se(),xe("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRadianceOcclusion",void 0),W([Se(),xe("_markAllSubMeshesAsMiscDirty")],t.prototype,"unlit",void 0),W([Se(),xe("_markAllSubMeshesAsMiscDirty")],t.prototype,"applyDecalMapAfterDetailMap",void 0),t}(Mm);b("BABYLON.PBRMaterial",Dm);var Nm=131072,Lm=131072;function Fm(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}var Bm=Fm("DXT1"),Um=Fm("DXT3"),km=Fm("DXT5"),Vm=Fm("DX10"),zm=function(){function e(){}return e.GetDDSInfo=function(e){var t=new Int32Array(e.buffer,e.byteOffset,31),n=new Int32Array(e.buffer,e.byteOffset,35),i=1;t[2]&Nm&&(i=Math.max(1,t[7]));var r=t[21],o=r===Vm?n[32]:0,s=a.TEXTURETYPE_UNSIGNED_INT;switch(r){case 113:s=a.TEXTURETYPE_HALF_FLOAT;break;case 116:s=a.TEXTURETYPE_FLOAT;break;case Vm:if(10===o){s=a.TEXTURETYPE_HALF_FLOAT;break}if(2===o){s=a.TEXTURETYPE_FLOAT;break}}return{width:t[4],height:t[3],mipmapCount:i,isFourCC:4==(4&t[20]),isRGB:64==(64&t[20]),isLuminance:(t[20]&Lm)===Lm,isCube:512==(512&t[28]),isCompressed:r===Bm||r===Um||r===km,dxgiFormat:o,textureType:s}},e._GetHalfFloatAsFloatRGBAArrayBuffer=function(t,n,i,r,o,a){for(var s=new Float32Array(r),c=new Uint16Array(o,i),l=0,u=0;u>8)},e._GetRGBArrayBuffer=function(e,t,n,i,r,o,a,s){for(var c=new Uint8Array(i),l=new Uint8Array(r,n),u=0,h=0;h>8&255,S>>16&255,S>>24&255))])}var I=e._ExtractLongWordOrder(b[23]),R=e._ExtractLongWordOrder(b[24]),O=e._ExtractLongWordOrder(b[25]),w=e._ExtractLongWordOrder(b[26]);C&&(E=t._getRGBABufferInternalSizedFormat(r.textureType)),y=1,b[2]&Nm&&!1!==o&&(y=Math.max(1,b[7]));for(var M=l||0,D=t.getCaps(),N=M;N0?r.sphericalPolynomial=dd.ConvertCubeMapToSphericalPolynomial({size:b[4],right:h[0],left:h[1],up:h[2],down:h[3],front:h[4],back:h[5],format:a.TEXTUREFORMAT_RGBA,type:a.TEXTURETYPE_FLOAT,gammaSpace:!1}):r.sphericalPolynomial=void 0}else J.Error("Compressed textures are not supported on this platform.");else J.Error("Unsupported format, must contain a FourCC, RGB or LUMINANCE code");else J.Error("Invalid magic number in DDS header")},e.StoreLODInAlphaChannel=!1,e}();rn.prototype.createPrefilteredCubeTexture=function(e,t,n,i,r,o,s,c,l){var u=this;return void 0===r&&(r=null),void 0===o&&(o=null),void 0===c&&(c=null),void 0===l&&(l=!0),this.createCubeTexture(e,t,null,!1,(function(e){if(e){var o=e.texture;if(l?e.info.sphericalPolynomial&&(o._sphericalPolynomial=e.info.sphericalPolynomial):o._sphericalPolynomial=new nd,o._source=wt.CubePrefiltered,u.getCaps().textureLOD)r&&r(o);else{var s=u._gl,c=e.width;if(c){for(var d=[],p=0;p<3;p++){var f=1-p/2,m=i,_=h.Log2(c)*n+i,g=m+(_-m)*f,y=Math.round(Math.min(Math.max(g,0),_)),v=new Xt(u,wt.Temp);if(v.type=o.type,v.format=o.format,v.width=Math.pow(2,Math.max(h.Log2(c)-y,0)),v.height=v.width,v.isCube=!0,v._cachedWrapU=a.TEXTURE_CLAMP_ADDRESSMODE,v._cachedWrapV=a.TEXTURE_CLAMP_ADDRESSMODE,u._bindTextureDirectly(s.TEXTURE_CUBE_MAP,v,!0),v.samplingMode=a.TEXTURE_LINEAR_LINEAR,s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_MAG_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),e.isDDS){var b=e.info,T=e.data;u._unpackFlipY(b.isCompressed),zm.UploadDDSLevels(u,v,T,b,!0,6,y)}else J.Warn("DDS is the only prefiltered cube map supported so far.");u._bindTextureDirectly(s.TEXTURE_CUBE_MAP,null);var E=new go(t);E._isCube=!0,E._texture=v,v.isReady=!0,d.push(E)}o._lodTextureHigh=d[2],o._lodTextureMid=d[1],o._lodTextureLow=d[0],r&&r(o)}}}else r&&r(null)}),o,s,c,l,n,i)};var Gm=function(){function e(){this.supportCascades=!0}return e.prototype.canLoad=function(e){return e.endsWith(".dds")},e.prototype.loadCubeData=function(e,t,n,i){var r,o=t.getEngine(),a=!1,s=1e3;if(Array.isArray(e))for(var c=0;c1)&&t.generateMipMaps,o._unpackFlipY(r.isCompressed),zm.UploadDDSLevels(o,t,l,r,a,6,-1,c),r.isFourCC||1!==r.mipmapCount?s=r.mipmapCount-1:o.generateMipMapsForCubemap(t)}else l=e,r=zm.GetDDSInfo(l),t.width=r.width,t.height=r.height,n&&(r.sphericalPolynomial=new nd),a=(r.isRGB||r.isLuminance||r.mipmapCount>1)&&t.generateMipMaps,o._unpackFlipY(r.isCompressed),zm.UploadDDSLevels(o,t,l,r,a,6),r.isFourCC||1!==r.mipmapCount?s=r.mipmapCount-1:o.generateMipMapsForCubemap(t,!1);o._setCubeMapTextureParams(t,a,s),t.isReady=!0,t.onLoadedObservable.notifyObservers(t),t.onLoadedObservable.clear(),i&&i({isDDS:!0,width:t.width,info:r,data:e,texture:t})},e.prototype.loadData=function(e,t,n){var i=zm.GetDDSInfo(e),r=(i.isRGB||i.isLuminance||i.mipmapCount>1)&&t.generateMipMaps&&i.width>>i.mipmapCount-1==1;n(i.width,i.height,r,i.isFourCC,(function(){zm.UploadDDSLevels(t.getEngine(),t,e,i,r,1)}))},e}();Dr._TextureLoaders.push(new Gm);var Hm=function(){function e(){this.supportCascades=!1}return e.prototype.canLoad=function(e){return e.endsWith(".env")},e.prototype.loadCubeData=function(e,t,n,i,r){if(!Array.isArray(e)){var o=_d(e);if(o){t.width=o.width,t.height=o.width;try{xd(t,o),Td(t,e,o).then((function(){t.isReady=!0,t.onLoadedObservable.notifyObservers(t),t.onLoadedObservable.clear(),i&&i()}),(function(e){null==r||r("Can not upload environment levels",e)}))}catch(e){null==r||r("Can not upload environment file",e)}}else r&&r("Can not parse the environment file",null)}},e.prototype.loadData=function(){throw".env not supported in 2d."},e}();Dr._TextureLoaders.push(new Hm);var jm,Wm,Xm,Ym=function(){function e(t,n){if(this.data=t,this.isInvalid=!1,!e.IsValid(t))return this.isInvalid=!0,void J.Error("texture missing KTX identifier");var i=Uint32Array.BYTES_PER_ELEMENT,r=new DataView(this.data.buffer,this.data.byteOffset+12,13*i),o=67305985===r.getUint32(0,!0);return this.glType=r.getUint32(1*i,o),this.glTypeSize=r.getUint32(2*i,o),this.glFormat=r.getUint32(3*i,o),this.glInternalFormat=r.getUint32(4*i,o),this.glBaseInternalFormat=r.getUint32(5*i,o),this.pixelWidth=r.getUint32(6*i,o),this.pixelHeight=r.getUint32(7*i,o),this.pixelDepth=r.getUint32(8*i,o),this.numberOfArrayElements=r.getUint32(9*i,o),this.numberOfFaces=r.getUint32(10*i,o),this.numberOfMipmapLevels=r.getUint32(11*i,o),this.bytesOfKeyValueData=r.getUint32(12*i,o),0!==this.glType?(J.Error("only compressed formats currently supported"),void(this.isInvalid=!0)):(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),0===this.pixelHeight||0!==this.pixelDepth?(J.Error("only 2D textures currently supported"),void(this.isInvalid=!0)):0!==this.numberOfArrayElements?(J.Error("texture arrays not currently supported"),void(this.isInvalid=!0)):this.numberOfFaces!==n?(J.Error("number of faces expected"+n+", but found "+this.numberOfFaces),void(this.isInvalid=!0)):void(this.loadType=e.COMPRESSED_2D))}return e.prototype.uploadLevels=function(t,n){switch(this.loadType){case e.COMPRESSED_2D:this._upload2DCompressedLevels(t,n);case e.TEX_2D:case e.COMPRESSED_3D:case e.TEX_3D:}},e.prototype._upload2DCompressedLevels=function(t,n){for(var i=e.HEADER_LEN+this.bytesOfKeyValueData,r=this.pixelWidth,o=this.pixelHeight,a=n?this.numberOfMipmapLevels:1,s=0;s=12){var t=new Uint8Array(e.buffer,e.byteOffset,12);if(171===t[0]&&75===t[1]&&84===t[2]&&88===t[3]&&32===t[4]&&49===t[5]&&49===t[6]&&187===t[7]&&13===t[8]&&10===t[9]&&26===t[10]&&10===t[11])return!0}return!1},e.HEADER_LEN=64,e.COMPRESSED_2D=0,e.COMPRESSED_3D=1,e.TEX_2D=2,e.TEX_3D=3,e}(),qm=function(){function e(e){this._pendingActions=new Array,this._workerInfos=e.map((function(e){return{workerPromise:Promise.resolve(e),idle:!0}}))}return e.prototype.dispose=function(){for(var e=0,t=this._workerInfos;e1,e.errors)throw new Error("KTX2 container - could not transcode the data. "+e.errors);for(var r=0;r=12){var t=new Uint8Array(e.buffer,e.byteOffset,12);if(171===t[0]&&75===t[1]&&84===t[2]&&88===t[3]&&32===t[4]&&50===t[5]&&48===t[6]&&187===t[7]&&13===t[8]&&10===t[9]&&26===t[10]&&10===t[11])return!0}return!1},e.URLConfig={jsDecoderModule:"https://cdn.babylonjs.com/babylon.ktx2Decoder.js",wasmUASTCToASTC:null,wasmUASTCToBC7:null,wasmUASTCToRGBA_UNORM:null,wasmUASTCToRGBA_SRGB:null,wasmUASTCToR8_UNORM:null,wasmUASTCToRG8_UNORM:null,jsMSCTranscoder:null,wasmMSCTranscoder:null,wasmZSTDDecoder:null},e.DefaultNumWorkers=e.GetDefaultNumWorkers(),e.DefaultDecoderOptions=new Zm,e}();function Jm(){var e;onmessage=function(t){if(t.data)switch(t.data.action){case"init":var n=t.data.urls;importScripts(n.jsDecoderModule),Qm(n),e=new KTX2DECODER.KTX2Decoder,postMessage({action:"init"});break;case"setDefaultDecoderOptions":KTX2DECODER.KTX2Decoder.DefaultDecoderOptions=t.data.options;break;case"decode":e.decode(t.data.data,t.data.caps,t.data.options).then((function(e){for(var t=[],n=0;n1&&t.generateMipMaps;r._unpackFlipY(!0),o.uploadLevels(t,t.generateMipMaps),t.width=o.pixelWidth,t.height=o.pixelHeight,r._setCubeMapTextureParams(t,a,o.numberOfMipmapLevels-1),t.isReady=!0,t.onLoadedObservable.notifyObservers(t),t.onLoadedObservable.clear(),i&&i()}},e.prototype.loadData=function(e,t,n,i){if(Ym.IsValid(e)){t._invertVScale=!t.invertY;var r=new Ym(e,1),o=function(e){switch(e){case a.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT:return a.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1;case a.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:return a.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3;case a.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:return a.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5;case a.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2:return a.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2;case a.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return a.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC;case a.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return a.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2;case a.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:return a.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4;case a.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM:return a.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM}return null}(r.glInternalFormat);o?(t.format=o,t._useSRGBBuffer=t.getEngine()._getUseSRGBBuffer(!0,t.generateMipMaps),t._gammaSpace=!0):t.format=r.glInternalFormat,n(r.pixelWidth,r.pixelHeight,t.generateMipMaps,!0,(function(){r.uploadLevels(t,t.generateMipMaps)}),r.isInvalid)}else $m.IsValid(e)?new $m(t.getEngine()).uploadAsync(e,t,i).then((function(){n(t.width,t.height,t.generateMipMaps,!0,(function(){}),!1)}),(function(e){J.Warn("Failed to load KTX2 texture data: ".concat(e.message)),n(0,0,!1,!1,(function(){}),!0)})):(J.Error("texture missing KTX identifier"),n(0,0,!1,!1,(function(){}),!0))},e}();Dr._TextureLoaders.unshift(new e_);var t_=function(e){function t(t,n,i){var r=e.call(this,t,C.Zero(),n)||this;return r._xrSessionManager=i,r._firstFrame=!1,r._referenceQuaternion=I.Identity(),r._referencedPosition=new C,r._trackingState=gl.NOT_TRACKING,r.onXRCameraInitializedObservable=new u,r.onBeforeCameraTeleport=new u,r.onAfterCameraTeleport=new u,r.onTrackingStateChanged=new u,r.compensateOnFirstFrame=!0,r._rotate180=new I(0,1,0,0),r.minZ=.1,r.rotationQuaternion=new I,r.cameraRigMode=dr.RIG_MODE_CUSTOM,r.updateUpVectorFromRotation=!0,r._updateNumberOfRigCameras(1),r.freezeProjectionMatrix(),r._deferOnly=!0,r._xrSessionManager.onXRSessionInit.add((function(){r._referencedPosition.copyFromFloats(0,0,0),r._referenceQuaternion.copyFromFloats(0,0,0,1),r._firstFrame=r.compensateOnFirstFrame})),r._xrSessionManager.onXRFrameObservable.add((function(){r._firstFrame&&r._updateFromXRSession(),r.onXRCameraInitializedObservable.hasObservers()&&(r.onXRCameraInitializedObservable.notifyObservers(r),r.onXRCameraInitializedObservable.clear()),r._deferredUpdated&&(r.position.copyFrom(r._deferredPositionUpdate),r.rotationQuaternion.copyFrom(r._deferredRotationQuaternionUpdate)),r._updateReferenceSpace(),r._updateFromXRSession()}),void 0,!0),r}return H(t,e),Object.defineProperty(t.prototype,"trackingState",{get:function(){return this._trackingState},enumerable:!1,configurable:!0}),t.prototype._setTrackingState=function(e){this._trackingState!==e&&(this._trackingState=e,this.onTrackingStateChanged.notifyObservers(e))},Object.defineProperty(t.prototype,"realWorldHeight",{get:function(){var e=this._xrSessionManager.currentFrame&&this._xrSessionManager.currentFrame.getViewerPose(this._xrSessionManager.baseReferenceSpace);return e&&e.transform?e.transform.position.y:0},enumerable:!1,configurable:!0}),t.prototype._updateForDualEyeDebugging=function(){this._updateNumberOfRigCameras(2),this.rigCameras[0].viewport=new hr(0,0,.5,1),this.rigCameras[0].outputRenderTarget=null,this.rigCameras[1].viewport=new hr(.5,0,.5,1),this.rigCameras[1].outputRenderTarget=null},t.prototype.setTransformationFromNonVRCamera=function(e,t){void 0===e&&(e=this.getScene().activeCamera),void 0===t&&(t=!0),e&&e!==this&&(e.computeWorldMatrix().decompose(void 0,this.rotationQuaternion,this.position),this.position.y=0,I.FromEulerAnglesToRef(0,this.rotationQuaternion.toEulerAngles().y,0,this.rotationQuaternion),this._firstFrame=!0,t&&this._xrSessionManager.resetReferenceSpace())},t.prototype.getClassName=function(){return"WebXRCamera"},t.prototype.setTarget=function(e){var t=w.Vector3[1];e.subtractToRef(this.position,t),t.y=0,t.normalize();var n=Math.atan2(t.x,t.z);this.rotationQuaternion.toEulerAnglesToRef(t),I.FromEulerAnglesToRef(t.x,n,t.z,this.rotationQuaternion)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._lastXRViewerPose=void 0},t.prototype._updateFromXRSession=function(){var e=this,t=this._xrSessionManager.currentFrame&&this._xrSessionManager.currentFrame.getViewerPose(this._xrSessionManager.referenceSpace);if(this._lastXRViewerPose=t||void 0,t){var n=t.emulatedPosition?gl.TRACKING_LOST:gl.TRACKING;if(this._setTrackingState(n),this.minZ!==this._cache.minZ||this.maxZ!==this._cache.maxZ){var i={depthFar:this.maxZ||1e4,depthNear:this.minZ};this._xrSessionManager.updateRenderState(i),this._cache.minZ=this.minZ,this._cache.maxZ=this.maxZ}if(t.transform){var r=t.transform.orientation;if(void 0===t.transform.orientation.x)return;var o=t.transform.position;this._referencedPosition.set(o.x,o.y,o.z),this._referenceQuaternion.set(r.x,r.y,r.z,r.w),this._scene.useRightHandedSystem||(this._referencedPosition.z*=-1,this._referenceQuaternion.z*=-1,this._referenceQuaternion.w*=-1),this._firstFrame?(this._firstFrame=!1,this.position.y+=this._referencedPosition.y,this._referenceQuaternion.copyFromFloats(0,0,0,1)):(this.rotationQuaternion.copyFrom(this._referenceQuaternion),this.position.copyFrom(this._referencedPosition))}this.rigCameras.length!==t.views.length&&this._updateNumberOfRigCameras(t.views.length),t.views.forEach((function(t,n){var i,r=e.rigCameras[n];r.isLeftCamera||r.isRightCamera||("right"===t.eye?r._isRightCamera=!0:"left"===t.eye&&(r._isLeftCamera=!0));var o=t.transform.position,a=t.transform.orientation;r.parent=e.parent,r.position.set(o.x,o.y,o.z),r.rotationQuaternion.set(a.x,a.y,a.z,a.w),e._scene.useRightHandedSystem?r.rotationQuaternion.multiplyInPlace(e._rotate180):(r.position.z*=-1,r.rotationQuaternion.z*=-1,r.rotationQuaternion.w*=-1),R.FromFloat32ArrayToRefScaled(t.projectionMatrix,0,1,r._projectionMatrix),e._scene.useRightHandedSystem||r._projectionMatrix.toggleProjectionMatrixHandInPlace(),0===n&&e._projectionMatrix.copyFrom(r._projectionMatrix);var s=e._xrSessionManager.getRenderTargetTextureForView(t);e._renderingMultiview=(null===(i=null==s?void 0:s._texture)||void 0===i?void 0:i.isMultiview)||!1,e._renderingMultiview?0==n&&(e._xrSessionManager.trySetViewportForView(e.viewport,t),e.outputRenderTarget=s):(e._xrSessionManager.trySetViewportForView(r.viewport,t),r.outputRenderTarget=s||e._xrSessionManager.getRenderTargetTextureForView(t)),r.layerMask=e.layerMask}))}else this._setTrackingState(gl.NOT_TRACKING)},t.prototype._updateNumberOfRigCameras=function(e){for(void 0===e&&(e=1);this.rigCameras.lengthe;){var n=this.rigCameras.pop();n&&n.dispose()}},t.prototype._updateReferenceSpace=function(){if(!this.position.equals(this._referencedPosition)||!this.rotationQuaternion.equals(this._referenceQuaternion)){var e=w.Matrix[0],n=w.Matrix[1],i=w.Matrix[2];R.ComposeToRef(t._ScaleReadOnly,this._referenceQuaternion,this._referencedPosition,e),R.ComposeToRef(t._ScaleReadOnly,this.rotationQuaternion,this.position,n),e.invert().multiplyToRef(n,i),i.invert(),this._scene.useRightHandedSystem||i.toggleModelMatrixHandInPlace(),i.decompose(void 0,this._referenceQuaternion,this._referencedPosition);var r=new XRRigidTransform({x:this._referencedPosition.x,y:this._referencedPosition.y,z:this._referencedPosition.z},{x:this._referenceQuaternion.x,y:this._referenceQuaternion.y,z:this._referenceQuaternion.z,w:this._referenceQuaternion.w});this._xrSessionManager.referenceSpace=this._xrSessionManager.referenceSpace.getOffsetReferenceSpace(r)}},t._ScaleReadOnly=C.One(),t}(cc),n_=function(){function e(e){var t=this;this._scene=e,this._nonVRCamera=null,this._attachedToElement=!1,this._spectatorCamera=null,this._originalSceneAutoClear=!0,this._supported=!1,this._spectatorMode=!1,this._lastTimestamp=0,this.onInitialXRPoseSetObservable=new u,this.onStateChangedObservable=new u,this.state=_l.NOT_IN_XR,this.sessionManager=new Il(e),this.camera=new t_("webxr",e,this.sessionManager),this.featuresManager=new Yo(this.sessionManager),e.onDisposeObservable.addOnce((function(){t.dispose()}))}return e.CreateAsync=function(t){var n=new e(t);return n.sessionManager.initializeAsync().then((function(){return n._supported=!0,n})).catch((function(e){throw n._setState(_l.NOT_IN_XR),n.dispose(),e}))},e.prototype.dispose=function(){var e;this.exitXRAsync(),this.camera.dispose(),this.onStateChangedObservable.clear(),this.onInitialXRPoseSetObservable.clear(),this.sessionManager.dispose(),null===(e=this._spectatorCamera)||void 0===e||e.dispose(),this._nonVRCamera&&(this._scene.activeCamera=this._nonVRCamera)},e.prototype.enterXRAsync=function(e,t,n,i){var r,o,a;return void 0===n&&(n=this.sessionManager.getWebXRRenderTarget()),void 0===i&&(i={}),X(this,void 0,void 0,(function(){var s,c,l,u=this;return Y(this,(function(h){switch(h.label){case 0:if(!this._supported)throw"WebXR not supported in this browser or environment";return this._setState(_l.ENTERING_XR),"viewer"!==t&&"local"!==t&&(i.optionalFeatures=i.optionalFeatures||[],i.optionalFeatures.push(t)),[4,this.featuresManager._extendXRSessionInitObject(i)];case 1:i=h.sent(),"immersive-ar"===e&&"unbounded"!==t&&J.Warn("We recommend using 'unbounded' reference space type when using 'immersive-ar' session mode"),h.label=2;case 2:return h.trys.push([2,6,,7]),[4,this.sessionManager.initializeSessionAsync(e,i)];case 3:return h.sent(),[4,this.sessionManager.setReferenceSpaceTypeAsync(t)];case 4:return h.sent(),[4,n.initializeXRLayerAsync(this.sessionManager.session)];case 5:return s=h.sent(),c={depthFar:this.camera.maxZ||1e4,depthNear:this.camera.minZ},this.featuresManager.getEnabledFeature(Xo.LAYERS)||(c.baseLayer=s),this.sessionManager.updateRenderState(c),this.sessionManager.runXRRenderLoop(),this._originalSceneAutoClear=this._scene.autoClear,this._nonVRCamera=this._scene.activeCamera,this._attachedToElement=!!(null===(o=null===(r=this._nonVRCamera)||void 0===r?void 0:r.inputs)||void 0===o?void 0:o.attachedToElement),null===(a=this._nonVRCamera)||void 0===a||a.detachControl(),this._scene.activeCamera=this.camera,"immersive-ar"!==e?this._nonXRToXRCamera():(this._scene.autoClear=!1,this.camera.compensateOnFirstFrame=!1,this.camera.position.set(0,0,0),this.camera.rotationQuaternion.set(0,0,0,1),this.onInitialXRPoseSetObservable.notifyObservers(this.camera)),this.sessionManager.onXRSessionEnded.addOnce((function(){u.state!==_l.EXITING_XR&&u._setState(_l.EXITING_XR),u.camera.rigCameras.forEach((function(e){e.outputRenderTarget=null})),u._scene.autoClear=u._originalSceneAutoClear,u._scene.activeCamera=u._nonVRCamera,u._attachedToElement&&u._nonVRCamera&&u._nonVRCamera.attachControl(!!u._nonVRCamera.inputs.noPreventDefault),"immersive-ar"!==e&&u.camera.compensateOnFirstFrame&&(u._nonVRCamera.setPosition?u._nonVRCamera.setPosition(u.camera.position):u._nonVRCamera.position.copyFrom(u.camera.position)),u._setState(_l.NOT_IN_XR)})),this.sessionManager.onXRFrameObservable.addOnce((function(){u._setState(_l.IN_XR)})),[2,this.sessionManager];case 6:throw l=h.sent(),J.Log(l),J.Log(l.message),this._setState(_l.NOT_IN_XR),l;case 7:return[2]}}))}))},e.prototype.exitXRAsync=function(){return this.state!==_l.IN_XR?Promise.resolve():(this._setState(_l.EXITING_XR),this.sessionManager.exitXRAsync())},e.prototype.enableSpectatorMode=function(e){this._spectatorMode||(this._spectatorMode=!0,this._switchSpectatorMode(e))},e.prototype.disableSpecatatorMode=function(){this._spectatorMode&&(this._spectatorMode=!1,this._switchSpectatorMode())},e.prototype._switchSpectatorMode=function(e){var t=this,n=1/((null==e?void 0:e.fps)?e.fps:1e3)*1e3,i=(null==e?void 0:e.preferredCameraIndex)?null==e?void 0:e.preferredCameraIndex:0,r=function(){t._spectatorCamera&&t.sessionManager.currentTimestamp-t._lastTimestamp>=n&&(t._lastTimestamp=t.sessionManager.currentTimestamp,t._spectatorCamera.position.copyFrom(t.camera.rigCameras[i].globalPosition),t._spectatorCamera.rotationQuaternion.copyFrom(t.camera.rigCameras[i].absoluteRotation))};if(this._spectatorMode){if(i>=this.camera.rigCameras.length)throw new Error("the preferred camera index is beyond the length of rig camera array.");var o=function(){t.state===_l.IN_XR?(t._spectatorCamera=new Sc("webxr-spectator",C.Zero(),t._scene),t._spectatorCamera.rotationQuaternion=new I,t._scene.activeCameras=[t.camera,t._spectatorCamera],t.sessionManager.onXRFrameObservable.add(r),t._scene.onAfterRenderCameraObservable.add((function(e){e===t.camera&&(t._scene.getEngine().framebufferDimensionsObject=null)}))):t.state===_l.EXITING_XR&&(t.sessionManager.onXRFrameObservable.removeCallback(r),t._scene.activeCameras=null)};this.onStateChangedObservable.add(o),o()}else this.sessionManager.onXRFrameObservable.removeCallback(r),this._scene.activeCameras=[this.camera]},e.prototype._nonXRToXRCamera=function(){this.camera.setTransformationFromNonVRCamera(this._nonVRCamera),this.onInitialXRPoseSetObservable.notifyObservers(this.camera)},e.prototype._setState=function(e){this.state!==e&&(this.state=e,this.onStateChangedObservable.notifyObservers(this.state))},e}(),i_=function(){function e(e,t,n,i){void 0===n&&(n=-1),void 0===i&&(i=[]),this.id=e,this.type=t,this._buttonIndex=n,this._axesIndices=i,this._axes={x:0,y:0},this._changes={},this._currentValue=0,this._hasChanges=!1,this._pressed=!1,this._touched=!1,this.onAxisValueChangedObservable=new u,this.onButtonStateChangedObservable=new u}return Object.defineProperty(e.prototype,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changes",{get:function(){return this._changes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasChanges",{get:function(){return this._hasChanges},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pressed",{get:function(){return this._pressed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return this._touched},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.onAxisValueChangedObservable.clear(),this.onButtonStateChangedObservable.clear()},e.prototype.isAxes=function(){return 0!==this._axesIndices.length},e.prototype.isButton=function(){return-1!==this._buttonIndex},e.prototype.update=function(e){var t=!1,n=!1;if(this._hasChanges=!1,this._changes={},this.isButton()){var i=e.buttons[this._buttonIndex];if(!i)return;this._currentValue!==i.value&&(this.changes.value={current:i.value,previous:this._currentValue},t=!0,this._currentValue=i.value),this._touched!==i.touched&&(this.changes.touched={current:i.touched,previous:this._touched},t=!0,this._touched=i.touched),this._pressed!==i.pressed&&(this.changes.pressed={current:i.pressed,previous:this._pressed},t=!0,this._pressed=i.pressed)}this.isAxes()&&(this._axes.x!==e.axes[this._axesIndices[0]]&&(this.changes.axes={current:{x:e.axes[this._axesIndices[0]],y:this._axes.y},previous:{x:this._axes.x,y:this._axes.y}},this._axes.x=e.axes[this._axesIndices[0]],n=!0),this._axes.y!==e.axes[this._axesIndices[1]]&&(this.changes.axes?this.changes.axes.current.y=e.axes[this._axesIndices[1]]:this.changes.axes={current:{x:this._axes.x,y:e.axes[this._axesIndices[1]]},previous:{x:this._axes.x,y:this._axes.y}},this._axes.y=e.axes[this._axesIndices[1]],n=!0)),t&&(this._hasChanges=!0,this.onButtonStateChangedObservable.notifyObservers(this)),n&&(this._hasChanges=!0,this.onAxisValueChangedObservable.notifyObservers(this._axes))},e.BUTTON_TYPE="button",e.SQUEEZE_TYPE="squeeze",e.THUMBSTICK_TYPE="thumbstick",e.TOUCHPAD_TYPE="touchpad",e.TRIGGER_TYPE="trigger",e}(),r_=function(){function e(e,t,n,i,r,o){void 0===r&&(r=!1);var a=this;this.scene=e,this.layout=t,this.gamepadObject=n,this.handedness=i,this._doNotLoadControllerMesh=r,this._controllerCache=o,this._initComponent=function(e){if(e){var t=a.layout.components[e],n=t.type,i=t.gamepadIndices.button,r=[];void 0!==t.gamepadIndices.xAxis&&void 0!==t.gamepadIndices.yAxis&&r.push(t.gamepadIndices.xAxis,t.gamepadIndices.yAxis),a.components[e]=new i_(e,n,i,r)}},this._modelReady=!1,this.components={},this.disableAnimation=!1,this.onModelLoadedObservable=new u,t.components&&Object.keys(t.components).forEach(this._initComponent)}return e.prototype.dispose=function(){var e=this;this.getComponentIds().forEach((function(t){return e.getComponent(t).dispose()})),this.rootMesh&&(this.rootMesh.getChildren(void 0,!0).forEach((function(e){e.setEnabled(!1)})),this.rootMesh.dispose(!!this._controllerCache,!this._controllerCache))},e.prototype.getAllComponentsOfType=function(e){var t=this;return this.getComponentIds().map((function(e){return t.components[e]})).filter((function(t){return t.type===e}))},e.prototype.getComponent=function(e){return this.components[e]},e.prototype.getComponentIds=function(){return Object.keys(this.components)},e.prototype.getComponentOfType=function(e){return this.getAllComponentsOfType(e)[0]||null},e.prototype.getMainComponent=function(){return this.getComponent(this.layout.selectComponentId)},e.prototype.loadModel=function(){return X(this,void 0,void 0,(function(){var e,t,n=this;return Y(this,(function(i){return e=!this._getModelLoadingConstraints(),t=this._getGenericFilenameAndPath(),e?J.Warn("Falling back to generic models"):t=this._getFilenameAndPath(),[2,new Promise((function(i,r){var o=function(t){e?n._getGenericParentMesh(t):n._setRootMesh(t),n._processLoadedModel(t),n._modelReady=!0,n.onModelLoadedObservable.notifyObservers(n),i(!0)};if(n._controllerCache){var a=n._controllerCache.filter((function(e){return e.filename===t.filename&&e.path===t.path}));if(a[0])return a[0].meshes.forEach((function(e){return e.setEnabled(!0)})),void o(a[0].meshes)}ra.ImportMesh("",t.path,t.filename,n.scene,(function(e){n._controllerCache&&n._controllerCache.push(j(j({},t),{meshes:e})),o(e)}),null,(function(e,i){J.Log(i),J.Warn("Failed to retrieve controller model of type ".concat(n.profileId," from the remote server: ").concat(t.path).concat(t.filename)),r(i)}))}))]}))}))},e.prototype.updateFromXRFrame=function(e){var t=this;this.getComponentIds().forEach((function(e){return t.getComponent(e).update(t.gamepadObject)})),this.updateModel(e)},Object.defineProperty(e.prototype,"handness",{get:function(){return this.handedness},enumerable:!1,configurable:!0}),e.prototype.pulse=function(e,t,n){return void 0===n&&(n=0),this.gamepadObject.hapticActuators&&this.gamepadObject.hapticActuators[n]?this.gamepadObject.hapticActuators[n].pulse(e,t):Promise.resolve(!1)},e.prototype._getChildByName=function(e,t){return e.getChildren((function(e){return e.name===t}),!1)[0]},e.prototype._getImmediateChildByName=function(e,t){return e.getChildren((function(e){return e.name==t}),!0)[0]},e.prototype._lerpTransform=function(e,t,n){if(e.minMesh&&e.maxMesh&&e.valueMesh&&e.minMesh.rotationQuaternion&&e.maxMesh.rotationQuaternion&&e.valueMesh.rotationQuaternion){var i=n?.5*t+.5:t;I.SlerpToRef(e.minMesh.rotationQuaternion,e.maxMesh.rotationQuaternion,i,e.valueMesh.rotationQuaternion),C.LerpToRef(e.minMesh.position,e.maxMesh.position,i,e.valueMesh.position)}},e.prototype.updateModel=function(e){this._modelReady&&this._updateModel(e)},e.prototype._getGenericFilenameAndPath=function(){return{filename:"generic.babylon",path:"https://controllers.babylonjs.com/generic/"}},e.prototype._getGenericParentMesh=function(e){var t=this;this.rootMesh=new no(this.profileId+" "+this.handedness,this.scene),e.forEach((function(e){e.parent||(e.isPickable=!1,e.setParent(t.rootMesh))})),this.rootMesh.rotationQuaternion=I.FromEulerAngles(0,Math.PI,0)},e}(),o_=function(e){function t(n,i,r){var o=e.call(this,n,a_[r],i,r)||this;return o.profileId=t.ProfileId,o}return H(t,e),t.prototype._getFilenameAndPath=function(){return{filename:"generic.babylon",path:"https://controllers.babylonjs.com/generic/"}},t.prototype._getModelLoadingConstraints=function(){return!0},t.prototype._processLoadedModel=function(e){},t.prototype._setRootMesh=function(e){var t=this;this.rootMesh=new no(this.profileId+" "+this.handedness,this.scene),e.forEach((function(e){e.isPickable=!1,e.parent||e.setParent(t.rootMesh)})),this.rootMesh.rotationQuaternion=I.FromEulerAngles(0,Math.PI,0)},t.prototype._updateModel=function(){},t.ProfileId="generic-trigger",t}(r_),a_={left:{selectComponentId:"xr-standard-trigger",components:{"xr-standard-trigger":{type:"trigger",gamepadIndices:{button:0},rootNodeName:"xr_standard_trigger",visualResponses:{}}},gamepadMapping:"xr-standard",rootNodeName:"generic-trigger-left",assetPath:"left.glb"},right:{selectComponentId:"xr-standard-trigger",components:{"xr-standard-trigger":{type:"trigger",gamepadIndices:{button:0},rootNodeName:"xr_standard_trigger",visualResponses:{}}},gamepadMapping:"xr-standard",rootNodeName:"generic-trigger-right",assetPath:"right.glb"},none:{selectComponentId:"xr-standard-trigger",components:{"xr-standard-trigger":{type:"trigger",gamepadIndices:{button:0},rootNodeName:"xr_standard_trigger",visualResponses:{}}},gamepadMapping:"xr-standard",rootNodeName:"generic-trigger-none",assetPath:"none.glb"}},s_=function(e){function t(t,n,i,r,o){var a=e.call(this,t,i.layouts[n.handedness||"none"],n.gamepad,n.handedness,void 0,o)||this;return a._repositoryUrl=r,a.controllerCache=o,a._buttonMeshMapping={},a._touchDots={},a.profileId=i.profileId,a}return H(t,e),t.prototype.dispose=function(){var t=this;e.prototype.dispose.call(this),this.controllerCache||Object.keys(this._touchDots).forEach((function(e){t._touchDots[e].dispose()}))},t.prototype._getFilenameAndPath=function(){return{filename:this.layout.assetPath,path:"".concat(this._repositoryUrl,"/profiles/").concat(this.profileId,"/")}},t.prototype._getModelLoadingConstraints=function(){var e=ra.IsPluginForExtensionAvailable(".glb");return e||J.Warn("glTF / glb loader was not registered, using generic controller instead"),e},t.prototype._processLoadedModel=function(e){var t=this;this.getComponentIds().forEach((function(e){var n=t.layout.components[e];t._buttonMeshMapping[e]={mainMesh:t._getChildByName(t.rootMesh,n.rootNodeName),states:{}},Object.keys(n.visualResponses).forEach((function(i){var r=n.visualResponses[i];if("transform"===r.valueNodeProperty)t._buttonMeshMapping[e].states[i]={valueMesh:t._getChildByName(t.rootMesh,r.valueNodeName),minMesh:t._getChildByName(t.rootMesh,r.minNodeName),maxMesh:t._getChildByName(t.rootMesh,r.maxNodeName)};else{var o=n.type===i_.TOUCHPAD_TYPE&&n.touchPointNodeName?n.touchPointNodeName:r.valueNodeName;if(t._buttonMeshMapping[e].states[i]={valueMesh:t._getChildByName(t.rootMesh,o)},n.type===i_.TOUCHPAD_TYPE&&!t._touchDots[i]){var a=yu(i+"dot",{diameter:.0015,segments:8},t.scene);a.material=new ml(i+"mat",t.scene),a.material.diffuseColor=B.Red(),a.parent=t._buttonMeshMapping[e].states[i].valueMesh||null,a.isVisible=!1,t._touchDots[i]=a}}}))}))},t.prototype._setRootMesh=function(e){var t;this.rootMesh=new no(this.profileId+"-"+this.handedness,this.scene),this.rootMesh.isPickable=!1;for(var n=0;ni/10&&(a.isVisible=!0),(s+=t._scene.getEngine().getDeltaTime())>=i)t._scene.simulatePointerDown(n.pick,l),c=!0,t._options.disablePointerUpOnTouchOut&&t._scene.simulatePointerUp(n.pick,l),a.isVisible=!1;else{var e=1-s/i;a.scaling.set(e,e,e)}else c=!1,s=0;t._scene.simulatePointerMove(n.pick,l),o=n.pick}})),void 0!==this._options.renderingGroupId&&(a.renderingGroupId=this._options.renderingGroupId),e&&e.onDisposeObservable.addOnce((function(){n.pick&&!t._options.disablePointerUpOnTouchOut&&c&&(t._scene.simulatePointerUp(n.pick,l),n.finalPointerUpTriggered=!0),a.dispose()}))},t.prototype._attachScreenRayMode=function(e){var t=this,n=this._controllers[e.uniqueId],i=!1,r={pointerId:n.id,pointerType:"xr"};n.onFrameObserver=this._xrSessionManager.onXRFrameObservable.add((function(){t._augmentPointerInit(r,n.id,n.screenCoordinates),!n.pick||t._options.disablePointerUpOnTouchOut&&i||(i?t._scene.simulatePointerMove(n.pick,r):(t._scene.simulatePointerDown(n.pick,r),n.pointerDownTriggered=!0,i=!0,t._options.disablePointerUpOnTouchOut&&t._scene.simulatePointerUp(n.pick,r)))})),e.onDisposeObservable.addOnce((function(){t._augmentPointerInit(r,n.id,n.screenCoordinates),t._xrSessionManager.runInXRFrame((function(){n.pick&&!n.finalPointerUpTriggered&&i&&!t._options.disablePointerUpOnTouchOut&&(t._scene.simulatePointerUp(n.pick,r),n.finalPointerUpTriggered=!0)}))}))},t.prototype._attachTrackedPointerRayMode=function(e){var t=this,n=this._controllers[e.uniqueId];if(this._options.forceGazeMode)return this._attachGazeMode(e);var i={pointerId:n.id,pointerType:"xr"};if(n.onFrameObserver=this._xrSessionManager.onXRFrameObservable.add((function(){n.laserPointer.material.disableLighting=t.disablePointerLighting,n.selectionMesh.material.disableLighting=t.disableSelectionMeshLighting,n.pick&&(t._augmentPointerInit(i,n.id,n.screenCoordinates),t._scene.simulatePointerMove(n.pick,i))})),e.inputSource.gamepad){var r=function(r){t._options.overrideButtonId&&(n.selectionComponent=r.getComponent(t._options.overrideButtonId)),n.selectionComponent||(n.selectionComponent=r.getMainComponent()),n.onButtonChangedObserver=n.selectionComponent.onButtonStateChangedObservable.add((function(r){if(r.changes.pressed){var o=r.changes.pressed.current;n.pick?(t._options.enablePointerSelectionOnAllControllers||e.uniqueId===t._attachedController)&&(t._augmentPointerInit(i,n.id,n.screenCoordinates),o?(t._scene.simulatePointerDown(n.pick,i),n.pointerDownTriggered=!0,n.selectionMesh.material.emissiveColor=t.selectionMeshPickedColor,n.laserPointer.material.emissiveColor=t.laserPointerPickedColor):(t._scene.simulatePointerUp(n.pick,i),n.selectionMesh.material.emissiveColor=t.selectionMeshDefaultColor,n.laserPointer.material.emissiveColor=t.laserPointerDefaultColor)):!o||t._options.enablePointerSelectionOnAllControllers||t._options.disableSwitchOnClick||(t._attachedController=e.uniqueId)}}))};e.motionController?r(e.motionController):e.onMotionControllerInitObservable.add(r)}else{var o=function(e){t._augmentPointerInit(i,n.id,n.screenCoordinates),n.xrController&&e.inputSource===n.xrController.inputSource&&n.pick&&(t._scene.simulatePointerDown(n.pick,i),n.pointerDownTriggered=!0,n.selectionMesh.material.emissiveColor=t.selectionMeshPickedColor,n.laserPointer.material.emissiveColor=t.laserPointerPickedColor)},a=function(e){t._augmentPointerInit(i,n.id,n.screenCoordinates),n.xrController&&e.inputSource===n.xrController.inputSource&&n.pick&&(t._scene.simulatePointerUp(n.pick,i),n.selectionMesh.material.emissiveColor=t.selectionMeshDefaultColor,n.laserPointer.material.emissiveColor=t.laserPointerDefaultColor)};n.eventListeners={selectend:a,selectstart:o},this._xrSessionManager.session.addEventListener("selectstart",o),this._xrSessionManager.session.addEventListener("selectend",a)}},t.prototype._convertNormalToDirectionOfRay=function(e,t){return e&&Math.acos(C.Dot(e,t.direction))i},t.prototype._updatePointerDistance=function(e,t){void 0===t&&(t=100),e.scaling.y=t,this._scene.useRightHandedSystem&&(t*=-1),e.position.z=t/2+.05},t.prototype._augmentPointerInit=function(e,t,n){e.pointerId=t,e.pointerType="xr",n&&(e.screenX=n.x,e.screenY=n.y)},Object.defineProperty(t.prototype,"lasterPointerDefaultColor",{get:function(){return this.laserPointerDefaultColor},enumerable:!1,configurable:!0}),t._IdCounter=200,t.Name=Xo.POINTER_SELECTION,t.Version=1,t}(qo);Yo.AddWebXRFeature(m_.Name,(function(e,t){return function(){return new m_(e,t)}}),m_.Version,!0),xr.prototype._projectOnTrianglesToRef=function(e,t,n,i,r,o){for(var a=w.Vector3[0],s=w.Vector3[1],c=1/0,l=this.indexStart;le.currentAnimationState)switch(e.currentAnimationState){case u_.DEHYDRATED:if(e.hydrateCollisionMeshFunction(!0),t===u_.HOVER)break;case u_.HOVER:if(e.touchCollisionMeshFunction(!0),t===u_.TOUCH)break}else switch(e.currentAnimationState){case u_.TOUCH:if(e.touchCollisionMeshFunction(!1),t===u_.HOVER)break;case u_.HOVER:if(e.hydrateCollisionMeshFunction(!1),t===u_.DEHYDRATED)break}e.currentAnimationState=t}},t.prototype._processTouchPoint=function(e,t,n){var i,r=this._controllers[e];r.grabRay.origin.copyFrom(t),n.toEulerAnglesToRef(w.Vector3[0]),r.grabRay.direction.copyFrom(w.Vector3[0]),this._options.nearInteractionControllerMode!==h_.CENTERED_IN_FRONT||(null===(i=r.xrController)||void 0===i?void 0:i.inputSource.hand)||(r.xrController.getWorldPointerRayToRef(this._tmpRay),r.grabRay.origin.addInPlace(this._tmpRay.direction.scale(.05))),r.grabRay.length=this._nearGrabLengthScale*this._hoverRadius,r.touchCollisionMesh.position.copyFrom(r.grabRay.origin)},t.prototype._onXRFrame=function(e){var t=this;Object.keys(this._controllers).forEach((function(n){var i,r=t._controllers[n],o=null===(i=r.xrController)||void 0===i?void 0:i.inputSource.hand;if((t._options.enableNearInteractionOnAllControllers||n===t._attachedController)&&r.xrController&&(o||t._options.nearInteractionControllerMode&&r.xrController.inputSource.gamepad)){if(r.hoverInteraction=!1,r.nearInteraction=!1,r.xrController){if(o){var a=o.get("index-finger-tip");if(a){var s=e.getJointPose(a,t._xrSessionManager.referenceSpace);if(s&&s.transform){var c=t._scene.useRightHandedSystem?1:-1;w.Vector3[0].set(s.transform.position.x,s.transform.position.y,s.transform.position.z*c),w.Quaternion[0].set(s.transform.orientation.x,s.transform.orientation.y,s.transform.orientation.z*c,s.transform.orientation.w*c),t._processTouchPoint(n,w.Vector3[0],w.Quaternion[0])}}}else if(r.xrController.inputSource.gamepad&&t._options.nearInteractionControllerMode!==h_.DISABLED){var l=r.xrController.pointer;r.xrController.grip&&t._options.nearInteractionControllerMode===h_.CENTERED_ON_CONTROLLER&&(l=r.xrController.grip),t._processTouchPoint(n,l.position,l.rotationQuaternion)}var u=function(e,t){return t&&t.hit?e&&e.hit?t.distances&&(a=0,u.copyFrom(t.center)),-1!==a&&a=e.timeout&&(e.contextObservable.remove(r),e.onEnded&&e.onEnded(a))}),e.observableParameters.mask,e.observableParameters.insertFirst,e.observableParameters.scope);return r}!function(e){e[e.INIT=0]="INIT",e[e.STARTED=1]="STARTED",e[e.ENDED=2]="ENDED"}(g_||(g_={}));var E_=function(){function e(e){var t,n,i=this;this.onEachCountObservable=new u,this.onTimerAbortedObservable=new u,this.onTimerEndedObservable=new u,this.onStateChangedObservable=new u,this._observer=null,this._breakOnNextTick=!1,this._tick=function(e){var t=Date.now();i._timer=t-i._startTime;var n={startTime:i._startTime,currentTime:t,deltaTime:i._timer,completeRate:i._timer/i._timeToEnd,payload:e},r=i._breakOnNextTick||i._breakCondition(n);r||i._timer>=i._timeToEnd?i._stop(n,r):i.onEachCountObservable.notifyObservers(n)},this._setState(g_.INIT),this._contextObservable=e.contextObservable,this._observableParameters=null!==(t=e.observableParameters)&&void 0!==t?t:{},this._breakCondition=null!==(n=e.breakCondition)&&void 0!==n?n:function(){return!1},this._timeToEnd=e.timeout,e.onEnded&&this.onTimerEndedObservable.add(e.onEnded),e.onTick&&this.onEachCountObservable.add(e.onTick),e.onAborted&&this.onTimerAbortedObservable.add(e.onAborted)}return Object.defineProperty(e.prototype,"breakCondition",{set:function(e){this._breakCondition=e},enumerable:!1,configurable:!0}),e.prototype.clearObservables=function(){this.onEachCountObservable.clear(),this.onTimerAbortedObservable.clear(),this.onTimerEndedObservable.clear(),this.onStateChangedObservable.clear()},e.prototype.start=function(e){if(void 0===e&&(e=this._timeToEnd),this._state===g_.STARTED)throw new Error("Timer already started. Please stop it before starting again");this._timeToEnd=e,this._startTime=Date.now(),this._timer=0,this._observer=this._contextObservable.add(this._tick,this._observableParameters.mask,this._observableParameters.insertFirst,this._observableParameters.scope),this._setState(g_.STARTED)},e.prototype.stop=function(){this._state===g_.STARTED&&(this._breakOnNextTick=!0)},e.prototype.dispose=function(){this._observer&&this._contextObservable.remove(this._observer),this.clearObservables()},e.prototype._setState=function(e){this._state=e,this.onStateChangedObservable.notifyObservers(this._state)},e.prototype._stop=function(e,t){void 0===t&&(t=!1),this._contextObservable.remove(this._observer),this._setState(g_.ENDED),t?this.onTimerAbortedObservable.notifyObservers(e):this.onTimerEndedObservable.notifyObservers(e)},e}(),A_=function(e){function t(t,n){var i=e.call(this,t)||this;return i._options=n,i._controllers={},i._snappedToPoint=!1,i._cachedColor4White=new U(1,1,1,1),i._tmpRay=new No(new C,new C),i._tmpVector=new C,i._tmpQuaternion=new I,i.skipNextTeleportation=!1,i.backwardsMovementEnabled=!0,i.backwardsTeleportationDistance=.7,i.parabolicCheckRadius=5,i.parabolicRayEnabled=!0,i.straightRayEnabled=!0,i.rotationAngle=Math.PI/8,i.onTargetMeshPositionUpdatedObservable=new u,i.teleportationEnabled=!0,i._rotationEnabled=!0,i._attachController=function(e){if(!(i._controllers[e.uniqueId]||i._options.forceHandedness&&e.inputSource.handedness!==i._options.forceHandedness)){i._controllers[e.uniqueId]={xrController:e,teleportationState:{forward:!1,backwards:!1,rotating:!1,currentRotation:0,baseRotation:0,blocked:!1}};var t=i._controllers[e.uniqueId];if("tracked-pointer"===t.xrController.inputSource.targetRayMode&&t.xrController.inputSource.gamepad){var n=function(){if(e.motionController){var n=e.motionController.getComponentOfType(i_.THUMBSTICK_TYPE)||e.motionController.getComponentOfType(i_.TOUCHPAD_TYPE);if(!n||i._options.useMainComponentOnly){var r=e.motionController.getMainComponent();if(!r)return;t.teleportationComponent=r,t.onButtonChangedObserver=r.onButtonStateChangedObservable.add((function(){i.teleportationEnabled&&r.changes.pressed&&(r.changes.pressed.current?(t.teleportationState.forward=!0,i._currentTeleportationControllerId=t.xrController.uniqueId,t.teleportationState.baseRotation=i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y,t.teleportationState.currentRotation=0,T_({timeout:i._options.timeToTeleport||3e3,contextObservable:i._xrSessionManager.onXRFrameObservable,breakCondition:function(){return!r.pressed},onEnded:function(){i._currentTeleportationControllerId===t.xrController.uniqueId&&t.teleportationState.forward&&i._teleportForward(e.uniqueId)}})):(t.teleportationState.forward=!1,i._currentTeleportationControllerId=""))}))}else t.teleportationComponent=n,t.onAxisChangedObserver=n.onAxisValueChangedObservable.add((function(n){if(n.y<=.7&&t.teleportationState.backwards&&(t.teleportationState.backwards=!1),n.y>.7&&!t.teleportationState.forward&&i.backwardsMovementEnabled&&!i.snapPointsOnly&&!t.teleportationState.backwards){t.teleportationState.backwards=!0,i._tmpQuaternion.copyFrom(i._options.xrInput.xrCamera.rotationQuaternion),i._tmpQuaternion.toEulerAnglesToRef(i._tmpVector),i._tmpVector.x=0,i._tmpVector.z=0,I.FromEulerVectorToRef(i._tmpVector,i._tmpQuaternion),i._tmpVector.set(0,0,i.backwardsTeleportationDistance*(i._xrSessionManager.scene.useRightHandedSystem?1:-1)),i._tmpVector.rotateByQuaternionToRef(i._tmpQuaternion,i._tmpVector),i._tmpVector.addInPlace(i._options.xrInput.xrCamera.position),i._tmpRay.origin.copyFrom(i._tmpVector),i._tmpRay.length=i._options.xrInput.xrCamera.realWorldHeight+.1,i._tmpRay.direction.set(0,-1,0);var r=i._xrSessionManager.scene.pickWithRay(i._tmpRay,(function(e){return-1!==i._floorMeshes.indexOf(e)}));r&&r.pickedPoint&&(i._options.xrInput.xrCamera.position.x=r.pickedPoint.x,i._options.xrInput.xrCamera.position.z=r.pickedPoint.z)}if(n.y<-.7&&!i._currentTeleportationControllerId&&!t.teleportationState.rotating&&i.teleportationEnabled&&(t.teleportationState.forward=!0,i._currentTeleportationControllerId=t.xrController.uniqueId,t.teleportationState.baseRotation=i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y),n.x){if(t.teleportationState.forward)i._currentTeleportationControllerId===t.xrController.uniqueId&&(i.rotationEnabled?setTimeout((function(){t.teleportationState.currentRotation=Math.atan2(n.x,n.y*(i._xrSessionManager.scene.useRightHandedSystem?1:-1))})):t.teleportationState.currentRotation=0);else if(!t.teleportationState.rotating&&Math.abs(n.x)>.7){t.teleportationState.rotating=!0;var o=i.rotationAngle*(n.x>0?1:-1)*(i._xrSessionManager.scene.useRightHandedSystem?-1:1);I.FromEulerAngles(0,o,0).multiplyToRef(i._options.xrInput.xrCamera.rotationQuaternion,i._options.xrInput.xrCamera.rotationQuaternion)}}else t.teleportationState.rotating=!1;0===n.x&&0===n.y&&(t.teleportationState.blocked&&(t.teleportationState.blocked=!1,i._setTargetMeshVisibility(!1)),t.teleportationState.forward&&i._teleportForward(e.uniqueId))}))}};e.motionController?n():e.onMotionControllerInitObservable.addOnce((function(){n()}))}else i._xrSessionManager.scene.onPointerObservable.add((function(n){n.type===ti.POINTERDOWN?(t.teleportationState.forward=!0,i._currentTeleportationControllerId=t.xrController.uniqueId,t.teleportationState.baseRotation=i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y,t.teleportationState.currentRotation=0,T_({timeout:i._options.timeToTeleport||3e3,contextObservable:i._xrSessionManager.onXRFrameObservable,onEnded:function(){i._currentTeleportationControllerId===t.xrController.uniqueId&&t.teleportationState.forward&&i._teleportForward(e.uniqueId)}})):n.type===ti.POINTERUP&&(t.teleportationState.forward=!1,i._currentTeleportationControllerId="")}))}},i._options.teleportationTargetMesh||i._createDefaultTargetMesh(),i._floorMeshes=i._options.floorMeshes||[],i._snapToPositions=i._options.snapPositions||[],i._blockedRayColor=i._options.blockedRayColor||new U(1,0,0,.75),i._setTargetMeshVisibility(!1),i}return H(t,e),Object.defineProperty(t.prototype,"rotationEnabled",{get:function(){return this._rotationEnabled},set:function(e){if(this._rotationEnabled=e,this._options.teleportationTargetMesh){var t=this._options.teleportationTargetMesh.getChildMeshes(!1,(function(e){return"rotationCone"===e.name}));t[0]&&t[0].setEnabled(e)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"teleportationTargetMesh",{get:function(){return this._options.teleportationTargetMesh||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapPointsOnly",{get:function(){return!!this._options.snapPointsOnly},set:function(e){this._options.snapPointsOnly=e},enumerable:!1,configurable:!0}),t.prototype.addFloorMesh=function(e){this._floorMeshes.push(e)},t.prototype.addBlockerMesh=function(e){this._options.pickBlockerMeshes=this._options.pickBlockerMeshes||[],this._options.pickBlockerMeshes.push(e)},t.prototype.addSnapPoint=function(e){this._snapToPositions.push(e)},t.prototype.attach=function(){var t=this;return!!e.prototype.attach.call(this)&&(this._currentTeleportationControllerId="",this._options.xrInput.controllers.forEach(this._attachController),this._addNewAttachObserver(this._options.xrInput.onControllerAddedObservable,this._attachController),this._addNewAttachObserver(this._options.xrInput.onControllerRemovedObservable,(function(e){t._detachController(e.uniqueId)})),!0)},t.prototype.detach=function(){var t=this;return!!e.prototype.detach.call(this)&&(Object.keys(this._controllers).forEach((function(e){t._detachController(e)})),this._setTargetMeshVisibility(!1),this._currentTeleportationControllerId="",this._controllers={},!0)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._options.teleportationTargetMesh&&this._options.teleportationTargetMesh.dispose(!1,!0)},t.prototype.removeFloorMesh=function(e){var t=this._floorMeshes.indexOf(e);-1!==t&&this._floorMeshes.splice(t,1)},t.prototype.removeBlockerMesh=function(e){this._options.pickBlockerMeshes=this._options.pickBlockerMeshes||[];var t=this._options.pickBlockerMeshes.indexOf(e);-1!==t&&this._options.pickBlockerMeshes.splice(t,1)},t.prototype.removeFloorMeshByName=function(e){var t=this._xrSessionManager.scene.getMeshByName(e);t&&this.removeFloorMesh(t)},t.prototype.removeSnapPoint=function(e){var t=this._snapToPositions.indexOf(e);if(-1===t)for(var n=0;n=d.video.HAVE_CURRENT_DATA;return!d._settings.poster||d._settings.autoPlay&&p?p&&d._createInternalTexture():(d._texture=d._getEngine().createTexture(d._settings.poster,!1,!d.invertY,i),d._displayingPosterTexture=!0),d}return H(t,e),Object.defineProperty(t.prototype,"onUserActionRequestedObservable",{get:function(){return this._onUserActionRequestedObservable||(this._onUserActionRequestedObservable=new u),this._onUserActionRequestedObservable},enumerable:!1,configurable:!0}),t.prototype._processError=function(e){this._errorFound=!0,this._onError?this._onError(null==e?void 0:e.message):J.Error(null==e?void 0:e.message)},t.prototype._handlePlay=function(){var e=this;this._errorFound=!1,this.video.play().catch((function(t){if("NotAllowedError"===(null==t?void 0:t.name)){if(e._onUserActionRequestedObservable&&e._onUserActionRequestedObservable.hasObservers())return void e._onUserActionRequestedObservable.notifyObservers(e);if(!e.video.muted)return J.Warn("Unable to autoplay a video with sound. Trying again with muted turned true"),e.video.muted=!0,e._errorFound=!1,void e.video.play().catch((function(t){e._processError(t)}))}e._processError(t)}))},t.prototype.getClassName=function(){return"VideoTexture"},t.prototype._getName=function(e){return e instanceof HTMLVideoElement?e.currentSrc:"object"==typeof e?e.toString():e},t.prototype._getVideo=function(e){if(e.isNative)return e;if(e instanceof HTMLVideoElement)return Pn.SetCorsBehavior(e.currentSrc,e),e;var t=document.createElement("video");return"string"==typeof e?(Pn.SetCorsBehavior(e,t),t.src=e):(Pn.SetCorsBehavior(e[0],t),e.forEach((function(e){var n=document.createElement("source");n.src=e,t.appendChild(n)}))),this.onDisposeObservable.addOnce((function(){P_(t)})),t},t.prototype._rebuild=function(){this.update()},t.prototype.update=function(){this.autoUpdateTexture&&this.updateTexture(!0)},t.prototype.updateTexture=function(e){e&&(this.video.paused&&this._stillImageCaptured||(this._stillImageCaptured=!0,this._updateInternalTexture()))},Object.defineProperty(t.prototype,"externalTexture",{get:function(){return this._externalTexture},enumerable:!1,configurable:!0}),t.prototype.updateURL=function(e){this.video.src=e,this._currentSrc=e},t.prototype.clone=function(){return new t(this.name,this._currentSrc,this.getScene(),this._generateMipMaps,this.invertY,this.samplingMode,this._settings)},t.prototype.dispose=function(){var t;e.prototype.dispose.call(this),this._currentSrc=null,this._onUserActionRequestedObservable&&(this._onUserActionRequestedObservable.clear(),this._onUserActionRequestedObservable=null),this.video.removeEventListener(this._createInternalTextureOnEvent,this._createInternalTexture),this._settings.independentVideoSource||(this.video.removeEventListener("paused",this._updateInternalTexture),this.video.removeEventListener("seeked",this._updateInternalTexture),this.video.removeEventListener("emptied",this._reset),this.video.removeEventListener("resize",this._resizeInternalTexture),this.video.pause()),null===(t=this._externalTexture)||void 0===t||t.dispose()},t.CreateFromStreamAsync=function(e,n,i,r){void 0===r&&(r=!0);var o=e.getEngine().createVideoElement(i);return e.getEngine()._badOS&&(document.body.appendChild(o),o.style.transform="scale(0.0001, 0.0001)",o.style.opacity="0",o.style.position="fixed",o.style.bottom="0px",o.style.right="0px"),o.setAttribute("autoplay",""),o.setAttribute("muted","true"),o.setAttribute("playsinline",""),o.muted=!0,o.isNative||(void 0!==o.mozSrcObject?o.mozSrcObject=n:"object"==typeof o.srcObject?o.srcObject=n:o.src=window.URL&&window.URL.createObjectURL(n)),new Promise((function(n){var i=function(){var s=new t("video",o,e,!0,r,void 0,void 0,void 0,a.TEXTUREFORMAT_RGB);e.getEngine()._badOS&&s.onDisposeObservable.addOnce((function(){o.remove()})),s.onDisposeObservable.addOnce((function(){P_(o)})),n(s),o.removeEventListener("playing",i)};o.addEventListener("playing",i),o.play()}))},t.CreateFromWebCamAsync=function(e,t,n,i){return void 0===n&&(n=!1),void 0===i&&(i=!0),X(this,void 0,void 0,(function(){var r,o;return Y(this,(function(a){switch(a.label){case 0:return navigator.mediaDevices?[4,navigator.mediaDevices.getUserMedia({video:t,audio:n})]:[3,3];case 1:return r=a.sent(),[4,this.CreateFromStreamAsync(e,r,t,i)];case 2:return(o=a.sent()).onDisposeObservable.addOnce((function(){r.getTracks().forEach((function(e){e.stop()}))})),[2,o];case 3:return[2,Promise.reject("No support for userMedia on this device")]}}))}))},t.CreateFromWebCam=function(e,t,n,i,r){void 0===i&&(i=!1),void 0===r&&(r=!0),this.CreateFromWebCamAsync(e,n,i,r).then((function(e){t&&t(e)})).catch((function(e){J.Error(e.name)}))},W([Se("settings")],t.prototype,"_settings",void 0),W([Se("src")],t.prototype,"_currentSrc",void 0),W([Se()],t.prototype,"isVideo",void 0),t}(Eo);Eo._CreateVideoTexture=function(e,t,n,i,r,o,s,c,l){return void 0===i&&(i=!1),void 0===r&&(r=!1),void 0===o&&(o=Eo.TRILINEAR_SAMPLINGMODE),void 0===s&&(s={}),void 0===l&&(l=a.TEXTUREFORMAT_RGBA),new I_(e,t,n,i,r,o,s,c,l)},b("BABYLON.VideoTexture",I_);var R_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),Object.defineProperty(t.prototype,"videoTexture",{get:function(){return this._texture},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoMode",{get:function(){return this.textureMode},set:function(e){this.textureMode=e},enumerable:!1,configurable:!0}),t.prototype._initTexture=function(e,t,n){var i=this,r={loop:n.loop,autoPlay:n.autoPlay,autoUpdateTexture:!0,poster:n.poster},o=new I_((this.name||"videoDome")+"_texture",e,t,n.generateMipMaps,this._useDirectMapping,Eo.TRILINEAR_SAMPLINGMODE,r);return n.clickToPlay&&(this._pointerObserver=t.onPointerObservable.add((function(e){var t;(null===(t=e.pickInfo)||void 0===t?void 0:t.pickedMesh)===i.mesh&&i._texture.video.play()}),ti.POINTERDOWN)),this._textureObserver=o.onLoadObservable.add((function(){i.onLoadObservable.notifyObservers()})),o},t.prototype.dispose=function(t,n){void 0===n&&(n=!1),this._texture.onLoadObservable.remove(this._textureObserver),this._scene.onPointerObservable.remove(this._pointerObserver),e.prototype.dispose.call(this,t,n)},t.MODE_MONOSCOPIC=pm.MODE_MONOSCOPIC,t.MODE_TOPBOTTOM=pm.MODE_TOPBOTTOM,t.MODE_SIDEBYSIDE=pm.MODE_SIDEBYSIDE,t}(pm),O_=function(){function e(e){this.engine=e,this._captureGPUFrameTime=!1,this._captureShaderCompilationTime=!1,this._shaderCompilationTime=new vi,this._onBeginFrameObserver=null,this._onEndFrameObserver=null,this._onBeforeShaderCompilationObserver=null,this._onAfterShaderCompilationObserver=null}return Object.defineProperty(e.prototype,"gpuFrameTimeCounter",{get:function(){return this.engine.getGPUFrameTimeCounter()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureGPUFrameTime",{get:function(){return this._captureGPUFrameTime},set:function(e){e!==this._captureGPUFrameTime&&(this._captureGPUFrameTime=e,this.engine.captureGPUFrameTime(e))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shaderCompilationTimeCounter",{get:function(){return this._shaderCompilationTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureShaderCompilationTime",{get:function(){return this._captureShaderCompilationTime},set:function(e){var t=this;e!==this._captureShaderCompilationTime&&(this._captureShaderCompilationTime=e,e?(this._onBeforeShaderCompilationObserver=this.engine.onBeforeShaderCompilationObservable.add((function(){t._shaderCompilationTime.fetchNewFrame(),t._shaderCompilationTime.beginMonitoring()})),this._onAfterShaderCompilationObserver=this.engine.onAfterShaderCompilationObservable.add((function(){t._shaderCompilationTime.endMonitoring()}))):(this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null))},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.engine.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null,this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null,this.engine=null},e}(),w_=function(){function e(e){var t=this;this.scene=e,this._captureActiveMeshesEvaluationTime=!1,this._activeMeshesEvaluationTime=new vi,this._captureRenderTargetsRenderTime=!1,this._renderTargetsRenderTime=new vi,this._captureFrameTime=!1,this._frameTime=new vi,this._captureRenderTime=!1,this._renderTime=new vi,this._captureInterFrameTime=!1,this._interFrameTime=new vi,this._captureParticlesRenderTime=!1,this._particlesRenderTime=new vi,this._captureSpritesRenderTime=!1,this._spritesRenderTime=new vi,this._capturePhysicsTime=!1,this._physicsTime=new vi,this._captureAnimationsTime=!1,this._animationsTime=new vi,this._captureCameraRenderTime=!1,this._cameraRenderTime=new vi,this._onBeforeActiveMeshesEvaluationObserver=null,this._onAfterActiveMeshesEvaluationObserver=null,this._onBeforeRenderTargetsRenderObserver=null,this._onAfterRenderTargetsRenderObserver=null,this._onAfterRenderObserver=null,this._onBeforeDrawPhaseObserver=null,this._onAfterDrawPhaseObserver=null,this._onBeforeAnimationsObserver=null,this._onBeforeParticlesRenderingObserver=null,this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver=null,this._onAfterSpritesRenderingObserver=null,this._onBeforePhysicsObserver=null,this._onAfterPhysicsObserver=null,this._onAfterAnimationsObserver=null,this._onBeforeCameraRenderObserver=null,this._onAfterCameraRenderObserver=null,this._onBeforeAnimationsObserver=e.onBeforeAnimationsObservable.add((function(){t._captureActiveMeshesEvaluationTime&&t._activeMeshesEvaluationTime.fetchNewFrame(),t._captureRenderTargetsRenderTime&&t._renderTargetsRenderTime.fetchNewFrame(),t._captureFrameTime&&(Pn.StartPerformanceCounter("Scene rendering"),t._frameTime.beginMonitoring()),t._captureInterFrameTime&&t._interFrameTime.endMonitoring(),t._captureParticlesRenderTime&&t._particlesRenderTime.fetchNewFrame(),t._captureSpritesRenderTime&&t._spritesRenderTime.fetchNewFrame(),t._captureAnimationsTime&&t._animationsTime.beginMonitoring(),t._captureRenderTime&&t._renderTime.fetchNewFrame(),t._captureCameraRenderTime&&t._cameraRenderTime.fetchNewFrame(),t.scene.getEngine()._drawCalls.fetchNewFrame()})),this._onAfterRenderObserver=e.onAfterRenderObservable.add((function(){t._captureFrameTime&&(Pn.EndPerformanceCounter("Scene rendering"),t._frameTime.endMonitoring()),t._captureRenderTime&&t._renderTime.endMonitoring(!1),t._captureInterFrameTime&&t._interFrameTime.beginMonitoring(),t._captureActiveMeshesEvaluationTime&&t._activeMeshesEvaluationTime.endFrame(),t._captureRenderTargetsRenderTime&&t._renderTargetsRenderTime.endFrame(),t._captureParticlesRenderTime&&t._particlesRenderTime.endFrame(),t._captureSpritesRenderTime&&t._spritesRenderTime.endFrame(),t._captureRenderTime&&t._renderTime.endFrame(),t._captureCameraRenderTime&&t._cameraRenderTime.endFrame()}))}return Object.defineProperty(e.prototype,"activeMeshesEvaluationTimeCounter",{get:function(){return this._activeMeshesEvaluationTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureActiveMeshesEvaluationTime",{get:function(){return this._captureActiveMeshesEvaluationTime},set:function(e){var t=this;e!==this._captureActiveMeshesEvaluationTime&&(this._captureActiveMeshesEvaluationTime=e,e?(this._onBeforeActiveMeshesEvaluationObserver=this.scene.onBeforeActiveMeshesEvaluationObservable.add((function(){Pn.StartPerformanceCounter("Active meshes evaluation"),t._activeMeshesEvaluationTime.beginMonitoring()})),this._onAfterActiveMeshesEvaluationObserver=this.scene.onAfterActiveMeshesEvaluationObservable.add((function(){Pn.EndPerformanceCounter("Active meshes evaluation"),t._activeMeshesEvaluationTime.endMonitoring(!1)}))):(this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderTargetsRenderTimeCounter",{get:function(){return this._renderTargetsRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureRenderTargetsRenderTime",{get:function(){return this._captureRenderTargetsRenderTime},set:function(e){var t=this;e!==this._captureRenderTargetsRenderTime&&(this._captureRenderTargetsRenderTime=e,e?(this._onBeforeRenderTargetsRenderObserver=this.scene.onBeforeRenderTargetsRenderObservable.add((function(){Pn.StartPerformanceCounter("Render targets rendering"),t._renderTargetsRenderTime.beginMonitoring()})),this._onAfterRenderTargetsRenderObserver=this.scene.onAfterRenderTargetsRenderObservable.add((function(){Pn.EndPerformanceCounter("Render targets rendering"),t._renderTargetsRenderTime.endMonitoring(!1)}))):(this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"particlesRenderTimeCounter",{get:function(){return this._particlesRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureParticlesRenderTime",{get:function(){return this._captureParticlesRenderTime},set:function(e){var t=this;e!==this._captureParticlesRenderTime&&(this._captureParticlesRenderTime=e,e?(this._onBeforeParticlesRenderingObserver=this.scene.onBeforeParticlesRenderingObservable.add((function(){Pn.StartPerformanceCounter("Particles"),t._particlesRenderTime.beginMonitoring()})),this._onAfterParticlesRenderingObserver=this.scene.onAfterParticlesRenderingObservable.add((function(){Pn.EndPerformanceCounter("Particles"),t._particlesRenderTime.endMonitoring(!1)}))):(this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spritesRenderTimeCounter",{get:function(){return this._spritesRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureSpritesRenderTime",{get:function(){return this._captureSpritesRenderTime},set:function(e){var t=this;e!==this._captureSpritesRenderTime&&(this._captureSpritesRenderTime=e,this.scene.spriteManagers&&(e?(this._onBeforeSpritesRenderingObserver=this.scene.onBeforeSpritesRenderingObservable.add((function(){Pn.StartPerformanceCounter("Sprites"),t._spritesRenderTime.beginMonitoring()})),this._onAfterSpritesRenderingObserver=this.scene.onAfterSpritesRenderingObservable.add((function(){Pn.EndPerformanceCounter("Sprites"),t._spritesRenderTime.endMonitoring(!1)}))):(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null,this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"physicsTimeCounter",{get:function(){return this._physicsTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"capturePhysicsTime",{get:function(){return this._capturePhysicsTime},set:function(e){var t=this;e!==this._capturePhysicsTime&&this.scene.onBeforePhysicsObservable&&(this._capturePhysicsTime=e,e?(this._onBeforePhysicsObserver=this.scene.onBeforePhysicsObservable.add((function(){Pn.StartPerformanceCounter("Physics"),t._physicsTime.beginMonitoring()})),this._onAfterPhysicsObserver=this.scene.onAfterPhysicsObservable.add((function(){Pn.EndPerformanceCounter("Physics"),t._physicsTime.endMonitoring()}))):(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null,this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animationsTimeCounter",{get:function(){return this._animationsTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureAnimationsTime",{get:function(){return this._captureAnimationsTime},set:function(e){var t=this;e!==this._captureAnimationsTime&&(this._captureAnimationsTime=e,e?this._onAfterAnimationsObserver=this.scene.onAfterAnimationsObservable.add((function(){t._animationsTime.endMonitoring()})):(this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameTimeCounter",{get:function(){return this._frameTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureFrameTime",{get:function(){return this._captureFrameTime},set:function(e){this._captureFrameTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"interFrameTimeCounter",{get:function(){return this._interFrameTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureInterFrameTime",{get:function(){return this._captureInterFrameTime},set:function(e){this._captureInterFrameTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderTimeCounter",{get:function(){return this._renderTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureRenderTime",{get:function(){return this._captureRenderTime},set:function(e){var t=this;e!==this._captureRenderTime&&(this._captureRenderTime=e,e?(this._onBeforeDrawPhaseObserver=this.scene.onBeforeDrawPhaseObservable.add((function(){t._renderTime.beginMonitoring(),Pn.StartPerformanceCounter("Main render")})),this._onAfterDrawPhaseObserver=this.scene.onAfterDrawPhaseObservable.add((function(){t._renderTime.endMonitoring(!1),Pn.EndPerformanceCounter("Main render")}))):(this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cameraRenderTimeCounter",{get:function(){return this._cameraRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"captureCameraRenderTime",{get:function(){return this._captureCameraRenderTime},set:function(e){var t=this;e!==this._captureCameraRenderTime&&(this._captureCameraRenderTime=e,e?(this._onBeforeCameraRenderObserver=this.scene.onBeforeCameraRenderObservable.add((function(e){t._cameraRenderTime.beginMonitoring(),Pn.StartPerformanceCounter("Rendering camera ".concat(e.name))})),this._onAfterCameraRenderObserver=this.scene.onAfterCameraRenderObservable.add((function(e){t._cameraRenderTime.endMonitoring(!1),Pn.EndPerformanceCounter("Rendering camera ".concat(e.name))}))):(this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawCallsCounter",{get:function(){return this.scene.getEngine()._drawCalls},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.scene.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=null,this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null,this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null,this.scene.onBeforeAnimationsObservable.remove(this._onBeforeAnimationsObserver),this._onBeforeAnimationsObserver=null,this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver&&(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null),this._onAfterSpritesRenderingObserver&&(this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null),this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null,this._onBeforePhysicsObserver&&(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null),this._onAfterPhysicsObserver&&(this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null),this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null,this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null,this.scene=null},e}();Vt.ShadersStore.glowMapGenerationPixelShader="#if defined(DIFFUSE_ISLINEAR) || defined(EMISSIVE_ISLINEAR)\n#include\n#endif\n#ifdef DIFFUSE\nvarying vec2 vUVDiffuse;uniform sampler2D diffuseSampler;\n#endif\n#ifdef OPACITY\nvarying vec2 vUVOpacity;uniform sampler2D opacitySampler;uniform float opacityIntensity;\n#endif\n#ifdef EMISSIVE\nvarying vec2 vUVEmissive;uniform sampler2D emissiveSampler;\n#endif\n#ifdef VERTEXALPHA\nvarying vec4 vColor;\n#endif\nuniform vec4 glowColor;uniform float glowIntensity;\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\n#include\nvec4 finalColor=glowColor;\n#ifdef DIFFUSE\nvec4 albedoTexture=texture2D(diffuseSampler,vUVDiffuse);\n#ifdef DIFFUSE_ISLINEAR\nalbedoTexture=toGammaSpace(albedoTexture);\n#endif\n#ifdef GLOW\nfinalColor.a*=albedoTexture.a;\n#endif\n#ifdef HIGHLIGHT\nfinalColor.a=albedoTexture.a;\n#endif\n#endif\n#ifdef OPACITY\nvec4 opacityMap=texture2D(opacitySampler,vUVOpacity);\n#ifdef OPACITYRGB\nfinalColor.a*=getLuminance(opacityMap.rgb);\n#else\nfinalColor.a*=opacityMap.a;\n#endif\nfinalColor.a*=opacityIntensity;\n#endif\n#ifdef VERTEXALPHA\nfinalColor.a*=vColor.a;\n#endif\n#ifdef ALPHATEST\nif (finalColor.a\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\nuniform mat4 viewProjection;varying vec4 vPosition;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef DIFFUSE\nvarying vec2 vUVDiffuse;uniform mat4 diffuseMatrix;\n#endif\n#ifdef OPACITY\nvarying vec2 vUVOpacity;uniform mat4 opacityMatrix;\n#endif\n#ifdef EMISSIVE\nvarying vec2 vUVEmissive;uniform mat4 emissiveMatrix;\n#endif\n#ifdef VERTEXALPHA\nattribute vec4 color;varying vec4 vColor;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void)\n{vec3 positionUpdated=position;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\n#include\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n#ifdef CUBEMAP\nvPosition=worldPos;gl_Position=viewProjection*finalWorld*vec4(position,1.0);\n#else\nvPosition=viewProjection*worldPos;gl_Position=vPosition;\n#endif\n#ifdef DIFFUSE\n#ifdef DIFFUSEUV1\nvUVDiffuse=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef DIFFUSEUV2\nvUVDiffuse=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#ifdef OPACITY\n#ifdef OPACITYUV1\nvUVOpacity=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef OPACITYUV2\nvUVOpacity=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#ifdef EMISSIVE\n#ifdef EMISSIVEUV1\nvUVEmissive=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef EMISSIVEUV2\nvUVEmissive=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#ifdef VERTEXALPHA\nvColor=color;\n#endif\n#include\n}";var M_=function(){function e(t,n){this._vertexBuffers={},this._maxSize=0,this._mainTextureDesiredSize={width:0,height:0},this._shouldRender=!0,this._postProcesses=[],this._textures=[],this._emissiveTextureAndColor={texture:null,color:new U},this._effectIntensity={},this.neutralColor=new U,this.isEnabled=!0,this.disableBoundingBoxesFromEffectLayer=!1,this.onDisposeObservable=new u,this.onBeforeRenderMainTextureObservable=new u,this.onBeforeComposeObservable=new u,this.onBeforeRenderMeshToEffect=new u,this.onAfterRenderMeshToEffect=new u,this.onAfterComposeObservable=new u,this.onSizeChangedObservable=new u,this._materialForRendering={},this.name=t,this._scene=n||A.LastCreatedScene,e._SceneComponentInitialization(this._scene),this._engine=this._scene.getEngine(),this._maxSize=this._engine.getCaps().maxTextureSize,this._scene.effectLayers.push(this),this._mergeDrawWrapper=[],this._generateIndexBuffer(),this._generateVertexBuffer()}return Object.defineProperty(e.prototype,"camera",{get:function(){return this._effectLayerOptions.camera},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._effectLayerOptions.renderingGroupId},set:function(e){this._effectLayerOptions.renderingGroupId=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainTexture",{get:function(){return this._mainTexture},enumerable:!1,configurable:!0}),e.prototype.setMaterialForRendering=function(e,t){if(this._mainTexture.setMaterialForRendering(e,t),Array.isArray(e))for(var n=0;n4&&(l.push(Yn.MatricesIndicesExtraKind),l.push(Yn.MatricesWeightsExtraKind)),c.push("#define NUM_BONE_INFLUENCERS "+o.numBoneInfluencers);var g=o.skeleton;g&&g.isUsingTextureForMatrices?c.push("#define BONETEXTURE"):c.push("#define BonesPerMesh "+(g?g.bones.length+1:0)),o.numBoneInfluencers>0&&_.addCPUSkinningFallback(0,o)}else c.push("#define NUM_BONE_INFLUENCERS 0");var y=o.morphTargetManager,v=0;y&&y.numInfluencers>0&&(c.push("#define MORPHTARGETS"),v=y.numInfluencers,c.push("#define NUM_MORPH_INFLUENCERS "+v),y.isUsingTextureForTargets&&c.push("#define MORPHTARGETS_TEXTURE"),Xr.PrepareAttributesForMorphTargetsInfluencers(l,o,v)),t&&(c.push("#define INSTANCES"),Xr.PushAttributesForInstances(l),e.getRenderingMesh().hasThinInstances&&c.push("#define THIN_INSTANCES")),zr(s,this._scene,c),this._addCustomEffectDefines(c);var b=e._getDrawWrapper(void 0,!0),T=b.defines,E=c.join("\n");if(T!==E){var A=["world","mBones","viewProjection","glowColor","morphTargetInfluences","boneTextureWidth","diffuseMatrix","emissiveMatrix","opacityMatrix","opacityIntensity","morphTargetTextureInfo","morphTargetTextureIndices","glowIntensity"];Vr(A),b.setEffect(this._engine.createEffect("glowMapGeneration",l,A,["diffuseSampler","emissiveSampler","opacitySampler","boneSampler","morphTargets"],E,_,void 0,void 0,{maxSimultaneousMorphTargets:v}),E)}return b.effect.isReady()},e.prototype.render=function(){for(var e=0;e-1&&this._scene.effectLayers.splice(i,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onBeforeRenderMainTextureObservable.clear(),this.onBeforeComposeObservable.clear(),this.onBeforeRenderMeshToEffect.clear(),this.onAfterRenderMeshToEffect.clear(),this.onAfterComposeObservable.clear(),this.onSizeChangedObservable.clear()},e.prototype.getClassName=function(){return"EffectLayer"},e.Parse=function(e,t,n){return Pn.Instantiate(e.customType).Parse(e,t,n)},e._SceneComponentInitialization=function(e){throw ye("EffectLayerSceneComponent")},W([Se()],e.prototype,"name",void 0),W([De()],e.prototype,"neutralColor",void 0),W([Se()],e.prototype,"isEnabled",void 0),W([Be()],e.prototype,"camera",null),W([Se()],e.prototype,"renderingGroupId",null),W([Se()],e.prototype,"disableBoundingBoxesFromEffectLayer",void 0),e}();o.AddParser(Jn.NAME_EFFECTLAYER,(function(e,t,n,i){if(e.effectLayers){n.effectLayers||(n.effectLayers=[]);for(var r=0;r0){this._previousStencilState=this._engine.getStencilBuffer();for(var i=0,r=n;i-1)){this._renderEffects=!0,this._needStencil=this._needStencil||o.needStencil();var a=o._mainTexture;a._shouldRender()&&(this.scene.incrementRenderId(),a.render(!1,!1),t=!0)}}this.scene.incrementRenderId()}return t},e.prototype._setStencil=function(){this._needStencil&&this._engine.setStencilBuffer(!0)},e.prototype._setStencilBack=function(){this._needStencil&&this._engine.setStencilBuffer(this._previousStencilState)},e.prototype._draw=function(e){if(this._renderEffects){this._engine.setDepthBuffer(!1);for(var t=this.scene.effectLayers,n=0;n-1},t.prototype.referenceMeshToUseItsOwnMaterial=function(e){var t=this;e.resetDrawCache(this._mainTexture.renderPassId),this._meshesUsingTheirOwnMaterials.push(e.uniqueId),e.onDisposeObservable.add((function(){t._disposeMesh(e)}))},t.prototype.unReferenceMeshFromUsingItsOwnMaterial=function(e){for(var t=this._meshesUsingTheirOwnMaterials.indexOf(e.uniqueId);t>=0;)this._meshesUsingTheirOwnMaterials.splice(t,1),t=this._meshesUsingTheirOwnMaterials.indexOf(e.uniqueId);e.resetDrawCache(this._mainTexture.renderPassId)},t.prototype._disposeMesh=function(e){this.removeIncludedOnlyMesh(e),this.removeExcludedMesh(e)},t.prototype.getClassName=function(){return"GlowLayer"},t.prototype.serialize=function(){var e,t=ke.Serialize(this);if(t.customType="BABYLON.GlowLayer",t.includedMeshes=[],this._includedOnlyMeshes.length)for(e=0;e0&&e.isBackground===t&&e.applyPostProcess===n&&e.renderTargetTextures.indexOf(r)>-1&&0!=(e.layerMask&i)},e.prototype._drawRenderTargetBackground=function(e){var t=this;this._draw((function(n){return t._drawRenderTargetPredicate(n,!0,!0,t.scene.activeCamera.layerMask,e)}))},e.prototype._drawRenderTargetForegroundWithPostProcessing=function(e){var t=this;this._draw((function(n){return t._drawRenderTargetPredicate(n,!1,!0,t.scene.activeCamera.layerMask,e)}))},e.prototype._drawRenderTargetForegroundWithoutPostProcessing=function(e){var t=this;this._draw((function(n){return t._drawRenderTargetPredicate(n,!1,!1,t.scene.activeCamera.layerMask,e)}))},e.prototype.addFromContainer=function(e){var t=this;e.layers&&e.layers.forEach((function(e){t.scene.layers.push(e)}))},e.prototype.removeFromContainer=function(e,t){var n=this;void 0===t&&(t=!1),e.layers&&e.layers.forEach((function(e){var i=n.scene.layers.indexOf(e);-1!==i&&n.scene.layers.splice(i,1),t&&e.dispose()}))},e}();Vt.ShadersStore.layerPixelShader="varying vec2 vUV;uniform sampler2D textureSampler;uniform vec4 color;\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nvec4 baseColor=texture2D(textureSampler,vUV);\n#ifdef LINEAR\nbaseColor.rgb=toGammaSpace(baseColor.rgb);\n#endif\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\ngl_FragColor=baseColor*color;\n#define CUSTOM_FRAGMENT_MAIN_END\n}",Vt.ShadersStore.layerVertexShader="attribute vec2 position;uniform vec2 scale;uniform vec2 offset;uniform mat4 textureMatrix;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec2 shiftedPosition=position*scale+offset;vUV=vec2(textureMatrix*vec4(shiftedPosition*madd+madd,1.0,0.0));gl_Position=vec4(shiftedPosition,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}";var U_=function(){function e(e,t,n,i,r){this.name=e,this._applyPostProcess=!0,this.scale=new S(1,1),this.offset=new S(0,0),this.alphaBlendingMode=a.ALPHA_COMBINE,this.layerMask=268435455,this.renderTargetTextures=[],this.renderOnlyInRenderTargetTextures=!1,this.isEnabled=!0,this._vertexBuffers={},this.onDisposeObservable=new u,this.onBeforeRenderObservable=new u,this.onAfterRenderObservable=new u,this.texture=t?new Eo(t,n,!0):null,this.isBackground=void 0===i||i,this.color=void 0===r?new U(1,1,1,1):r,this._scene=n||A.LastCreatedScene;var o=this._scene._getComponent(Jn.NAME_LAYER);o||(o=new B_(this._scene),this._scene._addComponent(o)),this._scene.layers.push(this);var s=this._scene.getEngine();this._drawWrapper=new en(s);var c=[];c.push(1,1),c.push(-1,1),c.push(-1,-1),c.push(1,-1);var l=new Yn(s,c,Yn.PositionKind,!1,!1,2);this._vertexBuffers[Yn.PositionKind]=l,this._createIndexBuffer()}return Object.defineProperty(e.prototype,"applyPostProcess",{get:function(){return this.isBackground||this._applyPostProcess},set:function(e){this._applyPostProcess=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBeforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onAfterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!1,configurable:!0}),e.prototype._createIndexBuffer=function(){var e=this._scene.getEngine(),t=[];t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),this._indexBuffer=e.createIndexBuffer(t)},e.prototype._rebuild=function(){var e=this._vertexBuffers[Yn.PositionKind];e&&e._rebuild(),this._createIndexBuffer()},e.prototype.isReady=function(){var e,t=this._scene.getEngine(),n="";this.alphaTest&&(n="#define ALPHATEST"),this.texture&&!this.texture.gammaSpace&&(n+="\n#define LINEAR"),this._previousDefines!==n&&(this._previousDefines=n,this._drawWrapper.effect=t.createEffect("layer",[Yn.PositionKind],["textureMatrix","color","scale","offset"],["textureSampler"],n));var i=this._drawWrapper.effect;return(null==i?void 0:i.isReady())&&(null===(e=this.texture)||void 0===e?void 0:e.isReady())},e.prototype.render=function(){if(this.isEnabled){var e=this._scene.getEngine();if(this.isReady()){var t=this._drawWrapper.effect;this.onBeforeRenderObservable.notifyObservers(this),e.enableEffect(this._drawWrapper),e.setState(!1),t.setTexture("textureSampler",this.texture),t.setMatrix("textureMatrix",this.texture.getTextureMatrix()),t.setFloat4("color",this.color.r,this.color.g,this.color.b,this.color.a),t.setVector2("offset",this.offset),t.setVector2("scale",this.scale),e.bindBuffers(this._vertexBuffers,this._indexBuffer,t),this.alphaTest?e.drawElementsType(qr.TriangleFillMode,0,6):(e.setAlphaMode(this.alphaBlendingMode),e.drawElementsType(qr.TriangleFillMode,0,6),e.setAlphaMode(a.ALPHA_DISABLE)),this.onAfterRenderObservable.notifyObservers(this)}}},e.prototype.dispose=function(){var e=this._vertexBuffers[Yn.PositionKind];e&&(e.dispose(),this._vertexBuffers[Yn.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this.texture&&(this.texture.dispose(),this.texture=null),this.renderTargetTextures=[];var t=this._scene.layers.indexOf(this);this._scene.layers.splice(t,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderObservable.clear()},e}(),k_=function(){function e(e,t,n,i,r){this.size=e,this.position=t,this.alphaMode=a.ALPHA_ONEONE,this.color=n||new B(1,1,1),this.texture=i?new Eo(i,r.getScene(),!0):null,this._system=r;var o=r.scene.getEngine();this._drawWrapper=new en(o),this._drawWrapper.effect=o.createEffect("lensFlare",[Yn.PositionKind],["color","viewportMatrix"],["textureSampler"],""),r.lensFlares.push(this)}return e.AddFlare=function(t,n,i,r,o){return new e(t,n,i,r,o)},e.prototype.dispose=function(){this.texture&&this.texture.dispose();var e=this._system.lensFlares.indexOf(this);this._system.lensFlares.splice(e,1)},e}();Vt.ShadersStore.lensFlarePixelShader="varying vec2 vUV;uniform sampler2D textureSampler;uniform vec4 color;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nvec4 baseColor=texture2D(textureSampler,vUV);gl_FragColor=baseColor*color;\n#define CUSTOM_FRAGMENT_MAIN_END\n}",Vt.ShadersStore.lensFlareVertexShader="attribute vec2 position;uniform mat4 viewportMatrix;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvUV=position*madd+madd;gl_Position=viewportMatrix*vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}";var V_=function(){function e(t,n,i){this.name=t,this.lensFlares=[],this.borderLimit=300,this.viewportBorder=0,this.layerMask=268435455,this._vertexBuffers={},this._isEnabled=!0,this._scene=i||A.LastCreatedScene,e._SceneComponentInitialization(this._scene),this._emitter=n,this.id=t,i.lensFlareSystems.push(this),this.meshesSelectionPredicate=function(e){return i.activeCamera&&e.material&&e.isVisible&&e.isEnabled()&&e.isBlocker&&0!=(e.layerMask&i.activeCamera.layerMask)};var r=i.getEngine(),o=[];o.push(1,1),o.push(-1,1),o.push(-1,-1),o.push(1,-1),this._vertexBuffers[Yn.PositionKind]=new Yn(r,o,Yn.PositionKind,!1,!1,2),this._createIndexBuffer()}return Object.defineProperty(e.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),e.prototype._createIndexBuffer=function(){var e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)},Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e},enumerable:!1,configurable:!0}),e.prototype.getScene=function(){return this._scene},e.prototype.getEmitter=function(){return this._emitter},e.prototype.setEmitter=function(e){this._emitter=e},e.prototype.getEmitterPosition=function(){return this._emitter.getAbsolutePosition?this._emitter.getAbsolutePosition():this._emitter.position},e.prototype.computeEffectivePosition=function(e){var t=this.getEmitterPosition();t=C.Project(t,R.Identity(),this._scene.getTransformMatrix(),e),this._positionX=t.x,this._positionY=t.y,t=C.TransformCoordinates(this.getEmitterPosition(),this._scene.getViewMatrix()),this.viewportBorder>0&&(e.x-=this.viewportBorder,e.y-=this.viewportBorder,e.width+=2*this.viewportBorder,e.height+=2*this.viewportBorder,t.x+=this.viewportBorder,t.y+=this.viewportBorder,this._positionX+=this.viewportBorder,this._positionY+=this.viewportBorder);var n=this._scene.useRightHandedSystem;return!!(t.z>0&&!n||t.z<0&&n)&&(this._positionX>e.x&&this._positionXe.y&&(this._positionY,e.y,e.height),!0)},e.prototype._isVisible=function(){if(!this._isEnabled||!this._scene.activeCamera)return!1;var e=this.getEmitterPosition().subtract(this._scene.activeCamera.globalPosition),t=e.length();e.normalize();var n=new No(this._scene.activeCamera.globalPosition,e),i=this._scene.pickWithRay(n,this.meshesSelectionPredicate,!0);return!i||!i.hit||i.distance>t},e.prototype.render=function(){if(!this._scene.activeCamera)return!1;var e,t,n=this._scene.getEngine(),i=this._scene.activeCamera.viewport.toGlobal(n.getRenderWidth(!0),n.getRenderHeight(!0));if(!this.computeEffectivePosition(i))return!1;if(!this._isVisible())return!1;var r=(e=this._positionXi.x+i.width-this.borderLimit?this._positionX-i.x-i.width+this.borderLimit:0)>(t=this._positionYi.y+i.height-this.borderLimit?this._positionY-i.y-i.height+this.borderLimit:0)?e:t;(r-=this.viewportBorder)>this.borderLimit&&(r=this.borderLimit);var o=1-h.Clamp(r/this.borderLimit,0,1);if(o<0)return!1;o>1&&(o=1),this.viewportBorder>0&&(i.x+=this.viewportBorder,i.y+=this.viewportBorder,i.width-=2*this.viewportBorder,i.height-=2*this.viewportBorder,this._positionX-=this.viewportBorder,this._positionY-=this.viewportBorder);var s=i.x+i.width/2,c=i.y+i.height/2,l=s-this._positionX,u=c-this._positionY;n.setState(!1),n.setDepthBuffer(!1);for(var d=0;d0);for(var n=0,i=t;n0)}},e}();V_._SceneComponentInitialization=function(e){var t=e._getComponent(Jn.NAME_LENSFLARESYSTEM);t||(t=new z_(e),e._addComponent(t))},Vt.IncludesShadersStore.bayerDitherFunctions="float bayerDither2(vec2 _P) {return mod(2.0*_P.y+_P.x+1.0,4.0);}\nfloat bayerDither4(vec2 _P) {vec2 P1=mod(_P,2.0); \nvec2 P2=floor(0.5*mod(_P,4.0)); \nreturn 4.0*bayerDither2(P1)+bayerDither2(P2);}\nfloat bayerDither8(vec2 _P) {vec2 P1=mod(_P,2.0); \nvec2 P2=floor(0.5 *mod(_P,4.0)); \nvec2 P4=floor(0.25*mod(_P,8.0)); \nreturn 4.0*(4.0*bayerDither2(P1)+bayerDither2(P2))+bayerDither2(P4);}\n",Vt.IncludesShadersStore.shadowMapFragmentExtraDeclaration="#if SM_FLOAT==0\n#include\n#endif\n#if SM_SOFTTRANSPARENTSHADOW==1\n#include\nuniform float softTransparentShadowSM;\n#endif\nvarying float vDepthMetricSM;\n#if SM_USEDISTANCE==1\nuniform vec3 lightDataSM;varying vec3 vPositionWSM;\n#endif\nuniform vec3 biasAndScaleSM;uniform vec2 depthValuesSM;\n#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1\nvarying float zSM;\n#endif\n",Vt.IncludesShadersStore.shadowMapFragment="float depthSM=vDepthMetricSM;\n#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1\n#if SM_USEDISTANCE==1\ndepthSM=(length(vPositionWSM-lightDataSM)+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#else\n#ifdef USE_REVERSE_DEPTHBUFFER\ndepthSM=(-zSM+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#else\ndepthSM=(zSM+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#endif\n#endif\n#ifdef USE_REVERSE_DEPTHBUFFER\ngl_FragDepth=clamp(1.0-depthSM,0.0,1.0);\n#else\ngl_FragDepth=clamp(depthSM,0.0,1.0); \n#endif\n#elif SM_USEDISTANCE==1\ndepthSM=(length(vPositionWSM-lightDataSM)+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#endif\n#if SM_ESM==1\ndepthSM=clamp(exp(-min(87.,biasAndScaleSM.z*depthSM)),0.,1.);\n#endif\n#if SM_FLOAT==1\ngl_FragColor=vec4(depthSM,1.0,1.0,1.0);\n#else\ngl_FragColor=pack(depthSM);\n#endif\nreturn;",Vt.ShadersStore.shadowMapPixelShader="#include\n#ifdef ALPHATEXTURE\nvarying vec2 vUV;uniform sampler2D diffuseSampler;\n#endif\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\n#include\n#ifdef ALPHATEXTURE\nfloat alphaFromAlphaTexture=texture2D(diffuseSampler,vUV).a;\n#ifdef ALPHATESTVALUE\nif (alphaFromAlphaTexture=softTransparentShadowSM*alphaFromAlphaTexture) discard;\n#else\nif ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM) discard;\n#endif\n#endif\n#include\n}",Vt.IncludesShadersStore.sceneVertexDeclaration="uniform mat4 viewProjection;\n#ifdef MULTIVIEW\nuniform mat4 viewProjectionR;\n#endif\nuniform mat4 view;uniform mat4 projection;uniform vec4 vEyePosition;\n",Vt.IncludesShadersStore.meshVertexDeclaration="uniform mat4 world;uniform float visibility;\n",Vt.IncludesShadersStore.shadowMapVertexDeclaration="#include\n#include\n",Vt.IncludesShadersStore.shadowMapUboDeclaration="layout(std140,column_major) uniform;\n#include\n#include\n",Vt.IncludesShadersStore.shadowMapVertexExtraDeclaration="#if SM_NORMALBIAS==1\nuniform vec3 lightDataSM;\n#endif\nuniform vec3 biasAndScaleSM;uniform vec2 depthValuesSM;varying float vDepthMetricSM;\n#if SM_USEDISTANCE==1\nvarying vec3 vPositionWSM;\n#endif\n#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1\nvarying float zSM;\n#endif\n",Vt.IncludesShadersStore.shadowMapVertexNormalBias="#if SM_NORMALBIAS==1\n#if SM_DIRECTIONINLIGHTDATA==1\nvec3 worldLightDirSM=normalize(-lightDataSM.xyz);\n#else\nvec3 directionToLightSM=lightDataSM.xyz-worldPos.xyz;vec3 worldLightDirSM=normalize(directionToLightSM);\n#endif\nfloat ndlSM=dot(vNormalW,worldLightDirSM);float sinNLSM=sqrt(1.0-ndlSM*ndlSM);float normalBiasSM=biasAndScaleSM.y*sinNLSM;worldPos.xyz-=vNormalW*normalBiasSM;\n#endif\n",Vt.IncludesShadersStore.shadowMapVertexMetric="#if SM_USEDISTANCE==1\nvPositionWSM=worldPos.xyz;\n#endif\n#if SM_DEPTHTEXTURE==1\n#ifdef IS_NDC_HALF_ZRANGE\n#define BIASFACTOR 0.5\n#else\n#define BIASFACTOR 1.0\n#endif\n#ifdef USE_REVERSE_DEPTHBUFFER\ngl_Position.z-=biasAndScaleSM.x*gl_Position.w*BIASFACTOR;\n#else\ngl_Position.z+=biasAndScaleSM.x*gl_Position.w*BIASFACTOR;\n#endif\n#endif\n#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1\nzSM=gl_Position.z;gl_Position.z=0.0;\n#elif SM_USEDISTANCE==0\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetricSM=(-gl_Position.z+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#else\nvDepthMetricSM=(gl_Position.z+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#endif\n#endif\n",Vt.ShadersStore.shadowMapVertexShader="attribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#include\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n#ifdef INSTANCES\nattribute vec4 world0;attribute vec4 world1;attribute vec4 world2;attribute vec4 world3;\n#endif\n#include\n#include<__decl__shadowMapVertex>\n#ifdef ALPHATEXTURE\nvarying vec2 vUV;uniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n#include\n#include\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void)\n{vec3 positionUpdated=position;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\n#include\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n#ifdef NORMAL\nmat3 normWorldSM=mat3(finalWorld);\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvec3 vNormalW=normalUpdated/vec3(dot(normWorldSM[0],normWorldSM[0]),dot(normWorldSM[1],normWorldSM[1]),dot(normWorldSM[2],normWorldSM[2]));vNormalW=normalize(normWorldSM*vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormWorldSM=transposeMat3(inverseMat3(normWorldSM));\n#endif\nvec3 vNormalW=normalize(normWorldSM*normalUpdated);\n#endif\n#endif\n#include\ngl_Position=viewProjection*worldPos;\n#include\n#ifdef ALPHATEXTURE\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#include\n}",Vt.ShadersStore.depthBoxBlurPixelShader="varying vec2 vUV;uniform sampler2D textureSampler;uniform vec2 screenSize;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{vec4 colorDepth=vec4(0.0);for (int x=-OFFSET; x<=OFFSET; x++)\nfor (int y=-OFFSET; y<=OFFSET; y++)\ncolorDepth+=texture2D(textureSampler,vUV+vec2(x,y)/screenSize);gl_FragColor=(colorDepth/float((OFFSET*2+1)*(OFFSET*2+1)));}",Vt.IncludesShadersStore.shadowMapFragmentSoftTransparentShadow="#if SM_SOFTTRANSPARENTSHADOW==1\nif ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM*alpha) discard;\n#endif\n";var G_=function(){function e(t,n,i,r,o){this.onBeforeShadowMapRenderObservable=new u,this.onAfterShadowMapRenderObservable=new u,this.onBeforeShadowMapRenderMeshObservable=new u,this.onAfterShadowMapRenderMeshObservable=new u,this._bias=5e-5,this._normalBias=0,this._blurBoxOffset=1,this._blurScale=2,this._blurKernel=1,this._useKernelBlur=!1,this._filter=e.FILTER_NONE,this._filteringQuality=e.QUALITY_HIGH,this._contactHardeningLightSizeUVRatio=.1,this._darkness=0,this._transparencyShadow=!1,this.enableSoftTransparentShadow=!1,this.useOpacityTextureForTransparentShadow=!1,this.frustumEdgeFalloff=0,this.forceBackFacesOnly=!1,this._lightDirection=C.Zero(),this._viewMatrix=R.Zero(),this._projectionMatrix=R.Zero(),this._transformMatrix=R.Zero(),this._cachedPosition=new C(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cachedDirection=new C(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._currentFaceIndex=0,this._currentFaceIndexCache=0,this._defaultTextureMatrix=R.Identity(),this._mapSize=t,this._light=n,this._scene=n.getScene(),this._camera=null!=r?r:null,this._useRedTextureType=!!o;var s=n._shadowGenerators;s||(s=n._shadowGenerators=new Map),s.set(this._camera,this),this.id=n.id,this._useUBO=this._scene.getEngine().supportsUniformBuffers,this._useUBO&&(this._sceneUBOs=[],this._sceneUBOs.push(this._scene.createSceneUniformBuffer('Scene for Shadow Generator (light "'.concat(this._light.name,'")')))),e._SceneComponentInitialization(this._scene);var c=this._scene.getEngine().getCaps();i?c.textureFloatRender&&c.textureFloatLinearFiltering?this._textureType=a.TEXTURETYPE_FLOAT:c.textureHalfFloatRender&&c.textureHalfFloatLinearFiltering?this._textureType=a.TEXTURETYPE_HALF_FLOAT:this._textureType=a.TEXTURETYPE_UNSIGNED_INT:c.textureHalfFloatRender&&c.textureHalfFloatLinearFiltering?this._textureType=a.TEXTURETYPE_HALF_FLOAT:c.textureFloatRender&&c.textureFloatLinearFiltering?this._textureType=a.TEXTURETYPE_FLOAT:this._textureType=a.TEXTURETYPE_UNSIGNED_INT,this._initializeGenerator(),this._applyFilterValues()}return Object.defineProperty(e.prototype,"bias",{get:function(){return this._bias},set:function(e){this._bias=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normalBias",{get:function(){return this._normalBias},set:function(e){this._normalBias=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurBoxOffset",{get:function(){return this._blurBoxOffset},set:function(e){this._blurBoxOffset!==e&&(this._blurBoxOffset=e,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurScale",{get:function(){return this._blurScale},set:function(e){this._blurScale!==e&&(this._blurScale=e,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurKernel",{get:function(){return this._blurKernel},set:function(e){this._blurKernel!==e&&(this._blurKernel=e,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useKernelBlur",{get:function(){return this._useKernelBlur},set:function(e){this._useKernelBlur!==e&&(this._useKernelBlur=e,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depthScale",{get:function(){return void 0!==this._depthScale?this._depthScale:this._light.getDepthScale()},set:function(e){this._depthScale=e},enumerable:!1,configurable:!0}),e.prototype._validateFilter=function(e){return e},Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},set:function(t){if(t=this._validateFilter(t),this._light.needCube()){if(t===e.FILTER_BLUREXPONENTIALSHADOWMAP)return void(this.useExponentialShadowMap=!0);if(t===e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)return void(this.useCloseExponentialShadowMap=!0);if(t===e.FILTER_PCF||t===e.FILTER_PCSS)return void(this.usePoissonSampling=!0)}t!==e.FILTER_PCF&&t!==e.FILTER_PCSS||this._scene.getEngine()._features.supportShadowSamplers?this._filter!==t&&(this._filter=t,this._disposeBlurPostProcesses(),this._applyFilterValues(),this._light._markMeshesAsLightDirty()):this.usePoissonSampling=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usePoissonSampling",{get:function(){return this.filter===e.FILTER_POISSONSAMPLING},set:function(t){var n=this._validateFilter(e.FILTER_POISSONSAMPLING);(t||this.filter===e.FILTER_POISSONSAMPLING)&&(this.filter=t?n:e.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useExponentialShadowMap",{get:function(){return this.filter===e.FILTER_EXPONENTIALSHADOWMAP},set:function(t){var n=this._validateFilter(e.FILTER_EXPONENTIALSHADOWMAP);(t||this.filter===e.FILTER_EXPONENTIALSHADOWMAP)&&(this.filter=t?n:e.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useBlurExponentialShadowMap",{get:function(){return this.filter===e.FILTER_BLUREXPONENTIALSHADOWMAP},set:function(t){var n=this._validateFilter(e.FILTER_BLUREXPONENTIALSHADOWMAP);(t||this.filter===e.FILTER_BLUREXPONENTIALSHADOWMAP)&&(this.filter=t?n:e.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useCloseExponentialShadowMap",{get:function(){return this.filter===e.FILTER_CLOSEEXPONENTIALSHADOWMAP},set:function(t){var n=this._validateFilter(e.FILTER_CLOSEEXPONENTIALSHADOWMAP);(t||this.filter===e.FILTER_CLOSEEXPONENTIALSHADOWMAP)&&(this.filter=t?n:e.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useBlurCloseExponentialShadowMap",{get:function(){return this.filter===e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP},set:function(t){var n=this._validateFilter(e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP);(t||this.filter===e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)&&(this.filter=t?n:e.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usePercentageCloserFiltering",{get:function(){return this.filter===e.FILTER_PCF},set:function(t){var n=this._validateFilter(e.FILTER_PCF);(t||this.filter===e.FILTER_PCF)&&(this.filter=t?n:e.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"filteringQuality",{get:function(){return this._filteringQuality},set:function(e){this._filteringQuality!==e&&(this._filteringQuality=e,this._disposeBlurPostProcesses(),this._applyFilterValues(),this._light._markMeshesAsLightDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useContactHardeningShadow",{get:function(){return this.filter===e.FILTER_PCSS},set:function(t){var n=this._validateFilter(e.FILTER_PCSS);(t||this.filter===e.FILTER_PCSS)&&(this.filter=t?n:e.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contactHardeningLightSizeUVRatio",{get:function(){return this._contactHardeningLightSizeUVRatio},set:function(e){this._contactHardeningLightSizeUVRatio=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"darkness",{get:function(){return this._darkness},set:function(e){this.setDarkness(e)},enumerable:!1,configurable:!0}),e.prototype.getDarkness=function(){return this._darkness},e.prototype.setDarkness=function(e){return this._darkness=e>=1?1:e<=0?0:e,this},Object.defineProperty(e.prototype,"transparencyShadow",{get:function(){return this._transparencyShadow},set:function(e){this.setTransparencyShadow(e)},enumerable:!1,configurable:!0}),e.prototype.setTransparencyShadow=function(e){return this._transparencyShadow=e,this},e.prototype.getShadowMap=function(){return this._shadowMap},e.prototype.getShadowMapForRendering=function(){return this._shadowMap2?this._shadowMap2:this._shadowMap},e.prototype.getClassName=function(){return e.CLASSNAME},e.prototype.addShadowCaster=function(e,t){if(void 0===t&&(t=!0),!this._shadowMap)return this;if(this._shadowMap.renderList||(this._shadowMap.renderList=[]),-1===this._shadowMap.renderList.indexOf(e)&&this._shadowMap.renderList.push(e),t)for(var n=0,i=e.getChildMeshes();n=a.length)return void(e&&e(n));setTimeout(h,16)}};h()}else e&&e(this)}else e&&e(this)}else e&&e(this)},e.prototype.forceCompilationAsync=function(e){var t=this;return new Promise((function(n){t.forceCompilation((function(){n()}),e)}))},e.prototype._isReadyCustomDefines=function(e,t,n){},e.prototype._prepareShadowDefines=function(e,t,n,i){n.push("#define SM_LIGHTTYPE_"+this._light.getClassName().toUpperCase()),n.push("#define SM_FLOAT "+(this._textureType!==a.TEXTURETYPE_UNSIGNED_INT?"1":"0")),n.push("#define SM_ESM "+(this.useExponentialShadowMap||this.useBlurExponentialShadowMap?"1":"0")),n.push("#define SM_DEPTHTEXTURE "+(this.usePercentageCloserFiltering||this.useContactHardeningShadow?"1":"0"));var r=e.getMesh();return n.push("#define SM_NORMALBIAS "+(this.normalBias&&r.isVerticesDataPresent(Yn.NormalKind)?"1":"0")),n.push("#define SM_DIRECTIONINLIGHTDATA "+(this.getLight().getTypeID()===ro.LIGHTTYPEID_DIRECTIONALLIGHT?"1":"0")),n.push("#define SM_USEDISTANCE "+(this._light.needCube()?"1":"0")),n.push("#define SM_SOFTTRANSPARENTSHADOW "+(this.enableSoftTransparentShadow&&i?"1":"0")),this._isReadyCustomDefines(n,e,t),n},e.prototype.isReady=function(t,n,i){var r,o=t.getMaterial(),a=null==o?void 0:o.shadowDepthWrapper;if(this._opacityTexture=null,!o)return!1;var s=[];if(this._prepareShadowDefines(t,n,s,i),a){if(!a.isReadyForSubMesh(t,s,this,n,this._scene.getEngine().currentRenderPassId))return!1}else{var c=t._getDrawWrapper(void 0,!0),l=c.effect,u=c.defines,h=[Yn.PositionKind],d=t.getMesh();this.normalBias&&d.isVerticesDataPresent(Yn.NormalKind)&&(h.push(Yn.NormalKind),s.push("#define NORMAL"),d.nonUniformScaling&&s.push("#define NONUNIFORMSCALING"));var p=o.needAlphaTesting();if((p||o.needAlphaBlending())&&(this.useOpacityTextureForTransparentShadow?this._opacityTexture=o.opacityTexture:this._opacityTexture=o.getAlphaTestTexture(),this._opacityTexture)){if(!this._opacityTexture.isReady())return!1;var f=null!==(r=o.alphaCutOff)&&void 0!==r?r:e.DEFAULT_ALPHA_CUTOFF;s.push("#define ALPHATEXTURE"),p&&s.push("#define ALPHATESTVALUE ".concat(f).concat(f%1==0?".":"")),d.isVerticesDataPresent(Yn.UVKind)&&(h.push(Yn.UVKind),s.push("#define UV1")),d.isVerticesDataPresent(Yn.UV2Kind)&&1===this._opacityTexture.coordinatesIndex&&(h.push(Yn.UV2Kind),s.push("#define UV2"))}var m=new Oa;if(d.useBones&&d.computeBonesUsingShaders&&d.skeleton){h.push(Yn.MatricesIndicesKind),h.push(Yn.MatricesWeightsKind),d.numBoneInfluencers>4&&(h.push(Yn.MatricesIndicesExtraKind),h.push(Yn.MatricesWeightsExtraKind));var _=d.skeleton;s.push("#define NUM_BONE_INFLUENCERS "+d.numBoneInfluencers),d.numBoneInfluencers>0&&m.addCPUSkinningFallback(0,d),_.isUsingTextureForMatrices?s.push("#define BONETEXTURE"):s.push("#define BonesPerMesh "+(_.bones.length+1))}else s.push("#define NUM_BONE_INFLUENCERS 0");var g=d.morphTargetManager,y=0;if(g&&g.numInfluencers>0&&(s.push("#define MORPHTARGETS"),y=g.numInfluencers,s.push("#define NUM_MORPH_INFLUENCERS "+y),g.isUsingTextureForTargets&&s.push("#define MORPHTARGETS_TEXTURE"),Xr.PrepareAttributesForMorphTargetsInfluencers(h,d,y)),zr(o,this._scene,s),n&&(s.push("#define INSTANCES"),Xr.PushAttributesForInstances(h),t.getRenderingMesh().hasThinInstances&&s.push("#define THIN_INSTANCES")),this.customShaderOptions&&this.customShaderOptions.defines)for(var v=0,b=this.customShaderOptions.defines;v4&&(l.push(Yn.MatricesIndicesExtraKind),l.push(Yn.MatricesWeightsExtraKind)),c.push("#define NUM_BONE_INFLUENCERS "+r.numBoneInfluencers),c.push("#define BonesPerMesh "+(r.skeleton?r.skeleton.bones.length+1:0));var u=e.getRenderingMesh().skeleton;(null==u?void 0:u.isUsingTextureForMatrices)&&c.push("#define BONETEXTURE")}else c.push("#define NUM_BONE_INFLUENCERS 0");var h=r.morphTargetManager,d=0;h&&h.numInfluencers>0&&(d=h.numInfluencers,c.push("#define MORPHTARGETS"),c.push("#define NUM_MORPH_INFLUENCERS "+d),h.isUsingTextureForTargets&&c.push("#define MORPHTARGETS_TEXTURE"),Xr.PrepareAttributesForMorphTargetsInfluencers(l,r,d)),s.pointsCloud&&c.push("#define POINTSIZE"),t&&(c.push("#define INSTANCES"),Xr.PushAttributesForInstances(l),e.getRenderingMesh().hasThinInstances&&c.push("#define THIN_INSTANCES")),this._storeNonLinearDepth&&c.push("#define NONLINEARDEPTH"),this._storeCameraSpaceZ&&c.push("#define STORE_CAMERASPACE_Z"),this.isPacked&&c.push("#define PACKED"),zr(s,o,c);var p=e._getDrawWrapper(void 0,!0),f=p.defines,m=c.join("\n");if(f!==m){var _=["world","mBones","boneTextureWidth","pointSize","viewProjection","view","diffuseMatrix","depthValues","morphTargetInfluences","morphTargetTextureInfo","morphTargetTextureIndices"];Vr(_),p.setEffect(i.createEffect("depth",l,_,["diffuseSampler","morphTargets","boneSampler"],m,void 0,void 0,void 0,{maxSimultaneousMorphTargets:d}),m)}return p.effect.isReady()},e.prototype.getDepthMap=function(){return this._depthMap},e.prototype.dispose=function(){var e=[];for(var t in this._scene._depthRenderer)this._scene._depthRenderer[t]===this&&e.push(t);if(e.length>0){this._depthMap.dispose();for(var n=0,i=e;n1||l>1;){c=Math.max(Math.round(c/2),1),l=Math.max(Math.round(l/2),1);var h=new Da("Reduction phase "+u,"minmaxRedux",["texSize"],null,{width:c,height:l},null,a.TEXTURE_NEAREST_NEAREST,o.getEngine(),!1,"#define "+(1==c&&1==l?"LAST":1==c||1==l?"ONEBEFORELAST":"MAIN"),n,void 0,void 0,void 0,a.TEXTUREFORMAT_RG);h.autoClear=!1,h.forceFullscreenViewport=i,h.onApply=function(e,t){return function(n){1==e||1==t?n.setInt2("texSize",e,t):n.setFloat2("texSize",e,t)}}(c,l),this._reductionSteps.push(h),u++,1==c&&1==l&&h.onAfterRenderObservable.add(function(e,t,n){var i=new Float32Array(4*e*t),a={min:0,max:0};return function(){o.getEngine()._readTexturePixels(n.inputTexture.texture,e,t,-1,0,i,!1),a.min=i[0],a.max=i[1],r.onAfterReductionPerformed.notifyObservers(a)}}(c,l,h))}}},Object.defineProperty(e.prototype,"refreshRate",{get:function(){return this._sourceTexture?this._sourceTexture.refreshRate:-1},set:function(e){this._sourceTexture&&(this._sourceTexture.refreshRate=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activated",{get:function(){return this._activated},enumerable:!1,configurable:!0}),e.prototype.activate=function(){var e=this;!this._onAfterUnbindObserver&&this._sourceTexture&&(this._onAfterUnbindObserver=this._sourceTexture.onAfterUnbindObservable.add((function(){var t,n,i=e._camera.getScene().getEngine();null===(t=i._debugPushGroup)||void 0===t||t.call(i,"min max reduction",1),e._reductionSteps[0].activate(e._camera),e._postProcessManager.directRender(e._reductionSteps,e._reductionSteps[0].inputTexture,e._forceFullscreenViewport),i.unBindFramebuffer(e._reductionSteps[0].inputTexture,!1),null===(n=i._debugPopGroup)||void 0===n||n.call(i,1)})),this._activated=!0)},e.prototype.deactivate=function(){this._onAfterUnbindObserver&&this._sourceTexture&&(this._sourceTexture.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=null,this._activated=!1)},e.prototype.dispose=function(e){if(void 0===e&&(e=!0),e&&(this.onAfterReductionPerformed.clear(),this._onContextRestoredObserver&&(this._camera.getEngine().onContextRestoredObservable.remove(this._onContextRestoredObserver),this._onContextRestoredObserver=null)),this.deactivate(),this._reductionSteps){for(var t=0;tt&&(e=0,t=1),e<0&&(e=0),t>1&&(t=1),this._minDistance=e,this._maxDistance=t,this._breaksAreDirty=!0)},Object.defineProperty(t.prototype,"minDistance",{get:function(){return this._minDistance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDistance",{get:function(){return this._maxDistance},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return t.CLASSNAME},t.prototype.getCascadeMinExtents=function(e){return e>=0&&e=0&&et.maxZ&&0!==t.maxZ||(this._shadowMaxZ=e,this._light._markMeshesAsLightDirty(),this._breaksAreDirty=!0):this._shadowMaxZ=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debug",{get:function(){return this._debug},set:function(e){this._debug=e,this._light._markMeshesAsLightDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthClamp",{get:function(){return this._depthClamp},set:function(e){this._depthClamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cascadeBlendPercentage",{get:function(){return this._cascadeBlendPercentage},set:function(e){this._cascadeBlendPercentage=e,this._light._markMeshesAsLightDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lambda",{get:function(){return this._lambda},set:function(e){var t=Math.min(Math.max(e,0),1);this._lambda!=t&&(this._lambda=t,this._breaksAreDirty=!0)},enumerable:!1,configurable:!0}),t.prototype.getCascadeViewMatrix=function(e){return e>=0&&e=0&&e=0&&e=i&&(n=0,i=1),n==t._minDistance&&i==t._maxDistance||t.setMinMaxDistance(n,i)})),this._depthReducer.setDepthRenderer(this._depthRenderer)),this._depthReducer.activate()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoCalcDepthBoundsRefreshRate",{get:function(){var e,t,n;return null!==(n=null===(t=null===(e=this._depthReducer)||void 0===e?void 0:e.depthRenderer)||void 0===t?void 0:t.getDepthMap().refreshRate)&&void 0!==n?n:-1},set:function(e){var t;(null===(t=this._depthReducer)||void 0===t?void 0:t.depthRenderer)&&(this._depthReducer.depthRenderer.getDepthMap().refreshRate=e)},enumerable:!1,configurable:!0}),t.prototype.splitFrustum=function(){this._breaksAreDirty=!0},t.prototype._splitFrustum=function(){var e=this._getCamera();if(e){for(var t=e.minZ,n=e.maxZ||this._shadowMaxZ,i=n-t,r=this._minDistance,o=t+r*i,a=t+(this._shadowMaxZ=t?Math.min((this._shadowMaxZ-t)/(n-t),this._maxDistance):this._maxDistance)*i,s=a-o,c=a/o,l=0;lMath.PI;)r-=2*Math.PI;var a=r/Math.PI,s=o/Math.PI;a=.5*a+.5;var c=Math.round(a*n);c<0?c=0:c>=n&&(c=n-1);var l=Math.round(s*i);l<0?l=0:l>=i&&(l=i-1);var u=i-l-1;return{r:t[u*n*3+3*c+0],g:t[u*n*3+3*c+1],b:t[u*n*3+3*c+2]}},e.FACE_LEFT=[new C(-1,-1,-1),new C(1,-1,-1),new C(-1,1,-1),new C(1,1,-1)],e.FACE_RIGHT=[new C(1,-1,1),new C(-1,-1,1),new C(1,1,1),new C(-1,1,1)],e.FACE_FRONT=[new C(1,-1,-1),new C(1,-1,1),new C(1,1,-1),new C(1,1,1)],e.FACE_BACK=[new C(-1,-1,1),new C(-1,-1,-1),new C(-1,1,1),new C(-1,1,-1)],e.FACE_DOWN=[new C(1,1,-1),new C(1,1,1),new C(-1,1,-1),new C(-1,1,1)],e.FACE_UP=[new C(-1,-1,-1),new C(-1,-1,1),new C(1,-1,-1),new C(1,-1,1)],e}(),ng=function(){function e(){}return e._Ldexp=function(e,t){return t>1023?e*Math.pow(2,1023)*Math.pow(2,t-1023):t<-1074?e*Math.pow(2,-1074)*Math.pow(2,t+1074):e*Math.pow(2,t)},e._Rgbe2float=function(e,t,n,i,r,o){r>0?(r=this._Ldexp(1,r-136),e[o+0]=t*r,e[o+1]=n*r,e[o+2]=i*r):(e[o+0]=0,e[o+1]=0,e[o+2]=0)},e._ReadStringLine=function(e,t){for(var n="",i="",r=t;r32767)throw"HDR Bad header format, unsupported size";return{height:t,width:n,dataPosition:a+=i.length+1}},e.GetCubeMapTextureData=function(e,t,n){void 0===n&&(n=!1);var i=new Uint8Array(e),r=this.RGBE_ReadHeader(i),o=this.RGBE_ReadPixels(i,r);return tg.ConvertPanoramaToCubemap(o,r.width,r.height,t,n)},e.RGBE_ReadPixels=function(e,t){return this._RGBEReadPixelsRLE(e,t)},e._RGBEReadPixelsRLE=function(e,t){for(var n,i,r,o,a,s=t.height,c=t.width,l=t.dataPosition,u=0,h=0,d=0,p=new ArrayBuffer(4*c),f=new Uint8Array(p),m=new ArrayBuffer(t.width*t.height*4*3),_=new Float32Array(m);s>0;){if(n=e[l++],i=e[l++],r=e[l++],o=e[l++],2!=n||2!=i||128&r||t.width<8||t.width>32767)return this._RGBEReadPixelsNOTRLE(e,t);if((r<<8|o)!=c)throw"HDR Bad header format, wrong scan line width";for(u=0,d=0;d<4;d++)for(h=(d+1)*c;u128){if(0==(a=n-128)||a>h-u)throw"HDR Bad Format, bad scanline data (run)";for(;a-- >0;)f[u++]=i}else{if(0==(a=n)||a>h-u)throw"HDR Bad Format, bad scanline data (non-run)";if(f[u++]=i,--a>0)for(var g=0;g0;){for(a=0;a255){var y=255/g;f*=y,m*=y,_*=y}c[3*p+0]=f,c[3*p+1]=m,c[3*p+2]=_}l?s.push(l):c?s.push(c):s.push(h)}return s}),null,this._onLoad,this._onError)},t.prototype.clone=function(){var e=new t(this.url,this.getScene()||this._getEngine(),this._size,this._noMipmap,this._generateHarmonics,this.gammaSpace);return e.level=this.level,e.wrapU=this.wrapU,e.wrapV=this.wrapV,e.coordinatesIndex=this.coordinatesIndex,e.coordinatesMode=this.coordinatesMode,e},t.prototype.delayLoad=function(){this.delayLoadState===a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap),this._texture||this._loadTexture())},t.prototype.getReflectionTextureMatrix=function(){return this._textureMatrix},t.prototype.setReflectionTextureMatrix=function(e){var t,n=this;this._textureMatrix=e,e.updateFlag!==this._textureMatrix.updateFlag&&e.isIdentity()!==this._textureMatrix.isIdentity()&&(null===(t=this.getScene())||void 0===t||t.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return-1!==e.getActiveTextures().indexOf(n)})))},t.prototype.dispose=function(){this.onLoadObservable.clear(),e.prototype.dispose.call(this)},t.Parse=function(e,n,i){var r=null;return e.name&&!e.isRenderTarget&&((r=new t(i+e.name,n,e.size,e.noMipmap,e.generateHarmonics,e.useInGammaSpace)).name=e.name,r.hasAlpha=e.hasAlpha,r.level=e.level,r.coordinatesMode=e.coordinatesMode,r.isBlocking=e.isBlocking),r&&(e.boundingBoxPosition&&(r.boundingBoxPosition=C.FromArray(e.boundingBoxPosition)),e.boundingBoxSize&&(r.boundingBoxSize=C.FromArray(e.boundingBoxSize)),e.rotationY&&(r.rotationY=e.rotationY)),r},t.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.hasAlpha=this.hasAlpha,e.isCube=!0,e.level=this.level,e.size=this._size,e.coordinatesMode=this.coordinatesMode,e.useInGammaSpace=this.gammaSpace,e.generateHarmonics=this._generateHarmonics,e.customType="BABYLON.HDRCubeTexture",e.noMipmap=this._noMipmap,e.isBlocking=this._isBlocking,e.rotationY=this._rotationY,e},t._FacesMapping=["right","left","up","down","front","back"],t}(go);b("BABYLON.HDRCubeTexture",rg);var og=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=null),this.name=e,this.animations=[],this._positions=null,this._normals=null,this._tangents=null,this._uvs=null,this._uniqueId=0,this.onInfluenceChanged=new u,this._onDataLayoutChanged=new u,this._animationPropertiesOverride=null,this._scene=n||A.LastCreatedScene,this.influence=t,this._scene&&(this._uniqueId=this._scene.getUniqueId())}return Object.defineProperty(e.prototype,"influence",{get:function(){return this._influence},set:function(e){if(this._influence!==e){var t=this._influence;this._influence=e,this.onInfluenceChanged.hasObservers()&&this.onInfluenceChanged.notifyObservers(0===t||0===e)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animationPropertiesOverride",{get:function(){return!this._animationPropertiesOverride&&this._scene?this._scene.animationPropertiesOverride:this._animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasPositions",{get:function(){return!!this._positions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasNormals",{get:function(){return!!this._normals},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTangents",{get:function(){return!!this._tangents},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasUVs",{get:function(){return!!this._uvs},enumerable:!1,configurable:!0}),e.prototype.setPositions=function(e){var t=this.hasPositions;this._positions=e,t!==this.hasPositions&&this._onDataLayoutChanged.notifyObservers(void 0)},e.prototype.getPositions=function(){return this._positions},e.prototype.setNormals=function(e){var t=this.hasNormals;this._normals=e,t!==this.hasNormals&&this._onDataLayoutChanged.notifyObservers(void 0)},e.prototype.getNormals=function(){return this._normals},e.prototype.setTangents=function(e){var t=this.hasTangents;this._tangents=e,t!==this.hasTangents&&this._onDataLayoutChanged.notifyObservers(void 0)},e.prototype.getTangents=function(){return this._tangents},e.prototype.setUVs=function(e){var t=this.hasUVs;this._uvs=e,t!==this.hasUVs&&this._onDataLayoutChanged.notifyObservers(void 0)},e.prototype.getUVs=function(){return this._uvs},e.prototype.clone=function(){var t=this,n=ke.Clone((function(){return new e(t.name,t.influence,t._scene)}),this);return n._positions=this._positions,n._normals=this._normals,n._tangents=this._tangents,n._uvs=this._uvs,n},e.prototype.serialize=function(){var e={};return e.name=this.name,e.influence=this.influence,e.positions=Array.prototype.slice.call(this.getPositions()),null!=this.id&&(e.id=this.id),this.hasNormals&&(e.normals=Array.prototype.slice.call(this.getNormals())),this.hasTangents&&(e.tangents=Array.prototype.slice.call(this.getTangents())),this.hasUVs&&(e.uvs=Array.prototype.slice.call(this.getUVs())),ke.AppendSerializedAnimations(this,e),e},e.prototype.getClassName=function(){return"MorphTarget"},e.Parse=function(t,n){var i=new e(t.name,t.influence);if(i.setPositions(t.positions),null!=t.id&&(i.id=t.id),t.normals&&i.setNormals(t.normals),t.tangents&&i.setTangents(t.tangents),t.uvs&&i.setUVs(t.uvs),t.animations){for(var r=0;r0&&t.texture2DArrayMaxLayerCount>1}}return Object.defineProperty(e.prototype,"areUpdatesFrozen",{get:function(){return this._blockCounter>0},set:function(e){e?this._blockCounter++:(this._blockCounter--,this._blockCounter<=0&&(this._blockCounter=0,this._syncActiveTargets(!0)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vertexCount",{get:function(){return this._vertexCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportsNormals",{get:function(){return this._supportsNormals&&this.enableNormalMorphing},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportsTangents",{get:function(){return this._supportsTangents&&this.enableTangentMorphing},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportsUVs",{get:function(){return this._supportsUVs&&this.enableUVMorphing},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numTargets",{get:function(){return this._targets.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numInfluencers",{get:function(){return this._activeTargets.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"influences",{get:function(){return this._influences},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useTextureToStoreTargets",{get:function(){return this._useTextureToStoreTargets},set:function(e){this._useTextureToStoreTargets=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUsingTextureForTargets",{get:function(){var t;return e.EnableTextureStorage&&this.useTextureToStoreTargets&&this._canUseTextureForTargets&&!(null===(t=this._scene)||void 0===t?void 0:t.getEngine().getCaps().disableMorphTargetTexture)},enumerable:!1,configurable:!0}),e.prototype.getActiveTarget=function(e){return this._activeTargets.data[e]},e.prototype.getTarget=function(e){return this._targets[e]},e.prototype.addTarget=function(e){var t=this;this._targets.push(e),this._targetInfluenceChangedObservers.push(e.onInfluenceChanged.add((function(e){t._syncActiveTargets(e)}))),this._targetDataLayoutChangedObservers.push(e._onDataLayoutChanged.add((function(){t._syncActiveTargets(!0)}))),this._syncActiveTargets(!0)},e.prototype.removeTarget=function(e){var t=this._targets.indexOf(e);t>=0&&(this._targets.splice(t,1),e.onInfluenceChanged.remove(this._targetInfluenceChangedObservers.splice(t,1)[0]),e._onDataLayoutChanged.remove(this._targetDataLayoutChangedObservers.splice(t,1)[0]),this._syncActiveTargets(!0)),this._scene&&this._scene.stopAnimation(e)},e.prototype._bind=function(e){e.setFloat3("morphTargetTextureInfo",this._textureVertexStride,this._textureWidth,this._textureHeight),e.setFloatArray("morphTargetTextureIndices",this._morphTargetTextureIndices),e.setTexture("morphTargets",this._targetStoreTexture)},e.prototype.clone=function(){for(var t=new e(this._scene),n=0,i=this._targets;nthis._scene.getEngine().getCaps().texture2DArrayMaxLayerCount&&(this.useTextureToStoreTargets=!1),this._morphTargetTextureIndices&&this._morphTargetTextureIndices.length===this._targets.length||(this._morphTargetTextureIndices=new Float32Array(this._targets.length));for(var i=-1,r=0,o=this._targets;r=e.MaxActiveMorphTargetsInVertexAttributeMode&&!this.isUsingTextureForTargets)break;this._activeTargets.push(a),this._morphTargetTextureIndices[n]=i,this._tempInfluences[n++]=a.influence,this._supportsNormals=this._supportsNormals&&a.hasNormals,this._supportsTangents=this._supportsTangents&&a.hasTangents,this._supportsUVs=this._supportsUVs&&a.hasUVs;var s=a.getPositions();if(s){var c=s.length/3;if(0===this._vertexCount)this._vertexCount=c;else if(this._vertexCount!==c)return void J.Error("Incompatible target. Targets must all have the same vertices count.")}}}this._morphTargetTextureIndices.length!==n&&(this._morphTargetTextureIndices=this._morphTargetTextureIndices.slice(0,n)),this._influences&&this._influences.length===n||(this._influences=new Float32Array(n));for(var l=0;le&&(this._textureHeight=Math.ceil(this._textureWidth/e),this._textureWidth=e);var t=!0;if(this._targetStoreTexture){var n=this._targetStoreTexture.getSize();n.width===this._textureWidth&&n.height===this._textureHeight&&this._targetStoreTexture.depth===this._targets.length&&(t=!1)}if(t){this._targetStoreTexture&&this._targetStoreTexture.dispose();for(var i=this._targets.length,r=new Float32Array(i*this._textureWidth*this._textureHeight*4),o=0,s=0;s-1&&this._parentContainer.morphTargetManagers.splice(e,1),this._parentContainer=null}for(var t=0,n=this._targets;t-1&&this._impostors.splice(t,1).length&&this.getPhysicsPlugin().removePhysicsBody(e)},e.prototype.addJoint=function(e,t,n){var i={mainImpostor:e,connectedImpostor:t,joint:n};n.physicsPlugin=this._physicsPlugin,this._joints.push(i),this._physicsPlugin.generateJoint(i)},e.prototype.removeJoint=function(e,t,n){var i=this._joints.filter((function(i){return i.connectedImpostor===t&&i.joint===n&&i.mainImpostor===e}));i.length&&this._physicsPlugin.removeJoint(i[0])},e.prototype._step=function(e){var t=this;this._impostors.forEach((function(e){e.isBodyInitRequired()&&t._physicsPlugin.generatePhysicsBody(e)})),e>.1?e=.1:e<=0&&(e=1/60),this._physicsPlugin.executeStep(e,this._impostors)},e.prototype.getPhysicsPlugin=function(){return this._physicsPlugin},e.prototype.getImpostors=function(){return this._impostors},e.prototype.getImpostorForPhysicsObject=function(e){for(var t=0;t0&&(this._physicsBodiesToRemoveAfterStep.forEach((function(t){"function"==typeof e.world.removeBody?e.world.removeBody(t):e.world.remove(t)})),this._physicsBodiesToRemoveAfterStep.length=0)},e.prototype.applyImpulse=function(e,t,n){var i=new this.BJSCANNON.Vec3(n.x,n.y,n.z),r=new this.BJSCANNON.Vec3(t.x,t.y,t.z);e.physicsBody.applyImpulse(r,i)},e.prototype.applyForce=function(e,t,n){var i=new this.BJSCANNON.Vec3(n.x,n.y,n.z),r=new this.BJSCANNON.Vec3(t.x,t.y,t.z);e.physicsBody.applyForce(r,i)},e.prototype.generatePhysicsBody=function(e){if(this._removeMarkedPhysicsBodiesFromWorld(),e.parent)e.physicsBody&&(this.removePhysicsBody(e),e.forceUpdate());else{if(e.isBodyInitRequired()){var t=this._createShape(e);if(!t)return void J.Warn("It was not possible to create a physics body for this object.");var n=e.physicsBody;n&&this.removePhysicsBody(e);var i=this._addMaterial("mat-"+e.uniqueId,e.getParam("friction"),e.getParam("restitution")),r={mass:e.getParam("mass"),material:i},o=e.getParam("nativeOptions");for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a]);e.physicsBody=new this.BJSCANNON.Body(r),e.physicsBody.addEventListener("collide",e.onCollide),this.world.addEventListener("preStep",e.beforeStep),this.world.addEventListener("postStep",e.afterStep),e.physicsBody.addShape(t),"function"==typeof this.world.addBody?this.world.addBody(e.physicsBody):this.world.add(e.physicsBody),n&&["force","torque","velocity","angularVelocity"].forEach((function(t){var i=n[t];e.physicsBody[t].set(i.x,i.y,i.z)})),this._processChildMeshes(e)}this._updatePhysicsBodyTransformation(e)}},e.prototype._processChildMeshes=function(e){var t=this,n=e.object.getChildMeshes?e.object.getChildMeshes(!0):[],i=e.object.rotationQuaternion;if(i?i.conjugateToRef(this._tmpQuaternion):this._tmpQuaternion.set(0,0,0,1),n.length){var r=function(n){if(n.rotationQuaternion){var i=n.getPhysicsImpostor();if(i&&i.parent!==e&&n.parent){var o=n.getAbsolutePosition().subtract(n.parent.getAbsolutePosition()),a=n.rotationQuaternion.multiply(t._tmpQuaternion);i.physicsBody&&(t.removePhysicsBody(i),i.physicsBody=null),i.parent=e,i.resetUpdateFlags(),e.physicsBody.addShape(t._createShape(i),new t.BJSCANNON.Vec3(o.x,o.y,o.z),new t.BJSCANNON.Quaternion(a.x,a.y,a.z,a.w)),e.physicsBody.mass+=i.getParam("mass")}n.getChildMeshes(!0).filter((function(e){return!!e.physicsImpostor})).forEach(r)}};n.filter((function(e){return!!e.physicsImpostor})).forEach(r)}},e.prototype.removePhysicsBody=function(e){e.physicsBody.removeEventListener("collide",e.onCollide),this.world.removeEventListener("preStep",e.beforeStep),this.world.removeEventListener("postStep",e.afterStep),-1===this._physicsBodiesToRemoveAfterStep.indexOf(e.physicsBody)&&this._physicsBodiesToRemoveAfterStep.push(e.physicsBody)},e.prototype.generateJoint=function(e){var t=e.mainImpostor.physicsBody,n=e.connectedImpostor.physicsBody;if(t&&n){var i,r=e.joint.jointData,o={pivotA:r.mainPivot?(new this.BJSCANNON.Vec3).set(r.mainPivot.x,r.mainPivot.y,r.mainPivot.z):null,pivotB:r.connectedPivot?(new this.BJSCANNON.Vec3).set(r.connectedPivot.x,r.connectedPivot.y,r.connectedPivot.z):null,axisA:r.mainAxis?(new this.BJSCANNON.Vec3).set(r.mainAxis.x,r.mainAxis.y,r.mainAxis.z):null,axisB:r.connectedAxis?(new this.BJSCANNON.Vec3).set(r.connectedAxis.x,r.connectedAxis.y,r.connectedAxis.z):null,maxForce:r.nativeParams.maxForce,collideConnected:!!r.collision};switch(e.joint.type){case Ko.HingeJoint:case Ko.Hinge2Joint:i=new this.BJSCANNON.HingeConstraint(t,n,o);break;case Ko.DistanceJoint:i=new this.BJSCANNON.DistanceConstraint(t,n,r.maxDistance||2);break;case Ko.SpringJoint:var a=r;i=new this.BJSCANNON.Spring(t,n,{restLength:a.length,stiffness:a.stiffness,damping:a.damping,localAnchorA:o.pivotA,localAnchorB:o.pivotB});break;case Ko.LockJoint:i=new this.BJSCANNON.LockConstraint(t,n,o);break;case Ko.PointToPointJoint:case Ko.BallAndSocketJoint:default:i=new this.BJSCANNON.PointToPointConstraint(t,o.pivotA,n,o.pivotB,o.maxForce)}i.collideConnected=!!r.collision,e.joint.physicsJoint=i,e.joint.type!==Ko.SpringJoint?this.world.addConstraint(i):(e.joint.jointData.forceApplicationCallback=e.joint.jointData.forceApplicationCallback||function(){i.applyForce()},e.mainImpostor.registerAfterPhysicsStep(e.joint.jointData.forceApplicationCallback))}},e.prototype.removeJoint=function(e){e.joint.type!==Ko.SpringJoint?this.world.removeConstraint(e.joint.physicsJoint):e.mainImpostor.unregisterAfterPhysicsStep(e.joint.jointData.forceApplicationCallback)},e.prototype._addMaterial=function(e,t,n){var i,r;for(i=0;i1e3*n));s++);this.time+=i;for(var c=this.time%n/n,l=e,u=this.bodies,h=0;h!==u.length;h++){var d=u[h];d.type!==t.Body.STATIC&&d.sleepState!==t.Body.SLEEPING?(d.position.vsub(d.previousPosition,l),l.scale(c,l),d.position.vadd(l,d.interpolatedPosition)):(d.interpolatedPosition.set(d.position.x,d.position.y,d.position.z),d.interpolatedQuaternion.set(d.quaternion.x,d.quaternion.y,d.quaternion.z,d.quaternion.w))}}}},e.prototype.raycast=function(e,t){return this._raycastResult.reset(e,t),this.raycastToRef(e,t,this._raycastResult),this._raycastResult},e.prototype.raycastToRef=function(e,t,n){this._cannonRaycastResult.reset(),this.world.raycastClosest(e,t,{},this._cannonRaycastResult),n.reset(e,t),this._cannonRaycastResult.hasHit&&(n.setHitData({x:this._cannonRaycastResult.hitNormalWorld.x,y:this._cannonRaycastResult.hitNormalWorld.y,z:this._cannonRaycastResult.hitNormalWorld.z},{x:this._cannonRaycastResult.hitPointWorld.x,y:this._cannonRaycastResult.hitPointWorld.y,z:this._cannonRaycastResult.hitPointWorld.z}),n.setHitDistance(this._cannonRaycastResult.distance))},e}();lg.DefaultPluginFactory=function(){return new ug};var hg=function(){function e(e,t,n){void 0===e&&(e=!0),void 0===n&&(n=OIMO),this._useDeltaForWorldStep=e,this.name="OimoJSPlugin",this._fixedTimeStep=1/60,this._tmpImpostorsArray=[],this._tmpPositionVector=C.Zero(),this.BJSOIMO=n,this.world=new this.BJSOIMO.World({iterations:t}),this.world.clear(),this._raycastResult=new cg}return e.prototype.getPluginVersion=function(){return 1},e.prototype.setGravity=function(e){this.world.gravity.set(e.x,e.y,e.z)},e.prototype.setTimeStep=function(e){this.world.timeStep=e},e.prototype.getTimeStep=function(){return this.world.timeStep},e.prototype.executeStep=function(e,t){var n=this;t.forEach((function(e){e.beforeStep()})),this.world.timeStep=this._useDeltaForWorldStep?e:this._fixedTimeStep,this.world.step(),t.forEach((function(e){e.afterStep(),n._tmpImpostorsArray[e.uniqueId]=e}));for(var i=this.world.contacts;null!==i;)if(!i.touching||i.body1.sleeping||i.body2.sleeping){var r=this._tmpImpostorsArray[+i.body1.name],o=this._tmpImpostorsArray[+i.body2.name];r&&o?(r.onCollide({body:o.physicsBody,point:null,distance:0,impulse:0,normal:null}),o.onCollide({body:r.physicsBody,point:null,distance:0,impulse:0,normal:null}),i=i.next):i=i.next}else i=i.next},e.prototype.applyImpulse=function(e,t,n){var i=e.physicsBody.mass;e.physicsBody.applyImpulse(n.scale(this.world.invScale),t.scale(this.world.invScale*i))},e.prototype.applyForce=function(e,t,n){J.Warn("Oimo doesn't support applying force. Using impulse instead."),this.applyImpulse(e,t,n)},e.prototype.generatePhysicsBody=function(e){var t=this;if(e.parent)e.physicsBody&&(this.removePhysicsBody(e),e.forceUpdate());else{if(e.isBodyInitRequired()){var n={name:e.uniqueId,config:[e.getParam("mass")||.001,e.getParam("friction"),e.getParam("restitution")],size:[],type:[],pos:[],posShape:[],rot:[],rotShape:[],move:0!==e.getParam("mass"),density:e.getParam("mass"),friction:e.getParam("friction"),restitution:e.getParam("restitution"),world:this.world},i=[e];(a=e.object).getChildMeshes&&a.getChildMeshes().forEach((function(e){e.physicsImpostor&&i.push(e.physicsImpostor)}));var r=function(e){return Math.max(e,m)},o=new I;i.forEach((function(i){if(i.object.rotationQuaternion){var a=i.object.rotationQuaternion;o.copyFrom(a),i.object.rotationQuaternion.set(0,0,0,1),i.object.computeWorldMatrix(!0);var s=o.toEulerAngles(),c=i.getObjectExtents(),l=57.29577951308232;if(i===e){var u=e.getObjectCenter();e.object.getAbsolutePivotPoint().subtractToRef(u,t._tmpPositionVector),t._tmpPositionVector.divideInPlace(e.object.scaling),n.pos.push(u.x),n.pos.push(u.y),n.pos.push(u.z),n.posShape.push(0,0,0),n.rotShape.push(0,0,0)}else{var h=i.object.position.clone();n.posShape.push(h.x),n.posShape.push(h.y),n.posShape.push(h.z),n.rotShape.push(s.x*l,s.y*l,s.z*l)}switch(i.object.rotationQuaternion.copyFrom(o),i.type){case ta.ParticleImpostor:J.Warn("No Particle support in OIMO.js. using SphereImpostor instead");case ta.SphereImpostor:var d=c.x,p=c.y,f=c.z,m=Math.max(r(d),r(p),r(f))/2;n.type.push("sphere"),n.size.push(m),n.size.push(m),n.size.push(m);break;case ta.CylinderImpostor:var _=r(c.x)/2,g=r(c.y);n.type.push("cylinder"),n.size.push(_),n.size.push(g),n.size.push(g);break;case ta.PlaneImpostor:case ta.BoxImpostor:default:_=r(c.x),g=r(c.y);var y=r(c.z);n.type.push("box"),n.size.push(_),n.size.push(g),n.size.push(y)}i.object.rotationQuaternion=a}})),e.physicsBody=this.world.add(n),e.physicsBody.resetQuaternion(o),e.physicsBody.updatePosition(0)}else this._tmpPositionVector.copyFromFloats(0,0,0);var a;e.setDeltaPosition(this._tmpPositionVector)}},e.prototype.removePhysicsBody=function(e){this.world.removeRigidBody(e.physicsBody)},e.prototype.generateJoint=function(e){var t=e.mainImpostor.physicsBody,n=e.connectedImpostor.physicsBody;if(t&&n){var i,r=e.joint.jointData,o=r.nativeParams||{},a={body1:t,body2:n,axe1:o.axe1||(r.mainAxis?r.mainAxis.asArray():null),axe2:o.axe2||(r.connectedAxis?r.connectedAxis.asArray():null),pos1:o.pos1||(r.mainPivot?r.mainPivot.asArray():null),pos2:o.pos2||(r.connectedPivot?r.connectedPivot.asArray():null),min:o.min,max:o.max,collision:o.collision||r.collision,spring:o.spring,world:this.world};switch(e.joint.type){case Ko.BallAndSocketJoint:i="jointBall";break;case Ko.SpringJoint:J.Warn("OIMO.js doesn't support Spring Constraint. Simulating using DistanceJoint instead");var s=r;a.min=s.length||a.min,a.max=Math.max(a.min,a.max);case Ko.DistanceJoint:i="jointDistance",a.max=r.maxDistance;break;case Ko.PrismaticJoint:i="jointPrisme";break;case Ko.SliderJoint:i="jointSlide";break;case Ko.WheelJoint:i="jointWheel";break;case Ko.HingeJoint:default:i="jointHinge"}a.type=i,e.joint.physicsJoint=this.world.add(a)}},e.prototype.removeJoint=function(e){try{this.world.removeJoint(e.joint.physicsJoint)}catch(e){J.Warn(e)}},e.prototype.isSupported=function(){return void 0!==this.BJSOIMO},e.prototype.setTransformationFromPhysicsBody=function(e){if(!e.physicsBody.sleeping){if(e.physicsBody.shapes.next){for(var t=e.physicsBody.shapes;t.next;)t=t.next;e.object.position.set(t.position.x,t.position.y,t.position.z)}else{var n=e.physicsBody.getPosition();e.object.position.set(n.x,n.y,n.z)}if(e.object.rotationQuaternion){var i=e.physicsBody.getQuaternion();e.object.rotationQuaternion.set(i.x,i.y,i.z,i.w)}}},e.prototype.setPhysicsBodyTransformation=function(e,t,n){var i=e.physicsBody;e.physicsBody.shapes.next||(i.position.set(t.x,t.y,t.z),i.orientation.set(n.x,n.y,n.z,n.w),i.syncShapes(),i.awake())},e.prototype.setLinearVelocity=function(e,t){e.physicsBody.linearVelocity.set(t.x,t.y,t.z)},e.prototype.setAngularVelocity=function(e,t){e.physicsBody.angularVelocity.set(t.x,t.y,t.z)},e.prototype.getLinearVelocity=function(e){var t=e.physicsBody.linearVelocity;return t?new C(t.x,t.y,t.z):null},e.prototype.getAngularVelocity=function(e){var t=e.physicsBody.angularVelocity;return t?new C(t.x,t.y,t.z):null},e.prototype.setBodyMass=function(e,t){var n=0===t;e.physicsBody.shapes.density=n?1:t,e.physicsBody.setupMass(n?2:1)},e.prototype.getBodyMass=function(e){return e.physicsBody.shapes.density},e.prototype.getBodyFriction=function(e){return e.physicsBody.shapes.friction},e.prototype.setBodyFriction=function(e,t){e.physicsBody.shapes.friction=t},e.prototype.getBodyRestitution=function(e){return e.physicsBody.shapes.restitution},e.prototype.setBodyRestitution=function(e,t){e.physicsBody.shapes.restitution=t},e.prototype.sleepBody=function(e){e.physicsBody.sleep()},e.prototype.wakeUpBody=function(e){e.physicsBody.awake()},e.prototype.updateDistanceJoint=function(e,t,n){e.physicsJoint.limitMotor.upperLimit=t,void 0!==n&&(e.physicsJoint.limitMotor.lowerLimit=n)},e.prototype.setMotor=function(e,t,n,i){void 0!==n?J.Warn("OimoJS plugin currently has unexpected behavior when using setMotor with force parameter"):n=1e6,t*=-1;var r=i?e.physicsJoint.rotationalLimitMotor2:e.physicsJoint.rotationalLimitMotor1||e.physicsJoint.rotationalLimitMotor||e.physicsJoint.limitMotor;r&&r.setMotor(t,n)},e.prototype.setLimit=function(e,t,n,i){var r=i?e.physicsJoint.rotationalLimitMotor2:e.physicsJoint.rotationalLimitMotor1||e.physicsJoint.rotationalLimitMotor||e.physicsJoint.limitMotor;r&&r.setLimit(t,void 0===n?-t:n)},e.prototype.syncMeshWithImpostor=function(e,t){var n=t.physicsBody;e.position.x=n.position.x,e.position.y=n.position.y,e.position.z=n.position.z,e.rotationQuaternion&&(e.rotationQuaternion.x=n.orientation.x,e.rotationQuaternion.y=n.orientation.y,e.rotationQuaternion.z=n.orientation.z,e.rotationQuaternion.w=n.orientation.w)},e.prototype.getRadius=function(e){return e.physicsBody.shapes.radius},e.prototype.getBoxSizeToRef=function(e,t){var n=e.physicsBody.shapes;t.x=2*n.halfWidth,t.y=2*n.halfHeight,t.z=2*n.halfDepth},e.prototype.dispose=function(){this.world.clear()},e.prototype.raycast=function(e,t){return J.Warn("raycast is not currently supported by the Oimo physics plugin"),this._raycastResult.reset(e,t),this._raycastResult},e.prototype.raycastToRef=function(e,t,n){J.Warn("raycast is not currently supported by the Oimo physics plugin"),n.reset(e,t)},e}(),dg=function(){function e(e,t,n){void 0===e&&(e=!0),void 0===t&&(t=Ammo),void 0===n&&(n=null);var i=this;this._useDeltaForWorldStep=e,this.bjsAMMO={},this.name="AmmoJSPlugin",this._timeStep=1/60,this._fixedTimeStep=1/60,this._maxSteps=5,this._tmpQuaternion=new I,this._tmpContactCallbackResult=!1,this._tmpContactPoint=new C,this._tmpContactNormal=new C,this._tmpVec3=new C,this._tmpMatrix=new R,"function"!=typeof t?(this.bjsAMMO=t,this.isSupported()?(this._collisionConfiguration=new this.bjsAMMO.btSoftBodyRigidBodyCollisionConfiguration,this._dispatcher=new this.bjsAMMO.btCollisionDispatcher(this._collisionConfiguration),this._overlappingPairCache=n||new this.bjsAMMO.btDbvtBroadphase,this._solver=new this.bjsAMMO.btSequentialImpulseConstraintSolver,this._softBodySolver=new this.bjsAMMO.btDefaultSoftBodySolver,this.world=new this.bjsAMMO.btSoftRigidDynamicsWorld(this._dispatcher,this._overlappingPairCache,this._solver,this._collisionConfiguration,this._softBodySolver),this._tmpAmmoConcreteContactResultCallback=new this.bjsAMMO.ConcreteContactResultCallback,this._tmpAmmoConcreteContactResultCallback.addSingleResult=function(e){var t=(e=i.bjsAMMO.wrapPointer(e,i.bjsAMMO.btManifoldPoint)).getPositionWorldOnA(),n=e.m_normalWorldOnB;i._tmpContactPoint.x=t.x(),i._tmpContactPoint.y=t.y(),i._tmpContactPoint.z=t.z(),i._tmpContactNormal.x=n.x(),i._tmpContactNormal.y=n.y(),i._tmpContactNormal.z=n.z(),i._tmpContactImpulse=e.getAppliedImpulse(),i._tmpContactDistance=e.getDistance(),i._tmpContactCallbackResult=!0},this._raycastResult=new cg,this._tmpAmmoTransform=new this.bjsAMMO.btTransform,this._tmpAmmoTransform.setIdentity(),this._tmpAmmoQuaternion=new this.bjsAMMO.btQuaternion(0,0,0,1),this._tmpAmmoVectorA=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorB=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorC=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorD=new this.bjsAMMO.btVector3(0,0,0)):J.Error("AmmoJS is not available. Please make sure you included the js file.")):J.Error("AmmoJS is not ready. Please make sure you await Ammo() before using the plugin.")}return e.prototype.getPluginVersion=function(){return 1},e.prototype.setGravity=function(e){this._tmpAmmoVectorA.setValue(e.x,e.y,e.z),this.world.setGravity(this._tmpAmmoVectorA),this.world.getWorldInfo().set_m_gravity(this._tmpAmmoVectorA)},e.prototype.setTimeStep=function(e){this._timeStep=e},e.prototype.setFixedTimeStep=function(e){this._fixedTimeStep=e},e.prototype.setMaxSteps=function(e){this._maxSteps=e},e.prototype.getTimeStep=function(){return this._timeStep},e.prototype._isImpostorInContact=function(e){return this._tmpContactCallbackResult=!1,this.world.contactTest(e.physicsBody,this._tmpAmmoConcreteContactResultCallback),this._tmpContactCallbackResult},e.prototype._isImpostorPairInContact=function(e,t){return this._tmpContactCallbackResult=!1,this.world.contactPairTest(e.physicsBody,t.physicsBody,this._tmpAmmoConcreteContactResultCallback),this._tmpContactCallbackResult},e.prototype._stepSimulation=function(e,t,n){if(void 0===e&&(e=1/60),void 0===t&&(t=10),void 0===n&&(n=1/60),0==t)this.world.stepSimulation(e,0);else for(;t>0&&e>0;)e-n0&&this._isImpostorInContact(s))for(var c=0,l=s._onPhysicsCollideCallbacks;c3?3:s;var c=(new this.bjsAMMO.btSoftBodyHelpers).CreateRope(this.world.getWorldInfo(),this._tmpAmmoVectorA,this._tmpAmmoVectorB,n-1,s);return c.get_m_cfg().set_collisions(17),c},e.prototype._createCustom=function(e){var t=null;return this.onCreateCustomShape&&(t=this.onCreateCustomShape(e)),null==t&&(t=new this.bjsAMMO.btCompoundShape),t},e.prototype._addHullVerts=function(e,t,n){var i=this,r=0;if(n&&n.getIndices&&n.getWorldMatrix&&n.getChildMeshes){var o=n.getIndices();o||(o=[]);var a=n.getVerticesData(Yn.PositionKind);a||(a=[]),n.computeWorldMatrix(!1);for(var s=o.length/3,c=0;c0){if(e.type!=ta.NoImpostor){var c=this._createShape(e,!0);c&&(this._tmpAmmoTransform.getOrigin().setValue(0,0,0),this._tmpAmmoQuaternion.setValue(0,0,0,1),this._tmpAmmoTransform.setRotation(this._tmpAmmoQuaternion),i.addChildShape(this._tmpAmmoTransform,c))}return i}this.bjsAMMO.destroy(i),i=null}switch(e.type){case ta.SphereImpostor:if(h.WithinEpsilon(o.x,o.y,1e-4)&&h.WithinEpsilon(o.x,o.z,1e-4))i=new this.bjsAMMO.btSphereShape(o.x/2);else{var l=[new this.bjsAMMO.btVector3(0,0,0)];(i=new this.bjsAMMO.btMultiSphereShape(l,[1],1)).setLocalScaling(new this.bjsAMMO.btVector3(o.x/2,o.y/2,o.z/2))}break;case ta.CapsuleImpostor:var u=o.x/2;i=new this.bjsAMMO.btCapsuleShape(u,o.y-2*u);break;case ta.CylinderImpostor:this._tmpAmmoVectorA.setValue(o.x/2,o.y/2,o.z/2),i=new this.bjsAMMO.btCylinderShape(this._tmpAmmoVectorA);break;case ta.PlaneImpostor:case ta.BoxImpostor:this._tmpAmmoVectorA.setValue(o.x/2,o.y/2,o.z/2),i=new this.bjsAMMO.btBoxShape(this._tmpAmmoVectorA);break;case ta.MeshImpostor:if(0==e.getParam("mass")){if(this.onCreateCustomMeshImpostor)i=this.onCreateCustomMeshImpostor(e);else{var d=new this.bjsAMMO.btTriangleMesh;e._pluginData.toDispose.push(d);var p=this._addMeshVerts(d,r,r);i=0==p?new this.bjsAMMO.btCompoundShape:new this.bjsAMMO.btBvhTriangleMeshShape(d)}break}case ta.ConvexHullImpostor:if(this.onCreateCustomConvexHullImpostor)i=this.onCreateCustomConvexHullImpostor(e);else{var f=new this.bjsAMMO.btConvexHullShape;0==(p=this._addHullVerts(f,r,r))?(e._pluginData.toDispose.push(f),i=new this.bjsAMMO.btCompoundShape):i=f}break;case ta.NoImpostor:i=new this.bjsAMMO.btSphereShape(o.x/2);break;case ta.CustomImpostor:i=this._createCustom(e);break;case ta.SoftbodyImpostor:i=this._createSoftbody(e);break;case ta.ClothImpostor:i=this._createCloth(e);break;case ta.RopeImpostor:i=this._createRope(e);break;default:J.Warn("The impostor type is not currently supported by the ammo plugin.")}return i},e.prototype.setTransformationFromPhysicsBody=function(e){e.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform),e.object.position.set(this._tmpAmmoTransform.getOrigin().x(),this._tmpAmmoTransform.getOrigin().y(),this._tmpAmmoTransform.getOrigin().z()),e.object.rotationQuaternion?e.object.rotationQuaternion.set(this._tmpAmmoTransform.getRotation().x(),this._tmpAmmoTransform.getRotation().y(),this._tmpAmmoTransform.getRotation().z(),this._tmpAmmoTransform.getRotation().w()):e.object.rotation&&(this._tmpQuaternion.set(this._tmpAmmoTransform.getRotation().x(),this._tmpAmmoTransform.getRotation().y(),this._tmpAmmoTransform.getRotation().z(),this._tmpAmmoTransform.getRotation().w()),this._tmpQuaternion.toEulerAnglesToRef(e.object.rotation))},e.prototype.setPhysicsBodyTransformation=function(e,t,n){var i=e.physicsBody.getWorldTransform();if(Math.abs(i.getOrigin().x()-t.x)>m||Math.abs(i.getOrigin().y()-t.y)>m||Math.abs(i.getOrigin().z()-t.z)>m||Math.abs(i.getRotation().x()-n.x)>m||Math.abs(i.getRotation().y()-n.y)>m||Math.abs(i.getRotation().z()-n.z)>m||Math.abs(i.getRotation().w()-n.w)>m)if(this._tmpAmmoVectorA.setValue(t.x,t.y,t.z),i.setOrigin(this._tmpAmmoVectorA),this._tmpAmmoQuaternion.setValue(n.x,n.y,n.z,n.w),i.setRotation(this._tmpAmmoQuaternion),e.physicsBody.setWorldTransform(i),0==e.mass){var r=e.physicsBody.getMotionState();r&&r.setWorldTransform(i)}else e.physicsBody.activate()},e.prototype.isSupported=function(){return void 0!==this.bjsAMMO},e.prototype.setLinearVelocity=function(e,t){this._tmpAmmoVectorA.setValue(t.x,t.y,t.z),e.soft?e.physicsBody.linearVelocity(this._tmpAmmoVectorA):e.physicsBody.setLinearVelocity(this._tmpAmmoVectorA)},e.prototype.setAngularVelocity=function(e,t){this._tmpAmmoVectorA.setValue(t.x,t.y,t.z),e.soft?e.physicsBody.angularVelocity(this._tmpAmmoVectorA):e.physicsBody.setAngularVelocity(this._tmpAmmoVectorA)},e.prototype.getLinearVelocity=function(e){var t;if(!(t=e.soft?e.physicsBody.linearVelocity():e.physicsBody.getLinearVelocity()))return null;var n=new C(t.x(),t.y(),t.z());return this.bjsAMMO.destroy(t),n},e.prototype.getAngularVelocity=function(e){var t;if(!(t=e.soft?e.physicsBody.angularVelocity():e.physicsBody.getAngularVelocity()))return null;var n=new C(t.x(),t.y(),t.z());return this.bjsAMMO.destroy(t),n},e.prototype.setBodyMass=function(e,t){e.soft?e.physicsBody.setTotalMass(t,!1):e.physicsBody.setMassProps(t),e._pluginData.mass=t},e.prototype.getBodyMass=function(e){return e._pluginData.mass||0},e.prototype.getBodyFriction=function(e){return e._pluginData.friction||0},e.prototype.setBodyFriction=function(e,t){e.soft?e.physicsBody.get_m_cfg().set_kDF(t):e.physicsBody.setFriction(t),e._pluginData.friction=t},e.prototype.getBodyRestitution=function(e){return e._pluginData.restitution||0},e.prototype.setBodyRestitution=function(e,t){e.physicsBody.setRestitution(t),e._pluginData.restitution=t},e.prototype.getBodyPressure=function(e){return e.soft?e._pluginData.pressure||0:(J.Warn("Pressure is not a property of a rigid body"),0)},e.prototype.setBodyPressure=function(e,t){e.soft?e.type===ta.SoftbodyImpostor?(e.physicsBody.get_m_cfg().set_kPR(t),e._pluginData.pressure=t):(e.physicsBody.get_m_cfg().set_kPR(0),e._pluginData.pressure=0):J.Warn("Pressure can only be applied to a softbody")},e.prototype.getBodyStiffness=function(e){return e.soft?e._pluginData.stiffness||0:(J.Warn("Stiffness is not a property of a rigid body"),0)},e.prototype.setBodyStiffness=function(e,t){e.soft?(t=(t=t<0?0:t)>1?1:t,e.physicsBody.get_m_materials().at(0).set_m_kLST(t),e._pluginData.stiffness=t):J.Warn("Stiffness cannot be applied to a rigid body")},e.prototype.getBodyVelocityIterations=function(e){return e.soft?e._pluginData.velocityIterations||0:(J.Warn("Velocity iterations is not a property of a rigid body"),0)},e.prototype.setBodyVelocityIterations=function(e,t){e.soft?(t=t<0?0:t,e.physicsBody.get_m_cfg().set_viterations(t),e._pluginData.velocityIterations=t):J.Warn("Velocity iterations cannot be applied to a rigid body")},e.prototype.getBodyPositionIterations=function(e){return e.soft?e._pluginData.positionIterations||0:(J.Warn("Position iterations is not a property of a rigid body"),0)},e.prototype.setBodyPositionIterations=function(e,t){e.soft?(t=t<0?0:t,e.physicsBody.get_m_cfg().set_piterations(t),e._pluginData.positionIterations=t):J.Warn("Position iterations cannot be applied to a rigid body")},e.prototype.appendAnchor=function(e,t,n,i,r,o){void 0===r&&(r=1),void 0===o&&(o=!1);var a=e.segments,s=Math.round((a-1)*n)+a*(a-1-Math.round((a-1)*i));e.physicsBody.appendAnchor(s,t.physicsBody,o,r)},e.prototype.appendHook=function(e,t,n,i,r){void 0===i&&(i=1),void 0===r&&(r=!1);var o=Math.round(e.segments*n);e.physicsBody.appendAnchor(o,t.physicsBody,r,i)},e.prototype.sleepBody=function(e){e.physicsBody.forceActivationState(0)},e.prototype.wakeUpBody=function(e){e.physicsBody.activate()},e.prototype.updateDistanceJoint=function(){J.Warn("updateDistanceJoint is not currently supported by the Ammo physics plugin")},e.prototype.setMotor=function(e,t,n){e.physicsJoint.enableAngularMotor(!0,t,n)},e.prototype.setLimit=function(){J.Warn("setLimit is not currently supported by the Ammo physics plugin")},e.prototype.syncMeshWithImpostor=function(e,t){t.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform),e.position.x=this._tmpAmmoTransform.getOrigin().x(),e.position.y=this._tmpAmmoTransform.getOrigin().y(),e.position.z=this._tmpAmmoTransform.getOrigin().z(),e.rotationQuaternion&&(e.rotationQuaternion.x=this._tmpAmmoTransform.getRotation().x(),e.rotationQuaternion.y=this._tmpAmmoTransform.getRotation().y(),e.rotationQuaternion.z=this._tmpAmmoTransform.getRotation().z(),e.rotationQuaternion.w=this._tmpAmmoTransform.getRotation().w())},e.prototype.getRadius=function(e){return e.getObjectExtents().x/2},e.prototype.getBoxSizeToRef=function(e,t){var n=e.getObjectExtents();t.x=n.x,t.y=n.y,t.z=n.z},e.prototype.dispose=function(){this.bjsAMMO.destroy(this.world),this.bjsAMMO.destroy(this._solver),this.bjsAMMO.destroy(this._overlappingPairCache),this.bjsAMMO.destroy(this._dispatcher),this.bjsAMMO.destroy(this._collisionConfiguration),this.bjsAMMO.destroy(this._tmpAmmoVectorA),this.bjsAMMO.destroy(this._tmpAmmoVectorB),this.bjsAMMO.destroy(this._tmpAmmoVectorC),this.bjsAMMO.destroy(this._tmpAmmoTransform),this.bjsAMMO.destroy(this._tmpAmmoQuaternion),this.bjsAMMO.destroy(this._tmpAmmoConcreteContactResultCallback),this.world=null},e.prototype.raycast=function(e,t){return this.raycastToRef(e,t,this._raycastResult),this._raycastResult},e.prototype.raycastToRef=function(e,t,n){this._tmpAmmoVectorRCA=new this.bjsAMMO.btVector3(e.x,e.y,e.z),this._tmpAmmoVectorRCB=new this.bjsAMMO.btVector3(t.x,t.y,t.z);var i=new this.bjsAMMO.ClosestRayResultCallback(this._tmpAmmoVectorRCA,this._tmpAmmoVectorRCB);this.world.rayTest(this._tmpAmmoVectorRCA,this._tmpAmmoVectorRCB,i),n.reset(e,t),i.hasHit()&&(n.setHitData({x:i.get_m_hitNormalWorld().x(),y:i.get_m_hitNormalWorld().y(),z:i.get_m_hitNormalWorld().z()},{x:i.get_m_hitPointWorld().x(),y:i.get_m_hitPointWorld().y(),z:i.get_m_hitPointWorld().z()}),n.calculateHitDistance()),this.bjsAMMO.destroy(i),this.bjsAMMO.destroy(this._tmpAmmoVectorRCA),this.bjsAMMO.destroy(this._tmpAmmoVectorRCB)},e._DISABLE_COLLISION_FLAG=4,e._KINEMATIC_FLAG=2,e._DISABLE_DEACTIVATION_FLAG=4,e}();o.prototype.removeReflectionProbe=function(e){if(!this.reflectionProbes)return-1;var t=this.reflectionProbes.indexOf(e);return-1!==t&&this.reflectionProbes.splice(t,1),t},o.prototype.addReflectionProbe=function(e){this.reflectionProbes||(this.reflectionProbes=[]),this.reflectionProbes.push(e)};var pg=function(){function e(e,t,n,i,r,o){void 0===i&&(i=!0),void 0===r&&(r=!1),void 0===o&&(o=!1);var s=this;if(this.name=e,this._viewMatrix=R.Identity(),this._target=C.Zero(),this._add=C.Zero(),this._invertYAxis=!1,this.position=C.Zero(),this.metadata=null,this._parentContainer=null,this._scene=n,n.getEngine().supportsUniformBuffers){this._sceneUBOs=[];for(var c=0;c<6;++c)this._sceneUBOs.push(n.createSceneUniformBuffer('Scene for Reflection Probe (name "'.concat(e,'") face #').concat(c)))}this._scene.reflectionProbes||(this._scene.reflectionProbes=[]),this._scene.reflectionProbes.push(this);var l=a.TEXTURETYPE_UNSIGNED_BYTE;if(r){var u=this._scene.getEngine().getCaps();u.textureHalfFloatRender?l=a.TEXTURETYPE_HALF_FLOAT:u.textureFloatRender&&(l=a.TEXTURETYPE_FLOAT)}this._renderTargetTexture=new rs(e,t,n,i,!0,l,!0),this._renderTargetTexture.gammaSpace=!o,this._renderTargetTexture.invertZ=n.useRightHandedSystem;var h,d=n.getEngine().useReverseDepthBuffer;this._renderTargetTexture.onBeforeRenderObservable.add((function(e){switch(s._sceneUBOs&&(n.setSceneUniformBuffer(s._sceneUBOs[e]),n.getSceneUniformBuffer().unbindEffect()),e){case 0:s._add.copyFromFloats(1,0,0);break;case 1:s._add.copyFromFloats(-1,0,0);break;case 2:s._add.copyFromFloats(0,s._invertYAxis?1:-1,0);break;case 3:s._add.copyFromFloats(0,s._invertYAxis?-1:1,0);break;case 4:s._add.copyFromFloats(0,0,n.useRightHandedSystem?-1:1);break;case 5:s._add.copyFromFloats(0,0,n.useRightHandedSystem?1:-1)}s._attachedMesh&&s.position.copyFrom(s._attachedMesh.getAbsolutePosition()),s.position.addToRef(s._add,s._target);var t=n.useRightHandedSystem?R.LookAtRHToRef:R.LookAtLHToRef,i=n.useRightHandedSystem?R.PerspectiveFovRH:R.PerspectiveFovLH;t(s.position,s._target,C.Up(),s._viewMatrix),n.activeCamera&&(s._projectionMatrix=i(Math.PI/2,1,d?n.activeCamera.maxZ:n.activeCamera.minZ,d?n.activeCamera.minZ:n.activeCamera.maxZ,s._scene.getEngine().isNDCHalfZRange),n.setTransformMatrix(s._viewMatrix,s._projectionMatrix),n.activeCamera.isRigCamera&&!s._renderTargetTexture.activeCamera&&(s._renderTargetTexture.activeCamera=n.activeCamera.rigParent||null)),n._forcedViewPosition=s.position})),this._renderTargetTexture.onBeforeBindObservable.add((function(){var t,i;s._currentSceneUBO=n.getSceneUniformBuffer(),null===(i=(t=n.getEngine())._debugPushGroup)||void 0===i||i.call(t,"reflection probe generation for ".concat(e),1),h=s._scene.imageProcessingConfiguration.applyByPostProcess,o&&(n.imageProcessingConfiguration.applyByPostProcess=!0)})),this._renderTargetTexture.onAfterUnbindObservable.add((function(){var e,t;n.imageProcessingConfiguration.applyByPostProcess=h,n._forcedViewPosition=null,s._sceneUBOs&&n.setSceneUniformBuffer(s._currentSceneUBO),n.updateTransformMatrix(!0),null===(t=(e=n.getEngine())._debugPopGroup)||void 0===t||t.call(e,1)}))}return Object.defineProperty(e.prototype,"samples",{get:function(){return this._renderTargetTexture.samples},set:function(e){this._renderTargetTexture.samples=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"refreshRate",{get:function(){return this._renderTargetTexture.refreshRate},set:function(e){this._renderTargetTexture.refreshRate=e},enumerable:!1,configurable:!0}),e.prototype.getScene=function(){return this._scene},Object.defineProperty(e.prototype,"cubeTexture",{get:function(){return this._renderTargetTexture},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderList",{get:function(){return this._renderTargetTexture.renderList},set:function(e){this._renderTargetTexture.renderList=e},enumerable:!1,configurable:!0}),e.prototype.attachToMesh=function(e){this._attachedMesh=e},e.prototype.setRenderingAutoClearDepthStencil=function(e,t){this._renderTargetTexture.setRenderingAutoClearDepthStencil(e,t)},e.prototype.dispose=function(){var e=this._scene.reflectionProbes.indexOf(this);if(-1!==e&&this._scene.reflectionProbes.splice(e,1),this._parentContainer){var t=this._parentContainer.reflectionProbes.indexOf(this);t>-1&&this._parentContainer.reflectionProbes.splice(t,1),this._parentContainer=null}if(this._renderTargetTexture&&(this._renderTargetTexture.dispose(),this._renderTargetTexture=null),this._sceneUBOs){for(var n=0,i=this._sceneUBOs;n0){var i=t._waitingData.lods.ids,r=n.isEnabled(!1);if(t._waitingData.lods.distances){var o=t._waitingData.lods.distances;if(o.length>=i.length){var a=o.length>i.length?o[o.length-1]:0;n.setEnabled(!1);for(var s=0;s0&&n.addLODLevel(a,null),!0===r&&n.setEnabled(!0)}else Pn.Warn("Invalid level of detail distances for "+t.name)}}t._waitingData.lods=null}},Tg=function(e,t,n){if("number"!=typeof e){var i=n.getLastEntryById(e);return i&&null!=t?i.instances[parseInt(t)]:i}var r=_g[e];return r&&null!=t?r.instances[parseInt(t)]:r},Eg=function(e,t){return"number"!=typeof e?t.getLastMaterialById(e,!0):gg[e]},Ag=function(e,t,n,i,r){void 0===r&&(r=!1);var a=new so(e),s="importScene has failed JSON parse";try{var c=JSON.parse(t);s="";var l=ra.loggingLevel===ra.DETAILED_LOGGING,u=void 0,h=void 0;if(void 0!==c.environmentTexture&&null!==c.environmentTexture){var d=void 0===c.isPBR||c.isPBR;if(c.environmentTextureType&&"BABYLON.HDRCubeTexture"===c.environmentTextureType){var p=c.environmentTextureSize?c.environmentTextureSize:128,f=new rg((c.environmentTexture.match(/https?:\/\//g)?"":n)+c.environmentTexture,e,p,!0,!d,void 0,c.environmentTexturePrefilterOnLoad);c.environmentTextureRotationY&&(f.rotationY=c.environmentTextureRotationY),e.environmentTexture=f}else if("object"==typeof c.environmentTexture){var m=lm.Parse(c.environmentTexture,e,n);e.environmentTexture=m}else if(c.environmentTexture.endsWith(".env")){var _=new lm((c.environmentTexture.match(/https?:\/\//g)?"":n)+c.environmentTexture,e,c.environmentTextureForcedExtension);c.environmentTextureRotationY&&(_.rotationY=c.environmentTextureRotationY),e.environmentTexture=_}else{var g=lm.CreateFromPrefilteredData((c.environmentTexture.match(/https?:\/\//g)?"":n)+c.environmentTexture,e,c.environmentTextureForcedExtension);c.environmentTextureRotationY&&(g.rotationY=c.environmentTextureRotationY),e.environmentTexture=g}if(!0===c.createDefaultSkybox){var y=void 0!==e.activeCamera&&null!==e.activeCamera?(e.activeCamera.maxZ-e.activeCamera.minZ)/2:1e3,v=c.skyboxBlurLevel||0;e.createDefaultSkybox(e.environmentTexture,d,y,v)}a.environmentTexture=e.environmentTexture}if(void 0!==c.environmentIntensity&&null!==c.environmentIntensity&&(e.environmentIntensity=c.environmentIntensity),void 0!==c.lights&&null!==c.lights)for(u=0,h=c.lights.length;u0){for(var re=0;re0){for(var ae=0;ae-1))for(var C=0,P=h.skeletons.length;C-1&&void 0!==h.morphTargetManagers&&null!==h.morphTargetManagers&&!(A.indexOf(a.morphTargetManagerId)>-1))for(var O=0,w=h.morphTargetManagers.length;O-1&&m.splice(R,1)}P._waitingParentId=null}P._waitingData.lods&&bg(t,P)}for(var O=0,w=m;O0&&(m+1)%4==0)s[m]=255;else{var T=c[m];s[m]=T/f*255}e.is3D?(e.updateSize(u,u,u),i.updateRawTexture3D(e,s,a.TEXTUREFORMAT_RGBA,!1)):(e.updateSize(u*u,u),i.updateRawTexture(e,s,a.TEXTUREFORMAT_RGBA,!1)),e.isReady=!0,n._triggerOnLoad()}},o=this.getScene();return o?o._loadFile(this.url,r):i._loadFile(this.url,r),this._texture},t.prototype._loadTexture=function(){this.url&&this.url.toLocaleLowerCase().indexOf(".3dl")==this.url.length-4&&this._load3dlTexture()},t.prototype.clone=function(){var e=new t(this.url,this.getScene()||this._getEngine());return e.level=this.level,e},t.prototype.delayLoad=function(){this.delayLoadState===a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,!0),this._texture||this._loadTexture())},t.Parse=function(e,n){var i=null;return e.name&&!e.isRenderTarget&&((i=new t(e.name,n)).name=e.name,i.level=e.level),i},t.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.level=this.level,e.customType="BABYLON.ColorGradingTexture",e},t._NoneEmptyLineRegex=/\S+/,t}(go);b("BABYLON.ColorGradingTexture",Rg);var Og=function(e){function t(t,n,i,r,o,s,c,l){void 0===r&&(r=!1),void 0===o&&(o=!0),void 0===s&&(s=null),void 0===c&&(c=null),void 0===l&&(l=!1);var u=e.call(this,n)||this;if(u._onLoad=null,u._onError=null,!t)throw new Error("Image url is not set");return u._coordinatesMode=Eo.CUBIC_MODE,u.name=t,u.url=t,u._size=i,u._supersample=l,u._noMipmap=r,u.gammaSpace=o,u._onLoad=s,u._onError=c,u.hasAlpha=!1,u.isCube=!0,u._texture=u._getFromCache(t,u._noMipmap,void 0,void 0,void 0,u.isCube),u._texture?s&&(u._texture.isReady?Pn.SetImmediate((function(){return s()})):u._texture.onLoadedObservable.add(s)):n.useDelayedTextureLoading?u.delayLoadState=a.DELAYLOADSTATE_NOTLOADED:u._loadImage((function(){return u._loadTexture()}),u._onError),u}return H(t,e),t.prototype._loadImage=function(e,t){var n=this,i=this.getScene();if(i){var r=i.getEngine().createRawCubeTexture(null,this._size,a.TEXTUREFORMAT_RGB,i.getEngine().getCaps().textureFloat?a.TEXTURETYPE_FLOAT:a.TEXTURETYPE_UNSIGNED_INTEGER,this._noMipmap,!1,a.TEXTURE_TRILINEAR_SAMPLINGMODE);r.generateMipMaps=!this._noMipmap,i.addPendingData(r),r.url=this.url,r.isReady=!1,i.getEngine()._internalTexturesCache.push(r),this._texture=r;var o=document.createElement("canvas");pn(this.url,(function(t){n._width=t.width,n._height=t.height,o.width=n._width,o.height=n._height;var i=o.getContext("2d");i.drawImage(t,0,0);var r=i.getImageData(0,0,t.width,t.height);n._buffer=r.data.buffer,o.remove(),e()}),(function(e,o){i.removePendingData(r),t&&t("".concat(n.getClassName()," could not be loaded"),o)}),i?i.offlineProvider:null)}},t.prototype._loadTexture=function(){var e=this,n=this.getScene();if(n){var i=function(){for(var n=e._getFloat32ArrayFromArrayBuffer(e._buffer),i=tg.ConvertPanoramaToCubemap(n,e._width,e._height,e._size,e._supersample),r=[],o=0;o<6;o++){var a=i[t._FacesMapping[o]];r.push(a)}return r}(),r=this._texture;n.getEngine().updateRawCubeTexture(r,i,r.format,r.type,r.invertY),r.isReady=!0,n.removePendingData(r),r.onLoadedObservable.notifyObservers(r),r.onLoadedObservable.clear(),this._onLoad&&this._onLoad()}},t.prototype._getFloat32ArrayFromArrayBuffer=function(e){for(var t=new DataView(e),n=new Float32Array(3*e.byteLength/4),i=0,r=0;rt.length)J.Error("Unable to load TGA file - Not enough data");else{n+=i.id_length;var r,o=!1,a=!1,s=!1;switch(i.image_type){case Lg:o=!0;case Mg:a=!0;break;case Fg:o=!0;case Dg:break;case Bg:o=!0;case Ng:s=!0}var c,l,u,h,d,p,f,m=i.pixel_size>>3,_=i.width*i.height*m;if(a&&(c=t.subarray(n,n+=i.colormap_length*(i.colormap_size>>3))),o){r=new Uint8Array(_);for(var g=void 0,y=void 0,v=void 0,b=0,T=new Uint8Array(m);n<_&&b<_;)if(y=1+(127&(g=t[n++])),128&g){for(v=0;v>kg){default:case Gg:l=0,h=1,f=i.width,u=0,d=1,p=i.height;break;case Vg:l=0,h=1,f=i.width,u=i.height-1,d=-1,p=-1;break;case Hg:l=i.width-1,h=-1,f=-1,u=0,d=1,p=i.height;break;case zg:l=i.width-1,h=-1,f=-1,u=i.height-1,d=-1,p=-1}var E="_getImageData"+(s?"Grey":"")+i.pixel_size+"bits",A=Xg[E](i,c,r,u,d,p,l,h,f);e.getEngine()._uploadDataToTextureDirectly(e,A)}}}var Xg={GetTGAHeader:jg,UploadContent:Wg,_getImageData8bits:function(e,t,n,i,r,o,a,s,c){var l,u,h,d=n,p=t,f=e.width,m=e.height,_=0,g=new Uint8Array(f*m*4);for(h=i;h!==o;h+=r)for(u=a;u!==c;u+=s,_++)l=d[_],g[4*(u+f*h)+3]=255,g[4*(u+f*h)+2]=p[3*l+0],g[4*(u+f*h)+1]=p[3*l+1],g[4*(u+f*h)+0]=p[3*l+2];return g},_getImageData16bits:function(e,t,n,i,r,o,a,s,c){var l,u,h,d=n,p=e.width,f=e.height,m=0,_=new Uint8Array(p*f*4);for(h=i;h!==o;h+=r)for(u=a;u!==c;u+=s,m+=2){var g=255*((31744&(l=d[m+0]+(d[m+1]<<8)))>>10)/31|0,y=255*((992&l)>>5)/31|0,v=255*(31&l)/31|0;_[4*(u+p*h)+0]=g,_[4*(u+p*h)+1]=y,_[4*(u+p*h)+2]=v,_[4*(u+p*h)+3]=32768&l?0:255}return _},_getImageData24bits:function(e,t,n,i,r,o,a,s,c){var l,u,h=n,d=e.width,p=e.height,f=0,m=new Uint8Array(d*p*4);for(u=i;u!==o;u+=r)for(l=a;l!==c;l+=s,f+=3)m[4*(l+d*u)+3]=255,m[4*(l+d*u)+2]=h[f+0],m[4*(l+d*u)+1]=h[f+1],m[4*(l+d*u)+0]=h[f+2];return m},_getImageData32bits:function(e,t,n,i,r,o,a,s,c){var l,u,h=n,d=e.width,p=e.height,f=0,m=new Uint8Array(d*p*4);for(u=i;u!==o;u+=r)for(l=a;l!==c;l+=s,f+=4)m[4*(l+d*u)+2]=h[f+0],m[4*(l+d*u)+1]=h[f+1],m[4*(l+d*u)+0]=h[f+2],m[4*(l+d*u)+3]=h[f+3];return m},_getImageDataGrey8bits:function(e,t,n,i,r,o,a,s,c){var l,u,h,d=n,p=e.width,f=e.height,m=0,_=new Uint8Array(p*f*4);for(h=i;h!==o;h+=r)for(u=a;u!==c;u+=s,m++)l=d[m],_[4*(u+p*h)+0]=l,_[4*(u+p*h)+1]=l,_[4*(u+p*h)+2]=l,_[4*(u+p*h)+3]=255;return _},_getImageDataGrey16bits:function(e,t,n,i,r,o,a,s,c){var l,u,h=n,d=e.width,p=e.height,f=0,m=new Uint8Array(d*p*4);for(u=i;u!==o;u+=r)for(l=a;l!==c;l+=s,f+=2)m[4*(l+d*u)+0]=h[f+0],m[4*(l+d*u)+1]=h[f+0],m[4*(l+d*u)+2]=h[f+0],m[4*(l+d*u)+3]=h[f+1];return m}},Yg=function(){function e(){this.supportCascades=!1}return e.prototype.canLoad=function(e){return e.endsWith(".tga")},e.prototype.loadCubeData=function(){throw".env not supported in Cube."},e.prototype.loadData=function(e,t,n){var i=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=jg(i);n(r.width,r.height,t.generateMipMaps,!1,(function(){Wg(t,i)}))},e}();Dr._TextureLoaders.push(new Yg);var qg=function(){function e(){this.supportCascades=!1}return e.prototype.canLoad=function(e){return e.endsWith(".hdr")},e.prototype.loadCubeData=function(){throw".env not supported in Cube."},e.prototype.loadData=function(e,t,n){for(var i=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=ng.RGBE_ReadHeader(i),o=ng.RGBE_ReadPixels(i,r),s=r.width*r.height,c=new Float32Array(4*s),l=0;l1;var s=oy.GetInternalFormatFromBasisFormat(t.format,n);e.format=s,iy(e,n),t.fileInfo.images[i].levels.forEach((function(t,r){n._uploadCompressedDataToTextureDirectly(e,s,t.width,t.height,t.transcodedPixels,i,r)})),!n._features.basisNeedsPOT||h.Log2(e.width)%1==0&&h.Log2(e.height)%1==0||(Pn.Warn("Loaded .basis texture width and height are not a power of two. Texture wrapping will be set to Texture.CLAMP_ADDRESSMODE as other modes are not supported with non power of two dimensions in webGL 1."),e._cachedWrapU=Eo.CLAMP_ADDRESSMODE,e._cachedWrapV=Eo.CLAMP_ADDRESSMODE)}},r=0;r>2&3],o[p++]=r[d>>4&3],o[p++]=r[d>>6&3]}}return o}(a,0,e.getImageWidth(t,n)+3&-4,e.getImageHeight(t,n)+3&-4)),a):null}onmessage=function(n){if("init"===n.data.action){if(!e){try{importScripts(n.data.url)}catch(e){postMessage({action:"error",error:e})}e=BASIS({wasmBinary:n.data.wasmBinary})}null!==e&&e.then((function(e){BASIS=e,e.initializeBasis(),postMessage({action:"init"})}))}else if("transcode"===n.data.action){var i=n.data.config,r=n.data.imageData,o=new BASIS.BasisFile(r),a=function(e){for(var t=e.getHasAlpha(),n=e.getNumImages(),i=[],r=0;r1&&t.generateMipMaps;ry(t,e),t.getEngine()._setCubeMapTextureParams(t,n),t.isReady=!0,t.onLoadedObservable.notifyObservers(t),t.onLoadedObservable.clear(),i&&i()})).catch((function(e){Pn.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"),t.isReady=!0,r&&r(e)}))}},e.prototype.loadData=function(e,t,n){var i=t.getEngine().getCaps(),r={supportedCompressionFormats:{etc1:!!i.etc1,s3tc:!!i.s3tc,pvrtc:!!i.pvrtc,etc2:!!i.etc2,astc:!!i.astc,bc7:!!i.bptc}};ny(e,r).then((function(e){var i=e.fileInfo.images[0].levels[0],r=e.fileInfo.images[0].levels.length>1&&t.generateMipMaps;n(i.width,i.height,r,-1!==e.format,(function(){ry(t,e)}))})).catch((function(e){Pn.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"),Pn.Warn("Failed to transcode Basis file: ".concat(e)),n(0,0,!1,!1,(function(){}),!0)}))},e}();Dr._TextureLoaders.push(new sy);var cy=function(e){function t(t,n,i,r,o,s){var c=this,l=!(!o||!o.generateMipMaps)&&o.generateMipMaps,u=!(!o||!o.generateDepthTexture)&&o.generateDepthTexture,h=o&&o.depthTextureFormat?o.depthTextureFormat:a.TEXTUREFORMAT_DEPTH16,d=!o||void 0===o.doNotChangeAspectRatio||o.doNotChangeAspectRatio,p=!(!o||!o.drawOnlyOnFirstAttachmentByDefault)&&o.drawOnlyOnFirstAttachmentByDefault;if(!(c=e.call(this,t,n,r,l,d,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0)||this).isSupported)return c.dispose(),c;c._textureNames=s;var f=[],m=[],_=[],g=[],y=[],v=[],b=[],T=[];c._initTypes(i,f,m,_,g,y,v,b,T,o);var E=!o||void 0===o.generateDepthBuffer||o.generateDepthBuffer,A=!(!o||void 0===o.generateStencilBuffer)&&o.generateStencilBuffer;return c._multiRenderTargetOptions={samplingModes:m,generateMipMaps:l,generateDepthBuffer:E,generateStencilBuffer:A,generateDepthTexture:u,depthTextureFormat:h,types:f,textureCount:i,useSRGBBuffers:_,formats:g,targetTypes:y,faceIndex:v,layerIndex:b,layerCounts:T,labels:s,label:t},c._count=i,c._drawOnlyOnFirstAttachmentByDefault=p,i>0&&(c._createInternalTextures(),c._createTextures(s)),c}return H(t,e),Object.defineProperty(t.prototype,"isSupported",{get:function(){var e,t;return null!==(t=null===(e=this._engine)||void 0===e?void 0:e.getCaps().drawBuffersExtension)&&void 0!==t&&t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textures",{get:function(){return this._textures},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthTexture",{get:function(){return this._textures[this._textures.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wrapU",{set:function(e){if(this._textures)for(var t=0;t=0;i--)this._textures[i]._texture=null;null===(t=this._renderTarget)||void 0===t||t.dispose(),this._renderTarget=null}},t}(rs),ly=function(e,t,n){this.id=e,this.scale=t,this.offset=n},uy=function(){function e(t,n,i,r){var o,a,s,c,l,u,h,d,p,f,m,_,g;return this.name=t,this.meshes=n,this.scene=r,this.options=i,this.options.map=null!==(o=this.options.map)&&void 0!==o?o:["ambientTexture","bumpTexture","diffuseTexture","emissiveTexture","lightmapTexture","opacityTexture","reflectionTexture","refractionTexture","specularTexture"],this.options.uvsIn=null!==(a=this.options.uvsIn)&&void 0!==a?a:Yn.UVKind,this.options.uvsOut=null!==(s=this.options.uvsOut)&&void 0!==s?s:Yn.UVKind,this.options.layout=null!==(c=this.options.layout)&&void 0!==c?c:e.LAYOUT_STRIP,this.options.layout===e.LAYOUT_COLNUM&&(this.options.colnum=null!==(l=this.options.colnum)&&void 0!==l?l:8),this.options.updateInputMeshes=null===(u=this.options.updateInputMeshes)||void 0===u||u,this.options.disposeSources=null===(h=this.options.disposeSources)||void 0===h||h,this._expecting=0,this.options.fillBlanks=null===(d=this.options.fillBlanks)||void 0===d||d,!0===this.options.fillBlanks&&(this.options.customFillColor=null!==(p=this.options.customFillColor)&&void 0!==p?p:"black"),this.options.frameSize=null!==(f=this.options.frameSize)&&void 0!==f?f:256,this.options.paddingRatio=null!==(m=this.options.paddingRatio)&&void 0!==m?m:.0115,this._paddingValue=Math.ceil(this.options.frameSize*this.options.paddingRatio),this._paddingValue%2!=0&&this._paddingValue++,this.options.paddingMode=null!==(_=this.options.paddingMode)&&void 0!==_?_:e.SUBUV_WRAP,this.options.paddingMode===e.SUBUV_COLOR&&(this.options.paddingColor=null!==(g=this.options.paddingColor)&&void 0!==g?g:new U(0,0,0,1)),this.sets={},this.frames=[],this}return e.prototype._createFrames=function(e){for(var t=this,n=this._calculateSize(),i=new S(1,1).divide(n),r=0,o=this._expecting,a=this.meshes.length,s=Object.keys(this.sets),c=0;c0)try{t._config=JSON.parse(r.response),t.updateShaderUniforms(),t.updateTextures(),t.setFragment(t._texturePath+"/custom"),t._animate=t._config.animate,t.refreshRate=t._config.refreshrate}catch(e){n()}else n()}),!1),r.addEventListener("error",(function(){n()}),!1);try{r.send()}catch(e){J.Error("CustomProceduralTexture: Error on XHR send request.")}},t.prototype.isReady=function(){if(!e.prototype.isReady.call(this))return!1;for(var t in this._textures)if(!this._textures[t].isReady())return!1;return!0},t.prototype.render=function(t){var n=this.getScene();this._animate&&n&&(this._time+=.03*n.getAnimationRatio(),this.updateShaderUniforms()),e.prototype.render.call(this,t)},t.prototype.updateTextures=function(){for(var e=0;e0&&(Xr.BindMorphTargetParameters(n,e),n.morphTargetManager.isUsingTextureForTargets&&n.morphTargetManager._bind(e))},t.prototype.replaceRepeatableContent=function(e,t,n,i){var r=this.position,o=this.normal,a=this.tangent,s=this.uv,c=this.positionOutput,l=this.normalOutput,u=this.tangentOutput,h=this.uvOutput,d=e,p=i.NUM_MORPH_INFLUENCERS,f=n.morphTargetManager,m=f&&f.supportsNormals&&i.NORMAL,_=f&&f.supportsTangents&&i.TANGENT,g=f&&f.supportsUVs&&i.UV1,y="";(null==f?void 0:f.isUsingTextureForTargets)&&p>0&&(y+="float vertexID;\n");for(var v=0;v0)for(v=0;v\(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_SAMPLERNAME_,bump\)/g,replace:""},{search:/uniform sampler2D bumpSampler;/g,replace:""},{search:/vec2 parallaxOcclusion\(vec3 vViewDirCoT,vec3 vNormalCoT,vec2 texCoord,float parallaxScale\)/g,replace:"#define inline\nvec2 parallaxOcclusion(vec3 vViewDirCoT, vec3 vNormalCoT, vec2 texCoord, float parallaxScale, sampler2D bumpSampler)"},{search:/vec2 parallaxOffset\(vec3 viewDir,float heightScale\)/g,replace:"vec2 parallaxOffset(vec3 viewDir, float heightScale, float height_)"},{search:/texture2D\(bumpSampler,vBumpUV\)\.w/g,replace:"height_"}]});var p=c&&s?"texture2D(".concat(s,", ").concat(i.associatedVariableName," + uvOffset).xyz"):this.normalMapColor.associatedVariableName;return t.compilationString+=this._declareOutput(this.output,t)+" = vec4(0.);\n",t.compilationString+=t._emitCodeFromInclude("bumpFragment",n,{replaceStrings:[{search:/texture2D\(bumpSampler,vBumpUV\)/g,replace:"".concat(p)},{search:/#define CUSTOM_FRAGMENT_BUMP_FRAGMENT/g,replace:"mat4 normalMatrix = toNormalMatrix(".concat(this.world.isConnected?this.world.associatedVariableName:this._worldMatrixName,");")},{search:/perturbNormal\(TBN,texture2D\(bumpSampler,vBumpUV\+uvOffset\).xyz,vBumpInfos.y\)/g,replace:"perturbNormal(TBN, ".concat(p,", vBumpInfos.y)")},{search:/parallaxOcclusion\(invTBN\*-viewDirectionW,invTBN\*normalW,vBumpUV,vBumpInfos.z\)/g,replace:"parallaxOcclusion((invTBN * -viewDirectionW), (invTBN * normalW), vBumpUV, vBumpInfos.z, ".concat(c&&this.useParallaxOcclusion?s:"bumpSampler",")")},{search:/parallaxOffset\(invTBN\*viewDirectionW,vBumpInfos\.z\)/g,replace:"parallaxOffset(invTBN * viewDirectionW, vBumpInfos.z, ".concat(c?this.parallaxHeight.associatedVariableName:"0.",")")},{search:/vTangentSpaceParams/g,replace:this._tangentSpaceParameterName},{search:/vBumpInfos.y/g,replace:u},{search:/vBumpInfos.z/g,replace:l},{search:/vBumpUV/g,replace:i.associatedVariableName},{search:/vPositionW/g,replace:r.associatedVariableName+".xyz"},{search:/normalW=/g,replace:this.output.associatedVariableName+".xyz = "},{search:/mat3\(normalMatrix\)\*normalW/g,replace:"mat3(normalMatrix) * "+this.output.associatedVariableName+".xyz"},{search:/normalW/g,replace:o.associatedVariableName+".xyz"},{search:/viewDirectionW/g,replace:c?this.viewDirection.associatedVariableName:"vec3(0.)"},h]}),this},t.prototype._dumpPropertiesCode=function(){var t=e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".invertX = ").concat(this.invertX,";\n");return t+="".concat(this._codeVariableName,".invertY = ").concat(this.invertY,";\n"),(t+="".concat(this._codeVariableName,".useParallaxOcclusion = ").concat(this.useParallaxOcclusion,";\n"))+"".concat(this._codeVariableName,".useObjectSpaceNormalMap = ").concat(this.useObjectSpaceNormalMap,";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.invertX=this.invertX,t.invertY=this.invertY,t.useParallaxOcclusion=this.useParallaxOcclusion,t.useObjectSpaceNormalMap=this.useObjectSpaceNormalMap,t},t.prototype._deserialize=function(t,n,i){e.prototype._deserialize.call(this,t,n,i),this.invertX=t.invertX,this.invertY=t.invertY,this.useParallaxOcclusion=!!t.useParallaxOcclusion,this.useObjectSpaceNormalMap=!!t.useObjectSpaceNormalMap},W([ma("Invert X axis",pa.Boolean,"PROPERTIES",{notifiers:{update:!1}})],t.prototype,"invertX",void 0),W([ma("Invert Y axis",pa.Boolean,"PROPERTIES",{notifiers:{update:!1}})],t.prototype,"invertY",void 0),W([ma("Use parallax occlusion",pa.Boolean)],t.prototype,"useParallaxOcclusion",void 0),W([ma("Object Space Mode",pa.Boolean,"PROPERTIES",{notifiers:{update:!1}})],t.prototype,"useObjectSpaceNormalMap",void 0),t}(ha);b("BABYLON.PerturbNormalBlock",xy);var Sy=function(e){function t(t){var n=e.call(this,t,ia.Fragment,!0)||this;return n.registerInput("value",na.Float,!0),n.registerInput("cutoff",na.Float,!0),n}return H(t,e),t.prototype.getClassName=function(){return"DiscardBlock"},Object.defineProperty(t.prototype,"value",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cutoff",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){if(e.prototype._buildBlock.call(this,t),t.sharedData.hints.needAlphaTesting=!0,this.cutoff.isConnected&&this.value.isConnected)return t.compilationString+="if (".concat(this.value.associatedVariableName," < ").concat(this.cutoff.associatedVariableName,") discard;\n"),this},t}(ha);b("BABYLON.DiscardBlock",Sy);var Cy=function(e){function t(t){var n=e.call(this,t,ia.Fragment)||this;return n.registerOutput("output",na.Float,ia.Fragment),n}return H(t,e),t.prototype.getClassName=function(){return"FrontFacingBlock"},Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){if(e.prototype._buildBlock.call(this,t),t.target===ia.Vertex)throw"FrontFacingBlock must only be used in a fragment shader";var n=this._outputs[0];return t.compilationString+=this._declareOutput(n,t)+" = gl_FrontFacing ? 1.0 : 0.0;\n",this},t}(ha);b("BABYLON.FrontFacingBlock",Cy);var Py=function(e){function t(t){var n=e.call(this,t,ia.Fragment)||this;return n.registerInput("input",na.AutoDetect,!1),n.registerOutput("dx",na.BasedOnInput),n.registerOutput("dy",na.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n._outputs[1]._typeConnectionSource=n._inputs[0],n}return H(t,e),t.prototype.getClassName=function(){return"DerivativeBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dx",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dy",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this._outputs[0],i=this._outputs[1];return t._emitExtension("derivatives","#extension GL_OES_standard_derivatives : enable"),n.hasEndpoints&&(t.compilationString+=this._declareOutput(n,t)+" = dFdx(".concat(this.input.associatedVariableName,");\n")),i.hasEndpoints&&(t.compilationString+=this._declareOutput(i,t)+" = dFdy(".concat(this.input.associatedVariableName,");\n")),this},t}(ha);b("BABYLON.DerivativeBlock",Py);var Iy=function(e){function t(t){var n=e.call(this,t,ia.Fragment)||this;return n.registerOutput("xy",na.Vector2,ia.Fragment),n.registerOutput("xyz",na.Vector3,ia.Fragment),n.registerOutput("xyzw",na.Vector4,ia.Fragment),n.registerOutput("x",na.Float,ia.Fragment),n.registerOutput("y",na.Float,ia.Fragment),n.registerOutput("z",na.Float,ia.Fragment),n.registerOutput("w",na.Float,ia.Fragment),n}return H(t,e),t.prototype.getClassName=function(){return"FragCoordBlock"},Object.defineProperty(t.prototype,"xy",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyz",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyzw",{get:function(){return this._outputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this._outputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._outputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"z",{get:function(){return this._outputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[6]},enumerable:!1,configurable:!0}),t.prototype.writeOutputs=function(e){for(var t="",n=0,i=this._outputs;n=0;Xr.PrepareUniformsAndSamplersForLight(r,e.uniforms,e.samplers,n["PROJECTEDLIGHTTEXTURE"+r],i,o)}},t.prototype.bind=function(e,t,n){if(n){var i=n.getScene();this.light?Xr.BindLight(this.light,this._lightId,i,e,!0):Xr.BindLights(i,n,e,!0,t.maxSimultaneousLights)}},t.prototype._injectVertexCode=function(e){var t=this.worldPosition,n="//".concat(this.name);this.light?(this._lightId=(void 0!==e.counters.lightCounter?e.counters.lightCounter:-1)+1,e.counters.lightCounter=this._lightId,e._emitFunctionFromInclude(e.supportUniformBuffers?"lightVxUboDeclaration":"lightVxFragmentDeclaration",n,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString())):(e._emitFunctionFromInclude(e.supportUniformBuffers?"lightVxUboDeclaration":"lightVxFragmentDeclaration",n,{repeatKey:"maxSimultaneousLights"}),this._lightId=0,e.sharedData.dynamicUniformBlocks.push(this));var i="v_"+t.associatedVariableName;e._emitVaryingFromString(i,"vec4")&&(e.compilationString+="".concat(i," = ").concat(t.associatedVariableName,";\n")),this.light?e.compilationString+=e._emitCodeFromInclude("shadowsVertex",n,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()},{search:/worldPos/g,replace:t.associatedVariableName}]}):(e.compilationString+="vec4 worldPos = ".concat(t.associatedVariableName,";\n"),this.view.isConnected&&(e.compilationString+="mat4 view = ".concat(this.view.associatedVariableName,";\n")),e.compilationString+=e._emitCodeFromInclude("shadowsVertex",n,{repeatKey:"maxSimultaneousLights"}))},t.prototype._buildBlock=function(t){if(e.prototype._buildBlock.call(this,t),t.target===ia.Fragment){this.generateOnlyFragmentCode&&t.sharedData.dynamicUniformBlocks.push(this),t.sharedData.forcedBindableBlocks.push(this),t.sharedData.blocksWithDefines.push(this);var n="//".concat(this.name),i=this.worldPosition,r=i.associatedVariableName;this.generateOnlyFragmentCode?(r=t._getFreeVariableName("globalWorldPos"),t._emitFunction("light_globalworldpos","vec3 ".concat(r,";\n"),n),t.compilationString+="".concat(r," = ").concat(i.associatedVariableName,".xyz;\n"),t.compilationString+=t._emitCodeFromInclude("shadowsVertex",n,{repeatKey:"maxSimultaneousLights",substitutionVars:this.generateOnlyFragmentCode?"worldPos,".concat(i.associatedVariableName):void 0})):r="v_"+r+".xyz",t._emitFunctionFromInclude("helperFunctions",n),t._emitFunctionFromInclude("lightsFragmentFunctions",n,{replaceStrings:[{search:/vPositionW/g,replace:r}]}),t._emitFunctionFromInclude("shadowsFragmentFunctions",n,{replaceStrings:[{search:/vPositionW/g,replace:r}]}),this.light?t._emitFunctionFromInclude(t.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",n,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString()):t._emitFunctionFromInclude(t.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",n,{repeatKey:"maxSimultaneousLights",substitutionVars:this.generateOnlyFragmentCode?"varying,":void 0}),0===this._lightId&&(t._registerTempVariable("viewDirectionW")&&(t.compilationString+="vec3 viewDirectionW = normalize(".concat(this.cameraPosition.associatedVariableName," - ").concat(r,");\n")),t.compilationString+="lightingInfo info;\n",t.compilationString+="float shadow = 1.;\n",t.compilationString+="float aggShadow = 0.;\n",t.compilationString+="float numLights = 0.;\n",t.compilationString+="float glossiness = ".concat(this.glossiness.isConnected?this.glossiness.associatedVariableName:"1.0"," * ").concat(this.glossPower.isConnected?this.glossPower.associatedVariableName:"1024.0",";\n"),t.compilationString+="vec3 diffuseBase = vec3(0., 0., 0.);\n",t.compilationString+="vec3 specularBase = vec3(0., 0., 0.);\n",t.compilationString+="vec3 normalW = ".concat(this.worldNormal.associatedVariableName,".xyz;\n")),this.light?t.compilationString+=t._emitCodeFromInclude("lightFragment",n,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()},{search:/vPositionW/g,replace:r+".xyz"}]}):t.compilationString+=t._emitCodeFromInclude("lightFragment",n,{repeatKey:"maxSimultaneousLights",substitutionVars:"vPositionW,".concat(r,".xyz")}),0===this._lightId&&(t.compilationString+="aggShadow = aggShadow / numLights;\n");var o=this.diffuseOutput,a=this.specularOutput;return t.compilationString+=this._declareOutput(o,t)+" = diffuseBase".concat(this.diffuseColor.isConnected?" * "+this.diffuseColor.associatedVariableName:"",";\n"),a.hasEndpoints&&(t.compilationString+=this._declareOutput(a,t)+" = specularBase".concat(this.specularColor.isConnected?" * "+this.specularColor.associatedVariableName:"",";\n")),this.shadow.hasEndpoints&&(t.compilationString+=this._declareOutput(this.shadow,t)+" = aggShadow;\n"),this}this._injectVertexCode(t)},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.generateOnlyFragmentCode=this.generateOnlyFragmentCode,this.light&&(t.lightId=this.light.id),t},t.prototype._deserialize=function(t,n,i){e.prototype._deserialize.call(this,t,n,i),t.lightId&&(this.light=n.getLightById(t.lightId)),this.generateOnlyFragmentCode=t.generateOnlyFragmentCode,this._setTarget()},W([ma("Generate only fragment code",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0,update:!0,onValidation:t._OnGenerateOnlyFragmentCodeChanged}})],t.prototype,"generateOnlyFragmentCode",void 0),t}(ha);b("BABYLON.LightBlock",By);var Uy=function(e){function t(n){var i=e.call(this,n,ia.VertexAndFragment)||this;return i.registerOutput("source",na.Object,ia.VertexAndFragment,new gy("source",i,sa.Output,t,"ImageSourceBlock")),i}return H(t,e),Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(e){var t,n=this;if(this._texture!==e){var i=null!==(t=null==e?void 0:e.getScene())&&void 0!==t?t:A.LastCreatedScene;!e&&i&&i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(n._texture)})),this._texture=e,e&&i&&i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(t){return t.hasTexture(e)}))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"samplerName",{get:function(){return this._samplerName},enumerable:!1,configurable:!0}),t.prototype.bind=function(e){this.texture&&e.setTexture(this._samplerName,this.texture)},t.prototype.isReady=function(){return!(this.texture&&!this.texture.isReadyOrNotBlocking())},t.prototype.getClassName=function(){return"ImageSourceBlock"},Object.defineProperty(t.prototype,"source",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){return e.prototype._buildBlock.call(this,t),t.target===ia.Vertex&&(this._samplerName=t._getFreeVariableName(this.name+"Sampler"),t.sharedData.blockingBlocks.push(this),t.sharedData.textureBlocks.push(this),t.sharedData.bindableBlocks.push(this)),t._emit2DSampler(this._samplerName),this},t.prototype._dumpPropertiesCode=function(){var t=e.prototype._dumpPropertiesCode.call(this);return this.texture?(t+="".concat(this._codeVariableName,'.texture = new BABYLON.Texture("').concat(this.texture.name,'", null, ').concat(this.texture.noMipmap,", ").concat(this.texture.invertY,", ").concat(this.texture.samplingMode,");\n"),t+="".concat(this._codeVariableName,".texture.wrapU = ").concat(this.texture.wrapU,";\n"),t+="".concat(this._codeVariableName,".texture.wrapV = ").concat(this.texture.wrapV,";\n"),t+="".concat(this._codeVariableName,".texture.uAng = ").concat(this.texture.uAng,";\n"),t+="".concat(this._codeVariableName,".texture.vAng = ").concat(this.texture.vAng,";\n"),t+="".concat(this._codeVariableName,".texture.wAng = ").concat(this.texture.wAng,";\n"),t+="".concat(this._codeVariableName,".texture.uOffset = ").concat(this.texture.uOffset,";\n"),t+="".concat(this._codeVariableName,".texture.vOffset = ").concat(this.texture.vOffset,";\n"),t+="".concat(this._codeVariableName,".texture.uScale = ").concat(this.texture.uScale,";\n"),t+="".concat(this._codeVariableName,".texture.vScale = ").concat(this.texture.vScale,";\n"),t+="".concat(this._codeVariableName,".texture.coordinatesMode = ").concat(this.texture.coordinatesMode,";\n")):t},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return this.texture&&!this.texture.isRenderTarget&&"VideoTexture"!==this.texture.getClassName()&&(t.texture=this.texture.serialize()),t},t.prototype._deserialize=function(t,n,i){e.prototype._deserialize.call(this,t,n,i),t.texture&&!hs.IgnoreTexturesAtLoadTime&&void 0!==t.texture.url&&(i=0===t.texture.url.indexOf("data:")?"":i,this.texture=Eo.Parse(t.texture,n,i))},t}(ha);b("BABYLON.ImageSourceBlock",Uy);var ky=function(e){function t(t,n){void 0===n&&(n=!1);var i=e.call(this,t,n?ia.Fragment:ia.VertexAndFragment)||this;return i._convertToGammaSpace=!1,i._convertToLinearSpace=!1,i.disableLevelMultiplication=!1,i._fragmentOnly=n,i.registerInput("uv",na.AutoDetect,!1,ia.VertexAndFragment),i.registerInput("source",na.Object,!0,ia.VertexAndFragment,new gy("source",i,sa.Input,Uy,"ImageSourceBlock")),i.registerInput("layer",na.Float,!0),i.registerInput("lod",na.Float,!0),i.registerOutput("rgba",na.Color4,ia.Neutral),i.registerOutput("rgb",na.Color3,ia.Neutral),i.registerOutput("r",na.Float,ia.Neutral),i.registerOutput("g",na.Float,ia.Neutral),i.registerOutput("b",na.Float,ia.Neutral),i.registerOutput("a",na.Float,ia.Neutral),i.registerOutput("level",na.Float,ia.Neutral),i._inputs[0].addExcludedConnectionPointFromAllowedTypes(na.Vector2|na.Vector3|na.Vector4),i._inputs[0]._prioritizeVertex=!n,i}return H(t,e),Object.defineProperty(t.prototype,"texture",{get:function(){var e;return this.source.isConnected?(null===(e=this.source.connectedPoint)||void 0===e?void 0:e.ownerBlock).texture:this._texture},set:function(e){var t,n=this;if(this._texture!==e){var i=null!==(t=null==e?void 0:e.getScene())&&void 0!==t?t:A.LastCreatedScene;!e&&i&&i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(n._texture)})),this._texture=e,e&&i&&i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(t){return t.hasTexture(e)}))}},enumerable:!1,configurable:!0}),t._IsPrePassTextureBlock=function(e){return"PrePassTextureBlock"===(null==e?void 0:e.getClassName())},Object.defineProperty(t.prototype,"_isSourcePrePass",{get:function(){return t._IsPrePassTextureBlock(this._imageSource)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"samplerName",{get:function(){if(this._imageSource){if(!t._IsPrePassTextureBlock(this._imageSource))return this._imageSource.samplerName;if(this.source.connectedPoint)return this._imageSource.getSamplerName(this.source.connectedPoint)}return this._samplerName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasImageSource",{get:function(){return this.source.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"convertToGammaSpace",{get:function(){return this._convertToGammaSpace},set:function(e){var t,n=this;if(e!==this._convertToGammaSpace&&(this._convertToGammaSpace=e,this.texture)){var i=null!==(t=this.texture.getScene())&&void 0!==t?t:A.LastCreatedScene;null==i||i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(n.texture)}))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"convertToLinearSpace",{get:function(){return this._convertToLinearSpace},set:function(e){var t,n=this;if(e!==this._convertToLinearSpace&&(this._convertToLinearSpace=e,this.texture)){var i=null!==(t=this.texture.getScene())&&void 0!==t?t:A.LastCreatedScene;null==i||i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(n.texture)}))}},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"TextureBlock"},Object.defineProperty(t.prototype,"uv",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layer",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lod",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgb",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"r",{get:function(){return this._outputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this._outputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this._outputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this._outputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"level",{get:function(){return this._outputs[6]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){if(this._fragmentOnly)return ia.Fragment;if(!this.uv.isConnected)return ia.VertexAndFragment;if(this.uv.sourceBlock.isInput)return ia.VertexAndFragment;for(var e=this.uv.connectedPoint;e;){if(e.target===ia.Fragment)return ia.Fragment;if(e.target===ia.Vertex)return ia.VertexAndFragment;if(e.target===ia.Neutral||e.target===ia.VertexAndFragment){var t=e.ownerBlock;if(t.target===ia.Fragment)return ia.Fragment;e=null;for(var n=0,i=t.inputs;n "+this.name},t.prototype.detachFromEndpoint=function(e){var t=this._endpoints.indexOf(e);-1!==t&&(this._endpoints.splice(t,1),e._outputs[0]._typeConnectionSource=null,e._entryPoint=null)},t.prototype.dispose=function(){e.prototype.dispose.call(this);for(var t=0,n=this._endpoints;t0&&(t.compilationString+=", "),n._inputSamplers&&-1!==n._inputSamplers.indexOf(e.name)?t.compilationString+=null!==(s=null===(a=null===(r=e.connectedPoint)||void 0===r?void 0:r.ownerBlock)||void 0===a?void 0:a.samplerName)&&void 0!==s?s:e.associatedVariableName:t.compilationString+=e.associatedVariableName,o=!0})),this._outputs.forEach((function(e,n){(n>0||o)&&(t.compilationString+=", "),t.compilationString+=e.associatedVariableName})),t.compilationString+=");\n",this},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".options = ").concat(JSON.stringify(this._options),";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.options=this._options,t},t.prototype._deserialize=function(t,n,i){this._deserializeOptions(t.options),e.prototype._deserialize.call(this,t,n,i)},t.prototype._deserializeOptions=function(e){var t,n,i,r=this;this._options=e,this._code=e.code.join("\n")+"\n",this.name=this.name||e.name,this.target=ia[e.target],null===(t=e.inParameters)||void 0===t||t.forEach((function(e,t){var n=na[e.type];"sampler2D"===e.type||"samplerCube"===e.type?(r._inputSamplers=r._inputSamplers||[],r._inputSamplers.push(e.name),r.registerInput(e.name,na.Object,!0,ia.VertexAndFragment,new gy(e.name,r,sa.Input,Uy,"ImageSourceBlock"))):r.registerInput(e.name,n),Object.defineProperty(r,e.name,{get:function(){return this._inputs[t]},enumerable:!0,configurable:!0})})),null===(n=e.outParameters)||void 0===n||n.forEach((function(e,t){r.registerOutput(e.name,na[e.type]),Object.defineProperty(r,e.name,{get:function(){return this._outputs[t]},enumerable:!0,configurable:!0}),"BasedOnInput"===e.type&&(r._outputs[t]._typeConnectionSource=r._findInputByName(e.typeFromInput)[0])})),null===(i=e.inLinkedConnectionTypes)||void 0===i||i.forEach((function(e){r._linkConnectionTypes(r._findInputByName(e.input1)[1],r._findInputByName(e.input2)[1])}))},t.prototype._findInputByName=function(e){if(!e)return null;for(var t=0;t=0;Xr.PrepareUniformsAndSamplersForLight(r,e.uniforms,e.samplers,n["PROJECTEDLIGHTTEXTURE"+r],i,o)}},t.prototype.isReady=function(e,t,n){return!(this._environmentBRDFTexture&&!this._environmentBRDFTexture.isReady()||n._areImageProcessingDirty&&t.imageProcessingConfiguration&&!t.imageProcessingConfiguration.isReady())},t.prototype.bind=function(e,t,n){var i,r;if(n){var o=n.getScene();this.light?Xr.BindLight(this.light,this._lightId,o,e,!0):Xr.BindLights(o,n,e,!0,t.maxSimultaneousLights),e.setTexture(this._environmentBrdfSamplerName,this._environmentBRDFTexture),e.setFloat2("vDebugMode",this.debugLimit,this.debugFactor);var a=this._scene.ambientColor;a&&e.setColor3("ambientFromScene",a);var s=o.useRightHandedSystem===(null!=o._mirroredCameraPosition);e.setFloat(this._invertNormalName,s?-1:1),e.setFloat4("vLightingIntensity",this.directIntensity,1,this.environmentIntensity*this._scene.environmentIntensity,this.specularIntensity);var c=null!==(r=null===(i=this.indexOfRefraction.connectInputBlock)||void 0===i?void 0:i.value)&&void 0!==r?r:1.5,l=Math.pow((c-1)/(c+1),2);this._metallicReflectanceColor.scaleToRef(l*this._metallicF0Factor,k.Color3[0]);var u=this._metallicF0Factor;e.setColor4(this._vMetallicReflectanceFactorsName,k.Color3[0],u),t.imageProcessingConfiguration&&t.imageProcessingConfiguration.bind(e)}},t.prototype._injectVertexCode=function(e){var t,n,i=this.worldPosition,r="//".concat(this.name);this.light?(this._lightId=(void 0!==e.counters.lightCounter?e.counters.lightCounter:-1)+1,e.counters.lightCounter=this._lightId,e._emitFunctionFromInclude(e.supportUniformBuffers?"lightVxUboDeclaration":"lightVxFragmentDeclaration",r,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString())):(e._emitFunctionFromInclude(e.supportUniformBuffers?"lightVxUboDeclaration":"lightVxFragmentDeclaration",r,{repeatKey:"maxSimultaneousLights"}),this._lightId=0,e.sharedData.dynamicUniformBlocks.push(this));var o="v_"+i.associatedVariableName;e._emitVaryingFromString(o,"vec4")&&(e.compilationString+="".concat(o," = ").concat(i.associatedVariableName,";\n"));var a=this.reflection.isConnected?null===(t=this.reflection.connectedPoint)||void 0===t?void 0:t.ownerBlock:null;a&&(a.viewConnectionPoint=this.view),e.compilationString+=null!==(n=null==a?void 0:a.handleVertexSide(e))&&void 0!==n?n:"",e._emitVaryingFromString("vClipSpacePosition","vec4","defined(IGNORE) || DEBUGMODE > 0")&&(e._injectAtEnd+="#if DEBUGMODE > 0\n",e._injectAtEnd+="vClipSpacePosition = gl_Position;\n",e._injectAtEnd+="#endif\n"),this.light?e.compilationString+=e._emitCodeFromInclude("shadowsVertex",r,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()},{search:/worldPos/g,replace:i.associatedVariableName}]}):(e.compilationString+="vec4 worldPos = ".concat(i.associatedVariableName,";\n"),this.view.isConnected&&(e.compilationString+="mat4 view = ".concat(this.view.associatedVariableName,";\n")),e.compilationString+=e._emitCodeFromInclude("shadowsVertex",r,{repeatKey:"maxSimultaneousLights"}))},t.prototype._getAlbedoOpacityCode=function(){var e=this.baseColor.isConnected?this.baseColor.associatedVariableName:"vec3(1.)",t=this.opacity.isConnected?this.opacity.associatedVariableName:"1.";return"albedoOpacityOutParams albedoOpacityOut;\n"+"albedoOpacityBlock(\n vec4(".concat(e,", 1.),\n #ifdef ALBEDO\n vec4(1.),\n vec2(1., 1.),\n #endif\n #ifdef OPACITY\n vec4(").concat(t,"),\n vec2(1., 1.),\n #endif\n albedoOpacityOut\n );\n\n vec3 surfaceAlbedo = albedoOpacityOut.surfaceAlbedo;\n float alpha = albedoOpacityOut.alpha;\n")},t.prototype._getAmbientOcclusionCode=function(){var e=this.ambientOcc.isConnected?this.ambientOcc.associatedVariableName:"1.";return"ambientOcclusionOutParams aoOut;\n"+"ambientOcclusionBlock(\n #ifdef AMBIENT\n vec3(".concat(e,"),\n vec4(0., 1.0, 1.0, 0.),\n #endif\n aoOut\n );\n")},t.prototype._getReflectivityCode=function(e){return this._vMetallicReflectanceFactorsName=e._getFreeVariableName("vMetallicReflectanceFactors"),e._emitUniformFromString(this._vMetallicReflectanceFactorsName,"vec4"),"reflectivityOutParams reflectivityOut;\n"+"vec3 baseColor = surfaceAlbedo;\n\n reflectivityBlock(\n vec4(".concat(this.metallic.associatedVariableName,", ").concat(this.roughness.associatedVariableName,", 0., 0.),\n #ifdef METALLICWORKFLOW\n surfaceAlbedo,\n ").concat(this._vMetallicReflectanceFactorsName,",\n #endif\n #ifdef REFLECTIVITY\n vec3(0., 0., ").concat("1.","),\n vec4(1.),\n #endif\n #if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED)\n aoOut.ambientOcclusionColor,\n #endif\n #ifdef MICROSURFACEMAP\n microSurfaceTexel, <== not handled!\n #endif\n reflectivityOut\n );\n\n float microSurface = reflectivityOut.microSurface;\n float roughness = reflectivityOut.roughness;\n\n #ifdef METALLICWORKFLOW\n surfaceAlbedo = reflectivityOut.surfaceAlbedo;\n #endif\n #if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED)\n aoOut.ambientOcclusionColor = reflectivityOut.ambientOcclusionColor;\n #endif\n")},t.prototype._buildBlock=function(t){var n,i,r,o,a,s,c,l,u,h,d,p,f,m,_,g,y,v,b,T,E,A,x,S,C,P,I,R,O,w,M,D,N,L,F,B,U,k,V,z,G;e.prototype._buildBlock.call(this,t),this._scene=t.sharedData.scene,this._environmentBRDFTexture||(this._environmentBRDFTexture=_m(this._scene));var H=this.reflection.isConnected?null===(n=this.reflection.connectedPoint)||void 0===n?void 0:n.ownerBlock:null;if(H&&(H.worldPositionConnectionPoint=this.worldPosition,H.cameraPositionConnectionPoint=this.cameraPosition,H.worldNormalConnectionPoint=this.worldNormal,H.viewConnectionPoint=this.view),t.target!==ia.Fragment)return this._injectVertexCode(t),this;t.sharedData.forcedBindableBlocks.push(this),t.sharedData.blocksWithDefines.push(this),t.sharedData.blockingBlocks.push(this),this.generateOnlyFragmentCode&&t.sharedData.dynamicUniformBlocks.push(this);var j="//".concat(this.name),W=this.perturbedNormal,X=this.worldPosition.associatedVariableName;this.generateOnlyFragmentCode?(X=t._getFreeVariableName("globalWorldPos"),t._emitFunction("pbr_globalworldpos","vec3 ".concat(X,";\n"),j),t.compilationString+="".concat(X," = ").concat(this.worldPosition.associatedVariableName,".xyz;\n"),t.compilationString+=t._emitCodeFromInclude("shadowsVertex",j,{repeatKey:"maxSimultaneousLights",substitutionVars:this.generateOnlyFragmentCode?"worldPos,".concat(this.worldPosition.associatedVariableName):void 0}),t.compilationString+="#if DEBUGMODE > 0\n",t.compilationString+="vec4 vClipSpacePosition = vec4((vec2(gl_FragCoord.xy) / vec2(1.0)) * 2.0 - 1.0, 0.0, 1.0);\n",t.compilationString+="#endif\n"):X="v_"+X,this._environmentBrdfSamplerName=t._getFreeVariableName("environmentBrdfSampler"),t._emit2DSampler(this._environmentBrdfSamplerName),t.sharedData.hints.needAlphaBlending=t.sharedData.hints.needAlphaBlending||this.useAlphaBlending,t.sharedData.hints.needAlphaTesting=t.sharedData.hints.needAlphaTesting||this.useAlphaTest,t._emitExtension("lod","#extension GL_EXT_shader_texture_lod : enable","defined(LODBASEDMICROSFURACE)"),t._emitExtension("derivatives","#extension GL_OES_standard_derivatives : enable"),t._emitUniformFromString("vDebugMode","vec2","defined(IGNORE) || DEBUGMODE > 0"),t._emitUniformFromString("ambientFromScene","vec3"),t.uniforms.push("exposureLinear"),t.uniforms.push("contrast"),t.uniforms.push("vInverseScreenSize"),t.uniforms.push("vignetteSettings1"),t.uniforms.push("vignetteSettings2"),t.uniforms.push("vCameraColorCurveNegative"),t.uniforms.push("vCameraColorCurveNeutral"),t.uniforms.push("vCameraColorCurvePositive"),t.uniforms.push("txColorTransform"),t.uniforms.push("colorTransformSettings"),t.uniforms.push("ditherIntensity"),this.light?t._emitFunctionFromInclude(t.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",j,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString()):t._emitFunctionFromInclude(t.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",j,{repeatKey:"maxSimultaneousLights",substitutionVars:this.generateOnlyFragmentCode?"varying,":void 0}),t._emitFunctionFromInclude("helperFunctions",j),t._emitFunctionFromInclude("importanceSampling",j),t._emitFunctionFromInclude("pbrHelperFunctions",j),t._emitFunctionFromInclude("imageProcessingDeclaration",j),t._emitFunctionFromInclude("imageProcessingFunctions",j),t._emitFunctionFromInclude("shadowsFragmentFunctions",j),t._emitFunctionFromInclude("pbrDirectLightingSetupFunctions",j,{replaceStrings:[{search:/vPositionW/g,replace:X+".xyz"}]}),t._emitFunctionFromInclude("pbrDirectLightingFalloffFunctions",j),t._emitFunctionFromInclude("pbrBRDFFunctions",j,{replaceStrings:[{search:/REFLECTIONMAP_SKYBOX/g,replace:null!==(i=null==H?void 0:H._defineSkyboxName)&&void 0!==i?i:"REFLECTIONMAP_SKYBOX"}]}),t._emitFunctionFromInclude("hdrFilteringFunctions",j),t._emitFunctionFromInclude("pbrDirectLightingFunctions",j,{replaceStrings:[{search:/vPositionW/g,replace:X+".xyz"}]}),t._emitFunctionFromInclude("pbrIBLFunctions",j),t._emitFunctionFromInclude("pbrBlockAlbedoOpacity",j),t._emitFunctionFromInclude("pbrBlockReflectivity",j),t._emitFunctionFromInclude("pbrBlockAmbientOcclusion",j),t._emitFunctionFromInclude("pbrBlockAlphaFresnel",j),t._emitFunctionFromInclude("pbrBlockAnisotropic",j),t._emitUniformFromString("vLightingIntensity","vec4"),(null==H?void 0:H.generateOnlyFragmentCode)&&(t.compilationString+=H.handleVertexSide(t)),this._vNormalWName=t._getFreeVariableName("vNormalW"),t.compilationString+="vec4 ".concat(this._vNormalWName," = normalize(").concat(this.worldNormal.associatedVariableName,");\n"),t._registerTempVariable("viewDirectionW")&&(t.compilationString+="vec3 viewDirectionW = normalize(".concat(this.cameraPosition.associatedVariableName," - ").concat(X,".xyz);\n")),t.compilationString+="vec3 geometricNormalW = ".concat(this._vNormalWName,".xyz;\n"),t.compilationString+="vec3 normalW = ".concat(W.isConnected?"normalize("+W.associatedVariableName+".xyz)":"geometricNormalW",";\n"),this._invertNormalName=t._getFreeVariableName("invertNormal"),t._emitUniformFromString(this._invertNormalName,"float"),t.compilationString+=t._emitCodeFromInclude("pbrBlockNormalFinal",j,{replaceStrings:[{search:/vPositionW/g,replace:X+".xyz"},{search:/vEyePosition.w/g,replace:this._invertNormalName}]}),t.compilationString+=this._getAlbedoOpacityCode(),t.compilationString+=t._emitCodeFromInclude("depthPrePass",j),t.compilationString+=this._getAmbientOcclusionCode(),t.compilationString+=t._emitCodeFromInclude("pbrBlockLightmapInit",j),t.compilationString+="#ifdef UNLIT\n vec3 diffuseBase = vec3(1., 1., 1.);\n #else\n",t.compilationString+=this._getReflectivityCode(t),t.compilationString+=t._emitCodeFromInclude("pbrBlockGeometryInfo",j,{replaceStrings:[{search:/REFLECTIONMAP_SKYBOX/g,replace:null!==(r=null==H?void 0:H._defineSkyboxName)&&void 0!==r?r:"REFLECTIONMAP_SKYBOX"},{search:/REFLECTIONMAP_3D/g,replace:null!==(o=null==H?void 0:H._define3DName)&&void 0!==o?o:"REFLECTIONMAP_3D"}]});var Y=this.anisotropy.isConnected?null===(a=this.anisotropy.connectedPoint)||void 0===a?void 0:a.ownerBlock:null;Y&&(Y.worldPositionConnectionPoint=this.worldPosition,Y.worldNormalConnectionPoint=this.worldNormal,t.compilationString+=Y.getCode(t,!this.perturbedNormal.isConnected)),H&&H.hasTexture&&(t.compilationString+=H.getCode(t,Y?"anisotropicOut.anisotropicNormal":"normalW")),t._emitFunctionFromInclude("pbrBlockReflection",j,{replaceStrings:[{search:/computeReflectionCoords/g,replace:"computeReflectionCoordsPBR"},{search:/REFLECTIONMAP_3D/g,replace:null!==(s=null==H?void 0:H._define3DName)&&void 0!==s?s:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_OPPOSITEZ/g,replace:null!==(c=null==H?void 0:H._defineOppositeZ)&&void 0!==c?c:"REFLECTIONMAP_OPPOSITEZ"},{search:/REFLECTIONMAP_PROJECTION/g,replace:null!==(l=null==H?void 0:H._defineProjectionName)&&void 0!==l?l:"REFLECTIONMAP_PROJECTION"},{search:/REFLECTIONMAP_SKYBOX/g,replace:null!==(u=null==H?void 0:H._defineSkyboxName)&&void 0!==u?u:"REFLECTIONMAP_SKYBOX"},{search:/LODINREFLECTIONALPHA/g,replace:null!==(h=null==H?void 0:H._defineLODReflectionAlpha)&&void 0!==h?h:"LODINREFLECTIONALPHA"},{search:/LINEARSPECULARREFLECTION/g,replace:null!==(d=null==H?void 0:H._defineLinearSpecularReflection)&&void 0!==d?d:"LINEARSPECULARREFLECTION"},{search:/vReflectionFilteringInfo/g,replace:null!==(p=null==H?void 0:H._vReflectionFilteringInfoName)&&void 0!==p?p:"vReflectionFilteringInfo"}]}),t.compilationString+=t._emitCodeFromInclude("pbrBlockReflectance0",j,{replaceStrings:[{search:/metallicReflectanceFactors/g,replace:this._vMetallicReflectanceFactorsName}]});var q=this.sheen.isConnected?null===(f=this.sheen.connectedPoint)||void 0===f?void 0:f.ownerBlock:null;q&&(t.compilationString+=q.getCode(H)),t._emitFunctionFromInclude("pbrBlockSheen",j,{replaceStrings:[{search:/REFLECTIONMAP_3D/g,replace:null!==(m=null==H?void 0:H._define3DName)&&void 0!==m?m:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_SKYBOX/g,replace:null!==(_=null==H?void 0:H._defineSkyboxName)&&void 0!==_?_:"REFLECTIONMAP_SKYBOX"},{search:/LODINREFLECTIONALPHA/g,replace:null!==(g=null==H?void 0:H._defineLODReflectionAlpha)&&void 0!==g?g:"LODINREFLECTIONALPHA"},{search:/LINEARSPECULARREFLECTION/g,replace:null!==(y=null==H?void 0:H._defineLinearSpecularReflection)&&void 0!==y?y:"LINEARSPECULARREFLECTION"}]});var K=this.iridescence.isConnected?null===(v=this.iridescence.connectedPoint)||void 0===v?void 0:v.ownerBlock:null;t.compilationString+=Bv.GetCode(K),t._emitFunctionFromInclude("pbrBlockIridescence",j,{replaceStrings:[]});var Q=this.clearcoat.isConnected?null===(b=this.clearcoat.connectedPoint)||void 0===b?void 0:b.ownerBlock:null,Z=!this.perturbedNormal.isConnected&&!this.anisotropy.isConnected,$=this.perturbedNormal.isConnected&&(null===(E=(null===(T=this.perturbedNormal.connectedPoint)||void 0===T?void 0:T.ownerBlock).worldTangent)||void 0===E?void 0:E.isConnected),ee=this.anisotropy.isConnected&&(null===(A=this.anisotropy.connectedPoint)||void 0===A?void 0:A.ownerBlock).worldTangent.isConnected,te=$||!this.perturbedNormal.isConnected&ⅇt.compilationString+=Fv.GetCode(t,Q,H,X,Z,te,this.worldNormal.associatedVariableName),Z&&(te=null!==(x=null==Q?void 0:Q.worldTangent.isConnected)&&void 0!==x&&x),t._emitFunctionFromInclude("pbrBlockClearcoat",j,{replaceStrings:[{search:/computeReflectionCoords/g,replace:"computeReflectionCoordsPBR"},{search:/REFLECTIONMAP_3D/g,replace:null!==(S=null==H?void 0:H._define3DName)&&void 0!==S?S:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_OPPOSITEZ/g,replace:null!==(C=null==H?void 0:H._defineOppositeZ)&&void 0!==C?C:"REFLECTIONMAP_OPPOSITEZ"},{search:/REFLECTIONMAP_PROJECTION/g,replace:null!==(P=null==H?void 0:H._defineProjectionName)&&void 0!==P?P:"REFLECTIONMAP_PROJECTION"},{search:/REFLECTIONMAP_SKYBOX/g,replace:null!==(I=null==H?void 0:H._defineSkyboxName)&&void 0!==I?I:"REFLECTIONMAP_SKYBOX"},{search:/LODINREFLECTIONALPHA/g,replace:null!==(R=null==H?void 0:H._defineLODReflectionAlpha)&&void 0!==R?R:"LODINREFLECTIONALPHA"},{search:/LINEARSPECULARREFLECTION/g,replace:null!==(O=null==H?void 0:H._defineLinearSpecularReflection)&&void 0!==O?O:"LINEARSPECULARREFLECTION"},{search:/defined\(TANGENT\)/g,replace:te?"defined(TANGENT)":"defined(IGNORE)"}]}),t.compilationString+=t._emitCodeFromInclude("pbrBlockReflectance",j,{replaceStrings:[{search:/REFLECTIONMAP_SKYBOX/g,replace:null!==(w=null==H?void 0:H._defineSkyboxName)&&void 0!==w?w:"REFLECTIONMAP_SKYBOX"},{search:/REFLECTIONMAP_3D/g,replace:null!==(M=null==H?void 0:H._define3DName)&&void 0!==M?M:"REFLECTIONMAP_3D"}]});var ne=this.subsurface.isConnected?null===(D=this.subsurface.connectedPoint)||void 0===D?void 0:D.ownerBlock:null,ie=this.subsurface.isConnected?null===(L=(null===(N=this.subsurface.connectedPoint)||void 0===N?void 0:N.ownerBlock).refraction.connectedPoint)||void 0===L?void 0:L.ownerBlock:null;ie&&(ie.viewConnectionPoint=this.view,ie.indexOfRefractionConnectionPoint=this.indexOfRefraction),t.compilationString+=kv.GetCode(t,ne,H,X),t._emitFunctionFromInclude("pbrBlockSubSurface",j,{replaceStrings:[{search:/REFLECTIONMAP_3D/g,replace:null!==(F=null==H?void 0:H._define3DName)&&void 0!==F?F:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_OPPOSITEZ/g,replace:null!==(B=null==H?void 0:H._defineOppositeZ)&&void 0!==B?B:"REFLECTIONMAP_OPPOSITEZ"},{search:/REFLECTIONMAP_PROJECTION/g,replace:null!==(U=null==H?void 0:H._defineProjectionName)&&void 0!==U?U:"REFLECTIONMAP_PROJECTION"},{search:/SS_REFRACTIONMAP_3D/g,replace:null!==(k=null==ie?void 0:ie._define3DName)&&void 0!==k?k:"SS_REFRACTIONMAP_3D"},{search:/SS_LODINREFRACTIONALPHA/g,replace:null!==(V=null==ie?void 0:ie._defineLODRefractionAlpha)&&void 0!==V?V:"SS_LODINREFRACTIONALPHA"},{search:/SS_LINEARSPECULARREFRACTION/g,replace:null!==(z=null==ie?void 0:ie._defineLinearSpecularRefraction)&&void 0!==z?z:"SS_LINEARSPECULARREFRACTION"},{search:/SS_REFRACTIONMAP_OPPOSITEZ/g,replace:null!==(G=null==ie?void 0:ie._defineOppositeZ)&&void 0!==G?G:"SS_REFRACTIONMAP_OPPOSITEZ"}]}),t.compilationString+=t._emitCodeFromInclude("pbrBlockDirectLighting",j),this.light?t.compilationString+=t._emitCodeFromInclude("lightFragment",j,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()},{search:/vPositionW/g,replace:X+".xyz"}]}):t.compilationString+=t._emitCodeFromInclude("lightFragment",j,{repeatKey:"maxSimultaneousLights",substitutionVars:"vPositionW,".concat(X,".xyz")}),t.compilationString+=t._emitCodeFromInclude("pbrBlockFinalLitComponents",j),t.compilationString+="#endif\n";var re=this.ambientColor.isConnected?this.ambientColor.associatedVariableName:"vec3(0., 0., 0.)",oe=Mm.DEFAULT_AO_ON_ANALYTICAL_LIGHTS.toString();-1===oe.indexOf(".")&&(oe+="."),t.compilationString+=t._emitCodeFromInclude("pbrBlockFinalUnlitComponents",j,{replaceStrings:[{search:/vec3 finalEmissive[\s\S]*?finalEmissive\*=vLightingIntensity\.y;/g,replace:""},{search:/vAmbientColor/g,replace:re+" * ambientFromScene"},{search:/vAmbientInfos\.w/g,replace:oe}]}),t.compilationString+=t._emitCodeFromInclude("pbrBlockFinalColorComposition",j,{replaceStrings:[{search:/finalEmissive/g,replace:"vec3(0.)"}]}),t.compilationString+=t._emitCodeFromInclude("pbrBlockImageProcessing",j,{replaceStrings:[{search:/visibility/g,replace:"1."}]}),t.compilationString+=t._emitCodeFromInclude("pbrDebug",j,{replaceStrings:[{search:/vNormalW/g,replace:this._vNormalWName},{search:/vPositionW/g,replace:X},{search:/albedoTexture\.rgb;/g,replace:"vec3(1.);\ngl_FragColor.rgb = toGammaSpace(gl_FragColor.rgb);\n"}]});for(var ae=0,se=this._outputs;ae ").concat(this.b.associatedVariableName," ? ").concat(i," : ").concat(r,";\n");break;case Hv.GreaterOrEqual:t.compilationString+=this._declareOutput(n,t)+" = ".concat(this.a.associatedVariableName," >= ").concat(this.b.associatedVariableName," ? ").concat(i," : ").concat(r,";\n");break;case Hv.Xor:t.compilationString+=this._declareOutput(n,t)+" = (mod(".concat(this.a.associatedVariableName," + ").concat(this.b.associatedVariableName,", 2.0) > 0.0) ? ").concat(i," : ").concat(r,";\n");break;case Hv.Or:t.compilationString+=this._declareOutput(n,t)+" = (min(".concat(this.a.associatedVariableName," + ").concat(this.b.associatedVariableName,", 1.0) > 0.0) ? ").concat(i," : ").concat(r,";\n");break;case Hv.And:t.compilationString+=this._declareOutput(n,t)+" = (".concat(this.a.associatedVariableName," * ").concat(this.b.associatedVariableName," > 0.0) ? ").concat(i," : ").concat(r,";\n")}return this},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.condition=this.condition,t},t.prototype._deserialize=function(t,n,i){e.prototype._deserialize.call(this,t,n,i),this.condition=t.condition},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".condition = BABYLON.ConditionalBlockConditions.").concat(Hv[this.condition],";\n")},t}(ha);b("BABYLON.ConditionalBlock",Wv);var Xv=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.octaves=6,n.registerInput("seed",na.AutoDetect),n.registerInput("chaos",na.AutoDetect,!0),n.registerInput("offsetX",na.Float,!0),n.registerInput("offsetY",na.Float,!0),n.registerInput("offsetZ",na.Float,!0),n.registerOutput("output",na.Float),n._inputs[0].acceptedConnectionPointTypes.push(na.Vector2),n._inputs[0].acceptedConnectionPointTypes.push(na.Vector3),n._linkConnectionTypes(0,1),n}return H(t,e),t.prototype.getClassName=function(){return"CloudBlock"},Object.defineProperty(t.prototype,"seed",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"chaos",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetZ",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){var n,i;if(e.prototype._buildBlock.call(this,t),this.seed.isConnected&&this._outputs[0].hasEndpoints){var r="fbm".concat(this.octaves);t._emitFunction("CloudBlockCode","\n\n float cloudRandom(in float p) { p = fract(p * 0.011); p *= p + 7.5; p *= p + p; return fract(p); }\n\n // Based on Morgan McGuire @morgan3d\n // https://www.shadertoy.com/view/4dS3Wd\n float cloudNoise(in vec2 x, in vec2 chaos) {\n vec2 step = chaos * vec2(75., 120.) + vec2(75., 120.);\n\n vec2 i = floor(x);\n vec2 f = fract(x);\n\n float n = dot(i, step);\n\n vec2 u = f * f * (3.0 - 2.0 * f);\n return mix(\n mix(cloudRandom(n + dot(step, vec2(0, 0))), cloudRandom(n + dot(step, vec2(1, 0))), u.x),\n mix(cloudRandom(n + dot(step, vec2(0, 1))), cloudRandom(n + dot(step, vec2(1, 1))), u.x),\n u.y\n );\n }\n\n float cloudNoise(in vec3 x, in vec3 chaos) {\n vec3 step = chaos * vec3(60., 120., 75.) + vec3(60., 120., 75.);\n\n vec3 i = floor(x);\n vec3 f = fract(x);\n\n float n = dot(i, step);\n\n vec3 u = f * f * (3.0 - 2.0 * f);\n return mix(mix(mix( cloudRandom(n + dot(step, vec3(0, 0, 0))), cloudRandom(n + dot(step, vec3(1, 0, 0))), u.x),\n mix( cloudRandom(n + dot(step, vec3(0, 1, 0))), cloudRandom(n + dot(step, vec3(1, 1, 0))), u.x), u.y),\n mix(mix( cloudRandom(n + dot(step, vec3(0, 0, 1))), cloudRandom(n + dot(step, vec3(1, 0, 1))), u.x),\n mix( cloudRandom(n + dot(step, vec3(0, 1, 1))), cloudRandom(n + dot(step, vec3(1, 1, 1))), u.x), u.y), u.z);\n }","// CloudBlockCode"),t._emitFunction("CloudBlockCodeFBM"+this.octaves,"\n float fbm(in vec2 st, in vec2 chaos) {\n // Initial values\n float value = 0.0;\n float amplitude = .5;\n float frequency = 0.;\n\n // Loop of octaves\n for (int i = 0; i < OCTAVES; i++) {\n value += amplitude * cloudNoise(st, chaos);\n st *= 2.0;\n amplitude *= 0.5;\n }\n return value;\n }\n\n float fbm(in vec3 x, in vec3 chaos) {\n // Initial values\n float value = 0.0;\n float amplitude = 0.5;\n for (int i = 0; i < OCTAVES; ++i) {\n value += amplitude * cloudNoise(x, chaos);\n x = x * 2.0;\n amplitude *= 0.5;\n }\n return value;\n }".replace(/fbm/gi,r).replace(/OCTAVES/gi,(0|this.octaves).toString()),"// CloudBlockCode FBM");var o,a=t._getFreeVariableName("st"),s=(null===(n=this.seed.connectedPoint)||void 0===n?void 0:n.type)===na.Vector2?"vec2":"vec3";return t.compilationString+="".concat(s," ").concat(a," = ").concat(this.seed.associatedVariableName,";\n"),this.offsetX.isConnected&&(t.compilationString+="".concat(a,".x += 0.1 * ").concat(this.offsetX.associatedVariableName,";\n")),this.offsetY.isConnected&&(t.compilationString+="".concat(a,".y += 0.1 * ").concat(this.offsetY.associatedVariableName,";\n")),this.offsetZ.isConnected&&"vec3"===s&&(t.compilationString+="".concat(a,".z += 0.1 * ").concat(this.offsetZ.associatedVariableName,";\n")),o=this.chaos.isConnected?this.chaos.associatedVariableName:(null===(i=this.seed.connectedPoint)||void 0===i?void 0:i.type)===na.Vector2?"vec2(0., 0.)":"vec3(0., 0., 0.)",t.compilationString+=this._declareOutput(this._outputs[0],t)+" = ".concat(r,"(").concat(a,", ").concat(o,");\n"),this}},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".octaves = ").concat(this.octaves,";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.octaves=this.octaves,t},t.prototype._deserialize=function(t,n,i){e.prototype._deserialize.call(this,t,n,i),this.octaves=t.octaves},W([ma("Octaves",pa.Int)],t.prototype,"octaves",void 0),t}(ha);b("BABYLON.CloudBlock",Xv);var Yv=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.registerInput("seed",na.Vector2),n.registerInput("offset",na.Float),n.registerInput("density",na.Float),n.registerOutput("output",na.Float),n.registerOutput("cells",na.Float),n}return H(t,e),t.prototype.getClassName=function(){return"VoronoiNoiseBlock"},Object.defineProperty(t.prototype,"seed",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offset",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"density",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cells",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){if(e.prototype._buildBlock.call(this,t),this.seed.isConnected){var n="vec2 voronoiRandom(vec2 seed, float offset){\n mat2 m = mat2(15.27, 47.63, 99.41, 89.98);\n vec2 uv = fract(sin(m * seed) * 46839.32);\n return vec2(sin(uv.y * offset) * 0.5 + 0.5, cos(uv.x * offset) * 0.5 + 0.5);\n }\n ";t._emitFunction("voronoiRandom",n,"// Voronoi random generator"),n="void voronoi(vec2 seed, float offset, float density, out float outValue, out float cells){\n vec2 g = floor(seed * density);\n vec2 f = fract(seed * density);\n float t = 8.0;\n vec3 res = vec3(8.0, 0.0, 0.0);\n\n for(int y=-1; y<=1; y++)\n {\n for(int x=-1; x<=1; x++)\n {\n vec2 lattice = vec2(x,y);\n vec2 randomOffset = voronoiRandom(lattice + g, offset);\n float d = distance(lattice + randomOffset, f);\n if(d < res.x)\n {\n res = vec3(d, randomOffset.x, randomOffset.y);\n outValue = res.x;\n cells = res.y;\n }\n }\n }\n }\n ",t._emitFunction("voronoi",n,"// Voronoi");var i=t._getFreeVariableName("tempOutput"),r=t._getFreeVariableName("tempCells");return t.compilationString+="float ".concat(i," = 0.0;\n"),t.compilationString+="float ".concat(r," = 0.0;\n"),t.compilationString+="voronoi(".concat(this.seed.associatedVariableName,", ").concat(this.offset.associatedVariableName,", ").concat(this.density.associatedVariableName,", ").concat(i,", ").concat(r,");\n"),this.output.hasEndpoints&&(t.compilationString+=this._declareOutput(this.output,t)+" = ".concat(i,";\n")),this.cells.hasEndpoints&&(t.compilationString+=this._declareOutput(this.cells,t)+" = ".concat(r,";\n")),this}},t}(ha);b("BABYLON.VoronoiNoiseBlock",Yv);var qv=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.registerInput("input",na.AutoDetect),n.registerOutput("output",na.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n}return H(t,e),t.prototype.getClassName=function(){return"ElbowBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e=this._inputs[0];if(e.isConnected){var t=e.connectedPoint.ownerBlock;if(t.target!==ia.VertexAndFragment)return t.target;if(e.connectedPoint.target!==ia.VertexAndFragment)return e.connectedPoint.target}return this._target},set:function(e){0==(this._target&e)&&(this._target=e)},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this._outputs[0],i=this._inputs[0];return t.compilationString+=this._declareOutput(n,t)+" = ".concat(i.associatedVariableName,";\n"),this},t}(ha);b("BABYLON.ElbowBlock",qv);var Kv=function(e){function t(t,n){void 0===n&&(n=!1);var i=e.call(this,t,ia.Neutral)||this;return i.projectAsCube=!1,i._convertToGammaSpace=!1,i._convertToLinearSpace=!1,i.disableLevelMultiplication=!1,i.registerInput("position",na.AutoDetect,!1),i.registerInput("normal",na.AutoDetect,!1),i.registerInput("sharpness",na.Float,!0),i.registerInput("source",na.Object,!0,ia.VertexAndFragment,new gy("source",i,sa.Input,Uy,"ImageSourceBlock")),i.registerInput("sourceY",na.Object,!0,ia.VertexAndFragment,new gy("sourceY",i,sa.Input,Uy,"ImageSourceBlock")),n||i.registerInput("sourceZ",na.Object,!0,ia.VertexAndFragment,new gy("sourceZ",i,sa.Input,Uy,"ImageSourceBlock")),i.registerOutput("rgba",na.Color4,ia.Neutral),i.registerOutput("rgb",na.Color3,ia.Neutral),i.registerOutput("r",na.Float,ia.Neutral),i.registerOutput("g",na.Float,ia.Neutral),i.registerOutput("b",na.Float,ia.Neutral),i.registerOutput("a",na.Float,ia.Neutral),i.registerOutput("level",na.Float,ia.Neutral),i._inputs[0].addExcludedConnectionPointFromAllowedTypes(na.Color3|na.Vector3|na.Vector4),i._inputs[1].addExcludedConnectionPointFromAllowedTypes(na.Color3|na.Vector3|na.Vector4),i}return H(t,e),Object.defineProperty(t.prototype,"texture",{get:function(){var e;return this.source.isConnected?(null===(e=this.source.connectedPoint)||void 0===e?void 0:e.ownerBlock).texture:this._texture},set:function(e){var t,n=this;if(this._texture!==e){var i=null!==(t=null==e?void 0:e.getScene())&&void 0!==t?t:A.LastCreatedScene;!e&&i&&i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(n._texture)})),this._texture=e,e&&i&&i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(t){return t.hasTexture(e)}))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textureY",{get:function(){var e;return this.sourceY.isConnected?(null===(e=this.sourceY.connectedPoint)||void 0===e?void 0:e.ownerBlock).texture:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textureZ",{get:function(){var e,t;return(null===(e=this.sourceZ)||void 0===e?void 0:e.isConnected)?(null===(t=this.sourceY.connectedPoint)||void 0===t?void 0:t.ownerBlock).texture:null},enumerable:!1,configurable:!0}),t.prototype._getImageSourceBlock=function(e){return(null==e?void 0:e.isConnected)?e.connectedPoint.ownerBlock:null},Object.defineProperty(t.prototype,"samplerName",{get:function(){var e=this._getImageSourceBlock(this.source);return e?e.samplerName:this._samplerName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"samplerYName",{get:function(){var e,t;return null!==(t=null===(e=this._getImageSourceBlock(this.sourceY))||void 0===e?void 0:e.samplerName)&&void 0!==t?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"samplerZName",{get:function(){var e,t;return null!==(t=null===(e=this._getImageSourceBlock(this.sourceZ))||void 0===e?void 0:e.samplerName)&&void 0!==t?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasImageSource",{get:function(){return this.source.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"convertToGammaSpace",{get:function(){return this._convertToGammaSpace},set:function(e){var t,n=this;if(e!==this._convertToGammaSpace&&(this._convertToGammaSpace=e,this.texture)){var i=null!==(t=this.texture.getScene())&&void 0!==t?t:A.LastCreatedScene;null==i||i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(n.texture)}))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"convertToLinearSpace",{get:function(){return this._convertToLinearSpace},set:function(e){var t,n=this;if(e!==this._convertToLinearSpace&&(this._convertToLinearSpace=e,this.texture)){var i=null!==(t=this.texture.getScene())&&void 0!==t?t:A.LastCreatedScene;null==i||i.markAllMaterialsAsDirty(a.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(n.texture)}))}},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"TriPlanarBlock"},Object.defineProperty(t.prototype,"position",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normal",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sharpness",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sourceY",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sourceZ",{get:function(){return this._inputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgb",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"r",{get:function(){return this._outputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this._outputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this._outputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this._outputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"level",{get:function(){return this._outputs[6]},enumerable:!1,configurable:!0}),t.prototype.prepareDefines=function(e,t,n){if(n._areTexturesDirty){var i=this.convertToGammaSpace&&this.texture&&!this.texture.gammaSpace,r=this.convertToLinearSpace&&this.texture&&this.texture.gammaSpace;n.setValue(this._linearDefineName,i,!0),n.setValue(this._gammaDefineName,r,!0)}},t.prototype.isReady=function(){return!(this.texture&&!this.texture.isReadyOrNotBlocking())},t.prototype.bind=function(e){this.texture&&(e.setFloat(this._textureInfoName,this.texture.level),this._imageSource||e.setTexture(this._samplerName,this.texture))},t.prototype._generateTextureLookup=function(e){var t,n,i=this.samplerName,r=null!==(t=this.samplerYName)&&void 0!==t?t:i,o=null!==(n=this.samplerZName)&&void 0!==n?n:i,a=this.sharpness.isConnected?this.sharpness.associatedVariableName:"1.0",s=e._getFreeVariableName("x"),c=e._getFreeVariableName("y"),l=e._getFreeVariableName("z"),u=e._getFreeVariableName("w"),h=e._getFreeVariableName("n"),d=e._getFreeVariableName("uvx"),p=e._getFreeVariableName("uvy"),f=e._getFreeVariableName("uvz");e.compilationString+="\n vec3 ".concat(h," = ").concat(this.normal.associatedVariableName,".xyz;\n\n vec2 ").concat(d," = ").concat(this.position.associatedVariableName,".yz;\n vec2 ").concat(p," = ").concat(this.position.associatedVariableName,".zx;\n vec2 ").concat(f," = ").concat(this.position.associatedVariableName,".xy;\n "),this.projectAsCube&&(e.compilationString+="\n ".concat(d,".xy = ").concat(d,".yx;\n\n if (").concat(h,".x >= 0.0) {\n ").concat(d,".x = -").concat(d,".x;\n }\n if (").concat(h,".y < 0.0) {\n ").concat(p,".y = -").concat(p,".y;\n }\n if (").concat(h,".z < 0.0) {\n ").concat(f,".x = -").concat(f,".x;\n }\n ")),e.compilationString+="\n vec4 ".concat(s," = texture2D(").concat(i,", ").concat(d,");\n vec4 ").concat(c," = texture2D(").concat(r,", ").concat(p,");\n vec4 ").concat(l," = texture2D(").concat(o,", ").concat(f,");\n \n // blend weights\n vec3 ").concat(u," = pow(abs(").concat(h,"), vec3(").concat(a,"));\n\n // blend and return\n vec4 ").concat(this._tempTextureRead," = (").concat(s,"*").concat(u,".x + ").concat(c,"*").concat(u,".y + ").concat(l,"*").concat(u,".z) / (").concat(u,".x + ").concat(u,".y + ").concat(u,".z); \n ")},t.prototype._generateConversionCode=function(e,t,n){"a"!==n&&(this.texture&&this.texture.gammaSpace||(e.compilationString+="#ifdef ".concat(this._linearDefineName,"\n ").concat(t.associatedVariableName," = toGammaSpace(").concat(t.associatedVariableName,");\n #endif\n ")),e.compilationString+="#ifdef ".concat(this._gammaDefineName,"\n ").concat(t.associatedVariableName," = toLinearSpace(").concat(t.associatedVariableName,");\n #endif\n "))},t.prototype._writeOutput=function(e,t,n){var i="";this.disableLevelMultiplication||(i=" * ".concat(this._textureInfoName)),e.compilationString+="".concat(this._declareOutput(t,e)," = ").concat(this._tempTextureRead,".").concat(n).concat(i,";\n"),this._generateConversionCode(e,t,n)},t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t),this.source.isConnected?this._imageSource=this.source.connectedPoint.ownerBlock:this._imageSource=null,this._textureInfoName=t._getFreeVariableName("textureInfoName"),this.level.associatedVariableName=this._textureInfoName,this._tempTextureRead=t._getFreeVariableName("tempTextureRead"),this._linearDefineName=t._getFreeDefineName("ISLINEAR"),this._gammaDefineName=t._getFreeDefineName("ISGAMMA"),this._imageSource||(this._samplerName=t._getFreeVariableName(this.name+"Sampler"),t._emit2DSampler(this._samplerName)),t.sharedData.blockingBlocks.push(this),t.sharedData.textureBlocks.push(this),t.sharedData.blocksWithDefines.push(this),t.sharedData.bindableBlocks.push(this);var n="//".concat(this.name);t._emitFunctionFromInclude("helperFunctions",n),t._emitUniformFromString(this._textureInfoName,"float"),this._generateTextureLookup(t);for(var i=0,r=this._outputs;i").concat(s,".y && ").concat(s,".x>").concat(s,".z) ? ivec3(0,1,2) :\n (").concat(s,".y>").concat(s,".z) ? ivec3(1,2,0) :\n ivec3(2,0,1) ;\n // determine minor axis (in x; yz are following axis)\n ivec3 ").concat(l," = (").concat(s,".x<").concat(s,".y && ").concat(s,".x<").concat(s,".z) ? ivec3(0,1,2) :\n (").concat(s,".y<").concat(s,".z) ? ivec3(1,2,0) :\n ivec3(2,0,1) ;\n // determine median axis (in x; yz are following axis)\n ivec3 ").concat(u," = ivec3(3) - ").concat(l," - ").concat(c,";\n \n // project+fetch\n vec4 ").concat(h," = textureGrad( ").concat(n,", vec2( ").concat(this.position.associatedVariableName,"[").concat(c,".y], ").concat(this.position.associatedVariableName,"[").concat(c,".z]), \n vec2(").concat(o,"[").concat(c,".y],").concat(o,"[").concat(c,".z]), \n vec2(").concat(a,"[").concat(c,".y],").concat(a,"[").concat(c,".z]) );\n vec4 ").concat(d," = textureGrad( ").concat(i,", vec2( ").concat(this.position.associatedVariableName,"[").concat(u,".y], ").concat(this.position.associatedVariableName,"[").concat(u,".z]), \n vec2(").concat(o,"[").concat(u,".y],").concat(o,"[").concat(u,".z]),\n vec2(").concat(a,"[").concat(u,".y],").concat(a,"[").concat(u,".z]) );\n \n // blend factors\n vec2 ").concat(p," = vec2(").concat(s,"[").concat(c,".x],").concat(s,"[").concat(u,".x]);\n // make local support\n ").concat(p," = clamp( (").concat(p,"-0.5773)/(1.0-0.5773), 0.0, 1.0 );\n // shape transition\n ").concat(p," = pow( ").concat(p,", vec2(").concat(r,"/8.0) );\n // blend and return\n vec4 ").concat(this._tempTextureRead," = (").concat(h,"*").concat(p,".x + ").concat(d,"*").concat(p,".y) / (").concat(p,".x + ").concat(p,".y);\n ")},t}(Kv);b("BABYLON.BiPlanarBlock",Qv);var Zv=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.registerInput("input",na.Matrix),n.registerOutput("output",na.Float),n}return H(t,e),t.prototype.getClassName=function(){return"MatrixDeterminantBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this.output,i=this.input;return t.compilationString+=this._declareOutput(n,t)+"".concat(n.associatedVariableName," = determinant(").concat(i.associatedVariableName,");\n"),this},t}(ha);b("BABYLON.MatrixDeterminantBlock",Zv);var $v,Jv=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.registerInput("input",na.Matrix),n.registerOutput("output",na.Matrix),n}return H(t,e),t.prototype.getClassName=function(){return"MatrixTransposeBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this.output,i=this.input;return t.compilationString+=this._declareOutput(n,t)+"".concat(n.associatedVariableName," = transpose(").concat(i.associatedVariableName,");\n"),this},t}(ha);b("BABYLON.MatrixTransposeBlock",Jv),function(e){e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Tangent=2]="Tangent",e[e.VertexColor=3]="VertexColor",e[e.UV1=4]="UV1",e[e.UV2=5]="UV2",e[e.UV3=6]="UV3",e[e.UV4=7]="UV4",e[e.UV5=8]="UV5",e[e.UV6=9]="UV6"}($v||($v={}));var eb,tb=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.attributeType=$v.None,n.registerInput("input",na.AutoDetect),n.registerInput("fallback",na.AutoDetect),n.registerOutput("output",na.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n._linkConnectionTypes(0,1),n._inputs[0].onConnectionObservable.add((function(e){var t;if(!n.attributeType){var i=e.ownerBlock;if(i instanceof Sa&&i.isAttribute)switch(i.name){case"color":n.attributeType=$v.VertexColor;break;case"normal":n.attributeType=$v.Normal;break;case"tangent":n.attributeType=$v.Tangent;break;case"uv":n.attributeType=$v.UV1;break;case"uv2":n.attributeType=$v.UV2;break;case"uv3":n.attributeType=$v.UV3;break;case"uv4":n.attributeType=$v.UV4;break;case"uv5":n.attributeType=$v.UV5;break;case"uv6":n.attributeType=$v.UV6}else if(i instanceof by)switch(null===(t=n.input.connectedPoint)||void 0===t?void 0:t.name){case"normalOutput":n.attributeType=$v.Normal;break;case"tangentOutput":n.attributeType=$v.Tangent;break;case"uvOutput":n.attributeType=$v.UV1}}})),n}return H(t,e),t.prototype.getClassName=function(){return"MeshAttributeExistsBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fallback",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=null;switch(this.attributeType){case $v.VertexColor:n="VERTEXCOLOR_NME";break;case $v.Normal:n="NORMAL";break;case $v.Tangent:n="TANGENT";break;case $v.UV1:n="UV1";break;case $v.UV2:n="UV2";break;case $v.UV3:n="UV3";break;case $v.UV4:n="UV4";break;case $v.UV5:n="UV5";break;case $v.UV6:n="UV6"}var i=this._declareOutput(this.output,t);return n&&(t.compilationString+="#ifdef ".concat(n,"\n")),t.compilationString+="".concat(i," = ").concat(this.input.associatedVariableName,";\n"),n&&(t.compilationString+="#else\n",t.compilationString+="".concat(i," = ").concat(this.fallback.associatedVariableName,";\n"),t.compilationString+="#endif\n"),this},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.attributeType=this.attributeType,t},t.prototype._deserialize=function(t,n,i){var r;e.prototype._deserialize.call(this,t,n,i),this.attributeType=null!==(r=t.attributeType)&&void 0!==r?r:$v.None},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".attributeType = ").concat(this.attributeType,";\n")},W([ma("Attribute lookup",pa.List,void 0,{notifiers:{update:!0},options:[{label:"(None)",value:$v.None},{label:"Normal",value:$v.Normal},{label:"Tangent",value:$v.Tangent},{label:"Vertex Color",value:$v.VertexColor},{label:"UV1",value:$v.UV1},{label:"UV2",value:$v.UV2},{label:"UV3",value:$v.UV3},{label:"UV4",value:$v.UV4},{label:"UV5",value:$v.UV5},{label:"UV6",value:$v.UV6}]})],t.prototype,"attributeType",void 0),t}(ha);b("BABYLON.MeshAttributeExistsBlock",tb),function(e){e[e.EaseInSine=0]="EaseInSine",e[e.EaseOutSine=1]="EaseOutSine",e[e.EaseInOutSine=2]="EaseInOutSine",e[e.EaseInQuad=3]="EaseInQuad",e[e.EaseOutQuad=4]="EaseOutQuad",e[e.EaseInOutQuad=5]="EaseInOutQuad",e[e.EaseInCubic=6]="EaseInCubic",e[e.EaseOutCubic=7]="EaseOutCubic",e[e.EaseInOutCubic=8]="EaseInOutCubic",e[e.EaseInQuart=9]="EaseInQuart",e[e.EaseOutQuart=10]="EaseOutQuart",e[e.EaseInOutQuart=11]="EaseInOutQuart",e[e.EaseInQuint=12]="EaseInQuint",e[e.EaseOutQuint=13]="EaseOutQuint",e[e.EaseInOutQuint=14]="EaseInOutQuint",e[e.EaseInExpo=15]="EaseInExpo",e[e.EaseOutExpo=16]="EaseOutExpo",e[e.EaseInOutExpo=17]="EaseInOutExpo",e[e.EaseInCirc=18]="EaseInCirc",e[e.EaseOutCirc=19]="EaseOutCirc",e[e.EaseInOutCirc=20]="EaseInOutCirc",e[e.EaseInBack=21]="EaseInBack",e[e.EaseOutBack=22]="EaseOutBack",e[e.EaseInOutBack=23]="EaseInOutBack",e[e.EaseInElastic=24]="EaseInElastic",e[e.EaseOutElastic=25]="EaseOutElastic",e[e.EaseInOutElastic=26]="EaseInOutElastic"}(eb||(eb={}));var nb=function(e){function t(t){var n=e.call(this,t,ia.Neutral)||this;return n.type=eb.EaseInOutSine,n.registerInput("input",na.AutoDetect),n.registerOutput("output",na.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n._inputs[0].excludedConnectionPointTypes.push(na.Matrix),n._inputs[0].excludedConnectionPointTypes.push(na.Object),n._inputs[0].excludedConnectionPointTypes.push(na.Int),n}return H(t,e),t.prototype.getClassName=function(){return"CurveBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._duplicateEntry=function(e,t){return"ret.".concat(t," = ").concat(e.replace(/VAL/g,"v."+t))},t.prototype._duplicateEntryDirect=function(e){return"return ".concat(e.replace(/VAL/g,"v"))},t.prototype._duplicateVector=function(e,t){if("float"===t)return this._duplicateEntryDirect(e);for(var n=parseInt(t.replace("vec","")),i="\n vec".concat(n," ret = vec").concat(n,"(0.0);\n "),r=1;r<=n;r++)i+=this._duplicateEntry(e,1===r?"x":2===r?"y":3===r?"z":"w")+";\n";return i+"return ret;\n"},t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n,i=this._outputs[0],r="",o="";switch(this.input.type){case na.Float:o="float";break;case na.Vector2:o="vec2";break;case na.Vector3:case na.Color3:o="vec3";break;case na.Vector4:case na.Color4:o="vec4"}switch(n=eb[this.type]+"_"+o,this.type){case eb.EaseInSine:r="return 1.0 - cos((v * 3.1415) / 2.0)";break;case eb.EaseOutSine:r="return sin((v * 3.1415) / 2.0)";break;case eb.EaseInOutSine:r="return -(cos(v * 3.1415) - 1.0) / 2.0";break;case eb.EaseInQuad:r="return v * v";break;case eb.EaseOutQuad:r="return (1.0 - v) * (1.0 - v)";break;case eb.EaseInOutQuad:var a="VAL < 0.5 ? 2.0 * VAL * VAL : 1.0 - pow(-2.0 * VAL + 2.0, 2.0) / 2.0";r=this._duplicateVector(a,o);break;case eb.EaseInCubic:r="return v * v * v";break;case eb.EaseOutCubic:a="1.0 - pow(1.0 - VAL, 3.0)",r=this._duplicateVector(a,o);break;case eb.EaseInOutCubic:a="VAL < 0.5 ? 4.0 * VAL * VAL * VAL : 1.0 - pow(-2.0 * VAL + 2.0, 3.0) / 2.0",r=this._duplicateVector(a,o);break;case eb.EaseInQuart:r="return v * v * v * v";break;case eb.EaseOutQuart:a="1.0 - pow(1.0 - VAL, 4.0)",r=this._duplicateVector(a,o);break;case eb.EaseInOutQuart:a="VAL < 0.5 ? 8.0 * VAL * VAL * VAL * VAL : 1.0 - pow(-2.0 * VAL + 2.0, 4.0) / 2.0",r=this._duplicateVector(a,o);break;case eb.EaseInQuint:r="return v * v * v * v * v";break;case eb.EaseOutQuint:a="1.0 - pow(1.0 - VAL, 5.0)",r=this._duplicateVector(a,o);break;case eb.EaseInOutQuint:a="VAL < 0.5 ? 16.0 * VAL * VAL * VAL * VAL * VAL : 1.0 - pow(-2.0 * VAL + 2.0, 5.0) / 2.0",r=this._duplicateVector(a,o);break;case eb.EaseInExpo:a="VAL == 0.0 ? 0.0 : pow(2.0, 10.0 * VAL - 10.0)",r=this._duplicateVector(a,o);break;case eb.EaseOutExpo:a="VAL == 1.0 ? 1.0 : 1.0 - pow(2.0, -10.0 * VAL)",r=this._duplicateVector(a,o);break;case eb.EaseInOutExpo:a="VAL == 0.0 ? 0.0 : VAL == 1.0 ? 1.0 : VAL < 0.5 ? pow(2.0, 20.0 * VAL - 10.0) / 2.0 : (2.0 - pow(2.0, -20.0 * VAL + 10.0)) / 2.0",r=this._duplicateVector(a,o);break;case eb.EaseInCirc:a="1.0 - sqrt(1.0 - pow(VAL, 2.0))",r=this._duplicateVector(a,o);break;case eb.EaseOutCirc:a="sqrt(1.0 - pow(VAL - 1.0, 2.0))",r=this._duplicateVector(a,o);break;case eb.EaseInOutCirc:a="VAL < 0.5 ? (1.0 - sqrt(1.0 - pow(2.0 * VAL, 2.0))) / 2.0 : (sqrt(1.0 - pow(-2.0 * VAL + 2.0, 2.0)) + 1.0) / 2.0",r=this._duplicateVector(a,o);break;case eb.EaseInBack:r="return 2.70158 * v * v * v - 1.70158 * v * v";break;case eb.EaseOutBack:a="2.70158 * pow(VAL - 1.0, 3.0) + 1.70158 * pow(VAL - 1.0, 2.0)",r=this._duplicateVector(a,o);break;case eb.EaseInOutBack:a="VAL < 0.5 ? (pow(2.0 * VAL, 2.0) * ((3.5949095) * 2.0 * VAL - 2.5949095)) / 2.0 : (pow(2.0 * VAL - 2.0, 2.0) * (3.5949095 * (VAL * 2.0 - 2.0) + 3.5949095) + 2.0) / 2.0",r=this._duplicateVector(a,o);break;case eb.EaseInElastic:a="VAL == 0.0 ? 0.0 : VAL == 1.0 ? 1.0 : -pow(2.0, 10.0 * VAL - 10.0) * sin((VAL * 10.0 - 10.75) * ((2.0 * 3.1415) / 3.0))",r=this._duplicateVector(a,o);break;case eb.EaseOutElastic:a="VAL == 0.0 ? 0.0 : VAL == 1.0 ? 1.0 : pow(2.0, -10.0 * VAL) * sin((VAL * 10.0 - 0.75) * ((2.0 * 3.1415) / 3.0)) + 1.0",r=this._duplicateVector(a,o);break;case eb.EaseInOutElastic:a="VAL == 0.0 ? 0.0 : VAL == 1.0 ? 1.0 : VAL < 0.5 ? -(pow(2.0, 20.0 * VAL - 10.0) * sin((20.0 * VAL - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0 : (pow(2.0, -20.0 * VAL + 10.0) * sin((20.0 * VAL - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0 + 1.0",r=this._duplicateVector(a,o)}return t._emitFunction(n,"".concat(o," ").concat(n,"(").concat(o," v) {").concat(r,";}\n"),""),t.compilationString+=this._declareOutput(i,t)+" = ".concat(n,"(").concat(this.input.associatedVariableName,");\n"),this},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.curveType=this.type,t},t.prototype._deserialize=function(t,n,i){e.prototype._deserialize.call(this,t,n,i),this.type=t.curveType},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".type = BABYLON.CurveBlockTypes.").concat(eb[this.type],";\n")},t}(ha);b("BABYLON.CurveBlock",nb);var ib,rb,ob,ab=function(){function e(){}return e.prototype.optimize=function(e,t){},e}(),sb=function(){function e(){this.mm=new Map}return e.prototype.get=function(e,t){var n=this.mm.get(e);if(void 0!==n)return n.get(t)},e.prototype.set=function(e,t,n){var i=this.mm.get(e);void 0===i&&this.mm.set(e,i=new Map),i.set(t,n)},e}(),cb=function(){function e(e,t,n){var i=this;this._baseMaterial=e,this._scene=null!=t?t:A.LastCreatedScene,this._options=n,this._subMeshToEffect=new Map,this._subMeshToDepthWrapper=new sb,this._meshes=new Map,this._onEffectCreatedObserver=this._baseMaterial.onEffectCreatedObservable.add((function(e){var t,n,r=null===(t=e.subMesh)||void 0===t?void 0:t.getMesh();r&&!i._meshes.has(r)&&i._meshes.set(r,r.onDisposeObservable.add((function(e){for(var t=i._subMeshToEffect.keys(),n=t.next();!0!==n.done;n=t.next()){var r=n.value;(null==r?void 0:r.getMesh())===e&&(i._subMeshToEffect.delete(r),i._deleteDepthWrapperEffect(r))}}))),(null===(n=i._subMeshToEffect.get(e.subMesh))||void 0===n?void 0:n[0])!==e.effect&&(i._subMeshToEffect.set(e.subMesh,[e.effect,i._scene.getEngine().currentRenderPassId]),i._deleteDepthWrapperEffect(e.subMesh))}))}return Object.defineProperty(e.prototype,"standalone",{get:function(){var e,t;return null!==(t=null===(e=this._options)||void 0===e?void 0:e.standalone)&&void 0!==t&&t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseMaterial",{get:function(){return this._baseMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doNotInjectCode",{get:function(){var e,t;return null!==(t=null===(e=this._options)||void 0===e?void 0:e.doNotInjectCode)&&void 0!==t&&t},enumerable:!1,configurable:!0}),e.prototype._deleteDepthWrapperEffect=function(e){var t=this._subMeshToDepthWrapper.mm.get(e);t&&(t.forEach((function(e){var t;null===(t=e.mainDrawWrapper.effect)||void 0===t||t.dispose()})),this._subMeshToDepthWrapper.mm.delete(e))},e.prototype.getEffect=function(e,t,n){var i,r=null===(i=this._subMeshToDepthWrapper.mm.get(e))||void 0===i?void 0:i.get(t);if(!r)return null;var o=r.drawWrapper[n];return o||(o=r.drawWrapper[n]=new en(this._scene.getEngine())).setEffect(r.mainDrawWrapper.effect,r.mainDrawWrapper.defines),o},e.prototype.isReadyForSubMesh=function(e,t,n,i,r){var o,a;return!(this.standalone&&!this._baseMaterial.isReadyForSubMesh(e.getMesh(),e,i))&&null!==(a=null===(o=this._makeEffect(e,t,n,r))||void 0===o?void 0:o.isReady())&&void 0!==a&&a},e.prototype.dispose=function(){this._baseMaterial.onEffectCreatedObservable.remove(this._onEffectCreatedObserver),this._onEffectCreatedObserver=null;for(var e=this._meshes.entries(),t=e.next();!0!==t.done;t=e.next()){var n=t.value,i=n[0],r=n[1];i.onDisposeObservable.remove(r)}},e.prototype._makeEffect=function(e,t,n,i){var r,o,a,s=this._scene.getEngine(),c=this._subMeshToEffect.get(e);if(!c)return null;var l=c[0],u=c[1],h=this._subMeshToDepthWrapper.get(e,n);if(!h){var d=new en(s);d.defines=null!==(o=null===(r=e._getDrawWrapper(u))||void 0===r?void 0:r.defines)&&void 0!==o?o:null,(h={drawWrapper:[],mainDrawWrapper:d,depthDefines:"",token:Sn()}).drawWrapper[i]=d,this._subMeshToDepthWrapper.set(e,n,h)}var p=t.join("\n");if(h.mainDrawWrapper.effect&&p===h.depthDefines)return h.mainDrawWrapper.effect;h.depthDefines=p;var f=l.getUniformNames().slice(),m=l.vertexSourceCodeBeforeMigration,_=l.fragmentSourceCodeBeforeMigration;if(!this.doNotInjectCode){var g=this._options&&this._options.remappedVariables?"#include(".concat(this._options.remappedVariables.join(","),")"):zt.IncludesShadersStore.shadowMapVertexNormalBias,y=this._options&&this._options.remappedVariables?"#include(".concat(this._options.remappedVariables.join(","),")"):zt.IncludesShadersStore.shadowMapVertexMetric,v=this._options&&this._options.remappedVariables?"#include(".concat(this._options.remappedVariables.join(","),")"):zt.IncludesShadersStore.shadowMapFragmentSoftTransparentShadow,b=zt.IncludesShadersStore.shadowMapFragment;m=(m=-1!==(m=(m=m.replace(/void\s+?main/g,zt.IncludesShadersStore.shadowMapVertexExtraDeclaration+"\nvoid main")).replace(/#define SHADOWDEPTH_NORMALBIAS|#define CUSTOM_VERTEX_UPDATE_WORLDPOS/g,g)).indexOf("#define SHADOWDEPTH_METRIC")?m.replace(/#define SHADOWDEPTH_METRIC/g,y):m.replace(/}\s*$/g,y+"\n}")).replace(/#define SHADER_NAME.*?\n|out vec4 glFragColor;\n/g,"");var T=_.indexOf("#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW")>=0||_.indexOf("#define CUSTOM_FRAGMENT_BEFORE_FOG")>=0,E=-1!==_.indexOf("#define SHADOWDEPTH_FRAGMENT"),A="";T?_=_.replace(/#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW|#define CUSTOM_FRAGMENT_BEFORE_FOG/g,v):A=v+"\n",_=_.replace(/void\s+?main/g,zt.IncludesShadersStore.shadowMapFragmentExtraDeclaration+"\nvoid main"),E?_=_.replace(/#define SHADOWDEPTH_FRAGMENT/g,b):A+=b+"\n",A&&(_=_.replace(/}\s*$/g,A+"}")),f.push("biasAndScaleSM","depthValuesSM","lightDataSM","softTransparentShadowSM")}h.mainDrawWrapper.effect=s.createEffect({vertexSource:m,fragmentSource:_,vertexToken:h.token,fragmentToken:h.token},{attributes:l.getAttributesNames(),uniformsNames:f,uniformBuffersNames:l.getUniformBuffersNames(),samplers:l.getSamplers(),defines:p+"\n"+l.defines.replace("#define SHADOWS","").replace(/#define SHADOW\d/g,""),indexParameters:l.getIndexParameters()},s);for(var x=0;x0&&Array.isArray(e[0])&&e[0].length>0&&e[0][0]instanceof C){var r=[];return e.forEach((function(e){r.push(e.flatMap((function(e){return[e.x,e.y,e.z]})))})),r}if(e instanceof Float32Array)return[Array.from(e)];if(e.length&&e[0]instanceof Float32Array){var o=[];return e.forEach((function(e){o.push(Array.from(e))})),o}return[]},e.OmitZeroLengthPredicate=function(e,t,n){var i=[];return t.subtract(e).lengthSquared()>0&&i.push([e,t]),n.subtract(t).lengthSquared()>0&&i.push([t,n]),e.subtract(n).lengthSquared()>0&&i.push([n,e]),0===i.length?null:i},e.OmitDuplicatesPredicate=function(t,n,i,r){var o=[];return e._SearchInPoints(t,n,r)||o.push([t,n]),e._SearchInPoints(n,i,r)||o.push([n,i]),e._SearchInPoints(i,t,r)||o.push([i,t]),0===o.length?null:o},e._SearchInPoints=function(e,t,n){for(var i,r,o,a=0,s=n;an?e.SegmentizeSegmentByCount(t.point1,t.point2,Math.ceil(t.length/n)).forEach((function(e){r.push(e)})):(r.push(t.point1),r.push(t.point2))})),r},e.SegmentizeLineBySegmentCount=function(t,n){var i="number"==typeof t[0]?e.ToVector3Array(t):t,r=e.GetLineLength(i)/n;return e.SegmentizeLineBySegmentLength(i,r)},e.GetLineSegments=function(e){for(var t=[],n=0;n\nattribute float grl_widths;attribute vec3 grl_offsets;attribute float grl_colorPointers;attribute vec3 position;uniform mat4 viewProjection;uniform mat4 projection;varying float grlCounters;varying float grlColorPointer;\n#ifdef GREASED_LINE_CAMERA_FACING\nattribute vec4 grl_nextAndCounters;attribute vec4 grl_previousAndSide;uniform vec2 grlResolution;uniform float grlAspect;uniform float grlWidth;uniform float grlSizeAttenuation;vec2 grlFix( vec4 i,float aspect ) {vec2 res=i.xy/i.w;res.x*=aspect;return res;}\n#else\nattribute vec3 grl_slopes;attribute float grl_counters;\n#endif\nvoid main() {\n#include\ngrlColorPointer=grl_colorPointers;\n#ifdef GREASED_LINE_CAMERA_FACING\nfloat grlBaseWidth=grlWidth;vec3 grlPrevious=grl_previousAndSide.xyz;float grlSide=grl_previousAndSide.w;vec3 grlNext=grl_nextAndCounters.xyz;grlCounters=grl_nextAndCounters.w;mat4 grlMatrix=viewProjection*finalWorld ;vec3 grlPositionOffset=grl_offsets;vec4 grlFinalPosition=grlMatrix*vec4( position+grlPositionOffset ,1.0 );vec4 grlPrevPos=grlMatrix*vec4( grlPrevious+grlPositionOffset,1.0 );vec4 grlNextPos=grlMatrix*vec4( grlNext+grlPositionOffset,1.0 );vec2 grlCurrentP=grlFix( grlFinalPosition,grlAspect );vec2 grlPrevP=grlFix( grlPrevPos,grlAspect );vec2 grlNextP=grlFix( grlNextPos,grlAspect );float grlWidth=grlBaseWidth*grl_widths;vec2 grlDir;if( grlNextP==grlCurrentP ) grlDir=normalize( grlCurrentP-grlPrevP );else if( grlPrevP==grlCurrentP ) grlDir=normalize( grlNextP-grlCurrentP );else {vec2 grlDir1=normalize( grlCurrentP-grlPrevP );vec2 grlDir2=normalize( grlNextP-grlCurrentP );grlDir=normalize( grlDir1+grlDir2 );}\nvec4 grlNormal=vec4( -grlDir.y,grlDir.x,0.,1. );\n#ifdef GREASED_LINE_RIGHT_HANDED_COORDINATE_SYSTEM\ngrlNormal.xy*=-.5*grlWidth;\n#else\ngrlNormal.xy*=.5*grlWidth;\n#endif\ngrlNormal*=projection;if (grlSizeAttenuation==1.) {grlNormal.xy*=grlFinalPosition.w;grlNormal.xy/=( vec4( grlResolution,0.,1. )*projection ).xy;}\ngrlFinalPosition.xy+=grlNormal.xy*grlSide;gl_Position=grlFinalPosition;\n#else\ngrlCounters=grl_counters;vec4 grlFinalPosition=worldViewProjection*vec4( (position+grl_offsets)+grl_slopes*grl_widths ,1.0 ) ;gl_Position=grlFinalPosition;\n#endif\n}\n";var Eb,Ab=function(e){function t(t,n,i){var r,o,a,s,c,l,u,h,d,p,f,m,_,g,y=this,v=["COLOR_DISTRIBUTION_TYPE_LINE ".concat(ob.COLOR_DISTRIBUTION_TYPE_LINE,"."),"COLOR_DISTRIBUTION_TYPE_SEGMENT ".concat(ob.COLOR_DISTRIBUTION_TYPE_SEGMENT,"."),"COLOR_MODE_SET ".concat(rb.COLOR_MODE_SET,"."),"COLOR_MODE_ADD ".concat(rb.COLOR_MODE_ADD,"."),"COLOR_MODE_MULTIPLY ".concat(rb.COLOR_MODE_MULTIPLY,".")],b=["position","grl_widths","grl_offsets","grl_colorPointers"];n.useRightHandedSystem&&v.push("GREASED_LINE_RIGHT_HANDED_COORDINATE_SYSTEM"),i.cameraFacing?(v.push("GREASED_LINE_CAMERA_FACING"),b.push("grl_previousAndSide","grl_nextAndCounters")):(b.push("grl_slopes"),b.push("grl_counters")),(y=e.call(this,t,n,{vertex:"greasedLine",fragment:"greasedLine"},{attributes:b,uniforms:["world","viewProjection","view","projection","grlColorsWidth","grlUseColors","grlWidth","grlColor","grl_colorModeAndColorDistributionType","grlResolution","grlAspect","grlAizeAttenuation","grlDashArray","grlDashOffset","grlDashRatio","grlUseDash","grlVisibility"],samplers:["grlColors"],defines:v})||this)._color=B.White(),y._colorsDistributionType=ob.COLOR_DISTRIBUTION_TYPE_SEGMENT,y._colorsTexture=null,i=i||{color:yb.DEFAULT_COLOR};var T=n.getEngine();return y.visibility=null!==(r=i.visibility)&&void 0!==r?r:1,y.useDash=null!==(o=i.useDash)&&void 0!==o&&o,y.dashRatio=null!==(a=i.dashRatio)&&void 0!==a?a:.5,y.dashOffset=null!==(s=i.dashOffset)&&void 0!==s?s:0,y.dashCount=null!==(c=i.dashCount)&&void 0!==c?c:1,y.width=i.width?i.width:i.sizeAttenuation&&i.cameraFacing?yb.DEFAULT_WIDTH_ATTENUATED:yb.DEFAULT_WIDTH,y.sizeAttenuation=null!==(l=i.sizeAttenuation)&&void 0!==l&&l,y.color=null!==(u=i.color)&&void 0!==u?u:B.White(),y.useColors=null!==(h=i.useColors)&&void 0!==h&&h,y.colorsDistributionType=null!==(d=i.colorDistributionType)&&void 0!==d?d:ob.COLOR_DISTRIBUTION_TYPE_SEGMENT,y.colorsSampling=null!==(p=i.colorsSampling)&&void 0!==p?p:Co.NEAREST_NEAREST,y.colorMode=null!==(f=i.colorMode)&&void 0!==f?f:rb.COLOR_MODE_SET,y._colors=null!==(m=i.colors)&&void 0!==m?m:null,y._cameraFacing=null===(_=i.cameraFacing)||void 0===_||_,y.resolution=null!==(g=i.resolution)&&void 0!==g?g:new S(T.getRenderWidth(),T.getRenderHeight()),i.colorsTexture?y.colorsTexture=i.colorsTexture:y.colorsTexture=vb.PrepareEmptyColorsTexture(n),y._colors&&y.setColors(y._colors),T.onDisposeObservable.add((function(){vb.DisposeEmptyColorsTexture()})),y}return H(t,e),t.prototype.dispose=function(){var t;null===(t=this._colorsTexture)||void 0===t||t.dispose(),e.prototype.dispose.call(this)},t.prototype._setColorModeAndColorDistributionType=function(){this.setVector2("grl_colorModeAndColorDistributionType",new S(this._colorMode,this._colorsDistributionType))},t.prototype.updateLazy=function(){this._colors&&this.setColors(this._colors,!1,!0)},Object.defineProperty(t.prototype,"colors",{get:function(){return this._colors},set:function(e){this.setColors(e)},enumerable:!1,configurable:!0}),t.prototype.setColors=function(e,t,n){var i,r,o,a;void 0===t&&(t=!1),void 0===n&&(n=!1);var s=null!==(r=null===(i=this._colors)||void 0===i?void 0:i.length)&&void 0!==r?r:0;if(this._colors=e,null!==e&&0!==e.length){if(!t||n)if(this._colorsTexture&&s===e.length&&!n){var c=vb.Color3toRGBAUint8(e);this._colorsTexture.update(c)}else null===(a=this._colorsTexture)||void 0===a||a.dispose(),this.colorsTexture=vb.CreateColorsTexture("".concat(this.name,"-colors-texture"),e,this.colorsSampling,this.getScene())}else null===(o=this._colorsTexture)||void 0===o||o.dispose()},Object.defineProperty(t.prototype,"colorsTexture",{get:function(){var e;return null!==(e=this._colorsTexture)&&void 0!==e?e:null},set:function(e){this._colorsTexture=e,this.setFloat("grlColorsWidth",this._colorsTexture.getSize().width),this.setTexture("grlColors",this._colorsTexture)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e,this.setFloat("grlWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useColors",{get:function(){return this._useColors},set:function(e){this._useColors=e,this.setFloat("grlUseColors",vb.BooleanToNumber(e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorsSampling",{get:function(){return this._colorsSampling},set:function(e){this._colorsSampling=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibility",{get:function(){return this._visibility},set:function(e){this._visibility=e,this.setFloat("grlVisibility",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useDash",{get:function(){return this._useDash},set:function(e){this._useDash=e,this.setFloat("grlUseDash",vb.BooleanToNumber(e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dashOffset",{get:function(){return this._dashOffset},set:function(e){this._dashOffset=e,this.setFloat("grlDashOffset",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dashRatio",{get:function(){return this._dashRatio},set:function(e){this._dashRatio=e,this.setFloat("grlDashRatio",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dashCount",{get:function(){return this._dashCount},set:function(e){this._dashCount=e,this._dashArray=1/e,this.setFloat("grlDashArray",this._dashArray)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeAttenuation",{get:function(){return this._sizeAttenuation},set:function(e){this._sizeAttenuation=e,this.setFloat("grlSizeAttenuation",vb.BooleanToNumber(e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.color},set:function(e){this.setColor(e)},enumerable:!1,configurable:!0}),t.prototype.setColor=function(e){e=null!=e?e:yb.DEFAULT_COLOR,this._color=e,this.setColor3("grlColor",e)},Object.defineProperty(t.prototype,"colorsDistributionType",{get:function(){return this._colorsDistributionType},set:function(e){this._colorsDistributionType=e,this._setColorModeAndColorDistributionType()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorMode",{get:function(){return this._colorMode},set:function(e){this._colorMode=e,this._setColorModeAndColorDistributionType()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resolution",{get:function(){return this._resolution},set:function(e){this._resolution=e,this.setVector2("grlResolution",e),this.setFloat("grlAspect",e.x/e.y)},enumerable:!1,configurable:!0}),t.prototype.serialize=function(){var t=e.prototype.serialize.call(this),n={colorDistributionType:this._colorsDistributionType,colorsSampling:this._colorsSampling,colorMode:this._colorMode,color:this._color,dashCount:this._dashCount,dashOffset:this._dashOffset,dashRatio:this._dashRatio,resolution:this._resolution,sizeAttenuation:this._sizeAttenuation,useColors:this._useColors,useDash:this._useDash,visibility:this._visibility,width:this._width,cameraFacing:this._cameraFacing};return this._colors&&(n.colors=this._colors),t.greasedLineMaterialOptions=n,t},t.prototype.parse=function(e,t,n){var i,r,o=e.greasedLineMaterialOptions;null===(i=this._colorsTexture)||void 0===i||i.dispose(),o.color&&(this.color=o.color),o.colorDistributionType&&(this.colorsDistributionType=o.colorDistributionType),o.colorsSampling&&(this.colorsSampling=o.colorsSampling),o.colorMode&&(this.colorMode=o.colorMode),o.useColors&&(this.useColors=o.useColors),o.visibility&&(this.visibility=o.visibility),o.useDash&&(this.useDash=o.useDash),o.dashCount&&(this.dashCount=o.dashCount),o.dashRatio&&(this.dashRatio=o.dashRatio),o.dashOffset&&(this.dashOffset=o.dashOffset),o.width&&(this.width=o.width),o.sizeAttenuation&&(this.sizeAttenuation=o.sizeAttenuation),o.resolution&&(this.resolution=o.resolution),o.colors?this.colorsTexture=vb.CreateColorsTexture("".concat(this.name,"-colors-texture"),o.colors,this.colorsSampling,this.getScene()):this.colorsTexture=vb.PrepareEmptyColorsTexture(t),this._cameraFacing=null===(r=o.cameraFacing)||void 0===r||r,this.setDefine("GREASED_LINE_CAMERA_FACING",this._cameraFacing)},t}(ku),xb=[new B(.98,.26,.38),new B(.47,.75,.3),new B(0,.26,.77),new B(.97,.6,.76),new B(.19,.63,.78),new B(.98,.8,.6),new B(.65,.43,.15),new B(.15,.47,.22),new B(.67,.71,.86),new B(.09,.46,.56),new B(.8,.98,.02),new B(.39,.29,.13),new B(.53,.63,.06),new B(.95,.96,.41),new B(1,.72,.94),new B(.63,.08,.31),new B(.66,.96,.95),new B(.22,.14,.19),new B(.14,.65,.59),new B(.93,1,.68),new B(.93,.14,.44),new B(.47,.86,.67),new B(.85,.07,.78),new B(.53,.64,.98),new B(.43,.37,.56),new B(.71,.65,.25),new B(.66,.19,.01),new B(.94,.53,.12),new B(.41,.44,.44),new B(.24,.71,.96),new B(.57,.28,.56),new B(.44,.98,.42)];!function(e){e[e.NONE=0]="NONE",e[e.TRIANGLES=1]="TRIANGLES",e[e.VERTICES=2]="VERTICES",e[e.TRIANGLES_VERTICES=3]="TRIANGLES_VERTICES",e[e.UV0=4]="UV0",e[e.UV1=5]="UV1",e[e.VERTEXCOLORS=6]="VERTEXCOLORS",e[e.MATERIALIDS=7]="MATERIALIDS"}(Eb||(Eb={}));var Sb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.DBG_MODE=Eb.NONE,t.DBG_MULTIPLY=!0,t.DBG_ENABLED=!0,t}return H(t,e),t}(Dn),Cb=function(e){function t(n,i){void 0===i&&(i={});var r,o,a,s,c,l,u,h,d,p,f,m,_,g=this,y=new Sb;return y.DBG_MODE=null!==(r=i.mode)&&void 0!==r?r:y.DBG_MODE,y.DBG_MULTIPLY=null!==(o=i.multiply)&&void 0!==o?o:y.DBG_MULTIPLY,(g=e.call(this,n,"MeshDebug",200,y,!0,!0)||this)._mode=y.DBG_MODE,g._multiply=y.DBG_MULTIPLY,g.shadedDiffuseColor=null!==(a=i.shadedDiffuseColor)&&void 0!==a?a:new B(1,1,1),g.shadedSpecularColor=null!==(s=i.shadedSpecularColor)&&void 0!==s?s:new B(.8,.8,.8),g.shadedSpecularPower=null!==(c=i.shadedSpecularPower)&&void 0!==c?c:10,g.wireframeThickness=null!==(l=i.wireframeThickness)&&void 0!==l?l:.7,g.wireframeTrianglesColor=null!==(u=i.wireframeTrianglesColor)&&void 0!==u?u:new B(0,0,0),g.wireframeVerticesColor=null!==(h=i.wireframeVerticesColor)&&void 0!==h?h:new B(.8,.8,.8),g.vertexColor=null!==(d=i.vertexColor)&&void 0!==d?d:new B(0,0,0),g.vertexRadius=null!==(p=i.vertexRadius)&&void 0!==p?p:1.2,g.uvScale=null!==(f=i.uvScale)&&void 0!==f?f:20,g.uvPrimaryColor=null!==(m=i.uvPrimaryColor)&&void 0!==m?m:new B(1,1,1),g.uvSecondaryColor=null!==(_=i.uvSecondaryColor)&&void 0!==_?_:new B(.5,.5,.5),g._materialColor=t.MaterialColors[t._PluginCount++%t.MaterialColors.length],g.isEnabled=!0,g}return H(t,e),t.prototype._markAllDefinesAsDirty=function(){this._enable(this._isEnabled),this.markAllDefinesAsDirty()},t.prototype.getClassName=function(){return"MeshDebugPluginMaterial"},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){if(this._isEnabled!==e){if(!this._material.getScene().getEngine().isWebGPU&&1==this._material.getScene().getEngine().webGLVersion)return J.Error("MeshDebugPluginMaterial is not supported on WebGL 1.0."),void(this._isEnabled=!1);this._isEnabled=e,this._markAllDefinesAsDirty()}},enumerable:!1,configurable:!0}),t.prototype.prepareDefines=function(e,t,n){this._mode!=Eb.VERTICES&&this._mode!=Eb.TRIANGLES&&this._mode!=Eb.TRIANGLES_VERTICES||n.isVerticesDataPresent("dbg_initialPass")||J.Warn("For best results with TRIANGLES, TRIANGLES_VERTICES, or VERTICES modes, please use MeshDebugPluginMaterial.PrepareMeshForTrianglesAndVerticesMode() on mesh.",1),e.DBG_MODE=this._mode,e.DBG_MULTIPLY=this._multiply,e.DBG_ENABLED=this._isEnabled},t.prototype.getAttributes=function(e){e.push("dbg_initialPass")},t.prototype.getUniforms=function(){return{ubo:[{name:"dbg_shadedDiffuseColor",size:3,type:"vec3"},{name:"dbg_shadedSpecularColorPower",size:4,type:"vec4"},{name:"dbg_thicknessRadiusScale",size:3,type:"vec3"},{name:"dbg_wireframeTrianglesColor",size:3,type:"vec3"},{name:"dbg_wireframeVerticesColor",size:3,type:"vec3"},{name:"dbg_vertexColor",size:3,type:"vec3"},{name:"dbg_uvPrimaryColor",size:3,type:"vec3"},{name:"dbg_uvSecondaryColor",size:3,type:"vec3"},{name:"dbg_materialColor",size:3,type:"vec3"}],fragment:"#if defined(DBG_ENABLED)\nuniform vec3 dbg_shadedDiffuseColor;\nuniform vec4 dbg_shadedSpecularColorPower;\nuniform vec3 dbg_thicknessRadiusScale;\n\n#if DBG_MODE == 2 || DBG_MODE == 3\n uniform vec3 dbg_vertexColor;\n#endif\n\n#if DBG_MODE == 1\n uniform vec3 dbg_wireframeTrianglesColor;\n#elif DBG_MODE == 3\n uniform vec3 dbg_wireframeVerticesColor;\n#elif DBG_MODE == 4 || DBG_MODE == 5\n uniform vec3 dbg_uvPrimaryColor;\n uniform vec3 dbg_uvSecondaryColor;\n#elif DBG_MODE == 7\n uniform vec3 dbg_materialColor;\n#endif\n#endif"}},t.prototype.bindForSubMesh=function(e){this._isEnabled&&(e.updateFloat3("dbg_shadedDiffuseColor",this.shadedDiffuseColor.r,this.shadedDiffuseColor.g,this.shadedDiffuseColor.b),e.updateFloat4("dbg_shadedSpecularColorPower",this.shadedSpecularColor.r,this.shadedSpecularColor.g,this.shadedSpecularColor.b,this.shadedSpecularPower),e.updateFloat3("dbg_thicknessRadiusScale",this.wireframeThickness,this.vertexRadius,this.uvScale),e.updateColor3("dbg_wireframeTrianglesColor",this.wireframeTrianglesColor),e.updateColor3("dbg_wireframeVerticesColor",this.wireframeVerticesColor),e.updateColor3("dbg_vertexColor",this.vertexColor),e.updateColor3("dbg_uvPrimaryColor",this.uvPrimaryColor),e.updateColor3("dbg_uvSecondaryColor",this.uvSecondaryColor),e.updateColor3("dbg_materialColor",this._materialColor))},t.prototype.getCustomCode=function(e){return"vertex"===e?{CUSTOM_VERTEX_DEFINITIONS:"#if defined(DBG_ENABLED)\nattribute float dbg_initialPass;\nvarying vec3 dbg_vBarycentric;\nflat varying vec3 dbg_vVertexWorldPos;\nflat varying float dbg_vPass;\n#endif",CUSTOM_VERTEX_MAIN_END:"#if defined(DBG_ENABLED)\nfloat dbg_vertexIndex = mod(float(gl_VertexID), 3.);\nif (dbg_vertexIndex == 0.0) { \n dbg_vBarycentric = vec3(1.,0.,0.); \n}\nelse if (dbg_vertexIndex == 1.0) { \n dbg_vBarycentric = vec3(0.,1.,0.); \n}\nelse { \n dbg_vBarycentric = vec3(0.,0.,1.); \n}\n\ndbg_vVertexWorldPos = vPositionW;\ndbg_vPass = dbg_initialPass;\n#endif"}:{CUSTOM_FRAGMENT_DEFINITIONS:"#if defined(DBG_ENABLED)\nvarying vec3 dbg_vBarycentric;\nflat varying vec3 dbg_vVertexWorldPos;\nflat varying float dbg_vPass;\n\n#if !defined(DBG_MULTIPLY)\n vec3 dbg_applyShading(vec3 color) {\n vec3 N = vNormalW.xyz;\n vec3 L = normalize(vEyePosition.xyz - vPositionW.xyz);\n vec3 H = normalize(L + L);\n float LdotN = clamp(dot(L,N), 0., 1.);\n float HdotN = clamp(dot(H,N), 0., 1.);\n float specTerm = pow(HdotN, dbg_shadedSpecularColorPower.w);\n color *= (LdotN / PI);\n color += dbg_shadedSpecularColorPower.rgb * (specTerm / PI);\n return color;\n }\n#endif\n\n#if DBG_MODE == 1 || DBG_MODE == 3\n float dbg_edgeFactor() {\n vec3 d = fwidth(dbg_vBarycentric);\n vec3 a3 = smoothstep(vec3(0.), d * dbg_thicknessRadiusScale.x, dbg_vBarycentric);\n return min(min(a3.x, a3.y), a3.z);\n }\n#endif\n\n#if DBG_MODE == 2 || DBG_MODE == 3\n float dbg_cornerFactor() {\n vec3 worldPos = vPositionW;\n float dist = length(worldPos - dbg_vVertexWorldPos);\n float camDist = length(worldPos - vEyePosition.xyz);\n float d = sqrt(camDist) * .001;\n return smoothstep((dbg_thicknessRadiusScale.y * d), ((dbg_thicknessRadiusScale.y * 1.01) * d), dist);\n }\n#endif\n\n#if (DBG_MODE == 4 && defined(UV1)) || (DBG_MODE == 5 && defined(UV2))\n float dbg_checkerboardFactor(vec2 uv) {\n vec2 f = fract(uv * dbg_thicknessRadiusScale.z);\n f -= .5;\n return (f.x * f.y) > 0. ? 1. : 0.;\n }\n#endif\n#endif",CUSTOM_FRAGMENT_MAIN_END:"#if defined(DBG_ENABLED)\nvec3 dbg_color = vec3(1.);\n#if DBG_MODE == 1\n dbg_color = mix(dbg_wireframeTrianglesColor, vec3(1.), dbg_edgeFactor());\n#elif DBG_MODE == 2 || DBG_MODE == 3\n float dbg_cornerFactor = dbg_cornerFactor();\n if (dbg_vPass == 0. && dbg_cornerFactor == 1.) discard;\n dbg_color = mix(dbg_vertexColor, vec3(1.), dbg_cornerFactor);\n #if DBG_MODE == 3\n dbg_color *= mix(dbg_wireframeVerticesColor, vec3(1.), dbg_edgeFactor());\n #endif\n#elif DBG_MODE == 4 && defined(UV1)\n dbg_color = mix(dbg_uvPrimaryColor, dbg_uvSecondaryColor, dbg_checkerboardFactor(vMainUV1));\n#elif DBG_MODE == 5 && defined(UV2)\n dbg_color = mix(dbg_uvPrimaryColor, dbg_uvSecondaryColor, dbg_checkerboardFactor(vMainUV2));\n#elif DBG_MODE == 6 && defined(VERTEXCOLOR)\n dbg_color = vColor.rgb;\n#elif DBG_MODE == 7\n dbg_color = dbg_materialColor;\n#endif\n\n#if defined(DBG_MULTIPLY)\n gl_FragColor *= vec4(dbg_color, 1.);\n#else\n #if DBG_MODE != 6\n gl_FragColor = vec4(dbg_applyShading(dbg_shadedDiffuseColor) * dbg_color, 1.);\n #else\n gl_FragColor = vec4(dbg_color, 1.);\n #endif\n#endif\n#endif"}},t.Reset=function(){this._PluginCount=0,this.MaterialColors=xb},t.PrepareMeshForTrianglesAndVerticesMode=function(e,t){void 0===t&&(t=!1);var n=function(){};if(0==e.getTotalIndices())return n;if(t){for(var i=e.getVerticesDataKinds(),r=e.getIndices(),o={},a=0,s=i;ae.EPSILON?1:0;c|=u,l.push(u)}switch(c){case 0:(C.Dot(this.normal,t.plane.normal)>0?n:i).push(t);break;case 1:r.push(t);break;case 2:o.push(t);break;case 3:var h=[],d=[];for(a=0;a=3&&(v=new Fb(h,t.shared)).plane&&r.push(v),d.length>=3&&(v=new Fb(d,t.shared)).plane&&o.push(v)}},e.EPSILON=1e-5,e}(),Fb=function(){function e(e,t){this.vertices=e,this.shared=t,this.plane=Lb.FromPoints(e[0].pos,e[1].pos,e[2].pos)}return e.prototype.clone=function(){return new e(this.vertices.map((function(e){return e.clone()})),this.shared)},e.prototype.flip=function(){this.vertices.reverse().map((function(e){e.flip()})),this.plane.flip()},e}(),Bb=function(){function e(e){this._plane=null,this._front=null,this._back=null,this._polygons=new Array,e&&this.build(e)}return e.prototype.clone=function(){var t=new e;return t._plane=this._plane&&this._plane.clone(),t._front=this._front&&this._front.clone(),t._back=this._back&&this._back.clone(),t._polygons=this._polygons.map((function(e){return e.clone()})),t},e.prototype.invert=function(){for(var e=0;e\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\nvoid main(void) {vec3 positionUpdated=position;vec3 normalUpdated=normal;\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\n#include\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);mat3 normWorldSM=mat3(finalWorld);vec3 vNormalW;\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvNormalW=normalUpdated/vec3(dot(normWorldSM[0],normWorldSM[0]),dot(normWorldSM[1],normWorldSM[1]),dot(normWorldSM[2],normWorldSM[2]));vNormalW=normalize(normWorldSM*vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormWorldSM=transposeMat3(inverseMat3(normWorldSM));\n#endif\nvNormalW=normalize(normWorldSM*normalUpdated);\n#endif\nvec3 normalView=normalize((projMatrix*vec4(vNormalW,0.0)).xyz);vec3 decalTC=(projMatrix*worldPos).xyz;vDecalTC=decalTC.xy;gl_Position=vec4(uv*2.0-1.0,normalView.z>0.0 ? 2. : decalTC.z,1.0);}",Vt.ShadersStore.meshUVSpaceRendererPixelShader="precision highp float;varying vec2 vDecalTC;uniform sampler2D textureSampler;void main(void) {if (vDecalTC.x<0. || vDecalTC.x>1. || vDecalTC.y<0. || vDecalTC.y>1.) {discard;}\ngl_FragColor=texture2D(textureSampler,vDecalTC);}\n",Vt.ShadersStore.meshUVSpaceRendererMaskerVertexShader="attribute vec2 uv;varying vec2 vUV;void main(void) {gl_Position=vec4(vec2(uv.x,uv.y)*2.0-1.0,0.,1.0);vUV=uv;}",Vt.ShadersStore.meshUVSpaceRendererMaskerPixelShader="varying vec2 vUV;void main(void) {gl_FragColor=vec4(1.0,1.0,1.0,1.0);}\n",Vt.ShadersStore.meshUVSpaceRendererFinaliserPixelShader="precision highp float;varying vec2 vUV;uniform sampler2D textureSampler;uniform sampler2D maskTextureSampler;uniform vec2 textureSize;void main() {vec4 mask=texture2D(maskTextureSampler,vUV).rgba;if (mask.r>0.5) {gl_FragColor=texture2D(textureSampler,vUV);} else {vec2 texelSize=4.0/textureSize;vec2 uv_p01=vUV+vec2(-1.0,0.0)*texelSize;vec2 uv_p21=vUV+vec2(1.0,0.0)*texelSize;vec2 uv_p10=vUV+vec2(0.0,-1.0)*texelSize;vec2 uv_p12=vUV+vec2(0.0,1.0)*texelSize;float mask_p01=texture2D(maskTextureSampler,uv_p01).r;float mask_p21=texture2D(maskTextureSampler,uv_p21).r;float mask_p10=texture2D(maskTextureSampler,uv_p10).r;float mask_p12=texture2D(maskTextureSampler,uv_p12).r;vec4 col=vec4(0.0,0.0,0.0,0.0);float total_weight=0.0;if (mask_p01>0.5) {col+=texture2D(textureSampler,uv_p01);total_weight+=1.0;}\nif (mask_p21>0.5) {col+=texture2D(textureSampler,uv_p21);total_weight+=1.0;}\nif (mask_p10>0.5) {col+=texture2D(textureSampler,uv_p10);total_weight+=1.0;}\nif (mask_p12>0.5) {col+=texture2D(textureSampler,uv_p12);total_weight+=1.0;}\nif (total_weight>0.0) {gl_FragColor=col/total_weight;} else {gl_FragColor=col;}}}\n",Vt.ShadersStore.meshUVSpaceRendererFinaliserVertexShader="precision highp float;attribute vec3 position;attribute vec2 uv;uniform mat4 worldViewProjection;varying vec2 vUV;void main() {gl_Position=worldViewProjection*vec4(position,1.0);vUV=uv;}\n";var kb=function(){function e(e,t,n){this._textureCreatedInternally=!1,this._configureUserCreatedTexture=!0,this._maskTexture=null,this._finalPostProcess=null,this.clearColor=new U(0,0,0,0),this._mesh=e,this._scene=t,this._options=j({width:1024,height:1024,textureType:a.TEXTURETYPE_UNSIGNED_BYTE,generateMipMaps:!0,optimizeUVAllocation:!0,uvEdgeBlending:!1},n)}return e._GetShader=function(e){if(!e._meshUVSpaceRendererShader){var t=new ku("meshUVSpaceRendererShader",e,{vertex:"meshUVSpaceRenderer",fragment:"meshUVSpaceRenderer"},{attributes:["position","normal","uv"],uniforms:["world","projMatrix"],samplers:["textureSampler"],needAlphaBlending:!0});t.backFaceCulling=!1,t.alphaMode=a.ALPHA_COMBINE,e.onDisposeObservable.add((function(){var t;null===(t=e._meshUVSpaceRendererShader)||void 0===t||t.dispose(),e._meshUVSpaceRendererShader=null})),e._meshUVSpaceRendererShader=t}return e._meshUVSpaceRendererShader},e._GetMaskShader=function(e){if(!e._meshUVSpaceRendererMaskShader){var t=new ku("meshUVSpaceRendererMaskShader",e,{vertex:"meshUVSpaceRendererMasker",fragment:"meshUVSpaceRendererMasker"},{attributes:["position","uv"],uniforms:["worldViewProjection"]});t.backFaceCulling=!1,t.alphaMode=a.ALPHA_COMBINE,e.onDisposeObservable.add((function(){var t;null===(t=e._meshUVSpaceRendererMaskShader)||void 0===t||t.dispose(),e._meshUVSpaceRendererMaskShader=null})),e._meshUVSpaceRendererMaskShader=t}return e._meshUVSpaceRendererMaskShader},e._IsRenderTargetTexture=function(e){return void 0!==e.renderList},e.prototype.isReady=function(){var t,n,i,r;this.texture||this._createDiffuseRTT();var o=e._IsRenderTargetTexture(this.texture)?this.texture.isReadyForRendering():this.texture.isReady(),a=null===(n=null===(t=this._maskTexture)||void 0===t?void 0:t.isReadyForRendering())||void 0===n||n,s=null===(r=null===(i=this._finalPostProcess)||void 0===i?void 0:i.isReady())||void 0===r||r;return o&&a&&s},e.prototype.renderTexture=function(t,n,i,r,o){if(void 0===o&&(o=0),this.texture?this._configureUserCreatedTexture&&this._configureUserCreatedRTT():this._createDiffuseRTT(),e._IsRenderTargetTexture(this.texture)){var a=this._createProjectionMatrix(n,i,r,o),s=e._GetShader(this._scene);s.setTexture("textureSampler",t),s.setMatrix("projMatrix",a),this.texture.render()}},e.prototype.clear=function(){var t,n,i,r;e._IsRenderTargetTexture(this.texture)&&this.texture.renderTarget&&((r=this._scene.getEngine()).bindFramebuffer(this.texture.renderTarget),r.clear(this.clearColor,!0,!0,!0),r.unBindFramebuffer(this.texture.renderTarget)),(null===(t=this._finalPostProcess)||void 0===t?void 0:t.inputTexture)&&((r=this._scene.getEngine()).bindFramebuffer(null===(n=this._finalPostProcess)||void 0===n?void 0:n.inputTexture),r.clear(this.clearColor,!0,!0,!0),r.unBindFramebuffer(null===(i=this._finalPostProcess)||void 0===i?void 0:i.inputTexture))},e.prototype.dispose=function(){var e,t;this._textureCreatedInternally&&(this.texture.dispose(),this._textureCreatedInternally=!1),this._configureUserCreatedTexture=!0,null===(e=this._maskTexture)||void 0===e||e.dispose(),this._maskTexture=null,null===(t=this._finalPostProcess)||void 0===t||t.dispose(),this._finalPostProcess=null},e.prototype._configureUserCreatedRTT=function(){this._configureUserCreatedTexture=!1,e._IsRenderTargetTexture(this.texture)&&(this.texture.setMaterialForRendering(this._mesh,e._GetShader(this._scene)),this.texture.onClearObservable.add((function(){})),this.texture.renderList=[this._mesh],this._options.uvEdgeBlending&&(this._createMaskTexture(),this._createPostProcess(),this.texture.addPostProcess(this._finalPostProcess)))},e.prototype._createDiffuseRTT=function(){this._textureCreatedInternally=!0;var t=this._createRenderTargetTexture(this._options.width,this._options.height);t.setMaterialForRendering(this._mesh,e._GetShader(this._scene)),this.texture=t,this._configureUserCreatedTexture=!1,this._options.uvEdgeBlending&&(this._createMaskTexture(),this._createPostProcess(),t.addPostProcess(this._finalPostProcess))},e.prototype._createMaskTexture=function(){this._maskTexture||(this._maskTexture=new rs(this._mesh.name+"_maskTexture",{width:this._options.width,height:this._options.height},this._scene,!1,!0,a.TEXTURETYPE_UNSIGNED_BYTE,!1,a.TEXTURE_BILINEAR_SAMPLINGMODE,void 0,void 0,void 0,a.TEXTUREFORMAT_R),this._maskTexture.clearColor=new U(0,0,0,0),this._maskTexture.renderList.push(this._mesh),this._maskTexture.setMaterialForRendering(this._mesh,e._GetMaskShader(this._scene)),this._maskTexture.refreshRate=rs.REFRESHRATE_RENDER_ONCE,this._scene.customRenderTargets.push(this._maskTexture))},e.prototype._createPostProcess=function(){var e=this;this._finalPostProcess||(this._finalPostProcess=new Da(this._mesh.name+"_fixSeamsPostProcess","meshUVSpaceRendererFinaliser",["textureSize"],["textureSampler","maskTextureSampler"],1,null,a.TEXTURE_NEAREST_SAMPLINGMODE,this._scene.getEngine(),!1,null,this._options.textureType),this._finalPostProcess.onApplyObservable.add((function(t){t.setTexture("maskTextureSampler",e._maskTexture),t.setFloat2("textureSize",e._options.width,e._options.height)})))},e.prototype._createRenderTargetTexture=function(e,t){var n=this,i=new rs(this._mesh.name+"_uvspaceTexture",{width:e,height:t},this._scene,this._options.generateMipMaps,!0,this._options.textureType,!1,this._options.generateMipMaps?a.TEXTURE_TRILINEAR_SAMPLINGMODE:a.TEXTURE_BILINEAR_SAMPLINGMODE,!1,!1,!1,a.TEXTUREFORMAT_RGBA);return i.renderParticles=!1,i.optimizeUVAllocation=!!this._options.optimizeUVAllocation,i.onClearObservable.addOnce((function(){n._scene.getEngine().clear(n.clearColor,!0,!0,!0),i.onClearObservable.add((function(){}))})),i.renderList=[this._mesh],i},e.prototype._createProjectionMatrix=function(e,t,n,i){void 0===i&&(i=0);var r=-Math.atan2(t.z,t.x)-Math.PI/2,o=Math.sqrt(t.x*t.x+t.z*t.z),a=Math.atan2(t.y,o),s=e.add(t.scale(.5*n.z)),c=R.RotationYawPitchRoll(r,a,i).multiply(R.Translation(s.x,s.y,s.z)),l=R.Invert(c),u=R.FromArray([2/n.x,0,0,0,0,2/n.y,0,0,0,0,1/n.z,0,0,0,0,1]),h=R.FromArray([.5,0,0,0,0,.5,0,0,0,0,1,0,.5,.5,0,1]);return l.multiply(u).multiply(h)},e}();no._TrailMeshParser=function(e,t){return zb.Parse(e,t)};var Vb,zb=function(e){function t(t,n,i,r,o,a){void 0===r&&(r=1),void 0===o&&(o=60),void 0===a&&(a=!0);var s=e.call(this,t,i)||this;s._sectionPolygonPointsCount=4,s._running=!1,s._autoStart=a,s._generator=n,s.diameter=r,s._length=o,s._sectionVectors=[],s._sectionNormalVectors=[];for(var c=0;cs||n.deleted||n.isDirty))for(var r=function(e){if(n.error[e]>0,(function(e){if(r){var t=e+a.verticesStart,o=C.FromArray(r,3*t),c=function(e){if(n)for(var t=0;t0&&this._reconstructedMesh.setVerticesData(Yn.NormalKind,a),s.length>0&&this._reconstructedMesh.setVerticesData(Yn.UVKind,s),c.length>0&&this._reconstructedMesh.setVerticesData(Yn.ColorKind,c);var b=this._mesh.subMeshes[e];e>0&&(this._reconstructedMesh.subMeshes=[],g.forEach((function(e){xr.AddToMesh(e.materialIndex,e.verticesStart,e.verticesCount,e.indexStart,e.indexCount,e.getMesh())})),xr.AddToMesh(b.materialIndex,_,d,m,3*r.length,this._reconstructedMesh))},e.prototype._initDecimatedMesh=function(){this._reconstructedMesh=new no(this._mesh.name+"Decimated",this._mesh.getScene()),this._reconstructedMesh.material=this._mesh.material,this._reconstructedMesh.parent=this._mesh.parent,this._reconstructedMesh.isVisible=!1,this._reconstructedMesh.renderingGroupId=this._mesh.renderingGroupId},e.prototype._isFlipped=function(e,t,n,i,r){for(var o=0;o.999)return!0;var d=C.Cross(u,h).normalize();if(i[o]=!1,C.Dot(d,a.normal)<.2)return!0}else i[o]=!0,r.push(a)}}return!1},e.prototype._updateTriangles=function(e,t,n,i){for(var r=i,o=0;o0&&(s=t._CopyV3(c,e),i.push(s[0],s[1],s[2]),i.push(s[0],s[1],s[2]));return s=t._CompareV3(a-1,0,e)?t._CopyV3(1,e):t._CopyV3(a-1,e),i.push(s[0],s[1],s[2]),i.push(s[0],s[1],s[2]),{previous:n,next:i,uvs:o,side:r}},t.prototype._createVertexBuffers=function(){var t=e.prototype._createVertexBuffers.call(this),n=this._scene.getEngine(),i=new Xn(n,this._previousAndSide,!1,4);this.setVerticesBuffer(i.createVertexBuffer("grl_previousAndSide",0,4));var r=new Xn(n,this._nextAndCounters,!1,4);this.setVerticesBuffer(r.createVertexBuffer("grl_nextAndCounters",0,4));var o=new Xn(n,this._widths,this._updatable,1);this.setVerticesBuffer(o.createVertexBuffer("grl_widths",0,1)),this._widthsBuffer=o;var a=new Xn(n,this._colorPointers,this._updatable,1);return this.setVerticesBuffer(a.createVertexBuffer("grl_colorPointers",0,1)),this._colorPointersBuffer=a,t},t._V_START=new C,t._V_END=new C,t._V_OFFSET_START=new C,t._V_OFFSET_END=new C,t}(Jb);no._GreasedLineRibbonMeshParser=function(e,t){return aT.Parse(e,t)};var tT,nT,iT,rT,oT,aT=function(e){function t(t,n,i,r){var o,a=this;if((a=e.call(this,t,n,i)||this).name=t,!i.ribbonOptions)throw"'GreasedLineMeshOptions.ribbonOptions' is not set.";return a._paths=[],a._counters=[],a._slopes=[],a._widths=null!==(o=i.widths)&&void 0!==o?o:[],a._ribbonWidths=[],a._pathsOptions=null!=r?r:[],i.points&&a.addPoints(vb.ConvertPoints(i.points),i,!!r),a}return H(t,e),t.prototype.addPoints=function(t,n,i){if(void 0===i&&(i=!1),!n.ribbonOptions)throw"addPoints() on GreasedLineRibbonMesh instance requires 'GreasedLineMeshOptions.ribbonOptions'.";i||this._pathsOptions.push({options:n,pathCount:t.length}),e.prototype.addPoints.call(this,t,n)},t.prototype.getClassName=function(){return"GreasedLineRibbonMesh"},Object.defineProperty(t.prototype,"isFlatLine",{get:function(){return this._paths.length<3},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"slopes",{get:function(){return this._slopes},set:function(e){this._slopes=e},enumerable:!1,configurable:!0}),t.prototype._updateColorPointers=function(){var e;if(!this._options.colorPointers){var t=0;this._colorPointers=[];for(var n=0;n2)for(l=0;l0&&(d[0]+=1,d[1]+=1),s.push(d[1]+(u%2!=0?o:0),d[0],d[2]),p&&s.push(d[0],d[1]+(u%2!=0?o:0),d[2]);else for(l=0;lf.y&&f.x>f.z?i?t._RightHandedForwardReadOnlyQuaternion:t._LeftHandedForwardReadOnlyQuaternion:t._LeftReadOnlyQuaternion),l=f.normalize()}u=l.multiplyByFloats(s,s,s),o.push(d.add(u)),a.push(d.subtract(u))}r||(o.push(c[c.length-1].add(u)),a.push(c[c.length-1].subtract(u)))}return[o,a]},t._GetDirectionFromPoints=function(e,n,i){return e.x!==n.x||i&&1!==(null==i?void 0:i.x)?e.y===n.y?t.DIRECTION_XZ:e.z===n.z?t.DIRECTION_XY:t.DIRECTION_XZ:t.DIRECTION_YZ},t.prototype.clone=function(e,n){void 0===e&&(e="".concat(this.name,"-cloned"));var i=this._createLineOptions(),r={},o=[];he.DeepCopy(this._pathsOptions,o,void 0,void 0,!0),he.DeepCopy(i,r,["instance"],void 0,!0);var a=new t(e,this._scene,r,o);return n&&(a.parent=n),a.material=this.material,a},t.prototype.serialize=function(t){e.prototype.serialize.call(this,t),t.type=this.getClassName(),t.lineOptions=this._createLineOptions(),t.pathsOptions=this._pathsOptions},t.Parse=function(e,n){var i=e.lineOptions;return new t(e.name,n,i,e.pathOptions)},t.prototype._initGreasedLine=function(){e.prototype._initGreasedLine.call(this),this._paths=[],this._counters=[],this._slopes=[],this._ribbonWidths=[]},t.prototype._calculateSegmentLengths=function(e){var t=e.length;this._vSegmentLengths=new Array(t),this._vTotalLengths=new Array(t);for(var n=0,i=0;i0){if(t.length%2!=0&&t.push(i),n===nT.WIDTH_DISTRIBUTION_START_END){for(var s=Math.floor(t.length/2),c=0,l=0;c0){if(n===tT.COLOR_DISTRIBUTION_START_END){for(var a=Math.floor(t.length/2),s=0;s=this._thinInstanceDataStorage.instancesCount)return!1;var i=this._thinInstanceDataStorage.matrixData;return t.copyToArray(i,16*e),this._thinInstanceDataStorage.worldMatrices&&(this._thinInstanceDataStorage.worldMatrices[e]=t),n&&(this.thinInstanceBufferUpdated("matrix"),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)),!0},no.prototype.thinInstanceSetAttributeAt=function(e,t,n,i){return void 0===i&&(i=!0),e===Yn.ColorKind&&(e=Yn.ColorInstanceKind),!(!this._userThinInstanceBuffersStorage||!this._userThinInstanceBuffersStorage.data[e]||t>=this._thinInstanceDataStorage.instancesCount||(this._thinInstanceUpdateBufferSize(e,0),this._userThinInstanceBuffersStorage.data[e].set(n,t*this._userThinInstanceBuffersStorage.strides[e]),i&&this.thinInstanceBufferUpdated(e),0))},Object.defineProperty(no.prototype,"thinInstanceCount",{get:function(){return this._thinInstanceDataStorage.instancesCount},set:function(e){var t,n,i=null!==(t=this._thinInstanceDataStorage.matrixData)&&void 0!==t?t:null===(n=this.source)||void 0===n?void 0:n._thinInstanceDataStorage.matrixData;e<=(i?i.length/16:0)&&(this._thinInstanceDataStorage.instancesCount=e)},enumerable:!0,configurable:!0}),no.prototype._thinInstanceCreateMatrixBuffer=function(e,t,n){void 0===n&&(n=!1),e===Yn.ColorKind&&(e=Yn.ColorInstanceKind);for(var i=new Xn(this.getEngine(),t,!n,16,!1,!0),r=0;r<4;r++)this.setVerticesBuffer(i.createVertexBuffer(e+r,4*r,4));return i},no.prototype.thinInstanceSetBuffer=function(e,t,n,i){var r,o,a;void 0===n&&(n=0),void 0===i&&(i=!1),n=n||16,"matrix"===e?(null===(r=this._thinInstanceDataStorage.matrixBuffer)||void 0===r||r.dispose(),this._thinInstanceDataStorage.matrixBuffer=null,this._thinInstanceDataStorage.matrixBufferSize=t?t.length:32*n,this._thinInstanceDataStorage.matrixData=t,this._thinInstanceDataStorage.worldMatrices=null,null!==t?(this._thinInstanceDataStorage.instancesCount=t.length/n,this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",t,i),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)):(this._thinInstanceDataStorage.instancesCount=0,this.doNotSyncBoundingInfo||this.refreshBoundingInfo())):"previousMatrix"===e?(null===(o=this._thinInstanceDataStorage.previousMatrixBuffer)||void 0===o||o.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=null,this._thinInstanceDataStorage.previousMatrixData=t,null!==t&&(this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",t,i))):(e===Yn.ColorKind&&(e=Yn.ColorInstanceKind),null===t?(null===(a=this._userThinInstanceBuffersStorage)||void 0===a?void 0:a.data[e])&&(this.removeVerticesData(e),delete this._userThinInstanceBuffersStorage.data[e],delete this._userThinInstanceBuffersStorage.strides[e],delete this._userThinInstanceBuffersStorage.sizes[e],delete this._userThinInstanceBuffersStorage.vertexBuffers[e]):(this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.data[e]=t,this._userThinInstanceBuffersStorage.strides[e]=n,this._userThinInstanceBuffersStorage.sizes[e]=t.length,this._userThinInstanceBuffersStorage.vertexBuffers[e]=new Yn(this.getEngine(),t,e,!i,!1,n,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[e])))},no.prototype.thinInstanceBufferUpdated=function(e){var t,n,i;"matrix"===e?null===(t=this._thinInstanceDataStorage.matrixBuffer)||void 0===t||t.updateDirectly(this._thinInstanceDataStorage.matrixData,0,this._thinInstanceDataStorage.instancesCount):"previousMatrix"===e?null===(n=this._thinInstanceDataStorage.previousMatrixBuffer)||void 0===n||n.updateDirectly(this._thinInstanceDataStorage.previousMatrixData,0,this._thinInstanceDataStorage.instancesCount):(e===Yn.ColorKind&&(e=Yn.ColorInstanceKind),(null===(i=this._userThinInstanceBuffersStorage)||void 0===i?void 0:i.vertexBuffers[e])&&this._userThinInstanceBuffersStorage.vertexBuffers[e].updateDirectly(this._userThinInstanceBuffersStorage.data[e],0))},no.prototype.thinInstancePartialBufferUpdate=function(e,t,n){var i;"matrix"===e?this._thinInstanceDataStorage.matrixBuffer&&this._thinInstanceDataStorage.matrixBuffer.updateDirectly(t,n):(e===Yn.ColorKind&&(e=Yn.ColorInstanceKind),(null===(i=this._userThinInstanceBuffersStorage)||void 0===i?void 0:i.vertexBuffers[e])&&this._userThinInstanceBuffersStorage.vertexBuffers[e].updateDirectly(t,n))},no.prototype.thinInstanceGetWorldMatrices=function(){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return[];var e=this._thinInstanceDataStorage.matrixData;if(!this._thinInstanceDataStorage.worldMatrices){this._thinInstanceDataStorage.worldMatrices=[];for(var t=0;t0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"innerType",{get:function(){return this._linkedConnectionSource&&this._linkedConnectionSource.isConnected?this.type:this._type},enumerable:!1,configurable:!0}),e.prototype._resetCounters=function(){this._callCount=0,this._executionCount=0},Object.defineProperty(e.prototype,"callCount",{get:function(){return this._callCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"executionCount",{get:function(){return this._executionCount},enumerable:!1,configurable:!0}),e.prototype.getConnectedValue=function(e){var t;return this.isConnected?(null===(t=this._connectedPoint)||void 0===t?void 0:t._storedFunction)?(this._connectedPoint._callCount++,this._connectedPoint._executionCount++,this._connectedPoint._storedFunction(e)):(this._connectedPoint._callCount++,this._connectedPoint._executionCount=1,this._connectedPoint._storedValue):(this._callCount++,this._executionCount=1,this.value)},e.prototype.getClassName=function(){return"NodeGeometryConnectionPoint"},e.prototype.canConnectTo=function(e){return this.checkCompatibilityState(e)===rT.Compatible},e.prototype.checkCompatibilityState=function(e){var t=this._ownerBlock,n=e.ownerBlock;if(this.type!==e.type&&e.innerType!==iT.AutoDetect)return e.acceptedConnectionPointTypes&&-1!==e.acceptedConnectionPointTypes.indexOf(this.type)?rT.Compatible:rT.TypeIncompatible;if(e.excludedConnectionPointTypes&&-1!==e.excludedConnectionPointTypes.indexOf(this.type))return rT.TypeIncompatible;var i=n,r=t;return this.direction===oT.Input&&(i=t,r=n),i.isAnAncestorOf(r)?rT.HierarchyIssue:rT.Compatible},e.prototype.connectTo=function(e,t){if(void 0===t&&(t=!1),!t&&!this.canConnectTo(e))throw"Cannot connect these two connectors.";return this._endpoints.push(e),e._connectedPoint=this,this.onConnectionObservable.notifyObservers(e),e.onConnectionObservable.notifyObservers(this),this},e.prototype.disconnectFrom=function(e){var t=this._endpoints.indexOf(e);return-1===t||(this._endpoints.splice(t,1),e._connectedPoint=null),this},e.prototype.addExcludedConnectionPointFromAllowedTypes=function(e){for(var t=1;t0){if(!this._outputs.some((function(e){return e.hasEndpoints}))&&!this.isDebug)return!1;this.outputs.forEach((function(e){return e._resetCounters()}))}this._buildId=e.buildId;for(var t=0,n=this._inputs;t0?this._geometryContextStack[this._geometryContextStack.length-1]:null},e.prototype.restoreExecutionContext=function(){this._executionContextStack.pop(),this._executionContext=this._executionContextStack.length>0?this._executionContextStack[this._executionContextStack.length-1]:null},e.prototype.restoreInstancingContext=function(){this._instancingContextStack.pop(),this._instancingContext=this._instancingContextStack.length>0?this._instancingContextStack[this._instancingContextStack.length-1]:null},e.prototype.getContextualValue=function(e,t){if(void 0===t&&(t=!1),!this.executionContext)return t||this.noContextualData.push(e),null;var n=this.executionContext.getExecutionIndex();switch(e){case hT.Positions:return this.executionContext.getOverridePositionsContextualValue?this.executionContext.getOverridePositionsContextualValue():this.geometryContext&&this.geometryContext.positions?C.FromArray(this.geometryContext.positions,3*n):C.Zero();case hT.Normals:return this.executionContext.getOverrideNormalsContextualValue?this.executionContext.getOverrideNormalsContextualValue():this.geometryContext&&this.geometryContext.normals?C.FromArray(this.geometryContext.normals,3*n):C.Zero();case hT.Colors:return this.geometryContext&&this.geometryContext.colors?P.FromArray(this.geometryContext.colors,4*n):P.Zero();case hT.Tangents:return this.geometryContext&&this.geometryContext.tangents?P.FromArray(this.geometryContext.tangents,4*n):P.Zero();case hT.UV:return this.executionContext.getOverrideUVs1ContextualValue?this.executionContext.getOverrideUVs1ContextualValue():this.geometryContext&&this.geometryContext.uvs?S.FromArray(this.geometryContext.uvs,2*n):S.Zero();case hT.UV2:return this.geometryContext&&this.geometryContext.uvs2?S.FromArray(this.geometryContext.uvs2,2*n):S.Zero();case hT.UV3:return this.geometryContext&&this.geometryContext.uvs3?S.FromArray(this.geometryContext.uvs3,2*n):S.Zero();case hT.UV4:return this.geometryContext&&this.geometryContext.uvs4?S.FromArray(this.geometryContext.uvs4,2*n):S.Zero();case hT.UV5:return this.geometryContext&&this.geometryContext.uvs5?S.FromArray(this.geometryContext.uvs5,2*n):S.Zero();case hT.UV6:return this.geometryContext&&this.geometryContext.uvs6?S.FromArray(this.geometryContext.uvs6,2*n):S.Zero();case hT.VertexID:return n;case hT.FaceID:return this.executionContext.getExecutionFaceIndex();case hT.LoopID:return this.executionContext.getExecutionLoopIndex();case hT.InstanceID:return this.instancingContext?this.instancingContext.getInstanceIndex():0;case hT.GeometryID:return this.geometryContext?this.geometryContext.uniqueId:0;case hT.CollectionID:return this.geometryContext&&this.geometryContext.metadata&&this.geometryContext.metadata.collectionId||0}return null},e.prototype.adapt=function(e,t){var n=e.getConnectedValue(this)||0;if(e.type===t)return n;switch(t){case iT.Vector2:return new S(n,n);case iT.Vector3:return new C(n,n,n);case iT.Vector4:return new P(n,n,n,n)}return null},e.prototype.adaptInput=function(e,t,n){var i;if(!e.isConnected)return e.value||n;var r=e.getConnectedValue(this);if((null===(i=e._connectedPoint)||void 0===i?void 0:i.type)===t)return r;switch(t){case iT.Vector2:return new S(r,r);case iT.Vector3:return new C(r,r,r);case iT.Vector4:return new P(r,r,r,r)}return null},e.prototype.emitErrors=function(){for(var e="",t=0,n=this.notConnectedNonOptionalInputs;t-1&&this.attachedBlocks.splice(t,1),e===this.outputBlock&&(this.outputBlock=null)},e.prototype.parseSerializedObject=function(e,t){void 0===t&&(t=!1),t||this.clear();for(var n={},i=0,r=e.blocks;ii;break;case BT.LessOrEqual:r=n<=i;break;case BT.GreaterOrEqual:r=n>=i;break;case BT.Xor:r=!!n&&!i||!n&&!!i;break;case BT.Or:r=!!n||!!i;break;case BT.And:r=!!n&&!!i}return r}(t)?e.ifTrue.getConnectedValue(t):e.ifFalse.getConnectedValue(t)}},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".test = BABYLON.ConditionBlockTests.").concat(BT[this.test],";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.test=this.test,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),this.test=t.test},W([ma("Test",pa.List,"ADVANCED",{notifiers:{rebuild:!0},options:[{label:"Equal",value:BT.Equal},{label:"NotEqual",value:BT.NotEqual},{label:"LessThan",value:BT.LessThan},{label:"GreaterThan",value:BT.GreaterThan},{label:"LessOrEqual",value:BT.LessOrEqual},{label:"GreaterOrEqual",value:BT.GreaterOrEqual},{label:"Xor",value:BT.Xor},{label:"Or",value:BT.Or},{label:"And",value:BT.And}]})],t.prototype,"test",void 0),t}(pT);b("BABYLON.ConditionBlock",VT),function(e){e[e.None=0]="None",e[e.LoopID=1]="LoopID",e[e.InstanceID=2]="InstanceID"}(kT||(kT={}));var zT=function(e){function t(t){var n=e.call(this,t)||this;return n._currentLockId=-1,n.lockMode=kT.None,n.registerInput("min",iT.AutoDetect),n.registerInput("max",iT.AutoDetect),n.registerOutput("output",iT.BasedOnInput),n._inputs[0].excludedConnectionPointTypes.push(iT.Matrix),n._inputs[0].excludedConnectionPointTypes.push(iT.Geometry),n._inputs[0].excludedConnectionPointTypes.push(iT.Texture),n._inputs[1].excludedConnectionPointTypes.push(iT.Matrix),n._inputs[1].excludedConnectionPointTypes.push(iT.Geometry),n._inputs[1].excludedConnectionPointTypes.push(iT.Texture),n._outputs[0]._typeConnectionSource=n._inputs[0],n._linkConnectionTypes(0,1),n}return H(t,e),t.prototype.getClassName=function(){return"RandomBlock"},Object.defineProperty(t.prototype,"min",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype.autoConfigure=function(){if(!this.min.isConnected){var e=new _T("Min");e.value=0,e.output.connectTo(this.min)}if(!this.max.isConnected){var t=new _T("Max");t.value=1,t.output.connectTo(this.max)}},t.prototype._buildBlock=function(){var e=this,t=null;switch(this._currentLockId=-1,this.min.type){case iT.Int:case iT.Float:t=function(t){var n=e.min.getConnectedValue(t)||0,i=e.max.getConnectedValue(t)||0;return n+Math.random()*(i-n)};break;case iT.Vector2:t=function(t){var n=e.min.getConnectedValue(t)||S.Zero(),i=e.max.getConnectedValue(t)||S.Zero();return new S(n.x+Math.random()*(i.x-n.x),n.y+Math.random()*(i.y-n.y))};break;case iT.Vector3:t=function(t){var n=e.min.getConnectedValue(t)||C.Zero(),i=e.max.getConnectedValue(t)||C.Zero();return new C(n.x+Math.random()*(i.x-n.x),n.y+Math.random()*(i.y-n.y),n.z+Math.random()*(i.z-n.z))};break;case iT.Vector4:t=function(t){var n=e.min.getConnectedValue(t)||P.Zero(),i=e.max.getConnectedValue(t)||P.Zero();return new P(n.x+Math.random()*(i.x-n.x),n.y+Math.random()*(i.y-n.y),n.z+Math.random()*(i.z-n.z),n.w+Math.random()*(i.w-n.w))}}this.lockMode!==kT.None&&t?this.output._storedFunction=function(n){var i=0;switch(e.lockMode){case kT.InstanceID:i=n.getContextualValue(hT.InstanceID,!0)||0;break;case kT.LoopID:i=n.getContextualValue(hT.LoopID,!0)||0}return e._currentLockId===i&&e.lockMode!==kT.None||(e._currentLockId=i,e.output._storedValue=t(n)),e.output._storedValue}:this.output._storedFunction=t},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".lockMode = BABYLON.RandomBlockLocks.").concat(kT[this.lockMode],";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.lockMode=this.lockMode,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),this.lockMode=t.lockMode},W([ma("LockMode",pa.List,"ADVANCED",{notifiers:{rebuild:!0},options:[{label:"None",value:kT.None},{label:"LoopID",value:kT.LoopID},{label:"InstanceID",value:kT.InstanceID}]})],t.prototype,"lockMode",void 0),t}(pT);b("BABYLON.RandomBlock",zT);var GT=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("offset",iT.Vector3,!0,C.Zero()),n.registerInput("scale",iT.Float,!0,1),n.registerInput("octaves",iT.Float,!0,2,0,16),n.registerInput("roughness",iT.Float,!0,.5,0,1),n.registerOutput("output",iT.Float),n}return H(t,e),t.prototype.getClassName=function(){return"NoiseBlock"},Object.defineProperty(t.prototype,"offset",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"octaves",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"roughness",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._negateIf=function(e,t){return 0!==t?-e:e},t.prototype._noiseGrad=function(e,t,n,i){var r=15&e,o=r<8?t:n,a=r<4?n:12===r||14==r?t:i;return this._negateIf(o,r&o)+this._negateIf(a,2&r)},t.prototype._fade=function(e){return e*e*e*(e*(6*e-15)+10)},t.prototype._hashBitRotate=function(e,t){return e<>32-t},t.prototype._hash=function(e,t,n){var i,r,o;return i=r=o=3735928584,o+=n,i+=e,o^=r+=t,i^=o-=this._hashBitRotate(r,14),r^=i-=this._hashBitRotate(o,11),o^=r-=this._hashBitRotate(i,25),i^=o-=this._hashBitRotate(r,16),r^=i-=this._hashBitRotate(o,4),(o^=r-=this._hashBitRotate(i,14))-this._hashBitRotate(r,24)},t.prototype._mix=function(e,t,n,i,r,o,a,s,c,l,u){var h=1-c,d=1-l;return(1-u)*(d*(e*h+t*c)+l*(n*h+i*c))+u*(d*(r*h+o*c)+l*(a*h+s*c))},t.prototype._perlinNoise=function(e){var t=(0|e.x)-(e.x<0?1:0),n=(0|e.y)-(e.y<0?1:0),i=(0|e.z)-(e.z<0?1:0),r=e.x-t,o=e.y-n,a=e.z-i,s=this._fade(r),c=this._fade(o),l=this._fade(a);return this._mix(this._noiseGrad(this._hash(t,n,i),r,o,a),this._noiseGrad(this._hash(t+1,n,i),r-1,o,a),this._noiseGrad(this._hash(t,n+1,i),r,o-1,a),this._noiseGrad(this._hash(t+1,n+1,i),r-1,o-1,a),this._noiseGrad(this._hash(t,n,i+1),r,o,a-1),this._noiseGrad(this._hash(t+1,n,i+1),r-1,o,a-1),this._noiseGrad(this._hash(t,n+1,i+1),r,o-1,a-1),this._noiseGrad(this._hash(t+1,n+1,i+1),r-1,o-1,a-1),s,c,l)},t.prototype._perlinSigned=function(e){return.982*this._perlinNoise(e)},t.prototype._perlin=function(e){return this._perlinSigned(e)/2+.5},t.prototype.noise=function(e,t,n,i,r){for(var o=new C(n.x*r+i.x,n.y*r+i.y,n.z*r+i.z),a=1,s=1,c=0,l=0,u=0|(e=h.Clamp(e,0,15)),d=0;d<=u;d++)l+=this._perlin(o.scale(a))*s,c+=s,s*=h.Clamp(t,0,1),a*=2;var p=e-Math.floor(e);if(0==p)return l/c;var f=l+this._perlin(o.scale(a))*s;return(1-p)*(l/=c)+p*(f/(c+s))},t.prototype._buildBlock=function(){var e=this;this.output._storedFunction=function(t){var n=t.getContextualValue(hT.Positions),i=e.octaves.getConnectedValue(t),r=e.roughness.getConnectedValue(t),o=e.offset.getConnectedValue(t),a=e.scale.getConnectedValue(t);return e.noise(i,r,n,o,a)}},t}(pT);b("BABYLON.NoiseBlock",GT);var HT=function(e){function t(t){var n=e.call(this,t)||this;return n.evaluateContext=!1,n.registerInput("geometry0",iT.Geometry),n.registerInput("geometry1",iT.Geometry,!0),n.registerInput("geometry2",iT.Geometry,!0),n.registerInput("geometry3",iT.Geometry,!0),n.registerInput("geometry4",iT.Geometry,!0),n.registerOutput("output",iT.Geometry),n}return H(t,e),t.prototype.getClassName=function(){return"MergeGeometryBlock"},Object.defineProperty(t.prototype,"geometry0",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry1",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry2",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry3",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry4",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){var t=this,n=function(e){var n,i=t.geometry0.getConnectedValue(e),r=[];return i?(i=i.clone(),t.geometry1.isConnected&&(n=t.geometry1.getConnectedValue(e))&&r.push(n),t.geometry2.isConnected&&(n=t.geometry2.getConnectedValue(e))&&r.push(n),t.geometry3.isConnected&&(n=t.geometry3.getConnectedValue(e))&&r.push(n),t.geometry4.isConnected&&(n=t.geometry4.getConnectedValue(e))&&r.push(n),r.length&&i&&(i=i.merge(r,!0,!1,!0,!0)),i):null};this.evaluateContext?this.output._storedFunction=n:(this.output._storedFunction=null,this.output._storedValue=n(e))},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".evaluateContext = ").concat(this.evaluateContext?"true":"false",";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.evaluateContext=this.evaluateContext,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),this.evaluateContext=t.evaluateContext},W([ma("Evaluate context",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"evaluateContext",void 0),t}(pT);b("BABYLON.MergeGeometryBlock",HT);var jT=function(e){function t(t){var n=e.call(this,t)||this;return n.evaluateContext=!0,n.registerInput("geometry0",iT.Geometry,!0),n.registerInput("geometry1",iT.Geometry,!0),n.registerInput("geometry2",iT.Geometry,!0),n.registerInput("geometry3",iT.Geometry,!0),n.registerInput("geometry4",iT.Geometry,!0),n.registerInput("geometry5",iT.Geometry,!0),n.registerInput("geometry6",iT.Geometry,!0),n.registerInput("geometry7",iT.Geometry,!0),n.registerInput("geometry8",iT.Geometry,!0),n.registerInput("geometry9",iT.Geometry,!0),n.registerOutput("output",iT.Geometry),n._outputs[0]._typeConnectionSource=n._inputs[0],n._linkConnectionTypes(0,1),n}return H(t,e),t.prototype.getClassName=function(){return"GeometryCollectionBlock"},Object.defineProperty(t.prototype,"geometry0",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry1",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry2",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry3",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry4",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry5",{get:function(){return this._inputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry6",{get:function(){return this._inputs[6]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry7",{get:function(){return this._inputs[7]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry8",{get:function(){return this._inputs[8]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry9",{get:function(){return this._inputs[9]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._storeGeometry=function(e,t,n,i){if(e.isConnected){var r=e.getConnectedValue(t);if(!r)return;r.metadata=r.metadata||{},r.metadata.collectionId=n,i.push(r)}},t.prototype._buildBlock=function(e){var t=this,n=function(e){var n=[];return t._storeGeometry(t.geometry0,e,0,n),t._storeGeometry(t.geometry1,e,1,n),t._storeGeometry(t.geometry2,e,2,n),t._storeGeometry(t.geometry3,e,3,n),t._storeGeometry(t.geometry4,e,4,n),t._storeGeometry(t.geometry5,e,5,n),t._storeGeometry(t.geometry6,e,6,n),t._storeGeometry(t.geometry7,e,7,n),t._storeGeometry(t.geometry8,e,8,n),t._storeGeometry(t.geometry9,e,9,n),n.length?n[Math.round(Math.random()*(n.length-1))]:null};this.evaluateContext?this.output._storedFunction=n:(this.output._storedFunction=null,this.output._storedValue=n(e))},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".evaluateContext = ").concat(this.evaluateContext?"true":"false",";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.evaluateContext=this.evaluateContext,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),this.evaluateContext=t.evaluateContext},W([ma("Evaluate context",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"evaluateContext",void 0),t}(pT);b("BABYLON.GeometryCollectionBlock",jT);var WT=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("input",iT.AutoDetect),n.registerOutput("output",iT.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n}return H(t,e),Object.defineProperty(t.prototype,"buildExecutionTime",{get:function(){return 0},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"GeometryElbowBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this._outputs[0],i=this._inputs[0];n._storedFunction=function(e){return i.getConnectedValue(e)}},t}(pT);b("BABYLON.GeometryElbowBlock",WT);var XT=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("geometry",iT.Geometry),n.registerOutput("output",iT.Geometry),n}return H(t,e),t.prototype.getClassName=function(){return"ComputeNormalsBlock"},Object.defineProperty(t.prototype,"geometry",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(){var e=this;this.output._storedFunction=function(t){if(!e.geometry.isConnected)return null;var n=e.geometry.getConnectedValue(t);return n.normals||(n.normals=[]),Cr.ComputeNormals(n.positions,n.indices,n.normals),n}},t}(pT);b("BABYLON.ComputeNormalsBlock",XT);var YT=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("xyzw ",iT.Vector4,!0),n.registerInput("xyz ",iT.Vector3,!0),n.registerInput("xy ",iT.Vector2,!0),n.registerInput("zw ",iT.Vector2,!0),n.registerInput("x ",iT.Float,!0),n.registerInput("y ",iT.Float,!0),n.registerInput("z ",iT.Float,!0),n.registerInput("w ",iT.Float,!0),n.registerOutput("xyzw",iT.Vector4),n.registerOutput("xyz",iT.Vector3),n.registerOutput("xy",iT.Vector2),n.registerOutput("zw",iT.Vector2),n.registerOutput("x",iT.Float),n.registerOutput("y",iT.Float),n.registerOutput("z",iT.Float),n.registerOutput("w",iT.Float),n}return H(t,e),t.prototype.getClassName=function(){return"VectorConverterBlock"},Object.defineProperty(t.prototype,"xyzwIn",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyzIn",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyIn",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zwIn",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xIn",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yIn",{get:function(){return this._inputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zIn",{get:function(){return this._inputs[6]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wIn",{get:function(){return this._inputs[7]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyzwOut",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyzOut",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xyOut",{get:function(){return this._outputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zwOut",{get:function(){return this._outputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xOut",{get:function(){return this._outputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yOut",{get:function(){return this._outputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zOut",{get:function(){return this._outputs[6]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wOut",{get:function(){return this._outputs[7]},enumerable:!1,configurable:!0}),t.prototype._inputRename=function(e){return"xyzw "===e?"xyzwIn":"xyz "===e?"xyzIn":"xy "===e?"xyIn":"zw "===e?"zwIn":"x "===e?"xIn":"y "===e?"yIn":"z "===e?"zIn":"w "===e?"wIn":e},t.prototype._outputRename=function(e){switch(e){case"x":return"xOut";case"y":return"yOut";case"z":return"zOut";case"w":return"wOut";case"xy":return"xyOut";case"zw":return"zwOut";case"xyz":return"xyzOut";case"xyzw":return"xyzwOut";default:return e}},t.prototype._buildBlock=function(t){e.prototype._buildBlock.call(this,t);var n=this.xIn,i=this.yIn,r=this.zIn,o=this.wIn,a=this.xyIn,s=this.zwIn,c=this.xyzIn,l=this.xyzwIn,u=this.xyzwOut,h=this.xyzOut,d=this.xyOut,p=this.zwOut,f=this.xOut,m=this.yOut,_=this.zOut,g=this.wOut,y=function(e){if(l.isConnected)return l.getConnectedValue(e);var t,u=0,h=0,d=0,p=0;return n.isConnected&&(u=n.getConnectedValue(e)),i.isConnected&&(h=i.getConnectedValue(e)),r.isConnected&&(d=r.getConnectedValue(e)),o.isConnected&&(p=o.getConnectedValue(e)),a.isConnected&&(t=a.getConnectedValue(e))&&(u=t.x,h=t.y),s.isConnected&&(t=s.getConnectedValue(e))&&(d=t.x,p=t.y),c.isConnected&&(t=c.getConnectedValue(e))&&(u=t.x,h=t.y,d=t.z),new P(u,h,d,p)};u._storedFunction=function(e){return y(e)},h._storedFunction=function(e){var t=y(e);return new C(t.x,t.y,t.z)},d._storedFunction=function(e){var t=y(e);return new S(t.x,t.y)},p._storedFunction=function(e){var t=y(e);return new S(t.z,t.w)},f._storedFunction=function(e){return y(e).x},m._storedFunction=function(e){return y(e).y},_._storedFunction=function(e){return y(e).z},g._storedFunction=function(e){return y(e).w}},t}(pT);b("BABYLON.VectorConverterBlock",YT);var qT=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("input",iT.AutoDetect),n.registerOutput("output",iT.BasedOnInput),n._inputs[0].excludedConnectionPointTypes.push(iT.Float),n._inputs[0].excludedConnectionPointTypes.push(iT.Matrix),n._inputs[0].excludedConnectionPointTypes.push(iT.Geometry),n._inputs[0].excludedConnectionPointTypes.push(iT.Texture),n._outputs[0]._typeConnectionSource=n._inputs[0],n}return H(t,e),t.prototype.getClassName=function(){return"NormalizeVectorBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){var n=this;e.prototype._buildBlock.call(this,t),this.output._storedFunction=null,this.input.isConnected?this.output._storedFunction=function(e){return n.input.getConnectedValue(e).normalize()}:this.output._storedValue=null},t}(pT);b("BABYLON.NormalizeVectorBlock",qT);var KT,QT=function(e){function t(t){var n=e.call(this,t)||this;return n.evaluateContext=!0,n.registerInput("geometry",iT.Geometry),n.registerInput("id",iT.Int,!0,0),n.registerOutput("output",iT.Geometry),n.id.acceptedConnectionPointTypes.push(iT.Float),n}return H(t,e),t.prototype.getClassName=function(){return"SetMaterialIDBlock"},Object.defineProperty(t.prototype,"geometry",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){var t=this;if(!this.geometry.isConnected)return this.output._storedFunction=null,void(this.output._storedValue=null);var n=function(e){var n=t.geometry.getConnectedValue(e);if(!n||!n.indices||!n.positions)return n;var i=new Sr;return i.materialIndex=0|t.id.getConnectedValue(e),i.indexStart=0,i.indexCount=n.indices.length,i.verticesStart=0,i.verticesCount=n.positions.length/3,n.materialInfos=[i],n};this.evaluateContext?this.output._storedFunction=n:(this.output._storedFunction=null,this.output._storedValue=n(e))},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".evaluateContext = ").concat(this.evaluateContext?"true":"false",";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.evaluateContext=this.evaluateContext,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),void 0!==t.evaluateContext&&(this.evaluateContext=t.evaluateContext)},W([ma("Evaluate context",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"evaluateContext",void 0),t}(pT);b("BABYLON.SetMaterialIDBlock",QT),function(e){e[e.Cos=0]="Cos",e[e.Sin=1]="Sin",e[e.Abs=2]="Abs",e[e.Exp=3]="Exp",e[e.Round=4]="Round",e[e.Floor=5]="Floor",e[e.Ceiling=6]="Ceiling",e[e.Sqrt=7]="Sqrt",e[e.Log=8]="Log",e[e.Tan=9]="Tan",e[e.ArcTan=10]="ArcTan",e[e.ArcCos=11]="ArcCos",e[e.ArcSin=12]="ArcSin",e[e.Sign=13]="Sign",e[e.Negate=14]="Negate",e[e.OneMinus=15]="OneMinus",e[e.Reciprocal=16]="Reciprocal",e[e.ToDegrees=17]="ToDegrees",e[e.ToRadians=18]="ToRadians"}(KT||(KT={}));var ZT=function(e){function t(t){var n=e.call(this,t)||this;return n.operation=KT.Cos,n.registerInput("input",iT.AutoDetect),n.registerOutput("output",iT.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n._inputs[0].excludedConnectionPointTypes.push(iT.Matrix),n._inputs[0].excludedConnectionPointTypes.push(iT.Geometry),n._inputs[0].excludedConnectionPointTypes.push(iT.Texture),n}return H(t,e),t.prototype.getClassName=function(){return"GeometryTrigonometryBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){var n=this;e.prototype._buildBlock.call(this,t);var i=null;switch(this.operation){case KT.Cos:i=function(e){return Math.cos(e)};break;case KT.Sin:i=function(e){return Math.sin(e)};break;case KT.Abs:i=function(e){return Math.abs(e)};break;case KT.Exp:i=function(e){return Math.exp(e)};break;case KT.Round:i=function(e){return Math.round(e)};break;case KT.Floor:i=function(e){return Math.floor(e)};break;case KT.Ceiling:i=function(e){return Math.ceil(e)};break;case KT.Sqrt:i=function(e){return Math.sqrt(e)};break;case KT.Log:i=function(e){return Math.log(e)};break;case KT.Tan:i=function(e){return Math.tan(e)};break;case KT.ArcTan:i=function(e){return Math.atan(e)};break;case KT.ArcCos:i=function(e){return Math.acos(e)};break;case KT.ArcSin:i=function(e){return Math.asin(e)};break;case KT.Sign:i=function(e){return Math.sign(e)};break;case KT.Negate:i=function(e){return-e};break;case KT.OneMinus:i=function(e){return 1-e};break;case KT.Reciprocal:i=function(e){return 1/e};break;case KT.ToRadians:i=function(e){return e*Math.PI/180};break;case KT.ToDegrees:i=function(e){return 180*e/Math.PI}}if(!i)return this.input._storedFunction=null,void(this.input._storedValue=null);switch(this.input.type){case iT.Int:case iT.Float:this.output._storedFunction=function(e){var t=n.input.getConnectedValue(e);return i(t)};break;case iT.Vector2:this.output._storedFunction=function(e){var t=n.input.getConnectedValue(e);return new S(i(t.x),i(t.y))};break;case iT.Vector3:this.output._storedFunction=function(e){var t=n.input.getConnectedValue(e);return new C(i(t.x),i(t.y),i(t.z))};break;case iT.Vector4:this.output._storedFunction=function(e){var t=n.input.getConnectedValue(e);return new P(i(t.x),i(t.y),i(t.z),i(t.w))}}return this},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.operation=this.operation,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),this.operation=t.operation},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".operation = BABYLON.GeometryTrigonometryBlockOperations.").concat(KT[this.operation],";\n")},W([ma("Operation",pa.List,"ADVANCED",{notifiers:{rebuild:!0},options:[{label:"Cos",value:KT.Cos},{label:"Sin",value:KT.Sin},{label:"Abs",value:KT.Abs},{label:"Exp",value:KT.Exp},{label:"Round",value:KT.Round},{label:"Floor",value:KT.Floor},{label:"Ceiling",value:KT.Ceiling},{label:"Sqrt",value:KT.Sqrt},{label:"Log",value:KT.Log},{label:"Tan",value:KT.Tan},{label:"ArcTan",value:KT.ArcTan},{label:"ArcCos",value:KT.ArcCos},{label:"ArcSin",value:KT.ArcSin},{label:"Sign",value:KT.Sign},{label:"Negate",value:KT.Negate},{label:"OneMinus",value:KT.OneMinus},{label:"Reciprocal",value:KT.Reciprocal},{label:"ToDegrees",value:KT.ToDegrees},{label:"ToRadians",value:KT.ToRadians}]})],t.prototype,"operation",void 0),t}(pT);b("BABYLON.GeometryTrigonometryBlock",ZT);var $T=function(e){function t(t){var n=e.call(this,t)||this;return n._rotationMatrix=new R,n._scalingMatrix=new R,n._translationMatrix=new R,n._scalingRotationMatrix=new R,n._transformMatrix=new R,n.evaluateContext=!0,n.registerInput("value",iT.AutoDetect),n.registerInput("matrix",iT.Matrix,!0),n.registerInput("translation",iT.Vector3,!0,C.Zero()),n.registerInput("rotation",iT.Vector3,!0,C.Zero()),n.registerInput("scaling",iT.Vector3,!0,C.One()),n.registerOutput("output",iT.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n._inputs[0].excludedConnectionPointTypes.push(iT.Float),n._inputs[0].excludedConnectionPointTypes.push(iT.Matrix),n._inputs[0].excludedConnectionPointTypes.push(iT.Texture),n}return H(t,e),t.prototype.getClassName=function(){return"GeometryTransformBlock"},Object.defineProperty(t.prototype,"value",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"translation",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){var t=this;if(!this.value.isConnected)return this.output._storedFunction=null,void(this.output._storedValue=null);var n=function(e){var n,i=t.value.getConnectedValue(e);if(!i)return null;if(t.matrix.isConnected)n=t.matrix.getConnectedValue(e);else{var r=t.scaling.getConnectedValue(e),o=t.rotation.getConnectedValue(e),a=t.translation.getConnectedValue(e);R.ScalingToRef(r.x,r.y,r.z,t._scalingMatrix),R.RotationYawPitchRollToRef(o.y,o.x,o.z,t._rotationMatrix),R.TranslationToRef(a.x,a.y,a.z,t._translationMatrix),t._scalingMatrix.multiplyToRef(t._rotationMatrix,t._scalingRotationMatrix),t._scalingRotationMatrix.multiplyToRef(t._translationMatrix,t._transformMatrix),n=t._transformMatrix}switch(t.value.type){case iT.Geometry:var s=i.clone();return s.transform(n),s;case iT.Vector2:return S.Transform(i,n);case iT.Vector3:return C.TransformCoordinates(i,n);case iT.Vector4:return P.TransformCoordinates(i,n)}return null};this.evaluateContext?this.output._storedFunction=n:(this.output._storedFunction=null,this.output._storedValue=n(e))},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".evaluateContext = ").concat(this.evaluateContext?"true":"false",";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.evaluateContext=this.evaluateContext,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),void 0!==t.evaluateContext&&(this.evaluateContext=t.evaluateContext)},W([ma("Evaluate context",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"evaluateContext",void 0),t}(pT);b("BABYLON.GeometryTransformBlock",$T);var JT=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("angle",iT.Float,!1,0),n.registerOutput("matrix",iT.Matrix),n}return H(t,e),t.prototype.getClassName=function(){return"RotationXBlock"},Object.defineProperty(t.prototype,"angle",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype.autoConfigure=function(){if(!this.angle.isConnected){var e=new _T("Angle");e.value=0,e.output.connectTo(this.angle)}},t.prototype._buildBlock=function(t){var n=this;e.prototype._buildBlock.call(this,t),this.matrix._storedFunction=function(e){return R.RotationX(n.angle.getConnectedValue(e))}},t}(pT);b("BABYLON.RotationXBlock",JT);var eE=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("angle",iT.Float,!1,0),n.registerOutput("matrix",iT.Matrix),n}return H(t,e),t.prototype.getClassName=function(){return"RotationYBlock"},Object.defineProperty(t.prototype,"angle",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype.autoConfigure=function(){if(!this.angle.isConnected){var e=new _T("Angle");e.value=0,e.output.connectTo(this.angle)}},t.prototype._buildBlock=function(t){var n=this;e.prototype._buildBlock.call(this,t),this.matrix._storedFunction=function(e){return R.RotationY(n.angle.getConnectedValue(e))}},t}(pT);b("BABYLON.RotationYBlock",eE);var tE=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("angle",iT.Float,!1,0),n.registerOutput("matrix",iT.Matrix),n}return H(t,e),t.prototype.getClassName=function(){return"RotationZBlock"},Object.defineProperty(t.prototype,"angle",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype.autoConfigure=function(){if(!this.angle.isConnected){var e=new _T("Angle");e.value=0,e.output.connectTo(this.angle)}},t.prototype._buildBlock=function(t){var n=this;e.prototype._buildBlock.call(this,t),this.matrix._storedFunction=function(e){return R.RotationZ(n.angle.getConnectedValue(e))}},t}(pT);b("BABYLON.RotationZBlock",tE);var nE=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("scale",iT.Vector3,!1,C.One()),n.registerOutput("matrix",iT.Matrix),n}return H(t,e),t.prototype.getClassName=function(){return"ScalingBlock"},Object.defineProperty(t.prototype,"scale",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype.autoConfigure=function(){if(!this.scale.isConnected){var e=new _T("Scale");e.value=new C(1,1,1),e.output.connectTo(this.scale)}},t.prototype._buildBlock=function(t){var n=this;e.prototype._buildBlock.call(this,t),this.matrix._storedFunction=function(e){var t=n.scale.getConnectedValue(e);return R.Scaling(t.x,t.y,t.z)}},t}(pT);b("BABYLON.ScalingBlock",nE);var iE=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("source",iT.Vector3,!0,C.Up()),n.registerInput("target",iT.Vector3,!0,C.Left()),n.registerOutput("matrix",iT.Matrix),n}return H(t,e),t.prototype.getClassName=function(){return"AlignBlock"},Object.defineProperty(t.prototype,"source",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(t){var n=this;e.prototype._buildBlock.call(this,t),this.matrix._storedFunction=function(e){var t=n.source.getConnectedValue(e).clone(),i=n.target.getConnectedValue(e).clone(),r=new R;return t.normalize(),i.normalize(),R.RotationAlignToRef(t,i,r,!0),r}},t}(pT);b("BABYLON.AlignBlock",iE);var rE=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("translation",iT.Vector3,!1,C.Zero()),n.registerOutput("matrix",iT.Matrix),n}return H(t,e),t.prototype.getClassName=function(){return"TranslationBlock"},Object.defineProperty(t.prototype,"translation",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype.autoConfigure=function(){if(!this.translation.isConnected){var e=new _T("Translation");e.value=new C(0,0,0),e.output.connectTo(this.translation)}},t.prototype._buildBlock=function(t){var n=this;e.prototype._buildBlock.call(this,t),this.matrix._storedFunction=function(e){var t=n.translation.getConnectedValue(e);return R.Translation(t.x,t.y,t.z)}},t}(pT);b("BABYLON.TranslationBlock",rE);var oE=function(e){function t(t){var n=e.call(this,t)||this;return n._indexTranslation=null,n.evaluateContext=!0,n.removeDuplicatedPositions=!0,n.registerInput("geometry",iT.Geometry),n.registerInput("instance",iT.Geometry,!0),n.registerInput("density",iT.Float,!0,1,0,1),n.registerInput("matrix",iT.Matrix,!0),n.registerInput("rotation",iT.Vector3,!0,C.Zero()),n.registerInput("scaling",iT.Vector3,!0,C.One()),n.scaling.acceptedConnectionPointTypes.push(iT.Float),n.registerOutput("output",iT.Geometry),n}return H(t,e),t.prototype.getInstanceIndex=function(){return this._currentLoopIndex},t.prototype.getExecutionIndex=function(){return this._indexTranslation?this._indexTranslation[this._currentIndex]:this._currentIndex},t.prototype.getExecutionLoopIndex=function(){return this._currentLoopIndex},t.prototype.getExecutionFaceIndex=function(){return 0},t.prototype.getClassName=function(){return"InstantiateOnVerticesBlock"},Object.defineProperty(t.prototype,"geometry",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instance",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"density",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this._inputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){var t=this,n=function(e){if(e.pushExecutionContext(t),e.pushInstancingContext(t),t._vertexData=t.geometry.getConnectedValue(e),e.pushGeometryContext(t._vertexData),!t._vertexData||!t._vertexData.positions||!t.instance.isConnected)return e.restoreExecutionContext(),e.restoreInstancingContext(),e.restoreGeometryContext(),void(t.output._storedValue=null);var n=t._vertexData.positions.length/3,i=[],r=new C,o=[],a=t._vertexData.positions;if(t._currentLoopIndex=0,t.removeDuplicatedPositions){for(t._indexTranslation={},t._currentIndex=0;t._currentIndexp)){r.fromArray(a,3*t._currentIndex);var f=d.clone();if(t.matrix.isConnected){var _=t.matrix.getConnectedValue(e);e._instantiateWithPositionAndMatrix(f,r,_,i)}else{var g=e.adaptInput(t.scaling,iT.Vector3,C.OneReadOnly),y=t.rotation.getConnectedValue(e)||C.ZeroReadOnly;e._instantiate(f,r,y,g,i)}t._currentLoopIndex++}}}if(e.restoreGeometryContext(),e.restoreExecutionContext(),e.restoreInstancingContext(),!i.length)return null;if(1===i.length)t._vertexData=i[0];else{var v=i.splice(0,1)[0];t._vertexData=v.merge(i,!0,!1,!0,!0)}return t._vertexData};this.evaluateContext?this.output._storedFunction=n:(this.output._storedFunction=null,this.output._storedValue=n(e))},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".removeDuplicatedPositions = ").concat(this.removeDuplicatedPositions?"true":"false",";\n")+"".concat(this._codeVariableName,".evaluateContext = ").concat(this.evaluateContext?"true":"false",";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.removeDuplicatedPositions=this.removeDuplicatedPositions,t.evaluateContext=this.evaluateContext,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),this.removeDuplicatedPositions=t.removeDuplicatedPositions,void 0!==t.evaluateContext&&(this.evaluateContext=t.evaluateContext)},W([ma("Evaluate context",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"evaluateContext",void 0),W([ma("Remove duplicated positions",pa.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"removeDuplicatedPositions",void 0),t}(pT);b("BABYLON.InstantiateOnVerticesBlock",oE);var aE=function(e){function t(t){var n=e.call(this,t)||this;return n._currentPosition=new C,n._currentUV=new S,n._vertex0=new C,n._vertex1=new C,n._vertex2=new C,n._tempVector0=new C,n._tempVector1=new C,n._uv0=new S,n._uv1=new S,n._uv2=new S,n.evaluateContext=!0,n.registerInput("geometry",iT.Geometry),n.registerInput("instance",iT.Geometry,!0),n.registerInput("count",iT.Int,!0,256),n.registerInput("matrix",iT.Matrix,!0),n.registerInput("rotation",iT.Vector3,!0,C.Zero()),n.registerInput("scaling",iT.Vector3,!0,C.One()),n.scaling.acceptedConnectionPointTypes.push(iT.Float),n.registerOutput("output",iT.Geometry),n}return H(t,e),t.prototype.getInstanceIndex=function(){return this._currentLoopIndex},t.prototype.getExecutionIndex=function(){return 0},t.prototype.getExecutionFaceIndex=function(){return this._currentFaceIndex},t.prototype.getExecutionLoopIndex=function(){return this._currentLoopIndex},t.prototype.getOverridePositionsContextualValue=function(){return this._currentPosition},t.prototype.getOverrideNormalsContextualValue=function(){return this._vertex1.subtractToRef(this._vertex0,this._tempVector0),this._vertex2.subtractToRef(this._vertex1,this._tempVector1),this._tempVector0.normalize(),this._tempVector1.normalize(),C.Cross(this._tempVector1,this._tempVector0)},t.prototype.getOverrideUVs1ContextualValue=function(){return this._currentUV},t.prototype.getClassName=function(){return"InstantiateOnFacesBlock"},Object.defineProperty(t.prototype,"geometry",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instance",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this._inputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){var t=this,n=function(e){if(e.pushExecutionContext(t),e.pushInstancingContext(t),t._vertexData=t.geometry.getConnectedValue(e),e.pushGeometryContext(t._vertexData),!(t._vertexData&&t._vertexData.positions&&t._vertexData.indices&&t.instance.isConnected))return e.restoreExecutionContext(),e.restoreInstancingContext(),e.restoreGeometryContext(),void(t.output._storedValue=null);var n=null,i=t.count.getConnectedValue(e),r=t._vertexData.indices.length/3,o=i/r,a=0,s=[],c=0;for(t._currentLoopIndex=0,t._currentFaceIndex=0;t._currentFaceIndex=i);p++){var f=Math.random(),m=Math.random();if(f>m){var _=f;f=m,m=_}var g=f,y=m-f,v=1-g-y;if(t._currentPosition.set(g*t._vertex0.x+y*t._vertex1.x+v*t._vertex2.x,g*t._vertex0.y+y*t._vertex1.y+v*t._vertex2.y,g*t._vertex0.z+y*t._vertex1.z+v*t._vertex2.z),t._vertexData.uvs&&t._currentUV.set(g*t._uv0.x+y*t._uv1.x+v*t._uv2.x,g*t._uv0.y+y*t._uv1.y+v*t._uv2.y),(n=t.instance.getConnectedValue(e))&&n.positions&&0!==n.positions.length){var b=n.clone();if(t.matrix.isConnected){var T=t.matrix.getConnectedValue(e);e._instantiateWithPositionAndMatrix(b,t._currentPosition,T,s)}else{var E=e.adaptInput(t.scaling,iT.Vector3,C.OneReadOnly),A=t.rotation.getConnectedValue(e)||C.ZeroReadOnly;e._instantiate(b,t._currentPosition,A,E,s)}c++,t._currentLoopIndex++}else a-=o}}}if(s.length)if(1===s.length)t._vertexData=s[0];else{var x=s.splice(0,1)[0];t._vertexData=x.merge(s,!0,!1,!0,!0)}return e.restoreExecutionContext(),e.restoreInstancingContext(),e.restoreGeometryContext(),t._vertexData};this.evaluateContext?this.output._storedFunction=n:(this.output._storedFunction=null,this.output._storedValue=n(e))},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".evaluateContext = ").concat(this.evaluateContext?"true":"false",";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.evaluateContext=this.evaluateContext,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),void 0!==t.evaluateContext&&(this.evaluateContext=t.evaluateContext)},W([ma("Evaluate context",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"evaluateContext",void 0),t}(pT);b("BABYLON.InstantiateOnFacesBlock",aE);var sE=function(e){function t(t){var n=e.call(this,t)||this;return n._currentPosition=new C,n._vertex0=new C,n._vertex1=new C,n._vertex2=new C,n.evaluateContext=!0,n.registerInput("geometry",iT.Geometry),n.registerInput("instance",iT.Geometry,!0),n.registerInput("count",iT.Int,!0,256),n.registerInput("matrix",iT.Matrix,!0),n.registerInput("rotation",iT.Vector3,!0,C.Zero()),n.registerInput("scaling",iT.Vector3,!0,C.One()),n.scaling.acceptedConnectionPointTypes.push(iT.Float),n.registerOutput("output",iT.Geometry),n}return H(t,e),t.prototype.getInstanceIndex=function(){return this._currentLoopIndex},t.prototype.getExecutionIndex=function(){return 0},t.prototype.getExecutionFaceIndex=function(){return 0},t.prototype.getExecutionLoopIndex=function(){return this._currentLoopIndex},t.prototype.getOverridePositionsContextualValue=function(){return this._currentPosition},t.prototype.getClassName=function(){return"InstantiateOnVolumeBlock"},Object.defineProperty(t.prototype,"geometry",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instance",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this._inputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){var t=this,n=function(e){if(e.pushExecutionContext(t),e.pushInstancingContext(t),t._vertexData=t.geometry.getConnectedValue(e),e.pushGeometryContext(t._vertexData),!(t._vertexData&&t._vertexData.positions&&t._vertexData.indices&&t.instance.isConnected))return e.restoreExecutionContext(),e.restoreInstancingContext(),e.restoreGeometryContext(),void(t.output._storedValue=null);var n=null,i=t.count.getConnectedValue(e),r=[],o=Ar(t._vertexData.positions,0,t._vertexData.positions.length/3),a=o.minimum,s=o.maximum,c=new C(1,0,0),l=t._vertexData.indices.length/3;t._currentLoopIndex=0;for(var u=0;u0&&d++}if(d%2!=0){if((n=t.instance.getConnectedValue(e))&&n.positions&&0!==n.positions.length){var m=n.clone();if(t.matrix.isConnected){var _=t.matrix.getConnectedValue(e);e._instantiateWithPositionAndMatrix(m,t._currentPosition,_,r)}else{var g=e.adaptInput(t.scaling,iT.Vector3,C.OneReadOnly),y=t.rotation.getConnectedValue(e)||C.ZeroReadOnly;e._instantiate(m,t._currentPosition,y,g,r)}t._currentLoopIndex++}}else u--}if(r.length)if(1===r.length)t._vertexData=r[0];else{var v=r.splice(0,1)[0];t._vertexData=v.merge(r,!0,!1,!0,!0)}return e.restoreGeometryContext(),e.restoreExecutionContext(),e.restoreInstancingContext(),t._vertexData};this.evaluateContext?this.output._storedFunction=n:(this.output._storedFunction=null,this.output._storedValue=n(e))},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".evaluateContext = ").concat(this.evaluateContext?"true":"false",";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.evaluateContext=this.evaluateContext,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),void 0!==t.evaluateContext&&(this.evaluateContext=t.evaluateContext)},W([ma("Evaluate context",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"evaluateContext",void 0),t}(pT);b("BABYLON.InstantiateOnVolumeBlock",sE);var cE=function(e){function t(t){var n=e.call(this,t)||this;return n.evaluateContext=!0,n.registerInput("instance",iT.Geometry,!0),n.registerInput("count",iT.Int,!0,1),n.registerOutput("output",iT.Geometry),n}return H(t,e),t.prototype.getInstanceIndex=function(){return this._currentIndex},t.prototype.getExecutionIndex=function(){return this._currentIndex},t.prototype.getExecutionLoopIndex=function(){return this._currentIndex},t.prototype.getExecutionFaceIndex=function(){return 0},t.prototype.getClassName=function(){return"InstantiateBaseBlock"},Object.defineProperty(t.prototype,"instance",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".evaluateContext = ").concat(this.evaluateContext?"true":"false",";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.evaluateContext=this.evaluateContext,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),void 0!==t.evaluateContext&&(this.evaluateContext=t.evaluateContext)},W([ma("Evaluate context",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"evaluateContext",void 0),t}(pT),lE=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("matrix",iT.Matrix,!0),n.registerInput("position",iT.Vector3,!0,C.Zero()),n.registerInput("rotation",iT.Vector3,!0,C.Zero()),n.registerInput("scaling",iT.Vector3,!0,C.One()),n.scaling.acceptedConnectionPointTypes.push(iT.Float),n}return H(t,e),t.prototype.getInstanceIndex=function(){return this._currentIndex},t.prototype.getExecutionIndex=function(){return this._currentIndex},t.prototype.getExecutionLoopIndex=function(){return this._currentIndex},t.prototype.getExecutionFaceIndex=function(){return 0},t.prototype.getClassName=function(){return"InstantiateBlock"},Object.defineProperty(t.prototype,"matrix",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this._inputs[5]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){var t=this,n=function(e){e.pushExecutionContext(t),e.pushInstancingContext(t);var n=t.count.getConnectedValue(e),i=[];for(t._currentIndex=0;t._currentIndex0&&(a.x=Math.acos(t.y/s)/Math.PI,0===t.x&&0===t.z||(a.y=Math.atan2(t.x,t.z)/(2*Math.PI)));break;case fE.Cylindrical:var s;i.subtractToRef(o,t),(s=t.length())>0&&(a.x=Math.atan2(t.x/s,t.z/s)/(2*Math.PI),a.y=(t.y+1)/2);break;case fE.Cubic:var c=Math.abs(r.x),l=Math.abs(r.y),u=Math.abs(r.z),h=Math.max(Math.abs(i.x),Math.abs(i.y),Math.abs(i.z)),d=0,p=0;c>=l&&c>=u?(d=i.y/h-o.y,p=i.z/h-o.z):l>=c&&l>=u?(d=i.x/h-o.x,p=i.z/h-o.z):(d=i.x/h-o.x,p=i.y/h-o.y),a.x=(d+1)/2,a.y=(p+1)/2}return a}(n)}},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".mapping = BABYLON.MappingTypes.").concat(fE[this.mapping],";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.mapping=this.mapping,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),this.mapping=t.mapping},W([ma("Mapping",pa.List,"ADVANCED",{notifiers:{rebuild:!0},options:[{label:"Spherical",value:fE.Spherical},{label:"Cylindrical",value:fE.Cylindrical},{label:"Cubic",value:fE.Cubic}]})],t.prototype,"mapping",void 0),t}(pT);b("BABYLON.MappingBlock",_E);var gE=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("matrix0",iT.Matrix),n.registerInput("matrix1",iT.Matrix),n.registerOutput("output",iT.Matrix),n}return H(t,e),t.prototype.getClassName=function(){return"MatrixComposeBlock"},Object.defineProperty(t.prototype,"matrix0",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrix1",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(){var e=this;this.output._storedFunction=function(t){if(!e.matrix0.isConnected||!e.matrix1.isConnected)return null;var n=e.matrix0.getConnectedValue(t),i=e.matrix1.getConnectedValue(t);return n&&i?n.multiply(i):null}},t}(pT);b("BABYLON.MatrixComposeBlock",gE);var yE=function(e){function t(t){var n=e.call(this,t)||this;return n._endpoints=[],n._isTeleportIn=!0,n.registerInput("input",iT.AutoDetect),n}return H(t,e),Object.defineProperty(t.prototype,"endpoints",{get:function(){return this._endpoints},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"TeleportInBlock"},Object.defineProperty(t.prototype,"input",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),t.prototype._dumpCode=function(t,n){for(var i=e.prototype._dumpCode.call(this,t,n),r=0,o=this.endpoints;r "+this.name},t.prototype.detachFromEndpoint=function(e){var t=this._endpoints.indexOf(e);-1!==t&&(this._endpoints.splice(t,1),e._outputs[0]._typeConnectionSource=null,e._entryPoint=null)},t.prototype._buildBlock=function(){for(var e=this,t=0,n=this._endpoints;t=0?e%1:1-Math.abs(e)%1},t.prototype._buildBlock=function(){var e=this,t=function(t){var n=e.texture.getConnectedValue(t);if(!n||!n.data)return null;var i=e.coordinates.getConnectedValue(t);if(!i)return null;var r=e.clampCoordinates?Math.max(0,Math.min(i.x,1)):e._repeatClamp(i.x),o=e.clampCoordinates?Math.max(0,Math.min(i.y,1)):e._repeatClamp(i.y),a=Math.floor(r*(n.width-1)),s=Math.floor(o*(n.height-1)),c=a+n.width*s;return P.FromArray(n.data,4*c)};this.rgba._storedFunction=function(e){return t(e)},this.rgb._storedFunction=function(e){var n=t(e);return n?n.toVector3():null},this.r._storedFunction=function(e){var n=t(e);return n?n.x:null},this.g._storedFunction=function(e){var n=t(e);return n?n.y:null},this.b._storedFunction=function(e){var n=t(e);return n?n.z:null},this.a._storedFunction=function(e){var n=t(e);return n?n.w:null}},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".clampCoordinates = ").concat(this.clampCoordinates,";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.clampCoordinates=this.clampCoordinates,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),this.clampCoordinates=t.clampCoordinates},W([ma("Clamp Coordinates",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"clampCoordinates",void 0),t}(pT);b("BABYLON.GeometryTextureFetchBlock",TE);var EE,AE=function(e){function t(t){var n=e.call(this,t)||this;return n.registerInput("geometry",iT.Geometry),n.registerOutput("min",iT.Vector3),n.registerOutput("max",iT.Vector3),n}return H(t,e),t.prototype.getClassName=function(){return"BoundingBlock"},Object.defineProperty(t.prototype,"geometry",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(){var e=this;this.min._storedFunction=function(t){var n=e.geometry.getConnectedValue(t);return n?Ar(n.positions,0,n.positions.length/3).minimum:null},this.max._storedFunction=function(t){var n=e.geometry.getConnectedValue(t);return n?Ar(n.positions,0,n.positions.length/3).maximum:null}},t}(pT);b("BABYLON.BoundingBlock",AE),function(e){e[e.Intersect=0]="Intersect",e[e.Subtract=1]="Subtract",e[e.Union=2]="Union"}(EE||(EE={}));var xE=function(e){function t(t){var n=e.call(this,t)||this;return n.evaluateContext=!1,n.operation=EE.Intersect,n.registerInput("geometry0",iT.Geometry),n.registerInput("geometry1",iT.Geometry),n.registerOutput("output",iT.Geometry),n}return H(t,e),t.prototype.getClassName=function(){return"BooleanGeometryBlock"},Object.defineProperty(t.prototype,"geometry0",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometry1",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){var t=this,n=function(e){var n=t.geometry0.getConnectedValue(e),i=t.geometry1.getConnectedValue(e);if(!n||!i)return null;var r=n.positions.length/3;!n.normals&&i.normals&&(n.normals=new Array(n.positions.length)),!i.normals&&n.normals&&(i.normals=new Array(i.positions.length)),!n.uvs&&i.uvs&&(n.uvs=new Array(2*r)),!i.uvs&&n.uvs&&(i.uvs=new Array(2*r)),!n.colors&&i.colors&&(n.colors=new Array(4*r)),!i.colors&&n.colors&&(i.colors=new Array(4*r));var o,a=Ub.FromVertexData(n),s=Ub.FromVertexData(i);switch(t.operation){case EE.Intersect:o=a.intersect(s);break;case EE.Subtract:o=a.subtract(s);break;case EE.Union:o=a.union(s)}return o.toVertexData()};this.evaluateContext?this.output._storedFunction=n:(this.output._storedFunction=null,this.output._storedValue=n(e))},t.prototype._dumpPropertiesCode=function(){return e.prototype._dumpPropertiesCode.call(this)+"".concat(this._codeVariableName,".evaluateContext = ").concat(this.evaluateContext?"true":"false",";\n")+"".concat(this._codeVariableName,".operation = BABYLON.BooleanGeometryOperations.").concat(EE[this.operation],";\n")},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.evaluateContext=this.evaluateContext,t.operation=this.operation,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),this.evaluateContext=t.evaluateContext,t.operation&&(this.operation=t.operation)},W([ma("Evaluate context",pa.Boolean,"ADVANCED",{notifiers:{rebuild:!0}})],t.prototype,"evaluateContext",void 0),W([ma("Operation",pa.List,"ADVANCED",{notifiers:{rebuild:!0},options:[{label:"Intersect",value:EE.Intersect},{label:"Subtract",value:EE.Subtract},{label:"Union",value:EE.Union}]})],t.prototype,"operation",void 0),t}(pT);b("BABYLON.BooleanGeometryBlock",xE);var SE=function(){function e(e){void 0===e&&(e=Recast),this.bjsRECAST={},this.name="RecastJSPlugin",this._maximumSubStepCount=10,this._timeStep=1/60,this._timeFactor=1,this._worker=null,"function"==typeof e?J.Error("RecastJS is not ready. Please make sure you await Recast() before using the plugin."):this.bjsRECAST=e,this.isSupported()?(this.setTimeStep(),this._tempVec1=new this.bjsRECAST.Vec3,this._tempVec2=new this.bjsRECAST.Vec3):J.Error("RecastJS is not available. Please make sure you included the js file.")}return e.prototype.setWorkerURL=function(e){return!(!window||!window.Worker||(this._worker=new Worker(e),0))},e.prototype.setTimeStep=function(e){void 0===e&&(e=1/60),this._timeStep=e},e.prototype.getTimeStep=function(){return this._timeStep},e.prototype.setMaximumSubStepCount=function(e){void 0===e&&(e=10),this._maximumSubStepCount=e},e.prototype.getMaximumSubStepCount=function(){return this._maximumSubStepCount},Object.defineProperty(e.prototype,"timeFactor",{get:function(){return this._timeFactor},set:function(e){this._timeFactor=Math.max(e,0)},enumerable:!1,configurable:!0}),e.prototype.createNavMesh=function(e,t,n){var i,r,o;this._worker&&!n?J.Warn("A worker is avaible but no completion callback. Defaulting to blocking navmesh creation"):!this._worker&&n&&J.Warn("A completion callback is avaible but no worker. Defaulting to blocking navmesh creation"),this.navMesh=new this.bjsRECAST.NavMesh;var a=[],s=[],c=0;for(i=0;i-1&&(this._agentDestinationArmed[n]=!0,this._agentDestination[n].set(t.x,t.y,t.z))},e.prototype.agentTeleport=function(e,t){this.recastCrowd.agentTeleport(e,new this.bjsRECASTPlugin.bjsRECAST.Vec3(t.x,t.y,t.z))},e.prototype.updateAgentParameters=function(e,t){var n=this.recastCrowd.getAgentParameters(e);void 0!==t.radius&&(n.radius=t.radius),void 0!==t.height&&(n.height=t.height),void 0!==t.maxAcceleration&&(n.maxAcceleration=t.maxAcceleration),void 0!==t.maxSpeed&&(n.maxSpeed=t.maxSpeed),void 0!==t.collisionQueryRange&&(n.collisionQueryRange=t.collisionQueryRange),void 0!==t.pathOptimizationRange&&(n.pathOptimizationRange=t.pathOptimizationRange),void 0!==t.separationWeight&&(n.separationWeight=t.separationWeight),this.recastCrowd.setAgentParameters(e,n)},e.prototype.removeAgent=function(e){this.recastCrowd.removeAgent(e);var t=this.agents.indexOf(e);t>-1&&(this.agents.splice(t,1),this.transforms.splice(t,1),this.reachRadii.splice(t,1),this._agentDestinationArmed.splice(t,1),this._agentDestination.splice(t,1))},e.prototype.getAgents=function(){return this.agents},e.prototype.update=function(e){if(this.bjsRECASTPlugin.navMesh.update(),!(e<=m)){var t=this.bjsRECASTPlugin.getTimeStep(),n=this.bjsRECASTPlugin.getMaximumSubStepCount();if(t<=m)this.recastCrowd.update(e);else{var i=Math.floor(e/t);n&&i>n&&(i=n),i<1&&(i=1);for(var r=e/i,o=0;od&&c.y=400&&o?o(l):n()}),!1),l.addEventListener("error",(function(){J.Error("error on XHR request."),o&&o()}),!1),l.send()}else J.Error("Error: IndexedDB not supported by your browser or Babylon.js database is not open."),o&&o()},e._ValidateXHRData=function(e,t){void 0===t&&(t=7);try{if(1&t){if(e.responseText&&e.responseText.length>0)return!0;if(1===t)return!1}if(2&t){var n=jg(e.response);if(n.width&&n.height&&n.width>0&&n.height>0)return!0;if(2===t)return!1}if(4&t){var i=new Uint8Array(e.response,0,3);return 68===i[0]&&68===i[1]&&83===i[2]}}catch(e){}return!1},e._IsUASupportingBlobStorage=!0,e.IDBStorageEnabled=!1,e._ParseURL=function(e){document.createElement("a").href=e;var t=e.substring(0,e.lastIndexOf("#")),n=e.substring(t.lastIndexOf("/")+1,e.length);return e.substring(0,e.indexOf(n,0))},e._ReturnFullUrlLocation=function(t){return-1===t.indexOf("http:/")&&-1===t.indexOf("https:/")&&"undefined"!=typeof window?e._ParseURL(window.location.href)+t:t},e}(),IE=function(){function e(e){this._isUbo(e)?(this.setMatrix3x3=e.updateMatrix3x3.bind(e),this.setMatrix2x2=e.updateMatrix2x2.bind(e),this.setFloat=e.updateFloat.bind(e),this.setFloat2=e.updateFloat2.bind(e),this.setFloat3=e.updateFloat3.bind(e),this.setFloat4=e.updateFloat4.bind(e),this.setFloatArray=e.updateFloatArray.bind(e),this.setArray=e.updateArray.bind(e),this.setIntArray=e.updateIntArray.bind(e),this.setMatrix=e.updateMatrix.bind(e),this.setMatrices=e.updateMatrices.bind(e),this.setVector3=e.updateVector3.bind(e),this.setVector4=e.updateVector4.bind(e),this.setColor3=e.updateColor3.bind(e),this.setColor4=e.updateColor4.bind(e),this.setDirectColor4=e.updateDirectColor4.bind(e),this.setInt=e.updateInt.bind(e),this.setInt2=e.updateInt2.bind(e),this.setInt3=e.updateInt3.bind(e),this.setInt4=e.updateInt4.bind(e)):(this.setMatrix3x3=e.setMatrix3x3.bind(e),this.setMatrix2x2=e.setMatrix2x2.bind(e),this.setFloat=e.setFloat.bind(e),this.setFloat2=e.setFloat2.bind(e),this.setFloat3=e.setFloat3.bind(e),this.setFloat4=e.setFloat4.bind(e),this.setFloatArray=e.setFloatArray.bind(e),this.setArray=e.setArray.bind(e),this.setIntArray=e.setIntArray.bind(e),this.setMatrix=e.setMatrix.bind(e),this.setMatrices=e.setMatrices.bind(e),this.setVector3=e.setVector3.bind(e),this.setVector4=e.setVector4.bind(e),this.setColor3=e.setColor3.bind(e),this.setColor4=e.setColor4.bind(e),this.setDirectColor4=e.setDirectColor4.bind(e),this.setInt=e.setInt.bind(e),this.setInt2=e.setInt2.bind(e),this.setInt3=e.setInt3.bind(e),this.setInt4=e.setInt4.bind(e))}return e.prototype._isUbo=function(e){return void 0!==e.addUniform},e}();Vt.ShadersStore.gpuUpdateParticlesPixelShader="#version 300 es\nvoid main() {discard;}\n",Vt.ShadersStore.gpuUpdateParticlesVertexShader="#version 300 es\n#define PI 3.14159\nuniform float currentCount;uniform float timeDelta;uniform float stopFactor;\n#ifndef LOCAL\nuniform mat4 emitterWM;\n#endif\nuniform vec2 lifeTime;uniform vec2 emitPower;uniform vec2 sizeRange;uniform vec4 scaleRange;\n#ifndef COLORGRADIENTS\nuniform vec4 color1;uniform vec4 color2;\n#endif\nuniform vec3 gravity;uniform sampler2D randomSampler;uniform sampler2D randomSampler2;uniform vec4 angleRange;\n#ifdef BOXEMITTER\nuniform vec3 direction1;uniform vec3 direction2;uniform vec3 minEmitBox;uniform vec3 maxEmitBox;\n#endif\n#ifdef POINTEMITTER\nuniform vec3 direction1;uniform vec3 direction2;\n#endif\n#ifdef HEMISPHERICEMITTER\nuniform float radius;uniform float radiusRange;uniform float directionRandomizer;\n#endif\n#ifdef SPHEREEMITTER\nuniform float radius;uniform float radiusRange;\n#ifdef DIRECTEDSPHEREEMITTER\nuniform vec3 direction1;uniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CYLINDEREMITTER\nuniform float radius;uniform float height;uniform float radiusRange;\n#ifdef DIRECTEDCYLINDEREMITTER\nuniform vec3 direction1;uniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CONEEMITTER\nuniform vec2 radius;uniform float coneAngle;uniform vec2 height;uniform float directionRandomizer;\n#endif\nin vec3 position;\n#ifdef CUSTOMEMITTER\nin vec3 initialPosition;\n#endif\nin float age;in float life;in vec4 seed;in vec3 size;\n#ifndef COLORGRADIENTS\nin vec4 color;\n#endif\nin vec3 direction;\n#ifndef BILLBOARD\nin vec3 initialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nin float angle;\n#else\nin vec2 angle;\n#endif\n#ifdef ANIMATESHEET\nin float cellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nin float cellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nin vec3 noiseCoordinates1;in vec3 noiseCoordinates2;\n#endif\nout vec3 outPosition;\n#ifdef CUSTOMEMITTER\nout vec3 outInitialPosition;\n#endif\nout float outAge;out float outLife;out vec4 outSeed;out vec3 outSize;\n#ifndef COLORGRADIENTS\nout vec4 outColor;\n#endif\nout vec3 outDirection;\n#ifndef BILLBOARD\nout vec3 outInitialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nout float outAngle;\n#else\nout vec2 outAngle;\n#endif\n#ifdef ANIMATESHEET\nout float outCellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nout float outCellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nout vec3 outNoiseCoordinates1;out vec3 outNoiseCoordinates2;\n#endif\n#ifdef SIZEGRADIENTS\nuniform sampler2D sizeGradientSampler;\n#endif \n#ifdef ANGULARSPEEDGRADIENTS\nuniform sampler2D angularSpeedGradientSampler;\n#endif \n#ifdef VELOCITYGRADIENTS\nuniform sampler2D velocityGradientSampler;\n#endif\n#ifdef LIMITVELOCITYGRADIENTS\nuniform sampler2D limitVelocityGradientSampler;uniform float limitVelocityDamping;\n#endif\n#ifdef DRAGGRADIENTS\nuniform sampler2D dragGradientSampler;\n#endif\n#ifdef NOISE\nuniform vec3 noiseStrength;uniform sampler2D noiseSampler;\n#endif\n#ifdef ANIMATESHEET\nuniform vec4 cellInfos;\n#endif\nvec3 getRandomVec3(float offset) {return texture(randomSampler2,vec2(float(gl_VertexID)*offset/currentCount,0)).rgb;}\nvec4 getRandomVec4(float offset) {return texture(randomSampler,vec2(float(gl_VertexID)*offset/currentCount,0));}\nvoid main() {float newAge=age+timeDelta; \nif (newAge>=life && stopFactor != 0.) {vec3 newPosition;vec3 newDirection;vec4 randoms=getRandomVec4(seed.x);outLife=lifeTime.x+(lifeTime.y-lifeTime.x)*randoms.r;outAge=newAge-life;outSeed=seed;\n#ifdef SIZEGRADIENTS \noutSize.x=texture(sizeGradientSampler,vec2(0,0)).r;\n#else\noutSize.x=sizeRange.x+(sizeRange.y-sizeRange.x)*randoms.g;\n#endif\noutSize.y=scaleRange.x+(scaleRange.y-scaleRange.x)*randoms.b;outSize.z=scaleRange.z+(scaleRange.w-scaleRange.z)*randoms.a; \n#ifndef COLORGRADIENTS\noutColor=color1+(color2-color1)*randoms.b;\n#endif\n#ifndef ANGULARSPEEDGRADIENTS \noutAngle.y=angleRange.x+(angleRange.y-angleRange.x)*randoms.a;outAngle.x=angleRange.z+(angleRange.w-angleRange.z)*randoms.r;\n#else\noutAngle=angleRange.z+(angleRange.w-angleRange.z)*randoms.r;\n#endif \n#ifdef POINTEMITTER\nvec3 randoms2=getRandomVec3(seed.y);vec3 randoms3=getRandomVec3(seed.z);newPosition=vec3(0,0,0);newDirection=direction1+(direction2-direction1)*randoms3;\n#elif defined(BOXEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);vec3 randoms3=getRandomVec3(seed.z);newPosition=minEmitBox+(maxEmitBox-minEmitBox)*randoms2;newDirection=direction1+(direction2-direction1)*randoms3; \n#elif defined(HEMISPHERICEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);vec3 randoms3=getRandomVec3(seed.z);float phi=2.0*PI*randoms2.x;float theta=acos(2.0*randoms2.y-1.0);float randX=cos(phi)*sin(theta);float randY=cos(theta);float randZ=sin(phi)*sin(theta);newPosition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,abs(randY),randZ);newDirection=newPosition+directionRandomizer*randoms3; \n#elif defined(SPHEREEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);vec3 randoms3=getRandomVec3(seed.z);float phi=2.0*PI*randoms2.x;float theta=acos(2.0*randoms2.y-1.0);float randX=cos(phi)*sin(theta);float randY=cos(theta);float randZ=sin(phi)*sin(theta);newPosition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,randY,randZ);\n#ifdef DIRECTEDSPHEREEMITTER\nnewDirection=normalize(direction1+(direction2-direction1)*randoms3);\n#else\nnewDirection=normalize(newPosition+directionRandomizer*randoms3);\n#endif\n#elif defined(CYLINDEREMITTER)\nvec3 randoms2=getRandomVec3(seed.y);vec3 randoms3=getRandomVec3(seed.z);float yPos=(randoms2.x-0.5)*height;float angle=randoms2.y*PI*2.;float inverseRadiusRangeSquared=((1.-radiusRange)*(1.-radiusRange));float positionRadius=radius*sqrt(inverseRadiusRangeSquared+(randoms2.z*(1.-inverseRadiusRangeSquared)));float xPos=positionRadius*cos(angle);float zPos=positionRadius*sin(angle);newPosition=vec3(xPos,yPos,zPos);\n#ifdef DIRECTEDCYLINDEREMITTER\nnewDirection=direction1+(direction2-direction1)*randoms3;\n#else\nangle=angle+((randoms3.x-0.5)*PI)*directionRandomizer;newDirection=vec3(cos(angle),(randoms3.y-0.5)*directionRandomizer,sin(angle));newDirection=normalize(newDirection);\n#endif\n#elif defined(CONEEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);float s=2.0*PI*randoms2.x;\n#ifdef CONEEMITTERSPAWNPOINT\nfloat h=0.0001;\n#else\nfloat h=randoms2.y*height.y;h=1.-h*h; \n#endif\nfloat lRadius=radius.x-radius.x*randoms2.z*radius.y;lRadius=lRadius*h;float randX=lRadius*sin(s);float randZ=lRadius*cos(s);float randY=h *height.x;newPosition=vec3(randX,randY,randZ); \nif (abs(cos(coneAngle))==1.0) {newDirection=vec3(0.,1.0,0.);} else {vec3 randoms3=getRandomVec3(seed.z);newDirection=normalize(newPosition+directionRandomizer*randoms3); }\n#elif defined(CUSTOMEMITTER)\nnewPosition=initialPosition;outInitialPosition=initialPosition;\n#else \nnewPosition=vec3(0.,0.,0.);newDirection=2.0*(getRandomVec3(seed.w)-vec3(0.5,0.5,0.5));\n#endif\nfloat power=emitPower.x+(emitPower.y-emitPower.x)*randoms.a;\n#ifdef LOCAL\noutPosition=newPosition;\n#else\noutPosition=(emitterWM*vec4(newPosition,1.)).xyz;\n#endif\n#ifdef CUSTOMEMITTER\noutDirection=direction;\n#ifndef BILLBOARD \noutInitialDirection=direction;\n#endif\n#else\n#ifdef LOCAL\nvec3 initial=newDirection;\n#else \nvec3 initial=(emitterWM*vec4(newDirection,0.)).xyz;\n#endif\noutDirection=initial*power;\n#ifndef BILLBOARD \noutInitialDirection=initial;\n#endif\n#endif\n#ifdef ANIMATESHEET \noutCellIndex=cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset=randoms.a*outLife;\n#endif \n#endif\n#ifdef NOISE\noutNoiseCoordinates1=noiseCoordinates1;outNoiseCoordinates2=noiseCoordinates2;\n#endif\n} else {float directionScale=timeDelta;outAge=newAge;float ageGradient=newAge/life;\n#ifdef VELOCITYGRADIENTS\ndirectionScale*=texture(velocityGradientSampler,vec2(ageGradient,0)).r;\n#endif\n#ifdef DRAGGRADIENTS\ndirectionScale*=1.0-texture(dragGradientSampler,vec2(ageGradient,0)).r;\n#endif\n#if defined(CUSTOMEMITTER)\noutPosition=position+(direction-position)*ageGradient; \noutInitialPosition=initialPosition;\n#else\noutPosition=position+direction*directionScale;\n#endif\noutLife=life;outSeed=seed;\n#ifndef COLORGRADIENTS \noutColor=color;\n#endif\n#ifdef SIZEGRADIENTS\noutSize.x=texture(sizeGradientSampler,vec2(ageGradient,0)).r;outSize.yz=size.yz;\n#else\noutSize=size;\n#endif \n#ifndef BILLBOARD \noutInitialDirection=initialDirection;\n#endif\n#ifdef CUSTOMEMITTER\noutDirection=direction;\n#else\nvec3 updatedDirection=direction+gravity*timeDelta;\n#ifdef LIMITVELOCITYGRADIENTS\nfloat limitVelocity=texture(limitVelocityGradientSampler,vec2(ageGradient,0)).r;float currentVelocity=length(updatedDirection);if (currentVelocity>limitVelocity) {updatedDirection=updatedDirection*limitVelocityDamping;}\n#endif\noutDirection=updatedDirection;\n#ifdef NOISE\nfloat fetchedR=texture(noiseSampler,vec2(noiseCoordinates1.x,noiseCoordinates1.y)*vec2(0.5)+vec2(0.5)).r;float fetchedG=texture(noiseSampler,vec2(noiseCoordinates1.z,noiseCoordinates2.x)*vec2(0.5)+vec2(0.5)).r;float fetchedB=texture(noiseSampler,vec2(noiseCoordinates2.y,noiseCoordinates2.z)*vec2(0.5)+vec2(0.5)).r;vec3 force=vec3(2.*fetchedR-1.,2.*fetchedG-1.,2.*fetchedB-1.)*noiseStrength;outDirection=outDirection+force*timeDelta;outNoiseCoordinates1=noiseCoordinates1;outNoiseCoordinates2=noiseCoordinates2;\n#endif \n#endif \n#ifdef ANGULARSPEEDGRADIENTS\nfloat angularSpeed=texture(angularSpeedGradientSampler,vec2(ageGradient,0)).r;outAngle=angle+angularSpeed*timeDelta;\n#else\noutAngle=vec2(angle.x+angle.y*timeDelta,angle.y);\n#endif\n#ifdef ANIMATESHEET \nfloat offsetAge=outAge;float dist=cellInfos.y-cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset=cellStartOffset;offsetAge+=cellStartOffset;\n#else\nfloat cellStartOffset=0.;\n#endif \nfloat ratio=0.;if (cellInfos.w==1.0) {ratio=clamp(mod(cellStartOffset+cellInfos.z*offsetAge,life)/life,0.,1.0);}\nelse {ratio=clamp(cellStartOffset+cellInfos.z*offsetAge/life,0.,1.0);}\noutCellIndex=float(int(cellInfos.x+ratio*dist));\n#endif\n}}";var RE=function(){function e(e,t){this._renderVAO=[],this._updateVAO=[],this.alignDataInBuffer=!1,this._parent=e,this._engine=t,this._updateEffectOptions={attributes:["position","initialPosition","age","life","seed","size","color","direction","initialDirection","angle","cellIndex","cellStartOffset","noiseCoordinates1","noiseCoordinates2"],uniformsNames:["currentCount","timeDelta","emitterWM","lifeTime","color1","color2","sizeRange","scaleRange","gravity","emitPower","direction1","direction2","minEmitBox","maxEmitBox","radius","directionRandomizer","height","coneAngle","stopFactor","angleRange","radiusRange","cellInfos","noiseStrength","limitVelocityDamping"],uniformBuffersNames:[],samplers:["randomSampler","randomSampler2","sizeGradientSampler","angularSpeedGradientSampler","velocityGradientSampler","limitVelocityGradientSampler","noiseSampler","dragGradientSampler"],defines:"",fallbacks:null,onCompiled:null,onError:null,indexParameters:null,maxSimultaneousLights:0,transformFeedbackVaryings:[]}}return e.prototype.contextLost=function(){this._updateEffect=void 0,this._renderVAO.length=0,this._updateVAO.length=0},e.prototype.isUpdateBufferCreated=function(){return!!this._updateEffect},e.prototype.isUpdateBufferReady=function(){var e,t;return null!==(t=null===(e=this._updateEffect)||void 0===e?void 0:e.isReady())&&void 0!==t&&t},e.prototype.createUpdateBuffer=function(e){return this._updateEffectOptions.transformFeedbackVaryings=["outPosition"],this._updateEffectOptions.transformFeedbackVaryings.push("outAge"),this._updateEffectOptions.transformFeedbackVaryings.push("outSize"),this._updateEffectOptions.transformFeedbackVaryings.push("outLife"),this._updateEffectOptions.transformFeedbackVaryings.push("outSeed"),this._updateEffectOptions.transformFeedbackVaryings.push("outDirection"),this._parent.particleEmitterType instanceof Xa&&this._updateEffectOptions.transformFeedbackVaryings.push("outInitialPosition"),this._parent._colorGradientsTexture||this._updateEffectOptions.transformFeedbackVaryings.push("outColor"),this._parent._isBillboardBased||this._updateEffectOptions.transformFeedbackVaryings.push("outInitialDirection"),this._parent.noiseTexture&&(this._updateEffectOptions.transformFeedbackVaryings.push("outNoiseCoordinates1"),this._updateEffectOptions.transformFeedbackVaryings.push("outNoiseCoordinates2")),this._updateEffectOptions.transformFeedbackVaryings.push("outAngle"),this._parent.isAnimationSheetEnabled&&(this._updateEffectOptions.transformFeedbackVaryings.push("outCellIndex"),this._parent.spriteRandomStartCell&&this._updateEffectOptions.transformFeedbackVaryings.push("outCellStartOffset")),this._updateEffectOptions.defines=e,this._updateEffect=new zt("gpuUpdateParticles",this._updateEffectOptions,this._engine),new IE(this._updateEffect)},e.prototype.createVertexBuffers=function(e,t){this._updateVAO.push(this._createUpdateVAO(e)),this._renderVAO.push(this._engine.recordVertexArrayObject(t,null,this._parent._getWrapper(this._parent.blendMode).effect)),this._engine.bindArrayBuffer(null),this._renderVertexBuffers=t},e.prototype.createParticleBuffer=function(e){return e},e.prototype.bindDrawBuffers=function(e,t,n){n?this._engine.bindBuffers(this._renderVertexBuffers,n,t):this._engine.bindVertexArrayObject(this._renderVAO[e],null)},e.prototype.preUpdateParticleBuffer=function(){var e=this._engine;if(this._engine.enableEffect(this._updateEffect),!e.setState)throw new Error("GPU particles cannot work without a full Engine. ThinEngine is not supported")},e.prototype.updateParticleBuffer=function(e,t,n){this._updateEffect.setTexture("randomSampler",this._parent._randomTexture),this._updateEffect.setTexture("randomSampler2",this._parent._randomTexture2),this._parent._sizeGradientsTexture&&this._updateEffect.setTexture("sizeGradientSampler",this._parent._sizeGradientsTexture),this._parent._angularSpeedGradientsTexture&&this._updateEffect.setTexture("angularSpeedGradientSampler",this._parent._angularSpeedGradientsTexture),this._parent._velocityGradientsTexture&&this._updateEffect.setTexture("velocityGradientSampler",this._parent._velocityGradientsTexture),this._parent._limitVelocityGradientsTexture&&this._updateEffect.setTexture("limitVelocityGradientSampler",this._parent._limitVelocityGradientsTexture),this._parent._dragGradientsTexture&&this._updateEffect.setTexture("dragGradientSampler",this._parent._dragGradientsTexture),this._parent.noiseTexture&&this._updateEffect.setTexture("noiseSampler",this._parent.noiseTexture),this._engine.bindVertexArrayObject(this._updateVAO[e],null);var i=this._engine;i.bindTransformFeedbackBuffer(t.getBuffer()),i.setRasterizerState(!1),i.beginTransformFeedback(!0),i.drawArraysType(a.MATERIAL_PointListDrawMode,0,n),i.endTransformFeedback(),i.setRasterizerState(!0),i.bindTransformFeedbackBuffer(null)},e.prototype.releaseBuffers=function(){},e.prototype.releaseVertexBuffers=function(){for(var e=0;ee)n(t[0],t[0],1);else{for(var i=0;i=r.gradient&&e<=o.gradient)return void n(r,o,(e-r.gradient)/(o.gradient-r.gradient))}var a=t.length-1;n(t[a],t[a],1)}},e}(),FE=function(){function e(t){this.particleSystem=t,this.position=C.Zero(),this.direction=C.Zero(),this.color=new U(0,0,0,0),this.colorStep=new U(0,0,0,0),this.lifeTime=1,this.age=0,this.size=0,this.scale=new S(1,1),this.angle=0,this.angularSpeed=0,this.cellIndex=0,this._attachedSubEmitters=null,this._currentColor1=new U(0,0,0,0),this._currentColor2=new U(0,0,0,0),this._currentSize1=0,this._currentSize2=0,this._currentAngularSpeed1=0,this._currentAngularSpeed2=0,this._currentVelocity1=0,this._currentVelocity2=0,this._currentLimitVelocity1=0,this._currentLimitVelocity2=0,this._currentDrag1=0,this._currentDrag2=0,this.id=e._Count++,this.particleSystem.isAnimationSheetEnabled&&this._updateCellInfoFromSystem()}return e.prototype._updateCellInfoFromSystem=function(){this.cellIndex=this.particleSystem.startSpriteCellID},e.prototype.updateCellIndex=function(){var e=this.age,t=this.particleSystem.spriteCellChangeSpeed;this.particleSystem.spriteRandomStartCell&&(void 0===this._randomCellOffset&&(this._randomCellOffset=Math.random()*this.lifeTime),0===t?(t=1,e=this._randomCellOffset):e+=this._randomCellOffset);var n,i=this._initialEndSpriteCellID-this._initialStartSpriteCellID;n=this._initialSpriteCellLoop?h.Clamp(e*t%this.lifeTime/this.lifeTime):h.Clamp(e*t/this.lifeTime),this.cellIndex=this._initialStartSpriteCellID+n*i|0},e.prototype._inheritParticleInfoToSubEmitter=function(e){if(e.particleSystem.emitter.position){var t=e.particleSystem.emitter;if(t.position.copyFrom(this.position),e.inheritDirection){var n=w.Vector3[0];this.direction.normalizeToRef(n),t.setDirection(n,0,Math.PI/2)}}else e.particleSystem.emitter.copyFrom(this.position);this.direction.scaleToRef(e.inheritedVelocityAmount/2,w.Vector3[0]),e.particleSystem._inheritedVelocityOffset.copyFrom(w.Vector3[0])},e.prototype._inheritParticleInfoToSubEmitters=function(){var e=this;this._attachedSubEmitters&&this._attachedSubEmitters.length>0&&this._attachedSubEmitters.forEach((function(t){e._inheritParticleInfoToSubEmitter(t)}))},e.prototype._reset=function(){this.age=0,this.id=e._Count++,this._currentColorGradient=null,this._currentSizeGradient=null,this._currentAngularSpeedGradient=null,this._currentVelocityGradient=null,this._currentLimitVelocityGradient=null,this._currentDragGradient=null,this.cellIndex=this.particleSystem.startSpriteCellID,this._randomCellOffset=void 0},e.prototype.copyTo=function(e){e.position.copyFrom(this.position),this._initialDirection?e._initialDirection?e._initialDirection.copyFrom(this._initialDirection):e._initialDirection=this._initialDirection.clone():e._initialDirection=null,e.direction.copyFrom(this.direction),this._localPosition&&(e._localPosition?e._localPosition.copyFrom(this._localPosition):e._localPosition=this._localPosition.clone()),e.color.copyFrom(this.color),e.colorStep.copyFrom(this.colorStep),e.lifeTime=this.lifeTime,e.age=this.age,e._randomCellOffset=this._randomCellOffset,e.size=this.size,e.scale.copyFrom(this.scale),e.angle=this.angle,e.angularSpeed=this.angularSpeed,e.particleSystem=this.particleSystem,e.cellIndex=this.cellIndex,e.id=this.id,e._attachedSubEmitters=this._attachedSubEmitters,this._currentColorGradient&&(e._currentColorGradient=this._currentColorGradient,e._currentColor1.copyFrom(this._currentColor1),e._currentColor2.copyFrom(this._currentColor2)),this._currentSizeGradient&&(e._currentSizeGradient=this._currentSizeGradient,e._currentSize1=this._currentSize1,e._currentSize2=this._currentSize2),this._currentAngularSpeedGradient&&(e._currentAngularSpeedGradient=this._currentAngularSpeedGradient,e._currentAngularSpeed1=this._currentAngularSpeed1,e._currentAngularSpeed2=this._currentAngularSpeed2),this._currentVelocityGradient&&(e._currentVelocityGradient=this._currentVelocityGradient,e._currentVelocity1=this._currentVelocity1,e._currentVelocity2=this._currentVelocity2),this._currentLimitVelocityGradient&&(e._currentLimitVelocityGradient=this._currentLimitVelocityGradient,e._currentLimitVelocity1=this._currentLimitVelocity1,e._currentLimitVelocity2=this._currentLimitVelocity2),this._currentDragGradient&&(e._currentDragGradient=this._currentDragGradient,e._currentDrag1=this._currentDrag1,e._currentDrag2=this._currentDrag2),this.particleSystem.isAnimationSheetEnabled&&(e._initialStartSpriteCellID=this._initialStartSpriteCellID,e._initialEndSpriteCellID=this._initialEndSpriteCellID,e._initialSpriteCellLoop=this._initialSpriteCellLoop),this.particleSystem.useRampGradients&&(e.remapData&&this.remapData?e.remapData.copyFrom(this.remapData):e.remapData=new P(0,0,0,0)),this._randomNoiseCoordinates1&&(e._randomNoiseCoordinates1?(e._randomNoiseCoordinates1.copyFrom(this._randomNoiseCoordinates1),e._randomNoiseCoordinates2.copyFrom(this._randomNoiseCoordinates2)):(e._randomNoiseCoordinates1=this._randomNoiseCoordinates1.clone(),e._randomNoiseCoordinates2=this._randomNoiseCoordinates2.clone()))},e._Count=0,e}();!function(e){e[e.ATTACHED=0]="ATTACHED",e[e.END=1]="END"}(wE||(wE={}));var BE=function(){function e(e){if(this.particleSystem=e,this.type=wE.END,this.inheritDirection=!1,this.inheritedVelocityAmount=0,!e.emitter||!e.emitter.dispose){var t=T("BABYLON.AbstractMesh");e.emitter=new t("SubemitterSystemEmitter",e.getScene()),e._disposeEmitterOnDispose=!0}}return e.prototype.clone=function(){var t=this.particleSystem.emitter;t?t instanceof C?t=t.clone():-1!==t.getClassName().indexOf("Mesh")&&((t=new(T("BABYLON.Mesh"))("",t.getScene())).isVisible=!1):t=new C;var n=new e(this.particleSystem.clone(this.particleSystem.name,t));return n.particleSystem.name+="Clone",n.type=this.type,n.inheritDirection=this.inheritDirection,n.inheritedVelocityAmount=this.inheritedVelocityAmount,n.particleSystem._disposeEmitterOnDispose=!0,n.particleSystem.disposeOnStop=!0,n},e.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};return t.type=this.type,t.inheritDirection=this.inheritDirection,t.inheritedVelocityAmount=this.inheritedVelocityAmount,t.particleSystem=this.particleSystem.serialize(e),t},e._ParseParticleSystem=function(e,t,n,i){throw void 0===i&&(i=!1),ye("ParseParticle")},e.Parse=function(t,n,i){var r=t.particleSystem,o=new e(e._ParseParticleSystem(r,n,i,!0));return o.type=t.type,o.inheritDirection=t.inheritDirection,o.inheritedVelocityAmount=t.inheritedVelocityAmount,o.particleSystem._isSubEmitter=!0,o},e.prototype.dispose=function(){this.particleSystem.dispose()},e}();Vt.ShadersStore.particlesPixelShader="#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\nvarying vec2 vUV;varying vec4 vColor;uniform vec4 textureMask;uniform sampler2D diffuseSampler;\n#include\n#include\n#include\n#include\n#include\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;uniform sampler2D rampSampler;\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include\nvec4 textureColor=texture2D(diffuseSampler,vUV);vec4 baseColor=(textureColor*textureMask+(vec4(1.,1.,1.,1.)-textureMask))*vColor;\n#ifdef RAMPGRADIENT\nfloat alpha=baseColor.a;float remappedColorIndex=clamp((alpha-remapRanges.x)/remapRanges.y,0.0,1.0);vec4 rampColor=texture2D(rampSampler,vec2(1.0-remappedColorIndex,0.));baseColor.rgb*=rampColor.rgb;float finalAlpha=baseColor.a;baseColor.a=clamp((alpha*rampColor.a-remapRanges.z)/remapRanges.w,0.0,1.0);\n#endif\n#ifdef BLENDMULTIPLYMODE\nfloat sourceAlpha=vColor.a*textureColor.a;baseColor.rgb=baseColor.rgb*sourceAlpha+vec3(1.0)*(1.0-sourceAlpha);\n#endif\n#include\n#ifdef IMAGEPROCESSINGPOSTPROCESS\nbaseColor.rgb=toLinearSpace(baseColor.rgb);\n#else\n#ifdef IMAGEPROCESSING\nbaseColor.rgb=toLinearSpace(baseColor.rgb);baseColor=applyImageProcessing(baseColor);\n#endif\n#endif\ngl_FragColor=baseColor;\n#define CUSTOM_FRAGMENT_MAIN_END\n}",Vt.ShadersStore.particlesVertexShader="attribute vec3 position;attribute vec4 color;attribute float angle;attribute vec2 size;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\n#ifndef BILLBOARD\nattribute vec3 direction;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\n#ifdef RAMPGRADIENT\nattribute vec4 remapData;\n#endif\nattribute vec2 offset;uniform mat4 view;uniform mat4 projection;uniform vec2 translationPivot;\n#ifdef ANIMATESHEET\nuniform vec3 particlesInfos; \n#endif\nvarying vec2 vUV;varying vec4 vColor;varying vec3 vPositionW;\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\n#endif\n#if defined(BILLBOARD) && !defined(BILLBOARDY) && !defined(BILLBOARDSTRETCHED)\nuniform mat4 invView;\n#endif\n#include\n#include\n#ifdef BILLBOARD\nuniform vec3 eyePosition;\n#endif\nvec3 rotate(vec3 yaxis,vec3 rotatedCorner) {vec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis));vec3 zaxis=normalize(cross(yaxis,xaxis));vec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z);vec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z);vec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z);mat3 rotMatrix= mat3(row0,row1,row2);vec3 alignedCorner=rotMatrix*rotatedCorner;return position+alignedCorner;}\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) {vec3 normalizedToCamera=normalize(toCamera);vec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera));vec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z);vec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z);\n#ifdef BILLBOARDSTRETCHED_LOCAL\nvec3 row1=direction;\n#else\nvec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera));vec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z);\n#endif\nmat3 rotMatrix= mat3(row0,row1,row2);vec3 alignedCorner=rotMatrix*rotatedCorner;return position+alignedCorner;}\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec2 cornerPos;cornerPos=(vec2(offset.x-0.5,offset.y -0.5)-translationPivot)*size;\n#ifdef BILLBOARD\nvec3 rotatedCorner;\n#ifdef BILLBOARDY\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);rotatedCorner.y=0.;rotatedCorner.xz+=translationPivot;vec3 yaxis=position-eyePosition;yaxis.y=0.;vPositionW=rotate(normalize(yaxis),rotatedCorner);vec3 viewPos=(view*vec4(vPositionW,1.0)).xyz;\n#elif defined(BILLBOARDSTRETCHED)\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);rotatedCorner.z=0.;rotatedCorner.xy+=translationPivot;vec3 toCamera=position-eyePosition;vPositionW=rotateAlign(toCamera,rotatedCorner);vec3 viewPos=(view*vec4(vPositionW,1.0)).xyz;\n#else\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);rotatedCorner.z=0.;rotatedCorner.xy+=translationPivot;vec3 viewPos=(view*vec4(position,1.0)).xyz+rotatedCorner;vPositionW=(invView*vec4(viewPos,1)).xyz;\n#endif\n#ifdef RAMPGRADIENT\nremapRanges=remapData;\n#endif\ngl_Position=projection*vec4(viewPos,1.0);\n#else\nvec3 rotatedCorner;rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);rotatedCorner.y=0.;rotatedCorner.xz+=translationPivot;vec3 yaxis=normalize(direction);vPositionW=rotate(yaxis,rotatedCorner);gl_Position=projection*view*vec4(vPositionW,1.0);\n#endif\nvColor=color;\n#ifdef ANIMATESHEET\nfloat rowOffset=floor(cellIndex*particlesInfos.z);float columnOffset=cellIndex-rowOffset/particlesInfos.z;vec2 uvScale=particlesInfos.xy;vec2 uvOffset=vec2(offset.x ,1.0-offset.y);vUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale;\n#else\nvUV=offset;\n#endif\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)\nvec4 worldPos=vec4(vPositionW,1.0);\n#endif\n#include\n#include\n#define CUSTOM_VERTEX_MAIN_END\n}";var UE=function(e){function t(t,n,i,r,o,a){void 0===r&&(r=null),void 0===o&&(o=!1),void 0===a&&(a=.01);var s=e.call(this,t)||this;s._emitterInverseWorldMatrix=R.Identity(),s._inheritedVelocityOffset=new C,s.onDisposeObservable=new u,s.onStoppedObservable=new u,s._particles=new Array,s._stockParticles=new Array,s._newPartsExcess=0,s._vertexBuffers={},s._scaledColorStep=new U(0,0,0,0),s._colorDiff=new U(0,0,0,0),s._scaledDirection=C.Zero(),s._scaledGravity=C.Zero(),s._currentRenderId=-1,s._useInstancing=!1,s._started=!1,s._stopped=!1,s._actualFrame=0,s._currentEmitRate1=0,s._currentEmitRate2=0,s._currentStartSize1=0,s._currentStartSize2=0,s.updateInAnimate=!0,s._rawTextureWidth=256,s._useRampGradients=!1,s._disposeEmitterOnDispose=!1,s.isLocal=!1,s.isGPU=!1,s._onBeforeDrawParticlesObservable=null,s.recycleParticle=function(e){var t=s._particles.pop();t!==e&&t.copyTo(e),s._stockParticles.push(t)},s._createParticle=function(){var e;if(0!==s._stockParticles.length?(e=s._stockParticles.pop())._reset():e=new FE(s),s._subEmitters&&s._subEmitters.length>0){var t=s._subEmitters[Math.floor(Math.random()*s._subEmitters.length)];e._attachedSubEmitters=[],t.forEach((function(t){if(t.type===wE.ATTACHED){var n=t.clone();e._attachedSubEmitters.push(n),n.particleSystem.start()}}))}return e},s._emitFromParticle=function(e){if(s._subEmitters&&0!==s._subEmitters.length){var t=Math.floor(Math.random()*s._subEmitters.length);s._subEmitters[t].forEach((function(t){if(t.type===wE.END){var n=t.clone();e._inheritParticleInfoToSubEmitter(n),n.particleSystem._rootParticleSystem=s,s.activeSubSystems.push(n.particleSystem),n.particleSystem.start()}}))}},s._capacity=n,s._epsilon=a,s._isAnimationSheetEnabled=o,i&&"Scene"!==i.getClassName()?(s._engine=i,s.defaultProjectionMatrix=R.PerspectiveFovLH(.8,1,.1,100,s._engine.isNDCHalfZRange)):(s._scene=i||A.LastCreatedScene,s._engine=s._scene.getEngine(),s.uniqueId=s._scene.getUniqueId(),s._scene.particleSystems.push(s)),s._engine.getCaps().vertexArrayObject&&(s._vertexArrayObject=null),s._attachImageProcessingConfiguration(null),s._customWrappers={0:new en(s._engine)},s._customWrappers[0].effect=r,s._drawWrappers=[],s._useInstancing=s._engine.getCaps().instancedArrays,s._createIndexBuffer(),s._createVertexBuffers(),s.particleEmitterType=new Ua;var c=null;return s.updateFunction=function(e){var t,n=null;s.noiseTexture&&(n=s.noiseTexture.getSize(),null===(t=s.noiseTexture.getContent())||void 0===t||t.then((function(e){c=e})));for(var i,r=e===s._particles,o=function(t){var o=e[t],a=s._scaledUpdateSpeed,l=o.age;if(o.age+=a,o.age>o.lifeTime){var u=o.age-l;a=(o.lifeTime-l)*a/u,o.age=o.lifeTime}var d=o.age/o.lifeTime;s._colorGradients&&s._colorGradients.length>0?LE.GetCurrentGradient(d,s._colorGradients,(function(e,t,n){e!==o._currentColorGradient&&(o._currentColor1.copyFrom(o._currentColor2),t.getColorToRef(o._currentColor2),o._currentColorGradient=e),U.LerpToRef(o._currentColor1,o._currentColor2,n,o.color)})):(o.colorStep.scaleToRef(a,s._scaledColorStep),o.color.addInPlace(s._scaledColorStep),o.color.a<0&&(o.color.a=0)),s._angularSpeedGradients&&s._angularSpeedGradients.length>0&&LE.GetCurrentGradient(d,s._angularSpeedGradients,(function(e,t,n){e!==o._currentAngularSpeedGradient&&(o._currentAngularSpeed1=o._currentAngularSpeed2,o._currentAngularSpeed2=t.getFactor(),o._currentAngularSpeedGradient=e),o.angularSpeed=h.Lerp(o._currentAngularSpeed1,o._currentAngularSpeed2,n)})),o.angle+=o.angularSpeed*a;var p=a;if(s._velocityGradients&&s._velocityGradients.length>0&&LE.GetCurrentGradient(d,s._velocityGradients,(function(e,t,n){e!==o._currentVelocityGradient&&(o._currentVelocity1=o._currentVelocity2,o._currentVelocity2=t.getFactor(),o._currentVelocityGradient=e),p*=h.Lerp(o._currentVelocity1,o._currentVelocity2,n)})),o.direction.scaleToRef(p,s._scaledDirection),s._limitVelocityGradients&&s._limitVelocityGradients.length>0&&LE.GetCurrentGradient(d,s._limitVelocityGradients,(function(e,t,n){e!==o._currentLimitVelocityGradient&&(o._currentLimitVelocity1=o._currentLimitVelocity2,o._currentLimitVelocity2=t.getFactor(),o._currentLimitVelocityGradient=e);var i=h.Lerp(o._currentLimitVelocity1,o._currentLimitVelocity2,n);o.direction.length()>i&&o.direction.scaleInPlace(s.limitVelocityDamping)})),s._dragGradients&&s._dragGradients.length>0&&LE.GetCurrentGradient(d,s._dragGradients,(function(e,t,n){e!==o._currentDragGradient&&(o._currentDrag1=o._currentDrag2,o._currentDrag2=t.getFactor(),o._currentDragGradient=e);var i=h.Lerp(o._currentDrag1,o._currentDrag2,n);s._scaledDirection.scaleInPlace(1-i)})),s.isLocal&&o._localPosition?(o._localPosition.addInPlace(s._scaledDirection),C.TransformCoordinatesToRef(o._localPosition,s._emitterWorldMatrix,o.position)):o.position.addInPlace(s._scaledDirection),c&&n&&o._randomNoiseCoordinates1){var f=s._fetchR(o._randomNoiseCoordinates1.x,o._randomNoiseCoordinates1.y,n.width,n.height,c),m=s._fetchR(o._randomNoiseCoordinates1.z,o._randomNoiseCoordinates2.x,n.width,n.height,c),_=s._fetchR(o._randomNoiseCoordinates2.y,o._randomNoiseCoordinates2.z,n.width,n.height,c),g=w.Vector3[0],y=w.Vector3[1];g.copyFromFloats((2*f-1)*s.noiseStrength.x,(2*m-1)*s.noiseStrength.y,(2*_-1)*s.noiseStrength.z),g.scaleToRef(a,y),o.direction.addInPlace(y)}if(s.gravity.scaleToRef(a,s._scaledGravity),o.direction.addInPlace(s._scaledGravity),s._sizeGradients&&s._sizeGradients.length>0&&LE.GetCurrentGradient(d,s._sizeGradients,(function(e,t,n){e!==o._currentSizeGradient&&(o._currentSize1=o._currentSize2,o._currentSize2=t.getFactor(),o._currentSizeGradient=e),o.size=h.Lerp(o._currentSize1,o._currentSize2,n)})),s._useRampGradients&&(s._colorRemapGradients&&s._colorRemapGradients.length>0&&LE.GetCurrentGradient(d,s._colorRemapGradients,(function(e,t,n){var i=h.Lerp(e.factor1,t.factor1,n),r=h.Lerp(e.factor2,t.factor2,n);o.remapData.x=i,o.remapData.y=r-i})),s._alphaRemapGradients&&s._alphaRemapGradients.length>0&&LE.GetCurrentGradient(d,s._alphaRemapGradients,(function(e,t,n){var i=h.Lerp(e.factor1,t.factor1,n),r=h.Lerp(e.factor2,t.factor2,n);o.remapData.z=i,o.remapData.w=r-i}))),s._isAnimationSheetEnabled&&o.updateCellIndex(),o._inheritParticleInfoToSubEmitters(),o.age>=o.lifeTime)return s._emitFromParticle(o),o._attachedSubEmitters&&(o._attachedSubEmitters.forEach((function(e){e.particleSystem.disposeOnStop=!0,e.particleSystem.stop()})),o._attachedSubEmitters=null),s.recycleParticle(o),r&&t--,i=t,"continue";i=t},a=0;at.gradient?1:0}))},t.prototype._removeFactorGradient=function(e,t){if(e)for(var n=0,i=0,r=e;it.gradient?1:0})),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._createRampGradientTexture())},t.prototype.addRampGradient=function(e,t){this._rampGradients||(this._rampGradients=[]);var n=new DE(e,t);return this._rampGradients.push(n),this._syncRampGradientTexture(),this},t.prototype.removeRampGradient=function(e){return this._removeGradientAndTexture(e,this._rampGradients,this._rampGradientsTexture),this._rampGradientsTexture=null,this._rampGradients&&this._rampGradients.length>0&&this._createRampGradientTexture(),this},t.prototype.addColorGradient=function(e,t,n){this._colorGradients||(this._colorGradients=[]);var i=new ME(e,t,n);return this._colorGradients.push(i),this._colorGradients.sort((function(e,t){return e.gradientt.gradient?1:0})),this},t.prototype.removeColorGradient=function(e){if(!this._colorGradients)return this;for(var t=0,n=0,i=this._colorGradients;n0&&(this._currentEmitRateGradient=this._emitRateGradients[0],this._currentEmitRate1=this._currentEmitRateGradient.getFactor(),this._currentEmitRate2=this._currentEmitRate1),this._emitRateGradients.length>1&&(this._currentEmitRate2=this._emitRateGradients[1].getFactor())),this._startSizeGradients&&(this._startSizeGradients.length>0&&(this._currentStartSizeGradient=this._startSizeGradients[0],this._currentStartSize1=this._currentStartSizeGradient.getFactor(),this._currentStartSize2=this._currentStartSize1),this._startSizeGradients.length>1&&(this._currentStartSize2=this._startSizeGradients[1].getFactor())),this.preWarmCycles){-1!==(null===(t=this.emitter)||void 0===t?void 0:t.getClassName().indexOf("Mesh"))&&this.emitter.computeWorldMatrix(!0);var i=this.noiseTexture;if(i&&i.onGeneratedObservable)i.onGeneratedObservable.addOnce((function(){setTimeout((function(){for(var e=0;e0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop)}},t.prototype.stop=function(e){void 0===e&&(e=!0),this._stopped||(this.onStoppedObservable.notifyObservers(this),this._stopped=!0,e&&this._stopSubEmitters())},t.prototype.reset=function(){this._stockParticles.length=0,this._particles.length=0},t.prototype._appendParticleVertex=function(e,n,i,r){var o=e*this._vertexBufferSize;if(this._vertexData[o++]=n.position.x+this.worldOffset.x,this._vertexData[o++]=n.position.y+this.worldOffset.y,this._vertexData[o++]=n.position.z+this.worldOffset.z,this._vertexData[o++]=n.color.r,this._vertexData[o++]=n.color.g,this._vertexData[o++]=n.color.b,this._vertexData[o++]=n.color.a,this._vertexData[o++]=n.angle,this._vertexData[o++]=n.scale.x*n.size,this._vertexData[o++]=n.scale.y*n.size,this._isAnimationSheetEnabled&&(this._vertexData[o++]=n.cellIndex),this._isBillboardBased)this.billboardMode!==t.BILLBOARDMODE_STRETCHED&&this.billboardMode!==t.BILLBOARDMODE_STRETCHED_LOCAL||(this._vertexData[o++]=n.direction.x,this._vertexData[o++]=n.direction.y,this._vertexData[o++]=n.direction.z);else if(n._initialDirection){var a=n._initialDirection;this.isLocal&&(C.TransformNormalToRef(a,this._emitterWorldMatrix,w.Vector3[0]),a=w.Vector3[0]),0===a.x&&0===a.z&&(a.x=.001),this._vertexData[o++]=a.x,this._vertexData[o++]=a.y,this._vertexData[o++]=a.z}else{var s=n.direction;this.isLocal&&(C.TransformNormalToRef(s,this._emitterWorldMatrix,w.Vector3[0]),s=w.Vector3[0]),0===s.x&&0===s.z&&(s.x=.001),this._vertexData[o++]=s.x,this._vertexData[o++]=s.y,this._vertexData[o++]=s.z}this._useRampGradients&&n.remapData&&(this._vertexData[o++]=n.remapData.x,this._vertexData[o++]=n.remapData.y,this._vertexData[o++]=n.remapData.z,this._vertexData[o++]=n.remapData.w),this._useInstancing||(this._isAnimationSheetEnabled&&(0===i?i=this._epsilon:1===i&&(i=1-this._epsilon),0===r?r=this._epsilon:1===r&&(r=1-this._epsilon)),this._vertexData[o++]=i,this._vertexData[o++]=r)},t.prototype._stopSubEmitters=function(){this.activeSubSystems&&(this.activeSubSystems.forEach((function(e){e.stop(!0)})),this.activeSubSystems=[])},t.prototype._removeFromRoot=function(){if(this._rootParticleSystem){var e=this._rootParticleSystem.activeSubSystems.indexOf(this);-1!==e&&this._rootParticleSystem.activeSubSystems.splice(e,1),this._rootParticleSystem=null}},t.prototype._update=function(e){var t,n=this;if(this._alive=this._particles.length>0,this.emitter.position){var i=this.emitter;this._emitterWorldMatrix=i.getWorldMatrix()}else{var r=this.emitter;this._emitterWorldMatrix=R.Translation(r.x,r.y,r.z)}this._emitterWorldMatrix.invertToRef(this._emitterInverseWorldMatrix),this.updateFunction(this._particles);for(var o=function(e){if(a._particles.length===a._capacity)return"break";if(t=a._createParticle(),a._particles.push(t),a.targetStopDuration&&a._lifeTimeGradients&&a._lifeTimeGradients.length>0){var i=h.Clamp(a._actualFrame/a.targetStopDuration);LE.GetCurrentGradient(i,a._lifeTimeGradients,(function(e,n){var r=e,o=n,a=r.getFactor(),s=o.getFactor(),c=(i-r.gradient)/(o.gradient-r.gradient);t.lifeTime=h.Lerp(a,s,c)}))}else t.lifeTime=h.RandomRange(a.minLifeTime,a.maxLifeTime);var r=h.RandomRange(a.minEmitPower,a.maxEmitPower);if(a.startPositionFunction?a.startPositionFunction(a._emitterWorldMatrix,t.position,t,a.isLocal):a.particleEmitterType.startPositionFunction(a._emitterWorldMatrix,t.position,t,a.isLocal),a.isLocal&&(t._localPosition?t._localPosition.copyFrom(t.position):t._localPosition=t.position.clone(),C.TransformCoordinatesToRef(t._localPosition,a._emitterWorldMatrix,t.position)),a.startDirectionFunction?a.startDirectionFunction(a._emitterWorldMatrix,t.direction,t,a.isLocal):a.particleEmitterType.startDirectionFunction(a._emitterWorldMatrix,t.direction,t,a.isLocal,a._emitterInverseWorldMatrix),0===r?t._initialDirection?t._initialDirection.copyFrom(t.direction):t._initialDirection=t.direction.clone():t._initialDirection=null,t.direction.scaleInPlace(r),a._sizeGradients&&0!==a._sizeGradients.length?(t._currentSizeGradient=a._sizeGradients[0],t._currentSize1=t._currentSizeGradient.getFactor(),t.size=t._currentSize1,a._sizeGradients.length>1?t._currentSize2=a._sizeGradients[1].getFactor():t._currentSize2=t._currentSize1):t.size=h.RandomRange(a.minSize,a.maxSize),t.scale.copyFromFloats(h.RandomRange(a.minScaleX,a.maxScaleX),h.RandomRange(a.minScaleY,a.maxScaleY)),a._startSizeGradients&&a._startSizeGradients[0]&&a.targetStopDuration){var o=a._actualFrame/a.targetStopDuration;LE.GetCurrentGradient(o,a._startSizeGradients,(function(e,i,r){e!==n._currentStartSizeGradient&&(n._currentStartSize1=n._currentStartSize2,n._currentStartSize2=i.getFactor(),n._currentStartSizeGradient=e);var o=h.Lerp(n._currentStartSize1,n._currentStartSize2,r);t.scale.scaleInPlace(o)}))}if(a._angularSpeedGradients&&0!==a._angularSpeedGradients.length?(t._currentAngularSpeedGradient=a._angularSpeedGradients[0],t.angularSpeed=t._currentAngularSpeedGradient.getFactor(),t._currentAngularSpeed1=t.angularSpeed,a._angularSpeedGradients.length>1?t._currentAngularSpeed2=a._angularSpeedGradients[1].getFactor():t._currentAngularSpeed2=t._currentAngularSpeed1):t.angularSpeed=h.RandomRange(a.minAngularSpeed,a.maxAngularSpeed),t.angle=h.RandomRange(a.minInitialRotation,a.maxInitialRotation),a._velocityGradients&&a._velocityGradients.length>0&&(t._currentVelocityGradient=a._velocityGradients[0],t._currentVelocity1=t._currentVelocityGradient.getFactor(),a._velocityGradients.length>1?t._currentVelocity2=a._velocityGradients[1].getFactor():t._currentVelocity2=t._currentVelocity1),a._limitVelocityGradients&&a._limitVelocityGradients.length>0&&(t._currentLimitVelocityGradient=a._limitVelocityGradients[0],t._currentLimitVelocity1=t._currentLimitVelocityGradient.getFactor(),a._limitVelocityGradients.length>1?t._currentLimitVelocity2=a._limitVelocityGradients[1].getFactor():t._currentLimitVelocity2=t._currentLimitVelocity1),a._dragGradients&&a._dragGradients.length>0&&(t._currentDragGradient=a._dragGradients[0],t._currentDrag1=t._currentDragGradient.getFactor(),a._dragGradients.length>1?t._currentDrag2=a._dragGradients[1].getFactor():t._currentDrag2=t._currentDrag1),a._colorGradients&&0!==a._colorGradients.length)t._currentColorGradient=a._colorGradients[0],t._currentColorGradient.getColorToRef(t.color),t._currentColor1.copyFrom(t.color),a._colorGradients.length>1?a._colorGradients[1].getColorToRef(t._currentColor2):t._currentColor2.copyFrom(t.color);else{var s=h.RandomRange(0,1);U.LerpToRef(a.color1,a.color2,s,t.color),a.colorDead.subtractToRef(t.color,a._colorDiff),a._colorDiff.scaleToRef(1/t.lifeTime,t.colorStep)}a._isAnimationSheetEnabled&&(t._initialStartSpriteCellID=a.startSpriteCellID,t._initialEndSpriteCellID=a.endSpriteCellID,t._initialSpriteCellLoop=a.spriteCellLoop),t.direction.addInPlace(a._inheritedVelocityOffset),a._useRampGradients&&(t.remapData=new P(0,1,0,1)),a.noiseTexture&&(t._randomNoiseCoordinates1?(t._randomNoiseCoordinates1.copyFromFloats(Math.random(),Math.random(),Math.random()),t._randomNoiseCoordinates2.copyFromFloats(Math.random(),Math.random(),Math.random())):(t._randomNoiseCoordinates1=new C(Math.random(),Math.random(),Math.random()),t._randomNoiseCoordinates2=new C(Math.random(),Math.random(),Math.random()))),t._inheritParticleInfoToSubEmitters()},a=this,s=0;s-1)i=this.manualEmitCount,this._newPartsExcess=0,this.manualEmitCount=0;else{var r=this.emitRate;if(this._emitRateGradients&&this._emitRateGradients.length>0&&this.targetStopDuration){var o=this._actualFrame/this.targetStopDuration;LE.GetCurrentGradient(o,this._emitRateGradients,(function(e,t,i){e!==n._currentEmitRateGradient&&(n._currentEmitRate1=n._currentEmitRate2,n._currentEmitRate2=t.getFactor(),n._currentEmitRateGradient=e),r=h.Lerp(n._currentEmitRate1,n._currentEmitRate2,i)}))}i=r*this._scaledUpdateSpeed>>0,this._newPartsExcess+=r*this._scaledUpdateSpeed-i}if(this._newPartsExcess>1&&(i+=this._newPartsExcess>>0,this._newPartsExcess-=this._newPartsExcess>>0),this._alive=!1,this._stopped?i=0:(this._actualFrame+=this._scaledUpdateSpeed,this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()),this._update(i),this._stopped&&(this._alive||(this._started=!1,this.onAnimationEnd&&this.onAnimationEnd(),this.disposeOnStop&&this._scene&&this._scene._toBeDisposed.push(this))),!e){for(var a=0,s=0;s=0&&(f.invertToRef(w.Matrix[0]),d.setMatrix("invView",w.Matrix[0])),void 0!==this._vertexArrayObject?(null===(r=this._scene)||void 0===r?void 0:r.forceWireframe)?p.bindBuffers(this._vertexBuffers,this._linesIndexBufferUseInstancing,d):(this._vertexArrayObject||(this._vertexArrayObject=this._engine.recordVertexArrayObject(this._vertexBuffers,null,d)),this._engine.bindVertexArrayObject(this._vertexArrayObject,(null===(o=this._scene)||void 0===o?void 0:o.forceWireframe)?this._linesIndexBufferUseInstancing:this._indexBuffer)):this._indexBuffer?p.bindBuffers(this._vertexBuffers,(null===(c=this._scene)||void 0===c?void 0:c.forceWireframe)?this._linesIndexBuffer:this._indexBuffer,d):p.bindBuffers(this._vertexBuffers,(null===(s=this._scene)||void 0===s?void 0:s.forceWireframe)?this._linesIndexBufferUseInstancing:null,d),this.useLogarithmicDepth&&this._scene&&Xr.BindLogDepth(g,d,this._scene),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(d),e){case t.BLENDMODE_ADD:p.setAlphaMode(a.ALPHA_ADD);break;case t.BLENDMODE_ONEONE:p.setAlphaMode(a.ALPHA_ONEONE);break;case t.BLENDMODE_STANDARD:p.setAlphaMode(a.ALPHA_COMBINE);break;case t.BLENDMODE_MULTIPLY:p.setAlphaMode(a.ALPHA_MULTIPLY)}return this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(d),this._useInstancing?(null===(l=this._scene)||void 0===l?void 0:l.forceWireframe)?p.drawElementsType(a.MATERIAL_LineStripDrawMode,0,10,this._particles.length):p.drawArraysType(a.MATERIAL_TriangleStripDrawMode,0,4,this._particles.length):(null===(u=this._scene)||void 0===u?void 0:u.forceWireframe)?p.drawElementsType(a.MATERIAL_WireFrameFillMode,0,10*this._particles.length):p.drawElementsType(a.MATERIAL_TriangleFillMode,0,6*this._particles.length),this._particles.length},t.prototype.render=function(){if(!this.isReady()||!this._particles.length)return 0;var e,n=this._engine;return n.setState&&(n.setState(!1),this.forceDepthWrite&&n.setDepthWrite(!0)),e=this.blendMode===t.BLENDMODE_MULTIPLYADD?this._render(t.BLENDMODE_MULTIPLY)+this._render(t.BLENDMODE_ADD):this._render(this.blendMode),this._engine.unbindInstanceAttributes(),this._engine.setAlphaMode(a.ALPHA_DISABLE),e},t.prototype.dispose=function(e){if(void 0===e&&(e=!0),this.resetDrawCache(),this._vertexBuffer&&(this._vertexBuffer.dispose(),this._vertexBuffer=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._indexBuffer&&(this._engine._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this._linesIndexBuffer&&(this._engine._releaseBuffer(this._linesIndexBuffer),this._linesIndexBuffer=null),this._linesIndexBufferUseInstancing&&(this._engine._releaseBuffer(this._linesIndexBufferUseInstancing),this._linesIndexBufferUseInstancing=null),this._vertexArrayObject&&(this._engine.releaseVertexArrayObject(this._vertexArrayObject),this._vertexArrayObject=null),e&&this.particleTexture&&(this.particleTexture.dispose(),this.particleTexture=null),e&&this.noiseTexture&&(this.noiseTexture.dispose(),this.noiseTexture=null),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._removeFromRoot(),this.subEmitters&&!this._subEmitters&&this._prepareSubEmitterInternalArray(),this._subEmitters&&this._subEmitters.length){for(var t=0;t-1&&this._scene.particleSystems.splice(t,1),this._scene._activeParticleSystems.dispose()),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onStoppedObservable.clear(),this.reset()},t.prototype.clone=function(e,n,i){void 0===i&&(i=!1);var r=j({},this._customWrappers),o=null,a=this._engine;if(a.createEffectForParticles&&null!=this.customShader){var s=(o=this.customShader).shaderOptions.defines.length>0?o.shaderOptions.defines.join("\n"):"",c=a.createEffectForParticles(o.shaderPath.fragmentElement,o.shaderOptions.uniforms,o.shaderOptions.samplers,s);r[0]?r[0].effect=c:this.setCustomEffect(c,0)}var l=this.serialize(i),u=t.Parse(l,this._scene||this._engine,this._rootUrl);return u.name=e,u.customShader=o,u._customWrappers=r,void 0===n&&(n=this.emitter),this.noiseTexture&&(u.noiseTexture=this.noiseTexture.clone()),u.emitter=n,this.preventAutoStart||u.start(),u},t.prototype.serialize=function(e){void 0===e&&(e=!1);var n={};if(t._Serialize(n,this,e),n.textureMask=this.textureMask.asArray(),n.customShader=this.customShader,n.preventAutoStart=this.preventAutoStart,this.subEmitters){n.subEmitters=[],this._subEmitters||this._prepareSubEmitterInternalArray();for(var i=0,r=this._subEmitters;i0?l.shaderOptions.defines.join("\n"):"";c=a.createEffectForParticles(l.shaderPath.fragmentElement,l.shaderOptions.uniforms,l.shaderOptions.samplers,u)}var h=new t(s,o||e.capacity,n,c,e.isAnimationSheetEnabled);if(h.customShader=l,h._rootUrl=i,e.id&&(h.id=e.id),e.subEmitters){h.subEmitters=[];for(var d=0,p=e.subEmitters;d0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop))},t.prototype.stop=function(){this._stopped||(this._stopped=!0)},t.prototype.reset=function(){this._releaseBuffers(),this._platform.releaseVertexBuffers(),this._currentActiveCount=0,this._targetIndex=0},t.prototype.getClassName=function(){return"GPUParticleSystem"},t.prototype.getCustomEffect=function(e){var t,n;return void 0===e&&(e=0),null!==(n=null===(t=this._customWrappers[e])||void 0===t?void 0:t.effect)&&void 0!==n?n:this._customWrappers[0].effect},t.prototype._getCustomDrawWrapper=function(e){var t;return void 0===e&&(e=0),null!==(t=this._customWrappers[e])&&void 0!==t?t:this._customWrappers[0]},t.prototype.setCustomEffect=function(e,t){void 0===t&&(t=0),this._customWrappers[t]=new en(this._engine),this._customWrappers[t].effect=e},Object.defineProperty(t.prototype,"onBeforeDrawParticlesObservable",{get:function(){return this._onBeforeDrawParticlesObservable||(this._onBeforeDrawParticlesObservable=new u),this._onBeforeDrawParticlesObservable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vertexShaderName",{get:function(){return"gpuRenderParticles"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vertexBuffers",{get:function(){return this._renderVertexBuffers[1^this._targetIndex]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indexBuffer",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype._removeGradientAndTexture=function(t,n,i){return e.prototype._removeGradientAndTexture.call(this,t,n,i),this._releaseBuffers(),this},t.prototype.addColorGradient=function(e,t){this._colorGradients||(this._colorGradients=[]);var n=new ME(e,t);return this._colorGradients.push(n),this._refreshColorGradient(!0),this._releaseBuffers(),this},t.prototype._refreshColorGradient=function(e){void 0===e&&(e=!1),this._colorGradients&&(e&&this._colorGradients.sort((function(e,t){return e.gradientt.gradient?1:0})),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null))},t.prototype.forceRefreshGradients=function(){this._refreshColorGradient(),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture"),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture"),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture"),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture"),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture"),this.reset()},t.prototype.removeColorGradient=function(e){return this._removeGradientAndTexture(e,this._colorGradients,this._colorGradientsTexture),this._colorGradientsTexture=null,this},t.prototype.resetDrawCache=function(){var e;for(var t in this._drawWrappers)null===(e=this._drawWrappers[t].drawContext)||void 0===e||e.reset()},t.prototype._addFactorGradient=function(e,t,n){var i=new NE(t,n);e.push(i),this._releaseBuffers()},t.prototype.addSizeGradient=function(e,t){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeSizeGradient=function(e){return this._removeGradientAndTexture(e,this._sizeGradients,this._sizeGradientsTexture),this._sizeGradientsTexture=null,this},t.prototype._refreshFactorGradient=function(e,t,n){if(void 0===n&&(n=!1),e){n&&e.sort((function(e,t){return e.gradientt.gradient?1:0}));var i=this;i[t]&&(i[t].dispose(),i[t]=null)}},t.prototype.addAngularSpeedGradient=function(e,t){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeAngularSpeedGradient=function(e){return this._removeGradientAndTexture(e,this._angularSpeedGradients,this._angularSpeedGradientsTexture),this._angularSpeedGradientsTexture=null,this},t.prototype.addVelocityGradient=function(e,t){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._velocityGradients,this._velocityGradientsTexture),this._velocityGradientsTexture=null,this},t.prototype.addLimitVelocityGradient=function(e,t){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeLimitVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._limitVelocityGradients,this._limitVelocityGradientsTexture),this._limitVelocityGradientsTexture=null,this},t.prototype.addDragGradient=function(e,t){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeDragGradient=function(e){return this._removeGradientAndTexture(e,this._dragGradients,this._dragGradientsTexture),this._dragGradientsTexture=null,this},t.prototype.addEmitRateGradient=function(){return this},t.prototype.removeEmitRateGradient=function(){return this},t.prototype.addStartSizeGradient=function(){return this},t.prototype.removeStartSizeGradient=function(){return this},t.prototype.addColorRemapGradient=function(){return this},t.prototype.removeColorRemapGradient=function(){return this},t.prototype.addAlphaRemapGradient=function(){return this},t.prototype.removeAlphaRemapGradient=function(){return this},t.prototype.addRampGradient=function(){return this},t.prototype.removeRampGradient=function(){return this},t.prototype.getRampGradients=function(){return null},Object.defineProperty(t.prototype,"useRampGradients",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),t.prototype.addLifeTimeGradient=function(){return this},t.prototype.removeLifeTimeGradient=function(){return this},t.prototype._reset=function(){this._releaseBuffers()},t.prototype._createVertexBuffers=function(e,t,n){var i={};i.position=t.createVertexBuffer("position",0,3,this._attributesStrideSize,!0);var r=3;i.age=t.createVertexBuffer("age",r,1,this._attributesStrideSize,!0),r+=1,i.size=t.createVertexBuffer("size",r,3,this._attributesStrideSize,!0),r+=3,i.life=t.createVertexBuffer("life",r,1,this._attributesStrideSize,!0),r+=1,r+=4,this.billboardMode===UE.BILLBOARDMODE_STRETCHED&&(i.direction=t.createVertexBuffer("direction",r,3,this._attributesStrideSize,!0)),r+=3,this._platform.alignDataInBuffer&&(r+=1),this.particleEmitterType instanceof Xa&&(r+=3,this._platform.alignDataInBuffer&&(r+=1)),this._colorGradientsTexture||(i.color=t.createVertexBuffer("color",r,4,this._attributesStrideSize,!0),r+=4),this._isBillboardBased||(i.initialDirection=t.createVertexBuffer("initialDirection",r,3,this._attributesStrideSize,!0),r+=3,this._platform.alignDataInBuffer&&(r+=1)),this.noiseTexture&&(i.noiseCoordinates1=t.createVertexBuffer("noiseCoordinates1",r,3,this._attributesStrideSize,!0),r+=3,this._platform.alignDataInBuffer&&(r+=1),i.noiseCoordinates2=t.createVertexBuffer("noiseCoordinates2",r,3,this._attributesStrideSize,!0),r+=3,this._platform.alignDataInBuffer&&(r+=1)),i.angle=t.createVertexBuffer("angle",r,1,this._attributesStrideSize,!0),this._angularSpeedGradientsTexture?r++:r+=2,this._isAnimationSheetEnabled&&(i.cellIndex=t.createVertexBuffer("cellIndex",r,1,this._attributesStrideSize,!0),r+=1,this.spriteRandomStartCell&&(i.cellStartOffset=t.createVertexBuffer("cellStartOffset",r,1,this._attributesStrideSize,!0),r+=1)),i.offset=n.createVertexBuffer("offset",0,2),i.uv=n.createVertexBuffer("uv",2,2),this._renderVertexBuffers.push(i),this._platform.createVertexBuffers(e,i),this.resetDrawCache()},t.prototype._initialize=function(e){if(void 0===e&&(e=!1),!this._buffer0||e){var t=this._engine,n=[];this._attributesStrideSize=21,this._targetIndex=0,this._platform.alignDataInBuffer&&(this._attributesStrideSize+=1),this.particleEmitterType instanceof Xa&&(this._attributesStrideSize+=3,this._platform.alignDataInBuffer&&(this._attributesStrideSize+=1)),this.isBillboardBased||(this._attributesStrideSize+=3,this._platform.alignDataInBuffer&&(this._attributesStrideSize+=1)),this._colorGradientsTexture&&(this._attributesStrideSize-=4),this._angularSpeedGradientsTexture&&(this._attributesStrideSize-=1),this._isAnimationSheetEnabled&&(this._attributesStrideSize+=1,this.spriteRandomStartCell&&(this._attributesStrideSize+=1)),this.noiseTexture&&(this._attributesStrideSize+=6,this._platform.alignDataInBuffer&&(this._attributesStrideSize+=2)),this._platform.alignDataInBuffer&&(this._attributesStrideSize+=3-(this._attributesStrideSize+3&3));for(var i=this.particleEmitterType instanceof Xa,r=w.Vector3[0],o=0,a=0;a0;)n.push(0)}var c=new Float32Array([.5,.5,1,1,-.5,.5,0,1,.5,-.5,1,0,-.5,-.5,0,0]),l=this._platform.createParticleBuffer(n),u=this._platform.createParticleBuffer(n);this._buffer0=new Xn(t,l,!1,this._attributesStrideSize),this._buffer1=new Xn(t,u,!1,this._attributesStrideSize),this._spriteBuffer=new Xn(t,c,!1,4),this._renderVertexBuffers=[],this._createVertexBuffers(this._buffer0,this._buffer1,this._spriteBuffer),this._createVertexBuffers(this._buffer1,this._buffer0,this._spriteBuffer),this._sourceBuffer=this._buffer0,this._targetBuffer=this._buffer1}},t.prototype._recreateUpdateEffect=function(){this._createColorGradientTexture(),this._createSizeGradientTexture(),this._createAngularSpeedGradientTexture(),this._createVelocityGradientTexture(),this._createLimitVelocityGradientTexture(),this._createDragGradientTexture();var e=this.particleEmitterType?this.particleEmitterType.getEffectDefines():"";return this._isBillboardBased&&(e+="\n#define BILLBOARD"),this._colorGradientsTexture&&(e+="\n#define COLORGRADIENTS"),this._sizeGradientsTexture&&(e+="\n#define SIZEGRADIENTS"),this._angularSpeedGradientsTexture&&(e+="\n#define ANGULARSPEEDGRADIENTS"),this._velocityGradientsTexture&&(e+="\n#define VELOCITYGRADIENTS"),this._limitVelocityGradientsTexture&&(e+="\n#define LIMITVELOCITYGRADIENTS"),this._dragGradientsTexture&&(e+="\n#define DRAGGRADIENTS"),this.isAnimationSheetEnabled&&(e+="\n#define ANIMATESHEET",this.spriteRandomStartCell&&(e+="\n#define ANIMATESHEETRANDOMSTART")),this.noiseTexture&&(e+="\n#define NOISE"),this.isLocal&&(e+="\n#define LOCAL"),!(!this._platform.isUpdateBufferCreated()||this._cachedUpdateDefines!==e)||(this._cachedUpdateDefines=e,this._updateBuffer=this._platform.createUpdateBuffer(e),this._platform.isUpdateBufferReady())},t.prototype._getWrapper=function(e){var t=this._getCustomDrawWrapper(e);if(null==t?void 0:t.effect)return t;var n=[];this.fillDefines(n,e);var i=this._drawWrappers[e];i||((i=new en(this._engine)).drawContext&&(i.drawContext.useInstancing=!0),this._drawWrappers[e]=i);var r=n.join("\n");if(i.defines!==r){var o=[],a=[],s=[];this.fillUniformsAttributesAndSamplerNames(a,o,s),i.setEffect(this._engine.createEffect("gpuRenderParticles",o,a,s,r),r)}return i},t._GetAttributeNamesOrOptions=function(e,t,n,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===i&&(i=!1);var r=[Yn.PositionKind,"age","life","size","angle"];return e||r.push(Yn.ColorKind),t&&r.push("cellIndex"),n||r.push("initialDirection"),i&&r.push("direction"),r.push("offset",Yn.UVKind),r},t._GetEffectCreationOptions=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var n=["emitterWM","worldOffset","view","projection","colorDead","invView","translationPivot","eyePosition"];return Vr(n),e&&n.push("sheetInfos"),t&&n.push("logarithmicDepthConstant"),n},t.prototype.fillDefines=function(e,t){if(void 0===t&&(t=0),this._scene&&zr(this,this._scene,e),t===UE.BLENDMODE_MULTIPLY&&e.push("#define BLENDMULTIPLYMODE"),this.isLocal&&e.push("#define LOCAL"),this.useLogarithmicDepth&&e.push("#define LOGARITHMICDEPTH"),this._isBillboardBased)switch(e.push("#define BILLBOARD"),this.billboardMode){case UE.BILLBOARDMODE_Y:e.push("#define BILLBOARDY");break;case UE.BILLBOARDMODE_STRETCHED:e.push("#define BILLBOARDSTRETCHED");break;case UE.BILLBOARDMODE_ALL:e.push("#define BILLBOARDMODE_ALL")}this._colorGradientsTexture&&e.push("#define COLORGRADIENTS"),this.isAnimationSheetEnabled&&e.push("#define ANIMATESHEET"),this._imageProcessingConfiguration&&(this._imageProcessingConfiguration.prepareDefines(this._imageProcessingConfigurationDefines),e.push(""+this._imageProcessingConfigurationDefines.toString()))},t.prototype.fillUniformsAttributesAndSamplerNames=function(e,n,i){n.push.apply(n,t._GetAttributeNamesOrOptions(!!this._colorGradientsTexture,this._isAnimationSheetEnabled,this._isBillboardBased,this._isBillboardBased&&this.billboardMode===UE.BILLBOARDMODE_STRETCHED)),e.push.apply(e,t._GetEffectCreationOptions(this._isAnimationSheetEnabled,this.useLogarithmicDepth)),i.push("diffuseSampler","colorGradientSampler"),this._imageProcessingConfiguration&&(Fn.PrepareUniforms(e,this._imageProcessingConfigurationDefines),Fn.PrepareSamplers(i,this._imageProcessingConfigurationDefines))},t.prototype.animate=function(e){var t;void 0===e&&(e=!1),this._timeDelta=this.updateSpeed*(e?this.preWarmStepOffset:(null===(t=this._scene)||void 0===t?void 0:t.getAnimationRatio())||1),this._actualFrame+=this._timeDelta,this._stopped||this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop(),this.updateInAnimate&&this._update()},t.prototype._createFactorGradientTexture=function(e,t){var n=this[t];if(e&&e.length&&!n){for(var i=new Float32Array(this._rawTextureWidth),r=function(t){var n=t/o._rawTextureWidth;LE.GetCurrentGradient(n,e,(function(e,n,r){i[t]=h.Lerp(e.factor1,n.factor1,r)}))},o=this,s=0;s=0){var f=u.clone();f.invert(),l.setMatrix("invView",f)}switch(this.useLogarithmicDepth&&this._scene&&Xr.BindLogDepth(p,l,this._scene),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(l),e){case UE.BLENDMODE_ADD:this._engine.setAlphaMode(a.ALPHA_ADD);break;case UE.BLENDMODE_ONEONE:this._engine.setAlphaMode(a.ALPHA_ONEONE);break;case UE.BLENDMODE_STANDARD:this._engine.setAlphaMode(a.ALPHA_COMBINE);break;case UE.BLENDMODE_MULTIPLY:this._engine.setAlphaMode(a.ALPHA_MULTIPLY)}return this._platform.bindDrawBuffers(this._targetIndex,l,(null===(r=this._scene)||void 0===r?void 0:r.forceWireframe)?this._linesIndexBufferUseInstancing:null),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(l),(null===(o=this._scene)||void 0===o?void 0:o.forceWireframe)?this._engine.drawElementsType(a.MATERIAL_LineStripDrawMode,0,10,this._currentActiveCount):this._engine.drawArraysType(a.MATERIAL_TriangleStripDrawMode,0,4,this._currentActiveCount),this._engine.setAlphaMode(a.ALPHA_DISABLE),(null===(s=this._scene)||void 0===s?void 0:s.forceWireframe)&&this._engine.unbindInstanceAttributes(),this._currentActiveCount},t.prototype._update=function(e){if(this.emitter&&this._targetBuffer&&this._recreateUpdateEffect()){if(!e)if(this.emitter.position)e=this.emitter.getWorldMatrix();else{var t=this.emitter;e=w.Matrix[0],R.TranslationToRef(t.x,t.y,t.z,e)}this._platform.preUpdateParticleBuffer(),this._updateBuffer.setFloat("currentCount",this._currentActiveCount),this._updateBuffer.setFloat("timeDelta",this._timeDelta),this._updateBuffer.setFloat("stopFactor",this._stopped?0:1),this._updateBuffer.setInt("randomTextureSize",this._randomTextureSize),this._updateBuffer.setFloat2("lifeTime",this.minLifeTime,this.maxLifeTime),this._updateBuffer.setFloat2("emitPower",this.minEmitPower,this.maxEmitPower),this._colorGradientsTexture||(this._updateBuffer.setDirectColor4("color1",this.color1),this._updateBuffer.setDirectColor4("color2",this.color2)),this._updateBuffer.setFloat2("sizeRange",this.minSize,this.maxSize),this._updateBuffer.setFloat4("scaleRange",this.minScaleX,this.maxScaleX,this.minScaleY,this.maxScaleY),this._updateBuffer.setFloat4("angleRange",this.minAngularSpeed,this.maxAngularSpeed,this.minInitialRotation,this.maxInitialRotation),this._updateBuffer.setVector3("gravity",this.gravity),this._limitVelocityGradientsTexture&&this._updateBuffer.setFloat("limitVelocityDamping",this.limitVelocityDamping),this.particleEmitterType&&this.particleEmitterType.applyToShader(this._updateBuffer),this._isAnimationSheetEnabled&&this._updateBuffer.setFloat4("cellInfos",this.startSpriteCellID,this.endSpriteCellID,this.spriteCellChangeSpeed,this.spriteCellLoop?1:0),this.noiseTexture&&this._updateBuffer.setVector3("noiseStrength",this.noiseStrength),this.isLocal||this._updateBuffer.setMatrix("emitterWM",e),this._platform.updateParticleBuffer(this._targetIndex,this._targetBuffer,this._currentActiveCount),this._targetIndex++,2===this._targetIndex&&(this._targetIndex=0);var n=this._sourceBuffer;this._sourceBuffer=this._targetBuffer,this._targetBuffer=n}},t.prototype.render=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=!1),!this._started)return 0;if(!this.isReady())return 0;if(!e&&this._scene){if(!this._preWarmDone&&this.preWarmCycles){for(var n=0;n1){var i=0|this._accumulatedCount;this._accumulatedCount-=i,this._currentActiveCount+=i}if(this._currentActiveCount=Math.min(this._maxActiveParticleCount,this._currentActiveCount),!this._currentActiveCount)return 0;var r;if(this.emitter.position)r=this.emitter.getWorldMatrix();else{var o=this.emitter;r=w.Matrix[0],R.TranslationToRef(o.x,o.y,o.z,r)}var s=this._engine;this.updateInAnimate||this._update(r);var c=0;return e||t||(s.setState(!1),this.forceDepthWrite&&s.setDepthWrite(!0),c=this.blendMode===UE.BLENDMODE_MULTIPLYADD?this._render(UE.BLENDMODE_MULTIPLY,r)+this._render(UE.BLENDMODE_ADD,r):this._render(this.blendMode,r),this._engine.setAlphaMode(a.ALPHA_DISABLE)),c},t.prototype.rebuild=function(){var e=this,t=function(){e._recreateUpdateEffect()&&e._platform.isUpdateBufferReady()?e._initialize(!0):setTimeout(t,10)};this._createIndexBuffer(),this._cachedUpdateDefines="",this._platform.contextLost(),t()},t.prototype._releaseBuffers=function(){this._buffer0&&(this._buffer0.dispose(),this._buffer0=null),this._buffer1&&(this._buffer1.dispose(),this._buffer1=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._platform.releaseBuffers()},t.prototype.dispose=function(e){for(var t in void 0===e&&(e=!0),this._drawWrappers)this._drawWrappers[t].dispose();if(this._drawWrappers={},this._scene){var n=this._scene.particleSystems.indexOf(this);n>-1&&this._scene.particleSystems.splice(n,1)}this._releaseBuffers(),this._platform.releaseVertexBuffers();for(var i=0;i0?o.shaderOptions.defines.join("\n"):"";r[0]=a.createEffectForParticles(o.shaderPath.fragmentElement,o.shaderOptions.uniforms,o.shaderOptions.samplers,s,void 0,void 0,void 0,this)}var c=this.serialize(i),l=t.Parse(c,this._scene||this._engine,this._rootUrl);return l.name=e,l.customShader=o,l._customWrappers=r,void 0===n&&(n=this.emitter),this.noiseTexture&&(l.noiseTexture=this.noiseTexture.clone()),l.emitter=n,l},t.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};return UE._Serialize(t,this,e),t.activeParticleCount=this.activeParticleCount,t.randomTextureSize=this._randomTextureSize,t.customShader=this.customShader,t},t.Parse=function(e,n,i,r,o){void 0===r&&(r=!1);var a,s=e.name;a=n instanceof rn?n:n.getEngine();var c=new t(s,{capacity:o||e.capacity,randomTextureSize:e.randomTextureSize},n,null,e.isAnimationSheetEnabled);if(c._rootUrl=i,e.customShader&&a.createEffectForParticles){var l=e.customShader,u=l.shaderOptions.defines.length>0?l.shaderOptions.defines.join("\n"):"",h=a.createEffectForParticles(l.shaderPath.fragmentElement,l.shaderOptions.uniforms,l.shaderOptions.samplers,u,void 0,void 0,void 0,c);c.setCustomEffect(h,0),c.customShader=l}return e.id&&(c.id=e.id),e.activeParticleCount&&(c.activeParticleCount=e.activeParticleCount),UE._Parse(e,c,n,i),e.preventAutoStart&&(c.preventAutoStart=e.preventAutoStart),r||c.preventAutoStart||c.start(),c},t}(qa),VE=function(){function e(){this._emitterNodeIsOwned=!0,this.systems=[]}return Object.defineProperty(e.prototype,"emitterNode",{get:function(){return this._emitterNode},set:function(e){this._emitterNodeIsOwned&&this._emitterNode&&(this._emitterNode.dispose&&this._emitterNode.dispose(),this._emitterNodeIsOwned=!1);for(var t=0,n=this.systems;t0&&n.set(this._uvs32,Yn.UVKind),this._colors32.length>0&&n.set(this._colors32,Yn.ColorKind),n.applyToMesh(this.mesh,this._updatable),this.mesh.isPickable=this._pickable,this._pickable)for(var i=0,r=0;rp?p:r,i=Math.round(p/r),o=0):i=i>p?p:i;for(var f=[],m=[],_=[],g=[],y=[],v=C.Zero(),b=i;dp-(i=b+Math.floor((1+o)*Math.random()))&&(i=p-d),f.length=0,m.length=0,_.length=0,g.length=0,y.length=0;for(var T=0,E=3*d;E<3*(d+i);E++){_.push(T);var A=s[E],x=3*A;if(f.push(a[x],a[x+1],a[x+2]),m.push(u[x],u[x+1],u[x+2]),c){var S=2*A;g.push(c[S],c[S+1])}if(l){var P=4*A;y.push(l[P],l[P+1],l[P+2],l[P+3])}T++}var I=this.nbParticles,R=this._posToShape(f),O=this._uvsToShapeUV(g),w=_.slice(),M=y.slice(),D=m.slice();v.copyFromFloats(0,0,0);var N=void 0;for(N=0;N65535&&(this._needs32Bits=!0)}if(this._depthSort||this._multimaterialEnabled){var V=null!==b.materialIndex?b.materialIndex:0;this.depthSortedParticles.push(new WE(d,t,r.length,V))}return b},e.prototype._posToShape=function(e){for(var t=[],n=0;n=this.nbParticles||!this._updatable)return[];var i=this.particles,r=this.nbParticles;if(t=this.nbParticles?this.nbParticles-1:t,this._computeBoundingBox&&(0!=e||t!=this.nbParticles-1)){var B=this.mesh.getBoundingInfo();B&&(y.copyFrom(B.minimum),v.copyFrom(B.maximum))}var U=(O=this.particles[e]._pos)/3|0;D=4*U,L=2*U;for(var k=e;k<=t;k++){var V=this.particles[k];this.updateParticle(V);var z=V._model._shape,G=V._model._shapeUV,H=V._rotationMatrix,j=V.position,W=V.rotation,X=V.scaling,Y=V._globalPosition;if(p){var q=this.depthSortedParticles[k];q.idx=V.idx,q.ind=V._ind,q.indicesLength=V._model._indicesLength,q.sqDistance=C.DistanceSquared(V.position,b)}if(V.alive&&(!V._stillInvisible||V.isVisible||this._recomputeInvisibles)){if(V.isVisible){V._stillInvisible=!1;var K=f[12];if(V.pivot.multiplyToRef(X,K),this.billboard&&(W.x=0,W.y=0),(this._computeParticleRotation||this.billboard)&&V.getRotationMatrix(i),null!==V.parentId){var Q=this.getParticleById(V.parentId);if(Q){var Z=Q._rotationMatrix,$=Q._globalPosition,J=j.x*Z[1]+j.y*Z[4]+j.z*Z[7],ee=j.x*Z[0]+j.y*Z[3]+j.z*Z[6],te=j.x*Z[2]+j.y*Z[5]+j.z*Z[8];if(Y.x=$.x+ee,Y.y=$.y+J,Y.z=$.z+te,this._computeParticleRotation||this.billboard){var ne=i.m;H[0]=ne[0]*Z[0]+ne[1]*Z[3]+ne[2]*Z[6],H[1]=ne[0]*Z[1]+ne[1]*Z[4]+ne[2]*Z[7],H[2]=ne[0]*Z[2]+ne[1]*Z[5]+ne[2]*Z[8],H[3]=ne[4]*Z[0]+ne[5]*Z[3]+ne[6]*Z[6],H[4]=ne[4]*Z[1]+ne[5]*Z[4]+ne[6]*Z[7],H[5]=ne[4]*Z[2]+ne[5]*Z[5]+ne[6]*Z[8],H[6]=ne[8]*Z[0]+ne[9]*Z[3]+ne[10]*Z[6],H[7]=ne[8]*Z[1]+ne[9]*Z[4]+ne[10]*Z[7],H[8]=ne[8]*Z[2]+ne[9]*Z[5]+ne[10]*Z[8]}}else V.parentId=null}else Y.x=j.x,Y.y=j.y,Y.z=j.z,(this._computeParticleRotation||this.billboard)&&(ne=i.m,H[0]=ne[0],H[1]=ne[1],H[2]=ne[2],H[3]=ne[4],H[4]=ne[5],H[5]=ne[6],H[6]=ne[8],H[7]=ne[9],H[8]=ne[10]);var ie=f[11];for(V.translateFromPivot?ie.setAll(0):ie.copyFrom(K),F=0;F0)for(var t=0;t0&&t.set(this._uvs32,Yn.UVKind);var n=0;this._colors32.length>0&&(n=1,t.set(this._colors32,Yn.ColorKind));var i=new no(this.name,this._scene);t.applyToMesh(i,this._updatable),this.mesh=i,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);var r=e;return r||((r=new ml("point cloud material",this._scene)).emissiveColor=new B(n,n,n),r.disableLighting=!0,r.pointsCloud=!0,r.pointSize=this._size),i.material=r,new Promise((function(e){return e(i)}))},e.prototype._addParticle=function(e,t,n,i){var r=new qE(e,t,n,i,this);return this.particles.push(r),r},e.prototype._randomUnitVector=function(e){e.position=new C(Math.random(),Math.random(),Math.random()),e.color=new U(1,1,1,1)},e.prototype._getColorIndicesForCoord=function(e,t,n,i){var r=e._groupImageData,o=n*(4*i)+4*t,a=[o,o+1,o+2,o+3],s=a[1],c=a[2],l=a[3],u=r[a[0]],h=r[s],d=r[c],p=r[l];return new U(u/255,h/255,d/255,p)},e.prototype._setPointsColorOrUV=function(e,t,n,i,r,o,a,s){s=null!=s?s:0,n&&e.updateFacetData();var c=2*e.getBoundingInfo().boundingSphere.radius,l=e.getVerticesData(Yn.PositionKind),u=e.getIndices(),d=e.getVerticesData(Yn.UVKind+(s?s+1:"")),p=e.getVerticesData(Yn.ColorKind),f=C.Zero();e.computeWorldMatrix();var m=e.getWorldMatrix();if(!m.isIdentity()){l=l.slice(0);for(var _=0;_1&&(Le=1),(Fe=Be.b+De)<0&&(Fe=0),Fe>1&&(Fe=1),B.HSVtoRGBToRef(Ne,Le,Fe,ke),ve.set(ke.r,ke.g,ke.b,1)):ve=he.set(Math.random(),Math.random(),Math.random(),1),ze.color=new U(ve.x,ve.y,ve.z,ve.w),this._colors.push(ve.x,ve.y,ve.z,ve.w))}},e.prototype._colorFromTexture=function(e,t,n){var i=this;if(null===e.material)return J.Warn(e.name+"has no material."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,n,!0,!1);var r=e.material.getActiveTextures();if(0===r.length)return J.Warn(e.name+"has no usable texture."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,n,!0,!1);var o=e.clone();o.setEnabled(!1),this._promises.push(new Promise((function(e){go.WhenAllReady(r,(function(){var a=t._textureNb;a<0&&(a=0),a>r.length-1&&(a=r.length-1);var s=function(){t._groupImgWidth=r[a].getSize().width,t._groupImgHeight=r[a].getSize().height,i._setPointsColorOrUV(o,t,n,!0,!0,void 0,void 0,r[a].coordinatesIndex),o.dispose(),e()};t._groupImageData=null;var c=r[a].readPixels();c?c.then((function(e){t._groupImageData=e,s()})):s()}))})))},e.prototype._calculateDensity=function(e,t,n){for(var i,r,o,a,s,c,l,u,h,d,p,f,m,_,g,y,v,b=new Array,T=C.Zero(),E=C.Zero(),A=C.Zero(),x=C.Zero(),S=C.Zero(),P=C.Zero(),I=new Array,R=0,O=n.length/3,w=0;w0&&(b=b.map((function(e){return e+N}))),w=0;w3)&&(o=GE.Random);var a=e.getVerticesData(Yn.PositionKind),s=e.getIndices();this._groups.push(this._groupCounter);var c=new KE(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,a,s),o===GE.Color?c._textureNb=i||0:i=i||new U(1,1,1,1),o){case GE.Color:this._colorFromTexture(e,c,!1);break;case GE.UV:this._setPointsColorOrUV(e,c,!1,!1,!1);break;case GE.Random:this._setPointsColorOrUV(e,c,!1);break;case GE.Stated:this._setPointsColorOrUV(e,c,!1,void 0,void 0,i,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1},e.prototype.addVolumePoints=function(e,t,n,i,r){var o=n||GE.Random;(isNaN(o)||o<0||o>3)&&(o=GE.Random);var a=e.getVerticesData(Yn.PositionKind),s=e.getIndices();this._groups.push(this._groupCounter);var c=new KE(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,a,s),o===GE.Color?c._textureNb=i||0:i=i||new U(1,1,1,1),o){case GE.Color:this._colorFromTexture(e,c,!0);break;case GE.UV:this._setPointsColorOrUV(e,c,!0,!1,!1);break;case GE.Random:this._setPointsColorOrUV(e,c,!0);break;case GE.Stated:this._setPointsColorOrUV(e,c,!0,void 0,void 0,i,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1},e.prototype.setParticles=function(e,t,n){var i,r;if(void 0===e&&(e=0),void 0===t&&(t=this.nbParticles-1),void 0===n&&(n=!0),!this._updatable||!this._isReady)return this;this.beforeUpdateParticles(e,t,n);var o=w.Matrix[0],a=this.mesh,s=this._colors32,c=this._positions32,l=this._uvs32,u=w.Vector3,h=u[5].copyFromFloats(1,0,0),d=u[6].copyFromFloats(0,1,0),p=u[7].copyFromFloats(0,0,1),f=u[8].setAll(Number.MAX_VALUE),m=u[9].setAll(-Number.MAX_VALUE);R.IdentityToRef(o);var _=0;if((null===(i=this.mesh)||void 0===i?void 0:i.isFacetDataEnabled)&&(this._computeBoundingBox=!0),t=t>=this.nbParticles?this.nbParticles-1:t,this._computeBoundingBox&&(0!=e||t!=this.nbParticles-1)){var g=null===(r=this.mesh)||void 0===r?void 0:r.getBoundingInfo();g&&(f.copyFrom(g.minimum),m.copyFrom(g.maximum))}_=0;for(var y=0,v=0,b=0,T=e;T<=t;T++){var E=this.particles[T];y=3*(_=E.idx),v=4*_,b=2*_,this.updateParticle(E);var A=E._rotationMatrix,x=E.position,S=E._globalPosition;if(this._computeParticleRotation&&E.getRotationMatrix(o),null!==E.parentId){var C=this.particles[E.parentId],P=C._rotationMatrix,I=C._globalPosition,O=x.x*P[1]+x.y*P[4]+x.z*P[7],M=x.x*P[0]+x.y*P[3]+x.z*P[6],D=x.x*P[2]+x.y*P[5]+x.z*P[8];if(S.x=I.x+M,S.y=I.y+O,S.z=I.z+D,this._computeParticleRotation){var N=o.m;A[0]=N[0]*P[0]+N[1]*P[3]+N[2]*P[6],A[1]=N[0]*P[1]+N[1]*P[4]+N[2]*P[7],A[2]=N[0]*P[2]+N[1]*P[5]+N[2]*P[8],A[3]=N[4]*P[0]+N[5]*P[3]+N[6]*P[6],A[4]=N[4]*P[1]+N[5]*P[4]+N[6]*P[7],A[5]=N[4]*P[2]+N[5]*P[5]+N[6]*P[8],A[6]=N[8]*P[0]+N[9]*P[3]+N[10]*P[6],A[7]=N[8]*P[1]+N[9]*P[4]+N[10]*P[7],A[8]=N[8]*P[2]+N[9]*P[5]+N[10]*P[8]}}else S.x=0,S.y=0,S.z=0,this._computeParticleRotation&&(N=o.m,A[0]=N[0],A[1]=N[1],A[2]=N[2],A[3]=N[4],A[4]=N[5],A[5]=N[6],A[6]=N[8],A[7]=N[9],A[8]=N[10]);var L=u[11];E.translateFromPivot?L.setAll(0):L.copyFrom(E.pivot);var F=u[0];F.copyFrom(E.position);var B=F.x-E.pivot.x,U=F.y-E.pivot.y,k=F.z-E.pivot.z,V=B*A[0]+U*A[3]+k*A[6],z=B*A[1]+U*A[4]+k*A[7],G=B*A[2]+U*A[5]+k*A[8];V+=L.x,z+=L.y,G+=L.z;var H=c[y]=S.x+h.x*V+d.x*z+p.x*G,j=c[y+1]=S.y+h.y*V+d.y*z+p.y*G,W=c[y+2]=S.z+h.z*V+d.z*z+p.z*G;if(this._computeBoundingBox&&(f.minimizeInPlaceFromFloats(H,j,W),m.maximizeInPlaceFromFloats(H,j,W)),this._computeParticleColor&&E.color){var X=E.color,Y=this._colors32;Y[v]=X.r,Y[v+1]=X.g,Y[v+2]=X.b,Y[v+3]=X.a}if(this._computeParticleTexture&&E.uv){var q=E.uv,K=this._uvs32;K[b]=q.x,K[b+1]=q.y}}return a&&(n&&(this._computeParticleColor&&a.updateVerticesData(Yn.ColorKind,s,!1,!1),this._computeParticleTexture&&a.updateVerticesData(Yn.UVKind,l,!1,!1),a.updateVerticesData(Yn.PositionKind,c,!1,!1)),this._computeBoundingBox&&(a.hasBoundingInfo?a.getBoundingInfo().reConstruct(f,m,a._worldMatrix):a.buildBoundingInfo(f,m,a._worldMatrix))),this.afterUpdateParticles(e,t,n),this},e.prototype.dispose=function(){var e;null===(e=this.mesh)||void 0===e||e.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._uvs32=null,this._colors32=null},e.prototype.refreshVisibleSize=function(){var e;return this._isVisibilityBoxLocked||null===(e=this.mesh)||void 0===e||e.refreshBoundingInfo(),this},e.prototype.setVisibilityBox=function(e){if(this.mesh){var t=e/2;this.mesh.buildBoundingInfo(new C(-t,-t,-t),new C(t,t,t))}},Object.defineProperty(e.prototype,"isAlwaysVisible",{get:function(){return this._alwaysVisible},set:function(e){this.mesh&&(this._alwaysVisible=e,this.mesh.alwaysSelectAsActiveMesh=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"computeParticleRotation",{set:function(e){this._computeParticleRotation=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"computeParticleColor",{get:function(){return this._computeParticleColor},set:function(e){this._computeParticleColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"computeParticleTexture",{get:function(){return this._computeParticleTexture},set:function(e){this._computeParticleTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"computeBoundingBox",{get:function(){return this._computeBoundingBox},set:function(e){this._computeBoundingBox=e},enumerable:!1,configurable:!0}),e.prototype.initParticles=function(){},e.prototype.recycleParticle=function(e){return e},e.prototype.updateParticle=function(e){return e},e.prototype.beforeUpdateParticles=function(e,t,n){},e.prototype.afterUpdateParticles=function(e,t,n){},e}();Object.defineProperty(kr.prototype,"physicsImpostor",{get:function(){return this._physicsImpostor},set:function(e){var t=this;this._physicsImpostor!==e&&(this._disposePhysicsObserver&&this.onDisposeObservable.remove(this._disposePhysicsObserver),this._physicsImpostor=e,e&&(this._disposePhysicsObserver=this.onDisposeObservable.add((function(){t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)}))))},enumerable:!0,configurable:!0}),kr.prototype.getPhysicsImpostor=function(){return this.physicsImpostor},kr.prototype.applyImpulse=function(e,t){return this.physicsImpostor?(this.physicsImpostor.applyImpulse(e,t),this):this},kr.prototype.setPhysicsLinkWith=function(e,t,n,i){return this.physicsImpostor&&e.physicsImpostor?(this.physicsImpostor.createJoint(e.physicsImpostor,Ko.HingeJoint,{mainPivot:t,connectedPivot:n,nativeParams:i}),this):this};var ZE,$E,JE,eA,tA,nA,iA,rA=function(){function e(t,n){void 0===n&&(n=e.DefaultPluginFactory()),this._physicsPlugin=n,this._physicsBodies=[],this._subTimeStep=0,t=t||new C(0,-9.807,0),this.setGravity(t),this.setTimeStep()}return e.prototype.getPluginVersion=function(){return this._physicsPlugin.getPluginVersion()},e.DefaultPluginFactory=function(){throw ye("")},e.prototype.setGravity=function(e){this.gravity=e,this._physicsPlugin.setGravity(this.gravity)},e.prototype.setTimeStep=function(e){void 0===e&&(e=1/60),this._physicsPlugin.setTimeStep(e)},e.prototype.getTimeStep=function(){return this._physicsPlugin.getTimeStep()},e.prototype.setSubTimeStep=function(e){void 0===e&&(e=0),this._subTimeStep=e},e.prototype.getSubTimeStep=function(){return this._subTimeStep},e.prototype.dispose=function(){this._physicsPlugin.dispose()},e.prototype.getPhysicsPluginName=function(){return this._physicsPlugin.name},e.prototype._step=function(e){e>.1?e=.1:e<=0&&(e=1/60),this._physicsPlugin.executeStep(e,this._physicsBodies)},e.prototype.addBody=function(e){this._physicsBodies.push(e)},e.prototype.removeBody=function(e){var t=this._physicsBodies.indexOf(e);t>-1&&this._physicsBodies.splice(t,1)},e.prototype.getBodies=function(){return this._physicsBodies},e.prototype.getPhysicsPlugin=function(){return this._physicsPlugin},e.prototype.raycastToRef=function(e,t,n,i){this._physicsPlugin.raycast(e,t,n,i)},e.prototype.raycast=function(e,t,n){var i=new cg;return this._physicsPlugin.raycast(e,t,i,n),i},e}(),oA=function(){function e(e,t,n,i){var r=this;if(this._pluginData=void 0,this._pluginDataInstances=[],this._collisionCBEnabled=!1,this._collisionEndedCBEnabled=!1,this.disablePreStep=!0,this._isDisposed=!1,i){var o=i.getPhysicsEngine();if(!o)throw new Error("No Physics Engine available.");if(this._physicsEngine=o,2!=o.getPluginVersion())throw new Error("Plugin version is incorrect. Expected version 2.");var a=o.getPhysicsPlugin();if(!a)throw new Error("No Physics Plugin available.");this._physicsPlugin=a,e.rotationQuaternion||(e.rotationQuaternion=I.FromEulerAngles(e.rotation.x,e.rotation.y,e.rotation.z)),this.startAsleep=n;var s=e;s.hasThinInstances?this._physicsPlugin.initBodyInstances(this,t,s):(e.parent&&e.computeWorldMatrix(!0),this._physicsPlugin.initBody(this,t,e.absolutePosition,e.absoluteRotationQuaternion)),this.transformNode=e,e.physicsBody=this,o.addBody(this),this._nodeDisposeObserver=e.onDisposeObservable.add((function(){r.dispose()}))}}return e.prototype.getClassName=function(){return"PhysicsBody"},e.prototype.clone=function(t){var n=new e(t,this.getMotionType(),this.startAsleep,this.transformNode.getScene());return n.shape=this.shape,n.setMassProperties(this.getMassProperties()),n.setLinearDamping(this.getLinearDamping()),n.setAngularDamping(this.getAngularDamping()),n},e.prototype.updateBodyInstances=function(){var e=this.transformNode;e.hasThinInstances&&this._physicsPlugin.updateBodyInstances(this,e)},Object.defineProperty(e.prototype,"numInstances",{get:function(){return this._pluginDataInstances.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){return this._physicsPlugin.getShape(this)},set:function(e){this._physicsPlugin.setShape(this,e)},enumerable:!1,configurable:!0}),e.prototype.setEventMask=function(e,t){this._physicsPlugin.setEventMask(this,e,t)},e.prototype.getEventMask=function(e){return this._physicsPlugin.getEventMask(this,e)},e.prototype.setMotionType=function(e,t){this._physicsPlugin.setMotionType(this,e,t)},e.prototype.getMotionType=function(e){return this._physicsPlugin.getMotionType(this,e)},e.prototype.computeMassProperties=function(e){return this._physicsPlugin.computeMassProperties(this,e)},e.prototype.setMassProperties=function(e,t){this._physicsPlugin.setMassProperties(this,e,t)},e.prototype.getMassProperties=function(e){return this._physicsPlugin.getMassProperties(this,e)},e.prototype.setLinearDamping=function(e,t){this._physicsPlugin.setLinearDamping(this,e,t)},e.prototype.getLinearDamping=function(e){return this._physicsPlugin.getLinearDamping(this,e)},e.prototype.setAngularDamping=function(e,t){this._physicsPlugin.setAngularDamping(this,e,t)},e.prototype.getAngularDamping=function(e){return this._physicsPlugin.getAngularDamping(this,e)},e.prototype.setLinearVelocity=function(e,t){this._physicsPlugin.setLinearVelocity(this,e,t)},e.prototype.getLinearVelocityToRef=function(e,t){return this._physicsPlugin.getLinearVelocityToRef(this,e,t)},e.prototype.getLinearVelocity=function(e){var t=new C;return this.getLinearVelocityToRef(t,e),t},e.prototype.setAngularVelocity=function(e,t){this._physicsPlugin.setAngularVelocity(this,e,t)},e.prototype.getAngularVelocityToRef=function(e,t){return this._physicsPlugin.getAngularVelocityToRef(this,e,t)},e.prototype.getAngularVelocity=function(e){var t=new C;return this.getAngularVelocityToRef(t,e),t},e.prototype.applyImpulse=function(e,t,n){this._physicsPlugin.applyImpulse(this,e,t,n)},e.prototype.applyForce=function(e,t,n){this._physicsPlugin.applyForce(this,e,t,n)},e.prototype.getGeometry=function(){return this._physicsPlugin.getBodyGeometry(this)},e.prototype.getCollisionObservable=function(){return this._physicsPlugin.getCollisionObservable(this)},e.prototype.getCollisionEndedObservable=function(){return this._physicsPlugin.getCollisionEndedObservable(this)},e.prototype.setCollisionCallbackEnabled=function(e){this._collisionCBEnabled=e,this._physicsPlugin.setCollisionCallbackEnabled(this,e)},e.prototype.setCollisionEndedCallbackEnabled=function(e){this._collisionEndedCBEnabled=e,this._physicsPlugin.setCollisionEndedCallbackEnabled(this,e)},e.prototype.getObjectCenterWorld=function(e){var t=new C;return this.getObjectCenterWorldToRef(t,e)},e.prototype.getObjectCenterWorldToRef=function(e,t){var n;if((null===(n=this._pluginDataInstances)||void 0===n?void 0:n.length)>0){var i=t||0,r=this.transformNode._thinInstanceDataStorage.matrixData;r&&e.set(r[16*i+12],r[16*i+13],r[16*i+14])}else e.copyFrom(this.transformNode.position);return e},e.prototype.addConstraint=function(e,t,n,i){this._physicsPlugin.addConstraint(this,e,t,n,i)},e.prototype.syncWithBone=function(e,t,n,i,r,o){var a=this.transformNode;if(a.rotationQuaternion)if(r){var s=w.Quaternion[0];e.getRotationQuaternionToRef(Si.WORLD,t,s),s.multiplyToRef(r,a.rotationQuaternion)}else e.getRotationQuaternionToRef(Si.WORLD,t,a.rotationQuaternion);var c=w.Vector3[0],l=w.Vector3[1];o||((o=w.Vector3[2]).x=0,o.y=1,o.z=0),e.getDirectionToRef(o,t,l),e.getAbsolutePositionToRef(t,c),null==i&&n&&(i=n.length()),null!=i&&(c.x+=l.x*i,c.y+=l.y*i,c.z+=l.z*i),a.setAbsolutePosition(c)},e.prototype.iterateOverAllInstances=function(e){var t;if((null===(t=this._pluginDataInstances)||void 0===t?void 0:t.length)>0)for(var n=0;n0},e.prototype._addSizeOptions=function(){var e,t,n,i,r,o,a,s;this.transformNode.computeWorldMatrix(!0);var c=this._getObjectBoundingBox(),l=w.Vector3[0];l.copyFrom(c.extendSize),l.scaleInPlace(2),l.multiplyInPlace(this.transformNode.scaling),l.x=Math.abs(l.x),l.y=Math.abs(l.y),l.z=Math.abs(l.z);var u=w.Vector3[1];if(u.copyFrom(c.minimum),u.multiplyInPlace(this.transformNode.scaling),!this._options.center){var d=new C;d.copyFrom(c.center),d.multiplyInPlace(this.transformNode.scaling),this._options.center=d}switch(this.type){case eA.SPHERE:!this._options.radius&&h.WithinEpsilon(l.x,l.y,1e-4)&&h.WithinEpsilon(l.x,l.z,1e-4)?this._options.radius=l.x/2:this._options.radius||(J.Warn("Non uniform scaling is unsupported for sphere shapes. Setting the radius to the biggest bounding box extent."),this._options.radius=Math.max(l.x,l.y,l.z)/2);break;case eA.CAPSULE:var p=l.x/2;this._options.radius=null!==(e=this._options.radius)&&void 0!==e?e:p,this._options.pointA=null!==(t=this._options.pointA)&&void 0!==t?t:new C(0,u.y+p,0),this._options.pointB=null!==(n=this._options.pointB)&&void 0!==n?n:new C(0,u.y+l.y-p,0);break;case eA.CYLINDER:p=l.x/2,this._options.radius=null!==(i=this._options.radius)&&void 0!==i?i:p,this._options.pointA=null!==(r=this._options.pointA)&&void 0!==r?r:new C(0,u.y,0),this._options.pointB=null!==(o=this._options.pointB)&&void 0!==o?o:new C(0,u.y+l.y,0);break;case eA.MESH:case eA.CONVEX_HULL:if(!this._options.mesh&&this._hasVertices(this.transformNode))this._options.mesh=this.transformNode;else if(!this._options.mesh||!this._hasVertices(this._options.mesh))throw new Error("No valid mesh was provided for mesh or convex hull shape parameter. Please provide a mesh with valid geometry (number of vertices greater than 0).");break;case eA.BOX:this._options.extents=null!==(a=this._options.extents)&&void 0!==a?a:new C(l.x,l.y,l.z),this._options.rotation=null!==(s=this._options.rotation)&&void 0!==s?s:I.Identity()}},e.prototype.dispose=function(){this._nodeDisposeObserver&&(this.body.transformNode.onDisposeObservable.remove(this._nodeDisposeObserver),this._nodeDisposeObserver=null),this.body.dispose(),this._disposeShapeWhenDisposed&&this.shape.dispose()},e}(),CA=function(){},PA=function(){function e(e,t,n){this._boxConfigs=new Array,this._bones=new Array,this._initialRotation=new Array,this._boneNames=[],this._transforms=new Array,this._aggregates=new Array,this._ragdollMode=!1,this._rootBoneName="",this._rootBoneIndex=-1,this._mass=10,this._restitution=0,this.pauseSync=!1,this._defaultJoint=JE.HINGE,this._defaultJointMin=-90,this._defaultJointMax=90,this._skeleton=e,this._scene=e.getScene(),this._mesh=t,this._config=n,this._boxConfigs=[],this._putBoxesInBoneCenter=!1,this._defaultJoint=JE.HINGE,this._boneOffsetAxis=Ii.Y}return e.prototype._createColliders=function(){var e,t,n;this._mesh.computeWorldMatrix();for(var i=this._config,r=0;r0)for(var t=0,n=e._pluginDataInstances;ta){this._createOrUpdateBodyInstances(e,s,o,a,r,!1);for(var c=this._hknp.HP_Body_GetShape(e._pluginDataInstances[0].hpBodyId)[1],l=a;l0&&void 0===n)for(var r=0;r0){var i=n._thinInstanceDataStorage.matrixData;if(!i)return;var r=e.numInstances;this._createOrUpdateBodyInstances(e,e.getMotionType(),i,0,r,!0)}else this._hknp.HP_Body_SetQTransform(e._pluginData.hpBodyId,this._getTransformInfos(t))},e.prototype.setTargetTransform=function(e,t,n,i){var r=this;this._applyToBodyOrInstances(e,(function(e){r._hknp.HP_Body_SetTargetQTransform(e.hpBodyId,[r._bVecToV3(t),r._bQuatToV4(n)])}),i)},e.prototype.setGravityFactor=function(e,t,n){var i=this;this._applyToBodyOrInstances(e,(function(e){i._hknp.HP_Body_SetGravityFactor(e.hpBodyId,t)}),n)},e.prototype.getGravityFactor=function(e,t){var n=this._getPluginReference(e,t);return this._hknp.HP_Body_GetGravityFactor(n.hpBodyId)[1]},e.prototype.disposeBody=function(e){if(e._pluginDataInstances&&e._pluginDataInstances.length>0)for(var t=0,n=e._pluginDataInstances;t0?e._pluginDataInstances[0]:e._pluginData,i=this._hknp.HP_Body_GetShape(n.hpBodyId)[1],r=this._hknp.HP_Shape_CreateDebugDisplayGeometry(i);if(r[0]!=this._hknp.Result.RESULT_OK)return{positions:[],indices:[]};var o=this._hknp.HP_DebugGeometry_GetInfo(r[1])[1],a=new Float32Array(this._hknp.HEAPU8.buffer,o[0],3*o[1]),s=new Uint32Array(this._hknp.HEAPU8.buffer,o[2],3*o[3]),c=a.slice(0),l=s.slice(0);return this._hknp.HP_DebugGeometry_Release(r[1]),{positions:c,indices:l}},e.prototype.disposeShape=function(e){this._hknp.HP_Shape_Release(e._pluginData),e._pluginData=void 0},e.prototype.initConstraint=function(e,t,n,i,r){var o,a,s,c,l,u=e.type,h=e.options;if(u&&h)if(t._pluginDataInstances.length>0&&void 0===i||n._pluginDataInstances.length>0&&void 0===r)J.Warn("Body is instanced but no instance index was specified. Constraint will not be applied.");else{e._pluginData=null!==(o=e._pluginData)&&void 0!==o?o:[];var d=this._hknp.HP_Constraint_Create()[1];e._pluginData.push(d);var p=this._getPluginReference(t,i).hpBodyId,f=this._getPluginReference(n,r).hpBodyId;this._hknp.HP_Constraint_SetParentBody(d,p),this._hknp.HP_Constraint_SetChildBody(d,f),this._constraintToBodyIdPair.set(d[0],[p[0],f[0]]);var m=h.pivotA?this._bVecToV3(h.pivotA):this._bVecToV3(C.Zero()),_=null!==(a=h.axisA)&&void 0!==a?a:new C(1,0,0),g=this._tmpVec3[0];h.perpAxisA?g.copyFrom(h.perpAxisA):_.getNormalToRef(g),this._hknp.HP_Constraint_SetAnchorInParent(d,m,this._bVecToV3(_),this._bVecToV3(g));var y=h.pivotB?this._bVecToV3(h.pivotB):this._bVecToV3(C.Zero()),v=null!==(s=h.axisB)&&void 0!==s?s:new C(1,0,0),b=this._tmpVec3[0];if(h.perpAxisB?b.copyFrom(h.perpAxisB):v.getNormalToRef(b),this._hknp.HP_Constraint_SetAnchorInChild(d,y,this._bVecToV3(v),this._bVecToV3(b)),e._initOptions||(e._initOptions={axisA:_.clone(),axisB:v.clone(),perpAxisA:g.clone(),perpAxisB:b.clone(),pivotA:new C(m[0],m[1],m[2]),pivotB:new C(y[0],y[1],y[2])}),u==JE.LOCK)this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_X,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Y,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Z,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_X,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_Y,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_Z,this._hknp.ConstraintAxisLimitMode.LOCKED);else if(u==JE.DISTANCE){var T=h.maxDistance||0,E=this._hknp.ConstraintAxis.LINEAR_DISTANCE;this._hknp.HP_Constraint_SetAxisMode(d,E,this._hknp.ConstraintAxisLimitMode.LIMITED),this._hknp.HP_Constraint_SetAxisMinLimit(d,E,T),this._hknp.HP_Constraint_SetAxisMaxLimit(d,E,T)}else if(u==JE.HINGE)this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_X,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Y,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Z,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_Y,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_Z,this._hknp.ConstraintAxisLimitMode.LOCKED);else if(u==JE.PRISMATIC)this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Y,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Z,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_X,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_Y,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_Z,this._hknp.ConstraintAxisLimitMode.LOCKED);else if(u==JE.SLIDER)this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Y,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Z,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_Y,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.ANGULAR_Z,this._hknp.ConstraintAxisLimitMode.LOCKED);else if(u==JE.BALL_AND_SOCKET)this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_X,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Y,this._hknp.ConstraintAxisLimitMode.LOCKED),this._hknp.HP_Constraint_SetAxisMode(d,this._hknp.ConstraintAxis.LINEAR_Z,this._hknp.ConstraintAxisLimitMode.LOCKED);else{if(u!=JE.SIX_DOF)throw new Error("Unsupported Constraint Type.");for(var A=0,x=e.limits;A0){var u=this._hknp.HP_QueryCollector_GetCastRayResult(this._queryCollector,0)[1],h=u[1][3],d=u[1][4],p=u[1][5];n.setHitData({x:d[0],y:d[1],z:d[2]},{x:h[0],y:h[1],z:h[2]},p),n.calculateHitDistance();var f=this._bodies.get(u[1][0][0]);n.body=null==f?void 0:f.body,n.bodyIndex=null==f?void 0:f.index}},e.prototype.getCollisionObservable=function(e){var t=e._pluginData.hpBodyId[0],n=this._bodyCollisionObservable.get(t);return n||(n=new u,this._bodyCollisionObservable.set(t,n)),n},e.prototype.getCollisionEndedObservable=function(e){var t=e._pluginData.hpBodyId[0],n=this._bodyCollisionEndedObservable.get(t);return n||(n=new u,this._bodyCollisionEndedObservable.set(t,n)),n},e.prototype.setCollisionCallbackEnabled=function(e,t){var n=this,i=this._hknp.EventType.COLLISION_STARTED.value|this._hknp.EventType.COLLISION_CONTINUED.value|this._hknp.EventType.COLLISION_FINISHED.value;e._pluginDataInstances&&e._pluginDataInstances.length?e._pluginDataInstances.forEach((function(e){n._hknp.HP_Body_SetEventMask(e.hpBodyId,t?i:0)})):e._pluginData&&this._hknp.HP_Body_SetEventMask(e._pluginData.hpBodyId,t?i:0)},e.prototype.setCollisionEndedCallbackEnabled=function(e,t){var n=this,i=this._getPluginReference(e),r=this._hknp.HP_Body_GetEventMask(i.hpBodyId)[1];r=t?r|this._hknp.EventType.COLLISION_FINISHED.value:r&~this._hknp.EventType.COLLISION_FINISHED.value,e._pluginDataInstances&&e._pluginDataInstances.length?e._pluginDataInstances.forEach((function(e){n._hknp.HP_Body_SetEventMask(e.hpBodyId,r)})):e._pluginData&&this._hknp.HP_Body_SetEventMask(e._pluginData.hpBodyId,r)},e.prototype._notifyTriggers=function(){for(var e=this._hknp.HP_World_GetTriggerEvents(this.world)[1],t=new MA;e;){MA.readToRef(this._hknp.HEAPU8.buffer,e,t);var n=this._bodies.get(t.bodyIdA),i=this._bodies.get(t.bodyIdB);if(n&&i){var r={collider:n.body,colliderIndex:n.index,collidedAgainst:i.body,collidedAgainstIndex:i.index,type:this._nativeTriggerCollisionValueToCollisionType(t.type)};this.onTriggerCollisionObservable.notifyObservers(r)}e=this._hknp.HP_World_GetNextTriggerEvent(this.world,e)}},e.prototype._notifyCollisions=function(){for(var e=this._hknp.HP_World_GetCollisionEvents(this.world)[1],t=new wA,n=Number(this.world);e;){wA.readToRef(this._hknp.HEAPU8.buffer,e,t);var i=this._bodies.get(t.contactOnA.bodyId),r=this._bodies.get(t.contactOnB.bodyId);if(i&&r){var o={collider:i.body,colliderIndex:i.index,collidedAgainst:r.body,collidedAgainstIndex:r.index,type:this._nativeCollisionValueToCollisionType(t.type)};if(o.type===nA.COLLISION_FINISHED)this.onCollisionEndedObservable.notifyObservers(o);else{t.contactOnB.position.subtractToRef(t.contactOnA.position,this._tmpVec3[0]);var a=C.Dot(this._tmpVec3[0],t.contactOnA.normal);o.point=t.contactOnA.position,o.distance=a,o.impulse=t.impulseApplied,o.normal=t.contactOnA.normal,this.onCollisionObservable.notifyObservers(o)}if(this._bodyCollisionObservable.size&&o.type!==nA.COLLISION_FINISHED){var s=this._bodyCollisionObservable.get(t.contactOnA.bodyId),c=this._bodyCollisionObservable.get(t.contactOnB.bodyId);s?s.notifyObservers(o):c&&(o.collider=r.body,o.colliderIndex=r.index,o.collidedAgainst=i.body,o.collidedAgainstIndex=i.index,o.normal=t.contactOnB.normal,c.notifyObservers(o))}else this._bodyCollisionEndedObservable.size&&(s=this._bodyCollisionEndedObservable.get(t.contactOnA.bodyId),c=this._bodyCollisionEndedObservable.get(t.contactOnB.bodyId),s?s.notifyObservers(o):c&&(o.collider=r.body,o.colliderIndex=r.index,o.collidedAgainst=i.body,o.collidedAgainstIndex=i.index,o.normal=t.contactOnB.normal,c.notifyObservers(o)))}e=this._hknp.HP_World_GetNextCollisionEvent(n,e)}},Object.defineProperty(e.prototype,"numBodies",{get:function(){return this._hknp.HP_World_GetNumBodies(this.world)[1]},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._hknp.HP_QueryCollector_Release(this._queryCollector),this._queryCollector=BigInt(0),this._hknp.HP_World_Release(this.world),this.world=void 0},e.prototype._v3ToBvecRef=function(e,t){t.set(e[0],e[1],e[2])},e.prototype._bVecToV3=function(e){return[e._x,e._y,e._z]},e.prototype._bQuatToV4=function(e){return[e._x,e._y,e._z,e._w]},e.prototype._constraintMotorTypeToNative=function(e){switch(e){case tA.POSITION:return this._hknp.ConstraintMotorType.POSITION;case tA.VELOCITY:return this._hknp.ConstraintMotorType.VELOCITY}return this._hknp.ConstraintMotorType.NONE},e.prototype._nativeToMotorType=function(e){switch(e){case this._hknp.ConstraintMotorType.POSITION:return tA.POSITION;case this._hknp.ConstraintMotorType.VELOCITY:return tA.VELOCITY}return tA.NONE},e.prototype._materialCombineToNative=function(e){switch(e){case aA.GEOMETRIC_MEAN:return this._hknp.MaterialCombine.GEOMETRIC_MEAN;case aA.MINIMUM:return this._hknp.MaterialCombine.MINIMUM;case aA.MAXIMUM:return this._hknp.MaterialCombine.MAXIMUM;case aA.ARITHMETIC_MEAN:return this._hknp.MaterialCombine.ARITHMETIC_MEAN;case aA.MULTIPLY:return this._hknp.MaterialCombine.MULTIPLY}},e.prototype._constraintAxisToNative=function(e){switch(e){case $E.LINEAR_X:return this._hknp.ConstraintAxis.LINEAR_X;case $E.LINEAR_Y:return this._hknp.ConstraintAxis.LINEAR_Y;case $E.LINEAR_Z:return this._hknp.ConstraintAxis.LINEAR_Z;case $E.ANGULAR_X:return this._hknp.ConstraintAxis.ANGULAR_X;case $E.ANGULAR_Y:return this._hknp.ConstraintAxis.ANGULAR_Y;case $E.ANGULAR_Z:return this._hknp.ConstraintAxis.ANGULAR_Z;case $E.LINEAR_DISTANCE:return this._hknp.ConstraintAxis.LINEAR_DISTANCE}},e.prototype._nativeToLimitMode=function(e){switch(e){case this._hknp.ConstraintAxisLimitMode.FREE:return ZE.FREE;case this._hknp.ConstraintAxisLimitMode.LIMITED:return ZE.LIMITED;case this._hknp.ConstraintAxisLimitMode.LOCKED:return ZE.LOCKED}return ZE.FREE},e.prototype._limitModeToNative=function(e){switch(e){case ZE.FREE:return this._hknp.ConstraintAxisLimitMode.FREE;case ZE.LIMITED:return this._hknp.ConstraintAxisLimitMode.LIMITED;case ZE.LOCKED:return this._hknp.ConstraintAxisLimitMode.LOCKED}},e.prototype._nativeCollisionValueToCollisionType=function(e){switch(e){case this._hknp.EventType.COLLISION_STARTED.value:return nA.COLLISION_STARTED;case this._hknp.EventType.COLLISION_FINISHED.value:return nA.COLLISION_FINISHED;case this._hknp.EventType.COLLISION_CONTINUED.value:return nA.COLLISION_CONTINUED}return nA.COLLISION_STARTED},e.prototype._nativeTriggerCollisionValueToCollisionType=function(e){switch(e){case 8:return nA.TRIGGER_ENTERED;case 16:return nA.TRIGGER_EXITED}return nA.TRIGGER_ENTERED},e}();Ci.prototype.getPhysicsEngine=function(){return this._physicsEngine},Ci.prototype.enablePhysics=function(e,t){if(void 0===e&&(e=null),this._physicsEngine)return!0;var n=this._getComponent(Jn.NAME_PHYSICSENGINE);n||(n=new NA(this),this._addComponent(n));try{if(t&&1!==(null==t?void 0:t.getPluginVersion())){if(2!==(null==t?void 0:t.getPluginVersion()))throw new Error("Unsupported Physics plugin version.");this._physicsEngine=new rA(e,t)}else this._physicsEngine=new lg(e,t);return this._physicsTimeAccumulator=0,!0}catch(e){return J.Error(e.message),!1}},Ci.prototype.disablePhysicsEngine=function(){this._physicsEngine&&(this._physicsEngine.dispose(),this._physicsEngine=null)},Ci.prototype.isPhysicsEnabled=function(){return void 0!==this._physicsEngine},Ci.prototype.deleteCompoundImpostor=function(e){var t=e.parts[0].mesh;t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)},Ci.prototype._advancePhysicsEngineStep=function(e){if(this._physicsEngine){var t=this._physicsEngine.getSubTimeStep();if(t>0)for(this._physicsTimeAccumulator+=e;this._physicsTimeAccumulator>t;)this.onBeforePhysicsObservable.notifyObservers(this),this._physicsEngine._step(t/1e3),this.onAfterPhysicsObservable.notifyObservers(this),this._physicsTimeAccumulator-=t;else this.onBeforePhysicsObservable.notifyObservers(this),this._physicsEngine._step(e/1e3),this.onAfterPhysicsObservable.notifyObservers(this)}};var NA=function(){function e(e){var t=this;this.name=Jn.NAME_PHYSICSENGINE,this.scene=e,this.scene.onBeforePhysicsObservable=new u,this.scene.onAfterPhysicsObservable=new u,this.scene.getDeterministicFrameTime=function(){return t.scene._physicsEngine?1e3*t.scene._physicsEngine.getTimeStep():1e3/60}}return e.prototype.register=function(){},e.prototype.rebuild=function(){},e.prototype.dispose=function(){this.scene.onBeforePhysicsObservable.clear(),this.scene.onAfterPhysicsObservable.clear(),this.scene._physicsEngine&&this.scene.disablePhysicsEngine()},e}();Object.defineProperty(Lr.prototype,"physicsBody",{get:function(){return this._physicsBody},set:function(e){var t=this;this._physicsBody!==e&&(this._disposePhysicsObserver&&this.onDisposeObservable.remove(this._disposePhysicsObserver),this._physicsBody=e,e&&(this._disposePhysicsObserver=this.onDisposeObservable.add((function(){t.physicsBody&&(t.physicsBody.dispose(),t.physicsBody=null)}))))},enumerable:!0,configurable:!0}),Lr.prototype.getPhysicsBody=function(){return this.physicsBody},Lr.prototype.applyImpulse=function(e,t){if(!this.physicsBody)throw new Error("No Physics Body for TransformNode");return this.physicsBody.applyImpulse(e,t),this};var LA,FA,BA=function(){function e(){}return e.GetContactPointToRef=function(e,t,n,i,r){var o=e.getScene().getPhysicsEngine(),a=null==o?void 0:o.getPluginVersion();if(1===a){var s=new No(t,n).intersectsMesh(e);if(s.hit&&s.pickedPoint)return i.copyFrom(s.pickedPoint),!0}else if(2===a)return e.physicsBody.getObjectCenterWorldToRef(i,r),!0;return!1},e.HasAppliedForces=function(e,t){var n,i,r;return e.getMotionType(t)===iA.STATIC||0===(null!==(i=null===(n=e.getMassProperties(t))||void 0===n?void 0:n.mass)&&void 0!==i?i:0)||0===(null===(r=e.transformNode)||void 0===r?void 0:r.getTotalVertices())},e.IsInsideCylinder=function(e,t,n,i){var r=w.Vector3[0];return e.subtractToRef(t,r),Math.abs(r.x)<=n&&Math.abs(r.z)<=n&&r.y>=0&&r.y<=i},e}(),UA=function(){function e(e){this._hitData={force:new C,contactPoint:new C,distanceFromOrigin:0},this._scene=e,this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine||J.Warn("Physics engine not enabled. Please enable the physics before you can use the methods.")}return e.prototype.applyRadialExplosionImpulse=function(e,t,n,i){var r=this;if(!this._physicsEngine)return J.Warn("Physics engine not enabled. Please enable the physics before you call this method."),null;if(1===this._physicsEngine.getPluginVersion()&&0===this._physicsEngine.getImpostors().length)return null;if(2===this._physicsEngine.getPluginVersion()&&0===this._physicsEngine.getBodies().length)return null;var o=!1;if("number"==typeof t){var a=t;(t=new HA).radius=a,t.strength=null!=n?n:t.strength,t.falloff=null!=i?i:t.falloff}else o=!(!t.affectedImpostorsCallback&&!t.affectedBodiesCallback);var s=new kA(this._scene,t),c=this._hitData;if(1===this._physicsEngine.getPluginVersion()){var l=Array();this._physicsEngine.getImpostors().forEach((function(t){s.getImpostorHitData(t,e,c)&&(t.applyImpulse(c.force,c.contactPoint),o&&l.push({impostor:t,hitData:r._copyPhysicsHitData(c)}))})),s.triggerAffectedImpostorsCallback(l)}else this._applicationForBodies(s,e,c,o,(function(e,t){e.applyImpulse(t.force,t.contactPoint,t.instanceIndex)}));return s.dispose(!1),s},e.prototype.applyRadialExplosionForce=function(e,t,n,i){var r=this;if(!this._physicsEngine)return J.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(1===this._physicsEngine.getPluginVersion()&&0===this._physicsEngine.getImpostors().length)return null;if(2===this._physicsEngine.getPluginVersion()&&0===this._physicsEngine.getBodies().length)return null;var o=!1;if("number"==typeof t){var a=t;(t=new HA).radius=a,t.strength=null!=n?n:t.strength,t.falloff=null!=i?i:t.falloff}else o=!(!t.affectedImpostorsCallback&&!t.affectedBodiesCallback);var s=new kA(this._scene,t),c=this._hitData;if(1===this._physicsEngine.getPluginVersion()){var l=Array();this._physicsEngine.getImpostors().forEach((function(t){s.getImpostorHitData(t,e,c)&&(t.applyForce(c.force,c.contactPoint),o&&l.push({impostor:t,hitData:r._copyPhysicsHitData(c)}))})),s.triggerAffectedImpostorsCallback(l)}else this._applicationForBodies(s,e,c,o,(function(e,t){e.applyForce(t.force,t.contactPoint,t.instanceIndex)}));return s.dispose(!1),s},e.prototype._applicationForBodies=function(e,t,n,i,r){for(var o=this,a=Array(),s=0,c=this._physicsEngine.getBodies();sthis._options.radius)return!1;var s=this._options.falloff===LA.Constant?this._options.strength:this._options.strength*(1-a/this._options.radius);return r.scaleInPlace(s),i.force.copyFrom(r),i.contactPoint.copyFrom(o),i.distanceFromOrigin=a,!0},e.prototype.getBodyHitData=function(e,t,n,i){if(BA.HasAppliedForces(e,i))return!1;var r=e.transformNode,o=e.getObjectCenterWorld(i);return n.instanceIndex=i,this._getHitData(r,o,t,n)},e.prototype.getImpostorHitData=function(e,t,n){if(0===e.mass)return!1;if("Mesh"!==e.object.getClassName()&&"InstancedMesh"!==e.object.getClassName())return!1;var i=e.object;if(!this._intersectsWithSphere(i,t,this._options.radius))return!1;var r=e.getObjectCenter();return this._getHitData(i,r,t,n),!0},e.prototype.triggerAffectedImpostorsCallback=function(e){this._options.affectedImpostorsCallback&&this._options.affectedImpostorsCallback(e)},e.prototype.triggerAffectedBodiesCallback=function(e){this._options.affectedBodiesCallback&&this._options.affectedBodiesCallback(e)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),this._sphere&&(e?this._sphere.dispose():setTimeout((function(){t._dataFetched||t._sphere.dispose()}),0))},e.prototype._prepareSphere=function(){this._sphere||(this._sphere=yu("radialExplosionEventSphere",this._options.sphere,this._scene),this._sphere.isVisible=!1)},e.prototype._intersectsWithSphere=function(e,t,n){return this._prepareSphere(),this._sphere.position=t,this._sphere.scaling.setAll(2*n),this._sphere._updateBoundingInfo(),this._sphere.computeWorldMatrix(!0),this._sphere.intersectsMesh(e,!0)},e}(),VA=function(){function e(e,t,n,i){var r=this;this._physicsHelper=e,this._scene=t,this._origin=n,this._options=i,this._dataFetched=!1,this._options=j(j({},new HA),this._options),this._tickCallback=function(){return r._tick()},this._options.strength=-1*this._options.strength}return e.prototype.getData=function(){return this._dataFetched=!0,{sphere:this._sphere}},e.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},e.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),this._sphere&&(e?this._sphere.dispose():setTimeout((function(){t._dataFetched||t._sphere.dispose()}),0))},e.prototype._tick=function(){var e;if(this._sphere)this._physicsHelper.applyRadialExplosionForce(this._origin,this._options);else{var t=this._physicsHelper.applyRadialExplosionForce(this._origin,this._options);t&&(this._sphere=null===(e=t.getData().sphere)||void 0===e?void 0:e.clone("radialExplosionEventSphereClone"))}},e}(),zA=function(){function e(e,t,n){var i=this;this._scene=e,this._origin=t,this._options=n,this._originTop=C.Zero(),this._originDirection=C.Zero(),this._cylinderPosition=C.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._options=j(j({},new jA),this._options),this._origin.addToRef(new C(0,this._options.height/2,0),this._cylinderPosition),this._origin.addToRef(new C(0,this._options.height,0),this._originTop),this._options.updraftMode===FA.Perpendicular&&(this._originDirection=this._origin.subtract(this._originTop).normalize()),this._tickCallback=function(){return i._tick()},1===this._physicsEngine.getPluginVersion()&&this._prepareCylinder()}return e.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},e.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},e.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),this._cylinder&&(e?(this._cylinder.dispose(),this._cylinder=void 0):setTimeout((function(){!t._dataFetched&&t._cylinder&&(t._cylinder.dispose(),t._cylinder=void 0)}),0))},e.prototype._getHitData=function(e,t){var n;n=this._options.updraftMode===FA.Perpendicular?this._originDirection:e.subtract(this._originTop);var i=C.Distance(this._origin,e),r=-1*this._options.strength,o=n.multiplyByFloats(r,r,r);t.force.copyFrom(o),t.contactPoint.copyFrom(e),t.distanceFromOrigin=i},e.prototype._getBodyHitData=function(e,t,n){if(BA.HasAppliedForces(e))return!1;var i=e.getObjectCenterWorld(n);return!!BA.IsInsideCylinder(i,this._origin,this._options.radius,this._options.height)&&(t.instanceIndex=n,this._getHitData(i,t),!0)},e.prototype._getImpostorHitData=function(e,t){if(0===e.mass)return!1;var n=e.object;if(!this._intersectsWithCylinder(n))return!1;var i=e.getObjectCenter();return this._getHitData(i,t),!0},e.prototype._tick=function(){var t=this,n=e._HitData;1===this._physicsEngine.getPluginVersion()?this._physicsEngine.getImpostors().forEach((function(e){t._getImpostorHitData(e,n)&&e.applyForce(n.force,n.contactPoint)})):this._physicsEngine.getBodies().forEach((function(e){e.iterateOverAllInstances((function(e,i){t._getBodyHitData(e,n,i)&&e.applyForce(n.force,n.contactPoint,n.instanceIndex)}))}))},e.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=tu("updraftEventCylinder",{height:this._options.height,diameter:2*this._options.radius},this._scene),this._cylinder.isVisible=!1)},e.prototype._intersectsWithCylinder=function(e){return!!this._cylinder&&(this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(e,!0))},e._HitData={force:new C,contactPoint:new C,distanceFromOrigin:0},e}(),GA=function(){function e(e,t,n){var i=this;this._scene=e,this._origin=t,this._options=n,this._originTop=C.Zero(),this._cylinderPosition=C.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._options=j(j({},new WA),this._options),this._origin.addToRef(new C(0,this._options.height/2,0),this._cylinderPosition),this._origin.addToRef(new C(0,this._options.height,0),this._originTop),this._tickCallback=function(){return i._tick()},1===this._physicsEngine.getPluginVersion()&&this._prepareCylinder()}return e.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},e.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},e.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),this._cylinder&&(e?this._cylinder.dispose():setTimeout((function(){t._dataFetched||t._cylinder.dispose()}),0))},e.prototype._getHitData=function(t,n,i){var r=e.originOnPlane;r.set(this._origin.x,n.y,this._origin.z);var o=w.Vector3[0];n.subtractToRef(r,o);var a=w.Vector3[1];if(!BA.GetContactPointToRef(t,r,o,a,i.instanceIndex))return!1;var s,c,l,u=C.Distance(a,r)/this._options.radius,h=w.Vector3[2];if(a.normalizeToRef(h),u>this._options.centripetalForceThreshold&&h.negateInPlace(),u>this._options.centripetalForceThreshold)s=h.x*this._options.centripetalForceMultiplier,c=h.y*this._options.updraftForceMultiplier,l=h.z*this._options.centripetalForceMultiplier;else{var d=C.Cross(r,n).normalize();s=(d.x+h.x)*this._options.centrifugalForceMultiplier,c=this._originTop.y*this._options.updraftForceMultiplier,l=(d.z+h.z)*this._options.centrifugalForceMultiplier}var p=w.Vector3[3];return p.set(s,c,l),p.scaleInPlace(this._options.strength),i.force.copyFrom(p),i.contactPoint.copyFrom(n),i.distanceFromOrigin=u,!0},e.prototype._getBodyHitData=function(e,t,n){if(BA.HasAppliedForces(e,n))return!1;var i=e.transformNode,r=e.getObjectCenterWorld(n);return!!BA.IsInsideCylinder(r,this._origin,this._options.radius,this._options.height)&&(t.instanceIndex=n,this._getHitData(i,r,t))},e.prototype._getImpostorHitData=function(e,t){if(0===e.mass)return!1;if("Mesh"!==e.object.getClassName()&&"InstancedMesh"!==e.object.getClassName())return!1;var n=e.object;if(!this._intersectsWithCylinder(n))return!1;var i=e.getObjectCenter();return this._getHitData(n,i,t),!0},e.prototype._tick=function(){var t=this,n=e.hitData;1===this._physicsEngine.getPluginVersion()?this._physicsEngine.getImpostors().forEach((function(e){t._getImpostorHitData(e,n)&&e.applyForce(n.force,n.contactPoint)})):this._physicsEngine.getBodies().forEach((function(e){e.iterateOverAllInstances((function(e,i){t._getBodyHitData(e,n,i)&&e.applyForce(n.force,n.contactPoint,n.instanceIndex)}))}))},e.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=tu("vortexEventCylinder",{height:this._options.height,diameter:2*this._options.radius},this._scene),this._cylinder.isVisible=!1)},e.prototype._intersectsWithCylinder=function(e){return this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(e,!0)},e.originOnPlane=C.Zero(),e.hitData={force:new C,contactPoint:new C,distanceFromOrigin:0},e}(),HA=function(){this.radius=5,this.strength=10,this.falloff=LA.Constant,this.sphere={segments:32,diameter:1}},jA=function(){this.radius=5,this.strength=10,this.height=10,this.updraftMode=FA.Center},WA=function(){this.radius=5,this.strength=10,this.height=10,this.centripetalForceThreshold=.7,this.centripetalForceMultiplier=5,this.centrifugalForceMultiplier=.5,this.updraftForceMultiplier=.02};!function(e){e[e.Constant=0]="Constant",e[e.Linear=1]="Linear"}(LA||(LA={})),function(e){e[e.Center=0]="Center",e[e.Perpendicular=1]="Perpendicular"}(FA||(FA={})),Vt.ShadersStore.blackAndWhitePixelShader="varying vec2 vUV;uniform sampler2D textureSampler;uniform float degree;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{vec3 color=texture2D(textureSampler,vUV).rgb;float luminance=dot(color,vec3(0.3,0.59,0.11)); \nvec3 blackAndWhite=vec3(luminance,luminance,luminance);gl_FragColor=vec4(color-((color-blackAndWhite)*degree),1.0);}";var XA=function(e){function t(t,n,i,r,o,a){var s=e.call(this,t,"blackAndWhite",["degree"],null,n,i,r,o,a)||this;return s.degree=1,s.onApplyObservable.add((function(e){e.setFloat("degree",s.degree)})),s}return H(t,e),t.prototype.getClassName=function(){return"BlackAndWhitePostProcess"},t._Parse=function(e,n,i,r){return ke.Parse((function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)}),e,i,r)},W([Se()],t.prototype,"degree",void 0),t}(Da);b("BABYLON.BlackAndWhitePostProcess",XA);var YA=function(){function e(e,t,n,i){this._name=t,this._singleInstance=i||!0,this._getPostProcesses=n,this._cameras={},this._indicesForCamera={},this._postProcesses={}}return Object.defineProperty(e.prototype,"isSupported",{get:function(){for(var e in this._postProcesses)if(Object.prototype.hasOwnProperty.call(this._postProcesses,e))for(var t=this._postProcesses[e],n=0;n1?a.TEXTUREFORMAT_RED:a.TEXTUREFORMAT_RGBA;s._circleOfConfusion=new $A("circleOfConfusion",n,1,null,Eo.BILINEAR_SAMPLINGMODE,c,!1,r,o),s._depthOfFieldBlurY=[],s._depthOfFieldBlurX=[];var u=1,h=15;switch(i){case nx.High:u=3,h=51;break;case nx.Medium:u=2,h=31;break;default:h=15,u=1}for(var d=h/Math.pow(2,u-1),p=1,f=0;f-1?"#define MALI 1\n":null},t._Parse=function(e,n,i,r){return ke.Parse((function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)}),e,i,r)},t}(Da);b("BABYLON.FxaaPostProcess",sx),Vt.ShadersStore.grainPixelShader="#include\nuniform sampler2D textureSampler; \nuniform float intensity;uniform float animatedSeed;varying vec2 vUV;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{gl_FragColor=texture2D(textureSampler,vUV);vec2 seed=vUV*(animatedSeed);float grain=dither(seed,intensity);float lum=getLuminance(gl_FragColor.rgb);float grainAmount=(cos(-PI+(lum*PI*2.))+1.)/2.;gl_FragColor.rgb+=grain*grainAmount;gl_FragColor.rgb=max(gl_FragColor.rgb,0.0);}";var cx=function(e){function t(t,n,i,r,o,s,c,l){void 0===c&&(c=a.TEXTURETYPE_UNSIGNED_INT),void 0===l&&(l=!1);var u=e.call(this,t,"grain",["intensity","animatedSeed"],[],n,i,r,o,s,null,c,void 0,null,l)||this;return u.intensity=30,u.animated=!1,u.onApplyObservable.add((function(e){e.setFloat("intensity",u.intensity),e.setFloat("animatedSeed",u.animated?Math.random()+1:1)})),u}return H(t,e),t.prototype.getClassName=function(){return"GrainPostProcess"},t._Parse=function(e,n,i,r){return ke.Parse((function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)}),e,i,r)},W([Se()],t.prototype,"intensity",void 0),W([Se()],t.prototype,"animated",void 0),t}(Da);b("BABYLON.GrainPostProcess",cx),Vt.ShadersStore.highlightsPixelShader="varying vec2 vUV;uniform sampler2D textureSampler;const vec3 RGBLuminanceCoefficients=vec3(0.2126,0.7152,0.0722);\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{vec4 tex=texture2D(textureSampler,vUV);vec3 c=tex.rgb;float luma=dot(c.rgb,RGBLuminanceCoefficients);gl_FragColor=vec4(pow(c,vec3(25.0-luma*15.0)),tex.a); }";var lx=function(e){function t(t,n,i,r,o,s,c){return void 0===c&&(c=a.TEXTURETYPE_UNSIGNED_INT),e.call(this,t,"highlights",null,null,n,i,r,o,s,null,c)||this}return H(t,e),t.prototype.getClassName=function(){return"HighlightsPostProcess"},t}(Da);Vt.ShadersStore.imageProcessingPixelShader="varying vec2 vUV;uniform sampler2D textureSampler;\n#include\n#include\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{vec4 result=texture2D(textureSampler,vUV);\n#ifdef IMAGEPROCESSING\n#ifndef FROMLINEARSPACE\nresult.rgb=toLinearSpace(result.rgb);\n#endif\nresult=applyImageProcessing(result);\n#else\n#ifdef FROMLINEARSPACE\nresult=applyImageProcessing(result);\n#endif\n#endif\ngl_FragColor=result;}";var ux=function(e){function t(t,n,i,r,o,s,c,l){void 0===i&&(i=null),void 0===c&&(c=a.TEXTURETYPE_UNSIGNED_INT);var u=e.call(this,t,"imageProcessing",[],[],n,i,r,o,s,null,c,"postprocess",null,!0)||this;return u._fromLinearSpace=!0,u._defines={IMAGEPROCESSING:!1,VIGNETTE:!1,VIGNETTEBLENDMODEMULTIPLY:!1,VIGNETTEBLENDMODEOPAQUE:!1,TONEMAPPING:!1,TONEMAPPING_ACES:!1,CONTRAST:!1,COLORCURVES:!1,COLORGRADING:!1,COLORGRADING3D:!1,FROMLINEARSPACE:!1,SAMPLER3DGREENDEPTH:!1,SAMPLER3DBGRMAP:!1,DITHER:!1,IMAGEPROCESSINGPOSTPROCESS:!1,EXPOSURE:!1,SKIPFINALCOLORCLAMP:!1},l?(l.applyByPostProcess=!0,u._attachImageProcessingConfiguration(l,!0),u._updateParameters()):(u._attachImageProcessingConfiguration(null,!0),u.imageProcessingConfiguration.applyByPostProcess=!0),u.onApply=function(e){u.imageProcessingConfiguration.bind(e,u.aspectRatio)},u}return H(t,e),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){e.applyByPostProcess=!0,this._attachImageProcessingConfiguration(e)},enumerable:!1,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e,t){var n=this;if(void 0===t&&(t=!1),e!==this._imageProcessingConfiguration){if(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e)this._imageProcessingConfiguration=e;else{var i=null,r=this.getEngine(),o=this.getCamera();if(o)i=o.getScene();else if(r&&r.scenes){var a=r.scenes;i=a[a.length-1]}else i=A.LastCreatedScene;this._imageProcessingConfiguration=i?i.imageProcessingConfiguration:new Fn}this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add((function(){n._updateParameters()}))),t||this._updateParameters()}},Object.defineProperty(t.prototype,"isSupported",{get:function(){var e=this.getEffect();return!e||e.isSupported},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorCurves",{get:function(){return this.imageProcessingConfiguration.colorCurves},set:function(e){this.imageProcessingConfiguration.colorCurves=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorGradingTexture",{get:function(){return this.imageProcessingConfiguration.colorGradingTexture},set:function(e){this.imageProcessingConfiguration.colorGradingTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exposure",{get:function(){return this.imageProcessingConfiguration.exposure},set:function(e){this.imageProcessingConfiguration.exposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toneMappingType",{get:function(){return this._imageProcessingConfiguration.toneMappingType},set:function(e){this._imageProcessingConfiguration.toneMappingType=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contrast",{get:function(){return this.imageProcessingConfiguration.contrast},set:function(e){this.imageProcessingConfiguration.contrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteStretch",{get:function(){return this.imageProcessingConfiguration.vignetteStretch},set:function(e){this.imageProcessingConfiguration.vignetteStretch=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCentreX",{get:function(){return this.imageProcessingConfiguration.vignetteCenterX},set:function(e){this.imageProcessingConfiguration.vignetteCenterX=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCentreY",{get:function(){return this.imageProcessingConfiguration.vignetteCenterY},set:function(e){this.imageProcessingConfiguration.vignetteCenterY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCenterY",{get:function(){return this.imageProcessingConfiguration.vignetteCenterY},set:function(e){this.imageProcessingConfiguration.vignetteCenterY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCenterX",{get:function(){return this.imageProcessingConfiguration.vignetteCenterX},set:function(e){this.imageProcessingConfiguration.vignetteCenterX=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteWeight",{get:function(){return this.imageProcessingConfiguration.vignetteWeight},set:function(e){this.imageProcessingConfiguration.vignetteWeight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteColor",{get:function(){return this.imageProcessingConfiguration.vignetteColor},set:function(e){this.imageProcessingConfiguration.vignetteColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCameraFov",{get:function(){return this.imageProcessingConfiguration.vignetteCameraFov},set:function(e){this.imageProcessingConfiguration.vignetteCameraFov=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteBlendMode",{get:function(){return this.imageProcessingConfiguration.vignetteBlendMode},set:function(e){this.imageProcessingConfiguration.vignetteBlendMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteEnabled",{get:function(){return this.imageProcessingConfiguration.vignetteEnabled},set:function(e){this.imageProcessingConfiguration.vignetteEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ditheringIntensity",{get:function(){return this.imageProcessingConfiguration.ditheringIntensity},set:function(e){this.imageProcessingConfiguration.ditheringIntensity=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ditheringEnabled",{get:function(){return this.imageProcessingConfiguration.ditheringEnabled},set:function(e){this.imageProcessingConfiguration.ditheringEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fromLinearSpace",{get:function(){return this._fromLinearSpace},set:function(e){this._fromLinearSpace!==e&&(this._fromLinearSpace=e,this._updateParameters())},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"ImageProcessingPostProcess"},t.prototype._updateParameters=function(){this._defines.FROMLINEARSPACE=this._fromLinearSpace,this.imageProcessingConfiguration.prepareDefines(this._defines,!0);var e="";for(var t in this._defines)this._defines[t]&&(e+="#define ".concat(t,";\n"));var n=["textureSampler"],i=["scale"];Fn&&(Fn.PrepareSamplers(n,this._defines),Fn.PrepareUniforms(i,this._defines)),this.updateEffect(e,i,n)},t.prototype.dispose=function(t){e.prototype.dispose.call(this,t),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration&&(this.imageProcessingConfiguration.applyByPostProcess=!1)},W([Se()],t.prototype,"_fromLinearSpace",void 0),t}(Da);Vt.IncludesShadersStore.mrtFragmentDeclaration="#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nlayout(location=0) out vec4 glFragData[{X}];\n#endif\n",Vt.ShadersStore.geometryPixelShader="#extension GL_EXT_draw_buffers : require\n#if defined(BUMP) || !defined(NORMAL)\n#extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#ifdef BUMP\nvarying mat4 vWorldView;varying vec3 vNormalW;\n#else\nvarying vec3 vNormalV;\n#endif\nvarying vec4 vViewPos;\n#if defined(POSITION) || defined(BUMP)\nvarying vec3 vPositionW;\n#endif\n#ifdef VELOCITY\nvarying vec4 vCurrentPosition;varying vec4 vPreviousPosition;\n#endif\n#ifdef NEED_UV\nvarying vec2 vUV;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;uniform vec2 vTangentSpaceParams;\n#endif\n#if defined(REFLECTIVITY)\n#if defined(ORMTEXTURE) || defined(SPECULARGLOSSINESSTEXTURE) || defined(REFLECTIVITYTEXTURE)\nuniform sampler2D reflectivitySampler;varying vec2 vReflectivityUV;\n#endif\n#ifdef ALBEDOTEXTURE\nvarying vec2 vAlbedoUV;uniform sampler2D albedoSampler;\n#endif\n#ifdef REFLECTIVITYCOLOR\nuniform vec3 reflectivityColor;\n#endif\n#ifdef ALBEDOCOLOR\nuniform vec3 albedoColor;\n#endif\n#ifdef METALLIC\nuniform float metallic;\n#endif\n#if defined(ROUGHNESS) || defined(GLOSSINESS)\nuniform float glossiness;\n#endif\n#endif\n#if defined(ALPHATEST) && defined(NEED_UV)\nuniform sampler2D diffuseSampler;\n#endif\n#include\n#include[RENDER_TARGET_COUNT]\n#include\n#include\n#include\nvoid main() {\n#include\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\nvec3 normalOutput;\n#ifdef BUMP\nvec3 normalW=normalize(vNormalW);\n#include\n#ifdef NORMAL_WORLDSPACE\nnormalOutput=normalW;\n#else\nnormalOutput=normalize(vec3(vWorldView*vec4(normalW,0.0)));\n#endif\n#else\nnormalOutput=normalize(vNormalV);\n#endif\n#ifdef PREPASS\n#ifdef PREPASS_DEPTH\ngl_FragData[DEPTH_INDEX]=vec4(vViewPos.z/vViewPos.w,0.0,0.0,1.0);\n#endif\n#ifdef PREPASS_NORMAL\ngl_FragData[NORMAL_INDEX]=vec4(normalOutput,1.0);\n#endif\n#else\ngl_FragData[0]=vec4(vViewPos.z/vViewPos.w,0.0,0.0,1.0);gl_FragData[1]=vec4(normalOutput,1.0);\n#endif\n#ifdef POSITION\ngl_FragData[POSITION_INDEX]=vec4(vPositionW,1.0);\n#endif\n#ifdef VELOCITY\nvec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5;vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5;vec2 velocity=abs(a-b);velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5;gl_FragData[VELOCITY_INDEX]=vec4(velocity,0.0,1.0);\n#endif\n#ifdef REFLECTIVITY\nvec4 reflectivity=vec4(0.0,0.0,0.0,1.0);\n#ifdef METALLICWORKFLOW\nfloat metal=1.0;float roughness=1.0;\n#ifdef ORMTEXTURE\nmetal*=texture2D(reflectivitySampler,vReflectivityUV).b;roughness*=texture2D(reflectivitySampler,vReflectivityUV).g;\n#endif\n#ifdef METALLIC\nmetal*=metallic;\n#endif\n#ifdef ROUGHNESS\nroughness*=(1.0-glossiness); \n#endif\nreflectivity.a-=roughness;vec3 color=vec3(1.0);\n#ifdef ALBEDOTEXTURE\ncolor=texture2D(albedoSampler,vAlbedoUV).rgb;\n#ifdef GAMMAALBEDO\ncolor=toLinearSpace(color);\n#endif\n#endif\n#ifdef ALBEDOCOLOR\ncolor*=albedoColor.xyz;\n#endif\nreflectivity.rgb=mix(vec3(0.04),color,metal);\n#else\n#if defined(SPECULARGLOSSINESSTEXTURE) || defined(REFLECTIVITYTEXTURE)\nreflectivity=texture2D(reflectivitySampler,vReflectivityUV);\n#ifdef GAMMAREFLECTIVITYTEXTURE\nreflectivity.rgb=toLinearSpace(reflectivity.rgb);\n#endif\n#else \n#ifdef REFLECTIVITYCOLOR\nreflectivity.rgb=toLinearSpace(reflectivityColor.xyz);reflectivity.a=1.0;\n#endif\n#endif\n#ifdef GLOSSINESSS\nreflectivity.a*=glossiness; \n#endif\n#endif\ngl_FragData[REFLECTIVITY_INDEX]=reflectivity;\n#endif\n}\n",Vt.IncludesShadersStore.geometryVertexDeclaration="uniform mat4 viewProjection;uniform mat4 view;",Vt.IncludesShadersStore.geometryUboDeclaration="#include\n",Vt.ShadersStore.geometryVertexShader="precision highp float;\n#include\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include<__decl__geometryVertex>\n#include\nattribute vec3 position;attribute vec3 normal;\n#ifdef NEED_UV\nvarying vec2 vUV;\n#ifdef ALPHATEST\nuniform mat4 diffuseMatrix;\n#endif\n#ifdef BUMP\nuniform mat4 bumpMatrix;varying vec2 vBumpUV;\n#endif\n#ifdef REFLECTIVITY\nuniform mat4 reflectivityMatrix;uniform mat4 albedoMatrix;varying vec2 vReflectivityUV;varying vec2 vAlbedoUV;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n#ifdef BUMP\nvarying mat4 vWorldView;\n#endif\n#ifdef BUMP\nvarying vec3 vNormalW;\n#else\nvarying vec3 vNormalV;\n#endif\nvarying vec4 vViewPos;\n#if defined(POSITION) || defined(BUMP)\nvarying vec3 vPositionW;\n#endif\n#ifdef VELOCITY\nuniform mat4 previousViewProjection;varying vec4 vCurrentPosition;varying vec4 vPreviousPosition;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void)\n{vec3 positionUpdated=position;vec3 normalUpdated=normal;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\n#if defined(VELOCITY) && !defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#include\n#include\nvec4 worldPos=vec4(finalWorld*vec4(positionUpdated,1.0));\n#ifdef BUMP\nvWorldView=view*finalWorld;vNormalW=normalUpdated;\n#else\n#ifdef NORMAL_WORLDSPACE\nvNormalV=normalize(vec3(finalWorld*vec4(normalUpdated,0.0)));\n#else\nvNormalV=normalize(vec3((view*finalWorld)*vec4(normalUpdated,0.0)));\n#endif\n#endif\nvViewPos=view*worldPos;\n#if defined(VELOCITY) && defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#if NUM_BONE_INFLUENCERS>0\nmat4 previousInfluence;previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\npreviousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\npreviousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\npreviousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\nvPreviousPosition=previousViewProjection*finalPreviousWorld*previousInfluence*vec4(positionUpdated,1.0);\n#else\nvPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#endif\n#if defined(POSITION) || defined(BUMP)\nvPositionW=worldPos.xyz/worldPos.w;\n#endif\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#include\n#ifdef NEED_UV\n#ifdef UV1\n#if defined(ALPHATEST) && defined(ALPHATEST_UV1)\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#else\nvUV=uv;\n#endif\n#ifdef BUMP_UV1\nvBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef REFLECTIVITY_UV1\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef ALBEDO_UV1\nvAlbedoUV=vec2(albedoMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#endif\n#ifdef UV2\n#if defined(ALPHATEST) && defined(ALPHATEST_UV2)\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#else\nvUV=uv2;\n#endif\n#ifdef BUMP_UV2\nvBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0));\n#endif\n#ifdef REFLECTIVITY_UV2\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uv2,1.0,0.0));\n#endif\n#ifdef ALBEDO_UV2\nvAlbedoUV=vec2(albedoMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#endif\n#include\n}\n";var hx=["world","mBones","viewProjection","diffuseMatrix","view","previousWorld","previousViewProjection","mPreviousBones","bumpMatrix","reflectivityMatrix","albedoMatrix","reflectivityColor","albedoColor","metallic","glossiness","vTangentSpaceParams","vBumpInfos","morphTargetInfluences","morphTargetTextureInfo","morphTargetTextureIndices","boneTextureWidth"];Vr(hx);var dx=function(){function e(t,n,i){void 0===n&&(n=1),void 0===i&&(i=a.TEXTUREFORMAT_DEPTH16),this._previousTransformationMatrices={},this._previousBonesTransformationMatrices={},this.excludedSkinnedMeshesFromVelocity=[],this.renderTransparentMeshes=!0,this.generateNormalsInWorldSpace=!1,this._resizeObserver=null,this._enablePosition=!1,this._enableVelocity=!1,this._enableReflectivity=!1,this._clearColor=new U(0,0,0,0),this._clearDepthColor=new U(1e8,0,0,1),this._positionIndex=-1,this._velocityIndex=-1,this._reflectivityIndex=-1,this._depthIndex=-1,this._normalIndex=-1,this._linkedWithPrePass=!1,this.useSpecificClearForDepthTexture=!1,this._scene=t,this._ratioOrDimensions=n,this._useUbo=t.getEngine().supportsUniformBuffers,this._depthFormat=i,e._SceneComponentInitialization(this._scene),this._createRenderTargets()}return e.prototype._linkPrePassRenderer=function(e){this._linkedWithPrePass=!0,this._prePassRenderer=e,this._multiRenderTarget&&(this._multiRenderTarget.onClearObservable.clear(),this._multiRenderTarget.onClearObservable.add((function(){})))},e.prototype._unlinkPrePassRenderer=function(){this._linkedWithPrePass=!1,this._createRenderTargets()},e.prototype._resetLayout=function(){this._enablePosition=!1,this._enableReflectivity=!1,this._enableVelocity=!1,this._attachmentsFromPrePass=[]},e.prototype._forceTextureType=function(t,n){t===e.POSITION_TEXTURE_TYPE?(this._positionIndex=n,this._enablePosition=!0):t===e.VELOCITY_TEXTURE_TYPE?(this._velocityIndex=n,this._enableVelocity=!0):t===e.REFLECTIVITY_TEXTURE_TYPE?(this._reflectivityIndex=n,this._enableReflectivity=!0):t===e.DEPTH_TEXTURE_TYPE?this._depthIndex=n:t===e.NORMAL_TEXTURE_TYPE&&(this._normalIndex=n)},e.prototype._setAttachments=function(e){this._attachmentsFromPrePass=e},e.prototype._linkInternalTexture=function(e){this._multiRenderTarget.setInternalTexture(e,0,!1)},Object.defineProperty(e.prototype,"renderList",{get:function(){return this._multiRenderTarget.renderList},set:function(e){this._multiRenderTarget.renderList=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSupported",{get:function(){return this._multiRenderTarget.isSupported},enumerable:!1,configurable:!0}),e.prototype.getTextureIndex=function(t){switch(t){case e.POSITION_TEXTURE_TYPE:return this._positionIndex;case e.VELOCITY_TEXTURE_TYPE:return this._velocityIndex;case e.REFLECTIVITY_TEXTURE_TYPE:return this._reflectivityIndex;case e.DEPTH_TEXTURE_TYPE:return this._linkedWithPrePass?this._depthIndex:0;case e.NORMAL_TEXTURE_TYPE:return this._linkedWithPrePass?this._normalIndex:1;default:return-1}},Object.defineProperty(e.prototype,"enablePosition",{get:function(){return this._enablePosition},set:function(e){this._enablePosition=e,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableVelocity",{get:function(){return this._enableVelocity},set:function(e){this._enableVelocity=e,e||(this._previousTransformationMatrices={}),this._linkedWithPrePass||(this.dispose(),this._createRenderTargets()),this._scene.needsPreviousWorldMatrices=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableReflectivity",{get:function(){return this._enableReflectivity},set:function(e){this._enableReflectivity=e,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ratio",{get:function(){return"object"==typeof this._ratioOrDimensions?1:this._ratioOrDimensions},enumerable:!1,configurable:!0}),e.prototype.isReady=function(e,t){var n=e.getMaterial();if(n&&n.disableDepthWrite)return!1;var i=[],r=[Yn.PositionKind,Yn.NormalKind],o=e.getMesh();if(n){var a=!1;if(n.needAlphaTesting()&&n.getAlphaTestTexture()&&(i.push("#define ALPHATEST"),i.push("#define ALPHATEST_UV".concat(n.getAlphaTestTexture().coordinatesIndex+1)),a=!0),n.bumpTexture&&tl.BumpTextureEnabled&&(i.push("#define BUMP"),i.push("#define BUMP_UV".concat(n.bumpTexture.coordinatesIndex+1)),a=!0),this._enableReflectivity){var s=!1;"PBRMetallicRoughnessMaterial"===n.getClassName()?(null!==n.metallicRoughnessTexture&&(i.push("#define ORMTEXTURE"),i.push("#define REFLECTIVITY_UV".concat(n.metallicRoughnessTexture.coordinatesIndex+1)),i.push("#define METALLICWORKFLOW"),a=!0,s=!0),null!==n.metallic&&(i.push("#define METALLIC"),i.push("#define METALLICWORKFLOW"),s=!0),null!==n.roughness&&(i.push("#define ROUGHNESS"),i.push("#define METALLICWORKFLOW"),s=!0),s&&(null!==n.baseTexture&&(i.push("#define ALBEDOTEXTURE"),i.push("#define ALBEDO_UV".concat(n.baseTexture.coordinatesIndex+1)),n.baseTexture.gammaSpace&&i.push("#define GAMMAALBEDO"),a=!0),null!==n.baseColor&&i.push("#define ALBEDOCOLOR"))):"PBRSpecularGlossinessMaterial"===n.getClassName()?(null!==n.specularGlossinessTexture?(i.push("#define SPECULARGLOSSINESSTEXTURE"),i.push("#define REFLECTIVITY_UV".concat(n.specularGlossinessTexture.coordinatesIndex+1)),a=!0,n.specularGlossinessTexture.gammaSpace&&i.push("#define GAMMAREFLECTIVITYTEXTURE")):null!==n.specularColor&&i.push("#define REFLECTIVITYCOLOR"),null!==n.glossiness&&i.push("#define GLOSSINESS")):"PBRMaterial"===n.getClassName()?(null!==n.metallicTexture&&(i.push("#define ORMTEXTURE"),i.push("#define REFLECTIVITY_UV".concat(n.metallicTexture.coordinatesIndex+1)),i.push("#define METALLICWORKFLOW"),a=!0,s=!0),null!==n.metallic&&(i.push("#define METALLIC"),i.push("#define METALLICWORKFLOW"),s=!0),null!==n.roughness&&(i.push("#define ROUGHNESS"),i.push("#define METALLICWORKFLOW"),s=!0),s?(null!==n.albedoTexture&&(i.push("#define ALBEDOTEXTURE"),i.push("#define ALBEDO_UV".concat(n.albedoTexture.coordinatesIndex+1)),n.albedoTexture.gammaSpace&&i.push("#define GAMMAALBEDO"),a=!0),null!==n.albedoColor&&i.push("#define ALBEDOCOLOR")):(null!==n.reflectivityTexture?(i.push("#define SPECULARGLOSSINESSTEXTURE"),i.push("#define REFLECTIVITY_UV".concat(n.reflectivityTexture.coordinatesIndex+1)),n.reflectivityTexture.gammaSpace&&i.push("#define GAMMAREFLECTIVITYTEXTURE"),a=!0):null!==n.reflectivityColor&&i.push("#define REFLECTIVITYCOLOR"),null!==n.microSurface&&i.push("#define GLOSSINESS"))):"StandardMaterial"===n.getClassName()&&(null!==n.specularTexture&&(i.push("#define REFLECTIVITYTEXTURE"),i.push("#define REFLECTIVITY_UV".concat(n.specularTexture.coordinatesIndex+1)),n.specularTexture.gammaSpace&&i.push("#define GAMMAREFLECTIVITYTEXTURE"),a=!0),null!==n.specularColor&&i.push("#define REFLECTIVITYCOLOR"))}a&&(i.push("#define NEED_UV"),o.isVerticesDataPresent(Yn.UVKind)&&(r.push(Yn.UVKind),i.push("#define UV1")),o.isVerticesDataPresent(Yn.UV2Kind)&&(r.push(Yn.UV2Kind),i.push("#define UV2")))}this._linkedWithPrePass&&(i.push("#define PREPASS"),-1!==this._depthIndex&&(i.push("#define DEPTH_INDEX "+this._depthIndex),i.push("#define PREPASS_DEPTH")),-1!==this._normalIndex&&(i.push("#define NORMAL_INDEX "+this._normalIndex),i.push("#define PREPASS_NORMAL"))),this._enablePosition&&(i.push("#define POSITION"),i.push("#define POSITION_INDEX "+this._positionIndex)),this._enableVelocity&&(i.push("#define VELOCITY"),i.push("#define VELOCITY_INDEX "+this._velocityIndex),-1===this.excludedSkinnedMeshesFromVelocity.indexOf(o)&&i.push("#define BONES_VELOCITY_ENABLED")),this._enableReflectivity&&(i.push("#define REFLECTIVITY"),i.push("#define REFLECTIVITY_INDEX "+this._reflectivityIndex)),this.generateNormalsInWorldSpace&&i.push("#define NORMAL_WORLDSPACE"),o.useBones&&o.computeBonesUsingShaders&&o.skeleton?(r.push(Yn.MatricesIndicesKind),r.push(Yn.MatricesWeightsKind),o.numBoneInfluencers>4&&(r.push(Yn.MatricesIndicesExtraKind),r.push(Yn.MatricesWeightsExtraKind)),i.push("#define NUM_BONE_INFLUENCERS "+o.numBoneInfluencers),i.push("#define BONETEXTURE "+o.skeleton.isUsingTextureForMatrices),i.push("#define BonesPerMesh "+(o.skeleton.bones.length+1))):(i.push("#define NUM_BONE_INFLUENCERS 0"),i.push("#define BONETEXTURE false"),i.push("#define BonesPerMesh 0"));var c=o.morphTargetManager,l=0;c&&c.numInfluencers>0&&(l=c.numInfluencers,i.push("#define MORPHTARGETS"),i.push("#define NUM_MORPH_INFLUENCERS "+l),c.isUsingTextureForTargets&&i.push("#define MORPHTARGETS_TEXTURE"),Xr.PrepareAttributesForMorphTargetsInfluencers(r,o,l)),t&&(i.push("#define INSTANCES"),Xr.PushAttributesForInstances(r,this._enableVelocity),e.getRenderingMesh().hasThinInstances&&i.push("#define THIN_INSTANCES")),this._linkedWithPrePass?i.push("#define RENDER_TARGET_COUNT "+this._attachmentsFromPrePass.length):i.push("#define RENDER_TARGET_COUNT "+this._multiRenderTarget.textures.length),zr(n,this._scene,i);var u=this._scene.getEngine(),h=e._getDrawWrapper(void 0,!0),d=h.defines,p=i.join("\n");return d!==p&&h.setEffect(u.createEffect("geometry",{attributes:r,uniformsNames:hx,samplers:["diffuseSampler","bumpSampler","reflectivitySampler","albedoSampler","morphTargets","boneSampler"],defines:p,onCompiled:null,fallbacks:null,onError:null,uniformBuffersNames:["Scene"],indexParameters:{buffersCount:this._multiRenderTarget.textures.length-1,maxSimultaneousMorphTargets:l}},u),p),h.effect.isReady()},e.prototype.getGBuffer=function(){return this._multiRenderTarget},Object.defineProperty(e.prototype,"samples",{get:function(){return this._multiRenderTarget.samples},set:function(e){this._multiRenderTarget.samples=e},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._resizeObserver&&(this._scene.getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this.getGBuffer().dispose()},e.prototype._assignRenderTargetIndices=function(){var e=[],t=2;return e.push("gBuffer_Depth","gBuffer_Normal"),this._enablePosition&&(this._positionIndex=t,t++,e.push("gBuffer_Position")),this._enableVelocity&&(this._velocityIndex=t,t++,e.push("gBuffer_Velocity")),this._enableReflectivity&&(this._reflectivityIndex=t,t++,e.push("gBuffer_Reflectivity")),[t,e]},e.prototype._createRenderTargets=function(){var e,t=this,n=this._scene.getEngine(),i=(e=this._assignRenderTargetIndices())[0],r=e[1],o=a.TEXTURETYPE_UNSIGNED_BYTE;n._caps.textureFloat&&n._caps.textureFloatLinearFiltering?o=a.TEXTURETYPE_FLOAT:n._caps.textureHalfFloat&&n._caps.textureHalfFloatLinearFiltering&&(o=a.TEXTURETYPE_HALF_FLOAT);var s=void 0!==this._ratioOrDimensions.width?this._ratioOrDimensions:{width:n.getRenderWidth()*this._ratioOrDimensions,height:n.getRenderHeight()*this._ratioOrDimensions};if(this._multiRenderTarget=new cy("gBuffer",s,i,this._scene,{generateMipMaps:!1,generateDepthTexture:!0,defaultType:o,depthTextureFormat:this._depthFormat},r.concat("gBuffer_DepthBuffer")),this.isSupported){this._multiRenderTarget.wrapU=Eo.CLAMP_ADDRESSMODE,this._multiRenderTarget.wrapV=Eo.CLAMP_ADDRESSMODE,this._multiRenderTarget.refreshRate=1,this._multiRenderTarget.renderParticles=!1,this._multiRenderTarget.renderList=null;for(var c=[!0],l=[!1],u=[!0],h=1;h-1){var y=g.getTransformMatrixTexture(n);d.setTexture("boneSampler",y),d.setFloat("boneTextureWidth",4*(g.bones.length+1))}else d.setMatrices("mBones",n.skeleton.getTransformMatrices(n));t._enableVelocity&&d.setMatrices("mPreviousBones",t._previousBonesTransformationMatrices[n.uniqueId])}Xr.BindMorphTargetParameters(n,d),n.morphTargetManager&&n.morphTargetManager.isUsingTextureForTargets&&n.morphTargetManager._bind(d),t._enableVelocity&&(d.setMatrix("previousWorld",t._previousTransformationMatrices[i.uniqueId].world),d.setMatrix("previousViewProjection",t._previousTransformationMatrices[i.uniqueId].viewProjection)),l&&n.hasThinInstances&&d.setMatrix("world",u),n._processRendering(i,e,d,a.fillMode,c,l,(function(e,t){e||d.setMatrix("world",t)}))}t._enableVelocity&&(t._previousTransformationMatrices[i.uniqueId].world=u.clone(),t._previousTransformationMatrices[i.uniqueId].viewProjection=t._scene.getTransformMatrix().clone(),n.skeleton&&t._copyBonesTransformationMatrices(n.skeleton.getTransformMatrices(n),t._previousBonesTransformationMatrices[i.uniqueId]))}}};this._multiRenderTarget.customIsReadyFunction=function(e,i,r){if((r||0===i)&&e.subMeshes)for(var o=0;o0){var n=this._renderEffects[t[0]].getPostProcesses();n&&(n[0].samples=e)}return!0},e.prototype._adaptPostProcessesToViewPort=function(){for(var e=0,t=Object.keys(this._renderEffects);e1){for(var n=0,i=this._cameras;n-1&&(e.depthOfField.depthTexture=t.enableDepthRenderer(t.activeCamera).getDepthMap())}))}else{this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);var o=this._scene.enableDepthRenderer(this._cameras[0]);this.depthOfField.depthTexture=o.getDepthMap()}this.depthOfField._isReady()||this.depthOfField._updateEffects(),this.addEffect(this.depthOfField),this._setAutoClearAndTextureSharing(this.depthOfField._effects[0],!0)}else this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);this.bloomEnabled&&(this.bloom._isReady()||this.bloom._updateEffects(),this.addEffect(this.bloom),this._setAutoClearAndTextureSharing(this.bloom._effects[0],!0)),this._imageProcessingEnabled&&(this.imageProcessing=new ux("imageProcessing",1,null,Eo.BILINEAR_SAMPLINGMODE,t,!1,this._defaultPipelineTextureType,this.scene.imageProcessingConfiguration),this._hdr?(this.addEffect(new YA(t,this.ImageProcessingPostProcessId,(function(){return e.imageProcessing}),!0)),this._setAutoClearAndTextureSharing(this.imageProcessing)):this._scene.imageProcessingConfiguration.applyByPostProcess=!1,this._cameras&&0!==this._cameras.length||(this._scene.imageProcessingConfiguration.applyByPostProcess=!1),this.imageProcessing.getEffect()||this.imageProcessing._updateParameters()),this.sharpenEnabled&&(this.sharpen.isReady()||this.sharpen.updateEffect(),this.addEffect(this._sharpenEffect),this._setAutoClearAndTextureSharing(this.sharpen)),this.grainEnabled&&(this.grain.isReady()||this.grain.updateEffect(),this.addEffect(this._grainEffect),this._setAutoClearAndTextureSharing(this.grain)),this.chromaticAberrationEnabled&&(this.chromaticAberration.isReady()||this.chromaticAberration.updateEffect(),this.addEffect(this._chromaticAberrationEffect),this._setAutoClearAndTextureSharing(this.chromaticAberration)),this.fxaaEnabled&&(this.fxaa=new sx("fxaa",1,null,Eo.BILINEAR_SAMPLINGMODE,t,!1,this._defaultPipelineTextureType),this.addEffect(new YA(t,this.FxaaPostProcessId,(function(){return e.fxaa}),!0)),this._setAutoClearAndTextureSharing(this.fxaa,!0)),null!==this._cameras&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),(this._scene.activeCameras&&this._scene.activeCameras.length>1||this._scene.activeCamera&&-1===this._cameras.indexOf(this._scene.activeCamera))&&(this._scene.autoClear=!0),this._activeCameraChangedObserver||(this._activeCameraChangedObserver=this._scene.onActiveCameraChanged.add((function(){e._scene.activeCamera&&-1===e._cameras.indexOf(e._scene.activeCamera)&&(e._scene.autoClear=!0)}))),this._activeCamerasChangedObserver||(this._activeCamerasChangedObserver=this._scene.onActiveCamerasChanged.add((function(){e._scene.activeCameras&&e._scene.activeCameras.length>1&&(e._scene.autoClear=!0)}))),this._adaptPostProcessesToViewPort(),!this._enableMSAAOnFirstPostProcess(this.samples)&&this.samples>1&&J.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0"),this.onBuildObservable.notifyObservers(this)}},t.prototype._disposePostProcesses=function(e){void 0===e&&(e=!1);for(var t=0;t1e-2 ? rvec : vec3(-rvec.y,0.0,rvec.x);vec3 tangent=normalize(rvec-normal*dot(rvec,normal));vec3 bitangent=cross(normal,tangent);mat3 tbn=mat3(tangent,bitangent,normal);float difference;for (int i=0; i1.0 || offset.y>1.0) {continue;}\nfloat sampleDepth=abs(textureLod(depthSampler,offset.xy,0.0).r);difference=depthSign*samplePosition.z-sampleDepth;float rangeCheck=1.0-smoothstep(correctedRadius*0.5,correctedRadius,difference);occlusion+=step(EPSILON,difference)*rangeCheck;}\nocclusion=occlusion*(1.0-smoothstep(maxZ*0.75,maxZ,depth));float ao=1.0-totalStrength*occlusion*samplesFactor;float result=clamp(ao+base,0.0,1.0);gl_FragColor=vec4(vec3(result),1.0);}\n#endif\n#ifdef BLUR\nuniform float outSize;uniform float soften;uniform float tolerance;uniform int samples;\n#ifndef BLUR_BYPASS\nuniform sampler2D depthSampler;\n#ifdef BLUR_LEGACY\n#define inline\nfloat blur13Bilateral(sampler2D image,vec2 uv,vec2 step) {float result=0.0;vec2 off1=vec2(1.411764705882353)*step;vec2 off2=vec2(3.2941176470588234)*step;vec2 off3=vec2(5.176470588235294)*step;float compareDepth=abs(textureLod(depthSampler,uv,0.0).r);float sampleDepth;float weight;float weightSum=30.0;result+=textureLod(image,uv,0.0).r*30.0;sampleDepth=abs(textureLod(depthSampler,uv+off1,0.0).r);weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);weightSum+= weight;result+=textureLod(image,uv+off1,0.0).r*weight;sampleDepth=abs(textureLod(depthSampler,uv-off1,0.0).r);weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);weightSum+= weight;result+=textureLod(image,uv-off1,0.0).r*weight;sampleDepth=abs(textureLod(depthSampler,uv+off2,0.0).r);weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);weightSum+=weight;result+=textureLod(image,uv+off2,0.0).r*weight;sampleDepth=abs(textureLod(depthSampler,uv-off2,0.0).r);weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);weightSum+=weight;result+=textureLod(image,uv-off2,0.0).r*weight;sampleDepth=abs(textureLod(depthSampler,uv+off3,0.0).r);weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);weightSum+=weight;result+=textureLod(image,uv+off3,0.0).r*weight;sampleDepth=abs(textureLod(depthSampler,uv-off3,0.0).r);weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);weightSum+=weight;result+=textureLod(image,uv-off3,0.0).r*weight;return result/weightSum;}\n#endif\n#endif\nvoid main()\n{float result=0.0;\n#ifdef BLUR_BYPASS\nresult=textureLod(textureSampler,vUV,0.0).r;\n#else\n#ifdef BLUR_H\nvec2 step=vec2(1.0/outSize,0.0);\n#else\nvec2 step=vec2(0.0,1.0/outSize);\n#endif\n#ifdef BLUR_LEGACY\nresult=blur13Bilateral(textureSampler,vUV,step);\n#else\nfloat compareDepth=abs(textureLod(depthSampler,vUV,0.0).r);float weightSum=0.0;for (int i=-samples; i0?t:n),e.setInt("samples",s.bilateralSamples),e.setFloat("soften",s.bilateralSoften),e.setFloat("tolerance",s.bilateralTolerance),s._geometryBufferRenderer?e.setTexture("depthSampler",s._geometryBufferRenderer.getGBuffer().textures[0]):s._prePassRenderer&&e.setTexture("depthSampler",s._prePassRenderer.getRenderTarget().textures[s._prePassRenderer.getIndex(a.PREPASS_DEPTH_TEXTURE_TYPE)])}},c.samples=this.textureSamples,c},t.prototype._radicalInverse_VdC=function(e){return this._bits[0]=e,this._bits[0]=(this._bits[0]<<16|this._bits[0]>>16)>>>0,this._bits[0]=(1431655765&this._bits[0])<<1|(2863311530&this._bits[0])>>>1>>>0,this._bits[0]=(858993459&this._bits[0])<<2|(3435973836&this._bits[0])>>>2>>>0,this._bits[0]=(252645135&this._bits[0])<<4|(4042322160&this._bits[0])>>>4>>>0,this._bits[0]=(16711935&this._bits[0])<<8|(4278255360&this._bits[0])>>>8>>>0,2.3283064365386963e-10*this._bits[0]},t.prototype._hammersley=function(e,t){return[e/t,this._radicalInverse_VdC(e)]},t.prototype._hemisphereSample_uniform=function(e,t){var n=2*t*Math.PI,i=1-.85*e,r=Math.sqrt(1-i*i);return new C(Math.cos(n)*r,Math.sin(n)*r,i)},t.prototype._generateHemisphere=function(){for(var e,t=this.samples,n=[],i=0;i0.0)\nhitCoord-=dir;else\nhitCoord+=dir;info.color+=texture2D(textureSampler,projectedCoord.xy).rgb;}\nprojectedCoord=projection*vec4(hitCoord,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=0.5*projectedCoord.xy+vec2(0.5);info.coords=vec4(projectedCoord.xy,sampledDepth,1.0);info.color+=texture2D(textureSampler,projectedCoord.xy).rgb;info.color/=float(SMOOTH_STEPS+1);return info;}\n/**\n* Tests the given world position (hitCoord) according to the given reflection vector (dir)\n* until it finds a collision (means that depth is enough close to say \"it's the pixel to sample!\").\n*/\nReflectionInfo getReflectionInfo(vec3 dir,vec3 hitCoord)\n{ReflectionInfo info;vec4 projectedCoord;float sampledDepth;dir*=stepSize;for(int i=0; i>0)),e.push("#define SMOOTH_STEPS "+(this._smoothSteps>>0)),this.updateEffect(e.join("\n"))},t._Parse=function(e,n,i,r){return ke.Parse((function(){return new t(e.name,i,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.textureType,e.reusable)}),e,i,r)},W([Se()],t.prototype,"threshold",void 0),W([Se()],t.prototype,"strength",void 0),W([Se()],t.prototype,"reflectionSpecularFalloffExponent",void 0),W([Se()],t.prototype,"step",void 0),W([Se()],t.prototype,"roughnessFactor",void 0),W([Se()],t.prototype,"enableSmoothReflections",null),W([Se()],t.prototype,"reflectionSamples",null),W([Se()],t.prototype,"smoothSteps",null),t}(Da);b("BABYLON.ScreenSpaceReflectionPostProcess",Px),Vt.ShadersStore.standardPixelShader="uniform sampler2D textureSampler;varying vec2 vUV;\n#define CUSTOM_FRAGMENT_DEFINITIONS\n#if defined(PASS_POST_PROCESS)\nvoid main(void)\n{vec4 color=texture2D(textureSampler,vUV);gl_FragColor=color;}\n#endif\n#if defined(DOWN_SAMPLE_X4)\nuniform vec2 dsOffsets[16];void main(void)\n{vec4 average=vec4(0.0,0.0,0.0,0.0);average=texture2D(textureSampler,vUV+dsOffsets[0]);average+=texture2D(textureSampler,vUV+dsOffsets[1]);average+=texture2D(textureSampler,vUV+dsOffsets[2]);average+=texture2D(textureSampler,vUV+dsOffsets[3]);average+=texture2D(textureSampler,vUV+dsOffsets[4]);average+=texture2D(textureSampler,vUV+dsOffsets[5]);average+=texture2D(textureSampler,vUV+dsOffsets[6]);average+=texture2D(textureSampler,vUV+dsOffsets[7]);average+=texture2D(textureSampler,vUV+dsOffsets[8]);average+=texture2D(textureSampler,vUV+dsOffsets[9]);average+=texture2D(textureSampler,vUV+dsOffsets[10]);average+=texture2D(textureSampler,vUV+dsOffsets[11]);average+=texture2D(textureSampler,vUV+dsOffsets[12]);average+=texture2D(textureSampler,vUV+dsOffsets[13]);average+=texture2D(textureSampler,vUV+dsOffsets[14]);average+=texture2D(textureSampler,vUV+dsOffsets[15]);average/=16.0;gl_FragColor=average;}\n#endif\n#if defined(BRIGHT_PASS)\nuniform vec2 dsOffsets[4];uniform float brightThreshold;void main(void)\n{vec4 average=vec4(0.0,0.0,0.0,0.0);average=texture2D(textureSampler,vUV+vec2(dsOffsets[0].x,dsOffsets[0].y));average+=texture2D(textureSampler,vUV+vec2(dsOffsets[1].x,dsOffsets[1].y));average+=texture2D(textureSampler,vUV+vec2(dsOffsets[2].x,dsOffsets[2].y));average+=texture2D(textureSampler,vUV+vec2(dsOffsets[3].x,dsOffsets[3].y));average*=0.25;float luminance=length(average.rgb);if (luminanceshadowPixelDepth)\naccumFog+=sunColor*computeScattering(dot(rayDirection,sunDirection));currentPosition+=stepL;}\naccumFog/=NB_STEPS;vec3 color=accumFog*scatteringPower;gl_FragColor=vec4(color*exp(color) ,1.0);}\n#endif\n#if defined(VLSMERGE)\nuniform sampler2D originalSampler;void main(void)\n{gl_FragColor=texture2D(originalSampler,vUV)+texture2D(textureSampler,vUV);}\n#endif\n#if defined(LUMINANCE)\nuniform vec2 lumOffsets[4];void main()\n{float average=0.0;vec4 color=vec4(0.0);float maximum=-1e20;vec3 weight=vec3(0.299,0.587,0.114);for (int i=0; i<4; i++)\n{color=texture2D(textureSampler,vUV+ lumOffsets[i]);float GreyValue=dot(color.rgb,vec3(0.33,0.33,0.33));\n#ifdef WEIGHTED_AVERAGE\nfloat GreyValue=dot(color.rgb,weight);\n#endif\n#ifdef BRIGHTNESS\nfloat GreyValue=max(color.r,max(color.g,color.b));\n#endif\n#ifdef HSL_COMPONENT\nfloat GreyValue=0.5*(max(color.r,max(color.g,color.b))+min(color.r,min(color.g,color.b)));\n#endif\n#ifdef MAGNITUDE\nfloat GreyValue=length(color.rgb);\n#endif\nmaximum=max(maximum,GreyValue);average+=(0.25*log(1e-5+GreyValue));}\naverage=exp(average);gl_FragColor=vec4(average,maximum,0.0,1.0);}\n#endif\n#if defined(LUMINANCE_DOWN_SAMPLE)\nuniform vec2 dsOffsets[9];uniform float halfDestPixelSize;\n#ifdef FINAL_DOWN_SAMPLER\n#include\n#endif\nvoid main()\n{vec4 color=vec4(0.0);float average=0.0;for (int i=0; i<9; i++)\n{color=texture2D(textureSampler,vUV+vec2(halfDestPixelSize,halfDestPixelSize)+dsOffsets[i]);average+=color.r;}\naverage/=9.0;\n#ifdef FINAL_DOWN_SAMPLER\ngl_FragColor=pack(average);\n#else\ngl_FragColor=vec4(average,average,0.0,1.0);\n#endif\n}\n#endif\n#if defined(HDR)\nuniform sampler2D textureAdderSampler;uniform float averageLuminance;void main()\n{vec4 color=texture2D(textureAdderSampler,vUV);\n#ifndef AUTO_EXPOSURE\nvec4 adjustedColor=color/averageLuminance;color=adjustedColor;color.a=1.0;\n#endif\ngl_FragColor=color;}\n#endif\n#if defined(LENS_FLARE)\n#define GHOSTS 3\nuniform sampler2D lensColorSampler;uniform float strength;uniform float ghostDispersal;uniform float haloWidth;uniform vec2 resolution;uniform float distortionStrength;float hash(vec2 p)\n{float h=dot(p,vec2(127.1,311.7));return -1.0+2.0*fract(sin(h)*43758.5453123);}\nfloat noise(in vec2 p)\n{vec2 i=floor(p);vec2 f=fract(p);vec2 u=f*f*(3.0-2.0*f);return mix(mix(hash(i+vec2(0.0,0.0)),\nhash(i+vec2(1.0,0.0)),u.x),\nmix(hash(i+vec2(0.0,1.0)),\nhash(i+vec2(1.0,1.0)),u.x),u.y);}\nfloat fbm(vec2 p)\n{float f=0.0;f+=0.5000*noise(p); p*=2.02;f+=0.2500*noise(p); p*=2.03;f+=0.1250*noise(p); p*=2.01;f+=0.0625*noise(p); p*=2.04;f/=0.9375;return f;}\nvec3 pattern(vec2 uv)\n{vec2 p=-1.0+2.0*uv;float p2=dot(p,p);float f=fbm(vec2(15.0*p2))/2.0;float r=0.2+0.6*sin(12.5*length(uv-vec2(0.5)));float g=0.2+0.6*sin(20.5*length(uv-vec2(0.5)));float b=0.2+0.6*sin(17.2*length(uv-vec2(0.5)));return (1.0-f)*vec3(r,g,b);}\nfloat luminance(vec3 color)\n{return dot(color.rgb,vec3(0.2126,0.7152,0.0722));}\nvec4 textureDistorted(sampler2D tex,vec2 texcoord,vec2 direction,vec3 distortion)\n{return vec4(\ntexture2D(tex,texcoord+direction*distortion.r).r,\ntexture2D(tex,texcoord+direction*distortion.g).g,\ntexture2D(tex,texcoord+direction*distortion.b).b,\n1.0\n);}\nvoid main(void)\n{vec2 uv=-vUV+vec2(1.0);vec2 ghostDir=(vec2(0.5)-uv)*ghostDispersal;vec2 texelSize=1.0/resolution;vec3 distortion=vec3(-texelSize.x*distortionStrength,0.0,texelSize.x*distortionStrength);vec4 result=vec4(0.0);float ghostIndice=1.0;for (int i=0; i=nSamples)\nbreak;vec2 offset1=vUV+velocity*(float(i)/float(nSamples-1)-0.5);result+=texture2D(textureSampler,offset1);}\ngl_FragColor=result/float(nSamples);}\n#endif\n";var Ix=function(e){function t(t,n,i,r,o){void 0===r&&(r=null);var s=e.call(this,n.getEngine(),t)||this;return s.downSampleX4PostProcess=null,s.brightPassPostProcess=null,s.blurHPostProcesses=[],s.blurVPostProcesses=[],s.textureAdderPostProcess=null,s.volumetricLightPostProcess=null,s.volumetricLightSmoothXPostProcess=null,s.volumetricLightSmoothYPostProcess=null,s.volumetricLightMergePostProces=null,s.volumetricLightFinalPostProcess=null,s.luminancePostProcess=null,s.luminanceDownSamplePostProcesses=[],s.hdrPostProcess=null,s.textureAdderFinalPostProcess=null,s.lensFlareFinalPostProcess=null,s.hdrFinalPostProcess=null,s.lensFlarePostProcess=null,s.lensFlareComposePostProcess=null,s.motionBlurPostProcess=null,s.depthOfFieldPostProcess=null,s.fxaaPostProcess=null,s.screenSpaceReflectionPostProcess=null,s.brightThreshold=1,s.blurWidth=512,s.horizontalBlur=!1,s.lensTexture=null,s.volumetricLightCoefficient=.2,s.volumetricLightPower=4,s.volumetricLightBlurScale=64,s.sourceLight=null,s.hdrMinimumLuminance=1,s.hdrDecreaseRate=.5,s.hdrIncreaseRate=.5,s.lensColorTexture=null,s.lensFlareStrength=20,s.lensFlareGhostDispersal=1.4,s.lensFlareHaloWidth=.7,s.lensFlareDistortionStrength=16,s.lensFlareBlurWidth=512,s.lensStarTexture=null,s.lensFlareDirtTexture=null,s.depthOfFieldDistance=10,s.depthOfFieldBlurWidth=64,s.animations=[],s._currentDepthOfFieldSource=null,s._fixedExposure=1,s._currentExposure=1,s._hdrAutoExposure=!1,s._hdrCurrentLuminance=1,s._motionStrength=1,s._isObjectBasedMotionBlur=!1,s._camerasToBeAttached=[],s._bloomEnabled=!1,s._depthOfFieldEnabled=!1,s._vlsEnabled=!1,s._lensFlareEnabled=!1,s._hdrEnabled=!1,s._motionBlurEnabled=!1,s._fxaaEnabled=!1,s._screenSpaceReflectionsEnabled=!1,s._motionBlurSamples=64,s._volumetricLightStepsCount=50,s._samples=1,s._cameras=o||n.cameras,s._cameras=s._cameras.slice(),s._camerasToBeAttached=s._cameras.slice(),s._scene=n,s._basePostProcess=r,s._ratio=i,s._floatTextureType=n.getEngine().getCaps().textureFloatRender?a.TEXTURETYPE_FLOAT:a.TEXTURETYPE_HALF_FLOAT,n.postProcessRenderPipelineManager.addPipeline(s),s._buildPipeline(),s}return H(t,e),Object.defineProperty(t.prototype,"exposure",{get:function(){return this._fixedExposure},set:function(e){this._fixedExposure=e,this._currentExposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hdrAutoExposure",{get:function(){return this._hdrAutoExposure},set:function(e){if(this._hdrAutoExposure=e,this.hdrPostProcess){var t=["#define HDR"];e&&t.push("#define AUTO_EXPOSURE"),this.hdrPostProcess.updateEffect(t.join("\n"))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"motionStrength",{get:function(){return this._motionStrength},set:function(e){this._motionStrength=e,this._isObjectBasedMotionBlur&&this.motionBlurPostProcess&&(this.motionBlurPostProcess.motionStrength=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"objectBasedMotionBlur",{get:function(){return this._isObjectBasedMotionBlur},set:function(e){var t=this._isObjectBasedMotionBlur!==e;this._isObjectBasedMotionBlur=e,t&&this._buildPipeline()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BloomEnabled",{get:function(){return this._bloomEnabled},set:function(e){this._bloomEnabled!==e&&(this._bloomEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DepthOfFieldEnabled",{get:function(){return this._depthOfFieldEnabled},set:function(e){this._depthOfFieldEnabled!==e&&(this._depthOfFieldEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"LensFlareEnabled",{get:function(){return this._lensFlareEnabled},set:function(e){this._lensFlareEnabled!==e&&(this._lensFlareEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HDREnabled",{get:function(){return this._hdrEnabled},set:function(e){this._hdrEnabled!==e&&(this._hdrEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VLSEnabled",{get:function(){return this._vlsEnabled},set:function(e){if(this._vlsEnabled!==e){if(e&&!this._scene.enableGeometryBufferRenderer())return void J.Warn("Geometry renderer is not supported, cannot create volumetric lights in Standard Rendering Pipeline");this._vlsEnabled=e,this._buildPipeline()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"MotionBlurEnabled",{get:function(){return this._motionBlurEnabled},set:function(e){this._motionBlurEnabled!==e&&(this._motionBlurEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fxaaEnabled",{get:function(){return this._fxaaEnabled},set:function(e){this._fxaaEnabled!==e&&(this._fxaaEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screenSpaceReflectionsEnabled",{get:function(){return this._screenSpaceReflectionsEnabled},set:function(e){this._screenSpaceReflectionsEnabled!==e&&(this._screenSpaceReflectionsEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volumetricLightStepsCount",{get:function(){return this._volumetricLightStepsCount},set:function(e){this.volumetricLightPostProcess&&this.volumetricLightPostProcess.updateEffect("#define VLS\n#define NB_STEPS "+e.toFixed(1)),this._volumetricLightStepsCount=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"motionBlurSamples",{get:function(){return this._motionBlurSamples},set:function(e){this.motionBlurPostProcess&&(this._isObjectBasedMotionBlur?this.motionBlurPostProcess.motionBlurSamples=e:this.motionBlurPostProcess.updateEffect("#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES "+e.toFixed(1))),this._motionBlurSamples=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=e,this._buildPipeline())},enumerable:!1,configurable:!0}),t.prototype._buildPipeline=function(){var e=this,t=this._ratio,n=this._scene;this._disposePostProcesses(),null!==this._cameras&&(this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),this._cameras=this._camerasToBeAttached.slice()),this._reset(),this._screenSpaceReflectionsEnabled&&(this.screenSpaceReflectionPostProcess=new Px("HDRPass",n,t,null,Eo.BILINEAR_SAMPLINGMODE,n.getEngine(),!1,this._floatTextureType),this.screenSpaceReflectionPostProcess.onApplyObservable.add((function(){e._currentDepthOfFieldSource=e.screenSpaceReflectionPostProcess})),this.addEffect(new YA(n.getEngine(),"HDRScreenSpaceReflections",(function(){return e.screenSpaceReflectionPostProcess}),!0))),this._basePostProcess?this.originalPostProcess=this._basePostProcess:this.originalPostProcess=new Da("HDRPass","standard",[],[],t,null,Eo.BILINEAR_SAMPLINGMODE,n.getEngine(),!1,"#define PASS_POST_PROCESS",this._floatTextureType),this.originalPostProcess.autoClear=!this.screenSpaceReflectionPostProcess,this.originalPostProcess.onApplyObservable.add((function(){e._currentDepthOfFieldSource=e.originalPostProcess})),this.addEffect(new YA(n.getEngine(),"HDRPassPostProcess",(function(){return e.originalPostProcess}),!0)),this._bloomEnabled&&(this._createDownSampleX4PostProcess(n,t/4),this._createBrightPassPostProcess(n,t/4),this._createBlurPostProcesses(n,t/4,1),this._createTextureAdderPostProcess(n,t),this.textureAdderFinalPostProcess=new Da("HDRDepthOfFieldSource","standard",[],[],t,null,Eo.BILINEAR_SAMPLINGMODE,n.getEngine(),!1,"#define PASS_POST_PROCESS",a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new YA(n.getEngine(),"HDRBaseDepthOfFieldSource",(function(){return e.textureAdderFinalPostProcess}),!0))),this._vlsEnabled&&(this._createVolumetricLightPostProcess(n,t),this.volumetricLightFinalPostProcess=new Da("HDRVLSFinal","standard",[],[],t,null,Eo.BILINEAR_SAMPLINGMODE,n.getEngine(),!1,"#define PASS_POST_PROCESS",a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new YA(n.getEngine(),"HDRVLSFinal",(function(){return e.volumetricLightFinalPostProcess}),!0))),this._lensFlareEnabled&&(this._createLensFlarePostProcess(n,t),this.lensFlareFinalPostProcess=new Da("HDRPostLensFlareDepthOfFieldSource","standard",[],[],t,null,Eo.BILINEAR_SAMPLINGMODE,n.getEngine(),!1,"#define PASS_POST_PROCESS",a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new YA(n.getEngine(),"HDRPostLensFlareDepthOfFieldSource",(function(){return e.lensFlareFinalPostProcess}),!0))),this._hdrEnabled&&(this._createLuminancePostProcesses(n,this._floatTextureType),this._createHdrPostProcess(n,t),this.hdrFinalPostProcess=new Da("HDRPostHDReDepthOfFieldSource","standard",[],[],t,null,Eo.BILINEAR_SAMPLINGMODE,n.getEngine(),!1,"#define PASS_POST_PROCESS",a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new YA(n.getEngine(),"HDRPostHDReDepthOfFieldSource",(function(){return e.hdrFinalPostProcess}),!0))),this._depthOfFieldEnabled&&(this._createBlurPostProcesses(n,t/2,3,"depthOfFieldBlurWidth"),this._createDepthOfFieldPostProcess(n,t)),this._motionBlurEnabled&&this._createMotionBlurPostProcess(n,t),this._fxaaEnabled&&(this.fxaaPostProcess=new sx("fxaa",1,null,Eo.BILINEAR_SAMPLINGMODE,n.getEngine(),!1,a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new YA(n.getEngine(),"HDRFxaa",(function(){return e.fxaaPostProcess}),!0))),null!==this._cameras&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),!this._enableMSAAOnFirstPostProcess(this._samples)&&this._samples>1&&J.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0")},t.prototype._createDownSampleX4PostProcess=function(e,t){var n=this,i=new Array(32);this.downSampleX4PostProcess=new Da("HDRDownSampleX4","standard",["dsOffsets"],[],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define DOWN_SAMPLE_X4",this._floatTextureType),this.downSampleX4PostProcess.onApply=function(e){for(var t=0,r=n.downSampleX4PostProcess.width,o=n.downSampleX4PostProcess.height,a=-2;a<2;a++)for(var s=-2;s<2;s++)i[t]=(a+.5)*(1/r),i[t+1]=(s+.5)*(1/o),t+=2;e.setArray2("dsOffsets",i)},this.addEffect(new YA(e.getEngine(),"HDRDownSampleX4",(function(){return n.downSampleX4PostProcess}),!0))},t.prototype._createBrightPassPostProcess=function(e,t){var n=this,i=new Array(8);this.brightPassPostProcess=new Da("HDRBrightPass","standard",["dsOffsets","brightThreshold"],[],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define BRIGHT_PASS",this._floatTextureType),this.brightPassPostProcess.onApply=function(e){var t=1/n.brightPassPostProcess.width,r=1/n.brightPassPostProcess.height;i[0]=-.5*t,i[1]=.5*r,i[2]=.5*t,i[3]=.5*r,i[4]=-.5*t,i[5]=-.5*r,i[6]=.5*t,i[7]=-.5*r,e.setArray2("dsOffsets",i),e.setFloat("brightThreshold",n.brightThreshold)},this.addEffect(new YA(e.getEngine(),"HDRBrightPass",(function(){return n.brightPassPostProcess}),!0))},t.prototype._createBlurPostProcesses=function(e,t,n,i){var r=this;void 0===i&&(i="blurWidth");var o=e.getEngine(),a=new sm("HDRBlurH_"+n,new S(1,0),this[i],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,this._floatTextureType),s=new sm("HDRBlurV_"+n,new S(0,1),this[i],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,this._floatTextureType);a.onActivateObservable.add((function(){var e=a.width/o.getRenderWidth();a.kernel=r[i]*e})),s.onActivateObservable.add((function(){var e=s.height/o.getRenderHeight();s.kernel=r.horizontalBlur?64*e:r[i]*e})),this.addEffect(new YA(e.getEngine(),"HDRBlurH"+n,(function(){return a}),!0)),this.addEffect(new YA(e.getEngine(),"HDRBlurV"+n,(function(){return s}),!0)),this.blurHPostProcesses.push(a),this.blurVPostProcesses.push(s)},t.prototype._createTextureAdderPostProcess=function(e,t){var n=this;this.textureAdderPostProcess=new Da("HDRTextureAdder","standard",["exposure"],["otherSampler","lensSampler"],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define TEXTURE_ADDER",this._floatTextureType),this.textureAdderPostProcess.onApply=function(e){e.setTextureFromPostProcess("otherSampler",n._vlsEnabled?n._currentDepthOfFieldSource:n.originalPostProcess),e.setTexture("lensSampler",n.lensTexture),e.setFloat("exposure",n._currentExposure),n._currentDepthOfFieldSource=n.textureAdderFinalPostProcess},this.addEffect(new YA(e.getEngine(),"HDRTextureAdder",(function(){return n.textureAdderPostProcess}),!0))},t.prototype._createVolumetricLightPostProcess=function(e,t){var n=this,i=e.enableGeometryBufferRenderer();i.enablePosition=!0;var r=i.getGBuffer();this.volumetricLightPostProcess=new Da("HDRVLS","standard",["shadowViewProjection","cameraPosition","sunDirection","sunColor","scatteringCoefficient","scatteringPower","depthValues"],["shadowMapSampler","positionSampler"],t/8,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define VLS\n#define NB_STEPS "+this._volumetricLightStepsCount.toFixed(1));var o=S.Zero();this.volumetricLightPostProcess.onApply=function(e){if(n.sourceLight&&n.sourceLight.getShadowGenerator()&&n._scene.activeCamera){var t=n.sourceLight.getShadowGenerator();e.setTexture("shadowMapSampler",t.getShadowMap()),e.setTexture("positionSampler",r.textures[2]),e.setColor3("sunColor",n.sourceLight.diffuse),e.setVector3("sunDirection",n.sourceLight.getShadowDirection()),e.setVector3("cameraPosition",n._scene.activeCamera.globalPosition),e.setMatrix("shadowViewProjection",t.getTransformMatrix()),e.setFloat("scatteringCoefficient",n.volumetricLightCoefficient),e.setFloat("scatteringPower",n.volumetricLightPower),o.x=n.sourceLight.getDepthMinZ(n._scene.activeCamera),o.y=n.sourceLight.getDepthMaxZ(n._scene.activeCamera),e.setVector2("depthValues",o)}},this.addEffect(new YA(e.getEngine(),"HDRVLS",(function(){return n.volumetricLightPostProcess}),!0)),this._createBlurPostProcesses(e,t/4,0,"volumetricLightBlurScale"),this.volumetricLightMergePostProces=new Da("HDRVLSMerge","standard",[],["originalSampler"],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define VLSMERGE"),this.volumetricLightMergePostProces.onApply=function(e){e.setTextureFromPostProcess("originalSampler",n._bloomEnabled?n.textureAdderFinalPostProcess:n.originalPostProcess),n._currentDepthOfFieldSource=n.volumetricLightFinalPostProcess},this.addEffect(new YA(e.getEngine(),"HDRVLSMerge",(function(){return n.volumetricLightMergePostProces}),!0))},t.prototype._createLuminancePostProcesses=function(e,n){var i=this,r=Math.pow(3,t.LuminanceSteps);this.luminancePostProcess=new Da("HDRLuminance","standard",["lumOffsets"],[],{width:r,height:r},null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LUMINANCE",n);var o=[];this.luminancePostProcess.onApply=function(e){var t=1/i.luminancePostProcess.width,n=1/i.luminancePostProcess.height;o[0]=-.5*t,o[1]=.5*n,o[2]=.5*t,o[3]=.5*n,o[4]=-.5*t,o[5]=-.5*n,o[6]=.5*t,o[7]=-.5*n,e.setArray2("lumOffsets",o)},this.addEffect(new YA(e.getEngine(),"HDRLuminance",(function(){return i.luminancePostProcess}),!0));for(var a=t.LuminanceSteps-1;a>=0;a--){r=Math.pow(3,a);var s="#define LUMINANCE_DOWN_SAMPLE\n";0===a&&(s+="#define FINAL_DOWN_SAMPLER");var c=new Da("HDRLuminanceDownSample"+a,"standard",["dsOffsets","halfDestPixelSize"],[],{width:r,height:r},null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,s,n);this.luminanceDownSamplePostProcesses.push(c)}var l=this.luminancePostProcess;this.luminanceDownSamplePostProcesses.forEach((function(t,n){var r=new Array(18);t.onApply=function(e){if(l){for(var o=0,a=-1;a<2;a++)for(var s=-1;s<2;s++)r[o]=a/l.width,r[o+1]=s/l.height,o+=2;e.setArray2("dsOffsets",r),e.setFloat("halfDestPixelSize",.5/l.width),l=n===i.luminanceDownSamplePostProcesses.length-1?i.luminancePostProcess:t}},n===i.luminanceDownSamplePostProcesses.length-1&&(t.onAfterRender=function(){var t=e.getEngine().readPixels(0,0,1,1),n=new P(1/16581375,1/65025,1/255,1);t.then((function(e){var t=new Uint8Array(e.buffer);i._hdrCurrentLuminance=(t[0]*n.x+t[1]*n.y+t[2]*n.z+t[3]*n.w)/100}))}),i.addEffect(new YA(e.getEngine(),"HDRLuminanceDownSample"+n,(function(){return t}),!0))}))},t.prototype._createHdrPostProcess=function(e,t){var n=this,i=["#define HDR"];this._hdrAutoExposure&&i.push("#define AUTO_EXPOSURE"),this.hdrPostProcess=new Da("HDR","standard",["averageLuminance"],["textureAdderSampler"],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,i.join("\n"),a.TEXTURETYPE_UNSIGNED_INT);var r=1,o=0,s=0;this.hdrPostProcess.onApply=function(t){if(t.setTextureFromPostProcess("textureAdderSampler",n._currentDepthOfFieldSource),o+=e.getEngine().getDeltaTime(),r<0)r=n._hdrCurrentLuminance;else{var i=(s-o)/1e3;n._hdrCurrentLuminancer-n.hdrIncreaseRate*i?r-=n.hdrIncreaseRate*i:r=n._hdrCurrentLuminance}n.hdrAutoExposure?n._currentExposure=n._fixedExposure/r:(r=h.Clamp(r,n.hdrMinimumLuminance,1e20),t.setFloat("averageLuminance",r)),s=o,n._currentDepthOfFieldSource=n.hdrFinalPostProcess},this.addEffect(new YA(e.getEngine(),"HDR",(function(){return n.hdrPostProcess}),!0))},t.prototype._createLensFlarePostProcess=function(e,t){var n=this;this.lensFlarePostProcess=new Da("HDRLensFlare","standard",["strength","ghostDispersal","haloWidth","resolution","distortionStrength"],["lensColorSampler"],t/2,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LENS_FLARE",a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new YA(e.getEngine(),"HDRLensFlare",(function(){return n.lensFlarePostProcess}),!0)),this._createBlurPostProcesses(e,t/4,2,"lensFlareBlurWidth"),this.lensFlareComposePostProcess=new Da("HDRLensFlareCompose","standard",["lensStarMatrix"],["otherSampler","lensDirtSampler","lensStarSampler"],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LENS_FLARE_COMPOSE",a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new YA(e.getEngine(),"HDRLensFlareCompose",(function(){return n.lensFlareComposePostProcess}),!0));var i=new S(0,0);this.lensFlarePostProcess.externalTextureSamplerBinding=!0,this.lensFlarePostProcess.onApply=function(e){e.setTextureFromPostProcess("textureSampler",n._bloomEnabled?n.blurHPostProcesses[0]:n.originalPostProcess),e.setTexture("lensColorSampler",n.lensColorTexture),e.setFloat("strength",n.lensFlareStrength),e.setFloat("ghostDispersal",n.lensFlareGhostDispersal),e.setFloat("haloWidth",n.lensFlareHaloWidth),i.x=n.lensFlarePostProcess.width,i.y=n.lensFlarePostProcess.height,e.setVector2("resolution",i),e.setFloat("distortionStrength",n.lensFlareDistortionStrength)};var r=R.FromValues(2,0,-1,0,0,2,-1,0,0,0,1,0,0,0,0,1),o=R.FromValues(.5,0,.5,0,0,.5,.5,0,0,0,1,0,0,0,0,1);this.lensFlareComposePostProcess.onApply=function(e){if(n._scene.activeCamera){e.setTextureFromPostProcess("otherSampler",n.lensFlarePostProcess),e.setTexture("lensDirtSampler",n.lensFlareDirtTexture),e.setTexture("lensStarSampler",n.lensStarTexture);var t=n._scene.activeCamera.getViewMatrix().getRow(0),i=n._scene.activeCamera.getViewMatrix().getRow(2),a=C.Dot(t.toVector3(),new C(1,0,0))+C.Dot(i.toVector3(),new C(0,0,1));a*=4;var s=R.FromValues(.5*Math.cos(a),-Math.sin(a),0,0,Math.sin(a),.5*Math.cos(a),0,0,0,0,1,0,0,0,0,1),c=o.multiply(s).multiply(r);e.setMatrix("lensStarMatrix",c),n._currentDepthOfFieldSource=n.lensFlareFinalPostProcess}}},t.prototype._createDepthOfFieldPostProcess=function(e,t){var n=this;this.depthOfFieldPostProcess=new Da("HDRDepthOfField","standard",["distance"],["otherSampler","depthSampler"],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define DEPTH_OF_FIELD",a.TEXTURETYPE_UNSIGNED_INT),this.depthOfFieldPostProcess.onApply=function(e){e.setTextureFromPostProcess("otherSampler",n._currentDepthOfFieldSource),e.setTexture("depthSampler",n._getDepthTexture()),e.setFloat("distance",n.depthOfFieldDistance)},this.addEffect(new YA(e.getEngine(),"HDRDepthOfField",(function(){return n.depthOfFieldPostProcess}),!0))},t.prototype._createMotionBlurPostProcess=function(e,t){var n=this;if(this._isObjectBasedMotionBlur){var i=new mx("HDRMotionBlur",e,t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,a.TEXTURETYPE_UNSIGNED_INT);i.motionStrength=this.motionStrength,i.motionBlurSamples=this.motionBlurSamples,this.motionBlurPostProcess=i}else{this.motionBlurPostProcess=new Da("HDRMotionBlur","standard",["inverseViewProjection","prevViewProjection","screenSize","motionScale","motionStrength"],["depthSampler"],t,null,Eo.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES "+this.motionBlurSamples.toFixed(1),a.TEXTURETYPE_UNSIGNED_INT);var r=0,o=R.Identity(),s=R.Identity(),c=R.Identity(),l=S.Zero();this.motionBlurPostProcess.onApply=function(t){(c=e.getProjectionMatrix().multiply(e.getViewMatrix())).invertToRef(s),t.setMatrix("inverseViewProjection",s),t.setMatrix("prevViewProjection",o),o=c,l.x=n.motionBlurPostProcess.width,l.y=n.motionBlurPostProcess.height,t.setVector2("screenSize",l),r=e.getEngine().getFps()/60,t.setFloat("motionScale",r),t.setFloat("motionStrength",n.motionStrength),t.setTexture("depthSampler",n._getDepthTexture())}}this.addEffect(new YA(e.getEngine(),"HDRMotionBlur",(function(){return n.motionBlurPostProcess}),!0))},t.prototype._getDepthTexture=function(){return this._scene.getEngine().getCaps().drawBuffersExtension?this._scene.enableGeometryBufferRenderer().getGBuffer().textures[0]:this._scene.enableDepthRenderer().getDepthMap()},t.prototype._disposePostProcesses=function(){for(var e=0;e0.01 and project within the valid screen rectangle\nparam csDirection Unit length camera-space ray direction\nparam projectToPixelMatrix A projection matrix that maps to **pixel** coordinates \n(**not** [-1,+1] normalized device coordinates).\nparam csZBuffer The camera-space Z buffer\nparam csZBufferSize Dimensions of csZBuffer\nparam csZThickness Camera space csZThickness to ascribe to each pixel in the depth buffer\nparam nearPlaneZ Positive number. Doesn't have to be THE actual near plane,just a reasonable value\nfor clipping rays headed towards the camera\nparam stride Step in horizontal or vertical pixels between samples. This is a float\nbecause integer math is slow on GPUs,but should be set to an integer>=1\nparam jitterFraction Number between 0 and 1 for how far to bump the ray in stride units\nto conceal banding artifacts,plus the stride ray offset.\nparam maxSteps Maximum number of iterations. Higher gives better images but may be slow\nparam maxRayTraceDistance Maximum camera-space distance to trace before returning a miss\nparam selfCollisionNumSkip Number of steps to skip at start when raytracing to avoid self collisions.\n1 is a reasonable value,depending on the scene you may need to set this value to 2\nparam hitPixel Pixel coordinates of the first intersection with the scene\nparam numIterations number of iterations performed\nparam csHitPoint Camera space location of the ray hit\n*/\n#define inline\nbool traceScreenSpaceRay1(\nvec3 csOrigin,\nvec3 csDirection,\nmat4 projectToPixelMatrix,\nsampler2D csZBuffer,\nvec2 csZBufferSize,\n#ifdef SSRAYTRACE_USE_BACK_DEPTHBUFFER\nsampler2D csZBackBuffer,\nfloat csZBackSizeFactor,\n#endif\nfloat csZThickness,\nfloat nearPlaneZ,\nfloat stride,\nfloat jitterFraction,\nfloat maxSteps,\nfloat maxRayTraceDistance,\nfloat selfCollisionNumSkip,\nout vec2 startPixel,\nout vec2 hitPixel,\nout vec3 csHitPoint,\nout float numIterations\n#ifdef SSRAYTRACE_DEBUG\n,out vec3 debugColor\n#endif\n)\n{\n#ifdef SSRAYTRACE_RIGHT_HANDED_SCENE\nfloat rayLength=(csOrigin.z+csDirection.z*maxRayTraceDistance)>-nearPlaneZ ? (-nearPlaneZ-csOrigin.z)/csDirection.z : maxRayTraceDistance;\n#else\nfloat rayLength=(csOrigin.z+csDirection.z*maxRayTraceDistance)yMax) || (P1.yyMax) ? yMax : yMin))/(P1.y-P0.y);}\nif ((P1.x>xMax) || (P1.xxMax) ? xMax : xMin))/(P1.x-P0.x));}\nP1=mix(P1,P0,alpha); k1=mix(k1,k0,alpha); Q1=mix(Q1,Q0,alpha);\n#endif\nP1+=vec2((distanceSquared(P0,P1)<0.0001) ? 0.01 : 0.0);vec2 delta=P1-P0;bool permute=false;if (abs(delta.x)rayZMax) { \nfloat t=rayZMin; rayZMin=rayZMax; rayZMax=t;}\nsceneZMax=texelFetch(csZBuffer,ivec2(hitPixel),0).r;\n#ifdef SSRAYTRACE_RIGHT_HANDED_SCENE\n#ifdef SSRAYTRACE_USE_BACK_DEPTHBUFFER\nfloat sceneBackZ=texelFetch(csZBackBuffer,ivec2(hitPixel/csZBackSizeFactor),0).r;hit=(rayZMax>=sceneBackZ-csZThickness) && (rayZMin<=sceneZMax);\n#else\nhit=(rayZMax>=sceneZMax-csZThickness) && (rayZMin<=sceneZMax);\n#endif\n#else\n#ifdef SSRAYTRACE_USE_BACK_DEPTHBUFFER\nfloat sceneBackZ=texelFetch(csZBackBuffer,ivec2(hitPixel/csZBackSizeFactor),0).r;hit=(rayZMin<=sceneBackZ+csZThickness) && (rayZMax>=sceneZMax) && (sceneZMax != 0.0);\n#else\nhit=(rayZMin<=sceneZMax+csZThickness) && (rayZMax>=sceneZMax);\n#endif\n#endif\n}\npqk-=dPQK;stepCount-=1.0;if (((pqk.x+dPQK.x)*stepDirection)>end || (stepCount+1.0)>=maxSteps || sceneZMax==0.0) {hit=false;}\n#ifdef SSRAYTRACE_ENABLE_REFINEMENT\nif (stride>1.0 && hit) {pqk-=dPQK;stepCount-=1.0;float invStride=1.0/stride;dPQK*=invStride;float refinementStepCount=0.0;prevZMaxEstimate=pqk.z/pqk.w;rayZMax=prevZMaxEstimate;sceneZMax=rayZMax+1e7;for (;refinementStepCount<=1.0 ||\n(refinementStepCount<=stride*1.4) &&\n(rayZMaxend) {debugColor=vec3(0,0,1);} else if ((stepCount+1.0)>=maxSteps) {debugColor=vec3(1,0,0);} else if (sceneZMax==0.0) {debugColor=vec3(1,1,0);} else {debugColor=vec3(0,stepCount/maxSteps,0);}\n#endif\nreturn hit;}\n/**\ntexCoord: in the [0,1] range\ndepth: depth in view space (range [znear,zfar]])\n*/\nvec3 computeViewPosFromUVDepth(vec2 texCoord,float depth,mat4 projection,mat4 invProjectionMatrix) {vec4 ndc;ndc.xy=texCoord*2.0-1.0;\n#ifdef SSRAYTRACE_RIGHT_HANDED_SCENE\nndc.z=-projection[2].z-projection[3].z/depth;\n#else\nndc.z=projection[2].z+projection[3].z/depth;\n#endif\nndc.w=1.0;vec4 eyePos=invProjectionMatrix*ndc;eyePos.xyz/=eyePos.w;return eyePos.xyz;}\n",Vt.ShadersStore.screenSpaceReflection2PixelShader="#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\n#define TEXTUREFUNC(s,c,lod) texture2DLodEXT(s,c,lod)\n#define TEXTURECUBEFUNC(s,c,lod) textureLod(s,c,lod)\n#else\n#define TEXTUREFUNC(s,c,bias) texture2D(s,c,bias)\n#define TEXTURECUBEFUNC(s,c,bias) textureCube(s,c,bias)\n#endif\nuniform sampler2D textureSampler;varying vec2 vUV;\n#ifdef SSR_SUPPORTED\nuniform sampler2D reflectivitySampler;uniform sampler2D normalSampler;uniform sampler2D depthSampler;\n#ifdef SSRAYTRACE_USE_BACK_DEPTHBUFFER\nuniform sampler2D backDepthSampler;uniform float backSizeFactor;\n#endif\n#ifdef SSR_USE_ENVIRONMENT_CUBE\nuniform samplerCube envCubeSampler;\n#ifdef SSR_USE_LOCAL_REFLECTIONMAP_CUBIC\nuniform vec3 vReflectionPosition;uniform vec3 vReflectionSize;\n#endif\n#endif\nuniform mat4 view;uniform mat4 invView;uniform mat4 projection;uniform mat4 invProjectionMatrix;uniform mat4 projectionPixel;uniform float nearPlaneZ;uniform float stepSize;uniform float maxSteps;uniform float strength;uniform float thickness;uniform float roughnessFactor;uniform float reflectionSpecularFalloffExponent;uniform float maxDistance;uniform float selfCollisionNumSkip;uniform float reflectivityThreshold;\n#include\n#include\n#include\nvec3 hash(vec3 a)\n{a=fract(a*0.8);a+=dot(a,a.yxz+19.19);return fract((a.xxy+a.yxx)*a.zyx);}\nfloat computeAttenuationForIntersection(ivec2 hitPixel,vec2 hitUV,vec3 vsRayOrigin,vec3 vsHitPoint,vec3 reflectionVector,float maxRayDistance,float numIterations) {float attenuation=1.0;\n#ifdef SSR_ATTENUATE_SCREEN_BORDERS\nvec2 dCoords=smoothstep(0.2,0.6,abs(vec2(0.5,0.5)-hitUV.xy));attenuation*=clamp(1.0-(dCoords.x+dCoords.y),0.0,1.0);\n#endif\n#ifdef SSR_ATTENUATE_INTERSECTION_DISTANCE\nattenuation*=1.0-clamp(distance(vsRayOrigin,vsHitPoint)/maxRayDistance,0.0,1.0);\n#endif\n#ifdef SSR_ATTENUATE_INTERSECTION_NUMITERATIONS\nattenuation*=1.0-(numIterations/maxSteps);\n#endif\n#ifdef SSR_ATTENUATE_BACKFACE_REFLECTION\nvec3 reflectionNormal=texelFetch(normalSampler,hitPixel,0).xyz;float directionBasedAttenuation=smoothstep(-0.17,0.0,dot(reflectionNormal,-reflectionVector));attenuation*=directionBasedAttenuation;\n#endif\nreturn attenuation;}\n#endif\nvoid main()\n{\n#ifdef SSR_SUPPORTED\nvec4 colorFull=TEXTUREFUNC(textureSampler,vUV,0.0);vec3 color=colorFull.rgb;vec4 reflectivity=TEXTUREFUNC(reflectivitySampler,vUV,0.0);\n#ifndef SSR_DISABLE_REFLECTIVITY_TEST\nif (max(reflectivity.r,max(reflectivity.g,reflectivity.b))<=reflectivityThreshold) {\n#ifdef SSR_USE_BLUR\ngl_FragColor=vec4(0.);\n#else\ngl_FragColor=colorFull;\n#endif\nreturn;}\n#endif\n#ifdef SSR_INPUT_IS_GAMMA_SPACE\ncolor=toLinearSpace(color);\n#endif\nvec2 texSize=vec2(textureSize(depthSampler,0));vec3 csNormal=texelFetch(normalSampler,ivec2(vUV*texSize),0).xyz; \nfloat depth=texelFetch(depthSampler,ivec2(vUV*texSize),0).r;vec3 csPosition=computeViewPosFromUVDepth(vUV,depth,projection,invProjectionMatrix);vec3 csViewDirection=normalize(csPosition);vec3 csReflectedVector=reflect(csViewDirection,csNormal);\n#ifdef SSR_USE_ENVIRONMENT_CUBE\nvec3 wReflectedVector=vec3(invView*vec4(csReflectedVector,0.0));\n#ifdef SSR_USE_LOCAL_REFLECTIONMAP_CUBIC\nvec4 worldPos=invView*vec4(csPosition,1.0);wReflectedVector=parallaxCorrectNormal(worldPos.xyz,normalize(wReflectedVector),vReflectionSize,vReflectionPosition);\n#endif\n#ifdef SSR_INVERTCUBICMAP\nwReflectedVector.y*=-1.0;\n#endif\n#ifdef SSRAYTRACE_RIGHT_HANDED_SCENE\nwReflectedVector.z*=-1.0;\n#endif\nvec3 envColor=TEXTURECUBEFUNC(envCubeSampler,wReflectedVector,0.0).xyz;\n#ifdef SSR_ENVIRONMENT_CUBE_IS_GAMMASPACE\nenvColor=toLinearSpace(envColor);\n#endif\n#else\nvec3 envColor=color;\n#endif\nfloat reflectionAttenuation=1.0;bool rayHasHit=false;vec2 startPixel;vec2 hitPixel;vec3 hitPoint;float numIterations;\n#ifdef SSRAYTRACE_DEBUG\nvec3 debugColor;\n#endif\n#ifdef SSR_ATTENUATE_FACING_CAMERA\nreflectionAttenuation*=1.0-smoothstep(0.25,0.5,dot(-csViewDirection,csReflectedVector));\n#endif\nif (reflectionAttenuation>0.0) {\n#ifdef SSR_USE_BLUR\nvec3 jitt=vec3(0.);\n#else\nfloat roughness=1.0-reflectivity.a;vec3 jitt=mix(vec3(0.0),hash(csPosition)-vec3(0.5),roughness)*roughnessFactor; \n#endif\nvec2 uv2=vUV*texSize;float c=(uv2.x+uv2.y)*0.25;float jitter=mod(c,1.0); \nrayHasHit=traceScreenSpaceRay1(\ncsPosition,\nnormalize(csReflectedVector+jitt),\nprojectionPixel,\ndepthSampler,\ntexSize,\n#ifdef SSRAYTRACE_USE_BACK_DEPTHBUFFER\nbackDepthSampler,\nbackSizeFactor,\n#endif\nthickness,\nnearPlaneZ,\nstepSize,\njitter,\nmaxSteps,\nmaxDistance,\nselfCollisionNumSkip,\nstartPixel,\nhitPixel,\nhitPoint,\nnumIterations\n#ifdef SSRAYTRACE_DEBUG\n,debugColor\n#endif\n);}\n#ifdef SSRAYTRACE_DEBUG\ngl_FragColor=vec4(debugColor,1.);return;\n#endif\nvec3 F0=reflectivity.rgb;vec3 fresnel=fresnelSchlickGGX(max(dot(csNormal,-csViewDirection),0.0),F0,vec3(1.));vec3 SSR=envColor;if (rayHasHit) {vec3 reflectedColor=texelFetch(textureSampler,ivec2(hitPixel),0).rgb;\n#ifdef SSR_INPUT_IS_GAMMA_SPACE\nreflectedColor=toLinearSpace(reflectedColor);\n#endif\nreflectionAttenuation*=computeAttenuationForIntersection(ivec2(hitPixel),hitPixel/texSize,csPosition,hitPoint,csReflectedVector,maxDistance,numIterations);SSR=reflectedColor*reflectionAttenuation+(1.0-reflectionAttenuation)*envColor;}\n#ifndef SSR_BLEND_WITH_FRESNEL\nSSR*=fresnel;\n#endif\n#ifdef SSR_USE_BLUR\nfloat blur_radius=0.0;float roughness=1.0-reflectivity.a*(1.0-roughnessFactor);if (roughness>0.001) {float cone_angle=min(roughness,0.999)*3.14159265*0.5;float cone_len=distance(startPixel,hitPixel);float op_len=2.0*tan(cone_angle)*cone_len; \nfloat a=op_len;float h=cone_len;float a2=a*a;float fh2=4.0f*h*h;blur_radius=(a*(sqrt(a2+fh2)-a))/(4.0f*h);}\ngl_FragColor=vec4(SSR,blur_radius/255.0); \n#else\n#ifdef SSR_BLEND_WITH_FRESNEL\nvec3 reflectionMultiplier=clamp(pow(fresnel*strength,vec3(reflectionSpecularFalloffExponent)),0.0,1.0);\n#else\nvec3 reflectionMultiplier=clamp(pow(reflectivity.rgb*strength,vec3(reflectionSpecularFalloffExponent)),0.0,1.0);\n#endif\nvec3 colorMultiplier=1.0-reflectionMultiplier;vec3 finalColor=(color*colorMultiplier)+(SSR*reflectionMultiplier);\n#ifdef SSR_OUTPUT_IS_GAMMA_SPACE\nfinalColor=toGammaSpace(finalColor);\n#endif\ngl_FragColor=vec4(finalColor,colorFull.a);\n#endif\n#else\ngl_FragColor=TEXTUREFUNC(textureSampler,vUV,0.0);\n#endif\n}\n",Vt.ShadersStore.screenSpaceReflection2BlurPixelShader="#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\n#define TEXTUREFUNC(s,c,lod) texture2DLodEXT(s,c,lod)\n#else\n#define TEXTUREFUNC(s,c,bias) texture2D(s,c,bias)\n#endif\nuniform sampler2D textureSampler;varying vec2 vUV;uniform vec2 texelOffsetScale;const float weights[8]=float[8] (0.071303,0.131514,0.189879,0.321392,0.452906, 0.584419,0.715932,0.847445);void processSample(vec2 uv,float i,vec2 stepSize,inout vec4 accumulator,inout float denominator)\n{vec2 offsetUV=stepSize*i+uv;float coefficient=weights[int(2.0-abs(i))];accumulator+=TEXTUREFUNC(textureSampler,offsetUV,0.0)*coefficient;denominator+=coefficient;}\nvoid main()\n{vec4 colorFull=TEXTUREFUNC(textureSampler,vUV,0.0);if (dot(colorFull,vec4(1.0))==0.0) {gl_FragColor=colorFull;return;}\nfloat blurRadius=colorFull.a*255.0; \nvec2 stepSize=texelOffsetScale.xy*blurRadius;vec4 accumulator=TEXTUREFUNC(textureSampler,vUV,0.0)*0.214607;float denominator=0.214607;processSample(vUV,1.0,stepSize,accumulator,denominator);processSample(vUV,1.0*0.2,stepSize,accumulator,denominator);processSample(vUV,1.0*0.4,stepSize,accumulator,denominator);processSample(vUV,1.0*0.6,stepSize,accumulator,denominator);processSample(vUV,1.0*0.8,stepSize,accumulator,denominator);processSample(vUV,1.0*1.2,stepSize,accumulator,denominator);processSample(vUV,1.0*1.4,stepSize,accumulator,denominator);processSample(vUV,1.0*1.6,stepSize,accumulator,denominator);processSample(vUV,1.0*1.8,stepSize,accumulator,denominator);processSample(vUV,1.0*2.0,stepSize,accumulator,denominator);processSample(vUV,-1.0,stepSize,accumulator,denominator);processSample(vUV,-1.0*0.2,stepSize,accumulator,denominator);processSample(vUV,-1.0*0.4,stepSize,accumulator,denominator);processSample(vUV,-1.0*0.6,stepSize,accumulator,denominator);processSample(vUV,-1.0*0.8,stepSize,accumulator,denominator);processSample(vUV,-1.0*1.2,stepSize,accumulator,denominator);processSample(vUV,-1.0*1.4,stepSize,accumulator,denominator);processSample(vUV,-1.0*1.6,stepSize,accumulator,denominator);processSample(vUV,-1.0*1.8,stepSize,accumulator,denominator);processSample(vUV,-1.0*2.0,stepSize,accumulator,denominator);gl_FragColor=vec4(accumulator.rgb/denominator,colorFull.a);}\n",Vt.ShadersStore.screenSpaceReflection2BlurCombinerPixelShader="uniform sampler2D textureSampler; \nuniform sampler2D mainSampler;uniform sampler2D reflectivitySampler;uniform float strength;uniform float reflectionSpecularFalloffExponent;uniform float reflectivityThreshold;varying vec2 vUV;\n#include\n#ifdef SSR_BLEND_WITH_FRESNEL\n#include\n#include\nuniform mat4 projection;uniform mat4 invProjectionMatrix;uniform sampler2D normalSampler;uniform sampler2D depthSampler;\n#endif\nvoid main()\n{\n#ifdef SSRAYTRACE_DEBUG\ngl_FragColor=texture2D(textureSampler,vUV);\n#else\nvec3 SSR=texture2D(textureSampler,vUV).rgb;vec4 color=texture2D(mainSampler,vUV);vec4 reflectivity=texture2D(reflectivitySampler,vUV);\n#ifndef SSR_DISABLE_REFLECTIVITY_TEST\nif (max(reflectivity.r,max(reflectivity.g,reflectivity.b))<=reflectivityThreshold) {gl_FragColor=color;return;}\n#endif\n#ifdef SSR_INPUT_IS_GAMMA_SPACE\ncolor=toLinearSpace(color);\n#endif\n#ifdef SSR_BLEND_WITH_FRESNEL\nvec2 texSize=vec2(textureSize(depthSampler,0));vec3 csNormal=texelFetch(normalSampler,ivec2(vUV*texSize),0).xyz;float depth=texelFetch(depthSampler,ivec2(vUV*texSize),0).r;vec3 csPosition=computeViewPosFromUVDepth(vUV,depth,projection,invProjectionMatrix);vec3 csViewDirection=normalize(csPosition);vec3 F0=reflectivity.rgb;vec3 fresnel=fresnelSchlickGGX(max(dot(csNormal,-csViewDirection),0.0),F0,vec3(1.));vec3 reflectionMultiplier=clamp(pow(fresnel*strength,vec3(reflectionSpecularFalloffExponent)),0.0,1.0);\n#else\nvec3 reflectionMultiplier=clamp(pow(reflectivity.rgb*strength,vec3(reflectionSpecularFalloffExponent)),0.0,1.0);\n#endif\nvec3 colorMultiplier=1.0-reflectionMultiplier;vec3 finalColor=(color.rgb*colorMultiplier)+(SSR*reflectionMultiplier);\n#ifdef SSR_OUTPUT_IS_GAMMA_SPACE\nfinalColor=toGammaSpace(finalColor);\n#endif\ngl_FragColor=vec4(finalColor,color.a);\n#endif\n}\n";var Ox,wx=R.Compose(new C(.5,.5,.5),I.Identity(),new C(.5,.5,.5)),Mx=R.Compose(new C(.5,.5,1),I.Identity(),new C(.5,.5,0)),Dx=function(e){function t(t,n,i,r,o){void 0===r&&(r=!1),void 0===o&&(o=a.TEXTURETYPE_UNSIGNED_BYTE);var s=e.call(this,n.getEngine(),t)||this;if(s.SSRRenderEffect="SSRRenderEffect",s.SSRBlurRenderEffect="SSRBlurRenderEffect",s.SSRCombineRenderEffect="SSRCombineRenderEffect",s._samples=1,s.maxDistance=1e3,s.step=1,s.thickness=.5,s.strength=1,s.reflectionSpecularFalloffExponent=1,s.maxSteps=1e3,s.roughnessFactor=.2,s.selfCollisionNumSkip=1,s._reflectivityThreshold=.04,s._ssrDownsample=0,s._blurDispersionStrength=.03,s._blurDownsample=0,s._enableSmoothReflections=!1,s._environmentTextureIsProbe=!1,s._attenuateScreenBorders=!0,s._attenuateIntersectionDistance=!0,s._attenuateIntersectionIterations=!0,s._attenuateFacingCamera=!1,s._attenuateBackfaceReflection=!1,s._clipToFrustum=!0,s._useFresnel=!1,s._enableAutomaticThicknessComputation=!1,s._backfaceDepthTextureDownsample=0,s._backfaceForceDepthWriteTransparentMeshes=!0,s._isEnabled=!0,s._inputTextureColorIsInGammaSpace=!0,s._generateOutputInGammaSpace=!0,s._debug=!1,s._forceGeometryBuffer=!1,s._isDirty=!1,s._camerasToBeAttached=[],s._cameras=i||n.cameras,s._cameras=s._cameras.slice(),s._camerasToBeAttached=s._cameras.slice(),s._scene=n,s._textureType=o,s._forceGeometryBuffer=r,s.isSupported){if(n.postProcessRenderPipelineManager.addPipeline(s),s._forceGeometryBuffer){var c=n.enableGeometryBufferRenderer();c&&(c.enableReflectivity=!0,c.useSpecificClearForDepthTexture=!0,c.generateNormalsInWorldSpace&&J.Error("SSRRenderingPipeline does not support generateNormalsInWorldSpace=true for the geometry buffer renderer!"))}else{var l=n.enablePrePassRenderer();l&&(l.useSpecificClearForDepthTexture=!0,l.markAsDirty(),l.generateNormalsInWorldSpace&&J.Error("SSRRenderingPipeline does not support generateNormalsInWorldSpace=true for the prepass renderer!"))}s._buildPipeline()}return s}return H(t,e),Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"reflectivityThreshold",{get:function(){return this._reflectivityThreshold},set:function(e){e!==this._reflectivityThreshold&&(0===e&&0!==this._reflectivityThreshold||0!==e&&0===this._reflectivityThreshold?(this._reflectivityThreshold=e,this._buildPipeline()):this._reflectivityThreshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ssrDownsample",{get:function(){return this._ssrDownsample},set:function(e){e!==this._ssrDownsample&&(this._ssrDownsample=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurDispersionStrength",{get:function(){return this._blurDispersionStrength},set:function(e){if(e!==this._blurDispersionStrength){var t=0===e&&0!==this._blurDispersionStrength||0!==e&&0===this._blurDispersionStrength;this._blurDispersionStrength=e,t&&this._buildPipeline()}},enumerable:!1,configurable:!0}),t.prototype._useBlur=function(){return this._blurDispersionStrength>0},Object.defineProperty(t.prototype,"blurDownsample",{get:function(){return this._blurDownsample},set:function(e){e!==this._blurDownsample&&(this._blurDownsample=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableSmoothReflections",{get:function(){return this._enableSmoothReflections},set:function(e){e!==this._enableSmoothReflections&&(this._enableSmoothReflections=e,this._updateEffectDefines())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"environmentTexture",{get:function(){return this._environmentTexture},set:function(e){this._environmentTexture=e,this._updateEffectDefines()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"environmentTextureIsProbe",{get:function(){return this._environmentTextureIsProbe},set:function(e){this._environmentTextureIsProbe=e,this._updateEffectDefines()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attenuateScreenBorders",{get:function(){return this._attenuateScreenBorders},set:function(e){this._attenuateScreenBorders!==e&&(this._attenuateScreenBorders=e,this._updateEffectDefines())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attenuateIntersectionDistance",{get:function(){return this._attenuateIntersectionDistance},set:function(e){this._attenuateIntersectionDistance!==e&&(this._attenuateIntersectionDistance=e,this._updateEffectDefines())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attenuateIntersectionIterations",{get:function(){return this._attenuateIntersectionIterations},set:function(e){this._attenuateIntersectionIterations!==e&&(this._attenuateIntersectionIterations=e,this._updateEffectDefines())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attenuateFacingCamera",{get:function(){return this._attenuateFacingCamera},set:function(e){this._attenuateFacingCamera!==e&&(this._attenuateFacingCamera=e,this._updateEffectDefines())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attenuateBackfaceReflection",{get:function(){return this._attenuateBackfaceReflection},set:function(e){this._attenuateBackfaceReflection!==e&&(this._attenuateBackfaceReflection=e,this._updateEffectDefines())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clipToFrustum",{get:function(){return this._clipToFrustum},set:function(e){this._clipToFrustum!==e&&(this._clipToFrustum=e,this._updateEffectDefines())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useFresnel",{get:function(){return this._useFresnel},set:function(e){this._useFresnel!==e&&(this._useFresnel=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableAutomaticThicknessComputation",{get:function(){return this._enableAutomaticThicknessComputation},set:function(e){this._enableAutomaticThicknessComputation!==e&&(this._enableAutomaticThicknessComputation=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backfaceDepthRenderer",{get:function(){return this._depthRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backfaceDepthTextureDownsample",{get:function(){return this._backfaceDepthTextureDownsample},set:function(e){this._backfaceDepthTextureDownsample!==e&&(this._backfaceDepthTextureDownsample=e,this._resizeDepthRenderer())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backfaceForceDepthWriteTransparentMeshes",{get:function(){return this._backfaceForceDepthWriteTransparentMeshes},set:function(e){this._backfaceForceDepthWriteTransparentMeshes!==e&&(this._backfaceForceDepthWriteTransparentMeshes=e,this._depthRenderer&&(this._depthRenderer.forceDepthWriteTransparentMeshes=e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled!==e&&(this._isEnabled=e,e?e&&(this._isDirty?this._buildPipeline():null!==this._cameras&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras)):null!==this._cameras&&(this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),this._cameras=this._camerasToBeAttached.slice()))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputTextureColorIsInGammaSpace",{get:function(){return this._inputTextureColorIsInGammaSpace},set:function(e){this._inputTextureColorIsInGammaSpace!==e&&(this._inputTextureColorIsInGammaSpace=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generateOutputInGammaSpace",{get:function(){return this._generateOutputInGammaSpace},set:function(e){this._generateOutputInGammaSpace!==e&&(this._generateOutputInGammaSpace=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debug",{get:function(){return this._debug},set:function(e){this._debug!==e&&(this._debug=e,this._buildPipeline())},enumerable:!1,configurable:!0}),t.prototype.getScene=function(){return this._scene},Object.defineProperty(t.prototype,"_geometryBufferRenderer",{get:function(){return this._forceGeometryBuffer?this._scene.geometryBufferRenderer:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_prePassRenderer",{get:function(){return this._forceGeometryBuffer?null:this._scene.prePassRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSupported",{get:function(){var e=this._scene.getEngine().getCaps();return e.drawBuffersExtension&&e.texelFetch},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"SSRRenderingPipeline"},t.prototype.addCamera=function(e){this._camerasToBeAttached.push(e),this._buildPipeline()},t.prototype.removeCamera=function(e){var t=this._camerasToBeAttached.indexOf(e);this._camerasToBeAttached.splice(t,1),this._buildPipeline()},t.prototype.dispose=function(t){void 0===t&&(t=!1),this._disposeDepthRenderer(),this._disposePostProcesses(),t&&this._scene.disableGeometryBufferRenderer(),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),e.prototype.dispose.call(this)},t.prototype._getTextureSize=function(){var e,t,n=this._scene.getEngine(),i=this._prePassRenderer,r={width:n.getRenderWidth(),height:n.getRenderHeight()};if(i&&(null===(e=this._scene.activeCamera)||void 0===e?void 0:e._getFirstPostProcess())===this._ssrPostProcess){var o=i.getRenderTarget();o&&o.textures&&(r=o.textures[i.getIndex(a.PREPASS_COLOR_TEXTURE_TYPE)].getSize())}else(null===(t=this._ssrPostProcess)||void 0===t?void 0:t.inputTexture)&&(r.width=this._ssrPostProcess.inputTexture.width,r.height=this._ssrPostProcess.inputTexture.height);return r},t.prototype._updateEffectDefines=function(){var e,t=[];(this._geometryBufferRenderer||this._prePassRenderer)&&t.push("#define SSR_SUPPORTED"),this._enableSmoothReflections&&t.push("#define SSRAYTRACE_ENABLE_REFINEMENT"),this._scene.useRightHandedSystem&&t.push("#define SSRAYTRACE_RIGHT_HANDED_SCENE"),this._environmentTexture&&(t.push("#define SSR_USE_ENVIRONMENT_CUBE"),this._environmentTexture.boundingBoxSize&&t.push("#define SSR_USE_LOCAL_REFLECTIONMAP_CUBIC"),this._environmentTexture.gammaSpace&&t.push("#define SSR_ENVIRONMENT_CUBE_IS_GAMMASPACE")),this._environmentTextureIsProbe&&t.push("#define SSR_INVERTCUBICMAP"),this._enableAutomaticThicknessComputation&&t.push("#define SSRAYTRACE_USE_BACK_DEPTHBUFFER"),this._attenuateScreenBorders&&t.push("#define SSR_ATTENUATE_SCREEN_BORDERS"),this._attenuateIntersectionDistance&&t.push("#define SSR_ATTENUATE_INTERSECTION_DISTANCE"),this._attenuateIntersectionIterations&&t.push("#define SSR_ATTENUATE_INTERSECTION_NUMITERATIONS"),this._attenuateFacingCamera&&t.push("#define SSR_ATTENUATE_FACING_CAMERA"),this._attenuateBackfaceReflection&&t.push("#define SSR_ATTENUATE_BACKFACE_REFLECTION"),this._clipToFrustum&&t.push("#define SSRAYTRACE_CLIP_TO_FRUSTUM"),this._useBlur()&&t.push("#define SSR_USE_BLUR"),this._debug&&t.push("#define SSRAYTRACE_DEBUG"),this._inputTextureColorIsInGammaSpace&&t.push("#define SSR_INPUT_IS_GAMMA_SPACE"),this._generateOutputInGammaSpace&&t.push("#define SSR_OUTPUT_IS_GAMMA_SPACE"),this._useFresnel&&t.push("#define SSR_BLEND_WITH_FRESNEL"),0===this._reflectivityThreshold&&t.push("#define SSR_DISABLE_REFLECTIVITY_TEST"),null===(e=this._ssrPostProcess)||void 0===e||e.updateEffect(t.join("\n"))},t.prototype._buildPipeline=function(){var e,t=this;if(this.isSupported)if(this._isEnabled){this._isDirty=!1;var n=this._scene.getEngine();if(this._disposeDepthRenderer(),this._disposePostProcesses(),null!==this._cameras&&(this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),this._cameras=this._camerasToBeAttached.slice()),this._reset(),this._enableAutomaticThicknessComputation){var i=null===(e=this._cameras)||void 0===e?void 0:e[0];i&&(this._depthRendererCamera=i,this._depthRenderer=new H_(this._scene,void 0,void 0,void 0,a.TEXTURE_NEAREST_SAMPLINGMODE,!0,"SSRBackDepth"),this._depthRenderer.clearColor.r=1e8,this._depthRenderer.reverseCulling=!0,this._depthRenderer.forceDepthWriteTransparentMeshes=this._backfaceForceDepthWriteTransparentMeshes,this._resizeDepthRenderer(),i.customRenderTargets.push(this._depthRenderer.getDepthMap()))}this._createSSRPostProcess(),this.addEffect(new YA(n,this.SSRRenderEffect,(function(){return t._ssrPostProcess}),!0)),this._useBlur()&&(this._createBlurAndCombinerPostProcesses(),this.addEffect(new YA(n,this.SSRBlurRenderEffect,(function(){return[t._blurPostProcessX,t._blurPostProcessY]}),!0)),this.addEffect(new YA(n,this.SSRCombineRenderEffect,(function(){return t._blurCombinerPostProcess}),!0))),null!==this._cameras&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras)}else this._isDirty=!0},t.prototype._resizeDepthRenderer=function(){if(this._depthRenderer){var e=this._getTextureSize(),t=this._depthRenderer.getDepthMap().getSize(),n=Math.floor(e.width/(this._backfaceDepthTextureDownsample+1)),i=Math.floor(e.height/(this._backfaceDepthTextureDownsample+1));t.width===n&&t.height===i||this._depthRenderer.getDepthMap().resize({width:n,height:i})}},t.prototype._disposeDepthRenderer=function(){var e;if(this._depthRenderer){if(this._depthRendererCamera){var t=null!==(e=this._depthRendererCamera.customRenderTargets.indexOf(this._depthRenderer.getDepthMap()))&&void 0!==e?e:-1;-1!==t&&this._depthRendererCamera.customRenderTargets.splice(t,1)}this._depthRendererCamera=null,this._depthRenderer.getDepthMap().dispose()}this._depthRenderer=null},t.prototype._disposePostProcesses=function(){for(var e,t,n,i,r=0;r0&&-1===this.includedMeshes.indexOf(e)||this.excludedMeshes.length>0&&-1!==this.excludedMeshes.indexOf(e)},t.prototype._createPass=function(e,t){var n=this,i=e.getEngine();this._volumetricLightScatteringRTT=new rs("volumetricLightScatteringMap",{width:i.getRenderWidth()*t,height:i.getRenderHeight()*t},e,!1,!0,a.TEXTURETYPE_UNSIGNED_INT),this._volumetricLightScatteringRTT.wrapU=Eo.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.wrapV=Eo.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.renderList=null,this._volumetricLightScatteringRTT.renderParticles=!1,this._volumetricLightScatteringRTT.ignoreCameraViewport=!0;var r=this.getCamera();r?r.customRenderTargets.push(this._volumetricLightScatteringRTT):e.customRenderTargets.push(this._volumetricLightScatteringRTT);var o,s=function(e){var t,i=e.getRenderingMesh(),r=e.getEffectiveMesh();if(!n._meshExcluded(i)){r._internalAbstractMeshDataInfo._isActiveIntermediate=!1;var o=e.getMaterial();if(o){var a=i.getScene(),s=a.getEngine();s.setState(o.backFaceCulling,void 0,void 0,void 0,o.cullBackFaces);var c=i._getInstancesRenderList(e._id,!!e.getReplacementMesh());if(!c.mustReturn){var l=s.getCaps().instancedArrays&&(null!==c.visibleInstances[e._id]||i.hasThinInstances);if(n._isReady(e,l)){var u=null===(t=r._internalAbstractMeshDataInfo._materialForRenderPass)||void 0===t?void 0:t[s.currentRenderPassId],h=e._getDrawWrapper();if(i!==n.mesh||h||(h=o._getDrawWrapper()),!h)return;var d=h.effect;if(s.enableEffect(h),l||i._bind(e,d,o.fillMode),i===n.mesh)o.bind(r.getWorldMatrix(),i);else if(u)u.bindForSubMesh(r.getWorldMatrix(),r,e);else{if(d.setMatrix("viewProjection",a.getTransformMatrix()),o&&o.needAlphaTesting()){var p=o.getAlphaTestTexture();d.setTexture("diffuseSampler",p),p&&d.setMatrix("diffuseMatrix",p.getTextureMatrix())}i.useBones&&i.computeBonesUsingShaders&&i.skeleton&&d.setMatrices("mBones",i.skeleton.getTransformMatrices(i))}l&&i.hasThinInstances&&d.setMatrix("world",r.getWorldMatrix()),i._processRendering(r,e,d,qr.TriangleFillMode,c,l,(function(e,t){e||d.setMatrix("world",t)}))}}}}},c=new U(0,0,0,1);this._volumetricLightScatteringRTT.onBeforeRenderObservable.add((function(){o=e.clearColor,e.clearColor=c})),this._volumetricLightScatteringRTT.onAfterRenderObservable.add((function(){e.clearColor=o})),this._volumetricLightScatteringRTT.customIsReadyFunction=function(e,t,r){if((r||0===t)&&e.subMeshes)for(var o=0;ot._alphaIndex?1:e._alphaIndext._distanceToCamera?-1:0})),c.setAlphaMode(a.ALPHA_COMBINE),o=0;o\nuniform vec4 color;\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include\n#include\ngl_FragColor=color;\n#define CUSTOM_FRAGMENT_MAIN_END\n}",Vt.ShadersStore.lineVertexShader="#include\n#include\nattribute vec3 position;attribute vec4 normal;uniform mat4 viewProjection;uniform float width;uniform float aspectRatio;\n#include\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include\nmat4 worldViewProjection=viewProjection*finalWorld;vec4 viewPosition=worldViewProjection*vec4(position,1.0);vec4 viewPositionNext=worldViewProjection*vec4(normal.xyz,1.0);vec2 currentScreen=viewPosition.xy/viewPosition.w;vec2 nextScreen=viewPositionNext.xy/viewPositionNext.w;currentScreen.x*=aspectRatio;nextScreen.x*=aspectRatio;vec2 dir=normalize(nextScreen-currentScreen);vec2 normalDir=vec2(-dir.y,dir.x);normalDir*=width/2.0;normalDir.x/=aspectRatio;vec4 offset=vec4(normalDir*normal.w,0.0,0.0);gl_Position=viewPosition+offset;\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#include\n#endif\n#include\n#define CUSTOM_VERTEX_MAIN_END\n}",kr.prototype.disableEdgesRendering=function(){return this._edgesRenderer&&(this._edgesRenderer.dispose(),this._edgesRenderer=null),this},kr.prototype.enableEdgesRendering=function(e,t,n){return void 0===e&&(e=.95),void 0===t&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new Hx(this,e,t,!0,n),this},Object.defineProperty(kr.prototype,"edgesRenderer",{get:function(){return this._edgesRenderer},enumerable:!0,configurable:!0}),Vu.prototype.enableEdgesRendering=function(e,t){return void 0===e&&(e=.95),void 0===t&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new jx(this,e,t),this},zu.prototype.enableEdgesRendering=function(e,t){return void 0===e&&(e=.95),void 0===t&&(t=!1),Vu.prototype.enableEdgesRendering.apply(this,arguments),this};var Gx=function(){this.edges=[],this.edgesConnectedCount=0},Hx=function(){function e(e,t,n,i,r){void 0===t&&(t=.95),void 0===n&&(n=!1),void 0===i&&(i=!0);var o,a=this;this.edgesWidthScalerForOrthographic=1e3,this.edgesWidthScalerForPerspective=50,this._linesPositions=new Array,this._linesNormals=new Array,this._linesIndices=new Array,this._buffers={},this._buffersForInstances={},this._checkVerticesInsteadOfIndices=!1,this.isEnabled=!0,this.customInstances=new On(32),this._source=e,this._checkVerticesInsteadOfIndices=n,this._options=null!=r?r:null,this._epsilon=t,this._source.getScene().getEngine().isWebGPU&&(this._drawWrapper=new en(e.getEngine())),this._prepareRessources(),i&&(null===(o=null==r?void 0:r.useAlternateEdgeFinder)||void 0===o||o?this._generateEdgesLinesAlternate():this._generateEdgesLines()),this._meshRebuildObserver=this._source.onRebuildObservable.add((function(){a._rebuild()})),this._meshDisposeObserver=this._source.onDisposeObservable.add((function(){a.dispose()}))}return Object.defineProperty(e.prototype,"linesPositions",{get:function(){return this._linesPositions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesNormals",{get:function(){return this._linesNormals},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesIndices",{get:function(){return this._linesIndices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineShader",{get:function(){return this._lineShader},set:function(e){this._lineShader=e},enumerable:!1,configurable:!0}),e._GetShader=function(e){if(!e._edgeRenderLineShader){var t=new ku("lineShader",e,"line",{attributes:["position","normal"],uniforms:["world","viewProjection","color","width","aspectRatio"]},!1);t.disableDepthWrite=!0,t.backFaceCulling=!1,t.checkReadyOnEveryCall=e.getEngine().isWebGPU,e._edgeRenderLineShader=t}return e._edgeRenderLineShader},e.prototype._prepareRessources=function(){this._lineShader||(this._lineShader=e._GetShader(this._source.getScene()))},e.prototype._rebuild=function(){var e=this._buffers[Yn.PositionKind];e&&e._rebuild(),(e=this._buffers[Yn.NormalKind])&&e._rebuild();var t=this._source.getScene().getEngine();this._ib=t.createIndexBuffer(this._linesIndices)},e.prototype.dispose=function(){var e;this._source.onRebuildObservable.remove(this._meshRebuildObserver),this._source.onDisposeObservable.remove(this._meshDisposeObserver);var t=this._buffers[Yn.PositionKind];t&&(t.dispose(),this._buffers[Yn.PositionKind]=null),(t=this._buffers[Yn.NormalKind])&&(t.dispose(),this._buffers[Yn.NormalKind]=null),this._ib&&this._source.getScene().getEngine()._releaseBuffer(this._ib),this._lineShader.dispose(),null===(e=this._drawWrapper)||void 0===e||e.dispose()},e.prototype._processEdgeForAdjacencies=function(e,t,n,i,r){return e===n&&t===i||e===i&&t===n?0:e===i&&t===r||e===r&&t===i?1:e===r&&t===n||e===n&&t===r?2:-1},e.prototype._processEdgeForAdjacenciesWithVertices=function(e,t,n,i,r){var o=1e-10;return e.equalsWithEpsilon(n,o)&&t.equalsWithEpsilon(i,o)||e.equalsWithEpsilon(i,o)&&t.equalsWithEpsilon(n,o)?0:e.equalsWithEpsilon(i,o)&&t.equalsWithEpsilon(r,o)||e.equalsWithEpsilon(r,o)&&t.equalsWithEpsilon(i,o)?1:e.equalsWithEpsilon(r,o)&&t.equalsWithEpsilon(n,o)||e.equalsWithEpsilon(n,o)&&t.equalsWithEpsilon(r,o)?2:-1},e.prototype._checkEdge=function(e,t,n,i,r){(void 0===t||C.Dot(n[e],n[t])=0&&t.push(n);for(var i=0;i=e[0].length&&e[1].length>=e[2].length?o=1:e[2].length>=e[0].length&&e[2].length>=e[1].length&&(o=2);for(var a=0;a<3;++a)a===o?e[a].sort((function(e,t){return e[1]t[1]?1:0})):e[a].sort((function(e,t){return e[1]>t[1]?-1:e[1]=o+1;--u)r(e[u%3],c,u!==o+2?i[n[t+(u+1)%3]]:-1);var h=c.length;n.push(i[n[t+o]],s[0],c[0]),n.push(i[n[t+(o+1)%3]],c[h-1],s[l-1]);for(var d=l<=h,p=d?l:h,f=d?h:l,m=d?l-1:h-1,_=d?0:1,g=l+h-2,y=0,v=0,b=d?s:c,T=d?c:s,E=0;g-- >0;){_?n.push(b[y],T[v]):n.push(T[v],b[y]);var A=void 0;(E+=p)>=f&&yL){var te=N;N=L,L=te}(ie=J[ne=N+"_"+L])?ie.done||(C.Dot(ee,ie.normal)0||this._source.hasThinInstances)},e.prototype.render=function(){var e=this._source.getScene(),t=this._lineShader._getDrawWrapper();if(this._drawWrapper&&this._lineShader._setDrawWrapper(this._drawWrapper),this.isReady()&&e.activeCamera){var n=this._source.hasInstances&&this.customInstances.length>0,i=n||this._source.hasThinInstances,r=0;if(i)if(this._buffersForInstances.world0=this._source.getVertexBuffer("world0"),this._buffersForInstances.world1=this._source.getVertexBuffer("world1"),this._buffersForInstances.world2=this._source.getVertexBuffer("world2"),this._buffersForInstances.world3=this._source.getVertexBuffer("world3"),n){var o=this._source._instanceDataStorage;if(r=this.customInstances.length,!o.instancesData)return void(this._source.getScene()._activeMeshesFrozen||this.customInstances.reset());if(!o.isFrozen){for(var s=0,c=0;c0&&(this._useSpecificClearForDepthTexture&&this._mrtLayout[r]===a.PREPASS_DEPTH_TEXTURE_TYPE?(t.push(!1),n.push(!0)):(t.push(!0),n.push(!1)),i.push(!1));this._multiRenderAttachments=this._engine.buildTextureLayout(e),this._clearAttachments=this._engine.buildTextureLayout(t),this._clearDepthAttachments=this._engine.buildTextureLayout(n),this._defaultAttachments=this._engine.buildTextureLayout(i)},e.prototype._resetLayout=function(){for(var t=0;t=0;e--)this.renderTargets[e].dispose();for(e=0;e=5)return J.Error("You already reached the maximum number of diffusion profiles."),0;for(var t=0;t4&&(r.push(Yn.MatricesIndicesExtraKind),r.push(Yn.MatricesWeightsExtraKind)),i.push("#define NUM_BONE_INFLUENCERS "+o.numBoneInfluencers),i.push("#define BonesPerMesh "+(o.skeleton?o.skeleton.bones.length+1:0))):i.push("#define NUM_BONE_INFLUENCERS 0");var c=o.morphTargetManager,l=0;c&&c.numInfluencers>0&&(l=c.numInfluencers,i.push("#define MORPHTARGETS"),i.push("#define NUM_MORPH_INFLUENCERS "+l),c.isUsingTextureForTargets&&i.push("#define MORPHTARGETS_TEXTURE"),Xr.PrepareAttributesForMorphTargetsInfluencers(r,o,l)),t&&(i.push("#define INSTANCES"),Xr.PushAttributesForInstances(r),e.getRenderingMesh().hasThinInstances&&i.push("#define THIN_INSTANCES"));var u=e._getDrawWrapper(n,!0),h=u.defines,d=i.join("\n");if(h!==d){var p=["world","mBones","viewProjection","diffuseMatrix","offset","color","logarithmicDepthConstant","morphTargetInfluences","morphTargetTextureInfo","morphTargetTextureIndices"];Vr(p),u.setEffect(this.scene.getEngine().createEffect("outline",r,p,["diffuseSampler","morphTargets"],d,void 0,void 0,void 0,{maxSimultaneousMorphTargets:l}),d)}return u.effect.isReady()},e.prototype._beforeRenderingMesh=function(t,n,i){if(this._savedDepthWrite=this._engine.getDepthWrite(),t.renderOutline){var r=n.getMaterial();r&&r.needAlphaBlendingForMesh(t)&&(this._engine.cacheStencilState(),this._engine.setDepthWrite(!1),this._engine.setColorWrite(!1),this._engine.setStencilBuffer(!0),this._engine.setStencilOperationPass(a.REPLACE),this._engine.setStencilFunction(a.ALWAYS),this._engine.setStencilMask(e._StencilReference),this._engine.setStencilFunctionReference(e._StencilReference),this._engine.stencilStateComposer.useStencilGlobalOnly=!0,this.render(n,i,!0,this._passIdForDrawWrapper[1]),this._engine.setColorWrite(!0),this._engine.setStencilFunction(a.NOTEQUAL)),this._engine.setDepthWrite(!1),this.render(n,i,!1,this._passIdForDrawWrapper[0]),this._engine.setDepthWrite(this._savedDepthWrite),r&&r.needAlphaBlendingForMesh(t)&&(this._engine.stencilStateComposer.useStencilGlobalOnly=!1,this._engine.restoreStencilState())}},e.prototype._afterRenderingMesh=function(e,t,n){if(e.renderOverlay){var i=this._engine.getAlphaMode(),r=this._engine.alphaState.alphaBlend;this._engine.setAlphaMode(a.ALPHA_COMBINE),this.render(t,n,!0,this._passIdForDrawWrapper[3]),this._engine.setAlphaMode(i),this._engine.setDepthWrite(this._savedDepthWrite),this._engine.alphaState.alphaBlend=r}e.renderOutline&&this._savedDepthWrite&&(this._engine.setDepthWrite(!0),this._engine.setColorWrite(!1),this.render(t,n,!1,this._passIdForDrawWrapper[2]),this._engine.setColorWrite(!0))},e._StencilReference=4,e}(),Jx=function(){function e(e){this.priority=0,this._particleSize=.1,this.onParticleSizeChanged=new u,this.particleThicknessAlpha=.05,this._useVelocity=!1,this._scene=e,this._engine=e.getEngine(),this._effectsAreDirty=!0,this._depthEffectWrapper=null,this._thicknessEffectWrapper=null}return Object.defineProperty(e.prototype,"particleSize",{get:function(){return this._particleSize},set:function(e){e!==this._particleSize&&(this._particleSize=e,this.onParticleSizeChanged.notifyObservers(this))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useInstancing",{get:function(){return!this.indexBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useVelocity",{get:function(){return this._useVelocity},set:function(e){this._useVelocity!==e&&this._hasVelocity()&&(this._useVelocity=e,this._effectsAreDirty=!0)},enumerable:!1,configurable:!0}),e.prototype._hasVelocity=function(){var e;return!!(null===(e=this.vertexBuffers)||void 0===e?void 0:e.velocity)},Object.defineProperty(e.prototype,"indexBuffer",{get:function(){return null},enumerable:!1,configurable:!0}),e.prototype.getClassName=function(){return"FluidRenderingObject"},e.prototype._createEffects=function(){var e=["view","projection","particleRadius","size"],t=["position","offset"],n=[];this._effectsAreDirty=!1,this.useVelocity&&(t.push("velocity"),n.push("#define FLUIDRENDERING_VELOCITY")),this._scene.useRightHandedSystem&&n.push("#define FLUIDRENDERING_RHS"),this._depthEffectWrapper=new $a({engine:this._engine,useShaderStore:!0,vertexShader:"fluidRenderingParticleDepth",fragmentShader:"fluidRenderingParticleDepth",attributeNames:t,uniformNames:e,samplerNames:[],defines:n}),e.push("particleAlpha"),this._thicknessEffectWrapper=new $a({engine:this._engine,useShaderStore:!0,vertexShader:"fluidRenderingParticleThickness",fragmentShader:"fluidRenderingParticleThickness",attributeNames:["position","offset"],uniformNames:e,samplerNames:[]})},e.prototype.isReady=function(){if(this._effectsAreDirty&&this._createEffects(),!this._depthEffectWrapper||!this._thicknessEffectWrapper)return!1;var e=this._depthEffectWrapper._drawWrapper.effect,t=this._thicknessEffectWrapper._drawWrapper.effect;return e.isReady()&&t.isReady()},e.prototype.renderDepthTexture=function(){var e=this.numParticles;if(this._depthEffectWrapper&&0!==e){var t=this._depthEffectWrapper._drawWrapper,n=t.effect;this._engine.enableEffect(t),this._engine.bindBuffers(this.vertexBuffers,this.indexBuffer,n),n.setMatrix("view",this._scene.getViewMatrix()),n.setMatrix("projection",this._scene.getProjectionMatrix()),n.setFloat2("size",this._particleSize,this._particleSize),n.setFloat("particleRadius",this._particleSize/2),this.useInstancing?this._engine.drawArraysType(a.MATERIAL_TriangleStripDrawMode,0,4,e):this._engine.drawElementsType(a.MATERIAL_TriangleFillMode,0,e)}},e.prototype.renderThicknessTexture=function(){var e=this.numParticles;if(this._thicknessEffectWrapper&&0!==e){var t=this._thicknessEffectWrapper._drawWrapper,n=t.effect;this._engine.setAlphaMode(a.ALPHA_ONEONE),this._engine.setDepthWrite(!1),this._engine.enableEffect(t),this._engine.bindBuffers(this.vertexBuffers,this.indexBuffer,n),n.setMatrix("view",this._scene.getViewMatrix()),n.setMatrix("projection",this._scene.getProjectionMatrix()),n.setFloat("particleAlpha",this.particleThicknessAlpha),n.setFloat2("size",this._particleSize,this._particleSize),this.useInstancing?this._engine.drawArraysType(a.MATERIAL_TriangleStripDrawMode,0,4,e):this._engine.drawElementsType(a.MATERIAL_TriangleFillMode,0,e),this._engine.setDepthWrite(!0),this._engine.setAlphaMode(a.ALPHA_DISABLE)}},e.prototype.renderDiffuseTexture=function(){},e.prototype.dispose=function(){var e,t;null===(e=this._depthEffectWrapper)||void 0===e||e.dispose(),null===(t=this._thicknessEffectWrapper)||void 0===t||t.dispose()},e}(),eS=function(e){function t(t,n){var i=e.call(this,t)||this;return i._useTrueRenderingForDiffuseTexture=!0,i._particleSystem=n,i._originalRender=n.render.bind(n),i._blendMode=n.blendMode,i._onBeforeDrawParticleObserver=null,i._updateInAnimate=i._particleSystem.updateInAnimate,i._particleSystem.updateInAnimate=!0,i._particleSystem.render=function(){return 0},i.particleSize=(n.minSize+n.maxSize)/2,i.useTrueRenderingForDiffuseTexture=!1,i}return H(t,e),Object.defineProperty(t.prototype,"particleSystem",{get:function(){return this._particleSystem},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"FluidRenderingObjectParticleSystem"},Object.defineProperty(t.prototype,"useTrueRenderingForDiffuseTexture",{get:function(){return this._useTrueRenderingForDiffuseTexture},set:function(e){var t=this;this._useTrueRenderingForDiffuseTexture!==e&&(this._useTrueRenderingForDiffuseTexture=e,e?(this._particleSystem.blendMode=this._blendMode,this._particleSystem.onBeforeDrawParticlesObservable.remove(this._onBeforeDrawParticleObserver),this._onBeforeDrawParticleObserver=null):(this._particleSystem.blendMode=-1,this._onBeforeDrawParticleObserver=this._particleSystem.onBeforeDrawParticlesObservable.add((function(){t._engine.setAlphaMode(a.ALPHA_COMBINE)}))))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vertexBuffers",{get:function(){return this._particleSystem.vertexBuffers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indexBuffer",{get:function(){return this._particleSystem.indexBuffer},enumerable:!1,configurable:!0}),t.prototype.isReady=function(){return e.prototype.isReady.call(this)&&this._particleSystem.isReady()},Object.defineProperty(t.prototype,"numParticles",{get:function(){return this._particleSystem.getActiveCount()},enumerable:!1,configurable:!0}),t.prototype.renderDiffuseTexture=function(){this._originalRender()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._particleSystem.onBeforeDrawParticlesObservable.remove(this._onBeforeDrawParticleObserver),this._onBeforeDrawParticleObserver=null,this._particleSystem.render=this._originalRender,this._particleSystem.blendMode=this._blendMode,this._particleSystem.updateInAnimate=this._updateInAnimate},t}(Jx),tS=function(){function e(e,t,n,i,r,o,s,c,l,h,d,p,f,m){void 0===s&&(s=a.TEXTURETYPE_FLOAT),void 0===c&&(c=a.TEXTUREFORMAT_R),void 0===l&&(l=a.TEXTURETYPE_FLOAT),void 0===h&&(h=a.TEXTUREFORMAT_R),void 0===d&&(d=!1),void 0===p&&(p=null),void 0===f&&(f=!0),void 0===m&&(m=1),this.enableBlur=!0,this.blurSizeDivisor=1,this.blurFilterSize=7,this._blurNumIterations=3,this.blurMaxFilterSize=100,this.blurDepthScale=10,this.particleSize=.02,this.onDisposeObservable=new u,this._name=e,this._scene=t,this._camera=p,this._engine=t.getEngine(),this._width=n,this._height=i,this._blurTextureSizeX=r,this._blurTextureSizeY=o,this._textureType=s,this._textureFormat=c,this._blurTextureType=l,this._blurTextureFormat=h,this._useStandardBlur=d,this._generateDepthBuffer=f,this._samples=m,this._postProcessRunningIndex=0,this.enableBlur=0!==r&&0!==o,this._rt=null,this._texture=null,this._rtBlur=null,this._textureBlurred=null,this._blurPostProcesses=null}return Object.defineProperty(e.prototype,"blurNumIterations",{get:function(){return this._blurNumIterations},set:function(e){if(this._blurNumIterations!==e&&(this._blurNumIterations=e,null!==this._blurPostProcesses)){var t=this._blurPostProcesses[0],n=this._blurPostProcesses[1];this._blurPostProcesses=[];for(var i=0;i<2*this._blurNumIterations;++i)this._blurPostProcesses[i]=1&i?n:t}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderTarget",{get:function(){return this._rt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderTargetBlur",{get:function(){return this._rtBlur},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textureBlur",{get:function(){return this._textureBlurred},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){if(this.dispose(),this._createRenderTarget(),this.enableBlur&&this._texture){var e=this._createBlurPostProcesses(this._texture,this._blurTextureType,this._blurTextureFormat,this.blurSizeDivisor,this._name,this._useStandardBlur),t=e[0],n=e[1],i=e[2];this._rtBlur=t,this._textureBlurred=n,this._blurPostProcesses=i}},e.prototype.applyBlurPostProcesses=function(){this.enableBlur&&this._blurPostProcesses&&(this._postProcessRunningIndex=0,this._scene.postProcessManager.directRender(this._blurPostProcesses,this._rtBlur,!0),this._engine.unBindFramebuffer(this._rtBlur))},e.prototype._createRenderTarget=function(){this._rt=this._engine.createRenderTargetTexture({width:this._width,height:this._height},{generateMipMaps:!1,type:this._textureType,format:this._textureFormat,samplingMode:a.TEXTURE_NEAREST_SAMPLINGMODE,generateDepthBuffer:this._generateDepthBuffer,generateStencilBuffer:!1,samples:this._samples,label:"FluidRenderingRTT-".concat(this._name)});var e=this._rt.texture;e.incrementReferences(),this._texture=new Eo(null,this._scene),this._texture.name="rtt"+this._name,this._texture._texture=e,this._texture.wrapU=Eo.CLAMP_ADDRESSMODE,this._texture.wrapV=Eo.CLAMP_ADDRESSMODE,this._texture.anisotropicFilteringLevel=1},e.prototype._createBlurPostProcesses=function(e,t,n,i,r,o){var s=this;void 0===o&&(o=!1);var c=this._scene.getEngine(),l=new S(Math.floor(this._blurTextureSizeX/i),Math.floor(this._blurTextureSizeY/i)),u=t===a.TEXTURETYPE_FLOAT&&c.getCaps().textureFloatLinearFiltering||t===a.TEXTURETYPE_HALF_FLOAT&&c.getCaps().textureHalfFloatLinearFiltering,h=this._engine.createRenderTargetTexture({width:l.x,height:l.y},{generateMipMaps:!1,type:t,format:n,samplingMode:u?a.TEXTURE_BILINEAR_SAMPLINGMODE:a.TEXTURE_NEAREST_SAMPLINGMODE,generateDepthBuffer:!1,generateStencilBuffer:!1,samples:this._samples,label:"FluidRenderingRTTBlur-".concat(r)}),d=h.texture;d.incrementReferences();var p=new Eo(null,this._scene);if(p.name="rttBlurred"+r,p._texture=d,p.wrapU=Eo.CLAMP_ADDRESSMODE,p.wrapV=Eo.CLAMP_ADDRESSMODE,p.anisotropicFilteringLevel=1,o){var f=new Da("BilateralBlurX","fluidRenderingStandardBlur",["filterSize","blurDir"],null,1,null,a.TEXTURE_NEAREST_SAMPLINGMODE,c,!0,null,t,void 0,void 0,void 0,n);f.samples=this._samples,f.externalTextureSamplerBinding=!0,f.onApplyObservable.add((function(t){0===s._postProcessRunningIndex?t.setTexture("textureSampler",e):t._bindTexture("textureSampler",f.inputTexture.texture),t.setInt("filterSize",s.blurFilterSize),t.setFloat2("blurDir",1/s._blurTextureSizeX,0),s._postProcessRunningIndex++})),f.onSizeChangedObservable.add((function(){f._textures.forEach((function(e){e.texture.wrapU=Eo.CLAMP_ADDRESSMODE,e.texture.wrapV=Eo.CLAMP_ADDRESSMODE}))})),this._fixReusablePostProcess(f);var m=new Da("BilateralBlurY","fluidRenderingStandardBlur",["filterSize","blurDir"],null,1,null,a.TEXTURE_NEAREST_SAMPLINGMODE,c,!0,null,t,void 0,void 0,void 0,n);m.samples=this._samples,m.onApplyObservable.add((function(e){e.setInt("filterSize",s.blurFilterSize),e.setFloat2("blurDir",0,1/s._blurTextureSizeY),s._postProcessRunningIndex++})),m.onSizeChangedObservable.add((function(){m._textures.forEach((function(e){e.texture.wrapU=Eo.CLAMP_ADDRESSMODE,e.texture.wrapV=Eo.CLAMP_ADDRESSMODE}))})),this._fixReusablePostProcess(m),f.autoClear=!1,m.autoClear=!1;for(var _=[],g=0;g<2*this._blurNumIterations;++g)_[g]=1&g?m:f;return[h,p,_]}var y=["maxFilterSize","blurDir","projectedParticleConstant","depthThreshold"],v=new Da("BilateralBlurX","fluidRenderingBilateralBlur",y,null,1,null,a.TEXTURE_NEAREST_SAMPLINGMODE,c,!0,null,t,void 0,void 0,void 0,n);v.samples=this._samples,v.externalTextureSamplerBinding=!0,v.onApplyObservable.add((function(t){0===s._postProcessRunningIndex?t.setTexture("textureSampler",e):t._bindTexture("textureSampler",v.inputTexture.texture),t.setInt("maxFilterSize",s.blurMaxFilterSize),t.setFloat2("blurDir",1/s._blurTextureSizeX,0),t.setFloat("projectedParticleConstant",s._getProjectedParticleConstant()),t.setFloat("depthThreshold",s._getDepthThreshold()),s._postProcessRunningIndex++})),v.onSizeChangedObservable.add((function(){v._textures.forEach((function(e){e.texture.wrapU=Eo.CLAMP_ADDRESSMODE,e.texture.wrapV=Eo.CLAMP_ADDRESSMODE}))})),this._fixReusablePostProcess(v);var b=new Da("BilateralBlurY","fluidRenderingBilateralBlur",y,null,1,null,a.TEXTURE_NEAREST_SAMPLINGMODE,c,!0,null,t,void 0,void 0,void 0,n);for(b.samples=this._samples,b.onApplyObservable.add((function(e){e.setInt("maxFilterSize",s.blurMaxFilterSize),e.setFloat2("blurDir",0,1/s._blurTextureSizeY),e.setFloat("projectedParticleConstant",s._getProjectedParticleConstant()),e.setFloat("depthThreshold",s._getDepthThreshold()),s._postProcessRunningIndex++})),b.onSizeChangedObservable.add((function(){b._textures.forEach((function(e){e.texture.wrapU=Eo.CLAMP_ADDRESSMODE,e.texture.wrapV=Eo.CLAMP_ADDRESSMODE}))})),this._fixReusablePostProcess(b),v.autoClear=!1,b.autoClear=!1,_=[],g=0;g<2*this._blurNumIterations;++g)_[g]=1&g?b:v;return[h,p,_]},e.prototype._fixReusablePostProcess=function(e){e.isReusable()&&(e.onActivateObservable.add((function(){e._currentRenderTextureInd=(e._currentRenderTextureInd+1)%2})),e.onApplyObservable.add((function(){e._currentRenderTextureInd=(e._currentRenderTextureInd+1)%2})))},e.prototype._getProjectedParticleConstant=function(){var e,t;return this.blurFilterSize*this.particleSize*.05*(this._height/2)/Math.tan((null!==(t=null===(e=this._camera)||void 0===e?void 0:e.fov)&&void 0!==t?t:45*Math.PI/180)/2)},e.prototype._getDepthThreshold=function(){return this.particleSize/2*this.blurDepthScale},e.prototype.dispose=function(){var e,t,n,i;this.onDisposeObservable.hasObservers()&&this.onDisposeObservable.notifyObservers(this),null===(e=this._rt)||void 0===e||e.dispose(),this._rt=null,null===(t=this._texture)||void 0===t||t.dispose(),this._texture=null,null===(n=this._rtBlur)||void 0===n||n.dispose(),this._rtBlur=null,null===(i=this._textureBlurred)||void 0===i||i.dispose(),this._textureBlurred=null,this._blurPostProcesses&&(this._blurPostProcesses[0].dispose(),this._blurPostProcesses[1].dispose()),this._blurPostProcesses=null},e}();!function(e){e[e.DepthTexture=0]="DepthTexture",e[e.DepthBlurredTexture=1]="DepthBlurredTexture",e[e.ThicknessTexture=2]="ThicknessTexture",e[e.ThicknessBlurredTexture=3]="ThicknessBlurredTexture",e[e.DiffuseTexture=4]="DiffuseTexture",e[e.Normals=5]="Normals",e[e.DiffuseRendering=6]="DiffuseRendering"}(Zx||(Zx={}));var nS,iS=function(){function e(e,t){this._generateDiffuseTexture=!1,this.fluidColor=new B(.085,.6375,.765),this.density=2,this.refractionStrength=.1,this.fresnelClamp=1,this.specularPower=250,this.minimumThickness=0,this.dirLight=new C(-2,-1,1).normalize(),this._debugFeature=Zx.DepthBlurredTexture,this._debug=!1,this._enableBlurDepth=!0,this._blurDepthSizeDivisor=1,this._blurDepthFilterSize=7,this._blurDepthNumIterations=3,this._blurDepthMaxFilterSize=100,this._blurDepthDepthScale=10,this._enableBlurThickness=!0,this._blurThicknessSizeDivisor=1,this._blurThicknessFilterSize=5,this._blurThicknessNumIterations=1,this._useFixedThickness=!1,this._onUseVelocityChanged=new u,this._useVelocity=!1,this._depthMapSize=null,this._thicknessMapSize=null,this._diffuseMapSize=null,this._samples=1,this._scene=e,this._engine=e.getEngine(),this._camera=null!=t?t:e.activeCamera,this._needInitialization=!0,this._bgDepthTexture=null,this._invProjectionMatrix=new R,this._depthClearColor=new U(1e6,1e6,1e6,1),this._thicknessClearColor=new U(0,0,0,1),this._depthRenderTarget=null,this._diffuseRenderTarget=null,this._thicknessRenderTarget=null,this._renderPostProcess=null}return Object.defineProperty(e.prototype,"needInitialization",{get:function(){return this._needInitialization},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generateDiffuseTexture",{get:function(){return this._generateDiffuseTexture},set:function(e){this._generateDiffuseTexture!==e&&(this._generateDiffuseTexture=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"debugFeature",{get:function(){return this._debugFeature},set:function(e){this._debugFeature!==e&&(this._needInitialization=!0,this._debugFeature=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"debug",{get:function(){return this._debug},set:function(e){this._debug!==e&&(this._debug=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"environmentMap",{get:function(){return this._environmentMap},set:function(e){this._environmentMap!==e&&(this._needInitialization=!0,this._environmentMap=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableBlurDepth",{get:function(){return this._enableBlurDepth},set:function(e){this._enableBlurDepth!==e&&(this._enableBlurDepth=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurDepthSizeDivisor",{get:function(){return this._blurDepthSizeDivisor},set:function(e){this._blurDepthSizeDivisor!==e&&(this._blurDepthSizeDivisor=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurDepthFilterSize",{get:function(){return this._blurDepthFilterSize},set:function(e){this._blurDepthFilterSize!==e&&(this._blurDepthFilterSize=e,this._setBlurParameters())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurDepthNumIterations",{get:function(){return this._blurDepthNumIterations},set:function(e){this._blurDepthNumIterations!==e&&(this._blurDepthNumIterations=e,this._setBlurParameters())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurDepthMaxFilterSize",{get:function(){return this._blurDepthMaxFilterSize},set:function(e){this._blurDepthMaxFilterSize!==e&&(this._blurDepthMaxFilterSize=e,this._setBlurParameters())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurDepthDepthScale",{get:function(){return this._blurDepthDepthScale},set:function(e){this._blurDepthDepthScale!==e&&(this._blurDepthDepthScale=e,this._setBlurParameters())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableBlurThickness",{get:function(){return this._enableBlurThickness},set:function(e){this._enableBlurThickness!==e&&(this._enableBlurThickness=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurThicknessSizeDivisor",{get:function(){return this._blurThicknessSizeDivisor},set:function(e){this._blurThicknessSizeDivisor!==e&&(this._blurThicknessSizeDivisor=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurThicknessFilterSize",{get:function(){return this._blurThicknessFilterSize},set:function(e){this._blurThicknessFilterSize!==e&&(this._blurThicknessFilterSize=e,this._setBlurParameters())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurThicknessNumIterations",{get:function(){return this._blurThicknessNumIterations},set:function(e){this._blurThicknessNumIterations!==e&&(this._blurThicknessNumIterations=e,this._setBlurParameters())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useFixedThickness",{get:function(){return this._useFixedThickness},set:function(e){this._useFixedThickness!==e&&(this._useFixedThickness=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useVelocity",{get:function(){return this._useVelocity},set:function(e){this._useVelocity!==e&&(this._useVelocity=e,this._needInitialization=!0,this._onUseVelocityChanged.notifyObservers(this))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depthMapSize",{get:function(){return this._depthMapSize},set:function(e){this._depthMapSize!==e&&(this._depthMapSize=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thicknessMapSize",{get:function(){return this._thicknessMapSize},set:function(e){this._thicknessMapSize!==e&&(this._thicknessMapSize=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diffuseMapSize",{get:function(){return this._diffuseMapSize},set:function(e){this._diffuseMapSize!==e&&(this._diffuseMapSize=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"samples",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=e,this._needInitialization=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),e.prototype._initialize=function(){var e,t,n;this.dispose(),this._needInitialization=!1;var i=null!==(e=this._depthMapSize)&&void 0!==e?e:this._engine.getRenderWidth(),r=null!==this._depthMapSize?Math.round(this._depthMapSize*this._engine.getRenderHeight()/this._engine.getRenderWidth()):this._engine.getRenderHeight();if(this._depthRenderTarget=new tS("Depth",this._scene,i,r,i,r,a.TEXTURETYPE_FLOAT,a.TEXTUREFORMAT_RG,a.TEXTURETYPE_FLOAT,a.TEXTUREFORMAT_RG,!1,this._camera,!0,this._samples),this._initializeRenderTarget(this._depthRenderTarget),this.generateDiffuseTexture){var o=null!==(t=this._diffuseMapSize)&&void 0!==t?t:this._engine.getRenderWidth(),s=null!==this._diffuseMapSize?Math.round(this._diffuseMapSize*this._engine.getRenderHeight()/this._engine.getRenderWidth()):this._engine.getRenderHeight();this._diffuseRenderTarget=new tS("Diffuse",this._scene,o,s,0,0,a.TEXTURETYPE_UNSIGNED_BYTE,a.TEXTUREFORMAT_RGBA,a.TEXTURETYPE_UNSIGNED_BYTE,a.TEXTUREFORMAT_RGBA,!0,this._camera,!0,this._samples),this._initializeRenderTarget(this._diffuseRenderTarget)}var c=null!==(n=this._thicknessMapSize)&&void 0!==n?n:this._engine.getRenderWidth(),l=null!==this._thicknessMapSize?Math.round(this._thicknessMapSize*this._engine.getRenderHeight()/this._engine.getRenderWidth()):this._engine.getRenderHeight();this._useFixedThickness||(this._thicknessRenderTarget=new tS("Thickness",this._scene,c,l,c,l,a.TEXTURETYPE_HALF_FLOAT,a.TEXTUREFORMAT_R,a.TEXTURETYPE_HALF_FLOAT,a.TEXTUREFORMAT_R,!0,this._camera,!1,this._samples),this._initializeRenderTarget(this._thicknessRenderTarget)),this._createLiquidRenderingPostProcess()},e.prototype._setBlurParameters=function(e){void 0===e&&(e=null),null!==e&&e!==this._depthRenderTarget||this._setBlurDepthParameters(),null!==e&&e!==this._thicknessRenderTarget||this._setBlurThicknessParameters()},e.prototype._setBlurDepthParameters=function(){this._depthRenderTarget&&(this._depthRenderTarget.blurFilterSize=this.blurDepthFilterSize,this._depthRenderTarget.blurMaxFilterSize=this.blurDepthMaxFilterSize,this._depthRenderTarget.blurNumIterations=this.blurDepthNumIterations,this._depthRenderTarget.blurDepthScale=this.blurDepthDepthScale)},e.prototype._setBlurThicknessParameters=function(){this._thicknessRenderTarget&&(this._thicknessRenderTarget.blurFilterSize=this.blurThicknessFilterSize,this._thicknessRenderTarget.blurNumIterations=this.blurThicknessNumIterations)},e.prototype._initializeRenderTarget=function(e){e!==this._diffuseRenderTarget&&(e.enableBlur=e===this._depthRenderTarget?this.enableBlurDepth:this.enableBlurThickness,e.blurSizeDivisor=e===this._depthRenderTarget?this.blurDepthSizeDivisor:this.blurThicknessSizeDivisor),this._setBlurParameters(e),e.initialize()},e.prototype._createLiquidRenderingPostProcess=function(){var e,t=this,n=this._scene.getEngine(),i=["viewMatrix","projectionMatrix","invProjectionMatrix","texelSize","dirLight","cameraFar","density","refractionStrength","fresnelClamp","specularPower"],r=["depthSampler"],o=[];if(this.dispose(!0),this._camera){var s=this._depthRenderTarget.enableBlur?this._depthRenderTarget.textureBlur:this._depthRenderTarget.texture,c=new S(1/s.getSize().width,1/s.getSize().height);this._scene.useRightHandedSystem&&o.push("#define FLUIDRENDERING_RHS"),null!==this._environmentMap&&(null!==(e=this._environmentMap)&&void 0!==e?e:this._scene.environmentTexture)&&(r.push("reflectionSampler"),o.push("#define FLUIDRENDERING_ENVIRONMENT")),this._diffuseRenderTarget?(r.push("diffuseSampler"),o.push("#define FLUIDRENDERING_DIFFUSETEXTURE")):i.push("diffuseColor"),this._useVelocity&&(r.push("velocitySampler"),o.push("#define FLUIDRENDERING_VELOCITY")),this._useFixedThickness?(i.push("thickness"),r.push("bgDepthSampler"),o.push("#define FLUIDRENDERING_FIXED_THICKNESS")):(i.push("minimumThickness"),r.push("thicknessSampler")),this._debug&&(o.push("#define FLUIDRENDERING_DEBUG"),this._debugFeature===Zx.Normals?o.push("#define FLUIDRENDERING_DEBUG_SHOWNORMAL"):this._debugFeature===Zx.DiffuseRendering?o.push("#define FLUIDRENDERING_DEBUG_DIFFUSERENDERING"):(o.push("#define FLUIDRENDERING_DEBUG_TEXTURE"),r.push("debugSampler"),this._debugFeature!==Zx.DepthTexture&&this._debugFeature!==Zx.DepthBlurredTexture||o.push("#define FLUIDRENDERING_DEBUG_DEPTH"))),this._renderPostProcess=new Da("FluidRendering","fluidRenderingRender",i,r,1,null,a.TEXTURE_BILINEAR_SAMPLINGMODE,n,!1,null,a.TEXTURETYPE_UNSIGNED_BYTE,void 0,void 0,!0,void 0),this._renderPostProcess.updateEffect(o.join("\n")),this._renderPostProcess.samples=this._samples,this._renderPostProcess.onApplyObservable.add((function(e){var i,r,o,a,s,l,u,h,d,p,f,m,_,g,y,v,b,T,E,A,x,S,C;if(t._invProjectionMatrix.copyFrom(t._scene.getProjectionMatrix()),t._invProjectionMatrix.invert(),n.isWebGPU&&e.setTextureSampler("textureSamplerSampler",t._renderPostProcess.inputTexture.texture),t._depthRenderTarget.enableBlur?(e.setTexture("depthSampler",t._depthRenderTarget.textureBlur),n.isWebGPU&&e.setTextureSampler("depthSamplerSampler",null!==(a=null===(o=t._depthRenderTarget.textureBlur)||void 0===o?void 0:o.getInternalTexture())&&void 0!==a?a:null)):(e.setTexture("depthSampler",t._depthRenderTarget.texture),n.isWebGPU&&e.setTextureSampler("depthSamplerSampler",null!==(r=null===(i=t._depthRenderTarget.texture)||void 0===i?void 0:i.getInternalTexture())&&void 0!==r?r:null)),t._diffuseRenderTarget?t._diffuseRenderTarget.enableBlur?(e.setTexture("diffuseSampler",t._diffuseRenderTarget.textureBlur),n.isWebGPU&&e.setTextureSampler("diffuseSamplerSampler",null!==(h=null===(u=t._diffuseRenderTarget.textureBlur)||void 0===u?void 0:u.getInternalTexture())&&void 0!==h?h:null)):(e.setTexture("diffuseSampler",t._diffuseRenderTarget.texture),n.isWebGPU&&e.setTextureSampler("diffuseSamplerSampler",null!==(l=null===(s=t._diffuseRenderTarget.texture)||void 0===s?void 0:s.getInternalTexture())&&void 0!==l?l:null)):e.setColor3("diffuseColor",t.fluidColor),t._useFixedThickness?(e.setFloat("thickness",t.minimumThickness),e._bindTexture("bgDepthSampler",t._bgDepthTexture),n.isWebGPU&&e.setTextureSampler("bgDepthSamplerSampler",null!==(d=t._bgDepthTexture)&&void 0!==d?d:null)):(t._thicknessRenderTarget.enableBlur?(e.setTexture("thicknessSampler",t._thicknessRenderTarget.textureBlur),n.isWebGPU&&e.setTextureSampler("thicknessSamplerSampler",null!==(_=null===(m=t._thicknessRenderTarget.textureBlur)||void 0===m?void 0:m.getInternalTexture())&&void 0!==_?_:null)):(e.setTexture("thicknessSampler",t._thicknessRenderTarget.texture),n.isWebGPU&&e.setTextureSampler("thicknessSamplerSampler",null!==(f=null===(p=t._thicknessRenderTarget.texture)||void 0===p?void 0:p.getInternalTexture())&&void 0!==f?f:null)),e.setFloat("minimumThickness",t.minimumThickness)),null!==t._environmentMap){var P=null!==(g=t._environmentMap)&&void 0!==g?g:t._scene.environmentTexture;P&&(e.setTexture("reflectionSampler",P),n.isWebGPU&&e.setTextureSampler("reflectionSamplerSampler",null!==(y=null==P?void 0:P.getInternalTexture())&&void 0!==y?y:null))}if(e.setMatrix("viewMatrix",t._scene.getViewMatrix()),e.setMatrix("invProjectionMatrix",t._invProjectionMatrix),e.setMatrix("projectionMatrix",t._scene.getProjectionMatrix()),e.setVector2("texelSize",c),e.setFloat("density",t.density),e.setFloat("refractionStrength",t.refractionStrength),e.setFloat("fresnelClamp",t.fresnelClamp),e.setFloat("specularPower",t.specularPower),e.setVector3("dirLight",t.dirLight),e.setFloat("cameraFar",t._camera.maxZ),t._debug){var I=null;switch(t._debugFeature){case Zx.DepthTexture:I=t._depthRenderTarget.texture;break;case Zx.DepthBlurredTexture:I=t._depthRenderTarget.enableBlur?t._depthRenderTarget.textureBlur:t._depthRenderTarget.texture;break;case Zx.ThicknessTexture:I=null!==(b=null===(v=t._thicknessRenderTarget)||void 0===v?void 0:v.texture)&&void 0!==b?b:null;break;case Zx.ThicknessBlurredTexture:I=(null===(T=t._thicknessRenderTarget)||void 0===T?void 0:T.enableBlur)?null!==(A=null===(E=t._thicknessRenderTarget)||void 0===E?void 0:E.textureBlur)&&void 0!==A?A:null:null!==(S=null===(x=t._thicknessRenderTarget)||void 0===x?void 0:x.texture)&&void 0!==S?S:null;break;case Zx.DiffuseTexture:t._diffuseRenderTarget&&(I=t._diffuseRenderTarget.texture)}t._debugFeature!==Zx.Normals&&(e.setTexture("debugSampler",I),n.isWebGPU&&e.setTextureSampler("debugSamplerSampler",null!==(C=null==I?void 0:I.getInternalTexture())&&void 0!==C?C:null))}}))}},e.prototype._clearTargets=function(){var e,t,n;(null===(e=this._depthRenderTarget)||void 0===e?void 0:e.renderTarget)&&(this._engine.bindFramebuffer(this._depthRenderTarget.renderTarget),this._engine.clear(this._depthClearColor,!0,!0,!1),this._engine.unBindFramebuffer(this._depthRenderTarget.renderTarget)),(null===(t=this._diffuseRenderTarget)||void 0===t?void 0:t.renderTarget)&&(this._engine.bindFramebuffer(this._diffuseRenderTarget.renderTarget),this._engine.clear(this._thicknessClearColor,!0,!0,!1),this._engine.unBindFramebuffer(this._diffuseRenderTarget.renderTarget)),(null===(n=this._thicknessRenderTarget)||void 0===n?void 0:n.renderTarget)&&(this._engine.bindFramebuffer(this._thicknessRenderTarget.renderTarget),this._engine.clear(this._thicknessClearColor,!0,!1,!1),this._engine.unBindFramebuffer(this._thicknessRenderTarget.renderTarget))},e.prototype._render=function(e){var t,n,i,r,o,s;if(!this._needInitialization&&e.isReady()){var c=this._engine._currentRenderTarget;this._engine.setState(!1,void 0,void 0,void 0,!0),this._engine.setDepthBuffer(!0),this._engine.setDepthWrite(!0),this._engine.setAlphaMode(a.ALPHA_DISABLE),(null===(t=this._depthRenderTarget)||void 0===t?void 0:t.renderTarget)&&(this._engine.bindFramebuffer(this._depthRenderTarget.renderTarget),e.renderDepthTexture(),this._engine.unbindInstanceAttributes(),this._engine.unBindFramebuffer(this._depthRenderTarget.renderTarget)),(null===(n=this._diffuseRenderTarget)||void 0===n?void 0:n.renderTarget)&&(this._engine.bindFramebuffer(this._diffuseRenderTarget.renderTarget),e.renderDiffuseTexture(),this._engine.unbindInstanceAttributes(),this._engine.unBindFramebuffer(this._diffuseRenderTarget.renderTarget)),(null===(i=this._thicknessRenderTarget)||void 0===i?void 0:i.renderTarget)&&(this._engine.bindFramebuffer(this._thicknessRenderTarget.renderTarget),e.renderThicknessTexture(),this._engine.unbindInstanceAttributes(),this._engine.unBindFramebuffer(this._thicknessRenderTarget.renderTarget)),null===(r=this._depthRenderTarget)||void 0===r||r.applyBlurPostProcesses(),null===(o=this._diffuseRenderTarget)||void 0===o||o.applyBlurPostProcesses(),null===(s=this._thicknessRenderTarget)||void 0===s||s.applyBlurPostProcesses(),c&&this._engine.bindFramebuffer(c)}},e.prototype.dispose=function(e){var t,n,i,r;void 0===e&&(e=!1),e||(null===(t=this._depthRenderTarget)||void 0===t||t.dispose(),this._depthRenderTarget=null,null===(n=this._diffuseRenderTarget)||void 0===n||n.dispose(),this._diffuseRenderTarget=null,null===(i=this._thicknessRenderTarget)||void 0===i||i.dispose(),this._thicknessRenderTarget=null),this._renderPostProcess&&this._camera&&this._camera.detachPostProcess(this._renderPostProcess),null===(r=this._renderPostProcess)||void 0===r||r.dispose(),this._renderPostProcess=null,this._needInitialization=!1},e}(),rS=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r._numParticles=i,r._diffuseEffectWrapper=null,r._vertexBuffers={},r.addBuffers(n),r}return H(t,e),t.prototype.getClassName=function(){return"FluidRenderingObjectCustomParticles"},Object.defineProperty(t.prototype,"vertexBuffers",{get:function(){return this._vertexBuffers},enumerable:!1,configurable:!0}),t.prototype.addBuffers=function(e){for(var t in e){var n=void 0,i=!0;switch(t){case"velocity":n=3;break;case"offset":i=!1}this._vertexBuffers[t]=new Yn(this._engine,e[t],t,!0,!1,n,i)}},t.prototype._createEffects=function(){e.prototype._createEffects.call(this),this._diffuseEffectWrapper=new $a({engine:this._engine,useShaderStore:!0,vertexShader:"fluidRenderingParticleDiffuse",fragmentShader:"fluidRenderingParticleDiffuse",attributeNames:["position","offset","color"],uniformNames:["view","projection","size"],samplerNames:[]})},t.prototype.isReady=function(){var t,n;return this._vertexBuffers.offset||(this._vertexBuffers.offset=new Yn(this._engine,[0,0,1,0,0,1,1,1],"offset",!1,!1,2)),e.prototype.isReady.call(this)&&null!==(n=null===(t=this._diffuseEffectWrapper)||void 0===t?void 0:t.effect.isReady())&&void 0!==n&&n},Object.defineProperty(t.prototype,"numParticles",{get:function(){return this._numParticles},enumerable:!1,configurable:!0}),t.prototype.setNumParticles=function(e){this._numParticles=e},t.prototype.renderDiffuseTexture=function(){var e=this.numParticles;if(this._diffuseEffectWrapper&&0!==e){var t=this._diffuseEffectWrapper._drawWrapper,n=t.effect;this._engine.enableEffect(t),this._engine.bindBuffers(this.vertexBuffers,this.indexBuffer,n),n.setMatrix("view",this._scene.getViewMatrix()),n.setMatrix("projection",this._scene.getProjectionMatrix()),null!==this._particleSize&&n.setFloat2("size",this._particleSize,this._particleSize),this.useInstancing?this._engine.drawArraysType(a.MATERIAL_TriangleStripDrawMode,0,4,e):this._engine.drawElementsType(a.MATERIAL_TriangleFillMode,0,e)}},t.prototype.dispose=function(){var t;for(var n in e.prototype.dispose.call(this),null===(t=this._diffuseEffectWrapper)||void 0===t||t.dispose(),this._vertexBuffers)this._vertexBuffers[n].dispose();this._vertexBuffers={}},t}(Jx);Vt.ShadersStore.copyTextureToTexturePixelShader="uniform float conversion;uniform sampler2D textureSampler;varying vec2 vUV;\n#include\nvoid main(void) \n{vec4 color=texture2D(textureSampler,vUV);\n#ifdef DEPTH_TEXTURE\ngl_FragDepth=color.r;\n#else\nif (conversion==1.) {color=toLinearSpace(color);} else if (conversion==2.) {color=toGammaSpace(color);}\ngl_FragColor=color;\n#endif\n}\n",function(e){e[e.None=0]="None",e[e.ToLinearSpace=1]="ToLinearSpace",e[e.ToGammaSpace=2]="ToGammaSpace"}(nS||(nS={}));var oS=function(){function e(e,t){void 0===t&&(t=!1);var n=this;this._engine=e,this._isDepthTexture=t,this._renderer=new Za(e),this._effectWrapper=new $a({engine:e,name:"CopyTextureToTexture",fragmentShader:"copyTextureToTexture",useShaderStore:!0,uniformNames:["conversion"],samplerNames:["textureSampler"],defines:t?["#define DEPTH_TEXTURE"]:[]}),this._effectWrapper.onApplyObservable.add((function(){t&&(e.setState(!1),e.setDepthBuffer(!0),e.depthCullingState.depthMask=!0,e.depthCullingState.depthFunc=a.ALWAYS),n._textureIsInternal(n._source)?n._effectWrapper.effect._bindTexture("textureSampler",n._source):n._effectWrapper.effect.setTexture("textureSampler",n._source),n._effectWrapper.effect.setFloat("conversion",n._conversion)}))}return e.prototype._textureIsInternal=function(e){return void 0===e.getInternalTexture},e.prototype.isReady=function(){return this._effectWrapper.effect.isReady()},e.prototype.copy=function(e,t,n){if(void 0===n&&(n=nS.None),!this.isReady())return!1;this._source=e,this._conversion=n;var i=this._engine.depthCullingState.depthFunc;return this._renderer.render(this._effectWrapper,t),this._isDepthTexture&&i&&(this._engine.depthCullingState.depthFunc=i),!0},e.prototype.dispose=function(){this._effectWrapper.dispose(),this._renderer.dispose()},e}(),aS=function(){function e(e,t,n,i){void 0===i&&(i=1),this._engine=e,this._copyTextureToTexture=new oS(e,!0),this._depthRTWrapper=this._engine.createRenderTargetTexture({width:t,height:n},{generateMipMaps:!1,type:a.TEXTURETYPE_UNSIGNED_BYTE,format:a.TEXTUREFORMAT_R,samplingMode:a.TEXTURE_NEAREST_SAMPLINGMODE,generateDepthBuffer:!0,generateStencilBuffer:!1,samples:i,noColorAttachment:!0,label:"FluidRenderingDepthTextureCopyRTT"}),this._depthRTWrapper.createDepthStencilTexture(0,!1,!1,1,void 0,"FluidRenderingDepthTextureCopyRTTDepthStencil").label="FluidDepthTextureCopy".concat(t,"x").concat(n,"x").concat(i)}return Object.defineProperty(e.prototype,"depthRTWrapper",{get:function(){return this._depthRTWrapper},enumerable:!1,configurable:!0}),e.prototype.copy=function(e){return this._copyTextureToTexture.copy(e,this._depthRTWrapper)},e.prototype.dispose=function(){this._depthRTWrapper.dispose(),this._copyTextureToTexture.dispose()},e}();function sS(e){return!!e.particleSystem}Vt.ShadersStore.fluidRenderingParticleDepthVertexShader="attribute vec3 position;attribute vec2 offset;uniform mat4 view;uniform mat4 projection;uniform vec2 size;varying vec2 uv;varying vec3 viewPos;varying float sphereRadius;\n#ifdef FLUIDRENDERING_VELOCITY\nattribute vec3 velocity;varying float velocityNorm;\n#endif\nvoid main(void) {vec3 cornerPos;cornerPos.xy=vec2(offset.x-0.5,offset.y-0.5)*size;cornerPos.z=0.0;viewPos=(view*vec4(position,1.0)).xyz;gl_Position=projection*vec4(viewPos+cornerPos,1.0);uv=offset;sphereRadius=size.x/2.0;\n#ifdef FLUIDRENDERING_VELOCITY\nvelocityNorm=length(velocity);\n#endif\n}\n",Vt.ShadersStore.fluidRenderingParticleDepthPixelShader="uniform mat4 projection;varying vec2 uv;varying vec3 viewPos;varying float sphereRadius;\n#ifdef FLUIDRENDERING_VELOCITY\nvarying float velocityNorm;\n#endif\nvoid main(void) {vec3 normal;normal.xy=uv*2.0-1.0;float r2=dot(normal.xy,normal.xy);if (r2>1.0) discard;normal.z=sqrt(1.0-r2);\n#ifndef FLUIDRENDERING_RHS\nnormal.z=-normal.z;\n#endif\nvec4 realViewPos=vec4(viewPos+normal*sphereRadius,1.0);vec4 clipSpacePos=projection*realViewPos;\n#ifdef WEBGPU\ngl_FragDepth=clipSpacePos.z/clipSpacePos.w;\n#else\ngl_FragDepth=(clipSpacePos.z/clipSpacePos.w)*0.5+0.5;\n#endif\n#ifdef FLUIDRENDERING_RHS\nrealViewPos.z=-realViewPos.z;\n#endif\n#ifdef FLUIDRENDERING_VELOCITY\nglFragColor=vec4(realViewPos.z,velocityNorm,0.,1.);\n#else\nglFragColor=vec4(realViewPos.z,0.,0.,1.);\n#endif\n}\n",Vt.ShadersStore.fluidRenderingParticleThicknessVertexShader="attribute vec3 position;attribute vec2 offset;uniform mat4 view;uniform mat4 projection;uniform vec2 size;varying vec2 uv;void main(void) {vec3 cornerPos;cornerPos.xy=vec2(offset.x-0.5,offset.y-0.5)*size;cornerPos.z=0.0;vec3 viewPos=(view*vec4(position,1.0)).xyz+cornerPos;gl_Position=projection*vec4(viewPos,1.0);uv=offset;}\n",Vt.ShadersStore.fluidRenderingParticleThicknessPixelShader="uniform float particleAlpha;varying vec2 uv;void main(void) {vec3 normal;normal.xy=uv*2.0-1.0;float r2=dot(normal.xy,normal.xy);if (r2>1.0) discard;float thickness=sqrt(1.0-r2);glFragColor=vec4(vec3(particleAlpha*thickness),1.0);}\n",Vt.ShadersStore.fluidRenderingParticleDiffuseVertexShader="attribute vec3 position;attribute vec2 offset;attribute vec4 color;uniform mat4 view;uniform mat4 projection;uniform vec2 size;varying vec2 uv;varying vec3 diffuseColor;void main(void) {vec3 cornerPos;cornerPos.xy=vec2(offset.x-0.5,offset.y-0.5)*size;cornerPos.z=0.0;vec3 viewPos=(view*vec4(position,1.0)).xyz+cornerPos;gl_Position=projection*vec4(viewPos,1.0);uv=offset;diffuseColor=color.rgb;}\n",Vt.ShadersStore.fluidRenderingParticleDiffusePixelShader="uniform float particleAlpha;varying vec2 uv;varying vec3 diffuseColor;void main(void) {vec3 normal;normal.xy=uv*2.0-1.0;float r2=dot(normal.xy,normal.xy);if (r2>1.0) discard;glFragColor=vec4(diffuseColor,1.0);}\n",Vt.ShadersStore.fluidRenderingBilateralBlurPixelShader="uniform sampler2D textureSampler;uniform int maxFilterSize;uniform vec2 blurDir;uniform float projectedParticleConstant;uniform float depthThreshold;varying vec2 vUV;void main(void) {float depth=textureLod(textureSampler,vUV,0.).x;if (depth>=1e6 || depth<=0.) {glFragColor=vec4(vec3(depth),1.);return;}\nint filterSize=min(maxFilterSize,int(ceil(projectedParticleConstant/depth)));float sigma=float(filterSize)/3.0;float two_sigma2=2.0*sigma*sigma;float sigmaDepth=depthThreshold/3.0;float two_sigmaDepth2=2.0*sigmaDepth*sigmaDepth;float sum=0.;float wsum=0.;float sumVel=0.;for (int x=-filterSize; x<=filterSize; ++x) {vec2 coords=vec2(x);vec2 sampleDepthVel=textureLod(textureSampler,vUV+coords*blurDir,0.).rg;float r=dot(coords,coords);float w=exp(-r/two_sigma2);float rDepth=sampleDepthVel.r-depth;float wd=exp(-rDepth*rDepth/two_sigmaDepth2);sum+=sampleDepthVel.r*w*wd;sumVel+=sampleDepthVel.g*w*wd;wsum+=w*wd;}\nglFragColor=vec4(sum/wsum,sumVel/wsum,0.,1.);}\n",Vt.ShadersStore.fluidRenderingStandardBlurPixelShader="uniform sampler2D textureSampler;uniform int filterSize;uniform vec2 blurDir;varying vec2 vUV;void main(void) {vec4 s=textureLod(textureSampler,vUV,0.);if (s.r==0.) {glFragColor=vec4(0.,0.,0.,1.);return;}\nfloat sigma=float(filterSize)/3.0;float twoSigma2=2.0*sigma*sigma;vec4 sum=vec4(0.);float wsum=0.;for (int x=-filterSize; x<=filterSize; ++x) {vec2 coords=vec2(x);vec4 sampl=textureLod(textureSampler,vUV+coords*blurDir,0.);float w=exp(-coords.x*coords.x/twoSigma2);sum+=sampl*w;wsum+=w;}\nsum/=wsum;glFragColor=vec4(sum.rgb,1.);}\n",Vt.ShadersStore.fluidRenderingRenderPixelShader="/* disable_uniformity_analysis */\n#define IOR 1.333\n#define ETA 1.0/IOR\n#define F0 0.02\nuniform sampler2D textureSampler;uniform sampler2D depthSampler;\n#ifdef FLUIDRENDERING_DIFFUSETEXTURE\nuniform sampler2D diffuseSampler;\n#else\nuniform vec3 diffuseColor;\n#endif\n#ifdef FLUIDRENDERING_FIXED_THICKNESS\nuniform float thickness;uniform sampler2D bgDepthSampler;\n#else\nuniform float minimumThickness;uniform sampler2D thicknessSampler;\n#endif\n#ifdef FLUIDRENDERING_ENVIRONMENT\nuniform samplerCube reflectionSampler;\n#endif\n#if defined(FLUIDRENDERING_DEBUG) && defined(FLUIDRENDERING_DEBUG_TEXTURE)\nuniform sampler2D debugSampler;\n#endif\nuniform mat4 viewMatrix;uniform mat4 projectionMatrix;uniform mat4 invProjectionMatrix;uniform vec2 texelSize;uniform vec3 dirLight;uniform float cameraFar;uniform float density;uniform float refractionStrength;uniform float fresnelClamp;uniform float specularPower;varying vec2 vUV;vec3 computeViewPosFromUVDepth(vec2 texCoord,float depth) {vec4 ndc;ndc.xy=texCoord*2.0-1.0;\n#ifdef FLUIDRENDERING_RHS\nndc.z=-projectionMatrix[2].z+projectionMatrix[3].z/depth;\n#else\nndc.z=projectionMatrix[2].z+projectionMatrix[3].z/depth;\n#endif\nndc.w=1.0;vec4 eyePos=invProjectionMatrix*ndc;eyePos.xyz/=eyePos.w;return eyePos.xyz;}\nvec3 getViewPosFromTexCoord(vec2 texCoord) {float depth=textureLod(depthSampler,texCoord,0.).x;return computeViewPosFromUVDepth(texCoord,depth);}\nvoid main(void) {vec2 texCoord=vUV;\n#if defined(FLUIDRENDERING_DEBUG) && defined(FLUIDRENDERING_DEBUG_TEXTURE)\nvec4 color=texture2D(debugSampler,texCoord);\n#ifdef FLUIDRENDERING_DEBUG_DEPTH\nglFragColor=vec4(color.rgb/vec3(2.0),1.);if (color.r>0.999 && color.g>0.999) {glFragColor=texture2D(textureSampler,texCoord);}\n#else\nglFragColor=vec4(color.rgb,1.);if (color.r<0.001 && color.g<0.001 && color.b<0.001) {glFragColor=texture2D(textureSampler,texCoord);}\n#endif\nreturn;\n#endif\nvec2 depthVel=textureLod(depthSampler,texCoord,0.).rg;float depth=depthVel.r;\n#ifndef FLUIDRENDERING_FIXED_THICKNESS\nfloat thickness=texture2D(thicknessSampler,texCoord).x;\n#else\nfloat bgDepth=texture2D(bgDepthSampler,texCoord).x;float depthNonLinear=projectionMatrix[2].z+projectionMatrix[3].z/depth;depthNonLinear=depthNonLinear*0.5+0.5;\n#endif\nvec4 backColor=texture2D(textureSampler,texCoord);\n#ifndef FLUIDRENDERING_FIXED_THICKNESS\nif (depth>=cameraFar || depth<=0. || thickness<=minimumThickness) {\n#else\nif (depth>=cameraFar || depth<=0. || bgDepth<=depthNonLinear) {\n#endif\nglFragColor=backColor;return;}\nvec3 viewPos=computeViewPosFromUVDepth(texCoord,depth);vec3 ddx=getViewPosFromTexCoord(texCoord+vec2(texelSize.x,0.))-viewPos;vec3 ddy=getViewPosFromTexCoord(texCoord+vec2(0.,texelSize.y))-viewPos;vec3 ddx2=viewPos-getViewPosFromTexCoord(texCoord+vec2(-texelSize.x,0.));if (abs(ddx.z)>abs(ddx2.z)) {ddx=ddx2;}\nvec3 ddy2=viewPos-getViewPosFromTexCoord(texCoord+vec2(0.,-texelSize.y));if (abs(ddy.z)>abs(ddy2.z)) {ddy=ddy2;}\nvec3 normal=normalize(cross(ddy,ddx));\n#ifdef FLUIDRENDERING_RHS\nnormal=-normal;\n#endif\n#ifndef WEBGPU\nif(isnan(normal.x) || isnan(normal.y) || isnan(normal.z) || isinf(normal.x) || isinf(normal.y) || isinf(normal.z)) {normal=vec3(0.,0.,-1.);}\n#endif\n#if defined(FLUIDRENDERING_DEBUG) && defined(FLUIDRENDERING_DEBUG_SHOWNORMAL)\nglFragColor=vec4(normal*0.5+0.5,1.0);return;\n#endif\nvec3 rayDir=normalize(viewPos); \n#ifdef FLUIDRENDERING_DIFFUSETEXTURE\nvec3 diffuseColor=textureLod(diffuseSampler,texCoord,0.0).rgb;\n#endif\nvec3 lightDir=normalize(vec3(viewMatrix*vec4(-dirLight,0.)));vec3 H =normalize(lightDir-rayDir);float specular=pow(max(0.0,dot(H,normal)),specularPower);\n#ifdef FLUIDRENDERING_DEBUG_DIFFUSERENDERING\nfloat diffuse =max(0.0,dot(lightDir,normal))*1.0;glFragColor=vec4(vec3(0.1) /*ambient*/+vec3(0.42,0.50,1.00)*diffuse+vec3(0,0,0.2)+specular,1.);return;\n#endif\nvec3 refractionDir=refract(rayDir,normal,ETA);vec4 transmitted=textureLod(textureSampler,vec2(texCoord+refractionDir.xy*thickness*refractionStrength),0.0);vec3 transmittance=exp(-density*thickness*(1.0-diffuseColor)); \nvec3 refractionColor=transmitted.rgb*transmittance;\n#ifdef FLUIDRENDERING_ENVIRONMENT\nvec3 reflectionDir=reflect(rayDir,normal);vec3 reflectionColor=(textureCube(reflectionSampler,reflectionDir).rgb);float fresnel=clamp(F0+(1.0-F0)*pow(1.0-dot(normal,-rayDir),5.0),0.,fresnelClamp);vec3 finalColor=mix(refractionColor,reflectionColor,fresnel)+specular;\n#else\nvec3 finalColor=refractionColor+specular;\n#endif\n#ifdef FLUIDRENDERING_VELOCITY\nfloat velocity=depthVel.g;finalColor=mix(finalColor,vec3(1.0),smoothstep(0.3,1.0,velocity/6.0));\n#endif\nglFragColor=vec4(finalColor,transmitted.a);}\n",Object.defineProperty(Ci.prototype,"fluidRenderer",{get:function(){return this._fluidRenderer},set:function(e){this._fluidRenderer=e},enumerable:!0,configurable:!0}),Ci.prototype.enableFluidRenderer=function(){return this._fluidRenderer||(this._fluidRenderer=new lS(this)),this._fluidRenderer},Ci.prototype.disableFluidRenderer=function(){var e;null===(e=this._fluidRenderer)||void 0===e||e.dispose(),this._fluidRenderer=null};var cS=function(){function e(e){this.name=Jn.NAME_FLUIDRENDERER,this.scene=e}return e.prototype.register=function(){this.scene._gatherActiveCameraRenderTargetsStage.registerStep(Jn.STEP_GATHERACTIVECAMERARENDERTARGETS_FLUIDRENDERER,this,this._gatherActiveCameraRenderTargets),this.scene._afterCameraDrawStage.registerStep(Jn.STEP_AFTERCAMERADRAW_FLUIDRENDERER,this,this._afterCameraDraw)},e.prototype._gatherActiveCameraRenderTargets=function(e){var t;null===(t=this.scene.fluidRenderer)||void 0===t||t._prepareRendering()},e.prototype._afterCameraDraw=function(e){var t;null===(t=this.scene.fluidRenderer)||void 0===t||t._render(e)},e.prototype.rebuild=function(){this.scene._fluidRenderer&&(this.scene.disableFluidRenderer(),this.scene.enableFluidRenderer())},e.prototype.dispose=function(){this.scene.disableFluidRenderer()},e}(),lS=function(){function e(t){var n=this;this._scene=t,this._engine=t.getEngine(),this._onEngineResizeObserver=null,this.renderObjects=[],this.targetRenderers=[],this._cameras=new Map,e._SceneComponentInitialization(this._scene),this._onEngineResizeObserver=this._engine.onResizeObservable.add((function(){n._initialize()}))}return e._SceneComponentInitialization=function(e){var t=e._getComponent(Jn.NAME_FLUIDRENDERER);t||(t=new cS(e),e._addComponent(t))},e.prototype.recreate=function(){this._sortRenderingObjects(),this._initialize()},e.prototype.getRenderObjectFromParticleSystem=function(e){var t=this._getParticleSystemIndex(e);return-1!==t?this.renderObjects[t]:null},e.prototype.addParticleSystem=function(e,t,n,i){var r=this,o=new eS(this._scene,e);o.onParticleSizeChanged.add((function(){return r._setParticleSizeForRenderTargets()})),n||(n=new iS(this._scene,i),this.targetRenderers.push(n)),n._onUseVelocityChanged.hasObservers()||n._onUseVelocityChanged.add((function(){return r._setUseVelocityForRenderObject()})),void 0!==t&&(n.generateDiffuseTexture=t);var a={object:o,targetRenderer:n};return this.renderObjects.push(a),this._sortRenderingObjects(),this._setParticleSizeForRenderTargets(),a},e.prototype.addCustomParticles=function(e,t,n,i,r){var o=this,a=new rS(this._scene,e,t);a.onParticleSizeChanged.add((function(){return o._setParticleSizeForRenderTargets()})),i||(i=new iS(this._scene,r),this.targetRenderers.push(i)),i._onUseVelocityChanged.hasObservers()||i._onUseVelocityChanged.add((function(){return o._setUseVelocityForRenderObject()})),void 0!==n&&(i.generateDiffuseTexture=n);var s={object:a,targetRenderer:i};return this.renderObjects.push(s),this._sortRenderingObjects(),this._setParticleSizeForRenderTargets(),s},e.prototype.removeRenderObject=function(e,t){void 0===t&&(t=!0);var n=this.renderObjects.indexOf(e);return-1!==n&&(e.object.dispose(),this.renderObjects.splice(n,1),t&&this._removeUnusedTargetRenderers()?this._initialize():this._setParticleSizeForRenderTargets(),!0)},e.prototype._sortRenderingObjects=function(){this.renderObjects.sort((function(e,t){return e.object.priorityt.object.priority?1:0}))},e.prototype._removeUnusedTargetRenderers=function(){for(var e,t={},n=0;n bounds\n || pos2d.y < -bounds || pos2d.y > bounds) {\n gl_Position = vec4(0.0, 0.0, 2.0, 1.0);\n return;\n }\n\n mat3 Vrk = mat3(\n covA.x, covA.y, covA.z, \n covA.y, covB.x, covB.y,\n covA.z, covB.y, covB.z\n );\n vec2 focal = vec2(1132., 1132.);\n mat3 J = mat3(\n focal.x / camspace.z, 0., -(focal.x * camspace.x) / (camspace.z * camspace.z), \n 0., focal.y / camspace.z, -(focal.y * camspace.y) / (camspace.z * camspace.z), \n 0., 0., 0.\n );\n\n mat3 invy = mat3(1,0,0, 0,-1,0,0,0,1);\n\n mat3 T = invy * transpose(mat3(modelView)) * J;\n mat3 cov2d = transpose(T) * Vrk * T;\n\n float mid = (cov2d[0][0] + cov2d[1][1]) / 2.0;\n float radius = length(vec2((cov2d[0][0] - cov2d[1][1]) / 2.0, cov2d[0][1]));\n float lambda1 = mid + radius, lambda2 = mid - radius;\n\n if(lambda2 < 0.0) return;\n vec2 diagonalVector = normalize(vec2(cov2d[0][1], lambda1 - cov2d[0][0]));\n vec2 majorAxis = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;\n vec2 minorAxis = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);\n\n vColor = color;\n vPosition = position;\n vec2 vCenter = vec2(pos2d);\n gl_Position = vec4(\n vCenter \n + (position.x * majorAxis * 1. / viewport \n + position.y * minorAxis * 1. / viewport) * pos2d.w, pos2d.zw);\n }",e._FragmentShaderSource="\n precision highp float;\n varying vec4 vColor;\n varying vec2 vPosition;\n void main () { \n float A = -dot(vPosition, vPosition);\n if (A < -4.0) discard;\n float B = exp(A) * vColor.a;\n gl_FragColor = vec4(vColor.rgb, B);\n }",e._CreateWorker=function(e){var t,n,i=[],r=0,o=!1,a=function(){if(!o){o=!0;var s=t;!function(t){r=n.length;for(var o=new BigInt64Array(r),a=new Uint32Array(o.buffer),s=0;sthis._delay&&(this._time=this._time%this._delay,this.cellIndex+=this._direction,(this._direction>0&&this.cellIndex>this._toIndex||this._direction<0&&this.cellIndex0?this._fromIndex:this._toIndex:(this.cellIndex=this._toIndex,this._animationStarted=!1,this._onBaseAnimationEnd&&this._onBaseAnimationEnd()))))},e}());Ci.prototype._internalPickSprites=function(e,t,n,i){if(!qn)return null;var r=null;if(!i){if(!this.activeCamera)return null;i=this.activeCamera}if(this.spriteManagers&&this.spriteManagers.length>0)for(var o=0;o=r.distance))&&(r=s,n))break}}return r||new qn},Ci.prototype._internalMultiPickSprites=function(e,t,n){if(!qn)return null;var i=[];if(!n){if(!this.activeCamera)return null;n=this.activeCamera}if(this.spriteManagers&&this.spriteManagers.length>0)for(var r=0;r0&&(n=r.pickSprite(e,t,this._spritePredicate,!1,r.cameraToUseForPointers||void 0))&&n.hit&&n.pickedSprite&&n.pickedSprite.actionManager){switch(r._pickedDownSprite=n.pickedSprite,i.button){case 0:n.pickedSprite.actionManager.processTrigger(a.ACTION_OnLeftPickTrigger,z.CreateNewFromSprite(n.pickedSprite,r,i));break;case 1:n.pickedSprite.actionManager.processTrigger(a.ACTION_OnCenterPickTrigger,z.CreateNewFromSprite(n.pickedSprite,r,i));break;case 2:n.pickedSprite.actionManager.processTrigger(a.ACTION_OnRightPickTrigger,z.CreateNewFromSprite(n.pickedSprite,r,i))}n.pickedSprite.actionManager&&n.pickedSprite.actionManager.processTrigger(a.ACTION_OnPickDownTrigger,z.CreateNewFromSprite(n.pickedSprite,r,i))}return n},e.prototype._pointerUp=function(e,t,n,i,r){var o=this.scene;if(o.spriteManagers&&o.spriteManagers.length>0){var s=o.pickSprite(e,t,this._spritePredicate,!1,o.cameraToUseForPointers||void 0);s&&(s.hit&&s.pickedSprite&&s.pickedSprite.actionManager&&(s.pickedSprite.actionManager.processTrigger(a.ACTION_OnPickUpTrigger,z.CreateNewFromSprite(s.pickedSprite,o,i)),s.pickedSprite.actionManager&&(this.scene._inputManager._isPointerSwiping()||s.pickedSprite.actionManager.processTrigger(a.ACTION_OnPickTrigger,z.CreateNewFromSprite(s.pickedSprite,o,i)),r&&s.pickedSprite.actionManager.processTrigger(a.ACTION_OnDoublePickTrigger,z.CreateNewFromSprite(s.pickedSprite,o,i)))),o._pickedDownSprite&&o._pickedDownSprite.actionManager&&o._pickedDownSprite!==s.pickedSprite&&o._pickedDownSprite.actionManager.processTrigger(a.ACTION_OnPickOutTrigger,z.CreateNewFromSprite(o._pickedDownSprite,o,i)))}return n},e}();Vt.IncludesShadersStore.imageProcessingCompatibility="#ifdef IMAGEPROCESSINGPOSTPROCESS\ngl_FragColor.rgb=pow(gl_FragColor.rgb,vec3(2.2));\n#endif\n",Vt.ShadersStore.spritesPixelShader="uniform bool alphaTest;varying vec4 vColor;varying vec2 vUV;uniform sampler2D diffuseSampler;\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\n#ifdef PIXEL_PERFECT\nvec2 uvPixelPerfect(vec2 uv) {vec2 res=vec2(textureSize(diffuseSampler,0));uv=uv*res;vec2 seam=floor(uv+0.5);uv=seam+clamp((uv-seam)/fwidth(uv),-0.5,0.5);return uv/res;}\n#endif\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#ifdef PIXEL_PERFECT\nvec2 uv=uvPixelPerfect(vUV);\n#else\nvec2 uv=vUV;\n#endif\nvec4 color=texture2D(diffuseSampler,uv);float fAlphaTest=float(alphaTest);if (fAlphaTest != 0.)\n{if (color.a<0.95)\ndiscard;}\ncolor*=vColor;\n#include\ngl_FragColor=color;\n#include\n#define CUSTOM_FRAGMENT_MAIN_END\n}",Vt.ShadersStore.spritesVertexShader="attribute vec4 position;attribute vec2 options;attribute vec2 offsets;attribute vec2 inverts;attribute vec4 cellInfo;attribute vec4 color;uniform mat4 view;uniform mat4 projection;varying vec2 vUV;varying vec4 vColor;\n#include\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 viewPos=(view*vec4(position.xyz,1.0)).xyz; \nvec2 cornerPos;float angle=position.w;vec2 size=vec2(options.x,options.y);vec2 offset=offsets.xy;cornerPos=vec2(offset.x-0.5,offset.y -0.5)*size;vec3 rotatedCorner;rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);rotatedCorner.z=0.;viewPos+=rotatedCorner;gl_Position=projection*vec4(viewPos,1.0); \nvColor=color;vec2 uvOffset=vec2(abs(offset.x-inverts.x),abs(1.0-offset.y-inverts.y));vec2 uvPlace=cellInfo.xy;vec2 uvSize=cellInfo.zw;vUV.x=uvPlace.x+uvSize.x*uvOffset.x;vUV.y=uvPlace.y+uvSize.y*uvOffset.y;\n#ifdef FOG\nvFogDistance=viewPos;\n#endif\n#define CUSTOM_VERTEX_MAIN_END\n}";var pS=function(){function e(e,t,n,i){void 0===n&&(n=.01),void 0===i&&(i=null),this.blendMode=a.ALPHA_COMBINE,this.autoResetAlpha=!0,this.disableDepthWrite=!1,this.fogEnabled=!0,this._pixelPerfect=!1,this._useVAO=!1,this._useInstancing=!1,this._vertexBuffers={},this._capacity=t,this._epsilon=n,this._engine=e,this._useInstancing=e.getCaps().instancedArrays&&e._features.supportSpriteInstancing,this._useVAO=e.getCaps().vertexArrayObject&&!e.disableVertexArrayObjects,this._scene=i,this._useInstancing||this._buildIndexBuffer(),this._vertexBufferSize=this._useInstancing?16:18,this._vertexData=new Float32Array(t*this._vertexBufferSize*(this._useInstancing?1:4)),this._buffer=new Xn(e,this._vertexData,!0,this._vertexBufferSize);var r,o=this._buffer.createVertexBuffer(Yn.PositionKind,0,4,this._vertexBufferSize,this._useInstancing),s=this._buffer.createVertexBuffer("options",4,2,this._vertexBufferSize,this._useInstancing),c=6;if(this._useInstancing){var l=new Float32Array([0,0,1,0,0,1,1,1]);this._spriteBuffer=new Xn(e,l,!1,2),r=this._spriteBuffer.createVertexBuffer("offsets",0,2)}else r=this._buffer.createVertexBuffer("offsets",c,2,this._vertexBufferSize,this._useInstancing),c+=2;var u=this._buffer.createVertexBuffer("inverts",c,2,this._vertexBufferSize,this._useInstancing),h=this._buffer.createVertexBuffer("cellInfo",c+2,4,this._vertexBufferSize,this._useInstancing),d=this._buffer.createVertexBuffer(Yn.ColorKind,c+6,4,this._vertexBufferSize,this._useInstancing);this._vertexBuffers[Yn.PositionKind]=o,this._vertexBuffers.options=s,this._vertexBuffers.offsets=r,this._vertexBuffers.inverts=u,this._vertexBuffers.cellInfo=h,this._vertexBuffers[Yn.ColorKind]=d,this._createEffects()}return Object.defineProperty(e.prototype,"capacity",{get:function(){return this._capacity},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pixelPerfect",{get:function(){return this._pixelPerfect},set:function(e){this._pixelPerfect!==e&&(this._pixelPerfect=e,this._createEffects())},enumerable:!1,configurable:!0}),e.prototype._createEffects=function(){var e,t,n,i;null===(e=this._drawWrapperBase)||void 0===e||e.dispose(),null===(t=this._drawWrapperFog)||void 0===t||t.dispose(),null===(n=this._drawWrapperDepth)||void 0===n||n.dispose(),null===(i=this._drawWrapperFogDepth)||void 0===i||i.dispose(),this._drawWrapperBase=new en(this._engine),this._drawWrapperFog=new en(this._engine),this._drawWrapperDepth=new en(this._engine,!1),this._drawWrapperFogDepth=new en(this._engine,!1),this._drawWrapperBase.drawContext&&(this._drawWrapperBase.drawContext.useInstancing=this._useInstancing),this._drawWrapperFog.drawContext&&(this._drawWrapperFog.drawContext.useInstancing=this._useInstancing),this._drawWrapperDepth.drawContext&&(this._drawWrapperDepth.drawContext.useInstancing=this._useInstancing),this._drawWrapperFogDepth.drawContext&&(this._drawWrapperFogDepth.drawContext.useInstancing=this._useInstancing);var r=this._pixelPerfect?"#define PIXEL_PERFECT\n":"";this._drawWrapperBase.effect=this._engine.createEffect("sprites",[Yn.PositionKind,"options","offsets","inverts","cellInfo",Yn.ColorKind],["view","projection","textureInfos","alphaTest"],["diffuseSampler"],r),this._drawWrapperDepth.effect=this._drawWrapperBase.effect,this._drawWrapperDepth.materialContext=this._drawWrapperBase.materialContext,this._scene&&(this._drawWrapperFog.effect=this._scene.getEngine().createEffect("sprites",[Yn.PositionKind,"options","offsets","inverts","cellInfo",Yn.ColorKind],["view","projection","textureInfos","alphaTest","vFogInfos","vFogColor"],["diffuseSampler"],r+"#define FOG"),this._drawWrapperFogDepth.effect=this._drawWrapperFog.effect,this._drawWrapperFogDepth.materialContext=this._drawWrapperFog.materialContext)},e.prototype.render=function(e,t,n,i,r){if(void 0===r&&(r=null),this.texture&&this.texture.isReady()&&e.length){var o=this._drawWrapperBase,s=this._drawWrapperDepth,c=!1;this.fogEnabled&&this._scene&&this._scene.fogEnabled&&0!==this._scene.fogMode&&(o=this._drawWrapperFog,s=this._drawWrapperFogDepth,c=!0);var l=o.effect;if(l.isReady()){for(var u=this._engine,h=!(!this._scene||!this._scene.useRightHandedSystem),d=this.texture.getBaseSize(),p=Math.min(this._capacity,e.length),f=0,m=!0,_=0;_>0;t._xOffset=(t.cellIndex-l*c)*this.cellWidth/r.width,t._yOffset=l*this.cellHeight/r.height,t._xSize=this.cellWidth,t._ySize=this.cellHeight}this._vertexData[s]=t.position.x,this._vertexData[s+1]=t.position.y,this._vertexData[s+2]=t.position.z,this._vertexData[s+3]=t.angle,this._vertexData[s+4]=t.width,this._vertexData[s+5]=t.height,this._useInstancing?s-=2:(this._vertexData[s+6]=n,this._vertexData[s+7]=i),this._vertexData[s+8]=o?t.invertU?0:1:t.invertU?1:0,this._vertexData[s+9]=t.invertV?1:0,this._vertexData[s+10]=t._xOffset,this._vertexData[s+11]=t._yOffset,this._vertexData[s+12]=t._xSize/r.width,this._vertexData[s+13]=t._ySize/r.height,this._vertexData[s+14]=t.color.r,this._vertexData[s+15]=t.color.g,this._vertexData[s+16]=t.color.b,this._vertexData[s+17]=t.color.a},e.prototype._buildIndexBuffer=function(){for(var e=[],t=0,n=0;n0);var u=e.substring(0,l-1)+".json";Pn.LoadFile(u,(function(e){try{var t=JSON.parse(e),i=Reflect.ownKeys(t.frames);n._spriteMap=i,n._packedAndReady=!0,n._cellData=t.frames}catch(e){throw n._fromPacked=!1,n._packedAndReady=!1,new Error("Invalid JSON format. Please check documentation for format specifications.")}}),void 0,void 0,!1,(function(){J.Error("JSON ERROR: Unable to load JSON file."),n._fromPacked=!1,n._packedAndReady=!1}))}},e.prototype._checkTextureAlpha=function(e,t,n,i,r){if(!e.useAlphaForPicking||!this.texture)return!0;var o=this.texture.getSize();this._textureContent||(this._textureContent=new Uint8Array(o.width*o.height*4),this.texture.readPixels(0,0,this._textureContent));var a=w.Vector3[0];a.copyFrom(t.direction),a.normalize(),a.scaleInPlace(n),a.addInPlace(t.origin);var s=(a.x-i.x)/(r.x-i.x),c=1-(a.y-i.y)/(r.y-i.y),l=e._xOffset*o.width+s*e._xSize|0,u=e._yOffset*o.height+c*e._ySize|0;return this._textureContent[4*(l+u*o.width)+3]>.5},e.prototype.intersects=function(e,t,n,i){for(var r=Math.min(this.capacity,this.sprites.length),o=C.Zero(),a=C.Zero(),s=Number.MAX_VALUE,c=null,l=w.Vector3[0],u=w.Vector3[1],h=t.getViewMatrix(),d=e,p=e,f=0;f_){if(!this._checkTextureAlpha(m,d,_,o,a))continue;if(p=d,s=_,c=m,i)break}}}}if(c){var g=new qn;h.invertToRef(w.Matrix[0]),g.hit=!0,g.pickedSprite=c,g.distance=s;var y=w.Vector3[2];return y.copyFrom(p.direction),y.normalize(),y.scaleInPlace(s),p.origin.addToRef(y,l),g.pickedPoint=C.TransformCoordinates(l,w.Matrix[0]),g}return null},e.prototype.multiIntersects=function(e,t,n){for(var i,r=Math.min(this.capacity,this.sprites.length),o=C.Zero(),a=C.Zero(),s=[],c=w.Vector3[0].copyFromFloats(0,0,0),l=w.Vector3[1].copyFromFloats(0,0,0),u=t.getViewMatrix(),h=0;h0.) {mt=mod(time*animationData.z,1.0);for(float f=0.; fmt){frameID=animationData.x;break;}\nanimationData=TEXTUREFUNC(animationMap,vec2((frameID+0.5)/spriteCount,aFrameSteps*f),0.);}}\nmat4 frameData=getFrameData(frameID+0.5);vec2 frameSize=(frameData[0].zw)/spriteMapSize;vec2 offset=frameData[0].xy*sheetUnits;vec2 ratio=frameData[2].xy/frameData[0].zw;if (frameData[2].z==1.){tileUV.xy=tileUV.yx;}\nvec4 nc=texture2D(spriteSheet,tileUV*frameSize+offset);if (i==0){color=nc;} else {float alpha=min(color.a+nc.a,1.0);vec3 mixed=mix(color.xyz,nc.xyz,nc.a);color=vec4(mixed,alpha);}}\ncolor.xyz*=colorMul;gl_FragColor=color;}",Vt.ShadersStore.spriteMapVertexShader="precision highp float;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;varying vec3 vPosition;varying vec2 vUV;varying vec2 tUV;varying vec2 stageUnits;varying vec2 levelUnits;varying vec2 tileID;uniform float time;uniform mat4 worldViewProjection;uniform vec2 outputSize;uniform vec2 stageSize;uniform vec2 spriteMapSize;uniform float stageScale;void main() {vec4 p=vec4( position,1. );vPosition=p.xyz;vUV=uv;tUV=uv*stageSize; \ngl_Position=worldViewProjection*p;}";var mS,_S=function(){function e(e,t,n,i,r){var o=this;this.name=e,this.sprites=[],this.atlasJSON=t,this.sprites=this.atlasJSON.frames,this.spriteSheet=n,this.options=i,i.stageSize=i.stageSize||new S(1,1),i.outputSize=i.outputSize||i.stageSize,i.outputPosition=i.outputPosition||C.Zero(),i.outputRotation=i.outputRotation||C.Zero(),i.layerCount=i.layerCount||1,i.maxAnimationFrames=i.maxAnimationFrames||0,i.baseTile=i.baseTile||0,i.flipU=i.flipU||!1,i.colorMultiply=i.colorMultiply||new C(1,1,1),this._scene=r,this._frameMap=this._createFrameBuffer(),this._tileMaps=new Array;for(var a=0;a0&&(e+="\n\r"),e+=this._tileMaps[t]._texture._bufferView.toString();var n=document.createElement("a");n.href="data:octet/stream;charset=utf-8,"+encodeURI(e),n.target="_blank",n.download=this.name+".tilemaps",n.click(),n.remove()},e.prototype.loadTileMaps=function(e){var t=this,n=new XMLHttpRequest;n.open("GET",e);var i=this.options.layerCount||0;n.onload=function(){for(var e=n.response.split("\n\r"),r=0;r-1&&this._tasks.splice(t,1)},e.prototype._decreaseWaitingTasksCount=function(e){this._waitingTasksCount--;try{this.onProgress&&this.onProgress(this._waitingTasksCount,this._totalTasksCount,e),this.onProgressObservable.notifyObservers(new vS(this._waitingTasksCount,this._totalTasksCount,e))}catch(e){J.Error("Error running progress callbacks."),J.Log(e)}if(0===this._waitingTasksCount){try{var t=this._tasks.slice();this.onFinish&&this.onFinish(t);for(var n=0,i=t;n-1&&this._tasks.splice(o,1)}}this.onTasksDoneObservable.notifyObservers(this._tasks)}catch(e){J.Error("Error running tasks-done callbacks."),J.Log(e)}this._isLoading=!1,this.autoHideLoadingUI&&this._scene.getEngine().hideLoadingUI()}},e.prototype._runTask=function(e){var t=this,n=function(n,i){e._setErrorObject(n,i),t.onTaskError?t.onTaskError(e):e.onError||J.Error(t._formatTaskErrorMessage(e)),t.onTaskErrorObservable.notifyObservers(e),t._decreaseWaitingTasksCount(e)};e.run(this._scene,(function(){try{t.onTaskSuccess&&t.onTaskSuccess(e),t.onTaskSuccessObservable.notifyObservers(e),t._decreaseWaitingTasksCount(e)}catch(e){n("Error executing task success callbacks",e)}}),n)},e.prototype._formatTaskErrorMessage=function(e){var t="Unable to complete task "+e.name;return e.errorObject.message&&(t+=": ".concat(e.errorObject.message)),e.errorObject.exception&&(t+=": ".concat(e.errorObject.exception)),t},e.prototype.reset=function(){return this._isLoading=!1,this._tasks=new Array,this},e.prototype.load=function(){if(this._isLoading)return this;if(this._isLoading=!0,this._waitingTasksCount=this._tasks.length,this._totalTasksCount=this._tasks.length,0===this._waitingTasksCount)return this._isLoading=!1,this.onFinish&&this.onFinish(this._tasks),this.onTasksDoneObservable.notifyObservers(this._tasks),this;this.useDefaultLoadingScreen&&this._scene.getEngine().displayLoadingUI();for(var e=0;e=0&&this._meshes.splice(n,1),this._centerPosition=this._centerMesh.getAbsolutePosition().clone();for(var i=0;i0&&this._textureLoadingCallback(e)}this._currentScene.render()}},e.prototype._drag=function(e){e.stopPropagation(),e.preventDefault()},e.prototype._drop=function(e){e.stopPropagation(),e.preventDefault(),this.loadFiles(e)},e.prototype._traverseFolder=function(e,t,n,i){var r=this,o=e.createReader(),a=e.fullPath.replace(/^\//,"").replace(/(.+?)\/?$/,"$1/");o.readEntries((function(e){n.count+=e.length;for(var o=0,s=e;o0)){for(var n=[],i=[],r=e.dataTransfer?e.dataTransfer.items:null,o=0;o0&&J.ClearLogCache(),this._engine.stopRenderLoop()),ra.ShowLoadingScreen=!1,this.displayLoadingUI&&this._engine.displayLoadingUI(),this.loadAsync(this._sceneFileToLoad,this._progressCallback).then((function(t){e.useAppend?e.displayLoadingUI&&e._engine.hideLoadingUI():(e._currentScene&&e._currentScene.dispose(),e._currentScene=t,e._currentScene.executeWhenReady((function(){e.displayLoadingUI&&e._engine.hideLoadingUI(),e._engine.runRenderLoop((function(){e._renderFunction()}))}))),e._sceneLoadedCallback&&e._currentScene&&e._sceneLoadedCallback(e._sceneFileToLoad,e._currentScene)})).catch((function(t){e.displayLoadingUI&&e._engine.hideLoadingUI(),e._errorCallback&&e._errorCallback(e._sceneFileToLoad,e._currentScene,t.message)}))):J.Error("Please provide a valid .babylon file.")},e}(),NS=function(){function e(){}return e.prototype.dispose=function(){if(this._observers&&this._observables)for(var e=0;ethis.maximumSize&&(r.scale(this.step),n=!1)}}return n},t}(LS),BS=function(e){function t(t,n,i){void 0===t&&(t=0),void 0===n&&(n=2),void 0===i&&(i=.25);var r=e.call(this,t)||this;return r.priority=t,r.maximumScale=n,r.step=i,r._currentScale=-1,r._directionOffset=1,r}return H(t,e),t.prototype.getDescription=function(){return"Setting hardware scaling level to "+this._currentScale},t.prototype.apply=function(e,t){return-1===this._currentScale&&(this._currentScale=e.getEngine().getHardwareScalingLevel(),this._currentScale>this.maximumScale&&(this._directionOffset=-1)),this._currentScale+=this._directionOffset*this.step,e.getEngine().setHardwareScalingLevel(this._currentScale),1===this._directionOffset?this._currentScale>=this.maximumScale:this._currentScale<=this.maximumScale},t}(LS),US=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.getDescription=function(){return"Turning shadows on/off"},t.prototype.apply=function(e,t){return e.shadowsEnabled=t.isInImprovementMode,!0},t}(LS),kS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.getDescription=function(){return"Turning post-processes on/off"},t.prototype.apply=function(e,t){return e.postProcessesEnabled=t.isInImprovementMode,!0},t}(LS),VS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.getDescription=function(){return"Turning lens flares on/off"},t.prototype.apply=function(e,t){return e.lensFlaresEnabled=t.isInImprovementMode,!0},t}(LS),zS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.getDescription=function(){return this.onGetDescription?this.onGetDescription():"Running user defined callback"},t.prototype.apply=function(e,t){return!this.onApply||this.onApply(e,t)},t}(LS),GS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.getDescription=function(){return"Turning particles on/off"},t.prototype.apply=function(e,t){return e.particlesEnabled=t.isInImprovementMode,!0},t}(LS),HS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.getDescription=function(){return"Turning render targets off"},t.prototype.apply=function(e,t){return e.renderTargetsEnabled=t.isInImprovementMode,!0},t}(LS),jS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._canBeMerged=function(e){if(!(e instanceof no))return!1;var t=e;return!(t.isDisposed()||!t.isVisible||!t.isEnabled()||t.instances.length>0||t.skeleton||t.hasLODLevels||0===t.getTotalVertices())},t}return H(t,e),Object.defineProperty(t,"UpdateSelectionTree",{get:function(){return t._UpdateSelectionTree},set:function(e){t._UpdateSelectionTree=e},enumerable:!1,configurable:!0}),t.prototype.getDescription=function(){return"Merging similar meshes together"},t.prototype.apply=function(e,n,i){for(var r=e.meshes.slice(0),o=r.length,a=0;a=this._targetFrameRate)return this._isRunning=!1,void this.onSuccessObservable.notifyObservers(this);for(var i=!0,r=!0,o=0;o0){s.animationGroups=[];for(var p=0;p0)for(s.reflectionProbes=[],i=0;i0&&setTimeout((function(){n.stopRecording()}),1e3*t),this._fileName=e,this._recordedChunks=[],this._resolve=null,this._reject=null,this._canvas.isRecording=!0,this._mediaRecorder.start(this._options.recordChunckSize),new Promise((function(e,t){n._resolve=e,n._reject=t}))},e.prototype.dispose=function(){this._canvas=null,this._mediaRecorder=null,this._recordedChunks=[],this._fileName=null,this._resolve=null,this._reject=null},e.prototype._handleDataAvailable=function(e){e.data.size>0&&this._recordedChunks.push(e.data)},e.prototype._handleError=function(e){if(this.stopRecording(),!this._reject)throw new e.error;this._reject(e.error)},e.prototype._handleStop=function(){this.stopRecording();var e=new Blob(this._recordedChunks);this._resolve&&this._resolve(e),window.URL.createObjectURL(e),this._fileName&&Pn.Download(e,this._fileName)},e._DefaultOptions={mimeType:"video/webm",fps:25,recordChunckSize:3e3},e}(),$S=null;function JS(e,t,n,i,r,o,a){void 0===r&&(r="image/png"),void 0===o&&(o=!1);var s=rC(e,t,n),c=s.height,l=s.width;if(c&&l){$S||($S=document.createElement("canvas")),$S.width=l,$S.height=c;var u=$S.getContext("2d"),h=e.getRenderWidth()/e.getRenderHeight(),d=l,p=d/h;p>c&&(d=(p=c)*h);var f=Math.max(0,l-d)/2,m=Math.max(0,c-p)/2;t.getScene().activeCamera!==t?nC(e,t,n,(function(e){if(o){var t=new Blob([e]);Pn.DownloadBlob(t),i&&i("")}else i&&i(e)}),r,1,e.getCreationOptions().antialias,void 0,void 0,void 0,void 0,a):e.onEndFrameObservable.addOnce((function(){var t=e.getRenderingCanvas();u&&t&&u.drawImage(t,f,m,d,p),$S&&(o?(Pn.EncodeScreenshotCanvasData($S,void 0,r,void 0,a),i&&i("")):Pn.EncodeScreenshotCanvasData($S,i,r,void 0,a))}))}else J.Error("Invalid 'size' parameter !")}function eC(e,t,n,i,r){return void 0===i&&(i="image/png"),new Promise((function(o,a){JS(e,t,n,(function(e){void 0!==e?o(e):a(new Error("Data is undefined"))}),i,void 0,r)}))}function tC(e,t,n,i,r,o){return void 0===r&&(r="image/png"),new Promise((function(a){JS(e,t,{width:n,height:i},(function(){a()}),r,!0,o)}))}function nC(e,t,n,i,r,o,s,c,l,u,h,d,p){void 0===r&&(r="image/png"),void 0===o&&(o=1),void 0===s&&(s=!1),void 0===l&&(l=!1),void 0===u&&(u=!1),void 0===h&&(h=!0);var f=rC(e,t,n),m=f.height,_=f.width,g=f.finalWidth,y=f.finalHeight,v={width:_,height:m};if(m&&_){var b={width:e.getRenderWidth(),height:e.getRenderHeight()};e.setSize(_,m);var T=t.getScene(),E=new rs("screenShot",v,T,!1,!1,a.TEXTURETYPE_UNSIGNED_INT,!1,Eo.BILINEAR_SAMPLINGMODE,void 0,u,void 0,void 0,void 0,o);E.renderList=T.meshes.slice(),E.samples=o,E.renderSprites=l,E.activeCamera=t,E.forceLayerMaskCheck=h,null==p||p(E);var A=function(){E.isReadyForRendering()&&t.isReady(!0)?(e.onEndFrameObservable.addOnce((function(){g===_&&y===m?E.readPixels(void 0,void 0,void 0,!1).then((function(e){is.DumpData(_,m,e,i,r,c,!0,void 0,d),E.dispose()})):rd("pass",E.getInternalTexture(),T,void 0,void 0,void 0,g,y).then((function(t){e._readTexturePixels(t,g,y,-1,0,null,!0,!1,0,0).then((function(e){is.DumpData(g,y,e,i,r,c,!0,void 0,d),t.dispose()}))}))})),E.render(!0),T.incrementRenderId(),T.resetCachedMaterial(),e.setSize(b.width,b.height),t.getProjectionMatrix(!0),T.render()):setTimeout(A,16)},x=function(){T.incrementRenderId(),T.resetCachedMaterial(),A()};if(s){var S=new sx("antialiasing",1,T.activeCamera);E.addPostProcess(S),S.getEffect().isReady()?x():S.getEffect().onCompiled=function(){x()}}else x()}else J.Error("Invalid 'size' parameter !")}function iC(e,t,n,i,r,o,a,s,c,l,u){return void 0===i&&(i="image/png"),void 0===r&&(r=1),void 0===o&&(o=!1),void 0===s&&(s=!1),void 0===c&&(c=!1),void 0===l&&(l=!0),new Promise((function(h,d){nC(e,t,n,(function(e){void 0!==e?h(e):d(new Error("Data is undefined"))}),i,r,o,a,s,c,l,u)}))}function rC(e,t,n){var i=0,r=0,o=0,a=0;if("object"==typeof n){var s=n.precision?Math.abs(n.precision):1;n.width&&n.height?(i=n.height*s,r=n.width*s):n.width&&!n.height?(r=n.width*s,i=Math.round(r/e.getAspectRatio(t))):n.height&&!n.width?(i=n.height*s,r=Math.round(i*e.getAspectRatio(t))):(r=Math.round(e.getRenderWidth()*s),i=Math.round(r/e.getAspectRatio(t))),n.finalWidth&&n.finalHeight?(a=n.finalHeight,o=n.finalWidth):n.finalWidth&&!n.finalHeight?(o=n.finalWidth,a=Math.round(o/e.getAspectRatio(t))):n.finalHeight&&!n.finalWidth?(a=n.finalHeight,o=Math.round(a*e.getAspectRatio(t))):(o=r,a=i)}else isNaN(n)||(i=n,r=n,o=n,a=n);return r&&(r=Math.floor(r)),i&&(i=Math.floor(i)),o&&(o=Math.floor(o)),a&&(a=Math.floor(a)),{height:0|i,width:0|r,finalWidth:0|o,finalHeight:0|a}}var oC,aC={CreateScreenshot:JS,CreateScreenshotAsync:eC,CreateScreenshotWithResizeAsync:tC,CreateScreenshotUsingRenderTarget:nC,CreateScreenshotUsingRenderTargetAsync:iC};Pn.CreateScreenshot=JS,Pn.CreateScreenshotAsync=eC,Pn.CreateScreenshotUsingRenderTarget=nC,Pn.CreateScreenshotUsingRenderTargetAsync=iC,function(e){e[e.Checkbox=0]="Checkbox",e[e.Slider=1]="Slider",e[e.Vector3=2]="Vector3",e[e.Quaternion=3]="Quaternion",e[e.Color3=4]="Color3",e[e.String=5]="String",e[e.Button=6]="Button",e[e.Options=7]="Options",e[e.Tab=8]="Tab",e[e.FileButton=9]="FileButton",e[e.Vector2=10]="Vector2"}(oC||(oC={}));var sC,cC=function(){function e(e){this.byteOffset=0,this.buffer=e}return e.prototype.loadAsync=function(e){var t=this;return this.buffer.readAsync(this.byteOffset,e).then((function(e){t._dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),t._dataByteOffset=0}))},e.prototype.readUint32=function(){var e=this._dataView.getUint32(this._dataByteOffset,!0);return this._dataByteOffset+=4,this.byteOffset+=4,e},e.prototype.readUint8Array=function(e){var t=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._dataByteOffset,e);return this._dataByteOffset+=e,this.byteOffset+=e,t},e.prototype.readString=function(e){return _t(this.readUint8Array(e))},e.prototype.skipBytes=function(e){this._dataByteOffset+=e,this.byteOffset+=e},e}(),lC=function(){function e(){}return e._GetStorage=function(){try{return localStorage.setItem("test",""),localStorage.removeItem("test"),localStorage}catch(t){var e={};return{getItem:function(t){var n=e[t];return void 0===n?null:n},setItem:function(t,n){e[t]=n}}}},e.ReadString=function(e,t){var n=this._Storage.getItem(e);return null!==n?n:t},e.WriteString=function(e,t){this._Storage.setItem(e,t)},e.ReadBoolean=function(e,t){var n=this._Storage.getItem(e);return null!==n?"true"===n:t},e.WriteBoolean=function(e,t){this._Storage.setItem(e,t?"true":"false")},e.ReadNumber=function(e,t){var n=this._Storage.getItem(e);return null!==n?parseFloat(n):t},e.WriteNumber=function(e,t){this._Storage.setItem(e,t.toString())},e._Storage=e._GetStorage(),e}(),uC=function(){function e(){this._trackedScene=null}return e.prototype.track=function(e){this._trackedScene=e,ke.AllowLoadingUniqueId=!0,this._savedJSON=QS.Serialize(e),ke.AllowLoadingUniqueId=!1},e.prototype.getDelta=function(){if(!this._trackedScene)return null;var e=Eo.ForceSerializeBuffers;Eo.ForceSerializeBuffers=!1,ke.AllowLoadingUniqueId=!0;var t=QS.Serialize(this._trackedScene);ke.AllowLoadingUniqueId=!1;var n={};for(var i in t)this._compareCollections(i,this._savedJSON[i],t[i],n);return Eo.ForceSerializeBuffers=e,n},e.prototype._compareArray=function(e,t,n,i){if(0===t.length&&0===n.length)return!0;if(t.length&&!isNaN(t[0])||n.length&&!isNaN(n[0])){if(t.length!==n.length)return!1;if(0===t.length)return!0;for(var r=0;re._MAX_SEQUENCE_LENGTH)throw new Error("Sequences longer than "+e._MAX_SEQUENCE_LENGTH+" not supported.");this._alphabet=n,this._characters=t.map((function(e){return i._alphabet.getCharacterIdx(e)}))}return e.prototype.serialize=function(){return JSON.stringify(this._characters)},e.Deserialize=function(t,n){var i=new e([],n);return i._characters=JSON.parse(t),i},e.prototype.distance=function(t){return e._Distance(this,t)},e._Distance=function(t,n){var i=t._alphabet;if(i!==n._alphabet)throw new Error("Cannot Levenshtein compare Sequences built from different alphabets.");var r=t._characters,o=n._characters,a=r.length,s=o.length,c=e._CostMatrix;c[0][0]=0;for(var l=0;l.98||(C.CrossToRef(e._ForwardDir,e._InverseFromVec,e._UpDir),e._UpDir.normalize(),R.LookAtLHToRef(t,n,e._UpDir,e._LookMatrix),i.subtractToRef(n,e._FromToVec),e._FromToVec.normalize(),C.TransformNormalToRef(e._FromToVec,e._LookMatrix,r),0))},e._TokenizeSegment=function(t,n){e._BestMatch=0,e._Score=C.Dot(t,n[0]),e._BestScore=e._Score;for(var i=1;ie._BestScore&&(e._BestMatch=i,e._BestScore=e._Score);return e._BestMatch},e._ForwardDir=new C,e._InverseFromVec=new C,e._UpDir=new C,e._FromToVec=new C,e._LookMatrix=new R,e}(),dC=function(){function e(e){this.chars=new Array(e)}return e.Generate=function(t,n,i,r,o){void 0===t&&(t=64),void 0===n&&(n=256),void 0===i&&(i=.1),void 0===r&&(r=.001),void 0===o&&(o=[]);for(var a,s,c=new e(t),l=0;l1e-6&&d.scaleAndAddToRef(1/(d.lengthSquared()*s),h)})),h.scaleInPlace(a),c.chars[e].addInPlace(h),c.chars[e].normalize()};for(l=o.length;l4;o=Math.floor(o/2))r.push(t.resampleAtTargetResolution(o).tokenize(n.chars));return r},e.prototype.distance=function(e){for(var t=0,n=0;n0&&(this._averageDistance=Math.max(this._averageDistance/this._descriptors.length,e._MIN_AVERAGE_DISTANCE))},e._MIN_AVERAGE_DISTANCE=1,e}(),mC=function(){function e(){this._maximumAllowableMatchCost=4,this._nameToDescribedTrajectory=new Map}return e.prototype.serialize=function(){var e={};return e.maximumAllowableMatchCost=this._maximumAllowableMatchCost,e.vector3Alphabet=this._vector3Alphabet.serialize(),e.levenshteinAlphabet=this._levenshteinAlphabet.serialize(),e.nameToDescribedTrajectory=[],this._nameToDescribedTrajectory.forEach((function(t,n){e.nameToDescribedTrajectory.push(n),e.nameToDescribedTrajectory.push(t.serialize())})),JSON.stringify(e)},e.Deserialize=function(t){var n=JSON.parse(t),i=new e;i._maximumAllowableMatchCost=n.maximumAllowableMatchCost,i._vector3Alphabet=dC.Deserialize(n.vector3Alphabet),i._levenshteinAlphabet=sC.Alphabet.Deserialize(n.levenshteinAlphabet);for(var r=0;r=this._itemLength?NaN:this._view[e]},e.prototype.subarray=function(e,t){return e>=t||e<0?new Float32Array(0):(t>this._itemLength&&(t=this._itemLength),this._view.subarray(e,t))},e.prototype.push=function(e){this._view[this._itemLength]=e,this._itemLength++,this._itemLength>=this._view.length&&this._growArray()},e.prototype._growArray=function(){var e=Math.floor(1.5*this._view.length),t=new Float32Array(e);t.set(this._view),this._view=t},e}(),vC=1800,bC="timestamp",TC="numPoints",EC=/\r/g,AC=function(){function e(t,n){var i=this;this._scene=t,this._collectDataAtFrame=function(){var t=ct.Now-i._startingTimestamp,n=i.datasets.ids.length,r=i.datasets.startingIndices.itemLength,o=0;if(r>0){var a=i.datasets.startingIndices.at(r-1);o=a+i.datasets.data.at(a+e.NumberOfPointsOffset)+e.SliceDataOffset}if(i.datasets.startingIndices.push(o),i.datasets.data.push(t),i.datasets.data.push(n),i.datasets.ids.forEach((function(e){var t=i._strategies.get(e);t&&i.datasets.data.push(t.getData())})),i.datasetObservable.hasObservers()){for(var s=[t,n],c=0;c>n&255).toString(16)).substr(-2);return i},e.prototype.getCurrentSlice=function(){var e=this,t=[ct.Now-this._startingTimestamp,this.datasets.ids.length];this.datasets.ids.forEach((function(n){var i=e._strategies.get(n);i&&e.datasetObservable.hasObservers()&&t.push(i.getData())})),this.datasetObservable.hasObservers()&&this.datasetObservable.notifyObservers(t)},e.prototype.updateMetadata=function(e,t,n){var i=this._datasetMeta.get(e);i&&(i[t]=n,this.metadataObservable.notifyObservers(this._datasetMeta))},e.prototype.clear=function(e){this.datasets.data=new yC(vC),this.datasets.ids.length=0,this.datasets.startingIndices=new yC(vC),this._datasetMeta.clear(),this._strategies.forEach((function(e){return e.dispose()})),this._strategies.clear(),e||this._eventRestoreSet.clear(),this._hasLoadedData=!1},Object.defineProperty(e.prototype,"hasLoadedData",{get:function(){return this._hasLoadedData},enumerable:!1,configurable:!0}),e.prototype.loadFromFileData=function(t,n){var i=t.replace(EC,"").split("\n").map((function(e){return e.split(",").filter((function(e){return e.length>0}))})).filter((function(e){return e.length>0})),r=e.NumberOfPointsOffset;if(i.length<2)return!1;var o={ids:[],data:new yC(vC),startingIndices:new yC(vC)},a=i[0],s=i.slice(1);if(a.length<2||a[0]!==bC||a[r]!==TC)return!1;for(var c=new Map,l=e.SliceDataOffset;l0&&this.onFeaturePointsAddedObservable.notifyObservers(r),i.length>0&&this.onFeaturePointsUpdatedObservable.notifyObservers(i)}}},t.prototype._init=function(){this._xrSessionManager.session.trySetFeaturePointCloudEnabled&&this._xrSessionManager.session.trySetFeaturePointCloudEnabled(!0)&&(this._enabled=!0)},t.Name=Xo.FEATURE_POINTS,t.Version=1,t}(qo);Yo.AddWebXRFeature(FC.Name,(function(e){return function(){return new FC(e)}}),FC.Version);var BC,UC=0,kC=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this,t)||this;return i._options=n,i._detectedMeshes=new Map,i.onMeshAddedObservable=new u,i.onMeshRemovedObservable=new u,i.onMeshUpdatedObservable=new u,i.xrNativeFeatureName="mesh-detection",i._options.generateMeshes&&(i._options.convertCoordinateSystems=!0),i._xrSessionManager.session?i._init():i._xrSessionManager.onXRSessionInit.addOnce((function(){i._init()})),i}return H(t,e),t.prototype.detach=function(){var t=this;return!!e.prototype.detach.call(this)&&(this._xrSessionManager.isNative&&this._xrSessionManager.session.trySetMeshDetectorEnabled&&this._xrSessionManager.session.trySetMeshDetectorEnabled(!1),this._options.doNotRemoveMeshesOnSessionEnded||(this._detectedMeshes.forEach((function(e){t.onMeshRemovedObservable.notifyObservers(e)})),this._detectedMeshes.clear()),!0)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onMeshAddedObservable.clear(),this.onMeshRemovedObservable.clear(),this.onMeshUpdatedObservable.clear()},t.prototype._onXRFrame=function(e){var t,n=this;try{if(!this.attached||!e)return;var i=e.detectedMeshes||(null===(t=e.worldInformation)||void 0===t?void 0:t.detectedMeshes);if(i){var r=new Set;this._detectedMeshes.forEach((function(e,t){i.has(t)||r.add(t)})),r.forEach((function(e){var t=n._detectedMeshes.get(e);t&&(n.onMeshRemovedObservable.notifyObservers(t),n._detectedMeshes.delete(e))})),i.forEach((function(t){if(n._detectedMeshes.has(t))t.lastChangedTime===n._xrSessionManager.currentTimestamp&&(r=n._detectedMeshes.get(t))&&(n._updateVertexDataWithXRMesh(t,r,e),n.onMeshUpdatedObservable.notifyObservers(r));else{var i={id:UC++,xrMesh:t},r=n._updateVertexDataWithXRMesh(t,i,e);n._detectedMeshes.set(t,r),n.onMeshAddedObservable.notifyObservers(r)}}))}}catch(e){J.Log(e.stack)}},t.prototype._init=function(){this._xrSessionManager.isNative&&(this._xrSessionManager.session.trySetMeshDetectorEnabled&&this._xrSessionManager.session.trySetMeshDetectorEnabled(!0),this._options.preferredDetectorOptions&&this._xrSessionManager.session.trySetPreferredMeshDetectorOptions&&this._xrSessionManager.session.trySetPreferredMeshDetectorOptions(this._options.preferredDetectorOptions))},t.prototype._updateVertexDataWithXRMesh=function(e,t,n){var i;t.xrMesh=e,t.worldParentNode=this._options.worldParentNode;var r=e.vertices||e.positions;if(this._options.convertCoordinateSystems){if(this._xrSessionManager.scene.useRightHandedSystem)t.positions=r,t.normals=e.normals;else{t.positions=new Float32Array(r.length);for(var o=0;o0?BC.Received:BC.NotReceived,[2]}}))}))},t.Name=Xo.IMAGE_TRACKING,t.Version=1,t}(qo);Yo.AddWebXRFeature(VC.Name,(function(e,t){return function(){return new VC(e,t)}}),VC.Version,!1);var zC=function(e){function t(t,n){var i=e.call(this,t)||this;return i.options=n,i._domOverlayType=null,i._beforeXRSelectListener=null,i._element=null,i.xrNativeFeatureName="dom-overlay",Pn.Warn("dom-overlay is an experimental and unstable feature."),i}return H(t,e),t.prototype.attach=function(){return!(!e.prototype.attach.call(this)||!this._xrSessionManager.session.domOverlayState||null===this._xrSessionManager.session.domOverlayState.type||(this._domOverlayType=this._xrSessionManager.session.domOverlayState.type,null!==this._element&&!0===this.options.supressXRSelectEvents&&(this._beforeXRSelectListener=function(e){e.preventDefault()},this._element.addEventListener("beforexrselect",this._beforeXRSelectListener)),0))},Object.defineProperty(t.prototype,"domOverlayType",{get:function(){return this._domOverlayType},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),null!==this._element&&this._beforeXRSelectListener&&this._element.removeEventListener("beforexrselect",this._beforeXRSelectListener)},t.prototype._onXRFrame=function(e){},t.prototype.getXRSessionInitExtension=function(){return X(this,void 0,void 0,(function(){var e;return Y(this,(function(t){if(void 0===this.options.element)return Pn.Warn('"element" option must be provided to attach xr-dom-overlay feature.'),[2,{}];if("string"==typeof this.options.element){if(null===(e=document.querySelector(this.options.element)))return Pn.Warn("element not found '".concat(this.options.element,"' (not requesting xr-dom-overlay)")),[2,{}];this._element=e}else this._element=this.options.element;return[2,{domOverlay:{root:this._element}}]}))}))},t.Name=Xo.DOM_OVERLAY,t.Version=1,t}(qo);Yo.AddWebXRFeature(zC.Name,(function(e,t){return function(){return new zC(e,t)}}),zC.Version,!1);var GC=function(e){function t(n,i){var r,o,a,s,c,l,u=this;return(u=e.call(this,n)||this)._controllers={},u._currentRegistrationConfigurations=[],u._movementDirection=new I,u._tmpRotationMatrix=R.Identity(),u._tmpTranslationDirection=new C,u._tmpMovementTranslation=new C,u._tempCacheQuaternion=new I,u._attachController=function(e){if(!u._controllers[e.uniqueId]){u._controllers[e.uniqueId]={xrController:e,registeredComponents:[]};var t=u._controllers[e.uniqueId];if("tracked-pointer"===t.xrController.inputSource.targetRayMode&&t.xrController.inputSource.gamepad){var n=function(){if(e.motionController)for(var n=function(n){var i=null;if(n.allowedComponentTypes)for(var r=0,o=n.allowedComponentTypes;rn.rotationThreshold?e.x:0,t.rotateY=Math.abs(e.y)>n.rotationThreshold?e.y:0}},{allowedComponentTypes:[i_.THUMBSTICK_TYPE,i_.TOUCHPAD_TYPE],forceHandedness:"right",axisChangedHandler:function(e,t,n){t.moveX=Math.abs(e.x)>n.movementThreshold?e.x:0,t.moveY=Math.abs(e.y)>n.movementThreshold?e.y:0}}]},t.Version=1,t}(qo);Yo.AddWebXRFeature(GC.Name,(function(e,t){return function(){return new GC(e,t)}}),GC.Version,!0);var HC=function(e){function t(t,n){var i=e.call(this,t)||this;return i.options=n,i._canvasContext=null,i._reflectionCubeMap=null,i._xrLightEstimate=null,i._xrLightProbe=null,i._xrWebGLBinding=null,i._lightDirection=C.Up().negateInPlace(),i._lightColor=B.White(),i._intensity=1,i._sphericalHarmonics=new td,i._cubeMapPollTime=Date.now(),i._lightEstimationPollTime=Date.now(),i._reflectionCubeMapTextureSize=16,i.directionalLight=null,i.onReflectionCubeMapUpdatedObservable=new u,i._updateReflectionCubeMap=function(){var e;if(i._xrLightProbe){if(i.options.cubeMapPollInterval){var t=Date.now();if(t-i._cubeMapPollTime=this._samples.length)throw new Error("Index out of bounds");return this._samples[(this._idx+e)%this._samples.length]},e}(),XC=function(){function e(){this._samples=new WC(20),this._entropy=0,this.onFirstStepDetected=new u}return e.prototype.update=function(e,t,n,i){this._samples.push(e,t);var r=this._samples.at(0);if(this._entropy*=this._entropyDecayFactor,this._entropy+=S.Distance(r,this._samples.at(1)),!(this._entropy>this._entropyThreshold)){var o;for(o=this._samePointCheckStartIdx;oa&&(s=l,a=c);if(!(ao*this._squaredProjectionDistanceThreshold)){var m=w.Vector3[0];m.set(n,i,0);var _=w.Vector3[1];_.set(h.x,h.y,0);var g=C.Cross(m,_).z>0,y=r.clone(),v=r.clone();u.subtractToRef(r,h),g?(h.scaleAndAddToRef(this._axisToApexShrinkFactor,y),h.scaleAndAddToRef(this._axisToApexExtendFactor,v)):(h.scaleAndAddToRef(this._axisToApexExtendFactor,y),h.scaleAndAddToRef(this._axisToApexShrinkFactor,v)),this.onFirstStepDetected.notifyObservers({leftApex:y,rightApex:v,currentPosition:r,currentStepDirection:g?"right":"left"})}}}}},e.prototype.reset=function(){for(var e=0;ethis._maxT&&(this._maxT=this._t,this._maxTPosition.copyFromFloats(e,t)),!(this._vitalityn&&(this.onMovement.notifyObservers({deltaT:this._t-n}),n<.5&&this._t>=.5&&this.onFootfall.notifyObservers({foot:this._steppingLeft?"left":"right"})),this._t<.95*this._maxT&&(this._currentPosition.copyFromFloats(e,t),this._steppingLeft?this._leftApex.copyFrom(this._maxTPosition):this._rightApex.copyFrom(this._maxTPosition),this._reset(this._leftApex,this._rightApex,this._currentPosition,!this._steppingLeft)),this._axisLength<.03))},Object.defineProperty(e.prototype,"_vitalityThreshold",{get:function(){return.1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"forward",{get:function(){return this._forward},enumerable:!1,configurable:!0}),e}(),qC=function(){function e(t){var n=this;this._detector=new XC,this._walker=null,this._movement=new S,this._millisecondsSinceLastUpdate=e._MillisecondsPerUpdate,this.movementThisFrame=C.Zero(),this._engine=t,this._detector.onFirstStepDetected.add((function(e){n._walker||(n._walker=new YC(e.leftApex,e.rightApex,e.currentPosition,e.currentStepDirection),n._walker.onFootfall.add((function(){J.Log("Footfall!")})),n._walker.onMovement.add((function(e){n._walker.forward.scaleAndAddToRef(.024*e.deltaT,n._movement)})))}))}return Object.defineProperty(e,"_MillisecondsPerUpdate",{get:function(){return 1e3/15},enumerable:!1,configurable:!0}),e.prototype.update=function(t,n){n.y=0,n.normalize(),this._millisecondsSinceLastUpdate+=this._engine.getDeltaTime(),this._millisecondsSinceLastUpdate>=e._MillisecondsPerUpdate&&(this._millisecondsSinceLastUpdate-=e._MillisecondsPerUpdate,this._detector.update(t.x,t.z,n.x,n.z),this._walker&&(this._walker.update(t.x,t.z)||(this._walker=null)),this._movement.scaleInPlace(.85)),this.movementThisFrame.set(this._movement.x,0,this._movement.y)},e}(),KC=function(e){function t(t,n){var i=e.call(this,t)||this;return i._up=new C,i._forward=new C,i._position=new C,i._movement=new C,i._sessionManager=t,i.locomotionTarget=n.locomotionTarget,i._isLocomotionTargetWebXRCamera&&J.Warn("Using walking locomotion directly on a WebXRCamera may have unintended interactions with other XR techniques. Using an XR space parent is highly recommended"),i}return H(t,e),Object.defineProperty(t,"Name",{get:function(){return Xo.WALKING_LOCOMOTION},enumerable:!1,configurable:!0}),Object.defineProperty(t,"Version",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locomotionTarget",{get:function(){return this._locomotionTarget},set:function(e){this._locomotionTarget=e,this._isLocomotionTargetWebXRCamera="WebXRCamera"===this._locomotionTarget.getClassName()},enumerable:!1,configurable:!0}),t.prototype.isCompatible=function(){return void 0===this._sessionManager.sessionMode||"immersive-vr"===this._sessionManager.sessionMode},t.prototype.attach=function(){return!(!this.isCompatible||!e.prototype.attach.call(this)||(this._walker=new qC(this._sessionManager.scene.getEngine()),0))},t.prototype.detach=function(){return!!e.prototype.detach.call(this)&&(this._walker=null,!0)},t.prototype._onXRFrame=function(e){var t=e.getViewerPose(this._sessionManager.baseReferenceSpace);if(t){var n=this.locomotionTarget.getScene().useRightHandedSystem?1:-1,i=t.transform.matrix;this._up.copyFromFloats(i[4],i[5],n*i[6]),this._forward.copyFromFloats(i[8],i[9],n*i[10]),this._position.copyFromFloats(i[12],i[13],n*i[14]),this._forward.scaleAndAddToRef(.05,this._position),this._up.scaleAndAddToRef(-.05,this._position),this._walker.update(this._position,this._forward),this._movement.copyFrom(this._walker.movementThisFrame),this._isLocomotionTargetWebXRCamera||C.TransformNormalToRef(this._movement,this.locomotionTarget.getWorldMatrix(),this._movement),this.locomotionTarget.position.addInPlace(this._movement)}},t}(qo);Yo.AddWebXRFeature(KC.Name,(function(e,t){return function(){return new KC(e,t)}}),KC.Version,!1);var QC=function(e){function t(t,n,i,r,o,a){var s=e.call(this,t,n,i,r,a)||this;return s.getWidth=t,s.getHeight=n,s.layer=i,s.layerType=r,s.isMultiview=o,s.createRTTProvider=a,s}return H(t,e),t}(vl),ZC=function(e){function t(t,n,i){var r=e.call(this,t.scene,i)||this;return r._xrSessionManager=t,r._xrWebGLBinding=n,r.layerWrapper=i,r._lastSubImages=new Map,r._compositionLayer=i.layer,r}return H(t,e),t.prototype._getRenderTargetForSubImage=function(e,t){var n,i,r,o,a=this._lastSubImages.get(t),s="left"==t?0:1,c=null!==(n=e.colorTextureWidth)&&void 0!==n?n:e.textureWidth,l=null!==(i=e.colorTextureHeight)&&void 0!==i?i:e.textureHeight;if(!this._renderTargetTextures[s]||(null==a?void 0:a.textureWidth)!==c||(null==a?void 0:a.textureHeight)!==l){var u=void 0,h=null!==(r=e.depthStencilTextureWidth)&&void 0!==r?r:c,d=null!==(o=e.depthStencilTextureHeight)&&void 0!==o?o:l;c!==h&&l!==d||(u=e.depthStencilTexture),this._renderTargetTextures[s]=this._createRenderTargetTexture(c,l,null,e.colorTexture,u,this.layerWrapper.isMultiview),this._framebufferDimensions={framebufferWidth:c,framebufferHeight:l}}return this._lastSubImages.set(t,e),this._renderTargetTextures[s]},t.prototype._getSubImageForEye=function(e){var t=this._xrSessionManager.currentFrame;return t?this._xrWebGLBinding.getSubImage(this._compositionLayer,t,e):null},t.prototype.getRenderTargetTextureForEye=function(e){var t=this._getSubImageForEye(e);return t?this._getRenderTargetForSubImage(t,e):null},t.prototype.getRenderTargetTextureForView=function(e){return this.getRenderTargetTextureForEye(e.eye)},t.prototype._setViewportForSubImage=function(e,t){var n,i,r=null!==(n=t.colorTextureWidth)&&void 0!==n?n:t.textureWidth,o=null!==(i=t.colorTextureWidth)&&void 0!==i?i:t.textureHeight,a=t.viewport;e.x=a.x/r,e.y=a.y/o,e.width=a.width/r,e.height=a.height/o},t.prototype.trySetViewportForView=function(e,t){var n=this._lastSubImages.get(t.eye)||this._getSubImageForEye(t.eye);return!!n&&(this._setViewportForSubImage(e,n),!0)},t}(bl),$C=function(e){function t(t,n,i){var r=e.call(this,(function(){return t.textureWidth}),(function(){return t.textureHeight}),t,"XRProjectionLayer",n,(function(e){return new JC(e,i,r)}))||this;return r.layer=t,r}return H(t,e),t}(QC),JC=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.layerWrapper=i,r._projectionLayer=i.layer,r}return H(t,e),t.prototype._getSubImageForView=function(e){return this._xrWebGLBinding.getViewSubImage(this._projectionLayer,e)},t.prototype.getRenderTargetTextureForView=function(e){return this._getRenderTargetForSubImage(this._getSubImageForView(e),e.eye)},t.prototype.getRenderTargetTextureForEye=function(e){var t=this._lastSubImages.get(e);return t?this._getRenderTargetForSubImage(t,e):null},t.prototype.trySetViewportForView=function(e,t){var n=this._lastSubImages.get(t.eye)||this._getSubImageForView(t);return!!n&&(this._setViewportForSubImage(e,n),!0)},t}(ZC),eP={},tP={textureType:"texture",colorFormat:6408,depthFormat:35056,scaleFactor:1},nP=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this,t)||this;return i._options=n,i._existingLayers=[],i.xrNativeFeatureName="layers",i}return H(t,e),t.prototype.attach=function(){if(!e.prototype.attach.call(this))return!1;var t=this._xrSessionManager.scene.getEngine();this._glContext=t._gl,this._xrWebGLBinding=new XRWebGLBinding(this._xrSessionManager.session,this._glContext),this._existingLayers.length=0;var n=j({},tP),i=this._options.preferMultiviewOnInit&&t.getCaps().multiview;return i&&(n.textureType="texture-array"),this.addXRSessionLayer(this.createProjectionLayer(n,i)),!0},t.prototype.detach=function(){return!!e.prototype.detach.call(this)&&(this._existingLayers.length=0,!0)},t.prototype.createXRWebGLLayer=function(e){void 0===e&&(e=eP);var t=new XRWebGLLayer(this._xrSessionManager.session,this._glContext,e);return new Tl(t)},t.prototype.createProjectionLayer=function(e,t){if(void 0===e&&(e=tP),void 0===t&&(t=!1),t&&"texture-array"!==e.textureType)throw new Error("Projection layers can only be made multiview if they use texture arrays. Set the textureType parameter to 'texture-array'.");if(!t&&"texture-array"===e.textureType)throw new Error("We currently only support multiview rendering when the textureType parameter is set to 'texture-array'.");var n=this._xrWebGLBinding.createProjectionLayer(e);return new $C(n,t,this._xrWebGLBinding)},t.prototype.addXRSessionLayer=function(e){this.setXRSessionLayers(q(q([],this._existingLayers,!0),[e],!1))},t.prototype.setXRSessionLayers=function(e){this._existingLayers=e;var t=j({},this._xrSessionManager.session.renderState);t.baseLayer=void 0,t.layers=e.map((function(e){return e.layer})),this._xrSessionManager.updateRenderState(t),this._xrSessionManager._setBaseLayerWrapper(e.length>0?e[0]:null)},t.prototype.isCompatible=function(){return!this._xrSessionManager.isNative&&"undefined"!=typeof XRWebGLBinding&&!!XRWebGLBinding.prototype.createProjectionLayer},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._onXRFrame=function(e){},t.Name=Xo.LAYERS,t.Version=1,t}(qo);Yo.AddWebXRFeature(nP.Name,(function(e,t){return function(){return new nP(e,t)}}),nP.Version,!1);var iP=function(e){function t(t,n){var i=e.call(this,t)||this;return i.options=n,i._width=null,i._height=null,i._rawValueToMeters=null,i._normDepthBufferFromNormView=null,i._cachedDepthBuffer=null,i._cachedWebGLTexture=null,i._cachedDepthImageTexture=null,i.onGetDepthInMetersAvailable=new u,i.xrNativeFeatureName="depth-sensing",Pn.Warn("depth-sensing is an experimental and unstable feature."),i}return H(t,e),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rawValueToMeters",{get:function(){return this._rawValueToMeters},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normDepthBufferFromNormView",{get:function(){return this._normDepthBufferFromNormView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthUsage",{get:function(){switch(this._xrSessionManager.session.depthUsage){case"cpu-optimized":return"cpu";case"gpu-optimized":return"gpu"}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthDataFormat",{get:function(){switch(this._xrSessionManager.session.depthDataFormat){case"luminance-alpha":return"ushort";case"float32":return"float"}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"latestInternalTexture",{get:function(){var e,t;if(!this._cachedWebGLTexture)return null;var n=this._xrSessionManager.scene.getEngine(),i=new Xt(n,wt.Unknown);return i.isCube=!1,i.invertY=!1,i._useSRGBBuffer=!1,i.format="ushort"===this.depthDataFormat?a.TEXTUREFORMAT_LUMINANCE_ALPHA:a.TEXTUREFORMAT_RGBA,i.generateMipMaps=!1,i.type="ushort"===this.depthDataFormat?a.TEXTURETYPE_UNSIGNED_SHORT:a.TEXTURETYPE_FLOAT,i.samplingMode=a.TEXTURE_NEAREST_LINEAR,i.width=null!==(e=this.width)&&void 0!==e?e:0,i.height=null!==(t=this.height)&&void 0!==t?t:0,i._cachedWrapU=a.TEXTURE_WRAP_ADDRESSMODE,i._cachedWrapV=a.TEXTURE_WRAP_ADDRESSMODE,i._hardwareTexture=new Jt(this._cachedWebGLTexture,n._gl),i},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"latestDepthBuffer",{get:function(){return this._cachedDepthBuffer?"ushort"===this.depthDataFormat?new Uint16Array(this._cachedDepthBuffer):new Float32Array(this._cachedDepthBuffer):null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"latestDepthImageTexture",{get:function(){return this._cachedDepthImageTexture},enumerable:!1,configurable:!0}),t.prototype.attach=function(t){return!!e.prototype.attach.call(this,t)&&null!=this._xrSessionManager.session.depthDataFormat&&null!=this._xrSessionManager.session.depthUsage&&(this._glBinding=new XRWebGLBinding(this._xrSessionManager.session,this._xrSessionManager.scene.getEngine()._gl),!0)},t.prototype.dispose=function(){var e;null===(e=this._cachedDepthImageTexture)||void 0===e||e.dispose()},t.prototype._onXRFrame=function(e){var t=this._xrSessionManager.referenceSpace,n=e.getViewerPose(t);if(null!=n)for(var i=0,r=n.views;i0},e.prototype.connectTo=function(e){if(this._connectionType===e._connectionType)throw new Error("Cannot connect two points of type ".concat(this.connectionType));if(this._isSingularConnection()&&this._connectedPoint.length>0||e._isSingularConnection()&&e._connectedPoint.length>0)throw new Error("Max number of connections for point reached");this._connectedPoint.push(e),e._connectedPoint.push(this)},e.prototype.serialize=function(e){void 0===e&&(e={}),e.uniqueId=this.uniqueId,e.name=this.name,e._connectionType=this._connectionType,e.connectedPointIds=[],e.className=this.getClassName();for(var t=0,n=this._connectedPoint;t0}return e.prototype._getPathPartsAndTemplateStrings=function(e){for(var t=e.matchAll(DP),n=[],i=[],r=t.next();!r.done;){var o=r.value,a=o[1],s=o[2],c=s,l=!1;s.startsWith("{")&&s.endsWith("}")&&(l=!0,c=s.slice(1,s.length-1),-1===i.indexOf(c)&&i.push(c)),n.push({value:s,isTemplate:l,valueWithoutBraces:c,separator:a}),r=t.next()}return{pathParts:n,templateStrings:i}},e.prototype.getTemplateStrings=function(){return this._templateStrings},e.prototype.setTemplateSubstitution=function(e,t){if(-1===this._templateStrings.indexOf(e))throw new Error("Template string ".concat(e," does not exist in path ").concat(this._path));this._templateSubstitutions[e]=t},e.prototype._evaluateTemplates=function(){for(var e=0,t=this._pathParts;e0;){e(o=t.pop());for(var a=0,s=o.dataInputs;ai)this.timeRemaining.setValue(0,e),this.out._activateSignal(e),e._setExecutionVariable(this,"lastExecutedTime",r);else{var o=i-(r-n);this.timeRemaining.setValue(o,e)}},t.prototype.getClassName=function(){return"FGThrottleBlock"},t}($P);b("FGThrottleBlock",sI);var cI=function(e){function t(t){var n=e.call(this,t)||this;return n.timeout=n.registerDataInput("timeout",EP),n}return H(t,e),t.prototype._preparePendingTasks=function(e){var t=this,n=this.timeout.getValue(e);if(void 0!==n&&n>=0){var i=e._getExecutionVariable(this,"runningTimers")||[],r=e.configuration.scene,o=new E_({timeout:n,contextObservable:r.onBeforeRenderObservable,onEnded:function(){return t._onEnded(o,e)}});o.start(),i.push(o),e._setExecutionVariable(this,"runningTimers",i)}},t.prototype._execute=function(e){this._startPendingTasks(e),this.out._activateSignal(e)},t.prototype._onEnded=function(e,t){var n=t._getExecutionVariable(this,"runningTimers")||[],i=n.indexOf(e);-1!==i?n.splice(i,1):Pn.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list"),t._removePendingBlock(this),this.done._activateSignal(t)},t.prototype._cancelPendingTasks=function(e){for(var t=0,n=e._getExecutionVariable(this,"runningTimers")||[];t=this.config.numberOutputFlows&&this.config.loop)o=0;else if(o>=this.config.numberOutputFlows&&!this.config.loop)return;if(r=r.filter((function(e){return e!==o})),0===r.length)for(var a=0;a=0&&(n[r+1]=!0)}if(e._setExecutionVariable(this,"activationState",n.slice()),n.every((function(e){return e})))for(this.out._activateSignal(e),i=0;i=n&&(this.out._activateSignal(e),e._setExecutionVariable(this,"debounceCount",0))}else e._setExecutionVariable(this,"debounceCount",0)},t.prototype.getClassName=function(){return"FGDebounceBlock"},t}($P);b("FGDebounceBlock",fI);var mI=function(e){function t(t){var n=e.call(this,t)||this;return n.onOn=n._registerSignalOutput("onOn"),n.onOff=n._registerSignalOutput("onOff"),n.isOn=n.registerDataOutput("isOn",AP),n}return H(t,e),t.prototype._execute=function(e,t){var n=e._getExecutionVariable(this,"value",!1);n=!n,e._setExecutionVariable(this,"value",n),this.isOn.setValue(n,e),n?this.onOn._activateSignal(e):this.onOff._activateSignal(e)},t.prototype.getClassName=function(){return"FGFlipFlopBlock"},t}(zP);b("FGFlipFlopBlock",mI);var _I=function(e){function t(t){var n=e.call(this,t)||this;return n.config=t,n}return H(t,e),t.prototype.configure=function(){e.prototype.configure.call(this),this.outFlows=[];for(var t=0;t>t}),"".concat(OI).concat(FI),t)||this}return H(t,e),t}(II);b("".concat(OI).concat(FI),jI);var WI=function(e){function t(t){return e.call(this,EP,EP,(function(e){return Math.clz32(e)}),"".concat(OI).concat(BI),t)||this}return H(t,e),t}(RI);b("".concat(OI).concat(BI),WI);var XI=function(e){function t(t){var n=e.call(this,EP,EP,(function(e){return n._ctrz(e)}),"".concat(OI).concat(UI),t)||this;return n}return H(t,e),t.prototype._ctrz=function(e){return 0==(e>>>=0)?32:(e&=-e,31-Math.clz32(e))},t}(RI);b("".concat(OI).concat(UI),XI);var YI="FGLogic",qI="AndBlock",KI="OrBlock",QI="NotBlock",ZI=function(e){function t(t){return e.call(this,AP,AP,AP,(function(e,t){return e&&t}),"".concat(YI).concat(qI),t)||this}return H(t,e),t}(II);b("".concat(YI).concat(qI),ZI);var $I=function(e){function t(t){return e.call(this,AP,AP,AP,(function(e,t){return e||t}),"".concat(YI).concat(KI),t)||this}return H(t,e),t}(II);b("".concat(YI).concat(KI),$I);var JI=function(e){function t(t){return e.call(this,AP,AP,(function(e){return!e}),"".concat(YI).concat(QI),t)||this}return H(t,e),t}(RI);b("".concat(YI).concat(QI),JI);var eR=function(e){function t(t,n,i,r){var o=e.call(this,t,r)||this;return o._operation=n,o._className=i,o}return H(t,e),t.prototype._doOperation=function(e){return this._operation()},t.prototype.getClassName=function(){return this._className},t}(PI),tR=function(e){function t(t,n,i,r,o,a,s){var c=e.call(this,r,s)||this;return c._operation=o,c._className=a,c.a=c.registerDataInput("a",t),c.b=c.registerDataInput("b",n),c.c=c.registerDataInput("c",i),c}return H(t,e),t.prototype._doOperation=function(e){return this._operation(this.a.getValue(e),this.b.getValue(e),this.c.getValue(e))},t.prototype.getClassName=function(){return this._className},t}(PI);function nR(e){return e.getClassName?e.getClassName():""}function iR(e,t){return"Vector2"===e&&"Vector2"===t||"Vector3"===e&&"Vector3"===t||"Vector4"===e&&"Vector4"===t}var rR=function(e){function t(n){var i=e.call(this,bP,bP,bP,(function(e,t){return i._polymorphicAdd(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAdd=function(e,t){return iR(nR(e),nR(t))?e.add(t):e+t},t.prototype.getClassName=function(){return t.ClassName},t.ClassName="FGAddBlock",t}(II);b(rR.ClassName,rR);var oR=function(e){function t(n){var i=e.call(this,bP,bP,bP,(function(e,t){return i._polymorphicAdd(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAdd=function(e,t){return iR(nR(e),nR(t))?e.subtract(t):e-t},t.prototype.getClassName=function(){return t.ClassName},t.ClassName="FGSubBlock",t}(II);b(oR.ClassName,oR);var aR=function(e){function t(n){var i=e.call(this,bP,bP,bP,(function(e,t){return i._polymorphicMultiply(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicMultiply=function(e,t){return iR(nR(e),nR(t))?e.multiply(t):e*t},t.ClassName="FGMultiplyBlock",t}(II);b(aR.ClassName,aR);var sR=function(e){function t(n){var i=e.call(this,bP,bP,bP,(function(e,t){return i._polymorphicDivide(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicDivide=function(e,t){return iR(nR(e),nR(t))?e.divide(t):e/t},t.ClassName="FGDivideBlock",t}(II);b(sR.ClassName,sR);var cR=function(e){function t(n){return e.call(this,EP,(function(){return Math.random()}),t.ClassName,n)||this}return H(t,e),t.ClassName="FGRandomBlock",t}(eR);b(cR.ClassName,cR);var lR=function(e){function t(n){var i=e.call(this,bP,bP,EP,(function(e,t){return i._polymorphicDot(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicDot=function(e,t){switch(nR(e)){case"Vector2":return S.Dot(e,t);case"Vector3":return C.Dot(e,t);case"Vector4":return P.Dot(e,t);default:throw new Error("Cannot get dot product of ".concat(e," and ").concat(t))}},t.ClassName="FGDotBlock",t}(II);b(lR.ClassName,lR);var uR=function(e){function t(n){return e.call(this,EP,(function(){return Math.E}),t.ClassName,n)||this}return H(t,e),t.ClassName="FGEBlock",t}(eR);b(uR.ClassName,uR);var hR=function(e){function t(n){return e.call(this,EP,(function(){return Math.PI}),t.ClassName,n)||this}return H(t,e),t.ClassName="FGPIBlock",t}(eR);b(hR.ClassName,hR);var dR=function(e){function t(n){return e.call(this,EP,(function(){return Number.POSITIVE_INFINITY}),t.ClassName,n)||this}return H(t,e),t.ClassName="FGInfBlock",t}(eR);b(dR.ClassName,dR);var pR=function(e){function t(n){return e.call(this,EP,(function(){return Number.NaN}),t.ClassName,n)||this}return H(t,e),t.ClassName="FGNaNBlock",t}(eR);function fR(e,t){switch(nR(e)){case"Vector2":return new S(t(e.x),t(e.y));case"Vector3":return new C(t(e.x),t(e.y),t(e.z));case"Vector4":return new P(t(e.x),t(e.y),t(e.z),t(e.w));default:return t(e)}}b(pR.ClassName,pR);var mR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicAbs(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAbs=function(e){return fR(e,Math.abs)},t.ClassName="FGAbsBlock",t}(RI);b(mR.ClassName,mR);var _R=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicSign(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicSign=function(e){return fR(e,Math.sign)},t.ClassName="FGSignBlock",t}(RI);b(_R.ClassName,_R);var gR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicTrunc(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicTrunc=function(e){return fR(e,Math.trunc)},t.ClassName="FGTruncBlock",t}(RI);b(gR.ClassName,gR);var yR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicFloor(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicFloor=function(e){return fR(e,Math.floor)},t.ClassName="FGFloorBlock",t}(RI);b(yR.ClassName,yR);var vR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicCeiling(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicCeiling=function(e){return fR(e,Math.ceil)},t.ClassName="FGCeilBlock",t}(RI);b(vR.ClassName,vR);var bR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicFract(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicFract=function(e){return fR(e,(function(e){return e-Math.floor(e)}))},t.ClassName="FGFractBlock",t}(RI);b(bR.ClassName,bR);var TR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicNeg(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicNeg=function(e){return fR(e,(function(e){return-e}))},t.ClassName="FGNegBlock",t}(RI);function ER(e,t,n){switch(nR(e)){case"Vector2":return new S(n(e.x,t.x),n(e.y,t.y));case"Vector3":return new C(n(e.x,t.x),n(e.y,t.y),n(e.z,t.z));case"Vector4":return new P(n(e.x,t.x),n(e.y,t.y),n(e.z,t.z),n(e.w,t.w));default:return n(e,t)}}b(TR.ClassName,TR);var AR=function(e){function t(n){var i=e.call(this,bP,bP,bP,(function(e,t){return i._polymorphicRemainder(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicRemainder=function(e,t){return ER(e,t,(function(e,t){return e%t}))},t.ClassName="FGRemainderBlock",t}(II);b(AR.ClassName,AR);var xR=function(e){function t(n){var i=e.call(this,bP,bP,bP,(function(e,t){return i._polymorphicMin(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicMin=function(e,t){return ER(e,t,Math.min)},t.ClassName="FGMinBlock",t}(II);b(xR.ClassName,xR);var SR=function(e){function t(n){var i=e.call(this,bP,bP,bP,(function(e,t){return i._polymorphicMax(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicMax=function(e,t){return ER(e,t,Math.max)},t.ClassName="FGMaxBlock",t}(II);function CR(e,t,n){return Math.min(Math.max(e,t),n)}function PR(e,t,n,i){switch(nR(e)){case"Vector2":return new S(i(e.x,t.x,n.x),i(e.y,t.y,n.y));case"Vector3":return new C(i(e.x,t.x,n.x),i(e.y,t.y,n.y),i(e.z,t.z,n.z));case"Vector4":return new P(i(e.x,t.x,n.x),i(e.y,t.y,n.y),i(e.z,t.z,n.z),i(e.w,t.w,n.w));default:return i(e,t,n)}}b(SR.ClassName,SR);var IR=function(e){function t(n){var i=e.call(this,bP,bP,bP,bP,(function(e,t,n){return i._polymorphicClamp(e,t,n)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicClamp=function(e,t,n){return PR(e,t,n,CR)},t.ClassName="FGClampBlock",t}(tR);b(IR.ClassName,IR);var RR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicSaturate(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicSaturate=function(e){return fR(e,(function(e){return CR(e,0,1)}))},t.ClassName="FGSaturateBlock",t}(RI);b(RR.ClassName,RR);var OR=function(e){function t(n){var i=e.call(this,bP,bP,bP,bP,(function(e,t,n){return i._polymorphicInterpolate(e,t,n)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._interpolate=function(e,t,n){return(1-n)*e+n*t},t.prototype._polymorphicInterpolate=function(e,t,n){return PR(e,t,n,this._interpolate)},t.ClassName="FGInterpolateBlock",t}(tR);b(OR.ClassName,OR);var wR=function(e){function t(n){var i=e.call(this,bP,bP,AP,(function(e,t){return i._polymorphicEq(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicEq=function(e,t){return iR(nR(e),nR(t))?e.equals(t):e===t},t.ClassName="FGEqBlock",t}(II);b(wR.ClassName,wR);var MR=function(e){function t(n){var i=e.call(this,bP,bP,AP,(function(e,t){return i._polymorphicLessThan(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicLessThan=function(e,t){switch(nR(e)){case"Vector2":return e.xt.x&&e.y>t.y;case"Vector3":return e.x>t.x&&e.y>t.y&&e.z>t.z;case"Vector4":return e.x>t.x&&e.y>t.y&&e.z>t.z&&e.w>t.w;default:return e>t}},t.ClassName="FGGreaterThanBlock",t}(II);b(NR.ClassName,NR);var LR=function(e){function t(n){var i=e.call(this,bP,bP,AP,(function(e,t){return i._polymorphicGreaterThanOrEqual(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicGreaterThanOrEqual=function(e,t){switch(nR(e)){case"Vector2":return e.x>=t.x&&e.y>=t.y;case"Vector3":return e.x>=t.x&&e.y>=t.y&&e.z>=t.z;case"Vector4":return e.x>=t.x&&e.y>=t.y&&e.z>=t.z&&e.w>=t.w;default:return e>=t}},t.ClassName="FGGreaterThanOrEqualBlock",t}(II);b(LR.ClassName,LR);var FR=function(e){function t(n){var i=e.call(this,bP,AP,(function(e){return i._polymorphicIsNan(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicIsNan=function(e){switch(nR(e)){case"Vector2":return isNaN(e.x)||isNaN(e.y);case"Vector3":return isNaN(e.x)||isNaN(e.y)||isNaN(e.z);case"Vector4":return isNaN(e.x)||isNaN(e.y)||isNaN(e.z)||isNaN(e.w);default:return isNaN(e)}},t.ClassName="FGIsNanBlock",t}(RI);b(FR.ClassName,FR);var BR=function(e){function t(n){var i=e.call(this,bP,AP,(function(e){return i._polymorphicIsInf(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicIsInf=function(e){switch(nR(e)){case"Vector2":return!isFinite(e.x)||!isFinite(e.y);case"Vector3":return!isFinite(e.x)||!isFinite(e.y)||!isFinite(e.z);case"Vector4":return!(isFinite(e.x)&&isFinite(e.y)&&isFinite(e.z)&&isFinite(e.w));default:return!isFinite(e)}},t.ClassName="FGIsInfBlock",t}(RI),UR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicDegToRad(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._degToRad=function(e){return e*Math.PI/180},t.prototype._polymorphicDegToRad=function(e){return fR(e,this._degToRad)},t.ClassName="FGDegToRadBlock",t}(RI);b(UR.ClassName,UR);var kR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicRadToDeg(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._radToDeg=function(e){return 180*e/Math.PI},t.prototype._polymorphicRadToDeg=function(e){return fR(e,this._radToDeg)},t.ClassName="FGRadToDegBlock",t}(RI);b(kR.ClassName,kR);var VR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicSin(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicSin=function(e){return fR(e,Math.sin)},t.ClassName="FGSinBlock",t}(RI);b(VR.ClassName,VR);var zR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicCos(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicCos=function(e){return fR(e,Math.cos)},t.ClassName="FGCosBlock",t}(RI);b(zR.ClassName,zR);var GR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicTan(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicTan=function(e){return fR(e,Math.tan)},t.ClassName="FGTanBlock",t}(RI);b(GR.ClassName,GR);var HR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicAsin(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAsin=function(e){return fR(e,Math.asin)},t.ClassName="FGAsinBlock",t}(RI);b(HR.ClassName,HR);var jR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicAcos(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAcos=function(e){return fR(e,Math.acos)},t.ClassName="FGAcosBlock",t}(RI);b(jR.ClassName,jR);var WR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicAtan(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAtan=function(e){return fR(e,Math.atan)},t.ClassName="FGAtanBlock",t}(RI);b(WR.ClassName,WR);var XR=function(e){function t(n){var i=e.call(this,bP,bP,bP,(function(e,t){return i._polymorphicAtan2(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAtan2=function(e,t){return ER(e,t,Math.atan2)},t.ClassName="FGAtan2Block",t}(II);b(XR.ClassName,XR);var YR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicSinh(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicSinh=function(e){return fR(e,Math.sinh)},t.ClassName="FGSinhBlock",t}(RI);b(YR.ClassName,YR);var qR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicCosh(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicCosh=function(e){return fR(e,Math.cosh)},t.ClassName="FGCoshBlock",t}(RI);b(qR.ClassName,qR);var KR=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicTanh(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicTanh=function(e){return fR(e,Math.tanh)},t.ClassName="FGTanhBlock",t}(RI);b(KR.ClassName,KR);var QR=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicAsinh(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAsinh=function(e){return fR(e,Math.asinh)},t.ClassName="FGAsinhBlock",t}(RI);b(QR.ClassName,QR);var ZR=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicAcosh(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAcosh=function(e){return fR(e,Math.acosh)},t.ClassName="FGAcoshBlock",t}(RI);b(ZR.ClassName,ZR);var $R=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicAtanh(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicAtanh=function(e){return fR(e,Math.atanh)},t.ClassName="FGAtanhBlock",t}(RI);b($R.ClassName,$R);var JR=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicExp(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicExp=function(e){return fR(e,Math.exp)},t.ClassName="FGExpBlock",t}(RI);b(JR.ClassName,JR);var eO=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicLog(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicLog=function(e){return fR(e,Math.log)},t.ClassName="FGLogBlock",t}(RI);b(eO.ClassName,eO);var tO=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicLog2(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicLog2=function(e){return fR(e,Math.log2)},t.ClassName="FGLog2Block",t}(RI);b(tO.ClassName,tO);var nO=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicLog10(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicLog10=function(e){return fR(e,Math.log10)},t.ClassName="FGLog10Block",t}(RI);b(nO.ClassName,nO);var iO=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicSqrt(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicSqrt=function(e){return fR(e,Math.sqrt)},t.ClassName="FGSqrtBlock",t}(RI);b(iO.ClassName,iO);var rO=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicCubeRoot(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicCubeRoot=function(e){return fR(e,Math.cbrt)},t.ClassName="FGCubeRootBlock",t}(RI);b(rO.ClassName,rO);var oO=function(e){function t(n){var i=e.call(this,bP,EP,EP,(function(e,t){return i._polymorphicPow(e,t)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicPow=function(e,t){return ER(e,t,Math.pow)},t.ClassName="FGPowBlock",t}(II);b(oO.ClassName,oO);var aO=function(e){function t(n){var i=e.call(this,bP,EP,(function(e){return i._polymorphicLength(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicLength=function(e){switch(nR(e)){case"Vector2":case"Vector3":case"Vector4":return e.length();default:throw new Error("Cannot compute length of value ".concat(e))}},t.ClassName="FGLengthBlock",t}(RI);b(aO.ClassName,aO);var sO=function(e){function t(n){var i=e.call(this,bP,bP,(function(e){return i._polymorphicNormalize(e)}),t.ClassName,n)||this;return i}return H(t,e),t.prototype._polymorphicNormalize=function(e){switch(nR(e)){case"Vector2":case"Vector3":case"Vector4":return e.normalize();default:throw new Error("Cannot normalize value ".concat(e))}},t.ClassName="FGNormalizeBlock",t}(RI);b(sO.ClassName,sO);var cO=function(e){function t(n){return e.call(this,SP,SP,SP,(function(e,t){return C.Cross(e,t)}),t.ClassName,n)||this}return H(t,e),t.ClassName="FGCrossBlock",t}(II);b(cO.ClassName,cO);var lO=function(e){function t(n){return e.call(this,xP,EP,xP,(function(e,t){return S.Transform(e,R.RotationZ(t))}),t.ClassName,n)||this}return H(t,e),t.ClassName="FGRotate2DBlock",t}(II);b(lO.ClassName,lO);var uO=function(e){function t(n){return e.call(this,SP,SP,EP,SP,(function(e,t,n){return C.TransformCoordinates(e,R.RotationAxis(t,n))}),t.ClassName,n)||this}return H(t,e),t.ClassName="FGRotate3DBlock",t}(tR);b(uO.ClassName,uO);var hO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype._preparePendingTasks=function(e){var t=this;if(!e._getExecutionVariable(this,"sceneReadyObserver")){var n=e.configuration.scene.onReadyObservable.add((function(){t._execute(e)}));e._setExecutionVariable(this,"sceneReadyObserver",n)}},t.prototype._cancelPendingTasks=function(e){var t=e._getExecutionVariable(this,"sceneReadyObserver");e.configuration.scene.onReadyObservable.remove(t),e._deleteExecutionVariable(this,"sceneReadyObserver")},t.prototype.getClassName=function(){return t.ClassName},t.ClassName="FGSceneReadyEventBlock",t}(HP);b("FGSceneReadyEventBlock",hO);var dO=function(e){function t(t){var n=e.call(this,t)||this;return n.config=t,n}return H(t,e),t.prototype.configure=function(){e.prototype.configure.call(this);for(var t=0;t{"use strict";e.exports=function(e,i){i||(i={});var r,o,a,s,c,l,u,h,d,p,f,m=null==i.cutoff?.25:i.cutoff,_=null==i.radius?8:i.radius,g=i.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!i.width||!i.height)throw Error("For raw data width and height should be provided by options");r=i.width,o=i.height,s=e,l=i.stride?i.stride:Math.floor(e.length/r/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=(h=e).getContext("2d"),r=h.width,o=h.height,s=(d=u.getImageData(0,0,r,o)).data,l=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(u=e,r=(h=e.canvas).width,o=h.height,s=(d=u.getImageData(0,0,r,o)).data,l=4):window.ImageData&&e instanceof window.ImageData&&(d=e,r=e.width,o=e.height,s=d.data,l=4);if(a=Math.max(r,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(c=s,s=Array(r*o),p=0,f=Math.floor(c.length/l);p{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>s});var i=n(81),r=n.n(i),o=n(645),a=n.n(o)()(r());a.push([e.id,"/* stylelint-disable */\nhtml,\nbody {\n width: 100%;\n height: 100%;\n}\ninput::-ms-clear,\ninput::-ms-reveal {\n display: none;\n}\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nhtml {\n font-family: sans-serif;\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n -ms-overflow-style: scrollbar;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n@-ms-viewport {\n width: device-width;\n}\nbody {\n margin: 0;\n}\n[tabindex='-1']:focus {\n outline: none;\n}\nhr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n margin-top: 0;\n margin-bottom: 0.5em;\n font-weight: 500;\n}\np {\n margin-top: 0;\n margin-bottom: 1em;\n}\nabbr[title],\nabbr[data-original-title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline;\n text-decoration: underline dotted;\n border-bottom: 0;\n cursor: help;\n}\naddress {\n margin-bottom: 1em;\n font-style: normal;\n line-height: inherit;\n}\ninput[type='text'],\ninput[type='password'],\ninput[type='number'],\ntextarea {\n -webkit-appearance: none;\n}\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1em;\n}\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\ndt {\n font-weight: 500;\n}\ndd {\n margin-bottom: 0.5em;\n margin-left: 0;\n}\nblockquote {\n margin: 0 0 1em;\n}\ndfn {\n font-style: italic;\n}\nb,\nstrong {\n font-weight: bolder;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\nsup {\n top: -0.5em;\n}\npre,\ncode,\nkbd,\nsamp {\n font-size: 1em;\n font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;\n}\npre {\n margin-top: 0;\n margin-bottom: 1em;\n overflow: auto;\n}\nfigure {\n margin: 0 0 1em;\n}\nimg {\n vertical-align: middle;\n border-style: none;\n}\na,\narea,\nbutton,\n[role='button'],\ninput:not([type='range']),\nlabel,\nselect,\nsummary,\ntextarea {\n touch-action: manipulation;\n}\ntable {\n border-collapse: collapse;\n}\ncaption {\n padding-top: 0.75em;\n padding-bottom: 0.3em;\n text-align: left;\n caption-side: bottom;\n}\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0;\n color: inherit;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n}\nbutton,\ninput {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml [type='button'],\n[type='reset'],\n[type='submit'] {\n -webkit-appearance: button;\n}\nbutton::-moz-focus-inner,\n[type='button']::-moz-focus-inner,\n[type='reset']::-moz-focus-inner,\n[type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\ninput[type='radio'],\ninput[type='checkbox'] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type='date'],\ninput[type='time'],\ninput[type='datetime-local'],\ninput[type='month'] {\n -webkit-appearance: listbox;\n}\ntextarea {\n overflow: auto;\n resize: vertical;\n}\nfieldset {\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n}\nlegend {\n display: block;\n width: 100%;\n max-width: 100%;\n margin-bottom: 0.5em;\n padding: 0;\n color: inherit;\n font-size: 1.5em;\n line-height: inherit;\n white-space: normal;\n}\nprogress {\n vertical-align: baseline;\n}\n[type='number']::-webkit-inner-spin-button,\n[type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n[type='search'] {\n outline-offset: -2px;\n -webkit-appearance: none;\n}\n[type='search']::-webkit-search-cancel-button,\n[type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n::-webkit-file-upload-button {\n font: inherit;\n -webkit-appearance: button;\n}\noutput {\n display: inline-block;\n}\nsummary {\n display: list-item;\n}\ntemplate {\n display: none;\n}\n[hidden] {\n display: none !important;\n}\nmark {\n padding: 0.2em;\n background-color: #feffe6;\n}\n",""]);const s=a},857:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var i=n(81),r=n.n(i),o=n(645),a=n.n(o),s=n(667),c=n.n(s),l=new URL(n(231),n.b),u=a()(r()),h=c()(l);u.push([e.id,`/* packages/widgets/Source/shared.css */\n.cesium-svgPath-svg {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.cesium-button {\n display: inline-block;\n position: relative;\n background: #303336;\n border: 1px solid #444;\n color: #edffff;\n fill: #edffff;\n border-radius: 4px;\n padding: 5px 12px;\n margin: 2px 3px;\n cursor: pointer;\n overflow: hidden;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.cesium-button:focus {\n color: #fff;\n fill: #fff;\n border-color: #ea4;\n outline: none;\n}\n.cesium-button:hover {\n color: #fff;\n fill: #fff;\n background: #48b;\n border-color: #aef;\n box-shadow: 0 0 8px #fff;\n}\n.cesium-button:active {\n color: #000;\n fill: #000;\n background: #adf;\n border-color: #fff;\n box-shadow: 0 0 8px #fff;\n}\n.cesium-button:disabled,\n.cesium-button-disabled,\n.cesium-button-disabled:focus,\n.cesium-button-disabled:hover,\n.cesium-button-disabled:active {\n background: #303336;\n border-color: #444;\n color: #646464;\n fill: #646464;\n box-shadow: none;\n cursor: default;\n}\n.cesium-button option {\n background-color: #000;\n color: #eee;\n}\n.cesium-button option:disabled {\n color: #777;\n}\n.cesium-button input,\n.cesium-button label {\n cursor: pointer;\n}\n.cesium-button input {\n vertical-align: sub;\n}\n.cesium-toolbar-button {\n box-sizing: border-box;\n width: 32px;\n height: 32px;\n border-radius: 14%;\n padding: 0;\n vertical-align: middle;\n z-index: 0;\n}\n.cesium-performanceDisplay-defaultContainer {\n position: absolute;\n top: 50px;\n right: 10px;\n text-align: right;\n}\n.cesium-performanceDisplay {\n background-color: rgba(40, 40, 40, 0.7);\n padding: 7px;\n border-radius: 5px;\n border: 1px solid #444;\n font: bold 12px sans-serif;\n}\n.cesium-performanceDisplay-fps {\n color: #e52;\n}\n.cesium-performanceDisplay-throttled {\n color: #a42;\n}\n.cesium-performanceDisplay-ms {\n color: #de3;\n}\n\n/* packages/widgets/Source/Animation/Animation.css */\n.cesium-animation-theme {\n visibility: hidden;\n display: block;\n position: absolute;\n z-index: -100;\n}\n.cesium-animation-themeNormal {\n color: #222;\n}\n.cesium-animation-themeHover {\n color: #4488b0;\n}\n.cesium-animation-themeSelect {\n color: #242;\n}\n.cesium-animation-themeDisabled {\n color: #333;\n}\n.cesium-animation-themeKnob {\n color: #222;\n}\n.cesium-animation-themePointer {\n color: #2e2;\n}\n.cesium-animation-themeSwoosh {\n color: #8ac;\n}\n.cesium-animation-themeSwooshHover {\n color: #aef;\n}\n.cesium-animation-svgText {\n fill: #edffff;\n font-family: Sans-Serif;\n font-size: 15px;\n text-anchor: middle;\n}\n.cesium-animation-blank {\n fill: #000;\n fill-opacity: 0.01;\n stroke: none;\n}\n.cesium-animation-rectButton {\n cursor: pointer;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.cesium-animation-rectButton .cesium-animation-buttonGlow {\n fill: #fff;\n stroke: none;\n display: none;\n}\n.cesium-animation-rectButton:hover .cesium-animation-buttonGlow {\n display: block;\n}\n.cesium-animation-rectButton .cesium-animation-buttonPath {\n fill: #edffff;\n}\n.cesium-animation-rectButton .cesium-animation-buttonMain {\n stroke: #444;\n stroke-width: 1.2;\n}\n.cesium-animation-rectButton:hover .cesium-animation-buttonMain {\n stroke: #aef;\n}\n.cesium-animation-rectButton:active .cesium-animation-buttonMain {\n fill: #abd6ff;\n}\n.cesium-animation-buttonDisabled {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.cesium-animation-buttonDisabled .cesium-animation-buttonMain {\n stroke: #555;\n}\n.cesium-animation-buttonDisabled .cesium-animation-buttonPath {\n fill: #818181;\n}\n.cesium-animation-buttonDisabled .cesium-animation-buttonGlow {\n display: none;\n}\n.cesium-animation-buttonToggled .cesium-animation-buttonGlow {\n display: block;\n fill: #2e2;\n}\n.cesium-animation-buttonToggled .cesium-animation-buttonMain {\n stroke: #2e2;\n}\n.cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow {\n fill: #fff;\n}\n.cesium-animation-buttonToggled:hover .cesium-animation-buttonMain {\n stroke: #2e2;\n}\n.cesium-animation-shuttleRingG {\n cursor: pointer;\n}\n.cesium-animation-shuttleRingPointer {\n cursor: pointer;\n}\n.cesium-animation-shuttleRingPausePointer {\n cursor: pointer;\n}\n.cesium-animation-shuttleRingBack {\n fill: #181818;\n fill-opacity: 0.8;\n stroke: #333;\n stroke-width: 1.2;\n}\n.cesium-animation-shuttleRingSwoosh line {\n stroke: #8ac;\n stroke-width: 3;\n stroke-opacity: 0.2;\n stroke-linecap: round;\n}\n.cesium-animation-knobOuter {\n cursor: pointer;\n stroke: #444;\n stroke-width: 1.2;\n}\n.cesium-animation-knobInner {\n cursor: pointer;\n}\n\n/* packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.css */\n.cesium-baseLayerPicker-selected {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n}\n.cesium-baseLayerPicker-dropDown {\n display: block;\n position: absolute;\n box-sizing: content-box;\n top: auto;\n right: 0;\n width: 320px;\n max-height: 500px;\n margin-top: 5px;\n background-color: rgba(38, 38, 38, 0.75);\n border: 1px solid #444;\n padding: 6px;\n overflow: auto;\n border-radius: 10px;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n transform: translate(0, -20%);\n visibility: hidden;\n opacity: 0;\n transition:\n visibility 0s 0.2s,\n opacity 0.2s ease-in,\n transform 0.2s ease-in;\n}\n.cesium-baseLayerPicker-dropDown-visible {\n transform: translate(0, 0);\n visibility: visible;\n opacity: 1;\n transition: opacity 0.2s ease-out, transform 0.2s ease-out;\n}\n.cesium-baseLayerPicker-sectionTitle {\n display: block;\n font-family: sans-serif;\n font-size: 16pt;\n text-align: left;\n color: #edffff;\n margin-bottom: 4px;\n}\n.cesium-baseLayerPicker-choices {\n margin-bottom: 5px;\n}\n.cesium-baseLayerPicker-categoryTitle {\n color: #edffff;\n font-size: 11pt;\n}\n.cesium-baseLayerPicker-choices {\n display: block;\n border: 1px solid #888;\n border-radius: 5px;\n padding: 5px 0;\n}\n.cesium-baseLayerPicker-item {\n display: inline-block;\n vertical-align: top;\n margin: 2px 5px;\n width: 64px;\n text-align: center;\n cursor: pointer;\n}\n.cesium-baseLayerPicker-itemLabel {\n display: block;\n font-family: sans-serif;\n font-size: 8pt;\n text-align: center;\n vertical-align: middle;\n color: #edffff;\n cursor: pointer;\n word-wrap: break-word;\n}\n.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemLabel,\n.cesium-baseLayerPicker-item:focus .cesium-baseLayerPicker-itemLabel {\n text-decoration: underline;\n}\n.cesium-baseLayerPicker-itemIcon {\n display: inline-block;\n position: relative;\n width: inherit;\n height: auto;\n background-size: 100% 100%;\n border: solid 1px #444;\n border-radius: 9px;\n color: #edffff;\n margin: 0;\n padding: 0;\n cursor: pointer;\n box-sizing: border-box;\n}\n.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon {\n border-color: #fff;\n box-shadow: 0 0 8px #fff, 0 0 8px #fff;\n}\n.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel {\n color: rgb(189, 236, 248);\n}\n.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemIcon {\n border: double 4px rgb(189, 236, 248);\n}\n\n/* packages/engine/Source/Widget/CesiumWidget.css */\n.cesium-widget {\n font-family: sans-serif;\n font-size: 16px;\n overflow: hidden;\n display: block;\n position: relative;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.cesium-widget,\n.cesium-widget canvas {\n width: 100%;\n height: 100%;\n touch-action: none;\n}\n.cesium-widget-credits {\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n color: #fff;\n font-size: 10px;\n text-shadow: 0px 0px 2px #000000;\n padding-right: 5px;\n}\n.cesium-widget-credits a,\n.cesium-widget-credits a:visited {\n color: #fff;\n}\n.cesium-widget-errorPanel {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n text-align: center;\n background: rgba(0, 0, 0, 0.7);\n z-index: 99999;\n}\n.cesium-widget-errorPanel:before {\n display: inline-block;\n vertical-align: middle;\n height: 100%;\n content: "";\n}\n.cesium-widget-errorPanel-content {\n width: 75%;\n max-width: 500px;\n display: inline-block;\n text-align: left;\n vertical-align: middle;\n border: 1px solid #510c00;\n border-radius: 7px;\n background-color: #f0d9d5;\n font-size: 14px;\n color: #510c00;\n}\n.cesium-widget-errorPanel-content.expanded {\n max-width: 75%;\n}\n.cesium-widget-errorPanel-header {\n font-size: 18px;\n font-family:\n "Open Sans",\n Verdana,\n Geneva,\n sans-serif;\n background: #d69d93;\n border-bottom: 2px solid #510c00;\n padding-bottom: 10px;\n border-radius: 3px 3px 0 0;\n padding: 15px;\n}\n.cesium-widget-errorPanel-scroll {\n overflow: auto;\n font-family:\n "Open Sans",\n Verdana,\n Geneva,\n sans-serif;\n white-space: pre-wrap;\n padding: 0 15px;\n margin: 10px 0 20px 0;\n}\n.cesium-widget-errorPanel-buttonPanel {\n padding: 0 15px;\n margin: 10px 0 20px 0;\n text-align: right;\n}\n.cesium-widget-errorPanel-buttonPanel button {\n border-color: #510c00;\n background: #d69d93;\n color: #202020;\n margin: 0;\n}\n.cesium-widget-errorPanel-buttonPanel button:focus {\n border-color: #510c00;\n background: #f0d9d5;\n color: #510c00;\n}\n.cesium-widget-errorPanel-buttonPanel button:hover {\n border-color: #510c00;\n background: #f0d9d5;\n color: #510c00;\n}\n.cesium-widget-errorPanel-buttonPanel button:active {\n border-color: #510c00;\n background: #b17b72;\n color: #510c00;\n}\n.cesium-widget-errorPanel-more-details {\n text-decoration: underline;\n cursor: pointer;\n}\n.cesium-widget-errorPanel-more-details:hover {\n color: #2b0700;\n}\n\n/* packages/widgets/Source/CesiumInspector/CesiumInspector.css */\n.cesium-cesiumInspector {\n border-radius: 5px;\n transition: width ease-in-out 0.25s;\n background: rgba(48, 51, 54, 0.8);\n border: 1px solid #444;\n color: #edffff;\n display: inline-block;\n position: relative;\n padding: 4px 12px;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n}\n.cesium-cesiumInspector-button {\n text-align: center;\n font-size: 11pt;\n}\n.cesium-cesiumInspector-visible .cesium-cesiumInspector-button {\n border-bottom: 1px solid #aaa;\n padding-bottom: 3px;\n}\n.cesium-cesiumInspector input:enabled,\n.cesium-cesiumInspector-button {\n cursor: pointer;\n}\n.cesium-cesiumInspector-visible {\n width: 185px;\n height: auto;\n}\n.cesium-cesiumInspector-hidden {\n width: 122px;\n height: 17px;\n}\n.cesium-cesiumInspector-sectionContent {\n max-height: 600px;\n}\n.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionContent {\n max-height: 0;\n padding: 0 !important;\n overflow: hidden;\n}\n.cesium-cesiumInspector-dropDown {\n margin: 5px 0;\n font-family: sans-serif;\n font-size: 10pt;\n width: 185px;\n}\n.cesium-cesiumInspector-frustumStatistics {\n padding-left: 10px;\n padding: 5px;\n background-color: rgba(80, 80, 80, 0.75);\n}\n.cesium-cesiumInspector-pickButton {\n background-color: rgba(0, 0, 0, 0.3);\n border: 1px solid #444;\n color: #edffff;\n border-radius: 5px;\n padding: 3px 7px;\n cursor: pointer;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n margin: 0 auto;\n}\n.cesium-cesiumInspector-pickButton:focus {\n outline: none;\n}\n.cesium-cesiumInspector-pickButton:active,\n.cesium-cesiumInspector-pickButtonHighlight {\n color: #000;\n background: #adf;\n border-color: #fff;\n box-shadow: 0 0 8px #fff;\n}\n.cesium-cesiumInspector-center {\n text-align: center;\n}\n.cesium-cesiumInspector-sectionHeader {\n font-weight: bold;\n font-size: 10pt;\n margin: 0;\n cursor: pointer;\n}\n.cesium-cesiumInspector-pickSection {\n border: 1px solid #aaa;\n border-radius: 5px;\n padding: 3px;\n margin-bottom: 5px;\n}\n.cesium-cesiumInspector-sectionContent {\n margin-bottom: 10px;\n transition: max-height 0.25s;\n}\n.cesium-cesiumInspector-tileText {\n padding-bottom: 10px;\n border-bottom: 1px solid #aaa;\n}\n.cesium-cesiumInspector-relativeText {\n padding-top: 10px;\n}\n.cesium-cesiumInspector-sectionHeader::before {\n margin-right: 5px;\n content: "-";\n width: 1ch;\n display: inline-block;\n}\n.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionHeader::before {\n content: "+";\n}\n\n/* packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspector.css */\nul.cesium-cesiumInspector-statistics {\n margin: 0;\n padding-top: 3px;\n padding-bottom: 3px;\n}\nul.cesium-cesiumInspector-statistics + ul.cesium-cesiumInspector-statistics {\n border-top: 1px solid #aaa;\n}\n.cesium-cesiumInspector-slider {\n margin-top: 5px;\n}\n.cesium-cesiumInspector-slider input[type=number] {\n text-align: left;\n background-color: #222;\n outline: none;\n border: 1px solid #444;\n color: #edffff;\n width: 100px;\n border-radius: 3px;\n padding: 1px;\n margin-left: 10px;\n cursor: auto;\n}\n.cesium-cesiumInspector-slider input[type=number]::-webkit-outer-spin-button,\n.cesium-cesiumInspector-slider input[type=number]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.cesium-cesiumInspector-slider input[type=range] {\n margin-left: 5px;\n vertical-align: middle;\n}\n.cesium-cesiumInspector-hide .cesium-cesiumInspector-styleEditor {\n display: none;\n}\n.cesium-cesiumInspector-styleEditor {\n padding: 10px;\n border-radius: 5px;\n background: rgba(48, 51, 54, 0.8);\n border: 1px solid #444;\n}\n.cesium-cesiumInspector-styleEditor textarea {\n width: 100%;\n height: 300px;\n background: transparent;\n color: #edffff;\n border: none;\n padding: 0;\n white-space: pre;\n overflow-wrap: normal;\n overflow-x: auto;\n}\n.cesium-3DTilesInspector {\n width: 300px;\n pointer-events: all;\n}\n.cesium-3DTilesInspector-statistics {\n font-size: 11px;\n}\n.cesium-3DTilesInspector-disabledElementsInfo {\n margin: 5px 0 0 0;\n padding: 0 0 0 20px;\n color: #eed202;\n}\n.cesium-3DTilesInspector div,\n.cesium-3DTilesInspector input[type=range] {\n width: 100%;\n box-sizing: border-box;\n}\n.cesium-cesiumInspector-error {\n color: #ff9e9e;\n overflow: auto;\n}\n.cesium-3DTilesInspector .cesium-cesiumInspector-section {\n margin-top: 3px;\n}\n.cesium-3DTilesInspector .cesium-cesiumInspector-sectionHeader + .cesium-cesiumInspector-show {\n border-top: 1px solid white;\n}\ninput.cesium-cesiumInspector-url {\n overflow: hidden;\n white-space: nowrap;\n overflow-x: scroll;\n background-color: transparent;\n color: white;\n outline: none;\n border: none;\n height: 1em;\n width: 100%;\n}\n.cesium-cesiumInspector .field-group {\n display: table;\n}\n.cesium-cesiumInspector .field-group > label {\n display: table-cell;\n font-weight: bold;\n}\n.cesium-cesiumInspector .field-group > .field {\n display: table-cell;\n width: 100%;\n}\n\n/* packages/widgets/Source/VoxelInspector/VoxelInspector.css */\n.cesium-VoxelInspector {\n width: 300px;\n pointer-events: all;\n}\n.cesium-VoxelInspector div,\n.cesium-VoxelInspector input[type=range] {\n width: 100%;\n box-sizing: border-box;\n}\n.cesium-VoxelInspector .cesium-cesiumInspector-section {\n margin-top: 3px;\n}\n.cesium-VoxelInspector .cesium-cesiumInspector-sectionHeader + .cesium-cesiumInspector-show {\n border-top: 1px solid white;\n}\n\n/* packages/widgets/Source/FullscreenButton/FullscreenButton.css */\n.cesium-button.cesium-fullscreenButton {\n display: block;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0;\n}\n\n/* packages/widgets/Source/VRButton/VRButton.css */\n.cesium-button.cesium-vrButton {\n display: block;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0;\n}\n\n/* packages/widgets/Source/Geocoder/Geocoder.css */\n.cesium-viewer-geocoderContainer .cesium-geocoder-input {\n border: solid 1px #444;\n background-color: rgba(40, 40, 40, 0.7);\n color: white;\n display: inline-block;\n vertical-align: middle;\n width: 0;\n height: 32px;\n margin: 0;\n padding: 0 32px 0 0;\n border-radius: 0;\n box-sizing: border-box;\n transition: width ease-in-out 0.25s, background-color 0.2s ease-in-out;\n -webkit-appearance: none;\n}\n.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input {\n border-color: #aef;\n box-shadow: 0 0 8px #fff;\n}\n.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus {\n border-color: #ea4;\n background-color: rgba(15, 15, 15, 0.9);\n box-shadow: none;\n outline: none;\n}\n.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input,\n.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,\n.cesium-viewer-geocoderContainer .cesium-geocoder-input-wide {\n padding-left: 4px;\n width: 250px;\n}\n.cesium-viewer-geocoderContainer .search-results {\n position: absolute;\n background-color: #000;\n color: #eee;\n overflow-y: auto;\n opacity: 0.8;\n width: 100%;\n}\n.cesium-viewer-geocoderContainer .search-results ul {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.cesium-viewer-geocoderContainer .search-results ul li {\n font-size: 14px;\n padding: 3px 10px;\n}\n.cesium-viewer-geocoderContainer .search-results ul li:hover {\n cursor: pointer;\n}\n.cesium-viewer-geocoderContainer .search-results ul li.active {\n background: #48b;\n}\n.cesium-geocoder-searchButton {\n background-color: #303336;\n display: inline-block;\n position: absolute;\n cursor: pointer;\n width: 32px;\n top: 1px;\n right: 1px;\n height: 30px;\n vertical-align: middle;\n fill: #edffff;\n}\n.cesium-geocoder-searchButton:hover {\n background-color: #48b;\n}\n\n/* packages/widgets/Source/InfoBox/InfoBox.css */\n.cesium-infoBox {\n display: block;\n position: absolute;\n top: 50px;\n right: 0;\n width: 40%;\n max-width: 480px;\n background: rgba(38, 38, 38, 0.95);\n color: #edffff;\n border: 1px solid #444;\n border-right: none;\n border-top-left-radius: 7px;\n border-bottom-left-radius: 7px;\n box-shadow: 0 0 10px 1px #000;\n transform: translate(100%, 0);\n visibility: hidden;\n opacity: 0;\n transition:\n visibility 0s 0.2s,\n opacity 0.2s ease-in,\n transform 0.2s ease-in;\n}\n.cesium-infoBox-visible {\n transform: translate(0, 0);\n visibility: visible;\n opacity: 1;\n transition: opacity 0.2s ease-out, transform 0.2s ease-out;\n}\n.cesium-infoBox-title {\n display: block;\n height: 20px;\n padding: 5px 30px 5px 25px;\n background: rgba(84, 84, 84, 1);\n border-top-left-radius: 7px;\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n box-sizing: content-box;\n}\n.cesium-infoBox-bodyless .cesium-infoBox-title {\n border-bottom-left-radius: 7px;\n}\nbutton.cesium-infoBox-camera {\n display: block;\n position: absolute;\n top: 4px;\n left: 4px;\n width: 22px;\n height: 22px;\n background: transparent;\n border-color: transparent;\n border-radius: 3px;\n padding: 0 5px;\n margin: 0;\n}\nbutton.cesium-infoBox-close {\n display: block;\n position: absolute;\n top: 5px;\n right: 5px;\n height: 20px;\n background: transparent;\n border: none;\n border-radius: 2px;\n font-weight: bold;\n font-size: 16px;\n padding: 0 5px;\n margin: 0;\n color: #edffff;\n}\nbutton.cesium-infoBox-close:focus {\n background: rgba(238, 136, 0, 0.44);\n outline: none;\n}\nbutton.cesium-infoBox-close:hover {\n background: #888;\n color: #000;\n}\nbutton.cesium-infoBox-close:active {\n background: #a00;\n color: #000;\n}\n.cesium-infoBox-bodyless .cesium-infoBox-iframe {\n display: none;\n}\n.cesium-infoBox-iframe {\n border: none;\n width: 100%;\n width: calc(100% - 2px);\n}\n\n/* packages/widgets/Source/SceneModePicker/SceneModePicker.css */\nspan.cesium-sceneModePicker-wrapper {\n display: inline-block;\n position: relative;\n margin: 0 3px;\n}\n.cesium-sceneModePicker-visible {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.25s linear;\n}\n.cesium-sceneModePicker-hidden {\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s 0.25s, opacity 0.25s linear;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none {\n display: none;\n}\n.cesium-sceneModePicker-slide-svg {\n transition: left 2s;\n top: 0;\n left: 0;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon {\n box-sizing: border-box;\n padding: 0;\n margin: 3px 0;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView,\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D {\n margin: 0 0 3px 0;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D {\n left: 100%;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView {\n left: 200%;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D {\n left: -200%;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D {\n left: -100%;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D {\n left: -100%;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView {\n left: 100%;\n}\n.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected {\n border-color: #2e2;\n box-shadow: 0 0 8px #fff, 0 0 8px #fff;\n}\n\n/* packages/widgets/Source/ProjectionPicker/ProjectionPicker.css */\nspan.cesium-projectionPicker-wrapper {\n display: inline-block;\n position: relative;\n margin: 0 3px;\n}\n.cesium-projectionPicker-visible {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.25s linear;\n}\n.cesium-projectionPicker-hidden {\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s 0.25s, opacity 0.25s linear;\n}\n.cesium-projectionPicker-wrapper .cesium-projectionPicker-none {\n display: none;\n}\n.cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon {\n box-sizing: border-box;\n padding: 0;\n margin: 3px 0;\n}\n.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective,\n.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic {\n margin: 0 0 3px 0;\n}\n.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic {\n left: 100%;\n}\n.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective {\n left: -100%;\n}\n.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected {\n border-color: #2e2;\n box-shadow: 0 0 8px #fff, 0 0 8px #fff;\n}\n\n/* packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdog.css */\n.cesium-performance-watchdog-message-area {\n position: relative;\n background-color: yellow;\n color: black;\n padding: 10px;\n}\n.cesium-performance-watchdog-message {\n margin-right: 30px;\n}\n.cesium-performance-watchdog-message-dismiss {\n position: absolute;\n right: 0;\n margin: 0 10px 0 0;\n}\n\n/* packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.css */\n.cesium-navigationHelpButton-wrapper {\n position: relative;\n display: inline-block;\n}\n.cesium-navigation-help {\n visibility: hidden;\n position: absolute;\n top: 38px;\n right: 2px;\n width: 250px;\n border-radius: 10px;\n transform: scale(0.01);\n transform-origin: 234px -10px;\n transition: visibility 0s 0.25s, transform 0.25s ease-in;\n}\n.cesium-navigation-help-visible {\n visibility: visible;\n transform: scale(1);\n transition: transform 0.25s ease-out;\n}\n.cesium-navigation-help-instructions {\n border: 1px solid #444;\n background-color: rgba(38, 38, 38, 0.75);\n padding-bottom: 5px;\n border-radius: 0 0 10px 10px;\n}\n.cesium-click-navigation-help {\n display: none;\n}\n.cesium-touch-navigation-help {\n display: none;\n padding-top: 5px;\n}\n.cesium-click-navigation-help-visible {\n display: block;\n}\n.cesium-touch-navigation-help-visible {\n display: block;\n}\n.cesium-navigation-help-pan {\n color: #66ccff;\n font-weight: bold;\n}\n.cesium-navigation-help-zoom {\n color: #65fd00;\n font-weight: bold;\n}\n.cesium-navigation-help-rotate {\n color: #ffd800;\n font-weight: bold;\n}\n.cesium-navigation-help-tilt {\n color: #d800d8;\n font-weight: bold;\n}\n.cesium-navigation-help-details {\n color: #ffffff;\n}\n.cesium-navigation-button {\n color: #fff;\n background-color: transparent;\n border-bottom: none;\n border-top: 1px solid #444;\n border-right: 1px solid #444;\n margin: 0;\n width: 50%;\n cursor: pointer;\n}\n.cesium-navigation-button-icon {\n vertical-align: middle;\n padding: 5px 1px;\n}\n.cesium-navigation-button:focus {\n outline: none;\n}\n.cesium-navigation-button-left {\n border-radius: 10px 0 0 0;\n border-left: 1px solid #444;\n}\n.cesium-navigation-button-right {\n border-radius: 0 10px 0 0;\n border-left: none;\n}\n.cesium-navigation-button-selected {\n background-color: rgba(38, 38, 38, 0.75);\n}\n.cesium-navigation-button-unselected {\n background-color: rgba(0, 0, 0, 0.75);\n}\n.cesium-navigation-button-unselected:hover {\n background-color: rgba(76, 76, 76, 0.75);\n}\n\n/* packages/widgets/Source/SelectionIndicator/SelectionIndicator.css */\n.cesium-selection-wrapper {\n position: absolute;\n width: 160px;\n height: 160px;\n pointer-events: none;\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s 0.2s, opacity 0.2s ease-in;\n}\n.cesium-selection-wrapper-visible {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.2s ease-out;\n}\n.cesium-selection-wrapper svg {\n fill: #2e2;\n stroke: #000;\n stroke-width: 1.1px;\n}\n\n/* packages/widgets/Source/Timeline/Timeline.css */\n.cesium-timeline-main {\n position: relative;\n left: 0;\n bottom: 0;\n overflow: hidden;\n border: solid 1px #888;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.cesium-timeline-trackContainer {\n width: 100%;\n overflow: auto;\n border-top: solid 1px #888;\n position: relative;\n top: 0;\n left: 0;\n}\n.cesium-timeline-tracks {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n}\n.cesium-timeline-needle {\n position: absolute;\n left: 0;\n top: 1.7em;\n bottom: 0;\n width: 1px;\n background: #f00;\n}\n.cesium-timeline-bar {\n position: relative;\n left: 0;\n top: 0;\n overflow: hidden;\n cursor: pointer;\n width: 100%;\n height: 1.7em;\n background: linear-gradient(to bottom, rgba(116, 117, 119, 0.8) 0%, rgba(58, 68, 82, 0.8) 11%, rgba(46, 50, 56, 0.8) 46%, rgba(53, 53, 53, 0.8) 81%, rgba(53, 53, 53, 0.8) 100%);\n}\n.cesium-timeline-ruler {\n visibility: hidden;\n white-space: nowrap;\n font-size: 80%;\n z-index: -200;\n}\n.cesium-timeline-highlight {\n position: absolute;\n bottom: 0;\n left: 0;\n background: #08f;\n}\n.cesium-timeline-ticLabel {\n position: absolute;\n top: 0;\n left: 0;\n white-space: nowrap;\n font-size: 80%;\n color: #eee;\n}\n.cesium-timeline-ticMain {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 1px;\n height: 50%;\n background: #eee;\n}\n.cesium-timeline-ticSub {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 1px;\n height: 33%;\n background: #aaa;\n}\n.cesium-timeline-ticTiny {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 1px;\n height: 25%;\n background: #888;\n}\n.cesium-timeline-icon16 {\n display: block;\n position: absolute;\n width: 16px;\n height: 16px;\n background-image: url(${h});\n background-repeat: no-repeat;\n}\n\n/* packages/widgets/Source/Viewer/Viewer.css */\n.cesium-viewer {\n font-family: sans-serif;\n font-size: 16px;\n overflow: hidden;\n display: block;\n position: relative;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.cesium-viewer-cesiumWidgetContainer {\n width: 100%;\n height: 100%;\n}\n.cesium-viewer-bottom {\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n padding-right: 5px;\n}\n.cesium-viewer .cesium-widget-credits {\n display: inline;\n position: static;\n bottom: auto;\n left: auto;\n padding-right: 0;\n color: #ffffff;\n font-size: 10px;\n text-shadow: 0 0 2px #000000;\n}\n.cesium-viewer-timelineContainer {\n position: absolute;\n bottom: 0;\n left: 169px;\n right: 29px;\n height: 27px;\n padding: 0;\n margin: 0;\n overflow: hidden;\n font-size: 14px;\n}\n.cesium-viewer-animationContainer {\n position: absolute;\n bottom: 0;\n left: 0;\n padding: 0;\n width: 169px;\n height: 112px;\n}\n.cesium-viewer-fullscreenContainer {\n position: absolute;\n bottom: 0;\n right: 0;\n padding: 0;\n width: 29px;\n height: 29px;\n overflow: hidden;\n}\n.cesium-viewer-vrContainer {\n position: absolute;\n bottom: 0;\n right: 0;\n padding: 0;\n width: 29px;\n height: 29px;\n overflow: hidden;\n}\n.cesium-viewer-toolbar {\n display: block;\n position: absolute;\n top: 5px;\n right: 5px;\n}\n.cesium-viewer-cesiumInspectorContainer {\n display: block;\n position: absolute;\n top: 50px;\n right: 10px;\n}\n.cesium-viewer-geocoderContainer {\n position: relative;\n display: inline-block;\n margin: 0 3px;\n}\n.cesium-viewer-cesium3DTilesInspectorContainer {\n display: block;\n position: absolute;\n top: 50px;\n right: 10px;\n max-height: calc(100% - 120px);\n box-sizing: border-box;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.cesium-viewer-voxelInspectorContainer {\n display: block;\n position: absolute;\n top: 50px;\n right: 10px;\n max-height: calc(100% - 120px);\n box-sizing: border-box;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n/* packages/widgets/Source/widgets.css */\n`,""]);const d=u},556:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(81),r=n.n(i),o=n(645),a=n.n(o)()(r());a.push([e.id,"html,\nbody,\n#root {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n}\n\nmain {\n height: calc(100% - 2rem);\n}\n\nfooter {\n width: 100%;\n height: 2rem;\n position: absolute;\n bottom: 0;\n background-color: #161718;\n text-align: center;\n}\n\nfooter ol {\n padding-top: 0.25rem;\n}\n\nfooter li {\n display: inline;\n list-style-type: none;\n color: #c4cacf;\n margin-right: 1rem;\n}\n\n#renderCanvas {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n font-family: sans-serif;\n background: #000;\n}\n\n.root {\n position: relative;\n}\n\n.box {\n width: 100%;\n height: 100%;\n margin: 0;\n padding-bottom: 2rem;\n overflow: hidden;\n position: absolute;\n top: 0;\n}\n\n.stack-top {\n z-index: 10;\n}\n\n#mdiv {\n width: 25px;\n height: 25px;\n background-color: white;\n border: 1px solid white;\n position: absolute;\n right: 0;\n z-index: 11;\n}\n\n.mdiv {\n height: 25px;\n width: 2px;\n margin-left: 12px;\n background-color: black;\n transform: rotate(45deg);\n z-index: 11;\n}\n\n.md {\n height: 25px;\n width: 2px;\n background-color: black;\n transform: rotate(90deg);\n z-index: 12;\n}\n\n.no-display {\n display: none;\n}\n\n#toolbar {\n background: rgba(42, 42, 42, 0.8);\n padding: 4px;\n border-radius: 4px;\n position: absolute;\n width: 350px;\n}\n\n#toolbar input {\n vertical-align: middle;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n\n#toolbar .header {\n font-weight: bold;\n color: #fff;\n}\n\n#toolbar .sub-header {\n color: #fff;\n}\n\n#toolbar .exaggSlider .ant-slider-rail {\n background-color: #91caff;\n}",""]);const s=a},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(i)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},667:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},81:e=>{"use strict";e.exports=function(e){return e[1]}},187:e=>{"use strict";function t(e,t,i){i=i||2;var o,a,s,c,h,d,f,m=t&&t.length,_=m?t[0]*i:e.length,g=n(e,0,_,i,!0),y=[];if(!g||g.next===g.prev)return y;if(m&&(g=function(e,t,i,r){var o,a,s,c=[];for(o=0,a=t.length;o80*i){o=s=e[0],a=c=e[1];for(var v=i;v<_;v+=i)(h=e[v])s&&(s=h),d>c&&(c=d);f=0!==(f=Math.max(s-o,c-a))?32767/f:0}return r(g,y,i,o,a,f,0),y}function n(e,t,n,i,r){var o,a;if(r===C(e,t,n,i)>0)for(o=t;o=t;o-=i)a=A(o,e[o],e[o+1],a);return a&&g(a,a.next)&&(x(a),a=a.next),a}function i(e,t){if(!e)return e;t||(t=e);var n,i=e;do{if(n=!1,i.steiner||!g(i,i.next)&&0!==_(i.prev,i,i.next))i=i.next;else{if(x(i),(i=t=i.prev)===i.next)break;n=!0}}while(n||i!==t);return t}function r(e,t,n,l,u,h,p){if(e){!p&&h&&function(e,t,n,i){var r=e;do{0===r.z&&(r.z=d(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,function(e){var t,n,i,r,o,a,s,c,l=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,i=n,s=0,t=0;t0||c>0&&i;)0!==s&&(0===c||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,c--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;n=i}o.nextZ=null,l*=2}while(a>1)}(r)}(e,l,u,h);for(var f,m,_=e;e.prev!==e.next;)if(f=e.prev,m=e.next,h?a(e,l,u,h):o(e))t.push(f.i/n|0),t.push(e.i/n|0),t.push(m.i/n|0),x(e),e=m.next,_=m.next;else if((e=m)===_){p?1===p?r(e=s(i(e),t,n),t,n,l,u,h,2):2===p&&c(e,t,n,l,u,h):r(i(e),t,n,l,u,h,1);break}}}function o(e){var t=e.prev,n=e,i=e.next;if(_(t,n,i)>=0)return!1;for(var r=t.x,o=n.x,a=i.x,s=t.y,c=n.y,l=i.y,u=ro?r>a?r:a:o>a?o:a,p=s>c?s>l?s:l:c>l?c:l,m=i.next;m!==t;){if(m.x>=u&&m.x<=d&&m.y>=h&&m.y<=p&&f(r,s,o,c,a,l,m.x,m.y)&&_(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(e,t,n,i){var r=e.prev,o=e,a=e.next;if(_(r,o,a)>=0)return!1;for(var s=r.x,c=o.x,l=a.x,u=r.y,h=o.y,p=a.y,m=sc?s>l?s:l:c>l?c:l,v=u>h?u>p?u:p:h>p?h:p,b=d(m,g,t,n,i),T=d(y,v,t,n,i),E=e.prevZ,A=e.nextZ;E&&E.z>=b&&A&&A.z<=T;){if(E.x>=m&&E.x<=y&&E.y>=g&&E.y<=v&&E!==r&&E!==a&&f(s,u,c,h,l,p,E.x,E.y)&&_(E.prev,E,E.next)>=0)return!1;if(E=E.prevZ,A.x>=m&&A.x<=y&&A.y>=g&&A.y<=v&&A!==r&&A!==a&&f(s,u,c,h,l,p,A.x,A.y)&&_(A.prev,A,A.next)>=0)return!1;A=A.nextZ}for(;E&&E.z>=b;){if(E.x>=m&&E.x<=y&&E.y>=g&&E.y<=v&&E!==r&&E!==a&&f(s,u,c,h,l,p,E.x,E.y)&&_(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;A&&A.z<=T;){if(A.x>=m&&A.x<=y&&A.y>=g&&A.y<=v&&A!==r&&A!==a&&f(s,u,c,h,l,p,A.x,A.y)&&_(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function s(e,t,n){var r=e;do{var o=r.prev,a=r.next.next;!g(o,a)&&y(o,r,r.next,a)&&T(o,a)&&T(a,o)&&(t.push(o.i/n|0),t.push(r.i/n|0),t.push(a.i/n|0),x(r),x(r.next),r=e=a),r=r.next}while(r!==e);return i(r)}function c(e,t,n,o,a,s){var c=e;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&m(c,l)){var u=E(c,l);return c=i(c,c.next),u=i(u,u.next),r(c,t,n,o,a,s,0),void r(u,t,n,o,a,s,0)}l=l.next}c=c.next}while(c!==e)}function l(e,t){return e.x-t.x}function u(e,t){var n=function(e,t){var n,i=t,r=e.x,o=e.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a&&(a=s,n=i.x=i.x&&i.x>=u&&r!==i.x&&f(on.x||i.x===n.x&&h(n,i)))&&(n=i,p=c)),i=i.next}while(i!==l);return n}(e,t);if(!n)return t;var r=E(n,e);return i(r,r.next),i(n,n.next)}function h(e,t){return _(e.prev,e,t.prev)<0&&_(t.next,e,e.next)<0}function d(e,t,n,i,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function p(e){var t=e,n=e;do{(t.x=(e-a)*(o-s)&&(e-a)*(i-s)>=(n-a)*(t-s)&&(n-a)*(o-s)>=(r-a)*(i-s)}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&y(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(T(e,t)&&T(t,e)&&function(e,t){var n=e,i=!1,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}(e,t)&&(_(e.prev,e,t.prev)||_(e,t.prev,t))||g(e,t)&&_(e.prev,e,e.next)>0&&_(t.prev,t,t.next)>0)}function _(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function g(e,t){return e.x===t.x&&e.y===t.y}function y(e,t,n,i){var r=b(_(e,t,n)),o=b(_(e,t,i)),a=b(_(n,i,e)),s=b(_(n,i,t));return r!==o&&a!==s||!(0!==r||!v(e,n,t))||!(0!==o||!v(e,i,t))||!(0!==a||!v(n,e,i))||!(0!==s||!v(n,t,i))}function v(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 b(e){return e>0?1:e<0?-1:0}function T(e,t){return _(e.prev,e,e.next)<0?_(e,t,e.next)>=0&&_(e,e.prev,t)>=0:_(e,t,e.prev)<0||_(e,e.next,t)<0}function E(e,t){var n=new S(e.i,e.x,e.y),i=new S(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 A(e,t,n,i){var r=new S(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 x(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 S(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(e,t,n,i){for(var r=0,o=t,a=n-i;o0&&(i+=e[r-1].length,n.holes.push(i))}return n}},323:e=>{e.exports&&(e.exports=function(){var e=3,t=4,n=12,i=13,r=16,o=17;function a(e,t){void 0===t&&(t=0);var n=e.charCodeAt(t);if(55296<=n&&n<=56319&&t=1){var r=n;return 55296<=(i=e.charCodeAt(t-1))&&i<=56319?1024*(i-55296)+(r-56320)+65536:r}return n}function s(a,s,c){var l=[a].concat(s).concat([c]),u=l[l.length-2],h=c,d=l.lastIndexOf(14);if(d>1&&l.slice(1,d).every((function(t){return t==e}))&&-1==[e,i,o].indexOf(a))return 2;var p=l.lastIndexOf(t);if(p>0&&l.slice(1,p).every((function(e){return e==t}))&&-1==[n,t].indexOf(u))return l.filter((function(e){return e==t})).length%2==1?3:4;if(0==u&&1==h)return 0;if(2==u||0==u||1==u)return 14==h&&s.every((function(t){return t==e}))?2:1;if(2==h||0==h||1==h)return 1;if(6==u&&(6==h||7==h||9==h||10==h))return 0;if(!(9!=u&&7!=u||7!=h&&8!=h))return 0;if((10==u||8==u)&&8==h)return 0;if(h==e||15==h)return 0;if(5==h)return 0;if(u==n)return 0;var f=-1!=l.indexOf(e)?l.lastIndexOf(e)-1:l.length-2;return-1!=[i,o].indexOf(l[f])&&l.slice(f+1,-1).every((function(t){return t==e}))&&14==h||15==u&&-1!=[r,o].indexOf(h)?0:-1!=s.indexOf(t)?2:u==t&&h==t?0:1}function c(a){return 1536<=a&&a<=1541||1757==a||1807==a||2274==a||3406==a||69821==a||70082<=a&&a<=70083||72250==a||72326<=a&&a<=72329||73030==a?n:13==a?0:10==a?1:0<=a&&a<=9||11<=a&&a<=12||14<=a&&a<=31||127<=a&&a<=159||173==a||1564==a||6158==a||8203==a||8206<=a&&a<=8207||8232==a||8233==a||8234<=a&&a<=8238||8288<=a&&a<=8292||8293==a||8294<=a&&a<=8303||55296<=a&&a<=57343||65279==a||65520<=a&&a<=65528||65529<=a&&a<=65531||113824<=a&&a<=113827||119155<=a&&a<=119162||917504==a||917505==a||917506<=a&&a<=917535||917632<=a&&a<=917759||918e3<=a&&a<=921599?2:768<=a&&a<=879||1155<=a&&a<=1159||1160<=a&&a<=1161||1425<=a&&a<=1469||1471==a||1473<=a&&a<=1474||1476<=a&&a<=1477||1479==a||1552<=a&&a<=1562||1611<=a&&a<=1631||1648==a||1750<=a&&a<=1756||1759<=a&&a<=1764||1767<=a&&a<=1768||1770<=a&&a<=1773||1809==a||1840<=a&&a<=1866||1958<=a&&a<=1968||2027<=a&&a<=2035||2070<=a&&a<=2073||2075<=a&&a<=2083||2085<=a&&a<=2087||2089<=a&&a<=2093||2137<=a&&a<=2139||2260<=a&&a<=2273||2275<=a&&a<=2306||2362==a||2364==a||2369<=a&&a<=2376||2381==a||2385<=a&&a<=2391||2402<=a&&a<=2403||2433==a||2492==a||2494==a||2497<=a&&a<=2500||2509==a||2519==a||2530<=a&&a<=2531||2561<=a&&a<=2562||2620==a||2625<=a&&a<=2626||2631<=a&&a<=2632||2635<=a&&a<=2637||2641==a||2672<=a&&a<=2673||2677==a||2689<=a&&a<=2690||2748==a||2753<=a&&a<=2757||2759<=a&&a<=2760||2765==a||2786<=a&&a<=2787||2810<=a&&a<=2815||2817==a||2876==a||2878==a||2879==a||2881<=a&&a<=2884||2893==a||2902==a||2903==a||2914<=a&&a<=2915||2946==a||3006==a||3008==a||3021==a||3031==a||3072==a||3134<=a&&a<=3136||3142<=a&&a<=3144||3146<=a&&a<=3149||3157<=a&&a<=3158||3170<=a&&a<=3171||3201==a||3260==a||3263==a||3266==a||3270==a||3276<=a&&a<=3277||3285<=a&&a<=3286||3298<=a&&a<=3299||3328<=a&&a<=3329||3387<=a&&a<=3388||3390==a||3393<=a&&a<=3396||3405==a||3415==a||3426<=a&&a<=3427||3530==a||3535==a||3538<=a&&a<=3540||3542==a||3551==a||3633==a||3636<=a&&a<=3642||3655<=a&&a<=3662||3761==a||3764<=a&&a<=3769||3771<=a&&a<=3772||3784<=a&&a<=3789||3864<=a&&a<=3865||3893==a||3895==a||3897==a||3953<=a&&a<=3966||3968<=a&&a<=3972||3974<=a&&a<=3975||3981<=a&&a<=3991||3993<=a&&a<=4028||4038==a||4141<=a&&a<=4144||4146<=a&&a<=4151||4153<=a&&a<=4154||4157<=a&&a<=4158||4184<=a&&a<=4185||4190<=a&&a<=4192||4209<=a&&a<=4212||4226==a||4229<=a&&a<=4230||4237==a||4253==a||4957<=a&&a<=4959||5906<=a&&a<=5908||5938<=a&&a<=5940||5970<=a&&a<=5971||6002<=a&&a<=6003||6068<=a&&a<=6069||6071<=a&&a<=6077||6086==a||6089<=a&&a<=6099||6109==a||6155<=a&&a<=6157||6277<=a&&a<=6278||6313==a||6432<=a&&a<=6434||6439<=a&&a<=6440||6450==a||6457<=a&&a<=6459||6679<=a&&a<=6680||6683==a||6742==a||6744<=a&&a<=6750||6752==a||6754==a||6757<=a&&a<=6764||6771<=a&&a<=6780||6783==a||6832<=a&&a<=6845||6846==a||6912<=a&&a<=6915||6964==a||6966<=a&&a<=6970||6972==a||6978==a||7019<=a&&a<=7027||7040<=a&&a<=7041||7074<=a&&a<=7077||7080<=a&&a<=7081||7083<=a&&a<=7085||7142==a||7144<=a&&a<=7145||7149==a||7151<=a&&a<=7153||7212<=a&&a<=7219||7222<=a&&a<=7223||7376<=a&&a<=7378||7380<=a&&a<=7392||7394<=a&&a<=7400||7405==a||7412==a||7416<=a&&a<=7417||7616<=a&&a<=7673||7675<=a&&a<=7679||8204==a||8400<=a&&a<=8412||8413<=a&&a<=8416||8417==a||8418<=a&&a<=8420||8421<=a&&a<=8432||11503<=a&&a<=11505||11647==a||11744<=a&&a<=11775||12330<=a&&a<=12333||12334<=a&&a<=12335||12441<=a&&a<=12442||42607==a||42608<=a&&a<=42610||42612<=a&&a<=42621||42654<=a&&a<=42655||42736<=a&&a<=42737||43010==a||43014==a||43019==a||43045<=a&&a<=43046||43204<=a&&a<=43205||43232<=a&&a<=43249||43302<=a&&a<=43309||43335<=a&&a<=43345||43392<=a&&a<=43394||43443==a||43446<=a&&a<=43449||43452==a||43493==a||43561<=a&&a<=43566||43569<=a&&a<=43570||43573<=a&&a<=43574||43587==a||43596==a||43644==a||43696==a||43698<=a&&a<=43700||43703<=a&&a<=43704||43710<=a&&a<=43711||43713==a||43756<=a&&a<=43757||43766==a||44005==a||44008==a||44013==a||64286==a||65024<=a&&a<=65039||65056<=a&&a<=65071||65438<=a&&a<=65439||66045==a||66272==a||66422<=a&&a<=66426||68097<=a&&a<=68099||68101<=a&&a<=68102||68108<=a&&a<=68111||68152<=a&&a<=68154||68159==a||68325<=a&&a<=68326||69633==a||69688<=a&&a<=69702||69759<=a&&a<=69761||69811<=a&&a<=69814||69817<=a&&a<=69818||69888<=a&&a<=69890||69927<=a&&a<=69931||69933<=a&&a<=69940||70003==a||70016<=a&&a<=70017||70070<=a&&a<=70078||70090<=a&&a<=70092||70191<=a&&a<=70193||70196==a||70198<=a&&a<=70199||70206==a||70367==a||70371<=a&&a<=70378||70400<=a&&a<=70401||70460==a||70462==a||70464==a||70487==a||70502<=a&&a<=70508||70512<=a&&a<=70516||70712<=a&&a<=70719||70722<=a&&a<=70724||70726==a||70832==a||70835<=a&&a<=70840||70842==a||70845==a||70847<=a&&a<=70848||70850<=a&&a<=70851||71087==a||71090<=a&&a<=71093||71100<=a&&a<=71101||71103<=a&&a<=71104||71132<=a&&a<=71133||71219<=a&&a<=71226||71229==a||71231<=a&&a<=71232||71339==a||71341==a||71344<=a&&a<=71349||71351==a||71453<=a&&a<=71455||71458<=a&&a<=71461||71463<=a&&a<=71467||72193<=a&&a<=72198||72201<=a&&a<=72202||72243<=a&&a<=72248||72251<=a&&a<=72254||72263==a||72273<=a&&a<=72278||72281<=a&&a<=72283||72330<=a&&a<=72342||72344<=a&&a<=72345||72752<=a&&a<=72758||72760<=a&&a<=72765||72767==a||72850<=a&&a<=72871||72874<=a&&a<=72880||72882<=a&&a<=72883||72885<=a&&a<=72886||73009<=a&&a<=73014||73018==a||73020<=a&&a<=73021||73023<=a&&a<=73029||73031==a||92912<=a&&a<=92916||92976<=a&&a<=92982||94095<=a&&a<=94098||113821<=a&&a<=113822||119141==a||119143<=a&&a<=119145||119150<=a&&a<=119154||119163<=a&&a<=119170||119173<=a&&a<=119179||119210<=a&&a<=119213||119362<=a&&a<=119364||121344<=a&&a<=121398||121403<=a&&a<=121452||121461==a||121476==a||121499<=a&&a<=121503||121505<=a&&a<=121519||122880<=a&&a<=122886||122888<=a&&a<=122904||122907<=a&&a<=122913||122915<=a&&a<=122916||122918<=a&&a<=122922||125136<=a&&a<=125142||125252<=a&&a<=125258||917536<=a&&a<=917631||917760<=a&&a<=917999?e:127462<=a&&a<=127487?t:2307==a||2363==a||2366<=a&&a<=2368||2377<=a&&a<=2380||2382<=a&&a<=2383||2434<=a&&a<=2435||2495<=a&&a<=2496||2503<=a&&a<=2504||2507<=a&&a<=2508||2563==a||2622<=a&&a<=2624||2691==a||2750<=a&&a<=2752||2761==a||2763<=a&&a<=2764||2818<=a&&a<=2819||2880==a||2887<=a&&a<=2888||2891<=a&&a<=2892||3007==a||3009<=a&&a<=3010||3014<=a&&a<=3016||3018<=a&&a<=3020||3073<=a&&a<=3075||3137<=a&&a<=3140||3202<=a&&a<=3203||3262==a||3264<=a&&a<=3265||3267<=a&&a<=3268||3271<=a&&a<=3272||3274<=a&&a<=3275||3330<=a&&a<=3331||3391<=a&&a<=3392||3398<=a&&a<=3400||3402<=a&&a<=3404||3458<=a&&a<=3459||3536<=a&&a<=3537||3544<=a&&a<=3550||3570<=a&&a<=3571||3635==a||3763==a||3902<=a&&a<=3903||3967==a||4145==a||4155<=a&&a<=4156||4182<=a&&a<=4183||4228==a||6070==a||6078<=a&&a<=6085||6087<=a&&a<=6088||6435<=a&&a<=6438||6441<=a&&a<=6443||6448<=a&&a<=6449||6451<=a&&a<=6456||6681<=a&&a<=6682||6741==a||6743==a||6765<=a&&a<=6770||6916==a||6965==a||6971==a||6973<=a&&a<=6977||6979<=a&&a<=6980||7042==a||7073==a||7078<=a&&a<=7079||7082==a||7143==a||7146<=a&&a<=7148||7150==a||7154<=a&&a<=7155||7204<=a&&a<=7211||7220<=a&&a<=7221||7393==a||7410<=a&&a<=7411||7415==a||43043<=a&&a<=43044||43047==a||43136<=a&&a<=43137||43188<=a&&a<=43203||43346<=a&&a<=43347||43395==a||43444<=a&&a<=43445||43450<=a&&a<=43451||43453<=a&&a<=43456||43567<=a&&a<=43568||43571<=a&&a<=43572||43597==a||43755==a||43758<=a&&a<=43759||43765==a||44003<=a&&a<=44004||44006<=a&&a<=44007||44009<=a&&a<=44010||44012==a||69632==a||69634==a||69762==a||69808<=a&&a<=69810||69815<=a&&a<=69816||69932==a||70018==a||70067<=a&&a<=70069||70079<=a&&a<=70080||70188<=a&&a<=70190||70194<=a&&a<=70195||70197==a||70368<=a&&a<=70370||70402<=a&&a<=70403||70463==a||70465<=a&&a<=70468||70471<=a&&a<=70472||70475<=a&&a<=70477||70498<=a&&a<=70499||70709<=a&&a<=70711||70720<=a&&a<=70721||70725==a||70833<=a&&a<=70834||70841==a||70843<=a&&a<=70844||70846==a||70849==a||71088<=a&&a<=71089||71096<=a&&a<=71099||71102==a||71216<=a&&a<=71218||71227<=a&&a<=71228||71230==a||71340==a||71342<=a&&a<=71343||71350==a||71456<=a&&a<=71457||71462==a||72199<=a&&a<=72200||72249==a||72279<=a&&a<=72280||72343==a||72751==a||72766==a||72873==a||72881==a||72884==a||94033<=a&&a<=94078||119142==a||119149==a?5:4352<=a&&a<=4447||43360<=a&&a<=43388?6:4448<=a&&a<=4519||55216<=a&&a<=55238?7:4520<=a&&a<=4607||55243<=a&&a<=55291?8:44032==a||44060==a||44088==a||44116==a||44144==a||44172==a||44200==a||44228==a||44256==a||44284==a||44312==a||44340==a||44368==a||44396==a||44424==a||44452==a||44480==a||44508==a||44536==a||44564==a||44592==a||44620==a||44648==a||44676==a||44704==a||44732==a||44760==a||44788==a||44816==a||44844==a||44872==a||44900==a||44928==a||44956==a||44984==a||45012==a||45040==a||45068==a||45096==a||45124==a||45152==a||45180==a||45208==a||45236==a||45264==a||45292==a||45320==a||45348==a||45376==a||45404==a||45432==a||45460==a||45488==a||45516==a||45544==a||45572==a||45600==a||45628==a||45656==a||45684==a||45712==a||45740==a||45768==a||45796==a||45824==a||45852==a||45880==a||45908==a||45936==a||45964==a||45992==a||46020==a||46048==a||46076==a||46104==a||46132==a||46160==a||46188==a||46216==a||46244==a||46272==a||46300==a||46328==a||46356==a||46384==a||46412==a||46440==a||46468==a||46496==a||46524==a||46552==a||46580==a||46608==a||46636==a||46664==a||46692==a||46720==a||46748==a||46776==a||46804==a||46832==a||46860==a||46888==a||46916==a||46944==a||46972==a||47e3==a||47028==a||47056==a||47084==a||47112==a||47140==a||47168==a||47196==a||47224==a||47252==a||47280==a||47308==a||47336==a||47364==a||47392==a||47420==a||47448==a||47476==a||47504==a||47532==a||47560==a||47588==a||47616==a||47644==a||47672==a||47700==a||47728==a||47756==a||47784==a||47812==a||47840==a||47868==a||47896==a||47924==a||47952==a||47980==a||48008==a||48036==a||48064==a||48092==a||48120==a||48148==a||48176==a||48204==a||48232==a||48260==a||48288==a||48316==a||48344==a||48372==a||48400==a||48428==a||48456==a||48484==a||48512==a||48540==a||48568==a||48596==a||48624==a||48652==a||48680==a||48708==a||48736==a||48764==a||48792==a||48820==a||48848==a||48876==a||48904==a||48932==a||48960==a||48988==a||49016==a||49044==a||49072==a||49100==a||49128==a||49156==a||49184==a||49212==a||49240==a||49268==a||49296==a||49324==a||49352==a||49380==a||49408==a||49436==a||49464==a||49492==a||49520==a||49548==a||49576==a||49604==a||49632==a||49660==a||49688==a||49716==a||49744==a||49772==a||49800==a||49828==a||49856==a||49884==a||49912==a||49940==a||49968==a||49996==a||50024==a||50052==a||50080==a||50108==a||50136==a||50164==a||50192==a||50220==a||50248==a||50276==a||50304==a||50332==a||50360==a||50388==a||50416==a||50444==a||50472==a||50500==a||50528==a||50556==a||50584==a||50612==a||50640==a||50668==a||50696==a||50724==a||50752==a||50780==a||50808==a||50836==a||50864==a||50892==a||50920==a||50948==a||50976==a||51004==a||51032==a||51060==a||51088==a||51116==a||51144==a||51172==a||51200==a||51228==a||51256==a||51284==a||51312==a||51340==a||51368==a||51396==a||51424==a||51452==a||51480==a||51508==a||51536==a||51564==a||51592==a||51620==a||51648==a||51676==a||51704==a||51732==a||51760==a||51788==a||51816==a||51844==a||51872==a||51900==a||51928==a||51956==a||51984==a||52012==a||52040==a||52068==a||52096==a||52124==a||52152==a||52180==a||52208==a||52236==a||52264==a||52292==a||52320==a||52348==a||52376==a||52404==a||52432==a||52460==a||52488==a||52516==a||52544==a||52572==a||52600==a||52628==a||52656==a||52684==a||52712==a||52740==a||52768==a||52796==a||52824==a||52852==a||52880==a||52908==a||52936==a||52964==a||52992==a||53020==a||53048==a||53076==a||53104==a||53132==a||53160==a||53188==a||53216==a||53244==a||53272==a||53300==a||53328==a||53356==a||53384==a||53412==a||53440==a||53468==a||53496==a||53524==a||53552==a||53580==a||53608==a||53636==a||53664==a||53692==a||53720==a||53748==a||53776==a||53804==a||53832==a||53860==a||53888==a||53916==a||53944==a||53972==a||54e3==a||54028==a||54056==a||54084==a||54112==a||54140==a||54168==a||54196==a||54224==a||54252==a||54280==a||54308==a||54336==a||54364==a||54392==a||54420==a||54448==a||54476==a||54504==a||54532==a||54560==a||54588==a||54616==a||54644==a||54672==a||54700==a||54728==a||54756==a||54784==a||54812==a||54840==a||54868==a||54896==a||54924==a||54952==a||54980==a||55008==a||55036==a||55064==a||55092==a||55120==a||55148==a||55176==a?9:44033<=a&&a<=44059||44061<=a&&a<=44087||44089<=a&&a<=44115||44117<=a&&a<=44143||44145<=a&&a<=44171||44173<=a&&a<=44199||44201<=a&&a<=44227||44229<=a&&a<=44255||44257<=a&&a<=44283||44285<=a&&a<=44311||44313<=a&&a<=44339||44341<=a&&a<=44367||44369<=a&&a<=44395||44397<=a&&a<=44423||44425<=a&&a<=44451||44453<=a&&a<=44479||44481<=a&&a<=44507||44509<=a&&a<=44535||44537<=a&&a<=44563||44565<=a&&a<=44591||44593<=a&&a<=44619||44621<=a&&a<=44647||44649<=a&&a<=44675||44677<=a&&a<=44703||44705<=a&&a<=44731||44733<=a&&a<=44759||44761<=a&&a<=44787||44789<=a&&a<=44815||44817<=a&&a<=44843||44845<=a&&a<=44871||44873<=a&&a<=44899||44901<=a&&a<=44927||44929<=a&&a<=44955||44957<=a&&a<=44983||44985<=a&&a<=45011||45013<=a&&a<=45039||45041<=a&&a<=45067||45069<=a&&a<=45095||45097<=a&&a<=45123||45125<=a&&a<=45151||45153<=a&&a<=45179||45181<=a&&a<=45207||45209<=a&&a<=45235||45237<=a&&a<=45263||45265<=a&&a<=45291||45293<=a&&a<=45319||45321<=a&&a<=45347||45349<=a&&a<=45375||45377<=a&&a<=45403||45405<=a&&a<=45431||45433<=a&&a<=45459||45461<=a&&a<=45487||45489<=a&&a<=45515||45517<=a&&a<=45543||45545<=a&&a<=45571||45573<=a&&a<=45599||45601<=a&&a<=45627||45629<=a&&a<=45655||45657<=a&&a<=45683||45685<=a&&a<=45711||45713<=a&&a<=45739||45741<=a&&a<=45767||45769<=a&&a<=45795||45797<=a&&a<=45823||45825<=a&&a<=45851||45853<=a&&a<=45879||45881<=a&&a<=45907||45909<=a&&a<=45935||45937<=a&&a<=45963||45965<=a&&a<=45991||45993<=a&&a<=46019||46021<=a&&a<=46047||46049<=a&&a<=46075||46077<=a&&a<=46103||46105<=a&&a<=46131||46133<=a&&a<=46159||46161<=a&&a<=46187||46189<=a&&a<=46215||46217<=a&&a<=46243||46245<=a&&a<=46271||46273<=a&&a<=46299||46301<=a&&a<=46327||46329<=a&&a<=46355||46357<=a&&a<=46383||46385<=a&&a<=46411||46413<=a&&a<=46439||46441<=a&&a<=46467||46469<=a&&a<=46495||46497<=a&&a<=46523||46525<=a&&a<=46551||46553<=a&&a<=46579||46581<=a&&a<=46607||46609<=a&&a<=46635||46637<=a&&a<=46663||46665<=a&&a<=46691||46693<=a&&a<=46719||46721<=a&&a<=46747||46749<=a&&a<=46775||46777<=a&&a<=46803||46805<=a&&a<=46831||46833<=a&&a<=46859||46861<=a&&a<=46887||46889<=a&&a<=46915||46917<=a&&a<=46943||46945<=a&&a<=46971||46973<=a&&a<=46999||47001<=a&&a<=47027||47029<=a&&a<=47055||47057<=a&&a<=47083||47085<=a&&a<=47111||47113<=a&&a<=47139||47141<=a&&a<=47167||47169<=a&&a<=47195||47197<=a&&a<=47223||47225<=a&&a<=47251||47253<=a&&a<=47279||47281<=a&&a<=47307||47309<=a&&a<=47335||47337<=a&&a<=47363||47365<=a&&a<=47391||47393<=a&&a<=47419||47421<=a&&a<=47447||47449<=a&&a<=47475||47477<=a&&a<=47503||47505<=a&&a<=47531||47533<=a&&a<=47559||47561<=a&&a<=47587||47589<=a&&a<=47615||47617<=a&&a<=47643||47645<=a&&a<=47671||47673<=a&&a<=47699||47701<=a&&a<=47727||47729<=a&&a<=47755||47757<=a&&a<=47783||47785<=a&&a<=47811||47813<=a&&a<=47839||47841<=a&&a<=47867||47869<=a&&a<=47895||47897<=a&&a<=47923||47925<=a&&a<=47951||47953<=a&&a<=47979||47981<=a&&a<=48007||48009<=a&&a<=48035||48037<=a&&a<=48063||48065<=a&&a<=48091||48093<=a&&a<=48119||48121<=a&&a<=48147||48149<=a&&a<=48175||48177<=a&&a<=48203||48205<=a&&a<=48231||48233<=a&&a<=48259||48261<=a&&a<=48287||48289<=a&&a<=48315||48317<=a&&a<=48343||48345<=a&&a<=48371||48373<=a&&a<=48399||48401<=a&&a<=48427||48429<=a&&a<=48455||48457<=a&&a<=48483||48485<=a&&a<=48511||48513<=a&&a<=48539||48541<=a&&a<=48567||48569<=a&&a<=48595||48597<=a&&a<=48623||48625<=a&&a<=48651||48653<=a&&a<=48679||48681<=a&&a<=48707||48709<=a&&a<=48735||48737<=a&&a<=48763||48765<=a&&a<=48791||48793<=a&&a<=48819||48821<=a&&a<=48847||48849<=a&&a<=48875||48877<=a&&a<=48903||48905<=a&&a<=48931||48933<=a&&a<=48959||48961<=a&&a<=48987||48989<=a&&a<=49015||49017<=a&&a<=49043||49045<=a&&a<=49071||49073<=a&&a<=49099||49101<=a&&a<=49127||49129<=a&&a<=49155||49157<=a&&a<=49183||49185<=a&&a<=49211||49213<=a&&a<=49239||49241<=a&&a<=49267||49269<=a&&a<=49295||49297<=a&&a<=49323||49325<=a&&a<=49351||49353<=a&&a<=49379||49381<=a&&a<=49407||49409<=a&&a<=49435||49437<=a&&a<=49463||49465<=a&&a<=49491||49493<=a&&a<=49519||49521<=a&&a<=49547||49549<=a&&a<=49575||49577<=a&&a<=49603||49605<=a&&a<=49631||49633<=a&&a<=49659||49661<=a&&a<=49687||49689<=a&&a<=49715||49717<=a&&a<=49743||49745<=a&&a<=49771||49773<=a&&a<=49799||49801<=a&&a<=49827||49829<=a&&a<=49855||49857<=a&&a<=49883||49885<=a&&a<=49911||49913<=a&&a<=49939||49941<=a&&a<=49967||49969<=a&&a<=49995||49997<=a&&a<=50023||50025<=a&&a<=50051||50053<=a&&a<=50079||50081<=a&&a<=50107||50109<=a&&a<=50135||50137<=a&&a<=50163||50165<=a&&a<=50191||50193<=a&&a<=50219||50221<=a&&a<=50247||50249<=a&&a<=50275||50277<=a&&a<=50303||50305<=a&&a<=50331||50333<=a&&a<=50359||50361<=a&&a<=50387||50389<=a&&a<=50415||50417<=a&&a<=50443||50445<=a&&a<=50471||50473<=a&&a<=50499||50501<=a&&a<=50527||50529<=a&&a<=50555||50557<=a&&a<=50583||50585<=a&&a<=50611||50613<=a&&a<=50639||50641<=a&&a<=50667||50669<=a&&a<=50695||50697<=a&&a<=50723||50725<=a&&a<=50751||50753<=a&&a<=50779||50781<=a&&a<=50807||50809<=a&&a<=50835||50837<=a&&a<=50863||50865<=a&&a<=50891||50893<=a&&a<=50919||50921<=a&&a<=50947||50949<=a&&a<=50975||50977<=a&&a<=51003||51005<=a&&a<=51031||51033<=a&&a<=51059||51061<=a&&a<=51087||51089<=a&&a<=51115||51117<=a&&a<=51143||51145<=a&&a<=51171||51173<=a&&a<=51199||51201<=a&&a<=51227||51229<=a&&a<=51255||51257<=a&&a<=51283||51285<=a&&a<=51311||51313<=a&&a<=51339||51341<=a&&a<=51367||51369<=a&&a<=51395||51397<=a&&a<=51423||51425<=a&&a<=51451||51453<=a&&a<=51479||51481<=a&&a<=51507||51509<=a&&a<=51535||51537<=a&&a<=51563||51565<=a&&a<=51591||51593<=a&&a<=51619||51621<=a&&a<=51647||51649<=a&&a<=51675||51677<=a&&a<=51703||51705<=a&&a<=51731||51733<=a&&a<=51759||51761<=a&&a<=51787||51789<=a&&a<=51815||51817<=a&&a<=51843||51845<=a&&a<=51871||51873<=a&&a<=51899||51901<=a&&a<=51927||51929<=a&&a<=51955||51957<=a&&a<=51983||51985<=a&&a<=52011||52013<=a&&a<=52039||52041<=a&&a<=52067||52069<=a&&a<=52095||52097<=a&&a<=52123||52125<=a&&a<=52151||52153<=a&&a<=52179||52181<=a&&a<=52207||52209<=a&&a<=52235||52237<=a&&a<=52263||52265<=a&&a<=52291||52293<=a&&a<=52319||52321<=a&&a<=52347||52349<=a&&a<=52375||52377<=a&&a<=52403||52405<=a&&a<=52431||52433<=a&&a<=52459||52461<=a&&a<=52487||52489<=a&&a<=52515||52517<=a&&a<=52543||52545<=a&&a<=52571||52573<=a&&a<=52599||52601<=a&&a<=52627||52629<=a&&a<=52655||52657<=a&&a<=52683||52685<=a&&a<=52711||52713<=a&&a<=52739||52741<=a&&a<=52767||52769<=a&&a<=52795||52797<=a&&a<=52823||52825<=a&&a<=52851||52853<=a&&a<=52879||52881<=a&&a<=52907||52909<=a&&a<=52935||52937<=a&&a<=52963||52965<=a&&a<=52991||52993<=a&&a<=53019||53021<=a&&a<=53047||53049<=a&&a<=53075||53077<=a&&a<=53103||53105<=a&&a<=53131||53133<=a&&a<=53159||53161<=a&&a<=53187||53189<=a&&a<=53215||53217<=a&&a<=53243||53245<=a&&a<=53271||53273<=a&&a<=53299||53301<=a&&a<=53327||53329<=a&&a<=53355||53357<=a&&a<=53383||53385<=a&&a<=53411||53413<=a&&a<=53439||53441<=a&&a<=53467||53469<=a&&a<=53495||53497<=a&&a<=53523||53525<=a&&a<=53551||53553<=a&&a<=53579||53581<=a&&a<=53607||53609<=a&&a<=53635||53637<=a&&a<=53663||53665<=a&&a<=53691||53693<=a&&a<=53719||53721<=a&&a<=53747||53749<=a&&a<=53775||53777<=a&&a<=53803||53805<=a&&a<=53831||53833<=a&&a<=53859||53861<=a&&a<=53887||53889<=a&&a<=53915||53917<=a&&a<=53943||53945<=a&&a<=53971||53973<=a&&a<=53999||54001<=a&&a<=54027||54029<=a&&a<=54055||54057<=a&&a<=54083||54085<=a&&a<=54111||54113<=a&&a<=54139||54141<=a&&a<=54167||54169<=a&&a<=54195||54197<=a&&a<=54223||54225<=a&&a<=54251||54253<=a&&a<=54279||54281<=a&&a<=54307||54309<=a&&a<=54335||54337<=a&&a<=54363||54365<=a&&a<=54391||54393<=a&&a<=54419||54421<=a&&a<=54447||54449<=a&&a<=54475||54477<=a&&a<=54503||54505<=a&&a<=54531||54533<=a&&a<=54559||54561<=a&&a<=54587||54589<=a&&a<=54615||54617<=a&&a<=54643||54645<=a&&a<=54671||54673<=a&&a<=54699||54701<=a&&a<=54727||54729<=a&&a<=54755||54757<=a&&a<=54783||54785<=a&&a<=54811||54813<=a&&a<=54839||54841<=a&&a<=54867||54869<=a&&a<=54895||54897<=a&&a<=54923||54925<=a&&a<=54951||54953<=a&&a<=54979||54981<=a&&a<=55007||55009<=a&&a<=55035||55037<=a&&a<=55063||55065<=a&&a<=55091||55093<=a&&a<=55119||55121<=a&&a<=55147||55149<=a&&a<=55175||55177<=a&&a<=55203?10:9757==a||9977==a||9994<=a&&a<=9997||127877==a||127938<=a&&a<=127940||127943==a||127946<=a&&a<=127948||128066<=a&&a<=128067||128070<=a&&a<=128080||128110==a||128112<=a&&a<=128120||128124==a||128129<=a&&a<=128131||128133<=a&&a<=128135||128170==a||128372<=a&&a<=128373||128378==a||128400==a||128405<=a&&a<=128406||128581<=a&&a<=128583||128587<=a&&a<=128591||128675==a||128692<=a&&a<=128694||128704==a||128716==a||129304<=a&&a<=129308||129310<=a&&a<=129311||129318==a||129328<=a&&a<=129337||129341<=a&&a<=129342||129489<=a&&a<=129501?i:127995<=a&&a<=127999?14:8205==a?15:9792==a||9794==a||9877<=a&&a<=9878||9992==a||10084==a||127752==a||127806==a||127859==a||127891==a||127908==a||127912==a||127979==a||127981==a||128139==a||128187<=a&&a<=128188||128295==a||128300==a||128488==a||128640==a||128658==a?r:128102<=a&&a<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var n,i,r=c(a(e,t)),o=[],l=t+1;l{var t=function(e){null==e&&(e=(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)};t.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},t.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]^(1664525*((4294901760&o)>>>16)<<16)+1664525*(65535&o))+e[i]+i,this.mt[n]>>>=0,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--)o=this.mt[n-1]^this.mt[n-1]>>>30,this.mt[n]=(this.mt[n]^(1566083941*((4294901760&o)>>>16)<<16)+1566083941*(65535&o))-n,this.mt[n]>>>=0,++n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1);this.mt[0]=2147483648},t.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>>1^t[1&e];for(;n>>1^t[1&e];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[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},t.prototype.random_int31=function(){return this.random_int()>>>1},t.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},t.prototype.random=function(){return this.random_int()*(1/4294967296)},t.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},t.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)},e.exports=t},126:(e,t,n)=>{const{webm:i,mp4:r}=n(505),o=()=>"undefined"!=typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,a=()=>"wakeLock"in navigator;e.exports=class{constructor(){if(this.enabled=!1,a()){this._wakeLock=null;const e=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else o()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",i),this._addSourceToVideo(this.noSleepVideo,"mp4",r),this.noSleepVideo.addEventListener("loadedmetadata",(()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",(()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}))})))}_addSourceToVideo(e,t,n){var i=document.createElement("source");i.src=n,i.type=`video/${t}`,e.appendChild(i)}get isEnabled(){return this.enabled}enable(){return a()?navigator.wakeLock.request("screen").then((e=>{this._wakeLock=e,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{console.log("Wake Lock released.")}))})).catch((e=>{throw this.enabled=!1,console.error(`${e.name}, ${e.message}`),e})):o()?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=window.setInterval((()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then((e=>(this.enabled=!0,e))).catch((e=>{throw this.enabled=!1,e}))}disable(){a()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):o()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}},505:e=>{e.exports={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK",mp4:"data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}},703:(e,t,n)=>{"use strict";var i=n(414);function r(){}function o(){}o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},162:(e,t)=>{"use strict";var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy");Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case r:case a:case o:case h:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case u:case f:case p:case s:return e;default:return t}}case i:return t}}}Symbol.for("react.module.reference"),t.isFragment=function(e){return m(e)===r},t.isMemo=function(e){return m(e)===p}},805:(e,t,n)=>{"use strict";e.exports=n(162)},448:(e,t,n)=>{"use strict";var i=n(294),r=n(840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n