"use strict";var data,graph,_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function getLabelAttribute(e){if(void 0!==e["https://schema.org/name"])return"https://schema.org/name";switch(e["@type"]){case"https://schema.org/WebSite":if(void 0!==e["https://schema.org/url"])return"https://schema.org/url";break;case"https://schema.org/ImageObject":if(void 0!==e["https://schema.org/caption"])return"https://schema.org/caption";if(void 0!==e["https://schema.org/contentUrl"])return"https://schema.org/contentUrl";break;case"https://schema.org/PostalAddress":if(void 0!==e["https://schema.org/addressLocality"])return"https://schema.org/addressLocality"}return"@id"}function getNodeLabel(e){var t=e[getLabelAttribute(e)];return void 0===t&&(t=e["@id"]),void 0===t&&(t=""),t}function getNodeYear(e){return void 0!==e["https://schema.org/dateCreated"]?e["https://schema.org/dateCreated"].substr(0,4):void 0!==e["https://schema.org/datePublished"]?e["https://schema.org/datePublished"].substr(0,4):void 0!==e["https://schema.org/startDate"]?(console.log(e["https://schema.org/startDate"]),e["https://schema.org/startDate"].substr(0,4)):void 0!==e["https://schema.org/endDate"]?e["https://schema.org/endDate"].substr(0,4):void 0!==e["https://schema.org/foundingDate"]?e["https://schema.org/foundingDate"].substr(0,4):void 0!==e["https://schema.org/temporalCoverage"]&&e["https://schema.org/temporalCoverage"].match(/\d{4}-\d{4}/)?e["https://schema.org/temporalCoverage"].substr(5,4):null}function getDisplayAttr(e){return e.replace(/.*[#|\/]/,"")}function jsonLdToGraph(e){var t={},r=[];for(var n in e)t[e[n]["@id"]]=e[n];for(var a in e){var o=e[a],i=o["@id"];for(var s in o){var d=Array.isArray(o[s])?o[s]:[o[s]];for(var c in d)"@id"!==s&&"string"==typeof d[c]&&t[d[c]]?r[r.length]={source:i,target:d[c],name:s}:void 0!==d[c]["@id"]&&(1==Object.keys(d[c]).length&&void 0===t[d[c]["@id"]]||(r[r.length]={source:i,target:d[c]["@id"],name:s}))}}return{nodes:Object.values(t),links:r}}var nodeMap={},linkMap={},breadcrumbs={},requestPromise=fetch("/assets/js/rubenvandeven.jsonld").then(function(e){return e.json()}).then(function(e){for(var t in(graph=jsonLdToGraph(e["@graph"])).nodes)nodeMap[graph.nodes[t]["@id"]]=graph.nodes[t];startGraph(graph)});function inCircle(e,t,r){var n=Math.abs(e),a=Math.abs(t);return!(r"+getNodeYear(r)+""),n.classList.add("nodeTitle"),n.classList.add("nodeTitleNr"+e),n.addEventListener("click",function(e){var t=z.nodes.indexOf(r);q(t)});var a=document.createElement("a");return a.classList.add("nodeType"),a.innerHTML=getDisplayAttr(r["@type"]),a.title=r["@type"],a.addEventListener("click",function(e){U(r["@type"])}),t.appendChild(n),t.appendChild(a),t},q=function(n,e){void 0===e&&(e=!0);var a=null,i=null;if(B.each(function(e,t,r){t==n&&(a=r[n],i=e)}),a){var t=null;t=i["@id"].startsWith("https://rubenvandeven.com/")?i["@id"].substr(26):"?id="+i["@id"],e?history.pushState({node:n},getNodeLabel(i),"/"+t):history.replaceState({node:n},getNodeLabel(i),"/"+t),L(n);var s=breadcrumbs[i["@id"]].slice();s[s.length]=i["@id"];var d=[];g.each(function(n,e,t,r){n.source==i||n.target==i?(t[e].classList.add("activeLink","visibleLink"),t[e].getElementsByTagName("line")[0].setAttribute("marker-end","url(#arrowHeadSelected)"),B.filter(function(e,t){var r=e["@id"]==n.source["@id"]||e["@id"]==n.target["@id"];return r&&-1===d.indexOf(t)&&(d[d.length]=t),r}).classed("visibleNode",!0)):(t[e].classList.remove("activeLink"),t[e].getElementsByTagName("line")[0].setAttribute("marker-end","url(#arrowHead)"));var a=s.indexOf(n.source["@id"]),o=s.indexOf(n.target["@id"]);-1"+n+""),e.appendChild(t),i.appendChild(e),a.push(getNodeLabel(nodeMap[r]))},d=!0,c=!1,l=void 0;try{for(var u,h=breadcrumbs[t["@id"]][Symbol.iterator]();!(d=(u=h.next()).done);d=!0)s(u.value)}catch(e){c=!0,l=e}finally{try{!d&&h.return&&h.return()}finally{if(c)throw l}}Y.appendChild(i),a.push(getNodeLabel(t));var m=getLabelAttribute(t),p=document.createElement("h2");p.innerHTML=getNodeLabel(t);var f=document.createElement("span");f.classList.add("nodeType"),f.innerHTML=getDisplayAttr(t["@type"]),f.title=t["@type"],f.addEventListener("click",function(e){U(t["@type"])}),p.appendChild(f),Y.appendChild(p);var g=document.createElement("dl"),v=["@id","x","y","index","@type","vy","vx","fx","fy","leftX","rightX"];for(var y in"https://schema.org/contentUrl"!==m&&(v[v.length]=m),t)if(-1==v.indexOf(y)){var b=Array.isArray(t[y])?t[y]:[t[y]];for(var L in b)if(("string"!=typeof b[L]||!nodeMap[b[L]])&&void 0===b[L]["@id"])if("https://schema.org/url"==y||"http://www.w3.org/2000/01/rdf-schema#seeAlso"==y)g.innerHTML+="
"+getDisplayAttr(y)+"
"+b[L]+"
";else if("https://schema.org/embedUrl"==y)g.innerHTML+="
"+getDisplayAttr(y)+"
"+b[L]+"
",g.innerHTML+="
";else if("https://schema.org/contentUrl"==y)if(g.innerHTML+="
"+getDisplayAttr(y)+"
"+b[L]+"
","https://schema.org/VideoObject"==t["@type"]){var x=b["https://schema.org/encodingFormat"]?"type='"+b["https://schema.org/encodingFormat"]+"'":"",M=b["https://schema.org/thumbnailUrl"]?"poster='"+b["https://schema.org/thumbnailUrl"]+"'":"";g.innerHTML+="
"}else g.innerHTML+="
";else{var w=b[L].replace(/\n/g,"
");g.innerHTML+="
"+getDisplayAttr(y)+"
"+w+"
"}}Y.appendChild(g);for(var A=document.createElement("dl"),N=0;N"}else D.innerHTML="";A.appendChild(D)}}}for(var H in e){var j=document.createElement("dt");for(var X in j.innerHTML=getDisplayAttr(H),A.appendChild(j),e[H]){var I=e[H][X];if(A.appendChild(R(I,X)),void 0!==I["https://schema.org/contentUrl"]){var P=document.createElement("dd");P.classList.add("dd-contentobject"),P.innerHTML="",A.appendChild(P)}}}Y.appendChild(A),B.each(function(e,t,r){t==n?r[t].classList.add("selectedNode"):r[t].classList.remove("selectedNode")}),document.title=a.join(" :: ")}(i,n)}},M=function(){L(null),g.each(function(e,t,r,n){r[t].classList.remove("activeLink"),r[t].classList.remove("breadcrumbLink"),r[t].getElementsByTagName("line")[0].setAttribute("marker-end","url(#arrowHead)")}),document.body.classList.remove("detailsOpen"),scrollToY(0,4e3)};window.addEventListener("popstate",function(e){if(e.state.hasOwnProperty("node"))q(e.state.node,!1);else{var t=z.nodes.find(function(e){return e["@id"]===firstNodeId});q(z.nodes.indexOf(t),!1)}});var w=function(){var e=b(),t=A();u=e[0]+e[2]/2-t.dx,h=e[1]+e[3]/2-t.dy},A=function(){var e=document.getElementById("container"),t=0,r=0,n=1;if(02*getSizeForNode(e)&&n.attr("transform","scale("+2*getSizeForNode(e)/r/1.05+")")}),B.each(function(e){e["https://schema.org/thumbnailUrl"]&&d3.select(this).append("svg:image").attr("xlink:href",e["https://schema.org/thumbnailUrl"]).attr("width",function(e){return 2*getSizeForNode(e)}).attr("height",function(e){return 2*getSizeForNode(e)}).attr("transform",function(e){return"translate(-"+getSizeForNode(e)+" -"+getSizeForNode(e)+")"}).attr("clip-path","url(#clipNodeImage)").attr("preserveAspectRatio","xMidYMid slice")}),f.nodes(z.nodes).on("tick",function(){z.nodes.forEach(function(e,t){e.leftX=e.rightX=e.x}),v.each(function(e){var t,r,n,a,o,i;e.source.rightXe.target.rightX?n=e.target.rightX:n>e.source.rightX?n=e.source.rightX:n