@daoyi/nmtl-ui 1.1.43-beta.66 → 1.1.43-beta.67
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t,{useEffect as n}from"react";import{c as r}from"./index-b2745105.js";import e from"prop-types";import{a,i,b as o,f as u,g as c,o as l,h as s,j as f,k as h,l as d,s as m}from"./ordinal-a8f387fb.js";import{s as g}from"./style-inject.es-1f59c1d0.js";function p(t,n,r){t=+t,n=+n,r=(a=arguments.length)<2?(n=t,t=0,1):a<3?1:+r;for(var e=-1,a=0|Math.max(0,Math.ceil((n-t)/r)),i=new Array(a);++e<a;)i[e]=t+e*r;return i}var v=Math.sqrt(50),M=Math.sqrt(10),y=Math.sqrt(2);function b(t,n,r){var e=(n-t)/Math.max(0,r),a=Math.floor(Math.log(e)/Math.LN10),i=e/Math.pow(10,a);return a>=0?(i>=v?10:i>=M?5:i>=y?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=v?10:i>=M?5:i>=y?2:1)}var x=Array.prototype.slice;function w(t){return t}function k(t){return"translate("+(t+.5)+",0)"}function N(t){return"translate(0,"+(t+.5)+")"}function A(t){return function(n){return+t(n)}}function C(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(r){return+t(r)+n}}function S(){return!this.__axis}function j(t,n){var r=[],e=null,a=null,i=6,o=6,u=3,c=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",s=1===t||3===t?k:N;function f(f){var h=null==e?n.ticks?n.ticks.apply(n,r):n.domain():e,d=null==a?n.tickFormat?n.tickFormat.apply(n,r):w:a,m=Math.max(i,0)+u,g=n.range(),p=+g[0]+.5,v=+g[g.length-1]+.5,M=(n.bandwidth?C:A)(n.copy()),y=f.selection?f.selection():f,b=y.selectAll(".domain").data([null]),x=y.selectAll(".tick").data(h,n).order(),k=x.exit(),N=x.enter().append("g").attr("class","tick"),j=x.select("line"),z=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(N),j=j.merge(N.append("line").attr("stroke","currentColor").attr(l+"2",c*i)),z=z.merge(N.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==y&&(b=b.transition(f),x=x.transition(f),j=j.transition(f),z=z.transition(f),k=k.transition(f).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=M(t))?s(t):this.getAttribute("transform")})),N.attr("opacity",1e-6).attr("transform",(function(t){var n=this.parentNode.__axis;return s(n&&isFinite(n=n(t))?n:M(t))}))),k.remove(),b.attr("d",4===t||2==t?o?"M"+c*o+","+p+"H0.5V"+v+"H"+c*o:"M0.5,"+p+"V"+v:o?"M"+p+","+c*o+"V0.5H"+v+"V"+c*o:"M"+p+",0.5H"+v),x.attr("opacity",1).attr("transform",(function(t){return s(M(t))})),j.attr(l+"2",c*i),z.attr(l,c*m).text(d),y.filter(S).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),y.each((function(){this.__axis=M}))}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return r=x.call(arguments),f},f.tickArguments=function(t){return arguments.length?(r=null==t?[]:x.call(t),f):r.slice()},f.tickValues=function(t){return arguments.length?(e=null==t?null:x.call(t),f):e&&e.slice()},f.tickFormat=function(t){return arguments.length?(a=t,f):a},f.tickSize=function(t){return arguments.length?(i=o=+t,f):i},f.tickSizeInner=function(t){return arguments.length?(i=+t,f):i},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(u=+t,f):u},f}function z(t,n){n||(n=[]);var r,e=t?Math.min(n.length,t.length):0,a=n.slice();return function(i){for(r=0;r<e;++r)a[r]=t[r]*(1-i)+n[r]*i;return a}}function E(t,n){var r,e=n?n.length:0,a=t?Math.min(e,t.length):0,i=new Array(a),o=new Array(e);for(r=0;r<a;++r)i[r]=I(t[r],n[r]);for(;r<e;++r)o[r]=n[r];return function(t){for(r=0;r<a;++r)o[r]=i[r](t);return o}}function F(t,n){var r=new Date;return t=+t,n=+n,function(e){return r.setTime(t*(1-e)+n*e),r}}function _(t,n){var r,e={},a={};for(r in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)r in t?e[r]=I(t[r],n[r]):a[r]=n[r];return function(t){for(r in e)a[r]=e[r](t);return a}}function I(t,n){var r,e,l=typeof n;return null==n||"boolean"===l?a(n):("number"===l?i:"string"===l?(r=o(n))?(n=r,u):c:n instanceof o?u:n instanceof Date?F:(e=n,!ArrayBuffer.isView(e)||e instanceof DataView?Array.isArray(n)?E:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?_:i:z))(t,n)}function L(t,n){return t=+t,n=+n,function(r){return Math.round(t*(1-r)+n*r)}}function V(t,n){if((r=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var r,e=t.slice(0,r);return[e.length>1?e[0]+e.slice(2):e,+t.slice(r+1)]}function D(t){return(t=V(Math.abs(t)))?t[1]:NaN}var O,P=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function B(t){if(!(n=P.exec(t)))throw new Error("invalid format: "+t);var n;return new $({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function $(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function H(t,n){var r=V(t,n);if(!r)return t+"";var e=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+e:e.length>a+1?e.slice(0,a+1)+"."+e.slice(a+1):e+new Array(a-e.length+2).join("0")}B.prototype=$.prototype,$.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Y={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return H(100*t,n)},r:H,s:function(t,n){var r=V(t,n);if(!r)return t+"";var e=r[0],a=r[1],i=a-(O=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=e.length;return i===o?e:i>o?e+new Array(i-o+1).join("0"):i>0?e.slice(0,i)+"."+e.slice(i):"0."+new Array(1-i).join("0")+V(t,Math.max(0,n+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function q(t){return t}var T,R,W,X=Array.prototype.map,G=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function U(t){var n,r,e=void 0===t.grouping||void 0===t.thousands?q:(n=X.call(t.grouping,Number),r=t.thousands+"",function(t,e){for(var a=t.length,i=[],o=0,u=n[0],c=0;a>0&&u>0&&(c+u+1>e&&(u=Math.max(1,e-c)),i.push(t.substring(a-=u,a+u)),!((c+=u+1)>e));)u=n[o=(o+1)%n.length];return i.reverse().join(r)}),a=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?q:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(X.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function f(t){var n=(t=B(t)).fill,r=t.align,f=t.sign,h=t.symbol,d=t.zero,m=t.width,g=t.comma,p=t.precision,v=t.trim,M=t.type;"n"===M?(g=!0,M="g"):Y[M]||(void 0===p&&(p=12),v=!0,M="g"),(d||"0"===n&&"="===r)&&(d=!0,n="0",r="=");var y="$"===h?a:"#"===h&&/[boxX]/.test(M)?"0"+M.toLowerCase():"",b="$"===h?i:/[%p]/.test(M)?c:"",x=Y[M],w=/[defgprs%]/.test(M);function k(t){var a,i,c,h=y,k=b;if("c"===M)k=x(t)+k,t="";else{var N=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),p),v&&(t=function(t){t:for(var n,r=t.length,e=1,a=-1;e<r;++e)switch(t[e]){case".":a=n=e;break;case"0":0===a&&(a=e),n=e;break;default:if(!+t[e])break t;a>0&&(a=0)}return a>0?t.slice(0,a)+t.slice(n+1):t}(t)),N&&0==+t&&"+"!==f&&(N=!1),h=(N?"("===f?f:l:"-"===f||"("===f?"":f)+h,k=("s"===M?G[8+O/3]:"")+k+(N&&"("===f?")":""),w)for(a=-1,i=t.length;++a<i;)if(48>(c=t.charCodeAt(a))||c>57){k=(46===c?o+t.slice(a+1):t.slice(a))+k,t=t.slice(0,a);break}}g&&!d&&(t=e(t,1/0));var A=h.length+t.length+k.length,C=A<m?new Array(m-A+1).join(n):"";switch(g&&d&&(t=e(C+t,C.length?m-k.length:1/0),C=""),r){case"<":t=h+t+k+C;break;case"=":t=h+C+t+k;break;case"^":t=C.slice(0,A=C.length>>1)+h+t+k+C.slice(A);break;default:t=C+h+t+k}return u(t)}return p=void 0===p?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,n){var r=f(((t=B(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(D(n)/3))),a=Math.pow(10,-e),i=G[8+e/3];return function(t){return r(a*t)+i}}}}function Z(){var t,n,r=l().unknown(void 0),e=r.domain,a=r.range,i=[0,1],o=!1,u=0,c=0,f=.5;function h(){var r=e().length,l=i[1]<i[0],s=i[l-0],h=i[1-l];t=(h-s)/Math.max(1,r-u+2*c),o&&(t=Math.floor(t)),s+=(h-s-t*(r-u))*f,n=t*(1-u),o&&(s=Math.round(s),n=Math.round(n));var d=p(r).map((function(n){return s+t*n}));return a(l?d.reverse():d)}return delete r.unknown,r.domain=function(t){return arguments.length?(e(t),h()):e()},r.range=function(t){return arguments.length?(i=[+t[0],+t[1]],h()):i.slice()},r.rangeRound=function(t){return i=[+t[0],+t[1]],o=!0,h()},r.bandwidth=function(){return n},r.step=function(){return t},r.round=function(t){return arguments.length?(o=!!t,h()):o},r.padding=function(t){return arguments.length?(u=Math.min(1,c=+t),h()):u},r.paddingInner=function(t){return arguments.length?(u=Math.min(1,t),h()):u},r.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},r.align=function(t){return arguments.length?(f=Math.max(0,Math.min(1,t)),h()):f},r.copy=function(){return Z(e(),i).round(o).paddingInner(u).paddingOuter(c).align(f)},s.apply(h(),arguments)}function J(t){return+t}T=U({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),R=T.format,W=T.formatPrefix;var K=[0,1];function Q(t){return t}function tt(t,n){return(n-=t=+t)?function(r){return(r-t)/n}:(r=isNaN(n)?NaN:.5,function(){return r});var r}function nt(t){var n,r=t[0],e=t[t.length-1];return r>e&&(n=r,r=e,e=n),function(t){return Math.max(r,Math.min(e,t))}}function rt(t,n,r){var e=t[0],a=t[1],i=n[0],o=n[1];return a<e?(e=tt(a,e),i=r(o,i)):(e=tt(e,a),i=r(i,o)),function(t){return i(e(t))}}function et(t,n,r){var e=Math.min(t.length,n.length)-1,a=new Array(e),i=new Array(e),o=-1;for(t[e]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++o<e;)a[o]=tt(t[o],t[o+1]),i[o]=r(n[o],n[o+1]);return function(n){var r=d(t,n,1,e)-1;return i[r](a[r](n))}}function at(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function it(t,n){return function(){var t,n,r,e,a,o,u=K,c=K,l=I,s=Q;function d(){return e=Math.min(u.length,c.length)>2?et:rt,a=o=null,m}function m(n){return isNaN(n=+n)?r:(a||(a=e(u.map(t),c,l)))(t(s(n)))}return m.invert=function(r){return s(n((o||(o=e(c,u.map(t),i)))(r)))},m.domain=function(t){return arguments.length?(u=f.call(t,J),s===Q||(s=nt(u)),d()):u.slice()},m.range=function(t){return arguments.length?(c=h.call(t),d()):c.slice()},m.rangeRound=function(t){return c=h.call(t),l=L,d()},m.clamp=function(t){return arguments.length?(s=t?nt(u):Q,m):s!==Q},m.interpolate=function(t){return arguments.length?(l=t,d()):l},m.unknown=function(t){return arguments.length?(r=t,m):r},function(r,e){return t=r,n=e,d()}}()(t,n)}function ot(t,n,r,e){var a,i=function(t,n,r){var e=Math.abs(n-t)/Math.max(0,r),a=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),i=e/a;return i>=v?a*=10:i>=M?a*=5:i>=y&&(a*=2),n<t?-a:a}(t,n,r);switch((e=B(null==e?",f":e)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(n));return null!=e.precision||isNaN(a=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(D(n)/3)))-D(Math.abs(t)))}(i,o))||(e.precision=a),W(e,o);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(a=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,D(n)-D(t))+1}(i,Math.max(Math.abs(t),Math.abs(n))))||(e.precision=a-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(a=function(t){return Math.max(0,-D(Math.abs(t)))}(i))||(e.precision=a-2*("%"===e.type))}return R(e)}function ut(t){var n=t.domain;return t.ticks=function(t){var r=n();return function(t,n,r){var e,a,i,o,u=-1;if(r=+r,(t=+t)==(n=+n)&&r>0)return[t];if((e=n<t)&&(a=t,t=n,n=a),0===(o=b(t,n,r))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),n=Math.floor(n/o),i=new Array(a=Math.ceil(n-t+1));++u<a;)i[u]=(t+u)*o;else for(t=Math.floor(t*o),n=Math.ceil(n*o),i=new Array(a=Math.ceil(t-n+1));++u<a;)i[u]=(t-u)/o;return e&&i.reverse(),i}(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var e=n();return ot(e[0],e[e.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var e,a=n(),i=0,o=a.length-1,u=a[i],c=a[o];return c<u&&(e=u,u=c,c=e,e=i,i=o,o=e),(e=b(u,c,r))>0?e=b(u=Math.floor(u/e)*e,c=Math.ceil(c/e)*e,r):e<0&&(e=b(u=Math.ceil(u*e)/e,c=Math.floor(c*e)/e,r)),e>0?(a[i]=Math.floor(u/e)*e,a[o]=Math.ceil(c/e)*e,n(a)):e<0&&(a[i]=Math.ceil(u*e)/e,a[o]=Math.floor(c*e)/e,n(a)),t},t}function ct(){var t=it(Q,Q);return t.copy=function(){return at(t,ct())},s.apply(t,arguments),ut(t)}g("#barChart {\n width: 1300px; }\n");var lt=function(e){var a=e.className,i=e.barChartData,o=e.setSelectedYear,u=e.fontColor,c=e.barColor;if(!i||0===i.length)return null;var l=100,s=30,f=90,h=30,d=window.innerWidth<767?1.3*window.innerWidth-l-f:700-l-f,g=function(t){var n=0;t.forEach((function(t){parseInt(t.count,10)>n&&(n=parseInt(t.count,10))})),m("div#barChart").html("");var r,e=m("#barChart").append("svg").attr("width",2e3+h+s).attr("height",d+l+f).append("g").attr("transform","translate(".concat(h,",").concat(l,")")),a=Z().range([0,2e3]).domain(t.map((function(t){return t.year}))).padding(.2);e.append("g").attr("transform","translate(0,".concat(d,")")).call((r=a,j(3,r))).selectAll("text").attr("transform","translate(-10,0)rotate(-45)").style("text-anchor","end").style("color",u).style("font-size",16);var i=ct().domain([0,n]).range([d,0]);e.selectAll("mybar").data(t).enter().append("rect").attr("x",(function(t){return a(t.year)})).attr("width",a.bandwidth()).attr("fill",c).attr("title",(function(t){return t.count})).attr("height",(function(){return d-i(0)})).attr("y",(function(){return i(0)})).style("cursor","pointer").on("click",(function(t){return o(t.year)})).append("svg:title").text((function(t){return"數量:".concat(t.count)})),e.selectAll("rect").transition().duration(800).attr("y",(function(t){return i(t.count)})).attr("height",(function(t){return d-i(t.count)})).delay((function(t,n){return 10*n})),e.append("g").call(function(t){return j(4,t)}(i).tickValues(p(i.domain()[0],i.domain()[1]+1,1)).tickFormat((function(t){return Math.round(t)}))).attr("id","yaxis").style("color",u).style("font-size",15)};function v(){var t=document.getElementById("barChart__block");0===t.scrollLeft&&document.getElementById("yaxis").setAttribute("transform","translate(0, 0 )"),t.scrollLeft>0&&document.getElementById("yaxis").setAttribute("transform","translate(".concat(t.scrollLeft,", 0)"))}return n((function(){i.length>0&&g(i),document.getElementById("barChart__block").addEventListener("scroll",v)}),[i]),t.createElement("div",{id:"barChart",className:r("barChart",a)})};lt.defaultProps={className:void 0,barChartData:[],setSelectedYear:function(){return null},fontColor:"#000",barColor:"#69b3a2"},lt.propTypes={className:e.string,barChartData:e.arrayOf(e.any),setSelectedYear:e.func,fontColor:e.string,barColor:e.string};export{lt as default};
|
package/lib/components/SNA.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as t from"react";import e,{useMemo as n,useState as r,useRef as o,useEffect as i,useCallback as a,Component as l,forwardRef as u}from"react";import s from"prop-types";import{u as c,b as f,c as h}from"./index-b2745105.js";import{i as p,a as d,r as y}from"./createSvgIcon-a1181ad3.js";import{_ as g}from"./_rollupPluginBabelHelpers-ec4e2a53.js";import{Menu as v,MenuItem as m}from"@material-ui/core";import w from"./Tooltip.js";import{s as b,f as _,a as x}from"./dataExport-9fccd4f0.js";import{s as k}from"./style-inject.es-1f59c1d0.js";import"@material-ui/styles";import"react-dom";function E(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var S,N;1===(S=E).length&&(N=S,S=function(t,e){return E(N(t),e)});var A={value:function(){}};function C(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new P(r)}function P(t){this._=t}function O(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function T(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function j(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=A,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}P.prototype=C.prototype={constructor:P,on:function(t,e){var n,r=this._,o=O(t+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<a;)if(n=(t=o[i]).type)r[n]=j(r[n],t.name,e);else if(null==e)for(n in r)r[n]=j(r[n],t.name,null);return this}for(;++i<a;)if((n=(t=o[i]).type)&&(n=T(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new P(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};var M="http://www.w3.org/1999/xhtml",z={svg:"http://www.w3.org/2000/svg",xhtml:M,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function F(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),z.hasOwnProperty(e)?{space:z[e],local:t}:t}function I(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===M&&e.documentElement.namespaceURI===M?e.createElement(t):e.createElementNS(n,t)}}function D(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function R(t){var e=F(t);return(e.local?D:I)(e)}function L(){}function B(t){return null==t?L:function(){return this.querySelector(t)}}function q(){return[]}function $(t){return null==t?q:function(){return this.querySelectorAll(t)}}function H(t){return function(){return this.matches(t)}}function U(t){return new Array(t.length)}function G(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}G.prototype={constructor:G,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function V(t,e,n,r,o,i){for(var a,l=0,u=e.length,s=i.length;l<s;++l)(a=e[l])?(a.__data__=i[l],r[l]=a):n[l]=new G(t,i[l]);for(;l<u;++l)(a=e[l])&&(o[l]=a)}function W(t,e,n,r,o,i,a){var l,u,s,c={},f=e.length,h=i.length,p=new Array(f);for(l=0;l<f;++l)(u=e[l])&&(p[l]=s="$"+a.call(u,u.__data__,l,e),s in c?o[l]=u:c[s]=u);for(l=0;l<h;++l)(u=c[s="$"+a.call(t,i[l],l,i)])?(r[l]=u,u.__data__=i[l],c[s]=null):n[l]=new G(t,i[l]);for(l=0;l<f;++l)(u=e[l])&&c[p[l]]===u&&(o[l]=u)}function X(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Y(t){return function(){this.removeAttribute(t)}}function J(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K(t,e){return function(){this.setAttribute(t,e)}}function Q(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Z(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function tt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function et(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function nt(t){return function(){this.style.removeProperty(t)}}function rt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ot(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function it(t,e){return t.style.getPropertyValue(e)||et(t).getComputedStyle(t,null).getPropertyValue(e)}function at(t){return function(){delete this[t]}}function lt(t,e){return function(){this[t]=e}}function ut(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function st(t){return t.trim().split(/^|\s+/)}function ct(t){return t.classList||new ft(t)}function ft(t){this._node=t,this._names=st(t.getAttribute("class")||"")}function ht(t,e){for(var n=ct(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function pt(t,e){for(var n=ct(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function dt(t){return function(){ht(this,t)}}function yt(t){return function(){pt(this,t)}}function gt(t,e){return function(){(e.apply(this,arguments)?ht:pt)(this,t)}}function vt(){this.textContent=""}function mt(t){return function(){this.textContent=t}}function wt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function bt(){this.innerHTML=""}function _t(t){return function(){this.innerHTML=t}}function xt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function kt(){this.nextSibling&&this.parentNode.appendChild(this)}function Et(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function St(){return null}function Nt(){var t=this.parentNode;t&&t.removeChild(this)}function At(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ct(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}ft.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Pt={},Ot=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Pt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Tt(t,e,n){return t=jt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function jt(t,e,n){return function(r){var o=Ot;Ot=r;try{t.call(this,this.__data__,e,n)}finally{Ot=o}}}function Mt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function zt(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.capture);++o?e.length=o:delete this.__on}}}function Ft(t,e,n){var r=Pt.hasOwnProperty(t.type)?Tt:jt;return function(o,i,a){var l,u=this.__on,s=r(e,i,a);if(u)for(var c=0,f=u.length;c<f;++c)if((l=u[c]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=s,l.capture=n),void(l.value=e);this.addEventListener(t.type,s,n),l={type:t.type,name:t.name,value:e,listener:s,capture:n},u?u.push(l):this.__on=[l]}}function It(t,e,n,r){var o=Ot;t.sourceEvent=Ot,Ot=t;try{return e.apply(n,r)}finally{Ot=o}}function Dt(t,e,n){var r=et(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Rt(t,e){return function(){return Dt(this,t,e)}}function Lt(t,e){return function(){return Dt(this,t,e.apply(this,arguments))}}var Bt=[null];function qt(t,e){this._groups=t,this._parents=e}function $t(){return new qt([[document.documentElement]],Bt)}function Ht(t){return"string"==typeof t?new qt([[document.querySelector(t)]],[document.documentElement]):new qt([[t]],Bt)}function Ut(){for(var t,e=Ot;t=e.sourceEvent;)e=t;return e}function Gt(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function Vt(t){var e=Ut();return e.changedTouches&&(e=e.changedTouches[0]),Gt(t,e)}function Wt(t,e,n){arguments.length<3&&(n=e,e=Ut().changedTouches);for(var r,o=0,i=e?e.length:0;o<i;++o)if((r=e[o]).identifier===n)return Gt(t,r);return null}function Xt(){Ot.stopImmediatePropagation()}function Yt(){Ot.preventDefault(),Ot.stopImmediatePropagation()}function Jt(t){var e=t.document.documentElement,n=Ht(t).on("dragstart.drag",Yt,!0);"onselectstart"in e?n.on("selectstart.drag",Yt,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Kt(t){return function(){return t}}function Qt(t,e,n,r,o,i,a,l,u,s){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=o,this.x=i,this.y=a,this.dx=l,this.dy=u,this._=s}function Zt(){return!Ot.ctrlKey&&!Ot.button}function te(){return this.parentNode}function ee(t){return null==t?{x:Ot.x,y:Ot.y}:t}function ne(){return navigator.maxTouchPoints||"ontouchstart"in this}function re(){var t,e,n,r,o=Zt,i=te,a=ee,l=ne,u={},s=C("start","drag","end"),c=0,f=0;function h(t){t.on("mousedown.drag",p).filter(l).on("touchstart.drag",g).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&o.apply(this,arguments)){var a=w("mouse",i.apply(this,arguments),Vt,this,arguments);a&&(Ht(Ot.view).on("mousemove.drag",d,!0).on("mouseup.drag",y,!0),Jt(Ot.view),Xt(),n=!1,t=Ot.clientX,e=Ot.clientY,a("start"))}}function d(){if(Yt(),!n){var r=Ot.clientX-t,o=Ot.clientY-e;n=r*r+o*o>f}u.mouse("drag")}function y(){Ht(Ot.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=Ht(t).on("dragstart.drag",null);e&&(r.on("click.drag",Yt,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(Ot.view,n),Yt(),u.mouse("end")}function g(){if(o.apply(this,arguments)){var t,e,n=Ot.changedTouches,r=i.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=w(n[t].identifier,r,Wt,this,arguments))&&(Xt(),e("start"))}}function v(){var t,e,n=Ot.changedTouches,r=n.length;for(t=0;t<r;++t)(e=u[n[t].identifier])&&(Yt(),e("drag"))}function m(){var t,e,n=Ot.changedTouches,o=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<o;++t)(e=u[n[t].identifier])&&(Xt(),e("end"))}function w(t,e,n,r,o){var i,l,f,p=n(e,t),d=s.copy();if(It(new Qt(h,"beforestart",i,t,c,p[0],p[1],0,0,d),(function(){return null!=(Ot.subject=i=a.apply(r,o))&&(l=i.x-p[0]||0,f=i.y-p[1]||0,!0)})))return function a(s){var y,g=p;switch(s){case"start":u[t]=a,y=c++;break;case"end":delete u[t],--c;case"drag":p=n(e,t),y=c}It(new Qt(h,s,i,t,y,p[0]+l,p[1]+f,p[0]-g[0],p[1]-g[1],d),d.apply,d,[s,r,o])}}return h.filter=function(t){return arguments.length?(o="function"==typeof t?t:Kt(!!t),h):o},h.container=function(t){return arguments.length?(i="function"==typeof t?t:Kt(t),h):i},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:Kt(t),h):a},h.touchable=function(t){return arguments.length?(l="function"==typeof t?t:Kt(!!t),h):l},h.on=function(){var t=s.on.apply(s,arguments);return t===s?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h}function oe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ie(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ae(){}qt.prototype=$t.prototype={constructor:qt,select:function(t){"function"!=typeof t&&(t=B(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a,l=e[o],u=l.length,s=r[o]=new Array(u),c=0;c<u;++c)(i=l[c])&&(a=t.call(i,i.__data__,c,l))&&("__data__"in i&&(a.__data__=i.__data__),s[c]=a);return new qt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=$(t));for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a,l=e[i],u=l.length,s=0;s<u;++s)(a=l[s])&&(r.push(t.call(a,a.__data__,s,l)),o.push(a));return new qt(r,o)},filter:function(t){"function"!=typeof t&&(t=H(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],l=a.length,u=r[o]=[],s=0;s<l;++s)(i=a[s])&&t.call(i,i.__data__,s,a)&&u.push(i);return new qt(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),s=-1,this.each((function(t){p[++s]=t})),p;var n=e?W:V,r=this._parents,o=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var i=o.length,a=new Array(i),l=new Array(i),u=new Array(i),s=0;s<i;++s){var c=r[s],f=o[s],h=f.length,p=t.call(c,c&&c.__data__,s,r),d=p.length,y=l[s]=new Array(d),g=a[s]=new Array(d);n(c,f,y,g,u[s]=new Array(h),p,e);for(var v,m,w=0,b=0;w<d;++w)if(v=y[w]){for(w>=b&&(b=w+1);!(m=g[b])&&++b<d;);v._next=m||null}}return(a=new qt(a,r))._enter=l,a._exit=u,a},enter:function(){return new qt(this._enter||this._groups.map(U),this._parents)},exit:function(){return new qt(this._exit||this._groups.map(U),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,i=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(o=e(o)),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),l=0;l<i;++l)for(var u,s=e[l],c=n[l],f=s.length,h=a[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)a[l]=e[l];return new qt(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=X);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,l=n[i],u=l.length,s=o[i]=new Array(u),c=0;c<u;++c)(a=l[c])&&(s[c]=a);s.sort(e)}return new qt(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o,i=e[n],a=0,l=i.length;a<l;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=F(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?J:Y:"function"==typeof e?n.local?tt:Z:n.local?Q:K)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?nt:"function"==typeof e?ot:rt)(t,e,null==n?"":n)):it(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?at:"function"==typeof e?ut:lt)(t,e)):this.node()[t]},classed:function(t,e){var n=st(t+"");if(arguments.length<2){for(var r=ct(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?gt:e?dt:yt)(n,e))},text:function(t){return arguments.length?this.each(null==t?vt:("function"==typeof t?wt:mt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?bt:("function"==typeof t?xt:_t)(t)):this.node().innerHTML},raise:function(){return this.each(kt)},lower:function(){return this.each(Et)},append:function(t){var e="function"==typeof t?t:R(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:R(t),r=null==e?St:"function"==typeof e?e:B(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Nt)},clone:function(t){return this.select(t?Ct:At)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=Mt(t+""),a=i.length;if(!(arguments.length<2)){for(l=e?Ft:zt,null==n&&(n=!1),r=0;r<a;++r)this.each(l(i[r],e,n));return this}var l=this.node().__on;if(l)for(var u,s=0,c=l.length;s<c;++s)for(r=0,u=l[s];r<a;++r)if((o=i[r]).type===u.type&&o.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Lt:Rt)(t,e))}},Qt.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var le=1/.7,ue="\\s*([+-]?\\d+)\\s*",se="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ce="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fe=/^#([0-9a-f]{3,8})$/,he=new RegExp("^rgb\\("+[ue,ue,ue]+"\\)$"),pe=new RegExp("^rgb\\("+[ce,ce,ce]+"\\)$"),de=new RegExp("^rgba\\("+[ue,ue,ue,se]+"\\)$"),ye=new RegExp("^rgba\\("+[ce,ce,ce,se]+"\\)$"),ge=new RegExp("^hsl\\("+[se,ce,ce]+"\\)$"),ve=new RegExp("^hsla\\("+[se,ce,ce,se]+"\\)$"),me={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function we(){return this.rgb().formatHex()}function be(){return this.rgb().formatRgb()}function _e(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=fe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?xe(e):3===n?new Ne(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ke(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=he.exec(t))?new Ne(e[1],e[2],e[3],1):(e=pe.exec(t))?new Ne(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=de.exec(t))?ke(e[1],e[2],e[3],e[4]):(e=ye.exec(t))?ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ge.exec(t))?Oe(e[1],e[2]/100,e[3]/100,1):(e=ve.exec(t))?Oe(e[1],e[2]/100,e[3]/100,e[4]):me.hasOwnProperty(t)?xe(me[t]):"transparent"===t?new Ne(NaN,NaN,NaN,0):null}function xe(t){return new Ne(t>>16&255,t>>8&255,255&t,1)}function ke(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ne(t,e,n,r)}function Ee(t){return t instanceof ae||(t=_e(t)),t?new Ne((t=t.rgb()).r,t.g,t.b,t.opacity):new Ne}function Se(t,e,n,r){return 1===arguments.length?Ee(t):new Ne(t,e,n,null==r?1:r)}function Ne(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ae(){return"#"+Pe(this.r)+Pe(this.g)+Pe(this.b)}function Ce(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Pe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Oe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new je(t,e,n,r)}function Te(t){if(t instanceof je)return new je(t.h,t.s,t.l,t.opacity);if(t instanceof ae||(t=_e(t)),!t)return new je;if(t instanceof je)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,l=i-o,u=(i+o)/2;return l?(a=e===i?(n-r)/l+6*(n<r):n===i?(r-e)/l+2:(e-n)/l+4,l/=u<.5?i+o:2-i-o,a*=60):l=u>0&&u<1?0:a,new je(a,l,u,t.opacity)}function je(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Me(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function ze(t){return function(){return t}}function Fe(t){return 1==(t=+t)?Ie:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):ze(isNaN(e)?n:e)}}function Ie(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ze(isNaN(t)?e:t)}oe(ae,_e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:we,formatHex:we,formatHsl:function(){return Te(this).formatHsl()},formatRgb:be,toString:be}),oe(Ne,Se,ie(ae,{brighter:function(t){return t=null==t?le:Math.pow(le,t),new Ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ne(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ae,formatHex:Ae,formatRgb:Ce,toString:Ce})),oe(je,(function(t,e,n,r){return 1===arguments.length?Te(t):new je(t,e,n,null==r?1:r)}),ie(ae,{brighter:function(t){return t=null==t?le:Math.pow(le,t),new je(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new je(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new Ne(Me(t>=240?t-240:t+120,o,r),Me(t,o,r),Me(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var De=function t(e){var n=Fe(e);function r(t,e){var r=n((t=Se(t)).r,(e=Se(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=Ie(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Re(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Le=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Be=new RegExp(Le.source,"g");function qe(t,e){var n,r,o,i=Le.lastIndex=Be.lastIndex=0,a=-1,l=[],u=[];for(t+="",e+="";(n=Le.exec(t))&&(r=Be.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,u.push({i:a,x:Re(n,r)})),i=Be.lastIndex;return i<e.length&&(o=e.slice(i),l[a]?l[a]+=o:l[++a]=o),l.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)l[(n=u[r]).i]=n.x(t);return l.join("")})}var $e,He,Ue,Ge,Ve=180/Math.PI,We={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xe(t,e,n,r,o,i){var a,l,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Ve,skewX:Math.atan(u)*Ve,scaleX:a,scaleY:l}}function Ye(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var l=[],u=[];return i=t(i),a=t(a),function(t,r,o,i,a,l){if(t!==o||r!==i){var u=a.push("translate(",null,e,null,n);l.push({i:u-4,x:Re(t,o)},{i:u-2,x:Re(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,l,u),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Re(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,l,u),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Re(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,l,u),function(t,e,n,r,i,a){if(t!==n||e!==r){var l=i.push(o(i)+"scale(",null,",",null,")");a.push({i:l-4,x:Re(t,n)},{i:l-2,x:Re(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,l,u),i=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)l[(e=u[n]).i]=e.x(t);return l.join("")}}}var Je,Ke,Qe=Ye((function(t){return"none"===t?We:($e||($e=document.createElement("DIV"),He=document.documentElement,Ue=document.defaultView),$e.style.transform=t,t=Ue.getComputedStyle(He.appendChild($e),null).getPropertyValue("transform"),He.removeChild($e),Xe(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Ze=Ye((function(t){return null==t?We:(Ge||(Ge=document.createElementNS("http://www.w3.org/2000/svg","g")),Ge.setAttribute("transform",t),(t=Ge.transform.baseVal.consolidate())?Xe((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):We)}),", ",")",")"),tn=0,en=0,nn=0,rn=0,on=0,an=0,ln="object"==typeof performance&&performance.now?performance:Date,un="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function sn(){return on||(un(cn),on=ln.now()+an)}function cn(){on=0}function fn(){this._call=this._time=this._next=null}function hn(t,e,n){var r=new fn;return r.restart(t,e,n),r}function pn(){on=(rn=ln.now())+an,tn=en=0;try{!function(){sn(),++tn;for(var t,e=Je;e;)(t=on-e._time)>=0&&e._call.call(null,t),e=e._next;--tn}()}finally{tn=0,function(){var t,e,n=Je,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Je=e);Ke=t,yn(r)}(),on=0}}function dn(){var t=ln.now(),e=t-rn;e>1e3&&(an-=e,rn=t)}function yn(t){tn||(en&&(en=clearTimeout(en)),t-on>24?(t<1/0&&(en=setTimeout(pn,t-ln.now()-an)),nn&&(nn=clearInterval(nn))):(nn||(rn=ln.now(),nn=setInterval(dn,1e3)),tn=1,un(pn)))}function gn(t,e,n){var r=new fn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}fn.prototype=hn.prototype={constructor:fn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?sn():+n)+(null==e?0:+e),this._next||Ke===this||(Ke?Ke._next=this:Je=this,Ke=this),this._call=t,this._time=n,yn()},stop:function(){this._call&&(this._call=null,this._time=1/0,yn())}};var vn=C("start","end","cancel","interrupt"),mn=[];function wn(t,e,n,r,o,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(i){var s,c,f,h;if(1!==n.state)return u();for(s in o)if((h=o[s]).name===n.name){if(3===h.state)return gn(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[s]):+s<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete o[s])}if(gn((function(){3===n.state&&(n.state=4,n.timer.restart(l,n.delay,n.time),l(i))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),s=0,c=-1;s<f;++s)(h=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function l(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(t,o);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=hn(i,0,n.time)}(t,n,{name:e,index:r,group:o,on:vn,tween:mn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function bn(t,e){var n=xn(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function _n(t,e){var n=xn(t,e);if(n.state>3)throw new Error("too late; already running");return n}function xn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function kn(t,e){var n,r;return function(){var o=_n(this,t),i=o.tween;if(i!==n)for(var a=0,l=(r=n=i).length;a<l;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function En(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=_n(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var l={name:e,value:n},u=0,s=o.length;u<s;++u)if(o[u].name===e){o[u]=l;break}u===s&&o.push(l)}i.tween=o}}function Sn(t,e,n){var r=t._id;return t.each((function(){var t=_n(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return xn(t,r).value[e]}}function Nn(t,e){var n;return("number"==typeof e?Re:e instanceof _e?De:(n=_e(e))?(e=n,De):qe)(t,e)}function An(t){return function(){this.removeAttribute(t)}}function Cn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pn(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function On(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function Tn(t,e,n){var r,o,i;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(l=u+"")?null:a===r&&l===o?i:(o=l,i=e(r=a,u));this.removeAttribute(t)}}function jn(t,e,n){var r,o,i;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(l=u+"")?null:a===r&&l===o?i:(o=l,i=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Mn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function zn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Fn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&zn(t,o)),n}return o._value=e,o}function In(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Mn(t,o)),n}return o._value=e,o}function Dn(t,e){return function(){bn(this,t).delay=+e.apply(this,arguments)}}function Rn(t,e){return e=+e,function(){bn(this,t).delay=e}}function Ln(t,e){return function(){_n(this,t).duration=+e.apply(this,arguments)}}function Bn(t,e){return e=+e,function(){_n(this,t).duration=e}}function qn(t,e){if("function"!=typeof e)throw new Error;return function(){_n(this,t).ease=e}}function $n(t,e,n){var r,o,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?bn:_n;return function(){var a=i(this,t),l=a.on;l!==r&&(o=(r=l).copy()).on(e,n),a.on=o}}var Hn=$t.prototype.constructor;function Un(t){return function(){this.style.removeProperty(t)}}function Gn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Vn(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&Gn(t,i,n)),r}return i._value=e,i}function Wn(t){return function(e){this.textContent=t.call(this,e)}}function Xn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Wn(r)),e}return r._value=t,r}var Yn=0;function Jn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Kn(){return++Yn}var Qn=$t.prototype;Jn.prototype={constructor:Jn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=B(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var l,u,s=r[a],c=s.length,f=i[a]=new Array(c),h=0;h<c;++h)(l=s[h])&&(u=t.call(l,l.__data__,h,s))&&("__data__"in l&&(u.__data__=l.__data__),f[h]=u,wn(f[h],e,n,h,f,xn(l,n)));return new Jn(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=$(t));for(var r=this._groups,o=r.length,i=[],a=[],l=0;l<o;++l)for(var u,s=r[l],c=s.length,f=0;f<c;++f)if(u=s[f]){for(var h,p=t.call(u,u.__data__,f,s),d=xn(u,n),y=0,g=p.length;y<g;++y)(h=p[y])&&wn(h,e,n,y,p,d);i.push(p),a.push(u)}return new Jn(i,a,e,n)},filter:function(t){"function"!=typeof t&&(t=H(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],l=a.length,u=r[o]=[],s=0;s<l;++s)(i=a[s])&&t.call(i,i.__data__,s,a)&&u.push(i);return new Jn(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),l=0;l<i;++l)for(var u,s=e[l],c=n[l],f=s.length,h=a[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)a[l]=e[l];return new Jn(a,this._parents,this._name,this._id)},selection:function(){return new Hn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Kn(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],u=l.length,s=0;s<u;++s)if(a=l[s]){var c=xn(a,e);wn(a,t,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Jn(r,this._parents,t,n)},call:Qn.call,nodes:Qn.nodes,node:Qn.node,size:Qn.size,empty:Qn.empty,each:Qn.each,on:function(t,e){var n=this._id;return arguments.length<2?xn(this.node(),n).on.on(t):this.each($n(n,t,e))},attr:function(t,e){var n=F(t),r="transform"===n?Ze:Nn;return this.attrTween(t,"function"==typeof e?(n.local?jn:Tn)(n,r,Sn(this,"attr."+t,e)):null==e?(n.local?Cn:An)(n):(n.local?On:Pn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=F(t);return this.tween(n,(r.local?Fn:In)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Qe:Nn;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=it(this,t),a=(this.style.removeProperty(t),it(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,Un(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=it(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=it(this,t)),a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,l))}}(t,r,Sn(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,l="end."+a;return function(){var u=_n(this,t),s=u.on,c=null==u.value[a]?i||(i=Un(e)):void 0;s===n&&o===c||(r=(n=s).copy()).on(l,o=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=it(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Vn(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Sn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Xn(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=xn(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===t)return r.value;return null}return this.each((null==e?kn:En)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Dn:Rn)(e,t)):xn(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ln:Bn)(e,t)):xn(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(qn(e,t)):xn(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var l={value:a},u={value:function(){0==--o&&i()}};n.each((function(){var n=_n(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),n.on=e}))}))}};var Zn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function tr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Zn.time=sn(),Zn;return n}$t.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,o,i=t.__transition,a=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete t.__transition}}(this,t)}))},$t.prototype.transition=function(t){var e,n;t instanceof Jn?(e=t._id,t=t._name):(e=Kn(),(n=Zn).time=sn(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],u=l.length,s=0;s<u;++s)(a=l[s])&&wn(a,t,e,s,l,n||tr(a,e));return new Jn(r,this._parents,t,e)};function er(){}function nr(t,e){var n=new er;if(t instanceof er)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==e)for(;++o<i;)n.set(o,t[o]);else for(;++o<i;)n.set(e(r=t[o],o,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function rr(){}er.prototype=nr.prototype={constructor:er,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var or=nr.prototype;function ir(t){return function(){return t}}function ar(){return 1e-6*(Math.random()-.5)}function lr(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i,a,l,u,s,c,f,h,p=t._root,d={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((s=e>=(i=(y+v)/2))?y=i:v=i,(c=n>=(a=(g+m)/2))?g=a:m=a,o=p,!(p=p[f=c<<1|s]))return o[f]=d,t;if(l=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===l&&n===u)return d.next=p,o?o[f]=d:t._root=d,t;do{o=o?o[f]=new Array(4):t._root=new Array(4),(s=e>=(i=(y+v)/2))?y=i:v=i,(c=n>=(a=(g+m)/2))?g=a:m=a}while((f=c<<1|s)==(h=(u>=a)<<1|l>=i));return o[h]=p,o[f]=d,t}function ur(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o}function sr(t){return t[0]}function cr(t){return t[1]}function fr(t,e,n){var r=new hr(null==e?sr:e,null==n?cr:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function hr(t,e,n,r,o,i){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function pr(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}rr.prototype={constructor:rr,has:or.has,add:function(t){return this["$"+(t+="")]=t,this},remove:or.remove,clear:or.clear,values:or.keys,size:or.size,empty:or.empty,each:or.each};var dr=fr.prototype=hr.prototype;function yr(t){return t.x+t.vx}function gr(t){return t.y+t.vy}function vr(t){return t.index}function mr(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function wr(t){return t.x}function br(t){return t.y}dr.copy=function(){var t,e,n=new hr(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=pr(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(e=r.source[o])&&(e.length?t.push({source:e,target:r.target[o]=new Array(4)}):r.target[o]=pr(e));return n},dr.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return lr(this.cover(e,n),e,n,t)},dr.addAll=function(t){var e,n,r,o,i=t.length,a=new Array(i),l=new Array(i),u=1/0,s=1/0,c=-1/0,f=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=r,l[n]=o,r<u&&(u=r),r>c&&(c=r),o<s&&(s=o),o>f&&(f=o));if(u>c||s>f)return this;for(this.cover(u,s).cover(c,f),n=0;n<i;++n)lr(this,a[n],l[n],t[n]);return this},dr.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,i=(r=Math.floor(e))+1;else{for(var a,l,u=o-n,s=this._root;n>t||t>=o||r>e||e>=i;)switch(l=(e<r)<<1|t<n,(a=new Array(4))[l]=s,s=a,u*=2,l){case 0:o=n+u,i=r+u;break;case 1:n=o-u,i=r+u;break;case 2:o=n+u,r=i-u;break;case 3:n=o-u,r=i-u}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},dr.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},dr.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},dr.find=function(t,e,n){var r,o,i,a,l,u,s,c=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],y=this._root;for(y&&d.push(new ur(y,c,f,h,p)),null==n?n=1/0:(c=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(y=u.node)||(o=u.x0)>h||(i=u.y0)>p||(a=u.x1)<c||(l=u.y1)<f))if(y.length){var g=(o+a)/2,v=(i+l)/2;d.push(new ur(y[3],g,v,a,l),new ur(y[2],o,v,g,l),new ur(y[1],g,i,a,v),new ur(y[0],o,i,g,v)),(s=(e>=v)<<1|t>=g)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=u)}else{var m=t-+this._x.call(null,y.data),w=e-+this._y.call(null,y.data),b=m*m+w*w;if(b<n){var _=Math.sqrt(n=b);c=t-_,f=e-_,h=t+_,p=e+_,r=y.data}}return r},dr.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,o,i,a,l,u,s,c,f,h,p=this._root,d=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((s=i>=(l=(d+g)/2))?d=l:g=l,(c=a>=(u=(y+v)/2))?y=u:v=u,e=p,!(p=p[f=c<<1|s]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(o=p.next)&&delete p.next,r?(o?r.next=o:delete r.next,this):e?(o?e[f]=o:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=o,this)},dr.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},dr.root=function(){return this._root},dr.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},dr.visit=function(t){var e,n,r,o,i,a,l=[],u=this._root;for(u&&l.push(new ur(u,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(u=e.node,r=e.x0,o=e.y0,i=e.x1,a=e.y1)&&u.length){var s=(r+i)/2,c=(o+a)/2;(n=u[3])&&l.push(new ur(n,s,c,i,a)),(n=u[2])&&l.push(new ur(n,r,c,s,a)),(n=u[1])&&l.push(new ur(n,s,o,i,c)),(n=u[0])&&l.push(new ur(n,r,o,s,c))}return this},dr.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new ur(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var i,a=e.x0,l=e.y0,u=e.x1,s=e.y1,c=(a+u)/2,f=(l+s)/2;(i=o[0])&&n.push(new ur(i,a,l,c,f)),(i=o[1])&&n.push(new ur(i,c,l,u,f)),(i=o[2])&&n.push(new ur(i,a,f,c,s)),(i=o[3])&&n.push(new ur(i,c,f,u,s))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},dr.x=function(t){return arguments.length?(this._x=t,this):this._x},dr.y=function(t){return arguments.length?(this._y=t,this):this._y};var _r=Math.PI*(3-Math.sqrt(5));function xr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var kr=Array.prototype.slice,Er={name:"implicit"};function Sr(){var t=nr(),e=[],n=[],r=Er;function o(o){var i=o+"",a=t.get(i);if(!a){if(r!==Er)return r;t.set(i,a=e.push(o))}return n[(a-1)%n.length]}return o.domain=function(n){if(!arguments.length)return e.slice();e=[],t=nr();for(var r,i,a=-1,l=n.length;++a<l;)t.has(i=(r=n[a])+"")||t.set(i,e.push(r));return o},o.range=function(t){return arguments.length?(n=kr.call(t),o):n.slice()},o.unknown=function(t){return arguments.length?(r=t,o):r},o.copy=function(){return Sr(e,n).unknown(r)},xr.apply(o,arguments),o}var Nr=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Ar={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},Cr=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],Pr=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],Or=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],Tr="undefined"!=typeof window&&void 0!==window.document?window.document:{},jr="fullscreenEnabled"in Tr&&Object.keys(Ar)||Cr[0]in Tr&&Cr||Pr[0]in Tr&&Pr||Or[0]in Tr&&Or||[],Mr={requestFullscreen:function(t){return t[jr[Ar.requestFullscreen]]()},requestFullscreenFunction:function(t){return t[jr[Ar.requestFullscreen]]},get exitFullscreen(){return Tr[jr[Ar.exitFullscreen]].bind(Tr)},get fullscreenPseudoClass(){return":"+jr[Ar.fullscreen]},addEventListener:function(t,e,n){return Tr.addEventListener(jr[Ar[t]],e,n)},removeEventListener:function(t,e,n){return Tr.removeEventListener(jr[Ar[t]],e,n)},get fullscreenEnabled(){return Boolean(Tr[jr[Ar.fullscreenEnabled]])},set fullscreenEnabled(t){},get fullscreenElement(){return Tr[jr[Ar.fullscreenElement]]},set fullscreenElement(t){},get onfullscreenchange(){return Tr[("on"+jr[Ar.fullscreenchange]).toLowerCase()]},set onfullscreenchange(t){return Tr[("on"+jr[Ar.fullscreenchange]).toLowerCase()]=t},get onfullscreenerror(){return Tr[("on"+jr[Ar.fullscreenerror]).toLowerCase()]},set onfullscreenerror(t){return Tr[("on"+jr[Ar.fullscreenerror]).toLowerCase()]=t}},zr=Mr;var Fr=function(t){var n=t.handle,r=t.onChange,o=t.children,a=t.className,l=[];return a&&l.push(a),l.push("fullscreen"),n.active&&l.push("fullscreen-enabled"),i((function(){r&&r(n.active,n)}),[n.active]),e.createElement("div",{className:l.join(" "),ref:n.node,style:n.active?{height:"100%",width:"100%"}:void 0},o)},Ir=f((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=p(e),o=(0,d(y).default)(r.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExit");n.default=o})),Dr=c(Ir),Rr=function(){return Rr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Rr.apply(this,arguments)},Lr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};var Br,qr=(Br=function(t,e){return Br=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Br(t,e)},function(t,e){function n(){this.constructor=t}Br(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$r=function(){return $r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},$r.apply(this,arguments)},Hr=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function l(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}u((r=r.apply(t,e||[])).next())}))},Ur=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Gr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},Vr=function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then},Wr=function(t,e){return{left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-t/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-e/2}},Xr=function(t,e){return{top:(window.screen.height-e)/2,left:(window.screen.width-t)/2}};function Yr(t,e,n){var r=e.height,o=e.width,i=Gr(e,["height","width"]),a=$r({height:r,width:o,location:"no",toolbar:"no",status:"no",directories:"no",menubar:"no",scrollbars:"yes",resizable:"no",centerscreen:"yes",chrome:"yes"},i),l=window.open(t,"",Object.keys(a).map((function(t){return t+"="+a[t]})).join(", "));if(n)var u=window.setInterval((function(){try{(null===l||l.closed)&&(window.clearInterval(u),n(l))}catch(t){console.error(t)}}),1e3);return l}var Jr=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.openShareDialog=function(t){var n=e.props,r=n.onShareWindowClose,o=n.windowHeight,i=void 0===o?400:o,a=n.windowPosition,l=void 0===a?"windowCenter":a,u=n.windowWidth,s=void 0===u?550:u;Yr(t,$r({height:i,width:s},"windowCenter"===l?Wr(s,i):Xr(s,i)),r)},e.handleClick=function(t){return Hr(e,void 0,void 0,(function(){var e,n,r,o,i,a,l,u,s,c;return Ur(this,(function(f){switch(f.label){case 0:return e=this.props,n=e.beforeOnClick,r=e.disabled,o=e.networkLink,i=e.onClick,a=e.url,l=e.openShareDialogOnClick,u=e.opts,s=o(a,u),r?[2]:(t.preventDefault(),n?(c=n(),Vr(c)?[4,c]:[3,2]):[3,2]);case 1:f.sent(),f.label=2;case 2:return l&&this.openShareDialog(s),i&&i(t,s),[2]}}))}))},e}return qr(n,t),n.prototype.render=function(){var t=this.props;t.beforeOnClick;var n=t.children,r=t.className,o=t.disabled,i=t.disabledStyle,a=t.forwardedRef;t.networkLink;var l=t.networkName;t.onShareWindowClose,t.openShareDialogOnClick,t.opts;var u=t.resetButtonStyle,s=t.style;t.url,t.windowHeight,t.windowPosition,t.windowWidth;var c=Gr(t,["beforeOnClick","children","className","disabled","disabledStyle","forwardedRef","networkLink","networkName","onShareWindowClose","openShareDialogOnClick","opts","resetButtonStyle","style","url","windowHeight","windowPosition","windowWidth"]),f=h("react-share__ShareButton",{"react-share__ShareButton--disabled":!!o,disabled:!!o},r),p=$r($r(u?{backgroundColor:"transparent",border:"none",padding:0,font:"inherit",color:"inherit",cursor:"pointer"}:{},s),o&&i);return e.createElement("button",$r({},c,{"aria-label":c["aria-label"]||l,className:f,onClick:this.handleClick,ref:a,style:p}),n)},n.defaultProps={disabledStyle:{opacity:.6},openShareDialogOnClick:!0,resetButtonStyle:!0},n}(l),Kr=Jr,Qr=function(){return Qr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Qr.apply(this,arguments)};var Zr,to,eo=(Zr={color:"#3b5998",networkName:"facebook",path:"M34.1,47V33.3h4.6l0.7-5.3h-5.3v-3.4c0-1.5,0.4-2.6,2.6-2.6l2.8,0v-4.8c-0.5-0.1-2.2-0.2-4.1-0.2 c-4.1,0-6.9,2.5-6.9,7V28H24v5.3h4.6V47H34.1z"},(to=function(t){var n=t.bgStyle,r=t.borderRadius,o=t.iconFillColor,i=t.round,a=t.size,l=Lr(t,["bgStyle","borderRadius","iconFillColor","round","size"]);return e.createElement("svg",Rr({viewBox:"0 0 64 64",width:a,height:a},l),i?e.createElement("circle",{cx:"32",cy:"32",r:"31",fill:Zr.color,style:n}):e.createElement("rect",{width:"64",height:"64",rx:r,ry:r,fill:Zr.color,style:n}),e.createElement("path",{d:Zr.path,fill:o}))}).defaultProps={bgStyle:{},borderRadius:0,iconFillColor:"white",size:64},to),no=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ro=function(t){function e(e){var n=t.call(this,e)||this;return n.name="AssertionError",n}return no(e,t),e}(Error);var oo=function(t,n,r,o){function i(i,a){var l=r(i),u=Qr({},i);return Object.keys(l).forEach((function(t){delete u[t]})),e.createElement(Kr,Qr({},o,u,{forwardedRef:a,networkName:t,networkLink:n,opts:r(i)}))}return i.displayName="ShareButton-"+t,u(i)}("facebook",(function(t,e){var n,r,o=e.quote,i=e.hashtag;return function(t,e){if(!t)throw new ro(e)}(t,"facebook.url"),"https://www.facebook.com/sharer/sharer.php"+(n={u:t,quote:o,hashtag:i},r=Object.entries(n).filter((function(t){return null!=t[1]})).map((function(t){var e=t[0],n=t[1];return encodeURIComponent(e)+"="+encodeURIComponent(String(n))})),r.length>0?"?"+r.join("&"):"")}),(function(t){return{quote:t.quote,hashtag:t.hashtag}}),{windowWidth:550,windowHeight:400}),io=oo,ao=f((function(t,e){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e,n){t.exports=n(2)},function(t,e,n){var r=n(4);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(6)(r,o),r.locals&&(t.exports=r.locals)},function(t,e,n){
|
|
1
|
+
import*as e from"react";import t,{useMemo as n,useState as r,useRef as o,useEffect as i,useCallback as a,Component as l,forwardRef as c}from"react";import u from"prop-types";import{u as s,b as f,c as h}from"./index-b2745105.js";import{e as d,s as p,d as y,c as g,m,t as v,o as w}from"./ordinal-a8f387fb.js";import{i as b,a as x,r as S}from"./createSvgIcon-a1181ad3.js";import{_ as k}from"./_rollupPluginBabelHelpers-ec4e2a53.js";import{Menu as _,MenuItem as E}from"@material-ui/core";import C from"./Tooltip.js";import{s as N,f as O,a as P}from"./dataExport-9fccd4f0.js";import{s as A}from"./style-inject.es-1f59c1d0.js";import"@material-ui/styles";import"react-dom";function j(){for(var e,t=d;e=t.sourceEvent;)t=e;return t}function T(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}function z(e){var t=j();return t.changedTouches&&(t=t.changedTouches[0]),T(e,t)}function M(e,t,n){arguments.length<3&&(n=t,t=j().changedTouches);for(var r,o=0,i=t?t.length:0;o<i;++o)if((r=t[o]).identifier===n)return T(e,r);return null}function F(){d.stopImmediatePropagation()}function I(){d.preventDefault(),d.stopImmediatePropagation()}function D(e){var t=e.document.documentElement,n=p(e).on("dragstart.drag",I,!0);"onselectstart"in t?n.on("selectstart.drag",I,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function R(e){return function(){return e}}function B(e,t,n,r,o,i,a,l,c,u){this.target=e,this.type=t,this.subject=n,this.identifier=r,this.active=o,this.x=i,this.y=a,this.dx=l,this.dy=c,this._=u}function L(){return!d.ctrlKey&&!d.button}function U(){return this.parentNode}function H(e){return null==e?{x:d.x,y:d.y}:e}function q(){return navigator.maxTouchPoints||"ontouchstart"in this}function $(){var e,t,n,r,o=L,i=U,a=H,l=q,c={},u=y("start","drag","end"),s=0,f=0;function h(e){e.on("mousedown.drag",m).filter(l).on("touchstart.drag",b).on("touchmove.drag",x).on("touchend.drag touchcancel.drag",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(){if(!r&&o.apply(this,arguments)){var a=k("mouse",i.apply(this,arguments),z,this,arguments);a&&(p(d.view).on("mousemove.drag",v,!0).on("mouseup.drag",w,!0),D(d.view),F(),n=!1,e=d.clientX,t=d.clientY,a("start"))}}function v(){if(I(),!n){var r=d.clientX-e,o=d.clientY-t;n=r*r+o*o>f}c.mouse("drag")}function w(){var e,t,r,o;p(d.view).on("mousemove.drag mouseup.drag",null),e=d.view,t=n,r=e.document.documentElement,o=p(e).on("dragstart.drag",null),t&&(o.on("click.drag",I,!0),setTimeout((function(){o.on("click.drag",null)}),0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect),I(),c.mouse("end")}function b(){if(o.apply(this,arguments)){var e,t,n=d.changedTouches,r=i.apply(this,arguments),a=n.length;for(e=0;e<a;++e)(t=k(n[e].identifier,r,M,this,arguments))&&(F(),t("start"))}}function x(){var e,t,n=d.changedTouches,r=n.length;for(e=0;e<r;++e)(t=c[n[e].identifier])&&(I(),t("drag"))}function S(){var e,t,n=d.changedTouches,o=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),e=0;e<o;++e)(t=c[n[e].identifier])&&(F(),t("end"))}function k(e,t,n,r,o){var i,l,f,p=n(t,e),y=u.copy();if(g(new B(h,"beforestart",i,e,s,p[0],p[1],0,0,y),(function(){return null!=(d.subject=i=a.apply(r,o))&&(l=i.x-p[0]||0,f=i.y-p[1]||0,!0)})))return function a(u){var d,m=p;switch(u){case"start":c[e]=a,d=s++;break;case"end":delete c[e],--s;case"drag":p=n(t,e),d=s}g(new B(h,u,i,e,d,p[0]+l,p[1]+f,p[0]-m[0],p[1]-m[1],y),y.apply,y,[u,r,o])}}return h.filter=function(e){return arguments.length?(o="function"==typeof e?e:R(!!e),h):o},h.container=function(e){return arguments.length?(i="function"==typeof e?e:R(e),h):i},h.subject=function(e){return arguments.length?(a="function"==typeof e?e:R(e),h):a},h.touchable=function(e){return arguments.length?(l="function"==typeof e?e:R(!!e),h):l},h.on=function(){var e=u.on.apply(u,arguments);return e===u?h:e},h.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,h):Math.sqrt(f)},h}function G(e){return function(){return e}}function W(){return 1e-6*(Math.random()-.5)}function V(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,i,a,l,c,u,s,f,h,d=e._root,p={data:r},y=e._x0,g=e._y0,m=e._x1,v=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((u=t>=(i=(y+m)/2))?y=i:m=i,(s=n>=(a=(g+v)/2))?g=a:v=a,o=d,!(d=d[f=s<<1|u]))return o[f]=p,e;if(l=+e._x.call(null,d.data),c=+e._y.call(null,d.data),t===l&&n===c)return p.next=d,o?o[f]=p:e._root=p,e;do{o=o?o[f]=new Array(4):e._root=new Array(4),(u=t>=(i=(y+m)/2))?y=i:m=i,(s=n>=(a=(g+v)/2))?g=a:v=a}while((f=s<<1|u)==(h=(c>=a)<<1|l>=i));return o[h]=d,o[f]=p,e}function X(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function Y(e){return e[0]}function J(e){return e[1]}function K(e,t,n){var r=new Q(null==t?Y:t,null==n?J:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function Q(e,t,n,r,o,i){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function Z(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}B.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var ee=K.prototype=Q.prototype;function te(e){return e.x+e.vx}function ne(e){return e.y+e.vy}function re(e){return e.index}function oe(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function ie(e){return e.x}function ae(e){return e.y}ee.copy=function(){var e,t,n=new Q(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Z(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var o=0;o<4;++o)(t=r.source[o])&&(t.length?e.push({source:t,target:r.target[o]=new Array(4)}):r.target[o]=Z(t));return n},ee.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return V(this.cover(t,n),t,n,e)},ee.addAll=function(e){var t,n,r,o,i=e.length,a=new Array(i),l=new Array(i),c=1/0,u=1/0,s=-1/0,f=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=r,l[n]=o,r<c&&(c=r),r>s&&(s=r),o<u&&(u=o),o>f&&(f=o));if(c>s||u>f)return this;for(this.cover(c,u).cover(s,f),n=0;n<i;++n)V(this,a[n],l[n],e[n]);return this},ee.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(e))+1,i=(r=Math.floor(t))+1;else{for(var a,l,c=o-n,u=this._root;n>e||e>=o||r>t||t>=i;)switch(l=(t<r)<<1|e<n,(a=new Array(4))[l]=u,u=a,c*=2,l){case 0:o=n+c,i=r+c;break;case 1:n=o-c,i=r+c;break;case 2:o=n+c,r=i-c;break;case 3:n=o-c,r=i-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},ee.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},ee.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ee.find=function(e,t,n){var r,o,i,a,l,c,u,s=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],y=this._root;for(y&&p.push(new X(y,s,f,h,d)),null==n?n=1/0:(s=e-n,f=t-n,h=e+n,d=t+n,n*=n);c=p.pop();)if(!(!(y=c.node)||(o=c.x0)>h||(i=c.y0)>d||(a=c.x1)<s||(l=c.y1)<f))if(y.length){var g=(o+a)/2,m=(i+l)/2;p.push(new X(y[3],g,m,a,l),new X(y[2],o,m,g,l),new X(y[1],g,i,a,m),new X(y[0],o,i,g,m)),(u=(t>=m)<<1|e>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var v=e-+this._x.call(null,y.data),w=t-+this._y.call(null,y.data),b=v*v+w*w;if(b<n){var x=Math.sqrt(n=b);s=e-x,f=t-x,h=e+x,d=t+x,r=y.data}}return r},ee.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,o,i,a,l,c,u,s,f,h,d=this._root,p=this._x0,y=this._y0,g=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((u=i>=(l=(p+g)/2))?p=l:g=l,(s=a>=(c=(y+m)/2))?y=c:m=c,t=d,!(d=d[f=s<<1|u]))return this;if(!d.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,h=f)}for(;d.data!==e;)if(r=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,r?(o?r.next=o:delete r.next,this):t?(o?t[f]=o:delete t[f],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=o,this)},ee.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},ee.root=function(){return this._root},ee.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},ee.visit=function(e){var t,n,r,o,i,a,l=[],c=this._root;for(c&&l.push(new X(c,this._x0,this._y0,this._x1,this._y1));t=l.pop();)if(!e(c=t.node,r=t.x0,o=t.y0,i=t.x1,a=t.y1)&&c.length){var u=(r+i)/2,s=(o+a)/2;(n=c[3])&&l.push(new X(n,u,s,i,a)),(n=c[2])&&l.push(new X(n,r,s,u,a)),(n=c[1])&&l.push(new X(n,u,o,i,s)),(n=c[0])&&l.push(new X(n,r,o,u,s))}return this},ee.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new X(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var o=t.node;if(o.length){var i,a=t.x0,l=t.y0,c=t.x1,u=t.y1,s=(a+c)/2,f=(l+u)/2;(i=o[0])&&n.push(new X(i,a,l,s,f)),(i=o[1])&&n.push(new X(i,s,l,c,f)),(i=o[2])&&n.push(new X(i,a,f,s,u)),(i=o[3])&&n.push(new X(i,s,f,c,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},ee.x=function(e){return arguments.length?(this._x=e,this):this._x},ee.y=function(e){return arguments.length?(this._y=e,this):this._y};var le=Math.PI*(3-Math.sqrt(5));var ce=function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ue={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},se=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],fe=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],he=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],de="undefined"!=typeof window&&void 0!==window.document?window.document:{},pe="fullscreenEnabled"in de&&Object.keys(ue)||se[0]in de&&se||fe[0]in de&&fe||he[0]in de&&he||[],ye={requestFullscreen:function(e){return e[pe[ue.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[pe[ue.requestFullscreen]]},get exitFullscreen(){return de[pe[ue.exitFullscreen]].bind(de)},get fullscreenPseudoClass(){return":"+pe[ue.fullscreen]},addEventListener:function(e,t,n){return de.addEventListener(pe[ue[e]],t,n)},removeEventListener:function(e,t,n){return de.removeEventListener(pe[ue[e]],t,n)},get fullscreenEnabled(){return Boolean(de[pe[ue.fullscreenEnabled]])},set fullscreenEnabled(e){},get fullscreenElement(){return de[pe[ue.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return de[("on"+pe[ue.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return de[("on"+pe[ue.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return de[("on"+pe[ue.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return de[("on"+pe[ue.fullscreenerror]).toLowerCase()]=e}};var ge=function(e){var n=e.handle,r=e.onChange,o=e.children,a=e.className,l=[];return a&&l.push(a),l.push("fullscreen"),n.active&&l.push("fullscreen-enabled"),i((function(){r&&r(n.active,n)}),[n.active]),t.createElement("div",{className:l.join(" "),ref:n.node,style:n.active?{height:"100%",width:"100%"}:void 0},o)},me=f((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=b(t),o=(0,x(S).default)(r.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExit");n.default=o})),ve=s(me),we=function(){return we=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},we.apply(this,arguments)},be=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var xe,Se=(xe=function(e,t){return xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},xe(e,t)},function(e,t){function n(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ke=function(){return ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ke.apply(this,arguments)},_e=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}c((r=r.apply(e,t||[])).next())}))},Ee=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Ce=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Ne=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then},Oe=function(e,t){return{left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-e/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-t/2}},Pe=function(e,t){return{top:(window.screen.height-t)/2,left:(window.screen.width-e)/2}};function Ae(e,t,n){var r=t.height,o=t.width,i=Ce(t,["height","width"]),a=ke({height:r,width:o,location:"no",toolbar:"no",status:"no",directories:"no",menubar:"no",scrollbars:"yes",resizable:"no",centerscreen:"yes",chrome:"yes"},i),l=window.open(e,"",Object.keys(a).map((function(e){return e+"="+a[e]})).join(", "));if(n)var c=window.setInterval((function(){try{(null===l||l.closed)&&(window.clearInterval(c),n(l))}catch(e){console.error(e)}}),1e3);return l}var je=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.openShareDialog=function(e){var n=t.props,r=n.onShareWindowClose,o=n.windowHeight,i=void 0===o?400:o,a=n.windowPosition,l=void 0===a?"windowCenter":a,c=n.windowWidth,u=void 0===c?550:c;Ae(e,ke({height:i,width:u},"windowCenter"===l?Oe(u,i):Pe(u,i)),r)},t.handleClick=function(e){return _e(t,void 0,void 0,(function(){var t,n,r,o,i,a,l,c,u,s;return Ee(this,(function(f){switch(f.label){case 0:return t=this.props,n=t.beforeOnClick,r=t.disabled,o=t.networkLink,i=t.onClick,a=t.url,l=t.openShareDialogOnClick,c=t.opts,u=o(a,c),r?[2]:(e.preventDefault(),n?(s=n(),Ne(s)?[4,s]:[3,2]):[3,2]);case 1:f.sent(),f.label=2;case 2:return l&&this.openShareDialog(u),i&&i(e,u),[2]}}))}))},t}return Se(n,e),n.prototype.render=function(){var e=this.props;e.beforeOnClick;var n=e.children,r=e.className,o=e.disabled,i=e.disabledStyle,a=e.forwardedRef;e.networkLink;var l=e.networkName;e.onShareWindowClose,e.openShareDialogOnClick,e.opts;var c=e.resetButtonStyle,u=e.style;e.url,e.windowHeight,e.windowPosition,e.windowWidth;var s=Ce(e,["beforeOnClick","children","className","disabled","disabledStyle","forwardedRef","networkLink","networkName","onShareWindowClose","openShareDialogOnClick","opts","resetButtonStyle","style","url","windowHeight","windowPosition","windowWidth"]),f=h("react-share__ShareButton",{"react-share__ShareButton--disabled":!!o,disabled:!!o},r),d=ke(ke(c?{backgroundColor:"transparent",border:"none",padding:0,font:"inherit",color:"inherit",cursor:"pointer"}:{},u),o&&i);return t.createElement("button",ke({},s,{"aria-label":s["aria-label"]||l,className:f,onClick:this.handleClick,ref:a,style:d}),n)},n.defaultProps={disabledStyle:{opacity:.6},openShareDialogOnClick:!0,resetButtonStyle:!0},n}(l),Te=je,ze=function(){return ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ze.apply(this,arguments)};var Me,Fe,Ie=(Me={color:"#3b5998",networkName:"facebook",path:"M34.1,47V33.3h4.6l0.7-5.3h-5.3v-3.4c0-1.5,0.4-2.6,2.6-2.6l2.8,0v-4.8c-0.5-0.1-2.2-0.2-4.1-0.2 c-4.1,0-6.9,2.5-6.9,7V28H24v5.3h4.6V47H34.1z"},(Fe=function(e){var n=e.bgStyle,r=e.borderRadius,o=e.iconFillColor,i=e.round,a=e.size,l=be(e,["bgStyle","borderRadius","iconFillColor","round","size"]);return t.createElement("svg",we({viewBox:"0 0 64 64",width:a,height:a},l),i?t.createElement("circle",{cx:"32",cy:"32",r:"31",fill:Me.color,style:n}):t.createElement("rect",{width:"64",height:"64",rx:r,ry:r,fill:Me.color,style:n}),t.createElement("path",{d:Me.path,fill:o}))}).defaultProps={bgStyle:{},borderRadius:0,iconFillColor:"white",size:64},Fe),De=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Re=function(e){function t(t){var n=e.call(this,t)||this;return n.name="AssertionError",n}return De(t,e),t}(Error);var Be=function(e,n,r,o){function i(i,a){var l=r(i),c=ze({},i);return Object.keys(l).forEach((function(e){delete c[e]})),t.createElement(Te,ze({},o,c,{forwardedRef:a,networkName:e,networkLink:n,opts:r(i)}))}return i.displayName="ShareButton-"+e,c(i)}("facebook",(function(e,t){var n,r,o=t.quote,i=t.hashtag;return function(e,t){if(!e)throw new Re(t)}(e,"facebook.url"),"https://www.facebook.com/sharer/sharer.php"+(n={u:e,quote:o,hashtag:i},r=Object.entries(n).filter((function(e){return null!=e[1]})).map((function(e){var t=e[0],n=e[1];return encodeURIComponent(t)+"="+encodeURIComponent(String(n))})),r.length>0?"?"+r.join("&"):"")}),(function(e){return{quote:e.quote,hashtag:e.hashtag}}),{windowWidth:550,windowHeight:400}),Le=Be,Ue=f((function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t,n){e.exports=n(2)},function(e,t,n){var r=n(4);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(6)(r,o),r.locals&&(e.exports=r.locals)},function(e,t,n){
|
|
2
2
|
/** @license React v16.5.2
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -7,10 +7,10 @@ import*as t from"react";import e,{useMemo as n,useState as r,useRef as o,useEffe
|
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
var r=n(3),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,
|
|
10
|
+
var r=n(3),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,s=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,h=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112,p="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,o,i,a,l){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,l],u=0;(e=Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||g}function w(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&y("85"),this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=v.prototype;var x=b.prototype=new w;x.constructor=b,r(x,v.prototype),x.isPureReactComponent=!0;var S={current:null,currentDispatcher:null},k=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var r=void 0,o={},a=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,r)&&!_.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var u=Array(c),s=0;s<c;s++)u[s]=arguments[s+2];o.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:i,type:e,key:a,ref:l,props:o,_owner:S.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var N=/\/+/g,O=[];function P(e,t,n,r){if(O.length){var o=O.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function A(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>O.length&&O.push(e)}function j(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var c=!1;if(null===t)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case i:case a:c=!0}}if(c)return r(o,t,""===n?"."+T(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u<t.length;u++){var s=n+T(l=t[u],u);c+=e(l,s,r,o)}else if("function"==typeof(s=null===t||"object"!=typeof t?null:"function"==typeof(s=p&&t[p]||t["@@iterator"])?s:null))for(t=s.call(t),u=0;!(l=t.next()).done;)c+=e(l=l.value,s=n+T(l,u++),r,o);else"object"===l&&y("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return c}(e,"",t,n)}function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function z(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?F(e,r,n,(function(e){return e})):null!=e&&(C(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(N,"$&/")+"/")+n)),r.push(e))}function F(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(N,"$&/")+"/"),j(e,M,t=P(t,i,r,o)),A(t)}var I={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return F(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;j(e,z,t=P(null,null,t,n)),A(t)},count:function(e){return j(e,(function(){return null}),null)},toArray:function(e){var t=[];return F(e,t,null,(function(e){return e})),t},only:function(e){return C(e)||y("143"),e}},createRef:function(){return{current:null}},Component:v,PureComponent:b,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:s,_context:e},e.Consumer=e,e.unstable_read=function(e,t){var n=S.currentDispatcher;return null===n&&y("277"),n.readContext(e,t)}.bind(null,e),e},forwardRef:function(e){return{$$typeof:d,render:e}},Fragment:l,StrictMode:c,unstable_AsyncMode:h,unstable_Profiler:u,createElement:E,cloneElement:function(e,t,n){null==e&&y("267",e);var o=void 0,a=r({},e.props),l=e.key,c=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,u=S.current),void 0!==t.key&&(l=""+t.key);var s=void 0;for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)k.call(t,o)&&!_.hasOwnProperty(o)&&(a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o])}if(1==(o=arguments.length-2))a.children=n;else if(1<o){s=Array(o);for(var f=0;f<o;f++)s[f]=arguments[f+2];a.children=s}return{$$typeof:i,type:e.type,key:l,ref:c,props:a,_owner:u}},createFactory:function(e){var t=E.bind(null,e);return t.type=e,t},isValidElement:C,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:S,assign:r}},D={default:I},R=D&&I||D;e.exports=R.default||R},function(e,t,n){
|
|
11
11
|
/*
|
|
12
12
|
object-assign
|
|
13
13
|
(c) Sindre Sorhus
|
|
14
14
|
@license MIT
|
|
15
15
|
*/
|
|
16
|
-
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,l=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var s in n=Object(arguments[u]))o.call(n,s)&&(l[s]=n[s]);if(r){a=r(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(l[a[c]]=n[a[c]])}}return l}},function(t,e,n){(t.exports=n(5)(!1)).push([t.i,".font-size-changer {\n display: inline-block; }\n .font-size-changer .font-size-changer-buttons > div {\n float: left;\n border: 1px solid;\n text-align: center;\n line-height: 40px;\n -webkit-box-sizing: border-box;\n /* Safari/Chrome, other WebKit */\n -moz-box-sizing: border-box;\n /* Firefox, other Gecko */\n box-sizing: border-box;\n -webkit-touch-callout: none;\n /* iOS Safari */\n -webkit-user-select: none;\n /* Safari */\n -khtml-user-select: none;\n /* Konqueror HTML */\n -moz-user-select: none;\n /* Firefox */\n -ms-user-select: none;\n /* Internet Explorer/Edge */\n user-select: none;\n /* Non-prefixed version, currently\r\n supported by Chrome and Opera */ }\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),i=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){var r={},o=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}((function(){return window&&document&&document.all&&!window.atob})),i=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var r=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),a=null,l=0,u=[],s=n(7);function c(t,e){for(var n=0;n<t.length;n++){var o=t[n],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(g(o.parts[a],e))}else{var l=[];for(a=0;a<o.parts.length;a++)l.push(g(o.parts[a],e));r[o.id]={id:o.id,refs:1,parts:l}}}}function f(t,e){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],l={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}return n}function h(t,e){var n=i(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=u[u.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),u.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=i(t.insertAt.before,n);n.insertBefore(e,o)}}function p(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=u.indexOf(t);e>=0&&u.splice(e,1)}function d(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=n.nc;r&&(t.attrs.nonce=r)}return y(e,t.attrs),h(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var u=l++;n=a||(a=d(e)),r=m.bind(null,n,u,!1),o=m.bind(null,n,u,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),h(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=s(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),l=t.href;t.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}.bind(null,n,e),o=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=d(e),r=function(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){p(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return c(n,e),function(t){for(var o=[],i=0;i<n.length;i++){var a=n[i];(l=r[a.id]).refs--,o.push(l)}for(t&&c(f(t,e),e),i=0;i<o.length;i++){var l;if(0===(l=o[i]).refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete r[l.id]}}}};var v=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=v(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(t,e,n){n.r(e);var r=n(0),o=n.n(r),i="up",a="down";function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var h=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?f(t):e}(this,s(e).call(this))).onClick=t.onClick.bind(f(f(t))),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(e,r.Component),function(t,e,n){e&&u(t.prototype,e),n&&u(t,n)}(e,[{key:"onClick",value:function(){(0,this.props.onClick)()}},{key:"getDefaultButtonContent",value:function(){var t=this.props.direction===i?"36px":"20px";return o.a.createElement("span",{style:{fontSize:t}},"A")}},{key:"render",value:function(){var t=this.props.direction,e=this.props,n=e.style,r=void 0===n?{}:n,i=e.customButton,a=void 0===i?this.getDefaultButtonContent():i;return o.a.createElement("div",{className:"font-size-".concat(t),style:r,onClick:this.onClick},a)}}]),e}();function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n(1);var m=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?v(t):e}(this,y(e).call(this))).handleChange.bind(v(v(t))),t.setChangeDirection.bind(v(v(t))),t.state={options:{stepSize:2,range:3},changeCount:0,changeDirection:null},t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(e,r.Component),function(t,e,n){e&&d(t.prototype,e),n&&d(t,n)}(e,[{key:"handleChange",value:function(t,e,n){this.props.onChange&&(0,this.props.onChange)(t,e,n)}},{key:"componentDidMount",value:function(){var t=this.props.options;this.setState({options:Object.assign({},this.state.options,t)})}},{key:"getFontSizeDetails",value:function(t){var e=parseFloat(t);return{value:e,unit:t.toString().replace(e.toString(),"")}}},{key:"applyFontSize",value:function(t){var e=this.state.options.stepSize,n=this.state.changeDirection===i?e:-1*e,r=window.getComputedStyle(t,null).getPropertyValue("font-size"),o=this.getFontSizeDetails(r).value,a=o+n;t.style.fontSize=a+"px",a!==o&&this.handleChange(t,a,o)}},{key:"iterateChildren",value:function(t){if(this.applyFontSize(t),t.children&&0!==t.children.length){var e=!0,n=!1,r=void 0;try{for(var o,i=t.children[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value;this.iterateChildren(a)}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}}},{key:"updateChangeCount",value:function(){var t=this.state,e=t.changeCount,n=t.changeDirection===i?1:-1;this.setState({changeCount:e+n})}},{key:"iterateElementsAndApplyFontSizeChange",value:function(){var t=this.props.targets,e=!0,n=!1,r=void 0;try{for(var o,i=t[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value,l=document.querySelectorAll(a),u=!0,s=!1,c=void 0;try{for(var f,h=l[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var p=f.value;this.iterateChildren(p)}}catch(t){s=!0,c=t}finally{try{u||null==h.return||h.return()}finally{if(s)throw c}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}this.updateChangeCount()}},{key:"validateChangePerRange",value:function(){var t=this.state,e=t.changeCount,n=t.changeDirection,r=this.state.options.range,o=!0;return n===i&&e>=r&&(o=!1),n===a&&e<=-1*r&&(o=!1),o}},{key:"initFontSizeChange",value:function(){this.validateChangePerRange()&&this.iterateElementsAndApplyFontSizeChange()}},{key:"setChangeDirection",value:function(t,e){var n=t?i:a;this.setState({changeDirection:n},e)}},{key:"onFontSizeUp",value:function(){this.setChangeDirection(!0,this.initFontSizeChange)}},{key:"onFontSizeDown",value:function(){this.setChangeDirection(!1,this.initFontSizeChange)}},{key:"getFontSizeChangerStyle",value:function(t){var e=t.style,n=void 0===e?{}:e,r=t.verticalAlignment,o=void 0!==r&&r,i=t.buttonsMargin,a=void 0===i?4:i,l=this.getFontSizeDetails(n.width||"40px"),u=this.getFontSizeDetails(n.height||"40px");return{width:(!1===o?2*l.value+a:l.value)+l.unit,height:(!1===o?u.value:2*u.value+a)+u.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(t,e){var n=e.style,r=void 0===n?{}:n,o=e.verticalAlignment,l=void 0!==o&&o,u=e.reverseOrder,s=void 0!==u&&u,c=e.buttonsMargin,f=void 0===c?4:c,h=this.getFontSizeDetails(r.width||"40px"),p=this.getFontSizeDetails(r.height||"40px"),d={width:h.value+h.unit,height:p.value+p.unit},y=f+(!1===l?h.unit:p.unit);return(t===i&&!1===s||t===a&&!0===s)&&(!1===l?d.marginRight=y:d.marginBottom=y),Object.assign({},r,d)}},{key:"render",value:function(){var t=this.props.customButtons,e=void 0===t?{}:t,n=e.up,r=e.down,l=this.getFontSizeChangerStyle(e),u=this.getFontSizeChangerButtonStyle(i,e),s=this.getFontSizeChangerButtonStyle(a,e);return o.a.createElement("div",{className:"font-size-changer",style:l},o.a.createElement("div",{className:"font-size-changer-buttons",style:l},o.a.createElement(h,{direction:i,customButton:n,onClick:this.onFontSizeUp.bind(this),style:u}),o.a.createElement(h,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:s})))}}]),e}();e.default=m}])})),lo=c(ao),uo=f((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",o="image/jpeg",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:o,jpeg:o,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r,o},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=n.charCodeAt(i);e(new Blob([o],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var o=n.createElement("a");return n.body.appendChild(o),r.href=e,o.href=t,o.href},getAndEncode:function(t){var e=3e4;l.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,o=new XMLHttpRequest;if(o.onreadystatechange=a,o.ontimeout=u,o.responseType="blob",o.timeout=e,o.open("GET",t,!0),o.send(),l.impl.options.imagePlaceholder){var i=l.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(r=i[1])}function a(){if(4===o.readyState)if(200===o.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];n(t)},e.readAsDataURL(o.response)}else r?n(r):s("cannot fetch resource: "+t+", status: "+o.status)}function u(){r?n(r):s("timeout of "+e+"ms occured while fetching resource: "+t)}function s(t){console.error(t),n("")}}))},uid:function(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,i){return a()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return o(e,t,n,i)}))})),r}));function a(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:o}};function e(e){return-1!==e.search(t)}function r(e){for(var r,o=[];null!==(r=t.exec(e));)o.push(r[1]);return o.filter((function(t){return!n.isDataUrl(t)}))}function o(t,e,r,o){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(o||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),o=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),i=function(){return{inlineAll:function e(o){return o instanceof Element?i(o).then((function(){return o instanceof HTMLImageElement?t(o).inline():Promise.all(n.asArray(o.childNodes).map((function(t){return e(t)})))})):Promise.resolve(o);function i(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},l={toSvg:u,toPng:function(t,e){return s(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return s(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return s(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return s(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:o,images:i,util:n,inliner:r,options:{}}};function u(t,e){return function(t){void 0===t.imagePlaceholder?l.impl.options.imagePlaceholder=a.imagePlaceholder:l.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?l.impl.options.cacheBust=a.cacheBust:l.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return c(t,e.filter,!0)})).then(f).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function s(t,e){return u(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var o=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var o=r.getContext("2d");o.fillStyle=e.bgcolor,o.fillRect(0,0,r.width,r.height)}return r}(t);return o.getContext("2d").drawImage(r,0,0),o}))}function c(t,e,r){return r||!e||e(t)?Promise.resolve(t).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(r){return function(t,e,r){var o=t.childNodes;return 0===o.length?Promise.resolve(e):i(e,n.asArray(o),r).then((function(){return e}));function i(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return c(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}}(t,r,e)})).then((function(e){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(o).then(i).then(a).then((function(){return e})):e;function r(){function r(t,e){function r(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:r(t,e)}r(window.getComputedStyle(t),e.style)}function o(){function r(r){var o=window.getComputedStyle(t,r),i=o.getPropertyValue("content");if(""!==i&&"none"!==i){var a=n.uid();e.className=e.className+" "+a;var l=document.createElement("style");l.appendChild(u(a,r,o)),e.appendChild(l)}function u(t,e,r){var o="."+t+":"+e,i=r.cssText?a(r):l(r);return document.createTextNode(o+"{"+i+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function l(t){return n.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){r(t)}))}function i(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function a(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(t,e)})):Promise.resolve()}function f(t){return o.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function h(t){return i.inlineAll(t).then((function(){return t}))}t.exports=l}()}));const so=require("jszip"),co=require("react-file-download"),fo=t=>{const{nodes:e,links:n}=t,r=n.map((t=>{let{source:n,target:r}=t;return{source:e[n].name,target:e[r].name,sourceType:e[n].type,targetType:e[r].type}})),{nodeMap:o,nodesTsv:i}=(t=>{let e=1e7;const n={};let r=!1;t.forEach((t=>{let{source:o,target:i,sourceType:a,targetType:l}=t;""!==i&&""!==o&&(Object.keys(n).indexOf(o)<0?(""!==a?(r=!0,n[o]={ID:e,WEIGHT:1,NODE_TYPE:a}):n[o]={ID:e,WEIGHT:1},e+=1):n[o].WEIGHT+=1,Object.keys(n).indexOf(i)<0?(""!==l?(r=!0,n[i]={ID:e,WEIGHT:1,NODE_TYPE:l}):n[i]={ID:e,WEIGHT:1},e+=1):n[i].WEIGHT+=1)}));let o=r?"ID\tLABEL\tWEIGHT\tNODE_TYPE\r\n":"ID\tLABEL\tWEIGHT\r\n";return Object.keys(n).forEach((t=>{const e=n[t].ID,i=n[t].WEIGHT,a=r?n[t].NODE_TYPE:"";o+=r?`${e}\t${t}\t${i}\t${a}\r\n`:`${e}\t${t}\t${i}\r\n`})),{nodeMap:n,nodesTsv:o}})(r),a=((t,e)=>{let n="SOURCE\tTARGET\tWEIGHT\tTYPE\r\n";return t.forEach((t=>{let{source:r,target:o}=t;if(""===o||""===r)return;const i=e[r].ID,a=e[o].ID;n+=`${i}\t${a}\t1\tUndirected\r\n`})),n})(r,o),l=new so;l.file("Node_Table.tsv",i),l.file("Edge_Table.tsv",a),l.generateAsync({type:"blob"}).then((t=>{co(t,"Gephi_generated_by_NMTL.zip")}))},ho=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"a"},e.createElement("path",{"data-name":"Rectangle 125",style:{fill:"#fff"},d:"M0 0h32v32H0z"}))),e.createElement("g",{style:{clipPath:"url(#a)"}},e.createElement("path",{d:"M-960 600h-20v-10h4v2h-2v6h16v-6h-2v-2h4zm-5.06-12.608-1.348-1.454-2.592 2.427V580h-2v8.365l-2.544-2.427-1.362 1.454 4.948 4.671z",transform:"translate(986 -574)",style:{fill:n},"data-name":"Mask Group 42"})))},po=e=>{let{fill:n="#825c0d"}=e;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_128","data-name":"Rectangle 128",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),t.createElement("g",{id:"Mask_Group_47","data-name":"Mask Group 47",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3633","data-name":"Group 3633",transform:"translate(6 6)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M514 371v-2h-2v2h-2v2h2v2h2v-2h2v-2z",transform:"translate(-495 -369)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632",transform:"translate(0 2)"},t.createElement("path",{id:"Path_182","data-name":"Path 182",className:"cls-3",d:"M502.276 371h3.447L512 389h-3.164l-1.595-5.129h-6.586L499.036 389H496zm-.926 10.649h5.17l-.746-2.419c-.643-1.953-1.209-3.956-1.776-5.983h-.128a126.193 126.193 0 0 1-1.748 5.983z",transform:"translate(-496 -371)"})))))},yo=e=>{let{fill:n="#825c0d"}=e;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_129","data-name":"Rectangle 129",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),t.createElement("g",{id:"Mask_Group_48","data-name":"Mask Group 48",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3635","data-name":"Group 3635",transform:"translate(6 8)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M510 371v2h6v-2z",transform:"translate(-495 -371)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632"},t.createElement("path",{id:"Path_182","data-name":"Path 182",className:"cls-3",d:"M502.276 371h3.447L512 389h-3.164l-1.595-5.129h-6.586L499.036 389H496zm-.926 10.649h5.17l-.746-2.419c-.643-1.953-1.209-3.956-1.776-5.983h-.128a126.193 126.193 0 0 1-1.748 5.983z",transform:"translate(-496 -371)"})))))},go=e=>{let{fill:n="#825c0d"}=e;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_124","data-name":"Rectangle 124",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),t.createElement("g",{id:"Mask_Group_46","data-name":"Mask Group 46",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3629","data-name":"Group 3629",transform:"translate(6 6.001)"},t.createElement("path",{id:"Path_176","data-name":"Path 176",className:"cls-3",d:"M-721 1949.376h2.5v-3.755h3.755v-2.5H-721z",transform:"translate(721.003 -1943.118)"}),t.createElement("path",{id:"Path_177","data-name":"Path 177",className:"cls-3",d:"M-721 1960.376h6.258v-2.5h-3.758v-3.755h-2.5z",transform:"translate(721.003 -1940.376)"}),t.createElement("path",{id:"Path_178","data-name":"Path 178",className:"cls-3",d:"M-703.744 1943.118H-710v2.5h3.755v3.755h2.5z",transform:"translate(723.744 -1943.118)"}),t.createElement("path",{id:"Path_179","data-name":"Path 179",className:"cls-3",d:"M-703.744 1960.376v-6.259h-2.5v3.755H-710v2.5z",transform:"translate(723.744 -1940.376)"}))))};k(".extraTools {\n width: 100%;\n display: inline-flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n padding: 0px 20px;\n padding-top: 12px; }\n .extraTools__share button {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__download {\n cursor: pointer; }\n .extraTools__download-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fullscreenBtn {\n cursor: pointer;\n padding-top: 0; }\n .extraTools__fullscreenBtn-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fontsize {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-changer,\n .extraTools .font-size-changer-buttons,\n .extraTools .font-size-up,\n .extraTools .font-size-down,\n .extraTools .tooltip {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .extraTools .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .extraTools .fullscreenExit {\n text-align: right;\n cursor: pointer;\n border: 0; }\n .extraTools #download-menu .MuiMenuItem-root {\n color: #4e3a16;\n width: auto;\n overflow: hidden;\n font-size: 1rem;\n box-sizing: border-box;\n min-height: 48px;\n font-weight: 400;\n line-height: 1;\n padding-top: 1rem;\n white-space: initial;\n border-bottom: 0;\n letter-spacing: 0.00938em;\n padding-bottom: 1rem; }\n");const vo=t=>{let{className:n}=t;return e.createElement("div",{className:h("extraTools__share",n)},e.createElement(io,{url:document.location.href},e.createElement(eo,{size:32,round:!0})))};vo.defaultProps={className:void 0},vo.propTypes={className:s.string};const mo=t=>{let{className:n,intl:o,exclude:i,iconColor:a,SNAData:l,domToImageId:u}=t;const[s,c]=r(null),f=[{key:"downloadImage",onClick:()=>(t=>{let{id:e,fileName:n="image",quality:r=.95}=t;const o=document.getElementById(e),i=document.getElementById("yaxis"),a=document.getElementById("barChart__block");i&&i.setAttribute("transform","translate(0, 0 )"),uo.toPng(o,{quality:r}).then((t=>{const e=document.createElement("a");e.download=`${n}.png`,e.href=t,e.click(),i&&a&&(i.setAttribute("transform","translate(0, 0 )"),i.setAttribute("transform",`translate(${a.scrollLeft}, 0)`))})).catch((t=>{console.error("oops, something went wrong!",t)}))})({id:u}),label:o?"knowledge.writersAndWorksSNA.download.img":"下載圖片"},{key:"downloadTsv",onClick:()=>fo(l),label:o?"knowledge.writersAndWorksSNA.download.gephi":"下載Gephi"},{key:"downloadXls",onClick:()=>(t=>{let e,{data:n,dataType:r,extType:o="xlsx"}=t;e="sna"===r?b(n):n;_(`\ufeff${x(e)}`,`output.${o}`)})({data:l,dataType:"sna",extType:"xlsx"}),label:o?"knowledge.writersAndWorksSNA.download.xls":"下載Excel"}];return e.createElement("div",{className:h("extraTools__download",n)},e.createElement(w,{title:o?o.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},e.createElement("div",{className:"extraTools__download-icon",onClick:t=>c(t.currentTarget)},e.createElement(ho,{fill:a}))),e.createElement(v,{id:"download-menu",anchorEl:s,keepMounted:!0,open:Boolean(s),onClose:()=>c(null)},f.map((t=>{let{key:n,onClick:r,label:a}=t;return l=n,!((i||[]).filter((t=>t===l)).length>0)&&e.createElement(m,{key:n,onClick:r},o?o.formatMessage({id:a}):a);var l}))))};mo.defaultProps={className:void 0,intl:void 0,exclude:void 0,SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph"},mo.propTypes={className:s.string,intl:s.objectOf(s.any),exclude:s.arrayOf(s.string),SNAData:s.objectOf(s.any),iconColor:s.string,domToImageId:s.string};const wo=t=>{let{className:n,intl:r,iconColor:o,fullScreenHandle:i}=t;const{enter:a}=i||{enter:()=>{}};return e.createElement("div",{className:h("extraTools__fullscreenBtn",n)},e.createElement(w,{title:r?r.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},e.createElement("div",{className:"extraTools__fullscreenBtn-icon",onClick:a},e.createElement(go,{fill:o}))))};wo.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",fullScreenHandle:void 0},wo.propTypes={className:s.string,intl:s.objectOf(s.any),iconColor:s.string,fullScreenHandle:s.objectOf(s.any)};const bo=t=>{let{className:n,intl:r,iconColor:o,FontSizeTargets:i,FontSizeOptions:a}=t;return e.createElement("div",{className:h("extraTools__fontsize",n)},e.createElement(lo,{targets:i,options:a,customButtons:{up:e.createElement(w,{title:r?r.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},e.createElement(po,{fill:o})),down:e.createElement(w,{title:r?r.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},e.createElement(yo,{fill:o})),style:{border:"none"},buttonsMargin:10}}))};bo.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1}},bo.propTypes={className:s.string,intl:s.objectOf(s.any),iconColor:s.string,FontSizeTargets:s.arrayOf(s.string),FontSizeOptions:s.objectOf(s.any)};const _o=t=>{let{className:n,intl:r,exclude:o,SNAData:i,iconColor:a,domToImageId:l,FontSizeTargets:u,FontSizeOptions:s,fullScreenHandle:c}=t;const f={intl:r,exclude:o,SNAData:i,iconColor:a,domToImageId:l,FontSizeTargets:u,FontSizeOptions:s,fullScreenHandle:c},p=[{keys:["share"],Component:vo},{keys:["downloadImage","downloadTsv","downloadXls"],Component:mo},{keys:["fullscreen"],Component:wo},{keys:["fontSizeChanger"],Component:bo}];return e.createElement("div",{className:h("extraTools",n)},p.map((t=>{let{keys:n,Component:r}=t;return!(t=>(o||[]).filter((e=>t.some((t=>t===e)))).length===t.length)(n)&&e.createElement(r,g({key:n[0]},f))})))};_o.ShareButton=vo,_o.DownloadMenu=mo,_o.FullscreenBtn=wo,_o.FontSizeChanger=bo,_o.defaultProps={className:void 0,intl:void 0,exclude:["downloadXls"],SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1},fullScreenHandle:void 0},_o.propTypes={className:s.string,intl:s.objectOf(s.any),exclude:s.arrayOf(s.string),SNAData:s.objectOf(s.any),iconColor:s.string,domToImageId:s.string,FontSizeTargets:s.arrayOf(s.string),FontSizeOptions:s.objectOf(s.any),fullScreenHandle:s.objectOf(s.any)};k(".SNA {\n overflow: hidden;\n object-fit: contain;\n position: relative;\n font-size: 0.75rem;\n width: 100%; }\n .SNA--smallSize .node {\n padding-top: 8px;\n font-size: 0.75rem;\n width: 3rem;\n height: 3rem;\n overflow: hidden;\n white-space: pre-wrap;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical; }\n .SNA .node {\n background-color: #4a4e69;\n border-radius: 50%;\n color: #fff;\n font-size: 20px;\n font-weight: 500;\n height: 54px;\n width: 54px;\n padding-top: 15px;\n position: absolute;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: grab; }\n .SNA .links line {\n stroke: #c7bfb4;\n stroke-width: 2; }\n .SNA .mainNode {\n fill: #4e3a16; }\n .SNA .person {\n fill: #867b3a; }\n .SNA .publication {\n fill: #825c0d; }\n .SNA .article {\n fill: #afafaf; }\n .SNA .keyword {\n fill: #fcfae8; }\n .SNA .org {\n fill: #000000; }\n\n@media only screen and (max-width: 484px) {\n .SNA {\n margin-left: 0px; }\n .SNA .node {\n background-color: #4a4e69;\n border-radius: 50%;\n color: #fff;\n font-size: 1px;\n font-weight: 500;\n height: 44px;\n width: 44px;\n padding-top: 12px;\n position: absolute;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: grab; } }\n\n@media only screen and (max-width: 484px) {\n .SNA {\n margin-left: 0px; } }\n");var xo=function(t){var l=t.className,u=t.intl,s=t.exclude,c=t.distance,f=t.SNAData,p=t.handleClickNodeGoto,d=t.width,y=t.height,g=t.fontColor,v=t.backgroundColor,m=t.iconColor;if(!f||0===f.nodes.length)return e.createElement("div",{className:"noData"},u?u.formatMessage({id:"common.noData"}):"暫無資料");var w=function(){var t=r(!1),e=t[0],l=t[1],u=o(null);i((function(){var t=function(){l(zr.fullscreenElement===u.current)};return zr.addEventListener("fullscreenchange",t),function(){return zr.removeEventListener("fullscreenchange",t)}}),[]);var s=a((function(){return zr.fullscreenElement?zr.exitFullscreen().then((function(){return zr.requestFullscreen(u.current)})):u.current?zr.requestFullscreen(u.current):void 0}),[]),c=a((function(){return zr.fullscreenElement===u.current?zr.exitFullscreen():Promise.resolve()}),[]);return n((function(){return{active:e,enter:s,exit:c,node:u}}),[e,s,c])}(),b=n((function(){return w.active?screen.width:screen.width>1050?d:screen.width-80}),[w.active,screen.width]),_=n((function(){return w.active?screen.height:screen.width>1050?y:screen.height-300}),[w.active,screen.width]),x=function(t,e,n){var r=function(t,e,n){var r=.5*(e.x+t.x),o=.5*(e.y+t.y),i=e.x-t.x,a=e.y-t.y,l=Math.pow(Math.pow(i,2)+Math.pow(a,2),.5);return{qx:r-a*n/l,qy:o+i*n/l}}(t,e,n),o=r.qx,i=r.qy;return isNaN(o)?"M".concat(t.x,", ").concat(t.y," Q0 0 ").concat(e.x," ").concat(e.y):"M".concat(t.x,", ").concat(t.y," Q").concat(o," ").concat(i," ").concat(e.x," ").concat(e.y)},k=function(t){var e=8.5,n="-0 -".concat(e," ").concat(17," ").concat(17),r="M 0,-".concat(6.800000000000001," L ").concat(13.600000000000001," ,0 L 0,").concat(6.800000000000001),o=Sr(Nr),i=t.links.map((function(t){return Object.create(t)})),a=t.nodes.map((function(t){return Object.create(t)})),l=function(t){var e,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,a=.6,l=nr(),u=hn(c),s=C("tick","end");function c(){f(),s.call("tick",e),n<r&&(u.stop(),s.call("end",e))}function f(r){var u,s,c=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(i-n)*o,l.each((function(t){t(n)})),u=0;u<c;++u)null==(s=t[u]).fx?s.x+=s.vx*=a:(s.x=s.fx,s.vx=0),null==s.fy?s.y+=s.vy*=a:(s.y=s.fy,s.vy=0);return e}function h(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var o=10*Math.sqrt(n),i=n*_r;e.x=o*Math.cos(i),e.y=o*Math.sin(i)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),h(),e={tick:f,restart:function(){return u.restart(c),e},stop:function(){return u.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),l.each(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(o=+t,e):+o},alphaTarget:function(t){return arguments.length?(i=+t,e):i},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},force:function(t,n){return arguments.length>1?(null==n?l.remove(t):l.set(t,p(n)),e):l.get(t)},find:function(e,n,r){var o,i,a,l,u,s=0,c=t.length;for(null==r?r=1/0:r*=r,s=0;s<c;++s)(a=(o=e-(l=t[s]).x)*o+(i=n-l.y)*i)<r&&(u=l,r=a);return u},on:function(t,n){return arguments.length>1?(s.on(t,n),e):s.on(t)}}}(a).force("link",function(t){var e,n,r,o,i,a=vr,l=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},u=ir(30),s=1;function c(r){for(var o=0,a=t.length;o<s;++o)for(var l,u,c,f,h,p,d,y=0;y<a;++y)u=(l=t[y]).source,f=(c=l.target).x+c.vx-u.x-u.vx||ar(),h=c.y+c.vy-u.y-u.vy||ar(),f*=p=((p=Math.sqrt(f*f+h*h))-n[y])/p*r*e[y],h*=p,c.vx-=f*(d=i[y]),c.vy-=h*d,u.vx+=f*(d=1-d),u.vy+=h*d}function f(){if(r){var l,u,s=r.length,c=t.length,f=nr(r,a);for(l=0,o=new Array(s);l<c;++l)(u=t[l]).index=l,"object"!=typeof u.source&&(u.source=mr(f,u.source)),"object"!=typeof u.target&&(u.target=mr(f,u.target)),o[u.source.index]=(o[u.source.index]||0)+1,o[u.target.index]=(o[u.target.index]||0)+1;for(l=0,i=new Array(c);l<c;++l)u=t[l],i[l]=o[u.source.index]/(o[u.source.index]+o[u.target.index]);e=new Array(c),h(),n=new Array(c),p()}}function h(){if(r)for(var n=0,o=t.length;n<o;++n)e[n]=+l(t[n],n,t)}function p(){if(r)for(var e=0,o=t.length;e<o;++e)n[e]=+u(t[e],e,t)}return null==t&&(t=[]),c.initialize=function(t){r=t,f()},c.links=function(e){return arguments.length?(t=e,f(),c):t},c.id=function(t){return arguments.length?(a=t,c):a},c.iterations=function(t){return arguments.length?(s=+t,c):s},c.strength=function(t){return arguments.length?(l="function"==typeof t?t:ir(+t),h(),c):l},c.distance=function(t){return arguments.length?(u="function"==typeof t?t:ir(+t),p(),c):u},c}(i).id((function(t){return t.index})).distance(50)).force("charge",function(){var t,e,n,r,o=ir(-30),i=1,a=1/0,l=.81;function u(r){var o,i=t.length,a=fr(t,wr,br).visitAfter(c);for(n=r,o=0;o<i;++o)e=t[o],a.visit(f)}function s(){if(t){var e,n,i=t.length;for(r=new Array(i),e=0;e<i;++e)n=t[e],r[n.index]=+o(n,e,t)}}function c(t){var e,n,o,i,a,l=0,u=0;if(t.length){for(o=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(l+=e.value,u+=n,o+=n*e.x,i+=n*e.y);t.x=o/u,t.y=i/u}else{(e=t).x=e.data.x,e.y=e.data.y;do{l+=r[e.data.index]}while(e=e.next)}t.value=l}function f(t,o,u,s){if(!t.value)return!0;var c=t.x-e.x,f=t.y-e.y,h=s-o,p=c*c+f*f;if(h*h/l<p)return p<a&&(0===c&&(p+=(c=ar())*c),0===f&&(p+=(f=ar())*f),p<i&&(p=Math.sqrt(i*p)),e.vx+=c*t.value*n/p,e.vy+=f*t.value*n/p),!0;if(!(t.length||p>=a)){(t.data!==e||t.next)&&(0===c&&(p+=(c=ar())*c),0===f&&(p+=(f=ar())*f),p<i&&(p=Math.sqrt(i*p)));do{t.data!==e&&(h=r[t.data.index]*n/p,e.vx+=c*h,e.vy+=f*h)}while(t=t.next)}}return u.initialize=function(e){t=e,s()},u.strength=function(t){return arguments.length?(o="function"==typeof t?t:ir(+t),s(),u):o},u.distanceMin=function(t){return arguments.length?(i=t*t,u):Math.sqrt(i)},u.distanceMax=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.theta=function(t){return arguments.length?(l=t*t,u):Math.sqrt(l)},u}().strength(-160)).force("center",function(t,e){var n;function r(){var r,o,i=n.length,a=0,l=0;for(r=0;r<i;++r)a+=(o=n[r]).x,l+=o.y;for(a=a/i-t,l=l/i-e,r=0;r<i;++r)(o=n[r]).x-=a,o.y-=l}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r}(b/2,_/2)).force("collide",function(t){var e,n,r=1,o=1;function i(){for(var t,i,l,u,s,c,f,h=e.length,p=0;p<o;++p)for(i=fr(e,yr,gr).visitAfter(a),t=0;t<h;++t)l=e[t],c=n[l.index],f=c*c,u=l.x+l.vx,s=l.y+l.vy,i.visit(d);function d(t,e,n,o,i){var a=t.data,h=t.r,p=c+h;if(!a)return e>u+p||o<u-p||n>s+p||i<s-p;if(a.index>l.index){var d=u-a.x-a.vx,y=s-a.y-a.vy,g=d*d+y*y;g<p*p&&(0===d&&(g+=(d=ar())*d),0===y&&(g+=(y=ar())*y),g=(p-(g=Math.sqrt(g)))/g*r,l.vx+=(d*=g)*(p=(h*=h)/(f+h)),l.vy+=(y*=g)*p,a.vx-=d*(p=1-p),a.vy-=y*p)}}}function a(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function l(){if(e){var r,o,i=e.length;for(n=new Array(i),r=0;r<i;++r)o=e[r],n[o.index]=+t(o,r,e)}}return"function"!=typeof t&&(t=ir(null==t?1:+t)),i.initialize=function(t){e=t,l()},i.iterations=function(t){return arguments.length?(o=+t,i):o},i.strength=function(t){return arguments.length?(r=+t,i):r},i.radius=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),l(),i):t},i}().radius((function(){return 13.5})).iterations(5)).force("x",function(t){var e,n,r,o=ir(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vx+=(r[i]-o.x)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=ir(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:ir(+t),a(),i):o},i.x=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),a(),i):t},i}(b/2)).force("y",function(t){var e,n,r,o=ir(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vy+=(r[i]-o.y)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=ir(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:ir(+t),a(),i):o},i.y=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),a(),i):t},i}(_/2)).force("radial",function(t,e,n){var r,o,i,a=ir(.1);function l(t){for(var a=0,l=r.length;a<l;++a){var u=r[a],s=u.x-e||1e-6,c=u.y-n||1e-6,f=Math.sqrt(s*s+c*c),h=(i[a]-f)*o[a]*t/f;u.vx+=s*h,u.vy+=c*h}}function u(){if(r){var e,n=r.length;for(o=new Array(n),i=new Array(n),e=0;e<n;++e)i[e]=+t(r[e],e,r),o[e]=isNaN(i[e])?0:+a(r[e],e,r)}}return"function"!=typeof t&&(t=ir(+t)),null==e&&(e=0),null==n&&(n=0),l.initialize=function(t){r=t,u()},l.strength=function(t){return arguments.length?(a="function"==typeof t?t:ir(+t),u(),l):a},l.radius=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),u(),l):t},l.x=function(t){return arguments.length?(e=+t,l):e},l.y=function(t){return arguments.length?(n=+t,l):n},l}(100,b/2,_/2)),s=Ht(".chart").append("svg").attr("viewBox",[0,0,b,_]).style("background-color",v);s.append("defs").append("marker").attr("id","arrowhead").attr("viewBox",n).attr("refX",23.8).attr("refY",0).attr("orient","auto").attr("markerWidth",15.3).attr("markerHeight",15.3).attr("xoverflow","visible").append("svg:path").attr("d",r).attr("fill","#999").style("stroke","none");var c=s.append("g").attr("stroke","#999").attr("stroke-opacity",.6).selectAll("line").data(i).join("path").attr("fill","none").attr("stroke-dasharray",(function(t){return"protege"===t.ontology?"2,5,3":""})).attr("key",(function(t){return t.type})).attr("marker-end","url(#arrowhead)"),f=s.append("g").attr("stroke","#fff").attr("stroke-width",1.5).selectAll("circle").data(a).join("circle").attr("r",(function(t){return"mainNode"===t.type?13.5:e})).attr("fill",(function(t){return o(t.type)})).attr("key",(function(t){return t.type})).attr("class",(function(t){return"node node-".concat(t.id," ").concat(t.type&&"organization"===t.type?"org":"person"===t.type?"person":"publication"===t.type?"publication":"mainNode"===t.type?"mainNode":"article"===t.type?"article":"keyword"===t.type?"keyword":"event"===t.type?"event":"")})).on("click",(function(t){return t.hasClick?p({name:t.name,id:t.id,type:t.type}):null})).call(function(t){return re().on("start",(function(e){Ot.active||t.alphaTarget(.3).restart(),e.fx=e.x,e.fy=e.y})).on("drag",(function(t){t.fx=Ot.x>b||Ot.x<0?t.x:Ot.x,t.fy=Ot.y>_||Ot.y<0?t.y:Ot.y}))}(l));f.append("title").text((function(t){return"".concat(t.name,"-").concat(function(t){switch(t){case"mainNode":return u?u.formatMessage({id:"SNA.search.center"}):"主要搜尋中心";case"organization":return u?u.formatMessage({id:"SNA.organization"}):"組織";case"person":return u?u.formatMessage({id:"SNA.author"}):"作家";case"publication":return u?u.formatMessage({id:"SNA.publication"}):"作家";case"article":return u?u.formatMessage({id:"SNA.article"}):"單篇作品";case"keyword":return u?u.formatMessage({id:"SNA.keyword"}):"關鍵字";case"event":return u?u.formatMessage({id:"SNA.event"}):"事件";default:return""}}(t.type))}));var h=s.append("g").selectAll("text").data(a).join("text").attr("fill",g).attr("text-anchor","middle").attr("key",(function(t){return t.type})).style("color","#fff").style("font-size","14px").text((function(t){return t.name})),d=s.selectAll(".edgepath").data(i).enter().append("path").attr("class","edgepath").attr("fill-opacity",0).attr("stroke-opacity",0).attr("id",(function(t,e){return"edgepath".concat(e)})).style("pointer-events","none");s.selectAll(".edgelabel").data(i).enter().append("text").style("pointer-events","none").attr("class","edgelabel").attr("font-size","10px").attr("fill","#aaa").attr("visibility","visible").attr("key",(function(t){return t.type})).attr("id",(function(t,e){return"edgelabel".concat(e)})).append("textPath").attr("xlink:href",(function(t,e){return"#edgepath".concat(e)})).style("text-anchor","middle").style("pointer-events","none").attr("startOffset","50%").text((function(t){return t.property})),l.on("tick",(function(){c.attr("d",(function(t){return x(t.source,t.target,30)})),f.attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})),h.attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y-e})),d.attr("d",(function(t){return x(t.source,t.target,30)}))}))};return i((function(){if(f&&f.nodes&&f.nodes.length>0){var t=document.getElementById("network-graph");t&&t.childNodes[0]&&t.removeChild(t.childNodes[0]),k(f)}}),[f,w.active]),e.createElement("div",{className:h("SNA",{"SNA--smallSize":c<200},l),style:{contentWidth:b,contentHeight:_,backgroundColor:v}},e.createElement(_o,{intl:u,SNAData:f,iconColor:m,domToImageId:"network-graph",fullScreenHandle:w,exclude:s}),e.createElement(Fr,{handle:w},e.createElement("div",{className:"chart",id:"network-graph"},w.active&&e.createElement("div",{className:"fullscreenExit",style:{backgroundColor:v}},e.createElement(Dr,{fontSize:"large",style:{color:m},onClick:w.exit,title:u?u.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreenExit"}):"離開全螢幕"})))))};xo.defaultProps={className:void 0,intl:void 0,width:1050,height:600,distance:400,SNAData:null,fontColor:"#000000",backgroundColor:"#FFFFFF",iconColor:"#825c0d",exclude:["downloadXls"],handleClickNodeGoto:null},xo.propTypes={className:s.string,intl:s.objectOf(s.any),width:s.number,height:s.number,distance:s.number,SNAData:s.objectOf(s.any),fontColor:s.string,backgroundColor:s.string,iconColor:s.string,exclude:s.arrayOf(s.string),handleClickNodeGoto:s.func};export{xo as default};
|
|
16
|
+
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))o.call(n,u)&&(l[u]=n[u]);if(r){a=r(n);for(var s=0;s<a.length;s++)i.call(n,a[s])&&(l[a[s]]=n[a[s]])}}return l}},function(e,t,n){(e.exports=n(5)(!1)).push([e.i,".font-size-changer {\n display: inline-block; }\n .font-size-changer .font-size-changer-buttons > div {\n float: left;\n border: 1px solid;\n text-align: center;\n line-height: 40px;\n -webkit-box-sizing: border-box;\n /* Safari/Chrome, other WebKit */\n -moz-box-sizing: border-box;\n /* Firefox, other Gecko */\n box-sizing: border-box;\n -webkit-touch-callout: none;\n /* iOS Safari */\n -webkit-user-select: none;\n /* Safari */\n -khtml-user-select: none;\n /* Konqueror HTML */\n -moz-user-select: none;\n /* Firefox */\n -ms-user-select: none;\n /* Internet Explorer/Edge */\n user-select: none;\n /* Non-prefixed version, currently\r\n supported by Chrome and Opera */ }\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var r={},o=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}((function(){return window&&document&&document.all&&!window.atob})),i=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),a=null,l=0,c=[],u=n(7);function s(e,t){for(var n=0;n<e.length;n++){var o=e[n],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(g(o.parts[a],t))}else{var l=[];for(a=0;a<o.parts.length;a++)l.push(g(o.parts[a],t));r[o.id]={id:o.id,refs:1,parts:l}}}}function f(e,t){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=t.base?i[0]+t.base:i[0],l={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}return n}function h(e,t){var n=i(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=c[c.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),c.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=i(e.insertAt.before,n);n.insertBefore(t,o)}}function d(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=c.indexOf(e);t>=0&&c.splice(t,1)}function p(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=n.nc;r&&(e.attrs.nonce=r)}return y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function g(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var c=l++;n=a||(a=p(t)),r=v.bind(null,n,c,!1),o=v.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=u(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=p(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return s(n,t),function(e){for(var o=[],i=0;i<n.length;i++){var a=n[i];(l=r[a.id]).refs--,o.push(l)}for(e&&s(f(e,t),t),i=0;i<o.length;i++){var l;if(0===(l=o[i]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete r[l.id]}}}};var m=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function v(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=m(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(e,t,n){n.r(t);var r=n(0),o=n.n(r),i="up",a="down";function l(e){return(l="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})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var h=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?f(e):t}(this,u(t).call(this))).onClick=e.onClick.bind(f(f(e))),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,r.Component),function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(t,[{key:"onClick",value:function(){(0,this.props.onClick)()}},{key:"getDefaultButtonContent",value:function(){var e=this.props.direction===i?"36px":"20px";return o.a.createElement("span",{style:{fontSize:e}},"A")}},{key:"render",value:function(){var e=this.props.direction,t=this.props,n=t.style,r=void 0===n?{}:n,i=t.customButton,a=void 0===i?this.getDefaultButtonContent():i;return o.a.createElement("div",{className:"font-size-".concat(e),style:r,onClick:this.onClick},a)}}]),t}();function d(e){return(d="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})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(1);var v=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?m(e):t}(this,y(t).call(this))).handleChange.bind(m(m(e))),e.setChangeDirection.bind(m(m(e))),e.state={options:{stepSize:2,range:3},changeCount:0,changeDirection:null},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(t,r.Component),function(e,t,n){t&&p(e.prototype,t),n&&p(e,n)}(t,[{key:"handleChange",value:function(e,t,n){this.props.onChange&&(0,this.props.onChange)(e,t,n)}},{key:"componentDidMount",value:function(){var e=this.props.options;this.setState({options:Object.assign({},this.state.options,e)})}},{key:"getFontSizeDetails",value:function(e){var t=parseFloat(e);return{value:t,unit:e.toString().replace(t.toString(),"")}}},{key:"applyFontSize",value:function(e){var t=this.state.options.stepSize,n=this.state.changeDirection===i?t:-1*t,r=window.getComputedStyle(e,null).getPropertyValue("font-size"),o=this.getFontSizeDetails(r).value,a=o+n;e.style.fontSize=a+"px",a!==o&&this.handleChange(e,a,o)}},{key:"iterateChildren",value:function(e){if(this.applyFontSize(e),e.children&&0!==e.children.length){var t=!0,n=!1,r=void 0;try{for(var o,i=e.children[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;this.iterateChildren(a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}}},{key:"updateChangeCount",value:function(){var e=this.state,t=e.changeCount,n=e.changeDirection===i?1:-1;this.setState({changeCount:t+n})}},{key:"iterateElementsAndApplyFontSizeChange",value:function(){var e=this.props.targets,t=!0,n=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value,l=document.querySelectorAll(a),c=!0,u=!1,s=void 0;try{for(var f,h=l[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var d=f.value;this.iterateChildren(d)}}catch(e){u=!0,s=e}finally{try{c||null==h.return||h.return()}finally{if(u)throw s}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}this.updateChangeCount()}},{key:"validateChangePerRange",value:function(){var e=this.state,t=e.changeCount,n=e.changeDirection,r=this.state.options.range,o=!0;return n===i&&t>=r&&(o=!1),n===a&&t<=-1*r&&(o=!1),o}},{key:"initFontSizeChange",value:function(){this.validateChangePerRange()&&this.iterateElementsAndApplyFontSizeChange()}},{key:"setChangeDirection",value:function(e,t){var n=e?i:a;this.setState({changeDirection:n},t)}},{key:"onFontSizeUp",value:function(){this.setChangeDirection(!0,this.initFontSizeChange)}},{key:"onFontSizeDown",value:function(){this.setChangeDirection(!1,this.initFontSizeChange)}},{key:"getFontSizeChangerStyle",value:function(e){var t=e.style,n=void 0===t?{}:t,r=e.verticalAlignment,o=void 0!==r&&r,i=e.buttonsMargin,a=void 0===i?4:i,l=this.getFontSizeDetails(n.width||"40px"),c=this.getFontSizeDetails(n.height||"40px");return{width:(!1===o?2*l.value+a:l.value)+l.unit,height:(!1===o?c.value:2*c.value+a)+c.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(e,t){var n=t.style,r=void 0===n?{}:n,o=t.verticalAlignment,l=void 0!==o&&o,c=t.reverseOrder,u=void 0!==c&&c,s=t.buttonsMargin,f=void 0===s?4:s,h=this.getFontSizeDetails(r.width||"40px"),d=this.getFontSizeDetails(r.height||"40px"),p={width:h.value+h.unit,height:d.value+d.unit},y=f+(!1===l?h.unit:d.unit);return(e===i&&!1===u||e===a&&!0===u)&&(!1===l?p.marginRight=y:p.marginBottom=y),Object.assign({},r,p)}},{key:"render",value:function(){var e=this.props.customButtons,t=void 0===e?{}:e,n=t.up,r=t.down,l=this.getFontSizeChangerStyle(t),c=this.getFontSizeChangerButtonStyle(i,t),u=this.getFontSizeChangerButtonStyle(a,t);return o.a.createElement("div",{className:"font-size-changer",style:l},o.a.createElement("div",{className:"font-size-changer-buttons",style:l},o.a.createElement(h,{direction:i,customButton:n,onClick:this.onFontSizeUp.bind(this),style:c}),o.a.createElement(h,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:u})))}}]),t}();t.default=v}])})),He=s(Ue),qe=f((function(e){!function(t){var n=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var n=e(t).toLowerCase();return(r="application/font-woff",o="image/jpeg",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:o,jpeg:o,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r,o},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var n=window.atob(e.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=n.charCodeAt(i);t(new Blob([o],{type:"image/png"}))}))}(e)},resolveUrl:function(e,t){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var o=n.createElement("a");return n.body.appendChild(o),r.href=t,o.href=e,o.href},getAndEncode:function(e){var t=3e4;l.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,o=new XMLHttpRequest;if(o.onreadystatechange=a,o.ontimeout=c,o.responseType="blob",o.timeout=t,o.open("GET",e,!0),o.send(),l.impl.options.imagePlaceholder){var i=l.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(r=i[1])}function a(){if(4===o.readyState)if(200===o.status){var t=new FileReader;t.onloadend=function(){var e=t.result.split(/,/)[1];n(e)},t.readAsDataURL(o.response)}else r?n(r):u("cannot fetch resource: "+e+", status: "+o.status)}function c(){r?n(r):u("timeout of "+t+"ms occured while fetching resource: "+e)}function u(e){console.error(e),n("")}}))},uid:function(){var e=0;return function(){return"u"+t()+e++;function t(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}(),delay:function(e){return function(t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))}},asArray:function(e){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src=e}))},width:function(e){var n=t(e,"border-left-width"),r=t(e,"border-right-width");return e.scrollWidth+n+r},height:function(e){var n=t(e,"border-top-width"),r=t(e,"border-bottom-width");return e.scrollHeight+n+r}};function e(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function t(e,t){var n=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(n.replace("px",""))}}(),r=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,n,i){return a()?Promise.resolve(e):Promise.resolve(e).then(r).then((function(t){var r=Promise.resolve(e);return t.forEach((function(e){r=r.then((function(t){return o(t,e,n,i)}))})),r}));function a(){return!t(e)}},shouldProcess:t,impl:{readUrls:r,inline:o}};function t(t){return-1!==t.search(e)}function r(t){for(var r,o=[];null!==(r=e.exec(t));)o.push(r[1]);return o.filter((function(e){return!n.isDataUrl(e)}))}function o(e,t,r,o){return Promise.resolve(t).then((function(e){return r?n.resolveUrl(e,r):e})).then(o||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t))})).then((function(r){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+n.escape(e)+")(['\"]?\\))","g")}(t),"$1"+r+"$3")}))}}(),o=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(e){var t=[];return e.forEach((function(e){try{n.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return r.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return r.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),i=function(){return{inlineAll:function t(o){return o instanceof Element?i(o).then((function(){return o instanceof HTMLImageElement?e(o).inline():Promise.all(n.asArray(o.childNodes).map((function(e){return t(e)})))})):Promise.resolve(o);function i(e){var t=e.style.getPropertyValue("background");return t?r.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}},impl:{newImage:e}};function e(e){return{inline:function(t){return n.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e.src))})).then((function(t){return new Promise((function(n,r){e.onload=n,e.onerror=r,e.src=t}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},l={toSvg:c,toPng:function(e,t){return u(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return u(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,t){return u(e,t||{}).then(n.canvasToBlob)},toPixelData:function(e,t){return u(e,t||{}).then((function(t){return t.getContext("2d").getImageData(0,0,n.width(e),n.height(e)).data}))},impl:{fontFaces:o,images:i,util:n,inliner:r,options:{}}};function c(e,t){return function(e){void 0===e.imagePlaceholder?l.impl.options.imagePlaceholder=a.imagePlaceholder:l.impl.options.imagePlaceholder=e.imagePlaceholder;void 0===e.cacheBust?l.impl.options.cacheBust=a.cacheBust:l.impl.options.cacheBust=e.cacheBust}(t=t||{}),Promise.resolve(e).then((function(e){return s(e,t.filter,!0)})).then(f).then(h).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor);t.width&&(e.style.width=t.width+"px");t.height&&(e.style.height=t.height+"px");t.style&&Object.keys(t.style).forEach((function(n){e.style[n]=t.style[n]}));return e})).then((function(r){return function(e,t,r){return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(n.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+r+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(r,t.width||n.width(e),t.height||n.height(e))}))}function u(e,t){return c(e,t).then(n.makeImage).then(n.delay(100)).then((function(r){var o=function(e){var r=document.createElement("canvas");if(r.width=t.width||n.width(e),r.height=t.height||n.height(e),t.bgcolor){var o=r.getContext("2d");o.fillStyle=t.bgcolor,o.fillRect(0,0,r.width,r.height)}return r}(e);return o.getContext("2d").drawImage(r,0,0),o}))}function s(e,t,r){return r||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?n.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(r){return function(e,t,r){var o=e.childNodes;return 0===o.length?Promise.resolve(t):i(t,n.asArray(o),r).then((function(){return t}));function i(e,t,n){var r=Promise.resolve();return t.forEach((function(t){r=r.then((function(){return s(t,n)})).then((function(t){t&&e.appendChild(t)}))})),r}}(e,r,t)})).then((function(t){return function(e,t){return t instanceof Element?Promise.resolve().then(r).then(o).then(i).then(a).then((function(){return t})):t;function r(){function r(e,t){function r(e,t){n.asArray(e).forEach((function(n){t.setProperty(n,e.getPropertyValue(n),e.getPropertyPriority(n))}))}e.cssText?t.cssText=e.cssText:r(e,t)}r(window.getComputedStyle(e),t.style)}function o(){function r(r){var o=window.getComputedStyle(e,r),i=o.getPropertyValue("content");if(""!==i&&"none"!==i){var a=n.uid();t.className=t.className+" "+a;var l=document.createElement("style");l.appendChild(c(a,r,o)),t.appendChild(l)}function c(e,t,r){var o="."+e+":"+t,i=r.cssText?a(r):l(r);return document.createTextNode(o+"{"+i+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function l(e){return n.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){r(e)}))}function i(){e instanceof HTMLTextAreaElement&&(t.innerHTML=e.value),e instanceof HTMLInputElement&&t.setAttribute("value",e.value)}function a(){t instanceof SVGElement&&(t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t instanceof SVGRectElement&&["width","height"].forEach((function(e){var n=t.getAttribute(e);n&&t.style.setProperty(e,n)})))}}(e,t)})):Promise.resolve()}function f(e){return o.resolveAll().then((function(t){var n=document.createElement("style");return e.appendChild(n),n.appendChild(document.createTextNode(t)),e}))}function h(e){return i.inlineAll(e).then((function(){return e}))}e.exports=l}()}));const $e=require("jszip"),Ge=require("react-file-download"),We=e=>{const{nodes:t,links:n}=e,r=n.map((e=>{let{source:n,target:r}=e;return{source:t[n].name,target:t[r].name,sourceType:t[n].type,targetType:t[r].type}})),{nodeMap:o,nodesTsv:i}=(e=>{let t=1e7;const n={};let r=!1;e.forEach((e=>{let{source:o,target:i,sourceType:a,targetType:l}=e;""!==i&&""!==o&&(Object.keys(n).indexOf(o)<0?(""!==a?(r=!0,n[o]={ID:t,WEIGHT:1,NODE_TYPE:a}):n[o]={ID:t,WEIGHT:1},t+=1):n[o].WEIGHT+=1,Object.keys(n).indexOf(i)<0?(""!==l?(r=!0,n[i]={ID:t,WEIGHT:1,NODE_TYPE:l}):n[i]={ID:t,WEIGHT:1},t+=1):n[i].WEIGHT+=1)}));let o=r?"ID\tLABEL\tWEIGHT\tNODE_TYPE\r\n":"ID\tLABEL\tWEIGHT\r\n";return Object.keys(n).forEach((e=>{const t=n[e].ID,i=n[e].WEIGHT,a=r?n[e].NODE_TYPE:"";o+=r?`${t}\t${e}\t${i}\t${a}\r\n`:`${t}\t${e}\t${i}\r\n`})),{nodeMap:n,nodesTsv:o}})(r),a=((e,t)=>{let n="SOURCE\tTARGET\tWEIGHT\tTYPE\r\n";return e.forEach((e=>{let{source:r,target:o}=e;if(""===o||""===r)return;const i=t[r].ID,a=t[o].ID;n+=`${i}\t${a}\t1\tUndirected\r\n`})),n})(r,o),l=new $e;l.file("Node_Table.tsv",i),l.file("Edge_Table.tsv",a),l.generateAsync({type:"blob"}).then((e=>{Ge(e,"Gephi_generated_by_NMTL.zip")}))},Ve=e=>{let{fill:n="#825c0d"}=e;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"a"},t.createElement("path",{"data-name":"Rectangle 125",style:{fill:"#fff"},d:"M0 0h32v32H0z"}))),t.createElement("g",{style:{clipPath:"url(#a)"}},t.createElement("path",{d:"M-960 600h-20v-10h4v2h-2v6h16v-6h-2v-2h4zm-5.06-12.608-1.348-1.454-2.592 2.427V580h-2v8.365l-2.544-2.427-1.362 1.454 4.948 4.671z",transform:"translate(986 -574)",style:{fill:n},"data-name":"Mask Group 42"})))},Xe=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"clip-path"},e.createElement("path",{id:"Rectangle_128","data-name":"Rectangle 128",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),e.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),e.createElement("g",{id:"Mask_Group_47","data-name":"Mask Group 47",style:{clipPath:"url(#clip-path)"}},e.createElement("g",{id:"Group_3633","data-name":"Group 3633",transform:"translate(6 6)"},e.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M514 371v-2h-2v2h-2v2h2v2h2v-2h2v-2z",transform:"translate(-495 -369)"}),e.createElement("g",{id:"Group_3632","data-name":"Group 3632",transform:"translate(0 2)"},e.createElement("path",{id:"Path_182","data-name":"Path 182",className:"cls-3",d:"M502.276 371h3.447L512 389h-3.164l-1.595-5.129h-6.586L499.036 389H496zm-.926 10.649h5.17l-.746-2.419c-.643-1.953-1.209-3.956-1.776-5.983h-.128a126.193 126.193 0 0 1-1.748 5.983z",transform:"translate(-496 -371)"})))))},Ye=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"clip-path"},e.createElement("path",{id:"Rectangle_129","data-name":"Rectangle 129",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),e.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),e.createElement("g",{id:"Mask_Group_48","data-name":"Mask Group 48",style:{clipPath:"url(#clip-path)"}},e.createElement("g",{id:"Group_3635","data-name":"Group 3635",transform:"translate(6 8)"},e.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M510 371v2h6v-2z",transform:"translate(-495 -371)"}),e.createElement("g",{id:"Group_3632","data-name":"Group 3632"},e.createElement("path",{id:"Path_182","data-name":"Path 182",className:"cls-3",d:"M502.276 371h3.447L512 389h-3.164l-1.595-5.129h-6.586L499.036 389H496zm-.926 10.649h5.17l-.746-2.419c-.643-1.953-1.209-3.956-1.776-5.983h-.128a126.193 126.193 0 0 1-1.748 5.983z",transform:"translate(-496 -371)"})))))},Je=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"clip-path"},e.createElement("path",{id:"Rectangle_124","data-name":"Rectangle 124",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),e.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),e.createElement("g",{id:"Mask_Group_46","data-name":"Mask Group 46",style:{clipPath:"url(#clip-path)"}},e.createElement("g",{id:"Group_3629","data-name":"Group 3629",transform:"translate(6 6.001)"},e.createElement("path",{id:"Path_176","data-name":"Path 176",className:"cls-3",d:"M-721 1949.376h2.5v-3.755h3.755v-2.5H-721z",transform:"translate(721.003 -1943.118)"}),e.createElement("path",{id:"Path_177","data-name":"Path 177",className:"cls-3",d:"M-721 1960.376h6.258v-2.5h-3.758v-3.755h-2.5z",transform:"translate(721.003 -1940.376)"}),e.createElement("path",{id:"Path_178","data-name":"Path 178",className:"cls-3",d:"M-703.744 1943.118H-710v2.5h3.755v3.755h2.5z",transform:"translate(723.744 -1943.118)"}),e.createElement("path",{id:"Path_179","data-name":"Path 179",className:"cls-3",d:"M-703.744 1960.376v-6.259h-2.5v3.755H-710v2.5z",transform:"translate(723.744 -1940.376)"}))))};A(".extraTools {\n width: 100%;\n display: inline-flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n padding: 0px 20px;\n padding-top: 12px; }\n .extraTools__share button {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__download {\n cursor: pointer; }\n .extraTools__download-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fullscreenBtn {\n cursor: pointer;\n padding-top: 0; }\n .extraTools__fullscreenBtn-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fontsize {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-changer,\n .extraTools .font-size-changer-buttons,\n .extraTools .font-size-up,\n .extraTools .font-size-down,\n .extraTools .tooltip {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .extraTools .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .extraTools .fullscreenExit {\n text-align: right;\n cursor: pointer;\n border: 0; }\n .extraTools #download-menu .MuiMenuItem-root {\n color: #4e3a16;\n width: auto;\n overflow: hidden;\n font-size: 1rem;\n box-sizing: border-box;\n min-height: 48px;\n font-weight: 400;\n line-height: 1;\n padding-top: 1rem;\n white-space: initial;\n border-bottom: 0;\n letter-spacing: 0.00938em;\n padding-bottom: 1rem; }\n");const Ke=e=>{let{className:n}=e;return t.createElement("div",{className:h("extraTools__share",n)},t.createElement(Le,{url:document.location.href},t.createElement(Ie,{size:32,round:!0})))};Ke.defaultProps={className:void 0},Ke.propTypes={className:u.string};const Qe=e=>{let{className:n,intl:o,exclude:i,iconColor:a,SNAData:l,domToImageId:c}=e;const[u,s]=r(null),f=[{key:"downloadImage",onClick:()=>(e=>{let{id:t,fileName:n="image",quality:r=.95}=e;const o=document.getElementById(t),i=document.getElementById("yaxis"),a=document.getElementById("barChart__block");i&&i.setAttribute("transform","translate(0, 0 )"),qe.toPng(o,{quality:r}).then((e=>{const t=document.createElement("a");t.download=`${n}.png`,t.href=e,t.click(),i&&a&&(i.setAttribute("transform","translate(0, 0 )"),i.setAttribute("transform",`translate(${a.scrollLeft}, 0)`))})).catch((e=>{console.error("oops, something went wrong!",e)}))})({id:c}),label:o?"knowledge.writersAndWorksSNA.download.img":"下載圖片"},{key:"downloadTsv",onClick:()=>We(l),label:o?"knowledge.writersAndWorksSNA.download.gephi":"下載Gephi"},{key:"downloadXls",onClick:()=>(e=>{let t,{data:n,dataType:r,extType:o="xlsx"}=e;t="sna"===r?N(n):n;O(`\ufeff${P(t)}`,`output.${o}`)})({data:l,dataType:"sna",extType:"xlsx"}),label:o?"knowledge.writersAndWorksSNA.download.xls":"下載Excel"}];return t.createElement("div",{className:h("extraTools__download",n)},t.createElement(C,{title:o?o.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},t.createElement("div",{className:"extraTools__download-icon",onClick:e=>s(e.currentTarget)},t.createElement(Ve,{fill:a}))),t.createElement(_,{id:"download-menu",anchorEl:u,keepMounted:!0,open:Boolean(u),onClose:()=>s(null)},f.map((e=>{let{key:n,onClick:r,label:a}=e;return l=n,!((i||[]).filter((e=>e===l)).length>0)&&t.createElement(E,{key:n,onClick:r},o?o.formatMessage({id:a}):a);var l}))))};Qe.defaultProps={className:void 0,intl:void 0,exclude:void 0,SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph"},Qe.propTypes={className:u.string,intl:u.objectOf(u.any),exclude:u.arrayOf(u.string),SNAData:u.objectOf(u.any),iconColor:u.string,domToImageId:u.string};const Ze=e=>{let{className:n,intl:r,iconColor:o,fullScreenHandle:i}=e;const{enter:a}=i||{enter:()=>{}};return t.createElement("div",{className:h("extraTools__fullscreenBtn",n)},t.createElement(C,{title:r?r.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},t.createElement("div",{className:"extraTools__fullscreenBtn-icon",onClick:a},t.createElement(Je,{fill:o}))))};Ze.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",fullScreenHandle:void 0},Ze.propTypes={className:u.string,intl:u.objectOf(u.any),iconColor:u.string,fullScreenHandle:u.objectOf(u.any)};const et=e=>{let{className:n,intl:r,iconColor:o,FontSizeTargets:i,FontSizeOptions:a}=e;return t.createElement("div",{className:h("extraTools__fontsize",n)},t.createElement(He,{targets:i,options:a,customButtons:{up:t.createElement(C,{title:r?r.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},t.createElement(Xe,{fill:o})),down:t.createElement(C,{title:r?r.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},t.createElement(Ye,{fill:o})),style:{border:"none"},buttonsMargin:10}}))};et.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1}},et.propTypes={className:u.string,intl:u.objectOf(u.any),iconColor:u.string,FontSizeTargets:u.arrayOf(u.string),FontSizeOptions:u.objectOf(u.any)};const tt=e=>{let{className:n,intl:r,exclude:o,SNAData:i,iconColor:a,domToImageId:l,FontSizeTargets:c,FontSizeOptions:u,fullScreenHandle:s}=e;const f={intl:r,exclude:o,SNAData:i,iconColor:a,domToImageId:l,FontSizeTargets:c,FontSizeOptions:u,fullScreenHandle:s},d=[{keys:["share"],Component:Ke},{keys:["downloadImage","downloadTsv","downloadXls"],Component:Qe},{keys:["fullscreen"],Component:Ze},{keys:["fontSizeChanger"],Component:et}];return t.createElement("div",{className:h("extraTools",n)},d.map((e=>{let{keys:n,Component:r}=e;return!(e=>(o||[]).filter((t=>e.some((e=>e===t)))).length===e.length)(n)&&t.createElement(r,k({key:n[0]},f))})))};tt.ShareButton=Ke,tt.DownloadMenu=Qe,tt.FullscreenBtn=Ze,tt.FontSizeChanger=et,tt.defaultProps={className:void 0,intl:void 0,exclude:["downloadXls"],SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1},fullScreenHandle:void 0},tt.propTypes={className:u.string,intl:u.objectOf(u.any),exclude:u.arrayOf(u.string),SNAData:u.objectOf(u.any),iconColor:u.string,domToImageId:u.string,FontSizeTargets:u.arrayOf(u.string),FontSizeOptions:u.objectOf(u.any),fullScreenHandle:u.objectOf(u.any)};A(".SNA {\n overflow: hidden;\n object-fit: contain;\n position: relative;\n font-size: 0.75rem;\n width: 100%; }\n .SNA--smallSize .node {\n padding-top: 8px;\n font-size: 0.75rem;\n width: 3rem;\n height: 3rem;\n overflow: hidden;\n white-space: pre-wrap;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical; }\n .SNA .node {\n background-color: #4a4e69;\n border-radius: 50%;\n color: #fff;\n font-size: 20px;\n font-weight: 500;\n height: 54px;\n width: 54px;\n padding-top: 15px;\n position: absolute;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: grab; }\n .SNA .links line {\n stroke: #c7bfb4;\n stroke-width: 2; }\n .SNA .mainNode {\n fill: #4e3a16; }\n .SNA .person {\n fill: #867b3a; }\n .SNA .publication {\n fill: #825c0d; }\n .SNA .article {\n fill: #afafaf; }\n .SNA .keyword {\n fill: #fcfae8; }\n .SNA .org {\n fill: #000000; }\n\n@media only screen and (max-width: 484px) {\n .SNA {\n margin-left: 0px; }\n .SNA .node {\n background-color: #4a4e69;\n border-radius: 50%;\n color: #fff;\n font-size: 1px;\n font-weight: 500;\n height: 44px;\n width: 44px;\n padding-top: 12px;\n position: absolute;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: grab; } }\n\n@media only screen and (max-width: 484px) {\n .SNA {\n margin-left: 0px; } }\n");var nt=function(e){var l=e.className,c=e.intl,u=e.exclude,s=e.distance,f=e.SNAData,g=e.handleClickNodeGoto,b=e.width,x=e.height,S=e.fontColor,k=e.backgroundColor,_=e.iconColor;if(!f||0===f.nodes.length)return t.createElement("div",{className:"noData"},c?c.formatMessage({id:"common.noData"}):"暫無資料");var E=function(){var e=r(!1),t=e[0],l=e[1],c=o(null);i((function(){var e=function(){l(ye.fullscreenElement===c.current)};return ye.addEventListener("fullscreenchange",e),function(){return ye.removeEventListener("fullscreenchange",e)}}),[]);var u=a((function(){return ye.fullscreenElement?ye.exitFullscreen().then((function(){return ye.requestFullscreen(c.current)})):c.current?ye.requestFullscreen(c.current):void 0}),[]),s=a((function(){return ye.fullscreenElement===c.current?ye.exitFullscreen():Promise.resolve()}),[]);return n((function(){return{active:t,enter:u,exit:s,node:c}}),[t,u,s])}(),C=n((function(){return E.active?screen.width:screen.width>1050?b:screen.width-80}),[E.active,screen.width]),N=n((function(){return E.active?screen.height:screen.width>1050?x:screen.height-300}),[E.active,screen.width]),O=function(e,t,n){var r=function(e,t,n){var r=.5*(t.x+e.x),o=.5*(t.y+e.y),i=t.x-e.x,a=t.y-e.y,l=Math.pow(Math.pow(i,2)+Math.pow(a,2),.5);return{qx:r-a*n/l,qy:o+i*n/l}}(e,t,n),o=r.qx,i=r.qy;return isNaN(o)?"M".concat(e.x,", ").concat(e.y," Q0 0 ").concat(t.x," ").concat(t.y):"M".concat(e.x,", ").concat(e.y," Q").concat(o," ").concat(i," ").concat(t.x," ").concat(t.y)},P=function(e){var t=8.5,n="-0 -".concat(t," ").concat(17," ").concat(17),r="M 0,-".concat(6.800000000000001," L ").concat(13.600000000000001," ,0 L 0,").concat(6.800000000000001),o=w(ce),i=e.links.map((function(e){return Object.create(e)})),a=e.nodes.map((function(e){return Object.create(e)})),l=function(e){var t,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,a=.6,l=m(),c=v(s),u=y("tick","end");function s(){f(),u.call("tick",t),n<r&&(c.stop(),u.call("end",t))}function f(r){var c,u,s=e.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(i-n)*o,l.each((function(e){e(n)})),c=0;c<s;++c)null==(u=e[c]).fx?u.x+=u.vx*=a:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=a:(u.y=u.fy,u.vy=0);return t}function h(){for(var t,n=0,r=e.length;n<r;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var o=10*Math.sqrt(n),i=n*le;t.x=o*Math.cos(i),t.y=o*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function d(t){return t.initialize&&t.initialize(e),t}return null==e&&(e=[]),h(),t={tick:f,restart:function(){return c.restart(s),t},stop:function(){return c.stop(),t},nodes:function(n){return arguments.length?(e=n,h(),l.each(d),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(o=+e,t):+o},alphaTarget:function(e){return arguments.length?(i=+e,t):i},velocityDecay:function(e){return arguments.length?(a=1-e,t):1-a},force:function(e,n){return arguments.length>1?(null==n?l.remove(e):l.set(e,d(n)),t):l.get(e)},find:function(t,n,r){var o,i,a,l,c,u=0,s=e.length;for(null==r?r=1/0:r*=r,u=0;u<s;++u)(a=(o=t-(l=e[u]).x)*o+(i=n-l.y)*i)<r&&(c=l,r=a);return c},on:function(e,n){return arguments.length>1?(u.on(e,n),t):u.on(e)}}}(a).force("link",function(e){var t,n,r,o,i,a=re,l=function(e){return 1/Math.min(o[e.source.index],o[e.target.index])},c=G(30),u=1;function s(r){for(var o=0,a=e.length;o<u;++o)for(var l,c,s,f,h,d,p,y=0;y<a;++y)c=(l=e[y]).source,f=(s=l.target).x+s.vx-c.x-c.vx||W(),h=s.y+s.vy-c.y-c.vy||W(),f*=d=((d=Math.sqrt(f*f+h*h))-n[y])/d*r*t[y],h*=d,s.vx-=f*(p=i[y]),s.vy-=h*p,c.vx+=f*(p=1-p),c.vy+=h*p}function f(){if(r){var l,c,u=r.length,s=e.length,f=m(r,a);for(l=0,o=new Array(u);l<s;++l)(c=e[l]).index=l,"object"!=typeof c.source&&(c.source=oe(f,c.source)),"object"!=typeof c.target&&(c.target=oe(f,c.target)),o[c.source.index]=(o[c.source.index]||0)+1,o[c.target.index]=(o[c.target.index]||0)+1;for(l=0,i=new Array(s);l<s;++l)c=e[l],i[l]=o[c.source.index]/(o[c.source.index]+o[c.target.index]);t=new Array(s),h(),n=new Array(s),d()}}function h(){if(r)for(var n=0,o=e.length;n<o;++n)t[n]=+l(e[n],n,e)}function d(){if(r)for(var t=0,o=e.length;t<o;++t)n[t]=+c(e[t],t,e)}return null==e&&(e=[]),s.initialize=function(e){r=e,f()},s.links=function(t){return arguments.length?(e=t,f(),s):e},s.id=function(e){return arguments.length?(a=e,s):a},s.iterations=function(e){return arguments.length?(u=+e,s):u},s.strength=function(e){return arguments.length?(l="function"==typeof e?e:G(+e),h(),s):l},s.distance=function(e){return arguments.length?(c="function"==typeof e?e:G(+e),d(),s):c},s}(i).id((function(e){return e.index})).distance(50)).force("charge",function(){var e,t,n,r,o=G(-30),i=1,a=1/0,l=.81;function c(r){var o,i=e.length,a=K(e,ie,ae).visitAfter(s);for(n=r,o=0;o<i;++o)t=e[o],a.visit(f)}function u(){if(e){var t,n,i=e.length;for(r=new Array(i),t=0;t<i;++t)n=e[t],r[n.index]=+o(n,t,e)}}function s(e){var t,n,o,i,a,l=0,c=0;if(e.length){for(o=i=a=0;a<4;++a)(t=e[a])&&(n=Math.abs(t.value))&&(l+=t.value,c+=n,o+=n*t.x,i+=n*t.y);e.x=o/c,e.y=i/c}else{(t=e).x=t.data.x,t.y=t.data.y;do{l+=r[t.data.index]}while(t=t.next)}e.value=l}function f(e,o,c,u){if(!e.value)return!0;var s=e.x-t.x,f=e.y-t.y,h=u-o,d=s*s+f*f;if(h*h/l<d)return d<a&&(0===s&&(d+=(s=W())*s),0===f&&(d+=(f=W())*f),d<i&&(d=Math.sqrt(i*d)),t.vx+=s*e.value*n/d,t.vy+=f*e.value*n/d),!0;if(!(e.length||d>=a)){(e.data!==t||e.next)&&(0===s&&(d+=(s=W())*s),0===f&&(d+=(f=W())*f),d<i&&(d=Math.sqrt(i*d)));do{e.data!==t&&(h=r[e.data.index]*n/d,t.vx+=s*h,t.vy+=f*h)}while(e=e.next)}}return c.initialize=function(t){e=t,u()},c.strength=function(e){return arguments.length?(o="function"==typeof e?e:G(+e),u(),c):o},c.distanceMin=function(e){return arguments.length?(i=e*e,c):Math.sqrt(i)},c.distanceMax=function(e){return arguments.length?(a=e*e,c):Math.sqrt(a)},c.theta=function(e){return arguments.length?(l=e*e,c):Math.sqrt(l)},c}().strength(-160)).force("center",function(e,t){var n;function r(){var r,o,i=n.length,a=0,l=0;for(r=0;r<i;++r)a+=(o=n[r]).x,l+=o.y;for(a=a/i-e,l=l/i-t,r=0;r<i;++r)(o=n[r]).x-=a,o.y-=l}return null==e&&(e=0),null==t&&(t=0),r.initialize=function(e){n=e},r.x=function(t){return arguments.length?(e=+t,r):e},r.y=function(e){return arguments.length?(t=+e,r):t},r}(C/2,N/2)).force("collide",function(e){var t,n,r=1,o=1;function i(){for(var e,i,l,c,u,s,f,h=t.length,d=0;d<o;++d)for(i=K(t,te,ne).visitAfter(a),e=0;e<h;++e)l=t[e],s=n[l.index],f=s*s,c=l.x+l.vx,u=l.y+l.vy,i.visit(p);function p(e,t,n,o,i){var a=e.data,h=e.r,d=s+h;if(!a)return t>c+d||o<c-d||n>u+d||i<u-d;if(a.index>l.index){var p=c-a.x-a.vx,y=u-a.y-a.vy,g=p*p+y*y;g<d*d&&(0===p&&(g+=(p=W())*p),0===y&&(g+=(y=W())*y),g=(d-(g=Math.sqrt(g)))/g*r,l.vx+=(p*=g)*(d=(h*=h)/(f+h)),l.vy+=(y*=g)*d,a.vx-=p*(d=1-d),a.vy-=y*d)}}}function a(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function l(){if(t){var r,o,i=t.length;for(n=new Array(i),r=0;r<i;++r)o=t[r],n[o.index]=+e(o,r,t)}}return"function"!=typeof e&&(e=G(null==e?1:+e)),i.initialize=function(e){t=e,l()},i.iterations=function(e){return arguments.length?(o=+e,i):o},i.strength=function(e){return arguments.length?(r=+e,i):r},i.radius=function(t){return arguments.length?(e="function"==typeof t?t:G(+t),l(),i):e},i}().radius((function(){return 13.5})).iterations(5)).force("x",function(e){var t,n,r,o=G(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vx+=(r[i]-o.x)*n[i]*e}function a(){if(t){var i,a=t.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=G(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:G(+e),a(),i):o},i.x=function(t){return arguments.length?(e="function"==typeof t?t:G(+t),a(),i):e},i}(C/2)).force("y",function(e){var t,n,r,o=G(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vy+=(r[i]-o.y)*n[i]*e}function a(){if(t){var i,a=t.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=G(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:G(+e),a(),i):o},i.y=function(t){return arguments.length?(e="function"==typeof t?t:G(+t),a(),i):e},i}(N/2)).force("radial",function(e,t,n){var r,o,i,a=G(.1);function l(e){for(var a=0,l=r.length;a<l;++a){var c=r[a],u=c.x-t||1e-6,s=c.y-n||1e-6,f=Math.sqrt(u*u+s*s),h=(i[a]-f)*o[a]*e/f;c.vx+=u*h,c.vy+=s*h}}function c(){if(r){var t,n=r.length;for(o=new Array(n),i=new Array(n),t=0;t<n;++t)i[t]=+e(r[t],t,r),o[t]=isNaN(i[t])?0:+a(r[t],t,r)}}return"function"!=typeof e&&(e=G(+e)),null==t&&(t=0),null==n&&(n=0),l.initialize=function(e){r=e,c()},l.strength=function(e){return arguments.length?(a="function"==typeof e?e:G(+e),c(),l):a},l.radius=function(t){return arguments.length?(e="function"==typeof t?t:G(+t),c(),l):e},l.x=function(e){return arguments.length?(t=+e,l):t},l.y=function(e){return arguments.length?(n=+e,l):n},l}(100,C/2,N/2)),u=p(".chart").append("svg").attr("viewBox",[0,0,C,N]).style("background-color",k);u.append("defs").append("marker").attr("id","arrowhead").attr("viewBox",n).attr("refX",23.8).attr("refY",0).attr("orient","auto").attr("markerWidth",15.3).attr("markerHeight",15.3).attr("xoverflow","visible").append("svg:path").attr("d",r).attr("fill","#999").style("stroke","none");var s=u.append("g").attr("stroke","#999").attr("stroke-opacity",.6).selectAll("line").data(i).join("path").attr("fill","none").attr("stroke-dasharray",(function(e){return"protege"===e.ontology?"2,5,3":""})).attr("key",(function(e){return e.type})).attr("marker-end","url(#arrowhead)"),f=u.append("g").attr("stroke","#fff").attr("stroke-width",1.5).selectAll("circle").data(a).join("circle").attr("r",(function(e){return"mainNode"===e.type?13.5:t})).attr("fill",(function(e){return o(e.type)})).attr("key",(function(e){return e.type})).attr("class",(function(e){return"node node-".concat(e.id," ").concat(e.type&&"organization"===e.type?"org":"person"===e.type?"person":"publication"===e.type?"publication":"mainNode"===e.type?"mainNode":"article"===e.type?"article":"keyword"===e.type?"keyword":"event"===e.type?"event":"")})).on("click",(function(e){return e.hasClick?g({name:e.name,id:e.id,type:e.type}):null})).call(function(e){return $().on("start",(function(t){d.active||e.alphaTarget(.3).restart(),t.fx=t.x,t.fy=t.y})).on("drag",(function(e){e.fx=d.x>C||d.x<0?e.x:d.x,e.fy=d.y>N||d.y<0?e.y:d.y}))}(l));f.append("title").text((function(e){return"".concat(e.name,"-").concat(function(e){switch(e){case"mainNode":return c?c.formatMessage({id:"SNA.search.center"}):"主要搜尋中心";case"organization":return c?c.formatMessage({id:"SNA.organization"}):"組織";case"person":return c?c.formatMessage({id:"SNA.author"}):"作家";case"publication":return c?c.formatMessage({id:"SNA.publication"}):"作家";case"article":return c?c.formatMessage({id:"SNA.article"}):"單篇作品";case"keyword":return c?c.formatMessage({id:"SNA.keyword"}):"關鍵字";case"event":return c?c.formatMessage({id:"SNA.event"}):"事件";default:return""}}(e.type))}));var h=u.append("g").selectAll("text").data(a).join("text").attr("fill",S).attr("text-anchor","middle").attr("key",(function(e){return e.type})).style("color","#fff").style("font-size","14px").text((function(e){return e.name})),b=u.selectAll(".edgepath").data(i).enter().append("path").attr("class","edgepath").attr("fill-opacity",0).attr("stroke-opacity",0).attr("id",(function(e,t){return"edgepath".concat(t)})).style("pointer-events","none");u.selectAll(".edgelabel").data(i).enter().append("text").style("pointer-events","none").attr("class","edgelabel").attr("font-size","10px").attr("fill","#aaa").attr("visibility","visible").attr("key",(function(e){return e.type})).attr("id",(function(e,t){return"edgelabel".concat(t)})).append("textPath").attr("xlink:href",(function(e,t){return"#edgepath".concat(t)})).style("text-anchor","middle").style("pointer-events","none").attr("startOffset","50%").text((function(e){return e.property})),l.on("tick",(function(){s.attr("d",(function(e){return O(e.source,e.target,30)})),f.attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),h.attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y-t})),b.attr("d",(function(e){return O(e.source,e.target,30)}))}))};return i((function(){if(f&&f.nodes&&f.nodes.length>0){var e=document.getElementById("network-graph");e&&e.childNodes[0]&&e.removeChild(e.childNodes[0]),P(f)}}),[f,E.active]),t.createElement("div",{className:h("SNA",{"SNA--smallSize":s<200},l),style:{contentWidth:C,contentHeight:N,backgroundColor:k}},t.createElement(tt,{intl:c,SNAData:f,iconColor:_,domToImageId:"network-graph",fullScreenHandle:E,exclude:u}),t.createElement(ge,{handle:E},t.createElement("div",{className:"chart",id:"network-graph"},E.active&&t.createElement("div",{className:"fullscreenExit",style:{backgroundColor:k}},t.createElement(ve,{fontSize:"large",style:{color:_},onClick:E.exit,title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreenExit"}):"離開全螢幕"})))))};nt.defaultProps={className:void 0,intl:void 0,width:1050,height:600,distance:400,SNAData:null,fontColor:"#000000",backgroundColor:"#FFFFFF",iconColor:"#825c0d",exclude:["downloadXls"],handleClickNodeGoto:null},nt.propTypes={className:u.string,intl:u.objectOf(u.any),width:u.number,height:u.number,distance:u.number,SNAData:u.objectOf(u.any),fontColor:u.string,backgroundColor:u.string,iconColor:u.string,exclude:u.arrayOf(u.string),handleClickNodeGoto:u.func};export{nt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var n,e,r=(1===(n=t).length&&(e=n,n=function(n,r){return t(e(n),r)}),{left:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;n(t[o],e)<0?r=o+1:i=o}return r},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;n(t[o],e)>0?i=o:r=o+1}return r}}).right,i={value:function(){}};function o(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new u(r)}function u(t){this._=t}function a(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function s(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function l(t,n,e){for(var r=0,o=t.length;r<o;++r)if(t[r].name===n){t[r]=i,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}u.prototype=o.prototype={constructor:u,on:function(t,n){var e,r=this._,i=a(t+"",r),o=-1,u=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=l(r[e],t.name,n);else if(null==n)for(e in r)r[e]=l(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=s(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new u(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 c="http://www.w3.org/1999/xhtml",h={svg:"http://www.w3.org/2000/svg",xhtml:c,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function f(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),h.hasOwnProperty(n)?{space:h[n],local:t}:t}function p(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===c&&n.documentElement.namespaceURI===c?n.createElement(t):n.createElementNS(e,t)}}function d(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function v(t){var n=f(t);return(n.local?d:p)(n)}function y(){}function g(t){return null==t?y:function(){return this.querySelector(t)}}function _(){return[]}function m(t){return null==t?_:function(){return this.querySelectorAll(t)}}function w(t){return function(){return this.matches(t)}}function b(t){return new Array(t.length)}function x(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}x.prototype={constructor:x,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function k(t,n,e,r,i,o){for(var u,a=0,s=n.length,l=o.length;a<l;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new x(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function A(t,n,e,r,i,o,u){var a,s,l,c={},h=n.length,f=o.length,p=new Array(h);for(a=0;a<h;++a)(s=n[a])&&(p[a]=l="$"+u.call(s,s.__data__,a,n),l in c?i[a]=s:c[l]=s);for(a=0;a<f;++a)(s=c[l="$"+u.call(t,o[a],a,o)])?(r[a]=s,s.__data__=o[a],c[l]=null):e[a]=new x(t,o[a]);for(a=0;a<h;++a)(s=n[a])&&c[p[a]]===s&&(i[a]=s)}function N(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function E(t){return function(){this.removeAttribute(t)}}function M(t){return function(){this.removeAttributeNS(t.space,t.local)}}function S(t,n){return function(){this.setAttribute(t,n)}}function P(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function $(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function q(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function C(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function T(t){return function(){this.style.removeProperty(t)}}function O(t,n,e){return function(){this.style.setProperty(t,n,e)}}function X(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function R(t,n){return t.style.getPropertyValue(n)||C(t).getComputedStyle(t,null).getPropertyValue(n)}function I(t){return function(){delete this[t]}}function j(t,n){return function(){this[t]=n}}function L(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function z(t){return t.trim().split(/^|\s+/)}function D(t){return t.classList||new H(t)}function H(t){this._node=t,this._names=z(t.getAttribute("class")||"")}function B(t,n){for(var e=D(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function V(t,n){for(var e=D(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Y(t){return function(){B(this,t)}}function U(t){return function(){V(this,t)}}function F(t,n){return function(){(n.apply(this,arguments)?B:V)(this,t)}}function G(){this.textContent=""}function J(t){return function(){this.textContent=t}}function K(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Q(){this.innerHTML=""}function W(t){return function(){this.innerHTML=t}}function Z(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function tt(){this.nextSibling&&this.parentNode.appendChild(this)}function nt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function et(){return null}function rt(){var t=this.parentNode;t&&t.removeChild(this)}function it(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ot(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}H.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ut={},at=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ut={mouseenter:"mouseover",mouseleave:"mouseout"}));function st(t,n,e){return t=lt(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function lt(t,n,e){return function(r){var i=at;at=r;try{t.call(this,this.__data__,n,e)}finally{at=i}}}function ct(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function ht(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function ft(t,n,e){var r=ut.hasOwnProperty(t.type)?st:lt;return function(i,o,u){var a,s=this.__on,l=r(n,o,u);if(s)for(var c=0,h=s.length;c<h;++c)if((a=s[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=l,a.capture=e),void(a.value=n);this.addEventListener(t.type,l,e),a={type:t.type,name:t.name,value:n,listener:l,capture:e},s?s.push(a):this.__on=[a]}}function pt(t,n,e,r){var i=at;t.sourceEvent=at,at=t;try{return n.apply(e,r)}finally{at=i}}function dt(t,n,e){var r=C(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function vt(t,n){return function(){return dt(this,t,n)}}function yt(t,n){return function(){return dt(this,t,n.apply(this,arguments))}}var gt=[null];function _t(t,n){this._groups=t,this._parents=n}function mt(){return new _t([[document.documentElement]],gt)}function wt(t){return"string"==typeof t?new _t([[document.querySelector(t)]],[document.documentElement]):new _t([[t]],gt)}function bt(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function xt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function kt(){}_t.prototype=mt.prototype={constructor:_t,select:function(t){"function"!=typeof t&&(t=g(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],s=a.length,l=r[i]=new Array(s),c=0;c<s;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),l[c]=u);return new _t(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=m(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new _t(r,i)},filter:function(t){"function"!=typeof t&&(t=w(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new _t(r,this._parents)},data:function(t,n){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var e,r=n?A:k,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),s=new Array(u),l=new Array(u),c=0;c<u;++c){var h=i[c],f=o[c],p=f.length,d=t.call(h,h&&h.__data__,c,i),v=d.length,y=s[c]=new Array(v),g=a[c]=new Array(v);r(h,f,y,g,l[c]=new Array(p),d,n);for(var _,m,w=0,b=0;w<v;++w)if(_=y[w]){for(w>=b&&(b=w+1);!(m=g[b])&&++b<v;);_._next=m||null}}return(a=new _t(a,i))._enter=s,a._exit=l,a},enter:function(){return new _t(this._enter||this._groups.map(b),this._parents)},exit:function(){return new _t(this._exit||this._groups.map(b),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){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,l=n[a],c=e[a],h=l.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=l[p]||c[p])&&(f[p]=s);for(;a<r;++a)u[a]=n[a];return new _t(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=N);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,l=i[o]=new Array(s),c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(n)}return new _t(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=f(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?M:E:"function"==typeof n?e.local?q:$:e.local?P:S)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?T:"function"==typeof n?X:O)(t,n,null==e?"":e)):R(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?I:"function"==typeof n?L:j)(t,n)):this.node()[t]},classed:function(t,n){var e=z(t+"");if(arguments.length<2){for(var r=D(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?F:n?Y:U)(e,n))},text:function(t){return arguments.length?this.each(null==t?G:("function"==typeof t?K:J)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Q:("function"==typeof t?Z:W)(t)):this.node().innerHTML},raise:function(){return this.each(tt)},lower:function(){return this.each(nt)},append:function(t){var n="function"==typeof t?t:v(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:v(t),r=null==n?et:"function"==typeof n?n:g(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(rt)},clone:function(t){return this.select(t?ot:it)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=ct(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?ft:ht,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var s,l=0,c=a.length;l<c;++l)for(r=0,s=a[l];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?yt:vt)(t,n))}};var At=1/.7,Nt="\\s*([+-]?\\d+)\\s*",Et="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",St=/^#([0-9a-f]{3,8})$/,Pt=new RegExp("^rgb\\("+[Nt,Nt,Nt]+"\\)$"),$t=new RegExp("^rgb\\("+[Mt,Mt,Mt]+"\\)$"),qt=new RegExp("^rgba\\("+[Nt,Nt,Nt,Et]+"\\)$"),Ct=new RegExp("^rgba\\("+[Mt,Mt,Mt,Et]+"\\)$"),Tt=new RegExp("^hsl\\("+[Et,Mt,Mt]+"\\)$"),Ot=new RegExp("^hsla\\("+[Et,Mt,Mt,Et]+"\\)$"),Xt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Rt(){return this.rgb().formatHex()}function It(){return this.rgb().formatRgb()}function jt(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=St.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?Lt(n):3===e?new Bt(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?zt(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?zt(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Pt.exec(t))?new Bt(n[1],n[2],n[3],1):(n=$t.exec(t))?new Bt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=qt.exec(t))?zt(n[1],n[2],n[3],n[4]):(n=Ct.exec(t))?zt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Tt.exec(t))?Ft(n[1],n[2]/100,n[3]/100,1):(n=Ot.exec(t))?Ft(n[1],n[2]/100,n[3]/100,n[4]):Xt.hasOwnProperty(t)?Lt(Xt[t]):"transparent"===t?new Bt(NaN,NaN,NaN,0):null}function Lt(t){return new Bt(t>>16&255,t>>8&255,255&t,1)}function zt(t,n,e,r){return r<=0&&(t=n=e=NaN),new Bt(t,n,e,r)}function Dt(t){return t instanceof kt||(t=jt(t)),t?new Bt((t=t.rgb()).r,t.g,t.b,t.opacity):new Bt}function Ht(t,n,e,r){return 1===arguments.length?Dt(t):new Bt(t,n,e,null==r?1:r)}function Bt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Vt(){return"#"+Ut(this.r)+Ut(this.g)+Ut(this.b)}function Yt(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Ut(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ft(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Jt(t,n,e,r)}function Gt(t){if(t instanceof Jt)return new Jt(t.h,t.s,t.l,t.opacity);if(t instanceof kt||(t=jt(t)),!t)return new Jt;if(t instanceof Jt)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=s<.5?o+i:2-o-i,u*=60):a=s>0&&s<1?0:u,new Jt(u,a,s,t.opacity)}function Jt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Kt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Qt(t){return function(){return t}}function Wt(t){return 1==(t=+t)?Zt:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Qt(isNaN(n)?e:n)}}function Zt(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):Qt(isNaN(t)?n:t)}bt(kt,jt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Rt,formatHex:Rt,formatHsl:function(){return Gt(this).formatHsl()},formatRgb:It,toString:It}),bt(Bt,Ht,xt(kt,{brighter:function(t){return t=null==t?At:Math.pow(At,t),new Bt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Bt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Vt,formatHex:Vt,formatRgb:Yt,toString:Yt})),bt(Jt,(function(t,n,e,r){return 1===arguments.length?Gt(t):new Jt(t,n,e,null==r?1:r)}),xt(kt,{brighter:function(t){return t=null==t?At:Math.pow(At,t),new Jt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Jt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Bt(Kt(t>=240?t-240:t+120,i,r),Kt(t,i,r),Kt(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var tn=function t(n){var e=Wt(n);function r(t,n){var r=e((t=Ht(t)).r,(n=Ht(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=Zt(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function nn(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}var en=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rn=new RegExp(en.source,"g");function on(t,n){var e,r,i,o=en.lastIndex=rn.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=en.exec(t))&&(r=rn.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,s.push({i:u,x:nn(e,r)})),o=rn.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)a[(e=s[r]).i]=e.x(t);return a.join("")})}var un,an,sn,ln,cn=180/Math.PI,hn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fn(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*cn,skewX:Math.atan(s)*cn,scaleX:u,scaleY:a}}function pn(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a=[],s=[];return o=t(o),u=t(u),function(t,r,i,o,u,a){if(t!==i||r!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:nn(t,i)},{i:s-2,x:nn(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}(o.translateX,o.translateY,u.translateX,u.translateY,a,s),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:nn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:nn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,s),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:nn(t,e)},{i:a-2,x:nn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++e<r;)a[(n=s[e]).i]=n.x(t);return a.join("")}}}var dn,vn,yn=pn((function(t){return"none"===t?hn:(un||(un=document.createElement("DIV"),an=document.documentElement,sn=document.defaultView),un.style.transform=t,t=sn.getComputedStyle(an.appendChild(un),null).getPropertyValue("transform"),an.removeChild(un),fn(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),gn=pn((function(t){return null==t?hn:(ln||(ln=document.createElementNS("http://www.w3.org/2000/svg","g")),ln.setAttribute("transform",t),(t=ln.transform.baseVal.consolidate())?fn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):hn)}),", ",")",")"),_n=0,mn=0,wn=0,bn=0,xn=0,kn=0,An="object"==typeof performance&&performance.now?performance:Date,Nn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function En(){return xn||(Nn(Mn),xn=An.now()+kn)}function Mn(){xn=0}function Sn(){this._call=this._time=this._next=null}function Pn(t,n,e){var r=new Sn;return r.restart(t,n,e),r}function $n(){xn=(bn=An.now())+kn,_n=mn=0;try{!function(){En(),++_n;for(var t,n=dn;n;)(t=xn-n._time)>=0&&n._call.call(null,t),n=n._next;--_n}()}finally{_n=0,function(){var t,n,e=dn,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:dn=n);vn=t,Cn(r)}(),xn=0}}function qn(){var t=An.now(),n=t-bn;n>1e3&&(kn-=n,bn=t)}function Cn(t){_n||(mn&&(mn=clearTimeout(mn)),t-xn>24?(t<1/0&&(mn=setTimeout($n,t-An.now()-kn)),wn&&(wn=clearInterval(wn))):(wn||(bn=An.now(),wn=setInterval(qn,1e3)),_n=1,Nn($n)))}function Tn(t,n,e){var r=new Sn;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r}Sn.prototype=Pn.prototype={constructor:Sn,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?En():+e)+(null==n?0:+n),this._next||vn===this||(vn?vn._next=this:dn=this,vn=this),this._call=t,this._time=e,Cn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Cn())}};var On=o("start","end","cancel","interrupt"),Xn=[];function Rn(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(t){e.state=1,e.timer.restart(u,e.delay,e.time),e.delay<=t&&u(t-e.delay)}function u(o){var l,c,h,f;if(1!==e.state)return s();for(l in i)if((f=i[l]).name===e.name){if(3===f.state)return Tn(u);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<n&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(Tn((function(){3===e.state&&(e.state=4,e.timer.restart(a,e.delay,e.time),a(o))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(h=e.tween.length),l=0,c=-1;l<h;++l)(f=e.tween[l].value.call(t,t.__data__,e.index,e.group))&&(r[++c]=f);r.length=c+1}}function a(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(s),e.state=5,1),o=-1,u=r.length;++o<u;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),s())}function s(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Pn(o,0,e.time)}(t,e,{name:n,index:r,group:i,on:On,tween:Xn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function In(t,n){var e=Ln(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function jn(t,n){var e=Ln(t,n);if(e.state>3)throw new Error("too late; already running");return e}function Ln(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function zn(t,n){var e,r;return function(){var i=jn(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 Dn(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=jn(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}}function Hn(t,n,e){var r=t._id;return t.each((function(){var t=jn(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Ln(t,r).value[n]}}function Bn(t,n){var e;return("number"==typeof n?nn:n instanceof jt?tn:(e=jt(n))?(n=e,tn):on)(t,n)}function Vn(t){return function(){this.removeAttribute(t)}}function Yn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Un(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)}}function Fn(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 Gn(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)}}function Jn(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 Kn(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Qn(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function Wn(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Qn(t,i)),e}return i._value=n,i}function Zn(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Kn(t,i)),e}return i._value=n,i}function te(t,n){return function(){In(this,t).delay=+n.apply(this,arguments)}}function ne(t,n){return n=+n,function(){In(this,t).delay=n}}function ee(t,n){return function(){jn(this,t).duration=+n.apply(this,arguments)}}function re(t,n){return n=+n,function(){jn(this,t).duration=n}}function ie(t,n){if("function"!=typeof n)throw new Error;return function(){jn(this,t).ease=n}}function oe(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)?In:jn;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var ue=mt.prototype.constructor;function ae(t){return function(){this.style.removeProperty(t)}}function se(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function le(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&se(t,o,e)),r}return o._value=n,o}function ce(t){return function(n){this.textContent=t.call(this,n)}}function he(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&ce(r)),n}return r._value=t,r}var fe=0;function pe(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function de(){return++fe}var ve=mt.prototype;pe.prototype={constructor:pe,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=g(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a,s,l=r[u],c=l.length,h=o[u]=new Array(c),f=0;f<c;++f)(a=l[f])&&(s=t.call(a,a.__data__,f,l))&&("__data__"in a&&(s.__data__=a.__data__),h[f]=s,Rn(h[f],n,e,f,h,Ln(a,e)));return new pe(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=m(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var s,l=r[a],c=l.length,h=0;h<c;++h)if(s=l[h]){for(var f,p=t.call(s,s.__data__,h,l),d=Ln(s,e),v=0,y=p.length;v<y;++v)(f=p[v])&&Rn(f,n,e,v,p,d);o.push(p),u.push(s)}return new pe(o,u,n,e)},filter:function(t){"function"!=typeof t&&(t=w(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new pe(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,l=n[a],c=e[a],h=l.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=l[p]||c[p])&&(f[p]=s);for(;a<r;++a)u[a]=n[a];return new pe(u,this._parents,this._name,this._id)},selection:function(){return new ue(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=de(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)if(u=a[l]){var c=Ln(u,n);Rn(u,t,e,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new pe(r,this._parents,t,e)},call:ve.call,nodes:ve.nodes,node:ve.node,size:ve.size,empty:ve.empty,each:ve.each,on:function(t,n){var e=this._id;return arguments.length<2?Ln(this.node(),e).on.on(t):this.each(oe(e,t,n))},attr:function(t,n){var e=f(t),r="transform"===e?gn:Bn;return this.attrTween(t,"function"==typeof n?(e.local?Jn:Gn)(e,r,Hn(this,"attr."+t,n)):null==n?(e.local?Yn:Vn)(e):(e.local?Fn:Un)(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=f(t);return this.tween(e,(r.local?Wn:Zn)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?yn:Bn;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=R(this,t),u=(this.style.removeProperty(t),R(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,ae(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var u=R(this,t),a=e(this),s=a+"";return null==a&&(this.style.removeProperty(t),s=a=R(this,t)),u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a))}}(t,r,Hn(this,"style."+t,n))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=jn(this,t),l=s.on,c=null==s.value[u]?o||(o=ae(n)):void 0;l===e&&i===c||(r=(e=l).copy()).on(a,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var u=R(this,t);return u===o?null:u===r?i:i=n(r=u,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,le(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}}(Hn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,he(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Ln(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?zn:Dn)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?te:ne)(n,t)):Ln(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?ee:re)(n,t)):Ln(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(ie(n,t)):Ln(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=jn(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}))}))}};var ye={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function ge(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return ye.time=En(),ye;return e}mt.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>2&&e.state<5,e.state=6,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)}))},mt.prototype.transition=function(t){var n,e;t instanceof pe?(n=t._id,t=t._name):(n=de(),(e=ye).time=En(),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,l=0;l<s;++l)(u=a[l])&&Rn(u,t,n,l,a,e||ge(u,n));return new pe(r,this._parents,t,n)};function _e(){}function me(t,n){var e=new _e;if(t instanceof _e)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var u in t)e.set(u,t[u]);return e}function we(){}_e.prototype=me.prototype={constructor:_e,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var be=me.prototype;function xe(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}we.prototype={constructor:we,has:be.has,add:function(t){return this["$"+(t+="")]=t,this},remove:be.remove,clear:be.clear,values:be.keys,size:be.size,empty:be.empty,each:be.each};var ke=Array.prototype,Ae=ke.map,Ne=ke.slice,Ee={name:"implicit"};function Me(){var t=me(),n=[],e=[],r=Ee;function i(i){var o=i+"",u=t.get(o);if(!u){if(r!==Ee)return r;t.set(o,u=n.push(i))}return e[(u-1)%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=me();for(var r,o,u=-1,a=e.length;++u<a;)t.has(o=(r=e[u])+"")||t.set(o,n.push(r));return i},i.range=function(t){return arguments.length?(e=Ne.call(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Me(n,e).unknown(r)},xe.apply(i,arguments),i}export{Qt as a,jt as b,pt as c,o as d,at as e,tn as f,on as g,xe as h,nn as i,Ae as j,Ne as k,r as l,me as m,Me as o,wt as s,Pn as t};
|
package/lib/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { default as Dropdown } from './components/Dropdown';
|
|
|
20
20
|
export { default as Breadcrumbs } from './components/Breadcrumbs';
|
|
21
21
|
export { default as ExportButton } from './components/ExportButton';
|
|
22
22
|
export { default as SNA } from './components/SNA';
|
|
23
|
+
export { default as BarChart } from './components/BarChart';
|
|
23
24
|
|
|
24
25
|
export { default as ContactModal } from './components/ContactModal';
|
|
25
26
|
export { default as KeywordSearch } from './components/KeywordSearch';
|
package/lib/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export { default as Dropdown } from './components/Dropdown';
|
|
|
20
20
|
export { default as Breadcrumbs } from './components/Breadcrumbs';
|
|
21
21
|
export { default as ExportButton } from './components/ExportButton';
|
|
22
22
|
export { default as SNA } from './components/SNA';
|
|
23
|
+
export { default as BarChart } from './components/BarChart';
|
|
23
24
|
|
|
24
25
|
export { default as ContactModal } from './components/ContactModal';
|
|
25
26
|
export { default as KeywordSearch } from './components/KeywordSearch';
|
package/package.json
CHANGED