graphdb-workbench
Version:
The web application for GraphDB APIs
2 lines • 5.46 kB
JavaScript
export const __webpack_id__=49342;export const __webpack_ids__=[49342];export const __webpack_modules__={19935:(t,n,e)=>{e.d(n,{A:()=>u}),e(62979);var o=e(93462);const r={dispatch:o.dispatch,pointer:o.pointer};var i=i||{};i.Text=function(){function t(t,n,e,o){e=e||10;var r=n/3;return"string"==typeof t?(r*=10/(t.substring(0,n/3).length+1.5),r+=1,t.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(r*=.6),r<e&&(r=e),Math.round(r)):(r<e&&(r=e),Math.round(r))}return{calcFontSizeRaw:t,calcFontSize:function(n,e,o,r){return t(n,e,o)+"px"},getTextWithElipsisIfNeeded:function(t,n){return"string"==typeof t&&t.length>n?t.substring(0,n-3)+"...":t}}}(),i.Transition={fadeIn:function(t,n){t.style("opacity",0).transition().duration(n).style("opacity",1)},fadeOut:function(t,n){t.style("opacity",1).transition().duration(n).style("opacity",0)}},i.Click=function(){function t(t,n,e){return function(){var o=e.apply(n,arguments);return o===n?t:o}}return{delayDblClick:function(){var n=r.dispatch("click","dblclick");return function(n,e){let o,r=1,i=arguments.length;for(;++r<i;)o=arguments[r],n[o]=t(n,e,e[o]);return n}(function(t){var e,o=null;t.on("mousedown",function(){e=r.pointer(document.body),new Date}),t.on("mouseup",function(t,i){var u,c,l;c=e,l=r.pointer(document.body),Math.sqrt(Math.pow(c[0]-l[0],2),Math.pow(c[1]-l[1],2))>5||(o?(window.clearTimeout(o),o=null,n.call("dblclick",t,t,i)):o=window.setTimeout((u=t,function(){n.call("click",u,u,i),o=null}),250))})},n,"on")}}}();const u=i},62979:(t,n,e)=>{var o,r;o=[e(93462)],void 0===(r=function(t){function n(t,n){return t.each(function(){var t=n.apply(this,arguments),e=select(this);for(var o in t)e.attr(o,t[o])})}function o(t,n){for(var e in n)t.attr(e,n[e]);return t}return void 0===t&&(t=e(93462)),t.selection.prototype.attrs=function(t){return("function"==typeof t?n:o)(this,t)},t.selection.prototype.moveToFront=function(){return this.each(function(){t.select(this.parentNode.appendChild(this))})},t.selection.prototype.moveToBack=function(){return this.each(function(){const t=this.parentNode.firstChild;t&&this.parentNode.insertBefore(this,t)})},t}.apply(n,o))||(t.exports=r)},75468:(t,n,e)=>{e.d(n,{A:()=>i});var o=e(93462);const r={select:o.select,selection:o.selection},i=function(){var t=function(){return"n"},n=function(){return[0,0]},e=function(){return" "},o=p(),i=null,u=null,c=null,l=null;function s(t){var n;i="svg"===(n=(n=t).node()).tagName.toLowerCase()?n:n.ownerSVGElement,u=i.createSVGPoint(),document.body.appendChild(o)}s.show=function(){var o=Array.prototype.slice.call(arguments);o[o.length-1]instanceof SVGElement&&(c=o.pop());var r,i=e.apply(this,o),u=n.apply(this,o),p=t.apply(this,o),d=y(),h=f.length,m=document.documentElement.scrollTop||document.body.scrollTop,v=document.documentElement.scrollLeft||document.body.scrollLeft,x=l.apply(this,o);for(d.html(i).style("opacity",1).style("pointer-events","all");h--;)d.classed(f[h],!1);const g=o.filter(t=>t instanceof Event);return r=a.get(p).apply(this,g),x?Object.keys(x).forEach(function(t){d.style(t,x[t])}):d.classed(p,!0).style("top",r.top+u[0]+m+"px").style("left",r.left+u[1]+v+"px"),s},s.hide=function(){return y().style("opacity",0).style("pointer-events","none"),s},s.attr=function(t,n){if(arguments.length<2&&"string"==typeof t)return y().attr(t);var e=Array.prototype.slice.call(arguments);return r.selection.prototype.attr.apply(y(),e),s},s.style=function(t,n){if(arguments.length<2&&"string"==typeof t)return y().style(t);var e=Array.prototype.slice.call(arguments);return r.selection.prototype.style.apply(y(),e),s},s.direction=function(n){return arguments.length?(t=null==n?n:h(n),s):t},s.offset=function(t){return arguments.length?(n=null==t?t:h(t),s):n},s.html=function(t){return arguments.length?(e=null==t?t:h(t),s):e},s.customPosition=function(t){return arguments.length?(l=null==t?t:h(t),s):l},s.destroy=function(){return o&&(y().remove(),o=null),s};var a=new Map(Object.entries({n:function(t){var n=d(t);return{top:n.n.y-o.offsetHeight,left:n.n.x-o.offsetWidth/2}},s:function(t){var n=d(t);return{top:n.s.y,left:n.s.x-o.offsetWidth/2}},e:function(t){var n=d(t);return{top:n.e.y-o.offsetHeight/2,left:n.e.x}},w:function(t){var n=d(t);return{top:n.w.y-o.offsetHeight/2,left:n.w.x-o.offsetWidth}},nw:function(t){var n=d(t);return{top:n.nw.y-o.offsetHeight,left:n.nw.x-o.offsetWidth}},ne:function(t){var n=d(t);return{top:n.ne.y-o.offsetHeight,left:n.ne.x}},sw:function(t){var n=d(t);return{top:n.sw.y,left:n.sw.x-o.offsetWidth}},se:function(t){var n=d(t);return{top:n.se.y,left:n.e.x}}})),f=a.keys();function p(){var t=r.select(document.createElement("div"));return t.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function y(){return null===o&&(o=p(),document.body.appendChild(o)),r.select(o)}function d(t){for(var n=c||t.target;void 0===n.getScreenCTM&&"undefined"===n.parentNode;)n=n.parentNode;var e={},o=n.getScreenCTM(),r=n.getBBox(),i=r.width,l=r.height,s=r.x,a=r.y;return u.x=s,u.y=a,e.nw=u.matrixTransform(o),u.x+=i,e.ne=u.matrixTransform(o),u.y+=l,e.se=u.matrixTransform(o),u.x-=i,e.sw=u.matrixTransform(o),u.y-=l/2,e.w=u.matrixTransform(o),u.x+=i,e.e=u.matrixTransform(o),u.x-=i/2,u.y-=l/2,e.n=u.matrixTransform(o),u.y+=l,e.s=u.matrixTransform(o),e}function h(t){return"function"==typeof t?t:function(){return t}}return s}}};
//# sourceMappingURL=49342.d6de345f77e42e086e62.bundle.js.map