2026-07-14 12:58:42 +03:30
import { o as Jt , c as he , L as IR , d as FD , h as _a , a as U , F as mr , n as Rn , j as Mt , i as xa , w as _r , b as ve , t as oe , J as HD , G as ge , g as ae , v as PR , O as _n , P as kR , x as ua , y as Eo , e as K_ , Q as WD , _ as Sn } from "./index-20d5dab1.js" ; import { _ as RR } from "./button.vue_vue_type_style_index_0_lang-95946c23.js" ; import { _ as ER } from "./BasicSelect.vue_vue_type_style_index_0_lang-60eaf8ef.js" ; import { _ as OR } from "./_plugin-vue_export-helper-26f60d29.js" ; import { S as En } from "./index-38a2f111.js" ; import { T as Xl } from "./isSymbol-f04930e1.js" ; import { I as j_ } from "./Icon-06d3f751.js" ; import { _ as Oo } from "./InputDatePicker.vue_vue_type_script_setup_true_lang-e963cda2.js" ; import { m as Ke , a as Ha } from "./useDataTime-c147e135.js" ; import { u as NR } from "./usePrice-bc935b83.js" ; import { a as J_ } from "./index-4284a867.js" ; import "./lodash-28ee46da.js" ; import "./updateLocale-6ea9ed84.js" ; import "./toArray-fb96c8b9.js" ; import "./vnode-18b1f518.js" ; import "./FormItemContext-28b30746.js" ; import "./pickAttrs-93039156.js" ; import "./useState-3cc4a0be.js" ; import "./useRefs-03151dab.js" ; import "./_flatRest-12208321.js" ; const BR = {}, VR = { class : "bg-gradient" }; function zR ( r , e ){ return Jt (), he ( "div" , VR ,[ IR ( r . $slots , "default" )])} const ql = OR ( BR ,[[ "render" , zR ]]), Q_ = "/assets/users4-80585f51.svg" , t1 = "/assets/users3-3a96ddd8.svg" , Rh = "/assets/users5-1dc3f500.svg" , GR = "/assets/users2-8002992a.svg" , FR = { class : "grid grid-cols-1 md:grid-cols-4 gap-3" }, HR = { class : "flex" }, WR = [ "src" , "alt" ], $R = { class : "flex flex-col justify-between w-full mr-2" }, UR = { class : "text-base font-bold" }, YR = { class : "flex items-center justify-end min-h-[24px]" }, ZR = { class : "text-base font-bold" }, XR = { class : "mr-1" }, qR = { class : "grid grid-cols-1 md:grid-cols-4 gap-3 mt-3" }, KR = { class : "flex" }, jR = [ "src" , "alt" ], JR = { class : "flex flex-col justify-between w-full mr-2" }, QR = { class : "text-base font-bold" }, tE = { class : "flex items-center justify-end min-h-[24px]" }, eE = { class : "text-base font-bold" }, rE = { class : "mr-1" }, aE = FD ({ __name : "Header" , props : { statistics : {}, loading : { type : Boolean , default :! 1 }}, setup ( r ){ const e = r , t = _a (()=>{ var i , o , s , l ; return [{ title : "تعداد کاربران" , alt : "sales-number" , image : GR , 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 : Rh , 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 : t1 , 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 : Q_ , value : (( l = e . statistics . active_users_jalali_month ) == null ? void 0 : l . toLocaleString ( "fa-IR" )) || "0" , unit : "نفر" }]}), a = _a (()=>{ var i , o , s ; return [{ title : "کاربران جدید امروز" , alt : "customers" , image : Rh , value : e . statistics . new_customer , unit : "نفر" },{ title : "کاربران جدید 30 روز گذشته" , alt : "new-users-last-30-days" , image : Rh , 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 : t1 , value : (( o = e . statistics . active_users_last_week ) == null ? void 0 : o . toLocaleString ( "fa-IR" )) || "0" , unit : "نفر" },{ title : "کاربران فعال ماه گذشته" , alt : "active-users-last-month" , image : Q_ , value : (( s = e . statistics . active_users_last_month ) == null ? void 0 : s . toLocaleString ( "fa-IR" )) || "0" , unit : "نفر" }]}), n = i =>({ "تعداد کاربران" : "این عدد تعداد کل کاربران ثبتنام شده در سیستم از اول تا حالا را نشان میدهد" , "کاربران جدید 7 روز گذشته" : "این عدد تعداد کاربرانی است که در 7 روز گذشته ثبتنام کردهاند" , "کاربران فعال این هفته" : "این عدد تعداد کاربرانی است که در این هفته (از شنبه تا جمعه) حداقل یک بازدید از یک قسمت از اپ د
2026-07-13 14:00:01 +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 dg=function(r,e){return dg=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])},dg(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 ");dg(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var pE=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),gE=function(){function r(){this.browser=new pE,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}(),In=new gE;typeof wx==" object "&&typeof wx.getSystemInfoSync==" function "?(In.wxa=!0,In.touchEventsSupported=!0):typeof document>" u "&&typeof self<" u "?In.worker=!0:!In.hasGlobalWindow||" Deno "in window||typeof navigator<" u "&&typeof navigator.userAgent==" string "&&navigator.userAgent.indexOf(" Node . js ")>-1?(In.node=!0,In.svgSupported=!0):yE(navigator.userAgent,In);function yE(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 Wt=In;var Cm=12,$D=" sans - serif ",nn=Cm+" px "+$D,mE=20,_E=100,SE=" 007 LLmW '55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function xE(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)-mE)/_E;e[a]=n}return e}var wE=xE(SE),ra={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,a){if(!r){var n=ra.createCanvas();r=n&&n.getContext("2d")}if(r)return e!==a&&(e=r.font=a||nn),r.measureText(t);t=t||"",a=a||nn;var i=/((?:\d+)?\.?\d*)px/.exec(a),o=i&&+i[1]||Cm,s=0;if(a.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=wE[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}},UD=Oa(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),YD=Oa(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),Gs=Object.prototype.toString,Yv=Array.prototype,bE=Yv.forEach,TE=Yv.filter,Dm=Yv.slice,CE=Yv.map,e1=function(){}.constructor,af=e1?e1.prototype:null,Am="__proto__",DE=2311;function ZD(){return DE++}function Mm(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function ut(r){if(r==null||typeof r!="object")return r;var e=r,t=Gs.call(r);if(t==="[object Array]"){if(!Kl(r)){e=[];for(var a=0,n=r.length;a<n;a++)e[a]=ut(r[a])}}else if(YD[t]){if(!Kl(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(!UD[t]&&!Kl(r)&&!Ts(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==Am&&(e[o]=ut(r[o]))}return e}function Dt(r,e,t){if(!dt(e)||!dt(r))return t?ut(e):r;for(var a in e)if(e.hasOwnProperty(a)&
`),i=n.length;if(i===1)return L1(n[0],e,t,a);for(var o=new gt(0,0,0,0),s=0;s<n.length;s++){var l=L1(n[s],e,t,a);s===0?o.copy(l):o.union(l)}return o}function Ds(r,e,t,a){return t==="right"?a?r+=e:r-=e:t==="center"&&(a?r+=e/2:r-=e/2),r}function ro(r,e,t,a){return t==="middle"?a?r+=e/2:r-=e/2:t==="bottom"&&(a?r+=e:r-=e),r}function Gu(r){return Ra(r).stWideCharWidth}function na(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function qc(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+=na(a[0],t.width),u+=na(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 Qh="__zr_normal__",td=Ba.concat(["ignore"]),KO=Oa(Ba,function(r,e){return r[e]=!0,r},{ignore:!1}),zo={},jO=new gt(0,0,0,0),hf=[],Vm=function(){function r(e){this.id=ZD(),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=jO,a.layoutRect?v.copy(a.layoutRect):v.copy(this.getBoundingRect()),n||v.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(zo,a,v):qc(zo,a,v),i.x=zo.x,i.y=zo.y,o=zo.align,s=zo.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=na(h[0],v.width),p=na(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 gt(0,0,0,0);i.getLocalTransform(hf),aa(hf,hf),gt.copy(m,v),m.applyTransform(hf)}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|=wr,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()?zg:Vg},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 Dc={},DA={};function rN(r){delete DA[r]}function aN(r){if(!r)return!1;if(typeof r=="string")return Uc(r,1)<Bg;if(r.colorStops){for(var e=r.colorStops,t=0,a=e.length,n=0;n<a;n++)t+=Uc(e[n].color,1);return t/=a,t<Bg}return!1}var nN=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 hO,o=a.renderer||"canvas";Dc[o]||(o=Nt(Dc)[0]),a.useDirtyRect=a.useDirtyRect==null?!1:a.useDirtyRect;var s=new Dc[o](t,i,a,e),l=a.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!Wt.node&&!Wt.worker&&!l?new YO(s.getViewportRoot(),s.root):null,f=a.useCoarsePointer,c=f==null||f==="auto"?Wt.touchEventsSupported:!!f,v=44,h;c&&(h=ot(a.pointerSize,v)),this.handler=new lO(i,s,u,s.root,h),this.animation=new VO({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=aN(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=hs();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var n=hs();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 ft&&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,rN(this.id))},r}();function I1(r,e){var t=new nN(ZD(),r,e);return DA[t.id]=t,t}function iN(r,e){Dc[r]=e}var Gg;function oN(r){if(typeof Gg=="function
`);i=WA(t,a,n,i);for(var s=!1,l={},u=0,f=o.length;u<f;u++)$A(l,o[u],i),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
`),r.isTruncated=s}function WA(r,e,t,a){a=a||{};var n=G({},a);t=ot(t,"..."),n.maxIterations=ot(a.maxIterations,2);var i=n.minChar=ot(a.minChar,0),o=n.fontMeasureInfo=Ra(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=Ea(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 $A(r,e,t){var a=t.containerWidth,n=t.contentWidth,i=t.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=Ea(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?YN(e,n,i):o>0?Math.floor(e.length*n/o):0;e=e.substr(0,l),o=Ea(i,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function YN(r,e,t){for(var a=0,n=0,i=r.length;n<i&&a<e;n++)a+=wA(t,r.charCodeAt(n));return n}function ZN(r,e,t,a){var n=$m(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=Gu(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?UA(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=WA(p,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),x={},w=0;w<y.length;w++)$A(x,y[w],S),y[w]=x.textLine,d=d||x.isTruncated;for(var b=g,T=0,C=Ra(u),w=0;w<y.length;w++)T=Math.max(Ea(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 XN=function(){function r(){}return r}(),z1=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),qN=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 KN(r,e,t,a,n){var i=new qN,o=$m(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=id.lastIndex=0,p;(p=id.exec(o))!=null;){var g=p.index;g>d&&od(i,o.substring(d,g),e,h),od(i,p[2],e,h,p[1]),d=id.lastIndex}d<o.length&&od(i,o.substring(d,o.length),e,h);var y=[],m=0,_=0,S=v==="truncate",x=e.lineOverflow==="truncate",w={};function b(Ot,$t,pt){Ot.width=$t,Ot.lineHeight=pt,m+=pt,_=Math.max(_,$t)}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=Gu(O);var E=ot(P.height,L.contentHeight);if(L.innerHeight=E,R&&(E+=R[0]+R[2]),L.height=E,L.lineHeight=Cr(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,F=z==null||z==="auto";if(typeof z=="string"&&z.charAt(z.length-1)==="%")L.percentWidth=z,y.push(L),L.contentWidth=Ea(Ra(O),L.text);else{if(F){var H=P.backgroundColor,Z=H&&H.image;Z&&(Z=$N(Z),eh(Z)&&(L.width=Math.max(L.width,Z.width*E/Z.height)))}var tt=S&&f!=null?f-M:null;tt!=null&&tt<L.width?!F||tt<k?(L.text="",L.width=L.contentWidth=0):(UN(w,L.text,tt-k,O,e.ellipsis,{minChar:e.truncateMinChar}),L.text=w.text,i.isTruncated=i.isTruncated||w.isTruncated,L.width=L.contentWidth=Ea(Ra(O),L.text)):L.contentWidth=Ea(Ra(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 od(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=na(o.width,a.width)+h;s.length>0&&d+a.accumWidth>a.width&&(f=e.split(`
`),u=!0),a.accumWidth=d}else{var p=UA(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=Ra(l),y=0;y<f.length;y++){var m=f[y],_=new XN;if(_.styleName=n,_.text=m,_.isLineHolder=!m&&!i,typeof o.width=="number"?_.width=o.width:_.width=c?c[y]:Ea(g,m),!y&&!u){var S=(s[s.length-1]||(s[0]=new z1)).tokens,x=S.length;x===1&&S[0].isLineHolder?S[0]=_:(m||!x||i)&&S.push(_)}else s.push(new z1([_]))}}function jN(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var JN=Oa(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function QN(r){return jN(r)?!!JN[r]:!0}function UA(r,e,t,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,c=Ra(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=wA(c,h.charCodeAt(0)),p=a?!1:!QN(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 G1(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;gt.set(F1,Ds(t,o,n),ro(a,s,i),o,s),gt.intersect(e,F1,null,H1);var l=H1.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Ds(l.x,l.width,n,!0),r.baseY=ro(l.y,l.height,i,!0)}}var F1=new gt(0,0,0,0),H1={outIntersectRect:{},clamp:!0};function $m(r){return r!=null?r+="":r=""}function tB(r){var e=$m(r.text),t=r.font,a=Ea(Ra(t),e),n=Gu(t);return Wg(r,a,n,null)}function Wg(r,e,t,a){var n=new gt(Ds(r.x||0,e,r.textAlign),ro(r.y||0,t,r.textBaseline),e,t),i=a??(YA(r)?r.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function YA(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var $g="__zr_style_"+Math.round(Math.random()*10),ao={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},rh={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ao[$g]=!0;var W1=["z","z2","invisible"],eB=["invisible"],rB=function(r){N(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=Nt(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&&aB(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 gt(0,0,0,0)),a?gt.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 gt(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:G(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=Nl,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&Nl)},e.prototype.styleUpdated=function(){this.__dirty&=~Nl},e.prototype.createStyle=function(t){return qv(ao,t)},e.prototype
`,`
`,`
`];function Ae(r,e){return e.type=r,e}function cy(r){return r.type==="section"}function V2(r){return cy(r)?m5:_5}function z2(r){if(cy(r)){var e=0,t=r.blocks.length,a=t>1||t>0&&!r.noHeader;return D(r.blocks,function(n){var i=z2(n);i>=e&&(e=i+ +(a&&(!i||cy(n)&&!n.noHeader)))}),e}return 0}function m5(r,e,t,a){var n=e.noHeader,i=S5(z2(e)),o=[],s=e.blocks||[];er(!s||W(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(et(u,l)){var f=new P2(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=V2(p)(y?G(G({},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):vy(a,o.join(""),n?t:i.html);if(n)return c;var v=iy(e.header,"ordinal",r.useUTC),h=B2(a,r.renderMode).nameStyle,d=N2(a);return r.renderMode==="richText"?G2(r,v,h)+i.richText+c:vy(a,' < div style = "'+h+" ; "+d+';" > '+Je(v)+"</div>"+c,t)}function _5(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=W(S)?S:[S],$(S,function(x,w){return iy(x,W(h)?h[w]:h,u)})};if(!(i&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||V.color.secondary,n),v=i?"":iy(l,"ordinal",u),h=e.valueType,d=o?[]:f(e.value,e.dataIndex),p=!s||!i,g=!s&&i,y=B2(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":c)+(i?"":G2(r,v,m))+(o?"":b5(r,d,p,g,_)):vy(a,(s?"":c)+(i?"":x5(v,!s,m))+(o?"":w5(d,p,g,_)),t)}}function jS(r,e,t,a,n,i){if(r){var o=V2(r),s={useUTC:n,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function S5(r){return{html:g5[r],richText:y5[r]}}function vy(r,e,t){var a=' < div style = "clear:both" >< /div>',n="margin: "+t+"px 0 0",i=N2(r);return'<div style="'+n+";"+i+';">'+e+a+"</div>"}function x5(r,e,t){var a=e?"margin-left:2px":"";return'<span style="'+t+";"+a+'">'+Je(r)+"</span>"}function w5(r,e,t,a){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return r=W(r)?r:[r],'<span style="'+i+";"+a+'">'+$(r,function(o){return Je(o)}).join(" ")+"</span>"}function G2(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function b5(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(W(e)?e.join(" "):e,i)}function F2(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return mo(a)}function H2(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Id=function(){function r(){this.richTextStyles={},this._nextStyleNameId=kA()}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=oz({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={};W(t)?D(t,function(i){return G(a,i)}):G(a,t);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},r}();function W2(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=W(s),u=F2(e,t),f,c,v,h;if(o>1||l&&!o){var d=T5(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=Ms(n,t,i[0]),c=p.type}else h=f=l?s[0]:s;var g=Gm(e),y=g&&e.name||"",m=n.getName(t),_=a?y:m;return Ae("section",{header:y,noHeader:a||!g,sortParam:h,blocks:[Ae("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Fr(_),value:f,valueType:c,dataIndex:t})].concat(v||[])})}function T5(r,e,t,a,n){var i=e.getData(),o=Oa(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(Ms(i,t,c),c)}):D(r,f);function f(c,v){var h=i.getDimensionInfo(v);!h||h.otherDims.tooltip===!1||(o?u.push(Ae("nameValue",{markerType:"
`:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return XF(o,s)+(o!=="style"?Je(l):l||"")+(i?""+t+$(i,function(u){return a(u)}).join(t)+t:"")+qF(o)}return a(r)}function KF(r,e,t){t=t||{};var a=t.newline?`
`:"",n=" {"+a,i=a+"}",o=$(Nt(r),function(l){return l+n+$(Nt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=$(Nt(e),function(l){return"@keyframes "+l+n+$(Nt(e[l]),function(u){return u+n+$(Nt(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 Py(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function qx(r,e,t,a){return Be("svg","root",{width:r,height:e,xmlns:vI,"xmlns:xlink":hI,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var jF=0;function pI(){return jF++}var Kx={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"},Bi="transform-origin";function JF(r,e,t){var a=G({},r.shape);G(a,e),r.buildPath(t,a);var n=new cI;return n.reset(yA(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function QF(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[Bi]=t+"px "+a+"px")}var t4={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function gI(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function e4(r,e,t){var a=r.shape.paths,n={},i,o;if(D(a,function(l){var u=Py(t.zrId);u.animation=!0,bh(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,v=Nt(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=gI(n,t);return i.replace(o,s)}}function jx(r){return j(r)?Kx[r]?"cubic-bezier("+Kx[r]+")":Om(r)?r:"":""}function bh(r,e,t,a){var n=r.animators,i=n.length,o=[];if(r instanceof fh){var s=e4(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=jx(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(pt,st,xt){for(var rt=pt.getTracks(),mt=pt.getMaxTime(),qt=0;qt<rt.length;qt++){var Bt=rt[qt];if(Bt.needsAnimate()){var Yt=Bt.keyframes,Y=Bt.propName;if(xt&&(Y=xt(Y)),Y)for(var X=0;X<Yt.length;X++){var bt=Yt[X],St=Math.round(bt.time/mt*100)+"%",J=jx(bt.easing),Lt=bt.rawValue;(j(Lt)||Vt(Lt))&&(st[St]=st[St]||{},st[St][Y]=bt.rawValue,J&&(st[St][T]=J))}}}}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={};Xc(P,r),G(P,x[L]);var R=mA(P),k=x[L][T];b[L]=R?{transform:R}:{},QF(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 Va);var z=O.len();O.reset(),b[L].d=JF(r,w[L],O);var F=O.len();if(!B&&z!==F){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(rt){return t4[rt]})}for(var H=Nt(b),Z=!0,tt,A=1;A<H.length;A++){var yt=H[A-1],Ot=H[A];if(b[yt][Bi]!==b[Ot][Bi]){Z=!1;break}tt=b[yt][Bi]}if(Z&&tt){for(var L in b)b[L][Bi]&&delete b[L][Bi];e[Bi]=tt}if(Xt(H,function(pt){return Nt(b[pt]).length>0}).length){var $t=gI(b,t);return $t+" "+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-"+pI();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function r4(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};Jx(a,e,t,!0)}else{var n=r.states.emphasis&&
` + g . message )} var n = new ft ; 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 gt ( u , f , c , v )} if ( s ){ var d = dP ( s , l ); a . scaleX = a . scaleY = d . scale , a . x = d . x , a . y = d . y } n . setClipPath ( new Pt ({ shape : l . plain ()})); var p = []; return D ( t . named , function ( g ){ _$ . get ( g . svgNodeTagLower ) != null && ( p . push ( g ), x$ ( 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 x$ ( r ){ r . silent =! 1 , r . isGroup && r . traverse ( function ( e ){ e . silent =! 1 })} function w$ ( r ){ var e = [], t = at (); return D ( r , function ( a ){ if ( a . namedFrom == null ){ var n = new oF ( a . name , a . el ); e . push ( n ), t . set ( a . name , n )}}),{ regions : e , regionsMap : t }} var Hy = [ 126 , 25 ], rb = "南海诸岛" , Vi = [[[ 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 Ni = 0 ; Ni < Vi . length ; Ni ++ ) for ( var jo = 0 ; jo < Vi [ Ni ]. length ; jo ++ ) Vi [ Ni ][ jo ][ 0 ] /= 10.5 , Vi [ Ni ][ jo ][ 1 ] /=- 10.5 / . 75 , Vi [ Ni ][ jo ][ 0 ] += Hy [ 0 ], Vi [ Ni ][ jo ][ 1 ] += Hy [ 1 ]; function b$ ( r , e ){ if ( r === "china" ){ for ( var t = 0 ; t < e . length ; t ++ ) if ( e [ t ]. name === rb ) return ; e . push ( new qL ( rb , $ ( Vi , function ( a ){ return { type : "polygon" , exterior : a }}), Hy ))}} var T$ = { 南海诸岛 : [ 32 , 80 ], 广东 : [ 0 , - 10 ], 香港 : [ 10 , 5 ], 澳门 : [ - 10 , 10 ], 天津 : [ 5 , 5 ]}; function C$ ( r , e ){ if ( r === "china" ){ var t = T$ [ 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 D$ = [[[ 123.45165252685547 , 25.73527164402261 ],[ 123.49731445312499 , 25.73527164402261 ],[ 123.49731445312499 , 25.750734064600884 ],[ 123.45165252685547 , 25.750734064600884 ],[ 123.45165252685547 , 25.73527164402261 ]]]; function A$ ( r , e ){ r === "china" && e . name === "台湾" && e . geometries . push ({ type : "polygon" , exterior : D$ [ 0 ]})} var M$ = "name" , L$ = function (){ function r ( e , t , a ){ this . type = "geoJSON" , this . _parsedMap = at (), this . _mapName = e , this . _specialAreas = a , this . _geoJSON = P$ ( t )} return r . prototype . load = function ( e , t ){ t = t || M$ ; var a = this . _parsedMap . get ( t ); if ( ! a ){ var n = this . _parseToRegions ( t ); a = this . _parsedMap . set ( t ,{ regions : n , boundingRect : I$ ( n )})} var i = at (), o = []; return D ( a . regions , function ( s ){ var l = s . name ; e && et ( e , l ) && ( s = s . cloneShallow ( l = e [ l ])), o . push ( s ), i . set ( l , s )}),{ regions : o , boundingRect : a . boundingRect || new gt ( 0 , 0 , 0 , 0 ), regionsMap : i }}, r . prototype . _parseToRegions = function ( e ){ var t = this . _mapName , a = this . _geoJSON , n ; try { n = a ? lF ( a , e ) : []} catch ( i ){ throw new Error ( `Invalid geoJson format
` + i . message )} return b$ ( t , n ), D ( n , function ( i ){ var o = i . name ; C$ ( t , i ), A$ ( 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 I$ ( 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 P$ ( r ){ return j ( r ) ? typeof JSON < "u" && JSON . parse ? JSON . parse ( r ) : new Function ( "return (" + r + ");" )() : r } var Tl = at (); const vn = { registerMap : function ( r , e , t ){ if ( e . svg ){ var a = new S$ ( r , e . svg ); Tl . set ( r , a )} else { var n = e . geoJson || e . geoJSON ; n &&! e . features ? t = e . specialAreas : n = e ; var a = new L$ ( r , n , t ); Tl . set ( r , a )}}, getGeoResource : function ( r ){ return Tl . get ( r )}, getMapForUser : function ( r ){ var e = Tl . get ( r ); return e && e . type === "geoJSON" && e . getMapForUser ()}, load : function ( r , e , t ){ var a = Tl . get ( r ); if ( a ) return a . load ( e , t )}}; var Q0 = [ "rect" , "circle" , "line" , "ellipse" , "polygon" , "polyline" , "path" ], k$ = at ( Q0 ), R$ = at ( Q0 . concat ([ "g" ])), E$ = at ( Q0 . concat ([ "g" ])), pP = kt (); function Kf ( r ){ var e = r . getItemStyle (), t = r . get ( "areaColor" ); return t != null && ( e . fill = t ), e } function ab ( r ){ var e = r . style ; e && ( e . stroke = e . stroke || e . fill , e . fill = null )} var O$ = function (){ function r ( e ){ var t = this . group = new ft , a = this . _transformGroup = new ft ; t . add ( a ), this . uid = Xs ( "ec_map_draw" ), this . _controller = new ko ( e . getZr ()), this . _controllerHost = { target : a }, a . add ( this . _regionsGroup = new ft ), a . add ( this . _svgGroup = new ft )} 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 Pt ({ 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 ()) : Ft ( 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 = at (), a = at (), 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 ft ), 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 = ub ( C , u )), D ( C , function ( M ){ S . push ( new fr ( v ( M )))})} else { var A = T . points ; u && ( A = ub ( A , u , ! 0 )), D ( A , function ( M ){ x . push ( new rr ( v ( M )))})}}); var w = f ( h . getCenter (), l && l . project ); function b ( T , C ){ if ( T . length ){ var A = new fh ({ culling :! 0 , segmentIgnoreThreshold : 1 , shape : { paths : T }}); p . add ( A ), nb ( e , A , y , m ), ib ( e , A , d , m , o , y , w ), C && ( ab ( A ), D ( A . states , ab ))}} b ( S ), b ( x , ! 0 )}), t . each ( function ( h , d ){ var p = a . get ( d ), g = p . dataIdx , y = p . regionModel ; ob ( e , h , d , y , o , g ), sb ( e , h , d , y , o ), lb ( 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 = at (), 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 ); k$ . get ( f ) != null && c instanceof $r && nb ( e ,
`))}),e.join(`
`+kh+`
`)}function nK(r){return $(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+Bs:"")+n.join(Bs))}),a.join(`
`)}).join(`
`+kh+`
`)}function iK(r){var e=rK(r);return{value:Xt([aK(e.seriesGroupByCategoryAxis),nK(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
`+kh+`
`),meta:e.meta}}function Bv(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function oK(r){var e=r.slice(0,r.indexOf(`
`));if(e.indexOf(Bs)>=0)return!0}var fm=new RegExp("["+Bs+"]+","g");function sK(r){for(var e=r.split(/\n+/g),t=Bv(e.shift()).split(fm),a=[],n=$(t,function(l){return{name:l,data:[]}}),i=0;i<e.length;i++){var o=Bv(e[i]).split(fm);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 lK(r){for(var e=r.split(/\n+/g),t=Bv(e.shift()),a=[],n=0;n<e.length;n++){var i=Bv(e[n]);if(i){var o=i.split(fm),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 uK(r,e){var t=r.split(new RegExp(`
* `+kh+`
* `,"g")),a={series:[]};return D(t,function(n,i){if(oK(n)){var o=sK(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=lK(n);a.series.push(o)}}),a}var fK=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=iK(t);if(lt(c)){var d=c(a.getOption());j(d)?u.innerHTML=d:Ts(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}wg(_,"click",w),wg(S,"click",function(){if(v==null&&c!=null||v!=null&&c==null){w();return}var b;try{lt(v)?b=v(u,a.getOption()):b=uK(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}(Vr);function cK(r,e){return $(r,function(t,a){var n=e&&e[a];if(dt(n)&&!W(n)){var i=dt(t)&&!W(t);i||(t={value:t});var o=n.name!=null&&t.name==null;return t=ht(t,n),o&&delete t.name,t}else return t})}Fa({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(G({type:"scatter"},a));else{var i=n.get("data");t.push({name:a.name,data:cK(a.data,i)})}}),e.mergeOption(ht({series:t},r.newOption))});const vK=fK;var Qk=D,tR=kt();function hK(r,e){var t=z_(r);Qk(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 dK(r){var e=z_(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return Qk(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 pK(r){tR(r).snapshots=null}function gK(r){return z_(r).length}function z_(r){var e=tR(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 = _t ( 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 = Il ([ 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 Id ; y . marker = m . makeTooltipMarker ( "item" , mo ( y . color ), h ); var _ = US ( u . formatTooltip ( f , ! 1 , c )), S = p . get ( "order" ), x = p . get ( "valueFormatter" ), w = _ . frag , b = w ? jS ( x ? G ({ 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 = _t ( 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 = ut ( l ), l . content = Je ( 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 = Il ( c , this . _tooltipModel , h ? { position : h } : null ), p = d . get ( "content" ), g = Math . random () + "" , y = new Id ; this . _showOrMove ( d , function (){ var m = ut ( 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 = W ( n ) ? n [ 0 ] : n , m = y && y . axisType && y . axisType . indexOf ( "time" ) >= 0 ; h = v , m && ( h = dh ( y . axisValue , h , g )), h = t2 ( h , n , ! 0 )} else if ( lt ( 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" || W ( a )) return { color : i || o }; if ( ! W ( 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 ), lt ( a ) && ( a = a ([ n , i ], s , o . el , d ,{ viewSize : [ u , f ], contentSize : c . slice ()})), W ( a )) n = K ( a [ 0 ], u ), i = K ( a [ 1 ], f ); else if ( dt ( a )){ var p = a ; p . width = c [ 0 ], p . height = c [ 1 ]; var g = le ( p ,{ width : u , height : f }); n = g . x , i = g . y , v = null , h = null } else if ( j ( a ) && l ){ var y = qK ( a , d , c , t . get ( "borderWidth" )); n = y [ 0 ], i = y [ 1 ]} else { var y = ZK ( n , i , o , u , f , v ? null : 20 , h ? null : 20 ); n = y [ 0 ], i = y [ 1 ]} if ( v && ( n -= EC ( v ) ? c [ 0 ] / 2 : v === "right" ? c [ 0 ] : 0 ), h && ( i -= EC ( h ) ? c [ 1 ] / 2 : h === "bottom" ? c [ 1 ] : 0 ), eR ( t )){ var y = XK ( 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 yc;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",ns(QC,y,null,i,h)).on("mouseover",ns(mm,_.name,null,i,h)).on("mouseout",ns(_m,_.name,null,i,h)),n.ssr&&T.eachChild(function(C){var A=_t(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=pr(L.fill);R&&R[3]===0&&(R[3]=.2,L=G(G({},L),{fill:ka(R,"rgba")}));var k=this._createItem(C,y,p,d,a,t,{},L,P,c,i);k.on("click",ns(QC,null,y,i,h)).on("mouseover",ns(mm,null,y,i,h)).on("mouseout",ns(_m,null,y,i,h)),n.ssr&&k.eachChild(function(O){var E=_t(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};_t(t).eventData=s},e.prototype._createSelector=function(t,a,n,i,o){var s=this.getSelectorGroup();ym(t,function(u){var f=u.type,c=new Gt({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"]);Ve(c,{normal:v,emphasis:h},{defaultText:u.title}),io(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=vJ(f,i,l,u,h,g,v),x=new yc,w=i.getModel("textStyle");if(lt(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(hJ({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??""):lt(A)&&(M=A(a));var I=g?w.getTextColor():i.get("inactiveColor");x.add(new Gt({style:ee(w,{text:M,x:T,y:p/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new Pt({shape:x.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&pn({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),io(x),x.__legendDataIndex=n,x},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();so(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){so("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}(ce);function vJ(r,e,t,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),ym(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 ); et ( t , n ) ? t [ n ] = t [ n ] && i : t [ n ] = i }}), t } function pJ ( r ){ r . registerAction ( "legendToggleSelect" , "legendselectchanged" , Tt ( kl , "toggleSelected" )), r . registerAction ( "legendAllSelect" , "legendselectall" , Tt ( kl , "allSelect" )), r . registerAction ( "legendInverseSelect" , "legendinverseselect" , Tt ( kl , "inverseSelect" )), r . registerAction ( "legendSelect" , "legendselected" , Tt ( kl , "select" )), r . registerAction ( "legendUnSelect" , "legendunselected" , Tt ( kl , "unSelect" ))} function hR ( r ){ r . registerComponentModel ( gm ), r . registerComponentView ( vR ), r . registerProcessor ( r . PRIORITY . PROCESSOR . SERIES_FILTER , dJ ), r . registerSubTypeDefaulter ( "legend" , function (){ return "plain" }), pJ ( r )} var gJ = 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 = Do ( t ); r . prototype . init . call ( this , t , a , n ), eD ( this , t , i )}, e . prototype . mergeOption = function ( t , a ){ r . prototype . mergeOption . call ( this , t , a ), eD ( this , this . option , t )}, e . type = "legend.scroll" , e . defaultOption = fi ( gm . 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 }( gm ); function eD ( r , e , t ){ var a = r . getOrient (), n = [ 1 , 1 ]; n [ a . index ] = 0 , za ( e , t ,{ type : "box" , ignoreSize :!! n })} const yJ = gJ ; var rD = ft , rg = [ "width" , "height" ], ag = [ "x" , "y" ], mJ = 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 rD ), this . _containerGroup . add ( this . getContentGroup ()), this . group . add ( this . _controllerGroup = new rD )}, 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 = W ( c ) ? c : [ c , c ]; d ( "pagePrev" , 0 ); var h = a . getModel ( "pageTextStyle" ); f . add ( new Gt ({ 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 = Wu ( 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 = rg [ u ], c = ag [ u ], v = rg [ 1 - u ], h = ag [ 1 - u ]; o && so ( "horizontal" , l , t . get ( "selectorItemGap" , ! 0 )); var d = t . get ( "selectorButtonGap" , ! 0 ), p = l . getBoundingRect (), g = [ - p . x , - p . y ], y = ut ( 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 ; so ( t . get ( "orient" ), f , t . get ( "itemGap" ), i ? n . width : null , i ? null : n . height ), so ( "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 Pt ({ shape : w }
< div style = "font-weight: bold; margin-bottom: 4px;" > $ { Kt [ 0 ]. name } < /div>`;return Kt.forEach(it=>{nt+=`<div style="color: ${it.color}; margin-top: 4px;">
$ { it . seriesName } : < span style = "color: #fff; font-weight: bold;" > $ { it . value . toLocaleString ( "fa-IR" )} < /span>
< /div>`}),nt+="</div>",nt}},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:Y,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:s.value==="daily"||s.value==="weekly"||s.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:Kt=>Math.round(Kt).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:X,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:bt,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(Rt,!0),Lt},yt=async()=>{n.value=!0;try{const Y=await iE(10);m.value.count_sale_order=Y.usersStats.total,m.value.new_customer=Y.usersStats.today,m.value.count_order=Y.activeUsersSummary.active_users_week,m.value.active_users_week=Y.activeUsersSummary.active_users_week,m.value.active_users_last_week=Y.activeUsersSummary.active_users_last_week,m.value.active_users_last_month=Y.activeUsersSummary.active_users_last_month,m.value.total_sale=String(Y.activeUsersSummary.active_users_month),m.value.active_users_saturday_to_friday=Y.activeUsersSummary.active_users_week,m.value.active_users_jalali_month=Y.activeUsersSummary.active_users_month,O.value=Y.latestUsers||[],m.value.total_story_views=Y.storyViewsSummary.total_story_views,m.value.unique_story_viewers=Y.storyViewsSummary.unique_story_viewers,m.value.latest_story_views=Y.storyViewsSummary.latest_story_views,E.value=Y.storyViewsSummary.story_views_stats||[],m.value.total_audio_views=Y.musicMachartaViewsSummary.total_audio_views,m.value.unique_audio_viewers=Y.musicMachartaViewsSummary.unique_audio_viewers,m.value.total_video_views=Y.musicMachartaViewsSummary.total_video_views,m.value.unique_video_viewers=Y.musicMachartaViewsSummary.unique_video_viewers,I.value=Y.musicMachartaViewsSummary.audio_views_stats||[],L.value=Y.musicMachartaViewsSummary.video_views_stats||[],m.value.new_users_last_7_days=Y.newUsersLast7Days,m.value.new_users_last_30_days=Y.newUsersLast30Days,m.value.today_unique_story_viewers=Y.todayUniqueStoryViewers,m.value.this_week_story_views=Y.storyViews.story_view_week,m.value.today_total_story_views=Y.storyViews.story_view_last_week,m.value.this_month_jalali_story_views=Y.storyViews.story_view_month,m.value.total_story_viewers=Y.storyViews.uniqAllStoryView}catch{}finally{n.value=!1}if(!a.value)try{const Y=await nE();m.value={...m.value,...Y}}catch{}},Ot=Y=>{const X=l.value.indexOf(Y);X>-1?l.value.length>1&&l.value.splice(X,1):l.value.push(Y),st()},$t=Y=>{const X=u.value.indexOf(Y);X>-1?u.value.length>1&&u.value.splice(X,1):u.value.push(Y),rt()},pt=Y=>({"بازدید همه قصه ها":"این عدد آمار بازدیدکنندگان همه قصهها از اول تا حالا را نشان میدهد","بازدید کننده امروز قصه ها":"این عدد تعداد کاربران منحصر به فردی است که امروز حداقل یک قصه را دیدهاند","بازدید فعال این هفته قصه ها":"این عدد بازدید نهایی همه قصهها در هفته گذشته است"," بازدید فعا
< div style = "font-weight: bold; margin-bottom: 4px;" > $ { nt [ 0 ]. name } < /div>`;return nt.forEach(q=>{it+=`<div style="color: ${q.color}; margin-top: 4px;">
$ { q . seriesName } : < span style = "color: #fff; font-weight: bold;" > $ { q . value . toLocaleString ( "fa-IR" )} < /span>
< /div>`}),it+="</div>",it}},legend:{data:X.map(nt=>nt.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:Y,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:o.value==="daily"||o.value==="weekly"||o.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:nt=>Math.round(nt).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:Rt};return J.setOption(Kt,!0),J},rt=async()=>{try{const Y=new Date().toISOString().split("T")[0],X=u.value.map(async nt=>{const it={type:i.value,date:Y,statType:nt};v.value&&h.value&&(it.startDate=v.value,it.endDate=h.value,delete it.date);const q=await oE(it);return{statType:nt,data:q||[]}}),bt=await Promise.all(X);let St=[];const J={};u.value.forEach(nt=>{J[nt]=[]});const Lt=new Set;if(bt.forEach(({data:nt})=>{i.value==="hourly"?nt.forEach(it=>{if(it.hour!==void 0)Lt.add(String(it.hour));else if(it.day){const q=Number(it.hour)||0;Lt.add(`${it.day}_${q}`)}}):nt.forEach(it=>{const q=it.day||"";q&&Lt.add(q)})}),i.value==="hourly")for(let nt=0;nt<=24;nt++){const it=nt===24?"24:00":`${nt.toString().padStart(2,"0")}:00`;St.push(it)}else Array.from(Lt).sort().forEach(it=>{if(i.value==="daily")St.push(Ha(it));else if(i.value==="weekly")try{const q=new Date(it+"T00:00:00"),It=new Date(q);It.setDate(q.getDate()+5);const jt=Ha(it)+" تا "+Ha(It.toISOString().split("T")[0]);St.push(jt)}catch{St.push(it)}else if(i.value==="monthly"){const[q,It]=it.split("-"),jt=`${q}/${It}`;St.push(jt)}});bt.forEach(({statType:nt,data:it})=>{const q={};i.value==="hourly"?nt==="total_views"?it.forEach(It=>{const jt=Number(It.hour)||0,de=Number((It==null?void 0:It.views)||0),pe=String(jt);q[pe]=(q[pe]||0)+de}):it.forEach(It=>{const jt=It.day||"",de=Number(It.hour)||0,pe=`${jt}_${de}`,yn=Number((It==null?void 0:It.views)||0);q[pe]=yn}):it.forEach(It=>{const jt=It.day||"",de=Number((It==null?void 0:It.views)||0);nt==="total_views"?q[jt]=(q[jt]||0)+de:q[jt]=de}),St.forEach(It=>{let jt=It;if(i.value==="daily")jt=Ke(It,"jYYYY/jMM/jDD").format("YYYY-MM-DD");else if(i.value==="weekly"){const pe=It.split(" تا ");jt=Ke(pe[0],"jYYYY/jMM/jDD").format("YYYY-MM-DD")}else if(i.value==="monthly")jt=Ke(It,"jYYYY/jMM").format("YYYY-MM");else if(i.value==="hourly")if(nt==="total_views")jt=String(parseInt(It.split(":")[0]));else{const pe=parseInt(It.split(":")[0]);jt=Object.keys(q).find(mn=>mn.endsWith(`_${pe}`))||String(pe)}const de=q[jt]||0;J[nt].push(Math.round(de))})});const Rt=u.value.map(nt=>({name:nt==="cumulative_viewers"?"آمار بازدید کننده تجمیعی همه قصه ها":nt==="total_views"?"آمار بازدید همه قصه ها":"آمار بازدید کننده همه قصه ها",data:J[nt]||[],color:nt==="cumulative_viewers"?"#3B82F6":nt==="total_views"?"#F97316":"#22C55E"}));if(await _n(),!b.value){setTimeout(()=>{if(b.value){const nt=mt(St,Rt,b.value,A);nt&&(A=nt)}},100);return}const Kt=mt(St,Rt,b.value,A);Kt&&(A=Kt)}catch{if(await _n(),b.value){const X=mt([],[],b.value,A);X&&(A=X)}}},mt=(Y,X,bt,St)=>{if(!bt)return St;let J=St;J||(J=Vd(bt));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:Rt=>{let Kt=`<div style="padding: 8px;">
< div style = "font-weight: bold; margin-bottom: 4px;" > $ { Rt [ 0 ]. name } < /div>`;return Rt.forEach(nt=>{Kt+=`<div style="color: ${nt.color}; margin-top: 4px;">
$ { nt . seriesName } : < span style = "color: #fff; font-weight: bold;" > $ { nt . value . toLocaleString ( "fa-IR" )} < /span>
2026-07-14 12:58:42 +03:30
< /div>`}),Kt+="</div>",Kt}},legend:{data:X.map(Rt=>Rt.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:Y,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:Rt=>Math.round(Rt).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:X.map(Rt=>({name:Rt.name,type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:Rt.data,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:`${Rt.color}40`},{offset:1,color:`${Rt.color}0D`}]}},lineStyle:{width:3,color:Rt.color,shadowColor:`${Rt.color}80`,shadowBlur:10,shadowOffsetY:5},itemStyle:{color:Rt.color,borderColor:"#fff",borderWidth:2,shadowBlur:8,shadowColor:`${Rt.color}80`},emphasis:{focus:"series",itemStyle:{color:Rt.color,borderColor:"#fff",borderWidth:3,shadowBlur:12,shadowColor:`${Rt.color}CC`}},animation:!0,animationDuration:1e3,animationEasing:"cubicOut"}))};return J.setOption(Lt,!0),J},qt=async()=>{var Y,X;try{const bt=new Date().toISOString().split("T")[0],St={type:s.value,date:bt};d.value&&p.value&&(St.startDate=d.value,St.endDate=p.value,delete St.date);const J=await dE(St);x.value=J||[];let Lt=[],Rt=[],Kt=[];if(s.value==="hourly"){const it={};x.value.forEach(q=>{const It=Number(q.hour)||0;it[It]={audio:Number((q==null?void 0:q.audioViews)||0),video:Number((q==null?void 0:q.videoViews)||0)}});for(let q=0;q<=24;q++){const It=q===24?"24:00":`${q.toString().padStart(2,"0")}:00`;Lt.push(It),Rt.push(((Y=it[q])==null?void 0:Y.audio)||0),Kt.push(((X=it[q])==null?void 0:X.video)||0)}}else if(s.value==="daily"){const it={};x.value.forEach(q=>{const It=q.day||"";it[It]={audio:Number((q==null?void 0:q.audioViews)||0),video:Number((q==null?void 0:q.videoViews)||0)}}),Object.keys(it).sort().forEach(q=>{Lt.push(Ha(q)),Rt.push(it[q].audio),Kt.push(it[q].video)})}else if(s.value==="weekly"){const it={};x.value.forEach(q=>{const It=q.day||"";it[It]={audio:Number((q==null?void 0:q.audioViews)||0),video:Number((q==null?void 0:q.videoViews)||0)}}),Object.keys(it).sort().forEach(q=>{try{const It=new Date(q+"T00:00:00"),jt=new Date(It);jt.setDate(It.getDate()+5);const de=Ha(q)+" تا "+Ha(jt.toISOString().split("T")[0]);Lt.push(de),Rt.push(it[q].audio),Kt.push(it[q].video)}catch{Lt.push(q),Rt.push(it[q].audio),Kt.push(it[q].video)}})}else if(s.value==="monthly"){const it={};x.value.forEach(q=>{const It=q.day||"";it[It]={audio:Number((q==null?void 0:q.audioViews)||0),video:Number((q==null?void 0:q.videoViews)||0)}}),Object.keys(it).sort().forEach(q=>{const[It,jt]=q.split("-");Lt.push(`${It}/${jt}`),Rt.push(it[q].audio),Kt.push(it[q].video)})}if(await _n(),!T.value){setTimeout(()=>{if(T.value){const it=tt(Lt,Rt,Kt,T.value,M);it&&(M=it)}},100);return}const nt=tt(Lt,Rt,Kt,T.value,M);nt&&(M=nt)}catch{if(await _n(),T.value){const St=tt([],[],[],T.value,M);St&&(M=St)}}};PR(async()=>{await yt(),await _n(),await st(),await rt(),await _n(),await new Promise(Y=>setTimeout(Y,100)),await qt(),window.addEventListener("resize",()=>{C&&C.resize(),A&&A.resize(),M&&M.resize()})}),kR(()=>{C&&(C.dispose(),C=null),A&&(A.dispose(),A=null),M&&(M.dispose(),M=null)});async function Bt(){if(k.value.length===0){const{message:Y}=await Sn(()=>import("./index-a742f039.js"),["assets/index-a742f039.js","assets/index-f75dc027.js","assets/index-20d5dab1.js","assets/index-2b0c085a.css","assets/vnode-18b1f518.js","assets/_plugin-vue_export-helper-26f60d29.js","assets/isSymbol-f04930e1.js","assets/styleChecker-6ae1ce26.js","assets/index-4f6342fa.js","assets/button.vue_vue_type_style_index_0_lang-95946c23.js","assets/Icon-06d3f751.js","assets/Icon-07033a75.css","assets/butt