@ovalbee/reportifact 0.0.1 → 0.0.2
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.
- package/README.md +2 -1
- package/dist/{Chart.vue_vue_type_style_index_0_lang-BYILFTfl.js → Chart.vue_vue_type_style_index_0_lang-Bp14Es_r.js} +2341 -2290
- package/dist/Chart.vue_vue_type_style_index_0_lang-Dj7m6i3v.cjs +1 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BTA6fIp9.js +2640 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-CZ8Y2pXG.cjs +2 -0
- package/dist/index-3DTuh2Dr.cjs +47 -0
- package/dist/{index-DFz2A8yJ.js → index-DevYhXSC.js} +9252 -8377
- package/dist/portable/ReportifactFigure.vue.d.ts +4 -0
- package/dist/reportifact.cjs +1 -1
- package/dist/reportifact.js +3 -3
- package/dist/style.css +1 -1
- package/dist/widgets/chart.cjs +1 -1
- package/dist/widgets/chart.js +1 -1
- package/dist/widgets/figure.cjs +1 -1
- package/dist/widgets/figure.js +37 -37
- package/dist/widgets/timeline.cjs +1 -1
- package/dist/widgets/timeline.js +1 -1
- package/package.json +9 -8
- package/dist/Chart.vue_vue_type_style_index_0_lang-B4novMFC.cjs +0 -1
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BIyC7N9b.cjs +0 -2
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BnrgKBMh.js +0 -2598
- package/dist/index-DmTzvbys.cjs +0 -47
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const w=require("vue"),s=require("./index-3DTuh2Dr.cjs"),mt=require("./useFetch-BfOAq-Kg.cjs"),yt=require("./WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs");var _t=s.makeInner();function ke(r,t){return!!_t(r)[t]}s.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},s.noop);var xt={axisPointer:1,tooltip:1,brush:1};function St(r,t,e){var n=t.getComponentByElement(r.topTarget);if(!n||n===e||xt.hasOwnProperty(n.mainType))return!1;var o=n.coordinateSystem;if(!o||o.model===e)return!1;var a=s.retrieveZInfo(n),i=s.retrieveZInfo(e);return!((a.zlevel-i.zlevel||a.z-i.z)<=0)}var Mt=(function(r){s.__extends(t,r);function t(e){var n=r.call(this)||this;n._zr=e;var o=s.bind(n._mousedownHandler,n),a=s.bind(n._mousemoveHandler,n),i=s.bind(n._mouseupHandler,n),l=s.bind(n._mousewheelHandler,n),u=s.bind(n._pinchHandler,n);return n.enable=function(c,f){var h=f.zInfo,v=s.retrieveZInfo(h.component),d=v.z,m=v.zlevel,A={component:h.component,z:d,zlevel:m,z2:s.retrieve2(h.z2,-1/0)},b=s.extend({},f.triggerInfo);this._opt=s.defaults(s.extend({},f),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:A,triggerInfo:b,cursorGrab:"grab",cursorGrabbing:"grabbing"}),c==null&&(c=!0),(!this._enabled||this._controlType!==c)&&(this.disable(),this._enabled=!0,(c===!0||c==="move"||c==="pan")&&(ie(e,"mousedown",o,A),ie(e,"mousemove",a,A),ie(e,"mouseup",i,A)),(c===!0||c==="scale"||c==="zoom")&&(ie(e,"mousewheel",l,A),ie(e,"pinch",u,A)))},n.disable=function(){this._enabled&&(this._enabled=!1,se(e,"mousedown",o),se(e,"mousemove",a),se(e,"mouseup",i),se(e,"mousewheel",l),se(e,"pinch",u))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,n,o){var a=this._opt,i=a.zInfoParsed;if(St(e,a.api,i.component))return!1;var l=a.triggerInfo,u=l.roamTrigger,c=!1;return u==="global"&&(c=!0),c||(c=l.isInSelf(e,n,o)),c&&l.isInClip&&!l.isInClip(e,n,o)&&(c=!1),c},t.prototype._decideCursorStyle=function(e,n,o,a){var i=e.target;if(!i&&this._checkPointer(e,n,o))return this._opt.cursorGrab;if(a)return i&&i.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(s.isMiddleOrRightButtonOnMouseUpDown(e)||oe(e))){for(var n=e.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var o=e.offsetX,a=e.offsetY;this._checkPointer(e,o,a)&&(this._x=o,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var n=this._zr;if(!(e.gestureEvent==="pinch"||ke(n,"globalPan")||oe(e))){var o=e.offsetX,a=e.offsetY;if(!this._dragging||!he("moveOnMouseMove",e,this._opt)){var i=this._decideCursorStyle(e,o,a,!1);i&&n.setCursorStyle(i);return}n.setCursorStyle(this._opt.cursorGrabbing);var l=this._x,u=this._y,c=o-l,f=a-u;this._x=o,this._y=a,this._opt.preventDefaultMouseMove&&s.stop(e.event),e.__ecRoamConsumed=!0,Be(this,"pan","moveOnMouseMove",e,{dx:c,dy:f,oldX:l,oldY:u,newX:o,newY:a,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!oe(e)){var n=this._zr;if(!s.isMiddleOrRightButtonOnMouseUpDown(e)){this._dragging=!1;var o=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);o&&n.setCursorStyle(o)}}},t.prototype._mousewheelHandler=function(e){if(!oe(e)){var n=he("zoomOnMouseWheel",e,this._opt),o=he("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,i=Math.abs(a),l=e.offsetX,u=e.offsetY;if(!(a===0||!n&&!o)){if(n){var c=i>3?1.4:i>1?1.2:1.1,f=a>0?c:1/c;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:l,originY:u,isAvailableBehavior:null})}if(o){var h=Math.abs(a),v=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:v,originX:l,originY:u,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(ke(this._zr,"globalPan")||oe(e))){var n=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:n,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,n,o,a,i){e._checkPointer(a,i.originX,i.originY)&&(s.stop(a.event),a.__ecRoamConsumed=!0,Be(e,n,o,a,i))},t})(s.Eventful);function oe(r){return r.__ecRoamConsumed}var bt=s.makeInner();function _e(r){var t=bt(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function ie(r,t,e,n){for(var o=_e(r),a=o.roam,i=a[t]=a[t]||[],l=0;l<i.length;l++){var u=i[l].zInfoParsed;if((u.zlevel-n.zlevel||u.z-n.z||u.z2-n.z2)<=0)break}i.splice(l,0,{listener:e,zInfoParsed:n}),At(r,t)}function se(r,t,e){for(var n=_e(r),o=n.roam[t]||[],a=0;a<o.length;a++)if(o[a].listener===e){o.splice(a,1),o.length||wt(r,t);return}}function At(r,t){var e=_e(r);e.uniform[t]||r.on(t,e.uniform[t]=function(n){var o=e.roam[t];if(o)for(var a=0;a<o.length;a++)o[a].listener(n)})}function wt(r,t){var e=_e(r),n=e.uniform;n[t]&&(r.off(t,n[t]),n[t]=null)}function Be(r,t,e,n,o){o.isAvailableBehavior=s.bind(he,null,e,n),r.trigger(t,o)}function he(r,t,e){var n=e[r];return!r||n&&(!s.isString(n)||t.event[n+"Key"])}var Et=0,Fe=1,Rt=2;var Ct="view";(function(r){s.__extends(t,r);function t(e,n,o){var a=r.call(this)||this;a.type=Ct,a.dimensions=["x","y"];var i=a;i.invertY=e,i.lgCt=n,i.lgGeo=o;var l=i.trans=[];return l[Et]=s.transformableCreate(),l[Fe]=s.transformableCreate(),l[Rt]=s.transformableCreate(),i.mtRaw=s.create(),i.mtRawInv=s.create(),i.mtOverall=s.create(),i.mtOverallInv=s.create(),i.zoom=1,a}return t.prototype.getBoundingRect=function(){return Tt(null,this)},t.prototype.getViewRect=function(){return Lt(null,this)},t.prototype.getRoamTransform=function(){return s.transformableGetLocalTransform(this.trans[Fe])},t.prototype.dataToPoint=function(e,n,o){var a=n?this.mtRaw:this.mtOverall;return o=o||[],a?s.applyTransform(o,e,a):s.copy(o,e)},t.prototype.pointToData=function(e,n,o){o=o||[];var a=this.mtOverallInv;return a?s.applyTransform(o,e,a):s.copy(o,e)},t.prototype.convertToPixel=function(e,n,o){var a=Ge(n);return a===this?a.dataToPoint(o):null},t.prototype.convertFromPixel=function(e,n,o){var a=Ge(n);return a===this?a.pointToData(o):null},t.prototype.containPoint=function(e){var n=this;return s.boundingRectCopy(fe,n.dataRect),s.boundingRectApplyTransform(fe,fe,n.mtOverall),s.boundingRectContain(fe,e[0],e[1])},t.dimensions=["x","y"],t})(s.Transformable);var fe=s.boundingRectCreate();function Dt(r){return r.zoom}function Tt(r,t){return s.boundingRectCopy(s.boundingRectCreate(),t.dataRect)}function Lt(r,t){return s.boundingRectCopy(s.boundingRectCreate(),t.viewRect)}s.boundingRectCreate();function Ge(r){var t=r.seriesModel;return t?t.coordinateSystem:null}var He={color:"fill",borderColor:"stroke"},Pt={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},K=s.makeInner(),Ot=(function(r){s.__extends(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,n){return s.createSeriesData(null,this)},t.prototype.getDataParams=function(e,n,o){var a=r.prototype.getDataParams.call(this,e,n);return o&&(a.info=K(o).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t})(s.SeriesModel);function It(r,t){return t=t||[0,0],s.map(["x","y"],function(e,n){var o=this.getAxis(e),a=t[n],i=r[n]/2;return o.type==="category"?s.calcBandWidth(o).w:Math.abs(o.dataToCoord(a-i)-o.dataToCoord(a+i))},this)}function zt(r){var t=r.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:s.bind(It,r)}}}function Nt(r,t){return t=t||[0,0],s.map([0,1],function(e){var n=t[e],o=r[e]/2,a=[],i=[];return a[e]=n-o,i[e]=n+o,a[1-e]=i[1-e]=t[1-e],Math.abs(this.dataToPoint(a)[e]-this.dataToPoint(i)[e])},this)}function Zt(r){var t=r.view,e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:Dt(t)},api:{coord:function(n){return r.dataToPoint(n)},size:s.bind(Nt,r)}}}function Vt(r,t){var e=this.getAxis(),n=t instanceof Array?t[0]:t,o=(r instanceof Array?r[0]:r)/2;return e.type==="category"?s.calcBandWidth(e).w:Math.abs(e.dataToCoord(n-o)-e.dataToCoord(n+o))}function kt(r){var t=r.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:s.bind(Vt,r)}}}function Bt(r,t){return t=t||[0,0],s.map(["Radius","Angle"],function(e,n){var o="get"+e+"Axis",a=this[o](),i=t[n],l=r[n]/2,u=a.type==="category"?s.calcBandWidth(a).w:Math.abs(a.dataToCoord(i-l)-a.dataToCoord(i+l));return e==="Angle"&&(u=u*Math.PI/180),u},this)}function Ft(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(o){var a=t.dataToRadius(o[0]),i=e.dataToAngle(o[1]),l=r.coordToPoint([a,i]);return l.push(a,i*Math.PI/180),l},size:s.bind(Bt,r)}}}function Gt(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(n,o){return r.dataToPoint(n,o)},layout:function(n,o){return r.dataToLayout(n,o)}}}}function Ht(r){var t=r.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e,n){return r.dataToPoint(e,n)},layout:function(e,n){return r.dataToLayout(e,n)}}}}var at={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},We=s.keys(at),ve=s.reduce(s.TRANSFORMABLE_PROPS,function(r,t){return r[t]=1,r},{}),Ye=s.TRANSFORMABLE_PROPS.join(", "),de=["","style","shape","extra"],ae=s.makeInner();function Te(r,t,e,n,o){var a=r+"Animation",i=s.getAnimationConfig(r,n,o)||{},l=ae(t).userDuring;return i.duration>0&&(i.during=l?s.bind(qt,{el:t,userDuring:l}):null,i.setToFinal=!0,i.scope=r),s.extend(i,e[a]),i}function Wt(r,t,e,n){n=n||{};var o=n.dataIndex,a=n.isInit,i=n.clearStyle,l=e.isAnimationEnabled(),u=ae(r),c=t.style;u.userDuring=t.during;var f={},h={};if(Jt(r,t,h),r.type==="compound")for(var v=r.shape.paths,d=t.shape.paths,m=0;m<d.length;m++){var A=d[m];xe("shape",A,v[m])}else xe("shape",t,h),xe("extra",t,h);if(!a&&l&&(jt(r,t,f),Ue("shape",r,t,f),Ue("extra",r,t,f),Qt(r,t,c,f)),h.style=c,Ut(r,h,i),Xt(r,t),l)if(a){var b={};s.each(de,function(C){var D=C?t[C]:t;D&&D.enterFrom&&(C&&(b[C]=b[C]||{}),s.extend(C?b[C]:b,D.enterFrom))});var E=Te("enter",r,t,e,o);E.duration>0&&r.animateFrom(b,E)}else $t(r,t,o||0,e,f);Yt(r,t),c?r.dirty():r.markRedraw()}function Yt(r,t){for(var e=ae(r).leaveToProps,n=0;n<de.length;n++){var o=de[n],a=o?t[o]:t;a&&a.leaveTo&&(e||(e=ae(r).leaveToProps={}),o&&(e[o]=e[o]||{}),s.extend(o?e[o]:e,a.leaveTo))}}function Le(r,t,e,n){if(r){var o=r.parent,a=ae(r).leaveToProps;if(a){var i=Te("update",r,t,e,0);i.done=function(){o&&o.remove(r)},r.animateTo(a,i)}else o&&o.remove(r)}}function ne(r){return r==="all"}function Ut(r,t,e){var n=t.style;if(!r.isGroup&&n){if(e){r.useStyle({});for(var o=r.animators,a=0;a<o.length;a++){var i=o[a];i.targetName==="style"&&i.changeTarget(r.style)}}r.setStyle(n)}t&&(t.style=null,t&&r.attr(t),t.style=n)}function $t(r,t,e,n,o){if(o){var a=Te("update",r,t,n,e);a.duration>0&&r.animateFrom(o,a)}}function Xt(r,t){s.hasOwn(t,"silent")&&(r.silent=t.silent),s.hasOwn(t,"ignore")&&(r.ignore=t.ignore),r instanceof s.Displayable&&s.hasOwn(t,"invisible")&&(r.invisible=t.invisible),r instanceof s.Path&&s.hasOwn(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var X={},Kt={setTransform:function(r,t){return process.env.NODE_ENV!=="production"&&s.assert(s.hasOwn(ve,r),"Only "+Ye+" available in `setTransform`."),X.el[r]=t,this},getTransform:function(r){return process.env.NODE_ENV!=="production"&&s.assert(s.hasOwn(ve,r),"Only "+Ye+" available in `getTransform`."),X.el[r]},setShape:function(r,t){process.env.NODE_ENV!=="production"&&re(r);var e=X.el,n=e.shape||(e.shape={});return n[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){process.env.NODE_ENV!=="production"&&re(r);var t=X.el.shape;if(t)return t[r]},setStyle:function(r,t){process.env.NODE_ENV!=="production"&&re(r);var e=X.el,n=e.style;return n&&(process.env.NODE_ENV!=="production"&&s.eqNaN(t)&&s.warn("style."+r+" must not be assigned with NaN."),n[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){process.env.NODE_ENV!=="production"&&re(r);var t=X.el.style;if(t)return t[r]},setExtra:function(r,t){process.env.NODE_ENV!=="production"&&re(r);var e=X.el.extra||(X.el.extra={});return e[r]=t,this},getExtra:function(r){process.env.NODE_ENV!=="production"&&re(r);var t=X.el.extra;if(t)return t[r]}};function re(r){if(process.env.NODE_ENV!=="production"&&(r==="transition"||r==="enterFrom"||r==="leaveTo"))throw new Error('key must not be "'+r+'"')}function qt(){var r=this,t=r.el;if(t){var e=ae(t).userDuring,n=r.userDuring;if(e!==n){r.el=r.userDuring=null;return}X.el=t,n(Kt)}}function Ue(r,t,e,n){var o=e[r];if(o){var a=t[r],i;if(a){var l=e.transition,u=o.transition;if(u)if(!i&&(i=n[r]={}),ne(u))s.extend(i,a);else for(var c=s.normalizeToArray(u),f=0;f<c.length;f++){var h=c[f],v=a[h];i[h]=v}else if(ne(l)||s.indexOf(l,r)>=0){!i&&(i=n[r]={});for(var d=s.keys(a),f=0;f<d.length;f++){var h=d[f],v=a[h];er(o[h],v)&&(i[h]=v)}}}}}function xe(r,t,e){var n=t[r];if(n)for(var o=e[r]={},a=s.keys(n),i=0;i<a.length;i++){var l=a[i];o[l]=s.cloneValue(n[l])}}function jt(r,t,e){for(var n=t.transition,o=ne(n)?s.TRANSFORMABLE_PROPS:s.normalizeToArray(n||[]),a=0;a<o.length;a++){var i=o[a];if(!(i==="style"||i==="shape"||i==="extra")){var l=r[i];process.env.NODE_ENV!=="production"&&ot(i,"el.transition"),e[i]=l}}}function Jt(r,t,e){for(var n=0;n<We.length;n++){var o=We[n],a=at[o],i=t[o];i&&(e[a[0]]=i[0],e[a[1]]=i[1])}for(var n=0;n<s.TRANSFORMABLE_PROPS.length;n++){var l=s.TRANSFORMABLE_PROPS[n];t[l]!=null&&(e[l]=t[l])}}function Qt(r,t,e,n){if(e){var o=r.style,a;if(o){var i=e.transition,l=t.transition;if(i&&!ne(i)){var u=s.normalizeToArray(i);!a&&(a=n.style={});for(var c=0;c<u.length;c++){var f=u[c],h=o[f];a[f]=h}}else if(r.getAnimationStyleProps&&(ne(l)||ne(i)||s.indexOf(l,"style")>=0)){var v=r.getAnimationStyleProps(),d=v?v.style:null;if(d){!a&&(a=n.style={});for(var m=s.keys(e),c=0;c<m.length;c++){var f=m[c];if(d[f]){var h=o[f];a[f]=h}}}}}}}function er(r,t){return s.isArrayLike(r)?r!==t:r!=null&&isFinite(r)}var ot;process.env.NODE_ENV!=="production"&&(ot=function(r,t){s.hasOwn(ve,r)||s.warn("Prop `"+r+"` is not a permitted in `"+t+"`. Only `"+s.keys(ve).join("`, `")+"` are permitted.")});var it=s.makeInner(),tr=["percent","easing","shape","style","extra"];function rr(r){r.stopAnimation("keyframe"),r.attr(it(r))}function st(r,t,e){if(!(!e.isAnimationEnabled()||!t)){if(s.isArray(t)){s.each(t,function(l){st(r,l,e)});return}var n=t.keyframes,o=t.duration;if(e&&o==null){var a=s.getAnimationConfig("enter",e,0);o=a&&a.duration}if(!(!n||!o)){var i=it(r);s.each(de,function(l){if(!(l&&!r[l])){var u,c=!1;n.sort(function(f,h){return f.percent-h.percent}),s.each(n,function(f){var h=r.animators,v=l?f[l]:f;if(process.env.NODE_ENV!=="production"&&f.percent>=1&&(c=!0),!!v){var d=s.keys(v);if(l||(d=s.filter(d,function(b){return s.indexOf(tr,b)<0})),!!d.length){u||(u=r.animate(l,t.loop,!0),u.scope="keyframe");for(var m=0;m<h.length;m++)h[m]!==u&&h[m].targetName===u.targetName&&h[m].stopTracks(d);l&&(i[l]=i[l]||{});var A=l?i[l]:i;s.each(d,function(b){A[b]=((l?r[l]:r)||{})[b]}),u.whenWithKeys(o*f.percent,v,d,f.easing)}}}),u&&(process.env.NODE_ENV!=="production"&&(c||s.warn("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),u.delay(t.delay||0).duration(o).start(t.easing))}})}}}var q="emphasis",J="normal",Pe="blur",Oe="select",ee=[J,q,Pe,Oe],Se={normal:["itemStyle"],emphasis:[q,"itemStyle"],blur:[Pe,"itemStyle"],select:[Oe,"itemStyle"]},Me={normal:["label"],emphasis:[q,"label"],blur:[Pe,"label"],select:[Oe,"label"]},nr=["x","y"],ar="e\0\0",G={normal:{},emphasis:{},blur:{},select:{}},$e={cartesian2d:zt,geo:Zt,single:kt,polar:Ft,calendar:Gt,matrix:Ht};function pe(r){return r instanceof s.Path}function De(r){return r instanceof s.Displayable}function or(r,t){t.copyTransform(r),De(t)&&De(r)&&(t.setStyle(r.style),t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t.invisible=r.invisible,t.ignore=r.ignore,pe(t)&&pe(r)&&t.setShape(r.shape))}var ir=(function(r){s.__extends(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,o,a){this._progressiveEls=null;var i=this._data,l=e.getData(),u=this.group,c=Xe(e,l,n,o);i||u.removeAll(),l.diff(i).add(function(h){be(o,null,h,c(h,a),e,u,l)}).remove(function(h){var v=i.getItemGraphicEl(h);v&&Le(v,K(v).option,e)}).update(function(h,v){var d=i.getItemGraphicEl(v);be(o,d,h,c(h,a),e,u,l)}).execute();var f=e.get("clip",!0)?s.createClipPath(e.coordinateSystem,!1,e):null;f?u.setClipPath(f):u.removeClipPath(),this._data=l},t.prototype.incrementalPrepareRender=function(e,n,o){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,n,o,a,i){var l=n.getData(),u=Xe(n,l,o,a),c=this._progressiveEls=[];function f(d){d.isGroup||(d.incremental=s.getIncrementalId(n),d.ensureState("emphasis").hoverLayer=s.HOVER_LAYER_FOR_INCREMENTAL)}for(var h=e.start;h<e.end;h++){var v=be(null,null,h,u(h,i),n,this.group,l);v&&(v.traverse(f),c.push(v))}},t.prototype.eachRendered=function(e){s.traverseElements(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,n,o,a){var i=n.element;if(i==null||o.name===i)return!0;for(;(o=o.__hostTarget||o.parent)&&o!==this.group;)if(o.name===i)return!0;return!1},t.type="custom",t})(s.ChartView);function Ie(r){var t=r.type,e;if(t==="path"){var n=r.shape,o=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=ct(n);e=s.makePath(a,null,o,n.layout||"center"),K(e).customPathData=a}else if(t==="image")e=new s.ZRImage({}),K(e).customImagePath=r.style.image;else if(t==="text")e=new s.ZRText({});else if(t==="group")e=new s.Group;else if(t==="compoundPath"){var n=r.shape;if(!n||!n.paths){var i="";process.env.NODE_ENV!=="production"&&(i="shape.paths must be specified in compoundPath"),s.throwError(i)}var l=s.map(n.paths,function(f){if(f.type==="path")return s.makePath(f.shape.pathData,f,null);var h=s.getShapeClass(f.type);if(!h){var v="";process.env.NODE_ENV!=="production"&&(v='graphic type "'+t+'" can not be found.'),s.throwError(v)}return new h});e=new s.CompoundPath({shape:{paths:l}})}else{var u=s.getShapeClass(t);if(!u){var i="";process.env.NODE_ENV!=="production"&&(i='graphic type "'+t+'" can not be found.'),s.throwError(i)}e=new u}return K(e).customGraphicType=t,e.name=r.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function ze(r,t,e,n,o,a,i){rr(t);var l=o&&o.normal.cfg;l&&t.setTextConfig(l),n&&n.transition==null&&(n.transition=nr);var u=n&&n.style;if(u){if(t.type==="text"){var c=u;s.hasOwn(c,"textFill")&&(c.fill=c.textFill),s.hasOwn(c,"textStroke")&&(c.stroke=c.textStroke)}var f=void 0,h=pe(t)?u.decal:null;r&&h&&(h.dirty=!0,f=s.createOrUpdatePatternFromDecal(h,r)),u.__decalPattern=f}if(De(t)&&u){var f=u.__decalPattern;f&&(u.decal=f)}Wt(t,n,a,{dataIndex:e,isInit:i,clearStyle:!0}),st(t,n.keyframeAnimation,a)}function lt(r,t,e,n,o){var a=t.isGroup?null:t,i=o&&o[r].cfg;if(a){var l=a.ensureState(r);if(n===!1){var u=a.getState(r);u&&(u.style=null)}else l.style=n||null;i&&(l.textConfig=i),s.setDefaultStateProxy(a)}}function sr(r,t,e){if(!r.isGroup){var n=r,o=e.currentZ,a=e.currentZLevel;n.z=o,n.zlevel=a;var i=t.z2;i!=null&&(n.z2=i||0);for(var l=0;l<ee.length;l++)lr(n,t,ee[l])}}function lr(r,t,e){var n=e===J,o=n?t:ge(t,e),a=o?o.z2:null,i;a!=null&&(i=n?r:r.ensureState(e),i.z2=a||0)}function Xe(r,t,e,n){var o=r.get("renderItem");if(typeof o=="string"){var a=s.getCustomSeries(o);a?o=a:process.env.NODE_ENV!=="production"&&console.warn("Custom series renderItem '"+o+`' not found.
|
|
2
|
+
Call 'echarts.registerCustomSeries' to register it.`)}var i=r.coordinateSystem,l={};i&&(process.env.NODE_ENV!=="production"&&(s.assert(o,"series.render is required."),s.assert(i.prepareCustoms||$e[i.type],"This coordSys does not support custom series.")),l=i.prepareCustoms?i.prepareCustoms(i):$e[i.type](i));for(var u=s.defaults({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:M,style:V,ordinalRawValue:L,styleEmphasis:H,visual:j,barLayout:te,currentSeriesIndices:B,font:$},l.api||{}),c={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:l.coordSys,dataInsideLength:t.count(),encode:ur(r.getData()),itemPayload:r.get("itemPayload")||{}},f,h,v={},d={},m={},A={},b=0;b<ee.length;b++){var E=ee[b];m[E]=r.getModel(Se[E]),A[E]=r.getModel(Me[E])}function C(g){return g===f?h||(h=t.getItemModel(g)):t.getItemModel(g)}function D(g,p){return t.hasItemOption?g===f?v[p]||(v[p]=C(g).getModel(Se[p])):C(g).getModel(Se[p]):m[p]}function _(g,p){return t.hasItemOption?g===f?d[p]||(d[p]=C(g).getModel(Me[p])):C(g).getModel(Me[p]):A[p]}return function(g,p){return f=g,h=null,v={},d={},o&&o(s.defaults({dataIndexInside:g,dataIndex:t.getRawIndex(g),actionType:p?p.type:null},c),u)};function M(g,p){return p==null&&(p=f),t.getStore().get(t.getDimensionIndex(g||0),p)}function L(g,p){p==null&&(p=f),g=g||0;var T=t.getDimensionInfo(g);if(!T){var Z=t.getDimensionIndex(g);return Z>=0?t.getStore().get(Z,p):void 0}var Y=t.get(T.name,p),I=T&&T.ordinalMeta;return I?I.categories[Y]:Y}function V(g,p){process.env.NODE_ENV!=="production"&&s.warnDeprecated("api.style","Please write literal style directly instead."),p==null&&(p=f);var T=t.getItemVisual(p,"style"),Z=T&&T.fill,Y=T&&T.opacity,I=D(p,J).getItemStyle();Z!=null&&(I.fill=Z),Y!=null&&(I.opacity=Y);var x={inheritColor:s.isString(Z)?Z:s.tokens.color.neutral99},S=_(p,J),R=s.createTextStyle(S,null,x,!1,!0);R.text=S.getShallow("show")?s.retrieve2(r.getFormattedLabel(p,J),s.getDefaultLabel(t,p)):null;var y=s.createTextConfig(S,x,!1);return W(g,I),I=s.convertToEC4StyleForCustomSerise(I,R,y),g&&O(I,g),I.legacy=!0,I}function H(g,p){process.env.NODE_ENV!=="production"&&s.warnDeprecated("api.styleEmphasis","Please write literal style directly instead."),p==null&&(p=f);var T=D(p,q).getItemStyle(),Z=_(p,q),Y=s.createTextStyle(Z,null,null,!0,!0);Y.text=Z.getShallow("show")?s.retrieve3(r.getFormattedLabel(p,q),r.getFormattedLabel(p,J),s.getDefaultLabel(t,p)):null;var I=s.createTextConfig(Z,null,!0);return W(g,T),T=s.convertToEC4StyleForCustomSerise(T,Y,I),g&&O(T,g),T.legacy=!0,T}function O(g,p){for(var T in p)s.hasOwn(p,T)&&(g[T]=p[T])}function W(g,p){g&&(g.textFill&&(p.textFill=g.textFill),g.textPosition&&(p.textPosition=g.textPosition))}function j(g,p){if(p==null&&(p=f),s.hasOwn(He,g)){var T=t.getItemVisual(p,"style");return T?T[He[g]]:null}if(s.hasOwn(Pt,g))return t.getItemVisual(p,g)}function te(g){if(i.type==="cartesian2d"){var p=i.getBaseAxis();return s.computeBarLayoutForCustomSeries(s.defaults({axis:p},g))}}function B(){return e.getCurrentSeriesIndices()}function $(g){return s.getFont(g,e)}}function ur(r){var t={};return s.each(r.dimensions,function(e){var n=r.getDimensionInfo(e);if(!n.isExtraCoord){var o=n.coordDim,a=t[o]=t[o]||[];a[n.coordDimIndex]=r.getDimensionIndex(e)}}),t}function be(r,t,e,n,o,a,i){if(!n){a.remove(t);return}var l=Ne(r,t,e,n,o,a);return l&&i.setItemGraphicEl(e,l),l&&s.toggleHoverEmphasis(l,n.focus,n.blurScope,n.emphasisDisabled),l}function Ne(r,t,e,n,o,a){process.env.NODE_ENV!=="production"&&s.assert(n,"should not have an null/undefined element setting");var i=-1,l=t;t&&ut(t,n,o)&&(i=s.indexOf(a.childrenRef(),t),t=null);var u=!t,c=t;c?c.clearStates():(c=Ie(n),l&&or(l,c)),n.morph===!1?c.disableMorphing=!0:c.disableMorphing&&(c.disableMorphing=!1),n.tooltipDisabled&&(c.tooltipDisabled=!0),G.normal.cfg=G.normal.conOpt=G.emphasis.cfg=G.emphasis.conOpt=G.blur.cfg=G.blur.conOpt=G.select.cfg=G.select.conOpt=null,G.isLegacy=!1,fr(c,e,n,o,u,G),cr(c,e,n,o,u),ze(r,c,e,n,G,o,u),s.hasOwn(n,"info")&&(K(c).info=n.info);for(var f=0;f<ee.length;f++){var h=ee[f];if(h!==J){var v=ge(n,h),d=Ze(n,v,h);lt(h,c,v,d,G)}}return sr(c,n,o),n.type==="group"&&hr(r,c,e,n,o),i>=0?a.replaceAt(c,i):a.add(c),c}function ut(r,t,e){var n=K(r),o=t.type,a=t.shape,i=t.style;return e.isUniversalTransitionEnabled()||o!=null&&o!==n.customGraphicType||o==="path"&&gr(a)&&ct(a)!==n.customPathData||o==="image"&&s.hasOwn(i,"image")&&i.image!==n.customImagePath}function cr(r,t,e,n,o){var a=e.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var i=r.getClipPath();i&&ut(i,a,n)&&(i=null),i||(i=Ie(a),process.env.NODE_ENV!=="production"&&s.assert(pe(i),"Only any type of `path` can be used in `clipPath`, rather than "+i.type+"."),r.setClipPath(i)),ze(null,i,t,a,null,n,o)}}function fr(r,t,e,n,o,a){if(!(r.isGroup||r.type==="compoundPath")){Ke(e,null,a),Ke(e,q,a);var i=a.normal.conOpt,l=a.emphasis.conOpt,u=a.blur.conOpt,c=a.select.conOpt;if(i!=null||l!=null||c!=null||u!=null){var f=r.getTextContent();if(i===!1)f&&r.removeTextContent();else{i=a.normal.conOpt=i||{type:"text"},f?f.clearStates():(f=Ie(i),r.setTextContent(f)),ze(null,f,t,i,null,n,o);for(var h=i&&i.style,v=0;v<ee.length;v++){var d=ee[v];if(d!==J){var m=a[d].conOpt;lt(d,f,m,Ze(i,m,d),null)}}h?f.dirty():f.markRedraw()}}}}function Ke(r,t,e){var n=t?ge(r,t):r,o=t?Ze(r,n,q):r.style,a=r.type,i=n?n.textConfig:null,l=r.textContent,u=l?t?ge(l,t):l:null;if(o&&(e.isLegacy||s.isEC4CompatibleStyle(o,a,!!i,!!u))){e.isLegacy=!0;var c=s.convertFromEC4CompatibleStyle(o,a,!t);!i&&c.textConfig&&(i=c.textConfig),!u&&c.textContent&&(u=c.textContent)}if(!t&&u){var f=u;!f.type&&(f.type="text"),process.env.NODE_ENV!=="production"&&s.assert(f.type==="text",'textContent.type must be "text"')}var h=t?e[t]:e.normal;h.cfg=i,h.conOpt=u}function ge(r,t){return t?r?r[t]:null:r}function Ze(r,t,e){var n=t&&t.style;return n==null&&e===q&&r&&(n=r.styleEmphasis),n}function hr(r,t,e,n,o){var a=n.children,i=a?a.length:0,l=n.$mergeChildren,u=l==="byName"||n.diffChildrenByName,c=l===!1;if(!(!i&&!u&&!c)){if(u){dr({api:r,oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,seriesModel:o,group:t});return}c&&t.removeAll();for(var f=0;f<i;f++){var h=a[f],v=t.childAt(f);h?(h.ignore==null&&(h.ignore=!1),Ne(r,v,e,h,o,t)):(process.env.NODE_ENV!=="production"&&s.assert(v,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),v.ignore=!0)}for(var d=t.childCount()-1;d>=f;d--){var m=t.childAt(d);vr(t,m,o)}}}function vr(r,t,e){t&&Le(t,K(r).option,e)}function dr(r){new s.DataDiffer(r.oldChildren,r.newChildren,qe,qe,r).add(je).update(je).remove(pr).execute()}function qe(r,t){var e=r&&r.name;return e??ar+t}function je(r,t){var e=this.context,n=r!=null?e.newChildren[r]:null,o=t!=null?e.oldChildren[t]:null;Ne(e.api,o,e.dataIndex,n,e.seriesModel,e.group)}function pr(r){var t=this.context,e=t.oldChildren[r];e&&Le(e,K(e).option,t.seriesModel)}function ct(r){return r&&(r.pathData||r.d)}function gr(r){return r&&(s.hasOwn(r,"pathData")||s.hasOwn(r,"d"))}function mr(r){r.registerChartView(ir),r.registerSeriesModel(Ot)}var Je=["x","y","radius","angle","single"],yr=s.makeInner(),_r=["cartesian2d","polar","singleAxis"];function xr(r){var t=r.get("coordinateSystem");return s.indexOf(_r,t)>=0}function Q(r){return process.env.NODE_ENV!=="production"&&s.assert(r),r+"Axis"}function Sr(r,t){var e=s.createHashMap(),n=[],o=s.createHashMap();r.eachComponent({mainType:"dataZoom",query:t},function(f){o.get(f.uid)||l(f)});var a;do a=!1,r.eachComponent("dataZoom",i);while(a);function i(f){!o.get(f.uid)&&u(f)&&(l(f),a=!0)}function l(f){o.set(f.uid,!0),n.push(f),c(f)}function u(f){var h=!1;return f.eachTargetAxis(function(v,d){var m=e.get(v);m&&m[d]&&(h=!0)}),h}function c(f){f.eachTargetAxis(function(h,v){(e.get(h)||e.set(h,[]))[v]=!0})}return n}function ft(r){var t=r.ecModel,e={infoList:[],infoMap:s.createHashMap()};return r.eachTargetAxis(function(n,o){var a=t.getComponent(Q(n),o);if(a){var i=a.getCoordSysModel();if(i){var l=i.uid,u=e.infoMap.get(l);u||(u={model:i,axisModels:[]},e.infoList.push(u),e.infoMap.set(l,u)),u.axisModels.push(a)}}}),e}function ht(r){var t=yr(s.getCachePerECPrepare(r));return t.axisProxyMap||(t.axisProxyMap=s.createHashMap())}function me(r){if(r)return process.env.NODE_ENV!=="production"&&s.assert(r.ecModel),ht(r.ecModel).get(r.uid)}function Mr(r,t){process.env.NODE_ENV!=="production"&&s.assert(r.ecModel),ht(r.ecModel).set(r.uid,t)}function vt(r,t){var e=t.getAxisModel().axis.__alignTo;return e&&r.getAxisProxy(e.dim,e.model.componentIndex)?me(e.model):null}var Ae=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),ye=(function(r){s.__extends(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,n,o){var a=Qe(e);this.settledOption=a,this.mergeDefaultAndTheme(e,o),this._doInit(a)},t.prototype.mergeOption=function(e){var n=Qe(e);s.merge(this.option,e,!0),s.merge(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var o=this.settledOption;s.each([["start","startValue"],["end","endValue"]],function(a,i){this._rangePropMode[i]==="value"&&(n[a[0]]=o[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=s.createHashMap(),o=this._fillSpecifiedTargetAxis(n);o?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return s.each(Je,function(o){var a=this.getReferringComponents(Q(o),s.MULTIPLE_REFERRING);if(a.specified){n=!0;var i=new Ae;s.each(a.models,function(l){i.add(l.componentIndex)}),e.set(o,i)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var o=this.ecModel,a=!0;if(a){var i=n==="vertical"?"y":"x",l=o.findComponents({mainType:i+"Axis"});u(l,i)}if(a){var l=o.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});u(l,"single")}function u(c,f){var h=c[0];if(h){var v=new Ae;if(v.add(h.componentIndex),e.set(f,v),a=!1,f==="x"||f==="y"){var d=h.getReferringComponents("grid",s.SINGLE_REFERRING).models[0];d&&s.each(c,function(m){h.componentIndex!==m.componentIndex&&d===m.getReferringComponents("grid",s.SINGLE_REFERRING).models[0]&&v.add(m.componentIndex)})}}}a&&s.each(Je,function(c){if(a){var f=o.findComponents({mainType:Q(c),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var h=new Ae;h.add(f[0].componentIndex),e.set(c,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,o=this.get("rangeMode");s.each([["start","startValue"],["end","endValue"]],function(a,i){var l=e[a[0]]!=null,u=e[a[1]]!=null;l&&!u?n[i]="percent":!l&&u?n[i]="value":o?n[i]=o[i]:l&&(n[i]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,o){e==null&&(e=this.ecModel.getComponent(Q(n),o))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(o,a){s.each(o.indexList,function(i){e.call(n,a,i)})})},t.prototype.getAxisProxy=function(e,n){return me(this.getAxisModel(e,n))},t.prototype.getAxisModel=function(e,n){process.env.NODE_ENV!=="production"&&s.assert(e&&n!=null);var o=this._targetAxisInfoMap.get(e);if(o&&o.indexMap[n])return this.ecModel.getComponent(Q(e),n)},t.prototype.setRawRange=function(e){var n=this.option,o=this.settledOption;s.each([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(n[a[0]]=o[a[0]]=e[a[0]],n[a[1]]=o[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;s.each(["start","startValue","end","endValue"],function(o){n[o]=e[o]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var o=this.findRepresentativeAxisProxy();if(o)return o.getWindow().value}else return this.getAxisProxy(e,n).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return me(e);for(var n,o=this._targetAxisInfoMap.keys(),a=0;a<o.length;a++)for(var i=o[a],l=this._targetAxisInfoMap.get(i),u=0;u<l.indexList.length;u++){var c=this.getAxisProxy(i,l.indexList[u]);if(c.hostedBy(this))return c;n||(n=c)}return n},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&s.assert(this._orient),this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t})(s.ComponentModel);function Qe(r){var t={};return s.each(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var dt=(function(r){s.__extends(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,o,a){this.dataZoomModel=e,this.ecModel=n,this.api=o},t.type="dataZoom",t})(s.ComponentView),br=(function(){function r(t,e,n,o){this._dimName=t,this._axisIndex=e,this.ecModel=o,this._dataZoomModel=n}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getWindow=function(){return s.clone(this._window)},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(xr(e)){var n=Q(this._dimName),o=e.getReferringComponents(n,s.SINGLE_REFERRING).models[0];o&&this._axisIndex===o.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return s.clone(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._extent,n=this.getAxisModel().axis,o=n.scale,a=this._dataZoomModel,i=a.getRangePropMode(),l=[0,100],u=[],c=[],f,h=[!1,!1];s.each(["start","end"],function(D,_){var M=t[D],L=t[D+"Value"];i[_]==="percent"?(M==null&&(M=l[_]),L=s.linearMap(M,l,e),h[_]=!0):(f=!0,L==null?L=e[_]:(L=o.parse(L),o.sanitize&&(L=o.sanitize(L,e))),M=s.linearMap(L,e,l)),c[_]=L==null||isNaN(L)?e[_]:L,u[_]=M==null||isNaN(M)?l[_]:M}),s.asc(c),s.asc(u);var v=this._minMaxSpan;f?d(c,u,e,l,!1):d(u,c,l,e,!0);function d(D,_,M,L,V){var H=V?"Span":"ValueSpan";s.sliderMove(0,D,M,"all",v["min"+H],v["max"+H]);for(var O=0;O<2;O++)_[O]=s.linearMap(D[O],M,L,!0),V&&(_[O]=_[O],h[O]=!0);s.ensureExtentAscSimply(_)}var m=s.isOrdinalScale(o)||s.isTimeScale(o),A=n.getExtent(),b=s.mathAbs(A[1]-A[0]),E=m?0:s.getAcceptableTickPrecision(c,b,.5);s.each([[0,s.mathCeil],[1,s.mathFloor]],function(D){var _=D[0],M=D[1];!h[_]||!isFinite(E)||(c[_]=s.round(c[_],E),c[_]=s.mathMin(e[1],s.mathMax(e[0],c[_])),u[_]===l[_]&&(c[_]=e[_],m&&(c[_]=M(c[_]))))}),s.ensureExtentAscSimply(c);var C=[s.linearMap(c[0],e,l,!0),s.linearMap(c[1],e,l,!0)];return s.ensureExtentAscSimply(C),{value:c,percent:u,percentInverted:C,valuePrecision:E}},r.prototype.reset=function(t,e){if(this.hostedBy(t)){var n=this.getAxisModel().axis;s.scaleRawExtentInfoCreate(n,s.AXIS_EXTENT_INFO_BUILD_FROM_DATA_ZOOM);var o=n.scale.rawExtentInfo;this._extent=o.makeNoZoom(),this._updateMinMaxSpan();var a=t.settledOption;e&&(a=s.defaults({start:e[0],end:e[1]},a));var i=this._window=this.calculateDataWindow(a),l=i.percent,u=i.value;l[0]!==0&&o.setZoomMM(0,u[0]),l[1]!==100&&o.setZoomMM(1,u[1])}},r.prototype.filterData=function(t,e){if(!this.hostedBy(t))return;var n=this._dimName,o=this.getTargetSeriesModels(),a=t.get("filterMode"),i=this._window.value;if(a==="none")return;s.each(o,function(u){var c=u.getData(),f=c.mapDimensionsAll(n);if(f.length){if(a==="weakFilter"){var h=c.getStore(),v=s.map(f,function(d){return c.getDimensionIndex(d)},c);c.filterSelf(function(d){for(var m,A,b,E=0;E<f.length;E++){var C=h.get(v[E],d),D=!isNaN(C),_=C<i[0],M=C>i[1];if(D&&!_&&!M)return!0;D&&(b=!0),_&&(m=!0),M&&(A=!0)}return b&&m&&A})}else s.each(f,function(d){if(a==="empty")u.setData(c=c.map(d,function(A){return l(A)?A:NaN}));else{var m={};m[d]=i,c.selectRange(m)}});s.each(f,function(d){c.setApproximateExtent(i,d)})}});function l(u){return u>=i[0]&&u<=i[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._extent;s.each(["min","max"],function(o){var a=e.get(o+"Span"),i=e.get(o+"ValueSpan");i!=null&&(i=this.getAxisModel().axis.scale.parse(i)),i!=null?a=s.linearMap(n[0]+i,n,[0,100],!0):a!=null&&(i=s.linearMap(a,[0,100],n,!0)-n[0]),t[o+"Span"]=a,t[o+"ValueSpan"]=i},this)},r})(),Ar={dirtyOnOverallProgress:!0,getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(i,l){var u=r.getComponent(Q(i),l);o(i,l,u,a)})})}var e=[];t(function(o,a,i,l){if(!me(i)){var u=new br(o,a,l,r);e.push(u),Mr(i,u)}});var n=s.createHashMap();return s.each(e,function(o){s.each(o.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){var n=[];e.eachTargetAxis(function(o,a){var i=e.getAxisProxy(o,a),l=vt(e,i);l?n.push([i,l]):i.reset(e,null)}),s.each(n,function(o){o[0].reset(e,o[1].getWindow().percentInverted)}),e.eachTargetAxis(function(o,a){e.getAxisProxy(o,a).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var o=n.getWindow(),a=o.percent,i=o.value;e.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function wr(r){r.registerAction("dataZoom",function(t,e){var n=Sr(e,t);s.each(n,function(o){o.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Er=s.makeCallOnlyOnce();function pt(r){Er(r,function(){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Ar),wr(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"})})}var Rr=(function(r){s.__extends(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=s.inheritDefaultOption(ye.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(ye),Ve=s.makeInner();function Cr(r,t,e){Ve(r).coordSysRecordMap.each(function(n){var o=n.dataZoomInfoMap.get(t.uid);o&&(o.getRange=e)})}function Dr(r,t){for(var e=Ve(r).coordSysRecordMap,n=e.keys(),o=0;o<n.length;o++){var a=n[o],i=e.get(a),l=i.dataZoomInfoMap;if(l){var u=t.uid,c=l.get(u);c&&(l.removeKey(u),l.keys().length||gt(e,i))}}}function gt(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function Tr(r,t){var e={model:t,containsPoint:s.curry(Pr,t),dispatchAction:s.curry(Lr,r),dataZoomInfoMap:null,controller:null},n=e.controller=new Mt(r.getZr());return s.each(["pan","zoom","scrollMove"],function(o){n.on(o,function(a){var i=[];e.dataZoomInfoMap.each(function(l){if(a.isAvailableBehavior(l.model.option)){var u=(l.getRange||{})[o],c=u&&u(l.dzReferCoordSysInfo,e.model.mainType,e.controller,a);!l.model.get("disabled",!0)&&c&&i.push({dataZoomId:l.model.id,start:c[0],end:c[1]})}}),i.length&&e.dispatchAction(i)})}),e}function Lr(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Pr(r,t,e,n){return r.coordinateSystem.containPoint([e,n])}function Or(r,t,e){var n,o="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0,l,u;return r.each(function(c){var f=c.model,h=f.get("disabled",!0)?!1:f.get("zoomLock",!0)?"move":!0;a[o+h]>a[o+n]&&(n=h),i=i&&f.get("preventDefaultMouseMove",!0),l=s.retrieve2(f.get("cursorGrab",!0),l),u=s.retrieve2(f.get("cursorGrabbing",!0),u)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:l,cursorGrabbing:u}}}function Ir(r){r.registerUpdateLifecycle("coordsys:aftercreate",function(t,e){var n=Ve(e),o=n.coordSysRecordMap||(n.coordSysRecordMap=s.createHashMap());o.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var i=ft(a);s.each(i.infoList,function(l){var u=l.model.uid,c=o.get(u)||o.set(u,Tr(e,l.model)),f=c.dataZoomInfoMap||(c.dataZoomInfoMap=s.createHashMap());f.set(a.uid,{dzReferCoordSysInfo:l,model:a,getRange:null})})}),o.each(function(a){var i=a.controller,l,u=a.dataZoomInfoMap;if(u){var c=u.keys()[0];c!=null&&(l=u.get(c))}if(!l){gt(o,a);return}var f=Or(u,a,e);i.enable(f.controlType,f.opt),s.createOrUpdate(a,"dispatchAction",l.model.get("throttle",!0),"fixRate")})})}var zr=(function(r){s.__extends(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,n,o){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),Cr(o,e,{pan:s.bind(we.pan,this),zoom:s.bind(we.zoom,this),scrollMove:s.bind(we.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Dr(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(dt),we={zoom:function(r,t,e,n){var o=this.range,a=o.slice(),i=r.axisModels[0];if(i){var l=Ee[t](null,[n.originX,n.originY],i,e,r),u=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(a[1]-a[0])+a[0],c=Math.max(1/n.scale,0);a[0]=(a[0]-u)*c+u,a[1]=(a[1]-u)*c+u;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(s.sliderMove(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,o[0]!==a[0]||o[1]!==a[1])return a}},pan:et(function(r,t,e,n,o,a){var i=Ee[n]([a.oldX,a.oldY],[a.newX,a.newY],t,o,e);return i.signal*(r[1]-r[0])*i.pixel/i.pixelLength}),scrollMove:et(function(r,t,e,n,o,a){var i=Ee[n]([0,0],[a.scrollDelta,a.scrollDelta],t,o,e);return i.signal*(r[1]-r[0])*a.scrollDelta})};function et(r){return function(t,e,n,o){var a=this.range,i=a.slice(),l=t.axisModels[0];if(l){var u=r(i,l,t,e,n,o);if(s.sliderMove(u,i,[0,100],"all"),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}}}var Ee={grid:function(r,t,e,n,o){var a=e.axis,i={},l=o.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(i.pixel=t[0]-r[0],i.pixelLength=l.width,i.pixelStart=l.x,i.signal=a.inverse?1:-1):(i.pixel=t[1]-r[1],i.pixelLength=l.height,i.pixelStart=l.y,i.signal=a.inverse?-1:1),i},polar:function(r,t,e,n,o){var a=e.axis,i={},l=o.model.coordinateSystem,u=l.getRadiusAxis().getExtent(),c=l.getAngleAxis().getExtent();return r=r?l.pointToCoord(r):[0,0],t=l.pointToCoord(t),e.mainType==="radiusAxis"?(i.pixel=t[0]-r[0],i.pixelLength=u[1]-u[0],i.pixelStart=u[0],i.signal=a.inverse?1:-1):(i.pixel=t[1]-r[1],i.pixelLength=c[1]-c[0],i.pixelStart=c[0],i.signal=a.inverse?-1:1),i},singleAxis:function(r,t,e,n,o){var a=e.axis,i=o.model.coordinateSystem.getRect(),l={};return r=r||[0,0],a.orient==="horizontal"?(l.pixel=t[0]-r[0],l.pixelLength=i.width,l.pixelStart=i.x,l.signal=a.inverse?1:-1):(l.pixel=t[1]-r[1],l.pixelLength=i.height,l.pixelStart=i.y,l.signal=a.inverse?-1:1),l}};function Nr(r){pt(r),r.registerComponentModel(Rr),r.registerComponentView(zr),Ir(r)}var Zr=(function(r){s.__extends(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=s.inheritDefaultOption(ye.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:s.tokens.color.accent10,borderRadius:0,backgroundColor:s.tokens.color.transparent,dataBackground:{lineStyle:{color:s.tokens.color.accent30,width:.5},areaStyle:{color:s.tokens.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:s.tokens.color.accent40,width:.5},areaStyle:{color:s.tokens.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:s.tokens.color.neutral00,borderColor:s.tokens.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:s.tokens.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:s.tokens.color.tertiary},brushSelect:!0,brushStyle:{color:s.tokens.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:s.tokens.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(ye),le=s.Rect,Vr=1,Re=30,kr=7,ue="horizontal",tt="vertical",Br=5,Fr=["line","bar","candlestick","scatter"],Gr={easing:"cubicOut",duration:100,delay:0},Hr=(function(r){s.__extends(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,n){this.api=n,this._onBrush=s.bind(this._onBrush,this),this._onBrushEnd=s.bind(this._onBrushEnd,this)},t.prototype.render=function(e,n,o,a){if(r.prototype.render.apply(this,arguments),s.createOrUpdate(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){s.clear(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new s.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,n=this.api,o=e.get("brushSelect"),a=o?kr:0,i=s.createBoxLayoutReference(e,n).refContainer,l=this._findCoordRect(),u=e.get("defaultLocationEdgeGap",!0)||0,c=this._orient===ue?{right:i.width-l.x-l.width,top:i.height-Re-u-a,width:l.width,height:Re}:{right:u,top:l.y,width:Re,height:l.height},f=s.getLayoutParams(e.option);s.each(["right","top","width","height"],function(v){f[v]==="ph"&&(f[v]=c[v])});var h=s.getLayoutRect(f,i);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===tt&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,n=this._location,o=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),i=a&&a.get("inverse"),l=this._displayables.sliderGroup,u=(this._dataShadowInfo||{}).otherAxisInverse;l.attr(o===ue&&!i?{scaleY:u?1:-1,scaleX:1}:o===ue&&i?{scaleY:u?1:-1,scaleX:-1}:o===tt&&!i?{scaleY:u?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:u?-1:1,scaleX:-1,rotation:Math.PI/2});var c=e.getBoundingRect([l]),f=isNaN(c.x)?0:c.x,h=isNaN(c.y)?0:c.y;e.x=n.x-f,e.y=n.y-h,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,n=this._size,o=this._displayables.sliderGroup,a=e.get("brushSelect");o.add(new le({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new le({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:s.bind(this._onClickPanel,this)}),l=this.api.getZr();a?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",l.on("mousemove",this._onBrush),l.on("mouseup",this._onBrushEnd)):(l.off("mousemove",this._onBrush),l.off("mouseup",this._onBrushEnd)),o.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var n=this._size,o=this._shadowSize||[],a=e.series,i=a.getRawData(),l=a.getShadowDim&&a.getShadowDim(),u=l&&i.getDimensionInfo(l)?a.getShadowDim():e.otherDim;if(u==null)return;var c=this._shadowPolygonPts,f=this._shadowPolylinePts;if(i!==this._shadowData||u!==this._shadowDim||n[0]!==o[0]||n[1]!==o[1]){var h=i.getDataExtent(e.thisDim),v=i.getDataExtent(u),d=(v[1]-v[0])*.3;v=[v[0]-d,v[1]+d];var m=[0,n[1]],A=[0,n[0]],b=[[n[0],0],[0,0]],E=[],C=A[1]/Math.max(1,i.count()-1),D=n[0]/(h[1]-h[0]),_=e.thisAxis.type==="time",M=-C,L=Math.round(i.count()/n[0]),V;i.each([e.thisDim,u],function(te,B,$){if(L>0&&$%L){_||(M+=C);return}M=_?(+te-h[0])*D:M+C;var g=B==null||isNaN(B)||B==="",p=g?0:s.linearMap(B,v,m,!0);g&&!V&&$?(b.push([b[b.length-1][0],0]),E.push([E[E.length-1][0],0])):!g&&V&&(b.push([M,0]),E.push([M,0])),g||(b.push([M,p]),E.push([M,p])),V=g}),c=this._shadowPolygonPts=b,f=this._shadowPolylinePts=E}this._shadowData=i,this._shadowDim=u,this._shadowSize=[n[0],n[1]];var H=this.dataZoomModel;function O(te){var B=H.getModel(te?"selectedDataBackground":"dataBackground"),$=new s.Group,g=new s.Polygon({shape:{points:c},segmentIgnoreThreshold:1,style:B.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),p=new s.Polyline({shape:{points:f},segmentIgnoreThreshold:1,style:B.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return $.add(g),$.add(p),$}for(var W=0;W<3;W++){var j=O(W===1);this._displayables.sliderGroup.add(j),this._displayables.dataShadowSegs.push(j)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,n=e.get("showDataShadow");if(n!==!1){var o,a=this.ecModel;return e.eachTargetAxis(function(i,l){var u=e.getAxisProxy(i,l).getTargetSeriesModels();s.each(u,function(c){if(!o&&!(n!==!0&&s.indexOf(Fr,c.get("type"))<0)){var f=a.getComponent(Q(i),l).axis,h=Wr(i),v,d=c.coordinateSystem;h!=null&&d.getOtherAxis&&(v=d.getOtherAxis(f).inverse),h=c.getData().mapDimension(h);var m=c.getData().mapDimension(i);o={thisAxis:f,series:c,thisDim:m,otherDim:h,otherAxisInverse:v}}},this)},this),o}},t.prototype._renderHandle=function(){var e=this.group,n=this._displayables,o=n.handles=[null,null],a=n.handleLabels=[null,null],i=this._displayables.sliderGroup,l=this._size,u=this.dataZoomModel,c=this.api,f=u.get("borderRadius")||0,h=u.get("brushSelect"),v=n.filler=new le({silent:h,style:{fill:u.get("fillerColor")},textConfig:{position:"inside"}});i.add(v),i.add(new le({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:l[0],height:l[1],r:f},style:{stroke:u.get("dataBackgroundColor")||u.get("borderColor"),lineWidth:Vr,fill:s.tokens.color.transparent}})),s.each([0,1],function(D){var _=u.get("handleIcon");!s.symbolBuildProxies[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_,process.env.NODE_ENV!=="production"&&s.deprecateLog("handleIcon now needs 'path://' prefix when using a path string"));var M=s.createSymbol(_,-1,0,2,2,null,!0);M.attr({cursor:Yr(this._orient),draggable:!0,drift:s.bind(this._onDragMove,this,D),ondragend:s.bind(this._onDragEnd,this),onmouseover:s.bind(this._onOverDataInfoTriggerArea,this,!0),onmouseout:s.bind(this._onOverDataInfoTriggerArea,this,!1),z2:5});var L=M.getBoundingRect(),V=u.get("handleSize");this._handleHeight=s.parsePercent(V,this._size[1]),this._handleWidth=L.width/L.height*this._handleHeight,M.setStyle(u.getModel("handleStyle").getItemStyle()),M.style.strokeNoScale=!0,M.rectHover=!0,M.ensureState("emphasis").style=u.getModel(["emphasis","handleStyle"]).getItemStyle(),s.enableHoverEmphasis(M);var H=u.get("handleColor");H!=null&&(M.style.fill=H),i.add(o[D]=M);var O=u.getModel("textStyle"),W=u.get("handleLabel")||{},j=W.show||!1;e.add(a[D]=new s.ZRText({silent:!0,invisible:!j,style:s.createTextStyle(O,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:O.getTextColor(),font:O.getFont()}),z2:10}))},this);var d=v;if(h){var m=s.parsePercent(u.get("moveHandleSize"),l[1]),A=n.moveHandle=new s.Rect({style:u.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:l[1]-.5,height:m}}),b=m*.8,E=n.moveHandleIcon=s.createSymbol(u.get("moveHandleIcon"),-b/2,-b/2,b,b,s.tokens.color.neutral00,!0);E.silent=!0,E.y=l[1]+m/2-.5,A.ensureState("emphasis").style=u.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var C=Math.min(l[1]/2,Math.max(m,10));d=n.moveZone=new s.Rect({invisible:!0,shape:{y:l[1]-C,height:m+C}}),d.on("mouseover",function(){c.enterEmphasis(A)}).on("mouseout",function(){c.leaveEmphasis(A)}),i.add(A),i.add(E),i.add(d)}d.attr({draggable:!0,cursor:"grab",drift:s.bind(this._onActualMoveZoneDrift,this),ondragstart:s.bind(this._onActualMoveZoneDragStart,this),ondragend:s.bind(this._onActualMoveZoneDragEnd,this),onmouseover:s.bind(this._onOverDataInfoTriggerArea,this,!0),onmouseout:s.bind(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[s.linearMap(e[0],[0,100],n,!0),s.linearMap(e[1],[0,100],n,!0)]},t.prototype._updateInterval=function(e,n){var o=this.dataZoomModel,a=this._handleEnds,i=this._getViewExtent(),l=o.findRepresentativeAxisProxy().getMinMaxSpan(),u=[0,100];s.sliderMove(n,a,i,o.get("zoomLock")?"all":e,l.minSpan!=null?s.linearMap(l.minSpan,u,i,!0):null,l.maxSpan!=null?s.linearMap(l.maxSpan,u,i,!0):null);var c=this._range,f=this._range=s.asc([s.linearMap(a[0],i,u,!0),s.linearMap(a[1],i,u,!0)]);return!c||c[0]!==f[0]||c[1]!==f[1]},t.prototype._updateView=function(e){var n=this._displayables,o=this._handleEnds,a=s.asc(o.slice()),i=this._size;s.each([0,1],function(d){var m=n.handles[d],A=this._handleHeight;m.attr({scaleX:A/2,scaleY:A/2,x:o[d]+(d?-1:1),y:i[1]/2-A/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:i[1]});var l={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(l),n.moveZone.setShape(l),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",l.x+l.width/2));for(var u=n.dataShadowSegs,c=[0,a[0],a[1],i[0]],f=0;f<u.length;f++){var h=u[f],v=h.getClipPath();v||(v=new s.Rect,h.setClipPath(v)),v.setShape({x:c[f],y:0,width:c[f+1]-c[f],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var n=this.dataZoomModel,o=this._displayables,a=o.handleLabels,i=this._orient,l=["",""];if(n.get("showDetail")){var u=n.findRepresentativeAxisProxy(),c=u.getAxisModel().axis.scale;if(u){var f=this._range,h;if(e){var v={start:f[0],end:f[1]},d=vt(n,u);if(d){var m=d.calculateDataWindow(v).percentInverted;v={start:m[0],end:m[1]}}h=u.calculateDataWindow(v)}else h=u.getWindow();l=[rt(n,0,h,c),rt(n,1,h,c)]}}var A=s.asc(this._handleEnds.slice());b.call(this,0),b.call(this,1);function b(E){var C=s.getTransform(o.handles[E].parent,this.group),D=s.transformDirection(E===0?"right":"left",C),_=this._handleWidth/2+Br,M=s.applyTransform$1([A[E]+(E===0?-_:_),this._size[1]/2],C);a[E].setStyle({x:M[0],y:M[1],verticalAlign:i===ue?"middle":D,align:i===ue?D:"center",text:l[E]})}},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var n=this.dataZoomModel.get("handleLabel")||{},o=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),i=a.get("show")||!1,l=e||this._dragging?i:o,u=this._displayables,c=u.handleLabels;c[0].attr("invisible",!l),c[1].attr("invisible",!l),u.moveHandle&&this.api[l?"enterEmphasis":"leaveEmphasis"](u.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,n,o){this.api.getZr().setCursorStyle("grabbing"),this._onDragMove("all",e,n,o)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr("cursor","grabbing"),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr("cursor","grab"),this._onDragEnd()},t.prototype._onDragMove=function(e,n,o,a){this._dragging=!0,s.stop(a.event);var i=this._displayables.sliderGroup.getLocalTransform(),l=s.applyTransform$1([n,o],i,!0),u=this._updateInterval(e,l[0]),c=this.dataZoomModel.get("realtime");this._updateView(!c),u&&c&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var n=this._size,o=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(o[0]<0||o[0]>n[0]||o[1]<0||o[1]>n[1])){var a=this._handleEnds,i=(a[0]+a[1])/2,l=this._updateInterval("all",o[0]-i);this._updateView(),l&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var n=e.offsetX,o=e.offsetY;this._brushStart=new s.Point(n,o),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var o=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(o.width)<5)){var i=this._getViewExtent(),l=[0,100],u=this._handleEnds=[o.x,o.x+o.width],c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();s.sliderMove(0,u,i,0,c.minSpan!=null?s.linearMap(c.minSpan,l,i,!0):null,c.maxSpan!=null?s.linearMap(c.maxSpan,l,i,!0):null),this._range=s.asc([s.linearMap(u[0],i,l,!0),s.linearMap(u[1],i,l,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(s.stop(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,n){var o=this._displayables,a=this.dataZoomModel,i=o.brushRect;i||(i=o.brushRect=new le({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),o.sliderGroup.add(i)),i.attr("ignore",!1);var l=this._brushStart,u=this._displayables.sliderGroup,c=u.transformCoordToLocal(e,n),f=u.transformCoordToLocal(l.x,l.y),h=this._size;c[0]=Math.max(Math.min(h[0],c[0]),0),i.setShape({x:f[0],y:0,width:c[0]-f[0],height:h[1]})},t.prototype._dispatchZoomAction=function(e){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?Gr:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var e,n=ft(this.dataZoomModel).infoList;if(!e&&n.length){var o=n[0].model.coordinateSystem;e=o.getRect&&o.getRect()}if(!e){var a=this.api.getWidth(),i=this.api.getHeight();e={x:a*.2,y:i*.2,width:a*.6,height:i*.6}}return e},t.type="dataZoom.slider",t})(dt);function rt(r,t,e,n){var o=r.get("labelFormatter"),a=r.get("labelPrecision");(a==null||a==="auto")&&(a=e.valuePrecision);var i=e.value[t],l=i==null||isNaN(i)?"":s.isOrdinalScale(n)||s.isTimeScale(n)?n.getLabel({value:Math.round(i)}):isFinite(a)?s.round(i,a,!0):i+"";return s.isFunction(o)?o(i,l):s.isString(o)?o.replace("{value}",l):l}function Wr(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function Yr(r){return r==="vertical"?"ns-resize":"ew-resize"}function Ur(r){r.registerComponentModel(Zr),r.registerComponentView(Hr),pt(r)}function $r(r){s.use(Nr),s.use(Ur)}const Xr={class:"reportifact-timeline-toolbar"},Kr=["onClick"],nt="#ef4444",Ce="Cuts",qr=22,jr=w.defineComponent({__name:"Timeline",props:{url:{default:void 0},src:{default:void 0},data:{default:void 0},options:{default:void 0}},emits:["row-click"],setup(r,{expose:t,emit:e}){var Z,Y,I;s.use([s.install,mr,s.install$1,s.install$2,s.install$3,s.install$4,$r]);const n=["#3b82f6","#f59e0b","#10b981","#8b5cf6","#0ea5e9","#64748b","#ec4899","#14b8a6"],o=[{value:"seconds",label:"sec"},{value:"clock",label:"mm:ss"}],a=w.ref(!1);let i=null;w.onMounted(()=>{a.value=document.documentElement.classList.contains("dark"),i=new MutationObserver(()=>{a.value=document.documentElement.classList.contains("dark")}),i.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}),w.onUnmounted(()=>{i==null||i.disconnect()});const l=r,u=e,c=w.ref([]),f=w.computed(()=>l.data===void 0?l.src??l.url??"":""),h=w.ref(((Z=l.options)==null?void 0:Z.timeFormat)==="clock"?"clock":"seconds"),v=((Y=l.options)==null?void 0:Y.zoom)===!0||((I=l.options)==null?void 0:I.zoom)==="true",{loading:d,error:m,fetchData:A}=mt.useFetch(f,{async onSuccess(x){C(await x.json())}}),b=w.computed(()=>l.data===void 0&&d.value),E=w.computed(()=>l.data!==void 0?null:l.src||l.url?m.value:"Resource not found in asset");function C(x){const S=Array.isArray(x)?x:typeof x=="object"&&x!==null&&"rows"in x?x.rows:[];c.value=D(S)}w.watch(()=>l.data,x=>{x!==void 0&&C(x)},{immediate:!0,deep:!0});function D(x){if(!Array.isArray(x))return[];const S=[];for(const R of x){if(typeof R!="object"||R===null)continue;const y=R,k=Number(y.end);if(typeof y.name!="string"||!Number.isFinite(k))continue;const N=Number(y.start),F=Array.isArray(y.cuts)?y.cuts.map(Number).filter(Number.isFinite).sort((z,P)=>z-P):[];S.push({id:typeof y.id=="string"?y.id:void 0,name:y.name,group:typeof y.group=="string"&&y.group?y.group:void 0,color:typeof y.color=="string"&&y.color?y.color:void 0,start:Number.isFinite(N)?N:0,end:k,cuts:F,click:typeof y.click=="object"&&y.click!==null?y.click:void 0})}return S}const _=w.computed(()=>`${Math.max(280,c.value.length*qr+(v?150:126))}px`),M=w.computed(()=>c.value.reduce((x,S)=>Math.max(x,S.end),0));function L(x,S,R){const y=Math.max(0,Math.round(x));if(S==="seconds")return`${y}s`;const k=Math.floor(y/3600),N=Math.floor(y%3600/60),F=y%60,z=P=>String(P).padStart(2,"0");return R>=3600?`${z(k)}:${z(N)}:${z(F)}`:`${z(N)}:${z(F)}`}const V=w.computed(()=>{const x=[];for(const S of c.value){const R=S.group??"";x.includes(R)||x.push(R)}return x});function H(x){const S=V.value.indexOf(x);return n[Math.max(0,S)%n.length]}function O(x,S){return s.clipRectByRect(S,x.coordSys)}function W(x){return Math.min(x.size([0,1])[1]*.6,14)}function j(x,S){const R=S.value(0),y=S.coord([S.value(1),R]),k=S.coord([S.value(2),R]),N=W(S),F=O(x,{x:y[0],y:y[1]-N/2,width:Math.max(k[0]-y[0],1),height:N});if(!F)return;const z=c.value[R];return{type:"rect",shape:{...F,r:2},style:{fill:(z==null?void 0:z.color)??S.visual("color")}}}function te(x,S){const R=S.value(0),y=S.coord([S.value(1),R]),k=W(S)+4,N=O(x,{x:y[0]-1,y:y[1]-k/2,width:2,height:k});if(N)return{type:"rect",shape:N,style:{fill:nt}}}function B(x){return typeof x=="object"&&x!==null&&"rowIndex"in x}function $(x,S){var P;const R=x;if(!B(R.data))return"";const y=c.value[R.data.rowIndex];if(!y)return"";if(R.seriesName===Ce){const U=R.data.value[1];return`${y.name}<br/>cut @ <strong>${S(U)}</strong>`}const k=S(y.end-(y.start??0)),N=`${S(y.start??0)} – ${S(y.end)}`,F=y.group?`${y.group} · `:"",z=(P=y.cuts)!=null&&P.length?`${y.cuts.length} cuts: ${y.cuts.map(U=>S(U)).join(", ")}`:"no cuts";return`<strong>${y.name}</strong><br/>${F}${k} (${N})<br/>${z}`}const g=w.computed(()=>{var z;if(!c.value.length)return null;const x=h.value,S=M.value||1,R=P=>L(P,x,S),y=V.value.map(P=>({name:P||"videos",type:"custom",renderItem:j,itemStyle:{color:H(P)},encode:{x:[1,2],y:0},data:c.value.map((U,ce)=>({value:[ce,U.start??0,U.end],rowIndex:ce})).filter(U=>(c.value[U.rowIndex].group??"")===P)})),k=c.value.flatMap((P,U)=>(P.cuts??[]).map(ce=>({value:[U,ce],rowIndex:U}))),N={name:Ce,type:"custom",renderItem:te,itemStyle:{color:nt},encode:{x:1,y:0},z:10,data:k},F=typeof((z=l.options)==null?void 0:z.title)=="string"?l.options.title:"";return{animationDurationUpdate:0,backgroundColor:"transparent",title:F?{text:F,left:0,top:0,textStyle:{fontSize:14}}:void 0,legend:{top:0,left:"center",data:[...y.map(P=>P.name),Ce]},tooltip:{trigger:"item",textStyle:{fontSize:12},formatter:P=>$(P,R)},grid:{left:8,right:16,top:32,bottom:v?44:24,containLabel:!0},xAxis:{type:"value",min:0,max:S,axisLabel:{fontSize:10,formatter:R}},yAxis:{type:"category",inverse:!0,data:c.value.map(P=>P.name),axisLabel:{fontSize:10,width:180,overflow:"truncate"}},dataZoom:v?[{type:"inside",xAxisIndex:0},{type:"slider",xAxisIndex:0,height:16,bottom:8,labelFormatter:R}]:void 0,series:[...y,N]}});function p(x){var y;const S=x;if(!B(S.data))return;const R=(y=c.value[S.data.rowIndex])==null?void 0:y.click;R&&u("row-click",R)}function T(){l.data!==void 0?C(l.data):A()}return t({refresh:T}),(x,S)=>(w.openBlock(),w.createBlock(yt._sfc_main,{loading:!c.value.length&&b.value,error:E.value},{skeleton:w.withCtx(()=>[w.createElementVNode("div",{class:"reportifact-chart-skeleton",style:w.normalizeStyle({"--reportifact-chart-height":_.value})},[...S[0]||(S[0]=[w.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"200px",height:"24px","margin-bottom":"16px"}},null,-1),w.createElementVNode("div",{class:"reportifact-skeleton-line reportifact-chart-skeleton-body"},null,-1)])],4)]),default:w.withCtx(()=>[w.createElementVNode("div",{class:"reportifact-timeline-container",style:w.normalizeStyle({"--reportifact-chart-height":_.value})},[w.createElementVNode("div",Xr,[(w.openBlock(),w.createElementBlock(w.Fragment,null,w.renderList(o,R=>w.createElementVNode("button",{key:R.value,type:"button",class:w.normalizeClass(["reportifact-timeline-mode",{"is-active":h.value===R.value}]),onClick:y=>h.value=R.value},w.toDisplayString(R.label),11,Kr)),64))]),g.value?(w.openBlock(),w.createBlock(w.unref(s.src_default),{key:0,option:g.value,theme:a.value?"dark":void 0,autoresize:!0,class:"reportifact-chart",onClick:p},null,8,["option","theme"])):w.createCommentVNode("",!0)],4)]),_:1},8,["loading","error"]))}});exports._sfc_main=jr;
|