cl-react-graph
Version:
2 lines • 15.2 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{355:function(t,n,e){var r=e(16);r(r.P,"Array",{fill:e(812)}),e(57)("fill")},417:function(t,n,e){"use strict";e(814);var r=e(7),i=e(134),o=e(25),u=/./.toString,a=function(t){e(26)(RegExp.prototype,"toString",t,!0)};e(24)(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?a(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=u.name&&a(function(){return u.call(this)})},597:function(t,n,e){"use strict";var r,i,o=e(273),u=e(652),a=0,s=0,c=0,l=1e3,f=0,h=0,p=0,v="object"==typeof performance&&performance.now?performance:Date,_="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function d(){return h||(_(w),h=v.now()+p)}function w(){h=0}function y(){this._call=this._time=this._next=null}function m(t,n,e){var r=new y;return r.restart(t,n,e),r}function g(){h=(f=v.now())+p,a=s=0;try{!function(){d(),++a;for(var t,n=r;n;)(t=h-n._time)>=0&&n._call.call(null,t),n=n._next;--a}()}finally{a=0,function(){var t,n,e=r,o=1/0;for(;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:r=n);i=t,x(o)}(),h=0}}function b(){var t=v.now(),n=t-f;n>l&&(p-=n,f=t)}function x(t){a||(s&&(s=clearTimeout(s)),t-h>24?(t<1/0&&(s=setTimeout(g,t-v.now()-p)),c&&(c=clearInterval(c))):(c||(f=v.now(),c=setInterval(b,l)),a=1,_(g)))}y.prototype=m.prototype={constructor:y,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?d():+e)+(null==n?0:+n),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=e,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}};var A=function(t,n,e){var r=new y;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},M=Object(u.a)("start","end","cancel","interrupt"),O=[],E=0,j=1,P=2,k=3,T=4,S=5,N=6,I=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var c,l,f,h;if(e.state!==j)return a();for(c in i)if((h=i[c]).name===e.name){if(h.state===k)return A(o);h.state===T?(h.state=N,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<n&&(h.state=N,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(A(function(){e.state===k&&(e.state=T,e.timer.restart(u,e.delay,e.time),u(s))}),e.state=P,e.on.call("start",t,t.__data__,e.index,e.group),e.state===P){for(e.state=k,r=new Array(f=e.tween.length),c=0,l=-1;c<f;++c)(h=e.tween[c].value.call(t,t.__data__,e.index,e.group))&&(r[++l]=h);r.length=l+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=S,1),o=-1,u=r.length;++o<u;)r[o].call(t,i);e.state===S&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=N,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=m(function(t){e.state=j,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)},0,e.time)}(t,e,{name:n,index:r,group:i,on:M,tween:O,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:E})};function z(t,n){var e=R(t,n);if(e.state>E)throw new Error("too late; already scheduled");return e}function C(t,n){var e=R(t,n);if(e.state>k)throw new Error("too late; already running");return e}function R(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var q=e(394);function F(t,n,e){var r=t._id;return t.each(function(){var t=C(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return R(t,r).value[n]}}var J=e(403),D=function(t,n){var e;return("number"==typeof n?q.b:n instanceof J.a?q.c:(e=Object(J.a)(n))?(n=e,q.c):q.e)(t,n)};var B=o.e.prototype.constructor;function G(t){return function(){this.style.removeProperty(t)}}var H=0;function K(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function L(){return++H}var Q=o.e.prototype;K.prototype=function(t){return Object(o.e)().transition(t)}.prototype={constructor:K,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(o.f)(t));for(var r=this._groups,i=r.length,u=new Array(i),a=0;a<i;++a)for(var s,c,l=r[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p])&&(c=t.call(s,s.__data__,p,l))&&("__data__"in s&&(c.__data__=s.__data__),h[p]=c,I(h[p],n,e,p,h,R(s,e)));return new K(u,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(o.g)(t));for(var r=this._groups,i=r.length,u=[],a=[],s=0;s<i;++s)for(var c,l=r[s],f=l.length,h=0;h<f;++h)if(c=l[h]){for(var p,v=t.call(c,c.__data__,h,l),_=R(c,e),d=0,w=v.length;d<w;++d)(p=v[d])&&I(p,n,e,d,v,_);u.push(v),a.push(c)}return new K(u,a,n,e)},filter:function(t){"function"!=typeof t&&(t=Object(o.b)(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,a=n[i],s=a.length,c=r[i]=[],l=0;l<s;++l)(u=a[l])&&t.call(u,u.__data__,l,a)&&c.push(u);return new K(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,c=n[a],l=e[a],f=c.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=c[p]||l[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new K(u,this._parents,this._name,this._id)},selection:function(){return new B(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=L(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,c=0;c<s;++c)if(u=a[c]){var l=R(u,n);I(u,t,e,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new K(r,this._parents,t,e)},call:Q.call,nodes:Q.nodes,node:Q.node,size:Q.size,empty:Q.empty,each:Q.each,on:function(t,n){var e=this._id;return arguments.length<2?R(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?z:C;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,n){var e=Object(o.c)(t),r="transform"===e?q.g:D;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}})(e,r,F(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}})(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=Object(o.c)(t);return this.tween(e,(r.local?function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n(e))}}(t,i)),e}return i._value=n,i}:function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n(e))}}(t,i)),e}return i._value=n,i})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?q.f:D;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var u=Object(o.h)(this,t),a=(this.style.removeProperty(t),Object(o.h)(this,t));return u===a?null:u===e&&a===r?i:i=n(e=u,r=a)}}(t,r)).on("end.style."+t,G(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,u;return function(){var a=Object(o.h)(this,t),s=e(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Object(o.h)(this,t)),a===c?null:a===r&&c===i?u:(i=c,u=n(r=a,s))}}(t,r,F(this,"style."+t,n))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=C(this,t),c=s.on,l=null==s.value[u]?o||(o=G(n)):void 0;c===e&&i===l||(r=(e=c).copy()).on(a,i=l),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,u=e+"";return function(){var a=Object(o.h)(this,t);return a===u?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n(r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(F(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=R(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?function(t,n){var e,r;return function(){var i=C(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}:function(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=C(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,c=i.length;s<c;++s)if(i[s].name===n){i[s]=a;break}s===c&&i.push(a)}o.tween=i}})(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){z(this,t).delay=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){z(this,t).delay=n}})(n,t)):R(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){C(this,t).duration=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){C(this,t).duration=n}})(n,t)):R(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){C(this,t).ease=n}}(n,t)):R(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,u){var a={value:u},s={value:function(){0==--i&&o()}};e.each(function(){var e=C(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),e.on=n})})}};(function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e})(3),function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Math.PI;(function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e})(1.70158),function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158);var U=2*Math.PI,V=(function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=U);function i(t){return n*Math.pow(2,10*--t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*U)},i.period=function(e){return t(n,e)},i}(1,.3),function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=U);function i(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*U)},i.period=function(e){return t(n,e)},i}(1,.3),function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=U);function i(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((r-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*U)},i.period=function(e){return t(n,e)},i}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});function W(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return V.time=d(),V;return e}o.e.prototype.interrupt=function(t){return this.each(function(){!function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>P&&e.state<S,e.state=N,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}}(this,t)})},o.e.prototype.transition=function(t){var n,e;t instanceof K?(n=t._id,t=t._name):(n=L(),(e=V).time=d(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,c=0;c<s;++c)(u=a[c])&&I(u,t,n,c,a,e||W(u,n));return new K(r,this._parents,t,n)}},652:function(t,n,e){"use strict";var r={value:function(){}};function i(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new o(r)}function o(t){this._=t}function u(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function a(t,n,e){for(var i=0,o=t.length;i<o;++i)if(t[i].name===n){t[i]=r,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=e&&t.push({name:n,value:e}),t}o.prototype=i.prototype={constructor:o,on:function(t,n){var e,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");if(e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})),s=-1,c=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++s<c;)if(e=(t=o[s]).type)i[e]=a(i[e],t.name,n);else if(null==n)for(e in i)i[e]=a(i[e],t.name,null);return this}for(;++s<c;)if((e=(t=o[s]).type)&&(e=u(i[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new o(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var s=i;e.d(n,"a",function(){return s})},812:function(t,n,e){"use strict";var r=e(40),i=e(145),o=e(20);t.exports=function(t){for(var n=r(this),e=o(n.length),u=arguments.length,a=i(u>1?arguments[1]:void 0,e),s=u>2?arguments[2]:void 0,c=void 0===s?e:i(s,e);c>a;)n[a++]=t;return n}},814:function(t,n,e){e(25)&&"g"!=/./g.flags&&e(39).f(RegExp.prototype,"flags",{configurable:!0,get:e(134)})}}]);
//# sourceMappingURL=3-0fcb52a3c4b2b23415c8.js.map