agent-relay-server 0.99.1 → 0.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/openapi.json +1 -1
- package/package.json +5 -2
- package/public/assets/{MessageBubble-DiorZXyB.js → MessageBubble-BEjK1-bi.js} +3 -3
- package/public/assets/{MessageBubble-DiorZXyB.js.map → MessageBubble-BEjK1-bi.js.map} +1 -1
- package/public/assets/{PlanGraphPanel-DY1p8v4p.js → PlanGraphPanel-AqFEg7Yg.js} +2 -2
- package/public/assets/{PlanGraphPanel-DY1p8v4p.js.map → PlanGraphPanel-AqFEg7Yg.js.map} +1 -1
- package/public/assets/{activity-rIxqUtFC.js → activity-D5EZw4bj.js} +2 -2
- package/public/assets/{activity-rIxqUtFC.js.map → activity-D5EZw4bj.js.map} +1 -1
- package/public/assets/agent-profiles-CSISRm_L.js +2 -0
- package/public/assets/agent-profiles-CSISRm_L.js.map +1 -0
- package/public/assets/agents-szyYnkgD.js +2 -0
- package/public/assets/agents-szyYnkgD.js.map +1 -0
- package/public/assets/{analytics-CUJbpoA7.js → analytics-KzLQfGMO.js} +2 -2
- package/public/assets/{analytics-CUJbpoA7.js.map → analytics-KzLQfGMO.js.map} +1 -1
- package/public/assets/{automation-B0cyCT5l.js → automation-DVSq4A1b.js} +2 -2
- package/public/assets/{automation-B0cyCT5l.js.map → automation-DVSq4A1b.js.map} +1 -1
- package/public/assets/branch-state-badge-DgwkJ2rN.js +2 -0
- package/public/assets/branch-state-badge-DgwkJ2rN.js.map +1 -0
- package/public/assets/{channels-Tg8l4n5J.js → channels-Dh_r7SnM.js} +2 -2
- package/public/assets/{channels-Tg8l4n5J.js.map → channels-Dh_r7SnM.js.map} +1 -1
- package/public/assets/chat-patMKjsi.js +2 -0
- package/public/assets/chat-patMKjsi.js.map +1 -0
- package/public/assets/{connectors-B5wbjyUd.js → connectors-DVKBHNRV.js} +2 -2
- package/public/assets/{connectors-B5wbjyUd.js.map → connectors-DVKBHNRV.js.map} +1 -1
- package/public/assets/{formatted-body-impl-ZwgTH3jh.js → formatted-body-impl-Csr2DuEk.js} +2 -2
- package/public/assets/{formatted-body-impl-ZwgTH3jh.js.map → formatted-body-impl-Csr2DuEk.js.map} +1 -1
- package/public/assets/index-D3woTUwp.js +23 -0
- package/public/assets/index-D3woTUwp.js.map +1 -0
- package/public/assets/{insights-C3mlXZdd.js → insights-D2_Qry06.js} +2 -2
- package/public/assets/{insights-C3mlXZdd.js.map → insights-D2_Qry06.js.map} +1 -1
- package/public/assets/{integrations-sYKtupOq.js → integrations-AW8b4h7T.js} +2 -2
- package/public/assets/{integrations-sYKtupOq.js.map → integrations-AW8b4h7T.js.map} +1 -1
- package/public/assets/maintenance-Dm56u8F9.js +2 -0
- package/public/assets/{maintenance-DL1lnqmG.js.map → maintenance-Dm56u8F9.js.map} +1 -1
- package/public/assets/{managed-agents-7A6WH4Rn.js → managed-agents-DpX-cHsm.js} +2 -2
- package/public/assets/{managed-agents-7A6WH4Rn.js.map → managed-agents-DpX-cHsm.js.map} +1 -1
- package/public/assets/{markdown-preview-impl-THat8xv0.js → markdown-preview-impl-Df6EWwbg.js} +2 -2
- package/public/assets/{markdown-preview-impl-THat8xv0.js.map → markdown-preview-impl-Df6EWwbg.js.map} +1 -1
- package/public/assets/{memory-C349UJe9.js → memory-b2AgvV7H.js} +2 -2
- package/public/assets/{memory-C349UJe9.js.map → memory-b2AgvV7H.js.map} +1 -1
- package/public/assets/{messages-DXoLFj2P.js → messages-C5yDD_oq.js} +2 -2
- package/public/assets/{messages-DXoLFj2P.js.map → messages-C5yDD_oq.js.map} +1 -1
- package/public/assets/{orchestrators-CTXu4jAn.js → orchestrators-D3LecmEw.js} +2 -2
- package/public/assets/{orchestrators-CTXu4jAn.js.map → orchestrators-D3LecmEw.js.map} +1 -1
- package/public/assets/{overview-dWiN6TyN.js → overview-CnGkrBNe.js} +2 -2
- package/public/assets/{overview-dWiN6TyN.js.map → overview-CnGkrBNe.js.map} +1 -1
- package/public/assets/{pairs-KIXektDv.js → pairs-DXUdZOqn.js} +2 -2
- package/public/assets/{pairs-KIXektDv.js.map → pairs-DXUdZOqn.js.map} +1 -1
- package/public/assets/{projects-BPI8z55X.js → projects-1h41atqJ.js} +2 -2
- package/public/assets/{projects-BPI8z55X.js.map → projects-1h41atqJ.js.map} +1 -1
- package/public/assets/{registry-C-Y41yGB.js → registry-BeGP37ot.js} +2 -2
- package/public/assets/{registry-C-Y41yGB.js.map → registry-BeGP37ot.js.map} +1 -1
- package/public/assets/{security-BUymkwuj.js → security-BMh_y43L.js} +2 -2
- package/public/assets/{security-BUymkwuj.js.map → security-BMh_y43L.js.map} +1 -1
- package/public/assets/{select-DV25WRP5.js → select-Cvi5OHz0.js} +2 -2
- package/public/assets/{select-DV25WRP5.js.map → select-Cvi5OHz0.js.map} +1 -1
- package/public/assets/settings-DKSEwIVG.js +6 -0
- package/public/assets/{settings-C1En58bx.js.map → settings-DKSEwIVG.js.map} +1 -1
- package/public/assets/store-Ch-QzxPq.js +9 -0
- package/public/assets/store-Ch-QzxPq.js.map +1 -0
- package/public/assets/{tasks-BkpnKA63.js → tasks-BybIAX-y.js} +2 -2
- package/public/assets/{tasks-BkpnKA63.js.map → tasks-BybIAX-y.js.map} +1 -1
- package/public/assets/{teams-D-UYp7yH.js → teams-CMteOToR.js} +2 -2
- package/public/assets/{teams-D-UYp7yH.js.map → teams-CMteOToR.js.map} +1 -1
- package/public/assets/{terminal-viewer-impl-Bif-tkvD.js → terminal-viewer-impl-DanOi7lh.js} +2 -2
- package/public/assets/{terminal-viewer-impl-Bif-tkvD.js.map → terminal-viewer-impl-DanOi7lh.js.map} +1 -1
- package/public/assets/{user-avatar--czLv_AJ.js → user-avatar-DG629icI.js} +2 -2
- package/public/assets/{user-avatar--czLv_AJ.js.map → user-avatar-DG629icI.js.map} +1 -1
- package/public/assets/{work-queue-DN4oTe7w.js → work-queue-DqW80DIy.js} +2 -2
- package/public/assets/{work-queue-DN4oTe7w.js.map → work-queue-DqW80DIy.js.map} +1 -1
- package/public/assets/{workspaces-BolccWZy.js → workspaces-CccVI6lA.js} +2 -2
- package/public/assets/{workspaces-BolccWZy.js.map → workspaces-CccVI6lA.js.map} +1 -1
- package/public/index.html +2 -2
- package/runner/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/runner/plugins/claude/hooks/kill-guard.sh +300 -0
- package/runner/plugins/claude/hooks/read-only-bash-guard.sh +38 -140
- package/runner/src/adapter.ts +2 -2
- package/src/agent-death-diagnosis.ts +12 -3
- package/src/bus.ts +6 -45
- package/src/config-store.ts +13 -9
- package/src/db/provider-quota-burn.ts +79 -6
- package/src/issue-tracker/adapter.ts +11 -1
- package/src/issue-tracker/github.ts +83 -2
- package/src/issue-tracker/index.ts +1 -0
- package/src/lifecycle-manager.ts +9 -22
- package/src/provider-state.ts +9 -18
- package/src/provider-timeline-event.ts +70 -0
- package/src/quota-advisory.ts +4 -7
- package/src/quota-band-transition.ts +101 -11
- package/src/routes/agent-sessions.ts +4 -2
- package/src/services/issue-lifecycle.ts +54 -8
- package/src/services/provider-state-audit.ts +3 -3
- package/src/services/rate-limit-resume.ts +6 -4
- package/src/services/register-agent.ts +2 -1
- package/src/settings/registry.ts +34 -0
- package/src/spawn-targets.ts +80 -10
- package/src/sse.ts +5 -4
- package/public/assets/agent-profiles-Cu-VkJm4.js +0 -2
- package/public/assets/agent-profiles-Cu-VkJm4.js.map +0 -1
- package/public/assets/agents-dRHOBDUe.js +0 -2
- package/public/assets/agents-dRHOBDUe.js.map +0 -1
- package/public/assets/branch-state-badge-CNko2_BL.js +0 -2
- package/public/assets/branch-state-badge-CNko2_BL.js.map +0 -1
- package/public/assets/chat-jit-e6S_.js +0 -2
- package/public/assets/chat-jit-e6S_.js.map +0 -1
- package/public/assets/index-GoC6YrKn.js +0 -23
- package/public/assets/index-GoC6YrKn.js.map +0 -1
- package/public/assets/maintenance-DL1lnqmG.js +0 -2
- package/public/assets/settings-C1En58bx.js +0 -6
- package/public/assets/store-pKbf_WYd.js +0 -9
- package/public/assets/store-pKbf_WYd.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./chunk-CilyBKbf.js";import{F as t,Pn as n,Qn as r,a as i,dr as a,tt as o}from"./lucide-react-BYZuAhQs.js";import{t as s}from"./store-
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{F as t,Pn as n,Qn as r,a as i,dr as a,tt as o}from"./lucide-react-BYZuAhQs.js";import{t as s}from"./store-Ch-QzxPq.js";import{t as c}from"./themes-DjSwmAZN.js";import{a as l,o as u,r as d,t as f}from"./card-lhnFnBoz.js";var p=e(a(),1);function m(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function g(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function v(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function y(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=N(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function b(e){var t=w();return function(){var n,r=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return h(e)}(this,n)}}function x(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function C(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&D(e,t)}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(w=function(){return!!e})()}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?T(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||N(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function k(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||N(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function A(e){var t=function(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return typeof t==`symbol`?t:t+``}function M(e){return M=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},M(e)}function N(e,t){if(e){if(typeof e==`string`)return m(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}var P=function(){function e(){g(this,e)}return v(e,[{key:`shadeRGBColor`,value:function(e,t){var n=t.split(`,`),r=e<0?0:255,i=e<0?-1*e:e,a=parseInt(n[0].slice(4),10),o=parseInt(n[1],10),s=parseInt(n[2],10);return`rgb(`+(Math.round((r-a)*i)+a)+`,`+(Math.round((r-o)*i)+o)+`,`+(Math.round((r-s)*i)+s)+`)`}},{key:`shadeHexColor`,value:function(e,t){var n=parseInt(t.slice(1),16),r=e<0?0:255,i=e<0?-1*e:e,a=n>>16,o=n>>8&255,s=255&n;return`#`+(16777216+65536*(Math.round((r-a)*i)+a)+256*(Math.round((r-o)*i)+o)+(Math.round((r-s)*i)+s)).toString(16).slice(1)}},{key:`shadeColor`,value:function(t,n){return e.isColorHex(n)?this.shadeHexColor(t,n):this.shadeRGBColor(t,n)}}],[{key:`bind`,value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:`isObject`,value:function(e){return e&&M(e)===`object`&&!Array.isArray(e)&&e!=null}},{key:`is`,value:function(e,t){return Object.prototype.toString.call(t)===`[object `+e+`]`}},{key:`isSafari`,value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:`listToArray`,value:function(e){var t,n=[];for(t=0;t<e.length;t++)n[t]=e[t];return n}},{key:`extend`,value:function(e,t){var n=this;typeof Object.assign!=`function`&&(Object.assign=function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t});var r=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach((function(i){n.isObject(t[i])&&i in e?r[i]=n.extend(e[i],t[i]):Object.assign(r,x({},i,t[i]))})),r}},{key:`extendArray`,value:function(t,n){var r=[];return t.map((function(t){r.push(e.extend(n,t))})),t=r}},{key:`monthMod`,value:function(e){return e%12}},{key:`clone`,value:function(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e===null||M(e)!==`object`)return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){t=[],n.set(e,t);for(var r=0;r<e.length;r++)t[r]=this.clone(e[r],n)}else if(e instanceof Date)t=new Date(e.getTime());else for(var i in t={},n.set(e,t),e)e.hasOwnProperty(i)&&(t[i]=this.clone(e[i],n));return t}},{key:`log10`,value:function(e){return Math.log(e)/Math.LN10}},{key:`roundToBase10`,value:function(e){return 10**Math.floor(Math.log10(e))}},{key:`roundToBase`,value:function(e,t){return t**+Math.floor(Math.log(e)/Math.log(t))}},{key:`parseNumber`,value:function(e){return e===null?e:parseFloat(e)}},{key:`stripNumber`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}},{key:`randomId`,value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:`noExponents`,value:function(e){return e.toString().includes(`e`)?Math.round(e):e}},{key:`elementExists`,value:function(e){return!(!e||!e.isConnected)}},{key:`getDimensions`,value:function(e){var t=getComputedStyle(e,null),n=e.clientHeight,r=e.clientWidth;return n-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),[r-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),n]}},{key:`getBoundingClientRect`,value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}},{key:`getLargestStringFromArr`,value:function(e){return e.reduce((function(e,t){return Array.isArray(t)&&(t=t.reduce((function(e,t){return e.length>t.length?e:t}))),e.length>t.length?e:t}),0)}},{key:`hexToRgba`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`#999999`,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;e.substring(0,1)!==`#`&&(e=`#999999`);var n=e.replace(`#`,``);n=n.match(RegExp(`(.{`+n.length/3+`})`,`g`));for(var r=0;r<n.length;r++)n[r]=parseInt(n[r].length===1?n[r]+n[r]:n[r],16);return t!==void 0&&n.push(t),`rgba(`+n.join(`,`)+`)`}},{key:`getOpacityFromRGBA`,value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,`$1`))}},{key:`rgb2hex`,value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&e.length===4?`#`+(`0`+parseInt(e[1],10).toString(16)).slice(-2)+(`0`+parseInt(e[2],10).toString(16)).slice(-2)+(`0`+parseInt(e[3],10).toString(16)).slice(-2):``}},{key:`isColorHex`,value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:`getPolygonPos`,value:function(e,t){for(var n=[],r=2*Math.PI/t,i=0;i<t;i++){var a={};a.x=e*Math.sin(i*r),a.y=-e*Math.cos(i*r),n.push(a)}return n}},{key:`polarToCartesian`,value:function(e,t,n,r){var i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}},{key:`escapeString`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`x`,n=e.toString().slice();return n=n.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,t)}},{key:`negToZero`,value:function(e){return e<0?0:e}},{key:`moveIndexInArray`,value:function(e,t,n){if(n>=e.length)for(var r=n-e.length+1;r--;)e.push(void 0);return e.splice(n,0,e.splice(t,1)[0]),e}},{key:`extractNumber`,value:function(e){return parseFloat(e.replace(/[^\d.]*/g,``))}},{key:`findAncestor`,value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:`setELstyles`,value:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e.style.key=t[n])}},{key:`preciseAddition`,value:function(e,t){var n=(String(e).split(`.`)[1]||``).length,r=(String(t).split(`.`)[1]||``).length,i=10**Math.max(n,r);return(Math.round(e*i)+Math.round(t*i))/i}},{key:`isNumber`,value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:`isFloat`,value:function(e){return Number(e)===e&&e%1!=0}},{key:`isMsEdge`,value:function(){var e=window.navigator.userAgent,t=e.indexOf(`Edge/`);return t>0&&parseInt(e.substring(t+5,e.indexOf(`.`,t)),10)}},{key:`getGCD`,value:function(e,t){var n=10**((arguments.length>2&&arguments[2]!==void 0?arguments[2]:7)-Math.floor(Math.log10(Math.max(e,t))));for(e=Math.round(Math.abs(e)*n),t=Math.round(Math.abs(t)*n);t;){var r=t;t=e%t,e=r}return e/n}},{key:`getPrimeFactors`,value:function(e){for(var t=[],n=2;e>=2;)e%n==0?(t.push(n),e/=n):n++;return t}},{key:`mod`,value:function(e,t){var n=10**((arguments.length>2&&arguments[2]!==void 0?arguments[2]:7)-Math.floor(Math.log10(Math.max(e,t))));return(e=Math.round(Math.abs(e)*n))%(t=Math.round(Math.abs(t)*n))/n}}]),e}(),F=function(){function e(t){g(this,e),this.ctx=t,this.w=t.w}return v(e,[{key:`animateLine`,value:function(e,t,n,r){e.attr(t).animate(r).attr(n)}},{key:`animateMarker`,value:function(e,t,n,r){e.attr({opacity:0}).animate(t).attr({opacity:1}).after((function(){r()}))}},{key:`animateRect`,value:function(e,t,n,r,i){e.attr(t).animate(r).attr(n).after((function(){return i()}))}},{key:`animatePathsGradually`,value:function(e){var t=e.el,n=e.realIndex,r=e.j,i=e.fill,a=e.pathFrom,o=e.pathTo,s=e.speed,c=e.delay,l=this.w,u=0;l.config.chart.animations.animateGradually.enabled&&(u=l.config.chart.animations.animateGradually.delay),l.config.chart.animations.dynamicAnimation.enabled&&l.globals.dataChanged&&l.config.chart.type!==`bar`&&(u=0),this.morphSVG(t,n,r,l.config.chart.type!==`line`||l.globals.comboCharts?i:`stroke`,a,o,s,c*u)}},{key:`showDelayedElements`,value:function(){this.w.globals.delayedElements.forEach((function(e){var t=e.el;t.classList.remove(`apexcharts-element-hidden`),t.classList.add(`apexcharts-hidden-element-shown`)}))}},{key:`animationCompleted`,value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd==`function`&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:`morphSVG`,value:function(e,t,n,r,i,a,o,s){var c=this,l=this.w;i||=e.attr(`pathFrom`),a||=e.attr(`pathTo`);var u=function(e){return l.config.chart.type===`radar`&&(o=1),`M 0 ${l.globals.gridHeight}`};(!i||i.indexOf(`undefined`)>-1||i.indexOf(`NaN`)>-1)&&(i=u()),(!a.trim()||a.indexOf(`undefined`)>-1||a.indexOf(`NaN`)>-1)&&(a=u()),l.globals.shouldAnimate||(o=1),e.plot(i).animate(1,s).plot(i).animate(o,s).plot(a).after((function(){P.isNumber(n)?n===l.globals.series[l.globals.maxValsInArrayIndex].length-2&&l.globals.shouldAnimate&&c.animationCompleted(e):r!==`none`&&l.globals.shouldAnimate&&(!l.globals.comboCharts&&t===l.globals.series.length-1||l.globals.comboCharts)&&c.animationCompleted(e),c.showDelayedElements()}))}}]),e}(),I={},L=[];function R(e,t){if(Array.isArray(e))for(let n of e)R(n,t);else if(typeof e!=`object`)ee(Object.getOwnPropertyNames(t)),I[e]=Object.assign(I[e]||{},t);else for(let t in e)R(t,e[t])}function z(e){return I[e]||{}}function ee(e){L.push(...e)}function te(e,t){let n,r=e.length,i=[];for(n=0;n<r;n++)i.push(t(e[n]));return i}function ne(e){return e%360*Math.PI/180}function re(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ie(e,t,n,r){return t!=null&&n!=null||(r||=e.bbox(),t==null?t=r.width/r.height*n:n??=r.height/r.width*t),{width:t,height:n}}function ae(e,t){let n=e.origin,r=e.ox==null?e.originX==null?`center`:e.originX:e.ox,i=e.oy==null?e.originY==null?`center`:e.originY:e.oy;n!=null&&([r,i]=Array.isArray(n)?n:typeof n==`object`?[n.x,n.y]:[n,n]);let a=typeof r==`string`,o=typeof i==`string`;if(a||o){let{height:e,width:n,x:s,y:c}=t.bbox();a&&(r=r.includes(`left`)?s:r.includes(`right`)?s+n:s+n/2),o&&(i=i.includes(`top`)?c:i.includes(`bottom`)?c+e:c+e/2)}return[r,i]}var oe=new Set([`desc`,`metadata`,`title`]),se=e=>oe.has(e.nodeName),ce=(e,t,n={})=>{let r={...t};for(let e in r)r[e].valueOf()===n[e]&&delete r[e];Object.keys(r).length?e.node.setAttribute(`data-svgjs`,JSON.stringify(r)):(e.node.removeAttribute(`data-svgjs`),e.node.removeAttribute(`svgjs:data`))},le=`http://www.w3.org/2000/svg`,ue=`http://www.w3.org/2000/xmlns/`,de=`http://www.w3.org/1999/xlink`,B={window:typeof window>`u`?null:window,document:typeof document>`u`?null:document};function fe(){return B.window}var pe=class{},me={},he=`___SYMBOL___ROOT___`;function ge(e,t=le){return B.document.createElementNS(t,e)}function _e(e,t=!1){if(e instanceof pe)return e;if(typeof e==`object`)return ye(e);if(e==null)return new me[he];if(typeof e==`string`&&e.charAt(0)!==`<`)return ye(B.document.querySelector(e));let n=t?B.document.createElement(`div`):ge(`svg`);return n.innerHTML=e,e=ye(n.firstChild),n.removeChild(n.firstChild),e}function V(e,t){return t&&(t instanceof B.window.Node||t.ownerDocument&&t instanceof t.ownerDocument.defaultView.Node)?t:ge(e)}function ve(e){if(!e)return null;if(e.instance instanceof pe)return e.instance;if(e.nodeName===`#document-fragment`)return new me.Fragment(e);let t=re(e.nodeName||`Dom`);return t===`LinearGradient`||t===`RadialGradient`?t=`Gradient`:me[t]||(t=`Dom`),new me[t](e)}var ye=ve;function H(e,t=e.name,n=!1){return me[t]=e,n&&(me[he]=e),ee(Object.getOwnPropertyNames(e.prototype)),e}var be=1e3;function xe(e){return`Svgjs`+re(e)+ be++}function Se(e){for(let t=e.children.length-1;t>=0;t--)Se(e.children[t]);return e.id&&=xe(e.nodeName),e}function U(e,t){let n,r;for(r=(e=Array.isArray(e)?e:[e]).length-1;r>=0;r--)for(n in t)e[r].prototype[n]=t[n]}function W(e){return function(...t){let n=t[t.length-1];return!n||n.constructor!==Object||n instanceof Array?e.apply(this,t):e.apply(this,t.slice(0,-1)).attr(n)}}R(`Dom`,{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){let e=this.position();return this.parent().add(this.remove(),e+1),this},backward:function(){let e=this.position();return this.parent().add(this.remove(),e?e-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(e){(e=_e(e)).remove();let t=this.position();return this.parent().add(e,t),this},after:function(e){(e=_e(e)).remove();let t=this.position();return this.parent().add(e,t+1),this},insertBefore:function(e){return(e=_e(e)).before(this),this},insertAfter:function(e){return(e=_e(e)).after(this),this}});var Ce=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,we=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Te=/rgb\((\d+),(\d+),(\d+)\)/,Ee=/(#[a-z_][a-z0-9\-_]*)/i,De=/\)\s*,?\s*/,Oe=/\s/g,ke=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Ae=/^rgb\(/,je=/^(\s+)?$/,Me=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ne=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Pe=/[\s,]+/,Fe=/[MLHVCSQTAZ]/i;function Ie(e){let t=Math.max(0,Math.min(255,Math.round(e))).toString(16);return t.length===1?`0`+t:t}function Le(e,t){for(let n=t.length;n--;)if(e[t[n]]==null)return!1;return!0}function Re(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}R(`Dom`,{classes:function(){let e=this.attr(`class`);return e==null?[]:e.trim().split(Pe)},hasClass:function(e){return this.classes().indexOf(e)!==-1},addClass:function(e){if(!this.hasClass(e)){let t=this.classes();t.push(e),this.attr(`class`,t.join(` `))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr(`class`,this.classes().filter((function(t){return t!==e})).join(` `)),this},toggleClass:function(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e)}}),R(`Dom`,{css:function(e,t){let n={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter((function(e){return!!e.length})).forEach((function(e){let t=e.split(/\s*:\s*/);n[t[0]]=t[1]})),n;if(arguments.length<2){if(Array.isArray(e)){for(let t of e){let e=t;n[t]=this.node.style.getPropertyValue(e)}return n}if(typeof e==`string`)return this.node.style.getPropertyValue(e);if(typeof e==`object`)for(let t in e)this.node.style.setProperty(t,e[t]==null||je.test(e[t])?``:e[t])}return arguments.length===2&&this.node.style.setProperty(e,t==null||je.test(t)?``:t),this},show:function(){return this.css(`display`,``)},hide:function(){return this.css(`display`,`none`)},visible:function(){return this.css(`display`)!==`none`}}),R(`Dom`,{data:function(e,t,n){if(e==null)return this.data(te(function(e,t){let n,r=e.length,i=[];for(n=0;n<r;n++)t(e[n])&&i.push(e[n]);return i}(this.node.attributes,(e=>e.nodeName.indexOf(`data-`)===0)),(e=>e.nodeName.slice(5))));if(e instanceof Array){let t={};for(let n of e)t[n]=this.data(n);return t}if(typeof e==`object`)for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr(`data-`+e))}catch{return this.attr(`data-`+e)}else this.attr(`data-`+e,t===null?null:!0===n||typeof t==`string`||typeof t==`number`?t:JSON.stringify(t));return this}}),R(`Dom`,{remember:function(e,t){if(typeof arguments[0]==`object`)for(let t in e)this.remember(t,e[t]);else{if(arguments.length===1)return this.memory()[e];this.memory()[e]=t}return this},forget:function(){if(arguments.length===0)this._memory={};else for(let e=arguments.length-1;e>=0;e--)delete this.memory()[arguments[e]];return this},memory:function(){return this._memory=this._memory||{}}});var ze=class e{constructor(...e){this.init(...e)}static isColor(t){return t&&(t instanceof e||this.isRgb(t)||this.test(t))}static isRgb(e){return e&&typeof e.r==`number`&&typeof e.g==`number`&&typeof e.b==`number`}static random(t=`vibrant`,n){let{random:r,round:i,sin:a,PI:o}=Math;if(t===`vibrant`)return new e(24*r()+57,38*r()+45,360*r(),`lch`);if(t===`sine`)return new e(i(80*a(2*o*(n??=r())/.5+.01)+150),i(50*a(2*o*n/.5+4.6)+200),i(100*a(2*o*n/.5+2.3)+150));if(t===`pastel`)return new e(8*r()+86,17*r()+9,360*r(),`lch`);if(t===`dark`)return new e(10+10*r(),50*r()+86,360*r(),`lch`);if(t===`rgb`)return new e(255*r(),255*r(),255*r());if(t===`lab`)return new e(100*r(),256*r()-128,256*r()-128,`lab`);if(t===`grey`){let t=255*r();return new e(t,t,t)}throw Error(`Unsupported random color mode`)}static test(e){return typeof e==`string`&&(ke.test(e)||Ae.test(e))}cmyk(){let{_a:t,_b:n,_c:r}=this.rgb(),[i,a,o]=[t,n,r].map((e=>e/255)),s=Math.min(1-i,1-a,1-o);return s===1?new e(0,0,0,1,`cmyk`):new e((1-i-s)/(1-s),(1-a-s)/(1-s),(1-o-s)/(1-s),s,`cmyk`)}hsl(){let{_a:t,_b:n,_c:r}=this.rgb(),[i,a,o]=[t,n,r].map((e=>e/255)),s=Math.max(i,a,o),c=Math.min(i,a,o),l=(s+c)/2,u=s===c,d=s-c;return new e(360*(u?0:s===i?((a-o)/d+(a<o?6:0))/6:s===a?((o-i)/d+2)/6:s===o?((i-a)/d+4)/6:0),100*(u?0:l>.5?d/(2-s-c):d/(s+c)),100*l,`hsl`)}init(e=0,t=0,n=0,r=0,i=`rgb`){if(e||=0,this.space)for(let e in this.space)delete this[this.space[e]];if(typeof e==`number`)i=typeof r==`string`?r:i,r=typeof r==`string`?0:r,Object.assign(this,{_a:e,_b:t,_c:n,_d:r,space:i});else if(e instanceof Array)this.space=t||(typeof e[3]==`string`?e[3]:e[4])||`rgb`,Object.assign(this,{_a:e[0],_b:e[1],_c:e[2],_d:e[3]||0});else if(e instanceof Object){let n=function(e,t){let n=Le(e,`rgb`)?{_a:e.r,_b:e.g,_c:e.b,_d:0,space:`rgb`}:Le(e,`xyz`)?{_a:e.x,_b:e.y,_c:e.z,_d:0,space:`xyz`}:Le(e,`hsl`)?{_a:e.h,_b:e.s,_c:e.l,_d:0,space:`hsl`}:Le(e,`lab`)?{_a:e.l,_b:e.a,_c:e.b,_d:0,space:`lab`}:Le(e,`lch`)?{_a:e.l,_b:e.c,_c:e.h,_d:0,space:`lch`}:Le(e,`cmyk`)?{_a:e.c,_b:e.m,_c:e.y,_d:e.k,space:`cmyk`}:{_a:0,_b:0,_c:0,space:`rgb`};return n.space=t||n.space,n}(e,t);Object.assign(this,n)}else if(typeof e==`string`)if(Ae.test(e)){let t=e.replace(Oe,``),[n,r,i]=Te.exec(t).slice(1,4).map((e=>parseInt(e)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:`rgb`})}else{if(!ke.test(e))throw Error(`Unsupported string format, can't construct Color`);{let[,t,n,r]=we.exec(function(e){return e.length===4?[`#`,e.substring(1,2),e.substring(1,2),e.substring(2,3),e.substring(2,3),e.substring(3,4),e.substring(3,4)].join(``):e}(e)).map(e=>parseInt(e,16));Object.assign(this,{_a:t,_b:n,_c:r,_d:0,space:`rgb`})}}let{_a:a,_b:o,_c:s,_d:c}=this,l=this.space===`rgb`?{r:a,g:o,b:s}:this.space===`xyz`?{x:a,y:o,z:s}:this.space===`hsl`?{h:a,s:o,l:s}:this.space===`lab`?{l:a,a:o,b:s}:this.space===`lch`?{l:a,c:o,h:s}:this.space===`cmyk`?{c:a,m:o,y:s,k:c}:{};Object.assign(this,l)}lab(){let{x:t,y:n,z:r}=this.xyz();return new e(116*n-16,500*(t-n),200*(n-r),`lab`)}lch(){let{l:t,a:n,b:r}=this.lab(),i=Math.sqrt(n**2+r**2),a=180*Math.atan2(r,n)/Math.PI;return a<0&&(a*=-1,a=360-a),new e(t,i,a,`lch`)}rgb(){if(this.space===`rgb`)return this;if((t=this.space)===`lab`||t===`xyz`||t===`lch`){let{x:t,y:n,z:r}=this;if(this.space===`lab`||this.space===`lch`){let{l:e,a:i,b:a}=this;if(this.space===`lch`){let{c:e,h:t}=this,n=Math.PI/180;i=e*Math.cos(n*t),a=e*Math.sin(n*t)}let o=(e+16)/116,s=i/500+o,c=o-a/200,l=16/116,u=.008856,d=7.787;t=.95047*(s**3>u?s**3:(s-l)/d),n=1*(o**3>u?o**3:(o-l)/d),r=1.08883*(c**3>u?c**3:(c-l)/d)}let i=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,s=Math.pow,c=.0031308,l=i>c?1.055*s(i,1/2.4)-.055:12.92*i,u=a>c?1.055*s(a,1/2.4)-.055:12.92*a,d=o>c?1.055*s(o,1/2.4)-.055:12.92*o;return new e(255*l,255*u,255*d)}if(this.space===`hsl`){let{h:t,s:n,l:r}=this;if(t/=360,n/=100,r/=100,n===0)return r*=255,new e(r,r,r);let i=r<.5?r*(1+n):r+n-r*n,a=2*r-i;return new e(255*Re(a,i,t+1/3),255*Re(a,i,t),255*Re(a,i,t-1/3))}if(this.space===`cmyk`){let{c:t,m:n,y:r,k:i}=this;return new e(255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)))}return this;var t}toArray(){let{_a:e,_b:t,_c:n,_d:r,space:i}=this;return[e,t,n,r,i]}toHex(){let[e,t,n]=this._clamped().map(Ie);return`#${e}${t}${n}`}toRgb(){let[e,t,n]=this._clamped();return`rgb(${e},${t},${n})`}toString(){return this.toHex()}xyz(){let{_a:t,_b:n,_c:r}=this.rgb(),[i,a,o]=[t,n,r].map((e=>e/255)),s=i>.04045?((i+.055)/1.055)**2.4:i/12.92,c=a>.04045?((a+.055)/1.055)**2.4:a/12.92,l=o>.04045?((o+.055)/1.055)**2.4:o/12.92,u=(.4124*s+.3576*c+.1805*l)/.95047,d=(.2126*s+.7152*c+.0722*l)/1,f=(.0193*s+.1192*c+.9505*l)/1.08883;return new e(u>.008856?u**(1/3):7.787*u+16/116,d>.008856?d**(1/3):7.787*d+16/116,f>.008856?f**(1/3):7.787*f+16/116,`xyz`)}_clamped(){let{_a:e,_b:t,_c:n}=this.rgb(),{max:r,min:i,round:a}=Math;return[e,t,n].map((e=>r(0,i(a(e),255))))}},G=class e{constructor(...e){this.init(...e)}clone(){return new e(this)}init(e,t){let n=Array.isArray(e)?{x:e[0],y:e[1]}:typeof e==`object`?{x:e.x,y:e.y}:{x:e,y:t};return this.x=n.x==null?0:n.x,this.y=n.y==null?0:n.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){K.isMatrixLike(e)||(e=new K(e));let{x:t,y:n}=this;return this.x=e.a*t+e.c*n+e.e,this.y=e.b*t+e.d*n+e.f,this}};function Be(e,t,n){return Math.abs(t-e)<(n||1e-6)}var K=class e{constructor(...e){this.init(...e)}static formatTransforms(e){let t=e.flip===`both`||!0===e.flip,n=e.flip&&(t||e.flip===`x`)?-1:1,r=e.flip&&(t||e.flip===`y`)?-1:1,i=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,a=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,o=e.scale&&e.scale.length?e.scale[0]*n:isFinite(e.scale)?e.scale*n:isFinite(e.scaleX)?e.scaleX*n:n,s=e.scale&&e.scale.length?e.scale[1]*r:isFinite(e.scale)?e.scale*r:isFinite(e.scaleY)?e.scaleY*r:r,c=e.shear||0,l=e.rotate||e.theta||0,u=new G(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),d=u.x,f=u.y,p=new G(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),m=p.x,h=p.y,g=new G(e.translate||e.tx||e.translateX,e.ty||e.translateY),_=g.x,v=g.y,y=new G(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:o,scaleY:s,skewX:i,skewY:a,shear:c,theta:l,rx:y.x,ry:y.y,tx:_,ty:v,ox:d,oy:f,px:m,py:h}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return e.a!=null||e.b!=null||e.c!=null||e.d!=null||e.e!=null||e.f!=null}static matrixMultiply(e,t,n){let r=e.a*t.a+e.c*t.b,i=e.b*t.a+e.d*t.b,a=e.a*t.c+e.c*t.d,o=e.b*t.c+e.d*t.d,s=e.e+e.a*t.e+e.c*t.f,c=e.f+e.b*t.e+e.d*t.f;return n.a=r,n.b=i,n.c=a,n.d=o,n.e=s,n.f=c,n}around(e,t,n){return this.clone().aroundO(e,t,n)}aroundO(e,t,n){let r=e||0,i=t||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new e(this)}decompose(e=0,t=0){let n=this.a,r=this.b,i=this.c,a=this.d,o=this.e,s=this.f,c=n*a-r*i,l=c>0?1:-1,u=l*Math.sqrt(n*n+r*r),d=Math.atan2(l*r,l*n),f=180/Math.PI*d,p=Math.cos(d),m=Math.sin(d),h=(n*i+r*a)/c,g=i*u/(h*n-r)||a*u/(h*r+n);return{scaleX:u,scaleY:g,shear:h,rotate:f,translateX:o-e+e*p*u+t*(h*p*u-m*g),translateY:s-t+e*m*u+t*(h*m*u+p*g),originX:e,originY:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;let n=new e(t);return Be(this.a,n.a)&&Be(this.b,n.b)&&Be(this.c,n.c)&&Be(this.d,n.d)&&Be(this.e,n.e)&&Be(this.f,n.f)}flip(e,t){return this.clone().flipO(e,t)}flipO(e,t){return e===`x`?this.scaleO(-1,1,t,0):e===`y`?this.scaleO(1,-1,0,t):this.scaleO(-1,-1,e,t||e)}init(t){let n=e.fromArray([1,0,0,1,0,0]);return t=t instanceof lt?t.matrixify():typeof t==`string`?e.fromArray(t.split(Pe).map(parseFloat)):Array.isArray(t)?e.fromArray(t):typeof t==`object`&&e.isMatrixLike(t)?t:typeof t==`object`?new e().transform(t):arguments.length===6?e.fromArray([].slice.call(arguments)):n,this.a=t.a==null?n.a:t.a,this.b=t.b==null?n.b:t.b,this.c=t.c==null?n.c:t.c,this.d=t.d==null?n.d:t.d,this.e=t.e==null?n.e:t.e,this.f=t.f==null?n.f:t.f,this}inverse(){return this.clone().inverseO()}inverseO(){let e=this.a,t=this.b,n=this.c,r=this.d,i=this.e,a=this.f,o=e*r-t*n;if(!o)throw Error(`Cannot invert `+this);let s=r/o,c=-t/o,l=-n/o,u=e/o,d=-(s*i+l*a),f=-(c*i+u*a);return this.a=s,this.b=c,this.c=l,this.d=u,this.e=d,this.f=f,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(t){let n=t instanceof e?t:new e(t);return e.matrixMultiply(n,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(t){let n=t instanceof e?t:new e(t);return e.matrixMultiply(this,n,this)}rotate(e,t,n){return this.clone().rotateO(e,t,n)}rotateO(e,t=0,n=0){e=ne(e);let r=Math.cos(e),i=Math.sin(e),{a,b:o,c:s,d:c,e:l,f:u}=this;return this.a=a*r-o*i,this.b=o*r+a*i,this.c=s*r-c*i,this.d=c*r+s*i,this.e=l*r-u*i+n*i-t*r+t,this.f=u*r+l*i-t*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(e,t=e,n=0,r=0){arguments.length===3&&(r=n,n=t,t=e);let{a:i,b:a,c:o,d:s,e:c,f:l}=this;return this.a=i*e,this.b=a*t,this.c=o*e,this.d=s*t,this.e=c*e-n*e+n,this.f=l*t-r*t+r,this}shear(e,t,n){return this.clone().shearO(e,t,n)}shearO(e,t=0,n=0){let{a:r,b:i,c:a,d:o,e:s,f:c}=this;return this.a=r+i*e,this.c=a+o*e,this.e=s+c*e-n*e,this}skew(){return this.clone().skewO(...arguments)}skewO(e,t=e,n=0,r=0){arguments.length===3&&(r=n,n=t,t=e),e=ne(e),t=ne(t);let i=Math.tan(e),a=Math.tan(t),{a:o,b:s,c,d:l,e:u,f:d}=this;return this.a=o+s*i,this.b=s+o*a,this.c=c+l*i,this.d=l+c*a,this.e=u+d*i-r*i,this.f=d+u*a-n*a,this}skewX(e,t,n){return this.skew(e,0,t,n)}skewY(e,t,n){return this.skew(0,e,t,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return`matrix(`+this.a+`,`+this.b+`,`+this.c+`,`+this.d+`,`+this.e+`,`+this.f+`)`}transform(t){if(e.isMatrixLike(t))return new e(t).multiplyO(this);let n=e.formatTransforms(t),{x:r,y:i}=new G(n.ox,n.oy).transform(this),a=new e().translateO(n.rx,n.ry).lmultiplyO(this).translateO(-r,-i).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(r,i);if(isFinite(n.px)||isFinite(n.py)){let e=new G(r,i).transform(a),t=isFinite(n.px)?n.px-e.x:0,o=isFinite(n.py)?n.py-e.y:0;a.translateO(t,o)}return a.translateO(n.tx,n.ty),a}translate(e,t){return this.clone().translateO(e,t)}translateO(e,t){return this.e+=e||0,this.f+=t||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function Ve(){if(!Ve.nodes){let e=_e().size(2,0);e.node.style.cssText=[`opacity: 0`,`position: absolute`,`left: -100%`,`top: -100%`,`overflow: hidden`].join(`;`),e.attr(`focusable`,`false`),e.attr(`aria-hidden`,`true`),Ve.nodes={svg:e,path:e.path().node}}if(!Ve.nodes.svg.node.parentNode){let e=B.document.body||B.document.documentElement;Ve.nodes.svg.addTo(e)}return Ve.nodes}function He(e){return!(e.width||e.height||e.x||e.y)}H(K,`Matrix`);var q=class e{constructor(...e){this.init(...e)}addOffset(){return this.x+=B.window.pageXOffset,this.y+=B.window.pageYOffset,new e(this)}init(e){return e=typeof e==`string`?e.split(Pe).map(parseFloat):Array.isArray(e)?e:typeof e==`object`?[e.left==null?e.x:e.left,e.top==null?e.y:e.top,e.width,e.height]:arguments.length===4?[].slice.call(arguments):[0,0,0,0],this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return He(this)}merge(t){let n=Math.min(this.x,t.x),r=Math.min(this.y,t.y);return new e(n,r,Math.max(this.x+this.width,t.x+t.width)-n,Math.max(this.y+this.height,t.y+t.height)-r)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+` `+this.y+` `+this.width+` `+this.height}transform(t){t instanceof K||(t=new K(t));let n=1/0,r=-1/0,i=1/0,a=-1/0;return[new G(this.x,this.y),new G(this.x2,this.y),new G(this.x,this.y2),new G(this.x2,this.y2)].forEach((function(e){e=e.transform(t),n=Math.min(n,e.x),r=Math.max(r,e.x),i=Math.min(i,e.y),a=Math.max(a,e.y)})),new e(n,i,r-n,a-i)}};function Ue(e,t,n){let r;try{if(r=t(e.node),He(r)&&(i=e.node)!==B.document&&!(B.document.documentElement.contains||function(e){for(;e.parentNode;)e=e.parentNode;return e===B.document}).call(B.document.documentElement,i))throw Error(`Element not in the dom`)}catch{r=n(e)}var i;return r}R({viewbox:{viewbox(e,t,n,r){return e==null?new q(this.attr(`viewBox`)):this.attr(`viewBox`,new q(e,t,n,r))},zoom(e,t){let{width:n,height:r}=this.attr([`width`,`height`]);if((n||r)&&typeof n!=`string`&&typeof r!=`string`||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw Error(`Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element`);let i=this.viewbox(),a=n/i.width,o=r/i.height,s=Math.min(a,o);if(e==null)return s;let c=s/e;c===1/0&&(c=(2**53-1)/100),t||=new G(n/2/a+i.x,r/2/o+i.y);let l=new q(i).transform(new K({scale:c,origin:t}));return this.viewbox(l)}}}),H(q,`Box`);var We=class extends Array{constructor(e=[],...t){if(super(e,...t),typeof e==`number`)return this;this.length=0,this.push(...e)}};U([We],{each(e,...t){return typeof e==`function`?this.map(((t,n,r)=>e.call(t,t,n,r))):this.map((n=>n[e](...t)))},toArray(){return Array.prototype.concat.apply([],this)}});var Ge=[`toArray`,`constructor`,`each`];function Ke(e,t){return new We(te((t||B.document).querySelectorAll(e),(function(e){return ve(e)})))}We.extend=function(e){e=e.reduce(((e,t)=>(Ge.includes(t)||t[0]===`_`||(t in Array.prototype&&(e[`$`+t]=Array.prototype[t]),e[t]=function(...e){return this.each(t,...e)}),e)),{}),U([We],e)};var qe=0,Je={};function Ye(e){let t=e.getEventHolder();return t===B.window&&(t=Je),t.events||={},t.events}function Xe(e){return e.getEventTarget()}function Ze(e,t,n,r,i){let a=n.bind(r||e),o=_e(e),s=Ye(o),c=Xe(o);t=Array.isArray(t)?t:t.split(Pe),n._svgjsListenerId||=++qe,t.forEach((function(e){let t=e.split(`.`)[0],r=e.split(`.`)[1]||`*`;s[t]=s[t]||{},s[t][r]=s[t][r]||{},s[t][r][n._svgjsListenerId]=a,c.addEventListener(t,a,i||!1)}))}function Qe(e,t,n,r){let i=_e(e),a=Ye(i),o=Xe(i);(typeof n!=`function`||(n=n._svgjsListenerId))&&(t=Array.isArray(t)?t:(t||``).split(Pe)).forEach((function(e){let t=e&&e.split(`.`)[0],s=e&&e.split(`.`)[1],c,l;if(n)a[t]&&a[t][s||`*`]&&(o.removeEventListener(t,a[t][s||`*`][n],r||!1),delete a[t][s||`*`][n]);else if(t&&s){if(a[t]&&a[t][s]){for(l in a[t][s])Qe(o,[t,s].join(`.`),l);delete a[t][s]}}else if(s)for(e in a)for(c in a[e])s===c&&Qe(o,[e,s].join(`.`));else if(t){if(a[t]){for(c in a[t])Qe(o,[t,c].join(`.`));delete a[t]}}else{for(e in a)Qe(o,e);(function(e){let t=e.getEventHolder();t===B.window&&(t=Je),t.events&&={}})(i)}}))}var $e=class extends pe{addEventListener(){}dispatch(e,t,n){return function(e,t,n,r){let i=Xe(e);return t instanceof B.window.Event||(t=new B.window.CustomEvent(t,{detail:n,cancelable:!0,...r})),i.dispatchEvent(t),t}(this,e,t,n)}dispatchEvent(e){let t=this.getEventHolder().events;if(!t)return!0;let n=t[e.type];for(let t in n)for(let r in n[t])n[t][r](e);return!e.defaultPrevented}fire(e,t,n){return this.dispatch(e,t,n),this}getEventHolder(){return this}getEventTarget(){return this}off(e,t,n){return Qe(this,e,t,n),this}on(e,t,n,r){return Ze(this,e,t,n,r),this}removeEventListener(){}};function et(){}H($e,`EventTarget`);var tt=400,nt=`>`,rt=0,it={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":`miter`,"stroke-linecap":`butt`,fill:`#000000`,stroke:`#000000`,opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":`#000000`,"text-anchor":`start`},at=class extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return typeof e==`number`||(this.length=0,this.push(...this.parse(e))),this}parse(e=[]){return e instanceof Array?e:e.trim().split(Pe).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(` `)}valueOf(){let e=[];return e.push(...this),e}},J=class e{constructor(...e){this.init(...e)}convert(t){return new e(this.value,t)}divide(t){return t=new e(t),new e(this/t,this.unit||t.unit)}init(t,n){return n=Array.isArray(t)?t[1]:n,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=n||``,typeof t==`number`?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:typeof t==`string`?(n=t.match(Ce))&&(this.value=parseFloat(n[1]),n[5]===`%`?this.value/=100:n[5]===`s`&&(this.value*=1e3),this.unit=n[5]):t instanceof e&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new e(t),new e(this-t,this.unit||t.unit)}plus(t){return t=new e(t),new e(this+t,this.unit||t.unit)}times(t){return t=new e(t),new e(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit===`%`?~~(1e8*this.value)/1e6:this.unit===`s`?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}},ot=new Set([`fill`,`stroke`,`color`,`bgcolor`,`stop-color`,`flood-color`,`lighting-color`]),st=[],ct=class e extends $e{constructor(e,t){super(),this.node=e,this.type=e.nodeName,t&&e!==t&&this.attr(t)}add(e,t){return(e=_e(e)).removeNamespace&&this.node instanceof B.window.SVGElement&&e.removeNamespace(),t==null?this.node.appendChild(e.node):e.node!==this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this}addTo(e,t){return _e(e).put(this,t)}children(){return new We(te(this.node.children,(function(e){return ve(e)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,t=!0){this.writeDataToDom();let n=this.node.cloneNode(e);return t&&(n=Se(n)),new this.constructor(n)}each(e,t){let n=this.children(),r,i;for(r=0,i=n.length;r<i;r++)e.apply(n[r],[r,n]),t&&n[r].each(e,t);return this}element(t,n){return this.put(new e(ge(t),n))}first(){return ve(this.node.firstChild)}get(e){return ve(this.node.childNodes[e])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(e){return this.index(e)>=0}html(e,t){return this.xml(e,t,`http://www.w3.org/1999/xhtml`)}id(e){return e!==void 0||this.node.id||(this.node.id=xe(this.type)),this.attr(`id`,e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return ve(this.node.lastChild)}matches(e){let t=this.node,n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return n&&n.call(t,e)}parent(e){let t=this;if(!t.node.parentNode)return null;if(t=ve(t.node.parentNode),!e)return t;do if(typeof e==`string`?t.matches(e):t instanceof e)return t;while(t=ve(t.node.parentNode));return t}put(e,t){return e=_e(e),this.add(e,t),e}putIn(e,t){return _e(e).add(this,t)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=_e(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,t=null){let n=10**e,r=this.attr(t);for(let e in r)typeof r[e]==`number`&&(r[e]=Math.round(r[e]*n)/n);return this.attr(r),this}svg(e,t){return this.xml(e,t,le)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){let t=this.parent();if(!t)return this.addTo(e);let n=t.index(this);return t.put(e,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(e,t,n){if(typeof e==`boolean`&&(n=t,t=e,e=null),e==null||typeof e==`function`){t=t==null||t,this.writeDataToDom();let n=this;if(e!=null){if(n=ve(n.node.cloneNode(!0)),t){let t=e(n);if(n=t||n,!1===t)return``}n.each((function(){let t=e(this),n=t||this;!1===t?this.remove():t&&this!==n&&this.replace(n)}),!0)}return t?n.node.outerHTML:n.node.innerHTML}t=t!=null&&t;let r=ge(`wrapper`,n),i=B.document.createDocumentFragment();r.innerHTML=e;for(let e=r.children.length;e--;)i.appendChild(r.firstElementChild);let a=this.parent();return t?this.replace(i)&&a:this.add(i)}};U(ct,{attr:function(e,t,n){if(e==null){e={},t=this.node.attributes;for(let n of t)e[n.nodeName]=Me.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return e}if(e instanceof Array)return e.reduce(((e,t)=>(e[t]=this.attr(t),e)),{});if(typeof e==`object`&&e.constructor===Object)for(t in e)this.attr(t,e[t]);else if(t===null)this.node.removeAttribute(e);else{if(t==null)return(t=this.node.getAttribute(e))==null?it[e]:Me.test(t)?parseFloat(t):t;typeof(t=st.reduce(((t,n)=>n(e,t,this)),t))==`number`?t=new J(t):ot.has(e)&&ze.isColor(t)?t=new ze(t):t.constructor===Array&&(t=new at(t)),e===`leading`?this.leading&&this.leading(t):typeof n==`string`?this.node.setAttributeNS(n,e,t.toString()):this.node.setAttribute(e,t.toString()),!this.rebuild||e!==`font-size`&&e!==`x`||this.rebuild()}return this},find:function(e){return Ke(e,this.node)},findOne:function(e){return ve(this.node.querySelector(e))}}),H(ct,`Dom`);var lt=class extends ct{constructor(e,t){super(e,t),this.dom={},this.node.instance=this,(e.hasAttribute(`data-svgjs`)||e.hasAttribute(`svgjs:data`))&&this.setData(JSON.parse(e.getAttribute(`data-svgjs`))??JSON.parse(e.getAttribute(`svgjs:data`))??{})}center(e,t){return this.cx(e).cy(t)}cx(e){return e==null?this.x()+this.width()/2:this.x(e-this.width()/2)}cy(e){return e==null?this.y()+this.height()/2:this.y(e-this.height()/2)}defs(){let e=this.root();return e&&e.defs()}dmove(e,t){return this.dx(e).dy(t)}dx(e=0){return this.x(new J(e).plus(this.x()))}dy(e=0){return this.y(new J(e).plus(this.y()))}getEventHolder(){return this}height(e){return this.attr(`height`,e)}move(e,t){return this.x(e).y(t)}parents(e=this.root()){let t=typeof e==`string`;t||(e=_e(e));let n=new We,r=this;for(;(r=r.parent())&&r.node!==B.document&&r.nodeName!==`#document-fragment`&&(n.push(r),t||r.node!==e.node)&&(!t||!r.matches(e));)if(r.node===this.root().node)return null;return n}reference(e){if(!(e=this.attr(e)))return null;let t=(e+``).match(Ee);return t?_e(t[1]):null}root(){let e=this.parent(function(e){return me[e]}(he));return e&&e.root()}setData(e){return this.dom=e,this}size(e,t){let n=ie(this,e,t);return this.width(new J(n.width)).height(new J(n.height))}width(e){return this.attr(`width`,e)}writeDataToDom(){return ce(this,this.dom),super.writeDataToDom()}x(e){return this.attr(`x`,e)}y(e){return this.attr(`y`,e)}};U(lt,{bbox:function(){return new q(Ue(this,(e=>e.getBBox()),(e=>{try{let t=e.clone().addTo(Ve().svg).show(),n=t.node.getBBox();return t.remove(),n}catch(t){throw Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${t.toString()}`)}})))},rbox:function(e){let t=new q(Ue(this,(e=>e.getBoundingClientRect()),(e=>{throw Error(`Getting rbox of element "${e.node.nodeName}" is not possible`)})));return e?t.transform(e.screenCTM().inverseO()):t.addOffset()},inside:function(e,t){let n=this.bbox();return e>n.x&&t>n.y&&e<n.x+n.width&&t<n.y+n.height},point:function(e,t){return new G(e,t).transformO(this.screenCTM().inverseO())},ctm:function(){return new K(this.node.getCTM())},screenCTM:function(){try{if(typeof this.isRoot==`function`&&!this.isRoot()){let e=this.rect(1,1),t=e.node.getScreenCTM();return e.remove(),new K(t)}return new K(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new K}}}),H(lt,`Element`);var ut={stroke:[`color`,`width`,`opacity`,`linecap`,`linejoin`,`miterlimit`,`dasharray`,`dashoffset`],fill:[`color`,`opacity`,`rule`],prefix:function(e,t){return t===`color`?e:e+`-`+t}};[`fill`,`stroke`].forEach((function(e){let t={},n;t[e]=function(t){if(t===void 0)return this.attr(e);if(typeof t==`string`||t instanceof ze||ze.isRgb(t)||t instanceof lt)this.attr(e,t);else for(n=ut[e].length-1;n>=0;n--)t[ut[e][n]]!=null&&this.attr(ut.prefix(e,ut[e][n]),t[ut[e][n]]);return this},R([`Element`,`Runner`],t)})),R([`Element`,`Runner`],{matrix:function(e,t,n,r,i,a){return e==null?new K(this):this.attr(`transform`,new K(e,t,n,r,i,a))},rotate:function(e,t,n){return this.transform({rotate:e,ox:t,oy:n},!0)},skew:function(e,t,n,r){return arguments.length===1||arguments.length===3?this.transform({skew:e,ox:t,oy:n},!0):this.transform({skew:[e,t],ox:n,oy:r},!0)},shear:function(e,t,n){return this.transform({shear:e,ox:t,oy:n},!0)},scale:function(e,t,n,r){return arguments.length===1||arguments.length===3?this.transform({scale:e,ox:t,oy:n},!0):this.transform({scale:[e,t],ox:n,oy:r},!0)},translate:function(e,t){return this.transform({translate:[e,t]},!0)},relative:function(e,t){return this.transform({relative:[e,t]},!0)},flip:function(e=`both`,t=`center`){return`xybothtrue`.indexOf(e)===-1&&(t=e,e=`both`),this.transform({flip:e,origin:t},!0)},opacity:function(e){return this.attr(`opacity`,e)}}),R(`radius`,{radius:function(e,t=e){return(this._element||this).type===`radialGradient`?this.attr(`r`,new J(e)):this.rx(e).ry(t)}}),R(`Path`,{length:function(){return this.node.getTotalLength()},pointAt:function(e){return new G(this.node.getPointAtLength(e))}}),R([`Element`,`Runner`],{font:function(e,t){if(typeof e==`object`){for(t in e)this.font(t,e[t]);return this}return e===`leading`?this.leading(t):e===`anchor`?this.attr(`text-anchor`,t):e===`size`||e===`family`||e===`weight`||e===`stretch`||e===`variant`||e===`style`?this.attr(`font-`+e,t):this.attr(e,t)}}),R(`Element`,[`click`,`dblclick`,`mousedown`,`mouseup`,`mouseover`,`mouseout`,`mousemove`,`mouseenter`,`mouseleave`,`touchstart`,`touchmove`,`touchleave`,`touchend`,`touchcancel`,`contextmenu`,`wheel`,`pointerdown`,`pointermove`,`pointerup`,`pointerleave`,`pointercancel`].reduce((function(e,t){return e[t]=function(e){return e===null?this.off(t):this.on(t,e),this},e}),{})),R(`Element`,{untransform:function(){return this.attr(`transform`,null)},matrixify:function(){return(this.attr(`transform`)||``).split(De).slice(0,-1).map((function(e){let t=e.trim().split(`(`);return[t[0],t[1].split(Pe).map((function(e){return parseFloat(e)}))]})).reverse().reduce((function(e,t){return t[0]===`matrix`?e.lmultiply(K.fromArray(t[1])):e[t[0]].apply(e,t[1])}),new K)},toParent:function(e,t){if(this===e)return this;if(se(this.node))return this.addTo(e,t);let n=this.screenCTM(),r=e.screenCTM().inverse();return this.addTo(e,t).untransform().transform(r.multiply(n)),this},toRoot:function(e){return this.toParent(this.root(),e)},transform:function(e,t){if(e==null||typeof e==`string`){let t=new K(this).decompose();return e==null?t:t[e]}K.isMatrixLike(e)||(e={...e,origin:ae(e,this)});let n=new K(!0===t?this:t||!1).transform(e);return this.attr(`transform`,n)}});var dt=class e extends lt{flatten(){return this.each((function(){if(this instanceof e)return this.flatten().ungroup()})),this}ungroup(e=this.parent(),t=e.index(this)){return t=t===-1?e.children().length:t,this.each((function(n,r){return r[r.length-n-1].toParent(e,t)})),this.remove()}};H(dt,`Container`);var ft=class extends dt{constructor(e,t=e){super(V(`defs`,e),t)}flatten(){return this}ungroup(){return this}};H(ft,`Defs`);var pt=class extends lt{};function mt(e){return this.attr(`rx`,e)}function ht(e){return this.attr(`ry`,e)}function gt(e){return e==null?this.cx()-this.rx():this.cx(e+this.rx())}function _t(e){return e==null?this.cy()-this.ry():this.cy(e+this.ry())}function vt(e){return this.attr(`cx`,e)}function yt(e){return this.attr(`cy`,e)}function bt(e){return e==null?2*this.rx():this.rx(new J(e).divide(2))}function xt(e){return e==null?2*this.ry():this.ry(new J(e).divide(2))}H(pt,`Shape`);var St=Object.freeze({__proto__:null,cx:vt,cy:yt,height:xt,rx:mt,ry:ht,width:bt,x:gt,y:_t}),Ct=class extends pt{constructor(e,t=e){super(V(`ellipse`,e),t)}size(e,t){let n=ie(this,e,t);return this.rx(new J(n.width).divide(2)).ry(new J(n.height).divide(2))}};U(Ct,St),R(`Container`,{ellipse:W((function(e=0,t=e){return this.put(new Ct).size(e,t).move(0,0)}))}),H(Ct,`Ellipse`);var wt=class extends ct{constructor(e=B.document.createDocumentFragment()){super(e)}xml(e,t,n){if(typeof e==`boolean`&&(n=t,t=e,e=null),e==null||typeof e==`function`){let e=new ct(ge(`wrapper`,n));return e.add(this.node.cloneNode(!0)),e.xml(!1,n)}return super.xml(e,!1,n)}};function Tt(e,t){return(this._element||this).type===`radialGradient`?this.attr({fx:new J(e),fy:new J(t)}):this.attr({x1:new J(e),y1:new J(t)})}function Et(e,t){return(this._element||this).type===`radialGradient`?this.attr({cx:new J(e),cy:new J(t)}):this.attr({x2:new J(e),y2:new J(t)})}H(wt,`Fragment`);var Dt=Object.freeze({__proto__:null,from:Tt,to:Et}),Ot=class extends dt{constructor(e,t){super(V(e+`Gradient`,typeof e==`string`?null:e),t)}attr(e,t,n){return e===`transform`&&(e=`gradientTransform`),super.attr(e,t,n)}bbox(){return new q}targets(){return Ke(`svg [fill*=`+this.id()+`]`)}toString(){return this.url()}update(e){return this.clear(),typeof e==`function`&&e.call(this,this),this}url(){return`url(#`+this.id()+`)`}};U(Ot,Dt),R({Container:{gradient(...e){return this.defs().gradient(...e)}},Defs:{gradient:W((function(e,t){return this.put(new Ot(e)).update(t)}))}}),H(Ot,`Gradient`);var kt=class extends dt{constructor(e,t=e){super(V(`pattern`,e),t)}attr(e,t,n){return e===`transform`&&(e=`patternTransform`),super.attr(e,t,n)}bbox(){return new q}targets(){return Ke(`svg [fill*=`+this.id()+`]`)}toString(){return this.url()}update(e){return this.clear(),typeof e==`function`&&e.call(this,this),this}url(){return`url(#`+this.id()+`)`}};R({Container:{pattern(...e){return this.defs().pattern(...e)}},Defs:{pattern:W((function(e,t,n){return this.put(new kt).update(n).attr({x:0,y:0,width:e,height:t,patternUnits:`userSpaceOnUse`})}))}}),H(kt,`Pattern`);var At=class extends pt{constructor(e,t=e){super(V(`image`,e),t)}load(e,t){if(!e)return this;let n=new B.window.Image;return Ze(n,`load`,(function(e){let r=this.parent(kt);this.width()===0&&this.height()===0&&this.size(n.width,n.height),r instanceof kt&&r.width()===0&&r.height()===0&&r.size(this.width(),this.height()),typeof t==`function`&&t.call(this,e)}),this),Ze(n,`load error`,(function(){Qe(n)})),this.attr(`href`,n.src=e,de)}};st.push(function(e,t,n){return e!==`fill`&&e!==`stroke`||Ne.test(t)&&(t=n.root().defs().image(t)),t instanceof At&&(t=n.root().defs().pattern(0,0,(e=>{e.add(t)}))),t}),R({Container:{image:W((function(e,t){return this.put(new At).size(0,0).load(e,t)}))}}),H(At,`Image`);var jt=class extends at{bbox(){let e=-1/0,t=-1/0,n=1/0,r=1/0;return this.forEach((function(i){e=Math.max(i[0],e),t=Math.max(i[1],t),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new q(n,r,e-n,t-r)}move(e,t){let n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+e,this[n][1]+t];return this}parse(e=[0,0]){let t=[];(e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(Pe).map(parseFloat)).length%2!=0&&e.pop();for(let n=0,r=e.length;n<r;n+=2)t.push([e[n],e[n+1]]);return t}size(e,t){let n,r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*e/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*t/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){let e=[];for(let t=0,n=this.length;t<n;t++)e.push(this[t].join(`,`));return e.join(` `)}transform(e){return this.clone().transformO(e)}transformO(e){K.isMatrixLike(e)||(e=new K(e));for(let t=this.length;t--;){let[n,r]=this[t];this[t][0]=e.a*n+e.c*r+e.e,this[t][1]=e.b*n+e.d*r+e.f}return this}},Mt=Object.freeze({__proto__:null,MorphArray:jt,height:function(e){let t=this.bbox();return e==null?t.height:this.size(t.width,e)},width:function(e){let t=this.bbox();return e==null?t.width:this.size(e,t.height)},x:function(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)},y:function(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}}),Nt=class extends pt{constructor(e,t=e){super(V(`line`,e),t)}array(){return new jt([[this.attr(`x1`),this.attr(`y1`)],[this.attr(`x2`),this.attr(`y2`)]])}move(e,t){return this.attr(this.array().move(e,t).toLine())}plot(e,t,n,r){return e==null?this.array():(e=t===void 0?new jt(e).toLine():{x1:e,y1:t,x2:n,y2:r},this.attr(e))}size(e,t){let n=ie(this,e,t);return this.attr(this.array().size(n.width,n.height).toLine())}};U(Nt,Mt),R({Container:{line:W((function(...e){return Nt.prototype.plot.apply(this.put(new Nt),e[0]==null?[0,0,0,0]:e)}))}}),H(Nt,`Line`);var Pt=class extends dt{constructor(e,t=e){super(V(`marker`,e),t)}height(e){return this.attr(`markerHeight`,e)}orient(e){return this.attr(`orient`,e)}ref(e,t){return this.attr(`refX`,e).attr(`refY`,t)}toString(){return`url(#`+this.id()+`)`}update(e){return this.clear(),typeof e==`function`&&e.call(this,this),this}width(e){return this.attr(`markerWidth`,e)}};function Ft(e,t){return function(n){return n==null?this[e]:(this[e]=n,t&&t.call(this),this)}}R({Container:{marker(...e){return this.defs().marker(...e)}},Defs:{marker:W((function(e,t,n){return this.put(new Pt).size(e,t).ref(e/2,t/2).viewbox(0,0,e,t).attr(`orient`,`auto`).update(n)}))},marker:{marker(e,t,n,r){let i=[`marker`];return e!==`all`&&i.push(e),i=i.join(`-`),e=arguments[1]instanceof Pt?arguments[1]:this.defs().marker(t,n,r),this.attr(i,e)}}}),H(Pt,`Marker`);var It={"-":function(e){return e},"<>":function(e){return-Math.cos(e*Math.PI)/2+.5},">":function(e){return Math.sin(e*Math.PI/2)},"<":function(e){return 1-Math.cos(e*Math.PI/2)},bezier:function(e,t,n,r){return function(i){return i<0?e>0?t/e*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):e<1?(1-t)/(1-e)*i+(t-e)/(1-e):1:3*i*(1-i)**2*t+3*i**2*(1-i)*r+i**3}},steps:function(e,t=`end`){t=t.split(`-`).reverse()[0];let n=e;return t===`none`?--n:t===`both`&&++n,(r,i=!1)=>{let a=Math.floor(r*e),o=r*a%1==0;return t!==`start`&&t!==`both`||++a,i&&o&&--a,r>=0&&a<0&&(a=0),r<=1&&a>n&&(a=n),a/n}}},Lt=class{done(){return!1}},Rt=class extends Lt{constructor(e=nt){super(),this.ease=It[e]||e}step(e,t,n){return typeof e==`number`?e+(t-e)*this.ease(n):n<1?e:t}},zt=class extends Lt{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,t,n,r){return this.stepper(e,t,n,r)}};function Bt(){let e=(this._duration||500)/1e3,t=this._overshoot||0,n=Math.PI,r=Math.log(t/100+1e-10),i=-r/Math.sqrt(n*n+r*r),a=3.9/(i*e);this.d=2*i*a,this.k=a*a}U(class extends zt{constructor(e=500,t=0){super(),this.duration(e).overshoot(t)}step(e,t,n,r){if(typeof e==`string`)return e;if(r.done=n===1/0,n===1/0)return t;if(n===0)return e;n>100&&(n=16),n/=1e3;let i=r.velocity||0,a=-this.d*i-this.k*(e-t),o=e+i*n+a*n*n/2;return r.velocity=i+a*n,r.done=Math.abs(t-o)+Math.abs(i)<.002,r.done?t:o}},{duration:Ft(`_duration`,Bt),overshoot:Ft(`_overshoot`,Bt)}),U(class extends zt{constructor(e=.1,t=.01,n=0,r=1e3){super(),this.p(e).i(t).d(n).windup(r)}step(e,t,n,r){if(typeof e==`string`)return e;if(r.done=n===1/0,n===1/0)return t;if(n===0)return e;let i=t-e,a=(r.integral||0)+i*n,o=(i-(r.error||0))/n,s=this._windup;return!1!==s&&(a=Math.max(-s,Math.min(a,s))),r.error=i,r.integral=a,r.done=Math.abs(i)<.001,r.done?t:e+(this.P*i+this.I*a+this.D*o)}},{windup:Ft(`_windup`),p:Ft(`P`),i:Ft(`I`),d:Ft(`D`)});var Vt={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ht={M:function(e,t,n){return t.x=n.x=e[0],t.y=n.y=e[1],[`M`,t.x,t.y]},L:function(e,t){return t.x=e[0],t.y=e[1],[`L`,e[0],e[1]]},H:function(e,t){return t.x=e[0],[`H`,e[0]]},V:function(e,t){return t.y=e[0],[`V`,e[0]]},C:function(e,t){return t.x=e[4],t.y=e[5],[`C`,e[0],e[1],e[2],e[3],e[4],e[5]]},S:function(e,t){return t.x=e[2],t.y=e[3],[`S`,e[0],e[1],e[2],e[3]]},Q:function(e,t){return t.x=e[2],t.y=e[3],[`Q`,e[0],e[1],e[2],e[3]]},T:function(e,t){return t.x=e[0],t.y=e[1],[`T`,e[0],e[1]]},Z:function(e,t,n){return t.x=n.x,t.y=n.y,[`Z`]},A:function(e,t){return t.x=e[5],t.y=e[6],[`A`,e[0],e[1],e[2],e[3],e[4],e[5],e[6]]}},Ut=`mlhvqtcsaz`.split(``);for(let e=0,t=Ut.length;e<t;++e)Ht[Ut[e]]=function(e){return function(t,n,r){if(e===`H`)t[0]+=n.x;else if(e===`V`)t[0]+=n.y;else if(e===`A`)t[5]+=n.x,t[6]+=n.y;else for(let e=0,r=t.length;e<r;++e)t[e]=t[e]+(e%2?n.y:n.x);return Ht[e](t,n,r)}}(Ut[e].toUpperCase());function Wt(e){return e.segment.length&&e.segment.length-1===Vt[e.segment[0].toUpperCase()]}function Gt(e,t){e.inNumber&&Kt(e,!1);let n=Fe.test(t);if(n)e.segment=[t];else{let t=e.lastCommand,n=t.toLowerCase();e.segment=[n===`m`?t===n?`l`:`L`:t]}return e.inSegment=!0,e.lastCommand=e.segment[0],n}function Kt(e,t){if(!e.inNumber)throw Error(`Parser Error`);e.number&&e.segment.push(parseFloat(e.number)),e.inNumber=t,e.number=``,e.pointSeen=!1,e.hasExponent=!1,Wt(e)&&qt(e)}function qt(e){e.inSegment=!1,e.absolute&&(e.segment=function(e){return Ht[e.segment[0]](e.segment.slice(1),e.p,e.p0)}(e)),e.segments.push(e.segment)}function Jt(e){if(!e.segment.length)return!1;let t=e.segment[0].toUpperCase()===`A`,n=e.segment.length;return t&&(n===4||n===5)}function Yt(e){return e.lastToken.toUpperCase()===`E`}var Xt=new Set([` `,`,`,` `,`
|
|
@@ -907,4 +907,4 @@ rect.legend-mouseover-inactive,
|
|
|
907
907
|
.apexcharts-disable-transitions * {
|
|
908
908
|
transition: none !important;
|
|
909
909
|
}`;var c=e.opts.chart?.nonce||e.w.config.chart.nonce;c&&s.setAttribute(`nonce`,c),a?i.prepend(s):o.head.appendChild(s)}var l=e.create(e.w.config.series,{});if(!l)return t(e);e.mount(l).then((function(){typeof e.w.config.chart.events.mounted==`function`&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent(`mounted`,[e,e.w]),t(l)})).catch((function(e){n(e)}))}else n(Error(`Element not found`))}))}},{key:`create`,value:function(e,t){var n=this,r=this.w;new Si(this).initModules();var i=this.w.globals;if(i.noData=!1,i.animationEnded=!1,!P.elementExists(this.el)||((this.responsive.checkResponsiveConfig(t),r.config.xaxis.convertedCatToNumeric)&&new er(r.config).convertCatToNumericXaxis(r.config,this.ctx),this.core.setupElements(),r.config.chart.type===`treemap`&&(r.config.grid.show=!1,r.config.yaxis[0].show=!1),i.svgWidth===0))return i.animationEnded=!0,null;var a=e;e.forEach((function(e,t){e.hidden&&(a=n.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:t}))}));var o=Q.checkComboSeries(a,r.config.chart.type);i.comboCharts=o.comboCharts,i.comboBarCount=o.comboBarCount;var s=a.every((function(e){return e.data&&e.data.length===0}));(a.length===0||s&&i.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(a),this.theme.init(),new ar(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),i.noData&&i.collapsedSeries.length!==i.series.length&&!r.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),i.axisCharts&&(this.core.coreCalculations(),r.config.xaxis.type!==`category`&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=r.globals.minX,this.ctx.toolbar.maxX=r.globals.maxX),this.formatters.heatmapLabelFormatters(),new Q(this).getLargestMarkerSize(),this.dimensions.plotCoords();var c=this.core.xySettings();this.grid.createGridMask();var l=this.core.plotChartType(a,c),u=new sr(this);return u.bringForward(),r.config.dataLabels.background.enabled&&u.dataLabelsBackground(),this.core.shiftGraphPosition(),r.globals.dataPoints>50&&r.globals.dom.elWrap.classList.add(`apexcharts-disable-transitions`),{elGraph:l,xyRatios:c,dimensions:{plot:{left:r.globals.translateX,top:r.globals.translateY,width:r.globals.gridWidth,height:r.globals.gridHeight}}}}},{key:`mount`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this,r=n.w;return new Promise((function(i,a){if(n.el===null)return a(Error(`Not enough data to display or target element not found`));(t===null||r.globals.allSeriesCollapsed)&&n.series.handleNoData(),n.grid=new fr(n);var o,s,c=n.grid.drawGrid();if((n.annotations=new Zn(n),n.annotations.drawImageAnnos(),n.annotations.drawTextAnnos(),r.config.grid.position===`back`)&&(c&&r.globals.dom.elGraphical.add(c.el),c!=null&&(o=c.elGridBorders)!=null&&o.node&&r.globals.dom.elGraphical.add(c.elGridBorders)),Array.isArray(t.elGraph))for(var l=0;l<t.elGraph.length;l++)r.globals.dom.elGraphical.add(t.elGraph[l]);else r.globals.dom.elGraphical.add(t.elGraph);r.config.grid.position===`front`&&(c&&r.globals.dom.elGraphical.add(c.el),c!=null&&(s=c.elGridBorders)!=null&&s.node&&r.globals.dom.elGraphical.add(c.elGridBorders)),r.config.xaxis.crosshairs.position===`front`&&n.crosshairs.drawXCrosshairs(),r.config.yaxis[0].crosshairs.position===`front`&&n.crosshairs.drawYCrosshairs(),r.config.chart.type!==`treemap`&&n.axes.drawAxis(r.config.chart.type,c);var u=new dr(e.ctx,c),d=new hr(e.ctx,c);if(c!==null&&(u.xAxisLabelCorrections(c.xAxisTickWidth),d.setYAxisTextAlignments(),r.config.yaxis.map((function(e,t){r.globals.ignoreYAxisIndexes.indexOf(t)===-1&&d.yAxisTitleRotate(t,e.opposite)}))),n.annotations.drawAxesAnnotations(),!r.globals.noData){if(r.config.tooltip.enabled&&!r.globals.noData&&n.w.globals.tooltip.drawTooltip(t.xyRatios),r.globals.axisCharts&&(r.globals.isXNumeric||r.config.xaxis.convertedCatToNumeric||r.globals.isRangeBar))(r.config.chart.zoom.enabled||r.config.chart.selection&&r.config.chart.selection.enabled||r.config.chart.pan&&r.config.chart.pan.enabled)&&n.zoomPanSelection.init({xyRatios:t.xyRatios});else{var f=r.config.chart.toolbar.tools;[`zoom`,`zoomin`,`zoomout`,`selection`,`pan`,`reset`].forEach((function(e){f[e]=!1}))}r.config.chart.toolbar.show&&!r.globals.allSeriesCollapsed&&n.toolbar.createToolbar()}r.globals.memory.methodsToExec.length>0&&r.globals.memory.methodsToExec.forEach((function(e){e.method(e.params,!1,e.context)})),r.globals.axisCharts||r.globals.noData||n.core.resizeNonAxisCharts(),i(n)}))}},{key:`destroy`,value:function(){window.removeEventListener(`resize`,this.windowResizeHandler),function(e,t){var n=wi.get(t);n&&(n.disconnect(),wi.delete(t))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach((function(t,n){t.id===P.escapeString(e)&&Apex._chartInstances.splice(n,1)})),new Ci(this.ctx).clear({isUpdating:!1})}},{key:`updateOptions`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],i=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],a=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],o=this.w;return o.globals.selection=void 0,this.lastUpdateOptions&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(e)?this:(this.lastUpdateOptions=P.clone(e),e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((function(e,n){return t.updateHelpers._extendSeries(e,n)}))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,n,r,i,a))}},{key:`updateSeries`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,n)}},{key:`appendSeries`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],r=this.w.config.series.slice();return r.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(r,t,n)}},{key:`appendData`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this;n.w.globals.dataChanged=!0,n.series.getPreviousPaths();for(var r=n.w.config.series.slice(),i=0;i<r.length;i++)if(e[i]!==null&&e[i]!==void 0)for(var a=0;a<e[i].data.length;a++)r[i].data.push(e[i].data[a]);return n.w.config.series=r,t&&(n.w.globals.initialSeries=P.clone(n.w.config.series)),this.update()}},{key:`update`,value:function(e){var t=this;return new Promise((function(n,r){if(t.lastUpdateOptions&&JSON.stringify(t.lastUpdateOptions)===JSON.stringify(e))return n(t);t.lastUpdateOptions=P.clone(e),new Ci(t.ctx).clear({isUpdating:!0});var i=t.create(t.w.config.series,e);if(!i)return n(t);t.mount(i).then((function(){typeof t.w.config.chart.events.updated==`function`&&t.w.config.chart.events.updated(t,t.w),t.events.fireEvent(`updated`,[t,t.w]),t.w.globals.isDirty=!0,n(t)})).catch((function(e){r(e)}))}))}},{key:`getSyncedCharts`,value:function(){var e=this.getGroupedCharts(),t=[this];return e.length&&(t=[],e.forEach((function(e){t.push(e)}))),t}},{key:`getGroupedCharts`,value:function(){var e=this;return Apex._chartInstances.filter((function(e){if(e.group)return!0})).map((function(t){return e.w.config.chart.group===t.group?t.chart:e}))}},{key:`toggleSeries`,value:function(e){return this.series.toggleSeries(e)}},{key:`highlightSeriesOnLegendHover`,value:function(e,t){return this.series.toggleSeriesOnHover(e,t)}},{key:`showSeries`,value:function(e){this.series.showSeries(e)}},{key:`hideSeries`,value:function(e){this.series.hideSeries(e)}},{key:`highlightSeries`,value:function(e){this.series.highlightSeries(e)}},{key:`isSeriesHidden`,value:function(e){this.series.isSeriesHidden(e)}},{key:`resetSeries`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(e,t)}},{key:`addEventListener`,value:function(e,t){this.events.addEventListener(e,t)}},{key:`removeEventListener`,value:function(e,t){this.events.removeEventListener(e,t)}},{key:`addXaxisAnnotation`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=this;n&&(r=n),r.annotations.addXaxisAnnotationExternal(e,t,r)}},{key:`addYaxisAnnotation`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=this;n&&(r=n),r.annotations.addYaxisAnnotationExternal(e,t,r)}},{key:`addPointAnnotation`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=this;n&&(r=n),r.annotations.addPointAnnotationExternal(e,t,r)}},{key:`clearAnnotations`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:`removeAnnotation`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=this;t&&(n=t),n.annotations.removeAnnotation(n,e)}},{key:`getChartArea`,value:function(){return this.w.globals.dom.baseEl.querySelector(`.apexcharts-inner`)}},{key:`getSeriesTotalXRange`,value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:`getHighestValueInSeries`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new mr(this.ctx).getMinYMaxY(e).highestY}},{key:`getLowestValueInSeries`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new mr(this.ctx).getMinYMaxY(e).lowestY}},{key:`getSeriesTotal`,value:function(){return this.w.globals.seriesTotals}},{key:`toggleDataPointSelection`,value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:`zoomX`,value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:`setLocale`,value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:`dataURI`,value:function(e){return new ur(this.ctx).dataURI(e)}},{key:`getSvgString`,value:function(e){return new ur(this.ctx).getSvgString(e)}},{key:`exportToCSV`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new ur(this.ctx).exportToCSV(e)}},{key:`paper`,value:function(){return this.w.globals.dom.Paper}},{key:`_parentResizeCallback`,value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:`_windowResize`,value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()}),150)}},{key:`_windowResizeHandler`,value:function(){var e=this.w.config.chart.redrawOnWindowResize;typeof e==`function`&&(e=e()),e&&this._windowResize()}}],[{key:`getChartByID`,value:function(e){var t=P.escapeString(e);if(Apex._chartInstances){var n=Apex._chartInstances.filter((function(e){return e.id===t}))[0];return n&&n.chart}}},{key:`initOnLoad`,value:function(){for(var t=document.querySelectorAll(`[data-apexcharts]`),n=0;n<t.length;n++)new e(t[n],JSON.parse(t[n].getAttribute(`data-options`))).render()}},{key:`exec`,value:function(e,t){var n=this.getChartByID(e);if(n){n.w.globals.isExecCalled=!0;var r=null;if(n.publicMethods.indexOf(t)!==-1){var i=[...arguments].slice(2);r=n[t].apply(n,i)}return r}}},{key:`merge`,value:function(e,t){return P.extend(e,t)}}]),e}(),$=r(),Ei=[{id:`1h`,label:`1h`,ms:36e5},{id:`6h`,label:`6h`,ms:216e5},{id:`24h`,label:`24h`,ms:864e5},{id:`7d`,label:`7d`,ms:6048e5},{id:`14d`,label:`14d`,ms:12096e5},{id:`30d`,label:`30d`,ms:2592e6}];function Di(e){return Ei.find(t=>t.id===e)?.ms??864e5}var Oi=[`Chat`,`Replies`,`Channel`,`Pair`,`Work items`],ki={Chat:`#3b82f6`,Replies:`#06b6d4`,Channel:`#8b5cf6`,Pair:`#f59e0b`,"Work items":`#10b981`},Ai=[`tool`,`reasoning`,`narration`,`response`],ji={tool:`Tool calls`,reasoning:`Reasoning`,narration:`Narration`,response:`Responses`},Mi={tool:`#3b82f6`,reasoning:`#a855f7`,narration:`#f59e0b`,response:`#10b981`};function Ni(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}k`:String(e)}function Pi(e){if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;if(t<10)return`${t.toFixed(1)}s`;if(t<60)return`${Math.round(t)}s`;let n=Math.floor(t/60),r=Math.round(t%60);return r?`${n}m ${r}s`:`${n}m`}function Fi(e,t){let n=Di(t)<=864e5;return e.map(e=>{let t=new Date(e.start);return n?t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`}):t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})})}function Ii({label:e,value:t,sub:n,icon:r,className:i}){return(0,$.jsx)(f,{children:(0,$.jsx)(d,{className:`pt-4`,children:(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,$.jsx)(`div`,{className:`p-2 rounded-lg ${i}`,children:(0,$.jsx)(r,{className:`w-4 h-4`})}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`p`,{className:`text-2xl font-semibold tabular-nums leading-tight`,children:t}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:e}),n&&(0,$.jsx)(`p`,{className:`text-[11px] text-muted-foreground/70 truncate`,children:n})]})]})})})}function Li({label:e,value:t,accent:n}){return(0,$.jsxs)(`div`,{className:`rounded-lg border border-border/60 bg-muted/30 p-3`,children:[(0,$.jsx)(`p`,{className:`text-xl font-semibold tabular-nums ${n??``}`,children:t}),(0,$.jsx)(`p`,{className:`text-[11px] text-muted-foreground mt-0.5`,children:e})]})}function Ri(){let e=s(e=>e.analyticsPeriod),t=s(e=>e.setAnalyticsPeriod);return(0,$.jsx)(`div`,{className:`flex items-center gap-1 bg-muted rounded-lg p-1`,children:Ei.map(n=>(0,$.jsx)(`button`,{onClick:()=>t(n.id),className:`px-3 py-1 rounded-md text-xs font-medium transition-colors ${e===n.id?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`}`,children:n.label},n.id))})}function zi({height:e,children:t}){return(0,$.jsx)(`div`,{className:`flex items-center justify-center text-muted-foreground text-sm`,style:{height:e},children:t})}function Bi(e,t,n,r){let i=(0,p.useRef)(null);(0,p.useEffect)(()=>{let n=document.getElementById(e);if(!n)return;if(!r){i.current?.destroy(),i.current=null;return}let a=t();if(i.current)i.current.updateOptions(a,!1,!1);else{a.chart={...a.chart,animations:{enabled:!0,dynamicAnimation:{enabled:!0,speed:300}}};let e=new Ti(n,a);e.render(),i.current=e}},n),(0,p.useEffect)(()=>()=>{i.current?.destroy(),i.current=null},[])}function Vi(){let e=s(e=>e.analyticsData),r=s(e=>e.analyticsPeriod),a=s(e=>e.theme),m=c.find(e=>e.id===a)?.dark??!0,h=m?{text:`rgba(255,255,255,0.45)`,grid:`rgba(255,255,255,0.06)`,legend:`rgba(255,255,255,0.65)`}:{text:`rgba(0,0,0,0.45)`,grid:`rgba(0,0,0,0.08)`,legend:`rgba(0,0,0,0.65)`},g={chart:{background:`transparent`,toolbar:{show:!1},fontFamily:`inherit`},theme:{mode:m?`dark`:`light`},grid:{borderColor:h.grid,strokeDashArray:3},tooltip:{theme:m?`dark`:`light`},dataLabels:{enabled:!1}},_=(0,p.useMemo)(()=>Fi(e?.work.buckets??[],r),[e,r]),v=(0,p.useMemo)(()=>Ai.flatMap(t=>{let n=(e?.work.buckets??[]).map(e=>e.counts[t]??0);return n.some(e=>e>0)?[{name:ji[t],data:n,color:Mi[t]}]:[]}),[e]),y=(0,p.useMemo)(()=>Oi.flatMap(t=>{let n=(e?.conversation.buckets??[]).map(e=>e.counts[t]??0);return n.some(e=>e>0)?[{name:t,data:n,color:ki[t]}]:[]}),[e]),b=(0,p.useMemo)(()=>{let t=e?.work.totals,n=t?Ai.filter(e=>(t[e]??0)>0):[];return{labels:n.map(e=>ji[e]),values:n.map(e=>t[e]),colors:n.map(e=>Mi[e])}},[e]),x=(0,p.useMemo)(()=>[{name:`Prompts`,data:(e?.user.buckets??[]).map(e=>e.prompts),color:`#06b6d4`}],[e]),S=(0,p.useMemo)(()=>[{name:`Spawns`,data:(e?.fleet.buckets??[]).map(e=>e.registrations),color:`#8b5cf6`}],[e]),C=(0,p.useMemo)(()=>{let t=e?.heatmap??Array.from({length:7},()=>Array(24).fill(0));return[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`].map((e,n)=>({name:e,data:(t[n]??Array(24).fill(0)).map((e,t)=>({x:String(t).padStart(2,`0`),y:e}))}))},[e]),w={categories:_,labels:{style:{colors:h.text,fontSize:`11px`},rotate:-30,hideOverlappingLabels:!0},axisBorder:{show:!1},axisTicks:{show:!1}},T={labels:{style:{colors:h.text,fontSize:`11px`}}};Bi(`an-work`,()=>({...g,chart:{...g.chart,type:`area`,height:260,stacked:!0},series:v,colors:v.map(e=>e.color),xaxis:w,yaxis:T,fill:{type:`gradient`,gradient:{shadeIntensity:.8,opacityFrom:.65,opacityTo:.15,stops:[0,100]}},stroke:{curve:`smooth`,width:2},legend:{position:`top`,horizontalAlign:`left`,labels:{colors:h.legend},fontSize:`11px`}}),[v,_,m],v.length>0),Bi(`an-conversation`,()=>({...g,chart:{...g.chart,type:`area`,height:220,stacked:!0},series:y,colors:y.map(e=>e.color),xaxis:w,yaxis:T,fill:{type:`gradient`,gradient:{shadeIntensity:.8,opacityFrom:.6,opacityTo:.12,stops:[0,100]}},stroke:{curve:`smooth`,width:2},legend:{position:`top`,horizontalAlign:`left`,labels:{colors:h.legend},fontSize:`11px`}}),[y,_,m],y.length>0),Bi(`an-toptools`,()=>({...g,chart:{...g.chart,type:`bar`,height:260},series:[{name:`Calls`,data:(e?.work.topTools??[]).map(e=>e.count)}],colors:[`#3b82f6`],plotOptions:{bar:{horizontal:!0,borderRadius:3,barHeight:`70%`,distributed:!1}},xaxis:{categories:(e?.work.topTools??[]).map(e=>e.name),labels:{style:{colors:h.text,fontSize:`11px`}},axisBorder:{show:!1},axisTicks:{show:!1}},yaxis:{labels:{style:{colors:h.text,fontSize:`11px`},maxWidth:220}},dataLabels:{enabled:!0,style:{fontSize:`10px`,colors:[m?`#fff`:`#000`]},offsetX:24,formatter:e=>Ni(e)},tooltip:{...g.tooltip,y:{formatter:e=>`${e} calls`}}}),[e?.work.topTools,m],(e?.work.topTools.length??0)>0),Bi(`an-composition`,()=>({...g,chart:{...g.chart,type:`donut`,height:260},series:b.values,labels:b.labels,colors:b.colors,legend:{position:`bottom`,labels:{colors:h.legend},fontSize:`11px`},plotOptions:{pie:{donut:{size:`62%`}}},stroke:{width:0}}),[b,m],b.values.length>0),Bi(`an-prompts`,()=>({...g,chart:{...g.chart,type:`area`,height:120,sparkline:{enabled:!0}},series:x,colors:[`#06b6d4`],fill:{type:`gradient`,gradient:{opacityFrom:.45,opacityTo:.05}},stroke:{curve:`smooth`,width:2},tooltip:{...g.tooltip,x:{show:!1}}}),[x,m],(e?.user.prompts??0)>0),Bi(`an-spawns`,()=>({...g,chart:{...g.chart,type:`bar`,height:200},series:S,colors:[`#8b5cf6`],plotOptions:{bar:{borderRadius:3,columnWidth:`60%`}},xaxis:w,yaxis:{...T,labels:{...T.labels,formatter:e=>String(Math.round(e))}}}),[S,_,m],(e?.fleet.registrations??0)>0),Bi(`an-heatmap`,()=>({...g,chart:{...g.chart,type:`heatmap`,height:240},series:C,colors:[`#3b82f6`],xaxis:{labels:{style:{colors:h.text,fontSize:`10px`}},axisBorder:{show:!1},axisTicks:{show:!1}},yaxis:T,plotOptions:{heatmap:{radius:3,enableShades:!0,shadeIntensity:.6,colorScale:{ranges:[{from:0,to:0,color:m?`rgba(255,255,255,0.04)`:`rgba(0,0,0,0.04)`,name:`idle`}]}}}}),[C,m],(e?.conversation.total??0)+(e?.work.toolCalls??0)>0);let E=e?.user,D=e?.fleet,O=D?.leaderboard??[],k=Math.max(1,...O.map(e=>e.toolCalls+e.messages));return(0,$.jsxs)(`div`,{className:`space-y-6`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4 flex-wrap`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Analytics`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Fleet activity over the selected window — not point-in-time status`})]}),(0,$.jsx)(Ri,{})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4`,children:[(0,$.jsx)(Ii,{label:`Active agents`,sub:`sent activity this period`,value:D?.activeAgents??0,icon:n,className:`bg-emerald-500/10 text-emerald-400`}),(0,$.jsx)(Ii,{label:`Provider turns`,value:Ni(e?.work.turns??0),icon:t,className:`bg-blue-500/10 text-blue-400`}),(0,$.jsx)(Ii,{label:`Tool calls`,value:Ni(e?.work.toolCalls??0),icon:i,className:`bg-violet-500/10 text-violet-400`}),(0,$.jsx)(Ii,{label:`Human prompts`,sub:E&&E.prompts>0?`${Math.round(E.replyRate*100)}% replied`:void 0,value:Ni(E?.prompts??0),icon:o,className:`bg-cyan-500/10 text-cyan-400`})]}),(0,$.jsxs)(f,{children:[(0,$.jsx)(l,{children:(0,$.jsx)(u,{className:`text-sm`,children:`Agent work over time`})}),(0,$.jsx)(d,{children:v.length===0?(0,$.jsx)(zi,{height:260,children:`No agent activity in this period`}):(0,$.jsx)(`div`,{id:`an-work`})})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-1 xl:grid-cols-2 gap-6`,children:[(0,$.jsxs)(f,{children:[(0,$.jsx)(l,{children:(0,$.jsx)(u,{className:`text-sm`,children:`Top tools`})}),(0,$.jsx)(d,{children:(e?.work.topTools.length??0)===0?(0,$.jsx)(zi,{height:260,children:`No tool calls in this period`}):(0,$.jsx)(`div`,{id:`an-toptools`})})]}),(0,$.jsxs)(f,{children:[(0,$.jsx)(l,{children:(0,$.jsx)(u,{className:`text-sm`,children:`Turn composition`})}),(0,$.jsx)(d,{children:b.values.length===0?(0,$.jsx)(zi,{height:260,children:`No agent activity in this period`}):(0,$.jsx)(`div`,{id:`an-composition`})})]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-1 xl:grid-cols-2 gap-6`,children:[(0,$.jsxs)(f,{children:[(0,$.jsx)(l,{children:(0,$.jsx)(u,{className:`text-sm`,children:`Conversation volume`})}),(0,$.jsx)(d,{children:y.length===0?(0,$.jsx)(zi,{height:220,children:`No messages in this period`}):(0,$.jsx)(`div`,{id:`an-conversation`})})]}),(0,$.jsxs)(f,{children:[(0,$.jsx)(l,{children:(0,$.jsx)(u,{className:`text-sm`,children:`User interaction`})}),(0,$.jsxs)(d,{children:[(0,$.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,$.jsx)(Li,{label:`Prompts`,value:Ni(E?.prompts??0),accent:`text-cyan-400`}),(0,$.jsx)(Li,{label:`Reply rate`,value:E&&E.prompts>0?`${Math.round(E.replyRate*100)}%`:`—`}),(0,$.jsx)(Li,{label:`Median reply`,value:E?.latencyMs?Pi(E.latencyMs.median):`—`,accent:`text-emerald-400`}),(0,$.jsx)(Li,{label:`Avg reply`,value:E?.latencyMs?Pi(E.latencyMs.avg):`—`}),(0,$.jsx)(Li,{label:`p90 reply`,value:E?.latencyMs?Pi(E.latencyMs.p90):`—`}),(0,$.jsx)(Li,{label:`Replied`,value:Ni(E?.replied??0)})]}),(0,$.jsx)(`p`,{className:`text-[11px] text-muted-foreground mt-3 mb-1`,children:`Prompts over time`}),(E?.prompts??0)===0?(0,$.jsx)(zi,{height:120,children:`No prompts in this period`}):(0,$.jsx)(`div`,{id:`an-prompts`})]})]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-1 xl:grid-cols-2 gap-6`,children:[(0,$.jsxs)(f,{children:[(0,$.jsx)(l,{children:(0,$.jsx)(u,{className:`text-sm`,children:`Fleet activity`})}),(0,$.jsxs)(d,{children:[(0,$.jsxs)(`div`,{className:`flex gap-6 mb-3 text-sm`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{className:`text-xl font-semibold tabular-nums`,children:D?.registrations??0}),` `,(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`spawns`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{className:`text-xl font-semibold tabular-nums text-violet-400`,children:D?.spawnedByAgent??0}),` `,(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`by agents`})]})]}),(D?.registrations??0)===0?(0,$.jsx)(zi,{height:200,children:`No agents started in this period`}):(0,$.jsx)(`div`,{id:`an-spawns`})]})]}),(0,$.jsxs)(f,{children:[(0,$.jsx)(l,{children:(0,$.jsx)(u,{className:`text-sm`,children:`Busiest hours`})}),(0,$.jsx)(d,{children:(e?.conversation.total??0)+(e?.work.toolCalls??0)===0?(0,$.jsx)(zi,{height:240,children:`No data for heatmap`}):(0,$.jsx)(`div`,{id:`an-heatmap`})})]})]}),(0,$.jsxs)(f,{children:[(0,$.jsx)(l,{children:(0,$.jsx)(u,{className:`text-sm`,children:`Most active agents`})}),(0,$.jsx)(d,{children:O.length===0?(0,$.jsx)(zi,{height:120,children:`No agent activity in this period`}):(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto_auto_auto] gap-4 px-2 text-[11px] text-muted-foreground uppercase tracking-wide`,children:[(0,$.jsx)(`span`,{children:`Agent`}),(0,$.jsx)(`span`,{className:`text-right w-16`,children:`Turns`}),(0,$.jsx)(`span`,{className:`text-right w-16`,children:`Tools`}),(0,$.jsx)(`span`,{className:`text-right w-16`,children:`Msgs`})]}),O.map(e=>(0,$.jsxs)(`div`,{className:`relative grid grid-cols-[1fr_auto_auto_auto] gap-4 px-2 py-1.5 rounded-md overflow-hidden`,children:[(0,$.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-blue-500/10`,style:{width:`${(e.toolCalls+e.messages)/k*100}%`}}),(0,$.jsx)(`span`,{className:`relative truncate text-sm font-medium`,children:e.label||e.id}),(0,$.jsx)(`span`,{className:`relative text-right w-16 tabular-nums text-sm`,children:Ni(e.turns)}),(0,$.jsx)(`span`,{className:`relative text-right w-16 tabular-nums text-sm text-violet-400`,children:Ni(e.toolCalls)}),(0,$.jsx)(`span`,{className:`relative text-right w-16 tabular-nums text-sm text-muted-foreground`,children:Ni(e.messages)})]},e.id))]})})]})]})}export{Vi as AnalyticsView};
|
|
910
|
-
//# sourceMappingURL=analytics-
|
|
910
|
+
//# sourceMappingURL=analytics-KzLQfGMO.js.map
|