{ "pandav:/index.js": { "cubeCode": "Cube('pandav:/com/counterV2/1.0.7',['pandav:/npm/bcore/0.0.18/event','pandav:/npm/react/17.0.2','pandav:/npm/react-dom/17.0.2','pandav:/com/counterV2/1.0.7/Counter.jsx'],function(a,b,c){var d=c('pandav:/npm/bcore/0.0.18/event'),e=c('pandav:/npm/react/17.0.2'),f=c('pandav:/npm/react-dom/17.0.2'),g=c('pandav:/com/counterV2/1.0.7/Counter.jsx');return a.exports=d.extend(function(a,b){this.config={theme:{}},this.container=a,this.apis=b.apis,this.containSize={boxWidth:$(a)&&$(a).width(),boxHeight:$(a)&&$(a).height()},this.init(b)},{init:function(a){this.mergeConfig(a)},mergeConfig:function(a){var b;return a?(b=a,this.config=a):b=this.config,b},updateOptions:function(a){this.render(this._data,a)},data:function(a){return a&&(this._data=a),this._data},setColors:function(){},resize:function(a,b){this.containSize={boxWidth:a,boxHeight:b},this.render(this._data,this.config)},render:function(a,b){a=this.data(a);var c=this.mergeConfig(b),d=c.options;f.render(e.createElement(g,{width:this.containSize.boxWidth,height:this.containSize.boxHeight,emit:this.emit.bind(this),config:d,data:a}),this.container)},destroy:function(){return!!this.container&&void(f.unmountComponentAtNode(this.container),this.container.innerHTML='')}}),a.exports});", "requires": [ "pandav:/Counter.jsx" ], "buildLevel": 1, "outputDir": "/com/counterV2/1.0.7", "outputPath": "/com/counterV2/1.0.7/index.js", "fileName": "/index.js" }, "pandav:/Counter.jsx": { "cubeCode": "Cube('pandav:/com/counterV2/1.0.7/Counter.jsx',['pandav:/npm/react/17.0.2','pandav:/com/tween-animation/2.0.0','pandav:/npm/lodash/4.6.1','pandav:/com/cube-chart/0.0.2'],function(a,b,c){var d=Math.abs;function e(a,b){return k(a)||j(a,b)||g(a,b)||f()}function f(){throw new TypeError('Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.')}function g(a,b){if(a){if('string'==typeof a)return h(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return'Object'===c&&a.constructor&&(c=a.constructor.name),'Map'===c||'Set'===c?Array.from(a):'Arguments'===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?h(a,b):void 0}}function h(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c=m&&c=B&&cd?'-':'',config:j}),l.createElement('div',{style:{display:'inline-flex',alignItems:'center',justifyContent:x?'space-between':'flex-start',minWidth:x?y:'auto'}},q.map(function(a,b){return l.createElement('span',{key:'int_'+(q.length-b),style:{position:'relative',display:'inline-flex',justifyContent:'center',fontFamily:'\\u5206\\u9694\\u7B26'===a&&'default'!=o.style?o.textStyle.fontFamily:'inherit',width:'\\u5206\\u9694\\u7B26'!==a&&t.width?t.width:'auto',height:'\\u5206\\u9694\\u7B26'!==a&&t.height?t.height:'auto',lineHeight:t.height?''.concat(t.height,'px'):'unset',marginRight:'\\u5206\\u9694\\u7B26'===a?o.spacingConfig.right:w.right,marginLeft:'\\u5206\\u9694\\u7B26'===a?o.spacingConfig.left:w.left,background:'\\u5206\\u9694\\u7B26'!==a&&h.show&&h.url?'url(\\''.concat(h.url,'\\') 0% 0% / 100% 100% no-repeat'):'none',overflowY:'scroll'===k.animationType?'hidden':'none'}},'\\u5206\\u9694\\u7B26'===a?'default'!=w.style&&w.separator?w.separator:',':'scroll'===k.animationType?l.createElement(v,{value:a,sizeConfig:t,animationConfig:k}):a)})),0=a&&(k.current=0,v())},1e3*(f.simulateGetDataInterval/(a-1))))},v=function(){k.current=0,t.current&&clearInterval(t.current),t.current=null};l.useEffect(function(){return!n.current&&f.simulateGetData?u():s(b),function(){v()}},[b,JSON.stringify(f)]),l.useEffect(function(){n.current=!1,s(.5*b),f.simulateGetData?u():s(b)},[]);var x=r(d(q),i.show?i.splitCount:1/0,h.count,j,h.noZero);return l.createElement(w,{value:q,config:c,showValue:x})}),y=l.memo(function(a){var b=a.value,c=a.config,f=c.animationConfig,g=c.formateConfig,h=g.decimalConfig,i=g.splitConfig,j=g.zeroize,k=l.useRef(0),m=l.useRef(0),p=l.useRef(0),q=l.useRef(0),s=l.useRef(0),t=l.useState(0),u=e(t,2),v=u[0],x=u[1],y=l.useRef(!1),z=l.useRef(null),A=function(){D(),x(function(a){return k.current=a,a})},B=function(a){p.current=setInterval(function(){k.current=b*f.startPercent,x(k.current),C(a)},1e3*f.animationInterval)},C=function(a){var b={value:q.current?q.current:k.current};D(),z.current=new n(Object.assign({},b)),z.current.set(b),z.current=z.current.to({value:a},1e3*f.time,o.Linear,1),z.current.onUpdate(function(a){x(a.value)})},D=function(){z.current&&z.current.destroy(),z.current=null},E=function(){m.current&&clearInterval(m.current);var a=f.simulateGetDataTimes;s.current+=1;var c=k.current+(b-k.current)/a;C(c),q.current=c,1=a&&(s.current=0,q.current=0,clearInterval(m.current))},1e3*(f.simulateGetDataInterval/(a-1))))},F=function(){x(function(a){return k.current=a,a}),s.current=0,m.current&&clearInterval(m.current),m.current=null,p.current&&clearInterval(p.current),p.current=null};l.useEffect(function(){return y.current||(k.current=b*f.startPercent,f.simulateGetData?E():(C(b),f.animationInterval&&B(b))),function(){A(),F()}},[b,JSON.stringify(f)]);var G=r(d(v),i.show?i.splitCount:1/0,h.count,j,h.noZero);return l.createElement(w,{value:b,config:c,currentValue:v,showValue:G})});return a.exports=function(a){var b=a.config,c=b.countConfig,d=b.globleConfig,e=b.interaction,f=a.data,g=a.emit,h=d.titlePostion,i=d.alignment,j=d.titleConfig,k=j.textOverflow,m=j.speed,n=j.shadow,o=n.color,r=n.vShadow,t=n.hShadow,u=n.blur,v=l.useRef(0),w=f&&f[0]?p.assign(p.assign({},f[0]),{},{suffix:f[0].suffix,prefix:f[0].prefix,value:f&&f[0]&&!isNaN(+f[0].value)?+f[0].value:null}):{value:null};l.useEffect(function(){v.current=w?w.value:0});var x={左对齐:'\\u6807\\u9898\\u5728\\u4E0A'===h||'\\u6807\\u9898\\u5728\\u4E0B'===h?'center':'\\u6807\\u9898\\u5728\\u5DE6'===h?'flex-start':'flex-end',右对齐:'\\u6807\\u9898\\u5728\\u4E0A'===h||'\\u6807\\u9898\\u5728\\u4E0B'===h?'center':'\\u6807\\u9898\\u5728\\u5DE6'===h?'flex-end':'flex-start',居中:'center',两边对齐:'\\u6807\\u9898\\u5728\\u4E0A'===h||'\\u6807\\u9898\\u5728\\u4E0B'===h?'center':'space-between'},y={左对齐:'\\u6807\\u9898\\u5728\\u4E0A'===h||'\\u6807\\u9898\\u5728\\u4E0B'===h?'flex-start':'center',右对齐:'\\u6807\\u9898\\u5728\\u4E0A'===h||'\\u6807\\u9898\\u5728\\u4E0B'===h?'flex-end':'center',居中:'center',两边对齐:'\\u6807\\u9898\\u5728\\u4E0A'===h||'\\u6807\\u9898\\u5728\\u4E0B'===h?'normal':'center'};return l.createElement('div',{style:{width:'100%',height:'100%',display:'flex',flexDirection:{标题在上:'column',标题在下:'column-reverse',标题在左:'row',标题在右:'row-reverse'}[h],justifyContent:x[i],alignItems:y[i]},onClick:function(a){f&&f[0]&&g(a,f[0])}('click')},j.show&&l.createElement(q,{type:k,speed:m,value:w&&w.name?w.name:j.name,style:p.assign(p.assign(p.assign({},j.textStyle),{},{width:'\\u6807\\u9898\\u5728\\u5DE6'==h||'\\u6807\\u9898\\u5728\\u53F3'==h?'auto':'100%',flexBasis:'content',fontWeight:j.textStyle.fontWeight,fontStyle:j.textStyle.italic,transform:'translate('.concat(j.offsetConfig.x,'px, ').concat(j.offsetConfig.y,'px)')},'marquee'==k?{display:'flex',justifyContent:y[i]}:{textAlign:{左对齐:'left',居中:'center',右对齐:'right',两边对齐:'left'}[i]}),{},{filter:'drop-shadow('.concat(t,'px ').concat(r,'px ').concat(u,'px ').concat(o,')')})}),l.createElement(s,{config:c,value:w.value||0==w.value?w.value:'--',preValue:v}))},a.exports});", "requires": [], "buildLevel": 2, "outputDir": "/com/counterV2/1.0.7", "outputPath": "/com/counterV2/1.0.7/Counter.jsx", "fileName": "/Counter.jsx" }, "pandav:/initFilterScript/JArray.js": { "cubeCode": "Cube('pandav:/com/counterV2/1.0.7/initFilterScript/JArray',[],function(a){return a.exports});", "requires": [], "buildLevel": 0, "outputDir": "/com/counterV2/1.0.7/initFilterScript", "outputPath": "/com/counterV2/1.0.7/initFilterScript/JArray.js", "fileName": "/initFilterScript/JArray.js" }, "pandav:/initFilterScript/JObject.js": { "cubeCode": "Cube('pandav:/com/counterV2/1.0.7/initFilterScript/JObject',[],function(a){return a.exports});", "requires": [], "buildLevel": 0, "outputDir": "/com/counterV2/1.0.7/initFilterScript", "outputPath": "/com/counterV2/1.0.7/initFilterScript/JObject.js", "fileName": "/initFilterScript/JObject.js" }, "pandav:/initFilterScript/Normal.js": { "cubeCode": "Cube('pandav:/com/counterV2/1.0.7/initFilterScript/Normal',[],function(a){return a.exports});", "requires": [], "buildLevel": 0, "outputDir": "/com/counterV2/1.0.7/initFilterScript", "outputPath": "/com/counterV2/1.0.7/initFilterScript/Normal.js", "fileName": "/initFilterScript/Normal.js" } }