graphdb-workbench 2.8.0-TR2 → 2.8.0-TR3

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.
Files changed (214) hide show
  1. package/dist/{1.a0b75d45735a22f37ddc.bundle.js → 1.2dda9a5cb7583ef78f5c.bundle.js} +1 -1
  2. package/dist/10.d5925e58aa46c190355c.bundle.js +1 -0
  3. package/dist/{101.033154cfbe16d0474fc2.bundle.js → 101.36c2d56e11e392b20f52.bundle.js} +1 -1
  4. package/dist/{10.898fa2a36737f95067a6.bundle.js → 11.7dd13f73090a380d7884.bundle.js} +1 -1
  5. package/dist/{111.4cf8ef55422eab73d874.bundle.js → 111.50a450e85aba9de91fdc.bundle.js} +1 -1
  6. package/dist/{112.401fb8c98ab73e208730.bundle.js → 112.b07ed5633bcc5388a2ba.bundle.js} +1 -1
  7. package/dist/113.6823f4e7dc7b7c6a02d3.bundle.js +1 -0
  8. package/dist/{119.e46cd3518e0dbf3169bb.bundle.js → 119.daaf67dc419095bd957c.bundle.js} +1 -1
  9. package/dist/{11.e430b38a9a250b880d28.bundle.js → 12.173d48c02678a24fe199.bundle.js} +1 -1
  10. package/dist/{121.a9992f7ff46cf77b304c.bundle.js → 121.db7131aafbfbe030ea35.bundle.js} +1 -1
  11. package/dist/{122.1c9c84436c94b46fe056.bundle.js → 122.84e526566281dfe79ede.bundle.js} +1 -1
  12. package/dist/{123.83252c0af670f08d60cd.bundle.js → 123.c71d121e1573d4e732c0.bundle.js} +1 -1
  13. package/dist/{124.cf9703439aa0c9313b50.bundle.js → 124.1d2113ee6e00c6a13c91.bundle.js} +1 -1
  14. package/dist/{126.8c636a630d2d121743c5.bundle.js → 126.647aad60fac180a58296.bundle.js} +1 -1
  15. package/dist/{127.332e86694914476a6176.bundle.js → 127.099000071b2c1e40bd35.bundle.js} +1 -1
  16. package/dist/128.4fea7408f39af1661363.bundle.js +1 -0
  17. package/dist/{129.047b0311e394c752a6a9.bundle.js → 129.2bb252b6083db5cbfccf.bundle.js} +1 -1
  18. package/dist/{12.afb551efb4792fb9eb1d.bundle.js → 13.06c49327a3b1a4c80ad6.bundle.js} +1 -1
  19. package/dist/{131.ef612c8696bb612a9331.bundle.js → 131.d620cb87c7bce0386b4f.bundle.js} +1 -1
  20. package/dist/{134.191e4cec3a9f7d292909.bundle.js → 134.4db49e7aeaad82c760a6.bundle.js} +1 -1
  21. package/dist/14.2595a3b694cb9dc1f604.bundle.js +2 -0
  22. package/dist/{14.86cc7f1cd846ca4c89f0.bundle.js → 15.2baef0055d58658c7ea8.bundle.js} +1 -1
  23. package/dist/{15.926edf6efc64325909c5.bundle.js → 16.cdbcf340f02b0c8977b8.bundle.js} +1 -1
  24. package/dist/{165.43dabca3ac2700b7a4c0.bundle.js → 165.eaf6deb8350b98160966.bundle.js} +1 -1
  25. package/dist/168.7fe1f6eb6698093fa80c.bundle.js +1 -1
  26. package/dist/{16.8bc6a8a10c03ec785174.bundle.js → 17.2310d8a43230a4a587cc.bundle.js} +1 -1
  27. package/dist/{178.b4a67f2d275aa4e7c7e6.bundle.js → 178.9b1842e598ad462cd17b.bundle.js} +1 -1
  28. package/dist/{179.90b68b334b6faf134682.bundle.js → 179.e5b4cccecf38f13f6a41.bundle.js} +1 -1
  29. package/dist/{17.0add578b712aeaedb5a0.bundle.js → 18.bbbc086a88d188729ac0.bundle.js} +1 -1
  30. package/dist/{187.34becb6d27cbfd4b074d.bundle.js → 187.5a7992e400ef07f94f16.bundle.js} +1 -1
  31. package/dist/{189.7b0a1c093716b939fd52.bundle.js → 189.ccc44faa2fc4cca06c72.bundle.js} +1 -1
  32. package/dist/{18.9b6042eb938bed7eb676.bundle.js → 19.f30c48aa8a599e62fc76.bundle.js} +1 -1
  33. package/dist/{190.ea276a38d182b5f1ee5d.bundle.js → 190.dff617079c829ec6d17d.bundle.js} +1 -1
  34. package/dist/{191.bd22587f391925a001a4.bundle.js → 191.ea991b8037f39257f684.bundle.js} +1 -1
  35. package/dist/{196.fbea7e355a6df1f8aee0.bundle.js → 196.0d98ec3b872108f046bc.bundle.js} +1 -1
  36. package/dist/{197.9750357510c52edc3a12.bundle.js → 197.e344caec4f0cb4d2012b.bundle.js} +1 -1
  37. package/dist/{198.d25dbf25a09e68bed5a8.bundle.js → 198.1bd94bb0be99782ea98c.bundle.js} +1 -1
  38. package/dist/{199.727623492df97b809e5f.bundle.js → 199.b43a12bd069705c3c29f.bundle.js} +1 -1
  39. package/dist/2.83ac91f6c9d0d7ab1819.bundle.js +2 -0
  40. package/dist/{19.f1b9c74ef0c256da2eca.bundle.js → 20.5be549e284f9d9ef9e79.bundle.js} +2 -2
  41. package/dist/200.4c9bc00fd17bb2192bd9.bundle.js +1 -0
  42. package/dist/{205.d7c86c03230059559e3b.bundle.js → 205.6c74e9480df3f72a358f.bundle.js} +1 -1
  43. package/dist/{207.af83fd1ffcdc9a322f6c.bundle.js → 207.9ead4a33702a134fca3b.bundle.js} +1 -1
  44. package/dist/{20.4c4d231852e056d4c705.bundle.js → 21.6bffc436fdd37503c522.bundle.js} +2 -2
  45. package/dist/{213.9cbbf239525e01e98b16.bundle.js → 213.4e5867645049ff1e5184.bundle.js} +1 -1
  46. package/dist/{214.ee6729fffbd79f1304e3.bundle.js → 214.3a9d944eb79dc5fb6dba.bundle.js} +1 -1
  47. package/dist/22.8dccb31dce30f0b00d7f.bundle.js +1 -0
  48. package/dist/{223.b7e2302ce49d6efe51f1.bundle.js → 223.e5f58b0691d3d21099dd.bundle.js} +1 -1
  49. package/dist/{229.cc86db36d4eed5ffc13d.bundle.js → 229.3dd9c23a3b95ffa6e948.bundle.js} +1 -1
  50. package/dist/23.d27e1bdf1f2e6bb62fa4.bundle.js +2 -0
  51. package/dist/{232.9da2520175cf682c5ba9.bundle.js → 232.566b87ef4976f79cea65.bundle.js} +1 -1
  52. package/dist/{238.e7da1693dc6480734527.bundle.js → 238.5e228bd5c12ece1093cc.bundle.js} +1 -1
  53. package/dist/{239.5a0e3e9d302c61c9dd2a.bundle.js → 239.8e061122b61743b3465f.bundle.js} +1 -1
  54. package/dist/{23.65519943d430769ff624.bundle.js → 24.92bf4e49692b9c75a55d.bundle.js} +1 -1
  55. package/dist/241.f9f39df3f0ec396ae5b5.bundle.js +1 -0
  56. package/dist/{242.4b96aef3e71a70c1c5dc.bundle.js → 242.c3f7c90837740f461b3b.bundle.js} +1 -1
  57. package/dist/{244.38f4a20f1b3a17482909.bundle.js → 244.3110bb5a8300d195e1f2.bundle.js} +1 -1
  58. package/dist/{246.69bb254202ff33946ba4.bundle.js → 246.2d6e5f29e5f75762eb07.bundle.js} +1 -1
  59. package/dist/248.037043809398c10fc5ef.bundle.js +1 -0
  60. package/dist/{24.ce44938fc8e7e0dd20a8.bundle.js → 25.76313d3de180de838f79.bundle.js} +1 -1
  61. package/dist/{250.1e06d075be2d6fab28da.bundle.js → 250.abf997bb3a868bcffa61.bundle.js} +1 -1
  62. package/dist/{25.dc83aef89e5a2d728c9a.bundle.js → 26.babc1c6662b9ba067177.bundle.js} +1 -1
  63. package/dist/{263.74a323fb27a3b00879e9.bundle.js → 263.2ff1f20fd7dc88370164.bundle.js} +1 -1
  64. package/dist/{267.c0c12cb49bc1e89c7b94.bundle.js → 267.5f65d2ac3a94255050c6.bundle.js} +1 -1
  65. package/dist/{26.810adeabe76dd0774dcd.bundle.js → 27.ed092438f83fe9075f02.bundle.js} +1 -1
  66. package/dist/{270.785670697c0455ac4b52.bundle.js → 270.df0269e47d234e3c7b53.bundle.js} +1 -1
  67. package/dist/{275.dcef80da1502f7da8c09.bundle.js → 275.963caf205807a9629ce2.bundle.js} +1 -1
  68. package/dist/{278.384136e3d0926f51464c.bundle.js → 278.aac622323c504e577b2a.bundle.js} +1 -1
  69. package/dist/{27.b41b821eff22e1910c8e.bundle.js → 28.48b50b803b4baaa34846.bundle.js} +1 -1
  70. package/dist/{282.bb843b144879c7953fae.bundle.js → 282.dd2315477a98a3ff5f83.bundle.js} +1 -1
  71. package/dist/{285.eb0437c8ef1eb29f15a2.bundle.js → 285.fe1f3516ae2d0723a085.bundle.js} +1 -1
  72. package/dist/{28.2a5850ca91ebaccf5ed6.bundle.js → 29.55c290bfb5c4616d2d81.bundle.js} +1 -1
  73. package/dist/294.b7b4f37beb07369dd85e.bundle.js +1 -0
  74. package/dist/{29.9f64f22c46c7b02a0ec8.bundle.js → 30.1b73d7094674c61834ba.bundle.js} +1 -1
  75. package/dist/{302.b20c8d1e643b2fdc4564.bundle.js → 302.89060f1450aaaa8329bf.bundle.js} +1 -1
  76. package/dist/{304.28ee878b3769022514fe.bundle.js → 304.65aa89b76b934124dbee.bundle.js} +1 -1
  77. package/dist/{30.75b398d38eabe765da4e.bundle.js → 31.85e82cea20093fb38001.bundle.js} +1 -1
  78. package/dist/{31.6e0bf46006dfb4b7338c.bundle.js → 32.febd6dc42d5e2a4244c8.bundle.js} +1 -1
  79. package/dist/326.8a369e8cb3db85e5fd21.bundle.js +1 -1
  80. package/dist/329.95f8d46ef472c45724ef.bundle.js +1 -1
  81. package/dist/{32.60795cfcb9c447399fc2.bundle.js → 33.94d61e47c49d1dc0d799.bundle.js} +1 -1
  82. package/dist/330.b557e07136977ad81a04.bundle.js +1 -1
  83. package/dist/331.70b775db910815aec7d5.bundle.js +1 -1
  84. package/dist/{33.d19f2c40b3b42b314591.bundle.js → 34.1fd643b9432470f8a604.bundle.js} +1 -1
  85. package/dist/{34.cd22a42400934b4cdf87.bundle.js → 35.af4ea855fb946c6455a8.bundle.js} +1 -1
  86. package/dist/{35.cfb69109b2c7ebc2d1ef.bundle.js → 36.0530100261e4e11638bf.bundle.js} +1 -1
  87. package/dist/361.48dd1b79917eaa9b7e6a.bundle.js +1 -1
  88. package/dist/{36.a7b1ed685913595d40e9.bundle.js → 37.8cd574980043ce8ce2c5.bundle.js} +1 -1
  89. package/dist/372.5e3859739cd36c6ffd8a.bundle.js +1 -1
  90. package/dist/373.6e2258b5ab6ced0f532d.bundle.js +1 -1
  91. package/dist/374.9e21d915726536564967.bundle.js +1 -1
  92. package/dist/375.fd66d9e99c21bb8621a7.bundle.js +1 -1
  93. package/dist/378.655ee2a6b9445fb98536.bundle.js +1 -0
  94. package/dist/{37.7a0d6e8f543f2ab93d6d.bundle.js → 38.50c1f0dadd0b2a1f2d5b.bundle.js} +1 -1
  95. package/dist/380.a1095e01a9df1355fd0a.bundle.js +1 -1
  96. package/dist/381.d57b46174191d9f426e9.bundle.js +1 -0
  97. package/dist/{38.f53ead5a867b583684cc.bundle.js → 39.17dd78ea525a513bc542.bundle.js} +1 -1
  98. package/dist/4.9a24659420974a60e2bd.bundle.js +1 -0
  99. package/dist/{39.b424e4c3cad0e7af5ac6.bundle.js → 40.135a8b3dbb9bfe3a30b4.bundle.js} +1 -1
  100. package/dist/{40.6479ea8c327190f89451.bundle.js → 41.b736d1963250d40b37f8.bundle.js} +1 -1
  101. package/dist/{42.c8adf98ad0104887b4ec.bundle.js → 42.edb1b0aa4f57312318a3.bundle.js} +1 -1
  102. package/dist/{43.f49aac05f6879c3dac89.bundle.js → 43.b67550476de4e84f6d54.bundle.js} +1 -1
  103. package/dist/{44.4322dcdd5bf0de55e04e.bundle.js → 44.0dcf36e865d7ccc58a98.bundle.js} +2 -2
  104. package/dist/45.27d67df97d00698f054a.bundle.js +1 -0
  105. package/dist/{47.0d580dbe9ed87bce496c.bundle.js → 47.d1aedf3c8b21df0c0db6.bundle.js} +1 -1
  106. package/dist/{48.fb09364abedeac430971.bundle.js → 48.d80d61369975c89e80db.bundle.js} +1 -1
  107. package/dist/{5.d34980533e122f4791f4.bundle.js → 5.016cab5488e6dabbbcb7.bundle.js} +1 -1
  108. package/dist/50.ec14ac614772913e0be0.bundle.js +1 -1
  109. package/dist/{51.8689b92a13bd2b2a3074.bundle.js → 51.ea2981187a41b2830b12.bundle.js} +1 -1
  110. package/dist/{53.3d653040b7defd01415f.bundle.js → 53.9230da51045afcd8b497.bundle.js} +1 -1
  111. package/dist/{57.0d4caf8a82a7ff1f1dca.bundle.js → 57.eeae8574f1671e69cc95.bundle.js} +1 -1
  112. package/dist/{58.c4cb8de207c705cee7a1.bundle.js → 58.bca4759e835334e5e710.bundle.js} +1 -1
  113. package/dist/{59.821da70e952924981e80.bundle.js → 59.aa594f0e5ea5ef6ab2a2.bundle.js} +1 -1
  114. package/dist/6.b9f1177353b195a6d88e.bundle.js +1 -0
  115. package/dist/{60.8deab4881eaf63bcd6a4.bundle.js → 60.039181bd14444d1ea257.bundle.js} +1 -1
  116. package/dist/61.7736faf8cd8733139f11.bundle.js +1 -1
  117. package/dist/{62.518759d544e052fd9256.bundle.js → 62.a1550d756c7796721dc1.bundle.js} +1 -1
  118. package/dist/{63.31bff84c37ea1de0acef.bundle.js → 63.57c05d1f522958467257.bundle.js} +1 -1
  119. package/dist/{64.3bac8674c52226912630.bundle.js → 64.3d6c08808a56fda8c18a.bundle.js} +1 -1
  120. package/dist/{65.a36fbde317ab57cce415.bundle.js → 65.530bfe6d5589879af56a.bundle.js} +1 -1
  121. package/dist/{66.8f8126d5175f62c3face.bundle.js → 66.592b440583a6e7c48336.bundle.js} +1 -1
  122. package/dist/{6.c639b6efdd4f0ac3d584.bundle.js → 7.542348a49b096f91f943.bundle.js} +1 -1
  123. package/dist/70.b7bc7b875addfff41525.bundle.js +1 -0
  124. package/dist/{74.e9db7f3271c826c88a78.bundle.js → 74.b027d1ed936bc8477060.bundle.js} +1 -1
  125. package/dist/{75.c25619a16d098a2721be.bundle.js → 75.46b361955c7b29de651b.bundle.js} +1 -1
  126. package/dist/{76.14ae4b937c879f457b25.bundle.js → 76.a33b72d5a897ff6f997e.bundle.js} +1 -1
  127. package/dist/{77.463f82a88b3c6e954c01.bundle.js → 77.66e2f439385f8b80c2d0.bundle.js} +1 -1
  128. package/dist/{78.1fa69d08bd50f06f636a.bundle.js → 78.1e4e853ae303c2980a07.bundle.js} +1 -1
  129. package/dist/{79.d5735446205c02c627cb.bundle.js → 79.91afac30b1857d2c92a7.bundle.js} +1 -1
  130. package/dist/8.f209baf701ce824606aa.bundle.js +1 -0
  131. package/dist/{80.9c57ff6117953efd9e90.bundle.js → 80.13225c4f7ca42fa0d371.bundle.js} +1 -1
  132. package/dist/81.cc5452e74f002eb3fc9d.bundle.js +1 -0
  133. package/dist/82.bb1512ea446fc990ee27.bundle.js +1 -0
  134. package/dist/{83.f9c096421bb5c0b29ba9.bundle.js → 83.ddb9d63112221a854b07.bundle.js} +1 -1
  135. package/dist/{84.514756b3a32bb6873cc1.bundle.js → 84.7979d2956e92650723eb.bundle.js} +1 -1
  136. package/dist/{85.70d008d869c71199d1e9.bundle.js → 85.f16029ac40b8d3d39fc0.bundle.js} +1 -1
  137. package/dist/{86.08b4429bf0ec0b5dcde0.bundle.js → 86.3e1118b3b3b2afa9bb66.bundle.js} +1 -1
  138. package/dist/{87.1b3837e239bd74b553ee.bundle.js → 87.678958410087d805075c.bundle.js} +1 -1
  139. package/dist/{89.6355fb17f7c9088bd61d.bundle.js → 89.6ac5c16928e147cba2dc.bundle.js} +1 -1
  140. package/dist/{8.b2bab85e9d32868938e8.bundle.js → 9.d94d4bf6e7269f1f1727.bundle.js} +1 -1
  141. package/dist/{90.c0be68f3cc4c02f18818.bundle.js → 90.1e1e6b754b039dd0b8de.bundle.js} +1 -1
  142. package/dist/{91.8a23e41280e7b69dba09.bundle.js → 91.e3a89118ae2dc2f1dc0f.bundle.js} +1 -1
  143. package/dist/{93.d7428790221f27764822.bundle.js → 93.a1f7a0484491627fbcc7.bundle.js} +1 -1
  144. package/dist/{94.f353e48cd582c9a3eeea.bundle.js → 94.3b61b1bbef667eb95aca.bundle.js} +1 -1
  145. package/dist/{95.2b1230102fa575c74b94.bundle.js → 95.4901c21c6119f2dcf99c.bundle.js} +1 -1
  146. package/dist/96.48ec2dc5cafc428581d6.bundle.js +1 -0
  147. package/dist/98.7bac7bac2ad7abf2e083.bundle.js +1 -0
  148. package/dist/{bundle.3cbc347e3527f274db18.bundle.js → bundle.08cbe1859ba528283283.bundle.js} +4 -4
  149. package/dist/i18n/locale-en.json +10 -2
  150. package/dist/i18n/locale-fr.json +10 -2
  151. package/dist/index.html +3 -3
  152. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  153. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  154. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  155. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  156. package/dist/js/angular/security/templates/user.html +1 -1
  157. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +2 -2
  158. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  159. package/dist/license-checker-static.json +7 -0
  160. package/dist/license-checker.json +2 -2
  161. package/dist/pages/aclmanagement.html +2 -2
  162. package/dist/pages/autocomplete.html +1 -1
  163. package/dist/pages/choose-repository-type.html +1 -1
  164. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  165. package/dist/pages/create-index.html +1 -1
  166. package/dist/pages/dependencies.html +1 -1
  167. package/dist/pages/domainRangeInfo.html +2 -2
  168. package/dist/pages/edit.html +3 -3
  169. package/dist/pages/explore.html +1 -1
  170. package/dist/pages/export.html +1 -1
  171. package/dist/pages/find.html +1 -1
  172. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  173. package/dist/pages/graphs-visualizations.html +7 -7
  174. package/dist/pages/guides.html +1 -1
  175. package/dist/pages/import.html +2 -2
  176. package/dist/pages/jdbc-create.html +1 -1
  177. package/dist/pages/monitor/backup-and-restore.html +1 -1
  178. package/dist/pages/monitor/queries.html +1 -1
  179. package/dist/pages/monitor/resources.html +1 -1
  180. package/dist/pages/namespaces.html +2 -2
  181. package/dist/pages/plugins.html +1 -1
  182. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  183. package/dist/pages/rdfrank.html +2 -2
  184. package/dist/pages/repositories.html +1 -1
  185. package/dist/pages/repository.html +1 -1
  186. package/dist/pages/similarity-indexes.html +1 -1
  187. package/dist/pages/sparql-editor.html +1 -1
  188. package/dist/pages/sparql-template-create.html +1 -1
  189. package/dist/pages/ux-test1.html +2 -2
  190. package/dist/pages/webapi.html +2 -2
  191. package/dist/res/swagger5/index.html +12 -12
  192. package/package.json +1 -1
  193. package/dist/113.6d341bb94caa74a19866.bundle.js +0 -1
  194. package/dist/128.f414d604bcd013bf911d.bundle.js +0 -1
  195. package/dist/13.dd3daf303c726658ee20.bundle.js +0 -2
  196. package/dist/2.5ecba6f91ee9aba0f72b.bundle.js +0 -2
  197. package/dist/200.92f1a086ea5aef9edf3b.bundle.js +0 -1
  198. package/dist/21.54344d162b6a34c9b801.bundle.js +0 -1
  199. package/dist/22.d0b623eb0f96c9aa6b24.bundle.js +0 -2
  200. package/dist/241.0d40fca2dbe1e4286b0a.bundle.js +0 -1
  201. package/dist/248.1c51c8776dafd2938c2f.bundle.js +0 -1
  202. package/dist/294.2cce50bef12473652329.bundle.js +0 -1
  203. package/dist/378.3bd7c408c54fcd423c10.bundle.js +0 -1
  204. package/dist/381.104beacb095b894100a3.bundle.js +0 -1
  205. package/dist/4.a6011f0d50143709767a.bundle.js +0 -1
  206. package/dist/41.4d964baeed672c11337a.bundle.js +0 -1
  207. package/dist/45.c7588a46eb35e1030511.bundle.js +0 -1
  208. package/dist/7.83006fb76d213f065ce3.bundle.js +0 -1
  209. package/dist/70.70bb2af41d1cec8e2fa0.bundle.js +0 -1
  210. package/dist/81.6abcbb0a4f0c5371da19.bundle.js +0 -1
  211. package/dist/82.3a7ddfc6c1efaf493f3f.bundle.js +0 -1
  212. package/dist/9.c92dd64e96b478a92d2e.bundle.js +0 -1
  213. package/dist/96.701d4c87469fd1ae6073.bundle.js +0 -1
  214. package/dist/98.9ce0dc28adca0979eac7.bundle.js +0 -1
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[127],{91:function(t,r,e){"use strict";e.r(r);e(39);function n(t,r,e,n,o){return{addLocation:function(){let t;return e.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationFromClusterCtrl"}).result.then(e=>(t=e,t.isLocal=!1,t.endpoint=t.uri,function(t){let e;return n.addLocation(t).catch(t=>{const e=getError(t.data,t.status);return r.error(e,o.instant("common.error")),!1}).then(t=>!!t&&a()).then(r=>{if(!1!==r)return e=r.find(r=>r.endpoint===t.uri),e})}(t)))},getLocationsWithRpcAddresses:a};function a(){return n.getLocations().then((function(t){return t.data.map(t=>({isLocal:t.local,endpoint:t.uri,rpcAddress:t.rpcAddress||"",error:t.errorMsg}))})).catch((function(t){const e=getError(t.data,t.status);r.error(e,o.instant("common.error"))})).then(t=>{if(t)return function(t){const r=t.filter(t=>!t.isLocal&&!t.error).map(t=>function(t){return n.getLocationRpcAddress(t.endpoint)}(t).then(r=>(t.rpcAddress=r.data,t.isAvailable=!0,t)).catch(r=>{t.isAvailable=!1,t.error=getError(r.data,r.status)}));return Promise.allSettled(r).then(()=>t)}(t)})}}angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[127],{90:function(t,r,e){"use strict";e.r(r);e(39);function n(t,r,e,n,o){return{addLocation:function(){let t;return e.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationFromClusterCtrl"}).result.then(e=>(t=e,t.isLocal=!1,t.endpoint=t.uri,function(t){let e;return n.addLocation(t).catch(t=>{const e=getError(t.data,t.status);return r.error(e,o.instant("common.error")),!1}).then(t=>!!t&&a()).then(r=>{if(!1!==r)return e=r.find(r=>r.endpoint===t.uri),e})}(t)))},getLocationsWithRpcAddresses:a};function a(){return n.getLocations().then((function(t){return t.data.map(t=>({isLocal:t.local,endpoint:t.uri,rpcAddress:t.rpcAddress||"",error:t.errorMsg}))})).catch((function(t){const e=getError(t.data,t.status);r.error(e,o.instant("common.error"))})).then(t=>{if(t)return function(t){const r=t.filter(t=>!t.isLocal&&!t.error).map(t=>function(t){return n.getLocationRpcAddress(t.endpoint)}(t).then(r=>(t.rpcAddress=r.data,t.isAvailable=!0,t)).catch(r=>{t.isAvailable=!1,t.error=getError(r.data,r.status)}));return Promise.allSettled(r).then(()=>t)}(t)})}}angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[128],{99:function(e,n,o){"use strict";function t(e,n,o,t,r){e.JSONLDModes=[{name:"framed",link:"http://www.w3.org/ns/json-ld#framed"},{name:"expanded",link:"http://www.w3.org/ns/json-ld#expanded"},{name:"flattened",link:"http://www.w3.org/ns/json-ld#flattened"},{name:"compacted",link:"http://www.w3.org/ns/json-ld#compacted"}],e.JSONLDModesNames=e.JSONLDModes.reduce((function(e,n){return e[n.name]=n.name,e}),{}),e.JSONLDFramedModes=[e.JSONLDModesNames.framed],e.JSONLDContextModes=[e.JSONLDModesNames.compacted,e.JSONLDModesNames.flattened],e.defaultMode=e.JSONLDModes.find(e=>"expanded"===e.name),e.currentMode=e.defaultMode,e.link=null,e.fileFormat=r.toLowerCase(),e.setJSONLDSettingsToLocalStorage=function(e,n,r){o.set(t.JSONLD_EXPORT_SETTINGS,JSON.stringify({jsonldFormName:e,jsonldFormLink:n,jsonldLink:r}))},e.cancel=function(){n.dismiss()},e.reset=function(){e.currentMode=e.defaultMode,e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.clearLinkInput=function(){e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.exportJsonLD=function(){e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link),n.close({currentMode:e.currentMode,link:e.link})};!function(){const n=o.get(t.JSONLD_EXPORT_SETTINGS);n&&(e.currentMode=e.JSONLDModes.find(e=>e.name===n.jsonldFormName),e.link=n.jsonldLink)}()}o.r(n),o.d(n,"ExportSettingsCtrl",(function(){return t})),angular.module("graphdb.framework.core.components.export-settings-modal",["graphdb.framework.utils.localstorageadapter"]).controller("ExportSettingsCtrl",t),t.$inject=["$scope","$uibModalInstance","LocalStorageAdapter","LSKeys","format"]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[129],{184:function(e,t){function i(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,i,n){const o={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:n.fitTextMin||"inherit",max:n.fitTextMax||"inherit",calcSize:10,lines:1},a=i.parent(),c=i[0],l=c.style,f=window.getComputedStyle(i[0],null),r=i.children().length||o.lines,s="inherit"===o.min?f["font-size"]:o.min,d="inherit"===o.max?f["font-size"]:o.max,p=f["line-height"],u=f.display;let h;function m(){const e=o.calcSize*r/c.offsetWidth/r;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(a[0]).paddingLeft),i=parseFloat(getComputedStyle(a[0]).paddingRight);return(a[0].offsetWidth-(t+i))*e*o.compressor}(e),parseFloat(d)),parseFloat(s))}function w(){h&&e.cancel(h),h=e((function(){c.offsetHeight*c.offsetWidth!=0&&(l.fontSize=o.calcSize+"px",l.lineHeight="1",l.display="inline-block",l.fontSize=m()+"px",l.lineHeight=p,l.display=u)}),o.loadDelay)}t.$watch((function(){return[a[0].offsetWidth,i[0].offsetWidth].join("_")}),(function(){w()})),$(window).on("resize",o.debounce((function(){t.$apply(w)}),o.delay)),t.$on("$destroy",(function(){h&&e.cancel(h),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",i),i.$inject=["$timeout"]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[129],{182:function(e,t){function i(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,i,n){const o={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:n.fitTextMin||"inherit",max:n.fitTextMax||"inherit",calcSize:10,lines:1},a=i.parent(),c=i[0],l=c.style,f=window.getComputedStyle(i[0],null),r=i.children().length||o.lines,s="inherit"===o.min?f["font-size"]:o.min,d="inherit"===o.max?f["font-size"]:o.max,p=f["line-height"],u=f.display;let h;function m(){const e=o.calcSize*r/c.offsetWidth/r;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(a[0]).paddingLeft),i=parseFloat(getComputedStyle(a[0]).paddingRight);return(a[0].offsetWidth-(t+i))*e*o.compressor}(e),parseFloat(d)),parseFloat(s))}function w(){h&&e.cancel(h),h=e((function(){c.offsetHeight*c.offsetWidth!=0&&(l.fontSize=o.calcSize+"px",l.lineHeight="1",l.display="inline-block",l.fontSize=m()+"px",l.lineHeight=p,l.display=u)}),o.loadDelay)}t.$watch((function(){return[a[0].offsetWidth,i[0].offsetWidth].join("_")}),(function(){w()})),$(window).on("resize",o.debounce((function(){t.$apply(w)}),o.delay)),t.$on("$destroy",(function(){h&&e.cancel(h),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",i),i.$inject=["$timeout"]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[12,37,54,67,215,223,234,235,236,237,240,300],{122:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityQueryType",(function(){return r}));const r={DATA:"DATA",SEARCH:"SEARCH",ANALOGICAL:"ANALOGICAL"}},247:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexError",(function(){return r}));class r extends Error{}},248:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexInfo",(function(){return y}));var r=t(78),n=t(122),s=t(70);const a=new RegExp("^[a-zA-Z0-9-_]+$");class y{constructor(){this.similarityIndex=new r.SimilarityIndex,this.isNameExist=!1,this.invalidSelectQueryType=!1,this.invalidSelectQuery=!1,this.invalidSearchQueryType=!1,this.invalidSearchQuery=!1,this.invalidAnalogicalQueryType=!1,this.invalidAnalogicalQuery=!1,this.selectedQueryType=n.SimilarityQueryType.DATA,this.selectedYasguiRenderMode=s.RenderingMode.YASQE}setQuery(e,i){const t=i||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.similarityIndex.analogicalQuery=e):this.similarityIndex.searchQuery=e:this.similarityIndex.selectQuery=e}getQuery(e){switch(e||this.selectedQueryType){case n.SimilarityQueryType.DATA:return this.similarityIndex.selectQuery;case n.SimilarityQueryType.SEARCH:return this.similarityIndex.searchQuery;case n.SimilarityQueryType.ANALOGICAL:return this.similarityIndex.analogicalQuery}}markInvalidQuery(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQuery=i):this.invalidSearchQuery=i:this.invalidSelectQuery=i}markInvalidQueryType(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQueryType=i):this.invalidSearchQueryType=i:this.invalidSelectQueryType=i}setSelectedQueryType(e){this.selectedQueryType=e}getSelectedQueryType(){return this.selectedQueryType}setSelectedYasguiRenderMode(e){this.selectedYasguiRenderMode=e}getSelectedYasguiRenderMode(){return this.selectedYasguiRenderMode}isDataQueryTypeSelected(){return n.SimilarityQueryType.DATA===this.selectedQueryType}isSearchQueryTypeSelected(){return n.SimilarityQueryType.SEARCH===this.selectedQueryType}isAnalogicalQueryTypeSelected(){return n.SimilarityQueryType.ANALOGICAL===this.selectedQueryType}isTextType(){return this.similarityIndex.isTextType()}isPredicationType(){return this.similarityIndex.isPredicationType()}isTextLiteralType(){return this.similarityIndex.isTextLiteralType()}hasName(){return!!this.similarityIndex.name}isNameValid(){return a.test(this.similarityIndex.name)}hasSelectQuery(){return!!this.similarityIndex.selectQuery}hasSearchQuery(){return!!this.similarityIndex.searchQuery}hasAnalogicalQuery(){return!!this.similarityIndex.analogicalQuery}isYasqeRenderMode(){return s.RenderingMode.YASQE===this.getSelectedYasguiRenderMode()}isYasrRenderMode(){return s.RenderingMode.YASR===this.getSelectedYasguiRenderMode()}getName(){return this.similarityIndex.name}setName(e){this.similarityIndex.name=e}setInputIndex(e){this.similarityIndex.inputIndex=e}getInputIndex(){return this.similarityIndex.inputIndex}setLiteralIndex(e=!1){this.similarityIndex.isLiteralIndex=e}getSimilarityIndex(){return this.similarityIndex}setStopList(e){this.similarityIndex.stopList=e}getStopList(){return this.similarityIndex.stopList}setAnalyzer(e="org.apache.lucene.analysis.en.EnglishAnalyzer"){this.similarityIndex.analyzer=e}getAnalyzer(){return this.similarityIndex.analyzer}setType(e){this.similarityIndex.type=e}getType(){return this.similarityIndex.type}setOptions(e){this.similarityIndex.options=e}getOptions(){return this.similarityIndex.options}getInference(){return this.similarityIndex.infer}getSameAs(){return this.similarityIndex.sameAs}}},249:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityViewMode",(function(){return r}));const r={CREATE:"CREATE",EDIT:"EDIT",CLONE:"CLONE"}},278:function(e,i,t){"use strict";t.r(i);t(80),t(11),t(16);var r=t(84),n=t(15),s=t(70),a=t(77),y=t(249),o=t(122),l=t(73),d=t(247),u=t(109),c=t(248);function I(e,i,t,I,m,S,p,h,T,x,g,Q,E,A,f,v){e.productInfo=h,e.SimilarityQueryType=o.SimilarityQueryType,e.SimilarityIndexType=l.SimilarityIndexType,e.similarityIndexInfo=void 0,e.samples=void 0,e.yasguiConfig=void 0,e.saveOrUpdateExecuted=!1,e.loadingControllerResources=!1,e.helpHidden=1===g.get(Q.HIDE_SIMILARITY_HELP);let R=!1,L=void 0,w=void 0,C=void 0,M=y.SimilarityViewMode.CREATE;e.changeSimilarityIndexType=(i,t=o.SimilarityQueryType.DATA)=>{e.similarityIndexInfo.setType(i),e.similarityIndexInfo.isPredicationType()?e.samples=w[l.SimilarityIndexType.PREDICATION]:e.samples=w[l.SimilarityIndexType.TEXT],e.changeQueryTab(t).then(i=>{P(e.similarityIndexInfo),e.setEditorQuery(e.similarityIndexInfo.getQuery())})},e.changeQueryTab=i=>{const t=e.similarityIndexInfo.getSelectedQueryType();return t===i?Promise.resolve():(e.similarityIndexInfo.setSelectedQueryType(i),D(e.similarityIndexInfo,t).then(e=>Z(e,t)).then(e=>K(e,t)).catch(e=>{e instanceof d.SimilarityIndexError||console.log(e)}).finally(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode()),e.similarityIndexInfo.isDataQueryTypeSelected()?i.showYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]):i.hideYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]),i.setQuery(e.similarityIndexInfo.getQuery())}))},e.createSimilarityIndex=()=>{e.saveOrUpdateExecuted=!0,D(e.similarityIndexInfo).then(Z).then(K).then(z).then(k).then(e=>_(e.getSimilarityIndex())).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.could.not.get.indexes.error"))})},e.viewQuery=()=>{D(e.similarityIndexInfo).then(z).then(N).then(O).catch(e=>i.error(getError(e)))},e.preview=()=>{D(e.similarityIndexInfo).then(K).then(Z).then(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASR),i.query(e.similarityIndexInfo.getSelectedYasguiRenderMode())})},e.saveSearchQuery=function(){e.saveOrUpdateExecuted=!0,R||V(),e.saveOrUpdateExecuted=!0,D(e.similarityIndexInfo).then(F).then(Z).then(K).then(X).then(J).then(b).then(U).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.change.query.error"))})},e.setEditorQuery=i=>{e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1),e.yasguiConfig?H().setQuery(i):q({initialQuery:i||" "})},e.similarityIndexNameChanged=()=>{e.setDirty(),e.similarityIndexInfo.isNameExist=!1},e.queryChanged=()=>{e.setDirty(),e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1)},e.isCloneViewMode=()=>y.SimilarityViewMode.CLONE===M,e.isEditViewMode=()=>y.SimilarityViewMode.EDIT===M,e.isCreateViewMode=()=>y.SimilarityViewMode.CREATE===M,e.setDirty=()=>{R=!0},e.isYasqeShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasqeRenderMode(),e.isYasrShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasrRenderMode(),e.showEditor=()=>{const i=H();i.abortQuery().then(()=>i.setQuery(e.similarityIndexInfo.getQuery())).then(()=>(e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode())))},e.toggleHelp=i=>{void 0===i&&(i=g.get(Q.HIDE_SIMILARITY_HELP)),1!==i?(g.set(Q.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(g.set(Q.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.getCloseBtnMsg=function(){let i=e.editSearchQuery?E.instant("similarity.query.edition.msg"):E.instant("similarity.index.creation.msg");return E.instant("similarity.close.btn.msg",{operation:i})},e.hasQueryError=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();return o.SimilarityQueryType.DATA===i?e.hasSelectQueryError():o.SimilarityQueryType.SEARCH===i?e.hasSearchQueryError():o.SimilarityQueryType.ANALOGICAL===i&&e.hasAnalogicalQueryError()},e.hasSelectQueryError=()=>!e.similarityIndexInfo.hasSelectQuery()||e.similarityIndexInfo.invalidSelectQuery||e.similarityIndexInfo.invalidSelectQueryType,e.hasSearchQueryError=()=>!e.similarityIndexInfo.hasSearchQuery()||e.similarityIndexInfo.invalidSearchQuery||e.similarityIndexInfo.invalidSearchQueryType,e.hasAnalogicalQueryError=()=>!e.similarityIndexInfo.hasAnalogicalQuery()||e.similarityIndexInfo.invalidAnalogicalQuery||e.similarityIndexInfo.invalidAnalogicalQueryType,e.getQueryErrorMessage=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();let t=!1,r=!1,n=!1;o.SimilarityQueryType.DATA===i?(t=!e.similarityIndexInfo.hasSelectQuery(),r=e.similarityIndexInfo.invalidSelectQueryType,n=e.similarityIndexInfo.invalidSelectQuery):o.SimilarityQueryType.SEARCH===i?(t=!e.similarityIndexInfo.hasSearchQuery(),r=e.similarityIndexInfo.invalidSearchQueryType,n=e.similarityIndexInfo.invalidSearchQuery):o.SimilarityQueryType.ANALOGICAL===i&&(t=!e.similarityIndexInfo.hasAnalogicalQuery(),r=e.similarityIndexInfo.invalidAnalogicalQueryType,n=e.similarityIndexInfo.invalidAnalogicalQuery);const s={queryType:E.instant(`similarity.query.type.${i}.name`)};return t?E.instant("similarity.error.query.empty",s):n?E.instant("similarity.error.query.invalid",s):r?E.instant("similarity.error.query.invalid_type",s):""};const D=(e,i)=>H().getQuery().then(t=>e.setQuery(t,i)).then(()=>e),N=e=>m.getQuery({indexName:e.getName(),indexOptions:e.getOptions(),query:e.getQuery(),indexStopList:e.getStopList(),queryInference:e.getInference(),querySameAs:e.getSameAs(),viewType:e.getSelectedQueryType(),indexAnalyzer:e.getAnalyzer()}).then(e=>e.data),O=e=>{e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},P=i=>{const t=i.getType();if(!e.isEditViewMode()&&L&&(i.setQuery(L[t],o.SimilarityQueryType.SEARCH),i.setQuery(L.analogical,o.SimilarityQueryType.ANALOGICAL)),w)if(l.SimilarityIndexType.PREDICATION===t){const e=w[l.SimilarityIndexType.PREDICATION].predication;i.setQuery(e,o.SimilarityQueryType.DATA)}else{const e=w[l.SimilarityIndexType.TEXT].literals;i.setQuery(e,o.SimilarityQueryType.DATA)}},Y=()=>{const t=new c.SimilarityIndexInfo;t.setName(G()),t.setType(j()),t.setSelectedQueryType(e.isEditViewMode()?o.SimilarityQueryType.SEARCH:o.SimilarityQueryType.DATA);const n=p.search().options;n?t.setOptions(n):t.setOptions(t.isTextType()?"-termweight idf":""),P(t);const s=p.search().searchQuery;s&&t.setQuery(s,o.SimilarityQueryType.SEARCH);const a=p.search().selectQuery;a&&t.setQuery(a,o.SimilarityQueryType.DATA);const y=p.search().analogicalQuery;if(y&&t.setQuery(y,o.SimilarityQueryType.ANALOGICAL),t.isTextType()){t.setStopList(p.search().stopList),t.setAnalyzer(p.search().analyzer);const e=$(t.getSimilarityIndex(),"-literal_index");void 0!==e&&t.setLiteralIndex(e)}return t.isPredicationType()?m.getIndexes().then(i=>{const n=Object(r.mapIndexesResponseToSimilarityIndex)(i.data).filter(e=>e.isTextLiteralType()&&(e.isBuiltStatus()||e.isOutdatedStatus())).map(e=>e.name);if(e.literalIndexes=["no-index"].concat(n),void 0===t.getInputIndex()){const i=$(t.getSimilarityIndex(),"-input_index");if(void 0!==i)for(let r=0;r<e.literalIndexes.length;r++)i===e.literalIndexes[r]&&t.setInputIndex(e.literalIndexes[r])}return void 0===t.getInputIndex()&&t.setInputIndex(e.literalIndexes[0]),t}).catch((function(e){const t=getError(e);i.error(t,E.instant("similarity.could.not.get.indexes.error"))})):Promise.resolve(t)},q=i=>{const t={endpoint:B,componentId:"create-index",showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,showYasqeResizer:!1,pageSize:100,prefixes:C,render:e.similarityIndexInfo.getSelectedYasguiRenderMode(),yasqeActionButtons:e.isEditViewMode()||!e.similarityIndexInfo.isDataQueryTypeSelected()?n.DISABLE_YASQE_BUTTONS_CONFIGURATION:n.INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,maxPersistentResponseSize:0,yasqeMode:e.canWriteActiveRepo()?a.YasqeMode.WRITE:a.YasqeMode.PROTECTED},r={};angular.extend(r,t,i),e.yasguiConfig=r},B=()=>"repositories/"+A.getActiveRepository(),_=t=>{if(void 0!==e.literalIndexes){const i=t.inputIndex;i!==e.literalIndexes[0]&&(t.options=t.options+(""===t.options?"":" ")+"-input_index "+i)}return"true"===t.isLiteralIndex&&(t.options=t.options+(""===t.options?"":" ")+"-literal_index true",t.type=l.SimilarityIndexType.TEXT_LITERAL),V(),R=!1,m.createIndex("POST",t.name,t.options,t.selectQuery,t.searchQuery,t.isPredicationType()?t.analogicalQuery:"",t.stopList,t.infer,t.sameAs,t.type,t.analyzer).then(()=>(i.success(E.instant("similarity.create.index.successfully")),t)).catch((function(e){const t=getError(e);return i.error(t,E.instant("similarity.create.index.error")),console.log(t),Promise.reject(new d.SimilarityIndexError("Could not create index."))}))},U=async e=>{await T.showToastMessageWithDelay(e?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg"),p.url("similarity")},b=e=>{const i=e.isSearchQueryTypeSelected();let t={name:e.getSimilarityIndex().name,changedQuery:e.getQuery(),isSearchQuery:i};return m.saveSearchQuery(JSON.stringify(t)).then(()=>(R=!1,i))},V=()=>{setTimeout(()=>p.url("similarity"),100)},H=()=>n.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),G=()=>{const i=p.search().name||"";return e.isCloneViewMode()?`${E.instant("similarity.copy_of.prefix")}_${i}`:i},j=()=>{const e=p.search().type;return void 0===e||e.startsWith("text")?l.SimilarityIndexType.TEXT:e},$=(e,i)=>{const t=e.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===i&&r+1<t.length){const i=t[r+1];return delete t[r],delete t[r+1],e.options=t.join(" "),i}},z=e=>Promise.all([F(e).then(W).then(X).then(J).then(K).then(Z)]).then(()=>e),k=e=>m.getIndexes().then(i=>i.data.some(i=>i.name===e.getName())?(e.isNameExist=!0,Promise.reject(new d.SimilarityIndexError("Similarity index name exists."))):e),F=e=>e.getSimilarityIndex().name?e.isNameValid()?Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Invalid similarity name.")):Promise.reject(new d.SimilarityIndexError("Missing similarity name.")),W=e=>e.hasSelectQuery()?e.invalidSelectQuery?Promise.reject(new d.SimilarityIndexError("Invalid select query")):e.invalidSelectQueryType?Promise.reject(new d.SimilarityIndexError("Invalid select query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing select query.")),X=e=>e.hasSearchQuery()?e.invalidSearchQuery?Promise.reject(new d.SimilarityIndexError("Invalid search query")):e.invalidSearchQueryType?Promise.reject(new d.SimilarityIndexError("Invalid search query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing search query.")),J=e=>e.isPredicationType()&&!e.hasAnalogicalQuery()?Promise.reject(new d.SimilarityIndexError("Missing analogical query.")):e.invalidAnalogicalQuery?Promise.reject(new d.SimilarityIndexError("Invalid analogical query")):e.invalidAnalogicalQueryType?Promise.reject(new d.SimilarityIndexError("Invalid analogical query type")):Promise.resolve(e),K=(e,i)=>H().getQueryType().then(t=>u.QueryType.SELECT!==t?(e.markInvalidQueryType(i),Promise.reject(new d.SimilarityIndexError("Query type is not valid."))):(e.markInvalidQueryType(i,!1),e)),Z=(e,i)=>H().isQueryValid().then(t=>t?(e.markInvalidQuery(i,!1),e):(e.markInvalidQuery(i),Promise.reject(new d.SimilarityIndexError("Query is not valid.")))),ee=(e,i,t,r)=>{v.openSimpleModal({title:e,message:i,warning:!0}).result.then((function(){angular.isFunction(t)&&t()}),(function(){angular.isFunction(r)&&r()}))},ie=()=>{e.isYasrShown()&&e.similarityIndexInfo.isDataQueryTypeSelected()&&e.showEditor(),e.canEditActiveRepo=e.canWriteActiveRepo();const i={...e.yasguiConfig,yasqeMode:e.canWriteActiveRepo()};q(i)},te=e=>{R&&(e.returnValue=!0)},re=()=>{window.removeEventListener("beforeunload",te),ne.forEach(e=>e())},ne=[];ne.push(f.subscribe("repositoryWillChangeEvent",i=>new Promise((function(t){if(e.isCreateViewMode()||e.isCloneViewMode())return void t(i);const r=()=>{R=!1,V(),t(i)};if(R){const e=()=>{i.cancel=!0,t(i)},n=E.instant("common.confirm"),s=E.instant("similarity.warning.unsaved.changes");ee(n,s,r,e)}else r()})))),ne.push(e.$on("$locationChangeStart",(e,i)=>{if(R){e.preventDefault();const t=E.instant("common.confirm"),r=E.instant("similarity.warning.unsaved.changes");ee(t,r,()=>{re();const e=p.absUrl().length-p.url().length,t=i.substring(e);p.path(t)})}else re()})),ne.push(e.$on("$destroy",re)),window.addEventListener("beforeunload",te),M=(()=>{if(void 0===p.search().name)return y.SimilarityViewMode.CREATE;const e=p.search().editSearchQuery;return void 0===e?y.SimilarityViewMode.CLONE:"string"==typeof e?"false"===e?y.SimilarityViewMode.CLONE:y.SimilarityViewMode.EDIT:e?y.SimilarityViewMode.EDIT:y.SimilarityViewMode.CLONE})();const se=e.$watch((function(){return e.getActiveRepositoryObject()}),(function(i){i&&(e.loadingControllerResources=!0,Promise.all([m.getSearchQueries(),m.getSamples(),A.getPrefixes(i.id)]).then(([i,t,r])=>{e.canEditActiveRepo=e.canWriteActiveRepo(),L=i?i.data:[],w=t?t.data:[],C=r,Y().then(i=>{e.similarityIndexInfo=i;let t=o.SimilarityQueryType.DATA;e.isEditViewMode()&&(t=o.SimilarityQueryType.SEARCH),e.changeSimilarityIndexType(i.getType(),t)})}).catch(i=>{console.log(i),e.repositoryError=getError(i)}).finally(()=>{ne.push(e.$on("repositoryIsSet",ie)),se(),e.loadingControllerResources=!1}))}))}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",I),I.$inject=["$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService"]},70:function(e,i,t){"use strict";t.r(i),t.d(i,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},73:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexType",(function(){return r}));const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},74:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexStatus",(function(){return r}));const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},77:function(e,i,t){"use strict";t.r(i),t.d(i,"YasqeMode",(function(){return r}));const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},78:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndex",(function(){return s}));var r=t(73),n=t(74);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return n.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return n.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return n.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return n.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return n.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return n.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return n.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return n.SimilarityIndexStatus.isFailedStatus(this.status)}}},80:function(e,i){function t(e,i){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(i.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},84:function(e,i,t){"use strict";t.r(i),t.d(i,"mapIndexesResponseToSimilarityIndex",(function(){return n}));var r=t(78);const n=e=>e.map(e=>{const i=new r.SimilarityIndex;return i.type=e.type,i.stopList=e.stopList,i.status=e.status,i.selectQuery=e.selectQuery,i.searchQuery=e.searchQuery,i.sameAs=e.sameAs,i.options=e.options,i.name=e.name,i.infer=e.infer,i.analyzer=e.analyzer,i.analogicalQuery=e.analogicalQuery,i})}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[13,38,54,67,215,223,234,235,236,237,240,300],{122:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityQueryType",(function(){return r}));const r={DATA:"DATA",SEARCH:"SEARCH",ANALOGICAL:"ANALOGICAL"}},247:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexError",(function(){return r}));class r extends Error{}},248:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexInfo",(function(){return y}));var r=t(78),n=t(122),s=t(70);const a=new RegExp("^[a-zA-Z0-9-_]+$");class y{constructor(){this.similarityIndex=new r.SimilarityIndex,this.isNameExist=!1,this.invalidSelectQueryType=!1,this.invalidSelectQuery=!1,this.invalidSearchQueryType=!1,this.invalidSearchQuery=!1,this.invalidAnalogicalQueryType=!1,this.invalidAnalogicalQuery=!1,this.selectedQueryType=n.SimilarityQueryType.DATA,this.selectedYasguiRenderMode=s.RenderingMode.YASQE}setQuery(e,i){const t=i||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.similarityIndex.analogicalQuery=e):this.similarityIndex.searchQuery=e:this.similarityIndex.selectQuery=e}getQuery(e){switch(e||this.selectedQueryType){case n.SimilarityQueryType.DATA:return this.similarityIndex.selectQuery;case n.SimilarityQueryType.SEARCH:return this.similarityIndex.searchQuery;case n.SimilarityQueryType.ANALOGICAL:return this.similarityIndex.analogicalQuery}}markInvalidQuery(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQuery=i):this.invalidSearchQuery=i:this.invalidSelectQuery=i}markInvalidQueryType(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQueryType=i):this.invalidSearchQueryType=i:this.invalidSelectQueryType=i}setSelectedQueryType(e){this.selectedQueryType=e}getSelectedQueryType(){return this.selectedQueryType}setSelectedYasguiRenderMode(e){this.selectedYasguiRenderMode=e}getSelectedYasguiRenderMode(){return this.selectedYasguiRenderMode}isDataQueryTypeSelected(){return n.SimilarityQueryType.DATA===this.selectedQueryType}isSearchQueryTypeSelected(){return n.SimilarityQueryType.SEARCH===this.selectedQueryType}isAnalogicalQueryTypeSelected(){return n.SimilarityQueryType.ANALOGICAL===this.selectedQueryType}isTextType(){return this.similarityIndex.isTextType()}isPredicationType(){return this.similarityIndex.isPredicationType()}isTextLiteralType(){return this.similarityIndex.isTextLiteralType()}hasName(){return!!this.similarityIndex.name}isNameValid(){return a.test(this.similarityIndex.name)}hasSelectQuery(){return!!this.similarityIndex.selectQuery}hasSearchQuery(){return!!this.similarityIndex.searchQuery}hasAnalogicalQuery(){return!!this.similarityIndex.analogicalQuery}isYasqeRenderMode(){return s.RenderingMode.YASQE===this.getSelectedYasguiRenderMode()}isYasrRenderMode(){return s.RenderingMode.YASR===this.getSelectedYasguiRenderMode()}getName(){return this.similarityIndex.name}setName(e){this.similarityIndex.name=e}setInputIndex(e){this.similarityIndex.inputIndex=e}getInputIndex(){return this.similarityIndex.inputIndex}setLiteralIndex(e=!1){this.similarityIndex.isLiteralIndex=e}getSimilarityIndex(){return this.similarityIndex}setStopList(e){this.similarityIndex.stopList=e}getStopList(){return this.similarityIndex.stopList}setAnalyzer(e="org.apache.lucene.analysis.en.EnglishAnalyzer"){this.similarityIndex.analyzer=e}getAnalyzer(){return this.similarityIndex.analyzer}setType(e){this.similarityIndex.type=e}getType(){return this.similarityIndex.type}setOptions(e){this.similarityIndex.options=e}getOptions(){return this.similarityIndex.options}getInference(){return this.similarityIndex.infer}getSameAs(){return this.similarityIndex.sameAs}}},249:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityViewMode",(function(){return r}));const r={CREATE:"CREATE",EDIT:"EDIT",CLONE:"CLONE"}},278:function(e,i,t){"use strict";t.r(i);t(80),t(11),t(16);var r=t(84),n=t(15),s=t(70),a=t(76),y=t(249),o=t(122),l=t(73),d=t(247),u=t(108),c=t(248);function I(e,i,t,I,m,S,p,h,T,x,g,Q,E,A,f,v){e.productInfo=h,e.SimilarityQueryType=o.SimilarityQueryType,e.SimilarityIndexType=l.SimilarityIndexType,e.similarityIndexInfo=void 0,e.samples=void 0,e.yasguiConfig=void 0,e.saveOrUpdateExecuted=!1,e.loadingControllerResources=!1,e.helpHidden=1===g.get(Q.HIDE_SIMILARITY_HELP);let R=!1,L=void 0,w=void 0,C=void 0,M=y.SimilarityViewMode.CREATE;e.changeSimilarityIndexType=(i,t=o.SimilarityQueryType.DATA)=>{e.similarityIndexInfo.setType(i),e.similarityIndexInfo.isPredicationType()?e.samples=w[l.SimilarityIndexType.PREDICATION]:e.samples=w[l.SimilarityIndexType.TEXT],e.changeQueryTab(t).then(i=>{P(e.similarityIndexInfo),e.setEditorQuery(e.similarityIndexInfo.getQuery())})},e.changeQueryTab=i=>{const t=e.similarityIndexInfo.getSelectedQueryType();return t===i?Promise.resolve():(e.similarityIndexInfo.setSelectedQueryType(i),D(e.similarityIndexInfo,t).then(e=>Z(e,t)).then(e=>K(e,t)).catch(e=>{e instanceof d.SimilarityIndexError||console.log(e)}).finally(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode()),e.similarityIndexInfo.isDataQueryTypeSelected()?i.showYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]):i.hideYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]),i.setQuery(e.similarityIndexInfo.getQuery())}))},e.createSimilarityIndex=()=>{e.saveOrUpdateExecuted=!0,D(e.similarityIndexInfo).then(Z).then(K).then(z).then(k).then(e=>_(e.getSimilarityIndex())).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.could.not.get.indexes.error"))})},e.viewQuery=()=>{D(e.similarityIndexInfo).then(z).then(N).then(O).catch(e=>i.error(getError(e)))},e.preview=()=>{D(e.similarityIndexInfo).then(K).then(Z).then(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASR),i.query(e.similarityIndexInfo.getSelectedYasguiRenderMode())})},e.saveSearchQuery=function(){e.saveOrUpdateExecuted=!0,R||V(),e.saveOrUpdateExecuted=!0,D(e.similarityIndexInfo).then(F).then(Z).then(K).then(X).then(J).then(b).then(U).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.change.query.error"))})},e.setEditorQuery=i=>{e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1),e.yasguiConfig?H().setQuery(i):q({initialQuery:i||" "})},e.similarityIndexNameChanged=()=>{e.setDirty(),e.similarityIndexInfo.isNameExist=!1},e.queryChanged=()=>{e.setDirty(),e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1)},e.isCloneViewMode=()=>y.SimilarityViewMode.CLONE===M,e.isEditViewMode=()=>y.SimilarityViewMode.EDIT===M,e.isCreateViewMode=()=>y.SimilarityViewMode.CREATE===M,e.setDirty=()=>{R=!0},e.isYasqeShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasqeRenderMode(),e.isYasrShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasrRenderMode(),e.showEditor=()=>{const i=H();i.abortQuery().then(()=>i.setQuery(e.similarityIndexInfo.getQuery())).then(()=>(e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode())))},e.toggleHelp=i=>{void 0===i&&(i=g.get(Q.HIDE_SIMILARITY_HELP)),1!==i?(g.set(Q.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(g.set(Q.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.getCloseBtnMsg=function(){let i=e.editSearchQuery?E.instant("similarity.query.edition.msg"):E.instant("similarity.index.creation.msg");return E.instant("similarity.close.btn.msg",{operation:i})},e.hasQueryError=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();return o.SimilarityQueryType.DATA===i?e.hasSelectQueryError():o.SimilarityQueryType.SEARCH===i?e.hasSearchQueryError():o.SimilarityQueryType.ANALOGICAL===i&&e.hasAnalogicalQueryError()},e.hasSelectQueryError=()=>!e.similarityIndexInfo.hasSelectQuery()||e.similarityIndexInfo.invalidSelectQuery||e.similarityIndexInfo.invalidSelectQueryType,e.hasSearchQueryError=()=>!e.similarityIndexInfo.hasSearchQuery()||e.similarityIndexInfo.invalidSearchQuery||e.similarityIndexInfo.invalidSearchQueryType,e.hasAnalogicalQueryError=()=>!e.similarityIndexInfo.hasAnalogicalQuery()||e.similarityIndexInfo.invalidAnalogicalQuery||e.similarityIndexInfo.invalidAnalogicalQueryType,e.getQueryErrorMessage=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();let t=!1,r=!1,n=!1;o.SimilarityQueryType.DATA===i?(t=!e.similarityIndexInfo.hasSelectQuery(),r=e.similarityIndexInfo.invalidSelectQueryType,n=e.similarityIndexInfo.invalidSelectQuery):o.SimilarityQueryType.SEARCH===i?(t=!e.similarityIndexInfo.hasSearchQuery(),r=e.similarityIndexInfo.invalidSearchQueryType,n=e.similarityIndexInfo.invalidSearchQuery):o.SimilarityQueryType.ANALOGICAL===i&&(t=!e.similarityIndexInfo.hasAnalogicalQuery(),r=e.similarityIndexInfo.invalidAnalogicalQueryType,n=e.similarityIndexInfo.invalidAnalogicalQuery);const s={queryType:E.instant(`similarity.query.type.${i}.name`)};return t?E.instant("similarity.error.query.empty",s):n?E.instant("similarity.error.query.invalid",s):r?E.instant("similarity.error.query.invalid_type",s):""};const D=(e,i)=>H().getQuery().then(t=>e.setQuery(t,i)).then(()=>e),N=e=>m.getQuery({indexName:e.getName(),indexOptions:e.getOptions(),query:e.getQuery(),indexStopList:e.getStopList(),queryInference:e.getInference(),querySameAs:e.getSameAs(),viewType:e.getSelectedQueryType(),indexAnalyzer:e.getAnalyzer()}).then(e=>e.data),O=e=>{e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},P=i=>{const t=i.getType();if(!e.isEditViewMode()&&L&&(i.setQuery(L[t],o.SimilarityQueryType.SEARCH),i.setQuery(L.analogical,o.SimilarityQueryType.ANALOGICAL)),w)if(l.SimilarityIndexType.PREDICATION===t){const e=w[l.SimilarityIndexType.PREDICATION].predication;i.setQuery(e,o.SimilarityQueryType.DATA)}else{const e=w[l.SimilarityIndexType.TEXT].literals;i.setQuery(e,o.SimilarityQueryType.DATA)}},Y=()=>{const t=new c.SimilarityIndexInfo;t.setName(G()),t.setType(j()),t.setSelectedQueryType(e.isEditViewMode()?o.SimilarityQueryType.SEARCH:o.SimilarityQueryType.DATA);const n=p.search().options;n?t.setOptions(n):t.setOptions(t.isTextType()?"-termweight idf":""),P(t);const s=p.search().searchQuery;s&&t.setQuery(s,o.SimilarityQueryType.SEARCH);const a=p.search().selectQuery;a&&t.setQuery(a,o.SimilarityQueryType.DATA);const y=p.search().analogicalQuery;if(y&&t.setQuery(y,o.SimilarityQueryType.ANALOGICAL),t.isTextType()){t.setStopList(p.search().stopList),t.setAnalyzer(p.search().analyzer);const e=$(t.getSimilarityIndex(),"-literal_index");void 0!==e&&t.setLiteralIndex(e)}return t.isPredicationType()?m.getIndexes().then(i=>{const n=Object(r.mapIndexesResponseToSimilarityIndex)(i.data).filter(e=>e.isTextLiteralType()&&(e.isBuiltStatus()||e.isOutdatedStatus())).map(e=>e.name);if(e.literalIndexes=["no-index"].concat(n),void 0===t.getInputIndex()){const i=$(t.getSimilarityIndex(),"-input_index");if(void 0!==i)for(let r=0;r<e.literalIndexes.length;r++)i===e.literalIndexes[r]&&t.setInputIndex(e.literalIndexes[r])}return void 0===t.getInputIndex()&&t.setInputIndex(e.literalIndexes[0]),t}).catch((function(e){const t=getError(e);i.error(t,E.instant("similarity.could.not.get.indexes.error"))})):Promise.resolve(t)},q=i=>{const t={endpoint:B,componentId:"create-index",showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,showYasqeResizer:!1,pageSize:100,prefixes:C,render:e.similarityIndexInfo.getSelectedYasguiRenderMode(),yasqeActionButtons:e.isEditViewMode()||!e.similarityIndexInfo.isDataQueryTypeSelected()?n.DISABLE_YASQE_BUTTONS_CONFIGURATION:n.INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,maxPersistentResponseSize:0,yasqeMode:e.canWriteActiveRepo()?a.YasqeMode.WRITE:a.YasqeMode.PROTECTED},r={};angular.extend(r,t,i),e.yasguiConfig=r},B=()=>"repositories/"+A.getActiveRepository(),_=t=>{if(void 0!==e.literalIndexes){const i=t.inputIndex;i!==e.literalIndexes[0]&&(t.options=t.options+(""===t.options?"":" ")+"-input_index "+i)}return"true"===t.isLiteralIndex&&(t.options=t.options+(""===t.options?"":" ")+"-literal_index true",t.type=l.SimilarityIndexType.TEXT_LITERAL),V(),R=!1,m.createIndex("POST",t.name,t.options,t.selectQuery,t.searchQuery,t.isPredicationType()?t.analogicalQuery:"",t.stopList,t.infer,t.sameAs,t.type,t.analyzer).then(()=>(i.success(E.instant("similarity.create.index.successfully")),t)).catch((function(e){const t=getError(e);return i.error(t,E.instant("similarity.create.index.error")),console.log(t),Promise.reject(new d.SimilarityIndexError("Could not create index."))}))},U=async e=>{await T.showToastMessageWithDelay(e?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg"),p.url("similarity")},b=e=>{const i=e.isSearchQueryTypeSelected();let t={name:e.getSimilarityIndex().name,changedQuery:e.getQuery(),isSearchQuery:i};return m.saveSearchQuery(JSON.stringify(t)).then(()=>(R=!1,i))},V=()=>{setTimeout(()=>p.url("similarity"),100)},H=()=>n.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),G=()=>{const i=p.search().name||"";return e.isCloneViewMode()?`${E.instant("similarity.copy_of.prefix")}_${i}`:i},j=()=>{const e=p.search().type;return void 0===e||e.startsWith("text")?l.SimilarityIndexType.TEXT:e},$=(e,i)=>{const t=e.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===i&&r+1<t.length){const i=t[r+1];return delete t[r],delete t[r+1],e.options=t.join(" "),i}},z=e=>Promise.all([F(e).then(W).then(X).then(J).then(K).then(Z)]).then(()=>e),k=e=>m.getIndexes().then(i=>i.data.some(i=>i.name===e.getName())?(e.isNameExist=!0,Promise.reject(new d.SimilarityIndexError("Similarity index name exists."))):e),F=e=>e.getSimilarityIndex().name?e.isNameValid()?Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Invalid similarity name.")):Promise.reject(new d.SimilarityIndexError("Missing similarity name.")),W=e=>e.hasSelectQuery()?e.invalidSelectQuery?Promise.reject(new d.SimilarityIndexError("Invalid select query")):e.invalidSelectQueryType?Promise.reject(new d.SimilarityIndexError("Invalid select query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing select query.")),X=e=>e.hasSearchQuery()?e.invalidSearchQuery?Promise.reject(new d.SimilarityIndexError("Invalid search query")):e.invalidSearchQueryType?Promise.reject(new d.SimilarityIndexError("Invalid search query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing search query.")),J=e=>e.isPredicationType()&&!e.hasAnalogicalQuery()?Promise.reject(new d.SimilarityIndexError("Missing analogical query.")):e.invalidAnalogicalQuery?Promise.reject(new d.SimilarityIndexError("Invalid analogical query")):e.invalidAnalogicalQueryType?Promise.reject(new d.SimilarityIndexError("Invalid analogical query type")):Promise.resolve(e),K=(e,i)=>H().getQueryType().then(t=>u.QueryType.SELECT!==t?(e.markInvalidQueryType(i),Promise.reject(new d.SimilarityIndexError("Query type is not valid."))):(e.markInvalidQueryType(i,!1),e)),Z=(e,i)=>H().isQueryValid().then(t=>t?(e.markInvalidQuery(i,!1),e):(e.markInvalidQuery(i),Promise.reject(new d.SimilarityIndexError("Query is not valid.")))),ee=(e,i,t,r)=>{v.openSimpleModal({title:e,message:i,warning:!0}).result.then((function(){angular.isFunction(t)&&t()}),(function(){angular.isFunction(r)&&r()}))},ie=()=>{e.isYasrShown()&&e.similarityIndexInfo.isDataQueryTypeSelected()&&e.showEditor(),e.canEditActiveRepo=e.canWriteActiveRepo();const i={...e.yasguiConfig,yasqeMode:e.canWriteActiveRepo()};q(i)},te=e=>{R&&(e.returnValue=!0)},re=()=>{window.removeEventListener("beforeunload",te),ne.forEach(e=>e())},ne=[];ne.push(f.subscribe("repositoryWillChangeEvent",i=>new Promise((function(t){if(e.isCreateViewMode()||e.isCloneViewMode())return void t(i);const r=()=>{R=!1,V(),t(i)};if(R){const e=()=>{i.cancel=!0,t(i)},n=E.instant("common.confirm"),s=E.instant("similarity.warning.unsaved.changes");ee(n,s,r,e)}else r()})))),ne.push(e.$on("$locationChangeStart",(e,i)=>{if(R){e.preventDefault();const t=E.instant("common.confirm"),r=E.instant("similarity.warning.unsaved.changes");ee(t,r,()=>{re();const e=p.absUrl().length-p.url().length,t=i.substring(e);p.path(t)})}else re()})),ne.push(e.$on("$destroy",re)),window.addEventListener("beforeunload",te),M=(()=>{if(void 0===p.search().name)return y.SimilarityViewMode.CREATE;const e=p.search().editSearchQuery;return void 0===e?y.SimilarityViewMode.CLONE:"string"==typeof e?"false"===e?y.SimilarityViewMode.CLONE:y.SimilarityViewMode.EDIT:e?y.SimilarityViewMode.EDIT:y.SimilarityViewMode.CLONE})();const se=e.$watch((function(){return e.getActiveRepositoryObject()}),(function(i){i&&(e.loadingControllerResources=!0,Promise.all([m.getSearchQueries(),m.getSamples(),A.getPrefixes(i.id)]).then(([i,t,r])=>{e.canEditActiveRepo=e.canWriteActiveRepo(),L=i?i.data:[],w=t?t.data:[],C=r,Y().then(i=>{e.similarityIndexInfo=i;let t=o.SimilarityQueryType.DATA;e.isEditViewMode()&&(t=o.SimilarityQueryType.SEARCH),e.changeSimilarityIndexType(i.getType(),t)})}).catch(i=>{console.log(i),e.repositoryError=getError(i)}).finally(()=>{ne.push(e.$on("repositoryIsSet",ie)),se(),e.loadingControllerResources=!1}))}))}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",I),I.$inject=["$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService"]},70:function(e,i,t){"use strict";t.r(i),t.d(i,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},73:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexType",(function(){return r}));const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},74:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexStatus",(function(){return r}));const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},76:function(e,i,t){"use strict";t.r(i),t.d(i,"YasqeMode",(function(){return r}));const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},78:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndex",(function(){return s}));var r=t(73),n=t(74);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return n.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return n.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return n.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return n.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return n.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return n.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return n.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return n.SimilarityIndexStatus.isFailedStatus(this.status)}}},80:function(e,i){function t(e,i){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(i.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},84:function(e,i,t){"use strict";t.r(i),t.d(i,"mapIndexesResponseToSimilarityIndex",(function(){return n}));var r=t(78);const n=e=>e.map(e=>{const i=new r.SimilarityIndex;return i.type=e.type,i.stopList=e.stopList,i.status=e.status,i.selectQuery=e.selectQuery,i.searchQuery=e.searchQuery,i.sameAs=e.sameAs,i.options=e.options,i.name=e.name,i.infer=e.infer,i.analyzer=e.analyzer,i.analogicalQuery=e.analogicalQuery,i})}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[131],{93:function(a,t){angular.module("graphdb.framework.core.directives.paginations",[]).directive("paginations",["$translate","$rootScope","$compile",function(a,t,n){return{link:function(a,e){const i=()=>{const t=n('<uib-pagination class="nav navbar-right" total-items="matchedElements.length" items-per-page="pageSize" ng-model="page" ng-change="changePagination()" direction-links="false" boundary-links="true" max-size="5" rotate="true" first-text="{{\'paginator.first.page.label\' | translate}}" last-text="{{\'paginator.last.page.label\' | translate}}"></uib-pagination>')(a);e.html(t)};i();const o=t.$on("$translateChangeSuccess",i);a.$on("$destroy",o)}}}])}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[131],{92:function(a,t){angular.module("graphdb.framework.core.directives.paginations",[]).directive("paginations",["$translate","$rootScope","$compile",function(a,t,n){return{link:function(a,e){const i=()=>{const t=n('<uib-pagination class="nav navbar-right" total-items="matchedElements.length" items-per-page="pageSize" ng-model="page" ng-change="changePagination()" direction-links="false" boundary-links="true" max-size="5" rotate="true" first-text="{{\'paginator.first.page.label\' | translate}}" last-text="{{\'paginator.last.page.label\' | translate}}"></uib-pagination>')(a);e.html(t)};i();const o=t.$on("$translateChangeSuccess",i);a.$on("$destroy",o)}}}])}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[134],{185:function(n,e){function a(n){const e=["en","fr"];let a;return{getTranslations:()=>(a||(a={},e.forEach(e=>a[e]=n.getTranslationTable(e))),a)}}angular.module("graphdb.framework.core.services.translation-service",[]).service("TranslationService",a),a.$inject=["$translate"]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[134],{183:function(n,e){function a(n){const e=["en","fr"];let a;return{getTranslations:()=>(a||(a={},e.forEach(e=>a[e]=n.getTranslationTable(e))),a)}}angular.module("graphdb.framework.core.services.translation-service",[]).service("TranslationService",a),a.$inject=["$translate"]}}]);
@@ -0,0 +1,2 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[14,128,271,298],{112:function(e,t){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",translateKey:"download.as.json",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",translateKey:"download.as.jsonld",type:"application/ld+json",extension:".jsonld"},{name:"NDJSON-LD",translateKey:"download.as.ndjsonld",type:"application/x-ld+ndjson",extension:".ndjsonld"},{name:"RDF-XML",translateKey:"download.as.rdfxml",type:"application/rdf+xml",extension:".rdf"},{name:"N3",translateKey:"download.as.n3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",translateKey:"download.as.ntriples",type:"text/plain",extension:".nt"},{name:"N-Quads",translateKey:"download.as.nquads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",translateKey:"download.as.turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",translateKey:"download.as.turtlestar",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",translateKey:"download.as.trix",type:"application/trix",extension:".trix"},{name:"TriG",translateKey:"download.as.trig",type:"application/x-trig",extension:".trig"},{name:"TriG*",translateKey:"download.as.trigstar",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",translateKey:"download.as.binaryrdf",type:"application/x-binary-rdf",extension:".brf"}])},196:function(e,t){angular.module("graphdb.framework.rest.export.service",[]).factory("ExportRestService",n),n.$inject=["$http","$repositories","$translate"];function n(e,t,n){return{getExportedStatementsAsJSONLD:function(t,n,o,r,a){const i=`repositories/${n.id}/statements?infer=false`,s={location:n.location},l={accept:a.accept};Array.isArray(t)?s.context=t.map(e=>decodeURIComponent(e)):t&&(s.context=decodeURIComponent(o[t.value].exportUri));r&&(s.authToken=r);a.link&&""!==a.link&&(l.link=a.link);return e({url:i,method:"GET",params:s,headers:l,responseType:"blob"}).then((function(e){const t=e.data;let n=e.headers()["content-disposition"].split("filename=")[1];return n=n.substring(0,n.length),{data:t,filename:n}}))}}}},275:function(e,t,n){"use strict";n.r(t);n(7),n(32),n(33),n(112),n(196);var o=n(510),r=n(0),a=n(30),i=n(99);angular.module("graphdb.framework.impex.export.controllers",["ngCookies","ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.workbench.utils.filetypes","graphdb.framework.rest.export.service"]).controller("ExportCtrl",["$scope","$http","$location","$timeout","ModalService","filterFilter","$repositories","toastr","ExportRestService","RDF4JRepositoriesRestService","FileTypes","$translate","AuthTokenService","$uibModal",function(e,t,n,s,l,p,c,d,u,g,f,h,m,x){e.getActiveRepository=function(){return c.getActiveRepository()},e.exportFormats=f,e.deleting={},e.showExportDDTooltip=!0,e.page=1,e.pageSize=10,e.pageSizeOptions=[10,20,50,100],e.displayGraphs=[],e.exportFilter="",e.export=!0,e.exportMultipleGraphs=!1,e.repoExportFormat={name:"TriG",type:"application/x-trig",extension:".trig"},e.selectedGraphs={exportGraphs:{}},e.$watch((function(){return c.getActiveRepository()}),(function(){e.exportFilter="",e.getGraphs(),e.selectedAll=!1,s((function(){e.changePageSize(10)}),100)})),e.isShacl=function(e){return"http%3A%2F%2Frdf4j.org%2Fschema%2Frdf4j%23SHACLShapeGraph"===e},e.getGraphs=function(){e.getActiveRepository()?(e.loader=!0,g.getGraphs(e.getActiveRepository()).success((function(t){t.results.bindings.unshift({contextID:{type:"default",value:"import.default.graph"}}),e.graphsByValue={},Object.keys(t.results.bindings).forEach((function(n){const o=t.results.bindings[n];"bnode"===o.contextID.type?o.contextID.value="_:"+o.contextID.value:"default"===o.contextID.type?(o.contextID.uri=encodeURIComponent("http://www.openrdf.org/schema/sesame#nil"),o.contextID.clearUri="DEFAULT",o.contextID.exportUri="null",o.contextID.longName="default graph"):(o.contextID.uri=encodeURIComponent(o.contextID.value),o.contextID.clearUri="GRAPH <"+o.contextID.value+">",o.contextID.exportUri=encodeURIComponent("<"+o.contextID.value+">"),o.contextID.longName="named graph "+o.contextID.value),e.graphsByValue[o.contextID.value]=o.contextID})),e.graphs=t.results.bindings,e.filteredGraphs=Object(a.cloneDeep)(e.graphs),e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page),e.loader=!1,e.selectedGraphs.exportGraphs={},e.matchedElements=e.graphs})).error((function(t,n){const o=getError(t,n);"There is no active location!"===o&&(c.setRepository(""),d.error(o,h.instant("common.error"))),e.loader=!1}))):e.loader=!1},e.onGraphSearch=function(){e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.graphs,(function(t){-1!==t.contextID.value.indexOf(e.exportFilter)&&e.matchedElements.push(t)}))},e.downloadExport=function(e,t){let n=e+"&Accept="+encodeURIComponent(t.type);const o=m.getAuthToken();o&&(n=n+"&authToken="+encodeURIComponent(o));let r=window.open(n);s((function(){"about:blank"!==r.document.location.href&&(r.close(),d.error("Could not export graph. Check GraphDB logs for detailed reason."))}),100)},e.openExportDDTooltip=function(){e.showExportDDTooltip&&(s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),0),s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),3e3),e.showExportDDTooltip=!1)},e.exportRepo=function(t,n){"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){e.startDownload(t,n)})):e.startDownload(t,n)},e.openJSONLDExportSettings=function(t,n){x.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:i.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(r){const a="framed"===r.currentMode.name?"frame":"context",i=r.link?`<${r.link}>; rel="http://www.w3.org/ns/json-ld#${a}"`:"";!function(e,t,n,r,a,i){const s={accept:e.type+";profile="+i.link,link:n};u.getExportedStatementsAsJSONLD(t,r,a,m.getAuthToken(),s).then((function({data:e,filename:t}){Object(o.saveAs)(e,t)})).catch((function(e){e.data.text().then(t=>{431===e.status?d.error(e.statusText,h.instant("common.error")):d.error(t,h.instant("common.error"))})}))}(t,n,i,c.getActiveRepositoryObject(),e.graphsByValue,r.currentMode)}))},e.startDownload=function(t,n){let o;const r=c.getActiveRepositoryObject();o=n?`repositories/${r.id}/statements?infer=false&context=${e.graphsByValue[n.value].exportUri}&location=${encodeURIComponent(r.location)}`:`repositories/${r.id}/statements?infer=false&location=${encodeURIComponent(r.location)}`,e.downloadExport(o,t)},e.hasMultipleSelected=function(){if(_.isEmpty(e.selectedGraphs.exportGraphs))return!_.isEmpty(e.selectedGraphs.exportGraphs);for(const t in e.selectedGraphs.exportGraphs)if(!0===e.selectedGraphs.exportGraphs[t])return!0;return!1},e.openJSONLDExportSettingsForSelectedGraphs=function(t){const n=Object.keys(e.selectedGraphs.exportGraphs).filter(t=>e.selectedGraphs.exportGraphs[t]).map(t=>e.graphsByValue[t].exportUri);n?e.openJSONLDExportSettings(t,n):l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.exportSelectedGraphs=function(t){let n="";for(const t in e.selectedGraphs.exportGraphs)e.selectedGraphs.exportGraphs[t]&&(n+="context="+e.graphsByValue[t].exportUri+"&");if(n){const o=function(){n=n.substring(0,n.length-1);const o="repositories/"+e.getActiveRepository()+"/statements?infer=false&"+n;e.downloadExport(o,t)};"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){o()})):o()}else l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.$watch("exportFilter",(function(){if(e.filteredGraphs=p(e.graphs,e.exportFilter),e.getActiveRepository()&&angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span").length){const t=angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span")[0].innerHTML.trim();let n;"All"===t&&(n=e.filteredGraphs.length),e.filteredGraphs&&e.filteredGraphs.length>e.pageSize&&"All"!==t&&(n=e.pageSize),e.changePageSize(n),e.changePagination()}})),e.changePagination=function(){e.selectedAll=!1,angular.isDefined(e.filteredGraphs)&&(e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(t){$(".ot-graph-page-size").removeClass("active"),e.page=1,t&&(e.pageSize=t,e.changePagination()),e.filteredGraphs&&""!==e.exportFilter&&(e.displayGraphs=e.filteredGraphs)},e.checkAll=function(){e.selectedAll=e.selectedAll||!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=e.selectedAll)}))},e.deselectAll=function(){e.selectedAll=!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=!1)}))},e.dropRepository=function(){e.canWriteActiveRepo()&&(e.deleting["*"]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.msg"),message:h.instant("export.warning.clear.repo.msg",{repo:c.getActiveRepository()}),warning:!0}).result.then((function(){s((function(){g.addStatements(c.getActiveRepository(),"update=CLEAR ALL").then((function(){e.deleting["*"]=!1,d.success(h.instant("export.cleared.repo",{repo:c.getActiveRepository()})),e.getGraphs()}),(function(t){e.deleting["*"]=!1;const n=t.data;"string"==typeof n&&n.indexOf("Clearing all statements in the repository is incompatible with collecting history")>-1?d.error(h.instant("export.clearing.statements.warning")):d.error(h.instant("export.cleared.repo.failed.msg",{repo:c.getActiveRepository()}),t)}))}),100)})))},e.dropContext=function(t){e.canWriteActiveRepo()&&(angular.isDefined(t)?function(t){const n=t.contextID.longName;e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.clear.graph.warning",{longName:n}),warning:!0}).result.then((function(){s((function(){const o="update=CLEAR "+t.contextID.clearUri;g.addStatements(c.getActiveRepository(),o).then((function(){e.deleting[t]=!1,d.success(h.instant("export.cleared.graph",{longName:n})),e.getGraphs(),e.exportFilter="",e.filteredGraphs.length=0,e.updateResults(),e.changePageSize(e.pageSize)}),(function(o){e.deleting[t]=!1,d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(o,o.status))}))}),100)}),(function(){e.deleting[t]=!1}))}(t):function(t){const n=[];angular.forEach(e.selectedGraphs.exportGraphs,(function(e,t){e&&n.push(t)})),n.length>0&&(e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.warning.clear.graph.msg"),warning:!0}).result.then((function(){s((function(){let t=0;angular.forEach(n,(function(o){const r="update=CLEAR "+e.graphsByValue[o].clearUri;g.addStatements(c.getActiveRepository(),r).then((function(){e.loader=!0,e.selectedGraphs.exportGraphs[o]=!1,delete e.selectedGraphs.exportGraphs[o],t++,n.length===t&&(e.selectedAll=!1,e.exportFilter="",e.filteredGraphs.length=0,e.getGraphs(),e.updateResults(),e.changePageSize(e.pageSize),d.success(h.instant("export.cleared.graph.msg")),e.loader=!1)}),(function(t){const n=e.graphsByValue[o].longName;d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(t,t.status)),e.selectedAll=!1}))}))}),100)}),(function(){e.deleting[t]=!1})))}(t))}}])},509:function(e,t){(function(t){e.exports=t}).call(this,{})},510:function(e,t,n){var o,r=r||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r=e.webkitRequestFileSystem,a=e.requestFileSystem||r||e.mozRequestFileSystem,i=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},s=0,l=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},p=function(e,t,n){for(var o=(t=[].concat(t)).length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(e){i(e)}}},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},d=function(t,i){t=c(t);var d,u,g,f=this,h=t.type,m=!1,x=function(){p(f,"writestart progress write writeend".split(" "))},y=function(){(!m&&d||(d=n().createObjectURL(t)),u)?u.location.href=d:null==e.open(d,"_blank")&&"undefined"!=typeof safari&&(e.location.href=d);f.readyState=f.DONE,x(),l(d)},w=function(e){return function(){if(f.readyState!==f.DONE)return e.apply(this,arguments)}},S={create:!0,exclusive:!1};if(f.readyState=f.INIT,i||(i="download"),o)return d=n().createObjectURL(t),o.href=d,o.download=i,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),x(),l(d),f.readyState=f.DONE}));e.chrome&&h&&"application/octet-stream"!==h&&(g=t.slice||t.webkitSlice,t=g.call(t,0,t.size,"application/octet-stream"),m=!0),r&&"download"!==i&&(i+=".download"),("application/octet-stream"===h||r)&&(u=e),a?(s+=t.size,a(e.TEMPORARY,s,w((function(e){e.root.getDirectory("saved",S,w((function(e){var n=function(){e.getFile(i,S,w((function(e){e.createWriter(w((function(n){n.onwriteend=function(t){u.location.href=e.toURL(),f.readyState=f.DONE,p(f,"writeend",t),l(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&y()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=f["on"+e]})),n.write(t),f.abort=function(){n.abort(),f.readyState=f.DONE},f.readyState=f.WRITING})),y)})),y)};e.getFile(i,{create:!1},w((function(e){e.remove(),n()})),w((function(e){e.code===e.NOT_FOUND_ERR?n():y()})))})),y)})),y)):y()},u=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(c(e),t)}:(u.abort=function(){this.readyState=this.DONE,p(this,"abort")},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(e,t){return new d(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
2
+ /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */e.exports?e.exports.saveAs=r:null!==n(521)&&null!=n(509)&&(void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o))},521:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},99:function(e,t,n){"use strict";function o(e,t,n,o,r){e.JSONLDModes=[{name:"framed",link:"http://www.w3.org/ns/json-ld#framed"},{name:"expanded",link:"http://www.w3.org/ns/json-ld#expanded"},{name:"flattened",link:"http://www.w3.org/ns/json-ld#flattened"},{name:"compacted",link:"http://www.w3.org/ns/json-ld#compacted"}],e.JSONLDModesNames=e.JSONLDModes.reduce((function(e,t){return e[t.name]=t.name,e}),{}),e.JSONLDFramedModes=[e.JSONLDModesNames.framed],e.JSONLDContextModes=[e.JSONLDModesNames.compacted,e.JSONLDModesNames.flattened],e.defaultMode=e.JSONLDModes.find(e=>"expanded"===e.name),e.currentMode=e.defaultMode,e.link=null,e.fileFormat=r.toLowerCase(),e.setJSONLDSettingsToLocalStorage=function(e,t,r){n.set(o.JSONLD_EXPORT_SETTINGS,JSON.stringify({jsonldFormName:e,jsonldFormLink:t,jsonldLink:r}))},e.cancel=function(){t.dismiss()},e.reset=function(){e.currentMode=e.defaultMode,e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.clearLinkInput=function(){e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.exportJsonLD=function(){e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link),t.close({currentMode:e.currentMode,link:e.link})};!function(){const t=n.get(o.JSONLD_EXPORT_SETTINGS);t&&(e.currentMode=e.JSONLDModes.find(e=>e.name===t.jsonldFormName),e.link=t.jsonldLink)}()}n.r(t),n.d(t,"ExportSettingsCtrl",(function(){return o})),angular.module("graphdb.framework.core.components.export-settings-modal",["graphdb.framework.utils.localstorageadapter"]).controller("ExportSettingsCtrl",o),o.$inject=["$scope","$uibModalInstance","LocalStorageAdapter","LSKeys","format"]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[14,87,177,201,243,269,303],{147:function(e,n,t){"use strict";t.r(n);t(38),t(82);function o(e){const n=[];return Object.keys(e).forEach((function(t){n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]))})),n.join("&")}function r(e,n){return _.reduce(e,(function(e,t){if(""===t.key&&""===t.value);else{if(""===t.key)throw new Error(n.instant("externalsync.empty.value.key.error",{value:t.value}));if(e.hasOwnProperty(t.key))throw new Error(n.instant("externalsync.duplicate.key.error",{key:t.key}));e[t.key]=t.value}return e}),{})}function a(e,n){for(let o=0;o<n.length;o++){const r=n[o];if("StringArray"===r.__type)e[r.__name]||(e[r.__name]=[""]);else if("OptionArray"===r.__type)if(e[r.__name])for(let n=0;n<r.__childOptions.length;n++){const t=r.__childOptions[n];if("Boolean"===t.__type)for(let n=0;n<e[r.__name].length;n++){const o=e[r.__name][n];!o.hasOwnProperty([t.__name])&&angular.isDefined(t.__defaultValue)&&(o[t.__name]=t.__defaultValue)}}else{e[r.__name]=[];const n={};for(let e=0;e<r.__childOptions.length;e++){const t=r.__childOptions[e];"StringArray"===t.__type?n[t.__name]=[""]:n[t.__name]=angular.isUndefined(t.__defaultValue)?"":t.__defaultValue}e[r.__name].push(n)}else"Map"===r.__type?e[r.__name]?e[r.__name]=(t=e[r.__name],_.map(t,(function(e,n){return{key:n,value:e}}))):e[r.__name]=[]:"JsonString"===r.__type?!e[r.__name]||e[r.__name]instanceof String||"string"==typeof e[r.__name]||(e[r.__name]=angular.toJson(e[r.__name],2)):angular.isUndefined(e[r.__name])&&(e[r.__name]=angular.isUndefined(r.__defaultValue)?"":r.__defaultValue)}var t;return e}function i(e,n,t){return e.post("repositories/"+n,o({query:t}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function s(e){return e.substring(0,e.length-1)+"/instance#"}function c(e,n,t,o,a){const i=function e(n,t){const o={};return _.each(t,(function(t){angular.isDefined(n[t.__name])&&("OptionArray"===t.__type?(o[t.__name]=[],_.each(n[t.__name],(function(n){o[t.__name].push(e(n,t.__childOptions))}))):o[t.__name]=_.cloneDeep(n[t.__name]))})),o}(t,o);for(let e=0;e<o.length;e++)try{"Map"===o[e].__type?i[o[e].__name]=r(i[o[e].__name],$translate):"JsonString"===o[e].__type&&(i[o[e].__name]=angular.fromJson(i[o[e].__name]))}catch(n){return a(o[e].__label,n.message),null}!function e(n){Array.isArray(n)&&(n=_.filter(n,(function(e){return null!==e&&(!e.trim||""!==e.trim())})));return Object.keys(n).forEach((function(t){""!==n[t]&&null!=n[t]||!1===n[t]?"object"==typeof n[t]&&(n[t]=e(n[t])):delete n[t]})),n}(i);let c="";c+="PREFIX :<"+n+">\n";return c+="PREFIX inst:<"+s(n)+">\n",c+="INSERT DATA {\n",c+="\tinst:"+e+" :createConnector '''\n",c+=angular.toJson(i,2),c+="\n''' .\n}\n",c=c.replace(/\\/g,"\\\\\\"),c}function u(e,n,t,r,u,l,d,p,g,f){function m(n){e.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:n?f.instant("externalsync.repairing"):f.instant("externalsync.creating"),waitOnRepairStartOnce:!!n,eta:"-",inline:!1,iri:null}}function y(n,t,o){return m(o),$.extend(e.beingBuiltConnector,{iri:s(n)+t,name:t,inline:!1,doneCallback:function(){e.beingBuiltConnector.modalInstance.dismiss("cancel")}}),e.beingBuiltConnector.modalInstance=r.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:e}),e.beingBuiltConnector.modalInstance}function C(n,r,a){const i=y(n.value,r.name,!1);p.addStatements(t.getActiveRepository(),o({update:r.query})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(n.value)).then((function(t){e.existing[n.key]=t.data}))})),u.success(f.instant("created.connector",{name:r.name}))}),(function(e){u.error(getError(e)),a()})).finally((function(){i.dismiss("cancel")}))}e.loader=!1,e.controllers=[],e.existing={},e.definitions={},e.getLoaderMessage=function(){const n=(Date.now()-e.loaderStartTime)/1e3,t=e.getHumanReadableSeconds(n);let o="";return o=e.progressMessage?e.progressMessage+"... "+t:f.instant("common.running.operation",{timeHuman:t}),e.extraMessage&&n>10&&(o+="\n"+e.extraMessage),o},e.setLoader=function(n,t,o){n?(e.loader=!0,e.loaderStartTime=Date.now(),e.progressMessage=t,e.extraMessage=o):(e.loader=!1,e.progressMessage="",e.extraMessage="")},e.initConnector=function(n){return g.initConnector(encodeURIComponent(n.value)).then((function(t){return e.definitions[n.key]=t.data,g.hasConnector(encodeURIComponent(n.value)).then((function(t){e.existing[n.key]=t.data}))}))},e.getConnectors=function(){e.isLicenseValid()&&e.canWriteActiveRepo()&&(e.setLoader(!0,f.instant("externalsync.fetching.connectors"),f.instant("common.extra.message")),g.getConnectors().then((function(o){e.connectors=Object.keys(o.data).map((function(e){return{key:e,value:o.data[e]}})),d.all(_.map(e.connectors,(function(n){return e.initConnector(n)}))).finally((function(){m();const o=function(e){const n=_.map(e,(function(e){return"<"+e.value+"connectorStatus>"})).join("|");return n?"SELECT ?connector ?status { ?connector "+n+" ?status }":null}(e.connectors);o?function(e){return i(n,t.getActiveRepository(),e)}(o).then((function(n){const t=function(e){if(e.bindings)for(let n=0;n<e.bindings.length;n++)try{const t=JSON.parse(e.bindings[n].status.value);if("BUILDING"===t.status)return{connector:e.bindings[n].connector.value,status:t}}catch(e){console.error(e)}return{}}(n.data.results);if(t.connector){const n=t.connector.split(/#/);n[0]=n[0].replace(/\/instance$/,"#"),o=n[0],r=n[1],m(),$.extend(e.beingBuiltConnector,{iri:s(o)+r,name:r,inline:!0,doneCallback:function(){e.beingBuiltConnector.inline=!1}})}var o,r})).finally((function(){e.setLoader(!1)})):e.setLoader(!1)}))})).catch((function(n){e.setLoader(!1),u.error(getError(n),f.instant("externalsync.could.not.get.connectors.error"))})),e.existing={})},e.getOptions=function(n){return e.definitions[n.key]},e.isEmpty=function(e){return angular.isObject(e)&&0===Object.keys(e).length},e.toPrettyJson=function(e){return angular.toJson(e,2)},e.$watch((function(){return t.getActiveRepository()}),e.getConnectors),e.$watch((function(){return t.getActiveLocation()}),e.getConnectors),e.copyConnector=function(n,t){let o;angular.isUndefined(t)||(o=_.cloneDeep(t),o.name=o.name+"-copy");r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return n},values:function(){return angular.isUndefined(o)?{name:"",values:{}}:o},options:function(){return e.getOptions(n)}}}).result.then((function(t){C(n,t,(function(){t.skipConversion=!0,e.newConnector(n,t)}))}))},e.newConnector=function(n,t){r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return n},values:function(){return angular.isUndefined(t)?{name:"",values:{}}:t},options:function(){return e.getOptions(n)}}}).result.then((function(t){C(n,t,(function(){t.skipConversion=!0,e.newConnector(n,t)}))}))},e.repair=function(n,r){l.openSimpleModal({title:f.instant("externalsync.confirm.repair"),message:f.instant("externalsync.repair.warning.msg"),warning:!0}).result.then((function(){const a=y(r.value,n.name,!0),i=(c=n.name,"PREFIX prefix:<"+(l=r.value)+">\nINSERT DATA {\n\t<"+s(l)+c+'> prefix:repairConnector ""\n}');var c,l;p.addStatements(t.getActiveRepository(),o({update:i})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(r.value)).then((function(n){e.existing[r.key]=n.data}))})),u.success(f.instant("externalsync.repair.success.msg",{name:n.name}))}),(function(e){u.error(getError(e))})).finally((function(){a.dismiss("cancel")}))}))},e.delete=function(n,a){const i=a.key.indexOf("Elastic")>=0||a.key.indexOf("Solr")>=0;r.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return i?f.instant("delete.connector.conditional",{type:a.key}):""}}}).result.then((function(r){e.setLoader(!0,f.instant("externalsync.delete.progress.msg",{name:n.name}),f.instant("externalsync.extra.message.warning"));const s=function(e,n,t){const o=n.substring(0,n.length-1)+"/instance#";return"PREFIX prefix:<"+n+">\nINSERT DATA {\n\t<"+o+e+'> prefix:dropConnector "'+(t?"force":"")+'"\n}'}(n.name,a.value,r);p.addStatements(t.getActiveRepository(),o({update:s})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(a.value)).then((function(n){e.existing[a.key]=n.data}))})),r?(u.success(f.instant("externalsync.delete.force.success.msg",{name:n.name})),i&&u.warning(f.instant("externalsync.delete.remote.warning",{key:a.key}))):u.success(f.instant("externalsync.delete.success.msg",{name:n.name}))}),(function(e){u.error(getError(e))})).finally((function(){e.setLoader(!1)}))}))},e.viewQuery=function(n,t){r.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const o=e.getOptions(n);return c(t.name,n.value,a(t.values,o),o)}}})}}function l(e,n,t){e.force=!1,e.popoverMsg=t,e.ok=function(){n.close(e.force)},e.cancel=function(){n.dismiss()}}function d(e,n,t,o,r){function a(){return c(e.name,t.value,e.values,e.options,(function(e,n){r.error(n,e)}))}e.connector=t,e.addField=function(n,t){const o=_.cloneDeep(e.defaultValues[t][0]);e.values[t].splice(n+1,0,o)},e.addOption=function(e,n){n.splice(e+1,0,"")},e.deleteOption=function(e,n){n.splice(e,1)},e.addMapOption=function(e,n){n.splice(e+1,0,{key:"",value:""})},e.deleteMapOption=function(e,n){n.splice(e,1)},e.ok=function(){if(e.form.$valid){const t=a();t&&n.close({name:e.name,values:e.values,options:e.options,query:t})}},e.viewQuery=function(){const e=a();e&&o.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},e.cancel=function(){n.dismiss("cancel")}}function p(e,n,t,o,r,i,s,c){angular.extend(this,n("ExtendNewConnectorCtrl",{$scope:e,$uibModalInstance:o,connector:r,$uibModal:i})),e.values=s.values,e.options=c,e.name=s.name,s.skipConversion||(e.values=a(e.values,e.options)),e.defaultValues=_.cloneDeep(e.values)}function g(e,n,t,o,r){function a(){const a=function(e){const n=e.replace(/\/instance#.+$/,"#connectorStatus");let t="";return t+="SELECT ?status {\n",t+="\t<"+e+"> <"+n+"> ?status",t+="\n}",t}(e.beingBuiltConnector.iri);e.beingBuiltConnector.iri=null,e.progressInterval=n((function(){(function(e){return i(t,o.getActiveRepository(),e)})(a).then((function(t){const o=function(e){if(e.bindings&&e.bindings.length>0)try{return JSON.parse(e.bindings[0].status.value)}catch(e){console.error(e)}return{}}(t.data.results);"BUILDING"===o.status?(e.beingBuiltConnector.status=o,e.beingBuiltConnector.percentDone=(100*o.processedEntities/o.estimatedEntities).toFixed(0),e.beingBuiltConnector.eta=e.getHumanReadableSeconds(o.etaSeconds),e.beingBuiltConnector.actionName=o.repair?r.instant("externalsync.repairing"):r.instant("externalsync.creating"),e.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==o.status||e.beingBuiltConnector.waitOnRepairStartOnce||(n.cancel(e.progressInterval),e.beingBuiltConnector.doneCallback&&e.beingBuiltConnector.doneCallback())}))}),1e3),e.$on("$destroy",(function(){n.cancel(e.progressInterval)}))}e.beingBuiltConnector=e.beingBuiltConnector||{},!e.beingBuiltConnector.inline&&e.beingBuiltConnector.iri&&a(),e.$watch("beingBuiltConnector.iri",(function(n){e.beingBuiltConnector.inline&&n&&a()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",u).controller("ExtendNewConnectorCtrl",d).controller("CreateConnectorCtrl",p).controller("CreateProgressCtrl",g).controller("DeleteConnectorCtrl",l).filter("ceil",(function(){return function(e){return Math.ceil(e)}})),u.$inject=["$scope","$http","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],l.$inject=["$scope","$uibModalInstance","popoverMsg"],d.$inject=["$scope","$uibModalInstance","connector","$uibModal","toastr"],p.$inject=["$scope","$controller","$http","$uibModalInstance","connector","$uibModal","values","options"],g.$inject=["$scope","$interval","$http","$repositories","$translate"]},243:function(e,n,t){"use strict";t.r(n),t.d(n,"ConnectorCommand",(function(){return o}));const o={CREATE:"create",REPAIR:"repair",DROP:"drop"}},244:function(e,n,t){"use strict";t.r(n),t.d(n,"BeforeUpdateQueryResult",(function(){return o})),t.d(n,"BeforeUpdateQueryResultStatus",(function(){return r}));class o{constructor(e,n,t,o){this.status=e,this.mesage=o,this.messageLabelKey=n,this.parameters=t}}const r={ERROR:"error",SUCCESS:"success"}},250:function(e,n,t){"use strict";t.r(n),t.d(n,"CancelAbortingQuery",(function(){return o}));class o extends Error{}},279:function(e,n,t){"use strict";t.r(n);var o=t(128),r=t(107),a=(t(82),t(147),t(15)),i=t(109),s=t(243),c=t(244),u=t(102),l=t(0),d=t(83),p=t(110),g=t(250),f=t(13);t(16);function m(e,n,t,m,y,C,h,_,v,b,S,R,E,w,x,A,$,O){this.repository="";let U=h.getActiveRepository(),k=h.isActiveRepoOntopType();n.yasguiConfig=void 0,n.savedQueryConfig=void 0,n.prefixes={},n.inferUserSetting=!0,n.sameAsUserSetting=!0;const q=new Map;let B=!1;n.updateConfig=e=>{n.yasguiConfig={endpoint:M,componentId:p.VIEW_SPARQL_EDITOR,prefixes:n.prefixes,infer:k||n.inferUserSetting,sameAs:k||n.sameAsUserSetting,yasrToolbarPlugins:[J],beforeUpdateQuery:X(),outputHandlers:new Map([[u.EventDataType.QUERY_EXECUTED,Q],[u.EventDataType.REQUEST_ABORTED,T]]),clearState:void 0!==e&&e}},n.getActiveRepositoryNoError=()=>U;const M=e=>{const n=(e=>{const n=e.getTab();if(n)return n.getYasqe()})(e);if(n)return h.resolveSparqlEndpoint(n.getQueryMode())},Q=e=>{const n=q.get(e.tabId);n&&(n.dismiss(),q.delete(e.tabId))},T=e=>{if(e&&f.QueryMode.UPDATE!==e.queryMode){const n=e.getRepository(),t=e.getQueryTrackAlias();n&&t&&x.deleteQuery(t,n)}},I=e=>{const n=e[r.RouteConstants.savedQueryName],t=e[r.RouteConstants.savedQueryOwner];S.getSavedQuery(n,t).then(e=>{const n=Object(o.savedQueryResponseMapper)(e);L(n).then(j).finally(P)}).catch(e=>{v.error(b.instant("query.editor.missing.saved.query.data.error",{savedQueryName:n,error:getError(e)}))})},D=e=>{const n=e[r.RouteConstants.name],t=e[r.RouteConstants.query],a=e[r.RouteConstants.owner],i=Object(o.buildQueryModel)(t,n,a,!0);L(i).then(j).finally(P)},L=e=>a.YasguiComponentDirectiveUtil.getOntotextYasguiElementAsync("#query-editor").then(n=>n.openTab(e)).then(e=>a.YasguiComponentDirectiveUtil.highlightTabName(e)),P=()=>{B=!0,m.search({}),m.replace()},j=()=>Object(d.toBoolean)(m.search().execute)?a.YasguiComponentDirectiveUtil.getOntotextYasguiElementAsync("#query-editor").then(N).then(V):Promise.resolve(),N=e=>e.getQueryMode().then(n=>({yasguiComponent:e,queryMode:n})),V=({yasguiComponent:e,queryMode:n})=>"update"!==n?e.query():new Promise(n=>{const t=b.instant("confirm.execute"),o=Object(l.decodeHTML)(b.instant("query.editor.automatically.execute.update.warning"));w.openConfirmation(t,o,()=>n(e.query()),()=>n())}),J={createElement:e=>{const n=document.createElement("span");n.classList.add("explore-visual-graph-button-name");const t=document.createElement("button");return t.classList.add("explore-visual-graph-button"),t.classList.add("icon-data"),t.onclick=function(){const n={query:e.yasqe.getValue(),sameAs:e.yasqe.getSameAs(),inference:e.yasqe.getInfer()};m.path("graphs-visualizations").search(n)},t.appendChild(n),t},updateElement:(e,n)=>{if(e.classList.add("hidden"),!n.hasResults())return;const t=n.yasqe.getQueryType();i.QueryType.CONSTRUCT!==t&&i.QueryType.DESCRIBE!==t||e.classList.remove("hidden"),e.querySelector(".explore-visual-graph-button-name").innerText=b.instant("query.editor.visual.btn")},getOrder:()=>2},F=(e,n)=>({key:e,value:n}),Y=e=>[F("name",e.data.name)],H=(e,t,o)=>{const r=n.$new(!0);r.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:e,eta:"-",inline:!1,iri:t,name:o,doneCallback:function(){a.dismiss("cancel")}},r.getHumanReadableSeconds=n.getHumanReadableSeconds;const a=_.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:r});return a},X=()=>(e,n)=>R.checkConnector(e).then(e=>e.data.command?e.data.hasSupport?s.ConnectorCommand.CREATE===e.data.command?((e,n)=>{const t=H(b.instant("externalsync.creating"),e.data.iri,e.data.name);return q.set(n,t),new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS,"created.connector",Y(e))})(e,n):s.ConnectorCommand.REPAIR===e.data.command?((e,n)=>{const t=H(b.instant("externalsync.repairing"),e.data.iri,e.data.name);return q.set(n,t),new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS,"query.editor.repaired.connector",Y(e))})(e,n):s.ConnectorCommand.DROP===e.data.command?(e=>new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS,"externalsync.delete.success.msg",Y(e)))(e):void 0:(e=>{const n=[F("connectorName",e.data.connectorName),F("pluginName",e.data.pluginName)];return new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.ERROR,"query.editor.inactive.plugin.warning.msg",n)})(e):new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS)).catch(e=>{console.log("Checking connector error: ",e)}),z=e=>{const t=document.querySelectorAll('script[src*="https://www.gstatic.com/"]');if(t.length>0){const e=y.getLanguage();let n="module.js";if("en"!==e&&(n=`module__${e}.js`),!Array.prototype.some.call(t,e=>e.src.includes(n)))return void location.reload()}Promise.all([C.getPrincipal(),h.getPrefixes(U)]).then(([t,o])=>{n.prefixes=o,(e=>{n.inferUserSetting=e.appSettings.DEFAULT_INFERENCE,n.sameAsUserSetting=e.appSettings.DEFAULT_SAMEAS})(t),((e=!1)=>{n.updateConfig(e);const t=m.search();t.hasOwnProperty(r.RouteConstants.savedQueryName)?I(t):t.hasOwnProperty(r.RouteConstants.query)?D(t):E.isActive()&&L()})(e)})},G=[],K=e=>{const n=a.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor");n&&n.abortAllRequests().then(()=>{})};window.addEventListener("beforeunload",K);const W=e=>new Promise((n,t)=>{if(!e||e.queriesCount<1&&e.updatesCount<1)return void n();const o=b.instant("common.confirm"),r=Object(l.decodeHTML)((e=>{let n="view.sparql-editor.leave_page.run_queries.confirmation.";!e||e.queriesCount<1?n+="none_queries_":1===e.queriesCount?n+="one_query_":n+="queries_",e.updatesCount&&0!==e.updatesCount?1===e.updatesCount?n+="one_update":n+="updates":n+="non_updates",n+=".message";const t={queriesCount:e.queriesCount,updatesCount:e.updatesCount};return b.instant(n,t)})(e));w.openSimpleModal({title:o,message:r,warning:!0}).result.then((function(){n()}),(function(){t(new g.CancelAbortingQuery)}))});let Z=void 0;G.push(e.$on("$locationChangeStart",e=>{if(B)return void(B=!1);const n=a.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor");if(!n||Z)return;e.preventDefault();const t=m.path(),o=m.search();n.getOngoingRequestsInfo().then(e=>W(e)).then(()=>n.abortAllRequests()).then(()=>{Z=!0,m.path(t).search(o)}).catch(e=>{if(!(e instanceof g.CancelAbortingQuery))throw e})}));const ee=()=>{$.set(O.SPARQL_LAST_REPO,U)};G.push(n.$on("language-changed",(function(){location.reload()}))),G.push(A.subscribe("before-language-change",(function(e){return new Promise(n=>{w.openSimpleModal({title:b.instant("query.editor.language.change.warning.title"),message:b.instant("query.editor.reload.page.warning"),warning:!0}).result.then((function(){n(e)}),(function(){e.cancel=!0,n(e)}))})}))),G.push(n.$on("$destroy",()=>{ee(),G.forEach(e=>e()),window.removeEventListener("beforeunload",K)})),G.push(n.$watch(n.getActiveRepositoryObject,e=>{e&&(U=h.getActiveRepository(),k=h.isActiveRepoOntopType(e),$.get(O.SPARQL_LAST_REPO)!==U?(z(!0),ee()):z(!1))}))}angular.module("graphdb.framework.sparql-editor.controllers",["ui.bootstrap","graphdb.framework.rest.connectors.service","graphdb.framework.externalsync.controllers","graphdb.framework.utils.event-emitter-service","graphdb.framework.utils.localstorageadapter"]).controller("SparqlEditorCtrl",m),m.$inject=["$rootScope","$scope","$q","$location","$languageService","$jwtAuth","$repositories","$uibModal","toastr","$translate","SparqlRestService","ConnectorsRestService","GuidesService","ModalService","MonitoringRestService","EventEmitterService","LocalStorageAdapter","LSKeys"]},82:function(e,n){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",t),t.$inject=["$http"];function t(e){return{getConnectors:function(){return e.get("rest/connectors")},initConnector:function(n){return e.get("rest/connectors/options?prefix="+n)},hasConnector:function(n){return e.get("rest/connectors/existing?prefix="+n)},checkConnector:function(n){return e.post("rest/connectors/check",n,{headers:{"Content-Type":"text/plain"}})}}}},83:function(e,n,t){"use strict";t.r(n),t.d(n,"removeSpecialChars",(function(){return r})),t.d(n,"toBoolean",(function(){return a})),t.d(n,"toTitleCase",(function(){return i}));var o=t(30);const r=e=>e.replace(/[()']/g,""),a=e=>"string"==typeof e?"true"===e:Boolean(e),i=e=>e?Object(o.upperFirst)(e.toLowerCase()):e}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[15,87,177,201,243,269,303],{146:function(e,n,t){"use strict";t.r(n);t(38),t(82);function o(e){const n=[];return Object.keys(e).forEach((function(t){n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]))})),n.join("&")}function r(e,n){return _.reduce(e,(function(e,t){if(""===t.key&&""===t.value);else{if(""===t.key)throw new Error(n.instant("externalsync.empty.value.key.error",{value:t.value}));if(e.hasOwnProperty(t.key))throw new Error(n.instant("externalsync.duplicate.key.error",{key:t.key}));e[t.key]=t.value}return e}),{})}function a(e,n){for(let o=0;o<n.length;o++){const r=n[o];if("StringArray"===r.__type)e[r.__name]||(e[r.__name]=[""]);else if("OptionArray"===r.__type)if(e[r.__name])for(let n=0;n<r.__childOptions.length;n++){const t=r.__childOptions[n];if("Boolean"===t.__type)for(let n=0;n<e[r.__name].length;n++){const o=e[r.__name][n];!o.hasOwnProperty([t.__name])&&angular.isDefined(t.__defaultValue)&&(o[t.__name]=t.__defaultValue)}}else{e[r.__name]=[];const n={};for(let e=0;e<r.__childOptions.length;e++){const t=r.__childOptions[e];"StringArray"===t.__type?n[t.__name]=[""]:n[t.__name]=angular.isUndefined(t.__defaultValue)?"":t.__defaultValue}e[r.__name].push(n)}else"Map"===r.__type?e[r.__name]?e[r.__name]=(t=e[r.__name],_.map(t,(function(e,n){return{key:n,value:e}}))):e[r.__name]=[]:"JsonString"===r.__type?!e[r.__name]||e[r.__name]instanceof String||"string"==typeof e[r.__name]||(e[r.__name]=angular.toJson(e[r.__name],2)):angular.isUndefined(e[r.__name])&&(e[r.__name]=angular.isUndefined(r.__defaultValue)?"":r.__defaultValue)}var t;return e}function i(e,n,t){return e.post("repositories/"+n,o({query:t}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function s(e){return e.substring(0,e.length-1)+"/instance#"}function c(e,n,t,o,a){const i=function e(n,t){const o={};return _.each(t,(function(t){angular.isDefined(n[t.__name])&&("OptionArray"===t.__type?(o[t.__name]=[],_.each(n[t.__name],(function(n){o[t.__name].push(e(n,t.__childOptions))}))):o[t.__name]=_.cloneDeep(n[t.__name]))})),o}(t,o);for(let e=0;e<o.length;e++)try{"Map"===o[e].__type?i[o[e].__name]=r(i[o[e].__name],$translate):"JsonString"===o[e].__type&&(i[o[e].__name]=angular.fromJson(i[o[e].__name]))}catch(n){return a(o[e].__label,n.message),null}!function e(n){Array.isArray(n)&&(n=_.filter(n,(function(e){return null!==e&&(!e.trim||""!==e.trim())})));return Object.keys(n).forEach((function(t){""!==n[t]&&null!=n[t]||!1===n[t]?"object"==typeof n[t]&&(n[t]=e(n[t])):delete n[t]})),n}(i);let c="";c+="PREFIX :<"+n+">\n";return c+="PREFIX inst:<"+s(n)+">\n",c+="INSERT DATA {\n",c+="\tinst:"+e+" :createConnector '''\n",c+=angular.toJson(i,2),c+="\n''' .\n}\n",c=c.replace(/\\/g,"\\\\\\"),c}function u(e,n,t,r,u,l,d,p,g,f){function m(n){e.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:n?f.instant("externalsync.repairing"):f.instant("externalsync.creating"),waitOnRepairStartOnce:!!n,eta:"-",inline:!1,iri:null}}function y(n,t,o){return m(o),$.extend(e.beingBuiltConnector,{iri:s(n)+t,name:t,inline:!1,doneCallback:function(){e.beingBuiltConnector.modalInstance.dismiss("cancel")}}),e.beingBuiltConnector.modalInstance=r.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:e}),e.beingBuiltConnector.modalInstance}function C(n,r,a){const i=y(n.value,r.name,!1);p.addStatements(t.getActiveRepository(),o({update:r.query})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(n.value)).then((function(t){e.existing[n.key]=t.data}))})),u.success(f.instant("created.connector",{name:r.name}))}),(function(e){u.error(getError(e)),a()})).finally((function(){i.dismiss("cancel")}))}e.loader=!1,e.controllers=[],e.existing={},e.definitions={},e.getLoaderMessage=function(){const n=(Date.now()-e.loaderStartTime)/1e3,t=e.getHumanReadableSeconds(n);let o="";return o=e.progressMessage?e.progressMessage+"... "+t:f.instant("common.running.operation",{timeHuman:t}),e.extraMessage&&n>10&&(o+="\n"+e.extraMessage),o},e.setLoader=function(n,t,o){n?(e.loader=!0,e.loaderStartTime=Date.now(),e.progressMessage=t,e.extraMessage=o):(e.loader=!1,e.progressMessage="",e.extraMessage="")},e.initConnector=function(n){return g.initConnector(encodeURIComponent(n.value)).then((function(t){return e.definitions[n.key]=t.data,g.hasConnector(encodeURIComponent(n.value)).then((function(t){e.existing[n.key]=t.data}))}))},e.getConnectors=function(){e.isLicenseValid()&&e.canWriteActiveRepo()&&(e.setLoader(!0,f.instant("externalsync.fetching.connectors"),f.instant("common.extra.message")),g.getConnectors().then((function(o){e.connectors=Object.keys(o.data).map((function(e){return{key:e,value:o.data[e]}})),d.all(_.map(e.connectors,(function(n){return e.initConnector(n)}))).finally((function(){m();const o=function(e){const n=_.map(e,(function(e){return"<"+e.value+"connectorStatus>"})).join("|");return n?"SELECT ?connector ?status { ?connector "+n+" ?status }":null}(e.connectors);o?function(e){return i(n,t.getActiveRepository(),e)}(o).then((function(n){const t=function(e){if(e.bindings)for(let n=0;n<e.bindings.length;n++)try{const t=JSON.parse(e.bindings[n].status.value);if("BUILDING"===t.status)return{connector:e.bindings[n].connector.value,status:t}}catch(e){console.error(e)}return{}}(n.data.results);if(t.connector){const n=t.connector.split(/#/);n[0]=n[0].replace(/\/instance$/,"#"),o=n[0],r=n[1],m(),$.extend(e.beingBuiltConnector,{iri:s(o)+r,name:r,inline:!0,doneCallback:function(){e.beingBuiltConnector.inline=!1}})}var o,r})).finally((function(){e.setLoader(!1)})):e.setLoader(!1)}))})).catch((function(n){e.setLoader(!1),u.error(getError(n),f.instant("externalsync.could.not.get.connectors.error"))})),e.existing={})},e.getOptions=function(n){return e.definitions[n.key]},e.isEmpty=function(e){return angular.isObject(e)&&0===Object.keys(e).length},e.toPrettyJson=function(e){return angular.toJson(e,2)},e.$watch((function(){return t.getActiveRepository()}),e.getConnectors),e.$watch((function(){return t.getActiveLocation()}),e.getConnectors),e.copyConnector=function(n,t){let o;angular.isUndefined(t)||(o=_.cloneDeep(t),o.name=o.name+"-copy");r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return n},values:function(){return angular.isUndefined(o)?{name:"",values:{}}:o},options:function(){return e.getOptions(n)}}}).result.then((function(t){C(n,t,(function(){t.skipConversion=!0,e.newConnector(n,t)}))}))},e.newConnector=function(n,t){r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return n},values:function(){return angular.isUndefined(t)?{name:"",values:{}}:t},options:function(){return e.getOptions(n)}}}).result.then((function(t){C(n,t,(function(){t.skipConversion=!0,e.newConnector(n,t)}))}))},e.repair=function(n,r){l.openSimpleModal({title:f.instant("externalsync.confirm.repair"),message:f.instant("externalsync.repair.warning.msg"),warning:!0}).result.then((function(){const a=y(r.value,n.name,!0),i=(c=n.name,"PREFIX prefix:<"+(l=r.value)+">\nINSERT DATA {\n\t<"+s(l)+c+'> prefix:repairConnector ""\n}');var c,l;p.addStatements(t.getActiveRepository(),o({update:i})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(r.value)).then((function(n){e.existing[r.key]=n.data}))})),u.success(f.instant("externalsync.repair.success.msg",{name:n.name}))}),(function(e){u.error(getError(e))})).finally((function(){a.dismiss("cancel")}))}))},e.delete=function(n,a){const i=a.key.indexOf("Elastic")>=0||a.key.indexOf("Solr")>=0;r.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return i?f.instant("delete.connector.conditional",{type:a.key}):""}}}).result.then((function(r){e.setLoader(!0,f.instant("externalsync.delete.progress.msg",{name:n.name}),f.instant("externalsync.extra.message.warning"));const s=function(e,n,t){const o=n.substring(0,n.length-1)+"/instance#";return"PREFIX prefix:<"+n+">\nINSERT DATA {\n\t<"+o+e+'> prefix:dropConnector "'+(t?"force":"")+'"\n}'}(n.name,a.value,r);p.addStatements(t.getActiveRepository(),o({update:s})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(a.value)).then((function(n){e.existing[a.key]=n.data}))})),r?(u.success(f.instant("externalsync.delete.force.success.msg",{name:n.name})),i&&u.warning(f.instant("externalsync.delete.remote.warning",{key:a.key}))):u.success(f.instant("externalsync.delete.success.msg",{name:n.name}))}),(function(e){u.error(getError(e))})).finally((function(){e.setLoader(!1)}))}))},e.viewQuery=function(n,t){r.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const o=e.getOptions(n);return c(t.name,n.value,a(t.values,o),o)}}})}}function l(e,n,t){e.force=!1,e.popoverMsg=t,e.ok=function(){n.close(e.force)},e.cancel=function(){n.dismiss()}}function d(e,n,t,o,r){function a(){return c(e.name,t.value,e.values,e.options,(function(e,n){r.error(n,e)}))}e.connector=t,e.addField=function(n,t){const o=_.cloneDeep(e.defaultValues[t][0]);e.values[t].splice(n+1,0,o)},e.addOption=function(e,n){n.splice(e+1,0,"")},e.deleteOption=function(e,n){n.splice(e,1)},e.addMapOption=function(e,n){n.splice(e+1,0,{key:"",value:""})},e.deleteMapOption=function(e,n){n.splice(e,1)},e.ok=function(){if(e.form.$valid){const t=a();t&&n.close({name:e.name,values:e.values,options:e.options,query:t})}},e.viewQuery=function(){const e=a();e&&o.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},e.cancel=function(){n.dismiss("cancel")}}function p(e,n,t,o,r,i,s,c){angular.extend(this,n("ExtendNewConnectorCtrl",{$scope:e,$uibModalInstance:o,connector:r,$uibModal:i})),e.values=s.values,e.options=c,e.name=s.name,s.skipConversion||(e.values=a(e.values,e.options)),e.defaultValues=_.cloneDeep(e.values)}function g(e,n,t,o,r){function a(){const a=function(e){const n=e.replace(/\/instance#.+$/,"#connectorStatus");let t="";return t+="SELECT ?status {\n",t+="\t<"+e+"> <"+n+"> ?status",t+="\n}",t}(e.beingBuiltConnector.iri);e.beingBuiltConnector.iri=null,e.progressInterval=n((function(){(function(e){return i(t,o.getActiveRepository(),e)})(a).then((function(t){const o=function(e){if(e.bindings&&e.bindings.length>0)try{return JSON.parse(e.bindings[0].status.value)}catch(e){console.error(e)}return{}}(t.data.results);"BUILDING"===o.status?(e.beingBuiltConnector.status=o,e.beingBuiltConnector.percentDone=(100*o.processedEntities/o.estimatedEntities).toFixed(0),e.beingBuiltConnector.eta=e.getHumanReadableSeconds(o.etaSeconds),e.beingBuiltConnector.actionName=o.repair?r.instant("externalsync.repairing"):r.instant("externalsync.creating"),e.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==o.status||e.beingBuiltConnector.waitOnRepairStartOnce||(n.cancel(e.progressInterval),e.beingBuiltConnector.doneCallback&&e.beingBuiltConnector.doneCallback())}))}),1e3),e.$on("$destroy",(function(){n.cancel(e.progressInterval)}))}e.beingBuiltConnector=e.beingBuiltConnector||{},!e.beingBuiltConnector.inline&&e.beingBuiltConnector.iri&&a(),e.$watch("beingBuiltConnector.iri",(function(n){e.beingBuiltConnector.inline&&n&&a()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",u).controller("ExtendNewConnectorCtrl",d).controller("CreateConnectorCtrl",p).controller("CreateProgressCtrl",g).controller("DeleteConnectorCtrl",l).filter("ceil",(function(){return function(e){return Math.ceil(e)}})),u.$inject=["$scope","$http","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],l.$inject=["$scope","$uibModalInstance","popoverMsg"],d.$inject=["$scope","$uibModalInstance","connector","$uibModal","toastr"],p.$inject=["$scope","$controller","$http","$uibModalInstance","connector","$uibModal","values","options"],g.$inject=["$scope","$interval","$http","$repositories","$translate"]},243:function(e,n,t){"use strict";t.r(n),t.d(n,"ConnectorCommand",(function(){return o}));const o={CREATE:"create",REPAIR:"repair",DROP:"drop"}},244:function(e,n,t){"use strict";t.r(n),t.d(n,"BeforeUpdateQueryResult",(function(){return o})),t.d(n,"BeforeUpdateQueryResultStatus",(function(){return r}));class o{constructor(e,n,t,o){this.status=e,this.mesage=o,this.messageLabelKey=n,this.parameters=t}}const r={ERROR:"error",SUCCESS:"success"}},250:function(e,n,t){"use strict";t.r(n),t.d(n,"CancelAbortingQuery",(function(){return o}));class o extends Error{}},279:function(e,n,t){"use strict";t.r(n);var o=t(128),r=t(106),a=(t(82),t(146),t(15)),i=t(108),s=t(243),c=t(244),u=t(100),l=t(0),d=t(83),p=t(109),g=t(250),f=t(13);t(16);function m(e,n,t,m,y,C,h,_,v,b,S,R,E,w,x,A,$,O){this.repository="";let U=h.getActiveRepository(),k=h.isActiveRepoOntopType();n.yasguiConfig=void 0,n.savedQueryConfig=void 0,n.prefixes={},n.inferUserSetting=!0,n.sameAsUserSetting=!0;const q=new Map;let B=!1;n.updateConfig=e=>{n.yasguiConfig={endpoint:M,componentId:p.VIEW_SPARQL_EDITOR,prefixes:n.prefixes,infer:k||n.inferUserSetting,sameAs:k||n.sameAsUserSetting,yasrToolbarPlugins:[J],beforeUpdateQuery:X(),outputHandlers:new Map([[u.EventDataType.QUERY_EXECUTED,Q],[u.EventDataType.REQUEST_ABORTED,T]]),clearState:void 0!==e&&e}},n.getActiveRepositoryNoError=()=>U;const M=e=>{const n=(e=>{const n=e.getTab();if(n)return n.getYasqe()})(e);if(n)return h.resolveSparqlEndpoint(n.getQueryMode())},Q=e=>{const n=q.get(e.tabId);n&&(n.dismiss(),q.delete(e.tabId))},T=e=>{if(e&&f.QueryMode.UPDATE!==e.queryMode){const n=e.getRepository(),t=e.getQueryTrackAlias();n&&t&&x.deleteQuery(t,n)}},I=e=>{const n=e[r.RouteConstants.savedQueryName],t=e[r.RouteConstants.savedQueryOwner];S.getSavedQuery(n,t).then(e=>{const n=Object(o.savedQueryResponseMapper)(e);L(n).then(j).finally(P)}).catch(e=>{v.error(b.instant("query.editor.missing.saved.query.data.error",{savedQueryName:n,error:getError(e)}))})},D=e=>{const n=e[r.RouteConstants.name],t=e[r.RouteConstants.query],a=e[r.RouteConstants.owner],i=Object(o.buildQueryModel)(t,n,a,!0);L(i).then(j).finally(P)},L=e=>a.YasguiComponentDirectiveUtil.getOntotextYasguiElementAsync("#query-editor").then(n=>n.openTab(e)).then(e=>a.YasguiComponentDirectiveUtil.highlightTabName(e)),P=()=>{B=!0,m.search({}),m.replace()},j=()=>Object(d.toBoolean)(m.search().execute)?a.YasguiComponentDirectiveUtil.getOntotextYasguiElementAsync("#query-editor").then(N).then(V):Promise.resolve(),N=e=>e.getQueryMode().then(n=>({yasguiComponent:e,queryMode:n})),V=({yasguiComponent:e,queryMode:n})=>"update"!==n?e.query():new Promise(n=>{const t=b.instant("confirm.execute"),o=Object(l.decodeHTML)(b.instant("query.editor.automatically.execute.update.warning"));w.openConfirmation(t,o,()=>n(e.query()),()=>n())}),J={createElement:e=>{const n=document.createElement("span");n.classList.add("explore-visual-graph-button-name");const t=document.createElement("button");return t.classList.add("explore-visual-graph-button"),t.classList.add("icon-data"),t.onclick=function(){const n={query:e.yasqe.getValue(),sameAs:e.yasqe.getSameAs(),inference:e.yasqe.getInfer()};m.path("graphs-visualizations").search(n)},t.appendChild(n),t},updateElement:(e,n)=>{if(e.classList.add("hidden"),!n.hasResults())return;const t=n.yasqe.getQueryType();i.QueryType.CONSTRUCT!==t&&i.QueryType.DESCRIBE!==t||e.classList.remove("hidden"),e.querySelector(".explore-visual-graph-button-name").innerText=b.instant("query.editor.visual.btn")},getOrder:()=>2},F=(e,n)=>({key:e,value:n}),Y=e=>[F("name",e.data.name)],H=(e,t,o)=>{const r=n.$new(!0);r.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:e,eta:"-",inline:!1,iri:t,name:o,doneCallback:function(){a.dismiss("cancel")}},r.getHumanReadableSeconds=n.getHumanReadableSeconds;const a=_.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:r});return a},X=()=>(e,n)=>R.checkConnector(e).then(e=>e.data.command?e.data.hasSupport?s.ConnectorCommand.CREATE===e.data.command?((e,n)=>{const t=H(b.instant("externalsync.creating"),e.data.iri,e.data.name);return q.set(n,t),new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS,"created.connector",Y(e))})(e,n):s.ConnectorCommand.REPAIR===e.data.command?((e,n)=>{const t=H(b.instant("externalsync.repairing"),e.data.iri,e.data.name);return q.set(n,t),new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS,"query.editor.repaired.connector",Y(e))})(e,n):s.ConnectorCommand.DROP===e.data.command?(e=>new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS,"externalsync.delete.success.msg",Y(e)))(e):void 0:(e=>{const n=[F("connectorName",e.data.connectorName),F("pluginName",e.data.pluginName)];return new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.ERROR,"query.editor.inactive.plugin.warning.msg",n)})(e):new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS)).catch(e=>{console.log("Checking connector error: ",e)}),z=e=>{const t=document.querySelectorAll('script[src*="https://www.gstatic.com/"]');if(t.length>0){const e=y.getLanguage();let n="module.js";if("en"!==e&&(n=`module__${e}.js`),!Array.prototype.some.call(t,e=>e.src.includes(n)))return void location.reload()}Promise.all([C.getPrincipal(),h.getPrefixes(U)]).then(([t,o])=>{n.prefixes=o,(e=>{n.inferUserSetting=e.appSettings.DEFAULT_INFERENCE,n.sameAsUserSetting=e.appSettings.DEFAULT_SAMEAS})(t),((e=!1)=>{n.updateConfig(e);const t=m.search();t.hasOwnProperty(r.RouteConstants.savedQueryName)?I(t):t.hasOwnProperty(r.RouteConstants.query)?D(t):E.isActive()&&L()})(e)})},G=[],K=e=>{const n=a.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor");n&&n.abortAllRequests().then(()=>{})};window.addEventListener("beforeunload",K);const W=e=>new Promise((n,t)=>{if(!e||e.queriesCount<1&&e.updatesCount<1)return void n();const o=b.instant("common.confirm"),r=Object(l.decodeHTML)((e=>{let n="view.sparql-editor.leave_page.run_queries.confirmation.";!e||e.queriesCount<1?n+="none_queries_":1===e.queriesCount?n+="one_query_":n+="queries_",e.updatesCount&&0!==e.updatesCount?1===e.updatesCount?n+="one_update":n+="updates":n+="non_updates",n+=".message";const t={queriesCount:e.queriesCount,updatesCount:e.updatesCount};return b.instant(n,t)})(e));w.openSimpleModal({title:o,message:r,warning:!0}).result.then((function(){n()}),(function(){t(new g.CancelAbortingQuery)}))});let Z=void 0;G.push(e.$on("$locationChangeStart",e=>{if(B)return void(B=!1);const n=a.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor");if(!n||Z)return;e.preventDefault();const t=m.path(),o=m.search();n.getOngoingRequestsInfo().then(e=>W(e)).then(()=>n.abortAllRequests()).then(()=>{Z=!0,m.path(t).search(o)}).catch(e=>{if(!(e instanceof g.CancelAbortingQuery))throw e})}));const ee=()=>{$.set(O.SPARQL_LAST_REPO,U)};G.push(n.$on("language-changed",(function(){location.reload()}))),G.push(A.subscribe("before-language-change",(function(e){return new Promise(n=>{w.openSimpleModal({title:b.instant("query.editor.language.change.warning.title"),message:b.instant("query.editor.reload.page.warning"),warning:!0}).result.then((function(){n(e)}),(function(){e.cancel=!0,n(e)}))})}))),G.push(n.$on("$destroy",()=>{ee(),G.forEach(e=>e()),window.removeEventListener("beforeunload",K)})),G.push(n.$watch(n.getActiveRepositoryObject,e=>{e&&(U=h.getActiveRepository(),k=h.isActiveRepoOntopType(e),$.get(O.SPARQL_LAST_REPO)!==U?(z(!0),ee()):z(!1))}))}angular.module("graphdb.framework.sparql-editor.controllers",["ui.bootstrap","graphdb.framework.rest.connectors.service","graphdb.framework.externalsync.controllers","graphdb.framework.utils.event-emitter-service","graphdb.framework.utils.localstorageadapter"]).controller("SparqlEditorCtrl",m),m.$inject=["$rootScope","$scope","$q","$location","$languageService","$jwtAuth","$repositories","$uibModal","toastr","$translate","SparqlRestService","ConnectorsRestService","GuidesService","ModalService","MonitoringRestService","EventEmitterService","LocalStorageAdapter","LSKeys"]},82:function(e,n){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",t),t.$inject=["$http"];function t(e){return{getConnectors:function(){return e.get("rest/connectors")},initConnector:function(n){return e.get("rest/connectors/options?prefix="+n)},hasConnector:function(n){return e.get("rest/connectors/existing?prefix="+n)},checkConnector:function(n){return e.post("rest/connectors/check",n,{headers:{"Content-Type":"text/plain"}})}}}},83:function(e,n,t){"use strict";t.r(n),t.d(n,"removeSpecialChars",(function(){return r})),t.d(n,"toBoolean",(function(){return a})),t.d(n,"toTitleCase",(function(){return i}));var o=t(30);const r=e=>e.replace(/[()']/g,""),a=e=>"string"==typeof e?"true"===e:Boolean(e),i=e=>e?Object(o.upperFirst)(e.toLowerCase()):e}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[15,165,169],{120:function(e,t,s){"use strict";s.r(t),s.d(t,"ImportResourceTreeElement",(function(){return i}));var r=s(71),o=s(30);class i{constructor(){this.importResource=void 0,this.parent=void 0,this.partialSelected=!1,this.indent=0,this.isImportable=!1,this.hasOngoingImport=!1,this.hasStatusInfo=!1,this.canResetStatus=!1,this.name="",this.shortenedName="",this.path="",this.shortenedContext="",this.selected=!1,this.directories=[],this.files=[],this.isImportedBiggerThanModified=!1,this.isModifiedBiggerThanImported=!1,this.isEditable=!1,this.iconClass="",this.shortenedMessage=""}addResource(e){if(e.isFile())this.files.push(e);else{if(!e.isDirectory())throw new Error("Unsupported resource type!");this.directories.push(e)}}removeResource(e){e.isFile()?this.files=this.files.filter(t=>e.importResource.name!==t.importResource.name):this.directories=this.directories.filter(t=>e.importResource.name!==t.importResource.name)}remove(){this.isRoot()||this.parent.removeResource(this)}getOrCreateDirectory(e){let t=this.directories.find(t=>t.name===e);return t||(t=new i,t.name=e,this.directories.push(t)),t}getRoot(){return this.isRoot()?this:this.parent.getRoot()}isRoot(){return void 0===this.parent}isDirectory(){return this.importResource.isDirectory()}isFile(){return!this.isRoot()&&this.importResource.isFile()}isEmpty(){return 0===this.directories.length&&0===this.files.length}toList(){const e=[];return this.parent&&e.push(this),this.directories.forEach(t=>{e.push(...t.toList())}),e.push(...this.files),e}setSelection(e,t=!0){this.selected=e,this.files.forEach(t=>t.setSelection(e,!1)),this.directories.forEach(t=>t.setSelection(e,!1)),t&&this.getRoot().updateSelectionState()}updateSelectionState(){if(this.directories.forEach(e=>e.updateSelectionState()),this.parent&&this.isDirectory()){const e=this.hasUnselectedChildren(),t=this.hasSelectedChildren();this.selected=t&&!e,this.partialSelected=t&&e}}hasUnselectedChildren(){return this.files.some(e=>!e.selected)||this.directories.some(e=>!e.selected||e.hasUnselectedChildren())}hasSelectedChildren(){return this.files.some(e=>e.selected)||this.directories.some(e=>e.selected||e.hasSelectedChildren())}selectAllWithStatus(e){this.importResource&&e.indexOf(this.importResource.status)>-1&&(this.selected=!0),this.files.forEach(t=>t.selectAllWithStatus(e)),this.directories.forEach(t=>t.selectAllWithStatus(e))}getAllSelectedForImport(){const e=[],t=this.isRoot();return!t&&this.selected&&e.push(this),(t||this.isDirectory()&&!this.selected)&&(this.files.forEach(t=>e.push(...t.getAllSelectedForImport())),this.directories.forEach(t=>e.push(...t.getAllSelectedForImport()))),Object(o.cloneDeep)(e)}getAllSelected(){const e=[];return!this.isRoot()&&this.selected&&e.push(this),this.files.forEach(t=>e.push(...t.getAllSelected())),this.directories.forEach(t=>e.push(...t.getAllSelected())),Object(o.cloneDeep)(e)}getSelectedImportedResources(){return this.getAllSelected().some(e=>e.importResource.status===r.ImportResourceStatus.DONE)}deselectAll(){this.files.forEach(e=>e.deselectAll()),this.directories.forEach(e=>e.deselectAll()),this.selected=!1,this.partialSelected=!1}getAllSelectedFiles(){const e=[];return!this.isRoot()&&this.selected&&e.push(this.importResource),this.files.forEach(t=>e.push(...t.getAllSelectedFiles())),this.directories.forEach(t=>e.push(...t.getAllSelectedFiles())),e}getAllSelectedFilesNames(){return this.getAllSelectedFiles().map(e=>e.name)}getResourceByName(e){if(this.importResource&&this.importResource.name===e)return this;const t=this.files.find(t=>t.importResource.name===e);if(t)return t;for(const t of this.directories){const s=t.getResourceByName(e);if(s)return s}return null}hasTextInResourcesName(e){return!!this.importResource.name.toLowerCase().includes(e.toLowerCase())||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e)))}hasTextInDirectoriesName(e){return!(!this.isDirectory()||!this.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e))}hasTextInFilesName(e){return!(!this.isFile()||!this.name.toLowerCase().includes(e.toLowerCase()))||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInFilesName(e)))}sort(e){this.directories.sort(e),this.files.sort(e),this.directories.forEach(t=>t.sort(e))}getSize(){return this.toList().length}}},150:function(e,t){function s(e,t,s,r,o){e.message=o,e.close=()=>{t.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{r.success(s.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{console.error("Could not copy text: ",e)})}}angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",s),s.$inject=["$scope","$uibModalInstance","$translate","toastr","message"]},229:function(e,t,s){"use strict";s.r(t);s(150);var r=s(71),o=s(83);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:t=>{t.ImportResourceStatus=r.ImportResourceStatus,t.toTitleCase=e=>o.toTitleCase(e),t.showMessage=t=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return t?t.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",i),i.$inject=["$uibModal"]},230:function(e,t){function s(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:s=>{const r=[];s.popoverTemplate="resourceStatusInfoTemplate.html",s.popoverIsOpen=!1,s.context=s.resource.importResource.context,s.replaceGraphs=s.resource.importResource.replaceGraphs,s.baseUrl=decodeURIComponent(s.resource.importResource.baseURI),s.forceSerial=s.resource.importResource.forceSerial,s.importedOn=s.resource.importResource.importedOn,s.parserSettings=s.resource.importResource.parserSettings,s.open=()=>{s.closeAllDialogs(),s.popoverIsOpen=!0},s.closeAllDialogs=()=>{e.$broadcast("closePopovers")},s.close=()=>{s.popoverIsOpen=!1};const o=e=>{"Escape"===e.key&&s.$apply(()=>{s.close()})};r.push(s.$on("closePopovers",s.close)),t.on("keydown",o),s.$on("$destroy",()=>{t.off("keydown",o),r.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",s),s.$inject=["$rootScope","$document"]},231:function(e,t,s){"use strict";s.r(t),s.d(t,"INDENT",(function(){return c})),s.d(t,"serverImportResourceTypeToIconMapping",(function(){return a})),s.d(t,"userImportResourceTypeToIconMapping",(function(){return n})),s.d(t,"ImportResourceTreeService",(function(){return u}));var r=s(87),o=s(120),i=s(71);const c=30,a=new Map;a.set(r.ImportResourceType.DIRECTORY,"icon-folder"),a.set(r.ImportResourceType.FILE,"icon-file");const n=new Map;n.set(r.ImportResourceType.DIRECTORY,"icon-folder"),n.set(r.ImportResourceType.FILE,"icon-upload"),n.set(r.ImportResourceType.URL,"icon-link"),n.set(r.ImportResourceType.TEXT,"icon-sparql");class u{static toImportResourceTree(e,t){const s=new o.ImportResourceTreeElement;return e.forEach(e=>{u.addResourceToTree(s,e,t)}),s}static mergeResourceTree(e,t,s){e.getRoot().toList().forEach(e=>{t.find(t=>t.name===e.importResource.name)||e.remove()}),t.forEach(t=>{const r=e.getResourceByName(t.name);r?r.importResource=t:u.addResourceToTree(e,t,s)})}static addResourceToTree(e,t,s){const r=u.getPath(t);let i;i=t.isDirectory()?r:r.slice(0,r.length-1);const c=u.getOrCreateParent(e,i);if(t.isFile()){const e=new o.ImportResourceTreeElement;return e.parent=c,e.importResource=t,e.path=r.join("/"),e.name=r[r.length-1],c.addResource(e),u.setIcon(e,s),e}return c.importResource=t,c.path=r.join("/"),u.setIcon(c,s),c}static setIcon(e,t){e.iconClass=t?n.get(e.importResource.type):a.get(e.importResource.type)}static getOrCreateParent(e,t){let s=e;return t.forEach(e=>{const t=s.getOrCreateDirectory(e);t.parent=s,s=t}),s}static getPath(e){if(e.isURL())return[e.name];const t=/[/\\]/;return t.test(e.name)?e.name.split(t):[e.name]}static calculateElementIndent(e){e.indent=8+u.getParentsCount(e)*c+"px",e.directories.forEach(e=>u.calculateElementIndent(e)),e.files.forEach(e=>u.calculateElementIndent(e))}static setupAfterTreeInitProperties(e){e.isRoot()||(e.isImportable=u.isImportable(e.importResource),e.hasOngoingImport=u.hasOngoingImport(e.importResource),e.canResetStatus=u.canResetStatus(e.importResource),e.hasStatusInfo="DONE"===e.importResource.status||"ERROR"===e.importResource.status,e.isEditable=e.importResource.isText(),u.setupShortenedMessage(e),u.setupShortenedContext(e),u.setupShortenedName(e),u.setupImportedAndModifiedComparableProperties(e)),e.directories.forEach(e=>u.setupAfterTreeInitProperties(e)),e.files.forEach(e=>u.setupAfterTreeInitProperties(e))}static setupShortenedMessage(e){const t=e.importResource?e.importResource.message:"";t&&t.length>150&&(e.shortenedMessage=t.substring(0,150)+"...")}static setupShortenedContext(e){const t=e.importResource?e.importResource.context:"";t.length>63&&(e.shortenedContext=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupShortenedName(e){const t=e.name||"";t.length>123&&(e.shortenedName=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupImportedAndModifiedComparableProperties(e){const t=e.importResource;if(t){if(0===t.importedOn||0===t.modifiedOn||t.importedOn===t.modifiedOn)return;e.isImportedBiggerThanModified=t.importedOn>t.modifiedOn,e.isModifiedBiggerThanImported=!e.isImportedBiggerThanModified}}static isImportable(e){return e.status!==i.ImportResourceStatus.IMPORTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.PENDING&&e.status!==i.ImportResourceStatus.INTERRUPTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.UPLOADED&&e.status!==i.ImportResourceStatus.UPLOAD_ERROR}static hasOngoingImport(e){return e.status===i.ImportResourceStatus.IMPORTING||e.status===i.ImportResourceStatus.UPLOADING||e.status===i.ImportResourceStatus.PENDING||e.status===i.ImportResourceStatus.INTERRUPTING}static canResetStatus(e){return e.status===i.ImportResourceStatus.DONE||e.status===i.ImportResourceStatus.ERROR}static getParentsCount(e){let t=0;if(void 0===e.parent)return t;let s=e.parent;for(;s;)s=s.parent,t++;return t-1}}},276:function(e,t,s){"use strict";s.r(t);var r=s(71),o=(s(229),s(230),s(149)),i=s(120),c=s(89),a=s(231),n=s(22);const u={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},l={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function p(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(s,p,m)=>{s.resources=new i.ImportResourceTreeElement,s.displayResources=[],s.TYPE_FILTER_OPTIONS=u,s.filterByType=u.ALL,s.filterByFileName="",s.STATUS_OPTIONS=l,s.selectedByStatus=void 0,s.areAllDisplayedImportResourcesSelected=!1,s.areAllDisplayedImportResourcesPartialSelected=!1,s.ImportResourceStatus=r.ImportResourceStatus,s.canRemoveResource=angular.isDefined(m.onRemove),s.canResetSelectedResources=!1,s.SORTING_TYPES=o.SortingType,s.sortAsc=!angular.isDefined(m.asc)||s.asc,s.sortedBy=s.sortBy,s.showLoader=t.getShowLoader(),s.hasSelection=!1,s.selectionChanged=e=>{e.setSelection(e.selected),I(),d(),R()},s.selectResourceWithStatus=e=>{s.selectedByStatus=e,s.resources.setSelection(!1),l.ALL===s.selectedByStatus?s.resources.setSelection(!0):l.IMPORTED===s.selectedByStatus?s.resources.selectAllWithStatus([r.ImportResourceStatus.DONE]):l.NOT_IMPORTED===s.selectedByStatus&&s.resources.selectAllWithStatus([r.ImportResourceStatus.IMPORTING,r.ImportResourceStatus.NONE,r.ImportResourceStatus.ERROR,r.ImportResourceStatus.PENDING,r.ImportResourceStatus.INTERRUPTING]),h(),d()},s.filterByTypeChanged=e=>{s.filterByType=e,h()},s.filterByFileNameChanged=e=>{s.filterByFileName=e,D(h,100)},s.onResetStatus=()=>{const e=s.resources.getAllSelected().map(e=>e.path);e.length>0&&s.onReset({resources:e})},s.resetStatus=e=>{s.onReset({resources:[e.path]})},s.onRemoveResources=()=>{const e=s.resources.getAllSelected();e&&e.length>0&&s.onRemove({resources:e})},s.removeResource=e=>{s.onRemove({resources:[e]})},s.importAll=e=>{const t=s.resources.getAllSelectedForImport();t.length>0&&s.onImportAll({selectedResources:t,withoutChangingSettings:e})},s.stopImport=e=>{s.onStopImport({resource:e})},s.sort=e=>{s.sortedBy===e?s.sortAsc=!s.sortAsc:s.sortAsc=!0,s.sortedBy=e,h()},s.editResource=e=>{s.onEditResource({resource:e})};const d=()=>{s.canResetSelectedResources=s.resources.getSelectedImportedResources()},h=()=>{s.resources.getRoot().updateSelectionState(),g(),s.displayResources=s.resources.toList().filter(A).filter(O),R(),I()},R=()=>{const e=s.resources.getAllSelectedFilesNames();s.hasSelection=e.length>0,t.updateSelectedFilesNames(e)},I=()=>{const e=s.displayResources.some(e=>!e.selected),t=s.displayResources.some(e=>e.selected);s.areAllDisplayedImportResourcesSelected=t&&!e,s.areAllDisplayedImportResourcesPartialSelected=t&&e},g=()=>{o.SortingType.NAME===s.sortedBy?s.resources.sort(f(s.sortAsc)):o.SortingType.SIZE===s.sortedBy?s.resources.sort(S(s.sortAsc)):o.SortingType.MODIFIED===s.sortedBy?s.resources.sort(T(s.sortAsc)):o.SortingType.IMPORTED===s.sortedBy?s.resources.sort(E(s.sortAsc)):o.SortingType.CONTEXT===s.sortedBy&&s.resources.sort(y(s.sortAsc))},f=e=>(t,s)=>e?t.importResource.name.localeCompare(s.importResource.name):s.importResource.name.localeCompare(t.importResource.name),S=e=>(t,s)=>{const r=Object(n.convertToBytes)(t.importResource.size),o=Object(n.convertToBytes)(s.importResource.size);return e?r-o:o-r},T=e=>(t,s)=>{const r=t.importResource.modifiedOn||Number.MAX_VALUE,o=s.importResource.modifiedOn||Number.MAX_VALUE;return e?r-o:o-r},E=e=>(t,s)=>{const r=t.importResource.importedOn||Number.MAX_VALUE,o=s.importResource.importedOn||Number.MAX_VALUE;return e?r-o:o-r},y=e=>(t,s)=>e?t.importResource.context.localeCompare(s.importResource.context):s.importResource.context.localeCompare(t.importResource.context),A=e=>u.ALL===s.filterByType||(s.filterByType===u.FILE?e.isFile():s.filterByType===u.DIRECTORY&&e.isDirectory()),O=e=>!s.filterByFileName||(s.filterByType===u.DIRECTORY?e.hasTextInDirectoriesName(s.filterByFileName):s.filterByType===u.FILE?e.hasTextInFilesName(s.filterByFileName):e.hasTextInResourcesName(s.filterByFileName));let N;const D=(t,s)=>{N&&e.cancel(N),N=e(t,s)},C=[];C.push(t.onResourcesUpdated((e=[])=>{const r=c.TABS.USER===t.getActiveTabId();s.resources.isEmpty()?(s.resources=a.ImportResourceTreeService.toImportResourceTree(e,r),r&&(s.sortedBy=o.SortingType.MODIFIED)):a.ImportResourceTreeService.mergeResourceTree(s.resources,e,r),a.ImportResourceTreeService.calculateElementIndent(s.resources),a.ImportResourceTreeService.setupAfterTreeInitProperties(s.resources),h(),d()})),C.push(t.onShowLoaderUpdated(e=>s.showLoader=e)),C.push(t.onActiveTabIdUpdated(()=>s.resources=new i.ImportResourceTreeElement));s.$on("$destroy",()=>{C.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",p),p.$inject=["$timeout","ImportContextService"]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[16,165,169],{120:function(e,t,s){"use strict";s.r(t),s.d(t,"ImportResourceTreeElement",(function(){return i}));var r=s(71),o=s(30);class i{constructor(){this.importResource=void 0,this.parent=void 0,this.partialSelected=!1,this.indent=0,this.isImportable=!1,this.hasOngoingImport=!1,this.hasStatusInfo=!1,this.canResetStatus=!1,this.name="",this.shortenedName="",this.path="",this.shortenedContext="",this.selected=!1,this.directories=[],this.files=[],this.isImportedBiggerThanModified=!1,this.isModifiedBiggerThanImported=!1,this.isEditable=!1,this.iconClass="",this.shortenedMessage=""}addResource(e){if(e.isFile())this.files.push(e);else{if(!e.isDirectory())throw new Error("Unsupported resource type!");this.directories.push(e)}}removeResource(e){e.isFile()?this.files=this.files.filter(t=>e.importResource.name!==t.importResource.name):this.directories=this.directories.filter(t=>e.importResource.name!==t.importResource.name)}remove(){this.isRoot()||this.parent.removeResource(this)}getOrCreateDirectory(e){let t=this.directories.find(t=>t.name===e);return t||(t=new i,t.name=e,this.directories.push(t)),t}getRoot(){return this.isRoot()?this:this.parent.getRoot()}isRoot(){return void 0===this.parent}isDirectory(){return this.importResource.isDirectory()}isFile(){return!this.isRoot()&&this.importResource.isFile()}isEmpty(){return 0===this.directories.length&&0===this.files.length}toList(){const e=[];return this.parent&&e.push(this),this.directories.forEach(t=>{e.push(...t.toList())}),e.push(...this.files),e}setSelection(e,t=!0){this.selected=e,this.files.forEach(t=>t.setSelection(e,!1)),this.directories.forEach(t=>t.setSelection(e,!1)),t&&this.getRoot().updateSelectionState()}updateSelectionState(){if(this.directories.forEach(e=>e.updateSelectionState()),this.parent&&this.isDirectory()){const e=this.hasUnselectedChildren(),t=this.hasSelectedChildren();this.selected=t&&!e,this.partialSelected=t&&e}}hasUnselectedChildren(){return this.files.some(e=>!e.selected)||this.directories.some(e=>!e.selected||e.hasUnselectedChildren())}hasSelectedChildren(){return this.files.some(e=>e.selected)||this.directories.some(e=>e.selected||e.hasSelectedChildren())}selectAllWithStatus(e){this.importResource&&e.indexOf(this.importResource.status)>-1&&(this.selected=!0),this.files.forEach(t=>t.selectAllWithStatus(e)),this.directories.forEach(t=>t.selectAllWithStatus(e))}getAllSelectedForImport(){const e=[],t=this.isRoot();return!t&&this.selected&&e.push(this),(t||this.isDirectory()&&!this.selected)&&(this.files.forEach(t=>e.push(...t.getAllSelectedForImport())),this.directories.forEach(t=>e.push(...t.getAllSelectedForImport()))),Object(o.cloneDeep)(e)}getAllSelected(){const e=[];return!this.isRoot()&&this.selected&&e.push(this),this.files.forEach(t=>e.push(...t.getAllSelected())),this.directories.forEach(t=>e.push(...t.getAllSelected())),Object(o.cloneDeep)(e)}getSelectedImportedResources(){return this.getAllSelected().some(e=>e.importResource.status===r.ImportResourceStatus.DONE)}deselectAll(){this.files.forEach(e=>e.deselectAll()),this.directories.forEach(e=>e.deselectAll()),this.selected=!1,this.partialSelected=!1}getAllSelectedFiles(){const e=[];return!this.isRoot()&&this.selected&&e.push(this.importResource),this.files.forEach(t=>e.push(...t.getAllSelectedFiles())),this.directories.forEach(t=>e.push(...t.getAllSelectedFiles())),e}getAllSelectedFilesNames(){return this.getAllSelectedFiles().map(e=>e.name)}getResourceByName(e){if(this.importResource&&this.importResource.name===e)return this;const t=this.files.find(t=>t.importResource.name===e);if(t)return t;for(const t of this.directories){const s=t.getResourceByName(e);if(s)return s}return null}hasTextInResourcesName(e){return!!this.importResource.name.toLowerCase().includes(e.toLowerCase())||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e)))}hasTextInDirectoriesName(e){return!(!this.isDirectory()||!this.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e))}hasTextInFilesName(e){return!(!this.isFile()||!this.name.toLowerCase().includes(e.toLowerCase()))||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInFilesName(e)))}sort(e){this.directories.sort(e),this.files.sort(e),this.directories.forEach(t=>t.sort(e))}getSize(){return this.toList().length}}},149:function(e,t){function s(e,t,s,r,o){e.message=o,e.close=()=>{t.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{r.success(s.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{console.error("Could not copy text: ",e)})}}angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",s),s.$inject=["$scope","$uibModalInstance","$translate","toastr","message"]},229:function(e,t,s){"use strict";s.r(t);s(149);var r=s(71),o=s(83);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:t=>{t.ImportResourceStatus=r.ImportResourceStatus,t.toTitleCase=e=>o.toTitleCase(e),t.showMessage=t=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return t?t.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",i),i.$inject=["$uibModal"]},230:function(e,t){function s(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:s=>{const r=[];s.popoverTemplate="resourceStatusInfoTemplate.html",s.popoverIsOpen=!1,s.context=s.resource.importResource.context,s.replaceGraphs=s.resource.importResource.replaceGraphs,s.baseUrl=decodeURIComponent(s.resource.importResource.baseURI),s.forceSerial=s.resource.importResource.forceSerial,s.importedOn=s.resource.importResource.importedOn,s.parserSettings=s.resource.importResource.parserSettings,s.open=()=>{s.closeAllDialogs(),s.popoverIsOpen=!0},s.closeAllDialogs=()=>{e.$broadcast("closePopovers")},s.close=()=>{s.popoverIsOpen=!1};const o=e=>{"Escape"===e.key&&s.$apply(()=>{s.close()})};r.push(s.$on("closePopovers",s.close)),t.on("keydown",o),s.$on("$destroy",()=>{t.off("keydown",o),r.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",s),s.$inject=["$rootScope","$document"]},231:function(e,t,s){"use strict";s.r(t),s.d(t,"INDENT",(function(){return c})),s.d(t,"serverImportResourceTypeToIconMapping",(function(){return a})),s.d(t,"userImportResourceTypeToIconMapping",(function(){return n})),s.d(t,"ImportResourceTreeService",(function(){return u}));var r=s(87),o=s(120),i=s(71);const c=30,a=new Map;a.set(r.ImportResourceType.DIRECTORY,"icon-folder"),a.set(r.ImportResourceType.FILE,"icon-file");const n=new Map;n.set(r.ImportResourceType.DIRECTORY,"icon-folder"),n.set(r.ImportResourceType.FILE,"icon-upload"),n.set(r.ImportResourceType.URL,"icon-link"),n.set(r.ImportResourceType.TEXT,"icon-sparql");class u{static toImportResourceTree(e,t){const s=new o.ImportResourceTreeElement;return e.forEach(e=>{u.addResourceToTree(s,e,t)}),s}static mergeResourceTree(e,t,s){e.getRoot().toList().forEach(e=>{t.find(t=>t.name===e.importResource.name)||e.remove()}),t.forEach(t=>{const r=e.getResourceByName(t.name);r?r.importResource=t:u.addResourceToTree(e,t,s)})}static addResourceToTree(e,t,s){const r=u.getPath(t);let i;i=t.isDirectory()?r:r.slice(0,r.length-1);const c=u.getOrCreateParent(e,i);if(t.isFile()){const e=new o.ImportResourceTreeElement;return e.parent=c,e.importResource=t,e.path=r.join("/"),e.name=r[r.length-1],c.addResource(e),u.setIcon(e,s),e}return c.importResource=t,c.path=r.join("/"),u.setIcon(c,s),c}static setIcon(e,t){e.iconClass=t?n.get(e.importResource.type):a.get(e.importResource.type)}static getOrCreateParent(e,t){let s=e;return t.forEach(e=>{const t=s.getOrCreateDirectory(e);t.parent=s,s=t}),s}static getPath(e){if(e.isURL())return[e.name];const t=/[/\\]/;return t.test(e.name)?e.name.split(t):[e.name]}static calculateElementIndent(e){e.indent=8+u.getParentsCount(e)*c+"px",e.directories.forEach(e=>u.calculateElementIndent(e)),e.files.forEach(e=>u.calculateElementIndent(e))}static setupAfterTreeInitProperties(e){e.isRoot()||(e.isImportable=u.isImportable(e.importResource),e.hasOngoingImport=u.hasOngoingImport(e.importResource),e.canResetStatus=u.canResetStatus(e.importResource),e.hasStatusInfo="DONE"===e.importResource.status||"ERROR"===e.importResource.status,e.isEditable=e.importResource.isText(),u.setupShortenedMessage(e),u.setupShortenedContext(e),u.setupShortenedName(e),u.setupImportedAndModifiedComparableProperties(e)),e.directories.forEach(e=>u.setupAfterTreeInitProperties(e)),e.files.forEach(e=>u.setupAfterTreeInitProperties(e))}static setupShortenedMessage(e){const t=e.importResource?e.importResource.message:"";t&&t.length>150&&(e.shortenedMessage=t.substring(0,150)+"...")}static setupShortenedContext(e){const t=e.importResource?e.importResource.context:"";t.length>63&&(e.shortenedContext=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupShortenedName(e){const t=e.name||"";t.length>123&&(e.shortenedName=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupImportedAndModifiedComparableProperties(e){const t=e.importResource;if(t){if(0===t.importedOn||0===t.modifiedOn||t.importedOn===t.modifiedOn)return;e.isImportedBiggerThanModified=t.importedOn>t.modifiedOn,e.isModifiedBiggerThanImported=!e.isImportedBiggerThanModified}}static isImportable(e){return e.status!==i.ImportResourceStatus.IMPORTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.PENDING&&e.status!==i.ImportResourceStatus.INTERRUPTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.UPLOADED&&e.status!==i.ImportResourceStatus.UPLOAD_ERROR}static hasOngoingImport(e){return e.status===i.ImportResourceStatus.IMPORTING||e.status===i.ImportResourceStatus.UPLOADING||e.status===i.ImportResourceStatus.PENDING||e.status===i.ImportResourceStatus.INTERRUPTING}static canResetStatus(e){return e.status===i.ImportResourceStatus.DONE||e.status===i.ImportResourceStatus.ERROR}static getParentsCount(e){let t=0;if(void 0===e.parent)return t;let s=e.parent;for(;s;)s=s.parent,t++;return t-1}}},276:function(e,t,s){"use strict";s.r(t);var r=s(71),o=(s(229),s(230),s(148)),i=s(120),c=s(88),a=s(231),n=s(22);const u={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},l={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function p(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(s,p,m)=>{s.resources=new i.ImportResourceTreeElement,s.displayResources=[],s.TYPE_FILTER_OPTIONS=u,s.filterByType=u.ALL,s.filterByFileName="",s.STATUS_OPTIONS=l,s.selectedByStatus=void 0,s.areAllDisplayedImportResourcesSelected=!1,s.areAllDisplayedImportResourcesPartialSelected=!1,s.ImportResourceStatus=r.ImportResourceStatus,s.canRemoveResource=angular.isDefined(m.onRemove),s.canResetSelectedResources=!1,s.SORTING_TYPES=o.SortingType,s.sortAsc=!angular.isDefined(m.asc)||s.asc,s.sortedBy=s.sortBy,s.showLoader=t.getShowLoader(),s.hasSelection=!1,s.selectionChanged=e=>{e.setSelection(e.selected),I(),d(),R()},s.selectResourceWithStatus=e=>{s.selectedByStatus=e,s.resources.setSelection(!1),l.ALL===s.selectedByStatus?s.resources.setSelection(!0):l.IMPORTED===s.selectedByStatus?s.resources.selectAllWithStatus([r.ImportResourceStatus.DONE]):l.NOT_IMPORTED===s.selectedByStatus&&s.resources.selectAllWithStatus([r.ImportResourceStatus.IMPORTING,r.ImportResourceStatus.NONE,r.ImportResourceStatus.ERROR,r.ImportResourceStatus.PENDING,r.ImportResourceStatus.INTERRUPTING]),h(),d()},s.filterByTypeChanged=e=>{s.filterByType=e,h()},s.filterByFileNameChanged=e=>{s.filterByFileName=e,D(h,100)},s.onResetStatus=()=>{const e=s.resources.getAllSelected().map(e=>e.path);e.length>0&&s.onReset({resources:e})},s.resetStatus=e=>{s.onReset({resources:[e.path]})},s.onRemoveResources=()=>{const e=s.resources.getAllSelected();e&&e.length>0&&s.onRemove({resources:e})},s.removeResource=e=>{s.onRemove({resources:[e]})},s.importAll=e=>{const t=s.resources.getAllSelectedForImport();t.length>0&&s.onImportAll({selectedResources:t,withoutChangingSettings:e})},s.stopImport=e=>{s.onStopImport({resource:e})},s.sort=e=>{s.sortedBy===e?s.sortAsc=!s.sortAsc:s.sortAsc=!0,s.sortedBy=e,h()},s.editResource=e=>{s.onEditResource({resource:e})};const d=()=>{s.canResetSelectedResources=s.resources.getSelectedImportedResources()},h=()=>{s.resources.getRoot().updateSelectionState(),g(),s.displayResources=s.resources.toList().filter(A).filter(O),R(),I()},R=()=>{const e=s.resources.getAllSelectedFilesNames();s.hasSelection=e.length>0,t.updateSelectedFilesNames(e)},I=()=>{const e=s.displayResources.some(e=>!e.selected),t=s.displayResources.some(e=>e.selected);s.areAllDisplayedImportResourcesSelected=t&&!e,s.areAllDisplayedImportResourcesPartialSelected=t&&e},g=()=>{o.SortingType.NAME===s.sortedBy?s.resources.sort(f(s.sortAsc)):o.SortingType.SIZE===s.sortedBy?s.resources.sort(S(s.sortAsc)):o.SortingType.MODIFIED===s.sortedBy?s.resources.sort(T(s.sortAsc)):o.SortingType.IMPORTED===s.sortedBy?s.resources.sort(E(s.sortAsc)):o.SortingType.CONTEXT===s.sortedBy&&s.resources.sort(y(s.sortAsc))},f=e=>(t,s)=>e?t.importResource.name.localeCompare(s.importResource.name):s.importResource.name.localeCompare(t.importResource.name),S=e=>(t,s)=>{const r=Object(n.convertToBytes)(t.importResource.size),o=Object(n.convertToBytes)(s.importResource.size);return e?r-o:o-r},T=e=>(t,s)=>{const r=t.importResource.modifiedOn||Number.MAX_VALUE,o=s.importResource.modifiedOn||Number.MAX_VALUE;return e?r-o:o-r},E=e=>(t,s)=>{const r=t.importResource.importedOn||Number.MAX_VALUE,o=s.importResource.importedOn||Number.MAX_VALUE;return e?r-o:o-r},y=e=>(t,s)=>e?t.importResource.context.localeCompare(s.importResource.context):s.importResource.context.localeCompare(t.importResource.context),A=e=>u.ALL===s.filterByType||(s.filterByType===u.FILE?e.isFile():s.filterByType===u.DIRECTORY&&e.isDirectory()),O=e=>!s.filterByFileName||(s.filterByType===u.DIRECTORY?e.hasTextInDirectoriesName(s.filterByFileName):s.filterByType===u.FILE?e.hasTextInFilesName(s.filterByFileName):e.hasTextInResourcesName(s.filterByFileName));let N;const D=(t,s)=>{N&&e.cancel(N),N=e(t,s)},C=[];C.push(t.onResourcesUpdated((e=[])=>{const r=c.TABS.USER===t.getActiveTabId();s.resources.isEmpty()?(s.resources=a.ImportResourceTreeService.toImportResourceTree(e,r),r&&(s.sortedBy=o.SortingType.MODIFIED)):a.ImportResourceTreeService.mergeResourceTree(s.resources,e,r),a.ImportResourceTreeService.calculateElementIndent(s.resources),a.ImportResourceTreeService.setupAfterTreeInitProperties(s.resources),h(),d()})),C.push(t.onShowLoaderUpdated(e=>s.showLoader=e)),C.push(t.onActiveTabIdUpdated(()=>s.resources=new i.ImportResourceTreeElement));s.$on("$destroy",()=>{C.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",p),p.$inject=["$timeout","ImportContextService"]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[165],{150:function(o,e){function s(o,e,s,r,a){o.message=a,o.close=()=>{e.dismiss()},o.copyToClipboard=()=>{navigator.clipboard.writeText(o.message).then(()=>{r.success(s.instant("import.help.messages.copied_to_clipboard")),o.close()},o=>{console.error("Could not copy text: ",o)})}}angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",s),s.$inject=["$scope","$uibModalInstance","$translate","toastr","message"]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[165],{149:function(o,e){function s(o,e,s,r,a){o.message=a,o.close=()=>{e.dismiss()},o.copyToClipboard=()=>{navigator.clipboard.writeText(o.message).then(()=>{r.success(s.instant("import.help.messages.copied_to_clipboard")),o.close()},o=>{console.error("Could not copy text: ",o)})}}angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",s),s.$inject=["$scope","$uibModalInstance","$translate","toastr","message"]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[168],{228:function(t,e){function o(){return{link:function(t,e,o){t.$watch("file.status",(function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.8.0-TR2">{{\'common.loading\' | translate}}</object>')}))}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",o),o.$inject=[]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[168],{228:function(t,e){function o(){return{link:function(t,e,o){t.$watch("file.status",(function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.8.0-TR3">{{\'common.loading\' | translate}}</object>')}))}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",o),o.$inject=[]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[16,74,116,267,275],{115:function(e,t,s){"use strict";s.r(t),s.d(t,"ACListModel",(function(){return r})),s.d(t,"ACRuleModel",(function(){return i})),s.d(t,"StatementACRuleModel",(function(){return n})),s.d(t,"PluginACRuleModel",(function(){return l})),s.d(t,"ClearGraphACRuleModel",(function(){return a})),s.d(t,"SystemACRuleModel",(function(){return c})),s.d(t,"ACL_POLICY",(function(){return d})),s.d(t,"ACL_OPERATION",(function(){return p})),s.d(t,"ACL_SCOPE",(function(){return h})),s.d(t,"DEFAULT_CONTEXT_VALUES",(function(){return g})),s.d(t,"DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES",(function(){return R})),s.d(t,"DEFAULT_URI_VALUES",(function(){return _}));var o=s(30);class r{constructor(e=[]){this._aclRules=new Map,e.forEach(e=>{const t=e.scope;this._aclRules.has(t)||this._aclRules.set(t,[]),this._aclRules.get(t).push(e)})}size(e){return this._aclRules.get(e)&&this._aclRules.get(e).length}appendNewRule(e,t,s,o,r,i,n,l,a){const c=u.createRule(e,t,s,o,r,i,n,l,a);this._aclRules.has(e)||this._aclRules.set(e,[]),c.checkCustomOrNegatedPrefix(),this._aclRules.get(e).push(c)}addRule(e,t){const s=this._aclRules.get(e);s?s.splice(t,0,u.createRule(e)):this._aclRules.set(e,[u.createRule(e)])}removeRule(e,t){const s=this._aclRules.get(e);s&&s.splice(t,1)}replaceRule(e,t,s){const o=this._aclRules.get(e);o&&o.splice(t,1,s)}getRule(e,t){const s=this._aclRules.get(e);return s?s[t]:null}isRuleDuplicated(e,t){const s=this.getRule(e,t);return!!s&&this._aclRules.get(e).some((e,r)=>r!==t&&Object(o.isEqual)(s,e))}setPrefixWarningFlag(e,t){const s=this.getRule(e,t);s&&s.checkCustomOrNegatedPrefix()}getRuleCopy(e,t){const s=this.getRule(e,t);return u.createRule(s.scope,s.policy,s.role,s.operation,s.subject,s.predicate,s.object,s.context,s.plugin)}moveUp(e,t){const s=this._aclRules.get(e),o=s[t-1];s[t-1]=s[t],s[t]=o}moveDown(e,t){const s=this._aclRules.get(e),o=s[t+1];s[t+1]=s[t],s[t]=o}toJSON(){const e=[];return this._aclRules.forEach(t=>{t.forEach(t=>e.push(t.toJSON()))}),e}get aclRules(){return this._aclRules}set aclRules(e){this._aclRules=e}getRulesByScope(e){return this._aclRules.get(e)||[]}getRuleKeysByScope(e){return Object.keys(this.getRulesByScope(e)[0]||{})}}class i{constructor(e,t,s=d.ALLOW){this._scope=e,this._role=t,this._policy=s}get scope(){return this._scope}set scope(e){this._scope=e}get roleWithoutCustomPrefix(){return this._role.startsWith("!")?this._role.replace("CUSTOM_"," "):this._role.replace("CUSTOM_","")}get role(){return this._role}set role(e){this._role=e}get policy(){return this._policy}set policy(e){this._policy=e}get warnForPrefix(){return this._warnForPrefix}checkCustomOrNegatedPrefix(){this._warnForPrefix=this.role.startsWith("CUSTOM_CUSTOM_")||this.role.startsWith("!CUSTOM_CUSTOM_")}toJSON(){}}class n extends i{constructor(e,t,s,o,r,i,n){super(h.STATEMENT,e,t),this._subject=s||"*",this._predicate=o||"*",this._object=r||"*",this._context=i||"*",this._operation=n||p.ALL}get subject(){return this._subject}set subject(e){this._subject=e}get predicate(){return this._predicate}set predicate(e){this._predicate=e}get object(){return this._object}set object(e){this._object=e}get context(){return this._context}set context(e){this._context=e}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,subject:this.subject,predicate:this.predicate,object:this.object,context:this.context,warnForPrefix:this.warnForPrefix}}}class l extends i{constructor(e,t,s,o){super(h.PLUGIN,e,t),this._plugin=s||"*",this._operation=o||p.ALL}get plugin(){return this._plugin}set plugin(e){this._plugin=e}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,plugin:this.plugin,warnForPrefix:this.warnForPrefix}}}class a extends i{constructor(e,t,s,o){super(h.CLEAR_GRAPH,e,t),this._context=s||"*",this._defaultResults=o||["*","default","custom"]}get context(){return this._context}set context(e){this._context=e}get defaultResults(){return this._defaultResults}set defaultResults(e){this._defaultResults=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,context:this.context,warnForPrefix:this.warnForPrefix}}}class c extends i{constructor(e,t,s){super(h.SYSTEM,e,t),this._operation=s||p.ALL}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,warnForPrefix:this.warnForPrefix}}}class u{static createRule(e,t,s,o,r,i,u,d,p){switch(e){case h.STATEMENT:return new n(s,t,r,i,u,d,o);case h.PLUGIN:return new l(s,t,p,o);case h.CLEAR_GRAPH:return new a(s,t,d);case h.SYSTEM:return new c(s,t,o);default:throw new Error("Invalid scope: "+e+" provided")}}}const d={ALLOW:"allow",DENY:"deny"},p={READ:"read",WRITE:"write",ALL:"*"},h={STATEMENT:"statement",CLEAR_GRAPH:"clear_graph",PLUGIN:"plugin",SYSTEM:"system"},g=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"},{type:"default",value:"default",description:"acl_management.defaults.default"},{type:"default",value:"named",description:"acl_management.defaults.named"}],R=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"},{type:"default",value:"all",description:"acl_management.defaults.all"},{type:"default",value:"default",description:"acl_management.defaults.default"},{type:"default",value:"named",description:"acl_management.defaults.named"}],_=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"}]},168:function(e,t){angular.module("graphdb.framework.rest.aclmanagement.service",[]).factory("AclManagementRestService",s),s.$inject=["$http"];function s(e){return{getAcl:function(t){return e.get(`rest/repositories/${t}/acl`)},updateAcl:function(t,s){return e.put(`rest/repositories/${t}/acl`,s)}}}},169:function(e,t,s){"use strict";s.r(t),s.d(t,"mapAclRulesResponse",(function(){return r}));var o=s(115);const r=e=>{const t=new o.ACListModel;return e&&e.data&&e.data.forEach(e=>{t.appendNewRule(e.scope,e.policy,e.role,e.operation,e.subject,e.predicate,e.object,e.context,e.plugin)}),t}},272:function(e,t,s){"use strict";s.r(t);s(40),s(168);var o=s(169),r=s(30),i=s(90),n=s(115);function l(e,t,s,l,a,c,u,d,p){e.contextValue=void 0;const h=[];e.ruleData={},e.loading=!1,e.namespaces=[],e.rulesModel=void 0,e.rulesModelCopy=void 0,e.selectedRule=void 0,e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.editedRuleCopy=void 0,e.isNewRule=!1,e.modelIsDirty=!1,e.dirtyScope=new Set,e.activeTabScope=n.ACL_SCOPE.STATEMENT,e.ACL_SCOPE=n.ACL_SCOPE,e.DEFAULT_CONTEXT_VALUES=n.DEFAULT_CONTEXT_VALUES,e.DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES=n.DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES,e.DEFAULT_URI_VALUES=n.DEFAULT_URI_VALUES,e.rowHeights={},e.hasCustomPrefix=!1,e.isEditMode=()=>void 0===e.editedRuleIndex&&e.rulesModel&&e.modelIsDirty&&e.dirtyScope.size>0,e.addRule=(t,s)=>{e.rulesModel.addRule(t,s),e.showPrefixWarningIcon(!1),e.editedRuleIndex=s,e.editedRuleScope=t,e.isNewRule=!0,f(t)},e.editRule=(t,s)=>{e.editedRuleIndex=s,e.editedRuleScope=t,e.isNewRule=!1,e.editedRuleCopy=e.rulesModel.getRuleCopy(t,s),e.rulesModel.setPrefixWarningFlag(t,s),e.getRowHeight="height: "+e.rowHeights[e.editedRuleIndex],f(t)},e.deleteRule=(t,s)=>{u.openConfirmation(c.instant("common.confirm"),c.instant("acl_management.rulestable.messages.delete_rule_confirmation",{index:s+1}),()=>{e.rulesModel.removeRule(t,s),f(t)})},e.saveRule=t=>{e.rulesModel.setPrefixWarningFlag(e.editedRuleScope,e.editedRuleIndex),e.rulesModel.isRuleDuplicated(e.editedRuleScope,e.editedRuleIndex)?S():(e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.isNewRule=!1,f(t))},e.cancelEditing=(t,s)=>{e.isNewRule?(e.rulesModel.removeRule(t,s),e.isNewRule=!1):(e.rulesModel.replaceRule(t,s,e.editedRuleCopy),e.editedRuleCopy=void 0),e.rulesModel.setPrefixWarningFlag(t,s),e.editedRuleIndex=void 0,e.editedRuleScope=void 0,f(t)},e.moveUp=(t,s)=>{e.rulesModel.moveUp(t,s),f(t),e.modelIsDirty?e.selectedRule=s-1:e.selectedRule=void 0},e.moveDown=(t,s)=>{e.rulesModel.moveDown(t,s),f(t),e.modelIsDirty?e.selectedRule=s+1:e.selectedRule=void 0},e.saveAcl=()=>{e.loading=!0,R().then(g).catch(e=>{const t=getError(e);s.error(t,c.instant("acl_management.errors.updating_rules"))}).finally(()=>{e.loading=!1})},e.cancelAclSave=()=>{u.openConfirmation(c.instant("common.confirm"),c.instant("acl_management.rulestable.messages.revert_acl_list"),()=>{_(),s.success(c.instant("acl_management.rulestable.messages.rules_reverted"))})},e.switchTab=(t,s)=>{void 0===e.editedRuleIndex?(e.selectedRule=void 0,e.activeTabScope=s,e.ruleKeys=e.rulesModel.getRuleKeysByScope(e.activeTabScope)):t.preventDefault()},e.setDirty=function(e){f(e)},e.showPrefixWarningIcon=function(t){e.hasCustomPrefix=t},e.performSearchActionOnEnter=function(t,s,o){13===t.keyCode&&(t.stopPropagation(),t.preventDefault(),e.triggerValidation(o),o.$valid&&e.saveRule(s))},e.triggerValidation=function(e){angular.forEach(e,(function(e){"object"==typeof e&&e.hasOwnProperty("$modelValue")&&e.$setTouched()}))};const g=()=>{const t=A();return l.getAcl(t).then(t=>{e.rulesModel=Object(o.mapAclRulesResponse)(t),e.rulesModelCopy=Object(o.mapAclRulesResponse)(t),m()}).catch(e=>{const t=getError(e);s.error(t,c.instant("acl_management.errors.loading_rules"))})},R=()=>{const t=A();return l.updateAcl(t,e.rulesModel.toJSON()).then(()=>{s.success(c.instant("acl_management.rulestable.messages.rules_updated"))})},_=()=>{A()&&(e.loading=!0,g().finally(()=>{e.loading=!1}))},m=()=>{e.selectedRule=void 0,e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.modelIsDirty=!1,e.editedRuleCopy=void 0,e.dirtyScope.clear()},f=t=>{!Object(r.isEqual)(e.rulesModel.getRulesByScope(t),e.rulesModelCopy.getRulesByScope(t))?e.dirtyScope.add(t):e.dirtyScope.delete(t),e.modelIsDirty=e.dirtyScope.size>0},A=()=>a.getActiveRepository(),S=()=>{s.error(c.instant("acl_management.errors.duplicated_rules"))},v=t=>{e.modelIsDirty&&(t.returnValue=!0)},y=()=>{window.removeEventListener("beforeunload",v),h.forEach(e=>e())},E=(s,o)=>{e.modelIsDirty&&(s.preventDefault(),u.openSimpleModal({title:c.instant("common.confirm"),message:c.instant("acl_management.rulestable.messages.unsaved_changes_confirmation"),warning:!0}).result.then((function(){y();const e=t.absUrl().length-t.url().length,s=o.substring(e);t.path(s)}),(function(){})))},x=()=>{e.getAutocompletePromise=p.checkAutocompleteStatus()};a.getActiveRepository()&&d.getNamespaces(a.getActiveRepository()).then(i.mapNamespacesResponse).then(t=>{e.namespaces=t}).catch(e=>{const t=getError(e);s.error(t,c.instant("error.getting.namespaces.for.repo"))}),h.push(e.$on("autocompleteStatus",x)),h.push(e.$watch(A,()=>{m(),_()})),h.push(e.$on("$locationChangeStart",E)),h.push(e.$on("$destroy",y)),window.addEventListener("beforeunload",v)}angular.module("graphdb.framework.aclmanagement.controllers",["graphdb.framework.rest.plugins.service","graphdb.framework.rest.aclmanagement.service"]).controller("AclManagementCtrl",l),l.$inject=["$scope","$location","toastr","AclManagementRestService","$repositories","$translate","ModalService","RDF4JRepositoriesRestService","AutocompleteRestService"]},90:function(e,t,s){"use strict";s.r(t),s.d(t,"mapNamespacesResponse",(function(){return o}));const o=e=>e&&e.data?e.data.results.bindings.map(e=>({prefix:e.prefix.value,uri:e.namespace.value})):[]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[17,74,116,267,275],{115:function(e,t,s){"use strict";s.r(t),s.d(t,"ACListModel",(function(){return r})),s.d(t,"ACRuleModel",(function(){return i})),s.d(t,"StatementACRuleModel",(function(){return n})),s.d(t,"PluginACRuleModel",(function(){return l})),s.d(t,"ClearGraphACRuleModel",(function(){return a})),s.d(t,"SystemACRuleModel",(function(){return c})),s.d(t,"ACL_POLICY",(function(){return d})),s.d(t,"ACL_OPERATION",(function(){return p})),s.d(t,"ACL_SCOPE",(function(){return h})),s.d(t,"DEFAULT_CONTEXT_VALUES",(function(){return g})),s.d(t,"DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES",(function(){return R})),s.d(t,"DEFAULT_URI_VALUES",(function(){return _}));var o=s(30);class r{constructor(e=[]){this._aclRules=new Map,e.forEach(e=>{const t=e.scope;this._aclRules.has(t)||this._aclRules.set(t,[]),this._aclRules.get(t).push(e)})}size(e){return this._aclRules.get(e)&&this._aclRules.get(e).length}appendNewRule(e,t,s,o,r,i,n,l,a){const c=u.createRule(e,t,s,o,r,i,n,l,a);this._aclRules.has(e)||this._aclRules.set(e,[]),c.checkCustomOrNegatedPrefix(),this._aclRules.get(e).push(c)}addRule(e,t){const s=this._aclRules.get(e);s?s.splice(t,0,u.createRule(e)):this._aclRules.set(e,[u.createRule(e)])}removeRule(e,t){const s=this._aclRules.get(e);s&&s.splice(t,1)}replaceRule(e,t,s){const o=this._aclRules.get(e);o&&o.splice(t,1,s)}getRule(e,t){const s=this._aclRules.get(e);return s?s[t]:null}isRuleDuplicated(e,t){const s=this.getRule(e,t);return!!s&&this._aclRules.get(e).some((e,r)=>r!==t&&Object(o.isEqual)(s,e))}setPrefixWarningFlag(e,t){const s=this.getRule(e,t);s&&s.checkCustomOrNegatedPrefix()}getRuleCopy(e,t){const s=this.getRule(e,t);return u.createRule(s.scope,s.policy,s.role,s.operation,s.subject,s.predicate,s.object,s.context,s.plugin)}moveUp(e,t){const s=this._aclRules.get(e),o=s[t-1];s[t-1]=s[t],s[t]=o}moveDown(e,t){const s=this._aclRules.get(e),o=s[t+1];s[t+1]=s[t],s[t]=o}toJSON(){const e=[];return this._aclRules.forEach(t=>{t.forEach(t=>e.push(t.toJSON()))}),e}get aclRules(){return this._aclRules}set aclRules(e){this._aclRules=e}getRulesByScope(e){return this._aclRules.get(e)||[]}getRuleKeysByScope(e){return Object.keys(this.getRulesByScope(e)[0]||{})}}class i{constructor(e,t,s=d.ALLOW){this._scope=e,this._role=t,this._policy=s}get scope(){return this._scope}set scope(e){this._scope=e}get roleWithoutCustomPrefix(){return this._role.startsWith("!")?this._role.replace("CUSTOM_"," "):this._role.replace("CUSTOM_","")}get role(){return this._role}set role(e){this._role=e}get policy(){return this._policy}set policy(e){this._policy=e}get warnForPrefix(){return this._warnForPrefix}checkCustomOrNegatedPrefix(){this._warnForPrefix=this.role.startsWith("CUSTOM_CUSTOM_")||this.role.startsWith("!CUSTOM_CUSTOM_")}toJSON(){}}class n extends i{constructor(e,t,s,o,r,i,n){super(h.STATEMENT,e,t),this._subject=s||"*",this._predicate=o||"*",this._object=r||"*",this._context=i||"*",this._operation=n||p.ALL}get subject(){return this._subject}set subject(e){this._subject=e}get predicate(){return this._predicate}set predicate(e){this._predicate=e}get object(){return this._object}set object(e){this._object=e}get context(){return this._context}set context(e){this._context=e}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,subject:this.subject,predicate:this.predicate,object:this.object,context:this.context,warnForPrefix:this.warnForPrefix}}}class l extends i{constructor(e,t,s,o){super(h.PLUGIN,e,t),this._plugin=s||"*",this._operation=o||p.ALL}get plugin(){return this._plugin}set plugin(e){this._plugin=e}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,plugin:this.plugin,warnForPrefix:this.warnForPrefix}}}class a extends i{constructor(e,t,s,o){super(h.CLEAR_GRAPH,e,t),this._context=s||"*",this._defaultResults=o||["*","default","custom"]}get context(){return this._context}set context(e){this._context=e}get defaultResults(){return this._defaultResults}set defaultResults(e){this._defaultResults=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,context:this.context,warnForPrefix:this.warnForPrefix}}}class c extends i{constructor(e,t,s){super(h.SYSTEM,e,t),this._operation=s||p.ALL}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,warnForPrefix:this.warnForPrefix}}}class u{static createRule(e,t,s,o,r,i,u,d,p){switch(e){case h.STATEMENT:return new n(s,t,r,i,u,d,o);case h.PLUGIN:return new l(s,t,p,o);case h.CLEAR_GRAPH:return new a(s,t,d);case h.SYSTEM:return new c(s,t,o);default:throw new Error("Invalid scope: "+e+" provided")}}}const d={ALLOW:"allow",DENY:"deny"},p={READ:"read",WRITE:"write",ALL:"*"},h={STATEMENT:"statement",CLEAR_GRAPH:"clear_graph",PLUGIN:"plugin",SYSTEM:"system"},g=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"},{type:"default",value:"default",description:"acl_management.defaults.default"},{type:"default",value:"named",description:"acl_management.defaults.named"}],R=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"},{type:"default",value:"all",description:"acl_management.defaults.all"},{type:"default",value:"default",description:"acl_management.defaults.default"},{type:"default",value:"named",description:"acl_management.defaults.named"}],_=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"}]},166:function(e,t){angular.module("graphdb.framework.rest.aclmanagement.service",[]).factory("AclManagementRestService",s),s.$inject=["$http"];function s(e){return{getAcl:function(t){return e.get(`rest/repositories/${t}/acl`)},updateAcl:function(t,s){return e.put(`rest/repositories/${t}/acl`,s)}}}},167:function(e,t,s){"use strict";s.r(t),s.d(t,"mapAclRulesResponse",(function(){return r}));var o=s(115);const r=e=>{const t=new o.ACListModel;return e&&e.data&&e.data.forEach(e=>{t.appendNewRule(e.scope,e.policy,e.role,e.operation,e.subject,e.predicate,e.object,e.context,e.plugin)}),t}},272:function(e,t,s){"use strict";s.r(t);s(40),s(166);var o=s(167),r=s(30),i=s(89),n=s(115);function l(e,t,s,l,a,c,u,d,p){e.contextValue=void 0;const h=[];e.ruleData={},e.loading=!1,e.namespaces=[],e.rulesModel=void 0,e.rulesModelCopy=void 0,e.selectedRule=void 0,e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.editedRuleCopy=void 0,e.isNewRule=!1,e.modelIsDirty=!1,e.dirtyScope=new Set,e.activeTabScope=n.ACL_SCOPE.STATEMENT,e.ACL_SCOPE=n.ACL_SCOPE,e.DEFAULT_CONTEXT_VALUES=n.DEFAULT_CONTEXT_VALUES,e.DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES=n.DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES,e.DEFAULT_URI_VALUES=n.DEFAULT_URI_VALUES,e.rowHeights={},e.hasCustomPrefix=!1,e.isEditMode=()=>void 0===e.editedRuleIndex&&e.rulesModel&&e.modelIsDirty&&e.dirtyScope.size>0,e.addRule=(t,s)=>{e.rulesModel.addRule(t,s),e.showPrefixWarningIcon(!1),e.editedRuleIndex=s,e.editedRuleScope=t,e.isNewRule=!0,f(t)},e.editRule=(t,s)=>{e.editedRuleIndex=s,e.editedRuleScope=t,e.isNewRule=!1,e.editedRuleCopy=e.rulesModel.getRuleCopy(t,s),e.rulesModel.setPrefixWarningFlag(t,s),e.getRowHeight="height: "+e.rowHeights[e.editedRuleIndex],f(t)},e.deleteRule=(t,s)=>{u.openConfirmation(c.instant("common.confirm"),c.instant("acl_management.rulestable.messages.delete_rule_confirmation",{index:s+1}),()=>{e.rulesModel.removeRule(t,s),f(t)})},e.saveRule=t=>{e.rulesModel.setPrefixWarningFlag(e.editedRuleScope,e.editedRuleIndex),e.rulesModel.isRuleDuplicated(e.editedRuleScope,e.editedRuleIndex)?S():(e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.isNewRule=!1,f(t))},e.cancelEditing=(t,s)=>{e.isNewRule?(e.rulesModel.removeRule(t,s),e.isNewRule=!1):(e.rulesModel.replaceRule(t,s,e.editedRuleCopy),e.editedRuleCopy=void 0),e.rulesModel.setPrefixWarningFlag(t,s),e.editedRuleIndex=void 0,e.editedRuleScope=void 0,f(t)},e.moveUp=(t,s)=>{e.rulesModel.moveUp(t,s),f(t),e.modelIsDirty?e.selectedRule=s-1:e.selectedRule=void 0},e.moveDown=(t,s)=>{e.rulesModel.moveDown(t,s),f(t),e.modelIsDirty?e.selectedRule=s+1:e.selectedRule=void 0},e.saveAcl=()=>{e.loading=!0,R().then(g).catch(e=>{const t=getError(e);s.error(t,c.instant("acl_management.errors.updating_rules"))}).finally(()=>{e.loading=!1})},e.cancelAclSave=()=>{u.openConfirmation(c.instant("common.confirm"),c.instant("acl_management.rulestable.messages.revert_acl_list"),()=>{_(),s.success(c.instant("acl_management.rulestable.messages.rules_reverted"))})},e.switchTab=(t,s)=>{void 0===e.editedRuleIndex?(e.selectedRule=void 0,e.activeTabScope=s,e.ruleKeys=e.rulesModel.getRuleKeysByScope(e.activeTabScope)):t.preventDefault()},e.setDirty=function(e){f(e)},e.showPrefixWarningIcon=function(t){e.hasCustomPrefix=t},e.performSearchActionOnEnter=function(t,s,o){13===t.keyCode&&(t.stopPropagation(),t.preventDefault(),e.triggerValidation(o),o.$valid&&e.saveRule(s))},e.triggerValidation=function(e){angular.forEach(e,(function(e){"object"==typeof e&&e.hasOwnProperty("$modelValue")&&e.$setTouched()}))};const g=()=>{const t=A();return l.getAcl(t).then(t=>{e.rulesModel=Object(o.mapAclRulesResponse)(t),e.rulesModelCopy=Object(o.mapAclRulesResponse)(t),m()}).catch(e=>{const t=getError(e);s.error(t,c.instant("acl_management.errors.loading_rules"))})},R=()=>{const t=A();return l.updateAcl(t,e.rulesModel.toJSON()).then(()=>{s.success(c.instant("acl_management.rulestable.messages.rules_updated"))})},_=()=>{A()&&(e.loading=!0,g().finally(()=>{e.loading=!1}))},m=()=>{e.selectedRule=void 0,e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.modelIsDirty=!1,e.editedRuleCopy=void 0,e.dirtyScope.clear()},f=t=>{!Object(r.isEqual)(e.rulesModel.getRulesByScope(t),e.rulesModelCopy.getRulesByScope(t))?e.dirtyScope.add(t):e.dirtyScope.delete(t),e.modelIsDirty=e.dirtyScope.size>0},A=()=>a.getActiveRepository(),S=()=>{s.error(c.instant("acl_management.errors.duplicated_rules"))},v=t=>{e.modelIsDirty&&(t.returnValue=!0)},y=()=>{window.removeEventListener("beforeunload",v),h.forEach(e=>e())},E=(s,o)=>{e.modelIsDirty&&(s.preventDefault(),u.openSimpleModal({title:c.instant("common.confirm"),message:c.instant("acl_management.rulestable.messages.unsaved_changes_confirmation"),warning:!0}).result.then((function(){y();const e=t.absUrl().length-t.url().length,s=o.substring(e);t.path(s)}),(function(){})))},x=()=>{e.getAutocompletePromise=p.checkAutocompleteStatus()};a.getActiveRepository()&&d.getNamespaces(a.getActiveRepository()).then(i.mapNamespacesResponse).then(t=>{e.namespaces=t}).catch(e=>{const t=getError(e);s.error(t,c.instant("error.getting.namespaces.for.repo"))}),h.push(e.$on("autocompleteStatus",x)),h.push(e.$watch(A,()=>{m(),_()})),h.push(e.$on("$locationChangeStart",E)),h.push(e.$on("$destroy",y)),window.addEventListener("beforeunload",v)}angular.module("graphdb.framework.aclmanagement.controllers",["graphdb.framework.rest.plugins.service","graphdb.framework.rest.aclmanagement.service"]).controller("AclManagementCtrl",l),l.$inject=["$scope","$location","toastr","AclManagementRestService","$repositories","$translate","ModalService","RDF4JRepositoriesRestService","AutocompleteRestService"]},89:function(e,t,s){"use strict";s.r(t),s.d(t,"mapNamespacesResponse",(function(){return o}));const o=e=>e&&e.data?e.data.results.bindings.map(e=>({prefix:e.prefix.value,uri:e.namespace.value})):[]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[178],{94:function(t,n,e){"use strict";e.r(n),e.d(n,"ConnectorTypesListModel",(function(){return s})),e.d(n,"ConnectorTypeModel",(function(){return o})),e.d(n,"ConnectorListModel",(function(){return r})),e.d(n,"ConnectorModel",(function(){return c})),e.d(n,"ConnectorSettingsModel",(function(){return i}));class s{constructor(t={}){this._connectors=t.connectors||[]}getConnectorByName(t){return this._connectors.find(n=>n.name===t)}get connectors(){return this._connectors}set connectors(t){this._connectors=t}}class o{constructor(t){this._name=t.name,this._prefix=t.prefix}get name(){return this._name}set name(t){this._name=t}get prefix(){return this._prefix}set prefix(t){this._prefix=t}}class r{constructor(t=[]){this._connectors=t.connectors}get connectors(){return this._connectors}set connectors(t){this._connectors=t}}class c{constructor(t){this._name=t.name,this._settings=new i(t)}get settings(){return this._settings}set settings(t){this._settings=t}get name(){return this._name}set name(t){this._name=t}}class i{constructor(t){this._settings=t.values||{}}get settings(){return this._settings}set settings(t){this._settings=t}}}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[178],{93:function(t,n,e){"use strict";e.r(n),e.d(n,"ConnectorTypesListModel",(function(){return s})),e.d(n,"ConnectorTypeModel",(function(){return o})),e.d(n,"ConnectorListModel",(function(){return r})),e.d(n,"ConnectorModel",(function(){return c})),e.d(n,"ConnectorSettingsModel",(function(){return i}));class s{constructor(t={}){this._connectors=t.connectors||[]}getConnectorByName(t){return this._connectors.find(n=>n.name===t)}get connectors(){return this._connectors}set connectors(t){this._connectors=t}}class o{constructor(t){this._name=t.name,this._prefix=t.prefix}get name(){return this._name}set name(t){this._name=t}get prefix(){return this._prefix}set prefix(t){this._prefix=t}}class r{constructor(t=[]){this._connectors=t.connectors}get connectors(){return this._connectors}set connectors(t){this._connectors=t}}class c{constructor(t){this._name=t.name,this._settings=new i(t)}get settings(){return this._settings}set settings(t){this._settings=t}get name(){return this._name}set name(t){this._name=t}}class i{constructor(t){this._settings=t.values||{}}get settings(){return this._settings}set settings(t){this._settings=t}}}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[179],{76:function(e,t,s){"use strict";s.r(t),s.d(t,"SelectMenuOptionsModel",(function(){return a})),s.d(t,"TextFieldModel",(function(){return l})),s.d(t,"NumericRangeModel",(function(){return n}));class a{constructor({label:e,value:t,selected:s=!1,data:a={}}){this._label=e,this._value=t,this._selected=s,this._data=a}get label(){return this._label}set label(e){this._label=e}get value(){return this._value}set value(e){this._value=e}get selected(){return this._selected}set selected(e){this._selected=e}get data(){return this._data}set data(e){this._data=e}}class l{constructor(e){this._value=e.value,this._minLength=e.minLength,this._maxLength=e.maxLength}get value(){return this._value}set value(e){this._value=e}get maxLength(){return this._maxLength}set maxLength(e){this._maxLength=e}get minLength(){return this._minLength}set minLength(e){this._minLength=e}}class n{constructor(e){this._value=e.value,this._minValue=e.minValue,this._maxValue=e.maxValue,this._step=e.step}get value(){return this._value}set value(e){this._value=e}get minValue(){return this._minValue}set minValue(e){this._minValue=e}get maxValue(){return this._maxValue}set maxValue(e){this._maxValue=e}get step(){return this._step}set step(e){this._step=e}}}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[179],{77:function(e,t,s){"use strict";s.r(t),s.d(t,"SelectMenuOptionsModel",(function(){return a})),s.d(t,"TextFieldModel",(function(){return l})),s.d(t,"NumericRangeModel",(function(){return n}));class a{constructor({label:e,value:t,selected:s=!1,data:a={}}){this._label=e,this._value=t,this._selected=s,this._data=a}get label(){return this._label}set label(e){this._label=e}get value(){return this._value}set value(e){this._value=e}get selected(){return this._selected}set selected(e){this._selected=e}get data(){return this._data}set data(e){this._data=e}}class l{constructor(e){this._value=e.value,this._minLength=e.minLength,this._maxLength=e.maxLength}get value(){return this._value}set value(e){this._value=e}get maxLength(){return this._maxLength}set maxLength(e){this._maxLength=e}get minLength(){return this._minLength}set minLength(e){this._minLength=e}}class n{constructor(e){this._value=e.value,this._minValue=e.minValue,this._maxValue=e.maxValue,this._step=e.step}get value(){return this._value}set value(e){this._value=e}get minValue(){return this._minValue}set minValue(e){this._minValue=e}get maxValue(){return this._maxValue}set maxValue(e){this._maxValue=e}get step(){return this._step}set step(e){this._step=e}}}}]);