@daoyi/nmtl-ui 1.1.43-beta.27 → 1.1.43-beta.30
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useState as
|
|
1
|
+
import e,{useState as t,useRef as n,useEffect as o,useMemo as l}from"react";import{s,c as a}from"./style-inject.es-22541f49.js";import r from"prop-types";import{Typography as c}from"@material-ui/core";import i from"./MoreButton.js";import"./_commonjsHelpers-ae1b5db5.js";import"@material-ui/icons";const p=new(0,require("html-to-react").Parser),d=require("markdown-it")({html:!1,xhtmlOut:!0,breaks:!0,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:()=>""});s(".collapseContent__desc {\n font-size: 1.5rem !important; }\n .collapseContent__desc code,\n .collapseContent__desc p {\n font-family: 'Noto Sans TC', 'Arial', sans-serif !important;\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n white-space: pre-wrap;\n word-break: break-all; }\n .collapseContent__desc p,\n .collapseContent__desc pre {\n margin: 0; }\n .collapseContent__desc--1 code,\n .collapseContent__desc--1 p {\n -webkit-line-clamp: 1; }\n .collapseContent__desc--2 code,\n .collapseContent__desc--2 p {\n -webkit-line-clamp: 2; }\n .collapseContent__desc--3 code,\n .collapseContent__desc--3 p {\n -webkit-line-clamp: 3; }\n .collapseContent__desc--4 code,\n .collapseContent__desc--4 p {\n -webkit-line-clamp: 4; }\n .collapseContent__desc--5 code,\n .collapseContent__desc--5 p {\n -webkit-line-clamp: 5; }\n .collapseContent__desc--10 code,\n .collapseContent__desc--10 p {\n -webkit-line-clamp: 10; }\n .collapseContent__desc--lightHeight code,\n .collapseContent__desc--lightHeight p {\n line-height: 2.25; }\n .collapseContent__desc--expand code,\n .collapseContent__desc--expand p {\n -webkit-line-clamp: initial; }\n");const m=s=>{const{className:r,content:m,textColor:_,fontSize:C,lineClamp:g,useLightHeight:h,useTextIndent:f}=s,{formatMessage:u,primaryColor:b,secondaryColor:x,shadowColor:w}=s;if(!m)return e.createElement(e.Fragment,null);const[y,k]=t(!1),[v,H]=t(!1),N=n();o((()=>{if(m&&N&&N.current){const e=N.current.getElementsByTagName("code")[0]||N.current.getElementsByTagName("p")[0],{clientHeight:t,scrollHeight:n}=e||{};H(n>t)}}),[N,m]);const{fontSizeRem:S,textIndent:z}=l((()=>({fontSizeRem:C/16+"rem",textIndent:C/16*2+"rem"})),[C]);return e.createElement("div",{className:a("collapseContent",r)},e.createElement(c,{ref:N,variant:"inherit",className:a("collapseContent__desc",`collapseContent__desc--${g<=5?g:10}`,{"collapseContent__desc--expand":y},{"collapseContent__desc--lightHeight":h}),color:"textSecondary",style:{color:_,fontSize:S,textIndent:f?z:void 0}},void 0===(E=m)?"":p.parse(d.render(E))),v&&e.createElement(i,{small:!0,primaryColor:b,secondaryColor:x,shadowColor:w,formatMessage:u,expand:y,setExpand:k}));var E};m.defaultProps={className:void 0,content:void 0,textColor:void 0,fontSize:24,lineClamp:2,useLightHeight:void 0,useTextIndent:!0,formatMessage:void 0,primaryColor:"#271702",secondaryColor:"#aa8859",shadowColor:void 0},m.propTypes={className:r.string,content:r.string,textColor:r.string,fontSize:r.number,lineClamp:r.number,useLightHeight:r.bool,useTextIndent:r.bool,formatMessage:r.func,primaryColor:r.string,secondaryColor:r.string,shadowColor:r.string};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as e}from"./_rollupPluginBabelHelpers-ec4e2a53.js";import t,{useState as o}from"react";import n from"prop-types";import{c as r}from"./index-b2745105.js";import{ExitToApp as a}from"@material-ui/icons";import{Dialog as i,DialogContent as c,DialogContentText as l,DialogActions as s,Button as u}from"@material-ui/core";import{s as p}from"./style-inject.es-1f59c1d0.js";var f=function(e,t,o,n){var r=new Blob(void 0!==n?[n,e]:[e],{type:o||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(r,t);else{var a=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(r):window.webkitURL.createObjectURL(r),i=document.createElement("a");i.style.display="none",i.href=a,i.setAttribute("download",t),void 0===i.download&&i.setAttribute("target","_blank"),document.body.appendChild(i),i.click(),setTimeout((function(){document.body.removeChild(i),window.URL.revokeObjectURL(a)}),200)}};const d=e=>{let t="";if(Array.isArray(e)&&e.length>0){const o=Object.keys(e[0]);t+=`${o.toString()}\n`,e.forEach((e=>{o.forEach((o=>{t+=`${e[o]},`})),t+="\n"}))}else{const o=Object.keys(e);t+=`${o.toString()}\n`,o.forEach((o=>{t+=`${e[o]},`})),t+="\n"}return t},m=e=>{let t="";if(Array.isArray(e)&&e.length>0){const o=Object.keys(e[0]);e.forEach(((e,n)=>{t+=`(${n+1})\n`,o.forEach((o=>{t+=`${o}: ${e[o]}\n`})),t+="\n"}))}else{Object.keys(e).forEach((o=>{t+=`${o}: ${e[o]}\n`}))}return t};p(".exportButton {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n transition: color 0.3s ease-in-out;\n -webkit-user-select: none;\n user-select: none; }\n .exportButton--right {\n justify-content: flex-end; }\n .exportButton__text {\n display: flex;\n align-items: center;\n text-decoration: underline;\n cursor: pointer; }\n .exportButton__text__icon {\n font-size: 2rem;\n margin-right: 4px; }\n .exportButton__text:hover {\n color: black; }\n");var x=function(n){var p=n.className,x=n.color,y=n.right,b=n.forceTxt,g=n.exportText,v=n.exportTypeText,w=n.data,E=o(!1),h=e(E,2),k=h[0],T=h[1],_=[{type:"CSV",click:function(){return f("\ufeff".concat(d(w)),"output.csv")}},{type:"EXCEL",click:function(){return f("\ufeff".concat(d(w)),"output.xls")}},{type:"TXT",click:function(){return f("\ufeff".concat(m(w)),"output.txt")}}];return t.createElement("div",{style:{color:x},className:r("exportButton",{"exportButton--right":y},p)},t.createElement("div",{className:"exportButton__text",onClick:function(){return b?f("\ufeff".concat(m(w)),"output.txt"):T(!0)}},t.createElement(a,{className:"exportButton__text__icon"}),g),t.createElement(i,{open:k,keepMounted:!0,onClose:function(){return T(!1)},"aria-labelledby":"alert-dialog-slide-title","aria-describedby":"alert-dialog-slide-description"},t.createElement(c,null,t.createElement(l,null,v)),t.createElement(s,null,_.map((function(e){var o=e.type,n=e.click;return t.createElement(u,{key:o,variant:"text",onClick:function(){n(),T(!1)}},o)})))))};x.defaultProps={className:void 0,color:"#4e3a16",right:void 0,forceTxt:!0,exportText:"Export",exportTypeText:"Export Type",data:void 0},x.propTypes={className:n.string,color:n.string,right:n.bool,forceTxt:n.bool,exportText:n.string,exportTypeText:n.string,data:n.oneOfType([n.objectOf(n.any),n.arrayOf(n.any)])};export{x as default};
|
package/lib/components/SNA.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as t}from"./_rollupPluginBabelHelpers-ec4e2a53.js";import e,{useMemo as
|
|
1
|
+
import{a as t}from"./_rollupPluginBabelHelpers-ec4e2a53.js";import*as e from"react";import n,{useMemo as r,useState as i,useRef as o,useEffect as a,useCallback as u}from"react";import l from"prop-types";import{u as c,b as s,c as f}from"./index-b2745105.js";import{i as h,a as p,r as d}from"./createSvgIcon-a1181ad3.js";import{Menu as v,MenuItem as g}from"@material-ui/core";import y from"./Tooltip.js";import{s as m}from"./style-inject.es-1f59c1d0.js";import"@material-ui/styles";import"react-dom";var w={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},_=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],b=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],x=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],E="undefined"!=typeof window&&void 0!==window.document?window.document:{},k="fullscreenEnabled"in E&&Object.keys(w)||_[0]in E&&_||b[0]in E&&b||x[0]in E&&x||[],S={requestFullscreen:function(t){return t[k[w.requestFullscreen]]()},requestFullscreenFunction:function(t){return t[k[w.requestFullscreen]]},get exitFullscreen(){return E[k[w.exitFullscreen]].bind(E)},get fullscreenPseudoClass(){return":"+k[w.fullscreen]},addEventListener:function(t,e,n){return E.addEventListener(k[w[t]],e,n)},removeEventListener:function(t,e,n){return E.removeEventListener(k[w[t]],e,n)},get fullscreenEnabled(){return Boolean(E[k[w.fullscreenEnabled]])},set fullscreenEnabled(t){},get fullscreenElement(){return E[k[w.fullscreenElement]]},set fullscreenElement(t){},get onfullscreenchange(){return E[("on"+k[w.fullscreenchange]).toLowerCase()]},set onfullscreenchange(t){return E[("on"+k[w.fullscreenchange]).toLowerCase()]=t},get onfullscreenerror(){return E[("on"+k[w.fullscreenerror]).toLowerCase()]},set onfullscreenerror(t){return E[("on"+k[w.fullscreenerror]).toLowerCase()]=t}},N=S;var A,P,C=function(t){var e=t.handle,r=t.onChange,i=t.children,o=t.className,u=[];return o&&u.push(o),u.push("fullscreen"),e.active&&u.push("fullscreen-enabled"),a((function(){r&&r(e.active,e)}),[e.active]),n.createElement("div",{className:u.join(" "),ref:e.node,style:e.active?{height:"100%",width:"100%"}:void 0},i)},M=s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=h(n),i=(0,p(d).default)(r.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExit");e.default=i})),j=c(M),z=s((function(t,e){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));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 i={hmr:!0,transform:void 0,insertInto:void 0};n(6)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){
|
|
2
2
|
/** @license React v16.5.2
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -7,10 +7,10 @@ import{a as t}from"./_rollupPluginBabelHelpers-ec4e2a53.js";import e,{useMemo as
|
|
|
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),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,u=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,s=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.async_mode"):60111,p=i?Symbol.for("react.forward_ref"):60112,d="function"==typeof Symbol&&Symbol.iterator;function
|
|
10
|
+
var r=n(3),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,u=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,s=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.async_mode"):60111,p=i?Symbol.for("react.forward_ref"):60112,d="function"==typeof Symbol&&Symbol.iterator;function v(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(t,e,n,r,i,o,a,u){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,u],c=0;(t=Error(e.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw t.framesToPop=1,t}}(!1,"Minified React error #"+t+"; 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(){}},y={};function m(t,e,n){this.props=t,this.context=e,this.refs=y,this.updater=n||g}function w(){}function _(t,e,n){this.props=t,this.context=e,this.refs=y,this.updater=n||g}m.prototype.isReactComponent={},m.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&v("85"),this.updater.enqueueSetState(this,t,e,"setState")},m.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=m.prototype;var b=_.prototype=new w;b.constructor=_,r(b,m.prototype),b.isPureReactComponent=!0;var x={current:null,currentDispatcher:null},E=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function S(t,e,n){var r=void 0,i={},a=null,u=null;if(null!=e)for(r in void 0!==e.ref&&(u=e.ref),void 0!==e.key&&(a=""+e.key),e)E.call(e,r)&&!k.hasOwnProperty(r)&&(i[r]=e[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),s=0;s<l;s++)c[s]=arguments[s+2];i.children=c}if(t&&t.defaultProps)for(r in l=t.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:t,key:a,ref:u,props:i,_owner:x.current}}function N(t){return"object"==typeof t&&null!==t&&t.$$typeof===o}var A=/\/+/g,P=[];function C(t,e,n,r){if(P.length){var i=P.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function M(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>P.length&&P.push(t)}function j(t,e,n){return null==t?0:function t(e,n,r,i){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var l=!1;if(null===e)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case o:case a:l=!0}}if(l)return r(i,e,""===n?"."+z(e,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c<e.length;c++){var s=n+z(u=e[c],c);l+=t(u,s,r,i)}else if("function"==typeof(s=null===e||"object"!=typeof e?null:"function"==typeof(s=d&&e[d]||e["@@iterator"])?s:null))for(e=s.call(e),c=0;!(u=e.next()).done;)l+=t(u=u.value,s=n+z(u,c++),r,i);else"object"===u&&v("31","[object Object]"==(r=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":r,"");return l}(t,"",e,n)}function z(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function O(t,e){t.func.call(t.context,e,t.count++)}function T(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?R(t,r,n,(function(t){return t})):null!=t&&(N(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(A,"$&/")+"/")+n)),r.push(t))}function R(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(A,"$&/")+"/"),j(t,T,e=C(e,o,r,i)),M(e)}var F={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return R(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;j(t,O,e=C(null,null,e,n)),M(e)},count:function(t){return j(t,(function(){return null}),null)},toArray:function(t){var e=[];return R(t,e,null,(function(t){return t})),e},only:function(t){return N(t)||v("143"),t}},createRef:function(){return{current:null}},Component:m,PureComponent:_,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:f,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:s,_context:t},t.Consumer=t,t.unstable_read=function(t,e){var n=x.currentDispatcher;return null===n&&v("277"),n.readContext(t,e)}.bind(null,t),t},forwardRef:function(t){return{$$typeof:p,render:t}},Fragment:u,StrictMode:l,unstable_AsyncMode:h,unstable_Profiler:c,createElement:S,cloneElement:function(t,e,n){null==t&&v("267",t);var i=void 0,a=r({},t.props),u=t.key,l=t.ref,c=t._owner;if(null!=e){void 0!==e.ref&&(l=e.ref,c=x.current),void 0!==e.key&&(u=""+e.key);var s=void 0;for(i in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)E.call(e,i)&&!k.hasOwnProperty(i)&&(a[i]=void 0===e[i]&&void 0!==s?s[i]:e[i])}if(1==(i=arguments.length-2))a.children=n;else if(1<i){s=Array(i);for(var f=0;f<i;f++)s[f]=arguments[f+2];a.children=s}return{$$typeof:o,type:t.type,key:u,ref:l,props:a,_owner:c}},createFactory:function(t){var e=S.bind(null,t);return e.type=t,e},isValidElement:N,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:x,assign:r}},D={default:F},L=D&&F||D;t.exports=L.default||L},function(t,e,n){
|
|
11
11
|
/*
|
|
12
12
|
object-assign
|
|
13
13
|
(c) Sindre Sorhus
|
|
14
14
|
@license MIT
|
|
15
15
|
*/
|
|
16
|
-
var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=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,u=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){a=r(n);for(var s=0;s<a.length;s++)o.call(n,a[s])&&(u[a[s]]=n[a[s]])}}return u}},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 i=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),o=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(o).concat([i]).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={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"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={},i=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}((function(){return window&&document&&document.all&&!window.atob})),o=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,u=0,l=[],c=n(7);function s(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=r[i.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](i.parts[a]);for(;a<i.parts.length;a++)o.parts.push(v(i.parts[a],e))}else{var u=[];for(a=0;a<i.parts.length;a++)u.push(v(i.parts[a],e));r[i.id]={id:i.id,refs:1,parts:u}}}}function f(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],u={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(u):n.push(r[a]={id:a,parts:[u]})}return n}function h(t,e){var n=o(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=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.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 i=o(t.insertAt.before,n);n.insertBefore(e,i)}}function p(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.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 g(e,t.attrs),h(t,e),e}function g(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function v(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var l=u++;n=a||(a=d(e)),r=m.bind(null,n,l,!1),i=m.bind(null,n,l,!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",g(e,t.attrs),h(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=c(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(a),u&&URL.revokeObjectURL(u)}.bind(null,n,e),i=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),i=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 i()}}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=i()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return s(n,e),function(t){for(var i=[],o=0;o<n.length;o++){var a=n[o];(u=r[a.id]).refs--,i.push(u)}for(t&&s(f(t,e),e),o=0;o<i.length;o++){var u;if(0===(u=i[o]).refs){for(var l=0;l<u.parts.length;l++)u.parts[l]();delete r[u.id]}}}};var y=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},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 i,o=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(t,e,n){n.r(e);var r=n(0),i=n.n(r),o="up",a="down";function u(t){return(u="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 l(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 c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=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"!==u(e)&&"function"!=typeof e?f(t):e}(this,c(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&&s(t,e)}(e,r.Component),function(t,e,n){e&&l(t.prototype,e),n&&l(t,n)}(e,[{key:"onClick",value:function(){(0,this.props.onClick)()}},{key:"getDefaultButtonContent",value:function(){var t=this.props.direction===o?"36px":"20px";return i.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,o=e.customButton,a=void 0===o?this.getDefaultButtonContent():o;return i.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 g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(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?y(t):e}(this,g(e).call(this))).handleChange.bind(y(y(t))),t.setChangeDirection.bind(y(y(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&&v(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===o?e:-1*e,r=window.getComputedStyle(t,null).getPropertyValue("font-size"),i=this.getFontSizeDetails(r).value,a=i+n;t.style.fontSize=a+"px",a!==i&&this.handleChange(t,a,i)}},{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 i,o=t.children[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;this.iterateChildren(a)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}}},{key:"updateChangeCount",value:function(){var t=this.state,e=t.changeCount,n=t.changeDirection===o?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 i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,u=document.querySelectorAll(a),l=!0,c=!1,s=void 0;try{for(var f,h=u[Symbol.iterator]();!(l=(f=h.next()).done);l=!0){var p=f.value;this.iterateChildren(p)}}catch(t){c=!0,s=t}finally{try{l||null==h.return||h.return()}finally{if(c)throw s}}}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.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,i=!0;return n===o&&e>=r&&(i=!1),n===a&&e<=-1*r&&(i=!1),i}},{key:"initFontSizeChange",value:function(){this.validateChangePerRange()&&this.iterateElementsAndApplyFontSizeChange()}},{key:"setChangeDirection",value:function(t,e){var n=t?o: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,i=void 0!==r&&r,o=t.buttonsMargin,a=void 0===o?4:o,u=this.getFontSizeDetails(n.width||"40px"),l=this.getFontSizeDetails(n.height||"40px");return{width:(!1===i?2*u.value+a:u.value)+u.unit,height:(!1===i?l.value:2*l.value+a)+l.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(t,e){var n=e.style,r=void 0===n?{}:n,i=e.verticalAlignment,u=void 0!==i&&i,l=e.reverseOrder,c=void 0!==l&&l,s=e.buttonsMargin,f=void 0===s?4:s,h=this.getFontSizeDetails(r.width||"40px"),p=this.getFontSizeDetails(r.height||"40px"),d={width:h.value+h.unit,height:p.value+p.unit},g=f+(!1===u?h.unit:p.unit);return(t===o&&!1===c||t===a&&!0===c)&&(!1===u?d.marginRight=g:d.marginBottom=g),Object.assign({},r,d)}},{key:"render",value:function(){var t=this.props.customButtons,e=void 0===t?{}:t,n=e.up,r=e.down,u=this.getFontSizeChangerStyle(e),l=this.getFontSizeChangerButtonStyle(o,e),c=this.getFontSizeChangerButtonStyle(a,e);return i.a.createElement("div",{className:"font-size-changer",style:u},i.a.createElement("div",{className:"font-size-changer-buttons",style:u},i.a.createElement(h,{direction:o,customButton:n,onClick:this.onFontSizeUp.bind(this),style:l}),i.a.createElement(h,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:c})))}}]),e}();e.default=m}])})),O=l(z);function T(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}1===(P=T).length&&(M=P,P=function(t,e){return T(M(t),e)});var F={value:function(){}};function R(){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 L(r)}function L(t){this._=t}function q(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 D(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function B(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=F,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}L.prototype=R.prototype={constructor:L,on:function(t,e){var n,r=this._,i=q(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=B(r[n],t.name,e);else if(null==e)for(n in r)r[n]=B(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=D(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new L(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){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(e,n)}};var U="http://www.w3.org/1999/xhtml",$={svg:"http://www.w3.org/2000/svg",xhtml:U,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function I(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),$.hasOwnProperty(e)?{space:$[e],local:t}:t}function H(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===U&&e.documentElement.namespaceURI===U?e.createElement(t):e.createElementNS(n,t)}}function V(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function G(t){var e=I(t);return(e.local?V:H)(e)}function X(){}function Y(t){return null==t?X:function(){return this.querySelector(t)}}function W(){return[]}function J(t){return null==t?W:function(){return this.querySelectorAll(t)}}function K(t){return function(){return this.matches(t)}}function Q(t){return new Array(t.length)}function Z(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Z.prototype={constructor:Z,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 tt(t,e,n,r,i,o){for(var a,u=0,l=e.length,c=o.length;u<c;++u)(a=e[u])?(a.__data__=o[u],r[u]=a):n[u]=new Z(t,o[u]);for(;u<l;++u)(a=e[u])&&(i[u]=a)}function et(t,e,n,r,i,o,a){var u,l,c,s={},f=e.length,h=o.length,p=new Array(f);for(u=0;u<f;++u)(l=e[u])&&(p[u]=c="$"+a.call(l,l.__data__,u,e),c in s?i[u]=l:s[c]=l);for(u=0;u<h;++u)(l=s[c="$"+a.call(t,o[u],u,o)])?(r[u]=l,l.__data__=o[u],s[c]=null):n[u]=new Z(t,o[u]);for(u=0;u<f;++u)(l=e[u])&&s[p[u]]===l&&(i[u]=l)}function nt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function rt(t){return function(){this.removeAttribute(t)}}function it(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ot(t,e){return function(){this.setAttribute(t,e)}}function at(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ut(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function lt(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 ct(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function st(t){return function(){this.style.removeProperty(t)}}function ft(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ht(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function pt(t,e){return t.style.getPropertyValue(e)||ct(t).getComputedStyle(t,null).getPropertyValue(e)}function dt(t){return function(){delete this[t]}}function gt(t,e){return function(){this[t]=e}}function vt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function yt(t){return t.trim().split(/^|\s+/)}function mt(t){return t.classList||new wt(t)}function wt(t){this._node=t,this._names=yt(t.getAttribute("class")||"")}function _t(t,e){for(var n=mt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function bt(t,e){for(var n=mt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function xt(t){return function(){_t(this,t)}}function kt(t){return function(){bt(this,t)}}function St(t,e){return function(){(e.apply(this,arguments)?_t:bt)(this,t)}}function At(){this.textContent=""}function Nt(t){return function(){this.textContent=t}}function Et(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Pt(){this.innerHTML=""}function Mt(t){return function(){this.innerHTML=t}}function Ct(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function jt(){this.nextSibling&&this.parentNode.appendChild(this)}function zt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ot(){return null}function Tt(){var t=this.parentNode;t&&t.removeChild(this)}function Ft(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Rt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}wt.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 Lt={},qt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Lt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Dt(t,e,n){return t=Bt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Bt(t,e,n){return function(r){var i=qt;qt=r;try{t.call(this,this.__data__,e,n)}finally{qt=i}}}function Ut(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 $t(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function It(t,e,n){var r=Lt.hasOwnProperty(t.type)?Dt:Bt;return function(i,o,a){var u,l=this.__on,c=r(e,o,a);if(l)for(var s=0,f=l.length;s<f;++s)if((u=l[s]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=n),void(u.value=e);this.addEventListener(t.type,c,n),u={type:t.type,name:t.name,value:e,listener:c,capture:n},l?l.push(u):this.__on=[u]}}function Ht(t,e,n,r){var i=qt;t.sourceEvent=qt,qt=t;try{return e.apply(n,r)}finally{qt=i}}function Vt(t,e,n){var r=ct(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Gt(t,e){return function(){return Vt(this,t,e)}}function Xt(t,e){return function(){return Vt(this,t,e.apply(this,arguments))}}var Yt=[null];function Wt(t,e){this._groups=t,this._parents=e}function Jt(){return new Wt([[document.documentElement]],Yt)}function Kt(t){return"string"==typeof t?new Wt([[document.querySelector(t)]],[document.documentElement]):new Wt([[t]],Yt)}function Qt(){for(var t,e=qt;t=e.sourceEvent;)e=t;return e}function Zt(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 i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function te(t){var e=Qt();return e.changedTouches&&(e=e.changedTouches[0]),Zt(t,e)}function ee(t,e,n){arguments.length<3&&(n=e,e=Qt().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return Zt(t,r);return null}function ne(){qt.stopImmediatePropagation()}function re(){qt.preventDefault(),qt.stopImmediatePropagation()}function ie(t){var e=t.document.documentElement,n=Kt(t).on("dragstart.drag",re,!0);"onselectstart"in e?n.on("selectstart.drag",re,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function oe(t){return function(){return t}}function ae(t,e,n,r,i,o,a,u,l,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=u,this.dy=l,this._=c}function ue(){return!qt.ctrlKey&&!qt.button}function le(){return this.parentNode}function ce(t){return null==t?{x:qt.x,y:qt.y}:t}function se(){return navigator.maxTouchPoints||"ontouchstart"in this}function fe(){var t,e,n,r,i=ue,o=le,a=ce,u=se,l={},c=R("start","drag","end"),s=0,f=0;function h(t){t.on("mousedown.drag",p).filter(u).on("touchstart.drag",v).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&i.apply(this,arguments)){var a=w("mouse",o.apply(this,arguments),te,this,arguments);a&&(Kt(qt.view).on("mousemove.drag",d,!0).on("mouseup.drag",g,!0),ie(qt.view),ne(),n=!1,t=qt.clientX,e=qt.clientY,a("start"))}}function d(){if(re(),!n){var r=qt.clientX-t,i=qt.clientY-e;n=r*r+i*i>f}l.mouse("drag")}function g(){Kt(qt.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=Kt(t).on("dragstart.drag",null);e&&(r.on("click.drag",re,!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)}(qt.view,n),re(),l.mouse("end")}function v(){if(i.apply(this,arguments)){var t,e,n=qt.changedTouches,r=o.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=w(n[t].identifier,r,ee,this,arguments))&&(ne(),e("start"))}}function y(){var t,e,n=qt.changedTouches,r=n.length;for(t=0;t<r;++t)(e=l[n[t].identifier])&&(re(),e("drag"))}function m(){var t,e,n=qt.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=l[n[t].identifier])&&(ne(),e("end"))}function w(t,e,n,r,i){var o,u,f,p=n(e,t),d=c.copy();if(Ht(new ae(h,"beforestart",o,t,s,p[0],p[1],0,0,d),(function(){return null!=(qt.subject=o=a.apply(r,i))&&(u=o.x-p[0]||0,f=o.y-p[1]||0,!0)})))return function a(c){var g,v=p;switch(c){case"start":l[t]=a,g=s++;break;case"end":delete l[t],--s;case"drag":p=n(e,t),g=s}Ht(new ae(h,c,o,t,g,p[0]+u,p[1]+f,p[0]-v[0],p[1]-v[1],d),d.apply,d,[c,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:oe(!!t),h):i},h.container=function(t){return arguments.length?(o="function"==typeof t?t:oe(t),h):o},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:oe(t),h):a},h.touchable=function(t){return arguments.length?(u="function"==typeof t?t:oe(!!t),h):u},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h}function he(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function pe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function de(){}Wt.prototype=Jt.prototype={constructor:Wt,select:function(t){"function"!=typeof t&&(t=Y(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,u=e[i],l=u.length,c=r[i]=new Array(l),s=0;s<l;++s)(o=u[s])&&(a=t.call(o,o.__data__,s,u))&&("__data__"in o&&(a.__data__=o.__data__),c[s]=a);return new Wt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=J(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,u=e[o],l=u.length,c=0;c<l;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),i.push(a));return new Wt(r,i)},filter:function(t){"function"!=typeof t&&(t=K(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,l=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new Wt(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),c=-1,this.each((function(t){p[++c]=t})),p;var n=e?et:tt,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),u=new Array(o),l=new Array(o),c=0;c<o;++c){var s=r[c],f=i[c],h=f.length,p=t.call(s,s&&s.__data__,c,r),d=p.length,g=u[c]=new Array(d),v=a[c]=new Array(d);n(s,f,g,v,l[c]=new Array(h),p,e);for(var y,m,w=0,_=0;w<d;++w)if(y=g[w]){for(w>=_&&(_=w+1);!(m=v[_])&&++_<d;);y._next=m||null}}return(a=new Wt(a,r))._enter=u,a._exit=l,a},enter:function(){return new Wt(this._enter||this._groups.map(Q),this._parents)},exit:function(){return new Wt(this._exit||this._groups.map(Q),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var l,c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new Wt(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(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=nt);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,u=n[o],l=u.length,c=i[o]=new Array(l),s=0;s<l;++s)(a=u[s])&&(c[s]=a);c.sort(e)}return new Wt(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()),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],i=0,o=r.length;i<o;++i){var a=r[i];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 i,o=e[n],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=I(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?it:rt:"function"==typeof e?n.local?lt:ut:n.local?at:ot)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?st:"function"==typeof e?ht:ft)(t,e,null==n?"":n)):pt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?dt:"function"==typeof e?vt:gt)(t,e)):this.node()[t]},classed:function(t,e){var n=yt(t+"");if(arguments.length<2){for(var r=mt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?St:e?xt:kt)(n,e))},text:function(t){return arguments.length?this.each(null==t?At:("function"==typeof t?Et:Nt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Pt:("function"==typeof t?Ct:Mt)(t)):this.node().innerHTML},raise:function(){return this.each(jt)},lower:function(){return this.each(zt)},append:function(t){var e="function"==typeof t?t:G(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:G(t),r=null==e?Ot:"function"==typeof e?e:Y(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Tt)},clone:function(t){return this.select(t?Rt:Ft)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Ut(t+""),a=o.length;if(!(arguments.length<2)){for(u=e?It:$t,null==n&&(n=!1),r=0;r<a;++r)this.each(u(o[r],e,n));return this}var u=this.node().__on;if(u)for(var l,c=0,s=u.length;c<s;++c)for(r=0,l=u[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Xt:Gt)(t,e))}},ae.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ge=1/.7,ve="\\s*([+-]?\\d+)\\s*",ye="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",me="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",we=/^#([0-9a-f]{3,8})$/,_e=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),be=new RegExp("^rgb\\("+[me,me,me]+"\\)$"),xe=new RegExp("^rgba\\("+[ve,ve,ve,ye]+"\\)$"),ke=new RegExp("^rgba\\("+[me,me,me,ye]+"\\)$"),Se=new RegExp("^hsl\\("+[ye,me,me]+"\\)$"),Ae=new RegExp("^hsla\\("+[ye,me,me,ye]+"\\)$"),Ne={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 Ee(){return this.rgb().formatHex()}function Pe(){return this.rgb().formatRgb()}function Me(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=we.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ce(e):3===n?new Te(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?je(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?je(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=_e.exec(t))?new Te(e[1],e[2],e[3],1):(e=be.exec(t))?new Te(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=xe.exec(t))?je(e[1],e[2],e[3],e[4]):(e=ke.exec(t))?je(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Se.exec(t))?qe(e[1],e[2]/100,e[3]/100,1):(e=Ae.exec(t))?qe(e[1],e[2]/100,e[3]/100,e[4]):Ne.hasOwnProperty(t)?Ce(Ne[t]):"transparent"===t?new Te(NaN,NaN,NaN,0):null}function Ce(t){return new Te(t>>16&255,t>>8&255,255&t,1)}function je(t,e,n,r){return r<=0&&(t=e=n=NaN),new Te(t,e,n,r)}function ze(t){return t instanceof de||(t=Me(t)),t?new Te((t=t.rgb()).r,t.g,t.b,t.opacity):new Te}function Oe(t,e,n,r){return 1===arguments.length?ze(t):new Te(t,e,n,null==r?1:r)}function Te(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Fe(){return"#"+Le(this.r)+Le(this.g)+Le(this.b)}function Re(){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 Le(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function qe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Be(t,e,n,r)}function De(t){if(t instanceof Be)return new Be(t.h,t.s,t.l,t.opacity);if(t instanceof de||(t=Me(t)),!t)return new Be;if(t instanceof Be)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new Be(a,u,l,t.opacity)}function Be(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ue(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 $e(t){return function(){return t}}function Ie(t){return 1==(t=+t)?He: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):$e(isNaN(e)?n:e)}}function He(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):$e(isNaN(t)?e:t)}he(de,Me,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHsl:function(){return De(this).formatHsl()},formatRgb:Pe,toString:Pe}),he(Te,Oe,pe(de,{brighter:function(t){return t=null==t?ge:Math.pow(ge,t),new Te(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Te(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:Fe,formatHex:Fe,formatRgb:Re,toString:Re})),he(Be,(function(t,e,n,r){return 1===arguments.length?De(t):new Be(t,e,n,null==r?1:r)}),pe(de,{brighter:function(t){return t=null==t?ge:Math.pow(ge,t),new Be(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Be(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,i=2*n-r;return new Te(Ue(t>=240?t-240:t+120,i,r),Ue(t,i,r),Ue(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 Ve=function t(e){var n=Ie(e);function r(t,e){var r=n((t=Oe(t)).r,(e=Oe(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=He(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Ge(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Xe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ye=new RegExp(Xe.source,"g");function We(t,e){var n,r,i,o=Xe.lastIndex=Ye.lastIndex=0,a=-1,u=[],l=[];for(t+="",e+="";(n=Xe.exec(t))&&(r=Ye.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:Ge(n,r)})),o=Ye.lastIndex;return o<e.length&&(i=e.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)u[(n=l[r]).i]=n.x(t);return u.join("")})}var Je,Ke,Qe,Ze,tn=180/Math.PI,en={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function nn(t,e,n,r,i,o){var a,u,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,l/=u),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*tn,skewX:Math.atan(l)*tn,scaleX:a,scaleY:u}}function rn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],l=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var l=a.push("translate(",null,e,null,n);u.push({i:l-4,x:Ge(t,i)},{i:l-2,x:Ge(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,u,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ge(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,u,l),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Ge(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,u,l),function(t,e,n,r,o,a){if(t!==n||e!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Ge(t,n)},{i:u-2,x:Ge(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,l),o=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)u[(e=l[n]).i]=e.x(t);return u.join("")}}}var on,an,un=rn((function(t){return"none"===t?en:(Je||(Je=document.createElement("DIV"),Ke=document.documentElement,Qe=document.defaultView),Je.style.transform=t,t=Qe.getComputedStyle(Ke.appendChild(Je),null).getPropertyValue("transform"),Ke.removeChild(Je),nn(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),ln=rn((function(t){return null==t?en:(Ze||(Ze=document.createElementNS("http://www.w3.org/2000/svg","g")),Ze.setAttribute("transform",t),(t=Ze.transform.baseVal.consolidate())?nn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):en)}),", ",")",")"),cn=0,sn=0,fn=0,hn=0,pn=0,dn=0,gn="object"==typeof performance&&performance.now?performance:Date,vn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function yn(){return pn||(vn(mn),pn=gn.now()+dn)}function mn(){pn=0}function wn(){this._call=this._time=this._next=null}function _n(t,e,n){var r=new wn;return r.restart(t,e,n),r}function bn(){pn=(hn=gn.now())+dn,cn=sn=0;try{!function(){yn(),++cn;for(var t,e=on;e;)(t=pn-e._time)>=0&&e._call.call(null,t),e=e._next;--cn}()}finally{cn=0,function(){var t,e,n=on,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:on=e);an=t,kn(r)}(),pn=0}}function xn(){var t=gn.now(),e=t-hn;e>1e3&&(dn-=e,hn=t)}function kn(t){cn||(sn&&(sn=clearTimeout(sn)),t-pn>24?(t<1/0&&(sn=setTimeout(bn,t-gn.now()-dn)),fn&&(fn=clearInterval(fn))):(fn||(hn=gn.now(),fn=setInterval(xn,1e3)),cn=1,vn(bn)))}function Sn(t,e,n){var r=new wn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}wn.prototype=_n.prototype={constructor:wn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?yn():+n)+(null==e?0:+e),this._next||an===this||(an?an._next=this:on=this,an=this),this._call=t,this._time=n,kn()},stop:function(){this._call&&(this._call=null,this._time=1/0,kn())}};var An=R("start","end","cancel","interrupt"),Nn=[];function En(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var c,s,f,h;if(1!==n.state)return l();for(c in i)if((h=i[c]).name===n.name){if(3===h.state)return Sn(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(Sn((function(){3===n.state&&(n.state=4,n.timer.restart(u,n.delay,n.time),u(o))})),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),c=0,s=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++s]=h);r.length=s+1}}function u(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=_n(o,0,n.time)}(t,n,{name:e,index:r,group:i,on:An,tween:Nn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Pn(t,e){var n=Cn(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Mn(t,e){var n=Cn(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Cn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function jn(t,e){var n,r;return function(){var i=Mn(this,t),o=i.tween;if(o!==n)for(var a=0,u=(r=n=o).length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function zn(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Mn(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=u;break}l===c&&i.push(u)}o.tween=i}}function On(t,e,n){var r=t._id;return t.each((function(){var t=Mn(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Cn(t,r).value[e]}}function Tn(t,e){var n;return("number"==typeof e?Ge:e instanceof Me?Ve:(n=Me(e))?(e=n,Ve):We)(t,e)}function Fn(t){return function(){this.removeAttribute(t)}}function Rn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ln(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function qn(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function Dn(t,e,n){var r,i,o;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,l));this.removeAttribute(t)}}function Bn(t,e,n){var r,i,o;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function Un(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function $n(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function In(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&$n(t,i)),n}return i._value=e,i}function Hn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Un(t,i)),n}return i._value=e,i}function Vn(t,e){return function(){Pn(this,t).delay=+e.apply(this,arguments)}}function Gn(t,e){return e=+e,function(){Pn(this,t).delay=e}}function Xn(t,e){return function(){Mn(this,t).duration=+e.apply(this,arguments)}}function Yn(t,e){return e=+e,function(){Mn(this,t).duration=e}}function Wn(t,e){if("function"!=typeof e)throw new Error;return function(){Mn(this,t).ease=e}}function Jn(t,e,n){var r,i,o=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)?Pn:Mn;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}var Kn=Jt.prototype.constructor;function Qn(t){return function(){this.style.removeProperty(t)}}function Zn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function tr(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Zn(t,o,n)),r}return o._value=e,o}function er(t){return function(e){this.textContent=t.call(this,e)}}function nr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&er(r)),e}return r._value=t,r}var rr=0;function ir(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function or(){return++rr}var ar=Jt.prototype;ir.prototype={constructor:ir,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Y(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,l,c=r[a],s=c.length,f=o[a]=new Array(s),h=0;h<s;++h)(u=c[h])&&(l=t.call(u,u.__data__,h,c))&&("__data__"in u&&(l.__data__=u.__data__),f[h]=l,En(f[h],e,n,h,f,Cn(u,n)));return new ir(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=J(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var l,c=r[u],s=c.length,f=0;f<s;++f)if(l=c[f]){for(var h,p=t.call(l,l.__data__,f,c),d=Cn(l,n),g=0,v=p.length;g<v;++g)(h=p[g])&&En(h,e,n,g,p,d);o.push(p),a.push(l)}return new ir(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=K(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,l=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new ir(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,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var l,c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new ir(a,this._parents,this._name,this._id)},selection:function(){return new Kn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=or(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],l=u.length,c=0;c<l;++c)if(a=u[c]){var s=Cn(a,e);En(a,t,n,c,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new ir(r,this._parents,t,n)},call:ar.call,nodes:ar.nodes,node:ar.node,size:ar.size,empty:ar.empty,each:ar.each,on:function(t,e){var n=this._id;return arguments.length<2?Cn(this.node(),n).on.on(t):this.each(Jn(n,t,e))},attr:function(t,e){var n=I(t),r="transform"===n?ln:Tn;return this.attrTween(t,"function"==typeof e?(n.local?Bn:Dn)(n,r,On(this,"attr."+t,e)):null==e?(n.local?Rn:Fn)(n):(n.local?qn:Ln)(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=I(t);return this.tween(n,(r.local?In:Hn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?un:Tn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=pt(this,t),a=(this.style.removeProperty(t),pt(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Qn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=pt(this,t),u=n(this),l=u+"";return null==u&&(this.style.removeProperty(t),l=u=pt(this,t)),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,u))}}(t,r,On(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,u="end."+a;return function(){var l=Mn(this,t),c=l.on,s=null==l.value[a]?o||(o=Qn(e)):void 0;c===n&&i===s||(r=(n=c).copy()).on(u,i=s),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=pt(this,t);return a===o?null:a===r?i:i=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,tr(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}}(On(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,nr(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,i=Cn(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?jn:zn)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Vn:Gn)(e,t)):Cn(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Xn:Yn)(e,t)):Cn(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Wn(e,t)):Cn(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var u={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=Mn(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(l)),n.on=e}))}))}};var ur={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function lr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return ur.time=yn(),ur;return n}Jt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).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 o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},Jt.prototype.transition=function(t){var e,n;t instanceof ir?(e=t._id,t=t._name):(e=or(),(n=ur).time=yn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],l=u.length,c=0;c<l;++c)(a=u[c])&&En(a,t,e,c,u,n||lr(a,e));return new ir(r,this._parents,t,e)};function cr(){}function sr(t,e){var n=new cr;if(t instanceof cr)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function fr(){}cr.prototype=sr.prototype={constructor:cr,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 hr=sr.prototype;function pr(t){return function(){return t}}function dr(){return 1e-6*(Math.random()-.5)}function gr(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,u,l,c,s,f,h,p=t._root,d={data:r},g=t._x0,v=t._y0,y=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(o=(g+y)/2))?g=o:y=o,(s=n>=(a=(v+m)/2))?v=a:m=a,i=p,!(p=p[f=s<<1|c]))return i[f]=d,t;if(u=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===u&&n===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(o=(g+y)/2))?g=o:y=o,(s=n>=(a=(v+m)/2))?v=a:m=a}while((f=s<<1|c)==(h=(l>=a)<<1|u>=o));return i[h]=p,i[f]=d,t}function vr(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function yr(t){return t[0]}function mr(t){return t[1]}function wr(t,e,n){var r=new _r(null==e?yr:e,null==n?mr:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function _r(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function br(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}fr.prototype={constructor:fr,has:hr.has,add:function(t){return this["$"+(t+="")]=t,this},remove:hr.remove,clear:hr.clear,values:hr.keys,size:hr.size,empty:hr.empty,each:hr.each};var xr=wr.prototype=_r.prototype;function kr(t){return t.x+t.vx}function Sr(t){return t.y+t.vy}function Ar(t){return t.index}function Nr(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Er(t){return t.x}function Pr(t){return t.y}xr.copy=function(){var t,e,n=new _r(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=br(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=br(e));return n},xr.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return gr(this.cover(e,n),e,n,t)},xr.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),u=new Array(o),l=1/0,c=1/0,s=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,u[n]=i,r<l&&(l=r),r>s&&(s=r),i<c&&(c=i),i>f&&(f=i));if(l>s||c>f)return this;for(this.cover(l,c).cover(s,f),n=0;n<o;++n)gr(this,a[n],u[n],t[n]);return this},xr.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,u,l=i-n,c=this._root;n>t||t>=i||r>e||e>=o;)switch(u=(e<r)<<1|t<n,(a=new Array(4))[u]=c,c=a,l*=2,u){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},xr.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},xr.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]]},xr.find=function(t,e,n){var r,i,o,a,u,l,c,s=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],g=this._root;for(g&&d.push(new vr(g,s,f,h,p)),null==n?n=1/0:(s=t-n,f=e-n,h=t+n,p=e+n,n*=n);l=d.pop();)if(!(!(g=l.node)||(i=l.x0)>h||(o=l.y0)>p||(a=l.x1)<s||(u=l.y1)<f))if(g.length){var v=(i+a)/2,y=(o+u)/2;d.push(new vr(g[3],v,y,a,u),new vr(g[2],i,y,v,u),new vr(g[1],v,o,a,y),new vr(g[0],i,o,v,y)),(c=(e>=y)<<1|t>=v)&&(l=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=l)}else{var m=t-+this._x.call(null,g.data),w=e-+this._y.call(null,g.data),_=m*m+w*w;if(_<n){var b=Math.sqrt(n=_);s=t-b,f=e-b,h=t+b,p=e+b,r=g.data}}return r},xr.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,u,l,c,s,f,h,p=this._root,d=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((c=o>=(u=(d+v)/2))?d=u:v=u,(s=a>=(l=(g+y)/2))?g=l:y=l,e=p,!(p=p[f=s<<1|c]))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(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i: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=i,this)},xr.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},xr.root=function(){return this._root},xr.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},xr.visit=function(t){var e,n,r,i,o,a,u=[],l=this._root;for(l&&u.push(new vr(l,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(l=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&l.length){var c=(r+o)/2,s=(i+a)/2;(n=l[3])&&u.push(new vr(n,c,s,o,a)),(n=l[2])&&u.push(new vr(n,r,s,c,a)),(n=l[1])&&u.push(new vr(n,c,i,o,s)),(n=l[0])&&u.push(new vr(n,r,i,c,s))}return this},xr.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new vr(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,u=e.y0,l=e.x1,c=e.y1,s=(a+l)/2,f=(u+c)/2;(o=i[0])&&n.push(new vr(o,a,u,s,f)),(o=i[1])&&n.push(new vr(o,s,u,l,f)),(o=i[2])&&n.push(new vr(o,a,f,s,c)),(o=i[3])&&n.push(new vr(o,s,f,l,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},xr.x=function(t){return arguments.length?(this._x=t,this):this._x},xr.y=function(t){return arguments.length?(this._y=t,this):this._y};var Mr=Math.PI*(3-Math.sqrt(5));function Cr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var jr=Array.prototype.slice,zr={name:"implicit"};function Or(){var t=sr(),e=[],n=[],r=zr;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==zr)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=sr();for(var r,o,a=-1,u=n.length;++a<u;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=jr.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Or(e,n).unknown(r)},Cr.apply(i,arguments),i}var Tr=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"),Fr=c((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",i="image/jpeg",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r,i},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,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){var e=3e4;u.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,i=new XMLHttpRequest;if(i.onreadystatechange=a,i.ontimeout=l,i.responseType="blob",i.timeout=e,i.open("GET",t,!0),i.send(),u.impl.options.imagePlaceholder){var o=u.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(r=o[1])}function a(){if(4===i.readyState)if(200===i.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];n(t)},e.readAsDataURL(i.response)}else r?n(r):c("cannot fetch resource: "+t+", status: "+i.status)}function l(){r?n(r):c("timeout of "+e+"ms occured while fetching resource: "+t)}function c(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,o){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 i(e,t,n,o)}))})),r}));function a(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||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")}))}}(),i=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")}}}}}(),o=function(){return{inlineAll:function e(i){return i instanceof Element?o(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(n.asArray(i.childNodes).map((function(t){return e(t)})))})):Promise.resolve(i);function o(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},u={toSvg:l,toPng:function(t,e){return c(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return c(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return c(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return c(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:i,images:o,util:n,inliner:r,options:{}}};function l(t,e){return function(t){void 0===t.imagePlaceholder?u.impl.options.imagePlaceholder=a.imagePlaceholder:u.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?u.impl.options.cacheBust=a.cacheBust:u.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return s(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 c(t,e){return l(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var i=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 i=r.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function s(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 i=t.childNodes;return 0===i.length?Promise.resolve(e):o(e,n.asArray(i),r).then((function(){return e}));function o(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return s(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(i).then(o).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 i(){function r(r){var i=window.getComputedStyle(t,r),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=n.uid();e.className=e.className+" "+a;var u=document.createElement("style");u.appendChild(l(a,r,i)),e.appendChild(u)}function l(t,e,r){var i="."+t+":"+e,o=r.cssText?a(r):u(r);return document.createTextNode(i+"{"+o+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function u(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 o(){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 i.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function h(t){return o.inlineAll(t).then((function(){return t}))}t.exports=u}()}));const Rr=t=>{let e,{data:n,dataType:r,extType:i="xlsx"}=t;if("sna"===r)e=(t=>{const{links:e,nodes:n}=t||{};if(e&&e.length>0){const t=e.map((t=>({From:n[t.source].name,To:n[t.target].name})));return t}return[]})(n);else e=n;y(`\ufeff${m(e)}`,`output.${i}`)};w('.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 !important; }\n .SNA .person {\n fill: #867b3a !important; }\n .SNA .publication {\n fill: #825c0d !important; }\n .SNA .article {\n fill: #afafaf !important; }\n .SNA .keyword {\n fill: #fcfae8 !important; }\n .SNA .org {\n fill: #000000 !important; }\n .SNA__tool {\n display: flex;\n justify-content: flex-end;\n padding-right: 20px;\n padding-top: 12px; }\n .SNA__download {\n cursor: pointer;\n margin-right: 16px; }\n .SNA__fullscreenBtn {\n cursor: pointer;\n margin-right: 16px;\n padding-top: 0; }\n .SNA .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .SNA .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .SNA .fullscreenExit {\n background-color: #ece8c0;\n text-align: right;\n cursor: pointer;\n border: 0; }\n\n#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-family: "Roboto", "Helvetica", "Arial", sans-serif;\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\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 Lr=function(u){var l=u.className,c=u.intl,f=u.width,h=u.height,p=u.distance,y=u.SNAData,m=u.fontColor,w=u.backgroundColor,_=u.handleClickNodeGoto;if(!y||0===y.nodes.length)return e.createElement("div",{className:"noData"},c?c.formatMessage({id:"common.noData"}):"暫無資料");var b=function(){var t=r(!1),e=t[0],u=t[1],l=i(null);o((function(){var t=function(){u(E.fullscreenElement===l.current)};return E.addEventListener("fullscreenchange",t),function(){return E.removeEventListener("fullscreenchange",t)}}),[]);var c=a((function(){return E.fullscreenElement?E.exitFullscreen().then((function(){return E.requestFullscreen(l.current)})):l.current?E.requestFullscreen(l.current):void 0}),[]),s=a((function(){return E.fullscreenElement===l.current?E.exitFullscreen():Promise.resolve()}),[]);return n((function(){return{active:e,enter:c,exit:s,node:l}}),[e,c,s])}(),x=r(null),k=t(x,2),S=k[0],A=k[1],N=function(t){switch(t){case"img":(t=>{let{id:e,fileName:n="image",quality:r=.95}=t;const i=document.getElementById(e);Fr.toPng(i,{quality:r}).then((t=>{const e=document.createElement("a");e.download=`${n}.png`,e.href=t,e.click()})).catch((t=>{console.error("oops, something went wrong!",t)}))})({id:"network-graph"});break;case"xlsx":Rr({data:y,dataType:"sna"});break;case"tsv":Rr({data:y,dataType:"sna",extType:"tsv"})}},P=n((function(){return b.active?screen.width:screen.width>1050?f:screen.width-80}),[b.active,screen.width]),M=n((function(){return b.active?screen.height:screen.width>1050?h:screen.height-300}),[b.active,screen.width]),z=function(t,e,n){var r=function(t,e,n){var r=.5*(e.x+t.x),i=.5*(e.y+t.y),o=e.x-t.x,a=e.y-t.y,u=Math.pow(Math.pow(o,2)+Math.pow(a,2),.5);return{qx:r-a*n/u,qy:i+o*n/u}}(t,e,n),i=r.qx,o=r.qy;return isNaN(i)?"M".concat(t.x,", ").concat(t.y," Q0 0 ").concat(e.x," ").concat(e.y):"M".concat(t.x,", ").concat(t.y," Q").concat(i," ").concat(o," ").concat(e.x," ").concat(e.y)},T=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),i=Or(Tr),o=t.links.map((function(t){return Object.create(t)})),a=t.nodes.map((function(t){return Object.create(t)})),u=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,u=sr(),l=_n(s),c=R("tick","end");function s(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(r){var l,c,s=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(o-n)*i,u.each((function(t){t(n)})),l=0;l<s;++l)null==(c=t[l]).fx?c.x+=c.vx*=a:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=a:(c.y=c.fy,c.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 i=10*Math.sqrt(n),o=n*Mr;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(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 l.restart(s),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),u.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?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},force:function(t,n){return arguments.length>1?(null==n?u.remove(t):u.set(t,p(n)),e):u.get(t)},find:function(e,n,r){var i,o,a,u,l,c=0,s=t.length;for(null==r?r=1/0:r*=r,c=0;c<s;++c)(a=(i=e-(u=t[c]).x)*i+(o=n-u.y)*o)<r&&(l=u,r=a);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}(a).force("link",function(t){var e,n,r,i,o,a=Ar,u=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},l=pr(30),c=1;function s(r){for(var i=0,a=t.length;i<c;++i)for(var u,l,s,f,h,p,d,g=0;g<a;++g)l=(u=t[g]).source,f=(s=u.target).x+s.vx-l.x-l.vx||dr(),h=s.y+s.vy-l.y-l.vy||dr(),f*=p=((p=Math.sqrt(f*f+h*h))-n[g])/p*r*e[g],h*=p,s.vx-=f*(d=o[g]),s.vy-=h*d,l.vx+=f*(d=1-d),l.vy+=h*d}function f(){if(r){var u,l,c=r.length,s=t.length,f=sr(r,a);for(u=0,i=new Array(c);u<s;++u)(l=t[u]).index=u,"object"!=typeof l.source&&(l.source=Nr(f,l.source)),"object"!=typeof l.target&&(l.target=Nr(f,l.target)),i[l.source.index]=(i[l.source.index]||0)+1,i[l.target.index]=(i[l.target.index]||0)+1;for(u=0,o=new Array(s);u<s;++u)l=t[u],o[u]=i[l.source.index]/(i[l.source.index]+i[l.target.index]);e=new Array(s),h(),n=new Array(s),p()}}function h(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+u(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+l(t[e],e,t)}return null==t&&(t=[]),s.initialize=function(t){r=t,f()},s.links=function(e){return arguments.length?(t=e,f(),s):t},s.id=function(t){return arguments.length?(a=t,s):a},s.iterations=function(t){return arguments.length?(c=+t,s):c},s.strength=function(t){return arguments.length?(u="function"==typeof t?t:pr(+t),h(),s):u},s.distance=function(t){return arguments.length?(l="function"==typeof t?t:pr(+t),p(),s):l},s}(o).id((function(t){return t.index})).distance(50)).force("charge",function(){var t,e,n,r,i=pr(-30),o=1,a=1/0,u=.81;function l(r){var i,o=t.length,a=wr(t,Er,Pr).visitAfter(s);for(n=r,i=0;i<o;++i)e=t[i],a.visit(f)}function c(){if(t){var e,n,o=t.length;for(r=new Array(o),e=0;e<o;++e)n=t[e],r[n.index]=+i(n,e,t)}}function s(t){var e,n,i,o,a,u=0,l=0;if(t.length){for(i=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(u+=e.value,l+=n,i+=n*e.x,o+=n*e.y);t.x=i/l,t.y=o/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{u+=r[e.data.index]}while(e=e.next)}t.value=u}function f(t,i,l,c){if(!t.value)return!0;var s=t.x-e.x,f=t.y-e.y,h=c-i,p=s*s+f*f;if(h*h/u<p)return p<a&&(0===s&&(p+=(s=dr())*s),0===f&&(p+=(f=dr())*f),p<o&&(p=Math.sqrt(o*p)),e.vx+=s*t.value*n/p,e.vy+=f*t.value*n/p),!0;if(!(t.length||p>=a)){(t.data!==e||t.next)&&(0===s&&(p+=(s=dr())*s),0===f&&(p+=(f=dr())*f),p<o&&(p=Math.sqrt(o*p)));do{t.data!==e&&(h=r[t.data.index]*n/p,e.vx+=s*h,e.vy+=f*h)}while(t=t.next)}}return l.initialize=function(e){t=e,c()},l.strength=function(t){return arguments.length?(i="function"==typeof t?t:pr(+t),c(),l):i},l.distanceMin=function(t){return arguments.length?(o=t*t,l):Math.sqrt(o)},l.distanceMax=function(t){return arguments.length?(a=t*t,l):Math.sqrt(a)},l.theta=function(t){return arguments.length?(u=t*t,l):Math.sqrt(u)},l}().strength(-160)).force("center",function(t,e){var n;function r(){var r,i,o=n.length,a=0,u=0;for(r=0;r<o;++r)a+=(i=n[r]).x,u+=i.y;for(a=a/o-t,u=u/o-e,r=0;r<o;++r)(i=n[r]).x-=a,i.y-=u}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}(P/2,M/2)).force("collide",function(t){var e,n,r=1,i=1;function o(){for(var t,o,u,l,c,s,f,h=e.length,p=0;p<i;++p)for(o=wr(e,kr,Sr).visitAfter(a),t=0;t<h;++t)u=e[t],s=n[u.index],f=s*s,l=u.x+u.vx,c=u.y+u.vy,o.visit(d);function d(t,e,n,i,o){var a=t.data,h=t.r,p=s+h;if(!a)return e>l+p||i<l-p||n>c+p||o<c-p;if(a.index>u.index){var d=l-a.x-a.vx,g=c-a.y-a.vy,v=d*d+g*g;v<p*p&&(0===d&&(v+=(d=dr())*d),0===g&&(v+=(g=dr())*g),v=(p-(v=Math.sqrt(v)))/v*r,u.vx+=(d*=v)*(p=(h*=h)/(f+h)),u.vy+=(g*=v)*p,a.vx-=d*(p=1-p),a.vy-=g*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 u(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=pr(null==t?1:+t)),o.initialize=function(t){e=t,u()},o.iterations=function(t){return arguments.length?(i=+t,o):i},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),u(),o):t},o}().radius((function(){return 13.5})).iterations(5)).force("x",function(t){var e,n,r,i=pr(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=pr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:pr(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),a(),o):t},o}(P/2)).force("y",function(t){var e,n,r,i=pr(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=pr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:pr(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),a(),o):t},o}(M/2)).force("radial",function(t,e,n){var r,i,o,a=pr(.1);function u(t){for(var a=0,u=r.length;a<u;++a){var l=r[a],c=l.x-e||1e-6,s=l.y-n||1e-6,f=Math.sqrt(c*c+s*s),h=(o[a]-f)*i[a]*t/f;l.vx+=c*h,l.vy+=s*h}}function l(){if(r){var e,n=r.length;for(i=new Array(n),o=new Array(n),e=0;e<n;++e)o[e]=+t(r[e],e,r),i[e]=isNaN(o[e])?0:+a(r[e],e,r)}}return"function"!=typeof t&&(t=pr(+t)),null==e&&(e=0),null==n&&(n=0),u.initialize=function(t){r=t,l()},u.strength=function(t){return arguments.length?(a="function"==typeof t?t:pr(+t),l(),u):a},u.radius=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),l(),u):t},u.x=function(t){return arguments.length?(e=+t,u):e},u.y=function(t){return arguments.length?(n=+t,u):n},u}(100,P/2,M/2)),l=Kt(".chart").append("svg").attr("viewBox",[0,0,P,M]).style("background-color","#ece8c0");l.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=l.append("g").attr("stroke","#999").attr("stroke-opacity",.6).selectAll("line").data(o).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=l.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 i(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":"")})).on("click",(function(t){return t.hasClick?_({name:t.name,id:t.id,type:t.type}):null})).call(function(t){return fe().on("start",(function(e){qt.active||t.alphaTarget(.3).restart(),e.fx=e.x,e.fy=e.y})).on("drag",(function(t){t.fx=qt.x>P||qt.x<0?t.x:qt.x,t.fy=qt.y>M||qt.y<0?t.y:qt.y}))}(u));f.append("title").text((function(t){return"".concat(t.name,"-").concat(function(t){switch(t){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"}):"關鍵字";default:return""}}(t.type))}));var h=l.append("g").selectAll("text").data(a).join("text").attr("fill",m).attr("text-anchor","middle").attr("key",(function(t){return t.type})).style("color","#fff").style("font-size","14px").text((function(t){return t.name})),p=l.selectAll(".edgepath").data(o).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");l.selectAll(".edgelabel").data(o).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})),u.on("tick",(function(){s.attr("d",(function(t){return z(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})),p.attr("d",(function(t){return z(t.source,t.target,30)}))}))};return o((function(){if(y&&y.nodes&&y.nodes.length>0){var t=document.getElementById("network-graph");t&&t.childNodes[0]&&t.removeChild(t.childNodes[0]),T(y)}}),[y,b.active]),e.createElement("div",{className:s("SNA",{"SNA--smallSize":p<200},l),style:{contentWidth:P,contentHeight:M,backgroundColor:w}},e.createElement("div",{className:"SNA__tool"},e.createElement("div",{className:"SNA__download"},e.createElement(v,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},e.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3e %3cdefs%3e %3cclipPath id='a'%3e %3cpath data-name='Rectangle 125' style='fill:white' d='M0 0h32v32H0z'/%3e %3c/clipPath%3e %3c/defs%3e %3cg style='clip-path:url(%23a)'%3e %3cpath 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:%23825c0d' data-name='Mask Group 42'/%3e %3c/g%3e%3c/svg%3e",alt:"DownloadImg",onClick:function(t){A(t.currentTarget)}})),e.createElement(d,{id:"download-menu",anchorEl:S,keepMounted:!0,open:Boolean(S),onClose:function(){A(null)}},e.createElement(g,{onClick:function(){return N("img")}},c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download.img"}):"下載圖片"),e.createElement(g,{onClick:function(){return N("xlsx")}},c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download.xlsx"}):"下載XLSX"),e.createElement(g,{onClick:function(){return N("tsv")}},c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download.tsv"}):"下載TSV"))),e.createElement("div",{className:"SNA__fullscreenBtn"},e.createElement(v,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},e.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3e %3cdefs%3e %3cclipPath id='clip-path'%3e %3cpath id='Rectangle_124' data-name='Rectangle 124' style='fill:white' d='M0 0h32v32H0z'/%3e %3c/clipPath%3e %3cstyle%3e .cls-3%7bfill:%23825c0d%7d %3c/style%3e %3c/defs%3e %3cg id='Mask_Group_46' data-name='Mask Group 46' style='clip-path:url(%23clip-path)'%3e %3cg id='Group_3629' data-name='Group 3629' transform='translate(6 6.001)'%3e %3cpath id='Path_176' data-name='Path 176' class='cls-3' d='M-721 1949.376h2.5v-3.755h3.755v-2.5H-721z' transform='translate(721.003 -1943.118)'/%3e %3cpath id='Path_177' data-name='Path 177' class='cls-3' d='M-721 1960.376h6.258v-2.5h-3.758v-3.755h-2.5z' transform='translate(721.003 -1940.376)'/%3e %3cpath id='Path_178' data-name='Path 178' class='cls-3' d='M-703.744 1943.118H-710v2.5h3.755v3.755h2.5z' transform='translate(723.744 -1943.118)'/%3e %3cpath id='Path_179' data-name='Path 179' class='cls-3' d='M-703.744 1960.376v-6.259h-2.5v3.755H-710v2.5z' transform='translate(723.744 -1940.376)'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e",alt:"Fullscreen",onClick:b.enter}))),e.createElement(O,{targets:["#network-graph svg g text"],options:{stepSize:2,range:1},customButtons:{up:e.createElement(v,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},e.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3e %3cdefs%3e %3cclipPath id='clip-path'%3e %3cpath id='Rectangle_128' data-name='Rectangle 128' style='fill:white' d='M0 0h32v32H0z'/%3e %3c/clipPath%3e %3cstyle%3e .cls-3%7bfill:%23825c0d%7d %3c/style%3e %3c/defs%3e %3cg id='Mask_Group_47' data-name='Mask Group 47' style='clip-path:url(%23clip-path)'%3e %3cg id='Group_3633' data-name='Group 3633' transform='translate(6 6)'%3e %3cpath id='Path_181' data-name='Path 181' class='cls-3' d='M514 371v-2h-2v2h-2v2h2v2h2v-2h2v-2z' transform='translate(-495 -369)'/%3e %3cg id='Group_3632' data-name='Group 3632' transform='translate(0 2)'%3e %3cpath id='Path_182' data-name='Path 182' class='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)'/%3e %3c/g%3e %3c/g%3e %3c/g%3e%3c/svg%3e",alt:"FontSizeUP"})),down:e.createElement(v,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},e.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3e %3cdefs%3e %3cclipPath id='clip-path'%3e %3cpath id='Rectangle_129' data-name='Rectangle 129' style='fill:white' d='M0 0h32v32H0z'/%3e %3c/clipPath%3e %3cstyle%3e .cls-3%7bfill:%23825c0d%7d %3c/style%3e %3c/defs%3e %3cg id='Mask_Group_48' data-name='Mask Group 48' style='clip-path:url(%23clip-path)'%3e %3cg id='Group_3635' data-name='Group 3635' transform='translate(6 8)'%3e %3cpath id='Path_181' data-name='Path 181' class='cls-3' d='M510 371v2h6v-2z' transform='translate(-495 -371)'/%3e %3cg id='Group_3632' data-name='Group 3632'%3e %3cpath id='Path_182' data-name='Path 182' class='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)'/%3e %3c/g%3e %3c/g%3e %3c/g%3e%3c/svg%3e",alt:"FontSizeDown"})),style:{border:"none"},buttonsMargin:10}})),e.createElement(C,{handle:b},e.createElement("div",{className:"chart",id:"network-graph"},b.active&&e.createElement("div",{className:"fullscreenExit"},e.createElement(j,{fontSize:"large",onClick:b.exit,title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreenExit"}):"離開全螢幕"})))))};Lr.defaultProps={className:void 0,intl:void 0,width:1050,height:600,distance:400,SNAData:null,fontColor:"#000000",backgroundColor:"#FFFFFF",handleClickNodeGoto:null},Lr.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,handleClickNodeGoto:u.func};export{Lr as default};
|
|
16
|
+
var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=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,u=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){a=r(n);for(var s=0;s<a.length;s++)o.call(n,a[s])&&(u[a[s]]=n[a[s]])}}return u}},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 i=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),o=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(o).concat([i]).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={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"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={},i=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}((function(){return window&&document&&document.all&&!window.atob})),o=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,u=0,l=[],c=n(7);function s(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=r[i.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](i.parts[a]);for(;a<i.parts.length;a++)o.parts.push(g(i.parts[a],e))}else{var u=[];for(a=0;a<i.parts.length;a++)u.push(g(i.parts[a],e));r[i.id]={id:i.id,refs:1,parts:u}}}}function f(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],u={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(u):n.push(r[a]={id:a,parts:[u]})}return n}function h(t,e){var n=o(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=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.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 i=o(t.insertAt.before,n);n.insertBefore(e,i)}}function p(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.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 v(e,t.attrs),h(t,e),e}function v(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var l=u++;n=a||(a=d(e)),r=m.bind(null,n,l,!1),i=m.bind(null,n,l,!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",v(e,t.attrs),h(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=c(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(a),u&&URL.revokeObjectURL(u)}.bind(null,n,e),i=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),i=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 i()}}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=i()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return s(n,e),function(t){for(var i=[],o=0;o<n.length;o++){var a=n[o];(u=r[a.id]).refs--,i.push(u)}for(t&&s(f(t,e),e),o=0;o<i.length;o++){var u;if(0===(u=i[o]).refs){for(var l=0;l<u.parts.length;l++)u.parts[l]();delete r[u.id]}}}};var y=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},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 i,o=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(t,e,n){n.r(e);var r=n(0),i=n.n(r),o="up",a="down";function u(t){return(u="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 l(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 c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=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"!==u(e)&&"function"!=typeof e?f(t):e}(this,c(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&&s(t,e)}(e,r.Component),function(t,e,n){e&&l(t.prototype,e),n&&l(t,n)}(e,[{key:"onClick",value:function(){(0,this.props.onClick)()}},{key:"getDefaultButtonContent",value:function(){var t=this.props.direction===o?"36px":"20px";return i.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,o=e.customButton,a=void 0===o?this.getDefaultButtonContent():o;return i.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 v(t){return(v=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 y(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?y(t):e}(this,v(e).call(this))).handleChange.bind(y(y(t))),t.setChangeDirection.bind(y(y(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===o?e:-1*e,r=window.getComputedStyle(t,null).getPropertyValue("font-size"),i=this.getFontSizeDetails(r).value,a=i+n;t.style.fontSize=a+"px",a!==i&&this.handleChange(t,a,i)}},{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 i,o=t.children[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;this.iterateChildren(a)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}}},{key:"updateChangeCount",value:function(){var t=this.state,e=t.changeCount,n=t.changeDirection===o?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 i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,u=document.querySelectorAll(a),l=!0,c=!1,s=void 0;try{for(var f,h=u[Symbol.iterator]();!(l=(f=h.next()).done);l=!0){var p=f.value;this.iterateChildren(p)}}catch(t){c=!0,s=t}finally{try{l||null==h.return||h.return()}finally{if(c)throw s}}}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.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,i=!0;return n===o&&e>=r&&(i=!1),n===a&&e<=-1*r&&(i=!1),i}},{key:"initFontSizeChange",value:function(){this.validateChangePerRange()&&this.iterateElementsAndApplyFontSizeChange()}},{key:"setChangeDirection",value:function(t,e){var n=t?o: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,i=void 0!==r&&r,o=t.buttonsMargin,a=void 0===o?4:o,u=this.getFontSizeDetails(n.width||"40px"),l=this.getFontSizeDetails(n.height||"40px");return{width:(!1===i?2*u.value+a:u.value)+u.unit,height:(!1===i?l.value:2*l.value+a)+l.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(t,e){var n=e.style,r=void 0===n?{}:n,i=e.verticalAlignment,u=void 0!==i&&i,l=e.reverseOrder,c=void 0!==l&&l,s=e.buttonsMargin,f=void 0===s?4:s,h=this.getFontSizeDetails(r.width||"40px"),p=this.getFontSizeDetails(r.height||"40px"),d={width:h.value+h.unit,height:p.value+p.unit},v=f+(!1===u?h.unit:p.unit);return(t===o&&!1===c||t===a&&!0===c)&&(!1===u?d.marginRight=v:d.marginBottom=v),Object.assign({},r,d)}},{key:"render",value:function(){var t=this.props.customButtons,e=void 0===t?{}:t,n=e.up,r=e.down,u=this.getFontSizeChangerStyle(e),l=this.getFontSizeChangerButtonStyle(o,e),c=this.getFontSizeChangerButtonStyle(a,e);return i.a.createElement("div",{className:"font-size-changer",style:u},i.a.createElement("div",{className:"font-size-changer-buttons",style:u},i.a.createElement(h,{direction:o,customButton:n,onClick:this.onFontSizeUp.bind(this),style:l}),i.a.createElement(h,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:c})))}}]),e}();e.default=m}])})),O=c(z);function T(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}1===(A=T).length&&(P=A,A=function(t,e){return T(P(t),e)});var R={value:function(){}};function F(){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 D(r)}function D(t){this._=t}function L(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 q(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function I(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=R,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}D.prototype=F.prototype={constructor:D,on:function(t,e){var n,r=this._,i=L(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=I(r[n],t.name,e);else if(null==e)for(n in r)r[n]=I(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=q(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new D(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){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(e,n)}};var $="http://www.w3.org/1999/xhtml",B={svg:"http://www.w3.org/2000/svg",xhtml:$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function U(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),B.hasOwnProperty(e)?{space:B[e],local:t}:t}function H(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===$&&e.documentElement.namespaceURI===$?e.createElement(t):e.createElementNS(n,t)}}function G(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function V(t){var e=U(t);return(e.local?G:H)(e)}function X(){}function W(t){return null==t?X:function(){return this.querySelector(t)}}function Y(){return[]}function J(t){return null==t?Y:function(){return this.querySelectorAll(t)}}function K(t){return function(){return this.matches(t)}}function Q(t){return new Array(t.length)}function Z(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Z.prototype={constructor:Z,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 tt(t,e,n,r,i,o){for(var a,u=0,l=e.length,c=o.length;u<c;++u)(a=e[u])?(a.__data__=o[u],r[u]=a):n[u]=new Z(t,o[u]);for(;u<l;++u)(a=e[u])&&(i[u]=a)}function et(t,e,n,r,i,o,a){var u,l,c,s={},f=e.length,h=o.length,p=new Array(f);for(u=0;u<f;++u)(l=e[u])&&(p[u]=c="$"+a.call(l,l.__data__,u,e),c in s?i[u]=l:s[c]=l);for(u=0;u<h;++u)(l=s[c="$"+a.call(t,o[u],u,o)])?(r[u]=l,l.__data__=o[u],s[c]=null):n[u]=new Z(t,o[u]);for(u=0;u<f;++u)(l=e[u])&&s[p[u]]===l&&(i[u]=l)}function nt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function rt(t){return function(){this.removeAttribute(t)}}function it(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ot(t,e){return function(){this.setAttribute(t,e)}}function at(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ut(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function lt(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 ct(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function st(t){return function(){this.style.removeProperty(t)}}function ft(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ht(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function pt(t,e){return t.style.getPropertyValue(e)||ct(t).getComputedStyle(t,null).getPropertyValue(e)}function dt(t){return function(){delete this[t]}}function vt(t,e){return function(){this[t]=e}}function gt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function yt(t){return t.trim().split(/^|\s+/)}function mt(t){return t.classList||new wt(t)}function wt(t){this._node=t,this._names=yt(t.getAttribute("class")||"")}function _t(t,e){for(var n=mt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function bt(t,e){for(var n=mt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function xt(t){return function(){_t(this,t)}}function Et(t){return function(){bt(this,t)}}function kt(t,e){return function(){(e.apply(this,arguments)?_t:bt)(this,t)}}function St(){this.textContent=""}function Nt(t){return function(){this.textContent=t}}function At(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Pt(){this.innerHTML=""}function Ct(t){return function(){this.innerHTML=t}}function Mt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function jt(){this.nextSibling&&this.parentNode.appendChild(this)}function zt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ot(){return null}function Tt(){var t=this.parentNode;t&&t.removeChild(this)}function Rt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ft(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}wt.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 Dt={},Lt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Dt={mouseenter:"mouseover",mouseleave:"mouseout"}));function qt(t,e,n){return t=It(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function It(t,e,n){return function(r){var i=Lt;Lt=r;try{t.call(this,this.__data__,e,n)}finally{Lt=i}}}function $t(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 Bt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function Ut(t,e,n){var r=Dt.hasOwnProperty(t.type)?qt:It;return function(i,o,a){var u,l=this.__on,c=r(e,o,a);if(l)for(var s=0,f=l.length;s<f;++s)if((u=l[s]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=n),void(u.value=e);this.addEventListener(t.type,c,n),u={type:t.type,name:t.name,value:e,listener:c,capture:n},l?l.push(u):this.__on=[u]}}function Ht(t,e,n,r){var i=Lt;t.sourceEvent=Lt,Lt=t;try{return e.apply(n,r)}finally{Lt=i}}function Gt(t,e,n){var r=ct(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Vt(t,e){return function(){return Gt(this,t,e)}}function Xt(t,e){return function(){return Gt(this,t,e.apply(this,arguments))}}var Wt=[null];function Yt(t,e){this._groups=t,this._parents=e}function Jt(){return new Yt([[document.documentElement]],Wt)}function Kt(t){return"string"==typeof t?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Wt)}function Qt(){for(var t,e=Lt;t=e.sourceEvent;)e=t;return e}function Zt(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 i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function te(t){var e=Qt();return e.changedTouches&&(e=e.changedTouches[0]),Zt(t,e)}function ee(t,e,n){arguments.length<3&&(n=e,e=Qt().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return Zt(t,r);return null}function ne(){Lt.stopImmediatePropagation()}function re(){Lt.preventDefault(),Lt.stopImmediatePropagation()}function ie(t){var e=t.document.documentElement,n=Kt(t).on("dragstart.drag",re,!0);"onselectstart"in e?n.on("selectstart.drag",re,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function oe(t){return function(){return t}}function ae(t,e,n,r,i,o,a,u,l,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=u,this.dy=l,this._=c}function ue(){return!Lt.ctrlKey&&!Lt.button}function le(){return this.parentNode}function ce(t){return null==t?{x:Lt.x,y:Lt.y}:t}function se(){return navigator.maxTouchPoints||"ontouchstart"in this}function fe(){var t,e,n,r,i=ue,o=le,a=ce,u=se,l={},c=F("start","drag","end"),s=0,f=0;function h(t){t.on("mousedown.drag",p).filter(u).on("touchstart.drag",g).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&i.apply(this,arguments)){var a=w("mouse",o.apply(this,arguments),te,this,arguments);a&&(Kt(Lt.view).on("mousemove.drag",d,!0).on("mouseup.drag",v,!0),ie(Lt.view),ne(),n=!1,t=Lt.clientX,e=Lt.clientY,a("start"))}}function d(){if(re(),!n){var r=Lt.clientX-t,i=Lt.clientY-e;n=r*r+i*i>f}l.mouse("drag")}function v(){Kt(Lt.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=Kt(t).on("dragstart.drag",null);e&&(r.on("click.drag",re,!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)}(Lt.view,n),re(),l.mouse("end")}function g(){if(i.apply(this,arguments)){var t,e,n=Lt.changedTouches,r=o.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=w(n[t].identifier,r,ee,this,arguments))&&(ne(),e("start"))}}function y(){var t,e,n=Lt.changedTouches,r=n.length;for(t=0;t<r;++t)(e=l[n[t].identifier])&&(re(),e("drag"))}function m(){var t,e,n=Lt.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=l[n[t].identifier])&&(ne(),e("end"))}function w(t,e,n,r,i){var o,u,f,p=n(e,t),d=c.copy();if(Ht(new ae(h,"beforestart",o,t,s,p[0],p[1],0,0,d),(function(){return null!=(Lt.subject=o=a.apply(r,i))&&(u=o.x-p[0]||0,f=o.y-p[1]||0,!0)})))return function a(c){var v,g=p;switch(c){case"start":l[t]=a,v=s++;break;case"end":delete l[t],--s;case"drag":p=n(e,t),v=s}Ht(new ae(h,c,o,t,v,p[0]+u,p[1]+f,p[0]-g[0],p[1]-g[1],d),d.apply,d,[c,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:oe(!!t),h):i},h.container=function(t){return arguments.length?(o="function"==typeof t?t:oe(t),h):o},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:oe(t),h):a},h.touchable=function(t){return arguments.length?(u="function"==typeof t?t:oe(!!t),h):u},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h}function he(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function pe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function de(){}Yt.prototype=Jt.prototype={constructor:Yt,select:function(t){"function"!=typeof t&&(t=W(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,u=e[i],l=u.length,c=r[i]=new Array(l),s=0;s<l;++s)(o=u[s])&&(a=t.call(o,o.__data__,s,u))&&("__data__"in o&&(a.__data__=o.__data__),c[s]=a);return new Yt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=J(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,u=e[o],l=u.length,c=0;c<l;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),i.push(a));return new Yt(r,i)},filter:function(t){"function"!=typeof t&&(t=K(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,l=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new Yt(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),c=-1,this.each((function(t){p[++c]=t})),p;var n=e?et:tt,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),u=new Array(o),l=new Array(o),c=0;c<o;++c){var s=r[c],f=i[c],h=f.length,p=t.call(s,s&&s.__data__,c,r),d=p.length,v=u[c]=new Array(d),g=a[c]=new Array(d);n(s,f,v,g,l[c]=new Array(h),p,e);for(var y,m,w=0,_=0;w<d;++w)if(y=v[w]){for(w>=_&&(_=w+1);!(m=g[_])&&++_<d;);y._next=m||null}}return(a=new Yt(a,r))._enter=u,a._exit=l,a},enter:function(){return new Yt(this._enter||this._groups.map(Q),this._parents)},exit:function(){return new Yt(this._exit||this._groups.map(Q),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var l,c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new Yt(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(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=nt);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,u=n[o],l=u.length,c=i[o]=new Array(l),s=0;s<l;++s)(a=u[s])&&(c[s]=a);c.sort(e)}return new Yt(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()),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],i=0,o=r.length;i<o;++i){var a=r[i];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 i,o=e[n],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=U(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?it:rt:"function"==typeof e?n.local?lt:ut:n.local?at:ot)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?st:"function"==typeof e?ht:ft)(t,e,null==n?"":n)):pt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?dt:"function"==typeof e?gt:vt)(t,e)):this.node()[t]},classed:function(t,e){var n=yt(t+"");if(arguments.length<2){for(var r=mt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?kt:e?xt:Et)(n,e))},text:function(t){return arguments.length?this.each(null==t?St:("function"==typeof t?At:Nt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Pt:("function"==typeof t?Mt:Ct)(t)):this.node().innerHTML},raise:function(){return this.each(jt)},lower:function(){return this.each(zt)},append:function(t){var e="function"==typeof t?t:V(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:V(t),r=null==e?Ot:"function"==typeof e?e:W(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Tt)},clone:function(t){return this.select(t?Ft:Rt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=$t(t+""),a=o.length;if(!(arguments.length<2)){for(u=e?Ut:Bt,null==n&&(n=!1),r=0;r<a;++r)this.each(u(o[r],e,n));return this}var u=this.node().__on;if(u)for(var l,c=0,s=u.length;c<s;++c)for(r=0,l=u[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Xt:Vt)(t,e))}},ae.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ve=1/.7,ge="\\s*([+-]?\\d+)\\s*",ye="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",me="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",we=/^#([0-9a-f]{3,8})$/,_e=new RegExp("^rgb\\("+[ge,ge,ge]+"\\)$"),be=new RegExp("^rgb\\("+[me,me,me]+"\\)$"),xe=new RegExp("^rgba\\("+[ge,ge,ge,ye]+"\\)$"),Ee=new RegExp("^rgba\\("+[me,me,me,ye]+"\\)$"),ke=new RegExp("^hsl\\("+[ye,me,me]+"\\)$"),Se=new RegExp("^hsla\\("+[ye,me,me,ye]+"\\)$"),Ne={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 Ae(){return this.rgb().formatHex()}function Pe(){return this.rgb().formatRgb()}function Ce(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=we.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Me(e):3===n?new Te(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?je(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?je(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=_e.exec(t))?new Te(e[1],e[2],e[3],1):(e=be.exec(t))?new Te(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=xe.exec(t))?je(e[1],e[2],e[3],e[4]):(e=Ee.exec(t))?je(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ke.exec(t))?Le(e[1],e[2]/100,e[3]/100,1):(e=Se.exec(t))?Le(e[1],e[2]/100,e[3]/100,e[4]):Ne.hasOwnProperty(t)?Me(Ne[t]):"transparent"===t?new Te(NaN,NaN,NaN,0):null}function Me(t){return new Te(t>>16&255,t>>8&255,255&t,1)}function je(t,e,n,r){return r<=0&&(t=e=n=NaN),new Te(t,e,n,r)}function ze(t){return t instanceof de||(t=Ce(t)),t?new Te((t=t.rgb()).r,t.g,t.b,t.opacity):new Te}function Oe(t,e,n,r){return 1===arguments.length?ze(t):new Te(t,e,n,null==r?1:r)}function Te(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Re(){return"#"+De(this.r)+De(this.g)+De(this.b)}function Fe(){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 De(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Le(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ie(t,e,n,r)}function qe(t){if(t instanceof Ie)return new Ie(t.h,t.s,t.l,t.opacity);if(t instanceof de||(t=Ce(t)),!t)return new Ie;if(t instanceof Ie)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new Ie(a,u,l,t.opacity)}function Ie(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $e(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 Be(t){return function(){return t}}function Ue(t){return 1==(t=+t)?He: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):Be(isNaN(e)?n:e)}}function He(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Be(isNaN(t)?e:t)}he(de,Ce,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ae,formatHex:Ae,formatHsl:function(){return qe(this).formatHsl()},formatRgb:Pe,toString:Pe}),he(Te,Oe,pe(de,{brighter:function(t){return t=null==t?ve:Math.pow(ve,t),new Te(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Te(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:Re,formatHex:Re,formatRgb:Fe,toString:Fe})),he(Ie,(function(t,e,n,r){return 1===arguments.length?qe(t):new Ie(t,e,n,null==r?1:r)}),pe(de,{brighter:function(t){return t=null==t?ve:Math.pow(ve,t),new Ie(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ie(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,i=2*n-r;return new Te($e(t>=240?t-240:t+120,i,r),$e(t,i,r),$e(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 Ge=function t(e){var n=Ue(e);function r(t,e){var r=n((t=Oe(t)).r,(e=Oe(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=He(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Ve(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Xe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,We=new RegExp(Xe.source,"g");function Ye(t,e){var n,r,i,o=Xe.lastIndex=We.lastIndex=0,a=-1,u=[],l=[];for(t+="",e+="";(n=Xe.exec(t))&&(r=We.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:Ve(n,r)})),o=We.lastIndex;return o<e.length&&(i=e.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)u[(n=l[r]).i]=n.x(t);return u.join("")})}var Je,Ke,Qe,Ze,tn=180/Math.PI,en={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function nn(t,e,n,r,i,o){var a,u,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,l/=u),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*tn,skewX:Math.atan(l)*tn,scaleX:a,scaleY:u}}function rn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],l=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var l=a.push("translate(",null,e,null,n);u.push({i:l-4,x:Ve(t,i)},{i:l-2,x:Ve(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,u,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ve(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,u,l),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Ve(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,u,l),function(t,e,n,r,o,a){if(t!==n||e!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Ve(t,n)},{i:u-2,x:Ve(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,l),o=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)u[(e=l[n]).i]=e.x(t);return u.join("")}}}var on,an,un=rn((function(t){return"none"===t?en:(Je||(Je=document.createElement("DIV"),Ke=document.documentElement,Qe=document.defaultView),Je.style.transform=t,t=Qe.getComputedStyle(Ke.appendChild(Je),null).getPropertyValue("transform"),Ke.removeChild(Je),nn(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),ln=rn((function(t){return null==t?en:(Ze||(Ze=document.createElementNS("http://www.w3.org/2000/svg","g")),Ze.setAttribute("transform",t),(t=Ze.transform.baseVal.consolidate())?nn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):en)}),", ",")",")"),cn=0,sn=0,fn=0,hn=0,pn=0,dn=0,vn="object"==typeof performance&&performance.now?performance:Date,gn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function yn(){return pn||(gn(mn),pn=vn.now()+dn)}function mn(){pn=0}function wn(){this._call=this._time=this._next=null}function _n(t,e,n){var r=new wn;return r.restart(t,e,n),r}function bn(){pn=(hn=vn.now())+dn,cn=sn=0;try{!function(){yn(),++cn;for(var t,e=on;e;)(t=pn-e._time)>=0&&e._call.call(null,t),e=e._next;--cn}()}finally{cn=0,function(){var t,e,n=on,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:on=e);an=t,En(r)}(),pn=0}}function xn(){var t=vn.now(),e=t-hn;e>1e3&&(dn-=e,hn=t)}function En(t){cn||(sn&&(sn=clearTimeout(sn)),t-pn>24?(t<1/0&&(sn=setTimeout(bn,t-vn.now()-dn)),fn&&(fn=clearInterval(fn))):(fn||(hn=vn.now(),fn=setInterval(xn,1e3)),cn=1,gn(bn)))}function kn(t,e,n){var r=new wn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}wn.prototype=_n.prototype={constructor:wn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?yn():+n)+(null==e?0:+e),this._next||an===this||(an?an._next=this:on=this,an=this),this._call=t,this._time=n,En()},stop:function(){this._call&&(this._call=null,this._time=1/0,En())}};var Sn=F("start","end","cancel","interrupt"),Nn=[];function An(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var c,s,f,h;if(1!==n.state)return l();for(c in i)if((h=i[c]).name===n.name){if(3===h.state)return kn(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(kn((function(){3===n.state&&(n.state=4,n.timer.restart(u,n.delay,n.time),u(o))})),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),c=0,s=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++s]=h);r.length=s+1}}function u(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=_n(o,0,n.time)}(t,n,{name:e,index:r,group:i,on:Sn,tween:Nn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Pn(t,e){var n=Mn(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Cn(t,e){var n=Mn(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Mn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function jn(t,e){var n,r;return function(){var i=Cn(this,t),o=i.tween;if(o!==n)for(var a=0,u=(r=n=o).length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function zn(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Cn(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=u;break}l===c&&i.push(u)}o.tween=i}}function On(t,e,n){var r=t._id;return t.each((function(){var t=Cn(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Mn(t,r).value[e]}}function Tn(t,e){var n;return("number"==typeof e?Ve:e instanceof Ce?Ge:(n=Ce(e))?(e=n,Ge):Ye)(t,e)}function Rn(t){return function(){this.removeAttribute(t)}}function Fn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Dn(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function Ln(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function qn(t,e,n){var r,i,o;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,l));this.removeAttribute(t)}}function In(t,e,n){var r,i,o;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function $n(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Bn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Un(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Bn(t,i)),n}return i._value=e,i}function Hn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&$n(t,i)),n}return i._value=e,i}function Gn(t,e){return function(){Pn(this,t).delay=+e.apply(this,arguments)}}function Vn(t,e){return e=+e,function(){Pn(this,t).delay=e}}function Xn(t,e){return function(){Cn(this,t).duration=+e.apply(this,arguments)}}function Wn(t,e){return e=+e,function(){Cn(this,t).duration=e}}function Yn(t,e){if("function"!=typeof e)throw new Error;return function(){Cn(this,t).ease=e}}function Jn(t,e,n){var r,i,o=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)?Pn:Cn;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}var Kn=Jt.prototype.constructor;function Qn(t){return function(){this.style.removeProperty(t)}}function Zn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function tr(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Zn(t,o,n)),r}return o._value=e,o}function er(t){return function(e){this.textContent=t.call(this,e)}}function nr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&er(r)),e}return r._value=t,r}var rr=0;function ir(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function or(){return++rr}var ar=Jt.prototype;ir.prototype={constructor:ir,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=W(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,l,c=r[a],s=c.length,f=o[a]=new Array(s),h=0;h<s;++h)(u=c[h])&&(l=t.call(u,u.__data__,h,c))&&("__data__"in u&&(l.__data__=u.__data__),f[h]=l,An(f[h],e,n,h,f,Mn(u,n)));return new ir(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=J(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var l,c=r[u],s=c.length,f=0;f<s;++f)if(l=c[f]){for(var h,p=t.call(l,l.__data__,f,c),d=Mn(l,n),v=0,g=p.length;v<g;++v)(h=p[v])&&An(h,e,n,v,p,d);o.push(p),a.push(l)}return new ir(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=K(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,l=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new ir(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,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var l,c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new ir(a,this._parents,this._name,this._id)},selection:function(){return new Kn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=or(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],l=u.length,c=0;c<l;++c)if(a=u[c]){var s=Mn(a,e);An(a,t,n,c,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new ir(r,this._parents,t,n)},call:ar.call,nodes:ar.nodes,node:ar.node,size:ar.size,empty:ar.empty,each:ar.each,on:function(t,e){var n=this._id;return arguments.length<2?Mn(this.node(),n).on.on(t):this.each(Jn(n,t,e))},attr:function(t,e){var n=U(t),r="transform"===n?ln:Tn;return this.attrTween(t,"function"==typeof e?(n.local?In:qn)(n,r,On(this,"attr."+t,e)):null==e?(n.local?Fn:Rn)(n):(n.local?Ln:Dn)(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=U(t);return this.tween(n,(r.local?Un:Hn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?un:Tn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=pt(this,t),a=(this.style.removeProperty(t),pt(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Qn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=pt(this,t),u=n(this),l=u+"";return null==u&&(this.style.removeProperty(t),l=u=pt(this,t)),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,u))}}(t,r,On(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,u="end."+a;return function(){var l=Cn(this,t),c=l.on,s=null==l.value[a]?o||(o=Qn(e)):void 0;c===n&&i===s||(r=(n=c).copy()).on(u,i=s),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=pt(this,t);return a===o?null:a===r?i:i=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,tr(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}}(On(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,nr(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,i=Mn(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?jn:zn)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Gn:Vn)(e,t)):Mn(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Xn:Wn)(e,t)):Mn(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Yn(e,t)):Mn(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var u={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=Cn(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(l)),n.on=e}))}))}};var ur={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function lr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return ur.time=yn(),ur;return n}Jt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).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 o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},Jt.prototype.transition=function(t){var e,n;t instanceof ir?(e=t._id,t=t._name):(e=or(),(n=ur).time=yn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],l=u.length,c=0;c<l;++c)(a=u[c])&&An(a,t,e,c,u,n||lr(a,e));return new ir(r,this._parents,t,e)};function cr(){}function sr(t,e){var n=new cr;if(t instanceof cr)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function fr(){}cr.prototype=sr.prototype={constructor:cr,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 hr=sr.prototype;function pr(t){return function(){return t}}function dr(){return 1e-6*(Math.random()-.5)}function vr(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,u,l,c,s,f,h,p=t._root,d={data:r},v=t._x0,g=t._y0,y=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(o=(v+y)/2))?v=o:y=o,(s=n>=(a=(g+m)/2))?g=a:m=a,i=p,!(p=p[f=s<<1|c]))return i[f]=d,t;if(u=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===u&&n===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(o=(v+y)/2))?v=o:y=o,(s=n>=(a=(g+m)/2))?g=a:m=a}while((f=s<<1|c)==(h=(l>=a)<<1|u>=o));return i[h]=p,i[f]=d,t}function gr(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function yr(t){return t[0]}function mr(t){return t[1]}function wr(t,e,n){var r=new _r(null==e?yr:e,null==n?mr:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function _r(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function br(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}fr.prototype={constructor:fr,has:hr.has,add:function(t){return this["$"+(t+="")]=t,this},remove:hr.remove,clear:hr.clear,values:hr.keys,size:hr.size,empty:hr.empty,each:hr.each};var xr=wr.prototype=_r.prototype;function Er(t){return t.x+t.vx}function kr(t){return t.y+t.vy}function Sr(t){return t.index}function Nr(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Ar(t){return t.x}function Pr(t){return t.y}xr.copy=function(){var t,e,n=new _r(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=br(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=br(e));return n},xr.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return vr(this.cover(e,n),e,n,t)},xr.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),u=new Array(o),l=1/0,c=1/0,s=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,u[n]=i,r<l&&(l=r),r>s&&(s=r),i<c&&(c=i),i>f&&(f=i));if(l>s||c>f)return this;for(this.cover(l,c).cover(s,f),n=0;n<o;++n)vr(this,a[n],u[n],t[n]);return this},xr.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,u,l=i-n,c=this._root;n>t||t>=i||r>e||e>=o;)switch(u=(e<r)<<1|t<n,(a=new Array(4))[u]=c,c=a,l*=2,u){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},xr.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},xr.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]]},xr.find=function(t,e,n){var r,i,o,a,u,l,c,s=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],v=this._root;for(v&&d.push(new gr(v,s,f,h,p)),null==n?n=1/0:(s=t-n,f=e-n,h=t+n,p=e+n,n*=n);l=d.pop();)if(!(!(v=l.node)||(i=l.x0)>h||(o=l.y0)>p||(a=l.x1)<s||(u=l.y1)<f))if(v.length){var g=(i+a)/2,y=(o+u)/2;d.push(new gr(v[3],g,y,a,u),new gr(v[2],i,y,g,u),new gr(v[1],g,o,a,y),new gr(v[0],i,o,g,y)),(c=(e>=y)<<1|t>=g)&&(l=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=l)}else{var m=t-+this._x.call(null,v.data),w=e-+this._y.call(null,v.data),_=m*m+w*w;if(_<n){var b=Math.sqrt(n=_);s=t-b,f=e-b,h=t+b,p=e+b,r=v.data}}return r},xr.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,u,l,c,s,f,h,p=this._root,d=this._x0,v=this._y0,g=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((c=o>=(u=(d+g)/2))?d=u:g=u,(s=a>=(l=(v+y)/2))?v=l:y=l,e=p,!(p=p[f=s<<1|c]))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(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i: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=i,this)},xr.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},xr.root=function(){return this._root},xr.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},xr.visit=function(t){var e,n,r,i,o,a,u=[],l=this._root;for(l&&u.push(new gr(l,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(l=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&l.length){var c=(r+o)/2,s=(i+a)/2;(n=l[3])&&u.push(new gr(n,c,s,o,a)),(n=l[2])&&u.push(new gr(n,r,s,c,a)),(n=l[1])&&u.push(new gr(n,c,i,o,s)),(n=l[0])&&u.push(new gr(n,r,i,c,s))}return this},xr.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new gr(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,u=e.y0,l=e.x1,c=e.y1,s=(a+l)/2,f=(u+c)/2;(o=i[0])&&n.push(new gr(o,a,u,s,f)),(o=i[1])&&n.push(new gr(o,s,u,l,f)),(o=i[2])&&n.push(new gr(o,a,f,s,c)),(o=i[3])&&n.push(new gr(o,s,f,l,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},xr.x=function(t){return arguments.length?(this._x=t,this):this._x},xr.y=function(t){return arguments.length?(this._y=t,this):this._y};var Cr=Math.PI*(3-Math.sqrt(5));function Mr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var jr=Array.prototype.slice,zr={name:"implicit"};function Or(){var t=sr(),e=[],n=[],r=zr;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==zr)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=sr();for(var r,o,a=-1,u=n.length;++a<u;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=jr.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Or(e,n).unknown(r)},Mr.apply(i,arguments),i}var Tr=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"),Rr=s((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",i="image/jpeg",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r,i},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,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){var e=3e4;u.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,i=new XMLHttpRequest;if(i.onreadystatechange=a,i.ontimeout=l,i.responseType="blob",i.timeout=e,i.open("GET",t,!0),i.send(),u.impl.options.imagePlaceholder){var o=u.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(r=o[1])}function a(){if(4===i.readyState)if(200===i.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];n(t)},e.readAsDataURL(i.response)}else r?n(r):c("cannot fetch resource: "+t+", status: "+i.status)}function l(){r?n(r):c("timeout of "+e+"ms occured while fetching resource: "+t)}function c(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,o){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 i(e,t,n,o)}))})),r}));function a(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||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")}))}}(),i=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")}}}}}(),o=function(){return{inlineAll:function e(i){return i instanceof Element?o(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(n.asArray(i.childNodes).map((function(t){return e(t)})))})):Promise.resolve(i);function o(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},u={toSvg:l,toPng:function(t,e){return c(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return c(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return c(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return c(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:i,images:o,util:n,inliner:r,options:{}}};function l(t,e){return function(t){void 0===t.imagePlaceholder?u.impl.options.imagePlaceholder=a.imagePlaceholder:u.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?u.impl.options.cacheBust=a.cacheBust:u.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return s(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 c(t,e){return l(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var i=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 i=r.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function s(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 i=t.childNodes;return 0===i.length?Promise.resolve(e):o(e,n.asArray(i),r).then((function(){return e}));function o(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return s(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(i).then(o).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 i(){function r(r){var i=window.getComputedStyle(t,r),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=n.uid();e.className=e.className+" "+a;var u=document.createElement("style");u.appendChild(l(a,r,i)),e.appendChild(u)}function l(t,e,r){var i="."+t+":"+e,o=r.cssText?a(r):u(r);return document.createTextNode(i+"{"+o+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function u(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 o(){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 i.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function h(t){return o.inlineAll(t).then((function(){return t}))}t.exports=u}()}));const Fr=require("jszip"),Dr=require("react-file-download"),Lr=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:i,nodesTsv:o}=(t=>{let e=1e7;const n={};let r=!1;t.forEach((t=>{let{source:i,target:o,sourceType:a,targetType:u}=t;""!==o&&""!==i&&(Object.keys(n).indexOf(i)<0?(""!==a?(r=!0,n[i]={ID:e,WEIGHT:1,NODE_TYPE:a}):n[i]={ID:e,WEIGHT:1},e+=1):n[i].WEIGHT+=1,Object.keys(n).indexOf(o)<0?(""!==u?(r=!0,n[o]={ID:e,WEIGHT:1,NODE_TYPE:u}):n[o]={ID:e,WEIGHT:1},e+=1):n[o].WEIGHT+=1)}));let i=r?"ID\tLABEL\tWEIGHT\tNODE_TYPE\r\n":"ID\tLABEL\tWEIGHT\r\n";return Object.keys(n).forEach((t=>{const e=n[t].ID,o=n[t].WEIGHT,a=r?n[t].NODE_TYPE:"";i+=r?`${e}\t${t}\t${o}\t${a}\r\n`:`${e}\t${t}\t${o}\r\n`})),{nodeMap:n,nodesTsv:i}})(r),a=((t,e)=>{let n="SOURCE\tTARGET\tWEIGHT\tTYPE\r\n";return t.forEach((t=>{let{source:r,target:i}=t;if(""===i||""===r)return;const o=e[r].ID,a=e[i].ID;n+=`${o}\t${a}\t1\tUndirected\r\n`})),n})(r,i),u=new Fr;u.file("Node_Table.tsv",o),u.file("Edge_Table.tsv",a),u.generateAsync({type:"blob"}).then((t=>{Dr(t,"Gephi_generated_by_NMTL.zip")}))},qr=t=>{let{fill:e="#825c0d"}=t;return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},n.createElement("defs",null,n.createElement("clipPath",{id:"a"},n.createElement("path",{"data-name":"Rectangle 125",style:{fill:"#fff"},d:"M0 0h32v32H0z"}))),n.createElement("g",{style:{clipPath:"url(#a)"}},n.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:e},"data-name":"Mask Group 42"})))},Ir=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)"})))))},$r=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)"})))))},Br=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)"}))))};m('.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 !important; }\n .SNA .person {\n fill: #867b3a !important; }\n .SNA .publication {\n fill: #825c0d !important; }\n .SNA .article {\n fill: #afafaf !important; }\n .SNA .keyword {\n fill: #fcfae8 !important; }\n .SNA .org {\n fill: #000000 !important; }\n .SNA__tool {\n display: flex;\n justify-content: flex-end;\n padding-right: 20px;\n padding-top: 12px; }\n .SNA__download {\n cursor: pointer;\n margin-right: 16px; }\n .SNA__fullscreenBtn {\n cursor: pointer;\n margin-right: 16px;\n padding-top: 0; }\n .SNA .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .SNA .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .SNA .fullscreenExit {\n text-align: right;\n cursor: pointer;\n border: 0; }\n\n#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-family: "Roboto", "Helvetica", "Arial", sans-serif;\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\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 Ur=function(e){var l=e.className,c=e.intl,s=e.width,h=e.height,p=e.distance,d=e.SNAData,m=e.fontColor,w=e.backgroundColor,_=e.iconColor,b=e.handleClickNodeGoto;if(!d||0===d.nodes.length)return n.createElement("div",{className:"noData"},c?c.formatMessage({id:"common.noData"}):"暫無資料");var x=function(){var t=i(!1),e=t[0],n=t[1],l=o(null);a((function(){var t=function(){n(N.fullscreenElement===l.current)};return N.addEventListener("fullscreenchange",t),function(){return N.removeEventListener("fullscreenchange",t)}}),[]);var c=u((function(){return N.fullscreenElement?N.exitFullscreen().then((function(){return N.requestFullscreen(l.current)})):l.current?N.requestFullscreen(l.current):void 0}),[]),s=u((function(){return N.fullscreenElement===l.current?N.exitFullscreen():Promise.resolve()}),[]);return r((function(){return{active:e,enter:c,exit:s,node:l}}),[e,c,s])}(),E=i(null),k=t(E,2),S=k[0],A=k[1],P=function(t){switch(t){case"img":(t=>{let{id:e,fileName:n="image",quality:r=.95}=t;const i=document.getElementById(e);Rr.toPng(i,{quality:r}).then((t=>{const e=document.createElement("a");e.download=`${n}.png`,e.href=t,e.click()})).catch((t=>{console.error("oops, something went wrong!",t)}))})({id:"network-graph"});break;case"gephi":Lr(d)}},M=r((function(){return x.active?screen.width:screen.width>1050?s:screen.width-80}),[x.active,screen.width]),z=r((function(){return x.active?screen.height:screen.width>1050?h:screen.height-300}),[x.active,screen.width]),T=function(t,e,n){var r=function(t,e,n){var r=.5*(e.x+t.x),i=.5*(e.y+t.y),o=e.x-t.x,a=e.y-t.y,u=Math.pow(Math.pow(o,2)+Math.pow(a,2),.5);return{qx:r-a*n/u,qy:i+o*n/u}}(t,e,n),i=r.qx,o=r.qy;return isNaN(i)?"M".concat(t.x,", ").concat(t.y," Q0 0 ").concat(e.x," ").concat(e.y):"M".concat(t.x,", ").concat(t.y," Q").concat(i," ").concat(o," ").concat(e.x," ").concat(e.y)},R=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),i=Or(Tr),o=t.links.map((function(t){return Object.create(t)})),a=t.nodes.map((function(t){return Object.create(t)})),u=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,u=sr(),l=_n(s),c=F("tick","end");function s(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(r){var l,c,s=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(o-n)*i,u.each((function(t){t(n)})),l=0;l<s;++l)null==(c=t[l]).fx?c.x+=c.vx*=a:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=a:(c.y=c.fy,c.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 i=10*Math.sqrt(n),o=n*Cr;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(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 l.restart(s),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),u.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?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},force:function(t,n){return arguments.length>1?(null==n?u.remove(t):u.set(t,p(n)),e):u.get(t)},find:function(e,n,r){var i,o,a,u,l,c=0,s=t.length;for(null==r?r=1/0:r*=r,c=0;c<s;++c)(a=(i=e-(u=t[c]).x)*i+(o=n-u.y)*o)<r&&(l=u,r=a);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}(a).force("link",function(t){var e,n,r,i,o,a=Sr,u=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},l=pr(30),c=1;function s(r){for(var i=0,a=t.length;i<c;++i)for(var u,l,s,f,h,p,d,v=0;v<a;++v)l=(u=t[v]).source,f=(s=u.target).x+s.vx-l.x-l.vx||dr(),h=s.y+s.vy-l.y-l.vy||dr(),f*=p=((p=Math.sqrt(f*f+h*h))-n[v])/p*r*e[v],h*=p,s.vx-=f*(d=o[v]),s.vy-=h*d,l.vx+=f*(d=1-d),l.vy+=h*d}function f(){if(r){var u,l,c=r.length,s=t.length,f=sr(r,a);for(u=0,i=new Array(c);u<s;++u)(l=t[u]).index=u,"object"!=typeof l.source&&(l.source=Nr(f,l.source)),"object"!=typeof l.target&&(l.target=Nr(f,l.target)),i[l.source.index]=(i[l.source.index]||0)+1,i[l.target.index]=(i[l.target.index]||0)+1;for(u=0,o=new Array(s);u<s;++u)l=t[u],o[u]=i[l.source.index]/(i[l.source.index]+i[l.target.index]);e=new Array(s),h(),n=new Array(s),p()}}function h(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+u(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+l(t[e],e,t)}return null==t&&(t=[]),s.initialize=function(t){r=t,f()},s.links=function(e){return arguments.length?(t=e,f(),s):t},s.id=function(t){return arguments.length?(a=t,s):a},s.iterations=function(t){return arguments.length?(c=+t,s):c},s.strength=function(t){return arguments.length?(u="function"==typeof t?t:pr(+t),h(),s):u},s.distance=function(t){return arguments.length?(l="function"==typeof t?t:pr(+t),p(),s):l},s}(o).id((function(t){return t.index})).distance(50)).force("charge",function(){var t,e,n,r,i=pr(-30),o=1,a=1/0,u=.81;function l(r){var i,o=t.length,a=wr(t,Ar,Pr).visitAfter(s);for(n=r,i=0;i<o;++i)e=t[i],a.visit(f)}function c(){if(t){var e,n,o=t.length;for(r=new Array(o),e=0;e<o;++e)n=t[e],r[n.index]=+i(n,e,t)}}function s(t){var e,n,i,o,a,u=0,l=0;if(t.length){for(i=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(u+=e.value,l+=n,i+=n*e.x,o+=n*e.y);t.x=i/l,t.y=o/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{u+=r[e.data.index]}while(e=e.next)}t.value=u}function f(t,i,l,c){if(!t.value)return!0;var s=t.x-e.x,f=t.y-e.y,h=c-i,p=s*s+f*f;if(h*h/u<p)return p<a&&(0===s&&(p+=(s=dr())*s),0===f&&(p+=(f=dr())*f),p<o&&(p=Math.sqrt(o*p)),e.vx+=s*t.value*n/p,e.vy+=f*t.value*n/p),!0;if(!(t.length||p>=a)){(t.data!==e||t.next)&&(0===s&&(p+=(s=dr())*s),0===f&&(p+=(f=dr())*f),p<o&&(p=Math.sqrt(o*p)));do{t.data!==e&&(h=r[t.data.index]*n/p,e.vx+=s*h,e.vy+=f*h)}while(t=t.next)}}return l.initialize=function(e){t=e,c()},l.strength=function(t){return arguments.length?(i="function"==typeof t?t:pr(+t),c(),l):i},l.distanceMin=function(t){return arguments.length?(o=t*t,l):Math.sqrt(o)},l.distanceMax=function(t){return arguments.length?(a=t*t,l):Math.sqrt(a)},l.theta=function(t){return arguments.length?(u=t*t,l):Math.sqrt(u)},l}().strength(-160)).force("center",function(t,e){var n;function r(){var r,i,o=n.length,a=0,u=0;for(r=0;r<o;++r)a+=(i=n[r]).x,u+=i.y;for(a=a/o-t,u=u/o-e,r=0;r<o;++r)(i=n[r]).x-=a,i.y-=u}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}(M/2,z/2)).force("collide",function(t){var e,n,r=1,i=1;function o(){for(var t,o,u,l,c,s,f,h=e.length,p=0;p<i;++p)for(o=wr(e,Er,kr).visitAfter(a),t=0;t<h;++t)u=e[t],s=n[u.index],f=s*s,l=u.x+u.vx,c=u.y+u.vy,o.visit(d);function d(t,e,n,i,o){var a=t.data,h=t.r,p=s+h;if(!a)return e>l+p||i<l-p||n>c+p||o<c-p;if(a.index>u.index){var d=l-a.x-a.vx,v=c-a.y-a.vy,g=d*d+v*v;g<p*p&&(0===d&&(g+=(d=dr())*d),0===v&&(g+=(v=dr())*v),g=(p-(g=Math.sqrt(g)))/g*r,u.vx+=(d*=g)*(p=(h*=h)/(f+h)),u.vy+=(v*=g)*p,a.vx-=d*(p=1-p),a.vy-=v*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 u(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=pr(null==t?1:+t)),o.initialize=function(t){e=t,u()},o.iterations=function(t){return arguments.length?(i=+t,o):i},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),u(),o):t},o}().radius((function(){return 13.5})).iterations(5)).force("x",function(t){var e,n,r,i=pr(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=pr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:pr(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),a(),o):t},o}(M/2)).force("y",function(t){var e,n,r,i=pr(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=pr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:pr(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),a(),o):t},o}(z/2)).force("radial",function(t,e,n){var r,i,o,a=pr(.1);function u(t){for(var a=0,u=r.length;a<u;++a){var l=r[a],c=l.x-e||1e-6,s=l.y-n||1e-6,f=Math.sqrt(c*c+s*s),h=(o[a]-f)*i[a]*t/f;l.vx+=c*h,l.vy+=s*h}}function l(){if(r){var e,n=r.length;for(i=new Array(n),o=new Array(n),e=0;e<n;++e)o[e]=+t(r[e],e,r),i[e]=isNaN(o[e])?0:+a(r[e],e,r)}}return"function"!=typeof t&&(t=pr(+t)),null==e&&(e=0),null==n&&(n=0),u.initialize=function(t){r=t,l()},u.strength=function(t){return arguments.length?(a="function"==typeof t?t:pr(+t),l(),u):a},u.radius=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),l(),u):t},u.x=function(t){return arguments.length?(e=+t,u):e},u.y=function(t){return arguments.length?(n=+t,u):n},u}(100,M/2,z/2)),l=Kt(".chart").append("svg").attr("viewBox",[0,0,M,z]).style("background-color",w);l.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=l.append("g").attr("stroke","#999").attr("stroke-opacity",.6).selectAll("line").data(o).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=l.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 i(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?b({name:t.name,id:t.id,type:t.type}):null})).call(function(t){return fe().on("start",(function(e){Lt.active||t.alphaTarget(.3).restart(),e.fx=e.x,e.fy=e.y})).on("drag",(function(t){t.fx=Lt.x>M||Lt.x<0?t.x:Lt.x,t.fy=Lt.y>z||Lt.y<0?t.y:Lt.y}))}(u));f.append("title").text((function(t){return"".concat(t.name,"-").concat(function(t){switch(t){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"}):"關鍵字";default:return""}}(t.type))}));var h=l.append("g").selectAll("text").data(a).join("text").attr("fill",m).attr("text-anchor","middle").attr("key",(function(t){return t.type})).style("color","#fff").style("font-size","14px").text((function(t){return t.name})),p=l.selectAll(".edgepath").data(o).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");l.selectAll(".edgelabel").data(o).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})),u.on("tick",(function(){s.attr("d",(function(t){return T(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})),p.attr("d",(function(t){return T(t.source,t.target,30)}))}))};return a((function(){if(d&&d.nodes&&d.nodes.length>0){var t=document.getElementById("network-graph");t&&t.childNodes[0]&&t.removeChild(t.childNodes[0]),R(d)}}),[d,x.active]),n.createElement("div",{className:f("SNA",{"SNA--smallSize":p<200},l),style:{contentWidth:M,contentHeight:z,backgroundColor:w}},n.createElement("div",{className:"SNA__tool"},n.createElement("div",{className:"SNA__download"},n.createElement(y,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},n.createElement("span",{onClick:function(t){A(t.currentTarget)}},n.createElement(qr,{fill:_}))),n.createElement(v,{id:"download-menu",anchorEl:S,keepMounted:!0,open:Boolean(S),onClose:function(){A(null)}},n.createElement(g,{onClick:function(){return P("img")}},c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download.img"}):"下載圖片"),n.createElement(g,{onClick:function(){return P("gephi")}},c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download.gephi"}):"下載Gephi"))),n.createElement("div",{className:"SNA__fullscreenBtn"},n.createElement(y,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},n.createElement("span",{onClick:x.enter},n.createElement(Br,{fill:_})))),n.createElement(O,{targets:["#network-graph svg g text"],options:{stepSize:2,range:1},customButtons:{up:n.createElement(y,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},n.createElement(Ir,{fill:_})),down:n.createElement(y,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},n.createElement($r,{fill:_})),style:{border:"none"},buttonsMargin:10}})),n.createElement(C,{handle:x},n.createElement("div",{className:"chart",id:"network-graph"},x.active&&n.createElement("div",{className:"fullscreenExit",style:{backgroundColor:w}},n.createElement(j,{fontSize:"large",onClick:x.exit,title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreenExit"}):"離開全螢幕"})))))};Ur.defaultProps={className:void 0,intl:void 0,width:1050,height:600,distance:400,SNAData:null,fontColor:"#000000",backgroundColor:"#FFFFFF",iconColor:"#825c0d",handleClickNodeGoto:null},Ur.propTypes={className:l.string,intl:l.objectOf(l.any),width:l.number,height:l.number,distance:l.number,SNAData:l.objectOf(l.any),fontColor:l.string,backgroundColor:l.string,iconColor:l.string,handleClickNodeGoto:l.func};export{Ur as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daoyi/nmtl-ui",
|
|
3
|
-
"version": "1.1.43-beta.
|
|
3
|
+
"version": "1.1.43-beta.30",
|
|
4
4
|
"description": "This project is to be used as a starter kit for building React component using Storybook and Rollup",
|
|
5
5
|
"author": "daoyi",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"http-proxy-middleware": "1.3.1",
|
|
29
29
|
"jquery": "3.6.0",
|
|
30
30
|
"js-file-download": "0.4.12",
|
|
31
|
+
"jszip": "3.7.1",
|
|
31
32
|
"lodash": "4.17.21",
|
|
32
33
|
"markdown-it": "12.0.6",
|
|
33
34
|
"moment": "2.29.1",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"react-dom": "16.14.0",
|
|
41
42
|
"react-dropzone": "11.3.2",
|
|
42
43
|
"react-facebook-login": "4.1.1",
|
|
44
|
+
"react-file-download": "0.3.5",
|
|
43
45
|
"react-font-size-changer": "0.2.0",
|
|
44
46
|
"react-full-screen": "1.1.0",
|
|
45
47
|
"react-google-login": "5.2.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=function(e,t,o,n){var a=new Blob(void 0!==n?[n,e]:[e],{type:o||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(a,t);else{var r=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),c=document.createElement("a");c.style.display="none",c.href=r,c.setAttribute("download",t),void 0===c.download&&c.setAttribute("target","_blank"),document.body.appendChild(c),c.click(),setTimeout((function(){document.body.removeChild(c),window.URL.revokeObjectURL(r)}),200)}};const t=e=>{let t="";if(Array.isArray(e)&&e.length>0){const o=Object.keys(e[0]);t+=`${o.toString()}\n`,e.forEach((e=>{o.forEach((o=>{t+=`${e[o]},`})),t+="\n"}))}else{const o=Object.keys(e);t+=`${o.toString()}\n`,o.forEach((o=>{t+=`${e[o]},`})),t+="\n"}return t},o=e=>{let t="";if(Array.isArray(e)&&e.length>0){const o=Object.keys(e[0]);e.forEach(((e,n)=>{t+=`(${n+1})\n`,o.forEach((o=>{t+=`${o}: ${e[o]}\n`})),t+="\n"}))}else{Object.keys(e).forEach((o=>{t+=`${o}: ${e[o]}\n`}))}return t};export{t as a,e as f,o as j};
|