graphdb-workbench 2.7.0-TR7 → 2.7.0-TR8

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 (59) hide show
  1. package/dist/{137.b2e6231771715ebb81cf.bundle.js → 137.8fa09d6336c655b8e040.bundle.js} +1 -1
  2. package/dist/140.9d8e09d2223b193a9a41.bundle.js +1 -1
  3. package/dist/16.8f603c0a14e853bcbb63.bundle.js +1 -1
  4. package/dist/27.01f4b0043a55038abce7.bundle.js +1 -1
  5. package/dist/28.8f29655b64b026d5fe5b.bundle.js +1 -1
  6. package/dist/286.d141531bdfa74fbf0158.bundle.js +1 -1
  7. package/dist/288.b74bad2a14b1d42cc640.bundle.js +1 -1
  8. package/dist/289.e128ce9ac952c64b4e87.bundle.js +1 -1
  9. package/dist/29.380aa332d60b5034a0f5.bundle.js +1 -1
  10. package/dist/290.3cf5c1b4b3c3cc834d2b.bundle.js +1 -1
  11. package/dist/312.3b0dfd74a76983be0b5a.bundle.js +1 -0
  12. package/dist/320.e29265962c13880f1068.bundle.js +1 -1
  13. package/dist/41.ab3e29b60b7373194d5a.bundle.js +1 -1
  14. package/dist/8.9a1049276c1ad96a9dee.bundle.js +1 -0
  15. package/dist/{bundle.3bd17fb75aec103d600c.bundle.js → bundle.2cbe9ae1388c1b12ef05.bundle.js} +2 -2
  16. package/dist/i18n/locale-en.json +15 -4
  17. package/dist/i18n/locale-fr.json +14 -4
  18. package/dist/index.html +3 -3
  19. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  20. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  21. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  22. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  23. package/dist/js/angular/import/templates/textSnippet.html +20 -12
  24. package/dist/js/angular/security/templates/user.html +1 -1
  25. package/dist/license-checker.json +2 -2
  26. package/dist/pages/aclmanagement.html +2 -2
  27. package/dist/pages/autocomplete.html +1 -1
  28. package/dist/pages/choose-repository-type.html +1 -1
  29. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  30. package/dist/pages/create-index.html +1 -1
  31. package/dist/pages/dependencies.html +1 -1
  32. package/dist/pages/domainRangeInfo.html +2 -2
  33. package/dist/pages/edit.html +1 -1
  34. package/dist/pages/explore.html +1 -1
  35. package/dist/pages/export.html +1 -1
  36. package/dist/pages/find.html +1 -1
  37. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  38. package/dist/pages/graphs-visualizations.html +7 -7
  39. package/dist/pages/guides.html +1 -1
  40. package/dist/pages/import.html +2 -2
  41. package/dist/pages/jdbc-create.html +1 -1
  42. package/dist/pages/monitor/backup-and-restore.html +1 -1
  43. package/dist/pages/monitor/queries.html +1 -1
  44. package/dist/pages/monitor/resources.html +1 -1
  45. package/dist/pages/namespaces.html +2 -2
  46. package/dist/pages/plugins.html +1 -1
  47. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  48. package/dist/pages/rdfrank.html +2 -2
  49. package/dist/pages/repositories.html +1 -1
  50. package/dist/pages/repository.html +1 -1
  51. package/dist/pages/similarity-indexes.html +1 -1
  52. package/dist/pages/sparql-editor.html +1 -1
  53. package/dist/pages/sparql-template-create.html +1 -1
  54. package/dist/pages/ux-test1.html +2 -2
  55. package/dist/pages/webapi.html +2 -2
  56. package/dist/res/swagger5/index.html +29 -29
  57. package/package.json +1 -1
  58. package/dist/312.469d2cbbe308dfe47aab.bundle.js +0 -1
  59. package/dist/8.dc8ed268435f0edc4e8b.bundle.js +0 -1
@@ -4,34 +4,34 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
  <title>Swagger UI</title>
7
- <link rel="stylesheet" type="text/css" href="./swagger-ui.css?v=2.7.0-TR7" />
8
- <link rel="stylesheet" type="text/css" href="./index.css?v=2.7.0-TR7" />
9
- <link rel="icon" type="image/png" href="./favicon-32x32.png?v=2.7.0-TR7" sizes="32x32" />
10
- <link rel="icon" type="image/png" href="./favicon-16x16.png?v=2.7.0-TR7" sizes="16x16" />
11
- <link href='../../css/common.css?v=2.7.0-TR7' media='screen' rel='stylesheet' type='text/css'/>
12
- <link href='css/reset.css?v=2.7.0-TR7' media='screen' rel='stylesheet' type='text/css'/>
13
- <link href='css/screen.css?v=2.7.0-TR7' media='screen' rel='stylesheet' type='text/css'/>
14
- <link href='css/onto-theme.css?v=2.7.0-TR7' media='screen' rel='stylesheet' type='text/css'/>
15
- <link href='css/reset.css?v=2.7.0-TR7' media='print' rel='stylesheet' type='text/css'/>
16
- <link href='css/print.css?v=2.7.0-TR7' media='print' rel='stylesheet' type='text/css'/>
17
- <link href='css/onto-theme.css?v=2.7.0-TR7' media='print' rel='stylesheet' type='text/css'/>
7
+ <link rel="stylesheet" type="text/css" href="./swagger-ui.css?v=2.7.0-TR8" />
8
+ <link rel="stylesheet" type="text/css" href="./index.css?v=2.7.0-TR8" />
9
+ <link rel="icon" type="image/png" href="./favicon-32x32.png?v=2.7.0-TR8" sizes="32x32" />
10
+ <link rel="icon" type="image/png" href="./favicon-16x16.png?v=2.7.0-TR8" sizes="16x16" />
11
+ <link href='../../css/common.css?v=2.7.0-TR8' media='screen' rel='stylesheet' type='text/css'/>
12
+ <link href='css/reset.css?v=2.7.0-TR8' media='screen' rel='stylesheet' type='text/css'/>
13
+ <link href='css/screen.css?v=2.7.0-TR8' media='screen' rel='stylesheet' type='text/css'/>
14
+ <link href='css/onto-theme.css?v=2.7.0-TR8' media='screen' rel='stylesheet' type='text/css'/>
15
+ <link href='css/reset.css?v=2.7.0-TR8' media='print' rel='stylesheet' type='text/css'/>
16
+ <link href='css/print.css?v=2.7.0-TR8' media='print' rel='stylesheet' type='text/css'/>
17
+ <link href='css/onto-theme.css?v=2.7.0-TR8' media='print' rel='stylesheet' type='text/css'/>
18
18
 
19
- <script src='lib/object-assign-pollyfill.js?v=2.7.0-TR7' type='text/javascript'></script>
20
- <script src='lib/jquery-3.4.1.min.js?v=2.7.0-TR7' type='text/javascript'></script>
21
- <script src='lib/jquery.slideto.min.js?v=2.7.0-TR7' type='text/javascript'></script>
22
- <script src='lib/jquery.wiggle.min.js?v=2.7.0-TR7' type='text/javascript'></script>
19
+ <script src='lib/object-assign-pollyfill.js?v=2.7.0-TR8' type='text/javascript'></script>
20
+ <script src='lib/jquery-3.4.1.min.js?v=2.7.0-TR8' type='text/javascript'></script>
21
+ <script src='lib/jquery.slideto.min.js?v=2.7.0-TR8' type='text/javascript'></script>
22
+ <script src='lib/jquery.wiggle.min.js?v=2.7.0-TR8' type='text/javascript'></script>
23
23
 
24
- <script src="lib/jquery-migrate-1.4.1.min.js?v=2.7.0-TR7"></script>
25
- <script src='lib/jquery.ba-bbq.min.js?v=2.7.0-TR7' type='text/javascript'></script>
26
- <script src='lib/handlebars.min-v4.7.3.js?v=2.7.0-TR7' type='text/javascript'></script>
27
- <script src='lib/lodash.min.js?v=2.7.0-TR7' type='text/javascript'></script>
28
- <script src='lib/backbone-min.js?v=2.7.0-TR7' type='text/javascript'></script>
29
- <script src='swagger-ui.js?v=2.7.0-TR7' type='text/javascript'></script>
30
- <script src='lib/highlight.9.1.0.pack.js?v=2.7.0-TR7' type='text/javascript'></script>
31
- <script src='lib/highlight.9.1.0.pack_extended.js?v=2.7.0-TR7' type='text/javascript'></script>
32
- <script src='lib/jsoneditor.min.js?v=2.7.0-TR7' type='text/javascript'></script>
33
- <script src='lib/marked.js?v=2.7.0-TR7' type='text/javascript'></script>
34
- <script src='lib/swagger-oauth.js?v=2.7.0-TR7' type='text/javascript'></script>
24
+ <script src="lib/jquery-migrate-1.4.1.min.js?v=2.7.0-TR8"></script>
25
+ <script src='lib/jquery.ba-bbq.min.js?v=2.7.0-TR8' type='text/javascript'></script>
26
+ <script src='lib/handlebars.min-v4.7.3.js?v=2.7.0-TR8' type='text/javascript'></script>
27
+ <script src='lib/lodash.min.js?v=2.7.0-TR8' type='text/javascript'></script>
28
+ <script src='lib/backbone-min.js?v=2.7.0-TR8' type='text/javascript'></script>
29
+ <script src='swagger-ui.js?v=2.7.0-TR8' type='text/javascript'></script>
30
+ <script src='lib/highlight.9.1.0.pack.js?v=2.7.0-TR8' type='text/javascript'></script>
31
+ <script src='lib/highlight.9.1.0.pack_extended.js?v=2.7.0-TR8' type='text/javascript'></script>
32
+ <script src='lib/jsoneditor.min.js?v=2.7.0-TR8' type='text/javascript'></script>
33
+ <script src='lib/marked.js?v=2.7.0-TR8' type='text/javascript'></script>
34
+ <script src='lib/swagger-oauth.js?v=2.7.0-TR8' type='text/javascript'></script>
35
35
  </head>
36
36
 
37
37
  <body class="swagger-section">
@@ -40,8 +40,8 @@
40
40
  <br>
41
41
  <br>
42
42
  <div id="swagger-ui-container-rdf4j" class="swagger-ui-wrap"></div>
43
- <script src="./swagger-ui-bundle.js?v=2.7.0-TR7" charset="UTF-8"> </script>
44
- <script src="./swagger-ui-standalone-preset.js?v=2.7.0-TR7" charset="UTF-8"> </script>
45
- <script src="./swagger-initializer.js?v=2.7.0-TR7" charset="UTF-8"> </script>
43
+ <script src="./swagger-ui-bundle.js?v=2.7.0-TR8" charset="UTF-8"> </script>
44
+ <script src="./swagger-ui-standalone-preset.js?v=2.7.0-TR8" charset="UTF-8"> </script>
45
+ <script src="./swagger-initializer.js?v=2.7.0-TR8" charset="UTF-8"> </script>
46
46
  </body>
47
47
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench",
3
- "version": "2.7.0-TR7",
3
+ "version": "2.7.0-TR8",
4
4
  "description": "The web application for GraphDB APIs",
5
5
  "scripts": {
6
6
  "build": "webpack --config=webpack.config.prod.js",
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[312],{408:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<div class="modal-header">\n <button type="button" class="close" ng-click="cancel()"></button>\n <h4 class="modal-title">{{\'import.rdf.from.snippet\' | translate}}</h4>\n</div>\n\n<div class="modal-body">\n <div class="form-group">\n <textarea id="wb-import-textarea" class="form-control" rows="10" ng-model="rdfText"\n placeholder="{{\'text.snippet.text.aria.placeholder\' | translate}}"\n uib-popover="{{\'import.rdf.data.here\' | translate}}"\n popover-placement="bottom"\n popover-trigger="focus"></textarea>\n </div>\n</div>\n\n<div class="modal-footer">\n <div class="mb-1">\n <span\n uib-popover="{{\'import.enable.for.auto.start\' | translate}}"\n popover-trigger="mouseenter"\n popover-placement="top">\n <input id="import-now-checkbox" type="checkbox" ng-model="startImport"/>\n <label for="import-now-checkbox">{{\'import.auto.start\' | translate}}</label>\n </span>\n </div>\n <div>\n <button type="button" ng-click="cancel()" class="btn btn-secondary">{{\'common.cancel.btn\' | translate}}</button>\n <div class="btn-group import-format-dropdown" uib-dropdown>\n <button type="button" class="btn btn-secondary dropdown-toggle import-format-dropdown-btn" uib-dropdown-toggle>\n {{\'import.format\' | translate}}: {{importFormat.name}}\n </button>\n <ul class="dropdown-menu" role="menu">\n <li ng-repeat="format in importFormats">\n <a ng-click="setFormat(format)" class="dropdown-item">{{format.name}}</a>\n </li>\n </ul>\n </div>\n <button id="wb-import-importText" class="btn btn-primary" type="button"\n ng-click="ok()">\n <em class="icon-import"></em>{{\'common.import\' | translate}}\n </button>\n </div>\n</div>\n';return __p}}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[8,31,42,67,68,69,71,137,138,139,144,149,150,152,153,154,156,157,241,258,260,263],{100:function(t,e,r){"use strict";r.r(e),r.d(e,"SortingType",(function(){return s}));const s={NAME:"NAME",SIZE:"SIZE",MODIFIED:"MODIFIED",IMPORTED:"IMPORTED",CONTEXT:"CONTEXT"}},121:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportViewPersistence",(function(){return s}));class s{constructor(t={}){this._isHelpVisible=void 0===t.isHelpVisible||t.isHelpVisible}get isHelpVisible(){return this._isHelpVisible}set isHelpVisible(t){this._isHelpVisible=t}toggleHelpVisibility(){this._isHelpVisible=!this._isHelpVisible}toJSON(){return{isHelpVisible:this._isHelpVisible}}}},122:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportResource",(function(){return n}));var s=r(66),i=r(94),o=r(95);class n{constructor(t){this.name=t?t.name:void 0,this.status=t?t.status:s.ImportResourceStatus.NONE,this.message=t&&t.message?t.message:"",this.context=t&&t.context?t.context:"",this.replaceGraphs=t?t.replaceGraphs:[],this.baseURI=t?t.baseURI:void 0,this.forceSerial=!!t&&t.forceSerial,this.type=t?t.type:void 0,this.format=t?t.format:void 0,this.data=t?t.data:void 0,this.modifiedOn=t?t.timestamp:void 0,this.importedOn=t?t.timestamp:void 0,this.size=void 0,this.contextLink=t?t.contextLink:void 0,this.parserSettings=t?t.parserSettings:new i.ImportParsingSettings,this.requestIdHeadersToForward=t?t.requestIdHeadersToForward:void 0}isDirectory(){return o.ImportResourceType.DIRECTORY===this.type}isFile(){return o.ImportResourceType.FILE===this.type||o.ImportResourceType.URL===this.type||o.ImportResourceType.TEXT===this.type}isURL(){return o.ImportResourceType.URL===this.type}isText(){return o.ImportResourceType.TEXT===this.type}}},183:function(t,e){angular.module("graphdb.framework.rest.import.service",[]).factory("ImportRestService",s),s.$inject=["$http"];const r="rest/repositories";function s(t){return{getDefaultSettings:function(e){return t.get(`${r}/${e}/import/settings/default`)},getUploadedFiles:function(e){return t.get(`${r}/${e}/import/upload`)},getServerFiles:function(e){return t.get(`${r}/${e}/import/server`)},importServerFiles:function(e,s){return t.post(`${r}/${e}/import/server`,s)},importTextSnippet:function(e,s){return t.post(`${r}/${e}/import/upload/text`,s)},updateTextSnippet:function(e,s){return t.post(`${r}/${e}/import/upload/update/text`,s)},importFromUrl:function(e,s){return t.post(`${r}/${e}/import/upload/url`,s)},updateFromUrl:function(e,s){return t.post(`${r}/${e}/import/upload/update/url`,s)},stopImport:function(e,s){return t.delete(`${r}/${e}/import/upload`,{params:s})},resetServerFileStatus:function(e,s,i=!0){return t({method:"DELETE",url:`${r}/${e}/import/server/status`,params:{remove:i},data:s,headers:{"Content-type":"application/json;charset=utf-8"}})},resetUserDataStatus:function(e,s,i=!0){return t({method:"DELETE",url:`${r}/${e}/import/upload/status`,params:{remove:i},data:s,headers:{"Content-type":"application/json;charset=utf-8"}})}}}},184:function(t,e,r){"use strict";r.r(e);var s=r(66);angular.module("graphdb.framework.rest.upload.service",[]).factory("UploadRestService",i),i.$inject=["$http","Upload","$translate"];function i(t,e,r){return{createUploadPayload:function(t,r){let s;s=t.file?{file:t.file,importSettings:e.jsonBlob(r)}:{importSettings:e.jsonBlob(r)};return s},uploadUserDataFile:function(t,r,s){return e.upload({url:`rest/repositories/${t}/import/upload/file`,data:s}).progress(t=>i(t,r))},updateUserDataFile:function(t,r,s){return e.upload({url:`rest/repositories/${t}/import/upload/update/file`,data:s}).progress(t=>i(t,r))}};function i(t,e){if(e.file?(e.file=null,e.status=s.ImportResourceStatus.UPLOADING):e.status!==s.ImportResourceStatus.UPLOADING&&(e.status=s.ImportResourceStatus.PENDING),e.status===s.ImportResourceStatus.UPLOADING){const s=parseInt(100*t.loaded/t.total);e.message=r.instant("import.file.upload.progress",{progress:s})}}}},185:function(t,e,r){"use strict";r.r(e);var s=r(121);function i(t,e){const r=new s.ImportViewPersistence,i=()=>{let i=t.get(e.IMPORT_VIEW);return i||(i=r),new s.ImportViewPersistence(i)};return{initImportViewSettings:()=>{t.get(e.IMPORT_VIEW)||t.set(e.IMPORT_VIEW,r)},getImportViewSettings:i,toggleHelpVisibility:()=>{const r=i();r.toggleHelpVisibility(),t.set(e.IMPORT_VIEW,r.toJSON())},setHelpVisibility:r=>{const s=i();s.isHelpVisible=r,t.set(e.IMPORT_VIEW,s.toJSON())}}}angular.module("graphdb.framework.import.services.importviewstorageservice",[]).factory("ImportViewStorageService",i),i.$inject=["LocalStorageAdapter","LSKeys"]},186:function(t,e,r){"use strict";r.r(e);var s=r(93);function i(t,e,r,i){let o=!0;t.isHelpVisible=!0,t.fileSizeLimitInfoTemplateUrl="js/angular/import/templates/fileSizeLimitInfo.html",t.openTab=t=>{i.updateActiveTabId(t)},t.changeHelpTemplate=function(e){t.templateUrl="js/angular/import/templates/"+e},t.toggleHelp=()=>{const e=r.getImportViewSettings();r.toggleHelpVisibility(),t.isHelpVisible=!e.isHelpVisible};const n=[];n.push(i.onActiveTabIdUpdated(r=>{t.activeTabId=r,e.hash(t.activeTabId),s.TABS.USER===t.activeTabId?t.templateUrl="js/angular/import/templates/uploadInfo.html":t.templateUrl="js/angular/import/templates/importInfo.html"})),n.push(i.onFilesUpdated(e=>{o&&0===e.length&&(r.setHelpVisibility(!0),o=!1);const s=r.getImportViewSettings();let i=s.isHelpVisible;0===e.length&&s.isHelpVisible?i=!0:0!==e.length||s.isHelpVisible?s.isHelpVisible?i=!0:s.isHelpVisible||(i=!1):i=!1,r.setHelpVisibility(i),t.isHelpVisible=i}));t.$on("$destroy",()=>n.forEach(t=>t()));const a=e.hash()||s.TABS.USER;t.openTab(a)}angular.module("graphdb.framework.impex.import.controllers.tab",[]).controller("TabController",i),i.$inject=["$scope","$location","ImportViewStorageService","ImportContextService"]},187:function(t,e){function r(t,e,r,s,i,o,n,a,l){t.settings=i,t.hasParserSettings=o,t.isMultiple=a,t.enableReplace=!(!t.settings.replaceGraphs||!t.settings.replaceGraphs.length),t.showAdvancedSettings=!1,t.hasError=function(t,e){return _.find(t,(function(t){return e===t.$name}))},t.ok=function(){t.settingsForm.replaceGraph.$setValidity("replaceGraph",!0),t.settingsForm.$valid&&(c(),e.close(t.settings))},t.cancel=function(){c(),e.dismiss(t.settings)},t.reset=function(){t.settings=_.cloneDeep(n),t.target="data"},t.addReplaceGraph=function(e){let i=!0;"default"!==e&&(i=s.isValidIri(e,e.toString())),t.settingsForm.replaceGraph.$setTouched(),t.settingsForm.replaceGraph.$setValidity("replaceGraph",i),t.settingsForm.replaceGraph.$valid&&(t.settings.replaceGraphs=t.settings.replaceGraphs||[],-1===_.indexOf(t.settings.replaceGraphs,e)?(t.replaceGraph="",t.settings.replaceGraphs.push(e)):r.warning(l.instant("import.graph.already.in.list")))},t.checkEnterReplaceGraph=function(e,r){13===e.keyCode&&(e.preventDefault(),t.addReplaceGraph(r))},t.switchParserSettings=function(){t.showAdvancedSettings=!t.showAdvancedSettings};const c=function(){"default"===t.target?t.settings.context="default":"data"===t.target&&(t.settings.context=""),t.enableReplace?"default"!==t.target&&"named"!==t.target||(t.settings.replaceGraphs=[t.settings.context]):t.settings.replaceGraphs=[]};t.settings.context?"default"===t.settings.context?(t.target="default",t.settings.context=""):t.target="named":t.target="data"}angular.module("graphdb.framework.impex.import.controllers.settings-modal",[]).controller("SettingsModalController",r),r.$inject=["$scope","$uibModalInstance","toastr","UriUtils","settings","hasParserSettings","defaultSettings","isMultiple","$translate"]},188:function(t,e){function r(t,e){t.importFormat={name:"Auto",type:""},t.startImport=!0,t.cancel=function(){e.dismiss()},t.ok=function(){e.close({url:t.dataUrl,format:t.importFormat.type,startImport:t.startImport})}}angular.module("graphdb.framework.impex.import.controllers.import-url",[]).controller("ImportUrlController",r),r.$inject=["$scope","$uibModalInstance","toastr"]},189:function(t,e){function r(t,e,r,s){t.importFormats=[{name:"RDF/JSON",type:"application/rdf+json"},{name:"JSON-LD",type:"application/ld+json"},{name:"NDJSON-LD",type:"application/x-ld+ndjson"},{name:"RDF/XML",type:"application/rdf+xml"},{name:"N3",type:"text/rdf+n3"},{name:"N-Triples",type:"text/plain"},{name:"N-Quads",type:"text/x-nquads"},{name:"Turtle",type:"text/turtle"},{name:"Turtle*",type:"application/x-turtlestar"},{name:"TriX",type:"application/trix"},{name:"TriG",type:"application/x-trig"},{name:"TriG*",type:"application/x-trigstar"}],t.rdfText=r,t.importFormat=_.find(t.importFormats,{type:s}),t.startImport=!0,t.setFormat=function(e){t.importFormat=e},t.cancel=function(){e.dismiss()},t.ok=function(){e.close({text:t.rdfText,format:t.importFormat.type,startImport:t.startImport})}}angular.module("graphdb.framework.impex.import.controllers.import-text-snippet",[]).controller("ImportTextSnippetController",r),r.$inject=["$scope","$uibModalInstance","text","format"]},190:function(t,e,r){"use strict";r.r(e),r.d(e,"FILE_FORMATS",(function(){return s})),r.d(e,"FileFormats",(function(){return i}));const s=["ttl","ttls","rdf","rj","n3","nt","nq","trig","trigs","trix","brf","owl","jsonld","xml","rdfs","ndjsonld","ndjson","jsonl"];class i{static getGZS(){return s.map(t=>`.${t}.gz`)}static getBasics(){return s.map(t=>"."+t)}static getFileFormatsExtended(){return[...this.getGZS(),...this.getBasics(),".zip"].join(", ")}static getFileFormatsHuman(){return[...this.getBasics()].join(" ")}static getTextFileFormatsHuman(){return this.getBasics().filter(t=>".brf"!==t).join(" ")}}},191:function(t,e,r){"use strict";r.r(e),r.d(e,"DateUtils",(function(){return s}));class s{static formatCurrentDateTime(){const t=new Date;return t.getFullYear()+"-"+_.padStart(t.getMonth()+1,2,"0")+"-"+_.padStart(t.getDate(),2,"0")+" "+_.padStart(t.getHours(),2,"0")+":"+_.padStart(t.getMinutes(),2,"0")+":"+_.padStart(t.getSeconds(),2,"0")+"."+_.padStart(t.getMilliseconds(),3,"0")}}},192:function(t,e,r){"use strict";r.r(e),r.d(e,"toImportResource",(function(){return n})),r.d(e,"INDENT",(function(){return a})),r.d(e,"toImportUserDataResource",(function(){return l})),r.d(e,"toImportServerResource",(function(){return c}));var s=r(99),i=r(122),o=r(66);const n=t=>t.map(t=>new i.ImportResource(t)),a=30,l=t=>{const e=new s.ImportResourceTreeElement;return t.toSorted((t,e)=>e.modifiedOn-t.modifiedOn).forEach(t=>p(e,t)),d(e),f(e),e},c=t=>{const e=new s.ImportResourceTreeElement;return t.forEach(t=>p(e,t)),d(e),f(e),e},p=(t,e)=>{const r=m(e);let i;i=e.isDirectory()?r:r.slice(0,r.length-1);const o=u(t,i);if(e.isFile()){const t=new s.ImportResourceTreeElement;t.parent=o,t.importResource=e,t.path=r.join("/"),t.name=r[r.length-1],o.addResource(t)}else o.importResource=e},u=(t,e)=>{let r=t;return e.forEach(t=>{const e=r.getOrCreateDirectory(t);e.parent=r,r=e}),r},m=t=>{if(t.isURL())return[t.name];const e=/[/\\]/;return e.test(t.name)?t.name.split(e):[t.name]},d=t=>{t.indent=8+y(t)*a+"px",t.directories.forEach(t=>d(t)),t.files.forEach(t=>d(t))},f=t=>{t.isRoot()||(t.isImportable=I(t.importResource),t.hasOngoingImport=S(t.importResource),t.canResetStatus=R(t.importResource),t.hasStatusInfo="DONE"===t.importResource.status||"ERROR"===t.importResource.status,t.isEditable=t.importResource.isText(),h(t),g(t)),t.directories.forEach(t=>f(t)),t.files.forEach(t=>f(t))},h=t=>{const e=t.importResource?t.importResource.context:"";e.length>63&&(t.shorthedContext=e.substring(0,30)+"..."+e.substring(e.length-30))},g=t=>{const e=t.importResource;if(e){if(e.importedOn===e.modifiedOn)return;t.isImportedBiggerThanModified=e.importedOn>e.modifiedOn,t.isModifiedBiggerThanImported=!t.isImportedBiggerThanModified}},I=t=>t.isFile()&&t.status!==o.ImportResourceStatus.IMPORTING&&t.status!==o.ImportResourceStatus.UPLOADING&&t.status!==o.ImportResourceStatus.PENDING&&t.status!==o.ImportResourceStatus.INTERRUPTING,S=t=>t.status===o.ImportResourceStatus.IMPORTING||t.status===o.ImportResourceStatus.UPLOADING||t.status===o.ImportResourceStatus.PENDING||t.status===o.ImportResourceStatus.INTERRUPTING,R=t=>t.status===o.ImportResourceStatus.DONE||t.status===o.ImportResourceStatus.ERROR,y=t=>{let e=0;if(void 0===t.parent)return e;let r=t.parent;for(;r;)r=r.parent,e++;return e-1}},193:function(t,e,r){"use strict";r.r(e),r.d(e,"FilePrefixRegistry",(function(){return i}));var s=r(98);class i{constructor(){this.filesPrefixRegistry={}}buildPrefixesRegistry(t){t.filter(t=>"file"===t.type).forEach(t=>{const e=s.FileUtils.getFilenameAndExtension(t.name).filename,r=e.lastIndexOf("-");let i=r<0?0:e.substring(r+1),o=e.substring(0,r);if(r<0?(i=0,o=e):(i=e.substring(r+1),o=e.substring(0,r)),i){i=parseInt(i);const t=this.filesPrefixRegistry[o]||0;this.filesPrefixRegistry[o]=t<i?i:t}else this.filesPrefixRegistry[o]=0})}prefixDuplicates(t){return t.map(t=>{const{filename:e,extension:r}=s.FileUtils.getFilenameAndExtension(t.name),i=`${e}-${this.getIndexForFile(e)}.${r}`;return new File([t],i,{type:t.type,lastModified:t.lastModified})})}getIndexForFile(t){let e=this.filesPrefixRegistry[t];return void 0!==e?e++:e=0,this.filesPrefixRegistry[t]=e,e}}},233:function(t,e,r){"use strict";r.r(e);r(7),r(28),r(183),r(184);var s=r(93),i=(r(185),r(186),r(187),r(188),r(189),r(190)),o=r(70),n=r(98),a=r(191),l=r(192),c=r(99),p=r(0),u=r(193),m=r(100),d=r(66);const f=angular.module("graphdb.framework.impex.import.controllers",["ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.utils.localstorageadapter","graphdb.framework.utils.uriutils","graphdb.framework.guides.services","graphdb.framework.rest.import.service","graphdb.framework.rest.upload.service","graphdb.framework.import.services.importcontext","graphdb.framework.import.services.importviewstorageservice","graphdb.framework.impex.import.controllers.tab","graphdb.framework.impex.import.controllers.settings-modal","graphdb.framework.impex.import.controllers.import-url","graphdb.framework.impex.import.controllers.import-text-snippet"]),h="file",g="text",I="url";f.controller("ImportViewCtrl",["$scope","toastr","$interval","$repositories","$uibModal","$filter","$jwtAuth","$location","$translate","LicenseRestService","GuidesService","ModalService","ImportRestService","ImportContextService","ImportViewStorageService",function(t,e,r,a,u,f,h,g,I,S,R,y,b,F,T){const v=[];let E=null;t.files=[],t.fileChecked={},t.activeTabId=F.getActiveTabId(),t.selectedForImportFiles={},t.checkAll=!1,t.popoverTemplateUrl="settingsPopoverTemplate.html",t.fileQuery="",t.fileFormatsExtended=i.FileFormats.getFileFormatsExtended(),t.fileFormatsHuman=i.FileFormats.getFileFormatsHuman()+I.instant("import.gz.zip"),t.textFileFormatsHuman=i.FileFormats.getTextFileFormatsHuman(),t.maxUploadFileSizeMB=0,t.SORTING_TYPES=m.SortingType,t.toTitleCase=t=>o.toTitleCase(t),t.pollList=()=>{E=r(()=>{t.updating||t.updateList(!1)},4e3)},t.getVisibleFiles=()=>f("filter")(t.files,{name:t.fileQuery,type:t.getTypeFilter()}),t.getTypeFilter=()=>s.TABS.SERVER!==t.activeTabId||"file"!==t.showItems&&"directory"!==t.showItems?"":t.showItems,t.selectAllFiles=()=>{t.getVisibleFiles().forEach((function(e){t.fileChecked[e.name]=t.checkAll&&t.importable(e)}))},t.setSettingsFor=(e,r,s,i=(()=>{}))=>{t.settingsFor=e,t.settings=w(e,r),""===e||"application/ld+json"===s||"application/x-ld+ndjson"===s||e.endsWith("jsonld")||e.endsWith("zip")||e.endsWith("gz")||"directory"===t.settings.type?(t.settings.hasContextLink=!0,t.defaultSettings.hasContextLink=!0):(t.settings.hasContextLink=!1,t.defaultSettings.hasContextLink=!1);const o={templateUrl:"js/angular/import/templates/settingsModal.html",controller:"SettingsModalController",resolve:{settings:function(){return _.cloneDeep(t.settings)},hasParserSettings:t.isLocalLocation,defaultSettings:function(){return t.defaultSettings},isMultiple:function(){return!e}},size:"lg"};R.isActive()&&(o.backdrop="static",o.keyboard=!1),u.open(o).result.then(e=>{t.settings=e,""===t.settingsFor?t.importSelected():t.importFile(t.settingsFor,!0)},e=>{t.settings=e,i&&i()})},t.updateImport=(e,r,s)=>{t.settingsFor=e,t.settings=w(e,r),t.importFile(e,s)},t.stopImport=r=>{b.stopImport(a.getActiveRepository(),{name:r.name,type:r.type}).success((function(){t.updateList()})).error((function(t){e.warning(I.instant("import.error.could.not.stop",{data:getError(t)}))}))},t.importable=()=>!0,t.hasImportable=()=>t.files.some(e=>t.importable(e)),t.showTable=()=>{const e=t.files.length>0&&(s.TABS.USER===t.activeTabId||s.TABS.SERVER===t.activeTabId);return t.checkAll&&t.switchBatch(!0),e},t.switchBatch=e=>{e?t.selectAllFiles():t.checkAll&&(t.checkAll=!1),t.batch=_.map(_.filter(t.files,(function(e){return t.fileChecked[e.name]&&t.importable(e)})),"name").length>0},t.rebatch=()=>{const e={};t.batch=!1,_.each(t.files,(function(r){e[r.name]=t.fileChecked[r.name],t.batch|=t.fileChecked[r.name]})),t.batch||(t.checkAll=!1),t.fileChecked=e},t.getSelectedFiles=()=>F.getResources().getAllSelectedFilesNames(),t.importSelected=e=>{const r=new Set([...Object.keys(t.selectedForImportFiles),...t.getSelectedFiles()]),s=Array.from(r),i=()=>{const r=s.shift();r&&(e&&(t.settings=w(r)),t.importFile(r,!0,i))};i()},t.resetStatus=t=>{U(t,!1)},t.isLocalLocation=()=>{const t=a.getActiveLocation();return t&&t.local},t.filterSettings=e=>{let r=_.omitBy(t.savedSettings[e],_.isNull);return r=_.omit(r,["repoLocationHash","status","message","name","data","type","format","fileNames","$$hashKey"]),_.map(_.keys(r),(function(t){return[t,r[t]]}))},t.getSettings=()=>{t.canWriteActiveRepo()&&b.getDefaultSettings(a.getActiveRepository()).success((function(e){t.defaultSettings=e})).error((function(t){e.warning(I.instant("import.error.default.settings",{data:getError(t)}))}))},t.pritifySettings=t=>JSON.stringify(t,null," "),t.updateList=e=>{t.canWriteActiveRepo()&&$(t.tabId).is(":visible")&&t.updateListHttp(e)},t.onRepositoryChange=()=>{t.setRestricted(),t.isRestricted||(t.updateList(!0),t.getSettings())},t.onImport=e=>{t.setSettingsFor(e.importResource.name,!1,e.importResource.format)},t.onStopImport=e=>{t.stopImport(e.importResource)},t.onRemove=t=>{const e=t.map(t=>t.name);x(e)},t.onReset=t=>{U(t,!1)},t.importAll=(e,r)=>{e.filter(t=>t.isFile()).forEach(e=>{t.selectedForImportFiles[e.path]=!0}),r?t.importSelected(e,r):t.setSettingsFor("",r,void 0)},t.onEditResource=e=>{e.importResource.isText()&&t.openTextSnippetDialog(e.importResource)};const x=(t=[])=>{const e="<br/>"+t.join("<br/>"),r=Object(p.decodeHTML)(I.instant("import.remove.confirm.msg",{name:e}));y.openConfirmation(I.instant("common.confirm"),r,()=>{U(t,!0)})},w=(e,r)=>r||_.isEmpty(e)||_.isEmpty(t.savedSettings[e])?_.cloneDeep(t.defaultSettings):t.savedSettings[e];t.updateListHttp=r=>{(t.activeTabId===s.TABS.USER?b.getUploadedFiles:b.getServerFiles)(a.getActiveRepository()).success((function(e){s.TABS.SERVER===t.activeTabId?F.updateResources(Object(l.toImportServerResource)(Object(l.toImportResource)(e))):s.TABS.USER===t.activeTabId&&F.updateResources(Object(l.toImportUserDataResource)(Object(l.toImportResource)(e))),0===t.files.length||r?(t.files=e,F.updateFiles(t.files),t.files.forEach((function(e){e.type||(e.type=t.defaultType)})),t.rebatch()):t.files.forEach((function(r){const s=_.find(e,_.matches({name:r.name}));r.status&&s&&_.assign(r,s),r.type||(r.type=t.defaultType)})),r&&s.TABS.USER===t.activeTabId&&(t.files=_.filter(t.files,(function(t){return void 0!==t.status})),F.updateFiles(t.files)),t.showClearStatuses=_.filter(t.files,(function(t){return t.status===d.ImportResourceStatus.DONE||t.status===d.ImportResourceStatus.ERROR})).length>0,t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name")})).error((function(t){e.warning(I.instant("import.error.could.not.get.files",{data:getError(t)}))}))};const U=(r,i)=>{if(!r||r.length<1)return;(t.activeTabId===s.TABS.USER?b.resetUserDataStatus:b.resetServerFileStatus)(a.getActiveRepository(),r,i).success((function(){t.updateList(!0)})).error((function(t){e.warning(I.instant("import.error.could.not.clear",{data:getError(t)}))}))},O=()=>{v.forEach(t=>t())};v.push(t.$on("repositoryIsSet",t.onRepositoryChange)),v.push(t.$on("$destroy",()=>r.cancel(E))),v.push(F.onActiveTabIdUpdated(e=>{t.activeTabId=e,F.updateResources(new c.ImportResourceTreeElement),t.updateListHttp(!0)})),t.$on("$destroy",O),S.getInfo().success((function(e){t.appData={},t.appData.properties={};for(let r=0;r<e.length;r++)t.appData.properties[e[r].key]={source:e[r].source,value:e[r].value};t.maxUploadFileSizeMB=n.FileUtils.convertBytesToMegabytes(t.appData.properties["graphdb.workbench.maxUploadSize"].value)})).error((function(t){const r=getError(t);e.error(r,I.instant("common.error"))})),T.initImportViewSettings()}]),f.controller("ImportCtrl",["$scope","toastr","$controller","$translate","$repositories","ImportRestService","ImportContextService",function(t,e,r,s,i,o,n){t.loader=!0,angular.extend(this,r("ImportViewCtrl",{$scope:t})),t.defaultType="server",t.tabId="#import-server",t.showItems="all",t.importSelected=e=>{const r=Object.keys(t.selectedForImportFiles);a(r,e)},t.importFile=function(t){a([t])};const a=function(r,n){t.canWriteActiveRepo()&&o.importServerFiles(i.getActiveRepository(),{importSettings:n?null:t.settings,fileNames:r}).success((function(){t.updateList(),t.batch=!1,t.fileChecked={}})).error((function(t){e.error(s.instant("import.could.not.send.file",{data:getError(t)}))}))};!function(){t.pollList(),t.onRepositoryChange();const e=n.onResourcesUpdated(()=>{t.loader=!1,e()})}()}]),f.controller("UploadCtrl",["$scope","toastr","$controller","$uibModal","$translate","$repositories","ImportRestService","UploadRestService","ModalService","ImportContextService",function(t,e,r,s,i,o,l,c,m,f){t.loader=!0,angular.extend(this,r("ImportViewCtrl",{$scope:t})),t.defaultType=h,t.tabId="#import-user",t.currentFiles=[];let S=!1;t.pastedDataIdx=1;const R=new u.FilePrefixRegistry,y=[];t.importable=function(){return!0},t.fileSelected=function(e,r,s,i,o){b(o);const n=s||[];x(n);const a=[],l=[];n.forEach(e=>{t.files.some(t=>t.name===e.name)?a.push(e):l.push(e)}),a.length>0?w(a,l):(t.currentFiles=[...n],S=!0)},t.importFile=(r,s,o)=>{const n=t.files.find(t=>t.name===r);n?n.type===g?F(n,s,o):n.type===I?v(n,s,o):E(n,s,o):e.warning(i.instant("import.no.such.file",{name:r}))},t.openTextSnippetDialog=e=>{e&&e.data;s.open({templateUrl:"js/angular/import/templates/textSnippet.html",controller:"ImportTextSnippetController",resolve:{text:function(){return e?e.data:""},format:function(){return e?e.format:"text/turtle"}}}).result.then(r=>{e?(e.data===r.text&&e.format===r.format||e.status===d.ImportResourceStatus.NONE||(e.status=d.ImportResourceStatus.NONE,e.message=i.instant("import.text.snippet.not.imported")),e.data=r.text,e.format=r.format,T(e)):(e={type:"text",name:"Text snippet "+a.DateUtils.formatCurrentDateTime(),format:r.format,data:r.text},t.files.unshift(e),t.updateImport(e.name,!1,!1)),r.startImport&&t.setSettingsFor(e.name,!1,e.format)})},t.rdfDataFromURL=function(){s.open({templateUrl:"js/angular/import/templates/urlImport.html",controller:"ImportUrlController",scope:t}).result.then((function(e){const r=_.find(t.files,{type:"url",name:e.url});r?r.format=e.format:t.files.unshift({type:"url",name:e.url,format:e.format,data:e.url}),t.updateImport(e.url,!0,!1),e.startImport&&t.setSettingsFor(e.url,!0,e.format)}))};const b=t=>{t.length>0&&t.forEach((function(t){e.warning(i.instant("import.large.file",{name:t.name,size:n.FileUtils.convertBytesToMegabytes(t.size)}))}))},F=(r,s,n)=>{t.settings.name=r.name,t.settings.type=r.type,t.settings.data=r.data,t.settings.format=r.format,r.status=d.ImportResourceStatus.PENDING;(s?l.importTextSnippet:l.updateTextSnippet)(o.getActiveRepository(),t.settings).success((function(){t.updateList()})).error((function(t){e.error(i.instant("import.could.not.send.data",{data:getError(t)})),r.status=d.ImportResourceStatus.ERROR,r.message=getError(t)})).finally(n||function(){})},T=r=>{t.updating=!0,l.updateTextSnippet(o.getActiveRepository(),r).success((function(t){})).error((function(t){e.error(i.instant("import.could.not.update.text",{data:getError(t)}))})).finally((function(){t.updating=!1}))},v=(r,s,n)=>{t.settings.name=r.name,t.settings.type=r.type,t.settings.data=r.data,t.settings.format=r.format,r.status=d.ImportResourceStatus.PENDING;(s?l.importFromUrl:l.updateFromUrl)(o.getActiveRepository(),t.settings).success((function(){t.updateList()})).error((function(t){e.error(i.instant("import.could.not.send.url",{data:getError(t)}))})).finally(n||function(){})},E=(r,s,n)=>{t.settings.name=r.name;const a=c.createUploadPayload(r,t.settings);(s?c.uploadUserDataFile:c.updateUserDataFile)(o.getActiveRepository(),r,a).then(()=>{t.updateList()}).catch(t=>{e.error(i.instant("import.could.not.upload.file",{data:getError(t)})),r.status=d.ImportResourceStatus.ERROR,r.message=getError(t)}).finally(n||function(){})},x=t=>{t.forEach((function(r){if("bz2"===r.name.substr(r.name.lastIndexOf(".")+1)){const s=t.indexOf(r);s>-1&&t.splice(s,1),e.error(i.instant("import.could.not.upload",{name:r.name}))}}))},w=(e,r)=>{const s=e.map(t=>t.name).join("<br/>");return m.openSimpleModal({title:i.instant("import.user_data.duplicates_confirmation.title"),message:Object(p.decodeHTML)(i.instant("import.user_data.duplicates_confirmation.message",{duplicatedFiles:s})),dialogClass:"confirm-duplicate-files-dialog",warning:!0}).result.then(()=>{t.currentFiles.length?t.currentFiles=[...e,...r]:t.currentFiles.push(...e,...r),S=!0},()=>{const s=R.prefixDuplicates(e);t.currentFiles=[...t.currentFiles,...s,...r],S=!0})},U=()=>{Object.keys(t.fileChecked).forEach(e=>{t.fileChecked[e]=!1}),t.selectedForImportFiles={}};y.push(t.$watchCollection("currentFiles",()=>{t.files=_.uniqBy(_.union(_.map(t.currentFiles,(function(t){return{name:t.name,type:"file",file:t}})),t.files),(function(t){return t.name})),t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name"),S&&t.currentFiles.length>0&&(U(),t.currentFiles.forEach(e=>{t.fileChecked[e.name]=!0,t.selectedForImportFiles[e.name]=!0}),t.setSettingsFor("",!1,void 0,()=>{t.currentFiles.forEach(e=>{t.updateImport(e.name,!1,!1),t.selectedForImportFiles={}})}))})),t.$on("$destroy",()=>{y.forEach(t=>t())});!function(){t.pollList(),t.onRepositoryChange(),y.push(f.onFilesUpdated(t=>{R.buildPrefixesRegistry(t)}));const e=f.onResourcesUpdated(()=>{t.loader=!1,e()})}()}])},66:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportResourceStatus",(function(){return s}));const s={NONE:"NONE",UPLOADING:"UPLOADING",PENDING:"PENDING",IMPORTING:"IMPORTING",DONE:"DONE",ERROR:"ERROR",INTERRUPTING:"INTERRUPTING"}},70:function(t,e,r){"use strict";r.r(e),r.d(e,"removeSpecialChars",(function(){return i})),r.d(e,"toBoolean",(function(){return o})),r.d(e,"toTitleCase",(function(){return n}));var s=r(65);const i=t=>t.replace(/[()']/g,""),o=t=>"string"==typeof t?"true"===t:Boolean(t),n=t=>t?Object(s.upperFirst)(t.toLowerCase()):t},93:function(t,e,r){"use strict";r.r(e),r.d(e,"TABS",(function(){return i}));var s=r(65);const i={USER:"user",SERVER:"server"};function o(t){let e=i.USER,r=void 0,o=[];return{updateActiveTabId:function(r){e=r,t.emit("activeTabIdUpdated",n())},getActiveTabId:n,onActiveTabIdUpdated:function(e){return t.subscribe("activeTabIdUpdated",()=>e(n()))},getFiles:a,addFile:function(e){o.push(e),t.emit("fileAdded",Object(s.cloneDeep)(e))},updateFiles:function(e){o=e,t.emit("filesUpdated",a())},onFilesUpdated:function(e){return t.subscribe("filesUpdated",()=>e(a()))},updateResources:function(e){r=e,t.emit("resourcesUpdated",l())},getResources:l,onResourcesUpdated:function(e){return t.subscribe("resourcesUpdated",()=>e(l()))}};function n(){return e}function a(){return Object(s.cloneDeep)(o)}function l(){return Object(s.cloneDeep)(r)}}angular.module("graphdb.framework.import.services.importcontext",[]).factory("ImportContextService",o),o.$inject=["EventEmitterService"]},94:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportParsingSettings",(function(){return s}));class s{constructor(){this.preserveBNodeIds=!1,this.failOnUnknownDataTypes=!1,this.verifyDataTypeValues=!1,this.normalizeDataTypeValues=!1,this.failOnUnknownLanguageTags=!1,this.verifyLanguageTags=!1,this.normalizeLanguageTags=!1,this.stopOnError=!0}}},95:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportResourceType",(function(){return s}));const s={DIRECTORY:"directory",FILE:"file",URL:"url",TEXT:"text"}},98:function(t,e,r){"use strict";r.r(e),r.d(e,"FileUtils",(function(){return s}));class s{static convertBytesToMegabytes(t){return Math.floor(t/1048576)}static getFilenameAndExtension(t){const e=t.lastIndexOf(".");return{filename:t.substring(0,e),extension:t.substring(e+1)}}}},99:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportResourceTreeElement",(function(){return s}));class s{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.path="",this.shorthedContext="",this.selected=!1,this.directories=[],this.files=[],this.isImportedBiggerThanModified=!1,this.isModifiedBiggerThanImported=!1,this.isEditable=!1}addResource(t){if(t.isFile())this.files.push(t);else{if(!t.isDirectory())throw new Error("Unsupported resource type!");this.directories.push(t)}}getOrCreateDirectory(t){let e=this.directories.find(e=>e.name===t);return e||(e=new s,e.name=t,this.directories.push(e)),e}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 t=[];return this.parent&&t.push(this),this.directories.forEach(e=>{t.push(...e.toList())}),t.push(...this.files),t}setSelection(t,e=!0){this.selected=t,this.files.forEach(e=>e.setSelection(t,!1)),this.directories.forEach(e=>e.setSelection(t,!1)),e&&this.getRoot().updateSelectionState()}updateSelectionState(){if(this.directories.forEach(t=>t.updateSelectionState()),this.parent&&this.isDirectory()){const t=this.hasUnselectedChildren(),e=this.hasSelectedChildren();this.selected=e&&!t,this.partialSelected=e&&t}}hasUnselectedChildren(){return this.files.some(t=>!t.selected)||this.directories.some(t=>!t.selected||t.hasUnselectedChildren())}hasSelectedChildren(){return this.files.some(t=>t.selected)||this.directories.some(t=>t.selected||t.hasSelectedChildren())}selectAllWithStatus(t){this.importResource&&t.indexOf(this.importResource.status)>-1&&(this.selected=!0),this.files.forEach(e=>e.selectAllWithStatus(t)),this.directories.forEach(e=>e.selectAllWithStatus(t))}getAllSelected(){const t=[];return!this.isRoot()&&this.selected&&t.push(this),this.files.forEach(e=>t.push(...e.getAllSelected())),this.directories.forEach(e=>t.push(...e.getAllSelected())),t}deselectAll(){this.files.forEach(t=>t.deselectAll()),this.directories.forEach(t=>t.deselectAll()),this.selected=!1,this.partialSelected=!1}getAllSelectedFiles(){const t=[];return!this.isRoot()&&this.selected&&t.push(this.importResource),this.files.forEach(e=>t.push(...e.getAllSelectedFiles())),t}getAllSelectedFilesNames(){return this.getAllSelectedFiles().map(t=>t.name)}getResourceByName(t){if(this.importResource&&this.importResource.name===t)return this;const e=this.files.find(e=>e.importResource.name===t);if(e)return e;for(const e of this.directories){const r=e.getResourceByName(t);if(r)return r}return null}hasTextInResourcesName(t){return!!this.importResource.name.toLowerCase().includes(t.toLowerCase())||(!!this.files.some(e=>e.importResource.name.toLowerCase().includes(t.toLowerCase()))||this.directories.some(e=>e.hasTextInDirectoriesName(t)))}hasTextInDirectoriesName(t){return!(!this.isDirectory()||!this.name.toLowerCase().includes(t.toLowerCase()))||this.directories.some(e=>e.hasTextInDirectoriesName(t))}hasTextInFilesName(t){return!(!this.isFile()||!this.name.toLowerCase().includes(t.toLowerCase()))||(!!this.files.some(e=>e.importResource.name.toLowerCase().includes(t.toLowerCase()))||this.directories.some(e=>e.hasTextInFilesName(t)))}sort(t){this.directories.sort(t),this.files.sort(t),this.directories.forEach(e=>e.sort(t))}}}}]);