Cube('pandav:/com/tableList/1.19.9/table.jsx',['pandav:/npm/react/16.13.1','pandav:/npm/lodash/4.6.1','pandav:/com/tableList/1.19.9/utils','pandav:/com/tableList/1.19.9/animate','pandav:/npm/react-motion/0.5.2'],function(a,b,c){function d(a){"@babel/helpers - typeof";return d='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},d(a)}function e(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function f(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,h(c.key),c)}function g(a,b,c){return b&&f(a.prototype,b),c&&f(a,c),Object.defineProperty(a,'prototype',{writable:!1}),a}function h(a){var b=i(a,'string');return'symbol'===d(b)?b:b+''}function i(a,b){if('object'!==d(a)||null===a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var e=c.call(a,b||'default');if('object'!==d(e))return e;throw new TypeError('@@toPrimitive must return a primitive value.')}return('string'===b?String:Number)(a)}function j(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function');a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,'prototype',{writable:!1}),b&&k(a,b)}function k(a,b){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function c(a,b){return a.__proto__=b,a},k(a,b)}function l(a){var b=o();return function c(){var d,e=p(a);if(b){var f=p(this).constructor;d=Reflect.construct(e,arguments,f)}else d=e.apply(this,arguments);return m(this,d)}}function m(a,b){if(b&&('object'===d(b)||'function'==typeof b))return b;if(void 0!==b)throw new TypeError('Derived constructors may only return object or undefined');return n(a)}function n(a){if(void 0===a)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return a}function o(){if('undefined'==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if('function'==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}function p(a){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function b(a){return a.__proto__||Object.getPrototypeOf(a)},p(a)}function q(a){for(var b=arguments,c=function c(){var e=null==b[d]?{}:b[d],f=Object.keys(e);'function'==typeof Object.getOwnPropertySymbols&&(f=f.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),f.forEach(function(b){y(a,b,e[b])})},d=1;d<arguments.length;d++)c();return a}function r(a,b){return a&&b?a&&a.xs.find(function(a){return a.x==b.toString()})?a.color:null:null}var s=c('pandav:/npm/react/16.13.1'),t=c('pandav:/npm/lodash/4.6.1'),u=c('pandav:/com/tableList/1.19.9/utils'),v=c('pandav:/com/tableList/1.19.9/animate'),w=c('pandav:/npm/react-motion/0.5.2'),x={"align-items-center":'index-module_align-items-center',"backface-visibility-hidden":'index-module_backface-visibility-hidden',"cursor-pointer":'index-module_cursor-pointer',flex:'index-module_flex',"flex-direction-column":'index-module_flex-direction-column',"full-border-radius":'index-module_full-border-radius',"full-height":'index-module_full-height',"full-width":'index-module_full-width',hideScroll:'index-module_hideScroll',"inline-block":'index-module_inline-block',"justify-content-center":'index-module_justify-content-center',ovh:'index-module_ovh',pa:'index-module_pa',pl10:'index-module_pl10',pr:'index-module_pr',reset:'index-module_reset',"text-align-center":'index-module_text-align-center',"text-overflow-break-word":'index-module_text-overflow-break-word',"text-overflow-ellipsis":'index-module_text-overflow-ellipsis',"text-overflow-marquee":'index-module_text-overflow-marquee',font_family:'iconfont-module_font_family',"icon-half-heart":'iconfont-module_icon-half-heart',"icon-half-square":'iconfont-module_icon-half-square',"icon-heart":'iconfont-module_icon-heart',"icon-square":'iconfont-module_icon-square'},y=function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a},z=function b(a){var c=a.chart,d=a.component,e=a.lineHeight,f=a.marginBottom,g=a.highlightShow,h=a.width,i=c.global,j=c.animation,k=d.col,l=d.tableHead,m=k.rowStyles,n=i.size,o=i.border,p=j.attrs,q=Object.values(m),r=u.getBackground(p.highlight.background);return s.createElement('ul',{className:x.pa+' '+x['full-width'],style:{top:l.show?l.lineHeight:0,left:0,zIndex:0,width:h}},function(a,b,c,d,e,f,g){for(var h=[],j=0;j<a;j++)h.push(s.createElement('li',{className:x.pr,style:{borderRadius:b[j]?b[j].borderRadius:'none',background:b[j]&&f&&g.lineNumber===j+1?f:u.getBackground(b[j]&&b[j].background),display:'block',marginBottom:j<=a-2?d:0,height:e+1,border:c.show&&'1px solid '+c.color,marginTop:-1,boxSizing:'border-box'},key:j}));return h}(n,q,o,f,e,r,p.highlight))},A=function b(a){var c=a.component,d=void 0===c?{}:c,e=a.rowSetting,f=void 0===e?{}:e,g=f.rows,h=d.numberRow,i=void 0===h?{}:h,j=d.tableHead,k=void 0===j?{}:j,l=k.background,m=k.lineHeight,n=k.text,o=k.textAlign,p=i.title,r=i.style,t=r.width,v=r.justifyContent,w=r.marginLeft;return s.createElement('div',{className:'list-head '+x.flex,style:q(q({},n),{},{background:u.getBackground(l),height:m,paddingLeft:'10px'})},!!i.show&&s.createElement('span',{className:x.flex+' '+x['align-items-center'],style:{width:t+10,justifyContent:v,marginLeft:w}},p),g.sort(function(c,a){return c.order-a.order}).map(function(a,b){return s.createElement('span',{style:{display:'flex',flexShrink:0,marginLeft:a.marginLeft,width:a.width,justifyContent:o,alignItems:'center'},key:b},s.createElement('span',{style:{textAlign:'center'}},a.name))}))},B=function(a){function b(a){var d;return e(this,b),d=c.call(this,a),d.state={offsetWidth:0,translateX:0,duration:a.duration},d}j(b,a);var c=l(b);return g(b,[{key:'componentDidMount',value:function a(){this._measureText()}},{key:'componentDidUpdate',value:function d(a,b,c){this.dom.offsetWidth!==this.state.offsetWidth&&this._measureText(),this.props.textOverflow!==a.textOverflow&&'text-overflow-marquee'==this.props.textOverflow&&this._measureText()}},{key:'_measureText',value:function a(){this.cleanTween();var b=this.dom,c=this;if(b){this.dom.style.transform='translate3d(0, 0, 0)';var d=b.offsetWidth;if('text-overflow-marquee'===this.props.textOverflow){var e=d-(this.props.containerWidth||b.parentElement.offsetWidth);this.setState({translateX:e,offsetWidth:d},function(){0<e&&c.run()}),0==e&&(this._tid=setTimeout(this._measureText.bind(this),1e3))}}}},{key:'run',value:function a(){var b=this.state,c=b.duration,d=b.offsetWidth,e=this.dom;this.cleanTween(),this.tween=v.tween({loop:1/0,from:{x:0},to:{x:-d/2-5},ease:v.easing.linear,duration:1e3*c}).start({update:function b(a){var c=a.x;e.style.transform='translate3d('+c+'px, 0, 0)'}})}},{key:'UNSAFE_componentWillReceiveProps',value:function c(a,b){this.state.duration!==a.duration&&this.setState({duration:a.duration},this._measureText)}},{key:'render',value:function a(){var b=this.props,c=b.style,d=b.children,e=b.textOverflow,f=b.title,g=this.state.translateX,h=this;return s.createElement(s.Fragment,null,c.percentBg&&c.percentBg.show&&c.percentBg.width&&s.createElement('span',{style:{position:'absolute',left:0,zIndex:'-1',display:'inline-block',background:c.percentBg.color,width:''.concat(c.percentBg.width,'%'),height:'100%'}}),s.createElement('span',{className:x.pr+' '+x['align-items-center']+' '+x[e],ref:function b(a){return h.dom=a},style:q(q({},c),{},{left:'0',top:'0',color:this.props.__color__?this.props.__color__:c.color}),title:f||null},s.createElement('div',{className:x[e],style:{height:c.wrapLock?1.55*c.fontSize+'px':'auto',transform:'translate('.concat(c.left,'px, ').concat(c.top,'px)')}},s.createElement('span',{style:{paddingLeft:''.concat(c.left,'px'),display:'inline-flex',alignItems:'center',justifyContent:'center'}},d),'text-overflow-marquee'===e&&0<g&&s.createElement('span',{style:{paddingLeft:10}},d))))}},{key:'componentWillUnmount',value:function a(){this.cleanTween(),this.state=null,this.dom=null,this._tid&&window.clearTimeout(this._tid)}},{key:'cleanTween',value:function a(){this.tween&&(this.tween.stop(),this.tween=null)}}]),b}(s.Component),C=function(a){function b(a){var d;return e(this,b),d=c.call(this,a),d.state={offsetWidth:[]},d.dom=[],d.setDom=function(){},d}j(b,a);var c=l(b);return g(b,[{key:'componentDidMount',value:function a(){this._measureText()}},{key:'componentDidUpdate',value:function d(a,b,c){t.isEqual(this.state.offsetWidth,b.offsetWidth)||this._measureText()}},{key:'_measureText',value:function a(){var b=this.dom;if(b&&0<b.length){var c=Object.values(b).map(function(a){return a.offsetWidth});this.setState({offsetWidth:c})}}},{key:'getNumeral',value:function c(a,b){var d=a.style,e=a.startNumber+ +b-1,f=d.width,g=d.text,h=d.numeralStyle,i=d.justifyContent,j=d.marginLeft,k=d.shadow,l=h.normal,m=h.specify,n=l.length,o=length&&b%n,p=m.find(function(a){return a.index==e});p||(p=l[o]);var t=p&&'custom'===p.background.fillType,v=p&&q(q(q({},p.size),p.fontStyle),{},{lineHeight:p.size.height+'px'}),w=p&&u.getBackground(p.background);return s.createElement('span',{className:x.flex+' '+x['align-items-center'],style:q(q({width:f,justifyContent:i,marginLeft:j},g),{},{textShadow:k.show?u.getShadow(k):'none',color:r(this.props.itemHighlight,this.props.data.index)||g.color})},s.createElement('i',{className:x['text-align-center']+' '+x['inline-block']+' '+(!t&&x['full-border-radius']),style:q(q({},v),{},{background:w,fontStyle:'normal'})},s.createElement('span',{className:x['inline-block'],style:{transform:'translate3d('+p.position.x+'px, '+p.position.y+'px, 0px)'}},e)))}},{key:'getBlockList',value:function b(a){for(var c=Math.floor,d=c(+a/20),e=+a%20,f=[],g=0;g<d;g++)f.push('');return 10<=e&&f.push('half-'),5<f.length&&(f=f.slice(0,5)),f}},{key:'drawHeart',value:function c(a,b){var d=b.style,e=b.color,f=e.from,g=e.to,h=d3.interpolateRgb(f,g);return this.getBlockList(a).map(function(a,b){return s.createElement('i',{key:b,className:x.font_family+' '+x['icon-'+a+'heart'],style:Object.assign({color:h(b/5)},d)})})}},{key:'drawSquare',value:function c(a,b){var d=b.style,e=b.color,f=e.from,g=e.to,h=d3.interpolateRgb(f,g);return this.getBlockList(a).map(function(a,b){return s.createElement('i',{key:b,className:x.font_family+' '+x['icon-'+a+'square'],style:Object.assign({color:h(b/5)},d)})})}},{key:'drawBar',value:function c(a,b){var d=b.color,e=b.size,f=e.width,g=e.height,h=d.from,i=d.to,j=d3.interpolateRgb(h,i);return s.createElement('i',{style:{display:'inline-block',background:'linear-gradient(90deg, '+h+' 0%, '+j(a/100)+' '+a+'%)',width:a/100*f,height:g,borderRadius:g}})}},{key:'drawImage',value:function d(a,b,c){var e=b?{maskImage:'url('+b+')',WebkitMaskImage:'url('+b+')',maskSize:'cover',WebkitMaskSize:'cover'}:{};return s.createElement('img',{src:a,style:q(q({},e),c)})}},{key:'drawState',value:function c(a,b){var d=a.filter(function(a){return a.value==b})[0]||{},e=d.url,f=d.size;return e?s.createElement('img',{src:e,style:Object.assign({},f)}):null}},{key:'transformTextObj',value:function c(a,b){if(null==a)return{};var d=function(a,b){if(null==a)return{};for(var c,d={},e=Object.keys(a),f=0;f<e.length;f++)c=e[f],0<=b.indexOf(c)||(d[c]=e[c]);return d}(a,b);if(Object.getOwnPropertySymbols)for(var e,f=Object.getOwnPropertySymbols(a),g=0;g<f.length;g++)e=f[g],0<=b.indexOf(e)||Object.prototype.propertyIsEnumerable.call(a,e)&&(d[e]=a[e]);return d}},{key:'calculateTextColor',value:function c(a,b){var d=a.isColorRange,e=a.colorRange,f=a.singleColor,g=a.sameColor,h=a.colorSeries,j=t.omit(a,['isColorRange','colorRange','singleColor','sameColor','colorSeries']),k=g;if(d)for(var l in e)parseFloat(b)>=+e[l].min&&parseFloat(b)<+e[l].max&&(k=e[l].colors);else if('different'===f)for(var m=0;m<h.length;m++)h[m].colorName==b&&(k=h[m].colorValue);return q(q({},j),{},{color:k})}},{key:'getValue',value:function d(a,b,c){var e=a.type,f=a.progressType,g=a.mask,h=a.size,i=a.states,j=a.split,k=a.progressColor;switch(e){case'progress':if(isNaN(+b))return b;var l=q(q({},c),{},{color:k});switch(f){case'heart':return this.drawHeart(b,l);case'square':return this.drawSquare(b,l);case'bar':return this.drawBar(b,q(q({},l),{},{size:h}))}case'image':return this.drawImage(b,g,h);case'state':return this.drawState(i,b);case'number':return isNaN(+b)?b:j?function(a){for(var b=a+'',c=b.split('.'),d=c[0],e=1<c.length?''.concat('.').concat(c[1]):'',f=/(\d+)(\d{3})/;f.test(d);)d=d.replace(f,'$1'.concat(',','$2'));return''.concat(0>b?'-':'').concat(d).concat(e)}(b):b;default:return b}}},{key:'render',value:function a(){var b=this,c=this.props,d=c.numberRow,e=c.selectedRowConfig,f=c.selectedRows,g=c.rowSettingArr,h=c.fixedColor,i=c.data,j=c.lineHeight,k=c.lineStyle,l=c.numberColumnMax,m=c.itemHighlight,n=e.color,o=e.width,p=e.shadow,v=e.iconColor,w=this.state.offsetWidth,y=r(m,i.index),z=void 0!==f[i.index];return s.createElement('div',{className:x.flex+' '+x['full-height'],style:{position:'relative',boxShadow:z?'inset 0px 0px '.concat(p.width,'px ').concat(p.color):'',border:z?''.concat(o,'px solid ').concat(n):''.concat(o,'px solid transparent'),paddingLeft:'-10px',marginLeft:'10px'}},s.createElement('span',{style:{position:'absolute',height:j+1+'px',left:'-10px',top:'-1px',borderRight:z?''.concat(3,'px solid ',v):''}}),d.show&&this.getNumeral(d,i.index),g.map(function(a,c){var d=a.width,e=a.marginLeft,f=a.textAlign,g=a.offset,j=a.wrapLock,m=a.value,n=a.textOverflow,o=a.duration,p=a.text,r=a.suffix,v=void 0===r?{}:r,z=a.subTitle,A=void 0===z?{}:z,C=a.border,D=void 0===C?{}:C,E=a.shadow,F=a.percentBg,G=void 0===F?{}:F,H=a.hoverTitle,I=a.truthValue,J=q(q(q(q({},b.calculateTextColor(p,i[m])),k),g),{},{wrapLock:j,display:'flex',alignItems:'center',textAlign:f,justifyContent:'left'===f?'flex-start':'center'===f?'center':'flex-end'}),K=b.getValue(a,i[m],J);return 1==v.keepStyle&&(v.color=p.sameColor),G.show&&l[m]&&(J.percentBg=G,J.percentBg.max=J.percentBg.max?J.percentBg.max:l[m],J.percentBg.width=100*K/J.percentBg.max),d?s.createElement('span',{ref:function d(a){b.dom||(b.dom=[]),b.dom[c]=a},className:x.flex+' '+x.pr+' '+x.ovh+' '+x['flex-direction-column']+' '+x['justify-content-center'],style:{textShadow:E&&E.show?u.getShadow(E):'none',flexShrink:0,textAlign:f,marginLeft:e,overflow:'hidden',flexBasis:d,border:D.show?D.borderWidth+'px solid '+(h||D.borderColor):'none',borderRadius:D.show?D.borderRadius:0,display:'flex'},key:c},s.createElement(B,{textOverflow:n,duration:o,style:J,containerWidth:b.state.offsetWidth[c],__color__:y||b.props.__color__,title:H?K:null},v.show?s.createElement('span',{style:{flex:1}},K):K,I&&I.show&&s.createElement('span',{style:Object.assign({fontSize:I.fontSize,color:y||(b.props.__color__?b.props.__color__:I.color),fontFamily:I.fontFamily,display:'inline-block'},I.offset?{transform:'translate('.concat(I.offset.left,'px, ').concat(I.offset.top,'px)')}:{})},i[m]),v.show&&s.createElement('span',{style:Object.assign({fontSize:v.fontSize,fontFamily:v.font.fontFamily,fontWeight:v.font.fontWeight,fontStyle:v.font.italic,letterSpacing:v.font.letterSpacing+'px',color:y||(b.props.__color__?b.props.__color__:v.color),textShadow:v.shadow.show?u.getShadow(v.shadow):'none',display:'inline-block'},v.offset?{transform:'translate('.concat(v.offset.left,'px, ').concat(v.offset.top,'px)')}:{})},v.content)),A.show?s.createElement(B,{itemHighlight:b.props.itemHighlight,textOverflow:n,duration:t,style:q(q({},J),{},{fontSize:A.fontSize,color:b.props.__color__?b.props.__color__:A.color}),containerWidth:w[c],__color__:b.props.__color__}):null):null}))}}]),b}(s.Component),D=function(a){function b(a){var d;return e(this,b),d=c.call(this,a),console.log(a),d.state={selectedRows:[void 0].concat(Array.from(a.data.map(function(a){if(a.isSelected)return a}))),data:[]},d.fixedData=[],d.activeData=[],d.initData(d.props),d.willEnter=d.willEnter.bind(n(d)),d.willLeave=d.willLeave.bind(n(d)),d.onClick=d.onClick.bind(n(d)),d.emitEvents=d.emitEvents.bind(n(d)),d.randomNodes=null,d}j(b,a);var c=l(b);return g(b,[{key:'tableInterval',value:function c(a,b){this.tid&&(clearTimeout(this.tid),this.tid=null),this.loop&&document.removeEventListener('visibilitychange',this.loop);var d=this,e=function c(){'visible'===document.visibilityState?d.tid=setTimeout(function(){a.call(),c()},b):d.tid&&clearTimeout(d.tid)};document.addEventListener('visibilitychange',this.loop),e()}},{key:'emitEvents',value:function a(){}},{key:'emitCallback',value:function a(){}},{key:'getFieldFixed',value:function c(a,b){for(var d=[],e=[],f=0;f<a.length;f++){for(var g=a[f],h=!1,k=0;k<b.length;k++){var l=b[k].value,m=b[k].fixed,n=m.value,o=m.show;if(o&&g[l]===n){d.push(g),h=!0;break}}h||e.push(g)}return{fixed:d,active:e}}},{key:'initData',value:function b(a){var c=a.chart,d=a.data,e=a.rowSetting,f=c.animation,g=c.global.size;if(0>g||0>=d.length)return this.fixedData=[],void(this.activeData=[]);var h=f.attrs,i=h.mode,j=h.fixedCount,k=e.rows,l=this.getFieldFixed(d,k),m=l.fixed,n=l.active;if(0>j&&(j=0),m.length>=g)return this.fixedData=m.slice(0,g),this.activeData=[],void this.topFixedEmitEvents(f.attrs.callbackSwitch);if('total'===i){if(m.length>=j)return this.fixedData=Array.from(m),this.activeData=n.slice(0),void this.topFixedEmitEvents(f.attrs.callbackSwitch);j-=m.length}else'single'===i&&(j=n.length<=g?g:0);this.fixedData=[].concat(Array.from(m),Array.from(n.slice(0,j))),this.activeData=n.slice(j),void this.topFixedEmitEvents(f.attrs.callbackSwitch)}},{key:'topFixedEmitEvents',value:function b(a){this.fixedData&&0<this.fixedData.length&&a&&this.getRelativeData(this.fixedData[0],this.fixedData),this.fixedData&&0<this.fixedData.length&&this.props.emitEvent&&this.props.emitEvent('topFixed')}},{key:'willEnter',value:function a(){var b=this.props.chart||{},c=b.global.size,d=b.animation.attrs,e=d.animateMode,f=d.mode;return'total'===f?(0,'flop'===e?{t:-180,opacity:0}:{t:c,opacity:0}):'single'===f?{t:1,opacity:0}:void 0}},{key:'willLeave',value:function a(){var b=this.props.chart||{},c=b.global.size,d=b.animation.attrs,e=d.animateMode,f=d.mode;return'total'===f?'flop'===e?{t:w.spring(90),opacity:0}:{t:w.spring(-1*c),opacity:w.spring(0)}:'single'===f?{t:1,opacity:w.spring(0)}:void 0}},{key:'componentDidMount',value:function a(){var b=this.props;this.setAnimateData(b),this.intervalHandler(b),this.initEvents()}},{key:'intervalHandler',value:function b(a){var c=this;this.clearInterval();var d=a.chart,e=d.animation,f=e.show,g=e.attrs,h=g.interval;f&&this.activeData&&0<this.activeData.length&&this.tableInterval(function(){c.setAnimateData(a)},1e3*h)}},{key:'clearInterval',value:function a(){this.loop&&document.removeEventListener('visibilitychange',this.loop),this.tid&&(clearTimeout(this.tid),this.tid=null)}},{key:'clearSelectRow',value:function a(){}},{key:'setAnimateData',value:function b(a){var c=this,d=a.chart,e=d.animation,f=d.global,g=f.size,h=e.attrs,i=h.connectMode,j=h.mode,k=this.activeData,l=this.fixedData.length,m=[];if(e.show)if(!(t.isArray(k)&&0<k.length))this.setState({data:[]});else if('total'===j&&(m=this.activeData.splice(0,g-l),this.setState({data:m},function(){var a;if((a=c.activeData).push.apply(a,Array.from(m)),f.firstCallback){var b=c.props,d=b.id,e=b.onRelative;e&&e(d,Object.assign({},f.firstCallback,c.state.data[0]))}})),'single'===j){var n=this.activeData.slice(0,g-l);'circle'===i?this.setState({data:[{index:'-1'}].concat(Array.from(n))},function(){var a,b=c.activeData.splice(0,1);if((a=c.activeData).push.apply(a,Array.from(b)),f.firstCallback){var d=c.props,e=d.id,g=d.onRelative;g&&g(e,Object.assign({},f.firstCallback,c.state.data[1]))}}):1<n.length&&this.activeData.length!==n[n.length-2].index?this.setState({data:[{index:'-1'}].concat(Array.from(n))},function(){var a,b=c.activeData.splice(0,1);(a=c.activeData).push.apply(a,Array.from(b))}):(this.setState({data:[{index:'-1'}].concat(Array.from(this.props.data.slice(0,g-l)))}),this.activeData=Array.from(this.props.data))}}},{key:'shouldComponentUpdate',value:function d(a,b,c){return'hidden'!==document.visibilityState}},{key:'componentWillReceiveProps',value:function c(a,b){var d=this.props.chart,e=d.global,f=d.animation;'hidden'!==document.visibilityState&&(!t.isEqual(this.props.data,a.data)&&(this.clearSelectRow(a.data),this.props.emitEvent&&this.props.emitEvent('dataRefresh',a.data)),t.isEqual(e,a.chart.global)&&t.isEqual(f,a.chart.animation)&&t.isEqual(this.props.data,a.data)||(this.initData(a),this.setAnimateData(a),this.intervalHandler(a)))}},{key:'getDefaultStyles',value:function c(a,b){return b.map(function(b){return{data:b,style:{t:0,opacity:0},key:('total'===a?Math.random():b.index)+''}})}},{key:'getStyles',value:function e(a,b,c,d){return b.map(function(e,f){var g=c[('single'===a?f>b.length-1?b.length-2:f-1:f)%b.length+d],h=g?g.opacity:1;return{data:e,style:{t:w.spring(0),opacity:w.spring(+h)},key:('total'===a?Math.random():e.index)+''}})}},{key:'getLinkFields',value:function b(a){return a&&0<a.length&&a.map(function(a){return a.text})}},{key:'getLinkFieldValue',value:function c(a,b){return a.reduce(function(c,d,e){return'undefined'==typeof b[d]?c:c+d+'='+b[d]+(e===a.length-1?'':'&')},'')}},{key:'openPage',value:function b(a){var c=a.splice('&'),d=!1;return c.forEach(function(a){a.split('=')[1]&&(d=!0)}),d}},{key:'onClick',value:function b(a){var c=this.props,d=c.data,e=c.selectmode,f=a.currentTarget.dataset.index,g=this.state.selectedRows,h=d.filter(function(a){return f==a.index});'not'===e?this.setState({selectedRows:[]}):(null==g[h[0].index]?('single'==e&&(g=[]),g[h[0].index]=h[0]):g[h[0].index]=void 0,this.setState({selectedRows:g}),this.link(h[0]),this.props.emitEvent&&this.props.emitEvent('click',g),console.log('selectedRows',g))}},{key:'initEvents',value:function a(){}},{key:'autoHide',value:function b(a){}},{key:'emitRemoteCallbacks',value:function a(){}},{key:'getRelativeData',value:function a(){}},{key:'link',value:function b(a){var b=this.props.chart.link,c=b.show,d=b.domain,e=b.fields,f=b.blank;if(!c)return!1;var g=c&&this.getLinkFields(e),h=g&&this.getLinkFieldValue(g,a),i=h?d+h:d;f?window.open(i):window.location.href=i}},{key:'getNumeralBgs',value:function b(a){for(var c,d=[],e=[],f=0;f<a.length;f++)(c=a[f]).index?d.push(c):e.push(c);return{specify:d,normal:e}}},{key:'createWebKitScroll',value:function b(a){return a.turnOn?'\n            .activeCol::-webkit-scrollbar {\n              display:'.concat(a.showScrollBar?'block':'none','\n              width: ').concat(a.bgWidth,'px;\n              height:').concat(a.bgWidth,'px;\n            }\n            .activeCol::-webkit-scrollbar-thumb {\n              background: ').concat(a.thumb,';\n              border:').concat((.5-a.length/2)*a.bgWidth,'px solid transparent;\n              border-radius:').concat(a.thumbRadius*a.bgWidth*a.length,'px;\n              background-clip:content-box;\n            }\n            .activeCol::-webkit-scrollbar-track {\n              background-color: ').concat(a.track,';\n              border-radius:').concat(a.trackRadius*a.bgWidth/2,'px;\n            }\n        '):null}},{key:'render',value:function a(){var b=this,c=this.props,d=c.highlightShow,e=c.component,f=void 0===e?{}:e,g=c.rowSetting,h=void 0===g?{}:g,i=c.chart,j=void 0===i?{}:i,k=c.lineHeight,l=c.numHeight,m=c.marginBottom,n=c.padding,o=c.scrollbar,p=c.numberColumnMax,r=c.itemHighlight,t=c.data,v=j.global,y=v.size,z=v.border,A=v.selectedRowConfig,B=j.animation.attrs,D=B.mode,E=B.backgroundFixed,F=B.fixedBackgroundImage,G=B.animateMode,H=B.highlight,I=H.lineNumber,J=H.background,K=h.rows,L=f.numberRow,M=f.col.rowStyles,N=K.filter(function(a){return!!a.fixed.show}),O=this.getNumeralBgs(L.style.numeralStyle),P=O.specify,Q=O.normal,R=this,S={};return s.createElement('div',{className:x.pr+' '+x.ovh,style:{height:l*y,padding:n}},s.createElement('div',null,s.createElement('ul',{className:x.reset,style:{height:(k+m)*this.fixedData.length}},this.fixedData&&0<this.fixedData.length&&this.fixedData.map(function(a,c){var d=+a.index,e=M[d],f=N.find(function(b){return a[b.value]==a.fixed.value}),g=f&&f.fixed.color;return s.createElement('li',{className:x['full-width']+' '+x['cursor-pointer'],onClick:b.onClick.bind(b),key:d,"data-index":d,style:{background:a._backgroundColor_?a._backgroundColor_:F?'url('.concat(F,')'):E?'transparent':M[d%M.length]&&u.getBackground(M[d%M.length].background),backgroundSize:'100% 100%',border:E||!z.show?'none':'1px solid '+z.color,height:k+1,marginBottom:m-1+'px',transform:'translate3d('+(e?e.offset:0)+'px, 0, 0)',opacity:e?e.opacity:1,color:a.__color__?a.__color__:g||'inherit'}},s.createElement(C,{itemHighlight:r,numberRow:q(q({},L),{},{style:q(q({},L.style),{},{numeralStyle:{specify:P,normal:Q}})}),__color__:a.__color__,selectedRowConfig:A,selectedRows:b.state.selectedRows,rowSettingArr:K,fixedColor:g,data:a,lineHeight:k,lineStyle:g?{color:'inherit'}:'',numberColumnMax:p}))})),!!(this.activeData&&this.activeData.length&&!j.animation.show&&0<(y-this.fixedData.length)*(k+m))&&s.createElement('div',{style:{height:(y-this.fixedData.length)*(k+m),overflow:'hidden '.concat(this.activeData.length>y-this.fixedData.length?'scroll':'hidden')},className:'activeCol '+x.hideScroll},s.createElement('style',null,this.createWebKitScroll({thumb:o.thumb,length:o.length,track:o.track,bgWidth:o.bgWidth,thumbRadius:o.thumbRadius,trackRadius:o.trackRadius,showScrollBar:o.showScrollBar,turnOn:!1})),s.createElement('ul',{style:{}},this.activeData&&0<this.activeData.length&&this.activeData.map(function(a,c){var d=a.index,e=b.props.data[d%b.props.data.length],f=N.find(function(b){return a[b.value]==b.fixed.value}),g=f&&f.fixed.color;return s.createElement('li',{className:x['full-width']+' '+x['cursor-pointer'],onClick:b.onClick.bind(b),key:d,"data-index":d,style:{background:a._backgroundColor_?a._backgroundColor_:E?'transparent':t[d%$]&&u.getBackground(t[d%t.length].background),backgroundSize:'100% 100%',border:E||!z.show?'none':'1px solid '+z.color,height:k+1,marginBottom:m-1+'px',transform:'translate3d('+(e?e.offset:0)+'px, 0, 0)',opacity:e?e.opacity:1,color:a.__color__?a.__color__:g||'inherit'}},s.createElement(C,{itemHighlight:r,numberRow:q(q({},L),{},{style:q(q({},L.style),{},{numeralStyle:{specify:P,normal:Q}})}),__color__:a.__color__,selectedRowConfig:A,selectedRows:b.state.selectedRows,rowSettingArr:K,fixedColor:g,data:a,lineHeight:k,lineStyle:g?{color:'inherit'}:'',numberColumnMax:p}))}))),j.animation.show&&this.state.data&&0<this.state.data.length&&s.createElement(w.TransitionMotion,{willLeave:this.willLeave.bind(this),willEnter:this.willEnter.bind(this),defaultStyles:this.getDefaultStyles(D,this.state.data,M),styles:this.getStyles(D,this.state.data,M,this.fixedData?this.fixedData.length:0)},function(a){return s.createElement('ul',{className:x.pr+' '+x['full-width'],style:{height:'total'===D?l*(R.activeData?R.activeData.length:0):l*((R.activeData?R.activeData.length:0)-1)}},R.randomNodes=a.map(function(b,c){var e=M[('single'===D?c>(R.activeData?R.activeData.length:0)-1?(R.activeData?R.activeData.length:0)-2:c-1:c)%(R.activeData?R.activeData.length:0)+(R.fixedData?R.fixedData.length:0)],f=e?e.offset:0;'total'===D?'up'===G?S={top:(k+m)*(c%(y-(R.fixedData?R.fixedData.length:0))),transform:'translate3d('+f+'px, '+(k+m)*b.style.t+'px, 0px)'}:'flop'===G&&(S={top:c%(y-(R.fixedData?R.fixedData.length:0))*(k+m),transform:'rotateX('+b.style.t+'deg) translate3d('+f+'px, 0, 0)'}):'single'===D&&(S={transition:'all 500ms linear',transform:'translate3d('+f+'px,'+(c-1)*(k+m)+'px, 0px)',opacity:0===c?0:b.style.opacity});var g=d&&c===I&&u.getBackground(J),h=M['single'===D?parseInt(b.key)%M.length:(c%(R.activeData?R.activeData.length:0)+(R.fixedData?R.fixedData.length:0))%M.length];return s.createElement('li',{className:x['full-width']+' '+x.pa+' '+x['cursor-pointer']+' '+x['backface-visibility-hidden'],onClick:R.onClick.bind(R),key:b.key,"data-index":b.data.index,style:Object.assign({borderRadius:M[(c+1)%M.length].borderRadius,background:E?'transparent':g||h&&u.getBackground(h.background),border:E||!z.show?'none':'1px solid '+z.color,height:c===a.length-1?k:k+1,marginBottom:(c===a.length-1?0:-1)+'px',opacity:b.style.opacity},S)},s.createElement(C,{itemHighlight:r,numberRow:q(q({},L),{},{style:q(q({},L.style),{},{numeralStyle:{specify:P,normal:Q}})}),__color__:b.data.__color__,selectedRowConfig:A,selectedRows:R.state.selectedRows,rowSettingArr:K,fixedColor:'',data:b.data,lineHeight:k,lineStyle:d&&c===I&&H.style,numberColumnMax:p}))}))})))}}]),b}(s.Component),E=function(a){function b(){return e(this,b),c.apply(this,arguments)}j(b,a);var c=l(b);return g(b,[{key:'onVisibilityChange',value:function a(){'visible'==document.visibilityState&&this.forceUpdate()}},{key:'shouldComponentUpdate',value:function d(a,b,c){return'hidden'!==document.visibilityState&&(!t.isEqual(this.props.data,a.data)||!t.isEqual(this.props.config,a.config))||!t.isEqual(this.props.width,a.width)||!t.isEqual(this.props.height,a.height)}},{key:'getPadding',value:function b(a){var c=Math.abs,d=a.rowStyles,e=d,f=e.length,g=f&&t.minBy(e,function(a){return a.offset}),h=f&&t.maxBy(e,function(a){return a.offset}),i=h&&h.offset&&0<=h.offset?h.offset:0;return{paddingLeft:g&&g.offset&&0>g.offset?c(g.offset):0,paddingRight:i}}},{key:'createWebKitScroll',value:function b(a){return a.turnOn?'\n        .___tablist::-webkit-scrollbar {\n          display:'.concat(a.showScrollBar?'block':'none','\n          width: ').concat(a.bgWidth,'px;\n          height:').concat(a.bgWidth,'px;\n        }\n        .___tablist::-webkit-scrollbar-thumb {\n          background: ').concat(a.thumb,';\n          border:').concat((.5-a.length/2)*a.bgWidth,'px solid transparent;\n          border-radius:').concat(a.thumbRadius*a.bgWidth*a.length,'px;\n          background-clip:content-box;\n        }\n        .___tablist::-webkit-scrollbar-track {\n          background-color: ').concat(a.track,';\n          border-radius:').concat(a.trackRadius*a.bgWidth/2,'px;\n        }\n      '):null}},{key:'render',value:function a(){var b=this,c=this.props,d=c.config,e=c.data,f=d.chart,g=void 0===f?{}:f,h=d.component,i=void 0===h?{}:h,j=g.animation,k=g.select,l=g.global,m=void 0===l?{}:l,n=i.tableHead,o=void 0===n?{}:n,p=i.col,r=i.numberRow,t=m.size,u=m.marginBottom,v=m.scroll,w=j.attrs,x=w.backgroundFixed,y=w.highlight,B=w.mode,C=o.show,E=o.lineHeight,F=C?E:0,G=this.getPadding(p),H=G.paddingLeft,I=G.paddingRight,J=(this.props.height-F)/t,K=u>=J?0:u,L=(this.props.height-F-K*(t-1))/t,M=y.show&&'single'===B,N=v.show,O=v.showScrollBar,P=v.bgWidth,Q=v.trackRadius,R=v.thumbRadius,S=v.length,T=v.track,U=void 0===T?'transparent':T,V=v.thumb,W=void 0===V?'rgba(255, 255, 255, .5)':V;S=void 0===S?6:S;var X=0;if(d&&d.rowSetting)for(var Y in d.rowSetting.rows)X+=d.rowSetting.rows[Y].width,X+=d.rowSetting.rows[Y].marginLeft;r.show&&(X+=r.style.width,X+=r.style.marginLeft);var Z=k.show?k.type.mode:'not';return this.numberColumnMax=e.reduce(function(a,b){return Object.keys(b).map(function(c){var d=Math.max;'number'==typeof b[c]&&isFinite(b[c])&&(a[c]?a[c]=d(a[c],b[c]):a[c]=b[c])}),a},{}),s.createElement('div',{ref:function c(a){return b.tableList=a},className:'___tablist',style:q(q({},{width:this.props.width,height:this.props.height}),{},{zIndex:0,position:'relative',overflow:N?'scroll hidden':'hidden'})},s.createElement('style',null,this.createWebKitScroll({turnOn:N,thumb:W,length:S,bgWidth:P,trackRadius:Q,thumbRadius:R,showScrollBar:O,track:U})),x&&s.createElement(z,Object.assign({},d,{highlightShow:M,lineHeight:L,marginBottom:K,width:X})),s.createElement('div',{style:{position:'relative',width:X+10},ref:function c(a){return b.inner=a}},o.show&&s.createElement(A,Object.assign({},d,{paddingLeft:H,paddingRight:I})),e&&s.createElement(D,Object.assign({scrollbar:v,onRelative:this.props.onRelative,interactionData:this.props,data:e.map(function(a,b){return q(q({},a),{},{index:b+1})})},d,{emitEvent:this.props.emitEvent,selectmode:Z,lineHeight:L,numHeight:J,marginBottom:K,highlightShow:M,padding:'0',numberColumnMax:this.numberColumnMax}))))}},{key:'componentWillUnmount',value:function a(){this.scrollbar=null}}]),b}(s.Component);return a.exports=E,a.exports});