2026-07-09 15:20:19 +03:30
|
|
|
|
import{o as Zt,c as ue,L as SR,d as kD,h as ha,a as Z,F as hr,n as Mn,j as Rt,i as pa,w as Lr,b as ve,t as oe,J as RD,G as se,g as te,v as xR,O as dn,P as wR,x as Na,y as Lo,e as G_,Q as dm,_ as pn}from"./index-a08997de.js";import{_ as bR}from"./button.vue_vue_type_style_index_0_lang-1caad4e7.js";import{_ as TR}from"./BasicSelect.vue_vue_type_style_index_0_lang-1736298d.js";import{_ as CR}from"./_plugin-vue_export-helper-20260c74.js";import{S as Ln}from"./index-23f9a644.js";import{T as Fl}from"./isSymbol-6a02f777.js";import{I as F_}from"./Icon-c87fac13.js";import{_ as Io}from"./InputDatePicker.vue_vue_type_script_setup_true_lang-e9758822.js";import{m as Ue,a as Ba}from"./useDataTime-e1a8db4a.js";import{u as DR}from"./usePrice-bc935b83.js";import"./lodash-aac8995a.js";import"./fa_IR-22f438b3.js";import"./toArray-efae666c.js";import"./vnode-ddd966cb.js";import"./FormItemContext-5c31efc9.js";import"./pickAttrs-a3c5523a.js";import"./useState-4330fc6d.js";const AR={},MR={class:"bg-gradient"};function LR(r,e){return Zt(),ue("div",MR,[SR(r.$slots,"default")])}const Hl=CR(AR,[["render",LR]]),H_="/assets/users4-80585f51.svg",W_="/assets/users3-3a96ddd8.svg",Dh="/assets/users5-1dc3f500.svg",IR="/assets/users2-8002992a.svg",PR={class:"grid grid-cols-1 md:grid-cols-4 gap-3"},kR={class:"flex"},RR=["src","alt"],ER={class:"flex flex-col justify-between w-full mr-2"},OR={class:"text-base font-bold"},NR={class:"flex items-center justify-end min-h-[24px]"},BR={class:"text-base font-bold"},VR={class:"mr-1"},zR={class:"grid grid-cols-1 md:grid-cols-4 gap-3 mt-3"},GR={class:"flex"},FR=["src","alt"],HR={class:"flex flex-col justify-between w-full mr-2"},WR={class:"text-base font-bold"},$R={class:"flex items-center justify-end min-h-[24px]"},UR={class:"text-base font-bold"},YR={class:"mr-1"},ZR=kD({__name:"Header",props:{statistics:{},loading:{type:Boolean,default:!1}},setup(r){const e=r,t=ha(()=>{var i,o,s,l;return[{title:"تعداد کاربران",alt:"sales-number",image:IR,value:((i=e.statistics.count_sale_order)==null?void 0:i.toLocaleString("fa-IR"))||"0",unit:"Ù†Ù�ر"},{title:"کاربران جدید 7 روز گذشته",alt:"new-users-last-7-days",image:Dh,value:((o=e.statistics.new_users_last_7_days)==null?void 0:o.toLocaleString("fa-IR"))||"0",unit:"Ù†Ù�ر"},{title:"کاربران Ù�عال این Ù‡Ù�ته",alt:"active-users-saturday-to-friday",image:W_,value:((s=e.statistics.active_users_saturday_to_friday)==null?void 0:s.toLocaleString("fa-IR"))||"0",unit:"Ù†Ù�ر"},{title:"کاربران Ù�عال این ماه",alt:"active-users-jalali-month",image:H_,value:((l=e.statistics.active_users_jalali_month)==null?void 0:l.toLocaleString("fa-IR"))||"0",unit:"Ù†Ù�ر"}]}),a=ha(()=>{var i,o,s;return[{title:"کاربران جدید امروز",alt:"customers",image:Dh,value:e.statistics.new_customer,unit:"Ù†Ù�ر"},{title:"کاربران جدید 30 روز گذشته",alt:"new-users-last-30-days",image:Dh,value:((i=e.statistics.new_users_last_30_days)==null?void 0:i.toLocaleString("fa-IR"))||"0",unit:"Ù†Ù�ر"},{title:"کاربران Ù�عال Ù‡Ù�ته گذشته",alt:"active-users-last-week",image:W_,value:((o=e.statistics.active_users_last_week)==null?void 0:o.toLocaleString("fa-IR"))||"0",unit:"Ù†Ù�ر"},{title:"کاربران Ù�عال ماه گذشته",alt:"active-users-last-month",image:H_,value:((s=e.statistics.active_users_last_month)==null?void 0:s.toLocaleString("fa-IR"))||"0",unit:"Ù†Ù�ر"}]}),n=i=>({"تعداد کاربران":"این عدد تعداد Ú©Ù„ کاربران ثبت‌نام شده در سیستم از اول تا ØØ§Ù„ا را نشان می‌دهد","کاربران جدید 7 روز گذشته":"این عدد تعداد کاربرانی است Ú©Ù‡ در 7 روز گذشته ثبت‌نام کرده‌اند","کاربران Ù�عال این Ù‡Ù�ته":"این عدد تعداد کاربرانی است Ú©Ù‡ در این Ù‡Ù�ته (از شنبه تا جمعه) ØØ¯Ø§Ù‚Ù„ یک بازدید از یک قسمت از اپ داشته‌اند","کاربران Ù�عال این ماه":"این عدد تعداد کاربرانی است Ú
|
2026-07-08 14:49:49 +03:30
|
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
***************************************************************************** */var ag=function(r,e){return ag=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])},ag(r,e)};function N(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ag(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var QR=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),tE=function(){function r(){this.browser=new QR,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),Cn=new tE;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Cn.wxa=!0,Cn.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Cn.worker=!0:!Cn.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Cn.node=!0,Cn.svgSupported=!0):eE(navigator.userAgent,Cn);function eE(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),n&&(t.ie=!0,t.version=n[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}const Ft=Cn;var pm=12,ED="sans-serif",Qa=pm+"px "+ED,rE=20,aE=100,nE="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function iE(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var a=String.fromCharCode(t+32),n=(r.charCodeAt(t)-rE)/aE;e[a]=n}return e}var oE=iE(nE),jr={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,a){if(!r){var n=jr.createCanvas();r=n&&n.getContext("2d")}if(r)return e!==a&&(e=r.font=a||Qa),r.measureText(t);t=t||"",a=a||Qa;var i=/((?:\d+)?\.?\d*)px/.exec(a),o=i&&+i[1]||pm,s=0;if(a.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=oE[t[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,e,t){var a=new Image;return a.onload=e,a.onerror=t,a.src=r,a}},OD=La(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),ND=La(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),Rs=Object.prototype.toString,zv=Array.prototype,sE=zv.forEach,lE=zv.filter,gm=zv.slice,uE=zv.map,$_=function(){}.constructor,Ku=$_?$_.prototype:null,ym="__proto__",fE=2311;function BD(){return fE++}function mm(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function ft(r){if(r==null||typeof r!="object")return r;var e=r,t=Rs.call(r);if(t==="[object Array]"){if(!Wl(r)){e=[];for(var a=0,n=r.length;a<n;a++)e[a]=ft(r[a])}}else if(ND[t]){if(!Wl(r)){var i=r.constructor;if(i.from)e=i.from(r);else{e=new i(r.length);for(var a=0,n=r.length;a<n;a++)e[a]=r[a]}}}else if(!OD[t]&&!Wl(r)&&!_s(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==ym&&(e[o]=ft(r[o]))}return e}function At(r,e,t){if(!gt(e)||!gt(r))return t?ft(e):r;for(var a in e)if(e.hasOwnProperty(a)&
|
|
|
|
|
|
`),i=n.length;if(i===1)return m1(n[0],e,t,a);for(var o=new _t(0,0,0,0),s=0;s<n.length;s++){var l=m1(n[s],e,t,a);s===0?o.copy(l):o.union(l)}return o}function xs(r,e,t,a){return t==="right"?a?r+=e:r-=e:t==="center"&&(a?r+=e/2:r-=e/2),r}function ji(r,e,t,a){return t==="middle"?a?r+=e/2:r-=e/2:t==="bottom"&&(a?r+=e:r-=e),r}function Ru(r){return Aa(r).stWideCharWidth}function Qr(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function Hc(r,e,t){var a=e.position||"inside",n=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,f="left",c="top";if(a instanceof Array)l+=Qr(a[0],t.width),u+=Qr(a[1],t.height),f=null,c=null;else switch(a){case"left":l-=n,u+=s,f="right",c="middle";break;case"right":l+=n+o,u+=s,c="middle";break;case"top":l+=o/2,u-=n,f="center",c="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=n,u+=s,c="middle";break;case"insideRight":l+=o-n,u+=s,f="right",c="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",c="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=i-n,c="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",c="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=c,r}var Uh="__zr_normal__",Yh=Pa.concat(["ignore"]),EO=La(Pa,function(r,e){return r[e]=!0,r},{ignore:!1}),Eo={},OO=new _t(0,0,0,0),of=[],Mm=function(){function r(e){this.id=BD(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;i.copyTransform(t);var f=a.position!=null,c=a.autoOverflowArea,v=void 0;if((c||f)&&(v=OO,a.layoutRect?v.copy(a.layoutRect):v.copy(this.getBoundingRect()),n||v.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(Eo,a,v):Hc(Eo,a,v),i.x=Eo.x,i.y=Eo.y,o=Eo.align,s=Eo.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var d=void 0,p=void 0;h==="center"?(d=v.width*.5,p=v.height*.5):(d=Qr(h[0],v.width),p=Qr(h[1],v.height)),u=!0,i.originX=-i.x+d+(n?0:v.x),i.originY=-i.y+p+(n?0:v.y)}}a.rotation!=null&&(i.rotation=a.rotation);var g=a.offset;g&&(i.x+=g[0],i.y+=g[1],u||(i.originX=-g[0],i.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(c){var m=y.overflowRect=y.overflowRect||new _t(0,0,0,0);i.getLocalTransform(of),Jr(of,of),_t.copy(m,v),m.applyTransform(of)}else y.overflowRect=null;var _=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,S=void 0,x=void 0,w=void 0;_&&this.canBeInsideText()?(S=a.insideFill,x=a.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(x==null||x==="auto")&&(x=this.getInsideTextStroke(S),w=!0)):(S=a.outsideFill,x=a.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(x==null||x==="auto")&&(x=this.getOutsideStroke(S),w=!0)),S=S||"#000",(S!==y.fill||x!==y.stroke||w!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=x,y.autoStroke=w,y.align=o,y.verticalAlign=s,t.setDefaultTextStyle(y)),t.__dirty|=gr,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Mg:Ag},r.prototype.getOutsid
|
|
|
|
|
|
* ZRender, a high performance 2d drawing library.
|
|
|
|
|
|
*
|
|
|
|
|
|
* Copyright (c) 2013, Baidu Inc.
|
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
|
*
|
|
|
|
|
|
* LICENSE
|
|
|
|
|
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
|
|
|
|
*/var _c={},gA={};function GO(r){delete gA[r]}function FO(r){if(!r)return!1;if(typeof r=="string")return Vc(r,1)<Dg;if(r.colorStops){for(var e=r.colorStops,t=0,a=e.length,n=0;n<a;n++)t+=Vc(e[n].color,1);return t/=a,t<Dg}return!1}var HO=function(){function r(e,t,a){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,a=a||{},this.dom=t,this.id=e;var i=new jE,o=a.renderer||"canvas";_c[o]||(o=Ot(_c)[0]),a.useDirtyRect=a.useDirtyRect==null?!1:a.useDirtyRect;var s=new _c[o](t,i,a,e),l=a.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!Ft.node&&!Ft.worker&&!l?new IO(s.getViewportRoot(),s.root):null,f=a.useCoarsePointer,c=f==null||f==="auto"?Ft.touchEventsSupported:!!f,v=44,h;c&&(h=ot(a.pointerSize,v)),this.handler=new YE(i,s,u,s.root,h),this.animation=new wO({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=FO(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,a=ls();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var n=ls();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-a})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,a){return this._disposed||this.handler.on(e,t,a),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof ct&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,GO(this.id))},r}();function _1(r,e){var t=new HO(BD(),r,e);return gA[t.id]=t,t}function WO(r,e){_c[r]=e}var Lg;function $O(r){if(typeof Lg=="function
|
|
|
|
|
|
`);i=RA(t,a,n,i);for(var s=!1,l={},u=0,f=o.length;u<f;u++)EA(l,o[u],i),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
|
|
|
|
`),r.isTruncated=s}function RA(r,e,t,a){a=a||{};var n=H({},a);t=ot(t,"..."),n.maxIterations=ot(a.maxIterations,2);var i=n.minChar=ot(a.minChar,0),o=n.fontMeasureInfo=Aa(e),s=o.asciiCharWidth;n.placeholder=ot(a.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<i&&l>=s;u++)l-=s;var f=Ma(o,t);return f>l&&(t="",f=0),l=r-f,n.ellipsis=t,n.ellipsisWidth=f,n.contentWidth=l,n.containerWidth=r,n}function EA(r,e,t){var a=t.containerWidth,n=t.contentWidth,i=t.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=Ma(i,e);if(o<=a){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?IN(e,n,i):o>0?Math.floor(e.length*n/o):0;e=e.substr(0,l),o=Ma(i,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function IN(r,e,t){for(var a=0,n=0,i=r.length;n<i&&a<e;n++)a+=vA(t,r.charCodeAt(n));return n}function PN(r,e,t,a){var n=Em(r),i=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,f=i==="truncate",c=Ru(u),v=ot(e.lineHeight,c),h=e.lineOverflow==="truncate",d=!1,p=e.width;p==null&&t!=null&&(p=t-s);var g=e.height;g==null&&a!=null&&(g=a-l);var y;p!=null&&(i==="break"||i==="breakAll")?y=n?OA(n,e.font,p,i==="breakAll",0).lines:[]:y=n?n.split(`
|
|
|
|
|
|
`):[];var m=y.length*v;if(g==null&&(g=m),m>g&&h){var _=Math.floor(g/v);d=d||y.length>_,y=y.slice(0,_),m=y.length*v}if(n&&f&&p!=null)for(var S=RA(p,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),x={},w=0;w<y.length;w++)EA(x,y[w],S),y[w]=x.textLine,d=d||x.isTruncated;for(var b=g,T=0,C=Aa(u),w=0;w<y.length;w++)T=Math.max(Ma(C,y[w]),T);p==null&&(p=T);var A=p;return b+=l,A+=s,{lines:y,height:g,outerWidth:A,outerHeight:b,lineHeight:v,calculatedLineHeight:c,contentWidth:T,contentHeight:m,width:p,isTruncated:d}}var kN=function(){function r(){}return r}(),M1=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),RN=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r}();function EN(r,e,t,a,n){var i=new RN,o=Em(r);if(!o)return i;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,f=e.width;f==null&&t!=null&&(f=t-l);var c=e.height;c==null&&a!=null&&(c=a-u);for(var v=e.overflow,h=(v==="break"||v==="breakAll")&&f!=null?{width:f,accumWidth:0,breakAll:v==="breakAll"}:null,d=jh.lastIndex=0,p;(p=jh.exec(o))!=null;){var g=p.index;g>d&&Jh(i,o.substring(d,g),e,h),Jh(i,p[2],e,h,p[1]),d=jh.lastIndex}d<o.length&&Jh(i,o.substring(d,o.length),e,h);var y=[],m=0,_=0,S=v==="truncate",x=e.lineOverflow==="truncate",w={};function b(Et,Ht,mt){Et.width=Ht,Et.lineHeight=mt,m+=mt,_=Math.max(_,Ht)}t:for(var T=0;T<i.lines.length;T++){for(var C=i.lines[T],A=0,M=0,I=0;I<C.tokens.length;I++){var L=C.tokens[I],P=L.styleName&&e.rich[L.styleName]||{},R=L.textPadding=P.padding,k=R?R[1]+R[3]:0,O=L.font=P.font||e.font;L.contentHeight=Ru(O);var E=ot(P.height,L.contentHeight);if(L.innerHeight=E,R&&(E+=R[0]+R[2]),L.height=E,L.lineHeight=_r(P.lineHeight,e.lineHeight,E),L.align=P&&P.align||n,L.verticalAlign=P&&P.verticalAlign||"middle",x&&c!=null&&m+L.lineHeight>c){var B=i.lines.length;I>0?(C.tokens=C.tokens.slice(0,I),b(C,M,A),i.lines=i.lines.slice(0,T+1)):i.lines=i.lines.slice(0,T),i.isTruncated=i.isTruncated||i.lines.length<B;break t}var z=P.width,W=z==null||z==="auto";if(typeof z=="string"&&z.charAt(z.length-1)==="%")L.percentWidth=z,y.push(L),L.contentWidth=Ma(Aa(O),L.text);else{if(W){var $=P.backgroundColor,K=$&&$.image;K&&(K=MN(K),Xv(K)&&(L.width=Math.max(L.width,K.width*E/K.height)))}var et=S&&f!=null?f-M:null;et!=null&&et<L.width?!W||et<k?(L.text="",L.width=L.contentWidth=0):(LN(w,L.text,et-k,O,e.ellipsis,{minChar:e.truncateMinChar}),L.text=w.text,i.isTruncated=i.isTruncated||w.isTruncated,L.width=L.contentWidth=Ma(Aa(O),L.text)):L.contentWidth=Ma(Aa(O),L.text)}L.width+=k,M+=L.width,P&&(A=Math.max(A,L.lineHeight))}b(C,M,A)}i.outerWidth=i.width=ot(f,_),i.outerHeight=i.height=ot(c,m),i.contentHeight=m,i.contentWidth=_,i.outerWidth+=l,i.outerHeight+=u;for(var T=0;T<y.length;T++){var L=y[T],yt=L.percentWidth;L.width=parseInt(yt,10)/100*i.width}return i}function Jh(r,e,t,a,n){var i=e==="",o=n&&t.rich[n]||{},s=r.lines,l=o.font||t.font,u=!1,f,c;if(a){var v=o.padding,h=v?v[1]+v[3]:0;if(o.width!=null&&o.width!=="auto"){var d=Qr(o.width,a.width)+h;s.length>0&&d+a.accumWidth>a.width&&(f=e.split(`
|
|
|
|
|
|
`),u=!0),a.accumWidth=d}else{var p=OA(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=p.accumWidth+h,c=p.linesWidths,f=p.lines}}f||(f=e.split(`
|
|
|
|
|
|
`));for(var g=Aa(l),y=0;y<f.length;y++){var m=f[y],_=new kN;if(_.styleName=n,_.text=m,_.isLineHolder=!m&&!i,typeof o.width=="number"?_.width=o.width:_.width=c?c[y]:Ma(g,m),!y&&!u){var S=(s[s.length-1]||(s[0]=new M1)).tokens,x=S.length;x===1&&S[0].isLineHolder?S[0]=_:(m||!x||i)&&S.push(_)}else s.push(new M1([_]))}}function ON(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var NN=La(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function BN(r){return ON(r)?!!NN[r]:!0}function OA(r,e,t,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,c=Aa(e),v=0;v<r.length;v++){var h=r.charAt(v);if(h===`
|
|
|
|
|
|
`){l&&(s+=l,f+=u),i.push(s),o.push(f),s="",l="",u=0,f=0;continue}var d=vA(c,h.charCodeAt(0)),p=a?!1:!BN(h);if(i.length?f+d>t:n+f+d>t){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=h,u+=d,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=h,f=d)):p?(i.push(l),o.push(u),l=h,u=d):(i.push(h),o.push(d));continue}f+=d,p?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=n),{accumWidth:f,lines:i,linesWidths:o}}function L1(r,e,t,a,n,i){if(r.baseX=t,r.baseY=a,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;_t.set(I1,xs(t,o,n),ji(a,s,i),o,s),_t.intersect(e,I1,null,P1);var l=P1.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=xs(l.x,l.width,n,!0),r.baseY=ji(l.y,l.height,i,!0)}}var I1=new _t(0,0,0,0),P1={outIntersectRect:{},clamp:!0};function Em(r){return r!=null?r+="":r=""}function VN(r){var e=Em(r.text),t=r.font,a=Ma(Aa(t),e),n=Ru(t);return kg(r,a,n,null)}function kg(r,e,t,a){var n=new _t(xs(r.x||0,e,r.textAlign),ji(r.y||0,t,r.textBaseline),e,t),i=a??(NA(r)?r.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function NA(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var Rg="__zr_style_"+Math.round(Math.random()*10),Ji={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},qv={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ji[Rg]=!0;var k1=["z","z2","invisible"],zN=["invisible"],GN=function(r){N(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=Ot(t),n=0;n<a.length;n++){var i=a[n];i==="style"?this.useStyle(t[i]):r.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,a,n,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&FN(this,t,a)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,a){return this.rectContain(t,a)},e.prototype.traverse=function(t,a){t.call(a,this)},e.prototype.rectContain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();return i.contain(n[0],n[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var a=this.transform,n=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,s=i.shadowOffsetX||0,l=i.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new _t(0,0,0,0)),a?_t.applyTransform(t,n,a):t.copy(n),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new _t(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,a){t!=="style"?r.prototype.attrKV.call(this,t,a):this.style?this.setStyle(a):this.useStyle(a)},e.prototype.setStyle=function(t,a){return typeof t=="string"?this.style[t]=a:H(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=Ll,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&Ll)},e.prototype.styleUpdated=function(){this.__dirty&=~Ll},e.prototype.createStyle=function(t){return Hv(Ji,t)},e.prototype
|
|
|
|
|
|
`,`
|
|
|
|
|
|
|
|
|
|
|
|
`,`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`];function we(r,e){return e.type=r,e}function ty(r){return r.type==="section"}function M2(r){return ty(r)?r5:a5}function L2(r){if(ty(r)){var e=0,t=r.blocks.length,a=t>1||t>0&&!r.noHeader;return D(r.blocks,function(n){var i=L2(n);i>=e&&(e=i+ +(a&&(!i||ty(n)&&!n.noHeader)))}),e}return 0}function r5(r,e,t,a){var n=e.noHeader,i=n5(L2(e)),o=[],s=e.blocks||[];Ke(!s||U(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(at(u,l)){var f=new x2(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(p,g){var y=e.valueFormatter,m=M2(p)(y?H(H({},r),{valueFormatter:y}):r,p,g>0?i.html:0,a);m!=null&&o.push(m)});var c=r.renderMode==="richText"?o.join(i.richText):ey(a,o.join(""),n?t:i.html);if(n)return c;var v=Xg(e.header,"ordinal",r.useUTC),h=A2(a,r.renderMode).nameStyle,d=D2(a);return r.renderMode==="richText"?I2(r,v,h)+i.richText+c:ey(a,'<div style="'+h+";"+d+';">'+Ze(v)+"</div>"+c,t)}function a5(r,e,t,a){var n=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(S){return S=U(S)?S:[S],Y(S,function(x,w){return Xg(x,U(h)?h[w]:h,u)})};if(!(i&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||V.color.secondary,n),v=i?"":Xg(l,"ordinal",u),h=e.valueType,d=o?[]:f(e.value,e.dataIndex),p=!s||!i,g=!s&&i,y=A2(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":c)+(i?"":I2(r,v,m))+(o?"":s5(r,d,p,g,_)):ey(a,(s?"":c)+(i?"":i5(v,!s,m))+(o?"":o5(d,p,g,_)),t)}}function GS(r,e,t,a,n,i){if(r){var o=M2(r),s={useUTC:n,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function n5(r){return{html:t5[r],richText:e5[r]}}function ey(r,e,t){var a='<div style="clear:both"></div>',n="margin: "+t+"px 0 0",i=D2(r);return'<div style="'+n+";"+i+';">'+e+a+"</div>"}function i5(r,e,t){var a=e?"margin-left:2px":"";return'<span style="'+t+";"+a+'">'+Ze(r)+"</span>"}function o5(r,e,t,a){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return r=U(r)?r:[r],'<span style="'+i+";"+a+'">'+Y(r,function(o){return Ze(o)}).join(" ")+"</span>"}function I2(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function s5(r,e,t,a,n){var i=[n],o=a?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(U(e)?e.join(" "):e,i)}function P2(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return vo(a)}function k2(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var wd=function(){function r(){this.richTextStyles={},this._nextStyleNameId=wA()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var n=a==="richText"?this._generateStyleName():null,i=$V({color:t,type:e,renderMode:a,markerId:n});return J(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};U(t)?D(t,function(i){return H(a,i)}):H(a,t);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},r}();function R2(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=U(s),u=P2(e,t),f,c,v,h;if(o>1||l&&!o){var d=l5(s,e,t,i,u);f=d.inlineValues,c=d.inlineValueTypes,v=d.blocks,h=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(i[0]);h=f=bs(n,t,i[0]),c=p.type}else h=f=l?s[0]:s;var g=Im(e),y=g&&e.name||"",m=n.getName(t),_=a?y:m;return we("section",{header:y,noHeader:a||!g,sortParam:h,blocks:[we("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Nr(_),value:f,valueType:c,dataIndex:t})].concat(v||[])})}function l5(r,e,t,a,n){var i=e.getData(),o=La(r,function(c,v,h){var d=i.getDimensionInfo(h);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];a.length?D(a,function(c){f(bs(i,t,c),c)}):D(r,f);function f(c,v){var h=i.getDimensionInfo(v);!h||h.otherDims.tooltip===!1||(o?u.push(we("nameValue",{markerType:"
|
|
|
|
|
|
`:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return kF(o,s)+(o!=="style"?Ze(l):l||"")+(i?""+t+Y(i,function(u){return a(u)}).join(t)+t:"")+RF(o)}return a(r)}function EF(r,e,t){t=t||{};var a=t.newline?`
|
|
|
|
|
|
`:"",n=" {"+a,i=a+"}",o=Y(Ot(r),function(l){return l+n+Y(Ot(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=Y(Ot(e),function(l){return"@keyframes "+l+n+Y(Ot(e[l]),function(u){return u+n+Y(Ot(e[l][u]),function(f){var c=e[l][u][f];return f==="d"&&(c='path("'+c+'")'),f+":"+c+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(a)}function Sy(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Vx(r,e,t,a){return ke("svg","root",{width:r,height:e,xmlns:rI,"xmlns:xlink":aI,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var OF=0;function iI(){return OF++}var zx={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},ki="transform-origin";function NF(r,e,t){var a=H({},r.shape);H(a,e),r.buildPath(t,a);var n=new eI;return n.reset(sA(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function BF(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[ki]=t+"px "+a+"px")}var VF={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function oI(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function zF(r,e,t){var a=r.shape.paths,n={},i,o;if(D(a,function(l){var u=Sy(t.zrId);u.animation=!0,gh(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,v=Ot(f),h=v.length;if(h){o=v[h-1];var d=f[o];for(var p in d){var g=d[p];n[p]=n[p]||{d:""},n[p].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=oI(n,t);return i.replace(o,s)}}function Gx(r){return J(r)?zx[r]?"cubic-bezier("+zx[r]+")":Cm(r)?r:"":""}function gh(r,e,t,a){var n=r.animators,i=n.length,o=[];if(r instanceof ah){var s=zF(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u<i;u++){var f=n[u],c=[f.getMaxTime()/1e3+"s"],v=Gx(f.getClip().easing),h=f.getDelay();v?c.push(v):c.push("linear"),h&&c.push(h/1e3+"s"),f.getLoop()&&c.push("infinite");var d=c.join(" ");l[d]=l[d]||[d,[]],l[d][1].push(f)}function p(m){var _=m[1],S=_.length,x={},w={},b={},T="animation-timing-function";function C(mt,st,bt){for(var G=mt.getTracks(),F=mt.getMaxTime(),vt=0;vt<G.length;vt++){var rt=G[vt];if(rt.needsAnimate()){var X=rt.keyframes,lt=rt.propName;if(bt&&(lt=bt(lt)),lt)for(var xt=0;xt<X.length;xt++){var Pt=X[xt],tt=Math.round(Pt.time/F*100)+"%",nt=Gx(Pt.easing),q=Pt.rawValue;(J(q)||Nt(q))&&(st[tt]=st[tt]||{},st[tt][lt]=Pt.rawValue,nt&&(st[tt][T]=nt))}}}}for(var A=0;A<S;A++){var M=_[A],I=M.targetName;I?I==="shape"&&C(M,w):!a&&C(M,x)}for(var L in x){var P={};Fc(P,r),H(P,x[L]);var R=lA(P),k=x[L][T];b[L]=R?{transform:R}:{},BF(b[L],P),k&&(b[L][T]=k)}var O,E=!0;for(var L in w){b[L]=b[L]||{};var B=!O,k=w[L][T];B&&(O=new ka);var z=O.len();O.reset(),b[L].d=NF(r,w[L],O);var W=O.len();if(!B&&z!==W){E=!1;break}k&&(b[L][T]=k)}if(!E)for(var L in b)delete b[L].d;if(!a)for(var A=0;A<S;A++){var M=_[A],I=M.targetName;I==="style"&&C(M,b,function(G){return VF[G]})}for(var $=Ot(b),K=!0,et,A=1;A<$.length;A++){var yt=$[A-1],Et=$[A];if(b[yt][ki]!==b[Et][ki]){K=!1;break}et=b[yt][ki]}if(K&&et){for(var L in b)b[L][ki]&&delete b[L][ki];e[ki]=et}if(Ut($,function(mt){return Ot(b[mt]).length>0}).length){var Ht=oI(b,t);return Ht+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+iI();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function GF(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};Fx(a,e,t,!0)}else{var n=r.states.emphasis&&r
|
|
|
|
|
|
`+g.message)}var n=new ct;n.add(a),n.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,f=void 0,c=void 0,v=void 0;if(i!=null?(u=0,c=i):s&&(u=s.x,c=s.width),o!=null?(f=0,v=o):s&&(f=s.y,v=s.height),u==null||f==null){var h=a.getBoundingRect();u==null&&(u=h.x,c=h.width),f==null&&(f=h.y,v=h.height)}l=this._boundingRect=new _t(u,f,c,v)}if(s){var d=nP(s,l);a.scaleX=a.scaleY=d.scale,a.x=d.x,a.y=d.y}n.setClipPath(new Lt({shape:l.plain()}));var p=[];return D(t.named,function(g){a9.get(g.svgNodeTagLower)!=null&&(p.push(g),i9(g.el))}),{root:n,boundingRect:l,named:p}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);return a||(a=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,a),a)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);a&&(t.removeKey(e),this._freedGraphics.push(a))},r}();function i9(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function o9(r){var e=[],t=it();return D(r,function(a){if(a.namedFrom==null){var n=new $G(a.name,a.el);e.push(n),t.set(a.name,n)}}),{regions:e,regionsMap:t}}var Py=[126,25],Uw="�海诸岛",Ri=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var Pi=0;Pi<Ri.length;Pi++)for(var Yo=0;Yo<Ri[Pi].length;Yo++)Ri[Pi][Yo][0]/=10.5,Ri[Pi][Yo][1]/=-10.5/.75,Ri[Pi][Yo][0]+=Py[0],Ri[Pi][Yo][1]+=Py[1];function s9(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===Uw)return;e.push(new zL(Uw,Y(Ri,function(a){return{type:"polygon",exterior:a}}),Py))}}var l9={�海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function u9(r,e){if(r==="china"){var t=l9[e.name];if(t){var a=e.getCenter();a[0]+=t[0]/10.5,a[1]+=-t[1]/(10.5/.75),e.setCenter(a)}}}var f9=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function c9(r,e){r==="china"&&e.name==="�湾"&&e.geometries.push({type:"polygon",exterior:f9[0]})}var v9="name",h9=function(){function r(e,t,a){this.type="geoJSON",this._parsedMap=it(),this._mapName=e,this._specialAreas=a,this._geoJSON=p9(t)}return r.prototype.load=function(e,t){t=t||v9;var a=this._parsedMap.get(t);if(!a){var n=this._parseToRegions(t);a=this._parsedMap.set(t,{regions:n,boundingRect:d9(n)})}var i=it(),o=[];return D(a.regions,function(s){var l=s.name;e&&at(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:a.boundingRect||new _t(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(e){var t=this._mapName,a=this._geoJSON,n;try{n=a?YG(a,e):[]}catch(i){throw new Error(`Invalid geoJson format
|
|
|
|
|
|
`+i.message)}return s9(t,n),D(n,function(i){var o=i.name;u9(t,i),c9(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),n},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function d9(r){for(var e,t=0;t<r.length;t++){var a=r[t].getBoundingRect();e=e||a.clone(),e.union(a)}return e}function p9(r){return J(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var yl=it();const sn={registerMap:function(r,e,t){if(e.svg){var a=new n9(r,e.svg);yl.set(r,a)}else{var n=e.geoJson||e.geoJSON;n&&!e.features?t=e.specialAreas:n=e;var a=new h9(r,n,t);yl.set(r,a)}},getGeoResource:function(r){return yl.get(r)},getMapForUser:function(r){var e=yl.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var a=yl.get(r);if(a)return a.load(e,t)}};var W0=["rect","circle","line","ellipse","polygon","polyline","path"],g9=it(W0),y9=it(W0.concat(["g"])),m9=it(W0.concat(["g"])),iP=It();function Wf(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function Yw(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var _9=function(){function r(e){var t=this.group=new ct,a=this._transformGroup=new ct;t.add(a),this.uid=Fs("ec_map_draw"),this._controller=new Ao(e.getZr()),this._controllerHost={target:a},a.add(this._regionsGroup=new ct),a.add(this._svgGroup=new ct)}return r.prototype.draw=function(e,t,a,n,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(_){!s&&_.getHostGeoModel()===e&&(s=_.getData())});var l=e.coordinateSystem,u=this._regionsGroup,f=this._transformGroup,c=l.getTransformInfo(),v=c.raw,h=c.roam,d=!u.childAt(0)||i,p=e.getShallow("clip",!0),g;p?(g=l.getViewRect().clone(),this.group.setClipPath(new Lt({shape:g.clone()}))):this.group.removeClipPath(),d?(f.x=h.x,f.y=h.y,f.scaleX=h.scaleX,f.scaleY=h.scaleY,f.dirty()):zt(f,h,e);var y=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,m={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,g,t,a),this._updateMapSelectHandler(e,u,a,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=it(),a=it(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(h,d){return d&&(h=d(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function c(h){for(var d=[],p=!u&&l&&l.project,g=0;g<h.length;++g){var y=f(h[g],p);y&&d.push(y)}return d}function v(h){return{shape:{points:c(h)}}}n.removeAll(),D(e.geo.regions,function(h){var d=h.name,p=t.get(d),g=a.get(d)||{},y=g.dataIdx,m=g.regionModel;if(!p){p=t.set(d,new ct),n.add(p),y=s?s.indexOfName(d):null,m=e.isGeo?o.getRegionModel(d):s?s.getItemModel(y):null;var _=m.get("silent",!0);_!=null&&(p.silent=_),a.set(d,{dataIdx:y,regionModel:m})}var S=[],x=[];D(h.geometries,function(T){if(T.type==="polygon"){var C=[T.exterior].concat(T.interiors||[]);u&&(C=Jw(C,u)),D(C,function(M){S.push(new ir(v(M)))})}else{var A=T.points;u&&(A=Jw(A,u,!0)),D(A,function(M){x.push(new je(v(M)))})}});var w=f(h.getCenter(),l&&l.project);function b(T,C){if(T.length){var A=new ah({culling:!0,segmentIgnoreThreshold:1,shape:{paths:T}});p.add(A),Zw(e,A,y,m),Xw(e,A,d,m,o,y,w),C&&(Yw(A),D(A.states,Yw))}}b(S),b(x,!0)}),t.each(function(h,d){var p=a.get(d),g=p.dataIdx,y=p.regionModel;qw(e,h,d,y,o,g),Kw(e,h,d,y,o),jw(e,h,d,y,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,a=e.transformInfoRaw;this._svgGroup.x=a.x,this._svgGroup.y=a.y,this._svgGroup.scaleX=a.scaleX,this._svgGroup.scaleY=a.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var n=this._svgDispatcherMap=it(),i=!1;D(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,f=o.svgNodeTagLower,c=o.el,v=u?u.indexOfName(s):null,h=l.getRegionModel(s);g9.get(f)!=null&&c instanceof zr&&Zw(e,
|
|
|
|
|
|
`))}),e.join(`
|
|
|
|
|
|
|
|
|
|
|
|
`+Ch+`
|
|
|
|
|
|
|
|
|
|
|
|
`)}function Hq(r){return Y(r,function(e){var t=e.getRawData(),a=[e.name],n=[];return t.each(t.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=t.getName(o),l=0;l<i-1;l++)n[l]=arguments[l];a.push((s?s+ks:"")+n.join(ks))}),a.join(`
|
|
|
|
|
|
`)}).join(`
|
|
|
|
|
|
|
|
|
|
|
|
`+Ch+`
|
|
|
|
|
|
|
|
|
|
|
|
`)}function Wq(r){var e=Gq(r);return{value:Ut([Fq(e.seriesGroupByCategoryAxis),Hq(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
|
|
|
|
|
|
|
|
|
|
|
|
`+Ch+`
|
|
|
|
|
|
|
|
|
|
|
|
`),meta:e.meta}}function Iv(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function $q(r){var e=r.slice(0,r.indexOf(`
|
|
|
|
|
|
`));if(e.indexOf(ks)>=0)return!0}var Qy=new RegExp("["+ks+"]+","g");function Uq(r){for(var e=r.split(/\n+/g),t=Iv(e.shift()).split(Qy),a=[],n=Y(t,function(l){return{name:l,data:[]}}),i=0;i<e.length;i++){var o=Iv(e[i]).split(Qy);a.push(o.shift());for(var s=0;s<o.length;s++)n[s]&&(n[s].data[i]=o[s])}return{series:n,categories:a}}function Yq(r){for(var e=r.split(/\n+/g),t=Iv(e.shift()),a=[],n=0;n<e.length;n++){var i=Iv(e[n]);if(i){var o=i.split(Qy),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),a[n]={name:s,value:[]},l=a[n].value):l=a[n]=[];for(var f=0;f<o.length;f++)l.push(+o[f]);l.length===1&&(u?a[n].value=l[0]:a[n]=l[0])}}return{name:t,data:a}}function Zq(r,e){var t=r.split(new RegExp(`
|
|
|
|
|
|
*`+Ch+`
|
|
|
|
|
|
*`,"g")),a={series:[]};return D(t,function(n,i){if($q(n)){var o=Uq(n),s=e[i],l=s.axisDim+"Axis";s&&(a[l]=a[l]||[],a[l][s.axisIndex]={data:o.categories},a.series=a.series.concat(o.series))}else{var o=Yq(n);a.series.push(o)}}),a}var Xq=function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){setTimeout(function(){a.dispatchAction({type:"hideTip"})});var n=a.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||V.color.neutral00;var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),f=document.createElement("textarea");u.style.cssText="overflow:auto";var c=i.get("optionToContent"),v=i.get("contentToOption"),h=Wq(t);if(ut(c)){var d=c(a.getOption());J(d)?u.innerHTML=d:_s(d)&&u.appendChild(d)}else{f.readOnly=i.get("readOnly");var p=f.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=i.get("textColor"),p.borderColor=i.get("textareaBorderColor"),p.backgroundColor=i.get("textareaColor"),f.value=h.value,u.appendChild(f)}var g=h.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),S=document.createElement("div");m+=";background-color:"+i.get("buttonColor"),m+=";color:"+i.get("buttonTextColor");var x=this;function w(){n.removeChild(o),x._dom=null}cg(_,"click",w),cg(S,"click",function(){if(v==null&&c!=null||v!=null&&c==null){w();return}var b;try{ut(v)?b=v(u,a.getOption()):b=Zq(f.value,g)}catch(T){throw w(),new Error("Data view format error "+T)}b&&a.dispatchAction({type:"changeDataView",newOption:b}),w()}),_.innerHTML=l[1],S.innerHTML=l[2],S.style.cssText=_.style.cssText=m,!i.get("readOnly")&&y.appendChild(S),y.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},e.prototype.remove=function(t,a){this._dom&&a.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.getDefaultOption=function(t){var a={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:V.color.background,textColor:V.color.primary,textareaColor:V.color.background,textareaBorderColor:V.color.border,buttonColor:V.color.accent50,buttonTextColor:V.color.neutral00};return a},e}(Rr);function qq(r,e){return Y(r,function(t,a){var n=e&&e[a];if(gt(n)&&!U(n)){var i=gt(t)&&!U(t);i||(t={value:t});var o=n.name!=null&&t.name==null;return t=pt(t,n),o&&delete t.name,t}else return t})}Oa({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];D(r.newOption.series,function(a){var n=e.getSeriesByName(a.name)[0];if(!n)t.push(H({type:"scatter"},a));else{var i=n.get("data");t.push({name:a.name,data:qq(a.data,i)})}}),e.mergeOption(pt({series:t},r.newOption))});const Kq=Xq;var Wk=D,$k=It();function jq(r,e){var t=L_(r);Wk(e,function(a,n){for(var i=t.length-1;i>=0;i--){var o=t[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function Jq(r){var e=L_(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return Wk(t,function(n,i){for(var o=e.length-1;o>=0;o--)if(n=e[o][i],n){a[i]=n;break}}),a}function Qq(r){$k(r).snapshots=null}function tK(r){return L_(r).length}function L_(r){var e=$k(r);return e.snap
|
|
|
|
|
|
|
|
|
|
|
|
`:"<br/>",y=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],h,null,v)})},e.prototype._showSeriesItemTooltip=function(t,a,n){var i=this._ecModel,o=St(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,v=u.getData(c),h=this._renderMode,d=t.positionDefault,p=bl([v.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,c),m=new wd;y.marker=m.makeTooltipMarker("item",vo(y.color),h);var _=ES(u.formatTooltip(f,!1,c)),S=p.get("order"),x=p.get("valueFormatter"),w=_.frag,b=w?GS(x?H({valueFormatter:x},w):w,m,h,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,b,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,n){var i=this._renderMode==="html",o=St(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(J(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=ft(l),l.content=Ze(l.content));var c=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&c.push(v),c.push({formatter:l.content});var h=t.positionDefault,d=bl(c,this._tooltipModel,h?{position:h}:null),p=d.get("content"),g=Math.random()+"",y=new wd;this._showOrMove(d,function(){var m=ft(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,t.offsetX,t.offsetY,t.position,a,y)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,n,i,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var c=this._tooltipContent;c.setEnterable(t.get("enterable"));var v=t.get("formatter");l=l||t.get("position");var h=a,d=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),p=d.color;if(v)if(J(v)){var g=t.ecModel.get("useUTC"),y=U(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;h=v,m&&(h=sh(y.axisValue,h,g)),h=$M(h,n,!0)}else if(ut(v)){var _=Q(function(S,x){S===this._ticket&&(c.setContent(x,f,t,p,l),this._updatePosition(t,l,o,s,c,n,u))},this);this._ticket=i,h=v(n,i,_)}else h=v;c.setContent(h,f,t,p,l),c.show(t,p),this._updatePosition(t,l,o,s,c,n,u)}},e.prototype._getNearestPoint=function(t,a,n,i,o){if(n==="axis"||U(a))return{color:i||o};if(!U(a))return{color:i||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||t.get("position");var c=o.getSize(),v=t.get("align"),h=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),ut(a)&&(a=a([n,i],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),U(a))n=j(a[0],u),i=j(a[1],f);else if(gt(a)){var p=a;p.width=c[0],p.height=c[1];var g=re(p,{width:u,height:f});n=g.x,i=g.y,v=null,h=null}else if(J(a)&&l){var y=RK(a,d,c,t.get("borderWidth"));n=y[0],i=y[1]}else{var y=PK(n,i,o,u,f,v?null:20,h?null:20);n=y[0],i=y[1]}if(v&&(n-=bC(v)?c[0]/2:v==="right"?c[0]:0),h&&(i-=bC(h)?c[1]/2:h==="bottom"?c[1]:0),Uk(t)){var y=kK(n,i,o,u,f);n=y[0],i=y[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&D(n,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&D(u,function(v,h){var d=c[h]||{},p=v.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&v.value===d.value&&v.axisType===d.axisType&&v.axisId===d.axisId&&p.length===g.length,o&&D(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&D(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid
|
|
|
|
|
|
`)){var m=new fc;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(y)[0];if(!f.get(y))if(_){var S=_.getData(),x=S.getVisual("legendLineStyle")||{},w=S.getVisual("legendIcon"),b=S.getVisual("style"),T=this._createItem(_,y,p,d,a,t,x,b,w,c,i);T.on("click",Qo(HC,y,null,i,h)).on("mouseover",Qo(sm,_.name,null,i,h)).on("mouseout",Qo(lm,_.name,null,i,h)),n.ssr&&T.eachChild(function(C){var A=St(C);A.seriesIndex=_.seriesIndex,A.dataIndex=p,A.ssrType="legend"}),v&&T.eachChild(function(C){g.packEventData(C,a,_,p,y)}),f.set(y,!0)}else n.eachRawSeries(function(C){var A=this;if(!f.get(y)&&C.legendVisualProvider){var M=C.legendVisualProvider;if(!M.containName(y))return;var I=M.indexOfName(y),L=M.getItemVisual(I,"style"),P=M.getItemVisual(I,"legendIcon"),R=fr(L.fill);R&&R[3]===0&&(R[3]=.2,L=H(H({},L),{fill:Da(R,"rgba")}));var k=this._createItem(C,y,p,d,a,t,{},L,P,c,i);k.on("click",Qo(HC,null,y,i,h)).on("mouseover",Qo(sm,null,y,i,h)).on("mouseout",Qo(lm,null,y,i,h)),n.ssr&&k.eachChild(function(O){var E=St(O);E.seriesIndex=C.seriesIndex,E.dataIndex=p,E.ssrType="legend"}),v&&k.eachChild(function(O){A.packEventData(O,a,C,p,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},e.prototype.packEventData=function(t,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};St(t).eventData=s},e.prototype._createSelector=function(t,a,n,i,o){var s=this.getSelectorGroup();om(t,function(u){var f=u.type,c=new Vt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(c);var v=a.getModel("selectorLabel"),h=a.getModel(["emphasis","selectorLabel"]);Re(c,{normal:v,emphasis:h},{defaultText:u.title}),to(c)})},e.prototype._createItem=function(t,a,n,i,o,s,l,u,f,c,v){var h=t.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=Kj(f,i,l,u,h,g,v),x=new fc,w=i.getModel("textStyle");if(ut(t.getLegendIcon)&&(!_||_==="inherit"))x.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;x.add(jj({itemWidth:d,itemHeight:p,icon:f,iconRotate:b,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,C=s,A=o.get("formatter"),M=a;J(A)&&A?M=A.replace("{name}",a??""):ut(A)&&(M=A(a));var I=g?w.getTextColor():i.get("inactiveColor");x.add(new Vt({style:Kt(w,{text:M,x:T,y:p/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new Lt({shape:x.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&fn({el:L,componentModel:o,itemName:a,itemTooltipOption:P.option}),x.add(L),x.eachChild(function(R){R.silent=!0}),L.silent=!c,this.getContentGroup().add(x),to(x),x.__legendDataIndex=n,x},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ro(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){ro("horizontal",u,t.get("selectorItemGap",!0));var v=u.getBoundingRect(),h=[-v.x,-v.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?h[p]+=f[g]+d:c[p]+=v[g]+d,h[1-p]+=f[y]/2-v[y]/2,u.x=h[0],u.y=h[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=f[g]+d+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+h[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(le);function Kj(r,e,t,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),om(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"s
|
|
|
|
|
|
`||n==="")){var i=r.isSelected(n);at(t,n)?t[n]=t[n]&&i:t[n]=i}}),t}function Qj(r){r.registerAction("legendToggleSelect","legendselectchanged",Ct(Cl,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Ct(Cl,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Ct(Cl,"inverseSelect")),r.registerAction("legendSelect","legendselected",Ct(Cl,"select")),r.registerAction("legendUnSelect","legendunselected",Ct(Cl,"unSelect"))}function aR(r){r.registerComponentModel(im),r.registerComponentView(rR),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Jj),r.registerSubTypeDefaulter("legend",function(){return"plain"}),Qj(r)}var tJ=function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,a,n){var i=xo(t);r.prototype.init.call(this,t,a,n),$C(this,t,i)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),$C(this,this.option,t)},e.type="legend.scroll",e.defaultOption=ii(im.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:V.color.accent50,pageIconInactiveColor:V.color.accent10,pageIconSize:15,pageTextStyle:{color:V.color.tertiary},animationDurationUpdate:800}),e}(im);function $C(r,e,t){var a=r.getOrient(),n=[1,1];n[a.index]=0,Ra(e,t,{type:"box",ignoreSize:!!n})}const eJ=tJ;var UC=ct,Xp=["width","height"],qp=["x","y"],rJ=function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new UC),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new UC)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,a,n,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,a,n,i,o,s,l);var f=this._controllerGroup,c=a.get("pageIconSize",!0),v=U(c)?c:[c,c];d("pagePrev",0);var h=a.getModel("pageTextStyle");f.add(new Vt({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var y=p+"DataIndex",m=Nu(a.get("pageIcons",!0)[a.getOrient().name][g],{onclick:Q(u._pageGo,u,y,a,i)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});m.name=p,f.add(m)}},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,f=Xp[u],c=qp[u],v=Xp[1-u],h=qp[1-u];o&&ro("horizontal",l,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=ft(n);o&&(y[f]=n[f]-p[f]-d);var m=this._layoutContentAndController(t,i,y,u,f,v,h,c);if(o){if(s==="end")g[u]+=m[f]+d;else{var _=p[f]+d;g[u]-=_,m[c]-=_}m[f]+=p[f]+d,g[1-u]+=m[h]+m[v]/2-p[v]/2,m[v]=Math.max(m[v],p[v]),m[h]=Math.min(m[h],p[h]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,a,n,i,o,s,l,u){var f=this.getContentGroup(),c=this._containerGroup,v=this._controllerGroup;ro(t.get("orient"),f,t.get("itemGap"),i?n.width:null,i?null:n.height),ro("horizontal",v,t.get("pageButtonItemGap",!0));var h=f.getBoundingRect(),d=v.getBoundingRect(),p=this._showController=h[o]>n[o],g=[-h.x,-h.y];a||(g[i]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=ot(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(p){var S=t.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=h[s]/2-d[s]/2,f.setPosition(g),c.setPosition(y),v.setPosition(m);var x={x:0,y:0};if(x[o]=p?n[o]:h[o],x[s]=Math.max(h[s],d[s]),x[l]=Math.min(0,d[l]+m[1-i]),c.__rectSize=n[o],p){var w={x:0,y:0};w[o]=Math.max(n[o]-d[o]-_,0),w[s]=x[s],c.setClipPath(new Lt({shape:w}
|
|
|
|
|
|
<div style="font-weight: bold; margin-bottom: 4px;">${Pt[0].name}</div>`;return Pt.forEach(nt=>{tt+=`<div style="color: ${nt.color}; margin-top: 4px;">
|
|
|
|
|
|
${nt.seriesName}: <span style="color: #fff; font-weight: bold;">${nt.value.toLocaleString("fa-IR")}</span>
|
|
|
|
|
|
</div>`}),tt+="</div>",tt}},legend:{data:["همه شرکت کنندگان","واجدین شرایط"],top:10,right:10,textStyle:{color:"#6B7280",fontSize:12,fontFamily:"iran-sans"}},grid:{left:"5%",right:"5%",bottom:"10%",top:"15%",containLabel:!0},xAxis:{type:"category",data:G,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:i.value==="daily"||i.value==="weekly"||i.value==="monthly"?45:0,margin:12},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",formatter:Pt=>Math.round(Pt).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:[{name:"همه شرکت کنندگان",type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:F,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(239, 68, 68, 0.4)"},{offset:1,color:"rgba(239, 68, 68, 0.05)"}]}},lineStyle:{width:3,color:"#EF4444"},itemStyle:{color:"#EF4444",borderColor:"#fff",borderWidth:2}},{name:"واجدین شرایط",type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:vt,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(34, 197, 94, 0.4)"},{offset:1,color:"rgba(34, 197, 94, 0.05)"}]}},lineStyle:{width:3,color:"#22C55E"},itemStyle:{color:"#22C55E",borderColor:"#fff",borderWidth:2}}]};return lt.setOption(xt,!0),lt},z=async()=>{t.value=!0;try{const G=await qR(10);g.value.count_sale_order=G.usersStats.total,g.value.new_customer=G.usersStats.today,g.value.count_order=G.activeUsersSummary.active_users_week,g.value.active_users_week=G.activeUsersSummary.active_users_week,g.value.active_users_last_week=G.activeUsersSummary.active_users_last_week,g.value.active_users_last_month=G.activeUsersSummary.active_users_last_month,g.value.total_sale=String(G.activeUsersSummary.active_users_month),g.value.active_users_saturday_to_friday=G.activeUsersSummary.active_users_week,g.value.active_users_jalali_month=G.activeUsersSummary.active_users_month,M.value=G.latestUsers||[],A.value=G.latestLotteryWinners||[],g.value.total_story_views=G.storyViewsSummary.total_story_views,g.value.unique_story_viewers=G.storyViewsSummary.unique_story_viewers,g.value.latest_story_views=G.storyViewsSummary.latest_story_views,I.value=G.storyViewsSummary.story_views_stats||[],g.value.total_competition_participants=G.competitionSummary.total_competition_participants,g.value.eligible_competition_participants=G.competitionSummary.eligible_competition_participants,g.value.latest_competition_participants=G.competitionSummary.latest_competition_participants,g.value.latest_competition_eligible_participants=G.competitionSummary.latest_competition_eligible_participants,g.value.new_users_last_7_days=G.newUsersLast7Days,g.value.new_users_last_30_days=G.newUsersLast30Days,g.value.today_unique_story_viewers=G.todayUniqueStoryViewers,g.value.this_week_story_views=G.storyViews.story_view_week,g.value.today_total_story_views=G.storyViews.story_view_last_week,g.value.this_month_jalali_story_views=G.storyViews.story_view_month,g.value.total_story_viewers=G.storyViews.uniqAllStoryView}catch{}finally{t.value=!1}if(!e.value)try{const G=await XR();g.value={...g.value,...G}}catch{}},W=G=>{const F=o.value.indexOf(G);F>-1?o.value.length>1&&o.value.splice(F,1):o.value.push(G),et()},$=G=>{const F=s.value.indexOf(G);F>-1?s.value.length>1&&s.value.splice(F,1):s.value.push(G),Et()},K=G=>({"بازدید همه قصه ها":"این عدد آمار بازدیدکنندگان همه قصه‌ها از اول تا ØØ§Ù„ا را نشان می‌دهد","بازدید کننده امروز قصه ها":"این عدد تعداد کاربران Ù…Ù†ØØµØ± به Ù�ردی است Ú©Ù‡ امروز ØØ¯Ø§Ù‚Ù„ یک قصه را دیده‌اند","بازدید Ù�عال این Ù‡Ù�ته قصه ها":"این عدد بازدید نهایی همه قصه‌ها در Ù‡Ù�ته گذشته است"," بازدی
|
|
|
|
|
|
<div style="font-weight: bold; margin-bottom: 4px;">${tt[0].name}</div>`;return tt.forEach(q=>{nt+=`<div style="color: ${q.color}; margin-top: 4px;">
|
|
|
|
|
|
${q.seriesName}: <span style="color: #fff; font-weight: bold;">${q.value.toLocaleString("fa-IR")}</span>
|
|
|
|
|
|
</div>`}),nt+="</div>",nt}},legend:{data:F.map(tt=>tt.name),top:10,right:10,textStyle:{color:"#6B7280",fontSize:12,fontFamily:"iran-sans"}},grid:{left:"5%",right:"5%",bottom:"10%",top:"15%",containLabel:!0},xAxis:{type:"category",data:G,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:n.value==="daily"||n.value==="weekly"||n.value==="monthly"?45:0,margin:12},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",formatter:tt=>Math.round(tt).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:xt};return X.setOption(Pt,!0),X},Et=async()=>{try{const G=new Date().toISOString().split("T")[0],F=s.value.map(async tt=>{const nt={type:a.value,date:G,statType:tt};f.value&&c.value&&(nt.startDate=f.value,nt.endDate=c.value,delete nt.date);const q=await KR(nt);return{statType:tt,data:q||[]}}),vt=await Promise.all(F);let rt=[];const X={};s.value.forEach(tt=>{X[tt]=[]});const lt=new Set;if(vt.forEach(({data:tt})=>{a.value==="hourly"?tt.forEach(nt=>{if(nt.hour!==void 0)lt.add(String(nt.hour));else if(nt.day){const q=Number(nt.hour)||0;lt.add(`${nt.day}_${q}`)}}):tt.forEach(nt=>{const q=nt.day||"";q&<.add(q)})}),a.value==="hourly")for(let tt=0;tt<=24;tt++){const nt=tt===24?"24:00":`${tt.toString().padStart(2,"0")}:00`;rt.push(nt)}else Array.from(lt).sort().forEach(nt=>{if(a.value==="daily")rt.push(Ba(nt));else if(a.value==="weekly")try{const q=new Date(nt+"T00:00:00"),Tt=new Date(q);Tt.setDate(q.getDate()+5);const Yt=Ba(nt)+" تا "+Ba(Tt.toISOString().split("T")[0]);rt.push(Yt)}catch{rt.push(nt)}else if(a.value==="monthly"){const[q,Tt]=nt.split("-"),Yt=`${q}/${Tt}`;rt.push(Yt)}});vt.forEach(({statType:tt,data:nt})=>{const q={};a.value==="hourly"?tt==="total_views"?nt.forEach(Tt=>{const Yt=Number(Tt.hour)||0,ne=Number((Tt==null?void 0:Tt.views)||0),fe=String(Yt);q[fe]=(q[fe]||0)+ne}):nt.forEach(Tt=>{const Yt=Tt.day||"",ne=Number(Tt.hour)||0,fe=`${Yt}_${ne}`,vn=Number((Tt==null?void 0:Tt.views)||0);q[fe]=vn}):nt.forEach(Tt=>{const Yt=Tt.day||"",ne=Number((Tt==null?void 0:Tt.views)||0);tt==="total_views"?q[Yt]=(q[Yt]||0)+ne:q[Yt]=ne}),rt.forEach(Tt=>{let Yt=Tt;if(a.value==="daily")Yt=Ue(Tt,"jYYYY/jMM/jDD").format("YYYY-MM-DD");else if(a.value==="weekly"){const fe=Tt.split(" تا ");Yt=Ue(fe[0],"jYYYY/jMM/jDD").format("YYYY-MM-DD")}else if(a.value==="monthly")Yt=Ue(Tt,"jYYYY/jMM").format("YYYY-MM");else if(a.value==="hourly")if(tt==="total_views")Yt=String(parseInt(Tt.split(":")[0]));else{const fe=parseInt(Tt.split(":")[0]);Yt=Object.keys(q).find(hn=>hn.endsWith(`_${fe}`))||String(fe)}const ne=q[Yt]||0;X[tt].push(Math.round(ne))})});const xt=s.value.map(tt=>({name:tt==="cumulative_viewers"?"آمار بازدید کننده تجمیعی همه قصه ها":tt==="total_views"?"آمار بازدید همه قصه ها":"آمار بازدید کننده همه قصه ها",data:X[tt]||[],color:tt==="cumulative_viewers"?"#3B82F6":tt==="total_views"?"#F97316":"#22C55E"}));if(await dn(),!x.value){setTimeout(()=>{if(x.value){const tt=Ht(rt,xt,x.value,T);tt&&(T=tt)}},100);return}const Pt=Ht(rt,xt,x.value,T);Pt&&(T=Pt)}catch{if(await dn(),x.value){const F=Ht([],[],x.value,T);F&&(T=F)}}},Ht=(G,F,vt,rt)=>{if(!vt)return rt;let X=rt;X||(X=Id(vt));const lt={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"#3B82F6",borderWidth:1,textStyle:{color:"#fff",fontSize:12,fontFamily:"iran-sans"},axisPointer:{type:"line",lineStyle:{color:"#3B82F6",width:1,type:"dashed"},shadowStyle:{color:"rgba(59, 130, 246, 0.1)"}},formatter:xt=>{let Pt=`<div style="padding: 8px;">
|
|
|
|
|
|
<div style="font-weight: bold; margin-bottom: 4px;">${xt[0].name}</div>`;return xt.forEach(tt=>{Pt+=`<div style="color: ${tt.color}; margin-top: 4px;">
|
|
|
|
|
|
${tt.seriesName}: <span style="color: #fff; font-weight: bold;">${tt.value.toLocaleString("fa-IR")}</span>
|
2026-07-09 15:20:19 +03:30
|
|
|
|
</div>`}),Pt+="</div>",Pt}},legend:{data:F.map(xt=>xt.name),top:10,right:10,textStyle:{color:"#6B7280",fontSize:12,fontFamily:"iran-sans"}},grid:{left:"5%",right:"5%",bottom:"10%",top:"15%",containLabel:!0},xAxis:{type:"category",data:G,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:a.value==="daily"||a.value==="weekly"||a.value==="monthly"?45:0,margin:12},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",formatter:xt=>Math.round(xt).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:F.map(xt=>({name:xt.name,type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:xt.data,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:`${xt.color}40`},{offset:1,color:`${xt.color}0D`}]}},lineStyle:{width:3,color:xt.color,shadowColor:`${xt.color}80`,shadowBlur:10,shadowOffsetY:5},itemStyle:{color:xt.color,borderColor:"#fff",borderWidth:2,shadowBlur:8,shadowColor:`${xt.color}80`},emphasis:{focus:"series",itemStyle:{color:xt.color,borderColor:"#fff",borderWidth:3,shadowBlur:12,shadowColor:`${xt.color}CC`}},animation:!0,animationDuration:1e3,animationEasing:"cubicOut"}))};return X.setOption(lt,!0),X},mt=async()=>{var G,F;try{const vt=new Date().toISOString().split("T")[0],rt={type:i.value,date:vt};v.value&&h.value&&(rt.startDate=v.value,rt.endDate=h.value,delete rt.date);const X=await JR(rt);_.value=X||[];let lt=[],xt=[],Pt=[];if(i.value==="hourly"){const nt={};_.value.forEach(q=>{const Tt=Number(q.hour)||0;nt[Tt]={total:Number((q==null?void 0:q.totalParticipants)||0),eligible:Number((q==null?void 0:q.eligibleParticipants)||0)}});for(let q=0;q<=24;q++){const Tt=q===24?"24:00":`${q.toString().padStart(2,"0")}:00`;lt.push(Tt),xt.push(((G=nt[q])==null?void 0:G.total)||0),Pt.push(((F=nt[q])==null?void 0:F.eligible)||0)}}else if(i.value==="daily"){const nt={};_.value.forEach(q=>{const Tt=q.day||"";nt[Tt]={total:Number((q==null?void 0:q.totalParticipants)||0),eligible:Number((q==null?void 0:q.eligibleParticipants)||0)}}),Object.keys(nt).sort().forEach(q=>{const Tt=Ba(q);lt.push(Tt),xt.push(nt[q].total),Pt.push(nt[q].eligible)})}else if(i.value==="weekly"){const nt={};_.value.forEach(q=>{const Tt=q.day||"";nt[Tt]={total:Number((q==null?void 0:q.totalParticipants)||0),eligible:Number((q==null?void 0:q.eligibleParticipants)||0)}}),Object.keys(nt).sort().forEach(q=>{try{const Tt=new Date(q+"T00:00:00"),Yt=new Date(Tt);Yt.setDate(Tt.getDate()+5);const ne=Ba(q)+" تا "+Ba(Yt.toISOString().split("T")[0]);lt.push(ne),xt.push(nt[q].total),Pt.push(nt[q].eligible)}catch{lt.push(q),xt.push(nt[q].total),Pt.push(nt[q].eligible)}})}else if(i.value==="monthly"){const nt={};_.value.forEach(q=>{const Tt=q.day||"";nt[Tt]={total:Number((q==null?void 0:q.totalParticipants)||0),eligible:Number((q==null?void 0:q.eligibleParticipants)||0)}}),Object.keys(nt).sort().forEach(q=>{const[Tt,Yt]=q.split("-"),ne=`${Tt}/${Yt}`;lt.push(ne),xt.push(nt[q].total),Pt.push(nt[q].eligible)})}if(await dn(),!w.value){setTimeout(()=>{if(w.value){const nt=B(lt,xt,Pt,w.value,C);nt&&(C=nt)}},100);return}const tt=B(lt,xt,Pt,w.value,C);tt&&(C=tt)}catch{if(await dn(),w.value){const rt=B([],[],[],w.value,C);rt&&(C=rt)}}};xR(async()=>{await z(),await dn(),await et(),await Et(),await dn(),await new Promise(G=>setTimeout(G,100)),await mt(),window.addEventListener("resize",()=>{b&&b.resize(),T&&T.resize(),C&&C.resize()})}),wR(()=>{b&&(b.dispose(),b=null),T&&(T.dispose(),T=null),C&&(C.dispose(),C=null)});async function st(){if(A.value.length===0){const{message:G}=await pn(()=>import("./index-f86a4dbf.js"),["assets/index-f86a4dbf.js","assets/index-3f53f7ff.js","assets/index-a08997de.js","assets/index-a3740640.css","assets/vnode-ddd966cb.js","assets/_plugin-vue_export-helper-20260c74.js","assets/isSymbol-6a02f777.js","assets/styleChecker-0d78d27e.js","assets/index-676f4182.js","assets/button.v
|