@entryscape/rdforms 10.3.1 → 10.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,4 +7,4 @@ e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_Augus
7
7
  * @author Feross Aboukhadijeh <https://feross.org>
8
8
  * @license MIT
9
9
  */
10
- e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r={"./af":191,"./af.js":191,"./ar":192,"./ar-dz":193,"./ar-dz.js":193,"./ar-kw":194,"./ar-kw.js":194,"./ar-ly":195,"./ar-ly.js":195,"./ar-ma":196,"./ar-ma.js":196,"./ar-sa":197,"./ar-sa.js":197,"./ar-tn":198,"./ar-tn.js":198,"./ar.js":192,"./az":199,"./az.js":199,"./be":200,"./be.js":200,"./bg":201,"./bg.js":201,"./bm":202,"./bm.js":202,"./bn":203,"./bn.js":203,"./bo":204,"./bo.js":204,"./br":205,"./br.js":205,"./bs":206,"./bs.js":206,"./ca":207,"./ca.js":207,"./cs":208,"./cs.js":208,"./cv":209,"./cv.js":209,"./cy":210,"./cy.js":210,"./da":211,"./da.js":211,"./de":212,"./de-at":213,"./de-at.js":213,"./de-ch":214,"./de-ch.js":214,"./de.js":212,"./dv":215,"./dv.js":215,"./el":216,"./el.js":216,"./en-SG":217,"./en-SG.js":217,"./en-au":218,"./en-au.js":218,"./en-ca":219,"./en-ca.js":219,"./en-gb":220,"./en-gb.js":220,"./en-ie":221,"./en-ie.js":221,"./en-il":222,"./en-il.js":222,"./en-nz":223,"./en-nz.js":223,"./en-sg":224,"./en-sg.js":224,"./eo":225,"./eo.js":225,"./es":226,"./es-do":227,"./es-do.js":227,"./es-us":228,"./es-us.js":228,"./es.js":226,"./et":229,"./et.js":229,"./eu":230,"./eu.js":230,"./fa":231,"./fa.js":231,"./fi":232,"./fi.js":232,"./fo":233,"./fo.js":233,"./fr":234,"./fr-ca":235,"./fr-ca.js":235,"./fr-ch":236,"./fr-ch.js":236,"./fr.js":234,"./fy":237,"./fy.js":237,"./ga":238,"./ga.js":238,"./gd":239,"./gd.js":239,"./gl":240,"./gl.js":240,"./gom-latn":241,"./gom-latn.js":241,"./gu":242,"./gu.js":242,"./he":243,"./he.js":243,"./hi":244,"./hi.js":244,"./hr":245,"./hr.js":245,"./hu":246,"./hu.js":246,"./hy-am":247,"./hy-am.js":247,"./id":248,"./id.js":248,"./is":249,"./is.js":249,"./it":250,"./it-ch":251,"./it-ch.js":251,"./it.js":250,"./ja":252,"./ja.js":252,"./jv":253,"./jv.js":253,"./ka":254,"./ka.js":254,"./kk":255,"./kk.js":255,"./km":256,"./km.js":256,"./kn":257,"./kn.js":257,"./ko":258,"./ko.js":258,"./ku":259,"./ku.js":259,"./ky":260,"./ky.js":260,"./lb":261,"./lb.js":261,"./lo":262,"./lo.js":262,"./lt":263,"./lt.js":263,"./lv":264,"./lv.js":264,"./me":265,"./me.js":265,"./mi":266,"./mi.js":266,"./mk":267,"./mk.js":267,"./ml":268,"./ml.js":268,"./mn":269,"./mn.js":269,"./mr":270,"./mr.js":270,"./ms":271,"./ms-my":272,"./ms-my.js":272,"./ms.js":271,"./mt":273,"./mt.js":273,"./my":274,"./my.js":274,"./nb":275,"./nb.js":275,"./ne":276,"./ne.js":276,"./nl":277,"./nl-be":278,"./nl-be.js":278,"./nl.js":277,"./nn":279,"./nn.js":279,"./pa-in":280,"./pa-in.js":280,"./pl":281,"./pl.js":281,"./pt":282,"./pt-br":283,"./pt-br.js":283,"./pt.js":282,"./ro":284,"./ro.js":284,"./ru":285,"./ru.js":285,"./sd":286,"./sd.js":286,"./se":287,"./se.js":287,"./si":288,"./si.js":288,"./sk":289,"./sk.js":289,"./sl":290,"./sl.js":290,"./sq":291,"./sq.js":291,"./sr":292,"./sr-cyrl":293,"./sr-cyrl.js":293,"./sr.js":292,"./ss":294,"./ss.js":294,"./sv":295,"./sv.js":295,"./sw":296,"./sw.js":296,"./ta":297,"./ta.js":297,"./te":298,"./te.js":298,"./tet":299,"./tet.js":299,"./tg":300,"./tg.js":300,"./th":301,"./th.js":301,"./tl-ph":302,"./tl-ph.js":302,"./tlh":303,"./tlh.js":303,"./tr":304,"./tr.js":304,"./tzl":305,"./tzl.js":305,"./tzm":306,"./tzm-latn":307,"./tzm-latn.js":307,"./tzm.js":306,"./ug-cn":308,"./ug-cn.js":308,"./uk":309,"./uk.js":309,"./ur":310,"./ur.js":310,"./uz":311,"./uz-latn":312,"./uz-latn.js":312,"./uz.js":311,"./vi":313,"./vi.js":313,"./x-pseudo":314,"./x-pseudo.js":314,"./yo":315,"./yo.js":315,"./zh-cn":316,"./zh-cn.js":316,"./zh-hk":317,"./zh-hk.js":317,"./zh-tw":318,"./zh-tw.js":318};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id=697},function(e,t,n){"use strict";n.r(t),n.d(t,"ItemStore",(function(){return Cr})),n.d(t,"bundleLoader",(function(){return Wr})),n.d(t,"utils",(function(){return jn})),n.d(t,"system",(function(){return Dn})),n.d(t,"engine",(function(){return Nr})),n.d(t,"validate",(function(){return Xr}));n(325);"__rdfjson_namespaces"in globalThis||(globalThis.__rdfjson_namespaces={ical:"http://www.w3.org/2002/12/cal/ical#",vcard:"http://www.w3.org/2006/vcard/ns#",dcterms:"http://purl.org/dc/terms/",skos:"http://www.w3.org/2004/02/skos/core#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",owl:"http://www.w3.org/2002/07/owl#",vs:"http://www.w3.org/2003/06/sw-vocab-status/ns#",foaf:"http://xmlns.com/foaf/0.1/",wot:"http://xmlns.com/wot/0.1/",dc:"http://purl.org/dc/elements/1.1/",xsd:"http://www.w3.org/2001/XMLSchema#",dcat:"http://www.w3.org/ns/dcat#",org:"http://www.w3.org/ns/org#",gn:"http://www.geonames.org/ontology#",locn:"http://www.w3.org/ns/locn#",schema:"http://schema.org/",ex:"http://example.com/",gsp:"http://www.opengis.net/ont/geosparql#",odrs:"http://schema.theodi.org/odrs#"});const{__rdfjson_namespaces:r}=globalThis;let a=0;const i=(e,t,n)=>(r[e]||(r[e]=t),{abbrev:e,ns:t,localname:n,full:t+n,pretty:`${e}:${n}`}),o=e=>{const t=Object.keys(r).find(t=>0===e.indexOf(r[t]));if(t)return i(t,r[t],e.substring(r[t].length));let n=e.lastIndexOf("/");const s=e.lastIndexOf("#");return s>n&&(n=s),a+=1,i("ns"+a,e.substring(0,n+1),e.substring(n+1))};var u=e=>o(e).pretty,d=e=>{const t=e.split(":");return 2===t.length&&r.hasOwnProperty(t[0])?r[t[0]]+t[1]:e},c=(e,t)=>{"string"==typeof e?r[e]=t:"object"==typeof e&&Object.keys(e).forEach(t=>{r[t]=e[t]})},l=n(320),_=n.n(l);n(140);const h=(e,t)=>{var n=t.indexOf("#");if(n>0&&(t=t.slice(0,n)),0==e.length)return t;if(0==e.indexOf("#"))return t+e;if(e.indexOf(":")>=0)return e;var r=t.indexOf(":");if(r<0)return console.log("Invalid base URL "+t),e;var a,i=t.slice(0,r+1);if(0==e.indexOf("//"))return i+e;if(t.indexOf("//",r)==r+1){if((a=t.indexOf("/",r+3))<0)return t.length-r-3>0?t+"/"+e:i+e}else if((a=t.indexOf("/",r+1))<0)return t.length-r-1>0?t+"/"+e:i+e;if(0==e.indexOf("/"))return t.slice(0,a)+e;var s=t.slice(a),o=s.lastIndexOf("/");if(o<0)return i+e;for(o>=0&&o<s.length-1&&(s=s.slice(0,o+1)),s+=e;s.match(/[^\/]*\/\.\.\//);)s=s.replace(/[^\/]*\/\.\.\//,"");return s=s.replace(/\.\//g,""),t.slice(0,a)+s};var f;f=function(e){f.ns={RDF:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",RDFS:"http://www.w3.org/2000/01/rdf-schema#"},f.nodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},this.frameFactory=function(e,t,n){return{NODE:1,ARC:2,parent:t,parser:e,store:e.store,element:n,lastChild:0,base:null,lang:null,node:null,nodeType:null,listIndex:1,rdfid:null,datatype:null,collection:!1,terminateFrame:function(){this.collection&&this.node.close()},addSymbol:function(e,t){t=h(t,this.base),this.node=this.store.sym(t),this.nodeType=e},loadTriple:function(){if(this.parent.parent.collection?this.parent.parent.node.append(this.node):this.store.add(this.parent.parent.node,this.parent.node,this.node,this.parser.why),null!=this.parent.rdfid){var e=this.store.sym(h("#"+this.parent.rdfid,this.base));this.store.add(e,this.store.sym(f.ns.RDF+"type"),this.store.sym(f.ns.RDF+"Statement"),this.parser.why),this.store.add(e,this.store.sym(f.ns.RDF+"subject"),this.parent.parent.node,this.parser.why),this.store.add(e,this.store.sym(f.ns.RDF+"predicate"),this.parent.node,this.parser.why),this.store.add(e,this.store.sym(f.ns.RDF+"object"),this.node,this.parser.why)}},isTripleToLoad:function(){return null!=this.parent&&null!=this.parent.parent&&this.nodeType==this.NODE&&this.parent.nodeType==this.ARC&&this.parent.parent.nodeType==this.NODE},addNode:function(e){this.addSymbol(this.NODE,e),this.isTripleToLoad()&&this.loadTriple()},addCollection:function(){this.nodeType=this.NODE,this.node=this.store.collection(),this.collection=!0,this.isTripleToLoad()&&this.loadTriple()},addCollectionArc:function(){this.nodeType=this.ARC},addBNode:function(e){null!=e?null!=this.parser.bnodes[e]?this.node=this.parser.bnodes[e]:this.node=this.parser.bnodes[e]=this.store.bnode():this.node=this.store.bnode(),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()},addArc:function(e){e==f.ns.RDF+"li"&&(e=f.ns.RDF+"_"+this.parent.listIndex++),this.addSymbol(this.ARC,e)},addLiteral:function(e){this.parent.datatype?this.node=this.store.literal(e,"",this.store.sym(this.parent.datatype)):this.node=this.store.literal(e,this.lang),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()}}},this.store=e,this.bnodes={},this.why=null,this.reify=!1,this.parse=function(e,t,n){var r,a=e.childNodes;if(this.cleanParser(),e.nodeType==f.nodeType.DOCUMENT){for(var i=0;i<a.length;i++)if(a[i].nodeType==f.nodeType.ELEMENT){r=a[i];break}}else{if(e.nodeType!=f.nodeType.ELEMENT)throw new Error("RDFParser: can't find root in "+t+". Halting. ");r=e}this.why=n;var s=this.frameFactory(this);return s.base=t,s.lang="",this.parseDOM(this.buildFrame(s,r)),!0},this.parseDOM=function(e){for(var t=function(e){return e.namespaceURI+e.localName},n=!0;e.parent;){var r,a,i=e.element,s=i.attributes;if(i.nodeType==f.nodeType.TEXT||i.nodeType==f.nodeType.CDATA_SECTION)e.addLiteral(i.nodeValue);else if(t(i)!=f.ns.RDF+"RDF")if(e.parent&&e.parent.collection&&(e.addCollectionArc(),(e=this.buildFrame(e,e.element)).parent.element=null),e.parent&&e.parent.nodeType&&e.parent.nodeType!=e.ARC){e.addArc(t(i)),this.reify&&(r=i.getAttributeNodeNS(f.ns.RDF,"ID"))&&(e.rdfid=r.nodeValue,i.removeAttributeNode(r));var o=i.getAttributeNodeNS(f.ns.RDF,"parseType"),u=i.getAttributeNodeNS(f.ns.RDF,"datatype");if(u&&(e.datatype=u.nodeValue,i.removeAttributeNode(u)),o){var d=o.nodeValue;"Literal"==d?(e.datatype=f.ns.RDF+"XMLLiteral",(e=this.buildFrame(e)).addLiteral(i),n=!1):"Resource"==d?((e=this.buildFrame(e,e.element)).parent.element=null,e.addBNode()):"Collection"==d&&((e=this.buildFrame(e,e.element)).parent.element=null,e.addCollection()),i.removeAttributeNode(o)}if(0!=s.length){var c=i.getAttributeNodeNS(f.ns.RDF,"resource");for(a=i.getAttributeNodeNS(f.ns.RDF,"nodeID"),e=this.buildFrame(e),c?(e.addNode(c.nodeValue),i.removeAttributeNode(c)):a?(e.addBNode(a.nodeValue),i.removeAttributeNode(a)):e.addBNode(),p=s.length-1;p>=0;p--){var l=this.buildFrame(e);l.addArc(t(s[p])),t(s[p])==f.ns.RDF+"type"?this.buildFrame(l).addNode(s[p].nodeValue):this.buildFrame(l).addLiteral(s[p].nodeValue)}}else 0==i.childNodes.length&&this.buildFrame(e).addLiteral("")}else{var _=i.getAttributeNodeNS(f.ns.RDF,"about");if(r=i.getAttributeNodeNS(f.ns.RDF,"ID"),_&&r)throw new Error("RDFParser: "+i.nodeName+" has both rdf:id and rdf:about. Halting. Only one of these properties may be specified on a node.");null==_&&r?(e.addNode("#"+r.nodeValue),i.removeAttributeNode(r)):null==_&&null==r?(a=i.getAttributeNodeNS(f.ns.RDF,"nodeID"))?(e.addBNode(a.nodeValue),i.removeAttributeNode(a)):e.addBNode():(e.addNode(_.nodeValue),i.removeAttributeNode(_));var m=i.getAttributeNodeNS(f.ns.RDF,"type");f.ns.RDF+"Description"!=t(i)&&(m={nodeValue:t(i)}),null!=m&&(this.store.add(e.node,this.store.sym(f.ns.RDF+"type"),this.store.sym(h(m.nodeValue,e.base)),this.why),m.nodeName&&i.removeAttributeNode(m));for(var p=s.length-1;p>=0;p--)this.store.add(e.node,this.store.sym(t(s[p])),this.store.literal(s[p].nodeValue,e.lang),this.why)}for(i=e.element;e.parent;){for(var y=e;null==i;)i=(e=e.parent).element;var g=i.childNodes,M=null!=g?g[e.lastChild]:null;if(null!=M&&n){if((M.nodeType==f.nodeType.ELEMENT||M.nodeType==f.nodeType.TEXT||M.nodeType==f.nodeType.CDATA_SECTION)&&(M.nodeType!=f.nodeType.TEXT&&M.nodeType!=f.nodeType.CDATA_SECTION||1==i.childNodes.length)){e.lastChild++,e=this.buildFrame(y,i.childNodes[e.lastChild-1]);break}e.lastChild++}else{if(e.terminateFrame(),!(e=e.parent))break;i=e.element,n=!0}}}},this.cleanParser=function(){this.bnodes={},this.why=null},this.buildFrame=function(e,t){var n=this.frameFactory(this,e,t);if(e&&(n.base=e.base,n.lang=e.lang),null==t||t.nodeType==f.nodeType.TEXT||t.nodeType==f.nodeType.CDATA_SECTION)return n;var r=t.attributes,a=t.getAttributeNode("xml:base");null!=a&&(n.base=a.nodeValue,t.removeAttribute("xml:base"));var i=t.getAttributeNode("xml:lang");null!=i&&(n.lang=i.nodeValue,t.removeAttribute("xml:lang"));for(var s=r.length-1;s>=0;s--)"xml"==r[s].nodeName.substr(0,3)&&t.removeAttributeNode(r[s]);return n}};const m=e=>"object"==typeof e?e:"string"==typeof e?new L(e):void(void 0!==e&&alert(`Can't make term from ${e} of type ${typeof e}`)),p=function(){return this};p.prototype.termType="empty",p.prototype.toString=function(){return""},p.prototype.toNT=function(){return""};const y=function(){return"<"+this.uri+">"},g=function(e){return this.uri=e,this};g.prototype.termType="symbol",g.prototype.toString=y,g.prototype.toNT=y;let M=0;const v=function(){return this.id=M++,this};v.prototype.termType="bnode",v.prototype.toNT=function(){return"_:n"+this.id},v.prototype.toString=v.prototype.toNT;const L=function(e,t,n){return this.value=e,this.lang=t,this.datatype=n,this};L.prototype.termType="literal",L.prototype.toNT=function(){const e=this.value;if("string"!=typeof e)throw Error("Value of RDF literal is not string: "+e);return e=e.replace(/\\/g,"\\\\"),e=e.replace(/"/g,'\\"'),e='"'+e+'"',this.datatype&&(e=e+"^^"+this.datatype),this.lang&&(e=e+"@"+this.lang),e},L.prototype.toString=function(){return this.value};const Y=function(){this.id=M++,this.elements=[],this.closed=!1};Y.prototype.termType="collection",Y.prototype.toNT=function(){return"_:n"+this.id},Y.prototype.toString=Y.prototype.toNT,Y.prototype.append=function(e){this.elements.push(e)},Y.prototype.close=function(){this.closed=!0};const b=function(){return this.subject.toNT()+" "+this.predicate.toNT()+" "+this.object.toNT()+" ."},w=function(e,t,n,r){return this.subject=m(e),this.predicate=m(t),this.object=m(n),void 0!==r&&(this.why=r),this};w.prototype.toNT=b,w.prototype.toString=b;const T=function(){return this.statements=[],this.constraints=[],this.initBindings=[],this.optional=[],this},k=function(){return"{\n"+this.statements.join("\n")+"}"};T.prototype.termType="formula",T.prototype.toNT=k,T.prototype.toString=k,T.prototype.add=function(e,t,n,r){this.statements.push(new w(e,t,n,r))},T.prototype.sym=function(e,t){return null!=t&&(e=this.namespaces[e]+t),new g(e)},T.prototype.literal=function(e,t,n){return new L(e.toString(),t,n)},T.prototype.bnode=function(){return new v},T.prototype.formula=function(){return new T},T.prototype.collection=function(){return new Y};const D=function(e){return this.uri=h(e,"varid:"),this};D.prototype.termType="variable",D.prototype.toNT=function(){return"varid:"==this.uri.slice(0,"varid:".length)?"?"+this.uri.slice("varid:".length):"?"+this.uri},D.prototype.toString=D.prototype.toNT,D.prototype.classOrder=7,T.prototype.variable=function(e){return new D(e)},D.prototype.hashString=D.prototype.toNT,T.prototype.fromNT=function(e){const t=e.length,n=e.slice(0,1);if("<"===n)return this.sym(e.slice(1,t-1));if("_"===n){const t=new v;return t.id=parseInt(e.slice(3)),M--,t}alert(`Can't yet convert from NT: '${e}', ${e[0]}`)};let S,x;Error;if("undefined"==typeof window||void 0===window.DOMParser&&"undefined"==typeof ActiveXObject){S=e=>(new XMLSerializer).serializeToString(e);const e=_.a.DOMParser;x=t=>(new e).parseFromString(t,"text/xml")}else S=e=>e.xml,x=e=>{let t;try{if(window.DOMParser){t=(new DOMParser).parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)}catch(e){t=null}if(!t||!t.documentElement||t.getElementsByTagName("parsererror").length)throw new Error("Could not parse text as xml");return t};var j=n(1),O=n.n(j);var E=function(){this.__data__=[],this.size=0};var H=function(e,t){return e===t||e!=e&&t!=t};var A=function(e,t){for(var n=e.length;n--;)if(H(e[n][0],t))return n;return-1},P=Array.prototype.splice;var I=function(e){var t=this.__data__,n=A(t,e);return!(n<0)&&(n==t.length-1?t.pop():P.call(t,n,1),--this.size,!0)};var N=function(e){var t=this.__data__,n=A(t,e);return n<0?void 0:t[n][1]};var C=function(e){return A(this.__data__,e)>-1};var R=function(e,t){var n=this.__data__,r=A(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function F(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}F.prototype.clear=E,F.prototype.delete=I,F.prototype.get=N,F.prototype.has=C,F.prototype.set=R;var W=F;var z=function(){this.__data__=new W,this.size=0};var U=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var V=function(e){return this.__data__.get(e)};var B=function(e){return this.__data__.has(e)},J=n(20),G=J.a.Symbol,$=Object.prototype,q=$.hasOwnProperty,K=$.toString,Z=G?G.toStringTag:void 0;var X=function(e){var t=q.call(e,Z),n=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var a=K.call(e);return r&&(t?e[Z]=n:delete e[Z]),a},Q=Object.prototype.toString;var ee=function(e){return Q.call(e)},te=G?G.toStringTag:void 0;var ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?X(e):ee(e)};var re=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var ae,ie=function(e){if(!re(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},se=J.a["__core-js_shared__"],oe=(ae=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||""))?"Symbol(src)_1."+ae:"";var ue=function(e){return!!oe&&oe in e},de=Function.prototype.toString;var ce=function(e){if(null!=e){try{return de.call(e)}catch(e){}try{return e+""}catch(e){}}return""},le=/^\[object .+?Constructor\]$/,_e=Function.prototype,he=Object.prototype,fe=_e.toString,me=he.hasOwnProperty,pe=RegExp("^"+fe.call(me).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ye=function(e){return!(!re(e)||ue(e))&&(ie(e)?pe:le).test(ce(e))};var ge=function(e,t){return null==e?void 0:e[t]};var Me=function(e,t){var n=ge(e,t);return ye(n)?n:void 0},ve=Me(J.a,"Map"),Le=Me(Object,"create");var Ye=function(){this.__data__=Le?Le(null):{},this.size=0};var be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},we=Object.prototype.hasOwnProperty;var Te=function(e){var t=this.__data__;if(Le){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return we.call(t,e)?t[e]:void 0},ke=Object.prototype.hasOwnProperty;var De=function(e){var t=this.__data__;return Le?void 0!==t[e]:ke.call(t,e)};var Se=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Le&&void 0===t?"__lodash_hash_undefined__":t,this};function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xe.prototype.clear=Ye,xe.prototype.delete=be,xe.prototype.get=Te,xe.prototype.has=De,xe.prototype.set=Se;var je=xe;var Oe=function(){this.size=0,this.__data__={hash:new je,map:new(ve||W),string:new je}};var Ee=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var He=function(e,t){var n=e.__data__;return Ee(t)?n["string"==typeof t?"string":"hash"]:n.map};var Ae=function(e){var t=He(this,e).delete(e);return this.size-=t?1:0,t};var Pe=function(e){return He(this,e).get(e)};var Ie=function(e){return He(this,e).has(e)};var Ne=function(e,t){var n=He(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ce.prototype.clear=Oe,Ce.prototype.delete=Ae,Ce.prototype.get=Pe,Ce.prototype.has=Ie,Ce.prototype.set=Ne;var Re=Ce;var Fe=function(e,t){var n=this.__data__;if(n instanceof W){var r=n.__data__;if(!ve||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Re(r)}return n.set(e,t),this.size=n.size,this};function We(e){var t=this.__data__=new W(e);this.size=t.size}We.prototype.clear=z,We.prototype.delete=U,We.prototype.get=V,We.prototype.has=B,We.prototype.set=Fe;var ze=We;var Ue=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},Ve=function(){try{var e=Me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Be=function(e,t,n){"__proto__"==t&&Ve?Ve(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Je=Object.prototype.hasOwnProperty;var Ge=function(e,t,n){var r=e[t];Je.call(e,t)&&H(r,n)&&(void 0!==n||t in e)||Be(e,t,n)};var $e=function(e,t,n,r){var a=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var o=t[i],u=r?r(n[o],e[o],o,n,e):void 0;void 0===u&&(u=e[o]),a?Be(n,o,u):Ge(n,o,u)}return n};var qe=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Ke=function(e){return null!=e&&"object"==typeof e};var Ze=function(e){return Ke(e)&&"[object Arguments]"==ne(e)},Xe=Object.prototype,Qe=Xe.hasOwnProperty,et=Xe.propertyIsEnumerable,tt=Ze(function(){return arguments}())?Ze:function(e){return Ke(e)&&Qe.call(e,"callee")&&!et.call(e,"callee")},nt=Array.isArray,rt=n(60),at=/^(?:0|[1-9]\d*)$/;var it=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&at.test(e))&&e>-1&&e%1==0&&e<t};var st=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ot={};ot["[object Float32Array]"]=ot["[object Float64Array]"]=ot["[object Int8Array]"]=ot["[object Int16Array]"]=ot["[object Int32Array]"]=ot["[object Uint8Array]"]=ot["[object Uint8ClampedArray]"]=ot["[object Uint16Array]"]=ot["[object Uint32Array]"]=!0,ot["[object Arguments]"]=ot["[object Array]"]=ot["[object ArrayBuffer]"]=ot["[object Boolean]"]=ot["[object DataView]"]=ot["[object Date]"]=ot["[object Error]"]=ot["[object Function]"]=ot["[object Map]"]=ot["[object Number]"]=ot["[object Object]"]=ot["[object RegExp]"]=ot["[object Set]"]=ot["[object String]"]=ot["[object WeakMap]"]=!1;var ut=function(e){return Ke(e)&&st(e.length)&&!!ot[ne(e)]};var dt=function(e){return function(t){return e(t)}},ct=n(47),lt=ct.a&&ct.a.isTypedArray,_t=lt?dt(lt):ut,ht=Object.prototype.hasOwnProperty;var ft=function(e,t){var n=nt(e),r=!n&&tt(e),a=!n&&!r&&Object(rt.a)(e),i=!n&&!r&&!a&&_t(e),s=n||r||a||i,o=s?qe(e.length,String):[],u=o.length;for(var d in e)!t&&!ht.call(e,d)||s&&("length"==d||a&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||it(d,u))||o.push(d);return o},mt=Object.prototype;var pt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||mt)};var yt=function(e,t){return function(n){return e(t(n))}},gt=yt(Object.keys,Object),Mt=Object.prototype.hasOwnProperty;var vt=function(e){if(!pt(e))return gt(e);var t=[];for(var n in Object(e))Mt.call(e,n)&&"constructor"!=n&&t.push(n);return t};var Lt=function(e){return null!=e&&st(e.length)&&!ie(e)};var Yt=function(e){return Lt(e)?ft(e):vt(e)};var bt=function(e,t){return e&&$e(t,Yt(t),e)};var wt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Tt=Object.prototype.hasOwnProperty;var kt=function(e){if(!re(e))return wt(e);var t=pt(e),n=[];for(var r in e)("constructor"!=r||!t&&Tt.call(e,r))&&n.push(r);return n};var Dt=function(e){return Lt(e)?ft(e,!0):kt(e)};var St=function(e,t){return e&&$e(t,Dt(t),e)},xt=n(322);var jt=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var Ot=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[a++]=s)}return i};var Et=function(){return[]},Ht=Object.prototype.propertyIsEnumerable,At=Object.getOwnPropertySymbols,Pt=At?function(e){return null==e?[]:(e=Object(e),Ot(At(e),(function(t){return Ht.call(e,t)})))}:Et;var It=function(e,t){return $e(e,Pt(e),t)};var Nt=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Ct=yt(Object.getPrototypeOf,Object),Rt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Nt(t,Pt(e)),e=Ct(e);return t}:Et;var Ft=function(e,t){return $e(e,Rt(e),t)};var Wt=function(e,t,n){var r=t(e);return nt(e)?r:Nt(r,n(e))};var zt=function(e){return Wt(e,Yt,Pt)};var Ut=function(e){return Wt(e,Dt,Rt)},Vt=Me(J.a,"DataView"),Bt=Me(J.a,"Promise"),Jt=Me(J.a,"Set"),Gt=Me(J.a,"WeakMap"),$t=ce(Vt),qt=ce(ve),Kt=ce(Bt),Zt=ce(Jt),Xt=ce(Gt),Qt=ne;(Vt&&"[object DataView]"!=Qt(new Vt(new ArrayBuffer(1)))||ve&&"[object Map]"!=Qt(new ve)||Bt&&"[object Promise]"!=Qt(Bt.resolve())||Jt&&"[object Set]"!=Qt(new Jt)||Gt&&"[object WeakMap]"!=Qt(new Gt))&&(Qt=function(e){var t=ne(e),n="[object Object]"==t?e.constructor:void 0,r=n?ce(n):"";if(r)switch(r){case $t:return"[object DataView]";case qt:return"[object Map]";case Kt:return"[object Promise]";case Zt:return"[object Set]";case Xt:return"[object WeakMap]"}return t});var en=Qt,tn=Object.prototype.hasOwnProperty;var nn=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&tn.call(e,"index")&&(n.index=e.index,n.input=e.input),n},rn=J.a.Uint8Array;var an=function(e){var t=new e.constructor(e.byteLength);return new rn(t).set(new rn(e)),t};var sn=function(e,t){var n=t?an(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},on=/\w*$/;var un=function(e){var t=new e.constructor(e.source,on.exec(e));return t.lastIndex=e.lastIndex,t},dn=G?G.prototype:void 0,cn=dn?dn.valueOf:void 0;var ln=function(e){return cn?Object(cn.call(e)):{}};var _n=function(e,t){var n=t?an(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var hn=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return an(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return sn(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return _n(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return un(e);case"[object Set]":return new r;case"[object Symbol]":return ln(e)}},fn=Object.create,mn=function(){function e(){}return function(t){if(!re(t))return{};if(fn)return fn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var pn=function(e){return"function"!=typeof e.constructor||pt(e)?{}:mn(Ct(e))};var yn=function(e){return Ke(e)&&"[object Map]"==en(e)},gn=ct.a&&ct.a.isMap,Mn=gn?dt(gn):yn;var vn=function(e){return Ke(e)&&"[object Set]"==en(e)},Ln=ct.a&&ct.a.isSet,Yn=Ln?dt(Ln):vn,bn={};bn["[object Arguments]"]=bn["[object Array]"]=bn["[object ArrayBuffer]"]=bn["[object DataView]"]=bn["[object Boolean]"]=bn["[object Date]"]=bn["[object Float32Array]"]=bn["[object Float64Array]"]=bn["[object Int8Array]"]=bn["[object Int16Array]"]=bn["[object Int32Array]"]=bn["[object Map]"]=bn["[object Number]"]=bn["[object Object]"]=bn["[object RegExp]"]=bn["[object Set]"]=bn["[object String]"]=bn["[object Symbol]"]=bn["[object Uint8Array]"]=bn["[object Uint8ClampedArray]"]=bn["[object Uint16Array]"]=bn["[object Uint32Array]"]=!0,bn["[object Error]"]=bn["[object Function]"]=bn["[object WeakMap]"]=!1;var wn=function e(t,n,r,a,i,s){var o,u=1&n,d=2&n,c=4&n;if(r&&(o=i?r(t,a,i,s):r(t)),void 0!==o)return o;if(!re(t))return t;var l=nt(t);if(l){if(o=nn(t),!u)return jt(t,o)}else{var _=en(t),h="[object Function]"==_||"[object GeneratorFunction]"==_;if(Object(rt.a)(t))return Object(xt.a)(t,u);if("[object Object]"==_||"[object Arguments]"==_||h&&!i){if(o=d||h?{}:pn(t),!u)return d?Ft(t,St(o,t)):It(t,bt(o,t))}else{if(!bn[_])return i?t:{};o=hn(t,_,u)}}s||(s=new ze);var f=s.get(t);if(f)return f;s.set(t,o),Yn(t)?t.forEach((function(a){o.add(e(a,n,r,a,t,s))})):Mn(t)&&t.forEach((function(a,i){o.set(i,e(a,n,r,i,t,s))}));var m=c?d?Ut:zt:d?keysIn:Yt,p=l?void 0:m(t);return Ue(p||t,(function(a,i){p&&(a=t[i=a]),Ge(o,i,e(a,n,r,i,t,s))})),o};var Tn=function(e){return wn(e,5)};const kn=(e,t,n,r)=>{if("URI"===e.getNodetype()||"RESOURCE"===e.getNodetype()){let n=jn.getLocalizedMap(r,t,e.getURIValueLabelProperties());if(!n){const e=t.lastIndexOf("#"),r=t.lastIndexOf("/");n=e>0||r>0?{"":decodeURIComponent(t.substring(1+(e>r?e:r)))}:{"":t}}return{value:t,label:n}}return{value:t,label:t}};var Dn={hasDnDSupport:e=>!1,addDnD:(e,t,n)=>({}),attachExternalLinkBehaviour:()=>!1,attachLinkBehaviour:(e,t)=>!1,openChoiceSelector:(e,t)=>{alert('This alert is a placeholder for a search dialog that should be provided as part of the integration of RDForms into a wider system.\nSimply override the methods "getChoices" and "openChoiceSelector" in the system module.'),t({value:"http://example.com/choice1",label:{en:"First choice",sv:"Första valet"}})},getChoice:(e,t,n,r)=>kn(e,t,0,r),getFallbackChoice:kn,labelProperties:["http://www.w3.org/2000/01/rdf-schema#label","http://purl.org/dc/terms/title","http://purl.org/dc/elements/1.1/title","http://www.w3.org/2004/02/skos/core#prefLabel","http://xmlns.com/foaf/0.1/name","http://xmlns.com/foaf/name"],createURI:(e,t)=>{const n=t.getChildrenRootUri(),r=n.lastIndexOf("#"),a=-1===r?n+"#":n.substring(0,r+1),i=t.getGraph()._graph;for(;;){const e=a+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);if(null==i[e])return e}}};const Sn=e=>{const t=O.a.locale();if(null==e)return{precision:"none"};if("string"==typeof e)return{value:e,precision:"nolang",lang:""};if(e.hasOwnProperty(t))return{value:e[t],precision:"exact",lang:t};if(t.indexOf("_")>-1&&e.hasOwnProperty(t.substr(0,2)))return{value:e[t.substr(0,2)],precision:"coarsen",lang:t.substr(0,2)};if(e.hasOwnProperty("en"))return{value:e.en,precision:"default",lang:"en"};if(e.hasOwnProperty(""))return{value:e[""],precision:"nolang",lang:""};const n=Object.keys(e);return n.length>0?{value:e[n[0]],precision:"any",lang:n[0]}:{precision:"none"}},xn=(e,t,n)=>{const r=e.find(t,n);if(r.length>0){const e={};for(let t=0;t<r.length;t++)e[r[t].getLanguage()||""]=r[t].getValue();return e}};var jn={getLocalizedValue:Sn,getLocalizedMap:(e,t,n)=>{let r,a=t,i=n;e.getItem?(r=e.getGraph(),a=e.getValue(),i=e.getItem().getURIValueLabelProperties()):r=e,null!=i&&0!==i.length||(i=Dn.labelProperties);for(let e=0;e<i.length;e++){const t=i[e];if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++){const i=xn(r,a,t[n]);i&&e.push(Sn(i).value)}if(e.length>0)return{"":e.join(" ")}}else{const e=xn(r,a,t);if(e)return e}}},cloneArrayWithLabels:(e,t)=>{const n=[];for(let t=0;t<e.length;t++){const r=e[t],a=Sn(r.label),i={value:r.value,label:a.value||r.value||""};!0===r.top&&(i.top=!0),null!=r.children&&(i.children=Tn(r.children)),!1===r.selectable?i.selectable=!1:i.selectable=!0,n.push(i)}return!0!==t&&n.sort((e,t)=>e.label>t.label?1:-1),n},extractGist:(e,t)=>{let n=t;if(n){-1===n.indexOf("$1")&&(n+="$1");const t=(""+n).replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1").replace("\\$1","(.*)"),r=new RegExp(t).exec(e);if(null!=r)return r[1]}return e},findFirstValue:(e,t,n,r)=>{const a=e.findFirstValueBinding(e.match(t,n,r),!1);if(a)return a.getChoice?Sn(a.getChoice().label).value:a.getGist()},generateUUID:()=>{let e=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)})}};let On=0;const En=(e,t,n)=>{null==n||""===n||Array.isArray(n)&&0===n.length?delete e[t]:e[t]=n};class Hn{constructor({source:e={},bundle:t,itemStore:n}){this._itemStore=n,this._source=e,this._bundle=t,On+=1,this._internalId=On,this._styles=["heading","invisible","invisibleGroup","stars","commentOn","multiline","horizontalRadioButtons","verticalRadioButtons","nonEditable","expandable","compact","nonCompact","dropDown","table","firstcolumnfixedtable","tree","externalLink","internalLink","noLink","image","label","tooltip","strictmatch","viewAllTranslations","email","atLeastOneChild","atMostOneChild","exactlyOneChild","deprecated","noLabelInPresent","autoInitDate","autoUpdateDate","autoUUID","autoValue","showURI","showLink","showValue","textAsChoice","preserveOrderOfChoices","linkWithLabel","deprecated"],this._getLocalizedValue=jn.getLocalizedValue}getId(){const e=this.getSource(!0);return e.id||e["@id"]}setId(e){En(this.getSource(!0),"id",e),delete s["@id"]}getType(e){const t=this.getSource(e);return t.type||t["@type"]}setType(e){En(this.getSource(!0),"type",e),delete s["@type"],this.refreshExtends()}getExtends(){return this.getSource(!0).extends||""}refreshExtends(){this.isExtention&&this.setExtends(this.getExtends())}setExtends(e){const t=this.getSource(!0),n=this._itemStore.getItem(e);this._source=null==n?t:this._itemStore.createExtendedSource(n.getSource(),t),""===e||null==e?delete t.extends:t.extends=e}isExtention(){return null!=this.getExtends()}getLabel(e,t){const n=this.getSource(t);return e?jn.getLocalizedValue(n.label):jn.getLocalizedValue(n.label).value}setLabel(e,t){const n=this.getSource(!0);n.label=this._setLangHash(n.label,e,t),this.refreshExtends()}getLabelMap(e){return this.getSource(e).label}setLabelMap(e){En(this.getSource(!0),"label",e),this.refreshExtends()}getDescription(e,t){const n=this.getSource(t);return e?jn.getLocalizedValue(n.description):jn.getLocalizedValue(n.description).value}setDescription(e,t){const n=this.getSource(!0);n.description=this._setLangHash(n.description,e,t),this.refreshExtends()}getDescriptionMap(e){return this.getSource(e).description}setDescriptionMap(e){En(this.getSource(!0),"description",e),this.refreshExtends()}getPlaceholder(e,t){const n=this.getSource(t);return e?jn.getLocalizedValue(n.placeholder):jn.getLocalizedValue(n.placeholder).value}setPlaceholder(e,t){const n=this.getSource(!0);n.placeholder=this._setLangHash(n.placeholder,e,t),this.refreshExtends()}getPlaceholderMap(e){return this.getSource(e).placeholder}setPlaceholderMap(e){En(this.getSource(!0),"placeholder",e),this.refreshExtends()}getProperty(e){let t=null;const n=this.getSource(e);return n&&(t=n.property,null!=t&&""!==t&&(t=d(t))),t}setProperty(e){En(this.getSource(!0),"property",e),this.refreshExtends()}getURIValueLabelProperties(e){const t=this.getSource(e).uriValueLabelProperties;return null!=t?t.map(e=>d(e)):t}setURIValueLabelProperties(e){En(this.getSource(!0),"uriValueLabelProperties",e),this.refreshExtends()}getConstraints(e){const t=this.getSource(e).constraints;if(null!=t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];Array.isArray(r)?e[d(n)]=r.map(e=>d(e)):e[d(n)]=d(r)}),e}return t}setConstraints(e){En(this.getSource(!0),"constraints",e),this.refreshExtends()}getDeps(e){const t=this.getSource(e).deps;return null!=t?t.map(e=>"*"!==e&&".."!==e?d(e):e):t}setDeps(e){En(this.getSource(!0),"deps",e),this.refreshExtends()}getDatatype(e){const t=this.getSource(e).datatype;return null!=t&&""!==t?Array.isArray(t)?t.map(e=>d(e)):d(t):t}setDatatype(e){En(this.getSource(!0),"datatype",e),this.refreshExtends()}getPattern(e){return this.getSource(e).pattern}setPattern(e){En(this.getSource(!0),"pattern",e),this.refreshExtends()}getLanguage(e){return this.getSource(e).language}setLanguage(e){En(this.getSource(!0),"language",e),this.refreshExtends()}getMember(e){return this.getSource(e).member}setMember(e){En(this.getSource(!0),"member",e),this.refreshExtends()}getNodetype(e){const t=this.getSource(e);return t.nodetype||t.nodeType}setNodetype(e){En(this.getSource(!0),"nodetype",e),this.refreshExtends()}getValue(e){return this.getSource(e).value}setValue(e){En(this.getSource(!0),"value",e),this.refreshExtends()}getValueTemplate(e){return this.getSource(e).valueTemplate}setValueTemplate(e){En(this.getSource(!0),"valueTemplate",e),this.refreshExtends()}getCardinality(e){if(!this.getProperty()&&"text"===this.getType())return{min:1,max:1};const t=this.getSource(e);return t&&"cardinality"in t?t.cardinality:this.getProperty()?{}:{max:1}}setCardinality(e){En(this.getSource(!0),"cardinality",e),this.refreshExtends()}isEnabled(e){const t=this.getSource(e);return null==t.enabled||t.enabled}setEnabled(e){const t=this.getSource(!0);e?delete t.enabled:t.enabled=e,this.refreshExtends()}getClasses(e){const t=this.getSource(e);return t&&"cls"in t?t.cls:[]}setClasses(e){En(this.getSource(!0),"cls",e),this.refreshExtends()}hasClass(e,t){const n=this.getSource(t);return!!this.hasStyle(e,t)||null!=n.cls&&n.cls.some(t=>t.toLowerCase()===e.toLowerCase())}getAvailableStyles(){return this._styles}getStyles(e){return this.getSource(e).styles||[]}setStyles(e){En(this.getSource(!0),"styles",e),this.refreshExtends()}hasStyle(e,t){const n=this.getSource(t);return!(!n||!("styles"in n))&&n.styles.some(t=>t.toLowerCase()===e.toLowerCase())}getSource(e){if(!0===e)return this._source._extendedSource||this._source;if(!1===e){const e=this._itemStore.getItem(this.getExtends());return null==e?this._source:e.getSource()}return this._source}getBundle(){return this._bundle}toStringShort(){return`'${this.getLabel()}'${this.getId()?` (ID: '${this.getId()}')`:""}`}toString(){const e=[];return this.getId()&&e.push(`ID: '${this.getId()}'`),e.push(`TYPE: '${this.getType()}'`),this.getProperty()&&e.push(`PROPERTY: '${this.getProperty()}'`),this.getExtends()&&e.push(`EXTENDS: '${this.getExtends()}'`),`'${this.getLabel()}' (${e.join(", ")})`}_setLangHash(e,t,n){const r=e||{};if("string"==typeof t)"string"==typeof n?r[n]=t:r[""]=t;else if("object"==typeof t&&null!==t)return t;return r}}class An extends Hn{constructor(e){super(e),this._children=e.children,null!=this._source.content&&(this._source.items=this._source.content,delete this._source.content),this._forceChildrenClones=!1,this._parent=null}getChildren(e){const t=e&&this.isExtention();let n=t?this._ochildren:this._children;var r;return null==n&&(n=this._itemStore.getChildren(this,t),!0===this.getSource().automatic&&this._itemStore.automaticSortAllowed&&((r=n).forEach(e=>{e.__label=(e.getLabel()||"").toLowerCase()}),r.sort((e,t)=>null!=e._source.priority?null!=t._source.priority?e._source.priority>t._source.priority?-1:e._source.priority<t._source.priority?1:0:e._source.priority>0?-1:1:null!=t._source.priority?t._source.priority>0?1:-1:e.__label>t.__label?1:e.__label<t.__label?-1:0)),this[`_${t?"o":""}children`]=n),n}originalChildrenChanged(){this.isExtention()&&delete this._children}setExtends(e){super.setExtends(e),delete this._children,delete this._ochildren}getNodetype(){return super.getNodetype()||"RESOURCE"}}class Pn extends An{getChildren(e){if(null==this._delegatedChildren){const t=()=>({min:1,max:1,pref:1}),n=super.getChildren(e)||[];this._delegatedChildren=n.map(e=>{const n=Object.create(e);return n.getCardinality=t,n})}return this._delegatedChildren}getPropertyItem(){return this.getChildren()[0]}getObjectItem(){return this.getChildren()[1]}}class In extends Hn{getLabelProperties(e){return this.getSource(e).labelProperties}}const Nn=e=>{null!=e&&e.forEach(e=>{e.value=d(e.value)})};class Cn extends Hn{constructor(e){super(e),this._ontologyStore=e.ontologyStore}getChoices(e){return this.getStaticChoices(e)||this.getDynamicChoices(e)||[]}hasChoices(e){const t=this.getSource(e);return null!=t.ontologyUrl||null!=t.choices}hasStaticChoices(e){return null!=this.getSource(e).choices}getStaticChoices(e){const t=this.getSource(e);if(t.choices){const n=-1===this.getNodetype().indexOf("LITERAL");e&&this.isExtention()?this._origStaticIsSorted||(n&&Nn(t.choices),this._origStaticIsSorted=!0):this._staticIsSorted||(n&&Nn(t.choices),this._staticIsSorted=!0)}return t.choices}setStaticChoices(e){const t=this.getSource(!0);t.choices!==e&&(null!=e&&(this._origStaticIsSorted=!0),t.choices=e,this.refreshExtends())}setExtends(e){super.setExtends(e),delete this._staticIsSorted,delete this._origStaticIsSorted}getDynamicChoices(e){if(null==this._dynamicChoices){if(null==e)return this._dynamicChoices=this._ontologyStore.getChoices(this),this._dynamicChoices;this._ontologyStore.getChoices(this,t=>{this._dynamicChoices=t,null==this._dynamicChoices&&(console.log("Failed lookup of choices for "+this.getLabel()),console.log("OntologyUrl is: "+this._source.ontologyUrl)),e(this._dynamicChoices)})}else{if(null==e)return this._dynamicChoices;e(this._dynamicChoices)}}getOntologyUrl(e){const t=this.getSource(e).ontologyUrl;return null!=t&&""!==t?d(t):t}setOntologyUrl(e){const t=this.getSource(!0);null==e||""===e?delete t.ontologyUrl:t.ontologyUrl=e,this.refreshExtends()}getLabelProperties(e){return this.getSource(e).labelProperties||["http://www.w3.org/2000/01/rdf-schema#label"]}getParentProperty(e){const t=this.getSource(e).parentProperty;return null!=t&&""!==t?d(t):t}setParentProperty(e){const t=this.getSource(!0);null==e||""===e?delete t.parentProperty:t.parentProperty=e,this.refreshExtends()}getHierarchyProperty(e){const t=this.getSource(e).hierarchyProperty;return null!=t&&""!==t?d(t):t}setHierarchyProperty(e){const t=this.getSource(!0);null==e||""===e?delete t.hierarchyProperty:t.hierarchyProperty=e,this.refreshExtends()}isParentPropertyInverted(e){return!0===this.getSource(e).isParentPropertyInverted}setParentPropertyInverted(e){const t=this.getSource(!0);!0===e?t.isParentPropertyInverted=!0:delete t.isParentPropertyInverted,this.refreshExtends()}isHierarchyPropertyInverted(e){return!0===this.getSource(e).isHierarchyPropertyInverted}setHierarchyPropertyInverted(e){const t=this.getSource(!0);e?t.isHierarchyPropertyInverted=!0:delete t.isHierarchyPropertyInverted,this.refreshExtends()}}var Rn=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Fn=function(e){return this.__data__.has(e)};function Wn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Re;++t<n;)this.add(e[t])}Wn.prototype.add=Wn.prototype.push=Rn,Wn.prototype.has=Fn;var zn=Wn;var Un=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Vn=function(e,t){return e.has(t)};var Bn=function(e,t,n,r,a,i){var s=1&n,o=e.length,u=t.length;if(o!=u&&!(s&&u>o))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var c=-1,l=!0,_=2&n?new zn:void 0;for(i.set(e,t),i.set(t,e);++c<o;){var h=e[c],f=t[c];if(r)var m=s?r(f,h,c,t,e,i):r(h,f,c,e,t,i);if(void 0!==m){if(m)continue;l=!1;break}if(_){if(!Un(t,(function(e,t){if(!Vn(_,t)&&(h===e||a(h,e,n,r,i)))return _.push(t)}))){l=!1;break}}else if(h!==f&&!a(h,f,n,r,i)){l=!1;break}}return i.delete(e),i.delete(t),l};var Jn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var Gn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},$n=G?G.prototype:void 0,qn=$n?$n.valueOf:void 0;var Kn=function(e,t,n,r,a,i,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new rn(e),new rn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return H(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=Jn;case"[object Set]":var u=1&r;if(o||(o=Gn),e.size!=t.size&&!u)return!1;var d=s.get(e);if(d)return d==t;r|=2,s.set(e,t);var c=Bn(o(e),o(t),r,a,i,s);return s.delete(e),c;case"[object Symbol]":if(qn)return qn.call(e)==qn.call(t)}return!1},Zn=Object.prototype.hasOwnProperty;var Xn=function(e,t,n,r,a,i){var s=1&n,o=zt(e),u=o.length;if(u!=zt(t).length&&!s)return!1;for(var d=u;d--;){var c=o[d];if(!(s?c in t:Zn.call(t,c)))return!1}var l=i.get(e);if(l&&i.get(t))return l==t;var _=!0;i.set(e,t),i.set(t,e);for(var h=s;++d<u;){var f=e[c=o[d]],m=t[c];if(r)var p=s?r(m,f,c,t,e,i):r(f,m,c,e,t,i);if(!(void 0===p?f===m||a(f,m,n,r,i):p)){_=!1;break}h||(h="constructor"==c)}if(_&&!h){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(_=!1)}return i.delete(e),i.delete(t),_},Qn=Object.prototype.hasOwnProperty;var er=function(e,t,n,r,a,i){var s=nt(e),o=nt(t),u=s?"[object Array]":en(e),d=o?"[object Array]":en(t),c="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),l="[object Object]"==(d="[object Arguments]"==d?"[object Object]":d),_=u==d;if(_&&Object(rt.a)(e)){if(!Object(rt.a)(t))return!1;s=!0,c=!1}if(_&&!c)return i||(i=new ze),s||_t(e)?Bn(e,t,n,r,a,i):Kn(e,t,u,n,r,a,i);if(!(1&n)){var h=c&&Qn.call(e,"__wrapped__"),f=l&&Qn.call(t,"__wrapped__");if(h||f){var m=h?e.value():e,p=f?t.value():t;return i||(i=new ze),a(m,p,n,r,i)}}return!!_&&(i||(i=new ze),Xn(e,t,n,r,a,i))};var tr=function e(t,n,r,a,i){return t===n||(null==t||null==n||!Ke(t)&&!Ke(n)?t!=t&&n!=n:er(t,n,r,a,e,i))};var nr=function(e,t){return tr(e,t)};class rr{constructor(){this._registry={}}importRegistry(e){Object.assign(this._registry,e)}getChoices(e,t){const n=this._findChoices(e);if(null==n);else{if(null==t)return n;t(n)}}_findChoices(e){const t=this._registry[e.getOntologyUrl()];if(null!=t)for(let n=0;n<t.length;n++){const r=t[n];if(nr(r.constraints,e.getConstraints())&&e.getParentProperty()===r.parentProperty&&e.getHierarchyProperty()===r.hierarchyProperty&&e.isParentPropertyInverted()===(r.isParentPropertyInverted||!1)&&e.isHierarchyPropertyInverted()===(r.isHierarchyPropertyInverted||!1))return r.choices}}_constructLoadUrl(e){const t=[];if(t.push("constr="+encodeURIComponent(JSON.stringify(e.getConstraints()))),null!=e.getParentProperty()){const n=!0===e.isParentPropertyInverted()?"ipp=":"pp=";t.push(n+encodeURIComponent(e.getParentProperty()))}if(null!=e.getHierarchyProperty()){const n=!0===e.isHierarchyPropertyInverted()?"ihp=":"hp=";t.push(n+encodeURIComponent(e.getHierarchyProperty()))}return`${e.getOntologyUrl()}?${t.join("&")}`}}let ar=0;class ir{constructor({itemStore:e,source:t,path:n,readOnly:r=!1}){this._itemStore=e,this._source=t,this._path=n,this._readOnly=r,this._items=[],ar+=1,this._id="_bundle_"+ar,this._root=null,this._modified=!1}getInternalId(){return this._id}getSource(){return this._source}setRoot(e){return this._source.root=e,e}getRoot(){if(this._source.root)return this._itemStore.getItem(this._source.root)}getItemStore(){return this._itemStore}getPath(){return this._path}getItems(){return this._items}addItem(e){this._items.push(e)}removeItem(e){this._items.splice(this._items.indexOf(e),1)}isModified(){return this._modified}setModified(e){this._modified=e}isReadOnly(){return this._readOnly||null==this._path}}let sr=0;class or{constructor({item:e,statement:t,graph:n,matchingCode:r}){this._item=e,this._statement=t,this._graph=n,this._ancestorValid=!0,this._cardinalityTracker=null,this._hash="b_"+sr,this._matchingCode=r||"correct",sr+=1}getGraph(){return this._graph||(this._statement?this._graph=this._statement.getGraph():this._parent&&(this._graph=this._parent.getGraph())),this._graph}isReadOnly(){if(!("_readOnly"in this)){const e=this.getParent();e&&e._readOnly?this._readyOnly=!0:this._readOnly=!(!this._statement||!this._statement.getNamedGraph())}return this._readOnly}remove(){}setSubject(e){}getValue(){}setValue(e,t){}getGist(){return jn.extractGist(this.getValue(),this.getItem().getValueTemplate())}setGist(e,t){let n=e,r=this.getItem().getValueTemplate();r&&n.length>0&&(-1===r.indexOf("$1")&&(r+="$1"),n=r.replace("$1",n)),this.setValue(n,t)}getCardinalityTracker(){return this._cardinalityTracker}setCardinalityTracker(e){this._cardinalityTracker=e}getItem(){return this._item}getStatement(){return this._statement}getParent(){return this._parent}setParent(e){this._parent=e}isValid(){}getMatchingCode(){return this._matchingCode}setMatchingCode(e){this._matchingCode=e}setAncestorValid(e){this._ancestorValid=e,this.updateAssertions()}updateAssertions(){}getHash(){return this._hash}addListener(e){this._listeners||(this._listeners=[]),this._listeners.push(e)}removeListener(e){if(this._listeners){const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}bindingChange(e){if(this._listeners)for(let t=0;t<this._listeners.length;t++)this._listeners[t](e);this._parent&&this._parent.bindingChange(e),this._cardinalityTracker&&this._cardinalityTracker.touch()}_isValidObjectValue(e){let t=e;if("string"!=typeof t&&null!==t)throw new Error("In a binding every object value need to be a string!");const n=this._item.getPattern();return n?(t=jn.extractGist(t,this.getItem().getValueTemplate()),null!=t&&""!==t&&new RegExp(`^${n}$`).test(t)):null!=t&&""!==t}_isValidPredicateValue(e){if("string"!=typeof e&&null!==e)throw new Error("In a binding every predicate need to be a string!");return null!=e&&""!==e}}class ur extends or{constructor(e){super(e),this._validObject=!0,this._validPredicate=!0,this._excludeFromTreeValidityCheck=!1,this._statement&&(this._validPredicate=this._isValidPredicateValue(this._statement.getPredicate(),!0),this._validObject=this._isValidObjectValue(this._statement.getValue()))}getValue(){return this._statement.getValue()}setValue(e,t){const n="string"==typeof e?e.trim():e,r=this._validObject;this._isValidObjectValue(n)?(this._statement.setValue(n,t),this._validObject=!0,!0===r||!0!==this._validPredicate||this._excludeFromTreeValidityCheck||this._parent.oneChildValidityChanged(!0)):(""!==n&&null!==n||this._statement.setValue("",t),this._validObject=!1,!1!==r&&!0===this._validPredicate&&this._parent.oneChildValidityChanged(!1)),this.updateAssertions()}setSubject(e){this._statement.setSubject(e)}getPredicate(){return this._statement.getPredicate()}setPredicate(e){const t=this._validPredicate;this._isValidPredicateValue(e)?(this._statement.setPredicate(e),this._validPredicate=!0,!0!==t&&!0===this._validObject&&this._parent.oneChildValidityChanged(!0)):(this._validPredicate=!1,!1!==t&&!0===this._validObject&&this._parent.oneChildValidityChanged(!1)),this.updateAssertions()}getLanguage(){return this._statement.getLanguage()}setLanguage(e,t){this._statement.setLanguage(e,t),this.updateAssertions()}getDatatype(){return this._statement.getDatatype()}setDatatype(e){this._statement.setDatatype(d(e)),this.updateAssertions()}setExcludeFromTreeValidityCheck(e){this._excludeFromTreeValidityCheck=e}remove(){this.setValue(null),this._parent.removeChildBinding(this),super.remove(arguments)}updateAssertions(){const e=this._ancestorValid&&this._validObject&&this._validPredicate;this._statement.setAsserted(e,!0),this.bindingChange(this)}isValid(){return this._validObject&&this._validPredicate&&!this._excludeFromTreeValidityCheck}}const dr="http://www.w3.org/2000/01/rdf-schema#seeAlso";class cr extends ur{constructor({choice:e,item:t,statement:n,matchingCode:r}){super({choice:e,item:t,statement:n,matchingCode:r}),this._choice=e,this._validPredicate=null!=t.getProperty()}static get seeAlso(){return dr}setChoice(e,t){this._choice=e,null==e?this.setValue(null,null,t):this.getValue()!==e.value&&this.setValue(e.value,e,t)}getChoice(){return this._choice}remove(){this.setValue(null),super.remove()}setValue(e,t,n){super.setValue(e,t,n);const r=this.getValue(),a=this._statement.getGraph();if(a.findAndRemove(r,"http://www.w3.org/2000/01/rdf-schema#label",void 0,n),a.findAndRemove(r,dr,void 0,n),null!=e&&null!=t&&(t.seeAlso&&t.inlineSeeAlso&&a.create(e,dr,t.seeAlso,!0,n),!0===t.inlineLabel)){const r=t.label||{};Object.keys(r).forEach(t=>a.create(e,"http://www.w3.org/2000/01/rdf-schema#label",{value:r[t],lang:t,type:"literal"},!0,n))}}}class lr{constructor(e){this._listener=[],this._limits=e.getCardinality()||{},this._counter=0,this._depsOk=!0,this._listeners=[],this._code=0}addListener(e){return this._listeners.push(e),e}removeListener(e){this._listeners.splice(this._listeners.indexOf(e),1)}cardinalityChanged(){this._listeners.forEach(e=>e())}getCardinality(){return this._counter}isMax(){return null!=this._limits.max&&this._counter>=this._limits.max}isMin(){return null!=this._limits.min&&this._counter<=this._limits.min}isFine(){return this._fine}isDepsOk(){return this._depsOk}getCode(){return this._code}setCode(e){this._code!==e&&(this._code=e,this.cardinalityChanged())}setDepsOk(e){this._depsOk!==e&&(this._code=Ir.UNKNOWN,this._depsOk=e,this.cardinalityChanged())}increment(){this._counter+=1,this._code=Ir.UNKNOWN,this._checkCounter()}decrement(){this._counter-=1,this._code=Ir.UNKNOWN,this._checkCounter()}getCounter(){return this._counter}checkCardinality(){this._checkCounter()}touch(){this._code=Ir.UNKNOWN,this.cardinalityChanged()}_checkCounter(){null!=this._limits.max&&this._counter===this._limits.max?this._fine=!0:null!=this._limits.max&&this._counter>this._limits.max?this._fine=!1:null!=this._limits.min&&this._counter===this._limits.min?this._fine=!0:null!=this._limits.min&&this._counter<this._limits.min&&(this._fine=!1),this.cardinalityChanged()}}class _r extends or{constructor(e){super(e);const{constraints:t=[],childrenRootUri:n=null}=e;this._constraints=t,this._childBindings=this._item.getChildren().map(()=>[]),this._rootUri=n,this._validPredicate=!0,this._validObject=!0,this._statement&&(this._validPredicate=this._isValidPredicateValue(this._statement.getPredicate()),this._validObject=this._isValidObjectValue(this._statement.getValue(),this._statement.getType())),this._cachedChildBindings=null}getValue(){return this.getChildrenRootUri()}oneChildValidityChanged(e){return e!==this._oneValidChild&&(!(!e&&(delete this._oneValidChild,this.isValid()))&&(this._oneValidChild=e,this._notifyValidityChange(e&&this._validPredicate&&this._validObject),this._validPredicate&&this._validObject))}setSubject(e){this._statement?this._statement.setSubject(e):this.getChildBindings().forEach(t=>t.setSubject(e))}getChildrenRootUri(){return this._statement?this._statement.getValue():null!=this._rootUri?this._rootUri:null!=this._parent?this._parent.getChildrenRootUri():void 0}addChildBinding(e){this.addChildBindings([e])}addChildBindings(e){if(this._cachedChildBindings=null,!Array.isArray(e)||0===e.length)return;const t=e[0].getItem(),n=this._item.getChildren();for(let r=n.length;r>=0;r--)if(t===n[r]){const n=this._childBindings[r].length>0?this._childBindings[r][0].getCardinalityTracker():new lr(t);this._childBindings[r]=this._childBindings[r].concat(e),e.forEach(e=>{e.setParent(this),e.setCardinalityTracker(n),n.increment()},this);break}}removeChildBinding(e){this._cachedChildBindings=null;const t=this._item.getChildren();for(let n=t.length;n>=0;n--)if(e.getItem()===t[n]){this._childBindings[n].splice(this._childBindings[n].indexOf(e),1),delete e._parent,e.getCardinalityTracker().decrement();break}this.oneChildValidityChanged(),this.bindingChange(e)}getChildBindingsFor(e){const t=this._item.getChildren();for(let n=t.length;n>=0;n--)if(e===t[n])return this._childBindings[n]}getItemGroupedChildBindings(){return this._childBindings}getChildBindings(){return null==this._cachedChildBindings&&(this._childBindings&&this._childBindings.length>0?this._cachedChildBindings=[].concat(...this._childBindings):this._cachedChildBindings=[]),this._cachedChildBindings}setPredicate(e){const t=this._validPredicate;this._isValidPredicateValue(e)?(this._statement.setPredicate(e),this._validPredicate=!0,!0!==t&&this._validObject&&("URI"===this.getItem().getNodetype()||this._oneValidChild)&&this._notifyValidityChange(!0)):(this._validPredicate=!1,!1!==t&&this._validObject&&("URI"===this.getItem().getNodetype()||this._oneValidChild)&&this._notifyValidityChange(!1)),this.updateAssertions()}getValue(){return this._statement&&this._statement.isObjectBlank()?"":this._statement&&this._statement.getValue()}setValue(e){if("URI"!==this.getItem().getNodetype()||!this._statement)throw new Error("Cannot change the value of a group unless its nodetype is URI and also that it corresponds to a statement");const t=this._validObject;this._isValidObjectValue(e,"uri")?(this._validObject=!0,this._statement._o.type="uri",this._statement.setValue(e),this._constraints.forEach(t=>t.setSubject(e)),this.getChildBindings().forEach(t=>t.setSubject(e)),!t&&this._validPredicate&&this._notifyValidityChange(!0)):(this._validObject=!1,t&&this._validPredicate&&this._notifyValidityChange(!1))}getPredicate(){return this._statement?this._statement.getPredicate():void 0}remove(){this._oneValidChild=!1,this.setAncestorValid(!1),null!=this._parent&&this._parent.removeChildBinding(this),super.remove(arguments)}_isValid(){return"URI"===this.getItem().getNodetype()?this._validObject&&this._validPredicate:this._oneValidChild&&this._validPredicate&&this._validObject}isValid(){return null==this._oneValidChild&&(this._oneValidChild=this._forceOneValidChildCheck()),this._isValid()}setAncestorValid(e){this._ancestorValid=e,this.updateAssertions(),this._childBindings.forEach(t=>t.forEach(t=>t.setAncestorValid(e&&this._isValid()),this),this)}updateAssertions(){null==this._oneValidChild&&this.isValid();const e=this._ancestorValid&&this._isValid();null!=this._statement&&this._statement.setAsserted(e),this._constraints.forEach(t=>t.setAsserted(e)),this.getChildBindings().forEach(e=>e.updateAssertions())}_forceOneValidChildCheck(){return this._childBindings.some(e=>e.some(e=>e.isValid()))}_notifyValidityChange(e){this._parent&&this._parent.oneChildValidityChanged(e)||(this.updateAssertions(),this._childBindings.forEach(t=>t.forEach(t=>t.setAncestorValid(e))))}_isValidObjectValue(e,t){return("URI"!==this.getItem().getNodetype()||"uri"===t)&&super._isValidObjectValue(e)}}class hr extends cr{constructor(e){super(e),this._objectBinding=e.objectBinding}remove(){}setValue(e){this._objectBinding.setPredicate(e)}getValue(){return this._objectBinding.getPredicate()}isValid(){return!1}updateAssertions(){}}class fr extends _r{constructor(e){super(e);const{statement:t,constraints:n}=e;this._statement=void 0,this._validPredicate=!0,this._constraints=[];const r=this._item.getChildren(),a=r[1];let i;i=a instanceof An?new _r({item:a,statement:t,constraints:n}):a instanceof Cn?new cr({item:a,statement:t}):new ur({item:a,statement:t});const s=new hr({item:r[0],objectBinding:i});this.addChildBinding(s),this.addChildBinding(i)}getPredicateBinding(){return this._childBindings[0][0]}getObjectBinding(){return this._childBindings[1][0]}getGraph(){return this.getObjectBinding().getGraph()}}class mr extends ur{getValue(){return this._parent.getValue()}setValue(e){return this._parent.setValue(e)}getGist(){return this._parent.getGist()}setGist(e,t){return this._parent.setGist(e,t)}setSubject(e){}getPredicate(){return this._parent.getPredicate()}remove(){this._parent.removeChildBinding(this),super.remove(arguments)}updateAssertions(){}isValid(){return!0}}let pr,yr,gr,Mr,vr,Lr=!1;const Yr=(e,t,n)=>{const r=new _r({item:n,childrenRootUri:t,graph:e});return pr(r),Lr=!0,pr(r),Lr=!1,yr(r),r},br=(e,t,n,r)=>{const a=e.findProperties(t),i=[],s={};if(null!=r){const e=t=>{null!=t.getProperty()?s[t.getProperty()]=!0:t instanceof An&&t.getChildren().forEach(e)},t=t=>{null!=t&&(e(t),i.push(t))};r.forEach(e=>{let r=n.getItem(e);null!=r?r instanceof An&&null==r.getProperty()?r.getChildren().forEach(t):t(r):(r=n.getItemByProperty(e),r?t(r):console.warn(`Warning, when autodetecting a template: Required item '${e}' is neither an id for a loaded item or a property for a loaded item, ignoring.`))})}return a.forEach(e=>{if(s[e])return;const t=n.getItemByProperty(e);null!=t&&i.push(t)},void 0),n.createTemplateFromChildren(i)},wr=e=>Array.isArray(e.getDatatype())?e.getDatatype()[0]:e.getDatatype(),Tr=(e,t,n)=>t instanceof In?((e,t)=>{if(!t.getProperty()){const n=new mr({item:t,statement:null,matchingCode:Ir.OK});return e.addChildBinding(n),n}const n=e.getGraph(),r=t.getNodetype(),a={value:"",type:"literal"};"URI"===r?a.type="uri":"DATATYPE_LITERAL"===r&&(a.datatype=wr(t));const i=n.create(e.getChildrenRootUri(),t.getProperty(),a,!1),s=new ur({item:t,statement:i});e.addChildBinding(s);const o=t.getValue(),u=s.getCardinalityTracker();if(null!=o&&1===u.getCounter()){i.setValue(o,!0);const e=wr(t),n=t.getLanguage();null!=e?i.setDatatype(e,!0):null!=n&&i.setLanguage(n,!0)}return s})(e,t):t instanceof Pn?((e,t)=>{let n,r;const a=t.getChildren()[1],i=e.getGraph();a instanceof An?(n=i.create(e.getChildrenRootUri(),"",null,!1),r=vr(i,n.getSubject(),a)):n=a instanceof Cn?i.create(e.getChildrenRootUri(),"",{type:"uri",value:""},!1):i.create(e.getChildrenRootUri(),"",{type:"literal",value:""},!1);const s=new fr({item:t,statement:n,constraints:r});return e.addChildBinding(s),a instanceof An&&a.getChildren().forEach(e=>{Tr(s.getObjectBinding(),e)}),s})(e,t):t instanceof An?((e,t,n)=>{let r,a;if(void 0!==t.getProperty()){const n=e.getGraph();r=(t.getNodetype(),n.create(e.getChildrenRootUri(),t.getProperty(),null,!1)),a=vr(n,r.getValue(),t)}const i=new _r({item:t,statement:r,constraints:a});e.addChildBinding(i);const s=t._source["@id"];if(s){if(n[s])return i;n[s]=!0}return i})(e,t,n||{}):t instanceof Cn?((e,t)=>{const n=e.getGraph(),r=t.getNodetype(),a={type:"literal",value:""};"DATATYPE_LITERAL"===r?a.datatype=wr(t):"RESOURCE"!==r&&"URI"!==r||(a.type="uri");const i=n.create(e.getChildrenRootUri(),t.getProperty(),a,!1),s=new cr({item:t,statement:i});e.addChildBinding(s);const o=t.getValue(),u=s.getCardinalityTracker();return null!=o&&1===u.getCounter()&&s.setChoice(jr(t,o,n),!0),s})(e,t):void 0;let kr,Dr,Sr,xr,jr,Or;pr=e=>{Lr&&e.getChildBindings().forEach(e=>{"group"===e.getItem().getType()&&pr(e)}),e.getItem().getChildren().forEach(t=>{Lr?void 0!==t.getProperty()&&kr(e,t):kr(e,t)})};kr=(e,t)=>{t instanceof Cn?((e,t)=>{if(null==t.getProperty())return;const n=[];e.getGraph().find(e.getChildrenRootUri(),t.getProperty()).forEach(e=>{if(gr(e)){const r=Dr(t,e),a=Sr(t,e),i=xr(t,e);if(r&&a&&i||Lr){const s=jr(t,e.getValue(),e.getGraph());if(void 0!==s){Mr(e);let o=r?Ir.OK:Ir.WRONG_NODETYPE;a?i?s.mismatch&&(o=Ir.WRONG_VALUE):o=Ir.WRONG_PATTERN:o=Ir.WRONG_DATATYPE,n.push(new cr({item:t,statement:e,choice:s,matchingCode:o}))}}}}),n.length>0&&e.addChildBindings(n)})(e,t):t instanceof Pn?((e,t)=>{const n=t.getPropertyItem(),r=t.getObjectItem(),a=e.getGraph();let i,s,o,u;const d=[];a.find(e.getChildrenRootUri()).forEach(e=>{gr(e)&&Dr(r,e)&&xr(r,e)&&(o=jr(n,e.getPredicate(),e.getGraph()),void 0!==o&&(s=null,r instanceof An?(i=Or(a,e.getValue(),r),void 0!==i&&(Mr(e),s=new fr({item:t,statement:e,constraints:i}),pr(s.getObjectBinding()))):r instanceof Cn?(u=jr(r,e.getValue(),e.getGraph()),void 0!==u&&(Mr(e),s=new fr({item:t,statement:e}),s.getObjectBinding().setChoice(u))):(Mr(e),s=new fr({item:t,statement:e})),null!==s&&(s.getPredicateBinding().setChoice(o),d.push(s))))}),d.length>0&&e.addChildBindings(d)})(e,t):t instanceof An?((e,t)=>{let n,r,a,i;const s=e.getGraph();void 0!==t.getProperty()?(n=s.find(e.getChildrenRootUri(),t.getProperty()),n.length>0&&(r=[],n.forEach(e=>{if(gr(e)){const n=xr(t,e),o=Dr(t,e);if((n&&o||Lr)&&(a=Or(s,e.getValue(),t),void 0!==a||Lr)){let s=o?Ir.OK:Ir.WRONG_NODETYPE;n?void 0===a&&(s=Ir.MISSING_CONSTRAINTS):s=Ir.WRONG_PATTERN,Mr(e),i=new _r({item:t,statement:e,constraints:a,matchingCode:s}),r.push(i),s===Ir.OK&&pr(i)}}}),e.addChildBindings(r))):(i=new _r({item:t}),e.addChildBindings([i]),pr(i))})(e,t):t instanceof In&&((e,t)=>{const n=[];null==t.getProperty()?n.push(new mr({item:t,statement:null,matchingCode:Ir.OK})):e.getGraph().find(e.getChildrenRootUri(),t.getProperty()).forEach(e=>{if(gr(e)&&xr(t,e)){const r=Dr(t,e),a=Sr(t,e);if(r&&a||Lr){Mr(e);let i=r?Ir.OK:Ir.WRONG_NODETYPE;a||(i=Ir.WRONG_DATATYPE),n.push(new ur({item:t,statement:e,matchingCode:i}))}}}),n.length>0&&e.addChildBindings(n)})(e,t)},Dr=(e,t)=>{const n=t.getType();switch(e.getNodetype()){case"LITERAL":case"ONLY_LITERAL":case"PLAIN_LITERAL":case"LANGUAGE_LITERAL":case"DATATYPE_LITERAL":return"literal"===n;case"RESOURCE":return"uri"===n||"bnode"===n;case"URI":return"uri"===n;case"BLANK":return"bnode"===n}return!1},Sr=(e,t)=>{const n="DATATYPE_LITERAL"===e.getNodetype()&&e.getDatatype()||null;return null==n||(Array.isArray(n)?-1!==n.indexOf(t.getDatatype()):t.getDatatype()===n)},xr=(e,t)=>{const n=e.getPattern(),r=jn.extractGist(t.getValue(),e.getValueTemplate());if(void 0!==n)try{return new RegExp(`^${n}$`).test(r)}catch(e){return!0}return!0},Or=(e,t,n)=>{let r;const a=n.getConstraints(),i=[],s=(n,a)=>{if(r=e.find(t,n,{type:"uri",value:a}),1!==r.length)return!1;i.push(r[0])};if("object"==typeof a&&null!==a){const e=Object.keys(a);for(let t=0;t<e.length;t++){const n=e[t],r=a[n];if(r instanceof Array){let e=!0;if(r.forEach(t=>{!1!==s(n,t)&&(e=!1)}),e)return}else if(!1===s(n,r))return}return i}return[]},vr=(e,t,n)=>{const r=[],a=n.getConstraints();return"object"==typeof a&&null!==a&&Object.keys(a).forEach(n=>{const i=a[n];Array.isArray(i)?r.push(e.create(t,n,{type:"uri",value:i[0]},!1)):r.push(e.create(t,n,{type:"uri",value:i},!1))}),r},jr=(e,t,n)=>{let r,a;if(e.hasChoices()){for(a=e.getChoices(),r=0;r<a.length;r++)if(a[r].value===t)return a[r];if(!e.hasStyle("strictmatch")||Lr)return{value:t,label:{"":t},mismatch:!0}}else{let r=jn.getLocalizedMap(n,t,e.getLabelProperties());null==r&&Lr&&(r={"":t,mismatch:!0});const a=n.findFirstValue(t,cr.seeAlso);if(null!=r){const e={label:r,value:t};return a&&(e.seeAlso=a),e}if(null!=Dn.getChoice)return Dn.getChoice(e,t,a,n)}},Mr=e=>{e._dibbs=!0},gr=e=>!0!==e._dibbs,yr=e=>{let t,n,r;const a=e.getItemGroupedChildBindings()||[];for(t=0;t<a.length;t++)for(r=a[t],n=0;n<r.length;n++){const e=r[n];e._statement&&delete e._statement._dibbs,(e instanceof _r||e instanceof fr)&&yr(e)}};const Er=(e,t)=>{if(e instanceof ur)return e;const n=e.getItemGroupedChildBindings(),r=O.a.locale();for(let a=0;a<n.length;a++){const i=n[a],s=e.getItem().getChildren()[a];if(0!==i.length){if(!(s instanceof In))return Er(i[0]);if("LANGUAGE_LITERAL"===s.getNodetype()){const e={firstValue:i[0]};for(let t=0;t<i.length;t++){const n=i[t].getLanguage();null==n?e.emptyLanguageValue=i[t]:n===r?e.perfectLocaleLanguageValue=i[t]:n.substring(0,1)===r.substring(0,1)?e.localeLanguageValue=i[t]:-1!==n.indexOf("en")?e.defaultLanguageValue=i[t]:e.anyLanguageValue=i[t]}return e.perfectLocaleLanguageValue||e.localeLanguageValue||e.defaultLanguageValue||e.anyLanguageValue||e.firstValue}return i[0]}if(t){const t=Tr(e,s,{});return t instanceof ur?(t.setLanguage(r),t):Er(t,!0)}}},Hr=(e,t)=>{const n="/"===t[0]?t.slice(1):t,r=e.getItemGroupedChildBindings(),a=n[0];for(let e=0;e<r.length;e++){const t=r[e];let i;for(let e=0;e<t.length;e++){let r=t[e],s=r.getItem();if(s instanceof Cn&&void 0===s.getProperty()&&a===s.getId()&&2===n.length&&n[1]===r.getValue())return r;if(r.isValid()){if("propertygroup"===s.getType())r=r.getObjectBinding(),s=r.getItem();else if(void 0===s.getProperty()&&(i=Hr(r,n),i))return i;if("*"===a||a===r.getPredicate())if("group"===s.getType()){if(i=Hr(r,n.slice(1)),i)return i}else if(1===n.length||"*"===n[1]||n[1]===r.getValue())return r}}}},Ar=(e,t)=>{const n=t[0];let r=e;if("/"===n){for(;r.getParent();)r=r.getParent();return r}if(".."===n){for(let e=0;e<t.length;e++){if(".."!==t[e]||!r.getParent())return r;r=r.getParent()}return r}return e},Pr=(e,t,n)=>{const r=t.getCardinality();return n&&"group"===t.getType()||(null!=r?r.min>0?e.mandatory+=1:r.pref>0?e.recommended+=1:e.optional+=1:e.optional+=1),"group"===t.getType()&&t.getChildren().forEach(t=>Pr(e,t)),e},Ir={UNKNOWN:"unknown",OK:"correct",TOO_FEW_VALUES:"few",TOO_FEW_VALUES_MIN:"min",TOO_FEW_VALUES_PREF:"pref",TOO_MANY_VALUES:"many",AT_MOST_ONE_CHILD:"atmostonechild",AT_LEAST_ONE_CHILD:"atleastonechild",EXACTLY_ONE_CHILD:"exactlyonechild",WRONG_VALUE:"value",WRONG_PATTERN:"pattern",WRONG_NODETYPE:"nodetype",WRONG_DATATYPE:"datatype",MISSING_LANGUAGE:"language",MISSING_CONSTRAINTS:"constraints"};var Nr={detectLevel:e=>{if(e.mandatory>0){if(0===e.recommended&&0===e.optional)return"mandatory";if(0===e.optional)return"mixed_mandatory_recommended";if(0===e.recommended)return"mixed_mandatory_optional"}else{if(e.recommended>0)return 0===e.optional?"recommended":"mixed_recommended_optional";if(0===e.recommended&&e.recommended>0&&0===e.optional)return"optional"}return"mixed_all"},levelProfile:e=>{const t=Pr({mandatory:0,recommended:0,optional:0},e,!0);return t.itemCount=t.mandatory+t.recommended+t.optional,t},findFirstValueBinding:Er,create:Tr,constructTemplate:br,findPopularChoice:(e,t)=>{const n=e.getId(),r={},a={};e.getChoices().forEach(e=>{r[e.value]=0,a[e.value]=e});t.getChildBindings().forEach(e=>{const t=e.getItem().getDeps();if(t&&(t[0]===n||"/"===t[0]&&t[1]===n)){const e="/"===t[0]?t[2]:t[1],n=r[e];void 0!==n&&(r[e]=n+1)}});let i,s=0;return Object.keys(r).forEach(e=>{(!i||r[e]>s)&&(i=e,s=r[e])}),a[i]},match:(e,t,n)=>{const r=new _r({item:n,childrenRootUri:t,graph:e});return pr(r),yr(r),r},fuzzyMatch:Yr,matchPathBelowBinding:Hr,findBindingRelativeToParentBinding:Ar,CODES:Ir};class Cr{constructor(e){this.automaticSortAllowed=!0,this.ignoreMissingItems=!0,this._bundles=[],this._registry={},this._registryByProperty={},this._ontologyStore=e||new rr}getTemplate(e){return this.getItem(e)}getChildren(e,t){if(null==e)return[];const n=e.getSource(!0),r=n.content||n.items||[];if(t)return this._createItems(r,e._forceChildrenClones,e.getBundle());const a=this.getItem(n.extends);return a?a.getChildren().concat(e.getChildren(!0)):e.getChildren(!0)}getItem(e){if(null!=e)return this._registry[e]}getItems(){return Object.keys(this._registry).map(e=>this._registry[e])}renameItem(e,t){if(this._registry[t])throw new Error(`Cannot rename to ${t} since an item with that id already exists.`);if(""===t||null===t)throw new Error("Cannot give an item an empty string or null as id.");const n=this._registry[e];n&&(delete this._registry[e],this._registry[t]=n,n.setId(t));const r=n=>{const a=n.content;if(a)for(let n=0;n<a.length;n++){const i=a[n];i.id!==e&&i["@id"]!==e||(i.id=t,delete i["@id"]),i.content&&r(i)}},a=this.getItems();for(let e=0;e<a.length;e++){const t=a[e];t instanceof An&&r(t._source)}}getItemIds(){return Object.keys(this._registry)}getItemByProperty(e){return this._registryByProperty[e]}detectTemplate(e,t,n){return br(e,t,this,n)}registerBundle(e){e.itemStore=this;const t=new ir(e);this._bundles.push(t),e.source&&e.source.namespaces&&c(e.source.namespaces);const n=e.source.templates||e.source.auxilliary;return n instanceof Array&&this._createItems(n,!1,t),"object"==typeof e.source.cachedChoices&&this._ontologyStore.importRegistry(e.source.cachedChoices),t}getBundles(){return this._bundles}createTemplate(e){return this.registerBundle({source:e}).getRoot()}createTemplateFromChildren(e){const t=(e||[]).map(e=>"string"==typeof e?this.getItem(e):e);return new An({source:{},children:t,itemStore:this})}setPriorities(e){this.priorities=e}createExtendedSource(e,t){const n=Object.assign(Object.assign({},e),t);return n._extendedSource=t,n.extends=null,delete n.children,n}createItem(e,t,n,r){let a;const i=e.id||e["@id"],s=e.type||e["@type"];if(e.extends){const t=this._registry[e.extends];if(null==t&&!this.ignoreMissingItems)throw new Error("Cannot find item to extend with id: "+e.extends);if(t){const n=this.createExtendedSource(t.getSource(),e);return this.createItem(n,!1,!1,r)}}if(null!=s){switch(s){case"text":a=new In({source:e,itemStore:this,bundle:r});break;case"choice":a=new Cn({source:e,itemStore:this,ontologyStore:this._ontologyStore,bundle:r});break;case"group":a=new An({source:e,children:null,itemStore:this,bundle:r});break;case"propertygroup":a=new Pn({source:e,children:null,itemStore:this,bundle:r})}return!0!==n&&(null!=e.property&&(this._registryByProperty[e.property]=a,this.priorities&&null!=this.priorities[e.property]&&(a.priority=this.priorities[e.property])),null!=i&&null==this._registry[i]&&(this._registry[i]=a,null!=r&&r.addItem(a))),a}if(null==i)throw new Error("Cannot create subitem, `type` for creating new or `id` for referencing external are required.");if(null==this._registry[i])throw new Error("Cannot find referenced subitem using identifier: "+i);if(!0===t||Object.keys(e).find(e=>"id"!==e&&"@id"!==e)){const t=Object.assign(Object.assign({},this._registry[i]._source),e);return this.createItem(t,!1,!0)}return this._registry[i]}removeItem(e,t){const n=e.getBundle();null!=n&&n.removeItem(e),null!=e.getId()&&delete this._registry[e.getId()];const r=e.getProperty();null!=r&&this._registryByProperty[r]===e&&delete this._registryByProperty[r]}_createItems(e,t,n){return e.map((r,a)=>{const i="string"==typeof r?e[a]={id:r}:r;return this.createItem(i,t,!1,n)})}}const Rr=(e,t,n)=>{const r=`Fetching template bundle ${n} failed.`;if(e===t-1)throw Error(r+" Cannot recover from this, please fix.");console.log(r+" Will try to fetch from a fallback option.")},Fr=e=>e.map(e=>e instanceof Array?(async e=>{const t=e.length;let n,r;for(let a=0;a<t;a++){try{n=await fetch(e[a])}catch(t){throw Error("A network error ocurred while trying to fetch bundle "+e[a])}if(n&&n.ok)try{const t=n.headers.has("content-type")&&n.headers.get("content-type");if(t&&t.includes("application/json")){r=await n.json();break}throw new Error(`Failed fetching template ${e[a]}. Expected a JSON file and got ${t}`)}catch(n){Rr(a,t,e[a])}else Rr(a,t,e[a])}return r})(e):Promise.resolve(e));var Wr=async(e,t=[],n=(()=>{}))=>{0===t.length&&n&&n([]);const r=Fr(t),a=((e,t=[])=>t.map(t=>e.registerBundle({source:t})))(e,await Promise.all(r));return n(a),a};const zr=(e,t)=>{let n=t;return null==n?n={errors:[],warnings:[],deprecated:[]}:(n.errors=n.errors||[],n.warnings=n.warnings||[],n.deprecated=n.deprecated||[]),Jr(e,n,!0)},Ur=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isValid()&&(t+=1);return t},Vr=(e,t)=>{if(e.length>0){e[0].getCardinalityTracker().setCode(t)}},Br=(e,t)=>{if(t.hasStyle("deprecated"))return!0;const n=t.getDeps();if(n){const t=Ar(e,n);if(!Hr(t,n))return!0}return!1},Jr=(e,t,n)=>{if(e.getMatchingCode()!==Ir.OK)return;const r=e.getItem();if(!0===n||e.isValid()||null==r.getProperty()||r.hasStyle("atLeastOneChild")||r.hasStyle("exactlyOneChild")){const n=r.getChildren();if(r.hasStyle("disjoint")||r.hasStyle("atMostOneChild")||r.hasStyle("atLeastOneChild")||r.hasStyle("exactlyOneChild")){const a=e.getChildBindings(),i=Ur(a);let s;i>1&&(r.hasStyle("disjoint")||r.hasStyle("atMostOneChild"))?s=Ir.AT_MOST_ONE_CHILD:1!==i&&r.hasStyle("exactlyOneChild")?s=Ir.EXACTLY_ONE_CHILD:0===i&&r.hasStyle("atLeastOneChild")&&(s=Ir.AT_LEAST_ONE_CHILD),s&&(Vr([e],s),n.length>0&&t.errors.push({parentBinding:e,item:n[0],code:s}))}else e.getItemGroupedChildBindings().forEach((r,a)=>{const i=n[a];if(!Br(e,i)&&null!=i.getProperty()){const n=Ur(r),a=i.getCardinality();null!=a.min&&a.min>n?(t.errors.push({parentBinding:e,item:i,code:Ir.TOO_FEW_VALUES_MIN}),Vr(r,Ir.TOO_FEW_VALUES_MIN)):null!=a.pref&&a.pref>n&&t.warnings.push({parentBinding:e,item:i,code:Ir.TOO_FEW_VALUES_PREF}),null!=a.max&&a.max<n&&(t.errors.push({parentBinding:e,item:i,code:Ir.TOO_MANY_VALUES}),Vr(r,Ir.TOO_MANY_VALUES))}},void 0);e.getChildBindings().forEach(n=>{const r=n.getItem();n.getMatchingCode()!==Ir.OK&&t.errors.push({parentBinding:n,item:r,code:n.getMatchingCode()}),r.hasStyle("deprecated")&&t.deprecated.push(n),Br(e,r)||"group"===r.getType()&&Jr(n,t)})}return t},Gr=(e,t)=>e.find(null,"rdf:type",t).map(e=>e.getSubject()),$r=(e,t,n)=>{let r=e;for(;;){const e=r.getChildrenRootUri?r.getChildrenRootUri():r.getParent().getChildrenRootUri();if(e===t)return!0;if(n[e])return!1;r=r.getParent()}},qr=(e,t)=>{let n=e;const r=[];for(null!=t.getProperty()&&n.getItem()!==t&&r.push(u(t.getProperty()));null!=n.getItem().getProperty()&&r.push(u(n.getItem().getProperty())),null!=n.getParent();)n=n.getParent();return r.reverse(),r.join(" > ")},Kr=e=>{const{errors:t,warnings:n,deprecated:r}=e;e.errors=t.map(e=>({path:qr(e.parentBinding,e.item),code:e.code})),e.warnings=n.map(e=>({path:qr(e.parentBinding,e.item),code:e.code})),e.deprecated=r.map(e=>(e=>`${qr(e.getParent(),e.getItem())} > ${e.getValue()}`)(e))},Zr=(e,t,n,r)=>{const a=Yr(t,e,n),i=zr(a);return((e,t,n)=>{const{errors:r,warnings:a,deprecated:i}=e;e.errors=r.filter(e=>$r(e.parentBinding,t,n)),e.warnings=a.filter(e=>$r(e.parentBinding,t,n)),e.deprecated=i.filter(e=>$r(e,t,n))})(i,e,r||{}),Kr(i),i};var Xr={graphReport:(e,t,n=[])=>{const r={},a={};let i,s;const o={errors:0,warnings:0,deprecated:0,resources:[]};Object.keys(t).forEach(t=>{const n=Gr(e,t);r[t]=n,n.forEach(e=>{a[e]=!0})}),Object.keys(r).forEach(n=>{i=t[n],r[n].forEach(t=>{s=Zr(t,e,i,a),s.uri=t,s.type=n,s.template=i.getId(),o.resources.push(s),o.errors+=s.errors.length,o.warnings+=s.warnings.length,o.deprecated+=s.deprecated.length})});const u=[];return n.forEach(e=>{0===r[e].length&&u.push(e)}),u.length>0&&(o.mandatoryError=u,o.errors+=u.length),o},bindingReport:zr};global.fetch=n(324).default}]);
10
+ e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r={"./af":191,"./af.js":191,"./ar":192,"./ar-dz":193,"./ar-dz.js":193,"./ar-kw":194,"./ar-kw.js":194,"./ar-ly":195,"./ar-ly.js":195,"./ar-ma":196,"./ar-ma.js":196,"./ar-sa":197,"./ar-sa.js":197,"./ar-tn":198,"./ar-tn.js":198,"./ar.js":192,"./az":199,"./az.js":199,"./be":200,"./be.js":200,"./bg":201,"./bg.js":201,"./bm":202,"./bm.js":202,"./bn":203,"./bn.js":203,"./bo":204,"./bo.js":204,"./br":205,"./br.js":205,"./bs":206,"./bs.js":206,"./ca":207,"./ca.js":207,"./cs":208,"./cs.js":208,"./cv":209,"./cv.js":209,"./cy":210,"./cy.js":210,"./da":211,"./da.js":211,"./de":212,"./de-at":213,"./de-at.js":213,"./de-ch":214,"./de-ch.js":214,"./de.js":212,"./dv":215,"./dv.js":215,"./el":216,"./el.js":216,"./en-SG":217,"./en-SG.js":217,"./en-au":218,"./en-au.js":218,"./en-ca":219,"./en-ca.js":219,"./en-gb":220,"./en-gb.js":220,"./en-ie":221,"./en-ie.js":221,"./en-il":222,"./en-il.js":222,"./en-nz":223,"./en-nz.js":223,"./en-sg":224,"./en-sg.js":224,"./eo":225,"./eo.js":225,"./es":226,"./es-do":227,"./es-do.js":227,"./es-us":228,"./es-us.js":228,"./es.js":226,"./et":229,"./et.js":229,"./eu":230,"./eu.js":230,"./fa":231,"./fa.js":231,"./fi":232,"./fi.js":232,"./fo":233,"./fo.js":233,"./fr":234,"./fr-ca":235,"./fr-ca.js":235,"./fr-ch":236,"./fr-ch.js":236,"./fr.js":234,"./fy":237,"./fy.js":237,"./ga":238,"./ga.js":238,"./gd":239,"./gd.js":239,"./gl":240,"./gl.js":240,"./gom-latn":241,"./gom-latn.js":241,"./gu":242,"./gu.js":242,"./he":243,"./he.js":243,"./hi":244,"./hi.js":244,"./hr":245,"./hr.js":245,"./hu":246,"./hu.js":246,"./hy-am":247,"./hy-am.js":247,"./id":248,"./id.js":248,"./is":249,"./is.js":249,"./it":250,"./it-ch":251,"./it-ch.js":251,"./it.js":250,"./ja":252,"./ja.js":252,"./jv":253,"./jv.js":253,"./ka":254,"./ka.js":254,"./kk":255,"./kk.js":255,"./km":256,"./km.js":256,"./kn":257,"./kn.js":257,"./ko":258,"./ko.js":258,"./ku":259,"./ku.js":259,"./ky":260,"./ky.js":260,"./lb":261,"./lb.js":261,"./lo":262,"./lo.js":262,"./lt":263,"./lt.js":263,"./lv":264,"./lv.js":264,"./me":265,"./me.js":265,"./mi":266,"./mi.js":266,"./mk":267,"./mk.js":267,"./ml":268,"./ml.js":268,"./mn":269,"./mn.js":269,"./mr":270,"./mr.js":270,"./ms":271,"./ms-my":272,"./ms-my.js":272,"./ms.js":271,"./mt":273,"./mt.js":273,"./my":274,"./my.js":274,"./nb":275,"./nb.js":275,"./ne":276,"./ne.js":276,"./nl":277,"./nl-be":278,"./nl-be.js":278,"./nl.js":277,"./nn":279,"./nn.js":279,"./pa-in":280,"./pa-in.js":280,"./pl":281,"./pl.js":281,"./pt":282,"./pt-br":283,"./pt-br.js":283,"./pt.js":282,"./ro":284,"./ro.js":284,"./ru":285,"./ru.js":285,"./sd":286,"./sd.js":286,"./se":287,"./se.js":287,"./si":288,"./si.js":288,"./sk":289,"./sk.js":289,"./sl":290,"./sl.js":290,"./sq":291,"./sq.js":291,"./sr":292,"./sr-cyrl":293,"./sr-cyrl.js":293,"./sr.js":292,"./ss":294,"./ss.js":294,"./sv":295,"./sv.js":295,"./sw":296,"./sw.js":296,"./ta":297,"./ta.js":297,"./te":298,"./te.js":298,"./tet":299,"./tet.js":299,"./tg":300,"./tg.js":300,"./th":301,"./th.js":301,"./tl-ph":302,"./tl-ph.js":302,"./tlh":303,"./tlh.js":303,"./tr":304,"./tr.js":304,"./tzl":305,"./tzl.js":305,"./tzm":306,"./tzm-latn":307,"./tzm-latn.js":307,"./tzm.js":306,"./ug-cn":308,"./ug-cn.js":308,"./uk":309,"./uk.js":309,"./ur":310,"./ur.js":310,"./uz":311,"./uz-latn":312,"./uz-latn.js":312,"./uz.js":311,"./vi":313,"./vi.js":313,"./x-pseudo":314,"./x-pseudo.js":314,"./yo":315,"./yo.js":315,"./zh-cn":316,"./zh-cn.js":316,"./zh-hk":317,"./zh-hk.js":317,"./zh-tw":318,"./zh-tw.js":318};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id=697},function(e,t,n){"use strict";n.r(t),n.d(t,"ItemStore",(function(){return Cr})),n.d(t,"bundleLoader",(function(){return Wr})),n.d(t,"utils",(function(){return jn})),n.d(t,"system",(function(){return Dn})),n.d(t,"engine",(function(){return Nr})),n.d(t,"validate",(function(){return Xr}));n(325);"__rdfjson_namespaces"in globalThis||(globalThis.__rdfjson_namespaces={ical:"http://www.w3.org/2002/12/cal/ical#",vcard:"http://www.w3.org/2006/vcard/ns#",dcterms:"http://purl.org/dc/terms/",skos:"http://www.w3.org/2004/02/skos/core#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",owl:"http://www.w3.org/2002/07/owl#",vs:"http://www.w3.org/2003/06/sw-vocab-status/ns#",foaf:"http://xmlns.com/foaf/0.1/",wot:"http://xmlns.com/wot/0.1/",dc:"http://purl.org/dc/elements/1.1/",xsd:"http://www.w3.org/2001/XMLSchema#",dcat:"http://www.w3.org/ns/dcat#",org:"http://www.w3.org/ns/org#",gn:"http://www.geonames.org/ontology#",locn:"http://www.w3.org/ns/locn#",schema:"http://schema.org/",ex:"http://example.com/",gsp:"http://www.opengis.net/ont/geosparql#",odrs:"http://schema.theodi.org/odrs#"});const{__rdfjson_namespaces:r}=globalThis;let a=0;const i=(e,t,n)=>(r[e]||(r[e]=t),{abbrev:e,ns:t,localname:n,full:t+n,pretty:`${e}:${n}`}),o=e=>{const t=Object.keys(r).find(t=>0===e.indexOf(r[t]));if(t)return i(t,r[t],e.substring(r[t].length));let n=e.lastIndexOf("/");const s=e.lastIndexOf("#");return s>n&&(n=s),a+=1,i("ns"+a,e.substring(0,n+1),e.substring(n+1))};var u=e=>o(e).pretty,d=e=>{const t=e.split(":");return 2===t.length&&r.hasOwnProperty(t[0])?r[t[0]]+t[1]:e},c=(e,t)=>{"string"==typeof e?r[e]=t:"object"==typeof e&&Object.keys(e).forEach(t=>{r[t]=e[t]})},l=n(320),_=n.n(l);n(140);const h=(e,t)=>{var n=t.indexOf("#");if(n>0&&(t=t.slice(0,n)),0==e.length)return t;if(0==e.indexOf("#"))return t+e;if(e.indexOf(":")>=0)return e;var r=t.indexOf(":");if(r<0)return console.log("Invalid base URL "+t),e;var a,i=t.slice(0,r+1);if(0==e.indexOf("//"))return i+e;if(t.indexOf("//",r)==r+1){if((a=t.indexOf("/",r+3))<0)return t.length-r-3>0?t+"/"+e:i+e}else if((a=t.indexOf("/",r+1))<0)return t.length-r-1>0?t+"/"+e:i+e;if(0==e.indexOf("/"))return t.slice(0,a)+e;var s=t.slice(a),o=s.lastIndexOf("/");if(o<0)return i+e;for(o>=0&&o<s.length-1&&(s=s.slice(0,o+1)),s+=e;s.match(/[^\/]*\/\.\.\//);)s=s.replace(/[^\/]*\/\.\.\//,"");return s=s.replace(/\.\//g,""),t.slice(0,a)+s};var f;f=function(e){f.ns={RDF:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",RDFS:"http://www.w3.org/2000/01/rdf-schema#"},f.nodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},this.frameFactory=function(e,t,n){return{NODE:1,ARC:2,parent:t,parser:e,store:e.store,element:n,lastChild:0,base:null,lang:null,node:null,nodeType:null,listIndex:1,rdfid:null,datatype:null,collection:!1,terminateFrame:function(){this.collection&&this.node.close()},addSymbol:function(e,t){t=h(t,this.base),this.node=this.store.sym(t),this.nodeType=e},loadTriple:function(){if(this.parent.parent.collection?this.parent.parent.node.append(this.node):this.store.add(this.parent.parent.node,this.parent.node,this.node,this.parser.why),null!=this.parent.rdfid){var e=this.store.sym(h("#"+this.parent.rdfid,this.base));this.store.add(e,this.store.sym(f.ns.RDF+"type"),this.store.sym(f.ns.RDF+"Statement"),this.parser.why),this.store.add(e,this.store.sym(f.ns.RDF+"subject"),this.parent.parent.node,this.parser.why),this.store.add(e,this.store.sym(f.ns.RDF+"predicate"),this.parent.node,this.parser.why),this.store.add(e,this.store.sym(f.ns.RDF+"object"),this.node,this.parser.why)}},isTripleToLoad:function(){return null!=this.parent&&null!=this.parent.parent&&this.nodeType==this.NODE&&this.parent.nodeType==this.ARC&&this.parent.parent.nodeType==this.NODE},addNode:function(e){this.addSymbol(this.NODE,e),this.isTripleToLoad()&&this.loadTriple()},addCollection:function(){this.nodeType=this.NODE,this.node=this.store.collection(),this.collection=!0,this.isTripleToLoad()&&this.loadTriple()},addCollectionArc:function(){this.nodeType=this.ARC},addBNode:function(e){null!=e?null!=this.parser.bnodes[e]?this.node=this.parser.bnodes[e]:this.node=this.parser.bnodes[e]=this.store.bnode():this.node=this.store.bnode(),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()},addArc:function(e){e==f.ns.RDF+"li"&&(e=f.ns.RDF+"_"+this.parent.listIndex++),this.addSymbol(this.ARC,e)},addLiteral:function(e){this.parent.datatype?this.node=this.store.literal(e,"",this.store.sym(this.parent.datatype)):this.node=this.store.literal(e,this.lang),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()}}},this.store=e,this.bnodes={},this.why=null,this.reify=!1,this.parse=function(e,t,n){var r,a=e.childNodes;if(this.cleanParser(),e.nodeType==f.nodeType.DOCUMENT){for(var i=0;i<a.length;i++)if(a[i].nodeType==f.nodeType.ELEMENT){r=a[i];break}}else{if(e.nodeType!=f.nodeType.ELEMENT)throw new Error("RDFParser: can't find root in "+t+". Halting. ");r=e}this.why=n;var s=this.frameFactory(this);return s.base=t,s.lang="",this.parseDOM(this.buildFrame(s,r)),!0},this.parseDOM=function(e){for(var t=function(e){return e.namespaceURI+e.localName},n=!0;e.parent;){var r,a,i=e.element,s=i.attributes;if(i.nodeType==f.nodeType.TEXT||i.nodeType==f.nodeType.CDATA_SECTION)e.addLiteral(i.nodeValue);else if(t(i)!=f.ns.RDF+"RDF")if(e.parent&&e.parent.collection&&(e.addCollectionArc(),(e=this.buildFrame(e,e.element)).parent.element=null),e.parent&&e.parent.nodeType&&e.parent.nodeType!=e.ARC){e.addArc(t(i)),this.reify&&(r=i.getAttributeNodeNS(f.ns.RDF,"ID"))&&(e.rdfid=r.nodeValue,i.removeAttributeNode(r));var o=i.getAttributeNodeNS(f.ns.RDF,"parseType"),u=i.getAttributeNodeNS(f.ns.RDF,"datatype");if(u&&(e.datatype=u.nodeValue,i.removeAttributeNode(u)),o){var d=o.nodeValue;"Literal"==d?(e.datatype=f.ns.RDF+"XMLLiteral",(e=this.buildFrame(e)).addLiteral(i),n=!1):"Resource"==d?((e=this.buildFrame(e,e.element)).parent.element=null,e.addBNode()):"Collection"==d&&((e=this.buildFrame(e,e.element)).parent.element=null,e.addCollection()),i.removeAttributeNode(o)}if(0!=s.length){var c=i.getAttributeNodeNS(f.ns.RDF,"resource");for(a=i.getAttributeNodeNS(f.ns.RDF,"nodeID"),e=this.buildFrame(e),c?(e.addNode(c.nodeValue),i.removeAttributeNode(c)):a?(e.addBNode(a.nodeValue),i.removeAttributeNode(a)):e.addBNode(),p=s.length-1;p>=0;p--){var l=this.buildFrame(e);l.addArc(t(s[p])),t(s[p])==f.ns.RDF+"type"?this.buildFrame(l).addNode(s[p].nodeValue):this.buildFrame(l).addLiteral(s[p].nodeValue)}}else 0==i.childNodes.length&&this.buildFrame(e).addLiteral("")}else{var _=i.getAttributeNodeNS(f.ns.RDF,"about");if(r=i.getAttributeNodeNS(f.ns.RDF,"ID"),_&&r)throw new Error("RDFParser: "+i.nodeName+" has both rdf:id and rdf:about. Halting. Only one of these properties may be specified on a node.");null==_&&r?(e.addNode("#"+r.nodeValue),i.removeAttributeNode(r)):null==_&&null==r?(a=i.getAttributeNodeNS(f.ns.RDF,"nodeID"))?(e.addBNode(a.nodeValue),i.removeAttributeNode(a)):e.addBNode():(e.addNode(_.nodeValue),i.removeAttributeNode(_));var m=i.getAttributeNodeNS(f.ns.RDF,"type");f.ns.RDF+"Description"!=t(i)&&(m={nodeValue:t(i)}),null!=m&&(this.store.add(e.node,this.store.sym(f.ns.RDF+"type"),this.store.sym(h(m.nodeValue,e.base)),this.why),m.nodeName&&i.removeAttributeNode(m));for(var p=s.length-1;p>=0;p--)this.store.add(e.node,this.store.sym(t(s[p])),this.store.literal(s[p].nodeValue,e.lang),this.why)}for(i=e.element;e.parent;){for(var y=e;null==i;)i=(e=e.parent).element;var g=i.childNodes,M=null!=g?g[e.lastChild]:null;if(null!=M&&n){if((M.nodeType==f.nodeType.ELEMENT||M.nodeType==f.nodeType.TEXT||M.nodeType==f.nodeType.CDATA_SECTION)&&(M.nodeType!=f.nodeType.TEXT&&M.nodeType!=f.nodeType.CDATA_SECTION||1==i.childNodes.length)){e.lastChild++,e=this.buildFrame(y,i.childNodes[e.lastChild-1]);break}e.lastChild++}else{if(e.terminateFrame(),!(e=e.parent))break;i=e.element,n=!0}}}},this.cleanParser=function(){this.bnodes={},this.why=null},this.buildFrame=function(e,t){var n=this.frameFactory(this,e,t);if(e&&(n.base=e.base,n.lang=e.lang),null==t||t.nodeType==f.nodeType.TEXT||t.nodeType==f.nodeType.CDATA_SECTION)return n;var r=t.attributes,a=t.getAttributeNode("xml:base");null!=a&&(n.base=a.nodeValue,t.removeAttribute("xml:base"));var i=t.getAttributeNode("xml:lang");null!=i&&(n.lang=i.nodeValue,t.removeAttribute("xml:lang"));for(var s=r.length-1;s>=0;s--)"xml"==r[s].nodeName.substr(0,3)&&t.removeAttributeNode(r[s]);return n}};const m=e=>"object"==typeof e?e:"string"==typeof e?new L(e):void(void 0!==e&&alert(`Can't make term from ${e} of type ${typeof e}`)),p=function(){return this};p.prototype.termType="empty",p.prototype.toString=function(){return""},p.prototype.toNT=function(){return""};const y=function(){return"<"+this.uri+">"},g=function(e){return this.uri=e,this};g.prototype.termType="symbol",g.prototype.toString=y,g.prototype.toNT=y;let M=0;const v=function(){return this.id=M++,this};v.prototype.termType="bnode",v.prototype.toNT=function(){return"_:n"+this.id},v.prototype.toString=v.prototype.toNT;const L=function(e,t,n){return this.value=e,this.lang=t,this.datatype=n,this};L.prototype.termType="literal",L.prototype.toNT=function(){const e=this.value;if("string"!=typeof e)throw Error("Value of RDF literal is not string: "+e);return e=e.replace(/\\/g,"\\\\"),e=e.replace(/"/g,'\\"'),e='"'+e+'"',this.datatype&&(e=e+"^^"+this.datatype),this.lang&&(e=e+"@"+this.lang),e},L.prototype.toString=function(){return this.value};const Y=function(){this.id=M++,this.elements=[],this.closed=!1};Y.prototype.termType="collection",Y.prototype.toNT=function(){return"_:n"+this.id},Y.prototype.toString=Y.prototype.toNT,Y.prototype.append=function(e){this.elements.push(e)},Y.prototype.close=function(){this.closed=!0};const b=function(){return this.subject.toNT()+" "+this.predicate.toNT()+" "+this.object.toNT()+" ."},w=function(e,t,n,r){return this.subject=m(e),this.predicate=m(t),this.object=m(n),void 0!==r&&(this.why=r),this};w.prototype.toNT=b,w.prototype.toString=b;const T=function(){return this.statements=[],this.constraints=[],this.initBindings=[],this.optional=[],this},k=function(){return"{\n"+this.statements.join("\n")+"}"};T.prototype.termType="formula",T.prototype.toNT=k,T.prototype.toString=k,T.prototype.add=function(e,t,n,r){this.statements.push(new w(e,t,n,r))},T.prototype.sym=function(e,t){return null!=t&&(e=this.namespaces[e]+t),new g(e)},T.prototype.literal=function(e,t,n){return new L(e.toString(),t,n)},T.prototype.bnode=function(){return new v},T.prototype.formula=function(){return new T},T.prototype.collection=function(){return new Y};const D=function(e){return this.uri=h(e,"varid:"),this};D.prototype.termType="variable",D.prototype.toNT=function(){return"varid:"==this.uri.slice(0,"varid:".length)?"?"+this.uri.slice("varid:".length):"?"+this.uri},D.prototype.toString=D.prototype.toNT,D.prototype.classOrder=7,T.prototype.variable=function(e){return new D(e)},D.prototype.hashString=D.prototype.toNT,T.prototype.fromNT=function(e){const t=e.length,n=e.slice(0,1);if("<"===n)return this.sym(e.slice(1,t-1));if("_"===n){const t=new v;return t.id=parseInt(e.slice(3)),M--,t}alert(`Can't yet convert from NT: '${e}', ${e[0]}`)};let S,x;Error;if("undefined"==typeof window||void 0===window.DOMParser&&"undefined"==typeof ActiveXObject){S=e=>(new XMLSerializer).serializeToString(e);const e=_.a.DOMParser;x=t=>(new e).parseFromString(t,"text/xml")}else S=e=>e.xml,x=e=>{let t;try{if(window.DOMParser){t=(new DOMParser).parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)}catch(e){t=null}if(!t||!t.documentElement||t.getElementsByTagName("parsererror").length)throw new Error("Could not parse text as xml");return t};var j=n(1),O=n.n(j);var E=function(){this.__data__=[],this.size=0};var H=function(e,t){return e===t||e!=e&&t!=t};var A=function(e,t){for(var n=e.length;n--;)if(H(e[n][0],t))return n;return-1},P=Array.prototype.splice;var I=function(e){var t=this.__data__,n=A(t,e);return!(n<0)&&(n==t.length-1?t.pop():P.call(t,n,1),--this.size,!0)};var N=function(e){var t=this.__data__,n=A(t,e);return n<0?void 0:t[n][1]};var C=function(e){return A(this.__data__,e)>-1};var R=function(e,t){var n=this.__data__,r=A(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function F(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}F.prototype.clear=E,F.prototype.delete=I,F.prototype.get=N,F.prototype.has=C,F.prototype.set=R;var W=F;var z=function(){this.__data__=new W,this.size=0};var U=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var V=function(e){return this.__data__.get(e)};var B=function(e){return this.__data__.has(e)},J=n(20),G=J.a.Symbol,$=Object.prototype,q=$.hasOwnProperty,K=$.toString,Z=G?G.toStringTag:void 0;var X=function(e){var t=q.call(e,Z),n=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var a=K.call(e);return r&&(t?e[Z]=n:delete e[Z]),a},Q=Object.prototype.toString;var ee=function(e){return Q.call(e)},te=G?G.toStringTag:void 0;var ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?X(e):ee(e)};var re=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var ae,ie=function(e){if(!re(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},se=J.a["__core-js_shared__"],oe=(ae=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||""))?"Symbol(src)_1."+ae:"";var ue=function(e){return!!oe&&oe in e},de=Function.prototype.toString;var ce=function(e){if(null!=e){try{return de.call(e)}catch(e){}try{return e+""}catch(e){}}return""},le=/^\[object .+?Constructor\]$/,_e=Function.prototype,he=Object.prototype,fe=_e.toString,me=he.hasOwnProperty,pe=RegExp("^"+fe.call(me).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ye=function(e){return!(!re(e)||ue(e))&&(ie(e)?pe:le).test(ce(e))};var ge=function(e,t){return null==e?void 0:e[t]};var Me=function(e,t){var n=ge(e,t);return ye(n)?n:void 0},ve=Me(J.a,"Map"),Le=Me(Object,"create");var Ye=function(){this.__data__=Le?Le(null):{},this.size=0};var be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},we=Object.prototype.hasOwnProperty;var Te=function(e){var t=this.__data__;if(Le){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return we.call(t,e)?t[e]:void 0},ke=Object.prototype.hasOwnProperty;var De=function(e){var t=this.__data__;return Le?void 0!==t[e]:ke.call(t,e)};var Se=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Le&&void 0===t?"__lodash_hash_undefined__":t,this};function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xe.prototype.clear=Ye,xe.prototype.delete=be,xe.prototype.get=Te,xe.prototype.has=De,xe.prototype.set=Se;var je=xe;var Oe=function(){this.size=0,this.__data__={hash:new je,map:new(ve||W),string:new je}};var Ee=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var He=function(e,t){var n=e.__data__;return Ee(t)?n["string"==typeof t?"string":"hash"]:n.map};var Ae=function(e){var t=He(this,e).delete(e);return this.size-=t?1:0,t};var Pe=function(e){return He(this,e).get(e)};var Ie=function(e){return He(this,e).has(e)};var Ne=function(e,t){var n=He(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ce.prototype.clear=Oe,Ce.prototype.delete=Ae,Ce.prototype.get=Pe,Ce.prototype.has=Ie,Ce.prototype.set=Ne;var Re=Ce;var Fe=function(e,t){var n=this.__data__;if(n instanceof W){var r=n.__data__;if(!ve||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Re(r)}return n.set(e,t),this.size=n.size,this};function We(e){var t=this.__data__=new W(e);this.size=t.size}We.prototype.clear=z,We.prototype.delete=U,We.prototype.get=V,We.prototype.has=B,We.prototype.set=Fe;var ze=We;var Ue=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},Ve=function(){try{var e=Me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Be=function(e,t,n){"__proto__"==t&&Ve?Ve(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Je=Object.prototype.hasOwnProperty;var Ge=function(e,t,n){var r=e[t];Je.call(e,t)&&H(r,n)&&(void 0!==n||t in e)||Be(e,t,n)};var $e=function(e,t,n,r){var a=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var o=t[i],u=r?r(n[o],e[o],o,n,e):void 0;void 0===u&&(u=e[o]),a?Be(n,o,u):Ge(n,o,u)}return n};var qe=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Ke=function(e){return null!=e&&"object"==typeof e};var Ze=function(e){return Ke(e)&&"[object Arguments]"==ne(e)},Xe=Object.prototype,Qe=Xe.hasOwnProperty,et=Xe.propertyIsEnumerable,tt=Ze(function(){return arguments}())?Ze:function(e){return Ke(e)&&Qe.call(e,"callee")&&!et.call(e,"callee")},nt=Array.isArray,rt=n(60),at=/^(?:0|[1-9]\d*)$/;var it=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&at.test(e))&&e>-1&&e%1==0&&e<t};var st=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ot={};ot["[object Float32Array]"]=ot["[object Float64Array]"]=ot["[object Int8Array]"]=ot["[object Int16Array]"]=ot["[object Int32Array]"]=ot["[object Uint8Array]"]=ot["[object Uint8ClampedArray]"]=ot["[object Uint16Array]"]=ot["[object Uint32Array]"]=!0,ot["[object Arguments]"]=ot["[object Array]"]=ot["[object ArrayBuffer]"]=ot["[object Boolean]"]=ot["[object DataView]"]=ot["[object Date]"]=ot["[object Error]"]=ot["[object Function]"]=ot["[object Map]"]=ot["[object Number]"]=ot["[object Object]"]=ot["[object RegExp]"]=ot["[object Set]"]=ot["[object String]"]=ot["[object WeakMap]"]=!1;var ut=function(e){return Ke(e)&&st(e.length)&&!!ot[ne(e)]};var dt=function(e){return function(t){return e(t)}},ct=n(47),lt=ct.a&&ct.a.isTypedArray,_t=lt?dt(lt):ut,ht=Object.prototype.hasOwnProperty;var ft=function(e,t){var n=nt(e),r=!n&&tt(e),a=!n&&!r&&Object(rt.a)(e),i=!n&&!r&&!a&&_t(e),s=n||r||a||i,o=s?qe(e.length,String):[],u=o.length;for(var d in e)!t&&!ht.call(e,d)||s&&("length"==d||a&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||it(d,u))||o.push(d);return o},mt=Object.prototype;var pt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||mt)};var yt=function(e,t){return function(n){return e(t(n))}},gt=yt(Object.keys,Object),Mt=Object.prototype.hasOwnProperty;var vt=function(e){if(!pt(e))return gt(e);var t=[];for(var n in Object(e))Mt.call(e,n)&&"constructor"!=n&&t.push(n);return t};var Lt=function(e){return null!=e&&st(e.length)&&!ie(e)};var Yt=function(e){return Lt(e)?ft(e):vt(e)};var bt=function(e,t){return e&&$e(t,Yt(t),e)};var wt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Tt=Object.prototype.hasOwnProperty;var kt=function(e){if(!re(e))return wt(e);var t=pt(e),n=[];for(var r in e)("constructor"!=r||!t&&Tt.call(e,r))&&n.push(r);return n};var Dt=function(e){return Lt(e)?ft(e,!0):kt(e)};var St=function(e,t){return e&&$e(t,Dt(t),e)},xt=n(322);var jt=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var Ot=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[a++]=s)}return i};var Et=function(){return[]},Ht=Object.prototype.propertyIsEnumerable,At=Object.getOwnPropertySymbols,Pt=At?function(e){return null==e?[]:(e=Object(e),Ot(At(e),(function(t){return Ht.call(e,t)})))}:Et;var It=function(e,t){return $e(e,Pt(e),t)};var Nt=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Ct=yt(Object.getPrototypeOf,Object),Rt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Nt(t,Pt(e)),e=Ct(e);return t}:Et;var Ft=function(e,t){return $e(e,Rt(e),t)};var Wt=function(e,t,n){var r=t(e);return nt(e)?r:Nt(r,n(e))};var zt=function(e){return Wt(e,Yt,Pt)};var Ut=function(e){return Wt(e,Dt,Rt)},Vt=Me(J.a,"DataView"),Bt=Me(J.a,"Promise"),Jt=Me(J.a,"Set"),Gt=Me(J.a,"WeakMap"),$t=ce(Vt),qt=ce(ve),Kt=ce(Bt),Zt=ce(Jt),Xt=ce(Gt),Qt=ne;(Vt&&"[object DataView]"!=Qt(new Vt(new ArrayBuffer(1)))||ve&&"[object Map]"!=Qt(new ve)||Bt&&"[object Promise]"!=Qt(Bt.resolve())||Jt&&"[object Set]"!=Qt(new Jt)||Gt&&"[object WeakMap]"!=Qt(new Gt))&&(Qt=function(e){var t=ne(e),n="[object Object]"==t?e.constructor:void 0,r=n?ce(n):"";if(r)switch(r){case $t:return"[object DataView]";case qt:return"[object Map]";case Kt:return"[object Promise]";case Zt:return"[object Set]";case Xt:return"[object WeakMap]"}return t});var en=Qt,tn=Object.prototype.hasOwnProperty;var nn=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&tn.call(e,"index")&&(n.index=e.index,n.input=e.input),n},rn=J.a.Uint8Array;var an=function(e){var t=new e.constructor(e.byteLength);return new rn(t).set(new rn(e)),t};var sn=function(e,t){var n=t?an(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},on=/\w*$/;var un=function(e){var t=new e.constructor(e.source,on.exec(e));return t.lastIndex=e.lastIndex,t},dn=G?G.prototype:void 0,cn=dn?dn.valueOf:void 0;var ln=function(e){return cn?Object(cn.call(e)):{}};var _n=function(e,t){var n=t?an(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var hn=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return an(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return sn(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return _n(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return un(e);case"[object Set]":return new r;case"[object Symbol]":return ln(e)}},fn=Object.create,mn=function(){function e(){}return function(t){if(!re(t))return{};if(fn)return fn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var pn=function(e){return"function"!=typeof e.constructor||pt(e)?{}:mn(Ct(e))};var yn=function(e){return Ke(e)&&"[object Map]"==en(e)},gn=ct.a&&ct.a.isMap,Mn=gn?dt(gn):yn;var vn=function(e){return Ke(e)&&"[object Set]"==en(e)},Ln=ct.a&&ct.a.isSet,Yn=Ln?dt(Ln):vn,bn={};bn["[object Arguments]"]=bn["[object Array]"]=bn["[object ArrayBuffer]"]=bn["[object DataView]"]=bn["[object Boolean]"]=bn["[object Date]"]=bn["[object Float32Array]"]=bn["[object Float64Array]"]=bn["[object Int8Array]"]=bn["[object Int16Array]"]=bn["[object Int32Array]"]=bn["[object Map]"]=bn["[object Number]"]=bn["[object Object]"]=bn["[object RegExp]"]=bn["[object Set]"]=bn["[object String]"]=bn["[object Symbol]"]=bn["[object Uint8Array]"]=bn["[object Uint8ClampedArray]"]=bn["[object Uint16Array]"]=bn["[object Uint32Array]"]=!0,bn["[object Error]"]=bn["[object Function]"]=bn["[object WeakMap]"]=!1;var wn=function e(t,n,r,a,i,s){var o,u=1&n,d=2&n,c=4&n;if(r&&(o=i?r(t,a,i,s):r(t)),void 0!==o)return o;if(!re(t))return t;var l=nt(t);if(l){if(o=nn(t),!u)return jt(t,o)}else{var _=en(t),h="[object Function]"==_||"[object GeneratorFunction]"==_;if(Object(rt.a)(t))return Object(xt.a)(t,u);if("[object Object]"==_||"[object Arguments]"==_||h&&!i){if(o=d||h?{}:pn(t),!u)return d?Ft(t,St(o,t)):It(t,bt(o,t))}else{if(!bn[_])return i?t:{};o=hn(t,_,u)}}s||(s=new ze);var f=s.get(t);if(f)return f;s.set(t,o),Yn(t)?t.forEach((function(a){o.add(e(a,n,r,a,t,s))})):Mn(t)&&t.forEach((function(a,i){o.set(i,e(a,n,r,i,t,s))}));var m=c?d?Ut:zt:d?keysIn:Yt,p=l?void 0:m(t);return Ue(p||t,(function(a,i){p&&(a=t[i=a]),Ge(o,i,e(a,n,r,i,t,s))})),o};var Tn=function(e){return wn(e,5)};const kn=(e,t,n,r)=>{if("URI"===e.getNodetype()||"RESOURCE"===e.getNodetype()){let n=jn.getLocalizedMap(r,t,e.getURIValueLabelProperties());if(!n){const e=t.lastIndexOf("#"),r=t.lastIndexOf("/");n=e>0||r>0?{"":decodeURIComponent(t.substring(1+(e>r?e:r)))}:{"":t}}return{value:t,label:n}}return{value:t,label:t}};var Dn={hasDnDSupport:e=>!1,addDnD:(e,t,n)=>({}),attachExternalLinkBehaviour:()=>!1,attachLinkBehaviour:(e,t)=>!1,openChoiceSelector:(e,t)=>{alert('This alert is a placeholder for a search dialog that should be provided as part of the integration of RDForms into a wider system.\nSimply override the methods "getChoices" and "openChoiceSelector" in the system module.'),t({value:"http://example.com/choice1",label:{en:"First choice",sv:"Första valet"}})},getChoice:(e,t,n,r)=>kn(e,t,0,r),getFallbackChoice:kn,labelProperties:["http://www.w3.org/2000/01/rdf-schema#label","http://purl.org/dc/terms/title","http://purl.org/dc/elements/1.1/title","http://www.w3.org/2004/02/skos/core#prefLabel","http://xmlns.com/foaf/0.1/name","http://xmlns.com/foaf/name"],createURI:(e,t)=>{const n=t.getChildrenRootUri(),r=n.lastIndexOf("#"),a=-1===r?n+"#":n.substring(0,r+1),i=t.getGraph()._graph;for(;;){const e=a+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);if(null==i[e])return e}}};const Sn=e=>{const t=O.a.locale();if(null==e)return{precision:"none"};if("string"==typeof e)return{value:e,precision:"nolang",lang:""};if(e.hasOwnProperty(t))return{value:e[t],precision:"exact",lang:t};if(t.indexOf("_")>-1&&e.hasOwnProperty(t.substr(0,2)))return{value:e[t.substr(0,2)],precision:"coarsen",lang:t.substr(0,2)};if(e.hasOwnProperty("en"))return{value:e.en,precision:"default",lang:"en"};if(e.hasOwnProperty(""))return{value:e[""],precision:"nolang",lang:""};const n=Object.keys(e);return n.length>0?{value:e[n[0]],precision:"any",lang:n[0]}:{precision:"none"}},xn=(e,t,n)=>{const r=e.find(t,n);if(r.length>0){const e={};for(let t=0;t<r.length;t++)e[r[t].getLanguage()||""]=r[t].getValue();return e}};var jn={getLocalizedValue:Sn,getLocalizedMap:(e,t,n)=>{let r,a=t,i=n;e.getItem?(r=e.getGraph(),a=e.getValue(),i=e.getItem().getURIValueLabelProperties()):r=e,null!=i&&0!==i.length||(i=Dn.labelProperties);for(let e=0;e<i.length;e++){const t=i[e];if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++){const i=xn(r,a,t[n]);i&&e.push(Sn(i).value)}if(e.length>0)return{"":e.join(" ")}}else{const e=xn(r,a,t);if(e)return e}}},cloneArrayWithLabels:(e,t)=>{const n=[];for(let t=0;t<e.length;t++){const r=e[t],a=Sn(r.label),i={value:r.value,label:a.value||r.value||""};!0===r.top&&(i.top=!0),null!=r.children&&(i.children=Tn(r.children)),!1===r.selectable?i.selectable=!1:i.selectable=!0,n.push(i)}return!0!==t&&n.sort((e,t)=>e.label>t.label?1:-1),n},extractGist:(e,t)=>{let n=t;if(n){-1===n.indexOf("$1")&&(n+="$1");const t=(""+n).replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1").replace("\\$1","(.*)"),r=new RegExp(t).exec(e);if(null!=r)return r[1]}return e},findFirstValue:(e,t,n,r)=>{const a=e.findFirstValueBinding(e.match(t,n,r),!1);if(a)return a.getChoice?Sn(a.getChoice().label).value:a.getGist()},generateUUID:()=>{let e=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)})}};let On=0;const En=(e,t,n)=>{null==n||""===n||Array.isArray(n)&&0===n.length?delete e[t]:e[t]=n};class Hn{constructor({source:e={},bundle:t,itemStore:n}){this._itemStore=n,this._source=e,this._bundle=t,On+=1,this._internalId=On,this._styles=["heading","invisible","invisibleGroup","stars","commentOn","multiline","horizontalRadioButtons","verticalRadioButtons","horizontalCheckBoxes","verticalCheckBoxes","nonEditable","expandable","compact","nonCompact","dropDown","table","firstcolumnfixedtable","tree","externalLink","internalLink","noLink","image","label","tooltip","strictmatch","relaxedDatatypeMatch","viewAllTranslations","email","atLeastOneChild","atMostOneChild","exactlyOneChild","deprecated","noLabelInPresent","autoInitDate","autoUpdateDate","autoUUID","autoValue","showURI","showLink","showValue","textAsChoice","preserveOrderOfChoices","linkWithLabel","deprecated"],this._getLocalizedValue=jn.getLocalizedValue}getId(){const e=this.getSource(!0);return e.id||e["@id"]}setId(e){En(this.getSource(!0),"id",e),delete s["@id"]}getType(e){const t=this.getSource(e);return t.type||t["@type"]}setType(e){En(this.getSource(!0),"type",e),delete s["@type"],this.refreshExtends()}getExtends(){return this.getSource(!0).extends||""}refreshExtends(){this.isExtention&&this.setExtends(this.getExtends())}setExtends(e){const t=this.getSource(!0),n=this._itemStore.getItem(e);this._source=null==n?t:this._itemStore.createExtendedSource(n.getSource(),t),""===e||null==e?delete t.extends:t.extends=e}isExtention(){return null!=this.getExtends()}getLabel(e,t){const n=this.getSource(t);return e?jn.getLocalizedValue(n.label):jn.getLocalizedValue(n.label).value}setLabel(e,t){const n=this.getSource(!0);n.label=this._setLangHash(n.label,e,t),this.refreshExtends()}getLabelMap(e){return this.getSource(e).label}setLabelMap(e){En(this.getSource(!0),"label",e),this.refreshExtends()}getDescription(e,t){const n=this.getSource(t);return e?jn.getLocalizedValue(n.description):jn.getLocalizedValue(n.description).value}setDescription(e,t){const n=this.getSource(!0);n.description=this._setLangHash(n.description,e,t),this.refreshExtends()}getDescriptionMap(e){return this.getSource(e).description}setDescriptionMap(e){En(this.getSource(!0),"description",e),this.refreshExtends()}getPlaceholder(e,t){const n=this.getSource(t);return e?jn.getLocalizedValue(n.placeholder):jn.getLocalizedValue(n.placeholder).value}setPlaceholder(e,t){const n=this.getSource(!0);n.placeholder=this._setLangHash(n.placeholder,e,t),this.refreshExtends()}getPlaceholderMap(e){return this.getSource(e).placeholder}setPlaceholderMap(e){En(this.getSource(!0),"placeholder",e),this.refreshExtends()}getProperty(e){let t=null;const n=this.getSource(e);return n&&(t=n.property,null!=t&&""!==t&&(t=d(t))),t}setProperty(e){En(this.getSource(!0),"property",e),this.refreshExtends()}getURIValueLabelProperties(e){const t=this.getSource(e).uriValueLabelProperties;return null!=t?t.map(e=>d(e)):t}setURIValueLabelProperties(e){En(this.getSource(!0),"uriValueLabelProperties",e),this.refreshExtends()}getConstraints(e){const t=this.getSource(e).constraints;if(null!=t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];Array.isArray(r)?e[d(n)]=r.map(e=>d(e)):e[d(n)]=d(r)}),e}return t}setConstraints(e){En(this.getSource(!0),"constraints",e),this.refreshExtends()}getDeps(e){const t=this.getSource(e).deps;return null!=t?t.map(e=>"*"!==e&&".."!==e?d(e):e):t}setDeps(e){En(this.getSource(!0),"deps",e),this.refreshExtends()}getDatatype(e){const t=this.getSource(e).datatype;return null!=t&&""!==t?Array.isArray(t)?t.map(e=>d(e)):d(t):t}setDatatype(e){En(this.getSource(!0),"datatype",e),this.refreshExtends()}getPattern(e){return this.getSource(e).pattern}setPattern(e){En(this.getSource(!0),"pattern",e),this.refreshExtends()}getLanguage(e){return this.getSource(e).language}setLanguage(e){En(this.getSource(!0),"language",e),this.refreshExtends()}getMember(e){return this.getSource(e).member}setMember(e){En(this.getSource(!0),"member",e),this.refreshExtends()}getNodetype(e){const t=this.getSource(e);return t.nodetype||t.nodeType}setNodetype(e){En(this.getSource(!0),"nodetype",e),this.refreshExtends()}getValue(e){return this.getSource(e).value}setValue(e){En(this.getSource(!0),"value",e),this.refreshExtends()}getValueTemplate(e){return this.getSource(e).valueTemplate}setValueTemplate(e){En(this.getSource(!0),"valueTemplate",e),this.refreshExtends()}getCardinality(e){if(!this.getProperty()&&"text"===this.getType())return{min:1,max:1};const t=this.getSource(e);return t&&"cardinality"in t?t.cardinality:this.getProperty()?{}:{max:1}}setCardinality(e){En(this.getSource(!0),"cardinality",e),this.refreshExtends()}isEnabled(e){const t=this.getSource(e);return null==t.enabled||t.enabled}setEnabled(e){const t=this.getSource(!0);e?delete t.enabled:t.enabled=e,this.refreshExtends()}getClasses(e){const t=this.getSource(e);return t&&"cls"in t?t.cls:[]}setClasses(e){En(this.getSource(!0),"cls",e),this.refreshExtends()}hasClass(e,t){const n=this.getSource(t);return!!this.hasStyle(e,t)||null!=n.cls&&n.cls.some(t=>t.toLowerCase()===e.toLowerCase())}getAvailableStyles(){return this._styles}getStyles(e){return this.getSource(e).styles||[]}setStyles(e){En(this.getSource(!0),"styles",e),this.refreshExtends()}hasStyle(e,t){const n=this.getSource(t);return!(!n||!("styles"in n))&&n.styles.some(t=>t.toLowerCase()===e.toLowerCase())}getSource(e){if(!0===e)return this._source._extendedSource||this._source;if(!1===e){const e=this._itemStore.getItem(this.getExtends());return null==e?this._source:e.getSource()}return this._source}getBundle(){return this._bundle}toStringShort(){return`'${this.getLabel()}'${this.getId()?` (ID: '${this.getId()}')`:""}`}toString(){const e=[];return this.getId()&&e.push(`ID: '${this.getId()}'`),e.push(`TYPE: '${this.getType()}'`),this.getProperty()&&e.push(`PROPERTY: '${this.getProperty()}'`),this.getExtends()&&e.push(`EXTENDS: '${this.getExtends()}'`),`'${this.getLabel()}' (${e.join(", ")})`}_setLangHash(e,t,n){const r=e||{};if("string"==typeof t)"string"==typeof n?r[n]=t:r[""]=t;else if("object"==typeof t&&null!==t)return t;return r}}class An extends Hn{constructor(e){super(e),this._children=e.children,null!=this._source.content&&(this._source.items=this._source.content,delete this._source.content),this._forceChildrenClones=!1,this._parent=null}getChildren(e){const t=e&&this.isExtention();let n=t?this._ochildren:this._children;var r;return null==n&&(n=this._itemStore.getChildren(this,t),!0===this.getSource().automatic&&this._itemStore.automaticSortAllowed&&((r=n).forEach(e=>{e.__label=(e.getLabel()||"").toLowerCase()}),r.sort((e,t)=>null!=e._source.priority?null!=t._source.priority?e._source.priority>t._source.priority?-1:e._source.priority<t._source.priority?1:0:e._source.priority>0?-1:1:null!=t._source.priority?t._source.priority>0?1:-1:e.__label>t.__label?1:e.__label<t.__label?-1:0)),this[`_${t?"o":""}children`]=n),n}originalChildrenChanged(){this.isExtention()&&delete this._children}setExtends(e){super.setExtends(e),delete this._children,delete this._ochildren}getNodetype(){return super.getNodetype()||"RESOURCE"}}class Pn extends An{getChildren(e){if(null==this._delegatedChildren){const t=()=>({min:1,max:1,pref:1}),n=super.getChildren(e)||[];this._delegatedChildren=n.map(e=>{const n=Object.create(e);return n.getCardinality=t,n})}return this._delegatedChildren}getPropertyItem(){return this.getChildren()[0]}getObjectItem(){return this.getChildren()[1]}}class In extends Hn{getLabelProperties(e){return this.getSource(e).labelProperties}}const Nn=e=>{null!=e&&e.forEach(e=>{e.value=d(e.value)})};class Cn extends Hn{constructor(e){super(e),this._ontologyStore=e.ontologyStore}getChoices(e){return this.getStaticChoices(e)||this.getDynamicChoices(e)||[]}hasChoices(e){const t=this.getSource(e);return null!=t.ontologyUrl||null!=t.choices}hasStaticChoices(e){return null!=this.getSource(e).choices}getStaticChoices(e){const t=this.getSource(e);if(t.choices){const n=-1===this.getNodetype().indexOf("LITERAL");e&&this.isExtention()?this._origStaticIsSorted||(n&&Nn(t.choices),this._origStaticIsSorted=!0):this._staticIsSorted||(n&&Nn(t.choices),this._staticIsSorted=!0)}return t.choices}setStaticChoices(e){const t=this.getSource(!0);t.choices!==e&&(null!=e&&(this._origStaticIsSorted=!0),t.choices=e,this.refreshExtends())}setExtends(e){super.setExtends(e),delete this._staticIsSorted,delete this._origStaticIsSorted}getDynamicChoices(e){if(null==this._dynamicChoices){if(null==e)return this._dynamicChoices=this._ontologyStore.getChoices(this),this._dynamicChoices;this._ontologyStore.getChoices(this,t=>{this._dynamicChoices=t,null==this._dynamicChoices&&(console.log("Failed lookup of choices for "+this.getLabel()),console.log("OntologyUrl is: "+this._source.ontologyUrl)),e(this._dynamicChoices)})}else{if(null==e)return this._dynamicChoices;e(this._dynamicChoices)}}getOntologyUrl(e){const t=this.getSource(e).ontologyUrl;return null!=t&&""!==t?d(t):t}setOntologyUrl(e){const t=this.getSource(!0);null==e||""===e?delete t.ontologyUrl:t.ontologyUrl=e,this.refreshExtends()}getLabelProperties(e){return this.getSource(e).labelProperties||["http://www.w3.org/2000/01/rdf-schema#label"]}getParentProperty(e){const t=this.getSource(e).parentProperty;return null!=t&&""!==t?d(t):t}setParentProperty(e){const t=this.getSource(!0);null==e||""===e?delete t.parentProperty:t.parentProperty=e,this.refreshExtends()}getHierarchyProperty(e){const t=this.getSource(e).hierarchyProperty;return null!=t&&""!==t?d(t):t}setHierarchyProperty(e){const t=this.getSource(!0);null==e||""===e?delete t.hierarchyProperty:t.hierarchyProperty=e,this.refreshExtends()}isParentPropertyInverted(e){return!0===this.getSource(e).isParentPropertyInverted}setParentPropertyInverted(e){const t=this.getSource(!0);!0===e?t.isParentPropertyInverted=!0:delete t.isParentPropertyInverted,this.refreshExtends()}isHierarchyPropertyInverted(e){return!0===this.getSource(e).isHierarchyPropertyInverted}setHierarchyPropertyInverted(e){const t=this.getSource(!0);e?t.isHierarchyPropertyInverted=!0:delete t.isHierarchyPropertyInverted,this.refreshExtends()}}var Rn=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Fn=function(e){return this.__data__.has(e)};function Wn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Re;++t<n;)this.add(e[t])}Wn.prototype.add=Wn.prototype.push=Rn,Wn.prototype.has=Fn;var zn=Wn;var Un=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Vn=function(e,t){return e.has(t)};var Bn=function(e,t,n,r,a,i){var s=1&n,o=e.length,u=t.length;if(o!=u&&!(s&&u>o))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var c=-1,l=!0,_=2&n?new zn:void 0;for(i.set(e,t),i.set(t,e);++c<o;){var h=e[c],f=t[c];if(r)var m=s?r(f,h,c,t,e,i):r(h,f,c,e,t,i);if(void 0!==m){if(m)continue;l=!1;break}if(_){if(!Un(t,(function(e,t){if(!Vn(_,t)&&(h===e||a(h,e,n,r,i)))return _.push(t)}))){l=!1;break}}else if(h!==f&&!a(h,f,n,r,i)){l=!1;break}}return i.delete(e),i.delete(t),l};var Jn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var Gn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},$n=G?G.prototype:void 0,qn=$n?$n.valueOf:void 0;var Kn=function(e,t,n,r,a,i,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new rn(e),new rn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return H(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=Jn;case"[object Set]":var u=1&r;if(o||(o=Gn),e.size!=t.size&&!u)return!1;var d=s.get(e);if(d)return d==t;r|=2,s.set(e,t);var c=Bn(o(e),o(t),r,a,i,s);return s.delete(e),c;case"[object Symbol]":if(qn)return qn.call(e)==qn.call(t)}return!1},Zn=Object.prototype.hasOwnProperty;var Xn=function(e,t,n,r,a,i){var s=1&n,o=zt(e),u=o.length;if(u!=zt(t).length&&!s)return!1;for(var d=u;d--;){var c=o[d];if(!(s?c in t:Zn.call(t,c)))return!1}var l=i.get(e);if(l&&i.get(t))return l==t;var _=!0;i.set(e,t),i.set(t,e);for(var h=s;++d<u;){var f=e[c=o[d]],m=t[c];if(r)var p=s?r(m,f,c,t,e,i):r(f,m,c,e,t,i);if(!(void 0===p?f===m||a(f,m,n,r,i):p)){_=!1;break}h||(h="constructor"==c)}if(_&&!h){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(_=!1)}return i.delete(e),i.delete(t),_},Qn=Object.prototype.hasOwnProperty;var er=function(e,t,n,r,a,i){var s=nt(e),o=nt(t),u=s?"[object Array]":en(e),d=o?"[object Array]":en(t),c="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),l="[object Object]"==(d="[object Arguments]"==d?"[object Object]":d),_=u==d;if(_&&Object(rt.a)(e)){if(!Object(rt.a)(t))return!1;s=!0,c=!1}if(_&&!c)return i||(i=new ze),s||_t(e)?Bn(e,t,n,r,a,i):Kn(e,t,u,n,r,a,i);if(!(1&n)){var h=c&&Qn.call(e,"__wrapped__"),f=l&&Qn.call(t,"__wrapped__");if(h||f){var m=h?e.value():e,p=f?t.value():t;return i||(i=new ze),a(m,p,n,r,i)}}return!!_&&(i||(i=new ze),Xn(e,t,n,r,a,i))};var tr=function e(t,n,r,a,i){return t===n||(null==t||null==n||!Ke(t)&&!Ke(n)?t!=t&&n!=n:er(t,n,r,a,e,i))};var nr=function(e,t){return tr(e,t)};class rr{constructor(){this._registry={}}importRegistry(e){Object.assign(this._registry,e)}getChoices(e,t){const n=this._findChoices(e);if(null==n);else{if(null==t)return n;t(n)}}_findChoices(e){const t=this._registry[e.getOntologyUrl()];if(null!=t)for(let n=0;n<t.length;n++){const r=t[n];if(nr(r.constraints,e.getConstraints())&&e.getParentProperty()===r.parentProperty&&e.getHierarchyProperty()===r.hierarchyProperty&&e.isParentPropertyInverted()===(r.isParentPropertyInverted||!1)&&e.isHierarchyPropertyInverted()===(r.isHierarchyPropertyInverted||!1))return r.choices}}_constructLoadUrl(e){const t=[];if(t.push("constr="+encodeURIComponent(JSON.stringify(e.getConstraints()))),null!=e.getParentProperty()){const n=!0===e.isParentPropertyInverted()?"ipp=":"pp=";t.push(n+encodeURIComponent(e.getParentProperty()))}if(null!=e.getHierarchyProperty()){const n=!0===e.isHierarchyPropertyInverted()?"ihp=":"hp=";t.push(n+encodeURIComponent(e.getHierarchyProperty()))}return`${e.getOntologyUrl()}?${t.join("&")}`}}let ar=0;class ir{constructor({itemStore:e,source:t,path:n,readOnly:r=!1}){this._itemStore=e,this._source=t,this._path=n,this._readOnly=r,this._items=[],ar+=1,this._id="_bundle_"+ar,this._root=null,this._modified=!1}getInternalId(){return this._id}getSource(){return this._source}setRoot(e){return this._source.root=e,e}getRoot(){if(this._source.root)return this._itemStore.getItem(this._source.root)}getItemStore(){return this._itemStore}getPath(){return this._path}getItems(){return this._items}addItem(e){this._items.push(e)}removeItem(e){this._items.splice(this._items.indexOf(e),1)}isModified(){return this._modified}setModified(e){this._modified=e}isReadOnly(){return this._readOnly||null==this._path}}let sr=0;class or{constructor({item:e,statement:t,graph:n,matchingCode:r}){this._item=e,this._statement=t,this._graph=n,this._ancestorValid=!0,this._cardinalityTracker=null,this._hash="b_"+sr,this._matchingCode=r||"correct",sr+=1}getGraph(){return this._graph||(this._statement?this._graph=this._statement.getGraph():this._parent&&(this._graph=this._parent.getGraph())),this._graph}isReadOnly(){if(!("_readOnly"in this)){const e=this.getParent();e&&e._readOnly?this._readyOnly=!0:this._readOnly=!(!this._statement||!this._statement.getNamedGraph())}return this._readOnly}remove(){}setSubject(e){}getValue(){}setValue(e,t){}getGist(){return jn.extractGist(this.getValue(),this.getItem().getValueTemplate())}setGist(e,t){let n=e,r=this.getItem().getValueTemplate();r&&n.length>0&&(-1===r.indexOf("$1")&&(r+="$1"),n=r.replace("$1",n)),this.setValue(n,t)}getCardinalityTracker(){return this._cardinalityTracker}setCardinalityTracker(e){this._cardinalityTracker=e}getItem(){return this._item}getStatement(){return this._statement}getParent(){return this._parent}setParent(e){this._parent=e}isValid(){}getMatchingCode(){return this._matchingCode}setMatchingCode(e){this._matchingCode=e}setAncestorValid(e){this._ancestorValid=e,this.updateAssertions()}updateAssertions(){}getHash(){return this._hash}addListener(e){this._listeners||(this._listeners=[]),this._listeners.push(e)}removeListener(e){if(this._listeners){const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}bindingChange(e){if(this._listeners)for(let t=0;t<this._listeners.length;t++)this._listeners[t](e);this._parent&&this._parent.bindingChange(e),this._cardinalityTracker&&this._cardinalityTracker.touch()}_isValidObjectValue(e){let t=e;if("string"!=typeof t&&null!==t)throw new Error("In a binding every object value need to be a string!");const n=this._item.getPattern();return n?(t=jn.extractGist(t,this.getItem().getValueTemplate()),null!=t&&""!==t&&new RegExp(`^${n}$`).test(t)):null!=t&&""!==t}_isValidPredicateValue(e){if("string"!=typeof e&&null!==e)throw new Error("In a binding every predicate need to be a string!");return null!=e&&""!==e}}class ur extends or{constructor(e){super(e),this._validObject=!0,this._validPredicate=!0,this._excludeFromTreeValidityCheck=!1,this._statement&&(this._validPredicate=this._isValidPredicateValue(this._statement.getPredicate(),!0),this._validObject=this._isValidObjectValue(this._statement.getValue()))}getValue(){return this._statement.getValue()}setValue(e,t){const n="string"==typeof e?e.trim():e,r=this._validObject;this._isValidObjectValue(n)?(this._statement.setValue(n,t),this._validObject=!0,!0===r||!0!==this._validPredicate||this._excludeFromTreeValidityCheck||this._parent.oneChildValidityChanged(!0)):(""!==n&&null!==n||this._statement.setValue("",t),this._validObject=!1,!1!==r&&!0===this._validPredicate&&this._parent.oneChildValidityChanged(!1)),this.updateAssertions()}setSubject(e){this._statement.setSubject(e)}getPredicate(){return this._statement.getPredicate()}setPredicate(e){const t=this._validPredicate;this._isValidPredicateValue(e)?(this._statement.setPredicate(e),this._validPredicate=!0,!0!==t&&!0===this._validObject&&this._parent.oneChildValidityChanged(!0)):(this._validPredicate=!1,!1!==t&&!0===this._validObject&&this._parent.oneChildValidityChanged(!1)),this.updateAssertions()}getLanguage(){return this._statement.getLanguage()}setLanguage(e,t){this._statement.setLanguage(e,t),this.updateAssertions()}getDatatype(){return this._statement.getDatatype()}setDatatype(e){this._statement.setDatatype(d(e)),this.updateAssertions()}setExcludeFromTreeValidityCheck(e){this._excludeFromTreeValidityCheck=e}remove(){this.setValue(null),this._parent.removeChildBinding(this),super.remove(arguments)}updateAssertions(){const e=this._ancestorValid&&this._validObject&&this._validPredicate;this._statement.setAsserted(e,!0),this.bindingChange(this)}isValid(){return this._validObject&&this._validPredicate&&!this._excludeFromTreeValidityCheck}}const dr="http://www.w3.org/2000/01/rdf-schema#seeAlso";class cr extends ur{constructor({choice:e,item:t,statement:n,matchingCode:r}){super({choice:e,item:t,statement:n,matchingCode:r}),this._choice=e,this._validPredicate=null!=t.getProperty()}static get seeAlso(){return dr}setChoice(e,t){this._choice=e,null==e?this.setValue(null,null,t):this.getValue()!==e.value&&this.setValue(e.value,e,t)}getChoice(){return this._choice}setValue(e,t,n){super.setValue(e,t,n);const r=this.getValue(),a=this._statement.getGraph();if(a.findAndRemove(r,"http://www.w3.org/2000/01/rdf-schema#label",void 0,n),a.findAndRemove(r,dr,void 0,n),null!=e&&null!=t&&(t.seeAlso&&t.inlineSeeAlso&&a.create(e,dr,t.seeAlso,!0,n),!0===t.inlineLabel)){const r=t.label||{};Object.keys(r).forEach(t=>a.create(e,"http://www.w3.org/2000/01/rdf-schema#label",{value:r[t],lang:t,type:"literal"},!0,n))}}}class lr{constructor(e){this._listener=[],this._limits=e.getCardinality()||{},this._counter=0,this._depsOk=!0,this._listeners=[],this._code=0}addListener(e){return this._listeners.push(e),e}removeListener(e){this._listeners.splice(this._listeners.indexOf(e),1)}cardinalityChanged(){this._listeners.forEach(e=>e())}getCardinality(){return this._counter}isMax(){return null!=this._limits.max&&this._counter>=this._limits.max}isMin(){return null!=this._limits.min&&this._counter<=this._limits.min}isFine(){return this._fine}isDepsOk(){return this._depsOk}getCode(){return this._code}setCode(e){this._code!==e&&(this._code=e,this.cardinalityChanged())}setDepsOk(e){this._depsOk!==e&&(this._code=Ir.UNKNOWN,this._depsOk=e,this.cardinalityChanged())}increment(){this._counter+=1,this._code=Ir.UNKNOWN,this._checkCounter()}decrement(){this._counter-=1,this._code=Ir.UNKNOWN,this._checkCounter()}getCounter(){return this._counter}checkCardinality(){this._checkCounter()}touch(){this._code=Ir.UNKNOWN,this.cardinalityChanged()}_checkCounter(){null!=this._limits.max&&this._counter===this._limits.max?this._fine=!0:null!=this._limits.max&&this._counter>this._limits.max?this._fine=!1:null!=this._limits.min&&this._counter===this._limits.min?this._fine=!0:null!=this._limits.min&&this._counter<this._limits.min&&(this._fine=!1),this.cardinalityChanged()}}class _r extends or{constructor(e){super(e);const{constraints:t=[],childrenRootUri:n=null}=e;this._constraints=t,this._childBindings=this._item.getChildren().map(()=>[]),this._rootUri=n,this._validPredicate=!0,this._validObject=!0,this._statement&&(this._validPredicate=this._isValidPredicateValue(this._statement.getPredicate()),this._validObject=this._isValidObjectValue(this._statement.getValue(),this._statement.getType())),this._cachedChildBindings=null}getValue(){return this.getChildrenRootUri()}oneChildValidityChanged(e){return e!==this._oneValidChild&&(!(!e&&(delete this._oneValidChild,this.isValid()))&&(this._oneValidChild=e,this._notifyValidityChange(e&&this._validPredicate&&this._validObject),this._validPredicate&&this._validObject))}setSubject(e){this._statement?this._statement.setSubject(e):this.getChildBindings().forEach(t=>t.setSubject(e))}getChildrenRootUri(){return this._statement?this._statement.getValue():null!=this._rootUri?this._rootUri:null!=this._parent?this._parent.getChildrenRootUri():void 0}addChildBinding(e){this.addChildBindings([e])}addChildBindings(e){if(this._cachedChildBindings=null,!Array.isArray(e)||0===e.length)return;const t=e[0].getItem(),n=this._item.getChildren();for(let r=n.length;r>=0;r--)if(t===n[r]){const n=this._childBindings[r].length>0?this._childBindings[r][0].getCardinalityTracker():new lr(t);this._childBindings[r]=this._childBindings[r].concat(e),e.forEach(e=>{e.setParent(this),e.setCardinalityTracker(n),n.increment()},this);break}}removeChildBinding(e){this._cachedChildBindings=null;const t=this._item.getChildren();for(let n=t.length;n>=0;n--)if(e.getItem()===t[n]){this._childBindings[n].splice(this._childBindings[n].indexOf(e),1),delete e._parent,e.getCardinalityTracker().decrement();break}this.oneChildValidityChanged(),this.bindingChange(e)}getChildBindingsFor(e){const t=this._item.getChildren();for(let n=t.length;n>=0;n--)if(e===t[n])return this._childBindings[n]}getItemGroupedChildBindings(){return this._childBindings}getChildBindings(){return null==this._cachedChildBindings&&(this._childBindings&&this._childBindings.length>0?this._cachedChildBindings=[].concat(...this._childBindings):this._cachedChildBindings=[]),this._cachedChildBindings}setPredicate(e){const t=this._validPredicate;this._isValidPredicateValue(e)?(this._statement.setPredicate(e),this._validPredicate=!0,!0!==t&&this._validObject&&("URI"===this.getItem().getNodetype()||this._oneValidChild)&&this._notifyValidityChange(!0)):(this._validPredicate=!1,!1!==t&&this._validObject&&("URI"===this.getItem().getNodetype()||this._oneValidChild)&&this._notifyValidityChange(!1)),this.updateAssertions()}getValue(){return this._statement&&this._statement.isObjectBlank()?"":this._statement&&this._statement.getValue()}setValue(e){if("URI"!==this.getItem().getNodetype()||!this._statement)throw new Error("Cannot change the value of a group unless its nodetype is URI and also that it corresponds to a statement");const t=this._validObject;this._isValidObjectValue(e,"uri")?(this._validObject=!0,this._statement._o.type="uri",this._statement.setValue(e),this._constraints.forEach(t=>t.setSubject(e)),this.getChildBindings().forEach(t=>t.setSubject(e)),!t&&this._validPredicate&&this._notifyValidityChange(!0)):(this._validObject=!1,t&&this._validPredicate&&this._notifyValidityChange(!1))}getPredicate(){return this._statement?this._statement.getPredicate():void 0}remove(){this._oneValidChild=!1,this.setAncestorValid(!1),null!=this._parent&&this._parent.removeChildBinding(this),super.remove(arguments)}_isValid(){return"URI"===this.getItem().getNodetype()?this._validObject&&this._validPredicate:this._oneValidChild&&this._validPredicate&&this._validObject}isValid(){return null==this._oneValidChild&&(this._oneValidChild=this._forceOneValidChildCheck()),this._isValid()}setAncestorValid(e){this._ancestorValid=e,this.updateAssertions(),this._childBindings.forEach(t=>t.forEach(t=>t.setAncestorValid(e&&this._isValid()),this),this)}updateAssertions(){null==this._oneValidChild&&this.isValid();const e=this._ancestorValid&&this._isValid();null!=this._statement&&this._statement.setAsserted(e),this._constraints.forEach(t=>t.setAsserted(e)),this.getChildBindings().forEach(e=>e.updateAssertions())}_forceOneValidChildCheck(){return this._childBindings.some(e=>e.some(e=>e.isValid()))}_notifyValidityChange(e){this._parent&&this._parent.oneChildValidityChanged(e)||(this.updateAssertions(),this._childBindings.forEach(t=>t.forEach(t=>t.setAncestorValid(e))))}_isValidObjectValue(e,t){return("URI"!==this.getItem().getNodetype()||"uri"===t)&&super._isValidObjectValue(e)}}class hr extends cr{constructor(e){super(e),this._objectBinding=e.objectBinding}remove(){}setValue(e){this._objectBinding.setPredicate(e)}getValue(){return this._objectBinding.getPredicate()}isValid(){return!1}updateAssertions(){}}class fr extends _r{constructor(e){super(e);const{statement:t,constraints:n}=e;this._statement=void 0,this._validPredicate=!0,this._constraints=[];const r=this._item.getChildren(),a=r[1];let i;i=a instanceof An?new _r({item:a,statement:t,constraints:n}):a instanceof Cn?new cr({item:a,statement:t}):new ur({item:a,statement:t});const s=new hr({item:r[0],objectBinding:i});this.addChildBinding(s),this.addChildBinding(i)}getPredicateBinding(){return this._childBindings[0][0]}getObjectBinding(){return this._childBindings[1][0]}getGraph(){return this.getObjectBinding().getGraph()}}class mr extends ur{getValue(){return this._parent.getValue()}setValue(e){return this._parent.setValue(e)}getGist(){return this._parent.getGist()}setGist(e,t){return this._parent.setGist(e,t)}setSubject(e){}getPredicate(){return this._parent.getPredicate()}remove(){this._parent.removeChildBinding(this),super.remove(arguments)}updateAssertions(){}isValid(){return!0}}let pr,yr,gr,Mr,vr,Lr=!1;const Yr=(e,t,n)=>{const r=new _r({item:n,childrenRootUri:t,graph:e});return pr(r),Lr=!0,pr(r),Lr=!1,yr(r),r},br=(e,t,n,r)=>{const a=e.findProperties(t),i=[],s={};if(null!=r){const e=t=>{null!=t.getProperty()?s[t.getProperty()]=!0:t instanceof An&&t.getChildren().forEach(e)},t=t=>{null!=t&&(e(t),i.push(t))};r.forEach(e=>{let r=n.getItem(e);null!=r?r instanceof An&&null==r.getProperty()?r.getChildren().forEach(t):t(r):(r=n.getItemByProperty(e),r?t(r):console.warn(`Warning, when autodetecting a template: Required item '${e}' is neither an id for a loaded item or a property for a loaded item, ignoring.`))})}return a.forEach(e=>{if(s[e])return;const t=n.getItemByProperty(e);null!=t&&i.push(t)},void 0),n.createTemplateFromChildren(i)},wr=e=>Array.isArray(e.getDatatype())?e.getDatatype()[0]:e.getDatatype(),Tr=(e,t,n)=>t instanceof In?((e,t)=>{if(!t.getProperty()){const n=new mr({item:t,statement:null,matchingCode:Ir.OK});return e.addChildBinding(n),n}const n=e.getGraph(),r=t.getNodetype(),a={value:"",type:"literal"};"URI"===r?a.type="uri":"DATATYPE_LITERAL"===r&&(a.datatype=wr(t));const i=t.getValue();if(null!=i&&0===e.getChildBindingsFor(t).length){a.value=i;const e=t.getLanguage();null!=e&&(a.lang=e)}const s=n.create(e.getChildrenRootUri(),t.getProperty(),a,!1),o=new ur({item:t,statement:s});return e.addChildBinding(o),o})(e,t):t instanceof Pn?((e,t)=>{let n,r;const a=t.getChildren()[1],i=e.getGraph();a instanceof An?(n=i.create(e.getChildrenRootUri(),"",null,!1),r=vr(i,n.getSubject(),a)):n=a instanceof Cn?i.create(e.getChildrenRootUri(),"",{type:"uri",value:""},!1):i.create(e.getChildrenRootUri(),"",{type:"literal",value:""},!1);const s=new fr({item:t,statement:n,constraints:r});return e.addChildBinding(s),a instanceof An&&a.getChildren().forEach(e=>{Tr(s.getObjectBinding(),e)}),s})(e,t):t instanceof An?((e,t,n)=>{let r,a;if(void 0!==t.getProperty()){const n=e.getGraph();r=(t.getNodetype(),n.create(e.getChildrenRootUri(),t.getProperty(),null,!1)),a=vr(n,r.getValue(),t)}const i=new _r({item:t,statement:r,constraints:a});e.addChildBinding(i);const s=t._source["@id"];if(s){if(n[s])return i;n[s]=!0}return i})(e,t,n||{}):t instanceof Cn?((e,t)=>{const n=e.getGraph(),r=t.getNodetype(),a={type:"literal",value:""};"DATATYPE_LITERAL"===r?a.datatype=wr(t):"RESOURCE"!==r&&"URI"!==r||(a.type="uri");const i=n.create(e.getChildrenRootUri(),t.getProperty(),a,!1),s=new cr({item:t,statement:i});e.addChildBinding(s);const o=t.getValue(),u=s.getCardinalityTracker();return null!=o&&1===u.getCounter()&&s.setChoice(jr(t,o,n),!0),s})(e,t):void 0;let kr,Dr,Sr,xr,jr,Or;pr=e=>{Lr&&e.getChildBindings().forEach(e=>{"group"===e.getItem().getType()&&pr(e)}),e.getItem().getChildren().forEach(t=>{Lr?void 0!==t.getProperty()&&kr(e,t):kr(e,t)})};kr=(e,t)=>{t instanceof Cn?((e,t)=>{if(null==t.getProperty())return;const n=[];e.getGraph().find(e.getChildrenRootUri(),t.getProperty()).forEach(e=>{if(gr(e)){const r=Dr(t,e),a=Sr(t,e),i=xr(t,e);if(r&&a&&i||Lr){const s=jr(t,e.getValue(),e.getGraph());if(void 0!==s){Mr(e);let o=r?Ir.OK:Ir.WRONG_NODETYPE;a?i?s.mismatch&&(o=Ir.WRONG_VALUE):o=Ir.WRONG_PATTERN:o=Ir.WRONG_DATATYPE,n.push(new cr({item:t,statement:e,choice:s,matchingCode:o}))}}}}),n.length>0&&e.addChildBindings(n)})(e,t):t instanceof Pn?((e,t)=>{const n=t.getPropertyItem(),r=t.getObjectItem(),a=e.getGraph();let i,s,o,u;const d=[];a.find(e.getChildrenRootUri()).forEach(e=>{gr(e)&&Dr(r,e)&&xr(r,e)&&(o=jr(n,e.getPredicate(),e.getGraph()),void 0!==o&&(s=null,r instanceof An?(i=Or(a,e.getValue(),r),void 0!==i&&(Mr(e),s=new fr({item:t,statement:e,constraints:i}),pr(s.getObjectBinding()))):r instanceof Cn?(u=jr(r,e.getValue(),e.getGraph()),void 0!==u&&(Mr(e),s=new fr({item:t,statement:e}),s.getObjectBinding().setChoice(u))):(Mr(e),s=new fr({item:t,statement:e})),null!==s&&(s.getPredicateBinding().setChoice(o),d.push(s))))}),d.length>0&&e.addChildBindings(d)})(e,t):t instanceof An?((e,t)=>{let n,r,a,i;const s=e.getGraph();void 0!==t.getProperty()?(n=s.find(e.getChildrenRootUri(),t.getProperty()),n.length>0&&(r=[],n.forEach(e=>{if(gr(e)){const n=xr(t,e),o=Dr(t,e);if((n&&o||Lr)&&(a=Or(s,e.getValue(),t),void 0!==a||Lr)){let s=o?Ir.OK:Ir.WRONG_NODETYPE;n?void 0===a&&(s=Ir.MISSING_CONSTRAINTS):s=Ir.WRONG_PATTERN,Mr(e),i=new _r({item:t,statement:e,constraints:a,matchingCode:s}),r.push(i),s===Ir.OK&&pr(i)}}}),e.addChildBindings(r))):(i=new _r({item:t}),e.addChildBindings([i]),pr(i))})(e,t):t instanceof In&&((e,t)=>{const n=[];null==t.getProperty()?n.push(new mr({item:t,statement:null,matchingCode:Ir.OK})):e.getGraph().find(e.getChildrenRootUri(),t.getProperty()).forEach(e=>{if(gr(e)&&xr(t,e)){const r=Dr(t,e),a=Sr(t,e);if(r&&(a||t.hasStyle("relaxedDatatypeMatch"))||Lr){Mr(e);let i=r?Ir.OK:Ir.WRONG_NODETYPE;a||(i=Ir.WRONG_DATATYPE),n.push(new ur({item:t,statement:e,matchingCode:i}))}}}),n.length>0&&e.addChildBindings(n)})(e,t)},Dr=(e,t)=>{const n=t.getType();switch(e.getNodetype()){case"LITERAL":case"ONLY_LITERAL":case"PLAIN_LITERAL":case"LANGUAGE_LITERAL":case"DATATYPE_LITERAL":return"literal"===n;case"RESOURCE":return"uri"===n||"bnode"===n;case"URI":return"uri"===n;case"BLANK":return"bnode"===n}return!1},Sr=(e,t)=>{const n="DATATYPE_LITERAL"===e.getNodetype()&&e.getDatatype()||null;return null==n||(Array.isArray(n)?-1!==n.indexOf(t.getDatatype()):t.getDatatype()===n)},xr=(e,t)=>{const n=e.getPattern(),r=jn.extractGist(t.getValue(),e.getValueTemplate());if(void 0!==n)try{return new RegExp(`^${n}$`).test(r)}catch(e){return!0}return!0},Or=(e,t,n)=>{let r;const a=n.getConstraints(),i=[],s=(n,a)=>{if(r=e.find(t,n,{type:"uri",value:a}),1!==r.length)return!1;i.push(r[0])};if("object"==typeof a&&null!==a){const e=Object.keys(a);for(let t=0;t<e.length;t++){const n=e[t],r=a[n];if(r instanceof Array){let e=!0;if(r.forEach(t=>{!1!==s(n,t)&&(e=!1)}),e)return}else if(!1===s(n,r))return}return i}return[]},vr=(e,t,n)=>{const r=[],a=n.getConstraints();return"object"==typeof a&&null!==a&&Object.keys(a).forEach(n=>{const i=a[n];Array.isArray(i)?r.push(e.create(t,n,{type:"uri",value:i[0]},!1)):r.push(e.create(t,n,{type:"uri",value:i},!1))}),r},jr=(e,t,n)=>{let r,a;if(e.hasChoices()){for(a=e.getChoices(),r=0;r<a.length;r++)if(a[r].value===t)return a[r];if(!e.hasStyle("strictmatch")||Lr)return{value:t,label:{"":t},mismatch:!0}}else{let r=jn.getLocalizedMap(n,t,e.getLabelProperties());null==r&&Lr&&(r={"":t,mismatch:!0});const a=n.findFirstValue(t,cr.seeAlso);if(null!=r){const e={label:r,value:t};return a&&(e.seeAlso=a),e}if(null!=Dn.getChoice)return Dn.getChoice(e,t,a,n)}},Mr=e=>{e._dibbs=!0},gr=e=>!0!==e._dibbs,yr=e=>{let t,n,r;const a=e.getItemGroupedChildBindings()||[];for(t=0;t<a.length;t++)for(r=a[t],n=0;n<r.length;n++){const e=r[n];e._statement&&delete e._statement._dibbs,(e instanceof _r||e instanceof fr)&&yr(e)}};const Er=(e,t)=>{if(e instanceof ur)return e;const n=e.getItemGroupedChildBindings(),r=O.a.locale();for(let a=0;a<n.length;a++){const i=n[a],s=e.getItem().getChildren()[a];if(0!==i.length){if(!(s instanceof In))return Er(i[0]);if("LANGUAGE_LITERAL"===s.getNodetype()){const e={firstValue:i[0]};for(let t=0;t<i.length;t++){const n=i[t].getLanguage();null==n?e.emptyLanguageValue=i[t]:n===r?e.perfectLocaleLanguageValue=i[t]:n.substring(0,1)===r.substring(0,1)?e.localeLanguageValue=i[t]:-1!==n.indexOf("en")?e.defaultLanguageValue=i[t]:e.anyLanguageValue=i[t]}return e.perfectLocaleLanguageValue||e.localeLanguageValue||e.defaultLanguageValue||e.anyLanguageValue||e.firstValue}return i[0]}if(t){const t=Tr(e,s,{});return t instanceof ur?(t.setLanguage(r),t):Er(t,!0)}}},Hr=(e,t)=>{const n="/"===t[0]?t.slice(1):t,r=e.getItemGroupedChildBindings(),a=n[0];for(let e=0;e<r.length;e++){const t=r[e];let i;for(let e=0;e<t.length;e++){let r=t[e],s=r.getItem();if(s instanceof Cn&&void 0===s.getProperty()&&a===s.getId()&&2===n.length&&n[1]===r.getValue())return r;if(r.isValid()){if("propertygroup"===s.getType())r=r.getObjectBinding(),s=r.getItem();else if(void 0===s.getProperty()&&(i=Hr(r,n),i))return i;if("*"===a||a===r.getPredicate())if("group"===s.getType()){if(i=Hr(r,n.slice(1)),i)return i}else if(1===n.length||"*"===n[1]||n[1]===r.getValue())return r}}}},Ar=(e,t)=>{const n=t[0];let r=e;if("/"===n){for(;r.getParent();)r=r.getParent();return r}if(".."===n){for(let e=0;e<t.length;e++){if(".."!==t[e]||!r.getParent())return r;r=r.getParent()}return r}return e},Pr=(e,t,n)=>{const r=t.getCardinality();return n&&"group"===t.getType()||(null!=r?r.min>0?e.mandatory+=1:r.pref>0?e.recommended+=1:e.optional+=1:e.optional+=1),"group"===t.getType()&&t.getChildren().forEach(t=>Pr(e,t)),e},Ir={UNKNOWN:"unknown",OK:"correct",TOO_FEW_VALUES:"few",TOO_FEW_VALUES_MIN:"min",TOO_FEW_VALUES_PREF:"pref",TOO_MANY_VALUES:"many",AT_MOST_ONE_CHILD:"atmostonechild",AT_LEAST_ONE_CHILD:"atleastonechild",EXACTLY_ONE_CHILD:"exactlyonechild",WRONG_VALUE:"value",WRONG_PATTERN:"pattern",WRONG_NODETYPE:"nodetype",WRONG_DATATYPE:"datatype",MISSING_LANGUAGE:"language",MISSING_CONSTRAINTS:"constraints"};var Nr={detectLevel:e=>{if(e.mandatory>0){if(0===e.recommended&&0===e.optional)return"mandatory";if(0===e.optional)return"mixed_mandatory_recommended";if(0===e.recommended)return"mixed_mandatory_optional"}else{if(e.recommended>0)return 0===e.optional?"recommended":"mixed_recommended_optional";if(0===e.recommended&&e.recommended>0&&0===e.optional)return"optional"}return"mixed_all"},levelProfile:e=>{const t=Pr({mandatory:0,recommended:0,optional:0},e,!0);return t.itemCount=t.mandatory+t.recommended+t.optional,t},findFirstValueBinding:Er,create:Tr,constructTemplate:br,findPopularChoice:(e,t)=>{const n=e.getId(),r={},a={};e.getChoices().forEach(e=>{r[e.value]=0,a[e.value]=e});t.getChildBindings().forEach(e=>{const t=e.getItem().getDeps();if(t&&(t[0]===n||"/"===t[0]&&t[1]===n)){const e="/"===t[0]?t[2]:t[1],n=r[e];void 0!==n&&(r[e]=n+1)}});let i,s=0;return Object.keys(r).forEach(e=>{(!i||r[e]>s)&&(i=e,s=r[e])}),a[i]},match:(e,t,n)=>{const r=new _r({item:n,childrenRootUri:t,graph:e});return pr(r),yr(r),r},fuzzyMatch:Yr,matchPathBelowBinding:Hr,findBindingRelativeToParentBinding:Ar,CODES:Ir};class Cr{constructor(e){this.automaticSortAllowed=!0,this.ignoreMissingItems=!0,this._bundles=[],this._registry={},this._registryByProperty={},this._ontologyStore=e||new rr}getTemplate(e){return this.getItem(e)}getChildren(e,t){if(null==e)return[];const n=e.getSource(!0),r=n.content||n.items||[];if(t)return this._createItems(r,e._forceChildrenClones,e.getBundle());const a=this.getItem(n.extends);return a?a.getChildren().concat(e.getChildren(!0)):e.getChildren(!0)}getItem(e){if(null!=e)return this._registry[e]}getItems(){return Object.keys(this._registry).map(e=>this._registry[e])}renameItem(e,t){if(this._registry[t])throw new Error(`Cannot rename to ${t} since an item with that id already exists.`);if(""===t||null===t)throw new Error("Cannot give an item an empty string or null as id.");const n=this._registry[e];n&&(delete this._registry[e],this._registry[t]=n,n.setId(t));const r=n=>{const a=n.content;if(a)for(let n=0;n<a.length;n++){const i=a[n];i.id!==e&&i["@id"]!==e||(i.id=t,delete i["@id"]),i.content&&r(i)}},a=this.getItems();for(let e=0;e<a.length;e++){const t=a[e];t instanceof An&&r(t._source)}}getItemIds(){return Object.keys(this._registry)}getItemByProperty(e){return this._registryByProperty[e]}detectTemplate(e,t,n){return br(e,t,this,n)}registerBundle(e){e.itemStore=this;const t=new ir(e);this._bundles.push(t),e.source&&e.source.namespaces&&c(e.source.namespaces);const n=e.source.templates||e.source.auxilliary;return n instanceof Array&&this._createItems(n,!1,t),"object"==typeof e.source.cachedChoices&&this._ontologyStore.importRegistry(e.source.cachedChoices),t}getBundles(){return this._bundles}createTemplate(e){return this.registerBundle({source:e}).getRoot()}createTemplateFromChildren(e){const t=(e||[]).map(e=>"string"==typeof e?this.getItem(e):e);return new An({source:{},children:t,itemStore:this})}setPriorities(e){this.priorities=e}createExtendedSource(e,t){const n=Object.assign(Object.assign({},e),t);return n._extendedSource=t,n.extends=null,delete n.children,n}createItem(e,t,n,r){let a;const i=e.id||e["@id"],s=e.type||e["@type"];if(e.extends){const t=this._registry[e.extends];if(null==t&&!this.ignoreMissingItems)throw new Error("Cannot find item to extend with id: "+e.extends);if(t){const n=this.createExtendedSource(t.getSource(),e);return this.createItem(n,!1,!1,r)}}if(null!=s){switch(s){case"text":a=new In({source:e,itemStore:this,bundle:r});break;case"choice":a=new Cn({source:e,itemStore:this,ontologyStore:this._ontologyStore,bundle:r});break;case"group":a=new An({source:e,children:null,itemStore:this,bundle:r});break;case"propertygroup":a=new Pn({source:e,children:null,itemStore:this,bundle:r})}return!0!==n&&(null!=e.property&&(this._registryByProperty[e.property]=a,this.priorities&&null!=this.priorities[e.property]&&(a.priority=this.priorities[e.property])),null!=i&&null==this._registry[i]&&(this._registry[i]=a,null!=r&&r.addItem(a))),a}if(null==i)throw new Error("Cannot create subitem, `type` for creating new or `id` for referencing external are required.");if(null==this._registry[i])throw new Error("Cannot find referenced subitem using identifier: "+i);if(!0===t||Object.keys(e).find(e=>"id"!==e&&"@id"!==e)){const t=Object.assign(Object.assign({},this._registry[i]._source),e);return this.createItem(t,!1,!0)}return this._registry[i]}removeItem(e,t){const n=e.getBundle();null!=n&&n.removeItem(e),null!=e.getId()&&delete this._registry[e.getId()];const r=e.getProperty();null!=r&&this._registryByProperty[r]===e&&delete this._registryByProperty[r]}_createItems(e,t,n){return e.map((r,a)=>{const i="string"==typeof r?e[a]={id:r}:r;return this.createItem(i,t,!1,n)})}}const Rr=(e,t,n)=>{const r=`Fetching template bundle ${n} failed.`;if(e===t-1)throw Error(r+" Cannot recover from this, please fix.");console.log(r+" Will try to fetch from a fallback option.")},Fr=e=>e.map(e=>e instanceof Array?(async e=>{const t=e.length;let n,r;for(let a=0;a<t;a++){try{n=await fetch(e[a])}catch(t){throw Error("A network error ocurred while trying to fetch bundle "+e[a])}if(n&&n.ok)try{const t=n.headers.has("content-type")&&n.headers.get("content-type");if(t&&t.includes("application/json")){r=await n.json();break}throw new Error(`Failed fetching template ${e[a]}. Expected a JSON file and got ${t}`)}catch(n){Rr(a,t,e[a])}else Rr(a,t,e[a])}return r})(e):Promise.resolve(e));var Wr=async(e,t=[],n=(()=>{}))=>{0===t.length&&n&&n([]);const r=Fr(t),a=((e,t=[])=>t.map(t=>e.registerBundle({source:t})))(e,await Promise.all(r));return n(a),a};const zr=(e,t)=>{let n=t;return null==n?n={errors:[],warnings:[],deprecated:[]}:(n.errors=n.errors||[],n.warnings=n.warnings||[],n.deprecated=n.deprecated||[]),Jr(e,n,!0)},Ur=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isValid()&&(t+=1);return t},Vr=(e,t)=>{if(e.length>0){e[0].getCardinalityTracker().setCode(t)}},Br=(e,t)=>{if(t.hasStyle("deprecated"))return!0;const n=t.getDeps();if(n){const t=Ar(e,n);if(!Hr(t,n))return!0}return!1},Jr=(e,t,n)=>{if(e.getMatchingCode()!==Ir.OK)return;const r=e.getItem();if(!0===n||e.isValid()||null==r.getProperty()||r.hasStyle("atLeastOneChild")||r.hasStyle("exactlyOneChild")){const n=r.getChildren();if(r.hasStyle("disjoint")||r.hasStyle("atMostOneChild")||r.hasStyle("atLeastOneChild")||r.hasStyle("exactlyOneChild")){const a=e.getChildBindings(),i=Ur(a);let s;i>1&&(r.hasStyle("disjoint")||r.hasStyle("atMostOneChild"))?s=Ir.AT_MOST_ONE_CHILD:1!==i&&r.hasStyle("exactlyOneChild")?s=Ir.EXACTLY_ONE_CHILD:0===i&&r.hasStyle("atLeastOneChild")&&(s=Ir.AT_LEAST_ONE_CHILD),s&&(Vr([e],s),n.length>0&&t.errors.push({parentBinding:e,item:n[0],code:s}))}else e.getItemGroupedChildBindings().forEach((r,a)=>{const i=n[a];if(!Br(e,i)&&null!=i.getProperty()){const n=Ur(r),a=i.getCardinality();null!=a.min&&a.min>n?(t.errors.push({parentBinding:e,item:i,code:Ir.TOO_FEW_VALUES_MIN}),Vr(r,Ir.TOO_FEW_VALUES_MIN)):null!=a.pref&&a.pref>n&&t.warnings.push({parentBinding:e,item:i,code:Ir.TOO_FEW_VALUES_PREF}),null!=a.max&&a.max<n&&(t.errors.push({parentBinding:e,item:i,code:Ir.TOO_MANY_VALUES}),Vr(r,Ir.TOO_MANY_VALUES))}},void 0);e.getChildBindings().forEach(n=>{const r=n.getItem();n.getMatchingCode()!==Ir.OK&&t.errors.push({parentBinding:n,item:r,code:n.getMatchingCode()}),r.hasStyle("deprecated")&&t.deprecated.push(n),Br(e,r)||"group"===r.getType()&&Jr(n,t)})}return t},Gr=(e,t)=>e.find(null,"rdf:type",t).map(e=>e.getSubject()),$r=(e,t,n)=>{let r=e;for(;;){const e=r.getChildrenRootUri?r.getChildrenRootUri():r.getParent().getChildrenRootUri();if(e===t)return!0;if(n[e])return!1;r=r.getParent()}},qr=(e,t)=>{let n=e;const r=[];for(null!=t.getProperty()&&n.getItem()!==t&&r.push(u(t.getProperty()));null!=n.getItem().getProperty()&&r.push(u(n.getItem().getProperty())),null!=n.getParent();)n=n.getParent();return r.reverse(),r.join(" > ")},Kr=e=>{const{errors:t,warnings:n,deprecated:r}=e;e.errors=t.map(e=>({path:qr(e.parentBinding,e.item),code:e.code})),e.warnings=n.map(e=>({path:qr(e.parentBinding,e.item),code:e.code})),e.deprecated=r.map(e=>(e=>`${qr(e.getParent(),e.getItem())} > ${e.getValue()}`)(e))},Zr=(e,t,n,r)=>{const a=Yr(t,e,n),i=zr(a);return((e,t,n)=>{const{errors:r,warnings:a,deprecated:i}=e;e.errors=r.filter(e=>$r(e.parentBinding,t,n)),e.warnings=a.filter(e=>$r(e.parentBinding,t,n)),e.deprecated=i.filter(e=>$r(e,t,n))})(i,e,r||{}),Kr(i),i};var Xr={graphReport:(e,t,n=[])=>{const r={},a={};let i,s;const o={errors:0,warnings:0,deprecated:0,resources:[]};Object.keys(t).forEach(t=>{const n=Gr(e,t);r[t]=n,n.forEach(e=>{a[e]=!0})}),Object.keys(r).forEach(n=>{i=t[n],r[n].forEach(t=>{s=Zr(t,e,i,a),s.uri=t,s.type=n,s.template=i.getId(),o.resources.push(s),o.errors+=s.errors.length,o.warnings+=s.warnings.length,o.deprecated+=s.deprecated.length})});const u=[];return n.forEach(e=>{0===r[e].length&&u.push(e)}),u.length>0&&(o.mandatoryError=u,o.errors+=u.length),o},bindingReport:zr};global.fetch=n(324).default}]);