rapidfireai 0.0.1__py3-none-any.whl → 0.9.9__py3-none-any.whl
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.
Potentially problematic release.
This version of rapidfireai might be problematic. Click here for more details.
- rapidfireai/__init__.py +11 -5
- rapidfireai/automl/__init__.py +20 -0
- rapidfireai/automl/base.py +48 -0
- rapidfireai/automl/datatypes.py +42 -0
- rapidfireai/automl/grid_search.py +125 -0
- rapidfireai/automl/model_config.py +102 -0
- rapidfireai/automl/random_search.py +145 -0
- rapidfireai/backend/__init__.py +0 -0
- rapidfireai/backend/chunks.py +63 -0
- rapidfireai/backend/controller.py +637 -0
- rapidfireai/backend/scheduler.py +137 -0
- rapidfireai/backend/worker.py +272 -0
- rapidfireai/cli.py +380 -0
- rapidfireai/db/__init__.py +0 -0
- rapidfireai/db/db_interface.py +135 -0
- rapidfireai/db/rf_db.py +694 -0
- rapidfireai/db/tables.sql +64 -0
- rapidfireai/dispatcher/dispatcher.py +391 -0
- rapidfireai/dispatcher/gunicorn.conf.py +25 -0
- rapidfireai/experiment.py +168 -0
- rapidfireai/frontend/build/asset-manifest.json +276 -0
- rapidfireai/frontend/build/favicon.ico +0 -0
- rapidfireai/frontend/build/index.html +1 -0
- rapidfireai/frontend/build/manifest.json +15 -0
- rapidfireai/frontend/build/pdf.worker.js +1 -0
- rapidfireai/frontend/build/report.html +39 -0
- rapidfireai/frontend/build/static/css/1482.3b7bf531.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/2730.3f8937ff.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/318.0def90a7.css +7 -0
- rapidfireai/frontend/build/static/css/4762.9b7b71f7.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/4950.487ecc8b.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/5170.2574ce9d.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/6121.4d541986.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/6343.dd6979f2.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/6534.433c213f.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/6920.ffac4b2a.css +2 -0
- rapidfireai/frontend/build/static/css/7246.bf2f0c87.css +9 -0
- rapidfireai/frontend/build/static/css/7367.dd6979f2.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/8690.05d081e5.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/9531.d0910d3c.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/9780.363e4943.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/main~d91a9049.c0be472c.css +1 -0
- rapidfireai/frontend/build/static/js/1000.e5ed264b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1012.ac98ab59.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1079.6c13ac0d.js +1 -0
- rapidfireai/frontend/build/static/js/110.9059f3b8.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1142.872d0010.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1167.9a6da14c.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1248.60890b4f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1262.83dc7673.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1273.56da3e13.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/1273.56da3e13.chunk.js.LICENSE.txt +9 -0
- rapidfireai/frontend/build/static/js/1303.7d19305c.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1351.45076ff3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1355.b896a592.js +1 -0
- rapidfireai/frontend/build/static/js/1357.02c46a02.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1470.c51d60c6.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1482.23b74f50.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1500.19799d8d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1648.d3b9edc7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1860.7d96e3f9.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1909.5b1d9ff4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1928.44245110.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/1928.44245110.chunk.js.LICENSE.txt +11 -0
- rapidfireai/frontend/build/static/js/1933.deba26ca.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/21.aac92802.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2103.0ca12071.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2258.b3b8fab4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2289.9ad51e87.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2323.7dd927d7.js +2 -0
- rapidfireai/frontend/build/static/js/2323.7dd927d7.js.LICENSE.txt +1 -0
- rapidfireai/frontend/build/static/js/2346.ed99ca72.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2386.0a660834.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2402.465048f9.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/243.5a83bbca.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2589.68571e16.js +1 -0
- rapidfireai/frontend/build/static/js/2647.65092bab.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2691.65d4a4e7.js +1 -0
- rapidfireai/frontend/build/static/js/2730.b38dd6f3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2746.ef752da4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2779.580d4491.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2799.fe5993b2.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2844.9708db79.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/2844.9708db79.chunk.js.LICENSE.txt +21 -0
- rapidfireai/frontend/build/static/js/2901.ee0c606b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2932.7cc0689b.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/2932.7cc0689b.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/2956.a393c8cc.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2972.679bed05.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2985.7e51cdfa.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/2985.7e51cdfa.chunk.js.LICENSE.txt +51 -0
- rapidfireai/frontend/build/static/js/3093.488df653.js +1 -0
- rapidfireai/frontend/build/static/js/3145.66ee61b9.js +1 -0
- rapidfireai/frontend/build/static/js/3170.a22f966a.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/3170.a22f966a.chunk.js.LICENSE.txt +21 -0
- rapidfireai/frontend/build/static/js/3307.f6fb258c.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3325.d5b03d65.js +1 -0
- rapidfireai/frontend/build/static/js/3334.2d6704df.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/3334.2d6704df.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/3387.bb8edad3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3448.438e6579.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3460.735eea87.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3505.7fd3921a.js +2 -0
- rapidfireai/frontend/build/static/js/3505.7fd3921a.js.LICENSE.txt +9 -0
- rapidfireai/frontend/build/static/js/3510.cd167a00.js +2 -0
- rapidfireai/frontend/build/static/js/3510.cd167a00.js.LICENSE.txt +18 -0
- rapidfireai/frontend/build/static/js/3563.cc828e19.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/359.08960b84.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/359.08960b84.chunk.js.LICENSE.txt +4 -0
- rapidfireai/frontend/build/static/js/3608.403b4b79.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3652.cb8add7f.js +1 -0
- rapidfireai/frontend/build/static/js/3775.5230b157.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3817.53555d18.js +2 -0
- rapidfireai/frontend/build/static/js/3817.53555d18.js.LICENSE.txt +18 -0
- rapidfireai/frontend/build/static/js/3835.d9946ff9.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3964.874f0297.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3968.275cbc3d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3999.765cbd82.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4020.4452c046.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4138.2f6f6d9f.js +1 -0
- rapidfireai/frontend/build/static/js/4160.f424554c.js +1 -0
- rapidfireai/frontend/build/static/js/4180.50cea095.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4221.b0bba3f5.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4250.5bb49278.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4297.15777d8f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4349.c965f2de.js +2 -0
- rapidfireai/frontend/build/static/js/4349.c965f2de.js.LICENSE.txt +1 -0
- rapidfireai/frontend/build/static/js/4484.4cbe5e7f.js +2 -0
- rapidfireai/frontend/build/static/js/4484.4cbe5e7f.js.LICENSE.txt +10 -0
- rapidfireai/frontend/build/static/js/4578.a8124588.js +1 -0
- rapidfireai/frontend/build/static/js/4596.89a97480.js +1 -0
- rapidfireai/frontend/build/static/js/4748.566f435a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4762.928e8a90.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4768.7945be63.js +2 -0
- rapidfireai/frontend/build/static/js/4768.7945be63.js.LICENSE.txt +1 -0
- rapidfireai/frontend/build/static/js/4804.26b50dd4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4850.62390a45.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4862.a0ccb221.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/491.5dc8ed40.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/492.9262f038.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/492.9262f038.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/4943.6d345fd3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4950.bc182e62.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5042.d4f0c65a.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/5042.d4f0c65a.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/5170.0065e96f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5222.35c74a52.js +2 -0
- rapidfireai/frontend/build/static/js/5222.35c74a52.js.LICENSE.txt +10 -0
- rapidfireai/frontend/build/static/js/5223.3224f019.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/5223.3224f019.chunk.js.LICENSE.txt +3 -0
- rapidfireai/frontend/build/static/js/5229.7dd42316.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5286.4c1ad26b.js +1 -0
- rapidfireai/frontend/build/static/js/5486.21cff711.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5526.7b368956.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5605.1ee4d87b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5682.40b42d8b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5794.9433d867.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5826.38a56e8c.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/5826.38a56e8c.chunk.js.LICENSE.txt +1 -0
- rapidfireai/frontend/build/static/js/5862.50f42a0b.js +1 -0
- rapidfireai/frontend/build/static/js/5895.e26742f1.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5919.edd4a5cf.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/598.a0e792ae.js +1 -0
- rapidfireai/frontend/build/static/js/6058.74162bf9.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/618.06051134.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/618.06051134.chunk.js.LICENSE.txt +21 -0
- rapidfireai/frontend/build/static/js/6335.9fca442d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6336.e05e1154.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6343.2bcd28ff.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6363.a319b8f2.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6478.344abf25.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6504.1c004564.js +1 -0
- rapidfireai/frontend/build/static/js/6534.ec7e149b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6715.55a5c19c.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6756.e6cb993c.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/6756.e6cb993c.chunk.js.LICENSE.txt +10 -0
- rapidfireai/frontend/build/static/js/6762.acfde9fd.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/6762.acfde9fd.chunk.js.LICENSE.txt +19 -0
- rapidfireai/frontend/build/static/js/6846.67103d0e.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6861.34cf0198.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6899.0eaf36a8.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/6899.0eaf36a8.chunk.js.LICENSE.txt +5 -0
- rapidfireai/frontend/build/static/js/6933.8b564944.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/699.d0437920.js +1 -0
- rapidfireai/frontend/build/static/js/7076.4182f63a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7186.42ad86d5.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7248.a46635fd.js +1 -0
- rapidfireai/frontend/build/static/js/725.6b15a14a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7266.3575539d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7270.0a1e84fc.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/7270.0a1e84fc.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/7367.7120474f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7436.8e226055.js +1 -0
- rapidfireai/frontend/build/static/js/7504.ef223844.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7603.ee049fe3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7670.2835b49a.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/7670.2835b49a.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/7721.7390b3cc.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7731.5796cced.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/775.660a5deb.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/775.660a5deb.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/7832.7976a3e4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7844.72cc2e81.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7948.48eab032.js +1 -0
- rapidfireai/frontend/build/static/js/7972.085079d4.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/7972.085079d4.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8017.a9e7dc5a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8023.75f1f3df.js +2 -0
- rapidfireai/frontend/build/static/js/8023.75f1f3df.js.LICENSE.txt +41 -0
- rapidfireai/frontend/build/static/js/8123.b69db974.js +1 -0
- rapidfireai/frontend/build/static/js/813.065a87e5.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/819.2056f122.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/819.2056f122.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8262.04bc17d1.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8300.75adcc4f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8336.b1d3e764.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8365.26cf64ea.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8398.8bca8e0e.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/8398.8bca8e0e.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/847.33ceed50.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/847.33ceed50.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8486.8ec852a7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8497.19378265.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8541.4c55c9f4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8690.e305a804.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/8690.e305a804.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8712.a9445fe6.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8763.61761e08.js +1 -0
- rapidfireai/frontend/build/static/js/8823.baf9bffd.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/8823.baf9bffd.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8867.767462b7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8953.c0f88dea.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8960.357cb1eb.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/8960.357cb1eb.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/9.f4492795.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/9.f4492795.chunk.js.LICENSE.txt +12 -0
- rapidfireai/frontend/build/static/js/9079.88a8d2a3.js +1 -0
- rapidfireai/frontend/build/static/js/9082.37c40520.chunk.js +10 -0
- rapidfireai/frontend/build/static/js/9133.90ae330d.js +2 -0
- rapidfireai/frontend/build/static/js/9133.90ae330d.js.LICENSE.txt +8 -0
- rapidfireai/frontend/build/static/js/9151.1ac359d5.js +2 -0
- rapidfireai/frontend/build/static/js/9151.1ac359d5.js.LICENSE.txt +8 -0
- rapidfireai/frontend/build/static/js/9168.027bf2fd.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9194.9c5cc548.chunk.js +10 -0
- rapidfireai/frontend/build/static/js/9244.026f4aee.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/936.2e02d037.js +2 -0
- rapidfireai/frontend/build/static/js/936.2e02d037.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/9369.7d1a0a1d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9427.7c8442e7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/944.55948859.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9499.c53a82da.js +2 -0
- rapidfireai/frontend/build/static/js/9499.c53a82da.js.LICENSE.txt +62 -0
- rapidfireai/frontend/build/static/js/9531.3ce05781.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9547.92fac952.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/9547.92fac952.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/9620.b6e973a7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9645.6fddfa65.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9669.d38dda6d.js +1 -0
- rapidfireai/frontend/build/static/js/9682.41b6b807.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9720.19d5ae76.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/9720.19d5ae76.chunk.js.LICENSE.txt +23 -0
- rapidfireai/frontend/build/static/js/9723.d3c7fe9e.js +1 -0
- rapidfireai/frontend/build/static/js/9780.02a27630.chunk.js +10 -0
- rapidfireai/frontend/build/static/js/9808.d0ca9674.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/9808.d0ca9674.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/9815.b8db3c5d.js +1 -0
- rapidfireai/frontend/build/static/js/9886.2940b53a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/main~1f912138.fa9d03b1.js +1 -0
- rapidfireai/frontend/build/static/js/main~43dd7041.2e00860d.js +1 -0
- rapidfireai/frontend/build/static/js/main~84781932.68deffff.js +1 -0
- rapidfireai/frontend/build/static/media/404-overflow.fad9a31861b0afba6f921ebb8e769688.svg +32 -0
- rapidfireai/frontend/build/static/media/RapidFire_Square_Bug.27ceb48296314a4bc0d4.png +0 -0
- rapidfireai/frontend/build/static/media/chart-bar.0fd4a63680fba840a7b69fbf07969f79.svg +7 -0
- rapidfireai/frontend/build/static/media/chart-contour.0d4b306f2669f3ad25375568935e3ce3.svg +5 -0
- rapidfireai/frontend/build/static/media/chart-difference.16174216d6f3b7c24f40e3541fe0ca2c.svg +20 -0
- rapidfireai/frontend/build/static/media/chart-image.cc434c4dc50780966344e2385a15f8fe.svg +6 -0
- rapidfireai/frontend/build/static/media/chart-line.0adaa2036bb4eb5956db6d0c7e925a3d.svg +4 -0
- rapidfireai/frontend/build/static/media/chart-parallel.da7dedf539b2af4b654d377c679173e4.svg +7 -0
- rapidfireai/frontend/build/static/media/chart-scatter.69118d0023a6ff3973f7fa913834ac47.svg +9 -0
- rapidfireai/frontend/build/static/media/default-error.f246ddf367c6fbd67942e5a13382a7f1.svg +26 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.1e59d2330b4c6deb84b3.ttf +0 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.20fd1704ea223900efa9.woff2 +0 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.8b43027f47b20503057d.eot +0 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.c1e38fd9e0e74ba58f7a.svg +2671 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.f691f37e57f04c152e23.woff +0 -0
- rapidfireai/frontend/build/static/media/icon-visible-fill.8d34cd35303828fdfc15154f5536e63b.svg +7 -0
- rapidfireai/frontend/build/static/media/no-experiments.0e4f4a114ef73e7d81c09474aba64b6c.svg +22 -0
- rapidfireai/frontend/build/static/media/parallel-chart-placeholder.234ef0c5b220ef2a5a6fa5bafff173f7.svg +16 -0
- rapidfireai/frontend/build/static/media/permission-denied-lock.16036747d57cd663d7df223781a447b2.svg +14 -0
- rapidfireai/frontend/build/static/media/promo-modal-content.e3b2c6c568ac192b9bec54b838b54850.svg +30 -0
- rapidfireai/frontend/build/static/media/registered-model-grey-ok.8274b58d39504c8d1b8c358aa1c9aa35.svg +23 -0
- rapidfireai/frontend/build/static/media/warning.290a3b14118933547965e91ea61c5a61.svg +3 -0
- rapidfireai/frontend/proxy_middleware.py +233 -0
- rapidfireai/frontend/server.py +25 -0
- rapidfireai/ml/__init__.py +0 -0
- rapidfireai/ml/callbacks.py +176 -0
- rapidfireai/ml/checkpoint_utils.py +540 -0
- rapidfireai/ml/trainer.py +309 -0
- rapidfireai/start.sh +634 -0
- rapidfireai/utils/__init__.py +0 -0
- rapidfireai/utils/automl_utils.py +51 -0
- rapidfireai/utils/constants.py +141 -0
- rapidfireai/utils/datapaths.py +69 -0
- rapidfireai/utils/exceptions.py +82 -0
- rapidfireai/utils/experiment_utils.py +370 -0
- rapidfireai/utils/logging.py +87 -0
- rapidfireai/utils/mlflow_manager.py +121 -0
- rapidfireai/utils/serialize.py +15 -0
- rapidfireai/utils/shm_manager.py +469 -0
- rapidfireai/utils/trainer_config.py +23 -0
- rapidfireai/utils/worker_manager.py +219 -0
- rapidfireai/version.py +6 -0
- rapidfireai-0.9.9.dist-info/METADATA +242 -0
- rapidfireai-0.9.9.dist-info/RECORD +318 -0
- rapidfireai-0.9.9.dist-info/entry_points.txt +2 -0
- rapidfireai-0.0.1.dist-info/METADATA +0 -37
- rapidfireai-0.0.1.dist-info/RECORD +0 -6
- {rapidfireai-0.0.1.dist-info → rapidfireai-0.9.9.dist-info}/WHEEL +0 -0
- {rapidfireai-0.0.1.dist-info → rapidfireai-0.9.9.dist-info}/licenses/LICENSE +0 -0
- {rapidfireai-0.0.1.dist-info → rapidfireai-0.9.9.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_mlflow_mlflow=self.webpackChunk_mlflow_mlflow||[]).push([[1470],{1470:function(e){e.exports=function(){"use strict";var e=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray},t=function(e,t){for(var r=Object.keys(t),n=0;n<r.length;++n)e[r[n]]=t[r[n]];return e},r="\n";function n(e){return"undefined"!==typeof atob?atob(e):"base64:"+e}function a(e){var t=new Error("(regl) "+e);throw console.error(t),t}function i(e,t){e||a(t)}function o(e){return e?": "+e:""}function f(e,t,r){e in t||a("unknown parameter ("+e+")"+o(r)+". possible values: "+Object.keys(t).join())}function u(t,r){e(t)||a("invalid parameter type"+o(r)+". must be a typed array")}function s(e,t){switch(t){case"number":return"number"===typeof e;case"object":return"object"===typeof e;case"string":return"string"===typeof e;case"boolean":return"boolean"===typeof e;case"function":return"function"===typeof e;case"undefined":return"undefined"===typeof e;case"symbol":return"symbol"===typeof e}}function c(e,t,r){s(e,t)||a("invalid parameter type"+o(r)+". expected "+t+", got "+typeof e)}function l(e,t){e>=0&&(0|e)===e||a("invalid parameter type, ("+e+")"+o(t)+". must be a nonnegative integer")}function d(e,t,r){t.indexOf(e)<0&&a("invalid value"+o(r)+". must be one of: "+t)}var m=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function p(e){Object.keys(e).forEach((function(e){m.indexOf(e)<0&&a('invalid regl constructor argument "'+e+'". must be one of '+m)}))}function h(e,t){for(e+="";e.length<t;)e=" "+e;return e}function b(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function v(e,t){this.number=e,this.line=t,this.errors=[]}function g(e,t,r){this.file=e,this.line=t,this.message=r}function y(){var e=new Error,t=(e.stack||e).toString(),r=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(t);if(r)return r[1];var n=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(t);return n?n[1]:"unknown"}function x(){var e=new Error,t=(e.stack||e).toString(),r=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(t);if(r)return r[1];var n=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(t);return n?n[1]:"unknown"}function w(e,t){var r=e.split("\n"),a=1,i=0,o={unknown:new b,0:new b};o.unknown.name=o[0].name=t||y(),o.unknown.lines.push(new v(0,""));for(var f=0;f<r.length;++f){var u=r[f],s=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(u);if(s)switch(s[1]){case"line":var c=/(\d+)(\s+\d+)?/.exec(s[2]);c&&(a=0|c[1],c[2]&&((i=0|c[2])in o||(o[i]=new b)));break;case"define":var l=/SHADER_NAME(_B64)?\s+(.*)$/.exec(s[2]);l&&(o[i].name=l[1]?n(l[2]):l[2])}o[i].lines.push(new v(a++,u))}return Object.keys(o).forEach((function(e){var t=o[e];t.lines.forEach((function(e){t.index[e.number]=e}))})),o}function A(e){var t=[];return e.split("\n").forEach((function(e){if(!(e.length<5)){var r=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(e);r?t.push(new g(0|r[1],0|r[2],r[3].trim())):e.length>0&&t.push(new g("unknown",0,e))}})),t}function _(e,t){t.forEach((function(t){var r=e[t.file];if(r){var n=r.index[t.line];if(n)return n.errors.push(t),void(r.hasErrors=!0)}e.unknown.hasErrors=!0,e.unknown.lines[0].errors.push(t)}))}function k(e,t,n,a,o){if(!e.getShaderParameter(t,e.COMPILE_STATUS)){var f=e.getShaderInfoLog(t),u=a===e.FRAGMENT_SHADER?"fragment":"vertex";C(n,"string",u+" shader source must be a string",o);var s=w(n,o),c=A(f);_(s,c),Object.keys(s).forEach((function(e){var t=s[e];if(t.hasErrors){var n=[""],a=[""];i("file number "+e+": "+t.name+"\n","color:red;text-decoration:underline;font-weight:bold"),t.lines.forEach((function(e){if(e.errors.length>0){i(h(e.number,4)+"| ","background-color:yellow; font-weight:bold"),i(e.line+r,"color:red; background-color:yellow; font-weight:bold");var t=0;e.errors.forEach((function(n){var a=n.message,o=/^\s*'(.*)'\s*:\s*(.*)$/.exec(a);if(o){var f=o[1];a=o[2],"assign"===f&&(f="="),t=Math.max(e.line.indexOf(f,t),0)}else t=0;i(h("| ",6)),i(h("^^^",t+3)+r,"font-weight:bold"),i(h("| ",6)),i(a+r,"font-weight:bold")})),i(h("| ",6)+r)}else i(h(e.number,4)+"| "),i(e.line+r,"color:red")})),"undefined"===typeof document||window.chrome?console.log(n.join("")):(a[0]=n.join("%c"),console.log.apply(console,a))}function i(e,t){n.push(e),a.push(t||"")}})),i.raise("Error compiling "+u+" shader, "+s[0].name)}}function S(e,t,n,a,o){if(!e.getProgramParameter(t,e.LINK_STATUS)){var f=e.getProgramInfoLog(t),u=w(n,o),s='Error linking program with vertex shader, "'+w(a,o)[0].name+'", and fragment shader "'+u[0].name+'"';"undefined"!==typeof document?console.log("%c"+s+r+"%c"+f,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(s+r+f),i.raise(s)}}function O(e){e._commandRef=y()}function E(e,t,r,n){function a(e){return e?n.id(e):0}function i(e,t){Object.keys(t).forEach((function(t){e[n.id(t)]=!0}))}O(e),e._fragId=a(e.static.frag),e._vertId=a(e.static.vert);var o=e._uniformSet={};i(o,t.static),i(o,t.dynamic);var f=e._attributeSet={};i(f,r.static),i(f,r.dynamic),e._hasCount="count"in e.static||"count"in e.dynamic||"elements"in e.static||"elements"in e.dynamic}function T(e,t){var r=x();a(e+" in command "+(t||y())+("unknown"===r?"":" called from "+r))}function D(e,t,r){e||T(t,r||y())}function j(e,t,r,n){e in t||T("unknown parameter ("+e+")"+o(r)+". possible values: "+Object.keys(t).join(),n||y())}function C(e,t,r,n){s(e,t)||T("invalid parameter type"+o(r)+". expected "+t+", got "+typeof e,n||y())}function z(e){e()}function F(e,t,r){e.texture?d(e.texture._texture.internalformat,t,"unsupported texture format for attachment"):d(e.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")}var V=33071,B=9728,I=9984,P=9985,L=9986,R=9987,M=5121,U=5122,W=5123,G=5124,H=5125,N=5126,q=32819,Q=32820,Y=33635,X=34042,$=36193,K={};function J(e,t){return e===Q||e===q||e===Y?2:e===X?4:K[e]*t}function Z(e){return!(e&e-1)&&!!e}function ee(e,t,r){var n,a=t.width,o=t.height,f=t.channels;i(a>0&&a<=r.maxTextureSize&&o>0&&o<=r.maxTextureSize,"invalid texture shape"),e.wrapS===V&&e.wrapT===V||i(Z(a)&&Z(o),"incompatible wrap mode for texture, both width and height must be power of 2"),1===t.mipmask?1!==a&&1!==o&&i(e.minFilter!==I&&e.minFilter!==L&&e.minFilter!==P&&e.minFilter!==R,"min filter requires mipmap"):(i(Z(a)&&Z(o),"texture must be a square power of 2 to support mipmapping"),i(t.mipmask===(a<<1)-1,"missing or incomplete mipmap data")),t.type===N&&(r.extensions.indexOf("oes_texture_float_linear")<0&&i(e.minFilter===B&&e.magFilter===B,"filter not supported, must enable oes_texture_float_linear"),i(!e.genMipmaps,"mipmap generation not supported with float textures"));var u=t.images;for(n=0;n<16;++n)if(u[n]){var s=a>>n,c=o>>n;i(t.mipmask&1<<n,"missing mipmap data");var l=u[n];if(i(l.width===s&&l.height===c,"invalid shape for mip images"),i(l.format===t.format&&l.internalformat===t.internalformat&&l.type===t.type,"incompatible type for mip image"),l.compressed);else if(l.data){var d=Math.ceil(J(l.type,f)*s/l.unpackAlignment)*l.unpackAlignment;i(l.data.byteLength===d*c,"invalid data for image, buffer size is inconsistent with image format")}else l.element||l.copy}else e.genMipmaps||i(0===(t.mipmask&1<<n),"extra mipmap data");t.compressed&&i(!e.genMipmaps,"mipmap generation for compressed images not supported")}function te(e,t,r,n){var a=e.width,o=e.height,f=e.channels;i(a>0&&a<=n.maxTextureSize&&o>0&&o<=n.maxTextureSize,"invalid texture shape"),i(a===o,"cube map must be square"),i(t.wrapS===V&&t.wrapT===V,"wrap mode not supported by cube map");for(var u=0;u<r.length;++u){var s=r[u];i(s.width===a&&s.height===o,"inconsistent cube map face shape"),t.genMipmaps&&(i(!s.compressed,"can not generate mipmap for compressed textures"),i(1===s.mipmask,"can not specify mipmaps and generate mipmaps"));for(var c=s.images,l=0;l<16;++l){var d=c[l];if(d){var m=a>>l,p=o>>l;i(s.mipmask&1<<l,"missing mipmap data"),i(d.width===m&&d.height===p,"invalid shape for mip images"),i(d.format===e.format&&d.internalformat===e.internalformat&&d.type===e.type,"incompatible type for mip image"),d.compressed||(d.data?i(d.data.byteLength===m*p*Math.max(J(d.type,f),d.unpackAlignment),"invalid data for image, buffer size is inconsistent with image format"):d.element||d.copy)}}}}K[5120]=K[M]=1,K[U]=K[W]=K[$]=K[Y]=K[q]=K[Q]=2,K[G]=K[H]=K[N]=K[X]=4;var re=t(i,{optional:z,raise:a,commandRaise:T,command:D,parameter:f,commandParameter:j,constructor:p,type:c,commandType:C,isTypedArray:u,nni:l,oneOf:d,shaderError:k,linkError:S,callSite:x,saveCommandRef:O,saveDrawInfo:E,framebufferFormat:F,guessCommand:y,texture2D:ee,textureCube:te}),ne=0,ae=0,ie=5,oe=6;function fe(e,t){this.id=ne++,this.type=e,this.data=t}function ue(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function se(e){if(0===e.length)return[];var t=e.charAt(0),r=e.charAt(e.length-1);if(e.length>1&&t===r&&('"'===t||"'"===t))return['"'+ue(e.substr(1,e.length-2))+'"'];var n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e);if(n)return se(e.substr(0,n.index)).concat(se(n[1])).concat(se(e.substr(n.index+n[0].length)));var a=e.split(".");if(1===a.length)return['"'+ue(e)+'"'];for(var i=[],o=0;o<a.length;++o)i=i.concat(se(a[o]));return i}function ce(e){return"["+se(e).join("][")+"]"}function le(e,t){return new fe(e,ce(t+""))}function de(e){return"function"===typeof e&&!e._reglType||e instanceof fe}function me(e,t){return"function"===typeof e?new fe(ae,e):"number"===typeof e||"boolean"===typeof e?new fe(ie,e):Array.isArray(e)?new fe(oe,e.map((function(e,r){return me(e,t+"["+r+"]")}))):e instanceof fe?e:void re(!1,"invalid option type in uniform "+t)}var pe={DynamicVariable:fe,define:le,isDynamic:de,unbox:me,accessor:ce},he={next:"function"===typeof requestAnimationFrame?function(e){return requestAnimationFrame(e)}:function(e){return setTimeout(e,16)},cancel:"function"===typeof cancelAnimationFrame?function(e){return cancelAnimationFrame(e)}:clearTimeout},be="undefined"!==typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date};function ve(){var e={"":0},t=[""];return{id:function(r){var n=e[r];return n||(n=e[r]=t.length,t.push(r),n)},str:function(e){return t[e]}}}function ge(e,r,n){var a,i=document.createElement("canvas");function o(){var t=window.innerWidth,r=window.innerHeight;if(e!==document.body){var a=i.getBoundingClientRect();t=a.right-a.left,r=a.bottom-a.top}i.width=n*t,i.height=n*r}function f(){a?a.disconnect():window.removeEventListener("resize",o),e.removeChild(i)}return t(i.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),e.appendChild(i),e===document.body&&(i.style.position="absolute",t(e.style,{margin:0,padding:0})),e!==document.body&&"function"===typeof ResizeObserver?(a=new ResizeObserver((function(){setTimeout(o)}))).observe(e):window.addEventListener("resize",o,!1),o(),{canvas:i,onDestroy:f}}function ye(e,t){function r(r){try{return e.getContext(r,t)}catch(n){return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}function xe(e){return"string"===typeof e.nodeName&&"function"===typeof e.appendChild&&"function"===typeof e.getBoundingClientRect}function we(e){return"function"===typeof e.drawArrays||"function"===typeof e.drawElements}function Ae(e){return"string"===typeof e?e.split():(re(Array.isArray(e),"invalid extension array"),e)}function _e(e){return"string"===typeof e?(re("undefined"!==typeof document,"not supported outside of DOM"),document.querySelector(e)):e}function ke(e){var t,r,n,a,i=e||{},o={},f=[],u=[],s="undefined"===typeof window?1:window.devicePixelRatio,c=!1,l=function(e){e&&re.raise(e)},d=function(){};if("string"===typeof i?(re("undefined"!==typeof document,"selector queries only supported in DOM enviroments"),t=document.querySelector(i),re(t,"invalid query string for element")):"object"===typeof i?xe(i)?t=i:we(i)?n=(a=i).canvas:(re.constructor(i),"gl"in i?a=i.gl:"canvas"in i?n=_e(i.canvas):"container"in i&&(r=_e(i.container)),"attributes"in i&&(o=i.attributes,re.type(o,"object","invalid context attributes")),"extensions"in i&&(f=Ae(i.extensions)),"optionalExtensions"in i&&(u=Ae(i.optionalExtensions)),"onDone"in i&&(re.type(i.onDone,"function","invalid or missing onDone callback"),l=i.onDone),"profile"in i&&(c=!!i.profile),"pixelRatio"in i&&(s=+i.pixelRatio,re(s>0,"invalid pixel ratio"))):re.raise("invalid arguments to regl"),t&&("canvas"===t.nodeName.toLowerCase()?n=t:r=t),!a){if(!n){re("undefined"!==typeof document,"must manually specify webgl context outside of DOM environments");var m=ge(r||document.body,l,s);if(!m)return null;n=m.canvas,d=m.onDestroy}void 0===o.premultipliedAlpha&&(o.premultipliedAlpha=!0),a=ye(n,o)}return a?{gl:a,canvas:n,container:r,extensions:f,optionalExtensions:u,pixelRatio:s,profile:c,onDone:l,onDestroy:d}:(d(),l("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Se(e,t){var r={};function n(t){re.type(t,"string","extension name must be string");var n,a=t.toLowerCase();try{n=r[a]=e.getExtension(a)}catch(i){}return!!n}for(var a=0;a<t.extensions.length;++a){var i=t.extensions[a];if(!n(i))return t.onDestroy(),t.onDone('"'+i+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return t.optionalExtensions.forEach(n),{extensions:r,restore:function(){Object.keys(r).forEach((function(e){if(r[e]&&!n(e))throw new Error("(regl): error restoring extension "+e)}))}}}function Oe(e,t){for(var r=Array(e),n=0;n<e;++n)r[n]=t(n);return r}var Ee=5120,Te=5121,De=5122,je=5123,Ce=5124,ze=5125,Fe=5126;function Ve(e){for(var t=16;t<=1<<28;t*=16)if(e<=t)return t;return 0}function Be(e){var t,r;return t=(e>65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}function Ie(){var e=Oe(8,(function(){return[]}));function t(t){var r=Ve(t),n=e[Be(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[Be(t.byteLength)>>2].push(t)}function n(e,r){var n=null;switch(e){case Ee:n=new Int8Array(t(r),0,r);break;case Te:n=new Uint8Array(t(r),0,r);break;case De:n=new Int16Array(t(2*r),0,r);break;case je:n=new Uint16Array(t(2*r),0,r);break;case Ce:n=new Int32Array(t(4*r),0,r);break;case ze:n=new Uint32Array(t(4*r),0,r);break;case Fe:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n}function a(e){r(e.buffer)}return{alloc:t,free:r,allocType:n,freeType:a}}var Pe=Ie();Pe.zero=Ie();var Le=3408,Re=3410,Me=3411,Ue=3412,We=3413,Ge=3414,He=3415,Ne=33901,qe=33902,Qe=3379,Ye=3386,Xe=34921,$e=36347,Ke=36348,Je=35661,Ze=35660,et=34930,tt=36349,rt=34076,nt=34024,at=7936,it=7937,ot=7938,ft=35724,ut=34047,st=36063,ct=34852,lt=3553,dt=34067,mt=34069,pt=33984,ht=6408,bt=5126,vt=5121,gt=36160,yt=36053,xt=36064,wt=16384,At=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(ut));var n=1,a=1;t.webgl_draw_buffers&&(n=e.getParameter(ct),a=e.getParameter(st));var i=!!t.oes_texture_float;if(i){var o=e.createTexture();e.bindTexture(lt,o),e.texImage2D(lt,0,ht,1,1,0,ht,bt,null);var f=e.createFramebuffer();if(e.bindFramebuffer(gt,f),e.framebufferTexture2D(gt,xt,lt,o,0),e.bindTexture(lt,null),e.checkFramebufferStatus(gt)!==yt)i=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(wt);var u=Pe.allocType(bt,4);e.readPixels(0,0,1,1,ht,bt,u),e.getError()?i=!1:(e.deleteFramebuffer(f),e.deleteTexture(o),i=1===u[0]),Pe.freeType(u)}}var s=!0;if("undefined"===typeof navigator||!(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))){var c=e.createTexture(),l=Pe.allocType(vt,36);e.activeTexture(pt),e.bindTexture(dt,c),e.texImage2D(mt,0,ht,3,3,0,ht,vt,l),Pe.freeType(l),e.bindTexture(dt,null),e.deleteTexture(c),s=!e.getError()}return{colorBits:[e.getParameter(Re),e.getParameter(Me),e.getParameter(Ue),e.getParameter(We)],depthBits:e.getParameter(Ge),stencilBits:e.getParameter(He),subpixelBits:e.getParameter(Le),extensions:Object.keys(t).filter((function(e){return!!t[e]})),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:a,pointSizeDims:e.getParameter(Ne),lineWidthDims:e.getParameter(qe),maxViewportDims:e.getParameter(Ye),maxCombinedTextureUnits:e.getParameter(Je),maxCubeMapSize:e.getParameter(rt),maxRenderbufferSize:e.getParameter(nt),maxTextureUnits:e.getParameter(et),maxTextureSize:e.getParameter(Qe),maxAttributes:e.getParameter(Xe),maxVertexUniforms:e.getParameter($e),maxVertexTextureUnits:e.getParameter(Ze),maxVaryingVectors:e.getParameter(Ke),maxFragmentUniforms:e.getParameter(tt),glsl:e.getParameter(ft),renderer:e.getParameter(it),vendor:e.getParameter(at),version:e.getParameter(ot),readFloat:i,npotTextureCube:s}};function _t(t){return!!t&&"object"===typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"===typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||e(t.data))}var kt=function(e){return Object.keys(e).map((function(t){return e[t]}))},St={shape:Ct,flatten:jt};function Ot(e,t,r){for(var n=0;n<t;++n)r[n]=e[n]}function Et(e,t,r,n){for(var a=0,i=0;i<t;++i)for(var o=e[i],f=0;f<r;++f)n[a++]=o[f]}function Tt(e,t,r,n,a,i){for(var o=i,f=0;f<t;++f)for(var u=e[f],s=0;s<r;++s)for(var c=u[s],l=0;l<n;++l)a[o++]=c[l]}function Dt(e,t,r,n,a){for(var i=1,o=r+1;o<t.length;++o)i*=t[o];var f=t[r];if(t.length-r===4){var u=t[r+1],s=t[r+2],c=t[r+3];for(o=0;o<f;++o)Tt(e[o],u,s,c,n,a),a+=i}else for(o=0;o<f;++o)Dt(e[o],t,r+1,n,a),a+=i}function jt(e,t,r,n){var a=1;if(t.length)for(var i=0;i<t.length;++i)a*=t[i];else a=0;var o=n||Pe.allocType(r,a);switch(t.length){case 0:break;case 1:Ot(e,t[0],o);break;case 2:Et(e,t[0],t[1],o);break;case 3:Tt(e,t[0],t[1],t[2],o,0);break;default:Dt(e,t,0,o,0)}return o}function Ct(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t}var zt={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Ft={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Vt={dynamic:35048,stream:35040,static:35044},Bt=St.flatten,It=St.shape,Pt=35044,Lt=35040,Rt=5121,Mt=5126,Ut=[];function Wt(e){return 0|zt[Object.prototype.toString.call(e)]}function Gt(e,t){for(var r=0;r<t.length;++r)e[r]=t[r]}function Ht(e,t,r,n,a,i,o){for(var f=0,u=0;u<r;++u)for(var s=0;s<n;++s)e[f++]=t[a*u+i*s+o]}function Nt(t,r,n,a){var i=0,o={};function f(e){this.id=i++,this.buffer=t.createBuffer(),this.type=e,this.usage=Pt,this.byteLength=0,this.dimension=1,this.dtype=Rt,this.persistentData=null,n.profile&&(this.stats={size:0})}f.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},f.prototype.destroy=function(){m(this)};var u=[];function s(e,t){var r=u.pop();return r||(r=new f(e)),r.bind(),d(r,t,Lt,0,1,!1),r}function c(e){u.push(e)}function l(e,r,n){e.byteLength=r.byteLength,t.bufferData(e.type,r,n)}function d(t,r,n,a,i,o){var f,u;if(t.usage=n,Array.isArray(r)){if(t.dtype=a||Mt,r.length>0)if(Array.isArray(r[0])){f=It(r);for(var s=1,c=1;c<f.length;++c)s*=f[c];t.dimension=s,l(t,u=Bt(r,f,t.dtype),n),o?t.persistentData=u:Pe.freeType(u)}else if("number"===typeof r[0]){t.dimension=i;var d=Pe.allocType(t.dtype,r.length);Gt(d,r),l(t,d,n),o?t.persistentData=d:Pe.freeType(d)}else e(r[0])?(t.dimension=r[0].length,t.dtype=a||Wt(r[0])||Mt,l(t,u=Bt(r,[r.length,r[0].length],t.dtype),n),o?t.persistentData=u:Pe.freeType(u)):re.raise("invalid buffer data")}else if(e(r))t.dtype=a||Wt(r),t.dimension=i,l(t,r,n),o&&(t.persistentData=new Uint8Array(new Uint8Array(r.buffer)));else if(_t(r)){f=r.shape;var m=r.stride,p=r.offset,h=0,b=0,v=0,g=0;1===f.length?(h=f[0],b=1,v=m[0],g=0):2===f.length?(h=f[0],b=f[1],v=m[0],g=m[1]):re.raise("invalid shape"),t.dtype=a||Wt(r.data)||Mt,t.dimension=b;var y=Pe.allocType(t.dtype,h*b);Ht(y,r.data,h,b,v,g,p),l(t,y,n),o?t.persistentData=y:Pe.freeType(y)}else r instanceof ArrayBuffer?(t.dtype=Rt,t.dimension=i,l(t,r,n),o&&(t.persistentData=new Uint8Array(new Uint8Array(r)))):re.raise("invalid buffer data")}function m(e){r.bufferCount--,a(e);var n=e.buffer;re(n,"buffer must not be deleted already"),t.deleteBuffer(n),e.buffer=null,delete o[e.id]}function p(a,i,u,s){r.bufferCount++;var c=new f(i);function l(r){var a=Pt,i=null,o=0,f=0,u=1;return Array.isArray(r)||e(r)||_t(r)||r instanceof ArrayBuffer?i=r:"number"===typeof r?o=0|r:r&&(re.type(r,"object","buffer arguments must be an object, a number or an array"),"data"in r&&(re(null===i||Array.isArray(i)||e(i)||_t(i),"invalid data for buffer"),i=r.data),"usage"in r&&(re.parameter(r.usage,Vt,"invalid buffer usage"),a=Vt[r.usage]),"type"in r&&(re.parameter(r.type,Ft,"invalid buffer type"),f=Ft[r.type]),"dimension"in r&&(re.type(r.dimension,"number","invalid dimension"),u=0|r.dimension),"length"in r&&(re.nni(o,"buffer length must be a nonnegative integer"),o=0|r.length)),c.bind(),i?d(c,i,a,f,u,s):(o&&t.bufferData(c.type,o,a),c.dtype=f||Rt,c.usage=a,c.dimension=u,c.byteLength=o),n.profile&&(c.stats.size=c.byteLength*Ut[c.dtype]),l}function p(e,r){re(r+e.byteLength<=c.byteLength,"invalid buffer subdata call, buffer is too small. Can't write data of size "+e.byteLength+" starting from offset "+r+" to a buffer of size "+c.byteLength),t.bufferSubData(c.type,r,e)}function h(t,r){var n,a=0|(r||0);if(c.bind(),e(t)||t instanceof ArrayBuffer)p(t,a);else if(Array.isArray(t)){if(t.length>0)if("number"===typeof t[0]){var i=Pe.allocType(c.dtype,t.length);Gt(i,t),p(i,a),Pe.freeType(i)}else if(Array.isArray(t[0])||e(t[0])){n=It(t);var o=Bt(t,n,c.dtype);p(o,a),Pe.freeType(o)}else re.raise("invalid buffer data")}else if(_t(t)){n=t.shape;var f=t.stride,u=0,s=0,d=0,m=0;1===n.length?(u=n[0],s=1,d=f[0],m=0):2===n.length?(u=n[0],s=n[1],d=f[0],m=f[1]):re.raise("invalid shape");var h=Array.isArray(t.data)?c.dtype:Wt(t.data),b=Pe.allocType(h,u*s);Ht(b,t.data,u,s,d,m,t.offset),p(b,a),Pe.freeType(b)}else re.raise("invalid data for buffer subdata");return l}return o[c.id]=c,u||l(a),l._reglType="buffer",l._buffer=c,l.subdata=h,n.profile&&(l.stats=c.stats),l.destroy=function(){m(c)},l}function h(){kt(o).forEach((function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)}))}return n.profile&&(r.getTotalBufferSize=function(){var e=0;return Object.keys(o).forEach((function(t){e+=o[t].stats.size})),e}),{create:p,createStream:s,destroyStream:c,clear:function(){kt(o).forEach(m),u.forEach(m)},getBuffer:function(e){return e&&e._buffer instanceof f?e._buffer:null},restore:h,_initBuffer:d}}Ut[5120]=1,Ut[5122]=2,Ut[5124]=4,Ut[5121]=1,Ut[5123]=2,Ut[5125]=4,Ut[5126]=4;var qt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Qt=0,Yt=1,Xt=4,$t=5120,Kt=5121,Jt=5122,Zt=5123,er=5124,tr=5125,rr=34963,nr=35040,ar=35044;function ir(t,r,n,a){var i={},o=0,f={uint8:Kt,uint16:Zt};function u(e){this.id=o++,i[this.id]=this,this.buffer=e,this.primType=Xt,this.vertCount=0,this.type=0}r.oes_element_index_uint&&(f.uint32=tr),u.prototype.bind=function(){this.buffer.bind()};var s=[];function c(e){var t=s.pop();return t||(t=new u(n.create(null,rr,!0,!1)._buffer)),d(t,e,nr,-1,-1,0,0),t}function l(e){s.push(e)}function d(a,i,o,f,u,s,c){var l;if(a.buffer.bind(),i){var d=c;c||e(i)&&(!_t(i)||e(i.data))||(d=r.oes_element_index_uint?tr:Zt),n._initBuffer(a.buffer,i,o,d,3)}else t.bufferData(rr,s,o),a.buffer.dtype=l||Kt,a.buffer.usage=o,a.buffer.dimension=3,a.buffer.byteLength=s;if(l=c,!c){switch(a.buffer.dtype){case Kt:case $t:l=Kt;break;case Zt:case Jt:l=Zt;break;case tr:case er:l=tr;break;default:re.raise("unsupported type for element array")}a.buffer.dtype=l}a.type=l,re(l!==tr||!!r.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var m=u;m<0&&(m=a.buffer.byteLength,l===Zt?m>>=1:l===tr&&(m>>=2)),a.vertCount=m;var p=f;if(f<0){p=Xt;var h=a.buffer.dimension;1===h&&(p=Qt),2===h&&(p=Yt),3===h&&(p=Xt)}a.primType=p}function m(e){a.elementsCount--,re(null!==e.buffer,"must not double destroy elements"),delete i[e.id],e.buffer.destroy(),e.buffer=null}function p(t,r){var i=n.create(null,rr,!0),o=new u(i._buffer);function s(t){if(t)if("number"===typeof t)i(t),o.primType=Xt,o.vertCount=0|t,o.type=Kt;else{var r=null,n=ar,a=-1,u=-1,c=0,l=0;Array.isArray(t)||e(t)||_t(t)?r=t:(re.type(t,"object","invalid arguments for elements"),"data"in t&&(r=t.data,re(Array.isArray(r)||e(r)||_t(r),"invalid data for element buffer")),"usage"in t&&(re.parameter(t.usage,Vt,"invalid element buffer usage"),n=Vt[t.usage]),"primitive"in t&&(re.parameter(t.primitive,qt,"invalid element buffer primitive"),a=qt[t.primitive]),"count"in t&&(re("number"===typeof t.count&&t.count>=0,"invalid vertex count for elements"),u=0|t.count),"type"in t&&(re.parameter(t.type,f,"invalid buffer type"),l=f[t.type]),"length"in t?c=0|t.length:(c=u,l===Zt||l===Jt?c*=2:l!==tr&&l!==er||(c*=4))),d(o,r,n,a,u,c,l)}else i(),o.primType=Xt,o.vertCount=0,o.type=Kt;return s}return a.elementsCount++,s(t),s._reglType="elements",s._elements=o,s.subdata=function(e,t){return i.subdata(e,t),s},s.destroy=function(){m(o)},s}return{create:p,createStream:c,destroyStream:l,getElements:function(e){return"function"===typeof e&&e._elements instanceof u?e._elements:null},clear:function(){kt(i).forEach(m)}}}var or=new Float32Array(1),fr=new Uint32Array(or.buffer),ur=5123;function sr(e){for(var t=Pe.allocType(ur,e.length),r=0;r<e.length;++r)if(isNaN(e[r]))t[r]=65535;else if(e[r]===1/0)t[r]=31744;else if(e[r]===-1/0)t[r]=64512;else{or[0]=e[r];var n=fr[0],a=n>>>31<<15,i=(n<<1>>>24)-127,o=n>>13&1023;if(i<-24)t[r]=a;else if(i<-14){var f=-14-i;t[r]=a+(o+1024>>f)}else t[r]=i>15?a+31744:a+(i+15<<10)+o}return t}function cr(t){return Array.isArray(t)||e(t)}var lr=function(e){return!(e&e-1)&&!!e},dr=34467,mr=3553,pr=34067,hr=34069,br=6408,vr=6406,gr=6407,yr=6409,xr=6410,wr=32854,Ar=32855,_r=36194,kr=32819,Sr=32820,Or=33635,Er=34042,Tr=6402,Dr=34041,jr=35904,Cr=35906,zr=36193,Fr=33776,Vr=33777,Br=33778,Ir=33779,Pr=35986,Lr=35987,Rr=34798,Mr=35840,Ur=35841,Wr=35842,Gr=35843,Hr=36196,Nr=5121,qr=5123,Qr=5125,Yr=5126,Xr=10242,$r=10243,Kr=10497,Jr=33071,Zr=33648,en=10240,tn=10241,rn=9728,nn=9729,an=9984,on=9985,fn=9986,un=9987,sn=33170,cn=4352,ln=4353,dn=4354,mn=34046,pn=3317,hn=37440,bn=37441,vn=37443,gn=37444,yn=33984,xn=[an,fn,on,un],wn=[0,yr,xr,gr,br],An={};function _n(e){return"[object "+e+"]"}An[yr]=An[vr]=An[Tr]=1,An[Dr]=An[xr]=2,An[gr]=An[jr]=3,An[br]=An[Cr]=4;var kn=_n("HTMLCanvasElement"),Sn=_n("OffscreenCanvas"),On=_n("CanvasRenderingContext2D"),En=_n("ImageBitmap"),Tn=_n("HTMLImageElement"),Dn=_n("HTMLVideoElement"),jn=Object.keys(zt).concat([kn,Sn,On,En,Tn,Dn]),Cn=[];Cn[Nr]=1,Cn[Yr]=4,Cn[zr]=2,Cn[qr]=2,Cn[Qr]=4;var zn=[];function Fn(e){return Array.isArray(e)&&(0===e.length||"number"===typeof e[0])}function Vn(e){return!!Array.isArray(e)&&!(0===e.length||!cr(e[0]))}function Bn(e){return Object.prototype.toString.call(e)}function In(e){return Bn(e)===kn}function Pn(e){return Bn(e)===Sn}function Ln(e){return Bn(e)===On}function Rn(e){return Bn(e)===En}function Mn(e){return Bn(e)===Tn}function Un(e){return Bn(e)===Dn}function Wn(e){if(!e)return!1;var t=Bn(e);return jn.indexOf(t)>=0||Fn(e)||Vn(e)||_t(e)}function Gn(e){return 0|zt[Object.prototype.toString.call(e)]}function Hn(e,t){var r=t.length;switch(e.type){case Nr:case qr:case Qr:case Yr:var n=Pe.allocType(e.type,r);n.set(t),e.data=n;break;case zr:e.data=sr(t);break;default:re.raise("unsupported texture type, must specify a typed array")}}function Nn(e,t){return Pe.allocType(e.type===zr?Yr:e.type,t)}function qn(e,t){e.type===zr?(e.data=sr(t),Pe.freeType(t)):e.data=t}function Qn(e,t,r,n,a,i){for(var o=e.width,f=e.height,u=e.channels,s=Nn(e,o*f*u),c=0,l=0;l<f;++l)for(var d=0;d<o;++d)for(var m=0;m<u;++m)s[c++]=t[r*d+n*l+a*m+i];qn(e,s)}function Yn(e,t,r,n,a,i){var o;if(o="undefined"!==typeof zn[e]?zn[e]:An[e]*Cn[t],i&&(o*=6),a){for(var f=0,u=r;u>=1;)f+=o*u*u,u/=2;return f}return o*r*n}function Xn(r,n,a,i,o,f,u){var s={"don't care":cn,"dont care":cn,nice:dn,fast:ln},c={repeat:Kr,clamp:Jr,mirror:Zr},l={nearest:rn,linear:nn},d=t({mipmap:un,"nearest mipmap nearest":an,"linear mipmap nearest":on,"nearest mipmap linear":fn,"linear mipmap linear":un},l),m={none:0,browser:gn},p={uint8:Nr,rgba4:kr,rgb565:Or,"rgb5 a1":Sr},h={alpha:vr,luminance:yr,"luminance alpha":xr,rgb:gr,rgba:br,rgba4:wr,"rgb5 a1":Ar,rgb565:_r},b={};n.ext_srgb&&(h.srgb=jr,h.srgba=Cr),n.oes_texture_float&&(p.float32=p.float=Yr),n.oes_texture_half_float&&(p.float16=p["half float"]=zr),n.webgl_depth_texture&&(t(h,{depth:Tr,"depth stencil":Dr}),t(p,{uint16:qr,uint32:Qr,"depth stencil":Er})),n.webgl_compressed_texture_s3tc&&t(b,{"rgb s3tc dxt1":Fr,"rgba s3tc dxt1":Vr,"rgba s3tc dxt3":Br,"rgba s3tc dxt5":Ir}),n.webgl_compressed_texture_atc&&t(b,{"rgb atc":Pr,"rgba atc explicit alpha":Lr,"rgba atc interpolated alpha":Rr}),n.webgl_compressed_texture_pvrtc&&t(b,{"rgb pvrtc 4bppv1":Mr,"rgb pvrtc 2bppv1":Ur,"rgba pvrtc 4bppv1":Wr,"rgba pvrtc 2bppv1":Gr}),n.webgl_compressed_texture_etc1&&(b["rgb etc1"]=Hr);var v=Array.prototype.slice.call(r.getParameter(dr));Object.keys(b).forEach((function(e){var t=b[e];v.indexOf(t)>=0&&(h[e]=t)}));var g=Object.keys(h);a.textureFormats=g;var y=[];Object.keys(h).forEach((function(e){var t=h[e];y[t]=e}));var x=[];Object.keys(p).forEach((function(e){var t=p[e];x[t]=e}));var w=[];Object.keys(l).forEach((function(e){var t=l[e];w[t]=e}));var A=[];Object.keys(d).forEach((function(e){var t=d[e];A[t]=e}));var _=[];Object.keys(c).forEach((function(e){var t=c[e];_[t]=e}));var k=g.reduce((function(e,t){var r=h[t];return r===yr||r===vr||r===yr||r===xr||r===Tr||r===Dr||n.ext_srgb&&(r===jr||r===Cr)?e[r]=r:r===Ar||t.indexOf("rgba")>=0?e[r]=br:e[r]=gr,e}),{});function S(){this.internalformat=br,this.format=br,this.type=Nr,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=gn,this.width=0,this.height=0,this.channels=0}function O(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function E(e,t){if("object"===typeof t&&t){if("premultiplyAlpha"in t&&(re.type(t.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(re.type(t.flipY,"boolean","invalid texture flip"),e.flipY=t.flipY),"alignment"in t&&(re.oneOf(t.alignment,[1,2,4,8],"invalid texture unpack alignment"),e.unpackAlignment=t.alignment),"colorSpace"in t&&(re.parameter(t.colorSpace,m,"invalid colorSpace"),e.colorSpace=m[t.colorSpace]),"type"in t){var r=t.type;re(n.oes_texture_float||!("float"===r||"float32"===r),"you must enable the OES_texture_float extension in order to use floating point textures."),re(n.oes_texture_half_float||!("half float"===r||"float16"===r),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),re(n.webgl_depth_texture||!("uint16"===r||"uint32"===r||"depth stencil"===r),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),re.parameter(r,p,"invalid texture type"),e.type=p[r]}var i=e.width,o=e.height,f=e.channels,u=!1;"shape"in t?(re(Array.isArray(t.shape)&&t.shape.length>=2,"shape must be an array"),i=t.shape[0],o=t.shape[1],3===t.shape.length&&(f=t.shape[2],re(f>0&&f<=4,"invalid number of channels"),u=!0),re(i>=0&&i<=a.maxTextureSize,"invalid width"),re(o>=0&&o<=a.maxTextureSize,"invalid height")):("radius"in t&&(i=o=t.radius,re(i>=0&&i<=a.maxTextureSize,"invalid radius")),"width"in t&&(i=t.width,re(i>=0&&i<=a.maxTextureSize,"invalid width")),"height"in t&&(o=t.height,re(o>=0&&o<=a.maxTextureSize,"invalid height")),"channels"in t&&(f=t.channels,re(f>0&&f<=4,"invalid number of channels"),u=!0)),e.width=0|i,e.height=0|o,e.channels=0|f;var s=!1;if("format"in t){var c=t.format;re(n.webgl_depth_texture||!("depth"===c||"depth stencil"===c),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),re.parameter(c,h,"invalid texture format");var l=e.internalformat=h[c];e.format=k[l],c in p&&("type"in t||(e.type=p[c])),c in b&&(e.compressed=!0),s=!0}!u&&s?e.channels=An[e.format]:u&&!s?e.channels!==wn[e.format]&&(e.format=e.internalformat=wn[e.channels]):s&&u&&re(e.channels===An[e.format],"number of channels inconsistent with specified format")}}function T(e){r.pixelStorei(hn,e.flipY),r.pixelStorei(bn,e.premultiplyAlpha),r.pixelStorei(vn,e.colorSpace),r.pixelStorei(pn,e.unpackAlignment)}function D(){S.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function j(t,r){var n=null;if(Wn(r)?n=r:r&&(re.type(r,"object","invalid pixel data type"),E(t,r),"x"in r&&(t.xOffset=0|r.x),"y"in r&&(t.yOffset=0|r.y),Wn(r.data)&&(n=r.data)),re(!t.compressed||n instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),r.copy){re(!n,"can not specify copy and data field for the same texture");var i=o.viewportWidth,f=o.viewportHeight;t.width=t.width||i-t.xOffset,t.height=t.height||f-t.yOffset,t.needsCopy=!0,re(t.xOffset>=0&&t.xOffset<i&&t.yOffset>=0&&t.yOffset<f&&t.width>0&&t.width<=i&&t.height>0&&t.height<=f,"copy texture read out of bounds")}else if(n){if(e(n))t.channels=t.channels||4,t.data=n,"type"in r||t.type!==Nr||(t.type=Gn(n));else if(Fn(n))t.channels=t.channels||4,Hn(t,n),t.alignment=1,t.needsFree=!0;else if(_t(n)){var u=n.data;Array.isArray(u)||t.type!==Nr||(t.type=Gn(u));var s,c,l,d,m,p,h=n.shape,b=n.stride;3===h.length?(l=h[2],p=b[2]):(re(2===h.length,"invalid ndarray pixel data, must be 2 or 3D"),l=1,p=1),s=h[0],c=h[1],d=b[0],m=b[1],t.alignment=1,t.width=s,t.height=c,t.channels=l,t.format=t.internalformat=wn[l],t.needsFree=!0,Qn(t,u,d,m,p,n.offset)}else if(In(n)||Pn(n)||Ln(n))In(n)||Pn(n)?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(Rn(n))t.element=n,t.width=n.width,t.height=n.height,t.channels=4;else if(Mn(n))t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(Un(n))t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(Vn(n)){var v=t.width||n[0].length,g=t.height||n.length,y=t.channels;y=cr(n[0][0])?y||n[0][0].length:y||1;for(var x=St.shape(n),w=1,A=0;A<x.length;++A)w*=x[A];var _=Nn(t,w);St.flatten(n,x,"",_),qn(t,_),t.alignment=1,t.width=v,t.height=g,t.channels=y,t.format=t.internalformat=wn[y],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4;t.type===Yr?re(a.extensions.indexOf("oes_texture_float")>=0,"oes_texture_float extension not enabled"):t.type===zr&&re(a.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function C(e,t,n){var a=e.element,o=e.data,f=e.internalformat,u=e.format,s=e.type,c=e.width,l=e.height;T(e),a?r.texImage2D(t,n,u,u,s,a):e.compressed?r.compressedTexImage2D(t,n,f,c,l,0,o):e.needsCopy?(i(),r.copyTexImage2D(t,n,u,e.xOffset,e.yOffset,c,l,0)):r.texImage2D(t,n,u,c,l,0,u,s,o||null)}function z(e,t,n,a,o){var f=e.element,u=e.data,s=e.internalformat,c=e.format,l=e.type,d=e.width,m=e.height;T(e),f?r.texSubImage2D(t,o,n,a,c,l,f):e.compressed?r.compressedTexSubImage2D(t,o,n,a,s,d,m,u):e.needsCopy?(i(),r.copyTexSubImage2D(t,o,n,a,e.xOffset,e.yOffset,d,m)):r.texSubImage2D(t,o,n,a,d,m,c,l,u)}var F=[];function V(){return F.pop()||new D}function B(e){e.needsFree&&Pe.freeType(e.data),D.call(e),F.push(e)}function I(){S.call(this),this.genMipmaps=!1,this.mipmapHint=cn,this.mipmask=0,this.images=Array(16)}function P(e,t,r){var n=e.images[0]=V();e.mipmask=1,n.width=e.width=t,n.height=e.height=r,n.channels=e.channels=4}function L(e,t){var r=null;if(Wn(t))O(r=e.images[0]=V(),e),j(r,t),e.mipmask=1;else if(E(e,t),Array.isArray(t.mipmap))for(var n=t.mipmap,a=0;a<n.length;++a)O(r=e.images[a]=V(),e),r.width>>=a,r.height>>=a,j(r,n[a]),e.mipmask|=1<<a;else O(r=e.images[0]=V(),e),j(r,t),e.mipmask=1;O(e,e.images[0]),!e.compressed||e.internalformat!==Fr&&e.internalformat!==Vr&&e.internalformat!==Br&&e.internalformat!==Ir||re(e.width%4===0&&e.height%4===0,"for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4")}function R(e,t){for(var r=e.images,n=0;n<r.length;++n){if(!r[n])return;C(r[n],t,n)}}var M=[];function U(){var e=M.pop()||new I;S.call(e),e.mipmask=0;for(var t=0;t<16;++t)e.images[t]=null;return e}function W(e){for(var t=e.images,r=0;r<t.length;++r)t[r]&&B(t[r]),t[r]=null;M.push(e)}function G(){this.minFilter=rn,this.magFilter=rn,this.wrapS=Jr,this.wrapT=Jr,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=cn}function H(e,t){if("min"in t){var r=t.min;re.parameter(r,d),e.minFilter=d[r],xn.indexOf(e.minFilter)>=0&&!("faces"in t)&&(e.genMipmaps=!0)}if("mag"in t){var n=t.mag;re.parameter(n,l),e.magFilter=l[n]}var i=e.wrapS,o=e.wrapT;if("wrap"in t){var f=t.wrap;"string"===typeof f?(re.parameter(f,c),i=o=c[f]):Array.isArray(f)&&(re.parameter(f[0],c),re.parameter(f[1],c),i=c[f[0]],o=c[f[1]])}else{if("wrapS"in t){var u=t.wrapS;re.parameter(u,c),i=c[u]}if("wrapT"in t){var m=t.wrapT;re.parameter(m,c),o=c[m]}}if(e.wrapS=i,e.wrapT=o,"anisotropic"in t){var p=t.anisotropic;re("number"===typeof p&&p>=1&&p<=a.maxAnisotropic,"aniso samples must be between 1 and "),e.anisotropic=t.anisotropic}if("mipmap"in t){var h=!1;switch(typeof t.mipmap){case"string":re.parameter(t.mipmap,s,"invalid mipmap hint"),e.mipmapHint=s[t.mipmap],e.genMipmaps=!0,h=!0;break;case"boolean":h=e.genMipmaps=t.mipmap;break;case"object":re(Array.isArray(t.mipmap),"invalid mipmap type"),e.genMipmaps=!1,h=!0;break;default:re.raise("invalid mipmap type")}h&&!("min"in t)&&(e.minFilter=an)}}function N(e,t){r.texParameteri(t,tn,e.minFilter),r.texParameteri(t,en,e.magFilter),r.texParameteri(t,Xr,e.wrapS),r.texParameteri(t,$r,e.wrapT),n.ext_texture_filter_anisotropic&&r.texParameteri(t,mn,e.anisotropic),e.genMipmaps&&(r.hint(sn,e.mipmapHint),r.generateMipmap(t))}var q=0,Q={},Y=a.maxTextureUnits,X=Array(Y).map((function(){return null}));function $(e){S.call(this),this.mipmask=0,this.internalformat=br,this.id=q++,this.refCount=1,this.target=e,this.texture=r.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new G,u.profile&&(this.stats={size:0})}function K(e){r.activeTexture(yn),r.bindTexture(e.target,e.texture)}function J(){var e=X[0];e?r.bindTexture(e.target,e.texture):r.bindTexture(mr,null)}function Z(e){var t=e.texture;re(t,"must not double destroy texture");var n=e.unit,a=e.target;n>=0&&(r.activeTexture(yn+n),r.bindTexture(a,null),X[n]=null),r.deleteTexture(t),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete Q[e.id],f.textureCount--}function ee(e,t){var n=new $(mr);function i(e,t){var r=n.texInfo;G.call(r);var o=U();return"number"===typeof e?P(o,0|e,"number"===typeof t?0|t:0|e):e?(re.type(e,"object","invalid arguments to regl.texture"),H(r,e),L(o,e)):P(o,1,1),r.genMipmaps&&(o.mipmask=(o.width<<1)-1),n.mipmask=o.mipmask,O(n,o),re.texture2D(r,o,a),n.internalformat=o.internalformat,i.width=o.width,i.height=o.height,K(n),R(o,mr),N(r,mr),J(),W(o),u.profile&&(n.stats.size=Yn(n.internalformat,n.type,o.width,o.height,r.genMipmaps,!1)),i.format=y[n.internalformat],i.type=x[n.type],i.mag=w[r.magFilter],i.min=A[r.minFilter],i.wrapS=_[r.wrapS],i.wrapT=_[r.wrapT],i}function o(e,t,r,a){re(!!e,"must specify image data");var o=0|t,f=0|r,u=0|a,s=V();return O(s,n),s.width=0,s.height=0,j(s,e),s.width=s.width||(n.width>>u)-o,s.height=s.height||(n.height>>u)-f,re(n.type===s.type&&n.format===s.format&&n.internalformat===s.internalformat,"incompatible format for texture.subimage"),re(o>=0&&f>=0&&o+s.width<=n.width&&f+s.height<=n.height,"texture.subimage write out of bounds"),re(n.mipmask&1<<u,"missing mipmap data"),re(s.data||s.element||s.needsCopy,"missing image data"),K(n),z(s,mr,o,f,u),J(),B(s),i}function s(e,t){var a=0|e,o=0|t||a;if(a===n.width&&o===n.height)return i;i.width=n.width=a,i.height=n.height=o,K(n);for(var f=0;n.mipmask>>f;++f){var s=a>>f,c=o>>f;if(!s||!c)break;r.texImage2D(mr,f,n.format,s,c,0,n.format,n.type,null)}return J(),u.profile&&(n.stats.size=Yn(n.internalformat,n.type,a,o,!1,!1)),i}return Q[n.id]=n,f.textureCount++,i(e,t),i.subimage=o,i.resize=s,i._reglType="texture2d",i._texture=n,u.profile&&(i.stats=n.stats),i.destroy=function(){n.decRef()},i}function te(e,t,n,i,o,s){var c=new $(pr);Q[c.id]=c,f.cubeCount++;var l=new Array(6);function d(e,t,r,n,i,o){var f,s=c.texInfo;for(G.call(s),f=0;f<6;++f)l[f]=U();if("number"!==typeof e&&e)if("object"===typeof e)if(t)L(l[0],e),L(l[1],t),L(l[2],r),L(l[3],n),L(l[4],i),L(l[5],o);else if(H(s,e),E(c,e),"faces"in e){var m=e.faces;for(re(Array.isArray(m)&&6===m.length,"cube faces must be a length 6 array"),f=0;f<6;++f)re("object"===typeof m[f]&&!!m[f],"invalid input for cube map face"),O(l[f],c),L(l[f],m[f])}else for(f=0;f<6;++f)L(l[f],e);else re.raise("invalid arguments to cube map");else{var p=0|e||1;for(f=0;f<6;++f)P(l[f],p,p)}for(O(c,l[0]),re.optional((function(){a.npotTextureCube||re(lr(c.width)&&lr(c.height),"your browser does not support non power or two texture dimensions")})),s.genMipmaps?c.mipmask=(l[0].width<<1)-1:c.mipmask=l[0].mipmask,re.textureCube(c,s,l,a),c.internalformat=l[0].internalformat,d.width=l[0].width,d.height=l[0].height,K(c),f=0;f<6;++f)R(l[f],hr+f);for(N(s,pr),J(),u.profile&&(c.stats.size=Yn(c.internalformat,c.type,d.width,d.height,s.genMipmaps,!0)),d.format=y[c.internalformat],d.type=x[c.type],d.mag=w[s.magFilter],d.min=A[s.minFilter],d.wrapS=_[s.wrapS],d.wrapT=_[s.wrapT],f=0;f<6;++f)W(l[f]);return d}function m(e,t,r,n,a){re(!!t,"must specify image data"),re("number"===typeof e&&e===(0|e)&&e>=0&&e<6,"invalid face");var i=0|r,o=0|n,f=0|a,u=V();return O(u,c),u.width=0,u.height=0,j(u,t),u.width=u.width||(c.width>>f)-i,u.height=u.height||(c.height>>f)-o,re(c.type===u.type&&c.format===u.format&&c.internalformat===u.internalformat,"incompatible format for texture.subimage"),re(i>=0&&o>=0&&i+u.width<=c.width&&o+u.height<=c.height,"texture.subimage write out of bounds"),re(c.mipmask&1<<f,"missing mipmap data"),re(u.data||u.element||u.needsCopy,"missing image data"),K(c),z(u,hr+e,i,o,f),J(),B(u),d}function p(e){var t=0|e;if(t!==c.width){d.width=c.width=t,d.height=c.height=t,K(c);for(var n=0;n<6;++n)for(var a=0;c.mipmask>>a;++a)r.texImage2D(hr+n,a,c.format,t>>a,t>>a,0,c.format,c.type,null);return J(),u.profile&&(c.stats.size=Yn(c.internalformat,c.type,d.width,d.height,!1,!0)),d}}return d(e,t,n,i,o,s),d.subimage=m,d.resize=p,d._reglType="textureCube",d._texture=c,u.profile&&(d.stats=c.stats),d.destroy=function(){c.decRef()},d}function ne(){for(var e=0;e<Y;++e)r.activeTexture(yn+e),r.bindTexture(mr,null),X[e]=null;kt(Q).forEach(Z),f.cubeCount=0,f.textureCount=0}function ae(){for(var e=0;e<Y;++e){var t=X[e];t&&(t.bindCount=0,t.unit=-1,X[e]=null)}kt(Q).forEach((function(e){e.texture=r.createTexture(),r.bindTexture(e.target,e.texture);for(var t=0;t<32;++t)if(0!==(e.mipmask&1<<t))if(e.target===mr)r.texImage2D(mr,t,e.internalformat,e.width>>t,e.height>>t,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)r.texImage2D(hr+n,t,e.internalformat,e.width>>t,e.height>>t,0,e.internalformat,e.type,null);N(e.texInfo,e.target)}))}function ie(){for(var e=0;e<Y;++e){var t=X[e];t&&(t.bindCount=0,t.unit=-1,X[e]=null),r.activeTexture(yn+e),r.bindTexture(mr,null),r.bindTexture(pr,null)}}return t($.prototype,{bind:function(){var e=this;e.bindCount+=1;var t=e.unit;if(t<0){for(var n=0;n<Y;++n){var a=X[n];if(a){if(a.bindCount>0)continue;a.unit=-1}X[n]=e,t=n;break}t>=Y&&re.raise("insufficient number of texture units"),u.profile&&f.maxTextureUnits<t+1&&(f.maxTextureUnits=t+1),e.unit=t,r.activeTexture(yn+t),r.bindTexture(e.target,e.texture)}return t},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Z(this)}}),u.profile&&(f.getTotalTextureSize=function(){var e=0;return Object.keys(Q).forEach((function(t){e+=Q[t].stats.size})),e}),{create2D:ee,createCube:te,clear:ne,getTexture:function(e){return null},restore:ae,refresh:ie}}zn[wr]=2,zn[Ar]=2,zn[_r]=2,zn[Dr]=4,zn[Fr]=.5,zn[Vr]=.5,zn[Br]=1,zn[Ir]=1,zn[Pr]=.5,zn[Lr]=1,zn[Rr]=1,zn[Mr]=.5,zn[Ur]=.25,zn[Wr]=.5,zn[Gr]=.25,zn[Hr]=.5;var $n=36161,Kn=32854,Jn=32855,Zn=36194,ea=33189,ta=36168,ra=34041,na=35907,aa=34836,ia=34842,oa=34843,fa=[];function ua(e,t,r){return fa[e]*t*r}fa[Kn]=2,fa[Jn]=2,fa[Zn]=2,fa[ea]=2,fa[ta]=1,fa[ra]=4,fa[na]=4,fa[aa]=16,fa[ia]=8,fa[oa]=6;var sa=function(e,t,r,n,a){var i={rgba4:Kn,rgb565:Zn,"rgb5 a1":Jn,depth:ea,stencil:ta,"depth stencil":ra};t.ext_srgb&&(i.srgba=na),t.ext_color_buffer_half_float&&(i.rgba16f=ia,i.rgb16f=oa),t.webgl_color_buffer_float&&(i.rgba32f=aa);var o=[];Object.keys(i).forEach((function(e){var t=i[e];o[t]=e}));var f=0,u={};function s(e){this.id=f++,this.refCount=1,this.renderbuffer=e,this.format=Kn,this.width=0,this.height=0,a.profile&&(this.stats={size:0})}function c(t){var r=t.renderbuffer;re(r,"must not double destroy renderbuffer"),e.bindRenderbuffer($n,null),e.deleteRenderbuffer(r),t.renderbuffer=null,t.refCount=0,delete u[t.id],n.renderbufferCount--}function l(t,f){var c=new s(e.createRenderbuffer());function l(t,n){var f=0,u=0,s=Kn;if("object"===typeof t&&t){var d=t;if("shape"in d){var m=d.shape;re(Array.isArray(m)&&m.length>=2,"invalid renderbuffer shape"),f=0|m[0],u=0|m[1]}else"radius"in d&&(f=u=0|d.radius),"width"in d&&(f=0|d.width),"height"in d&&(u=0|d.height);"format"in d&&(re.parameter(d.format,i,"invalid renderbuffer format"),s=i[d.format])}else"number"===typeof t?(f=0|t,u="number"===typeof n?0|n:f):t?re.raise("invalid arguments to renderbuffer constructor"):f=u=1;if(re(f>0&&u>0&&f<=r.maxRenderbufferSize&&u<=r.maxRenderbufferSize,"invalid renderbuffer size"),f!==c.width||u!==c.height||s!==c.format)return l.width=c.width=f,l.height=c.height=u,c.format=s,e.bindRenderbuffer($n,c.renderbuffer),e.renderbufferStorage($n,s,f,u),re(0===e.getError(),"invalid render buffer format"),a.profile&&(c.stats.size=ua(c.format,c.width,c.height)),l.format=o[c.format],l}function d(t,n){var i=0|t,o=0|n||i;return i===c.width&&o===c.height||(re(i>0&&o>0&&i<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),l.width=c.width=i,l.height=c.height=o,e.bindRenderbuffer($n,c.renderbuffer),e.renderbufferStorage($n,c.format,i,o),re(0===e.getError(),"invalid render buffer format"),a.profile&&(c.stats.size=ua(c.format,c.width,c.height))),l}return u[c.id]=c,n.renderbufferCount++,l(t,f),l.resize=d,l._reglType="renderbuffer",l._renderbuffer=c,a.profile&&(l.stats=c.stats),l.destroy=function(){c.decRef()},l}function d(){kt(u).forEach((function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer($n,t.renderbuffer),e.renderbufferStorage($n,t.format,t.width,t.height)})),e.bindRenderbuffer($n,null)}return s.prototype.decRef=function(){--this.refCount<=0&&c(this)},a.profile&&(n.getTotalRenderbufferSize=function(){var e=0;return Object.keys(u).forEach((function(t){e+=u[t].stats.size})),e}),{create:l,clear:function(){kt(u).forEach(c)},restore:d}},ca=36160,la=36161,da=3553,ma=34069,pa=36064,ha=36096,ba=36128,va=33306,ga=36053,ya=36054,xa=36055,wa=36057,Aa=36061,_a=36193,ka=5121,Sa=5126,Oa=6407,Ea=6408,Ta=6402,Da=[Oa,Ea],ja=[];ja[Ea]=4,ja[Oa]=3;var Ca=[];Ca[ka]=1,Ca[Sa]=4,Ca[_a]=2;var za=33189,Fa=36168,Va=34041,Ba=[32854,32855,36194,35907,34842,34843,34836],Ia={};function Pa(e,r,n,a,i,o){var f={cur:null,next:null,dirty:!1,setFBO:null},u=["rgba"],s=["rgba4","rgb565","rgb5 a1"];r.ext_srgb&&s.push("srgba"),r.ext_color_buffer_half_float&&s.push("rgba16f","rgb16f"),r.webgl_color_buffer_float&&s.push("rgba32f");var c=["uint8"];function l(e,t,r){this.target=e,this.texture=t,this.renderbuffer=r;var n=0,a=0;t?(n=t.width,a=t.height):r&&(n=r.width,a=r.height),this.width=n,this.height=a}function d(e){e&&(e.texture&&e.texture._texture.decRef(),e.renderbuffer&&e.renderbuffer._renderbuffer.decRef())}function m(e,t,r){if(e)if(e.texture){var n=e.texture._texture,a=Math.max(1,n.width),i=Math.max(1,n.height);re(a===t&&i===r,"inconsistent width/height for supplied texture"),n.refCount+=1}else{var o=e.renderbuffer._renderbuffer;re(o.width===t&&o.height===r,"inconsistent width/height for renderbuffer"),o.refCount+=1}}function p(t,r){r&&(r.texture?e.framebufferTexture2D(ca,t,r.target,r.texture._texture.texture,0):e.framebufferRenderbuffer(ca,t,la,r.renderbuffer._renderbuffer.renderbuffer))}function h(e){var t=da,r=null,n=null,a=e;"object"===typeof e&&(a=e.data,"target"in e&&(t=0|e.target)),re.type(a,"function","invalid attachment data");var i=a._reglType;return"texture2d"===i?(r=a,re(t===da)):"textureCube"===i?(r=a,re(t>=ma&&t<ma+6,"invalid cube map target")):"renderbuffer"===i?(n=a,t=la):re.raise("invalid regl object for attachment"),new l(t,r,n)}function b(e,t,r,n,o){if(r){var f=a.create2D({width:e,height:t,format:n,type:o});return f._texture.refCount=0,new l(da,f,null)}var u=i.create({width:e,height:t,format:n});return u._renderbuffer.refCount=0,new l(la,null,u)}function v(e){return e&&(e.texture||e.renderbuffer)}function g(e,t,r){e&&(e.texture?e.texture.resize(t,r):e.renderbuffer&&e.renderbuffer.resize(t,r),e.width=t,e.height=r)}r.oes_texture_half_float&&c.push("half float","float16"),r.oes_texture_float&&c.push("float","float32");var y=0,x={};function w(){this.id=y++,x[this.id]=this,this.framebuffer=e.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function A(e){e.colorAttachments.forEach(d),d(e.depthAttachment),d(e.stencilAttachment),d(e.depthStencilAttachment)}function _(t){var r=t.framebuffer;re(r,"must not double destroy framebuffer"),e.deleteFramebuffer(r),t.framebuffer=null,o.framebufferCount--,delete x[t.id]}function k(t){var r;e.bindFramebuffer(ca,t.framebuffer);var a=t.colorAttachments;for(r=0;r<a.length;++r)p(pa+r,a[r]);for(r=a.length;r<n.maxColorAttachments;++r)e.framebufferTexture2D(ca,pa+r,da,null,0);e.framebufferTexture2D(ca,va,da,null,0),e.framebufferTexture2D(ca,ha,da,null,0),e.framebufferTexture2D(ca,ba,da,null,0),p(ha,t.depthAttachment),p(ba,t.stencilAttachment),p(va,t.depthStencilAttachment);var i=e.checkFramebufferStatus(ca);e.isContextLost()||i===ga||re.raise("framebuffer configuration not supported, status = "+Ia[i]),e.bindFramebuffer(ca,f.next?f.next.framebuffer:null),f.cur=f.next,e.getError()}function S(e,a){var i=new w;function l(e,t){var a;re(f.next!==i,"can not update framebuffer which is currently in use");var o=0,d=0,p=!0,g=!0,y=null,x=!0,w="rgba",_="uint8",S=1,O=null,E=null,T=null,D=!1;if("number"===typeof e)o=0|e,d=0|t||o;else if(e){re.type(e,"object","invalid arguments for framebuffer");var j=e;if("shape"in j){var C=j.shape;re(Array.isArray(C)&&C.length>=2,"invalid shape for framebuffer"),o=C[0],d=C[1]}else"radius"in j&&(o=d=j.radius),"width"in j&&(o=j.width),"height"in j&&(d=j.height);("color"in j||"colors"in j)&&(y=j.color||j.colors,Array.isArray(y)&&re(1===y.length||r.webgl_draw_buffers,"multiple render targets not supported")),y||("colorCount"in j&&(S=0|j.colorCount,re(S>0,"invalid color buffer count")),"colorTexture"in j&&(x=!!j.colorTexture,w="rgba4"),"colorType"in j&&(_=j.colorType,x?(re(r.oes_texture_float||!("float"===_||"float32"===_),"you must enable OES_texture_float in order to use floating point framebuffer objects"),re(r.oes_texture_half_float||!("half float"===_||"float16"===_),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===_||"float16"===_?(re(r.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),w="rgba16f"):"float"!==_&&"float32"!==_||(re(r.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),w="rgba32f"),re.oneOf(_,c,"invalid color type")),"colorFormat"in j&&(w=j.colorFormat,u.indexOf(w)>=0?x=!0:s.indexOf(w)>=0?x=!1:re.optional((function(){x?re.oneOf(j.colorFormat,u,"invalid color format for texture"):re.oneOf(j.colorFormat,s,"invalid color format for renderbuffer")})))),("depthTexture"in j||"depthStencilTexture"in j)&&(D=!(!j.depthTexture&&!j.depthStencilTexture),re(!D||r.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in j&&("boolean"===typeof j.depth?p=j.depth:(O=j.depth,g=!1)),"stencil"in j&&("boolean"===typeof j.stencil?g=j.stencil:(E=j.stencil,p=!1)),"depthStencil"in j&&("boolean"===typeof j.depthStencil?p=g=j.depthStencil:(T=j.depthStencil,p=!1,g=!1))}else o=d=1;var z=null,F=null,V=null,B=null;if(Array.isArray(y))z=y.map(h);else if(y)z=[h(y)];else for(z=new Array(S),a=0;a<S;++a)z[a]=b(o,d,x,w,_);re(r.webgl_draw_buffers||z.length<=1,"you must enable the WEBGL_draw_buffers extension in order to use multiple color buffers."),re(z.length<=n.maxColorAttachments,"too many color attachments, not supported"),o=o||z[0].width,d=d||z[0].height,O?F=h(O):p&&!g&&(F=b(o,d,D,"depth","uint32")),E?V=h(E):g&&!p&&(V=b(o,d,!1,"stencil","uint8")),T?B=h(T):!O&&!E&&g&&p&&(B=b(o,d,D,"depth stencil","depth stencil")),re(!!O+!!E+!!T<=1,"invalid framebuffer configuration, can specify exactly one depth/stencil attachment");var I=null;for(a=0;a<z.length;++a)if(m(z[a],o,d),re(!z[a]||z[a].texture&&Da.indexOf(z[a].texture._texture.format)>=0||z[a].renderbuffer&&Ba.indexOf(z[a].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+a+" is invalid"),z[a]&&z[a].texture){var P=ja[z[a].texture._texture.format]*Ca[z[a].texture._texture.type];null===I?I=P:re(I===P,"all color attachments much have the same number of bits per pixel.")}return m(F,o,d),re(!F||F.texture&&F.texture._texture.format===Ta||F.renderbuffer&&F.renderbuffer._renderbuffer.format===za,"invalid depth attachment for framebuffer object"),m(V,o,d),re(!V||V.renderbuffer&&V.renderbuffer._renderbuffer.format===Fa,"invalid stencil attachment for framebuffer object"),m(B,o,d),re(!B||B.texture&&B.texture._texture.format===Va||B.renderbuffer&&B.renderbuffer._renderbuffer.format===Va,"invalid depth-stencil attachment for framebuffer object"),A(i),i.width=o,i.height=d,i.colorAttachments=z,i.depthAttachment=F,i.stencilAttachment=V,i.depthStencilAttachment=B,l.color=z.map(v),l.depth=v(F),l.stencil=v(V),l.depthStencil=v(B),l.width=i.width,l.height=i.height,k(i),l}function d(e,t){re(f.next!==i,"can not resize a framebuffer which is currently in use");var r=Math.max(0|e,1),n=Math.max(0|t||r,1);if(r===i.width&&n===i.height)return l;for(var a=i.colorAttachments,o=0;o<a.length;++o)g(a[o],r,n);return g(i.depthAttachment,r,n),g(i.stencilAttachment,r,n),g(i.depthStencilAttachment,r,n),i.width=l.width=r,i.height=l.height=n,k(i),l}return o.framebufferCount++,l(e,a),t(l,{resize:d,_reglType:"framebuffer",_framebuffer:i,destroy:function(){_(i),A(i)},use:function(e){f.setFBO({framebuffer:l},e)}})}function O(e){var i=Array(6);function o(e){var n;re(i.indexOf(f.next)<0,"can not update framebuffer which is currently in use");var s,l={color:null},d=0,m=null,p="rgba",h="uint8",b=1;if("number"===typeof e)d=0|e;else if(e){re.type(e,"object","invalid arguments for framebuffer");var v=e;if("shape"in v){var g=v.shape;re(Array.isArray(g)&&g.length>=2,"invalid shape for framebuffer"),re(g[0]===g[1],"cube framebuffer must be square"),d=g[0]}else"radius"in v&&(d=0|v.radius),"width"in v?(d=0|v.width,"height"in v&&re(v.height===d,"must be square")):"height"in v&&(d=0|v.height);("color"in v||"colors"in v)&&(m=v.color||v.colors,Array.isArray(m)&&re(1===m.length||r.webgl_draw_buffers,"multiple render targets not supported")),m||("colorCount"in v&&(b=0|v.colorCount,re(b>0,"invalid color buffer count")),"colorType"in v&&(re.oneOf(v.colorType,c,"invalid color type"),h=v.colorType),"colorFormat"in v&&(p=v.colorFormat,re.oneOf(v.colorFormat,u,"invalid color format for texture"))),"depth"in v&&(l.depth=v.depth),"stencil"in v&&(l.stencil=v.stencil),"depthStencil"in v&&(l.depthStencil=v.depthStencil)}else d=1;if(m)if(Array.isArray(m))for(s=[],n=0;n<m.length;++n)s[n]=m[n];else s=[m];else{s=Array(b);var y={radius:d,format:p,type:h};for(n=0;n<b;++n)s[n]=a.createCube(y)}for(l.color=Array(s.length),n=0;n<s.length;++n){var x=s[n];re("function"===typeof x&&"textureCube"===x._reglType,"invalid cube map"),d=d||x.width,re(x.width===d&&x.height===d,"invalid cube map shape"),l.color[n]={target:ma,data:s[n]}}for(n=0;n<6;++n){for(var w=0;w<s.length;++w)l.color[w].target=ma+n;n>0&&(l.depth=i[0].depth,l.stencil=i[0].stencil,l.depthStencil=i[0].depthStencil),i[n]?i[n](l):i[n]=S(l)}return t(o,{width:d,height:d,color:s})}function s(e){var t,r=0|e;if(re(r>0&&r<=n.maxCubeMapSize,"invalid radius for cube fbo"),r===o.width)return o;var a=o.color;for(t=0;t<a.length;++t)a[t].resize(r);for(t=0;t<6;++t)i[t].resize(r);return o.width=o.height=r,o}return o(e),t(o,{faces:i,resize:s,_reglType:"framebufferCube",destroy:function(){i.forEach((function(e){e.destroy()}))}})}function E(){f.cur=null,f.next=null,f.dirty=!0,kt(x).forEach((function(t){t.framebuffer=e.createFramebuffer(),k(t)}))}return t(f,{getFramebuffer:function(e){if("function"===typeof e&&"framebuffer"===e._reglType){var t=e._framebuffer;if(t instanceof w)return t}return null},create:S,createCube:O,clear:function(){kt(x).forEach(_)},restore:E})}Ia[ga]="complete",Ia[ya]="incomplete attachment",Ia[wa]="incomplete dimensions",Ia[xa]="incomplete, missing attachment",Ia[Aa]="unsupported";var La=5126,Ra=34962,Ma=34963,Ua=["attributes","elements","offset","count","primitive","instances"];function Wa(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=La,this.offset=0,this.stride=0,this.divisor=0}function Ga(t,r,n,a,i,o,f){for(var u=n.maxAttributes,s=new Array(u),c=0;c<u;++c)s[c]=new Wa;var l=0,d={},m={Record:Wa,scope:{},state:s,currentVAO:null,targetVAO:null,restore:h()?A:function(){},createVAO:_,getVAO:v,destroyBuffer:p,setVAO:h()?g:y,clear:h()?x:function(){}};function p(e){for(var r=0;r<s.length;++r){var n=s[r];n.buffer===e&&(t.disableVertexAttribArray(r),n.buffer=null)}}function h(){return r.oes_vertex_array_object}function b(){return r.angle_instanced_arrays}function v(e){return"function"===typeof e&&e._vao?e._vao:null}function g(e){if(e!==m.currentVAO){var t=h();e?t.bindVertexArrayOES(e.vao):t.bindVertexArrayOES(null),m.currentVAO=e}}function y(e){if(e!==m.currentVAO){if(e)e.bindAttrs();else{for(var r=b(),n=0;n<s.length;++n){var a=s[n];a.buffer?(t.enableVertexAttribArray(n),a.buffer.bind(),t.vertexAttribPointer(n,a.size,a.type,a.normalized,a.stride,a.offfset),r&&a.divisor&&r.vertexAttribDivisorANGLE(n,a.divisor)):(t.disableVertexAttribArray(n),t.vertexAttrib4f(n,a.x,a.y,a.z,a.w))}f.elements?t.bindBuffer(Ma,f.elements.buffer.buffer):t.bindBuffer(Ma,null)}m.currentVAO=e}}function x(){kt(d).forEach((function(e){e.destroy()}))}function w(){this.id=++l,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var e=h();this.vao=e?e.createVertexArrayOES():null,d[this.id]=this,this.buffers=[]}function A(){h()&&kt(d).forEach((function(e){e.refresh()}))}function _(t){var n=new w;function f(t){var a;if(Array.isArray(t))a=t,n.elements&&n.ownsElements&&n.elements.destroy(),n.elements=null,n.ownsElements=!1,n.offset=0,n.count=0,n.instances=-1,n.primitive=4;else{if(re("object"===typeof t,"invalid arguments for create vao"),re("attributes"in t,"must specify attributes for vao"),t.elements){var s=t.elements;n.ownsElements?"function"===typeof s&&"elements"===s._reglType?(n.elements.destroy(),n.ownsElements=!1):(n.elements(s),n.ownsElements=!1):o.getElements(t.elements)?(n.elements=t.elements,n.ownsElements=!1):(n.elements=o.create(t.elements),n.ownsElements=!0)}else n.elements=null,n.ownsElements=!1;a=t.attributes,n.offset=0,n.count=-1,n.instances=-1,n.primitive=4,n.elements&&(n.count=n.elements._elements.vertCount,n.primitive=n.elements._elements.primType),"offset"in t&&(n.offset=0|t.offset),"count"in t&&(n.count=0|t.count),"instances"in t&&(n.instances=0|t.instances),"primitive"in t&&(re(t.primitive in qt,"bad primitive type: "+t.primitive),n.primitive=qt[t.primitive]),re.optional((()=>{for(var e=Object.keys(t),r=0;r<e.length;++r)re(Ua.indexOf(e[r])>=0,'invalid option for vao: "'+e[r]+'" valid options are '+Ua)})),re(Array.isArray(a),"attributes must be an array")}re(a.length<u,"too many attributes"),re(a.length>0,"must specify at least one attribute");var c={},l=n.attributes;l.length=a.length;for(var d=0;d<a.length;++d){var m,p=a[d],h=l[d]=new Wa,b=p.data||p;Array.isArray(b)||e(b)||_t(b)?(n.buffers[d]&&(m=n.buffers[d],e(b)&&m._buffer.byteLength>=b.byteLength?m.subdata(b):(m.destroy(),n.buffers[d]=null)),n.buffers[d]||(m=n.buffers[d]=i.create(p,Ra,!1,!0)),h.buffer=i.getBuffer(m),h.size=0|h.buffer.dimension,h.normalized=!1,h.type=h.buffer.dtype,h.offset=0,h.stride=0,h.divisor=0,h.state=1,c[d]=1):i.getBuffer(p)?(h.buffer=i.getBuffer(p),h.size=0|h.buffer.dimension,h.normalized=!1,h.type=h.buffer.dtype,h.offset=0,h.stride=0,h.divisor=0,h.state=1):i.getBuffer(p.buffer)?(h.buffer=i.getBuffer(p.buffer),h.size=0|(+p.size||h.buffer.dimension),h.normalized=!!p.normalized||!1,"type"in p?(re.parameter(p.type,Ft,"invalid buffer type"),h.type=Ft[p.type]):h.type=h.buffer.dtype,h.offset=0|(p.offset||0),h.stride=0|(p.stride||0),h.divisor=0|(p.divisor||0),h.state=1,re(h.size>=1&&h.size<=4,"size must be between 1 and 4"),re(h.offset>=0,"invalid offset"),re(h.stride>=0&&h.stride<=255,"stride must be between 0 and 255"),re(h.divisor>=0,"divisor must be positive"),re(!h.divisor||!!r.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in p?(re(d>0,"first attribute must not be a constant"),h.x=+p.x||0,h.y=+p.y||0,h.z=+p.z||0,h.w=+p.w||0,h.state=2):re(!1,"invalid attribute spec for location "+d)}for(var v=0;v<n.buffers.length;++v)!c[v]&&n.buffers[v]&&(n.buffers[v].destroy(),n.buffers[v]=null);return n.refresh(),f}return a.vaoCount+=1,f.destroy=function(){for(var e=0;e<n.buffers.length;++e)n.buffers[e]&&n.buffers[e].destroy();n.buffers.length=0,n.ownsElements&&(n.elements.destroy(),n.elements=null,n.ownsElements=!1),n.destroy()},f._vao=n,f._reglType="vao",f(t)}return w.prototype.bindAttrs=function(){for(var e=b(),r=this.attributes,n=0;n<r.length;++n){var a=r[n];a.buffer?(t.enableVertexAttribArray(n),t.bindBuffer(Ra,a.buffer.buffer),t.vertexAttribPointer(n,a.size,a.type,a.normalized,a.stride,a.offset),e&&a.divisor&&e.vertexAttribDivisorANGLE(n,a.divisor)):(t.disableVertexAttribArray(n),t.vertexAttrib4f(n,a.x,a.y,a.z,a.w))}for(var i=r.length;i<u;++i)t.disableVertexAttribArray(i);var f=o.getElements(this.elements);f?t.bindBuffer(Ma,f.buffer.buffer):t.bindBuffer(Ma,null)},w.prototype.refresh=function(){var e=h();e&&(e.bindVertexArrayOES(this.vao),this.bindAttrs(),m.currentVAO=null,e.bindVertexArrayOES(null))},w.prototype.destroy=function(){if(this.vao){var e=h();this===m.currentVAO&&(m.currentVAO=null,e.bindVertexArrayOES(null)),e.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),d[this.id]&&(delete d[this.id],a.vaoCount-=1)},m}var Ha=35632,Na=35633,qa=35718,Qa=35721;function Ya(e,r,n,a){var i={},o={};function f(e,t,r,n){this.name=e,this.id=t,this.location=r,this.info=n}function u(e,t){for(var r=0;r<e.length;++r)if(e[r].id===t.id)return void(e[r].location=t.location);e.push(t)}function s(t,n,a){var f=t===Ha?i:o,u=f[n];if(!u){var s=r.str(n);u=e.createShader(t),e.shaderSource(u,s),e.compileShader(u),re.shaderError(e,u,s,t,a),f[n]=u}return u}var c={},l=[],d=0;function m(e,t){this.id=d++,this.fragId=e,this.vertId=t,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,a.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function p(t,n,i){var o,c,l=s(Ha,t.fragId),d=s(Na,t.vertId),m=t.program=e.createProgram();if(e.attachShader(m,l),e.attachShader(m,d),i)for(o=0;o<i.length;++o){var p=i[o];e.bindAttribLocation(m,p[0],p[1])}e.linkProgram(m),re.linkError(e,m,r.str(t.fragId),r.str(t.vertId),n);var h=e.getProgramParameter(m,qa);a.profile&&(t.stats.uniformsCount=h);var b=t.uniforms;for(o=0;o<h;++o)if(c=e.getActiveUniform(m,o)){if(c.size>1)for(var v=0;v<c.size;++v){var g=c.name.replace("[0]","["+v+"]");u(b,new f(g,r.id(g),e.getUniformLocation(m,g),c))}var y=c.name;c.size>1&&(y=y.replace("[0]","")),u(b,new f(y,r.id(y),e.getUniformLocation(m,y),c))}var x=e.getProgramParameter(m,Qa);a.profile&&(t.stats.attributesCount=x);var w=t.attributes;for(o=0;o<x;++o)(c=e.getActiveAttrib(m,o))&&u(w,new f(c.name,r.id(c.name),e.getAttribLocation(m,c.name),c))}function h(){i={},o={};for(var e=0;e<l.length;++e)p(l[e],null,l[e].attributes.map((function(e){return[e.location,e.name]})))}return a.profile&&(n.getMaxUniformsCount=function(){var e=0;return l.forEach((function(t){t.stats.uniformsCount>e&&(e=t.stats.uniformsCount)})),e},n.getMaxAttributesCount=function(){var e=0;return l.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var t=e.deleteShader.bind(e);kt(i).forEach(t),i={},kt(o).forEach(t),o={},l.forEach((function(t){e.deleteProgram(t.program)})),l.length=0,c={},n.shaderCount=0},program:function(r,a,f,u){re.command(r>=0,"missing vertex shader",f),re.command(a>=0,"missing fragment shader",f);var s=c[a];s||(s=c[a]={});var d=s[r];if(d&&(d.refCount++,!u))return d;var h=new m(a,r);return n.shaderCount++,p(h,f,u),d||(s[r]=h),l.push(h),t(h,{destroy:function(){if(h.refCount--,h.refCount<=0){e.deleteProgram(h.program);var t=l.indexOf(h);l.splice(t,1),n.shaderCount--}s[h.vertId].refCount<=0&&(e.deleteShader(o[h.vertId]),delete o[h.vertId],delete c[h.fragId][h.vertId]),Object.keys(c[h.fragId]).length||(e.deleteShader(i[h.fragId]),delete i[h.fragId],delete c[h.fragId])}})},restore:h,shader:s,frag:-1,vert:-1}}var Xa=6408,$a=5121,Ka=3333,Ja=5126;function Za(t,r,n,a,i,o,f){function u(u){var s;null===r.next?(re(i.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),s=$a):(re(null!==r.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),s=r.next.colorAttachments[0].texture._texture.type,re.optional((function(){o.oes_texture_float?(re(s===$a||s===Ja,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),s===Ja&&re(f.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):re(s===$a,"Reading from a framebuffer is only allowed for the type 'uint8'")})));var c=0,l=0,d=a.framebufferWidth,m=a.framebufferHeight,p=null;e(u)?p=u:u&&(re.type(u,"object","invalid arguments to regl.read()"),c=0|u.x,l=0|u.y,re(c>=0&&c<a.framebufferWidth,"invalid x offset for regl.read"),re(l>=0&&l<a.framebufferHeight,"invalid y offset for regl.read"),d=0|(u.width||a.framebufferWidth-c),m=0|(u.height||a.framebufferHeight-l),p=u.data||null),p&&(s===$a?re(p instanceof Uint8Array,"buffer must be 'Uint8Array' when reading from a framebuffer of type 'uint8'"):s===Ja&&re(p instanceof Float32Array,"buffer must be 'Float32Array' when reading from a framebuffer of type 'float'")),re(d>0&&d+c<=a.framebufferWidth,"invalid width for read pixels"),re(m>0&&m+l<=a.framebufferHeight,"invalid height for read pixels"),n();var h=d*m*4;return p||(s===$a?p=new Uint8Array(h):s===Ja&&(p=p||new Float32Array(h))),re.isTypedArray(p,"data buffer for regl.read() must be a typedarray"),re(p.byteLength>=h,"data buffer for regl.read() too small"),t.pixelStorei(Ka,4),t.readPixels(c,l,d,m,Xa,s,p),p}function s(e){var t;return r.setFBO({framebuffer:e.framebuffer},(function(){t=u(e)})),t}function c(e){return e&&"framebuffer"in e?s(e):u(e)}return c}function ei(e){return Array.prototype.slice.call(e)}function ti(e){return ei(e).join("")}function ri(){var e=0,r=[],n=[];function a(t){for(var a=0;a<n.length;++a)if(n[a]===t)return r[a];var i="g"+e++;return r.push(i),n.push(t),i}function i(){var r=[];function n(){r.push.apply(r,ei(arguments))}var a=[];function i(){var t="v"+e++;return a.push(t),arguments.length>0&&(r.push(t,"="),r.push.apply(r,ei(arguments)),r.push(";")),t}return t(n,{def:i,toString:function(){return ti([a.length>0?"var "+a.join(",")+";":"",ti(r)])}})}function o(){var e=i(),r=i(),n=e.toString,a=r.toString;function o(t,n){r(t,n,"=",e.def(t,n),";")}return t((function(){e.apply(e,ei(arguments))}),{def:e.def,entry:e,exit:r,save:o,set:function(t,r,n){o(t,r),e(t,r,"=",n,";")},toString:function(){return n()+a()}})}function f(){var e=ti(arguments),r=o(),n=o(),a=r.toString,i=n.toString;return t(r,{then:function(){return r.apply(r,ei(arguments)),this},else:function(){return n.apply(n,ei(arguments)),this},toString:function(){var t=i();return t&&(t="else{"+t+"}"),ti(["if(",e,"){",a(),"}",t])}})}var u=i(),s={};function c(e,r){var n=[];function a(){var e="a"+n.length;return n.push(e),e}r=r||0;for(var i=0;i<r;++i)a();var f=o(),u=f.toString;return s[e]=t(f,{arg:a,toString:function(){return ti(["function(",n.join(),"){",u(),"}"])}})}function l(){var e=['"use strict";',u,"return {"];Object.keys(s).forEach((function(t){e.push('"',t,'":',s[t].toString(),",")})),e.push("}");var t=ti(e).replace(/;/g,";\n").replace(/}/g,"}\n").replace(/{/g,"{\n");return Function.apply(null,r.concat(t)).apply(null,n)}return{global:u,link:a,block:i,proc:c,scope:o,cond:f,compile:l}}var ni="xyzw".split(""),ai=5121,ii=1,oi=2,fi=0,ui=1,si=2,ci=3,li=4,di=5,mi=6,pi="dither",hi="blend.enable",bi="blend.color",vi="blend.equation",gi="blend.func",yi="depth.enable",xi="depth.func",wi="depth.range",Ai="depth.mask",_i="colorMask",ki="cull.enable",Si="cull.face",Oi="frontFace",Ei="lineWidth",Ti="polygonOffset.enable",Di="polygonOffset.offset",ji="sample.alpha",Ci="sample.enable",zi="sample.coverage",Fi="stencil.enable",Vi="stencil.mask",Bi="stencil.func",Ii="stencil.opFront",Pi="stencil.opBack",Li="scissor.enable",Ri="scissor.box",Mi="viewport",Ui="profile",Wi="framebuffer",Gi="vert",Hi="frag",Ni="elements",qi="primitive",Qi="count",Yi="offset",Xi="instances",$i="vao",Ki="Width",Ji="Height",Zi=Wi+Ki,eo=Wi+Ji,to=Mi+Ki,ro=Mi+Ji,no="drawingBuffer",ao=no+Ki,io=no+Ji,oo=[gi,vi,Bi,Ii,Pi,zi,Mi,Ri,Di],fo=34962,uo=34963,so=3553,co=34067,lo=2884,mo=3042,po=3024,ho=2960,bo=2929,vo=3089,go=32823,yo=32926,xo=32928,wo=5126,Ao=35664,_o=35665,ko=35666,So=5124,Oo=35667,Eo=35668,To=35669,Do=35670,jo=35671,Co=35672,zo=35673,Fo=35674,Vo=35675,Bo=35676,Io=35678,Po=35680,Lo=4,Ro=1028,Mo=1029,Uo=2304,Wo=2305,Go=32775,Ho=32776,No=519,qo=7680,Qo=0,Yo=1,Xo=32774,$o=513,Ko=36160,Jo=36064,Zo={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ef=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],tf={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},rf={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},nf={frag:35632,vert:35633},af={cw:Uo,ccw:Wo};function of(t){return Array.isArray(t)||e(t)||_t(t)}function ff(e){return e.sort((function(e,t){return e===Mi?-1:t===Mi?1:e<t?-1:1}))}function uf(e,t,r,n){this.thisDep=e,this.contextDep=t,this.propDep=r,this.append=n}function sf(e){return e&&!(e.thisDep||e.contextDep||e.propDep)}function cf(e){return new uf(!1,!1,!1,e)}function lf(e,t){var r=e.type;if(r===fi){var n=e.data.length;return new uf(!0,n>=1,n>=2,t)}if(r===li){var a=e.data;return new uf(a.thisDep,a.contextDep,a.propDep,t)}if(r===di)return new uf(!1,!1,!1,t);if(r===mi){for(var i=!1,o=!1,f=!1,u=0;u<e.data.length;++u){var s=e.data[u];if(s.type===ui)f=!0;else if(s.type===si)o=!0;else if(s.type===ci)i=!0;else if(s.type===fi){i=!0;var c=s.data;c>=1&&(o=!0),c>=2&&(f=!0)}else s.type===li&&(i=i||s.data.thisDep,o=o||s.data.contextDep,f=f||s.data.propDep)}return new uf(i,o,f,t)}return new uf(r===ci,r===si,r===ui,t)}var df=new uf(!1,!1,!1,(function(){}));function mf(e,r,n,a,i,o,f,u,s,c,l,d,m,p,h){var b=c.Record,v={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&(v.min=Go,v.max=Ho);var g=n.angle_instanced_arrays,y=n.webgl_draw_buffers,x=n.oes_vertex_array_object,w={dirty:!0,profile:h.profile},A={},_=[],k={},S={};function O(e){return e.replace(".","_")}function E(e,t,r){var n=O(e);_.push(e),A[n]=w[n]=!!r,k[n]=t}function T(e,t,r){var n=O(e);_.push(e),Array.isArray(r)?(w[n]=r.slice(),A[n]=r.slice()):w[n]=A[n]=r,S[n]=t}E(pi,po),E(hi,mo),T(bi,"blendColor",[0,0,0,0]),T(vi,"blendEquationSeparate",[Xo,Xo]),T(gi,"blendFuncSeparate",[Yo,Qo,Yo,Qo]),E(yi,bo,!0),T(xi,"depthFunc",$o),T(wi,"depthRange",[0,1]),T(Ai,"depthMask",!0),T(_i,_i,[!0,!0,!0,!0]),E(ki,lo),T(Si,"cullFace",Mo),T(Oi,Oi,Wo),T(Ei,Ei,1),E(Ti,go),T(Di,"polygonOffset",[0,0]),E(ji,yo),E(Ci,xo),T(zi,"sampleCoverage",[1,!1]),E(Fi,ho),T(Vi,"stencilMask",-1),T(Bi,"stencilFunc",[No,0,-1]),T(Ii,"stencilOpSeparate",[Ro,qo,qo,qo]),T(Pi,"stencilOpSeparate",[Mo,qo,qo,qo]),E(Li,vo),T(Ri,"scissor",[0,0,e.drawingBufferWidth,e.drawingBufferHeight]),T(Mi,Mi,[0,0,e.drawingBufferWidth,e.drawingBufferHeight]);var D={gl:e,context:m,strings:r,next:A,current:w,draw:d,elements:o,buffer:i,shader:l,attributes:c.state,vao:c,uniforms:s,framebuffer:u,extensions:n,timer:p,isBufferArgs:of},j={primTypes:qt,compareFuncs:tf,blendFuncs:Zo,blendEquations:v,stencilOps:rf,glTypes:Ft,orientationType:af};re.optional((function(){D.isArrayLike=cr})),y&&(j.backBuffer=[Mo],j.drawBuffer=Oe(a.maxDrawbuffers,(function(e){return 0===e?[0]:Oe(e,(function(e){return Jo+e}))})));var C=0;function z(){var e=ri(),t=e.link,n=e.global;e.id=C++,e.batchId="0";var a=t(D),i=e.shared={props:"a0"};Object.keys(D).forEach((function(e){i[e]=n.def(a,".",e)})),re.optional((function(){e.CHECK=t(re),e.commandStr=re.guessCommand(),e.command=t(e.commandStr),e.assert=function(e,r,n){e("if(!(",r,"))",this.CHECK,".commandRaise(",t(n),",",this.command,");")},j.invalidBlendCombinations=ef}));var o=e.next={},f=e.current={};Object.keys(S).forEach((function(e){Array.isArray(w[e])&&(o[e]=n.def(i.next,".",e),f[e]=n.def(i.current,".",e))}));var u=e.constants={};Object.keys(j).forEach((function(e){u[e]=n.def(JSON.stringify(j[e]))})),e.invoke=function(r,n){switch(n.type){case fi:var a=["this",i.context,i.props,e.batchId];return r.def(t(n.data),".call(",a.slice(0,Math.max(n.data.length+1,4)),")");case ui:return r.def(i.props,n.data);case si:return r.def(i.context,n.data);case ci:return r.def("this",n.data);case li:return n.data.append(e,r),n.data.ref;case di:return n.data.toString();case mi:return n.data.map((function(t){return e.invoke(r,t)}))}},e.attribCache={};var s={};return e.scopeAttrib=function(e){var n=r.id(e);if(n in s)return s[n];var a=c.scope[n];return a||(a=c.scope[n]=new b),s[n]=t(a)},e}function F(e){var t,r=e.static,n=e.dynamic;if(Ui in r){var a=!!r[Ui];(t=cf((function(e,t){return a}))).enable=a}else if(Ui in n){var i=n[Ui];t=lf(i,(function(e,t){return e.invoke(t,i)}))}return t}function V(e,t){var r=e.static,n=e.dynamic;if(Wi in r){var a=r[Wi];return a?(a=u.getFramebuffer(a),re.command(a,"invalid framebuffer object"),cf((function(e,t){var r=e.link(a),n=e.shared;t.set(n.framebuffer,".next",r);var i=n.context;return t.set(i,"."+Zi,r+".width"),t.set(i,"."+eo,r+".height"),r}))):cf((function(e,t){var r=e.shared;t.set(r.framebuffer,".next","null");var n=r.context;return t.set(n,"."+Zi,n+"."+ao),t.set(n,"."+eo,n+"."+io),"null"}))}if(Wi in n){var i=n[Wi];return lf(i,(function(e,t){var r=e.invoke(t,i),n=e.shared,a=n.framebuffer,o=t.def(a,".getFramebuffer(",r,")");re.optional((function(){e.assert(t,"!"+r+"||"+o,"invalid framebuffer object")})),t.set(a,".next",o);var f=n.context;return t.set(f,"."+Zi,o+"?"+o+".width:"+f+"."+ao),t.set(f,"."+eo,o+"?"+o+".height:"+f+"."+io),o}))}return null}function B(e,t,r){var n=e.static,a=e.dynamic;function i(e){if(e in n){var i=n[e];re.commandType(i,"object","invalid "+e,r.commandStr);var o,f,u=!0,s=0|i.x,c=0|i.y;return"width"in i?(o=0|i.width,re.command(o>=0,"invalid "+e,r.commandStr)):u=!1,"height"in i?(f=0|i.height,re.command(f>=0,"invalid "+e,r.commandStr)):u=!1,new uf(!u&&t&&t.thisDep,!u&&t&&t.contextDep,!u&&t&&t.propDep,(function(e,t){var r=e.shared.context,n=o;"width"in i||(n=t.def(r,".",Zi,"-",s));var a=f;return"height"in i||(a=t.def(r,".",eo,"-",c)),[s,c,n,a]}))}if(e in a){var l=a[e],d=lf(l,(function(t,r){var n=t.invoke(r,l);re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)}));var a=t.shared.context,i=r.def(n,".x|0"),o=r.def(n,".y|0"),f=r.def('"width" in ',n,"?",n,".width|0:","(",a,".",Zi,"-",i,")"),u=r.def('"height" in ',n,"?",n,".height|0:","(",a,".",eo,"-",o,")");return re.optional((function(){t.assert(r,f+">=0&&"+u+">=0","invalid "+e)})),[i,o,f,u]}));return t&&(d.thisDep=d.thisDep||t.thisDep,d.contextDep=d.contextDep||t.contextDep,d.propDep=d.propDep||t.propDep),d}return t?new uf(t.thisDep,t.contextDep,t.propDep,(function(e,t){var r=e.shared.context;return[0,0,t.def(r,".",Zi),t.def(r,".",eo)]})):null}var o=i(Mi);if(o){var f=o;o=new uf(o.thisDep,o.contextDep,o.propDep,(function(e,t){var r=f.append(e,t),n=e.shared.context;return t.set(n,"."+to,r[2]),t.set(n,"."+ro,r[3]),r}))}return{viewport:o,scissor_box:i(Ri)}}function I(e,t){var r=e.static;if("string"===typeof r[Hi]&&"string"===typeof r[Gi]){if(Object.keys(t.dynamic).length>0)return null;var n=t.static,a=Object.keys(n);if(a.length>0&&"number"===typeof n[a[0]]){for(var i=[],o=0;o<a.length;++o)re("number"===typeof n[a[o]],"must specify all vertex attribute locations when using vaos"),i.push([0|n[a[o]],a[o]]);return i}}return null}function P(e,t,n){var a=e.static,i=e.dynamic;function o(e){if(e in a){var t=r.id(a[e]);re.optional((function(){l.shader(nf[e],t,re.guessCommand())}));var n=cf((function(){return t}));return n.id=t,n}if(e in i){var o=i[e];return lf(o,(function(t,r){var n=t.invoke(r,o),a=r.def(t.shared.strings,".id(",n,")");return re.optional((function(){r(t.shared.shader,".shader(",nf[e],",",a,",",t.command,");")})),a}))}return null}var f,u=o(Hi),s=o(Gi),c=null;return sf(u)&&sf(s)?(c=l.program(s.id,u.id,null,n),f=cf((function(e,t){return e.link(c)}))):f=new uf(u&&u.thisDep||s&&s.thisDep,u&&u.contextDep||s&&s.contextDep,u&&u.propDep||s&&s.propDep,(function(e,t){var r,n=e.shared.shader;r=u?u.append(e,t):t.def(n,".",Hi);var a=n+".program("+(s?s.append(e,t):t.def(n,".",Gi))+","+r;return re.optional((function(){a+=","+e.command})),t.def(a+")")})),{frag:u,vert:s,progVar:f,program:c}}function L(e,t){var r=e.static,n=e.dynamic,a={},i=!1;function f(){if($i in r){var e=r[$i];return null!==e&&null===c.getVAO(e)&&(e=c.createVAO(e)),i=!0,a.vao=e,cf((function(t){var r=c.getVAO(e);return r?t.link(r):"null"}))}if($i in n){i=!0;var t=n[$i];return lf(t,(function(e,r){var n=e.invoke(r,t);return r.def(e.shared.vao+".getVAO("+n+")")}))}return null}var u=f(),s=!1;function l(){if(Ni in r){var e=r[Ni];if(a.elements=e,of(e)){var f=a.elements=o.create(e,!0);e=o.getElements(f),s=!0}else e&&(e=o.getElements(e),s=!0,re.command(e,"invalid elements",t.commandStr));var c=cf((function(t,r){if(e){var n=t.link(e);return t.ELEMENTS=n,n}return t.ELEMENTS=null,null}));return c.value=e,c}if(Ni in n){s=!0;var l=n[Ni];return lf(l,(function(e,t){var r=e.shared,n=r.isBufferArgs,a=r.elements,i=e.invoke(t,l),o=t.def("null"),f=t.def(n,"(",i,")"),u=e.cond(f).then(o,"=",a,".createStream(",i,");").else(o,"=",a,".getElements(",i,");");return re.optional((function(){e.assert(u.else,"!"+i+"||"+o,"invalid elements")})),t.entry(u),t.exit(e.cond(f).then(a,".destroyStream(",o,");")),e.ELEMENTS=o,o}))}return i?new uf(u.thisDep,u.contextDep,u.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.elements+".getElements("+e.shared.vao+".currentVAO.elements):null")})):null}var d=l();function m(){if(qi in r){var e=r[qi];return a.primitive=e,re.commandParameter(e,qt,"invalid primitve",t.commandStr),cf((function(t,r){return qt[e]}))}if(qi in n){var o=n[qi];return lf(o,(function(e,t){var r=e.constants.primTypes,n=e.invoke(t,o);return re.optional((function(){e.assert(t,n+" in "+r,"invalid primitive, must be one of "+Object.keys(qt))})),t.def(r,"[",n,"]")}))}return s?sf(d)?d.value?cf((function(e,t){return t.def(e.ELEMENTS,".primType")})):cf((function(){return Lo})):new uf(d.thisDep,d.contextDep,d.propDep,(function(e,t){var r=e.ELEMENTS;return t.def(r,"?",r,".primType:",Lo)})):i?new uf(u.thisDep,u.contextDep,u.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.primitive:"+Lo)})):null}function p(e,o){if(e in r){var f=0|r[e];return o?a.offset=f:a.instances=f,re.command(!o||f>=0,"invalid "+e,t.commandStr),cf((function(e,t){return o&&(e.OFFSET=f),f}))}if(e in n){var c=n[e];return lf(c,(function(t,r){var n=t.invoke(r,c);return o&&(t.OFFSET=n,re.optional((function(){t.assert(r,n+">=0","invalid "+e)}))),n}))}if(o){if(s)return cf((function(e,t){return e.OFFSET=0,0}));if(i)return new uf(u.thisDep,u.contextDep,u.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.offset:0")}))}else if(i)return new uf(u.thisDep,u.contextDep,u.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.instances:-1")}));return null}var h=p(Yi,!0);function b(){if(Qi in r){var e=0|r[Qi];return a.count=e,re.command("number"===typeof e&&e>=0,"invalid vertex count",t.commandStr),cf((function(){return e}))}if(Qi in n){var o=n[Qi];return lf(o,(function(e,t){var r=e.invoke(t,o);return re.optional((function(){e.assert(t,"typeof "+r+'==="number"&&'+r+">=0&&"+r+"===("+r+"|0)","invalid vertex count")})),r}))}if(s){if(sf(d)){if(d)return h?new uf(h.thisDep,h.contextDep,h.propDep,(function(e,t){var r=t.def(e.ELEMENTS,".vertCount-",e.OFFSET);return re.optional((function(){e.assert(t,r+">=0","invalid vertex offset/element buffer too small")})),r})):cf((function(e,t){return t.def(e.ELEMENTS,".vertCount")}));var f=cf((function(){return-1}));return re.optional((function(){f.MISSING=!0})),f}var c=new uf(d.thisDep||h.thisDep,d.contextDep||h.contextDep,d.propDep||h.propDep,(function(e,t){var r=e.ELEMENTS;return e.OFFSET?t.def(r,"?",r,".vertCount-",e.OFFSET,":-1"):t.def(r,"?",r,".vertCount:-1")}));return re.optional((function(){c.DYNAMIC=!0})),c}if(i){var l=new uf(u.thisDep,u.contextDep,u.propDep,(function(e,t){return t.def(e.shared.vao,".currentVAO?",e.shared.vao,".currentVAO.count:-1")}));return l}return null}var v=m(),g=b(),y=p(Xi,!1);return{elements:d,primitive:v,count:g,instances:y,offset:h,vao:u,vaoActive:i,elementsActive:s,static:a}}function R(e,t){var r=e.static,n=e.dynamic,i={};return _.forEach((function(e){var o=O(e);function f(t,a){if(e in r){var f=t(r[e]);i[o]=cf((function(){return f}))}else if(e in n){var u=n[e];i[o]=lf(u,(function(e,t){return a(e,t,e.invoke(t,u))}))}}switch(e){case ki:case hi:case pi:case Fi:case yi:case Li:case Ti:case ji:case Ci:case Ai:return f((function(r){return re.commandType(r,"boolean",e,t.commandStr),r}),(function(t,r,n){return re.optional((function(){t.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+e,t.commandStr)})),n}));case xi:return f((function(r){return re.commandParameter(r,tf,"invalid "+e,t.commandStr),tf[r]}),(function(t,r,n){var a=t.constants.compareFuncs;return re.optional((function(){t.assert(r,n+" in "+a,"invalid "+e+", must be one of "+Object.keys(tf))})),r.def(a,"[",n,"]")}));case wi:return f((function(e){return re.command(cr(e)&&2===e.length&&"number"===typeof e[0]&&"number"===typeof e[1]&&e[0]<=e[1],"depth range is 2d array",t.commandStr),e}),(function(e,t,r){return re.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")})),[t.def("+",r,"[0]"),t.def("+",r,"[1]")]}));case gi:return f((function(e){re.commandType(e,"object","blend.func",t.commandStr);var r="srcRGB"in e?e.srcRGB:e.src,n="srcAlpha"in e?e.srcAlpha:e.src,a="dstRGB"in e?e.dstRGB:e.dst,i="dstAlpha"in e?e.dstAlpha:e.dst;return re.commandParameter(r,Zo,o+".srcRGB",t.commandStr),re.commandParameter(n,Zo,o+".srcAlpha",t.commandStr),re.commandParameter(a,Zo,o+".dstRGB",t.commandStr),re.commandParameter(i,Zo,o+".dstAlpha",t.commandStr),re.command(-1===ef.indexOf(r+", "+a),"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+a+")",t.commandStr),[Zo[r],Zo[a],Zo[n],Zo[i]]}),(function(t,r,n){var a=t.constants.blendFuncs;function i(i,o){var f=r.def('"',i,o,'" in ',n,"?",n,".",i,o,":",n,".",i);return re.optional((function(){t.assert(r,f+" in "+a,"invalid "+e+"."+i+o+", must be one of "+Object.keys(Zo))})),f}re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")}));var o=i("src","RGB"),f=i("dst","RGB");re.optional((function(){var e=t.constants.invalidBlendCombinations;t.assert(r,e+".indexOf("+o+'+", "+'+f+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")}));var u=r.def(a,"[",o,"]"),s=r.def(a,"[",i("src","Alpha"),"]");return[u,r.def(a,"[",f,"]"),s,r.def(a,"[",i("dst","Alpha"),"]")]}));case vi:return f((function(r){return"string"===typeof r?(re.commandParameter(r,v,"invalid "+e,t.commandStr),[v[r],v[r]]):"object"===typeof r?(re.commandParameter(r.rgb,v,e+".rgb",t.commandStr),re.commandParameter(r.alpha,v,e+".alpha",t.commandStr),[v[r.rgb],v[r.alpha]]):void re.commandRaise("invalid blend.equation",t.commandStr)}),(function(t,r,n){var a=t.constants.blendEquations,i=r.def(),o=r.def(),f=t.cond("typeof ",n,'==="string"');return re.optional((function(){function r(e,r,n){t.assert(e,n+" in "+a,"invalid "+r+", must be one of "+Object.keys(v))}r(f.then,e,n),t.assert(f.else,n+"&&typeof "+n+'==="object"',"invalid "+e),r(f.else,e+".rgb",n+".rgb"),r(f.else,e+".alpha",n+".alpha")})),f.then(i,"=",o,"=",a,"[",n,"];"),f.else(i,"=",a,"[",n,".rgb];",o,"=",a,"[",n,".alpha];"),r(f),[i,o]}));case bi:return f((function(e){return re.command(cr(e)&&4===e.length,"blend.color must be a 4d array",t.commandStr),Oe(4,(function(t){return+e[t]}))}),(function(e,t,r){return re.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")})),Oe(4,(function(e){return t.def("+",r,"[",e,"]")}))}));case Vi:return f((function(e){return re.commandType(e,"number",o,t.commandStr),0|e}),(function(e,t,r){return re.optional((function(){e.assert(t,"typeof "+r+'==="number"',"invalid stencil.mask")})),t.def(r,"|0")}));case Bi:return f((function(r){re.commandType(r,"object",o,t.commandStr);var n=r.cmp||"keep",a=r.ref||0,i="mask"in r?r.mask:-1;return re.commandParameter(n,tf,e+".cmp",t.commandStr),re.commandType(a,"number",e+".ref",t.commandStr),re.commandType(i,"number",e+".mask",t.commandStr),[tf[n],a,i]}),(function(e,t,r){var n=e.constants.compareFuncs;return re.optional((function(){function a(){e.assert(t,Array.prototype.join.call(arguments,""),"invalid stencil.func")}a(r+"&&typeof ",r,'==="object"'),a('!("cmp" in ',r,")||(",r,".cmp in ",n,")")})),[t.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",qo),t.def(r,".ref|0"),t.def('"mask" in ',r,"?",r,".mask|0:-1")]}));case Ii:case Pi:return f((function(r){re.commandType(r,"object",o,t.commandStr);var n=r.fail||"keep",a=r.zfail||"keep",i=r.zpass||"keep";return re.commandParameter(n,rf,e+".fail",t.commandStr),re.commandParameter(a,rf,e+".zfail",t.commandStr),re.commandParameter(i,rf,e+".zpass",t.commandStr),[e===Pi?Mo:Ro,rf[n],rf[a],rf[i]]}),(function(t,r,n){var a=t.constants.stencilOps;function i(i){return re.optional((function(){t.assert(r,'!("'+i+'" in '+n+")||("+n+"."+i+" in "+a+")","invalid "+e+"."+i+", must be one of "+Object.keys(rf))})),r.def('"',i,'" in ',n,"?",a,"[",n,".",i,"]:",qo)}return re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)})),[e===Pi?Mo:Ro,i("fail"),i("zfail"),i("zpass")]}));case Di:return f((function(e){re.commandType(e,"object",o,t.commandStr);var r=0|e.factor,n=0|e.units;return re.commandType(r,"number",o+".factor",t.commandStr),re.commandType(n,"number",o+".units",t.commandStr),[r,n]}),(function(t,r,n){return re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)})),[r.def(n,".factor|0"),r.def(n,".units|0")]}));case Si:return f((function(e){var r=0;return"front"===e?r=Ro:"back"===e&&(r=Mo),re.command(!!r,o,t.commandStr),r}),(function(e,t,r){return re.optional((function(){e.assert(t,r+'==="front"||'+r+'==="back"',"invalid cull.face")})),t.def(r,'==="front"?',Ro,":",Mo)}));case Ei:return f((function(e){return re.command("number"===typeof e&&e>=a.lineWidthDims[0]&&e<=a.lineWidthDims[1],"invalid line width, must be a positive number between "+a.lineWidthDims[0]+" and "+a.lineWidthDims[1],t.commandStr),e}),(function(e,t,r){return re.optional((function(){e.assert(t,"typeof "+r+'==="number"&&'+r+">="+a.lineWidthDims[0]+"&&"+r+"<="+a.lineWidthDims[1],"invalid line width")})),r}));case Oi:return f((function(e){return re.commandParameter(e,af,o,t.commandStr),af[e]}),(function(e,t,r){return re.optional((function(){e.assert(t,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")})),t.def(r+'==="cw"?'+Uo+":"+Wo)}));case _i:return f((function(e){return re.command(cr(e)&&4===e.length,"color.mask must be length 4 array",t.commandStr),e.map((function(e){return!!e}))}),(function(e,t,r){return re.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")})),Oe(4,(function(e){return"!!"+r+"["+e+"]"}))}));case zi:return f((function(e){re.command("object"===typeof e&&e,o,t.commandStr);var r="value"in e?e.value:1,n=!!e.invert;return re.command("number"===typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",t.commandStr),[r,n]}),(function(e,t,r){return re.optional((function(){e.assert(t,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")})),[t.def('"value" in ',r,"?+",r,".value:1"),t.def("!!",r,".invert")]}))}})),i}function M(e,t){var r=e.static,n=e.dynamic,a={};return Object.keys(r).forEach((function(e){var n,i=r[e];if("number"===typeof i||"boolean"===typeof i)n=cf((function(){return i}));else if("function"===typeof i){var o=i._reglType;"texture2d"===o||"textureCube"===o?n=cf((function(e){return e.link(i)})):"framebuffer"===o||"framebufferCube"===o?(re.command(i.color.length>0,'missing color attachment for framebuffer sent to uniform "'+e+'"',t.commandStr),n=cf((function(e){return e.link(i.color[0])}))):re.commandRaise('invalid data for uniform "'+e+'"',t.commandStr)}else cr(i)?n=cf((function(t){return t.global.def("[",Oe(i.length,(function(r){return re.command("number"===typeof i[r]||"boolean"===typeof i[r],"invalid uniform "+e,t.commandStr),i[r]})),"]")})):re.commandRaise('invalid or missing data for uniform "'+e+'"',t.commandStr);n.value=i,a[e]=n})),Object.keys(n).forEach((function(e){var t=n[e];a[e]=lf(t,(function(e,r){return e.invoke(r,t)}))})),a}function U(e,t){var n=e.static,a=e.dynamic,o={};return Object.keys(n).forEach((function(e){var a=n[e],f=r.id(e),u=new b;if(of(a))u.state=ii,u.buffer=i.getBuffer(i.create(a,fo,!1,!0)),u.type=0;else{var s=i.getBuffer(a);if(s)u.state=ii,u.buffer=s,u.type=0;else if(re.command("object"===typeof a&&a,"invalid data for attribute "+e,t.commandStr),"constant"in a){var c=a.constant;u.buffer="null",u.state=oi,"number"===typeof c?u.x=c:(re.command(cr(c)&&c.length>0&&c.length<=4,"invalid constant for attribute "+e,t.commandStr),ni.forEach((function(e,t){t<c.length&&(u[e]=c[t])})))}else{s=of(a.buffer)?i.getBuffer(i.create(a.buffer,fo,!1,!0)):i.getBuffer(a.buffer),re.command(!!s,'missing buffer for attribute "'+e+'"',t.commandStr);var l=0|a.offset;re.command(l>=0,'invalid offset for attribute "'+e+'"',t.commandStr);var d=0|a.stride;re.command(d>=0&&d<256,'invalid stride for attribute "'+e+'", must be integer betweeen [0, 255]',t.commandStr);var m=0|a.size;re.command(!("size"in a)||m>0&&m<=4,'invalid size for attribute "'+e+'", must be 1,2,3,4',t.commandStr);var p=!!a.normalized,h=0;"type"in a&&(re.commandParameter(a.type,Ft,"invalid type for attribute "+e,t.commandStr),h=Ft[a.type]);var v=0|a.divisor;re.optional((function(){"divisor"in a&&(re.command(0===v||g,'cannot specify divisor for attribute "'+e+'", instancing not supported',t.commandStr),re.command(v>=0,'invalid divisor for attribute "'+e+'"',t.commandStr));var r=t.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(a).forEach((function(t){re.command(n.indexOf(t)>=0,'unknown parameter "'+t+'" for attribute pointer "'+e+'" (valid parameters are '+n+")",r)}))})),u.buffer=s,u.state=ii,u.size=m,u.normalized=p,u.type=h||s.dtype,u.offset=l,u.stride=d,u.divisor=v}}o[e]=cf((function(e,t){var r=e.attribCache;if(f in r)return r[f];var n={isStream:!1};return Object.keys(u).forEach((function(e){n[e]=u[e]})),u.buffer&&(n.buffer=e.link(u.buffer),n.type=n.type||n.buffer+".dtype"),r[f]=n,n}))})),Object.keys(a).forEach((function(e){var t=a[e];function r(r,n){var a=r.invoke(n,t),i=r.shared,o=r.constants,f=i.isBufferArgs,u=i.buffer;re.optional((function(){r.assert(n,a+"&&(typeof "+a+'==="object"||typeof '+a+'==="function")&&('+f+"("+a+")||"+u+".getBuffer("+a+")||"+u+".getBuffer("+a+".buffer)||"+f+"("+a+'.buffer)||("constant" in '+a+"&&(typeof "+a+'.constant==="number"||'+i.isArrayLike+"("+a+".constant))))",'invalid dynamic attribute "'+e+'"')}));var s={isStream:n.def(!1)},c=new b;c.state=ii,Object.keys(c).forEach((function(e){s[e]=n.def(""+c[e])}));var l=s.buffer,d=s.type;function m(e){n(s[e],"=",a,".",e,"|0;")}return n("if(",f,"(",a,")){",s.isStream,"=true;",l,"=",u,".createStream(",fo,",",a,");",d,"=",l,".dtype;","}else{",l,"=",u,".getBuffer(",a,");","if(",l,"){",d,"=",l,".dtype;",'}else if("constant" in ',a,"){",s.state,"=",oi,";","if(typeof "+a+'.constant === "number"){',s[ni[0]],"=",a,".constant;",ni.slice(1).map((function(e){return s[e]})).join("="),"=0;","}else{",ni.map((function(e,t){return s[e]+"="+a+".constant.length>"+t+"?"+a+".constant["+t+"]:0;"})).join(""),"}}else{","if(",f,"(",a,".buffer)){",l,"=",u,".createStream(",fo,",",a,".buffer);","}else{",l,"=",u,".getBuffer(",a,".buffer);","}",d,'="type" in ',a,"?",o.glTypes,"[",a,".type]:",l,".dtype;",s.normalized,"=!!",a,".normalized;"),m("size"),m("offset"),m("stride"),m("divisor"),n("}}"),n.exit("if(",s.isStream,"){",u,".destroyStream(",l,");","}"),s}o[e]=lf(t,r)})),o}function W(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=cf((function(e,t){return"number"===typeof r||"boolean"===typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=lf(t,(function(e,r){return e.invoke(r,t)}))})),n}function G(e,t,r,a,i){var o=e.static,f=e.dynamic;re.optional((function(){var e=[Wi,Gi,Hi,Ni,qi,Yi,Qi,Xi,Ui,$i].concat(_);function t(t){Object.keys(t).forEach((function(t){re.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',i.commandStr)}))}t(o),t(f)}));var u=I(e,t),s=V(e,i),l=B(e,s,i),d=L(e,i),m=R(e,i),p=P(e,i,u);function h(e){var t=l[e];t&&(m[e]=t)}h(Mi),h(O(Ri));var b=Object.keys(m).length>0,v={framebuffer:s,draw:d,shader:p,state:m,dirty:b,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(v.profile=F(e,i),v.uniforms=M(r,i),v.drawVAO=v.scopeVAO=d.vao,!v.drawVAO&&p.program&&!u&&n.angle_instanced_arrays&&d.static.elements){var g=!0,y=p.program.attributes.map((function(e){var r=t.static[e];return g=g&&!!r,r}));if(g&&y.length>0){var x=c.getVAO(c.createVAO({attributes:y,elements:d.static.elements}));v.drawVAO=new uf(null,null,null,(function(e,t){return e.link(x)})),v.useVAO=!0}}return u?v.useVAO=!0:v.attributes=U(t,i),v.context=W(a,i),v}function H(e,t,r){var n=e.shared.context,a=e.scope();Object.keys(r).forEach((function(i){t.save(n,"."+i);var o=r[i].append(e,t);Array.isArray(o)?a(n,".",i,"=[",o.join(),"];"):a(n,".",i,"=",o,";")})),t(a)}function N(e,t,r,n){var a,i=e.shared,o=i.gl,f=i.framebuffer;y&&(a=t.def(i.extensions,".webgl_draw_buffers"));var u,s=e.constants,c=s.drawBuffer,l=s.backBuffer;u=r?r.append(e,t):t.def(f,".next"),n||t("if(",u,"!==",f,".cur){"),t("if(",u,"){",o,".bindFramebuffer(",Ko,",",u,".framebuffer);"),y&&t(a,".drawBuffersWEBGL(",c,"[",u,".colorAttachments.length]);"),t("}else{",o,".bindFramebuffer(",Ko,",null);"),y&&t(a,".drawBuffersWEBGL(",l,");"),t("}",f,".cur=",u,";"),n||t("}")}function q(e,t,r){var n=e.shared,a=n.gl,i=e.current,o=e.next,f=n.current,u=n.next,s=e.cond(f,".dirty");_.forEach((function(t){var n,c,l=O(t);if(!(l in r.state))if(l in o){n=o[l],c=i[l];var d=Oe(w[l].length,(function(e){return s.def(n,"[",e,"]")}));s(e.cond(d.map((function(e,t){return e+"!=="+c+"["+t+"]"})).join("||")).then(a,".",S[l],"(",d,");",d.map((function(e,t){return c+"["+t+"]="+e})).join(";"),";"))}else{n=s.def(u,".",l);var m=e.cond(n,"!==",f,".",l);s(m),l in k?m(e.cond(n).then(a,".enable(",k[l],");").else(a,".disable(",k[l],");"),f,".",l,"=",n,";"):m(a,".",S[l],"(",n,");",f,".",l,"=",n,";")}})),0===Object.keys(r.state).length&&s(f,".dirty=false;"),t(s)}function Q(e,t,r,n){var a=e.shared,i=e.current,o=a.current,f=a.gl;ff(Object.keys(r)).forEach((function(a){var u=r[a];if(!n||n(u)){var s=u.append(e,t);if(k[a]){var c=k[a];sf(u)?t(f,s?".enable(":".disable(",c,");"):t(e.cond(s).then(f,".enable(",c,");").else(f,".disable(",c,");")),t(o,".",a,"=",s,";")}else if(cr(s)){var l=i[a];t(f,".",S[a],"(",s,");",s.map((function(e,t){return l+"["+t+"]="+e})).join(";"),";")}else t(f,".",S[a],"(",s,");",o,".",a,"=",s,";")}}))}function Y(e,t){g&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function X(e,t,r,n,a){var i,o,f,u=e.shared,s=e.stats,c=u.current,l=u.timer,d=r.profile;function m(){return"undefined"===typeof performance?"Date.now()":"performance.now()"}function h(e){e(i=t.def(),"=",m(),";"),"string"===typeof a?e(s,".count+=",a,";"):e(s,".count++;"),p&&(n?e(o=t.def(),"=",l,".getNumPendingQueries();"):e(l,".beginQuery(",s,");"))}function b(e){e(s,".cpuTime+=",m(),"-",i,";"),p&&(n?e(l,".pushScopeStats(",o,",",l,".getNumPendingQueries(),",s,");"):e(l,".endQuery();"))}function v(e){var r=t.def(c,".profile");t(c,".profile=",e,";"),t.exit(c,".profile=",r,";")}if(d){if(sf(d))return void(d.enable?(h(t),b(t.exit),v("true")):v("false"));v(f=d.append(e,t))}else f=t.def(c,".profile");var g=e.block();h(g),t("if(",f,"){",g,"}");var y=e.block();b(y),t.exit("if(",f,"){",y,"}")}function $(e,t,r,n,a){var i=e.shared;function o(e){switch(e){case Ao:case Oo:case jo:return 2;case _o:case Eo:case Co:return 3;case ko:case To:case zo:return 4;default:return 1}}function f(r,n,a){var o=i.gl,f=t.def(r,".location"),u=t.def(i.attributes,"[",f,"]"),s=a.state,c=a.buffer,l=[a.x,a.y,a.z,a.w],d=["buffer","normalized","offset","stride"];function m(){t("if(!",u,".buffer){",o,".enableVertexAttribArray(",f,");}");var r,i=a.type;if(r=a.size?t.def(a.size,"||",n):n,t("if(",u,".type!==",i,"||",u,".size!==",r,"||",d.map((function(e){return u+"."+e+"!=="+a[e]})).join("||"),"){",o,".bindBuffer(",fo,",",c,".buffer);",o,".vertexAttribPointer(",[f,r,i,a.normalized,a.stride,a.offset],");",u,".type=",i,";",u,".size=",r,";",d.map((function(e){return u+"."+e+"="+a[e]+";"})).join(""),"}"),g){var s=a.divisor;t("if(",u,".divisor!==",s,"){",e.instancing,".vertexAttribDivisorANGLE(",[f,s],");",u,".divisor=",s,";}")}}function p(){t("if(",u,".buffer){",o,".disableVertexAttribArray(",f,");",u,".buffer=null;","}if(",ni.map((function(e,t){return u+"."+e+"!=="+l[t]})).join("||"),"){",o,".vertexAttrib4f(",f,",",l,");",ni.map((function(e,t){return u+"."+e+"="+l[t]+";"})).join(""),"}")}s===ii?m():s===oi?p():(t("if(",s,"===",ii,"){"),m(),t("}else{"),p(),t("}"))}n.forEach((function(n){var i,u=n.name,s=r.attributes[u];if(s){if(!a(s))return;i=s.append(e,t)}else{if(!a(df))return;var c=e.scopeAttrib(u);re.optional((function(){e.assert(t,c+".state","missing attribute "+u)})),i={},Object.keys(new b).forEach((function(e){i[e]=t.def(c,".",e)}))}f(e.link(n),o(n.info.type),i)}))}function K(e,t,n,a,i,o){for(var f,u=e.shared,s=u.gl,c={},l=0;l<a.length;++l){var d=a[l],m=d.name,p=d.info.type,h=d.info.size,b=n.uniforms[m];if(h>1){if(!b)continue;var v=m.replace("[0]","");if(c[v])continue;c[v]=1}var g,y=e.link(d)+".location";if(b){if(!i(b))continue;if(sf(b)){var x=b.value;if(re.command(null!==x&&"undefined"!==typeof x,'missing uniform "'+m+'"',e.commandStr),p===Io||p===Po){re.command("function"===typeof x&&(p===Io&&("texture2d"===x._reglType||"framebuffer"===x._reglType)||p===Po&&("textureCube"===x._reglType||"framebufferCube"===x._reglType)),"invalid texture for uniform "+m,e.commandStr);var w=e.link(x._texture||x.color[0]._texture);t(s,".uniform1i(",y,",",w+".bind());"),t.exit(w,".unbind();")}else if(p===Fo||p===Vo||p===Bo){re.optional((function(){re.command(cr(x),"invalid matrix for uniform "+m,e.commandStr),re.command(p===Fo&&4===x.length||p===Vo&&9===x.length||p===Bo&&16===x.length,"invalid length for matrix uniform "+m,e.commandStr)}));var A=e.global.def("new Float32Array(["+Array.prototype.slice.call(x)+"])"),_=2;p===Vo?_=3:p===Bo&&(_=4),t(s,".uniformMatrix",_,"fv(",y,",false,",A,");")}else{switch(p){case wo:1===h?re.commandType(x,"number","uniform "+m,e.commandStr):re.command(cr(x)&&x.length===h,"uniform "+m,e.commandStr),f="1f";break;case Ao:re.command(cr(x)&&x.length&&x.length%2===0&&x.length<=2*h,"uniform "+m,e.commandStr),f="2f";break;case _o:re.command(cr(x)&&x.length&&x.length%3===0&&x.length<=3*h,"uniform "+m,e.commandStr),f="3f";break;case ko:re.command(cr(x)&&x.length&&x.length%4===0&&x.length<=4*h,"uniform "+m,e.commandStr),f="4f";break;case Do:1===h?re.commandType(x,"boolean","uniform "+m,e.commandStr):re.command(cr(x)&&x.length===h,"uniform "+m,e.commandStr),f="1i";break;case So:1===h?re.commandType(x,"number","uniform "+m,e.commandStr):re.command(cr(x)&&x.length===h,"uniform "+m,e.commandStr),f="1i";break;case jo:case Oo:re.command(cr(x)&&x.length&&x.length%2===0&&x.length<=2*h,"uniform "+m,e.commandStr),f="2i";break;case Co:case Eo:re.command(cr(x)&&x.length&&x.length%3===0&&x.length<=3*h,"uniform "+m,e.commandStr),f="3i";break;case zo:case To:re.command(cr(x)&&x.length&&x.length%4===0&&x.length<=4*h,"uniform "+m,e.commandStr),f="4i"}h>1?(f+="v",x=e.global.def("["+Array.prototype.slice.call(x)+"]")):x=cr(x)?Array.prototype.slice.call(x):x,t(s,".uniform",f,"(",y,",",x,");")}continue}g=b.append(e,t)}else{if(!i(df))continue;g=t.def(u.uniforms,"[",r.id(m),"]")}p===Io?(re(!Array.isArray(g),"must specify a scalar prop for textures"),t("if(",g,"&&",g,'._reglType==="framebuffer"){',g,"=",g,".color[0];","}")):p===Po&&(re(!Array.isArray(g),"must specify a scalar prop for cube maps"),t("if(",g,"&&",g,'._reglType==="framebufferCube"){',g,"=",g,".color[0];","}")),re.optional((function(){function r(r,n){e.assert(t,r,'bad data or missing for uniform "'+m+'". '+n)}function n(e,t){1===t&&re(!Array.isArray(g),"must not specify an array type for uniform"),r("Array.isArray("+g+") && typeof "+g+'[0]===" '+e+'" || typeof '+g+'==="'+e+'"',"invalid type, expected "+e)}function a(t,n,a){Array.isArray(g)?re(g.length&&g.length%t===0&&g.length<=t*a,"must have length of "+(1===a?"":"n * ")+t):r(u.isArrayLike+"("+g+")&&"+g+".length && "+g+".length % "+t+" === 0 && "+g+".length<="+t*a,"invalid vector, should have length of "+(1===a?"":"n * ")+t,e.commandStr)}function i(t){re(!Array.isArray(g),"must not specify a value type"),r("typeof "+g+'==="function"&&'+g+'._reglType==="texture'+(t===so?"2d":"Cube")+'"',"invalid texture type",e.commandStr)}switch(p){case So:n("number",h);break;case Oo:a(2,"number",h);break;case Eo:a(3,"number",h);break;case To:a(4,"number",h);break;case wo:n("number",h);break;case Ao:a(2,"number",h);break;case _o:a(3,"number",h);break;case ko:a(4,"number",h);break;case Do:n("boolean",h);break;case jo:a(2,"boolean",h);break;case Co:a(3,"boolean",h);break;case zo:a(4,"boolean",h);break;case Fo:a(4,"number",h);break;case Vo:a(9,"number",h);break;case Bo:a(16,"number",h);break;case Io:i(so);break;case Po:i(co)}}));var k=1;switch(p){case Io:case Po:var S=t.def(g,"._texture");t(s,".uniform1i(",y,",",S,".bind());"),t.exit(S,".unbind();");continue;case So:case Do:f="1i";break;case Oo:case jo:f="2i",k=2;break;case Eo:case Co:f="3i",k=3;break;case To:case zo:f="4i",k=4;break;case wo:f="1f";break;case Ao:f="2f",k=2;break;case _o:f="3f",k=3;break;case ko:f="4f",k=4;break;case Fo:f="Matrix2fv";break;case Vo:f="Matrix3fv";break;case Bo:f="Matrix4fv"}if(-1===f.indexOf("Matrix")&&h>1&&(f+="v",k=1),"M"===f.charAt(0)){t(s,".uniform",f,"(",y,",");var O=Math.pow(p-Fo+2,2),E=e.global.def("new Float32Array(",O,")");Array.isArray(g)?t("false,(",Oe(O,(function(e){return E+"["+e+"]="+g[e]})),",",E,")"):t("false,(Array.isArray(",g,")||",g," instanceof Float32Array)?",g,":(",Oe(O,(function(e){return E+"["+e+"]="+g+"["+e+"]"})),",",E,")"),t(");")}else if(k>1){for(var T=[],D=[],j=0;j<k;++j)Array.isArray(g)?D.push(g[j]):D.push(t.def(g+"["+j+"]")),o&&T.push(t.def());o&&t("if(!",e.batchId,"||",T.map((function(e,t){return e+"!=="+D[t]})).join("||"),"){",T.map((function(e,t){return e+"="+D[t]+";"})).join("")),t(s,".uniform",f,"(",y,",",D.join(","),");"),o&&t("}")}else{if(re(!Array.isArray(g),"uniform value must not be an array"),o){var C=t.def();t("if(!",e.batchId,"||",C,"!==",g,"){",C,"=",g,";")}t(s,".uniform",f,"(",y,",",g,");"),o&&t("}")}}}function J(e,t,r,n){var a=e.shared,i=a.gl,o=a.draw,f=n.draw;function u(){var u,s=f.elements,c=t;return s?((s.contextDep&&n.contextDynamic||s.propDep)&&(c=r),u=s.append(e,c),f.elementsActive&&c("if("+u+")"+i+".bindBuffer("+uo+","+u+".buffer.buffer);")):(u=c.def(),c(u,"=",o,".",Ni,";","if(",u,"){",i,".bindBuffer(",uo,",",u,".buffer.buffer);}","else if(",a.vao,".currentVAO){",u,"=",e.shared.elements+".getElements("+a.vao,".currentVAO.elements);",x?"":"if("+u+")"+i+".bindBuffer("+uo+","+u+".buffer.buffer);","}")),u}function s(){var a,i=f.count,u=t;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(u=r),a=i.append(e,u),re.optional((function(){i.MISSING&&e.assert(t,"false","missing vertex count"),i.DYNAMIC&&e.assert(u,a+">=0","missing vertex count")}))):(a=u.def(o,".",Qi),re.optional((function(){e.assert(u,a+">=0","missing vertex count")}))),a}var c=u();function l(a){var i=f[a];return i?i.contextDep&&n.contextDynamic||i.propDep?i.append(e,r):i.append(e,t):t.def(o,".",a)}var d,m,p=l(qi),h=l(Yi),b=s();if("number"===typeof b){if(0===b)return}else r("if(",b,"){"),r.exit("}");g&&(d=l(Xi),m=e.instancing);var v=c+".type",y=f.elements&&sf(f.elements)&&!f.vaoActive;function w(){function e(){r(m,".drawElementsInstancedANGLE(",[p,b,v,h+"<<(("+v+"-"+ai+")>>1)",d],");")}function t(){r(m,".drawArraysInstancedANGLE(",[p,h,b,d],");")}c&&"null"!==c?y?e():(r("if(",c,"){"),e(),r("}else{"),t(),r("}")):t()}function A(){function e(){r(i+".drawElements("+[p,b,v,h+"<<(("+v+"-"+ai+")>>1)"]+");")}function t(){r(i+".drawArrays("+[p,h,b]+");")}c&&"null"!==c?y?e():(r("if(",c,"){"),e(),r("}else{"),t(),r("}")):t()}g&&("number"!==typeof d||d>=0)?"string"===typeof d?(r("if(",d,">0){"),w(),r("}else if(",d,"<0){"),A(),r("}")):w():A()}function Z(e,t,r,n,a){var i=z(),o=i.proc("body",a);return re.optional((function(){i.commandStr=t.commandStr,i.command=i.link(t.commandStr)})),g&&(i.instancing=o.def(i.shared.extensions,".angle_instanced_arrays")),e(i,o,r,n),i.compile().body}function ee(e,t,r,n){Y(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),$(e,t,r,n.attributes,(function(){return!0}))),K(e,t,r,n.uniforms,(function(){return!0}),!1),J(e,t,t,r)}function te(e,t){var r=e.proc("draw",1);Y(e,r),H(e,r,t.context),N(e,r,t.framebuffer),q(e,r,t),Q(e,r,t.state),X(e,r,t,!1,!0);var n=t.shader.progVar.append(e,r);if(r(e.shared.gl,".useProgram(",n,".program);"),t.shader.program)ee(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var a=e.global.def("{}"),i=r.def(n,".id"),o=r.def(a,"[",i,"]");r(e.cond(o).then(o,".call(this,a0);").else(o,"=",a,"[",i,"]=",e.link((function(r){return Z(ee,e,t,r,1)})),"(",n,");",o,".call(this,a0);"))}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}function ne(e,t,r,n){function a(){return!0}e.batchId="a1",Y(e,t),$(e,t,r,n.attributes,a),K(e,t,r,n.uniforms,a,!1),J(e,t,t,r)}function ae(e,t,r,n){Y(e,t);var a=r.contextDep,i=t.def(),o="a0",f="a1",u=t.def();e.shared.props=u,e.batchId=i;var s=e.scope(),c=e.scope();function l(e){return e.contextDep&&a||e.propDep}function d(e){return!l(e)}if(t(s.entry,"for(",i,"=0;",i,"<",f,";++",i,"){",u,"=",o,"[",i,"];",c,"}",s.exit),r.needsContext&&H(e,c,r.context),r.needsFramebuffer&&N(e,c,r.framebuffer),Q(e,c,r.state,l),r.profile&&l(r.profile)&&X(e,c,r,!1,!0),n)r.useVAO?r.drawVAO?l(r.drawVAO)?c(e.shared.vao,".setVAO(",r.drawVAO.append(e,c),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),$(e,s,r,n.attributes,d),$(e,c,r,n.attributes,l)),K(e,s,r,n.uniforms,d,!1),K(e,c,r,n.uniforms,l,!0),J(e,s,c,r);else{var m=e.global.def("{}"),p=r.shader.progVar.append(e,c),h=c.def(p,".id"),b=c.def(m,"[",h,"]");c(e.shared.gl,".useProgram(",p,".program);","if(!",b,"){",b,"=",m,"[",h,"]=",e.link((function(t){return Z(ne,e,r,t,2)})),"(",p,");}",b,".call(this,a0[",i,"],",i,");")}}function ie(e,t){var r=e.proc("batch",2);e.batchId="0",Y(e,r);var n=!1,a=!0;Object.keys(t.context).forEach((function(e){n=n||t.context[e].propDep})),n||(H(e,r,t.context),a=!1);var i=t.framebuffer,o=!1;function f(e){return e.contextDep&&n||e.propDep}i?(i.propDep?n=o=!0:i.contextDep&&n&&(o=!0),o||N(e,r,i)):N(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),q(e,r,t),Q(e,r,t.state,(function(e){return!f(e)})),t.profile&&f(t.profile)||X(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=a,t.needsFramebuffer=o;var u=t.shader.progVar;if(u.contextDep&&n||u.propDep)ae(e,r,t,null);else{var s=u.append(e,r);if(r(e.shared.gl,".useProgram(",s,".program);"),t.shader.program)ae(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var c=e.global.def("{}"),l=r.def(s,".id"),d=r.def(c,"[",l,"]");r(e.cond(d).then(d,".call(this,a0,a1);").else(d,"=",c,"[",l,"]=",e.link((function(r){return Z(ae,e,t,r,2)})),"(",s,");",d,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}function oe(e,t){var n=e.proc("scope",3);e.batchId="a2";var a=e.shared,i=a.current;function o(r){var i=t.shader[r];i&&n.set(a.shader,"."+r,i.append(e,n))}H(e,n,t.context),t.framebuffer&&t.framebuffer.append(e,n),ff(Object.keys(t.state)).forEach((function(r){var i=t.state[r].append(e,n);cr(i)?i.forEach((function(t,a){n.set(e.next[r],"["+a+"]",t)})):n.set(a.next,"."+r,i)})),X(e,n,t,!0,!0),[Ni,Yi,Qi,Xi,qi].forEach((function(r){var i=t.draw[r];i&&n.set(a.draw,"."+r,""+i.append(e,n))})),Object.keys(t.uniforms).forEach((function(i){var o=t.uniforms[i].append(e,n);Array.isArray(o)&&(o="["+o.join()+"]"),n.set(a.uniforms,"["+r.id(i)+"]",o)})),Object.keys(t.attributes).forEach((function(r){var a=t.attributes[r].append(e,n),i=e.scopeAttrib(r);Object.keys(new b).forEach((function(e){n.set(i,"."+e,a[e])}))})),t.scopeVAO&&n.set(a.vao,".targetVAO",t.scopeVAO.append(e,n)),o(Gi),o(Hi),Object.keys(t.state).length>0&&(n(i,".dirty=true;"),n.exit(i,".dirty=true;")),n("a1(",e.shared.context,",a0,",e.batchId,");")}function fe(e){if("object"===typeof e&&!cr(e)){for(var t=Object.keys(e),r=0;r<t.length;++r)if(pe.isDynamic(e[t[r]]))return!0;return!1}}function ue(e,t,r){var n=t.static[r];if(n&&fe(n)){var a=e.global,i=Object.keys(n),o=!1,f=!1,u=!1,s=e.global.def("{}");i.forEach((function(t){var r=n[t];if(pe.isDynamic(r)){"function"===typeof r&&(r=n[t]=pe.unbox(r));var i=lf(r,null);o=o||i.thisDep,u=u||i.propDep,f=f||i.contextDep}else{switch(a(s,".",t,"="),typeof r){case"number":a(r);break;case"string":a('"',r,'"');break;case"object":Array.isArray(r)&&a("[",r.join(),"]");break;default:a(e.link(r))}a(";")}})),t.dynamic[r]=new pe.DynamicVariable(li,{thisDep:o,contextDep:f,propDep:u,ref:s,append:c}),delete t.static[r]}function c(e,t){i.forEach((function(r){var a=n[r];if(pe.isDynamic(a)){var i=e.invoke(t,a);t(s,".",r,"=",i,";")}}))}}function se(e,r,n,a,i){var o=z();o.stats=o.link(i),Object.keys(r.static).forEach((function(e){ue(o,r,e)})),oo.forEach((function(t){ue(o,e,t)}));var f=G(e,r,n,a,o);return te(o,f),oe(o,f),ie(o,f),t(o.compile(),{destroy:function(){f.shader.program.destroy()}})}return{next:A,current:w,procs:function(){var e=z(),t=e.proc("poll"),r=e.proc("refresh"),i=e.block();t(i),r(i);var o,f=e.shared,u=f.gl,s=f.next,c=f.current;i(c,".dirty=false;"),N(e,t),N(e,r,null,!0),g&&(o=e.link(g)),n.oes_vertex_array_object&&r(e.link(n.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var l=0;l<a.maxAttributes;++l){var d=r.def(f.attributes,"[",l,"]"),m=e.cond(d,".buffer");m.then(u,".enableVertexAttribArray(",l,");",u,".bindBuffer(",fo,",",d,".buffer.buffer);",u,".vertexAttribPointer(",l,",",d,".size,",d,".type,",d,".normalized,",d,".stride,",d,".offset);").else(u,".disableVertexAttribArray(",l,");",u,".vertexAttrib4f(",l,",",d,".x,",d,".y,",d,".z,",d,".w);",d,".buffer=null;"),r(m),g&&r(o,".vertexAttribDivisorANGLE(",l,",",d,".divisor);")}return r(e.shared.vao,".currentVAO=null;",e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"),Object.keys(k).forEach((function(n){var a=k[n],o=i.def(s,".",n),f=e.block();f("if(",o,"){",u,".enable(",a,")}else{",u,".disable(",a,")}",c,".",n,"=",o,";"),r(f),t("if(",o,"!==",c,".",n,"){",f,"}")})),Object.keys(S).forEach((function(n){var a,o,f=S[n],l=w[n],d=e.block();if(d(u,".",f,"("),cr(l)){var m=l.length;a=e.global.def(s,".",n),o=e.global.def(c,".",n),d(Oe(m,(function(e){return a+"["+e+"]"})),");",Oe(m,(function(e){return o+"["+e+"]="+a+"["+e+"];"})).join("")),t("if(",Oe(m,(function(e){return a+"["+e+"]!=="+o+"["+e+"]"})).join("||"),"){",d,"}")}else a=i.def(s,".",n),o=i.def(c,".",n),d(a,");",c,".",n,"=",a,";"),t("if(",a,"!==",o,"){",d,"}");r(d)})),e.compile()}(),compile:se}}function pf(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var hf=34918,bf=34919,vf=35007,gf=function(e,t){if(!t.ext_disjoint_timer_query)return null;var r=[];function n(){return r.pop()||t.ext_disjoint_timer_query.createQueryEXT()}function a(e){r.push(e)}var i=[];function o(e){var r=n();t.ext_disjoint_timer_query.beginQueryEXT(vf,r),i.push(r),m(i.length-1,i.length,e)}function f(){t.ext_disjoint_timer_query.endQueryEXT(vf)}function u(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var s=[];function c(){return s.pop()||new u}function l(e){s.push(e)}var d=[];function m(e,t,r){var n=c();n.startQueryIndex=e,n.endQueryIndex=t,n.sum=0,n.stats=r,d.push(n)}var p=[],h=[];function b(){var e,r,n=i.length;if(0!==n){h.length=Math.max(h.length,n+1),p.length=Math.max(p.length,n+1),p[0]=0,h[0]=0;var o=0;for(e=0,r=0;r<i.length;++r){var f=i[r];t.ext_disjoint_timer_query.getQueryObjectEXT(f,bf)?(o+=t.ext_disjoint_timer_query.getQueryObjectEXT(f,hf),a(f)):i[e++]=f,p[r+1]=o,h[r+1]=e}for(i.length=e,e=0,r=0;r<d.length;++r){var u=d[r],s=u.startQueryIndex,c=u.endQueryIndex;u.sum+=p[c]-p[s];var m=h[s],b=h[c];b===m?(u.stats.gpuTime+=u.sum/1e6,l(u)):(u.startQueryIndex=m,u.endQueryIndex=b,d[e++]=u)}d.length=e}}return{beginQuery:o,endQuery:f,pushScopeStats:m,update:b,getNumPendingQueries:function(){return i.length},clear:function(){r.push.apply(r,i);for(var e=0;e<r.length;e++)t.ext_disjoint_timer_query.deleteQueryEXT(r[e]);i.length=0,r.length=0},restore:function(){i.length=0,r.length=0}}},yf=16384,xf=256,wf=1024,Af=34962,_f="webglcontextlost",kf="webglcontextrestored",Sf=1,Of=2,Ef=3;function Tf(e,t){for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}function Df(e){var r=ke(e);if(!r)return null;var n=r.gl,a=n.getContextAttributes(),i=n.isContextLost(),o=Se(n,r);if(!o)return null;var f=ve(),u=pf(),s=o.extensions,c=gf(n,s),l=be(),d=n.drawingBufferWidth,m=n.drawingBufferHeight,p={tick:0,time:0,viewportWidth:d,viewportHeight:m,framebufferWidth:d,framebufferHeight:m,drawingBufferWidth:d,drawingBufferHeight:m,pixelRatio:r.pixelRatio},h={},b={elements:null,primitive:4,count:-1,offset:0,instances:-1},v=At(n,s),g=Nt(n,u,r,w),y=ir(n,s,g,u),x=Ga(n,s,v,u,g,y,b);function w(e){return x.destroyBuffer(e)}var A=Ya(n,f,u,r),_=Xn(n,s,v,(function(){O.procs.poll()}),p,u,r),k=sa(n,s,v,u,r),S=Pa(n,s,v,_,k,u),O=mf(n,f,s,v,g,y,_,S,h,x,A,b,p,c,r),E=Za(n,S,O.procs.poll,p,a,s,v),T=O.next,D=n.canvas,j=[],C=[],z=[],F=[r.onDestroy],V=null;function B(){if(0===j.length)return c&&c.update(),void(V=null);V=he.next(B),Q();for(var e=j.length-1;e>=0;--e){var t=j[e];t&&t(p,null,0)}n.flush(),c&&c.update()}function I(){!V&&j.length>0&&(V=he.next(B))}function P(){V&&(he.cancel(B),V=null)}function L(e){e.preventDefault(),i=!0,P(),C.forEach((function(e){e()}))}function R(e){n.getError(),i=!1,o.restore(),A.restore(),g.restore(),_.restore(),k.restore(),S.restore(),x.restore(),c&&c.restore(),O.procs.refresh(),I(),z.forEach((function(e){e()}))}function M(){j.length=0,P(),D&&(D.removeEventListener(_f,L),D.removeEventListener(kf,R)),A.clear(),S.clear(),k.clear(),x.clear(),_.clear(),y.clear(),g.clear(),c&&c.clear(),F.forEach((function(e){e()}))}function U(e){function r(e){var r=t({},e);function n(e){if(e in r){var t=r[e];delete r[e],Object.keys(t).forEach((function(n){r[e+"."+n]=t[n]}))}}return delete r.uniforms,delete r.attributes,delete r.context,delete r.vao,"stencil"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),n("blend"),n("depth"),n("cull"),n("stencil"),n("polygonOffset"),n("scissor"),n("sample"),"vao"in e&&(r.vao=e.vao),r}function n(e,t){var r={},n={};return Object.keys(e).forEach((function(a){var i=e[a];if(pe.isDynamic(i))n[a]=pe.unbox(i,a);else{if(t&&Array.isArray(i))for(var o=0;o<i.length;++o)if(pe.isDynamic(i[o]))return void(n[a]=pe.unbox(i,a));r[a]=i}})),{dynamic:n,static:r}}re(!!e,"invalid args to regl({...})"),re.type(e,"object","invalid args to regl({...})");var a=n(e.context||{},!0),o=n(e.uniforms||{},!0),f=n(e.attributes||{},!1),u=n(r(e),!1),s={gpuTime:0,cpuTime:0,count:0},c=O.compile(u,f,o,a,s),l=c.draw,d=c.batch,m=c.scope,p=[];function h(e){for(;p.length<e;)p.push(null);return p}function b(e,t){var r;if(i&&re.raise("context lost"),"function"===typeof e)return m.call(this,null,e,0);if("function"===typeof t)if("number"===typeof e)for(r=0;r<e;++r)m.call(this,null,t,r);else{if(!Array.isArray(e))return m.call(this,e,t,0);for(r=0;r<e.length;++r)m.call(this,e[r],t,r)}else if("number"===typeof e){if(e>0)return d.call(this,h(0|e),0|e)}else{if(!Array.isArray(e))return l.call(this,e);if(e.length)return d.call(this,e,e.length)}}return t(b,{stats:s,destroy:function(){c.destroy()}})}D&&(D.addEventListener(_f,L,!1),D.addEventListener(kf,R,!1));var W=S.setFBO=U({framebuffer:pe.define.call(null,Sf,"framebuffer")});function G(e,t){var r=0;O.procs.poll();var a=t.color;a&&(n.clearColor(+a[0]||0,+a[1]||0,+a[2]||0,+a[3]||0),r|=yf),"depth"in t&&(n.clearDepth(+t.depth),r|=xf),"stencil"in t&&(n.clearStencil(0|t.stencil),r|=wf),re(!!r,"called regl.clear with no buffer specified"),n.clear(r)}function H(e){if(re("object"===typeof e&&e,"regl.clear() takes an object as input"),"framebuffer"in e)if(e.framebuffer&&"framebufferCube"===e.framebuffer_reglType)for(var r=0;r<6;++r)W(t({framebuffer:e.framebuffer.faces[r]},e),G);else W(e,G);else G(null,e)}function N(e){function t(){var t=Tf(j,e);function r(){var e=Tf(j,r);j[e]=j[j.length-1],j.length-=1,j.length<=0&&P()}re(t>=0,"cannot cancel a frame twice"),j[t]=r}return re.type(e,"function","regl.frame() callback must be a function"),j.push(e),I(),{cancel:t}}function q(){var e=T.viewport,t=T.scissor_box;e[0]=e[1]=t[0]=t[1]=0,p.viewportWidth=p.framebufferWidth=p.drawingBufferWidth=e[2]=t[2]=n.drawingBufferWidth,p.viewportHeight=p.framebufferHeight=p.drawingBufferHeight=e[3]=t[3]=n.drawingBufferHeight}function Q(){p.tick+=1,p.time=X(),q(),O.procs.poll()}function Y(){_.refresh(),q(),O.procs.refresh(),c&&c.update()}function X(){return(be()-l)/1e3}function $(e,t){var r;switch(re.type(t,"function","listener callback must be a function"),e){case"frame":return N(t);case"lost":r=C;break;case"restore":r=z;break;case"destroy":r=F;break;default:re.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(t),{cancel:function(){for(var e=0;e<r.length;++e)if(r[e]===t)return r[e]=r[r.length-1],void r.pop()}}}Y();var K=t(U,{clear:H,prop:pe.define.bind(null,Sf),context:pe.define.bind(null,Of),this:pe.define.bind(null,Ef),draw:U({}),buffer:function(e){return g.create(e,Af,!1,!1)},elements:function(e){return y.create(e,!1)},texture:_.create2D,cube:_.createCube,renderbuffer:k.create,framebuffer:S.create,framebufferCube:S.createCube,vao:x.createVAO,attributes:a,frame:N,on:$,limits:v,hasExtension:function(e){return v.extensions.indexOf(e.toLowerCase())>=0},read:E,destroy:M,_gl:n,_refresh:Y,poll:function(){Q(),c&&c.update()},now:X,stats:u});return r.onDone(null,K),K}return Df}()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_mlflow_mlflow=self.webpackChunk_mlflow_mlflow||[]).push([[1482],{20978:function(e,t,s){s.d(t,{tj:function(){return f}});var a=s(89555),i=s(82589),l=s(68254),o=s(31014),n=s(88464),r=s(56412),d=s(50111);const{Paragraph:c}=l.T;var g={name:"zjik7",styles:"display:flex"},u={name:"1ff36h2",styles:"flex-grow:1"};const h=o.memo((e=>{const{theme:t}=(0,l.u)();return(0,d.Y)(i.aFV,{title:"Tag: "+e.tagKey,visible:e.isKeyValueTagFullViewModalVisible,onCancel:()=>e.setIsKeyValueTagFullViewModalVisible(!1),children:(0,d.FD)("div",{css:g,children:[(0,d.Y)(c,{css:u,children:(0,d.Y)("pre",{css:(0,a.AH)({backgroundColor:t.colors.backgroundPrimary,marginTop:t.spacing.sm,whiteSpace:"pre-wrap",wordBreak:"break-all"},""),children:e.tagValue})}),(0,d.Y)("div",{css:(0,a.AH)({marginTop:t.spacing.sm},""),children:(0,d.Y)(r.i,{copyText:e.tagValue,showLabel:!1,icon:(0,d.Y)(i.TdU,{}),"aria-label":"Copy"})})]})})})),m=30;function p(){return!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?{overflow:"hidden",textOverflow:"ellipsis",textWrap:"nowrap",whiteSpace:"nowrap"}:{whiteSpace:"nowrap"}}const f=e=>{let{isClosable:t=!1,onClose:s,tag:r,enableFullViewModal:c=!1,charLimit:g=m,maxWidth:u=300,className:f}=e;const v=(0,n.A)(),[M,A]=(0,o.useState)(!1),{shouldTruncateKey:y,shouldTruncateValue:S}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;const{key:s,value:a}=e,i=s.length+a.length,l=s.length>a.length,o=l?a.length:s.length;return i<=t?{shouldTruncateKey:!1,shouldTruncateValue:!1}:o>t/2?{shouldTruncateKey:!0,shouldTruncateValue:!0}:{shouldTruncateKey:l,shouldTruncateValue:!l}}(r,g),C=c&&(y||S),_=v.formatMessage({id:"ZXUtU8",defaultMessage:"Click to see more"});return(0,d.FD)("div",{children:[(0,d.Y)(i.vwO,{closable:t,onClose:s,title:r.key,className:f,children:(0,d.Y)(i.m_M,{title:C?_:"",children:(0,d.FD)("span",{css:(0,a.AH)({maxWidth:u,display:"inline-flex"},""),onClick:()=>C?A(!0):void 0,children:[(0,d.Y)(l.T.Text,{bold:!0,title:r.key,css:p(y),children:r.key}),r.value&&(0,d.FD)(l.T.Text,{title:r.value,css:p(S),children:[": ",r.value]})]})})}),(0,d.Y)("div",{children:M&&(0,d.Y)(h,{tagKey:r.key,tagValue:r.value,isKeyValueTagFullViewModalVisible:M,setIsKeyValueTagFullViewModalVisible:A})})]})}},43683:function(e,t,s){s.d(t,{Q:function(){return S}});var a=s(89555),i=s(9133),l=s(31014),o=s(68254),n=s(82589),r=s(88464),d=s(88443),c=s(13369),g=s(50111);var u={name:"4zleql",styles:"display:block"};function h(e){return t=>function(e,t){const s=(0,r.A)(),{theme:d}=(0,o.u)(),c=e.props.searchValue.toLowerCase();return(0,l.useMemo)((()=>{if(!c)return e;if((0,i.sortedIndexOf)(t,c)>=0)return e;const o=/^[^,.:/=\-\s]+$/.test(c);return l.cloneElement(e,{flattenOptions:[{data:{value:c,disabled:!o,style:{color:o?d.colors.actionTertiaryTextDefault:d.colors.actionDisabledText},children:(0,g.Y)(n.m_M,{title:o?void 0:s.formatMessage({id:"fWEvZL",defaultMessage:", . : / - = and blank spaces are not allowed"}),placement:"right",children:(0,g.FD)("span",{css:u,children:[(0,g.Y)(n.c11,{css:(0,a.AH)({marginRight:d.spacing.sm},"")}),s.formatMessage({id:"IJbauF",defaultMessage:'Add tag "{tagKey}"'},{tagKey:c})]})})},key:c,groupOption:!1},...e.props.flattenOptions]})}),[t,e,c,s,d])}(t,e)}var m={name:"1d3w5wq",styles:"width:100%"};function p(e){let{allAvailableTags:t,control:s,onKeyChangeCallback:a}=e;const i=(0,r.A)(),[o,d]=(0,l.useState)(!1),u=(0,l.useRef)(null),{field:p,fieldState:f}=(0,c.as)({control:s,name:"key",rules:{required:{message:i.formatMessage({id:"RlBbjb",defaultMessage:"A tag key is required"}),value:!0}}});return(0,g.Y)(n._vn,{allowClear:!0,ref:u,dangerouslySetAntdProps:{showSearch:!0,dropdownRender:h(t)},css:m,placeholder:i.formatMessage({id:"8ALhnh",defaultMessage:"Type a key"}),value:p.value,defaultValue:p.value,open:o,onDropdownVisibleChange:e=>{d(e)},filterOption:(e,t)=>null===t||void 0===t?void 0:t.value.toLowerCase().includes(e.toLowerCase()),onSelect:e=>{p.onChange(e),null===a||void 0===a||a(e)},onClear:()=>{p.onChange(void 0),null===a||void 0===a||a(void 0)},validationState:f.error?"error":void 0,children:t.map((e=>(0,g.Y)(n._vn.Option,{value:e,children:e},e)))})}var f=s(20978),v=s(52350);function M(e){return new Map(e.map((e=>[e.key,e])))}var A={name:"82a6rk",styles:"flex:1"},y={name:"82a6rk",styles:"flex:1"};const S=e=>{let{onSuccess:t,saveTagsHandler:s,allAvailableTags:u,valueRequired:h=!1}=e;const m=(0,l.useRef)(),[S,C]=(0,l.useState)(""),{theme:w}=(0,o.u)(),[T,Y]=(0,l.useState)(new Map),[R,I]=(0,l.useState)(new Map),[b,D]=(0,l.useState)(!1),k=(0,c.mN)({defaultValues:{key:void 0,value:""}}),E=()=>D(!1),x=(0,l.useCallback)((e=>{m.current=e,Y(M(e.tags||[])),I(M(e.tags||[])),k.reset(),D(!0)}),[k]),V=async()=>{m.current&&(C(""),L(!0),s(m.current,Array.from(T.values()),Array.from(R.values())).then((()=>{E(),null===t||void 0===t||t(),L(!1)})).catch((e=>{var t;L(!1),C(e instanceof v.s?null===(t=e.getUserVisibleError())||void 0===t?void 0:t.message:e.message)})))},N=(0,r.A)(),F=k.watch(),[P,L]=(0,l.useState)(!1),U=(0,l.useMemo)((()=>!(0,i.isEqual)((0,i.sortBy)(Array.from(T.values()),"key"),(0,i.sortBy)(Array.from(R.values()),"key"))),[T,R]),O=F.key||F.value,K=U&&O;return{EditTagsModal:(0,g.FD)(n.aFV,{destroyOnClose:!0,visible:b,title:(0,g.Y)(d.A,{id:"TBX+Gs",defaultMessage:"Add/Edit tags"}),onCancel:E,footer:(0,g.FD)(o.R,{children:[(0,g.Y)(o.B,{componentId:"codegen_mlflow_app_src_common_hooks_useeditkeyvaluetagsmodal.tsx_147",dangerouslyUseFocusPseudoClass:!0,onClick:E,css:(0,a.AH)({marginRight:U?0:w.spacing.sm},""),children:N.formatMessage({id:"2a/rR8",defaultMessage:"Cancel"})}),K?(0,g.Y)(_,{formValues:F,isLoading:P,onSaveTask:V}):(0,g.Y)(n.m_M,{title:U?void 0:N.formatMessage({id:"16onEc",defaultMessage:"Please add or remove one or more tags before saving"}),children:(0,g.Y)(o.B,{componentId:"codegen_mlflow_app_src_common_hooks_useeditkeyvaluetagsmodal.tsx_174",dangerouslyUseFocusPseudoClass:!0,disabled:!U,loading:P,type:"primary",onClick:V,children:N.formatMessage({id:"801Xh4",defaultMessage:"Save tags"})})})]}),children:[(0,g.FD)("form",{onSubmit:k.handleSubmit((()=>{if(h&&!F.value.trim())return;const e=new Map(R);e.set(F.key,F),I(e),k.reset()})),css:(0,a.AH)({display:"flex",alignItems:"flex-end",gap:w.spacing.md},""),children:[(0,g.FD)("div",{css:(0,a.AH)({minWidth:0,display:"flex",gap:w.spacing.md,flex:1},""),children:[(0,g.FD)("div",{css:A,children:[(0,g.Y)(n.D$Q.Label,{htmlFor:"key",children:N.formatMessage({id:"crTWax",defaultMessage:"Key"})}),(0,g.Y)(p,{allAvailableTags:u||[],control:k.control,onKeyChangeCallback:e=>{var t;const s=e?R.get(e):void 0;k.setValue("value",null!==(t=null===s||void 0===s?void 0:s.value)&&void 0!==t?t:"")}})]}),(0,g.Y)("div",{css:y,children:(0,g.Y)(n.D$Q.Label,{htmlFor:"value",children:h?N.formatMessage({id:"tHrp+A",defaultMessage:"Value"}):N.formatMessage({id:"4B8k46",defaultMessage:"Value (optional)"})})})]}),(0,g.Y)(n.m_M,{title:N.formatMessage({id:"tx3aAM",defaultMessage:"Add tag"}),children:(0,g.Y)(o.B,{componentId:"codegen_mlflow_app_src_common_hooks_useeditkeyvaluetagsmodal.tsx_248",htmlType:"submit","aria-label":N.formatMessage({id:"tx3aAM",defaultMessage:"Add tag"}),children:(0,g.Y)(n.c11,{})})})]}),S&&(0,g.Y)(n.D$Q.Message,{type:"error",message:S}),(0,g.Y)("div",{css:(0,a.AH)({display:"flex",rowGap:w.spacing.xs,flexWrap:"wrap",marginTop:w.spacing.sm},""),children:Array.from(R.values()).map((e=>(0,g.Y)(f.tj,{isClosable:!0,tag:e,onClose:()=>(e=>{let{key:t}=e;I((e=>(e.delete(t),new Map(e))))})(e)},e.key)))})]}),showEditTagsModal:x,isLoading:P}};var C={name:"1y0ex1",styles:"max-width:400px"};function _(e){let{isLoading:t,formValues:s,onSaveTask:l}=e;const d=(0,r.A)(),{theme:c}=(0,o.u)(),u=`${`${(0,i.truncate)(s.key,{length:20})||"_"}`}${s.value?`:${(0,i.truncate)(s.value,{length:20})}`:""}`,h=d.formatMessage({id:"wcSVYI",defaultMessage:'Are you sure you want to save and close without adding "{tag}"'},{tag:u});return(0,g.FD)(n.AMh.Root,{children:[(0,g.Y)(n.AMh.Trigger,{asChild:!0,children:(0,g.Y)(o.B,{componentId:"codegen_mlflow_app_src_common_hooks_useeditkeyvaluetagsmodal.tsx_306",dangerouslyUseFocusPseudoClass:!0,loading:t,type:"primary",children:d.formatMessage({id:"801Xh4",defaultMessage:"Save tags"})})}),(0,g.FD)(n.AMh.Content,{align:"end","aria-label":h,children:[(0,g.Y)(o.T.Paragraph,{css:C,children:h}),(0,g.Y)(n.AMh.Close,{asChild:!0,children:(0,g.Y)(o.B,{componentId:"codegen_mlflow_app_src_common_hooks_useeditkeyvaluetagsmodal.tsx_316",onClick:l,children:d.formatMessage({id:"mv6CY3",defaultMessage:"Yes, save and close"})})}),(0,g.Y)(n.AMh.Close,{asChild:!0,children:(0,g.Y)(o.B,{componentId:"codegen_mlflow_app_src_common_hooks_useeditkeyvaluetagsmodal.tsx_324",type:"primary",css:(0,a.AH)({marginLeft:c.spacing.sm},""),children:d.formatMessage({id:"geizp1",defaultMessage:"Cancel"})})}),(0,g.Y)(n.AMh.Arrow,{})]})]})}},45653:function(e,t,s){s.d(t,{Qr:function(){return r},Xb:function(){return u},Y7:function(){return l},fx:function(){return o},yv:function(){return d}});var a=s(9133),i=s.n(a);const l=(e,t)=>{const s=i().truncate(e,{length:t});return i().takeWhile(s,(e=>"\n"!==e)).join("")},o=(e,t)=>{if(e.length>t){const s=Math.floor((t-3)/2),a=t-3-s;return e.substring(0,s)+"..."+e.substring(e.length-a,e.length)}return e},n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=e=>{let t="",s=0;const a=c(e);for(;s<a.length;){const e=a.charCodeAt(s++),i=a.charCodeAt(s++),l=a.charCodeAt(s++),o=e>>2,r=(3&e)<<4|i>>4;let d=(15&i)<<2|l>>6,c=63&l;isNaN(i)?d=c=64:isNaN(l)&&(c=64),t=t+n.charAt(o)+n.charAt(r)+n.charAt(d)+n.charAt(c)}return t},d=e=>{let t="",s=0;const a=(null===e||void 0===e?void 0:e.replace(/[^A-Za-z0-9+/=]/g,""))||"";for(;s<a.length;){const e=n.indexOf(a.charAt(s++)),i=n.indexOf(a.charAt(s++)),l=n.indexOf(a.charAt(s++)),o=n.indexOf(a.charAt(s++)),r=e<<2|i>>4,d=(15&i)<<4|l>>2,c=(3&l)<<6|o;t+=String.fromCharCode(r),64!==l&&(t+=String.fromCharCode(d)),64!==o&&(t+=String.fromCharCode(c))}return g(t)},c=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\r\n/g,"\n");let t="";for(let s=0;s<e.length;s++){const a=e.charCodeAt(s);t+=a<128?String.fromCharCode(a):a>127&&a<2048?String.fromCharCode(a>>6|192)+String.fromCharCode(63&a|128):String.fromCharCode(a>>12|224)+String.fromCharCode(a>>6&63|128)+String.fromCharCode(63&a|128)}return t},g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t="",s=0;for(;s<e.length;){const a=e.charCodeAt(s);if(a<128)t+=String.fromCharCode(a),s++;else if(a>191&&a<224){const i=e.charCodeAt(s+1);t+=String.fromCharCode((31&a)<<6|63&i),s+=2}else{const i=e.charCodeAt(s+1),l=e.charCodeAt(s+2);t+=String.fromCharCode((15&a)<<12|(63&i)<<6|63&l),s+=3}}return t},u=e=>crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join("")))},29243:function(e,t,s){s.r(t),s.d(t,{ModelPage:function(){return le},ModelPageImpl:function(){return se},default:function(){return oe}});var a=s(31014),i=s(10811),l=s(69708),o=s(68254),n=s(82589),r=s(70618),d=s(9856),c=s(88464),g=s(88443),u=s(47664),h=s(81866),m=s(48624),p=s(69869),f=s(76010),v=s(89555),M=s(20978),A=s(50111);const y=e=>{let{tags:t=[],onAddEdit:s}=e;const{theme:a}=(0,o.u)();return(0,A.Y)("div",{css:(0,v.AH)({display:"flex",flexWrap:"wrap","> *":{marginRight:"0 !important"},gap:a.spacing.xs},""),children:t.length<1?(0,A.Y)(o.B,{componentId:"codegen_mlflow_app_src_common_components_keyvaluetagseditorcell.tsx_29",size:"small",type:"link",onClick:s,children:(0,A.Y)(g.A,{id:"Li72QU",defaultMessage:"Add"})}):(0,A.FD)(A.FK,{children:[t.map((e=>(0,A.Y)(M.tj,{tag:e},`${e.key}-${e.value}`))),(0,A.Y)(o.B,{componentId:"codegen_mlflow_app_src_common_components_keyvaluetagseditorcell.tsx_37",size:"small",icon:(0,A.Y)(n.R2l,{}),onClick:s})]})})};var S=s(43683),C=s(30311),_=s(64756);const w=e=>{let{aliases:t=[],onAddEdit:s}=e;const{theme:a}=(0,o.u)();return(0,A.Y)("div",{css:(0,v.AH)({maxWidth:300,display:"flex",flexWrap:"wrap",alignItems:"flex-start","> *":{marginRight:"0 !important"},rowGap:a.spacing.xs/2,columnGap:a.spacing.xs},""),children:t.length<1?(0,A.Y)(o.B,{componentId:"codegen_mlflow_app_src_model-registry_components_aliases_modelversiontablealiasescell.tsx_30",size:"small",type:"link",onClick:s,children:(0,A.Y)(g.A,{id:"pU6cxH",defaultMessage:"Add"})}):(0,A.FD)(A.FK,{children:[t.map((e=>(0,A.Y)(_.m,{value:e,css:(0,v.AH)({marginTop:a.spacing.xs/2},"")},e))),(0,A.Y)(o.B,{componentId:"codegen_mlflow_app_src_model-registry_components_aliases_modelversiontablealiasescell.tsx_41",size:"small",icon:(0,A.Y)(n.R2l,{}),onClick:s})]})})};var T=s(45653);var Y=function(e){return e.STATUS="STATUS",e.VERSION="VERSION",e.CREATION_TIMESTAMP="CREATION_TIMESTAMP",e.USER_ID="USER_ID",e.TAGS="TAGS",e.STAGE="STAGE",e.DESCRIPTION="DESCRIPTION",e.ALIASES="ALIASES",e}(Y||{}),R={name:"10lkuaq",styles:".table-row-select-cell{align-items:flex-start;}"};const I=e=>{let{modelName:t,modelVersions:s,activeStageOnly:v,onChange:M,modelEntity:_,onMetadataUpdated:I,usingNextModelsUI:b,aliases:D}=e;const k=(0,a.useMemo)((()=>{const e={};return null===D||void 0===D||D.forEach((t=>{let{alias:s,version:a}=t;e[a]||(e[a]=[]),e[a].push(s)})),e}),[D]),E=(0,a.useMemo)((()=>v?(s||[]).filter((e=>{let{current_stage:t}=e;return h.jI.includes(t)})):s),[v,s]),{theme:x}=(0,o.u)(),V=(0,c.A)(),N=(0,a.useMemo)((()=>{const e=(null===E||void 0===E?void 0:E.map((e=>(null===e||void 0===e?void 0:e.tags)||[])).flat())||[];return Array.from(new Set(e.map((e=>{let{key:t}=e;return t})))).sort()}),[E]),F=(0,i.wA)(),{EditTagsModal:P,showEditTagsModal:L}=(0,S.Q)({allAvailableTags:N,saveTagsHandler:async(e,t,s)=>F((0,l.kM)(e,t,s)),onSuccess:I}),{EditAliasesModal:U,showEditAliasesModal:O}=(0,C.o)({model:_||null,onSuccess:I}),[K,q]=(0,a.useState)({}),[B,H]=(0,a.useState)({pageSize:10,pageIndex:0});(0,a.useEffect)((()=>{const e=(E||[]).filter((e=>{let{version:t}=e;return K[t]})),t=e.map((e=>{let{version:t}=e;return t}));M(t,e)}),[K,M,E]);const j=(0,a.useMemo)((()=>{const e=[{id:Y.STATUS,enableSorting:!1,header:"",meta:{styles:{flexBasis:x.general.heightSm,flexGrow:0}},cell:e=>{let{row:{original:t}}=e;const{status:s,status_message:a}=t||{};return(0,A.Y)(n.m_M,{title:a||h.zr[s],children:(0,A.Y)(o.T.Text,{children:h.UA[s]})})}}];return e.push({id:Y.VERSION,enableSorting:!1,header:V.formatMessage({id:"1f72BQ",defaultMessage:"Version"}),meta:{className:"model-version"},accessorKey:"version",cell:e=>{let{getValue:s}=e;return(0,A.Y)(g.A,{id:"yjerKR",defaultMessage:"<link>Version {versionNumber}</link>",values:{link:e=>(0,A.Y)(m.N_,{to:p.fM.getModelVersionPageRoute(t,String(s())),children:e}),versionNumber:s()}})}},{id:Y.CREATION_TIMESTAMP,enableSorting:!0,meta:{styles:{minWidth:200}},header:V.formatMessage({id:"Nm/Pjx",defaultMessage:"Registered at"}),accessorKey:"creation_timestamp",cell:e=>{let{getValue:t}=e;return f.A.formatTimestamp(t())}},{id:Y.USER_ID,enableSorting:!1,meta:{styles:{minWidth:100}},header:V.formatMessage({id:"xRw7H2",defaultMessage:"Created by"}),accessorKey:"user_id",cell:e=>{let{getValue:t}=e;return(0,A.Y)("span",{children:t()})}}),b?e.push({id:Y.TAGS,enableSorting:!1,header:V.formatMessage({id:"7NOp4F",defaultMessage:"Tags"}),meta:{styles:{flex:2}},accessorKey:"tags",cell:e=>{let{getValue:t,row:{original:s}}=e;return(0,A.Y)(y,{tags:t(),onAddEdit:()=>{null===L||void 0===L||L(s)}})}},{id:Y.ALIASES,accessorKey:"aliases",enableSorting:!1,header:V.formatMessage({id:"wNHR0W",defaultMessage:"Aliases"}),meta:{styles:{flex:2},multiline:!0},cell:e=>{let{getValue:s,row:{original:a}}=e;const i=k[a.version]||[];return(0,A.Y)(w,{modelName:t,version:a.version,aliases:i,onAddEdit:()=>{null===O||void 0===O||O(a.version)}})}}):e.push({id:Y.STAGE,enableSorting:!1,header:V.formatMessage({id:"7F/CBv",defaultMessage:"Stage"}),accessorKey:"current_stage",cell:e=>{let{getValue:t}=e;return h.$0[t()]}}),e.push({id:Y.DESCRIPTION,enableSorting:!1,header:V.formatMessage({id:"Vm9CvZ",defaultMessage:"Description"}),meta:{styles:{flex:2}},accessorKey:"description",cell:e=>{let{getValue:t}=e;return(0,T.Y7)(t(),32)}}),e}),[x,V,t,L,O,b,k]),[W,G]=(0,a.useState)([{id:Y.CREATION_TIMESTAMP,desc:!0}]),z=(0,r.N4)({data:E||[],columns:j,state:{pagination:B,rowSelection:K,sorting:W},getCoreRowModel:(0,d.HT)(),getSortedRowModel:(0,d.h5)(),getPaginationRowModel:(0,d.kW)(),getRowId:e=>{let{version:t}=e;return t},onRowSelectionChange:q,onSortingChange:G}),X=(0,A.Y)(n.dKS,{currentPageIndex:B.pageIndex+1,numTotal:(E||[]).length,onChange:(e,t)=>{H({pageSize:t||B.pageSize,pageIndex:e-1})},pageSize:B.pageSize}),$=(0,A.Y)(n.SvL,{description:(0,A.Y)(g.A,{id:"ynkoR7",defaultMessage:"No models versions are registered yet. <link>Learn more</link> about how to register a model version.",values:{link:e=>(0,A.Y)(o.T.Link,{target:"_blank",href:u.gw,children:e})}}),image:(0,A.Y)(n.c11,{})});return(0,A.FD)(A.FK,{children:[(0,A.FD)(n.XIK,{"data-testid":"model-list-table",pagination:X,scrollable:!0,empty:0===z.getRowModel().rows.length?$:void 0,someRowsSelected:z.getIsSomeRowsSelected()||z.getIsAllRowsSelected(),children:[(0,A.FD)(n.Hjg,{isHeader:!0,children:[(0,A.Y)(n.p4w,{checked:z.getIsAllRowsSelected(),indeterminate:z.getIsSomeRowsSelected(),onChange:z.getToggleAllRowsSelectedHandler()}),z.getLeafHeaders().map((e=>{var t;return(0,A.Y)(n.A0N,{multiline:!1,sortable:e.column.getCanSort(),sortDirection:e.column.getIsSorted()||"none",onToggleSort:e.column.getToggleSortingHandler(),css:null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.styles,children:(0,r.Kv)(e.column.columnDef.header,e.getContext())},e.id)}))]}),z.getRowModel().rows.map((e=>(0,A.FD)(n.Hjg,{css:R,children:[(0,A.Y)(n.p4w,{checked:e.getIsSelected(),onChange:e.getToggleSelectedHandler()}),e.getAllCells().map((e=>{var t,s,a;return(0,A.Y)(n.nA6,{className:null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className,multiline:null===(s=e.column.columnDef.meta)||void 0===s?void 0:s.multiline,css:null===(a=e.column.columnDef.meta)||void 0===a?void 0:a.styles,children:(0,r.Kv)(e.column.columnDef.cell,e.getContext())},e.id)}))]},e.id)))]}),P,U]})};var b=s(21621),D=s(10405),k=s(85392),E=s(41287),x=s(65871),V=s(77481),N=s(64912),F=s(90925),P=s(91144),L=s(84963),U=s(73414);const O="ALL",K="ACTIVE";var q={name:"1ootkdu",styles:"margin-bottom:8px;display:flex;justify-content:flex-end"};class B extends a.Component{constructor(e){super(e),this.state={stageFilter:O,showDescriptionEditor:!1,isDeleteModalVisible:!1,isDeleteModalConfirmLoading:!1,runsSelected:{},isTagsRequestPending:!1,updatingEmailPreferences:!1},this.formRef=a.createRef(),this.handleStageFilterChange=e=>{this.setState({stageFilter:e.target.value})},this.handleCancelEditDescription=()=>{this.setState({showDescriptionEditor:!1})},this.handleSubmitEditDescription=e=>this.props.handleEditDescription(e).then((()=>{this.setState({showDescriptionEditor:!1})})),this.startEditingDescription=e=>{e.stopPropagation(),this.setState({showDescriptionEditor:!0})},this.showDeleteModal=()=>{this.setState({isDeleteModalVisible:!0})},this.hideDeleteModal=()=>{this.setState({isDeleteModalVisible:!1})},this.showConfirmLoading=()=>{this.setState({isDeleteModalConfirmLoading:!0})},this.hideConfirmLoading=()=>{this.setState({isDeleteModalConfirmLoading:!1})},this.handleDeleteConfirm=()=>{const{navigate:e}=this.props;this.showConfirmLoading(),this.props.handleDelete().then((()=>{e(p.fM.modelListPageRoute)})).catch((e=>{this.hideConfirmLoading(),f.A.logErrorAndNotifyUser(e)}))},this.handleAddTag=e=>{const t=this.formRef.current,{model:s}=this.props,a=s.name;this.setState({isTagsRequestPending:!0}),this.props.setRegisteredModelTagApi(a,e.name,e.value).then((()=>{this.setState({isTagsRequestPending:!1}),t.resetFields()})).catch((e=>{this.setState({isTagsRequestPending:!1}),console.error(e),b.Ay.error("Failed to add tag. Error: "+e.getUserVisibleError())}))},this.handleSaveEdit=e=>{let{name:t,value:s}=e;const{model:a}=this.props,i=a.name;return this.props.setRegisteredModelTagApi(i,t,s).catch((e=>{console.error(e),b.Ay.error("Failed to set tag. Error: "+e.getUserVisibleError())}))},this.handleDeleteTag=e=>{let{name:t}=e;const{model:s}=this.props,a=s.name;return this.props.deleteRegisteredModelTagApi(a,t).catch((e=>{console.error(e),b.Ay.error("Failed to delete tag. Error: "+e.getUserVisibleError())}))},this.onChange=(e,t)=>{const s=Object.assign({},this.state);s.runsSelected={},t.forEach((e=>{s.runsSelected={...s.runsSelected,[e.version]:e.run_id}})),this.setState(s)},this.renderDetails=()=>{const{model:e,modelVersions:t,tags:s}=this.props,{stageFilter:a,showDescriptionEditor:i,isDeleteModalVisible:l,isDeleteModalConfirmLoading:r,isTagsRequestPending:d}=this.state,c=e.name,u=Object.keys(this.state.runsSelected).length<2;return(0,A.FD)("div",{css:j.wrapper,children:[(0,A.FD)(F.K,{columns:3,"data-testid":"model-view-metadata",children:[(0,A.Y)(F.K.Item,{"data-testid":"model-view-metadata-item",label:this.props.intl.formatMessage({id:"At3XhS",defaultMessage:"Created Time"}),children:f.A.formatTimestamp(e.creation_timestamp)}),(0,A.Y)(F.K.Item,{"data-testid":"model-view-metadata-item",label:this.props.intl.formatMessage({id:"j/pJM6",defaultMessage:"Last Modified"}),children:f.A.formatTimestamp(e.last_updated_timestamp)}),e.user_id&&(0,A.Y)(F.K.Item,{"data-testid":"model-view-metadata-item",label:this.props.intl.formatMessage({id:"1jPG5D",defaultMessage:"Creator"}),children:(0,A.Y)("div",{children:e.user_id})})]}),(0,A.Y)(D.i,{css:j.collapsiblePanel,title:(0,A.FD)("span",{children:[(0,A.Y)(g.A,{id:"oHW+ks",defaultMessage:"Description"})," ",i?null:this.renderDescriptionEditIcon()]}),forceOpen:i,defaultCollapsed:!e.description,"data-test-id":"model-description-section",children:(0,A.Y)(k.V,{defaultMarkdown:e.description,onSubmit:this.handleSubmitEditDescription,onCancel:this.handleCancelEditDescription,showEditor:i})}),(0,A.Y)("div",{"data-test-id":"tags-section",children:(0,A.Y)(D.i,{title:(0,A.Y)(g.A,{id:"HyBP+D",defaultMessage:"Tags"}),defaultCollapsed:0===f.A.getVisibleTagValues(s).length,"data-test-id":"model-tags-section",children:(0,A.Y)(E.A,{innerRef:this.formRef,handleAddTag:this.handleAddTag,handleDeleteTag:this.handleDeleteTag,handleSaveEdit:this.handleSaveEdit,tags:s,isRequestPending:d})})}),(0,A.FD)(D.i,{title:(0,A.Y)(A.FK,{children:(0,A.FD)("div",{css:j.versionsTabButtons,children:[(0,A.Y)("span",{children:(0,A.Y)(g.A,{id:"Z5en2d",defaultMessage:"Versions"})}),!this.props.usingNextModelsUI&&(0,A.FD)(n.d98,{name:"stage-filter",value:this.state.stageFilter,onChange:e=>this.handleStageFilterChange(e),children:[(0,A.Y)(n.EPn,{value:O,children:(0,A.Y)(g.A,{id:"vi2MM7",defaultMessage:"All"})}),(0,A.FD)(n.EPn,{value:K,children:[(0,A.Y)(g.A,{id:"xPkIEE",defaultMessage:"Active"})," ",this.getActiveVersionsCount()]})]}),(0,A.Y)(o.B,{componentId:"codegen_mlflow_app_src_model-registry_components_modelview.tsx_619","data-test-id":"compareButton",disabled:u,onClick:this.onCompare,children:(0,A.Y)(g.A,{id:"FpjDSq",defaultMessage:"Compare"})})]})}),"data-test-id":"model-versions-section",children:[(0,P.WX)()&&(0,A.Y)("div",{css:q,children:(0,A.Y)(L.C,{})}),(0,A.Y)(I,{activeStageOnly:a===K&&!this.props.usingNextModelsUI,modelName:c,modelVersions:t,modelEntity:e,onChange:this.onChange,onMetadataUpdated:this.props.onMetadataUpdated,usingNextModelsUI:this.props.usingNextModelsUI,aliases:null===e||void 0===e?void 0:e.aliases})]}),(0,A.Y)(n.ZFm,{"data-testid":"mlflow-input-modal",title:this.props.intl.formatMessage({id:"Gg/vLZ",defaultMessage:"Delete Model"}),visible:l,confirmLoading:r,onOk:this.handleDeleteConfirm,okText:this.props.intl.formatMessage({id:"a8rS4O",defaultMessage:"Delete"}),cancelText:this.props.intl.formatMessage({id:"yK/6vg",defaultMessage:"Cancel"}),onCancel:this.hideDeleteModal,children:(0,A.Y)("span",{children:(0,A.Y)(g.A,{id:"HUf9qJ",defaultMessage:"Are you sure you want to delete {modelName}? This cannot be undone.",values:{modelName:c}})})})]})},this.onCompare=this.onCompare.bind(this)}componentDidMount(){const e=`${this.props.model.name} - MLflow Model`;f.A.updatePageTitle(e)}getActiveVersionsCount(){const{modelVersions:e}=this.props;return e?e.filter((e=>h.jI.includes(e.current_stage))).length:0}getOverflowMenuItems(){return[{id:"delete",itemName:(0,A.Y)(g.A,{id:"9fVZg8",defaultMessage:"Delete"}),onClick:this.showDeleteModal,disabled:this.getActiveVersionsCount()>0}]}onCompare(){this.props.model&&this.props.navigate(p.fM.getCompareModelVersionsPageRoute(this.props.model.name,this.state.runsSelected))}renderDescriptionEditIcon(){return(0,A.Y)(o.B,{componentId:"codegen_mlflow_app_src_model-registry_components_modelview.tsx_467","data-test-id":"descriptionEditButton",type:"link",css:j.editButton,onClick:this.startEditingDescription,children:(0,A.Y)(g.A,{id:"36g3aR",defaultMessage:"Edit"})})}renderMainPanel(){return this.renderDetails()}render(){const{model:e}=this.props,t=e.name,s=[(0,A.Y)(m.N_,{to:p.fM.modelListPageRoute,children:(0,A.Y)(g.A,{id:"raa3Ij",defaultMessage:"Registered Models"})})];return(0,A.FD)("div",{children:[(0,A.Y)(V.z,{title:t,breadcrumbs:s,children:(0,A.Y)(V.o,{menu:this.getOverflowMenuItems()})}),this.renderMainPanel()]})}}const H={setRegisteredModelTagApi:l._e,deleteRegisteredModelTagApi:l.bE},j={emailNotificationPreferenceDropdown:e=>({width:300,marginBottom:e.spacing.md}),emailNotificationPreferenceTip:e=>({paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm}),wrapper:e=>({".collapsible-panel":{marginBottom:e.spacing.md},'div[role="button"][aria-expanded]':{height:e.general.buttonHeight}}),editButton:e=>({marginLeft:e.spacing.md}),versionsTabButtons:e=>({display:"flex",gap:e.spacing.md,alignItems:"center"})},W=(0,i.Ng)(((e,t)=>{const s=t.model.name;return{tags:(0,x.ZG)(s,e)}}),H)((0,U.p)((0,N.Ay)(B)));var G=s(48588),z=s(3769),X=s(96277),$=s(82214),Z=s(7204),Q=s(52350),J=s(25869),ee=s(26645),te=s(62448);class se extends a.Component{constructor(){super(...arguments),this.hasUnfilledRequests=void 0,this.pollIntervalId=void 0,this.initSearchModelVersionsApiRequestId=(0,Z.yk)(),this.initgetRegisteredModelApiRequestId=(0,Z.yk)(),this.updateRegisteredModelApiId=(0,Z.yk)(),this.deleteRegisteredModelApiId=(0,Z.yk)(),this.criticalInitialRequestIds=[this.initSearchModelVersionsApiRequestId,this.initgetRegisteredModelApiRequestId],this.handleEditDescription=e=>{const{model:t}=this.props;return this.props.updateRegisteredModelApi(t.name,e,this.updateRegisteredModelApiId).then(this.loadData)},this.handleDelete=()=>{const{model:e}=this.props;return this.props.deleteRegisteredModelApi(e.name,this.deleteRegisteredModelApiId)},this.loadData=e=>{const{modelName:t}=this.props;this.hasUnfilledRequests=!0;const s=[this.props.getRegisteredModelApi(t,!0===e?this.initgetRegisteredModelApiRequestId:null),this.props.searchModelVersionsApi({name:t},!0===e?this.initSearchModelVersionsApiRequestId:null)];return Promise.all(s).then((()=>{this.hasUnfilledRequests=!1}))},this.pollData=()=>{const{modelName:e,navigate:t}=this.props;return!this.hasUnfilledRequests&&f.A.isBrowserTabVisible()?this.loadData().catch((s=>{s instanceof Q.s&&"RESOURCE_DOES_NOT_EXIST"===s.getErrorCode()?(f.A.logErrorAndNotifyUser(s),this.props.deleteRegisteredModelApi(e,void 0,!0),t(p.fM.modelListPageRoute)):console.error(s),this.hasUnfilledRequests=!1})):Promise.resolve()}}componentDidMount(){this.loadData(!0).catch(console.error),this.hasUnfilledRequests=!1,this.pollIntervalId=setInterval(this.pollData,h.Gs)}componentWillUnmount(){clearInterval(this.pollIntervalId)}render(){const{model:e,modelVersions:t,navigate:s,modelName:a}=this.props;return(0,A.Y)(G.L,{children:(0,A.Y)(z.Ay,{requestIds:this.criticalInitialRequestIds,children:(i,l,o)=>{if(l){if(clearInterval(this.pollIntervalId),f.A.shouldRender404(o,[this.initgetRegisteredModelApiRequestId]))return(0,A.Y)($.E,{statusCode:404,subMessage:this.props.intl.formatMessage({id:"tD0/e2",defaultMessage:"Model {modelName} does not exist"},{modelName:a}),fallbackHomePageReactRoute:p.fM.modelListPageRoute});const e=o.filter((e=>{var t;return this.criticalInitialRequestIds.includes(e.id)&&(null===(t=e.error)||void 0===t?void 0:t.getErrorCode())===u.tG.PERMISSION_DENIED}));var n;if(e&&e[0])return(0,A.Y)($.E,{statusCode:403,subMessage:this.props.intl.formatMessage({id:"rJitqj",defaultMessage:'Permission denied for {modelName}. Error: "{errorMsg}"'},{modelName:a,errorMsg:null===(n=e[0].error)||void 0===n?void 0:n.getMessageField()}),fallbackHomePageReactRoute:p.fM.modelListPageRoute});(0,z.dD)(o)}else{if(i)return(0,A.Y)(X.y,{});if(e)return(0,A.Y)(W,{model:e,modelVersions:t,handleEditDescription:this.handleEditDescription,handleDelete:this.handleDelete,navigate:s,onMetadataUpdated:this.loadData})}return null}})})}}const ae={searchModelVersionsApi:l.hY,getRegisteredModelApi:l.SY,updateRegisteredModelApi:l.tL,deleteRegisteredModelApi:l.r9},ie=(0,J.h)((0,i.Ng)(((e,t)=>{const s=decodeURIComponent(t.params.modelName);return{modelName:s,model:e.entities.modelByName[s],modelVersions:(0,x.Tr)(e,s)}}),ae)((0,N.Ay)(se))),le=(0,ee.X)(te.A.mlflowServices.MODEL_REGISTRY,ie);var oe=le},56412:function(e,t,s){s.d(t,{i:function(){return d}});var a=s(31014),i=s(88443),l=s(82589),o=s(68254),n=s(50111);var r={name:"1739oy8",styles:"z-index:1"};const d=e=>{let{copyText:t,showLabel:s=!0,...d}=e;const[c,g]=(0,a.useState)(!1);return(0,n.Y)(l.m_M,{title:(0,n.Y)(i.A,{id:"X+boXI",defaultMessage:"Copied"}),dangerouslySetAntdProps:{visible:c},children:(0,n.Y)(o.B,{componentId:"codegen_mlflow_app_src_shared_building_blocks_copybutton.tsx_35",type:"primary",onClick:()=>{navigator.clipboard.writeText(t),g(!0),setTimeout((()=>{g(!1)}),3e3)},onMouseLeave:()=>{g(!1)},css:r,children:s?(0,n.Y)(i.A,{id:"1Iq+NW",defaultMessage:"Copy"}):void 0,...d})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_mlflow_mlflow=self.webpackChunk_mlflow_mlflow||[]).push([[1500],{1670:function(e,t,r){r.d(t,{h:function(){return a}});var n,i,o=r(31014);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function l(e,t){let{title:r,titleId:l,...a}=e;return o.createElement("svg",c({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},a),r?o.createElement("title",{id:l},r):null,n||(n=o.createElement("path",{d:"M8 3C3.45 3 1.4375 6.33333 1 8C1.4375 9.66667 3.45 13 8 13C12.55 13 14.5625 9.66667 15 8C14.5625 6.33333 12.55 3 8 3Z",fill:"currentColor",stroke:"currentColor"})),i||(i=o.createElement("circle",{cx:8,cy:8,r:2.25,fill:"currentColor",stroke:"white",strokeWidth:1.5})))}const a=o.forwardRef(l);r.p},77336:function(e,t,r){r(31014);t.A=r.p+"static/media/no-experiments.0e4f4a114ef73e7d81c09474aba64b6c.svg"},79083:function(e,t,r){r(31014);t.A=r.p+"static/media/permission-denied-lock.16036747d57cd663d7df223781a447b2.svg"},10389:function(e,t,r){r.d(t,{U:function(){return i}});var n=r(50111);const i=()=>(0,n.FD)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.Y)("line",{x1:"6",y1:"6",x2:"6",y2:"18",stroke:"white",strokeWidth:"2"}),(0,n.Y)("circle",{cx:"6",cy:"12",r:"3",fill:"white"}),(0,n.Y)("line",{x1:"12",y1:"6",x2:"12",y2:"18",stroke:"white",strokeWidth:"2"}),(0,n.Y)("circle",{cx:"12",cy:"8",r:"3",fill:"white"}),(0,n.Y)("line",{x1:"18",y1:"6",x2:"18",y2:"18",stroke:"white",strokeWidth:"2"}),(0,n.Y)("circle",{cx:"18",cy:"15",r:"3",fill:"white"})]})},37752:function(e,t,r){r.d(t,{V:function(){return s}});var n=r(89555),i=(r(31014),r(68254)),o=r(82589),c=r(56412),l=r(50111);var a={name:"4fhn5u",styles:"white-space:pre-wrap;overflow-y:auto;flex:1"};const s=e=>{let{content:t,copyText:r,headerText:s,empty:d,onClose:h}=e;const{theme:f}=(0,i.u)();return(0,l.Y)("div",{css:(0,n.AH)({width:300,padding:f.spacing.sm,paddingRight:0,borderLeft:`1px solid ${f.colors.borderDecorative}`,overflow:"hidden",display:"flex",flexDirection:"column",height:"100%"},""),"data-testid":"preview-sidebar-content",children:t?(0,l.FD)(l.FK,{children:[(0,l.FD)("div",{css:(0,n.AH)({display:"grid",gridTemplateColumns:"1fr auto auto",rowGap:f.spacing.sm,alignItems:"flex-start",flex:"0 0 auto"},""),children:[s&&(0,l.Y)(i.T.Title,{level:4,css:(0,n.AH)({overflowX:"hidden",overflowY:"auto",marginTop:f.spacing.sm,marginRight:f.spacing.xs,maxHeight:200},""),children:s}),r&&(0,l.Y)(c.i,{copyText:r,showLabel:!1,icon:(0,l.Y)(o.TdU,{})}),h&&(0,l.Y)(i.B,{componentId:"codegen_mlflow_app_src_common_components_previewsidebar.tsx_67",type:"primary",icon:(0,l.Y)(i.C,{}),onClick:h})]}),(0,l.Y)("div",{css:a,children:t})]}):(0,l.Y)("div",{css:(0,n.AH)({marginTop:f.spacing.md},""),children:d})})}},51293:function(e,t,r){r.d(t,{p:function(){return l}});var n=r(68254),i=r(31014),o=r(50111);const c=i.lazy((()=>Promise.all([r.e(5605),r.e(775),r.e(9547),r.e(8398),r.e(4748),r.e(7972),r.e(492),r.e(5895),r.e(8262),r.e(2799),r.e(2932),r.e(7270),r.e(9808),r.e(7603),r.e(819),r.e(3460),r.e(7670),r.e(8690),r.e(4943),r.e(6762),r.e(2402)]).then(r.bind(r,22402)))),l=e=>(0,o.Y)(i.Suspense,{fallback:(0,o.Y)("div",{css:e=>({display:"flex",justifyContent:"center",margin:e.spacing.md}),children:(0,o.Y)(n.S,{})}),children:(0,o.Y)(c,{...e})})},87877:function(e,t,r){r.d(t,{JP:function(){return o},NG:function(){return c}});var n=r(60669),i=r(46795);const o=e=>(t,r,i)=>{r?e().includes(r)?i(`Experiment "${r}" already exists.`):n.x.getExperimentByName({experiment_name:r}).then((e=>i(`Experiment "${r}" already exists in deleted state.\n You can restore the experiment, or permanently delete the\n experiment from the .trash folder (under tracking server's\n root folder) in order to use this experiment name again.`))).catch((e=>i(void 0))):i(void 0)},c=(e,t,r)=>{t?i.x.getRegisteredModel({name:t}).then((()=>r(`Model "${t}" already exists.`))).catch((e=>r(void 0))):r(void 0)}},45653:function(e,t,r){r.d(t,{Qr:function(){return a},Xb:function(){return f},Y7:function(){return o},fx:function(){return c},yv:function(){return s}});var n=r(9133),i=r.n(n);const o=(e,t)=>{const r=i().truncate(e,{length:t});return i().takeWhile(r,(e=>"\n"!==e)).join("")},c=(e,t)=>{if(e.length>t){const r=Math.floor((t-3)/2),n=t-3-r;return e.substring(0,r)+"..."+e.substring(e.length-n,e.length)}return e},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=e=>{let t="",r=0;const n=d(e);for(;r<n.length;){const e=n.charCodeAt(r++),i=n.charCodeAt(r++),o=n.charCodeAt(r++),c=e>>2,a=(3&e)<<4|i>>4;let s=(15&i)<<2|o>>6,d=63&o;isNaN(i)?s=d=64:isNaN(o)&&(d=64),t=t+l.charAt(c)+l.charAt(a)+l.charAt(s)+l.charAt(d)}return t},s=e=>{let t="",r=0;const n=(null===e||void 0===e?void 0:e.replace(/[^A-Za-z0-9+/=]/g,""))||"";for(;r<n.length;){const e=l.indexOf(n.charAt(r++)),i=l.indexOf(n.charAt(r++)),o=l.indexOf(n.charAt(r++)),c=l.indexOf(n.charAt(r++)),a=e<<2|i>>4,s=(15&i)<<4|o>>2,d=(3&o)<<6|c;t+=String.fromCharCode(a),64!==o&&(t+=String.fromCharCode(s)),64!==c&&(t+=String.fromCharCode(d))}return h(t)},d=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\r\n/g,"\n");let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t+=n<128?String.fromCharCode(n):n>127&&n<2048?String.fromCharCode(n>>6|192)+String.fromCharCode(63&n|128):String.fromCharCode(n>>12|224)+String.fromCharCode(n>>6&63|128)+String.fromCharCode(63&n|128)}return t},h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t="",r=0;for(;r<e.length;){const n=e.charCodeAt(r);if(n<128)t+=String.fromCharCode(n),r++;else if(n>191&&n<224){const i=e.charCodeAt(r+1);t+=String.fromCharCode((31&n)<<6|63&i),r+=2}else{const i=e.charCodeAt(r+1),o=e.charCodeAt(r+2);t+=String.fromCharCode((15&n)<<12|(63&i)<<6|63&o),r+=3}}return t},f=e=>crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join("")))},857:function(e,t,r){r.d(t,{v:function(){return i}});var n=r(31014);const i=()=>{const[e,t]=(0,n.useState)(null),[r,i]=(0,n.useState)(void 0);return(0,n.useEffect)((()=>{if(!e||!window.ResizeObserver)return;const t=new ResizeObserver((e=>{let[t]=e;t.target.scrollHeight&&i(t.target.scrollHeight)}));return t.observe(e),()=>t.disconnect()}),[e]),{elementHeight:r,observeHeight:t}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_mlflow_mlflow=self.webpackChunk_mlflow_mlflow||[]).push([[1648],{70233:function(r,t,n){n.r(t),n.d(t,{sankeyCenter:function(){return s},sankeyCircular:function(){return I},sankeyJustify:function(){return h},sankeyLeft:function(){return l},sankeyRight:function(){return f}});var a=n(19322),c=n(25503),u=n(81036),i=n(74101),e=n.n(i);function o(r){return r.target.depth}function l(r){return r.depth}function f(r,t){return t-1-r.height}function h(r,t){return r.sourceLinks.length?r.depth:t-1}function s(r){return r.targetLinks.length?r.depth:r.sourceLinks.length?(0,a.jk)(r.sourceLinks,o)-1:0}function y(r){return function(){return r}}var g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"===typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function d(r,t){return L(r.source,t.source)||r.index-t.index}function k(r,t){return L(r.target,t.target)||r.index-t.index}function L(r,t){return r.partOfCycle===t.partOfCycle?r.y0-t.y0:"top"===r.circularLinkType||"bottom"===t.circularLinkType?-1:1}function p(r){return r.value}function v(r){return(r.y0+r.y1)/2}function D(r){return v(r.source)}function P(r){return v(r.target)}function E(r){return r.index}function m(r){return r.nodes}function x(r){return r.links}function T(r,t){var n=r.get(t);if(!n)throw new Error("missing: "+t);return n}function w(r,t){return t(r)}var A=25,R=10,b=.3;function I(){var r,t,n=0,u=0,i=1,o=1,l=24,f=E,s=h,w=m,I=x,M=32,Y=2,z=null;function j(){var h={nodes:w.apply(null,arguments),links:I.apply(null,arguments)};!function(r){r.nodes.forEach((function(r,t){r.index=t,r.sourceLinks=[],r.targetLinks=[]}));var t=(0,c.Tj)(r.nodes,f);r.links.forEach((function(r,n){r.index=n;var a=r.source,c=r.target;"object"!==("undefined"===typeof a?"undefined":g(a))&&(a=r.source=T(t,a)),"object"!==("undefined"===typeof c?"undefined":g(c))&&(c=r.target=T(t,c)),a.sourceLinks.push(r),c.targetLinks.push(r)}))}(h),function(r,t,n){var a=0;if(null===n){for(var c=[],u=0;u<r.links.length;u++){var i=r.links[u],o=i.source.index,l=i.target.index;c[o]||(c[o]=[]),c[l]||(c[l]=[]),-1===c[o].indexOf(l)&&c[o].push(l)}var f=e()(c);f.sort((function(r,t){return r.length-t.length}));var h={};for(u=0;u<f.length;u++){var s=f[u].slice(-2);h[s[0]]||(h[s[0]]={}),h[s[0]][s[1]]=!0}r.links.forEach((function(r){var t=r.target.index,n=r.source.index;t===n||h[n]&&h[n][t]?(r.circular=!0,r.circularLinkID=a,a+=1):r.circular=!1}))}else r.links.forEach((function(r){r.source[n]<r.target[n]?r.circular=!1:(r.circular=!0,r.circularLinkID=a,a+=1)}))}(h,0,z),function(r){r.nodes.forEach((function(r){r.partOfCycle=!1,r.value=Math.max((0,a.cz)(r.sourceLinks,p),(0,a.cz)(r.targetLinks,p)),r.sourceLinks.forEach((function(t){t.circular&&(r.partOfCycle=!0,r.circularLinkType=t.circularLinkType)})),r.targetLinks.forEach((function(t){t.circular&&(r.partOfCycle=!0,r.circularLinkType=t.circularLinkType)}))}))}(h),function(r){var t,n,a;for(t=r.nodes,n=[],a=0;t.length;++a,t=n,n=[])t.forEach((function(r){r.depth=a,r.sourceLinks.forEach((function(r){n.indexOf(r.target)<0&&!r.circular&&n.push(r.target)}))}));for(t=r.nodes,n=[],a=0;t.length;++a,t=n,n=[])t.forEach((function(r){r.height=a,r.targetLinks.forEach((function(r){n.indexOf(r.source)<0&&!r.circular&&n.push(r.source)}))}));r.nodes.forEach((function(r){r.column=Math.floor(s.call(null,r,a))}))}(h),F(h,f),function(e,f,h){var s=(0,c.$I)().key((function(r){return r.column})).sortKeys(a.V_).entries(e.nodes).map((function(r){return r.values}));d(h),E();for(var y=1,g=f;g>0;--g)k(y*=.99,h),E();function d(c){if(t){var f=1/0;s.forEach((function(r){var n=o*t/(r.length+1);f=n<f?n:f})),r=f}var h=(0,a.jk)(s,(function(t){return(o-u-(t.length-1)*r)/(0,a.cz)(t,p)}));h*=b,e.links.forEach((function(r){r.width=r.value*h}));var y=function(r){var t=0,n=0,c=0,u=0,i=(0,a.T9)(r.nodes,(function(r){return r.column}));return r.links.forEach((function(r){r.circular&&("top"==r.circularLinkType?t+=r.width:n+=r.width,0==r.target.column&&(u+=r.width),r.source.column==i&&(c+=r.width))})),{top:t=t>0?t+A+R:t,bottom:n=n>0?n+A+R:n,left:u=u>0?u+A+R:u,right:c=c>0?c+A+R:c}}(e),g=function(r,t){var c=(0,a.T9)(r.nodes,(function(r){return r.column})),e=i-n,f=o-u,h=e+t.right+t.left,s=f+t.top+t.bottom,y=e/h,g=f/s;return n=n*y+t.left,i=0==t.right?i:i*y,u=u*g+t.top,o*=g,r.nodes.forEach((function(r){r.x0=n+r.column*((i-n-l)/c),r.x1=r.x0+l})),g}(e,y);h*=g,e.links.forEach((function(r){r.width=r.value*h})),s.forEach((function(r){var t=r.length;r.forEach((function(r,n){r.depth==s.length-1&&1==t||0==r.depth&&1==t?(r.y0=o/2-r.value*h,r.y1=r.y0+r.value*h):r.partOfCycle?0==S(r,c)?(r.y0=o/2+n,r.y1=r.y0+r.value*h):"top"==r.circularLinkType?(r.y0=u+n,r.y1=r.y0+r.value*h):(r.y0=o-r.value*h-n,r.y1=r.y0+r.value*h):0==y.top||0==y.bottom?(r.y0=(o-u)/t*n,r.y1=r.y0+r.value*h):(r.y0=(o-u)/2-t/2+n,r.y1=r.y0+r.value*h)}))}))}function k(r,t){var n=s.length;s.forEach((function(c){var u=c.length,i=c[0].depth;c.forEach((function(c){var e;if(c.sourceLinks.length||c.targetLinks.length)if(c.partOfCycle&&S(c,t)>0);else if(0==i&&1==u)e=c.y1-c.y0,c.y0=o/2-e/2,c.y1=o/2+e/2;else if(i==n-1&&1==u)e=c.y1-c.y0,c.y0=o/2-e/2,c.y1=o/2+e/2;else{var l=(0,a.i2)(c.sourceLinks,P),f=(0,a.i2)(c.targetLinks,D),h=((l&&f?(l+f)/2:l||f)-v(c))*r;c.y0+=h,c.y1+=h}}))}))}function E(){s.forEach((function(t){var n,a,c,i=u,e=t.length;for(t.sort(L),c=0;c<e;++c)(a=i-(n=t[c]).y0)>0&&(n.y0+=a,n.y1+=a),i=n.y1+r;if((a=i-r-o)>0)for(i=n.y0-=a,n.y1-=a,c=e-2;c>=0;--c)(a=(n=t[c]).y1+r-i)>0&&(n.y0-=a,n.y1-=a),i=n.y0}))}}(h,M,f),C(h);for(var y=0;y<4;y++)G(h,o,f),H(h,o,f),K(h,u,o,f),G(h,o,f),H(h,o,f);return function(r,t,n){var c=r.nodes,u=r.links,i=!1,e=!1;if(u.forEach((function(r){"top"==r.circularLinkType?i=!0:"bottom"==r.circularLinkType&&(e=!0)})),0==i||0==e){var o=(0,a.jk)(c,(function(r){return r.y0})),l=(n-t)/((0,a.T9)(c,(function(r){return r.y1}))-o);c.forEach((function(r){var t=(r.y1-r.y0)*l;r.y0=(r.y0-o)*l,r.y1=r.y0+t})),u.forEach((function(r){r.y0=(r.y0-o)*l,r.y1=(r.y1-o)*l,r.width=r.width*l}))}}(h,u,o),B(h,Y,o,f),h}function C(r){r.nodes.forEach((function(r){r.sourceLinks.sort(k),r.targetLinks.sort(d)})),r.nodes.forEach((function(r){var t=r.y0,n=t,a=r.y1,c=a;r.sourceLinks.forEach((function(r){r.circular?(r.y0=a-r.width/2,a-=r.width):(r.y0=t+r.width/2,t+=r.width)})),r.targetLinks.forEach((function(r){r.circular?(r.y1=c-r.width/2,c-=r.width):(r.y1=n+r.width/2,n+=r.width)}))}))}return j.nodeId=function(r){return arguments.length?(f="function"===typeof r?r:y(r),j):f},j.nodeAlign=function(r){return arguments.length?(s="function"===typeof r?r:y(r),j):s},j.nodeWidth=function(r){return arguments.length?(l=+r,j):l},j.nodePadding=function(t){return arguments.length?(r=+t,j):r},j.nodes=function(r){return arguments.length?(w="function"===typeof r?r:y(r),j):w},j.links=function(r){return arguments.length?(I="function"===typeof r?r:y(r),j):I},j.size=function(r){return arguments.length?(n=u=0,i=+r[0],o=+r[1],j):[i-n,o-u]},j.extent=function(r){return arguments.length?(n=+r[0][0],i=+r[1][0],u=+r[0][1],o=+r[1][1],j):[[n,u],[i,o]]},j.iterations=function(r){return arguments.length?(M=+r,j):M},j.circularLinkGap=function(r){return arguments.length?(Y=+r,j):Y},j.nodePaddingRatio=function(r){return arguments.length?(t=+r,j):t},j.sortNodes=function(r){return arguments.length?(z=r,j):z},j.update=function(r){return F(r,f),C(r),r.links.forEach((function(r){r.circular&&(r.circularLinkType=r.y0+r.y1<o?"top":"bottom",r.source.circularLinkType=r.circularLinkType,r.target.circularLinkType=r.circularLinkType)})),G(r,o,f,!1),H(r,o,f),B(r,Y,o,f),r},j}function F(r,t){var n=0,a=0;r.links.forEach((function(c){c.circular&&(c.source.circularLinkType||c.target.circularLinkType?c.circularLinkType=c.source.circularLinkType?c.source.circularLinkType:c.target.circularLinkType:c.circularLinkType=n<a?"top":"bottom","top"==c.circularLinkType?n+=1:a+=1,r.nodes.forEach((function(r){w(r,t)!=w(c.source,t)&&w(r,t)!=w(c.target,t)||(r.circularLinkType=c.circularLinkType)})))})),r.links.forEach((function(r){r.circular&&(r.source.circularLinkType==r.target.circularLinkType&&(r.circularLinkType=r.source.circularLinkType),Z(r,t)&&(r.circularLinkType=r.source.circularLinkType))}))}function M(r){var t=Math.abs(r.y1-r.y0),n=Math.abs(r.target.x0-r.source.x1);return Math.atan(n/t)}function S(r,t){var n=0;r.sourceLinks.forEach((function(r){n=r.circular&&!Z(r,t)?n+1:n}));var a=0;return r.targetLinks.forEach((function(r){a=r.circular&&!Z(r,t)?a+1:a})),n+a}function Y(r){var t=r.source.sourceLinks,n=0;t.forEach((function(r){n=r.circular?n+1:n}));var a=r.target.targetLinks,c=0;return a.forEach((function(r){c=r.circular?c+1:c})),!(n>1||c>1)}function z(r,t,n){return r.sort(j),r.forEach((function(a,c){var u,i,e=0;if(Z(a,n)&&Y(a))a.circularPathData.verticalBuffer=e+a.width/2;else{for(var o=0;o<c;o++)if(u=r[c],i=r[o],!(u.source.column<i.target.column)&&!(u.target.column>i.source.column)){var l=r[o].circularPathData.verticalBuffer+r[o].width/2+t;e=l>e?l:e}a.circularPathData.verticalBuffer=e+a.width/2}})),r}function B(r,t,n,c){var i=(0,a.jk)(r.links,(function(r){return r.source.y0}));r.links.forEach((function(r){r.circular&&(r.circularPathData={})})),z(r.links.filter((function(r){return"top"==r.circularLinkType})),t,c),z(r.links.filter((function(r){return"bottom"==r.circularLinkType})),t,c),r.links.forEach((function(a){if(a.circular){if(a.circularPathData.arcRadius=a.width+R,a.circularPathData.leftNodeBuffer=5,a.circularPathData.rightNodeBuffer=5,a.circularPathData.sourceWidth=a.source.x1-a.source.x0,a.circularPathData.sourceX=a.source.x0+a.circularPathData.sourceWidth,a.circularPathData.targetX=a.target.x0,a.circularPathData.sourceY=a.y0,a.circularPathData.targetY=a.y1,Z(a,c)&&Y(a))a.circularPathData.leftSmallArcRadius=R+a.width/2,a.circularPathData.leftLargeArcRadius=R+a.width/2,a.circularPathData.rightSmallArcRadius=R+a.width/2,a.circularPathData.rightLargeArcRadius=R+a.width/2,"bottom"==a.circularLinkType?(a.circularPathData.verticalFullExtent=a.source.y1+A+a.circularPathData.verticalBuffer,a.circularPathData.verticalLeftInnerExtent=a.circularPathData.verticalFullExtent-a.circularPathData.leftLargeArcRadius,a.circularPathData.verticalRightInnerExtent=a.circularPathData.verticalFullExtent-a.circularPathData.rightLargeArcRadius):(a.circularPathData.verticalFullExtent=a.source.y0-A-a.circularPathData.verticalBuffer,a.circularPathData.verticalLeftInnerExtent=a.circularPathData.verticalFullExtent+a.circularPathData.leftLargeArcRadius,a.circularPathData.verticalRightInnerExtent=a.circularPathData.verticalFullExtent+a.circularPathData.rightLargeArcRadius);else{var e=a.source.column,o=a.circularLinkType,l=r.links.filter((function(r){return r.source.column==e&&r.circularLinkType==o}));"bottom"==a.circularLinkType?l.sort(O):l.sort(C);var f=0;l.forEach((function(r,n){r.circularLinkID==a.circularLinkID&&(a.circularPathData.leftSmallArcRadius=R+a.width/2+f,a.circularPathData.leftLargeArcRadius=R+a.width/2+n*t+f),f+=r.width})),e=a.target.column,l=r.links.filter((function(r){return r.target.column==e&&r.circularLinkType==o})),"bottom"==a.circularLinkType?l.sort(N):l.sort(X),f=0,l.forEach((function(r,n){r.circularLinkID==a.circularLinkID&&(a.circularPathData.rightSmallArcRadius=R+a.width/2+f,a.circularPathData.rightLargeArcRadius=R+a.width/2+n*t+f),f+=r.width})),"bottom"==a.circularLinkType?(a.circularPathData.verticalFullExtent=Math.max(n,a.source.y1,a.target.y1)+A+a.circularPathData.verticalBuffer,a.circularPathData.verticalLeftInnerExtent=a.circularPathData.verticalFullExtent-a.circularPathData.leftLargeArcRadius,a.circularPathData.verticalRightInnerExtent=a.circularPathData.verticalFullExtent-a.circularPathData.rightLargeArcRadius):(a.circularPathData.verticalFullExtent=i-A-a.circularPathData.verticalBuffer,a.circularPathData.verticalLeftInnerExtent=a.circularPathData.verticalFullExtent+a.circularPathData.leftLargeArcRadius,a.circularPathData.verticalRightInnerExtent=a.circularPathData.verticalFullExtent+a.circularPathData.rightLargeArcRadius)}a.circularPathData.leftInnerExtent=a.circularPathData.sourceX+a.circularPathData.leftNodeBuffer,a.circularPathData.rightInnerExtent=a.circularPathData.targetX-a.circularPathData.rightNodeBuffer,a.circularPathData.leftFullExtent=a.circularPathData.sourceX+a.circularPathData.leftLargeArcRadius+a.circularPathData.leftNodeBuffer,a.circularPathData.rightFullExtent=a.circularPathData.targetX-a.circularPathData.rightLargeArcRadius-a.circularPathData.rightNodeBuffer}if(a.circular)a.path=function(r){var t="";t="top"==r.circularLinkType?"M"+r.circularPathData.sourceX+" "+r.circularPathData.sourceY+" L"+r.circularPathData.leftInnerExtent+" "+r.circularPathData.sourceY+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftSmallArcRadius+" 0 0 0 "+r.circularPathData.leftFullExtent+" "+(r.circularPathData.sourceY-r.circularPathData.leftSmallArcRadius)+" L"+r.circularPathData.leftFullExtent+" "+r.circularPathData.verticalLeftInnerExtent+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftLargeArcRadius+" 0 0 0 "+r.circularPathData.leftInnerExtent+" "+r.circularPathData.verticalFullExtent+" L"+r.circularPathData.rightInnerExtent+" "+r.circularPathData.verticalFullExtent+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightLargeArcRadius+" 0 0 0 "+r.circularPathData.rightFullExtent+" "+r.circularPathData.verticalRightInnerExtent+" L"+r.circularPathData.rightFullExtent+" "+(r.circularPathData.targetY-r.circularPathData.rightSmallArcRadius)+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightSmallArcRadius+" 0 0 0 "+r.circularPathData.rightInnerExtent+" "+r.circularPathData.targetY+" L"+r.circularPathData.targetX+" "+r.circularPathData.targetY:"M"+r.circularPathData.sourceX+" "+r.circularPathData.sourceY+" L"+r.circularPathData.leftInnerExtent+" "+r.circularPathData.sourceY+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftSmallArcRadius+" 0 0 1 "+r.circularPathData.leftFullExtent+" "+(r.circularPathData.sourceY+r.circularPathData.leftSmallArcRadius)+" L"+r.circularPathData.leftFullExtent+" "+r.circularPathData.verticalLeftInnerExtent+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftLargeArcRadius+" 0 0 1 "+r.circularPathData.leftInnerExtent+" "+r.circularPathData.verticalFullExtent+" L"+r.circularPathData.rightInnerExtent+" "+r.circularPathData.verticalFullExtent+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightLargeArcRadius+" 0 0 1 "+r.circularPathData.rightFullExtent+" "+r.circularPathData.verticalRightInnerExtent+" L"+r.circularPathData.rightFullExtent+" "+(r.circularPathData.targetY+r.circularPathData.rightSmallArcRadius)+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightSmallArcRadius+" 0 0 1 "+r.circularPathData.rightInnerExtent+" "+r.circularPathData.targetY+" L"+r.circularPathData.targetX+" "+r.circularPathData.targetY;return t}(a);else{var h=(0,u.pq)().source((function(r){return[r.source.x0+(r.source.x1-r.source.x0),r.y0]})).target((function(r){return[r.target.x0,r.y1]}));a.path=h(a)}}))}function j(r,t){return _(r)==_(t)?"bottom"==r.circularLinkType?O(r,t):C(r,t):_(t)-_(r)}function C(r,t){return r.y0-t.y0}function O(r,t){return t.y0-r.y0}function X(r,t){return r.y1-t.y1}function N(r,t){return t.y1-r.y1}function _(r){return r.target.column-r.source.column}function W(r){return r.target.x0-r.source.x1}function q(r,t){var n=M(r),a=W(t)/Math.tan(n);return"up"==U(r)?r.y1+a:r.y1-a}function J(r,t){var n=M(r),a=W(t)/Math.tan(n);return"up"==U(r)?r.y1-a:r.y1+a}function K(r,t,n,a){r.links.forEach((function(c){if(!c.circular&&c.target.column-c.source.column>1){var u=c.source.column+1,i=c.target.column-1,e=1,o=i-u+1;for(e=1;u<=i;u++,e++)r.nodes.forEach((function(i){if(i.column==u){var l,f=e/(o+1),h=Math.pow(1-f,3),s=3*f*Math.pow(1-f,2),y=3*Math.pow(f,2)*(1-f),g=Math.pow(f,3),d=h*c.y0+s*c.y0+y*c.y1+g*c.y1,k=d-c.width/2,L=d+c.width/2;k>i.y0&&k<i.y1?(l=i.y1-k+10,l="bottom"==i.circularLinkType?l:-l,i=$(i,l,t,n),r.nodes.forEach((function(r){w(r,a)!=w(i,a)&&r.column==i.column&&V(i,r)&&$(r,l,t,n)}))):(L>i.y0&&L<i.y1||k<i.y0&&L>i.y1)&&(l=L-i.y0+10,i=$(i,l,t,n),r.nodes.forEach((function(r){w(r,a)!=w(i,a)&&r.column==i.column&&r.y0<i.y1&&r.y1>i.y1&&$(r,l,t,n)})))}}))}}))}function V(r,t){return r.y0>t.y0&&r.y0<t.y1||(r.y1>t.y0&&r.y1<t.y1||r.y0<t.y0&&r.y1>t.y1)}function $(r,t,n,a){return r.y0+t>=n&&r.y1+t<=a&&(r.y0=r.y0+t,r.y1=r.y1+t,r.targetLinks.forEach((function(r){r.y1=r.y1+t})),r.sourceLinks.forEach((function(r){r.y0=r.y0+t}))),r}function G(r,t,n,a){r.nodes.forEach((function(c){a&&c.y+(c.y1-c.y0)>t&&(c.y=c.y-(c.y+(c.y1-c.y0)-t));var u=r.links.filter((function(r){return w(r.source,n)==w(c,n)})),i=u.length;i>1&&u.sort((function(r,t){if(!r.circular&&!t.circular){if(r.target.column==t.target.column)return r.y1-t.y1;if(!Q(r,t))return r.y1-t.y1;if(r.target.column>t.target.column){var n=J(t,r);return r.y1-n}if(t.target.column>r.target.column)return J(r,t)-t.y1}return r.circular&&!t.circular?"top"==r.circularLinkType?-1:1:t.circular&&!r.circular?"top"==t.circularLinkType?1:-1:r.circular&&t.circular?r.circularLinkType===t.circularLinkType&&"top"==r.circularLinkType?r.target.column===t.target.column?r.target.y1-t.target.y1:t.target.column-r.target.column:r.circularLinkType===t.circularLinkType&&"bottom"==r.circularLinkType?r.target.column===t.target.column?t.target.y1-r.target.y1:r.target.column-t.target.column:"top"==r.circularLinkType?-1:1:void 0}));var e=c.y0;u.forEach((function(r){r.y0=e+r.width/2,e+=r.width})),u.forEach((function(r,t){if("bottom"==r.circularLinkType){for(var n=t+1,a=0;n<i;n++)a+=u[n].width;r.y0=c.y1-a-r.width/2}}))}))}function H(r,t,n){r.nodes.forEach((function(t){var a=r.links.filter((function(r){return w(r.target,n)==w(t,n)})),c=a.length;c>1&&a.sort((function(r,t){if(!r.circular&&!t.circular){if(r.source.column==t.source.column)return r.y0-t.y0;if(!Q(r,t))return r.y0-t.y0;if(t.source.column<r.source.column){var n=q(t,r);return r.y0-n}if(r.source.column<t.source.column)return q(r,t)-t.y0}return r.circular&&!t.circular?"top"==r.circularLinkType?-1:1:t.circular&&!r.circular?"top"==t.circularLinkType?1:-1:r.circular&&t.circular?r.circularLinkType===t.circularLinkType&&"top"==r.circularLinkType?r.source.column===t.source.column?r.source.y1-t.source.y1:r.source.column-t.source.column:r.circularLinkType===t.circularLinkType&&"bottom"==r.circularLinkType?r.source.column===t.source.column?r.source.y1-t.source.y1:t.source.column-r.source.column:"top"==r.circularLinkType?-1:1:void 0}));var u=t.y0;a.forEach((function(r){r.y1=u+r.width/2,u+=r.width})),a.forEach((function(r,n){if("bottom"==r.circularLinkType){for(var u=n+1,i=0;u<c;u++)i+=a[u].width;r.y1=t.y1-i-r.width/2}}))}))}function Q(r,t){return U(r)==U(t)}function U(r){return r.y0-r.y1>0?"up":"down"}function Z(r,t){return w(r.source,t)==w(r.target,t)}},76392:function(r,t,n){n.r(t),n.d(t,{sankey:function(){return E},sankeyCenter:function(){return l},sankeyJustify:function(){return o},sankeyLeft:function(){return i},sankeyLinkHorizontal:function(){return w},sankeyRight:function(){return e}});var a=n(19322),c=n(25503);function u(r){return r.target.depth}function i(r){return r.depth}function e(r,t){return t-1-r.height}function o(r,t){return r.sourceLinks.length?r.depth:t-1}function l(r){return r.targetLinks.length?r.depth:r.sourceLinks.length?(0,a.jk)(r.sourceLinks,u)-1:0}function f(r){return function(){return r}}function h(r,t){return y(r.source,t.source)||r.index-t.index}function s(r,t){return y(r.target,t.target)||r.index-t.index}function y(r,t){return r.y0-t.y0}function g(r){return r.value}function d(r){return(r.y0+r.y1)/2}function k(r){return d(r.source)*r.value}function L(r){return d(r.target)*r.value}function p(r){return r.index}function v(r){return r.nodes}function D(r){return r.links}function P(r,t){var n=r.get(t);if(!n)throw new Error("missing: "+t);return n}function E(){var r=0,t=0,n=1,u=1,i=24,e=8,l=p,E=o,m=v,x=D,T=32,w=2/3;function A(){var o={nodes:m.apply(null,arguments),links:x.apply(null,arguments)};return function(r){r.nodes.forEach((function(r,t){r.index=t,r.sourceLinks=[],r.targetLinks=[]}));var t=(0,c.Tj)(r.nodes,l);r.links.forEach((function(r,n){r.index=n;var a=r.source,c=r.target;"object"!==typeof a&&(a=r.source=P(t,a)),"object"!==typeof c&&(c=r.target=P(t,c)),a.sourceLinks.push(r),c.targetLinks.push(r)}))}(o),function(r){r.nodes.forEach((function(r){r.value=Math.max((0,a.cz)(r.sourceLinks,g),(0,a.cz)(r.targetLinks,g))}))}(o),function(t){var a,c,u;for(a=t.nodes,c=[],u=0;a.length;++u,a=c,c=[])a.forEach((function(r){r.depth=u,r.sourceLinks.forEach((function(r){c.indexOf(r.target)<0&&c.push(r.target)}))}));for(a=t.nodes,c=[],u=0;a.length;++u,a=c,c=[])a.forEach((function(r){r.height=u,r.targetLinks.forEach((function(r){c.indexOf(r.source)<0&&c.push(r.source)}))}));var e=(n-r-i)/(u-1);t.nodes.forEach((function(t){t.x1=(t.x0=r+Math.max(0,Math.min(u-1,Math.floor(E.call(null,t,u))))*e)+i}))}(o),function(r){var n=(0,c.$I)().key((function(r){return r.x0})).sortKeys(a.V_).entries(r.nodes).map((function(r){return r.values}));l(),s();for(var i=1,o=T;o>0;--o)h(i*=.99),s(),f(i),s();function l(){var c=(0,a.T9)(n,(function(r){return r.length})),i=w*(u-t)/(c-1);e>i&&(e=i);var o=(0,a.jk)(n,(function(r){return(u-t-(r.length-1)*e)/(0,a.cz)(r,g)}));n.forEach((function(r){r.forEach((function(r,t){r.y1=(r.y0=t)+r.value*o}))})),r.links.forEach((function(r){r.width=r.value*o}))}function f(r){n.forEach((function(t){t.forEach((function(t){if(t.targetLinks.length){var n=((0,a.cz)(t.targetLinks,k)/(0,a.cz)(t.targetLinks,g)-d(t))*r;t.y0+=n,t.y1+=n}}))}))}function h(r){n.slice().reverse().forEach((function(t){t.forEach((function(t){if(t.sourceLinks.length){var n=((0,a.cz)(t.sourceLinks,L)/(0,a.cz)(t.sourceLinks,g)-d(t))*r;t.y0+=n,t.y1+=n}}))}))}function s(){n.forEach((function(r){var n,a,c,i=t,o=r.length;for(r.sort(y),c=0;c<o;++c)(a=i-(n=r[c]).y0)>0&&(n.y0+=a,n.y1+=a),i=n.y1+e;if((a=i-e-u)>0)for(i=n.y0-=a,n.y1-=a,c=o-2;c>=0;--c)(a=(n=r[c]).y1+e-i)>0&&(n.y0-=a,n.y1-=a),i=n.y0}))}}(o),R(o),o}function R(r){r.nodes.forEach((function(r){r.sourceLinks.sort(s),r.targetLinks.sort(h)})),r.nodes.forEach((function(r){var t=r.y0,n=t;r.sourceLinks.forEach((function(r){r.y0=t+r.width/2,t+=r.width})),r.targetLinks.forEach((function(r){r.y1=n+r.width/2,n+=r.width}))}))}return A.update=function(r){return R(r),r},A.nodeId=function(r){return arguments.length?(l="function"===typeof r?r:f(r),A):l},A.nodeAlign=function(r){return arguments.length?(E="function"===typeof r?r:f(r),A):E},A.nodeWidth=function(r){return arguments.length?(i=+r,A):i},A.nodePadding=function(r){return arguments.length?(e=+r,A):e},A.nodes=function(r){return arguments.length?(m="function"===typeof r?r:f(r),A):m},A.links=function(r){return arguments.length?(x="function"===typeof r?r:f(r),A):x},A.size=function(a){return arguments.length?(r=t=0,n=+a[0],u=+a[1],A):[n-r,u-t]},A.extent=function(a){return arguments.length?(r=+a[0][0],n=+a[1][0],t=+a[0][1],u=+a[1][1],A):[[r,t],[n,u]]},A.iterations=function(r){return arguments.length?(T=+r,A):T},A}var m=n(81036);function x(r){return[r.source.x1,r.y0]}function T(r){return[r.target.x0,r.y1]}function w(){return(0,m.pq)().source(x).target(T)}}}]);
|