graphdb-workbench 2.8.7 → 2.8.8-RC1

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 (92) hide show
  1. package/dist/0.e4f092fe2c6dd778826e.bundle.js +25 -0
  2. package/dist/{14.eb295a7dbdef17e720e6.bundle.js → 14.345e027a365e41418f3b.bundle.js} +1 -1
  3. package/dist/186.d2a7c6668b2f2198549a.bundle.js +1 -1
  4. package/dist/2.6684bcc4e367bcb9e628.bundle.js +2 -0
  5. package/dist/23.56301f1a97cc94310f2d.bundle.js +3 -0
  6. package/dist/32.a52b26adcd7755172626.bundle.js +1 -0
  7. package/dist/337.014fd388adffc114eb88.bundle.js +1 -0
  8. package/dist/348.b09b5350639beca8034e.bundle.js +1 -1
  9. package/dist/354.474aa50f195477e48af9.bundle.js +1 -1
  10. package/dist/357.603fceaaeb0992019407.bundle.js +1 -1
  11. package/dist/358.5398b6635b1fc42b581a.bundle.js +1 -1
  12. package/dist/359.a2f8d884c46015ae98ed.bundle.js +1 -1
  13. package/dist/360.40b2c9f3610b0f8dea80.bundle.js +1 -1
  14. package/dist/361.91ac80c8c5586b0546a5.bundle.js +1 -1
  15. package/dist/391.45bf699afe7aba531cd9.bundle.js +1 -1
  16. package/dist/40.159ef797572a6c14eab5.bundle.js +1 -0
  17. package/dist/403.61a61ce1c12385533859.bundle.js +1 -1
  18. package/dist/404.b53dc0ad0aaedcf3f809.bundle.js +1 -1
  19. package/dist/405.eb8906e00f241da08275.bundle.js +1 -1
  20. package/dist/406.48298a2b9c49b99170f8.bundle.js +1 -1
  21. package/dist/407.56a20539c08f5d616640.bundle.js +1 -1
  22. package/dist/409.72d548b44e2f1c414a24.bundle.js +1 -1
  23. package/dist/41.8a09e7ba27f7614de053.bundle.js +1 -0
  24. package/dist/410.df9406357dc52e98d0c4.bundle.js +1 -1
  25. package/dist/411.3a8907f7c02b1e9581e2.bundle.js +1 -1
  26. package/dist/412.5feece7f4c5164d2eadb.bundle.js +1 -1
  27. package/dist/42.68cf9fea9586d95c7ef2.bundle.js +1 -0
  28. package/dist/43.53bafbaf1332f99c7e74.bundle.js +1 -1
  29. package/dist/61.f553a4c10a25b9af3cd7.bundle.js +1 -1
  30. package/dist/72.6f58ccfef39ec2ee9614.bundle.js +1 -1
  31. package/dist/{9.2240f89a03deb8b59d52.bundle.js → 9.4b42fc29ab253cd7ad0d.bundle.js} +1 -1
  32. package/dist/{bundle.afb4910dc79ab08390d2.bundle.js → bundle.8b5133c2bd45c3446e7b.bundle.js} +4 -4
  33. package/dist/index.html +3 -3
  34. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  35. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  36. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  37. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  38. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  39. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  40. package/dist/js/angular/security/templates/user.html +1 -1
  41. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  42. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  43. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  44. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  45. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  46. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  47. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +1 -1
  48. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  49. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  50. package/dist/license-checker.json +18 -18
  51. package/dist/pages/aclmanagement.html +2 -2
  52. package/dist/pages/autocomplete.html +1 -1
  53. package/dist/pages/choose-repository-type.html +1 -1
  54. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  55. package/dist/pages/create-index.html +1 -1
  56. package/dist/pages/dependencies.html +1 -1
  57. package/dist/pages/domainRangeInfo.html +2 -2
  58. package/dist/pages/edit.html +1 -1
  59. package/dist/pages/explore.html +1 -1
  60. package/dist/pages/export.html +1 -1
  61. package/dist/pages/find.html +1 -1
  62. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  63. package/dist/pages/graphs-visualizations.html +7 -7
  64. package/dist/pages/guides.html +1 -1
  65. package/dist/pages/import.html +2 -2
  66. package/dist/pages/jdbc-create.html +1 -1
  67. package/dist/pages/monitor/backup-and-restore.html +1 -1
  68. package/dist/pages/monitor/queries.html +1 -1
  69. package/dist/pages/monitor/resources.html +1 -1
  70. package/dist/pages/namespaces.html +2 -2
  71. package/dist/pages/plugins.html +1 -1
  72. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  73. package/dist/pages/rdfrank.html +2 -2
  74. package/dist/pages/repositories.html +1 -1
  75. package/dist/pages/repository.html +1 -1
  76. package/dist/pages/similarity-indexes.html +1 -1
  77. package/dist/pages/sparql-editor.html +1 -1
  78. package/dist/pages/sparql-template-create.html +1 -1
  79. package/dist/pages/ux-test1.html +2 -2
  80. package/dist/pages/webapi.html +2 -2
  81. package/dist/res/swagger5/index.html +12 -12
  82. package/package.json +2 -2
  83. package/dist/0.96161a71bbc713b80446.bundle.js +0 -25
  84. package/dist/2.7a00d57e7b7e144dcbff.bundle.js +0 -2
  85. package/dist/23.09956e07d8bced216cbd.bundle.js +0 -3
  86. package/dist/32.8ee350e470a8b508d5dd.bundle.js +0 -1
  87. package/dist/337.2d3f0230cb9f7c8b47db.bundle.js +0 -1
  88. package/dist/40.6e3f76815d12ac821ae3.bundle.js +0 -1
  89. package/dist/41.d3e7306f7584fe4b2fce.bundle.js +0 -1
  90. package/dist/42.72228fed050c414ecc9c.bundle.js +0 -1
  91. /package/dist/{102.45b5d1a8c7bde79d0550.bundle.js → 102.fe653ba57ff2b81cdf07.bundle.js} +0 -0
  92. /package/dist/{31.f8289c5644144d405a7b.bundle.js → 31.614dbf7498a1552e355c.bundle.js} +0 -0
@@ -58,7 +58,7 @@ const o=n(605),r=n(586),i=n(648),a=n(606);function s(e,t){return e.hash<t.hash?-
58
58
  */const o=n(586),r=n(646);e.exports=class extends r{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new o("sha1")}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const n=new Map,o=this.blankNodeInfo.get(e).quads;let r=0;for(const i of o){let o,a;if("BlankNode"===i.subject.termType&&i.subject.value!==e)a=i.subject.value,o="p";else{if("BlankNode"!==i.object.termType||i.object.value===e)continue;a=i.object.value,o="r"}++r%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,i,t,o),l=n.get(s);l?l.push(a):n.set(s,[a])}return n}}},790:function(e,t,n){"use strict";
59
59
  /*!
60
60
  * Copyright (c) 2016-2021 Digital Bazaar, Inc. All rights reserved.
61
- */const o=n(586),r=n(649);e.exports=class extends r{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new o("sha1")}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const n=new Map,o=this.blankNodeInfo.get(e).quads;for(const r of o){let o,i;if("BlankNode"===r.subject.termType&&r.subject.value!==e)i=r.subject.value,o="p";else{if("BlankNode"!==r.object.termType||r.object.value===e)continue;i=r.object.value,o="r"}const a=this.hashRelatedBlankNode(i,r,t,o),s=n.get(a);s?s.push(i):n.set(a,[i])}return n}}},791:function(e,t,n){"use strict";const o=n(792),r={};e.exports=r,r.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=o,e.useDocumentLoader("xhr"))},r.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},792:function(e,t,n){"use strict";const{parseLinkHeader:o,buildHeaders:r}=n(545),{LINK_HEADER_CONTEXT:i}=n(607),a=n(546),s=n(651),{prependBase:l}=n(557),c=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:n}={headers:{}})=>{t=r(t);return(new s).wrapLoader((async function r(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let d;try{d=await function(e,t,n){const o=new(e=e||XMLHttpRequest);return new Promise((e,r)=>{o.onload=()=>e(o),o.onerror=e=>r(e),o.open("GET",t,!0);for(const e in n)o.setRequestHeader(e,n[e]);o.send()})}(n,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(d.status>=400)throw new a("URL could not be dereferenced: "+d.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:d.status});let u={contextUrl:null,documentUrl:s,document:d.response},p=null;const f=d.getResponseHeader("Content-Type");let h;c.test(d.getAllResponseHeaders())&&(h=d.getResponseHeader("Link"));if(h&&"application/ld+json"!==f){const e=o(h),t=e[i];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(u.contextUrl=t.target),p=e.alternate,p&&"application/ld+json"==p.type&&!(f||"").match(/^application\/(\w*\+)?json$/)&&(u=await r(l(s,p.target)))}return u}))}},793:function(e,t,n){"use strict";const{isArray:o,isObject:r,isString:i}=n(543),{asArray:a}=n(545),{prependBase:s}=n(557),l=n(546),c=n(794);function d(e){throw new l("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}e.exports=class{constructor({sharedCache:e}){this.perOpCache=new Map,this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:n,base:s,cycles:l=new Set}){t&&r(t)&&t["@context"]&&(t=t["@context"]),t=a(t);const u=[];for(const a of t){if(i(a)){let t=this._get(a);t||(t=await this._resolveRemoteContext({activeCtx:e,url:a,documentLoader:n,base:s,cycles:l})),o(t)?u.push(...t):u.push(t);continue}if(null===a){u.push(new c({document:null}));continue}r(a)||d(t);const p=JSON.stringify(a);let f=this._get(p);f||(f=new c({document:a}),this._cacheResolvedContext({key:p,resolved:f,tag:"static"})),u.push(f)}return u}_get(e){let t=this.perOpCache.get(e);if(!t){const n=this.sharedCache.get(e);n&&(t=n.get("static"),t&&this.perOpCache.set(e,t))}return t}_cacheResolvedContext({key:e,resolved:t,tag:n}){if(this.perOpCache.set(e,t),void 0!==n){let o=this.sharedCache.get(e);o||(o=new Map,this.sharedCache.set(e,o)),o.set(n,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:n,base:a,cycles:l}){t=s(a,t);const{context:c,remoteDoc:d}=await this._fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:l});(function e({context:t,base:n}){if(!t)return;const a=t["@context"];if(i(a))return void(t["@context"]=s(n,a));if(o(a)){for(let t=0;t<a.length;++t){const o=a[t];i(o)?a[t]=s(n,o):r(o)&&e({context:{"@context":o},base:n})}return}if(!r(a))return;for(const t in a)e({context:a[t],base:n})})({context:c,base:a=d.documentUrl||t});const u=await this.resolve({activeCtx:e,context:c,documentLoader:n,base:a,cycles:l});return this._cacheResolvedContext({key:t,resolved:u,tag:d.tag}),u}async _fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:a}){if(a.size>10)throw new l("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new l("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,c;a.add(t);try{c=await n(t),s=c.document||null,i(s)&&(s=JSON.parse(s))}catch(e){throw new l("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!r(s))throw new l("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},c.contextUrl&&(o(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(c.contextUrl)),{context:s,remoteDoc:c}}}},794:function(e,t,n){"use strict";const o=n(652);e.exports=class{constructor({document:e}){this.document=e,this.cache=new o({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},795:function(e,t,n){"use strict";function o(e){var t=this;if(t instanceof o||(t=new o),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}function r(e,t,n){var o=t===e.head?new s(n,null,t,e):new s(n,t,t.next,e);return null===o.next&&(e.tail=o),null===o.prev&&(e.head=o),e.length++,o}function i(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,n,o){if(!(this instanceof s))return new s(e,t,n,o);this.list=o,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=o,o.Node=s,o.create=o,o.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},o.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},o.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},o.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},o.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},o.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},o.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},o.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,o=0;null!==n;o++)e.call(t,n.value,o,this),n=n.next},o.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,o=this.length-1;null!==n;o--)e.call(t,n.value,o,this),n=n.prev},o.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},o.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},o.prototype.map=function(e,t){t=t||this;for(var n=new o,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},o.prototype.mapReverse=function(e,t){t=t||this;for(var n=new o,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},o.prototype.reduce=function(e,t){var n,o=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");o=this.head.next,n=this.head.value}for(var r=0;null!==o;r++)n=e(n,o.value,r),o=o.next;return n},o.prototype.reduceReverse=function(e,t){var n,o=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");o=this.tail.prev,n=this.tail.value}for(var r=this.length-1;null!==o;r--)n=e(n,o.value,r),o=o.prev;return n},o.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},o.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},o.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new o;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;for(;null!==i&&r<t;r++,i=i.next)n.push(i.value);return n},o.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new o;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,i=this.tail;null!==i&&r>t;r--)i=i.prev;for(;null!==i&&r>e;r--,i=i.prev)n.push(i.value);return n},o.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;var a=[];for(o=0;i&&o<t;o++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(o=0;o<n.length;o++)i=r(this,i,n[o]);return a},o.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var o=n.prev;n.prev=n.next,n.next=o}return this.head=t,this.tail=e,this};try{n(796)(o)}catch(e){}},796:function(e,t,n){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},797:function(e,t,n){"use strict";e.exports=n(604).NQuads},798:function(e,t,n){"use strict";const o=n(546),{isArray:r,isObject:i,isEmptyObject:a,isString:s,isUndefined:l}=n(543),{isList:c,isValue:d,isGraph:u,isSubject:p}=n(555),{expandIri:f,getContextValue:h,isKeyword:v,process:g,processingMode:y}=n(562),{isAbsolute:m}=n(557),{REGEX_BCP47:x,REGEX_KEYWORD:b,addValue:w,asArray:j,getValues:I,validateTypeValue:N}=n(545),{handleEvent:S}=n(572),E={};function O({value:e,count:t,options:n}){if(0===t||"@value"in e||"@list"in e||1===t&&"@id"in e){if(n.eventHandler){let o,r;0===t?(o="empty object",r="Dropping empty object."):"@value"in e?(o="object with only @value",r="Dropping object with only @value."):"@list"in e?(o="object with only @list",r="Dropping object with only @list."):1===t&&"@id"in e&&(o="object with only @id",r="Dropping object with only @id."),S({event:{type:["JsonLdEvent"],code:o,level:"warning",message:r,details:{value:e}},options:n})}return null}return e}function k({activeCtx:e,activeProperty:t,value:n,options:o}){if(null==n)return null;const r=f(e,t,{vocab:!0},o);if("@id"===r)return f(e,n,{base:!0},o);if("@type"===r)return f(e,n,{vocab:!0,base:!0},{...o,typeExpansion:!0});const i=h(e,t,"@type");if(("@id"===i||"@graph"===r)&&s(n)){const r=f(e,n,{base:!0},o);return null===r&&n.match(b)&&o.eventHandler&&S({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:o}),{"@id":r}}if("@vocab"===i&&s(n))return{"@id":f(e,n,{vocab:!0,base:!0},o)};if(v(r))return n;const a={};if(i&&!["@id","@vocab","@none"].includes(i))a["@type"]=i;else if(s(n)){const n=h(e,t,"@language");null!==n&&(a["@language"]=n);const o=h(e,t,"@direction");null!==o&&(a["@direction"]=o)}return["boolean","number","string"].includes(typeof n)||(n=n.toString()),a["@value"]=n,a}function D(e,t,n,i){const a=[],l=Object.keys(t).sort();for(const c of l){const l=f(e,c,{vocab:!0},i);let d=t[c];r(d)||(d=[d]);for(const e of d){if(null===e)continue;if(!s(e))throw new o("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t});const r={"@value":e};"@none"!==l&&(c.match(x)||i.eventHandler&&S({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:c}},options:i}),r["@language"]=c.toLowerCase()),n&&(r["@direction"]=n),a.push(r)}}return a}async function C({activeCtx:e,options:t,activeProperty:n,value:i,asGraph:a,indexKey:s,propertyIndex:c}){const p=[],v=Object.keys(i).sort(),y="@type"===s;for(let m of v){if(y){const n=h(e,m,"@context");l(n)||(e=await g({activeCtx:e,localCtx:n,propagate:!1,options:t}))}let v,x=i[m];r(x)||(x=[x]),x=await E.expand({activeCtx:e,activeProperty:n,element:x,options:t,insideList:!1,insideIndex:!0}),v=c?"@none"===m?"@none":k({activeCtx:e,activeProperty:s,value:m,options:t}):f(e,m,{vocab:!0},t),"@id"===s?m=f(e,m,{base:!0},t):y&&(m=v);for(let e of x){if(a&&!u(e)&&(e={"@graph":[e]}),"@type"===s)"@none"===v||(e["@type"]?e["@type"]=[m].concat(e["@type"]):e["@type"]=[m]);else{if(d(e)&&!["@language","@type","@index"].includes(s))throw new o(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${s}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e});c?"@none"!==v&&w(e,c,v,{propertyIsArray:!0,prependValue:!0}):"@none"===v||s in e||(e[s]=m)}p.push(e)}}return p}e.exports=E,E.expand=async({activeCtx:e,activeProperty:t=null,element:n,options:u={},insideList:b=!1,insideIndex:L=!1,typeScopedContext:T=null})=>{if(null==n)return null;if("@default"===t&&(u=Object.assign({},u,{isFrame:!1})),!r(n)&&!i(n))return b||null!==t&&"@graph"!==f(e,t,{vocab:!0},u)?k({activeCtx:e,activeProperty:t,value:n,options:u}):(u.eventHandler&&S({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:n}},options:u}),null);if(r(n)){let o=[];const i=h(e,t,"@container")||[];b=b||i.includes("@list");for(let i=0;i<n.length;++i){let a=await E.expand({activeCtx:e,activeProperty:t,element:n[i],options:u,insideIndex:L,typeScopedContext:T});b&&r(a)&&(a={"@list":a}),null!==a&&(r(a)?o=o.concat(a):o.push(a))}return o}const R=f(e,t,{vocab:!0},u),A=h(e,t,"@context");T=T||(e.previousContext?e:null);let _=Object.keys(n).sort(),M=!L;if(M&&T&&_.length<=2&&!_.includes("@context"))for(const t of _){const n=f(T,t,{vocab:!0},u);if("@value"===n){M=!1,e=T;break}if("@id"===n&&1===_.length){M=!1;break}}M&&(e=e.revertToPreviousContext()),l(A)||(e=await g({activeCtx:e,localCtx:A,propagate:!0,overrideProtected:!0,options:u})),"@context"in n&&(e=await g({activeCtx:e,localCtx:n["@context"],options:u})),T=e;let J=null;for(const t of _){if("@type"===f(e,t,{vocab:!0},u)){J=J||t;const o=n[t],r=Array.isArray(o)?o.length>1?o.slice().sort():o:[o];for(const t of r){const n=h(T,t,"@context");l(n)||(e=await g({activeCtx:e,localCtx:n,options:u,propagate:!1}))}}}let P={};await async function e({activeCtx:t,activeProperty:n,expandedActiveProperty:u,element:b,expandedParent:I,options:k={},insideList:L,typeKey:T,typeScopedContext:R}){const A=Object.keys(b).sort(),_=[];let M;const J=b[T]&&"@json"===f(t,r(b[T])?b[T][0]:b[T],{vocab:!0},{...k,typeExpansion:!0});for(const e of A){let L,T=b[e];if("@context"===e)continue;const A=f(t,e,{vocab:!0},k);if(null===A||!m(A)&&!v(A)){k.eventHandler&&S({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:e,expandedProperty:A}},options:k});continue}if(v(A)){if("@reverse"===u)throw new o("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:T});if(A in I&&"@included"!==A&&"@type"!==A)throw new o("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:A})}if("@id"===A){if(!s(T)){if(!k.isFrame)throw new o('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:T});if(i(T)){if(!a(T))throw new o('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:T})}else{if(!r(T))throw new o('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:T});if(!T.every(e=>s(e)))throw new o('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:T})}}w(I,"@id",j(T).map(e=>{if(s(e)){const n=f(t,e,{base:!0},k);return k.eventHandler&&(null===n?S(null===e?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:e}},options:k}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:e}},options:k}):m(n)||S({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:e,expandedId:n}},options:k})),n}return e}),{propertyIsArray:k.isFrame});continue}if("@type"===A){i(T)&&(T=Object.fromEntries(Object.entries(T).map(([e,t])=>[f(R,e,{vocab:!0}),j(t).map(e=>f(R,e,{base:!0,vocab:!0},{...k,typeExpansion:!0}))]))),N(T,k.isFrame),w(I,"@type",j(T).map(e=>{if(s(e)){const t=f(R,e,{base:!0,vocab:!0},{...k,typeExpansion:!0});return"@json"===t||m(t)||k.eventHandler&&S({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:k}),t}return e}),{propertyIsArray:!!k.isFrame});continue}if("@included"===A&&y(t,1.1)){const e=j(await E.expand({activeCtx:t,activeProperty:n,element:T,options:k}));if(!e.every(e=>p(e)))throw new o("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:T});w(I,"@included",e,{propertyIsArray:!0});continue}if("@graph"===A&&!i(T)&&!r(T))throw new o('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:T});if("@value"===A){M=T,J&&y(t,1.1)?I["@value"]=T:w(I,"@value",T,{propertyIsArray:k.isFrame});continue}if("@language"===A){if(null===T)continue;if(!s(T)&&!k.isFrame)throw new o('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:T});T=j(T).map(e=>s(e)?e.toLowerCase():e);for(const e of T)s(e)&&!e.match(x)&&k.eventHandler&&S({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:k});w(I,"@language",T,{propertyIsArray:k.isFrame});continue}if("@direction"===A){if(!s(T)&&!k.isFrame)throw new o('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:T});T=j(T);for(const e of T)if(s(e)&&"ltr"!==e&&"rtl"!==e)throw new o('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:T});w(I,"@direction",T,{propertyIsArray:k.isFrame});continue}if("@index"===A){if(!s(T))throw new o('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:T});w(I,"@index",T);continue}if("@reverse"===A){if(!i(T))throw new o('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:T});if(L=await E.expand({activeCtx:t,activeProperty:"@reverse",element:T,options:k}),"@reverse"in L)for(const e in L["@reverse"])w(I,e,L["@reverse"][e],{propertyIsArray:!0});let e=I["@reverse"]||null;for(const t in L){if("@reverse"===t)continue;null===e&&(e=I["@reverse"]={}),w(e,t,[],{propertyIsArray:!0});const n=L[t];for(let r=0;r<n.length;++r){const i=n[r];if(d(i)||c(i))throw new o('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:L});w(e,t,i,{propertyIsArray:!0})}}continue}if("@nest"===A){_.push(e);continue}let P=t;const B=h(t,e,"@context");l(B)||(P=await g({activeCtx:t,localCtx:B,propagate:!0,overrideProtected:!0,options:k}));const H=h(t,e,"@container")||[];if(H.includes("@language")&&i(T)){const t=h(P,e,"@direction");L=D(P,T,t,k)}else if(H.includes("@index")&&i(T)){const n=H.includes("@graph"),o=h(P,e,"@index")||"@index",r="@index"!==o&&f(t,o,{vocab:!0},k);L=await C({activeCtx:P,options:k,activeProperty:e,value:T,asGraph:n,indexKey:o,propertyIndex:r})}else if(H.includes("@id")&&i(T)){const t=H.includes("@graph");L=await C({activeCtx:P,options:k,activeProperty:e,value:T,asGraph:t,indexKey:"@id"})}else if(H.includes("@type")&&i(T))L=await C({activeCtx:P.revertToPreviousContext(),options:k,activeProperty:e,value:T,asGraph:!1,indexKey:"@type"});else{const o="@list"===A;if(o||"@set"===A){let e=n;o&&"@graph"===u&&(e=null),L=await E.expand({activeCtx:P,activeProperty:e,element:T,options:k,insideList:o})}else L="@json"===h(t,e,"@type")?{"@type":"@json","@value":T}:await E.expand({activeCtx:P,activeProperty:e,element:T,options:k,insideList:!1})}if(null!==L||"@value"===A){if("@list"!==A&&!c(L)&&H.includes("@list")&&(L={"@list":j(L)}),H.includes("@graph")&&!H.some(e=>"@id"===e||"@index"===e)){if(L=j(L),k.isFrame||(L=L.filter(e=>null!==O({value:e,count:Object.keys(e).length,options:k}))),0===L.length)continue;L=L.map(e=>({"@graph":j(e)}))}if(P.mappings.has(e)&&P.mappings.get(e).reverse){const e=I["@reverse"]=I["@reverse"]||{};L=j(L);for(let t=0;t<L.length;++t){const n=L[t];if(d(n)||c(n))throw new o('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:L});w(e,A,n,{propertyIsArray:!0})}}else w(I,A,L,{propertyIsArray:!0})}}if("@value"in I)if("@json"===I["@type"]&&y(t,1.1));else if((i(M)||r(M))&&!k.isFrame)throw new o('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:M});for(const a of _){const s=r(b[a])?b[a]:[b[a]];for(const r of s){if(!i(r)||Object.keys(r).some(e=>"@value"===f(t,e,{vocab:!0},k)))throw new o("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:r});await e({activeCtx:t,activeProperty:n,expandedActiveProperty:u,element:r,expandedParent:I,options:k,insideList:L,typeScopedContext:R,typeKey:T})}}}({activeCtx:e,activeProperty:t,expandedActiveProperty:R,element:n,expandedParent:P,options:u,insideList:b,typeKey:J,typeScopedContext:T}),_=Object.keys(P);let B=_.length;if("@value"in P){if("@type"in P&&("@language"in P||"@direction"in P))throw new o('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:P});let t=B-1;if("@type"in P&&(t-=1),"@index"in P&&(t-=1),"@language"in P&&(t-=1),"@direction"in P&&(t-=1),0!==t)throw new o('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:P});const n=null===P["@value"]?[]:j(P["@value"]),r=I(P,"@type");if(y(e,1.1)&&r.includes("@json")&&1===r.length);else if(0===n.length)u.eventHandler&&S({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:P}},options:u}),P=null;else{if(!n.every(e=>s(e)||a(e))&&"@language"in P)throw new o("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:P});if(!r.every(e=>m(e)&&!(s(e)&&0===e.indexOf("_:"))||a(e)))throw new o('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:P})}}else if("@type"in P&&!r(P["@type"]))P["@type"]=[P["@type"]];else if("@set"in P||"@list"in P){if(B>1&&(2!==B||!("@index"in P)))throw new o('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:P});"@set"in P&&(P=P["@set"],_=Object.keys(P),B=_.length)}else 1===B&&"@language"in P&&(u.eventHandler&&S({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:P}},options:u}),P=null);return!i(P)||u.keepFreeFloatingNodes||b||null!==t&&"@graph"!==R&&!(h(e,t,"@container")||[]).includes("@graph")||(P=O({value:P,count:B,options:u})),P}},799:function(e,t,n){"use strict";const{isSubjectReference:o}=n(555),{createMergedNodeMap:r}=n(587),i={};e.exports=i,i.flatten=e=>{const t=r(e),n=[],i=Object.keys(t).sort();for(let e=0;e<i.length;++e){const r=t[i[e]];o(r)||n.push(r)}return n}},800:function(e,t,n){"use strict";const o=n(546),r=n(555),i=n(543),{REGEX_BCP47:a,addValue:s}=n(545),{handleEvent:l}=n(572),{RDF_LIST:c,RDF_FIRST:d,RDF_REST:u,RDF_NIL:p,RDF_TYPE:f,RDF_JSON_LITERAL:h,XSD_BOOLEAN:v,XSD_DOUBLE:g,XSD_INTEGER:y,XSD_STRING:m}=n(607),x={};function b(e,t,n,r){if(e.termType.endsWith("Node"))return{"@id":e.value};const s={"@value":e.value};if(e.language)e.language.match(a)||r.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e.language}},options:r}),s["@language"]=e.language;else{let c=e.datatype.value;if(c||(c=m),c===h){c="@json";try{s["@value"]=JSON.parse(s["@value"])}catch(e){throw new o("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:s["@value"],cause:e})}}if(t){if(c===v)"true"===s["@value"]?s["@value"]=!0:"false"===s["@value"]&&(s["@value"]=!1);else if(i.isNumeric(s["@value"]))if(c===y){const e=parseInt(s["@value"],10);e.toFixed(0)===s["@value"]&&(s["@value"]=e)}else c===g&&(s["@value"]=parseFloat(s["@value"]));[v,y,g,m].includes(c)||(s["@type"]=c)}else if("i18n-datatype"===n&&c.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=c.split(/[#_]/);e.length>0&&(s["@language"]=e,e.match(a)||r.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:r})),s["@direction"]=t}else c!==m&&(s["@type"]=c)}return s}e.exports=x,x.fromRDF=async(e,t)=>{const{useRdfType:n=!1,useNativeTypes:a=!1,rdfDirection:l=null}=t,h={},v={"@default":h},g={};if(l){if("compound-literal"===l)throw new o("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:l});if("i18n-datatype"!==l)throw new o("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:l})}for(const o of e){const e="DefaultGraph"===o.graph.termType?"@default":o.graph.value;e in v||(v[e]={}),"@default"===e||e in h||(h[e]={"@id":e});const r=v[e],i=o.subject.value,c=o.predicate.value,d=o.object;i in r||(r[i]={"@id":i});const u=r[i],y=d.termType.endsWith("Node");if(y&&!(d.value in r)&&(r[d.value]={"@id":d.value}),c===f&&!n&&y){s(u,"@type",d.value,{propertyIsArray:!0});continue}const m=b(d,a,l,t);if(s(u,c,m,{propertyIsArray:!0}),y)if(d.value===p){const e=r[d.value];"usages"in e||(e.usages=[]),e.usages.push({node:u,property:c,value:m})}else d.value in g?g[d.value]=!1:g[d.value]={node:u,property:c,value:m}}for(const e in v){const t=v[e];if(!(p in t))continue;const n=t[p];if(n.usages){for(let e of n.usages){let n=e.node,o=e.property,a=e.value;const s=[],l=[];let p=Object.keys(n).length;for(;o===u&&i.isObject(g[n["@id"]])&&i.isArray(n[d])&&1===n[d].length&&i.isArray(n[u])&&1===n[u].length&&(3===p||4===p&&i.isArray(n["@type"])&&1===n["@type"].length&&n["@type"][0]===c)&&(s.push(n[d][0]),l.push(n["@id"]),e=g[n["@id"]],n=e.node,o=e.property,a=e.value,p=Object.keys(n).length,r.isBlankNode(n)););delete a["@id"],a["@list"]=s.reverse();for(const e of l)delete t[e]}delete n.usages}}const y=[],m=Object.keys(h).sort();for(const e of m){const t=h[e];if(e in v){const n=t["@graph"]=[],o=v[e],i=Object.keys(o).sort();for(const e of i){const t=o[e];r.isSubjectReference(t)||n.push(t)}}r.isSubjectReference(t)||y.push(t)}return y}},801:function(e,t,n){"use strict";const{createNodeMap:o}=n(587),{isKeyword:r}=n(562),i=n(555),a=n(802),s=n(546),l=n(543),c=n(545),{handleEvent:d}=n(572),{RDF_FIRST:u,RDF_REST:p,RDF_NIL:f,RDF_TYPE:h,RDF_JSON_LITERAL:v,RDF_LANGSTRING:g,XSD_BOOLEAN:y,XSD_DOUBLE:m,XSD_INTEGER:x,XSD_STRING:b}=n(607),{isAbsolute:w}=n(557),j={};function I(e,t,n,o,i){const a=Object.keys(t).sort();for(const s of a){const a=t[s],l=Object.keys(a).sort();for(let t of l){const l=a[t];if("@type"===t)t=h;else if(r(t))continue;for(const r of l){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!w(s)){i.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:s}},options:i});continue}const l={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!w(t)){i.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:i});continue}if("BlankNode"===l.termType&&!i.produceGeneralizedRdf){i.eventHandler&&d({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:o.getOldIds().find(e=>o.getId(e)===t)}},options:i});continue}const c=N(r,o,e,n,i.rdfDirection,i);c&&e.push({subject:a,predicate:l,object:c,graph:n})}}}}function N(e,t,n,o,r,c){const h={};if(i.isValue(e)){h.termType="Literal",h.value=void 0,h.datatype={termType:"NamedNode"};let t=e["@value"];const n=e["@type"]||null;if("@json"===n)h.value=a(t),h.datatype.value=v;else if(l.isBoolean(t))h.value=t.toString(),h.datatype.value=n||y;else if(l.isDouble(t)||n===m)l.isDouble(t)||(t=parseFloat(t)),h.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),h.datatype.value=n||m;else if(l.isNumber(t))h.value=t.toFixed(0),h.datatype.value=n||x;else if("@direction"in e&&"i18n-datatype"===r){const n=`https://www.w3.org/ns/i18n#${(e["@language"]||"").toLowerCase()}_${e["@direction"]}`;h.datatype.value=n,h.value=t}else{if("@direction"in e&&"compound-literal"===r)throw new s("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:r});if("@direction"in e&&r)throw new s("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:r});"@language"in e?("@direction"in e&&!r&&c.eventHandler&&d({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:h.value}},options:c}),h.value=t,h.datatype.value=n||g,h.language=e["@language"]):("@direction"in e&&!r&&c.eventHandler&&d({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:h.value}},options:c}),h.value=t,h.datatype.value=n||b)}}else if(i.isList(e)){const i=function(e,t,n,o,r,i){const a={termType:"NamedNode",value:u},s={termType:"NamedNode",value:p},l={termType:"NamedNode",value:f},c=e.pop(),d=c?{termType:"BlankNode",value:t.getId()}:l;let h=d;for(const l of e){const e=N(l,t,n,o,r,i),c={termType:"BlankNode",value:t.getId()};n.push({subject:h,predicate:a,object:e,graph:o}),n.push({subject:h,predicate:s,object:c,graph:o}),h=c}if(c){const e=N(c,t,n,o,r,i);n.push({subject:h,predicate:a,object:e,graph:o}),n.push({subject:h,predicate:s,object:l,graph:o})}return d}(e["@list"],t,n,o,r,c);h.termType=i.termType,h.value=i.value}else{const t=l.isObject(e)?e["@id"]:e;h.termType=t.startsWith("_:")?"BlankNode":"NamedNode",h.value=t}return"NamedNode"!==h.termType||w(h.value)?h:(c.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:h.value}},options:c}),null)}e.exports=j,j.toRDF=(e,t)=>{const n=new c.IdentifierIssuer("_:b"),r={"@default":{}};o(e,r,"@default",n);const i=[],a=Object.keys(r).sort();for(const e of a){let o;if("@default"===e)o={termType:"DefaultGraph",value:""};else{if(!w(e)){t.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t});continue}o=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},o.value=e}I(i,r[e],o,n,t)}return i}},802:function(e,t,n){"use strict";e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce((t,n,o)=>t+(0===o?"":",")+e(void 0===n||"symbol"==typeof n?null:n),"")+"]":"{"+Object.keys(t).sort().reduce((n,o,r)=>{if(void 0===t[o]||"symbol"==typeof t[o])return n;return n+(0===n.length?"":",")+e(o)+":"+e(t[o])},"")+"}"}},803:function(e,t,n){"use strict";const{isKeyword:o}=n(562),r=n(555),i=n(543),a=n(545),s=n(557),l=n(546),{createNodeMap:c,mergeNodeMapGraphs:d}=n(587),u={};function p(e){const t={};for(const n in e)void 0!==e[n]&&(t["@"+n]=[e[n]]);return[t]}function f(e,t,n){for(let o=n.length-1;o>=0;--o){const r=n[o];if(r.graph===t&&r.subject["@id"]===e["@id"])return!0}return!1}function h(e,t,n){const o="@"+n;let r=o in e?e[o][0]:t[n];if("embed"===n)if(!0===r)r="@once";else if(!1===r)r="@never";else if("@always"!==r&&"@never"!==r&&"@link"!==r&&"@first"!==r&&"@last"!==r&&"@once"!==r)throw new l("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return r}function v(e){if(!i.isArray(e)||1!==e.length||!i.isObject(e[0]))throw new l("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of a.asArray(e[0]["@id"]))if(!i.isObject(t)&&!s.isAbsolute(t)||i.isString(t)&&0===t.indexOf("_:"))throw new l("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of a.asArray(e[0]["@type"]))if(!i.isObject(t)&&!s.isAbsolute(t)&&"@json"!==t||i.isString(t)&&0===t.indexOf("_:"))throw new l("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function g(e,t,n,s){let l=!0,c=!1;for(const d in n){let u=!1;const p=a.getValues(t,d),f=0===a.getValues(n,d).length;if("@id"===d){if(i.isEmptyObject(n["@id"][0]||{})?u=!0:n["@id"].length>=0&&(u=n["@id"].includes(p[0])),!s.requireAll)return u}else if("@type"===d){if(l=!1,f){if(p.length>0)return!1;u=!0}else if(1===n["@type"].length&&i.isEmptyObject(n["@type"][0]))u=p.length>0;else for(const e of n["@type"])u=!(!i.isObject(e)||!("@default"in e))||(u||p.some(t=>t===e));if(!s.requireAll)return u}else{if(o(d))continue;{const t=a.getValues(n,d)[0];let o=!1;if(t&&(v([t]),o="@default"in t),l=!1,0===p.length&&o)continue;if(p.length>0&&f)return!1;if(void 0===t){if(p.length>0)return!1;u=!0}else if(r.isList(t)){const n=t["@list"][0];if(r.isList(p[0])){const t=p[0]["@list"];r.isValue(n)?u=t.some(e=>b(n,e)):(r.isSubject(n)||r.isSubjectReference(n))&&(u=t.some(t=>x(e,n,t,s)))}}else u=r.isValue(t)?p.some(e=>b(t,e)):r.isSubjectReference(t)?p.some(n=>x(e,t,n,s)):!!i.isObject(t)&&p.length>0}}if(!u&&s.requireAll)return!1;c=c||u}return l||c}function y(e,t){const n=e.uniqueEmbeds[e.graph],o=n[t],r=o.parent,s=o.property,l={"@id":t};if(i.isArray(r)){for(let e=0;e<r.length;++e)if(a.compareValues(r[e],l)){r[e]=l;break}}else{const e=i.isArray(r[s]);a.removeValue(r,s,l,{propertyIsArray:e}),a.addValue(r,s,l,{propertyIsArray:e})}const c=e=>{const t=Object.keys(n);for(const o of t)o in n&&i.isObject(n[o].parent)&&n[o].parent["@id"]===e&&(delete n[o],c(o))};c(t)}
61
+ */const o=n(586),r=n(649);e.exports=class extends r{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new o("sha1")}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const n=new Map,o=this.blankNodeInfo.get(e).quads;for(const r of o){let o,i;if("BlankNode"===r.subject.termType&&r.subject.value!==e)i=r.subject.value,o="p";else{if("BlankNode"!==r.object.termType||r.object.value===e)continue;i=r.object.value,o="r"}const a=this.hashRelatedBlankNode(i,r,t,o),s=n.get(a);s?s.push(i):n.set(a,[i])}return n}}},791:function(e,t,n){"use strict";const o=n(792),r={};e.exports=r,r.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=o,e.useDocumentLoader("xhr"))},r.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},792:function(e,t,n){"use strict";const{parseLinkHeader:o,buildHeaders:r}=n(545),{LINK_HEADER_CONTEXT:i}=n(607),a=n(546),s=n(651),{prependBase:l}=n(557),c=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:n}={headers:{}})=>{t=r(t);return(new s).wrapLoader((async function r(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let d;try{d=await function(e,t,n){const o=new(e=e||XMLHttpRequest);return new Promise((e,r)=>{o.onload=()=>e(o),o.onerror=e=>r(e),o.open("GET",t,!0);for(const e in n)o.setRequestHeader(e,n[e]);o.send()})}(n,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(d.status>=400)throw new a("URL could not be dereferenced: "+d.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:d.status});let u={contextUrl:null,documentUrl:s,document:d.response},p=null;const f=d.getResponseHeader("Content-Type");let h;c.test(d.getAllResponseHeaders())&&(h=d.getResponseHeader("Link"));if(h&&"application/ld+json"!==f){const e=o(h),t=e[i];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(u.contextUrl=t.target),p=e.alternate,p&&"application/ld+json"==p.type&&!(f||"").match(/^application\/(\w*\+)?json$/)&&(u=await r(l(s,p.target)))}return u}))}},793:function(e,t,n){"use strict";const{isArray:o,isObject:r,isString:i}=n(543),{asArray:a}=n(545),{prependBase:s}=n(557),l=n(546),c=n(794);function d(e){throw new l("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}e.exports=class{constructor({sharedCache:e}){this.perOpCache=new Map,this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:n,base:s,cycles:l=new Set}){t&&r(t)&&t["@context"]&&(t=t["@context"]),t=a(t);const u=[];for(const a of t){if(i(a)){let t=this._get(a);t||(t=await this._resolveRemoteContext({activeCtx:e,url:a,documentLoader:n,base:s,cycles:l})),o(t)?u.push(...t):u.push(t);continue}if(null===a){u.push(new c({document:null}));continue}r(a)||d(t);const p=JSON.stringify(a);let f=this._get(p);f||(f=new c({document:a}),this._cacheResolvedContext({key:p,resolved:f,tag:"static"})),u.push(f)}return u}_get(e){let t=this.perOpCache.get(e);if(!t){const n=this.sharedCache.get(e);n&&(t=n.get("static"),t&&this.perOpCache.set(e,t))}return t}_cacheResolvedContext({key:e,resolved:t,tag:n}){if(this.perOpCache.set(e,t),void 0!==n){let o=this.sharedCache.get(e);o||(o=new Map,this.sharedCache.set(e,o)),o.set(n,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:n,base:a,cycles:l}){t=s(a,t);const{context:c,remoteDoc:d}=await this._fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:l});(function e({context:t,base:n}){if(!t)return;const a=t["@context"];if(i(a))return void(t["@context"]=s(n,a));if(o(a)){for(let t=0;t<a.length;++t){const o=a[t];i(o)?a[t]=s(n,o):r(o)&&e({context:{"@context":o},base:n})}return}if(!r(a))return;for(const t in a)e({context:a[t],base:n})})({context:c,base:a=d.documentUrl||t});const u=await this.resolve({activeCtx:e,context:c,documentLoader:n,base:a,cycles:l});return this._cacheResolvedContext({key:t,resolved:u,tag:d.tag}),u}async _fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:a}){if(a.size>10)throw new l("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new l("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,c;a.add(t);try{c=await n(t),s=c.document||null,i(s)&&(s=JSON.parse(s))}catch(e){throw new l(`Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context. URL: "${t}".`,"jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!r(s))throw new l(`Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object. URL: "${t}".`,"jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},c.contextUrl&&(o(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(c.contextUrl)),{context:s,remoteDoc:c}}}},794:function(e,t,n){"use strict";const o=n(652);e.exports=class{constructor({document:e}){this.document=e,this.cache=new o({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},795:function(e,t,n){"use strict";function o(e){var t=this;if(t instanceof o||(t=new o),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}function r(e,t,n){var o=t===e.head?new s(n,null,t,e):new s(n,t,t.next,e);return null===o.next&&(e.tail=o),null===o.prev&&(e.head=o),e.length++,o}function i(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,n,o){if(!(this instanceof s))return new s(e,t,n,o);this.list=o,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=o,o.Node=s,o.create=o,o.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},o.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},o.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},o.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},o.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},o.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},o.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},o.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,o=0;null!==n;o++)e.call(t,n.value,o,this),n=n.next},o.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,o=this.length-1;null!==n;o--)e.call(t,n.value,o,this),n=n.prev},o.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},o.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},o.prototype.map=function(e,t){t=t||this;for(var n=new o,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},o.prototype.mapReverse=function(e,t){t=t||this;for(var n=new o,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},o.prototype.reduce=function(e,t){var n,o=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");o=this.head.next,n=this.head.value}for(var r=0;null!==o;r++)n=e(n,o.value,r),o=o.next;return n},o.prototype.reduceReverse=function(e,t){var n,o=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");o=this.tail.prev,n=this.tail.value}for(var r=this.length-1;null!==o;r--)n=e(n,o.value,r),o=o.prev;return n},o.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},o.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},o.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new o;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;for(;null!==i&&r<t;r++,i=i.next)n.push(i.value);return n},o.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new o;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,i=this.tail;null!==i&&r>t;r--)i=i.prev;for(;null!==i&&r>e;r--,i=i.prev)n.push(i.value);return n},o.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;var a=[];for(o=0;i&&o<t;o++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(o=0;o<n.length;o++)i=r(this,i,n[o]);return a},o.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var o=n.prev;n.prev=n.next,n.next=o}return this.head=t,this.tail=e,this};try{n(796)(o)}catch(e){}},796:function(e,t,n){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},797:function(e,t,n){"use strict";e.exports=n(604).NQuads},798:function(e,t,n){"use strict";const o=n(546),{isArray:r,isObject:i,isEmptyObject:a,isString:s,isUndefined:l}=n(543),{isList:c,isValue:d,isGraph:u,isSubject:p}=n(555),{expandIri:f,getContextValue:h,isKeyword:v,process:g,processingMode:y}=n(562),{isAbsolute:m}=n(557),{REGEX_BCP47:x,REGEX_KEYWORD:b,addValue:w,asArray:j,getValues:I,validateTypeValue:N}=n(545),{handleEvent:S}=n(572),E={};function O({value:e,count:t,options:n}){if(0===t||"@value"in e||"@list"in e||1===t&&"@id"in e){if(n.eventHandler){let o,r;0===t?(o="empty object",r="Dropping empty object."):"@value"in e?(o="object with only @value",r="Dropping object with only @value."):"@list"in e?(o="object with only @list",r="Dropping object with only @list."):1===t&&"@id"in e&&(o="object with only @id",r="Dropping object with only @id."),S({event:{type:["JsonLdEvent"],code:o,level:"warning",message:r,details:{value:e}},options:n})}return null}return e}function k({activeCtx:e,activeProperty:t,value:n,options:o}){if(null==n)return null;const r=f(e,t,{vocab:!0},o);if("@id"===r)return f(e,n,{base:!0},o);if("@type"===r)return f(e,n,{vocab:!0,base:!0},{...o,typeExpansion:!0});const i=h(e,t,"@type");if(("@id"===i||"@graph"===r)&&s(n)){const r=f(e,n,{base:!0},o);return null===r&&n.match(b)&&o.eventHandler&&S({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:o}),{"@id":r}}if("@vocab"===i&&s(n))return{"@id":f(e,n,{vocab:!0,base:!0},o)};if(v(r))return n;const a={};if(i&&!["@id","@vocab","@none"].includes(i))a["@type"]=i;else if(s(n)){const n=h(e,t,"@language");null!==n&&(a["@language"]=n);const o=h(e,t,"@direction");null!==o&&(a["@direction"]=o)}return["boolean","number","string"].includes(typeof n)||(n=n.toString()),a["@value"]=n,a}function D(e,t,n,i){const a=[],l=Object.keys(t).sort();for(const c of l){const l=f(e,c,{vocab:!0},i);let d=t[c];r(d)||(d=[d]);for(const e of d){if(null===e)continue;if(!s(e))throw new o("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t});const r={"@value":e};"@none"!==l&&(c.match(x)||i.eventHandler&&S({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:c}},options:i}),r["@language"]=c.toLowerCase()),n&&(r["@direction"]=n),a.push(r)}}return a}async function C({activeCtx:e,options:t,activeProperty:n,value:i,asGraph:a,indexKey:s,propertyIndex:c}){const p=[],v=Object.keys(i).sort(),y="@type"===s;for(let m of v){if(y){const n=h(e,m,"@context");l(n)||(e=await g({activeCtx:e,localCtx:n,propagate:!1,options:t}))}let v,x=i[m];r(x)||(x=[x]),x=await E.expand({activeCtx:e,activeProperty:n,element:x,options:t,insideList:!1,insideIndex:!0}),v=c?"@none"===m?"@none":k({activeCtx:e,activeProperty:s,value:m,options:t}):f(e,m,{vocab:!0},t),"@id"===s?m=f(e,m,{base:!0},t):y&&(m=v);for(let e of x){if(a&&!u(e)&&(e={"@graph":[e]}),"@type"===s)"@none"===v||(e["@type"]?e["@type"]=[m].concat(e["@type"]):e["@type"]=[m]);else{if(d(e)&&!["@language","@type","@index"].includes(s))throw new o(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${s}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e});c?"@none"!==v&&w(e,c,v,{propertyIsArray:!0,prependValue:!0}):"@none"===v||s in e||(e[s]=m)}p.push(e)}}return p}e.exports=E,E.expand=async({activeCtx:e,activeProperty:t=null,element:n,options:u={},insideList:b=!1,insideIndex:L=!1,typeScopedContext:T=null})=>{if(null==n)return null;if("@default"===t&&(u=Object.assign({},u,{isFrame:!1})),!r(n)&&!i(n))return b||null!==t&&"@graph"!==f(e,t,{vocab:!0},u)?k({activeCtx:e,activeProperty:t,value:n,options:u}):(u.eventHandler&&S({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:n}},options:u}),null);if(r(n)){let o=[];const i=h(e,t,"@container")||[];b=b||i.includes("@list");for(let i=0;i<n.length;++i){let a=await E.expand({activeCtx:e,activeProperty:t,element:n[i],options:u,insideIndex:L,typeScopedContext:T});b&&r(a)&&(a={"@list":a}),null!==a&&(r(a)?o=o.concat(a):o.push(a))}return o}const R=f(e,t,{vocab:!0},u),A=h(e,t,"@context");T=T||(e.previousContext?e:null);let _=Object.keys(n).sort(),M=!L;if(M&&T&&_.length<=2&&!_.includes("@context"))for(const t of _){const n=f(T,t,{vocab:!0},u);if("@value"===n){M=!1,e=T;break}if("@id"===n&&1===_.length){M=!1;break}}M&&(e=e.revertToPreviousContext()),l(A)||(e=await g({activeCtx:e,localCtx:A,propagate:!0,overrideProtected:!0,options:u})),"@context"in n&&(e=await g({activeCtx:e,localCtx:n["@context"],options:u})),T=e;let J=null;for(const t of _){if("@type"===f(e,t,{vocab:!0},u)){J=J||t;const o=n[t],r=Array.isArray(o)?o.length>1?o.slice().sort():o:[o];for(const t of r){const n=h(T,t,"@context");l(n)||(e=await g({activeCtx:e,localCtx:n,options:u,propagate:!1}))}}}let P={};await async function e({activeCtx:t,activeProperty:n,expandedActiveProperty:u,element:b,expandedParent:I,options:k={},insideList:L,typeKey:T,typeScopedContext:R}){const A=Object.keys(b).sort(),_=[];let M;const J=b[T]&&"@json"===f(t,r(b[T])?b[T][0]:b[T],{vocab:!0},{...k,typeExpansion:!0});for(const e of A){let L,T=b[e];if("@context"===e)continue;const A=f(t,e,{vocab:!0},k);if(null===A||!m(A)&&!v(A)){k.eventHandler&&S({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:e,expandedProperty:A}},options:k});continue}if(v(A)){if("@reverse"===u)throw new o("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:T});if(A in I&&"@included"!==A&&"@type"!==A)throw new o("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:A})}if("@id"===A){if(!s(T)){if(!k.isFrame)throw new o('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:T});if(i(T)){if(!a(T))throw new o('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:T})}else{if(!r(T))throw new o('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:T});if(!T.every(e=>s(e)))throw new o('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:T})}}w(I,"@id",j(T).map(e=>{if(s(e)){const n=f(t,e,{base:!0},k);return k.eventHandler&&(null===n?S(null===e?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:e}},options:k}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:e}},options:k}):m(n)||S({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:e,expandedId:n}},options:k})),n}return e}),{propertyIsArray:k.isFrame});continue}if("@type"===A){i(T)&&(T=Object.fromEntries(Object.entries(T).map(([e,t])=>[f(R,e,{vocab:!0}),j(t).map(e=>f(R,e,{base:!0,vocab:!0},{...k,typeExpansion:!0}))]))),N(T,k.isFrame),w(I,"@type",j(T).map(e=>{if(s(e)){const t=f(R,e,{base:!0,vocab:!0},{...k,typeExpansion:!0});return"@json"===t||m(t)||k.eventHandler&&S({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:k}),t}return e}),{propertyIsArray:!!k.isFrame});continue}if("@included"===A&&y(t,1.1)){const e=j(await E.expand({activeCtx:t,activeProperty:n,element:T,options:k}));if(!e.every(e=>p(e)))throw new o("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:T});w(I,"@included",e,{propertyIsArray:!0});continue}if("@graph"===A&&!i(T)&&!r(T))throw new o('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:T});if("@value"===A){M=T,J&&y(t,1.1)?I["@value"]=T:w(I,"@value",T,{propertyIsArray:k.isFrame});continue}if("@language"===A){if(null===T)continue;if(!s(T)&&!k.isFrame)throw new o('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:T});T=j(T).map(e=>s(e)?e.toLowerCase():e);for(const e of T)s(e)&&!e.match(x)&&k.eventHandler&&S({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:k});w(I,"@language",T,{propertyIsArray:k.isFrame});continue}if("@direction"===A){if(!s(T)&&!k.isFrame)throw new o('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:T});T=j(T);for(const e of T)if(s(e)&&"ltr"!==e&&"rtl"!==e)throw new o('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:T});w(I,"@direction",T,{propertyIsArray:k.isFrame});continue}if("@index"===A){if(!s(T))throw new o('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:T});w(I,"@index",T);continue}if("@reverse"===A){if(!i(T))throw new o('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:T});if(L=await E.expand({activeCtx:t,activeProperty:"@reverse",element:T,options:k}),"@reverse"in L)for(const e in L["@reverse"])w(I,e,L["@reverse"][e],{propertyIsArray:!0});let e=I["@reverse"]||null;for(const t in L){if("@reverse"===t)continue;null===e&&(e=I["@reverse"]={}),w(e,t,[],{propertyIsArray:!0});const n=L[t];for(let r=0;r<n.length;++r){const i=n[r];if(d(i)||c(i))throw new o('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:L});w(e,t,i,{propertyIsArray:!0})}}continue}if("@nest"===A){_.push(e);continue}let P=t;const B=h(t,e,"@context");l(B)||(P=await g({activeCtx:t,localCtx:B,propagate:!0,overrideProtected:!0,options:k}));const H=h(t,e,"@container")||[];if(H.includes("@language")&&i(T)){const t=h(P,e,"@direction");L=D(P,T,t,k)}else if(H.includes("@index")&&i(T)){const n=H.includes("@graph"),o=h(P,e,"@index")||"@index",r="@index"!==o&&f(t,o,{vocab:!0},k);L=await C({activeCtx:P,options:k,activeProperty:e,value:T,asGraph:n,indexKey:o,propertyIndex:r})}else if(H.includes("@id")&&i(T)){const t=H.includes("@graph");L=await C({activeCtx:P,options:k,activeProperty:e,value:T,asGraph:t,indexKey:"@id"})}else if(H.includes("@type")&&i(T))L=await C({activeCtx:P.revertToPreviousContext(),options:k,activeProperty:e,value:T,asGraph:!1,indexKey:"@type"});else{const o="@list"===A;if(o||"@set"===A){let e=n;o&&"@graph"===u&&(e=null),L=await E.expand({activeCtx:P,activeProperty:e,element:T,options:k,insideList:o})}else L="@json"===h(t,e,"@type")?{"@type":"@json","@value":T}:await E.expand({activeCtx:P,activeProperty:e,element:T,options:k,insideList:!1})}if(null!==L||"@value"===A){if("@list"!==A&&!c(L)&&H.includes("@list")&&(L={"@list":j(L)}),H.includes("@graph")&&!H.some(e=>"@id"===e||"@index"===e)){if(L=j(L),k.isFrame||(L=L.filter(e=>null!==O({value:e,count:Object.keys(e).length,options:k}))),0===L.length)continue;L=L.map(e=>({"@graph":j(e)}))}if(P.mappings.has(e)&&P.mappings.get(e).reverse){const e=I["@reverse"]=I["@reverse"]||{};L=j(L);for(let t=0;t<L.length;++t){const n=L[t];if(d(n)||c(n))throw new o('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:L});w(e,A,n,{propertyIsArray:!0})}}else w(I,A,L,{propertyIsArray:!0})}}if("@value"in I)if("@json"===I["@type"]&&y(t,1.1));else if((i(M)||r(M))&&!k.isFrame)throw new o('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:M});for(const a of _){const s=r(b[a])?b[a]:[b[a]];for(const r of s){if(!i(r)||Object.keys(r).some(e=>"@value"===f(t,e,{vocab:!0},k)))throw new o("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:r});await e({activeCtx:t,activeProperty:n,expandedActiveProperty:u,element:r,expandedParent:I,options:k,insideList:L,typeScopedContext:R,typeKey:T})}}}({activeCtx:e,activeProperty:t,expandedActiveProperty:R,element:n,expandedParent:P,options:u,insideList:b,typeKey:J,typeScopedContext:T}),_=Object.keys(P);let B=_.length;if("@value"in P){if("@type"in P&&("@language"in P||"@direction"in P))throw new o('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:P});let t=B-1;if("@type"in P&&(t-=1),"@index"in P&&(t-=1),"@language"in P&&(t-=1),"@direction"in P&&(t-=1),0!==t)throw new o('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:P});const n=null===P["@value"]?[]:j(P["@value"]),r=I(P,"@type");if(y(e,1.1)&&r.includes("@json")&&1===r.length);else if(0===n.length)u.eventHandler&&S({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:P}},options:u}),P=null;else{if(!n.every(e=>s(e)||a(e))&&"@language"in P)throw new o("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:P});if(!r.every(e=>m(e)&&!(s(e)&&0===e.indexOf("_:"))||a(e)))throw new o('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:P})}}else if("@type"in P&&!r(P["@type"]))P["@type"]=[P["@type"]];else if("@set"in P||"@list"in P){if(B>1&&(2!==B||!("@index"in P)))throw new o('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:P});"@set"in P&&(P=P["@set"],_=Object.keys(P),B=_.length)}else 1===B&&"@language"in P&&(u.eventHandler&&S({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:P}},options:u}),P=null);return!i(P)||u.keepFreeFloatingNodes||b||null!==t&&"@graph"!==R&&!(h(e,t,"@container")||[]).includes("@graph")||(P=O({value:P,count:B,options:u})),P}},799:function(e,t,n){"use strict";const{isSubjectReference:o}=n(555),{createMergedNodeMap:r}=n(587),i={};e.exports=i,i.flatten=e=>{const t=r(e),n=[],i=Object.keys(t).sort();for(let e=0;e<i.length;++e){const r=t[i[e]];o(r)||n.push(r)}return n}},800:function(e,t,n){"use strict";const o=n(546),r=n(555),i=n(543),{REGEX_BCP47:a,addValue:s}=n(545),{handleEvent:l}=n(572),{RDF_LIST:c,RDF_FIRST:d,RDF_REST:u,RDF_NIL:p,RDF_TYPE:f,RDF_JSON_LITERAL:h,XSD_BOOLEAN:v,XSD_DOUBLE:g,XSD_INTEGER:y,XSD_STRING:m}=n(607),x={};function b(e,t,n,r){if(e.termType.endsWith("Node"))return{"@id":e.value};const s={"@value":e.value};if(e.language)e.language.match(a)||r.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e.language}},options:r}),s["@language"]=e.language;else{let c=e.datatype.value;if(c||(c=m),c===h){c="@json";try{s["@value"]=JSON.parse(s["@value"])}catch(e){throw new o("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:s["@value"],cause:e})}}if(t){if(c===v)"true"===s["@value"]?s["@value"]=!0:"false"===s["@value"]&&(s["@value"]=!1);else if(i.isNumeric(s["@value"]))if(c===y){const e=parseInt(s["@value"],10);e.toFixed(0)===s["@value"]&&(s["@value"]=e)}else c===g&&(s["@value"]=parseFloat(s["@value"]));[v,y,g,m].includes(c)||(s["@type"]=c)}else if("i18n-datatype"===n&&c.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=c.split(/[#_]/);e.length>0&&(s["@language"]=e,e.match(a)||r.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:r})),s["@direction"]=t}else c!==m&&(s["@type"]=c)}return s}e.exports=x,x.fromRDF=async(e,t)=>{const{useRdfType:n=!1,useNativeTypes:a=!1,rdfDirection:l=null}=t,h={},v={"@default":h},g={};if(l){if("compound-literal"===l)throw new o("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:l});if("i18n-datatype"!==l)throw new o("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:l})}for(const o of e){const e="DefaultGraph"===o.graph.termType?"@default":o.graph.value;e in v||(v[e]={}),"@default"===e||e in h||(h[e]={"@id":e});const r=v[e],i=o.subject.value,c=o.predicate.value,d=o.object;i in r||(r[i]={"@id":i});const u=r[i],y=d.termType.endsWith("Node");if(y&&!(d.value in r)&&(r[d.value]={"@id":d.value}),c===f&&!n&&y){s(u,"@type",d.value,{propertyIsArray:!0});continue}const m=b(d,a,l,t);if(s(u,c,m,{propertyIsArray:!0}),y)if(d.value===p){const e=r[d.value];"usages"in e||(e.usages=[]),e.usages.push({node:u,property:c,value:m})}else d.value in g?g[d.value]=!1:g[d.value]={node:u,property:c,value:m}}for(const e in v){const t=v[e];if(!(p in t))continue;const n=t[p];if(n.usages){for(let e of n.usages){let n=e.node,o=e.property,a=e.value;const s=[],l=[];let p=Object.keys(n).length;for(;o===u&&i.isObject(g[n["@id"]])&&i.isArray(n[d])&&1===n[d].length&&i.isArray(n[u])&&1===n[u].length&&(3===p||4===p&&i.isArray(n["@type"])&&1===n["@type"].length&&n["@type"][0]===c)&&(s.push(n[d][0]),l.push(n["@id"]),e=g[n["@id"]],n=e.node,o=e.property,a=e.value,p=Object.keys(n).length,r.isBlankNode(n)););delete a["@id"],a["@list"]=s.reverse();for(const e of l)delete t[e]}delete n.usages}}const y=[],m=Object.keys(h).sort();for(const e of m){const t=h[e];if(e in v){const n=t["@graph"]=[],o=v[e],i=Object.keys(o).sort();for(const e of i){const t=o[e];r.isSubjectReference(t)||n.push(t)}}r.isSubjectReference(t)||y.push(t)}return y}},801:function(e,t,n){"use strict";const{createNodeMap:o}=n(587),{isKeyword:r}=n(562),i=n(555),a=n(802),s=n(546),l=n(543),c=n(545),{handleEvent:d}=n(572),{RDF_FIRST:u,RDF_REST:p,RDF_NIL:f,RDF_TYPE:h,RDF_JSON_LITERAL:v,RDF_LANGSTRING:g,XSD_BOOLEAN:y,XSD_DOUBLE:m,XSD_INTEGER:x,XSD_STRING:b}=n(607),{isAbsolute:w}=n(557),j={};function I(e,t,n,o,i){const a=Object.keys(t).sort();for(const s of a){const a=t[s],l=Object.keys(a).sort();for(let t of l){const l=a[t];if("@type"===t)t=h;else if(r(t))continue;for(const r of l){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!w(s)){i.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:s}},options:i});continue}const l={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!w(t)){i.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:i});continue}if("BlankNode"===l.termType&&!i.produceGeneralizedRdf){i.eventHandler&&d({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:o.getOldIds().find(e=>o.getId(e)===t)}},options:i});continue}const c=N(r,o,e,n,i.rdfDirection,i);c&&e.push({subject:a,predicate:l,object:c,graph:n})}}}}function N(e,t,n,o,r,c){const h={};if(i.isValue(e)){h.termType="Literal",h.value=void 0,h.datatype={termType:"NamedNode"};let t=e["@value"];const n=e["@type"]||null;if("@json"===n)h.value=a(t),h.datatype.value=v;else if(l.isBoolean(t))h.value=t.toString(),h.datatype.value=n||y;else if(l.isDouble(t)||n===m)l.isDouble(t)||(t=parseFloat(t)),h.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),h.datatype.value=n||m;else if(l.isNumber(t))h.value=t.toFixed(0),h.datatype.value=n||x;else if("@direction"in e&&"i18n-datatype"===r){const n=`https://www.w3.org/ns/i18n#${(e["@language"]||"").toLowerCase()}_${e["@direction"]}`;h.datatype.value=n,h.value=t}else{if("@direction"in e&&"compound-literal"===r)throw new s("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:r});if("@direction"in e&&r)throw new s("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:r});"@language"in e?("@direction"in e&&!r&&c.eventHandler&&d({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:h.value}},options:c}),h.value=t,h.datatype.value=n||g,h.language=e["@language"]):("@direction"in e&&!r&&c.eventHandler&&d({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:h.value}},options:c}),h.value=t,h.datatype.value=n||b)}}else if(i.isList(e)){const i=function(e,t,n,o,r,i){const a={termType:"NamedNode",value:u},s={termType:"NamedNode",value:p},l={termType:"NamedNode",value:f},c=e.pop(),d=c?{termType:"BlankNode",value:t.getId()}:l;let h=d;for(const l of e){const e=N(l,t,n,o,r,i),c={termType:"BlankNode",value:t.getId()};n.push({subject:h,predicate:a,object:e,graph:o}),n.push({subject:h,predicate:s,object:c,graph:o}),h=c}if(c){const e=N(c,t,n,o,r,i);n.push({subject:h,predicate:a,object:e,graph:o}),n.push({subject:h,predicate:s,object:l,graph:o})}return d}(e["@list"],t,n,o,r,c);h.termType=i.termType,h.value=i.value}else{const t=l.isObject(e)?e["@id"]:e;h.termType=t.startsWith("_:")?"BlankNode":"NamedNode",h.value=t}return"NamedNode"!==h.termType||w(h.value)?h:(c.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:h.value}},options:c}),null)}e.exports=j,j.toRDF=(e,t)=>{const n=new c.IdentifierIssuer("_:b"),r={"@default":{}};o(e,r,"@default",n);const i=[],a=Object.keys(r).sort();for(const e of a){let o;if("@default"===e)o={termType:"DefaultGraph",value:""};else{if(!w(e)){t.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t});continue}o=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},o.value=e}I(i,r[e],o,n,t)}return i}},802:function(e,t,n){"use strict";e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce((t,n,o)=>t+(0===o?"":",")+e(void 0===n||"symbol"==typeof n?null:n),"")+"]":"{"+Object.keys(t).sort().reduce((n,o,r)=>{if(void 0===t[o]||"symbol"==typeof t[o])return n;return n+(0===n.length?"":",")+e(o)+":"+e(t[o])},"")+"}"}},803:function(e,t,n){"use strict";const{isKeyword:o}=n(562),r=n(555),i=n(543),a=n(545),s=n(557),l=n(546),{createNodeMap:c,mergeNodeMapGraphs:d}=n(587),u={};function p(e){const t={};for(const n in e)void 0!==e[n]&&(t["@"+n]=[e[n]]);return[t]}function f(e,t,n){for(let o=n.length-1;o>=0;--o){const r=n[o];if(r.graph===t&&r.subject["@id"]===e["@id"])return!0}return!1}function h(e,t,n){const o="@"+n;let r=o in e?e[o][0]:t[n];if("embed"===n)if(!0===r)r="@once";else if(!1===r)r="@never";else if("@always"!==r&&"@never"!==r&&"@link"!==r&&"@first"!==r&&"@last"!==r&&"@once"!==r)throw new l("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return r}function v(e){if(!i.isArray(e)||1!==e.length||!i.isObject(e[0]))throw new l("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of a.asArray(e[0]["@id"]))if(!i.isObject(t)&&!s.isAbsolute(t)||i.isString(t)&&0===t.indexOf("_:"))throw new l("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of a.asArray(e[0]["@type"]))if(!i.isObject(t)&&!s.isAbsolute(t)&&"@json"!==t||i.isString(t)&&0===t.indexOf("_:"))throw new l("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function g(e,t,n,s){let l=!0,c=!1;for(const d in n){let u=!1;const p=a.getValues(t,d),f=0===a.getValues(n,d).length;if("@id"===d){if(i.isEmptyObject(n["@id"][0]||{})?u=!0:n["@id"].length>=0&&(u=n["@id"].includes(p[0])),!s.requireAll)return u}else if("@type"===d){if(l=!1,f){if(p.length>0)return!1;u=!0}else if(1===n["@type"].length&&i.isEmptyObject(n["@type"][0]))u=p.length>0;else for(const e of n["@type"])u=!(!i.isObject(e)||!("@default"in e))||(u||p.some(t=>t===e));if(!s.requireAll)return u}else{if(o(d))continue;{const t=a.getValues(n,d)[0];let o=!1;if(t&&(v([t]),o="@default"in t),l=!1,0===p.length&&o)continue;if(p.length>0&&f)return!1;if(void 0===t){if(p.length>0)return!1;u=!0}else if(r.isList(t)){const n=t["@list"][0];if(r.isList(p[0])){const t=p[0]["@list"];r.isValue(n)?u=t.some(e=>b(n,e)):(r.isSubject(n)||r.isSubjectReference(n))&&(u=t.some(t=>x(e,n,t,s)))}}else u=r.isValue(t)?p.some(e=>b(t,e)):r.isSubjectReference(t)?p.some(n=>x(e,t,n,s)):!!i.isObject(t)&&p.length>0}}if(!u&&s.requireAll)return!1;c=c||u}return l||c}function y(e,t){const n=e.uniqueEmbeds[e.graph],o=n[t],r=o.parent,s=o.property,l={"@id":t};if(i.isArray(r)){for(let e=0;e<r.length;++e)if(a.compareValues(r[e],l)){r[e]=l;break}}else{const e=i.isArray(r[s]);a.removeValue(r,s,l,{propertyIsArray:e}),a.addValue(r,s,l,{propertyIsArray:e})}const c=e=>{const t=Object.keys(n);for(const o of t)o in n&&i.isObject(n[o].parent)&&n[o].parent["@id"]===e&&(delete n[o],c(o))};c(t)}
62
62
  /**
63
63
  * Removes the @preserve keywords from expanded result of framing.
64
64
  *
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[186],{279: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.7">{{\'common.loading\' | translate}}</object>')}))}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",o),o.$inject=[]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[186],{279: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.8-RC1">{{\'common.loading\' | translate}}</object>')}))}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",o),o.$inject=[]}}]);
@@ -0,0 +1,2 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[2,33,94,102,123,140,151,223,224,225,226,227,228,229,232,233,234,235,237,238,246,266,268,275,328],{120:function(e,t,n){"use strict";n.r(t),n.d(t,"EventDataType",(function(){return r}));const r={DOWNLOAD_AS:"downloadAs",NOTIFICATION_MESSAGE:"notificationMessage",QUERY:"query",COUNT_QUERY:"countQuery",COUNT_QUERY_RESPONSE:"countQueryResponse",REQUEST_ABORTED:"requestAborted",QUERY_EXECUTED:"queryExecuted",SAVE_QUERY_OPENED:"saveQueryOpened"}},128:function(e,t,n){"use strict";function r(e,t,n,r,o){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=o.toLowerCase(),e.setJSONLDSettingsToLocalStorage=function(e,t,o){n.set(r.JSONLD_EXPORT_SETTINGS,JSON.stringify({jsonldFormName:e,jsonldFormLink:t,jsonldLink:o}))},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(r.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 r})),angular.module("graphdb.framework.core.components.export-settings-modal",["graphdb.framework.utils.localstorageadapter"]).controller("ExportSettingsCtrl",r),r.$inject=["$scope","$uibModalInstance","LocalStorageAdapter","LSKeys","format"]},129:function(e,t,n){"use strict";n.r(t),n.d(t,"RouteConstants",(function(){return r}));const r={savedQueryName:"savedQueryName",savedQueryOwner:"owner",query:"query",name:"name",owner:"owner"}},130:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryType",(function(){return r}));const r={SELECT:"SELECT",CONSTRUCT:"CONSTRUCT",ASK:"ASK",DESCRIBE:"DESCRIBE",INSERT:"INSERT",DELETE:"DELETE",LOAD:"LOAD",CLEAR:"CLEAR",CREATE:"CREATE",DROP:"DROP",COPY:"COPY",MOVE:"MOVE",ADD:"ADD"}},131:function(e,t,n){"use strict";n.r(t),n.d(t,"VIEW_SPARQL_EDITOR",(function(){return r}));const r="graphdb-workbench-sparql-editor"},141:function(e,t,n){"use strict";n.r(t);n(233),n(234);var r=n(150),o=n(18),s=n(549),a=n(235),i=n(120),u=n(16),c=n(171),d=n(667),l=n(130),p=n(236),g=n(19),y=n(237),E=n(238),m=n(128),f=n(25);function h(e,t,n,h,S,T,v,_,R,N,O,b,C,A,w,q){return{restrict:"E",templateUrl:"js/angular/core/directives/yasgui-component/templates/yasgui-component.html",scope:{yasguiConfig:"=",afterInit:"&",queryChanged:"&"},link:(h,q,Q)=>{h.classToApply=Q.class||"";const L=new Map,D=h.yasguiConfig&&h.yasguiConfig.outputHandlers?new Map(h.yasguiConfig.outputHandlers):new Map;let P=void 0;h.getOntotextYasguiElements=()=>q.find("ontotext-yasgui"),h.getOntotextYasguiElement=()=>new p.YasguiComponent(h.getOntotextYasguiElements()[0]),h.createSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);A.addNewSavedQuery(t).then(()=>G(t)).catch(X)},h.updateSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);A.editSavedQuery(e.detail.originalQueryName,t).then(()=>z(t)).catch(X)},h.deleteSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);A.deleteSavedQuery(t.name).then(()=>{R.success(n.instant("query.editor.delete.saved.query.success.msg",{savedQueryName:t.name}))}).catch(e=>{const t=getError(e);R.error(t,n.instant("query.editor.delete.saved.query.error"))})},h.shareSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);h.savedQueryConfig={shareQueryLink:w.createShareSavedQueryLink(t.name,t.owner)}},h.shareQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);h.savedQueryConfig={shareQueryLink:w.createShareQueryLink(t)}},h.queryShareLinkCopied=()=>{R.success(n.instant("modal.ctr.copy.url.success"))},h.loadSavedQueries=()=>{A.getSavedQueries().then(e=>{const t=Object(r.savedQueriesResponseMapper)(e);h.savedQueryConfig={savedQueries:t}}).catch(e=>{const t=getError(e);R.error(t,n.instant("query.editor.get.saved.queries.error"))})},h.saveQueryOpened=e=>{g.YasguiComponentDirectiveUtil.highlightTabName(Object(a.toYasguiOutputModel)(e).getTab())},h.output=e=>{const t=Object(a.toYasguiOutputModel)(e);D.has(t.TYPE)&&D.get(t.TYPE)(t)};D.set(i.EventDataType.QUERY,e=>{const t=e.getPageNumber(),n=e.getPageSize();n&&t&&(e.setOffset((t-1)*(n-1)),e.setLimit(n)),e.setPageNumber(void 0),e.setPageSize(void 0)});D.set(i.EventDataType.COUNT_QUERY,e=>{e.setPageSize(void 0),e.setPageNumber(void 0),e.setCount(1)});D.set(i.EventDataType.COUNT_QUERY_RESPONSE,e=>{e.setTotalElements(F(e))});D.set(i.EventDataType.DOWNLOAD_AS,e=>{const t=L.get(e.pluginName);t&&t(e)});D.set(i.EventDataType.NOTIFICATION_MESSAGE,e=>{const t=R[e.messageType];Object(o.isFunction)(t)&&t(e.message)});L.set("extended_response",e=>{"application/sparql-results+json"===e.contentType?h.getOntotextYasguiElement().getEmbeddedResultAsJson().then(t=>{const n=JSON.stringify(t,null,"\t");f.FileUtils.downloadAsFile(B()+"_queryResults.json",e.contentType,n)}):"text/csv"===e.contentType&&h.getOntotextYasguiElement().getEmbeddedResultAsCSV().then(t=>{f.FileUtils.downloadAsFile(B()+"_queryResults.csv",e.contentType,t)})});const M=(e,r,o,a,i,u)=>{const c={query:e,infer:r,sameAs:o,authToken:a};b.downloadResultsAsFile(t.getActiveRepository(),c,i,u).then((function({data:e,filename:t}){Object(s.saveAs)(e,t)})).catch((function(e){e.data.text().then(t=>{431===e.status?R.error(e.statusText,n.instant("common.error")):R.error(t,n.instant("common.error"))})})).finally(()=>{h.setLoader(!1)})};L.set(c.YasrPluginName.EXTENDED_TABLE,e=>{const t=e.query,n=e.infer,r=e.sameAs,o=e.contentType,s=v.getAuthToken()||"";if("application/ld+json"===e.contentType||"application/x-ld+ndjson"===e.contentType){T.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:m.ExportSettingsCtrl,size:"lg",scope:h,resolve:{format:function(){return"application/ld+json"===e.contentType?"JSON-LD":"NDJSON-LD"}}}).result.then((function(e){const a="framed"===e.currentMode.name?"frame":"context",i=o+";profile="+e.currentMode.link,u=e.link?`<${e.link}>; rel="http://www.w3.org/ns/json-ld#${a}"`:"";M(t,n,r,s,i,u)}))}else M(t,n,r,s,o,"")});const Y=[],I=()=>h.getOntotextYasguiElement().getQuery().then(e=>{P=JSON.stringify(e)});Y.push(h.$watch("yasguiConfig",(r,o)=>{if(!h.ontotextYasguiConfig&&r||r&&!Object(d.isEqual)(r,o)){const o=t.isActiveRepoOntopType(),s={isVirtualRepository:o,infer:o||r.infer,immutableInfer:o,sameAs:o||r.sameAs,immutableSameAs:o,yasqeAutocomplete:{LocalNamesAutocompleter:t=>{const n=e.defer();return V(t,n)}},language:S.getLanguage(),i18n:N.getTranslations(),getRepositoryStatementsCount:K,onQueryAborted:H};if(angular.extend(s,$(),h.yasguiConfig),void 0===s.showQueryButton||s.showQueryButton){const e=s.keyboardShortcutConfiguration||{};e[y.KeyboardShortcutName.EXECUTE_EXPLAIN_PLAN_FOR_QUERY]=!0,e[y.KeyboardShortcutName.EXECUTE_CHAT_GPT_EXPLAIN_PLAN_FOR_QUERY]=!0,s.keyboardShortcutConfiguration=e}else{const e=s.keyboardShortcutConfiguration||{};e[y.KeyboardShortcutName.EXECUTE_QUERY_OR_UPDATE]=!1,e[y.KeyboardShortcutName.EXECUTE_EXPLAIN_PLAN_FOR_QUERY]=!1,e[y.KeyboardShortcutName.EXECUTE_CHAT_GPT_EXPLAIN_PLAN_FOR_QUERY]=!1,e[y.KeyboardShortcutName.CREATE_TAB]=!1,e[y.KeyboardShortcutName.CREATE_SAVE_QUERY]=!1,e[y.KeyboardShortcutName.SWITCH_NEXT_TAB]=!1,e[y.KeyboardShortcutName.SWITCH_PREVIOUS_TAB]=!1,e[y.KeyboardShortcutName.CLOSES_ALL_TABS]=!1,s.keyboardShortcutConfiguration=e}E.YasguiPersistenceMigrationService.isMigrationNeeded()&&E.YasguiPersistenceMigrationService.migrateYasguiPersistence(n.instant("sparql.tab.directive.unnamed.tab.title")),h.ontotextYasguiConfig=s,k(),I().then(()=>{angular.isFunction(h.afterInit)&&h.afterInit()})}}));const U=()=>{let e;const t=h.getOntotextYasguiElement();t.getQuery().then(t=>(e=JSON.stringify(t),e)).then(A.addKnownPrefixes).then(n=>{e=n.data,t.setQuery(e)}).then(()=>{j(JSON.stringify(e))}).catch(e=>{const t=getError(e);R.error(t,n.instant("common.add.known.prefixes.error"))})},k=()=>{const e=_((function(){const t=h.getOntotextYasguiElements();t&&(t.on("paste.sparqlQuery",".CodeMirror",U),t.on("keyup.sparqlQuery",".CodeMirror textarea",x),_.cancel(e))}))},x=e=>{h.getOntotextYasguiElement().getQuery().then(e=>{j(JSON.stringify(e))})},j=e=>{h.queryChanged(e),h.$emit("queryChanged",{dirty:P!==e})};Y.push(h.$on("language-changed",(function(e,t){h.language=t.locale})));h.$on("$destroy",()=>{Y.forEach(e=>e());const e=h.getOntotextYasguiElements();e.off("paste.sparqlQuery"),e.off("keyup.sparqlQuery")});const B=()=>{const e=new Date;return`${e.toLocaleDateString(h.language)}_${e.toLocaleTimeString(h.language)}`},F=e=>{if(e.isResponseNumber())return e.getResponseBody();if(e.isResponseArray()){const t=e.getResponseBody();if(t["http://www.ontotext.com/"])return t["http://www.ontotext.com/"]["http://www.ontotext.com/"][0].value}if(e.hasBindingResponse()){const t=e.getResponseBody();if(t){const e=t.results.bindings[0],n=t.head.vars,r=Object.keys(e).find((function(t){return n.indexOf(t)>-1&&!isNaN(e[t].value)}));if(r.length>0)return e[r].value}}},J=e=>{const n=e.getTab().getYasqe(),r={"Content-Type":"application/x-www-form-urlencoded","X-GraphDB-Local-Consistency":"updating","X-GraphDB-Catch":n.getPageSize()+"; throw","X-GraphDB-Track-Alias":`yasgui-component-${performance.now()}-${Date.now()}`,"X-GraphDB-Repository-Location":t.getActiveRepositoryObject().location,"X-Requested-With":"XMLHttpRequest"},o=v.getAuthToken();o&&(r.Authorization=o);const s=n.getQueryType();return u.QueryMode.UPDATE===n.getQueryMode()?r.Accept="text/plain,/;q=0.9":l.QueryType.CONSTRUCT===s||l.QueryType.DESCRIBE===s?r.Accept="application/x-graphdb-table-results+json, application/rdf+json;q=0.9, */*;q=0.8":r.Accept="application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8",r},$=()=>({showEditorTabs:!0,showToolbar:!0,componentId:"yasgui-component",headers:J,pageSize:1e3,maxPersistentResponseSize:5e5,showResultTabs:!0}),X=e=>{const t=getError(e),r=n.instant("query.editor.create.saved.query.error");R.error(t,r),h.savedQueryConfig=Object(o.merge)({},h.savedQueryConfig,{saveSuccess:!1,errorMessage:[r]})},z=e=>W(n.instant("query.editor.edit.saved.query.success.msg",{name:e.name})),G=e=>W(n.instant("query.editor.save.saved.query.success.msg",{name:e.name})),W=e=>{R.success(e),h.savedQueryConfig=Object(o.merge)({},h.savedQueryConfig,{saveSuccess:!0})},V=(e,t)=>O.getAutocompleteSuggestions(e,t.promise).then((function(e){return t=null,e.data})),K=()=>b.getRepositorySize(t.getActiveRepository()).then(e=>parseInt(e.data)).catch((function(e){const r={repo:t.getActiveRepository(),error:getError(e)};R.warning(n.instant("query.editor.repo.size.error",r))})),H=e=>{if(e){const t=e.url.substring(e.url.lastIndexOf("/")+1),n=e.header["X-GraphDB-Track-Alias"];return C.deleteQuery(n,t)}}}}}angular.module("graphdb.framework.core.directives.yasgui-component",["graphdb.framework.core.services.translation-service","graphdb.framework.sparql-editor.share-query.service"]).directive("yasguiComponent",h),h.$inject=["$q","$repositories","$translate","$location","$languageService","$uibModal","AuthTokenService","$interval","toastr","TranslationService","AutocompleteRestService","RDF4JRepositoriesRestService","MonitoringRestService","SparqlRestService","ShareQueryLinkService","ModalService"]},142:function(e,t,n){"use strict";n.r(t),n.d(t,"TabQueryModel",(function(){return r}));class r{constructor(e,t,n,r=!0){this.queryName=e,this.query=t,this.owner=n,this.isPublic=r}}},150:function(e,t,n){"use strict";n.r(t),n.d(t,"buildQueryModel",(function(){return o})),n.d(t,"savedQueriesResponseMapper",(function(){return s})),n.d(t,"savedQueryResponseMapper",(function(){return a})),n.d(t,"queryPayloadFromEvent",(function(){return i}));var r=n(142);const o=(e,t,n,o)=>new r.TabQueryModel(t,e,n,o),s=e=>e&&e.data?e.data.map?e.data.map(e=>o(e.body,e.name,e.owner,e.shared)):[o(e.data.body,e.data.name,e.data.owner,e.data.shared)]:[],a=e=>{const t=s(e);return t.length?t[0]:null},i=e=>({name:e.detail.queryName,body:e.detail.query,shared:e.detail.isPublic})},162:function(e,t,n){"use strict";n.r(t),n.d(t,"EventData",(function(){return r}));class r{constructor(e,t){this.TYPE=e,this.payload=t}}},163:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryRequestEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.query=e.payload.query,this.queryMode=e.payload.queryMode,this.queryType=e.payload.queryType,this.pageSize=e.payload.pageSize,this.request=e.payload.request}setPageSize(e){this.request._data.pageSize=e}getPageSize(){return this.request._data.pageSize?parseInt(this.request._data.pageSize):void 0}setPageNumber(e){this.request._data.pageNumber=e}getPageNumber(){return this.request._data.pageNumber?parseInt(this.request._data.pageNumber):void 0}setOffset(e){this.request._data.offset=e}setLimit(e){this.request._data.limit=e}}},164:function(e,t,n){"use strict";n.r(t),n.d(t,"CountQueryResponseEvent",(function(){return o}));var r=n(18);class o{constructor(e){this.TYPE=e.TYPE,this.response=e.payload.response}hasResponse(){return this.response&&this.response.body}getResponseBody(){if(this.hasResponse())return this.response.body}isResponseNumber(){return!!this.hasResponse()&&Object(r.isNumber)(this.response.body)}isResponseArray(){return!!this.hasResponse()&&Array.isArray(this.response.body)}getBindings(){if(this.hasResponse())return this.response.body.results.bindings}hasBindingResponse(){return!!this.hasResponse()&&this.response.body.results.bindings[0]}setTotalElements(e){this.response.body.totalElements=e}}},165:function(e,t,n){"use strict";n.r(t),n.d(t,"CountQueryRequestEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.query=e.payload.query,this.queryMode=e.payload.queryMode,this.queryType=e.payload.queryType,this.pageSize=e.payload.pageSize,this.request=e.payload.request}setPageSize(e){this.request._data.pageSize=e}setPageNumber(e){this.request._data.pageNumber=e}setCount(e){this.request._data.count=e}}},166:function(e,t,n){"use strict";n.r(t),n.d(t,"DownloadAsEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.contentType=e.payload.value,this.pluginName=e.payload.pluginName,this.query=e.payload.query,this.infer=e.payload.infer,this.sameAs=e.payload.sameAs}}},167:function(e,t,n){"use strict";n.r(t),n.d(t,"NotificationMessageEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.message=e.payload.message,this.code=e.payload.code,this.messageType=e.payload.messageType}}},168:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryExecutedEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.duration=e.payload.duration,this.tabId=e.payload.tabId}}},169:function(e,t,n){"use strict";n.r(t),n.d(t,"SaveQueryOpened",(function(){return r}));class r{constructor(e){this.tab=e.payload.tab}getTab(){return this.tab}}},170:function(e,t,n){"use strict";n.r(t),n.d(t,"RequestAbortedEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.request=e.payload.request,this.queryMode=e.payload.queryMode}getQueryTrackAlias(){if(this.request)return this.request.header["X-GraphDB-Track-Alias"]}getRepository(){if(this.request){const e=this.request.url;return e.substring(e.lastIndexOf("/")+1)}}}},171:function(e,t,n){"use strict";n.r(t),n.d(t,"YasrPluginName",(function(){return r}));const r={EXTENDED_TABLE:"extended_table",RAW_RESPONSE:"response",TABLE:"table"}},233:function(e,t){function n(e,t){const n=t.getSupportedLanguages();let r;return{getTranslations:()=>(r||(r={},n.forEach(t=>r[t]=e.getTranslationTable(t))),r)}}angular.module("graphdb.framework.core.services.translation-service",[]).service("TranslationService",n),n.$inject=["$translate","$languageService"]},234:function(e,t,n){"use strict";n.r(t);var r=n(129);angular.module("graphdb.framework.sparql-editor.share-query.service",[]).factory("ShareQueryLinkService",(function(){return{createShareSavedQueryLink:function(t,n){let o=`${e()}?${r.RouteConstants.savedQueryName}=${encodeURIComponent(t)}`;null!=n&&(o+=`&${r.RouteConstants.savedQueryOwner}=${encodeURIComponent(n)}`);return o},createShareQueryLink:function(t){return e()+"?"+$.param({name:t.name,query:t.body,infer:t.inference||!0,sameAs:t.sameAs||!0})}};function e(){return[location.protocol,"//",location.host,location.pathname].join("")}}))},235:function(e,t,n){"use strict";n.r(t),n.d(t,"toEventData",(function(){return g})),n.d(t,"toYasguiOutputModel",(function(){return y}));var r=n(162),o=n(120),s=n(163),a=n(164),i=n(165),u=n(166),c=n(167),d=n(168),l=n(169),p=n(170);const g=e=>new r.EventData(e.detail.TYPE,e.detail.payload),y=e=>{const t=g(e);switch(t.TYPE){case o.EventDataType.DOWNLOAD_AS:return new u.DownloadAsEvent(t);case o.EventDataType.NOTIFICATION_MESSAGE:return new c.NotificationMessageEvent(t);case o.EventDataType.COUNT_QUERY:return new i.CountQueryRequestEvent(t);case o.EventDataType.COUNT_QUERY_RESPONSE:return new a.CountQueryResponseEvent(t);case o.EventDataType.QUERY:return new s.QueryRequestEvent(t);case o.EventDataType.QUERY_EXECUTED:return new d.QueryExecutedEvent(t);case o.EventDataType.SAVE_QUERY_OPENED:return new l.SaveQueryOpened(t);case o.EventDataType.REQUEST_ABORTED:return new p.RequestAbortedEvent(t);default:return t}}},236:function(e,t,n){"use strict";n.r(t),n.d(t,"YasguiComponent",(function(){return o}));var r=n(19);class o{constructor(e=r.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor")){this.yasguiComponent=e}changeRenderMode(e){return this.yasguiComponent.changeRenderMode(e)}setQuery(e){return this.yasguiComponent.setQuery(e)}query(e){return this.yasguiComponent.query(e)}getQuery(){return this.yasguiComponent.getQuery()}isQueryValid(){return this.yasguiComponent.isQueryValid()}openTab(e){return this.yasguiComponent.openTab(e)}getQueryMode(){return this.yasguiComponent.getQueryMode()}getQueryType(){return this.yasguiComponent.getQueryType()}getEmbeddedResultAsJson(){return this.yasguiComponent.getEmbeddedResultAsJson()}getEmbeddedResultAsCSV(){return this.yasguiComponent.getEmbeddedResultAsCSV()}hideYasqeActionButton(e){return this.yasguiComponent.hideYasqeActionButton(e)}showYasqeActionButton(e){return this.yasguiComponent.showYasqeActionButton(e)}abortQuery(){return this.yasguiComponent.abortQuery()}getOngoingRequestsInfo(){return this.yasguiComponent.getOngoingRequestsInfo()}abortAllRequests(){return this.yasguiComponent.abortAllRequests()}reInitYasgui(e){return this.yasguiComponent.reInitYasgui(e)}}},237:function(e,t,n){"use strict";n.r(t),n.d(t,"KeyboardShortcutName",(function(){return r}));const r={TRIGGER_AUTOCOMPLETION:"trigger_autocompletion",DELETE_CURRENT_LINE:"delete_current_line",COMMENT_SELECTED_LINE:"comment_selected_line",COPY_LINE_DOWN:"copy_line_down",COPY_LINE_UP:"copy_line_up",AUTO_FORMAT_SELECTED_LINE:"auto_format_selected_line",INDENT_CURRENT_LINE_MORE:"indent_current_line_more",INDENT_CURRENT_LINE_LESS:"indent_current_line_less",EXECUTE_QUERY_OR_UPDATE:"execute_query_or_update",EXECUTE_EXPLAIN_PLAN_FOR_QUERY:"execute_explain_plan_for_query",EXECUTE_CHAT_GPT_EXPLAIN_PLAN_FOR_QUERY:"execute_chat_gpt_explain_plan_for_query",CREATE_TAB:"create_tab",CREATE_SAVE_QUERY:"create_save_query",SWITCH_NEXT_TAB:"switch_next_tab",SWITCH_PREVIOUS_TAB:"switch_previous_tab",CLOSES_ALL_TABS:"closes_all_tabs",FULL_SCREEN:"full_screen",ESC:"esc"}},238:function(e,t,n){"use strict";n.r(t),n.d(t,"YasguiPersistenceMigrationService",(function(){return i}));var r=n(131);const o="yagui__"+r.VIEW_SPARQL_EDITOR,s="completed",a="rejected",i=function(){const e=()=>({val:{active:null,tabs:[],tabConfig:{}}}),t=(e,t,n=null)=>{e.val.migration={date:(new Date).toISOString(),status:t,error:n}},n=(e,t)=>{e.val.tabs.push(t)},r=(e,t)=>{e.val.tabConfig[t.id]=t},i=e=>{let t=localStorage.getItem(e);if(t)return t=JSON.parse(t),t},u=e=>{e.val.tabs=e.val.tabs.filter(e=>!e.startsWith("_"))},c=e=>{for(const t in e.val.tabConfig)t.startsWith("_")&&delete e.val.tabConfig[t]},d=(e,t)=>{localStorage.setItem(e,JSON.stringify(t))},l=(e,t)=>`${t} ${e}`,p=()=>Math.random().toString(36).substring(7);return{isMigrationNeeded:()=>{const e=i(o);let t=!1;return e&&(t=e.val.migration&&(e.val.migration.status===s||e.val.migration.status===a)),!(!localStorage.getItem("ls.tabs-state")||t)},revertMigration:()=>{const e=i(o);u(e),c(e),d(o,e)},migrateYasguiPersistence:a=>{let u=i("ls.tabs-state");u=Object.freeze(u);let c=i(o);c||(c=e()),u.map(e=>({id:e.id,name:e.name,yasqe:{value:e.query,sameAs:e.sameAs,infer:e.inference,pageSize:1e3,pageNumber:1},yasr:{response:null,settings:{selectedPlugin:"extended_table",pluginsConfig:{}}},requestConfig:{method:"POST"}})).forEach((e,t)=>{e.id="_"+p(),e.name=e.name||l(t,a),n(c,e.id),r(c,e)}),c.val.active=c.val.tabs[0],t(c,s),d(o,c)},rejectMigration:()=>{const e=i(o);t(e,a),d(o,e)}}}()},549:function(e,t,n){var r,o=o||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},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o=e.webkitRequestFileSystem,s=e.requestFileSystem||o||e.mozRequestFileSystem,a=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},i=0,u=function(t){var r=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?r():setTimeout(r,500)},c=function(e,t,n){for(var r=(t=[].concat(t)).length;r--;){var o=e["on"+t[r]];if("function"==typeof o)try{o.call(e,n||e)}catch(e){a(e)}}},d=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},l=function(t,a){t=d(t);var l,p,g,y=this,E=t.type,m=!1,f=function(){c(y,"writestart progress write writeend".split(" "))},h=function(){(!m&&l||(l=n().createObjectURL(t)),p)?p.location.href=l:null==e.open(l,"_blank")&&"undefined"!=typeof safari&&(e.location.href=l);y.readyState=y.DONE,f(),u(l)},S=function(e){return function(){if(y.readyState!==y.DONE)return e.apply(this,arguments)}},T={create:!0,exclusive:!1};if(y.readyState=y.INIT,a||(a="download"),r)return l=n().createObjectURL(t),r.href=l,r.download=a,void setTimeout((function(){var e,t;e=r,t=new MouseEvent("click"),e.dispatchEvent(t),f(),u(l),y.readyState=y.DONE}));e.chrome&&E&&"application/octet-stream"!==E&&(g=t.slice||t.webkitSlice,t=g.call(t,0,t.size,"application/octet-stream"),m=!0),o&&"download"!==a&&(a+=".download"),("application/octet-stream"===E||o)&&(p=e),s?(i+=t.size,s(e.TEMPORARY,i,S((function(e){e.root.getDirectory("saved",T,S((function(e){var n=function(){e.getFile(a,T,S((function(e){e.createWriter(S((function(n){n.onwriteend=function(t){p.location.href=e.toURL(),y.readyState=y.DONE,c(y,"writeend",t),u(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&h()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=y["on"+e]})),n.write(t),y.abort=function(){n.abort(),y.readyState=y.DONE},y.readyState=y.WRITING})),h)})),h)};e.getFile(a,{create:!1},S((function(e){e.remove(),n()})),S((function(e){e.code===e.NOT_FOUND_ERR?n():h()})))})),h)})),h)):h()},p=l.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(d(e),t)}:(p.abort=function(){this.readyState=this.DONE,c(this,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,function(e,t){return new l(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=o:null!==n(553)&&null!=n(548)&&(void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r))}}]);