graphdb-workbench 10.0.0-M2-1 → 10.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/dist/0.f8448f998a59db17e94e.bundle.js +25 -0
- package/dist/1.46d9ecd4119bac145f3b.bundle.js +81 -0
- package/dist/10.a26ae97905866618b14e.bundle.js +7 -0
- package/dist/100.aef098a33fbb925e0d2d.bundle.js +1 -0
- package/dist/101.42eacc63e0fb5834b78a.bundle.js +1 -0
- package/dist/102.4f78eeab62aac245879e.bundle.js +1 -0
- package/dist/103.f38f3cd69ff610955aaf.bundle.js +1 -0
- package/dist/104.2e21f1462021dca17db1.bundle.js +1 -0
- package/dist/105.76381cb7984bcbc9ba9a.bundle.js +1 -0
- package/dist/106.23e14c6b280756d04533.bundle.js +1 -0
- package/dist/107.75e40619cb45972dc39f.bundle.js +1 -0
- package/dist/108.f09444e990531d27e0be.bundle.js +1 -0
- package/dist/109.ef97393181ee534042d8.bundle.js +1 -0
- package/dist/11.0fc995ac096734b915c6.bundle.js +1 -0
- package/dist/110.d59b8565d2255a282669.bundle.js +1 -0
- package/dist/111.fff9f089f65f01013923.bundle.js +1 -0
- package/dist/112.5bd3fcd7c37f1024fe26.bundle.js +1 -0
- package/dist/113.2fa29eca15d32deb3320.bundle.js +1 -0
- package/dist/114.d78615087abe68db7b2f.bundle.js +1 -0
- package/dist/115.558ce3da00d3be87d18a.bundle.js +1 -0
- package/dist/116.577aab1d9bafd0053623.bundle.js +1 -0
- package/dist/117.c20f037799328c931eba.bundle.js +1 -0
- package/dist/118.39c8b47405ab93c40847.bundle.js +1 -0
- package/dist/119.19ee7b3ae143f817c5b1.bundle.js +1 -0
- package/dist/12.7877dd6008df9acf44e1.bundle.js +1 -0
- package/dist/120.b944d5e63424d4307fc8.bundle.js +1 -0
- package/dist/121.3a8954e4c885c56a9817.bundle.js +1 -0
- package/dist/122.71a8cf0330504672fffc.bundle.js +1 -0
- package/dist/123.c6957ecb441d8a09932a.bundle.js +1 -0
- package/dist/124.27e85a0284e2ebeb7d6e.bundle.js +1 -0
- package/dist/125.9e925ae0dd1217d81d89.bundle.js +1 -0
- package/dist/126.a32b57d6108545746ed3.bundle.js +1 -0
- package/dist/127.90d1975083eef3d4a715.bundle.js +1 -0
- package/dist/128.544f1a82e19dd245c7de.bundle.js +1 -0
- package/dist/129.64ec11449e0c734500c2.bundle.js +1 -0
- package/dist/13.fe78f15334507bcc08ae.bundle.js +1 -0
- package/dist/130.f8e68ac86e17b3622d40.bundle.js +1 -0
- package/dist/131.4868fc3a837277c30273.bundle.js +1 -0
- package/dist/132.7815ab1168a254cb0d47.bundle.js +1 -0
- package/dist/133.f87e1685dd5ed920f9b5.bundle.js +1 -0
- package/dist/134.8998ff724a077ecff2ce.bundle.js +1 -0
- package/dist/135.c07268699f76ef7a02ff.bundle.js +1 -0
- package/dist/136.908f1f6fe3054f99b560.bundle.js +1 -0
- package/dist/137.8262ca9736e9818284cd.bundle.js +1 -0
- package/dist/138.8c149cad49010a65b3ca.bundle.js +1 -0
- package/dist/139.97ee12e7a3c05be03456.bundle.js +1 -0
- package/dist/14.0bb211bcdc29c6d8b3b5.bundle.js +29 -0
- package/dist/140.6b3c57ffec700081328b.bundle.js +1 -0
- package/dist/141.4981056237955a34b2e2.bundle.js +1 -0
- package/dist/142.4d60c1795eed3a9570f9.bundle.js +1 -0
- package/dist/143.b7057852f7859cf39e75.bundle.js +1 -0
- package/dist/144.3f85f8eacae521d52355.bundle.js +1 -0
- package/dist/145.9281069e9e77978b640a.bundle.js +1 -0
- package/dist/146.51d2987de4defe7df7c7.bundle.js +1 -0
- package/dist/147.54016549674d35bc2869.bundle.js +1 -0
- package/dist/148.ad95b30f508a0bd02970.bundle.js +1 -0
- package/dist/149.8dd1281617389f8c189b.bundle.js +1 -0
- package/dist/15.6a74adbd30b4d2930e10.bundle.js +1 -0
- package/dist/150.5e0ee4350f8edd0e7b9a.bundle.js +1 -0
- package/dist/151.6b81c99a1ec1b184b82d.bundle.js +1 -0
- package/dist/152.2e1aa910a68f0086825b.bundle.js +1 -0
- package/dist/153.7a64973115bdaec26406.bundle.js +1 -0
- package/dist/154.5938248b52830d0a80a2.bundle.js +1 -0
- package/dist/155.a4511849c1001c5f2ba6.bundle.js +1 -0
- package/dist/156.bbcaf52acb0cecbc6257.bundle.js +1 -0
- package/dist/157.51181d03518519f84b5e.bundle.js +1 -0
- package/dist/158.640e412f6002ee1d7341.bundle.js +1 -0
- package/dist/159.10457cbb053c1315d93a.bundle.js +1 -0
- package/dist/16.2f60fbeaccd97aefaae2.bundle.js +1 -0
- package/dist/160.c46bfdf09357a4c62a53.bundle.js +1 -0
- package/dist/{103.05b86c1b360c05133b49.bundle.js → 161.0f35ee11981f0ea0455f.bundle.js} +1 -2
- package/dist/{104.089568ff7c49a29de892.bundle.js → 162.fef28120701e7d200b01.bundle.js} +1 -2
- package/dist/{105.81b74220f7fa646e719b.bundle.js → 163.38565d40ac5f71d1c875.bundle.js} +1 -2
- package/dist/164.b2116f472aa847618aee.bundle.js +1 -0
- package/dist/168.2d4b5a75da5430c73efc.bundle.js +1 -0
- package/dist/169.6897f56896e3664e8b53.bundle.js +1 -0
- package/dist/17.2bff7856b13fd72e2db4.bundle.js +1 -0
- package/dist/170.d5c0d475c5b6ad84ef77.bundle.js +1 -0
- package/dist/171.60cdc91b2bf682a20911.bundle.js +1 -0
- package/dist/172.1fb9ead3e508a7cfa5f3.bundle.js +1 -0
- package/dist/173.95602c81a2692624a015.bundle.js +1 -0
- package/dist/174.aac1982e67b5ca1731c1.bundle.js +1 -0
- package/dist/175.5e49a28397900168f816.bundle.js +1 -0
- package/dist/176.2e6d1a9f4eac4fdd8422.bundle.js +1 -0
- package/dist/177.3b6aabf3c4db8519ea74.bundle.js +1 -0
- package/dist/178.e10370553beb5c6bb839.bundle.js +1 -0
- package/dist/179.784cbd536b8e636c1272.bundle.js +1 -0
- package/dist/18.d6be3e6583bf3dacd54f.bundle.js +2 -0
- package/dist/180.d37db50f3ce1b3a04a65.bundle.js +1 -0
- package/dist/181.f307cabdc4ed7a10ff64.bundle.js +1 -0
- package/dist/182.e8fe148e90fcd334b9b9.bundle.js +1 -0
- package/dist/183.a086e00d4dc3c7855611.bundle.js +1 -0
- package/dist/184.ff8a39692d0ff666c9e6.bundle.js +1 -0
- package/dist/185.8b9f0b866e848f8a1aac.bundle.js +1 -0
- package/dist/186.798880846274da7033da.bundle.js +1 -0
- package/dist/{120.3b0b67fbfa81ec95e044.bundle.js → 187.eb92a35d38294bc21703.bundle.js} +1 -2
- package/dist/{121.ff452d05188836228deb.bundle.js → 188.641582484af80415d29a.bundle.js} +1 -2
- package/dist/189.7ccbb0ef67513ae7001a.bundle.js +1 -0
- package/dist/19.c2a5c3e7a49a4acba486.bundle.js +2 -0
- package/dist/{123.289bb9a87ce416004c0a.bundle.js → 190.a3609218c5d8e873a46f.bundle.js} +1 -2
- package/dist/191.4c817606bf66c16d9ad1.bundle.js +1 -0
- package/dist/{125.51ff26fe7687752811e4.bundle.js → 192.21f366a1ea7e6905f120.bundle.js} +1 -2
- package/dist/193.4d40b788bd7ddcf16788.bundle.js +1 -0
- package/dist/{127.4d0a2164fb95df43ea22.bundle.js → 194.0170093f1daf20e82b5f.bundle.js} +1 -2
- package/dist/{128.c7a3530622ede2f34e72.bundle.js → 195.d7d8af61458f9416878f.bundle.js} +1 -2
- package/dist/{129.2d32313059ae96dba010.bundle.js → 196.6e6b7589cd1342a0b2b5.bundle.js} +1 -2
- package/dist/{130.7302112cf14a10bd1306.bundle.js → 197.c071fa1fe9e081a3b053.bundle.js} +1 -2
- package/dist/{131.eb262b5100305bdc23ee.bundle.js → 198.3c5ca9ac5a745b4b23a1.bundle.js} +1 -2
- package/dist/199.00ac5221a334189ea09a.bundle.js +1 -0
- package/dist/2.78b4e53269171c9c08a5.bundle.js +1 -0
- package/dist/20.8fd969e3860ddffedcc3.bundle.js +1 -0
- package/dist/{133.f855496341ba657eb673.bundle.js → 200.aa3f4dcf9cf98409dbf5.bundle.js} +1 -2
- package/dist/201.a1b147e78f43a3bc99c3.bundle.js +1 -0
- package/dist/202.20e71b18f57e7d234ff0.bundle.js +1 -0
- package/dist/{136.74f131c98a163b48e3df.bundle.js → 203.0219c2ba2d4fe4881af2.bundle.js} +1 -2
- package/dist/204.cc169603e18b84e7e65b.bundle.js +1 -0
- package/dist/{138.9111fe731587313e4574.bundle.js → 205.99fb3c89cd9b9183ddbf.bundle.js} +1 -2
- package/dist/206.43b04d2170165e13353c.bundle.js +1 -0
- package/dist/207.798c195e1d7d3f301131.bundle.js +1 -0
- package/dist/208.34f042066a757f4fd8c0.bundle.js +1 -0
- package/dist/{142.5ced0a8e7a08aea7988f.bundle.js → 209.288844c6a42ff4d5685a.bundle.js} +1 -2
- package/dist/21.c981976c6528073c0a2f.bundle.js +1 -0
- package/dist/210.1ac38e393ca959703d4b.bundle.js +1 -0
- package/dist/211.d2721b9785e609e2f817.bundle.js +1 -0
- package/dist/212.b6b19c939f21132b451c.bundle.js +1 -0
- package/dist/213.5a5116f764e6357e53ab.bundle.js +1 -0
- package/dist/{147.f6bd445276a200981cff.bundle.js → 214.a2640be51c42d820bb83.bundle.js} +1 -2
- package/dist/215.209396a71f130477e2b3.bundle.js +1 -0
- package/dist/216.16e2e982acc750b4045a.bundle.js +1 -0
- package/dist/217.8540eb1d1a0946e72dbf.bundle.js +1 -0
- package/dist/218.ef33580c82d20f39f75f.bundle.js +1 -0
- package/dist/219.1652bc940cdd0088dc18.bundle.js +1 -0
- package/dist/22.9d339503774f4f6c0a8b.bundle.js +1 -0
- package/dist/{153.ebc378a7a60222b69484.bundle.js → 220.f8f9c348b1fc0cc72bd6.bundle.js} +1 -2
- package/dist/221.b18a92f0ba880edaebbf.bundle.js +1 -0
- package/dist/222.a52ebecd1d5201437ebe.bundle.js +1 -0
- package/dist/23.87ca8226d464e3699b8e.bundle.js +3 -0
- package/dist/24.9076b75f45ce0579f7be.bundle.js +1 -0
- package/dist/25.073791b8dd02c5b31183.bundle.js +1 -0
- package/dist/26.6e06be7172a866ad45f9.bundle.js +2 -0
- package/dist/27.5152c2a1f3b1369e21b0.bundle.js +1 -0
- package/dist/28.90b784e728e3d5e4c6aa.bundle.js +1 -0
- package/dist/29.e2309b858706718f1732.bundle.js +1 -0
- package/dist/3.cf89087c137e759ecd19.bundle.js +27 -0
- package/dist/30.32fb84930c42bae43a74.bundle.js +1 -0
- package/dist/31.31b7b4bd073b82c09fda.bundle.js +1 -0
- package/dist/32.6725d94946764db833b8.bundle.js +1 -0
- package/dist/33.fa9f0e662060f2e97267.bundle.js +1 -0
- package/dist/34.af22bc6d5ed2bcb72a09.bundle.js +1 -0
- package/dist/35.e601e19e63c6ddaf2484.bundle.js +1 -0
- package/dist/36.df47a70d8efbf1cd033b.bundle.js +1 -0
- package/dist/37.085cdb373f74d55eee07.bundle.js +2 -0
- package/dist/38.fc172c7b0d24ab0f8a35.bundle.js +1 -0
- package/dist/39.5ca9fa51ec3c63459317.bundle.js +1 -0
- package/dist/4.851f9ade6202116ecfb9.bundle.js +1 -0
- package/dist/40.309ec5212fd53fe696bb.bundle.js +1 -0
- package/dist/41.3870740f1d24570cb415.bundle.js +1 -0
- package/dist/42.b926c2c8620df5c7ed6d.bundle.js +1 -0
- package/dist/43.d4551e1f6cac0a1a77e5.bundle.js +1 -0
- package/dist/44.46c9e2d54a9f07d78368.bundle.js +1 -0
- package/dist/45.a916daee1f0c6873c890.bundle.js +1 -0
- package/dist/46.4f57238bd032edc81d6d.bundle.js +1 -0
- package/dist/47.4fbfdaa63628c501a30c.bundle.js +1 -0
- package/dist/48.3fbd50adcb0c7dd7ec60.bundle.js +1 -0
- package/dist/49.0707795b3b6e40387da8.bundle.js +1 -0
- package/dist/5.7cfbc07050f137932ffe.bundle.js +1 -0
- package/dist/50.8f6cc698b42c96f2b41f.bundle.js +1 -0
- package/dist/51.514a339efd6cd11db0f8.bundle.js +1 -0
- package/dist/52.410a7d8b4cb433fb24ca.bundle.js +1 -0
- package/dist/53.174d18435f7bf3bf05a0.bundle.js +1 -0
- package/dist/54.7cb3bd3ae8055e350629.bundle.js +1 -0
- package/dist/55.f0762e755ba58cbaac26.bundle.js +1 -0
- package/dist/56.3b0312e77f8607a4d957.bundle.js +1 -0
- package/dist/57.dfb7a710da8ca09c725b.bundle.js +1 -0
- package/dist/58.ac0fa95bbbe4b2dfb0fc.bundle.js +1 -0
- package/dist/59.273ffcd48e856d2752ff.bundle.js +1 -0
- package/dist/6.c5eea752e1f541f494e8.bundle.js +1 -0
- package/dist/60.00a29320ea162becd718.bundle.js +1 -0
- package/dist/61.3794de8b6d022738bafa.bundle.js +1 -0
- package/dist/62.cf39ad55adb1616560ec.bundle.js +1 -0
- package/dist/63.8880f667c958d12b338b.bundle.js +1 -0
- package/dist/64.fdd90fedc8a5dc3cacaf.bundle.js +1 -0
- package/dist/65.cdc961a8042c385c49c6.bundle.js +1 -0
- package/dist/66.c3b906de2fcf69089b7b.bundle.js +1 -0
- package/dist/67.9c851e5930459a5f5903.bundle.js +1 -0
- package/dist/68.05bba948c414a1e21c8f.bundle.js +1 -0
- package/dist/69.c5561c83fe410ea9a908.bundle.js +1 -0
- package/dist/7.14f008aaac190939acd3.bundle.js +7 -0
- package/dist/70.f2557c225be5923bab24.bundle.js +1 -0
- package/dist/71.e9c3c5ccc70f443c97cf.bundle.js +1 -0
- package/dist/72.0780a8424293909f94a4.bundle.js +1 -0
- package/dist/73.57e88cee0af3f67aee77.bundle.js +1 -0
- package/dist/74.48e90caf0b5ecd351f1d.bundle.js +1 -0
- package/dist/75.c75a824264d0e67421ed.bundle.js +1 -0
- package/dist/76.2ad0f5373462bc70bebf.bundle.js +1 -0
- package/dist/77.303a075d21928354102c.bundle.js +1 -0
- package/dist/78.66f3e9630550f20287ff.bundle.js +1 -0
- package/dist/79.29d39a29721f936ae688.bundle.js +1 -0
- package/dist/8.b5e29f80f8a5766d70d5.bundle.js +2 -0
- package/dist/80.8af0388db859fcc9fbf3.bundle.js +1 -0
- package/dist/{47.686e599732ae6f41120c.bundle.js → 81.2ff1f5047ab4e0591585.bundle.js} +1 -2
- package/dist/82.27bb51dfeb4898504e96.bundle.js +1 -0
- package/dist/83.a59d34bc50cf323af43d.bundle.js +1 -0
- package/dist/84.a4ee7bb5d3ed2e6ead5e.bundle.js +1 -0
- package/dist/{51.895a3dacdc3a8eaee275.bundle.js → 85.1f1b07562fbf97ab3e11.bundle.js} +1 -2
- package/dist/86.637667a4555ae621aff0.bundle.js +1 -0
- package/dist/87.b76338a62297ad83960b.bundle.js +1 -0
- package/dist/88.532e7295b49b1071d45c.bundle.js +1 -0
- package/dist/89.90bb1cf65f183ecce47c.bundle.js +1 -0
- package/dist/9.610b595b60a0fc51466a.bundle.js +1 -0
- package/dist/90.683c4d5b142356f274ef.bundle.js +1 -0
- package/dist/{56.91947e80d8e04223ac58.bundle.js → 91.2437dfc2ea1bc89f53f3.bundle.js} +1 -2
- package/dist/92.a12cfd3b602e98b344de.bundle.js +1 -0
- package/dist/93.a5cb6192d32cb016bb60.bundle.js +1 -0
- package/dist/94.f6a3e7628449796419b6.bundle.js +1 -0
- package/dist/95.15f0e472c49c81a68c3a.bundle.js +1 -0
- package/dist/96.2bf3b75fb0efb6b9e7e8.bundle.js +1 -0
- package/dist/97.bd1988af419f7373b569.bundle.js +1 -0
- package/dist/98.060c6842b3a8ed94dd20.bundle.js +1 -0
- package/dist/{64.ac922cb38c3ff6c431fb.bundle.js → 99.6360b70da56083cd76fe.bundle.js} +1 -2
- package/dist/bundle.39b836d40f0926aeec16.bundle.js +91 -0
- package/dist/css/aclmanagement.css +114 -0
- package/dist/css/angular-tooltips.css +144 -0
- package/dist/css/autocomplete-select.css +62 -0
- package/dist/css/backup-and-restore.css +7 -0
- package/dist/css/bootstrap-graphdb-theme-dark-auto.css +36 -0
- package/dist/css/bootstrap-graphdb-theme.css +514 -252
- package/dist/css/clustermanagement.css +145 -266
- package/dist/css/common.css +105 -0
- package/dist/css/dependencies.css +4 -4
- package/dist/css/domain-range-graph.css +3 -3
- package/dist/css/explore.css +7 -1
- package/dist/css/export.css +13 -9
- package/dist/css/find.css +2 -3
- package/dist/css/fonts/icons.eot +0 -0
- package/dist/css/fonts/icons.svg +14 -5
- package/dist/css/fonts/icons.ttf +0 -0
- package/dist/css/fonts/icons.woff +0 -0
- package/dist/css/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-600.woff +0 -0
- package/dist/css/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-600.woff2 +0 -0
- package/dist/css/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-600italic.woff +0 -0
- package/dist/css/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-600italic.woff2 +0 -0
- package/dist/css/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-italic.woff +0 -0
- package/dist/css/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-italic.woff2 +0 -0
- package/dist/css/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff +0 -0
- package/dist/css/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff2 +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300.woff +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300.woff2 +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300italic.woff +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300italic.woff2 +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff2 +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woff +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woff2 +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff2 +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff +0 -0
- package/dist/css/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2 +0 -0
- package/dist/css/graphs-config.css +4 -4
- package/dist/css/graphs-vizualizations.css +11 -10
- package/dist/css/guides.css +9 -0
- package/dist/css/jmx.css +22 -0
- package/dist/css/lib/angular-xeditable/xeditable.min.css +2 -2
- package/dist/css/new-sparql.css +68 -2
- package/dist/css/operations-statuses-monitor.css +111 -0
- package/dist/css/plugins.css +7 -18
- package/dist/css/rdf-class-hierarchy-labels.css +2 -2
- package/dist/css/rdf-class-hierarchy.css +3 -3
- package/dist/css/rdf-details-side-panel.css +8 -1
- package/dist/css/rdf-resource-search.css +5 -2
- package/dist/css/repositories.css +73 -31
- package/dist/css/repository.create.css +14 -4
- package/dist/css/shepherd-custom.css +80 -0
- package/dist/css/workbench-custom.css +54 -14
- package/dist/css/yasr.custom.css +28 -6
- package/dist/font/{icons.f404525bf0491c43fc1c35fc43fe14d8.eot → icons.23e96f215ba03e98233de883d2c30b60.eot} +0 -0
- package/dist/i18n/locale-en.json +488 -129
- package/dist/i18n/locale-fr.json +602 -261
- package/dist/icon.png +0 -0
- package/dist/img/{graphdb-logo-sq.75ddb875d9a986a6ac944450ae134725.svg → graphdb-logo-sq.3a5fb4b3f1e0e248dc308da1bf4de9f8.svg} +4 -4
- package/dist/img/{graphdb-logo.cb18d544b9cf2eb6062daa81bdb1f850.svg → graphdb-logo.741abf3e3881e1566e4504c9f00b91c0.svg} +3 -4
- package/dist/img/{graphdb-small.635110bdf15de2ad589b6e3fdaa75887.svg → graphdb-small.5f94ee13e65870be1db31bb89e6deded.svg} +6 -6
- package/dist/img/graphdb-splash.1ef2940889acddc03c7defb3f9f41f8d.svg +1 -0
- package/dist/img/{icons.2271b2cdd5a3d1037d80bf831f4918cc.svg → icons.ab6168834b8775f511d09c8fad540b27.svg} +14 -5
- package/dist/index.html +87 -85
- package/dist/js/angular/autocomplete/templates/modal/add-label.html +9 -8
- package/dist/js/angular/chatgpt/templates/chat.html +113 -0
- package/dist/js/angular/chatgpt/templates/chatInfo.html +11 -0
- package/dist/js/angular/chatgpt/templates/modal/settings.html +61 -0
- package/dist/js/angular/clustermanagement/templates/modal/add-nodes-dialog.html +67 -0
- package/dist/js/angular/clustermanagement/templates/modal/cluster-create-dialog.html +173 -0
- package/dist/js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html +9 -14
- package/dist/js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html +118 -0
- package/dist/js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html +39 -0
- package/dist/js/angular/clustermanagement/templates/modal/replace-nodes-dialog.html +86 -0
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +18 -0
- package/dist/js/angular/core/directives/languageselector/templates/languageSelector.html +9 -7
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +57 -0
- package/dist/js/angular/core/directives/queryeditor/templates/query-editor.html +44 -56
- package/dist/js/angular/core/directives/queryeditor/templates/query-sample.html +11 -11
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +4 -6
- package/dist/js/angular/core/templates/core-errors.html +27 -18
- package/dist/js/angular/core/templates/inactive-plugin-warning-page.html +1 -2
- package/dist/js/angular/core/templates/modal/copy-to-clipboard-modal.html +9 -10
- package/dist/js/angular/core/templates/modal/modal-warning.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +9 -9
- package/dist/js/angular/externalsync/templates/deleteConnector.html +5 -5
- package/dist/js/angular/graphexplore/templates/modal/save-graph.html +10 -11
- package/dist/js/angular/graphexplore/templates/rdfsCommentLabelTemplate.html +4 -6
- package/dist/js/angular/graphexplore/templates/searchIconInputTemplate.html +5 -7
- package/dist/js/angular/import/templates/filesTable.html +15 -15
- package/dist/js/angular/import/templates/settingsModal.html +231 -231
- package/dist/js/angular/import/templates/textSnippet.html +4 -4
- package/dist/js/angular/import/templates/urlImport.html +7 -5
- package/dist/js/angular/repositories/templates/fedx-repo.html +53 -49
- package/dist/js/angular/repositories/templates/ontop-repo.html +191 -60
- package/dist/js/angular/security/templates/modal/default-authorities.html +12 -12
- package/dist/js/angular/security/templates/user.html +102 -41
- package/dist/js/angular/security/templates/users.html +24 -17
- package/dist/js/angular/settings/modal/location-settings.html +17 -18
- package/dist/js/angular/settings/modal/validate-license.html +19 -6
- package/dist/js/angular/templates/graphdb-small.svg +6 -6
- package/dist/js/angular/templates/modal/add-fedx-remote-repo.html +17 -15
- package/dist/js/angular/templates/modal/add-location.html +18 -22
- package/dist/js/angular/templates/modal/edit-location.html +11 -11
- package/dist/js/angular/templates/modal/editRepoFile.html +2 -2
- package/dist/js/angular/templates/modal/upload-repository-config.html +2 -2
- package/dist/js/angular/templates/repositorySize.html +7 -1
- package/dist/js/lib/angucomplete-alt/angucomplete-alt.css +2 -2
- package/dist/js/lib/rzslider/rzslider.min.css +1 -1
- package/dist/license-checker-static.json +128 -0
- package/dist/license-checker.json +872 -0
- package/dist/main.3ac2b4b19f56209c6467.css +1 -0
- package/dist/main.948c3b96766ce09e145b.bundle.js +1 -0
- package/dist/pages/aclmanagement.html +177 -0
- package/dist/pages/autocomplete.html +16 -12
- package/dist/pages/choose-repository-type.html +8 -8
- package/dist/pages/cluster-management/clusterInfo.html +160 -138
- package/dist/pages/connectorsInfo.html +23 -18
- package/dist/pages/create-index.html +18 -18
- package/dist/pages/createConnector.html +137 -137
- package/dist/pages/dependencies.html +23 -31
- package/dist/pages/domainRangeInfo.html +16 -19
- package/dist/pages/edit.html +15 -15
- package/dist/pages/explore.html +22 -25
- package/dist/pages/export.html +38 -39
- package/dist/pages/find.html +3 -3
- package/dist/pages/graph-config/saveGraphConfig.html +43 -43
- package/dist/pages/graphs-visualizations.html +71 -78
- package/dist/pages/guides.html +60 -0
- package/dist/pages/home.html +46 -28
- package/dist/pages/import.html +11 -10
- package/dist/pages/info.html +18 -18
- package/dist/pages/jdbc-create.html +48 -46
- package/dist/pages/jdbc.html +4 -4
- package/dist/pages/licenseInfo.html +66 -48
- package/dist/pages/login.html +5 -6
- package/dist/pages/monitor/backup-and-restore.html +80 -0
- package/dist/pages/monitor/queries.html +7 -8
- package/dist/pages/monitor/resources.html +213 -79
- package/dist/pages/namespaces.html +22 -21
- package/dist/pages/plugins.html +9 -10
- package/dist/pages/rdfClassHierarchyInfo.html +31 -35
- package/dist/pages/rdfrank.html +25 -27
- package/dist/pages/registerLicenseInfo.html +10 -12
- package/dist/pages/repositories.html +170 -193
- package/dist/pages/repository.html +124 -58
- package/dist/pages/similarity-indexes.html +18 -18
- package/dist/pages/sparql-template-create.html +30 -29
- package/dist/pages/sparql-templates.html +4 -4
- package/dist/pages/sparql.html +11 -11
- package/dist/pages/ux-test1.html +102 -0
- package/dist/pages/ux-test2.html +17 -0
- package/dist/pages/webapi.html +4 -4
- package/dist/plugin-registry.js +14 -0
- package/dist/plugins.js +1967 -84
- package/dist/res/sparql/keyboard-shortcuts.html +7 -1
- package/dist/res/swagger/css/onto-theme.css +8 -0
- package/dist/res/swagger/css/reset.css +1 -2
- package/dist/res/swagger/css/screen.css +6 -15
- package/dist/res/swagger/fonts/icons.woff +0 -0
- package/dist/res/swagger/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-600.woff +0 -0
- package/dist/res/swagger/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-600.woff2 +0 -0
- package/dist/res/swagger/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-600italic.woff +0 -0
- package/dist/res/swagger/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-600italic.woff2 +0 -0
- package/dist/res/swagger/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-italic.woff +0 -0
- package/dist/res/swagger/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-italic.woff2 +0 -0
- package/dist/res/swagger/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff +0 -0
- package/dist/res/swagger/fonts/jetbrains-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff2 +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300.woff +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300.woff2 +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300italic.woff +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300italic.woff2 +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff2 +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woff +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woff2 +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff2 +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff +0 -0
- package/dist/res/swagger/fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2 +0 -0
- package/dist/res/swagger/fonts/rubik-italic.woff +0 -0
- package/dist/res/swagger/fonts/rubik-italic.woff2 +0 -0
- package/dist/res/swagger/fonts/rubik-light.woff +0 -0
- package/dist/res/swagger/fonts/rubik-light.woff2 +0 -0
- package/dist/res/swagger/fonts/rubik-lightitalic.woff +0 -0
- package/dist/res/swagger/fonts/rubik-lightitalic.woff2 +0 -0
- package/dist/res/swagger/fonts/rubik-medium.woff +0 -0
- package/dist/res/swagger/fonts/rubik-medium.woff2 +0 -0
- package/dist/res/swagger/fonts/rubik-mediumitalic.woff +0 -0
- package/dist/res/swagger/fonts/rubik-mediumitalic.woff2 +0 -0
- package/dist/res/swagger/fonts/rubik-regular.woff +0 -0
- package/dist/res/swagger/fonts/rubik-regular.woff2 +0 -0
- package/dist/res/swagger/index.html +27 -25
- package/dist/vendor.7b6ede99ef82acd3dcf5.bundle.js +27 -0
- package/dist/{vendor.4ba46e62f4d43dab5e82.css → vendor.d1c629ceaacea40a5f4a.css} +1 -1
- package/package.json +13 -9
- package/dist/0.32d0f91ca9c8d09fb6f1.bundle.js +0 -82
- package/dist/0.32d0f91ca9c8d09fb6f1.bundle.js.map +0 -1
- package/dist/1.6300131e72a9f28f9df3.bundle.js +0 -27
- package/dist/1.6300131e72a9f28f9df3.bundle.js.map +0 -1
- package/dist/10.bb0713b18c3e55445fa7.bundle.js +0 -2
- package/dist/10.bb0713b18c3e55445fa7.bundle.js.map +0 -1
- package/dist/100.acbece8e389effbcfa2e.bundle.js +0 -2
- package/dist/100.acbece8e389effbcfa2e.bundle.js.map +0 -1
- package/dist/101.abc28aeafc8c037b80dc.bundle.js +0 -2
- package/dist/101.abc28aeafc8c037b80dc.bundle.js.map +0 -1
- package/dist/102.236df15ec49946c8799a.bundle.js +0 -2
- package/dist/102.236df15ec49946c8799a.bundle.js.map +0 -1
- package/dist/103.05b86c1b360c05133b49.bundle.js.map +0 -1
- package/dist/104.089568ff7c49a29de892.bundle.js.map +0 -1
- package/dist/105.81b74220f7fa646e719b.bundle.js.map +0 -1
- package/dist/106.5de7943f8a3adda97372.bundle.js +0 -2
- package/dist/106.5de7943f8a3adda97372.bundle.js.map +0 -1
- package/dist/11.288d37db1902f00f7c8e.bundle.js +0 -2
- package/dist/11.288d37db1902f00f7c8e.bundle.js.map +0 -1
- package/dist/110.5a553b21d45a64e7e321.bundle.js +0 -2
- package/dist/110.5a553b21d45a64e7e321.bundle.js.map +0 -1
- package/dist/111.04e34833a2c4fc227899.bundle.js +0 -2
- package/dist/111.04e34833a2c4fc227899.bundle.js.map +0 -1
- package/dist/112.b2bdfd64c50509d05503.bundle.js +0 -2
- package/dist/112.b2bdfd64c50509d05503.bundle.js.map +0 -1
- package/dist/113.b386b036c2a3d9077f64.bundle.js +0 -2
- package/dist/113.b386b036c2a3d9077f64.bundle.js.map +0 -1
- package/dist/114.0768e042a8e6ec856942.bundle.js +0 -2
- package/dist/114.0768e042a8e6ec856942.bundle.js.map +0 -1
- package/dist/115.374b221f284e8755ef31.bundle.js +0 -2
- package/dist/115.374b221f284e8755ef31.bundle.js.map +0 -1
- package/dist/116.ca9d40889c222f47c45f.bundle.js +0 -2
- package/dist/116.ca9d40889c222f47c45f.bundle.js.map +0 -1
- package/dist/117.92f7630bfb95444a87e8.bundle.js +0 -2
- package/dist/117.92f7630bfb95444a87e8.bundle.js.map +0 -1
- package/dist/118.7e28dcfd80b93a705d71.bundle.js +0 -2
- package/dist/118.7e28dcfd80b93a705d71.bundle.js.map +0 -1
- package/dist/119.e3a038ffb960ed3661fe.bundle.js +0 -2
- package/dist/119.e3a038ffb960ed3661fe.bundle.js.map +0 -1
- package/dist/12.9004ab127289745129a4.bundle.js +0 -4
- package/dist/12.9004ab127289745129a4.bundle.js.map +0 -1
- package/dist/120.3b0b67fbfa81ec95e044.bundle.js.map +0 -1
- package/dist/121.ff452d05188836228deb.bundle.js.map +0 -1
- package/dist/122.1b8056c745358fa2f6cb.bundle.js +0 -2
- package/dist/122.1b8056c745358fa2f6cb.bundle.js.map +0 -1
- package/dist/123.289bb9a87ce416004c0a.bundle.js.map +0 -1
- package/dist/124.75965fcb93d0fe988609.bundle.js +0 -2
- package/dist/124.75965fcb93d0fe988609.bundle.js.map +0 -1
- package/dist/125.51ff26fe7687752811e4.bundle.js.map +0 -1
- package/dist/126.b89a0728154793be4eb9.bundle.js +0 -2
- package/dist/126.b89a0728154793be4eb9.bundle.js.map +0 -1
- package/dist/127.4d0a2164fb95df43ea22.bundle.js.map +0 -1
- package/dist/128.c7a3530622ede2f34e72.bundle.js.map +0 -1
- package/dist/129.2d32313059ae96dba010.bundle.js.map +0 -1
- package/dist/13.897f9af290de9fbd43bb.bundle.js +0 -16
- package/dist/13.897f9af290de9fbd43bb.bundle.js.map +0 -1
- package/dist/130.7302112cf14a10bd1306.bundle.js.map +0 -1
- package/dist/131.eb262b5100305bdc23ee.bundle.js.map +0 -1
- package/dist/132.264b9ebf860e308417ad.bundle.js +0 -2
- package/dist/132.264b9ebf860e308417ad.bundle.js.map +0 -1
- package/dist/133.f855496341ba657eb673.bundle.js.map +0 -1
- package/dist/134.91de2ab11c49967200ad.bundle.js +0 -2
- package/dist/134.91de2ab11c49967200ad.bundle.js.map +0 -1
- package/dist/135.82e48e81e60b2ab89e04.bundle.js +0 -2
- package/dist/135.82e48e81e60b2ab89e04.bundle.js.map +0 -1
- package/dist/136.74f131c98a163b48e3df.bundle.js.map +0 -1
- package/dist/137.89253235e0e48f86534b.bundle.js +0 -2
- package/dist/137.89253235e0e48f86534b.bundle.js.map +0 -1
- package/dist/138.9111fe731587313e4574.bundle.js.map +0 -1
- package/dist/139.642cab70149cdfc8c034.bundle.js +0 -2
- package/dist/139.642cab70149cdfc8c034.bundle.js.map +0 -1
- package/dist/14.3c22be70e13b5347940a.bundle.js +0 -3
- package/dist/14.3c22be70e13b5347940a.bundle.js.map +0 -1
- package/dist/140.8fcbd3b16a54b9ca5d80.bundle.js +0 -2
- package/dist/140.8fcbd3b16a54b9ca5d80.bundle.js.map +0 -1
- package/dist/141.09939d5f25d69d9e1bdd.bundle.js +0 -2
- package/dist/141.09939d5f25d69d9e1bdd.bundle.js.map +0 -1
- package/dist/142.5ced0a8e7a08aea7988f.bundle.js.map +0 -1
- package/dist/143.1bd6e2941d5c9fdc9e77.bundle.js +0 -2
- package/dist/143.1bd6e2941d5c9fdc9e77.bundle.js.map +0 -1
- package/dist/144.34dd1b710f93da283e39.bundle.js +0 -2
- package/dist/144.34dd1b710f93da283e39.bundle.js.map +0 -1
- package/dist/145.832e90a54396296da91b.bundle.js +0 -2
- package/dist/145.832e90a54396296da91b.bundle.js.map +0 -1
- package/dist/146.a4ab1f2f5177d9e27861.bundle.js +0 -2
- package/dist/146.a4ab1f2f5177d9e27861.bundle.js.map +0 -1
- package/dist/147.f6bd445276a200981cff.bundle.js.map +0 -1
- package/dist/148.1c23268b87514b7220b3.bundle.js +0 -2
- package/dist/148.1c23268b87514b7220b3.bundle.js.map +0 -1
- package/dist/149.82fc16905f1377c6610a.bundle.js +0 -2
- package/dist/149.82fc16905f1377c6610a.bundle.js.map +0 -1
- package/dist/15.ba4fe6f57951d2f73adc.bundle.js +0 -2
- package/dist/15.ba4fe6f57951d2f73adc.bundle.js.map +0 -1
- package/dist/150.6d8e3bb0cbc5774322d9.bundle.js +0 -2
- package/dist/150.6d8e3bb0cbc5774322d9.bundle.js.map +0 -1
- package/dist/151.c752cbb4d5f9299df813.bundle.js +0 -2
- package/dist/151.c752cbb4d5f9299df813.bundle.js.map +0 -1
- package/dist/152.78d7840c4b8f93748bfe.bundle.js +0 -2
- package/dist/152.78d7840c4b8f93748bfe.bundle.js.map +0 -1
- package/dist/153.ebc378a7a60222b69484.bundle.js.map +0 -1
- package/dist/154.4452ad65074e44967389.bundle.js +0 -2
- package/dist/154.4452ad65074e44967389.bundle.js.map +0 -1
- package/dist/155.12819130f26753e109ad.bundle.js +0 -2
- package/dist/155.12819130f26753e109ad.bundle.js.map +0 -1
- package/dist/16.a236b38d63123b1a3c61.bundle.js +0 -4
- package/dist/16.a236b38d63123b1a3c61.bundle.js.map +0 -1
- package/dist/17.d8d59fa7fbb3b422fdf8.bundle.js +0 -2
- package/dist/17.d8d59fa7fbb3b422fdf8.bundle.js.map +0 -1
- package/dist/18.bc2da9ff57be136ef082.bundle.js +0 -2
- package/dist/18.bc2da9ff57be136ef082.bundle.js.map +0 -1
- package/dist/19.19811699b6e54f19f71e.bundle.js +0 -3
- package/dist/19.19811699b6e54f19f71e.bundle.js.map +0 -1
- package/dist/2.fb2f97f5c543a24296f6.bundle.js +0 -2
- package/dist/2.fb2f97f5c543a24296f6.bundle.js.map +0 -1
- package/dist/20.df3652981fc73c6a8b8c.bundle.js +0 -2
- package/dist/20.df3652981fc73c6a8b8c.bundle.js.map +0 -1
- package/dist/21.b7fbdf3c3b22b578928c.bundle.js +0 -2
- package/dist/21.b7fbdf3c3b22b578928c.bundle.js.map +0 -1
- package/dist/22.2da0e8ec2ac2048ecd60.bundle.js +0 -3
- package/dist/22.2da0e8ec2ac2048ecd60.bundle.js.map +0 -1
- package/dist/23.4140c4c20347efc963a4.bundle.js +0 -2
- package/dist/23.4140c4c20347efc963a4.bundle.js.map +0 -1
- package/dist/24.219ce55f8f6a5bd02dad.bundle.js +0 -2
- package/dist/24.219ce55f8f6a5bd02dad.bundle.js.map +0 -1
- package/dist/25.e79de2370b1ee4072e19.bundle.js +0 -2
- package/dist/25.e79de2370b1ee4072e19.bundle.js.map +0 -1
- package/dist/26.c1619706b8cbb1ab23cb.bundle.js +0 -2
- package/dist/26.c1619706b8cbb1ab23cb.bundle.js.map +0 -1
- package/dist/27.350dba622e243e1ab5fb.bundle.js +0 -2
- package/dist/27.350dba622e243e1ab5fb.bundle.js.map +0 -1
- package/dist/28.e687c87a5f1dc8a30fd0.bundle.js +0 -2
- package/dist/28.e687c87a5f1dc8a30fd0.bundle.js.map +0 -1
- package/dist/29.34a4af65623cd4af6899.bundle.js +0 -2
- package/dist/29.34a4af65623cd4af6899.bundle.js.map +0 -1
- package/dist/3.dfa66b44200c3fca24a2.bundle.js +0 -2
- package/dist/3.dfa66b44200c3fca24a2.bundle.js.map +0 -1
- package/dist/30.f4738c7c2d74f00f2e5f.bundle.js +0 -2
- package/dist/30.f4738c7c2d74f00f2e5f.bundle.js.map +0 -1
- package/dist/31.ab8f2e70841221e1d427.bundle.js +0 -2
- package/dist/31.ab8f2e70841221e1d427.bundle.js.map +0 -1
- package/dist/32.3210a7952ffcb57daa1a.bundle.js +0 -2
- package/dist/32.3210a7952ffcb57daa1a.bundle.js.map +0 -1
- package/dist/33.fcf9c56901b5590bd603.bundle.js +0 -2
- package/dist/33.fcf9c56901b5590bd603.bundle.js.map +0 -1
- package/dist/34.2c344c05bfc4048c3d53.bundle.js +0 -2
- package/dist/34.2c344c05bfc4048c3d53.bundle.js.map +0 -1
- package/dist/35.423c4a91e80adf5d97c8.bundle.js +0 -2
- package/dist/35.423c4a91e80adf5d97c8.bundle.js.map +0 -1
- package/dist/36.247686b6d65de11ec10d.bundle.js +0 -2
- package/dist/36.247686b6d65de11ec10d.bundle.js.map +0 -1
- package/dist/37.5f6089a939b59309cc82.bundle.js +0 -2
- package/dist/37.5f6089a939b59309cc82.bundle.js.map +0 -1
- package/dist/38.9e79a9ec2f9d5af38692.bundle.js +0 -2
- package/dist/38.9e79a9ec2f9d5af38692.bundle.js.map +0 -1
- package/dist/39.b64ae969a5f5fea4504c.bundle.js +0 -2
- package/dist/39.b64ae969a5f5fea4504c.bundle.js.map +0 -1
- package/dist/4.188966396c80909f58cd.bundle.js +0 -2
- package/dist/4.188966396c80909f58cd.bundle.js.map +0 -1
- package/dist/40.1303e99feecbba2614a7.bundle.js +0 -2
- package/dist/40.1303e99feecbba2614a7.bundle.js.map +0 -1
- package/dist/41.687956ca2240355a838f.bundle.js +0 -2
- package/dist/41.687956ca2240355a838f.bundle.js.map +0 -1
- package/dist/42.78e0302e87b9d244a1d7.bundle.js +0 -2
- package/dist/42.78e0302e87b9d244a1d7.bundle.js.map +0 -1
- package/dist/43.ee0de548c525f8e422ba.bundle.js +0 -2
- package/dist/43.ee0de548c525f8e422ba.bundle.js.map +0 -1
- package/dist/44.38b4979d4b201ae1fffb.bundle.js +0 -2
- package/dist/44.38b4979d4b201ae1fffb.bundle.js.map +0 -1
- package/dist/45.8a0ab002ad0f614964e5.bundle.js +0 -2
- package/dist/45.8a0ab002ad0f614964e5.bundle.js.map +0 -1
- package/dist/46.720c0f65b93f4fe01a7c.bundle.js +0 -2
- package/dist/46.720c0f65b93f4fe01a7c.bundle.js.map +0 -1
- package/dist/47.686e599732ae6f41120c.bundle.js.map +0 -1
- package/dist/48.bdb51ad865126b918831.bundle.js +0 -2
- package/dist/48.bdb51ad865126b918831.bundle.js.map +0 -1
- package/dist/49.74a24e08097ef1f6fcd2.bundle.js +0 -2
- package/dist/49.74a24e08097ef1f6fcd2.bundle.js.map +0 -1
- package/dist/5.9bbd38317d375cd02da2.bundle.js +0 -8
- package/dist/5.9bbd38317d375cd02da2.bundle.js.map +0 -1
- package/dist/50.313e315d4c339ad1bcdd.bundle.js +0 -2
- package/dist/50.313e315d4c339ad1bcdd.bundle.js.map +0 -1
- package/dist/51.895a3dacdc3a8eaee275.bundle.js.map +0 -1
- package/dist/52.1f6bc47f1c9abcc79e8d.bundle.js +0 -2
- package/dist/52.1f6bc47f1c9abcc79e8d.bundle.js.map +0 -1
- package/dist/53.f6c19075252833268cca.bundle.js +0 -2
- package/dist/53.f6c19075252833268cca.bundle.js.map +0 -1
- package/dist/54.599ca3ae32ee1fb5f937.bundle.js +0 -2
- package/dist/54.599ca3ae32ee1fb5f937.bundle.js.map +0 -1
- package/dist/55.c20a51cb1d894f9113b4.bundle.js +0 -2
- package/dist/55.c20a51cb1d894f9113b4.bundle.js.map +0 -1
- package/dist/56.91947e80d8e04223ac58.bundle.js.map +0 -1
- package/dist/57.ab4ee313c9d6c7e29384.bundle.js +0 -2
- package/dist/57.ab4ee313c9d6c7e29384.bundle.js.map +0 -1
- package/dist/58.99c83a8dac31c1b681df.bundle.js +0 -2
- package/dist/58.99c83a8dac31c1b681df.bundle.js.map +0 -1
- package/dist/59.99da52e1d8946ac0f601.bundle.js +0 -2
- package/dist/59.99da52e1d8946ac0f601.bundle.js.map +0 -1
- package/dist/6.6c67a1bcf82bb335b0c4.bundle.js +0 -2
- package/dist/6.6c67a1bcf82bb335b0c4.bundle.js.map +0 -1
- package/dist/60.92b9758945e497e52bac.bundle.js +0 -2
- package/dist/60.92b9758945e497e52bac.bundle.js.map +0 -1
- package/dist/61.42887fbc87f941cf7c81.bundle.js +0 -2
- package/dist/61.42887fbc87f941cf7c81.bundle.js.map +0 -1
- package/dist/62.c21410d6e123395d3920.bundle.js +0 -2
- package/dist/62.c21410d6e123395d3920.bundle.js.map +0 -1
- package/dist/63.1ab0c580ba57aee5479c.bundle.js +0 -2
- package/dist/63.1ab0c580ba57aee5479c.bundle.js.map +0 -1
- package/dist/64.ac922cb38c3ff6c431fb.bundle.js.map +0 -1
- package/dist/65.9fcde753699dc94bea1d.bundle.js +0 -2
- package/dist/65.9fcde753699dc94bea1d.bundle.js.map +0 -1
- package/dist/66.8213a0430e7543b6d7f7.bundle.js +0 -2
- package/dist/66.8213a0430e7543b6d7f7.bundle.js.map +0 -1
- package/dist/67.320a484bc979f5076d8c.bundle.js +0 -2
- package/dist/67.320a484bc979f5076d8c.bundle.js.map +0 -1
- package/dist/68.a69e9e22327878f44dbd.bundle.js +0 -2
- package/dist/68.a69e9e22327878f44dbd.bundle.js.map +0 -1
- package/dist/69.be786580c66ac4ee18cb.bundle.js +0 -2
- package/dist/69.be786580c66ac4ee18cb.bundle.js.map +0 -1
- package/dist/7.0fd9bc389f42820382e4.bundle.js +0 -3
- package/dist/7.0fd9bc389f42820382e4.bundle.js.map +0 -1
- package/dist/70.93cfa1f02948e8276451.bundle.js +0 -2
- package/dist/70.93cfa1f02948e8276451.bundle.js.map +0 -1
- package/dist/71.6b8c8bce52a95f2da242.bundle.js +0 -2
- package/dist/71.6b8c8bce52a95f2da242.bundle.js.map +0 -1
- package/dist/72.6cbb41a38d917191c660.bundle.js +0 -2
- package/dist/72.6cbb41a38d917191c660.bundle.js.map +0 -1
- package/dist/73.801e05b4acc74a3e268c.bundle.js +0 -2
- package/dist/73.801e05b4acc74a3e268c.bundle.js.map +0 -1
- package/dist/74.1c6322e5f93d5376fd76.bundle.js +0 -2
- package/dist/74.1c6322e5f93d5376fd76.bundle.js.map +0 -1
- package/dist/75.c95c9015a30a98acb353.bundle.js +0 -2
- package/dist/75.c95c9015a30a98acb353.bundle.js.map +0 -1
- package/dist/76.29111b9618d43a0dd149.bundle.js +0 -2
- package/dist/76.29111b9618d43a0dd149.bundle.js.map +0 -1
- package/dist/77.6ced6f6e26dfe1c4e00f.bundle.js +0 -2
- package/dist/77.6ced6f6e26dfe1c4e00f.bundle.js.map +0 -1
- package/dist/78.7c7d2a0d9e7c2d2483e6.bundle.js +0 -2
- package/dist/78.7c7d2a0d9e7c2d2483e6.bundle.js.map +0 -1
- package/dist/79.696045e048461f420813.bundle.js +0 -2
- package/dist/79.696045e048461f420813.bundle.js.map +0 -1
- package/dist/8.22695f5c20dcddc1c7f9.bundle.js +0 -2
- package/dist/8.22695f5c20dcddc1c7f9.bundle.js.map +0 -1
- package/dist/80.b5e832779f88ebe839e2.bundle.js +0 -2
- package/dist/80.b5e832779f88ebe839e2.bundle.js.map +0 -1
- package/dist/81.5a0776b89463df60bd1a.bundle.js +0 -2
- package/dist/81.5a0776b89463df60bd1a.bundle.js.map +0 -1
- package/dist/82.0a98b482c7c37a9812fc.bundle.js +0 -2
- package/dist/82.0a98b482c7c37a9812fc.bundle.js.map +0 -1
- package/dist/83.8beeb651df72c23d53ac.bundle.js +0 -2
- package/dist/83.8beeb651df72c23d53ac.bundle.js.map +0 -1
- package/dist/84.6f35fe422db61d53ae3e.bundle.js +0 -2
- package/dist/84.6f35fe422db61d53ae3e.bundle.js.map +0 -1
- package/dist/85.2d1142fcbdf4c9868e94.bundle.js +0 -2
- package/dist/85.2d1142fcbdf4c9868e94.bundle.js.map +0 -1
- package/dist/86.ce91cb69963c2b84e551.bundle.js +0 -2
- package/dist/86.ce91cb69963c2b84e551.bundle.js.map +0 -1
- package/dist/87.d4aa485128cd374a11c7.bundle.js +0 -2
- package/dist/87.d4aa485128cd374a11c7.bundle.js.map +0 -1
- package/dist/88.b4cd8e99a6af1abea692.bundle.js +0 -2
- package/dist/88.b4cd8e99a6af1abea692.bundle.js.map +0 -1
- package/dist/89.8ce40cc9d5fe2596fdf9.bundle.js +0 -2
- package/dist/89.8ce40cc9d5fe2596fdf9.bundle.js.map +0 -1
- package/dist/9.d94f24c12177433d455a.bundle.js +0 -2
- package/dist/9.d94f24c12177433d455a.bundle.js.map +0 -1
- package/dist/90.94988124ca51fa46932e.bundle.js +0 -2
- package/dist/90.94988124ca51fa46932e.bundle.js.map +0 -1
- package/dist/91.bfbbacbaea095478d82e.bundle.js +0 -2
- package/dist/91.bfbbacbaea095478d82e.bundle.js.map +0 -1
- package/dist/92.791121a262e5f42a2ba2.bundle.js +0 -2
- package/dist/92.791121a262e5f42a2ba2.bundle.js.map +0 -1
- package/dist/93.7da268902b8515abecf6.bundle.js +0 -2
- package/dist/93.7da268902b8515abecf6.bundle.js.map +0 -1
- package/dist/94.88f1bd8fa645739c4f30.bundle.js +0 -2
- package/dist/94.88f1bd8fa645739c4f30.bundle.js.map +0 -1
- package/dist/95.bbd1b757de3af20f2ac1.bundle.js +0 -2
- package/dist/95.bbd1b757de3af20f2ac1.bundle.js.map +0 -1
- package/dist/96.38e7df277c99946f9a20.bundle.js +0 -2
- package/dist/96.38e7df277c99946f9a20.bundle.js.map +0 -1
- package/dist/97.1818744137f2fb66596a.bundle.js +0 -2
- package/dist/97.1818744137f2fb66596a.bundle.js.map +0 -1
- package/dist/98.1a14af46a31cf35db0e5.bundle.js +0 -2
- package/dist/98.1a14af46a31cf35db0e5.bundle.js.map +0 -1
- package/dist/99.bd486f7d738e281a0752.bundle.js +0 -2
- package/dist/99.bd486f7d738e281a0752.bundle.js.map +0 -1
- package/dist/bundle.5eeff901b77240e58d27.bundle.js +0 -89
- package/dist/bundle.5eeff901b77240e58d27.bundle.js.map +0 -1
- package/dist/css/fonts/rubik-italic.woff +0 -0
- package/dist/css/fonts/rubik-italic.woff2 +0 -0
- package/dist/css/fonts/rubik-light.woff +0 -0
- package/dist/css/fonts/rubik-light.woff2 +0 -0
- package/dist/css/fonts/rubik-lightitalic.woff +0 -0
- package/dist/css/fonts/rubik-lightitalic.woff2 +0 -0
- package/dist/css/fonts/rubik-medium.woff +0 -0
- package/dist/css/fonts/rubik-medium.woff2 +0 -0
- package/dist/css/fonts/rubik-mediumitalic.woff +0 -0
- package/dist/css/fonts/rubik-mediumitalic.woff2 +0 -0
- package/dist/css/fonts/rubik-regular.woff +0 -0
- package/dist/css/fonts/rubik-regular.woff2 +0 -0
- package/dist/css/lib/bootstrap-switch/bootstrap-switch.min.css +0 -10
- package/dist/img/graphdb-splash.2eb3f7f02aa7e25a2545459e096f3738.svg +0 -141
- package/dist/js/angular/clustermanagement/templates/modal/clone-modal.html +0 -27
- package/dist/js/lib/nvd3/nv.d3.css +0 -755
- package/dist/main.e5d47f1d0bcd23074c38.css +0 -1
- package/dist/main.f10730ef6eebe969b494.bundle.js +0 -2
- package/dist/main.f10730ef6eebe969b494.bundle.js.map +0 -1
- package/dist/pages/cluster-management/cluster-configuration.html +0 -183
- package/dist/res/swagger/css/style.css +0 -250
- package/dist/res/swagger/css/typography.css +0 -60
- package/dist/vendor.327ffd7c7997ca288654.bundle.js +0 -50
- package/dist/vendor.327ffd7c7997ca288654.bundle.js.map +0 -1
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[12,2,10,20,25,27,28,35,49,57,58,59,60,61,62,63,65,66,82,86,87,90,105],{101:function(e,t,n){"use strict";n.r(t);n(3),n(14),n(9),n(8),n(230),n(231),n(224),n(221),n(217),n(232),n(234),n(235),n(226),n(215),n(223),n(216),n(41),n(55),n(56),n(57),n(58),n(59),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(68),n(69),n(70),n(35),n(40);angular.module("graphdb.framework.graphexplore",["graphdb.framework.core.controllers","graphdb.framework.core.directives","graphdb.framework.rest.graphexplore.data.service","graphdb.framework.graphexplore.services.uiscroll","graphdb.framework.graphexplore.services.rdfsdetails","graphdb.framework.rest.graphexplore.savedgraphs.service","graphdb.framework.rest.graphconfig.service","graphdb.framework.graphexplore.controllers.class","graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.graphexplore.controllers.dependencies","graphdb.framework.graphexplore.controllers.graphviz","graphdb.framework.graphexplore.controllers.graphviz.config","graphdb.framework.graphexplore.directives.sysrepo","graphdb.framework.graphexplore.directives.rdfsdetails","graphdb.framework.graphexplore.directives.searchfilter","graphdb.framework.graphexplore.directives.class","graphdb.framework.graphexplore.directives.domainrange","graphdb.framework.graphexplore.directives.dependencies","graphdb.framework.graphexplore.directives.searchcontrols","graphdb.framework.core.directives.queryeditor.controllers","graphdb.framework.core.directives.queryeditor.queryeditor"])},215:function(e,t,n){"use strict";var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click={delayDblClick:function(){var e=d3.dispatch("click","dblclick");return d3.rebind((function(t){var n,r=null;t.on("mousedown",(function(){n=d3.mouse(document.body),new Date})),t.on("mouseup",(function(t){var i,o;i=n,o=d3.mouse(document.body),Math.sqrt(Math.pow(i[0]-o[0],2),Math.pow(i[1]-o[1],2))>5||(r?(window.clearTimeout(r),r=null,e.dblclick(t)):r=window.setTimeout((d3.event,function(){e.click(t),r=null}),250))}))}),e,"on")}},t.a=r},216:function(e,t,n){"use strict";var r=r||{};r.Export={getCSSRules:function(e){var t=$('link[href="'+e+'"]')[0].sheet.rules,n="";return _.each(t,(function(e){n+=e.cssText})),n},generateBase64ImageSource:function(){var e=d3.selectAll("svg").attr({version:"1.1",xmlns:"http://www.w3.org/2000/svg"}).node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(e)))}},t.a=r},217:function(e,t,n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){return function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=f(),i=null,o=null,a=null,s=null;function u(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,o=i.createSVGPoint(),document.body.appendChild(r)}u.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(a=r.pop());var i,o=n.apply(this,r),f=t.apply(this,r),h=e.apply(this,r),p=d(),g=l.length,m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft,v=s.apply(this,r);for(p.html(o).style({opacity:1,"pointer-events":"all"});g--;)p.classed(l[g],!1);return i=c.get(h).apply(this),v?p.style(v):p.classed(h,!0).style({top:i.top+f[0]+m+"px",left:i.left+f[1]+y+"px"}),u},u.hide=function(){return d().style({opacity:0,"pointer-events":"none"}),u},u.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return d().attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(d(),n),u},u.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return d().style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(d(),n),u},u.direction=function(t){return arguments.length?(e=null==t?t:d3.functor(t),u):e},u.offset=function(e){return arguments.length?(t=null==e?e:d3.functor(e),u):t},u.html=function(e){return arguments.length?(n=null==e?e:d3.functor(e),u):n},u.customPosition=function(e){return arguments.length?(s=null==e?e:d3.functor(e),u):s},u.destroy=function(){return r&&(d().remove(),r=null),u};var c=d3.map({n:function(){var e=h();return{top:e.n.y-r.offsetHeight,left:e.n.x-r.offsetWidth/2}},s:function(){var e=h();return{top:e.s.y,left:e.s.x-r.offsetWidth/2}},e:function(){var e=h();return{top:e.e.y-r.offsetHeight/2,left:e.e.x}},w:function(){var e=h();return{top:e.w.y-r.offsetHeight/2,left:e.w.x-r.offsetWidth}},nw:function(){var e=h();return{top:e.nw.y-r.offsetHeight,left:e.nw.x-r.offsetWidth}},ne:function(){var e=h();return{top:e.ne.y-r.offsetHeight,left:e.ne.x}},sw:function(){var e=h();return{top:e.sw.y,left:e.sw.x-r.offsetWidth}},se:function(){var e=h();return{top:e.se.y,left:e.e.x}}}),l=c.keys();function f(){var e=d3.select(document.createElement("div"));return e.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),e.node()}function d(){return null===r&&(r=f(),document.body.appendChild(r)),d3.select(r)}function h(){for(var e=a||d3.event.target;void 0===e.getScreenCTM&&"undefined"===e.parentNode;)e=e.parentNode;var t={},n=e.getScreenCTM(),r=e.getBBox(),i=r.width,s=r.height,u=r.x,c=r.y;return o.x=u,o.y=c,t.nw=o.matrixTransform(n),o.x+=i,t.ne=o.matrixTransform(n),o.y+=s,t.se=o.matrixTransform(n),o.x-=i,t.sw=o.matrixTransform(n),o.y-=s/2,t.w=o.matrixTransform(n),o.x+=i,t.e=o.matrixTransform(n),o.x-=i/2,o.y-=s/2,t.n=o.matrixTransform(n),o.y+=s,t.s=o.matrixTransform(n),t}return u}})?r.apply(t,i):r)||(e.exports=o)},221:function(e,t,n){var r,i;!function(){var o={version:"3.5.12"},a=[].slice,s=function(e){return a.call(e)},u=this.document;function c(e){return e&&(e.ownerDocument||e.document||e).documentElement}function l(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(u)try{s(u.documentElement.childNodes)[0].nodeType}catch(e){s=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),u)try{u.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var f=this.Element.prototype,d=f.setAttribute,h=f.setAttributeNS,p=this.CSSStyleDeclaration.prototype,g=p.setProperty;f.setAttribute=function(e,t){d.call(this,e,t+"")},f.setAttributeNS=function(e,t,n){h.call(this,e,t,n+"")},p.setProperty=function(e,t,n){g.call(this,e,t+"",n)}}function m(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function y(e){return null===e?NaN:+e}function v(e){return!isNaN(e)}function x(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}o.ascending=m,o.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},o.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},o.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},o.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},o.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)v(n=+e[o])&&(r+=n);else for(;++o<i;)v(n=+t.call(e,e[o],o))&&(r+=n);return r},o.mean=function(e,t){var n,r=0,i=e.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)v(n=y(e[o]))?r+=n:--a;else for(;++o<i;)v(n=y(t.call(e,e[o],o)))?r+=n:--a;if(a)return r/a},o.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i},o.median=function(e,t){var n,r=[],i=e.length,a=-1;if(1===arguments.length)for(;++a<i;)v(n=y(e[a]))&&r.push(n);else for(;++a<i;)v(n=y(t.call(e,e[a],a)))&&r.push(n);if(r.length)return o.quantile(r.sort(m),.5)},o.variance=function(e,t){var n,r,i=e.length,o=0,a=0,s=-1,u=0;if(1===arguments.length)for(;++s<i;)v(n=y(e[s]))&&(a+=(r=n-o)*(n-(o+=r/++u)));else for(;++s<i;)v(n=y(t.call(e,e[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++u)));if(u>1)return a/(u-1)},o.deviation=function(){var e=o.variance.apply(this,arguments);return e?Math.sqrt(e):e};var w=x(m);function b(e){return e.length}o.bisectLeft=w.left,o.bisect=o.bisectRight=w.right,o.bisector=function(e){return x(1===e.length?function(t,n){return m(e(t),n)}:e)},o.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},o.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},o.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t<n;)i[t]=[r,r=e[++t]];return i},o.zip=function(){if(!(r=arguments.length))return[];for(var e=-1,t=o.min(arguments,b),n=new Array(t);++e<t;)for(var r,i=-1,a=n[e]=new Array(r);++i<r;)a[i]=arguments[i][e];return n},o.transpose=function(e){return o.zip.apply(o,e)},o.keys=function(e){var t=[];for(var n in e)t.push(n);return t},o.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},o.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},o.merge=function(e){for(var t,n,r,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(n=new Array(a);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n};var S=Math.abs;function C(e){for(var t=1;e*t%1;)t*=10;return t}function M(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function _(){this._=Object.create(null)}o.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,i=[],o=C(S(n)),a=-1;if(e*=o,t*=o,(n*=o)<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)<t;)i.push(r/o);return i},o.map=function(e,t){var n=new _;if(e instanceof _)e.forEach((function(e,t){n.set(e,t)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(1===arguments.length)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t.call(e,r=e[i],i),r)}else for(var a in e)n.set(a,e[a]);return n};var E="__proto__",k="\0";function T(e){return(e+="")===E||e[0]===k?k+e:e}function R(e){return(e+="")[0]===k?e.slice(1):e}function A(e){return T(e)in this._}function I(e){return(e=T(e))in this._&&delete this._[e]}function N(){var e=[];for(var t in this._)e.push(R(t));return e}function L(){var e=0;for(var t in this._)++e;return e}function D(){for(var e in this._)return!1;return!0}function $(){this._=Object.create(null)}function P(e){return e}function O(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function q(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=z.length;n<r;++n){var i=z[n]+t;if(i in e)return i}}M(_,{has:A,get:function(e){return this._[T(e)]},set:function(e,t){return this._[T(e)]=t},remove:I,keys:N,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:R(t),value:this._[t]});return e},size:L,empty:D,forEach:function(e){for(var t in this._)e.call(this,R(t),this._[t])}}),o.nest=function(){var e,t,n={},r=[],i=[];function a(i,o,s){if(s>=r.length)return t?t.call(n,o):e?o.sort(e):o;for(var u,c,l,f,d=-1,h=o.length,p=r[s++],g=new _;++d<h;)(f=g.get(u=p(c=o[d])))?f.push(c):g.set(u,[c]);return i?(c=i(),l=function(e,t){c.set(e,a(i,t,s))}):(c={},l=function(e,t){c[e]=a(i,t,s)}),g.forEach(l),c}return n.map=function(e,t){return a(t,e,0)},n.entries=function(e){return function e(t,n){if(n>=r.length)return t;var o=[],a=i[n++];return t.forEach((function(t,r){o.push({key:t,values:e(r,n)})})),a?o.sort((function(e,t){return a(e.key,t.key)})):o}(a(o.map,e,0),0)},n.key=function(e){return r.push(e),n},n.sortKeys=function(e){return i[r.length-1]=e,n},n.sortValues=function(t){return e=t,n},n.rollup=function(e){return t=e,n},n},o.set=function(e){var t=new $;if(e)for(var n=0,r=e.length;n<r;++n)t.add(e[n]);return t},M($,{has:A,add:function(e){return this._[T(e+="")]=!0,e},remove:I,values:N,size:L,empty:D,forEach:function(e){for(var t in this._)e.call(this,R(t))}}),o.behavior={},o.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=O(e,t,t[n]);return e};var z=["webkit","ms","moz","Moz","o","O"];function j(){}function U(){}function H(e){var t=[],n=new _;function r(){for(var n,r=t,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return e}return r.on=function(r,i){var o,a=n.get(r);return arguments.length<2?a&&a.on:(a&&(a.on=null,t=t.slice(0,o=t.indexOf(a)).concat(t.slice(o+1)),n.remove(r)),i&&t.push(n.set(r,{on:i})),e)},r}function F(){o.event.preventDefault()}function G(){for(var e,t=o.event;e=t.sourceEvent;)t=e;return t}function Q(e){for(var t=new U,n=0,r=arguments.length;++n<r;)t[arguments[n]]=H(t);return t.of=function(n,r){return function(i){try{var a=i.sourceEvent=o.event;i.target=e,o.event=i,t[i.type].apply(n,r)}finally{o.event=a}}},t}o.dispatch=function(){for(var e=new U,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=H(e);return e},U.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},o.event=null,o.requote=function(e){return e.replace(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,B={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};function W(e){return B(e,K),e}var Y=function(e,t){return t.querySelector(e)},X=function(e,t){return t.querySelectorAll(e)},Z=function(e,t){var n=e.matches||e[q(e,"matchesSelector")];return(Z=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(Y=function(e,t){return Sizzle(e,t)[0]||null},X=Sizzle,Z=Sizzle.matchesSelector),o.selection=function(){return o.select(u.documentElement)};var K=o.selection.prototype=[];function J(e){return"function"==typeof e?e:function(){return Y(e,this)}}function ee(e){return"function"==typeof e?e:function(){return X(e,this)}}K.select=function(e){var t,n,r,i,o=[];e=J(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var u=-1,c=r.length;++u<c;)(i=r[u])?(t.push(n=e.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return W(o)},K.selectAll=function(e){var t,n,r=[];e=ee(e);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],u=-1,c=a.length;++u<c;)(n=a[u])&&(r.push(t=s(e.call(n,n.__data__,u,i))),t.parentNode=n);return W(r)};var te={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ne(e,t){return e=o.ns.qualify(e),null==t?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:"function"==typeof t?e.local?function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}:function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}:e.local?function(){this.setAttributeNS(e.space,e.local,t)}:function(){this.setAttribute(e,t)}}function re(e){return e.trim().replace(/\s+/g," ")}function ie(e){return new RegExp("(?:^|\\s+)"+o.requote(e)+"(?:\\s+|$)","g")}function oe(e){return(e+"").trim().split(/^|\s+/)}function ae(e,t){var n=(e=oe(e).map(se)).length;return"function"==typeof t?function(){for(var r=-1,i=t.apply(this,arguments);++r<n;)e[r](this,i)}:function(){for(var r=-1;++r<n;)e[r](this,t)}}function se(e){var t=ie(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",re(i+" "+e))):n.setAttribute("class",re(i.replace(t," ")))}}function ue(e,t,n){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}:function(){this.style.setProperty(e,t,n)}}function ce(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}:function(){this[e]=t}}function le(e){return"function"==typeof e?e:(e=o.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,n=this.namespaceURI;return n?t.createElementNS(n,e):t.createElement(e)}}function fe(){var e=this.parentNode;e&&e.removeChild(this)}function de(e){return{__data__:e}}function he(e){return function(){return Z(this,e)}}function pe(e){return arguments.length||(e=m),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function ge(e,t){for(var n=0,r=e.length;n<r;n++)for(var i,o=e[n],a=0,s=o.length;a<s;a++)(i=o[a])&&t(i,a,n);return e}function me(e){return B(e,ye),e}o.ns={prefix:te,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),te.hasOwnProperty(n)?{space:te[n],local:e}:e}},K.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=o.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(ne(t,e[t]));return this}return this.each(ne(e,t))},K.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=oe(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!ie(e[i]).test(t))return!1;return!0}for(t in e)this.each(ae(t,e[t]));return this}return this.each(ae(e,t))},K.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.each(ue(n,e[n],t));return this}if(r<2){var i=this.node();return l(i).getComputedStyle(i,null).getPropertyValue(e)}n=""}return this.each(ue(e,t,n))},K.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(ce(t,e[t]));return this}return this.each(ce(e,t))},K.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},K.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},K.append=function(e){return e=le(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},K.insert=function(e,t){return e=le(e),t=J(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},K.remove=function(){return this.each(fe)},K.data=function(e,t){var n,r,i=-1,o=this.length;if(!arguments.length){for(e=new Array(o=(n=this[0]).length);++i<o;)(r=n[i])&&(e[i]=r.__data__);return e}function a(e,n){var r,i,o,a=e.length,l=n.length,f=Math.min(a,l),d=new Array(l),h=new Array(l),p=new Array(a);if(t){var g,m=new _,y=new Array(a);for(r=-1;++r<a;)(i=e[r])&&(m.has(g=t.call(i,i.__data__,r))?p[r]=i:m.set(g,i),y[r]=g);for(r=-1;++r<l;)(i=m.get(g=t.call(n,o=n[r],r)))?!0!==i&&(d[r]=i,i.__data__=o):h[r]=de(o),m.set(g,!0);for(r=-1;++r<a;)r in y&&!0!==m.get(y[r])&&(p[r]=e[r])}else{for(r=-1;++r<f;)i=e[r],o=n[r],i?(i.__data__=o,d[r]=i):h[r]=de(o);for(;r<l;++r)h[r]=de(n[r]);for(;r<a;++r)p[r]=e[r]}h.update=d,h.parentNode=d.parentNode=p.parentNode=e.parentNode,s.push(h),u.push(d),c.push(p)}var s=me([]),u=W([]),c=W([]);if("function"==typeof e)for(;++i<o;)a(n=this[i],e.call(n,n.parentNode.__data__,i));else for(;++i<o;)a(n=this[i],e);return u.enter=function(){return s},u.exit=function(){return c},u},K.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},K.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=he(e));for(var o=0,a=this.length;o<a;o++){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;s<u;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return W(i)},K.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},K.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},K.each=function(e){return ge(this,(function(t,n,r){e.call(t,t.__data__,n,r)}))},K.call=function(e){var t=s(arguments);return e.apply(t[0]=this,t),this},K.empty=function(){return!this.node()},K.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},K.size=function(){var e=0;return ge(this,(function(){++e})),e};var ye=[];function ve(e){var t,n;return function(r,i,o){var a,s=e[o].update,u=s.length;for(o!=n&&(n=o,t=0),i>=t&&(t=i+1);!(a=s[t])&&++t<u;);return a}}function xe(e,t,n){var r="__on"+e,i=e.indexOf("."),a=be;i>0&&(e=e.slice(0,i));var u=we.get(e);function c(){var t=this[r];t&&(this.removeEventListener(e,t,t.$),delete this[r])}return u&&(e=u,a=Se),i?t?function(){var i=a(t,s(arguments));c.call(this),this.addEventListener(e,this[r]=i,i.$=n),i._=t}:c:t?j:function(){var t,n=new RegExp("^__on([^.]+)"+o.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}}o.selection.enter=me,o.selection.enter.prototype=ye,ye.append=K.append,ye.empty=K.empty,ye.node=K.node,ye.call=K.call,ye.size=K.size,ye.select=function(e){for(var t,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,l=i.length;++c<l;)(o=i[c])?(t.push(r[c]=n=e.call(i.parentNode,o.__data__,c,s)),n.__data__=o.__data__):t.push(null)}return W(a)},ye.insert=function(e,t){return arguments.length<2&&(t=ve(this)),K.insert.call(this,e,t)},o.select=function(e){var t;return"string"==typeof e?(t=[Y(e,u)]).parentNode=u.documentElement:(t=[e]).parentNode=c(e),W([t])},o.selectAll=function(e){var t;return"string"==typeof e?(t=s(X(e,u))).parentNode=u.documentElement:(t=s(e)).parentNode=null,W([t])},K.on=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=!1),e)this.each(xe(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(xe(e,t,n))};var we=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});function be(e,t){return function(n){var r=o.event;o.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{o.event=r}}}function Se(e,t){var n=be(e,t);return function(e){var t=e.relatedTarget;t&&(t===this||8&t.compareDocumentPosition(this))||n.call(this,e)}}u&&we.forEach((function(e){"on"+e in u&&we.remove(e)}));var Ce,Me=0;function _e(e){var t=".dragsuppress-"+ ++Me,n="click"+t,r=o.select(l(e)).on("touchmove"+t,F).on("dragstart"+t,F).on("selectstart"+t,F);if(null==Ce&&(Ce=!("onselectstart"in e)&&q(e.style,"userSelect")),Ce){var i=c(e).style,a=i[Ce];i[Ce]="none"}return function(e){if(r.on(t,null),Ce&&(i[Ce]=a),e){var o=function(){r.on(n,null)};r.on(n,(function(){F(),o()}),!0),setTimeout(o,0)}}}o.mouse=function(e){return ke(e,G())};var Ee=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function ke(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Ee<0){var i=l(e);if(i.scrollX||i.scrollY){var a=(n=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Ee=!(a.f||a.e),n.remove()}}return Ee?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function Te(){return o.event.changedTouches[0].identifier}o.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=G().changedTouches),t)for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).identifier===n)return ke(e,r)},o.behavior.drag=function(){var e=Q(i,"drag","dragstart","dragend"),t=null,n=a(j,o.mouse,l,"mousemove","mouseup"),r=a(Te,o.touch,P,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function a(n,r,i,a,s){return function(){var u,c=this,l=o.event.target,f=c.parentNode,d=e.of(c,arguments),h=0,p=n(),g=".drag"+(null==p?"":"-"+p),m=o.select(i(l)).on(a+g,x).on(s+g,w),y=_e(l),v=r(f,p);function x(){var e,t,n=r(f,p);n&&(e=n[0]-v[0],t=n[1]-v[1],h|=e|t,v=n,d({type:"drag",x:n[0]+u[0],y:n[1]+u[1],dx:e,dy:t}))}function w(){r(f,p)&&(m.on(a+g,null).on(s+g,null),y(h),d({type:"dragend"}))}u=t?[(u=t.apply(c,arguments)).x-v[0],u.y-v[1]]:[0,0],d({type:"dragstart"})}}return i.origin=function(e){return arguments.length?(t=e,i):t},o.rebind(i,e,"on")},o.touches=function(e,t){return arguments.length<2&&(t=G().touches),t?s(t).map((function(t){var n=ke(e,t);return n.identifier=t.identifier,n})):[]};var Re=1e-6,Ae=Re*Re,Ie=Math.PI,Ne=2*Ie,Le=Ne-Re,De=Ie/2,$e=Ie/180,Pe=180/Ie;function Oe(e){return e>0?1:e<0?-1:0}function qe(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function ze(e){return e>1?0:e<-1?Ie:Math.acos(e)}function je(e){return e>1?De:e<-1?-De:Math.asin(e)}function Ue(e){return((e=Math.exp(e))+1/e)/2}function He(e){return(e=Math.sin(e/2))*e}var Fe=Math.SQRT2;o.interpolateZoom=function(e,t){var n,r,i=e[0],o=e[1],a=e[2],s=t[0],u=t[1],c=t[2],l=s-i,f=u-o,d=l*l+f*f;if(d<Ae)r=Math.log(c/a)/Fe,n=function(e){return[i+e*l,o+e*f,a*Math.exp(Fe*e*r)]};else{var h=Math.sqrt(d),p=(c*c-a*a+4*d)/(2*a*2*h),g=(c*c-a*a-4*d)/(2*c*2*h),m=Math.log(Math.sqrt(p*p+1)-p),y=Math.log(Math.sqrt(g*g+1)-g);r=(y-m)/Fe,n=function(e){var t,n=e*r,s=Ue(m),u=a/(2*h)*(s*(t=Fe*n+m,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(m));return[i+u*l,o+u*f,a*s/Ue(Fe*n+m)]}}return n.duration=1e3*r,n},o.behavior.zoom=function(){var e,t,n,r,i,a,s,c,f,d={x:0,y:0,k:1},h=[960,500],p=Ve,g=250,m=0,y="mousedown.zoom",v="mousemove.zoom",x="mouseup.zoom",w="touchstart.zoom",b=Q(S,"zoomstart","zoom","zoomend");function S(e){e.on(y,I).on(Qe+".zoom",L).on("dblclick.zoom",D).on(w,N)}function C(e){return[(e[0]-d.x)/d.k,(e[1]-d.y)/d.k]}function M(e){d.k=Math.max(p[0],Math.min(p[1],e))}function _(e,t){t=function(e){return[e[0]*d.k+d.x,e[1]*d.k+d.y]}(t),d.x+=e[0]-t[0],d.y+=e[1]-t[1]}function E(e,n,r,i){e.__chart__={x:d.x,y:d.y,k:d.k},M(Math.pow(2,i)),_(t=n,r),e=o.select(e),g>0&&(e=e.transition().duration(g)),e.call(S.event)}function k(){s&&s.domain(a.range().map((function(e){return(e-d.x)/d.k})).map(a.invert)),f&&f.domain(c.range().map((function(e){return(e-d.y)/d.k})).map(c.invert))}function T(e){m++||e({type:"zoomstart"})}function R(e){k(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function A(e){--m||(e({type:"zoomend"}),t=null)}function I(){var e=this,t=b.of(e,arguments),n=0,r=o.select(l(e)).on(v,(function(){n=1,_(o.mouse(e),i),R(t)})).on(x,(function(){r.on(v,null).on(x,null),a(n),A(t)})),i=C(o.mouse(e)),a=_e(e);Es.call(e),T(t)}function N(){var e,t=this,n=b.of(t,arguments),r={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,u="touchmove"+s,c="touchend"+s,l=[],f=o.select(t),h=_e(t);function p(){var n=o.touches(t);return e=d.k,n.forEach((function(e){e.identifier in r&&(r[e.identifier]=C(e))})),n}function g(){var e=o.event.target;o.select(e).on(u,m).on(c,v),l.push(e);for(var n=o.event.changedTouches,s=0,f=n.length;s<f;++s)r[n[s].identifier]=null;var h=p(),g=Date.now();if(1===h.length){if(g-i<500){var y=h[0];E(t,y,r[y.identifier],Math.floor(Math.log(d.k)/Math.LN2)+1),F()}i=g}else if(h.length>1){y=h[0];var x=h[1],w=y[0]-x[0],b=y[1]-x[1];a=w*w+b*b}}function m(){var s,u,c,l,f=o.touches(t);Es.call(t);for(var d=0,h=f.length;d<h;++d,l=null)if(c=f[d],l=r[c.identifier]){if(u)break;s=c,u=l}if(l){var p=(p=c[0]-s[0])*p+(p=c[1]-s[1])*p,g=a&&Math.sqrt(p/a);s=[(s[0]+c[0])/2,(s[1]+c[1])/2],u=[(u[0]+l[0])/2,(u[1]+l[1])/2],M(g*e)}i=null,_(s,u),R(n)}function v(){if(o.event.touches.length){for(var e=o.event.changedTouches,t=0,i=e.length;t<i;++t)delete r[e[t].identifier];for(var a in r)return void p()}o.selectAll(l).on(s,null),f.on(y,I).on(w,N),h(),A(n)}g(),T(n),f.on(y,null).on(w,g)}function L(){var i=b.of(this,arguments);r?clearTimeout(r):(Es.call(this),e=C(t=n||o.mouse(this)),T(i)),r=setTimeout((function(){r=null,A(i)}),50),F(),M(Math.pow(2,.002*Ge())*d.k),_(t,e),R(i)}function D(){var e=o.mouse(this),t=Math.log(d.k)/Math.LN2;E(this,e,C(e),o.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}return Qe||(Qe="onwheel"in u?(Ge=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in u?(Ge=function(){return o.event.wheelDelta},"mousewheel"):(Ge=function(){return-o.event.detail},"MozMousePixelScroll")),S.event=function(e){e.each((function(){var e=b.of(this,arguments),n=d;Rs?o.select(this).transition().each("start.zoom",(function(){d=this.__chart__||{x:0,y:0,k:1},T(e)})).tween("zoom:zoom",(function(){var r=h[0],i=h[1],a=t?t[0]:r/2,s=t?t[1]:i/2,u=o.interpolateZoom([(a-d.x)/d.k,(s-d.y)/d.k,r/d.k],[(a-n.x)/n.k,(s-n.y)/n.k,r/n.k]);return function(t){var n=u(t),i=r/n[2];this.__chart__=d={x:a-n[0]*i,y:s-n[1]*i,k:i},R(e)}})).each("interrupt.zoom",(function(){A(e)})).each("end.zoom",(function(){A(e)})):(this.__chart__=d,T(e),R(e),A(e))}))},S.translate=function(e){return arguments.length?(d={x:+e[0],y:+e[1],k:d.k},k(),S):[d.x,d.y]},S.scale=function(e){return arguments.length?(d={x:d.x,y:d.y,k:null},M(+e),k(),S):d.k},S.scaleExtent=function(e){return arguments.length?(p=null==e?Ve:[+e[0],+e[1]],S):p},S.center=function(e){return arguments.length?(n=e&&[+e[0],+e[1]],S):n},S.size=function(e){return arguments.length?(h=e&&[+e[0],+e[1]],S):h},S.duration=function(e){return arguments.length?(g=+e,S):g},S.x=function(e){return arguments.length?(s=e,a=e.copy(),d={x:0,y:0,k:1},S):s},S.y=function(e){return arguments.length?(f=e,c=e.copy(),d={x:0,y:0,k:1},S):f},o.rebind(S,b,"on")};var Ge,Qe,Ve=[0,1/0];function Be(){}function We(e,t,n){return this instanceof We?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof We?new We(e.h,e.s,e.l):mt(""+e,yt,We):new We(e,t,n)}o.color=Be,Be.prototype.toString=function(){return this.rgb()+""},o.hsl=We;var Ye=We.prototype=new Be;function Xe(e,t,n){var r,i;function o(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+t):n+t-n*t),new ft(o(e+120),o(e),o(e-120))}function Ze(e,t,n){return this instanceof Ze?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof Ze?new Ze(e.h,e.c,e.l):st(e instanceof et?e.l:(e=vt((e=o.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ze(e,t,n)}Ye.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new We(this.h,this.s,this.l/e)},Ye.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new We(this.h,this.s,e*this.l)},Ye.rgb=function(){return Xe(this.h,this.s,this.l)},o.hcl=Ze;var Ke=Ze.prototype=new Be;function Je(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new et(n,Math.cos(e*=$e)*t,Math.sin(e)*t)}function et(e,t,n){return this instanceof et?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof et?new et(e.l,e.a,e.b):e instanceof Ze?Je(e.h,e.c,e.l):vt((e=ft(e)).r,e.g,e.b):new et(e,t,n)}Ke.brighter=function(e){return new Ze(this.h,this.c,Math.min(100,this.l+tt*(arguments.length?e:1)))},Ke.darker=function(e){return new Ze(this.h,this.c,Math.max(0,this.l-tt*(arguments.length?e:1)))},Ke.rgb=function(){return Je(this.h,this.c,this.l).rgb()},o.lab=et;var tt=18,nt=.95047,rt=1,it=1.08883,ot=et.prototype=new Be;function at(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return new ft(lt(3.2404542*(i=ut(i)*nt)-1.5371385*(r=ut(r)*rt)-.4985314*(o=ut(o)*it)),lt(-.969266*i+1.8760108*r+.041556*o),lt(.0556434*i-.2040259*r+1.0572252*o))}function st(e,t,n){return e>0?new Ze(Math.atan2(n,t)*Pe,Math.sqrt(t*t+n*n),e):new Ze(NaN,NaN,e)}function ut(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ct(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function lt(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ft(e,t,n){return this instanceof ft?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ft?new ft(e.r,e.g,e.b):mt(""+e,ft,Xe):new ft(e,t,n)}function dt(e){return new ft(e>>16,e>>8&255,255&e)}function ht(e){return dt(e)+""}ot.brighter=function(e){return new et(Math.min(100,this.l+tt*(arguments.length?e:1)),this.a,this.b)},ot.darker=function(e){return new et(Math.max(0,this.l-tt*(arguments.length?e:1)),this.a,this.b)},ot.rgb=function(){return at(this.l,this.a,this.b)},o.rgb=ft;var pt=ft.prototype=new Be;function gt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function mt(e,t,n){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(wt(i[0]),wt(i[1]),wt(i[2]))}return(o=bt.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,u=15&o,u|=u<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,u=255&o)),t(a,s,u))}function yt(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,u=(a+o)/2;return s?(i=u<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t<n?6:0):t==a?(n-e)/s+2:(e-t)/s+4,r*=60):(r=NaN,i=u>0&&u<1?0:r),new We(r,i,u)}function vt(e,t,n){var r=ct((.4124564*(e=xt(e))+.3575761*(t=xt(t))+.1804375*(n=xt(n)))/nt),i=ct((.2126729*e+.7151522*t+.072175*n)/rt);return et(116*i-16,500*(r-i),200*(i-ct((.0193339*e+.119192*t+.9503041*n)/it)))}function xt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function wt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}pt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new ft(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new ft(i,i,i)},pt.darker=function(e){return new ft((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},pt.hsl=function(){return yt(this.r,this.g,this.b)},pt.toString=function(){return"#"+gt(this.r)+gt(this.g)+gt(this.b)};var bt=o.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function St(e){return"function"==typeof e?e:function(){return e}}function Ct(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Mt(t,n,e,r)}}function Mt(e,t,n,r){var i={},a=o.dispatch("beforesend","progress","load","error"),u={},c=new XMLHttpRequest,l=null;function f(){var e,t=c.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(c)||t>=200&&t<300||304===t){try{e=n.call(i,c)}catch(e){return void a.error.call(i,e)}a.load.call(i,e)}else a.error.call(i,c)}return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(e)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=f:c.onreadystatechange=function(){c.readyState>3&&f()},c.onprogress=function(e){var t=o.event;o.event=e;try{a.progress.call(i,c)}finally{o.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?u[e]:(null==t?delete u[e]:u[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(l=e,i):l},i.response=function(e){return n=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(s(arguments)))}})),i.send=function(n,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),c.open(n,e,!0),null==t||"accept"in u||(u.accept=t+",*/*"),c.setRequestHeader)for(var s in u)c.setRequestHeader(s,u[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=o&&i.on("error",o).on("load",(function(e){o(null,e)})),a.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},o.rebind(i,a,"on"),null==r?i:i.get(function(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(r))}bt.forEach((function(e,t){bt.set(e,dt(t))})),o.functor=St,o.xhr=Ct(P),o.dsv=function(e,t){var n=new RegExp('["'+e+"\n]"),r=e.charCodeAt(0);function i(e,n,r){arguments.length<3&&(r=n,n=null);var i=Mt(e,t,null==n?o:a(n),r);return i.row=function(e){return arguments.length?i.response(null==(n=e)?o:a(e)):n},i}function o(e){return i.parse(e.responseText)}function a(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(u).join(e)}function u(e){return n.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var n;return i.parseRows(e,(function(e,r){if(n)return n(e,r-1);var i=new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+"]"})).join(",")+"}");n=t?function(e,n){return t(i(e),n)}:i}))},i.parseRows=function(e,t){var n,i,o={},a={},s=[],u=e.length,c=0,l=0;function f(){if(c>=u)return a;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<u;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}return c=n+2,13===(s=e.charCodeAt(n+1))?(i=!0,10===e.charCodeAt(n+2)&&++c):10===s&&(i=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;c<u;){var s,l=1;if(10===(s=e.charCodeAt(c++)))i=!0;else if(13===s)i=!0,10===e.charCodeAt(c)&&(++c,++l);else if(s!==r)continue;return e.slice(t,c-l)}return e.slice(t)}for(;(n=f())!==a;){for(var d=[];n!==o&&n!==a;)d.push(n),n=f();t&&null==(d=t(d,l++))||s.push(d)}return s},i.format=function(t){if(Array.isArray(t[0]))return i.formatRows(t);var n=new $,r=[];return t.forEach((function(e){for(var t in e)n.has(t)||r.push(n.add(t))})),[r.map(u).join(e)].concat(t.map((function(t){return r.map((function(e){return u(t[e])})).join(e)}))).join("\n")},i.formatRows=function(e){return e.map(s).join("\n")},i},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv("\t","text/tab-separated-values");var _t,Et,kt,Tt,Rt=this[q(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function At(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i={c:e,t:n+t,n:null};return Et?Et.n=i:_t=i,Et=i,kt||(Tt=clearTimeout(Tt),kt=1,Rt(It)),i}function It(){var e=Nt(),t=Lt()-e;t>24?(isFinite(t)&&(clearTimeout(Tt),Tt=setTimeout(It,t)),kt=0):(kt=1,Rt(It))}function Nt(){for(var e=Date.now(),t=_t;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Lt(){for(var e,t=_t,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:_t=t.n;return Et=e,n}function Dt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}o.timer=function(){At.apply(this,arguments)},o.timer.flush=function(){Nt(),Lt()},o.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var $t=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(e,t){var n=Math.pow(10,3*S(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}));function Pt(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,a=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],u=0;i>0&&s>0&&(u+s+1>t&&(s=Math.max(1,t-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:P;return function(e){var n=Ot.exec(e),r=n[1]||" ",s=n[2]||">",u=n[3]||"-",c=n[4]||"",l=n[5],f=+n[6],d=n[7],h=n[8],p=n[9],g=1,m="",y="",v=!1,x=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===s)&&(l=r="0",s="="),p){case"n":d=!0,p="g";break;case"%":g=100,y="%",p="f";break;case"p":g=100,y="%",p="r";break;case"b":case"o":case"x":case"X":"#"===c&&(m="0"+p.toLowerCase());case"c":x=!1;case"d":v=!0,h=0;break;case"s":g=-1,p="r"}"$"===c&&(m=i[0],y=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=qt.get(p)||zt;var w=l&&d;return function(e){var n=y;if(v&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===u?"":u;if(g<0){var c=o.formatPrefix(e,h);e=c.scale(e),n=c.symbol+y}else e*=g;var b,S,C=(e=p(e,h)).lastIndexOf(".");if(C<0){var M=x?e.lastIndexOf("e"):-1;M<0?(b=e,S=""):(b=e.substring(0,M),S=e.substring(M))}else b=e.substring(0,C),S=t+e.substring(C+1);!l&&d&&(b=a(b,1/0));var _=m.length+b.length+S.length+(w?0:i.length),E=_<f?new Array(_=f-_+1).join(r):"";return w&&(b=a(E+b,E.length?f-S.length:1/0)),i+=m,e=b+S,("<"===s?i+e+E:">"===s?E+i+e:"^"===s?E.substring(0,_>>=1)+i+e+E.substring(_):i+(w?e:E+e))+n}}}o.formatPrefix=function(e,t){var n=0;return(e=+e)&&(e<0&&(e*=-1),t&&(e=o.round(e,Dt(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),$t[8+n/3]};var Ot=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,qt=o.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=o.round(e,Dt(e,t))).toFixed(Math.max(0,Math.min(20,Dt(e*(1+1e-15),t))))}});function zt(e){return e+""}var jt=o.time={},Ut=Date;function Ht(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}Ht.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Ft.setUTCDate.apply(this._,arguments)},setDay:function(){Ft.setUTCDay.apply(this._,arguments)},setFullYear:function(){Ft.setUTCFullYear.apply(this._,arguments)},setHours:function(){Ft.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Ft.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Ft.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Ft.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Ft.setUTCSeconds.apply(this._,arguments)},setTime:function(){Ft.setTime.apply(this._,arguments)}};var Ft=Date.prototype;function Gt(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new Ut(n-1)),1),n}function o(e,n){return t(e=new Ut(+e),n),e}function a(e,r,o){var a=i(e),s=[];if(o>1)for(;a<r;)n(a)%o||s.push(new Date(+a)),t(a,1);else for(;a<r;)s.push(new Date(+a)),t(a,1);return s}e.floor=e,e.round=r,e.ceil=i,e.offset=o,e.range=a;var s=e.utc=Qt(e);return s.floor=s,s.round=Qt(r),s.ceil=Qt(i),s.offset=Qt(o),s.range=function(e,t,n){try{Ut=Ht;var r=new Ht;return r._=e,a(r,t,n)}finally{Ut=Date}},e}function Qt(e){return function(t,n){try{Ut=Ht;var r=new Ht;return r._=t,e(r,n)._}finally{Ut=Date}}}function Vt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,u=e.months,c=e.shortMonths;function l(e){var t=e.length;function n(n){for(var r,i,o,a=[],s=-1,u=0;++s<t;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=Bt[r=e.charAt(++s)])&&(r=e.charAt(++s)),(o=b[r])&&(r=o(n,null==i?"e"===r?" ":"0":i)),a.push(r),u=s+1);return a.push(e.slice(u,s)),a.join("")}return n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(f(n,e,t,0)!=t.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&Ut!==Ht,i=new(r?Ht:Ut);return"j"in n?i.setFullYear(n.y,0,n.j):"W"in n||"U"in n?("w"in n||(n.w="W"in n?1:0),i.setFullYear(n.y,0,1),i.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(i.getDay()+5)%7:n.w+7*n.U-(i.getDay()+6)%7)):i.setFullYear(n.y,n.m,n.d),i.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),r?i._:i},n.toString=function(){return e},n}function f(e,t,n,r){for(var i,o,a,s=0,u=t.length,c=n.length;s<u;){if(r>=c)return-1;if(37===(i=t.charCodeAt(s++))){if(a=t.charAt(s++),!(o=S[a in Bt?t.charAt(s++):a])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}l.utc=function(e){var t=l(e);function n(e){try{var n=new(Ut=Ht);return n._=e,t(n)}finally{Ut=Date}}return n.parse=function(e){try{Ut=Ht;var n=t.parse(e);return n&&n._}finally{Ut=Date}},n.toString=t.toString,n},l.multi=l.utc.multi=gn;var d=o.map(),h=Zt(a),p=Kt(a),g=Zt(s),m=Kt(s),y=Zt(u),v=Kt(u),x=Zt(c),w=Kt(c);i.forEach((function(e,t){d.set(e.toLowerCase(),t)}));var b={a:function(e){return s[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return c[e.getMonth()]},B:function(e){return u[e.getMonth()]},c:l(t),d:function(e,t){return Xt(e.getDate(),t,2)},e:function(e,t){return Xt(e.getDate(),t,2)},H:function(e,t){return Xt(e.getHours(),t,2)},I:function(e,t){return Xt(e.getHours()%12||12,t,2)},j:function(e,t){return Xt(1+jt.dayOfYear(e),t,3)},L:function(e,t){return Xt(e.getMilliseconds(),t,3)},m:function(e,t){return Xt(e.getMonth()+1,t,2)},M:function(e,t){return Xt(e.getMinutes(),t,2)},p:function(e){return i[+(e.getHours()>=12)]},S:function(e,t){return Xt(e.getSeconds(),t,2)},U:function(e,t){return Xt(jt.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Xt(jt.mondayOfYear(e),t,2)},x:l(n),X:l(r),y:function(e,t){return Xt(e.getFullYear()%100,t,2)},Y:function(e,t){return Xt(e.getFullYear()%1e4,t,4)},Z:hn,"%":function(){return"%"}},S={a:function(e,t,n){g.lastIndex=0;var r=g.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){h.lastIndex=0;var r=h.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){x.lastIndex=0;var r=x.exec(t.slice(n));return r?(e.m=w.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){y.lastIndex=0;var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,t,n){return f(e,b.c.toString(),t,n)},d:sn,e:sn,H:cn,I:cn,j:un,L:dn,m:an,M:ln,p:function(e,t,n){var r=d.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)},S:fn,U:en,w:Jt,W:tn,x:function(e,t,n){return f(e,b.x.toString(),t,n)},X:function(e,t,n){return f(e,b.X.toString(),t,n)},y:rn,Y:nn,Z:on,"%":pn};return l}jt.year=Gt((function(e){return(e=jt.day(e)).setMonth(0,1),e}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e){return e.getFullYear()})),jt.years=jt.year.range,jt.years.utc=jt.year.utc.range,jt.day=Gt((function(e){var t=new Ut(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e){return e.getDate()-1})),jt.days=jt.day.range,jt.days.utc=jt.day.utc.range,jt.dayOfYear=function(e){var t=jt.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(e,t){t=7-t;var n=jt[e]=Gt((function(e){return(e=jt.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e}),(function(e,t){e.setDate(e.getDate()+7*Math.floor(t))}),(function(e){var n=jt.year(e).getDay();return Math.floor((jt.dayOfYear(e)+(n+t)%7)/7)-(n!==t)}));jt[e+"s"]=n.range,jt[e+"s"].utc=n.utc.range,jt[e+"OfYear"]=function(e){var n=jt.year(e).getDay();return Math.floor((jt.dayOfYear(e)+(n+t)%7)/7)}})),jt.week=jt.sunday,jt.weeks=jt.sunday.range,jt.weeks.utc=jt.sunday.utc.range,jt.weekOfYear=jt.sundayOfYear;var Bt={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,Yt=/^%/;function Xt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Zt(e){return new RegExp("^(?:"+e.map(o.requote).join("|")+")","i")}function Kt(e){for(var t=new _,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function Jt(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function en(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n));return r?(e.U=+r[0],n+r[0].length):-1}function tn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n));return r?(e.W=+r[0],n+r[0].length):-1}function nn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function rn(e,t,n){Wt.lastIndex=0;var r,i=Wt.exec(t.slice(n,n+2));return i?(e.y=(r=+i[0])+(r>68?1900:2e3),n+i[0].length):-1}function on(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function an(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function sn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function un(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function cn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ln(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function fn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function dn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function hn(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=S(t)/60|0,i=S(t)%60;return n+Xt(r,"0",2)+Xt(i,"0",2)}function pn(e,t,n){Yt.lastIndex=0;var r=Yt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function gn(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}o.locale=function(e){return{numberFormat:Pt(e),timeFormat:Vt(e)}};var mn=o.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function yn(){}o.format=mn.numberFormat,o.geo={},yn.prototype={s:0,t:0,add:function(e){xn(e,this.t,vn),xn(vn.s,this.s,this),this.s?this.t+=vn.t:this.s=vn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var vn=new yn;function xn(e,t,n){var r=n.s=e+t,i=r-e,o=r-i;n.t=e-o+(t-i)}function wn(e,t){e&&Sn.hasOwnProperty(e.type)&&Sn[e.type](e,t)}o.geo.stream=function(e,t){e&&bn.hasOwnProperty(e.type)?bn[e.type](e,t):wn(e,t)};var bn={Feature:function(e,t){wn(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)wn(n[r].geometry,t)}},Sn={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Cn(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Cn(n[r],t,0)},Polygon:function(e,t){Mn(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Mn(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)wn(n[r],t)}};function Cn(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function Mn(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Cn(e[n],t,1);t.polygonEnd()}o.geo.area=function(e){return _n=0,o.geo.stream(e,qn),_n};var _n,En,kn,Tn,Rn,An,In,Nn,Ln,Dn,$n,Pn,On=new yn,qn={sphere:function(){_n+=4*Ie},point:j,lineStart:j,lineEnd:j,polygonStart:function(){On.reset(),qn.lineStart=zn},polygonEnd:function(){var e=2*On;_n+=e<0?4*Ie+e:e,qn.lineStart=qn.lineEnd=qn.point=j}};function zn(){var e,t,n,r,i;function o(e,t){t=t*$e/2+Ie/4;var o=(e*=$e)-n,a=o>=0?1:-1,s=a*o,u=Math.cos(t),c=Math.sin(t),l=i*c,f=r*u+l*Math.cos(s),d=l*a*Math.sin(s);On.add(Math.atan2(d,f)),n=e,r=u,i=c}qn.point=function(a,s){qn.point=o,n=(e=a)*$e,r=Math.cos(s=(t=s)*$e/2+Ie/4),i=Math.sin(s)},qn.lineEnd=function(){o(e,t)}}function jn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function Un(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Hn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Fn(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Gn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Qn(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Vn(e){return[Math.atan2(e[1],e[0]),je(e[2])]}function Bn(e,t){return S(e[0]-t[0])<Re&&S(e[1]-t[1])<Re}o.geo.bounds=function(){var e,t,n,r,i,a,s,u,c,l,f,d={point:h,lineStart:g,lineEnd:m,polygonStart:function(){d.point=y,d.lineStart=v,d.lineEnd=x,c=0,qn.polygonStart()},polygonEnd:function(){qn.polygonEnd(),d.point=h,d.lineStart=g,d.lineEnd=m,On<0?(e=-(n=180),t=-(r=90)):c>Re?r=90:c<-Re&&(t=-90),f[0]=e,f[1]=n}};function h(i,o){l.push(f=[e=i,n=i]),o<t&&(t=o),o>r&&(r=o)}function p(o,a){var s=jn([o*$e,a*$e]);if(u){var c=Hn(u,s),l=Hn([c[1],-c[0],0],c);Qn(l),l=Vn(l);var f=o-i,d=f>0?1:-1,p=l[0]*Pe*d,g=S(f)>180;if(g^(d*i<p&&p<d*o))(m=l[1]*Pe)>r&&(r=m);else if(g^(d*i<(p=(p+360)%360-180)&&p<d*o)){var m;(m=-l[1]*Pe)<t&&(t=m)}else a<t&&(t=a),a>r&&(r=a);g?o<i?w(e,o)>w(e,n)&&(n=o):w(o,n)>w(e,n)&&(e=o):n>=e?(o<e&&(e=o),o>n&&(n=o)):o>i?w(e,o)>w(e,n)&&(n=o):w(o,n)>w(e,n)&&(e=o)}else h(o,a);u=s,i=o}function g(){d.point=p}function m(){f[0]=e,f[1]=n,d.point=h,u=null}function y(e,t){if(u){var n=e-i;c+=S(n)>180?n+(n>0?360:-360):n}else a=e,s=t;qn.point(e,t),p(e,t)}function v(){qn.lineStart()}function x(){y(a,s),qn.lineEnd(),S(c)>Re&&(e=-(n=180)),f[0]=e,f[1]=n,u=null}function w(e,t){return(t-=e)<0?t+360:t}function b(e,t){return e[0]-t[0]}function C(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}return function(i){if(r=n=-(e=t=1/0),l=[],o.geo.stream(i,d),c=l.length){l.sort(b);for(var a=1,s=[g=l[0]];a<c;++a)C((h=l[a])[0],g)||C(h[1],g)?(w(g[0],h[1])>w(g[0],g[1])&&(g[1]=h[1]),w(h[0],g[1])>w(g[0],g[1])&&(g[0]=h[0])):s.push(g=h);for(var u,c,h,p=-1/0,g=(a=0,s[c=s.length-1]);a<=c;g=h,++a)h=s[a],(u=w(g[1],h[0]))>p&&(p=u,e=h[0],n=g[1])}return l=f=null,e===1/0||t===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,t],[n,r]]}}(),o.geo.centroid=function(e){En=kn=Tn=Rn=An=In=Nn=Ln=Dn=$n=Pn=0,o.geo.stream(e,Wn);var t=Dn,n=$n,r=Pn,i=t*t+n*n+r*r;return i<Ae&&(t=In,n=Nn,r=Ln,kn<Re&&(t=Tn,n=Rn,r=An),(i=t*t+n*n+r*r)<Ae)?[NaN,NaN]:[Math.atan2(n,t)*Pe,je(r/Math.sqrt(i))*Pe]};var Wn={sphere:j,point:Yn,lineStart:Zn,lineEnd:Kn,polygonStart:function(){Wn.lineStart=Jn},polygonEnd:function(){Wn.lineStart=Zn}};function Yn(e,t){e*=$e;var n=Math.cos(t*=$e);Xn(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function Xn(e,t,n){++En,Tn+=(e-Tn)/En,Rn+=(t-Rn)/En,An+=(n-An)/En}function Zn(){var e,t,n;function r(r,i){r*=$e;var o=Math.cos(i*=$e),a=o*Math.cos(r),s=o*Math.sin(r),u=Math.sin(i),c=Math.atan2(Math.sqrt((c=t*u-n*s)*c+(c=n*a-e*u)*c+(c=e*s-t*a)*c),e*a+t*s+n*u);kn+=c,In+=c*(e+(e=a)),Nn+=c*(t+(t=s)),Ln+=c*(n+(n=u)),Xn(e,t,n)}Wn.point=function(i,o){i*=$e;var a=Math.cos(o*=$e);e=a*Math.cos(i),t=a*Math.sin(i),n=Math.sin(o),Wn.point=r,Xn(e,t,n)}}function Kn(){Wn.point=Yn}function Jn(){var e,t,n,r,i;function o(e,t){e*=$e;var o=Math.cos(t*=$e),a=o*Math.cos(e),s=o*Math.sin(e),u=Math.sin(t),c=r*u-i*s,l=i*a-n*u,f=n*s-r*a,d=Math.sqrt(c*c+l*l+f*f),h=n*a+r*s+i*u,p=d&&-ze(h)/d,g=Math.atan2(d,h);Dn+=p*c,$n+=p*l,Pn+=p*f,kn+=g,In+=g*(n+(n=a)),Nn+=g*(r+(r=s)),Ln+=g*(i+(i=u)),Xn(n,r,i)}Wn.point=function(a,s){e=a,t=s,Wn.point=o,a*=$e;var u=Math.cos(s*=$e);n=u*Math.cos(a),r=u*Math.sin(a),i=Math.sin(s),Xn(n,r,i)},Wn.lineEnd=function(){o(e,t),Wn.lineEnd=Kn,Wn.point=Yn}}function er(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function tr(){return!0}function nr(e,t,n,r,i){var o=[],a=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(Bn(n,r)){i.lineStart();for(var s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd()}else{var u=new ir(n,e,null,!0),c=new ir(n,null,u,!1);u.o=c,o.push(u),a.push(c),u=new ir(r,e,null,!1),c=new ir(r,null,u,!0),u.o=c,o.push(u),a.push(c)}}})),a.sort(t),rr(o),rr(a),o.length){for(var s=0,u=n,c=a.length;s<c;++s)a[s].e=u=!u;for(var l,f,d=o[0];;){for(var h=d,p=!0;h.v;)if((h=h.n)===d)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(s=0,c=l.length;s<c;++s)i.point((f=l[s])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(s=(l=h.p.z).length-1;s>=0;--s)i.point((f=l[s])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function rr(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function ir(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function or(e,t,n,r){return function(i,a){var s,u=t(a),c=i.invert(r[0],r[1]),l={point:f,lineStart:h,lineEnd:p,polygonStart:function(){l.point=w,l.lineStart=b,l.lineEnd=S,s=[],g=[]},polygonEnd:function(){l.point=f,l.lineStart=h,l.lineEnd=p,s=o.merge(s);var e=function(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;On.reset();for(var s=0,u=t.length;s<u;++s){var c=t[s],l=c.length;if(l)for(var f=c[0],d=f[0],h=f[1]/2+Ie/4,p=Math.sin(h),g=Math.cos(h),m=1;;){m===l&&(m=0);var y=(e=c[m])[0],v=e[1]/2+Ie/4,x=Math.sin(v),w=Math.cos(v),b=y-d,S=b>=0?1:-1,C=S*b,M=C>Ie,_=p*x;if(On.add(Math.atan2(_*S*Math.sin(C),g*w+_*Math.cos(C))),o+=M?b+S*Ne:b,M^d>=n^y>=n){var E=Hn(jn(f),jn(e));Qn(E);var k=Hn(i,E);Qn(k);var T=(M^b>=0?-1:1)*je(k[2]);(r>T||r===T&&(E[0]||E[1]))&&(a+=M^b>=0?1:-1)}if(!m++)break;d=y,p=x,g=w,f=e}}return(o<-Re||o<Re&&On<0)^1&a}(c,g);s.length?(x||(a.polygonStart(),x=!0),nr(s,ur,e,n,a)):e&&(x||(a.polygonStart(),x=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),s=g=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function f(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&a.point(t,n)}function d(e,t){var n=i(e,t);u.point(n[0],n[1])}function h(){l.point=d,u.lineStart()}function p(){l.point=f,u.lineEnd()}var g,m,y=sr(),v=t(y),x=!1;function w(e,t){m.push([e,t]);var n=i(e,t);v.point(n[0],n[1])}function b(){v.lineStart(),m=[]}function S(){w(m[0][0],m[0][1]),v.lineEnd();var e,t=v.clean(),n=y.buffer(),r=n.length;if(m.pop(),g.push(m),m=null,r)if(1&t){var i,o=-1;if((r=(e=n[0]).length-1)>0){for(x||(a.polygonStart(),x=!0),a.lineStart();++o<r;)a.point((i=e[o])[0],i[1]);a.lineEnd()}}else r>1&&2&t&&n.push(n.pop().concat(n.shift())),s.push(n.filter(ar))}return l}}function ar(e){return e.length>1}function sr(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:j,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function ur(e,t){return((e=e.x)[0]<0?e[1]-De-Re:De-e[1])-((t=t.x)[0]<0?t[1]-De-Re:De-t[1])}var cr=or(tr,(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?Ie:-Ie,u=S(o-n);S(u-Ie)<Re?(e.point(n,r=(r+a)/2>0?De:-De),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&u>=Ie&&(S(n-i)<Re&&(n-=i*Re),S(o-s)<Re&&(o-=s*Re),r=function(e,t,n,r){var i,o,a=Math.sin(e-n);return S(a)>Re?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*De,r.point(-Ie,i),r.point(0,i),r.point(Ie,i),r.point(Ie,0),r.point(Ie,-i),r.point(0,-i),r.point(-Ie,-i),r.point(-Ie,0),r.point(-Ie,i);else if(S(e[0]-t[0])>Re){var o=e[0]<t[0]?Ie:-Ie;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}),[-Ie,-Ie/2]);function lr(e){var t=Math.cos(e),n=t>0,r=S(t)>Re;return or(i,(function(e){var t,s,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(f,d){var h,p=[f,d],g=i(f,d),m=n?g?0:a(f,d):g?a(f+(f<0?Ie:-Ie),d):0;if(!t&&(c=u=g)&&e.lineStart(),g!==u&&(h=o(t,p),(Bn(t,h)||Bn(p,h))&&(p[0]+=Re,p[1]+=Re,g=i(p[0],p[1]))),g!==u)l=0,g?(e.lineStart(),h=o(p,t),e.point(h[0],h[1])):(h=o(t,p),e.point(h[0],h[1]),e.lineEnd()),t=h;else if(r&&t&&n^g){var y;m&s||!(y=o(p,t,!0))||(l=0,n?(e.lineStart(),e.point(y[0][0],y[0][1]),e.point(y[1][0],y[1][1]),e.lineEnd()):(e.point(y[1][0],y[1][1]),e.lineEnd(),e.lineStart(),e.point(y[0][0],y[0][1])))}!g||t&&Bn(t,p)||e.point(p[0],p[1]),t=p,u=g,s=m},lineEnd:function(){u&&e.lineEnd(),t=null},clean:function(){return l|(c&&u)<<1}}}),Br(e,6*$e),n?[0,-e]:[-Ie,e-Ie]);function i(e,n){return Math.cos(e)*Math.cos(n)>t}function o(e,n,r){var i=[1,0,0],o=Hn(jn(e),jn(n)),a=Un(o,o),s=o[0],u=a-s*s;if(!u)return!r&&e;var c=t*a/u,l=-t*s/u,f=Hn(i,o),d=Gn(i,c);Fn(d,Gn(o,l));var h=f,p=Un(d,h),g=Un(h,h),m=p*p-g*(Un(d,d)-1);if(!(m<0)){var y=Math.sqrt(m),v=Gn(h,(-p-y)/g);if(Fn(v,d),v=Vn(v),!r)return v;var x,w=e[0],b=n[0],C=e[1],M=n[1];b<w&&(x=w,w=b,b=x);var _=b-w,E=S(_-Ie)<Re;if(!E&&M<C&&(x=C,C=M,M=x),E||_<Re?E?C+M>0^v[1]<(S(v[0]-w)<Re?C:M):C<=v[1]&&v[1]<=M:_>Ie^(w<=v[0]&&v[0]<=b)){var k=Gn(h,(-p+y)/g);return Fn(k,d),[v,Vn(k)]}}}function a(t,r){var i=n?e:Ie-e,o=0;return t<-i?o|=1:t>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}}function fr(e,t,n,r){return function(i){var o,a=i.a,s=i.b,u=a.x,c=a.y,l=0,f=1,d=s.x-u,h=s.y-c;if(o=e-u,d||!(o>0)){if(o/=d,d<0){if(o<l)return;o<f&&(f=o)}else if(d>0){if(o>f)return;o>l&&(l=o)}if(o=n-u,d||!(o<0)){if(o/=d,d<0){if(o>f)return;o>l&&(l=o)}else if(d>0){if(o<l)return;o<f&&(f=o)}if(o=t-c,h||!(o>0)){if(o/=h,h<0){if(o<l)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>l&&(l=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>l&&(l=o)}else if(h>0){if(o<l)return;o<f&&(f=o)}return l>0&&(i.a={x:u+l*d,y:c+l*h}),f<1&&(i.b={x:u+f*d,y:c+f*h}),i}}}}}}var dr=1e9;function hr(e,t,n,r){return function(u){var c,l,f,d,h,p,g,m,y,v,x,w=u,b=sr(),S=fr(e,t,n,r),C={point:E,lineStart:function(){C.point=k,l&&l.push(f=[]);v=!0,y=!1,g=m=NaN},lineEnd:function(){c&&(k(d,h),p&&y&&b.rejoin(),c.push(b.buffer()));C.point=E,y&&u.lineEnd()},polygonStart:function(){u=b,c=[],l=[],x=!0},polygonEnd:function(){u=w,c=o.merge(c);var t=function(e){for(var t=0,n=l.length,r=e[1],i=0;i<n;++i)for(var o,a=1,s=l[i],u=s.length,c=s[0];a<u;++a)o=s[a],c[1]<=r?o[1]>r&&qe(c,o,e)>0&&++t:o[1]<=r&&qe(c,o,e)<0&&--t,c=o;return 0!==t}([e,r]),n=x&&t,i=c.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),M(null,null,1,u),u.lineEnd()),i&&nr(c,a,t,M,u),u.polygonEnd()),c=l=f=null}};function M(o,a,u,c){var l=0,f=0;if(null==o||(l=i(o,u))!==(f=i(a,u))||s(o,a)<0^u>0)do{c.point(0===l||3===l?e:n,l>1?r:t)}while((l=(l+u+4)%4)!==f);else c.point(a[0],a[1])}function _(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function E(e,t){_(e,t)&&u.point(e,t)}function k(e,t){var n=_(e=Math.max(-dr,Math.min(dr,e)),t=Math.max(-dr,Math.min(dr,t)));if(l&&f.push([e,t]),v)d=e,h=t,p=n,v=!1,n&&(u.lineStart(),u.point(e,t));else if(n&&y)u.point(e,t);else{var r={a:{x:g,y:m},b:{x:e,y:t}};S(r)?(y||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),x=!1):n&&(u.lineStart(),u.point(e,t),x=!1)}g=e,m=t,y=n}return C};function i(r,i){return S(r[0]-e)<Re?i>0?0:3:S(r[0]-n)<Re?i>0?2:1:S(r[1]-t)<Re?i>0?1:0:i>0?3:2}function a(e,t){return s(e.x,t.x)}function s(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}}function pr(e){var t=0,n=Ie/3,r=zr(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Ie/180,n=e[1]*Ie/180):[t/Ie*180,n/Ie*180]},i}function gr(e,t){var n=Math.sin(e),r=(n+Math.sin(t))/2,i=1+n*(2*r-n),o=Math.sqrt(i)/r;function a(e,t){var n=Math.sqrt(i-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),o-n*Math.cos(e)]}return a.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/r,je((i-(e*e+n*n)*r*r)/(2*r))]},a}o.geo.clipExtent=function(){var e,t,n,r,i,o,a={stream:function(e){return i&&(i.valid=!1),(i=o(e)).valid=!0,i},extent:function(s){return arguments.length?(o=hr(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[e,t],[n,r]]}};return a.extent([[0,0],[960,500]])},(o.geo.conicEqualArea=function(){return pr(gr)}).raw=gr,o.geo.albers=function(){return o.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},o.geo.albersUsa=function(){var e,t,n,r,i=o.geo.albers(),a=o.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=o.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,n){e=[t,n]}};function c(i){var o=i[0],a=i[1];return e=null,t(o,a),e||(n(o,a),e)||r(o,a),e}return c.invert=function(e){var t=i.scale(),n=i.translate(),r=(e[0]-n[0])/t,o=(e[1]-n[1])/t;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?a:o>=.166&&o<.234&&r>=-.214&&r<-.115?s:i).invert(e)},c.stream=function(e){var t=i.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},c.precision=function(e){return arguments.length?(i.precision(e),a.precision(e),s.precision(e),c):i.precision()},c.scale=function(e){return arguments.length?(i.scale(e),a.scale(.35*e),s.scale(e),c.translate(i.translate())):i.scale()},c.translate=function(e){if(!arguments.length)return i.translate();var o=i.scale(),l=+e[0],f=+e[1];return t=i.translate(e).clipExtent([[l-.455*o,f-.238*o],[l+.455*o,f+.238*o]]).stream(u).point,n=a.translate([l-.307*o,f+.201*o]).clipExtent([[l-.425*o+Re,f+.12*o+Re],[l-.214*o-Re,f+.234*o-Re]]).stream(u).point,r=s.translate([l-.205*o,f+.212*o]).clipExtent([[l-.214*o+Re,f+.166*o+Re],[l-.115*o-Re,f+.234*o-Re]]).stream(u).point,c},c.scale(1070)};var mr,yr,vr,xr,wr,br,Sr={point:j,lineStart:j,lineEnd:j,polygonStart:function(){yr=0,Sr.lineStart=Cr},polygonEnd:function(){Sr.lineStart=Sr.lineEnd=Sr.point=j,mr+=S(yr/2)}};function Cr(){var e,t,n,r;function i(e,t){yr+=r*e-n*t,n=e,r=t}Sr.point=function(o,a){Sr.point=i,e=n=o,t=r=a},Sr.lineEnd=function(){i(e,t)}}var Mr={point:function(e,t){e<vr&&(vr=e);e>wr&&(wr=e);t<xr&&(xr=t);t>br&&(br=t)},lineStart:j,lineEnd:j,polygonStart:j,polygonEnd:j};function _r(){var e=Er(4.5),t=[],n={point:r,lineStart:function(){n.point=i},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=r},pointRadius:function(t){return e=Er(t),n},result:function(){if(t.length){var e=t.join("");return t=[],e}}};function r(n,r){t.push("M",n,",",r,e)}function i(e,r){t.push("M",e,",",r),n.point=o}function o(e,n){t.push("L",e,",",n)}function a(){n.point=r}function s(){t.push("Z")}return n}function Er(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var kr,Tr={point:Rr,lineStart:Ar,lineEnd:Ir,polygonStart:function(){Tr.lineStart=Nr},polygonEnd:function(){Tr.point=Rr,Tr.lineStart=Ar,Tr.lineEnd=Ir}};function Rr(e,t){Tn+=e,Rn+=t,++An}function Ar(){var e,t;function n(n,r){var i=n-e,o=r-t,a=Math.sqrt(i*i+o*o);In+=a*(e+n)/2,Nn+=a*(t+r)/2,Ln+=a,Rr(e=n,t=r)}Tr.point=function(r,i){Tr.point=n,Rr(e=r,t=i)}}function Ir(){Tr.point=Rr}function Nr(){var e,t,n,r;function i(e,t){var i=e-n,o=t-r,a=Math.sqrt(i*i+o*o);In+=a*(n+e)/2,Nn+=a*(r+t)/2,Ln+=a,Dn+=(a=r*e-n*t)*(n+e),$n+=a*(r+t),Pn+=3*a,Rr(n=e,r=t)}Tr.point=function(o,a){Tr.point=i,Rr(e=n=o,t=r=a)},Tr.lineEnd=function(){i(e,t)}}function Lr(e){var t=4.5,n={point:r,lineStart:function(){n.point=i},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=r},pointRadius:function(e){return t=e,n},result:j};function r(n,r){e.moveTo(n+t,r),e.arc(n,r,t,0,Ne)}function i(t,r){e.moveTo(t,r),n.point=o}function o(t,n){e.lineTo(t,n)}function a(){n.point=r}function s(){e.closePath()}return n}function Dr(e){var t=.5,n=Math.cos(30*$e),r=16;function i(e){return(r?a:o)(e)}function o(t){return Or(t,(function(n,r){n=e(n,r),t.point(n[0],n[1])}))}function a(t){var n,i,o,a,u,c,l,f,d,h,p,g,m={point:y,lineStart:v,lineEnd:w,polygonStart:function(){t.polygonStart(),m.lineStart=b},polygonEnd:function(){t.polygonEnd(),m.lineStart=v}};function y(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){f=NaN,m.point=x,t.lineStart()}function x(n,i){var o=jn([n,i]),a=e(n,i);s(f,d,l,h,p,g,f=a[0],d=a[1],l=n,h=o[0],p=o[1],g=o[2],r,t),t.point(f,d)}function w(){m.point=y,t.lineEnd()}function b(){v(),m.point=S,m.lineEnd=C}function S(e,t){x(n=e,t),i=f,o=d,a=h,u=p,c=g,m.point=x}function C(){s(f,d,l,h,p,g,i,o,n,a,u,c,r,t),m.lineEnd=w,w()}return m}function s(r,i,o,a,u,c,l,f,d,h,p,g,m,y){var v=l-r,x=f-i,w=v*v+x*x;if(w>4*t&&m--){var b=a+h,C=u+p,M=c+g,_=Math.sqrt(b*b+C*C+M*M),E=Math.asin(M/=_),k=S(S(M)-1)<Re||S(o-d)<Re?(o+d)/2:Math.atan2(C,b),T=e(k,E),R=T[0],A=T[1],I=R-r,N=A-i,L=x*I-v*N;(L*L/w>t||S((v*I+x*N)/w-.5)>.3||a*h+u*p+c*g<n)&&(s(r,i,o,a,u,c,R,A,k,b/=_,C/=_,M,m,y),y.point(R,A),s(R,A,k,b,C,M,l,f,d,h,p,g,m,y))}}return i.precision=function(e){return arguments.length?(r=(t=e*e)>0&&16,i):Math.sqrt(t)},i}function $r(e){var t=Dr((function(t,n){return e([t*Pe,n*Pe])}));return function(e){return jr(t(e))}}function Pr(e){this.stream=e}function Or(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function qr(e){return zr((function(){return e}))()}function zr(e){var t,n,r,i,a,s,u=Dr((function(e,n){return[(e=t(e,n))[0]*c+i,a-e[1]*c]})),c=150,l=480,f=250,d=0,h=0,p=0,g=0,m=0,y=cr,v=P,x=null,w=null;function b(e){return[(e=r(e[0]*$e,e[1]*$e))[0]*c+i,a-e[1]*c]}function S(e){return(e=r.invert((e[0]-i)/c,(a-e[1])/c))&&[e[0]*Pe,e[1]*Pe]}function C(){r=er(n=Fr(p,g,m),t);var e=t(d,h);return i=l-e[0]*c,a=f+e[1]*c,M()}function M(){return s&&(s.valid=!1,s=null),b}return b.stream=function(e){return s&&(s.valid=!1),(s=jr(y(n,u(v(e))))).valid=!0,s},b.clipAngle=function(e){return arguments.length?(y=null==e?(x=e,cr):lr((x=+e)*$e),M()):x},b.clipExtent=function(e){return arguments.length?(w=e,v=e?hr(e[0][0],e[0][1],e[1][0],e[1][1]):P,M()):w},b.scale=function(e){return arguments.length?(c=+e,C()):c},b.translate=function(e){return arguments.length?(l=+e[0],f=+e[1],C()):[l,f]},b.center=function(e){return arguments.length?(d=e[0]%360*$e,h=e[1]%360*$e,C()):[d*Pe,h*Pe]},b.rotate=function(e){return arguments.length?(p=e[0]%360*$e,g=e[1]%360*$e,m=e.length>2?e[2]%360*$e:0,C()):[p*Pe,g*Pe,m*Pe]},o.rebind(b,u,"precision"),function(){return t=e.apply(this,arguments),b.invert=t.invert&&S,C()}}function jr(e){return Or(e,(function(t,n){e.point(t*$e,n*$e)}))}function Ur(e,t){return[e,t]}function Hr(e,t){return[e>Ie?e-Ne:e<-Ie?e+Ne:e,t]}function Fr(e,t,n){return e?t||n?er(Qr(e),Vr(t,n)):Qr(e):t||n?Vr(t,n):Hr}function Gr(e){return function(t,n){return[(t+=e)>Ie?t-Ne:t<-Ie?t+Ne:t,n]}}function Qr(e){var t=Gr(e);return t.invert=Gr(-e),t}function Vr(e,t){var n=Math.cos(e),r=Math.sin(e),i=Math.cos(t),o=Math.sin(t);function a(e,t){var a=Math.cos(t),s=Math.cos(e)*a,u=Math.sin(e)*a,c=Math.sin(t),l=c*n+s*r;return[Math.atan2(u*i-l*o,s*n-c*r),je(l*i+u*o)]}return a.invert=function(e,t){var a=Math.cos(t),s=Math.cos(e)*a,u=Math.sin(e)*a,c=Math.sin(t),l=c*i-u*o;return[Math.atan2(u*i+c*o,s*n+l*r),je(l*n-s*r)]},a}function Br(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var u=a*t;null!=i?(i=Wr(n,i),o=Wr(n,o),(a>0?i<o:i>o)&&(i+=a*Ne)):(i=e+a*Ne,o=e-.5*u);for(var c,l=i;a>0?l>o:l<o;l-=u)s.point((c=Vn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function Wr(e,t){var n=jn(t);n[0]-=e,Qn(n);var r=ze(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Re)%(2*Math.PI)}function Yr(e,t,n){var r=o.range(e,t-Re,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function Xr(e,t,n){var r=o.range(e,t-Re,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function Zr(e){return e.source}function Kr(e){return e.target}o.geo.path=function(){var e,t,n,r,i,a=4.5;function s(e){return e&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),i&&i.valid||(i=n(r)),o.geo.stream(e,i)),r.result()}function u(){return i=null,s}return s.area=function(e){return mr=0,o.geo.stream(e,n(Sr)),mr},s.centroid=function(e){return Tn=Rn=An=In=Nn=Ln=Dn=$n=Pn=0,o.geo.stream(e,n(Tr)),Pn?[Dn/Pn,$n/Pn]:Ln?[In/Ln,Nn/Ln]:An?[Tn/An,Rn/An]:[NaN,NaN]},s.bounds=function(e){return wr=br=-(vr=xr=1/0),o.geo.stream(e,n(Mr)),[[vr,xr],[wr,br]]},s.projection=function(t){return arguments.length?(n=(e=t)?t.stream||$r(t):P,u()):e},s.context=function(e){return arguments.length?(r=null==(t=e)?new _r:new Lr(e),"function"!=typeof a&&r.pointRadius(a),u()):t},s.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(r.pointRadius(+e),+e),s):a},s.projection(o.geo.albersUsa()).context(null)},o.geo.transform=function(e){return{stream:function(t){var n=new Pr(t);for(var r in e)n[r]=e[r];return n}}},Pr.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},o.geo.projection=qr,o.geo.projectionMutator=zr,(o.geo.equirectangular=function(){return qr(Ur)}).raw=Ur.invert=Ur,o.geo.rotation=function(e){function t(t){return(t=e(t[0]*$e,t[1]*$e))[0]*=Pe,t[1]*=Pe,t}return e=Fr(e[0]%360*$e,e[1]*$e,e.length>2?e[2]*$e:0),t.invert=function(t){return(t=e.invert(t[0]*$e,t[1]*$e))[0]*=Pe,t[1]*=Pe,t},t},Hr.invert=Ur,o.geo.circle=function(){var e,t,n=[0,0],r=6;function i(){var e="function"==typeof n?n.apply(this,arguments):n,r=Fr(-e[0]*$e,-e[1]*$e,0).invert,i=[];return t(null,null,1,{point:function(e,t){i.push(e=r(e,t)),e[0]*=Pe,e[1]*=Pe}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(e){return arguments.length?(n=e,i):n},i.angle=function(n){return arguments.length?(t=Br((e=+n)*$e,r*$e),i):e},i.precision=function(n){return arguments.length?(t=Br(e*$e,(r=+n)*$e),i):r},i.angle(90)},o.geo.distance=function(e,t){var n,r=(t[0]-e[0])*$e,i=e[1]*$e,o=t[1]*$e,a=Math.sin(r),s=Math.cos(r),u=Math.sin(i),c=Math.cos(i),l=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*a)*n+(n=c*l-u*f*s)*n),u*l+c*f*s)},o.geo.graticule=function(){var e,t,n,r,i,a,s,u,c,l,f,d,h=10,p=h,g=90,m=360,y=2.5;function v(){return{type:"MultiLineString",coordinates:x()}}function x(){return o.range(Math.ceil(r/g)*g,n,g).map(f).concat(o.range(Math.ceil(u/m)*m,s,m).map(d)).concat(o.range(Math.ceil(t/h)*h,e,h).filter((function(e){return S(e%g)>Re})).map(c)).concat(o.range(Math.ceil(a/p)*p,i,p).filter((function(e){return S(e%m)>Re})).map(l))}return v.lines=function(){return x().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(d(s).slice(1),f(n).reverse().slice(1),d(u).reverse().slice(1))]}},v.extent=function(e){return arguments.length?v.majorExtent(e).minorExtent(e):v.minorExtent()},v.majorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],u=+e[0][1],s=+e[1][1],r>n&&(e=r,r=n,n=e),u>s&&(e=u,u=s,s=e),v.precision(y)):[[r,u],[n,s]]},v.minorExtent=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),v.precision(y)):[[t,a],[e,i]]},v.step=function(e){return arguments.length?v.majorStep(e).minorStep(e):v.minorStep()},v.majorStep=function(e){return arguments.length?(g=+e[0],m=+e[1],v):[g,m]},v.minorStep=function(e){return arguments.length?(h=+e[0],p=+e[1],v):[h,p]},v.precision=function(o){return arguments.length?(y=+o,c=Yr(a,i,90),l=Xr(t,e,y),f=Yr(u,s,90),d=Xr(r,n,y),v):y},v.majorExtent([[-180,-90+Re],[180,90-Re]]).minorExtent([[-180,-80-Re],[180,80+Re]])},o.geo.greatArc=function(){var e,t,n=Zr,r=Kr;function i(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),t||r.apply(this,arguments)]}}return i.distance=function(){return o.geo.distance(e||n.apply(this,arguments),t||r.apply(this,arguments))},i.source=function(t){return arguments.length?(n=t,e="function"==typeof t?null:t,i):n},i.target=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,i):r},i.precision=function(){return arguments.length?i:0},i},o.geo.interpolate=function(e,t){return n=e[0]*$e,r=e[1]*$e,i=t[0]*$e,o=t[1]*$e,a=Math.cos(r),s=Math.sin(r),u=Math.cos(o),c=Math.sin(o),l=a*Math.cos(n),f=a*Math.sin(n),d=u*Math.cos(i),h=u*Math.sin(i),p=2*Math.asin(Math.sqrt(He(o-r)+a*u*He(i-n))),g=1/Math.sin(p),(m=p?function(e){var t=Math.sin(e*=p)*g,n=Math.sin(p-e)*g,r=n*l+t*d,i=n*f+t*h,o=n*s+t*c;return[Math.atan2(i,r)*Pe,Math.atan2(o,Math.sqrt(r*r+i*i))*Pe]}:function(){return[n*Pe,r*Pe]}).distance=p,m;var n,r,i,o,a,s,u,c,l,f,d,h,p,g,m},o.geo.length=function(e){return kr=0,o.geo.stream(e,Jr),kr};var Jr={sphere:j,point:j,lineStart:function(){var e,t,n;function r(r,i){var o=Math.sin(i*=$e),a=Math.cos(i),s=S((r*=$e)-e),u=Math.cos(s);kr+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=n*o-t*a*u)*s),t*o+n*a*u),e=r,t=o,n=a}Jr.point=function(i,o){e=i*$e,t=Math.sin(o*=$e),n=Math.cos(o),Jr.point=r},Jr.lineEnd=function(){Jr.point=Jr.lineEnd=j}},lineEnd:j,polygonStart:j,polygonEnd:j};function ei(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),o=e(r*i);return[o*i*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(e*o,r*a),Math.asin(r&&n*o/r)]},n}var ti=ei((function(e){return Math.sqrt(2/(1+e))}),(function(e){return 2*Math.asin(e/2)}));(o.geo.azimuthalEqualArea=function(){return qr(ti)}).raw=ti;var ni=ei((function(e){var t=Math.acos(e);return t&&t/Math.sin(t)}),P);function ri(e,t){var n=Math.cos(e),r=function(e){return Math.tan(Ie/4+e/2)},i=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(r(t)/r(e)),o=n*Math.pow(r(e),i)/i;if(!i)return ai;function a(e,t){o>0?t<-De+Re&&(t=-De+Re):t>De-Re&&(t=De-Re);var n=o/Math.pow(r(t),i);return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}return a.invert=function(e,t){var n=o-t,r=Oe(i)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/i,2*Math.atan(Math.pow(o/r,1/i))-De]},a}function ii(e,t){var n=Math.cos(e),r=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),i=n/r+e;if(S(r)<Re)return Ur;function o(e,t){var n=i-t;return[n*Math.sin(r*e),i-n*Math.cos(r*e)]}return o.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/r,i-Oe(r)*Math.sqrt(e*e+n*n)]},o}(o.geo.azimuthalEquidistant=function(){return qr(ni)}).raw=ni,(o.geo.conicConformal=function(){return pr(ri)}).raw=ri,(o.geo.conicEquidistant=function(){return pr(ii)}).raw=ii;var oi=ei((function(e){return 1/e}),Math.atan);function ai(e,t){return[e,Math.log(Math.tan(Ie/4+t/2))]}function si(e){var t,n=qr(e),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var a=o.apply(n,arguments);if(a===n){if(t=null==e){var s=Ie*r(),u=i();o([[u[0]-s,u[1]-s],[u[0]+s,u[1]+s]])}}else t&&(a=null);return a},n.clipExtent(null)}(o.geo.gnomonic=function(){return qr(oi)}).raw=oi,ai.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-De]},(o.geo.mercator=function(){return si(ai)}).raw=ai;var ui=ei((function(){return 1}),Math.asin);(o.geo.orthographic=function(){return qr(ui)}).raw=ui;var ci=ei((function(e){return 1/(1+e)}),(function(e){return 2*Math.atan(e)}));function li(e,t){return[Math.log(Math.tan(Ie/4+t/2)),-e]}function fi(e){return e[0]}function di(e){return e[1]}function hi(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;i++){for(;r>1&&qe(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function pi(e,t){return e[0]-t[0]||e[1]-t[1]}(o.geo.stereographic=function(){return qr(ci)}).raw=ci,li.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-De]},(o.geo.transverseMercator=function(){var e=si(li),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90])}).raw=li,o.geom={},o.geom.hull=function(e){var t=fi,n=di;if(arguments.length)return r(e);function r(e){if(e.length<3)return[];var r,i=St(t),o=St(n),a=e.length,s=[],u=[];for(r=0;r<a;r++)s.push([+i.call(this,e[r],r),+o.call(this,e[r],r),r]);for(s.sort(pi),r=0;r<a;r++)u.push([s[r][0],-s[r][1]]);var c=hi(s),l=hi(u),f=l[0]===c[0],d=l[l.length-1]===c[c.length-1],h=[];for(r=c.length-1;r>=0;--r)h.push(e[s[c[r]][2]]);for(r=+f;r<l.length-d;++r)h.push(e[s[l[r]][2]]);return h}return r.x=function(e){return arguments.length?(t=e,r):t},r.y=function(e){return arguments.length?(n=e,r):n},r},o.geom.polygon=function(e){return B(e,gi),e};var gi=o.geom.polygon.prototype=[];function mi(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function yi(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,u=e[1],c=n[1],l=t[1]-u,f=r[1]-c,d=(s*(u-c)-f*(i-o))/(f*a-s*l);return[i+d*a,u+d*l]}function vi(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}gi.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;)e=r,r=this[t],i+=e[1]*r[0]-e[0]*r[1];return.5*i},gi.centroid=function(e){var t,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(e=-1/(6*this.area()));++r<i;)t=s,s=this[r],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},gi.clip=function(e){for(var t,n,r,i,o,a,s=vi(e),u=-1,c=this.length-vi(this),l=this[c-1];++u<c;){for(t=e.slice(),e.length=0,i=this[u],o=t[(r=t.length-s)-1],n=-1;++n<r;)mi(a=t[n],l,i)?(mi(o,l,i)||e.push(yi(o,a,l,i)),e.push(a)):mi(o,l,i)&&e.push(yi(o,a,l,i)),o=a;s&&e.push(e[0]),l=i}return e};var xi,wi,bi,Si,Ci,Mi=[],_i=[];function Ei(){Qi(this),this.edge=this.site=this.circle=null}function ki(e){var t=Mi.pop()||new Ei;return t.site=e,t}function Ti(e){Oi(e),bi.remove(e),Mi.push(e),Qi(e)}function Ri(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Ti(e);for(var u=o;u.circle&&S(n-u.circle.x)<Re&&S(r-u.circle.cy)<Re;)o=u.P,s.unshift(u),Ti(u),u=o;s.unshift(u),Oi(u);for(var c=a;c.circle&&S(n-c.circle.x)<Re&&S(r-c.circle.cy)<Re;)a=c.N,s.push(c),Ti(c),c=a;s.push(c),Oi(c);var l,f=s.length;for(l=1;l<f;++l)c=s[l],u=s[l-1],Hi(c.edge,u.site,c.site,i);u=s[0],(c=s[f-1]).edge=ji(u.site,c.site,null,i),Pi(u),Pi(c)}function Ai(e){for(var t,n,r,i,o=e.x,a=e.y,s=bi._;s;)if((r=Ii(s,a)-o)>Re)s=s.L;else{if(!((i=o-Ni(s,a))>Re)){r>-Re?(t=s.P,n=s):i>-Re?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var u=ki(e);if(bi.insert(t,u),t||n){if(t===n)return Oi(t),n=ki(t.site),bi.insert(u,n),u.edge=n.edge=ji(t.site,u.site),Pi(t),void Pi(n);if(n){Oi(t),Oi(n);var c=t.site,l=c.x,f=c.y,d=e.x-l,h=e.y-f,p=n.site,g=p.x-l,m=p.y-f,y=2*(d*m-h*g),v=d*d+h*h,x=g*g+m*m,w={x:(m*v-h*x)/y+l,y:(d*x-g*v)/y+f};Hi(n.edge,c,p,w),u.edge=ji(c,e,null,w),n.edge=ji(e,p,null,w),Pi(t),Pi(n)}else u.edge=ji(t.site,u.site)}}function Ii(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;var s=(n=a.site).x,u=n.y,c=u-t;if(!c)return s;var l=s-r,f=1/o-1/c,d=l/c;return f?(-d+Math.sqrt(d*d-2*f*(l*l/(-2*c)-u+c/2+i-o/2)))/f+r:(r+s)/2}function Ni(e,t){var n=e.N;if(n)return Ii(n,t);var r=e.site;return r.y===t?r.x:1/0}function Li(e){this.site=e,this.edges=[]}function Di(e,t){return t.angle-e.angle}function $i(){Qi(this),this.x=this.y=this.arc=this.site=this.cy=null}function Pi(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i.x,s=i.y,u=r.x-a,c=r.y-s,l=o.x-a,f=2*(u*(m=o.y-s)-c*l);if(!(f>=-Ae)){var d=u*u+c*c,h=l*l+m*m,p=(m*d-c*h)/f,g=(u*h-l*d)/f,m=g+s,y=_i.pop()||new $i;y.arc=e,y.site=i,y.x=p+a,y.y=m+Math.sqrt(p*p+g*g),y.cy=m,e.circle=y;for(var v=null,x=Ci._;x;)if(y.y<x.y||y.y===x.y&&y.x<=x.x){if(!x.L){v=x.P;break}x=x.L}else{if(!x.R){v=x;break}x=x.R}Ci.insert(v,y),v||(Si=y)}}}}function Oi(e){var t=e.circle;t&&(t.P||(Si=t.N),Ci.remove(t),_i.push(t),Qi(t),e.circle=null)}function qi(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,a=t[0][0],s=t[1][0],u=t[0][1],c=t[1][1],l=e.l,f=e.r,d=l.x,h=l.y,p=f.x,g=f.y,m=(d+p)/2,y=(h+g)/2;if(g===h){if(m<a||m>=s)return;if(d>p){if(o){if(o.y>=c)return}else o={x:m,y:u};n={x:m,y:c}}else{if(o){if(o.y<u)return}else o={x:m,y:c};n={x:m,y:u}}}else if(i=y-(r=(d-p)/(g-h))*m,r<-1||r>1)if(d>p){if(o){if(o.y>=c)return}else o={x:(u-i)/r,y:u};n={x:(c-i)/r,y:c}}else{if(o){if(o.y<u)return}else o={x:(c-i)/r,y:c};n={x:(u-i)/r,y:u}}else if(h<g){if(o){if(o.x>=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.x<a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}return e.a=o,e.b=n,!0}function zi(e,t){this.l=e,this.r=t,this.a=this.b=null}function ji(e,t,n,r){var i=new zi(e,t);return xi.push(i),n&&Hi(i,e,t,n),r&&Hi(i,t,e,r),wi[e.i].edges.push(new Fi(i,e,t)),wi[t.i].edges.push(new Fi(i,t,e)),i}function Ui(e,t,n){var r=new zi(e,null);return r.a=t,r.b=n,xi.push(r),r}function Hi(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function Fi(e,t,n){var r=e.a,i=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Gi(){this._=null}function Qi(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Vi(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Bi(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Wi(e){for(;e.L;)e=e.L;return e}function Yi(e,t){var n,r,i,o=e.sort(Xi).pop();for(xi=[],wi=new Array(e.length),bi=new Gi,Ci=new Gi;;)if(i=Si,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(wi[o.i]=new Li(o),Ai(o),n=o.x,r=o.y),o=e.pop();else{if(!i)break;Ri(i.arc)}t&&(function(e){for(var t,n=xi,r=fr(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;)(!qi(t=n[i],e)||!r(t)||S(t.a.x-t.b.x)<Re&&S(t.a.y-t.b.y)<Re)&&(t.a=t.b=null,n.splice(i,1))}(t),function(e){for(var t,n,r,i,o,a,s,u,c,l,f=e[0][0],d=e[1][0],h=e[0][1],p=e[1][1],g=wi,m=g.length;m--;)if((o=g[m])&&o.prepare())for(u=(s=o.edges).length,a=0;a<u;)r=(l=s[a].end()).x,i=l.y,t=(c=s[++a%u].start()).x,n=c.y,(S(r-t)>Re||S(i-n)>Re)&&(s.splice(a,0,new Fi(Ui(o.site,l,S(r-f)<Re&&p-i>Re?{x:f,y:S(t-f)<Re?n:p}:S(i-p)<Re&&d-r>Re?{x:S(n-p)<Re?t:d,y:p}:S(r-d)<Re&&i-h>Re?{x:d,y:S(t-d)<Re?n:h}:S(i-h)<Re&&r-f>Re?{x:S(n-h)<Re?t:f,y:h}:null),o.site,null)),++u)}(t));var a={cells:wi,edges:xi};return bi=Ci=xi=wi=null,a}function Xi(e,t){return t.y-e.y||t.x-e.x}Li.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)(e=t[n].edge).b&&e.a||t.splice(n,1);return t.sort(Di),t.length},Fi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Gi.prototype={insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=Wi(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Vi(this,n),n=(e=n).U),n.C=!1,r.C=!0,Bi(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Bi(this,n),n=(e=n).U),n.C=!1,r.C=!0,Vi(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,o=e.L,a=e.R;if(n=o?a?Wi(a):o:a,i?i.L===e?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=a,a.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,Vi(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Bi(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Vi(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,Bi(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Vi(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,Bi(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},o.geom.voronoi=function(e){var t=fi,n=di,r=t,i=n,o=Zi;if(e)return a(e);function a(e){var t=new Array(e.length),n=o[0][0],r=o[0][1],i=o[1][0],a=o[1][1];return Yi(s(e),o).cells.forEach((function(o,s){var u=o.edges,c=o.site;(t[s]=u.length?u.map((function(e){var t=e.start();return[t.x,t.y]})):c.x>=n&&c.x<=i&&c.y>=r&&c.y<=a?[[n,a],[i,a],[i,r],[n,r]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(r(e,t)/Re)*Re,y:Math.round(i(e,t)/Re)*Re,i:t}}))}return a.links=function(e){return Yi(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},a.triangles=function(e){var t=[];return Yi(s(e)).cells.forEach((function(n,r){for(var i,o,a,s,u=n.site,c=n.edges.sort(Di),l=-1,f=c.length,d=c[f-1].edge,h=d.l===u?d.r:d.l;++l<f;)d,i=h,h=(d=c[l].edge).l===u?d.r:d.l,r<i.i&&r<h.i&&(a=i,s=h,((o=u).x-s.x)*(a.y-o.y)-(o.x-a.x)*(s.y-o.y)<0)&&t.push([e[r],e[i.i],e[h.i]])})),t},a.x=function(e){return arguments.length?(r=St(t=e),a):t},a.y=function(e){return arguments.length?(i=St(n=e),a):n},a.clipExtent=function(e){return arguments.length?(o=null==e?Zi:e,a):o===Zi?null:o},a.size=function(e){return arguments.length?a.clipExtent(e&&[[0,0],e]):o===Zi?null:o&&o[1]},a};var Zi=[[-1e6,-1e6],[1e6,1e6]];function Ki(e){return e.x}function Ji(e){return e.y}function eo(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),u=t.nodes;u[0]&&eo(e,u[0],n,r,a,s),u[1]&&eo(e,u[1],a,r,i,s),u[2]&&eo(e,u[2],n,s,a,o),u[3]&&eo(e,u[3],a,s,i,o)}}function to(e,t,n,r,i,o,a){var s,u=1/0;return function e(c,l,f,d,h){if(!(l>o||f>a||d<r||h<i)){if(p=c.point){var p,g=t-c.x,m=n-c.y,y=g*g+m*m;if(y<u){var v=Math.sqrt(u=y);r=t-v,i=n-v,o=t+v,a=n+v,s=p}}for(var x=c.nodes,w=.5*(l+d),b=.5*(f+h),S=(n>=b)<<1|t>=w,C=S+4;S<C;++S)if(c=x[3&S])switch(3&S){case 0:e(c,l,f,w,b);break;case 1:e(c,w,f,d,b);break;case 2:e(c,l,b,w,h);break;case 3:e(c,w,b,d,h)}}}(e,r,i,o,a),s}function no(e,t){e=o.rgb(e),t=o.rgb(t);var n=e.r,r=e.g,i=e.b,a=t.r-n,s=t.g-r,u=t.b-i;return function(e){return"#"+gt(Math.round(n+a*e))+gt(Math.round(r+s*e))+gt(Math.round(i+u*e))}}function ro(e,t){var n,r={},i={};for(n in e)n in t?r[n]=uo(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function io(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function oo(e,t){var n,r,i,o=ao.lastIndex=so.lastIndex=0,a=-1,s=[],u=[];for(e+="",t+="";(n=ao.exec(e))&&(r=so.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:io(n,r)})),o=so.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?(t=u[0].x,function(e){return t(e)+""}):function(){return t}:(t=u.length,function(e){for(var n,r=0;r<t;++r)s[(n=u[r]).i]=n.x(e);return s.join("")})}o.geom.delaunay=function(e){return o.geom.voronoi().triangles(e)},o.geom.quadtree=function(e,t,n,r,i){var o,a=fi,s=di;if(o=arguments.length)return a=Ki,s=Ji,3===o&&(i=n,r=t,n=t=0),u(e);function u(e){var u,c,l,f,d,h,p,g,m,y=St(a),v=St(s);if(null!=t)h=t,p=n,g=r,m=i;else if(g=m=-(h=p=1/0),c=[],l=[],d=e.length,o)for(f=0;f<d;++f)(u=e[f]).x<h&&(h=u.x),u.y<p&&(p=u.y),u.x>g&&(g=u.x),u.y>m&&(m=u.y),c.push(u.x),l.push(u.y);else for(f=0;f<d;++f){var x=+y(u=e[f],f),w=+v(u,f);x<h&&(h=x),w<p&&(p=w),x>g&&(g=x),w>m&&(m=w),c.push(x),l.push(w)}var b=g-h,C=m-p;function M(e,t,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var u=e.x,c=e.y;if(null!=u)if(S(u-n)+S(c-r)<.01)_(e,t,n,r,i,o,a,s);else{var l=e.point;e.x=e.y=e.point=null,_(e,l,u,c,i,o,a,s),_(e,t,n,r,i,o,a,s)}else e.x=n,e.y=r,e.point=t}else _(e,t,n,r,i,o,a,s)}function _(e,t,n,r,i,o,a,s){var u=.5*(i+a),c=.5*(o+s),l=n>=u,f=r>=c,d=f<<1|l;e.leaf=!1,l?i=u:a=u,f?o=c:s=c,M(e=e.nodes[d]||(e.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,n,r,i,o,a,s)}b>C?m=p+b:g=h+C;var E={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){M(E,e,+y(e,++f),+v(e,f),h,p,g,m)},visit:function(e){eo(e,E,h,p,g,m)},find:function(e){return to(E,e[0],e[1],h,p,g,m)}};if(f=-1,null==t){for(;++f<d;)M(E,e[f],c[f],l[f],h,p,g,m);--f}else e.forEach(E.add);return c=l=e=u=null,E}return u.x=function(e){return arguments.length?(a=e,u):a},u.y=function(e){return arguments.length?(s=e,u):s},u.extent=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),u):null==t?null:[[t,n],[r,i]]},u.size=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]),u):null==t?null:[r-t,i-n]},u},o.interpolateRgb=no,o.interpolateObject=ro,o.interpolateNumber=io,o.interpolateString=oo;var ao=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,so=new RegExp(ao.source,"g");function uo(e,t){for(var n,r=o.interpolators.length;--r>=0&&!(n=o.interpolators[r](e,t)););return n}function co(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n<s;++n)r.push(uo(e[n],t[n]));for(;n<o;++n)i[n]=e[n];for(;n<a;++n)i[n]=t[n];return function(e){for(n=0;n<s;++n)i[n]=r[n](e);return i}}o.interpolate=uo,o.interpolators=[function(e,t){var n=typeof t;return("string"===n?bt.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?no:oo:t instanceof Be?no:Array.isArray(t)?co:"object"===n&&isNaN(t)?ro:io)(e,t)}],o.interpolateArray=co;var lo=function(){return P},fo=o.map({linear:lo,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return yo},cubic:function(){return vo},sin:function(){return wo},exp:function(){return bo},circle:function(){return So},elastic:function(e,t){var n;arguments.length<2&&(t=.45);arguments.length?n=t/Ne*Math.asin(1/e):(e=1,n=t/4);return function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ne/t)}},back:function(e){e||(e=1.70158);return function(t){return t*t*((e+1)*t-e)}},bounce:function(){return Co}}),ho=o.map({in:P,out:go,"in-out":mo,"out-in":function(e){return mo(go(e))}});function po(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function go(e){return function(t){return 1-e(1-t)}}function mo(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function yo(e){return e*e}function vo(e){return e*e*e}function xo(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function wo(e){return 1-Math.cos(e*De)}function bo(e){return Math.pow(2,10*(e-1))}function So(e){return 1-Math.sqrt(1-e*e)}function Co(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Mo(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function _o(e){var t,n,r,i=[e.a,e.b],o=[e.c,e.d],a=ko(i),s=Eo(i,o),u=ko(((t=o)[0]+=(r=-s)*(n=i)[0],t[1]+=r*n[1],t))||0;i[0]*o[1]<o[0]*i[1]&&(i[0]*=-1,i[1]*=-1,a*=-1,s*=-1),this.rotate=(a?Math.atan2(i[1],i[0]):Math.atan2(-o[0],o[1]))*Pe,this.translate=[e.e,e.f],this.scale=[a,u],this.skew=u?Math.atan2(s,u)*Pe:0}function Eo(e,t){return e[0]*t[0]+e[1]*t[1]}function ko(e){var t=Math.sqrt(Eo(e,e));return t&&(e[0]/=t,e[1]/=t),t}o.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=fo.get(n)||lo,po((r=ho.get(r)||P)(n.apply(null,a.call(arguments,1))))},o.interpolateHcl=function(e,t){e=o.hcl(e),t=o.hcl(t);var n=e.h,r=e.c,i=e.l,a=t.h-n,s=t.c-r,u=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.c:r);isNaN(a)?(a=0,n=isNaN(n)?t.h:n):a>180?a-=360:a<-180&&(a+=360);return function(e){return Je(n+a*e,r+s*e,i+u*e)+""}},o.interpolateHsl=function(e,t){e=o.hsl(e),t=o.hsl(t);var n=e.h,r=e.s,i=e.l,a=t.h-n,s=t.s-r,u=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.s:r);isNaN(a)?(a=0,n=isNaN(n)?t.h:n):a>180?a-=360:a<-180&&(a+=360);return function(e){return Xe(n+a*e,r+s*e,i+u*e)+""}},o.interpolateHslLong=function(e,t){e=o.hsl(e),t=o.hsl(t);var n=e.h,r=e.s,i=e.l,a=t.h-n,s=t.s-r,u=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.s:r);isNaN(a)&&(a=0,n=isNaN(n)?t.h:n);return function(e){return Xe(n+a*e,r+s*e,i+u*e)+""}},o.interpolateLab=function(e,t){e=o.lab(e),t=o.lab(t);var n=e.l,r=e.a,i=e.b,a=t.l-n,s=t.a-r,u=t.b-i;return function(e){return at(n+a*e,r+s*e,i+u*e)+""}},o.interpolateRound=Mo,o.transform=function(e){var t=u.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new _o(n?n.matrix:To)})(e)},_o.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var To={a:1,b:0,c:0,d:1,e:0,f:0};function Ro(e){return e.length?e.pop()+",":""}function Ao(e,t){var n=[],r=[];return e=o.transform(e),t=o.transform(t),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:io(e[0],t[0])},{i:i-2,x:io(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}(e.translate,t.translate,n,r),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(Ro(n)+"rotate(",null,")")-2,x:io(e,t)})):t&&n.push(Ro(n)+"rotate("+t+")")}(e.rotate,t.rotate,n,r),function(e,t,n,r){e!==t?r.push({i:n.push(Ro(n)+"skewX(",null,")")-2,x:io(e,t)}):t&&n.push(Ro(n)+"skewX("+t+")")}(e.skew,t.skew,n,r),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(Ro(n)+"scale(",null,",",null,")");r.push({i:i-4,x:io(e[0],t[0])},{i:i-2,x:io(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(Ro(n)+"scale("+t+")")}(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i<o;)n[(t=r[i]).i]=t.x(e);return n.join("")}}function Io(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function No(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function Lo(e){for(var t=e.source,n=e.target,r=function(e,t){if(e===t)return e;var n=Do(e),r=Do(t),i=n.pop(),o=r.pop(),a=null;for(;i===o;)a=i,i=n.pop(),o=r.pop();return a}(t,n),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function Do(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function $o(e){e.fixed|=2}function Po(e){e.fixed&=-7}function Oo(e){e.fixed|=4,e.px=e.x,e.py=e.y}function qo(e){e.fixed&=-5}o.interpolateTransform=Ao,o.layout={},o.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(Lo(e[n]));return t}},o.layout.chord=function(){var e,t,n,r,i,a,s,u={},c=0;function l(){var u,l,d,h,p,g={},m=[],y=o.range(r),v=[];for(e=[],t=[],u=0,h=-1;++h<r;){for(l=0,p=-1;++p<r;)l+=n[h][p];m.push(l),v.push(o.range(r)),u+=l}for(i&&y.sort((function(e,t){return i(m[e],m[t])})),a&&v.forEach((function(e,t){e.sort((function(e,r){return a(n[t][e],n[t][r])}))})),u=(Ne-c*r)/u,l=0,h=-1;++h<r;){for(d=l,p=-1;++p<r;){var x=y[h],w=v[x][p],b=n[x][w],S=l,C=l+=b*u;g[x+"-"+w]={index:x,subindex:w,startAngle:S,endAngle:C,value:b}}t[x]={index:x,startAngle:d,endAngle:l,value:m[x]},l+=c}for(h=-1;++h<r;)for(p=h-1;++p<r;){var M=g[h+"-"+p],_=g[p+"-"+h];(M.value||_.value)&&e.push(M.value<_.value?{source:_,target:M}:{source:M,target:_})}s&&f()}function f(){e.sort((function(e,t){return s((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)}))}return u.matrix=function(i){return arguments.length?(r=(n=i)&&n.length,e=t=null,u):n},u.padding=function(n){return arguments.length?(c=n,e=t=null,u):c},u.sortGroups=function(n){return arguments.length?(i=n,e=t=null,u):i},u.sortSubgroups=function(t){return arguments.length?(a=t,e=null,u):a},u.sortChords=function(t){return arguments.length?(s=t,e&&f(),u):s},u.chords=function(){return e||l(),e},u.groups=function(){return t||l(),t},u},o.layout.force=function(){var e,t,n,r,i,a,s={},u=o.dispatch("start","tick","end"),c=[1,1],l=.9,f=zo,d=jo,h=-30,p=Uo,g=.1,m=.64,y=[],v=[];function x(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=i-n,u=o*o+a*a;if(s*s/m<u){if(u<p){var c=t.charge/u;e.px-=o*c,e.py-=a*c}return!0}if(t.point&&u&&u<p){c=t.pointCharge/u;e.px-=o*c,e.py-=a*c}}return!t.charge}}function w(e){e.px=o.event.x,e.py=o.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return e=null,u.end({type:"end",alpha:n=0}),!0;var t,s,f,d,p,m,w,b,S,C=y.length,M=v.length;for(s=0;s<M;++s)d=(f=v[s]).source,(m=(b=(p=f.target).x-d.x)*b+(S=p.y-d.y)*S)&&(b*=m=n*i[s]*((m=Math.sqrt(m))-r[s])/m,S*=m,p.x-=b*(w=d.weight+p.weight?d.weight/(d.weight+p.weight):.5),p.y-=S*w,d.x+=b*(w=1-w),d.y+=S*w);if((w=n*g)&&(b=c[0]/2,S=c[1]/2,s=-1,w))for(;++s<C;)(f=y[s]).x+=(b-f.x)*w,f.y+=(S-f.y)*w;if(h)for(!function e(t,n,r){var i=0,o=0;if(t.charge=0,!t.leaf)for(var a,s=t.nodes,u=s.length,c=-1;++c<u;)null!=(a=s[c])&&(e(a,n,r),t.charge+=a.charge,i+=a.charge*a.cx,o+=a.charge*a.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var l=n*r[t.point.index];t.charge+=t.pointCharge=l,i+=l*t.point.x,o+=l*t.point.y}t.cx=i/t.charge,t.cy=o/t.charge}(t=o.geom.quadtree(y),n,a),s=-1;++s<C;)(f=y[s]).fixed||t.visit(x(f));for(s=-1;++s<C;)(f=y[s]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*l,f.y-=(f.py-(f.py=f.y))*l);u.tick({type:"tick",alpha:n})},s.nodes=function(e){return arguments.length?(y=e,s):y},s.links=function(e){return arguments.length?(v=e,s):v},s.size=function(e){return arguments.length?(c=e,s):c},s.linkDistance=function(e){return arguments.length?(f="function"==typeof e?e:+e,s):f},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.friction=function(e){return arguments.length?(l=+e,s):l},s.charge=function(e){return arguments.length?(h="function"==typeof e?e:+e,s):h},s.chargeDistance=function(e){return arguments.length?(p=e*e,s):Math.sqrt(p)},s.gravity=function(e){return arguments.length?(g=+e,s):g},s.theta=function(e){return arguments.length?(m=e*e,s):Math.sqrt(m)},s.alpha=function(t){return arguments.length?(t=+t,n?t>0?n=t:(e.c=null,e.t=NaN,e=null,u.end({type:"end",alpha:n=0})):t>0&&(u.start({type:"start",alpha:n=t}),e=At(s.tick)),s):n},s.start=function(){var e,t,n,o=y.length,u=v.length,l=c[0],p=c[1];for(e=0;e<o;++e)(n=y[e]).index=e,n.weight=0;for(e=0;e<u;++e)"number"==typeof(n=v[e]).source&&(n.source=y[n.source]),"number"==typeof n.target&&(n.target=y[n.target]),++n.source.weight,++n.target.weight;for(e=0;e<o;++e)n=y[e],isNaN(n.x)&&(n.x=g("x",l)),isNaN(n.y)&&(n.y=g("y",p)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof f)for(e=0;e<u;++e)r[e]=+f.call(this,v[e],e);else for(e=0;e<u;++e)r[e]=f;if(i=[],"function"==typeof d)for(e=0;e<u;++e)i[e]=+d.call(this,v[e],e);else for(e=0;e<u;++e)i[e]=d;if(a=[],"function"==typeof h)for(e=0;e<o;++e)a[e]=+h.call(this,y[e],e);else for(e=0;e<o;++e)a[e]=h;function g(n,r){if(!t){for(t=new Array(o),c=0;c<o;++c)t[c]=[];for(c=0;c<u;++c){var i=v[c];t[i.source.index].push(i.target),t[i.target.index].push(i.source)}}for(var a,s=t[e],c=-1,l=s.length;++c<l;)if(!isNaN(a=s[c][n]))return a;return Math.random()*r}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(t||(t=o.behavior.drag().origin(P).on("dragstart.force",$o).on("drag.force",w).on("dragend.force",Po)),!arguments.length)return t;this.on("mouseover.force",Oo).on("mouseout.force",qo).call(t)},o.rebind(s,u,"on")};var zo=20,jo=1,Uo=1/0;function Ho(e,t){return o.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=Wo,e}function Fo(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function Go(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(e=r.pop());)t(e)}function Qo(e){return e.children}function Vo(e){return e.value}function Bo(e,t){return t.value-e.value}function Wo(e){return o.merge(e.map((function(e){return(e.children||[]).map((function(t){return{source:e,target:t}}))})))}o.layout.hierarchy=function(){var e=Bo,t=Qo,n=Vo;function r(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(c=t.call(r,o,o.depth))&&(u=c.length)){for(var u,c,l;--u>=0;)a.push(l=c[u]),l.parent=o,l.depth=o.depth+1;n&&(o.value=0),o.children=c}else n&&(o.value=+n.call(r,o,o.depth)||0),delete o.children;return Go(i,(function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)})),s}return r.sort=function(t){return arguments.length?(e=t,r):e},r.children=function(e){return arguments.length?(t=e,r):t},r.value=function(e){return arguments.length?(n=e,r):n},r.revalue=function(e){return n&&(Fo(e,(function(e){e.children&&(e.value=0)})),Go(e,(function(e){var t;e.children||(e.value=+n.call(r,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},r},o.layout.partition=function(){var e=o.layout.hierarchy(),t=[1,1];function n(n,r){var i=e.call(this,n,r);return function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,u,c=-1;for(r=t.value?r/t.value:0;++c<a;)e(s=o[c],n,u=s.value*r,i),n+=u}}(i[0],0,t[0],t[1]/function e(t){var n=t.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,e(n[o]));return 1+r}(i[0])),i}return n.size=function(e){return arguments.length?(t=e,n):t},Ho(n,e)},o.layout.pie=function(){var e=Number,t=Yo,n=0,r=Ne,i=0;function a(s){var u,c=s.length,l=s.map((function(t,n){return+e.call(a,t,n)})),f=+("function"==typeof n?n.apply(this,arguments):n),d=("function"==typeof r?r.apply(this,arguments):r)-f,h=Math.min(Math.abs(d)/c,+("function"==typeof i?i.apply(this,arguments):i)),p=h*(d<0?-1:1),g=o.sum(l),m=g?(d-c*p)/g:0,y=o.range(c),v=[];return null!=t&&y.sort(t===Yo?function(e,t){return l[t]-l[e]}:function(e,n){return t(s[e],s[n])}),y.forEach((function(e){v[e]={data:s[e],value:u=l[e],startAngle:f,endAngle:f+=u*m+p,padAngle:h}})),v}return a.value=function(t){return arguments.length?(e=t,a):e},a.sort=function(e){return arguments.length?(t=e,a):t},a.startAngle=function(e){return arguments.length?(n=e,a):n},a.endAngle=function(e){return arguments.length?(r=e,a):r},a.padAngle=function(e){return arguments.length?(i=e,a):i},a};var Yo={};function Xo(e){return e.x}function Zo(e){return e.y}function Ko(e,t,n){e.y0=t,e.y=n}o.layout.stack=function(){var e=P,t=ta,n=na,r=Ko,i=Xo,a=Zo;function s(u,c){if(!(h=u.length))return u;var l=u.map((function(t,n){return e.call(s,t,n)})),f=l.map((function(e){return e.map((function(e,t){return[i.call(s,e,t),a.call(s,e,t)]}))})),d=t.call(s,f,c);l=o.permute(l,d),f=o.permute(f,d);var h,p,g,m,y=n.call(s,f,c),v=l[0].length;for(g=0;g<v;++g)for(r.call(s,l[0][g],m=y[g],f[0][g][1]),p=1;p<h;++p)r.call(s,l[p][g],m+=f[p-1][g][1],f[p][g][1]);return u}return s.values=function(t){return arguments.length?(e=t,s):e},s.order=function(e){return arguments.length?(t="function"==typeof e?e:Jo.get(e)||ta,s):t},s.offset=function(e){return arguments.length?(n="function"==typeof e?e:ea.get(e)||na,s):n},s.x=function(e){return arguments.length?(i=e,s):i},s.y=function(e){return arguments.length?(a=e,s):a},s.out=function(e){return arguments.length?(r=e,s):r},s};var Jo=o.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(ra),a=e.map(ia),s=o.range(r).sort((function(e,t){return i[e]-i[t]})),u=0,c=0,l=[],f=[];for(t=0;t<r;++t)n=s[t],u<c?(u+=a[n],l.push(n)):(c+=a[n],f.push(n));return f.reverse().concat(l)},reverse:function(e){return o.range(e.length).reverse()},default:ta}),ea=o.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,a=[],s=0,u=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];r>s&&(s=r),a.push(r)}for(n=0;n<o;++n)u[n]=(s-a[n])/2;return u},wiggle:function(e){var t,n,r,i,o,a,s,u,c,l=e.length,f=e[0],d=f.length,h=[];for(h[0]=u=c=0,n=1;n<d;++n){for(t=0,i=0;t<l;++t)i+=e[t][n][1];for(t=0,o=0,s=f[n][0]-f[n-1][0];t<l;++t){for(r=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);r<t;++r)a+=(e[r][n][1]-e[r][n-1][1])/s;o+=a*e[t][n][1]}h[n]=u-=i?o/i*s:0,u<c&&(c=u)}for(n=0;n<d;++n)h[n]-=c;return h},expand:function(e){var t,n,r,i=e.length,o=e[0].length,a=1/i,s=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];if(r)for(t=0;t<i;t++)e[t][n][1]/=r;else for(t=0;t<i;t++)e[t][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:na});function ta(e){return o.range(e.length)}function na(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function ra(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;n<o;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function ia(e){return e.reduce(oa,0)}function oa(e,t){return e+t[1]}function aa(e,t){return sa(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function sa(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function ua(e){return[o.min(e),o.max(e)]}function ca(e,t){return e.value-t.value}function la(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function fa(e,t){e._pack_next=t,t._pack_prev=e}function da(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function ha(e){if((t=e.children)&&(u=t.length)){var t,n,r,i,o,a,s,u,c=1/0,l=-1/0,f=1/0,d=-1/0;if(t.forEach(pa),(n=t[0]).x=-n.r,n.y=0,x(n),u>1&&((r=t[1]).x=r.r,r.y=0,x(r),u>2))for(ma(n,r,i=t[2]),x(i),la(n,i),n._pack_prev=i,la(i,r),r=n._pack_next,o=3;o<u;o++){ma(n,r,i=t[o]);var h=0,p=1,g=1;for(a=r._pack_next;a!==r;a=a._pack_next,p++)if(da(a,i)){h=1;break}if(1==h)for(s=n._pack_prev;s!==a._pack_prev&&!da(s,i);s=s._pack_prev,g++);h?(p<g||p==g&&r.r<n.r?fa(n,r=a):fa(n=s,r),o--):(la(n,i),r=i,x(i))}var m=(c+l)/2,y=(f+d)/2,v=0;for(o=0;o<u;o++)(i=t[o]).x-=m,i.y-=y,v=Math.max(v,i.r+Math.sqrt(i.x*i.x+i.y*i.y));e.r=v,t.forEach(ga)}function x(e){c=Math.min(e.x-e.r,c),l=Math.max(e.x+e.r,l),f=Math.min(e.y-e.r,f),d=Math.max(e.y+e.r,d)}}function pa(e){e._pack_next=e._pack_prev=e}function ga(e){delete e._pack_next,delete e._pack_prev}function ma(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var a=t.r+n.r,s=i*i+o*o,u=.5+((r*=r)-(a*=a))/(2*s),c=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=e.x+u*i+c*o,n.y=e.y+u*o-c*i}else n.x=e.x+r,n.y=e.y}function ya(e,t){return e.parent==t.parent?1:2}function va(e){var t=e.children;return t.length?t[0]:e.t}function xa(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function wa(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ba(e,t,n){return e.a.parent===t.parent?e.a:n}function Sa(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Ca(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function Ma(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function _a(e){return e.rangeExtent?e.rangeExtent():Ma(e.range())}function Ea(e,t,n,r){var i=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(i(e))}}function ka(e,t){var n,r=0,i=e.length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function Ta(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Ra}o.layout.histogram=function(){var e=!0,t=Number,n=ua,r=aa;function i(i,a){for(var s,u,c=[],l=i.map(t,this),f=n.call(this,l,a),d=r.call(this,f,l,a),h=(a=-1,l.length),p=d.length-1,g=e?1:1/h;++a<p;)(s=c[a]=[]).dx=d[a+1]-(s.x=d[a]),s.y=0;if(p>0)for(a=-1;++a<h;)(u=l[a])>=f[0]&&u<=f[1]&&((s=c[o.bisect(d,u,1,p)-1]).y+=g,s.push(i[a]));return c}return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(n=St(e),i):n},i.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return sa(t,e)}:St(e),i):r},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},o.layout.pack=function(){var e,t=o.layout.hierarchy().sort(ca),n=0,r=[1,1];function i(i,o){var a=t.call(this,i,o),s=a[0],u=r[0],c=r[1],l=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,Go(s,(function(e){e.r=+l(e.value)})),Go(s,ha),n){var f=n*(e?1:Math.max(2*s.r/u,2*s.r/c))/2;Go(s,(function(e){e.r+=f})),Go(s,ha),Go(s,(function(e){e.r-=f}))}return function e(t,n,r,i){var o=t.children;if(t.x=n+=i*t.x,t.y=r+=i*t.y,t.r*=i,o)for(var a=-1,s=o.length;++a<s;)e(o[a],n,r,i)}(s,u/2,c/2,e?1:1/Math.max(2*s.r/u,2*s.r/c)),a}return i.size=function(e){return arguments.length?(r=e,i):r},i.radius=function(t){return arguments.length?(e=null==t||"function"==typeof t?t:+t,i):e},i.padding=function(e){return arguments.length?(n=+e,i):n},Ho(i,t)},o.layout.tree=function(){var e=o.layout.hierarchy().sort(null).value(null),t=ya,n=[1,1],r=null;function i(i,o){var c=e.call(this,i,o),l=c[0],f=function(e){var t,n={A:null,children:[e]},r=[n];for(;null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;a<s;++a)r.push((o[a]=i={_:o[a],parent:t,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}(l);if(Go(f,a),f.parent.m=-f.z,Fo(f,s),r)Fo(l,u);else{var d=l,h=l,p=l;Fo(l,(function(e){e.x<d.x&&(d=e),e.x>h.x&&(h=e),e.depth>p.depth&&(p=e)}));var g=t(d,h)/2-d.x,m=n[0]/(h.x+t(h,d)/2+g),y=n[1]/(p.depth||1);Fo(l,(function(e){e.x=(e.x+g)*m,e.y=e.depth*y}))}return c}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n.length){!function(e){var t,n=0,r=0,i=e.children,o=i.length;for(;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,u=o.parent.children[0],c=o.m,l=a.m,f=s.m,d=u.m;s=xa(s),o=va(o),s&&o;)u=va(u),(a=xa(a)).a=e,(i=s.z+f-o.z-c+t(s._,o._))>0&&(wa(ba(s,e,r),e,i),c+=i,l+=i),f+=s.m,c+=o.m,d+=u.m,l+=a.m;s&&!xa(a)&&(a.t=s,a.m+=f-l),o&&!va(u)&&(u.t=o,u.m+=c-d,r=e)}return r}(e,i,e.parent.A||r[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function u(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e)?u:null,i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null==(n=e)?null:u,i):r?n:null},Ho(i,e)},o.layout.cluster=function(){var e=o.layout.hierarchy().sort(null).value(null),t=ya,n=[1,1],r=!1;function i(i,a){var s,u=e.call(this,i,a),c=u[0],l=0;Go(c,(function(e){var n=e.children;n&&n.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),e.y=function(e){return 1+o.max(e,(function(e){return e.y}))}(n)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var f=function e(t){var n=t.children;return n&&n.length?e(n[0]):t}(c),d=function e(t){var n,r=t.children;return r&&(n=r.length)?e(r[n-1]):t}(c),h=f.x-t(f,d)/2,p=d.x+t(d,f)/2;return Go(c,r?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-h)/(p-h)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),u}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e),i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null!=(n=e),i):r?n:null},Ho(i,e)},o.layout.treemap=function(){var e,t=o.layout.hierarchy(),n=Math.round,r=[1,1],i=null,a=Sa,s=!1,u="squarify",c=.5*(1+Math.sqrt(5));function l(e,t){for(var n,r,i=-1,o=e.length;++i<o;)r=(n=e[i]).value*(t<0?0:t),n.area=isNaN(r)||r<=0?0:r}function f(e){var t=e.children;if(t&&t.length){var n,r,i,o=a(e),s=[],c=t.slice(),d=1/0,g="slice"===u?o.dx:"dice"===u?o.dy:"slice-dice"===u?1&e.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(l(c,o.dx*o.dy/e.value),s.area=0;(i=c.length)>0;)s.push(n=c[i-1]),s.area+=n.area,"squarify"!==u||(r=h(s,g))<=d?(c.pop(),d=r):(s.area-=s.pop().area,p(s,g,o,!1),g=Math.min(o.dx,o.dy),s.length=s.area=0,d=1/0);s.length&&(p(s,g,o,!0),s.length=s.area=0),t.forEach(f)}}function d(e){var t=e.children;if(t&&t.length){var n,r=a(e),i=t.slice(),o=[];for(l(i,r.dx*r.dy/e.value),o.area=0;n=i.pop();)o.push(n),o.area+=n.area,null!=n.z&&(p(o,n.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);t.forEach(d)}}function h(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(n<o&&(o=n),n>i&&(i=n));return t*=t,(r*=r)?Math.max(t*i*c/r,r/(t*o*c)):1/0}function p(e,t,r,i){var o,a=-1,s=e.length,u=r.x,c=r.y,l=t?n(e.area/t):0;if(t==r.dx){for((i||l>r.dy)&&(l=r.dy);++a<s;)(o=e[a]).x=u,o.y=c,o.dy=l,u+=o.dx=Math.min(r.x+r.dx-u,l?n(o.area/l):0);o.z=!0,o.dx+=r.x+r.dx-u,r.y+=l,r.dy-=l}else{for((i||l>r.dx)&&(l=r.dx);++a<s;)(o=e[a]).x=u,o.y=c,o.dx=l,c+=o.dy=Math.min(r.y+r.dy-c,l?n(o.area/l):0);o.z=!1,o.dy+=r.y+r.dy-c,r.x+=l,r.dx-=l}}function g(n){var i=e||t(n),o=i[0];return o.x=o.y=0,o.value?(o.dx=r[0],o.dy=r[1]):o.dx=o.dy=0,e&&t.revalue(o),l([o],o.dx*o.dy/o.value),(e?d:f)(o),s&&(e=i),i}return g.size=function(e){return arguments.length?(r=e,g):r},g.padding=function(e){if(!arguments.length)return i;function t(t){var n=e.call(g,t,t.depth);return null==n?Sa(t):Ca(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Ca(t,e)}var r;return a=null==(i=e)?Sa:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n,g},g.round=function(e){return arguments.length?(n=e?Math.round:Number,g):n!=Number},g.sticky=function(t){return arguments.length?(s=t,e=null,g):s},g.ratio=function(e){return arguments.length?(c=e,g):c},g.mode=function(e){return arguments.length?(u=e+"",g):u},Ho(g,t)},o.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=o.random.normal.apply(o,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=o.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t}}},o.scale={};var Ra={floor:P,ceil:P};function Aa(e,t,n,r){var i=[],a=[],s=0,u=Math.min(e.length,t.length)-1;for(e[u]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<=u;)i.push(n(e[s-1],e[s])),a.push(r(t[s-1],t[s]));return function(t){var n=o.bisect(e,t,1,u)-1;return a[n](i[n](t))}}function Ia(e,t){return o.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Na(e,t){return ka(e,Ta(La(e,t)[2])),ka(e,Ta(La(e,t)[2])),e}function La(e,t){null==t&&(t=10);var n=Ma(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function Da(e,t){return o.range.apply(o,La(e,t))}function $a(e,t,n){var r=La(e,t);if(n){var i=Ot.exec(n);if(i.shift(),"s"===i[8]){var a=o.formatPrefix(Math.max(S(r[0]),S(r[1])));return i[7]||(i[7]="."+Oa(a.scale(r[2]))),i[8]="f",n=o.format(i.join("")),function(e){return n(a.scale(e))+a.symbol}}i[7]||(i[7]="."+function(e,t){var n=Oa(t[2]);return e in Pa?Math.abs(n-Oa(Math.max(S(t[0]),S(t[1]))))+ +("e"!==e):n-2*("%"===e)}(i[8],r)),n=i.join("")}else n=",."+Oa(r[2])+"f";return o.format(n)}o.scale.linear=function(){return function e(t,n,r,i){var o,a;function s(){var e=Math.min(t.length,n.length)>2?Aa:Ea,s=i?No:Io;return o=e(t,n,s,r),a=e(n,t,s,uo),u}function u(e){return o(e)}return u.invert=function(e){return a(e)},u.domain=function(e){return arguments.length?(t=e.map(Number),s()):t},u.range=function(e){return arguments.length?(n=e,s()):n},u.rangeRound=function(e){return u.range(e).interpolate(Mo)},u.clamp=function(e){return arguments.length?(i=e,s()):i},u.interpolate=function(e){return arguments.length?(r=e,s()):r},u.ticks=function(e){return Da(t,e)},u.tickFormat=function(e,n){return $a(t,e,n)},u.nice=function(e){return Na(t,e),s()},u.copy=function(){return e(t,n,r,i)},s()}([0,1],[0,1],uo,!1)};var Pa={s:1,g:1,p:1,r:1,e:1};function Oa(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}o.scale.log=function(){return function e(t,n,r,i){function a(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(n)}function s(e){return r?Math.pow(n,e):-Math.pow(n,-e)}function u(e){return t(a(e))}return u.invert=function(e){return s(t.invert(e))},u.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((i=e.map(Number)).map(a)),u):i},u.base=function(e){return arguments.length?(n=+e,t.domain(i.map(a)),u):n},u.nice=function(){var e=ka(i.map(a),r?Math:za);return t.domain(e),i=e.map(s),u},u.ticks=function(){var e=Ma(i),t=[],o=e[0],u=e[1],c=Math.floor(a(o)),l=Math.ceil(a(u)),f=n%1?2:n;if(isFinite(l-c)){if(r){for(;c<l;c++)for(var d=1;d<f;d++)t.push(s(c)*d);t.push(s(c))}else for(t.push(s(c));c++<l;)for(d=f-1;d>0;d--)t.push(s(c)*d);for(c=0;t[c]<o;c++);for(l=t.length;t[l-1]>u;l--);t=t.slice(c,l)}return t},u.tickFormat=function(e,t){if(!arguments.length)return qa;arguments.length<2?t=qa:"function"!=typeof t&&(t=o.format(t));var r=Math.max(1,n*e/u.ticks().length);return function(e){var i=e/s(Math.round(a(e)));return i*n<n-.5&&(i*=n),i<=r?t(e):""}},u.copy=function(){return e(t.copy(),n,r,i)},Ia(u,t)}(o.scale.linear().domain([0,1]),10,!0,[1,10])};var qa=o.format(".0e"),za={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ja(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}o.scale.pow=function(){return function e(t,n,r){var i=ja(n),o=ja(1/n);function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(i)),a):r},a.ticks=function(e){return Da(r,e)},a.tickFormat=function(e,t){return $a(r,e,t)},a.nice=function(e){return a.domain(Na(r,e))},a.exponent=function(e){return arguments.length?(i=ja(n=e),o=ja(1/n),t.domain(r.map(i)),a):n},a.copy=function(){return e(t.copy(),n,r)},Ia(a,t)}(o.scale.linear(),1,[0,1])},o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return function e(t,n){var r,i,a;function s(e){return i[((r.get(e)||("range"===n.t?r.set(e,t.push(e)):NaN))-1)%i.length]}function u(e,n){return o.range(t.length).map((function(t){return e+n*t}))}return s.domain=function(e){if(!arguments.length)return t;t=[],r=new _;for(var i,o=-1,a=e.length;++o<a;)r.has(i=e[o])||r.set(i,t.push(i));return s[n.t].apply(s,n.a)},s.range=function(e){return arguments.length?(i=e,a=0,n={t:"range",a:arguments},s):i},s.rangePoints=function(e,r){arguments.length<2&&(r=0);var o=e[0],c=e[1],l=t.length<2?(o=(o+c)/2,0):(c-o)/(t.length-1+r);return i=u(o+l*r/2,l),a=0,n={t:"rangePoints",a:arguments},s},s.rangeRoundPoints=function(e,r){arguments.length<2&&(r=0);var o=e[0],c=e[1],l=t.length<2?(o=c=Math.round((o+c)/2),0):(c-o)/(t.length-1+r)|0;return i=u(o+Math.round(l*r/2+(c-o-(t.length-1+r)*l)/2),l),a=0,n={t:"rangeRoundPoints",a:arguments},s},s.rangeBands=function(e,r,o){arguments.length<2&&(r=0),arguments.length<3&&(o=r);var c=e[1]<e[0],l=e[c-0],f=e[1-c],d=(f-l)/(t.length-r+2*o);return i=u(l+d*o,d),c&&i.reverse(),a=d*(1-r),n={t:"rangeBands",a:arguments},s},s.rangeRoundBands=function(e,r,o){arguments.length<2&&(r=0),arguments.length<3&&(o=r);var c=e[1]<e[0],l=e[c-0],f=e[1-c],d=Math.floor((f-l)/(t.length-r+2*o));return i=u(l+Math.round((f-l-(t.length-r)*d)/2),d),c&&i.reverse(),a=Math.round(d*(1-r)),n={t:"rangeRoundBands",a:arguments},s},s.rangeBand=function(){return a},s.rangeExtent=function(){return Ma(n.a[0])},s.copy=function(){return e(t,n)},s.domain(t)}([],{t:"range",a:[[]]})},o.scale.category10=function(){return o.scale.ordinal().range(Ua)},o.scale.category20=function(){return o.scale.ordinal().range(Ha)},o.scale.category20b=function(){return o.scale.ordinal().range(Fa)},o.scale.category20c=function(){return o.scale.ordinal().range(Ga)};var Ua=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ht),Ha=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ht),Fa=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ht),Ga=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ht);function Qa(){return 0}o.scale.quantile=function(){return function e(t,n){var r;function i(){var e=0,i=n.length;for(r=[];++e<i;)r[e-1]=o.quantile(t,e/i);return a}function a(e){if(!isNaN(e=+e))return n[o.bisect(r,e)]}return a.domain=function(e){return arguments.length?(t=e.map(y).filter(v).sort(m),i()):t},a.range=function(e){return arguments.length?(n=e,i()):n},a.quantiles=function(){return r},a.invertExtent=function(e){return(e=n.indexOf(e))<0?[NaN,NaN]:[e>0?r[e-1]:t[0],e<r.length?r[e]:t[t.length-1]]},a.copy=function(){return e(t,n)},i()}([],[])},o.scale.quantize=function(){return function e(t,n,r){var i,o;function a(e){return r[Math.max(0,Math.min(o,Math.floor(i*(e-t))))]}function s(){return i=r.length/(n-t),o=r.length-1,a}return a.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],s()):[t,n]},a.range=function(e){return arguments.length?(r=e,s()):r},a.invertExtent=function(e){return[e=(e=r.indexOf(e))<0?NaN:e/i+t,e+1/i]},a.copy=function(){return e(t,n,r)},s()}(0,1,[0,1])},o.scale.threshold=function(){return function e(t,n){function r(e){if(e<=e)return n[o.bisect(t,e)]}return r.domain=function(e){return arguments.length?(t=e,r):t},r.range=function(e){return arguments.length?(n=e,r):n},r.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},r.copy=function(){return e(t,n)},r}([.5],[0,1])},o.scale.identity=function(){return function e(t){function n(e){return+e}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t},n.ticks=function(e){return Da(t,e)},n.tickFormat=function(e,n){return $a(t,e,n)},n.copy=function(){return e(t)},n}([0,1])},o.svg={},o.svg.arc=function(){var e=Ba,t=Wa,n=Qa,r=Va,i=Ya,o=Xa,a=Za;function s(){var s=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+t.apply(this,arguments)),l=i.apply(this,arguments)-De,f=o.apply(this,arguments)-De,d=Math.abs(f-l),h=l>f?0:1;if(c<s&&(p=c,c=s,s=p),d>=Le)return u(c,h)+(s?u(s,1-h):"")+"Z";var p,g,m,y,v,x,w,b,S,C,M,_,E=0,k=0,T=[];if((y=(+a.apply(this,arguments)||0)/2)&&(m=r===Va?Math.sqrt(s*s+c*c):+r.apply(this,arguments),h||(k*=-1),c&&(k=je(m/c*Math.sin(y))),s&&(E=je(m/s*Math.sin(y)))),c){v=c*Math.cos(l+k),x=c*Math.sin(l+k),w=c*Math.cos(f-k),b=c*Math.sin(f-k);var R=Math.abs(f-l-2*k)<=Ie?0:1;if(k&&Ka(v,x,w,b)===h^R){var A=(l+f)/2;v=c*Math.cos(A),x=c*Math.sin(A),w=b=null}}else v=x=0;if(s){S=s*Math.cos(f-E),C=s*Math.sin(f-E),M=s*Math.cos(l+E),_=s*Math.sin(l+E);var I=Math.abs(l-f+2*E)<=Ie?0:1;if(E&&Ka(S,C,M,_)===1-h^I){var N=(l+f)/2;S=s*Math.cos(N),C=s*Math.sin(N),M=_=null}}else S=C=0;if(d>Re&&(p=Math.min(Math.abs(c-s)/2,+n.apply(this,arguments)))>.001){g=s<c^h?0:1;var L=p,D=p;if(d<Ie){var $=null==M?[S,C]:null==w?[v,x]:yi([v,x],[M,_],[w,b],[S,C]),P=v-$[0],O=x-$[1],q=w-$[0],z=b-$[1],j=1/Math.sin(Math.acos((P*q+O*z)/(Math.sqrt(P*P+O*O)*Math.sqrt(q*q+z*z)))/2),U=Math.sqrt($[0]*$[0]+$[1]*$[1]);D=Math.min(p,(s-U)/(j-1)),L=Math.min(p,(c-U)/(j+1))}if(null!=w){var H=Ja(null==M?[S,C]:[M,_],[v,x],c,L,h),F=Ja([w,b],[S,C],c,L,h);p===L?T.push("M",H[0],"A",L,",",L," 0 0,",g," ",H[1],"A",c,",",c," 0 ",1-h^Ka(H[1][0],H[1][1],F[1][0],F[1][1]),",",h," ",F[1],"A",L,",",L," 0 0,",g," ",F[0]):T.push("M",H[0],"A",L,",",L," 0 1,",g," ",F[0])}else T.push("M",v,",",x);if(null!=M){var G=Ja([v,x],[M,_],s,-D,h),Q=Ja([S,C],null==w?[v,x]:[w,b],s,-D,h);p===D?T.push("L",Q[0],"A",D,",",D," 0 0,",g," ",Q[1],"A",s,",",s," 0 ",h^Ka(Q[1][0],Q[1][1],G[1][0],G[1][1]),",",1-h," ",G[1],"A",D,",",D," 0 0,",g," ",G[0]):T.push("L",Q[0],"A",D,",",D," 0 0,",g," ",G[0])}else T.push("L",S,",",C)}else T.push("M",v,",",x),null!=w&&T.push("A",c,",",c," 0 ",R,",",h," ",w,",",b),T.push("L",S,",",C),null!=M&&T.push("A",s,",",s," 0 ",I,",",1-h," ",M,",",_);return T.push("Z"),T.join("")}function u(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}return s.innerRadius=function(t){return arguments.length?(e=St(t),s):e},s.outerRadius=function(e){return arguments.length?(t=St(e),s):t},s.cornerRadius=function(e){return arguments.length?(n=St(e),s):n},s.padRadius=function(e){return arguments.length?(r=e==Va?Va:St(e),s):r},s.startAngle=function(e){return arguments.length?(i=St(e),s):i},s.endAngle=function(e){return arguments.length?(o=St(e),s):o},s.padAngle=function(e){return arguments.length?(a=St(e),s):a},s.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-De;return[Math.cos(r)*n,Math.sin(r)*n]},s};var Va="auto";function Ba(e){return e.innerRadius}function Wa(e){return e.outerRadius}function Ya(e){return e.startAngle}function Xa(e){return e.endAngle}function Za(e){return e&&e.padAngle}function Ka(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function Ja(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),u=s*a,c=-s*o,l=e[0]+u,f=e[1]+c,d=t[0]+u,h=t[1]+c,p=(l+d)/2,g=(f+h)/2,m=d-l,y=h-f,v=m*m+y*y,x=n-r,w=l*h-d*f,b=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*v-w*w)),S=(w*y-m*b)/v,C=(-w*m-y*b)/v,M=(w*y+m*b)/v,_=(-w*m+y*b)/v,E=S-p,k=C-g,T=M-p,R=_-g;return E*E+k*k>T*T+R*R&&(S=M,C=_),[[S-u,C-c],[S*n/x,C*n/x]]}function es(e){var t=fi,n=di,r=tr,i=ns,o=i.key,a=.7;function s(o){var s,u=[],c=[],l=-1,f=o.length,d=St(t),h=St(n);function p(){u.push("M",i(e(c),a))}for(;++l<f;)r.call(this,s=o[l],l)?c.push([+d.call(this,s,l),+h.call(this,s,l)]):c.length&&(p(),c=[]);return c.length&&p(),u.length?u.join(""):null}return s.x=function(e){return arguments.length?(t=e,s):t},s.y=function(e){return arguments.length?(n=e,s):n},s.defined=function(e){return arguments.length?(r=e,s):r},s.interpolate=function(e){return arguments.length?(o="function"==typeof e?i=e:(i=ts.get(e)||ns).key,s):o},s.tension=function(e){return arguments.length?(a=e,s):a},s}o.svg.line=function(){return es(P)};var ts=o.map({linear:ns,"linear-closed":rs,step:function(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];for(;++t<n;)i.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);n>1&&i.push("H",r[0]);return i.join("")},"step-before":is,"step-after":os,basis:us,"basis-open":function(e){if(e.length<4)return ns(e);var t,n=[],r=-1,i=e.length,o=[0],a=[0];for(;++r<3;)t=e[r],o.push(t[0]),a.push(t[1]);n.push(cs(ds,o)+","+cs(ds,a)),--r;for(;++r<i;)t=e[r],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),hs(n,o,a);return n.join("")},"basis-closed":function(e){var t,n,r=-1,i=e.length,o=i+4,a=[],s=[];for(;++r<4;)n=e[r%i],a.push(n[0]),s.push(n[1]);t=[cs(ds,a),",",cs(ds,s)],--r;for(;++r<o;)n=e[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),hs(t,a,s);return t.join("")},bundle:function(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],a=e[0][1],s=e[n][0]-o,u=e[n][1]-a,c=-1;++c<=n;)r=e[c],i=c/n,r[0]=t*r[0]+(1-t)*(o+i*s),r[1]=t*r[1]+(1-t)*(a+i*u);return us(e)},cardinal:function(e,t){return e.length<3?ns(e):e[0]+as(e,ss(e,t))},"cardinal-open":function(e,t){return e.length<4?ns(e):e[1]+as(e.slice(1,-1),ss(e,t))},"cardinal-closed":function(e,t){return e.length<3?rs(e):e[0]+as((e.push(e[0]),e),ss([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?ns(e):e[0]+as(e,function(e){var t,n,r,i,o=[],a=function(e){var t=0,n=e.length-1,r=[],i=e[0],o=e[1],a=r[0]=ps(i,o);for(;++t<n;)r[t]=(a+(a=ps(i=o,o=e[t+1])))/2;return r[t]=a,r}(e),s=-1,u=e.length-1;for(;++s<u;)t=ps(e[s],e[s+1]),S(t)<Re?a[s]=a[s+1]=0:(n=a[s]/t,r=a[s+1]/t,(i=n*n+r*r)>9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r));s=-1;for(;++s<=u;)i=(e[Math.min(u,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(e))}});function ns(e){return e.length>1?e.join("L"):e+"Z"}function rs(e){return e.join("L")+"Z"}function is(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function os(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function as(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return ns(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],a=t[0],s=a,u=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=e[1],u=2),t.length>1){s=t[1],o=e[u],u++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;c<t.length;c++,u++)o=e[u],s=t[c],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var l=e[u];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+l[0]+","+l[1]}return r}function ss(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],a=e[1],s=1,u=e.length;++s<u;)n=o,o=a,a=e[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function us(e){if(e.length<3)return ns(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],a=[i,i,i,(r=e[1])[0]],s=[o,o,o,r[1]],u=[i,",",o,"L",cs(ds,a),",",cs(ds,s)];for(e.push(e[n-1]);++t<=n;)r=e[t],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),hs(u,a,s);return e.pop(),u.push("L",r),u.join("")}function cs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}ts.forEach((function(e,t){t.key=e,t.closed=/-closed$/.test(e)}));var ls=[0,2/3,1/3,0],fs=[0,1/3,2/3,0],ds=[0,1/6,2/3,1/6];function hs(e,t,n){e.push("C",cs(ls,t),",",cs(ls,n),",",cs(fs,t),",",cs(fs,n),",",cs(ds,t),",",cs(ds,n))}function ps(e,t){return(t[1]-e[1])/(t[0]-e[0])}function gs(e){for(var t,n,r,i=-1,o=e.length;++i<o;)n=(t=e[i])[0],r=t[1]-De,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function ms(e){var t=fi,n=fi,r=0,i=di,o=tr,a=ns,s=a.key,u=a,c="L",l=.7;function f(s){var f,d,h,p=[],g=[],m=[],y=-1,v=s.length,x=St(t),w=St(r),b=t===n?function(){return d}:St(n),S=r===i?function(){return h}:St(i);function C(){p.push("M",a(e(m),l),c,u(e(g.reverse()),l),"Z")}for(;++y<v;)o.call(this,f=s[y],y)?(g.push([d=+x.call(this,f,y),h=+w.call(this,f,y)]),m.push([+b.call(this,f,y),+S.call(this,f,y)])):g.length&&(C(),g=[],m=[]);return g.length&&C(),p.length?p.join(""):null}return f.x=function(e){return arguments.length?(t=n=e,f):n},f.x0=function(e){return arguments.length?(t=e,f):t},f.x1=function(e){return arguments.length?(n=e,f):n},f.y=function(e){return arguments.length?(r=i=e,f):i},f.y0=function(e){return arguments.length?(r=e,f):r},f.y1=function(e){return arguments.length?(i=e,f):i},f.defined=function(e){return arguments.length?(o=e,f):o},f.interpolate=function(e){return arguments.length?(s="function"==typeof e?a=e:(a=ts.get(e)||ns).key,u=a.reverse||a,c=a.closed?"M":"L",f):s},f.tension=function(e){return arguments.length?(l=e,f):l},f}function ys(e){return e.radius}function vs(e){return[e.x,e.y]}function xs(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-De;return[n*Math.cos(r),n*Math.sin(r)]}}function ws(){return 64}function bs(){return"circle"}function Ss(e){var t=Math.sqrt(e/Ie);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}o.svg.line.radial=function(){var e=es(gs);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},is.reverse=os,os.reverse=is,o.svg.area=function(){return ms(P)},o.svg.area.radial=function(){var e=ms(gs);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},o.svg.chord=function(){var e=Zr,t=Kr,n=ys,r=Ya,i=Xa;function o(n,r){var i,o,c=a(this,e,n,r),l=a(this,t,n,r),f=function(e){return!(Math.abs(1e3*e.p0[0]-1e3*e.p1[0])<1&&Math.abs(1e3*e.p0[1]-1e3*e.p1[1])<1)};return"M"+c.p0+(f(c)?s(c.r,c.p1,c.a1-c.a0):"")+(o=l,(i=c).a0==o.a0&&i.a1==o.a1?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+(f(l)?s(l.r,l.p1,l.a1-l.a0):"")+u(l.r,l.p1,c.r,c.p0))+"Z"}function a(e,t,o,a){var s=t.call(e,o,a),u=n.call(e,s,a),c=r.call(e,s,a)-De,l=i.call(e,s,a)-De;return{r:u,a0:c,a1:l,p0:[u*Math.cos(c),u*Math.sin(c)],p1:[u*Math.cos(l),u*Math.sin(l)]}}function s(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Ie)+",1 "+t}function u(e,t,n,r){return"Q 0,0 "+r}return o.radius=function(e){return arguments.length?(n=St(e),o):n},o.source=function(t){return arguments.length?(e=St(t),o):e},o.target=function(e){return arguments.length?(t=St(e),o):t},o.startAngle=function(e){return arguments.length?(r=St(e),o):r},o.endAngle=function(e){return arguments.length?(i=St(e),o):i},o},o.svg.diagonal=function(){var e=Zr,t=Kr,n=vs;function r(r,i){var o=e.call(this,r,i),a=t.call(this,r,i),s=(o.y+a.y)/2,u=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(u=u.map(n))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}return r.source=function(t){return arguments.length?(e=St(t),r):e},r.target=function(e){return arguments.length?(t=St(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},o.svg.diagonal.radial=function(){var e=o.svg.diagonal(),t=vs,n=e.projection;return e.projection=function(e){return arguments.length?n(xs(t=e)):t},e},o.svg.symbol=function(){var e=bs,t=ws;function n(n,r){return(Cs.get(e.call(this,n,r))||Ss)(t.call(this,n,r))}return n.type=function(t){return arguments.length?(e=St(t),n):e},n.size=function(e){return arguments.length?(t=St(e),n):t},n};var Cs=o.map({circle:Ss,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*_s)),n=t*_s;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ms),n=t*Ms/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ms),n=t*Ms/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});o.svg.symbolTypes=Cs.keys();var Ms=Math.sqrt(3),_s=Math.tan(30*$e);K.transition=function(e){for(var t,n,r=Rs||++Ns,i=$s(e),o=[],a=As||{time:Date.now(),ease:xo,delay:0,duration:250},s=-1,u=this.length;++s<u;){o.push(t=[]);for(var c=this[s],l=-1,f=c.length;++l<f;)(n=c[l])&&Ps(n,l,i,r,a),t.push(n)}return Ts(o,i,r)},K.interrupt=function(e){return this.each(null==e?Es:ks($s(e)))};var Es=ks($s());function ks(e){return function(){var t,n,r;(t=this[e])&&(r=t[n=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[n]:delete this[e],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Ts(e,t,n){return B(e,Is),e.namespace=t,e.id=n,e}var Rs,As,Is=[],Ns=0;function Ls(e,t,n,r){var i=e.id,o=e.namespace;return ge(e,"function"==typeof n?function(e,a,s){e[o][i].tween.set(t,r(n.call(e,e.__data__,a,s)))}:(n=r(n),function(e){e[o][i].tween.set(t,n)}))}function Ds(e){return null==e&&(e=""),function(){this.textContent=e}}function $s(e){return null==e?"__transition__":"__transition_"+e+"__"}function Ps(e,t,n,r,i){var o,a,s,u,c,l=e[n]||(e[n]={active:0,count:0}),f=l[r];function d(n){var i=l.active,d=l[i];for(var p in d&&(d.timer.c=null,d.timer.t=NaN,--l.count,delete l[i],d.event&&d.event.interrupt.call(e,e.__data__,d.index)),l)if(+p<r){var g=l[p];g.timer.c=null,g.timer.t=NaN,--l.count,delete l[p]}a.c=h,At((function(){return a.c&&h(n||1)&&(a.c=null,a.t=NaN),1}),0,o),l.active=r,f.event&&f.event.start.call(e,e.__data__,t),c=[],f.tween.forEach((function(n,r){(r=r.call(e,e.__data__,t))&&c.push(r)})),u=f.ease,s=f.duration}function h(i){for(var o=i/s,a=u(o),d=c.length;d>0;)c[--d].call(e,a);if(o>=1)return f.event&&f.event.end.call(e,e.__data__,t),--l.count?delete l[r]:delete e[n],1}f||(o=i.time,a=At((function(e){var t=f.delay;if(a.t=t+o,t<=e)return d(e-t);a.c=d}),0,o),f=l[r]={tween:new _,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++l.count)}Is.call=K.call,Is.empty=K.empty,Is.node=K.node,Is.size=K.size,o.transition=function(e,t){return e&&e.transition?Rs?e.transition(t):e:o.selection().transition(e)},o.transition.prototype=Is,Is.select=function(e){var t,n,r,i=this.id,o=this.namespace,a=[];e=J(e);for(var s=-1,u=this.length;++s<u;){a.push(t=[]);for(var c=this[s],l=-1,f=c.length;++l<f;)(r=c[l])&&(n=e.call(r,r.__data__,l,s))?("__data__"in r&&(n.__data__=r.__data__),Ps(n,l,o,i,r[o][i]),t.push(n)):t.push(null)}return Ts(a,o,i)},Is.selectAll=function(e){var t,n,r,i,o,a=this.id,s=this.namespace,u=[];e=ee(e);for(var c=-1,l=this.length;++c<l;)for(var f=this[c],d=-1,h=f.length;++d<h;)if(r=f[d]){o=r[s][a],n=e.call(r,r.__data__,d,c),u.push(t=[]);for(var p=-1,g=n.length;++p<g;)(i=n[p])&&Ps(i,p,s,a,o),t.push(i)}return Ts(u,s,a)},Is.filter=function(e){var t,n,r=[];"function"!=typeof e&&(e=he(e));for(var i=0,o=this.length;i<o;i++){r.push(t=[]);for(var a,s=0,u=(a=this[i]).length;s<u;s++)(n=a[s])&&e.call(n,n.__data__,s,i)&&t.push(n)}return Ts(r,this.namespace,this.id)},Is.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):ge(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})},Is.attr=function(e,t){if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var n="transform"==e?Ao:uo,r=o.ns.qualify(e);function i(){this.removeAttribute(r)}function a(){this.removeAttributeNS(r.space,r.local)}function s(e){return null==e?i:(e+="",function(){var t,i=this.getAttribute(r);return i!==e&&(t=n(i,e),function(e){this.setAttribute(r,t(e))})})}function u(e){return null==e?a:(e+="",function(){var t,i=this.getAttributeNS(r.space,r.local);return i!==e&&(t=n(i,e),function(e){this.setAttributeNS(r.space,r.local,t(e))})})}return Ls(this,"attr."+e,t,r.local?u:s)},Is.attrTween=function(e,t){var n=o.ns.qualify(e);return this.tween("attr."+e,n.local?function(e,r){var i=t.call(this,e,r,this.getAttributeNS(n.space,n.local));return i&&function(e){this.setAttributeNS(n.space,n.local,i(e))}}:function(e,r){var i=t.call(this,e,r,this.getAttribute(n));return i&&function(e){this.setAttribute(n,i(e))}})},Is.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.style(n,e[n],t);return this}n=""}function i(){this.style.removeProperty(e)}function o(t){return null==t?i:(t+="",function(){var r,i=l(this).getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=uo(i,t),function(t){this.style.setProperty(e,r(t),n)})})}return Ls(this,"style."+e,t,o)},Is.styleTween=function(e,t,n){function r(r,i){var o=t.call(this,r,i,l(this).getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,r)},Is.text=function(e){return Ls(this,"text",e,Ds)},Is.remove=function(){var e=this.namespace;return this.each("end.transition",(function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)}))},Is.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=o.ease.apply(o,arguments)),ge(this,(function(r){r[n][t].ease=e})))},Is.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:ge(this,"function"==typeof e?function(r,i,o){r[n][t].delay=+e.call(r,r.__data__,i,o)}:(e=+e,function(r){r[n][t].delay=e}))},Is.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:ge(this,"function"==typeof e?function(r,i,o){r[n][t].duration=Math.max(1,e.call(r,r.__data__,i,o))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))},Is.each=function(e,t){var n=this.id,r=this.namespace;if(arguments.length<2){var i=As,a=Rs;try{Rs=n,ge(this,(function(t,i,o){As=t[r][n],e.call(t,t.__data__,i,o)}))}finally{As=i,Rs=a}}else ge(this,(function(i){var a=i[r][n];(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(e,t)}));return this},Is.transition=function(){for(var e,t,n,r=this.id,i=++Ns,o=this.namespace,a=[],s=0,u=this.length;s<u;s++){a.push(e=[]);for(var c,l=0,f=(c=this[s]).length;l<f;l++)(t=c[l])&&Ps(t,l,o,i,{time:(n=t[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),e.push(t)}return Ts(a,o,i)},o.svg.axis=function(){var e,t=o.scale.linear(),n=Os,r=6,i=6,a=3,u=[10],c=null;function l(s){s.each((function(){var s,l=o.select(this),f=this.__chart__||t,d=this.__chart__=t.copy(),h=null==c?d.ticks?d.ticks.apply(d,u):d.domain():c,p=null==e?d.tickFormat?d.tickFormat.apply(d,u):P:e,g=l.selectAll(".tick").data(h,d),m=g.enter().insert("g",".domain").attr("class","tick").style("opacity",Re),y=o.transition(g.exit()).style("opacity",Re).remove(),v=o.transition(g.order()).style("opacity",1),x=Math.max(r,0)+a,w=_a(d),b=l.selectAll(".domain").data([0]),S=(b.enter().append("path").attr("class","domain"),o.transition(b));m.append("line"),m.append("text");var C,M,_,E,k=m.select("line"),T=v.select("line"),R=g.select("text").text(p),A=m.select("text"),I=v.select("text"),N="top"===n||"left"===n?-1:1;if("bottom"===n||"top"===n?(s=zs,C="x",_="y",M="x2",E="y2",R.attr("dy",N<0?"0em":".71em").style("text-anchor","middle"),S.attr("d","M"+w[0]+","+N*i+"V0H"+w[1]+"V"+N*i)):(s=js,C="y",_="x",M="y2",E="x2",R.attr("dy",".32em").style("text-anchor",N<0?"end":"start"),S.attr("d","M"+N*i+","+w[0]+"H0V"+w[1]+"H"+N*i)),k.attr(E,N*r),A.attr(_,N*x),T.attr(M,0).attr(E,N*r),I.attr(C,0).attr(_,N*x),d.rangeBand){var L=d,D=L.rangeBand()/2;f=d=function(e){return L(e)+D}}else f.rangeBand?f=d:y.call(s,d,f);m.call(s,f,d),v.call(s,d,d)}))}return l.scale=function(e){return arguments.length?(t=e,l):t},l.orient=function(e){return arguments.length?(n=e in qs?e+"":Os,l):n},l.ticks=function(){return arguments.length?(u=s(arguments),l):u},l.tickValues=function(e){return arguments.length?(c=e,l):c},l.tickFormat=function(t){return arguments.length?(e=t,l):e},l.tickSize=function(e){var t=arguments.length;return t?(r=+e,i=+arguments[t-1],l):r},l.innerTickSize=function(e){return arguments.length?(r=+e,l):r},l.outerTickSize=function(e){return arguments.length?(i=+e,l):i},l.tickPadding=function(e){return arguments.length?(a=+e,l):a},l.tickSubdivide=function(){return arguments.length&&l},l};var Os="bottom",qs={top:1,right:1,bottom:1,left:1};function zs(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}))}function js(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}))}o.svg.brush=function(){var e,t,n=Q(d,"brushstart","brush","brushend"),r=null,i=null,a=[0,0],s=[0,0],u=!0,c=!0,f=Hs[0];function d(e){e.each((function(){var e=o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",m).on("touchstart.brush",m),t=e.selectAll(".background").data([0]);t.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=e.selectAll(".resize").data(f,P);n.exit().remove(),n.enter().append("g").attr("class",(function(e){return"resize "+e})).style("cursor",(function(e){return Us[e]})).append("rect").attr("x",(function(e){return/[ew]$/.test(e)?-3:null})).attr("y",(function(e){return/^[ns]/.test(e)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",d.empty()?"none":null);var a,s=o.transition(e),u=o.transition(t);r&&(a=_a(r),u.attr("x",a[0]).attr("width",a[1]-a[0]),p(s)),i&&(a=_a(i),u.attr("y",a[0]).attr("height",a[1]-a[0]),g(s)),h(s)}))}function h(e){e.selectAll(".resize").attr("transform",(function(e){return"translate("+a[+/e$/.test(e)]+","+s[+/^s/.test(e)]+")"}))}function p(e){e.select(".extent").attr("x",a[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",a[1]-a[0])}function g(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function m(){var f,m,y=this,v=o.select(o.event.target),x=n.of(y,arguments),w=o.select(y),b=v.datum(),S=!/^(n|s)$/.test(b)&&r,C=!/^(e|w)$/.test(b)&&i,M=v.classed("extent"),_=_e(y),E=o.mouse(y),k=o.select(l(y)).on("keydown.brush",(function(){32==o.event.keyCode&&(M||(f=null,E[0]-=a[1],E[1]-=s[1],M=2),F())})).on("keyup.brush",(function(){32==o.event.keyCode&&2==M&&(E[0]+=a[1],E[1]+=s[1],M=0,F())}));if(o.event.changedTouches?k.on("touchmove.brush",A).on("touchend.brush",N):k.on("mousemove.brush",A).on("mouseup.brush",N),w.interrupt().selectAll("*").interrupt(),M)E[0]=a[0]-E[0],E[1]=s[0]-E[1];else if(b){var T=+/w$/.test(b),R=+/^n/.test(b);m=[a[1-T]-E[0],s[1-R]-E[1]],E[0]=a[T],E[1]=s[R]}else o.event.altKey&&(f=E.slice());function A(){var e=o.mouse(y),t=!1;m&&(e[0]+=m[0],e[1]+=m[1]),M||(o.event.altKey?(f||(f=[(a[0]+a[1])/2,(s[0]+s[1])/2]),E[0]=a[+(e[0]<f[0])],E[1]=s[+(e[1]<f[1])]):f=null),S&&I(e,r,0)&&(p(w),t=!0),C&&I(e,i,1)&&(g(w),t=!0),t&&(h(w),x({type:"brush",mode:M?"move":"resize"}))}function I(n,r,i){var o,l,d=_a(r),h=d[0],p=d[1],g=E[i],m=i?s:a,y=m[1]-m[0];if(M&&(h-=g,p-=y+g),o=(i?c:u)?Math.max(h,Math.min(p,n[i])):n[i],M?l=(o+=g)+y:(f&&(g=Math.max(h,Math.min(p,2*f[i]-o))),g<o?(l=o,o=g):l=g),m[0]!=o||m[1]!=l)return i?t=null:e=null,m[0]=o,m[1]=l,!0}function N(){A(),w.style("pointer-events","all").selectAll(".resize").style("display",d.empty()?"none":null),o.select("body").style("cursor",null),k.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),_(),x({type:"brushend"})}w.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",v.style("cursor")),x({type:"brushstart"}),A()}return d.event=function(r){r.each((function(){var r=n.of(this,arguments),i={x:a,y:s,i:e,j:t},u=this.__chart__||i;this.__chart__=i,Rs?o.select(this).transition().each("start.brush",(function(){e=u.i,t=u.j,a=u.x,s=u.y,r({type:"brushstart"})})).tween("brush:brush",(function(){var n=co(a,i.x),o=co(s,i.y);return e=t=null,function(e){a=i.x=n(e),s=i.y=o(e),r({type:"brush",mode:"resize"})}})).each("end.brush",(function(){e=i.i,t=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})})):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))}))},d.x=function(e){return arguments.length?(f=Hs[!(r=e)<<1|!i],d):r},d.y=function(e){return arguments.length?(f=Hs[!r<<1|!(i=e)],d):i},d.clamp=function(e){return arguments.length?(r&&i?(u=!!e[0],c=!!e[1]):r?u=!!e:i&&(c=!!e),d):r&&i?[u,c]:r?u:i?c:null},d.extent=function(n){var o,u,c,l,f;return arguments.length?(r&&(o=n[0],u=n[1],i&&(o=o[0],u=u[0]),e=[o,u],r.invert&&(o=r(o),u=r(u)),u<o&&(f=o,o=u,u=f),o==a[0]&&u==a[1]||(a=[o,u])),i&&(c=n[0],l=n[1],r&&(c=c[1],l=l[1]),t=[c,l],i.invert&&(c=i(c),l=i(l)),l<c&&(f=c,c=l,l=f),c==s[0]&&l==s[1]||(s=[c,l])),d):(r&&(e?(o=e[0],u=e[1]):(o=a[0],u=a[1],r.invert&&(o=r.invert(o),u=r.invert(u)),u<o&&(f=o,o=u,u=f))),i&&(t?(c=t[0],l=t[1]):(c=s[0],l=s[1],i.invert&&(c=i.invert(c),l=i.invert(l)),l<c&&(f=c,c=l,l=f))),r&&i?[[o,c],[u,l]]:r?[o,u]:i&&[c,l])},d.clear=function(){return d.empty()||(a=[0,0],s=[0,0],e=t=null),d},d.empty=function(){return!!r&&a[0]==a[1]||!!i&&s[0]==s[1]},o.rebind(d,n,"on")};var Us={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Hs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Fs=jt.format=mn.timeFormat,Gs=Fs.utc,Qs=Gs("%Y-%m-%dT%H:%M:%S.%LZ");function Vs(e){return e.toISOString()}function Bs(e,t,n){function r(t){return e(t)}function i(e,n){var r=(e[1]-e[0])/n,i=o.bisect(Ys,r);return i==Ys.length?[t.year,La(e.map((function(e){return e/31536e6})),n)[2]]:i?t[r/Ys[i-1]<Ys[i]/r?i-1:i]:[Ks,La(e,n)[2]]}return r.invert=function(t){return Ws(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Ws)},r.nice=function(e,t){var n=r.domain(),o=Ma(n),a=null==e?i(o,10):"number"==typeof e&&i(o,e);function s(n){return!isNaN(n)&&!e.range(n,Ws(+n+1),t).length}return a&&(e=a[0],t=a[1]),r.domain(ka(n,t>1?{floor:function(t){for(;s(t=e.floor(t));)t=Ws(t-1);return t},ceil:function(t){for(;s(t=e.ceil(t));)t=Ws(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Ma(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],Ws(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return Bs(e.copy(),t,n)},Ia(r,e)}function Ws(e){return new Date(e)}Fs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Vs:Qs,Vs.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Vs.toString=Qs.toString,jt.second=Gt((function(e){return new Ut(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))}),(function(e){return e.getSeconds()})),jt.seconds=jt.second.range,jt.seconds.utc=jt.second.utc.range,jt.minute=Gt((function(e){return new Ut(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))}),(function(e){return e.getMinutes()})),jt.minutes=jt.minute.range,jt.minutes.utc=jt.minute.utc.range,jt.hour=Gt((function(e){var t=e.getTimezoneOffset()/60;return new Ut(36e5*(Math.floor(e/36e5-t)+t))}),(function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))}),(function(e){return e.getHours()})),jt.hours=jt.hour.range,jt.hours.utc=jt.hour.utc.range,jt.month=Gt((function(e){return(e=jt.day(e)).setDate(1),e}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e){return e.getMonth()})),jt.months=jt.month.range,jt.months.utc=jt.month.utc.range;var Ys=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Xs=[[jt.second,1],[jt.second,5],[jt.second,15],[jt.second,30],[jt.minute,1],[jt.minute,5],[jt.minute,15],[jt.minute,30],[jt.hour,1],[jt.hour,3],[jt.hour,6],[jt.hour,12],[jt.day,1],[jt.day,2],[jt.week,1],[jt.month,1],[jt.month,3],[jt.year,1]],Zs=Fs.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",tr]]),Ks={range:function(e,t,n){return o.range(Math.ceil(e/n)*n,+t,n).map(Ws)},floor:P,ceil:P};Xs.year=jt.year,jt.scale=function(){return Bs(o.scale.linear(),Xs,Zs)};var Js=Xs.map((function(e){return[e[0].utc,e[1]]})),eu=Gs.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",tr]]);function tu(e){return JSON.parse(e.responseText)}function nu(e){var t=u.createRange();return t.selectNode(u.body),t.createContextualFragment(e.responseText)}Js.year=jt.year.utc,jt.scale.utc=function(){return Bs(o.scale.linear(),Js,eu)},o.text=Ct((function(e){return e.responseText})),o.json=function(e,t){return Mt(e,"application/json",tu,t)},o.html=function(e,t){return Mt(e,"text/html",nu,t)},o.xml=Ct((function(e){return e.responseXML})),this.d3=o,void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)}()},223:function(e,t,n){"use strict";var r=r||{};r.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var r=0;r<t.children.length;r++)e(t.children[r]);if(1===t.children.length){var i=1.2*t.size;n&&(i=.1*t.children[0].size),t.children.push({name:"placeholder",size:i})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var r=t[n];"placeholder"===r.name?t.splice(n,1):r.children&&e(r.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var r=n.x-n.children[0].x;n.children[0].x+=r,i(n.children[0],r)}}function i(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,i(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,r=0;r<e.length;r++){var i=e[r];i.x-=t,i.y-=n}}},t.a=r},235:function(e,t){
|
|
2
|
-
/*! Copyright (c) 2014 Hidenari Nozaki and contributors | Licensed under the MIT license */
|
|
3
|
-
!function(e,t){"use strict";!function(e){e.module("angucomplete-alt",[]).directive("angucompleteAlt",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate",function(e,t,n,r,i,o,a){var s=40,u=39,c=38,l=37,f=27,d=13,h=9,p=3,g=524288,m=500,y=200,v="autocomplete-required",x="Searching...",w="No results found";function b(t,o,a,b){var S,C,M,_,E,k,T=o.find("input"),R=p,A=null,I=v,N=null,L=null,D=o[0].querySelector(".angucomplete-dropdown"),$=!1,P=null;function O(e,n){e&&("object"==typeof e?(t.searchStr=U(e),j({originalObject:e})):"string"==typeof e&&e.length>0?t.searchStr=e:console&&console.error&&console.error("Tried to set "+(n?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),G(!0))}function q(e){P=null,t.hideResults(e),document.body.removeEventListener("click",q)}function z(e){return e.which?e.which:e.keyCode}function j(e){"function"==typeof t.selectedObject?t.selectedObject(e,t.selectedObjectData):t.selectedObject=e,G(!!e)}function U(e){return t.titleField.split(",").map((function(t){return H(e,t)})).join(" ")}function H(e,t){var n,r;if(t){n=t.split("."),r=e;for(var i=0;i<n.length;i++)r=r[n[i]]}else r=e;return r}function F(e,n){var i,o,a;if(a=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),i=(o=e.match(a))?e.replace(a,'<span class="'+t.matchClass+'">'+o[0]+"</span>"):e,r.trustAsHtml(i)}function G(e){t.notEmpty=e,N=t.searchStr,t.fieldRequired&&b&&t.inputName&&b[t.inputName].$setValidity(I,e)}function Q(e){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.searchStr||(e&&e.preventDefault(),i.cancel(A),Z(),j({originalObject:t.searchStr}),t.clearSelected&&(t.searchStr=null),ee())}function V(){return o[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function B(e){D.scrollTop=D.scrollTop+e}function W(){var e=t.results[t.currentIndex];t.matchClass?T.val(U(e.originalObject)):T.val(e.title)}function Y(e){return function(n,r,i,o){r||i||o||!n.data||(n=n.data),t.searching=!1,re(H(C(n),t.remoteUrlDataField),e)}}function X(e,n,r,i){t.searching=!1,0!==n&&-1!==n&&(n||r||i||(n=e.status),t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(e,n,r,i):console&&console.error&&console.error("http error"))}function Z(){L&&L.resolve()}function K(r){var i={},o=t.remoteUrl+encodeURIComponent(r);t.remoteUrlRequestFormatter&&(i={params:t.remoteUrlRequestFormatter(r)},o=t.remoteUrl),t.remoteUrlRequestWithCredentials&&(i.withCredentials=!0),Z(),L=e.defer(),i.timeout=L.promise,n.get(o,i).success(Y(r)).error(X)}function J(n){Z(),L=e.defer(),t.remoteApiHandler(n,L.promise).then(Y(n)).catch(X)}function ee(){t.showDropdown=!1,t.results=[],D&&(D.scrollTop=0)}function te(){t.showDropdown=_,t.currentIndex=t.focusFirst?0:-1,t.results=[]}function ne(e){!e||e.length<R||(t.localData?t.$apply((function(){var n;n=void 0!==t.localSearch()?t.localSearch()(e,t.localData):function(e){var n,r,i,o,a=t.searchFields.split(","),s=[];for(void 0!==t.parseInput()&&(e=t.parseInput()(e)),n=0;n<t.localData.length;n++){for(r=!1,i=0;i<a.length;i++)o=H(t.localData[n],a[i])||"",r=r||o.toString().toLowerCase().indexOf(e.toString().toLowerCase())>=0;r&&(s[s.length]=t.localData[n])}return s}(e),t.searching=!1,re(n,e)})):t.remoteApiHandler?J(e):K(e))}function re(e,n){var r,i,o,a,s,u;if(e&&e.length>0)for(t.results=[],r=0;r<e.length;r++)t.titleField&&""!==t.titleField&&(a=s=U(e[r])),i="",t.descriptionField&&(i=u=H(e[r],t.descriptionField)),o="",t.imageField&&(o=H(e[r],t.imageField)),t.matchClass&&(s=F(a,n),u=F(i,n)),t.results[t.results.length]={title:s,description:u,image:o,originalObject:e[r]};else t.results=[];t.autoMatch&&1===t.results.length&&function(e,n,r){if(!r)return!1;for(var i in n)if(n[i].toLowerCase()===r.toLowerCase())return t.selectResult(e),!0;return!1}(t.results[0],{title:a,desc:i||""},t.searchStr)?t.showDropdown=!1:0!==t.results.length||E?t.showDropdown=!0:t.showDropdown=!1}function ie(){t.localData?re(t.localData,""):t.remoteApiHandler?J(""):K("")}o.on("mousedown",(function(e){e.target.id?(P=e.target.id)===t.id+"_dropdown"&&document.body.addEventListener("click",q):P=e.target.className})),t.currentIndex=t.focusFirst?0:null,t.searching=!1,M=t.$watch("initialValue",(function(e){e&&(M(),O(e,!0))})),t.$watch("fieldRequired",(function(e,n){e!==n&&(e?N&&-1!==t.currentIndex?G(!0):G(!1):b[t.inputName].$setValidity(I,!0))})),t.$on("angucomplete-alt:clearInput",(function(e,n){n&&n!==t.id||(t.searchStr=null,j(),G(!1),ee())})),t.$on("angucomplete-alt:changeInput",(function(e,n,r){n&&n===t.id&&O(r)})),t.onFocusHandler=function(){t.focusIn&&t.focusIn(),0!==R||t.searchStr&&0!==t.searchStr.length||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,ie())},t.hideResults=function(){P&&(P===t.id+"_dropdown"||P.indexOf("angucomplete")>=0)?P=null:(S=i((function(){ee(),t.$apply((function(){t.searchStr&&t.searchStr.length>0&&T.val(t.searchStr)}))}),y),Z(),t.focusOut&&t.focusOut(),t.overrideSuggestions&&t.searchStr&&t.searchStr.length>0&&-1===t.currentIndex&&Q())},t.resetHideResults=function(){S&&i.cancel(S)},t.hoverRow=function(e){t.currentIndex=e},t.selectResult=function(e){t.matchClass&&(e.title=U(e.originalObject),e.description=H(e.originalObject,t.descriptionField)),t.clearSelected?t.searchStr=null:t.searchStr=e.title,j(e),ee()},t.inputChangeHandler=function(e){return e.length<R?(Z(),ee()):0===e.length&&0===R&&(t.searching=!1,ie()),t.inputChanged&&(e=t.inputChanged(e)),e},t.fieldRequiredClass&&""!==t.fieldRequiredClass&&(I=t.fieldRequiredClass),t.minlength&&""!==t.minlength&&(R=parseInt(t.minlength,10)),t.pause||(t.pause=m),t.clearSelected||(t.clearSelected=!1),t.overrideSuggestions||(t.overrideSuggestions=!1),t.fieldRequired&&b&&(t.initialValue?G(!0):G(!1)),t.inputType=a.type?a.type:"text",t.textSearching=a.textSearching?a.textSearching:x,t.textNoResults=a.textNoResults?a.textNoResults:w,_="false"!==t.textSearching,E="false"!==t.textNoResults,t.maxlength=a.maxlength?a.maxlength:g,T.on("keydown",(function(e){var n=z(e),r=null,i=null;n===d&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(e.preventDefault(),t.selectResult(t.results[t.currentIndex])):(Q(e),ee()),t.$apply()):n===s&&t.results?(e.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply((function(){t.currentIndex++,W()})),$&&(r=V(),D.getBoundingClientRect().top+parseInt(getComputedStyle(D).maxHeight,10)<r.getBoundingClientRect().bottom&&B(function(e){var t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(r))))):n===c&&t.results?(e.preventDefault(),t.currentIndex>=1?(t.$apply((function(){t.currentIndex--,W()})),$&&(i=V().getBoundingClientRect().top-(D.getBoundingClientRect().top+parseInt(getComputedStyle(D).paddingTop,10)))<0&&B(i-1)):0===t.currentIndex&&t.$apply((function(){t.currentIndex=-1,T.val(t.searchStr)}))):n===h?t.results&&t.results.length>0&&t.showDropdown?-1===t.currentIndex&&t.overrideSuggestions?Q():(-1===t.currentIndex&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest()):t.searchStr&&t.searchStr.length>0&&Q():n===f&&e.preventDefault()})),T.on("keyup",(function(e){var n=z(e);if(n!==l&&n!==u)if(n===c||n===d)e.preventDefault();else if(n===s)e.preventDefault(),!t.showDropdown&&t.searchStr&&t.searchStr.length>=R&&(te(),t.searching=!0,ne(t.searchStr));else if(n===f)ee(),t.$apply((function(){T.val(t.searchStr)}));else{if(0===R&&!t.searchStr)return;t.searchStr&&""!==t.searchStr?t.searchStr.length>=R&&(te(),A&&i.cancel(A),t.searching=!0,A=i((function(){ne(t.searchStr)}),t.pause)):t.showDropdown=!1,N&&N!==t.searchStr&&!t.clearSelected&&t.$apply((function(){j()}))}})),k="remoteUrlResponseFormatter",C=function(e){return t[k]?t[k](e):e},i((function(){var e=getComputedStyle(D);$=e.maxHeight&&"auto"===e.overflowY}))}return(o.put("/angucomplete-alt/index.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}"> <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="searchStr" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(searchStr)"/> <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="showDropdown"> <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div> <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div> <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}"> <div ng-if="imageField" class="angucomplete-image-holder"> <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/> <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div> </div> <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div> <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div> <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div> <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div> </div> </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",selectedObjectData:"=",disableInput:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",textSearching:"@",textNoResults:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(e,t){return t.templateUrl||"/angucomplete-alt/index.html"},compile:function(e){var t=a.startSymbol(),n=a.endSymbol();if("{{"!==t||"}}"!==n){var r=e.html().replace(/\{\{/g,t).replace(/\}\}/g,n);e.html(r)}return b}})}])}(window.angular)}()},34:function(e,t){function n(e,t){return{showToastMessageWithDelay:function(n){return new Promise(r=>{e.success(t.instant(n)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",n),n.$inject=["toastr","$translate"]},35:function(e,t,n){"use strict";n.r(t);n(4),n(12);var r=n(0);function i(e,t,n,i,o,a,s,u,c,l,f,d,h,p,g){const m={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:!0,sameAs:!0};let y,v=l.getPrincipal();function x(e,t){m.inference=t.appSettings.DEFAULT_INFERENCE,m.sameAs=t.appSettings.DEFAULT_SAMEAS,e.skipCountQuery=!t.appSettings.EXECUTE_COUNT,e.ignoreSharedQueries=t.appSettings.IGNORE_SHARED_QUERIES,e.tabsData=e.tabs=h.get(p.TABS_STATE)||[m],e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(e,t,n){w(n.currentQuery)})),e.$on("repositoryIsSet",M)}function w(t){!function(){if(i.isActiveRepoOntopType())return;const t=document.getElementById("sameAs");!t||e.currentQuery.inference||t.disabled?e.currentQuery.inference&&t.disabled&&(t.removeAttribute("disabled"),e.currentQuery.sameAs=v.appSettings.DEFAULT_SAMEAS):(t.disabled=!0,e.currentQuery.sameAs=!1)}(),e.tabs.forEach((function(n,r){n.id===t.id&&(e.tabs[r].query=t.query,i.isActiveRepoOntopType()||(e.tabs[r].inference=t.inference,e.tabs[r].sameAs=t.sameAs))})),h.set(p.TABS_STATE,e.tabs)}function b(t,n,r,i){const o=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=n,e.extraMessage=r,e.noLoaderTimer=i,o.addClass("hide")):(e.progressMessage="",e.extraMessage="",e.noLoaderTimer=!1,e.currentTrackAlias=null,e.abortRequested=!1,o.removeClass("hide")),null===e.$$phase&&e.$apply()}function S(n){function r(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}if(e.orientationViewMode){if("yasr"===e.viewMode){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let r;r=t(n?function(){e.fixSizesOnHorizontalViewModeSwitch(n)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){t.cancel(r)}))}window.yasr&&window.yasr.container&&t((function(){window.yasr.container.resize()}),100)}function C(){S(!0)}function M(t,n){n.newRepo&&(e.tabsData=h.get(p.TABS_STATE),e.tabsData.forEach((function(e){e.yasrData=void 0,e.queryType=void 0,e.resultsCount=0,e.allResultsCount=0,e.sizeDelta=void 0})),h.set(p.TABS_STATE,e.tabsData),e.tabs=e.tabsData,e.currentQuery={},e.errorMessage=null,e.repositoryError=null)}function _(e){t((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function E(r,o){if(e.executedQueryTab=e.currentQuery,o){if("SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType())return void n.warning(g.instant("query.editor.warning.msg"));if(i.isActiveRepoOntopType())return void n.warning(g.instant("query.editor.virtual.repo.warning.msg"))}if(e.explainRequested=o,!e.queryIsRunning){if(r?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.lastRunQueryMode=window.editor.getQueryMode(),"update"===e.lastRunQueryMode&&i.isActiveRepoOntopType())return void n.warning(g.instant("query.editor.virtual.repo.update.warning.msg"));if(b(!0,"update"===e.lastRunQueryMode?"Executing update":"Evaluating query"),"none"!==e.viewMode){e.viewMode="none",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch();const n=t(window.editor.query,500);e.$on("$destroy",(function(){t.cancel(n)}))}else window.editor.query()}}function k(){e.showSampleQueries=!e.showSampleQueries,e.showSampleQueries?s.getSavedQueries().success((function(t){e.sampleQueries=t,$("#sampleQueriesCollapse").collapse("show").width("300px")})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.get.saved.queries.error"))})):$("#sampleQueriesCollapse").collapse("hide")}function T(t){let n=void 0;return e.tabsData.forEach((function(e){if(e.name===t.name&&e.query===t.body)return n=e.id,e})),n}function R(t){return function(n,r,i){e.savedQuery={name:n,query:r||window.editor.getValue(),shared:i},$(t).modal("show")}}function A(t){for(let n=0;n<e.tabsData.length;n++){if(e.tabsData[n].id===t)return n}}v?x(e,v):e.$on("securityInit",(function(e){v=l.getPrincipal(),x(e.currentScope,v)})),this.hint=document.createElement("span"),this.hint.innerHTML=g.instant("query.editor.autocomplete.hint"),this.hint.style.fontSize="12px",this.hint.style.color="gray",this.hint.style.backgroundColor="white",this.hint.style.position="absolute",this.hint.style.zIndex="3",this.hint.style.paddingLeft="12px",e.$watch((function(){return angular.element(".CodeMirror-hints").length}),e=>{if(e){const e=angular.element(".CodeMirror-hints")[0].getBoundingClientRect();document.body.appendChild(this.hint),this.hint.style.top=e.top-20+"px",this.hint.style.left=e.right-this.hint.offsetWidth-12+"px"}else this.hint&&this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint)}),e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:1e3,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.saveTab=function(t){const n=A(t);if(void 0===n)return{};const r=e.tabsData[n];return e.saveQueryToLocal(r),r},e.loadTab=function(n){e.tabsData=h.get(p.TABS_STATE)||[m];const r=A(n),o=e.tabsData[r];o.yasrData&&b(!0,g.instant("query.editor.render.results.msg"),null,!0);t((function(){""===e.currentQuery.query&&(e.currentQuery.query=" "),t((function(){window.editor.setValue(e.currentQuery.query),e.yasr.updateDownloadDropdown(),e.$broadcast("tabLoaded",e.currentQuery.id),e.yasr.options.output=o.outputType,o.yasrData&&(o.yasrData.customError?(e.yasr.results={getException:function(){return o.yasrData.customError}},b(!1)):t((function(){e.setYasrResponse(o.yasrData,o.textStatus,o.jqXhrOrErrorString),b(!1),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&t((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),0)}),0))}),0)}),0),h.set(p.TABS_STATE_CURRENT_ID,n),e.currentQuery=o,t((function(){e.currentTabConfig={},e.currentTabConfig.queryType=o.queryType,e.currentTabConfig.resultsCount=o.resultsCount,e.currentTabConfig.offset=o.offset,e.currentTabConfig.allResultsCount=o.allResultsCount,e.currentTabConfig.allResultsCountExact=o.allResultsCountExact,e.currentTabConfig.page=o.page,e.currentTabConfig.pageSize=o.pageSize,e.currentTabConfig.timeFinished=o.timeFinished,e.currentTabConfig.timeTook=o.timeTook,e.currentTabConfig.sizeDelta=o.sizeDelta,e.currentTabConfig.customUpdateMessage=o.customUpdateMessage,e.currentTabConfig.errorMessage=o.errorMessage,e.currentTabConfig.warningMessage=o.warningMessage,e.$apply()}),0),$("#yasr").css("padding","0"),y||(y=setInterval(L,200));!function(){const t=i.isActiveRepoOntopType(),n=i.isActiveRepoFedXType();(function(e){const t=document.getElementById("sameAs"),n=document.getElementById("inference");t&&(t.disabled=!!e);n&&(n.disabled=!!e)})(t),e.nocount=!(!t&&!n)||!v.appSettings.EXECUTE_COUNT,t&&(e.currentQuery.inference=!0,e.currentQuery.sameAs=!0)}()},e.addNewTab=function(n,r,i){if(!D(!0))return;let o;o=r||i?{id:"1",name:r,query:i,inference:v.appSettings.DEFAULT_INFERENCE,sameAs:v.appSettings.DEFAULT_SAMEAS}:{id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:v.appSettings.DEFAULT_INFERENCE,sameAs:v.appSettings.DEFAULT_SAMEAS};I++;const a=""+I;e.tabsData=e.tabs;const s=o;s.id=a,e.tabsData.push(s),h.set(p.TABS_STATE_MAXID,I),h.set(p.TABS_STATE,e.tabsData);const u=Array.prototype.slice.call(arguments,1);t((function(){e.$apply(),_(a),n&&n.apply(this,u)}),0),e.tabs=e.tabsData},e.isTabChangeOk=D,e.runQuery=E,e.abortCurrentQuery=function(){d.abortQueryByAlias(e.currentTrackAlias).success((function(){e.abortRequested=!0}))},e.editQuery=function(t){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.edit.saved.query",{name:t.name}),query:t,edit:!0,okButtonText:g.instant("common.save.btn")}}}}).result.then((function(r){const i={name:r.name,body:r.body,shared:r.shared};t.name!==r.name?s.addNewSavedQuery(i).success((function(){e.deleteQueryHttp(t.name,!0)})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.edit.saved.query.error"))})):s.editSavedQuery(i).success((function(){$("#editQueryContainer").modal("hide"),e.toggleSampleQueries(),n.success(g.instant("query.editor.edit.saved.query.success.msg",{name:t.name}))})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.edit.saved.query.error"))}))}))},e.getNamespaces=function(){b(!0,g.instant("common.refreshing.namespaces"),g.instant("common.extra.message")),e.namespacesLoading=!0,f.getRepositoryNamespaces().success((function(t){const n={};t.results.bindings.forEach((function(e){n[e.prefix.value]=e.namespace.value})),e.namespaces=n})).error((function(t){e.repositoryError=getError(t)})).finally((function(){b(!1),e.namespacesLoading=!1}))},e.changePagination=function(){E(!0,e.explainRequested)},e.toggleSampleQueries=k,e.addKnownPrefixes=function(){s.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return n.error(t,g.instant("common.add.known.prefixes.error")),!0}))},e.getExistingTabId=T,e.querySelected=function(t){const n=T(t);e.toggleSampleQueries(),e.isTabChangeOk(!1)&&(e.highlightNextTabChange=!0,angular.isDefined(n)?_(n):e.addNewTab(null,t.name,t.body))},e.deleteQuery=function(t){a.openSimpleModal({title:g.instant("common.confirm"),message:g.instant("query.editor.delete.saved.query.warning.msg",{savedQueryName:t}),warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.deleteQueryHttp=function(t,r){s.deleteSavedQuery(t).success((function(){e.toggleSampleQueries(),r||n.success(g.instant("query.editor.delete.saved.query.success.msg",{savedQueryName:t}))})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.delete.saved.query.error"))}))},e.saveQuery=function(t,n){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.create.saved.query.msg"),query:{name:t.name,body:t.query,shared:t.shared},edit:!1,okButtonText:g.instant("common.create.btn"),queryExists:n,existingQueryErrMsg:Object(r.decodeHTML)(g.instant("query.sample.existing.query.warning",{name:t.name}))}}}}).result.then((function(t){e.saveQueryHttp(t)}),(function(){}))},e.saveQueryHttp=function(t){s.addNewSavedQuery(t).success((function(){n.success(g.instant("query.editor.save.saved.query.success.msg",{name:t.name}))})).error((function(r){let i=getError(r);if(n.error(i,g.instant("query.editor.create.saved.query.error")),i="Query '"+t.name+"' already exists!"){t.query=t.body;const n=!0;e.saveQuery(t,n)}}))},e.saveQueryToLocal=w,e.setLoader=b,e.getLoaderMessage=function(){const t=(Date.now()-e.queryStartTime)/1e3;let n="",r="";e.noLoaderTimer||(n=e.getHumanReadableSeconds(t));r=e.progressMessage?g.instant("query.editor.progress.msg",{progressMessage:e.progressMessage,timeHuman:n}):g.instant("common.running.operation",{timeHuman:n});e.extraMessage&&t>10&&(r+=g.instant("query.editor.extra.msg",{extraMessage:e.extraMessage}));return r},e.fixSizesOnHorizontalViewModeSwitch=S,e.changeViewMode=function(){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,h.set(p.VIEW_MODE,e.orientationViewMode),S()},e.showHideEditor=C,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!h.get(p.VIEW_MODE)||"true"===h.get(p.VIEW_MODE),e.viewMode="none",e.getActiveRepository=function(){return i.getActiveRepository()},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return i.getActiveRepository()},e.orientationViewMode||C(),window.onbeforeunload=function(){e.currentQuery&&e.saveTab(e.currentQuery.id),h.set(p.TABS_STATE,e.tabs)},e.$on("$destroy",(function(){e.currentQuery&&e.saveTab(e.currentQuery.id),h.set(p.TABS_STATE,e.tabs),clearInterval(y)})),e.$on("$destroy",(function(){clearInterval(y),window.editor=null,window.yasr=null})),$(document).mouseup((function(t){const n=$("#sampleQueriesCollapse");!n.is(t.target)&&0===n.has(t.target).length&&e.showSampleQueries&&k()}));let I=h.get(p.TABS_STATE_MAXID)||1;function N(e){return $(e).attr("data-id")}function L(){if(e.currentTabConfig.resultsCount>=0){const e=$(".saveAsDropDown");e.length>0&&!window.editor.queryValid?yasr.header.find(".saveAsDropDown").remove():0===e.length&&window.editor.queryValid&&yasr.updateDownloadDropdown()}}function D(t){return!(e.queryIsRunning&&!e.namespacesLoading)||(t?n.info(g.instant("query.editor.new.tab.running.query.warning.msg")):n.info(g.instant("query.editor.tab.switching.running.query.warning.msg")),!1)}e.highlightNextTabChange=!1,e.$on("tabAction",(function(n,r){r.relatedTarget&&(t.cancel(r.relatedTarget.timer),$(r.relatedTarget).css("color",""),e.saveTab(N(r.relatedTarget))),e.loadTab(N(r.target));const i=["#ED4F2F","","#ED4F2F"],o=[400,400,400];if(e.highlightNextTabChange){e.highlightNextTabChange=!1;let n=0;$(r.target).css("color",i[n]);const a=function(){n++,n<i.length?($(r.target).css("color",i[n]),r.target.timer=t(a,o[n])):$(r.target).css("color","")};t(a,o[n])}})),e.$on("deleteAllexeptSelected",(function(t,n){e.tabsData=n,e.tabs=n})),e.currentQuery={},e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.editQueryModal=R("#editQueryContainer"),e.deleteQueryModal=R("#confirmDeleteContainer"),e.saveQueryModal=R("#saveQueryContainer"),e.getResultsDescription=function(){let t;if(0===e.currentTabConfig.resultsCount)t="No results.";else{const n=(e.currentTabConfig.page-1)*e.currentTabConfig.pageSize+Math.min(e.currentTabConfig.resultsCount,e.currentTabConfig.pageSize);t=g.instant("query.editor.showing.results.from.msg")+u("currency")(e.currentTabConfig.offset,"",0)+g.instant("query.editor.to")+u("currency")(n,"",0),e.currentTabConfig.allResultsCount>0&&(t+=g.instant(e.currentTabConfig.allResultsCountExact?"query.editor.of":"query.editor.of.at.least"),t+=u("currency")(e.currentTabConfig.allResultsCount,"",0)),t+="."}return t},e.getUpdateDescription=function(){return e.currentTabConfig.customUpdateMessage?e.currentTabConfig.customUpdateMessage:void 0===e.currentTabConfig.sizeDelta?"":e.currentTabConfig.sizeDelta<0?g.instant("yasr.removed.statements.result.msg",{sizeDelta:Math.abs(e.currentTabConfig.sizeDelta)}):e.currentTabConfig.sizeDelta>0?g.instant("yasr.added.statements.result.msg",{sizeDelta:e.currentTabConfig.sizeDelta}):g.instant("yasr.statements.no.change.msg")},e.getStaleWarningMessage=function(){const t=60*Math.round((Date.now()-e.currentTabConfig.timeFinished)/6e4);if(t>=3600)return g.instant("yasr.stale.result.msg",{secondsAgo:e.getHumanReadableSeconds(t)})};const P=function(){};angular.element(c).bind("resize",P),e.$on("$destroy",(function(){angular.element(c).unbind("resize",P)}))}function o(e,t,n,r){n.queryExists&&(e.queryExists=!0),e.query=angular.copy(n.query),e.title=n.title,e.edit=n.edit,e.okButtonText=n.okButtonText,e.existingQueryErrMsg=r.trustAsHtml(n.existingQueryErrMsg),e.ok=function(){e.form.$valid&&t.close(e.query)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.core.directives.queryeditor.controllers",["graphdb.framework.utils.localstorageadapter","graphdb.framework.rest.sparql.service"]).controller("QueryEditorCtrl",i).controller("QuerySampleModalCtrl",o),i.$inject=["$scope","$timeout","toastr","$repositories","$modal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys","$translate"],o.$inject=["$scope","$modalInstance","data","$sce"]},39:function(e,t,n){"use strict";n.r(t),n.d(t,"STATIC_RULESETS",(function(){return r})),n.d(t,"REPOSITORY_TYPES",(function(){return i})),n.d(t,"FILENAME_PATTERN",(function(){return o})),n.d(t,"NUMBER_PATTERN",(function(){return a}));const r=[{id:"empty",name:"No inference"},{id:"rdfs-optimized",name:"RDFS (Optimized)"},{id:"rdfs",name:"RDFS"},{id:"rdfsplus-optimized",name:"RDFS-Plus (Optimized)"},{id:"owl-horst-optimized",name:"OWL-Horst (Optimized)"},{id:"owl-horst",name:"OWL-Horst"},{id:"owl2-ql-optimized",name:"OWL2-QL (Optimized)"},{id:"owl2-ql",name:"OWL2-QL"},{id:"owl-max-optimized",name:"OWL-Max (Optimized)"},{id:"owl-max",name:"OWL-Max"},{id:"owl2-rl-optimized",name:"OWL2-RL (Optimized)"},{id:"owl2-rl",name:"OWL2-RL"}],i={graphdbRepo:"graphdb",free:"free",eeWorker:"worker",eeMaster:"master",ontop:"ontop",se:"se",fedx:"fedx"},o=new RegExp("^[a-zA-Z0-9-_]+$"),a=new RegExp("^[0-9]+$")},41:function(e,t){angular.module("graphdb.framework.rest.graphexplore.data.service",[]).factory("GraphDataRestService",a),a.$inject=["$http"];const n="rest/class-hierarchy",r="rest/domain-range",i="rest/dependencies/",o="rest/explore-graph/";function a(e){return{getClassHierarchyData:function(t){return e.get(n,{params:{graphURI:t}})},reloadClassHierarchy:function(t){return e.get(n,{params:{doReload:!0,graphURI:t}})},getClassInstances:function(t){return e.get(`${n}/class-instances`,{params:{targetUri:t}})},getDomainRangeData:function(t,n){return e.get(r,{params:{targetUri:t,collapsed:n}})},checkDomainRangeData:function(t){return e.head(r,{params:{targetUri:t}})},getRelationshipsData:function(t,n,r){return e.get(`${i}matrix`,{params:{mode:n,classes:_.map(t,(function(e){return e.name})),graphURI:r}})},getRelationshipsClasses:function(t,n){return e.get(`${i}classes`,{params:{mode:t,graphURI:n}})},getRelationshipsStatus:function(t){return e.get(`${i}status`,{params:{graphURI:t}})},calculateRelationships:function(t){return e.get(`${i}update`,{params:{graphURI:t}})},getPredicates:function(t,n,r){return e.get(`${i}predicates`,{params:{from:t,to:n,mode:"all",graphURI:r}})},getInstanceNode:function(t){return e.get(`${o}node`,{params:{iri:t}})},getInstanceNodeLinks:function(t){return e.get(`${o}links`,{params:{iri:t}})},getRdfsLabelAndComment:function(t,n,r){const i=r||{};return e({url:"rest/explore/details",method:"GET",params:_.extend(i,{uri:t,languages:n}),headers:{Accept:"application/json"}})}}}},55:function(e,t){function n(e){return{initLazyList:function(t,n,r,i,o){return e((function(){const e=t+i-1,a=Math.max(0-i,e),s=Math.min(e+n-1,o.length);a>s?r([]):$.isArray(o)&&r(o.slice(a,s+1))}),100,!0)}}}angular.module("graphdb.framework.graphexplore.services.uiscroll",[]).factory("UiScrollService",n),n.$inject=["$timeout"]},56:function(e,t){angular.module("graphdb.framework.graphexplore.services.rdfsdetails",[]).factory("RdfsLabelCommentService",(function(){return{processAndFilterLabelAndComment:function(e){function t(e){const t={};for(let n in e)if(e.hasOwnProperty(n)){let r=n;n.indexOf(":")>-1&&(r=n,n=n.split(":")[1].toLowerCase()),t[n]=e[r]}return t}const n=e.results.bindings,r=[],i=[];_.each(n,(function(e){let n;angular.isUndefined(e.label)||(n=t(e.label),r.push(n)),angular.isUndefined(e.comment)||(n=t(e.comment),i.push(n))}));const o=function(e){return"en"===e.lang||"de"===e.lang},a=$.grep(r,o)[0],s=$.grep(i,o)[0],u=angular.isUndefined(a)?r.length>0?r[0].value:void 0:a.value,c=angular.isUndefined(s)?i.length>0?i[0].value:void 0:s.value;return{rdfsLabel:u,rdfsComment:c}}}}))},57:function(e,t){angular.module("graphdb.framework.rest.graphexplore.savedgraphs.service",[]).factory("SavedGraphsRestService",r),r.$inject=["$http"];const n="rest/explore-graph/saved";function r(e){return{getSavedGraphs:function(){return e.get(n)},getSavedGraph:function(t){return e.get(`${n}/${encodeURIComponent(t)}`)},editSavedGraph:function(t){return e.put(`${n}/${encodeURIComponent(t.id)}`,t)},deleteSavedGraph:function(t){return e.delete(`${n}/${encodeURIComponent(t.id)}`)},addNewSavedGraph:function(t){return e.post(n,t)}}}},58:function(e,t){angular.module("graphdb.framework.rest.graphconfig.service",[]).factory("GraphConfigRestService",i);const n="rest/explore-graph/",r=`${n}config`;function i(e){return{getGraphConfigs:function(){return e.get(r)},getGraphConfigSamples:function(){return e.get(`${n}samples`)},loadGraphForConfig:function(t,n,i,o){return e.get(`${r}/graph/${encodeURIComponent(t.id)}?includeInferred=${n}&linksLimit=${i}&sameAsState=${o}`)},getConfig:function(t){return e.get(`${r}/${encodeURIComponent(t)}`)},createGraphConfig:function(t){return e.post(r,t)},updateGraphConfig:function(t){return e.put(`${r}/${encodeURIComponent(t.id)}`,t)},deleteGraphConfig:function(t){return e.delete(`${r}/${encodeURIComponent(t.id)}`)},validateQuery:function(t,r,i,o,a){return e({method:"POST",url:`${n}validate`,data:{query:t,queryType:r,params:i,all:o,oneOf:a}})}}}i.$inject=["$http"]},59:function(e,t,n){"use strict";n.r(t);n(4);const r=400,i=50,o=1500,a=25;function s(e,t,n,s,u,c,l,f,d,h,p,g,m,y,v,x,w){e.classHierarchyData={},e.instancesObj={},e.instancesQueryObj={},e.instancesObj.items=[],e.instancesNotFiltered=[],e.isWarningShowed=!1,e.onopen=e.onclose=()=>angular.noop(),e.currentBrowserLimit=2e3,m.firefox?e.currentBrowserLimit=i:(m.safari||m.msie||m.msedge)&&(e.currentBrowserLimit=r);const b={};let S=0,C=0;t.key="",b.get=function(t,n,r){return d.initLazyList(t,n,r,S,e.instancesObj.items)};let M=allGraphs;const E=function(){if(e.getActiveRepository())return x.resolveGraphs().success((function(t){e.graphsInRepo=t.results.bindings,k()})).error((function(t){e.repositoryError=getError(t),l.error(getError(t),w.instant("graphexplore.error.getting.graphs"))}))},k=function(){const t=y.get(`classHierarchy-selectedGraph-${s.getActiveRepository()}`);null!==t&&e.graphsInRepo.some(e=>e.contextID.uri===t.contextID.uri)?M=t:y.set(`classHierarchy-selectedGraph-${s.getActiveRepository()}`,M)};function T(t,n,r){e.classCountSlider.options&&e.classCountSlider.options.ceil!==n&&(e.classCountSlider={});var i;e.classCountSlider.value||(e.showExternalElements=!0,e.classCountSlider={value:n,options:{floor:1,ceil:n,vertical:!0,showSelectionBar:!0,onChange:function(){p(R,100,!0)}}},null===y.get(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE)&&n>e.currentBrowserLimit&&(i=e.currentBrowserLimit,m.chrome?l.warning(w.instant("graphexplore.disabling.animations",{classLimit:i}),w.instant("graphexplore.reducing.visual.effects")):l.warning(w.instant("graphexplore.browser.performance",{browser:m.name,classLimit:i}),w.instant("graphexplore.reducing.visual.effects"))));const s=y.get(v.CLASS_HIERARCHY_SWITCH_PREFIXES);null!=s&&"true"!==s&&(e.showExternalElements=!0),r?e.classCountSlider.value=r:n>=o&&(e.classCountSlider.value=o,l.warning(w.instant("graphexplore.class.count.slider",{count:o}),w.instant("graphexplore.reducing.class.count"))),n>=a&&!window.ActiveXObject&&"ActiveXObject"in window&&!e.isWarningShowed&&(e.classCountSlider.value=a,e.isWarningShowed=!0,l.warning(w.instant("graphexplore.class.count.browser",{count:a}),w.instant("graphexplore.reducing.class.count"))),p((function(){e.$broadcast("reCalcViewDimensions")}),200),R();let u=0;$("rzslider").on("wheel",(function(t){t.preventDefault(),t.stopPropagation();const n=(new Date).getTime();if(!(n-u>100))return;u=n,t=t.originalEvent;let r=e.classCountSlider.value;t.deltaY<=-1?r+=1:t.deltaY>=1&&(r-=1),r!==e.classCountSlider.value&&r>=e.classCountSlider.options.floor&&r<=e.classCountSlider.options.ceil&&e.$apply((function(){e.classCountSlider.value=r,p(R,100,!0)}))}))}function R(){e.currentSliderValue=e.classCountSlider.value}function A(e){const t=e.fullName,r=e.name;f.checkDomainRangeData(t).success((function(e,i){204===i?l.warning(w.instant("graphexplore.no.domain.range",{name:r})):(y.set(v.CLASS_HIERARCHY_LAST_SELECTED_CLASS,n.hash()),n.hash("").path("domain-range-graph").search("uri",t).search("name",r))})).error((function(){l.error(w.instant("graphexplore.error.request.failed",{name:r}))}))}function I(){n.replace().hash("1"),e.instancesObj.items=[],e.showExternalElements=!1,e.showClassInfoPanel=!1,y.clearClassHieararchyState(),e.hidePrefixes="true"===y.get(v.CLASS_HIERARCHY_HIDE_PREFIXES),e.currentSliderValue=void 0,e.classHierarchyData={},t.$broadcast("angucomplete-alt:clearInput")}function N(){e.hasClassHierarchy()&&p((function(){$("#toolbar").removeClass("ng-hide")}),0)}t.$watch((function(){return t.key}),(function(){S=0,_.each(e.instancesObj.items,(function(e){t.key>e&&S++})),C++})),b.revision=function(){return C},e.adapterContainer={adapter:{remain:!0}},e.$on("goToDomainRangeGraphView",(function(e,t){A(t)})),e.$on("classCount",T),e.$on("repositoryIsSet",(function(){if(!u.isLicenseValid())return;if(L===s.getActiveRepository())return;L=s.getActiveRepository();if(e.repositoryError=null,!L)return;M=allGraphs,E().then(D)})),e.datasource=b,e.goToDomainRangeGraphView=A,e.toggleClassInfoSidePanel=function(){e.showClassInfoPanel=!e.showClassInfoPanel,t.$broadcast("sidePanelClosed")},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return s.getActiveRepository()},e.isSystemRepository=function(){return s.isSystemRepository()},e.confirmReloadClassHierarchy=function(){g.openSimpleModal({title:w.instant("confirm.operation"),message:w.instant("graphexplore.calculating.hierarchy"),warning:!0}).result.then((function(){I(),e.loader=!0,e.hierarchyError=!1,f.reloadClassHierarchy(M.contextID.uri).success((function(t){e.loader=!1,e.classHierarchyData=t,N(),T()})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),l.error(getError(t),w.instant("graphexplore.error.rdf.class.request"))}))}))},e.focusOnRoot=function(){e.$broadcast("rootFocus")},e.copyToClipboard=function(e){g.openCopyToClipboardModal(e)},e.searchedClassCallback=function(e){if(e){const n={name:e.title};t.$broadcast("searchedClass",n)}},e.instancesQueryObj.query="",e.instancesFilterFunc=function(t){return t.resolvedUri.toLowerCase().indexOf(e.instancesQueryObj.query.toLowerCase())>=0},E(),e.$watch("instancesObj.items",(function(){e.instancesObj.items.length>0&&p((function(){e.adapterContainer.adapter.reload()}),30)})),e.$watch("selectedClass",(function(){e.showClassInfoPanel&&function(t){const n=t.fullName;let r=t.name;if(r===n){const e=r.lastIndexOf("#");r=r.substring(e+1)}e.encodedUri=encodeURIComponent(n);const i=encodeURIComponent("prefix onto:<http://www.ontotext.com/> select ?s from onto:disable-sameAs { ?s a <"+n+"> . }");e.viewInstancesUri="sparql?name="+r+"&infer=true&sameAs=false&query="+i+"&execute=true",f.getRdfsLabelAndComment(n).success((function(t){e.rdfsLabel=t.label,e.rdfsComment=t.comment,e.expanded=!1})).error((function(){l.error("Error getting rdfs:label and rdfs:comment")})),e.instancesQueryObj.query="",e.instancesLoader=!0,f.getClassInstances(n).success((function(t){e.instancesObj.items=[],_.each(t,(function(t,n){const r={};r.type=t.startsWith("<<")&&t.endsWith(">>")?"triple":"uri",r.absUri=encodeURIComponent(t),r.absUriNonEncoded=t,r.resolvedUri=n,e.instancesObj.items.push(r)})),e.instancesLoader=!1,e.instancesSearchPlaceholder=e.instancesObj.items.length<1e3?"Search class instances":"Search first 1000 class instances",e.instancesNotFiltered=e.instancesObj.items})).error((function(){l.error(w.instant("graphexplore.error.instances.request"))}))}(e.selectedClass)})),$(document).ready((function(){$(".prefix-toggle").click((function(){$(".tooltip").hide()}))}));let L=s.getActiveRepository();function D(){I(),!e.isSystemRepository()&&e.isLicenseValid()&&(e.hierarchyError=!1,e.loader=!0,f.getClassHierarchyData(M.contextID.uri).success((function(t,n){e.showExternalElements=!0,e.loader=!1,e.classHierarchyData=t,207===n&&l.warning(w.instant("graphexplore.update.diagram"),w.instant("graphexplore.repository.data.changed")),N()})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),l.error(getError(t),w.instant("graphexplore.error.rdf.class.request"))})))}e.hasClassHierarchy=function(){return e.classHierarchyData.classCount&&e.getActiveRepositoryNoError()&&!e.isSystemRepository()},e.isLicenseValid=function(){return u.isLicenseValid()},e.chosenGraph=function(e){M=e,D(),y.set(`classHierarchy-selectedGraph-${s.getActiveRepository()}`,M)},e.getSelGraphValue=function(){return M.contextID.value},e.isAllGraphsSelected=function(){return"All graphs"===e.getSelGraphValue()}}angular.module("graphdb.framework.graphexplore.controllers.class",["pageslide-directive","ngAnimate","ui.scroll.jqlite","ui.scroll","angucomplete-alt","rzSlider","toastr","graphdb.framework.utils.localstorageadapter"]).controller("RdfClassHierarchyCtlr",s),s.$inject=["$scope","$rootScope","$location","$repositories","$licenseService","$window","toastr","GraphDataRestService","UiScrollService","RdfsLabelCommentService","$timeout","ModalService","bowser","LocalStorageAdapter","LSKeys","RDF4JRepositoriesRestService","$translate"]},60:function(e,t,n){"use strict";n.r(t);n(4);function r(e,t,n,r,i,o,a,s,u,c,l,f,d){e.predicatesObj={},e.predicatesQueryObj={},e.predicatesObj.items=[],e.predicatesQueryObj.query="",e.predicatesListNotFiltered=[],e.predicatesSearchPlaceholder="Search predicates",e.onopen=e.onclose=()=>angular.noop();const h={};let p=0,g=0;n.key="",h.get=function(t,n,r){return c.initLazyList(t,n,r,p,e.predicatesObj.items)},n.$watch((function(){return n.key}),(function(){p=0,_.each(e.predicatesObj.items,(function(e){n.key>e&&p++})),g++})),h.revision=function(){return g},e.adapterContainer={adapter:{remain:!0}};const m=a.get(s.DOMAIN_RANGE_COLLAPSE_EDGES);function y(){const e=a.get(s.CLASS_HIERARCHY_LAST_SELECTED_CLASS);t.search("").hash(e).path("hierarchy")}e.collapseEdges=null===m||"true"===m,e.datasource=h,e.$on("reloadDomainRangeGraphView",(function(e,n){const r=n.objectPropClassUri,i=n.objectPropClassName;t.path("domain-range-graph").search("uri",r).search("name",i)})),e.$on("switchEdgeMode",(function(e,n){t.path("domain-range-graph").search("uri",n.uri).search("name",n.name).search("collapsed",n.collapsed)})),e.$on("repositoryIsSet",(function(){if(v===i.getActiveRepository())return;v=i.getActiveRepository();y()})),e.$on("changeCollapsedEdgesState",(function(t,n){e.collapseEdges=!n,a.set(s.DOMAIN_RANGE_COLLAPSE_EDGES,e.collapseEdges)})),e.goToClassHierarchyView=y,e.copyToClipboard=function(e){l.openCopyToClipboardModal(e)},e.toggleCollapseEdgesState=function(){e.collapseEdges=!e.collapseEdges,o.history.pushState({collapsed:e.collapseEdges},"domainRangePage",null)},e.predicatesListFilterFunc=function(t){return t.resolvedUri.toLowerCase().indexOf(e.predicatesQueryObj.query.toLowerCase())>=0},e.$watch("predicatesObj.items",(function(){e.predicatesObj.items>0&&r((function(){e.adapterContainer.adapter.reload()}),30)})),e.$watch("selectedPredicate",(function(){e.showPredicatesInfoPanel&&function(t){const n=t.target,r=t.source;e.encodedUri=encodeURIComponent(t.uri),e.sourceTargetObjectNodeUri=n.objectPropClassUri?n.objectPropClassUri:r.objectPropClassUri,e.encodedSourceTargetObjectNodeUri=encodeURIComponent(e.sourceTargetObjectNodeUri),e.sourceTargetObjectNodeName=n.objectPropClassName?n.objectPropClassName:r.objectPropClassName?r.objectPropClassName:"<i>Literal</i>",-1===e.sourceTargetObjectNodeName.indexOf("Literal")?u.getRdfsLabelAndComment(e.sourceTargetObjectNodeUri).success((function(t){e.rdfsLabel=t.label,e.rdfsComment=t.comment})).error((function(){f.error(d.instant("domain.range.error.get.label.comment"))})):(e.rdfsComment=void 0,e.rdfsLabel=void 0);e.predicatesObj.items=[],e.predicatesQueryObj.query="";const i=n.allEdges?n.allEdges:r.allEdges;_.each(i,(function(t){const n={};n.absUri=encodeURIComponent(t.uri),n.absUriNonEncoded=t.uri,n.resolvedUri=t.name,n.isImplicit=t.implicit,e.predicatesObj.items.push(n)})),e.predicatesListNotFiltered=e.predicatesObj.items}(e.selectedPredicate)})),$(document).ready((function(){$(".compact-mode-toggle").click((function(){$(".tooltip").hide()}))}));let v=i.getActiveRepository()}angular.module("graphdb.framework.graphexplore.controllers.domainrange",["ui.scroll.jqlite","ui.scroll","ngSanitize","graphdb.framework.utils.localstorageadapter"]).controller("DomainRangeGraphCtlr",r),r.$inject=["$scope","$location","$rootScope","$timeout","$repositories","$window","LocalStorageAdapter","LSKeys","GraphDataRestService","UiScrollService","ModalService","toastr","$translate"]},61:function(e,t,n){(function(e){const t={WAIT:"WAIT",NO_REPO:"NO_REPO",READY:"READY",IN_PROGRESS:"IN_PROGRESS",ERROR:"ERROR"},n={contextID:{type:"all",value:"All graphs",uri:""}};function r(e){if(e<1e3)return e;const t=Math.floor(Math.log(e)/Math.log(1e3));let n=e/Math.pow(1e3,t);return n=n%1>1/Math.pow(1e3,t-1)?n.toFixed(2):n.toFixed(0),n+["K","M","G","T","P","H"][t-1]}function i(e,r,i,o,a,s,u,c,l,f,d){let h=null;e.status=i.getActiveRepository()?t.WAIT:t.NO_REPO;let p=n;const g=function(){f.resolveGraphs().success((function(t){e.graphsInRepo=t.results.bindings,m(),e.isSystemRepository()?"READY"!==e.status&&v():(e.status="WAIT",v(!0))})).error((function(t){e.repositoryError=getError(t),o.error(getError(t),d.instant("graphexplore.error.getting.graph"))}))},m=function(){const t=l.get(`dependencies-selectedGraph-${i.getActiveRepository()}`);null!==t&&e.graphsInRepo.some(e=>e.contextID.uri===t.contextID.uri)?p=t:l.set(`dependencies-selectedGraph-${i.getActiveRepository()}`,p)},y=function(n){d3.select("#dependencies-chord").html(""),e.status=t.WAIT,s.getRelationshipsData(n,e.direction,p.contextID.uri).success((function(n){e.dependenciesData={matrix:n.right,nodes:n.left,hasLinks:_.sum(_.map(n.right,(function(e){return _.sum(e)})))>0,direction:e.direction},e.status=t.READY})).error((function(n){e.status=t.READY,o.error(getError(n),d.instant("graphexplore.error.dependencies.count"))}))},v=function(n){(e.status!==t.READY||n)&&(e.status=t.WAIT,s.getRelationshipsStatus(p.contextID.uri).success((function(n){if(e.status=n,e.status===t.IN_PROGRESS){if(null!==h)return;h=a(v,2e3)}e.status===t.READY&&(null!==h&&(a.cancel(h),h=null),s.getRelationshipsClasses(e.direction,p.contextID.uri).success((function(t,n){e.allClasses.items=_.filter(t,S),e.allNotFilteredClasses=t,e.selectedClasses=void 0,angular.isUndefined(e.selectedClasses)&&(e.selectedClasses=t.slice(0,10)),y(e.selectedClasses),207===n&&o.warning(d.instant("graphexplore.update.diagram"),d.instant("graphexplore.repository.data.changed"))}))),0===e.status.indexOf("ERROR;")&&(e.status=t.ERROR,o.error(d.instant("graphexplore.error.dependencies.calc",{error:e.status.substring("ERROR;".length)})))})).error((function(n){e.status=t.ERROR,o.error(getError(n),d.instant("graphexplore.error.dependencies.count.status"))})))};e.allClasses={},e.allClasses.items=[],e.allNotFilteredClasses=[],e.direction="all";const x={};let w=0,b=0;function S(t){return-1!==t.name.toLowerCase().indexOf(e.classQuery.query.toLowerCase())}r.key="",x.get=function(t,n,r){return u.initLazyList(t,n,r,w,e.allClasses.items)},r.$watch((function(){return r.key}),(function(){w=0,_.each(e.allClasses.items,(function(e){r.key>e&&w++})),b++})),x.revision=function(){return b},e.datasource=x,e.adapterContainer={adapter:{remain:!0}},e.classQuery={},e.classQuery.query="",e.classFilterFunc=S,e.$watch("allClasses.items",(function(){e.allClasses.items.length>0&&a((function(){e.adapterContainer.adapter.reload()}),30)})),e.$watch("direction",(function(){!i.getActiveRepository()||e.isSystemRepository()||i.isActiveRepoFedXType()||g()})),e.$on("$destroy",(function(){a.cancel(h)})),e.isLoading=function(){return e.status===t.IN_PROGRESS||e.status===t.WAIT},e.confirmCalculateDependencies=function(){c.openSimpleModal({title:d.instant("confirm.operation"),message:d.instant("graphexplore.calculating.relationships"),warning:!0}).result.then((function(){e.calculateDependencies()}))},e.calculateDependencies=function(){e.status=t.WAIT,e.selectedClasses=void 0,s.calculateRelationships(p.contextID.uri).success((function(t){0===t.indexOf("ERROR;")?o.error(d.instant("graphexplore.error.dependencies.calc",{error:e.status.substring("ERROR;".length)})):v()})).error((function(e){o.error(d.instant("graphexplore.error.could.not.force.count",{error:getError(e)}))}))},e.addClass=function(t){e.selectedClasses.push(t),y(e.selectedClasses)},e.removeClass=function(t){_.remove(e.selectedClasses,(function(e){return e.name===t.name})),y(e.selectedClasses)},e.showClass=function(t){e.classToShow=t},e.isClassByNameShown=function(t){return void 0!==_.find(e.selectedClasses,{name:t})},e.addClassByName=function(t){e.selectedClasses.push(_.find(e.allClasses.items,{name:t})),y(e.selectedClasses)},e.removeClassByName=function(t){_.remove(e.selectedClasses,(function(e){return e.name===t})),y(e.selectedClasses)},e.removeAllClasses=function(){e.selectedClasses=[],y(e.selectedClasses)},e.isSystemRepository=function(){return"SYSTEM"===i.getActiveRepository()};const C=e.$on("repositoryIsSet",(function(){e.classQuery={},e.classQuery.query="",e.repositoryError=null,p=n,i.getActiveRepository()&&!i.isActiveRepoFedXType()?g():e.status=t.NO_REPO}));window.addEventListener("beforeunload",(function e(){C(),window.removeEventListener("beforeunload",e)})),e.selectGraph=function(e){p=e,v(!0),l.set(`dependencies-selectedGraph-${i.getActiveRepository()}`,p)},e.getSelectedGraphValue=function(){return p.contextID.value},e.isAllGraphsSelected=function(){return"All graphs"===e.getSelectedGraphValue()}}Object.defineProperty(e,"allGraphs",{get:()=>n}),angular.module("graphdb.framework.graphexplore.controllers.dependencies",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.utils.localstorageadapter"]).controller("DependenciesChordCtrl",i).config(["$tooltipProvider",function(e){e.options({appendToBody:!0})}]).filter("humanize",(function(){return r})),i.$inject=["$scope","$rootScope","$repositories","toastr","$timeout","GraphDataRestService","UiScrollService","ModalService","LocalStorageAdapter","RDF4JRepositoriesRestService","$translate"]}).call(this,n(5))},62:function(e,t,n){"use strict";n.r(t);n(3);var r=n(215),i=n(217),o=n.n(i),a=(n(4),n(39));function s(e,t,n,i,s,u,c,l,f,d,h,p,g,m,y,v,x,w,b,S,C,M){e.languageChanged=!1,e.propertiesObj={},e.propertiesQueryObj={},e.propertiesObj.items=[],e.propertiesNotFiltered=[],e.searchVisible=!1,e.nodeSelected=!1,e.queryResultsMode=!1,e.embedded=h.search().embedded,e.openedNodeInfoPanel=void 0,e.invalidLimit=!1,e.INVALID_LINKS_MSG=M.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=M.instant("sidepanel.invalid.limit.links.tooltip"),t.$on("$translateChangeSuccess",(function(){e.INVALID_LINKS_MSG=M.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=M.instant("sidepanel.invalid.limit.links.tooltip"),e.propertiesSearchPlaceholder=M.instant("visual.search.instance.placeholder")})),e.onopen=e.onclose=()=>angular.noop(),e.embedded&&(h.search().query||h.search().uri||h.search().config||h.search().saved)&&(e.noGoHome=!0);const E={};let k=0,T=0,R={},A=0;const I=16,N=d3.behavior.zoom().scaleExtent([.5,10]);let L;const D=1e3,P=1e3;let O,q;function z(e){m.openCopyToClipboardModal(e)}function j(t){const n=t.appSettings;e.defaultSettings.includeInferred=n.DEFAULT_INFERENCE,e.defaultSettings.sameAsState=n.DEFAULT_INFERENCE&&n.DEFAULT_SAMEAS,e.defaultSettings.includeSchema=n.DEFAULT_VIS_GRAPH_SCHEMA;const r=x.get(w.GRAPHS_VIZ);if(r&&"object"==typeof r)try{e.saveSettings=r,void 0===e.saveSettings.includeSchema&&(e.saveSettings.includeSchema=e.defaultSettings.includeSchema,e.saveSettings.rejectedPredicates=[...e.saveSettings.rejectedPredicates,...e.defaultSettings.rejectedPredicates].unique())}catch(t){e.saveSettings=angular.copy(e.defaultSettings),x.set(w.GRAPHS_VIZ,e.saveSettings)}else e.saveSettings=angular.copy(e.defaultSettings)}t.key="",E.get=function(t,n,r){return g.initLazyList(t,n,r,k,e.propertiesObj.items)},t.$watch((function(){return t.key}),(function(){k=0,_.each(e.propertiesObj.items,(function(e){t.key>e&&k++})),T++})),E.revision=function(){return T},e.datasource=E,e.adapterContainer={adapter:{remain:!0}},e.propertiesQueryObj.query="",e.propertiesSearchPlaceholder=M.instant("visual.search.instance.placeholder"),e.propertiesFilterFunc=function(t){return t.key.toLowerCase().indexOf(e.propertiesQueryObj.query.toLowerCase())>=0},e.resetState=function(){e.searchVisible=!1,e.nodeSelected=!1,e.configLoaded=null,e.queryResultsMode=!1,e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=!1,e.numberOfPinnedNodes=0,R={},A=0},e.pushHistory=function(t,n){e.embedded&&(t.embedded=!0),h.search(t),h.state(n)},e.goToHome=function(){e.resetState(),h.url("graphs-visualizations")},e.shouldShowSettings=function(){return e.configLoaded&&e.configLoaded.id===e.defaultGraphConfig.id},e.shouldDisableSameAs=function(){const t=$("#sameAsCheck");return e.settings&&!e.settings.includeInferred&&t.prop("checked")&&(t.prop("checked",!1),e.settings.sameAsState=!1),e.settings&&!e.settings.includeInferred},e.$watch("propertiesObj.items",(function(){angular.isDefined(e.propertiesObj.items)&&e.propertiesObj.items.length>0&&u((function(){e.adapterContainer.adapter.reload()}),500)})),e.toggleMoreInfo=function(e){angular.element(e.currentTarget).parent().next().toggle(200),angular.element(e.currentTarget).children("span").toggleClass("icon-caret-down").toggleClass("icon-caret-up")},e.copyToClipboard=z,e.defaultSettings={linksLimit:20,includeInferred:!0,sameAsState:!0,languages:["en"],showLinksText:!0,preferredTypes:[],rejectedTypes:[],preferredPredicates:[],rejectedPredicates:["http://dbpedia.org/property/logo","http://dbpedia.org/property/hasPhotoCollection","http://dbpedia.org/property/website","http://dbpedia.org/property/homepage","http://dbpedia.org/ontology/thumbnail","http://xmlns.com/foaf/0.1/depiction","http://xmlns.com/foaf/0.1/homepage","http://xmlns.com/foaf/0.1/mbox","http://dbpedia.org/ontology/wikiPage*","http://dbpedia.org/property/wikiPage*","http://factforge.net/*"],preferredTypesOnly:!1,preferredPredicatesOnly:!1,includeSchema:!0},e.saveSettings=angular.copy(e.defaultSettings);const U=p.getPrincipal();function H(){e.settings.languagesMap=_.map(e.settings.languages,(function(e){return{text:e}})),e.settings.preferredTypesMap=_.map(e.settings.preferredTypes,(function(e){return{text:e}})),e.settings.rejectedTypesMap=_.map(e.settings.rejectedTypes,(function(e){return{text:e}})),e.settings.preferredPredicatesMap=_.map(e.settings.preferredPredicates,(function(e){return{text:e}})),e.settings.rejectedPredicatesMap=_.map(e.settings.rejectedPredicates,(function(e){return{text:e}}))}U?j(U):e.$on("securityInit",(function(){j(p.getPrincipal())})),e.resetSettings=function(){e.settings=angular.copy(e.defaultSettings),e.validateLinksLimit(),H()},e.changeLimit=function(t){let n=e.settings.linksLimit+t;n<1&&(n=1),n>1e3&&(n=1e3),e.settings.linksLimit=n},e.validateLinksLimit=function(){e.invalidLimit=!a.NUMBER_PATTERN.test(e.settings.linksLimit)},e.showSettings=function(){e.showInfoPanel=!0,e.showFilter=!0,e.showNodeInfo=!1,e.showPredicates=!1,e.saveSettings?e.settings=angular.copy(e.saveSettings):e.settings=angular.copy(e.defaultSettings),H()},e.reExpandNode=function(){e.rootNodeIri&&e.$broadcast("onRootNodeChange",e.rootNodeIri)};const F=function(t,n,r){const i=void 0===n?e.saveSettings.sameAsState:!0===n,o=void 0===r?e.saveSettings.includeInferred:!0===r;e.loading=!0,c({url:"rest/explore-graph/graph",method:"POST",headers:{"Content-Type":"application/json"},data:{query:t,linksLimit:e.saveSettings.linksLimit,languages:e.shouldShowSettings()?e.saveSettings.languages:[],includeInferred:o,sameAsState:i}}).then((function(e){me(e)}),(function(t){e.loading=!1,s.error(getError(t.data),M.instant("graphexplore.error.cannot.load.graph"))}))};function G(e){return e.replace(/[()']/g,"")}function Q(e,t){let n=e.split(" ");return t?[n[0],n[1],n[2]].join(">"):[n[0],n[2]].join(">")}function V(e){return[e.source.iri,e.target.iri].join(">")}function B(e){if(e.isTriple){let t=document.getElementById(G(Q(e.iri)));if(t&&void 0!==t.__data__.x)return t.__data__.x}return e.x}function W(e){if(e.isTriple){let t=document.getElementById(G(Q(e.iri)));if(t&&void 0!==t.__data__.y)return t.__data__.y}return e.y}function Y(e){let t=e.trim().split(" ");return`<<<${t[0]}> <${t[1]}> <${t[2]}>>>`}function X(e){return G(`${e.source.isTriple?Q(e.source.iri,!0):e.source.iri}>${e.target.isTriple?Q(e.target.iri,!0):e.target.iri}>marker`)}function Z(){this.nodes=[],this.links=[],this.tripleNodes=new Map,this.tripleLinksCopy=new Map,this.addNode=function(e,t,n){return e.x=t,e.y=n,this.nodes.push(e),e},this.computeConnectedness=function(){const e={},t={};_.each(this.links,(function(n){const r=n.source.iri,i=n.target.iri,o=_.min([r,i])+"|"+_.max([r,i]);t[o]||(t[o]=1,e[r]=(e[r]||0)+1,e[i]=(e[i]||0)+1)})),_.each(this.links,(function(t){e[t.source.iri]>1&&e[t.target.iri]>1?t.connectedness=Math.min(5,Math.max(e[t.source.iri],e[t.target.iri])-1):t.connectedness=0}))},this.addAndMatchLinks=function(e){const t=this.nodes;Array.prototype.push.apply(this.links,function(e,t){return _.map(e,(function(e){let n,r;n=e.isTripleSource?Me(e.source):_.find(t,(function(t){return t.iri===e.source})),r=e.isTripleTarget?Me(e.target):_.find(t,(function(t){return t.iri===e.target}));let i={source:n,target:r,predicates:e.predicates};if(e.isTripleSource||e.isTripleTarget){let e=`${i.source.isTriple?Q(i.source.iri):i.source.iri}>${i.target.isTriple?Q(i.target.iri):i.target.iri}`;if(K.tripleLinksCopy.has(e)){let t=K.tripleLinksCopy.get(e);return t[0].predicates.push(...i.predicates),t.push(i),K.tripleLinksCopy.set(e,t),null}K.tripleLinksCopy.set(e,[i])}return i}))}(e,t));for(let e of K.tripleLinksCopy.keys())1===K.tripleLinksCopy.get(e).length&&K.tripleLinksCopy.delete(e);this.links=this.links.filter(e=>null!==e),this.computeConnectedness()};const t=function(e,t){return n(e,t).length};function n(e,t){return _.filter(t,(function(t){return t.source.iri===e.iri||t.target.iri===e.iri}))}this.countLinks=t,this.linksTypes=function(e,t){const r=n(e,t),i=_.map(r,(function(t){return t.source.iri===e.iri?t.target.types:t.source.types}));return _.uniq(_.flatten(i))},this.linksPredicates=function(e,t){const r=n(e,t),i=_.map(r,(function(e){return e.predicates}));return _.uniq(_.flatten(i))},this.removeTriples=function(e){let t=[];this.tripleNodes.size>0&&e.forEach(e=>{this.tripleNodes.has(e)&&(this.tripleNodes.delete(e),this.links=_.reject(this.links,(function(n){let r=e.split(">"),i=Q(n.source.iri),o=Q(n.target.iri);if(i===e&&K.tripleNodes.delete(o)){let e=o.split(">");t.push({source:e[0],target:e[1]})}let a=i===e||o===e||n.source.iri===r[0]&&n.target.iri===r[1];return a&&(K.tripleLinksCopy.delete(`${i}>${o}`),K.tripleLinksCopy.delete(`${o}>${i}`)),a})))}),t.forEach(e=>{this.links=_.reject(this.links,(function(t){return t.source.iri===e.source&&t.target.iri===e.target}))})},this.removeNode=function(n){let r=[];this.links=_.reject(this.links,(function(e){let t=e.source.iri===n.iri||e.target.iri===n.iri;return t&&(e.target.isTriple&&r.push(Q(e.target.iri)),e.source.isTriple||e.target.isTriple||r.push([e.source.iri,e.target.iri].join(">"))),t})),this.removeTriples(r);const i=this.links;this.nodes=_.reject(this.nodes,(function(e){return 0===t(e,i)})),0===this.nodes.length&&(e.nodeSelected=!1),this.computeConnectedness()},this.removeNodeLeafLinks=function(e){let r=[],i=this.links;this.links=_.reject(this.links,(function(o){let a=o.source.iri===e.iri&&1===t(o.target,i)&&!o.target.isTriple||o.target.iri===e.iri&&1===t(o.source,i)&&!o.source.isTriple;if(!a){let r;if(o.source.iri!==e.iri||2!==t(o.target,i)||o.target.isTriple?o.target.iri!==e.iri||2!==t(o.source,i)||o.source.isTriple||(r=n(o.source,i)):r=n(o.target,i),!r)return!1;a=(r[0].source.iri===e.iri||r[0].target.iri)&&(r[1].source.iri===e.iri||r[1].target.iri)}return a&&(o.target.isTriple&&r.push(Q(o.target.iri)),o.source.isTriple||o.target.isTriple||r.push([o.source.iri,o.target.iri].join(">"))),a})),this.removeTriples(r),i=this.links,this.nodes=_.reject(this.nodes,(function(n){return 0===t(n,i)&&n.iri!==e.iri})),this.computeConnectedness()},this.addTriple=function(e,t,n){e.x=t,e.y=n,e.weight=0;let r=Q(e.iri);if(this.tripleNodes.has(r)){let t=this.tripleNodes.get(r);t.push(e),this.tripleNodes.set(r,t)}else e.weight=10,this.tripleNodes.set(r,[e])},this.copyState=function(){const e=_.map(this.nodes,(function(e){return{iri:e.iri,isTriple:e.isTriple,size:e.size,labels:angular.copy(e.labels),types:angular.copy(e.types),rdfRank:e.rdfRank,x:e.x,y:e.y,fixed:e.fixed}})),t=JSON.stringify(Array.from(this.tripleNodes.entries())),n=JSON.stringify(Array.from(this.tripleLinksCopy.entries()));return{nodes:e,links:_.map(this.links,(function(e){return{source:e.source.iri,isTripleSource:e.source.isTriple,target:e.target.iri,isTripleTarget:e.target.isTriple,predicates:e.predicates}})),tripleNodes:t,tripleLinksCopy:n,colorIndex:A,type2color:R,scale:N.scale(),translate:N.translate()}},this.restoreState=function(t){e.nodeSelected=!0,e.searchVisible=!1,this.nodes=angular.copy(t.nodes),this.tripleNodes=t.tripleNodes?new Map(JSON.parse(t.tripleNodes)):new Map,this.links=[],this.addAndMatchLinks(t.links),this.tripleLinksCopy=t.tripleLinksCopy?new Map(JSON.parse(t.tripleLinksCopy)):new Map,_.each(this.nodes,(function(t){t.fixed&&e.numberOfPinnedNodes++})),angular.isDefined(t.colorIndex)&&angular.isDefined(t.type2color)&&(A=t.colorIndex,R=angular.copy(t.type2color)),angular.isDefined(t.translate)&&angular.isDefined(t.scale)&&(L="translate("+t.translate[0]+", "+t.translate[1]+") scale("+t.scale+")",N.translate(t.translate),N.scale(t.scale)),de()}}e.updateSettings=function(){e.invalidLimit?s.error(e.INVALID_LINKS_TOOLTIP,e.INVALID_LINKS_MSG):(e.saveSettings=e.settings,e.saveSettings.languages=_.map(e.saveSettings.languagesMap,(function(e){return e.text})),e.saveSettings.preferredTypes=_.map(e.saveSettings.preferredTypesMap,(function(e){return e.text})),e.saveSettings.rejectedTypes=_.map(e.saveSettings.rejectedTypesMap,(function(e){return e.text})),e.saveSettings.preferredPredicates=_.map(e.saveSettings.preferredPredicatesMap,(function(e){return e.text})),e.saveSettings.rejectedPredicates=_.map(e.saveSettings.rejectedPredicatesMap,(function(e){return e.text})),e.rootNodeIri?e.reExpandNode(e.rootNodeIri):e.queryResultsMode&&h.search().query?F(h.search().query,h.search().sameAs,h.search().inference):"query"===e.configLoaded.startMode&&e.loadGraphConfig(e.configLoaded),e.saveSettings.showLinksText?d3.selectAll("svg .link-wrapper text").style("display","block"):d3.selectAll("svg .link-wrapper text").style("display","none"),e.showInfoPanel=!1,e.showFilter=!1,x.set(w.GRAPHS_VIZ,e.saveSettings))},e.showInfoPanel=!1;let K=new Z;e.defaultGraphConfig={id:"default",name:"Easy graph",startMode:"search"},e.getGraphConfigs=function(t){S.getGraphConfigs().success((function(n){e.graphConfigs=n,t&&t()})).error((function(e){s.error(getError(e),M.instant("graphexplore.error.graph.configs.short.msg"))}))},e.loadConfigForId=function(t,n){t===e.defaultGraphConfig.id?e.loadGraphConfig(e.defaultGraphConfig):S.getConfig(t).success((function(t){e.loadGraphConfig(t),n()})).error((function(e){s.error(getError(e),M.instant("graphexplore.error.could.not.load.config",{configId:t}))}))},e.findConfigById=function(t){return t===e.defaultGraphConfig.id?e.defaultGraphConfig:$.grep(e.graphConfigs,(function(e){return e.id===t}))[0]},e.easyGraphSearch=function(t){e.configLoaded=e.defaultGraphConfig,e.openUri(t)},e.loadGraphConfig=function(t){e.configLoaded=t,"search"===t.startMode?e.searchVisible=!0:"node"===t.startMode&&t.startIRI?u((function(){e.openUri(t.startIRI,!0)}),0):"query"===t.startMode&&t.startGraphQuery&&(e.loading=!0,S.loadGraphForConfig(t,t.startQueryIncludeInferred,e.saveSettings.linksLimit,t.startQuerySameAs).then((function(e){me(e)}),(function(t){e.loading=!1,s.error(getError(t),M.instant("graphexplore.error.graph.load"))})))},e.deleteConfig=function(t){m.openSimpleModal({title:M.instant("common.confirm"),message:M.instant("graphexplore.delete.graph",{configName:t.name}),warning:!0}).result.then((function(){S.deleteGraphConfig(t).success((function(){e.getGraphConfigs(),e.refreshSavedGraphs()})).error((function(e){s.error(getError(e),M.instant("graphexplore.error.cannot.delete.config"))}))}))},e.goToGraphConfig=function(t){e.pushHistory({config:t.id},{config:t}),e.resetState(),e.loadGraphConfig(t)},v.onpopstate=function(t){e.resetState(),t.state&&(t.state.config?(e.loadGraphConfig(t.state.config),t.state.uri&&e.openUri(t.state.uri,!0)):t.state.savedGraph&&e.loadSavedGraph(t.state.savedGraph,!0))};const J=function(){h.search().query?(e.searchVisible=!1,e.queryResultsMode=!0,F(h.search().query,h.search().sameAs,h.search().inference)):e.$on("onRootNodeChange",(function(t,n){e.loading=!0,angular.isDefined(n)&&(e.rootNodeIri=n,c({url:"rest/explore-graph/node",method:"GET",params:{iri:n,config:e.configLoaded?e.configLoaded.id:e.defaultGraphConfig.id,languages:e.shouldShowSettings()?e.saveSettings.languages:[],includeInferred:e.saveSettings.includeInferred,sameAsState:e.saveSettings.sameAsState}}).then((function(t){e.nodeSelected=!0,e.searchVisible=!1,null===t.data.types&&(t.data.types="greyColor"),K=new Z;const n=K.addNode(t.data,D/2,P/2);L="translate(0, -70) scale(1)",N.translate([0,-70]),N.scale(1),ve(n,!0)})).catch((function(t){e.loading=!1,s.error(getError(t),M.instant("graphexplore.error.could.not.load.graph"))})))})),h.search().uri&&e.openUri(h.search().uri),h.search().saved&&b.getSavedGraph(h.search().saved).success((function(t){e.loadSavedGraph(t)})).error((function(e){const t=getError(e);s.error(t,M.instant("graphexplore.error.could.not.open"))}))},ee=function(){h.search().config?e.loadConfigForId(h.search().config,J):h.search().query||h.search().uri?(e.loadGraphConfig(e.defaultGraphConfig),J()):J()};function te(t){!n.getActiveRepository()||e.hasInitedRepository&&!t||(e.hasInitedRepository=!0,t||e.getGraphConfigs(ee),e.getNamespacesPromise=C.getNamespaces(e.getActiveRepository()).success((function(t){const n=_.map(t.results.bindings,(function(e){return{uri:e.namespace.value,prefix:e.prefix.value}}));e.namespaces=_.sortBy(n,(function(e){return e.uri.length})),ne()})).error((function(e){s.error(getError(e),M.instant("graphexplore.error.view.will.not.work"))})))}function ne(){i.isLicenseValid()&&(e.getAutocompletePromise=f.checkAutocompleteStatus())}e.replaceIRIWithPrefix=function(t){const n=e.namespaces,r=_.findLast(n,(function(e){return 0===t.indexOf(e.uri)}));return r?r.prefix+":"+t.substring(r.uri.length):t},e.addedTag=function(t){return t.text.indexOf(":")<0?(s.warning(M.instant("graphexplore.absolute.prefixed.iri")),null):(t.text=function(e,t){if(!/^<?(http|urn).*>?/.test(e)){const n=e.split(":"),r=n[0],i=n[1];if(!angular.isUndefined(i)){const e=l.getNamespaceUriForPrefix(t,r);if(e)return e+i}}return e}(t.text,e.namespaces),e.pageslideExpanded=!0,t)},e.validateTag=function(e,t,n){if(e.text.indexOf(":")<0)return n?s.warning(M.instant("graphexplore.absolute.prefixed.iri.option"),t):s.warning(M.instant("graphexplore.absolute.prefixed.iri"),t),!1;const r=e.text.indexOf("*");if(r>=0){if(!n)return s.warning(M.instant("graphexplore.wildcards.not.allowed"),t),!1;if(r<e.text.length-1)return s.warning(M.instant("graphexplore.wildcards.last.char"),t),!1}return!0},e.getTagClass=function(e){return e.endsWith("*")?"tag-item-wildcard":null},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLicenseValid=function(){return i.isLicenseValid()},e.hasInitedRepository=!1,e.$on("autocompleteStatus",(function(){ne()})),e.$on("repositoryIsSet",(function(t,n){n.newRepo&&(e.hasInitedRepository=!1),te(n.newRepo),n.newRepo&&(e.resetState(),$(".graph-visualization svg").empty(),h.search().query&&(e.goToHome(),J()))})),te();const re=500,ie=1.75,oe=d3.scale.linear().domain([0,9]).range(["hsl(0, 100%, 75%)","hsl(360, 90%, 82%)"]).interpolate(d3.interpolateHslLong),ae=d3.scale.linear().domain([0,9]).range(["hsl(180, 50%, 75%)","hsl(540, 40%, 82%)"]).interpolate(d3.interpolateHslLong);e.getColor=function(e){angular.isUndefined(R[e])&&(R[e]=A,A++);const t=R[e];return t>39?"#c2c2c2":t%2==0?oe(t/2):ae(t/2)};const se=d3.layout.force().gravity(.07).size([D,P]),ue=d3.select(".main-container .graph-visualization").append("svg").attr("viewBox","0 0 "+D+" "+P).attr("preserveAspectRatio","xMidYMid meet");let ce=0,le=0;const fe=new function(){this.state=!1,this.setLoadingState=function(e){this.state=e},this.getLoadingState=function(){return this.state},this.init=function(e,t){d3.select(t).append("circle").attr("cx",(function(){return e.x})).attr("cy",(function(){return e.y})).attr("class","loader-container").attr("r",(function(){return e.size})).style("fill","fff").style("opacity","0.7"),d3.select(t).append("image").attr("xlink:href","js/angular/templates/loader/ot-loader.svg?v=10.0.0-M2-1").attr("x",(function(){return e.x-e.size+5})).attr("y",(function(){return e.y-e.size})).attr("width",(function(){return 2*e.size})).attr("height",(function(){return 2*e.size})).attr("class","node-loader")}};function de(t){d3.selectAll("svg g").remove(),d3.selectAll("svg rect").remove(),d3.selectAll(".d3-tip").remove(),d3.selectAll(".menu-events").remove(),N.on("zoom",(function(){L="translate("+d3.event.translate+") scale("+d3.event.scale+")",n.attr("transform",L)})),ue.append("rect").attr("width",10*D).attr("height",10*P).attr("x",-(10*D-D)/2).attr("y",-(10*P-P)/2).style("fill","none").style("pointer-events","all").call(N).on("click",(function(){d3.event.stopPropagation(),xe(),se.stop()}));const n=ue.append("g").attr("class","nodes-container").attr("transform",(function(){return angular.isDefined(L)&&!t?L:""})),i=o()().attr("class","d3-tip").customPosition((function(){const e=O.getBoundingClientRect();return{top:e.bottom+10+"px",left:e.left-30+"px"}})).html((function(t){let n="";return t.fixed&&(n+='<i class="icon-pin"></i> '),t.types.length>0?n+=_.join(_.map(t.types,(function(t){return e.replaceIRIWithPrefix(t)}))," · "):n+="<i>No types</i>",n})),a=function(e){let t="";return t+=_.join(_.map(e.predicates,(function(t,n){if(0===n)return Ee(t);if(n<10)return" · "+Ee(t);if(10===n){const t=function(e){return e.predicates.length-10}(e),n=t>1?t+" predicates":t+" predicate";return" · "+M.instant("graphexplore.tip.text",{textToShow:n})}})),""),t};let c;const l=o()().attr("class","d3-tip").customPosition((function(e){const t=c.getBoundingClientRect(),n=function(e){const t=a(e),n=document.createElement("canvas").getContext("2d");return n.font="13px Arial",e.predicates.length<10?n.measureText(t).width:n.measureText(t).width/2}(e);return{top:t.top-30+"px",left:t.left-30+"px",width:n+"px"}})).html((function(e){return a(e)}));const f=function(){u.cancel(void 0),u.cancel(ce),O=null,i.hide(),le=u((function(){xe()}),500)};ue.call(i);ue.call(l);let d=ue.selectAll(".link"),h=ue.selectAll(".node");se.nodes(K.nodes).charge(-3e3),se.links(K.links).linkDistance((function(e){return e.source.isTriple||e.target.isTriple?0:function(e){const t=$("<span></span>"),n=e.predicates[0].split("/"),r=n[n.length-1];t.addClass("predicate-text").text(r),$("body").append(t);const i=t.width()+2*e.source.size+2*e.target.size+50;return t.remove(),.75*i}(e)+30*e.connectedness})),n.append("defs").selectAll("marker").data(se.links()).enter().append("marker").attr("class","arrow-marker").attr("id",(function(e){return X(e)})).attr("viewBox","0 -5 10 10").attr("refX",(function(e){return e.target.isTriple?11:e.target.size+11})).attr("refY",0).attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M0,-5L10,0L0,5 L10,0 L0, -5"),d=n.selectAll(".link").data(K.links).enter().append("g").attr("class","link-wrapper").attr("id",(function(e){return G(V(e))})).append("line").attr("class","link").style("stroke-width",1).style("fill","transparent").style("marker-end",(function(e){return`url(#${X(e)})`}));const p=n.selectAll(".link-wrapper").append("text").text((function(e){return _e(e)})).attr("class",(function(e){return e.predicates.length>1||K.tripleNodes.has(V(e))?"predicates":"predicate"})).attr("dy","-0.5em").style("text-anchor","middle").style("display",e.saveSettings.showLinksText?"":"none").on("mouseover",(function(e){d3.event.stopPropagation(),function(e){u.cancel(void 0);const t=c=d3.event.target;u((function(){c===t&&e.predicates.length>1&&l.show(e,c)}),300)}(e)})).on("mouseout",(function(){u.cancel(void 0),c=null,l.hide()})).on("click",(function(t){d3.event.stopPropagation(),function(t){Ce();let n=V(t);if(1===t.predicates.length&&K.tripleNodes.has(n)){q=null;let e=K.tripleNodes.get(n)[0];if(pe(e,this,d3.event.button)){let t={};t.iri=e.iri,t.pred=Ee(e.iri.split(" ")[1]),be(t)}return}!function(t){if(e.showNodeInfo=!1,e.showPredicates=t.predicates.length>1,e.showFilter=!1,e.showInfoPanel=!1,q===t)return e.showNodeInfo=!1,e.showInfoPanel=!1,void(q=null);q=t,e.showPredicates&&(e.predicates=_.map(t.predicates,(function(e){let n=function(e,t){let n=V(t);return K.tripleNodes.has(n)?K.tripleNodes.get(n).findIndex(t=>t.iri.indexOf(e)>=0):-1}(e,t),r=n>-1;return{value:Ee(e),partOfTriple:r,linkId:r?V(t):"",nodeIndex:n}})),e.showInfoPanel=!0)}(t)}(t)}));let g,m=0,y=0,v=0;const x=function(){d3.event.button&&0!==d3.event.button||(f(),u.cancel(g),e.showPredicates=!1,d3.event.timeStamp-m<re?y++:y=1,m=d3.event.timeStamp,d3.event.preventDefault())},w=function(t){if(d3.event.button&&0!==d3.event.button)return;u.cancel(g);const n=d3.event,r=this;if(d3.event.timeStamp-m<re)if(1===y)g=u((function(){pe(t,r,n)}),40+re-(d3.event.timeStamp-m));else if(2===y){K.countLinks(t,K.links)<=e.saveSettings.linksLimit?ve(t,!1,r.parentNode):s.info(M.instant("graphexplore.increase.limit"),M.instant("graphexplore.node.at.max")),e.closeInfoPanel()}d3.event.preventDefault()};function b(e,t){let r,i,o,a,s=!0;if("down"===t)r=2*e.size,i=e.size/3,o=.8,a=.3;else if("down-fixed"===t)r=2*e.size,i=e.size,o=.8,a=.66;else if("up"===t)r=e.size/3,i=2*e.size,o=.3,a=.8;else{if("fixed"!==t)return;r=e.size,o=.66,s=!1}let u=n.selectAll(".node-wrapper").filter((function(t){return t===e})).append("text").text("").classed("icon-any pinned",!0).style("font-size",r+"px").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})).attr("opacity",o);"fixed"!==t&&"down-fixed"!==t||(e.pin=u),s&&(u=u.transition().duration(1e3).style("font-size",(function(){return i+"px"})).attr("opacity",a),"down-fixed"!==t&&u.remove())}const S=d3.behavior.drag().origin((function(e){return e})).on("dragstart",(function(e){0===d3.event.sourceEvent.button&&(e.fixedBeforeDrag=e.fixed,e.isBeingDragged=!0,e.beginDragging=!0,xe(),d3.event.sourceEvent.stopPropagation(),d3.select(this).classed("dragging",!0))})).on("drag",(function(t){t.isBeingDragged&&(y=0,t.px=d3.event.x,t.py=d3.event.y,t.fixed?t.beginDragging&&b(t,"fixed"):(e.numberOfPinnedNodes++,t.fixed=!0,b(t,"down-fixed")),t.pinWasFixed=!0,t.beginDragging=null,se.resume())})).on("dragend",(function(e){e.isBeingDragged&&(e.pinWasFixed&&(e.pinWasFixed=null,d3.select(".pinned").remove()),e.isBeingDragged=!1,d3.select(this).classed("dragging",!1))}));h=n.selectAll(".node").data(K.nodes).enter().append("g").attr("class","node-wrapper").attr("id",(function(e){return e.iri})).append("circle").attr("class","node").attr("r",(function(e){return e.size})).style("fill",(function(t){return"greyColor"===t.types?"c2c2c2":e.getColor(t.types[0])})).call(S).on("mouseover",(function(t){if(!t.isBeingDragged){const n=d3.event;u.cancel(le),ce=u(()=>{(function(t,n){if(e.showInfoPanel)return!1;(he.closeIcon||he.expandIcon||he.focusIcon||he.copyURIIcon)&&he.removeIcons();if(se.alpha()<.05)return he.initIcons(t,n.parentNode),se.stop(),!0;return!1})(t,this)&&function(e,t){u.cancel(void 0);const n=O=t.target;u((function(){O===n&&i.show(e,O)}),300)}(t,n)},400)}})).on("mouseout",f).on("mousedown",x).on("touchstart",(function(e){x(),v=0,g=u((function(){v<5&&ge(e),g=null,y=0}),1e3)})).on("touchmove",(function(){v++})).on("mouseup",w).on("touchend",w).on("contextmenu",(function(t){d3.event.shiftKey||(d3.event.preventDefault(),xe(),e.closeInfoPanel(),t.fixed?(e.numberOfPinnedNodes--,t.fixed=!1,b(t,"up"),se.resume()):(e.numberOfPinnedNodes++,t.fixed=!0,b(t,"down")),function(e){O&&i.show(e,O)}(t))}));const C=n.selectAll(".node-wrapper").append("foreignObject").style("pointer-events","none").attr("width",(function(e){return 2*e.size*ie}));n.insert("g").attr("class","menu-events"),function(e){e.each((function(e){e.fontSize=r.a.Text.calcFontSizeRaw(e.labels[0].label,e.size,I,!0)})).attr("height",(function(e){return 3*e.fontSize})).append("xhtml:div").attr("class","node-label-body").style("font-size",(function(e){return e.fontSize+"px"})).append("xhtml:div").text((function(e){return e.labels[0].label})),u((function(){$(".node-label-body div").each((function(e,t){let n=t.textContent.substring(0,t.textContent.length-1);let r=0;for(;r<200&&(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)n=n.substring(0,n.length-1),t.textContent=n+"…",r++}))}),50)}(C),se.on("tick",(function(){d3.geom.quadtree(K.nodes);K.nodes.length;d.attr("x1",(function(e){return B(e.source)})).attr("y1",(function(e){return W(e.source)})).attr("x2",(function(e){return B(e.target)})).attr("y2",(function(e){return W(e.target)})),p.attr("x",(function(e){let t=B(e.source),n=B(e.target);return e.x=.5*(t+n)})).attr("y",(function(e){let t=W(e.source),n=W(e.target);return e.y=.5*(t+n)})).attr("transform",(function(e){return"rotate("+function(e,t){const n={x:B(e.source),y:W(e.source)},r={x:B(e.target),y:W(e.target)};if(t)return 180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;{const e=180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;return e<=90&&e>=-90?e:(e>0?-1:1)*(180-Math.abs(e))}}(e,e.direction)+", "+e.x+", "+e.y+")"})),h.attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),n.select(".node-loader").attr("x",(function(e){return e.x-e.size+3})).attr("y",(function(e){return e.y-e.size})),n.select(".loader-container").attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),C.attr("x",(function(e){return e.x-e.size*ie})).attr("y",(function(e){return e.y-3*e.fontSize/2})),d3.select(".pinned").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y}))})),angular.isDefined(fe)&&fe.setLoadingState(!1),e.loading&&(e.loading=!1),d3.selectAll(".link-wrapper").each((function(){const e=$(this).attr("id").split(">")[0],t=$(this).attr("id").split(">")[1];d3.selectAll(".link").each((function(n){let r=G(n.source.iri),i=G(n.target.iri);if(r===t&&i===e){let e=r;e+=">",e+=i;const t=document.createTextNode(" ⟶");document.getElementById(e).lastChild.appendChild(t),n.direction="double"}}))})),d3.selectAll(".d3-actions-tip").remove(),se.start()}de();const he=new function(){function e(e,t){return"translate("+(t.x-14+(t.size+15)*Math.cos(e*Math.PI/180-Math.PI/2))+","+(t.y-14+(t.size+15)*Math.sin(e*Math.PI/180-Math.PI/2))+")"}this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.actionsTip=void 0,this.removeIcons=function(){this.closeIcon.remove("g"),this.expandIcon&&this.expandIcon.remove("g"),this.collapseIcon&&this.collapseIcon.remove("g"),this.focusIcon.remove("g"),this.copyURIIcon.remove("g"),this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.expandedState=!1},this.expandedState=!1,this.initIcons=function(n,r){const i=o()().attr("class","d3-tip d3-actions-tip").customPosition((function(){const e=d3.event.target.getBoundingClientRect();return{top:e.top-20+"px",left:e.right+10+"px"}})).html((function(e){return e}));ue.call(i);n.isExpanded?(this.collapseIcon=d3.select(".menu-events").append("g").attr("class","collapse-icon").attr("name","collapse").attr("transform",(function(){return e(20,n)})),this.collapseIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.collapseIcon.append("path").attr("d","M22.67,12a.59.59,0,0,1-.53.65l-6.88.72H15.2a.59.59,0,0,1-.59-.65l.72-6.88A.58.58,0,0,1,16,5.33a.59.59,0,0,1,.53.65L16,11.11,21.3,5.79a.64.64,0,0,1,.91.91L16.89,12,22,11.49A.59.59,0,0,1,22.67,12ZM12.59,14.75l-6.75.85a.59.59,0,0,0-.51.66.58.58,0,0,0,.66.51l4.95-.62-5.2,5.2a.64.64,0,1,0,.91.91l5.2-5.2L11.23,22a.59.59,0,0,0,.51.66h.07a.59.59,0,0,0,.59-.52l.85-6.75a.59.59,0,0,0-.17-.49A.58.58,0,0,0,12.59,14.75Z").style("fill","#ed4f2f"),this.collapseIcon.on("click",(function(){var e;(e=n).isExpanded=!1,K.removeNodeLeafLinks(e),de()})).on("mouseover",(function(){i.show(this.getAttribute("name")),u.cancel(ce),u.cancel(le)})).on("mouseout",(function(){i.hide(),le=u((function(){xe()}),500)}))):(this.expandIcon=d3.select(".menu-events").append("g").attr("class","expand-icon").attr("name","expand").attr("transform",(function(){return e(20,n)})),this.expandIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.expandIcon.append("path").attr("d","M22.37,6.28l-.72,6.88a.59.59,0,0,1-.59.53H21a.59.59,0,0,1-.53-.65L21,7.9l-5.32,5.32a.64.64,0,0,1-.91-.91L20.1,7,15,7.53a.59.59,0,0,1-.12-1.18l6.88-.72a.59.59,0,0,1,.65.65ZM12.89,20.34,7.95,21l5.2-5.2a.64.64,0,0,0-.91-.91L7,20.05l.62-4.95A.59.59,0,0,0,6.48,15l-.85,6.75a.59.59,0,0,0,.59.67h.07L13,21.52a.59.59,0,1,0-.15-1.18Z").style("fill","#ed4f2f"),this.expandIcon.on("click",(function(){ve(n,!1,r)})).on("mouseover",(function(){i.show(this.getAttribute("name")),u.cancel(le),u.cancel(ce)})).on("mouseout",(function(){i.hide(),le=u((function(){xe()}),500)}))),this.focusIcon=d3.select(".menu-events").append("g").attr("class","focus-icon").attr("name","focus").attr("transform",(function(){return e(20,n)})),this.focusIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.focusIcon.append("path").attr("d","M14.2,23.81a9.8,9.8,0,1,1,6.93-2.87h0A9.74,9.74,0,0,1,14.2,23.81Zm0-18.17a8.37,8.37,0,1,0,5.92,14.29h0A8.37,8.37,0,0,0,14.2,5.64Zm1.42,6.95a2,2,0,1,0,0,2.85A2,2,0,0,0,15.62,12.59Z").style("fill","#ed4f2f"),this.focusIcon.on("click",(function(){t.$broadcast("onRootNodeChange",n.iri)})).on("mouseover",(function(){i.show(this.getAttribute("name")),u.cancel(le),u.cancel(ce)})).on("mouseout",(function(){i.hide(),le=u((function(){xe()}),500)})),this.copyURIIcon=d3.select(".menu-events").append("g").attr("class","icon-link").attr("name","link").attr("transform",(function(){return e(20,n)})),this.copyURIIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.copyURIIcon.append("path").attr("d","M 13.457031 10.164062 C 13.648438 10.164062 13.820312 10.242188 13.941406 10.363281 L 15.492188 11.859375 C 15.984375 12.332031 16.292969 12.992188 16.292969 13.714844 C 16.292969 14.441406 15.984375 15.097656 15.492188 15.574219 L 10.394531 20.496094 C 9.902344 20.972656 9.222656 21.265625 8.472656 21.265625 C 7.71875 21.265625 7.039062 20.972656 6.546875 20.496094 L 4.996094 19 C 4.507812 18.523438 4.203125 17.867188 4.203125 17.144531 C 4.203125 16.421875 4.507812 15.765625 4.996094 15.289062 L 7.542969 12.824219 C 7.667969 12.707031 7.84375 12.628906 8.035156 12.628906 C 8.417969 12.628906 8.726562 12.929688 8.726562 13.300781 C 8.726562 13.484375 8.648438 13.652344 8.523438 13.773438 L 5.976562 16.234375 C 5.738281 16.46875 5.589844 16.792969 5.589844 17.148438 C 5.589844 17.503906 5.738281 17.824219 5.976562 18.058594 L 7.527344 19.566406 C 7.773438 19.792969 8.105469 19.929688 8.472656 19.929688 C 8.835938 19.929688 9.167969 19.792969 9.414062 19.566406 L 14.511719 14.644531 C 14.753906 14.410156 14.90625 14.089844 14.90625 13.730469 C 14.90625 13.375 14.753906 13.054688 14.511719 12.820312 L 12.964844 11.324219 C 12.839844 11.203125 12.761719 11.039062 12.761719 10.855469 C 12.761719 10.488281 13.070312 10.1875 13.449219 10.1875 Z M 17.082031 3.976562 C 17.082031 3.976562 17.085938 3.976562 17.085938 3.976562 C 17.824219 3.976562 18.492188 4.261719 18.980469 4.722656 L 20.535156 6.203125 C 21.042969 6.679688 21.355469 7.34375 21.355469 8.082031 C 21.355469 8.792969 21.058594 9.441406 20.582031 9.914062 L 18.0625 12.402344 C 17.9375 12.527344 17.761719 12.605469 17.566406 12.605469 C 17.183594 12.605469 16.875 12.304688 16.875 11.9375 C 16.875 11.753906 16.949219 11.589844 17.070312 11.46875 L 19.605469 8.984375 C 19.847656 8.75 19.996094 8.429688 19.996094 8.070312 C 19.996094 7.714844 19.847656 7.394531 19.605469 7.160156 L 18.019531 5.667969 C 17.773438 5.445312 17.4375 5.304688 17.070312 5.300781 C 16.703125 5.304688 16.367188 5.453125 16.128906 5.691406 L 11.085938 10.667969 C 10.84375 10.898438 10.695312 11.222656 10.695312 11.578125 C 10.695312 11.933594 10.84375 12.257812 11.085938 12.488281 L 12.675781 13.980469 C 12.804688 14.101562 12.882812 14.273438 12.882812 14.457031 C 12.882812 14.828125 12.574219 15.128906 12.191406 15.128906 C 12.003906 15.128906 11.832031 15.054688 11.707031 14.9375 L 10.140625 13.457031 C 9.636719 12.980469 9.324219 12.316406 9.324219 11.582031 C 9.324219 10.863281 9.621094 10.214844 10.101562 9.742188 L 15.140625 4.765625 C 15.625 4.285156 16.304688 3.980469 17.054688 3.976562 Z M 17.082031 3.976562").style("fill","#ed4f2f"),this.copyURIIcon.on("click",(function(){z(n.iri),xe(),i.hide()})).on("mouseover",(function(){i.show("<div style='text-align: center;'><b>Copy to ClipBoard</b><br>"+n.iri+"</div>"),u.cancel(le),u.cancel(ce)})).on("mouseout",(function(){i.hide(),le=u((function(){xe()}),500)})),this.closeIcon=d3.select(".menu-events").append("g").attr("class","close-icon").attr("name","remove").attr("transform",(function(){return e(20,n)})),this.closeIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.closeIcon.append("path").attr("d","M14.94,14l5.87-5.87a.66.66,0,1,0-.94-.94L14,13.06,8.13,7.19a.66.66,0,0,0-.94.94L13.06,14,7.19,19.87a.66.66,0,1,0,.94.94L14,14.94l5.87,5.87a.66.66,0,1,0,.94-.94Z").style("fill","#ed4f2f"),this.closeIcon.on("click",(function(){ge(n)})).on("mouseover",(function(){i.show(this.getAttribute("name")),u.cancel(le),u.cancel(ce)})).on("mouseout",(function(){i.hide(),le=u((function(){xe()}),500)})),this.animateMenu(n)},this.animateMenu=function(t){let n=0;let r=20;this.expandIcon&&this.expandIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return e(r,t)})).delay(n+=35),this.collapseIcon&&this.collapseIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return e(r,t)})).delay(n+=35),this.copyURIIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return r+=30,e(r,t)})).delay(n+=35),this.focusIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return r+=30,e(r,t)})).delay(n+=35),this.closeIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return r+=30,e(r,t)})).delay(n+=35),this.expandedState=!0}};function pe(n,r,i){return e.showInfoPanel=!1,e.showPredicates=!1,e.showNodeInfo=!1,i.shiftKey&&(i.ctrlKey||i.metaKey)?(t.$broadcast("onRootNodeChange",n.iri),!1):i.ctrlKey||i.metaKey?(ge(n),!1):void 0!==e.openedNodeInfoPanel&&e.openedNodeInfoPanel===n?(e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,!1):(we(n),!0)}function ge(e){K.removeNode(e),de()}function me(t){!function(t){e.nodeSelected=!0,null===t.data.types&&(t.data.types="greyColor"),K=new Z,L="translate(0, -70) scale(1)",N.translate([0,-70]),N.scale(1)}(t),ye(t)}function ye(t,n,r){let i=t.data;i=_.filter(i,(function(e){return-1===_.findIndex(K.links,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))}));let o=[];const a=K.tripleLinksCopy.values();for(let e=0;e<K.tripleLinksCopy.size;e++){a.next().value.forEach(e=>{o.push(e)})}i=_.filter(i,(function(e){return-1===_.findIndex(o,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))})),i=_.filter(i,(function(e){return e.source!==e.target}));const u=function(e,t){let n=t.map((function(t){return t[e]}));return t.filter((function(t,r){return n.indexOf(t[e])===r}))}("iri",_.union(_.flatten(_.map(t.data,(function(e){return[{iri:e.source,isTriple:e.isTripleSource},{iri:e.target,isTriple:e.isTripleTarget}]}))))),l=_.map(K.nodes,(function(e){return{iri:e.iri,isTriple:Boolean(e.isTriple)}})),f=K.tripleNodes.values();for(let e=0;e<K.tripleNodes.size;e++){f.next().value.forEach(e=>{l.push({iri:e.iri,isTriple:e.isTriple})})}const h=_.reject(u,(function(e){return _.some(l,e)}));if(0===h.length)r?s.info(M.instant("graphexplore.error.node.connections")):0===i.length&&s.info(M.instant("graphexplore.error.node.connections")),K.addAndMatchLinks(i),de();else{const t=[],r=[];_.forEach(h,(function(n,i){t.push(c({url:"rest/explore-graph/node",method:"GET",params:{iri:n.isTriple?Y(n.iri):n.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?e.saveSettings.languages:[],includeInferred:e.saveSettings.includeInferred,sameAsState:e.saveSettings.sameAsState}}).then((function(e){r[i]=e.data})))})),d.all(t).then((function(){_.forEach(r,(function(e,t){const i=2*Math.PI*t/r.length,o=(n?n.x:0)+Math.cos(i)*P/3,a=(n?n.y:0)+Math.sin(i)*P/3;e.isTriple?K.addTriple(e,o,a):K.addNode(e,o,a)})),K.addAndMatchLinks(i),n&&(n.isExpanded=!0),de()}))}}function ve(t,n,r){if(fe.getLoadingState())return;fe.init(t,r);const i=t.iri;c({url:"rest/explore-graph/links",method:"GET",params:{iri:i,linksLimit:e.saveSettings.linksLimit,includeInferred:e.saveSettings.includeInferred,config:e.configLoaded.id,preferredTypes:e.shouldShowSettings()?e.saveSettings.preferredTypes:[],rejectedTypes:e.shouldShowSettings()?e.saveSettings.rejectedTypes:[],preferredPredicates:e.shouldShowSettings()?e.saveSettings.preferredPredicates:[],rejectedPredicates:e.shouldShowSettings()?e.saveSettings.rejectedPredicates:[],preferredTypesOnly:e.shouldShowSettings()?e.saveSettings.preferredTypesOnly:[],preferredPredicatesOnly:e.shouldShowSettings()?e.saveSettings.preferredPredicatesOnly:[],languages:e.shouldShowSettings()?e.saveSettings.languages:[],sameAsState:e.saveSettings.sameAsState,includeSchema:e.saveSettings.includeSchema}}).then((function(e){ye(e,t,n)}),(function(t){const n=getError(t.data);s.error(n,M.instant("graphexplore.error.exploring.node")),e.loading=!1,fe.setLoadingState(!1)}))}function xe(){angular.isDefined(he)&&he.expandedState&&he.removeIcons()}function we(t){se.stop(),e.openedNodeInfoPanel=t,e.showNodeInfo=!0,e.showFilter=!1,e.showPredicates=!1,e.nodeLabels=t.labels,e.nodeTypes=t.types,e.rdfRank=t.rdfRank,e.nodeIri=t.iri,e.resourceType=t.isTriple?"triple":"uri",e.encodedIri=t.isTriple?encodeURI(Y(t.iri)):encodeURI(t.iri),e.showInfoPanel=!0,e.rdfsLabel=t.labels[0].label,e.rdfsComment=t.comment,e.expanded=!1,e.propertiesQueryObj.query="",e.dataNodeKeysQuery="",c.get("rest/explore-graph/properties",{params:{iri:t.isTriple?Y(t.iri):t.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?e.saveSettings.languages:[],includeInferred:e.saveSettings.includeInferred,sameAsState:e.saveSettings.sameAsState,rejectedPredicates:e.shouldShowSettings()?e.saveSettings.rejectedPredicates:[]}}).then((function(t){e.data=_.mapKeys(t.data,(function(t,n){return e.replaceIRIWithPrefix(n)})),e.propertiesObj.items=[],_.forEach(e.data,(function(t,n){e.propertiesObj.items.push({key:n,value:t})})),e.nodeImage=void 0,e.propertiesNotFiltered=e.propertiesObj.items;const n=_.find(e.propertiesObj.items,(function(e){return"image"===e.key}));n&&(e.nodeImage=n.value[0].v),e.propertiesObj.items=_.reject(e.propertiesObj.items,(function(e){return"image"===e.key})),e.propertiesNotFiltered=e.propertiesObj.items}),(function(e){s.warning(getError(e.data),"Error")}))}function be(e){Se("predicate","#d54a33",e),Se("predicates","#d54a33",e);let t=document.getElementsByClassName("link");t&&_.each(t,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="#d54a33",t.style.strokeWidth=4)}));let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="#d54a33",t.__data__.target.isTriple||t.setAttribute("refX","23"))}))}function Se(e,t,n){let r=document.getElementsByClassName(e);r&&_.each(r,(function(e){let r=e.__data__;n?((r.source.iri.indexOf(n.iri)>=0||r.target.iri.indexOf(n.iri)>=0)&&(e.style.fill=t),Q(n.iri)===V(r)&&(e.textContent=n.pred,e.style.fill=t),n.oppLinkIRI&&n.oppLinkIRI===V(r)&&(e.textContent=n.oppTriplePred,e.style.fill=t)):(e.style.fill=t,e.textContent=_e(r))}))}function Ce(){_.each(e.predicates,(function(e){let t=document.getElementById(e.linkId+e.nodeIndex);t&&(t.style.fontWeight="normal")}));let t=document.getElementsByClassName("link");t&&_.each(t,(function(e){e.style.stroke="#999",e.style.strokeWidth=1})),Se("predicate",""),Se("predicates","");let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(e){e.style.stroke="#999",e.__data__.target.isTriple||e.setAttribute("refX","59")}))}function Me(e){let t=Q(e);if(K.tripleNodes.has(t))return K.tripleNodes.get(t).find(t=>t.iri===e)}function _e(e){return e.predicates.length>1?e.predicates.length+" predicates":Ee(e.predicates[0])}function Ee(t){const n=e.replaceIRIWithPrefix(t);return n.length===t.length?t.split("/")[t.split("/").length-1]:n}e.toggleSidePanel=function(){e.pageslideExpanded=!e.pageslideExpanded},e.closeInfoPanel=function(){e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,e.predicates=[],q=null,u((function(){e.showInfoPanel=!1}))},e.clickLink=function(t){if(K.tripleNodes.has(t.linkId)){Ce();let n=K.tripleNodes.get(t.linkId)[t.nodeIndex];we(n),e.showPredicates=!0;let r=document.getElementById(t.linkId+t.nodeIndex);r&&(r.style.fontWeight="bold");let i={};const o=K.tripleLinksCopy.values();for(let e=0;e<K.tripleLinksCopy.size;e++){let e=o.next().value;e.length>1&&e.every(t=>t.source.iri===n.iri?(i.iri=e[0].source.iri,t.target.isTriple&&(i.oppLinkIRI=Q(t.target.iri),i.oppTriplePred=Ee(t.target.iri.split(" ")[1])),i.pred=Ee(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1):t.target.iri!==n.iri||(i.iri=e[0].target.iri,t.source.isTriple&&(i.oppLinkIRI=Q(t.source.iri),i.oppTriplePred=Ee(t.source.iri.split(" ")[1])),i.pred=Ee(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1))}i.iri||(i.iri=n.iri,i.pred=Ee(n.iri.split(" ")[1])),be(i)}},e.splitPredicate=function(e){return e.split("/")[e.split("/").length-1]},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLoadingLocation=function(){return n.isLoadingLocation()},e.hasActiveLocation=function(){return n.hasActiveLocation()},e.rotate=function(e){xe();const t=2*(e?1:-1)*Math.PI/180,n=Math.cos(t),r=Math.sin(t),i=D/2,o=P/2;d3.selectAll(".node-wrapper").each((function(e){e.x=i+(n*(e.x-i)+r*(e.y-o)),e.y=o+(-r*(e.x-i)+n*(e.y-o)),e.fixed&&(e.px=e.x,e.py=e.y)})),se.resume()},e.openUri=function(t,n){if(!n){const n={};e.configLoaded.id!==e.defaultGraphConfig.id&&(n.config=e.configLoaded.id),n.uri=t,e.pushHistory(n,{uri:t,config:e.configLoaded})}e.$broadcast("onRootNodeChange",t)},e.saveOrUpdateGraph=function(){const t=JSON.stringify(K.copyState()),n={id:e.lastSavedGraphId,name:e.lastSavedGraphName,data:t,shared:e.shared};n.id?e.saveGraphModal("update",n):e.saveGraphModal("new",n)},e.renameSavedGraph=function(t){e.saveGraphModal("rename",{id:t.id,name:t.name,config:t.config,shared:t.shared})};const ke=function(t){b.editSavedGraph(t).success((function(){e.lastSavedGraphName=t.name,e.shared=t.shared,e.refreshSavedGraphs(),s.success(M.instant("graphexplore.saved.graph.was.edited",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,M.instant("graphexplore.error.cannot.edit"))}))};e.saveGraphModal=function(t,n,r){y.open({templateUrl:"js/angular/graphexplore/templates/modal/save-graph.html",controller:"SaveGraphModalCtrl",resolve:{data:function(){return{mode:t,graph:n,graphExists:r,shared:n.shared}}}}).result.then((function(t){if(t.restart)e.saveGraphModal(t.mode,t.graph,!1);else switch(t.mode){case"new":!function(t){e.configLoaded&&(t.config=e.configLoaded.id),b.addNewSavedGraph(t).success((function(n,r,i){e.lastSavedGraphName=t.name,e.lastSavedGraphId=i()["x-saved-graph-id"],e.shared=t.shared,e.refreshSavedGraphs(),s.success(M.instant("graphexplore.saved.graph",{name:t.name}))})).error((function(n,r){if(422===r)e.saveGraphModal("new",t,!0);else{const e=getError(n);s.error(e,M.instant("graphexplore.error.cannot.create.graph"))}}))}(t.graph);break;case"update":case"rename":ke(t.graph)}}))},e.refreshSavedGraphs=function(){b.getSavedGraphs().success((function(t){e.savedGraphs=t})).error((function(e){const t=getError(e);s.error(t,M.instant("graphexplore.error.getting.saved.graphs"))}))},e.loadSavedGraph=function(t,n){t.owner?(e.lastSavedGraphName=t.name,e.lastSavedGraphId=t.id,e.shared=t.shared,e.configLoaded=e.findConfigById(t.config)):(e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=t.shared),e.configLoaded||(e.configLoaded=e.defaultGraphConfig),h.url("?saved="+t.id),K.restoreState(JSON.parse(t.data)),n||e.pushHistory({saved:t.id},{savedGraph:t})},e.copyToClipboardSavedGraph=function(e){z([location.protocol,"//",location.host,location.pathname,"?saved=",e.id].join(""))},e.deleteSavedGraph=function(t){m.openSimpleModal({title:M.instant("common.confirm"),message:M.instant("graphexplore.confirm.delete.graph",{graphName:t.name}),warning:!0}).result.then((function(){!function(t){b.deleteSavedGraph(t).success((function(){e.refreshSavedGraphs(),s.success(M.instant("graphexplore.saved.graph.was.deleted",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,M.instant("graphexplore.error.cannot.delete"))}))}(t)}))},e.openIRI=function(t,n){return n.shiftKey?e.$broadcast("onRootNodeChange",t):window.open(t,"_blank"),!1},e.togglePinAllNodes=function(){xe();const t=e.numberOfPinnedNodes<=0;e.numberOfPinnedNodes=0,d3.selectAll(".node").each((function(n){n.fixed=t,t&&e.numberOfPinnedNodes++})),se.resume()},$("body").on("keydown",(function(t){"input"!==t.target.nodeName&&e.nodeSelected&&(37===t.keyCode?e.rotate(!0):39===t.keyCode&&e.rotate(!1))})),e.getLiteralFromPropValue=function(e){return e.substring(e.indexOf(":")+1)}}function u(e,t,n,r){switch(e.mode=n.mode,e.graph=angular.copy(n.graph),e.graphExists=n.graphExists,e.mode){case"new":e.title=r.instant("graphexplore.create.new.graph"),e.okButtonText=r.instant("common.create.btn");break;case"update":e.title=r.instant("graphexplore.update"),e.okButtonText=r.instant("common.save.btn");break;case"rename":e.title=r.instant("graphexplore.rename"),e.okButtonText=r.instant("common.save.btn")}e.ok=function(){e.form.$valid&&t.close({graph:e.graph,mode:e.mode})},e.saveNew=function(){e.graph.name=e.graph.name+" (new)",t.close({graph:e.graph,mode:"new",restart:!0})},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.graphexplore.controllers.graphviz",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","ngTagsInput","graphdb.framework.utils.localstorageadapter"]).controller("GraphsVisualizationsCtrl",s).controller("SaveGraphModalCtrl",u).config(["$tooltipProvider",function(e){e.options({appendToBody:!0})}]),s.$inject=["$scope","$rootScope","$repositories","$licenseService","toastr","$timeout","$http","ClassInstanceDetailsService","AutocompleteRestService","$q","$location","$jwtAuth","UiScrollService","ModalService","$modal","$window","LocalStorageAdapter","LSKeys","SavedGraphsRestService","GraphConfigRestService","RDF4JRepositoriesRestService","$translate"],u.$inject=["$scope","$modalInstance","data","$translate"]},63:function(e,t,n){"use strict";n.r(t);n(34),n(4);function r(e,t,n,r,i,o,a,s,u,c,l,f,d,h,p,g,m){var y;e.page=1,e.totalPages=5,e.helpHidden=1===p.get(g.HIDE_GRAPH_CONFIG_HELP),e.toggleHelp=function(t){void 0===t&&(t=p.get(g.HIDE_GRAPH_CONFIG_HELP)),1!==t?(p.set(g.HIDE_GRAPH_CONFIG_HELP,1),e.helpHidden=!0):(p.set(g.HIDE_GRAPH_CONFIG_HELP,0),e.helpHidden=!1)},e.fixedVisualCallback=function(t,n){e.newConfig.startIRI=t,e.newConfig.startIRILabel=n,y=!0},e.isDefaultGraph=function(e){return"Minimal"===e.name||"Advanced"===e.name},e.isUserGraph=function(t){return!e.isDefaultGraph(t)},e.getSampleName=function(e,t){const n=e[t+"Description"];return n||(e.id?"Copy of "+e.name:e.name)};const v=function(){c.getGraphConfigSamples().success((function(t){e.samples=_.filter(t,(function(t){return!t.id||e.newConfig.id!==t.id||(e.revertConfig=t,!1)}))})).error((function(e){r.error(getError(e),m.instant("graphexplore.error.graph.configs"))}))},x=f.configName;function w(e){r.warning(e)}function b(t){let n;return"query"===t.startMode&&1===e.page?n=t.startGraphQuery:2===e.page?n=t.expandQuery:3===e.page?n=t.resourceQuery:4===e.page?n=t.predicateLabelQuery:5===e.page&&(n=t.resourcePropertiesQuery),angular.isDefined(n)?n:""}function S(){function o(){e.getAutocompletePromise=l.checkAutocompleteStatus()}v(),e.createGraphConfig=function(){c.createGraphConfig(e.newConfig).success((async function(){await d.showToastMessageWithDelay("graphexplore.saved.new.config"),n.url("graphs-visualizations")})).error((function(e){r.error(getError(e),m.instant("graphexplore.error.could.not.create"))}))},e.updateGraphConfig=function(){c.updateGraphConfig(e.newConfig).success((async function(){await d.showToastMessageWithDelay("graphexplore.saved.config"),n.url("graphs-visualizations")})).error((function(e){r.error(getError(e),m.instant("graphexplore.error.could.not.save"))}))},e.$on("autocompleteStatus",(function(){o()})),o(),e.getNamespacesPromise=h.getNamespaces(e.getActiveRepository());const a=function(e,t,n,r,i,o){t?c.validateQuery(t,n,r,i,o).success((function(){e()})).error((function(e){w(getError(e))})):e()};function s(){u()&&e.$broadcast("addStartFixedNodeAutomatically",{startIRI:e.newConfig.startIRI})}function u(){return 1===e.page&&"node"===e.newConfig.startMode}e.validateCurrentPage=function(t){e.updateModel(),1===e.page?"node"!==e.newConfig.startMode||e.newConfig.startIRI?"query"!==e.newConfig.startMode||e.newConfig.startGraphQuery?"query"===e.newConfig.startMode?a(t,e.newConfig.startGraphQuery,"graph"):t():w(m.instant("graphexplore.provide.query")):w(m.instant("graphexplore.select.start.node")):2===e.page?a(t,e.newConfig.expandQuery,"construct",["node"]):3===e.page?a(t,e.newConfig.resourceQuery,"tuple",["node"],[],["type","label","comment","rank"]):4===e.page?a(t,e.newConfig.predicateLabelQuery,"tuple",["edge"],["label"]):5===e.page&&a(t,e.newConfig.resourcePropertiesQuery,"tuple",["node"],["property","value"])},e.goToPage=function(t){e.page!==t&&e.validateCurrentPage((function(){e.showEditor(),e.page=t,e.notoolbar=1!==e.page}))},e.goToPreviousPage=function(){e.page>1&&e.goToPage(e.page-1),u()&&(y=!1)},e.goToNextPage=function(){s(),y&&e.goToPage(e.page+1)},e.saveGraphConfig=function(){s(),u()&&!y||(e.newConfig.startQueryIncludeInferred=e.currentQuery.inference,e.newConfig.startQuerySameAs=e.currentQuery.sameAs,e.validateCurrentPage((function(){e.newConfig.name?e.isUpdate?e.updateGraphConfig(e.newConfig):e.createGraphConfig(e.newConfig):w(m.instant("graphexplore.provide.config.name"))})))},e.updateModel=function(){const t=window.editor.getValue().trim();"query"===e.newConfig.startMode&&1===e.page?e.newConfig.startGraphQuery=t:2===e.page?e.newConfig.expandQuery=t:3===e.page?e.newConfig.resourceQuery=t:4===e.page?e.newConfig.predicateLabelQuery=t:5===e.page&&(e.newConfig.resourcePropertiesQuery=t)},e.setQuery=function(e){window.editor.setValue(e||" ")},e.updateDirty=function(){if(e.revertConfig){const t=b(e.revertConfig),n=window.editor.getValue().trim();e.queryEditorIsDirty=t!==n}},e.updateEditor=function(){t((function(){e.currentQuery.query=b(e.newConfig),i.isActiveRepoOntopType()&&(e.nocount=!0),e.currentQuery.inference=e.newConfig.startQueryIncludeInferred,e.currentQuery.sameAs=e.newConfig.startQuerySameAs,D(e.currentQuery.id),R(e.currentQuery.id)}),100)},e.showEditor=function(){window.editor&&window.editor.xhr&&window.editor.xhr.abort(),e.viewMode="yasr"},e.showPreview=function(){e.currentQuery.outputType="table",e.runQuery()},e.revertEditor=function(){e.setQuery(b(e.revertConfig))},e.$watch("newConfig.startMode",(function(n){"query"===n&&t((function(){e.updateEditor()}),0)})),e.$watch("page",(function(n){("query"===e.newConfig.startMode||n>1)&&t((function(){e.showEditor(),e.updateEditor()}),0)}))}e.newConfig={startQueryIncludeInferred:!0,startQuerySameAs:!0},e.newConfig.startMode="search",e.isUpdate=!1,e.shared=!1,e.encodeQuery=function(e){return encodeURIComponent(e)},x?(e.isUpdate=!0,c.getConfig(x).success((function(t){e.newConfig=t,S()})).error((function(e){r.error(getError(e),m.instant("created.connector",{name:x}))}))):(e.isUpdate=!1,S());const C={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:e.newConfig.startQueryIncludeInferred,sameAs:e.newConfig.startQuerySameAs};e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:100,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.tabsData=e.tabs=[C],e.saveTab=function(t){const n=function(t){for(let n=0;n<e.tabsData.length;n++){if(e.tabsData[n].id===t)return n}}(t);if(void 0===n)return{};const r=e.tabsData[n];return e.saveQueryToLocal(r),r},e.loadTab=D,e.addNewTab=function(e,t,n){},e.runQuery=A,e.getNamespaces=I,e.changePagination=function(){A(!0,e.explainRequested)},e.toggleSampleQueries=function(){},e.addKnownPrefixes=N,e.getExistingTabId=L,e.querySelected=function(t){const n=L(t);e.toggleSampleQueries(),angular.isDefined(n)?R(n):e.addNewTab(null,t.name,t.body)},e.saveQueryToLocal=M,e.setLoader=E,e.getLoaderMessage=function(){const t=(Date.now()-e.queryStartTime)/1e3,n=e.getHumanReadableSeconds(t);let r="";r=e.progressMessage?e.progressMessage+"... "+n:m.instant("common.running.operation",{timeHuman:n});e.extraMessage&&t>10&&(r+="\n"+e.extraMessage);return r},e.fixSizesOnHorizontalViewModeSwitch=k,e.changeViewMode=function(n){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,k(),$(".dataTables_filter").remove(),$(".resultsTable").remove(),t((function(){D(n),R(n)}),100)},e.showHideEditor=T,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!0;e.getActiveRepository();function M(e){}function E(t,n,r){const i=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=n,e.extraMessage=r,i.addClass("hide")):(e.progressMessage="",e.extraMessage="",i.removeClass("hide")),null===e.$$phase&&e.$apply()}function k(n){function r(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}const i=n;if(e.orientationViewMode){if("yasr"===e.viewMode){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let n;n=t(i?function(){e.fixSizesOnHorizontalViewModeSwitch(i)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){t.cancel(n)}))}window.yasr&&window.yasr.container&&t((function(){window.yasr.container.resize()}),100)}function T(){k(!0)}function R(e){t((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function A(t,n){e.executedQueryTab=e.currentQuery,n&&"SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType()?r.warning(m.instant("query.editor.warning.msg")):"update"!==window.editor.getQueryMode()?(e.explainRequested=n,e.queryIsRunning||(t?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.viewMode="editor",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch(),E(!0,m.instant("evaluating.query.msg")),window.editor.query())):r.warning(m.instant("cannot.execute.update.error"))}function I(){E(!0,m.instant("common.refreshing.namespaces"),m.instant("common.extra.message")),h.getRepositoryNamespaces().success((function(t){const n={};t.results.bindings.forEach((function(e){n[e.prefix.value]=e.namespace.value})),e.namespaces=n})).error((function(t){e.repositoryError=getError(t)})).finally((function(){E(!1)}))}function N(){s.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){let t=getError(e);return r.error(t,m.instant("common.add.known.prefixes.error")),!0}))}function L(t){let n=void 0;return angular.forEach(e.tabsData,(function(e){if(e.name===t.name&&e.query===t.body)return n=e.id,e})),n}e.orientationViewMode||T(),e.getActiveRepository()&&I(),e.$on("$destroy",(function(){window.editor=null,window.yasr=null})),$("textarea").on("paste",(function(){t((function(){N()}),0)})),e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(){e.currentQuery}));function D(n){e.tabsData=[e.currentQuery];let r=e.currentQuery;null==e.currentQuery.query||""===e.currentQuery.query?window.editor.setValue(" "):window.editor.setValue(e.currentQuery.query),t((function(){e.currentTabConfig={},e.currentTabConfig.queryType=r.queryType,e.currentTabConfig.resultsCount=r.resultsCount,e.currentTabConfig.offset=r.offset,e.currentTabConfig.allResultsCount=r.allResultsCount,e.currentTabConfig.page=r.page,e.currentTabConfig.pageSize=r.pageSize,e.currentTabConfig.timeFinished=r.timeFinished,e.currentTabConfig.timeTook=r.timeTook,e.currentTabConfig.sizeDelta=r.sizeDelta,e.$apply()}),0),$("#yasr").css("padding","0")}function P(e){return $(e).attr("data-id")}e.$on("tabAction",(function(t,n){n.relatedTarget&&e.saveTab(P(n.relatedTarget)),e.loadTab(P(n.target))})),e.$on("deleteAllexeptSelected",(function(t,n){e.tabsData=n,e.tabs=n})),e.currentQuery=angular.copy(C),e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.getResultsDescription=function(){},e.getUpdateDescription=function(){},e.getStaleWarningMessage=function(){}}angular.module("graphdb.framework.graphexplore.controllers.graphviz.config",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("GraphConfigCtrl",r),r.$inject=["$scope","$timeout","$location","toastr","$repositories","$modal","ModalService","SparqlRestService","$filter","GraphConfigRestService","AutocompleteRestService","$routeParams","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate"]},64:function(e,t,n){"use strict";n.r(t);var r=n(217),i=n.n(r),o=n(223),a=n(215),s=n(216);n(4);function u(e,t,n,r,u,c,l,f,d,h,p,g,m){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(l,y,v){!function(l,y){var v=800,x=800,w=x,b=20,S=d3.layout.pack().size([w-b,w-b]).value((function(e){return e.size})),C=d3.scale.linear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(d3.interpolateHcl),M=d3.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 "+v+" "+x).attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function E(){return M.append("svg:g").attr({id:"main-group",transform:"translate("+v/2+","+x/2+")"})}function k(){return"true"===p.get(g.CLASS_HIERARCHY_HIDE_PREFIXES)}function T(){var e=s.a.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=10.0.0-M2-1");d3.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),d3.selectAll("g").style("opacity",1);var t=s.a.Export.generateBase64ImageSource();d3.select(this).attr({href:t,download:"class-hierarchy-"+c.getActiveRepository()+".svg"})}l.hidePrefixes=k();var R,A,I=E();if(!l.classHierarchyData.classCount&&c.getActiveRepository()&&!c.isSystemRepository()){e.loader=!0,e.hierarchyError=!1;const t=p.get(`classHierarchy-selectedGraph-${c.getActiveRepository()}`);n.getClassHierarchyData(null!==t?t.contextID.uri:"").success((function(t,n,r){e.loader=!1,207===n&&f.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),l.classHierarchyData=t,d3.select("#download-svg").on("mouseover",T)})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),f.error(m.instant("graphexplore.error.request.failed",{name:h,error:getError(t)}))}))}var N,L,D,P,O,q,z,j,U={};function H(n,s,c,f){D&&D(),P&&P(),d3.selectAll("#main-group").remove(),I=E(),o.a.SingleChild.addPlaceholders(n,!0),L=c||n;var p,g=S.nodes(n);L.isInFocusTransitive=!0,o.a.SingleChild.removePlaceholders(g),o.a.SingleChild.centerNodes(g),o.a.SingleChild.makePositionsRelativeToZero(g);var m=i()().attr("class","d3-tip").customPosition((function(e){return{top:"inherit",bottom:r.innerHeight-d3.event.clientY+"px",right:r.innerWidth-d3.event.clientX+"px"}})).html((function(e){return e.name}));M.call(m);var y=I.selectAll("circle").data(g).enter().append("g");s.doFade&&y.each((function(e){a.a.Transition.fadeIn(d3.select(this),550)}));var v,x=[],k=y.append("circle").attr("class",(function(e){return e.role})).style("fill",(function(e){return e.children?C(e.depth):"#E0D0D0"})).each((function(e){if(e.circle=d3.select(this),e.name!==h){var t=e.name;x.push({name:t}),U[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",(function(){s.noPrefixes?m.show(e):e.textHidden?m.show(e):m.hide(e)})),e.circle.on("mouseout",m.hide)}}));function T(e){d3.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),v=e}function $(){l.showClassInfoPanel=!1}x&&(x=_.uniqBy(x,"name"),l.flattenedClassNames=x);var O=a.a.Click.delayDblClick();d3.selectAll(".parent, .topLevelParent, .child, .root").call(O);A=function(e){B(e),e.name===h?($(),d3.selectAll(".selected").classed("selected",!1)):(T(e),l.selectedClass=v,l.showClassInfoPanel=!0,l.$on("sidePanelClosed",(function(t){d3.selectAll(".selected").classed("selected",e.selected=!1)})))},O.on("click",(function(e){e.id&&r.history.pushState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),m.hide(),A(e)})),O.on("dblclick",(function(t){t!==n&&(m.hide(),T(t),e.$broadcast("goToDomainRangeGraphView",v,L),d3.event.stopPropagation())}));var q=0;M.on("wheel",(function(){m.hide();var e=d3.event;e.preventDefault(),e.stopPropagation();var t=(new Date).getTime();if(t-q>100){q=t;var n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");var i=e.target.__data__;if(i||(i=L),"in"===n){if(i!==L){for(;i.parent&&!i.parent.isInFocusTransitive;)i=i.parent;i.depth<L.depth&&(i=L)}if(i===L&&i.children){for(var o=i.children[0],a=1;a<i.children.length;a++)i.children[a].sortingRank>o.sortingRank&&(o=i.children[a]);i=o}B(i,!0)}else"out"===n&&(i=L.parent)&&B(i,!0);L.name===h&&r.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),F()}}));var z=I.selectAll("text").data(g).enter().append("text").attr("class",(function(e){return e.children&&e.children.length?"label":"label child-label"})).each((function(e){e.textSel=d3.select(this)}));s.noPrefixes?(N!==n&&(z.each((function(e){var t=e.name.indexOf(":");e.name.indexOf("http://")>-1?e.noPrefixName=e.name:t>-1&&(e.noPrefixName=e.name.substring(t+1))})),N=n),z.style("font-size",(function(e){return a.a.Text.calcFontSize(e.noPrefixName,e.r)})).text((function(e){return a.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)}))):z.style("font-size",(function(e){return a.a.Text.calcFontSize(e.name,e.r)})).text((function(e){return a.a.Text.getTextWithElipsisIfNeeded(e.name,e.r/3)})),z.style("display",(function(e){return e.parent===n?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")})),s.doFade&&!s.keepPrevState&&z.each((function(e){a.a.Transition.fadeIn(d3.select(this),550)})),R=function(){function e(e){e&&k.each((function(t){e==t.id&&A(t)}))}var n=t.hash();r.onpopstate=function(t){t.state&&e(t.state.id)},e(n)};var j=I.selectAll("circle, text");function H(e,t){var n=w/e[2];p=e,j.attr("transform",(function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"})),k.attr("r",(function(e){return e.r*n})),t&&z.each((function(e){e.fullName!==L.topLevelParentUri&&L.topLevelParentUri!==h||(e.textSel.style("display","none"),L.children&&L.children.length?_.each(L.children,(function(e){e.textSel.style("display","inline")})):L.textSel.style("display","inline"),L.parent&&_.each(L.parent.children,(function(e){e.name!==L.name&&e.textSel.style("display","inline")})))})),z.style("font-size",(function(e){return s.noPrefixes?a.a.Text.calcFontSize(e.noPrefixName,e.r*n):a.a.Text.calcFontSize(e.name,e.r*n)})).text((function(e){return s.noPrefixes?a.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):a.a.Text.getTextWithElipsisIfNeeded(e.name,e.r*n/3)}))}function G(e){var t=2*e+b;return 2*e/t<.3&&(t=2*e+2),t}function Q(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive||(e.textHidden=!0,this.style.display="none")}function V(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive&&(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display="")}function B(e,t){if(u((function(){l.showExternalElements=e.name===h})),e.id&&r.history.replaceState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),L!==e){if(t&&($(),d3.selectAll(".selected").classed("selected",!1)),L.parent)for(var n=L;n;)n.isInFocusTransitive=!1,n=n.parent;for(n=e;n;)n.isInFocusTransitive=n.children,n=n.parent;if(2*(L=e).r/(2*L.r+b)<.3||l.currentSliderValue>l.currentBrowserLimit)H([L.x,L.y,G(L.r)]),z.each((function(e){Q.call(this,e),V.call(this,e)}));else d3.transition().duration(d).tween("zoom",(function(e){var t=d3.interpolateZoom(p,[L.x,L.y,G(L.r)]);return function(e){H(t(e))}})).selectAll("text").each("start",Q).each("end",V)}}H([L.x,L.y,G(L.r)],f),D=l.$on("rootFocus",(function(){r.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),A(n)})),P=l.$on("classSearch",(function(e){A(e)}))}function F(){var t=l.classHierarchyData.classCount;let n=p.get(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,p.set(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}window.addEventListener("resize",F),window.addEventListener("beforeunload",(function e(){window.removeEventListener("resize",F),window.removeEventListener("beforeunload",e)})),l.$watch("classHierarchyData",(function(){O&&O(),q&&q(),z&&z(),j&&j();var e=k();if(l.classHierarchyData.classCount){F();var t=angular.copy(l.classHierarchyData);var n,r,i=function(e){return S.nodes(e).sort((function(e,t){return e.sortingRank>t.sortingRank?-1:e.sortingRank<t.sortingRank?1:e.depth>t.depth?1:e.depth<t.depth?-1:0}))}(t);function o(e,t){var i={keepPrevState:!0,noPrefixes:k()};r=i.noPrefixes,H(n||e,i,L,!0),u((function(){p.set(g.CLASS_HIERARCHY_SWITCH_PREFIXES,t),R()}),70)}function a(e,i,a){if(e){p.set(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),n={name:h,children:[]};for(var s=new Set,u=1;u<=e;u++)s.add(i[u].id),i[u].parent===i[0]&&n.children.push(i[u]);if(function e(t){if(t.children){for(var n=[],r=0;r<t.children.length;r++)s.has(t.children[r].id)&&n.push($.extend({},t.children[r]));t.children=n;for(r=0;r<t.children.length;r++)e(t.children[r])}}(n),a)r=angular.isUndefined(r)?k():r,H(n,{noPrefixes:r});else o(t)}}var s,c=p.get(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(c)a(c,i);else{var f={doFade:!0,keepPrevState:!0,noPrefixes:k()};H(t,f),R()}O=l.$watch("hidePrefixes",(function(n){angular.isUndefined(n)||e?e=void 0:u((function(){!function(e){angular.isUndefined(e)||p.set(g.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),o(t,!0)}),50)}),!0),q=l.$watch("currentSliderValue",(function(e){a(e,i,!0)}),!0),j=l.$on("onEnterKeypressSearchAction",(function(e){s&&A(s)})),z=l.$on("searchedClass",(function(e,t){(s=U[t.name])&&A(s)}))}}),!0)}(l)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",u),u.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","$licenseService","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]},65:function(e,t,n){"use strict";n.r(t);var r=n(216),i=n(215);n(4);function o(e,t,n,o,a,s,u,c,l,f,d,h,p){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(f){const d=c((function(){!function(f){d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)}))};var d=1200,g=d/18,m=d/110,y=m/2,v=d/90,x=d/1e3,w=d/600,b=d3.layout.force().size([d,600]).charge(-900),S=b.drag().on("dragstart",(function(e){d3.select(this).classed("selected",e.selected=!0)})),C=d3.select("#domain-range").append("svg").attr("viewBox","0 0 "+d+" 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),M=C.append("defs");M.append("marker").attr({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:h}).append("path").attr({d:"M0,-5L10,0L0,5",class:"arrowHead"}),M.append("marker").attr({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:h}).append("path").attr({d:"M0,-5L10,0L0,5",class:"arrowHead"}),M.append("marker").attr({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:h}).append("path").attr({d:"M0,-5L10,0L0,5",class:"arrowHead"}),d3.select("#download-svg").on("mouseover",(function(){var e=r.a.Export.getCSSRules("css/domain-range-graph.css?v=10.0.0-M2-1");$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>");var t=r.a.Export.generateBase64ImageSource();d3.select(this).attr({href:t,download:"domain-range-graph-"+n.getActiveRepository()+".svg"})}));var _=d/7,E=1.2*_,k=d3.select(".legend-container").append("svg").attr("viewBox","0 0 "+_+" "+E).attr("preserveAspectRatio","xMidYMid meet");k.append("rect").attr({width:_,height:E}).style("fill","rgba(235, 235, 235, 0.9)");var T=d/75,R=d/40,A=T+g/2.5,I=R,N=A+d/90,L=v/1.1,D=R,P=(k.append("circle").attr({class:"legend-class-node",cx:(T+A)/2,cy:D,r:g/4.5}),I+d/370);k.append("text").attr({x:N,y:P}).style("font-size",L+"px").text("main class node");var O=D+d/30;k.append("circle").attr({class:"legend-object-node",cx:(T+A)/2,cy:O,r:m/1.25});var q=P+d/30;k.append("text").attr({x:N,y:q}).style("font-size",L+"px").text("class node");var z=O+d/45;k.append("circle").attr({class:"legend-datatype-node",cx:(T+A)/2,cy:z,r:y});var j=q+d/45;k.append("text").attr({x:N,y:j}).style("font-size",L+"px").text("datatype node");var U=z+d/45;d3.select(".legend-class-node");k.append("line").attr({class:"property-arrow",x1:T,y1:U,x2:A,y2:U}).style("stroke-width",x).attr("marker-end","url("+a.absUrl()+"#arrow)"),k.append("text").attr({x:N,y:U+d/370}).style("font-size",L+"px").text("explicit property");var H=U+d/45;k.append("line").attr({class:"implicit-property-arrow",x1:T,y1:H,x2:A,y2:H}).style("stroke-width",x).attr("marker-end","url("+a.absUrl()+"#arrow)"),k.append("text").attr({x:N,y:H+d/370}).style("font-size",L+"px").text("implicit property");var F=H+d/45;k.append("line").attr({class:"collapsed-property-arrow",x1:T,y1:F,x2:A,y2:F}).style("stroke-width",w).attr("marker-end","url("+a.absUrl()+"#collapsed-arrow)"),k.append("text").attr({x:N,y:F+d/370}).style("font-size",L+"px").text("collapsed property");var G=C,Q=a.search().uri,V=a.search().name,B=a.search().collapsed;o.getDomainRangeData(Q,B).success((function(e,t,n){f.domainRangeGraphData=e})).error((function(e){l.error("Request for "+V+" failed!")})),$(window).on("popstate",(function(){s.set(u.DOMAIN_RANGE_WENT_BACK,!0)})),t.onpopstate=function(t){t.state&&e.$broadcast("changeCollapsedEdgesState",t.state.collapsed)},f.$watch("collapseEdges",(function(){angular.isUndefined(f.collapseEdges)||(s.set(u.DOMAIN_RANGE_COLLAPSE_EDGES,f.collapseEdges),"true"!==s.get(u.DOMAIN_RANGE_WENT_BACK)&&function(t){e.$broadcast("switchEdgeMode",{uri:Q,name:V,collapsed:t})}(f.collapseEdges),s.remove(u.DOMAIN_RANGE_WENT_BACK))})),f.$watch("domainRangeGraphData",(function(){if(f.domainRangeGraphData){var n=angular.copy(f.domainRangeGraphData);b.nodes(n.nodes).links(n.links);var r=G.selectAll(".link").data(n.links).enter().append("g");function o(e){e.style("stroke",h),e.style("stroke-width",w),e.attr("marker-end","url("+a.absUrl()+"#collapsed-arrow)")}var s,u,l=0;r.each((function(e){if(e.objectPropNodeClassUri!==Q)s=r.append("line").attr({class:"link","marker-end":"url("+a.absUrl()+"#arrow)"}).style("stroke-width",x).each((function(e){switch(e.propertyType){case"objectLeft":e.targetRadius=g;break;case"objectRight":e.targetRadius=m;break;case"datatype":e.targetRadius=y;break;default:e.targetRadius=0}var t=d3.select(this);e.targetNodeEdgeCount>1?o(t):e.implicit&&t.style("stroke-dasharray","3, 3")}));else{if(angular.isUndefined(u)){var t=g/2;u=d3.select(this).append("path").attr({d:"M 0 0 A "+t+" "+t+" 0 1 1 0 "+t,class:"loop-link",fill:"none","marker-end":"url("+a.absUrl()+"#arrow-loop)"}).style("stroke-width",x)}(l+=e.targetNodeEdgeCount)>1&&o(d3.select(".loop-link"))}}));var C={};function M(){$.isEmptyObject(C)||(C.text.style("fill","black"),C.background.style("fill","#f0f0f0"))}function _(e){M(),C.text=d3.select(this),C.background=d3.select(this.previousSibling),C.text.style("fill","white"),C.background.style("fill",h),c((function(){f.showPredicatesInfoPanel=!0,f.selectedPredicate=e})),d3.event.stopPropagation()}$("document").ready((function(){$("#domain-range").bind("click",M)}));var E=r.append("text").attr("class",(function(e){return e.objectPropNodeClassUri===Q?"loop-link-property-name":"property-name"})).attr("dx",(function(e){return g/2*("objectLeft"===e.propertyType?1:-1)})).style("text-anchor",(function(e){return"objectLeft"===e.propertyType?"end":"start"})).style("font-size",v).text((function(e){return e.targetNodeEdgeCount>1?e.targetNodeEdgeCount+" predicates":e.name}));E.each((function(e){var n=d3.select(this);/\d\spredicates/.test(n.text())?n.style("font-weight","bold").on("click",_):n.on("click",(function(e){t.open("resource?uri="+encodeURIComponent(e.uri),"_blank")}))}));var k=d/600,T=r.append("rect").attr("class",(function(e){return e.objectPropNodeClassUri!==Q?"link-background":"loop-link-background"})).attr("width",(function(e){return e.calculatedWidth=this.previousSibling.getBBox().width,e.calculatedWidth+2*k})).attr("height",(function(e){return e.calculatedHeight=this.previousSibling.getBBox().height,e.calculatedHeight+k})).attr("transform",(function(e){var t=k-g/2*("objectLeft"===e.propertyType?1:-1);return"objectLeft"===e.propertyType&&(t+=e.calculatedWidth),"translate(-"+t+",-"+(k+e.calculatedHeight/2)+")"})).on("click",(function(e){d3.event.stopPropagation()})),R=G.selectAll(".node").data(n.nodes).enter().append("g"),A=R.filter((function(e){return e.objectPropClassUri!==Q})).append("circle").each((function(e){var t=d3.select(this);"main"===e.classPosition?t.attr({class:"class-node",r:g}).attr("marker-end","url("+a.absUrl()+"#loop-link)"):null===e.objectPropClassName?t.attr({class:"datatype-node",r:y}):t.attr({class:"object-prop-node",r:m})})).call(S);d3.selectAll(".object-prop-node").on("dblclick",(function(t,n){f.$apply((function(){e.$broadcast("reloadDomainRangeGraphView",t,n)}))})),R.filter((function(e){return e.objectPropClassName&&e.objectPropClassUri!==Q})).append("text").attr("class",(function(e){return e.classPosition+"-class-label"})).style("font-size",v).text((function(e){return e.objectPropClassName})).on("click",(function(e){t.open("resource?uri="+encodeURIComponent(e.objectPropClassUri),"_blank")}));var I=R.select("text");G.select(".class-node").each((function(){d3.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",(function(e){return i.a.Text.calcFontSize(V,g)})).text(V).on("click",(function(e){t.open("resource?uri="+encodeURIComponent(Q),"_blank")}))}));var N=G.select(".class-node + text"),L=d3.select(".class-node"),D=d3.selectAll(".loop-link-background"),P=d3.selectAll(".loop-link-property-name");if(E=d3.selectAll(".property-name"),!angular.isUndefined(u)){var O=[];D.each((function(e,t){d3.select(this);O.push({idx:t,width:e.calculatedWidth,height:e.calculatedHeight})}))}b.on("tick",(function(e){var t=8*e.alpha;function n(e){var t=e.x+2*g,n=e.y-g/1.9;var r=[];D.each((function(i,o){r.push(i),o<p?function(r,i){var o=$.grep(O,(function(e){return e.idx==i}));i>0&&(t+=parseFloat(i*(o[0].height/(i/1.4)))),r.attr({transform:"rotate(270, "+e.x+","+e.y+") translate("+t+","+n+")",width:o[0].height,height:o[0].width})}(d3.select(this),o):d3.select(this).remove()})),function(e){var t;d3.select(".view-more-preds-label").style("font-weight","bold").each((function(n){n.target.allEdges=e,t=this.getComputedTextLength()})).on("click",_),d3.select(".view-more-preds-rect").attr("height",t+2*k)}(r)}s.filter((function(e){return e.objectPropNodeClassUri!==Q})).attr("x1",(function(e){return e.source.x})).attr("y1",(function(e){return e.source.y})).attr("x2",(function(e){return e.targetX})).attr("y2",(function(e){return e.targetY})).each((function(e){!function(e){"objectLeft"===e.propertyType?(e.source.x-=8*t,e.source.y-=t/9):(e.target.x+=8*t,e.target.y-=t/9)}(e);var n=Math.atan2(e.target.y-e.source.y,e.target.x-e.source.x);e.targetX=e.target.x-Math.cos(n)*e.targetRadius,e.targetY=e.target.y-Math.sin(n)*e.targetRadius})),A.each((function(e){"main"!==e.classPosition||angular.isUndefined(u)||(!function(e){var t=e.x+.96*g,n=e.y-g/5.7-5;u.attr("transform","rotate(270, "+e.x+","+e.y+") translate("+t+","+n+")")}(e),function(e){function t(t,n){var r=$.grep(O,(function(e){return e.idx==n})),i=0;n>0&&(i=parseFloat(2*n*(r[0].height/1.4)));var o=e.x,a=e.y-2.1*g-i;t.attr({x:o,y:a}).moveToFront()}P.each((function(e,n){var r=d3.select(this),i=P.size()-p;i<0?t(r,n):(0==n&&!f.collapseEdges&&i>1&&(!function(e,t,n){e.classed("view-more-preds-label",!0).text(n+" predicates more ..."),null!==this.nextSibling&&t.classed("view-more-preds-rect",!0)}(r,d3.select(this.nextSibling),i),t(r,n)),n<p?t(r,n):r.remove())}))}(e),n(e)),e.objectPropClassUri!==Q&&d3.select(this).attr("cx",(function(e){return"main"===e.classPosition?function(e){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(e){return Math.log(e)/Math.LN10});var t=L.attr("cx")-d/2,n=.5*Math.log10(Math.abs(t));return e.x+=t>0?-n:n,e.x}(e):e.x})).attr("cy",(function(e){return e.y}))})),N.attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})).moveToFront(),T.filter((function(e){return e.objectPropNodeClassUri!==Q})).attr("x",(function(e){return e.target.x>e.source.x?e.source.x+(e.target.x-e.source.x)/2:e.target.x+(e.source.x-e.target.x)/2})).attr("y",(function(e){return e.target.y>e.source.y?e.source.y+(e.target.y-e.source.y)/2:e.target.y+(e.source.y-e.target.y)/2})).moveToFront(),E.attr("x",(function(e){return e.target.x>e.source.x?e.source.x+(e.target.x-e.source.x)/2:e.target.x+(e.source.x-e.target.x)/2})).attr("y",(function(e){return e.target.y>e.source.y?e.source.y+(e.target.y-e.source.y)/2:e.target.y+(e.source.y-e.target.y)/2})).moveToFront(),I.attr("x",(function(e){return"right"===e.classPosition?e.x+1.2*m:e.x-1.2*m})).attr("y",(function(e){return e.y})).moveToFront()})).linkDistance(d/3.5).start()}}))}(f)}),50);f.$on("$destroy",(function(){c.cancel(d)}))}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","#F04E23").constant("ONTO_GREEN","#0CB0A0").constant("ONTO_BLUE","#003663").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",o),o.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]},66:function(e,t){function n(e,t){return{restrict:"A",scope:{},templateUrl:"js/angular/graphexplore/templates/systemRepoWarningTemplate.html",link:function(n){n.isSystemRepository=function(){return"SYSTEM"===e.getActiveRepository()},n.hasPermission=function(){return t.hasPermission()}}}}angular.module("graphdb.framework.graphexplore.directives.sysrepo",["graphdb.framework.graphexplore.controllers.class"]).directive("systemRepoWarning",n),n.$inject=["$repositories","$rootScope"]},67:function(e,t){function n(e){return{restrict:"AE",scope:{rdfsLabel:"=",rdfsComment:"=",expanded:"=",alwaysExpanded:"="},templateUrl:"js/angular/graphexplore/templates/rdfsCommentLabelTemplate.html",link:function(t,n){t.stringLimit=e,t.scrollToTop=function(){n[0].getElementsByClassName("rdfs-comment")[0].scrollTop=0},t.checkCommentLength=function(){return n[0].getElementsByClassName("rdfs-comment-text")[0].innerText.length<e},t.equalHeights=function(){const e=n[0].getElementsByClassName("rdfs-comment-text")[0].innerHeight;e<250&&t.expanded&&(n[0].getElementsByClassName("rdfs-comment")[0].innerHeight=e)},t.toggleFullComment=function(){t.expanded=!t.expanded},t.$watch("expanded || alwaysExpanded",(function(n){t.stringLimit=n?t.rdfsComment.length:e}))}}}angular.module("graphdb.framework.graphexplore.directives.rdfsdetails",[]).directive("rdfsCommentLabel",n).constant("SHORT_COMMENT_LENGTH",100),n.$inject=["SHORT_COMMENT_LENGTH"]},68:function(e,t,n){"use strict";n.r(t);var r=n(216);n(41);function i(e,t){return{restrict:"A",template:'<div id="dependencies-chord"></div>',scope:{dependenciesData:"="},link:function(n){n.$watch("dependenciesData",(function(){if(n.dependenciesData){const i=n.dependenciesData;!function(i,o){if(function(){let e=!0;for(const t of i){if(t.some(e=>0!==e)){e=!1;break}}return e}())return;const a=d3.scale.category20(),s=d3.select("body").append("div").attr("class","tooltip").style("opacity",0);d3.select("body").on("click",(function(){s.style("opacity",0)}));const u=Math.min(800,800)/2.8,c=u-24,l=d3.svg.arc().innerRadius(c).outerRadius(u),f=d3.layout.chord().padding(.04).sortSubgroups(d3.descending).sortChords(d3.ascending),d=d3.svg.chord().radius(c),h=d3.select("#dependencies-chord").append("svg").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").style("font","10px sans-serif").append("g").attr("id","circle").attr("transform","translate(400,400)");h.append("circle").attr("r",u).style("fill","none"),f.matrix(i);const p=h.selectAll(".group").data(f.groups).enter().append("g").attr("class","group").on("mouseover",(function(e,t){g.classed("fade",(function(e){return e.source.index!==t&&e.target.index!==t}))}));p.append("title").text((function(e,t){return o[t]})),p.append("path").attr("id",(function(e,t){return"group"+t})).attr("d",l).style("fill",(function(e,t){return a(t)})),p.append("text").each((function(e){e.angle=(e.startAngle+e.endAngle)/2})).attr("dy",".35em").attr("transform",(function(e){return"rotate("+(180*e.angle/Math.PI-90)+")translate("+(c+26)+")"+(e.angle>Math.PI?"rotate(180)":"")})).style("text-anchor",(function(e){return e.angle>Math.PI?"end":null})).text((function(e){return o[e.index]}));const g=h.selectAll(".chord").data(f.chords).enter().append("path").attr("class","chord").style("fill",(function(e){return a(e.target.index)})).style("fill-opacity",".67").style("stroke","#000").style("stroke-width",".25px").style("cursor","pointer").attr("d",d);g.on("mouseover",(function(){d3.select(this).style({"fill-opacity":"1"})})),g.on("mouseout",(function(){d3.select(this).style({"fill-opacity":".67"})})),g.on("click",(function(e){const r=o[e.source.index],i=o[e.target.index],a=d3.event.pageX,u=d3.event.pageY;t.getPredicates(r,i,n.selectedGraph&&n.selectedGraph.contextID.uri).success((function(e){let t="<div class='dependencies-tooltip'>"+("<div class='row'>"+r+" <i class='fa fa-exchange'></i> "+i+"</div>")+_.map(e.slice(0,10),(function(e){const t=" <i class='fa fa-long-arrow-"+("out"===e.direction?"right":"left")+"'></i>";return"<div class='row'>"+e.predicate+" : "+e.weight+t+" </div>"})).join("");e.length>10?t=t+"<div class='pull-right'>And "+(e.length-10).toString()+" more...</div></div>":t+="</div>",s.html(t).style("left",a+"px").style("top",u+"px")})),s.transition().duration(200).style("opacity",1)})),d3.select("#circle").on("mouseleave",(function(){h.selectAll(".chord").classed("fade",!1)})),d3.select("#download-svg").on("mouseover",(function(){const t=r.a.Export.generateBase64ImageSource();d3.select(this).attr({href:t,download:"dependencies-"+e.getActiveRepository()+".svg"})}))}(i.matrix,i.nodes,i.direction)}}))}}}angular.module("graphdb.framework.graphexplore.directives.dependencies",["graphdb.framework.graphexplore.controllers.dependencies","graphdb.framework.rest.graphexplore.data.service"]).directive("dependenciesChord",i),i.$inject=["$repositories","GraphDataRestService"]},69:function(e,t){function n(){return{restrict:"AE",scope:{filterQueryObj:"=",filterFunction:"&",listItemsObj:"=",listItemsNotFiltered:"=",searchPlaceholder:"@"},templateUrl:"js/angular/graphexplore/templates/listItemsSearchFilterTemplate.html",link:function(e){e.filterFunction=e.filterFunction(),e.$watch("filterQueryObj.query",(function(){var t,n,r,i;e.listItemsObj.items=(t=e.filterQueryObj.query,n=e.listItemsObj.items,r=e.listItemsNotFiltered,i=e.filterFunction,t.length>0?_.filter(r,i):n.length!==r.length?r:n)}))}}}angular.module("graphdb.framework.graphexplore.directives.searchfilter",[]).directive("listItemsSearchFilter",n),n.$inject=[]},70:function(e,t){function n(e,t){return{restrict:"AE",scope:{searchData:"=",searchFields:"@",titleField:"@",searchPlaceholder:"@",initialValue:"=",searchedObjCallback:"&"},templateUrl:"js/angular/graphexplore/templates/searchIconInputTemplate.html",link:function(n,r){n.searchedObjCallback=n.searchedObjCallback(),n.performSearchActionOnEnter=function(){e.$broadcast("onEnterKeypressSearchAction")},n.showInput=function(){$("#selectGraphDropdown").hide(),r.find("#search_input #search_input_value")[0].value="",r.find(".search-icon").addClass("animated bounceOut").css("z-index","-1"),r.find("#search_input .angucomplete-holder").css("display","block"),t((function(){r.find("#search_input .angucomplete-holder").css("width","250px").css("left","-215px"),t((function(){r.find(".close-icon").css("display","block").addClass("animated bounceIn").css("z-index","3"),r.find("#search_input #search_input_value").focus()}),200)}),1)},n.hideInput=function(){r.find("#search_input #search_input_value")[0].value="",r.find("#search_input .angucomplete-holder").css("width","0px").css("left","35px"),t((function(){r.find("#search_input .angucomplete-holder").css("display","none"),$("#selectGraphDropdown").show()}),250),r.find(".close-icon").addClass("animated bounceOut").removeClass("bounceOut").css("z-index","-1").css("display","none").click((function(){$(".tooltip").hide()})),t((function(){r.find(".search-icon").css("display","inline-block").removeClass("bounceOut").addClass("bounceIn").css("z-index","3")}),200)}}}}angular.module("graphdb.framework.graphexplore.directives.searchcontrols",[]).directive("searchIconInput",n),n.$inject=["$rootScope","$timeout"]}}]);
|
|
4
|
-
//# sourceMappingURL=12.9004ab127289745129a4.bundle.js.map
|