@daoyi/nmtl-ui 2.0.1-beta.35 → 2.0.1-beta.36

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{a as t}from"./_rollupPluginBabelHelpers-b6a1ebe2.js";import e,{useState as o}from"react";import r from"prop-types";import{c as n}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 p}from"@material-ui/core";import{f as u,j as f,a as x}from"./dataExport-04b77185.js";import{s as m}from"./style-inject.es-1f59c1d0.js";m(".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 font-weight: bold; }\n");var d=function(r){var m=r.className,d=r.color,y=r.right,g=r.forceTxt,T=r.exportText,_=r.exportTypeText,b=r.data,E=o(!1),v=t(E,2),B=v[0],k=v[1],h=[{type:"CSV",click:function(){return u("\ufeff".concat(x(b)),"output.csv")}},{type:"EXCEL",click:function(){return u("\ufeff".concat(x(b)),"output.xls")}},{type:"TXT",click:function(){return u("\ufeff".concat(f(b)),"output.txt")}}];return e.createElement("div",{style:{color:d},className:n("exportButton",{"exportButton--right":y},m)},e.createElement("div",{className:"exportButton__text",onClick:function(){return g?u("\ufeff".concat(f(b)),"output.txt"):k(!0)}},e.createElement(a,{className:"exportButton__text__icon"}),T),e.createElement(i,{open:B,keepMounted:!0,onClose:function(){return k(!1)},"aria-labelledby":"alert-dialog-slide-title","aria-describedby":"alert-dialog-slide-description"},e.createElement(c,null,e.createElement(l,null,_)),e.createElement(s,null,h.map((function(t){var o=t.type,r=t.click;return e.createElement(p,{key:o,variant:"text",onClick:function(){r(),k(!1)}},o)})))))};d.defaultProps={className:void 0,color:"#4e3a16",right:void 0,forceTxt:!0,exportText:"Export",exportTypeText:"Export Type",data:void 0},d.propTypes={className:r.string,color:r.string,right:r.bool,forceTxt:r.bool,exportText:r.string,exportTypeText:r.string,data:r.oneOfType([r.objectOf(r.any),r.arrayOf(r.any)])};export{d as default};
1
+ import{a as t}from"./_rollupPluginBabelHelpers-b6a1ebe2.js";import e,{useState as o}from"react";import r from"prop-types";import{c as n}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 p}from"@material-ui/core";import{f as u,j as f,a as x}from"./dataExport-d55d6fa3.js";import{s as m}from"./style-inject.es-1f59c1d0.js";m(".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 font-weight: bold; }\n");var d=function(r){var m=r.className,d=r.color,y=r.right,g=r.forceTxt,T=r.exportText,_=r.exportTypeText,b=r.data,E=o(!1),v=t(E,2),B=v[0],k=v[1],h=[{type:"CSV",click:function(){return u("\ufeff".concat(x(b)),"output.csv")}},{type:"EXCEL",click:function(){return u("\ufeff".concat(x(b)),"output.xls")}},{type:"TXT",click:function(){return u("\ufeff".concat(f(b)),"output.txt")}}];return e.createElement("div",{style:{color:d},className:n("exportButton",{"exportButton--right":y},m)},e.createElement("div",{className:"exportButton__text",onClick:function(){return g?u("\ufeff".concat(f(b)),"output.txt"):k(!0)}},e.createElement(a,{className:"exportButton__text__icon"}),T),e.createElement(i,{open:B,keepMounted:!0,onClose:function(){return k(!1)},"aria-labelledby":"alert-dialog-slide-title","aria-describedby":"alert-dialog-slide-description"},e.createElement(c,null,e.createElement(l,null,_)),e.createElement(s,null,h.map((function(t){var o=t.type,r=t.click;return e.createElement(p,{key:o,variant:"text",onClick:function(){r(),k(!1)}},o)})))))};d.defaultProps={className:void 0,color:"#4e3a16",right:void 0,forceTxt:!0,exportText:"Export",exportTypeText:"Export Type",data:void 0},d.propTypes={className:r.string,color:r.string,right:r.bool,forceTxt:r.bool,exportText:r.string,exportTypeText:r.string,data:r.oneOfType([r.objectOf(r.any),r.arrayOf(r.any)])};export{d as default};
@@ -1,4 +1,4 @@
1
- import*as t from"react";import e,{Component as n,forwardRef as r,useState as o,useMemo as i,useEffect as a}from"react";import l from"prop-types";import{c,b as u,u as s}from"./index-b2745105.js";import{e as f,d as h,a as d,c as p,m,t as y,T as g,i as v,b as w,o as b}from"./transform-011f0fe5.js";import{_ as x}from"./_rollupPluginBabelHelpers-b6a1ebe2.js";import{Menu as _,MenuItem as k,Tooltip as E,IconButton as S}from"@material-ui/core";import C from"./Tooltip.js";import{s as T,f as z,a as N}from"./dataExport-04b77185.js";import{s as P}from"./style-inject.es-1f59c1d0.js";import{i as O,a as A,r as j}from"./createSvgIcon-9c1645fc.js";import"@material-ui/styles";import"react-dom";function M(){for(var t,e=f;t=e.sourceEvent;)e=t;return e}function D(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function F(t){var e=M();return e.changedTouches&&(e=e.changedTouches[0]),D(t,e)}function I(t,e,n){arguments.length<3&&(n=e,e=M().changedTouches);for(var r,o=0,i=e?e.length:0;o<i;++o)if((r=e[o]).identifier===n)return D(t,r);return null}function B(){f.stopImmediatePropagation()}function R(){f.preventDefault(),f.stopImmediatePropagation()}function L(t){var e=t.document.documentElement,n=h(t).on("dragstart.drag",R,!0);"onselectstart"in e?n.on("selectstart.drag",R,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function q(t,e){var n=t.document.documentElement,r=h(t).on("dragstart.drag",null);e&&(r.on("click.drag",R,!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)}function U(t){return function(){return t}}function G(t,e,n,r,o,i,a,l,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=o,this.x=i,this.y=a,this.dx=l,this.dy=c,this._=u}function $(){return!f.ctrlKey&&!f.button}function H(){return this.parentNode}function W(t){return null==t?{x:f.x,y:f.y}:t}function V(){return navigator.maxTouchPoints||"ontouchstart"in this}G.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var X=Math.SQRT2;function Y(t){return((t=Math.exp(t))+1/t)/2}function K(t,e){var n,r,o=t[0],i=t[1],a=t[2],l=e[0],c=e[1],u=e[2],s=l-o,f=c-i,h=s*s+f*f;if(h<1e-12)r=Math.log(u/a)/X,n=function(t){return[o+t*s,i+t*f,a*Math.exp(X*t*r)]};else{var d=Math.sqrt(h),p=(u*u-a*a+4*h)/(2*a*2*d),m=(u*u-a*a-4*h)/(2*u*2*d),y=Math.log(Math.sqrt(p*p+1)-p),g=Math.log(Math.sqrt(m*m+1)-m);r=(g-y)/X,n=function(t){var e=t*r,n=Y(y),l=a/(2*d)*(n*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(X*e+y)-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[o+l*s,i+l*f,a*n/Y(X*e+y)]}}return n.duration=1e3*r,n}function J(t){return function(){return t}}function Q(){return 1e-6*(Math.random()-.5)}function Z(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i,a,l,c,u,s,f,h,d=t._root,p={data:r},m=t._x0,y=t._y0,g=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(i=(m+g)/2))?m=i:g=i,(s=n>=(a=(y+v)/2))?y=a:v=a,o=d,!(d=d[f=s<<1|u]))return o[f]=p,t;if(l=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===l&&n===c)return p.next=d,o?o[f]=p:t._root=p,t;do{o=o?o[f]=new Array(4):t._root=new Array(4),(u=e>=(i=(m+g)/2))?m=i:g=i,(s=n>=(a=(y+v)/2))?y=a:v=a}while((f=s<<1|u)==(h=(c>=a)<<1|l>=i));return o[h]=d,o[f]=p,t}function tt(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o}function et(t){return t[0]}function nt(t){return t[1]}function rt(t,e,n){var r=new ot(null==e?et:e,null==n?nt:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ot(t,e,n,r,o,i){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function it(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var at=rt.prototype=ot.prototype;function lt(t){return t.x+t.vx}function ct(t){return t.y+t.vy}function ut(t){return t.index}function st(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function ft(t){return t.x}function ht(t){return t.y}at.copy=function(){var t,e,n=new ot(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=it(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(e=r.source[o])&&(e.length?t.push({source:e,target:r.target[o]=new Array(4)}):r.target[o]=it(e));return n},at.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Z(this.cover(e,n),e,n,t)},at.addAll=function(t){var e,n,r,o,i=t.length,a=new Array(i),l=new Array(i),c=1/0,u=1/0,s=-1/0,f=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=r,l[n]=o,r<c&&(c=r),r>s&&(s=r),o<u&&(u=o),o>f&&(f=o));if(c>s||u>f)return this;for(this.cover(c,u).cover(s,f),n=0;n<i;++n)Z(this,a[n],l[n],t[n]);return this},at.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,i=(r=Math.floor(e))+1;else{for(var a,l,c=o-n,u=this._root;n>t||t>=o||r>e||e>=i;)switch(l=(e<r)<<1|t<n,(a=new Array(4))[l]=u,u=a,c*=2,l){case 0:o=n+c,i=r+c;break;case 1:n=o-c,i=r+c;break;case 2:o=n+c,r=i-c;break;case 3:n=o-c,r=i-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},at.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},at.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]]},at.find=function(t,e,n){var r,o,i,a,l,c,u,s=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],m=this._root;for(m&&p.push(new tt(m,s,f,h,d)),null==n?n=1/0:(s=t-n,f=e-n,h=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(m=c.node)||(o=c.x0)>h||(i=c.y0)>d||(a=c.x1)<s||(l=c.y1)<f))if(m.length){var y=(o+a)/2,g=(i+l)/2;p.push(new tt(m[3],y,g,a,l),new tt(m[2],o,g,y,l),new tt(m[1],y,i,a,g),new tt(m[0],o,i,y,g)),(u=(e>=g)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var v=t-+this._x.call(null,m.data),w=e-+this._y.call(null,m.data),b=v*v+w*w;if(b<n){var x=Math.sqrt(n=b);s=t-x,f=e-x,h=t+x,d=e+x,r=m.data}}return r},at.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,o,i,a,l,c,u,s,f,h,d=this._root,p=this._x0,m=this._y0,y=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((u=i>=(l=(p+y)/2))?p=l:y=l,(s=a>=(c=(m+g)/2))?m=c:g=c,e=d,!(d=d[f=s<<1|u]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,r?(o?r.next=o:delete r.next,this):e?(o?e[f]=o:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=o,this)},at.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},at.root=function(){return this._root},at.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},at.visit=function(t){var e,n,r,o,i,a,l=[],c=this._root;for(c&&l.push(new tt(c,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(c=e.node,r=e.x0,o=e.y0,i=e.x1,a=e.y1)&&c.length){var u=(r+i)/2,s=(o+a)/2;(n=c[3])&&l.push(new tt(n,u,s,i,a)),(n=c[2])&&l.push(new tt(n,r,s,u,a)),(n=c[1])&&l.push(new tt(n,u,o,i,s)),(n=c[0])&&l.push(new tt(n,r,o,u,s))}return this},at.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new tt(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var i,a=e.x0,l=e.y0,c=e.x1,u=e.y1,s=(a+c)/2,f=(l+u)/2;(i=o[0])&&n.push(new tt(i,a,l,s,f)),(i=o[1])&&n.push(new tt(i,s,l,c,f)),(i=o[2])&&n.push(new tt(i,a,f,s,u)),(i=o[3])&&n.push(new tt(i,s,f,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},at.x=function(t){return arguments.length?(this._x=t,this):this._x},at.y=function(t){return arguments.length?(this._y=t,this):this._y};var dt=Math.PI*(3-Math.sqrt(5));var pt=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");function mt(t){return function(){return t}}function yt(t,e,n){this.target=t,this.type=e,this.transform=n}function gt(){f.stopImmediatePropagation()}function vt(){f.preventDefault(),f.stopImmediatePropagation()}function wt(){return!f.ctrlKey&&!f.button}function bt(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function xt(){return this.__zoom||v}function _t(){return-f.deltaY*(1===f.deltaMode?.05:f.deltaMode?1:.002)}function kt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Et(t,e,n){var r=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}var St=function(){return St=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},St.apply(this,arguments)},Ct=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};var Tt,zt=(Tt=function(t,e){return Tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Tt(t,e)},function(t,e){function n(){this.constructor=t}Tt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Nt=function(){return Nt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Nt.apply(this,arguments)},Pt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function l(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}c((r=r.apply(t,e||[])).next())}))},Ot=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},At=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},jt=function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then},Mt=function(t,e){return{left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-t/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-e/2}},Dt=function(t,e){return{top:(window.screen.height-e)/2,left:(window.screen.width-t)/2}};function Ft(t,e,n){var r=e.height,o=e.width,i=At(e,["height","width"]),a=Nt({height:r,width:o,location:"no",toolbar:"no",status:"no",directories:"no",menubar:"no",scrollbars:"yes",resizable:"no",centerscreen:"yes",chrome:"yes"},i),l=window.open(t,"",Object.keys(a).map((function(t){return t+"="+a[t]})).join(", "));if(n)var c=window.setInterval((function(){try{(null===l||l.closed)&&(window.clearInterval(c),n(l))}catch(t){console.error(t)}}),1e3);return l}var It=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.openShareDialog=function(t){var n=e.props,r=n.onShareWindowClose,o=n.windowHeight,i=void 0===o?400:o,a=n.windowPosition,l=void 0===a?"windowCenter":a,c=n.windowWidth,u=void 0===c?550:c;Ft(t,Nt({height:i,width:u},"windowCenter"===l?Mt(u,i):Dt(u,i)),r)},e.handleClick=function(t){return Pt(e,void 0,void 0,(function(){var e,n,r,o,i,a,l,c,u,s;return Ot(this,(function(f){switch(f.label){case 0:return e=this.props,n=e.beforeOnClick,r=e.disabled,o=e.networkLink,i=e.onClick,a=e.url,l=e.openShareDialogOnClick,c=e.opts,u=o(a,c),r?[2]:(t.preventDefault(),n?(s=n(),jt(s)?[4,s]:[3,2]):[3,2]);case 1:f.sent(),f.label=2;case 2:return l&&this.openShareDialog(u),i&&i(t,u),[2]}}))}))},e}return zt(n,t),n.prototype.render=function(){var t=this.props;t.beforeOnClick;var n=t.children,r=t.className,o=t.disabled,i=t.disabledStyle,a=t.forwardedRef;t.networkLink;var l=t.networkName;t.onShareWindowClose,t.openShareDialogOnClick,t.opts;var u=t.resetButtonStyle,s=t.style;t.url,t.windowHeight,t.windowPosition,t.windowWidth;var f=At(t,["beforeOnClick","children","className","disabled","disabledStyle","forwardedRef","networkLink","networkName","onShareWindowClose","openShareDialogOnClick","opts","resetButtonStyle","style","url","windowHeight","windowPosition","windowWidth"]),h=c("react-share__ShareButton",{"react-share__ShareButton--disabled":!!o,disabled:!!o},r),d=Nt(Nt(u?{backgroundColor:"transparent",border:"none",padding:0,font:"inherit",color:"inherit",cursor:"pointer"}:{},s),o&&i);return e.createElement("button",Nt({},f,{"aria-label":f["aria-label"]||l,className:h,onClick:this.handleClick,ref:a,style:d}),n)},n.defaultProps={disabledStyle:{opacity:.6},openShareDialogOnClick:!0,resetButtonStyle:!0},n}(n),Bt=It,Rt=function(){return Rt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Rt.apply(this,arguments)};var Lt,qt,Ut=(Lt={color:"#3b5998",networkName:"facebook",path:"M34.1,47V33.3h4.6l0.7-5.3h-5.3v-3.4c0-1.5,0.4-2.6,2.6-2.6l2.8,0v-4.8c-0.5-0.1-2.2-0.2-4.1-0.2 c-4.1,0-6.9,2.5-6.9,7V28H24v5.3h4.6V47H34.1z"},(qt=function(t){var n=t.bgStyle,r=t.borderRadius,o=t.iconFillColor,i=t.round,a=t.size,l=Ct(t,["bgStyle","borderRadius","iconFillColor","round","size"]);return e.createElement("svg",St({viewBox:"0 0 64 64",width:a,height:a},l),i?e.createElement("circle",{cx:"32",cy:"32",r:"31",fill:Lt.color,style:n}):e.createElement("rect",{width:"64",height:"64",rx:r,ry:r,fill:Lt.color,style:n}),e.createElement("path",{d:Lt.path,fill:o}))}).defaultProps={bgStyle:{},borderRadius:0,iconFillColor:"white",size:64},qt),Gt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$t=function(t){function e(e){var n=t.call(this,e)||this;return n.name="AssertionError",n}return Gt(e,t),e}(Error);var Ht=function(t,n,o,i){function a(r,a){var l=o(r),c=Rt({},r);return Object.keys(l).forEach((function(t){delete c[t]})),e.createElement(Bt,Rt({},i,c,{forwardedRef:a,networkName:t,networkLink:n,opts:o(r)}))}return a.displayName="ShareButton-"+t,r(a)}("facebook",(function(t,e){var n,r,o=e.quote,i=e.hashtag;return function(t,e){if(!t)throw new $t(e)}(t,"facebook.url"),"https://www.facebook.com/sharer/sharer.php"+(n={u:t,quote:o,hashtag:i},r=Object.entries(n).filter((function(t){return null!=t[1]})).map((function(t){var e=t[0],n=t[1];return encodeURIComponent(e)+"="+encodeURIComponent(String(n))})),r.length>0?"?"+r.join("&"):"")}),(function(t){return{quote:t.quote,hashtag:t.hashtag}}),{windowWidth:550,windowHeight:400}),Wt=Ht,Vt=u((function(t){
1
+ import*as t from"react";import e,{Component as n,forwardRef as r,useState as o,useMemo as i,useEffect as a}from"react";import l from"prop-types";import{c,b as u,u as s}from"./index-b2745105.js";import{e as f,d as h,a as d,c as p,m,t as y,T as g,i as v,b as w,o as b}from"./transform-011f0fe5.js";import{_ as x}from"./_rollupPluginBabelHelpers-b6a1ebe2.js";import{Menu as _,MenuItem as k,Tooltip as E,IconButton as S}from"@material-ui/core";import C from"./Tooltip.js";import{s as T,f as z,a as N}from"./dataExport-d55d6fa3.js";import{s as P}from"./style-inject.es-1f59c1d0.js";import{i as O,a as A,r as j}from"./createSvgIcon-9c1645fc.js";import"@material-ui/styles";import"react-dom";function M(){for(var t,e=f;t=e.sourceEvent;)e=t;return e}function D(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function F(t){var e=M();return e.changedTouches&&(e=e.changedTouches[0]),D(t,e)}function I(t,e,n){arguments.length<3&&(n=e,e=M().changedTouches);for(var r,o=0,i=e?e.length:0;o<i;++o)if((r=e[o]).identifier===n)return D(t,r);return null}function B(){f.stopImmediatePropagation()}function R(){f.preventDefault(),f.stopImmediatePropagation()}function L(t){var e=t.document.documentElement,n=h(t).on("dragstart.drag",R,!0);"onselectstart"in e?n.on("selectstart.drag",R,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function q(t,e){var n=t.document.documentElement,r=h(t).on("dragstart.drag",null);e&&(r.on("click.drag",R,!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)}function U(t){return function(){return t}}function G(t,e,n,r,o,i,a,l,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=o,this.x=i,this.y=a,this.dx=l,this.dy=c,this._=u}function $(){return!f.ctrlKey&&!f.button}function H(){return this.parentNode}function W(t){return null==t?{x:f.x,y:f.y}:t}function V(){return navigator.maxTouchPoints||"ontouchstart"in this}G.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var X=Math.SQRT2;function Y(t){return((t=Math.exp(t))+1/t)/2}function K(t,e){var n,r,o=t[0],i=t[1],a=t[2],l=e[0],c=e[1],u=e[2],s=l-o,f=c-i,h=s*s+f*f;if(h<1e-12)r=Math.log(u/a)/X,n=function(t){return[o+t*s,i+t*f,a*Math.exp(X*t*r)]};else{var d=Math.sqrt(h),p=(u*u-a*a+4*h)/(2*a*2*d),m=(u*u-a*a-4*h)/(2*u*2*d),y=Math.log(Math.sqrt(p*p+1)-p),g=Math.log(Math.sqrt(m*m+1)-m);r=(g-y)/X,n=function(t){var e=t*r,n=Y(y),l=a/(2*d)*(n*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(X*e+y)-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[o+l*s,i+l*f,a*n/Y(X*e+y)]}}return n.duration=1e3*r,n}function J(t){return function(){return t}}function Q(){return 1e-6*(Math.random()-.5)}function Z(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i,a,l,c,u,s,f,h,d=t._root,p={data:r},m=t._x0,y=t._y0,g=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(i=(m+g)/2))?m=i:g=i,(s=n>=(a=(y+v)/2))?y=a:v=a,o=d,!(d=d[f=s<<1|u]))return o[f]=p,t;if(l=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===l&&n===c)return p.next=d,o?o[f]=p:t._root=p,t;do{o=o?o[f]=new Array(4):t._root=new Array(4),(u=e>=(i=(m+g)/2))?m=i:g=i,(s=n>=(a=(y+v)/2))?y=a:v=a}while((f=s<<1|u)==(h=(c>=a)<<1|l>=i));return o[h]=d,o[f]=p,t}function tt(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o}function et(t){return t[0]}function nt(t){return t[1]}function rt(t,e,n){var r=new ot(null==e?et:e,null==n?nt:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ot(t,e,n,r,o,i){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function it(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var at=rt.prototype=ot.prototype;function lt(t){return t.x+t.vx}function ct(t){return t.y+t.vy}function ut(t){return t.index}function st(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function ft(t){return t.x}function ht(t){return t.y}at.copy=function(){var t,e,n=new ot(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=it(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(e=r.source[o])&&(e.length?t.push({source:e,target:r.target[o]=new Array(4)}):r.target[o]=it(e));return n},at.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Z(this.cover(e,n),e,n,t)},at.addAll=function(t){var e,n,r,o,i=t.length,a=new Array(i),l=new Array(i),c=1/0,u=1/0,s=-1/0,f=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=r,l[n]=o,r<c&&(c=r),r>s&&(s=r),o<u&&(u=o),o>f&&(f=o));if(c>s||u>f)return this;for(this.cover(c,u).cover(s,f),n=0;n<i;++n)Z(this,a[n],l[n],t[n]);return this},at.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,i=(r=Math.floor(e))+1;else{for(var a,l,c=o-n,u=this._root;n>t||t>=o||r>e||e>=i;)switch(l=(e<r)<<1|t<n,(a=new Array(4))[l]=u,u=a,c*=2,l){case 0:o=n+c,i=r+c;break;case 1:n=o-c,i=r+c;break;case 2:o=n+c,r=i-c;break;case 3:n=o-c,r=i-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},at.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},at.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]]},at.find=function(t,e,n){var r,o,i,a,l,c,u,s=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],m=this._root;for(m&&p.push(new tt(m,s,f,h,d)),null==n?n=1/0:(s=t-n,f=e-n,h=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(m=c.node)||(o=c.x0)>h||(i=c.y0)>d||(a=c.x1)<s||(l=c.y1)<f))if(m.length){var y=(o+a)/2,g=(i+l)/2;p.push(new tt(m[3],y,g,a,l),new tt(m[2],o,g,y,l),new tt(m[1],y,i,a,g),new tt(m[0],o,i,y,g)),(u=(e>=g)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var v=t-+this._x.call(null,m.data),w=e-+this._y.call(null,m.data),b=v*v+w*w;if(b<n){var x=Math.sqrt(n=b);s=t-x,f=e-x,h=t+x,d=e+x,r=m.data}}return r},at.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,o,i,a,l,c,u,s,f,h,d=this._root,p=this._x0,m=this._y0,y=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((u=i>=(l=(p+y)/2))?p=l:y=l,(s=a>=(c=(m+g)/2))?m=c:g=c,e=d,!(d=d[f=s<<1|u]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,r?(o?r.next=o:delete r.next,this):e?(o?e[f]=o:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=o,this)},at.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},at.root=function(){return this._root},at.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},at.visit=function(t){var e,n,r,o,i,a,l=[],c=this._root;for(c&&l.push(new tt(c,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(c=e.node,r=e.x0,o=e.y0,i=e.x1,a=e.y1)&&c.length){var u=(r+i)/2,s=(o+a)/2;(n=c[3])&&l.push(new tt(n,u,s,i,a)),(n=c[2])&&l.push(new tt(n,r,s,u,a)),(n=c[1])&&l.push(new tt(n,u,o,i,s)),(n=c[0])&&l.push(new tt(n,r,o,u,s))}return this},at.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new tt(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var i,a=e.x0,l=e.y0,c=e.x1,u=e.y1,s=(a+c)/2,f=(l+u)/2;(i=o[0])&&n.push(new tt(i,a,l,s,f)),(i=o[1])&&n.push(new tt(i,s,l,c,f)),(i=o[2])&&n.push(new tt(i,a,f,s,u)),(i=o[3])&&n.push(new tt(i,s,f,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},at.x=function(t){return arguments.length?(this._x=t,this):this._x},at.y=function(t){return arguments.length?(this._y=t,this):this._y};var dt=Math.PI*(3-Math.sqrt(5));var pt=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");function mt(t){return function(){return t}}function yt(t,e,n){this.target=t,this.type=e,this.transform=n}function gt(){f.stopImmediatePropagation()}function vt(){f.preventDefault(),f.stopImmediatePropagation()}function wt(){return!f.ctrlKey&&!f.button}function bt(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function xt(){return this.__zoom||v}function _t(){return-f.deltaY*(1===f.deltaMode?.05:f.deltaMode?1:.002)}function kt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Et(t,e,n){var r=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}var St=function(){return St=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},St.apply(this,arguments)},Ct=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};var Tt,zt=(Tt=function(t,e){return Tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Tt(t,e)},function(t,e){function n(){this.constructor=t}Tt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Nt=function(){return Nt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Nt.apply(this,arguments)},Pt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function l(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}c((r=r.apply(t,e||[])).next())}))},Ot=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},At=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},jt=function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then},Mt=function(t,e){return{left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-t/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-e/2}},Dt=function(t,e){return{top:(window.screen.height-e)/2,left:(window.screen.width-t)/2}};function Ft(t,e,n){var r=e.height,o=e.width,i=At(e,["height","width"]),a=Nt({height:r,width:o,location:"no",toolbar:"no",status:"no",directories:"no",menubar:"no",scrollbars:"yes",resizable:"no",centerscreen:"yes",chrome:"yes"},i),l=window.open(t,"",Object.keys(a).map((function(t){return t+"="+a[t]})).join(", "));if(n)var c=window.setInterval((function(){try{(null===l||l.closed)&&(window.clearInterval(c),n(l))}catch(t){console.error(t)}}),1e3);return l}var It=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.openShareDialog=function(t){var n=e.props,r=n.onShareWindowClose,o=n.windowHeight,i=void 0===o?400:o,a=n.windowPosition,l=void 0===a?"windowCenter":a,c=n.windowWidth,u=void 0===c?550:c;Ft(t,Nt({height:i,width:u},"windowCenter"===l?Mt(u,i):Dt(u,i)),r)},e.handleClick=function(t){return Pt(e,void 0,void 0,(function(){var e,n,r,o,i,a,l,c,u,s;return Ot(this,(function(f){switch(f.label){case 0:return e=this.props,n=e.beforeOnClick,r=e.disabled,o=e.networkLink,i=e.onClick,a=e.url,l=e.openShareDialogOnClick,c=e.opts,u=o(a,c),r?[2]:(t.preventDefault(),n?(s=n(),jt(s)?[4,s]:[3,2]):[3,2]);case 1:f.sent(),f.label=2;case 2:return l&&this.openShareDialog(u),i&&i(t,u),[2]}}))}))},e}return zt(n,t),n.prototype.render=function(){var t=this.props;t.beforeOnClick;var n=t.children,r=t.className,o=t.disabled,i=t.disabledStyle,a=t.forwardedRef;t.networkLink;var l=t.networkName;t.onShareWindowClose,t.openShareDialogOnClick,t.opts;var u=t.resetButtonStyle,s=t.style;t.url,t.windowHeight,t.windowPosition,t.windowWidth;var f=At(t,["beforeOnClick","children","className","disabled","disabledStyle","forwardedRef","networkLink","networkName","onShareWindowClose","openShareDialogOnClick","opts","resetButtonStyle","style","url","windowHeight","windowPosition","windowWidth"]),h=c("react-share__ShareButton",{"react-share__ShareButton--disabled":!!o,disabled:!!o},r),d=Nt(Nt(u?{backgroundColor:"transparent",border:"none",padding:0,font:"inherit",color:"inherit",cursor:"pointer"}:{},s),o&&i);return e.createElement("button",Nt({},f,{"aria-label":f["aria-label"]||l,className:h,onClick:this.handleClick,ref:a,style:d}),n)},n.defaultProps={disabledStyle:{opacity:.6},openShareDialogOnClick:!0,resetButtonStyle:!0},n}(n),Bt=It,Rt=function(){return Rt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Rt.apply(this,arguments)};var Lt,qt,Ut=(Lt={color:"#3b5998",networkName:"facebook",path:"M34.1,47V33.3h4.6l0.7-5.3h-5.3v-3.4c0-1.5,0.4-2.6,2.6-2.6l2.8,0v-4.8c-0.5-0.1-2.2-0.2-4.1-0.2 c-4.1,0-6.9,2.5-6.9,7V28H24v5.3h4.6V47H34.1z"},(qt=function(t){var n=t.bgStyle,r=t.borderRadius,o=t.iconFillColor,i=t.round,a=t.size,l=Ct(t,["bgStyle","borderRadius","iconFillColor","round","size"]);return e.createElement("svg",St({viewBox:"0 0 64 64",width:a,height:a},l),i?e.createElement("circle",{cx:"32",cy:"32",r:"31",fill:Lt.color,style:n}):e.createElement("rect",{width:"64",height:"64",rx:r,ry:r,fill:Lt.color,style:n}),e.createElement("path",{d:Lt.path,fill:o}))}).defaultProps={bgStyle:{},borderRadius:0,iconFillColor:"white",size:64},qt),Gt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$t=function(t){function e(e){var n=t.call(this,e)||this;return n.name="AssertionError",n}return Gt(e,t),e}(Error);var Ht=function(t,n,o,i){function a(r,a){var l=o(r),c=Rt({},r);return Object.keys(l).forEach((function(t){delete c[t]})),e.createElement(Bt,Rt({},i,c,{forwardedRef:a,networkName:t,networkLink:n,opts:o(r)}))}return a.displayName="ShareButton-"+t,r(a)}("facebook",(function(t,e){var n,r,o=e.quote,i=e.hashtag;return function(t,e){if(!t)throw new $t(e)}(t,"facebook.url"),"https://www.facebook.com/sharer/sharer.php"+(n={u:t,quote:o,hashtag:i},r=Object.entries(n).filter((function(t){return null!=t[1]})).map((function(t){var e=t[0],n=t[1];return encodeURIComponent(e)+"="+encodeURIComponent(String(n))})),r.length>0?"?"+r.join("&"):"")}),(function(t){return{quote:t.quote,hashtag:t.hashtag}}),{windowWidth:550,windowHeight:400}),Wt=Ht,Vt=u((function(t){
2
2
  /*!
3
3
  * screenfull
4
4
  * v5.2.0 - 2021-11-03
@@ -0,0 +1 @@
1
+ var e=function(e,t,n,o){var r=new Blob(void 0!==o?[o,e]:[e],{type:n||"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),c=document.createElement("a");c.style.display="none",c.href=a,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(a)}),200)}};const t=e=>{let t="";if(Array.isArray(e)&&e.length>0){const n=Object.keys(e[0]);t+=`${n.toString()}\n`,e.forEach((e=>{n.forEach((n=>{t+=`${e[n]},`})),t+="\n"}))}else{const n=Object.keys(e);t+=`${n.toString()}\n`,n.forEach((n=>{t+=`${e[n]},`})),t+="\n"}return t},n=e=>{let t="";if(Array.isArray(e)&&e.length>0){const n=Object.keys(e[0]);e.forEach(((e,o)=>{t+=`(${o+1})\n`,n.forEach((n=>{t+=`${n}: ${e[n]}\n`})),t+="\n"}))}else{Object.keys(e).forEach((n=>{t+=`${n}: ${e[n]}\n`}))}return t},o=e=>{const{links:t,nodes:n}=e||{};if(t&&t.length>0){return t.map((e=>({From:n[e.source].name,To:n[e.target].name})))}return[]};export{t as a,e as f,n as j,o as s};
@@ -1 +1 @@
1
- import{_ as e}from"./_rollupPluginBabelHelpers-8dd26e1a.js";import n from"./snaDefine.js";var r=function(r){var a=r.mainNodes,i=r.snaData;if(!(a&&Array.isArray(a)&&i&&Array.isArray(i)))return console.log("ERROR: wrong input data.",a,i),{nodes:[],links:[]};var t=[];i.forEach((function(e){var r=e.sourceId,i=e.sourceType,o=e.source,d=e.sourceHide,u=e.targetId,s=e.targetType,f=e.target,c=e.targetHide;t.find((function(n){return n.name===e.source}))||t.push({name:o,id:r,type:-1!==a.indexOf(r)?n.mainNode:i,hasClick:-1===a.indexOf(r),hide:d||"0"}),t.find((function(n){return n.name===e.target}))||t.push({name:f,id:u,type:-1!==a.indexOf(u)?n.mainNode:s,hasClick:-1===a.indexOf(u),hide:c||"0"})}));var o=e(new Set(t.map((function(e){return JSON.stringify(e)})))).map((function(e){return JSON.parse(e)})),d=[];return i.forEach((function(e){var n=e.sourceId,r=e.targetId;d.push({target:o.findIndex((function(e){return r===e.id})),source:o.findIndex((function(e){return n===e.id}))})})),{nodes:o,links:d}};export{r as default};
1
+ import{_ as r}from"./_rollupPluginBabelHelpers-8dd26e1a.js";import e from"./snaDefine.js";var n=function(n){var i=n.mainNodes,t=n.snaData;if(!(i&&Array.isArray(i)&&t&&Array.isArray(t)))return console.log("ERROR: wrong input data.",i,t),{nodes:[],links:[]};var a=[];t.forEach((function(r){var n=r.sourceId,t=r.sourceType,d=r.source,o=r.sourceHide,u=r.targetId,s=r.targetType,f=r.target,c=r.targetHide;a.find((function(e){return e.id===r.sourceId}))||a.push({name:d,id:n,type:-1!==i.indexOf(n)?e.mainNode:t,hasClick:-1===i.indexOf(n),hide:o||"0"}),a.find((function(e){return e.id===r.targetId}))||a.push({name:f,id:u,type:-1!==i.indexOf(u)?e.mainNode:s,hasClick:-1===i.indexOf(u),hide:c||"0"})}));var d=r(new Set(a.map((function(r){return JSON.stringify(r)})))).map((function(r){return JSON.parse(r)})),o=[];return t.forEach((function(r){var e=r.sourceId,n=r.targetId;o.push({target:d.findIndex((function(r){return n===r.id})),source:d.findIndex((function(r){return e===r.id}))})})),{nodes:d,links:o}};export{n as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daoyi/nmtl-ui",
3
- "version": "2.0.1-beta.35",
3
+ "version": "2.0.1-beta.36",
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",
@@ -1 +0,0 @@
1
- var n=function(n,t,e,o){var a=new Blob(void 0!==o?[o,n]:[n],{type:e||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(a,t);else{var c=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),r=document.createElement("a");r.style.display="none",r.href=c,r.setAttribute("download",t),void 0===r.download&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),setTimeout((function(){document.body.removeChild(r),window.URL.revokeObjectURL(c)}),200)}},t=function(n){var t="";if(Array.isArray(n)&&n.length>0){var e=Object.keys(n[0]);t+="".concat(e.toString(),"\n"),n.forEach((function(n){e.forEach((function(e){t+="".concat(n[e],",")})),t+="\n"}))}else{var o=Object.keys(n);t+="".concat(o.toString(),"\n"),o.forEach((function(e){t+="".concat(n[e],",")})),t+="\n"}return t},e=function(n){var t="";if(Array.isArray(n)&&n.length>0){var e=Object.keys(n[0]);n.forEach((function(n,o){t+="(".concat(o+1,")\n"),e.forEach((function(e){t+="".concat(e,": ").concat(n[e],"\n")})),t+="\n"}))}else{Object.keys(n).forEach((function(e){t+="".concat(e,": ").concat(n[e],"\n")}))}return t},o=function(n){var t=n||{},e=t.links,o=t.nodes;return e&&e.length>0?e.map((function(n){return{From:o[n.source].name,To:o[n.target].name}})):[]};export{t as a,n as f,e as j,o as s};