@crystaldesign/diva-web-planner-react 24.11.0 → 24.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/ArticleProperties-a23f658a.js +164 -0
- package/build/esm/CatalogProperties-8e33265c.js +438 -0
- package/build/esm/IconHandler-2b4cd211.js +77 -0
- package/build/esm/OptionProperties-c0fad436.js +147 -0
- package/build/esm/OptionValueProperties-d85ba84a.js +116 -0
- package/build/esm/Planner2DGrid-cdcab7e7.js +640 -0
- package/build/esm/Planner3DImage-2c0c153b.js +1163 -0
- package/build/esm/index-001d20b6.js +156 -0
- package/build/esm/index-0032191a.js +144 -0
- package/build/esm/index-03a1f70a.js +42 -0
- package/build/esm/index-03bf9a3f.js +49 -0
- package/build/esm/index-06196013.js +85 -0
- package/build/esm/index-075c1e0b.js +53 -0
- package/build/esm/index-078f71b4.js +62 -0
- package/build/esm/index-08de1f4f.js +32 -0
- package/build/esm/index-09cead8d.js +69 -0
- package/build/esm/index-0af002d5.js +59 -0
- package/build/esm/index-0d34c4dd.js +54 -0
- package/build/esm/index-0db4df8f.js +157 -0
- package/build/esm/index-0de9ce00.js +242 -0
- package/build/esm/index-0f1fd58d.js +27 -0
- package/build/esm/index-0f88b3eb.js +43 -0
- package/build/esm/index-11a512cc.js +59 -0
- package/build/esm/index-11de12a4.js +45 -0
- package/build/esm/index-12522ad8.js +108 -0
- package/build/esm/index-12fe5d1a.js +102 -0
- package/build/esm/index-13354589.js +34 -0
- package/build/esm/index-14081b35.js +57 -0
- package/build/esm/index-16b51d9a.js +27 -0
- package/build/esm/index-1855c6c0.js +53 -0
- package/build/esm/index-19137190.js +97 -0
- package/build/esm/index-1bd58047.js +71 -0
- package/build/esm/index-1d4ec596.js +53 -0
- package/build/esm/index-1de690e8.js +52 -0
- package/build/esm/index-1e04abeb.js +131 -0
- package/build/esm/index-20f7d32c.js +41 -0
- package/build/esm/index-2173d651.js +75 -0
- package/build/esm/index-218e66a2.js +27 -0
- package/build/esm/index-23f18d0d.js +111 -0
- package/build/esm/index-2473667a.js +97 -0
- package/build/esm/index-2494c15f.js +144 -0
- package/build/esm/index-2566baa1.js +68 -0
- package/build/esm/index-25afea80.js +27 -0
- package/build/esm/index-2c01799f.js +128 -0
- package/build/esm/index-2d26cbe1.js +59 -0
- package/build/esm/index-2f937443.js +47 -0
- package/build/esm/index-3054c891.js +102 -0
- package/build/esm/index-342becc2.js +108 -0
- package/build/esm/index-34cec40f.js +123 -0
- package/build/esm/index-366c287c.js +65 -0
- package/build/esm/index-3777a317.js +86 -0
- package/build/esm/index-37c8f035.js +98 -0
- package/build/esm/index-394a5e65.js +268 -0
- package/build/esm/index-39c17c01.js +45 -0
- package/build/esm/index-39d04131.js +27 -0
- package/build/esm/index-3a359420.js +176 -0
- package/build/esm/index-3d92e48c.js +134 -0
- package/build/esm/index-3efeb656.js +73 -0
- package/build/esm/index-40b425e4.js +445 -0
- package/build/esm/index-41200533.js +27 -0
- package/build/esm/index-417489b5.js +127 -0
- package/build/esm/index-42b5a148.js +46 -0
- package/build/esm/index-4323a91e.js +127 -0
- package/build/esm/index-44138eb9.js +30 -0
- package/build/esm/index-44440a73.js +96 -0
- package/build/esm/index-45558262.js +123 -0
- package/build/esm/index-49ecd887.js +91 -0
- package/build/esm/index-49f21782.js +83 -0
- package/build/esm/index-4aaa7166.js +81 -0
- package/build/esm/index-4ac43c93.js +33 -0
- package/build/esm/index-4b0b0330.js +116 -0
- package/build/esm/index-4b1b1387.js +139 -0
- package/build/esm/index-4b4199d7.js +57 -0
- package/build/esm/index-4b78f728.js +58 -0
- package/build/esm/index-4b970e13.js +68 -0
- package/build/esm/index-4bf240a3.js +27 -0
- package/build/esm/index-4cf32f6d.js +87 -0
- package/build/esm/index-4e7d1273.js +61 -0
- package/build/esm/index-4f619a93.js +48 -0
- package/build/esm/index-4fbb1e02.js +27 -0
- package/build/esm/index-5062d8b6.js +179 -0
- package/build/esm/index-5070acb9.js +27 -0
- package/build/esm/index-50ed532a.js +202 -0
- package/build/esm/index-51dbd184.js +51 -0
- package/build/esm/index-537b41f5.js +62 -0
- package/build/esm/index-54cdb750.js +186 -0
- package/build/esm/index-54e8191f.js +27 -0
- package/build/esm/index-55797be6.js +27 -0
- package/build/esm/index-559ab0da.js +46 -0
- package/build/esm/index-58345233.js +140 -0
- package/build/esm/index-5946e56c.js +36 -0
- package/build/esm/index-5a7d694a.js +42 -0
- package/build/esm/index-5b64336c.js +68 -0
- package/build/esm/index-5e52d4a5.js +46 -0
- package/build/esm/index-5eeeb234.js +43 -0
- package/build/esm/index-60e2c940.js +97 -0
- package/build/esm/index-616e3212.js +136 -0
- package/build/esm/index-6a548501.js +36 -0
- package/build/esm/index-6ae957da.js +9587 -0
- package/build/esm/index-6b7513dc.js +164 -0
- package/build/esm/index-6cee73e5.js +31 -0
- package/build/esm/index-6d0beeaa.js +177 -0
- package/build/esm/index-6ea2696d.js +50 -0
- package/build/esm/index-6ff0ace8.js +113 -0
- package/build/esm/index-71ead488.js +170 -0
- package/build/esm/index-736ba28d.js +23 -0
- package/build/esm/index-74d1a051.js +75 -0
- package/build/esm/index-75dc38f3.js +127 -0
- package/build/esm/index-7c479178.js +54 -0
- package/build/esm/index-7e5670c9.js +175 -0
- package/build/esm/index-8374b61d.js +61 -0
- package/build/esm/index-83a68812.js +120 -0
- package/build/esm/index-842af387.js +101 -0
- package/build/esm/index-84c5c468.js +27 -0
- package/build/esm/index-84d686e3.js +137 -0
- package/build/esm/index-860ac013.js +154 -0
- package/build/esm/index-869700ff.js +156 -0
- package/build/esm/index-87a2246f.js +27 -0
- package/build/esm/index-87a9a090.js +73 -0
- package/build/esm/index-8800d2bb.js +35 -0
- package/build/esm/index-8959ce5c.js +123 -0
- package/build/esm/index-8bc15033.js +64 -0
- package/build/esm/index-8bd8159a.js +151 -0
- package/build/esm/index-8ced4a84.js +49 -0
- package/build/esm/index-8e3076e6.js +53 -0
- package/build/esm/index-8ef30823.js +78 -0
- package/build/esm/index-9064f786.js +78 -0
- package/build/esm/index-91f1ca86.js +48 -0
- package/build/esm/index-9317a102.js +27 -0
- package/build/esm/index-93c146d5.js +67 -0
- package/build/esm/index-93dff353.js +43 -0
- package/build/esm/index-96a4a56b.js +27 -0
- package/build/esm/index-973085b8.js +275 -0
- package/build/esm/index-993c8b78.js +52 -0
- package/build/esm/index-9c7a9d86.js +56 -0
- package/build/esm/index-9de7a8da.js +91 -0
- package/build/esm/index-9f364cba.js +86 -0
- package/build/esm/index-9f47aa87.js +40 -0
- package/build/esm/index-9f5ef973.js +62 -0
- package/build/esm/index-9f7b15f7.js +69 -0
- package/build/esm/index-a093282f.js +75 -0
- package/build/esm/index-a0bae903.js +91 -0
- package/build/esm/index-a19527fd.js +70 -0
- package/build/esm/index-a2c4bf4f.js +110 -0
- package/build/esm/index-a4811501.js +43 -0
- package/build/esm/index-a52a366e.js +27 -0
- package/build/esm/index-a67ee788.js +38 -0
- package/build/esm/index-a94ac347.js +127 -0
- package/build/esm/index-aa5c6b02.js +64 -0
- package/build/esm/index-aa7f29cd.js +87 -0
- package/build/esm/index-aaf7323a.js +215 -0
- package/build/esm/index-ad84f0bd.js +121 -0
- package/build/esm/index-aee7ac3a.js +82 -0
- package/build/esm/index-b0661444.js +37 -0
- package/build/esm/index-b07fa5bf.js +94 -0
- package/build/esm/index-b1d30f5b.js +40 -0
- package/build/esm/index-b36aebd7.js +76 -0
- package/build/esm/index-b7c96d94.js +27 -0
- package/build/esm/index-b8872c99.js +57 -0
- package/build/esm/index-bb303417.js +106 -0
- package/build/esm/index-bb7a42a4.js +132 -0
- package/build/esm/index-bbfc7452.js +146 -0
- package/build/esm/index-bd81394e.js +107 -0
- package/build/esm/index-bf9a3d74.js +53 -0
- package/build/esm/index-c0eb5880.js +123 -0
- package/build/esm/index-c193f4f9.js +46 -0
- package/build/esm/index-c25e3ea9.js +27 -0
- package/build/esm/index-c3abc1ea.js +121 -0
- package/build/esm/index-c3faf4ff.js +27 -0
- package/build/esm/index-c4c82b3f.js +167 -0
- package/build/esm/index-c57998ff.js +76 -0
- package/build/esm/index-c5ec72f3.js +76 -0
- package/build/esm/index-c64b0b97.js +93 -0
- package/build/esm/index-c773bdd9.js +129 -0
- package/build/esm/index-c873cb1b.js +171 -0
- package/build/esm/index-c9be2ebe.js +92 -0
- package/build/esm/index-cb9e1533.js +78 -0
- package/build/esm/index-ccf3a7d5.js +129 -0
- package/build/esm/index-ce4156ca.js +34 -0
- package/build/esm/index-d284be6d.js +76 -0
- package/build/esm/index-d44ed7d9.js +41 -0
- package/build/esm/index-d4e3aee0.js +111 -0
- package/build/esm/index-d574633d.js +55 -0
- package/build/esm/index-d9a37607.js +163 -0
- package/build/esm/index-d9d77394.js +38 -0
- package/build/esm/index-dae97211.js +45 -0
- package/build/esm/index-def115a3.js +112 -0
- package/build/esm/index-df35900f.js +32 -0
- package/build/esm/index-e01b992d.js +213 -0
- package/build/esm/index-e06b08dc.js +27 -0
- package/build/esm/index-e2656e60.js +44 -0
- package/build/esm/index-e2d8041d.js +99 -0
- package/build/esm/index-e4a6a703.js +54 -0
- package/build/esm/index-e56f484f.js +42 -0
- package/build/esm/index-e6f6bd6d.js +63 -0
- package/build/esm/index-e7051fdc.js +142 -0
- package/build/esm/index-e7dd2a11.js +182 -0
- package/build/esm/index-e8d7a92a.js +129 -0
- package/build/esm/index-e8d8f7be.js +48 -0
- package/build/esm/index-e972f93b.js +186 -0
- package/build/esm/index-e9f67bad.js +551 -0
- package/build/esm/index-eac7a8e2.js +148 -0
- package/build/esm/index-eadde536.js +64 -0
- package/build/esm/index-eb00798f.js +25 -0
- package/build/esm/index-ed6f6702.js +27 -0
- package/build/esm/index-ed701b68.js +157 -0
- package/build/esm/index-edaba8c2.js +50 -0
- package/build/esm/index-ee169456.js +27 -0
- package/build/esm/index-f104bda6.js +37 -0
- package/build/esm/index-f12edce6.js +40 -0
- package/build/esm/index-f17aaae0.js +115 -0
- package/build/esm/index-f2a64ed6.js +95 -0
- package/build/esm/index-f31895f8.js +75 -0
- package/build/esm/index-f31d028f.js +91 -0
- package/build/esm/index-f324b46c.js +170 -0
- package/build/esm/index-f3bdb840.js +156 -0
- package/build/esm/index-f3d6a67b.js +88 -0
- package/build/esm/index-f41b2ee0.js +94 -0
- package/build/esm/index-f4a39937.js +83 -0
- package/build/esm/index-f4e58a35.js +121 -0
- package/build/esm/index-f6275f8e.js +110 -0
- package/build/esm/index-f6784de4.js +76 -0
- package/build/esm/index-f6e64de6.js +132 -0
- package/build/esm/index-f9c3bdf1.js +117 -0
- package/build/esm/index-fabbebaa.js +39 -0
- package/build/esm/index-fd9f8011.js +65 -0
- package/build/esm/index-fdf293b5.js +139 -0
- package/build/esm/index-fec06618.js +156 -0
- package/build/esm/index-feda1fee.js +43 -0
- package/build/esm/index-ff47284f.js +52 -0
- package/build/esm/index-ff91ad31.js +71 -0
- package/build/esm/index.js +1 -1
- package/build/esm/index.module-179848d3.js +9 -0
- package/build/esm/index.module-2c091791.js +18 -0
- package/build/esm/index.module-3b3e6bf7.js +13 -0
- package/build/esm/index.module-4e8e23b6.js +10 -0
- package/build/esm/index.module-58fe7299.js +10 -0
- package/build/esm/index.module-705aae62.js +44 -0
- package/build/esm/index.module-94302b7b.js +12 -0
- package/build/esm/index.module-98eaef5b.js +19 -0
- package/build/esm/index.module-b8f75f3d.js +17 -0
- package/build/esm/index.module-be5c78cf.js +10 -0
- package/build/esm/index.module-bf8133ec.js +9 -0
- package/build/esm/index.module-da90a5d7.js +24 -0
- package/build/esm/index.module-eba8926c.js +8 -0
- package/build/esm/index.module-f5ba5d02.js +20 -0
- package/build/esm/requestProductForm-e6b083b3.js +295 -0
- package/build/umd/1027.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1027.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1077.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1077.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1085.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1085.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1087.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1087.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1088.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1088.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1099.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1099.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/112.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/112.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1137.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1137.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/114.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/114.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1247.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1247.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1259.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1259.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1266.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1266.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1281.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1281.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1295.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1295.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1306.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1306.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1414.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1414.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1426.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1426.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/152.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/152.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/153.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/153.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1606.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1606.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1611.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1611.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1622.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1622.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1694.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1694.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1696.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1696.diva-web-planner-react.umd.min.js.LICENSE.txt +33 -0
- package/build/umd/1805.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1805.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1838.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1838.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1848.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1848.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1885.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1885.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1910.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1910.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/1934.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1934.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/196.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/196.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2010.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2010.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2057.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2057.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2058.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2058.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2060.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2066.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2066.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2195.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2195.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/221.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/221.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2235.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2235.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2236.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2236.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2273.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2273.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2277.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2277.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2305.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2305.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2308.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2308.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2331.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2331.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2337.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2337.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2461.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2461.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2467.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2467.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2479.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2479.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2486.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2486.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2553.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2553.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2590.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2590.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2636.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2648.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2648.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/267.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/267.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2729.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2729.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2754.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2754.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2768.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2768.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2833.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2833.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/286.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/286.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2891.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2891.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/2897.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2897.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2911.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2911.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2995.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2995.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3039.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3039.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3075.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3075.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3152.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3152.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3172.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3172.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3235.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3235.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3274.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3274.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3430.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3430.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3444.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3444.diva-web-planner-react.umd.min.js.LICENSE.txt +8 -0
- package/build/umd/346.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/346.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3469.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3469.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3484.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3484.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3546.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3546.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3623.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3623.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3628.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3628.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3649.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3649.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3708.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3708.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3732.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3732.diva-web-planner-react.umd.min.js.LICENSE.txt +6 -0
- package/build/umd/3733.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3733.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3847.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3847.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3852.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3852.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3887.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3887.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3889.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3889.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/3901.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/3901.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/395.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/395.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4007.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4007.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4059.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4059.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/406.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/406.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4076.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4076.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4086.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4086.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/411.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/411.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4197.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4197.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4223.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4223.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4252.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4252.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4284.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4284.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4296.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4296.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4389.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4389.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4410.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4410.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4418.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4418.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4472.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4472.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4563.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4563.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4631.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4631.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4660.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4660.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4667.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4667.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4689.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4689.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4703.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4703.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4712.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4712.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4772.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4772.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4801.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4801.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4848.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4848.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4902.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4902.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/493.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/493.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/4964.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4964.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/498.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/498.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5013.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5013.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5027.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5027.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5033.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5033.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5052.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5052.diva-web-planner-react.umd.min.js.LICENSE.txt +10 -0
- package/build/umd/5063.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5063.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5095.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5095.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5102.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5102.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5204.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5204.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5297.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5297.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5320.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5320.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/546.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/546.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5462.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5462.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5533.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5533.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5572.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5572.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/560.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/560.diva-web-planner-react.umd.min.js.LICENSE.txt +10 -0
- package/build/umd/5619.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5619.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5628.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5628.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5713.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5713.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5748.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5748.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5765.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5765.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5899.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5899.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5923.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5923.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5924.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5924.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5940.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5940.diva-web-planner-react.umd.min.js.LICENSE.txt +6 -0
- package/build/umd/5945.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5945.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/5985.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/5985.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6001.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6001.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6026.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6026.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/611.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/611.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6152.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6152.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6170.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6170.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6189.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6189.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6262.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6262.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6309.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6309.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6311.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6311.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6373.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6373.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6405.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6405.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6406.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6406.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6440.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6440.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/648.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/648.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6483.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6483.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6499.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6499.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6564.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6564.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6708.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6708.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6720.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6720.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6749.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6749.diva-web-planner-react.umd.min.js.LICENSE.txt +10 -0
- package/build/umd/6773.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6773.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6795.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6795.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6804.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6804.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6835.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6835.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6854.diva-web-planner-react.umd.min.js +408 -0
- package/build/umd/6854.diva-web-planner-react.umd.min.js.LICENSE.txt +86 -0
- package/build/umd/6872.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6872.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/6912.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6912.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7002.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7002.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7012.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7012.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7061.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7061.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/707.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/707.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7084.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7084.diva-web-planner-react.umd.min.js.LICENSE.txt +6 -0
- package/build/umd/7128.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7128.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7196.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7196.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7218.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7218.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7242.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7242.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7248.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7248.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7294.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7294.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7343.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7343.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7358.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7358.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7386.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7386.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/742.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7426.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7426.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7438.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7438.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7454.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7454.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7476.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7476.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7610.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7610.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7648.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7648.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7654.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7654.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7659.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7659.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7698.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7698.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7707.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7707.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/776.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/776.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7782.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7782.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7810.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7810.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7820.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7820.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7829.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7829.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7851.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7851.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7875.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7875.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7878.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7878.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/7899.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7899.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7965.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7965.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7991.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7991.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8016.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8016.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8025.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8025.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8038.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8038.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8044.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8044.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8051.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8051.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8096.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8096.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8109.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8109.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8127.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8127.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8245.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8245.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8249.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8249.diva-web-planner-react.umd.min.js.LICENSE.txt +16 -0
- package/build/umd/8255.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8255.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8264.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8264.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8277.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8277.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8297.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8297.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/83.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/83.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8314.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8314.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8365.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8365.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8395.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8395.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8404.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8404.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8430.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8430.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8434.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8434.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8467.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8467.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8552.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8552.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/86.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/86.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8608.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8608.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8654.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8654.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8664.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8664.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8670.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8670.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8696.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8696.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8710.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8710.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8720.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8720.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8726.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8726.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8761.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8761.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8810.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8810.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8833.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8833.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8835.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8835.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8865.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8865.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8871.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8871.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8925.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8925.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8928.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8928.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8966.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8966.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/8994.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8994.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9013.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9013.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9067.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9067.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9068.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9068.diva-web-planner-react.umd.min.js.LICENSE.txt +10 -0
- package/build/umd/9070.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9070.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/910.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/910.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9111.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9111.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9115.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9115.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9145.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9145.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9178.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9178.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/933.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/933.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/936.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/936.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9396.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9396.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9406.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9406.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9429.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9429.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9450.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9450.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9451.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9451.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9534.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9534.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/954.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/954.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9564.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9564.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9596.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9596.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9636.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9636.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9638.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9638.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9657.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9657.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9691.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9691.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9705.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9705.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9744.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9744.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9752.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9752.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9773.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9773.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9774.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9774.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9789.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9789.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9805.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9805.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9851.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9851.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9853.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9853.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/988.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/988.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9906.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9906.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9957.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9957.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9964.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9964.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
- package/build/umd/9991.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/9991.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +6 -6
- package/build/esm/ArticleProperties-ad4aaabc.js +0 -164
- package/build/esm/CatalogProperties-862d2c79.js +0 -438
- package/build/esm/IconHandler-3f16125d.js +0 -77
- package/build/esm/OptionProperties-950b94a1.js +0 -147
- package/build/esm/OptionValueProperties-18877433.js +0 -116
- package/build/esm/Planner2DGrid-16ef124d.js +0 -640
- package/build/esm/Planner3DImage-c53a2e4f.js +0 -1163
- package/build/esm/index-04598143.js +0 -156
- package/build/esm/index-04d55e82.js +0 -41
- package/build/esm/index-08ae484e.js +0 -129
- package/build/esm/index-0aba93fb.js +0 -123
- package/build/esm/index-0afbc6bf.js +0 -101
- package/build/esm/index-0c044938.js +0 -61
- package/build/esm/index-0cc75729.js +0 -71
- package/build/esm/index-0db3b553.js +0 -91
- package/build/esm/index-0e206c3f.js +0 -137
- package/build/esm/index-0e24de6a.js +0 -127
- package/build/esm/index-0e444930.js +0 -59
- package/build/esm/index-10d8e944.js +0 -43
- package/build/esm/index-11c4a30a.js +0 -83
- package/build/esm/index-1305263d.js +0 -76
- package/build/esm/index-1371aac0.js +0 -46
- package/build/esm/index-15a622b8.js +0 -68
- package/build/esm/index-16f2c33d.js +0 -81
- package/build/esm/index-193e341d.js +0 -115
- package/build/esm/index-1b795043.js +0 -37
- package/build/esm/index-1e8b8742.js +0 -91
- package/build/esm/index-217cf030.js +0 -27
- package/build/esm/index-22358e80.js +0 -51
- package/build/esm/index-23ae379e.js +0 -551
- package/build/esm/index-25c9f645.js +0 -156
- package/build/esm/index-26f8a6f4.js +0 -140
- package/build/esm/index-27375692.js +0 -61
- package/build/esm/index-29a35559.js +0 -186
- package/build/esm/index-2c9173bf.js +0 -95
- package/build/esm/index-2cde3401.js +0 -136
- package/build/esm/index-2ea4ad37.js +0 -52
- package/build/esm/index-2fd6b3ad.js +0 -36
- package/build/esm/index-3199bfee.js +0 -177
- package/build/esm/index-39c29b9a.js +0 -242
- package/build/esm/index-3a646590.js +0 -38
- package/build/esm/index-3b758b96.js +0 -163
- package/build/esm/index-3e7715a6.js +0 -97
- package/build/esm/index-3ede4539.js +0 -73
- package/build/esm/index-40c59259.js +0 -27
- package/build/esm/index-4128ec05.js +0 -27
- package/build/esm/index-42d77ae5.js +0 -27
- package/build/esm/index-463de988.js +0 -53
- package/build/esm/index-46f51d6f.js +0 -213
- package/build/esm/index-470d4669.js +0 -164
- package/build/esm/index-493d8c54.js +0 -27
- package/build/esm/index-4948eafa.js +0 -110
- package/build/esm/index-499b06bd.js +0 -78
- package/build/esm/index-4b3ff6d3.js +0 -157
- package/build/esm/index-4b6e23d0.js +0 -27
- package/build/esm/index-4e63b857.js +0 -99
- package/build/esm/index-4f23a188.js +0 -176
- package/build/esm/index-4fe258c5.js +0 -35
- package/build/esm/index-506b05bd.js +0 -167
- package/build/esm/index-50c80005.js +0 -42
- package/build/esm/index-51a068d6.js +0 -76
- package/build/esm/index-51bbb435.js +0 -82
- package/build/esm/index-52866ccf.js +0 -102
- package/build/esm/index-538fdf33.js +0 -27
- package/build/esm/index-5492c42e.js +0 -64
- package/build/esm/index-556513f0.js +0 -48
- package/build/esm/index-5647c907.js +0 -94
- package/build/esm/index-574eccea.js +0 -39
- package/build/esm/index-5773de2c.js +0 -131
- package/build/esm/index-57e5c7bc.js +0 -27
- package/build/esm/index-58821613.js +0 -27
- package/build/esm/index-5971761f.js +0 -171
- package/build/esm/index-59a3b196.js +0 -54
- package/build/esm/index-5a54730f.js +0 -59
- package/build/esm/index-5a54767d.js +0 -37
- package/build/esm/index-5afa8ae8.js +0 -134
- package/build/esm/index-5b5662e6.js +0 -87
- package/build/esm/index-5c73581e.js +0 -127
- package/build/esm/index-60fa19cd.js +0 -92
- package/build/esm/index-61af1648.js +0 -75
- package/build/esm/index-61e1a114.js +0 -57
- package/build/esm/index-67d18e45.js +0 -127
- package/build/esm/index-684ed601.js +0 -27
- package/build/esm/index-68d8a5f6.js +0 -45
- package/build/esm/index-6a21be1e.js +0 -64
- package/build/esm/index-6c73961f.js +0 -75
- package/build/esm/index-6e5a5052.js +0 -110
- package/build/esm/index-710506ce.js +0 -25
- package/build/esm/index-71e09ba6.js +0 -40
- package/build/esm/index-7217621f.js +0 -108
- package/build/esm/index-73405966.js +0 -27
- package/build/esm/index-73c186e8.js +0 -55
- package/build/esm/index-73fd558b.js +0 -50
- package/build/esm/index-75def7d9.js +0 -91
- package/build/esm/index-76364dda.js +0 -57
- package/build/esm/index-7978c70c.js +0 -32
- package/build/esm/index-7b2c77fc.js +0 -50
- package/build/esm/index-7b2dc821.js +0 -33
- package/build/esm/index-7ccc65da.js +0 -94
- package/build/esm/index-7d24a508.js +0 -129
- package/build/esm/index-7d3f6ebe.js +0 -142
- package/build/esm/index-7d8e85e9.js +0 -27
- package/build/esm/index-7e79f214.js +0 -67
- package/build/esm/index-80295292.js +0 -123
- package/build/esm/index-80813811.js +0 -43
- package/build/esm/index-81f5b321.js +0 -47
- package/build/esm/index-8397c369.js +0 -139
- package/build/esm/index-84207333.js +0 -46
- package/build/esm/index-85a3f724.js +0 -144
- package/build/esm/index-868d8ed8.js +0 -76
- package/build/esm/index-873531d1.js +0 -65
- package/build/esm/index-88a1e093.js +0 -97
- package/build/esm/index-89cbbf70.js +0 -27
- package/build/esm/index-89d06f11.js +0 -27
- package/build/esm/index-8aa8b3c6.js +0 -42
- package/build/esm/index-8c92be1f.js +0 -156
- package/build/esm/index-8e45dee1.js +0 -62
- package/build/esm/index-8eb73d6a.js +0 -120
- package/build/esm/index-8f250571.js +0 -69
- package/build/esm/index-8f2610a4.js +0 -56
- package/build/esm/index-8fadff48.js +0 -54
- package/build/esm/index-8fbb0b4d.js +0 -128
- package/build/esm/index-8fc51f02.js +0 -156
- package/build/esm/index-904a4e92.js +0 -182
- package/build/esm/index-90c552cd.js +0 -445
- package/build/esm/index-9224cea6.js +0 -45
- package/build/esm/index-92d56474.js +0 -202
- package/build/esm/index-94db34a7.js +0 -76
- package/build/esm/index-95e686fe.js +0 -76
- package/build/esm/index-95f99f74.js +0 -132
- package/build/esm/index-965718c6.js +0 -154
- package/build/esm/index-96ca37fc.js +0 -275
- package/build/esm/index-9792f929.js +0 -215
- package/build/esm/index-97b68154.js +0 -83
- package/build/esm/index-97dd0b72.js +0 -78
- package/build/esm/index-989ab649.js +0 -41
- package/build/esm/index-990d1a26.js +0 -34
- package/build/esm/index-9a6c023e.js +0 -68
- package/build/esm/index-9c428c97.js +0 -36
- package/build/esm/index-9cae369c.js +0 -121
- package/build/esm/index-9d5346ea.js +0 -52
- package/build/esm/index-9ed6924d.js +0 -34
- package/build/esm/index-a1e719a5.js +0 -53
- package/build/esm/index-a21b8051.js +0 -27
- package/build/esm/index-a2341787.js +0 -111
- package/build/esm/index-a2f0bee7.js +0 -88
- package/build/esm/index-a41ddfe1.js +0 -86
- package/build/esm/index-a5b06d0b.js +0 -53
- package/build/esm/index-a6a32ebd.js +0 -64
- package/build/esm/index-a95a2c76.js +0 -40
- package/build/esm/index-aa0d34b9.js +0 -146
- package/build/esm/index-ab6f18e7.js +0 -107
- package/build/esm/index-ab829d63.js +0 -71
- package/build/esm/index-ab9299a9.js +0 -97
- package/build/esm/index-acff910c.js +0 -27
- package/build/esm/index-aecf74ab.js +0 -139
- package/build/esm/index-af5f4e78.js +0 -27
- package/build/esm/index-afaf915c.js +0 -58
- package/build/esm/index-afb53cfd.js +0 -32
- package/build/esm/index-afb5fb5d.js +0 -127
- package/build/esm/index-b14e742e.js +0 -91
- package/build/esm/index-b1d1df6c.js +0 -44
- package/build/esm/index-b29be090.js +0 -68
- package/build/esm/index-b308c220.js +0 -157
- package/build/esm/index-b361e795.js +0 -96
- package/build/esm/index-b37dcde2.js +0 -23
- package/build/esm/index-b3badc96.js +0 -30
- package/build/esm/index-b6bf3333.js +0 -73
- package/build/esm/index-b76eef0f.js +0 -75
- package/build/esm/index-b7d2ad37.js +0 -69
- package/build/esm/index-b7f00826.js +0 -116
- package/build/esm/index-ba10c7a8.js +0 -93
- package/build/esm/index-baceec21.js +0 -65
- package/build/esm/index-bcea3f10.js +0 -108
- package/build/esm/index-bd36055e.js +0 -48
- package/build/esm/index-bf352463.js +0 -63
- package/build/esm/index-c1e0cf86.js +0 -78
- package/build/esm/index-c2584885.js +0 -170
- package/build/esm/index-c333c380.js +0 -132
- package/build/esm/index-c3aeb47b.js +0 -102
- package/build/esm/index-c4775c2e.js +0 -43
- package/build/esm/index-c4a170c0.js +0 -27
- package/build/esm/index-c7339c6a.js +0 -27
- package/build/esm/index-c9c3db8a.js +0 -87
- package/build/esm/index-cb4f9308.js +0 -70
- package/build/esm/index-cc8dbdac.js +0 -38
- package/build/esm/index-ce490cda.js +0 -49
- package/build/esm/index-ceac7152.js +0 -9587
- package/build/esm/index-d00e5b1f.js +0 -43
- package/build/esm/index-d0f28655.js +0 -123
- package/build/esm/index-d27f402e.js +0 -98
- package/build/esm/index-d512573e.js +0 -179
- package/build/esm/index-d53cbefe.js +0 -75
- package/build/esm/index-d5b9eee6.js +0 -148
- package/build/esm/index-d5cf3f49.js +0 -48
- package/build/esm/index-d6085391.js +0 -111
- package/build/esm/index-d6a76043.js +0 -144
- package/build/esm/index-d8078de8.js +0 -53
- package/build/esm/index-d8cb8f3c.js +0 -117
- package/build/esm/index-da820de6.js +0 -175
- package/build/esm/index-dd8dba83.js +0 -27
- package/build/esm/index-dfb7975d.js +0 -42
- package/build/esm/index-e0442a96.js +0 -46
- package/build/esm/index-e24e318e.js +0 -45
- package/build/esm/index-e278d05e.js +0 -121
- package/build/esm/index-e30d972e.js +0 -121
- package/build/esm/index-e54c4a83.js +0 -170
- package/build/esm/index-e610c16a.js +0 -54
- package/build/esm/index-e63eb8cf.js +0 -52
- package/build/esm/index-e8634331.js +0 -62
- package/build/esm/index-e8e48df7.js +0 -151
- package/build/esm/index-ea6e93f1.js +0 -112
- package/build/esm/index-ec549beb.js +0 -59
- package/build/esm/index-ec7a941f.js +0 -129
- package/build/esm/index-ed959987.js +0 -268
- package/build/esm/index-f06d32ec.js +0 -46
- package/build/esm/index-f530765c.js +0 -43
- package/build/esm/index-f53c51df.js +0 -106
- package/build/esm/index-f716b083.js +0 -186
- package/build/esm/index-f735526e.js +0 -113
- package/build/esm/index-f753a21a.js +0 -62
- package/build/esm/index-f7f4ec7b.js +0 -53
- package/build/esm/index-f848f570.js +0 -85
- package/build/esm/index-f9068fcb.js +0 -31
- package/build/esm/index-fb1b65be.js +0 -123
- package/build/esm/index-fba00d25.js +0 -27
- package/build/esm/index-fc7ffbaa.js +0 -40
- package/build/esm/index-fc89b69e.js +0 -86
- package/build/esm/index-fd1d46f0.js +0 -27
- package/build/esm/index-fe442524.js +0 -49
- package/build/esm/index-ff721b9e.js +0 -57
- package/build/esm/index.module-02c9581a.js +0 -24
- package/build/esm/index.module-4b848fc5.js +0 -8
- package/build/esm/index.module-554572ea.js +0 -12
- package/build/esm/index.module-78a0c9bc.js +0 -17
- package/build/esm/index.module-7d5da655.js +0 -13
- package/build/esm/index.module-8a42df78.js +0 -9
- package/build/esm/index.module-92dc1689.js +0 -20
- package/build/esm/index.module-9dd324d1.js +0 -44
- package/build/esm/index.module-b014fcfb.js +0 -10
- package/build/esm/index.module-bb0d9c75.js +0 -10
- package/build/esm/index.module-cfe1950c.js +0 -10
- package/build/esm/index.module-e5c4422b.js +0 -9
- package/build/esm/index.module-eaf26f9e.js +0 -18
- package/build/esm/index.module-f9ed15bf.js +0 -19
- package/build/esm/requestProductForm-e9e88800.js +0 -295
- package/build/umd/109.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/109.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1095.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1095.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1096.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1096.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1120.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1120.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1197.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1197.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1221.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1221.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1240.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1240.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1254.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1254.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1393.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1393.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -10
- package/build/umd/1416.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1416.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/1420.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1420.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1477.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1477.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1500.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1500.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1513.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1513.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1546.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1546.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1573.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1573.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1613.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1613.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/164.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/164.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/175.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/175.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1762.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1762.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1773.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1773.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/1819.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1819.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1840.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1840.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -33
- package/build/umd/1868.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1868.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/1891.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1891.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/1965.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1965.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/1969.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1969.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/1976.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1976.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/1984.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1984.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/201.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/201.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2032.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2032.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2081.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2081.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/2216.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2216.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2256.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2256.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2257.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2257.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/2300.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2300.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2309.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2309.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/231.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/231.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2356.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2356.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2424.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2424.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2476.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2476.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2487.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2487.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2508.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2508.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/2523.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2523.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2564.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2564.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/2596.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2596.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/2619.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2619.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/265.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/265.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/2674.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2674.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/2684.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2684.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2692.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2692.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2731.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2731.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/2743.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2743.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2759.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2759.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2785.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2785.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/2993.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/2993.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3010.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3010.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3053.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3053.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3098.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3098.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3112.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3112.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3189.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3189.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/319.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/319.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3193.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3193.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3209.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3209.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3279.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3279.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3289.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3289.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3338.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3338.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3352.diva-web-planner-react.umd.min.js +0 -408
- package/build/umd/3352.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -86
- package/build/umd/3366.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3366.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3367.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3367.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3452.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3452.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3528.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3528.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3563.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3563.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3667.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3667.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3703.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3703.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3715.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3715.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3718.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3718.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3744.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3744.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3802.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3802.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3805.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3805.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/386.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/386.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/3864.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3864.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3865.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3865.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/388.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/388.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3994.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/3994.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/40.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/40.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4004.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4004.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4023.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4023.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/408.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/408.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/409.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/409.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4133.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4133.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/416.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/416.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4168.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4168.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/4178.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4178.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/4209.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4209.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4215.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4215.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4228.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4228.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/4233.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4233.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4300.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4300.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/4340.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4340.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/4357.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4357.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4435.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4435.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4444.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4444.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/449.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/449.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4515.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4515.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/455.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/455.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4589.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4589.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/4611.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4611.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/4732.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4732.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4751.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4751.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/48.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/48.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/4835.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4835.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4936.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4936.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/494.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/494.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/4991.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4991.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/506.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/506.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5075.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5075.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5080.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5080.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5117.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5117.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5174.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5174.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5183.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5183.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5221.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5221.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5273.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5273.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5310.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5310.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5374.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5374.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5401.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5401.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5431.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5431.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5434.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5434.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5489.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5489.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5557.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5557.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5565.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5565.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5670.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5670.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5698.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5698.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5770.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5770.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5772.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5772.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5782.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5782.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5803.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5803.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5843.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5843.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5852.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5852.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5860.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5860.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/590.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/590.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5901.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5901.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5914.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5914.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5954.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5954.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/597.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/597.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/5971.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5971.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5982.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5982.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6030.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6030.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6036.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6036.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -8
- package/build/umd/6088.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6088.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6096.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6096.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6162.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6162.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6215.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6215.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6230.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6230.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/624.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/624.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6265.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6265.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6276.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6276.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6342.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6342.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6392.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6392.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6394.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6394.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/64.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/64.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/644.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/644.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6461.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6461.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -16
- package/build/umd/6472.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6472.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6486.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6486.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6592.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6592.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6595.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6595.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6624.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6624.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/666.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/666.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6665.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6665.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6666.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6666.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6677.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6677.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6715.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6715.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6736.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6736.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6742.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6742.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6753.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6753.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6758.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6758.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/676.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/676.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6761.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6761.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6764.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6764.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6790.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6790.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6929.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6929.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6953.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6953.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/6960.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6960.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -10
- package/build/umd/6973.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6973.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7035.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7035.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7051.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7051.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7082.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7082.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7094.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7094.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7207.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7207.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7237.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7237.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7270.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7270.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7348.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7348.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7378.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7378.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7422.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7422.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7430.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7430.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7470.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7470.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7493.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7493.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7505.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7505.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7531.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7531.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7559.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7559.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7566.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7566.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/763.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/763.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7692.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7692.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -10
- package/build/umd/7706.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7706.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7736.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7736.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7745.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7745.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7765.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7765.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7781.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7781.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7787.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7787.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7854.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7854.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7868.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7868.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7893.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7893.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7902.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7902.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7905.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7905.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7921.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7921.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7962.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7962.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/7988.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7988.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -10
- package/build/umd/7999.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7999.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8035.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8035.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8041.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8041.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8071.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8071.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/81.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/81.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/815.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/815.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8177.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8177.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8181.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8181.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8191.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8191.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8232.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8232.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8234.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8234.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8238.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8238.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8295.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8295.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8307.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8307.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8350.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8350.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8417.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8417.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8473.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8473.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8571.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8571.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8577.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8577.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/869.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/869.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8692.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8692.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8739.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8739.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8862.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8862.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8932.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8932.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8988.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8988.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8990.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8990.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/8995.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8995.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9003.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9003.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/904.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/904.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9062.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9062.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9082.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9082.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9124.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9124.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9146.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9146.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9189.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9189.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9228.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9228.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9289.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9289.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9302.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9302.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9334.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9334.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9336.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9336.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9338.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9338.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9383.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9383.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9435.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9435.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9459.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9459.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9577.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9577.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9645.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9645.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9649.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9649.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9666.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9666.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9674.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9674.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/968.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/968.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9680.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9680.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9692.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9692.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9761.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9761.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9762.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9762.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9770.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9770.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9786.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9786.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9787.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9787.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9825.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9825.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9898.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9898.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9915.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9915.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/993.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/993.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
- package/build/umd/9989.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/9989.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 4563.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[4563],{91177:(e,t,n)=>{n.d(t,{$EB:()=>h,$Kf:()=>Bone,$_I:()=>te,B69:()=>Object3D,BH$:()=>PointsMaterial,BKk:()=>ShaderMaterial,BRH:()=>DataTextureLoader,BXX:()=>ye,CSG:()=>MeshDepthMaterial,CVz:()=>Te,Cfg:()=>Q,DXC:()=>LineSegments,EAD:()=>Skeleton,F1T:()=>CubeCamera,FCc:()=>LineLoop,FV:()=>B,FZo:()=>LightProbe,Fn:()=>Re,FvD:()=>CompressedTexture,G3T:()=>Ce,GJx:()=>q,GOR:()=>CanvasTexture,GWd:()=>de,GYF:()=>DataTexture,G_z:()=>MeshLambertMaterial,Gu$:()=>SphereGeometry,GxU:()=>Fn,HXV:()=>Se,HiM:()=>PointLight,Hit:()=>NumberKeyframeTrack,I46:()=>SkinnedMesh,I9Y:()=>Vector2,IE4:()=>_e,Iw4:()=>AnimationMixer,JeP:()=>WebGLRenderer,KDk:()=>Ee,KPJ:()=>LoadingManager,Kzg:()=>ImageBitmapLoader,LAk:()=>V,LlO:()=>ui,LoY:()=>BufferGeometry,MBL:()=>QuaternionKeyframeTrack,N1A:()=>Line,NRn:()=>Box3,NZq:()=>ne,Nv2:()=>VideoTexture,Nwf:()=>PropertyBinding,O49:()=>ze,O9p:()=>Euler,ONl:()=>Points,OUM:()=>ie,PJ3:()=>Ie,PTz:()=>Quaternion,Pq0:()=>Vector3,Q1f:()=>Color,Qev:()=>EventDispatcher,Qrf:()=>we,RJ4:()=>Ve,RQf:()=>ce,RiT:()=>VectorKeyframeTrack,Riy:()=>be,THS:()=>BufferAttribute,Tap:()=>TextureLoader,UTZ:()=>G,V5c:()=>je,V9B:()=>MeshBasicMaterial,VT0:()=>me,XIg:()=>u,Y9S:()=>FileLoader,YHV:()=>Spherical,YJl:()=>Group,Yuy:()=>oe,Z58:()=>Scene,ZLX:()=>InstancedMesh,Zr2:()=>Xe,ZyN:()=>DirectionalLight,_4j:()=>MeshStandardMaterial,aHM:()=>Loader,aMy:()=>Le,bdM:()=>PlaneGeometry,bkx:()=>le,c5h:()=>CompressedCubeTexture,cj9:()=>gt,dYF:()=>Data3DTexture,dwI:()=>Matrix3,eB$:()=>InterleavedBuffer,eHs:()=>InterleavedBufferAttribute,eaF:()=>Mesh,er$:()=>We,fBL:()=>ae,g7M:()=>F,gPd:()=>Texture,ghU:()=>Y,hB5:()=>l,hsX:()=>c,hxR:()=>Z,iNn:()=>BoxGeometry,iOZ:()=>CompressedArrayTexture,imn:()=>Material,ix0:()=>he,iyt:()=>Sphere,jf0:()=>ke,k6Q:()=>Me,k6q:()=>$,kLi:()=>Source,kRr:()=>ee,kTW:()=>K,kn4:()=>Matrix4,lGw:()=>Interpolant,lMl:()=>Triangle,lc7:()=>Pe,ljd:()=>Ue,mrM:()=>LineBasicMaterial,nCl:()=>SpotLight,nWS:()=>WebGLRenderTarget,nc$:()=>Uniform,o6l:()=>WebGLCubeRenderTarget,pHI:()=>J,paN:()=>ge,ppV:()=>Tt,qIQ:()=>qe,qUd:()=>OrthographicCamera,qa3:()=>Ae,qtW:()=>Float32BufferAttribute,r6x:()=>LoaderUtils,rYR:()=>Ge,tBo:()=>Raycaster,tJf:()=>re,tz3:()=>AnimationClip,uSd:()=>MeshPhysicalMaterial,uWO:()=>InstancedBufferAttribute,ubm:()=>PerspectiveCamera,vxI:()=>vi,wfO:()=>W,y_p:()=>I,zD7:()=>Clock});var i=n(96763);const r="160",a=1,s=2,o=3,l=0,c=1,h=2,u=0,d=100,p=101,f=102,m=200,g=201,_=202,v=203,x=204,y=205,M=206,S=207,T=208,b=209,E=210,A=211,w=212,R=213,C=214,L=0,P=1,U=2,I=0,D=1,N=2,O=3,B=4,F=5,V=6,z="attached",G=300,H=301,k=302,W=303,X=304,j=306,q=1e3,Y=1001,K=1002,Z=1003,J=1004,Q=1005,$=1006,ee=1007,te=1008,ne=1008,ie=1009,re=1010,ae=1011,se=1012,oe=1013,le=1014,ce=1015,he=1016,ue=1020,de=1023,pe=1026,fe=1027,me=1028,ge=1030,_e=33776,ve=33777,xe=33778,ye=33779,Me=35840,Se=35842,Te=36196,be=37492,Ee=37496,Ae=37808,we=37812,Re=36492,Ce=2200,Le=2201,Pe=2202,Ue=2300,Ie=2301,De=2302,Ne=2400,Oe=2401,Be=2402,Fe=2500,Ve=0,ze=1,Ge=2,He=3001,ke="",We="srgb",Xe="srgb-linear",je="display-p3",qe="display-p3-linear",Ye="linear",Ke="srgb",Ze="rec709",Je="p3",Qe=7680,$e=512,et=513,tt=514,nt=515,it=516,rt=517,at=518,st=519,ot=35044,lt="300 es",ct=1035,ht=2e3,ut=2001;class EventDispatcher{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,i=n.length;t<i;t++)n[t].call(this,e);e.target=null}}}const dt=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let pt=1234567;const ft=Math.PI/180,mt=180/Math.PI;function generateUUID(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(dt[255&e]+dt[e>>8&255]+dt[e>>16&255]+dt[e>>24&255]+"-"+dt[255&t]+dt[t>>8&255]+"-"+dt[t>>16&15|64]+dt[t>>24&255]+"-"+dt[63&n|128]+dt[n>>8&255]+"-"+dt[n>>16&255]+dt[n>>24&255]+dt[255&i]+dt[i>>8&255]+dt[i>>16&255]+dt[i>>24&255]).toLowerCase()}function clamp(e,t,n){return Math.max(t,Math.min(n,e))}function euclideanModulo(e,t){return(e%t+t)%t}function lerp(e,t,n){return(1-n)*e+n*t}function isPowerOfTwo(e){return!(e&e-1)&&0!==e}function floorPowerOfTwo(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function denormalize(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function normalize(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const gt={DEG2RAD:ft,RAD2DEG:mt,generateUUID,clamp,euclideanModulo,mapLinear:function mapLinear(e,t,n,i,r){return i+(e-t)*(r-i)/(n-t)},inverseLerp:function inverseLerp(e,t,n){return e!==t?(n-e)/(t-e):0},lerp,damp:function damp(e,t,n,i){return lerp(e,t,1-Math.exp(-n*i))},pingpong:function pingpong(e,t=1){return t-Math.abs(euclideanModulo(e,2*t)-t)},smoothstep:function smoothstep(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function smootherstep(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function randInt(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function randFloat(e,t){return e+Math.random()*(t-e)},randFloatSpread:function randFloatSpread(e){return e*(.5-Math.random())},seededRandom:function seededRandom(e){void 0!==e&&(pt=e);let t=pt+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function degToRad(e){return e*ft},radToDeg:function radToDeg(e){return e*mt},isPowerOfTwo,ceilPowerOfTwo:function ceilPowerOfTwo(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo,setQuaternionFromProperEuler:function setQuaternionFromProperEuler(e,t,n,r,a){const s=Math.cos,o=Math.sin,l=s(n/2),c=o(n/2),h=s((t+r)/2),u=o((t+r)/2),d=s((t-r)/2),p=o((t-r)/2),f=s((r-t)/2),m=o((r-t)/2);switch(a){case"XYX":e.set(l*u,c*d,c*p,l*h);break;case"YZY":e.set(c*p,l*u,c*d,l*h);break;case"ZXZ":e.set(c*d,c*p,l*u,l*h);break;case"XZX":e.set(l*u,c*m,c*f,l*h);break;case"YXY":e.set(c*f,l*u,c*m,l*h);break;case"ZYZ":e.set(c*m,c*f,l*u,l*h);break;default:i.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+a)}},normalize,denormalize};class Vector2{constructor(e=0,t=0){Vector2.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(clamp(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*n-a*i+e.x,this.y=r*i+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Matrix3{constructor(e,t,n,i,r,a,s,o,l){Matrix3.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,i,r,a,s,o,l)}set(e,t,n,i,r,a,s,o,l){const c=this.elements;return c[0]=e,c[1]=i,c[2]=s,c[3]=t,c[4]=r,c[5]=o,c[6]=n,c[7]=a,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,a=n[0],s=n[3],o=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],f=i[0],m=i[3],g=i[6],_=i[1],v=i[4],x=i[7],y=i[2],M=i[5],S=i[8];return r[0]=a*f+s*_+o*y,r[3]=a*m+s*v+o*M,r[6]=a*g+s*x+o*S,r[1]=l*f+c*_+h*y,r[4]=l*m+c*v+h*M,r[7]=l*g+c*x+h*S,r[2]=u*f+d*_+p*y,r[5]=u*m+d*v+p*M,r[8]=u*g+d*x+p*S,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],s=e[5],o=e[6],l=e[7],c=e[8];return t*a*c-t*s*l-n*r*c+n*s*o+i*r*l-i*a*o}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],s=e[5],o=e[6],l=e[7],c=e[8],h=c*a-s*l,u=s*o-c*r,d=l*r-a*o,p=t*h+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=h*f,e[1]=(i*l-c*n)*f,e[2]=(s*n-i*a)*f,e[3]=u*f,e[4]=(c*t-i*o)*f,e[5]=(i*r-s*t)*f,e[6]=d*f,e[7]=(n*o-l*t)*f,e[8]=(a*t-n*r)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,a,s){const o=Math.cos(r),l=Math.sin(r);return this.set(n*o,n*l,-n*(o*a+l*s)+a+e,-i*l,i*o,-i*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(_t.makeScale(e,t)),this}rotate(e){return this.premultiply(_t.makeRotation(-e)),this}translate(e,t){return this.premultiply(_t.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;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}clone(){return(new this.constructor).fromArray(this.elements)}}const _t=new Matrix3;function arrayNeedsUint32(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function createElementNS(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function createCanvasElement(){const e=createElementNS("canvas");return e.style.display="block",e}const vt={};function warnOnce(e){e in vt||(vt[e]=!0,i.warn(e))}const xt=(new Matrix3).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),yt=(new Matrix3).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Mt={[Xe]:{transfer:Ye,primaries:Ze,toReference:e=>e,fromReference:e=>e},[We]:{transfer:Ke,primaries:Ze,toReference:e=>e.convertSRGBToLinear(),fromReference:e=>e.convertLinearToSRGB()},[qe]:{transfer:Ye,primaries:Je,toReference:e=>e.applyMatrix3(yt),fromReference:e=>e.applyMatrix3(xt)},[je]:{transfer:Ke,primaries:Je,toReference:e=>e.convertSRGBToLinear().applyMatrix3(yt),fromReference:e=>e.applyMatrix3(xt).convertLinearToSRGB()}},St=new Set([Xe,qe]),Tt={enabled:!0,_workingColorSpace:Xe,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(e){if(!St.has(e))throw new Error(`Unsupported working color space, "${e}".`);this._workingColorSpace=e},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;const i=Mt[t].toReference;return(0,Mt[n].fromReference)(i(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this._workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this._workingColorSpace)},getPrimaries:function(e){return Mt[e].primaries},getTransfer:function(e){return e===ke?Ye:Mt[e].transfer}};function SRGBToLinear(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function LinearToSRGB(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}let bt;class ImageUtils{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===bt&&(bt=createElementNS("canvas")),bt.width=e.width,bt.height=e.height;const n=bt.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=bt}return t.width>2048||t.height>2048?(i.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=createElementNS("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let e=0;e<r.length;e++)r[e]=255*SRGBToLinear(r[e]/255);return n.putImageData(i,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*SRGBToLinear(t[e]/255)):t[e]=SRGBToLinear(t[e]);return{data:t,width:e.width,height:e.height}}return i.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let Et=0;class Source{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Et++}),this.uuid=generateUUID(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(null!==i){let e;if(Array.isArray(i)){e=[];for(let t=0,n=i.length;t<n;t++)i[t].isDataTexture?e.push(serializeImage(i[t].image)):e.push(serializeImage(i[t]))}else e=serializeImage(i);n.url=e}return t||(e.images[this.uuid]=n),n}}function serializeImage(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?ImageUtils.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(i.warn("THREE.Texture: Unable to serialize Texture."),{})}let At=0;class Texture extends EventDispatcher{constructor(e=Texture.DEFAULT_IMAGE,t=Texture.DEFAULT_MAPPING,n=Y,i=Y,r=$,a=te,s=de,o=ie,l=Texture.DEFAULT_ANISOTROPY,c=ke){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:At++}),this.uuid=generateUUID(),this.name="",this.source=new Source(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=a,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=o,this.offset=new Vector2(0,0),this.repeat=new Vector2(1,1),this.center=new Vector2(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Matrix3,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,"string"==typeof c?this.colorSpace=c:(warnOnce("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=c===He?We:ke),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==G)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case q:e.x=e.x-Math.floor(e.x);break;case Y:e.x=e.x<0?0:1;break;case K:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case q:e.y=e.y-Math.floor(e.y);break;case Y:e.y=e.y<0?0:1;break;case K:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return warnOnce("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===We?He:3e3}set encoding(e){warnOnce("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===He?We:ke}}Texture.DEFAULT_IMAGE=null,Texture.DEFAULT_MAPPING=G,Texture.DEFAULT_ANISOTROPY=1;class Vector4{constructor(e=0,t=0,n=0,i=1){Vector4.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i+a[12]*r,this.y=a[1]*t+a[5]*n+a[9]*i+a[13]*r,this.z=a[2]*t+a[6]*n+a[10]*i+a[14]*r,this.w=a[3]*t+a[7]*n+a[11]*i+a[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r;const a=.01,s=.1,o=e.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],p=o[9],f=o[2],m=o[6],g=o[10];if(Math.abs(c-u)<a&&Math.abs(h-f)<a&&Math.abs(p-m)<a){if(Math.abs(c+u)<s&&Math.abs(h+f)<s&&Math.abs(p+m)<s&&Math.abs(l+d+g-3)<s)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,o=(d+1)/2,_=(g+1)/2,v=(c+u)/4,x=(h+f)/4,y=(p+m)/4;return e>o&&e>_?e<a?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(e),i=v/n,r=x/n):o>_?o<a?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(o),n=v/i,r=y/i):_<a?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(_),n=x/r,i=y/r),this.set(n,i,r,t),this}let _=Math.sqrt((m-p)*(m-p)+(h-f)*(h-f)+(u-c)*(u-c));return Math.abs(_)<.001&&(_=1),this.x=(m-p)/_,this.y=(h-f)/_,this.z=(u-c)/_,this.w=Math.acos((l+d+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class RenderTarget extends EventDispatcher{constructor(e=1,t=1,n={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Vector4(0,0,e,t),this.scissorTest=!1,this.viewport=new Vector4(0,0,e,t);const i={width:e,height:t,depth:1};void 0!==n.encoding&&(warnOnce("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===He?We:ke),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:$,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},n),this.texture=new Texture(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps,this.texture.internalFormat=n.internalFormat,this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Source(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class WebGLRenderTarget extends RenderTarget{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class DataArrayTexture extends Texture{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=Z,this.minFilter=Z,this.wrapR=Y,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Data3DTexture extends Texture{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=Z,this.minFilter=Z,this.wrapR=Y,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Quaternion{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,a,s){let o=n[i+0],l=n[i+1],c=n[i+2],h=n[i+3];const u=r[a+0],d=r[a+1],p=r[a+2],f=r[a+3];if(0===s)return e[t+0]=o,e[t+1]=l,e[t+2]=c,void(e[t+3]=h);if(1===s)return e[t+0]=u,e[t+1]=d,e[t+2]=p,void(e[t+3]=f);if(h!==f||o!==u||l!==d||c!==p){let e=1-s;const t=o*u+l*d+c*p+h*f,n=t>=0?1:-1,i=1-t*t;if(i>Number.EPSILON){const r=Math.sqrt(i),a=Math.atan2(r,t*n);e=Math.sin(e*a)/r,s=Math.sin(s*a)/r}const r=s*n;if(o=o*e+u*r,l=l*e+d*r,c=c*e+p*r,h=h*e+f*r,e===1-s){const e=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=e,l*=e,c*=e,h*=e}}e[t]=o,e[t+1]=l,e[t+2]=c,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,i,r,a){const s=n[i],o=n[i+1],l=n[i+2],c=n[i+3],h=r[a],u=r[a+1],d=r[a+2],p=r[a+3];return e[t]=s*p+c*h+o*d-l*u,e[t+1]=o*p+c*u+l*h-s*d,e[t+2]=l*p+c*d+s*u-o*h,e[t+3]=c*p-s*h-o*u-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,r=e._y,a=e._z,s=e._order,o=Math.cos,l=Math.sin,c=o(n/2),h=o(r/2),u=o(a/2),d=l(n/2),p=l(r/2),f=l(a/2);switch(s){case"XYZ":this._x=d*h*u+c*p*f,this._y=c*p*u-d*h*f,this._z=c*h*f+d*p*u,this._w=c*h*u-d*p*f;break;case"YXZ":this._x=d*h*u+c*p*f,this._y=c*p*u-d*h*f,this._z=c*h*f-d*p*u,this._w=c*h*u+d*p*f;break;case"ZXY":this._x=d*h*u-c*p*f,this._y=c*p*u+d*h*f,this._z=c*h*f+d*p*u,this._w=c*h*u-d*p*f;break;case"ZYX":this._x=d*h*u-c*p*f,this._y=c*p*u+d*h*f,this._z=c*h*f-d*p*u,this._w=c*h*u+d*p*f;break;case"YZX":this._x=d*h*u+c*p*f,this._y=c*p*u+d*h*f,this._z=c*h*f-d*p*u,this._w=c*h*u-d*p*f;break;case"XZY":this._x=d*h*u-c*p*f,this._y=c*p*u-d*h*f,this._z=c*h*f+d*p*u,this._w=c*h*u+d*p*f;break;default:i.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],r=t[8],a=t[1],s=t[5],o=t[9],l=t[2],c=t[6],h=t[10],u=n+s+h;if(u>0){const e=.5/Math.sqrt(u+1);this._w=.25/e,this._x=(c-o)*e,this._y=(r-l)*e,this._z=(a-i)*e}else if(n>s&&n>h){const e=2*Math.sqrt(1+n-s-h);this._w=(c-o)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(r+l)/e}else if(s>h){const e=2*Math.sqrt(1+s-n-h);this._w=(r-l)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(o+c)/e}else{const e=2*Math.sqrt(1+h-n-s);this._w=(a-i)/e,this._x=(r+l)/e,this._y=(o+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(clamp(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,r=e._z,a=e._w,s=t._x,o=t._y,l=t._z,c=t._w;return this._x=n*c+a*s+i*l-r*o,this._y=i*c+a*o+r*s-n*l,this._z=r*c+a*l+n*o-i*s,this._w=a*c-n*s-i*o-r*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,i=this._y,r=this._z,a=this._w;let s=a*e._w+n*e._x+i*e._y+r*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=a,this._x=n,this._y=i,this._z=r,this;const o=1-s*s;if(o<=Number.EPSILON){const e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*i+t*this._y,this._z=e*r+t*this._z,this.normalize(),this}const l=Math.sqrt(o),c=Math.atan2(l,s),h=Math.sin((1-t)*c)/l,u=Math.sin(t*c)/l;return this._w=a*h+this._w*u,this._x=n*h+this._x*u,this._y=i*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(i),n*Math.sin(r),n*Math.cos(r),t*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Vector3{constructor(e=0,t=0,n=0){Vector3.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Rt.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Rt.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=e.elements,a=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*a,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,r=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*i-s*n),c=2*(s*t-r*i),h=2*(r*n-a*t);return this.x=t+o*l+a*h-s*c,this.y=n+o*c+s*l-r*h,this.z=i+o*h+r*c-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,r=e.z,a=t.x,s=t.y,o=t.z;return this.x=i*o-r*s,this.y=r*a-n*o,this.z=n*s-i*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return wt.copy(this).projectOnVector(e),this.sub(wt)}reflect(e){return this.sub(wt.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(clamp(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const wt=new Vector3,Rt=new Quaternion;class Box3{constructor(e=new Vector3(1/0,1/0,1/0),t=new Vector3(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Lt.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Lt.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Lt.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n){const i=n.getAttribute("position");if(!0===t&&void 0!==i&&!0!==e.isInstancedMesh)for(let t=0,n=i.count;t<n;t++)!0===e.isMesh?e.getVertexPosition(t,Lt):Lt.fromBufferAttribute(i,t),Lt.applyMatrix4(e.matrixWorld),this.expandByPoint(Lt);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),Pt.copy(e.boundingBox)):(null===n.boundingBox&&n.computeBoundingBox(),Pt.copy(n.boundingBox)),Pt.applyMatrix4(e.matrixWorld),this.union(Pt)}const i=e.children;for(let e=0,n=i.length;e<n;e++)this.expandByObject(i[e],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Lt),Lt.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ft),Vt.subVectors(this.max,Ft),Ut.subVectors(e.a,Ft),It.subVectors(e.b,Ft),Dt.subVectors(e.c,Ft),Nt.subVectors(It,Ut),Ot.subVectors(Dt,It),Bt.subVectors(Ut,Dt);let t=[0,-Nt.z,Nt.y,0,-Ot.z,Ot.y,0,-Bt.z,Bt.y,Nt.z,0,-Nt.x,Ot.z,0,-Ot.x,Bt.z,0,-Bt.x,-Nt.y,Nt.x,0,-Ot.y,Ot.x,0,-Bt.y,Bt.x,0];return!!satForAxes(t,Ut,It,Dt,Vt)&&(t=[1,0,0,0,1,0,0,0,1],!!satForAxes(t,Ut,It,Dt,Vt)&&(zt.crossVectors(Nt,Ot),t=[zt.x,zt.y,zt.z],satForAxes(t,Ut,It,Dt,Vt)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Lt).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(Lt).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(Ct[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ct[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ct[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ct[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ct[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ct[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ct[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ct[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ct)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Ct=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3],Lt=new Vector3,Pt=new Box3,Ut=new Vector3,It=new Vector3,Dt=new Vector3,Nt=new Vector3,Ot=new Vector3,Bt=new Vector3,Ft=new Vector3,Vt=new Vector3,zt=new Vector3,Gt=new Vector3;function satForAxes(e,t,n,i,r){for(let a=0,s=e.length-3;a<=s;a+=3){Gt.fromArray(e,a);const s=r.x*Math.abs(Gt.x)+r.y*Math.abs(Gt.y)+r.z*Math.abs(Gt.z),o=t.dot(Gt),l=n.dot(Gt),c=i.dot(Gt);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>s)return!1}return!0}const Ht=new Box3,kt=new Vector3,Wt=new Vector3;class Sphere{constructor(e=new Vector3,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Ht.setFromPoints(e).getCenter(n);let i=0;for(let t=0,r=e.length;t<r;t++)i=Math.max(i,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;kt.subVectors(e,this.center);const t=kt.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(kt,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(Wt.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(kt.copy(e.center).add(Wt)),this.expandByPoint(kt.copy(e.center).sub(Wt))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Xt=new Vector3,jt=new Vector3,qt=new Vector3,Yt=new Vector3,Kt=new Vector3,Zt=new Vector3,Jt=new Vector3;class Ray{constructor(e=new Vector3,t=new Vector3(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Xt)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Xt.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Xt.copy(this.origin).addScaledVector(this.direction,t),Xt.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){jt.copy(e).add(t).multiplyScalar(.5),qt.copy(t).sub(e).normalize(),Yt.copy(this.origin).sub(jt);const r=.5*e.distanceTo(t),a=-this.direction.dot(qt),s=Yt.dot(this.direction),o=-Yt.dot(qt),l=Yt.lengthSq(),c=Math.abs(1-a*a);let h,u,d,p;if(c>0)if(h=a*o-s,u=a*s-o,p=r*c,h>=0)if(u>=-p)if(u<=p){const e=1/c;h*=e,u*=e,d=h*(h+a*u+2*s)+u*(a*h+u+2*o)+l}else u=r,h=Math.max(0,-(a*u+s)),d=-h*h+u*(u+2*o)+l;else u=-r,h=Math.max(0,-(a*u+s)),d=-h*h+u*(u+2*o)+l;else u<=-p?(h=Math.max(0,-(-a*r+s)),u=h>0?-r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l):u<=p?(h=0,u=Math.min(Math.max(-r,-o),r),d=u*(u+2*o)+l):(h=Math.max(0,-(a*r+s)),u=h>0?r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l);else u=a>0?-r:r,h=Math.max(0,-(a*u+s)),d=-h*h+u*(u+2*o)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(jt).addScaledVector(qt,u),d}intersectSphere(e,t){Xt.subVectors(e.center,this.origin);const n=Xt.dot(this.direction),i=Xt.dot(Xt)-n*n,r=e.radius*e.radius;if(i>r)return null;const a=Math.sqrt(r-i),s=n-a,o=n+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,a,s,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(e.min.x-u.x)*l,i=(e.max.x-u.x)*l):(n=(e.max.x-u.x)*l,i=(e.min.x-u.x)*l),c>=0?(r=(e.min.y-u.y)*c,a=(e.max.y-u.y)*c):(r=(e.max.y-u.y)*c,a=(e.min.y-u.y)*c),n>a||r>i?null:((r>n||isNaN(n))&&(n=r),(a<i||isNaN(i))&&(i=a),h>=0?(s=(e.min.z-u.z)*h,o=(e.max.z-u.z)*h):(s=(e.max.z-u.z)*h,o=(e.min.z-u.z)*h),n>o||s>i?null:((s>n||n!=n)&&(n=s),(o<i||i!=i)&&(i=o),i<0?null:this.at(n>=0?n:i,t)))}intersectsBox(e){return null!==this.intersectBox(e,Xt)}intersectTriangle(e,t,n,i,r){Kt.subVectors(t,e),Zt.subVectors(n,e),Jt.crossVectors(Kt,Zt);let a,s=this.direction.dot(Jt);if(s>0){if(i)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}Yt.subVectors(this.origin,e);const o=a*this.direction.dot(Zt.crossVectors(Yt,Zt));if(o<0)return null;const l=a*this.direction.dot(Kt.cross(Yt));if(l<0)return null;if(o+l>s)return null;const c=-a*Yt.dot(Jt);return c<0?null:this.at(c/s,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Matrix4{constructor(e,t,n,i,r,a,s,o,l,c,h,u,d,p,f,m){Matrix4.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,i,r,a,s,o,l,c,h,u,d,p,f,m)}set(e,t,n,i,r,a,s,o,l,c,h,u,d,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=i,g[1]=r,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Matrix4).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/Qt.setFromMatrixColumn(e,0).length(),r=1/Qt.setFromMatrixColumn(e,1).length(),a=1/Qt.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,r=e.z,a=Math.cos(n),s=Math.sin(n),o=Math.cos(i),l=Math.sin(i),c=Math.cos(r),h=Math.sin(r);if("XYZ"===e.order){const e=a*c,n=a*h,i=s*c,r=s*h;t[0]=o*c,t[4]=-o*h,t[8]=l,t[1]=n+i*l,t[5]=e-r*l,t[9]=-s*o,t[2]=r-e*l,t[6]=i+n*l,t[10]=a*o}else if("YXZ"===e.order){const e=o*c,n=o*h,i=l*c,r=l*h;t[0]=e+r*s,t[4]=i*s-n,t[8]=a*l,t[1]=a*h,t[5]=a*c,t[9]=-s,t[2]=n*s-i,t[6]=r+e*s,t[10]=a*o}else if("ZXY"===e.order){const e=o*c,n=o*h,i=l*c,r=l*h;t[0]=e-r*s,t[4]=-a*h,t[8]=i+n*s,t[1]=n+i*s,t[5]=a*c,t[9]=r-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){const e=a*c,n=a*h,i=s*c,r=s*h;t[0]=o*c,t[4]=i*l-n,t[8]=e*l+r,t[1]=o*h,t[5]=r*l+e,t[9]=n*l-i,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){const e=a*o,n=a*l,i=s*o,r=s*l;t[0]=o*c,t[4]=r-e*h,t[8]=i*h+n,t[1]=h,t[5]=a*c,t[9]=-s*c,t[2]=-l*c,t[6]=n*h+i,t[10]=e-r*h}else if("XZY"===e.order){const e=a*o,n=a*l,i=s*o,r=s*l;t[0]=o*c,t[4]=-h,t[8]=l*c,t[1]=e*h+r,t[5]=a*c,t[9]=n*h-i,t[2]=i*h-n,t[6]=s*c,t[10]=r*h+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(en,e,tn)}lookAt(e,t,n){const i=this.elements;return an.subVectors(e,t),0===an.lengthSq()&&(an.z=1),an.normalize(),nn.crossVectors(n,an),0===nn.lengthSq()&&(1===Math.abs(n.z)?an.x+=1e-4:an.z+=1e-4,an.normalize(),nn.crossVectors(n,an)),nn.normalize(),rn.crossVectors(an,nn),i[0]=nn.x,i[4]=rn.x,i[8]=an.x,i[1]=nn.y,i[5]=rn.y,i[9]=an.y,i[2]=nn.z,i[6]=rn.z,i[10]=an.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,a=n[0],s=n[4],o=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],_=n[3],v=n[7],x=n[11],y=n[15],M=i[0],S=i[4],T=i[8],b=i[12],E=i[1],A=i[5],w=i[9],R=i[13],C=i[2],L=i[6],P=i[10],U=i[14],I=i[3],D=i[7],N=i[11],O=i[15];return r[0]=a*M+s*E+o*C+l*I,r[4]=a*S+s*A+o*L+l*D,r[8]=a*T+s*w+o*P+l*N,r[12]=a*b+s*R+o*U+l*O,r[1]=c*M+h*E+u*C+d*I,r[5]=c*S+h*A+u*L+d*D,r[9]=c*T+h*w+u*P+d*N,r[13]=c*b+h*R+u*U+d*O,r[2]=p*M+f*E+m*C+g*I,r[6]=p*S+f*A+m*L+g*D,r[10]=p*T+f*w+m*P+g*N,r[14]=p*b+f*R+m*U+g*O,r[3]=_*M+v*E+x*C+y*I,r[7]=_*S+v*A+x*L+y*D,r[11]=_*T+v*w+x*P+y*N,r[15]=_*b+v*R+x*U+y*O,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],a=e[1],s=e[5],o=e[9],l=e[13],c=e[2],h=e[6],u=e[10],d=e[14];return e[3]*(+r*o*h-i*l*h-r*s*u+n*l*u+i*s*d-n*o*d)+e[7]*(+t*o*d-t*l*u+r*a*u-i*a*d+i*l*c-r*o*c)+e[11]*(+t*l*h-t*s*d-r*a*h+n*a*d+r*s*c-n*l*c)+e[15]*(-i*s*c-t*o*h+t*s*u+i*a*h-n*a*u+n*o*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],s=e[5],o=e[6],l=e[7],c=e[8],h=e[9],u=e[10],d=e[11],p=e[12],f=e[13],m=e[14],g=e[15],_=h*m*l-f*u*l+f*o*d-s*m*d-h*o*g+s*u*g,v=p*u*l-c*m*l-p*o*d+a*m*d+c*o*g-a*u*g,x=c*f*l-p*h*l+p*s*d-a*f*d-c*s*g+a*h*g,y=p*h*o-c*f*o-p*s*u+a*f*u+c*s*m-a*h*m,M=t*_+n*v+i*x+r*y;if(0===M)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const S=1/M;return e[0]=_*S,e[1]=(f*u*r-h*m*r-f*i*d+n*m*d+h*i*g-n*u*g)*S,e[2]=(s*m*r-f*o*r+f*i*l-n*m*l-s*i*g+n*o*g)*S,e[3]=(h*o*r-s*u*r-h*i*l+n*u*l+s*i*d-n*o*d)*S,e[4]=v*S,e[5]=(c*m*r-p*u*r+p*i*d-t*m*d-c*i*g+t*u*g)*S,e[6]=(p*o*r-a*m*r-p*i*l+t*m*l+a*i*g-t*o*g)*S,e[7]=(a*u*r-c*o*r+c*i*l-t*u*l-a*i*d+t*o*d)*S,e[8]=x*S,e[9]=(p*h*r-c*f*r-p*n*d+t*f*d+c*n*g-t*h*g)*S,e[10]=(a*f*r-p*s*r+p*n*l-t*f*l-a*n*g+t*s*g)*S,e[11]=(c*s*r-a*h*r-c*n*l+t*h*l+a*n*d-t*s*d)*S,e[12]=y*S,e[13]=(c*f*i-p*h*i+p*n*u-t*f*u-c*n*m+t*h*m)*S,e[14]=(p*s*i-a*f*i-p*n*o+t*f*o+a*n*m-t*s*m)*S,e[15]=(a*h*i-c*s*i+c*n*o-t*h*o-a*n*u+t*s*u)*S,this}scale(e){const t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),r=1-n,a=e.x,s=e.y,o=e.z,l=r*a,c=r*s;return this.set(l*a+n,l*s-i*o,l*o+i*s,0,l*s+i*o,c*s+n,c*o-i*a,0,l*o-i*s,c*o+i*a,r*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,a){return this.set(1,n,r,0,e,1,a,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,r=t._x,a=t._y,s=t._z,o=t._w,l=r+r,c=a+a,h=s+s,u=r*l,d=r*c,p=r*h,f=a*c,m=a*h,g=s*h,_=o*l,v=o*c,x=o*h,y=n.x,M=n.y,S=n.z;return i[0]=(1-(f+g))*y,i[1]=(d+x)*y,i[2]=(p-v)*y,i[3]=0,i[4]=(d-x)*M,i[5]=(1-(u+g))*M,i[6]=(m+_)*M,i[7]=0,i[8]=(p+v)*S,i[9]=(m-_)*S,i[10]=(1-(u+f))*S,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let r=Qt.set(i[0],i[1],i[2]).length();const a=Qt.set(i[4],i[5],i[6]).length(),s=Qt.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],$t.copy(this);const o=1/r,l=1/a,c=1/s;return $t.elements[0]*=o,$t.elements[1]*=o,$t.elements[2]*=o,$t.elements[4]*=l,$t.elements[5]*=l,$t.elements[6]*=l,$t.elements[8]*=c,$t.elements[9]*=c,$t.elements[10]*=c,t.setFromRotationMatrix($t),n.x=r,n.y=a,n.z=s,this}makePerspective(e,t,n,i,r,a,s=2e3){const o=this.elements,l=2*r/(t-e),c=2*r/(n-i),h=(t+e)/(t-e),u=(n+i)/(n-i);let d,p;if(s===ht)d=-(a+r)/(a-r),p=-2*a*r/(a-r);else{if(s!==ut)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);d=-a/(a-r),p=-a*r/(a-r)}return o[0]=l,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=c,o[9]=u,o[13]=0,o[2]=0,o[6]=0,o[10]=d,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(e,t,n,i,r,a,s=2e3){const o=this.elements,l=1/(t-e),c=1/(n-i),h=1/(a-r),u=(t+e)*l,d=(n+i)*c;let p,f;if(s===ht)p=(a+r)*h,f=-2*h;else{if(s!==ut)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);p=r*h,f=-1*h}return o[0]=2*l,o[4]=0,o[8]=0,o[12]=-u,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-d,o[2]=0,o[6]=0,o[10]=f,o[14]=-p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;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],e}}const Qt=new Vector3,$t=new Matrix4,en=new Vector3(0,0,0),tn=new Vector3(1,1,1),nn=new Vector3,rn=new Vector3,an=new Vector3,sn=new Matrix4,on=new Quaternion;class Euler{constructor(e=0,t=0,n=0,i=Euler.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,a=r[0],s=r[4],o=r[8],l=r[1],c=r[5],h=r[9],u=r[2],d=r[6],p=r[10];switch(t){case"XYZ":this._y=Math.asin(clamp(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,p),this._z=Math.atan2(-s,a)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-clamp(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,a),this._z=0);break;case"ZXY":this._x=Math.asin(clamp(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,p),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,a));break;case"ZYX":this._y=Math.asin(-clamp(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,p),this._z=Math.atan2(l,a)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(clamp(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-u,a)):(this._x=0,this._y=Math.atan2(o,p));break;case"XZY":this._z=Math.asin(-clamp(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,a)):(this._x=Math.atan2(-h,p),this._y=0);break;default:i.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return sn.makeRotationFromQuaternion(e),this.setFromRotationMatrix(sn,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return on.setFromEuler(this),this.setFromQuaternion(on,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Euler.DEFAULT_ORDER="XYZ";class Layers{constructor(){this.mask=1}set(e){this.mask=1<<e>>>0}enable(e){this.mask|=1<<e}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e}disable(e){this.mask&=~(1<<e)}disableAll(){this.mask=0}test(e){return!!(this.mask&e.mask)}isEnabled(e){return!!(this.mask&1<<e)}}let ln=0;const cn=new Vector3,hn=new Quaternion,un=new Matrix4,dn=new Vector3,pn=new Vector3,fn=new Vector3,mn=new Quaternion,gn=new Vector3(1,0,0),_n=new Vector3(0,1,0),vn=new Vector3(0,0,1),xn={type:"added"},yn={type:"removed"};class Object3D extends EventDispatcher{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:ln++}),this.uuid=generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Object3D.DEFAULT_UP.clone();const e=new Vector3,t=new Euler,n=new Quaternion,i=new Vector3(1,1,1);t._onChange((function onRotationChange(){n.setFromEuler(t,!1)})),n._onChange((function onQuaternionChange(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Matrix4},normalMatrix:{value:new Matrix3}}),this.matrix=new Matrix4,this.matrixWorld=new Matrix4,this.matrixAutoUpdate=Object3D.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Layers,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return hn.setFromAxisAngle(e,t),this.quaternion.multiply(hn),this}rotateOnWorldAxis(e,t){return hn.setFromAxisAngle(e,t),this.quaternion.premultiply(hn),this}rotateX(e){return this.rotateOnAxis(gn,e)}rotateY(e){return this.rotateOnAxis(_n,e)}rotateZ(e){return this.rotateOnAxis(vn,e)}translateOnAxis(e,t){return cn.copy(e).applyQuaternion(this.quaternion),this.position.add(cn.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(gn,e)}translateY(e){return this.translateOnAxis(_n,e)}translateZ(e){return this.translateOnAxis(vn,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(un.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?dn.copy(e):dn.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),pn.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?un.lookAt(pn,dn,this.up):un.lookAt(dn,pn,this.up),this.quaternion.setFromRotationMatrix(un),i&&(un.extractRotation(i.matrixWorld),hn.setFromRotationMatrix(un),this.quaternion.premultiply(hn.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(i.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(xn)):i.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(yn)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),un.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),un.multiply(e.parent.matrixWorld)),e.applyMatrix4(un),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const i=this.children;for(let r=0,a=i.length;r<a;r++)i[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(pn,e,fn),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(pn,mn,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++){const i=t[n];!0!==i.matrixWorldAutoUpdate&&!0!==e||i.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++){const n=e[t];!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const i={};function serialize(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map((e=>({boxInitialized:e.boxInitialized,boxMin:e.box.min.toArray(),boxMax:e.box.max.toArray(),sphereInitialized:e.sphereInitialized,sphereRadius:e.sphere.radius,sphereCenter:e.sphere.center.toArray()}))),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),null!==this.boundingSphere&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),null!==this.boundingBox&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=serialize(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,i=n.length;t<i;t++){const i=n[t];serialize(e.shapes,i)}else serialize(e.shapes,n)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(serialize(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,i=this.material.length;n<i;n++)t.push(serialize(e.materials,this.material[n]));i.material=t}else i.material=serialize(e.materials,this.material);if(this.children.length>0){i.children=[];for(let t=0;t<this.children.length;t++)i.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];i.animations.push(serialize(e.animations,n))}}if(t){const t=extractFromCache(e.geometries),i=extractFromCache(e.materials),r=extractFromCache(e.textures),a=extractFromCache(e.images),s=extractFromCache(e.shapes),o=extractFromCache(e.skeletons),l=extractFromCache(e.animations),c=extractFromCache(e.nodes);t.length>0&&(n.geometries=t),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),a.length>0&&(n.images=a),s.length>0&&(n.shapes=s),o.length>0&&(n.skeletons=o),l.length>0&&(n.animations=l),c.length>0&&(n.nodes=c)}return n.object=i,n;function extractFromCache(e){const t=[];for(const n in e){const i=e[n];delete i.metadata,t.push(i)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}Object3D.DEFAULT_UP=new Vector3(0,1,0),Object3D.DEFAULT_MATRIX_AUTO_UPDATE=!0,Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Mn=new Vector3,Sn=new Vector3,Tn=new Vector3,bn=new Vector3,En=new Vector3,An=new Vector3,wn=new Vector3,Rn=new Vector3,Cn=new Vector3,Ln=new Vector3;let Pn=!1;class Triangle{constructor(e=new Vector3,t=new Vector3,n=new Vector3){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),Mn.subVectors(e,t),i.cross(Mn);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){Mn.subVectors(i,t),Sn.subVectors(n,t),Tn.subVectors(e,t);const a=Mn.dot(Mn),s=Mn.dot(Sn),o=Mn.dot(Tn),l=Sn.dot(Sn),c=Sn.dot(Tn),h=a*l-s*s;if(0===h)return r.set(0,0,0),null;const u=1/h,d=(l*o-s*c)*u,p=(a*c-s*o)*u;return r.set(1-d-p,p,d)}static containsPoint(e,t,n,i){return null!==this.getBarycoord(e,t,n,i,bn)&&(bn.x>=0&&bn.y>=0&&bn.x+bn.y<=1)}static getUV(e,t,n,r,a,s,o,l){return!1===Pn&&(i.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Pn=!0),this.getInterpolation(e,t,n,r,a,s,o,l)}static getInterpolation(e,t,n,i,r,a,s,o){return null===this.getBarycoord(e,t,n,i,bn)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(r,bn.x),o.addScaledVector(a,bn.y),o.addScaledVector(s,bn.z),o)}static isFrontFacing(e,t,n,i){return Mn.subVectors(n,t),Sn.subVectors(e,t),Mn.cross(Sn).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Mn.subVectors(this.c,this.b),Sn.subVectors(this.a,this.b),.5*Mn.cross(Sn).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Triangle.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Triangle.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,a){return!1===Pn&&(i.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Pn=!0),Triangle.getInterpolation(e,this.a,this.b,this.c,t,n,r,a)}getInterpolation(e,t,n,i,r){return Triangle.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return Triangle.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Triangle.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,r=this.c;let a,s;En.subVectors(i,n),An.subVectors(r,n),Rn.subVectors(e,n);const o=En.dot(Rn),l=An.dot(Rn);if(o<=0&&l<=0)return t.copy(n);Cn.subVectors(e,i);const c=En.dot(Cn),h=An.dot(Cn);if(c>=0&&h<=c)return t.copy(i);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return a=o/(o-c),t.copy(n).addScaledVector(En,a);Ln.subVectors(e,r);const d=En.dot(Ln),p=An.dot(Ln);if(p>=0&&d<=p)return t.copy(r);const f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),t.copy(n).addScaledVector(An,s);const m=c*p-d*h;if(m<=0&&h-c>=0&&d-p>=0)return wn.subVectors(r,i),s=(h-c)/(h-c+(d-p)),t.copy(i).addScaledVector(wn,s);const g=1/(m+f+u);return a=f*g,s=u*g,t.copy(n).addScaledVector(En,a).addScaledVector(An,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const Un={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},In={h:0,s:0,l:0},Dn={h:0,s:0,l:0};function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class Color{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=We){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Tt.toWorkingColorSpace(this,t),this}setRGB(e,t,n,i=Tt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Tt.toWorkingColorSpace(this,i),this}setHSL(e,t,n,i=Tt.workingColorSpace){if(e=euclideanModulo(e,1),t=clamp(t,0,1),n=clamp(n,0,1),0===t)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+t):n+t-n*t,r=2*n-i;this.r=hue2rgb(r,i,e+1/3),this.g=hue2rgb(r,i,e),this.b=hue2rgb(r,i,e-1/3)}return Tt.toWorkingColorSpace(this,i),this}setStyle(e,t=We){function handleAlpha(t){void 0!==t&&parseFloat(t)<1&&i.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const a=n[1],s=n[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return handleAlpha(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return handleAlpha(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return handleAlpha(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:i.warn("THREE.Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=n[1],a=r.length;if(3===a)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(6===a)return this.setHex(parseInt(r,16),t);i.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=We){const n=Un[e.toLowerCase()];return void 0!==n?this.setHex(n,t):i.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=SRGBToLinear(e.r),this.g=SRGBToLinear(e.g),this.b=SRGBToLinear(e.b),this}copyLinearToSRGB(e){return this.r=LinearToSRGB(e.r),this.g=LinearToSRGB(e.g),this.b=LinearToSRGB(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=We){return Tt.fromWorkingColorSpace(Nn.copy(this),e),65536*Math.round(clamp(255*Nn.r,0,255))+256*Math.round(clamp(255*Nn.g,0,255))+Math.round(clamp(255*Nn.b,0,255))}getHexString(e=We){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Tt.workingColorSpace){Tt.fromWorkingColorSpace(Nn.copy(this),t);const n=Nn.r,i=Nn.g,r=Nn.b,a=Math.max(n,i,r),s=Math.min(n,i,r);let o,l;const c=(s+a)/2;if(s===a)o=0,l=0;else{const e=a-s;switch(l=c<=.5?e/(a+s):e/(2-a-s),a){case n:o=(i-r)/e+(i<r?6:0);break;case i:o=(r-n)/e+2;break;case r:o=(n-i)/e+4}o/=6}return e.h=o,e.s=l,e.l=c,e}getRGB(e,t=Tt.workingColorSpace){return Tt.fromWorkingColorSpace(Nn.copy(this),t),e.r=Nn.r,e.g=Nn.g,e.b=Nn.b,e}getStyle(e=We){Tt.fromWorkingColorSpace(Nn.copy(this),e);const t=Nn.r,n=Nn.g,i=Nn.b;return e!==We?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*n)},${Math.round(255*i)})`}offsetHSL(e,t,n){return this.getHSL(In),this.setHSL(In.h+e,In.s+t,In.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(In),e.getHSL(Dn);const n=lerp(In.h,Dn.h,t),i=lerp(In.s,Dn.s,t),r=lerp(In.l,Dn.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Nn=new Color;Color.NAMES=Un;let On=0;class Material extends EventDispatcher{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:On++}),this.uuid=generateUUID(),this.name="",this.type="Material",this.blending=1,this.side=l,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=d,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Color(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Qe,this.stencilZFail=Qe,this.stencilZPass=Qe,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){i.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:i.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function extractFromCache(e){const t=[];for(const n in e){const i=e[n];delete i.metadata,t.push(i)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),this.side!==l&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),204!==this.blendSrc&&(n.blendSrc=this.blendSrc),205!==this.blendDst&&(n.blendDst=this.blendDst),this.blendEquation!==d&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Qe&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Qe&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Qe&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=extractFromCache(e.textures),i=extractFromCache(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let i=0;i!==e;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}class MeshBasicMaterial extends Material{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Color(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=L,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Bn=_generateTables();function _generateTables(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),i=new Uint32Array(512),r=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(i[e]=0,i[256|e]=32768,r[e]=24,r[256|e]=24):t<-14?(i[e]=1024>>-t-14,i[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(i[e]=t+15<<10,i[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(i[e]=31744,i[256|e]=64512,r[e]=24,r[256|e]=24):(i[e]=31744,i[256|e]=64512,r[e]=13,r[256|e]=13)}const a=new Uint32Array(2048),s=new Uint32Array(64),o=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;!(8388608&t);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,a[e]=t|n}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=1199570944,s[32]=2147483648;for(let e=33;e<63;++e)s[e]=2147483648+(e-32<<23);s[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(o[e]=1024);return{floatView:t,uint32View:n,baseTable:i,shiftTable:r,mantissaTable:a,exponentTable:s,offsetTable:o}}function toHalfFloat(e){Math.abs(e)>65504&&i.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=clamp(e,-65504,65504),Bn.floatView[0]=e;const t=Bn.uint32View[0],n=t>>23&511;return Bn.baseTable[n]+((8388607&t)>>Bn.shiftTable[n])}function fromHalfFloat(e){const t=e>>10;return Bn.uint32View[0]=Bn.mantissaTable[Bn.offsetTable[t]+(1023&e)]+Bn.exponentTable[t],Bn.floatView[0]}const Fn={toHalfFloat,fromHalfFloat},Vn=new Vector3,zn=new Vector2;class BufferAttribute{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=ot,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=ce,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return i.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.applyMatrix3(e),this.setXY(t,zn.x,zn.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)Vn.fromBufferAttribute(this,t),Vn.applyMatrix3(e),this.setXYZ(t,Vn.x,Vn.y,Vn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Vn.fromBufferAttribute(this,t),Vn.applyMatrix4(e),this.setXYZ(t,Vn.x,Vn.y,Vn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Vn.fromBufferAttribute(this,t),Vn.applyNormalMatrix(e),this.setXYZ(t,Vn.x,Vn.y,Vn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Vn.fromBufferAttribute(this,t),Vn.transformDirection(e),this.setXYZ(t,Vn.x,Vn.y,Vn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=denormalize(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=normalize(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=denormalize(t,this.array)),t}setX(e,t){return this.normalized&&(t=normalize(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=denormalize(t,this.array)),t}setY(e,t){return this.normalized&&(t=normalize(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=denormalize(t,this.array)),t}setZ(e,t){return this.normalized&&(t=normalize(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=denormalize(t,this.array)),t}setW(e,t){return this.normalized&&(t=normalize(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=normalize(t,this.array),n=normalize(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=normalize(t,this.array),n=normalize(n,this.array),i=normalize(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=normalize(t,this.array),n=normalize(n,this.array),i=normalize(i,this.array),r=normalize(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==ot&&(e.usage=this.usage),e}}class Uint16BufferAttribute extends BufferAttribute{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Uint32BufferAttribute extends BufferAttribute{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Float32BufferAttribute extends BufferAttribute{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Gn=0;const Hn=new Matrix4,kn=new Object3D,Wn=new Vector3,Xn=new Box3,jn=new Box3,qn=new Vector3;class BufferGeometry extends EventDispatcher{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Gn++}),this.uuid=generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(arrayNeedsUint32(e)?Uint32BufferAttribute:Uint16BufferAttribute)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Matrix3).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return Hn.makeRotationFromQuaternion(e),this.applyMatrix4(Hn),this}rotateX(e){return Hn.makeRotationX(e),this.applyMatrix4(Hn),this}rotateY(e){return Hn.makeRotationY(e),this.applyMatrix4(Hn),this}rotateZ(e){return Hn.makeRotationZ(e),this.applyMatrix4(Hn),this}translate(e,t,n){return Hn.makeTranslation(e,t,n),this.applyMatrix4(Hn),this}scale(e,t,n){return Hn.makeScale(e,t,n),this.applyMatrix4(Hn),this}lookAt(e){return kn.lookAt(e),kn.updateMatrix(),this.applyMatrix4(kn.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Wn).negate(),this.translate(Wn.x,Wn.y,Wn.z),this}setFromPoints(e){const t=[];for(let n=0,i=e.length;n<i;n++){const i=e[n];t.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new Float32BufferAttribute(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Box3);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return i.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new Vector3(-1/0,-1/0,-1/0),new Vector3(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Xn.setFromBufferAttribute(n),this.morphTargetsRelative?(qn.addVectors(this.boundingBox.min,Xn.min),this.boundingBox.expandByPoint(qn),qn.addVectors(this.boundingBox.max,Xn.max),this.boundingBox.expandByPoint(qn)):(this.boundingBox.expandByPoint(Xn.min),this.boundingBox.expandByPoint(Xn.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&i.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Sphere);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return i.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new Vector3,1/0);if(e){const n=this.boundingSphere.center;if(Xn.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];jn.setFromBufferAttribute(n),this.morphTargetsRelative?(qn.addVectors(Xn.min,jn.min),Xn.expandByPoint(qn),qn.addVectors(Xn.max,jn.max),Xn.expandByPoint(qn)):(Xn.expandByPoint(jn.min),Xn.expandByPoint(jn.max))}Xn.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)qn.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(qn));if(t)for(let i=0,a=t.length;i<a;i++){const a=t[i],s=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)qn.fromBufferAttribute(a,t),s&&(Wn.fromBufferAttribute(e,t),qn.add(Wn)),r=Math.max(r,n.distanceToSquared(qn))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&i.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void i.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,a=t.normal.array,s=t.uv.array,o=r.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new BufferAttribute(new Float32Array(4*o),4));const l=this.getAttribute("tangent").array,c=[],h=[];for(let e=0;e<o;e++)c[e]=new Vector3,h[e]=new Vector3;const u=new Vector3,d=new Vector3,p=new Vector3,f=new Vector2,m=new Vector2,g=new Vector2,_=new Vector3,v=new Vector3;function handleTriangle(e,t,n){u.fromArray(r,3*e),d.fromArray(r,3*t),p.fromArray(r,3*n),f.fromArray(s,2*e),m.fromArray(s,2*t),g.fromArray(s,2*n),d.sub(u),p.sub(u),m.sub(f),g.sub(f);const i=1/(m.x*g.y-g.x*m.y);isFinite(i)&&(_.copy(d).multiplyScalar(g.y).addScaledVector(p,-m.y).multiplyScalar(i),v.copy(p).multiplyScalar(m.x).addScaledVector(d,-g.x).multiplyScalar(i),c[e].add(_),c[t].add(_),c[n].add(_),h[e].add(v),h[t].add(v),h[n].add(v))}let x=this.groups;0===x.length&&(x=[{start:0,count:n.length}]);for(let e=0,t=x.length;e<t;++e){const t=x[e],i=t.start;for(let e=i,r=i+t.count;e<r;e+=3)handleTriangle(n[e+0],n[e+1],n[e+2])}const y=new Vector3,M=new Vector3,S=new Vector3,T=new Vector3;function handleVertex(e){S.fromArray(a,3*e),T.copy(S);const t=c[e];y.copy(t),y.sub(S.multiplyScalar(S.dot(t))).normalize(),M.crossVectors(T,t);const n=M.dot(h[e])<0?-1:1;l[4*e]=y.x,l[4*e+1]=y.y,l[4*e+2]=y.z,l[4*e+3]=n}for(let e=0,t=x.length;e<t;++e){const t=x[e],i=t.start;for(let e=i,r=i+t.count;e<r;e+=3)handleVertex(n[e+0]),handleVertex(n[e+1]),handleVertex(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new BufferAttribute(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const i=new Vector3,r=new Vector3,a=new Vector3,s=new Vector3,o=new Vector3,l=new Vector3,c=new Vector3,h=new Vector3;if(e)for(let u=0,d=e.count;u<d;u+=3){const d=e.getX(u+0),p=e.getX(u+1),f=e.getX(u+2);i.fromBufferAttribute(t,d),r.fromBufferAttribute(t,p),a.fromBufferAttribute(t,f),c.subVectors(a,r),h.subVectors(i,r),c.cross(h),s.fromBufferAttribute(n,d),o.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(c),o.add(c),l.add(c),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(p,o.x,o.y,o.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let e=0,s=t.count;e<s;e+=3)i.fromBufferAttribute(t,e+0),r.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),c.subVectors(a,r),h.subVectors(i,r),c.cross(h),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)qn.fromBufferAttribute(e,t),qn.normalize(),e.setXYZ(t,qn.x,qn.y,qn.z)}toNonIndexed(){function convertBufferAttribute(e,t){const n=e.array,i=e.itemSize,r=e.normalized,a=new n.constructor(t.length*i);let s=0,o=0;for(let r=0,l=t.length;r<l;r++){s=e.isInterleavedBufferAttribute?t[r]*e.data.stride+e.offset:t[r]*i;for(let e=0;e<i;e++)a[o++]=n[s++]}return new BufferAttribute(a,i,r)}if(null===this.index)return i.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new BufferGeometry,t=this.index.array,n=this.attributes;for(const i in n){const r=convertBufferAttribute(n[i],t);e.setAttribute(i,r)}const r=this.morphAttributes;for(const n in r){const i=[],a=r[n];for(let e=0,n=a.length;e<n;e++){const n=convertBufferAttribute(a[e],t);i.push(n)}e.morphAttributes[n]=i}e.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let t=0,n=a.length;t<n;t++){const n=a[t];e.addGroup(n.start,n.count,n.materialIndex)}return e}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const i=n[t];e.data.attributes[t]=i.toJSON(e.data)}const i={};let r=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],a=[];for(let t=0,i=n.length;t<i;t++){const i=n[t];a.push(i.toJSON(e.data))}a.length>0&&(i[t]=a,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const s=this.boundingSphere;return null!==s&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const i=e.attributes;for(const e in i){const n=i[e];this.setAttribute(e,n.clone(t))}const r=e.morphAttributes;for(const e in r){const n=[],i=r[e];for(let e=0,r=i.length;e<r;e++)n.push(i[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let e=0,t=a.length;e<t;e++){const t=a[e];this.addGroup(t.start,t.count,t.materialIndex)}const s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());const o=e.boundingSphere;return null!==o&&(this.boundingSphere=o.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Yn=new Matrix4,Kn=new Ray,Zn=new Sphere,Jn=new Vector3,Qn=new Vector3,$n=new Vector3,ei=new Vector3,ti=new Vector3,ni=new Vector3,ii=new Vector2,ri=new Vector2,ai=new Vector2,si=new Vector3,oi=new Vector3,li=new Vector3,ci=new Vector3,hi=new Vector3;class Mesh extends Object3D{constructor(e=new BufferGeometry,t=new MeshBasicMaterial){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){const n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(i,e);const s=this.morphTargetInfluences;if(r&&s){ni.set(0,0,0);for(let n=0,i=r.length;n<i;n++){const i=s[n],o=r[n];0!==i&&(ti.fromBufferAttribute(o,e),a?ni.addScaledVector(ti,i):ni.addScaledVector(ti.sub(t),i))}t.add(ni)}return t}raycast(e,t){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0!==i){if(null===n.boundingSphere&&n.computeBoundingSphere(),Zn.copy(n.boundingSphere),Zn.applyMatrix4(r),Kn.copy(e.ray).recast(e.near),!1===Zn.containsPoint(Kn.origin)){if(null===Kn.intersectSphere(Zn,Jn))return;if(Kn.origin.distanceToSquared(Jn)>(e.far-e.near)**2)return}Yn.copy(r).invert(),Kn.copy(e.ray).applyMatrix4(Yn),null!==n.boundingBox&&!1===Kn.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,Kn)}}_computeIntersections(e,t,n){let i;const r=this.geometry,a=this.material,s=r.index,o=r.attributes.position,l=r.attributes.uv,c=r.attributes.uv1,h=r.attributes.normal,u=r.groups,d=r.drawRange;if(null!==s)if(Array.isArray(a))for(let r=0,o=u.length;r<o;r++){const o=u[r],p=a[o.materialIndex];for(let r=Math.max(o.start,d.start),a=Math.min(s.count,Math.min(o.start+o.count,d.start+d.count));r<a;r+=3){i=checkGeometryIntersection(this,p,e,n,l,c,h,s.getX(r),s.getX(r+1),s.getX(r+2)),i&&(i.faceIndex=Math.floor(r/3),i.face.materialIndex=o.materialIndex,t.push(i))}}else{for(let r=Math.max(0,d.start),o=Math.min(s.count,d.start+d.count);r<o;r+=3){i=checkGeometryIntersection(this,a,e,n,l,c,h,s.getX(r),s.getX(r+1),s.getX(r+2)),i&&(i.faceIndex=Math.floor(r/3),t.push(i))}}else if(void 0!==o)if(Array.isArray(a))for(let r=0,s=u.length;r<s;r++){const s=u[r],p=a[s.materialIndex];for(let r=Math.max(s.start,d.start),a=Math.min(o.count,Math.min(s.start+s.count,d.start+d.count));r<a;r+=3){i=checkGeometryIntersection(this,p,e,n,l,c,h,r,r+1,r+2),i&&(i.faceIndex=Math.floor(r/3),i.face.materialIndex=s.materialIndex,t.push(i))}}else{for(let r=Math.max(0,d.start),s=Math.min(o.count,d.start+d.count);r<s;r+=3){i=checkGeometryIntersection(this,a,e,n,l,c,h,r,r+1,r+2),i&&(i.faceIndex=Math.floor(r/3),t.push(i))}}}}function checkGeometryIntersection(e,t,n,i,r,a,s,o,h,u){e.getVertexPosition(o,Qn),e.getVertexPosition(h,$n),e.getVertexPosition(u,ei);const d=function checkIntersection(e,t,n,i,r,a,s,o){let h;if(h=t.side===c?i.intersectTriangle(s,a,r,!0,o):i.intersectTriangle(r,a,s,t.side===l,o),null===h)return null;hi.copy(o),hi.applyMatrix4(e.matrixWorld);const u=n.ray.origin.distanceTo(hi);return u<n.near||u>n.far?null:{distance:u,point:hi.clone(),object:e}}(e,t,n,i,Qn,$n,ei,ci);if(d){r&&(ii.fromBufferAttribute(r,o),ri.fromBufferAttribute(r,h),ai.fromBufferAttribute(r,u),d.uv=Triangle.getInterpolation(ci,Qn,$n,ei,ii,ri,ai,new Vector2)),a&&(ii.fromBufferAttribute(a,o),ri.fromBufferAttribute(a,h),ai.fromBufferAttribute(a,u),d.uv1=Triangle.getInterpolation(ci,Qn,$n,ei,ii,ri,ai,new Vector2),d.uv2=d.uv1),s&&(si.fromBufferAttribute(s,o),oi.fromBufferAttribute(s,h),li.fromBufferAttribute(s,u),d.normal=Triangle.getInterpolation(ci,Qn,$n,ei,si,oi,li,new Vector3),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));const e={a:o,b:h,c:u,normal:new Vector3,materialIndex:0};Triangle.getNormal(Qn,$n,ei,e.normal),d.face=e}return d}class BoxGeometry extends BufferGeometry{constructor(e=1,t=1,n=1,i=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:a};const s=this;i=Math.floor(i),r=Math.floor(r),a=Math.floor(a);const o=[],l=[],c=[],h=[];let u=0,d=0;function buildPlane(e,t,n,i,r,a,p,f,m,g,_){const v=a/m,x=p/g,y=a/2,M=p/2,S=f/2,T=m+1,b=g+1;let E=0,A=0;const w=new Vector3;for(let a=0;a<b;a++){const s=a*x-M;for(let o=0;o<T;o++){const u=o*v-y;w[e]=u*i,w[t]=s*r,w[n]=S,l.push(w.x,w.y,w.z),w[e]=0,w[t]=0,w[n]=f>0?1:-1,c.push(w.x,w.y,w.z),h.push(o/m),h.push(1-a/g),E+=1}}for(let e=0;e<g;e++)for(let t=0;t<m;t++){const n=u+t+T*e,i=u+t+T*(e+1),r=u+(t+1)+T*(e+1),a=u+(t+1)+T*e;o.push(n,i,a),o.push(i,r,a),A+=6}s.addGroup(d,A,_),d+=A,u+=E}buildPlane("z","y","x",-1,-1,n,t,e,a,r,0),buildPlane("z","y","x",1,-1,n,t,-e,a,r,1),buildPlane("x","z","y",1,1,e,n,t,i,a,2),buildPlane("x","z","y",1,-1,e,n,-t,i,a,3),buildPlane("x","y","z",1,-1,e,t,n,i,r,4),buildPlane("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(o),this.setAttribute("position",new Float32BufferAttribute(l,3)),this.setAttribute("normal",new Float32BufferAttribute(c,3)),this.setAttribute("uv",new Float32BufferAttribute(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new BoxGeometry(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function cloneUniforms(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const a=e[n][r];a&&(a.isColor||a.isMatrix3||a.isMatrix4||a.isVector2||a.isVector3||a.isVector4||a.isTexture||a.isQuaternion)?a.isRenderTargetTexture?(i.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][r]=null):t[n][r]=a.clone():Array.isArray(a)?t[n][r]=a.slice():t[n][r]=a}}return t}function mergeUniforms(e){const t={};for(let n=0;n<e.length;n++){const i=cloneUniforms(e[n]);for(const e in i)t[e]=i[e]}return t}function getUnlitUniformColorSpace(e){return null===e.getRenderTarget()?e.outputColorSpace:Tt.workingColorSpace}const ui={clone:cloneUniforms,merge:mergeUniforms};class ShaderMaterial extends Material{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=cloneUniforms(e.uniforms),this.uniformsGroups=function cloneUniformsGroups(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const i=this.uniforms[n].value;i&&i.isTexture?t.uniforms[n]={type:"t",value:i.toJSON(e).uuid}:i&&i.isColor?t.uniforms[n]={type:"c",value:i.getHex()}:i&&i.isVector2?t.uniforms[n]={type:"v2",value:i.toArray()}:i&&i.isVector3?t.uniforms[n]={type:"v3",value:i.toArray()}:i&&i.isVector4?t.uniforms[n]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?t.uniforms[n]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?t.uniforms[n]={type:"m4",value:i.toArray()}:t.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class Camera extends Object3D{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Matrix4,this.projectionMatrix=new Matrix4,this.projectionMatrixInverse=new Matrix4,this.coordinateSystem=ht}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class PerspectiveCamera extends Camera{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*mt*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*ft*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*mt*Math.atan(Math.tan(.5*ft*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,i,r,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*ft*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,s=a.fullHeight;r+=a.offsetX*i/e,t-=a.offsetY*n/s,i*=a.width/e,n*=a.height/s}const s=this.filmOffset;0!==s&&(r+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const di=-90;class CubeCamera extends Object3D{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new PerspectiveCamera(di,1,e,t);i.layers=this.layers,this.add(i);const r=new PerspectiveCamera(di,1,e,t);r.layers=this.layers,this.add(r);const a=new PerspectiveCamera(di,1,e,t);a.layers=this.layers,this.add(a);const s=new PerspectiveCamera(di,1,e,t);s.layers=this.layers,this.add(s);const o=new PerspectiveCamera(di,1,e,t);o.layers=this.layers,this.add(o);const l=new PerspectiveCamera(di,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,i,r,a,s,o]=t;for(const e of t)this.remove(e);if(e===ht)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else{if(e!==ut)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1)}for(const e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,a,s,o,l,c]=this.children,h=e.getRenderTarget(),u=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(t,r),e.setRenderTarget(n,1,i),e.render(t,a),e.setRenderTarget(n,2,i),e.render(t,s),e.setRenderTarget(n,3,i),e.render(t,o),e.setRenderTarget(n,4,i),e.render(t,l),n.texture.generateMipmaps=f,e.setRenderTarget(n,5,i),e.render(t,c),e.setRenderTarget(h,u,d),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class CubeTexture extends Texture{constructor(e,t,n,i,r,a,s,o,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:H,n,i,r,a,s,o,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class WebGLCubeRenderTarget extends WebGLRenderTarget{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];void 0!==t.encoding&&(warnOnce("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===He?We:ke),this.texture=new CubeTexture(i,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:$}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},i=new BoxGeometry(5,5,5),r=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:c,blending:u});r.uniforms.tEquirect.value=t;const a=new Mesh(i,r),s=t.minFilter;t.minFilter===te&&(t.minFilter=$);return new CubeCamera(1,10,this).update(e,a),t.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,n,i){const r=e.getRenderTarget();for(let r=0;r<6;r++)e.setRenderTarget(this,r),e.clear(t,n,i);e.setRenderTarget(r)}}const pi=new Vector3,fi=new Vector3,mi=new Matrix3;class Plane{constructor(e=new Vector3(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=pi.subVectors(n,t).cross(fi.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(pi),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:t.copy(e.start).addScaledVector(n,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||mi.getNormalMatrix(e),i=this.coplanarPoint(pi).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const gi=new Sphere,_i=new Vector3;class Frustum{constructor(e=new Plane,t=new Plane,n=new Plane,i=new Plane,r=new Plane,a=new Plane){this.planes=[e,t,n,i,r,a]}set(e,t,n,i,r,a){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(i),s[4].copy(r),s[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=2e3){const n=this.planes,i=e.elements,r=i[0],a=i[1],s=i[2],o=i[3],l=i[4],c=i[5],h=i[6],u=i[7],d=i[8],p=i[9],f=i[10],m=i[11],g=i[12],_=i[13],v=i[14],x=i[15];if(n[0].setComponents(o-r,u-l,m-d,x-g).normalize(),n[1].setComponents(o+r,u+l,m+d,x+g).normalize(),n[2].setComponents(o+a,u+c,m+p,x+_).normalize(),n[3].setComponents(o-a,u-c,m-p,x-_).normalize(),n[4].setComponents(o-s,u-h,m-f,x-v).normalize(),t===ht)n[5].setComponents(o+s,u+h,m+f,x+v).normalize();else{if(t!==ut)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);n[5].setComponents(s,h,f,v).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),gi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),gi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(gi)}intersectsSprite(e){return gi.center.set(0,0,0),gi.radius=.7071067811865476,gi.applyMatrix4(e.matrixWorld),this.intersectsSphere(gi)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(n)<i)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if(_i.x=i.normal.x>0?e.max.x:e.min.x,_i.y=i.normal.y>0?e.max.y:e.min.y,_i.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(_i)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function WebGLAnimation(){let e=null,t=!1,n=null,i=null;function onAnimationFrame(t,r){n(t,r),i=e.requestAnimationFrame(onAnimationFrame)}return{start:function(){!0!==t&&null!==n&&(i=e.requestAnimationFrame(onAnimationFrame),t=!0)},stop:function(){e.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function WebGLAttributes(e,t){const n=t.isWebGL2,i=new WeakMap;return{get:function get(e){return e.isInterleavedBufferAttribute&&(e=e.data),i.get(e)},remove:function remove(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=i.get(t);n&&(e.deleteBuffer(n.buffer),i.delete(t))},update:function update(t,r){if(t.isGLBufferAttribute){const e=i.get(t);return void((!e||e.version<t.version)&&i.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const a=i.get(t);if(void 0===a)i.set(t,function createBuffer(t,i){const r=t.array,a=t.usage,s=r.byteLength,o=e.createBuffer();let l;if(e.bindBuffer(i,o),e.bufferData(i,r,a),t.onUploadCallback(),r instanceof Float32Array)l=e.FLOAT;else if(r instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");l=e.HALF_FLOAT}else l=e.UNSIGNED_SHORT;else if(r instanceof Int16Array)l=e.SHORT;else if(r instanceof Uint32Array)l=e.UNSIGNED_INT;else if(r instanceof Int32Array)l=e.INT;else if(r instanceof Int8Array)l=e.BYTE;else if(r instanceof Uint8Array)l=e.UNSIGNED_BYTE;else{if(!(r instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+r);l=e.UNSIGNED_BYTE}return{buffer:o,type:l,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:s}}(t,r));else if(a.version<t.version){if(a.size!==t.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");!function updateBuffer(t,i,r){const a=i.array,s=i._updateRange,o=i.updateRanges;if(e.bindBuffer(r,t),-1===s.count&&0===o.length&&e.bufferSubData(r,0,a),0!==o.length){for(let t=0,i=o.length;t<i;t++){const i=o[t];n?e.bufferSubData(r,i.start*a.BYTES_PER_ELEMENT,a,i.start,i.count):e.bufferSubData(r,i.start*a.BYTES_PER_ELEMENT,a.subarray(i.start,i.start+i.count))}i.clearUpdateRanges()}-1!==s.count&&(n?e.bufferSubData(r,s.offset*a.BYTES_PER_ELEMENT,a,s.offset,s.count):e.bufferSubData(r,s.offset*a.BYTES_PER_ELEMENT,a.subarray(s.offset,s.offset+s.count)),s.count=-1),i.onUploadCallback()}(a.buffer,t,r),a.version=t.version}}}}class PlaneGeometry extends BufferGeometry{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const r=e/2,a=t/2,s=Math.floor(n),o=Math.floor(i),l=s+1,c=o+1,h=e/s,u=t/o,d=[],p=[],f=[],m=[];for(let e=0;e<c;e++){const t=e*u-a;for(let n=0;n<l;n++){const i=n*h-r;p.push(i,-t,0),f.push(0,0,1),m.push(n/s),m.push(1-e/o)}}for(let e=0;e<o;e++)for(let t=0;t<s;t++){const n=t+l*e,i=t+l*(e+1),r=t+1+l*(e+1),a=t+1+l*e;d.push(n,i,a),d.push(i,r,a)}this.setIndex(d),this.setAttribute("position",new Float32BufferAttribute(p,3)),this.setAttribute("normal",new Float32BufferAttribute(f,3)),this.setAttribute("uv",new Float32BufferAttribute(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new PlaneGeometry(e.width,e.height,e.widthSegments,e.heightSegments)}}const vi={alphahash_fragment:"#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",batching_vertex:"#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor *= toneMappingExposure;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\treturn color;\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"},xi={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Matrix3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Matrix3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Matrix3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color(16777215)},opacity:{value:1},center:{value:new Vector2(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}},yi={basic:{uniforms:mergeUniforms([xi.common,xi.specularmap,xi.envmap,xi.aomap,xi.lightmap,xi.fog]),vertexShader:vi.meshbasic_vert,fragmentShader:vi.meshbasic_frag},lambert:{uniforms:mergeUniforms([xi.common,xi.specularmap,xi.envmap,xi.aomap,xi.lightmap,xi.emissivemap,xi.bumpmap,xi.normalmap,xi.displacementmap,xi.fog,xi.lights,{emissive:{value:new Color(0)}}]),vertexShader:vi.meshlambert_vert,fragmentShader:vi.meshlambert_frag},phong:{uniforms:mergeUniforms([xi.common,xi.specularmap,xi.envmap,xi.aomap,xi.lightmap,xi.emissivemap,xi.bumpmap,xi.normalmap,xi.displacementmap,xi.fog,xi.lights,{emissive:{value:new Color(0)},specular:{value:new Color(1118481)},shininess:{value:30}}]),vertexShader:vi.meshphong_vert,fragmentShader:vi.meshphong_frag},standard:{uniforms:mergeUniforms([xi.common,xi.envmap,xi.aomap,xi.lightmap,xi.emissivemap,xi.bumpmap,xi.normalmap,xi.displacementmap,xi.roughnessmap,xi.metalnessmap,xi.fog,xi.lights,{emissive:{value:new Color(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vi.meshphysical_vert,fragmentShader:vi.meshphysical_frag},toon:{uniforms:mergeUniforms([xi.common,xi.aomap,xi.lightmap,xi.emissivemap,xi.bumpmap,xi.normalmap,xi.displacementmap,xi.gradientmap,xi.fog,xi.lights,{emissive:{value:new Color(0)}}]),vertexShader:vi.meshtoon_vert,fragmentShader:vi.meshtoon_frag},matcap:{uniforms:mergeUniforms([xi.common,xi.bumpmap,xi.normalmap,xi.displacementmap,xi.fog,{matcap:{value:null}}]),vertexShader:vi.meshmatcap_vert,fragmentShader:vi.meshmatcap_frag},points:{uniforms:mergeUniforms([xi.points,xi.fog]),vertexShader:vi.points_vert,fragmentShader:vi.points_frag},dashed:{uniforms:mergeUniforms([xi.common,xi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vi.linedashed_vert,fragmentShader:vi.linedashed_frag},depth:{uniforms:mergeUniforms([xi.common,xi.displacementmap]),vertexShader:vi.depth_vert,fragmentShader:vi.depth_frag},normal:{uniforms:mergeUniforms([xi.common,xi.bumpmap,xi.normalmap,xi.displacementmap,{opacity:{value:1}}]),vertexShader:vi.meshnormal_vert,fragmentShader:vi.meshnormal_frag},sprite:{uniforms:mergeUniforms([xi.sprite,xi.fog]),vertexShader:vi.sprite_vert,fragmentShader:vi.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vi.background_vert,fragmentShader:vi.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:vi.backgroundCube_vert,fragmentShader:vi.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vi.cube_vert,fragmentShader:vi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vi.equirect_vert,fragmentShader:vi.equirect_frag},distanceRGBA:{uniforms:mergeUniforms([xi.common,xi.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vi.distanceRGBA_vert,fragmentShader:vi.distanceRGBA_frag},shadow:{uniforms:mergeUniforms([xi.lights,xi.fog,{color:{value:new Color(0)},opacity:{value:1}}]),vertexShader:vi.shadow_vert,fragmentShader:vi.shadow_frag}};yi.physical={uniforms:mergeUniforms([yi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Matrix3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Matrix3},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Matrix3},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Matrix3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Matrix3},sheen:{value:0},sheenColor:{value:new Color(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Matrix3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Matrix3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Matrix3},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Matrix3},attenuationDistance:{value:0},attenuationColor:{value:new Color(0)},specularColor:{value:new Color(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Matrix3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Matrix3},anisotropyVector:{value:new Vector2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Matrix3}}]),vertexShader:vi.meshphysical_vert,fragmentShader:vi.meshphysical_frag};const Mi={r:0,b:0,g:0};function WebGLBackground(e,t,n,i,r,a,s){const o=new Color(0);let h,u,d=!0===a?0:1,p=null,f=0,m=null;function setClear(t,n){t.getRGB(Mi,getUnlitUniformColorSpace(e)),i.buffers.color.setClear(Mi.r,Mi.g,Mi.b,n,s)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),d=t,setClear(o,d)},getClearAlpha:function(){return d},setClearAlpha:function(e){d=e,setClear(o,d)},render:function render(a,g){let _=!1,v=!0===g.isScene?g.background:null;if(v&&v.isTexture){v=(g.backgroundBlurriness>0?n:t).get(v)}null===v?setClear(o,d):v&&v.isColor&&(setClear(v,1),_=!0);const x=e.xr.getEnvironmentBlendMode();"additive"===x?i.buffers.color.setClear(0,0,0,1,s):"alpha-blend"===x&&i.buffers.color.setClear(0,0,0,0,s),(e.autoClear||_)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),v&&(v.isCubeTexture||v.mapping===j)?(void 0===u&&(u=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:"BackgroundCubeMaterial",uniforms:cloneUniforms(yi.backgroundCube.uniforms),vertexShader:yi.backgroundCube.vertexShader,fragmentShader:yi.backgroundCube.fragmentShader,side:c,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),u.material.uniforms.envMap.value=v,u.material.uniforms.flipEnvMap.value=v.isCubeTexture&&!1===v.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.toneMapped=Tt.getTransfer(v.colorSpace)!==Ke,p===v&&f===v.version&&m===e.toneMapping||(u.material.needsUpdate=!0,p=v,f=v.version,m=e.toneMapping),u.layers.enableAll(),a.unshift(u,u.geometry,u.material,0,0,null)):v&&v.isTexture&&(void 0===h&&(h=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:"BackgroundMaterial",uniforms:cloneUniforms(yi.background.uniforms),vertexShader:yi.background.vertexShader,fragmentShader:yi.background.fragmentShader,side:l,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(h)),h.material.uniforms.t2D.value=v,h.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,h.material.toneMapped=Tt.getTransfer(v.colorSpace)!==Ke,!0===v.matrixAutoUpdate&&v.updateMatrix(),h.material.uniforms.uvTransform.value.copy(v.matrix),p===v&&f===v.version&&m===e.toneMapping||(h.material.needsUpdate=!0,p=v,f=v.version,m=e.toneMapping),h.layers.enableAll(),a.unshift(h,h.geometry,h.material,0,0,null))}}}function WebGLBindingStates(e,t,n,i){const r=e.getParameter(e.MAX_VERTEX_ATTRIBS),a=i.isWebGL2?null:t.get("OES_vertex_array_object"),s=i.isWebGL2||null!==a,o={},l=createBindingState(null);let c=l,h=!1;function bindVertexArrayObject(t){return i.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function deleteVertexArrayObject(t){return i.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function createBindingState(e){const t=[],n=[],i=[];for(let e=0;e<r;e++)t[e]=0,n[e]=0,i[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:i,object:e,attributes:{},index:null}}function initAttributes(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function enableAttribute(e){enableAttributeAndDivisor(e,0)}function enableAttributeAndDivisor(n,r){const a=c.newAttributes,s=c.enabledAttributes,o=c.attributeDivisors;if(a[n]=1,0===s[n]&&(e.enableVertexAttribArray(n),s[n]=1),o[n]!==r){(i.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,r),o[n]=r}}function disableUnusedAttributes(){const t=c.newAttributes,n=c.enabledAttributes;for(let i=0,r=n.length;i<r;i++)n[i]!==t[i]&&(e.disableVertexAttribArray(i),n[i]=0)}function vertexAttribPointer(t,n,i,r,a,s,o){!0===o?e.vertexAttribIPointer(t,n,i,a,s):e.vertexAttribPointer(t,n,i,r,a,s)}function reset(){resetDefaultState(),h=!0,c!==l&&(c=l,bindVertexArrayObject(c.object))}function resetDefaultState(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function setup(r,l,u,d,p){let f=!1;if(s){const t=function getBindingState(t,n,r){const s=!0===r.wireframe;let l=o[t.id];void 0===l&&(l={},o[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let h=c[s];void 0===h&&(h=createBindingState(function createVertexArrayObject(){return i.isWebGL2?e.createVertexArray():a.createVertexArrayOES()}()),c[s]=h);return h}(d,u,l);c!==t&&(c=t,bindVertexArrayObject(c.object)),f=function needsUpdate(e,t,n,i){const r=c.attributes,a=t.attributes;let s=0;const o=n.getAttributes();for(const t in o){if(o[t].location>=0){const n=r[t];let i=a[t];if(void 0===i&&("instanceMatrix"===t&&e.instanceMatrix&&(i=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(i=e.instanceColor)),void 0===n)return!0;if(n.attribute!==i)return!0;if(i&&n.data!==i.data)return!0;s++}}return c.attributesNum!==s||c.index!==i}(r,d,u,p),f&&function saveCache(e,t,n,i){const r={},a=t.attributes;let s=0;const o=n.getAttributes();for(const t in o){if(o[t].location>=0){let n=a[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));const i={};i.attribute=n,n&&n.data&&(i.data=n.data),r[t]=i,s++}}c.attributes=r,c.attributesNum=s,c.index=i}(r,d,u,p)}else{const e=!0===l.wireframe;c.geometry===d.id&&c.program===u.id&&c.wireframe===e||(c.geometry=d.id,c.program=u.id,c.wireframe=e,f=!0)}null!==p&&n.update(p,e.ELEMENT_ARRAY_BUFFER),(f||h)&&(h=!1,function setupVertexAttributes(r,a,s,o){if(!1===i.isWebGL2&&(r.isInstancedMesh||o.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;initAttributes();const l=o.attributes,c=s.getAttributes(),h=a.defaultAttributeValues;for(const t in c){const a=c[t];if(a.location>=0){let s=l[t];if(void 0===s&&("instanceMatrix"===t&&r.instanceMatrix&&(s=r.instanceMatrix),"instanceColor"===t&&r.instanceColor&&(s=r.instanceColor)),void 0!==s){const t=s.normalized,l=s.itemSize,c=n.get(s);if(void 0===c)continue;const h=c.buffer,u=c.type,d=c.bytesPerElement,p=!0===i.isWebGL2&&(u===e.INT||u===e.UNSIGNED_INT||s.gpuType===oe);if(s.isInterleavedBufferAttribute){const n=s.data,i=n.stride,c=s.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e<a.locationSize;e++)enableAttributeAndDivisor(a.location+e,n.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<a.locationSize;e++)enableAttribute(a.location+e);e.bindBuffer(e.ARRAY_BUFFER,h);for(let e=0;e<a.locationSize;e++)vertexAttribPointer(a.location+e,l/a.locationSize,u,t,i*d,(c+l/a.locationSize*e)*d,p)}else{if(s.isInstancedBufferAttribute){for(let e=0;e<a.locationSize;e++)enableAttributeAndDivisor(a.location+e,s.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=s.meshPerAttribute*s.count)}else for(let e=0;e<a.locationSize;e++)enableAttribute(a.location+e);e.bindBuffer(e.ARRAY_BUFFER,h);for(let e=0;e<a.locationSize;e++)vertexAttribPointer(a.location+e,l/a.locationSize,u,t,l*d,l/a.locationSize*e*d,p)}}else if(void 0!==h){const n=h[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(a.location,n);break;case 3:e.vertexAttrib3fv(a.location,n);break;case 4:e.vertexAttrib4fv(a.location,n);break;default:e.vertexAttrib1fv(a.location,n)}}}}disableUnusedAttributes()}(r,l,u,d),null!==p&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n.get(p).buffer))},reset,resetDefaultState,dispose:function dispose(){reset();for(const e in o){const t=o[e];for(const e in t){const n=t[e];for(const e in n)deleteVertexArrayObject(n[e].object),delete n[e];delete t[e]}delete o[e]}},releaseStatesOfGeometry:function releaseStatesOfGeometry(e){if(void 0===o[e.id])return;const t=o[e.id];for(const e in t){const n=t[e];for(const e in n)deleteVertexArrayObject(n[e].object),delete n[e];delete t[e]}delete o[e.id]},releaseStatesOfProgram:function releaseStatesOfProgram(e){for(const t in o){const n=o[t];if(void 0===n[e.id])continue;const i=n[e.id];for(const e in i)deleteVertexArrayObject(i[e].object),delete i[e];delete n[e.id]}},initAttributes,enableAttribute,disableUnusedAttributes}}function WebGLBufferRenderer(e,t,n,r){const a=r.isWebGL2;let s;this.setMode=function setMode(e){s=e},this.render=function render(t,i){e.drawArrays(s,t,i),n.update(i,s,1)},this.renderInstances=function renderInstances(r,o,l){if(0===l)return;let c,h;if(a)c=e,h="drawArraysInstanced";else if(c=t.get("ANGLE_instanced_arrays"),h="drawArraysInstancedANGLE",null===c)return void i.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[h](s,r,o,l),n.update(o,s,l)},this.renderMultiDraw=function renderMultiDraw(e,i,r){if(0===r)return;const a=t.get("WEBGL_multi_draw");if(null===a)for(let t=0;t<r;t++)this.render(e[t],i[t]);else{a.multiDrawArraysWEBGL(s,e,0,i,0,r);let t=0;for(let e=0;e<r;e++)t+=i[e];n.update(t,s,1)}}}function WebGLCapabilities(e,t,n){let r;function getMaxPrecision(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;let s=void 0!==n.precision?n.precision:"highp";const o=getMaxPrecision(s);o!==s&&(i.warn("THREE.WebGLRenderer:",s,"not supported, using",o,"instead."),s=o);const l=a||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,h=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),u=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS),_=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,x=a||t.has("OES_texture_float");return{isWebGL2:a,drawBuffers:l,getMaxAnisotropy:function getMaxAnisotropy(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision,precision:s,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:_,vertexTextures:v,floatFragmentTextures:x,floatVertexTextures:v&&x,maxSamples:a?e.getParameter(e.MAX_SAMPLES):0}}function WebGLClipping(e){const t=this;let n=null,i=0,r=!1,a=!1;const s=new Plane,o=new Matrix3,l={value:null,needsUpdate:!1};function projectPlanes(e,n,i,r){const a=null!==e?e.length:0;let c=null;if(0!==a){if(c=l.value,!0!==r||null===c){const t=i+4*a,r=n.matrixWorldInverse;o.getNormalMatrix(r),(null===c||c.length<t)&&(c=new Float32Array(t));for(let t=0,n=i;t!==a;++t,n+=4)s.copy(e[t]).applyMatrix4(r,o),s.normal.toArray(c,n),c[n+3]=s.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){const n=0!==e.length||t||0!==i||r;return r=t,i=e.length,n},this.beginShadows=function(){a=!0,projectPlanes(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=projectPlanes(e,t,0)},this.setState=function(s,o,c){const h=s.clippingPlanes,u=s.clipIntersection,d=s.clipShadows,p=e.get(s);if(!r||null===h||0===h.length||a&&!d)a?projectPlanes(null):function resetGlobalState(){l.value!==n&&(l.value=n,l.needsUpdate=i>0);t.numPlanes=i,t.numIntersection=0}();else{const e=a?0:i,t=4*e;let r=p.clippingState||null;l.value=r,r=projectPlanes(h,o,t,c);for(let e=0;e!==t;++e)r[e]=n[e];p.clippingState=r,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=e}}}function WebGLCubeMaps(e){let t=new WeakMap;function mapTextureMapping(e,t){return t===W?e.mapping=H:t===X&&(e.mapping=k),e}function onTextureDispose(e){const n=e.target;n.removeEventListener("dispose",onTextureDispose);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function get(n){if(n&&n.isTexture){const i=n.mapping;if(i===W||i===X){if(t.has(n)){return mapTextureMapping(t.get(n).texture,n.mapping)}{const i=n.image;if(i&&i.height>0){const r=new WebGLCubeRenderTarget(i.height/2);return r.fromEquirectangularTexture(e,n),t.set(n,r),n.addEventListener("dispose",onTextureDispose),mapTextureMapping(r.texture,n.mapping)}return null}}}return n},dispose:function dispose(){t=new WeakMap}}}class OrthographicCamera extends Camera{constructor(e=-1,t=1,n=1,i=-1,r=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-e,a=n+e,s=i+t,o=i-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=e*this.view.offsetX,a=r+e*this.view.width,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(r,a,s,o,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const Si=[.125,.215,.35,.446,.526,.582],Ti=20,bi=new OrthographicCamera,Ei=new Color;let Ai=null,wi=0,Ri=0;const Ci=(1+Math.sqrt(5))/2,Li=1/Ci,Pi=[new Vector3(1,1,1),new Vector3(-1,1,1),new Vector3(1,1,-1),new Vector3(-1,1,-1),new Vector3(0,Ci,Li),new Vector3(0,Ci,-Li),new Vector3(Li,0,Ci),new Vector3(-Li,0,Ci),new Vector3(Ci,Li,0),new Vector3(-Ci,Li,0)];class PMREMGenerator{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100){Ai=this._renderer.getRenderTarget(),wi=this._renderer.getActiveCubeFace(),Ri=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,n,i,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=_getCubemapMaterial(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=_getEquirectMaterial(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Ai,wi,Ri),e.scissorTest=!1,_setViewport(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===H||e.mapping===k?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Ai=this._renderer.getRenderTarget(),wi=this._renderer.getActiveCubeFace(),Ri=this._renderer.getActiveMipmapLevel();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:$,minFilter:$,generateMipmaps:!1,type:he,format:de,colorSpace:Xe,depthBuffer:!1},i=_createRenderTarget(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=_createRenderTarget(e,t,n);const{_lodMax:i}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function _createPlanes(e){const t=[],n=[],i=[];let r=e;const a=e-4+1+Si.length;for(let s=0;s<a;s++){const a=Math.pow(2,r);n.push(a);let o=1/a;s>e-4?o=Si[s-e+4-1]:0===s&&(o=0),i.push(o);const l=1/(a-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,p=6,f=3,m=2,g=1,_=new Float32Array(f*p*d),v=new Float32Array(m*p*d),x=new Float32Array(g*p*d);for(let e=0;e<d;e++){const t=e%3*2/3-1,n=e>2?0:-1,i=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];_.set(i,f*p*e),v.set(u,m*p*e);const r=[e,e,e,e,e,e];x.set(r,g*p*e)}const y=new BufferGeometry;y.setAttribute("position",new BufferAttribute(_,f)),y.setAttribute("uv",new BufferAttribute(v,m)),y.setAttribute("faceIndex",new BufferAttribute(x,g)),t.push(y),r>4&&r--}return{lodPlanes:t,sizeLods:n,sigmas:i}}(i)),this._blurMaterial=function _getBlurShader(e,t,n){const i=new Float32Array(Ti),r=new Vector3(0,1,0),a=new ShaderMaterial({name:"SphericalGaussianBlur",defines:{n:Ti,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:_getCommonVertexShader(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:u,depthTest:!1,depthWrite:!1});return a}(i,e,t)}return i}_compileMaterial(e){const t=new Mesh(this._lodPlanes[0],e);this._renderer.compile(t,bi)}_sceneToCubeUV(e,t,n,i){const r=new PerspectiveCamera(90,1,t,n),a=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],o=this._renderer,l=o.autoClear,h=o.toneMapping;o.getClearColor(Ei),o.toneMapping=I,o.autoClear=!1;const u=new MeshBasicMaterial({name:"PMREM.Background",side:c,depthWrite:!1,depthTest:!1}),d=new Mesh(new BoxGeometry,u);let p=!1;const f=e.background;f?f.isColor&&(u.color.copy(f),e.background=null,p=!0):(u.color.copy(Ei),p=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(r.up.set(0,a[t],0),r.lookAt(s[t],0,0)):1===n?(r.up.set(0,0,a[t]),r.lookAt(0,s[t],0)):(r.up.set(0,a[t],0),r.lookAt(0,0,s[t]));const l=this._cubeSize;_setViewport(i,n*l,t>2?l:0,l,l),o.setRenderTarget(i),p&&o.render(d,r),o.render(e,r)}d.geometry.dispose(),d.material.dispose(),o.toneMapping=h,o.autoClear=l,e.background=f}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===H||e.mapping===k;i?(null===this._cubemapMaterial&&(this._cubemapMaterial=_getCubemapMaterial()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=_getEquirectMaterial());const r=i?this._cubemapMaterial:this._equirectMaterial,a=new Mesh(this._lodPlanes[0],r);r.uniforms.envMap.value=e;const s=this._cubeSize;_setViewport(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,bi)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<this._lodPlanes.length;t++){const n=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),i=Pi[(t-1)%Pi.length];this._blur(e,t-1,t,n,i)}t.autoClear=n}_blur(e,t,n,i,r){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,i,"latitudinal",r),this._halfBlur(a,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,r,a,s,o){const l=this._renderer,c=this._blurMaterial;"latitudinal"!==s&&"longitudinal"!==s&&i.error("blur direction must be either latitudinal or longitudinal!");const h=new Mesh(this._lodPlanes[r],c),u=c.uniforms,d=this._sizeLods[n]-1,p=isFinite(a)?Math.PI/(2*d):2*Math.PI/39,f=a/p,m=isFinite(a)?1+Math.floor(3*f):Ti;m>Ti&&i.warn(`sigmaRadians, ${a}, is too large and will clip, as it requested ${m} samples when the maximum is set to 20`);const g=[];let _=0;for(let e=0;e<Ti;++e){const t=e/f,n=Math.exp(-t*t/2);g.push(n),0===e?_+=n:e<m&&(_+=2*n)}for(let e=0;e<g.length;e++)g[e]=g[e]/_;u.envMap.value=e.texture,u.samples.value=m,u.weights.value=g,u.latitudinal.value="latitudinal"===s,o&&(u.poleAxis.value=o);const{_lodMax:v}=this;u.dTheta.value=p,u.mipInt.value=v-n;const x=this._sizeLods[r];_setViewport(t,3*x*(r>v-4?r-v+4:0),4*(this._cubeSize-x),3*x,2*x),l.setRenderTarget(t),l.render(h,bi)}}function _createRenderTarget(e,t,n){const i=new WebGLRenderTarget(e,t,n);return i.texture.mapping=j,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function _setViewport(e,t,n,i,r){e.viewport.set(t,n,i,r),e.scissor.set(t,n,i,r)}function _getEquirectMaterial(){return new ShaderMaterial({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:u,depthTest:!1,depthWrite:!1})}function _getCubemapMaterial(){return new ShaderMaterial({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:u,depthTest:!1,depthWrite:!1})}function _getCommonVertexShader(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function WebGLCubeUVMaps(e){let t=new WeakMap,n=null;function onTextureDispose(e){const n=e.target;n.removeEventListener("dispose",onTextureDispose);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function get(i){if(i&&i.isTexture){const r=i.mapping,a=r===W||r===X,s=r===H||r===k;if(a||s){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new PMREMGenerator(e)),r=a?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const r=i.image;if(a&&r&&r.height>0||s&&r&&function isCubeTextureComplete(e){let t=0;const n=6;for(let i=0;i<n;i++)void 0!==e[i]&&t++;return t===n}(r)){null===n&&(n=new PMREMGenerator(e));const r=a?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,r),i.addEventListener("dispose",onTextureDispose),r.texture}return null}}}return i},dispose:function dispose(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function WebGLExtensions(e){const t={};function getExtension(n){if(void 0!==t[n])return t[n];let i;switch(n){case"WEBGL_depth_texture":i=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=e.getExtension(n)}return t[n]=i,i}return{has:function(e){return null!==getExtension(e)},init:function(e){e.isWebGL2?(getExtension("EXT_color_buffer_float"),getExtension("WEBGL_clip_cull_distance")):(getExtension("WEBGL_depth_texture"),getExtension("OES_texture_float"),getExtension("OES_texture_half_float"),getExtension("OES_texture_half_float_linear"),getExtension("OES_standard_derivatives"),getExtension("OES_element_index_uint"),getExtension("OES_vertex_array_object"),getExtension("ANGLE_instanced_arrays")),getExtension("OES_texture_float_linear"),getExtension("EXT_color_buffer_half_float"),getExtension("WEBGL_multisampled_render_to_texture")},get:function(e){const t=getExtension(e);return null===t&&i.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function WebGLGeometries(e,t,n,i){const r={},a=new WeakMap;function onGeometryDispose(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const e in s.attributes)t.remove(s.attributes[e]);for(const e in s.morphAttributes){const n=s.morphAttributes[e];for(let e=0,i=n.length;e<i;e++)t.remove(n[e])}s.removeEventListener("dispose",onGeometryDispose),delete r[s.id];const o=a.get(s);o&&(t.remove(o),a.delete(s)),i.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function updateWireframeAttribute(e){const n=[],i=e.index,r=e.attributes.position;let s=0;if(null!==i){const e=i.array;s=i.version;for(let t=0,i=e.length;t<i;t+=3){const i=e[t+0],r=e[t+1],a=e[t+2];n.push(i,r,r,a,a,i)}}else{if(void 0===r)return;{const e=r.array;s=r.version;for(let t=0,i=e.length/3-1;t<i;t+=3){const e=t+0,i=t+1,r=t+2;n.push(e,i,i,r,r,e)}}}const o=new(arrayNeedsUint32(n)?Uint32BufferAttribute:Uint16BufferAttribute)(n,1);o.version=s;const l=a.get(e);l&&t.remove(l),a.set(e,o)}return{get:function get(e,t){return!0===r[t.id]||(t.addEventListener("dispose",onGeometryDispose),r[t.id]=!0,n.memory.geometries++),t},update:function update(n){const i=n.attributes;for(const n in i)t.update(i[n],e.ARRAY_BUFFER);const r=n.morphAttributes;for(const n in r){const i=r[n];for(let n=0,r=i.length;n<r;n++)t.update(i[n],e.ARRAY_BUFFER)}},getWireframeAttribute:function getWireframeAttribute(e){const t=a.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&updateWireframeAttribute(e)}else updateWireframeAttribute(e);return a.get(e)}}}function WebGLIndexedBufferRenderer(e,t,n,r){const a=r.isWebGL2;let s,o,l;this.setMode=function setMode(e){s=e},this.setIndex=function setIndex(e){o=e.type,l=e.bytesPerElement},this.render=function render(t,i){e.drawElements(s,i,o,t*l),n.update(i,s,1)},this.renderInstances=function renderInstances(r,c,h){if(0===h)return;let u,d;if(a)u=e,d="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),d="drawElementsInstancedANGLE",null===u)return void i.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[d](s,c,o,r*l,h),n.update(c,s,h)},this.renderMultiDraw=function renderMultiDraw(e,i,r){if(0===r)return;const a=t.get("WEBGL_multi_draw");if(null===a)for(let t=0;t<r;t++)this.render(e[t]/l,i[t]);else{a.multiDrawElementsWEBGL(s,i,0,o,e,0,r);let t=0;for(let e=0;e<r;e++)t+=i[e];n.update(t,s,1)}}}function WebGLInfo(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function reset(){t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function update(n,r,a){switch(t.calls++,r){case e.TRIANGLES:t.triangles+=a*(n/3);break;case e.LINES:t.lines+=a*(n/2);break;case e.LINE_STRIP:t.lines+=a*(n-1);break;case e.LINE_LOOP:t.lines+=a*n;break;case e.POINTS:t.points+=a*n;break;default:i.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}function numericalSort(e,t){return e[0]-t[0]}function absNumericalSort(e,t){return Math.abs(t[1])-Math.abs(e[1])}function WebGLMorphtargets(e,t,n){const i={},r=new Float32Array(8),a=new WeakMap,s=new Vector4,o=[];for(let e=0;e<8;e++)o[e]=[e,0];return{update:function update(l,c,h){const u=l.morphTargetInfluences;if(!0===t.isWebGL2){const d=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,p=void 0!==d?d.length:0;let f=a.get(c);if(void 0===f||f.count!==p){void 0!==f&&f.texture.dispose();const _=void 0!==c.morphAttributes.position,v=void 0!==c.morphAttributes.normal,x=void 0!==c.morphAttributes.color,y=c.morphAttributes.position||[],M=c.morphAttributes.normal||[],S=c.morphAttributes.color||[];let T=0;!0===_&&(T=1),!0===v&&(T=2),!0===x&&(T=3);let b=c.attributes.position.count*T,E=1;b>t.maxTextureSize&&(E=Math.ceil(b/t.maxTextureSize),b=t.maxTextureSize);const A=new Float32Array(b*E*4*p),w=new DataArrayTexture(A,b,E,p);w.type=ce,w.needsUpdate=!0;const R=4*T;for(let C=0;C<p;C++){const L=y[C],P=M[C],U=S[C],I=b*E*4*C;for(let D=0;D<L.count;D++){const N=D*R;!0===_&&(s.fromBufferAttribute(L,D),A[I+N+0]=s.x,A[I+N+1]=s.y,A[I+N+2]=s.z,A[I+N+3]=0),!0===v&&(s.fromBufferAttribute(P,D),A[I+N+4]=s.x,A[I+N+5]=s.y,A[I+N+6]=s.z,A[I+N+7]=0),!0===x&&(s.fromBufferAttribute(U,D),A[I+N+8]=s.x,A[I+N+9]=s.y,A[I+N+10]=s.z,A[I+N+11]=4===U.itemSize?s.w:1)}}function disposeTexture(){w.dispose(),a.delete(c),c.removeEventListener("dispose",disposeTexture)}f={count:p,texture:w,size:new Vector2(b,E)},a.set(c,f),c.addEventListener("dispose",disposeTexture)}let m=0;for(let O=0;O<u.length;O++)m+=u[O];const g=c.morphTargetsRelative?1:1-m;h.getUniforms().setValue(e,"morphTargetBaseInfluence",g),h.getUniforms().setValue(e,"morphTargetInfluences",u),h.getUniforms().setValue(e,"morphTargetsTexture",f.texture,n),h.getUniforms().setValue(e,"morphTargetsTextureSize",f.size)}else{const B=void 0===u?0:u.length;let F=i[c.id];if(void 0===F||F.length!==B){F=[];for(let k=0;k<B;k++)F[k]=[k,0];i[c.id]=F}for(let W=0;W<B;W++){const X=F[W];X[0]=W,X[1]=u[W]}F.sort(absNumericalSort);for(let j=0;j<8;j++)j<B&&F[j][1]?(o[j][0]=F[j][0],o[j][1]=F[j][1]):(o[j][0]=Number.MAX_SAFE_INTEGER,o[j][1]=0);o.sort(numericalSort);const V=c.morphAttributes.position,z=c.morphAttributes.normal;let G=0;for(let q=0;q<8;q++){const Y=o[q],K=Y[0],Z=Y[1];K!==Number.MAX_SAFE_INTEGER&&Z?(V&&c.getAttribute("morphTarget"+q)!==V[K]&&c.setAttribute("morphTarget"+q,V[K]),z&&c.getAttribute("morphNormal"+q)!==z[K]&&c.setAttribute("morphNormal"+q,z[K]),r[q]=Z,G+=Z):(V&&!0===c.hasAttribute("morphTarget"+q)&&c.deleteAttribute("morphTarget"+q),z&&!0===c.hasAttribute("morphNormal"+q)&&c.deleteAttribute("morphNormal"+q),r[q]=0)}const H=c.morphTargetsRelative?1:1-G;h.getUniforms().setValue(e,"morphTargetBaseInfluence",H),h.getUniforms().setValue(e,"morphTargetInfluences",r)}}}}function WebGLObjects(e,t,n,i){let r=new WeakMap;function onInstancedMeshDispose(e){const t=e.target;t.removeEventListener("dispose",onInstancedMeshDispose),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function update(a){const s=i.render.frame,o=a.geometry,l=t.get(a,o);if(r.get(l)!==s&&(t.update(l),r.set(l,s)),a.isInstancedMesh&&(!1===a.hasEventListener("dispose",onInstancedMeshDispose)&&a.addEventListener("dispose",onInstancedMeshDispose),r.get(a)!==s&&(n.update(a.instanceMatrix,e.ARRAY_BUFFER),null!==a.instanceColor&&n.update(a.instanceColor,e.ARRAY_BUFFER),r.set(a,s))),a.isSkinnedMesh){const e=a.skeleton;r.get(e)!==s&&(e.update(),r.set(e,s))}return l},dispose:function dispose(){r=new WeakMap}}}class DepthTexture extends Texture{constructor(e,t,n,i,r,a,s,o,l,c){if((c=void 0!==c?c:pe)!==pe&&c!==fe)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===pe&&(n=le),void 0===n&&c===fe&&(n=ue),super(null,i,r,a,s,o,c,n,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==s?s:Z,this.minFilter=void 0!==o?o:Z,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}const Ui=new Texture,Ii=new DepthTexture(1,1);Ii.compareFunction=515;const Di=new DataArrayTexture,Ni=new Data3DTexture,Oi=new CubeTexture,Bi=[],Fi=[],Vi=new Float32Array(16),zi=new Float32Array(9),Gi=new Float32Array(4);function flatten(e,t,n){const i=e[0];if(i<=0||i>0)return e;const r=t*n;let a=Bi[r];if(void 0===a&&(a=new Float32Array(r),Bi[r]=a),0!==t){i.toArray(a,0);for(let i=1,r=0;i!==t;++i)r+=n,e[i].toArray(a,r)}return a}function arraysEqual(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}function copyArray(e,t){for(let n=0,i=t.length;n<i;n++)e[n]=t[n]}function allocTexUnits(e,t){let n=Fi[t];void 0===n&&(n=new Int32Array(t),Fi[t]=n);for(let i=0;i!==t;++i)n[i]=e.allocateTextureUnit();return n}function setValueV1f(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function setValueV2f(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(arraysEqual(n,t))return;e.uniform2fv(this.addr,t),copyArray(n,t)}}function setValueV3f(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(arraysEqual(n,t))return;e.uniform3fv(this.addr,t),copyArray(n,t)}}function setValueV4f(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(arraysEqual(n,t))return;e.uniform4fv(this.addr,t),copyArray(n,t)}}function setValueM2(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(arraysEqual(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),copyArray(n,t)}else{if(arraysEqual(n,i))return;Gi.set(i),e.uniformMatrix2fv(this.addr,!1,Gi),copyArray(n,i)}}function setValueM3(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(arraysEqual(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),copyArray(n,t)}else{if(arraysEqual(n,i))return;zi.set(i),e.uniformMatrix3fv(this.addr,!1,zi),copyArray(n,i)}}function setValueM4(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(arraysEqual(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),copyArray(n,t)}else{if(arraysEqual(n,i))return;Vi.set(i),e.uniformMatrix4fv(this.addr,!1,Vi),copyArray(n,i)}}function setValueV1i(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function setValueV2i(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(arraysEqual(n,t))return;e.uniform2iv(this.addr,t),copyArray(n,t)}}function setValueV3i(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(arraysEqual(n,t))return;e.uniform3iv(this.addr,t),copyArray(n,t)}}function setValueV4i(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(arraysEqual(n,t))return;e.uniform4iv(this.addr,t),copyArray(n,t)}}function setValueV1ui(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function setValueV2ui(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(arraysEqual(n,t))return;e.uniform2uiv(this.addr,t),copyArray(n,t)}}function setValueV3ui(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(arraysEqual(n,t))return;e.uniform3uiv(this.addr,t),copyArray(n,t)}}function setValueV4ui(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(arraysEqual(n,t))return;e.uniform4uiv(this.addr,t),copyArray(n,t)}}function setValueT1(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r);const a=this.type===e.SAMPLER_2D_SHADOW?Ii:Ui;n.setTexture2D(t||a,r)}function setValueT3D1(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(t||Ni,r)}function setValueT6(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(t||Oi,r)}function setValueT2DArray1(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(t||Di,r)}function setValueV1fArray(e,t){e.uniform1fv(this.addr,t)}function setValueV2fArray(e,t){const n=flatten(t,this.size,2);e.uniform2fv(this.addr,n)}function setValueV3fArray(e,t){const n=flatten(t,this.size,3);e.uniform3fv(this.addr,n)}function setValueV4fArray(e,t){const n=flatten(t,this.size,4);e.uniform4fv(this.addr,n)}function setValueM2Array(e,t){const n=flatten(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function setValueM3Array(e,t){const n=flatten(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function setValueM4Array(e,t){const n=flatten(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function setValueV1iArray(e,t){e.uniform1iv(this.addr,t)}function setValueV2iArray(e,t){e.uniform2iv(this.addr,t)}function setValueV3iArray(e,t){e.uniform3iv(this.addr,t)}function setValueV4iArray(e,t){e.uniform4iv(this.addr,t)}function setValueV1uiArray(e,t){e.uniform1uiv(this.addr,t)}function setValueV2uiArray(e,t){e.uniform2uiv(this.addr,t)}function setValueV3uiArray(e,t){e.uniform3uiv(this.addr,t)}function setValueV4uiArray(e,t){e.uniform4uiv(this.addr,t)}function setValueT1Array(e,t,n){const i=this.cache,r=t.length,a=allocTexUnits(n,r);arraysEqual(i,a)||(e.uniform1iv(this.addr,a),copyArray(i,a));for(let e=0;e!==r;++e)n.setTexture2D(t[e]||Ui,a[e])}function setValueT3DArray(e,t,n){const i=this.cache,r=t.length,a=allocTexUnits(n,r);arraysEqual(i,a)||(e.uniform1iv(this.addr,a),copyArray(i,a));for(let e=0;e!==r;++e)n.setTexture3D(t[e]||Ni,a[e])}function setValueT6Array(e,t,n){const i=this.cache,r=t.length,a=allocTexUnits(n,r);arraysEqual(i,a)||(e.uniform1iv(this.addr,a),copyArray(i,a));for(let e=0;e!==r;++e)n.setTextureCube(t[e]||Oi,a[e])}function setValueT2DArrayArray(e,t,n){const i=this.cache,r=t.length,a=allocTexUnits(n,r);arraysEqual(i,a)||(e.uniform1iv(this.addr,a),copyArray(i,a));for(let e=0;e!==r;++e)n.setTexture2DArray(t[e]||Di,a[e])}class SingleUniform{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=function getSingularSetter(e){switch(e){case 5126:return setValueV1f;case 35664:return setValueV2f;case 35665:return setValueV3f;case 35666:return setValueV4f;case 35674:return setValueM2;case 35675:return setValueM3;case 35676:return setValueM4;case 5124:case 35670:return setValueV1i;case 35667:case 35671:return setValueV2i;case 35668:case 35672:return setValueV3i;case 35669:case 35673:return setValueV4i;case 5125:return setValueV1ui;case 36294:return setValueV2ui;case 36295:return setValueV3ui;case 36296:return setValueV4ui;case 35678:case 36198:case 36298:case 36306:case 35682:return setValueT1;case 35679:case 36299:case 36307:return setValueT3D1;case 35680:case 36300:case 36308:case 36293:return setValueT6;case 36289:case 36303:case 36311:case 36292:return setValueT2DArray1}}(t.type)}}class PureArrayUniform{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=function getPureArraySetter(e){switch(e){case 5126:return setValueV1fArray;case 35664:return setValueV2fArray;case 35665:return setValueV3fArray;case 35666:return setValueV4fArray;case 35674:return setValueM2Array;case 35675:return setValueM3Array;case 35676:return setValueM4Array;case 5124:case 35670:return setValueV1iArray;case 35667:case 35671:return setValueV2iArray;case 35668:case 35672:return setValueV3iArray;case 35669:case 35673:return setValueV4iArray;case 5125:return setValueV1uiArray;case 36294:return setValueV2uiArray;case 36295:return setValueV3uiArray;case 36296:return setValueV4uiArray;case 35678:case 36198:case 36298:case 36306:case 35682:return setValueT1Array;case 35679:case 36299:case 36307:return setValueT3DArray;case 35680:case 36300:case 36308:case 36293:return setValueT6Array;case 36289:case 36303:case 36311:case 36292:return setValueT2DArrayArray}}(t.type)}}class StructuredUniform{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let r=0,a=i.length;r!==a;++r){const a=i[r];a.setValue(e,t[a.id],n)}}}const Hi=/(\w+)(\])?(\[|\.)?/g;function addUniform(e,t){e.seq.push(t),e.map[t.id]=t}function parseUniform(e,t,n){const i=e.name,r=i.length;for(Hi.lastIndex=0;;){const a=Hi.exec(i),s=Hi.lastIndex;let o=a[1];const l="]"===a[2],c=a[3];if(l&&(o|=0),void 0===c||"["===c&&s+2===r){addUniform(n,void 0===c?new SingleUniform(o,e,t):new PureArrayUniform(o,e,t));break}{let e=n.map[o];void 0===e&&(e=new StructuredUniform(o),addUniform(n,e)),n=e}}}class WebGLUniforms{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const n=e.getActiveUniform(t,i);parseUniform(n,e.getUniformLocation(t,n.name),this)}}setValue(e,t,n,i){const r=this.map[t];void 0!==r&&r.setValue(e,n,i)}setOptional(e,t,n){const i=t[n];void 0!==i&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,a=t.length;r!==a;++r){const a=t[r],s=n[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const r=e[i];r.id in t&&n.push(r)}return n}}function WebGLShader(e,t,n){const i=e.createShader(t);return e.shaderSource(i,n),e.compileShader(i),i}const ki=37297;let Wi=0;function getShaderErrors(e,t,n){const i=e.getShaderParameter(t,e.COMPILE_STATUS),r=e.getShaderInfoLog(t).trim();if(i&&""===r)return"";const a=/ERROR: 0:(\d+)/.exec(r);if(a){const i=parseInt(a[1]);return n.toUpperCase()+"\n\n"+r+"\n\n"+function handleSource(e,t){const n=e.split("\n"),i=[],r=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let e=r;e<a;e++){const r=e+1;i.push(`${r===t?">":" "} ${r}: ${n[e]}`)}return i.join("\n")}(e.getShaderSource(t),i)}return r}function getTexelEncodingFunction(e,t){const n=function getEncodingComponents(e){const t=Tt.getPrimaries(Tt.workingColorSpace),n=Tt.getPrimaries(e);let r;switch(t===n?r="":t===Je&&n===Ze?r="LinearDisplayP3ToLinearSRGB":t===Ze&&n===Je&&(r="LinearSRGBToLinearDisplayP3"),e){case Xe:case qe:return[r,"LinearTransferOETF"];case We:case je:return[r,"sRGBTransferOETF"];default:return i.warn("THREE.WebGLProgram: Unsupported color space:",e),[r,"LinearTransferOETF"]}}(t);return`vec4 ${e}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function getToneMappingFunction(e,t){let n;switch(t){case D:n="Linear";break;case N:n="Reinhard";break;case O:n="OptimizedCineon";break;case B:n="ACESFilmic";break;case V:n="AgX";break;case F:n="Custom";break;default:i.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function filterEmptyLine(e){return""!==e}function replaceLightNums(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function replaceClippingPlaneNums(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Xi=/^[ \t]*#include +<([\w\d./]+)>/gm;function resolveIncludes(e){return e.replace(Xi,includeReplacer)}const ji=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function includeReplacer(e,t){let n=vi[t];if(void 0===n){const e=ji.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");n=vi[e],i.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return resolveIncludes(n)}const qi=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function unrollLoops(e){return e.replace(qi,loopReplacer)}function loopReplacer(e,t,n,i){let r="";for(let e=parseInt(t);e<parseInt(n);e++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return r}function generatePrecision(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function WebGLProgram(e,t,n,r){const l=e.getContext(),c=n.defines;let h=n.vertexShader,u=n.fragmentShader;const d=function generateShadowMapTypeDefine(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===a?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===s?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===o&&(t="SHADOWMAP_TYPE_VSM"),t}(n),p=function generateEnvMapTypeDefine(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case H:case k:t="ENVMAP_TYPE_CUBE";break;case j:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),f=function generateEnvMapModeDefine(e){let t="ENVMAP_MODE_REFLECTION";e.envMap&&e.envMapMode===k&&(t="ENVMAP_MODE_REFRACTION");return t}(n),m=function generateEnvMapBlendingDefine(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case L:t="ENVMAP_BLENDING_MULTIPLY";break;case P:t="ENVMAP_BLENDING_MIX";break;case U:t="ENVMAP_BLENDING_ADD"}return t}(n),g=function generateCubeUVSize(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}}(n),_=n.isWebGL2?"":function generateExtensions(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.normalMapTangentSpace||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(filterEmptyLine).join("\n")}(n),v=function generateVertexExtensions(e){return[e.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":""].filter(filterEmptyLine).join("\n")}(n),x=function generateDefines(e){const t=[];for(const n in e){const i=e[n];!1!==i&&t.push("#define "+n+" "+i)}return t.join("\n")}(c),y=l.createProgram();let M,S,T=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(M=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x].filter(filterEmptyLine).join("\n"),M.length>0&&(M+="\n"),S=[_,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x].filter(filterEmptyLine).join("\n"),S.length>0&&(S+="\n")):(M=[generatePrecision(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+f:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+d:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(filterEmptyLine).join("\n"),S=[_,generatePrecision(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+p:"",n.envMap?"#define "+f:"",n.envMap?"#define "+m:"",g?"#define CUBEUV_TEXEL_WIDTH "+g.texelWidth:"",g?"#define CUBEUV_TEXEL_HEIGHT "+g.texelHeight:"",g?"#define CUBEUV_MAX_MIP "+g.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+d:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==I?"#define TONE_MAPPING":"",n.toneMapping!==I?vi.tonemapping_pars_fragment:"",n.toneMapping!==I?getToneMappingFunction("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",vi.colorspace_pars_fragment,getTexelEncodingFunction("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(filterEmptyLine).join("\n")),h=resolveIncludes(h),h=replaceLightNums(h,n),h=replaceClippingPlaneNums(h,n),u=resolveIncludes(u),u=replaceLightNums(u,n),u=replaceClippingPlaneNums(u,n),h=unrollLoops(h),u=unrollLoops(u),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(T="#version 300 es\n",M=[v,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+M,S=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===lt?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===lt?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+S);const b=T+M+h,E=T+S+u,A=WebGLShader(l,l.VERTEX_SHADER,b),w=WebGLShader(l,l.FRAGMENT_SHADER,E);function onFirstUse(t){if(e.debug.checkShaderErrors){const n=l.getProgramInfoLog(y).trim(),r=l.getShaderInfoLog(A).trim(),a=l.getShaderInfoLog(w).trim();let s=!0,o=!0;if(!1===l.getProgramParameter(y,l.LINK_STATUS))if(s=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(l,y,A,w);else{const e=getShaderErrors(l,A,"vertex"),t=getShaderErrors(l,w,"fragment");i.error("THREE.WebGLProgram: Shader Error "+l.getError()+" - VALIDATE_STATUS "+l.getProgramParameter(y,l.VALIDATE_STATUS)+"\n\nProgram Info Log: "+n+"\n"+e+"\n"+t)}else""!==n?i.warn("THREE.WebGLProgram: Program Info Log:",n):""!==r&&""!==a||(o=!1);o&&(t.diagnostics={runnable:s,programLog:n,vertexShader:{log:r,prefix:M},fragmentShader:{log:a,prefix:S}})}l.deleteShader(A),l.deleteShader(w),R=new WebGLUniforms(l,y),C=function fetchAttributeLocations(e,t){const n={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const i=e.getActiveAttrib(t,r),a=i.name;let s=1;i.type===e.FLOAT_MAT2&&(s=2),i.type===e.FLOAT_MAT3&&(s=3),i.type===e.FLOAT_MAT4&&(s=4),n[a]={type:i.type,location:e.getAttribLocation(t,a),locationSize:s}}return n}(l,y)}let R,C;l.attachShader(y,A),l.attachShader(y,w),void 0!==n.index0AttributeName?l.bindAttribLocation(y,0,n.index0AttributeName):!0===n.morphTargets&&l.bindAttribLocation(y,0,"position"),l.linkProgram(y),this.getUniforms=function(){return void 0===R&&onFirstUse(this),R},this.getAttributes=function(){return void 0===C&&onFirstUse(this),C};let D=!1===n.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===D&&(D=l.getProgramParameter(y,ki)),D},this.destroy=function(){r.releaseStatesOfProgram(this),l.deleteProgram(y),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=Wi++,this.cacheKey=t,this.usedTimes=1,this.program=y,this.vertexShader=A,this.fragmentShader=w,this}let Yi=0;class WebGLShaderCache{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return!1===a.has(i)&&(a.add(i),i.usedTimes++),!1===a.has(r)&&(a.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return void 0===n&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return void 0===n&&(n=new WebGLShaderStage(e),t.set(e,n)),n}}class WebGLShaderStage{constructor(e){this.id=Yi++,this.code=e,this.usedTimes=0}}function WebGLPrograms(e,t,n,r,a,s,o){const l=new Layers,u=new WebGLShaderCache,d=[],p=a.isWebGL2,f=a.logarithmicDepthBuffer,m=a.vertexTextures;let g=a.precision;const _={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function getChannel(e){return 0===e?"uv":`uv${e}`}return{getParameters:function getParameters(s,l,d,v,x){const y=v.fog,M=x.geometry,S=s.isMeshStandardMaterial?v.environment:null,T=(s.isMeshStandardMaterial?n:t).get(s.envMap||S),b=T&&T.mapping===j?T.image.height:null,E=_[s.type];null!==s.precision&&(g=a.getMaxPrecision(s.precision),g!==s.precision&&i.warn("THREE.WebGLProgram.getParameters:",s.precision,"not supported, using",g,"instead."));const A=M.morphAttributes.position||M.morphAttributes.normal||M.morphAttributes.color,w=void 0!==A?A.length:0;let R,C,L,P,U=0;if(void 0!==M.morphAttributes.position&&(U=1),void 0!==M.morphAttributes.normal&&(U=2),void 0!==M.morphAttributes.color&&(U=3),E){const e=yi[E];R=e.vertexShader,C=e.fragmentShader}else R=s.vertexShader,C=s.fragmentShader,u.update(s),L=u.getVertexShaderID(s),P=u.getFragmentShaderID(s);const D=e.getRenderTarget(),N=!0===x.isInstancedMesh,O=!0===x.isBatchedMesh,B=!!s.map,F=!!s.matcap,V=!!T,z=!!s.aoMap,G=!!s.lightMap,H=!!s.bumpMap,k=!!s.normalMap,W=!!s.displacementMap,X=!!s.emissiveMap,q=!!s.metalnessMap,Y=!!s.roughnessMap,K=s.anisotropy>0,Z=s.clearcoat>0,J=s.iridescence>0,Q=s.sheen>0,$=s.transmission>0,ee=K&&!!s.anisotropyMap,te=Z&&!!s.clearcoatMap,ne=Z&&!!s.clearcoatNormalMap,ie=Z&&!!s.clearcoatRoughnessMap,re=J&&!!s.iridescenceMap,ae=J&&!!s.iridescenceThicknessMap,se=Q&&!!s.sheenColorMap,oe=Q&&!!s.sheenRoughnessMap,le=!!s.specularMap,ce=!!s.specularColorMap,he=!!s.specularIntensityMap,ue=$&&!!s.transmissionMap,de=$&&!!s.thicknessMap,pe=!!s.gradientMap,fe=!!s.alphaMap,me=s.alphaTest>0,ge=!!s.alphaHash,_e=!!s.extensions,ve=!!M.attributes.uv1,xe=!!M.attributes.uv2,ye=!!M.attributes.uv3;let Me=I;return s.toneMapped&&(null!==D&&!0!==D.isXRRenderTarget||(Me=e.toneMapping)),{isWebGL2:p,shaderID:E,shaderType:s.type,shaderName:s.name,vertexShader:R,fragmentShader:C,defines:s.defines,customVertexShaderID:L,customFragmentShaderID:P,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:g,batching:O,instancing:N,instancingColor:N&&null!==x.instanceColor,supportsVertexTextures:m,outputColorSpace:null===D?e.outputColorSpace:!0===D.isXRRenderTarget?D.texture.colorSpace:Xe,map:B,matcap:F,envMap:V,envMapMode:V&&T.mapping,envMapCubeUVHeight:b,aoMap:z,lightMap:G,bumpMap:H,normalMap:k,displacementMap:m&&W,emissiveMap:X,normalMapObjectSpace:k&&1===s.normalMapType,normalMapTangentSpace:k&&0===s.normalMapType,metalnessMap:q,roughnessMap:Y,anisotropy:K,anisotropyMap:ee,clearcoat:Z,clearcoatMap:te,clearcoatNormalMap:ne,clearcoatRoughnessMap:ie,iridescence:J,iridescenceMap:re,iridescenceThicknessMap:ae,sheen:Q,sheenColorMap:se,sheenRoughnessMap:oe,specularMap:le,specularColorMap:ce,specularIntensityMap:he,transmission:$,transmissionMap:ue,thicknessMap:de,gradientMap:pe,opaque:!1===s.transparent&&1===s.blending,alphaMap:fe,alphaTest:me,alphaHash:ge,combine:s.combine,mapUv:B&&getChannel(s.map.channel),aoMapUv:z&&getChannel(s.aoMap.channel),lightMapUv:G&&getChannel(s.lightMap.channel),bumpMapUv:H&&getChannel(s.bumpMap.channel),normalMapUv:k&&getChannel(s.normalMap.channel),displacementMapUv:W&&getChannel(s.displacementMap.channel),emissiveMapUv:X&&getChannel(s.emissiveMap.channel),metalnessMapUv:q&&getChannel(s.metalnessMap.channel),roughnessMapUv:Y&&getChannel(s.roughnessMap.channel),anisotropyMapUv:ee&&getChannel(s.anisotropyMap.channel),clearcoatMapUv:te&&getChannel(s.clearcoatMap.channel),clearcoatNormalMapUv:ne&&getChannel(s.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ie&&getChannel(s.clearcoatRoughnessMap.channel),iridescenceMapUv:re&&getChannel(s.iridescenceMap.channel),iridescenceThicknessMapUv:ae&&getChannel(s.iridescenceThicknessMap.channel),sheenColorMapUv:se&&getChannel(s.sheenColorMap.channel),sheenRoughnessMapUv:oe&&getChannel(s.sheenRoughnessMap.channel),specularMapUv:le&&getChannel(s.specularMap.channel),specularColorMapUv:ce&&getChannel(s.specularColorMap.channel),specularIntensityMapUv:he&&getChannel(s.specularIntensityMap.channel),transmissionMapUv:ue&&getChannel(s.transmissionMap.channel),thicknessMapUv:de&&getChannel(s.thicknessMap.channel),alphaMapUv:fe&&getChannel(s.alphaMap.channel),vertexTangents:!!M.attributes.tangent&&(k||K),vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!M.attributes.color&&4===M.attributes.color.itemSize,vertexUv1s:ve,vertexUv2s:xe,vertexUv3s:ye,pointsUvs:!0===x.isPoints&&!!M.attributes.uv&&(B||fe),fog:!!y,useFog:!0===s.fog,fogExp2:y&&y.isFogExp2,flatShading:!0===s.flatShading,sizeAttenuation:!0===s.sizeAttenuation,logarithmicDepthBuffer:f,skinning:!0===x.isSkinnedMesh,morphTargets:void 0!==M.morphAttributes.position,morphNormals:void 0!==M.morphAttributes.normal,morphColors:void 0!==M.morphAttributes.color,morphTargetsCount:w,morphTextureStride:U,numDirLights:l.directional.length,numPointLights:l.point.length,numSpotLights:l.spot.length,numSpotLightMaps:l.spotLightMap.length,numRectAreaLights:l.rectArea.length,numHemiLights:l.hemi.length,numDirLightShadows:l.directionalShadowMap.length,numPointLightShadows:l.pointShadowMap.length,numSpotLightShadows:l.spotShadowMap.length,numSpotLightShadowsWithMaps:l.numSpotLightShadowsWithMaps,numLightProbes:l.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:s.dithering,shadowMapEnabled:e.shadowMap.enabled&&d.length>0,shadowMapType:e.shadowMap.type,toneMapping:Me,useLegacyLights:e._useLegacyLights,decodeVideoTexture:B&&!0===s.map.isVideoTexture&&Tt.getTransfer(s.map.colorSpace)===Ke,premultipliedAlpha:s.premultipliedAlpha,doubleSided:s.side===h,flipSided:s.side===c,useDepthPacking:s.depthPacking>=0,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:_e&&!0===s.extensions.derivatives,extensionFragDepth:_e&&!0===s.extensions.fragDepth,extensionDrawBuffers:_e&&!0===s.extensions.drawBuffers,extensionShaderTextureLOD:_e&&!0===s.extensions.shaderTextureLOD,extensionClipCullDistance:_e&&s.extensions.clipCullDistance&&r.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:p||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:p||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:p||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function getProgramCacheKey(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function getProgramCacheKeyParameters(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function getProgramCacheKeyBooleans(e,t){l.disableAll(),t.isWebGL2&&l.enable(0);t.supportsVertexTextures&&l.enable(1);t.instancing&&l.enable(2);t.instancingColor&&l.enable(3);t.matcap&&l.enable(4);t.envMap&&l.enable(5);t.normalMapObjectSpace&&l.enable(6);t.normalMapTangentSpace&&l.enable(7);t.clearcoat&&l.enable(8);t.iridescence&&l.enable(9);t.alphaTest&&l.enable(10);t.vertexColors&&l.enable(11);t.vertexAlphas&&l.enable(12);t.vertexUv1s&&l.enable(13);t.vertexUv2s&&l.enable(14);t.vertexUv3s&&l.enable(15);t.vertexTangents&&l.enable(16);t.anisotropy&&l.enable(17);t.alphaHash&&l.enable(18);t.batching&&l.enable(19);e.push(l.mask),l.disableAll(),t.fog&&l.enable(0);t.useFog&&l.enable(1);t.flatShading&&l.enable(2);t.logarithmicDepthBuffer&&l.enable(3);t.skinning&&l.enable(4);t.morphTargets&&l.enable(5);t.morphNormals&&l.enable(6);t.morphColors&&l.enable(7);t.premultipliedAlpha&&l.enable(8);t.shadowMapEnabled&&l.enable(9);t.useLegacyLights&&l.enable(10);t.doubleSided&&l.enable(11);t.flipSided&&l.enable(12);t.useDepthPacking&&l.enable(13);t.dithering&&l.enable(14);t.transmission&&l.enable(15);t.sheen&&l.enable(16);t.opaque&&l.enable(17);t.pointsUvs&&l.enable(18);t.decodeVideoTexture&&l.enable(19);e.push(l.mask)}(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function getUniforms(e){const t=_[e.type];let n;if(t){const e=yi[t];n=ui.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function acquireProgram(t,n){let i;for(let e=0,t=d.length;e<t;e++){const t=d[e];if(t.cacheKey===n){i=t,++i.usedTimes;break}}return void 0===i&&(i=new WebGLProgram(e,n,t,s),d.push(i)),i},releaseProgram:function releaseProgram(e){if(0==--e.usedTimes){const t=d.indexOf(e);d[t]=d[d.length-1],d.pop(),e.destroy()}},releaseShaderCache:function releaseShaderCache(e){u.remove(e)},programs:d,dispose:function dispose(){u.dispose()}}}function WebGLProperties(){let e=new WeakMap;return{get:function get(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function remove(t){e.delete(t)},update:function update(t,n,i){e.get(t)[n]=i},dispose:function dispose(){e=new WeakMap}}}function painterSortStable(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function reversePainterSortStable(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function WebGLRenderList(){const e=[];let t=0;const n=[],i=[],r=[];function getNextRenderItem(n,i,r,a,s,o){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:i,material:r,groupOrder:a,renderOrder:n.renderOrder,z:s,group:o},e[t]=l):(l.id=n.id,l.object=n,l.geometry=i,l.material=r,l.groupOrder=a,l.renderOrder=n.renderOrder,l.z=s,l.group=o),t++,l}return{opaque:n,transmissive:i,transparent:r,init:function init(){t=0,n.length=0,i.length=0,r.length=0},push:function push(e,t,a,s,o,l){const c=getNextRenderItem(e,t,a,s,o,l);a.transmission>0?i.push(c):!0===a.transparent?r.push(c):n.push(c)},unshift:function unshift(e,t,a,s,o,l){const c=getNextRenderItem(e,t,a,s,o,l);a.transmission>0?i.unshift(c):!0===a.transparent?r.unshift(c):n.unshift(c)},finish:function finish(){for(let n=t,i=e.length;n<i;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function sort(e,t){n.length>1&&n.sort(e||painterSortStable),i.length>1&&i.sort(t||reversePainterSortStable),r.length>1&&r.sort(t||reversePainterSortStable)}}}function WebGLRenderLists(){let e=new WeakMap;return{get:function get(t,n){const i=e.get(t);let r;return void 0===i?(r=new WebGLRenderList,e.set(t,[r])):n>=i.length?(r=new WebGLRenderList,i.push(r)):r=i[n],r},dispose:function dispose(){e=new WeakMap}}}function UniformsCache(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new Vector3,color:new Color};break;case"SpotLight":n={position:new Vector3,direction:new Vector3,color:new Color,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Vector3,color:new Color,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Vector3,skyColor:new Color,groundColor:new Color};break;case"RectAreaLight":n={color:new Color,position:new Vector3,halfWidth:new Vector3,halfHeight:new Vector3}}return e[t.id]=n,n}}}let Ki=0;function shadowCastingAndTexturingLightsFirst(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function WebGLLights(e,t){const n=new UniformsCache,r=function ShadowUniformsCache(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),a={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)a.probe.push(new Vector3);const s=new Vector3,o=new Matrix4,l=new Matrix4;return{setup:function setup(s,o){let l=0,c=0,h=0;for(let e=0;e<9;e++)a.probe[e].set(0,0,0);let u=0,d=0,p=0,f=0,m=0,g=0,_=0,v=0,x=0,y=0,M=0;s.sort(shadowCastingAndTexturingLightsFirst);const S=!0===o?Math.PI:1;for(let e=0,t=s.length;e<t;e++){const t=s[e],i=t.color,o=t.intensity,T=t.distance,b=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)l+=i.r*o*S,c+=i.g*o*S,h+=i.b*o*S;else if(t.isLightProbe){for(let e=0;e<9;e++)a.probe[e].addScaledVector(t.sh.coefficients[e],o);M++}else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*S),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,a.directionalShadow[u]=n,a.directionalShadowMap[u]=b,a.directionalShadowMatrix[u]=t.shadow.matrix,g++}a.directional[u]=e,u++}else if(t.isSpotLight){const e=n.get(t);e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(i).multiplyScalar(o*S),e.distance=T,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,a.spot[p]=e;const s=t.shadow;if(t.map&&(a.spotLightMap[x]=t.map,x++,s.updateMatrices(t),t.castShadow&&y++),a.spotLightMatrix[p]=s.matrix,t.castShadow){const e=r.get(t);e.shadowBias=s.bias,e.shadowNormalBias=s.normalBias,e.shadowRadius=s.radius,e.shadowMapSize=s.mapSize,a.spotShadow[p]=e,a.spotShadowMap[p]=b,v++}p++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(i).multiplyScalar(o),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),a.rectArea[f]=e,f++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*S),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,a.pointShadow[d]=n,a.pointShadowMap[d]=b,a.pointShadowMatrix[d]=t.shadow.matrix,_++}a.point[d]=e,d++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(o*S),e.groundColor.copy(t.groundColor).multiplyScalar(o*S),a.hemi[m]=e,m++}}f>0&&(t.isWebGL2?!0===e.has("OES_texture_float_linear")?(a.rectAreaLTC1=xi.LTC_FLOAT_1,a.rectAreaLTC2=xi.LTC_FLOAT_2):(a.rectAreaLTC1=xi.LTC_HALF_1,a.rectAreaLTC2=xi.LTC_HALF_2):!0===e.has("OES_texture_float_linear")?(a.rectAreaLTC1=xi.LTC_FLOAT_1,a.rectAreaLTC2=xi.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(a.rectAreaLTC1=xi.LTC_HALF_1,a.rectAreaLTC2=xi.LTC_HALF_2):i.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),a.ambient[0]=l,a.ambient[1]=c,a.ambient[2]=h;const T=a.hash;T.directionalLength===u&&T.pointLength===d&&T.spotLength===p&&T.rectAreaLength===f&&T.hemiLength===m&&T.numDirectionalShadows===g&&T.numPointShadows===_&&T.numSpotShadows===v&&T.numSpotMaps===x&&T.numLightProbes===M||(a.directional.length=u,a.spot.length=p,a.rectArea.length=f,a.point.length=d,a.hemi.length=m,a.directionalShadow.length=g,a.directionalShadowMap.length=g,a.pointShadow.length=_,a.pointShadowMap.length=_,a.spotShadow.length=v,a.spotShadowMap.length=v,a.directionalShadowMatrix.length=g,a.pointShadowMatrix.length=_,a.spotLightMatrix.length=v+x-y,a.spotLightMap.length=x,a.numSpotLightShadowsWithMaps=y,a.numLightProbes=M,T.directionalLength=u,T.pointLength=d,T.spotLength=p,T.rectAreaLength=f,T.hemiLength=m,T.numDirectionalShadows=g,T.numPointShadows=_,T.numSpotShadows=v,T.numSpotMaps=x,T.numLightProbes=M,a.version=Ki++)},setupView:function setupView(e,t){let n=0,i=0,r=0,c=0,h=0;const u=t.matrixWorldInverse;for(let t=0,d=e.length;t<d;t++){const d=e[t];if(d.isDirectionalLight){const e=a.directional[n];e.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(s),e.direction.transformDirection(u),n++}else if(d.isSpotLight){const e=a.spot[r];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),e.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(s),e.direction.transformDirection(u),r++}else if(d.isRectAreaLight){const e=a.rectArea[c];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),l.identity(),o.copy(d.matrixWorld),o.premultiply(u),l.extractRotation(o),e.halfWidth.set(.5*d.width,0,0),e.halfHeight.set(0,.5*d.height,0),e.halfWidth.applyMatrix4(l),e.halfHeight.applyMatrix4(l),c++}else if(d.isPointLight){const e=a.point[i];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),i++}else if(d.isHemisphereLight){const e=a.hemi[h];e.direction.setFromMatrixPosition(d.matrixWorld),e.direction.transformDirection(u),h++}}},state:a}}function WebGLRenderState(e,t){const n=new WebGLLights(e,t),i=[],r=[];return{init:function init(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:function setupLights(e){n.setup(i,e)},setupLightsView:function setupLightsView(e){n.setupView(i,e)},pushLight:function pushLight(e){i.push(e)},pushShadow:function pushShadow(e){r.push(e)}}}function WebGLRenderStates(e,t){let n=new WeakMap;return{get:function get(i,r=0){const a=n.get(i);let s;return void 0===a?(s=new WebGLRenderState(e,t),n.set(i,[s])):r>=a.length?(s=new WebGLRenderState(e,t),a.push(s)):s=a[r],s},dispose:function dispose(){n=new WeakMap}}}class MeshDepthMaterial extends Material{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class MeshDistanceMaterial extends Material{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function WebGLShadowMap(e,t,n){let r=new Frustum;const s=new Vector2,d=new Vector2,p=new Vector4,f=new MeshDepthMaterial({depthPacking:3201}),m=new MeshDistanceMaterial,g={},_=n.maxTextureSize,v={[l]:c,[c]:l,[h]:h},x=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),y=x.clone();y.defines.HORIZONTAL_PASS=1;const M=new BufferGeometry;M.setAttribute("position",new BufferAttribute(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const S=new Mesh(M,x),T=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=a;let b=this.type;function VSMPass(n,i){const r=t.update(S);x.defines.VSM_SAMPLES!==n.blurSamples&&(x.defines.VSM_SAMPLES=n.blurSamples,y.defines.VSM_SAMPLES=n.blurSamples,x.needsUpdate=!0,y.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new WebGLRenderTarget(s.x,s.y)),x.uniforms.shadow_pass.value=n.map.texture,x.uniforms.resolution.value=n.mapSize,x.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(i,null,r,x,S,null),y.uniforms.shadow_pass.value=n.mapPass.texture,y.uniforms.resolution.value=n.mapSize,y.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(i,null,r,y,S,null)}function getDepthMaterial(t,n,i,r){let a=null;const s=!0===i.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)a=s;else if(a=!0===i.isPointLight?m:f,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=a.uuid,t=n.uuid;let i=g[e];void 0===i&&(i={},g[e]=i);let r=i[t];void 0===r&&(r=a.clone(),i[t]=r,n.addEventListener("dispose",onMaterialDispose)),a=r}if(a.visible=n.visible,a.wireframe=n.wireframe,a.side=r===o?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:v[n.side],a.alphaMap=n.alphaMap,a.alphaTest=n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===i.isPointLight&&!0===a.isMeshDistanceMaterial){e.properties.get(a).light=i}return a}function renderObject(n,i,a,s,l){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&l===o)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);const r=t.update(n),o=n.material;if(Array.isArray(o)){const t=r.groups;for(let c=0,h=t.length;c<h;c++){const h=t[c],u=o[h.materialIndex];if(u&&u.visible){const t=getDepthMaterial(n,u,s,l);n.onBeforeShadow(e,n,i,a,r,t,h),e.renderBufferDirect(a,null,r,t,n,h),n.onAfterShadow(e,n,i,a,r,t,h)}}}else if(o.visible){const t=getDepthMaterial(n,o,s,l);n.onBeforeShadow(e,n,i,a,r,t,null),e.renderBufferDirect(a,null,r,t,n,null),n.onAfterShadow(e,n,i,a,r,t,null)}}const c=n.children;for(let e=0,t=c.length;e<t;e++)renderObject(c[e],i,a,s,l)}function onMaterialDispose(e){e.target.removeEventListener("dispose",onMaterialDispose);for(const t in g){const n=g[t],i=e.target.uuid;if(i in n){n[i].dispose(),delete n[i]}}}this.render=function(t,n,a){if(!1===T.enabled)return;if(!1===T.autoUpdate&&!1===T.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),c=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),f=e.state;f.setBlending(u),f.buffers.color.setClear(1,1,1,1),f.buffers.depth.setTest(!0),f.setScissorTest(!1);const m=b!==o&&this.type===o,g=b===o&&this.type!==o;for(let l=0,c=t.length;l<c;l++){const c=t[l],h=c.shadow;if(void 0===h){i.warn("THREE.WebGLShadowMap:",c,"has no shadow.");continue}if(!1===h.autoUpdate&&!1===h.needsUpdate)continue;s.copy(h.mapSize);const u=h.getFrameExtents();if(s.multiply(u),d.copy(h.mapSize),(s.x>_||s.y>_)&&(s.x>_&&(d.x=Math.floor(_/u.x),s.x=d.x*u.x,h.mapSize.x=d.x),s.y>_&&(d.y=Math.floor(_/u.y),s.y=d.y*u.y,h.mapSize.y=d.y)),null===h.map||!0===m||!0===g){const e=this.type!==o?{minFilter:Z,magFilter:Z}:{};null!==h.map&&h.map.dispose(),h.map=new WebGLRenderTarget(s.x,s.y,e),h.map.texture.name=c.name+".shadowMap",h.camera.updateProjectionMatrix()}e.setRenderTarget(h.map),e.clear();const v=h.getViewportCount();for(let e=0;e<v;e++){const t=h.getViewport(e);p.set(d.x*t.x,d.y*t.y,d.x*t.z,d.y*t.w),f.viewport(p),h.updateMatrices(c,e),r=h.getFrustum(),renderObject(n,a,h.camera,c,this.type)}!0!==h.isPointLightShadow&&this.type===o&&VSMPass(h,a),h.needsUpdate=!1}b=this.type,T.needsUpdate=!1,e.setRenderTarget(l,c,h)}}function WebGLState(e,t,n){const r=n.isWebGL2;const a=new function ColorBuffer(){let t=!1;const n=new Vector4;let i=null;const r=new Vector4(0,0,0,0);return{setMask:function(n){i===n||t||(e.colorMask(n,n,n,n),i=n)},setLocked:function(e){t=e},setClear:function(t,i,a,s,o){!0===o&&(t*=s,i*=s,a*=s),n.set(t,i,a,s),!1===r.equals(n)&&(e.clearColor(t,i,a,s),r.copy(n))},reset:function(){t=!1,i=null,r.set(-1,0,0,0)}}},s=new function DepthBuffer(){let t=!1,n=null,i=null,r=null;return{setTest:function(t){t?enable(e.DEPTH_TEST):disable(e.DEPTH_TEST)},setMask:function(i){n===i||t||(e.depthMask(i),n=i)},setFunc:function(t){if(i!==t){switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:default:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL)}i=t}},setLocked:function(e){t=e},setClear:function(t){r!==t&&(e.clearDepth(t),r=t)},reset:function(){t=!1,n=null,i=null,r=null}}},o=new function StencilBuffer(){let t=!1,n=null,i=null,r=null,a=null,s=null,o=null,l=null,c=null;return{setTest:function(n){t||(n?enable(e.STENCIL_TEST):disable(e.STENCIL_TEST))},setMask:function(i){n===i||t||(e.stencilMask(i),n=i)},setFunc:function(t,n,s){i===t&&r===n&&a===s||(e.stencilFunc(t,n,s),i=t,r=n,a=s)},setOp:function(t,n,i){s===t&&o===n&&l===i||(e.stencilOp(t,n,i),s=t,o=n,l=i)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,i=null,r=null,a=null,s=null,o=null,l=null,c=null}}},l=new WeakMap,L=new WeakMap;let P={},U={},I=new WeakMap,D=[],N=null,O=!1,B=null,F=null,V=null,z=null,G=null,H=null,k=null,W=new Color(0,0,0),X=0,j=!1,q=null,Y=null,K=null,Z=null,J=null;const Q=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let $=!1,ee=0;const te=e.getParameter(e.VERSION);-1!==te.indexOf("WebGL")?(ee=parseFloat(/^WebGL (\d)/.exec(te)[1]),$=ee>=1):-1!==te.indexOf("OpenGL ES")&&(ee=parseFloat(/^OpenGL ES (\d)/.exec(te)[1]),$=ee>=2);let ne=null,ie={};const re=e.getParameter(e.SCISSOR_BOX),ae=e.getParameter(e.VIEWPORT),se=(new Vector4).fromArray(re),oe=(new Vector4).fromArray(ae);function createTexture(t,n,i,a){const s=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;o<i;o++)!r||t!==e.TEXTURE_3D&&t!==e.TEXTURE_2D_ARRAY?e.texImage2D(n+o,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,s):e.texImage3D(n,0,e.RGBA,1,1,a,0,e.RGBA,e.UNSIGNED_BYTE,s);return o}const le={};function enable(t){!0!==P[t]&&(e.enable(t),P[t]=!0)}function disable(t){!1!==P[t]&&(e.disable(t),P[t]=!1)}le[e.TEXTURE_2D]=createTexture(e.TEXTURE_2D,e.TEXTURE_2D,1),le[e.TEXTURE_CUBE_MAP]=createTexture(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),r&&(le[e.TEXTURE_2D_ARRAY]=createTexture(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),le[e.TEXTURE_3D]=createTexture(e.TEXTURE_3D,e.TEXTURE_3D,1,1)),a.setClear(0,0,0,1),s.setClear(1),o.setClear(0),enable(e.DEPTH_TEST),s.setFunc(3),setFlipSided(!1),setCullFace(1),enable(e.CULL_FACE),setBlending(u);const ce={[d]:e.FUNC_ADD,[p]:e.FUNC_SUBTRACT,[f]:e.FUNC_REVERSE_SUBTRACT};if(r)ce[103]=e.MIN,ce[104]=e.MAX;else{const e=t.get("EXT_blend_minmax");null!==e&&(ce[103]=e.MIN_EXT,ce[104]=e.MAX_EXT)}const he={[m]:e.ZERO,[g]:e.ONE,[_]:e.SRC_COLOR,[x]:e.SRC_ALPHA,[E]:e.SRC_ALPHA_SATURATE,[T]:e.DST_COLOR,[M]:e.DST_ALPHA,[v]:e.ONE_MINUS_SRC_COLOR,[y]:e.ONE_MINUS_SRC_ALPHA,[b]:e.ONE_MINUS_DST_COLOR,[S]:e.ONE_MINUS_DST_ALPHA,[A]:e.CONSTANT_COLOR,[w]:e.ONE_MINUS_CONSTANT_COLOR,[R]:e.CONSTANT_ALPHA,[C]:e.ONE_MINUS_CONSTANT_ALPHA};function setBlending(t,n,r,a,s,o,l,c,h,p){if(t!==u){if(!1===O&&(enable(e.BLEND),O=!0),5===t)s=s||n,o=o||r,l=l||a,n===F&&s===G||(e.blendEquationSeparate(ce[n],ce[s]),F=n,G=s),r===V&&a===z&&o===H&&l===k||(e.blendFuncSeparate(he[r],he[a],he[o],he[l]),V=r,z=a,H=o,k=l),!1!==c.equals(W)&&h===X||(e.blendColor(c.r,c.g,c.b,h),W.copy(c),X=h),B=t,j=!1;else if(t!==B||p!==j){if(F===d&&G===d||(e.blendEquation(e.FUNC_ADD),F=d,G=d),p)switch(t){case 1:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.ONE,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA);break;default:i.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.SRC_ALPHA,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFunc(e.ZERO,e.SRC_COLOR);break;default:i.error("THREE.WebGLState: Invalid blending: ",t)}V=null,z=null,H=null,k=null,W.set(0,0,0),X=0,B=t,j=p}}else!0===O&&(disable(e.BLEND),O=!1)}function setFlipSided(t){q!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),q=t)}function setCullFace(t){0!==t?(enable(e.CULL_FACE),t!==Y&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):disable(e.CULL_FACE),Y=t}function setPolygonOffset(t,n,i){t?(enable(e.POLYGON_OFFSET_FILL),Z===n&&J===i||(e.polygonOffset(n,i),Z=n,J=i)):disable(e.POLYGON_OFFSET_FILL)}return{buffers:{color:a,depth:s,stencil:o},enable,disable,bindFramebuffer:function bindFramebuffer(t,n){return U[t]!==n&&(e.bindFramebuffer(t,n),U[t]=n,r&&(t===e.DRAW_FRAMEBUFFER&&(U[e.FRAMEBUFFER]=n),t===e.FRAMEBUFFER&&(U[e.DRAW_FRAMEBUFFER]=n)),!0)},drawBuffers:function drawBuffers(i,r){let a=D,s=!1;if(i)if(a=I.get(r),void 0===a&&(a=[],I.set(r,a)),i.isWebGLMultipleRenderTargets){const t=i.texture;if(a.length!==t.length||a[0]!==e.COLOR_ATTACHMENT0){for(let n=0,i=t.length;n<i;n++)a[n]=e.COLOR_ATTACHMENT0+n;a.length=t.length,s=!0}}else a[0]!==e.COLOR_ATTACHMENT0&&(a[0]=e.COLOR_ATTACHMENT0,s=!0);else a[0]!==e.BACK&&(a[0]=e.BACK,s=!0);s&&(n.isWebGL2?e.drawBuffers(a):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(a))},useProgram:function useProgram(t){return N!==t&&(e.useProgram(t),N=t,!0)},setBlending,setMaterial:function setMaterial(t,n){t.side===h?disable(e.CULL_FACE):enable(e.CULL_FACE);let i=t.side===c;n&&(i=!i),setFlipSided(i),1===t.blending&&!1===t.transparent?setBlending(u):setBlending(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.blendColor,t.blendAlpha,t.premultipliedAlpha),s.setFunc(t.depthFunc),s.setTest(t.depthTest),s.setMask(t.depthWrite),a.setMask(t.colorWrite);const r=t.stencilWrite;o.setTest(r),r&&(o.setMask(t.stencilWriteMask),o.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),o.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),setPolygonOffset(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?enable(e.SAMPLE_ALPHA_TO_COVERAGE):disable(e.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided,setCullFace,setLineWidth:function setLineWidth(t){t!==K&&($&&e.lineWidth(t),K=t)},setPolygonOffset,setScissorTest:function setScissorTest(t){t?enable(e.SCISSOR_TEST):disable(e.SCISSOR_TEST)},activeTexture:function activeTexture(t){void 0===t&&(t=e.TEXTURE0+Q-1),ne!==t&&(e.activeTexture(t),ne=t)},bindTexture:function bindTexture(t,n,i){void 0===i&&(i=null===ne?e.TEXTURE0+Q-1:ne);let r=ie[i];void 0===r&&(r={type:void 0,texture:void 0},ie[i]=r),r.type===t&&r.texture===n||(ne!==i&&(e.activeTexture(i),ne=i),e.bindTexture(t,n||le[t]),r.type=t,r.texture=n)},unbindTexture:function unbindTexture(){const t=ie[ne];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function compressedTexImage2D(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},compressedTexImage3D:function compressedTexImage3D(){try{e.compressedTexImage3D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},texImage2D:function texImage2D(){try{e.texImage2D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},texImage3D:function texImage3D(){try{e.texImage3D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},updateUBOMapping:function updateUBOMapping(t,n){let i=L.get(n);void 0===i&&(i=new WeakMap,L.set(n,i));let r=i.get(t);void 0===r&&(r=e.getUniformBlockIndex(n,t.name),i.set(t,r))},uniformBlockBinding:function uniformBlockBinding(t,n){const i=L.get(n).get(t);l.get(n)!==i&&(e.uniformBlockBinding(n,i,t.__bindingPointIndex),l.set(n,i))},texStorage2D:function texStorage2D(){try{e.texStorage2D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},texStorage3D:function texStorage3D(){try{e.texStorage3D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},texSubImage2D:function texSubImage2D(){try{e.texSubImage2D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},texSubImage3D:function texSubImage3D(){try{e.texSubImage3D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},compressedTexSubImage2D:function compressedTexSubImage2D(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},compressedTexSubImage3D:function compressedTexSubImage3D(){try{e.compressedTexSubImage3D.apply(e,arguments)}catch(e){i.error("THREE.WebGLState:",e)}},scissor:function scissor(t){!1===se.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),se.copy(t))},viewport:function viewport(t){!1===oe.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),oe.copy(t))},reset:function reset(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.blendColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),!0===r&&(e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),P={},ne=null,ie={},U={},I=new WeakMap,D=[],N=null,O=!1,B=null,F=null,V=null,z=null,G=null,H=null,k=null,W=new Color(0,0,0),X=0,j=!1,q=null,Y=null,K=null,Z=null,J=null,se.set(0,0,e.canvas.width,e.canvas.height),oe.set(0,0,e.canvas.width,e.canvas.height),a.reset(),s.reset(),o.reset()}}}function WebGLTextures(e,t,n,r,a,s,o){const l=a.isWebGL2,c=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,h="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),u=new WeakMap;let d;const p=new WeakMap;let f=!1;try{f="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function createCanvas(e,t){return f?new OffscreenCanvas(e,t):createElementNS("canvas")}function resizeImage(e,t,n,r){let a=1;if((e.width>r||e.height>r)&&(a=r/Math.max(e.width,e.height)),a<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?floorPowerOfTwo:Math.floor,s=r(a*e.width),o=r(a*e.height);void 0===d&&(d=createCanvas(s,o));const l=n?createCanvas(s,o):d;l.width=s,l.height=o;return l.getContext("2d").drawImage(e,0,0,s,o),i.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+s+"x"+o+")."),l}return"data"in e&&i.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function isPowerOfTwo$1(e){return isPowerOfTwo(e.width)&&isPowerOfTwo(e.height)}function textureNeedsGenerateMipmaps(e,t){return e.generateMipmaps&&t&&e.minFilter!==Z&&e.minFilter!==$}function generateMipmap(t){e.generateMipmap(t)}function getInternalFormat(n,r,a,s,o=!1){if(!1===l)return r;if(null!==n){if(void 0!==e[n])return e[n];i.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let c=r;if(r===e.RED&&(a===e.FLOAT&&(c=e.R32F),a===e.HALF_FLOAT&&(c=e.R16F),a===e.UNSIGNED_BYTE&&(c=e.R8)),r===e.RED_INTEGER&&(a===e.UNSIGNED_BYTE&&(c=e.R8UI),a===e.UNSIGNED_SHORT&&(c=e.R16UI),a===e.UNSIGNED_INT&&(c=e.R32UI),a===e.BYTE&&(c=e.R8I),a===e.SHORT&&(c=e.R16I),a===e.INT&&(c=e.R32I)),r===e.RG&&(a===e.FLOAT&&(c=e.RG32F),a===e.HALF_FLOAT&&(c=e.RG16F),a===e.UNSIGNED_BYTE&&(c=e.RG8)),r===e.RGBA){const t=o?Ye:Tt.getTransfer(s);a===e.FLOAT&&(c=e.RGBA32F),a===e.HALF_FLOAT&&(c=e.RGBA16F),a===e.UNSIGNED_BYTE&&(c=t===Ke?e.SRGB8_ALPHA8:e.RGBA8),a===e.UNSIGNED_SHORT_4_4_4_4&&(c=e.RGBA4),a===e.UNSIGNED_SHORT_5_5_5_1&&(c=e.RGB5_A1)}return c!==e.R16F&&c!==e.R32F&&c!==e.RG16F&&c!==e.RG32F&&c!==e.RGBA16F&&c!==e.RGBA32F||t.get("EXT_color_buffer_float"),c}function getMipLevels(e,t,n){return!0===textureNeedsGenerateMipmaps(e,n)||e.isFramebufferTexture&&e.minFilter!==Z&&e.minFilter!==$?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function filterFallback(t){return t===Z||t===J||t===Q?e.NEAREST:e.LINEAR}function onTextureDispose(e){const t=e.target;t.removeEventListener("dispose",onTextureDispose),function deallocateTexture(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=p.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&deleteTexture(e),0===Object.keys(i).length&&p.delete(n)}r.remove(e)}(t),t.isVideoTexture&&u.delete(t)}function onRenderTargetDispose(t){const n=t.target;n.removeEventListener("dispose",onRenderTargetDispose),function deallocateRenderTarget(t){const n=t.texture,i=r.get(t),a=r.get(n);void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),o.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(i.__webglFramebuffer[t]))for(let n=0;n<i.__webglFramebuffer[t].length;n++)e.deleteFramebuffer(i.__webglFramebuffer[t][n]);else e.deleteFramebuffer(i.__webglFramebuffer[t]);i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t])}else{if(Array.isArray(i.__webglFramebuffer))for(let t=0;t<i.__webglFramebuffer.length;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]);else e.deleteFramebuffer(i.__webglFramebuffer);if(i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer)for(let t=0;t<i.__webglColorRenderbuffer.length;t++)i.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(i.__webglColorRenderbuffer[t]);i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer)}if(t.isWebGLMultipleRenderTargets)for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);i.__webglTexture&&(e.deleteTexture(i.__webglTexture),o.memory.textures--),r.remove(n[t])}r.remove(n),r.remove(t)}(n)}function deleteTexture(t){const n=r.get(t);e.deleteTexture(n.__webglTexture);const i=t.source;delete p.get(i)[n.__cacheKey],o.memory.textures--}let m=0;function setTexture2D(t,a){const s=r.get(t);if(t.isVideoTexture&&function updateVideoTexture(e){const t=o.render.frame;u.get(e)!==t&&(u.set(e,t),e.update())}(t),!1===t.isRenderTargetTexture&&t.version>0&&s.__version!==t.version){const e=t.image;if(null===e)i.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void uploadTexture(s,t,a);i.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(e.TEXTURE_2D,s.__webglTexture,e.TEXTURE0+a)}const g={[q]:e.REPEAT,[Y]:e.CLAMP_TO_EDGE,[K]:e.MIRRORED_REPEAT},_={[Z]:e.NEAREST,[J]:e.NEAREST_MIPMAP_NEAREST,[Q]:e.NEAREST_MIPMAP_LINEAR,[$]:e.LINEAR,[ee]:e.LINEAR_MIPMAP_NEAREST,[te]:e.LINEAR_MIPMAP_LINEAR},v={[$e]:e.NEVER,[st]:e.ALWAYS,[et]:e.LESS,[nt]:e.LEQUAL,[tt]:e.EQUAL,[at]:e.GEQUAL,[it]:e.GREATER,[rt]:e.NOTEQUAL};function setTextureParameters(n,s,o){if(o?(e.texParameteri(n,e.TEXTURE_WRAP_S,g[s.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,g[s.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,g[s.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,_[s.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,_[s.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),s.wrapS===Y&&s.wrapT===Y||i.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,e.TEXTURE_MAG_FILTER,filterFallback(s.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,filterFallback(s.minFilter)),s.minFilter!==Z&&s.minFilter!==$&&i.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),s.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,v[s.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){const i=t.get("EXT_texture_filter_anisotropic");if(s.magFilter===Z)return;if(s.minFilter!==Q&&s.minFilter!==te)return;if(s.type===ce&&!1===t.has("OES_texture_float_linear"))return;if(!1===l&&s.type===he&&!1===t.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||r.get(s).__currentAnisotropy)&&(e.texParameterf(n,i.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,a.getMaxAnisotropy())),r.get(s).__currentAnisotropy=s.anisotropy)}}function initTexture(t,n){let i=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",onTextureDispose));const r=n.source;let a=p.get(r);void 0===a&&(a={},p.set(r,a));const s=function getTextureCacheKey(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(s!==t.__cacheKey){void 0===a[s]&&(a[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,i=!0),a[s].usedTimes++;const r=a[t.__cacheKey];void 0!==r&&(a[t.__cacheKey].usedTimes--,0===r.usedTimes&&deleteTexture(n)),t.__cacheKey=s,t.__webglTexture=a[s].texture}return i}function uploadTexture(t,o,c){let h=e.TEXTURE_2D;(o.isDataArrayTexture||o.isCompressedArrayTexture)&&(h=e.TEXTURE_2D_ARRAY),o.isData3DTexture&&(h=e.TEXTURE_3D);const u=initTexture(t,o),d=o.source;n.bindTexture(h,t.__webglTexture,e.TEXTURE0+c);const p=r.get(d);if(d.version!==p.__version||!0===u){n.activeTexture(e.TEXTURE0+c);const t=Tt.getPrimaries(Tt.workingColorSpace),r=o.colorSpace===ke?null:Tt.getPrimaries(o.colorSpace),f=o.colorSpace===ke||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,f);const m=function textureNeedsPowerOfTwo(e){return!l&&(e.wrapS!==Y||e.wrapT!==Y||e.minFilter!==Z&&e.minFilter!==$)}(o)&&!1===isPowerOfTwo$1(o.image);let g=resizeImage(o.image,m,!1,a.maxTextureSize);g=verifyColorSpace(o,g);const _=isPowerOfTwo$1(g)||l,v=s.convert(o.format,o.colorSpace);let x,y=s.convert(o.type),M=getInternalFormat(o.internalFormat,v,y,o.colorSpace,o.isVideoTexture);setTextureParameters(h,o,_);const S=o.mipmaps,T=l&&!0!==o.isVideoTexture&&M!==Te,b=void 0===p.__version||!0===u,E=getMipLevels(o,g,_);if(o.isDepthTexture)M=e.DEPTH_COMPONENT,l?M=o.type===ce?e.DEPTH_COMPONENT32F:o.type===le?e.DEPTH_COMPONENT24:o.type===ue?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:o.type===ce&&i.error("WebGLRenderer: Floating point depth texture requires WebGL2."),o.format===pe&&M===e.DEPTH_COMPONENT&&o.type!==se&&o.type!==le&&(i.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),o.type=le,y=s.convert(o.type)),o.format===fe&&M===e.DEPTH_COMPONENT&&(M=e.DEPTH_STENCIL,o.type!==ue&&(i.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),o.type=ue,y=s.convert(o.type))),b&&(T?n.texStorage2D(e.TEXTURE_2D,1,M,g.width,g.height):n.texImage2D(e.TEXTURE_2D,0,M,g.width,g.height,0,v,y,null));else if(o.isDataTexture)if(S.length>0&&_){T&&b&&n.texStorage2D(e.TEXTURE_2D,E,M,S[0].width,S[0].height);for(let t=0,i=S.length;t<i;t++)x=S[t],T?n.texSubImage2D(e.TEXTURE_2D,t,0,0,x.width,x.height,v,y,x.data):n.texImage2D(e.TEXTURE_2D,t,M,x.width,x.height,0,v,y,x.data);o.generateMipmaps=!1}else T?(b&&n.texStorage2D(e.TEXTURE_2D,E,M,g.width,g.height),n.texSubImage2D(e.TEXTURE_2D,0,0,0,g.width,g.height,v,y,g.data)):n.texImage2D(e.TEXTURE_2D,0,M,g.width,g.height,0,v,y,g.data);else if(o.isCompressedTexture)if(o.isCompressedArrayTexture){T&&b&&n.texStorage3D(e.TEXTURE_2D_ARRAY,E,M,S[0].width,S[0].height,g.depth);for(let t=0,r=S.length;t<r;t++)x=S[t],o.format!==de?null!==v?T?n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,x.width,x.height,g.depth,v,x.data,0,0):n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,t,M,x.width,x.height,g.depth,0,x.data,0,0):i.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):T?n.texSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,x.width,x.height,g.depth,v,y,x.data):n.texImage3D(e.TEXTURE_2D_ARRAY,t,M,x.width,x.height,g.depth,0,v,y,x.data)}else{T&&b&&n.texStorage2D(e.TEXTURE_2D,E,M,S[0].width,S[0].height);for(let t=0,r=S.length;t<r;t++)x=S[t],o.format!==de?null!==v?T?n.compressedTexSubImage2D(e.TEXTURE_2D,t,0,0,x.width,x.height,v,x.data):n.compressedTexImage2D(e.TEXTURE_2D,t,M,x.width,x.height,0,x.data):i.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):T?n.texSubImage2D(e.TEXTURE_2D,t,0,0,x.width,x.height,v,y,x.data):n.texImage2D(e.TEXTURE_2D,t,M,x.width,x.height,0,v,y,x.data)}else if(o.isDataArrayTexture)T?(b&&n.texStorage3D(e.TEXTURE_2D_ARRAY,E,M,g.width,g.height,g.depth),n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,g.width,g.height,g.depth,v,y,g.data)):n.texImage3D(e.TEXTURE_2D_ARRAY,0,M,g.width,g.height,g.depth,0,v,y,g.data);else if(o.isData3DTexture)T?(b&&n.texStorage3D(e.TEXTURE_3D,E,M,g.width,g.height,g.depth),n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,g.width,g.height,g.depth,v,y,g.data)):n.texImage3D(e.TEXTURE_3D,0,M,g.width,g.height,g.depth,0,v,y,g.data);else if(o.isFramebufferTexture){if(b)if(T)n.texStorage2D(e.TEXTURE_2D,E,M,g.width,g.height);else{let t=g.width,i=g.height;for(let r=0;r<E;r++)n.texImage2D(e.TEXTURE_2D,r,M,t,i,0,v,y,null),t>>=1,i>>=1}}else if(S.length>0&&_){T&&b&&n.texStorage2D(e.TEXTURE_2D,E,M,S[0].width,S[0].height);for(let t=0,i=S.length;t<i;t++)x=S[t],T?n.texSubImage2D(e.TEXTURE_2D,t,0,0,v,y,x):n.texImage2D(e.TEXTURE_2D,t,M,v,y,x);o.generateMipmaps=!1}else T?(b&&n.texStorage2D(e.TEXTURE_2D,E,M,g.width,g.height),n.texSubImage2D(e.TEXTURE_2D,0,0,0,v,y,g)):n.texImage2D(e.TEXTURE_2D,0,M,v,y,g);textureNeedsGenerateMipmaps(o,_)&&generateMipmap(h),p.__version=d.version,o.onUpdate&&o.onUpdate(o)}t.__version=o.version}function setupFrameBufferTexture(t,i,a,o,l,h){const u=s.convert(a.format,a.colorSpace),d=s.convert(a.type),p=getInternalFormat(a.internalFormat,u,d,a.colorSpace);if(!r.get(i).__hasExternalTextures){const t=Math.max(1,i.width>>h),r=Math.max(1,i.height>>h);l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,h,p,t,r,i.depth,0,u,d,null):n.texImage2D(l,h,p,t,r,0,u,d,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),useMultisampledRTT(i)?c.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,o,l,r.get(a).__webglTexture,0,getRenderTargetSamples(i)):(l===e.TEXTURE_2D||l>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,o,l,r.get(a).__webglTexture,h),n.bindFramebuffer(e.FRAMEBUFFER,null)}function setupRenderBufferStorage(t,n,i){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let r=!0===l?e.DEPTH_COMPONENT24:e.DEPTH_COMPONENT16;if(i||useMultisampledRTT(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===ce?r=e.DEPTH_COMPONENT32F:t.type===le&&(r=e.DEPTH_COMPONENT24));const i=getRenderTargetSamples(n);useMultisampledRTT(n)?c.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,r,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,i,r,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,r,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){const r=getRenderTargetSamples(n);i&&!1===useMultisampledRTT(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,n.width,n.height):useMultisampledRTT(n)?c.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let r=0;r<t.length;r++){const a=t[r],o=s.convert(a.format,a.colorSpace),l=s.convert(a.type),h=getInternalFormat(a.internalFormat,o,l,a.colorSpace),u=getRenderTargetSamples(n);i&&!1===useMultisampledRTT(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,u,h,n.width,n.height):useMultisampledRTT(n)?c.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,u,h,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,h,n.width,n.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function setupDepthRenderbuffer(t){const i=r.get(t),a=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(a)throw new Error("target.depthTexture not supported in Cube render targets");!function setupDepthTexture(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(e.FRAMEBUFFER,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),setTexture2D(i.depthTexture,0);const a=r.get(i.depthTexture).__webglTexture,s=getRenderTargetSamples(i);if(i.depthTexture.format===pe)useMultisampledRTT(i)?c.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a,0);else{if(i.depthTexture.format!==fe)throw new Error("Unknown depthTexture format");useMultisampledRTT(i)?c.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,a,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,a,0)}}(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),setupRenderBufferStorage(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),setupRenderBufferStorage(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(e.FRAMEBUFFER,null)}function getRenderTargetSamples(e){return Math.min(a.maxSamples,e.samples)}function useMultisampledRTT(e){const n=r.get(e);return l&&e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function verifyColorSpace(e,n){const r=e.colorSpace,a=e.format,s=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===ct||r!==Xe&&r!==ke&&(Tt.getTransfer(r)===Ke?!1===l?!0===t.has("EXT_sRGB")&&a===de?(e.format=ct,e.minFilter=$,e.generateMipmaps=!1):n=ImageUtils.sRGBToLinear(n):a===de&&s===ie||i.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):i.error("THREE.WebGLTextures: Unsupported texture color space:",r)),n}this.allocateTextureUnit=function allocateTextureUnit(){const e=m;return e>=a.maxTextures&&i.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+a.maxTextures),m+=1,e},this.resetTextureUnits=function resetTextureUnits(){m=0},this.setTexture2D=setTexture2D,this.setTexture2DArray=function setTexture2DArray(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?uploadTexture(a,t,i):n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function setTexture3D(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?uploadTexture(a,t,i):n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function setTextureCube(t,o){const c=r.get(t);t.version>0&&c.__version!==t.version?function uploadCubeTexture(t,o,c){if(6!==o.image.length)return;const h=initTexture(t,o),u=o.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+c);const d=r.get(u);if(u.version!==d.__version||!0===h){n.activeTexture(e.TEXTURE0+c);const t=Tt.getPrimaries(Tt.workingColorSpace),r=o.colorSpace===ke?null:Tt.getPrimaries(o.colorSpace),p=o.colorSpace===ke||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,p);const f=o.isCompressedTexture||o.image[0].isCompressedTexture,m=o.image[0]&&o.image[0].isDataTexture,g=[];for(let e=0;e<6;e++)g[e]=f||m?m?o.image[e].image:o.image[e]:resizeImage(o.image[e],!1,!0,a.maxCubemapSize),g[e]=verifyColorSpace(o,g[e]);const _=g[0],v=isPowerOfTwo$1(_)||l,x=s.convert(o.format,o.colorSpace),y=s.convert(o.type),M=getInternalFormat(o.internalFormat,x,y,o.colorSpace),S=l&&!0!==o.isVideoTexture,T=void 0===d.__version||!0===h;let b,E=getMipLevels(o,_,v);if(setTextureParameters(e.TEXTURE_CUBE_MAP,o,v),f){S&&T&&n.texStorage2D(e.TEXTURE_CUBE_MAP,E,M,_.width,_.height);for(let t=0;t<6;t++){b=g[t].mipmaps;for(let r=0;r<b.length;r++){const a=b[r];o.format!==de?null!==x?S?n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,a.width,a.height,x,a.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,M,a.width,a.height,0,a.data):i.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):S?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,a.width,a.height,x,y,a.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,M,a.width,a.height,0,x,y,a.data)}}}else{b=o.mipmaps,S&&T&&(b.length>0&&E++,n.texStorage2D(e.TEXTURE_CUBE_MAP,E,M,g[0].width,g[0].height));for(let t=0;t<6;t++)if(m){S?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,g[t].width,g[t].height,x,y,g[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,M,g[t].width,g[t].height,0,x,y,g[t].data);for(let i=0;i<b.length;i++){const r=b[i].image[t].image;S?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,0,0,r.width,r.height,x,y,r.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,M,r.width,r.height,0,x,y,r.data)}}else{S?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,x,y,g[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,M,x,y,g[t]);for(let i=0;i<b.length;i++){const r=b[i];S?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,0,0,x,y,r.image[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,M,x,y,r.image[t])}}}textureNeedsGenerateMipmaps(o,v)&&generateMipmap(e.TEXTURE_CUBE_MAP),d.__version=u.version,o.onUpdate&&o.onUpdate(o)}t.__version=o.version}(c,t,o):n.bindTexture(e.TEXTURE_CUBE_MAP,c.__webglTexture,e.TEXTURE0+o)},this.rebindTextures=function rebindTextures(t,n,i){const a=r.get(t);void 0!==n&&setupFrameBufferTexture(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),void 0!==i&&setupDepthRenderbuffer(t)},this.setupRenderTarget=function setupRenderTarget(t){const c=t.texture,h=r.get(t),u=r.get(c);t.addEventListener("dispose",onRenderTargetDispose),!0!==t.isWebGLMultipleRenderTargets&&(void 0===u.__webglTexture&&(u.__webglTexture=e.createTexture()),u.__version=c.version,o.memory.textures++);const d=!0===t.isWebGLCubeRenderTarget,p=!0===t.isWebGLMultipleRenderTargets,f=isPowerOfTwo$1(t)||l;if(d){h.__webglFramebuffer=[];for(let t=0;t<6;t++)if(l&&c.mipmaps&&c.mipmaps.length>0){h.__webglFramebuffer[t]=[];for(let n=0;n<c.mipmaps.length;n++)h.__webglFramebuffer[t][n]=e.createFramebuffer()}else h.__webglFramebuffer[t]=e.createFramebuffer()}else{if(l&&c.mipmaps&&c.mipmaps.length>0){h.__webglFramebuffer=[];for(let t=0;t<c.mipmaps.length;t++)h.__webglFramebuffer[t]=e.createFramebuffer()}else h.__webglFramebuffer=e.createFramebuffer();if(p)if(a.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),o.memory.textures++)}}else i.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(l&&t.samples>0&&!1===useMultisampledRTT(t)){const i=p?c:[c];h.__webglMultisampledFramebuffer=e.createFramebuffer(),h.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,h.__webglMultisampledFramebuffer);for(let n=0;n<i.length;n++){const r=i[n];h.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,h.__webglColorRenderbuffer[n]);const a=s.convert(r.format,r.colorSpace),o=s.convert(r.type),l=getInternalFormat(r.internalFormat,a,o,r.colorSpace,!0===t.isXRRenderTarget),c=getRenderTargetSamples(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,c,l,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+n,e.RENDERBUFFER,h.__webglColorRenderbuffer[n])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(h.__webglDepthRenderbuffer=e.createRenderbuffer(),setupRenderBufferStorage(h.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(d){n.bindTexture(e.TEXTURE_CUBE_MAP,u.__webglTexture),setTextureParameters(e.TEXTURE_CUBE_MAP,c,f);for(let n=0;n<6;n++)if(l&&c.mipmaps&&c.mipmaps.length>0)for(let i=0;i<c.mipmaps.length;i++)setupFrameBufferTexture(h.__webglFramebuffer[n][i],t,c,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i);else setupFrameBufferTexture(h.__webglFramebuffer[n],t,c,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0);textureNeedsGenerateMipmaps(c,f)&&generateMipmap(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(p){const i=t.texture;for(let a=0,s=i.length;a<s;a++){const s=i[a],o=r.get(s);n.bindTexture(e.TEXTURE_2D,o.__webglTexture),setTextureParameters(e.TEXTURE_2D,s,f),setupFrameBufferTexture(h.__webglFramebuffer,t,s,e.COLOR_ATTACHMENT0+a,e.TEXTURE_2D,0),textureNeedsGenerateMipmaps(s,f)&&generateMipmap(e.TEXTURE_2D)}n.unbindTexture()}else{let r=e.TEXTURE_2D;if((t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(l?r=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY:i.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(r,u.__webglTexture),setTextureParameters(r,c,f),l&&c.mipmaps&&c.mipmaps.length>0)for(let n=0;n<c.mipmaps.length;n++)setupFrameBufferTexture(h.__webglFramebuffer[n],t,c,e.COLOR_ATTACHMENT0,r,n);else setupFrameBufferTexture(h.__webglFramebuffer,t,c,e.COLOR_ATTACHMENT0,r,0);textureNeedsGenerateMipmaps(c,f)&&generateMipmap(r),n.unbindTexture()}t.depthBuffer&&setupDepthRenderbuffer(t)},this.updateRenderTargetMipmap=function updateRenderTargetMipmap(t){const i=isPowerOfTwo$1(t)||l,a=!0===t.isWebGLMultipleRenderTargets?t.texture:[t.texture];for(let s=0,o=a.length;s<o;s++){const o=a[s];if(textureNeedsGenerateMipmaps(o,i)){const i=t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,a=r.get(o).__webglTexture;n.bindTexture(i,a),generateMipmap(i),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function updateMultisampleRenderTarget(t){if(l&&t.samples>0&&!1===useMultisampledRTT(t)){const i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,s=t.height;let o=e.COLOR_BUFFER_BIT;const l=[],c=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),d=!0===t.isWebGLMultipleRenderTargets;if(d)for(let t=0;t<i.length;t++)n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,u.__webglMultisampledFramebuffer),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n<i.length;n++){l.push(e.COLOR_ATTACHMENT0+n),t.depthBuffer&&l.push(c);const p=void 0!==u.__ignoreDepthValues&&u.__ignoreDepthValues;if(!1===p&&(t.depthBuffer&&(o|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&(o|=e.STENCIL_BUFFER_BIT)),d&&e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,u.__webglColorRenderbuffer[n]),!0===p&&(e.invalidateFramebuffer(e.READ_FRAMEBUFFER,[c]),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[c])),d){const t=r.get(i[n]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)}e.blitFramebuffer(0,0,a,s,0,0,a,s,o,e.NEAREST),h&&e.invalidateFramebuffer(e.READ_FRAMEBUFFER,l)}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),d)for(let t=0;t<i.length;t++){n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,u.__webglColorRenderbuffer[t]);const a=r.get(i[t]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,a,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=setupDepthRenderbuffer,this.setupFrameBufferTexture=setupFrameBufferTexture,this.useMultisampledRTT=useMultisampledRTT}function WebGLUtils(e,t,n){const i=n.isWebGL2;return{convert:function convert(n,r=ke){let a;const s=Tt.getTransfer(r);if(n===ie)return e.UNSIGNED_BYTE;if(1017===n)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===n)return e.UNSIGNED_SHORT_5_5_5_1;if(n===re)return e.BYTE;if(n===ae)return e.SHORT;if(n===se)return e.UNSIGNED_SHORT;if(n===oe)return e.INT;if(n===le)return e.UNSIGNED_INT;if(n===ce)return e.FLOAT;if(n===he)return i?e.HALF_FLOAT:(a=t.get("OES_texture_half_float"),null!==a?a.HALF_FLOAT_OES:null);if(1021===n)return e.ALPHA;if(n===de)return e.RGBA;if(1024===n)return e.LUMINANCE;if(1025===n)return e.LUMINANCE_ALPHA;if(n===pe)return e.DEPTH_COMPONENT;if(n===fe)return e.DEPTH_STENCIL;if(n===ct)return a=t.get("EXT_sRGB"),null!==a?a.SRGB_ALPHA_EXT:null;if(n===me)return e.RED;if(1029===n)return e.RED_INTEGER;if(n===ge)return e.RG;if(1031===n)return e.RG_INTEGER;if(1033===n)return e.RGBA_INTEGER;if(n===_e||n===ve||n===xe||n===ye)if(s===Ke){if(a=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===a)return null;if(n===_e)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===ve)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===xe)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===ye)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(a=t.get("WEBGL_compressed_texture_s3tc"),null===a)return null;if(n===_e)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===ve)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===xe)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ye)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===Me||35841===n||n===Se||35843===n){if(a=t.get("WEBGL_compressed_texture_pvrtc"),null===a)return null;if(n===Me)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===n)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Se)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===n)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===Te)return a=t.get("WEBGL_compressed_texture_etc1"),null!==a?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===be||n===Ee){if(a=t.get("WEBGL_compressed_texture_etc"),null===a)return null;if(n===be)return s===Ke?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(n===Ee)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}if(n===Ae||37809===n||37810===n||37811===n||n===we||37813===n||37814===n||37815===n||37816===n||37817===n||37818===n||37819===n||37820===n||37821===n){if(a=t.get("WEBGL_compressed_texture_astc"),null===a)return null;if(n===Ae)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===we)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===n)return s===Ke?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===Re||36494===n||36495===n){if(a=t.get("EXT_texture_compression_bptc"),null===a)return null;if(n===Re)return s===Ke?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(36494===n)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(36495===n)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(36283===n||36284===n||36285===n||36286===n){if(a=t.get("EXT_texture_compression_rgtc"),null===a)return null;if(n===Re)return a.COMPRESSED_RED_RGTC1_EXT;if(36284===n)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(36285===n)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(36286===n)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return n===ue?i?e.UNSIGNED_INT_24_8:(a=t.get("WEBGL_depth_texture"),null!==a?a.UNSIGNED_INT_24_8_WEBGL:null):void 0!==e[n]?e[n]:null}}}class ArrayCamera extends PerspectiveCamera{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Group extends Object3D{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Zi={type:"move"};class WebXRController{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Group,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Group,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Vector3,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Vector3),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Group,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Vector3,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Vector3),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,a=null;const s=this._targetRay,o=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){a=!0;for(const i of e.hand.values()){const e=t.getJointPose(i,n),r=this._getHandJoint(l,i);null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.matrixWorldNeedsUpdate=!0,r.jointRadius=e.radius),r.visible=null!==e}const i=l.joints["index-finger-tip"],r=l.joints["thumb-tip"],s=i.position.distanceTo(r.position),o=.02,c=.005;l.inputState.pinching&&s>o+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1));null!==s&&(i=t.getPose(e.targetRaySpace,n),null===i&&null!==r&&(i=r),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(Zi)))}return null!==s&&(s.visible=null!==i),null!==o&&(o.visible=null!==r),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new Group;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class WebXRManager extends EventDispatcher{constructor(e,t){super();const n=this;let r=null,a=1,s=null,o="local-floor",l=1,c=null,h=null,u=null,d=null,p=null,f=null;const m=t.getContextAttributes();let g=null,_=null;const v=[],x=[],y=new Vector2;let M=null;const S=new PerspectiveCamera;S.layers.enable(1),S.viewport=new Vector4;const T=new PerspectiveCamera;T.layers.enable(2),T.viewport=new Vector4;const b=[S,T],E=new ArrayCamera;E.layers.enable(1),E.layers.enable(2);let A=null,w=null;function onSessionEvent(e){const t=x.indexOf(e.inputSource);if(-1===t)return;const n=v[t];void 0!==n&&(n.update(e.inputSource,e.frame,c||s),n.dispatchEvent({type:e.type,data:e.inputSource}))}function onSessionEnd(){r.removeEventListener("select",onSessionEvent),r.removeEventListener("selectstart",onSessionEvent),r.removeEventListener("selectend",onSessionEvent),r.removeEventListener("squeeze",onSessionEvent),r.removeEventListener("squeezestart",onSessionEvent),r.removeEventListener("squeezeend",onSessionEvent),r.removeEventListener("end",onSessionEnd),r.removeEventListener("inputsourceschange",onInputSourcesChange);for(let e=0;e<v.length;e++){const t=x[e];null!==t&&(x[e]=null,v[e].disconnect(t))}A=null,w=null,e.setRenderTarget(g),p=null,d=null,u=null,r=null,_=null,P.stop(),n.isPresenting=!1,e.setPixelRatio(M),e.setSize(y.width,y.height,!1),n.dispatchEvent({type:"sessionend"})}function onInputSourcesChange(e){for(let t=0;t<e.removed.length;t++){const n=e.removed[t],i=x.indexOf(n);i>=0&&(x[i]=null,v[i].disconnect(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t];let i=x.indexOf(n);if(-1===i){for(let e=0;e<v.length;e++){if(e>=x.length){x.push(n),i=e;break}if(null===x[e]){x[e]=n,i=e;break}}if(-1===i)break}const r=v[i];r&&r.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=v[e];return void 0===t&&(t=new WebXRController,v[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=v[e];return void 0===t&&(t=new WebXRController,v[e]=t),t.getGripSpace()},this.getHand=function(e){let t=v[e];return void 0===t&&(t=new WebXRController,v[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){a=e,!0===n.isPresenting&&i.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){o=e,!0===n.isPresenting&&i.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||s},this.setReferenceSpace=function(e){c=e},this.getBaseLayer=function(){return null!==d?d:p},this.getBinding=function(){return u},this.getFrame=function(){return f},this.getSession=function(){return r},this.setSession=async function(i){if(r=i,null!==r){if(g=e.getRenderTarget(),r.addEventListener("select",onSessionEvent),r.addEventListener("selectstart",onSessionEvent),r.addEventListener("selectend",onSessionEvent),r.addEventListener("squeeze",onSessionEvent),r.addEventListener("squeezestart",onSessionEvent),r.addEventListener("squeezeend",onSessionEvent),r.addEventListener("end",onSessionEnd),r.addEventListener("inputsourceschange",onInputSourcesChange),!0!==m.xrCompatible&&await t.makeXRCompatible(),M=e.getPixelRatio(),e.getSize(y),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:a};p=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:p}),e.setPixelRatio(1),e.setSize(p.framebufferWidth,p.framebufferHeight,!1),_=new WebGLRenderTarget(p.framebufferWidth,p.framebufferHeight,{format:de,type:ie,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil})}else{let n=null,i=null,s=null;m.depth&&(s=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=m.stencil?fe:pe,i=m.stencil?ue:le);const o={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:a};u=new XRWebGLBinding(r,t),d=u.createProjectionLayer(o),r.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),_=new WebGLRenderTarget(d.textureWidth,d.textureHeight,{format:de,type:ie,depthTexture:new DepthTexture(d.textureWidth,d.textureHeight,i,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0});e.properties.get(_).__ignoreDepthValues=d.ignoreDepthValues}_.isXRRenderTarget=!0,this.setFoveation(l),c=null,s=await r.requestReferenceSpace(o),P.setContext(r),P.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const R=new Vector3,C=new Vector3;function updateCamera(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;E.near=T.near=S.near=e.near,E.far=T.far=S.far=e.far,A===E.near&&w===E.far||(r.updateRenderState({depthNear:E.near,depthFar:E.far}),A=E.near,w=E.far);const t=e.parent,n=E.cameras;updateCamera(E,t);for(let e=0;e<n.length;e++)updateCamera(n[e],t);2===n.length?function setProjectionFromUnion(e,t,n){R.setFromMatrixPosition(t.matrixWorld),C.setFromMatrixPosition(n.matrixWorld);const i=R.distanceTo(C),r=t.projectionMatrix.elements,a=n.projectionMatrix.elements,s=r[14]/(r[10]-1),o=r[14]/(r[10]+1),l=(r[9]+1)/r[5],c=(r[9]-1)/r[5],h=(r[8]-1)/r[0],u=(a[8]+1)/a[0],d=s*h,p=s*u,f=i/(-h+u),m=f*-h;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=s+f,_=o+f,v=d-m,x=p+(i-m),y=l*o/_*g,M=c*o/_*g;e.projectionMatrix.makePerspective(v,x,y,M,g,_),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}(E,S,T):E.projectionMatrix.copy(S.projectionMatrix),function updateUserCamera(e,t,n){null===n?e.matrix.copy(t.matrixWorld):(e.matrix.copy(n.matrixWorld),e.matrix.invert(),e.matrix.multiply(t.matrixWorld));e.matrix.decompose(e.position,e.quaternion,e.scale),e.updateMatrixWorld(!0),e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse),e.isPerspectiveCamera&&(e.fov=2*mt*Math.atan(1/e.projectionMatrix.elements[5]),e.zoom=1)}(e,E,t)},this.getCamera=function(){return E},this.getFoveation=function(){if(null!==d||null!==p)return l},this.setFoveation=function(e){l=e,null!==d&&(d.fixedFoveation=e),null!==p&&void 0!==p.fixedFoveation&&(p.fixedFoveation=e)};let L=null;const P=new WebGLAnimation;P.setAnimationLoop((function onAnimationFrame(t,i){if(h=i.getViewerPose(c||s),f=i,null!==h){const t=h.views;null!==p&&(e.setRenderTargetFramebuffer(_,p.framebuffer),e.setRenderTarget(_));let n=!1;t.length!==E.cameras.length&&(E.cameras.length=0,n=!0);for(let i=0;i<t.length;i++){const r=t[i];let a=null;if(null!==p)a=p.getViewport(r);else{const t=u.getViewSubImage(d,r);a=t.viewport,0===i&&(e.setRenderTargetTextures(_,t.colorTexture,d.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(_))}let s=b[i];void 0===s&&(s=new PerspectiveCamera,s.layers.enable(i),s.viewport=new Vector4,b[i]=s),s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.quaternion,s.scale),s.projectionMatrix.fromArray(r.projectionMatrix),s.projectionMatrixInverse.copy(s.projectionMatrix).invert(),s.viewport.set(a.x,a.y,a.width,a.height),0===i&&(E.matrix.copy(s.matrix),E.matrix.decompose(E.position,E.quaternion,E.scale)),!0===n&&E.cameras.push(s)}}for(let e=0;e<v.length;e++){const t=x[e],n=v[e];null!==t&&void 0!==n&&n.update(t,i,c||s)}L&&L(t,i),i.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:i}),f=null})),this.setAnimationLoop=function(e){L=e},this.dispose=function(){}}}function WebGLMaterials(e,t){function refreshTransformUniform(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function refreshUniformsCommon(n,i){n.opacity.value=i.opacity,i.color&&n.diffuse.value.copy(i.color),i.emissive&&n.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(n.map.value=i.map,refreshTransformUniform(i.map,n.mapTransform)),i.alphaMap&&(n.alphaMap.value=i.alphaMap,refreshTransformUniform(i.alphaMap,n.alphaMapTransform)),i.bumpMap&&(n.bumpMap.value=i.bumpMap,refreshTransformUniform(i.bumpMap,n.bumpMapTransform),n.bumpScale.value=i.bumpScale,i.side===c&&(n.bumpScale.value*=-1)),i.normalMap&&(n.normalMap.value=i.normalMap,refreshTransformUniform(i.normalMap,n.normalMapTransform),n.normalScale.value.copy(i.normalScale),i.side===c&&n.normalScale.value.negate()),i.displacementMap&&(n.displacementMap.value=i.displacementMap,refreshTransformUniform(i.displacementMap,n.displacementMapTransform),n.displacementScale.value=i.displacementScale,n.displacementBias.value=i.displacementBias),i.emissiveMap&&(n.emissiveMap.value=i.emissiveMap,refreshTransformUniform(i.emissiveMap,n.emissiveMapTransform)),i.specularMap&&(n.specularMap.value=i.specularMap,refreshTransformUniform(i.specularMap,n.specularMapTransform)),i.alphaTest>0&&(n.alphaTest.value=i.alphaTest);const r=t.get(i).envMap;if(r&&(n.envMap.value=r,n.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,n.reflectivity.value=i.reflectivity,n.ior.value=i.ior,n.refractionRatio.value=i.refractionRatio),i.lightMap){n.lightMap.value=i.lightMap;const t=!0===e._useLegacyLights?Math.PI:1;n.lightMapIntensity.value=i.lightMapIntensity*t,refreshTransformUniform(i.lightMap,n.lightMapTransform)}i.aoMap&&(n.aoMap.value=i.aoMap,n.aoMapIntensity.value=i.aoMapIntensity,refreshTransformUniform(i.aoMap,n.aoMapTransform))}return{refreshFogUniforms:function refreshFogUniforms(t,n){n.color.getRGB(t.fogColor.value,getUnlitUniformColorSpace(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function refreshMaterialUniforms(e,n,i,r,a){n.isMeshBasicMaterial||n.isMeshLambertMaterial?refreshUniformsCommon(e,n):n.isMeshToonMaterial?(refreshUniformsCommon(e,n),function refreshUniformsToon(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,n)):n.isMeshPhongMaterial?(refreshUniformsCommon(e,n),function refreshUniformsPhong(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,n)):n.isMeshStandardMaterial?(refreshUniformsCommon(e,n),function refreshUniformsStandard(e,n){e.metalness.value=n.metalness,n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap,refreshTransformUniform(n.metalnessMap,e.metalnessMapTransform));e.roughness.value=n.roughness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap,refreshTransformUniform(n.roughnessMap,e.roughnessMapTransform));const i=t.get(n).envMap;i&&(e.envMapIntensity.value=n.envMapIntensity)}(e,n),n.isMeshPhysicalMaterial&&function refreshUniformsPhysical(e,t,n){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,refreshTransformUniform(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,refreshTransformUniform(t.sheenRoughnessMap,e.sheenRoughnessMapTransform)));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,refreshTransformUniform(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,refreshTransformUniform(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,refreshTransformUniform(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===c&&e.clearcoatNormalScale.value.negate()));t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,refreshTransformUniform(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,refreshTransformUniform(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform)));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,refreshTransformUniform(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,refreshTransformUniform(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,refreshTransformUniform(t.anisotropyMap,e.anisotropyMapTransform)));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,refreshTransformUniform(t.specularColorMap,e.specularColorMapTransform));t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,refreshTransformUniform(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,n,a)):n.isMeshMatcapMaterial?(refreshUniformsCommon(e,n),function refreshUniformsMatcap(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,n)):n.isMeshDepthMaterial?refreshUniformsCommon(e,n):n.isMeshDistanceMaterial?(refreshUniformsCommon(e,n),function refreshUniformsDistance(e,n){const i=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(i.matrixWorld),e.nearDistance.value=i.shadow.camera.near,e.farDistance.value=i.shadow.camera.far}(e,n)):n.isMeshNormalMaterial?refreshUniformsCommon(e,n):n.isLineBasicMaterial?(!function refreshUniformsLine(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,refreshTransformUniform(t.map,e.mapTransform))}(e,n),n.isLineDashedMaterial&&function refreshUniformsDash(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,n)):n.isPointsMaterial?function refreshUniformsPoints(e,t,n,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*i,t.map&&(e.map.value=t.map,refreshTransformUniform(t.map,e.uvTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,refreshTransformUniform(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,n,i,r):n.isSpriteMaterial?function refreshUniformsSprites(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,refreshTransformUniform(t.map,e.mapTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,refreshTransformUniform(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,n):n.isShadowMaterial?(e.color.value.copy(n.color),e.opacity.value=n.opacity):n.isShaderMaterial&&(n.uniformsNeedUpdate=!1)}}}function WebGLUniformsGroups(e,t,n,r){let a={},s={},o=[];const l=n.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function hasUniformChanged(e,t,n,i){const r=e.value,a=t+"_"+n;if(void 0===i[a])return i[a]="number"==typeof r||"boolean"==typeof r?r:r.clone(),!0;{const e=i[a];if("number"==typeof r||"boolean"==typeof r){if(e!==r)return i[a]=r,!0}else if(!1===e.equals(r))return e.copy(r),!0}return!1}function getUniformSize(e){const t={boundary:0,storage:0};return"number"==typeof e||"boolean"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?i.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):i.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function onUniformsGroupsDispose(t){const n=t.target;n.removeEventListener("dispose",onUniformsGroupsDispose);const i=o.indexOf(n.__bindingPointIndex);o.splice(i,1),e.deleteBuffer(a[n.id]),delete a[n.id],delete s[n.id]}return{bind:function bind(e,t){const n=t.program;r.uniformBlockBinding(e,n)},update:function update(n,c){let h=a[n.id];void 0===h&&(!function prepareUniformsGroup(e){const t=e.uniforms;let n=0;const i=16;for(let e=0,r=t.length;e<r;e++){const r=Array.isArray(t[e])?t[e]:[t[e]];for(let e=0,t=r.length;e<t;e++){const t=r[e],a=Array.isArray(t.value)?t.value:[t.value];for(let e=0,r=a.length;e<r;e++){const r=getUniformSize(a[e]),s=n%i;0!==s&&i-s<r.boundary&&(n+=i-s),t.__data=new Float32Array(r.storage/Float32Array.BYTES_PER_ELEMENT),t.__offset=n,n+=r.storage}}}const r=n%i;r>0&&(n+=i-r);return e.__size=n,e.__cache={},this}(n),h=function createBuffer(t){const n=function allocateBindingPointIndex(){for(let e=0;e<l;e++)if(-1===o.indexOf(e))return o.push(e),e;return i.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();t.__bindingPointIndex=n;const r=e.createBuffer(),a=t.__size,s=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,a,s),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}(n),a[n.id]=h,n.addEventListener("dispose",onUniformsGroupsDispose));const u=c.program;r.updateUBOMapping(n,u);const d=t.render.frame;s[n.id]!==d&&(!function updateBufferData(t){const n=a[t.id],i=t.uniforms,r=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,n);for(let t=0,n=i.length;t<n;t++){const n=Array.isArray(i[t])?i[t]:[i[t]];for(let i=0,a=n.length;i<a;i++){const a=n[i];if(!0===hasUniformChanged(a,t,i,r)){const t=a.__offset,n=Array.isArray(a.value)?a.value:[a.value];let i=0;for(let r=0;r<n.length;r++){const s=n[r],o=getUniformSize(s);"number"==typeof s||"boolean"==typeof s?(a.__data[0]=s,e.bufferSubData(e.UNIFORM_BUFFER,t+i,a.__data)):s.isMatrix3?(a.__data[0]=s.elements[0],a.__data[1]=s.elements[1],a.__data[2]=s.elements[2],a.__data[3]=0,a.__data[4]=s.elements[3],a.__data[5]=s.elements[4],a.__data[6]=s.elements[5],a.__data[7]=0,a.__data[8]=s.elements[6],a.__data[9]=s.elements[7],a.__data[10]=s.elements[8],a.__data[11]=0):(s.toArray(a.__data,i),i+=o.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(e.UNIFORM_BUFFER,t,a.__data)}}}e.bindBuffer(e.UNIFORM_BUFFER,null)}(n),s[n.id]=d)},dispose:function dispose(){for(const t in a)e.deleteBuffer(a[t]);o=[],a={},s={}}}}class WebGLRenderer{constructor(e={}){const{canvas:t=createCanvasElement(),context:n=null,depth:a=!0,stencil:s=!0,alpha:o=!1,antialias:u=!1,premultipliedAlpha:d=!0,preserveDrawingBuffer:p=!1,powerPreference:f="default",failIfMajorPerformanceCaveat:m=!1}=e;let g;this.isWebGLRenderer=!0,g=null!==n?n.getContextAttributes().alpha:o;const _=new Uint32Array(4),v=new Int32Array(4);let x=null,y=null;const M=[],S=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=We,this._useLegacyLights=!1,this.toneMapping=I,this.toneMappingExposure=1;const T=this;let b=!1,E=0,A=0,w=null,R=-1,C=null;const L=new Vector4,P=new Vector4;let U=null;const D=new Color(0);let N=0,O=t.width,B=t.height,F=1,V=null,z=null;const G=new Vector4(0,0,O,B),H=new Vector4(0,0,O,B);let k=!1;const W=new Frustum;let X=!1,j=!1,q=null;const Y=new Matrix4,K=new Vector2,Z=new Vector3,J={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function getTargetPixelRatio(){return null===w?F:1}let Q,$,ee,ne,re,ae,oe,pe,fe,me,ge,_e,ve,xe,ye,Me,Se,Te,be,Ee,Ae,we,Re,Ce,Le=n;function getContext(e,n){for(let i=0;i<e.length;i++){const r=e[i],a=t.getContext(r,n);if(null!==a)return a}return null}try{const e={alpha:!0,depth:a,stencil:s,antialias:u,premultipliedAlpha:d,preserveDrawingBuffer:p,powerPreference:f,failIfMajorPerformanceCaveat:m};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${r}`),t.addEventListener("webglcontextlost",onContextLost,!1),t.addEventListener("webglcontextrestored",onContextRestore,!1),t.addEventListener("webglcontextcreationerror",onContextCreationError,!1),null===Le){const t=["webgl2","webgl","experimental-webgl"];if(!0===T.isWebGL1Renderer&&t.shift(),Le=getContext(t,e),null===Le)throw getContext(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}"undefined"!=typeof WebGLRenderingContext&&Le instanceof WebGLRenderingContext&&i.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),void 0===Le.getShaderPrecisionFormat&&(Le.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw i.error("THREE.WebGLRenderer: "+e.message),e}function initGLContext(){Q=new WebGLExtensions(Le),$=new WebGLCapabilities(Le,Q,e),Q.init($),we=new WebGLUtils(Le,Q,$),ee=new WebGLState(Le,Q,$),ne=new WebGLInfo(Le),re=new WebGLProperties,ae=new WebGLTextures(Le,Q,ee,re,$,we,ne),oe=new WebGLCubeMaps(T),pe=new WebGLCubeUVMaps(T),fe=new WebGLAttributes(Le,$),Re=new WebGLBindingStates(Le,Q,fe,$),me=new WebGLGeometries(Le,fe,ne,Re),ge=new WebGLObjects(Le,me,fe,ne),be=new WebGLMorphtargets(Le,$,ae),Me=new WebGLClipping(re),_e=new WebGLPrograms(T,oe,pe,Q,$,Re,Me),ve=new WebGLMaterials(T,re),xe=new WebGLRenderLists,ye=new WebGLRenderStates(Q,$),Te=new WebGLBackground(T,oe,pe,ee,ge,g,d),Se=new WebGLShadowMap(T,ge,$),Ce=new WebGLUniformsGroups(Le,ne,$,ee),Ee=new WebGLBufferRenderer(Le,Q,ne,$),Ae=new WebGLIndexedBufferRenderer(Le,Q,ne,$),ne.programs=_e.programs,T.capabilities=$,T.extensions=Q,T.properties=re,T.renderLists=xe,T.shadowMap=Se,T.state=ee,T.info=ne}initGLContext();const Pe=new WebXRManager(T,Le);function onContextLost(e){e.preventDefault(),i.log("THREE.WebGLRenderer: Context Lost."),b=!0}function onContextRestore(){i.log("THREE.WebGLRenderer: Context Restored."),b=!1;const e=ne.autoReset,t=Se.enabled,n=Se.autoUpdate,r=Se.needsUpdate,a=Se.type;initGLContext(),ne.autoReset=e,Se.enabled=t,Se.autoUpdate=n,Se.needsUpdate=r,Se.type=a}function onContextCreationError(e){i.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function onMaterialDispose(e){const t=e.target;t.removeEventListener("dispose",onMaterialDispose),function deallocateMaterial(e){(function releaseMaterialProgramReferences(e){const t=re.get(e).programs;void 0!==t&&(t.forEach((function(e){_e.releaseProgram(e)})),e.isShaderMaterial&&_e.releaseShaderCache(e))})(e),re.remove(e)}(t)}function prepareMaterial(e,t,n){!0===e.transparent&&e.side===h&&!1===e.forceSinglePass?(e.side=c,e.needsUpdate=!0,getProgram(e,t,n),e.side=l,e.needsUpdate=!0,getProgram(e,t,n),e.side=h):getProgram(e,t,n)}this.xr=Pe,this.getContext=function(){return Le},this.getContextAttributes=function(){return Le.getContextAttributes()},this.forceContextLoss=function(){const e=Q.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=Q.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return F},this.setPixelRatio=function(e){void 0!==e&&(F=e,this.setSize(O,B,!1))},this.getSize=function(e){return e.set(O,B)},this.setSize=function(e,n,r=!0){Pe.isPresenting?i.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(O=e,B=n,t.width=Math.floor(e*F),t.height=Math.floor(n*F),!0===r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(O*F,B*F).floor()},this.setDrawingBufferSize=function(e,n,i){O=e,B=n,F=i,t.width=Math.floor(e*i),t.height=Math.floor(n*i),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(L)},this.getViewport=function(e){return e.copy(G)},this.setViewport=function(e,t,n,i){e.isVector4?G.set(e.x,e.y,e.z,e.w):G.set(e,t,n,i),ee.viewport(L.copy(G).multiplyScalar(F).floor())},this.getScissor=function(e){return e.copy(H)},this.setScissor=function(e,t,n,i){e.isVector4?H.set(e.x,e.y,e.z,e.w):H.set(e,t,n,i),ee.scissor(P.copy(H).multiplyScalar(F).floor())},this.getScissorTest=function(){return k},this.setScissorTest=function(e){ee.setScissorTest(k=e)},this.setOpaqueSort=function(e){V=e},this.setTransparentSort=function(e){z=e},this.getClearColor=function(e){return e.copy(Te.getClearColor())},this.setClearColor=function(){Te.setClearColor.apply(Te,arguments)},this.getClearAlpha=function(){return Te.getClearAlpha()},this.setClearAlpha=function(){Te.setClearAlpha.apply(Te,arguments)},this.clear=function(e=!0,t=!0,n=!0){let i=0;if(e){let e=!1;if(null!==w){const t=w.texture.format;e=1033===t||1031===t||1029===t}if(e){const e=w.texture.type,t=e===ie||e===le||e===se||e===ue||1017===e||1018===e,n=Te.getClearColor(),i=Te.getClearAlpha(),r=n.r,a=n.g,s=n.b;t?(_[0]=r,_[1]=a,_[2]=s,_[3]=i,Le.clearBufferuiv(Le.COLOR,0,_)):(v[0]=r,v[1]=a,v[2]=s,v[3]=i,Le.clearBufferiv(Le.COLOR,0,v))}else i|=Le.COLOR_BUFFER_BIT}t&&(i|=Le.DEPTH_BUFFER_BIT),n&&(i|=Le.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Le.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",onContextLost,!1),t.removeEventListener("webglcontextrestored",onContextRestore,!1),t.removeEventListener("webglcontextcreationerror",onContextCreationError,!1),xe.dispose(),ye.dispose(),re.dispose(),oe.dispose(),pe.dispose(),ge.dispose(),Re.dispose(),Ce.dispose(),_e.dispose(),Pe.dispose(),Pe.removeEventListener("sessionstart",onXRSessionStart),Pe.removeEventListener("sessionend",onXRSessionEnd),q&&(q.dispose(),q=null),Ie.stop()},this.renderBufferDirect=function(e,t,n,r,a,s){null===t&&(t=J);const o=a.isMesh&&a.matrixWorld.determinant()<0,l=function setProgram(e,t,n,r,a){!0!==t.isScene&&(t=J);ae.resetTextureUnits();const s=t.fog,o=r.isMeshStandardMaterial?t.environment:null,l=null===w?T.outputColorSpace:!0===w.isXRRenderTarget?w.texture.colorSpace:Xe,c=(r.isMeshStandardMaterial?pe:oe).get(r.envMap||o),h=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,u=!!n.attributes.tangent&&(!!r.normalMap||r.anisotropy>0),d=!!n.morphAttributes.position,p=!!n.morphAttributes.normal,f=!!n.morphAttributes.color;let m=I;r.toneMapped&&(null!==w&&!0!==w.isXRRenderTarget||(m=T.toneMapping));const g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,_=void 0!==g?g.length:0,v=re.get(r),x=y.state.lights;if(!0===X&&(!0===j||e!==C)){const t=e===C&&r.id===R;Me.setState(r,e,t)}let M=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==x.state.version||v.outputColorSpace!==l||a.isBatchedMesh&&!1===v.batching?M=!0:a.isBatchedMesh||!0!==v.batching?a.isInstancedMesh&&!1===v.instancing?M=!0:a.isInstancedMesh||!0!==v.instancing?a.isSkinnedMesh&&!1===v.skinning?M=!0:a.isSkinnedMesh||!0!==v.skinning?a.isInstancedMesh&&!0===v.instancingColor&&null===a.instanceColor||a.isInstancedMesh&&!1===v.instancingColor&&null!==a.instanceColor||v.envMap!==c||!0===r.fog&&v.fog!==s?M=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===Me.numPlanes&&v.numIntersection===Me.numIntersection?(v.vertexAlphas!==h||v.vertexTangents!==u||v.morphTargets!==d||v.morphNormals!==p||v.morphColors!==f||v.toneMapping!==m||!0===$.isWebGL2&&v.morphTargetsCount!==_)&&(M=!0):M=!0:M=!0:M=!0:M=!0:(M=!0,v.__version=r.version);let S=v.currentProgram;!0===M&&(S=getProgram(r,t,a));let b=!1,E=!1,A=!1;const L=S.getUniforms(),P=v.uniforms;ee.useProgram(S.program)&&(b=!0,E=!0,A=!0);r.id!==R&&(R=r.id,E=!0);if(b||C!==e){L.setValue(Le,"projectionMatrix",e.projectionMatrix),L.setValue(Le,"viewMatrix",e.matrixWorldInverse);const t=L.map.cameraPosition;void 0!==t&&t.setValue(Le,Z.setFromMatrixPosition(e.matrixWorld)),$.logarithmicDepthBuffer&&L.setValue(Le,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&L.setValue(Le,"isOrthographic",!0===e.isOrthographicCamera),C!==e&&(C=e,E=!0,A=!0)}if(a.isSkinnedMesh){L.setOptional(Le,a,"bindMatrix"),L.setOptional(Le,a,"bindMatrixInverse");const e=a.skeleton;e&&($.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),L.setValue(Le,"boneTexture",e.boneTexture,ae)):i.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}a.isBatchedMesh&&(L.setOptional(Le,a,"batchingTexture"),L.setValue(Le,"batchingTexture",a._matricesTexture,ae));const U=n.morphAttributes;(void 0!==U.position||void 0!==U.normal||void 0!==U.color&&!0===$.isWebGL2)&&be.update(a,n,S);(E||v.receiveShadow!==a.receiveShadow)&&(v.receiveShadow=a.receiveShadow,L.setValue(Le,"receiveShadow",a.receiveShadow));r.isMeshGouraudMaterial&&null!==r.envMap&&(P.envMap.value=c,P.flipEnvMap.value=c.isCubeTexture&&!1===c.isRenderTargetTexture?-1:1);E&&(L.setValue(Le,"toneMappingExposure",T.toneMappingExposure),v.needsLights&&function markUniformsLightsNeedsUpdate(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(P,A),s&&!0===r.fog&&ve.refreshFogUniforms(P,s),ve.refreshMaterialUniforms(P,r,F,B,q),WebGLUniforms.upload(Le,getUniformList(v),P,ae));r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(WebGLUniforms.upload(Le,getUniformList(v),P,ae),r.uniformsNeedUpdate=!1);r.isSpriteMaterial&&L.setValue(Le,"center",a.center);if(L.setValue(Le,"modelViewMatrix",a.modelViewMatrix),L.setValue(Le,"normalMatrix",a.normalMatrix),L.setValue(Le,"modelMatrix",a.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const e=r.uniformsGroups;for(let t=0,n=e.length;t<n;t++)if($.isWebGL2){const n=e[t];Ce.update(n,S),Ce.bind(n,S)}else i.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return S}(e,t,n,r,a);ee.setMaterial(r,o);let c=n.index,h=1;if(!0===r.wireframe){if(c=me.getWireframeAttribute(n),void 0===c)return;h=2}const u=n.drawRange,d=n.attributes.position;let p=u.start*h,f=(u.start+u.count)*h;null!==s&&(p=Math.max(p,s.start*h),f=Math.min(f,(s.start+s.count)*h)),null!==c?(p=Math.max(p,0),f=Math.min(f,c.count)):null!=d&&(p=Math.max(p,0),f=Math.min(f,d.count));const m=f-p;if(m<0||m===1/0)return;let g;Re.setup(a,r,l,n,c);let _=Ee;if(null!==c&&(g=fe.get(c),_=Ae,_.setIndex(g)),a.isMesh)!0===r.wireframe?(ee.setLineWidth(r.wireframeLinewidth*getTargetPixelRatio()),_.setMode(Le.LINES)):_.setMode(Le.TRIANGLES);else if(a.isLine){let e=r.linewidth;void 0===e&&(e=1),ee.setLineWidth(e*getTargetPixelRatio()),a.isLineSegments?_.setMode(Le.LINES):a.isLineLoop?_.setMode(Le.LINE_LOOP):_.setMode(Le.LINE_STRIP)}else a.isPoints?_.setMode(Le.POINTS):a.isSprite&&_.setMode(Le.TRIANGLES);if(a.isBatchedMesh)_.renderMultiDraw(a._multiDrawStarts,a._multiDrawCounts,a._multiDrawCount);else if(a.isInstancedMesh)_.renderInstances(p,m,a.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);_.renderInstances(p,m,t)}else _.render(p,m)},this.compile=function(e,t,n=null){null===n&&(n=e),y=ye.get(n),y.init(),S.push(y),n.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(y.pushLight(e),e.castShadow&&y.pushShadow(e))})),e!==n&&e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(y.pushLight(e),e.castShadow&&y.pushShadow(e))})),y.setupLights(T._useLegacyLights);const i=new Set;return e.traverse((function(e){const t=e.material;if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++){const a=t[r];prepareMaterial(a,n,e),i.add(a)}else prepareMaterial(t,n,e),i.add(t)})),S.pop(),y=null,i},this.compileAsync=function(e,t,n=null){const i=this.compile(e,t,n);return new Promise((t=>{function checkMaterialsReady(){i.forEach((function(e){re.get(e).currentProgram.isReady()&&i.delete(e)})),0!==i.size?setTimeout(checkMaterialsReady,10):t(e)}null!==Q.get("KHR_parallel_shader_compile")?checkMaterialsReady():setTimeout(checkMaterialsReady,10)}))};let Ue=null;function onXRSessionStart(){Ie.stop()}function onXRSessionEnd(){Ie.start()}const Ie=new WebGLAnimation;function projectObject(e,t,n,i){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)y.pushLight(e),e.castShadow&&y.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||W.intersectsSprite(e)){i&&Z.setFromMatrixPosition(e.matrixWorld).applyMatrix4(Y);const t=ge.update(e),r=e.material;r.visible&&x.push(e,t,r,n,Z.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||W.intersectsObject(e))){const t=ge.update(e),r=e.material;if(i&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),Z.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),Z.copy(t.boundingSphere.center)),Z.applyMatrix4(e.matrixWorld).applyMatrix4(Y)),Array.isArray(r)){const i=t.groups;for(let a=0,s=i.length;a<s;a++){const s=i[a],o=r[s.materialIndex];o&&o.visible&&x.push(e,t,o,n,Z.z,s)}}else r.visible&&x.push(e,t,r,n,Z.z,null)}const r=e.children;for(let e=0,a=r.length;e<a;e++)projectObject(r[e],t,n,i)}function renderScene(e,t,n,i){const r=e.opaque,a=e.transmissive,s=e.transparent;y.setupLightsView(n),!0===X&&Me.setGlobalState(T.clippingPlanes,n),a.length>0&&function renderTransmissionPass(e,t,n,i){const r=!0===n.isScene?n.overrideMaterial:null;if(null!==r)return;const a=$.isWebGL2;null===q&&(q=new WebGLRenderTarget(1,1,{generateMipmaps:!0,type:Q.has("EXT_color_buffer_half_float")?he:ie,minFilter:te,samples:a?4:0}));T.getDrawingBufferSize(K),a?q.setSize(K.x,K.y):q.setSize(floorPowerOfTwo(K.x),floorPowerOfTwo(K.y));const s=T.getRenderTarget();T.setRenderTarget(q),T.getClearColor(D),N=T.getClearAlpha(),N<1&&T.setClearColor(16777215,.5);T.clear();const o=T.toneMapping;T.toneMapping=I,renderObjects(e,n,i),ae.updateMultisampleRenderTarget(q),ae.updateRenderTargetMipmap(q);let l=!1;for(let e=0,r=t.length;e<r;e++){const r=t[e],a=r.object,s=r.geometry,o=r.material,u=r.group;if(o.side===h&&a.layers.test(i.layers)){const e=o.side;o.side=c,o.needsUpdate=!0,renderObject(a,n,i,s,o,u),o.side=e,o.needsUpdate=!0,l=!0}}!0===l&&(ae.updateMultisampleRenderTarget(q),ae.updateRenderTargetMipmap(q));T.setRenderTarget(s),T.setClearColor(D,N),T.toneMapping=o}(r,a,t,n),i&&ee.viewport(L.copy(i)),r.length>0&&renderObjects(r,t,n),a.length>0&&renderObjects(a,t,n),s.length>0&&renderObjects(s,t,n),ee.buffers.depth.setTest(!0),ee.buffers.depth.setMask(!0),ee.buffers.color.setMask(!0),ee.setPolygonOffset(!1)}function renderObjects(e,t,n){const i=!0===t.isScene?t.overrideMaterial:null;for(let r=0,a=e.length;r<a;r++){const a=e[r],s=a.object,o=a.geometry,l=null===i?a.material:i,c=a.group;s.layers.test(n.layers)&&renderObject(s,t,n,o,l,c)}}function renderObject(e,t,n,i,r,a){e.onBeforeRender(T,t,n,i,r,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),r.onBeforeRender(T,t,n,i,e,a),!0===r.transparent&&r.side===h&&!1===r.forceSinglePass?(r.side=c,r.needsUpdate=!0,T.renderBufferDirect(n,t,i,r,e,a),r.side=l,r.needsUpdate=!0,T.renderBufferDirect(n,t,i,r,e,a),r.side=h):T.renderBufferDirect(n,t,i,r,e,a),e.onAfterRender(T,t,n,i,r,a)}function getProgram(e,t,n){!0!==t.isScene&&(t=J);const i=re.get(e),r=y.state.lights,a=y.state.shadowsArray,s=r.state.version,o=_e.getParameters(e,r.state,a,t,n),l=_e.getProgramCacheKey(o);let c=i.programs;i.environment=e.isMeshStandardMaterial?t.environment:null,i.fog=t.fog,i.envMap=(e.isMeshStandardMaterial?pe:oe).get(e.envMap||i.environment),void 0===c&&(e.addEventListener("dispose",onMaterialDispose),c=new Map,i.programs=c);let h=c.get(l);if(void 0!==h){if(i.currentProgram===h&&i.lightsStateVersion===s)return updateCommonMaterialProperties(e,o),h}else o.uniforms=_e.getUniforms(e),e.onBuild(n,o,T),e.onBeforeCompile(o,T),h=_e.acquireProgram(o,l),c.set(l,h),i.uniforms=o.uniforms;const u=i.uniforms;return(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(u.clippingPlanes=Me.uniform),updateCommonMaterialProperties(e,o),i.needsLights=function materialNeedsLights(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),i.lightsStateVersion=s,i.needsLights&&(u.ambientLightColor.value=r.state.ambient,u.lightProbe.value=r.state.probe,u.directionalLights.value=r.state.directional,u.directionalLightShadows.value=r.state.directionalShadow,u.spotLights.value=r.state.spot,u.spotLightShadows.value=r.state.spotShadow,u.rectAreaLights.value=r.state.rectArea,u.ltc_1.value=r.state.rectAreaLTC1,u.ltc_2.value=r.state.rectAreaLTC2,u.pointLights.value=r.state.point,u.pointLightShadows.value=r.state.pointShadow,u.hemisphereLights.value=r.state.hemi,u.directionalShadowMap.value=r.state.directionalShadowMap,u.directionalShadowMatrix.value=r.state.directionalShadowMatrix,u.spotShadowMap.value=r.state.spotShadowMap,u.spotLightMatrix.value=r.state.spotLightMatrix,u.spotLightMap.value=r.state.spotLightMap,u.pointShadowMap.value=r.state.pointShadowMap,u.pointShadowMatrix.value=r.state.pointShadowMatrix),i.currentProgram=h,i.uniformsList=null,h}function getUniformList(e){if(null===e.uniformsList){const t=e.currentProgram.getUniforms();e.uniformsList=WebGLUniforms.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function updateCommonMaterialProperties(e,t){const n=re.get(e);n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}Ie.setAnimationLoop((function onAnimationFrame(e){Ue&&Ue(e)})),"undefined"!=typeof self&&Ie.setContext(self),this.setAnimationLoop=function(e){Ue=e,Pe.setAnimationLoop(e),null===e?Ie.stop():Ie.start()},Pe.addEventListener("sessionstart",onXRSessionStart),Pe.addEventListener("sessionend",onXRSessionEnd),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void i.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===b)return;!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===Pe.enabled&&!0===Pe.isPresenting&&(!0===Pe.cameraAutoUpdate&&Pe.updateCamera(t),t=Pe.getCamera()),!0===e.isScene&&e.onBeforeRender(T,e,t,w),y=ye.get(e,S.length),y.init(),S.push(y),Y.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),W.setFromProjectionMatrix(Y),j=this.localClippingEnabled,X=Me.init(this.clippingPlanes,j),x=xe.get(e,M.length),x.init(),M.push(x),projectObject(e,t,0,T.sortObjects),x.finish(),!0===T.sortObjects&&x.sort(V,z),this.info.render.frame++,!0===X&&Me.beginShadows();const n=y.state.shadowsArray;if(Se.render(n,e,t),!0===X&&Me.endShadows(),!0===this.info.autoReset&&this.info.reset(),Te.render(x,e),y.setupLights(T._useLegacyLights),t.isArrayCamera){const n=t.cameras;for(let t=0,i=n.length;t<i;t++){const i=n[t];renderScene(x,e,i,i.viewport)}}else renderScene(x,e,t);null!==w&&(ae.updateMultisampleRenderTarget(w),ae.updateRenderTargetMipmap(w)),!0===e.isScene&&e.onAfterRender(T,e,t),Re.resetDefaultState(),R=-1,C=null,S.pop(),y=S.length>0?S[S.length-1]:null,M.pop(),x=M.length>0?M[M.length-1]:null},this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return A},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(e,t,n){re.get(e.texture).__webglTexture=t,re.get(e.depthTexture).__webglTexture=n;const r=re.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===Q.has("WEBGL_multisampled_render_to_texture")&&(i.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=re.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){w=e,E=t,A=n;let i=!0,r=null,a=!1,s=!1;if(e){const o=re.get(e);void 0!==o.__useDefaultFramebuffer?(ee.bindFramebuffer(Le.FRAMEBUFFER,null),i=!1):void 0===o.__webglFramebuffer?ae.setupRenderTarget(e):o.__hasExternalTextures&&ae.rebindTextures(e,re.get(e.texture).__webglTexture,re.get(e.depthTexture).__webglTexture);const l=e.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(s=!0);const c=re.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=Array.isArray(c[t])?c[t][n]:c[t],a=!0):r=$.isWebGL2&&e.samples>0&&!1===ae.useMultisampledRTT(e)?re.get(e).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,L.copy(e.viewport),P.copy(e.scissor),U=e.scissorTest}else L.copy(G).multiplyScalar(F).floor(),P.copy(H).multiplyScalar(F).floor(),U=k;if(ee.bindFramebuffer(Le.FRAMEBUFFER,r)&&$.drawBuffers&&i&&ee.drawBuffers(e,r),ee.viewport(L),ee.scissor(P),ee.setScissorTest(U),a){const i=re.get(e.texture);Le.framebufferTexture2D(Le.FRAMEBUFFER,Le.COLOR_ATTACHMENT0,Le.TEXTURE_CUBE_MAP_POSITIVE_X+t,i.__webglTexture,n)}else if(s){const i=re.get(e.texture),r=t||0;Le.framebufferTextureLayer(Le.FRAMEBUFFER,Le.COLOR_ATTACHMENT0,i.__webglTexture,n||0,r)}R=-1},this.readRenderTargetPixels=function(e,t,n,r,a,s,o){if(!e||!e.isWebGLRenderTarget)return void i.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let l=re.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(l=l[o]),l){ee.bindFramebuffer(Le.FRAMEBUFFER,l);try{const o=e.texture,l=o.format,c=o.type;if(l!==de&&we.convert(l)!==Le.getParameter(Le.IMPLEMENTATION_COLOR_READ_FORMAT))return void i.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const h=c===he&&(Q.has("EXT_color_buffer_half_float")||$.isWebGL2&&Q.has("EXT_color_buffer_float"));if(!(c===ie||we.convert(c)===Le.getParameter(Le.IMPLEMENTATION_COLOR_READ_TYPE)||c===ce&&($.isWebGL2||Q.has("OES_texture_float")||Q.has("WEBGL_color_buffer_float"))||h))return void i.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-a&&Le.readPixels(t,n,r,a,we.convert(l),we.convert(c),s)}finally{const e=null!==w?re.get(w).__webglFramebuffer:null;ee.bindFramebuffer(Le.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const i=Math.pow(2,-n),r=Math.floor(t.image.width*i),a=Math.floor(t.image.height*i);ae.setTexture2D(t,0),Le.copyTexSubImage2D(Le.TEXTURE_2D,n,0,0,e.x,e.y,r,a),ee.unbindTexture()},this.copyTextureToTexture=function(e,t,n,i=0){const r=t.image.width,a=t.image.height,s=we.convert(n.format),o=we.convert(n.type);ae.setTexture2D(n,0),Le.pixelStorei(Le.UNPACK_FLIP_Y_WEBGL,n.flipY),Le.pixelStorei(Le.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),Le.pixelStorei(Le.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?Le.texSubImage2D(Le.TEXTURE_2D,i,e.x,e.y,r,a,s,o,t.image.data):t.isCompressedTexture?Le.compressedTexSubImage2D(Le.TEXTURE_2D,i,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,s,t.mipmaps[0].data):Le.texSubImage2D(Le.TEXTURE_2D,i,e.x,e.y,s,o,t.image),0===i&&n.generateMipmaps&&Le.generateMipmap(Le.TEXTURE_2D),ee.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,a=0){if(T.isWebGL1Renderer)return void i.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,l=e.max.z-e.min.z+1,c=we.convert(r.format),h=we.convert(r.type);let u;if(r.isData3DTexture)ae.setTexture3D(r,0),u=Le.TEXTURE_3D;else{if(!r.isDataArrayTexture&&!r.isCompressedArrayTexture)return void i.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ae.setTexture2DArray(r,0),u=Le.TEXTURE_2D_ARRAY}Le.pixelStorei(Le.UNPACK_FLIP_Y_WEBGL,r.flipY),Le.pixelStorei(Le.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),Le.pixelStorei(Le.UNPACK_ALIGNMENT,r.unpackAlignment);const d=Le.getParameter(Le.UNPACK_ROW_LENGTH),p=Le.getParameter(Le.UNPACK_IMAGE_HEIGHT),f=Le.getParameter(Le.UNPACK_SKIP_PIXELS),m=Le.getParameter(Le.UNPACK_SKIP_ROWS),g=Le.getParameter(Le.UNPACK_SKIP_IMAGES),_=n.isCompressedTexture?n.mipmaps[a]:n.image;Le.pixelStorei(Le.UNPACK_ROW_LENGTH,_.width),Le.pixelStorei(Le.UNPACK_IMAGE_HEIGHT,_.height),Le.pixelStorei(Le.UNPACK_SKIP_PIXELS,e.min.x),Le.pixelStorei(Le.UNPACK_SKIP_ROWS,e.min.y),Le.pixelStorei(Le.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?Le.texSubImage3D(u,a,t.x,t.y,t.z,s,o,l,c,h,_.data):n.isCompressedArrayTexture?(i.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Le.compressedTexSubImage3D(u,a,t.x,t.y,t.z,s,o,l,c,_.data)):Le.texSubImage3D(u,a,t.x,t.y,t.z,s,o,l,c,h,_),Le.pixelStorei(Le.UNPACK_ROW_LENGTH,d),Le.pixelStorei(Le.UNPACK_IMAGE_HEIGHT,p),Le.pixelStorei(Le.UNPACK_SKIP_PIXELS,f),Le.pixelStorei(Le.UNPACK_SKIP_ROWS,m),Le.pixelStorei(Le.UNPACK_SKIP_IMAGES,g),0===a&&r.generateMipmaps&&Le.generateMipmap(u),ee.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?ae.setTextureCube(e,0):e.isData3DTexture?ae.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?ae.setTexture2DArray(e,0):ae.setTexture2D(e,0),ee.unbindTexture()},this.resetState=function(){E=0,A=0,w=null,ee.reset(),Re.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ht}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===je?"display-p3":"srgb",t.unpackColorSpace=Tt.workingColorSpace===qe?"display-p3":"srgb"}get outputEncoding(){return i.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===We?He:3e3}set outputEncoding(e){i.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===He?We:Xe}get useLegacyLights(){return i.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){i.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}(class WebGL1Renderer extends WebGLRenderer{}).prototype.isWebGL1Renderer=!0;class Scene extends Object3D{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class InterleavedBuffer{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=ot,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return i.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const Ji=new Vector3;class InterleavedBufferAttribute{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)Ji.fromBufferAttribute(this,t),Ji.applyMatrix4(e),this.setXYZ(t,Ji.x,Ji.y,Ji.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Ji.fromBufferAttribute(this,t),Ji.applyNormalMatrix(e),this.setXYZ(t,Ji.x,Ji.y,Ji.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Ji.fromBufferAttribute(this,t),Ji.transformDirection(e),this.setXYZ(t,Ji.x,Ji.y,Ji.z);return this}setX(e,t){return this.normalized&&(t=normalize(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=normalize(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=normalize(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=normalize(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=denormalize(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=denormalize(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=denormalize(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=denormalize(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=normalize(t,this.array),n=normalize(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=normalize(t,this.array),n=normalize(n,this.array),i=normalize(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=normalize(t,this.array),n=normalize(n,this.array),i=normalize(i,this.array),r=normalize(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(void 0===e){i.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new BufferAttribute(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new InterleavedBufferAttribute(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){i.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const Qi=new Vector3,$i=new Vector4,er=new Vector4,tr=new Vector3,nr=new Matrix4,ir=new Vector3,rr=new Sphere,ar=new Matrix4,sr=new Ray;class SkinnedMesh extends Mesh{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=z,this.bindMatrix=new Matrix4,this.bindMatrixInverse=new Matrix4,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;null===this.boundingBox&&(this.boundingBox=new Box3),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,ir),this.boundingBox.expandByPoint(ir)}computeBoundingSphere(){const e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new Sphere),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,ir),this.boundingSphere.expandByPoint(ir)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,i=this.matrixWorld;void 0!==n&&(null===this.boundingSphere&&this.computeBoundingSphere(),rr.copy(this.boundingSphere),rr.applyMatrix4(i),!1!==e.ray.intersectsSphere(rr)&&(ar.copy(i).invert(),sr.copy(e.ray).applyMatrix4(ar),null!==this.boundingBox&&!1===sr.intersectsBox(this.boundingBox)||this._computeIntersections(e,t,sr)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Vector4,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);const i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===z?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():i.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,i=this.geometry;$i.fromBufferAttribute(i.attributes.skinIndex,e),er.fromBufferAttribute(i.attributes.skinWeight,e),Qi.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const i=er.getComponent(e);if(0!==i){const r=$i.getComponent(e);nr.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(tr.copy(Qi).applyMatrix4(nr),i)}}return t.applyMatrix4(this.bindMatrixInverse)}boneTransform(e,t){return i.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(e,t)}}class Bone extends Object3D{constructor(){super(),this.isBone=!0,this.type="Bone"}}class DataTexture extends Texture{constructor(e=null,t=1,n=1,i,r,a,s,o,l=Z,c=Z,h,u){super(null,a,s,o,l,c,i,r,h,u),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const or=new Matrix4,lr=new Matrix4;class Skeleton{constructor(e=[],t=[]){this.uuid=generateUUID(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){i.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new Matrix4)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new Matrix4;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let i=0,r=e.length;i<r;i++){const r=e[i]?e[i].matrixWorld:lr;or.multiplyMatrices(r,t[i]),or.toArray(n,16*i)}null!==i&&(i.needsUpdate=!0)}clone(){return new Skeleton(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new DataTexture(t,e,e,de,ce);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let a=t[r];void 0===a&&(i.warn("THREE.Skeleton: No bone found with UUID:",r),a=new Bone),this.bones.push(a),this.boneInverses.push((new Matrix4).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i<r;i++){const r=t[i];e.bones.push(r.uuid);const a=n[i];e.boneInverses.push(a.toArray())}return e}}class InstancedBufferAttribute extends BufferAttribute{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const cr=new Matrix4,hr=new Matrix4,ur=[],dr=new Box3,pr=new Matrix4,fr=new Mesh,mr=new Sphere;class InstancedMesh extends Mesh{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new InstancedBufferAttribute(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let e=0;e<n;e++)this.setMatrixAt(e,pr)}computeBoundingBox(){const e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new Box3),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,cr),dr.copy(e.boundingBox).applyMatrix4(cr),this.boundingBox.union(dr)}computeBoundingSphere(){const e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new Sphere),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,cr),mr.copy(e.boundingSphere).applyMatrix4(cr),this.boundingSphere.union(mr)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,i=this.count;if(fr.geometry=this.geometry,fr.material=this.material,void 0!==fr.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),mr.copy(this.boundingSphere),mr.applyMatrix4(n),!1!==e.ray.intersectsSphere(mr)))for(let r=0;r<i;r++){this.getMatrixAt(r,cr),hr.multiplyMatrices(n,cr),fr.matrixWorld=hr,fr.raycast(e,ur);for(let e=0,n=ur.length;e<n;e++){const n=ur[e];n.instanceId=r,n.object=this,t.push(n)}ur.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new InstancedBufferAttribute(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class LineBasicMaterial extends Material{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Color(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const gr=new Vector3,_r=new Vector3,vr=new Matrix4,xr=new Ray,yr=new Sphere;class Line extends Object3D{constructor(e=new BufferGeometry,t=new LineBasicMaterial){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,i=t.count;e<i;e++)gr.fromBufferAttribute(t,e-1),_r.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=gr.distanceTo(_r);e.setAttribute("lineDistance",new Float32BufferAttribute(n,1))}else i.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),yr.copy(n.boundingSphere),yr.applyMatrix4(i),yr.radius+=r,!1===e.ray.intersectsSphere(yr))return;vr.copy(i).invert(),xr.copy(e.ray).applyMatrix4(vr);const s=r/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=new Vector3,c=new Vector3,h=new Vector3,u=new Vector3,d=this.isLineSegments?2:1,p=n.index,f=n.attributes.position;if(null!==p){for(let n=Math.max(0,a.start),i=Math.min(p.count,a.start+a.count)-1;n<i;n+=d){const i=p.getX(n),r=p.getX(n+1);l.fromBufferAttribute(f,i),c.fromBufferAttribute(f,r);if(xr.distanceSqToSegment(l,c,u,h)>o)continue;u.applyMatrix4(this.matrixWorld);const a=e.ray.origin.distanceTo(u);a<e.near||a>e.far||t.push({distance:a,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,a.start),i=Math.min(f.count,a.start+a.count)-1;n<i;n+=d){l.fromBufferAttribute(f,n),c.fromBufferAttribute(f,n+1);if(xr.distanceSqToSegment(l,c,u,h)>o)continue;u.applyMatrix4(this.matrixWorld);const i=e.ray.origin.distanceTo(u);i<e.near||i>e.far||t.push({distance:i,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}const Mr=new Vector3,Sr=new Vector3;class LineSegments extends Line{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,i=t.count;e<i;e+=2)Mr.fromBufferAttribute(t,e),Sr.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+Mr.distanceTo(Sr);e.setAttribute("lineDistance",new Float32BufferAttribute(n,1))}else i.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class LineLoop extends Line{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class PointsMaterial extends Material{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Color(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const Tr=new Matrix4,br=new Ray,Er=new Sphere,Ar=new Vector3;class Points extends Object3D{constructor(e=new BufferGeometry,t=new PointsMaterial){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Er.copy(n.boundingSphere),Er.applyMatrix4(i),Er.radius+=r,!1===e.ray.intersectsSphere(Er))return;Tr.copy(i).invert(),br.copy(e.ray).applyMatrix4(Tr);const s=r/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=n.index,c=n.attributes.position;if(null!==l){for(let n=Math.max(0,a.start),r=Math.min(l.count,a.start+a.count);n<r;n++){const r=l.getX(n);Ar.fromBufferAttribute(c,r),testPoint(Ar,r,o,i,e,t,this)}}else{for(let n=Math.max(0,a.start),r=Math.min(c.count,a.start+a.count);n<r;n++)Ar.fromBufferAttribute(c,n),testPoint(Ar,n,o,i,e,t,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function testPoint(e,t,n,i,r,a,s){const o=br.distanceSqToPoint(e);if(o<n){const n=new Vector3;br.closestPointToPoint(e,n),n.applyMatrix4(i);const l=r.ray.origin.distanceTo(n);if(l<r.near||l>r.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,object:s})}}class VideoTexture extends Texture{constructor(e,t,n,i,r,a,s,o,l){super(e,t,n,i,r,a,s,o,l),this.isVideoTexture=!0,this.minFilter=void 0!==a?a:$,this.magFilter=void 0!==r?r:$,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function updateVideo(){c.needsUpdate=!0,e.requestVideoFrameCallback(updateVideo)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class CompressedTexture extends Texture{constructor(e,t,n,i,r,a,s,o,l,c,h,u){super(null,a,s,o,l,c,i,r,h,u),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class CompressedArrayTexture extends CompressedTexture{constructor(e,t,n,i,r,a){super(e,t,n,r,a),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Y}}class CompressedCubeTexture extends CompressedTexture{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,H),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class CanvasTexture extends Texture{constructor(e,t,n,i,r,a,s,o,l){super(e,t,n,i,r,a,s,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class SphereGeometry extends BufferGeometry{constructor(e=1,t=32,n=16,i=0,r=2*Math.PI,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:a,thetaLength:s},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const o=Math.min(a+s,Math.PI);let l=0;const c=[],h=new Vector3,u=new Vector3,d=[],p=[],f=[],m=[];for(let d=0;d<=n;d++){const g=[],_=d/n;let v=0;0===d&&0===a?v=.5/t:d===n&&o===Math.PI&&(v=-.5/t);for(let n=0;n<=t;n++){const o=n/t;h.x=-e*Math.cos(i+o*r)*Math.sin(a+_*s),h.y=e*Math.cos(a+_*s),h.z=e*Math.sin(i+o*r)*Math.sin(a+_*s),p.push(h.x,h.y,h.z),u.copy(h).normalize(),f.push(u.x,u.y,u.z),m.push(o+v,1-_),g.push(l++)}c.push(g)}for(let e=0;e<n;e++)for(let i=0;i<t;i++){const t=c[e][i+1],r=c[e][i],s=c[e+1][i],l=c[e+1][i+1];(0!==e||a>0)&&d.push(t,r,l),(e!==n-1||o<Math.PI)&&d.push(r,s,l)}this.setIndex(d),this.setAttribute("position",new Float32BufferAttribute(p,3)),this.setAttribute("normal",new Float32BufferAttribute(f,3)),this.setAttribute("uv",new Float32BufferAttribute(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new SphereGeometry(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class MeshStandardMaterial extends Material{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Color(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MeshPhysicalMaterial extends MeshStandardMaterial{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Vector2(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return clamp(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Color(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Color(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Color(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class MeshLambertMaterial extends Material{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Color(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=L,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function convertArray(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function isTypedArray(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function getKeyframeOrder(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function compareTime(t,n){return e[t]-e[n]})),n}function sortedArray(e,t,n){const i=e.length,r=new e.constructor(i);for(let a=0,s=0;s!==i;++a){const i=n[a]*t;for(let n=0;n!==t;++n)r[s++]=e[i+n]}return r}function flattenJSON(e,t,n,i){let r=1,a=e[0];for(;void 0!==a&&void 0===a[i];)a=e[r++];if(void 0===a)return;let s=a[i];if(void 0!==s)if(Array.isArray(s))do{s=a[i],void 0!==s&&(t.push(a.time),n.push.apply(n,s)),a=e[r++]}while(void 0!==a);else if(void 0!==s.toArray)do{s=a[i],void 0!==s&&(t.push(a.time),s.toArray(n,n.length)),a=e[r++]}while(void 0!==a);else do{s=a[i],void 0!==s&&(t.push(a.time),n.push(s)),a=e[r++]}while(void 0!==a)}class Interpolant{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],r=t[n-1];e:{t:{let a;n:{i:if(!(e<i)){for(let a=n+2;;){if(void 0===i){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(r=i,i=t[++n],e<i)break t}a=t.length;break n}if(e>=r)break e;{const s=t[1];e<s&&(n=2,r=s);for(let a=n-2;;){if(void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(n===a)break;if(i=r,r=t[--n-1],e>=r)break t}a=n,n=0}}for(;n<a;){const i=n+a>>>1;e<t[i]?a=i:n=i+1}if(i=t[n],r=t[n-1],void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===i)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let e=0;e!==i;++e)t[e]=n[r+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class CubicInterpolant extends Interpolant{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Ne,endingEnd:Ne}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,a=e+1,s=i[r],o=i[a];if(void 0===s)switch(this.getSettings_().endingStart){case Oe:r=e,s=2*t-n;break;case Be:r=i.length-2,s=t+i[r]-i[r+1];break;default:r=e,s=n}if(void 0===o)switch(this.getSettings_().endingEnd){case Oe:a=e,o=2*n-t;break;case Be:a=1,o=n+i[1]-i[0];break;default:a=e-1,o=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-n),this._offsetPrev=r*c,this._offsetNext=a*c}interpolate_(e,t,n,i){const r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,c=this._offsetPrev,h=this._offsetNext,u=this._weightPrev,d=this._weightNext,p=(n-t)/(i-t),f=p*p,m=f*p,g=-u*m+2*u*f-u*p,_=(1+u)*m+(-1.5-2*u)*f+(-.5+u)*p+1,v=(-1-d)*m+(1.5+d)*f+.5*p,x=d*m-d*f;for(let e=0;e!==s;++e)r[e]=g*a[c+e]+_*a[l+e]+v*a[o+e]+x*a[h+e];return r}}class LinearInterpolant extends Interpolant{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,c=(n-t)/(i-t),h=1-c;for(let e=0;e!==s;++e)r[e]=a[l+e]*h+a[o+e]*c;return r}}class DiscreteInterpolant extends Interpolant{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class KeyframeTrack{constructor(e,t,n,i){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=convertArray(t,this.TimeBufferType),this.values=convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:convertArray(e.times,Array),values:convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new DiscreteInterpolant(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new LinearInterpolant(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new CubicInterpolant(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Ue:t=this.InterpolantFactoryMethodDiscrete;break;case Ie:t=this.InterpolantFactoryMethodLinear;break;case De:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return i.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Ue;case this.InterpolantFactoryMethodLinear:return Ie;case this.InterpolantFactoryMethodSmooth:return De}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let r=0,a=i-1;for(;r!==i&&n[r]<e;)++r;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==r||a!==i){r>=a&&(a=Math.max(a,1),r=a-1);const e=this.getValueSize();this.times=n.slice(r,a),this.values=this.values.slice(r*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(i.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,a=n.length;0===a&&(i.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let t=0;t!==a;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){i.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==s&&s>r){i.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,s),e=!1;break}s=r}if(void 0!==r&&isTypedArray(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){i.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===De,r=e.length-1;let a=1;for(let s=1;s<r;++s){let r=!1;const o=e[s];if(o!==e[s+1]&&(1!==s||o!==e[0]))if(i)r=!0;else{const e=s*n,i=e-n,a=e+n;for(let s=0;s!==n;++s){const n=t[e+s];if(n!==t[i+s]||n!==t[a+s]){r=!0;break}}}if(r){if(s!==a){e[a]=e[s];const i=s*n,r=a*n;for(let e=0;e!==n;++e)t[r+e]=t[i+e]}++a}}if(r>0){e[a]=e[r];for(let e=r*n,i=a*n,s=0;s!==n;++s)t[i+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}KeyframeTrack.prototype.TimeBufferType=Float32Array,KeyframeTrack.prototype.ValueBufferType=Float32Array,KeyframeTrack.prototype.DefaultInterpolation=Ie;class BooleanKeyframeTrack extends KeyframeTrack{}BooleanKeyframeTrack.prototype.ValueTypeName="bool",BooleanKeyframeTrack.prototype.ValueBufferType=Array,BooleanKeyframeTrack.prototype.DefaultInterpolation=Ue,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class ColorKeyframeTrack extends KeyframeTrack{}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(n-t)/(i-t);let l=e*s;for(let e=l+s;l!==e;l+=4)Quaternion.slerpFlat(r,0,a,l-s,a,l,o);return r}}class QuaternionKeyframeTrack extends KeyframeTrack{InterpolantFactoryMethodLinear(e){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),e)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion",QuaternionKeyframeTrack.prototype.DefaultInterpolation=Ie,QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class StringKeyframeTrack extends KeyframeTrack{}StringKeyframeTrack.prototype.ValueTypeName="string",StringKeyframeTrack.prototype.ValueBufferType=Array,StringKeyframeTrack.prototype.DefaultInterpolation=Ue,StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class VectorKeyframeTrack extends KeyframeTrack{}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(e,t=-1,n,i=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=generateUUID(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let e=0,r=n.length;e!==r;++e)t.push(parseKeyframeTrack(n[e]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,i=n.length;e!==i;++e)t.push(KeyframeTrack.toJSON(n[e]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const r=t.length,a=[];for(let e=0;e<r;e++){let s=[],o=[];s.push((e+r-1)%r,e,(e+1)%r),o.push(0,1,0);const l=getKeyframeOrder(s);s=sortedArray(s,1,l),o=sortedArray(o,1,l),i||0!==s[0]||(s.push(r),o.push(o[0])),a.push(new NumberKeyframeTrack(".morphTargetInfluences["+t[e].name+"]",s,o).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=n.name.match(r);if(a&&a.length>1){const e=a[1];let t=i[e];t||(i[e]=t=[]),t.push(n)}}const a=[];for(const e in i)a.push(this.CreateFromMorphTargetSequence(e,i[e],t,n));return a}static parseAnimation(e,t){if(!e)return i.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const addNonemptyTrack=function(e,t,n,i,r){if(0!==n.length){const a=[],s=[];flattenJSON(n,a,s,i),0!==a.length&&r.push(new e(t,a,s))}},n=[],r=e.name||"default",a=e.fps||30,s=e.blendMode;let o=e.length||-1;const l=e.hierarchy||[];for(let e=0;e<l.length;e++){const i=l[e].keys;if(i&&0!==i.length)if(i[0].morphTargets){const e={};let t;for(t=0;t<i.length;t++)if(i[t].morphTargets)for(let n=0;n<i[t].morphTargets.length;n++)e[i[t].morphTargets[n]]=-1;for(const r in e){const e=[],a=[];for(let n=0;n!==i[t].morphTargets.length;++n){const n=i[t];e.push(n.time),a.push(n.morphTarget===r?1:0)}n.push(new NumberKeyframeTrack(".morphTargetInfluence["+r+"]",e,a))}o=e.length*a}else{const r=".bones["+t[e].name+"]";addNonemptyTrack(VectorKeyframeTrack,r+".position",i,"pos",n),addNonemptyTrack(QuaternionKeyframeTrack,r+".quaternion",i,"rot",n),addNonemptyTrack(VectorKeyframeTrack,r+".scale",i,"scl",n)}}if(0===n.length)return null;return new this(r,o,n,s)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function parseKeyframeTrack(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function getTrackTypeForValueTypeName(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return NumberKeyframeTrack;case"vector":case"vector2":case"vector3":case"vector4":return VectorKeyframeTrack;case"color":return ColorKeyframeTrack;case"quaternion":return QuaternionKeyframeTrack;case"bool":case"boolean":return BooleanKeyframeTrack;case"string":return StringKeyframeTrack}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const wr={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class LoadingManager{constructor(e,t,n){const i=this;let r,a=!1,s=0,o=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){o++,!1===a&&void 0!==i.onStart&&i.onStart(e,s,o),a=!0},this.itemEnd=function(e){s++,void 0!==i.onProgress&&i.onProgress(e,s,o),s===o&&(a=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(e){void 0!==i.onError&&i.onError(e)},this.resolveURL=function(e){return r?r(e):e},this.setURLModifier=function(e){return r=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],i=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return i}return null}}}const Rr=new LoadingManager;class Loader{constructor(e){this.manager=void 0!==e?e:Rr,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(i,r){n.load(e,i,t,r)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}Loader.DEFAULT_MATERIAL_NAME="__DEFAULT";const Cr={};class HttpError extends Error{constructor(e,t){super(e),this.response=t}}class FileLoader extends Loader{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const a=wr.get(e);if(void 0!==a)return this.manager.itemStart(e),setTimeout((()=>{t&&t(a),this.manager.itemEnd(e)}),0),a;if(void 0!==Cr[e])return void Cr[e].push({onLoad:t,onProgress:n,onError:r});Cr[e]=[],Cr[e].push({onLoad:t,onProgress:n,onError:r});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,l=this.responseType;fetch(s).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&i.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=Cr[e],r=t.body.getReader(),a=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),s=a?parseInt(a):0,o=0!==s;let l=0;const c=new ReadableStream({start(e){!function readData(){r.read().then((({done:t,value:i})=>{if(t)e.close();else{l+=i.byteLength;const t=new ProgressEvent("progress",{lengthComputable:o,loaded:l,total:s});for(let e=0,i=n.length;e<i;e++){const i=n[e];i.onProgress&&i.onProgress(t)}e.enqueue(i),readData()}}))}()}});return new Response(c)}throw new HttpError(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)})).then((e=>{switch(l){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,o)));case"json":return e.json();default:if(void 0===o)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(o),n=t&&t[1]?t[1].toLowerCase():void 0,i=new TextDecoder(n);return e.arrayBuffer().then((e=>i.decode(e)))}}})).then((t=>{wr.add(e,t);const n=Cr[e];delete Cr[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];i.onLoad&&i.onLoad(t)}})).catch((t=>{const n=Cr[e];if(void 0===n)throw this.manager.itemError(e),t;delete Cr[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];i.onError&&i.onError(t)}this.manager.itemError(e)})).finally((()=>{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class ImageLoader extends Loader{constructor(e){super(e)}load(e,t,n,i){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,a=wr.get(e);if(void 0!==a)return r.manager.itemStart(e),setTimeout((function(){t&&t(a),r.manager.itemEnd(e)}),0),a;const s=createElementNS("img");function onImageLoad(){removeEventListeners(),wr.add(e,this),t&&t(this),r.manager.itemEnd(e)}function onImageError(t){removeEventListeners(),i&&i(t),r.manager.itemError(e),r.manager.itemEnd(e)}function removeEventListeners(){s.removeEventListener("load",onImageLoad,!1),s.removeEventListener("error",onImageError,!1)}return s.addEventListener("load",onImageLoad,!1),s.addEventListener("error",onImageError,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),r.manager.itemStart(e),s.src=e,s}}class DataTextureLoader extends Loader{constructor(e){super(e)}load(e,t,n,r){const a=this,s=new DataTexture,o=new FileLoader(this.manager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(a.withCredentials),o.load(e,(function(e){let n;try{n=a.parse(e)}catch(e){if(void 0===r)return void i.error(e);r(e)}void 0!==n.image?s.image=n.image:void 0!==n.data&&(s.image.width=n.width,s.image.height=n.height,s.image.data=n.data),s.wrapS=void 0!==n.wrapS?n.wrapS:Y,s.wrapT=void 0!==n.wrapT?n.wrapT:Y,s.magFilter=void 0!==n.magFilter?n.magFilter:$,s.minFilter=void 0!==n.minFilter?n.minFilter:$,s.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.colorSpace?s.colorSpace=n.colorSpace:void 0!==n.encoding&&(s.encoding=n.encoding),void 0!==n.flipY&&(s.flipY=n.flipY),void 0!==n.format&&(s.format=n.format),void 0!==n.type&&(s.type=n.type),void 0!==n.mipmaps&&(s.mipmaps=n.mipmaps,s.minFilter=te),1===n.mipmapCount&&(s.minFilter=$),void 0!==n.generateMipmaps&&(s.generateMipmaps=n.generateMipmaps),s.needsUpdate=!0,t&&t(s,n)}),n,r),s}}class TextureLoader extends Loader{constructor(e){super(e)}load(e,t,n,i){const r=new Texture,a=new ImageLoader(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,(function(e){r.image=e,r.needsUpdate=!0,void 0!==t&&t(r)}),n,i),r}}class Light extends Object3D{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Color(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}const Lr=new Matrix4,Pr=new Vector3,Ur=new Vector3;class LightShadow{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Vector2(512,512),this.map=null,this.mapPass=null,this.matrix=new Matrix4,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Frustum,this._frameExtents=new Vector2(1,1),this._viewportCount=1,this._viewports=[new Vector4(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Pr.setFromMatrixPosition(e.matrixWorld),t.position.copy(Pr),Ur.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Ur),t.updateMatrixWorld(),Lr.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Lr),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Lr)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class SpotLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=2*mt*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;n===t.fov&&i===t.aspect&&r===t.far||(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class SpotLight extends Light{constructor(e,t,n=0,i=Math.PI/3,r=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.distance=n,this.angle=i,this.penumbra=r,this.decay=a,this.map=null,this.shadow=new SpotLightShadow}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Ir=new Matrix4,Dr=new Vector3,Nr=new Vector3;class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Vector2(4,2),this._viewportCount=6,this._viewports=[new Vector4(2,1,1,1),new Vector4(0,1,1,1),new Vector4(3,1,1,1),new Vector4(1,1,1,1),new Vector4(3,0,1,1),new Vector4(1,0,1,1)],this._cubeDirections=[new Vector3(1,0,0),new Vector3(-1,0,0),new Vector3(0,0,1),new Vector3(0,0,-1),new Vector3(0,1,0),new Vector3(0,-1,0)],this._cubeUps=[new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,0,1),new Vector3(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,r=e.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),Dr.setFromMatrixPosition(e.matrixWorld),n.position.copy(Dr),Nr.copy(n.position),Nr.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Nr),n.updateMatrixWorld(),i.makeTranslation(-Dr.x,-Dr.y,-Dr.z),Ir.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ir)}}class PointLight extends Light{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new PointLightShadow}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class DirectionalLightShadow extends LightShadow{constructor(){super(new OrthographicCamera(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DirectionalLight extends Light{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.shadow=new DirectionalLightShadow}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class SphericalHarmonics3{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Vector3)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,i=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*i),t.addScaledVector(a[2],.488603*r),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*i*1.092548),t.addScaledVector(a[5],i*r*1.092548),t.addScaledVector(a[6],.315392*(3*r*r-1)),t.addScaledVector(a[7],n*r*1.092548),t.addScaledVector(a[8],.546274*(n*n-i*i)),t}getIrradianceAt(e,t){const n=e.x,i=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*i),t.addScaledVector(a[2],1.023328*r),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*i),t.addScaledVector(a[5],.858086*i*r),t.addScaledVector(a[6],.743125*r*r-.247708),t.addScaledVector(a[7],.858086*n*r),t.addScaledVector(a[8],.429043*(n*n-i*i)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(e,t+3*i);return this}toArray(e=[],t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(e,t+3*i);return e}static getBasisAt(e,t){const n=e.x,i=e.y,r=e.z;t[0]=.282095,t[1]=.488603*i,t[2]=.488603*r,t[3]=.488603*n,t[4]=1.092548*n*i,t[5]=1.092548*i*r,t[6]=.315392*(3*r*r-1),t[7]=1.092548*n*r,t[8]=.546274*(n*n-i*i)}}class LightProbe extends Light{constructor(e=new SphericalHarmonics3,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class LoaderUtils{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,i=e.length;n<i;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class ImageBitmapLoader extends Loader{constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&i.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&i.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,i){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,a=wr.get(e);if(void 0!==a)return r.manager.itemStart(e),a.then?void a.then((n=>{t&&t(n),r.manager.itemEnd(e)})).catch((e=>{i&&i(e)})):(setTimeout((function(){t&&t(a),r.manager.itemEnd(e)}),0),a);const s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader;const o=fetch(e,s).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(r.options,{colorSpaceConversion:"none"}))})).then((function(n){return wr.add(e,n),t&&t(n),r.manager.itemEnd(e),n})).catch((function(t){i&&i(t),wr.remove(e),r.manager.itemError(e),r.manager.itemEnd(e)}));wr.add(e,o),r.manager.itemStart(e)}}class Clock{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function now(){return("undefined"==typeof performance?Date:performance).now()}class PropertyMixer{constructor(e,t,n){let i,r,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":i=this._slerp,r=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":i=this._select,r=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:i=this._lerp,r=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=r,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,i=this.valueSize,r=e*i+i;let a=this.cumulativeWeight;if(0===a){for(let e=0;e!==i;++e)n[r+e]=n[e];a=t}else{a+=t;const e=t/a;this._mixBufferRegion(n,r,0,e,i)}this.cumulativeWeight=a}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,i=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,i,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,i=e*t+t,r=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){const e=t*this._origIndex;this._mixBufferRegion(n,i,e,1-r,t)}a>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let e=t,r=t+t;e!==r;++e)if(n[e]!==n[e+t]){s.setValue(n,i);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let e=n,r=i;e!==r;++e)t[e]=t[i+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,i,r){if(i>=.5)for(let i=0;i!==r;++i)e[t+i]=e[n+i]}_slerp(e,t,n,i){Quaternion.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,r){const a=this._workIndex*r;Quaternion.multiplyQuaternionsFlat(e,a,e,t,e,n),Quaternion.slerpFlat(e,t,e,t,e,a,i)}_lerp(e,t,n,i,r){const a=1-i;for(let s=0;s!==r;++s){const r=t+s;e[r]=e[r]*a+e[n+s]*i}}_lerpAdditive(e,t,n,i,r){for(let a=0;a!==r;++a){const r=t+a;e[r]=e[r]+e[n+a]*i}}}const Or="\\[\\]\\.:\\/",Br=new RegExp("["+Or+"]","g"),Fr="[^"+Or+"]",Vr="[^"+Or.replace("\\.","")+"]",zr=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Fr)+/(WCOD+)?/.source.replace("WCOD",Vr)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Fr)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Fr)+"$"),Gr=["material","materials","bones","map"];class PropertyBinding{constructor(e,t,n){this.path=t,this.parsedPath=n||PropertyBinding.parseTrackName(t),this.node=PropertyBinding.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new PropertyBinding.Composite(e,t,n):new PropertyBinding(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Br,"")}static parseTrackName(e){const t=zr.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){const e=n.nodeName.substring(i+1);-1!==Gr.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const searchNodeSubtree=function(e){for(let n=0;n<e.length;n++){const i=e[n];if(i.name===t||i.uuid===t)return i;const r=searchNodeSubtree(i.children);if(r)return r}return null},n=searchNodeSubtree(e.children);if(n)return n}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)e[t++]=n[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let a=t.propertyIndex;if(e||(e=PropertyBinding.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void i.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void i.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void i.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void i.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void i.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void i.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[n])return void i.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void i.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const s=e[r];if(void 0===s){const n=t.nodeName;return void i.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let o=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?o=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(o=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(void 0!==a){if("morphTargetInfluences"===r){if(!e.geometry)return void i.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void i.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[a]&&(a=e.morphTargetDictionary[a])}l=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=a}else void 0!==s.fromArray&&void 0!==s.toArray?(l=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(l=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}PropertyBinding.Composite=class Composite{constructor(e,t,n){const i=n||PropertyBinding.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},PropertyBinding.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},PropertyBinding.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},PropertyBinding.prototype.GetterByBindingType=[PropertyBinding.prototype._getValue_direct,PropertyBinding.prototype._getValue_array,PropertyBinding.prototype._getValue_arrayElement,PropertyBinding.prototype._getValue_toArray],PropertyBinding.prototype.SetterByBindingTypeAndVersioning=[[PropertyBinding.prototype._setValue_direct,PropertyBinding.prototype._setValue_direct_setNeedsUpdate,PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_array,PropertyBinding.prototype._setValue_array_setNeedsUpdate,PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_arrayElement,PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_fromArray,PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class AnimationAction{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;const r=t.tracks,a=r.length,s=new Array(a),o={endingStart:Ne,endingEnd:Ne};for(let e=0;e!==a;++e){const t=r[e].createInterpolant(null);s[e]=t,t.settings=o}this._interpolantSettings=o,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Le,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,i=e._clip.duration,r=i/n,a=n/i;e.warp(1,r,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const i=this._mixer,r=i.time,a=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=i._lendControlInterpolant(),this._timeScaleInterpolant=s);const o=s.parameterPositions,l=s.sampleValues;return o[0]=r,o[1]=r+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled)return void this._updateWeight(e);const r=this._startTime;if(null!==r){const i=(e-r)*n;i<0||0===n?t=0:(this._startTime=null,t=n*i)}t*=this._updateTimeScale(e);const a=this._updateTime(t),s=this._updateWeight(e);if(s>0){const e=this._interpolants,t=this._propertyBindings;if(2501===this.blendMode)for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulateAdditive(s);else for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulate(i,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let i=this.time+e,r=this._loopCount;const a=n===Pe;if(0===e)return-1===r||!a||1&~r?i:t-i;if(n===Ce){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else{if(!(i<0)){this.time=i;break e}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===r&&(e>=0?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),i>=t||i<0){const n=Math.floor(i/t);i-=t*n,r+=Math.abs(n);const s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){const t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=i;if(a&&!(1&~r))return t-i}return i}_setEndings(e,t,n){const i=this._interpolantSettings;n?(i.endingStart=Oe,i.endingEnd=Oe):(i.endingStart=e?this.zeroSlopeAtStart?Oe:Ne:Be,i.endingEnd=t?this.zeroSlopeAtEnd?Oe:Ne:Be)}_scheduleFading(e,t,n){const i=this._mixer,r=i.time;let a=this._weightInterpolant;null===a&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);const s=a.parameterPositions,o=a.sampleValues;return s[0]=r,o[0]=t,s[1]=r+e,o[1]=n,this}}const Hr=new Float32Array(1);class AnimationMixer extends EventDispatcher{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,i=e._clip.tracks,r=i.length,a=e._propertyBindings,s=e._interpolants,o=n.uuid,l=this._bindingsByRootAndName;let c=l[o];void 0===c&&(c={},l[o]=c);for(let e=0;e!==r;++e){const r=i[e],l=r.name;let h=c[l];if(void 0!==h)++h.referenceCount,a[e]=h;else{if(h=a[e],void 0!==h){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,o,l));continue}const i=t&&t._propertyBindings[e].binding.parsedPath;h=new PropertyMixer(PropertyBinding.create(n,l,i),r.ValueTypeName,r.getValueSize()),++h.referenceCount,this._addInactiveBinding(h,o,l),a[e]=h}s[e].resultBuffer=h.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,i=this._actionsByClip[n];this._bindAction(e,i&&i.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const i=this._actions,r=this._actionsByClip;let a=r[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=a;else{const t=a.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=i.length,i.push(e),a.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],i=e._cacheIndex;n._cacheIndex=i,t[i]=n,t.pop(),e._cacheIndex=null;const r=e._clip.uuid,a=this._actionsByClip,s=a[r],o=s.knownActions,l=o[o.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,o[c]=l,o.pop(),e._byClipCacheIndex=null;delete s.actionByRoot[(e._localRoot||this._root).uuid],0===o.length&&delete a[r],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,i=this._nActiveActions++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,i=--this._nActiveActions,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_addInactiveBinding(e,t,n){const i=this._bindingsByRootAndName,r=this._bindings;let a=i[t];void 0===a&&(a={},i[t]=a),a[n]=e,e._cacheIndex=r.length,r.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,i=n.rootNode.uuid,r=n.path,a=this._bindingsByRootAndName,s=a[i],o=t[t.length-1],l=e._cacheIndex;o._cacheIndex=l,t[l]=o,t.pop(),delete s[r],0===Object.keys(s).length&&delete a[i]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new LinearInterpolant(new Float32Array(2),new Float32Array(2),1,Hr),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,r=t[i];e.__cacheIndex=i,t[i]=e,r.__cacheIndex=n,t[n]=r}clipAction(e,t,n){const i=t||this._root,r=i.uuid;let a="string"==typeof e?AnimationClip.findByName(i,e):e;const s=null!==a?a.uuid:e,o=this._actionsByClip[s];let l=null;if(void 0===n&&(n=null!==a?a.blendMode:Fe),void 0!==o){const e=o.actionByRoot[r];if(void 0!==e&&e.blendMode===n)return e;l=o.knownActions[0],null===a&&(a=l._clip)}if(null===a)return null;const c=new AnimationAction(this,a,t,n);return this._bindAction(c,l),this._addInactiveAction(c,s,r),c}existingAction(e,t){const n=t||this._root,i=n.uuid,r="string"==typeof e?AnimationClip.findByName(n,e):e,a=r?r.uuid:e,s=this._actionsByClip[a];return void 0!==s&&s.actionByRoot[i]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,i=this.time+=e,r=Math.sign(e),a=this._accuIndex^=1;for(let s=0;s!==n;++s){t[s]._update(i,e,r,a)}const s=this._bindings,o=this._nActiveBindings;for(let e=0;e!==o;++e)s[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,i=this._actionsByClip,r=i[n];if(void 0!==r){const e=r.knownActions;for(let n=0,i=e.length;n!==i;++n){const i=e[n];this._deactivateAction(i);const r=i._cacheIndex,a=t[t.length-1];i._cacheIndex=null,i._byClipCacheIndex=null,a._cacheIndex=r,t[r]=a,t.pop(),this._removeInactiveBindingsForAction(i)}delete i[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const i=n[e].actionByRoot[t];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}const i=this._bindingsByRootAndName[t];if(void 0!==i)for(const e in i){const t=i[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class Uniform{constructor(e){this.value=e}clone(){return new Uniform(void 0===this.value.clone?this.value:this.value.clone())}}class Raycaster{constructor(e,t,n=0,i=1/0){this.ray=new Ray(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Layers,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):i.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!0,n=[]){return intersectObject(e,this,n,t),n.sort(ascSort),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)intersectObject(e[i],this,n,t);return n.sort(ascSort),n}}function ascSort(e,t){return e.distance-t.distance}function intersectObject(e,t,n,i){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===i){const i=e.children;for(let e=0,r=i.length;e<r;e++)intersectObject(i[e],t,n,!0)}}class Spherical{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(clamp(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:r}})),"undefined"!=typeof window&&(window.__THREE__?i.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=r)},51163:(e,t,n)=>{n.d(t,{Cc:()=>lerp,qE:()=>clamp});n(96763);Math.PI,Math.PI;function clamp(e,t,n){return Math.max(t,Math.min(n,e))}function lerp(e,t,n){return(1-n)*e+n*t}}}]);
|