@dudousxd/nestjs-telescope-ui 4.2.0 → 4.3.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/CHANGELOG.md +8 -0
- package/README.md +6 -0
- package/dist/react/components/batch-timeline.d.ts +1 -1
- package/dist/react/components/batch-timeline.d.ts.map +1 -1
- package/dist/react/components/cache-badge.d.ts +1 -1
- package/dist/react/components/cache-badge.d.ts.map +1 -1
- package/dist/react/components/charts/area-chart-card.d.ts +2 -2
- package/dist/react/components/charts/area-chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/area-chart-card.js +1 -1
- package/dist/react/components/charts/bar-chart-card.d.ts +2 -2
- package/dist/react/components/charts/bar-chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/bar-chart-card.js +1 -1
- package/dist/react/components/charts/breakdown-card.d.ts +1 -2
- package/dist/react/components/charts/breakdown-card.d.ts.map +1 -1
- package/dist/react/components/charts/chart-card.d.ts +2 -2
- package/dist/react/components/charts/chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/chart-card.js +1 -1
- package/dist/react/components/charts/chart-card.js.map +1 -1
- package/dist/react/components/charts/chart-theme.d.ts +1 -1
- package/dist/react/components/charts/chart-theme.d.ts.map +1 -1
- package/dist/react/components/charts/chart-theme.js +1 -1
- package/dist/react/components/charts/chart-theme.js.map +1 -1
- package/dist/react/components/charts/distribution-chart-card.d.ts +1 -2
- package/dist/react/components/charts/distribution-chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/distribution-chart-card.js +1 -1
- package/dist/react/components/charts/gauge-card.d.ts +1 -2
- package/dist/react/components/charts/gauge-card.d.ts.map +1 -1
- package/dist/react/components/charts/stacked-area-chart-card.d.ts +2 -2
- package/dist/react/components/charts/stacked-area-chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/stacked-area-chart-card.js +1 -1
- package/dist/react/components/entries-table.d.ts +1 -1
- package/dist/react/components/entries-table.d.ts.map +1 -1
- package/dist/react/components/entries-table.js +3 -2
- package/dist/react/components/entries-table.js.map +1 -1
- package/dist/react/components/entry-detail.d.ts +1 -1
- package/dist/react/components/entry-detail.d.ts.map +1 -1
- package/dist/react/components/entry-detail.js +11 -11
- package/dist/react/components/entry-detail.js.map +1 -1
- package/dist/react/components/entry-insights.d.ts +1 -1
- package/dist/react/components/entry-insights.d.ts.map +1 -1
- package/dist/react/components/entry-insights.js +6 -6
- package/dist/react/components/entry-insights.js.map +1 -1
- package/dist/react/components/export-json-toolbar.d.ts +1 -1
- package/dist/react/components/export-json-toolbar.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-actions.d.ts +3 -3
- package/dist/react/components/extensions/panel-actions.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-column-menu.d.ts +1 -2
- package/dist/react/components/extensions/panel-column-menu.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-renderer.d.ts +1 -2
- package/dist/react/components/extensions/panel-renderer.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-renderer.js +3 -3
- package/dist/react/components/extensions/panel-renderer.js.map +1 -1
- package/dist/react/components/extensions/panel-table-header.d.ts +2 -3
- package/dist/react/components/extensions/panel-table-header.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-table.d.ts +1 -2
- package/dist/react/components/extensions/panel-table.d.ts.map +1 -1
- package/dist/react/components/extensions/stat-card.d.ts +1 -2
- package/dist/react/components/extensions/stat-card.d.ts.map +1 -1
- package/dist/react/components/extensions/stat-card.js +2 -2
- package/dist/react/components/extensions/stat-card.js.map +1 -1
- package/dist/react/components/extensions/table-columns.js +1 -1
- package/dist/react/components/extensions/table-columns.js.map +1 -1
- package/dist/react/components/flamegraph-view.d.ts +1 -2
- package/dist/react/components/flamegraph-view.d.ts.map +1 -1
- package/dist/react/components/flamegraph-view.js +1 -1
- package/dist/react/components/flamegraph-view.js.map +1 -1
- package/dist/react/components/inertia-badge.d.ts +1 -1
- package/dist/react/components/inertia-badge.d.ts.map +1 -1
- package/dist/react/components/inertia-body.d.ts +1 -1
- package/dist/react/components/inertia-body.d.ts.map +1 -1
- package/dist/react/components/inertia-body.js +9 -9
- package/dist/react/components/inertia-body.js.map +1 -1
- package/dist/react/components/official-event.d.ts +1 -1
- package/dist/react/components/official-event.d.ts.map +1 -1
- package/dist/react/components/official-event.js +1 -1
- package/dist/react/components/official-event.js.map +1 -1
- package/dist/react/components/pulse-panel.d.ts +1 -1
- package/dist/react/components/pulse-panel.d.ts.map +1 -1
- package/dist/react/components/pulse-panel.js +2 -2
- package/dist/react/components/pulse-panel.js.map +1 -1
- package/dist/react/components/queue-sparkline.d.ts +2 -2
- package/dist/react/components/queue-sparkline.d.ts.map +1 -1
- package/dist/react/components/queue-sparkline.js +1 -1
- package/dist/react/components/queue-sparkline.js.map +1 -1
- package/dist/react/components/queues/EnqueueJobForm.d.ts +1 -1
- package/dist/react/components/queues/EnqueueJobForm.d.ts.map +1 -1
- package/dist/react/components/queues/EnqueueJobForm.js +1 -1
- package/dist/react/components/queues/EnqueueJobForm.js.map +1 -1
- package/dist/react/components/queues/JobActions.d.ts +3 -3
- package/dist/react/components/queues/JobActions.d.ts.map +1 -1
- package/dist/react/components/queues/JobDetailDrawer.d.ts +1 -1
- package/dist/react/components/queues/JobDetailDrawer.d.ts.map +1 -1
- package/dist/react/components/queues/JobDetailDrawer.js +4 -4
- package/dist/react/components/queues/JobDetailDrawer.js.map +1 -1
- package/dist/react/components/queues/JobTable.d.ts +1 -1
- package/dist/react/components/queues/JobTable.d.ts.map +1 -1
- package/dist/react/components/queues/QueueList.d.ts +1 -1
- package/dist/react/components/queues/QueueList.d.ts.map +1 -1
- package/dist/react/components/queues/QueueList.js +2 -2
- package/dist/react/components/queues/QueueList.js.map +1 -1
- package/dist/react/components/queues/QueueStateTabs.d.ts +1 -1
- package/dist/react/components/queues/QueueStateTabs.d.ts.map +1 -1
- package/dist/react/components/queues-panel.d.ts +1 -1
- package/dist/react/components/queues-panel.d.ts.map +1 -1
- package/dist/react/components/request-timeline.d.ts +1 -1
- package/dist/react/components/request-timeline.d.ts.map +1 -1
- package/dist/react/components/retention-indicator.d.ts +1 -1
- package/dist/react/components/retention-indicator.d.ts.map +1 -1
- package/dist/react/components/retention-indicator.js +1 -1
- package/dist/react/components/retention-indicator.js.map +1 -1
- package/dist/react/components/sparkline.d.ts +1 -1
- package/dist/react/components/sparkline.d.ts.map +1 -1
- package/dist/react/components/stacked-bars.d.ts +1 -1
- package/dist/react/components/stacked-bars.d.ts.map +1 -1
- package/dist/react/components/tag-autocomplete.d.ts +1 -1
- package/dist/react/components/tag-autocomplete.d.ts.map +1 -1
- package/dist/react/components/waterfall-view.d.ts +1 -1
- package/dist/react/components/waterfall-view.d.ts.map +1 -1
- package/dist/react/components/waterfall-view.js +1 -1
- package/dist/react/components/waterfall-view.js.map +1 -1
- package/dist/react/components/window-select.d.ts +1 -1
- package/dist/react/components/window-select.d.ts.map +1 -1
- package/dist/react/telescope-context.d.ts +1 -1
- package/dist/react/telescope-context.d.ts.map +1 -1
- package/dist/react/ui/badge.d.ts +1 -1
- package/dist/react/ui/badge.d.ts.map +1 -1
- package/dist/react/ui/chart.d.ts +5 -5
- package/dist/react/ui/chart.d.ts.map +1 -1
- package/dist/react/ui/chart.js +2 -2
- package/dist/react/ui/chart.js.map +1 -1
- package/dist/react/ui/select.d.ts.map +1 -1
- package/dist/react/ui/select.js +1 -1
- package/dist/react/ui/select.js.map +1 -1
- package/dist/react/ui/table.js +1 -1
- package/dist/react/ui/table.js.map +1 -1
- package/dist/server/console-shell.d.ts +53 -0
- package/dist/server/console-shell.d.ts.map +1 -0
- package/dist/server/console-shell.js +130 -0
- package/dist/server/console-shell.js.map +1 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/telescope-ui.controller.d.ts +2 -1
- package/dist/server/telescope-ui.controller.d.ts.map +1 -1
- package/dist/server/telescope-ui.controller.js +30 -11
- package/dist/server/telescope-ui.controller.js.map +1 -1
- package/dist/server/telescope-ui.options.d.ts +25 -0
- package/dist/server/telescope-ui.options.d.ts.map +1 -1
- package/dist/server/telescope-ui.options.js.map +1 -1
- package/dist/spa/assets/index-B5IIRiHt.js +228 -0
- package/dist/spa/assets/index-C2zgCbqj.css +1 -0
- package/dist/spa/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/dist/spa/assets/sora-latin-400-normal-CRt88UEn.woff2 +0 -0
- package/dist/spa/assets/sora-latin-400-normal-OW7qkl5a.woff +0 -0
- package/dist/spa/assets/sora-latin-500-normal-01eiPEn0.woff2 +0 -0
- package/dist/spa/assets/sora-latin-500-normal-w58xtEt9.woff +0 -0
- package/dist/spa/assets/sora-latin-600-normal-1_7fyUAY.woff +0 -0
- package/dist/spa/assets/sora-latin-600-normal-Cdg4DaK0.woff2 +0 -0
- package/dist/spa/assets/sora-latin-700-normal-9waGdLWo.woff2 +0 -0
- package/dist/spa/assets/sora-latin-700-normal-BKPfQAnC.woff +0 -0
- package/dist/spa/index.html +8 -2
- package/package.json +19 -13
- package/dist/spa/assets/index-BNCovQ2Z.js +0 -159
- package/dist/spa/assets/index-DdEYuSwo.css +0 -1
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
var Z3=Object.defineProperty;var jO=e=>{throw TypeError(e)};var eB=(e,t,n)=>t in e?Z3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tt=(e,t,n)=>eB(e,typeof t!="symbol"?t+"":t,n),tv=(e,t,n)=>t.has(e)||jO("Cannot "+n);var F=(e,t,n)=>(tv(e,t,"read from private field"),n?n.call(e):t.get(e)),ye=(e,t,n)=>t.has(e)?jO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ue=(e,t,n,r)=>(tv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Re=(e,t,n)=>(tv(e,t,"access private method"),n);var Zd=(e,t,n,r)=>({set _(i){ue(e,t,i,n)},get _(){return F(e,t,r)}});function tB(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ep=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kk={exports:{}},hg={},Gk={exports:{}},Ue={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var _d=Symbol.for("react.element"),nB=Symbol.for("react.portal"),rB=Symbol.for("react.fragment"),iB=Symbol.for("react.strict_mode"),oB=Symbol.for("react.profiler"),aB=Symbol.for("react.provider"),sB=Symbol.for("react.context"),lB=Symbol.for("react.forward_ref"),uB=Symbol.for("react.suspense"),cB=Symbol.for("react.memo"),fB=Symbol.for("react.lazy"),OO=Symbol.iterator;function dB(e){return e===null||typeof e!="object"?null:(e=OO&&e[OO]||e["@@iterator"],typeof e=="function"?e:null)}var Xk={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yk=Object.assign,Qk={};function Iu(e,t,n){this.props=e,this.context=t,this.refs=Qk,this.updater=n||Xk}Iu.prototype.isReactComponent={};Iu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Iu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Jk(){}Jk.prototype=Iu.prototype;function r1(e,t,n){this.props=e,this.context=t,this.refs=Qk,this.updater=n||Xk}var i1=r1.prototype=new Jk;i1.constructor=r1;Yk(i1,Iu.prototype);i1.isPureReactComponent=!0;var PO=Array.isArray,Zk=Object.prototype.hasOwnProperty,o1={current:null},eN={key:!0,ref:!0,__self:!0,__source:!0};function tN(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Zk.call(t,r)&&!eN.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:_d,type:e,key:o,ref:a,props:i,_owner:o1.current}}function pB(e,t){return{$$typeof:_d,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function a1(e){return typeof e=="object"&&e!==null&&e.$$typeof===_d}function hB(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var EO=/\/+/g;function nv(e,t){return typeof e=="object"&&e!==null&&e.key!=null?hB(""+e.key):t.toString(36)}function Yp(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case _d:case nB:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+nv(a,0):r,PO(i)?(n="",e!=null&&(n=e.replace(EO,"$&/")+"/"),Yp(i,t,n,"",function(u){return u})):i!=null&&(a1(i)&&(i=pB(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(EO,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",PO(e))for(var s=0;s<e.length;s++){o=e[s];var l=r+nv(o,s);a+=Yp(o,t,n,l,i)}else if(l=dB(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+nv(o,s++),a+=Yp(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function tp(e,t,n){if(e==null)return e;var r=[],i=0;return Yp(e,r,"","",function(o){return t.call(n,o,i++)}),r}function mB(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Hn={current:null},Qp={transition:null},gB={ReactCurrentDispatcher:Hn,ReactCurrentBatchConfig:Qp,ReactCurrentOwner:o1};function nN(){throw Error("act(...) is not supported in production builds of React.")}Ue.Children={map:tp,forEach:function(e,t,n){tp(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return tp(e,function(){t++}),t},toArray:function(e){return tp(e,function(t){return t})||[]},only:function(e){if(!a1(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ue.Component=Iu;Ue.Fragment=rB;Ue.Profiler=oB;Ue.PureComponent=r1;Ue.StrictMode=iB;Ue.Suspense=uB;Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gB;Ue.act=nN;Ue.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Yk({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=o1.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)Zk.call(t,l)&&!eN.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:_d,type:e.type,key:i,ref:o,props:r,_owner:a}};Ue.createContext=function(e){return e={$$typeof:sB,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:aB,_context:e},e.Consumer=e};Ue.createElement=tN;Ue.createFactory=function(e){var t=tN.bind(null,e);return t.type=e,t};Ue.createRef=function(){return{current:null}};Ue.forwardRef=function(e){return{$$typeof:lB,render:e}};Ue.isValidElement=a1;Ue.lazy=function(e){return{$$typeof:fB,_payload:{_status:-1,_result:e},_init:mB}};Ue.memo=function(e,t){return{$$typeof:cB,type:e,compare:t===void 0?null:t}};Ue.startTransition=function(e){var t=Qp.transition;Qp.transition={};try{e()}finally{Qp.transition=t}};Ue.unstable_act=nN;Ue.useCallback=function(e,t){return Hn.current.useCallback(e,t)};Ue.useContext=function(e){return Hn.current.useContext(e)};Ue.useDebugValue=function(){};Ue.useDeferredValue=function(e){return Hn.current.useDeferredValue(e)};Ue.useEffect=function(e,t){return Hn.current.useEffect(e,t)};Ue.useId=function(){return Hn.current.useId()};Ue.useImperativeHandle=function(e,t,n){return Hn.current.useImperativeHandle(e,t,n)};Ue.useInsertionEffect=function(e,t){return Hn.current.useInsertionEffect(e,t)};Ue.useLayoutEffect=function(e,t){return Hn.current.useLayoutEffect(e,t)};Ue.useMemo=function(e,t){return Hn.current.useMemo(e,t)};Ue.useReducer=function(e,t,n){return Hn.current.useReducer(e,t,n)};Ue.useRef=function(e){return Hn.current.useRef(e)};Ue.useState=function(e){return Hn.current.useState(e)};Ue.useSyncExternalStore=function(e,t,n){return Hn.current.useSyncExternalStore(e,t,n)};Ue.useTransition=function(){return Hn.current.useTransition()};Ue.version="18.3.1";Gk.exports=Ue;var j=Gk.exports;const D=Ze(j),rN=tB({__proto__:null,default:D},[j]);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var yB=j,vB=Symbol.for("react.element"),xB=Symbol.for("react.fragment"),bB=Object.prototype.hasOwnProperty,wB=yB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,SB={key:!0,ref:!0,__self:!0,__source:!0};function iN(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)bB.call(t,r)&&!SB.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:vB,type:e,key:o,ref:a,props:i,_owner:wB.current}}hg.Fragment=xB;hg.jsx=iN;hg.jsxs=iN;Kk.exports=hg;var f=Kk.exports,oN={exports:{}},mr={},aN={exports:{}},sN={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(N,L){var M=N.length;N.push(L);e:for(;0<M;){var z=M-1>>>1,U=N[z];if(0<i(U,L))N[z]=L,N[M]=U,M=z;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var L=N[0],M=N.pop();if(M!==L){N[0]=M;e:for(var z=0,U=N.length,V=U>>>1;z<V;){var W=2*(z+1)-1,Q=N[W],G=W+1,le=N[G];if(0>i(Q,M))G<U&&0>i(le,Q)?(N[z]=le,N[G]=M,z=G):(N[z]=Q,N[W]=M,z=W);else if(G<U&&0>i(le,M))N[z]=le,N[G]=M,z=G;else break e}}return L}function i(N,L){var M=N.sortIndex-L.sortIndex;return M!==0?M:N.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,p=3,m=!1,v=!1,h=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(N){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=N)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function S(N){if(h=!1,b(N),!v)if(n(l)!==null)v=!0,I(w);else{var L=n(u);L!==null&&B(S,L.startTime-N)}}function w(N,L){v=!1,h&&(h=!1,y(E),E=-1),m=!0;var M=p;try{for(b(L),d=n(l);d!==null&&(!(d.expirationTime>L)||N&&!T());){var z=d.callback;if(typeof z=="function"){d.callback=null,p=d.priorityLevel;var U=z(d.expirationTime<=L);L=e.unstable_now(),typeof U=="function"?d.callback=U:d===n(l)&&r(l),b(L)}else r(l);d=n(l)}if(d!==null)var V=!0;else{var W=n(u);W!==null&&B(S,W.startTime-L),V=!1}return V}finally{d=null,p=M,m=!1}}var O=!1,P=null,E=-1,A=5,C=-1;function T(){return!(e.unstable_now()-C<A)}function _(){if(P!==null){var N=e.unstable_now();C=N;var L=!0;try{L=P(!0,N)}finally{L?k():(O=!1,P=null)}}else O=!1}var k;if(typeof x=="function")k=function(){x(_)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,R=$.port2;$.port1.onmessage=_,k=function(){R.postMessage(null)}}else k=function(){g(_,0)};function I(N){P=N,O||(O=!0,k())}function B(N,L){E=g(function(){N(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){v||m||(v=!0,I(w))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(p){case 1:case 2:case 3:var L=3;break;default:L=p}var M=p;p=L;try{return N()}finally{p=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,L){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var M=p;p=N;try{return L()}finally{p=M}},e.unstable_scheduleCallback=function(N,L,M){var z=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?z+M:z):M=z,N){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=M+U,N={id:c++,callback:L,priorityLevel:N,startTime:M,expirationTime:U,sortIndex:-1},M>z?(N.sortIndex=M,t(u,N),n(l)===null&&N===n(u)&&(h?(y(E),E=-1):h=!0,B(S,M-z))):(N.sortIndex=U,t(l,N),v||m||(v=!0,I(w))),N},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(N){var L=p;return function(){var M=p;p=L;try{return N.apply(this,arguments)}finally{p=M}}}})(sN);aN.exports=sN;var jB=aN.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var OB=j,pr=jB;function re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var lN=new Set,yf={};function Bs(e,t){Kl(e,t),Kl(e+"Capture",t)}function Kl(e,t){for(yf[e]=t,e=0;e<t.length;e++)lN.add(t[e])}var no=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tx=Object.prototype.hasOwnProperty,PB=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,AO={},CO={};function EB(e){return Tx.call(CO,e)?!0:Tx.call(AO,e)?!1:PB.test(e)?CO[e]=!0:(AO[e]=!0,!1)}function AB(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function CB(e,t,n,r){if(t===null||typeof t>"u"||AB(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Vn(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var gn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){gn[e]=new Vn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];gn[t]=new Vn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){gn[e]=new Vn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){gn[e]=new Vn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){gn[e]=new Vn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){gn[e]=new Vn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){gn[e]=new Vn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){gn[e]=new Vn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){gn[e]=new Vn(e,5,!1,e.toLowerCase(),null,!1,!1)});var s1=/[\-:]([a-z])/g;function l1(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(s1,l1);gn[t]=new Vn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(s1,l1);gn[t]=new Vn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(s1,l1);gn[t]=new Vn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){gn[e]=new Vn(e,1,!1,e.toLowerCase(),null,!1,!1)});gn.xlinkHref=new Vn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){gn[e]=new Vn(e,1,!1,e.toLowerCase(),null,!0,!0)});function u1(e,t,n,r){var i=gn.hasOwnProperty(t)?gn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(CB(t,n,i,r)&&(n=null),r||i===null?EB(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var mo=OB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,np=Symbol.for("react.element"),nl=Symbol.for("react.portal"),rl=Symbol.for("react.fragment"),c1=Symbol.for("react.strict_mode"),_x=Symbol.for("react.profiler"),uN=Symbol.for("react.provider"),cN=Symbol.for("react.context"),f1=Symbol.for("react.forward_ref"),kx=Symbol.for("react.suspense"),Nx=Symbol.for("react.suspense_list"),d1=Symbol.for("react.memo"),$o=Symbol.for("react.lazy"),fN=Symbol.for("react.offscreen"),TO=Symbol.iterator;function hc(e){return e===null||typeof e!="object"?null:(e=TO&&e[TO]||e["@@iterator"],typeof e=="function"?e:null)}var At=Object.assign,rv;function Fc(e){if(rv===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);rv=t&&t[1]||""}return`
|
|
34
|
-
`+rv+e}var iv=!1;function ov(e,t){if(!e||iv)return"";iv=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
-
`),o=r.stack.split(`
|
|
36
|
-
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
|
|
37
|
-
`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{iv=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fc(e):""}function TB(e){switch(e.tag){case 5:return Fc(e.type);case 16:return Fc("Lazy");case 13:return Fc("Suspense");case 19:return Fc("SuspenseList");case 0:case 2:case 15:return e=ov(e.type,!1),e;case 11:return e=ov(e.type.render,!1),e;case 1:return e=ov(e.type,!0),e;default:return""}}function Rx(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case rl:return"Fragment";case nl:return"Portal";case _x:return"Profiler";case c1:return"StrictMode";case kx:return"Suspense";case Nx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cN:return(e.displayName||"Context")+".Consumer";case uN:return(e._context.displayName||"Context")+".Provider";case f1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case d1:return t=e.displayName||null,t!==null?t:Rx(e.type)||"Memo";case $o:t=e._payload,e=e._init;try{return Rx(e(t))}catch{}}return null}function _B(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Rx(t);case 8:return t===c1?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function pa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function dN(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kB(e){var t=dN(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rp(e){e._valueTracker||(e._valueTracker=kB(e))}function pN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=dN(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function xh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $x(e,t){var n=t.checked;return At({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _O(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=pa(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function hN(e,t){t=t.checked,t!=null&&u1(e,"checked",t,!1)}function Mx(e,t){hN(e,t);var n=pa(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ix(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ix(e,t.type,pa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kO(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ix(e,t,n){(t!=="number"||xh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Bc=Array.isArray;function bl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+pa(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Dx(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(re(91));return At({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function NO(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(re(92));if(Bc(n)){if(1<n.length)throw Error(re(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:pa(n)}}function mN(e,t){var n=pa(t.value),r=pa(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function RO(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gN(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Lx(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?gN(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ip,yN=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ip=ip||document.createElement("div"),ip.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ip.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function vf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},NB=["Webkit","ms","Moz","O"];Object.keys(Yc).forEach(function(e){NB.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yc[t]=Yc[e]})});function vN(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yc.hasOwnProperty(e)&&Yc[e]?(""+t).trim():t+"px"}function xN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=vN(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var RB=At({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Fx(e,t){if(t){if(RB[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(re(62))}}function Bx(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ux=null;function p1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zx=null,wl=null,Sl=null;function $O(e){if(e=Rd(e)){if(typeof zx!="function")throw Error(re(280));var t=e.stateNode;t&&(t=xg(t),zx(e.stateNode,e.type,t))}}function bN(e){wl?Sl?Sl.push(e):Sl=[e]:wl=e}function wN(){if(wl){var e=wl,t=Sl;if(Sl=wl=null,$O(e),t)for(e=0;e<t.length;e++)$O(t[e])}}function SN(e,t){return e(t)}function jN(){}var av=!1;function ON(e,t,n){if(av)return e(t,n);av=!0;try{return SN(e,t,n)}finally{av=!1,(wl!==null||Sl!==null)&&(jN(),wN())}}function xf(e,t){var n=e.stateNode;if(n===null)return null;var r=xg(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(re(231,t,typeof n));return n}var Hx=!1;if(no)try{var mc={};Object.defineProperty(mc,"passive",{get:function(){Hx=!0}}),window.addEventListener("test",mc,mc),window.removeEventListener("test",mc,mc)}catch{Hx=!1}function $B(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Qc=!1,bh=null,wh=!1,Vx=null,MB={onError:function(e){Qc=!0,bh=e}};function IB(e,t,n,r,i,o,a,s,l){Qc=!1,bh=null,$B.apply(MB,arguments)}function DB(e,t,n,r,i,o,a,s,l){if(IB.apply(this,arguments),Qc){if(Qc){var u=bh;Qc=!1,bh=null}else throw Error(re(198));wh||(wh=!0,Vx=u)}}function Us(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function PN(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function MO(e){if(Us(e)!==e)throw Error(re(188))}function LB(e){var t=e.alternate;if(!t){if(t=Us(e),t===null)throw Error(re(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return MO(i),e;if(o===r)return MO(i),t;o=o.sibling}throw Error(re(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(re(189))}}if(n.alternate!==r)throw Error(re(190))}if(n.tag!==3)throw Error(re(188));return n.stateNode.current===n?e:t}function EN(e){return e=LB(e),e!==null?AN(e):null}function AN(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=AN(e);if(t!==null)return t;e=e.sibling}return null}var CN=pr.unstable_scheduleCallback,IO=pr.unstable_cancelCallback,FB=pr.unstable_shouldYield,BB=pr.unstable_requestPaint,Rt=pr.unstable_now,UB=pr.unstable_getCurrentPriorityLevel,h1=pr.unstable_ImmediatePriority,TN=pr.unstable_UserBlockingPriority,Sh=pr.unstable_NormalPriority,zB=pr.unstable_LowPriority,_N=pr.unstable_IdlePriority,mg=null,xi=null;function HB(e){if(xi&&typeof xi.onCommitFiberRoot=="function")try{xi.onCommitFiberRoot(mg,e,void 0,(e.current.flags&128)===128)}catch{}}var Xr=Math.clz32?Math.clz32:qB,VB=Math.log,WB=Math.LN2;function qB(e){return e>>>=0,e===0?32:31-(VB(e)/WB|0)|0}var op=64,ap=4194304;function Uc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function jh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Uc(s):(o&=a,o!==0&&(r=Uc(o)))}else a=n&~i,a!==0?r=Uc(a):o!==0&&(r=Uc(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Xr(t),i=1<<n,r|=e[n],t&=~i;return r}function KB(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function GB(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Xr(o),s=1<<a,l=i[a];l===-1?(!(s&n)||s&r)&&(i[a]=KB(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function Wx(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function kN(){var e=op;return op<<=1,!(op&4194240)&&(op=64),e}function sv(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function kd(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xr(t),e[t]=n}function XB(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Xr(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function m1(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Je=0;function NN(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var RN,g1,$N,MN,IN,qx=!1,sp=[],ea=null,ta=null,na=null,bf=new Map,wf=new Map,Do=[],YB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function DO(e,t){switch(e){case"focusin":case"focusout":ea=null;break;case"dragenter":case"dragleave":ta=null;break;case"mouseover":case"mouseout":na=null;break;case"pointerover":case"pointerout":bf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wf.delete(t.pointerId)}}function gc(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Rd(t),t!==null&&g1(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function QB(e,t,n,r,i){switch(t){case"focusin":return ea=gc(ea,e,t,n,r,i),!0;case"dragenter":return ta=gc(ta,e,t,n,r,i),!0;case"mouseover":return na=gc(na,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return bf.set(o,gc(bf.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,wf.set(o,gc(wf.get(o)||null,e,t,n,r,i)),!0}return!1}function DN(e){var t=Xa(e.target);if(t!==null){var n=Us(t);if(n!==null){if(t=n.tag,t===13){if(t=PN(n),t!==null){e.blockedOn=t,IN(e.priority,function(){$N(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Jp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kx(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ux=r,n.target.dispatchEvent(r),Ux=null}else return t=Rd(n),t!==null&&g1(t),e.blockedOn=n,!1;t.shift()}return!0}function LO(e,t,n){Jp(e)&&n.delete(t)}function JB(){qx=!1,ea!==null&&Jp(ea)&&(ea=null),ta!==null&&Jp(ta)&&(ta=null),na!==null&&Jp(na)&&(na=null),bf.forEach(LO),wf.forEach(LO)}function yc(e,t){e.blockedOn===t&&(e.blockedOn=null,qx||(qx=!0,pr.unstable_scheduleCallback(pr.unstable_NormalPriority,JB)))}function Sf(e){function t(i){return yc(i,e)}if(0<sp.length){yc(sp[0],e);for(var n=1;n<sp.length;n++){var r=sp[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ea!==null&&yc(ea,e),ta!==null&&yc(ta,e),na!==null&&yc(na,e),bf.forEach(t),wf.forEach(t),n=0;n<Do.length;n++)r=Do[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Do.length&&(n=Do[0],n.blockedOn===null);)DN(n),n.blockedOn===null&&Do.shift()}var jl=mo.ReactCurrentBatchConfig,Oh=!0;function ZB(e,t,n,r){var i=Je,o=jl.transition;jl.transition=null;try{Je=1,y1(e,t,n,r)}finally{Je=i,jl.transition=o}}function e4(e,t,n,r){var i=Je,o=jl.transition;jl.transition=null;try{Je=4,y1(e,t,n,r)}finally{Je=i,jl.transition=o}}function y1(e,t,n,r){if(Oh){var i=Kx(e,t,n,r);if(i===null)yv(e,t,r,Ph,n),DO(e,r);else if(QB(i,e,t,n,r))r.stopPropagation();else if(DO(e,r),t&4&&-1<YB.indexOf(e)){for(;i!==null;){var o=Rd(i);if(o!==null&&RN(o),o=Kx(e,t,n,r),o===null&&yv(e,t,r,Ph,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else yv(e,t,r,null,n)}}var Ph=null;function Kx(e,t,n,r){if(Ph=null,e=p1(r),e=Xa(e),e!==null)if(t=Us(e),t===null)e=null;else if(n=t.tag,n===13){if(e=PN(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ph=e,null}function LN(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(UB()){case h1:return 1;case TN:return 4;case Sh:case zB:return 16;case _N:return 536870912;default:return 16}default:return 16}}var Go=null,v1=null,Zp=null;function FN(){if(Zp)return Zp;var e,t=v1,n=t.length,r,i="value"in Go?Go.value:Go.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Zp=i.slice(e,1<r?1-r:void 0)}function eh(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function lp(){return!0}function FO(){return!1}function gr(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?lp:FO,this.isPropagationStopped=FO,this}return At(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=lp)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=lp)},persist:function(){},isPersistent:lp}),t}var Du={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},x1=gr(Du),Nd=At({},Du,{view:0,detail:0}),t4=gr(Nd),lv,uv,vc,gg=At({},Nd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:b1,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==vc&&(vc&&e.type==="mousemove"?(lv=e.screenX-vc.screenX,uv=e.screenY-vc.screenY):uv=lv=0,vc=e),lv)},movementY:function(e){return"movementY"in e?e.movementY:uv}}),BO=gr(gg),n4=At({},gg,{dataTransfer:0}),r4=gr(n4),i4=At({},Nd,{relatedTarget:0}),cv=gr(i4),o4=At({},Du,{animationName:0,elapsedTime:0,pseudoElement:0}),a4=gr(o4),s4=At({},Du,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),l4=gr(s4),u4=At({},Du,{data:0}),UO=gr(u4),c4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},d4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function p4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=d4[e])?!!t[e]:!1}function b1(){return p4}var h4=At({},Nd,{key:function(e){if(e.key){var t=c4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=eh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?f4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:b1,charCode:function(e){return e.type==="keypress"?eh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?eh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),m4=gr(h4),g4=At({},gg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zO=gr(g4),y4=At({},Nd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:b1}),v4=gr(y4),x4=At({},Du,{propertyName:0,elapsedTime:0,pseudoElement:0}),b4=gr(x4),w4=At({},gg,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),S4=gr(w4),j4=[9,13,27,32],w1=no&&"CompositionEvent"in window,Jc=null;no&&"documentMode"in document&&(Jc=document.documentMode);var O4=no&&"TextEvent"in window&&!Jc,BN=no&&(!w1||Jc&&8<Jc&&11>=Jc),HO=" ",VO=!1;function UN(e,t){switch(e){case"keyup":return j4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zN(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var il=!1;function P4(e,t){switch(e){case"compositionend":return zN(t);case"keypress":return t.which!==32?null:(VO=!0,HO);case"textInput":return e=t.data,e===HO&&VO?null:e;default:return null}}function E4(e,t){if(il)return e==="compositionend"||!w1&&UN(e,t)?(e=FN(),Zp=v1=Go=null,il=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return BN&&t.locale!=="ko"?null:t.data;default:return null}}var A4={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function WO(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!A4[e.type]:t==="textarea"}function HN(e,t,n,r){bN(r),t=Eh(t,"onChange"),0<t.length&&(n=new x1("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zc=null,jf=null;function C4(e){eR(e,0)}function yg(e){var t=sl(e);if(pN(t))return e}function T4(e,t){if(e==="change")return t}var VN=!1;if(no){var fv;if(no){var dv="oninput"in document;if(!dv){var qO=document.createElement("div");qO.setAttribute("oninput","return;"),dv=typeof qO.oninput=="function"}fv=dv}else fv=!1;VN=fv&&(!document.documentMode||9<document.documentMode)}function KO(){Zc&&(Zc.detachEvent("onpropertychange",WN),jf=Zc=null)}function WN(e){if(e.propertyName==="value"&&yg(jf)){var t=[];HN(t,jf,e,p1(e)),ON(C4,t)}}function _4(e,t,n){e==="focusin"?(KO(),Zc=t,jf=n,Zc.attachEvent("onpropertychange",WN)):e==="focusout"&&KO()}function k4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yg(jf)}function N4(e,t){if(e==="click")return yg(t)}function R4(e,t){if(e==="input"||e==="change")return yg(t)}function $4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zr=typeof Object.is=="function"?Object.is:$4;function Of(e,t){if(Zr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Tx.call(t,i)||!Zr(e[i],t[i]))return!1}return!0}function GO(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function XO(e,t){var n=GO(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=GO(n)}}function qN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function KN(){for(var e=window,t=xh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xh(e.document)}return t}function S1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function M4(e){var t=KN(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qN(n.ownerDocument.documentElement,n)){if(r!==null&&S1(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=XO(n,o);var a=XO(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var I4=no&&"documentMode"in document&&11>=document.documentMode,ol=null,Gx=null,ef=null,Xx=!1;function YO(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xx||ol==null||ol!==xh(r)||(r=ol,"selectionStart"in r&&S1(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ef&&Of(ef,r)||(ef=r,r=Eh(Gx,"onSelect"),0<r.length&&(t=new x1("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ol)))}function up(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var al={animationend:up("Animation","AnimationEnd"),animationiteration:up("Animation","AnimationIteration"),animationstart:up("Animation","AnimationStart"),transitionend:up("Transition","TransitionEnd")},pv={},GN={};no&&(GN=document.createElement("div").style,"AnimationEvent"in window||(delete al.animationend.animation,delete al.animationiteration.animation,delete al.animationstart.animation),"TransitionEvent"in window||delete al.transitionend.transition);function vg(e){if(pv[e])return pv[e];if(!al[e])return e;var t=al[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in GN)return pv[e]=t[n];return e}var XN=vg("animationend"),YN=vg("animationiteration"),QN=vg("animationstart"),JN=vg("transitionend"),ZN=new Map,QO="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Sa(e,t){ZN.set(e,t),Bs(t,[e])}for(var hv=0;hv<QO.length;hv++){var mv=QO[hv],D4=mv.toLowerCase(),L4=mv[0].toUpperCase()+mv.slice(1);Sa(D4,"on"+L4)}Sa(XN,"onAnimationEnd");Sa(YN,"onAnimationIteration");Sa(QN,"onAnimationStart");Sa("dblclick","onDoubleClick");Sa("focusin","onFocus");Sa("focusout","onBlur");Sa(JN,"onTransitionEnd");Kl("onMouseEnter",["mouseout","mouseover"]);Kl("onMouseLeave",["mouseout","mouseover"]);Kl("onPointerEnter",["pointerout","pointerover"]);Kl("onPointerLeave",["pointerout","pointerover"]);Bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Bs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Bs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),F4=new Set("cancel close invalid load scroll toggle".split(" ").concat(zc));function JO(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,DB(r,t,void 0,e),e.currentTarget=null}function eR(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;JO(i,s,u),o=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;JO(i,s,u),o=l}}}if(wh)throw e=Vx,wh=!1,Vx=null,e}function pt(e,t){var n=t[eb];n===void 0&&(n=t[eb]=new Set);var r=e+"__bubble";n.has(r)||(tR(t,e,2,!1),n.add(r))}function gv(e,t,n){var r=0;t&&(r|=4),tR(n,e,r,t)}var cp="_reactListening"+Math.random().toString(36).slice(2);function Pf(e){if(!e[cp]){e[cp]=!0,lN.forEach(function(n){n!=="selectionchange"&&(F4.has(n)||gv(n,!1,e),gv(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cp]||(t[cp]=!0,gv("selectionchange",!1,t))}}function tR(e,t,n,r){switch(LN(t)){case 1:var i=ZB;break;case 4:i=e4;break;default:i=y1}n=i.bind(null,t,n,e),i=void 0,!Hx||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function yv(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=Xa(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}ON(function(){var u=o,c=p1(n),d=[];e:{var p=ZN.get(e);if(p!==void 0){var m=x1,v=e;switch(e){case"keypress":if(eh(n)===0)break e;case"keydown":case"keyup":m=m4;break;case"focusin":v="focus",m=cv;break;case"focusout":v="blur",m=cv;break;case"beforeblur":case"afterblur":m=cv;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=BO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=r4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=v4;break;case XN:case YN:case QN:m=a4;break;case JN:m=b4;break;case"scroll":m=t4;break;case"wheel":m=S4;break;case"copy":case"cut":case"paste":m=l4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=zO}var h=(t&4)!==0,g=!h&&e==="scroll",y=h?p!==null?p+"Capture":null:p;h=[];for(var x=u,b;x!==null;){b=x;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,y!==null&&(S=xf(x,y),S!=null&&h.push(Ef(x,S,b)))),g)break;x=x.return}0<h.length&&(p=new m(p,v,null,n,c),d.push({event:p,listeners:h}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==Ux&&(v=n.relatedTarget||n.fromElement)&&(Xa(v)||v[ro]))break e;if((m||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=u,v=v?Xa(v):null,v!==null&&(g=Us(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=u),m!==v)){if(h=BO,S="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(h=zO,S="onPointerLeave",y="onPointerEnter",x="pointer"),g=m==null?p:sl(m),b=v==null?p:sl(v),p=new h(S,x+"leave",m,n,c),p.target=g,p.relatedTarget=b,S=null,Xa(c)===u&&(h=new h(y,x+"enter",v,n,c),h.target=b,h.relatedTarget=g,S=h),g=S,m&&v)t:{for(h=m,y=v,x=0,b=h;b;b=Ys(b))x++;for(b=0,S=y;S;S=Ys(S))b++;for(;0<x-b;)h=Ys(h),x--;for(;0<b-x;)y=Ys(y),b--;for(;x--;){if(h===y||y!==null&&h===y.alternate)break t;h=Ys(h),y=Ys(y)}h=null}else h=null;m!==null&&ZO(d,p,m,h,!1),v!==null&&g!==null&&ZO(d,g,v,h,!0)}}e:{if(p=u?sl(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var w=T4;else if(WO(p))if(VN)w=R4;else{w=k4;var O=_4}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(w=N4);if(w&&(w=w(e,u))){HN(d,w,n,c);break e}O&&O(e,p,u),e==="focusout"&&(O=p._wrapperState)&&O.controlled&&p.type==="number"&&Ix(p,"number",p.value)}switch(O=u?sl(u):window,e){case"focusin":(WO(O)||O.contentEditable==="true")&&(ol=O,Gx=u,ef=null);break;case"focusout":ef=Gx=ol=null;break;case"mousedown":Xx=!0;break;case"contextmenu":case"mouseup":case"dragend":Xx=!1,YO(d,n,c);break;case"selectionchange":if(I4)break;case"keydown":case"keyup":YO(d,n,c)}var P;if(w1)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else il?UN(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(BN&&n.locale!=="ko"&&(il||E!=="onCompositionStart"?E==="onCompositionEnd"&&il&&(P=FN()):(Go=c,v1="value"in Go?Go.value:Go.textContent,il=!0)),O=Eh(u,E),0<O.length&&(E=new UO(E,e,null,n,c),d.push({event:E,listeners:O}),P?E.data=P:(P=zN(n),P!==null&&(E.data=P)))),(P=O4?P4(e,n):E4(e,n))&&(u=Eh(u,"onBeforeInput"),0<u.length&&(c=new UO("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=P))}eR(d,t)})}function Ef(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Eh(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=xf(e,n),o!=null&&r.unshift(Ef(e,o,i)),o=xf(e,t),o!=null&&r.push(Ef(e,o,i))),e=e.return}return r}function Ys(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ZO(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,i?(l=xf(n,o),l!=null&&a.unshift(Ef(n,l,s))):i||(l=xf(n,o),l!=null&&a.push(Ef(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var B4=/\r\n?/g,U4=/\u0000|\uFFFD/g;function eP(e){return(typeof e=="string"?e:""+e).replace(B4,`
|
|
38
|
-
`).replace(U4,"")}function fp(e,t,n){if(t=eP(t),eP(e)!==t&&n)throw Error(re(425))}function Ah(){}var Yx=null,Qx=null;function Jx(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Zx=typeof setTimeout=="function"?setTimeout:void 0,z4=typeof clearTimeout=="function"?clearTimeout:void 0,tP=typeof Promise=="function"?Promise:void 0,H4=typeof queueMicrotask=="function"?queueMicrotask:typeof tP<"u"?function(e){return tP.resolve(null).then(e).catch(V4)}:Zx;function V4(e){setTimeout(function(){throw e})}function vv(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Sf(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Sf(t)}function ra(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function nP(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Lu=Math.random().toString(36).slice(2),mi="__reactFiber$"+Lu,Af="__reactProps$"+Lu,ro="__reactContainer$"+Lu,eb="__reactEvents$"+Lu,W4="__reactListeners$"+Lu,q4="__reactHandles$"+Lu;function Xa(e){var t=e[mi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ro]||n[mi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nP(e);e!==null;){if(n=e[mi])return n;e=nP(e)}return t}e=n,n=e.parentNode}return null}function Rd(e){return e=e[mi]||e[ro],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function sl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(re(33))}function xg(e){return e[Af]||null}var tb=[],ll=-1;function ja(e){return{current:e}}function gt(e){0>ll||(e.current=tb[ll],tb[ll]=null,ll--)}function ct(e,t){ll++,tb[ll]=e.current,e.current=t}var ha={},Tn=ja(ha),Qn=ja(!1),Ss=ha;function Gl(e,t){var n=e.type.contextTypes;if(!n)return ha;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Jn(e){return e=e.childContextTypes,e!=null}function Ch(){gt(Qn),gt(Tn)}function rP(e,t,n){if(Tn.current!==ha)throw Error(re(168));ct(Tn,t),ct(Qn,n)}function nR(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(re(108,_B(e)||"Unknown",i));return At({},n,r)}function Th(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ha,Ss=Tn.current,ct(Tn,e),ct(Qn,Qn.current),!0}function iP(e,t,n){var r=e.stateNode;if(!r)throw Error(re(169));n?(e=nR(e,t,Ss),r.__reactInternalMemoizedMergedChildContext=e,gt(Qn),gt(Tn),ct(Tn,e)):gt(Qn),ct(Qn,n)}var Fi=null,bg=!1,xv=!1;function rR(e){Fi===null?Fi=[e]:Fi.push(e)}function K4(e){bg=!0,rR(e)}function Oa(){if(!xv&&Fi!==null){xv=!0;var e=0,t=Je;try{var n=Fi;for(Je=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Fi=null,bg=!1}catch(i){throw Fi!==null&&(Fi=Fi.slice(e+1)),CN(h1,Oa),i}finally{Je=t,xv=!1}}return null}var ul=[],cl=0,_h=null,kh=0,Pr=[],Er=0,js=null,Vi=1,Wi="";function Ha(e,t){ul[cl++]=kh,ul[cl++]=_h,_h=e,kh=t}function iR(e,t,n){Pr[Er++]=Vi,Pr[Er++]=Wi,Pr[Er++]=js,js=e;var r=Vi;e=Wi;var i=32-Xr(r)-1;r&=~(1<<i),n+=1;var o=32-Xr(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Vi=1<<32-Xr(t)+i|n<<i|r,Wi=o+e}else Vi=1<<o|n<<i|r,Wi=e}function j1(e){e.return!==null&&(Ha(e,1),iR(e,1,0))}function O1(e){for(;e===_h;)_h=ul[--cl],ul[cl]=null,kh=ul[--cl],ul[cl]=null;for(;e===js;)js=Pr[--Er],Pr[Er]=null,Wi=Pr[--Er],Pr[Er]=null,Vi=Pr[--Er],Pr[Er]=null}var ur=null,lr=null,bt=!1,Kr=null;function oR(e,t){var n=Cr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function oP(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ur=e,lr=ra(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ur=e,lr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=js!==null?{id:Vi,overflow:Wi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Cr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ur=e,lr=null,!0):!1;default:return!1}}function nb(e){return(e.mode&1)!==0&&(e.flags&128)===0}function rb(e){if(bt){var t=lr;if(t){var n=t;if(!oP(e,t)){if(nb(e))throw Error(re(418));t=ra(n.nextSibling);var r=ur;t&&oP(e,t)?oR(r,n):(e.flags=e.flags&-4097|2,bt=!1,ur=e)}}else{if(nb(e))throw Error(re(418));e.flags=e.flags&-4097|2,bt=!1,ur=e}}}function aP(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ur=e}function dp(e){if(e!==ur)return!1;if(!bt)return aP(e),bt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Jx(e.type,e.memoizedProps)),t&&(t=lr)){if(nb(e))throw aR(),Error(re(418));for(;t;)oR(e,t),t=ra(t.nextSibling)}if(aP(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(re(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){lr=ra(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}lr=null}}else lr=ur?ra(e.stateNode.nextSibling):null;return!0}function aR(){for(var e=lr;e;)e=ra(e.nextSibling)}function Xl(){lr=ur=null,bt=!1}function P1(e){Kr===null?Kr=[e]:Kr.push(e)}var G4=mo.ReactCurrentBatchConfig;function xc(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(re(309));var r=n.stateNode}if(!r)throw Error(re(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(re(284));if(!n._owner)throw Error(re(290,e))}return e}function pp(e,t){throw e=Object.prototype.toString.call(t),Error(re(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function sP(e){var t=e._init;return t(e._payload)}function sR(e){function t(y,x){if(e){var b=y.deletions;b===null?(y.deletions=[x],y.flags|=16):b.push(x)}}function n(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function r(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function i(y,x){return y=sa(y,x),y.index=0,y.sibling=null,y}function o(y,x,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<x?(y.flags|=2,x):b):(y.flags|=2,x)):(y.flags|=1048576,x)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function s(y,x,b,S){return x===null||x.tag!==6?(x=Ev(b,y.mode,S),x.return=y,x):(x=i(x,b),x.return=y,x)}function l(y,x,b,S){var w=b.type;return w===rl?c(y,x,b.props.children,S,b.key):x!==null&&(x.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===$o&&sP(w)===x.type)?(S=i(x,b.props),S.ref=xc(y,x,b),S.return=y,S):(S=sh(b.type,b.key,b.props,null,y.mode,S),S.ref=xc(y,x,b),S.return=y,S)}function u(y,x,b,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=Av(b,y.mode,S),x.return=y,x):(x=i(x,b.children||[]),x.return=y,x)}function c(y,x,b,S,w){return x===null||x.tag!==7?(x=gs(b,y.mode,S,w),x.return=y,x):(x=i(x,b),x.return=y,x)}function d(y,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Ev(""+x,y.mode,b),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case np:return b=sh(x.type,x.key,x.props,null,y.mode,b),b.ref=xc(y,null,x),b.return=y,b;case nl:return x=Av(x,y.mode,b),x.return=y,x;case $o:var S=x._init;return d(y,S(x._payload),b)}if(Bc(x)||hc(x))return x=gs(x,y.mode,b,null),x.return=y,x;pp(y,x)}return null}function p(y,x,b,S){var w=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return w!==null?null:s(y,x,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case np:return b.key===w?l(y,x,b,S):null;case nl:return b.key===w?u(y,x,b,S):null;case $o:return w=b._init,p(y,x,w(b._payload),S)}if(Bc(b)||hc(b))return w!==null?null:c(y,x,b,S,null);pp(y,b)}return null}function m(y,x,b,S,w){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(b)||null,s(x,y,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case np:return y=y.get(S.key===null?b:S.key)||null,l(x,y,S,w);case nl:return y=y.get(S.key===null?b:S.key)||null,u(x,y,S,w);case $o:var O=S._init;return m(y,x,b,O(S._payload),w)}if(Bc(S)||hc(S))return y=y.get(b)||null,c(x,y,S,w,null);pp(x,S)}return null}function v(y,x,b,S){for(var w=null,O=null,P=x,E=x=0,A=null;P!==null&&E<b.length;E++){P.index>E?(A=P,P=null):A=P.sibling;var C=p(y,P,b[E],S);if(C===null){P===null&&(P=A);break}e&&P&&C.alternate===null&&t(y,P),x=o(C,x,E),O===null?w=C:O.sibling=C,O=C,P=A}if(E===b.length)return n(y,P),bt&&Ha(y,E),w;if(P===null){for(;E<b.length;E++)P=d(y,b[E],S),P!==null&&(x=o(P,x,E),O===null?w=P:O.sibling=P,O=P);return bt&&Ha(y,E),w}for(P=r(y,P);E<b.length;E++)A=m(P,y,E,b[E],S),A!==null&&(e&&A.alternate!==null&&P.delete(A.key===null?E:A.key),x=o(A,x,E),O===null?w=A:O.sibling=A,O=A);return e&&P.forEach(function(T){return t(y,T)}),bt&&Ha(y,E),w}function h(y,x,b,S){var w=hc(b);if(typeof w!="function")throw Error(re(150));if(b=w.call(b),b==null)throw Error(re(151));for(var O=w=null,P=x,E=x=0,A=null,C=b.next();P!==null&&!C.done;E++,C=b.next()){P.index>E?(A=P,P=null):A=P.sibling;var T=p(y,P,C.value,S);if(T===null){P===null&&(P=A);break}e&&P&&T.alternate===null&&t(y,P),x=o(T,x,E),O===null?w=T:O.sibling=T,O=T,P=A}if(C.done)return n(y,P),bt&&Ha(y,E),w;if(P===null){for(;!C.done;E++,C=b.next())C=d(y,C.value,S),C!==null&&(x=o(C,x,E),O===null?w=C:O.sibling=C,O=C);return bt&&Ha(y,E),w}for(P=r(y,P);!C.done;E++,C=b.next())C=m(P,y,E,C.value,S),C!==null&&(e&&C.alternate!==null&&P.delete(C.key===null?E:C.key),x=o(C,x,E),O===null?w=C:O.sibling=C,O=C);return e&&P.forEach(function(_){return t(y,_)}),bt&&Ha(y,E),w}function g(y,x,b,S){if(typeof b=="object"&&b!==null&&b.type===rl&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case np:e:{for(var w=b.key,O=x;O!==null;){if(O.key===w){if(w=b.type,w===rl){if(O.tag===7){n(y,O.sibling),x=i(O,b.props.children),x.return=y,y=x;break e}}else if(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===$o&&sP(w)===O.type){n(y,O.sibling),x=i(O,b.props),x.ref=xc(y,O,b),x.return=y,y=x;break e}n(y,O);break}else t(y,O);O=O.sibling}b.type===rl?(x=gs(b.props.children,y.mode,S,b.key),x.return=y,y=x):(S=sh(b.type,b.key,b.props,null,y.mode,S),S.ref=xc(y,x,b),S.return=y,y=S)}return a(y);case nl:e:{for(O=b.key;x!==null;){if(x.key===O)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){n(y,x.sibling),x=i(x,b.children||[]),x.return=y,y=x;break e}else{n(y,x);break}else t(y,x);x=x.sibling}x=Av(b,y.mode,S),x.return=y,y=x}return a(y);case $o:return O=b._init,g(y,x,O(b._payload),S)}if(Bc(b))return v(y,x,b,S);if(hc(b))return h(y,x,b,S);pp(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(n(y,x.sibling),x=i(x,b),x.return=y,y=x):(n(y,x),x=Ev(b,y.mode,S),x.return=y,y=x),a(y)):n(y,x)}return g}var Yl=sR(!0),lR=sR(!1),Nh=ja(null),Rh=null,fl=null,E1=null;function A1(){E1=fl=Rh=null}function C1(e){var t=Nh.current;gt(Nh),e._currentValue=t}function ib(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ol(e,t){Rh=e,E1=fl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xn=!0),e.firstContext=null)}function Rr(e){var t=e._currentValue;if(E1!==e)if(e={context:e,memoizedValue:t,next:null},fl===null){if(Rh===null)throw Error(re(308));fl=e,Rh.dependencies={lanes:0,firstContext:e}}else fl=fl.next=e;return t}var Ya=null;function T1(e){Ya===null?Ya=[e]:Ya.push(e)}function uR(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,T1(t)):(n.next=i.next,i.next=n),t.interleaved=n,io(e,r)}function io(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Mo=!1;function _1(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cR(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ke&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,io(e,n)}return i=r.interleaved,i===null?(t.next=t,T1(r)):(t.next=i.next,i.next=t),r.interleaved=t,io(e,n)}function th(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,m1(e,n)}}function lP(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $h(e,t,n,r){var i=e.updateQueue;Mo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;a=0,c=u=l=null,s=o;do{var p=s.lane,m=s.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:m,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,h=s;switch(p=t,m=n,h.tag){case 1:if(v=h.payload,typeof v=="function"){d=v.call(m,d,p);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=h.payload,p=typeof v=="function"?v.call(m,d,p):v,p==null)break e;d=At({},d,p);break e;case 2:Mo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[s]:p.push(s))}else m={eventTime:m,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=m,l=d):c=c.next=m,a|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ps|=a,e.lanes=a,e.memoizedState=d}}function uP(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(re(191,i));i.call(r)}}}var $d={},bi=ja($d),Cf=ja($d),Tf=ja($d);function Qa(e){if(e===$d)throw Error(re(174));return e}function k1(e,t){switch(ct(Tf,t),ct(Cf,e),ct(bi,$d),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lx(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lx(t,e)}gt(bi),ct(bi,t)}function Ql(){gt(bi),gt(Cf),gt(Tf)}function fR(e){Qa(Tf.current);var t=Qa(bi.current),n=Lx(t,e.type);t!==n&&(ct(Cf,e),ct(bi,n))}function N1(e){Cf.current===e&&(gt(bi),gt(Cf))}var Ot=ja(0);function Mh(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bv=[];function R1(){for(var e=0;e<bv.length;e++)bv[e]._workInProgressVersionPrimary=null;bv.length=0}var nh=mo.ReactCurrentDispatcher,wv=mo.ReactCurrentBatchConfig,Os=0,Et=null,zt=null,Yt=null,Ih=!1,tf=!1,_f=0,X4=0;function bn(){throw Error(re(321))}function $1(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zr(e[n],t[n]))return!1;return!0}function M1(e,t,n,r,i,o){if(Os=o,Et=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,nh.current=e===null||e.memoizedState===null?Z4:eU,e=n(r,i),tf){o=0;do{if(tf=!1,_f=0,25<=o)throw Error(re(301));o+=1,Yt=zt=null,t.updateQueue=null,nh.current=tU,e=n(r,i)}while(tf)}if(nh.current=Dh,t=zt!==null&&zt.next!==null,Os=0,Yt=zt=Et=null,Ih=!1,t)throw Error(re(300));return e}function I1(){var e=_f!==0;return _f=0,e}function si(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?Et.memoizedState=Yt=e:Yt=Yt.next=e,Yt}function $r(){if(zt===null){var e=Et.alternate;e=e!==null?e.memoizedState:null}else e=zt.next;var t=Yt===null?Et.memoizedState:Yt.next;if(t!==null)Yt=t,zt=e;else{if(e===null)throw Error(re(310));zt=e,e={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Yt===null?Et.memoizedState=Yt=e:Yt=Yt.next=e}return Yt}function kf(e,t){return typeof t=="function"?t(e):t}function Sv(e){var t=$r(),n=t.queue;if(n===null)throw Error(re(311));n.lastRenderedReducer=e;var r=zt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,l=null,u=o;do{var c=u.lane;if((Os&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,a=r):l=l.next=d,Et.lanes|=c,Ps|=c}u=u.next}while(u!==null&&u!==o);l===null?a=r:l.next=s,Zr(r,t.memoizedState)||(Xn=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Et.lanes|=o,Ps|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function jv(e){var t=$r(),n=t.queue;if(n===null)throw Error(re(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Zr(o,t.memoizedState)||(Xn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function dR(){}function pR(e,t){var n=Et,r=$r(),i=t(),o=!Zr(r.memoizedState,i);if(o&&(r.memoizedState=i,Xn=!0),r=r.queue,D1(gR.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Yt!==null&&Yt.memoizedState.tag&1){if(n.flags|=2048,Nf(9,mR.bind(null,n,r,i,t),void 0,null),Zt===null)throw Error(re(349));Os&30||hR(n,t,i)}return i}function hR(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Et.updateQueue,t===null?(t={lastEffect:null,stores:null},Et.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function mR(e,t,n,r){t.value=n,t.getSnapshot=r,yR(t)&&vR(e)}function gR(e,t,n){return n(function(){yR(t)&&vR(e)})}function yR(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zr(e,n)}catch{return!0}}function vR(e){var t=io(e,1);t!==null&&Yr(t,e,1,-1)}function cP(e){var t=si();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:kf,lastRenderedState:e},t.queue=e,e=e.dispatch=J4.bind(null,Et,e),[t.memoizedState,e]}function Nf(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Et.updateQueue,t===null?(t={lastEffect:null,stores:null},Et.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function xR(){return $r().memoizedState}function rh(e,t,n,r){var i=si();Et.flags|=e,i.memoizedState=Nf(1|t,n,void 0,r===void 0?null:r)}function wg(e,t,n,r){var i=$r();r=r===void 0?null:r;var o=void 0;if(zt!==null){var a=zt.memoizedState;if(o=a.destroy,r!==null&&$1(r,a.deps)){i.memoizedState=Nf(t,n,o,r);return}}Et.flags|=e,i.memoizedState=Nf(1|t,n,o,r)}function fP(e,t){return rh(8390656,8,e,t)}function D1(e,t){return wg(2048,8,e,t)}function bR(e,t){return wg(4,2,e,t)}function wR(e,t){return wg(4,4,e,t)}function SR(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function jR(e,t,n){return n=n!=null?n.concat([e]):null,wg(4,4,SR.bind(null,t,e),n)}function L1(){}function OR(e,t){var n=$r();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&$1(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function PR(e,t){var n=$r();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&$1(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ER(e,t,n){return Os&21?(Zr(n,t)||(n=kN(),Et.lanes|=n,Ps|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xn=!0),e.memoizedState=n)}function Y4(e,t){var n=Je;Je=n!==0&&4>n?n:4,e(!0);var r=wv.transition;wv.transition={};try{e(!1),t()}finally{Je=n,wv.transition=r}}function AR(){return $r().memoizedState}function Q4(e,t,n){var r=aa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},CR(e))TR(t,n);else if(n=uR(e,t,n,r),n!==null){var i=Un();Yr(n,e,r,i),_R(n,t,r)}}function J4(e,t,n){var r=aa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(CR(e))TR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Zr(s,a)){var l=t.interleaved;l===null?(i.next=i,T1(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=uR(e,t,i,r),n!==null&&(i=Un(),Yr(n,e,r,i),_R(n,t,r))}}function CR(e){var t=e.alternate;return e===Et||t!==null&&t===Et}function TR(e,t){tf=Ih=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _R(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,m1(e,n)}}var Dh={readContext:Rr,useCallback:bn,useContext:bn,useEffect:bn,useImperativeHandle:bn,useInsertionEffect:bn,useLayoutEffect:bn,useMemo:bn,useReducer:bn,useRef:bn,useState:bn,useDebugValue:bn,useDeferredValue:bn,useTransition:bn,useMutableSource:bn,useSyncExternalStore:bn,useId:bn,unstable_isNewReconciler:!1},Z4={readContext:Rr,useCallback:function(e,t){return si().memoizedState=[e,t===void 0?null:t],e},useContext:Rr,useEffect:fP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rh(4194308,4,SR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rh(4194308,4,e,t)},useInsertionEffect:function(e,t){return rh(4,2,e,t)},useMemo:function(e,t){var n=si();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=si();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Q4.bind(null,Et,e),[r.memoizedState,e]},useRef:function(e){var t=si();return e={current:e},t.memoizedState=e},useState:cP,useDebugValue:L1,useDeferredValue:function(e){return si().memoizedState=e},useTransition:function(){var e=cP(!1),t=e[0];return e=Y4.bind(null,e[1]),si().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Et,i=si();if(bt){if(n===void 0)throw Error(re(407));n=n()}else{if(n=t(),Zt===null)throw Error(re(349));Os&30||hR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fP(gR.bind(null,r,o,e),[e]),r.flags|=2048,Nf(9,mR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=si(),t=Zt.identifierPrefix;if(bt){var n=Wi,r=Vi;n=(r&~(1<<32-Xr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_f++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=X4++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},eU={readContext:Rr,useCallback:OR,useContext:Rr,useEffect:D1,useImperativeHandle:jR,useInsertionEffect:bR,useLayoutEffect:wR,useMemo:PR,useReducer:Sv,useRef:xR,useState:function(){return Sv(kf)},useDebugValue:L1,useDeferredValue:function(e){var t=$r();return ER(t,zt.memoizedState,e)},useTransition:function(){var e=Sv(kf)[0],t=$r().memoizedState;return[e,t]},useMutableSource:dR,useSyncExternalStore:pR,useId:AR,unstable_isNewReconciler:!1},tU={readContext:Rr,useCallback:OR,useContext:Rr,useEffect:D1,useImperativeHandle:jR,useInsertionEffect:bR,useLayoutEffect:wR,useMemo:PR,useReducer:jv,useRef:xR,useState:function(){return jv(kf)},useDebugValue:L1,useDeferredValue:function(e){var t=$r();return zt===null?t.memoizedState=e:ER(t,zt.memoizedState,e)},useTransition:function(){var e=jv(kf)[0],t=$r().memoizedState;return[e,t]},useMutableSource:dR,useSyncExternalStore:pR,useId:AR,unstable_isNewReconciler:!1};function zr(e,t){if(e&&e.defaultProps){t=At({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ob(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:At({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sg={isMounted:function(e){return(e=e._reactInternals)?Us(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Un(),i=aa(e),o=Yi(r,i);o.payload=t,n!=null&&(o.callback=n),t=ia(e,o,i),t!==null&&(Yr(t,e,i,r),th(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Un(),i=aa(e),o=Yi(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ia(e,o,i),t!==null&&(Yr(t,e,i,r),th(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Un(),r=aa(e),i=Yi(n,r);i.tag=2,t!=null&&(i.callback=t),t=ia(e,i,r),t!==null&&(Yr(t,e,r,n),th(t,e,r))}};function dP(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Of(n,r)||!Of(i,o):!0}function kR(e,t,n){var r=!1,i=ha,o=t.contextType;return typeof o=="object"&&o!==null?o=Rr(o):(i=Jn(t)?Ss:Tn.current,r=t.contextTypes,o=(r=r!=null)?Gl(e,i):ha),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Sg,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function pP(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sg.enqueueReplaceState(t,t.state,null)}function ab(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},_1(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Rr(o):(o=Jn(t)?Ss:Tn.current,i.context=Gl(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(ob(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Sg.enqueueReplaceState(i,i.state,null),$h(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Jl(e,t){try{var n="",r=t;do n+=TB(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
39
|
-
Error generating stack: `+o.message+`
|
|
40
|
-
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Ov(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function sb(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var nU=typeof WeakMap=="function"?WeakMap:Map;function NR(e,t,n){n=Yi(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fh||(Fh=!0,yb=r),sb(e,t)},n}function RR(e,t,n){n=Yi(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){sb(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){sb(e,t),typeof r!="function"&&(oa===null?oa=new Set([this]):oa.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function hP(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new nU;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=gU.bind(null,e,t,n),t.then(e,e))}function mP(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function gP(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Yi(-1,1),t.tag=2,ia(n,t,1))),n.lanes|=1),e)}var rU=mo.ReactCurrentOwner,Xn=!1;function In(e,t,n,r){t.child=e===null?lR(t,null,n,r):Yl(t,e.child,n,r)}function yP(e,t,n,r,i){n=n.render;var o=t.ref;return Ol(t,i),r=M1(e,t,n,r,o,i),n=I1(),e!==null&&!Xn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oo(e,t,i)):(bt&&n&&j1(t),t.flags|=1,In(e,t,r,i),t.child)}function vP(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!q1(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,$R(e,t,o,r,i)):(e=sh(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Of,n(a,r)&&e.ref===t.ref)return oo(e,t,i)}return t.flags|=1,e=sa(o,r),e.ref=t.ref,e.return=t,t.child=e}function $R(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Of(o,r)&&e.ref===t.ref)if(Xn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Xn=!0);else return t.lanes=e.lanes,oo(e,t,i)}return lb(e,t,n,r,i)}function MR(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ct(pl,or),or|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ct(pl,or),or|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ct(pl,or),or|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ct(pl,or),or|=r;return In(e,t,i,n),t.child}function IR(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function lb(e,t,n,r,i){var o=Jn(n)?Ss:Tn.current;return o=Gl(t,o),Ol(t,i),n=M1(e,t,n,r,o,i),r=I1(),e!==null&&!Xn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oo(e,t,i)):(bt&&r&&j1(t),t.flags|=1,In(e,t,n,i),t.child)}function xP(e,t,n,r,i){if(Jn(n)){var o=!0;Th(t)}else o=!1;if(Ol(t,i),t.stateNode===null)ih(e,t),kR(t,n,r),ab(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Rr(u):(u=Jn(n)?Ss:Tn.current,u=Gl(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&pP(t,a,r,u),Mo=!1;var p=t.memoizedState;a.state=p,$h(t,r,a,i),l=t.memoizedState,s!==r||p!==l||Qn.current||Mo?(typeof c=="function"&&(ob(t,n,c,r),l=t.memoizedState),(s=Mo||dP(t,n,s,r,p,l,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,cR(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:zr(t.type,s),a.props=u,d=t.pendingProps,p=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Rr(l):(l=Jn(n)?Ss:Tn.current,l=Gl(t,l));var m=n.getDerivedStateFromProps;(c=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||p!==l)&&pP(t,a,r,l),Mo=!1,p=t.memoizedState,a.state=p,$h(t,r,a,i);var v=t.memoizedState;s!==d||p!==v||Qn.current||Mo?(typeof m=="function"&&(ob(t,n,m,r),v=t.memoizedState),(u=Mo||dP(t,n,u,r,p,v,l)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return ub(e,t,n,r,o,i)}function ub(e,t,n,r,i,o){IR(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&iP(t,n,!1),oo(e,t,o);r=t.stateNode,rU.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Yl(t,e.child,null,o),t.child=Yl(t,null,s,o)):In(e,t,s,o),t.memoizedState=r.state,i&&iP(t,n,!0),t.child}function DR(e){var t=e.stateNode;t.pendingContext?rP(e,t.pendingContext,t.pendingContext!==t.context):t.context&&rP(e,t.context,!1),k1(e,t.containerInfo)}function bP(e,t,n,r,i){return Xl(),P1(i),t.flags|=256,In(e,t,n,r),t.child}var cb={dehydrated:null,treeContext:null,retryLane:0};function fb(e){return{baseLanes:e,cachePool:null,transitions:null}}function LR(e,t,n){var r=t.pendingProps,i=Ot.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ct(Ot,i&1),e===null)return rb(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Pg(a,r,0,null),e=gs(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=fb(n),t.memoizedState=cb,e):F1(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return iU(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=sa(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=sa(s,o):(o=gs(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?fb(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=cb,r}return o=e.child,e=o.sibling,r=sa(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function F1(e,t){return t=Pg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function hp(e,t,n,r){return r!==null&&P1(r),Yl(t,e.child,null,n),e=F1(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iU(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Ov(Error(re(422))),hp(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Pg({mode:"visible",children:r.children},i,0,null),o=gs(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Yl(t,e.child,null,a),t.child.memoizedState=fb(a),t.memoizedState=cb,o);if(!(t.mode&1))return hp(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(re(419)),r=Ov(o,r,void 0),hp(e,t,a,r)}if(s=(a&e.childLanes)!==0,Xn||s){if(r=Zt,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,io(e,i),Yr(r,e,i,-1))}return W1(),r=Ov(Error(re(421))),hp(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=yU.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,lr=ra(i.nextSibling),ur=t,bt=!0,Kr=null,e!==null&&(Pr[Er++]=Vi,Pr[Er++]=Wi,Pr[Er++]=js,Vi=e.id,Wi=e.overflow,js=t),t=F1(t,r.children),t.flags|=4096,t)}function wP(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ib(e.return,t,n)}function Pv(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function FR(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(In(e,t,r.children,n),r=Ot.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wP(e,n,t);else if(e.tag===19)wP(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ct(Ot,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Mh(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Pv(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Mh(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Pv(t,!0,n,null,o);break;case"together":Pv(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ih(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function oo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ps|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(re(153));if(t.child!==null){for(e=t.child,n=sa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function oU(e,t,n){switch(t.tag){case 3:DR(t),Xl();break;case 5:fR(t);break;case 1:Jn(t.type)&&Th(t);break;case 4:k1(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ct(Nh,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ct(Ot,Ot.current&1),t.flags|=128,null):n&t.child.childLanes?LR(e,t,n):(ct(Ot,Ot.current&1),e=oo(e,t,n),e!==null?e.sibling:null);ct(Ot,Ot.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return FR(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ct(Ot,Ot.current),r)break;return null;case 22:case 23:return t.lanes=0,MR(e,t,n)}return oo(e,t,n)}var BR,db,UR,zR;BR=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};db=function(){};UR=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Qa(bi.current);var o=null;switch(n){case"input":i=$x(e,i),r=$x(e,r),o=[];break;case"select":i=At({},i,{value:void 0}),r=At({},r,{value:void 0}),o=[];break;case"textarea":i=Dx(e,i),r=Dx(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ah)}Fx(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(yf.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(yf.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&pt("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};zR=function(e,t,n,r){n!==r&&(t.flags|=4)};function bc(e,t){if(!bt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function wn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function aU(e,t,n){var r=t.pendingProps;switch(O1(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wn(t),null;case 1:return Jn(t.type)&&Ch(),wn(t),null;case 3:return r=t.stateNode,Ql(),gt(Qn),gt(Tn),R1(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(dp(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Kr!==null&&(bb(Kr),Kr=null))),db(e,t),wn(t),null;case 5:N1(t);var i=Qa(Tf.current);if(n=t.type,e!==null&&t.stateNode!=null)UR(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(re(166));return wn(t),null}if(e=Qa(bi.current),dp(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[mi]=t,r[Af]=o,e=(t.mode&1)!==0,n){case"dialog":pt("cancel",r),pt("close",r);break;case"iframe":case"object":case"embed":pt("load",r);break;case"video":case"audio":for(i=0;i<zc.length;i++)pt(zc[i],r);break;case"source":pt("error",r);break;case"img":case"image":case"link":pt("error",r),pt("load",r);break;case"details":pt("toggle",r);break;case"input":_O(r,o),pt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},pt("invalid",r);break;case"textarea":NO(r,o),pt("invalid",r)}Fx(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&fp(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&fp(r.textContent,s,e),i=["children",""+s]):yf.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&pt("scroll",r)}switch(n){case"input":rp(r),kO(r,o,!0);break;case"textarea":rp(r),RO(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Ah)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=gN(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[mi]=t,e[Af]=r,BR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Bx(n,r),n){case"dialog":pt("cancel",e),pt("close",e),i=r;break;case"iframe":case"object":case"embed":pt("load",e),i=r;break;case"video":case"audio":for(i=0;i<zc.length;i++)pt(zc[i],e);i=r;break;case"source":pt("error",e),i=r;break;case"img":case"image":case"link":pt("error",e),pt("load",e),i=r;break;case"details":pt("toggle",e),i=r;break;case"input":_O(e,r),i=$x(e,r),pt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=At({},r,{value:void 0}),pt("invalid",e);break;case"textarea":NO(e,r),i=Dx(e,r),pt("invalid",e);break;default:i=r}Fx(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?xN(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&yN(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&vf(e,l):typeof l=="number"&&vf(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(yf.hasOwnProperty(o)?l!=null&&o==="onScroll"&&pt("scroll",e):l!=null&&u1(e,o,l,a))}switch(n){case"input":rp(e),kO(e,r,!1);break;case"textarea":rp(e),RO(e);break;case"option":r.value!=null&&e.setAttribute("value",""+pa(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?bl(e,!!r.multiple,o,!1):r.defaultValue!=null&&bl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ah)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return wn(t),null;case 6:if(e&&t.stateNode!=null)zR(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(re(166));if(n=Qa(Tf.current),Qa(bi.current),dp(t)){if(r=t.stateNode,n=t.memoizedProps,r[mi]=t,(o=r.nodeValue!==n)&&(e=ur,e!==null))switch(e.tag){case 3:fp(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&fp(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[mi]=t,t.stateNode=r}return wn(t),null;case 13:if(gt(Ot),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(bt&&lr!==null&&t.mode&1&&!(t.flags&128))aR(),Xl(),t.flags|=98560,o=!1;else if(o=dp(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(re(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(re(317));o[mi]=t}else Xl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;wn(t),o=!1}else Kr!==null&&(bb(Kr),Kr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ot.current&1?Vt===0&&(Vt=3):W1())),t.updateQueue!==null&&(t.flags|=4),wn(t),null);case 4:return Ql(),db(e,t),e===null&&Pf(t.stateNode.containerInfo),wn(t),null;case 10:return C1(t.type._context),wn(t),null;case 17:return Jn(t.type)&&Ch(),wn(t),null;case 19:if(gt(Ot),o=t.memoizedState,o===null)return wn(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)bc(o,!1);else{if(Vt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Mh(e),a!==null){for(t.flags|=128,bc(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ct(Ot,Ot.current&1|2),t.child}e=e.sibling}o.tail!==null&&Rt()>Zl&&(t.flags|=128,r=!0,bc(o,!1),t.lanes=4194304)}else{if(!r)if(e=Mh(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),bc(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!bt)return wn(t),null}else 2*Rt()-o.renderingStartTime>Zl&&n!==1073741824&&(t.flags|=128,r=!0,bc(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Rt(),t.sibling=null,n=Ot.current,ct(Ot,r?n&1|2:n&1),t):(wn(t),null);case 22:case 23:return V1(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?or&1073741824&&(wn(t),t.subtreeFlags&6&&(t.flags|=8192)):wn(t),null;case 24:return null;case 25:return null}throw Error(re(156,t.tag))}function sU(e,t){switch(O1(t),t.tag){case 1:return Jn(t.type)&&Ch(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ql(),gt(Qn),gt(Tn),R1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return N1(t),null;case 13:if(gt(Ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(re(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return gt(Ot),null;case 4:return Ql(),null;case 10:return C1(t.type._context),null;case 22:case 23:return V1(),null;case 24:return null;default:return null}}var mp=!1,En=!1,lU=typeof WeakSet=="function"?WeakSet:Set,he=null;function dl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Tt(e,t,r)}else n.current=null}function pb(e,t,n){try{n()}catch(r){Tt(e,t,r)}}var SP=!1;function uU(e,t){if(Yx=Oh,e=KN(),S1(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,p=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===e)break t;if(p===n&&++u===i&&(s=a),p===o&&++c===r&&(l=a),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qx={focusedElem:e,selectionRange:n},Oh=!1,he=t;he!==null;)if(t=he,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,he=e;else for(;he!==null;){t=he;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var h=v.memoizedProps,g=v.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?h:zr(t.type,h),g);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(re(163))}}catch(S){Tt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,he=e;break}he=t.return}return v=SP,SP=!1,v}function nf(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&pb(t,n,o)}i=i.next}while(i!==r)}}function jg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function hb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function HR(e){var t=e.alternate;t!==null&&(e.alternate=null,HR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[mi],delete t[Af],delete t[eb],delete t[W4],delete t[q4])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function VR(e){return e.tag===5||e.tag===3||e.tag===4}function jP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||VR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ah));else if(r!==4&&(e=e.child,e!==null))for(mb(e,t,n),e=e.sibling;e!==null;)mb(e,t,n),e=e.sibling}function gb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gb(e,t,n),e=e.sibling;e!==null;)gb(e,t,n),e=e.sibling}var fn=null,Wr=!1;function To(e,t,n){for(n=n.child;n!==null;)WR(e,t,n),n=n.sibling}function WR(e,t,n){if(xi&&typeof xi.onCommitFiberUnmount=="function")try{xi.onCommitFiberUnmount(mg,n)}catch{}switch(n.tag){case 5:En||dl(n,t);case 6:var r=fn,i=Wr;fn=null,To(e,t,n),fn=r,Wr=i,fn!==null&&(Wr?(e=fn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):fn.removeChild(n.stateNode));break;case 18:fn!==null&&(Wr?(e=fn,n=n.stateNode,e.nodeType===8?vv(e.parentNode,n):e.nodeType===1&&vv(e,n),Sf(e)):vv(fn,n.stateNode));break;case 4:r=fn,i=Wr,fn=n.stateNode.containerInfo,Wr=!0,To(e,t,n),fn=r,Wr=i;break;case 0:case 11:case 14:case 15:if(!En&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&pb(n,t,a),i=i.next}while(i!==r)}To(e,t,n);break;case 1:if(!En&&(dl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Tt(n,t,s)}To(e,t,n);break;case 21:To(e,t,n);break;case 22:n.mode&1?(En=(r=En)||n.memoizedState!==null,To(e,t,n),En=r):To(e,t,n);break;default:To(e,t,n)}}function OP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new lU),t.forEach(function(r){var i=vU.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Br(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:fn=s.stateNode,Wr=!1;break e;case 3:fn=s.stateNode.containerInfo,Wr=!0;break e;case 4:fn=s.stateNode.containerInfo,Wr=!0;break e}s=s.return}if(fn===null)throw Error(re(160));WR(o,a,i),fn=null,Wr=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Tt(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)qR(t,e),t=t.sibling}function qR(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Br(t,e),ai(e),r&4){try{nf(3,e,e.return),jg(3,e)}catch(h){Tt(e,e.return,h)}try{nf(5,e,e.return)}catch(h){Tt(e,e.return,h)}}break;case 1:Br(t,e),ai(e),r&512&&n!==null&&dl(n,n.return);break;case 5:if(Br(t,e),ai(e),r&512&&n!==null&&dl(n,n.return),e.flags&32){var i=e.stateNode;try{vf(i,"")}catch(h){Tt(e,e.return,h)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&hN(i,o),Bx(s,a);var u=Bx(s,o);for(a=0;a<l.length;a+=2){var c=l[a],d=l[a+1];c==="style"?xN(i,d):c==="dangerouslySetInnerHTML"?yN(i,d):c==="children"?vf(i,d):u1(i,c,d,u)}switch(s){case"input":Mx(i,o);break;case"textarea":mN(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?bl(i,!!o.multiple,m,!1):p!==!!o.multiple&&(o.defaultValue!=null?bl(i,!!o.multiple,o.defaultValue,!0):bl(i,!!o.multiple,o.multiple?[]:"",!1))}i[Af]=o}catch(h){Tt(e,e.return,h)}}break;case 6:if(Br(t,e),ai(e),r&4){if(e.stateNode===null)throw Error(re(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(h){Tt(e,e.return,h)}}break;case 3:if(Br(t,e),ai(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Sf(t.containerInfo)}catch(h){Tt(e,e.return,h)}break;case 4:Br(t,e),ai(e);break;case 13:Br(t,e),ai(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(z1=Rt())),r&4&&OP(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(En=(u=En)||c,Br(t,e),En=u):Br(t,e),ai(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(he=e,c=e.child;c!==null;){for(d=he=c;he!==null;){switch(p=he,m=p.child,p.tag){case 0:case 11:case 14:case 15:nf(4,p,p.return);break;case 1:dl(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(h){Tt(r,n,h)}}break;case 5:dl(p,p.return);break;case 22:if(p.memoizedState!==null){EP(d);continue}}m!==null?(m.return=p,he=m):EP(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,l=d.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=vN("display",a))}catch(h){Tt(e,e.return,h)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(h){Tt(e,e.return,h)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Br(t,e),ai(e),r&4&&OP(e);break;case 21:break;default:Br(t,e),ai(e)}}function ai(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(VR(n)){var r=n;break e}n=n.return}throw Error(re(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(vf(i,""),r.flags&=-33);var o=jP(e);gb(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=jP(e);mb(e,s,a);break;default:throw Error(re(161))}}catch(l){Tt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function cU(e,t,n){he=e,KR(e)}function KR(e,t,n){for(var r=(e.mode&1)!==0;he!==null;){var i=he,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||mp;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||En;s=mp;var u=En;if(mp=a,(En=l)&&!u)for(he=i;he!==null;)a=he,l=a.child,a.tag===22&&a.memoizedState!==null?AP(i):l!==null?(l.return=a,he=l):AP(i);for(;o!==null;)he=o,KR(o),o=o.sibling;he=i,mp=s,En=u}PP(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,he=o):PP(e)}}function PP(e){for(;he!==null;){var t=he;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:En||jg(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!En)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:zr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&uP(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}uP(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Sf(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(re(163))}En||t.flags&512&&hb(t)}catch(p){Tt(t,t.return,p)}}if(t===e){he=null;break}if(n=t.sibling,n!==null){n.return=t.return,he=n;break}he=t.return}}function EP(e){for(;he!==null;){var t=he;if(t===e){he=null;break}var n=t.sibling;if(n!==null){n.return=t.return,he=n;break}he=t.return}}function AP(e){for(;he!==null;){var t=he;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{jg(4,t)}catch(l){Tt(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Tt(t,i,l)}}var o=t.return;try{hb(t)}catch(l){Tt(t,o,l)}break;case 5:var a=t.return;try{hb(t)}catch(l){Tt(t,a,l)}}}catch(l){Tt(t,t.return,l)}if(t===e){he=null;break}var s=t.sibling;if(s!==null){s.return=t.return,he=s;break}he=t.return}}var fU=Math.ceil,Lh=mo.ReactCurrentDispatcher,B1=mo.ReactCurrentOwner,kr=mo.ReactCurrentBatchConfig,Ke=0,Zt=null,It=null,pn=0,or=0,pl=ja(0),Vt=0,Rf=null,Ps=0,Og=0,U1=0,rf=null,Gn=null,z1=0,Zl=1/0,Ii=null,Fh=!1,yb=null,oa=null,gp=!1,Xo=null,Bh=0,of=0,vb=null,oh=-1,ah=0;function Un(){return Ke&6?Rt():oh!==-1?oh:oh=Rt()}function aa(e){return e.mode&1?Ke&2&&pn!==0?pn&-pn:G4.transition!==null?(ah===0&&(ah=kN()),ah):(e=Je,e!==0||(e=window.event,e=e===void 0?16:LN(e.type)),e):1}function Yr(e,t,n,r){if(50<of)throw of=0,vb=null,Error(re(185));kd(e,n,r),(!(Ke&2)||e!==Zt)&&(e===Zt&&(!(Ke&2)&&(Og|=n),Vt===4&&Lo(e,pn)),Zn(e,r),n===1&&Ke===0&&!(t.mode&1)&&(Zl=Rt()+500,bg&&Oa()))}function Zn(e,t){var n=e.callbackNode;GB(e,t);var r=jh(e,e===Zt?pn:0);if(r===0)n!==null&&IO(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&IO(n),t===1)e.tag===0?K4(CP.bind(null,e)):rR(CP.bind(null,e)),H4(function(){!(Ke&6)&&Oa()}),n=null;else{switch(NN(r)){case 1:n=h1;break;case 4:n=TN;break;case 16:n=Sh;break;case 536870912:n=_N;break;default:n=Sh}n=t$(n,GR.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function GR(e,t){if(oh=-1,ah=0,Ke&6)throw Error(re(327));var n=e.callbackNode;if(Pl()&&e.callbackNode!==n)return null;var r=jh(e,e===Zt?pn:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Uh(e,r);else{t=r;var i=Ke;Ke|=2;var o=YR();(Zt!==e||pn!==t)&&(Ii=null,Zl=Rt()+500,ms(e,t));do try{hU();break}catch(s){XR(e,s)}while(!0);A1(),Lh.current=o,Ke=i,It!==null?t=0:(Zt=null,pn=0,t=Vt)}if(t!==0){if(t===2&&(i=Wx(e),i!==0&&(r=i,t=xb(e,i))),t===1)throw n=Rf,ms(e,0),Lo(e,r),Zn(e,Rt()),n;if(t===6)Lo(e,r);else{if(i=e.current.alternate,!(r&30)&&!dU(i)&&(t=Uh(e,r),t===2&&(o=Wx(e),o!==0&&(r=o,t=xb(e,o))),t===1))throw n=Rf,ms(e,0),Lo(e,r),Zn(e,Rt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(re(345));case 2:Va(e,Gn,Ii);break;case 3:if(Lo(e,r),(r&130023424)===r&&(t=z1+500-Rt(),10<t)){if(jh(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Un(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Zx(Va.bind(null,e,Gn,Ii),t);break}Va(e,Gn,Ii);break;case 4:if(Lo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Xr(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Rt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fU(r/1960))-r,10<r){e.timeoutHandle=Zx(Va.bind(null,e,Gn,Ii),r);break}Va(e,Gn,Ii);break;case 5:Va(e,Gn,Ii);break;default:throw Error(re(329))}}}return Zn(e,Rt()),e.callbackNode===n?GR.bind(null,e):null}function xb(e,t){var n=rf;return e.current.memoizedState.isDehydrated&&(ms(e,t).flags|=256),e=Uh(e,t),e!==2&&(t=Gn,Gn=n,t!==null&&bb(t)),e}function bb(e){Gn===null?Gn=e:Gn.push.apply(Gn,e)}function dU(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Zr(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Lo(e,t){for(t&=~U1,t&=~Og,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Xr(t),r=1<<n;e[n]=-1,t&=~r}}function CP(e){if(Ke&6)throw Error(re(327));Pl();var t=jh(e,0);if(!(t&1))return Zn(e,Rt()),null;var n=Uh(e,t);if(e.tag!==0&&n===2){var r=Wx(e);r!==0&&(t=r,n=xb(e,r))}if(n===1)throw n=Rf,ms(e,0),Lo(e,t),Zn(e,Rt()),n;if(n===6)throw Error(re(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Va(e,Gn,Ii),Zn(e,Rt()),null}function H1(e,t){var n=Ke;Ke|=1;try{return e(t)}finally{Ke=n,Ke===0&&(Zl=Rt()+500,bg&&Oa())}}function Es(e){Xo!==null&&Xo.tag===0&&!(Ke&6)&&Pl();var t=Ke;Ke|=1;var n=kr.transition,r=Je;try{if(kr.transition=null,Je=1,e)return e()}finally{Je=r,kr.transition=n,Ke=t,!(Ke&6)&&Oa()}}function V1(){or=pl.current,gt(pl)}function ms(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,z4(n)),It!==null)for(n=It.return;n!==null;){var r=n;switch(O1(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ch();break;case 3:Ql(),gt(Qn),gt(Tn),R1();break;case 5:N1(r);break;case 4:Ql();break;case 13:gt(Ot);break;case 19:gt(Ot);break;case 10:C1(r.type._context);break;case 22:case 23:V1()}n=n.return}if(Zt=e,It=e=sa(e.current,null),pn=or=t,Vt=0,Rf=null,U1=Og=Ps=0,Gn=rf=null,Ya!==null){for(t=0;t<Ya.length;t++)if(n=Ya[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}Ya=null}return e}function XR(e,t){do{var n=It;try{if(A1(),nh.current=Dh,Ih){for(var r=Et.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ih=!1}if(Os=0,Yt=zt=Et=null,tf=!1,_f=0,B1.current=null,n===null||n.return===null){Vt=1,Rf=t,It=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=pn,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var m=mP(a);if(m!==null){m.flags&=-257,gP(m,a,s,o,t),m.mode&1&&hP(o,u,t),t=m,l=u;var v=t.updateQueue;if(v===null){var h=new Set;h.add(l),t.updateQueue=h}else v.add(l);break e}else{if(!(t&1)){hP(o,u,t),W1();break e}l=Error(re(426))}}else if(bt&&s.mode&1){var g=mP(a);if(g!==null){!(g.flags&65536)&&(g.flags|=256),gP(g,a,s,o,t),P1(Jl(l,s));break e}}o=l=Jl(l,s),Vt!==4&&(Vt=2),rf===null?rf=[o]:rf.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=NR(o,l,t);lP(o,y);break e;case 1:s=l;var x=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(oa===null||!oa.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=RR(o,s,t);lP(o,S);break e}}o=o.return}while(o!==null)}JR(n)}catch(w){t=w,It===n&&n!==null&&(It=n=n.return);continue}break}while(!0)}function YR(){var e=Lh.current;return Lh.current=Dh,e===null?Dh:e}function W1(){(Vt===0||Vt===3||Vt===2)&&(Vt=4),Zt===null||!(Ps&268435455)&&!(Og&268435455)||Lo(Zt,pn)}function Uh(e,t){var n=Ke;Ke|=2;var r=YR();(Zt!==e||pn!==t)&&(Ii=null,ms(e,t));do try{pU();break}catch(i){XR(e,i)}while(!0);if(A1(),Ke=n,Lh.current=r,It!==null)throw Error(re(261));return Zt=null,pn=0,Vt}function pU(){for(;It!==null;)QR(It)}function hU(){for(;It!==null&&!FB();)QR(It)}function QR(e){var t=e$(e.alternate,e,or);e.memoizedProps=e.pendingProps,t===null?JR(e):It=t,B1.current=null}function JR(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=sU(n,t),n!==null){n.flags&=32767,It=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Vt=6,It=null;return}}else if(n=aU(n,t,or),n!==null){It=n;return}if(t=t.sibling,t!==null){It=t;return}It=t=e}while(t!==null);Vt===0&&(Vt=5)}function Va(e,t,n){var r=Je,i=kr.transition;try{kr.transition=null,Je=1,mU(e,t,n,r)}finally{kr.transition=i,Je=r}return null}function mU(e,t,n,r){do Pl();while(Xo!==null);if(Ke&6)throw Error(re(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(re(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(XB(e,o),e===Zt&&(It=Zt=null,pn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||gp||(gp=!0,t$(Sh,function(){return Pl(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=kr.transition,kr.transition=null;var a=Je;Je=1;var s=Ke;Ke|=4,B1.current=null,uU(e,n),qR(n,e),M4(Qx),Oh=!!Yx,Qx=Yx=null,e.current=n,cU(n),BB(),Ke=s,Je=a,kr.transition=o}else e.current=n;if(gp&&(gp=!1,Xo=e,Bh=i),o=e.pendingLanes,o===0&&(oa=null),HB(n.stateNode),Zn(e,Rt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Fh)throw Fh=!1,e=yb,yb=null,e;return Bh&1&&e.tag!==0&&Pl(),o=e.pendingLanes,o&1?e===vb?of++:(of=0,vb=e):of=0,Oa(),null}function Pl(){if(Xo!==null){var e=NN(Bh),t=kr.transition,n=Je;try{if(kr.transition=null,Je=16>e?16:e,Xo===null)var r=!1;else{if(e=Xo,Xo=null,Bh=0,Ke&6)throw Error(re(331));var i=Ke;for(Ke|=4,he=e.current;he!==null;){var o=he,a=o.child;if(he.flags&16){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(he=u;he!==null;){var c=he;switch(c.tag){case 0:case 11:case 15:nf(8,c,o)}var d=c.child;if(d!==null)d.return=c,he=d;else for(;he!==null;){c=he;var p=c.sibling,m=c.return;if(HR(c),c===u){he=null;break}if(p!==null){p.return=m,he=p;break}he=m}}}var v=o.alternate;if(v!==null){var h=v.child;if(h!==null){v.child=null;do{var g=h.sibling;h.sibling=null,h=g}while(h!==null)}}he=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,he=a;else e:for(;he!==null;){if(o=he,o.flags&2048)switch(o.tag){case 0:case 11:case 15:nf(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,he=y;break e}he=o.return}}var x=e.current;for(he=x;he!==null;){a=he;var b=a.child;if(a.subtreeFlags&2064&&b!==null)b.return=a,he=b;else e:for(a=x;he!==null;){if(s=he,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:jg(9,s)}}catch(w){Tt(s,s.return,w)}if(s===a){he=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,he=S;break e}he=s.return}}if(Ke=i,Oa(),xi&&typeof xi.onPostCommitFiberRoot=="function")try{xi.onPostCommitFiberRoot(mg,e)}catch{}r=!0}return r}finally{Je=n,kr.transition=t}}return!1}function TP(e,t,n){t=Jl(n,t),t=NR(e,t,1),e=ia(e,t,1),t=Un(),e!==null&&(kd(e,1,t),Zn(e,t))}function Tt(e,t,n){if(e.tag===3)TP(e,e,n);else for(;t!==null;){if(t.tag===3){TP(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(oa===null||!oa.has(r))){e=Jl(n,e),e=RR(t,e,1),t=ia(t,e,1),e=Un(),t!==null&&(kd(t,1,e),Zn(t,e));break}}t=t.return}}function gU(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Un(),e.pingedLanes|=e.suspendedLanes&n,Zt===e&&(pn&n)===n&&(Vt===4||Vt===3&&(pn&130023424)===pn&&500>Rt()-z1?ms(e,0):U1|=n),Zn(e,t)}function ZR(e,t){t===0&&(e.mode&1?(t=ap,ap<<=1,!(ap&130023424)&&(ap=4194304)):t=1);var n=Un();e=io(e,t),e!==null&&(kd(e,t,n),Zn(e,n))}function yU(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ZR(e,n)}function vU(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(re(314))}r!==null&&r.delete(t),ZR(e,n)}var e$;e$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qn.current)Xn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xn=!1,oU(e,t,n);Xn=!!(e.flags&131072)}else Xn=!1,bt&&t.flags&1048576&&iR(t,kh,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ih(e,t),e=t.pendingProps;var i=Gl(t,Tn.current);Ol(t,n),i=M1(null,t,r,e,i,n);var o=I1();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Jn(r)?(o=!0,Th(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,_1(t),i.updater=Sg,t.stateNode=i,i._reactInternals=t,ab(t,r,e,n),t=ub(null,t,r,!0,o,n)):(t.tag=0,bt&&o&&j1(t),In(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ih(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=bU(r),e=zr(r,e),i){case 0:t=lb(null,t,r,e,n);break e;case 1:t=xP(null,t,r,e,n);break e;case 11:t=yP(null,t,r,e,n);break e;case 14:t=vP(null,t,r,zr(r.type,e),n);break e}throw Error(re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zr(r,i),lb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zr(r,i),xP(e,t,r,i,n);case 3:e:{if(DR(t),e===null)throw Error(re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,cR(e,t),$h(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Jl(Error(re(423)),t),t=bP(e,t,r,n,i);break e}else if(r!==i){i=Jl(Error(re(424)),t),t=bP(e,t,r,n,i);break e}else for(lr=ra(t.stateNode.containerInfo.firstChild),ur=t,bt=!0,Kr=null,n=lR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Xl(),r===i){t=oo(e,t,n);break e}In(e,t,r,n)}t=t.child}return t;case 5:return fR(t),e===null&&rb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Jx(r,i)?a=null:o!==null&&Jx(r,o)&&(t.flags|=32),IR(e,t),In(e,t,a,n),t.child;case 6:return e===null&&rb(t),null;case 13:return LR(e,t,n);case 4:return k1(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yl(t,null,r,n):In(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zr(r,i),yP(e,t,r,i,n);case 7:return In(e,t,t.pendingProps,n),t.child;case 8:return In(e,t,t.pendingProps.children,n),t.child;case 12:return In(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,ct(Nh,r._currentValue),r._currentValue=a,o!==null)if(Zr(o.value,a)){if(o.children===i.children&&!Qn.current){t=oo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Yi(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ib(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ib(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}In(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ol(t,n),i=Rr(i),r=r(i),t.flags|=1,In(e,t,r,n),t.child;case 14:return r=t.type,i=zr(r,t.pendingProps),i=zr(r.type,i),vP(e,t,r,i,n);case 15:return $R(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zr(r,i),ih(e,t),t.tag=1,Jn(r)?(e=!0,Th(t)):e=!1,Ol(t,n),kR(t,r,i),ab(t,r,i,n),ub(null,t,r,!0,e,n);case 19:return FR(e,t,n);case 22:return MR(e,t,n)}throw Error(re(156,t.tag))};function t$(e,t){return CN(e,t)}function xU(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cr(e,t,n,r){return new xU(e,t,n,r)}function q1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bU(e){if(typeof e=="function")return q1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===f1)return 11;if(e===d1)return 14}return 2}function sa(e,t){var n=e.alternate;return n===null?(n=Cr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function sh(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")q1(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case rl:return gs(n.children,i,o,t);case c1:a=8,i|=8;break;case _x:return e=Cr(12,n,t,i|2),e.elementType=_x,e.lanes=o,e;case kx:return e=Cr(13,n,t,i),e.elementType=kx,e.lanes=o,e;case Nx:return e=Cr(19,n,t,i),e.elementType=Nx,e.lanes=o,e;case fN:return Pg(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uN:a=10;break e;case cN:a=9;break e;case f1:a=11;break e;case d1:a=14;break e;case $o:a=16,r=null;break e}throw Error(re(130,e==null?e:typeof e,""))}return t=Cr(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function gs(e,t,n,r){return e=Cr(7,e,r,t),e.lanes=n,e}function Pg(e,t,n,r){return e=Cr(22,e,r,t),e.elementType=fN,e.lanes=n,e.stateNode={isHidden:!1},e}function Ev(e,t,n){return e=Cr(6,e,null,t),e.lanes=n,e}function Av(e,t,n){return t=Cr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function wU(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sv(0),this.expirationTimes=sv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sv(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function K1(e,t,n,r,i,o,a,s,l){return e=new wU(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Cr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_1(o),e}function SU(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:nl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function n$(e){if(!e)return ha;e=e._reactInternals;e:{if(Us(e)!==e||e.tag!==1)throw Error(re(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Jn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(re(171))}if(e.tag===1){var n=e.type;if(Jn(n))return nR(e,n,t)}return t}function r$(e,t,n,r,i,o,a,s,l){return e=K1(n,r,!0,e,i,o,a,s,l),e.context=n$(null),n=e.current,r=Un(),i=aa(n),o=Yi(r,i),o.callback=t??null,ia(n,o,i),e.current.lanes=i,kd(e,i,r),Zn(e,r),e}function Eg(e,t,n,r){var i=t.current,o=Un(),a=aa(i);return n=n$(n),t.context===null?t.context=n:t.pendingContext=n,t=Yi(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ia(i,t,a),e!==null&&(Yr(e,i,a,o),th(e,i,a)),a}function zh(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function _P(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function G1(e,t){_P(e,t),(e=e.alternate)&&_P(e,t)}function jU(){return null}var i$=typeof reportError=="function"?reportError:function(e){console.error(e)};function X1(e){this._internalRoot=e}Ag.prototype.render=X1.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(re(409));Eg(e,t,null,null)};Ag.prototype.unmount=X1.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Es(function(){Eg(null,e,null,null)}),t[ro]=null}};function Ag(e){this._internalRoot=e}Ag.prototype.unstable_scheduleHydration=function(e){if(e){var t=MN();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Do.length&&t!==0&&t<Do[n].priority;n++);Do.splice(n,0,e),n===0&&DN(e)}};function Y1(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function kP(){}function OU(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=zh(a);o.call(u)}}var a=r$(t,r,e,0,null,!1,!1,"",kP);return e._reactRootContainer=a,e[ro]=a.current,Pf(e.nodeType===8?e.parentNode:e),Es(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=zh(l);s.call(u)}}var l=K1(e,0,!1,null,null,!1,!1,"",kP);return e._reactRootContainer=l,e[ro]=l.current,Pf(e.nodeType===8?e.parentNode:e),Es(function(){Eg(t,l,n,r)}),l}function Tg(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=zh(a);s.call(l)}}Eg(t,a,e,i)}else a=OU(n,t,e,i,r);return zh(a)}RN=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Uc(t.pendingLanes);n!==0&&(m1(t,n|1),Zn(t,Rt()),!(Ke&6)&&(Zl=Rt()+500,Oa()))}break;case 13:Es(function(){var r=io(e,1);if(r!==null){var i=Un();Yr(r,e,1,i)}}),G1(e,1)}};g1=function(e){if(e.tag===13){var t=io(e,134217728);if(t!==null){var n=Un();Yr(t,e,134217728,n)}G1(e,134217728)}};$N=function(e){if(e.tag===13){var t=aa(e),n=io(e,t);if(n!==null){var r=Un();Yr(n,e,t,r)}G1(e,t)}};MN=function(){return Je};IN=function(e,t){var n=Je;try{return Je=e,t()}finally{Je=n}};zx=function(e,t,n){switch(t){case"input":if(Mx(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=xg(r);if(!i)throw Error(re(90));pN(r),Mx(r,i)}}}break;case"textarea":mN(e,n);break;case"select":t=n.value,t!=null&&bl(e,!!n.multiple,t,!1)}};SN=H1;jN=Es;var PU={usingClientEntryPoint:!1,Events:[Rd,sl,xg,bN,wN,H1]},wc={findFiberByHostInstance:Xa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},EU={bundleType:wc.bundleType,version:wc.version,rendererPackageName:wc.rendererPackageName,rendererConfig:wc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=EN(e),e===null?null:e.stateNode},findFiberByHostInstance:wc.findFiberByHostInstance||jU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yp.isDisabled&&yp.supportsFiber)try{mg=yp.inject(EU),xi=yp}catch{}}mr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PU;mr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Y1(t))throw Error(re(200));return SU(e,t,null,n)};mr.createRoot=function(e,t){if(!Y1(e))throw Error(re(299));var n=!1,r="",i=i$;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=K1(e,1,!1,null,null,n,!1,r,i),e[ro]=t.current,Pf(e.nodeType===8?e.parentNode:e),new X1(t)};mr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(re(188)):(e=Object.keys(e).join(","),Error(re(268,e)));return e=EN(t),e=e===null?null:e.stateNode,e};mr.flushSync=function(e){return Es(e)};mr.hydrate=function(e,t,n){if(!Cg(t))throw Error(re(200));return Tg(null,e,t,!0,n)};mr.hydrateRoot=function(e,t,n){if(!Y1(e))throw Error(re(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=i$;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=r$(t,null,e,1,n??null,i,!1,o,a),e[ro]=t.current,Pf(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ag(t)};mr.render=function(e,t,n){if(!Cg(t))throw Error(re(200));return Tg(null,e,t,!1,n)};mr.unmountComponentAtNode=function(e){if(!Cg(e))throw Error(re(40));return e._reactRootContainer?(Es(function(){Tg(null,null,e,!1,function(){e._reactRootContainer=null,e[ro]=null})}),!0):!1};mr.unstable_batchedUpdates=H1;mr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cg(n))throw Error(re(200));if(e==null||e._reactInternals===void 0)throw Error(re(38));return Tg(e,t,n,!1,r)};mr.version="18.3.1-next-f1338f8080-20240426";function o$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o$)}catch(e){console.error(e)}}o$(),oN.exports=mr;var go=oN.exports,a$,NP=go;a$=NP.createRoot,NP.hydrateRoot;const s$=j.createContext(void 0),yo=e=>{const t=j.useContext(s$);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},AU=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(s$.Provider,{value:e,children:t})),CU={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var Bo,n1,Mk,TU=(Mk=class{constructor(){ye(this,Bo,CU);ye(this,n1,!1)}setTimeoutProvider(e){ue(this,Bo,e)}setTimeout(e,t){return F(this,Bo).setTimeout(e,t)}clearTimeout(e){F(this,Bo).clearTimeout(e)}setInterval(e,t){return F(this,Bo).setInterval(e,t)}clearInterval(e){F(this,Bo).clearInterval(e)}},Bo=new WeakMap,n1=new WeakMap,Mk);const Ja=new TU;function _U(e){setTimeout(e,0)}const kU=typeof window>"u"||"Deno"in globalThis;function Dn(){}function NU(e,t){return typeof e=="function"?e(t):e}function l$(e){return typeof e=="number"&&e>=0&&e!==1/0}function u$(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xt(e,t){return typeof e=="function"?e(t):e}function RP(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==Q1(a,t.options))return!1}else if(!eu(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function $P(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(As(t.options.mutationKey)!==As(o))return!1}else if(!eu(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Q1(e,t){return((t==null?void 0:t.queryKeyHashFn)||As)(e)}function As(e){return JSON.stringify(e,(t,n)=>wb(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function eu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let r=0;r<t.length;r++)if(!eu(e[r],t[r]))return!1;return!0}const n=Object.keys(t);for(const r of n)if(!eu(e[r],t[r]))return!1;return!0}return!1}const RU=Object.prototype.hasOwnProperty;function c$(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=MP(e)&&MP(t);if(!r&&!(wb(e)&&wb(t)))return t;const i=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),a=o.length,s=r?new Array(a):{};let l=0;for(let u=0;u<a;u++){const c=r?u:o[u],d=e[c],p=t[c];if(d===p){s[c]=d,(r?u<i:RU.call(e,c))&&l++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){s[c]=p;continue}const m=c$(d,p,n+1);s[c]=m,m===d&&l++}return i===a&&l===i?e:s}function lh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function MP(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wb(e){if(!IP(e))return!1;const t=Object.getPrototypeOf(e),n=t==null?void 0:t.constructor;if(n===void 0)return!0;if(typeof n!="function")return!1;const r=n.prototype;return!(!IP(r)||!r.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function IP(e){return Object.prototype.toString.call(e)==="[object Object]"}function $U(e){return new Promise(t=>{Ja.setTimeout(t,e)})}function Sb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?c$(e,t):t}function MU(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function IU(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}const J1=Symbol();function f$(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===J1?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Z1(e,t){return typeof e=="function"?e(...t):!!e}function DU(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}let LU=()=>kU;const eS=()=>LU();var Fu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},as,Uo,$l,Ik,FU=(Ik=class extends Fu{constructor(){super();ye(this,as);ye(this,Uo);ye(this,$l);ue(this,$l,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Uo)||this.setEventListener(F(this,$l))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Uo))==null||t.call(this),ue(this,Uo,void 0))}setEventListener(t){var n;ue(this,$l,t),(n=F(this,Uo))==null||n.call(this),ue(this,Uo,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,as)!==t&&(ue(this,as,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,as)=="boolean"?F(this,as):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},as=new WeakMap,Uo=new WeakMap,$l=new WeakMap,Ik);const tS=new FU,BU=_U;function UU(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=BU;const o=s=>{t?e.push(s):i(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{o(()=>{s(...l)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}const Ht=UU();var Ml,zo,Il,Dk,zU=(Dk=class extends Fu{constructor(){super();ye(this,Ml,!0);ye(this,zo);ye(this,Il);ue(this,Il,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,zo)||this.setEventListener(F(this,Il))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,zo))==null||t.call(this),ue(this,zo,void 0))}setEventListener(t){var n;ue(this,Il,t),(n=F(this,zo))==null||n.call(this),ue(this,zo,t(this.setOnline.bind(this)))}setOnline(t){F(this,Ml)!==t&&(ue(this,Ml,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return F(this,Ml)}},Ml=new WeakMap,zo=new WeakMap,Il=new WeakMap,Dk);const Hh=new zU;function HU(e){return Math.min(1e3*2**e,3e4)}function d$(e){return(e??"online")==="online"?Hh.isOnline():!0}var jb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function p$(e){let t=!1,n=0,r,i="pending",o,a;const s=new Promise((x,b)=>{o=x,a=b});s.catch(Dn);const l=()=>i!=="pending",u=x=>{var b;if(!l()){const S=new jb(x);h(S),(b=e.onCancel)==null||b.call(e,S)}},c=()=>{t=!0},d=()=>{t=!1},p=()=>tS.isFocused()&&(e.networkMode==="always"||Hh.isOnline())&&e.canRun(),m=()=>d$(e.networkMode)&&e.canRun(),v=x=>{l()||(r==null||r(),i="resolved",o(x))},h=x=>{l()||(r==null||r(),i="rejected",a(x))},g=()=>new Promise(x=>{var b;r=S=>{(l()||p())&&x(S)},(b=e.onPause)==null||b.call(e)}).then(()=>{var x;r=void 0,l()||(x=e.onContinue)==null||x.call(e)}),y=()=>{if(l())return;let x;const b=n===0?e.initialPromise:void 0;try{x=b??e.fn()}catch(S){x=Promise.reject(S)}Promise.resolve(x).then(v).catch(S=>{var A;if(l())return;const w=e.retry??(eS()?0:3),O=e.retryDelay??HU,P=typeof O=="function"?O(n,S):O,E=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,S);if(t||!E){h(S);return}n++,(A=e.onFail)==null||A.call(e,n,S),$U(P).then(()=>p()?void 0:g()).then(()=>{t?h(S):y()})})};return{promise:s,status:()=>i,cancel:u,continue:()=>(r==null||r(),s),cancelRetry:c,continueRetry:d,canStart:m,start:()=>(m()?y():g().then(y),s)}}var ss,Lk,h$=(Lk=class{constructor(){ye(this,ss)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),l$(this.gcTime)&&ue(this,ss,Ja.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(eS()?1/0:3e5))}clearGcTimeout(){F(this,ss)!==void 0&&(Ja.clearTimeout(F(this,ss)),ue(this,ss,void 0))}},ss=new WeakMap,Lk);function VU(e){return{onFetch:(t,n)=>{var c,d,p,m,v;const r=t.options,i=(p=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,o=((m=t.state.data)==null?void 0:m.pages)||[],a=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let h=!1;const g=b=>{DU(b,()=>t.signal,()=>h=!0)},y=f$(t.options,t.fetchOptions),x=async(b,S,w)=>{if(h)return Promise.reject(t.signal.reason);if(S==null&&b.pages.length)return Promise.resolve(b);const P=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return g(T),T})(),E=await y(P),{maxPages:A}=t.options,C=w?IU:MU;return{pages:C(b.pages,E,A),pageParams:C(b.pageParams,S,A)}};if(i&&o.length){const b=i==="backward",S=b?m$:Ob,w={pages:o,pageParams:a};s=await x(w,S(r,w),b)}else{const b=e??o.length;do{const S=l===0?a[0]??r.initialPageParam:Ob(r,s);if(l>0&&S==null)break;s=await x(s,S),l++}while(l<b)}return s};t.options.persister?t.fetchFn=()=>{var h,g;return(g=(h=t.options).persister)==null?void 0:g.call(h,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ob(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function m$(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function WU(e,t){return t?Ob(e,t)!=null:!1}function qU(e,t){return!t||!e.getPreviousPageParam?!1:m$(e,t)!=null}var Dl,ls,Ll,jr,us,Ut,Pd,cs,Hr,$i,Fk,KU=(Fk=class extends h${constructor(t){super();ye(this,Hr);ye(this,Dl);ye(this,ls);ye(this,Ll);ye(this,jr);ye(this,us);ye(this,Ut);ye(this,Pd);ye(this,cs);ue(this,cs,!1),ue(this,Pd,t.defaultOptions),this.setOptions(t.options),this.observers=[],ue(this,us,t.client),ue(this,jr,F(this,us).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ue(this,ls,LP(this.options)),this.state=t.state??F(this,ls),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return F(this,Dl)}get promise(){var t;return(t=F(this,Ut))==null?void 0:t.promise}setOptions(t){if(this.options={...F(this,Pd),...t},t!=null&&t._type&&ue(this,Dl,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=LP(this.options);n.data!==void 0&&(this.setState(DP(n.data,n.dataUpdatedAt)),ue(this,ls,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,jr).remove(this)}setData(t,n){const r=Sb(this.state.data,t,this.options);return Re(this,Hr,$i).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Re(this,Hr,$i).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=F(this,Ut))==null?void 0:r.promise;return(i=F(this,Ut))==null||i.cancel(t),n?n.then(Dn).catch(Dn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return F(this,ls)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>xt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===J1||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>xt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!u$(this.state.dataUpdatedAt,t)}onFocus(){var t,n;(t=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||t.refetch({cancelRefetch:!1}),(n=F(this,Ut))==null||n.continue()}onOnline(){var t,n;(t=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||t.refetch({cancelRefetch:!1}),(n=F(this,Ut))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,jr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&(this.observers.splice(n,1),this.observers.length||(F(this,Ut)&&(F(this,cs)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?F(this,Ut).cancel({revert:!0}):F(this,Ut).cancelRetry()),this.scheduleGc()),F(this,jr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Re(this,Hr,$i).call(this,{type:"invalidate"})}async fetch(t,n){var u,c,d,p,m,v,h,g,y,x,b,S;if(this.state.fetchStatus!=="idle"&&((u=F(this,Ut))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,Ut))return F(this,Ut).continueRetry(),F(this,Ut).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(O=>O.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,i=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ue(this,cs,!0),r.signal)})},o=()=>{const w=f$(this.options,n),P=(()=>{const E={client:F(this,us),queryKey:this.queryKey,meta:this.meta};return i(E),E})();return ue(this,cs,!1),this.options.persister?this.options.persister(w,P,this):w(P)},s=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,us),state:this.state,fetchFn:o};return i(w),w})();(c=F(this,Dl)==="infinite"?VU(this.options.pages):this.options.behavior)==null||c.onFetch(s,this),ue(this,Ll,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=s.fetchOptions)==null?void 0:d.meta))&&Re(this,Hr,$i).call(this,{type:"fetch",meta:(p=s.fetchOptions)==null?void 0:p.meta});const l=ue(this,Ut,p$({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:w=>{w instanceof jb&&w.revert&&this.setState({...F(this,Ll),fetchStatus:"idle"}),r.abort()},onFail:(w,O)=>{Re(this,Hr,$i).call(this,{type:"failed",failureCount:w,error:O})},onPause:()=>{Re(this,Hr,$i).call(this,{type:"pause"})},onContinue:()=>{Re(this,Hr,$i).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const w=await l.start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(v=(m=F(this,jr).config).onSuccess)==null||v.call(m,w,this),(g=(h=F(this,jr).config).onSettled)==null||g.call(h,w,this.state.error,this),w}catch(w){if(w instanceof jb){if(w.silent)return F(this,Ut).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Re(this,Hr,$i).call(this,{type:"error",error:w}),(x=(y=F(this,jr).config).onError)==null||x.call(y,w,this),(S=(b=F(this,jr).config).onSettled)==null||S.call(b,this.state.data,w,this),w}finally{F(this,Ut)===l&&ue(this,Ut,void 0),this.scheduleGc()}}},Dl=new WeakMap,ls=new WeakMap,Ll=new WeakMap,jr=new WeakMap,us=new WeakMap,Ut=new WeakMap,Pd=new WeakMap,cs=new WeakMap,Hr=new WeakSet,$i=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...g$(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...DP(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ue(this,Ll,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ht.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),F(this,jr).notify({query:this,type:"updated",action:t})})},Fk);function g$(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:d$(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function DP(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function LP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $n,Ve,Ed,Mn,fs,Fl,Bi,Ad,Bl,Ul,ds,ps,Ho,zl,Xe,Hc,Pb,Eb,Ab,Cb,Tb,_b,kb,Nb,Bk,y$=(Bk=class extends Fu{constructor(t,n){super();ye(this,Xe);ye(this,$n);ye(this,Ve);ye(this,Ed);ye(this,Mn);ye(this,fs);ye(this,Fl);ye(this,Bi);ye(this,Ad);ye(this,Bl);ye(this,Ul);ye(this,ds);ye(this,ps);ye(this,Ho);ye(this,zl,new Set);this.options=n,ue(this,$n,t),ue(this,Bi,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,Ve).addObserver(this),FP(F(this,Ve),this.options)?Re(this,Xe,Hc).call(this):this.updateResult(),Re(this,Xe,Tb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rb(F(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rb(F(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Re(this,Xe,_b).call(this),Re(this,Xe,kb).call(this),F(this,Ve).removeObserver(this)}setOptions(t){const n=this.options,r=F(this,Ve);if(this.options=F(this,$n).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xt(this.options.enabled,F(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Re(this,Xe,Nb).call(this),F(this,Ve).setOptions(this.options),n._defaulted&&!lh(this.options,n)&&F(this,$n).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,Ve),observer:this});const i=this.hasListeners();i&&BP(F(this,Ve),r,this.options,n)&&Re(this,Xe,Hc).call(this),this.updateResult(),i&&(F(this,Ve)!==r||xt(this.options.enabled,F(this,Ve))!==xt(n.enabled,F(this,Ve))||xt(this.options.staleTime,F(this,Ve))!==xt(n.staleTime,F(this,Ve)))&&Re(this,Xe,Eb).call(this);const o=Re(this,Xe,Ab).call(this);i&&(F(this,Ve)!==r||xt(this.options.enabled,F(this,Ve))!==xt(n.enabled,F(this,Ve))||o!==F(this,Ho))&&Re(this,Xe,Cb).call(this,o)}getOptimisticResult(t){const n=F(this,$n).getQueryCache().build(F(this,$n),t),r=this.createResult(n,t);return lh(this.getCurrentResult(),r)||(ue(this,Mn,r),ue(this,Fl,this.options),ue(this,fs,F(this,Ve).state)),r}getCurrentResult(){return F(this,Mn)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){F(this,zl).add(t)}getCurrentQuery(){return F(this,Ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,$n).defaultQueryOptions(t),r=F(this,$n).getQueryCache().build(F(this,$n),n);let i=()=>{},o;const a=new Promise(s=>{o=s,i=F(this,$n).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===r.queryHash&&r.state.data!==void 0&&(i(),s(this.createResult(r,n)))})});return Promise.race([r.fetch().then(()=>{const s=this.createResult(r,n);return o==null||o(s),s}).finally(()=>{i()}),a])}fetch(t){return Re(this,Xe,Hc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,Mn)))}createResult(t,n){var O;const r=F(this,Ve),i=this.options,o=F(this,Mn),a=F(this,fs),s=F(this,Fl),l=t!==r?t.state:F(this,Ed),{state:u}=t;let c={...u},d=!1,p;if(n._optimisticResults){const P=this.hasListeners(),E=!P&&FP(t,n),A=P&&BP(t,r,n,i);(E||A)&&(c={...c,...g$(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:v,status:h}=c;p=c.data;let g=!1;if(n.placeholderData!==void 0&&p===void 0&&h==="pending"){let P;o!=null&&o.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(P=o.data,g=!0):P=typeof n.placeholderData=="function"?n.placeholderData((O=F(this,Ul))==null?void 0:O.state.data,F(this,Ul)):n.placeholderData,P!==void 0&&(h="success",p=Sb(o==null?void 0:o.data,P,n),d=!0)}if(n.select&&p!==void 0&&!g)if(o&&p===(a==null?void 0:a.data)&&n.select===F(this,Ad))p=F(this,Bl);else try{ue(this,Ad,n.select),p=n.select(p),p=Sb(o==null?void 0:o.data,p,n),ue(this,Bl,p),ue(this,Bi,null)}catch(P){ue(this,Bi,P)}else p===void 0&&ue(this,Bi,null);F(this,Bi)&&(m=F(this,Bi),p=F(this,Bl),v=Date.now(),h="error",d=!1);const y=c.fetchStatus==="fetching",x=h==="pending",b=h==="error",S=x&&y,w=p!==void 0;return{status:h,fetchStatus:c.fetchStatus,isPending:x,isSuccess:h==="success",isError:b,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:v,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:b&&!w,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:b&&w,isStale:nS(t,n),refetch:this.refetch,isEnabled:xt(n.enabled,t)!==!1}}updateResult(){const t=F(this,Mn),n=this.createResult(F(this,Ve),this.options);if(ue(this,fs,F(this,Ve).state),ue(this,Fl,this.options),F(this,fs).data!==void 0&&ue(this,Ul,F(this,Ve)),lh(n,t))return;ue(this,Mn,n);const i=(()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!F(this,zl).size)return!0;const s=new Set(a??F(this,zl));return this.options.throwOnError&&s.add("error"),Object.keys(F(this,Mn)).some(l=>{const u=l;return F(this,Mn)[u]!==t[u]&&s.has(u)})})();Ht.batch(()=>{i&&this.listeners.forEach(o=>{o(F(this,Mn))}),F(this,$n).getQueryCache().notify({query:F(this,Ve),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Re(this,Xe,Tb).call(this)}},$n=new WeakMap,Ve=new WeakMap,Ed=new WeakMap,Mn=new WeakMap,fs=new WeakMap,Fl=new WeakMap,Bi=new WeakMap,Ad=new WeakMap,Bl=new WeakMap,Ul=new WeakMap,ds=new WeakMap,ps=new WeakMap,Ho=new WeakMap,zl=new WeakMap,Xe=new WeakSet,Hc=function(t){Re(this,Xe,Nb).call(this);let n=F(this,Ve).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Dn)),n},Pb=function(t){return!eS()&&xt(this.options.enabled,F(this,Ve))!==!1&&l$(t)},Eb=function(){Re(this,Xe,_b).call(this);const t=xt(this.options.staleTime,F(this,Ve));if(F(this,Mn).isStale||!Re(this,Xe,Pb).call(this,t))return;const n=u$(F(this,Mn).dataUpdatedAt,t)+1;ue(this,ds,Ja.setTimeout(()=>{F(this,Mn).isStale||this.updateResult()},n))},Ab=function(){return xt(this.options.refetchInterval,F(this,Ve))??!1},Cb=function(t){Re(this,Xe,kb).call(this),ue(this,Ho,t),!(F(this,Ho)===0||!Re(this,Xe,Pb).call(this,F(this,Ho)))&&ue(this,ps,Ja.setInterval(()=>{(this.options.refetchIntervalInBackground||tS.isFocused())&&Re(this,Xe,Hc).call(this)},F(this,Ho)))},Tb=function(){Re(this,Xe,Eb).call(this),Re(this,Xe,Cb).call(this,Re(this,Xe,Ab).call(this))},_b=function(){F(this,ds)!==void 0&&(Ja.clearTimeout(F(this,ds)),ue(this,ds,void 0))},kb=function(){F(this,ps)!==void 0&&(Ja.clearInterval(F(this,ps)),ue(this,ps,void 0))},Nb=function(){const t=F(this,$n).getQueryCache().build(F(this,$n),this.options);if(t===F(this,Ve))return;const n=F(this,Ve);ue(this,Ve,t),ue(this,Ed,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Bk);function GU(e,t){return xt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&xt(t.retryOnMount,e)===!1)}function FP(e,t){return GU(e,t)||e.state.data!==void 0&&Rb(e,t,t.refetchOnMount)}function Rb(e,t,n){if(xt(t.enabled,e)!==!1&&xt(t.staleTime,e)!=="static"){const r=xt(n,e);return r==="always"||r!==!1&&nS(e,t)}return!1}function BP(e,t,n,r){return(e!==t||xt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&nS(e,n)}function nS(e,t){return xt(t.enabled,e)!==!1&&e.isStaleByTime(xt(t.staleTime,e))}var XU=class extends y${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var m,v;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:a,isRefetchError:s}=r,l=(v=(m=n.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:v.direction,u=a&&l==="forward",c=i&&l==="forward",d=a&&l==="backward",p=i&&l==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:WU(t,n.data),hasPreviousPage:qU(t,n.data),isFetchNextPageError:u,isFetchingNextPage:c,isFetchPreviousPageError:d,isFetchingPreviousPage:p,isRefetchError:s&&!u&&!d,isRefetching:o&&!c&&!p}}},Cd,fi,Sn,hs,di,No,Uk,YU=(Uk=class extends h${constructor(t){super();ye(this,di);ye(this,Cd);ye(this,fi);ye(this,Sn);ye(this,hs);ue(this,Cd,t.client),this.mutationId=t.mutationId,ue(this,Sn,t.mutationCache),ue(this,fi,[]),this.state=t.state||v$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,fi).includes(t)||(F(this,fi).push(t),this.clearGcTimeout(),F(this,Sn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ue(this,fi,F(this,fi).filter(n=>n!==t)),this.scheduleGc(),F(this,Sn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,fi).length||(this.state.status==="pending"?this.scheduleGc():F(this,Sn).remove(this))}continue(){var t;return((t=F(this,hs))==null?void 0:t.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){var s,l,u,c,d,p,m,v,h,g,y,x,b,S,w,O,P,E;const n=()=>{Re(this,di,No).call(this,{type:"continue"})},r={client:F(this,Cd),meta:this.options.meta,mutationKey:this.options.mutationKey},i=ue(this,hs,p$({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,C)=>{Re(this,di,No).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{Re(this,di,No).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,Sn).canRun(this)})),o=this.state.status==="pending",a=!i.canStart();try{if(o)n();else{Re(this,di,No).call(this,{type:"pending",variables:t,isPaused:a}),F(this,Sn).config.onMutate&&await F(this,Sn).config.onMutate(t,this,r);const C=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t,r));C!==this.state.context&&Re(this,di,No).call(this,{type:"pending",context:C,variables:t,isPaused:a})}const A=await i.start();return await((c=(u=F(this,Sn).config).onSuccess)==null?void 0:c.call(u,A,t,this.state.context,this,r)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,A,t,this.state.context,r)),await((v=(m=F(this,Sn).config).onSettled)==null?void 0:v.call(m,A,null,this.state.variables,this.state.context,this,r)),await((g=(h=this.options).onSettled)==null?void 0:g.call(h,A,null,t,this.state.context,r)),Re(this,di,No).call(this,{type:"success",data:A}),A}catch(A){try{await((x=(y=F(this,Sn).config).onError)==null?void 0:x.call(y,A,t,this.state.context,this,r))}catch(C){Promise.reject(C)}try{await((S=(b=this.options).onError)==null?void 0:S.call(b,A,t,this.state.context,r))}catch(C){Promise.reject(C)}try{await((O=(w=F(this,Sn).config).onSettled)==null?void 0:O.call(w,void 0,A,this.state.variables,this.state.context,this,r))}catch(C){Promise.reject(C)}try{await((E=(P=this.options).onSettled)==null?void 0:E.call(P,void 0,A,t,this.state.context,r))}catch(C){Promise.reject(C)}throw Re(this,di,No).call(this,{type:"error",error:A}),A}finally{F(this,hs)===i&&ue(this,hs,void 0),F(this,Sn).runNext(this)}}},Cd=new WeakMap,fi=new WeakMap,Sn=new WeakMap,hs=new WeakMap,di=new WeakSet,No=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ht.batch(()=>{F(this,fi).forEach(r=>{r.onMutationUpdate(t)}),F(this,Sn).notify({mutation:this,type:"updated",action:t})})},Uk);function v$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ui,Vr,Td,zk,QU=(zk=class extends Fu{constructor(t={}){super();ye(this,Ui);ye(this,Vr);ye(this,Td);this.config=t,ue(this,Ui,new Set),ue(this,Vr,new Map),ue(this,Td,0)}build(t,n,r){const i=new YU({client:t,mutationCache:this,mutationId:++Zd(this,Td)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){F(this,Ui).add(t);const n=vp(t);if(typeof n=="string"){const r=F(this,Vr).get(n);r?r.push(t):F(this,Vr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,Ui).delete(t)){const n=vp(t);if(typeof n=="string"){const r=F(this,Vr).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&F(this,Vr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=vp(t);if(typeof n=="string"){const i=(r=F(this,Vr).get(n))==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r,i;const n=vp(t);return typeof n=="string"?((i=(r=F(this,Vr).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused))==null?void 0:i.continue())??Promise.resolve():Promise.resolve()}clear(){Ht.batch(()=>{F(this,Ui).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,Ui).clear(),F(this,Vr).clear()})}getAll(){return Array.from(F(this,Ui))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>$P(n,r))}findAll(t={}){return this.getAll().filter(n=>$P(t,n))}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ht.batch(()=>Promise.all(t.map(n=>n.continue().catch(Dn))))}},Ui=new WeakMap,Vr=new WeakMap,Td=new WeakMap,zk);function vp(e){var t;return(t=e.options.scope)==null?void 0:t.id}var zi,Vo,jn,Hi,vi,Vc,$b,Hk,JU=(Hk=class extends Fu{constructor(n,r){super();ye(this,vi);ye(this,zi);ye(this,Vo);ye(this,jn);ye(this,Hi);ue(this,zi,n),this.setOptions(r),this.bindMethods(),Re(this,vi,Vc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=F(this,zi).defaultMutationOptions(n),lh(this.options,r)||F(this,zi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,jn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&As(r.mutationKey)!==As(this.options.mutationKey)?this.reset():((i=F(this,jn))==null?void 0:i.state.status)==="pending"&&F(this,jn).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&F(this,jn)&&(F(this,jn).addObserver(this),Re(this,vi,Vc).call(this))}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,jn))==null||n.removeObserver(this)}onMutationUpdate(n){Re(this,vi,Vc).call(this),Re(this,vi,$b).call(this,n)}getCurrentResult(){return F(this,Vo)}reset(){var n;(n=F(this,jn))==null||n.removeObserver(this),ue(this,jn,void 0),Re(this,vi,Vc).call(this),Re(this,vi,$b).call(this)}mutate(n,r){var i;return ue(this,Hi,r),(i=F(this,jn))==null||i.removeObserver(this),ue(this,jn,F(this,zi).getMutationCache().build(F(this,zi),this.options)),F(this,jn).addObserver(this),F(this,jn).execute(n)}},zi=new WeakMap,Vo=new WeakMap,jn=new WeakMap,Hi=new WeakMap,vi=new WeakSet,Vc=function(){var r;const n=((r=F(this,jn))==null?void 0:r.state)??v$();ue(this,Vo,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},$b=function(n){Ht.batch(()=>{var r,i,o,a,s,l,u,c;if(F(this,Hi)&&this.hasListeners()){const d=F(this,Vo).variables,p=F(this,Vo).context,m={client:F(this,zi),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=F(this,Hi)).onSuccess)==null||i.call(r,n.data,d,p,m)}catch(v){Promise.reject(v)}try{(a=(o=F(this,Hi)).onSettled)==null||a.call(o,n.data,null,d,p,m)}catch(v){Promise.reject(v)}}else if((n==null?void 0:n.type)==="error"){try{(l=(s=F(this,Hi)).onError)==null||l.call(s,n.error,d,p,m)}catch(v){Promise.reject(v)}try{(c=(u=F(this,Hi)).onSettled)==null||c.call(u,void 0,n.error,d,p,m)}catch(v){Promise.reject(v)}}}this.listeners.forEach(d=>{d(F(this,Vo))})})},Hk),pi,Vk,ZU=(Vk=class extends Fu{constructor(t={}){super();ye(this,pi);this.config=t,ue(this,pi,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??Q1(i,n);let a=this.get(o);return a||(a=new KU({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){F(this,pi).has(t.queryHash)||(F(this,pi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,pi).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,pi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,pi).get(t)}getAll(){return[...F(this,pi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>RP(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>RP(t,r)):n}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pi=new WeakMap,Vk),jt,Wo,qo,Hl,Vl,Ko,Wl,ql,Wk,e5=(Wk=class{constructor(e={}){ye(this,jt);ye(this,Wo);ye(this,qo);ye(this,Hl);ye(this,Vl);ye(this,Ko);ye(this,Wl);ye(this,ql);ue(this,jt,e.queryCache||new ZU),ue(this,Wo,e.mutationCache||new QU),ue(this,qo,e.defaultOptions||{}),ue(this,Hl,new Map),ue(this,Vl,new Map),ue(this,Ko,0)}mount(){Zd(this,Ko)._++,F(this,Ko)===1&&(ue(this,Wl,tS.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,jt).onFocus())})),ue(this,ql,Hh.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,jt).onOnline())})))}unmount(){var e,t;Zd(this,Ko)._--,F(this,Ko)===0&&((e=F(this,Wl))==null||e.call(this),ue(this,Wl,void 0),(t=F(this,ql))==null||t.call(this),ue(this,ql,void 0))}isFetching(e){return F(this,jt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,Wo).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,jt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,jt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(xt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,jt).findAll(e).map(({queryKey:t,state:n})=>[t,n.data])}setQueryData(e,t,n){var a;const r=this.defaultQueryOptions({queryKey:e}),i=(a=F(this,jt).get(r.queryHash))==null?void 0:a.state.data,o=NU(t,i);if(o!==void 0)return F(this,jt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ht.batch(()=>F(this,jt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,jt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,jt);Ht.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,jt);return Ht.batch(()=>{const r=n.findAll(e),i=new Set(r);return r.forEach(o=>{o.reset()}),this.refetchQueries({type:"active",predicate:o=>i.has(o)},t)})}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ht.batch(()=>F(this,jt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Dn).catch(Dn)}invalidateQueries(e,t={}){return Ht.batch(()=>(F(this,jt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ht.batch(()=>F(this,jt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Dn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Dn)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,jt).build(this,t),r=n.isStaleByTime(xt(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,jt).build(this,t);return n.isStaleByTime(xt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Dn).catch(Dn)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Dn).catch(Dn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Hh.isOnline()?F(this,Wo).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,jt)}getMutationCache(){return F(this,Wo)}getDefaultOptions(){return F(this,qo)}setDefaultOptions(e){ue(this,qo,e)}setQueryDefaults(e,t){F(this,Hl).set(As(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,Hl).values()],n={};return t.forEach(r=>{eu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,Vl).set(As(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,Vl).values()],n={};return t.forEach(r=>{eu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,qo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Q1(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===J1&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,qo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,jt).clear(),F(this,Wo).clear()}},jt=new WeakMap,Wo=new WeakMap,qo=new WeakMap,Hl=new WeakMap,Vl=new WeakMap,Ko=new WeakMap,Wl=new WeakMap,ql=new WeakMap,Wk);const x$=j.createContext(!1),t5=()=>j.useContext(x$);x$.Provider;function n5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const r5=j.createContext(n5()),i5=()=>j.useContext(r5),o5=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Z1(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},a5=e=>{j.useEffect(()=>{e.clearReset()},[e])},s5=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Z1(n,[e.error,r])),l5=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},u5=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,c5=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function b$(e,t,n){const r=t5(),i=i5(),o=yo(),a=o.defaultQueryOptions(e),s=o.getQueryCache().get(a.queryHash),l=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":l?"optimistic":void 0,l5(a),o5(a,i,s),a5(i);const[u]=j.useState(()=>new t(o,a)),c=u.getOptimisticResult(a),d=!r&&l;if(j.useSyncExternalStore(j.useCallback(p=>{const m=d?u.subscribe(Ht.batchCalls(p)):Dn;return u.updateResult(),m},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),j.useEffect(()=>{u.setOptions(a)},[a,u]),u5(a,c))throw c5(a,u,i);if(s5({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:s,suspense:a.suspense}))throw c.error;return a.notifyOnChangeProps?c:u.trackResult(c)}function vt(e,t){return b$(e,y$)}function zs(e,t){const n=yo(),[r]=j.useState(()=>new JU(n,e));j.useEffect(()=>{r.setOptions(e)},[r,e]);const i=j.useSyncExternalStore(j.useCallback(a=>r.subscribe(Ht.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=j.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(Dn)},[r]);if(i.error&&Z1(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function f5(e,t){return b$(e,XU)}/**
|
|
41
|
-
* @remix-run/router v1.23.4
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/function $f(){return $f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$f.apply(null,arguments)}var Yo;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Yo||(Yo={}));const UP="popstate";function d5(e){e===void 0&&(e={});function t(i,o){let{pathname:a="/",search:s="",hash:l=""}=Hs(i.location.hash.substr(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),Mb("",{pathname:a,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){let a=i.document.querySelector("base"),s="";if(a&&a.getAttribute("href")){let l=i.location.href,u=l.indexOf("#");s=u===-1?l:l.slice(0,u)}return s+"#"+(typeof o=="string"?o:Vh(o))}function r(i,o){rS(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return h5(t,n,r,e)}function Nt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function rS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function p5(){return Math.random().toString(36).substr(2,8)}function zP(e,t){return{usr:e.state,key:e.key,idx:t}}function Mb(e,t,n,r){return n===void 0&&(n=null),$f({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Hs(t):t,{state:n,key:t&&t.key||r||p5()})}function Vh(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Hs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function h5(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Yo.Pop,l=null,u=c();u==null&&(u=0,a.replaceState($f({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){s=Yo.Pop;let g=c(),y=g==null?null:g-u;u=g,l&&l({action:s,location:h.location,delta:y})}function p(g,y){s=Yo.Push;let x=Mb(h.location,g,y);n&&n(x,g),u=c()+1;let b=zP(x,u),S=h.createHref(x);try{a.pushState(b,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}o&&l&&l({action:s,location:h.location,delta:1})}function m(g,y){s=Yo.Replace;let x=Mb(h.location,g,y);n&&n(x,g),u=c();let b=zP(x,u),S=h.createHref(x);a.replaceState(b,"",S),o&&l&&l({action:s,location:h.location,delta:0})}function v(g){let y=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof g=="string"?g:Vh(g);return x=x.replace(/ $/,"%20"),Nt(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let h={get action(){return s},get location(){return e(i,a)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(UP,d),l=g,()=>{i.removeEventListener(UP,d),l=null}},createHref(g){return t(i,g)},createURL:v,encodeLocation(g){let y=v(g);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:m,go(g){return a.go(g)}};return h}var HP;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(HP||(HP={}));function m5(e,t,n){return n===void 0&&(n="/"),g5(e,t,n)}function g5(e,t,n,r){let i=typeof t=="string"?Hs(t):t,o=tu(i.pathname||"/",n);if(o==null)return null;let a=w$(e);y5(a);let s=null,l=C5(o);for(let u=0;s==null&&u<a.length;++u)s=E5(a[u],l);return s}function w$(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,a,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(Nt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=la([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(Nt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),w$(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:O5(u,o.index),routesMeta:c})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of S$(o.path))i(o,a,l)}),t}function S$(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=S$(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function y5(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:P5(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const v5=/^:[\w-]+$/,x5=3,b5=2,w5=1,S5=10,j5=-2,VP=e=>e==="*";function O5(e,t){let n=e.split("/"),r=n.length;return n.some(VP)&&(r+=j5),t&&(r+=b5),n.filter(i=>!VP(i)).reduce((i,o)=>i+(v5.test(o)?x5:o===""?w5:S5),r)}function P5(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function E5(e,t,n){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let l=r[s],u=s===r.length-1,c=o==="/"?t:t.slice(o.length)||"/",d=Ib({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),p=l.route;if(!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:la([o,d.pathname]),pathnameBase:k5(la([o,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(o=la([o,d.pathnameBase]))}return a}function Ib(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=A5(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:p,isOptional:m}=c;if(p==="*"){let h=s[d]||"";a=o.slice(0,o.length-h.length).replace(/(.)\/+$/,"$1")}const v=s[d];return m&&!v?u[p]=void 0:u[p]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function A5(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),rS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function C5(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return rS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function tu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function T5(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Hs(e):e,o;return n?(n=P$(n),n.startsWith("/")?o=WP(n.substring(1),"/"):o=WP(n,t)):o=t,{pathname:o,search:N5(r),hash:R5(i)}}function WP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Cv(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function _5(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function j$(e,t){let n=_5(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function O$(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Hs(e):(i=$f({},e),Nt(!i.pathname||!i.pathname.includes("?"),Cv("?","pathname","search",i)),Nt(!i.pathname||!i.pathname.includes("#"),Cv("#","pathname","hash",i)),Nt(!i.search||!i.search.includes("#"),Cv("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=T5(i,s),u=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const P$=e=>e.replace(/\/\/+/g,"/"),la=e=>P$(e.join("/")),k5=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),N5=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,R5=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $5(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const E$=["post","put","patch","delete"];new Set(E$);const M5=["get",...E$];new Set(M5);/**
|
|
50
|
-
* React Router v6.30.6
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/function Mf(){return Mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mf.apply(null,arguments)}const _g=j.createContext(null),A$=j.createContext(null),Pa=j.createContext(null),kg=j.createContext(null),vo=j.createContext({outlet:null,matches:[],isDataRoute:!1}),C$=j.createContext(null);function I5(e,t){let{relative:n}=t===void 0?{}:t;Md()||Nt(!1);let{basename:r,navigator:i}=j.useContext(Pa),{hash:o,pathname:a,search:s}=Rg(e,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:la([r,a])),i.createHref({pathname:l,search:s,hash:o})}function Md(){return j.useContext(kg)!=null}function Bu(){return Md()||Nt(!1),j.useContext(kg).location}function T$(e){j.useContext(Pa).static||j.useLayoutEffect(e)}function Ei(){let{isDataRoute:e}=j.useContext(vo);return e?Q5():D5()}function D5(){Md()||Nt(!1);let e=j.useContext(_g),{basename:t,future:n,navigator:r}=j.useContext(Pa),{matches:i}=j.useContext(vo),{pathname:o}=Bu(),a=JSON.stringify(j$(i,n.v7_relativeSplatPath)),s=j.useRef(!1);return T$(()=>{s.current=!0}),j.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let d=O$(u,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:la([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,o,e])}const L5=j.createContext(null);function F5(e){let t=j.useContext(vo).outlet;return t&&j.createElement(L5.Provider,{value:e},t)}function Ng(){let{matches:e}=j.useContext(vo),t=e[e.length-1];return t?t.params:{}}function Rg(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=j.useContext(Pa),{matches:i}=j.useContext(vo),{pathname:o}=Bu(),a=JSON.stringify(j$(i,r.v7_relativeSplatPath));return j.useMemo(()=>O$(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function B5(e,t){return U5(e,t)}function U5(e,t,n,r){Md()||Nt(!1);let{navigator:i}=j.useContext(Pa),{matches:o}=j.useContext(vo),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=Bu(),c;if(t){var d;let g=typeof t=="string"?Hs(t):t;l==="/"||(d=g.pathname)!=null&&d.startsWith(l)||Nt(!1),c=g}else c=u;let p=c.pathname||"/",m=p;if(l!=="/"){let g=l.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=m5(e,{pathname:m}),h=q5(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:la([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:la([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r);return t&&h?j.createElement(kg.Provider,{value:{location:Mf({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Yo.Pop}},h):h}function z5(){let e=Y5(),t=$5(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),n?j.createElement("pre",{style:i},n):null,null)}const H5=j.createElement(z5,null);class V5 extends j.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?j.createElement(vo.Provider,{value:this.props.routeContext},j.createElement(C$.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function W5(e){let{routeContext:t,match:n,children:r}=e,i=j.useContext(_g);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),j.createElement(vo.Provider,{value:t},r)}function q5(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let c=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);c>=0||Nt(!1),a=a.slice(0,Math.min(a.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<a.length;c++){let d=a[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:p,errors:m}=n,v=d.route.loader&&p[d.route.id]===void 0&&(!m||m[d.route.id]===void 0);if(d.route.lazy||v){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((c,d,p)=>{let m,v=!1,h=null,g=null;n&&(m=s&&d.route.id?s[d.route.id]:void 0,h=d.route.errorElement||H5,l&&(u<0&&p===0?(J5("route-fallback"),v=!0,g=null):u===p&&(v=!0,g=d.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,p+1)),x=()=>{let b;return m?b=h:v?b=g:d.route.Component?b=j.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,j.createElement(W5,{match:d,routeContext:{outlet:c,matches:y,isDataRoute:n!=null},children:b})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?j.createElement(V5,{location:n.location,revalidation:n.revalidation,component:h,error:m,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var _$=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_$||{}),k$=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(k$||{});function K5(e){let t=j.useContext(_g);return t||Nt(!1),t}function G5(e){let t=j.useContext(A$);return t||Nt(!1),t}function X5(e){let t=j.useContext(vo);return t||Nt(!1),t}function N$(e){let t=X5(),n=t.matches[t.matches.length-1];return n.route.id||Nt(!1),n.route.id}function Y5(){var e;let t=j.useContext(C$),n=G5(),r=N$();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Q5(){let{router:e}=K5(_$.UseNavigateStable),t=N$(k$.UseNavigateStable),n=j.useRef(!1);return T$(()=>{n.current=!0}),j.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Mf({fromRouteId:t},o)))},[e,t])}const qP={};function J5(e,t,n){qP[e]||(qP[e]=!0)}function Z5(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ez(e){return F5(e.context)}function un(e){Nt(!1)}function tz(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Yo.Pop,navigator:o,static:a=!1,future:s}=e;Md()&&Nt(!1);let l=t.replace(/^\/*/,"/"),u=j.useMemo(()=>({basename:l,navigator:o,static:a,future:Mf({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);typeof r=="string"&&(r=Hs(r));let{pathname:c="/",search:d="",hash:p="",state:m=null,key:v="default"}=r,h=j.useMemo(()=>{let g=tu(c,l);return g==null?null:{location:{pathname:g,search:d,hash:p,state:m,key:v},navigationType:i}},[l,c,d,p,m,v,i]);return h==null?null:j.createElement(Pa.Provider,{value:u},j.createElement(kg.Provider,{children:n,value:h}))}function nz(e){let{children:t,location:n}=e;return B5(Db(t),n)}new Promise(()=>{});function Db(e,t){t===void 0&&(t=[]);let n=[];return j.Children.forEach(e,(r,i)=>{if(!j.isValidElement(r))return;let o=[...t,i];if(r.type===j.Fragment){n.push.apply(n,Db(r.props.children,o));return}r.type!==un&&Nt(!1),!r.props.index||!r.props.children||Nt(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Db(r.props.children,o)),n.push(a)}),n}/**
|
|
59
|
-
* React Router DOM v6.30.6
|
|
60
|
-
*
|
|
61
|
-
* Copyright (c) Remix Software Inc.
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the MIT license found in the
|
|
64
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
-
*
|
|
66
|
-
* @license MIT
|
|
67
|
-
*/function Wh(){return Wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wh.apply(null,arguments)}function R$(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function rz(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iz(e,t){return e.button===0&&(!t||t==="_self")&&!rz(e)}function Lb(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function oz(e,t){let n=Lb(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const az=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],sz=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],lz="6";try{window.__reactRouterVersion=lz}catch{}const uz=j.createContext({isTransitioning:!1}),cz="startTransition",KP=rN[cz];function fz(e){let{basename:t,children:n,future:r,window:i}=e,o=j.useRef();o.current==null&&(o.current=d5({window:i,v5Compat:!0}));let a=o.current,[s,l]=j.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=j.useCallback(d=>{u&&KP?KP(()=>l(d)):l(d)},[l,u]);return j.useLayoutEffect(()=>a.listen(c),[a,c]),j.useEffect(()=>Z5(r),[r]),j.createElement(tz,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const dz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qh=j.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:u,preventScrollReset:c,viewTransition:d}=t,p=R$(t,az),{basename:m}=j.useContext(Pa),v,h=!1;if(typeof u=="string"&&pz.test(u)&&(v=u,dz))try{let b=new URL(window.location.href),S=u.startsWith("//")?new URL(b.protocol+u):new URL(u),w=tu(S.pathname,m);S.origin===b.origin&&w!=null?u=w+S.search+S.hash:h=!0}catch{}let g=I5(u,{relative:i}),y=mz(u,{replace:a,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:d});function x(b){r&&r(b),b.defaultPrevented||y(b)}return j.createElement("a",Wh({},p,{href:v||g,onClick:h||o?r:x,ref:n,target:l}))}),uh=j.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,viewTransition:u,children:c}=t,d=R$(t,sz),p=Rg(l,{relative:d.relative}),m=Bu(),v=j.useContext(A$),{navigator:h,basename:g}=j.useContext(Pa),y=v!=null&&gz(p)&&u===!0,x=h.encodeLocation?h.encodeLocation(p).pathname:p.pathname,b=m.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(b=b.toLowerCase(),S=S?S.toLowerCase():null,x=x.toLowerCase()),S&&g&&(S=tu(S,g)||S);const w=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let O=b===x||!a&&b.startsWith(x)&&b.charAt(w)==="/",P=S!=null&&(S===x||!a&&S.startsWith(x)&&S.charAt(x.length)==="/"),E={isActive:O,isPending:P,isTransitioning:y},A=O?r:void 0,C;typeof o=="function"?C=o(E):C=[o,O?"active":null,P?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let T=typeof s=="function"?s(E):s;return j.createElement(qh,Wh({},d,{"aria-current":A,className:C,ref:n,style:T,to:l,viewTransition:u}),typeof c=="function"?c(E):c)});var Fb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Fb||(Fb={}));var GP;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(GP||(GP={}));function hz(e){let t=j.useContext(_g);return t||Nt(!1),t}function mz(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=t===void 0?{}:t,l=Ei(),u=Bu(),c=Rg(e,{relative:a});return j.useCallback(d=>{if(iz(d,n)){d.preventDefault();let p=r!==void 0?r:Vh(u)===Vh(c);l(e,{replace:p,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[u,l,c,r,i,n,e,o,a,s])}function $$(e){let t=j.useRef(Lb(e)),n=j.useRef(!1),r=Bu(),i=j.useMemo(()=>oz(r.search,n.current?null:t.current),[r.search]),o=Ei(),a=j.useCallback((s,l)=>{const u=Lb(typeof s=="function"?s(i):s);n.current=!0,o("?"+u,l)},[o,i]);return[i,a]}function gz(e,t){t===void 0&&(t={});let n=j.useContext(uz);n==null&&Nt(!1);let{basename:r}=hz(Fb.useViewTransitionState),i=Rg(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=tu(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=tu(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ib(i.pathname,a)!=null||Ib(i.pathname,o)!=null}const Bb="telescope:access-denied";async function yz(e){if(e.status!==401&&e.status!==403)return null;const t=typeof e.clone=="function"?e.clone():e,n=await Promise.resolve().then(()=>t.json()).catch(()=>null);if(n===null||typeof n!="object"||!("error"in n))return null;const{error:r}=n;if(r!=="unauthenticated"&&r!=="forbidden")return null;const i=n.redirectTo;return{status:e.status,reason:r,...typeof i=="string"?{redirectTo:i}:{}}}function vz(e){if(!(typeof window>"u")){if(e.redirectTo!==void 0){window.location.assign(e.redirectTo);return}window.dispatchEvent(new CustomEvent(Bb,{detail:e}))}}function xz(){var t;const e=typeof window>"u"||(t=window.location)==null?void 0:t.search;return e&&new URLSearchParams(e).get("tenant")||void 0}function bz(e,t){return t===void 0||typeof e!="string"||/[?&]tenant=/.test(e)?e:`${e}${e.includes("?")?"&":"?"}tenant=${encodeURIComponent(t)}`}function wz(){return`${typeof window<"u"&&window.__TELESCOPE_BASE__||"/telescope"}/api`}function Sz(e={}){const t=(e.baseUrl??wz()).replace(/\/$/,""),n=e.fetch??globalThis.fetch,r=e.onAccessDenied??vz,i=e.tenant??xz,o=async(h,g)=>{const y=await n(bz(h,i()),g),x=await yz(y);return x&&r(x),y};async function a(h,g){let y=`${t}${h}`;if(g){const b=new URLSearchParams;for(const[w,O]of Object.entries(g))O!==void 0&&b.set(w,String(O));const S=b.toString();S&&(y+=`?${S}`)}const x=await o(y);if(!x.ok)throw new Error(`Telescope API ${h} failed: ${x.status}`);return await x.json()}async function s(h,g,y){let x=`${t}${h}`;if(g){const S=new URLSearchParams;for(const[O,P]of Object.entries(g))P!==void 0&&S.set(O,String(P));const w=S.toString();w&&(x+=`?${w}`)}const b=await o(x,{method:"POST",headers:{"Content-Type":"application/json"},...y!==void 0?{body:JSON.stringify(y)}:{}});if(!b.ok)throw new Error(`Telescope API ${h} failed: ${b.status}`);return await b.json()}async function l(h){return o(`${t}${h}`)}async function u(h,g){return o(`${t}${h}`,{method:"POST",headers:{"Content-Type":"application/json"},...g!==void 0?{body:JSON.stringify(g)}:{}})}async function c(h){const g=await u("/queries/explain",{entryId:h});return g.ok?{ok:!0,plan:(await g.json()).plan}:{ok:!1,message:await d(g)}}async function d(h){const g=await h.json().then(y=>y).catch(()=>null);return g!==null&&typeof g=="object"&&"message"in g&&typeof g.message=="string"?g.message:`EXPLAIN failed (${h.status})`}async function p(h,g=!1){const y=g?"?force=true":"",x=await u(`/exceptions/${encodeURIComponent(h)}/diagnose${y}`);if(x.ok){const S=await x.json();return{ok:!0,markdown:S.markdown,cached:S.cached}}return{ok:!1,message:await v(x)}}async function m(h){const g=await l(`/exceptions/${encodeURIComponent(h)}/diagnosis`);return g.status===204||g.status===404||!g.ok?null:{markdown:(await g.json()).markdown,cached:!0}}async function v(h){const g=await h.json().then(y=>y).catch(()=>null);return g!==null&&typeof g=="object"&&"message"in g&&typeof g.message=="string"?g.message:`Diagnosis failed (${h.status})`}return{baseUrl:t,entries:(h={})=>a("/entries",{type:h.type,tag:h.tag,traceId:h.traceId,batchId:h.batchId,familyHash:h.familyHash,search:h.search,cursor:h.cursor,limit:h.limit}),entry:h=>a(`/entries/${encodeURIComponent(h)}`),pulse:h=>a("/pulse",{window:h}),queues:h=>a("/queues",{window:h}),timeseries:(h={})=>a("/timeseries",{window:h.window,buckets:h.buckets,type:h.type,tag:h.tag}),traces:(h,g)=>a("/traces",{window:h,limit:g}),waterfall:h=>a(`/traces/${encodeURIComponent(h)}/waterfall`),stats:(h,g)=>a("/stats",{type:h,window:g}),ai:(h,g)=>a("/ai",{window:h,buckets:g==null?void 0:g.buckets,top:g==null?void 0:g.top,limit:g==null?void 0:g.limit}),tags:(h,g)=>{var y;return a("/tags",{prefix:h,search:((y=g==null?void 0:g.search)==null?void 0:y.trim())||void 0,limit:g==null?void 0:g.limit,offset:g==null?void 0:g.offset})},meta:()=>a("/meta"),tenancy:async h=>{const g=h!=null&&h.trim()?`?search=${encodeURIComponent(h.trim())}`:"",y=await l(`/tenancy${g}`);if(y.status===404)return{enabled:!1};if(!y.ok)throw new Error(`Telescope API /tenancy failed: ${y.status}`);return await y.json()},extData:(h,g,y)=>{const x=y&&Object.keys(y).length?`?${new URLSearchParams(y).toString()}`:"";return a(`/ext/${encodeURIComponent(h)}/data/${encodeURIComponent(g)}${x}`)},extAction:async(h,g,y)=>{const x=`/ext/${encodeURIComponent(h)}/actions/${encodeURIComponent(g)}`,b=await o(`${t}${x}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({confirmed:!0,input:y})});if(!b.ok){const S=await b.json().catch(()=>null),w=typeof(S==null?void 0:S.message)=="string"?S.message:`${b.status}`;throw new Error(w)}return await b.json()},serverStats:()=>a("/server-stats"),serverStatsHistory:()=>a("/server-stats/history"),health:()=>a("/health"),retention:()=>a("/retention"),prunes:()=>a("/prunes"),prune:()=>s("/retention/prune"),explain:c,diagnose:p,cachedDiagnosis:m,profilerStatus:()=>a("/profiles/status"),profiles:h=>a("/profiles",{limit:h}),profile:h=>a(`/profiles/${encodeURIComponent(h)}`),armProfile:(h,g)=>s("/profiles/arm",void 0,{count:h,...g?{label:g}:{}}),liveQueues:()=>a("/queues/live"),schedulesLive:()=>a("/schedules/live"),queueCounts:(h,g)=>a(`/queues/live/${encodeURIComponent(h)}/${encodeURIComponent(g)}/counts`),queueJobs:(h,g,y,x={})=>a(`/queues/live/${encodeURIComponent(h)}/${encodeURIComponent(g)}/jobs`,{state:y,cursor:x.cursor,limit:x.limit}),queueJob:(h,g,y)=>a(`/queues/live/${encodeURIComponent(h)}/${encodeURIComponent(g)}/jobs/${encodeURIComponent(y)}`),queueJobAction:(h,g,y,x)=>s(`/queues/live/${encodeURIComponent(h)}/${encodeURIComponent(g)}/jobs/${encodeURIComponent(y)}/${encodeURIComponent(x)}`),queueAction:(h,g,y,x={})=>s(`/queues/live/${encodeURIComponent(h)}/${encodeURIComponent(g)}/actions/${encodeURIComponent(y)}`,{state:x.state}),queueEnqueue:(h,g,y)=>s(`/queues/live/${encodeURIComponent(h)}/${encodeURIComponent(g)}/enqueue`,void 0,y)}}const iS=j.createContext(null),M$=j.createContext(null);function jz({client:e,children:t}){const n=e??Sz(),[r,i]=j.useState(!1),o=j.useMemo(()=>({paused:r,setPaused:i}),[r]);return f.jsx(iS.Provider,{value:n,children:f.jsx(M$.Provider,{value:o,children:t})})}function ze(){const e=j.useContext(iS);if(!e)throw new Error("useTelescopeClient must be used within a TelescopeProvider");return e}function Oz(){return j.useContext(iS)}function I$(){const e=j.useContext(M$);if(!e)throw new Error("useLiveTail must be used within a TelescopeProvider");return e}function tn(){return I$().paused}const kn=3e3,oS=2500;function nn(e,t){return t?!1:e}function Pz(e,t={},n=!1){return{queryKey:["telescope","entries",t],queryFn:()=>e.entries(t),refetchInterval:nn(kn,n)}}function Ez(e,t){return{queryKey:["telescope","entry",t],queryFn:()=>e.entry(t)}}const XP=50;function Az(e,t="",n=""){return{queryKey:["telescope","tags","page",t,n],queryFn:({pageParam:r})=>e.tags(t===""?void 0:t,{search:n,limit:XP,offset:r}),initialPageParam:0,getNextPageParam:(r,i)=>r.length<XP?void 0:i.reduce((o,a)=>o+a.length,0),staleTime:kn}}function Cz(e,t=!1){return{queryKey:["telescope","meta"],queryFn:()=>e.meta(),refetchInterval:nn(kn,t)}}function Tz(e,t,n,r){return{queryKey:["telescope","ext-data",t,n,r],queryFn:()=>e.extData(t,n,r)}}function _z(e,t=!1){return{queryKey:["telescope","server-stats"],queryFn:()=>e.serverStats(),refetchInterval:nn(kn,t)}}function kz(e,t=!1){return{queryKey:["telescope","server-stats-history"],queryFn:()=>e.serverStatsHistory(),refetchInterval:nn(kn,t)}}function Nz(e,t=!1){return{queryKey:["telescope","health"],queryFn:()=>e.health(),refetchInterval:nn(kn,t)}}function D$(){return["telescope","retention"]}function Rz(e,t=!1){return{queryKey:D$(),queryFn:()=>e.retention(),refetchInterval:nn(kn,t)}}function $z(e,t=!1){return{queryKey:["telescope","prunes"],queryFn:()=>e.prunes(),refetchInterval:nn(kn,t)}}function Mz(e,t,n=!1){return{queryKey:["telescope","pulse",t],queryFn:()=>e.pulse(t),refetchInterval:nn(kn,n)}}function Iz(e,t,n,r=!1){return{queryKey:["telescope","stats",t,n],queryFn:()=>e.stats(t,n),refetchInterval:nn(kn,r)}}function Dz(e,t,n=!1){return{queryKey:["telescope","ai",t],queryFn:()=>e.ai(t,{buckets:24,top:8,limit:100}),refetchInterval:nn(kn*3,n)}}function Lz(e,t,n=!1){return{queryKey:["telescope","queues",t],queryFn:()=>e.queues(t),refetchInterval:nn(kn,n)}}function Fz(e,t,n=!1){return{queryKey:["telescope","timeseries",t],queryFn:()=>e.timeseries(t),refetchInterval:nn(kn,n)}}function Bz(e,t,n,r=!1){return{queryKey:["telescope","traces",t,n],queryFn:()=>e.traces(t,n),refetchInterval:nn(kn,r)}}function Uz(e,t){return{queryKey:["telescope","waterfall",t],queryFn:()=>e.waterfall(t),enabled:t!==""}}function L$(){return["telescope","live-queues"]}function aS(e,t){return["telescope","queue-counts",e,t]}function zz(e,t,n,r={}){return["telescope","queue-jobs",e,t,n,r]}function Hz(e,t,n){return["telescope","queue-job",e,t,n]}function Vz(e,t=!1){return{queryKey:L$(),queryFn:()=>e.liveQueues(),refetchInterval:nn(oS,t)}}function Wz(e,t,n,r,i={},o=!1){return{queryKey:zz(t,n,r,i),queryFn:()=>e.queueJobs(t,n,r,i),refetchInterval:nn(oS,o)}}function qz(e,t,n,r){return{queryKey:Hz(t,n,r),queryFn:()=>e.queueJob(t,n,r)}}function Kz(){return["telescope","live-schedules"]}function Gz(e,t=!1){return{queryKey:Kz(),queryFn:()=>e.schedulesLive(),refetchInterval:nn(oS,t)}}function F$(){return vt(Vz(ze(),tn()))}function Xz(){return vt(Gz(ze(),tn()))}function Yz(e,t,n,r={}){return vt(Wz(ze(),e,t,n,r,tn()))}function Qz(e,t,n){return vt(qz(ze(),e,t,n))}function Jz(){const e=ze(),t=yo();return zs({mutationFn:n=>e.queueJobAction(n.driver,n.queue,n.id,n.action),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:aS(r.driver,r.queue)}),t.invalidateQueries({queryKey:["telescope","queue-jobs",r.driver,r.queue]})}})}function B$(){const e=ze(),t=yo();return zs({mutationFn:n=>e.queueAction(n.driver,n.queue,n.action,n.state!==void 0?{state:n.state}:{}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:aS(r.driver,r.queue)}),t.invalidateQueries({queryKey:["telescope","queue-jobs",r.driver,r.queue]})}})}function Zz(){const e=ze(),t=yo();return zs({mutationFn:n=>e.queueEnqueue(n.driver,n.queue,{...n.name!==void 0?{name:n.name}:{},payload:n.payload}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:L$()}),t.invalidateQueries({queryKey:aS(r.driver,r.queue)}),t.invalidateQueries({queryKey:["telescope","queue-jobs",r.driver,r.queue]})}})}function eH(){return vt(Rz(ze(),tn()))}function tH(){return vt($z(ze(),tn()))}function U$(){const e=ze(),t=yo();return zs({mutationFn:()=>e.prune(),onSuccess:()=>{t.invalidateQueries({queryKey:D$()}),t.invalidateQueries({queryKey:["telescope","prunes"]}),t.invalidateQueries({queryKey:["telescope","entries"]})}})}function nH(){const e=ze();return zs({mutationFn:t=>e.explain(t)})}function rH(){const e=ze();return zs({mutationFn:t=>e.diagnose(t.entryId,t.force??!1)})}function iH(e,t,n){return{queryKey:["telescope","cached-diagnosis",t],queryFn:()=>e.cachedDiagnosis(t),enabled:n}}function oH(e,t){return vt(iH(ze(),e,t))}function z$(e={}){return vt(Pz(ze(),e,tn()))}function aH(e){return vt(Ez(ze(),e))}function Ea(){return vt(Cz(ze(),tn()))}function Ub(e=""){const t=ze();return vt({queryKey:["telescope","tenancy",e],queryFn:()=>t.tenancy?t.tenancy(e):Promise.resolve({enabled:!1}),staleTime:3e4})}function sH(){return vt(_z(ze(),tn()))}function lH(){return vt(kz(ze(),tn()))}function uH(e,t,n){return vt(Tz(ze(),e,t,n))}function cH(){return vt(Nz(ze(),tn()))}function fH(e="",t=""){return f5(Az(ze(),e,t))}function dH(e,t){return vt(Iz(ze(),e,t,tn()))}function H$(e){return vt(Mz(ze(),e,tn()))}function pH(e){return vt(Dz(ze(),e,tn()))}function V$(e){return vt(Lz(ze(),e,tn()))}function sS(e){return vt(Fz(ze(),e,tn()))}function hH(e,t){return vt(Bz(ze(),e,t,tn()))}function mH(e){return vt(Uz(ze(),e))}function gH(e,t=!1){return{queryKey:["telescope","profiler-status"],queryFn:()=>e.profilerStatus(),refetchInterval:nn(kn,t)}}function yH(e,t,n=!1){return{queryKey:["telescope","profiles",t],queryFn:()=>e.profiles(t),refetchInterval:nn(kn,n)}}function vH(e,t){return{queryKey:["telescope","profile",t],queryFn:()=>e.profile(t),enabled:t!==""}}function xH(){return vt(gH(ze(),tn()))}function bH(e){return vt(yH(ze(),e,tn()))}function wH(e){return vt(vH(ze(),e))}function SH(){const e=ze(),t=yo();return zs({mutationFn:n=>e.armProfile(n.count,n.label),onSuccess:()=>{t.invalidateQueries({queryKey:["telescope","profiler-status"]})}})}function jH(){const e=yo(),t=ze(),[n,r]=j.useState("connecting");return j.useEffect(()=>{if(typeof EventSource>"u"){r("polling");return}const i=`${t.baseUrl}/stream`,o=new EventSource(i);return o.onopen=()=>r("live"),o.onerror=()=>r("polling"),o.onmessage=a=>{try{const s=JSON.parse(a.data);if(s.heartbeat)return;s.types&&s.types.length>0&&(e.invalidateQueries({queryKey:["telescope","ext-data"]}),e.invalidateQueries({queryKey:["telescope","meta"]}))}catch{}},()=>o.close()},[e,t.baseUrl]),{status:n}}const nu=[{id:"request",label:"Requests",dot:"bg-emerald-400"},{id:"query",label:"Queries",dot:"bg-sky-400"},{id:"exception",label:"Exceptions",dot:"bg-red-400"},{id:"client_exception",label:"Client errors",dot:"bg-orange-500"},{id:"job",label:"Jobs",dot:"bg-violet-400"},{id:"durable",label:"Workflows",dot:"bg-purple-400"},{id:"mail",label:"Mail",dot:"bg-pink-400"},{id:"cache",label:"Cache",dot:"bg-teal-400"},{id:"schedule",label:"Schedule",dot:"bg-orange-400",query:{type:"job",tag:"schedule"}},{id:"http_client",label:"HTTP Client",dot:"bg-amber-400"},{id:"dump",label:"Dumps",dot:"bg-fuchsia-400"},{id:"event",label:"Events",dot:"bg-indigo-400"},{id:"log",label:"Logs",dot:"bg-zinc-400"},{id:"model",label:"Models",dot:"bg-lime-400"},{id:"redis",label:"Redis",dot:"bg-rose-400"},{id:"inertia",label:"Inertia",dot:"bg-cyan-400"},{id:"span",label:"Spans",dot:"bg-slate-400"},{id:"resilience",label:"Resilience",dot:"bg-yellow-400"},{id:"workflow",label:"Nest workflows",dot:"bg-purple-300"},{id:"auth",label:"Auth",dot:"bg-red-300"}],OH="bg-zinc-500",$g=Object.fromEntries(nu.map(e=>[e.id,e]));function lS(e){var t;return((t=$g[e])==null?void 0:t.dot)??OH}function Mg(e){var t;return((t=$g[e])==null?void 0:t.label)??e}function PH(e){return e in $g}function W$(e){var t;return((t=$g[e])==null?void 0:t.query)??{type:e}}const EH=new Set(["request","exception"]);function AH(e){const t=(e??[]).map(r=>({id:r.id,label:r.label,dot:r.dot})),n=new Set(nu.map(r=>r.id));return[...nu,...t.filter(r=>!n.has(r.id))]}function CH(e,t){if(t===void 0)return[...e];const n=new Set(t);return e.filter(r=>{var o;if(EH.has(r.id))return!0;const i=((o=r.query)==null?void 0:o.type)??r.id;return n.has(r.id)||n.has(i)})}function q$(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=q$(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Te(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=q$(e))&&(r&&(r+=" "),r+=t);return r}const uS="-",TH=e=>{const t=kH(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(uS);return s[0]===""&&s.length!==1&&s.shift(),K$(s,t)||_H(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},K$=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?K$(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(uS);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},YP=/^\[(.+)\]$/,_H=e=>{if(YP.test(e)){const t=YP.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},kH=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return RH(Object.entries(e.classGroups),n).forEach(([o,a])=>{zb(a,r,o,t)}),r},zb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:QP(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(NH(i)){zb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{zb(a,QP(t,o),n,r)})})},QP=(e,t)=>{let n=e;return t.split(uS).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},NH=e=>e.isThemeGetter,RH=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,$H=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},G$="!",MH=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const l=[];let u=0,c=0,d;for(let g=0;g<s.length;g++){let y=s[g];if(u===0){if(y===i&&(r||s.slice(g,g+o)===t)){l.push(s.slice(c,g)),c=g+o;continue}if(y==="/"){d=g;continue}}y==="["?u++:y==="]"&&u--}const p=l.length===0?s:s.substring(c),m=p.startsWith(G$),v=m?p.substring(1):p,h=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:h}};return n?s=>n({className:s,parseClassName:a}):a},IH=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},DH=e=>({cache:$H(e.cacheSize),parseClassName:MH(e),...TH(e)}),LH=/\s+/,FH=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(LH);let s="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:c,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}=n(u);let v=!!m,h=r(v?p.substring(0,m):p);if(!h){if(!v){s=u+(s.length>0?" "+s:s);continue}if(h=r(p),!h){s=u+(s.length>0?" "+s:s);continue}v=!1}const g=IH(c).join(":"),y=d?g+G$:g,x=y+h;if(o.includes(x))continue;o.push(x);const b=i(h,v);for(let S=0;S<b.length;++S){const w=b[S];o.push(y+w)}s=u+(s.length>0?" "+s:s)}return s};function BH(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=X$(t))&&(r&&(r+=" "),r+=n);return r}const X$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=X$(e[r]))&&(n&&(n+=" "),n+=t);return n};function UH(e,...t){let n,r,i,o=a;function a(l){const u=t.reduce((c,d)=>d(c),e());return n=DH(u),r=n.cache.get,i=n.cache.set,o=s,s(l)}function s(l){const u=r(l);if(u)return u;const c=FH(l,n);return i(l,c),c}return function(){return o(BH.apply(null,arguments))}}const dt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Y$=/^\[(?:([a-z-]+):)?(.+)\]$/i,zH=/^\d+\/\d+$/,HH=new Set(["px","full","screen"]),VH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,KH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ni=e=>El(e)||HH.has(e)||zH.test(e),_o=e=>Uu(e,"length",nV),El=e=>!!e&&!Number.isNaN(Number(e)),Tv=e=>Uu(e,"number",El),Sc=e=>!!e&&Number.isInteger(Number(e)),XH=e=>e.endsWith("%")&&El(e.slice(0,-1)),$e=e=>Y$.test(e),ko=e=>VH.test(e),YH=new Set(["length","size","percentage"]),QH=e=>Uu(e,YH,Q$),JH=e=>Uu(e,"position",Q$),ZH=new Set(["image","url"]),eV=e=>Uu(e,ZH,iV),tV=e=>Uu(e,"",rV),jc=()=>!0,Uu=(e,t,n)=>{const r=Y$.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},nV=e=>WH.test(e)&&!qH.test(e),Q$=()=>!1,rV=e=>KH.test(e),iV=e=>GH.test(e),oV=()=>{const e=dt("colors"),t=dt("spacing"),n=dt("blur"),r=dt("brightness"),i=dt("borderColor"),o=dt("borderRadius"),a=dt("borderSpacing"),s=dt("borderWidth"),l=dt("contrast"),u=dt("grayscale"),c=dt("hueRotate"),d=dt("invert"),p=dt("gap"),m=dt("gradientColorStops"),v=dt("gradientColorStopPositions"),h=dt("inset"),g=dt("margin"),y=dt("opacity"),x=dt("padding"),b=dt("saturate"),S=dt("scale"),w=dt("sepia"),O=dt("skew"),P=dt("space"),E=dt("translate"),A=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",$e,t],_=()=>[$e,t],k=()=>["",Ni,_o],$=()=>["auto",El,$e],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",$e],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[El,$e];return{cacheSize:500,separator:":",theme:{colors:[jc],spacing:[Ni,_o],blur:["none","",ko,$e],brightness:z(),borderColor:[e],borderRadius:["none","","full",ko,$e],borderSpacing:_(),borderWidth:k(),contrast:z(),grayscale:L(),hueRotate:z(),invert:L(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[XH,_o],inset:T(),margin:T(),opacity:z(),padding:_(),saturate:z(),scale:z(),sepia:L(),skew:z(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[ko]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...R(),$e]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sc,$e]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",Sc,$e]}],"grid-cols":[{"grid-cols":[jc]}],"col-start-end":[{col:["auto",{span:["full",Sc,$e]},$e]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[jc]}],"row-start-end":[{row:["auto",{span:[Sc,$e]},$e]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[ko]},ko]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ko,_o]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Tv]}],"font-family":[{font:[jc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",El,Tv]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ni,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ni,_o]}],"underline-offset":[{"underline-offset":["auto",Ni,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),JH]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",QH]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},eV]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[Ni,$e]}],"outline-w":[{outline:[Ni,_o]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ni,_o]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ko,tV]}],"shadow-color":[{shadow:[jc]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ko,$e]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Sc,$e]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ni,_o,Tv]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},aV=UH(oV);function yt(...e){return aV(Te(e))}const JP=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ZP=Te,J$=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ZP(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=o==null?void 0:o[u];if(c===null)return null;const p=JP(c)||JP(d);return i[u][p]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:p,...m}=c;return Object.entries(m).every(v=>{let[h,g]=v;return Array.isArray(g)?g.includes({...o,...s}[h]):{...o,...s}[h]===g})?[...u,d,p]:u},[]);return ZP(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},cS=J$("inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[10px] font-medium",{variants:{variant:{muted:"tint-muted",brand:"tint-brand",good:"tint-good",warn:"tint-warn",bad:"tint-bad",outline:"border-line bg-transparent text-muted-foreground"}},defaultVariants:{variant:"muted"}});function Al({className:e,variant:t,...n}){return f.jsx("span",{className:yt(cS({variant:t}),e),...n})}const sV=J$("inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded border font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{outline:"border-line bg-transparent text-foreground hover:bg-panel-2",ghost:"border-transparent bg-transparent text-muted-foreground hover:bg-panel-2 hover:text-foreground",solid:"border-transparent bg-primary text-primary-foreground hover:opacity-90",brand:"tint-brand hover:brightness-125",good:"tint-good hover:brightness-125",warn:"tint-warn hover:brightness-125",bad:"tint-bad hover:brightness-125"},size:{xs:"px-2 py-0.5 text-[10px] uppercase tracking-wide",sm:"px-2.5 py-1 text-xs",md:"px-3 py-1.5 text-sm"}},defaultVariants:{variant:"outline",size:"sm"}}),Qe=j.forwardRef(function({className:t,variant:n,size:r,type:i="button",...o},a){return f.jsx("button",{ref:a,type:i,className:yt(sV({variant:n,size:r}),t),...o})});var lV=Array.isArray,tr=lV,uV=typeof ep=="object"&&ep&&ep.Object===Object&&ep,Z$=uV,cV=Z$,fV=typeof self=="object"&&self&&self.Object===Object&&self,dV=cV||fV||Function("return this")(),Ai=dV,pV=Ai,hV=pV.Symbol,Id=hV,eE=Id,eM=Object.prototype,mV=eM.hasOwnProperty,gV=eM.toString,Oc=eE?eE.toStringTag:void 0;function yV(e){var t=mV.call(e,Oc),n=e[Oc];try{e[Oc]=void 0;var r=!0}catch{}var i=gV.call(e);return r&&(t?e[Oc]=n:delete e[Oc]),i}var vV=yV,xV=Object.prototype,bV=xV.toString;function wV(e){return bV.call(e)}var SV=wV,tE=Id,jV=vV,OV=SV,PV="[object Null]",EV="[object Undefined]",nE=tE?tE.toStringTag:void 0;function AV(e){return e==null?e===void 0?EV:PV:nE&&nE in Object(e)?jV(e):OV(e)}var xo=AV;function CV(e){return e!=null&&typeof e=="object"}var bo=CV,TV=xo,_V=bo,kV="[object Symbol]";function NV(e){return typeof e=="symbol"||_V(e)&&TV(e)==kV}var zu=NV,RV=tr,$V=zu,MV=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IV=/^\w*$/;function DV(e,t){if(RV(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||$V(e)?!0:IV.test(e)||!MV.test(e)||t!=null&&e in Object(t)}var fS=DV;function LV(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Aa=LV;const Hu=Ze(Aa);var FV=xo,BV=Aa,UV="[object AsyncFunction]",zV="[object Function]",HV="[object GeneratorFunction]",VV="[object Proxy]";function WV(e){if(!BV(e))return!1;var t=FV(e);return t==zV||t==HV||t==UV||t==VV}var dS=WV;const je=Ze(dS);var qV=Ai,KV=qV["__core-js_shared__"],GV=KV,_v=GV,rE=function(){var e=/[^.]+$/.exec(_v&&_v.keys&&_v.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function XV(e){return!!rE&&rE in e}var YV=XV,QV=Function.prototype,JV=QV.toString;function ZV(e){if(e!=null){try{return JV.call(e)}catch{}try{return e+""}catch{}}return""}var tM=ZV,eW=dS,tW=YV,nW=Aa,rW=tM,iW=/[\\^$.*+?()[\]{}|]/g,oW=/^\[object .+?Constructor\]$/,aW=Function.prototype,sW=Object.prototype,lW=aW.toString,uW=sW.hasOwnProperty,cW=RegExp("^"+lW.call(uW).replace(iW,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fW(e){if(!nW(e)||tW(e))return!1;var t=eW(e)?cW:oW;return t.test(rW(e))}var dW=fW;function pW(e,t){return e==null?void 0:e[t]}var hW=pW,mW=dW,gW=hW;function yW(e,t){var n=gW(e,t);return mW(n)?n:void 0}var Vs=yW,vW=Vs,xW=vW(Object,"create"),Ig=xW,iE=Ig;function bW(){this.__data__=iE?iE(null):{},this.size=0}var wW=bW;function SW(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var jW=SW,OW=Ig,PW="__lodash_hash_undefined__",EW=Object.prototype,AW=EW.hasOwnProperty;function CW(e){var t=this.__data__;if(OW){var n=t[e];return n===PW?void 0:n}return AW.call(t,e)?t[e]:void 0}var TW=CW,_W=Ig,kW=Object.prototype,NW=kW.hasOwnProperty;function RW(e){var t=this.__data__;return _W?t[e]!==void 0:NW.call(t,e)}var $W=RW,MW=Ig,IW="__lodash_hash_undefined__";function DW(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=MW&&t===void 0?IW:t,this}var LW=DW,FW=wW,BW=jW,UW=TW,zW=$W,HW=LW;function Vu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vu.prototype.clear=FW;Vu.prototype.delete=BW;Vu.prototype.get=UW;Vu.prototype.has=zW;Vu.prototype.set=HW;var VW=Vu;function WW(){this.__data__=[],this.size=0}var qW=WW;function KW(e,t){return e===t||e!==e&&t!==t}var pS=KW,GW=pS;function XW(e,t){for(var n=e.length;n--;)if(GW(e[n][0],t))return n;return-1}var Dg=XW,YW=Dg,QW=Array.prototype,JW=QW.splice;function ZW(e){var t=this.__data__,n=YW(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():JW.call(t,n,1),--this.size,!0}var e6=ZW,t6=Dg;function n6(e){var t=this.__data__,n=t6(t,e);return n<0?void 0:t[n][1]}var r6=n6,i6=Dg;function o6(e){return i6(this.__data__,e)>-1}var a6=o6,s6=Dg;function l6(e,t){var n=this.__data__,r=s6(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var u6=l6,c6=qW,f6=e6,d6=r6,p6=a6,h6=u6;function Wu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wu.prototype.clear=c6;Wu.prototype.delete=f6;Wu.prototype.get=d6;Wu.prototype.has=p6;Wu.prototype.set=h6;var Lg=Wu,m6=Vs,g6=Ai,y6=m6(g6,"Map"),hS=y6,oE=VW,v6=Lg,x6=hS;function b6(){this.size=0,this.__data__={hash:new oE,map:new(x6||v6),string:new oE}}var w6=b6;function S6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var j6=S6,O6=j6;function P6(e,t){var n=e.__data__;return O6(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Fg=P6,E6=Fg;function A6(e){var t=E6(this,e).delete(e);return this.size-=t?1:0,t}var C6=A6,T6=Fg;function _6(e){return T6(this,e).get(e)}var k6=_6,N6=Fg;function R6(e){return N6(this,e).has(e)}var $6=R6,M6=Fg;function I6(e,t){var n=M6(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var D6=I6,L6=w6,F6=C6,B6=k6,U6=$6,z6=D6;function qu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}qu.prototype.clear=L6;qu.prototype.delete=F6;qu.prototype.get=B6;qu.prototype.has=U6;qu.prototype.set=z6;var mS=qu,nM=mS,H6="Expected a function";function gS(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(H6);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(gS.Cache||nM),n}gS.Cache=nM;var rM=gS;const V6=Ze(rM);var W6=rM,q6=500;function K6(e){var t=W6(e,function(r){return n.size===q6&&n.clear(),r}),n=t.cache;return t}var G6=K6,X6=G6,Y6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q6=/\\(\\)?/g,J6=X6(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Y6,function(n,r,i,o){t.push(i?o.replace(Q6,"$1"):r||n)}),t}),Z6=J6;function e8(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var yS=e8,aE=Id,t8=yS,n8=tr,r8=zu,sE=aE?aE.prototype:void 0,lE=sE?sE.toString:void 0;function iM(e){if(typeof e=="string")return e;if(n8(e))return t8(e,iM)+"";if(r8(e))return lE?lE.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var i8=iM,o8=i8;function a8(e){return e==null?"":o8(e)}var oM=a8,s8=tr,l8=fS,u8=Z6,c8=oM;function f8(e,t){return s8(e)?e:l8(e,t)?[e]:u8(c8(e))}var aM=f8,d8=zu;function p8(e){if(typeof e=="string"||d8(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Bg=p8,h8=aM,m8=Bg;function g8(e,t){t=h8(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[m8(t[n++])];return n&&n==r?e:void 0}var vS=g8,y8=vS;function v8(e,t,n){var r=e==null?void 0:y8(e,t);return r===void 0?n:r}var sM=v8;const cr=Ze(sM);function x8(e){return e==null}var b8=x8;const Ne=Ze(b8);var w8=xo,S8=tr,j8=bo,O8="[object String]";function P8(e){return typeof e=="string"||!S8(e)&&j8(e)&&w8(e)==O8}var E8=P8;const Cs=Ze(E8);var lM={exports:{}},et={};/**
|
|
68
|
-
* @license React
|
|
69
|
-
* react-is.production.min.js
|
|
70
|
-
*
|
|
71
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the MIT license found in the
|
|
74
|
-
* LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/var xS=Symbol.for("react.element"),bS=Symbol.for("react.portal"),Ug=Symbol.for("react.fragment"),zg=Symbol.for("react.strict_mode"),Hg=Symbol.for("react.profiler"),Vg=Symbol.for("react.provider"),Wg=Symbol.for("react.context"),A8=Symbol.for("react.server_context"),qg=Symbol.for("react.forward_ref"),Kg=Symbol.for("react.suspense"),Gg=Symbol.for("react.suspense_list"),Xg=Symbol.for("react.memo"),Yg=Symbol.for("react.lazy"),C8=Symbol.for("react.offscreen"),uM;uM=Symbol.for("react.module.reference");function Ir(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case xS:switch(e=e.type,e){case Ug:case Hg:case zg:case Kg:case Gg:return e;default:switch(e=e&&e.$$typeof,e){case A8:case Wg:case qg:case Yg:case Xg:case Vg:return e;default:return t}}case bS:return t}}}et.ContextConsumer=Wg;et.ContextProvider=Vg;et.Element=xS;et.ForwardRef=qg;et.Fragment=Ug;et.Lazy=Yg;et.Memo=Xg;et.Portal=bS;et.Profiler=Hg;et.StrictMode=zg;et.Suspense=Kg;et.SuspenseList=Gg;et.isAsyncMode=function(){return!1};et.isConcurrentMode=function(){return!1};et.isContextConsumer=function(e){return Ir(e)===Wg};et.isContextProvider=function(e){return Ir(e)===Vg};et.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===xS};et.isForwardRef=function(e){return Ir(e)===qg};et.isFragment=function(e){return Ir(e)===Ug};et.isLazy=function(e){return Ir(e)===Yg};et.isMemo=function(e){return Ir(e)===Xg};et.isPortal=function(e){return Ir(e)===bS};et.isProfiler=function(e){return Ir(e)===Hg};et.isStrictMode=function(e){return Ir(e)===zg};et.isSuspense=function(e){return Ir(e)===Kg};et.isSuspenseList=function(e){return Ir(e)===Gg};et.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ug||e===Hg||e===zg||e===Kg||e===Gg||e===C8||typeof e=="object"&&e!==null&&(e.$$typeof===Yg||e.$$typeof===Xg||e.$$typeof===Vg||e.$$typeof===Wg||e.$$typeof===qg||e.$$typeof===uM||e.getModuleId!==void 0)};et.typeOf=Ir;lM.exports=et;var T8=lM.exports,_8=xo,k8=bo,N8="[object Number]";function R8(e){return typeof e=="number"||k8(e)&&_8(e)==N8}var cM=R8;const $8=Ze(cM);var M8=cM;function I8(e){return M8(e)&&e!=+e}var D8=I8;const Ku=Ze(D8);var Jt=function(t){return t===0?0:t>0?1:-1},Za=function(t){return Cs(t)&&t.indexOf("%")===t.length-1},ne=function(t){return $8(t)&&!Ku(t)},L8=function(t){return Ne(t)},Wt=function(t){return ne(t)||Cs(t)},F8=0,Gu=function(t){var n=++F8;return"".concat(t||"").concat(n)},Fn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ne(t)&&!Cs(t))return r;var o;if(Za(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Ku(o)&&(o=r),i&&o>n&&(o=n),o},Fo=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},B8=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},dn=function(t,n){return ne(t)&&ne(n)?function(r){return t+r*(n-t)}:function(){return n}};function Kh(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):cr(r,t))===n})}var U8=function(t,n){return ne(t)&&ne(n)?t-n:Cs(t)&&Cs(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Cl(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Hb(e){"@babel/helpers - typeof";return Hb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hb(e)}var z8=["viewBox","children"],H8=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],uE=["points","pathLength"],kv={svg:z8,polygon:uE,polyline:uE},wS=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Gh=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(j.isValidElement(t)&&(r=t.props),!Hu(r))return null;var i={};return Object.keys(r).forEach(function(o){wS.includes(o)&&(i[o]=n||function(a){return r[o](r,a)})}),i},V8=function(t,n,r){return function(i){return t(n,r,i),null}},ao=function(t,n,r){if(!Hu(t)||Hb(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var a=t[o];wS.includes(o)&&typeof a=="function"&&(i||(i={}),i[o]=V8(a,n,r))}),i},W8=["children"],q8=["children"];function cE(e,t){if(e==null)return{};var n=K8(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function K8(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Vb(e){"@babel/helpers - typeof";return Vb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vb(e)}var fE={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Qi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},dE=null,Nv=null,SS=function e(t){if(t===dE&&Array.isArray(Nv))return Nv;var n=[];return j.Children.forEach(t,function(r){Ne(r)||(T8.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Nv=n,dE=t,n};function fr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Qi(i)}):r=[Qi(t)],SS(e).forEach(function(i){var o=cr(i,"type.displayName")||cr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function ar(e,t){var n=fr(e,t);return n&&n[0]}var pE=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!ne(r)||r<=0||!ne(i)||i<=0)},G8=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],X8=function(t){return t&&t.type&&Cs(t.type)&&G8.indexOf(t.type)>=0},Y8=function(t){return t&&Vb(t)==="object"&&"clipDot"in t},Q8=function(t,n,r,i){var o,a=(o=kv==null?void 0:kv[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!je(t)&&(i&&a.includes(n)||H8.includes(n))||r&&wS.includes(n)},ve=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(j.isValidElement(t)&&(i=t.props),!Hu(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;Q8((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},Wb=function e(t,n){if(t===n)return!0;var r=j.Children.count(t);if(r!==j.Children.count(n))return!1;if(r===0)return!0;if(r===1)return hE(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=t[i],a=n[i];if(Array.isArray(o)||Array.isArray(a)){if(!e(o,a))return!1}else if(!hE(o,a))return!1}return!0},hE=function(t,n){if(Ne(t)&&Ne(n))return!0;if(!Ne(t)&&!Ne(n)){var r=t.props||{},i=r.children,o=cE(r,W8),a=n.props||{},s=a.children,l=cE(a,q8);return i&&s?Cl(o,l)&&Wb(i,s):!i&&!s?Cl(o,l):!1}return!1},mE=function(t,n){var r=[],i={};return SS(t).forEach(function(o,a){if(X8(o))r.push(o);else if(o){var s=Qi(o.type),l=n[s]||{},u=l.handler,c=l.once;if(u&&(!c||!i[s])){var d=u(o,s,a);r.push(d),i[s]=!0}}}),r},J8=function(t){var n=t&&t.type;return n&&fE[n]?fE[n]:null},Z8=function(t,n){return SS(n).indexOf(t)},eq=["children","width","height","viewBox","className","style","title","desc"];function qb(){return qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qb.apply(this,arguments)}function tq(e,t){if(e==null)return{};var n=nq(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Kb(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,u=tq(e,eq),c=i||{width:n,height:r,x:0,y:0},d=Te("recharts-surface",o);return D.createElement("svg",qb({},ve(u,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),D.createElement("title",null,s),D.createElement("desc",null,l),t)}var rq=["children","className"];function Gb(){return Gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gb.apply(this,arguments)}function iq(e,t){if(e==null)return{};var n=oq(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Le=D.forwardRef(function(e,t){var n=e.children,r=e.className,i=iq(e,rq),o=Te("recharts-layer",r);return D.createElement("g",Gb({className:o},ve(i,!0),{ref:t}),n)}),Qr=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]};function aq(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}var sq=aq,lq=sq;function uq(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:lq(e,t,n)}var cq=uq,fq="\\ud800-\\udfff",dq="\\u0300-\\u036f",pq="\\ufe20-\\ufe2f",hq="\\u20d0-\\u20ff",mq=dq+pq+hq,gq="\\ufe0e\\ufe0f",yq="\\u200d",vq=RegExp("["+yq+fq+mq+gq+"]");function xq(e){return vq.test(e)}var fM=xq;function bq(e){return e.split("")}var wq=bq,dM="\\ud800-\\udfff",Sq="\\u0300-\\u036f",jq="\\ufe20-\\ufe2f",Oq="\\u20d0-\\u20ff",Pq=Sq+jq+Oq,Eq="\\ufe0e\\ufe0f",Aq="["+dM+"]",Xb="["+Pq+"]",Yb="\\ud83c[\\udffb-\\udfff]",Cq="(?:"+Xb+"|"+Yb+")",pM="[^"+dM+"]",hM="(?:\\ud83c[\\udde6-\\uddff]){2}",mM="[\\ud800-\\udbff][\\udc00-\\udfff]",Tq="\\u200d",gM=Cq+"?",yM="["+Eq+"]?",_q="(?:"+Tq+"(?:"+[pM,hM,mM].join("|")+")"+yM+gM+")*",kq=yM+gM+_q,Nq="(?:"+[pM+Xb+"?",Xb,hM,mM,Aq].join("|")+")",Rq=RegExp(Yb+"(?="+Yb+")|"+Nq+kq,"g");function $q(e){return e.match(Rq)||[]}var Mq=$q,Iq=wq,Dq=fM,Lq=Mq;function Fq(e){return Dq(e)?Lq(e):Iq(e)}var Bq=Fq,Uq=cq,zq=fM,Hq=Bq,Vq=oM;function Wq(e){return function(t){t=Vq(t);var n=zq(t)?Hq(t):void 0,r=n?n[0]:t.charAt(0),i=n?Uq(n,1).join(""):t.slice(1);return r[e]()+i}}var qq=Wq,Kq=qq,Gq=Kq("toUpperCase"),Xq=Gq;const Qg=Ze(Xq);function ut(e){return function(){return e}}const vM=Math.cos,Xh=Math.sin,ri=Math.sqrt,Yh=Math.PI,Jg=2*Yh,Qb=Math.PI,Jb=2*Qb,Wa=1e-6,Yq=Jb-Wa;function xM(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Qq(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return xM;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Jq{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?xM:Qq(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=r-t,u=i-n,c=a-t,d=s-n,p=c*c+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>Wa)if(!(Math.abs(d*l-u*c)>Wa)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,v=i-s,h=l*l+u*u,g=m*m+v*v,y=Math.sqrt(h),x=Math.sqrt(p),b=o*Math.tan((Qb-Math.acos((h+p-g)/(2*y*x)))/2),S=b/x,w=b/y;Math.abs(S-1)>Wa&&this._append`L${t+S*c},${n+S*d}`,this._append`A${o},${o},0,0,${+(d*m>c*v)},${this._x1=t+w*l},${this._y1=n+w*u}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,c=n+l,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Wa||Math.abs(this._y1-c)>Wa)&&this._append`L${u},${c}`,r&&(p<0&&(p=p%Jb+Jb),p>Yq?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=c}`:p>Wa&&this._append`A${r},${r},0,${+(p>=Qb)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function jS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Jq(t)}function OS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function bM(e){this._context=e}bM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Zg(e){return new bM(e)}function wM(e){return e[0]}function SM(e){return e[1]}function jM(e,t){var n=ut(!0),r=null,i=Zg,o=null,a=jS(s);e=typeof e=="function"?e:e===void 0?wM:ut(e),t=typeof t=="function"?t:t===void 0?SM:ut(t);function s(l){var u,c=(l=OS(l)).length,d,p=!1,m;for(r==null&&(o=i(m=a())),u=0;u<=c;++u)!(u<c&&n(d=l[u],u,l))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+e(d,u,l),+t(d,u,l));if(m)return o=null,m+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ut(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ut(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ut(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),s):r},s}function xp(e,t,n){var r=null,i=ut(!0),o=null,a=Zg,s=null,l=jS(u);e=typeof e=="function"?e:e===void 0?wM:ut(+e),t=typeof t=="function"?t:ut(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?SM:ut(+n);function u(d){var p,m,v,h=(d=OS(d)).length,g,y=!1,x,b=new Array(h),S=new Array(h);for(o==null&&(s=a(x=l())),p=0;p<=h;++p){if(!(p<h&&i(g=d[p],p,d))===y)if(y=!y)m=p,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=p-1;v>=m;--v)s.point(b[v],S[v]);s.lineEnd(),s.areaEnd()}y&&(b[p]=+e(g,p,d),S[p]=+t(g,p,d),s.point(r?+r(g,p,d):b[p],n?+n(g,p,d):S[p]))}if(x)return s=null,x+""||null}function c(){return jM().defined(i).curve(a).context(o)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:ut(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ut(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ut(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:ut(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ut(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ut(+d),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ut(!!d),u):i},u.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),u):a},u.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),u):o},u}class OM{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Zq(e){return new OM(e,!0)}function eK(e){return new OM(e,!1)}const PS={draw(e,t){const n=ri(t/Yh);e.moveTo(n,0),e.arc(0,0,n,0,Jg)}},tK={draw(e,t){const n=ri(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},PM=ri(1/3),nK=PM*2,rK={draw(e,t){const n=ri(t/nK),r=n*PM;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},iK={draw(e,t){const n=ri(t),r=-n/2;e.rect(r,r,n,n)}},oK=.8908130915292852,EM=Xh(Yh/10)/Xh(7*Yh/10),aK=Xh(Jg/10)*EM,sK=-vM(Jg/10)*EM,lK={draw(e,t){const n=ri(t*oK),r=aK*n,i=sK*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Jg*o/5,s=vM(a),l=Xh(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},Rv=ri(3),uK={draw(e,t){const n=-ri(t/(Rv*3));e.moveTo(0,n*2),e.lineTo(-Rv*n,-n),e.lineTo(Rv*n,-n),e.closePath()}},xr=-.5,br=ri(3)/2,Zb=1/ri(12),cK=(Zb/2+1)*3,fK={draw(e,t){const n=ri(t/cK),r=n/2,i=n*Zb,o=r,a=n*Zb+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(xr*r-br*i,br*r+xr*i),e.lineTo(xr*o-br*a,br*o+xr*a),e.lineTo(xr*s-br*l,br*s+xr*l),e.lineTo(xr*r+br*i,xr*i-br*r),e.lineTo(xr*o+br*a,xr*a-br*o),e.lineTo(xr*s+br*l,xr*l-br*s),e.closePath()}};function dK(e,t){let n=null,r=jS(i);e=typeof e=="function"?e:ut(e||PS),t=typeof t=="function"?t:ut(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ut(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:ut(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Qh(){}function Jh(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function AM(e){this._context=e}AM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Jh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Jh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pK(e){return new AM(e)}function CM(e){this._context=e}CM.prototype={areaStart:Qh,areaEnd:Qh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Jh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hK(e){return new CM(e)}function TM(e){this._context=e}TM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Jh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mK(e){return new TM(e)}function _M(e){this._context=e}_M.prototype={areaStart:Qh,areaEnd:Qh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function gK(e){return new _M(e)}function gE(e){return e<0?-1:1}function yE(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(gE(o)+gE(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function vE(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function $v(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Zh(e){this._context=e}Zh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:$v(this,this._t0,vE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,$v(this,vE(this,n=yE(this,e,t)),n);break;default:$v(this,this._t0,n=yE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kM(e){this._context=new NM(e)}(kM.prototype=Object.create(Zh.prototype)).point=function(e,t){Zh.prototype.point.call(this,t,e)};function NM(e){this._context=e}NM.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function yK(e){return new Zh(e)}function vK(e){return new kM(e)}function RM(e){this._context=e}RM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=xE(e),i=xE(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function xE(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function xK(e){return new RM(e)}function ey(e,t){this._context=e,this._t=t}ey.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function bK(e){return new ey(e,.5)}function wK(e){return new ey(e,0)}function SK(e){return new ey(e,1)}function ru(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function e0(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function jK(e,t){return e[t]}function OK(e){const t=[];return t.key=e,t}function PK(){var e=ut([]),t=e0,n=ru,r=jK;function i(o){var a=Array.from(e.apply(this,arguments),OK),s,l=a.length,u=-1,c;for(const d of o)for(s=0,++u;s<l;++s)(a[s][u]=[0,+r(d,a[s].key,u,o)]).data=d;for(s=0,c=OS(t(a));s<l;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ut(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ut(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?e0:typeof o=="function"?o:ut(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??ru,i):n},i}function EK(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}ru(e,t)}}function AK(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}ru(e,t)}}function CK(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,u=0;s<a;++s){for(var c=e[t[s]],d=c[r][1]||0,p=c[r-1][1]||0,m=(d-p)/2,v=0;v<s;++v){var h=e[t[v]],g=h[r][1]||0,y=h[r-1][1]||0;m+=g-y}l+=d,u+=m*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,ru(e,t)}}function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}var TK=["type","size","sizeType"];function t0(){return t0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t0.apply(this,arguments)}function bE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bE(Object(n),!0).forEach(function(r){_K(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _K(e,t,n){return t=kK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kK(e){var t=NK(e,"string");return If(t)=="symbol"?t:t+""}function NK(e,t){if(If(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(If(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RK(e,t){if(e==null)return{};var n=$K(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $K(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var $M={symbolCircle:PS,symbolCross:tK,symbolDiamond:rK,symbolSquare:iK,symbolStar:lK,symbolTriangle:uK,symbolWye:fK},MK=Math.PI/180,IK=function(t){var n="symbol".concat(Qg(t));return $M[n]||PS},DK=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*MK;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},LK=function(t,n){$M["symbol".concat(Qg(t))]=n},ES=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,l=RK(t,TK),u=wE(wE({},l),{},{type:r,size:o,sizeType:s}),c=function(){var g=IK(r),y=dK().type(g).size(DK(o,s,r));return y()},d=u.className,p=u.cx,m=u.cy,v=ve(u,!0);return p===+p&&m===+m&&o===+o?D.createElement("path",t0({},v,{className:Te("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(m,")"),d:c()})):null};ES.registerSymbol=LK;function iu(e){"@babel/helpers - typeof";return iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(e)}function n0(){return n0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n0.apply(this,arguments)}function SE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SE(Object(n),!0).forEach(function(r){Df(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UK(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,IM(r.key),r)}}function zK(e,t,n){return t&&UK(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HK(e,t,n){return t=em(t),VK(e,MM()?Reflect.construct(t,n||[],em(e).constructor):t.apply(e,n))}function VK(e,t){if(t&&(iu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WK(e)}function WK(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MM=function(){return!!e})()}function em(e){return em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},em(e)}function qK(e,t){if(typeof t!="function"&&t!==null)throw new 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&&r0(e,t)}function r0(e,t){return r0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},r0(e,t)}function Df(e,t,n){return t=IM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IM(e){var t=KK(e,"string");return iu(t)=="symbol"?t:t+""}function KK(e,t){if(iu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(iu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wr=32,AS=function(e){function t(){return BK(this,t),HK(this,t,arguments)}return qK(t,e),zK(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=wr/2,a=wr/6,s=wr/3,l=r.inactive?i:r.color;if(r.type==="plainline")return D.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:wr,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return D.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(o,"h").concat(s,`
|
|
76
|
-
A`).concat(a,",").concat(a,",0,1,1,").concat(2*s,",").concat(o,`
|
|
77
|
-
H`).concat(wr,"M").concat(2*s,",").concat(o,`
|
|
78
|
-
A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return D.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(wr/8,"h").concat(wr,"v").concat(wr*3/4,"h").concat(-wr,"z"),className:"recharts-legend-icon"});if(D.isValidElement(r.legendIcon)){var u=FK({},r);return delete u.legendIcon,D.cloneElement(r.legendIcon,u)}return D.createElement(ES,{fill:l,cx:o,cy:o,size:wr,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,a=i.iconSize,s=i.layout,l=i.formatter,u=i.inactiveColor,c={x:0,y:0,width:wr,height:wr},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(m,v){var h=m.formatter||l,g=Te(Df(Df({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",m.inactive));if(m.type==="none")return null;var y=je(m.value)?null:m.value;Qr(!je(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var x=m.inactive?u:m.color;return D.createElement("li",n0({className:g,style:d,key:"legend-item-".concat(v)},ao(r.props,m,v)),D.createElement(Kb,{width:a,height:a,viewBox:c,style:p},r.renderIcon(m)),D.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},h?h(y,m,v):y))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return D.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(j.PureComponent);Df(AS,"displayName","Legend");Df(AS,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var GK=Lg;function XK(){this.__data__=new GK,this.size=0}var YK=XK;function QK(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var JK=QK;function ZK(e){return this.__data__.get(e)}var eG=ZK;function tG(e){return this.__data__.has(e)}var nG=tG,rG=Lg,iG=hS,oG=mS,aG=200;function sG(e,t){var n=this.__data__;if(n instanceof rG){var r=n.__data__;if(!iG||r.length<aG-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oG(r)}return n.set(e,t),this.size=n.size,this}var lG=sG,uG=Lg,cG=YK,fG=JK,dG=eG,pG=nG,hG=lG;function Xu(e){var t=this.__data__=new uG(e);this.size=t.size}Xu.prototype.clear=cG;Xu.prototype.delete=fG;Xu.prototype.get=dG;Xu.prototype.has=pG;Xu.prototype.set=hG;var DM=Xu,mG="__lodash_hash_undefined__";function gG(e){return this.__data__.set(e,mG),this}var yG=gG;function vG(e){return this.__data__.has(e)}var xG=vG,bG=mS,wG=yG,SG=xG;function tm(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new bG;++t<n;)this.add(e[t])}tm.prototype.add=tm.prototype.push=wG;tm.prototype.has=SG;var LM=tm;function jG(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var FM=jG;function OG(e,t){return e.has(t)}var BM=OG,PG=LM,EG=FM,AG=BM,CG=1,TG=2;function _G(e,t,n,r,i,o){var a=n&CG,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,m=n&TG?new PG:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var v=e[d],h=t[d];if(r)var g=a?r(h,v,d,t,e,o):r(v,h,d,e,t,o);if(g!==void 0){if(g)continue;p=!1;break}if(m){if(!EG(t,function(y,x){if(!AG(m,x)&&(v===y||i(v,y,n,r,o)))return m.push(x)})){p=!1;break}}else if(!(v===h||i(v,h,n,r,o))){p=!1;break}}return o.delete(e),o.delete(t),p}var UM=_G,kG=Ai,NG=kG.Uint8Array,RG=NG;function $G(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var MG=$G;function IG(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var CS=IG,jE=Id,OE=RG,DG=pS,LG=UM,FG=MG,BG=CS,UG=1,zG=2,HG="[object Boolean]",VG="[object Date]",WG="[object Error]",qG="[object Map]",KG="[object Number]",GG="[object RegExp]",XG="[object Set]",YG="[object String]",QG="[object Symbol]",JG="[object ArrayBuffer]",ZG="[object DataView]",PE=jE?jE.prototype:void 0,Mv=PE?PE.valueOf:void 0;function e9(e,t,n,r,i,o,a){switch(n){case ZG:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case JG:return!(e.byteLength!=t.byteLength||!o(new OE(e),new OE(t)));case HG:case VG:case KG:return DG(+e,+t);case WG:return e.name==t.name&&e.message==t.message;case GG:case YG:return e==t+"";case qG:var s=FG;case XG:var l=r&UG;if(s||(s=BG),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=zG,a.set(e,t);var c=LG(s(e),s(t),r,i,o,a);return a.delete(e),c;case QG:if(Mv)return Mv.call(e)==Mv.call(t)}return!1}var t9=e9;function n9(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var zM=n9,r9=zM,i9=tr;function o9(e,t,n){var r=t(e);return i9(e)?r:r9(r,n(e))}var a9=o9;function s9(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}var l9=s9;function u9(){return[]}var c9=u9,f9=l9,d9=c9,p9=Object.prototype,h9=p9.propertyIsEnumerable,EE=Object.getOwnPropertySymbols,m9=EE?function(e){return e==null?[]:(e=Object(e),f9(EE(e),function(t){return h9.call(e,t)}))}:d9,g9=m9;function y9(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var v9=y9,x9=xo,b9=bo,w9="[object Arguments]";function S9(e){return b9(e)&&x9(e)==w9}var j9=S9,AE=j9,O9=bo,HM=Object.prototype,P9=HM.hasOwnProperty,E9=HM.propertyIsEnumerable,A9=AE(function(){return arguments}())?AE:function(e){return O9(e)&&P9.call(e,"callee")&&!E9.call(e,"callee")},TS=A9,nm={exports:{}};function C9(){return!1}var T9=C9;nm.exports;(function(e,t){var n=Ai,r=T9,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;e.exports=u})(nm,nm.exports);var VM=nm.exports,_9=9007199254740991,k9=/^(?:0|[1-9]\d*)$/;function N9(e,t){var n=typeof e;return t=t??_9,!!t&&(n=="number"||n!="symbol"&&k9.test(e))&&e>-1&&e%1==0&&e<t}var _S=N9,R9=9007199254740991;function $9(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=R9}var kS=$9,M9=xo,I9=kS,D9=bo,L9="[object Arguments]",F9="[object Array]",B9="[object Boolean]",U9="[object Date]",z9="[object Error]",H9="[object Function]",V9="[object Map]",W9="[object Number]",q9="[object Object]",K9="[object RegExp]",G9="[object Set]",X9="[object String]",Y9="[object WeakMap]",Q9="[object ArrayBuffer]",J9="[object DataView]",Z9="[object Float32Array]",e7="[object Float64Array]",t7="[object Int8Array]",n7="[object Int16Array]",r7="[object Int32Array]",i7="[object Uint8Array]",o7="[object Uint8ClampedArray]",a7="[object Uint16Array]",s7="[object Uint32Array]",ht={};ht[Z9]=ht[e7]=ht[t7]=ht[n7]=ht[r7]=ht[i7]=ht[o7]=ht[a7]=ht[s7]=!0;ht[L9]=ht[F9]=ht[Q9]=ht[B9]=ht[J9]=ht[U9]=ht[z9]=ht[H9]=ht[V9]=ht[W9]=ht[q9]=ht[K9]=ht[G9]=ht[X9]=ht[Y9]=!1;function l7(e){return D9(e)&&I9(e.length)&&!!ht[M9(e)]}var u7=l7;function c7(e){return function(t){return e(t)}}var WM=c7,rm={exports:{}};rm.exports;(function(e,t){var n=Z$,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(rm,rm.exports);var f7=rm.exports,d7=u7,p7=WM,CE=f7,TE=CE&&CE.isTypedArray,h7=TE?p7(TE):d7,qM=h7,m7=v9,g7=TS,y7=tr,v7=VM,x7=_S,b7=qM,w7=Object.prototype,S7=w7.hasOwnProperty;function j7(e,t){var n=y7(e),r=!n&&g7(e),i=!n&&!r&&v7(e),o=!n&&!r&&!i&&b7(e),a=n||r||i||o,s=a?m7(e.length,String):[],l=s.length;for(var u in e)(t||S7.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||x7(u,l)))&&s.push(u);return s}var O7=j7,P7=Object.prototype;function E7(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||P7;return e===n}var A7=E7;function C7(e,t){return function(n){return e(t(n))}}var KM=C7,T7=KM,_7=T7(Object.keys,Object),k7=_7,N7=A7,R7=k7,$7=Object.prototype,M7=$7.hasOwnProperty;function I7(e){if(!N7(e))return R7(e);var t=[];for(var n in Object(e))M7.call(e,n)&&n!="constructor"&&t.push(n);return t}var D7=I7,L7=dS,F7=kS;function B7(e){return e!=null&&F7(e.length)&&!L7(e)}var Dd=B7,U7=O7,z7=D7,H7=Dd;function V7(e){return H7(e)?U7(e):z7(e)}var ty=V7,W7=a9,q7=g9,K7=ty;function G7(e){return W7(e,K7,q7)}var X7=G7,_E=X7,Y7=1,Q7=Object.prototype,J7=Q7.hasOwnProperty;function Z7(e,t,n,r,i,o){var a=n&Y7,s=_E(e),l=s.length,u=_E(t),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:J7.call(t,p)))return!1}var m=o.get(e),v=o.get(t);if(m&&v)return m==t&&v==e;var h=!0;o.set(e,t),o.set(t,e);for(var g=a;++d<l;){p=s[d];var y=e[p],x=t[p];if(r)var b=a?r(x,y,p,t,e,o):r(y,x,p,e,t,o);if(!(b===void 0?y===x||i(y,x,n,r,o):b)){h=!1;break}g||(g=p=="constructor")}if(h&&!g){var S=e.constructor,w=t.constructor;S!=w&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof w=="function"&&w instanceof w)&&(h=!1)}return o.delete(e),o.delete(t),h}var eX=Z7,tX=Vs,nX=Ai,rX=tX(nX,"DataView"),iX=rX,oX=Vs,aX=Ai,sX=oX(aX,"Promise"),lX=sX,uX=Vs,cX=Ai,fX=uX(cX,"Set"),GM=fX,dX=Vs,pX=Ai,hX=dX(pX,"WeakMap"),mX=hX,i0=iX,o0=hS,a0=lX,s0=GM,l0=mX,XM=xo,Yu=tM,kE="[object Map]",gX="[object Object]",NE="[object Promise]",RE="[object Set]",$E="[object WeakMap]",ME="[object DataView]",yX=Yu(i0),vX=Yu(o0),xX=Yu(a0),bX=Yu(s0),wX=Yu(l0),qa=XM;(i0&&qa(new i0(new ArrayBuffer(1)))!=ME||o0&&qa(new o0)!=kE||a0&&qa(a0.resolve())!=NE||s0&&qa(new s0)!=RE||l0&&qa(new l0)!=$E)&&(qa=function(e){var t=XM(e),n=t==gX?e.constructor:void 0,r=n?Yu(n):"";if(r)switch(r){case yX:return ME;case vX:return kE;case xX:return NE;case bX:return RE;case wX:return $E}return t});var SX=qa,Iv=DM,jX=UM,OX=t9,PX=eX,IE=SX,DE=tr,LE=VM,EX=qM,AX=1,FE="[object Arguments]",BE="[object Array]",bp="[object Object]",CX=Object.prototype,UE=CX.hasOwnProperty;function TX(e,t,n,r,i,o){var a=DE(e),s=DE(t),l=a?BE:IE(e),u=s?BE:IE(t);l=l==FE?bp:l,u=u==FE?bp:u;var c=l==bp,d=u==bp,p=l==u;if(p&&LE(e)){if(!LE(t))return!1;a=!0,c=!1}if(p&&!c)return o||(o=new Iv),a||EX(e)?jX(e,t,n,r,i,o):OX(e,t,l,n,r,i,o);if(!(n&AX)){var m=c&&UE.call(e,"__wrapped__"),v=d&&UE.call(t,"__wrapped__");if(m||v){var h=m?e.value():e,g=v?t.value():t;return o||(o=new Iv),i(h,g,n,r,o)}}return p?(o||(o=new Iv),PX(e,t,n,r,i,o)):!1}var _X=TX,kX=_X,zE=bo;function YM(e,t,n,r,i){return e===t?!0:e==null||t==null||!zE(e)&&!zE(t)?e!==e&&t!==t:kX(e,t,n,r,YM,i)}var NS=YM,NX=DM,RX=NS,$X=1,MX=2;function IX(e,t,n,r){var i=n.length,o=i,a=!r;if(e==null)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=n[i];var l=s[0],u=e[l],c=s[1];if(a&&s[2]){if(u===void 0&&!(l in e))return!1}else{var d=new NX;if(r)var p=r(u,c,l,e,t,d);if(!(p===void 0?RX(c,u,$X|MX,r,d):p))return!1}}return!0}var DX=IX,LX=Aa;function FX(e){return e===e&&!LX(e)}var QM=FX,BX=QM,UX=ty;function zX(e){for(var t=UX(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,BX(i)]}return t}var HX=zX;function VX(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var JM=VX,WX=DX,qX=HX,KX=JM;function GX(e){var t=qX(e);return t.length==1&&t[0][2]?KX(t[0][0],t[0][1]):function(n){return n===e||WX(n,e,t)}}var XX=GX;function YX(e,t){return e!=null&&t in Object(e)}var QX=YX,JX=aM,ZX=TS,eY=tr,tY=_S,nY=kS,rY=Bg;function iY(e,t,n){t=JX(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=rY(t[r]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&nY(i)&&tY(a,i)&&(eY(e)||ZX(e)))}var oY=iY,aY=QX,sY=oY;function lY(e,t){return e!=null&&sY(e,t,aY)}var uY=lY,cY=NS,fY=sM,dY=uY,pY=fS,hY=QM,mY=JM,gY=Bg,yY=1,vY=2;function xY(e,t){return pY(e)&&hY(t)?mY(gY(e),t):function(n){var r=fY(n,e);return r===void 0&&r===t?dY(n,e):cY(t,r,yY|vY)}}var bY=xY;function wY(e){return e}var Qu=wY;function SY(e){return function(t){return t==null?void 0:t[e]}}var jY=SY,OY=vS;function PY(e){return function(t){return OY(t,e)}}var EY=PY,AY=jY,CY=EY,TY=fS,_Y=Bg;function kY(e){return TY(e)?AY(_Y(e)):CY(e)}var NY=kY,RY=XX,$Y=bY,MY=Qu,IY=tr,DY=NY;function LY(e){return typeof e=="function"?e:e==null?MY:typeof e=="object"?IY(e)?$Y(e[0],e[1]):RY(e):DY(e)}var Ci=LY;function FY(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var ZM=FY;function BY(e){return e!==e}var UY=BY;function zY(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var HY=zY,VY=ZM,WY=UY,qY=HY;function KY(e,t,n){return t===t?qY(e,t,n):VY(e,WY,n)}var GY=KY,XY=GY;function YY(e,t){var n=e==null?0:e.length;return!!n&&XY(e,t,0)>-1}var QY=YY;function JY(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var ZY=JY;function eQ(){}var tQ=eQ,Dv=GM,nQ=tQ,rQ=CS,iQ=1/0,oQ=Dv&&1/rQ(new Dv([,-0]))[1]==iQ?function(e){return new Dv(e)}:nQ,aQ=oQ,sQ=LM,lQ=QY,uQ=ZY,cQ=BM,fQ=aQ,dQ=CS,pQ=200;function hQ(e,t,n){var r=-1,i=lQ,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=uQ;else if(o>=pQ){var u=t?null:fQ(e);if(u)return dQ(u);a=!1,i=cQ,l=new sQ}else l=t?[]:s;e:for(;++r<o;){var c=e[r],d=t?t(c):c;if(c=n||c!==0?c:0,a&&d===d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),s.push(c)}else i(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s}var mQ=hQ,gQ=Ci,yQ=mQ;function vQ(e,t){return e&&e.length?yQ(e,gQ(t)):[]}var xQ=vQ;const HE=Ze(xQ);function eI(e,t,n){return t===!0?HE(e,n):je(t)?HE(e,t):e}function ou(e){"@babel/helpers - typeof";return ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ou(e)}var bQ=["ref"];function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ri(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VE(Object(n),!0).forEach(function(r){ny(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WE(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,nI(r.key),r)}}function SQ(e,t,n){return t&&WE(e.prototype,t),n&&WE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jQ(e,t,n){return t=im(t),OQ(e,tI()?Reflect.construct(t,n||[],im(e).constructor):t.apply(e,n))}function OQ(e,t){if(t&&(ou(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PQ(e)}function PQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tI=function(){return!!e})()}function im(e){return im=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},im(e)}function EQ(e,t){if(typeof t!="function"&&t!==null)throw new 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&&u0(e,t)}function u0(e,t){return u0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},u0(e,t)}function ny(e,t,n){return t=nI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nI(e){var t=AQ(e,"string");return ou(t)=="symbol"?t:t+""}function AQ(e,t){if(ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function CQ(e,t){if(e==null)return{};var n=TQ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TQ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _Q(e){return e.value}function kQ(e,t){if(D.isValidElement(e))return D.cloneElement(e,t);if(typeof e=="function")return D.createElement(e,t);t.ref;var n=CQ(t,bQ);return D.createElement(AS,n)}var qE=1,ys=function(e){function t(){var n;wQ(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=jQ(this,t,[].concat(i)),ny(n,"lastBoundingBox",{width:-1,height:-1}),n}return EQ(t,e),SQ(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>qE||Math.abs(i.height-this.lastBoundingBox.height)>qE)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ri({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,d,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var m=this.getBBoxSnapshot();d={left:((u||0)-m.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();p={top:((c||0)-v.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Ri(Ri({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,d=Ri(Ri({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return D.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){r.wrapperNode=m}},kQ(o,Ri(Ri({},this.props),{},{payload:eI(c,u,_Q)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Ri(Ri({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&ne(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(j.PureComponent);ny(ys,"displayName","Legend");ny(ys,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var KE=Id,NQ=TS,RQ=tr,GE=KE?KE.isConcatSpreadable:void 0;function $Q(e){return RQ(e)||NQ(e)||!!(GE&&e&&e[GE])}var MQ=$Q,IQ=zM,DQ=MQ;function rI(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=DQ),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?rI(s,t-1,n,r,i):IQ(i,s):r||(i[i.length]=s)}return i}var iI=rI;function LQ(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var FQ=LQ,BQ=FQ,UQ=BQ(),zQ=UQ,HQ=zQ,VQ=ty;function WQ(e,t){return e&&HQ(e,t,VQ)}var oI=WQ,qQ=Dd;function KQ(e,t){return function(n,r){if(n==null)return n;if(!qQ(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}var GQ=KQ,XQ=oI,YQ=GQ,QQ=YQ(XQ),RS=QQ,JQ=RS,ZQ=Dd;function eJ(e,t){var n=-1,r=ZQ(e)?Array(e.length):[];return JQ(e,function(i,o,a){r[++n]=t(i,o,a)}),r}var aI=eJ;function tJ(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var nJ=tJ,XE=zu;function rJ(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,o=XE(e),a=t!==void 0,s=t===null,l=t===t,u=XE(t);if(!s&&!u&&!o&&e>t||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e<t||u&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}var iJ=rJ,oJ=iJ;function aJ(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=oJ(i[r],o[r]);if(l){if(r>=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var sJ=aJ,Lv=yS,lJ=vS,uJ=Ci,cJ=aI,fJ=nJ,dJ=WM,pJ=sJ,hJ=Qu,mJ=tr;function gJ(e,t,n){t.length?t=Lv(t,function(o){return mJ(o)?function(a){return lJ(a,o.length===1?o[0]:o)}:o}):t=[hJ];var r=-1;t=Lv(t,dJ(uJ));var i=cJ(e,function(o,a,s){var l=Lv(t,function(u){return u(o)});return{criteria:l,index:++r,value:o}});return fJ(i,function(o,a){return pJ(o,a,n)})}var yJ=gJ;function vJ(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var xJ=vJ,bJ=xJ,YE=Math.max;function wJ(e,t,n){return t=YE(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=YE(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),bJ(e,this,s)}}var SJ=wJ;function jJ(e){return function(){return e}}var OJ=jJ,PJ=Vs,EJ=function(){try{var e=PJ(Object,"defineProperty");return e({},"",{}),e}catch{}}(),sI=EJ,AJ=OJ,QE=sI,CJ=Qu,TJ=QE?function(e,t){return QE(e,"toString",{configurable:!0,enumerable:!1,value:AJ(t),writable:!0})}:CJ,_J=TJ,kJ=800,NJ=16,RJ=Date.now;function $J(e){var t=0,n=0;return function(){var r=RJ(),i=NJ-(r-n);if(n=r,i>0){if(++t>=kJ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var MJ=$J,IJ=_J,DJ=MJ,LJ=DJ(IJ),FJ=LJ,BJ=Qu,UJ=SJ,zJ=FJ;function HJ(e,t){return zJ(UJ(e,t,BJ),e+"")}var VJ=HJ,WJ=pS,qJ=Dd,KJ=_S,GJ=Aa;function XJ(e,t,n){if(!GJ(n))return!1;var r=typeof t;return(r=="number"?qJ(n)&&KJ(t,n.length):r=="string"&&t in n)?WJ(n[t],e):!1}var ry=XJ,YJ=iI,QJ=yJ,JJ=VJ,JE=ry,ZJ=JJ(function(e,t){if(e==null)return[];var n=t.length;return n>1&&JE(e,t[0],t[1])?t=[]:n>2&&JE(t[0],t[1],t[2])&&(t=[t[0]]),QJ(e,YJ(t,1),[])}),eZ=ZJ;const $S=Ze(eZ);function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function c0(){return c0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c0.apply(this,arguments)}function tZ(e,t){return oZ(e)||iZ(e,t)||rZ(e,t)||nZ()}function nZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
79
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rZ(e,t){if(e){if(typeof e=="string")return ZE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZE(e,t)}}function ZE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function oZ(e){if(Array.isArray(e))return e}function eA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eA(Object(n),!0).forEach(function(r){aZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aZ(e,t,n){return t=sZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sZ(e){var t=lZ(e,"string");return Lf(t)=="symbol"?t:t+""}function lZ(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uZ(e){return Array.isArray(e)&&Wt(e[0])&&Wt(e[1])?e.join(" ~ "):e}var cZ=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,o=i===void 0?{}:i,a=t.itemStyle,s=a===void 0?{}:a,l=t.labelStyle,u=l===void 0?{}:l,c=t.payload,d=t.formatter,p=t.itemSorter,m=t.wrapperClassName,v=t.labelClassName,h=t.label,g=t.labelFormatter,y=t.accessibilityLayer,x=y===void 0?!1:y,b=function(){if(c&&c.length){var _={padding:0,margin:0},k=(p?$S(c,p):c).map(function($,R){if($.type==="none")return null;var I=Fv({display:"block",paddingTop:4,paddingBottom:4,color:$.color||"#000"},s),B=$.formatter||d||uZ,N=$.value,L=$.name,M=N,z=L;if(B&&M!=null&&z!=null){var U=B(N,L,$,R,c);if(Array.isArray(U)){var V=tZ(U,2);M=V[0],z=V[1]}else M=U}return D.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:I},Wt(z)?D.createElement("span",{className:"recharts-tooltip-item-name"},z):null,Wt(z)?D.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,D.createElement("span",{className:"recharts-tooltip-item-value"},M),D.createElement("span",{className:"recharts-tooltip-item-unit"},$.unit||""))});return D.createElement("ul",{className:"recharts-tooltip-item-list",style:_},k)}return null},S=Fv({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),w=Fv({margin:0},u),O=!Ne(h),P=O?h:"",E=Te("recharts-default-tooltip",m),A=Te("recharts-tooltip-label",v);O&&g&&c!==void 0&&c!==null&&(P=g(h,c));var C=x?{role:"status","aria-live":"assertive"}:{};return D.createElement("div",c0({className:E,style:S},C),D.createElement("p",{className:A,style:w},D.isValidElement(P)?P:"".concat(P)),b())};function Ff(e){"@babel/helpers - typeof";return Ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ff(e)}function wp(e,t,n){return t=fZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fZ(e){var t=dZ(e,"string");return Ff(t)=="symbol"?t:t+""}function dZ(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pc="recharts-tooltip-wrapper",pZ={visibility:"hidden"};function hZ(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Te(Pc,wp(wp(wp(wp({},"".concat(Pc,"-right"),ne(n)&&t&&ne(t.x)&&n>=t.x),"".concat(Pc,"-left"),ne(n)&&t&&ne(t.x)&&n<t.x),"".concat(Pc,"-bottom"),ne(r)&&t&&ne(t.y)&&r>=t.y),"".concat(Pc,"-top"),ne(r)&&t&&ne(t.y)&&r<t.y))}function tA(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(o&&ne(o[r]))return o[r];var c=n[r]-s-i,d=n[r]+i;if(t[r])return a[r]?c:d;if(a[r]){var p=c,m=l[r];return p<m?Math.max(d,l[r]):Math.max(c,l[r])}var v=d+s,h=l[r]+u;return v>h?Math.max(c,l[r]):Math.max(d,l[r])}function mZ(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function gZ(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,d;return a.height>0&&a.width>0&&n?(c=tA({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=tA({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),u=mZ({translateX:c,translateY:d,useTranslate3d:s})):u=pZ,{cssProperties:u,cssClasses:hZ({translateX:c,translateY:d,coordinate:n})}}function au(e){"@babel/helpers - typeof";return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(e)}function nA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nA(Object(n),!0).forEach(function(r){d0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vZ(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,uI(r.key),r)}}function xZ(e,t,n){return t&&vZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bZ(e,t,n){return t=om(t),wZ(e,lI()?Reflect.construct(t,n||[],om(e).constructor):t.apply(e,n))}function wZ(e,t){if(t&&(au(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SZ(e)}function SZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lI=function(){return!!e})()}function om(e){return om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},om(e)}function jZ(e,t){if(typeof t!="function"&&t!==null)throw new 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&&f0(e,t)}function f0(e,t){return f0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},f0(e,t)}function d0(e,t,n){return t=uI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uI(e){var t=OZ(e,"string");return au(t)=="symbol"?t:t+""}function OZ(e,t){if(au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var iA=1,PZ=function(e){function t(){var n;yZ(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=bZ(this,t,[].concat(i)),d0(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),d0(n,"handleKeyDown",function(a){if(a.key==="Escape"){var s,l,u,c;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(c=n.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&u!==void 0?u:0}})}}),n}return jZ(t,e),xZ(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>iA||Math.abs(r.height-this.state.lastBoundingBox.height)>iA)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,d=i.hasPayload,p=i.isAnimationActive,m=i.offset,v=i.position,h=i.reverseDirection,g=i.useTranslate3d,y=i.viewBox,x=i.wrapperStyle,b=gZ({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:m,position:v,reverseDirection:h,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:y}),S=b.cssClasses,w=b.cssProperties,O=rA(rA({transition:p&&o?"transform ".concat(s,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return D.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(E){r.wrapperNode=E}},u)}}])}(j.PureComponent),EZ=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ca={isSsr:EZ()};function su(e){"@babel/helpers - typeof";return su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(e)}function oA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function aA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oA(Object(n),!0).forEach(function(r){MS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CZ(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,fI(r.key),r)}}function TZ(e,t,n){return t&&CZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _Z(e,t,n){return t=am(t),kZ(e,cI()?Reflect.construct(t,n||[],am(e).constructor):t.apply(e,n))}function kZ(e,t){if(t&&(su(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NZ(e)}function NZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cI=function(){return!!e})()}function am(e){return am=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},am(e)}function RZ(e,t){if(typeof t!="function"&&t!==null)throw new 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&&p0(e,t)}function p0(e,t){return p0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},p0(e,t)}function MS(e,t,n){return t=fI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fI(e){var t=$Z(e,"string");return su(t)=="symbol"?t:t+""}function $Z(e,t){if(su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function MZ(e){return e.dataKey}function IZ(e,t){return D.isValidElement(e)?D.cloneElement(e,t):typeof e=="function"?D.createElement(e,t):D.createElement(cZ,t)}var li=function(e){function t(){return AZ(this,t),_Z(this,t,arguments)}return RZ(t,e),TZ(t,[{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.content,c=i.coordinate,d=i.filterNull,p=i.isAnimationActive,m=i.offset,v=i.payload,h=i.payloadUniqBy,g=i.position,y=i.reverseDirection,x=i.useTranslate3d,b=i.viewBox,S=i.wrapperStyle,w=v??[];d&&w.length&&(w=eI(v.filter(function(P){return P.value!=null&&(P.hide!==!0||r.props.includeHidden)}),h,MZ));var O=w.length>0;return D.createElement(PZ,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:p,active:o,coordinate:c,hasPayload:O,offset:m,position:g,reverseDirection:y,useTranslate3d:x,viewBox:b,wrapperStyle:S},IZ(u,aA(aA({},this.props),{},{payload:w})))}}])}(j.PureComponent);MS(li,"displayName","Tooltip");MS(li,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ca.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var DZ=Ai,LZ=function(){return DZ.Date.now()},FZ=LZ,BZ=/\s/;function UZ(e){for(var t=e.length;t--&&BZ.test(e.charAt(t)););return t}var zZ=UZ,HZ=zZ,VZ=/^\s+/;function WZ(e){return e&&e.slice(0,HZ(e)+1).replace(VZ,"")}var qZ=WZ,KZ=qZ,sA=Aa,GZ=zu,lA=NaN,XZ=/^[-+]0x[0-9a-f]+$/i,YZ=/^0b[01]+$/i,QZ=/^0o[0-7]+$/i,JZ=parseInt;function ZZ(e){if(typeof e=="number")return e;if(GZ(e))return lA;if(sA(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=sA(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=KZ(e);var n=YZ.test(e);return n||QZ.test(e)?JZ(e.slice(2),n?2:8):XZ.test(e)?lA:+e}var dI=ZZ,eee=Aa,Bv=FZ,uA=dI,tee="Expected a function",nee=Math.max,ree=Math.min;function iee(e,t,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(tee);t=uA(t)||0,eee(n)&&(c=!!n.leading,d="maxWait"in n,o=d?nee(uA(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p);function m(O){var P=r,E=i;return r=i=void 0,u=O,a=e.apply(E,P),a}function v(O){return u=O,s=setTimeout(y,t),c?m(O):a}function h(O){var P=O-l,E=O-u,A=t-P;return d?ree(A,o-E):A}function g(O){var P=O-l,E=O-u;return l===void 0||P>=t||P<0||d&&E>=o}function y(){var O=Bv();if(g(O))return x(O);s=setTimeout(y,h(O))}function x(O){return s=void 0,p&&r?m(O):(r=i=void 0,a)}function b(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function S(){return s===void 0?a:x(Bv())}function w(){var O=Bv(),P=g(O);if(r=arguments,i=this,l=O,P){if(s===void 0)return v(l);if(d)return clearTimeout(s),s=setTimeout(y,t),m(l)}return s===void 0&&(s=setTimeout(y,t)),a}return w.cancel=b,w.flush=S,w}var oee=iee,aee=oee,see=Aa,lee="Expected a function";function uee(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(lee);return see(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),aee(e,t,{leading:r,maxWait:t,trailing:i})}var cee=uee;const pI=Ze(cee);function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function cA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cA(Object(n),!0).forEach(function(r){fee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fee(e,t,n){return t=dee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dee(e){var t=pee(e,"string");return Bf(t)=="symbol"?t:t+""}function pee(e,t){if(Bf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hee(e,t){return vee(e)||yee(e,t)||gee(e,t)||mee()}function mee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
80
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gee(e,t){if(e){if(typeof e=="string")return fA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fA(e,t)}}function fA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function vee(e){if(Array.isArray(e))return e}var xee=j.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,o=e.width,a=o===void 0?"100%":o,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,c=u===void 0?0:u,d=e.minHeight,p=e.maxHeight,m=e.children,v=e.debounce,h=v===void 0?0:v,g=e.id,y=e.className,x=e.onResize,b=e.style,S=b===void 0?{}:b,w=j.useRef(null),O=j.useRef();O.current=x,j.useImperativeHandle(t,function(){return Object.defineProperty(w.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),w.current},configurable:!0})});var P=j.useState({containerWidth:i.width,containerHeight:i.height}),E=hee(P,2),A=E[0],C=E[1],T=j.useCallback(function(k,$){C(function(R){var I=Math.round(k),B=Math.round($);return R.containerWidth===I&&R.containerHeight===B?R:{containerWidth:I,containerHeight:B}})},[]);j.useEffect(function(){var k=function(L){var M,z=L[0].contentRect,U=z.width,V=z.height;T(U,V),(M=O.current)===null||M===void 0||M.call(O,U,V)};h>0&&(k=pI(k,h,{trailing:!0,leading:!1}));var $=new ResizeObserver(k),R=w.current.getBoundingClientRect(),I=R.width,B=R.height;return T(I,B),$.observe(w.current),function(){$.disconnect()}},[T,h]);var _=j.useMemo(function(){var k=A.containerWidth,$=A.containerHeight;if(k<0||$<0)return null;Qr(Za(a)||Za(l),`The width(%s) and height(%s) are both fixed numbers,
|
|
81
|
-
maybe you don't need to use a ResponsiveContainer.`,a,l),Qr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var R=Za(a)?k:a,I=Za(l)?$:l;n&&n>0&&(R?I=R/n:I&&(R=I*n),p&&I>p&&(I=p)),Qr(R>0||I>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
82
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
83
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
84
|
-
height and width.`,R,I,a,l,c,d,n);var B=!Array.isArray(m)&&Qi(m.type).endsWith("Chart");return D.Children.map(m,function(N){return D.isValidElement(N)?j.cloneElement(N,Sp({width:R,height:I},B?{style:Sp({height:"100%",width:"100%",maxHeight:I,maxWidth:R},N.props.style)}:{})):N})},[n,m,l,p,d,c,A,a]);return D.createElement("div",{id:g?"".concat(g):void 0,className:Te("recharts-responsive-container",y),style:Sp(Sp({},S),{},{width:a,height:l,minWidth:c,minHeight:d,maxHeight:p}),ref:w},_)}),Ju=function(t){return null};Ju.displayName="Cell";function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function dA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function h0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(n),!0).forEach(function(r){bee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bee(e,t,n){return t=wee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wee(e){var t=See(e,"string");return Uf(t)=="symbol"?t:t+""}function See(e,t){if(Uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qs={widthCache:{},cacheCount:0},jee=2e3,Oee={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},pA="recharts_measurement_span";function Pee(e){var t=h0({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var af=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ca.isSsr)return{width:0,height:0};var r=Pee(n),i=JSON.stringify({text:t,copyStyle:r});if(Qs.widthCache[i])return Qs.widthCache[i];try{var o=document.getElementById(pA);o||(o=document.createElement("span"),o.setAttribute("id",pA),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=h0(h0({},Oee),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),l={width:s.width,height:s.height};return Qs.widthCache[i]=l,++Qs.cacheCount>jee&&(Qs.cacheCount=0,Qs.widthCache={}),l}catch{return{width:0,height:0}}},Eee=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function zf(e){"@babel/helpers - typeof";return zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(e)}function sm(e,t){return _ee(e)||Tee(e,t)||Cee(e,t)||Aee()}function Aee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
85
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cee(e,t){if(e){if(typeof e=="string")return hA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hA(e,t)}}function hA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function _ee(e){if(Array.isArray(e))return e}function kee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mA(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,Ree(r.key),r)}}function Nee(e,t,n){return t&&mA(e.prototype,t),n&&mA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ree(e){var t=$ee(e,"string");return zf(t)=="symbol"?t:t+""}function $ee(e,t){if(zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,yA=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Mee=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Iee=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,hI={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Dee=Object.keys(hI),hl="NaN";function Lee(e,t){return e*hI[t]}var jp=function(){function e(t,n){kee(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Mee.test(n)&&(this.num=NaN,this.unit=""),Dee.includes(n)&&(this.num=Lee(t,n),this.unit="px")}return Nee(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=Iee.exec(n))!==null&&r!==void 0?r:[],o=sm(i,3),a=o[1],s=o[2];return new e(parseFloat(a),s??"")}}])}();function mI(e){if(e.includes(hl))return hl;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=gA.exec(t))!==null&&n!==void 0?n:[],i=sm(r,4),o=i[1],a=i[2],s=i[3],l=jp.parse(o??""),u=jp.parse(s??""),c=a==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return hl;t=t.replace(gA,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,p=(d=yA.exec(t))!==null&&d!==void 0?d:[],m=sm(p,4),v=m[1],h=m[2],g=m[3],y=jp.parse(v??""),x=jp.parse(g??""),b=h==="+"?y.add(x):y.subtract(x);if(b.isNaN())return hl;t=t.replace(yA,b.toString())}return t}var vA=/\(([^()]*)\)/;function Fee(e){for(var t=e;t.includes("(");){var n=vA.exec(t),r=sm(n,2),i=r[1];t=t.replace(vA,mI(i))}return t}function Bee(e){var t=e.replace(/\s+/g,"");return t=Fee(t),t=mI(t),t}function Uee(e){try{return Bee(e)}catch{return hl}}function Uv(e){var t=Uee(e.slice(5,-1));return t===hl?"":t}var zee=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Hee=["dx","dy","angle","className","breakAll"];function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m0.apply(this,arguments)}function xA(e,t){if(e==null)return{};var n=Vee(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bA(e,t){return Gee(e)||Kee(e,t)||qee(e,t)||Wee()}function Wee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
86
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qee(e,t){if(e){if(typeof e=="string")return wA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wA(e,t)}}function wA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Gee(e){if(Array.isArray(e))return e}var gI=/[ \f\n\r\t\v\u2028\u2029]+/,yI=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var o=[];Ne(n)||(r?o=n.toString().split(""):o=n.toString().split(gI));var a=o.map(function(l){return{word:l,width:af(l,i).width}}),s=r?0:af(" ",i).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}},Xee=function(t,n,r,i,o){var a=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=ne(a),d=s,p=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return R.reduce(function(I,B){var N=B.word,L=B.width,M=I[I.length-1];if(M&&(i==null||o||M.width+L+r<Number(i)))M.words.push(N),M.width+=L+r;else{var z={words:[N],width:L};I.push(z)}return I},[])},m=p(n),v=function(R){return R.reduce(function(I,B){return I.width>B.width?I:B})};if(!c)return m;for(var h="…",g=function(R){var I=d.slice(0,R),B=yI({breakAll:u,style:l,children:I+h}).wordsWithComputedWidth,N=p(B),L=N.length>a||v(N).width>Number(i);return[L,N]},y=0,x=d.length-1,b=0,S;y<=x&&b<=d.length-1;){var w=Math.floor((y+x)/2),O=w-1,P=g(O),E=bA(P,2),A=E[0],C=E[1],T=g(w),_=bA(T,1),k=_[0];if(!A&&!k&&(y=w+1),A&&k&&(x=w-1),!A&&k){S=C;break}b++}return S||m},SA=function(t){var n=Ne(t)?[]:t.toString().split(gI);return[{words:n}]},Yee=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Ca.isSsr){var l,u,c=yI({breakAll:a,children:i,style:o});if(c){var d=c.wordsWithComputedWidth,p=c.spaceWidth;l=d,u=p}else return SA(i);return Xee({breakAll:a,children:i,maxLines:s,style:o},l,u,n,r)}return SA(i)},jA="#808080",Ts=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,d=c===void 0?!1:c,p=t.textAnchor,m=p===void 0?"start":p,v=t.verticalAnchor,h=v===void 0?"end":v,g=t.fill,y=g===void 0?jA:g,x=xA(t,zee),b=j.useMemo(function(){return Yee({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),S=x.dx,w=x.dy,O=x.angle,P=x.className,E=x.breakAll,A=xA(x,Hee);if(!Wt(r)||!Wt(o))return null;var C=r+(ne(S)?S:0),T=o+(ne(w)?w:0),_;switch(h){case"start":_=Uv("calc(".concat(u,")"));break;case"middle":_=Uv("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:_=Uv("calc(".concat(b.length-1," * -").concat(s,")"));break}var k=[];if(d){var $=b[0].width,R=x.width;k.push("scale(".concat((ne(R)?R/$:1)/$,")"))}return O&&k.push("rotate(".concat(O,", ").concat(C,", ").concat(T,")")),k.length&&(A.transform=k.join(" ")),D.createElement("text",m0({},ve(A,!0),{x:C,y:T,className:Te("recharts-text",P),textAnchor:m,fill:y.includes("url")?jA:y}),b.map(function(I,B){var N=I.words.join(E?"":" ");return D.createElement("tspan",{x:C,dy:B===0?_:s,key:"".concat(N,"-").concat(B)},N)}))};function ua(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qee(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function IS(e){let t,n,r;e.length!==2?(t=ua,n=(s,l)=>ua(e(s),l),r=(s,l)=>e(s)-l):(t=e===ua||e===Qee?e:Jee,n=e,r=e);function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const d=u+c>>>1;n(s[d],l)<0?u=d+1:c=d}while(u<c)}return u}function o(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const d=u+c>>>1;n(s[d],l)<=0?u=d+1:c=d}while(u<c)}return u}function a(s,l,u=0,c=s.length){const d=i(s,l,u,c-1);return d>u&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function Jee(){return 0}function vI(e){return e===null?NaN:+e}function*Zee(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const ete=IS(ua),Ld=ete.right;IS(vI).center;class OA extends Map{constructor(t,n=rte){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(PA(this,t))}has(t){return super.has(PA(this,t))}set(t,n){return super.set(tte(this,t),n)}delete(t){return super.delete(nte(this,t))}}function PA({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function tte({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function nte({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function rte(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ite(e=ua){if(e===ua)return xI;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function xI(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const ote=Math.sqrt(50),ate=Math.sqrt(10),ste=Math.sqrt(2);function lm(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=ote?10:o>=ate?5:o>=ste?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?lm(e,t,n*2):[s,l,u]}function g0(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?lm(t,e,n):lm(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)l[u]=(o-u)/-a;else for(let u=0;u<s;++u)l[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)l[u]=(i+u)/-a;else for(let u=0;u<s;++u)l[u]=(i+u)*a;return l}function y0(e,t,n){return t=+t,e=+e,n=+n,lm(e,t,n)[2]}function v0(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?y0(t,e,n):y0(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function EA(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function AA(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function bI(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?xI:ite(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),d=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*d*(l-d)/l)*(u-l/2<0?-1:1),m=Math.max(n,Math.floor(t-u*d/l+p)),v=Math.min(r,Math.floor(t+(l-u)*d/l+p));bI(e,t,m,v,i)}const o=e[t];let a=n,s=r;for(Ec(e,n,t),i(e[r],o)>0&&Ec(e,n,r);a<s;){for(Ec(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?Ec(e,n,s):(++s,Ec(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Ec(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function lte(e,t,n){if(e=Float64Array.from(Zee(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return AA(e);if(t>=1)return EA(e);var r,i=(r-1)*t,o=Math.floor(i),a=EA(bI(e,o).subarray(0,o+1)),s=AA(e.subarray(o+1));return a+(s-a)*(i-o)}}function ute(e,t,n=vI){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function cte(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Dr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function wo(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const x0=Symbol("implicit");function DS(){var e=new OA,t=[],n=[],r=x0;function i(o){let a=e.get(o);if(a===void 0){if(r!==x0)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new OA;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return DS(t,n).unknown(r)},Dr.apply(i,arguments),i}function Hf(){var e=DS().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,u=0,c=.5;delete e.unknown;function d(){var p=t().length,m=i<r,v=m?i:r,h=m?r:i;o=(h-v)/Math.max(1,p-l+u*2),s&&(o=Math.floor(o)),v+=(h-v-o*(p-l))*c,a=o*(1-l),s&&(v=Math.round(v),a=Math.round(a));var g=cte(p).map(function(y){return v+o*y});return n(m?g.reverse():g)}return e.domain=function(p){return arguments.length?(t(p),d()):t()},e.range=function(p){return arguments.length?([r,i]=p,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(p){return[r,i]=p,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(p){return arguments.length?(s=!!p,d()):s},e.padding=function(p){return arguments.length?(l=Math.min(1,u=+p),d()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),d()):l},e.paddingOuter=function(p){return arguments.length?(u=+p,d()):u},e.align=function(p){return arguments.length?(c=Math.max(0,Math.min(1,p)),d()):c},e.copy=function(){return Hf(t(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},Dr.apply(d(),arguments)}function wI(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return wI(t())},e}function sf(){return wI(Hf.apply(null,arguments).paddingInner(1))}function LS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function SI(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Fd(){}var Vf=.7,um=1/Vf,Tl="\\s*([+-]?\\d+)\\s*",Wf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fte=/^#([0-9a-f]{3,8})$/,dte=new RegExp(`^rgb\\(${Tl},${Tl},${Tl}\\)$`),pte=new RegExp(`^rgb\\(${wi},${wi},${wi}\\)$`),hte=new RegExp(`^rgba\\(${Tl},${Tl},${Tl},${Wf}\\)$`),mte=new RegExp(`^rgba\\(${wi},${wi},${wi},${Wf}\\)$`),gte=new RegExp(`^hsl\\(${Wf},${wi},${wi}\\)$`),yte=new RegExp(`^hsla\\(${Wf},${wi},${wi},${Wf}\\)$`),CA={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};LS(Fd,qf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:TA,formatHex:TA,formatHex8:vte,formatHsl:xte,formatRgb:_A,toString:_A});function TA(){return this.rgb().formatHex()}function vte(){return this.rgb().formatHex8()}function xte(){return jI(this).formatHsl()}function _A(){return this.rgb().formatRgb()}function qf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=fte.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?kA(t):n===3?new Yn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Op(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Op(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=dte.exec(e))?new Yn(t[1],t[2],t[3],1):(t=pte.exec(e))?new Yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=hte.exec(e))?Op(t[1],t[2],t[3],t[4]):(t=mte.exec(e))?Op(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=gte.exec(e))?$A(t[1],t[2]/100,t[3]/100,1):(t=yte.exec(e))?$A(t[1],t[2]/100,t[3]/100,t[4]):CA.hasOwnProperty(e)?kA(CA[e]):e==="transparent"?new Yn(NaN,NaN,NaN,0):null}function kA(e){return new Yn(e>>16&255,e>>8&255,e&255,1)}function Op(e,t,n,r){return r<=0&&(e=t=n=NaN),new Yn(e,t,n,r)}function bte(e){return e instanceof Fd||(e=qf(e)),e?(e=e.rgb(),new Yn(e.r,e.g,e.b,e.opacity)):new Yn}function b0(e,t,n,r){return arguments.length===1?bte(e):new Yn(e,t,n,r??1)}function Yn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}LS(Yn,b0,SI(Fd,{brighter(e){return e=e==null?um:Math.pow(um,e),new Yn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Yn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yn(vs(this.r),vs(this.g),vs(this.b),cm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:NA,formatHex:NA,formatHex8:wte,formatRgb:RA,toString:RA}));function NA(){return`#${es(this.r)}${es(this.g)}${es(this.b)}`}function wte(){return`#${es(this.r)}${es(this.g)}${es(this.b)}${es((isNaN(this.opacity)?1:this.opacity)*255)}`}function RA(){const e=cm(this.opacity);return`${e===1?"rgb(":"rgba("}${vs(this.r)}, ${vs(this.g)}, ${vs(this.b)}${e===1?")":`, ${e})`}`}function cm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function es(e){return e=vs(e),(e<16?"0":"")+e.toString(16)}function $A(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Gr(e,t,n,r)}function jI(e){if(e instanceof Gr)return new Gr(e.h,e.s,e.l,e.opacity);if(e instanceof Fd||(e=qf(e)),!e)return new Gr;if(e instanceof Gr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Gr(a,s,l,e.opacity)}function Ste(e,t,n,r){return arguments.length===1?jI(e):new Gr(e,t,n,r??1)}function Gr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}LS(Gr,Ste,SI(Fd,{brighter(e){return e=e==null?um:Math.pow(um,e),new Gr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Gr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Yn(zv(e>=240?e-240:e+120,i,r),zv(e,i,r),zv(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Gr(MA(this.h),Pp(this.s),Pp(this.l),cm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=cm(this.opacity);return`${e===1?"hsl(":"hsla("}${MA(this.h)}, ${Pp(this.s)*100}%, ${Pp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function MA(e){return e=(e||0)%360,e<0?e+360:e}function Pp(e){return Math.max(0,Math.min(1,e||0))}function zv(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const FS=e=>()=>e;function jte(e,t){return function(n){return e+n*t}}function Ote(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Pte(e){return(e=+e)==1?OI:function(t,n){return n-t?Ote(t,n,e):FS(isNaN(t)?n:t)}}function OI(e,t){var n=t-e;return n?jte(e,n):FS(isNaN(e)?t:e)}const IA=function e(t){var n=Pte(t);function r(i,o){var a=n((i=b0(i)).r,(o=b0(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=OI(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function Ete(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function Ate(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Cte(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Zu(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function Tte(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function fm(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function _te(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Zu(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var w0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hv=new RegExp(w0.source,"g");function kte(e){return function(){return e}}function Nte(e){return function(t){return e(t)+""}}function Rte(e,t){var n=w0.lastIndex=Hv.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=w0.exec(e))&&(i=Hv.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:fm(r,i)})),n=Hv.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?Nte(l[0].x):kte(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)s[(d=l[c]).i]=d.x(u);return s.join("")})}function Zu(e,t){var n=typeof t,r;return t==null||n==="boolean"?FS(t):(n==="number"?fm:n==="string"?(r=qf(t))?(t=r,IA):Rte:t instanceof qf?IA:t instanceof Date?Tte:Ate(t)?Ete:Array.isArray(t)?Cte:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?_te:fm)(e,t)}function BS(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function $te(e,t){t===void 0&&(t=e,e=Zu);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function Mte(e){return function(){return e}}function dm(e){return+e}var DA=[0,1];function Bn(e){return e}function S0(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Mte(isNaN(t)?NaN:.5)}function Ite(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Dte(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=S0(i,r),o=n(a,o)):(r=S0(r,i),o=n(o,a)),function(s){return o(r(s))}}function Lte(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=S0(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=Ld(e,s,1,r)-1;return o[l](i[l](s))}}function Bd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function iy(){var e=DA,t=DA,n=Zu,r,i,o,a=Bn,s,l,u;function c(){var p=Math.min(e.length,t.length);return a!==Bn&&(a=Ite(e[0],e[p-1])),s=p>2?Lte:Dte,l=u=null,d}function d(p){return p==null||isNaN(p=+p)?o:(l||(l=s(e.map(r),t,n)))(r(a(p)))}return d.invert=function(p){return a(i((u||(u=s(t,e.map(r),fm)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,dm),c()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),c()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=BS,c()},d.clamp=function(p){return arguments.length?(a=p?!0:Bn,c()):a!==Bn},d.interpolate=function(p){return arguments.length?(n=p,c()):n},d.unknown=function(p){return arguments.length?(o=p,d):o},function(p,m){return r=p,i=m,c()}}function US(){return iy()(Bn,Bn)}function Fte(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function pm(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function lu(e){return e=pm(Math.abs(e)),e?e[1]:NaN}function Bte(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function Ute(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var zte=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kf(e){if(!(t=zte.exec(e)))throw new Error("invalid format: "+e);var t;return new zS({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Kf.prototype=zS.prototype;function zS(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}zS.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Hte(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var hm;function Vte(e,t){var n=pm(e,t);if(!n)return hm=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(hm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+pm(e,Math.max(0,t+o-1))[0]}function LA(e,t){var n=pm(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const FA={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Fte,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>LA(e*100,t),r:LA,s:Vte,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function BA(e){return e}var UA=Array.prototype.map,zA=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Wte(e){var t=e.grouping===void 0||e.thousands===void 0?BA:Bte(UA.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?BA:Ute(UA.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d,p){d=Kf(d);var m=d.fill,v=d.align,h=d.sign,g=d.symbol,y=d.zero,x=d.width,b=d.comma,S=d.precision,w=d.trim,O=d.type;O==="n"?(b=!0,O="g"):FA[O]||(S===void 0&&(S=12),w=!0,O="g"),(y||m==="0"&&v==="=")&&(y=!0,m="0",v="=");var P=(p&&p.prefix!==void 0?p.prefix:"")+(g==="$"?n:g==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),E=(g==="$"?r:/[%p]/.test(O)?a:"")+(p&&p.suffix!==void 0?p.suffix:""),A=FA[O],C=/[defgprs%]/.test(O);S=S===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function T(_){var k=P,$=E,R,I,B;if(O==="c")$=A(_)+$,_="";else{_=+_;var N=_<0||1/_<0;if(_=isNaN(_)?l:A(Math.abs(_),S),w&&(_=Hte(_)),N&&+_==0&&h!=="+"&&(N=!1),k=(N?h==="("?h:s:h==="-"||h==="("?"":h)+k,$=(O==="s"&&!isNaN(_)&&hm!==void 0?zA[8+hm/3]:"")+$+(N&&h==="("?")":""),C){for(R=-1,I=_.length;++R<I;)if(B=_.charCodeAt(R),48>B||B>57){$=(B===46?i+_.slice(R+1):_.slice(R))+$,_=_.slice(0,R);break}}}b&&!y&&(_=t(_,1/0));var L=k.length+_.length+$.length,M=L<x?new Array(x-L+1).join(m):"";switch(b&&y&&(_=t(M+_,M.length?x-$.length:1/0),M=""),v){case"<":_=k+_+$+M;break;case"=":_=k+M+_+$;break;case"^":_=M.slice(0,L=M.length>>1)+k+_+$+M.slice(L);break;default:_=M+k+_+$;break}return o(_)}return T.toString=function(){return d+""},T}function c(d,p){var m=Math.max(-8,Math.min(8,Math.floor(lu(p)/3)))*3,v=Math.pow(10,-m),h=u((d=Kf(d),d.type="f",d),{suffix:zA[8+m/3]});return function(g){return h(v*g)}}return{format:u,formatPrefix:c}}var Ep,HS,PI;qte({thousands:",",grouping:[3],currency:["$",""]});function qte(e){return Ep=Wte(e),HS=Ep.format,PI=Ep.formatPrefix,Ep}function Kte(e){return Math.max(0,-lu(Math.abs(e)))}function Gte(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lu(t)/3)))*3-lu(Math.abs(e)))}function Xte(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lu(t)-lu(e))+1}function EI(e,t,n,r){var i=v0(e,t,n),o;switch(r=Kf(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Gte(i,a))&&(r.precision=o),PI(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Xte(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Kte(i))&&(r.precision=o-(r.type==="%")*2);break}}return HS(r)}function Ta(e){var t=e.domain;return e.ticks=function(n){var r=t();return g0(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return EI(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,c=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);c-- >0;){if(u=y0(a,s,n),u===l)return r[i]=a,r[o]=s,t(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function mm(){var e=US();return e.copy=function(){return Bd(e,mm())},Dr.apply(e,arguments),Ta(e)}function AI(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,dm),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return AI(e).unknown(t)},e=arguments.length?Array.from(e,dm):[0,1],Ta(n)}function CI(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function HA(e){return Math.log(e)}function VA(e){return Math.exp(e)}function Yte(e){return-Math.log(-e)}function Qte(e){return-Math.exp(-e)}function Jte(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Zte(e){return e===10?Jte:e===Math.E?Math.exp:t=>Math.pow(e,t)}function ene(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function WA(e){return(t,n)=>-e(-t,n)}function VS(e){const t=e(HA,VA),n=t.domain;let r=10,i,o;function a(){return i=ene(r),o=Zte(r),n()[0]<0?(i=WA(i),o=WA(o),e(Yte,Qte)):e(HA,VA),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const d=c<u;d&&([u,c]=[c,u]);let p=i(u),m=i(c),v,h;const g=s==null?10:+s;let y=[];if(!(r%1)&&m-p<g){if(p=Math.floor(p),m=Math.ceil(m),u>0){for(;p<=m;++p)for(v=1;v<r;++v)if(h=p<0?v/o(-p):v*o(p),!(h<u)){if(h>c)break;y.push(h)}}else for(;p<=m;++p)for(v=r-1;v>=1;--v)if(h=p>0?v/o(-p):v*o(p),!(h<u)){if(h>c)break;y.push(h)}y.length*2<g&&(y=g0(u,c,g))}else y=g0(p,m,Math.min(m-p,g)).map(o);return d?y.reverse():y},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Kf(l)).precision==null&&(l.trim=!0),l=HS(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return c=>{let d=c/o(Math.round(i(c)));return d*r<r-.5&&(d*=r),d<=u?l(c):""}},t.nice=()=>n(CI(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function TI(){const e=VS(iy()).domain([1,10]);return e.copy=()=>Bd(e,TI()).base(e.base()),Dr.apply(e,arguments),e}function qA(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function KA(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function WS(e){var t=1,n=e(qA(t),KA(t));return n.constant=function(r){return arguments.length?e(qA(t=+r),KA(t)):t},Ta(n)}function _I(){var e=WS(iy());return e.copy=function(){return Bd(e,_I()).constant(e.constant())},Dr.apply(e,arguments)}function GA(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function tne(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function nne(e){return e<0?-e*e:e*e}function qS(e){var t=e(Bn,Bn),n=1;function r(){return n===1?e(Bn,Bn):n===.5?e(tne,nne):e(GA(n),GA(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ta(t)}function KS(){var e=qS(iy());return e.copy=function(){return Bd(e,KS()).exponent(e.exponent())},Dr.apply(e,arguments),e}function rne(){return KS.apply(null,arguments).exponent(.5)}function XA(e){return Math.sign(e)*e*e}function ine(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function kI(){var e=US(),t=[0,1],n=!1,r;function i(o){var a=ine(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(XA(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,dm)).map(XA)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return kI(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Dr.apply(i,arguments),Ta(i)}function NI(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=ute(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[Ld(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(ua),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return NI().domain(e).range(t).unknown(r)},Dr.apply(o,arguments)}function RI(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[Ld(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return RI().domain([e,t]).range(i).unknown(o)},Dr.apply(Ta(a),arguments)}function $I(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Ld(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return $I().domain(e).range(t).unknown(n)},Dr.apply(i,arguments)}const Vv=new Date,Wv=new Date;function qt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let u;do l.push(u=new Date(+o)),t(o,s),e(o);while(u<o&&o<a);return l},i.filter=o=>qt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(Vv.setTime(+o),Wv.setTime(+a),e(Vv),e(Wv),Math.floor(n(Vv,Wv))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const gm=qt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);gm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?qt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):gm);gm.range;const qi=1e3,Tr=qi*60,Ki=Tr*60,so=Ki*24,GS=so*7,YA=so*30,qv=so*365,ts=qt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*qi)},(e,t)=>(t-e)/qi,e=>e.getUTCSeconds());ts.range;const XS=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi)},(e,t)=>{e.setTime(+e+t*Tr)},(e,t)=>(t-e)/Tr,e=>e.getMinutes());XS.range;const YS=qt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Tr)},(e,t)=>(t-e)/Tr,e=>e.getUTCMinutes());YS.range;const QS=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi-e.getMinutes()*Tr)},(e,t)=>{e.setTime(+e+t*Ki)},(e,t)=>(t-e)/Ki,e=>e.getHours());QS.range;const JS=qt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ki)},(e,t)=>(t-e)/Ki,e=>e.getUTCHours());JS.range;const Ud=qt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Tr)/so,e=>e.getDate()-1);Ud.range;const oy=qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/so,e=>e.getUTCDate()-1);oy.range;const MI=qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/so,e=>Math.floor(e/so));MI.range;function Ws(e){return qt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Tr)/GS)}const ay=Ws(0),ym=Ws(1),one=Ws(2),ane=Ws(3),uu=Ws(4),sne=Ws(5),lne=Ws(6);ay.range;ym.range;one.range;ane.range;uu.range;sne.range;lne.range;function qs(e){return qt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/GS)}const sy=qs(0),vm=qs(1),une=qs(2),cne=qs(3),cu=qs(4),fne=qs(5),dne=qs(6);sy.range;vm.range;une.range;cne.range;cu.range;fne.range;dne.range;const ZS=qt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ZS.range;const ej=qt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ej.range;const lo=qt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());lo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});lo.range;const uo=qt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());uo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});uo.range;function II(e,t,n,r,i,o){const a=[[ts,1,qi],[ts,5,5*qi],[ts,15,15*qi],[ts,30,30*qi],[o,1,Tr],[o,5,5*Tr],[o,15,15*Tr],[o,30,30*Tr],[i,1,Ki],[i,3,3*Ki],[i,6,6*Ki],[i,12,12*Ki],[r,1,so],[r,2,2*so],[n,1,GS],[t,1,YA],[t,3,3*YA],[e,1,qv]];function s(u,c,d){const p=c<u;p&&([u,c]=[c,u]);const m=d&&typeof d.range=="function"?d:l(u,c,d),v=m?m.range(u,+c+1):[];return p?v.reverse():v}function l(u,c,d){const p=Math.abs(c-u)/d,m=IS(([,,g])=>g).right(a,p);if(m===a.length)return e.every(v0(u/qv,c/qv,d));if(m===0)return gm.every(Math.max(v0(u,c,d),1));const[v,h]=a[p/a[m-1][2]<a[m][2]/p?m-1:m];return v.every(h)}return[s,l]}const[pne,hne]=II(uo,ej,sy,MI,JS,YS),[mne,gne]=II(lo,ZS,ay,Ud,QS,XS);function Kv(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Gv(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ac(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function yne(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Cc(i),c=Tc(i),d=Cc(o),p=Tc(o),m=Cc(a),v=Tc(a),h=Cc(s),g=Tc(s),y=Cc(l),x=Tc(l),b={a:B,A:N,b:L,B:M,c:null,d:nC,e:nC,f:Bne,g:Yne,G:Jne,H:Dne,I:Lne,j:Fne,L:DI,m:Une,M:zne,p:z,q:U,Q:oC,s:aC,S:Hne,u:Vne,U:Wne,V:qne,w:Kne,W:Gne,x:null,X:null,y:Xne,Y:Qne,Z:Zne,"%":iC},S={a:V,A:W,b:Q,B:G,c:null,d:rC,e:rC,f:rre,g:pre,G:mre,H:ere,I:tre,j:nre,L:FI,m:ire,M:ore,p:le,q:X,Q:oC,s:aC,S:are,u:sre,U:lre,V:ure,w:cre,W:fre,x:null,X:null,y:dre,Y:hre,Z:gre,"%":iC},w={a:C,A:T,b:_,B:k,c:$,d:eC,e:eC,f:Rne,g:ZA,G:JA,H:tC,I:tC,j:Tne,L:Nne,m:Cne,M:_ne,p:A,q:Ane,Q:Mne,s:Ine,S:kne,u:Sne,U:jne,V:One,w:wne,W:Pne,x:R,X:I,y:ZA,Y:JA,Z:Ene,"%":$ne};b.x=O(n,b),b.X=O(r,b),b.c=O(t,b),S.x=O(n,S),S.X=O(r,S),S.c=O(t,S);function O(q,ee){return function(ie){var H=[],Z=-1,J=0,se=q.length,we,ae,be;for(ie instanceof Date||(ie=new Date(+ie));++Z<se;)q.charCodeAt(Z)===37&&(H.push(q.slice(J,Z)),(ae=QA[we=q.charAt(++Z)])!=null?we=q.charAt(++Z):ae=we==="e"?" ":"0",(be=ee[we])&&(we=be(ie,ae)),H.push(we),J=Z+1);return H.push(q.slice(J,Z)),H.join("")}}function P(q,ee){return function(ie){var H=Ac(1900,void 0,1),Z=E(H,q,ie+="",0),J,se;if(Z!=ie.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(ee&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(J=Gv(Ac(H.y,0,1)),se=J.getUTCDay(),J=se>4||se===0?vm.ceil(J):vm(J),J=oy.offset(J,(H.V-1)*7),H.y=J.getUTCFullYear(),H.m=J.getUTCMonth(),H.d=J.getUTCDate()+(H.w+6)%7):(J=Kv(Ac(H.y,0,1)),se=J.getDay(),J=se>4||se===0?ym.ceil(J):ym(J),J=Ud.offset(J,(H.V-1)*7),H.y=J.getFullYear(),H.m=J.getMonth(),H.d=J.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),se="Z"in H?Gv(Ac(H.y,0,1)).getUTCDay():Kv(Ac(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(se+5)%7:H.w+H.U*7-(se+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,Gv(H)):Kv(H)}}function E(q,ee,ie,H){for(var Z=0,J=ee.length,se=ie.length,we,ae;Z<J;){if(H>=se)return-1;if(we=ee.charCodeAt(Z++),we===37){if(we=ee.charAt(Z++),ae=w[we in QA?ee.charAt(Z++):we],!ae||(H=ae(q,ie,H))<0)return-1}else if(we!=ie.charCodeAt(H++))return-1}return H}function A(q,ee,ie){var H=u.exec(ee.slice(ie));return H?(q.p=c.get(H[0].toLowerCase()),ie+H[0].length):-1}function C(q,ee,ie){var H=m.exec(ee.slice(ie));return H?(q.w=v.get(H[0].toLowerCase()),ie+H[0].length):-1}function T(q,ee,ie){var H=d.exec(ee.slice(ie));return H?(q.w=p.get(H[0].toLowerCase()),ie+H[0].length):-1}function _(q,ee,ie){var H=y.exec(ee.slice(ie));return H?(q.m=x.get(H[0].toLowerCase()),ie+H[0].length):-1}function k(q,ee,ie){var H=h.exec(ee.slice(ie));return H?(q.m=g.get(H[0].toLowerCase()),ie+H[0].length):-1}function $(q,ee,ie){return E(q,t,ee,ie)}function R(q,ee,ie){return E(q,n,ee,ie)}function I(q,ee,ie){return E(q,r,ee,ie)}function B(q){return a[q.getDay()]}function N(q){return o[q.getDay()]}function L(q){return l[q.getMonth()]}function M(q){return s[q.getMonth()]}function z(q){return i[+(q.getHours()>=12)]}function U(q){return 1+~~(q.getMonth()/3)}function V(q){return a[q.getUTCDay()]}function W(q){return o[q.getUTCDay()]}function Q(q){return l[q.getUTCMonth()]}function G(q){return s[q.getUTCMonth()]}function le(q){return i[+(q.getUTCHours()>=12)]}function X(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var ee=O(q+="",b);return ee.toString=function(){return q},ee},parse:function(q){var ee=P(q+="",!1);return ee.toString=function(){return q},ee},utcFormat:function(q){var ee=O(q+="",S);return ee.toString=function(){return q},ee},utcParse:function(q){var ee=P(q+="",!0);return ee.toString=function(){return q},ee}}}var QA={"-":"",_:" ",0:"0"},rn=/^\s*\d+/,vne=/^%/,xne=/[\\^$*+?|[\]().{}]/g;function Ge(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function bne(e){return e.replace(xne,"\\$&")}function Cc(e){return new RegExp("^(?:"+e.map(bne).join("|")+")","i")}function Tc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function wne(e,t,n){var r=rn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Sne(e,t,n){var r=rn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function jne(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function One(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Pne(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function JA(e,t,n){var r=rn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ZA(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ene(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ane(e,t,n){var r=rn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Cne(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function eC(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Tne(e,t,n){var r=rn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function tC(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function _ne(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function kne(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Nne(e,t,n){var r=rn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Rne(e,t,n){var r=rn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function $ne(e,t,n){var r=vne.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Mne(e,t,n){var r=rn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ine(e,t,n){var r=rn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function nC(e,t){return Ge(e.getDate(),t,2)}function Dne(e,t){return Ge(e.getHours(),t,2)}function Lne(e,t){return Ge(e.getHours()%12||12,t,2)}function Fne(e,t){return Ge(1+Ud.count(lo(e),e),t,3)}function DI(e,t){return Ge(e.getMilliseconds(),t,3)}function Bne(e,t){return DI(e,t)+"000"}function Une(e,t){return Ge(e.getMonth()+1,t,2)}function zne(e,t){return Ge(e.getMinutes(),t,2)}function Hne(e,t){return Ge(e.getSeconds(),t,2)}function Vne(e){var t=e.getDay();return t===0?7:t}function Wne(e,t){return Ge(ay.count(lo(e)-1,e),t,2)}function LI(e){var t=e.getDay();return t>=4||t===0?uu(e):uu.ceil(e)}function qne(e,t){return e=LI(e),Ge(uu.count(lo(e),e)+(lo(e).getDay()===4),t,2)}function Kne(e){return e.getDay()}function Gne(e,t){return Ge(ym.count(lo(e)-1,e),t,2)}function Xne(e,t){return Ge(e.getFullYear()%100,t,2)}function Yne(e,t){return e=LI(e),Ge(e.getFullYear()%100,t,2)}function Qne(e,t){return Ge(e.getFullYear()%1e4,t,4)}function Jne(e,t){var n=e.getDay();return e=n>=4||n===0?uu(e):uu.ceil(e),Ge(e.getFullYear()%1e4,t,4)}function Zne(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ge(t/60|0,"0",2)+Ge(t%60,"0",2)}function rC(e,t){return Ge(e.getUTCDate(),t,2)}function ere(e,t){return Ge(e.getUTCHours(),t,2)}function tre(e,t){return Ge(e.getUTCHours()%12||12,t,2)}function nre(e,t){return Ge(1+oy.count(uo(e),e),t,3)}function FI(e,t){return Ge(e.getUTCMilliseconds(),t,3)}function rre(e,t){return FI(e,t)+"000"}function ire(e,t){return Ge(e.getUTCMonth()+1,t,2)}function ore(e,t){return Ge(e.getUTCMinutes(),t,2)}function are(e,t){return Ge(e.getUTCSeconds(),t,2)}function sre(e){var t=e.getUTCDay();return t===0?7:t}function lre(e,t){return Ge(sy.count(uo(e)-1,e),t,2)}function BI(e){var t=e.getUTCDay();return t>=4||t===0?cu(e):cu.ceil(e)}function ure(e,t){return e=BI(e),Ge(cu.count(uo(e),e)+(uo(e).getUTCDay()===4),t,2)}function cre(e){return e.getUTCDay()}function fre(e,t){return Ge(vm.count(uo(e)-1,e),t,2)}function dre(e,t){return Ge(e.getUTCFullYear()%100,t,2)}function pre(e,t){return e=BI(e),Ge(e.getUTCFullYear()%100,t,2)}function hre(e,t){return Ge(e.getUTCFullYear()%1e4,t,4)}function mre(e,t){var n=e.getUTCDay();return e=n>=4||n===0?cu(e):cu.ceil(e),Ge(e.getUTCFullYear()%1e4,t,4)}function gre(){return"+0000"}function iC(){return"%"}function oC(e){return+e}function aC(e){return Math.floor(+e/1e3)}var Js,UI,zI;yre({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function yre(e){return Js=yne(e),UI=Js.format,Js.parse,zI=Js.utcFormat,Js.utcParse,Js}function vre(e){return new Date(e)}function xre(e){return e instanceof Date?+e:+new Date(+e)}function tj(e,t,n,r,i,o,a,s,l,u){var c=US(),d=c.invert,p=c.domain,m=u(".%L"),v=u(":%S"),h=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),x=u("%b %d"),b=u("%B"),S=u("%Y");function w(O){return(l(O)<O?m:s(O)<O?v:a(O)<O?h:o(O)<O?g:r(O)<O?i(O)<O?y:x:n(O)<O?b:S)(O)}return c.invert=function(O){return new Date(d(O))},c.domain=function(O){return arguments.length?p(Array.from(O,xre)):p().map(vre)},c.ticks=function(O){var P=p();return e(P[0],P[P.length-1],O??10)},c.tickFormat=function(O,P){return P==null?w:u(P)},c.nice=function(O){var P=p();return(!O||typeof O.range!="function")&&(O=t(P[0],P[P.length-1],O??10)),O?p(CI(P,O)):c},c.copy=function(){return Bd(c,tj(e,t,n,r,i,o,a,s,l,u))},c}function bre(){return Dr.apply(tj(mne,gne,lo,ZS,ay,Ud,QS,XS,ts,UI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function wre(){return Dr.apply(tj(pne,hne,uo,ej,sy,oy,JS,YS,ts,zI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ly(){var e=0,t=1,n,r,i,o,a=Bn,s=!1,l;function u(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(s=!!d,u):s},u.interpolator=function(d){return arguments.length?(a=d,u):a};function c(d){return function(p){var m,v;return arguments.length?([m,v]=p,a=d(m,v),u):[a(0),a(1)]}}return u.range=c(Zu),u.rangeRound=c(BS),u.unknown=function(d){return arguments.length?(l=d,u):l},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),u}}function _a(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function HI(){var e=Ta(ly()(Bn));return e.copy=function(){return _a(e,HI())},wo.apply(e,arguments)}function VI(){var e=VS(ly()).domain([1,10]);return e.copy=function(){return _a(e,VI()).base(e.base())},wo.apply(e,arguments)}function WI(){var e=WS(ly());return e.copy=function(){return _a(e,WI()).constant(e.constant())},wo.apply(e,arguments)}function nj(){var e=qS(ly());return e.copy=function(){return _a(e,nj()).exponent(e.exponent())},wo.apply(e,arguments)}function Sre(){return nj.apply(null,arguments).exponent(.5)}function qI(){var e=[],t=Bn;function n(r){if(r!=null&&!isNaN(r=+r))return t((Ld(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ua),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>lte(e,o/r))},n.copy=function(){return qI(t).domain(e)},wo.apply(n,arguments)}function uy(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,u=Bn,c,d=!1,p;function m(h){return isNaN(h=+h)?p:(h=.5+((h=+c(h))-o)*(r*h<r*o?s:l),u(d?Math.max(0,Math.min(1,h)):h))}m.domain=function(h){return arguments.length?([e,t,n]=h,i=c(e=+e),o=c(t=+t),a=c(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,m):[e,t,n]},m.clamp=function(h){return arguments.length?(d=!!h,m):d},m.interpolator=function(h){return arguments.length?(u=h,m):u};function v(h){return function(g){var y,x,b;return arguments.length?([y,x,b]=g,u=$te(h,[y,x,b]),m):[u(0),u(.5),u(1)]}}return m.range=v(Zu),m.rangeRound=v(BS),m.unknown=function(h){return arguments.length?(p=h,m):p},function(h){return c=h,i=h(e),o=h(t),a=h(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,m}}function KI(){var e=Ta(uy()(Bn));return e.copy=function(){return _a(e,KI())},wo.apply(e,arguments)}function GI(){var e=VS(uy()).domain([.1,1,10]);return e.copy=function(){return _a(e,GI()).base(e.base())},wo.apply(e,arguments)}function XI(){var e=WS(uy());return e.copy=function(){return _a(e,XI()).constant(e.constant())},wo.apply(e,arguments)}function rj(){var e=qS(uy());return e.copy=function(){return _a(e,rj()).exponent(e.exponent())},wo.apply(e,arguments)}function jre(){return rj.apply(null,arguments).exponent(.5)}const sC=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Hf,scaleDiverging:KI,scaleDivergingLog:GI,scaleDivergingPow:rj,scaleDivergingSqrt:jre,scaleDivergingSymlog:XI,scaleIdentity:AI,scaleImplicit:x0,scaleLinear:mm,scaleLog:TI,scaleOrdinal:DS,scalePoint:sf,scalePow:KS,scaleQuantile:NI,scaleQuantize:RI,scaleRadial:kI,scaleSequential:HI,scaleSequentialLog:VI,scaleSequentialPow:nj,scaleSequentialQuantile:qI,scaleSequentialSqrt:Sre,scaleSequentialSymlog:WI,scaleSqrt:rne,scaleSymlog:_I,scaleThreshold:$I,scaleTime:bre,scaleUtc:wre,tickFormat:EI},Symbol.toStringTag,{value:"Module"}));var Ore=zu;function Pre(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(a!=null&&(s===void 0?a===a&&!Ore(a):n(a,s)))var s=a,l=o}return l}var cy=Pre;function Ere(e,t){return e>t}var YI=Ere,Are=cy,Cre=YI,Tre=Qu;function _re(e){return e&&e.length?Are(e,Tre,Cre):void 0}var kre=_re;const Qo=Ze(kre);function Nre(e,t){return e<t}var QI=Nre,Rre=cy,$re=QI,Mre=Qu;function Ire(e){return e&&e.length?Rre(e,Mre,$re):void 0}var Dre=Ire;const fy=Ze(Dre);var Lre=yS,Fre=Ci,Bre=aI,Ure=tr;function zre(e,t){var n=Ure(e)?Lre:Bre;return n(e,Fre(t))}var Hre=zre,Vre=iI,Wre=Hre;function qre(e,t){return Vre(Wre(e,t),1)}var Kre=qre;const Gre=Ze(Kre);var Xre=NS;function Yre(e,t){return Xre(e,t)}var Qre=Yre;const _s=Ze(Qre);var ec=1e9,Jre={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},oj,wt=!0,Mr="[DecimalError] ",xs=Mr+"Invalid argument: ",ij=Mr+"Exponent out of range: ",tc=Math.floor,Ka=Math.pow,Zre=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,sr,Xt=1e7,mt=7,JI=9007199254740991,xm=tc(JI/mt),me={};me.absoluteValue=me.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};me.comparedTo=me.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};me.decimalPlaces=me.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*mt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};me.dividedBy=me.div=function(e){return Ji(this,new this.constructor(e))};me.dividedToIntegerBy=me.idiv=function(e){var t=this,n=t.constructor;return at(Ji(t,new n(e),0,1),n.precision)};me.equals=me.eq=function(e){return!this.cmp(e)};me.exponent=function(){return Lt(this)};me.greaterThan=me.gt=function(e){return this.cmp(e)>0};me.greaterThanOrEqualTo=me.gte=function(e){return this.cmp(e)>=0};me.isInteger=me.isint=function(){return this.e>this.d.length-2};me.isNegative=me.isneg=function(){return this.s<0};me.isPositive=me.ispos=function(){return this.s>0};me.isZero=function(){return this.s===0};me.lessThan=me.lt=function(e){return this.cmp(e)<0};me.lessThanOrEqualTo=me.lte=function(e){return this.cmp(e)<1};me.logarithm=me.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(sr))throw Error(Mr+"NaN");if(n.s<1)throw Error(Mr+(n.s?"NaN":"-Infinity"));return n.eq(sr)?new r(0):(wt=!1,t=Ji(Gf(n,o),Gf(e,o),o),wt=!0,at(t,i))};me.minus=me.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?t2(t,e):ZI(t,(e.s=-e.s,e))};me.modulo=me.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Mr+"NaN");return n.s?(wt=!1,t=Ji(n,e,0,1).times(e),wt=!0,n.minus(t)):at(new r(n),i)};me.naturalExponential=me.exp=function(){return e2(this)};me.naturalLogarithm=me.ln=function(){return Gf(this)};me.negated=me.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};me.plus=me.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?ZI(t,e):t2(t,(e.s=-e.s,e))};me.precision=me.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(xs+e);if(t=Lt(i)+1,r=i.d.length-1,n=r*mt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};me.squareRoot=me.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Mr+"NaN")}for(e=Lt(s),wt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=gi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=tc((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(Ji(s,o,a+2)).times(.5),gi(o.d).slice(0,a)===(t=gi(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(at(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return wt=!0,at(r,n)};me.times=me.mul=function(e){var t,n,r,i,o,a,s,l,u,c=this,d=c.constructor,p=c.d,m=(e=new d(e)).d;if(!c.s||!e.s)return new d(0);for(e.s*=c.s,n=c.e+e.e,l=p.length,u=m.length,l<u&&(o=p,p=m,m=o,a=l,l=u,u=a),o=[],a=l+u,r=a;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+m[r]*p[i-r-1]+t,o[i--]=s%Xt|0,t=s/Xt|0;o[i]=(o[i]+t)%Xt|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,wt?at(e,d.precision):e};me.toDecimalPlaces=me.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Pi(e,0,ec),t===void 0?t=r.rounding:Pi(t,0,8),at(n,e+Lt(n)+1,t))};me.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ks(r,!0):(Pi(e,0,ec),t===void 0?t=i.rounding:Pi(t,0,8),r=at(new i(r),e+1,t),n=ks(r,!0,e+1)),n};me.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?ks(i):(Pi(e,0,ec),t===void 0?t=o.rounding:Pi(t,0,8),r=at(new o(i),e+Lt(i)+1,t),n=ks(r.abs(),!1,e+Lt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};me.toInteger=me.toint=function(){var e=this,t=e.constructor;return at(new t(e),Lt(e)+1,t.rounding)};me.toNumber=function(){return+this};me.toPower=me.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(sr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Mr+"Infinity");return s}if(s.eq(sr))return s;if(r=l.precision,e.eq(sr))return at(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=c<0?-c:c)<=JI){for(i=new l(sr),t=Math.ceil(r/mt+4),wt=!1;n%2&&(i=i.times(s),uC(i.d,t)),n=tc(n/2),n!==0;)s=s.times(s),uC(s.d,t);return wt=!0,e.s<0?new l(sr).div(i):at(i,r)}}else if(o<0)throw Error(Mr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,wt=!1,i=e.times(Gf(s,r+u)),wt=!0,i=e2(i),i.s=o,i};me.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Lt(i),r=ks(i,n<=o.toExpNeg||n>=o.toExpPos)):(Pi(e,1,ec),t===void 0?t=o.rounding:Pi(t,0,8),i=at(new o(i),e,t),n=Lt(i),r=ks(i,e<=n||n<=o.toExpNeg,e)),r};me.toSignificantDigits=me.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Pi(e,1,ec),t===void 0?t=r.rounding:Pi(t,0,8)),at(new r(n),e,t)};me.toString=me.valueOf=me.val=me.toJSON=me[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Lt(e),n=e.constructor;return ks(e,t<=n.toExpNeg||t>=n.toExpPos)};function ZI(e,t){var n,r,i,o,a,s,l,u,c=e.constructor,d=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),wt?at(t,d):t;if(l=e.d,u=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=u.length):(r=u,i=a,s=l.length),a=Math.ceil(d/mt),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=u.length,s-o<0&&(o=s,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/Xt|0,l[o]%=Xt;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,wt?at(t,d):t}function Pi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(xs+e)}function gi(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=mt-r.length,n&&(o+=Io(n)),o+=r;a=e[t],r=a+"",n=mt-r.length,n&&(o+=Io(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var Ji=function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%Xt|0,a=o/Xt|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*Xt+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,l,u,c,d,p,m,v,h,g,y,x,b,S,w,O,P,E,A=r.constructor,C=r.s==i.s?1:-1,T=r.d,_=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(Mr+"Division by zero");for(l=r.e-i.e,P=_.length,w=T.length,m=new A(C),v=m.d=[],u=0;_[u]==(T[u]||0);)++u;if(_[u]>(T[u]||0)&&--l,o==null?x=o=A.precision:a?x=o+(Lt(r)-Lt(i))+1:x=o,x<0)return new A(0);if(x=x/mt+2|0,u=0,P==1)for(c=0,_=_[0],x++;(u<w||c)&&x--;u++)b=c*Xt+(T[u]||0),v[u]=b/_|0,c=b%_|0;else{for(c=Xt/(_[0]+1)|0,c>1&&(_=e(_,c),T=e(T,c),P=_.length,w=T.length),S=P,h=T.slice(0,P),g=h.length;g<P;)h[g++]=0;E=_.slice(),E.unshift(0),O=_[0],_[1]>=Xt/2&&++O;do c=0,s=t(_,h,P,g),s<0?(y=h[0],P!=g&&(y=y*Xt+(h[1]||0)),c=y/O|0,c>1?(c>=Xt&&(c=Xt-1),d=e(_,c),p=d.length,g=h.length,s=t(d,h,p,g),s==1&&(c--,n(d,P<p?E:_,p))):(c==0&&(s=c=1),d=_.slice()),p=d.length,p<g&&d.unshift(0),n(h,d,g),s==-1&&(g=h.length,s=t(_,h,P,g),s<1&&(c++,n(h,P<g?E:_,g))),g=h.length):s===0&&(c++,h=[0]),v[u++]=c,s&&h[0]?h[g++]=T[S]||0:(h=[T[S]],g=1);while((S++<w||h[0]!==void 0)&&x--)}return v[0]||v.shift(),m.e=l,at(m,a?o+Lt(m)+1:o)}}();function e2(e,t){var n,r,i,o,a,s,l=0,u=0,c=e.constructor,d=c.precision;if(Lt(e)>16)throw Error(ij+Lt(e));if(!e.s)return new c(sr);for(wt=!1,s=d,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(r=Math.log(Ka(2,u))/Math.LN10*2+5|0,s+=r,n=i=o=new c(sr),c.precision=s;;){if(i=at(i.times(e),s),n=n.times(++l),a=o.plus(Ji(i,n,s)),gi(a.d).slice(0,s)===gi(o.d).slice(0,s)){for(;u--;)o=at(o.times(o),s);return c.precision=d,t==null?(wt=!0,at(o,d)):o}o=a}}function Lt(e){for(var t=e.e*mt,n=e.d[0];n>=10;n/=10)t++;return t}function Xv(e,t,n){if(t>e.LN10.sd())throw wt=!0,n&&(e.precision=n),Error(Mr+"LN10 precision limit exceeded");return at(new e(e.LN10),t)}function Io(e){for(var t="";e--;)t+="0";return t}function Gf(e,t){var n,r,i,o,a,s,l,u,c,d=1,p=10,m=e,v=m.d,h=m.constructor,g=h.precision;if(m.s<1)throw Error(Mr+(m.s?"NaN":"-Infinity"));if(m.eq(sr))return new h(0);if(t==null?(wt=!1,u=g):u=t,m.eq(10))return t==null&&(wt=!0),Xv(h,u);if(u+=p,h.precision=u,n=gi(v),r=n.charAt(0),o=Lt(m),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=gi(m.d),r=n.charAt(0),d++;o=Lt(m),r>1?(m=new h("0."+n),o++):m=new h(r+"."+n.slice(1))}else return l=Xv(h,u+2,g).times(o+""),m=Gf(new h(r+"."+n.slice(1)),u-p).plus(l),h.precision=g,t==null?(wt=!0,at(m,g)):m;for(s=a=m=Ji(m.minus(sr),m.plus(sr),u),c=at(m.times(m),u),i=3;;){if(a=at(a.times(c),u),l=s.plus(Ji(a,new h(i),u)),gi(l.d).slice(0,u)===gi(s.d).slice(0,u))return s=s.times(2),o!==0&&(s=s.plus(Xv(h,u+2,g).times(o+""))),s=Ji(s,new h(d),u),h.precision=g,t==null?(wt=!0,at(s,g)):s;s=l,i+=2}}function lC(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=tc(n/mt),e.d=[],r=(n+1)%mt,n<0&&(r+=mt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=mt;r<i;)e.d.push(+t.slice(r,r+=mt));t=t.slice(r),r=mt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),wt&&(e.e>xm||e.e<-xm))throw Error(ij+n)}else e.s=0,e.e=0,e.d=[0];return e}function at(e,t,n){var r,i,o,a,s,l,u,c,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=mt,i=t,u=d[c=0];else{if(c=Math.ceil((r+1)/mt),o=d.length,c>=o)return e;for(u=o=d[c],a=1;o>=10;o/=10)a++;r%=mt,i=r-mt+a}if(n!==void 0&&(o=Ka(10,a-i-1),s=u/o%10|0,l=t<0||d[c+1]!==void 0||u%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?u/Ka(10,a-i):0:d[c-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=Lt(e),d.length=1,t=t-o-1,d[0]=Ka(10,(mt-t%mt)%mt),e.e=tc(-t/mt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=c,o=1,c--):(d.length=c+1,o=Ka(10,mt-r),d[c]=i>0?(u/Ka(10,a-i)%Ka(10,i)|0)*o:0),l)for(;;)if(c==0){(d[0]+=o)==Xt&&(d[0]=1,++e.e);break}else{if(d[c]+=o,d[c]!=Xt)break;d[c--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(wt&&(e.e>xm||e.e<-xm))throw Error(ij+Lt(e));return e}function t2(e,t){var n,r,i,o,a,s,l,u,c,d,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),wt?at(t,m):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r,a){for(c=a<0,c?(n=l,a=-a,s=d.length):(n=d,r=u,s=l.length),i=Math.max(Math.ceil(m/mt),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,c=i<s,c&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){c=l[i]<d[i];break}a=0}for(c&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=Xt-1;--l[o],l[i]+=Xt}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,wt?at(t,m):t):new p(0)}function ks(e,t,n){var r,i=Lt(e),o=gi(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Io(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Io(-i-1)+o,n&&(r=n-a)>0&&(o+=Io(r))):i>=a?(o+=Io(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Io(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Io(r))),e.s<0?"-"+o:o}function uC(e,t){if(e.length>t)return e.length=t,!0}function n2(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(xs+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return lC(a,o.toString())}else if(typeof o!="string")throw Error(xs+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Zre.test(o))lC(a,o);else throw Error(xs+o)}if(i.prototype=me,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=n2,i.config=i.set=eie,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function eie(e){if(!e||typeof e!="object")throw Error(Mr+"Object expected");var t,n,r,i=["precision",1,ec,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(tc(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(xs+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(xs+n+": "+r);return this}var oj=n2(Jre);sr=new oj(1);const rt=oj;function tie(e){return oie(e)||iie(e)||rie(e)||nie()}function nie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
87
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rie(e,t){if(e){if(typeof e=="string")return j0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j0(e,t)}}function iie(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function oie(e){if(Array.isArray(e))return j0(e)}function j0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var aie=function(t){return t},r2={},i2=function(t){return t===r2},cC=function(t){return function n(){return arguments.length===0||arguments.length===1&&i2(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},sie=function e(t,n){return t===1?n:cC(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=i.filter(function(s){return s!==r2}).length;return a>=t?n.apply(void 0,i):e(t-a,cC(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=i.map(function(d){return i2(d)?l.shift():d});return n.apply(void 0,tie(c).concat(l))}))})},dy=function(t){return sie(t.length,t)},O0=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},lie=dy(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),uie=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return aie;var i=n.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce(function(s,l){return l(s)},o.apply(void 0,arguments))}},P0=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},o2=function(t){var n=null,r=null;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n&&o.every(function(s,l){return s===n[l]})||(n=o,r=t.apply(void 0,o)),r}};function cie(e){var t;return e===0?t=1:t=Math.floor(new rt(e).abs().log(10).toNumber())+1,t}function fie(e,t,n){for(var r=new rt(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var die=dy(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),pie=dy(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),hie=dy(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const py={rangeStep:fie,getDigitCount:cie,interpolateNumber:die,uninterpolateNumber:pie,uninterpolateTruncation:hie};function E0(e){return yie(e)||gie(e)||a2(e)||mie()}function mie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
88
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gie(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function yie(e){if(Array.isArray(e))return A0(e)}function Xf(e,t){return bie(e)||xie(e,t)||a2(e,t)||vie()}function vie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
89
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a2(e,t){if(e){if(typeof e=="string")return A0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A0(e,t)}}function A0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xie(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function bie(e){if(Array.isArray(e))return e}function s2(e){var t=Xf(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function l2(e,t,n){if(e.lte(0))return new rt(0);var r=py.getDigitCount(e.toNumber()),i=new rt(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new rt(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?l:new rt(Math.ceil(l))}function wie(e,t,n){var r=1,i=new rt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new rt(10).pow(py.getDigitCount(e)-1),i=new rt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new rt(Math.floor(e)))}else e===0?i=new rt(Math.floor((t-1)/2)):n||(i=new rt(Math.floor(e)));var a=Math.floor((t-1)/2),s=uie(lie(function(l){return i.add(new rt(l-a).mul(r)).toNumber()}),O0);return s(0,t)}function u2(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new rt(0),tickMin:new rt(0),tickMax:new rt(0)};var o=l2(new rt(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new rt(0):(a=new rt(e).add(t).div(2),a=a.sub(new rt(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),l=Math.ceil(new rt(t).sub(a).div(o).toNumber()),u=s+l+1;return u>n?u2(e,t,n,r,i+1):(u<n&&(l=t>0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:o,tickMin:a.sub(new rt(s).mul(o)),tickMax:a.add(new rt(l).mul(o))})}function Sie(e){var t=Xf(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=s2([n,r]),l=Xf(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var d=c===1/0?[u].concat(E0(O0(0,i-1).map(function(){return 1/0}))):[].concat(E0(O0(0,i-1).map(function(){return-1/0})),[c]);return n>r?P0(d):d}if(u===c)return wie(u,i,o);var p=u2(u,c,a,o),m=p.step,v=p.tickMin,h=p.tickMax,g=py.rangeStep(v,h.add(new rt(.1).mul(m)),m);return n>r?P0(g):g}function jie(e,t){var n=Xf(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=s2([r,i]),s=Xf(a,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var c=Math.max(t,2),d=l2(new rt(u).sub(l).div(c-1),o,0),p=[].concat(E0(py.rangeStep(new rt(l),new rt(u).sub(new rt(.99).mul(d)),d)),[u]);return r>i?P0(p):p}var Oie=o2(Sie),Pie=o2(jie),Eie="Invariant failed";function Ns(e,t){throw new Error(Eie)}var Aie=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function fu(e){"@babel/helpers - typeof";return fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fu(e)}function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bm.apply(this,arguments)}function Cie(e,t){return Nie(e)||kie(e,t)||_ie(e,t)||Tie()}function Tie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
90
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _ie(e,t){if(e){if(typeof e=="string")return fC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fC(e,t)}}function fC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kie(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Nie(e){if(Array.isArray(e))return e}function Rie(e,t){if(e==null)return{};var n=$ie(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iie(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,d2(r.key),r)}}function Die(e,t,n){return t&&Iie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lie(e,t,n){return t=wm(t),Fie(e,c2()?Reflect.construct(t,n||[],wm(e).constructor):t.apply(e,n))}function Fie(e,t){if(t&&(fu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bie(e)}function Bie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c2=function(){return!!e})()}function wm(e){return wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wm(e)}function Uie(e,t){if(typeof t!="function"&&t!==null)throw new 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&&C0(e,t)}function C0(e,t){return C0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C0(e,t)}function f2(e,t,n){return t=d2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d2(e){var t=zie(e,"string");return fu(t)=="symbol"?t:t+""}function zie(e,t){if(fu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hy=function(e){function t(){return Mie(this,t),Lie(this,t,arguments)}return Uie(t,e),Die(t,[{key:"render",value:function(){var r=this.props,i=r.offset,o=r.layout,a=r.width,s=r.dataKey,l=r.data,u=r.dataPointFormatter,c=r.xAxis,d=r.yAxis,p=Rie(r,Aie),m=ve(p,!1);this.props.direction==="x"&&c.type!=="number"&&Ns();var v=l.map(function(h){var g=u(h,s),y=g.x,x=g.y,b=g.value,S=g.errorVal;if(!S)return null;var w=[],O,P;if(Array.isArray(S)){var E=Cie(S,2);O=E[0],P=E[1]}else O=P=S;if(o==="vertical"){var A=c.scale,C=x+i,T=C+a,_=C-a,k=A(b-O),$=A(b+P);w.push({x1:$,y1:T,x2:$,y2:_}),w.push({x1:k,y1:C,x2:$,y2:C}),w.push({x1:k,y1:T,x2:k,y2:_})}else if(o==="horizontal"){var R=d.scale,I=y+i,B=I-a,N=I+a,L=R(b-O),M=R(b+P);w.push({x1:B,y1:M,x2:N,y2:M}),w.push({x1:I,y1:L,x2:I,y2:M}),w.push({x1:B,y1:L,x2:N,y2:L})}return D.createElement(Le,bm({className:"recharts-errorBar",key:"bar-".concat(w.map(function(z){return"".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))},m),w.map(function(z){return D.createElement("line",bm({},z,{key:"line-".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))}))});return D.createElement(Le,{className:"recharts-errorBars"},v)}}])}(D.Component);f2(hy,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});f2(hy,"displayName","ErrorBar");function Yf(e){"@babel/helpers - typeof";return Yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yf(e)}function dC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dC(Object(n),!0).forEach(function(r){Hie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hie(e,t,n){return t=Vie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vie(e){var t=Wie(e,"string");return Yf(t)=="symbol"?t:t+""}function Wie(e,t){if(Yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var p2=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,a=ar(n,ys);if(!a)return null;var s=ys.defaultProps,l=s!==void 0?Fa(Fa({},s),a.props):{},u;return a.props&&a.props.payload?u=a.props&&a.props.payload:o==="children"?u=(r||[]).reduce(function(c,d){var p=d.item,m=d.props,v=m.sectors||m.data||[];return c.concat(v.map(function(h){return{type:a.props.iconType||p.props.legendType,value:h.name,color:h.fill,payload:h}}))},[]):u=(r||[]).map(function(c){var d=c.item,p=d.type.defaultProps,m=p!==void 0?Fa(Fa({},p),d.props):{},v=m.dataKey,h=m.name,g=m.legendType,y=m.hide;return{inactive:y,dataKey:v,type:l.iconType||g||"square",color:aj(d),value:h||v,payload:m}}),Fa(Fa(Fa({},l),ys.getWithHeight(a,i)),{},{payload:u,item:a})};function Qf(e){"@babel/helpers - typeof";return Qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qf(e)}function pC(e){return Xie(e)||Gie(e)||Kie(e)||qie()}function qie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
91
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kie(e,t){if(e){if(typeof e=="string")return T0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T0(e,t)}}function Gie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xie(e){if(Array.isArray(e))return T0(e)}function T0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hC(Object(n),!0).forEach(function(r){_l(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _l(e,t,n){return t=Yie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yie(e){var t=Qie(e,"string");return Qf(t)=="symbol"?t:t+""}function Qie(e,t){if(Qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dt(e,t,n){return Ne(e)||Ne(t)?n:Wt(t)?cr(e,t,n):je(t)?t(e):n}function lf(e,t,n,r){var i=Gre(e,function(s){return Dt(s,t)});if(n==="number"){var o=i.filter(function(s){return ne(s)||parseFloat(s)});return o.length?[fy(o),Qo(o)]:[1/0,-1/0]}var a=r?i.filter(function(s){return!Ne(s)}):i;return a.map(function(s){return Wt(s)||s instanceof Date?s:""})}var Jie=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,u=0;u<s;u++){var c=u>0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,p=u>=s-1?i[0].coordinate:i[u+1].coordinate,m=void 0;if(Jt(d-c)!==Jt(p-d)){var v=[];if(Jt(p-d)===Jt(l[1]-l[0])){m=p;var h=d+l[1]-l[0];v[0]=Math.min(h,(h+c)/2),v[1]=Math.max(h,(h+c)/2)}else{m=c;var g=p+l[1]-l[0];v[0]=Math.min(d,(g+d)/2),v[1]=Math.max(d,(g+d)/2)}var y=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>y[0]&&t<=y[1]||t>=v[0]&&t<=v[1]){a=i[u].index;break}}else{var x=Math.min(c,p),b=Math.max(c,p);if(t>(x+d)/2&&t<=(b+d)/2){a=i[u].index;break}}}else for(var S=0;S<s;S++)if(S===0&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S>0&&S<s-1&&t>(r[S].coordinate+r[S-1].coordinate)/2&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S===s-1&&t>(r[S].coordinate+r[S-1].coordinate)/2){a=r[S].index;break}return a},aj=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?_t(_t({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,l;switch(i){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},Zie=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),l=0,u=s.length;l<u;l++)for(var c=o[s[l]].stackGroups,d=Object.keys(c),p=0,m=d.length;p<m;p++){var v=c[d[p]],h=v.items,g=v.cateAxisId,y=h.filter(function(P){return Qi(P.type).indexOf("Bar")>=0});if(y&&y.length){var x=y[0].type.defaultProps,b=x!==void 0?_t(_t({},x),y[0].props):y[0].props,S=b.barSize,w=b[g];a[w]||(a[w]=[]);var O=Ne(S)?n:S;a[w].push({item:y[0],stackList:y.slice(1),barSize:Ne(O)?void 0:Fn(O,r,0)})}}return a},eoe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,l=a.length;if(l<1)return null;var u=Fn(n,i,0,!0),c,d=[];if(a[0].barSize===+a[0].barSize){var p=!1,m=i/l,v=a.reduce(function(S,w){return S+w.barSize||0},0);v+=(l-1)*u,v>=i&&(v-=(l-1)*u,u=0),v>=i&&m>0&&(p=!0,m*=.9,v=l*m);var h=(i-v)/2>>0,g={offset:h-u,size:0};c=a.reduce(function(S,w){var O={item:w.item,position:{offset:g.offset+g.size+u,size:p?m:w.barSize}},P=[].concat(pC(S),[O]);return g=P[P.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:g})}),P},d)}else{var y=Fn(r,i,0,!0);i-2*y-(l-1)*u<=0&&(u=0);var x=(i-2*y-(l-1)*u)/l;x>1&&(x>>=0);var b=s===+s?Math.min(x,s):x;c=a.reduce(function(S,w,O){var P=[].concat(pC(S),[{item:w.item,position:{offset:y+(x+u)*O+(x-b)/2,size:b}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:P[P.length-1].position})}),P},d)}return c},toe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),u=p2({children:o,legendWidth:l});if(u){var c=i||{},d=c.width,p=c.height,m=u.align,v=u.verticalAlign,h=u.layout;if((h==="vertical"||h==="horizontal"&&v==="middle")&&m!=="center"&&ne(t[m]))return _t(_t({},t),{},_l({},m,t[m]+(d||0)));if((h==="horizontal"||h==="vertical"&&m==="center")&&v!=="middle"&&ne(t[v]))return _t(_t({},t),{},_l({},v,t[v]+(p||0)))}return t},noe=function(t,n,r){return Ne(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},h2=function(t,n,r,i,o){var a=n.props.children,s=fr(a,hy).filter(function(u){return noe(i,o,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var d=Dt(c,r);if(Ne(d))return u;var p=Array.isArray(d)?[fy(d),Qo(d)]:[d,d],m=l.reduce(function(v,h){var g=Dt(c,h,0),y=p[0]-Math.abs(Array.isArray(g)?g[0]:g),x=p[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(y,v[0]),Math.max(x,v[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},roe=function(t,n,r,i,o){var a=n.map(function(s){return h2(t,s,r,o,i)}).filter(function(s){return!Ne(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},m2=function(t,n,r,i,o){var a=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&h2(t,l,u,i)||lf(t,u,r,o)});if(r==="number")return a.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,u){for(var c=0,d=u.length;c<d;c++)s[u[c]]||(s[u[c]]=!0,l.push(u[c]));return l},[])},g2=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},y2=function(t,n,r,i){if(i)return t.map(function(l){return l.coordinate});var o,a,s=t.map(function(l){return l.coordinate===n&&(o=!0),l.coordinate===r&&(a=!0),l.coordinate});return o||s.push(n),a||s.push(r),s},Gi=function(t,n,r){if(!t)return null;var i=t.scale,o=t.duplicateDomain,a=t.type,s=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(n||r)&&a==="category"&&i.bandwidth?i.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Jt(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(d){var p=o?o.indexOf(d):d;return{coordinate:i(p)+u,value:d,offset:u}});return c.filter(function(d){return!Ku(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,p){return{coordinate:i(d)+u,value:d,index:p,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,p){return{coordinate:i(d)+u,value:o?o[d]:d,index:p,offset:u}})},Yv=new WeakMap,Ap=function(t,n){if(typeof n!="function")return t;Yv.has(t)||Yv.set(t,new WeakMap);var r=Yv.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},v2=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Hf(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:mm(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:sf(),realScaleType:"point"}:o==="category"?{scale:Hf(),realScaleType:"band"}:{scale:mm(),realScaleType:"linear"};if(Cs(i)){var l="scale".concat(Qg(i));return{scale:(sC[l]||sf)(),realScaleType:sC[l]?l:"point"}}return je(i)?{scale:i}:{scale:sf(),realScaleType:"point"}},mC=1e-4,x2=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-mC,a=Math.max(i[0],i[1])+mC,s=t(n[0]),l=t(n[r-1]);(s<o||s>a||l<o||l>a)&&t.domain([n[0],n[r-1]])}},b2=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},w2=function(t,n){if(!n||n.length!==2||!ne(n[0])||!ne(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!ne(t[0])||t[0]<r)&&(o[0]=r),(!ne(t[1])||t[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},ioe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,a=0,s=0;s<n;++s){var l=Ku(t[s][r][1])?t[s][r][0]:t[s][r][1];l>=0?(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},ooe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,a=0;a<n;++a){var s=Ku(t[a][r][1])?t[a][r][0]:t[a][r][1];s>=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},aoe={sign:ioe,expand:EK,none:ru,silhouette:AK,wiggle:CK,positive:ooe},soe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=aoe[r],a=PK().keys(i).value(function(s,l){return+Dt(s,l,0)}).order(e0).offset(o);return a(t)},loe=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,l={},u=s.reduce(function(d,p){var m,v=(m=p.type)!==null&&m!==void 0&&m.defaultProps?_t(_t({},p.type.defaultProps),p.props):p.props,h=v.stackId,g=v.hide;if(g)return d;var y=v[r],x=d[y]||{hasStack:!1,stackGroups:{}};if(Wt(h)){var b=x.stackGroups[h]||{numericAxisId:r,cateAxisId:i,items:[]};b.items.push(p),x.hasStack=!0,x.stackGroups[h]=b}else x.stackGroups[Gu("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return _t(_t({},d),{},_l({},y,x))},l),c={};return Object.keys(u).reduce(function(d,p){var m=u[p];if(m.hasStack){var v={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(h,g){var y=m.stackGroups[g];return _t(_t({},h),{},_l({},g,{numericAxisId:r,cateAxisId:i,items:y.items,stackedData:soe(t,y.items,o)}))},v)}return _t(_t({},d),{},_l({},p,m))},c)},S2=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=Oie(u,o,s);return t.domain([fy(c),Qo(c)]),{niceTicks:c}}if(o&&i==="number"){var d=t.domain(),p=Pie(d,o,s);return{niceTicks:p}}return null};function gC(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ne(i[t.dataKey])){var s=Kh(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=Dt(i,Ne(a)?t.dataKey:a);return Ne(l)?null:t.scale(l)}var Sm=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=Dt(a,n.dataKey,n.domain[s]);return Ne(l)?null:n.scale(l)-o/2+i},j2=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},uoe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?_t(_t({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Wt(o)){var a=n[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},coe=function(t){return t.reduce(function(n,r){return[fy(r.concat([n[0]]).filter(ne)),Qo(r.concat([n[1]]).filter(ne))]},[1/0,-1/0])},O2=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,l=s.reduce(function(u,c){var d=coe(c.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},yC=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,vC=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_0=function(t,n,r){if(je(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(ne(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(yC.test(t[0])){var o=+yC.exec(t[0])[1];i[0]=n[0]-o}else je(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(ne(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(vC.test(t[1])){var a=+vC.exec(t[1])[1];i[1]=n[1]+a}else je(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},jm=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=$S(n,function(d){return d.coordinate}),a=1/0,s=1,l=o.length;s<l;s++){var u=o[s],c=o[s-1];a=Math.min((u.coordinate||0)-(c.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0},xC=function(t,n,r){return!t||!t.length||_s(t,cr(r,"type.defaultProps.domain"))?n:t},sj=function(t,n){var r=t.type.defaultProps?_t(_t({},t.type.defaultProps),t.props):t.props,i=r.dataKey,o=r.name,a=r.unit,s=r.formatter,l=r.tooltipType,u=r.chartType,c=r.hide;return _t(_t({},ve(t,!1)),{},{dataKey:i,unit:a,formatter:s,name:o||i,color:aj(t),value:Dt(n,i),type:l,payload:n,chartType:u,hide:c})};function Jf(e){"@babel/helpers - typeof";return Jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jf(e)}function bC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Di(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bC(Object(n),!0).forEach(function(r){P2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P2(e,t,n){return t=foe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function foe(e){var t=doe(e,"string");return Jf(t)=="symbol"?t:t+""}function doe(e,t){if(Jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function poe(e,t){return yoe(e)||goe(e,t)||moe(e,t)||hoe()}function hoe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
92
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function moe(e,t){if(e){if(typeof e=="string")return wC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wC(e,t)}}function wC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function goe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function yoe(e){if(Array.isArray(e))return e}var Om=Math.PI/180,voe=function(t){return t*180/Math.PI},st=function(t,n,r,i){return{x:t+Math.cos(-Om*i)*r,y:n+Math.sin(-Om*i)*r}},E2=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},A2=function(t,n,r,i,o){var a=t.width,s=t.height,l=t.startAngle,u=t.endAngle,c=Fn(t.cx,a,a/2),d=Fn(t.cy,s,s/2),p=E2(a,s,r),m=Fn(t.innerRadius,p,0),v=Fn(t.outerRadius,p,p*.8),h=Object.keys(n);return h.reduce(function(g,y){var x=n[y],b=x.domain,S=x.reversed,w;if(Ne(x.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[m,v]),S&&(w=[w[1],w[0]]);else{w=x.range;var O=w,P=poe(O,2);l=P[0],u=P[1]}var E=v2(x,o),A=E.realScaleType,C=E.scale;C.domain(b).range(w),x2(C);var T=S2(C,Di(Di({},x),{},{realScaleType:A})),_=Di(Di(Di({},x),T),{},{range:w,radius:v,realScaleType:A,scale:C,cx:c,cy:d,innerRadius:m,outerRadius:v,startAngle:l,endAngle:u});return Di(Di({},g),{},P2({},y,_))},{})},xoe=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-a,2))},boe=function(t,n){var r=t.x,i=t.y,o=n.cx,a=n.cy,s=xoe({x:r,y:i},{x:o,y:a});if(s<=0)return{radius:s};var l=(r-o)/s,u=Math.acos(l);return i>a&&(u=2*Math.PI-u),{radius:s,angle:voe(u),angleInRadian:u}},woe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},Soe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},SC=function(t,n){var r=t.x,i=t.y,o=boe({x:r,y:i},n),a=o.radius,s=o.angle,l=n.innerRadius,u=n.outerRadius;if(a<l||a>u)return!1;if(a===0)return!0;var c=woe(n),d=c.startAngle,p=c.endAngle,m=s,v;if(d<=p){for(;m>p;)m-=360;for(;m<d;)m+=360;v=m>=d&&m<=p}else{for(;m>d;)m-=360;for(;m<p;)m+=360;v=m>=p&&m<=d}return v?Di(Di({},n),{},{radius:a,angle:Soe(m,n)}):null},C2=function(t){return!j.isValidElement(t)&&!je(t)&&typeof t!="boolean"?t.className:""};function Zf(e){"@babel/helpers - typeof";return Zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zf(e)}var joe=["offset"];function Ooe(e){return Coe(e)||Aoe(e)||Eoe(e)||Poe()}function Poe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
93
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eoe(e,t){if(e){if(typeof e=="string")return k0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k0(e,t)}}function Aoe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Coe(e){if(Array.isArray(e))return k0(e)}function k0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Toe(e,t){if(e==null)return{};var n=_oe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _oe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jC(Object(n),!0).forEach(function(r){koe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function koe(e,t,n){return t=Noe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Noe(e){var t=Roe(e,"string");return Zf(t)=="symbol"?t:t+""}function Roe(e,t){if(Zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ed(){return ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ed.apply(this,arguments)}var $oe=function(t){var n=t.value,r=t.formatter,i=Ne(t.children)?n:t.children;return je(r)?r(i):i},Moe=function(t,n){var r=Jt(n-t),i=Math.min(Math.abs(n-t),360);return r*i},Ioe=function(t,n,r){var i=t.position,o=t.viewBox,a=t.offset,s=t.className,l=o,u=l.cx,c=l.cy,d=l.innerRadius,p=l.outerRadius,m=l.startAngle,v=l.endAngle,h=l.clockWise,g=(d+p)/2,y=Moe(m,v),x=y>=0?1:-1,b,S;i==="insideStart"?(b=m+x*a,S=h):i==="insideEnd"?(b=v-x*a,S=!h):i==="end"&&(b=v+x*a,S=h),S=y<=0?S:!S;var w=st(u,c,g,b),O=st(u,c,g,b+(S?1:-1)*359),P="M".concat(w.x,",").concat(w.y,`
|
|
94
|
-
A`).concat(g,",").concat(g,",0,1,").concat(S?0:1,`,
|
|
95
|
-
`).concat(O.x,",").concat(O.y),E=Ne(t.id)?Gu("recharts-radial-line-"):t.id;return D.createElement("text",ed({},r,{dominantBaseline:"central",className:Te("recharts-radial-bar-label",s)}),D.createElement("defs",null,D.createElement("path",{id:E,d:P})),D.createElement("textPath",{xlinkHref:"#".concat(E)},n))},Doe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,s=o.cy,l=o.innerRadius,u=o.outerRadius,c=o.startAngle,d=o.endAngle,p=(c+d)/2;if(i==="outside"){var m=st(a,s,u+r,p),v=m.x,h=m.y;return{x:v,y:h,textAnchor:v>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var g=(l+u)/2,y=st(a,s,g,p),x=y.x,b=y.y;return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Loe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,l=a.y,u=a.width,c=a.height,d=c>=0?1:-1,p=d*i,m=d>0?"end":"start",v=d>0?"start":"end",h=u>=0?1:-1,g=h*i,y=h>0?"end":"start",x=h>0?"start":"end";if(o==="top"){var b={x:s+u/2,y:l-d*i,textAnchor:"middle",verticalAnchor:m};return Bt(Bt({},b),r?{height:Math.max(l-r.y,0),width:u}:{})}if(o==="bottom"){var S={x:s+u/2,y:l+c+p,textAnchor:"middle",verticalAnchor:v};return Bt(Bt({},S),r?{height:Math.max(r.y+r.height-(l+c),0),width:u}:{})}if(o==="left"){var w={x:s-g,y:l+c/2,textAnchor:y,verticalAnchor:"middle"};return Bt(Bt({},w),r?{width:Math.max(w.x-r.x,0),height:c}:{})}if(o==="right"){var O={x:s+u+g,y:l+c/2,textAnchor:x,verticalAnchor:"middle"};return Bt(Bt({},O),r?{width:Math.max(r.x+r.width-O.x,0),height:c}:{})}var P=r?{width:u,height:c}:{};return o==="insideLeft"?Bt({x:s+g,y:l+c/2,textAnchor:x,verticalAnchor:"middle"},P):o==="insideRight"?Bt({x:s+u-g,y:l+c/2,textAnchor:y,verticalAnchor:"middle"},P):o==="insideTop"?Bt({x:s+u/2,y:l+p,textAnchor:"middle",verticalAnchor:v},P):o==="insideBottom"?Bt({x:s+u/2,y:l+c-p,textAnchor:"middle",verticalAnchor:m},P):o==="insideTopLeft"?Bt({x:s+g,y:l+p,textAnchor:x,verticalAnchor:v},P):o==="insideTopRight"?Bt({x:s+u-g,y:l+p,textAnchor:y,verticalAnchor:v},P):o==="insideBottomLeft"?Bt({x:s+g,y:l+c-p,textAnchor:x,verticalAnchor:m},P):o==="insideBottomRight"?Bt({x:s+u-g,y:l+c-p,textAnchor:y,verticalAnchor:m},P):Hu(o)&&(ne(o.x)||Za(o.x))&&(ne(o.y)||Za(o.y))?Bt({x:s+Fn(o.x,u),y:l+Fn(o.y,c),textAnchor:"end",verticalAnchor:"end"},P):Bt({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},P)},Foe=function(t){return"cx"in t&&ne(t.cx)};function Qt(e){var t=e.offset,n=t===void 0?5:t,r=Toe(e,joe),i=Bt({offset:n},r),o=i.viewBox,a=i.position,s=i.value,l=i.children,u=i.content,c=i.className,d=c===void 0?"":c,p=i.textBreakAll;if(!o||Ne(s)&&Ne(l)&&!j.isValidElement(u)&&!je(u))return null;if(j.isValidElement(u))return j.cloneElement(u,i);var m;if(je(u)){if(m=j.createElement(u,i),j.isValidElement(m))return m}else m=$oe(i);var v=Foe(o),h=ve(i,!0);if(v&&(a==="insideStart"||a==="insideEnd"||a==="end"))return Ioe(i,m,h);var g=v?Doe(i):Loe(i);return D.createElement(Ts,ed({className:Te("recharts-label",d)},h,g,{breakAll:p}),m)}Qt.displayName="Label";var T2=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,d=t.x,p=t.y,m=t.top,v=t.left,h=t.width,g=t.height,y=t.clockWise,x=t.labelViewBox;if(x)return x;if(ne(h)&&ne(g)){if(ne(d)&&ne(p))return{x:d,y:p,width:h,height:g};if(ne(m)&&ne(v))return{x:m,y:v,width:h,height:g}}return ne(d)&&ne(p)?{x:d,y:p,width:0,height:0}:ne(n)&&ne(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},Boe=function(t,n){return t?t===!0?D.createElement(Qt,{key:"label-implicit",viewBox:n}):Wt(t)?D.createElement(Qt,{key:"label-implicit",viewBox:n,value:t}):j.isValidElement(t)?t.type===Qt?j.cloneElement(t,{key:"label-implicit",viewBox:n}):D.createElement(Qt,{key:"label-implicit",content:t,viewBox:n}):je(t)?D.createElement(Qt,{key:"label-implicit",content:t,viewBox:n}):Hu(t)?D.createElement(Qt,ed({viewBox:n},t,{key:"label-implicit"})):null:null},Uoe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=T2(t),a=fr(i,Qt).map(function(l,u){return j.cloneElement(l,{viewBox:n||o,key:"label-".concat(u)})});if(!r)return a;var s=Boe(t.label,n||o);return[s].concat(Ooe(a))};Qt.parseViewBox=T2;Qt.renderCallByParent=Uoe;function zoe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Hoe=zoe;const Voe=Ze(Hoe);function td(e){"@babel/helpers - typeof";return td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},td(e)}var Woe=["valueAccessor"],qoe=["data","dataKey","clockWise","id","textBreakAll"];function Koe(e){return Qoe(e)||Yoe(e)||Xoe(e)||Goe()}function Goe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
96
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xoe(e,t){if(e){if(typeof e=="string")return N0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N0(e,t)}}function Yoe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qoe(e){if(Array.isArray(e))return N0(e)}function N0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pm(){return Pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pm.apply(this,arguments)}function OC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OC(Object(n),!0).forEach(function(r){Joe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Joe(e,t,n){return t=Zoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zoe(e){var t=eae(e,"string");return td(t)=="symbol"?t:t+""}function eae(e,t){if(td(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(td(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EC(e,t){if(e==null)return{};var n=tae(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var nae=function(t){return Array.isArray(t.value)?Voe(t.value):t.value};function Si(e){var t=e.valueAccessor,n=t===void 0?nae:t,r=EC(e,Woe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,u=EC(r,qoe);return!i||!i.length?null:D.createElement(Le,{className:"recharts-label-list"},i.map(function(c,d){var p=Ne(o)?n(c,d):Dt(c&&c.payload,o),m=Ne(s)?{}:{id:"".concat(s,"-").concat(d)};return D.createElement(Qt,Pm({},ve(c,!0),u,m,{parentViewBox:c.parentViewBox,value:p,textBreakAll:l,viewBox:Qt.parseViewBox(Ne(a)?c:PC(PC({},c),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Si.displayName="LabelList";function rae(e,t){return e?e===!0?D.createElement(Si,{key:"labelList-implicit",data:t}):D.isValidElement(e)||je(e)?D.createElement(Si,{key:"labelList-implicit",data:t,content:e}):Hu(e)?D.createElement(Si,Pm({data:t},e,{key:"labelList-implicit"})):null:null}function iae(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=fr(r,Si).map(function(a,s){return j.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=rae(e.label,t);return[o].concat(Koe(i))}Si.renderCallByParent=iae;function nd(e){"@babel/helpers - typeof";return nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nd(e)}function R0(){return R0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R0.apply(this,arguments)}function AC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AC(Object(n),!0).forEach(function(r){oae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oae(e,t,n){return t=aae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aae(e){var t=sae(e,"string");return nd(t)=="symbol"?t:t+""}function sae(e,t){if(nd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lae=function(t,n){var r=Jt(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Cp=function(t){var n=t.cx,r=t.cy,i=t.radius,o=t.angle,a=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,c=l*(s?1:-1)+i,d=Math.asin(l/c)/Om,p=u?o:o+a*d,m=st(n,r,c,p),v=st(n,r,i,p),h=u?o-a*d:o,g=st(n,r,c*Math.cos(d*Om),h);return{center:m,circleTangency:v,lineTangency:g,theta:d}},_2=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.startAngle,s=t.endAngle,l=lae(a,s),u=a+l,c=st(n,r,o,a),d=st(n,r,o,u),p="M ".concat(c.x,",").concat(c.y,`
|
|
97
|
-
A `).concat(o,",").concat(o,`,0,
|
|
98
|
-
`).concat(+(Math.abs(l)>180),",").concat(+(a>u),`,
|
|
99
|
-
`).concat(d.x,",").concat(d.y,`
|
|
100
|
-
`);if(i>0){var m=st(n,r,i,a),v=st(n,r,i,u);p+="L ".concat(v.x,",").concat(v.y,`
|
|
101
|
-
A `).concat(i,",").concat(i,`,0,
|
|
102
|
-
`).concat(+(Math.abs(l)>180),",").concat(+(a<=u),`,
|
|
103
|
-
`).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},uae=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,d=Jt(c-u),p=Cp({cx:n,cy:r,radius:o,angle:u,sign:d,cornerRadius:a,cornerIsExternal:l}),m=p.circleTangency,v=p.lineTangency,h=p.theta,g=Cp({cx:n,cy:r,radius:o,angle:c,sign:-d,cornerRadius:a,cornerIsExternal:l}),y=g.circleTangency,x=g.lineTangency,b=g.theta,S=l?Math.abs(u-c):Math.abs(u-c)-h-b;if(S<0)return s?"M ".concat(v.x,",").concat(v.y,`
|
|
104
|
-
a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
|
|
105
|
-
a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
|
|
106
|
-
`):_2({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:u,endAngle:c});var w="M ".concat(v.x,",").concat(v.y,`
|
|
107
|
-
A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,`
|
|
108
|
-
A`).concat(o,",").concat(o,",0,").concat(+(S>180),",").concat(+(d<0),",").concat(y.x,",").concat(y.y,`
|
|
109
|
-
A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,`
|
|
110
|
-
`);if(i>0){var O=Cp({cx:n,cy:r,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),P=O.circleTangency,E=O.lineTangency,A=O.theta,C=Cp({cx:n,cy:r,radius:i,angle:c,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),T=C.circleTangency,_=C.lineTangency,k=C.theta,$=l?Math.abs(u-c):Math.abs(u-c)-A-k;if($<0&&a===0)return"".concat(w,"L").concat(n,",").concat(r,"Z");w+="L".concat(_.x,",").concat(_.y,`
|
|
111
|
-
A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(T.x,",").concat(T.y,`
|
|
112
|
-
A`).concat(i,",").concat(i,",0,").concat(+($>180),",").concat(+(d>0),",").concat(P.x,",").concat(P.y,`
|
|
113
|
-
A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(n,",").concat(r,"Z");return w},cae={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},k2=function(t){var n=CC(CC({},cae),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,c=n.startAngle,d=n.endAngle,p=n.className;if(a<o||c===d)return null;var m=Te("recharts-sector",p),v=a-o,h=Fn(s,v,0,!0),g;return h>0&&Math.abs(c-d)<360?g=uae({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(h,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:d}):g=_2({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:d}),D.createElement("path",R0({},ve(n,!0),{className:m,d:g,role:"img"}))};function rd(e){"@babel/helpers - typeof";return rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rd(e)}function $0(){return $0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$0.apply(this,arguments)}function TC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _C(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TC(Object(n),!0).forEach(function(r){fae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fae(e,t,n){return t=dae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dae(e){var t=pae(e,"string");return rd(t)=="symbol"?t:t+""}function pae(e,t){if(rd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kC={curveBasisClosed:hK,curveBasisOpen:mK,curveBasis:pK,curveBumpX:Zq,curveBumpY:eK,curveLinearClosed:gK,curveLinear:Zg,curveMonotoneX:yK,curveMonotoneY:vK,curveNatural:xK,curveStep:bK,curveStepAfter:SK,curveStepBefore:wK},Tp=function(t){return t.x===+t.x&&t.y===+t.y},_c=function(t){return t.x},kc=function(t){return t.y},hae=function(t,n){if(je(t))return t;var r="curve".concat(Qg(t));return(r==="curveMonotone"||r==="curveBump")&&n?kC["".concat(r).concat(n==="vertical"?"Y":"X")]:kC[r]||Zg},mae=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,o=i===void 0?[]:i,a=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,c=hae(r,s),d=u?o.filter(function(h){return Tp(h)}):o,p;if(Array.isArray(a)){var m=u?a.filter(function(h){return Tp(h)}):a,v=d.map(function(h,g){return _C(_C({},h),{},{base:m[g]})});return s==="vertical"?p=xp().y(kc).x1(_c).x0(function(h){return h.base.x}):p=xp().x(_c).y1(kc).y0(function(h){return h.base.y}),p.defined(Tp).curve(c),p(v)}return s==="vertical"&&ne(a)?p=xp().y(kc).x1(_c).x0(a):ne(a)?p=xp().x(_c).y1(kc).y0(a):p=jM().x(_c).y(kc),p.defined(Tp).curve(c),p(d)},kl=function(t){var n=t.className,r=t.points,i=t.path,o=t.pathRef;if((!r||!r.length)&&!i)return null;var a=r&&r.length?mae(t):i;return j.createElement("path",$0({},ve(t,!1),Gh(t),{className:Te("recharts-curve",n),d:a,ref:o}))},N2={exports:{}},gae="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",yae=gae,vae=yae;function R2(){}function $2(){}$2.resetWarningCache=R2;var xae=function(){function e(r,i,o,a,s,l){if(l!==vae){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:$2,resetWarningCache:R2};return n.PropTypes=n,n};N2.exports=xae();var bae=N2.exports;const Ye=Ze(bae),{getOwnPropertyNames:wae,getOwnPropertySymbols:Sae}=Object,{hasOwnProperty:jae}=Object.prototype;function Qv(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function _p(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:o}=i,a=o.get(n),s=o.get(r);if(a&&s)return a===r&&s===n;o.set(n,r),o.set(r,n);const l=e(n,r,i);return o.delete(n),o.delete(r),l}}function Oae(e){return e!=null?e[Symbol.toStringTag]:void 0}function NC(e){return wae(e).concat(Sae(e))}const Pae=Object.hasOwn||((e,t)=>jae.call(e,t));function Ks(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Eae="__v",Aae="__o",Cae="_owner",{getOwnPropertyDescriptor:RC,keys:$C}=Object;function Tae(e,t){return e.byteLength===t.byteLength&&Em(new Uint8Array(e),new Uint8Array(t))}function _ae(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function kae(e,t){return e.byteLength===t.byteLength&&Em(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Nae(e,t){return Ks(e.getTime(),t.getTime())}function Rae(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function $ae(e,t){return e===t}function MC(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.entries();let a,s,l=0;for(;(a=o.next())&&!a.done;){const u=t.entries();let c=!1,d=0;for(;(s=u.next())&&!s.done;){if(i[d]){d++;continue}const p=a.value,m=s.value;if(n.equals(p[0],m[0],l,d,e,t,n)&&n.equals(p[1],m[1],p[0],m[0],e,t,n)){c=i[d]=!0;break}d++}if(!c)return!1;l++}return!0}const Mae=Ks;function Iae(e,t,n){const r=$C(e);let i=r.length;if($C(t).length!==i)return!1;for(;i-- >0;)if(!M2(e,t,n,r[i]))return!1;return!0}function Nc(e,t,n){const r=NC(e);let i=r.length;if(NC(t).length!==i)return!1;let o,a,s;for(;i-- >0;)if(o=r[i],!M2(e,t,n,o)||(a=RC(e,o),s=RC(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function Dae(e,t){return Ks(e.valueOf(),t.valueOf())}function Lae(e,t){return e.source===t.source&&e.flags===t.flags}function IC(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.values();let a,s;for(;(a=o.next())&&!a.done;){const l=t.values();let u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!i[c]&&n.equals(a.value,s.value,a.value,s.value,e,t,n)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function Em(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Fae(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function M2(e,t,n,r){return(r===Cae||r===Aae||r===Eae)&&(e.$$typeof||t.$$typeof)?!0:Pae(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Bae="[object ArrayBuffer]",Uae="[object Arguments]",zae="[object Boolean]",Hae="[object DataView]",Vae="[object Date]",Wae="[object Error]",qae="[object Map]",Kae="[object Number]",Gae="[object Object]",Xae="[object RegExp]",Yae="[object Set]",Qae="[object String]",Jae={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Zae="[object URL]",ese=Object.prototype.toString;function tse({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:a,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:m,unknownTagComparators:v}){return function(g,y,x){if(g===y)return!0;if(g==null||y==null)return!1;const b=typeof g;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?s(g,y,x):b==="function"?o(g,y,x):!1;const S=g.constructor;if(S!==y.constructor)return!1;if(S===Object)return l(g,y,x);if(Array.isArray(g))return t(g,y,x);if(S===Date)return r(g,y,x);if(S===RegExp)return c(g,y,x);if(S===Map)return a(g,y,x);if(S===Set)return d(g,y,x);const w=ese.call(g);if(w===Vae)return r(g,y,x);if(w===Xae)return c(g,y,x);if(w===qae)return a(g,y,x);if(w===Yae)return d(g,y,x);if(w===Gae)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,x);if(w===Zae)return m(g,y,x);if(w===Wae)return i(g,y,x);if(w===Uae)return l(g,y,x);if(Jae[w])return p(g,y,x);if(w===Bae)return e(g,y,x);if(w===Hae)return n(g,y,x);if(w===zae||w===Kae||w===Qae)return u(g,y,x);if(v){let O=v[w];if(!O){const P=Oae(g);P&&(O=v[P])}if(O)return O(g,y,x)}return!1}}function nse({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Tae,areArraysEqual:n?Nc:_ae,areDataViewsEqual:kae,areDatesEqual:Nae,areErrorsEqual:Rae,areFunctionsEqual:$ae,areMapsEqual:n?Qv(MC,Nc):MC,areNumbersEqual:Mae,areObjectsEqual:n?Nc:Iae,arePrimitiveWrappersEqual:Dae,areRegExpsEqual:Lae,areSetsEqual:n?Qv(IC,Nc):IC,areTypedArraysEqual:n?Qv(Em,Nc):Em,areUrlsEqual:Fae,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=_p(r.areArraysEqual),o=_p(r.areMapsEqual),a=_p(r.areObjectsEqual),s=_p(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:s})}return r}function rse(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function ise({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:c}=n();return t(s,l,{cache:u,equals:r,meta:c,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(s,l){return t(s,l,o)}}const ose=ka();ka({strict:!0});ka({circular:!0});ka({circular:!0,strict:!0});ka({createInternalComparator:()=>Ks});ka({strict:!0,createInternalComparator:()=>Ks});ka({circular:!0,createInternalComparator:()=>Ks});ka({circular:!0,createInternalComparator:()=>Ks,strict:!0});function ka(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=nse(e),a=tse(o),s=n?n(a):rse(a);return ise({circular:t,comparator:a,createState:r,equals:s,strict:i})}function ase(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function DC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):ase(i)};requestAnimationFrame(r)}function M0(e){"@babel/helpers - typeof";return M0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M0(e)}function sse(e){return fse(e)||cse(e)||use(e)||lse()}function lse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
114
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function use(e,t){if(e){if(typeof e=="string")return LC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LC(e,t)}}function LC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fse(e){if(Array.isArray(e))return e}function dse(){var e={},t=function(){return null},n=!1,r=function i(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var a=o,s=sse(a),l=s[0],u=s.slice(1);if(typeof l=="number"){DC(i.bind(null,u),l);return}i(l),DC(i.bind(null,u));return}M0(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function id(e){"@babel/helpers - typeof";return id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},id(e)}function FC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function BC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FC(Object(n),!0).forEach(function(r){I2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I2(e,t,n){return t=pse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pse(e){var t=hse(e,"string");return id(t)==="symbol"?t:String(t)}function hse(e,t){if(id(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(id(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mse=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},gse=function(t){return t},yse=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},uf=function(t,n){return Object.keys(n).reduce(function(r,i){return BC(BC({},r),{},I2({},i,t(i,n[i])))},{})},UC=function(t,n,r){return t.map(function(i){return"".concat(yse(i)," ").concat(n,"ms ").concat(r)}).join(",")};function vse(e,t){return wse(e)||bse(e,t)||D2(e,t)||xse()}function xse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
115
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function wse(e){if(Array.isArray(e))return e}function Sse(e){return Pse(e)||Ose(e)||D2(e)||jse()}function jse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
116
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D2(e,t){if(e){if(typeof e=="string")return I0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I0(e,t)}}function Ose(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Pse(e){if(Array.isArray(e))return I0(e)}function I0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Am=1e-4,L2=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},F2=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},zC=function(t,n){return function(r){var i=L2(t,n);return F2(i,r)}},Ese=function(t,n){return function(r){var i=L2(t,n),o=[].concat(Sse(i.map(function(a,s){return a*s}).slice(1)),[0]);return F2(o,r)}},HC=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1],a=n[2],s=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,o=0,a=1,s=1;break;case"ease":i=.25,o=.1,a=.25,s=1;break;case"ease-in":i=.42,o=0,a=1,s=1;break;case"ease-out":i=.42,o=0,a=.58,s=1;break;case"ease-in-out":i=0,o=0,a=.58,s=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(g){return parseFloat(g)}),c=vse(u,4);i=c[0],o=c[1],a=c[2],s=c[3]}}}var d=zC(i,a),p=zC(o,s),m=Ese(i,a),v=function(y){return y>1?1:y<0?0:y},h=function(y){for(var x=y>1?1:y,b=x,S=0;S<8;++S){var w=d(b)-x,O=m(b);if(Math.abs(w-x)<Am||O<Am)return p(b);b=v(b-w/O)}return p(b)};return h.isStepper=!1,h},Ase=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,l=function(c,d,p){var m=-(c-d)*r,v=p*o,h=p+(m-v)*s/1e3,g=p*s/1e3+c;return Math.abs(g-d)<Am&&Math.abs(h)<Am?[d,0]:[g,h]};return l.isStepper=!0,l.dt=s,l},Cse=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return HC(i);case"spring":return Ase();default:if(i.split("(")[0]==="cubic-bezier")return HC(i)}return typeof i=="function"?i:null};function od(e){"@babel/helpers - typeof";return od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},od(e)}function VC(e){return kse(e)||_se(e)||B2(e)||Tse()}function Tse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
117
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _se(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kse(e){if(Array.isArray(e))return L0(e)}function WC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WC(Object(n),!0).forEach(function(r){D0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D0(e,t,n){return t=Nse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nse(e){var t=Rse(e,"string");return od(t)==="symbol"?t:String(t)}function Rse(e,t){if(od(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(od(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $se(e,t){return Dse(e)||Ise(e,t)||B2(e,t)||Mse()}function Mse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
118
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B2(e,t){if(e){if(typeof e=="string")return L0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L0(e,t)}}function L0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ise(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Dse(e){if(Array.isArray(e))return e}var Cm=function(t,n,r){return t+(n-t)*r},F0=function(t){var n=t.from,r=t.to;return n!==r},Lse=function e(t,n,r){var i=uf(function(o,a){if(F0(a)){var s=t(a.from,a.to,a.velocity),l=$se(s,2),u=l[0],c=l[1];return cn(cn({},a),{},{from:u,velocity:c})}return a},n);return r<1?uf(function(o,a){return F0(a)?cn(cn({},a),{},{velocity:Cm(a.velocity,i[o].velocity,r),from:Cm(a.from,i[o].from,r)}):a},n):e(t,i,r-1)};const Fse=function(e,t,n,r,i){var o=mse(e,t),a=o.reduce(function(g,y){return cn(cn({},g),{},D0({},y,[e[y],t[y]]))},{}),s=o.reduce(function(g,y){return cn(cn({},g),{},D0({},y,{from:e[y],velocity:0,to:t[y]}))},{}),l=-1,u,c,d=function(){return null},p=function(){return uf(function(y,x){return x.from},s)},m=function(){return!Object.values(s).filter(F0).length},v=function(y){u||(u=y);var x=y-u,b=x/n.dt;s=Lse(n,s,b),i(cn(cn(cn({},e),t),p())),u=y,m()||(l=requestAnimationFrame(d))},h=function(y){c||(c=y);var x=(y-c)/r,b=uf(function(w,O){return Cm.apply(void 0,VC(O).concat([n(x)]))},a);if(i(cn(cn(cn({},e),t),b)),x<1)l=requestAnimationFrame(d);else{var S=uf(function(w,O){return Cm.apply(void 0,VC(O).concat([n(1)]))},a);i(cn(cn(cn({},e),t),S))}};return d=n.isStepper?v:h,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(l)}}};function du(e){"@babel/helpers - typeof";return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},du(e)}var Bse=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Use(e,t){if(e==null)return{};var n=zse(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zse(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Jv(e){return qse(e)||Wse(e)||Vse(e)||Hse()}function Hse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
119
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vse(e,t){if(e){if(typeof e=="string")return B0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B0(e,t)}}function Wse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qse(e){if(Array.isArray(e))return B0(e)}function B0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qC(Object(n),!0).forEach(function(r){Wc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wc(e,t,n){return t=U2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gse(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,U2(r.key),r)}}function Xse(e,t,n){return t&&Gse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function U2(e){var t=Yse(e,"string");return du(t)==="symbol"?t:String(t)}function Yse(e,t){if(du(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(du(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qse(e,t){if(typeof t!="function"&&t!==null)throw new 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&&U0(e,t)}function U0(e,t){return U0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},U0(e,t)}function Jse(e){var t=Zse();return function(){var r=Tm(e),i;if(t){var o=Tm(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return z0(this,i)}}function z0(e,t){if(t&&(du(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return H0(e)}function H0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zse(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tm(e)}var ei=function(e){Qse(n,e);var t=Jse(n);function n(r,i){var o;Kse(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,l=a.attributeName,u=a.from,c=a.to,d=a.steps,p=a.children,m=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(H0(o)),o.changeStyle=o.changeStyle.bind(H0(o)),!s||m<=0)return o.state={style:{}},typeof p=="function"&&(o.state={style:c}),z0(o);if(d&&d.length)o.state={style:d[0].style};else if(u){if(typeof p=="function")return o.state={style:u},z0(o);o.state={style:l?Wc({},l,u):u}}else o.state={style:{}};return o}return Xse(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,s=o.canBegin,l=o.attributeName,u=o.shouldReAnimate,c=o.to,d=o.from,p=this.state.style;if(s){if(!a){var m={style:l?Wc({},l,c):c};this.state&&p&&(l&&p[l]!==c||!l&&p!==c)&&this.setState(m);return}if(!(ose(i.to,c)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var h=v||u?d:i.to;if(this.state&&p){var g={style:l?Wc({},l,h):h};(l&&p[l]!==h||!l&&p!==h)&&this.setState(g)}this.runAnimation(Ur(Ur({},this.props),{},{from:h,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,s=i.to,l=i.duration,u=i.easing,c=i.begin,d=i.onAnimationEnd,p=i.onAnimationStart,m=Fse(a,s,Cse(u),l,this.changeStyle),v=function(){o.stopJSAnimation=m()};this.manager.start([p,c,v,l,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,l=i.onAnimationStart,u=a[0],c=u.style,d=u.duration,p=d===void 0?0:d,m=function(h,g,y){if(y===0)return h;var x=g.duration,b=g.easing,S=b===void 0?"ease":b,w=g.style,O=g.properties,P=g.onAnimationEnd,E=y>0?a[y-1]:g,A=O||Object.keys(w);if(typeof S=="function"||S==="spring")return[].concat(Jv(h),[o.runJSAnimation.bind(o,{from:E.style,to:w,duration:x,easing:S}),x]);var C=UC(A,x,S),T=Ur(Ur(Ur({},E.style),w),{},{transition:C});return[].concat(Jv(h),[T,x,P]).filter(gse)};return this.manager.start([l].concat(Jv(a.reduce(m,[c,Math.max(p,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=dse());var o=i.begin,a=i.duration,s=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,d=i.onAnimationEnd,p=i.steps,m=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var h=s?Wc({},s,l):l,g=UC(Object.keys(h),a,u);v.start([c,o,Ur(Ur({},h),{},{transition:g}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=Use(i,Bse),u=j.Children.count(o),c=this.state.style;if(typeof o=="function")return o(c);if(!s||u===0||a<=0)return o;var d=function(m){var v=m.props,h=v.style,g=h===void 0?{}:h,y=v.className,x=j.cloneElement(m,Ur(Ur({},l),{},{style:Ur(Ur({},g),c),className:y}));return x};return u===1?d(j.Children.only(o)):D.createElement("div",null,j.Children.map(o,function(p){return d(p)}))}}]),n}(j.PureComponent);ei.displayName="Animate";ei.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ei.propTypes={from:Ye.oneOfType([Ye.object,Ye.string]),to:Ye.oneOfType([Ye.object,Ye.string]),attributeName:Ye.string,duration:Ye.number,begin:Ye.number,easing:Ye.oneOfType([Ye.string,Ye.func]),steps:Ye.arrayOf(Ye.shape({duration:Ye.number.isRequired,style:Ye.object.isRequired,easing:Ye.oneOfType([Ye.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ye.func]),properties:Ye.arrayOf("string"),onAnimationEnd:Ye.func})),children:Ye.oneOfType([Ye.node,Ye.func]),isActive:Ye.bool,canBegin:Ye.bool,onAnimationEnd:Ye.func,shouldReAnimate:Ye.bool,onAnimationStart:Ye.func,onAnimationReStart:Ye.func};function ad(e){"@babel/helpers - typeof";return ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ad(e)}function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_m.apply(this,arguments)}function ele(e,t){return ile(e)||rle(e,t)||nle(e,t)||tle()}function tle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
120
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nle(e,t){if(e){if(typeof e=="string")return KC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KC(e,t)}}function KC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function ile(e){if(Array.isArray(e))return e}function GC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function XC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GC(Object(n),!0).forEach(function(r){ole(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ole(e,t,n){return t=ale(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ale(e){var t=sle(e,"string");return ad(t)=="symbol"?t:t+""}function sle(e,t){if(ad(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ad(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YC=function(t,n,r,i,o){var a=Math.min(Math.abs(r)/2,Math.abs(i)/2),s=i>=0?1:-1,l=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,c;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],p=0,m=4;p<m;p++)d[p]=o[p]>a?a:o[p];c="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(c+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(n)),c+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(c+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
|
|
121
|
-
`).concat(t+r,",").concat(n+s*d[1])),c+="L ".concat(t+r,",").concat(n+i-s*d[2]),d[2]>0&&(c+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
|
|
122
|
-
`).concat(t+r-l*d[2],",").concat(n+i)),c+="L ".concat(t+l*d[3],",").concat(n+i),d[3]>0&&(c+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
|
|
123
|
-
`).concat(t,",").concat(n+i-s*d[3])),c+="Z"}else if(a>0&&o===+o&&o>0){var v=Math.min(a,o);c="M ".concat(t,",").concat(n+s*v,`
|
|
124
|
-
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(n,`
|
|
125
|
-
L `).concat(t+r-l*v,",").concat(n,`
|
|
126
|
-
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*v,`
|
|
127
|
-
L `).concat(t+r,",").concat(n+i-s*v,`
|
|
128
|
-
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+r-l*v,",").concat(n+i,`
|
|
129
|
-
L `).concat(t+l*v,",").concat(n+i,`
|
|
130
|
-
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(n+i-s*v," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return c},lle=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(o,o+s),c=Math.max(o,o+s),d=Math.min(a,a+l),p=Math.max(a,a+l);return r>=u&&r<=c&&i>=d&&i<=p}return!1},ule={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},lj=function(t){var n=XC(XC({},ule),t),r=j.useRef(),i=j.useState(-1),o=ele(i,2),a=o[0],s=o[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&s(S)}catch{}},[]);var l=n.x,u=n.y,c=n.width,d=n.height,p=n.radius,m=n.className,v=n.animationEasing,h=n.animationDuration,g=n.animationBegin,y=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||d!==+d||c===0||d===0)return null;var b=Te("recharts-rectangle",m);return x?D.createElement(ei,{canBegin:a>0,from:{width:c,height:d,x:l,y:u},to:{width:c,height:d,x:l,y:u},duration:h,animationEasing:v,isActive:x},function(S){var w=S.width,O=S.height,P=S.x,E=S.y;return D.createElement(ei,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:h,isActive:y,easing:v},D.createElement("path",_m({},ve(n,!0),{className:b,d:YC(P,E,w,O,p),ref:r})))}):D.createElement("path",_m({},ve(n,!0),{className:b,d:YC(l,u,c,d,p)}))},cle=["points","className","baseLinePoints","connectNulls"];function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ml.apply(this,arguments)}function fle(e,t){if(e==null)return{};var n=dle(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function QC(e){return gle(e)||mle(e)||hle(e)||ple()}function ple(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
131
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hle(e,t){if(e){if(typeof e=="string")return V0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V0(e,t)}}function mle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gle(e){if(Array.isArray(e))return V0(e)}function V0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var JC=function(t){return t&&t.x===+t.x&&t.y===+t.y},yle=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){JC(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),JC(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},cf=function(t,n){var r=yle(t);n&&(r=[r.reduce(function(o,a){return[].concat(QC(o),QC(a))},[])]);var i=r.map(function(o){return o.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},vle=function(t,n,r){var i=cf(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(cf(n.reverse(),r).slice(1))},xle=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,a=fle(t,cle);if(!n||!n.length)return null;var s=Te("recharts-polygon",r);if(i&&i.length){var l=a.stroke&&a.stroke!=="none",u=vle(n,i,o);return D.createElement("g",{className:s},D.createElement("path",ml({},ve(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:u})),l?D.createElement("path",ml({},ve(a,!0),{fill:"none",d:cf(n,o)})):null,l?D.createElement("path",ml({},ve(a,!0),{fill:"none",d:cf(i,o)})):null)}var c=cf(n,o);return D.createElement("path",ml({},ve(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",className:s,d:c}))};function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W0.apply(this,arguments)}var my=function(t){var n=t.cx,r=t.cy,i=t.r,o=t.className,a=Te("recharts-dot",o);return n===+n&&r===+r&&i===+i?j.createElement("circle",W0({},ve(t,!1),Gh(t),{className:a,cx:n,cy:r,r:i})):null};function sd(e){"@babel/helpers - typeof";return sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sd(e)}var ble=["x","y","top","left","width","height","className"];function q0(){return q0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q0.apply(this,arguments)}function ZC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wle(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZC(Object(n),!0).forEach(function(r){Sle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sle(e,t,n){return t=jle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jle(e){var t=Ole(e,"string");return sd(t)=="symbol"?t:t+""}function Ole(e,t){if(sd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ple(e,t){if(e==null)return{};var n=Ele(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ele(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ale=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},Cle=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,l=t.left,u=l===void 0?0:l,c=t.width,d=c===void 0?0:c,p=t.height,m=p===void 0?0:p,v=t.className,h=Ple(t,ble),g=wle({x:r,y:o,top:s,left:u,width:d,height:m},h);return!ne(r)||!ne(o)||!ne(d)||!ne(m)||!ne(s)||!ne(u)?null:D.createElement("path",q0({},ve(g,!0),{className:Te("recharts-cross",v),d:Ale(r,o,d,m,s,u)}))},Tle=cy,_le=YI,kle=Ci;function Nle(e,t){return e&&e.length?Tle(e,kle(t),_le):void 0}var Rle=Nle;const $le=Ze(Rle);var Mle=cy,Ile=Ci,Dle=QI;function Lle(e,t){return e&&e.length?Mle(e,Ile(t),Dle):void 0}var Fle=Lle;const Ble=Ze(Fle);var Ule=["cx","cy","angle","ticks","axisLine"],zle=["ticks","tick","angle","tickFormatter","stroke"];function pu(e){"@babel/helpers - typeof";return pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(e)}function ff(){return ff=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ff.apply(this,arguments)}function eT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eT(Object(n),!0).forEach(function(r){gy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tT(e,t){if(e==null)return{};var n=Hle(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Vle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nT(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,H2(r.key),r)}}function Wle(e,t,n){return t&&nT(e.prototype,t),n&&nT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qle(e,t,n){return t=km(t),Kle(e,z2()?Reflect.construct(t,n||[],km(e).constructor):t.apply(e,n))}function Kle(e,t){if(t&&(pu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gle(e)}function Gle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z2=function(){return!!e})()}function km(e){return km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},km(e)}function Xle(e,t){if(typeof t!="function"&&t!==null)throw new 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&&K0(e,t)}function K0(e,t){return K0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},K0(e,t)}function gy(e,t,n){return t=H2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H2(e){var t=Yle(e,"string");return pu(t)=="symbol"?t:t+""}function Yle(e,t){if(pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zd=function(e){function t(){return Vle(this,t),qle(this,t,arguments)}return Xle(t,e),Wle(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,o=this.props,a=o.angle,s=o.cx,l=o.cy;return st(s,l,i,a)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,o=r.cy,a=r.angle,s=r.ticks,l=$le(s,function(c){return c.coordinate||0}),u=Ble(s,function(c){return c.coordinate||0});return{cx:i,cy:o,startAngle:a,endAngle:a,innerRadius:u.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,a=r.angle,s=r.ticks,l=r.axisLine,u=tT(r,Ule),c=s.reduce(function(v,h){return[Math.min(v[0],h.coordinate),Math.max(v[1],h.coordinate)]},[1/0,-1/0]),d=st(i,o,c[0],a),p=st(i,o,c[1],a),m=Ba(Ba(Ba({},ve(u,!1)),{},{fill:"none"},ve(l,!1)),{},{x1:d.x,y1:d.y,x2:p.x,y2:p.y});return D.createElement("line",ff({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,a=i.tick,s=i.angle,l=i.tickFormatter,u=i.stroke,c=tT(i,zle),d=this.getTickTextAnchor(),p=ve(c,!1),m=ve(a,!1),v=o.map(function(h,g){var y=r.getTickValueCoord(h),x=Ba(Ba(Ba(Ba({textAnchor:d,transform:"rotate(".concat(90-s,", ").concat(y.x,", ").concat(y.y,")")},p),{},{stroke:"none",fill:u},m),{},{index:g},y),{},{payload:h});return D.createElement(Le,ff({className:Te("recharts-polar-radius-axis-tick",C2(a)),key:"tick-".concat(h.coordinate)},ao(r.props,h,g)),t.renderTickItem(a,x,l?l(h.value,g):h.value))});return D.createElement(Le,{className:"recharts-polar-radius-axis-ticks"},v)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.axisLine,a=r.tick;return!i||!i.length?null:D.createElement(Le,{className:Te("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),a&&this.renderTicks(),Qt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return D.isValidElement(r)?a=D.cloneElement(r,i):je(r)?a=r(i):a=D.createElement(Ts,ff({},i,{className:"recharts-polar-radius-axis-tick-value"}),o),a}}])}(j.PureComponent);gy(zd,"displayName","PolarRadiusAxis");gy(zd,"axisType","radiusAxis");gy(zd,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function hu(e){"@babel/helpers - typeof";return hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(e)}function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ga.apply(this,arguments)}function rT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ua(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rT(Object(n),!0).forEach(function(r){yy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iT(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,W2(r.key),r)}}function Jle(e,t,n){return t&&iT(e.prototype,t),n&&iT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zle(e,t,n){return t=Nm(t),eue(e,V2()?Reflect.construct(t,n||[],Nm(e).constructor):t.apply(e,n))}function eue(e,t){if(t&&(hu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tue(e)}function tue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(V2=function(){return!!e})()}function Nm(e){return Nm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nm(e)}function nue(e,t){if(typeof t!="function"&&t!==null)throw new 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&&G0(e,t)}function G0(e,t){return G0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},G0(e,t)}function yy(e,t,n){return t=W2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W2(e){var t=rue(e,"string");return hu(t)=="symbol"?t:t+""}function rue(e,t){if(hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var iue=Math.PI/180,oT=1e-5,nc=function(e){function t(){return Qle(this,t),Zle(this,t,arguments)}return nue(t,e),Jle(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.cx,a=i.cy,s=i.radius,l=i.orientation,u=i.tickSize,c=u||8,d=st(o,a,s,r.coordinate),p=st(o,a,s+(l==="inner"?-1:1)*c,r.coordinate);return{x1:d.x,y1:d.y,x2:p.x,y2:p.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,o=Math.cos(-r.coordinate*iue),a;return o>oT?a=i==="outer"?"start":"end":o<-oT?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,u=Ua(Ua({},ve(this.props,!1)),{},{fill:"none"},ve(s,!1));if(l==="circle")return D.createElement(my,Ga({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:o,r:a}));var c=this.props.ticks,d=c.map(function(p){return st(i,o,a,p.coordinate)});return D.createElement(xle,Ga({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,a=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,c=ve(this.props,!1),d=ve(a,!1),p=Ua(Ua({},c),{},{fill:"none"},ve(s,!1)),m=o.map(function(v,h){var g=r.getTickLineCoord(v),y=r.getTickTextAnchor(v),x=Ua(Ua(Ua({textAnchor:y},c),{},{stroke:"none",fill:u},d),{},{index:h,payload:v,x:g.x2,y:g.y2});return D.createElement(Le,Ga({className:Te("recharts-polar-angle-axis-tick",C2(a)),key:"tick-".concat(v.coordinate)},ao(r.props,v,h)),s&&D.createElement("line",Ga({className:"recharts-polar-angle-axis-tick-line"},p,g)),a&&t.renderTickItem(a,x,l?l(v.value,h):v.value))});return D.createElement(Le,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.radius,a=r.axisLine;return o<=0||!i||!i.length?null:D.createElement(Le,{className:Te("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,o){var a;return D.isValidElement(r)?a=D.cloneElement(r,i):je(r)?a=r(i):a=D.createElement(Ts,Ga({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),a}}])}(j.PureComponent);yy(nc,"displayName","PolarAngleAxis");yy(nc,"axisType","angleAxis");yy(nc,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var oue=KM,aue=oue(Object.getPrototypeOf,Object),sue=aue,lue=xo,uue=sue,cue=bo,fue="[object Object]",due=Function.prototype,pue=Object.prototype,q2=due.toString,hue=pue.hasOwnProperty,mue=q2.call(Object);function gue(e){if(!cue(e)||lue(e)!=fue)return!1;var t=uue(e);if(t===null)return!0;var n=hue.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&q2.call(n)==mue}var yue=gue;const vue=Ze(yue);var xue=xo,bue=bo,wue="[object Boolean]";function Sue(e){return e===!0||e===!1||bue(e)&&xue(e)==wue}var jue=Sue;const Oue=Ze(jue);function ld(e){"@babel/helpers - typeof";return ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ld(e)}function Rm(){return Rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rm.apply(this,arguments)}function Pue(e,t){return Tue(e)||Cue(e,t)||Aue(e,t)||Eue()}function Eue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
132
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aue(e,t){if(e){if(typeof e=="string")return aT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aT(e,t)}}function aT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cue(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Tue(e){if(Array.isArray(e))return e}function sT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sT(Object(n),!0).forEach(function(r){_ue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ue(e,t,n){return t=kue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kue(e){var t=Nue(e,"string");return ld(t)=="symbol"?t:t+""}function Nue(e,t){if(ld(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ld(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uT=function(t,n,r,i,o){var a=r-i,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-a/2,",").concat(n+o),s+="L ".concat(t+r-a/2-i,",").concat(n+o),s+="L ".concat(t,",").concat(n," Z"),s},Rue={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$ue=function(t){var n=lT(lT({},Rue),t),r=j.useRef(),i=j.useState(-1),o=Pue(i,2),a=o[0],s=o[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var b=r.current.getTotalLength();b&&s(b)}catch{}},[]);var l=n.x,u=n.y,c=n.upperWidth,d=n.lowerWidth,p=n.height,m=n.className,v=n.animationEasing,h=n.animationDuration,g=n.animationBegin,y=n.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||d!==+d||p!==+p||c===0&&d===0||p===0)return null;var x=Te("recharts-trapezoid",m);return y?D.createElement(ei,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:u},to:{upperWidth:c,lowerWidth:d,height:p,x:l,y:u},duration:h,animationEasing:v,isActive:y},function(b){var S=b.upperWidth,w=b.lowerWidth,O=b.height,P=b.x,E=b.y;return D.createElement(ei,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:h,easing:v},D.createElement("path",Rm({},ve(n,!0),{className:x,d:uT(P,E,S,w,O),ref:r})))}):D.createElement("g",null,D.createElement("path",Rm({},ve(n,!0),{className:x,d:uT(l,u,c,d,p)})))},Mue=["option","shapeType","propTransformer","activeClassName","isActive"];function ud(e){"@babel/helpers - typeof";return ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ud(e)}function Iue(e,t){if(e==null)return{};var n=Due(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Due(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function cT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $m(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cT(Object(n),!0).forEach(function(r){Lue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lue(e,t,n){return t=Fue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fue(e){var t=Bue(e,"string");return ud(t)=="symbol"?t:t+""}function Bue(e,t){if(ud(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ud(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uue(e,t){return $m($m({},t),e)}function zue(e,t){return e==="symbols"}function fT(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return D.createElement(lj,n);case"trapezoid":return D.createElement($ue,n);case"sector":return D.createElement(k2,n);case"symbols":if(zue(t))return D.createElement(ES,n);break;default:return null}}function Hue(e){return j.isValidElement(e)?e.props:e}function uj(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Uue:r,o=e.activeClassName,a=o===void 0?"recharts-active-shape":o,s=e.isActive,l=Iue(e,Mue),u;if(j.isValidElement(t))u=j.cloneElement(t,$m($m({},l),Hue(t)));else if(je(t))u=t(l);else if(vue(t)&&!Oue(t)){var c=i(t,l);u=D.createElement(fT,{shapeType:n,elementProps:c})}else{var d=l;u=D.createElement(fT,{shapeType:n,elementProps:d})}return s?D.createElement(Le,{className:a},u):u}function vy(e,t){return t!=null&&"trapezoids"in e.props}function xy(e,t){return t!=null&&"sectors"in e.props}function cd(e,t){return t!=null&&"points"in e.props}function Vue(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&o}function Wue(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function que(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Kue(e,t){var n;return vy(e,t)?n=Vue:xy(e,t)?n=Wue:cd(e,t)&&(n=que),n}function Gue(e,t){var n;return vy(e,t)?n="trapezoids":xy(e,t)?n="sectors":cd(e,t)&&(n="points"),n}function Xue(e,t){if(vy(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(xy(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return cd(e,t)?t.payload:{}}function Yue(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Gue(n,t),o=Xue(n,t),a=r.filter(function(l,u){var c=_s(o,l),d=n.props[i].filter(function(v){var h=Kue(n,t);return h(v,t)}),p=n.props[i].indexOf(d[d.length-1]),m=u===p;return c&&m}),s=r.indexOf(a[a.length-1]);return s}var ch;function mu(e){"@babel/helpers - typeof";return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(e)}function gl(){return gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gl.apply(this,arguments)}function dT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dT(Object(n),!0).forEach(function(r){Ar(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Que(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pT(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,G2(r.key),r)}}function Jue(e,t,n){return t&&pT(e.prototype,t),n&&pT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zue(e,t,n){return t=Mm(t),ece(e,K2()?Reflect.construct(t,n||[],Mm(e).constructor):t.apply(e,n))}function ece(e,t){if(t&&(mu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tce(e)}function tce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K2=function(){return!!e})()}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mm(e)}function nce(e,t){if(typeof t!="function"&&t!==null)throw new 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&&X0(e,t)}function X0(e,t){return X0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},X0(e,t)}function Ar(e,t,n){return t=G2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G2(e){var t=rce(e,"string");return mu(t)=="symbol"?t:t+""}function rce(e,t){if(mu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var So=function(e){function t(n){var r;return Que(this,t),r=Zue(this,t,[n]),Ar(r,"pieRef",null),Ar(r,"sectorRefs",[]),Ar(r,"id",Gu("recharts-pie-")),Ar(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),je(i)&&i()}),Ar(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),je(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return nce(t,e),Jue(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.label,s=o.labelLine,l=o.dataKey,u=o.valueKey,c=ve(this.props,!1),d=ve(a,!1),p=ve(s,!1),m=a&&a.offsetRadius||20,v=r.map(function(h,g){var y=(h.startAngle+h.endAngle)/2,x=st(h.cx,h.cy,h.outerRadius+m,y),b=lt(lt(lt(lt({},c),h),{},{stroke:"none"},d),{},{index:g,textAnchor:t.getTextAnchor(x.x,h.cx)},x),S=lt(lt(lt(lt({},c),h),{},{fill:"none",stroke:h.fill},p),{},{index:g,points:[st(h.cx,h.cy,h.outerRadius,y),x]}),w=l;return Ne(l)&&Ne(u)?w="value":Ne(l)&&(w=u),D.createElement(Le,{key:"label-".concat(h.startAngle,"-").concat(h.endAngle,"-").concat(h.midAngle,"-").concat(g)},s&&t.renderLabelLineItem(s,S,"line"),t.renderLabelItem(a,b,Dt(h,w)))});return D.createElement(Le,{className:"recharts-pie-labels"},v)}},{key:"renderSectorsStatically",value:function(r){var i=this,o=this.props,a=o.activeShape,s=o.blendStroke,l=o.inactiveShape;return r.map(function(u,c){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var d=i.isActiveIndex(c),p=l&&i.hasActiveIndex()?l:null,m=d?a:p,v=lt(lt({},u),{},{stroke:s?u.fill:u.stroke,tabIndex:-1});return D.createElement(Le,gl({ref:function(g){g&&!i.sectorRefs.includes(g)&&i.sectorRefs.push(g)},tabIndex:-1,className:"recharts-pie-sector"},ao(i.props,u,c),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(c)}),D.createElement(uj,gl({option:m,isActive:d,shapeType:"sector"},v)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,o=i.sectors,a=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,u=i.animationEasing,c=i.animationId,d=this.state,p=d.prevSectors,m=d.prevIsAnimationActive;return D.createElement(ei,{begin:s,duration:l,isActive:a,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(c,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(v){var h=v.t,g=[],y=o&&o[0],x=y.startAngle;return o.forEach(function(b,S){var w=p&&p[S],O=S>0?cr(b,"paddingAngle",0):0;if(w){var P=dn(w.endAngle-w.startAngle,b.endAngle-b.startAngle),E=lt(lt({},b),{},{startAngle:x+O,endAngle:x+P(h)+O});g.push(E),x=E.endAngle}else{var A=b.endAngle,C=b.startAngle,T=dn(0,A-C),_=T(h),k=lt(lt({},b),{},{startAngle:x+O,endAngle:x+_+O});g.push(k),x=k.endAngle}}),D.createElement(Le,null,r.renderSectorsStatically(g))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,o=r.isAnimationActive,a=this.state.prevSectors;return o&&i&&i.length&&(!a||!_s(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,o=i.hide,a=i.sectors,s=i.className,l=i.label,u=i.cx,c=i.cy,d=i.innerRadius,p=i.outerRadius,m=i.isAnimationActive,v=this.state.isAnimationFinished;if(o||!a||!a.length||!ne(u)||!ne(c)||!ne(d)||!ne(p))return null;var h=Te("recharts-pie",s);return D.createElement(Le,{tabIndex:this.props.rootTabIndex,className:h,ref:function(y){r.pieRef=y}},this.renderSectors(),l&&this.renderLabels(a),Qt.renderCallByParent(this.props,null,!1),(!m||v)&&Si.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,o){if(D.isValidElement(r))return D.cloneElement(r,i);if(je(r))return r(i);var a=Te("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return D.createElement(kl,gl({},i,{key:o,type:"linear",className:a}))}},{key:"renderLabelItem",value:function(r,i,o){if(D.isValidElement(r))return D.cloneElement(r,i);var a=o;if(je(r)&&(a=r(i),D.isValidElement(a)))return a;var s=Te("recharts-pie-label-text",typeof r!="boolean"&&!je(r)?r.className:"");return D.createElement(Ts,gl({},i,{alignmentBaseline:"middle",className:s}),a)}}])}(j.PureComponent);ch=So;Ar(So,"displayName","Pie");Ar(So,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Ca.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Ar(So,"parseDeltaAngle",function(e,t){var n=Jt(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Ar(So,"getRealPieData",function(e){var t=e.data,n=e.children,r=ve(e,!1),i=fr(n,Ju);return t&&t.length?t.map(function(o,a){return lt(lt(lt({payload:o},r),o),i&&i[a]&&i[a].props)}):i&&i.length?i.map(function(o){return lt(lt({},r),o.props)}):[]});Ar(So,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,o=t.height,a=E2(i,o),s=r+Fn(e.cx,i,i/2),l=n+Fn(e.cy,o,o/2),u=Fn(e.innerRadius,a,0),c=Fn(e.outerRadius,a,a*.8),d=e.maxRadius||Math.sqrt(i*i+o*o)/2;return{cx:s,cy:l,innerRadius:u,outerRadius:c,maxRadius:d}});Ar(So,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?lt(lt({},t.type.defaultProps),t.props):t.props,i=ch.getRealPieData(r);if(!i||!i.length)return null;var o=r.cornerRadius,a=r.startAngle,s=r.endAngle,l=r.paddingAngle,u=r.dataKey,c=r.nameKey,d=r.valueKey,p=r.tooltipType,m=Math.abs(r.minAngle),v=ch.parseCoordinateOfPie(r,n),h=ch.parseDeltaAngle(a,s),g=Math.abs(h),y=u;Ne(u)&&Ne(d)?(Qr(!1,`Use "dataKey" to specify the value of pie,
|
|
133
|
-
the props "valueKey" will be deprecated in 1.1.0`),y="value"):Ne(u)&&(Qr(!1,`Use "dataKey" to specify the value of pie,
|
|
134
|
-
the props "valueKey" will be deprecated in 1.1.0`),y=d);var x=i.filter(function(E){return Dt(E,y,0)!==0}).length,b=(g>=360?x:x-1)*l,S=g-x*m-b,w=i.reduce(function(E,A){var C=Dt(A,y,0);return E+(ne(C)?C:0)},0),O;if(w>0){var P;O=i.map(function(E,A){var C=Dt(E,y,0),T=Dt(E,c,A),_=(ne(C)?C:0)/w,k;A?k=P.endAngle+Jt(h)*l*(C!==0?1:0):k=a;var $=k+Jt(h)*((C!==0?m:0)+_*S),R=(k+$)/2,I=(v.innerRadius+v.outerRadius)/2,B=[{name:T,value:C,payload:E,dataKey:y,type:p}],N=st(v.cx,v.cy,I,R);return P=lt(lt(lt({percent:_,cornerRadius:o,name:T,tooltipPayload:B,midAngle:R,middleRadius:I,tooltipPosition:N},E),v),{},{value:Dt(E,y),startAngle:k,endAngle:$,payload:E,paddingAngle:Jt(h)*l}),P})}return lt(lt({},v),{},{sectors:O,data:i})});function fd(e){"@babel/helpers - typeof";return fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fd(e)}function Y0(){return Y0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y0.apply(this,arguments)}function hT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hT(Object(n),!0).forEach(function(r){ice(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ice(e,t,n){return t=oce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oce(e){var t=ace(e,"string");return fd(t)=="symbol"?t:t+""}function ace(e,t){if(fd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mT(e){return typeof e=="string"?parseInt(e,10):e}function sce(e,t){var n="".concat(t.cx||e.cx),r=Number(n),i="".concat(t.cy||e.cy),o=Number(i);return Zv(Zv(Zv({},t),e),{},{cx:r,cy:o})}function gT(e){return D.createElement(uj,Y0({shapeType:"sector",propTransformer:sce},e))}var lce=["shape","activeShape","activeIndex","cornerRadius"],uce=["value","background"];function gu(e){"@babel/helpers - typeof";return gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gu(e)}function Im(){return Im=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Im.apply(this,arguments)}function yT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yT(Object(n),!0).forEach(function(r){bs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vT(e,t){if(e==null)return{};var n=cce(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cce(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function fce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xT(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,Y2(r.key),r)}}function dce(e,t,n){return t&&xT(e.prototype,t),n&&xT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pce(e,t,n){return t=Dm(t),hce(e,X2()?Reflect.construct(t,n||[],Dm(e).constructor):t.apply(e,n))}function hce(e,t){if(t&&(gu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mce(e)}function mce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X2=function(){return!!e})()}function Dm(e){return Dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dm(e)}function gce(e,t){if(typeof t!="function"&&t!==null)throw new 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&&Q0(e,t)}function Q0(e,t){return Q0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Q0(e,t)}function bs(e,t,n){return t=Y2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y2(e){var t=yce(e,"string");return gu(t)=="symbol"?t:t+""}function yce(e,t){if(gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hd=function(e){function t(){var n;fce(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=pce(this,t,[].concat(i)),bs(n,"state",{isAnimationFinished:!1}),bs(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),je(a)&&a()}),bs(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),je(a)&&a()}),n}return gce(t,e),dce(t,[{key:"getDeltaAngle",value:function(){var r=this.props,i=r.startAngle,o=r.endAngle,a=Jt(o-i),s=Math.min(Math.abs(o-i),360);return a*s}},{key:"renderSectorsStatically",value:function(r){var i=this,o=this.props,a=o.shape,s=o.activeShape,l=o.activeIndex,u=o.cornerRadius,c=vT(o,lce),d=ve(c,!1);return r.map(function(p,m){var v=m===l,h=Gt(Gt(Gt(Gt({},d),{},{cornerRadius:mT(u)},p),ao(i.props,p,m)),{},{className:"recharts-radial-bar-sector ".concat(p.className),forceCornerRadius:c.forceCornerRadius,cornerIsExternal:c.cornerIsExternal,isActive:v,option:v?s:a});return D.createElement(gT,Im({},h,{key:"sector-".concat(m)}))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,o=i.data,a=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,u=i.animationEasing,c=i.animationId,d=this.state.prevData;return D.createElement(ei,{begin:s,duration:l,isActive:a,easing:u,from:{t:0},to:{t:1},key:"radialBar-".concat(c),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(p){var m=p.t,v=o.map(function(h,g){var y=d&&d[g];if(y){var x=dn(y.startAngle,h.startAngle),b=dn(y.endAngle,h.endAngle);return Gt(Gt({},h),{},{startAngle:x(m),endAngle:b(m)})}var S=h.endAngle,w=h.startAngle,O=dn(w,S);return Gt(Gt({},h),{},{endAngle:O(m)})});return D.createElement(Le,null,r.renderSectorsStatically(v))})}},{key:"renderSectors",value:function(){var r=this.props,i=r.data,o=r.isAnimationActive,a=this.state.prevData;return o&&i&&i.length&&(!a||!_s(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"renderBackground",value:function(r){var i=this,o=this.props.cornerRadius,a=ve(this.props.background,!1);return r.map(function(s,l){s.value;var u=s.background,c=vT(s,uce);if(!u)return null;var d=Gt(Gt(Gt(Gt(Gt({cornerRadius:mT(o)},c),{},{fill:"#eee"},u),a),ao(i.props,s,l)),{},{index:l,className:Te("recharts-radial-bar-background-sector",a==null?void 0:a.className),option:u,isActive:!1});return D.createElement(gT,Im({},d,{key:"sector-".concat(l)}))})}},{key:"render",value:function(){var r=this.props,i=r.hide,o=r.data,a=r.className,s=r.background,l=r.isAnimationActive;if(i||!o||!o.length)return null;var u=this.state.isAnimationFinished,c=Te("recharts-area",a);return D.createElement(Le,{className:c},s&&D.createElement(Le,{className:"recharts-radial-bar-background"},this.renderBackground(o)),D.createElement(Le,{className:"recharts-radial-bar-sectors"},this.renderSectors()),(!l||u)&&Si.renderCallByParent(Gt({},this.props),o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(j.PureComponent);bs(Hd,"displayName","RadialBar");bs(Hd,"defaultProps",{angleAxisId:0,radiusAxisId:0,minPointSize:0,hide:!1,legendType:"rect",data:[],isAnimationActive:!Ca.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease",forceCornerRadius:!1,cornerIsExternal:!1});bs(Hd,"getComposedData",function(e){var t=e.item,n=e.props,r=e.radiusAxis,i=e.radiusAxisTicks,o=e.angleAxis,a=e.angleAxisTicks,s=e.displayedData,l=e.dataKey,u=e.stackedData,c=e.barPosition,d=e.bandSize,p=e.dataStartIndex,m=b2(c,t);if(!m)return null;var v=o.cx,h=o.cy,g=n.layout,y=t.props,x=y.children,b=y.minPointSize,S=g==="radial"?o:r,w=u?S.scale.domain():null,O=j2({numericAxis:S}),P=fr(x,Ju),E=s.map(function(A,C){var T,_,k,$,R,I;if(u?T=w2(u[p+C],w):(T=Dt(A,l),Array.isArray(T)||(T=[O,T])),g==="radial"){_=Sm({axis:r,ticks:i,bandSize:d,offset:m.offset,entry:A,index:C}),R=o.scale(T[1]),$=o.scale(T[0]),k=_+m.size;var B=R-$;if(Math.abs(b)>0&&Math.abs(B)<Math.abs(b)){var N=Jt(B||b)*(Math.abs(b)-Math.abs(B));R+=N}I={background:{cx:v,cy:h,innerRadius:_,outerRadius:k,startAngle:n.startAngle,endAngle:n.endAngle}}}else{_=r.scale(T[0]),k=r.scale(T[1]),$=Sm({axis:o,ticks:a,bandSize:d,offset:m.offset,entry:A,index:C}),R=$+m.size;var L=k-_;if(Math.abs(b)>0&&Math.abs(L)<Math.abs(b)){var M=Jt(L||b)*(Math.abs(b)-Math.abs(L));k+=M}}return Gt(Gt(Gt(Gt({},A),I),{},{payload:A,value:u?T:T[1],cx:v,cy:h,innerRadius:_,outerRadius:k,startAngle:$,endAngle:R},P&&P[C]&&P[C].props),{},{tooltipPayload:[sj(t,A)],tooltipPosition:st(v,h,(_+k)/2,($+R)/2)})});return{data:E,layout:g}});var vce=Math.ceil,xce=Math.max;function bce(e,t,n,r){for(var i=-1,o=xce(vce((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}var wce=bce,Sce=dI,bT=1/0,jce=17976931348623157e292;function Oce(e){if(!e)return e===0?e:0;if(e=Sce(e),e===bT||e===-bT){var t=e<0?-1:1;return t*jce}return e===e?e:0}var Q2=Oce,Pce=wce,Ece=ry,ex=Q2;function Ace(e){return function(t,n,r){return r&&typeof r!="number"&&Ece(t,n,r)&&(n=r=void 0),t=ex(t),n===void 0?(n=t,t=0):n=ex(n),r=r===void 0?t<n?1:-1:ex(r),Pce(t,n,r,e)}}var Cce=Ace,Tce=Cce,_ce=Tce(),kce=_ce;const Lm=Ze(kce);function dd(e){"@babel/helpers - typeof";return dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dd(e)}function wT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ST(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wT(Object(n),!0).forEach(function(r){J2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J2(e,t,n){return t=Nce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nce(e){var t=Rce(e,"string");return dd(t)=="symbol"?t:t+""}function Rce(e,t){if(dd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $ce=["Webkit","Moz","O","ms"],Mce=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=$ce.reduce(function(o,a){return ST(ST({},o),{},J2({},a+r,n))},{});return i[t]=n,i};function yu(e){"@babel/helpers - typeof";return yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yu(e)}function Fm(){return Fm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fm.apply(this,arguments)}function jT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jT(Object(n),!0).forEach(function(r){ir(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ice(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OT(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,eD(r.key),r)}}function Dce(e,t,n){return t&&OT(e.prototype,t),n&&OT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lce(e,t,n){return t=Bm(t),Fce(e,Z2()?Reflect.construct(t,n||[],Bm(e).constructor):t.apply(e,n))}function Fce(e,t){if(t&&(yu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bce(e)}function Bce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z2=function(){return!!e})()}function Bm(e){return Bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bm(e)}function Uce(e,t){if(typeof t!="function"&&t!==null)throw new 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&&J0(e,t)}function J0(e,t){return J0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},J0(e,t)}function ir(e,t,n){return t=eD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eD(e){var t=zce(e,"string");return yu(t)=="symbol"?t:t+""}function zce(e,t){if(yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hce=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,o=t.x,a=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,u=sf().domain(Lm(0,l)).range([o,o+a-s]),c=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:c}},PT=function(t){return t.changedTouches&&!!t.changedTouches.length},ma=function(e){function t(n){var r;return Ice(this,t),r=Lce(this,t,[n]),ir(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),ir(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),ir(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a==null||a({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),ir(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),ir(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),ir(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),ir(r,"handleSlideDragStart",function(i){var o=PT(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Uce(t,e),Dce(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,d=Math.min(i,o),p=Math.max(i,o),m=t.getIndexInRange(a,d),v=t.getIndexInRange(a,p);return{startIndex:m-m%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,l=Dt(o[r],s,r);return je(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,l=this.props,u=l.x,c=l.width,d=l.travellerWidth,p=l.startIndex,m=l.endIndex,v=l.onChange,h=r.pageX-o;h>0?h=Math.min(h,u+c-d-s,u+c-d-a):h<0&&(h=Math.max(h,u-a,u-s));var g=this.getIndex({startX:a+h,endX:s+h});(g.startIndex!==p||g.endIndex!==m)&&v&&v(g),this.setState({startX:a+h,endX:s+h,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=PT(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[a],c=this.props,d=c.x,p=c.width,m=c.travellerWidth,v=c.onChange,h=c.gap,g=c.data,y={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,d+p-m-u):x<0&&(x=Math.max(x,d-u)),y[a]=u+x;var b=this.getIndex(y),S=b.startIndex,w=b.endIndex,O=function(){var E=g.length-1;return a==="startX"&&(s>l?S%h===0:w%h===0)||s<l&&w===E||a==="endX"&&(s>l?w%h===0:S%h===0)||s>l&&w===E};this.setState(ir(ir({},a,u+x),"brushMoveStartX",r.pageX),function(){v&&O()&&v(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,l=a.startX,u=a.endX,c=this.state[i],d=s.indexOf(c);if(d!==-1){var p=d+r;if(!(p===-1||p>=s.length)){var m=s[p];i==="startX"&&m>=u||i==="endX"&&m<=l||this.setState(ir({},i,m),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.fill,u=r.stroke;return D.createElement("rect",{stroke:u,fill:l,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.data,u=r.children,c=r.padding,d=j.Children.only(u);return d?D.cloneElement(d,{x:i,y:o,width:a,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,l=this.props,u=l.y,c=l.travellerWidth,d=l.height,p=l.traveller,m=l.ariaLabel,v=l.data,h=l.startIndex,g=l.endIndex,y=Math.max(r,this.props.x),x=tx(tx({},ve(this.props,!1)),{},{x:y,y:u,width:c,height:d}),b=m||"Min value: ".concat((o=v[h])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=v[g])===null||a===void 0?void 0:a.name);return D.createElement(Le,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,l=o.stroke,u=o.travellerWidth,c=Math.min(r,i)+u,d=Math.max(Math.abs(i-r)-u,0);return D.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,u=r.stroke,c=this.state,d=c.startX,p=c.endX,m=5,v={pointerEvents:"none",fill:u};return D.createElement(Le,{className:"recharts-brush-texts"},D.createElement(Ts,Fm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-m,y:a+s/2},v),this.getTextOfTick(i)),D.createElement(Ts,Fm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+l+m,y:a+s/2},v),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,l=r.y,u=r.width,c=r.height,d=r.alwaysShowText,p=this.state,m=p.startX,v=p.endX,h=p.isTextActive,g=p.isSlideMoving,y=p.isTravellerMoving,x=p.isTravellerFocused;if(!i||!i.length||!ne(s)||!ne(l)||!ne(u)||!ne(c)||u<=0||c<=0)return null;var b=Te("recharts-brush",o),S=D.Children.count(a)===1,w=Mce("userSelect","none");return D.createElement(Le,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(m,v),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(v,"endX"),(h||g||y||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,l=r.stroke,u=Math.floor(o+s/2)-1;return D.createElement(D.Fragment,null,D.createElement("rect",{x:i,y:o,width:a,height:s,fill:l,stroke:"none"}),D.createElement("line",{x1:i+1,y1:u,x2:i+a-1,y2:u,fill:"none",stroke:"#fff"}),D.createElement("line",{x1:i+1,y1:u+2,x2:i+a-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return D.isValidElement(r)?o=D.cloneElement(r,i):je(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,l=r.travellerWidth,u=r.updateId,c=r.startIndex,d=r.endIndex;if(o!==i.prevData||u!==i.prevUpdateId)return tx({prevData:o,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a},o&&o.length?Hce({data:o,width:a,x:s,travellerWidth:l,startIndex:c,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+a-l]);var p=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>i?s=l:a=l}return i>=r[s]?s:a}}])}(j.PureComponent);ir(ma,"displayName","Brush");ir(ma,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Vce=RS;function Wce(e,t){var n;return Vce(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var qce=Wce,Kce=FM,Gce=Ci,Xce=qce,Yce=tr,Qce=ry;function Jce(e,t,n){var r=Yce(e)?Kce:Xce;return n&&Qce(e,t,n)&&(t=void 0),r(e,Gce(t))}var Zce=Jce;const efe=Ze(Zce);var ji=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},ET=sI;function tfe(e,t,n){t=="__proto__"&&ET?ET(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var nfe=tfe,rfe=nfe,ife=oI,ofe=Ci;function afe(e,t){var n={};return t=ofe(t),ife(e,function(r,i,o){rfe(n,i,t(r,i,o))}),n}var sfe=afe;const lfe=Ze(sfe);function ufe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var cfe=ufe,ffe=RS;function dfe(e,t){var n=!0;return ffe(e,function(r,i,o){return n=!!t(r,i,o),n}),n}var pfe=dfe,hfe=cfe,mfe=pfe,gfe=Ci,yfe=tr,vfe=ry;function xfe(e,t,n){var r=yfe(e)?hfe:mfe;return n&&vfe(e,t,n)&&(t=void 0),r(e,gfe(t))}var bfe=xfe;const tD=Ze(bfe);var wfe=["x","y"];function pd(e){"@babel/helpers - typeof";return pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pd(e)}function Z0(){return Z0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z0.apply(this,arguments)}function AT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(n),!0).forEach(function(r){Sfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sfe(e,t,n){return t=jfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jfe(e){var t=Ofe(e,"string");return pd(t)=="symbol"?t:t+""}function Ofe(e,t){if(pd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pfe(e,t){if(e==null)return{};var n=Efe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Efe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Afe(e,t){var n=e.x,r=e.y,i=Pfe(e,wfe),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||i.height),c=parseInt(u,10),d="".concat(t.width||i.width),p=parseInt(d,10);return Rc(Rc(Rc(Rc(Rc({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:c,width:p,name:t.name,radius:t.radius})}function CT(e){return D.createElement(uj,Z0({shapeType:"rectangle",propTransformer:Afe,activeClassName:"recharts-active-bar"},e))}var Cfe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=ne(r)||L8(r);return o?t(r,i):(o||Ns(),n)}},Tfe=["value","background"],nD;function vu(e){"@babel/helpers - typeof";return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu(e)}function _fe(e,t){if(e==null)return{};var n=kfe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Um(){return Um=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Um.apply(this,arguments)}function TT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TT(Object(n),!0).forEach(function(r){Jo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _T(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,iD(r.key),r)}}function Rfe(e,t,n){return t&&_T(e.prototype,t),n&&_T(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $fe(e,t,n){return t=zm(t),Mfe(e,rD()?Reflect.construct(t,n||[],zm(e).constructor):t.apply(e,n))}function Mfe(e,t){if(t&&(vu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ife(e)}function Ife(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rD=function(){return!!e})()}function zm(e){return zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zm(e)}function Dfe(e,t){if(typeof t!="function"&&t!==null)throw new 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&&ew(e,t)}function ew(e,t){return ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ew(e,t)}function Jo(e,t,n){return t=iD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iD(e){var t=Lfe(e,"string");return vu(t)=="symbol"?t:t+""}function Lfe(e,t){if(vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jo=function(e){function t(){var n;Nfe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=$fe(this,t,[].concat(i)),Jo(n,"state",{isAnimationFinished:!1}),Jo(n,"id",Gu("recharts-bar-")),Jo(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),a&&a()}),Jo(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),a&&a()}),n}return Dfe(t,e),Rfe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,o=this.props,a=o.shape,s=o.dataKey,l=o.activeIndex,u=o.activeBar,c=ve(this.props,!1);return r&&r.map(function(d,p){var m=p===l,v=m?u:a,h=Mt(Mt(Mt({},c),d),{},{isActive:m,option:v,index:p,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return D.createElement(Le,Um({className:"recharts-bar-rectangle"},ao(i.props,d,p),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(p)}),D.createElement(CT,h))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,o=i.data,a=i.layout,s=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,c=i.animationEasing,d=i.animationId,p=this.state.prevData;return D.createElement(ei,{begin:l,duration:u,isActive:s,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var v=m.t,h=o.map(function(g,y){var x=p&&p[y];if(x){var b=dn(x.x,g.x),S=dn(x.y,g.y),w=dn(x.width,g.width),O=dn(x.height,g.height);return Mt(Mt({},g),{},{x:b(v),y:S(v),width:w(v),height:O(v)})}if(a==="horizontal"){var P=dn(0,g.height),E=P(v);return Mt(Mt({},g),{},{y:g.y+g.height-E,height:E})}var A=dn(0,g.width),C=A(v);return Mt(Mt({},g),{},{width:C})});return D.createElement(Le,null,r.renderRectanglesStatically(h))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,o=r.isAnimationActive,a=this.state.prevData;return o&&i&&i.length&&(!a||!_s(a,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,o=i.data,a=i.dataKey,s=i.activeIndex,l=ve(this.props.background,!1);return o.map(function(u,c){u.value;var d=u.background,p=_fe(u,Tfe);if(!d)return null;var m=Mt(Mt(Mt(Mt(Mt({},p),{},{fill:"#eee"},d),l),ao(r.props,u,c)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:a,index:c,className:"recharts-bar-background-rectangle"});return D.createElement(CT,Um({key:"background-bar-".concat(c),option:r.props.background,isActive:c===s},m))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.data,s=o.xAxis,l=o.yAxis,u=o.layout,c=o.children,d=fr(c,hy);if(!d)return null;var p=u==="vertical"?a[0].height/2:a[0].width/2,m=function(g,y){var x=Array.isArray(g.value)?g.value[1]:g.value;return{x:g.x,y:g.y,value:x,errorVal:Dt(g,y)}},v={clipPath:r?"url(#clipPath-".concat(i,")"):null};return D.createElement(Le,v,d.map(function(h){return D.cloneElement(h,{key:"error-bar-".concat(i,"-").concat(h.props.dataKey),data:a,xAxis:s,yAxis:l,layout:u,offset:p,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,o=r.data,a=r.className,s=r.xAxis,l=r.yAxis,u=r.left,c=r.top,d=r.width,p=r.height,m=r.isAnimationActive,v=r.background,h=r.id;if(i||!o||!o.length)return null;var g=this.state.isAnimationFinished,y=Te("recharts-bar",a),x=s&&s.allowDataOverflow,b=l&&l.allowDataOverflow,S=x||b,w=Ne(h)?this.id:h;return D.createElement(Le,{className:y},x||b?D.createElement("defs",null,D.createElement("clipPath",{id:"clipPath-".concat(w)},D.createElement("rect",{x:x?u:u-d/2,y:b?c:c-p/2,width:x?d:d*2,height:b?p:p*2}))):null,D.createElement(Le,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(w,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,w),(!m||g)&&Si.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(j.PureComponent);nD=jo;Jo(jo,"displayName","Bar");Jo(jo,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ca.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Jo(jo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,o=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,c=e.dataStartIndex,d=e.displayedData,p=e.offset,m=b2(r,n);if(!m)return null;var v=t.layout,h=n.type.defaultProps,g=h!==void 0?Mt(Mt({},h),n.props):n.props,y=g.dataKey,x=g.children,b=g.minPointSize,S=v==="horizontal"?a:o,w=u?S.scale.domain():null,O=j2({numericAxis:S}),P=fr(x,Ju),E=d.map(function(A,C){var T,_,k,$,R,I;u?T=w2(u[c+C],w):(T=Dt(A,y),Array.isArray(T)||(T=[O,T]));var B=Cfe(b,nD.defaultProps.minPointSize)(T[1],C);if(v==="horizontal"){var N,L=[a.scale(T[0]),a.scale(T[1])],M=L[0],z=L[1];_=Sm({axis:o,ticks:s,bandSize:i,offset:m.offset,entry:A,index:C}),k=(N=z??M)!==null&&N!==void 0?N:void 0,$=m.size;var U=M-z;if(R=Number.isNaN(U)?0:U,I={x:_,y:a.y,width:$,height:a.height},Math.abs(B)>0&&Math.abs(R)<Math.abs(B)){var V=Jt(R||B)*(Math.abs(B)-Math.abs(R));k-=V,R+=V}}else{var W=[o.scale(T[0]),o.scale(T[1])],Q=W[0],G=W[1];if(_=Q,k=Sm({axis:a,ticks:l,bandSize:i,offset:m.offset,entry:A,index:C}),$=G-Q,R=m.size,I={x:o.x,y:k,width:o.width,height:R},Math.abs(B)>0&&Math.abs($)<Math.abs(B)){var le=Jt($||B)*(Math.abs(B)-Math.abs($));$+=le}}return Mt(Mt(Mt({},A),{},{x:_,y:k,width:$,height:R,value:u?T:T[1],payload:A,background:I},P&&P[C]&&P[C].props),{},{tooltipPayload:[sj(n,A)],tooltipPosition:{x:_+$/2,y:k+R/2}})});return Mt({data:E,layout:v},p)});function hd(e){"@babel/helpers - typeof";return hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hd(e)}function Ffe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kT(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,oD(r.key),r)}}function Bfe(e,t,n){return t&&kT(e.prototype,t),n&&kT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function NT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NT(Object(n),!0).forEach(function(r){by(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function by(e,t,n){return t=oD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oD(e){var t=Ufe(e,"string");return hd(t)=="symbol"?t:t+""}function Ufe(e,t){if(hd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aD=function(t,n,r,i,o){var a=t.width,s=t.height,l=t.layout,u=t.children,c=Object.keys(n),d={left:r.left,leftMirror:r.left,right:a-r.right,rightMirror:a-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},p=!!ar(u,jo);return c.reduce(function(m,v){var h=n[v],g=h.orientation,y=h.domain,x=h.padding,b=x===void 0?{}:x,S=h.mirror,w=h.reversed,O="".concat(g).concat(S?"Mirror":""),P,E,A,C,T;if(h.type==="number"&&(h.padding==="gap"||h.padding==="no-gap")){var _=y[1]-y[0],k=1/0,$=h.categoricalDomain.sort(U8);if($.forEach(function(W,Q){Q>0&&(k=Math.min((W||0)-($[Q-1]||0),k))}),Number.isFinite(k)){var R=k/_,I=h.layout==="vertical"?r.height:r.width;if(h.padding==="gap"&&(P=R*I/2),h.padding==="no-gap"){var B=Fn(t.barCategoryGap,R*I),N=R*I/2;P=N-B-(N-B)/I*B}}}i==="xAxis"?E=[r.left+(b.left||0)+(P||0),r.left+r.width-(b.right||0)-(P||0)]:i==="yAxis"?E=l==="horizontal"?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(P||0),r.top+r.height-(b.bottom||0)-(P||0)]:E=h.range,w&&(E=[E[1],E[0]]);var L=v2(h,o,p),M=L.scale,z=L.realScaleType;M.domain(y).range(E),x2(M);var U=S2(M,qr(qr({},h),{},{realScaleType:z}));i==="xAxis"?(T=g==="top"&&!S||g==="bottom"&&S,A=r.left,C=d[O]-T*h.height):i==="yAxis"&&(T=g==="left"&&!S||g==="right"&&S,A=d[O]-T*h.width,C=r.top);var V=qr(qr(qr({},h),U),{},{realScaleType:z,x:A,y:C,scale:M,width:i==="xAxis"?r.width:h.width,height:i==="yAxis"?r.height:h.height});return V.bandSize=jm(V,U),!h.hide&&i==="xAxis"?d[O]+=(T?-1:1)*V.height:h.hide||(d[O]+=(T?-1:1)*V.width),qr(qr({},m),{},by({},v,V))},{})},sD=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},zfe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return sD({x:n,y:r},{x:i,y:o})},lD=function(){function e(t){Ffe(this,e),this.scale=t}return Bfe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();by(lD,"EPS",1e-4);var cj=function(t){var n=Object.keys(t).reduce(function(r,i){return qr(qr({},r),{},by({},i,lD.create(t[i])))},{});return qr(qr({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return lfe(i,function(l,u){return n[u].apply(l,{bandAware:a,position:s})})},isInRange:function(i){return tD(i,function(o,a){return n[a].isInRange(o)})}})};function Hfe(e){return(e%180+180)%180}var Vfe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Hfe(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},Wfe=Ci,qfe=Dd,Kfe=ty;function Gfe(e){return function(t,n,r){var i=Object(t);if(!qfe(t)){var o=Wfe(n);t=Kfe(t),n=function(s){return o(i[s],s,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}var Xfe=Gfe,Yfe=Q2;function Qfe(e){var t=Yfe(e),n=t%1;return t===t?n?t-n:t:0}var Jfe=Qfe,Zfe=ZM,ede=Ci,tde=Jfe,nde=Math.max;function rde(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:tde(n);return i<0&&(i=nde(r+i,0)),Zfe(e,ede(t),i)}var ide=rde,ode=Xfe,ade=ide,sde=ode(ade),lde=sde;const ude=Ze(lde);var cde=V6(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),fj=j.createContext(void 0),dj=j.createContext(void 0),uD=j.createContext(void 0),cD=j.createContext({}),fD=j.createContext(void 0),dD=j.createContext(0),pD=j.createContext(0),RT=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,l=t.width,u=t.height,c=cde(o);return D.createElement(fj.Provider,{value:r},D.createElement(dj.Provider,{value:i},D.createElement(cD.Provider,{value:o},D.createElement(uD.Provider,{value:c},D.createElement(fD.Provider,{value:a},D.createElement(dD.Provider,{value:u},D.createElement(pD.Provider,{value:l},s)))))))},fde=function(){return j.useContext(fD)},hD=function(t){var n=j.useContext(fj);n==null&&Ns();var r=n[t];return r==null&&Ns(),r},dde=function(){var t=j.useContext(fj);return Fo(t)},pde=function(){var t=j.useContext(dj),n=ude(t,function(r){return tD(r.domain,Number.isFinite)});return n||Fo(t)},mD=function(t){var n=j.useContext(dj);n==null&&Ns();var r=n[t];return r==null&&Ns(),r},hde=function(){var t=j.useContext(uD);return t},mde=function(){return j.useContext(cD)},pj=function(){return j.useContext(pD)},hj=function(){return j.useContext(dD)};function xu(e){"@babel/helpers - typeof";return xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xu(e)}function gde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yde(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,yD(r.key),r)}}function vde(e,t,n){return t&&yde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xde(e,t,n){return t=Hm(t),bde(e,gD()?Reflect.construct(t,n||[],Hm(e).constructor):t.apply(e,n))}function bde(e,t){if(t&&(xu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wde(e)}function wde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gD=function(){return!!e})()}function Hm(e){return Hm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hm(e)}function Sde(e,t){if(typeof t!="function"&&t!==null)throw new 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&&tw(e,t)}function tw(e,t){return tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tw(e,t)}function $T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$T(Object(n),!0).forEach(function(r){mj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$T(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mj(e,t,n){return t=yD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yD(e){var t=jde(e,"string");return xu(t)=="symbol"?t:t+""}function jde(e,t){if(xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ode(e,t){return Cde(e)||Ade(e,t)||Ede(e,t)||Pde()}function Pde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
135
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ede(e,t){if(e){if(typeof e=="string")return IT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IT(e,t)}}function IT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ade(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Cde(e){if(Array.isArray(e))return e}function nw(){return nw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nw.apply(this,arguments)}var Tde=function(t,n){var r;return D.isValidElement(t)?r=D.cloneElement(t,n):je(t)?r=t(n):r=D.createElement("line",nw({},n,{className:"recharts-reference-line-line"})),r},_de=function(t,n,r,i,o,a,s,l,u){var c=o.x,d=o.y,p=o.width,m=o.height;if(r){var v=u.y,h=t.y.apply(v,{position:a});if(ji(u,"discard")&&!t.y.isInRange(h))return null;var g=[{x:c+p,y:h},{x:c,y:h}];return l==="left"?g.reverse():g}if(n){var y=u.x,x=t.x.apply(y,{position:a});if(ji(u,"discard")&&!t.x.isInRange(x))return null;var b=[{x,y:d+m},{x,y:d}];return s==="top"?b.reverse():b}if(i){var S=u.segment,w=S.map(function(O){return t.apply(O,{position:a})});return ji(u,"discard")&&efe(w,function(O){return!t.isInRange(O)})?null:w}return null};function kde(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,a=e.shape,s=e.className,l=e.alwaysShow,u=fde(),c=hD(i),d=mD(o),p=hde();if(!u||!p)return null;Qr(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=cj({x:c.scale,y:d.scale}),v=Wt(t),h=Wt(n),g=r&&r.length===2,y=_de(m,v,h,g,p,e.position,c.orientation,d.orientation,e);if(!y)return null;var x=Ode(y,2),b=x[0],S=b.x,w=b.y,O=x[1],P=O.x,E=O.y,A=ji(e,"hidden")?"url(#".concat(u,")"):void 0,C=MT(MT({clipPath:A},ve(e,!0)),{},{x1:S,y1:w,x2:P,y2:E});return D.createElement(Le,{className:Te("recharts-reference-line",s)},Tde(a,C),Qt.renderCallByParent(e,zfe({x1:S,y1:w,x2:P,y2:E})))}var gj=function(e){function t(){return gde(this,t),xde(this,t,arguments)}return Sde(t,e),vde(t,[{key:"render",value:function(){return D.createElement(kde,this.props)}}])}(D.Component);mj(gj,"displayName","ReferenceLine");mj(gj,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function rw(){return rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rw.apply(this,arguments)}function bu(e){"@babel/helpers - typeof";return bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bu(e)}function DT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function LT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DT(Object(n),!0).forEach(function(r){wy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rde(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,xD(r.key),r)}}function $de(e,t,n){return t&&Rde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mde(e,t,n){return t=Vm(t),Ide(e,vD()?Reflect.construct(t,n||[],Vm(e).constructor):t.apply(e,n))}function Ide(e,t){if(t&&(bu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Dde(e)}function Dde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vD=function(){return!!e})()}function Vm(e){return Vm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vm(e)}function Lde(e,t){if(typeof t!="function"&&t!==null)throw new 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&&iw(e,t)}function iw(e,t){return iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iw(e,t)}function wy(e,t,n){return t=xD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xD(e){var t=Fde(e,"string");return bu(t)=="symbol"?t:t+""}function Fde(e,t){if(bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Bde=function(t){var n=t.x,r=t.y,i=t.xAxis,o=t.yAxis,a=cj({x:i.scale,y:o.scale}),s=a.apply({x:n,y:r},{bandAware:!0});return ji(t,"discard")&&!a.isInRange(s)?null:s},Sy=function(e){function t(){return Nde(this,t),Mde(this,t,arguments)}return Lde(t,e),$de(t,[{key:"render",value:function(){var r=this.props,i=r.x,o=r.y,a=r.r,s=r.alwaysShow,l=r.clipPathId,u=Wt(i),c=Wt(o);if(Qr(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var d=Bde(this.props);if(!d)return null;var p=d.x,m=d.y,v=this.props,h=v.shape,g=v.className,y=ji(this.props,"hidden")?"url(#".concat(l,")"):void 0,x=LT(LT({clipPath:y},ve(this.props,!0)),{},{cx:p,cy:m});return D.createElement(Le,{className:Te("recharts-reference-dot",g)},t.renderDot(h,x),Qt.renderCallByParent(this.props,{x:p-a,y:m-a,width:2*a,height:2*a}))}}])}(D.Component);wy(Sy,"displayName","ReferenceDot");wy(Sy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});wy(Sy,"renderDot",function(e,t){var n;return D.isValidElement(e)?n=D.cloneElement(e,t):je(e)?n=e(t):n=D.createElement(my,rw({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function ow(){return ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ow.apply(this,arguments)}function wu(e){"@babel/helpers - typeof";return wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wu(e)}function FT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function BT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FT(Object(n),!0).forEach(function(r){jy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ude(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zde(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,wD(r.key),r)}}function Hde(e,t,n){return t&&zde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vde(e,t,n){return t=Wm(t),Wde(e,bD()?Reflect.construct(t,n||[],Wm(e).constructor):t.apply(e,n))}function Wde(e,t){if(t&&(wu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qde(e)}function qde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bD=function(){return!!e})()}function Wm(e){return Wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wm(e)}function Kde(e,t){if(typeof t!="function"&&t!==null)throw new 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&&aw(e,t)}function aw(e,t){return aw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},aw(e,t)}function jy(e,t,n){return t=wD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wD(e){var t=Gde(e,"string");return wu(t)=="symbol"?t:t+""}function Gde(e,t){if(wu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Xde=function(t,n,r,i,o){var a=o.x1,s=o.x2,l=o.y1,u=o.y2,c=o.xAxis,d=o.yAxis;if(!c||!d)return null;var p=cj({x:c.scale,y:d.scale}),m={x:t?p.x.apply(a,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(l,{position:"start"}):p.y.rangeMin},v={x:n?p.x.apply(s,{position:"end"}):p.x.rangeMax,y:i?p.y.apply(u,{position:"end"}):p.y.rangeMax};return ji(o,"discard")&&(!p.isInRange(m)||!p.isInRange(v))?null:sD(m,v)},Oy=function(e){function t(){return Ude(this,t),Vde(this,t,arguments)}return Kde(t,e),Hde(t,[{key:"render",value:function(){var r=this.props,i=r.x1,o=r.x2,a=r.y1,s=r.y2,l=r.className,u=r.alwaysShow,c=r.clipPathId;Qr(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=Wt(i),p=Wt(o),m=Wt(a),v=Wt(s),h=this.props.shape;if(!d&&!p&&!m&&!v&&!h)return null;var g=Xde(d,p,m,v,this.props);if(!g&&!h)return null;var y=ji(this.props,"hidden")?"url(#".concat(c,")"):void 0;return D.createElement(Le,{className:Te("recharts-reference-area",l)},t.renderRect(h,BT(BT({clipPath:y},ve(this.props,!0)),g)),Qt.renderCallByParent(this.props,g))}}])}(D.Component);jy(Oy,"displayName","ReferenceArea");jy(Oy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});jy(Oy,"renderRect",function(e,t){var n;return D.isValidElement(e)?n=D.cloneElement(e,t):je(e)?n=e(t):n=D.createElement(lj,ow({},t,{className:"recharts-reference-area-rect"})),n});function SD(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function Yde(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Vfe(r,n)}function Qde(e,t,n){var r=n==="width",i=e.x,o=e.y,a=e.width,s=e.height;return t===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function qm(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function Jde(e,t){return SD(e,t+1)}function Zde(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,l=0,u=1,c=a,d=function(){var v=r==null?void 0:r[l];if(v===void 0)return{v:SD(r,u)};var h=l,g,y=function(){return g===void 0&&(g=n(v,h)),g},x=v.coordinate,b=l===0||qm(e,x,y,c,s);b||(l=0,c=a,u+=1),b&&(c=x+e*(y()/2+i),l+=u)},p;u<=o.length;)if(p=d(),p)return p.v;return[]}function md(e){"@babel/helpers - typeof";return md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},md(e)}function UT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UT(Object(n),!0).forEach(function(r){epe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function epe(e,t,n){return t=tpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tpe(e){var t=npe(e,"string");return md(t)=="symbol"?t:t+""}function npe(e,t){if(md(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(md(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rpe(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,s=t.start,l=t.end,u=function(p){var m=o[p],v,h=function(){return v===void 0&&(v=n(m,p)),v};if(p===a-1){var g=e*(m.coordinate+e*h()/2-l);o[p]=m=On(On({},m),{},{tickCoord:g>0?m.coordinate-g*e:m.coordinate})}else o[p]=m=On(On({},m),{},{tickCoord:m.coordinate});var y=qm(e,m.tickCoord,h,s,l);y&&(l=m.tickCoord-e*(h()/2+i),o[p]=On(On({},m),{},{isShow:!0}))},c=a-1;c>=0;c--)u(c);return o}function ipe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,u=t.end;if(o){var c=r[s-1],d=n(c,s-1),p=e*(c.coordinate+e*d/2-u);a[s-1]=c=On(On({},c),{},{tickCoord:p>0?c.coordinate-p*e:c.coordinate});var m=qm(e,c.tickCoord,function(){return d},l,u);m&&(u=c.tickCoord-e*(d/2+i),a[s-1]=On(On({},c),{},{isShow:!0}))}for(var v=o?s-1:s,h=function(x){var b=a[x],S,w=function(){return S===void 0&&(S=n(b,x)),S};if(x===0){var O=e*(b.coordinate-e*w()/2-l);a[x]=b=On(On({},b),{},{tickCoord:O<0?b.coordinate-O*e:b.coordinate})}else a[x]=b=On(On({},b),{},{tickCoord:b.coordinate});var P=qm(e,b.tickCoord,w,l,u);P&&(l=b.tickCoord+e*(w()/2+i),a[x]=On(On({},b),{},{isShow:!0}))},g=0;g<v;g++)h(g);return a}function yj(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,a=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,c=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(ne(l)||Ca.isSsr)return Jde(i,typeof l=="number"&&ne(l)?l:0);var p=[],m=s==="top"||s==="bottom"?"width":"height",v=c&&m==="width"?af(c,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=function(b,S){var w=je(u)?u(b.value,S):b.value;return m==="width"?Yde(af(w,{fontSize:t,letterSpacing:n}),v,d):af(w,{fontSize:t,letterSpacing:n})[m]},g=i.length>=2?Jt(i[1].coordinate-i[0].coordinate):1,y=Qde(o,g,m);return l==="equidistantPreserveStart"?Zde(g,y,h,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=ipe(g,y,h,i,a,l==="preserveStartEnd"):p=rpe(g,y,h,i,a),p.filter(function(x){return x.isShow}))}var ope=["viewBox"],ape=["viewBox"],spe=["ticks"];function Su(e){"@babel/helpers - typeof";return Su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Su(e)}function yl(){return yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yl.apply(this,arguments)}function zT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zT(Object(n),!0).forEach(function(r){vj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nx(e,t){if(e==null)return{};var n=lpe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lpe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function upe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HT(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,OD(r.key),r)}}function cpe(e,t,n){return t&&HT(e.prototype,t),n&&HT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fpe(e,t,n){return t=Km(t),dpe(e,jD()?Reflect.construct(t,n||[],Km(e).constructor):t.apply(e,n))}function dpe(e,t){if(t&&(Su(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ppe(e)}function ppe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jD=function(){return!!e})()}function Km(e){return Km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Km(e)}function hpe(e,t){if(typeof t!="function"&&t!==null)throw new 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&&sw(e,t)}function sw(e,t){return sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sw(e,t)}function vj(e,t,n){return t=OD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OD(e){var t=mpe(e,"string");return Su(t)=="symbol"?t:t+""}function mpe(e,t){if(Su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rc=function(e){function t(n){var r;return upe(this,t),r=fpe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return hpe(t,e),cpe(t,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,a=nx(r,ope),s=this.props,l=s.viewBox,u=nx(s,ape);return!Cl(o,l)||!Cl(a,u)||!Cl(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.x,a=i.y,s=i.width,l=i.height,u=i.orientation,c=i.tickSize,d=i.mirror,p=i.tickMargin,m,v,h,g,y,x,b=d?-1:1,S=r.tickSize||c,w=ne(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":m=v=r.coordinate,g=a+ +!d*l,h=g-b*S,x=h-b*p,y=w;break;case"left":h=g=r.coordinate,v=o+ +!d*s,m=v-b*S,y=m-b*p,x=w;break;case"right":h=g=r.coordinate,v=o+ +d*s,m=v+b*S,y=m+b*p,x=w;break;default:m=v=r.coordinate,g=a+ +d*l,h=g+b*S,x=h+b*p,y=w;break}return{line:{x1:m,y1:h,x2:v,y2:g},tick:{x:y,y:x}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,a;switch(i){case"left":a=o?"start":"end";break;case"right":a=o?"end":"start";break;default:a="middle";break}return a}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,a="end";switch(i){case"left":case"right":a="middle";break;case"top":a=o?"start":"end";break;default:a=o?"end":"start";break}return a}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.orientation,u=r.mirror,c=r.axisLine,d=Ft(Ft(Ft({},ve(this.props,!1)),ve(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!u||l==="bottom"&&u);d=Ft(Ft({},d),{},{x1:i,y1:o+p*s,x2:i+a,y2:o+p*s})}else{var m=+(l==="left"&&!u||l==="right"&&u);d=Ft(Ft({},d),{},{x1:i+m*a,y1:o,x2:i+m*a,y2:o+s})}return D.createElement("line",yl({},d,{className:Te("recharts-cartesian-axis-line",cr(c,"className"))}))}},{key:"renderTicks",value:function(r,i,o){var a=this,s=this.props,l=s.tickLine,u=s.stroke,c=s.tick,d=s.tickFormatter,p=s.unit,m=yj(Ft(Ft({},this.props),{},{ticks:r}),i,o),v=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),g=ve(this.props,!1),y=ve(c,!1),x=Ft(Ft({},g),{},{fill:"none"},ve(l,!1)),b=m.map(function(S,w){var O=a.getTickLineCoord(S),P=O.line,E=O.tick,A=Ft(Ft(Ft(Ft({textAnchor:v,verticalAnchor:h},g),{},{stroke:"none",fill:u},y),E),{},{index:w,payload:S,visibleTicksCount:m.length,tickFormatter:d});return D.createElement(Le,yl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},ao(a.props,S,w)),l&&D.createElement("line",yl({},x,P,{className:Te("recharts-cartesian-axis-tick-line",cr(l,"className"))})),c&&t.renderTickItem(c,A,"".concat(je(d)?d(S.value,w):S.value).concat(p||"")))});return D.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var r=this,i=this.props,o=i.axisLine,a=i.width,s=i.height,l=i.ticksGenerator,u=i.className,c=i.hide;if(c)return null;var d=this.props,p=d.ticks,m=nx(d,spe),v=p;return je(l)&&(v=p&&p.length>0?l(this.props):l(m)),a<=0||s<=0||!v||!v.length?null:D.createElement(Le,{className:Te("recharts-cartesian-axis",u),ref:function(g){r.layerReference=g}},o&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),Qt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a,s=Te(i.className,"recharts-cartesian-axis-tick-value");return D.isValidElement(r)?a=D.cloneElement(r,Ft(Ft({},i),{},{className:s})):je(r)?a=r(Ft(Ft({},i),{},{className:s})):a=D.createElement(Ts,yl({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(j.Component);vj(rc,"displayName","CartesianAxis");vj(rc,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var gpe=["x1","y1","x2","y2","key"],ype=["offset"];function Rs(e){"@babel/helpers - typeof";return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function VT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function An(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VT(Object(n),!0).forEach(function(r){vpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vpe(e,t,n){return t=xpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xpe(e){var t=bpe(e,"string");return Rs(t)=="symbol"?t:t+""}function bpe(e,t){if(Rs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ns(){return ns=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ns.apply(this,arguments)}function WT(e,t){if(e==null)return{};var n=wpe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wpe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Spe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,l=t.ry;return D.createElement("rect",{x:i,y:o,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function PD(e,t){var n;if(D.isValidElement(e))n=D.cloneElement(e,t);else if(je(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=WT(t,gpe),u=ve(l,!1);u.offset;var c=WT(u,ype);n=D.createElement("line",ns({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function jpe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var u=An(An({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return PD(i,u)});return D.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function Ope(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var u=An(An({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return PD(i,u)});return D.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function Ppe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(p){return Math.round(p+i-i)}).sort(function(p,m){return p-m});i!==c[0]&&c.unshift(0);var d=c.map(function(p,m){var v=!c[m+1],h=v?i+a-p:c[m+1]-p;if(h<=0)return null;var g=m%t.length;return D.createElement("rect",{key:"react-".concat(m),y:p,x:r,height:h,width:o,stroke:"none",fill:t[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return D.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function Epe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var c=u.map(function(p){return Math.round(p+o-o)}).sort(function(p,m){return p-m});o!==c[0]&&c.unshift(0);var d=c.map(function(p,m){var v=!c[m+1],h=v?o+s-p:c[m+1]-p;if(h<=0)return null;var g=m%r.length;return D.createElement("rect",{key:"react-".concat(m),x:p,y:a,width:h,height:l,stroke:"none",fill:r[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return D.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var Ape=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return y2(yj(An(An(An({},rc.defaultProps),r),{},{ticks:Gi(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},Cpe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return y2(yj(An(An(An({},rc.defaultProps),r),{},{ticks:Gi(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Zs={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Vd(e){var t,n,r,i,o,a,s=pj(),l=hj(),u=mde(),c=An(An({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Zs.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Zs.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Zs.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Zs.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Zs.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Zs.verticalFill,x:ne(e.x)?e.x:u.left,y:ne(e.y)?e.y:u.top,width:ne(e.width)?e.width:u.width,height:ne(e.height)?e.height:u.height}),d=c.x,p=c.y,m=c.width,v=c.height,h=c.syncWithTicks,g=c.horizontalValues,y=c.verticalValues,x=dde(),b=pde();if(!ne(m)||m<=0||!ne(v)||v<=0||!ne(d)||d!==+d||!ne(p)||p!==+p)return null;var S=c.verticalCoordinatesGenerator||Ape,w=c.horizontalCoordinatesGenerator||Cpe,O=c.horizontalPoints,P=c.verticalPoints;if((!O||!O.length)&&je(w)){var E=g&&g.length,A=w({yAxis:b?An(An({},b),{},{ticks:E?g:b.ticks}):void 0,width:s,height:l,offset:u},E?!0:h);Qr(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(A),"]")),Array.isArray(A)&&(O=A)}if((!P||!P.length)&&je(S)){var C=y&&y.length,T=S({xAxis:x?An(An({},x),{},{ticks:C?y:x.ticks}):void 0,width:s,height:l,offset:u},C?!0:h);Qr(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(T),"]")),Array.isArray(T)&&(P=T)}return D.createElement("g",{className:"recharts-cartesian-grid"},D.createElement(Spe,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),D.createElement(jpe,ns({},c,{offset:u,horizontalPoints:O,xAxis:x,yAxis:b})),D.createElement(Ope,ns({},c,{offset:u,verticalPoints:P,xAxis:x,yAxis:b})),D.createElement(Ppe,ns({},c,{horizontalPoints:O})),D.createElement(Epe,ns({},c,{verticalPoints:P})))}Vd.displayName="CartesianGrid";var Tpe=["layout","type","stroke","connectNulls","isRange","ref"],_pe=["key"],ED;function ju(e){"@babel/helpers - typeof";return ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(e)}function AD(e,t){if(e==null)return{};var n=kpe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kpe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rs.apply(this,arguments)}function qT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ro(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qT(Object(n),!0).forEach(function(r){yi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Npe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KT(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,TD(r.key),r)}}function Rpe(e,t,n){return t&&KT(e.prototype,t),n&&KT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $pe(e,t,n){return t=Gm(t),Mpe(e,CD()?Reflect.construct(t,n||[],Gm(e).constructor):t.apply(e,n))}function Mpe(e,t){if(t&&(ju(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ipe(e)}function Ipe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CD=function(){return!!e})()}function Gm(e){return Gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gm(e)}function Dpe(e,t){if(typeof t!="function"&&t!==null)throw new 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&&lw(e,t)}function lw(e,t){return lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lw(e,t)}function yi(e,t,n){return t=TD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TD(e){var t=Lpe(e,"string");return ju(t)=="symbol"?t:t+""}function Lpe(e,t){if(ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Oo=function(e){function t(){var n;Npe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=$pe(this,t,[].concat(i)),yi(n,"state",{isAnimationFinished:!0}),yi(n,"id",Gu("recharts-area-")),yi(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),je(a)&&a()}),yi(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),je(a)&&a()}),n}return Dpe(t,e),Rpe(t,[{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(a&&!s)return null;var l=this.props,u=l.dot,c=l.points,d=l.dataKey,p=ve(this.props,!1),m=ve(u,!0),v=c.map(function(g,y){var x=Ro(Ro(Ro({key:"dot-".concat(y),r:3},p),m),{},{index:y,cx:g.x,cy:g.y,dataKey:d,value:g.value,payload:g.payload,points:c});return t.renderDotItem(u,x)}),h={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return D.createElement(Le,rs({className:"recharts-area-dots"},h),v)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,o=i.baseLine,a=i.points,s=i.strokeWidth,l=a[0].x,u=a[a.length-1].x,c=r*Math.abs(l-u),d=Qo(a.map(function(p){return p.y||0}));return ne(o)&&typeof o=="number"?d=Math.max(o,d):o&&Array.isArray(o)&&o.length&&(d=Math.max(Qo(o.map(function(p){return p.y||0})),d)),ne(d)?D.createElement("rect",{x:l<u?l:l-c,y:0,width:c,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,o=i.baseLine,a=i.points,s=i.strokeWidth,l=a[0].y,u=a[a.length-1].y,c=r*Math.abs(l-u),d=Qo(a.map(function(p){return p.x||0}));return ne(o)&&typeof o=="number"?d=Math.max(o,d):o&&Array.isArray(o)&&o.length&&(d=Math.max(Qo(o.map(function(p){return p.x||0})),d)),ne(d)?D.createElement("rect",{x:0,y:l<u?l:l-c,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,o,a){var s=this.props,l=s.layout,u=s.type,c=s.stroke,d=s.connectNulls,p=s.isRange;s.ref;var m=AD(s,Tpe);return D.createElement(Le,{clipPath:o?"url(#clipPath-".concat(a,")"):null},D.createElement(kl,rs({},ve(m,!0),{points:r,connectNulls:d,type:u,baseLine:i,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&D.createElement(kl,rs({},ve(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:r})),c!=="none"&&p&&D.createElement(kl,rs({},ve(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,l=a.baseLine,u=a.isAnimationActive,c=a.animationBegin,d=a.animationDuration,p=a.animationEasing,m=a.animationId,v=this.state,h=v.prevPoints,g=v.prevBaseLine;return D.createElement(ei,{begin:c,duration:d,isActive:u,easing:p,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var x=y.t;if(h){var b=h.length/s.length,S=s.map(function(E,A){var C=Math.floor(A*b);if(h[C]){var T=h[C],_=dn(T.x,E.x),k=dn(T.y,E.y);return Ro(Ro({},E),{},{x:_(x),y:k(x)})}return E}),w;if(ne(l)&&typeof l=="number"){var O=dn(g,l);w=O(x)}else if(Ne(l)||Ku(l)){var P=dn(g,0);w=P(x)}else w=l.map(function(E,A){var C=Math.floor(A*b);if(g[C]){var T=g[C],_=dn(T.x,E.x),k=dn(T.y,E.y);return Ro(Ro({},E),{},{x:_(x),y:k(x)})}return E});return o.renderAreaStatically(S,w,r,i)}return D.createElement(Le,null,D.createElement("defs",null,D.createElement("clipPath",{id:"animationClipPath-".concat(i)},o.renderClipRect(x))),D.createElement(Le,{clipPath:"url(#animationClipPath-".concat(i,")")},o.renderAreaStatically(s,l,r,i)))})}},{key:"renderArea",value:function(r,i){var o=this.props,a=o.points,s=o.baseLine,l=o.isAnimationActive,u=this.state,c=u.prevPoints,d=u.prevBaseLine,p=u.totalLength;return l&&a&&a.length&&(!c&&p>0||!_s(c,a)||!_s(d,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,u=i.top,c=i.left,d=i.xAxis,p=i.yAxis,m=i.width,v=i.height,h=i.isAnimationActive,g=i.id;if(o||!s||!s.length)return null;var y=this.state.isAnimationFinished,x=s.length===1,b=Te("recharts-area",l),S=d&&d.allowDataOverflow,w=p&&p.allowDataOverflow,O=S||w,P=Ne(g)?this.id:g,E=(r=ve(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=E.r,C=A===void 0?3:A,T=E.strokeWidth,_=T===void 0?2:T,k=Y8(a)?a:{},$=k.clipDot,R=$===void 0?!0:$,I=C*2+_;return D.createElement(Le,{className:b},S||w?D.createElement("defs",null,D.createElement("clipPath",{id:"clipPath-".concat(P)},D.createElement("rect",{x:S?c:c-m/2,y:w?u:u-v/2,width:S?m:m*2,height:w?v:v*2})),!R&&D.createElement("clipPath",{id:"clipPath-dots-".concat(P)},D.createElement("rect",{x:c-I/2,y:u-I/2,width:m+I,height:v+I}))):null,x?null:this.renderArea(O,P),(a||x)&&this.renderDots(O,R,P),(!h||y)&&Si.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(j.PureComponent);ED=Oo;yi(Oo,"displayName","Area");yi(Oo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ca.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});yi(Oo,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(ne(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});yi(Oo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,d=e.displayedData,p=e.offset,m=t.layout,v=u&&u.length,h=ED.getBaseValue(t,n,r,i),g=m==="horizontal",y=!1,x=d.map(function(S,w){var O;v?O=u[c+w]:(O=Dt(S,l),Array.isArray(O)?y=!0:O=[h,O]);var P=O[1]==null||v&&Dt(S,l)==null;return g?{x:gC({axis:r,ticks:o,bandSize:s,entry:S,index:w}),y:P?null:i.scale(O[1]),value:O,payload:S}:{x:P?null:r.scale(O[1]),y:gC({axis:i,ticks:a,bandSize:s,entry:S,index:w}),value:O,payload:S}}),b;return v||y?b=x.map(function(S){var w=Array.isArray(S.value)?S.value[0]:null;return g?{x:S.x,y:w!=null&&S.y!=null?i.scale(w):null}:{x:w!=null?r.scale(w):null,y:S.y}}):b=g?i.scale(h):r.scale(h),Ro({points:x,baseLine:b,layout:m,isRange:y},p)});yi(Oo,"renderDotItem",function(e,t){var n;if(D.isValidElement(e))n=D.cloneElement(e,t);else if(je(e))n=e(t);else{var r=Te("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=AD(t,_pe);n=D.createElement(my,rs({},o,{key:i,className:r}))}return n});function Ou(e){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}function Fpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bpe(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,ND(r.key),r)}}function Upe(e,t,n){return t&&Bpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zpe(e,t,n){return t=Xm(t),Hpe(e,_D()?Reflect.construct(t,n||[],Xm(e).constructor):t.apply(e,n))}function Hpe(e,t){if(t&&(Ou(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vpe(e)}function Vpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_D=function(){return!!e})()}function Xm(e){return Xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xm(e)}function Wpe(e,t){if(typeof t!="function"&&t!==null)throw new 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&&uw(e,t)}function uw(e,t){return uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},uw(e,t)}function kD(e,t,n){return t=ND(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ND(e){var t=qpe(e,"string");return Ou(t)=="symbol"?t:t+""}function qpe(e,t){if(Ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cw.apply(this,arguments)}function Kpe(e){var t=e.xAxisId,n=pj(),r=hj(),i=hD(t);return i==null?null:j.createElement(rc,cw({},i,{className:Te("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(a){return Gi(a,!0)}}))}var co=function(e){function t(){return Fpe(this,t),zpe(this,t,arguments)}return Wpe(t,e),Upe(t,[{key:"render",value:function(){return j.createElement(Kpe,this.props)}}])}(j.Component);kD(co,"displayName","XAxis");kD(co,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Pu(e){"@babel/helpers - typeof";return Pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(e)}function Gpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xpe(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,MD(r.key),r)}}function Ype(e,t,n){return t&&Xpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qpe(e,t,n){return t=Ym(t),Jpe(e,RD()?Reflect.construct(t,n||[],Ym(e).constructor):t.apply(e,n))}function Jpe(e,t){if(t&&(Pu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zpe(e)}function Zpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RD=function(){return!!e})()}function Ym(e){return Ym=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ym(e)}function ehe(e,t){if(typeof t!="function"&&t!==null)throw new 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&&fw(e,t)}function fw(e,t){return fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},fw(e,t)}function $D(e,t,n){return t=MD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MD(e){var t=the(e,"string");return Pu(t)=="symbol"?t:t+""}function the(e,t){if(Pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function dw(){return dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dw.apply(this,arguments)}var nhe=function(t){var n=t.yAxisId,r=pj(),i=hj(),o=mD(n);return o==null?null:j.createElement(rc,dw({},o,{className:Te("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(s){return Gi(s,!0)}}))},fo=function(e){function t(){return Gpe(this,t),Qpe(this,t,arguments)}return ehe(t,e),Ype(t,[{key:"render",value:function(){return j.createElement(nhe,this.props)}}])}(j.Component);$D(fo,"displayName","YAxis");$D(fo,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function GT(e){return ahe(e)||ohe(e)||ihe(e)||rhe()}function rhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
136
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ihe(e,t){if(e){if(typeof e=="string")return pw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pw(e,t)}}function ohe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ahe(e){if(Array.isArray(e))return pw(e)}function pw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hw=function(t,n,r,i,o){var a=fr(t,gj),s=fr(t,Sy),l=[].concat(GT(a),GT(s)),u=fr(t,Oy),c="".concat(i,"Id"),d=i[0],p=n;if(l.length&&(p=l.reduce(function(h,g){if(g.props[c]===r&&ji(g.props,"extendDomain")&&ne(g.props[d])){var y=g.props[d];return[Math.min(h[0],y),Math.max(h[1],y)]}return h},p)),u.length){var m="".concat(d,"1"),v="".concat(d,"2");p=u.reduce(function(h,g){if(g.props[c]===r&&ji(g.props,"extendDomain")&&ne(g.props[m])&&ne(g.props[v])){var y=g.props[m],x=g.props[v];return[Math.min(h[0],y,x),Math.max(h[1],y,x)]}return h},p)}return o&&o.length&&(p=o.reduce(function(h,g){return ne(g)?[Math.min(h[0],g),Math.max(h[1],g)]:h},p)),p},ID={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function o(l,u,c,d,p){if(typeof c!="function")throw new TypeError("The listener must be a function");var m=new i(c,d||l,p),v=n?n+u:u;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],m]:l._events[v].push(m):(l._events[v]=m,l._eventsCount++),l}function a(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,d;if(this._eventsCount===0)return u;for(d in c=this._events)t.call(c,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=n?n+u:u,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,m=d.length,v=new Array(m);p<m;p++)v[p]=d[p].fn;return v},s.prototype.listenerCount=function(u){var c=n?n+u:u,d=this._events[c];return d?d.fn?1:d.length:0},s.prototype.emit=function(u,c,d,p,m,v){var h=n?n+u:u;if(!this._events[h])return!1;var g=this._events[h],y=arguments.length,x,b;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,d),!0;case 4:return g.fn.call(g.context,c,d,p),!0;case 5:return g.fn.call(g.context,c,d,p,m),!0;case 6:return g.fn.call(g.context,c,d,p,m,v),!0}for(b=1,x=new Array(y-1);b<y;b++)x[b-1]=arguments[b];g.fn.apply(g.context,x)}else{var S=g.length,w;for(b=0;b<S;b++)switch(g[b].once&&this.removeListener(u,g[b].fn,void 0,!0),y){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,c);break;case 3:g[b].fn.call(g[b].context,c,d);break;case 4:g[b].fn.call(g[b].context,c,d,p);break;default:if(!x)for(w=1,x=new Array(y-1);w<y;w++)x[w-1]=arguments[w];g[b].fn.apply(g[b].context,x)}}return!0},s.prototype.on=function(u,c,d){return o(this,u,c,d,!1)},s.prototype.once=function(u,c,d){return o(this,u,c,d,!0)},s.prototype.removeListener=function(u,c,d,p){var m=n?n+u:u;if(!this._events[m])return this;if(!c)return a(this,m),this;var v=this._events[m];if(v.fn)v.fn===c&&(!p||v.once)&&(!d||v.context===d)&&a(this,m);else{for(var h=0,g=[],y=v.length;h<y;h++)(v[h].fn!==c||p&&!v[h].once||d&&v[h].context!==d)&&g.push(v[h]);g.length?this._events[m]=g.length===1?g[0]:g:a(this,m)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&a(this,c)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(ID);var she=ID.exports;const lhe=Ze(she);var rx=new lhe,ix="recharts.syncMouseEvents";function gd(e){"@babel/helpers - typeof";return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gd(e)}function uhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function che(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,DD(r.key),r)}}function fhe(e,t,n){return t&&che(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ox(e,t,n){return t=DD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DD(e){var t=dhe(e,"string");return gd(t)=="symbol"?t:t+""}function dhe(e,t){if(gd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var phe=function(){function e(){uhe(this,e),ox(this,"activeIndex",0),ox(this,"coordinateList",[]),ox(this,"layout","horizontal")}return fhe(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,o=i===void 0?null:i,a=n.container,s=a===void 0?null:a,l=n.layout,u=l===void 0?null:l,c=n.offset,d=c===void 0?null:c,p=n.mouseHandlerCallback,m=p===void 0?null:p;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),o=i.x,a=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,c=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=o+l+u,p=a+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:d,pageY:p})}}}])}();function hhe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&ne(r)&&ne(i))return!0}return!1}function mhe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function LD(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle,a=st(t,n,r,i),s=st(t,n,r,o);return{points:[a,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function ghe(e,t,n){var r,i,o,a;if(e==="horizontal")r=t.x,o=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,c=t.outerRadius,d=t.angle,p=st(s,l,u,d),m=st(s,l,c,d);r=p.x,i=p.y,o=m.x,a=m.y}else return LD(t);return[{x:r,y:i},{x:o,y:a}]}function yd(e){"@babel/helpers - typeof";return yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yd(e)}function XT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XT(Object(n),!0).forEach(function(r){yhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yhe(e,t,n){return t=vhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vhe(e){var t=xhe(e,"string");return yd(t)=="symbol"?t:t+""}function xhe(e,t){if(yd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bhe(e){var t,n,r=e.element,i=e.tooltipEventType,o=e.isActive,a=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,c=e.tooltipAxisBandSize,d=e.layout,p=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!o||!a||p!=="ScatterChart"&&i!=="axis")return null;var v,h=kl;if(p==="ScatterChart")v=a,h=Cle;else if(p==="BarChart")v=mhe(d,a,l,c),h=lj;else if(d==="radial"){var g=LD(a),y=g.cx,x=g.cy,b=g.radius,S=g.startAngle,w=g.endAngle;v={cx:y,cy:x,startAngle:S,endAngle:w,innerRadius:b,outerRadius:b},h=k2}else v={points:ghe(d,a,l)},h=kl;var O=kp(kp(kp(kp({stroke:"#ccc",pointerEvents:"none"},l),v),ve(m,!1)),{},{payload:s,payloadIndex:u,className:Te("recharts-tooltip-cursor",m.className)});return j.isValidElement(m)?j.cloneElement(m,O):j.createElement(h,O)}var whe=["item"],She=["children","className","width","height","style","compact","title","desc"];function Eu(e){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eu(e)}function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vl.apply(this,arguments)}function YT(e,t){return Phe(e)||Ohe(e,t)||BD(e,t)||jhe()}function jhe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
137
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ohe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Phe(e){if(Array.isArray(e))return e}function QT(e,t){if(e==null)return{};var n=Ehe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ehe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ahe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Che(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,UD(r.key),r)}}function The(e,t,n){return t&&Che(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _he(e,t,n){return t=Qm(t),khe(e,FD()?Reflect.construct(t,n||[],Qm(e).constructor):t.apply(e,n))}function khe(e,t){if(t&&(Eu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nhe(e)}function Nhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FD=function(){return!!e})()}function Qm(e){return Qm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qm(e)}function Rhe(e,t){if(typeof t!="function"&&t!==null)throw new 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&&mw(e,t)}function mw(e,t){return mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mw(e,t)}function Au(e){return Ihe(e)||Mhe(e)||BD(e)||$he()}function $he(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
138
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BD(e,t){if(e){if(typeof e=="string")return gw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gw(e,t)}}function Mhe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ihe(e){if(Array.isArray(e))return gw(e)}function gw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function JT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JT(Object(n),!0).forEach(function(r){Pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pe(e,t,n){return t=UD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UD(e){var t=Dhe(e,"string");return Eu(t)=="symbol"?t:t+""}function Dhe(e,t){if(Eu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lhe={xAxis:["bottom","top"],yAxis:["left","right"]},Fhe={width:"100%",height:"100%"},zD={x:0,y:0};function Np(e){return e}var Bhe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Uhe=function(t,n,r,i){var o=n.find(function(c){return c&&c.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:o.coordinate};if(t==="centric"){var a=o.coordinate,s=i.radius;return K(K(K({},i),st(i.cx,i.cy,s,a)),{},{angle:a,radius:s})}var l=o.coordinate,u=i.angle;return K(K(K({},i),st(i.cx,i.cy,l,u)),{},{angle:u,radius:l})}return zD},Py=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,o=n.dataEndIndex,a=(r??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(Au(s),Au(u)):s},[]);return a.length>0?a:t&&t.length&&ne(i)&&ne(o)?t.slice(i,o+1):[]};function HD(e){return e==="number"?[0,"auto"]:void 0}var yw=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=Py(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(l,u){var c,d=(c=u.props.data)!==null&&c!==void 0?c:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(a.dataKey&&!a.allowDuplicatedCategory){var m=d===void 0?s:d;p=Kh(m,a.dataKey,i)}else p=d&&d[r]||s[r];return p?[].concat(Au(l),[sj(u,p)]):l},[])},ZT=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=Bhe(o,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=Jie(a,s,u,l);if(c>=0&&u){var d=u[c]&&u[c].value,p=yw(t,n,c,d),m=Uhe(r,s,c,o);return{activeTooltipIndex:c,activeLabel:d,activePayload:p,activeCoordinate:m}}return null},zhe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,c=t.layout,d=t.children,p=t.stackOffset,m=g2(c,o);return r.reduce(function(v,h){var g,y=h.type.defaultProps!==void 0?K(K({},h.type.defaultProps),h.props):h.props,x=y.type,b=y.dataKey,S=y.allowDataOverflow,w=y.allowDuplicatedCategory,O=y.scale,P=y.ticks,E=y.includeHidden,A=y[a];if(v[A])return v;var C=Py(t.data,{graphicalItems:i.filter(function(U){var V,W=a in U.props?U.props[a]:(V=U.type.defaultProps)===null||V===void 0?void 0:V[a];return W===A}),dataStartIndex:l,dataEndIndex:u}),T=C.length,_,k,$;hhe(y.domain,S,x)&&(_=_0(y.domain,null,S),m&&(x==="number"||O!=="auto")&&($=lf(C,b,"category")));var R=HD(x);if(!_||_.length===0){var I,B=(I=y.domain)!==null&&I!==void 0?I:R;if(b){if(_=lf(C,b,x),x==="category"&&m){var N=B8(_);w&&N?(k=_,_=Lm(0,T)):w||(_=xC(B,_,h).reduce(function(U,V){return U.indexOf(V)>=0?U:[].concat(Au(U),[V])},[]))}else if(x==="category")w?_=_.filter(function(U){return U!==""&&!Ne(U)}):_=xC(B,_,h).reduce(function(U,V){return U.indexOf(V)>=0||V===""||Ne(V)?U:[].concat(Au(U),[V])},[]);else if(x==="number"){var L=roe(C,i.filter(function(U){var V,W,Q=a in U.props?U.props[a]:(V=U.type.defaultProps)===null||V===void 0?void 0:V[a],G="hide"in U.props?U.props.hide:(W=U.type.defaultProps)===null||W===void 0?void 0:W.hide;return Q===A&&(E||!G)}),b,o,c);L&&(_=L)}m&&(x==="number"||O!=="auto")&&($=lf(C,b,"category"))}else m?_=Lm(0,T):s&&s[A]&&s[A].hasStack&&x==="number"?_=p==="expand"?[0,1]:O2(s[A].stackGroups,l,u):_=m2(C,i.filter(function(U){var V=a in U.props?U.props[a]:U.type.defaultProps[a],W="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return V===A&&(E||!W)}),x,c,!0);if(x==="number")_=hw(d,_,A,o,P),B&&(_=_0(B,_,S));else if(x==="category"&&B){var M=B,z=_.every(function(U){return M.indexOf(U)>=0});z&&(_=M)}}return K(K({},v),{},Pe({},A,K(K({},y),{},{axisType:o,domain:_,categoricalDomain:$,duplicateDomain:k,originalDomain:(g=y.domain)!==null&&g!==void 0?g:R,isCategorical:m,layout:c})))},{})},Hhe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,c=t.layout,d=t.children,p=Py(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),m=p.length,v=g2(c,o),h=-1;return r.reduce(function(g,y){var x=y.type.defaultProps!==void 0?K(K({},y.type.defaultProps),y.props):y.props,b=x[a],S=HD("number");if(!g[b]){h++;var w;return v?w=Lm(0,m):s&&s[b]&&s[b].hasStack?(w=O2(s[b].stackGroups,l,u),w=hw(d,w,b,o)):(w=_0(S,m2(p,r.filter(function(O){var P,E,A=a in O.props?O.props[a]:(P=O.type.defaultProps)===null||P===void 0?void 0:P[a],C="hide"in O.props?O.props.hide:(E=O.type.defaultProps)===null||E===void 0?void 0:E.hide;return A===b&&!C}),"number",c),i.defaultProps.allowDataOverflow),w=hw(d,w,b,o)),K(K({},g),{},Pe({},b,K(K({axisType:o},i.defaultProps),{},{hide:!0,orientation:cr(Lhe,"".concat(o,".").concat(h%2),null),domain:w,originalDomain:S,isCategorical:v,layout:c})))}return g},{})},Vhe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,c=t.children,d="".concat(i,"Id"),p=fr(c,o),m={};return p&&p.length?m=zhe(t,{axes:p,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):a&&a.length&&(m=Hhe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),m},Whe=function(t){var n=Fo(t),r=Gi(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:$S(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:jm(n,r)}},e_=function(t){var n=t.children,r=t.defaultShowTooltip,i=ar(n,ma),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},qhe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Qi(n&&n.type);return r&&r.indexOf("Bar")>=0})},t_=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Khe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,c=r.height,d=r.children,p=r.margin||{},m=ar(d,ma),v=ar(d,ys),h=Object.keys(l).reduce(function(w,O){var P=l[O],E=P.orientation;return!P.mirror&&!P.hide?K(K({},w),{},Pe({},E,w[E]+P.width)):w},{left:p.left||0,right:p.right||0}),g=Object.keys(a).reduce(function(w,O){var P=a[O],E=P.orientation;return!P.mirror&&!P.hide?K(K({},w),{},Pe({},E,cr(w,"".concat(E))+P.height)):w},{top:p.top||0,bottom:p.bottom||0}),y=K(K({},g),h),x=y.bottom;m&&(y.bottom+=m.props.height||ma.defaultProps.height),v&&n&&(y=toe(y,i,r,n));var b=u-y.left-y.right,S=c-y.top-y.bottom;return K(K({brushBottom:x},y),{},{width:Math.max(b,0),height:Math.max(S,0)})},Ghe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Ey=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,d=t.defaultProps,p=function(y,x){var b=x.graphicalItems,S=x.stackGroups,w=x.offset,O=x.updateId,P=x.dataStartIndex,E=x.dataEndIndex,A=y.barSize,C=y.layout,T=y.barGap,_=y.barCategoryGap,k=y.maxBarSize,$=t_(C),R=$.numericAxisName,I=$.cateAxisName,B=qhe(b),N=[];return b.forEach(function(L,M){var z=Py(y.data,{graphicalItems:[L],dataStartIndex:P,dataEndIndex:E}),U=L.type.defaultProps!==void 0?K(K({},L.type.defaultProps),L.props):L.props,V=U.dataKey,W=U.maxBarSize,Q=U["".concat(R,"Id")],G=U["".concat(I,"Id")],le={},X=l.reduce(function(Ae,Se){var We=x["".concat(Se.axisType,"Map")],te=U["".concat(Se.axisType,"Id")];We&&We[te]||Se.axisType==="zAxis"||Ns();var pe=We[te];return K(K({},Ae),{},Pe(Pe({},Se.axisType,pe),"".concat(Se.axisType,"Ticks"),Gi(pe)))},le),q=X[I],ee=X["".concat(I,"Ticks")],ie=S&&S[Q]&&S[Q].hasStack&&uoe(L,S[Q].stackGroups),H=Qi(L.type).indexOf("Bar")>=0,Z=jm(q,ee),J=[],se=B&&Zie({barSize:A,stackGroups:S,totalSize:Ghe(X,I)});if(H){var we,ae,be=Ne(W)?k:W,ce=(we=(ae=jm(q,ee,!0))!==null&&ae!==void 0?ae:be)!==null&&we!==void 0?we:0;J=eoe({barGap:T,barCategoryGap:_,bandSize:ce!==Z?ce:Z,sizeList:se[G],maxBarSize:be}),ce!==Z&&(J=J.map(function(Ae){return K(K({},Ae),{},{position:K(K({},Ae.position),{},{offset:Ae.position.offset-ce/2})})}))}var Ce=L&&L.type&&L.type.getComposedData;Ce&&N.push({props:K(K({},Ce(K(K({},X),{},{displayedData:z,props:y,dataKey:V,item:L,bandSize:Z,barPosition:J,offset:w,stackedData:ie,layout:C,dataStartIndex:P,dataEndIndex:E}))),{},Pe(Pe(Pe({key:L.key||"item-".concat(M)},R,X[R]),I,X[I]),"animationId",O)),childIndex:Z8(L,y.children),item:L})}),N},m=function(y,x){var b=y.props,S=y.dataStartIndex,w=y.dataEndIndex,O=y.updateId;if(!pE({props:b}))return null;var P=b.children,E=b.layout,A=b.stackOffset,C=b.data,T=b.reverseStackOrder,_=t_(E),k=_.numericAxisName,$=_.cateAxisName,R=fr(P,r),I=loe(C,R,"".concat(k,"Id"),"".concat($,"Id"),A,T),B=l.reduce(function(U,V){var W="".concat(V.axisType,"Map");return K(K({},U),{},Pe({},W,Vhe(b,K(K({},V),{},{graphicalItems:R,stackGroups:V.axisType===k&&I,dataStartIndex:S,dataEndIndex:w}))))},{}),N=Khe(K(K({},B),{},{props:b,graphicalItems:R}),x==null?void 0:x.legendBBox);Object.keys(B).forEach(function(U){B[U]=c(b,B[U],N,U.replace("Map",""),n)});var L=B["".concat($,"Map")],M=Whe(L),z=p(b,K(K({},B),{},{dataStartIndex:S,dataEndIndex:w,updateId:O,graphicalItems:R,stackGroups:I,offset:N}));return K(K({formattedGraphicalItems:z,graphicalItems:R,offset:N,stackGroups:I},M),B)},v=function(g){function y(x){var b,S,w;return Ahe(this,y),w=_he(this,y,[x]),Pe(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Pe(w,"accessibilityManager",new phe),Pe(w,"handleLegendBBoxUpdate",function(O){if(O){var P=w.state,E=P.dataStartIndex,A=P.dataEndIndex,C=P.updateId;w.setState(K({legendBBox:O},m({props:w.props,dataStartIndex:E,dataEndIndex:A,updateId:C},K(K({},w.state),{},{legendBBox:O}))))}}),Pe(w,"handleReceiveSyncEvent",function(O,P,E){if(w.props.syncId===O){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(P)}}),Pe(w,"handleBrushChange",function(O){var P=O.startIndex,E=O.endIndex;if(P!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var A=w.state.updateId;w.setState(function(){return K({dataStartIndex:P,dataEndIndex:E},m({props:w.props,dataStartIndex:P,dataEndIndex:E,updateId:A},w.state))}),w.triggerSyncEvent({dataStartIndex:P,dataEndIndex:E})}}),Pe(w,"handleMouseEnter",function(O){var P=w.getMouseInfo(O);if(P){var E=K(K({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseEnter;je(A)&&A(E,O)}}),Pe(w,"triggeredAfterMouseMove",function(O){var P=w.getMouseInfo(O),E=P?K(K({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseMove;je(A)&&A(E,O)}),Pe(w,"handleItemMouseEnter",function(O){w.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),Pe(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),Pe(w,"handleMouseMove",function(O){O.persist(),w.throttleTriggeredAfterMouseMove(O)}),Pe(w,"handleMouseLeave",function(O){w.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};w.setState(P),w.triggerSyncEvent(P);var E=w.props.onMouseLeave;je(E)&&E(P,O)}),Pe(w,"handleOuterEvent",function(O){var P=J8(O),E=cr(w.props,"".concat(P));if(P&&je(E)){var A,C;/.*touch.*/i.test(P)?C=w.getMouseInfo(O.changedTouches[0]):C=w.getMouseInfo(O),E((A=C)!==null&&A!==void 0?A:{},O)}}),Pe(w,"handleClick",function(O){var P=w.getMouseInfo(O);if(P){var E=K(K({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onClick;je(A)&&A(E,O)}}),Pe(w,"handleMouseDown",function(O){var P=w.props.onMouseDown;if(je(P)){var E=w.getMouseInfo(O);P(E,O)}}),Pe(w,"handleMouseUp",function(O){var P=w.props.onMouseUp;if(je(P)){var E=w.getMouseInfo(O);P(E,O)}}),Pe(w,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),Pe(w,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseDown(O.changedTouches[0])}),Pe(w,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseUp(O.changedTouches[0])}),Pe(w,"handleDoubleClick",function(O){var P=w.props.onDoubleClick;if(je(P)){var E=w.getMouseInfo(O);P(E,O)}}),Pe(w,"handleContextMenu",function(O){var P=w.props.onContextMenu;if(je(P)){var E=w.getMouseInfo(O);P(E,O)}}),Pe(w,"triggerSyncEvent",function(O){w.props.syncId!==void 0&&rx.emit(ix,w.props.syncId,O,w.eventEmitterSymbol)}),Pe(w,"applySyncEvent",function(O){var P=w.props,E=P.layout,A=P.syncMethod,C=w.state.updateId,T=O.dataStartIndex,_=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)w.setState(K({dataStartIndex:T,dataEndIndex:_},m({props:w.props,dataStartIndex:T,dataEndIndex:_,updateId:C},w.state)));else if(O.activeTooltipIndex!==void 0){var k=O.chartX,$=O.chartY,R=O.activeTooltipIndex,I=w.state,B=I.offset,N=I.tooltipTicks;if(!B)return;if(typeof A=="function")R=A(N,O);else if(A==="value"){R=-1;for(var L=0;L<N.length;L++)if(N[L].value===O.activeLabel){R=L;break}}var M=K(K({},B),{},{x:B.left,y:B.top}),z=Math.min(k,M.x+M.width),U=Math.min($,M.y+M.height),V=N[R]&&N[R].value,W=yw(w.state,w.props.data,R),Q=N[R]?{x:E==="horizontal"?N[R].coordinate:z,y:E==="horizontal"?U:N[R].coordinate}:zD;w.setState(K(K({},O),{},{activeLabel:V,activeCoordinate:Q,activePayload:W,activeTooltipIndex:R}))}else w.setState(O)}),Pe(w,"renderCursor",function(O){var P,E=w.state,A=E.isTooltipActive,C=E.activeCoordinate,T=E.activePayload,_=E.offset,k=E.activeTooltipIndex,$=E.tooltipAxisBandSize,R=w.getTooltipEventType(),I=(P=O.props.active)!==null&&P!==void 0?P:A,B=w.props.layout,N=O.key||"_recharts-cursor";return D.createElement(bhe,{key:N,activeCoordinate:C,activePayload:T,activeTooltipIndex:k,chartName:n,element:O,isActive:I,layout:B,offset:_,tooltipAxisBandSize:$,tooltipEventType:R})}),Pe(w,"renderPolarAxis",function(O,P,E){var A=cr(O,"type.axisType"),C=cr(w.state,"".concat(A,"Map")),T=O.type.defaultProps,_=T!==void 0?K(K({},T),O.props):O.props,k=C&&C[_["".concat(A,"Id")]];return j.cloneElement(O,K(K({},k),{},{className:Te(A,k.className),key:O.key||"".concat(P,"-").concat(E),ticks:Gi(k,!0)}))}),Pe(w,"renderPolarGrid",function(O){var P=O.props,E=P.radialLines,A=P.polarAngles,C=P.polarRadius,T=w.state,_=T.radiusAxisMap,k=T.angleAxisMap,$=Fo(_),R=Fo(k),I=R.cx,B=R.cy,N=R.innerRadius,L=R.outerRadius;return j.cloneElement(O,{polarAngles:Array.isArray(A)?A:Gi(R,!0).map(function(M){return M.coordinate}),polarRadius:Array.isArray(C)?C:Gi($,!0).map(function(M){return M.coordinate}),cx:I,cy:B,innerRadius:N,outerRadius:L,key:O.key||"polar-grid",radialLines:E})}),Pe(w,"renderLegend",function(){var O=w.state.formattedGraphicalItems,P=w.props,E=P.children,A=P.width,C=P.height,T=w.props.margin||{},_=A-(T.left||0)-(T.right||0),k=p2({children:E,formattedGraphicalItems:O,legendWidth:_,legendContent:u});if(!k)return null;var $=k.item,R=QT(k,whe);return j.cloneElement($,K(K({},R),{},{chartWidth:A,chartHeight:C,margin:T,onBBoxUpdate:w.handleLegendBBoxUpdate}))}),Pe(w,"renderTooltip",function(){var O,P=w.props,E=P.children,A=P.accessibilityLayer,C=ar(E,li);if(!C)return null;var T=w.state,_=T.isTooltipActive,k=T.activeCoordinate,$=T.activePayload,R=T.activeLabel,I=T.offset,B=(O=C.props.active)!==null&&O!==void 0?O:_;return j.cloneElement(C,{viewBox:K(K({},I),{},{x:I.left,y:I.top}),active:B,label:R,payload:B?$:[],coordinate:k,accessibilityLayer:A})}),Pe(w,"renderBrush",function(O){var P=w.props,E=P.margin,A=P.data,C=w.state,T=C.offset,_=C.dataStartIndex,k=C.dataEndIndex,$=C.updateId;return j.cloneElement(O,{key:O.key||"_recharts-brush",onChange:Ap(w.handleBrushChange,O.props.onChange),data:A,x:ne(O.props.x)?O.props.x:T.left,y:ne(O.props.y)?O.props.y:T.top+T.height+T.brushBottom-(E.bottom||0),width:ne(O.props.width)?O.props.width:T.width,startIndex:_,endIndex:k,updateId:"brush-".concat($)})}),Pe(w,"renderReferenceElement",function(O,P,E){if(!O)return null;var A=w,C=A.clipPathId,T=w.state,_=T.xAxisMap,k=T.yAxisMap,$=T.offset,R=O.type.defaultProps||{},I=O.props,B=I.xAxisId,N=B===void 0?R.xAxisId:B,L=I.yAxisId,M=L===void 0?R.yAxisId:L;return j.cloneElement(O,{key:O.key||"".concat(P,"-").concat(E),xAxis:_[N],yAxis:k[M],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:C})}),Pe(w,"renderActivePoints",function(O){var P=O.item,E=O.activePoint,A=O.basePoint,C=O.childIndex,T=O.isRange,_=[],k=P.props.key,$=P.item.type.defaultProps!==void 0?K(K({},P.item.type.defaultProps),P.item.props):P.item.props,R=$.activeDot,I=$.dataKey,B=K(K({index:C,dataKey:I,cx:E.x,cy:E.y,r:4,fill:aj(P.item),strokeWidth:2,stroke:"#fff",payload:E.payload,value:E.value},ve(R,!1)),Gh(R));return _.push(y.renderActiveDot(R,B,"".concat(k,"-activePoint-").concat(C))),A?_.push(y.renderActiveDot(R,K(K({},B),{},{cx:A.x,cy:A.y}),"".concat(k,"-basePoint-").concat(C))):T&&_.push(null),_}),Pe(w,"renderGraphicChild",function(O,P,E){var A=w.filterFormatItem(O,P,E);if(!A)return null;var C=w.getTooltipEventType(),T=w.state,_=T.isTooltipActive,k=T.tooltipAxis,$=T.activeTooltipIndex,R=T.activeLabel,I=w.props.children,B=ar(I,li),N=A.props,L=N.points,M=N.isRange,z=N.baseLine,U=A.item.type.defaultProps!==void 0?K(K({},A.item.type.defaultProps),A.item.props):A.item.props,V=U.activeDot,W=U.hide,Q=U.activeBar,G=U.activeShape,le=!!(!W&&_&&B&&(V||Q||G)),X={};C!=="axis"&&B&&B.props.trigger==="click"?X={onClick:Ap(w.handleItemMouseEnter,O.props.onClick)}:C!=="axis"&&(X={onMouseLeave:Ap(w.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:Ap(w.handleItemMouseEnter,O.props.onMouseEnter)});var q=j.cloneElement(O,K(K({},A.props),X));function ee(Se){return typeof k.dataKey=="function"?k.dataKey(Se.payload):null}if(le)if($>=0){var ie,H;if(k.dataKey&&!k.allowDuplicatedCategory){var Z=typeof k.dataKey=="function"?ee:"payload.".concat(k.dataKey.toString());ie=Kh(L,Z,R),H=M&&z&&Kh(z,Z,R)}else ie=L==null?void 0:L[$],H=M&&z&&z[$];if(G||Q){var J=O.props.activeIndex!==void 0?O.props.activeIndex:$;return[j.cloneElement(O,K(K(K({},A.props),X),{},{activeIndex:J})),null,null]}if(!Ne(ie))return[q].concat(Au(w.renderActivePoints({item:A,activePoint:ie,basePoint:H,childIndex:$,isRange:M})))}else{var se,we=(se=w.getItemByXY(w.state.activeCoordinate))!==null&&se!==void 0?se:{graphicalItem:q},ae=we.graphicalItem,be=ae.item,ce=be===void 0?O:be,Ce=ae.childIndex,Ae=K(K(K({},A.props),X),{},{activeIndex:Ce});return[j.cloneElement(ce,Ae),null,null]}return M?[q,null,null]:[q,null]}),Pe(w,"renderCustomized",function(O,P,E){return j.cloneElement(O,K(K({key:"recharts-customized-".concat(E)},w.props),w.state))}),Pe(w,"renderMap",{CartesianGrid:{handler:Np,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:Np},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:Np},YAxis:{handler:Np},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((b=x.id)!==null&&b!==void 0?b:Gu("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=pI(w.triggeredAfterMouseMove,(S=x.throttleDelay)!==null&&S!==void 0?S:1e3/60),w.state={},w}return Rhe(y,g),The(y,[{key:"componentDidMount",value:function(){var b,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,S=b.children,w=b.data,O=b.height,P=b.layout,E=ar(S,li);if(E){var A=E.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,T=yw(this.state,w,A,C),_=this.state.tooltipTicks[A].coordinate,k=(this.state.offset.top+O)/2,$=P==="horizontal",R=$?{x:_,y:k}:{y:_,x:k},I=this.state.formattedGraphicalItems.find(function(N){var L=N.item;return L.type.name==="Scatter"});I&&(R=K(K({},R),I.props.points[A].tooltipPosition),T=I.props.points[A].tooltipPayload);var B={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:C,activePayload:T,activeCoordinate:R};this.setState(B),this.renderCursor(E),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var w,O;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(b){Wb([ar(b.children,li)],[ar(this.props.children,li)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=ar(this.props.children,li);if(b&&typeof b.props.shared=="boolean"){var S=b.props.shared?"axis":"item";return s.indexOf(S)>=0?S:o}return o}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var S=this.container,w=S.getBoundingClientRect(),O=Eee(w),P={chartX:Math.round(b.pageX-O.left),chartY:Math.round(b.pageY-O.top)},E=w.width/S.offsetWidth||1,A=this.inRange(P.chartX,P.chartY,E);if(!A)return null;var C=this.state,T=C.xAxisMap,_=C.yAxisMap,k=this.getTooltipEventType(),$=ZT(this.state,this.props.data,this.props.layout,A);if(k!=="axis"&&T&&_){var R=Fo(T).scale,I=Fo(_).scale,B=R&&R.invert?R.invert(P.chartX):null,N=I&&I.invert?I.invert(P.chartY):null;return K(K({},P),{},{xValue:B,yValue:N},$)}return $?K(K({},P),$):null}},{key:"inRange",value:function(b,S){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,P=b/w,E=S/w;if(O==="horizontal"||O==="vertical"){var A=this.state.offset,C=P>=A.left&&P<=A.left+A.width&&E>=A.top&&E<=A.top+A.height;return C?{x:P,y:E}:null}var T=this.state,_=T.angleAxisMap,k=T.radiusAxisMap;if(_&&k){var $=Fo(_);return SC({x:P,y:E},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,S=this.getTooltipEventType(),w=ar(b,li),O={};w&&S==="axis"&&(w.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var P=Gh(this.props,this.handleOuterEvent);return K(K({},P),O)}},{key:"addListener",value:function(){rx.on(ix,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){rx.removeListener(ix,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,S,w){for(var O=this.state.formattedGraphicalItems,P=0,E=O.length;P<E;P++){var A=O[P];if(A.item===b||A.props.key===b.key||S===Qi(A.item.type)&&w===A.childIndex)return A}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,S=this.state.offset,w=S.left,O=S.top,P=S.height,E=S.width;return D.createElement("defs",null,D.createElement("clipPath",{id:b},D.createElement("rect",{x:w,y:O,height:P,width:E})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(S,w){var O=YT(w,2),P=O[0],E=O[1];return K(K({},S),{},Pe({},P,E.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(S,w){var O=YT(w,2),P=O[0],E=O[1];return K(K({},S),{},Pe({},P,E.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[b])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(b){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[b])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(b){var S=this.state,w=S.formattedGraphicalItems,O=S.activeItem;if(w&&w.length)for(var P=0,E=w.length;P<E;P++){var A=w[P],C=A.props,T=A.item,_=T.type.defaultProps!==void 0?K(K({},T.type.defaultProps),T.props):T.props,k=Qi(T.type);if(k==="Bar"){var $=(C.data||[]).find(function(N){return lle(b,N)});if($)return{graphicalItem:A,payload:$}}else if(k==="RadialBar"){var R=(C.data||[]).find(function(N){return SC(b,N)});if(R)return{graphicalItem:A,payload:R}}else if(vy(A,O)||xy(A,O)||cd(A,O)){var I=Yue({graphicalItem:A,activeTooltipItem:O,itemData:_.data}),B=_.activeIndex===void 0?I:_.activeIndex;return{graphicalItem:K(K({},A),{},{childIndex:B}),payload:cd(A,O)?_.data[I]:A.props.data[I]}}}return null}},{key:"render",value:function(){var b=this;if(!pE(this))return null;var S=this.props,w=S.children,O=S.className,P=S.width,E=S.height,A=S.style,C=S.compact,T=S.title,_=S.desc,k=QT(S,She),$=ve(k,!1);if(C)return D.createElement(RT,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},D.createElement(Kb,vl({},$,{width:P,height:E,title:T,desc:_}),this.renderClipPath(),mE(w,this.renderMap)));if(this.props.accessibilityLayer){var R,I;$.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,$.role=(I=this.props.role)!==null&&I!==void 0?I:"application",$.onKeyDown=function(N){b.accessibilityManager.keyboardEvent(N)},$.onFocus=function(){b.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return D.createElement(RT,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},D.createElement("div",vl({className:Te("recharts-wrapper",O),style:K({position:"relative",cursor:"default",width:P,height:E},A)},B,{ref:function(L){b.container=L}}),D.createElement(Kb,vl({},$,{width:P,height:E,title:T,desc:_,style:Fhe}),this.renderClipPath(),mE(w,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(j.Component);Pe(v,"displayName",n),Pe(v,"defaultProps",K({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Pe(v,"getDerivedStateFromProps",function(g,y){var x=g.dataKey,b=g.data,S=g.children,w=g.width,O=g.height,P=g.layout,E=g.stackOffset,A=g.margin,C=y.dataStartIndex,T=y.dataEndIndex;if(y.updateId===void 0){var _=e_(g);return K(K(K({},_),{},{updateId:0},m(K(K({props:g},_),{},{updateId:0}),y)),{},{prevDataKey:x,prevData:b,prevWidth:w,prevHeight:O,prevLayout:P,prevStackOffset:E,prevMargin:A,prevChildren:S})}if(x!==y.prevDataKey||b!==y.prevData||w!==y.prevWidth||O!==y.prevHeight||P!==y.prevLayout||E!==y.prevStackOffset||!Cl(A,y.prevMargin)){var k=e_(g),$={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},R=K(K({},ZT(y,b,P)),{},{updateId:y.updateId+1}),I=K(K(K({},k),$),R);return K(K(K({},I),m(K({props:g},I),y)),{},{prevDataKey:x,prevData:b,prevWidth:w,prevHeight:O,prevLayout:P,prevStackOffset:E,prevMargin:A,prevChildren:S})}if(!Wb(S,y.prevChildren)){var B,N,L,M,z=ar(S,ma),U=z&&(B=(N=z.props)===null||N===void 0?void 0:N.startIndex)!==null&&B!==void 0?B:C,V=z&&(L=(M=z.props)===null||M===void 0?void 0:M.endIndex)!==null&&L!==void 0?L:T,W=U!==C||V!==T,Q=!Ne(b),G=Q&&!W?y.updateId:y.updateId+1;return K(K({updateId:G},m(K(K({props:g},y),{},{updateId:G,dataStartIndex:U,dataEndIndex:V}),y)),{},{prevChildren:S,dataStartIndex:U,dataEndIndex:V})}return null}),Pe(v,"renderActiveDot",function(g,y,x){var b;return j.isValidElement(g)?b=j.cloneElement(g,y):je(g)?b=g(y):b=D.createElement(my,y),D.createElement(Le,{className:"recharts-active-dot",key:x},b)});var h=j.forwardRef(function(y,x){return D.createElement(v,vl({},y,{ref:x}))});return h.displayName=v.displayName,h},xj=Ey({chartName:"BarChart",GraphicalChild:jo,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:co},{axisType:"yAxis",AxisComp:fo}],formatAxisMap:aD}),Xhe=Ey({chartName:"PieChart",GraphicalChild:So,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:nc},{axisType:"radiusAxis",AxisComp:zd}],formatAxisMap:A2,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),VD=Ey({chartName:"AreaChart",GraphicalChild:Oo,axisComponents:[{axisType:"xAxis",AxisComp:co},{axisType:"yAxis",AxisComp:fo}],formatAxisMap:aD}),Yhe=Ey({chartName:"RadialBarChart",GraphicalChild:Hd,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:nc},{axisType:"radiusAxis",AxisComp:zd}],formatAxisMap:A2,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const WD=j.createContext(null);function qD(){return j.useContext(WD)??{}}const Qhe=["h-full w-full text-[10px]","[&_.recharts-cartesian-grid_line]:stroke-line","[&_.recharts-cartesian-axis-line]:stroke-line","[&_.recharts-cartesian-axis-tick-line]:stroke-line","[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground","[&_.recharts-radial-bar-background-sector]:fill-panel-2","[&_.recharts-reference-line_line]:stroke-line","[&_.recharts-brush-texts_text]:fill-muted-foreground","[&_.recharts-sector]:outline-none","[&_.recharts-layer]:outline-none","[&_.recharts-surface]:outline-none"].join(" "),KD={height:18,travellerWidth:8,stroke:"var(--accent)",fill:"color-mix(in srgb, var(--panel-2) 80%, transparent)"};function Jhe(e){const t={};for(const[n,r]of Object.entries(e))r.color&&(t[`--color-${n}`]=r.color);return t}function Zi(e){return`var(--color-${e})`}function $s({config:e,className:t,children:n}){const r=j.useMemo(()=>Jhe(e),[e]);return f.jsx(WD.Provider,{value:e,children:f.jsx("div",{"data-chart":"",className:yt(Qhe,t),style:r,children:f.jsx(xee,{width:"100%",height:"100%",children:n})})})}const Cu=li,vw=ys;function GD(e){return typeof e=="object"&&e!==null}function XD(e){return Array.isArray(e)?e.filter(GD):[]}function Jr(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isFinite(e))return String(e)}function Zhe(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function eme(e){return GD(e.payload)?e.payload:void 0}function tme(e){return Jr(e.dataKey)??Jr(e.name)}function nme(e){return Jr(e.dataKey)??Jr(e.name)??Jr(e.value)}function xw(e,t){return e??`series-${t}`}function YD(e,t,n){var i,o;const r=t?(i=n[t])==null?void 0:i.color:void 0;return Jr((o=eme(e))==null?void 0:o.color)??r??Jr(e.color)??Jr(e.fill)}function QD(e,t,n){var i;return(t?(i=n[t])==null?void 0:i.label:void 0)??Jr(e.name)??t??""}function Tu({active:e,payload:t,label:n,hideLabel:r=!1,hideIndicator:i=!1,labelFormatter:o,valueFormatter:a,className:s}){const l=qD(),u=XD(t);if(!e||u.length===0)return null;const c=Jr(n),d=c===void 0?null:(o==null?void 0:o(c))??c;return f.jsxs("div",{className:yt("min-w-[8rem] rounded border border-line bg-popover px-2 py-1.5 text-[11px] text-popover-foreground shadow-lg",s),children:[!r&&d!==null&&f.jsx("p",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:d}),f.jsx("div",{className:"grid gap-0.5",children:u.map((p,m)=>{const v=tme(p),h=Zhe(p.value),g=h!==void 0&&a?a(h,v??""):Jr(p.value)??"—",y=YD(p,v,l);return f.jsxs("div",{className:"flex items-center justify-between gap-3",children:[f.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[!i&&f.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[2px] border border-line",style:y?{background:y}:void 0}),QD(p,v,l)]}),f.jsx("span",{className:"font-mono tabular-nums text-foreground",children:g})]},xw(v,m))})})]})}function bw({payload:e,hidden:t,onToggle:n,className:r}){const i=qD(),o=XD(e);return o.length===0?null:f.jsx("div",{className:yt("flex flex-wrap items-center justify-center gap-x-2 gap-y-1",r),children:o.map((a,s)=>{const l=nme(a),u=l!==void 0&&(t==null?void 0:t.has(l))===!0,c=YD(a,l,i),d=f.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:c?{background:c}:void 0}),p=QD(a,l,i);return!n||l===void 0?f.jsxs("span",{className:"flex items-center gap-1.5 px-1 text-[10px] text-muted-foreground",children:[d,p]},xw(l,s)):f.jsxs(Qe,{variant:"ghost",size:"xs","aria-pressed":!u,title:u?`Show ${l}`:`Hide ${l}`,className:yt("gap-1.5 normal-case tracking-normal",u&&"opacity-40"),onClick:()=>n(l),children:[d,p]},xw(l,s))})})}function rme(){const[e,t]=j.useState(()=>new Set),n=j.useCallback(i=>{t(o=>{const a=new Set(o);return a.delete(i)||a.add(i),a})},[]),r=j.useCallback(i=>e.has(i),[e]);return{hidden:e,toggle:n,isHidden:r}}function ime(e,t){return function(r,...i){const o=new URL(e);return o.searchParams.set("code",r.toString()),i.forEach(a=>o.searchParams.append("args[]",a)),`${t} error #${r}; visit ${o} for the full message.`}}const vn=ime("https://base-ui.com/production-error","Base UI"),JD=j.createContext(void 0);function ic(e){const t=j.useContext(JD);if(!e&&t===void 0)throw new Error(vn(27));return t}const n_={};function zn(e,t){const n=j.useRef(n_);return n.current===n_&&(n.current=e(t)),n}function Ms(e,t,n,r){const i=zn(ZD).current;return ame(i,e,t,n,r)&&eL(i,[e,t,n,r]),i.callback}function ome(e){const t=zn(ZD).current;return sme(t,e)&&eL(t,e),t.callback}function ZD(){return{callback:null,cleanup:null,refs:[]}}function ame(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function sme(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function eL(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const lme=parseInt(j.version,10);function bj(e){return lme>=e}function r_(e){if(!j.isValidElement(e))return null;const t=e,n=t.props;return(bj(19)?n==null?void 0:n.ref:t.ref)??null}function ww(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Pt(){}const ga=Object.freeze([]),$t=Object.freeze({});function ume(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function cme(e,t){return typeof e=="function"?e(t):e}function fme(e,t){return typeof e=="function"?e(t):e}const wj={};function Is(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Jm(t);let o=Jm(e);return t&&(o=qc(o,t)),n&&(o=qc(o,n)),r&&(o=qc(o,r)),i&&(o=qc(o,i)),o}function dme(e){if(e.length===0)return wj;if(e.length===1)return Jm(e[0]);let t=Jm(e[0]);for(let n=1;n<e.length;n+=1)t=qc(t,e[n]);return t}function Jm(e){return Sj(e)?{...nL(e,wj)}:pme(e)}function qc(e,t){return Sj(t)?nL(t,e):hme(e,t)}function pme(e){const t={...e};for(const n in t){const r=t[n];tL(n,r)&&(t[n]=rL(r))}return t}function hme(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ww(e.style,r);break}case"className":{e[n]=iL(e.className,r);break}default:tL(n,r)?e[n]=mme(e[n],r):e[n]=r}}return e}function tL(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function Sj(e){return typeof e=="function"}function nL(e,t){return Sj(e)?e(t):e??wj}function mme(e,t){return t?e?(...n)=>{const r=n[0];if(oL(r)){const o=r;Zm(o);const a=t(...n);return o.baseUIHandlerPrevented||e==null||e(...n),a}const i=t(...n);return e==null||e(...n),i}:rL(t):e}function rL(e){return e&&((...t)=>{const n=t[0];return oL(n)&&Zm(n),e(...t)})}function Zm(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function iL(e,t){return t?e?t+" "+e:t:e}function oL(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function on(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=xme(r));const i=gme(t,n,r);if(n.enabled===!1)return null;const o=n.state??$t;return bme(e,r,i,o)}function gme(e,t,n){const{className:r,style:i}=e,{state:o=$t,ref:a,props:s,stateAttributesMapping:l,enabled:u=!0}=t,c=u?cme(r,o):void 0,d=u?fme(i,o):void 0,p=u?ume(o,l):$t,m=u&&s?yme(s):void 0,v=u?ww(p,m)??{}:$t;return typeof document<"u"&&(u?Array.isArray(a)?v.ref=ome([v.ref,r_(n),...a]):v.ref=Ms(v.ref,r_(n),a):Ms(null,null)),u?(c!==void 0&&(v.className=iL(v.className,c)),d!==void 0&&(v.style=ww(v.style,d)),v):$t}function yme(e){return Array.isArray(e)?dme(e):Is(void 0,e)}const vme=Symbol.for("react.lazy");function xme(e){if((e==null?void 0:e.$$typeof)!==vme)return e;const t=j.Children.toArray(e)[0];return j.isValidElement(t)?t:e}function bme(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Is(n,t.props);return i.ref=n.ref,j.cloneElement(t,i)}if(e&&typeof e=="string")return wme(e,n);throw new Error(vn(8))}function wme(e,t){return e==="button"?j.createElement("button",{type:"button",...t,key:t.key}):e==="img"?j.createElement("img",{alt:"",...t,key:t.key}):j.createElement(e,t)}const aL="data-starting-style",Sme="data-ending-style",jme={[aL]:""},Ome={[Sme]:""},jj={transitionStatus(e){return e==="starting"?jme:e==="ending"?Ome:null}},Pme="data-open",Eme="data-closed",Ame="data-anchor-hidden",sL="data-popup-open",Cme="data-pressed",Tme={[sL]:""},_me={[sL]:"",[Cme]:""},kme={[Pme]:""},Nme={[Eme]:""},Rme={[Ame]:""},lL={open(e){return e?Tme:null}},$me={open(e){return e?_me:null}},Ay={open(e){return e?kme:Nme},anchorHidden(e){return e?Rme:null}},uL={...Ay,...jj},Mme=j.forwardRef(function(t,n){const{render:r,className:i,style:o,forceRender:a=!1,...s}=t,l=ic(),u=l.useState("open"),c=l.useState("nested"),d=l.useState("mounted"),p=l.useState("transitionStatus");return on("div",t,{state:{open:u,transitionStatus:p},ref:[l.context.backdropRef,n],stateAttributesMapping:uL,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},s],enabled:a||!c})});function Cy(){return typeof window<"u"}function yn(e){return Oj(e)?(e.nodeName||"").toLowerCase():"#document"}function ft(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Po(e){var t;return(t=(Oj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Oj(e){return Cy()?e instanceof Node||e instanceof ft(e).Node:!1}function De(e){return Cy()?e instanceof Element||e instanceof ft(e).Element:!1}function ot(e){return Cy()?e instanceof HTMLElement||e instanceof ft(e).HTMLElement:!1}function _u(e){return!Cy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ft(e).ShadowRoot}function Wd(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=hr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function Ime(e){return/^(table|td|th)$/.test(yn(e))}function Ty(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Dme=/transform|translate|scale|rotate|perspective|filter/,Lme=/paint|layout|strict|content/,za=e=>!!e&&e!=="none";let ax;function Pj(e){const t=De(e)?hr(e):e;return za(t.transform)||za(t.translate)||za(t.scale)||za(t.rotate)||za(t.perspective)||!Ej()&&(za(t.backdropFilter)||za(t.filter))||Dme.test(t.willChange||"")||Lme.test(t.contain||"")}function Fme(e){let t=ya(e);for(;ot(t)&&!ca(t);){if(Pj(t))return t;if(Ty(t))return null;t=ya(t)}return null}function Ej(){return ax==null&&(ax=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ax}function ca(e){return/^(html|body|#document)$/.test(yn(e))}function hr(e){return ft(e).getComputedStyle(e)}function _y(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ya(e){if(yn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_u(e)&&e.host||Po(e);return _u(t)?t.host:t}function cL(e){const t=ya(e);return ca(t)?(e.ownerDocument||e).body:ot(t)&&Wd(t)?t:cL(t)}function vd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=cL(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=ft(i);if(o){const s=Sw(a);return t.concat(a,a.visualViewport||[],Wd(i)?i:[],s&&n?vd(s):[])}else return t.concat(i,vd(i,[],n))}function Sw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Aj={...rN},sx=Aj.useInsertionEffect,Bme=sx&&sx!==Aj.useLayoutEffect?sx:e=>e();function de(e){const t=zn(Ume).current;return t.next=e,Bme(t.effect),t.trampoline}function Ume(){const e={next:void 0,callback:zme,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function zme(){}const Hme=()=>{},fe=typeof document<"u"?j.useLayoutEffect:Hme,fL=j.createContext(void 0);function Cj(e=!1){const t=j.useContext(fL);if(t===void 0&&!e)throw new Error(vn(16));return t}function Vme(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,s=r&&t===!1;return{props:j.useMemo(()=>{const u={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return r||(u.tabIndex=i,!o&&n&&(u.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(u["aria-disabled"]=n),o&&(!t||s)&&(u.disabled=n),u},[r,n,t,a,s,o,i])}}function qe(e){return(e==null?void 0:e.ownerDocument)||document}function lx(e,t,{detail:n=0}={}){e.dispatchEvent(new(ft(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Tj(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:o}=e,a=j.useRef(null),s=Cj(!0),l=o??s!==void 0,{props:u}=Vme({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),c=j.useCallback(()=>{const m=a.current;ux(m)&&l&&t&&u.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,u.disabled,l]);fe(c,[c]);const d=j.useCallback((m={})=>{const{onClick:v,onMouseDown:h,onKeyUp:g,onKeyDown:y,onPointerDown:x,...b}=m;return Is({onClick(S){if(t){S.preventDefault();return}v==null||v(S)},onMouseDown(S){t||h==null||h(S)},onKeyDown(S){if(t||(Zm(S),y==null||y(S),S.baseUIHandlerPrevented))return;const w=S.target===S.currentTarget,O=S.currentTarget,P=ux(O),E=!i&&Wme(O),A=w&&(i?P:!E),C=S.key==="Enter",T=S.key===" ",_=O.getAttribute("role"),k=(_==null?void 0:_.startsWith("menuitem"))||_==="option"||_==="gridcell";if(w&&l&&T){if(S.defaultPrevented&&k)return;S.preventDefault(),(!i||P)&&(S.preventBaseUIHandler(),lx(O,S));return}if(!A||i||!T&&!C){w&&E&&T&&S.preventDefault();return}S.defaultPrevented||(S.preventDefault(),C&&(S.preventBaseUIHandler(),lx(O,S)))},onKeyUp(S){if(!t){if(Zm(S),g==null||g(S),S.target===S.currentTarget&&i&&l&&ux(S.currentTarget)&&S.key===" "){S.preventDefault();return}S.baseUIHandlerPrevented||S.target===S.currentTarget&&!i&&!l&&!S.defaultPrevented&&S.key===" "&&(S.preventBaseUIHandler(),lx(S.currentTarget,S))}},onPointerDown(S){if(t){S.preventDefault();return}x==null||x(S)}},i?{type:"button"}:{role:"button"},u,b)},[t,u,l,i]),p=de(m=>{a.current=m,c()});return{getButtonProps:d,buttonRef:p}}function ux(e){return ot(e)&&e.tagName==="BUTTON"}function Wme(e){return ot(e)&&e.tagName==="A"&&!!e.href}const va="none",qd="trigger-press",Kn="trigger-hover",fh="trigger-focus",_j="outside-press",cx="item-press",ky="focus-out",kj="escape-key",i_="list-navigation",qme="cancel-open",dL="disabled",o_="missing",a_="initial",pL="imperative-action",Kme="window-resize";function Ie(e,t,n,r){let i=!1,o=!1;const a=r??$t;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}let s_=0;function Gme(e,t="mui"){const[n,r]=j.useState(e),i=e||n;return j.useEffect(()=>{n==null&&(s_+=1,r(`${t}-${s_}`))},[n,t]),i}const l_=Aj.useId;function Ny(e,t){if(l_!==void 0){const n=l_();return e??(t?`${t}-${n}`:n)}return Gme(e,t)}function oc(e){return Ny(e,"base-ui")}const Xme=j.forwardRef(function(t,n){const{render:r,className:i,style:o,id:a,...s}=t,l=ic(),u=oc(a);return l.useSyncedValueWithCleanup("descriptionElementId",u),on("p",t,{ref:n,props:[{id:u},s]})});function Nj(e){j.useEffect(e,ga)}const $c=0;class ti{constructor(){tt(this,"currentId",$c);tt(this,"clear",()=>{this.currentId!==$c&&(clearTimeout(this.currentId),this.currentId=$c)});tt(this,"disposeEffect",()=>this.clear)}static create(){return new ti}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=$c,n()},t)}isStarted(){return this.currentId!==$c}}function dr(){const e=zn(ti.create).current;return Nj(e.disposeEffect),e}function Yme(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:Qme,platform:Jme,maxTouchPoints:Zme}=Yme(),Ry=Qme.toLowerCase(),xd=Jme.toLowerCase(),$y=/^i(os$|p)/.test(xd)||xd==="macintel"&&Zme>1,u_="android",jw=xd===u_||Ry.includes(u_),hL=!$y&&xd.startsWith("mac");xd.startsWith("win");const ege=hL||$y;var qk;const Eo=typeof CSS<"u"&&!!((qk=CSS.supports)!=null&&qk.call(CSS,"-webkit-backdrop-filter:none"));!Eo&&Ry.includes("firefox");!Eo&&Ry.includes("chrom");const tge=ege,Rj=/jsdom|happydom/.test(Ry);function ui(e){e.preventDefault(),e.stopPropagation()}function nge(e){return"nativeEvent"in e}function My(e){return e.pointerType===""&&e.isTrusted?!0:jw&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function $j(e){return Rj?!1:!jw&&e.width===0&&e.height===0||jw&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function fa(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function rge(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Ln(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function xe(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&_u(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function hn(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const Ow="data-base-ui-focusable",mL="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Iy="ArrowLeft",Dy="ArrowRight",gL="ArrowUp",Mj="ArrowDown",Pw="data-trigger-disabled";function eg(e,t){if(!De(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute(Pw);for(const[,r]of t.entries())if(xe(r,n))return!r.hasAttribute(Pw);return!1}function fx(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function ige(e){return e.matches("html,body")}function Ly(e){return ot(e)&&e.matches(mL)}function oge(e){return(e==null?void 0:e.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${mL}`))!=null}function Ew(e){return e?e.getAttribute("role")==="combobox"&&Ly(e):!1}function age(e){if(!e||Rj)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function tg(e){return e?e.hasAttribute(Ow)?e:e.querySelector(`[${Ow}]`)||e:null}function sge(e,t){return t!=null&&!fa(t)?0:typeof e=="function"?e():e}function Ds(e,t,n){const r=sge(e,n);return typeof r=="number"?r:r==null?void 0:r[t]}function c_(e){return typeof e=="function"?e():e}function yL(e,t){return t||e==="click"||e==="mousedown"}function lge(e){return(e==null?void 0:e.includes("mouse"))&&e!=="mousedown"}const vL=j.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ti,currentIdRef:{current:null},currentContextRef:{current:null}});function uge(e,t){e.current=t.current}function cge(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=j.useRef(n),o=j.useRef(n),a=j.useRef(null),s=j.useRef(null),l=dr();return fe(()=>{if(o.current=n,!a.current){i.current=n;return}i.current={open:Ds(i.current,"open"),close:Ds(n,"close")}},[n,a,i,o]),f.jsx(vL.Provider,{value:j.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:r,currentContextRef:s,timeout:l}),[r,l]),children:t})}function fge(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,i=r.useState("floatingId"),o=j.useContext(vL),{currentIdRef:a,delayRef:s,timeoutMs:l,initialDelayRef:u,currentContextRef:c,hasProvider:d,timeout:p}=o,[m,v]=j.useState(!1),h=j.useRef(n);return fe(()=>{h.current=n},[n]),fe(()=>{function g(){var y;(y=c.current)==null||y.setIsInstantPhase(!1),a.current=null,c.current=null,s.current=u.current,p.clear()}if(a.current&&!n&&a.current===i){if(v(!1),l){const y=i;return p.start(l,()=>{r.select("open")||a.current&&a.current!==y||g()}),()=>{(h.current||a.current!==y)&&p.clear()}}g()}},[n,i,a,s,l,u,c,p,r]),fe(()=>{if(!n)return;const g=c.current,y=a.current;p.clear(),c.current={onOpenChange:r.setOpen,setIsInstantPhase:v},a.current=i,s.current={open:0,close:Ds(u.current,"close")},y!==null&&y!==i?(v(!0),g==null||g.setIsInstantPhase(!0),g==null||g.onOpenChange(!1,Ie(va))):(v(!1),g==null||g.setIsInstantPhase(!1))},[n,i,r,a,s,u,c,p]),fe(()=>()=>{if(a.current===i){if(c.current=null,!h.current)return;a.current=null,uge(s,u),p.clear()}},[c,a,s,i,u,p]),j.useMemo(()=>({activeIdRef:a,hasProvider:d,delayRef:s,isInstantPhase:m}),[a,d,s,m])}function Me(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Oi(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function kt(e){const t=zn(dge,e).current;return t.next=e,fe(t.effect),t}function dge(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Rp=null;class pge{constructor(){tt(this,"callbacks",[]);tt(this,"callbacksCount",0);tt(this,"nextId",1);tt(this,"startId",1);tt(this,"isScheduled",!1);tt(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||this.callbacks[n]!==null&&(this.callbacks[n]=null,this.callbacksCount-=1)}}let $p=new pge;class hi{constructor(){tt(this,"currentId",Rp);tt(this,"cancel",()=>{this.currentId!==Rp&&($p.cancel(this.currentId),this.currentId=Rp)});tt(this,"disposeEffect",()=>this.cancel)}static create(){return new hi}static request(t){return $p.request(t)}static cancel(t){return $p.cancel(t)}request(t){this.cancel(),this.currentId=$p.request(()=>{this.currentId=Rp,t()})}}function ku(){const e=zn(hi.create).current;return Nj(e.disposeEffect),e}const xL={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},bL={...xL,position:"fixed",top:0,left:0},hge={...xL,position:"absolute"},ng=j.forwardRef(function(t,n){const[r,i]=j.useState();fe(()=>{tge&&Eo&&i("button")},[]);const o={tabIndex:0,role:r};return f.jsx("span",{...t,ref:n,style:bL,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})}),Nu=Math.min,eo=Math.max,rg=Math.round,Mp=Math.floor,to=e=>({x:e,y:e}),mge={left:"right",right:"left",bottom:"top",top:"bottom"};function wL(e,t,n){return eo(e,Nu(t,n))}function xa(e,t){return typeof e=="function"?e(t):e}function Nr(e){return e.split("-")[0]}function po(e){return e.split("-")[1]}function Ij(e){return e==="x"?"y":"x"}function Dj(e){return e==="y"?"height":"width"}function _r(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Lj(e){return Ij(_r(e))}function gge(e,t,n){n===void 0&&(n=!1);const r=po(e),i=Lj(e),o=Dj(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ig(a)),[a,ig(a)]}function yge(e){const t=ig(e);return[Aw(e),t,Aw(t)]}function Aw(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const f_=["left","right"],d_=["right","left"],vge=["top","bottom"],xge=["bottom","top"];function bge(e,t,n){switch(e){case"top":case"bottom":return n?t?d_:f_:t?f_:d_;case"left":case"right":return t?vge:xge;default:return[]}}function wge(e,t,n,r){const i=po(e);let o=bge(Nr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Aw)))),o}function ig(e){const t=Nr(e);return mge[t]+e.slice(t.length)}function Sge(e){var t,n,r,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(i=e.left)!=null?i:0}}function SL(e){return typeof e!="number"?Sge(e):{top:e,right:e,bottom:e,left:e}}function bd(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function df(e,t){return t<0||t>=e.length}function dh(e,t){return Xi(e.current,{disabledIndices:t})}function Cw(e,t){return Xi(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xi(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let o=t;do o+=n?-i:i;while(o>=0&&o<=e.length-1&&Nl(e,o,r));return o}function Nl(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const i=e[t];return i?!Fy(i)||i.matches(":disabled")?!0:!n&&(i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"):!1}function jge(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Fy(e,t=e?hr(e):null){return!e||!e.isConnected||!t||jge(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const Oge='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function Pge(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return _u(n)?n.host:null}function Tw(e){for(const t of Array.from(e.children))if(yn(t)==="summary")return t;return null}function Ege(e,t){const n=Tw(t);return!!n&&(e===n||xe(n,e))}function jL(e){const t=e?yn(e):"";return e!=null&&e.matches(Oge)&&(t!=="summary"||e.parentElement!=null&&yn(e.parentElement)==="details"&&Tw(e.parentElement)===e)&&(t!=="details"||Tw(e)==null)&&(t!=="input"||e.type!=="hidden")}function OL(e){if(!jL(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=Pge(t)){const n=t!==e,r=yn(t)==="slot";if(t.hasAttribute("inert")||n&&yn(t)==="details"&&!t.open&&!Ege(e,t)||t.hasAttribute("hidden")||!r&&!Age(t,n))return!1}return!0}function Age(e,t){const n=hr(e);return t?n.display!=="none":Fy(e,n)}function PL(e){const t=e.tabIndex;if(t<0){const n=yn(e);if(n==="details"||n==="audio"||n==="video"||ot(e)&&e.isContentEditable)return 0}return t}function dx(e){if(yn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function Cge(e,t){const n=dx(e);if(!n)return!0;const r=t.find(i=>{const o=dx(i);return(o==null?void 0:o.name)===n.name&&o.form===n.form&&o.checked});return r?r===n:t.find(i=>{const o=dx(i);return(o==null?void 0:o.name)===n.name&&o.form===n.form})===n}function EL(e){if(ot(e)&&yn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return ot(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function AL(e,t){EL(e).forEach(n=>{jL(n)&&t.push(n),AL(n,t)})}function CL(e,t,n){EL(e).forEach(r=>{ot(r)&&r.matches(t)&&n.push(r),CL(r,t,n)})}function Fj(e){return OL(e)&&PL(e)>=0}function TL(e){const t=[];return AL(e,t),t.filter(OL)}function By(e){const t=TL(e);return t.filter(n=>PL(n)>=0&&Cge(n,t))}function _L(e,t){const n=By(e),r=n.length;if(r===0)return;const i=Ln(qe(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function kL(e){return _L(qe(e).body,1)||e}function NL(e){return _L(qe(e).body,-1)||e}function pf(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xe(n,r)}function Tge(e){By(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function p_(e){const t=[];CL(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ba(e,t,n=!0){return e.filter(i=>i.parentId===t).flatMap(i=>{var o;return[...!n||(o=i.context)!=null&&o.open?[i]:[],...ba(e,i.id,n)]})}function h_(e,t){var i;let n=[],r=(i=e.find(o=>o.id===t))==null?void 0:i.parentId;for(;r;){const o=e.find(a=>a.id===r);r=o==null?void 0:o.parentId,o&&(n=n.concat(o))}return n}function wd(e){return`data-base-ui-${e}`}let Ip=0;function ph(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Ip);function o(){i&&!i()||e==null||e.focus({preventScroll:n})}if(r)return o(),Pt;const a=requestAnimationFrame(o);return Ip=a,()=>{Ip===a&&(cancelAnimationFrame(a),Ip=0)}}const px={inert:new WeakMap,"aria-hidden":new WeakMap},m_="data-base-ui-inert",_w={inert:new WeakSet,"aria-hidden":new WeakSet};let Mc=new WeakMap,hx=0;function _ge(e){return _w[e]}function RL(e){return e?_u(e)?e.host:RL(e.parentNode):null}const g_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=RL(n);return e.contains(r)?r:null}).filter(n=>n!=null),y_=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},v_=(e,t,n)=>{const r=[],i=o=>{!o||n.has(o)||Array.from(o.children).forEach(a=>{yn(a)!=="script"&&(t.has(a)?i(a):r.push(a))})};return i(e),r};function kge(e,t,n,r,{mark:i=!0}){let o=null;r?o="inert":n&&(o="aria-hidden");let a=null,s=null;const l=g_(t,e),u=i?v_(t,y_(l),new Set(l)):[],c=[],d=[];if(o){const p=px[o],m=_ge(o);s=m,a=p;const v=g_(t,Array.from(t.querySelectorAll("[aria-live]"))),h=l.concat(v);v_(t,y_(h),new Set(h)).forEach(y=>{const x=y.getAttribute(o),b=x!==null&&x!=="false",S=(p.get(y)||0)+1;p.set(y,S),c.push(y),S===1&&b&&m.add(y),b||y.setAttribute(o,o==="inert"?"":"true")})}return i&&u.forEach(p=>{const m=(Mc.get(p)||0)+1;Mc.set(p,m),d.push(p),m===1&&p.setAttribute(m_,"")}),hx+=1,()=>{a&&c.forEach(p=>{const v=(a.get(p)||0)-1;a.set(p,v),v||(!(s!=null&&s.has(p))&&o&&p.removeAttribute(o),s==null||s.delete(p))}),i&&d.forEach(p=>{const m=(Mc.get(p)||0)-1;Mc.set(p,m),m||p.removeAttribute(m_)}),hx-=1,hx||(px.inert=new WeakMap,px["aria-hidden"]=new WeakMap,_w.inert=new WeakSet,_w["aria-hidden"]=new WeakSet,Mc=new WeakMap)}}function x_(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,o=qe(e[0]).body;return kge(e,o,n,r,{mark:i})}const Nge={style:{transition:"none"}},Rge="data-base-ui-click-trigger",$ge={fallbackAxisSide:"none"},Mge={fallbackAxisSide:"end"},Ige={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$L=j.createContext(null),ML=()=>j.useContext($L),Dge=wd("portal");function IL(e={}){const{ref:t,container:n,componentProps:r=$t,elementProps:i}=e,o=Ny(),a=ML(),s=a==null?void 0:a.portalNode,[l,u]=j.useState(null),[c,d]=j.useState(null),p=de(g=>{g!==null&&d(g)}),m=j.useRef(null);fe(()=>{if(n===null){m.current&&(m.current=null,d(null),u(null));return}const g=(n&&(Oj(n)?n:n.current))??s??document.body;if(g==null){m.current&&(m.current=null,d(null),u(null));return}m.current!==g&&(m.current=g,d(null),u(g))},[n,s]);const v=on("div",r,{ref:[t,p],props:[{id:o,[Dge]:""},i]}),h=l&&v?go.createPortal(v,l):null;return{node:c,nodeId:j.isValidElement(v)?v.props.id:void 0,subtree:h}}const DL=j.forwardRef(function(t,n){const{render:r,className:i,style:o,children:a,container:s,portalOwnerRole:l,...u}=t,{node:c,nodeId:d,subtree:p}=IL({container:s,ref:n,componentProps:t,elementProps:u}),m=j.useRef(null),v=j.useRef(null),h=j.useRef(null),g=j.useRef(null),[y,x]=j.useState(null),b=j.useRef(!1),S=y==null?void 0:y.modal,w=y==null?void 0:y.open,O=!!y&&!y.modal&&y.open&&!!c;j.useEffect(()=>{if(!c||S)return;function E(A){c&&A.relatedTarget&&pf(A)&&(A.type==="focusin"?b.current&&(p_(c),b.current=!1):(Tge(c),b.current=!0))}return Oi(Me(c,"focusin",E,!0),Me(c,"focusout",E,!0))},[c,S]),fe(()=>{!c||w!==!0||!b.current||(p_(c),b.current=!1)},[w,c]);const P=j.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:v,beforeInsideRef:h,afterInsideRef:g,portalNode:c,setFocusManagerState:x}),[c]);return f.jsxs(j.Fragment,{children:[p,f.jsxs($L.Provider,{value:P,children:[O&&c&&f.jsx(ng,{"data-type":"outside",ref:m,onFocus:E=>{var A;if(pf(E,c))(A=h.current)==null||A.focus();else{const C=y?y.domReference:null,T=NL(C);T==null||T.focus()}}}),O&&c&&f.jsx("span",{role:l,"aria-owns":d,style:Ige}),c&&go.createPortal(a,c),O&&c&&f.jsx(ng,{"data-type":"outside",ref:v,onFocus:E=>{var A;if(pf(E,c))(A=g.current)==null||A.focus();else{const C=y?y.domReference:null,T=kL(C);T==null||T.focus(),y!=null&&y.closeOnFocusOut&&(y==null||y.onOpenChange(!1,Ie(ky,E.nativeEvent)))}}})]})]})});function Lge(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Fge=j.createContext(null),Bge=j.createContext(null),Uy=()=>{var e;return((e=j.useContext(Fge))==null?void 0:e.id)||null},ac=e=>{const t=j.useContext(Bge);return e??t};function Mi(e){return e==null?e:"current"in e?e.current:e}function Uge(e,t){const n=ft(hn(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const b_=20;let Zo=[];function Bj(){Zo=Zo.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function w_(e){Bj(),e&&yn(e)!=="body"&&(Zo.push(new WeakRef(e)),Zo.length>b_&&(Zo=Zo.slice(-b_)))}function S_(){var e;return Bj(),(e=Zo[Zo.length-1])==null?void 0:e.deref()}function zge(e){return e?Fj(e)?e:By(e)[0]||e:null}function j_(e){var i;if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!((i=e.getAttribute("role"))!=null&&i.includes("dialog")))return;const n=TL(e).filter(o=>{const a=o.getAttribute("data-tabindex")||"";return Fj(o)||o.hasAttribute("data-tabindex")&&!a.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function LL(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:s=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:c,previousFocusableElement:d,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:v}=e,h="rootStore"in t?t.rootStore:t,g=h.useState("open"),y=h.useState("domReferenceElement"),x=h.useState("floatingElement"),{events:b,dataRef:S}=h.context,w=de(()=>{var H;return(H=S.current.floatingContext)==null?void 0:H.nodeId}),O=i===!1,P=Ew(y)&&O,E=kt(i),A=kt(o),C=kt(u),T=kt(g),_=ac(m),k=ML(),$=j.useRef(!1),R=j.useRef(!1),I=j.useRef(!1),B=j.useRef(null),N=j.useRef(""),L=j.useRef(""),M=j.useRef(null),z=j.useRef(null),U=Ms(M,p,k==null?void 0:k.beforeInsideRef),V=Ms(z,k==null?void 0:k.afterInsideRef),W=dr(),Q=dr(),G=ku(),le=k!=null,X=tg(x),q=de((H=X)=>H?By(H):[]),ee=de(()=>(v==null?void 0:v().filter(H=>H!=null))??[]);j.useEffect(()=>{if(r||!s)return;function H(J){J.key==="Tab"&&xe(X,Ln(qe(X)))&&q().length===0&&!P&&ui(J)}const Z=qe(X);return Me(Z,"keydown",H)},[r,X,s,P,q]),j.useEffect(()=>{if(r||!g)return;const H=qe(X);function Z(){I.current=!1}function J(we){const ae=hn(we),be=ee(),ce=xe(x,ae)||xe(y,ae)||xe(k==null?void 0:k.portalNode,ae)||be.some(Ce=>Ce===ae||xe(Ce,ae));I.current=!ce,L.current=we.pointerType||"keyboard",ae!=null&&ae.closest(`[${Rge}]`)&&(R.current=!0,Q.start(0,()=>{R.current=!1}))}function se(){L.current="keyboard"}return Oi(Me(H,"pointerdown",J,!0),Me(H,"pointerup",Z,!0),Me(H,"pointercancel",Z,!0),Me(H,"keydown",se,!0),Z)},[r,x,y,X,g,k,Q,ee]),j.useEffect(()=>{if(r||!l)return;const H=qe(X);function Z(){R.current=!0,Q.start(0,()=>{R.current=!1})}function J(be){const ce=hn(be);Fj(ce)&&(B.current=ce)}function se(be){const ce=be.relatedTarget,Ce=be.currentTarget,Ae=hn(be);s&&ce==null&&Ae!=null&&xe(x,Ae)&&w_(Ae),queueMicrotask(()=>{const Se=w(),We=h.context.triggerElements,te=ee(),pe=(ce==null?void 0:ce.hasAttribute(wd("focus-guard")))&&[M.current,z.current,k==null?void 0:k.beforeInsideRef.current,k==null?void 0:k.afterInsideRef.current,k==null?void 0:k.beforeOutsideRef.current,k==null?void 0:k.afterOutsideRef.current,Mi(d),Mi(c)].includes(ce),oe=!(xe(y,ce)||xe(x,ce)||xe(ce,x)||xe(k==null?void 0:k.portalNode,ce)||te.some(Y=>Y===ce||xe(Y,ce))||We.hasMatchingElement(Y=>xe(Y,ce))||pe||_&&(ba(_.nodesRef.current,Se).find(Y=>{var ge,_e;return xe((ge=Y.context)==null?void 0:ge.elements.floating,ce)||xe((_e=Y.context)==null?void 0:_e.elements.domReference,ce)})||h_(_.nodesRef.current,Se).find(Y=>{var ge,_e,He;return[(ge=Y.context)==null?void 0:ge.elements.floating,tg((_e=Y.context)==null?void 0:_e.elements.floating)].includes(ce)||((He=Y.context)==null?void 0:He.elements.domReference)===ce})));if(Ce===y&&X&&j_(X),a&&Ce!==y&&!Fy(Ae)&&Ln(H)===H.body){if(ot(X)&&(X.focus(),a==="popup")){G.request(()=>{X.focus()});return}const Y=q(),ge=B.current,_e=(ge&&Y.includes(ge)?ge:null)||Y[Y.length-1]||X;ot(_e)&&_e.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(P||!s)&&ce&&oe&&!R.current&&(P||ce!==S_())&&($.current=!0,h.setOpen(!1,Ie(ky,be)))})}function we(){I.current||(S.current.insideReactTree=!0,W.start(0,()=>{S.current.insideReactTree=!1}))}const ae=ot(y)?y:null;if(!(!x&&!ae))return Oi(ae&&Me(ae,"focusout",se),ae&&Me(ae,"pointerdown",Z),x&&Me(x,"focusin",J),x&&Me(x,"focusout",se),x&&k&&Me(x,"focusout",we,!0))},[r,y,x,X,s,_,k,h,l,a,q,P,w,S,W,Q,G,c,d,ee]),j.useEffect(()=>{var Ce,Ae,Se;if(r||!x||!g)return;const H=Array.from(((Ce=k==null?void 0:k.portalNode)==null?void 0:Ce.querySelectorAll(`[${wd("portal")}]`))||[]),J=(Se=(Ae=(_?h_(_.nodesRef.current,w()):[]).find(We=>{var te;return Ew(((te=We.context)==null?void 0:te.elements.domReference)||null)}))==null?void 0:Ae.context)==null?void 0:Se.elements.domReference,we=[...[x,...H,M.current,z.current,k==null?void 0:k.beforeOutsideRef.current,k==null?void 0:k.afterOutsideRef.current,...ee()],J,Mi(d),Mi(c),P?y:null].filter(We=>We!=null),ae=x_(we,{ariaHidden:s||P,mark:!1}),be=[x,...H].filter(We=>We!=null),ce=x_(be);return()=>{ce(),ae()}},[g,r,y,x,s,k,P,_,w,c,d,ee]),fe(()=>{if(!g||r||!ot(X))return;N.current="",L.current="";const H=qe(X),Z=Ln(H);queueMicrotask(()=>{const J=E.current,se=typeof J=="function"?J(C.current||""):J;if(se===void 0||se===!1||xe(X,Z))return;let ae=null;const be=()=>(ae==null&&(ae=q(X)),ae[0]||X);let ce;se===!0||se===null?ce=be():ce=Mi(se),ce=ce||be();const Ce=xe(X,Ln(H));ph(ce,{preventScroll:ce===X,shouldFocus(){if(!T.current)return!1;if(Ce)return!0;const Ae=Ln(H);return!(Ae!==ce&&xe(X,Ae))}})})},[r,g,X,q,E,C,T]),fe(()=>{if(r||!X)return;const H=qe(X),Z=Ln(H),J=C.current==null;w_(Z);function se(ae){if(ae.open||(N.current=Uge(ae.nativeEvent,L.current)),ae.reason===Kn&&ae.nativeEvent.type==="mouseleave"&&($.current=!0),ae.reason===_j)if(ae.nested)$.current=!1;else if(My(ae.nativeEvent)||$j(ae.nativeEvent))$.current=!1;else{let be=!1;qe(X).createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?$.current=!1:$.current=!0}}b.on("openchange",se);function we(ae){const be=A.current;let ce=typeof be=="function"?be(ae):be;if(ce===void 0||ce===!1)return null;ce===null&&(ce=!0);const Ce=y!=null&&y.isConnected?y:null,Ae=Z!=null&&Z.isConnected&&yn(Z)!=="body"?Z:null;let Se=J?Ae||Ce:Ce||Ae;return Se||(Se=S_()||null),typeof ce=="boolean"?Se:Mi(ce)||Se||null}return()=>{b.off("openchange",se);const ae=Ln(H),be=ee(),ce=xe(x,ae)||be.some(We=>We===ae||xe(We,ae))||_&&ba(_.nodesRef.current,w(),!1).some(We=>{var te;return xe((te=We.context)==null?void 0:te.elements.floating,ae)}),Ce=A.current,Ae=N.current,Se=we(Ae);queueMicrotask(()=>{const We=zge(Se),te=typeof Ce!="boolean";if(Ce&&!$.current&&ot(We)&&(!(!te&&We!==ae&&ae!==H.body)||ce)){const pe={preventScroll:!0};Ae==="keyboard"&&(pe.focusVisible=!0),We.focus(pe)}$.current=!1})}},[r,x,X,A,C,b,_,y,w,ee]),fe(()=>{if(!Eo||g||!x)return;const H=Ln(qe(x));!ot(H)||!Ly(H)||xe(x,H)&&H.blur()},[g,x]),fe(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:l,open:g,onOpenChange:h.setOpen,domReference:y}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,l,y]),fe(()=>{if(!(r||!X))return j_(X),()=>{queueMicrotask(Bj)}},[r,X]);const ie=!r&&(s?!P:!0)&&(le||s);return f.jsxs(j.Fragment,{children:[ie&&f.jsx(ng,{"data-type":"inside",ref:U,onFocus:H=>{var Z;if(s){const J=q();ph(J[J.length-1])}else if(k!=null&&k.portalNode)if($.current=!1,pf(H,k.portalNode)){const J=kL(y);J==null||J.focus()}else(Z=Mi(d??k.beforeOutsideRef))==null||Z.focus()}}),n,ie&&f.jsx(ng,{"data-type":"inside",ref:V,onFocus:H=>{var Z;if(s)ph(q()[0]);else if(k!=null&&k.portalNode)if(l&&($.current=!0),pf(H,k.portalNode)){const J=NL(y);J==null||J.focus()}else(Z=Mi(c??k.afterOutsideRef))==null||Z.focus()}})]})}function Hge(e,t={}){const{enabled:n=!0,event:r="click",toggle:i=!0,ignoreMouse:o=!1,stickIfOpen:a=!0,touchOpenDelay:s=0,reason:l=qd}=t,u="rootStore"in e?e.rootStore:e,c=u.context.dataRef,d=j.useRef(void 0),p=ku(),m=dr(),v=j.useMemo(()=>{function h(y,x,b,S){const w=Ie(l,x,b);y&&S==="touch"&&s>0?m.start(s,()=>{u.setOpen(!0,w)}):u.setOpen(y,w)}function g(y,x,b){const S=c.current.openEvent,w=u.select("domReferenceElement")!==x;return y&&w||!y||!i?!0:S&&a?!b(S.type):!1}return{onPointerDown(y){d.current=fa(y.pointerType,!0)&&$j(y.nativeEvent)?"virtual":y.pointerType},onMouseDown(y){const x=d.current,b=y.nativeEvent,S=u.select("open");if(y.button!==0||r==="click"||fa(x,!0)&&o)return;const w=g(S,y.currentTarget,E=>E==="click"||E==="mousedown"),O=hn(b);if(Ly(O)){h(w,b,O,x);return}const P=y.currentTarget;p.request(()=>{h(w,b,P,x)})},onClick(y){if(r==="mousedown-only")return;const x=d.current;if(r==="mousedown"&&x){d.current=void 0;return}if(fa(x,!0)&&o)return;const b=u.select("open"),S=g(b,y.currentTarget,w=>w==="click"||w==="mousedown"||w==="keydown"||w==="keyup");h(S,y.nativeEvent,y.currentTarget,x)},onKeyDown(){d.current=void 0}}},[c,r,o,l,u,a,i,p,m,s]);return j.useMemo(()=>n?{reference:v}:$t,[n,v])}function Vge(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var m;const o=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",s=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(((m=t.dataRef.current.openEvent)==null?void 0:m.type)||"")&&t.pointerType!=="touch";let u=o.width,c=o.height,d=o.x,p=o.y;return n==null&&t.x&&a&&(n=o.x-t.x),r==null&&t.y&&s&&(r=o.y-t.y),d-=n||0,p-=r||0,u=0,c=0,!i||l?(u=t.axis==="y"?o.width:0,c=t.axis==="x"?o.height:0,d=a&&t.x!=null?t.x:d,p=s&&t.y!=null?t.y:p):i&&!l&&(c=t.axis==="x"?o.height:c,u=t.axis==="y"?o.width:u),i=!0,{width:u,height:c,x:d,y:p,top:p,right:d+u,bottom:p+c,left:d}}}}function O_(e){return e!=null&&e.clientX!=null}function Wge(e,t={}){const{enabled:n=!0,axis:r="both"}=t,i="rootStore"in e?e.rootStore:e,o=i.useState("open"),a=i.useState("floatingElement"),s=i.useState("domReferenceElement"),l=i.context.dataRef,u=j.useRef(!1),c=j.useRef(null),[d,p]=j.useState(),[m,v]=j.useState([]),h=de(S=>{i.set("positionReference",S)}),g=de((S,w,O)=>{u.current||l.current.openEvent&&!O_(l.current.openEvent)||i.set("positionReference",Vge(O??s,{x:S,y:w,axis:r,dataRef:l,pointerType:d}))}),y=de(S=>{o?c.current||(g(S.clientX,S.clientY,S.currentTarget),v([])):g(S.clientX,S.clientY,S.currentTarget)}),x=fa(d)?a:o;j.useEffect(()=>{if(!n){h(s);return}if(!x)return;function S(){var P;(P=c.current)==null||P.call(c),c.current=null}const w=ft(a);function O(P){const E=hn(P);xe(a,E)?S():g(P.clientX,P.clientY)}return!l.current.openEvent||O_(l.current.openEvent)?c.current=Me(w,"mousemove",O):h(s),S},[x,n,a,l,s,i,g,h,m]),j.useEffect(()=>()=>{i.set("positionReference",null)},[i]),j.useEffect(()=>{n&&!a&&(u.current=!1)},[n,a]),j.useEffect(()=>{!n&&o&&(u.current=!0)},[n,o]);const b=j.useMemo(()=>{function S(w){p(w.pointerType)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:y,onMouseEnter:y}},[y]);return j.useMemo(()=>n?{reference:b,trigger:b}:{},[n,b])}function qge(){return!1}function Kge(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function Uj(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:o="sloppy",referencePress:a=qge,bubbles:s,externalTree:l}=t,u="rootStore"in e?e.rootStore:e,c=u.useState("open"),d=u.useState("floatingElement"),{dataRef:p,events:m}=u.context,v=ac(l),h=de(typeof i=="function"?i:()=>!1),g=typeof i=="function"?h:i,y=g!==!1,x=de(()=>o),{escapeKey:b,outsidePress:S}=Kge(s),w=j.useRef(!1),O=j.useRef(!1),P=j.useRef(!1),E=j.useRef(!1),A=j.useRef(!1),C=j.useRef(""),T=j.useRef(null),_=dr(),k=dr(),$=de(()=>{k.clear(),p.current.insideReactTree=!1}),R=de(W=>{var le;const Q=(le=p.current.floatingContext)==null?void 0:le.nodeId;return(v?ba(v.nodesRef.current,Q):[]).some(X=>{var q;return((q=X.context)==null?void 0:q.open)&&!X.context.dataRef.current[W]})}),I=de(W=>fx(W,u.select("floatingElement"))||fx(W,u.select("domReferenceElement"))),B=de(W=>{a()&&u.setOpen(!1,Ie(qd,W.nativeEvent))}),N=de(W=>{if(!c||!n||!r||W.key!=="Escape"||A.current||!b&&R("__escapeKeyBubbles"))return;const Q=nge(W)?W.nativeEvent:W,G=Ie(kj,Q);u.setOpen(!1,G),G.isCanceled||W.preventDefault(),!b&&!G.isPropagationAllowed&&W.stopPropagation()}),L=de(()=>{p.current.insideReactTree=!0,k.start(0,$)}),M=de(W=>{if(!c||!n||W.button!==0)return;const Q=hn(W.nativeEvent);xe(u.select("floatingElement"),Q)&&(w.current||(w.current=!0,O.current=!1))}),z=de(W=>{!c||!n||(W.defaultPrevented||W.nativeEvent.defaultPrevented)&&w.current&&(O.current=!0)});j.useEffect(()=>{function W(Q){Q.open||(E.current=!1)}return m.on("openchange",W),()=>{m.off("openchange",W)}},[m]),j.useEffect(()=>{if(!c||!n)return c||(E.current=!1),$;p.current.__escapeKeyBubbles=b,p.current.__outsidePressBubbles=S;const W=new ti,Q=new ti,G=qe(d);function le(){W.clear(),A.current=!0}function X(){W.start(Eo?5:0,()=>{A.current=!1})}function q(){P.current=!0,Q.start(0,()=>{P.current=!1})}function ee(){w.current=!1,O.current=!1}function ie(){const oe=C.current,Y=oe==="pen"||!oe?"mouse":oe,ge=x(),_e=typeof ge=="function"?ge():ge;return typeof _e=="string"?_e:_e[Y]}function H(oe){const Y=ie();return Y==="intentional"&&oe.type!=="click"||Y==="sloppy"&&oe.type==="click"}function Z(oe){var _e;const Y=(_e=p.current.floatingContext)==null?void 0:_e.nodeId,ge=v&&ba(v.nodesRef.current,Y).some(He=>{var an;return fx(oe,(an=He.context)==null?void 0:an.elements.floating)});return I(oe)||ge}function J(oe){if(H(oe)){oe.type!=="click"&&!I(oe)&&(Q.clear(),P.current=!1),$();return}if(p.current.insideReactTree){$();return}const Y=hn(oe),ge=`[${wd("inert")}]`,_e=De(Y)?Y.getRootNode():null,He=Array.from((_u(_e)?_e:qe(u.select("floatingElement"))).querySelectorAll(ge)),an=u.context.triggerElements;if(Y&&(an.hasElement(Y)||an.hasMatchingElement(St=>xe(St,Y))))return;let Nn=De(Y)?Y:null;for(;Nn&&!ca(Nn);){const St=ya(Nn);if(ca(St)||!De(St))break;Nn=St}if(!(He.length&&De(Y)&&!ige(Y)&&!xe(Y,u.select("floatingElement"))&&He.every(St=>!xe(Nn,St)))){if(ot(Y)&&!("touches"in oe)){const St=ca(Y),xn=hr(Y),nr=/auto|scroll/,Rn=St||nr.test(xn.overflowX),ii=St||nr.test(xn.overflowY),Lr=Rn&&Y.clientWidth>0&&Y.scrollWidth>Y.clientWidth,Ti=ii&&Y.clientHeight>0&&Y.scrollHeight>Y.clientHeight,yr=xn.direction==="rtl",_i=Ti&&(yr?oe.offsetX<=Y.offsetWidth-Y.clientWidth:oe.offsetX>Y.clientWidth),Fr=Lr&&oe.offsetY>Y.clientHeight;if(_i||Fr)return}if(!Z(oe)){if(ie()==="intentional"){if(oe.detail!==0&&!My(oe)&&!E.current)return;if(P.current){Q.clear(),P.current=!1;return}}typeof g=="function"&&!g(oe)||R("__outsidePressBubbles")||(u.setOpen(!1,Ie(_j,oe)),$())}}}function se(oe){ie()!=="sloppy"||oe.pointerType==="touch"||!u.select("open")||!n||I(oe)||J(oe)}function we(oe){if(ie()!=="sloppy"||!u.select("open")||!n||I(oe))return;const Y=oe.touches[0];Y&&(T.current={startTime:Date.now(),startX:Y.clientX,startY:Y.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function ae(oe,Y){const ge=hn(oe);if(!ge)return;const _e=Me(ge,oe.type,()=>{Y(oe),_e()})}function be(oe){C.current="touch",ae(oe,we)}function ce(oe){_.clear(),oe.type==="pointerdown"&&(oe.button===0&&(E.current=!0),C.current=oe.pointerType),!(oe.type==="mousedown"&&T.current&&!T.current.dismissOnMouseDown)&&ae(oe,Y=>{Y.type==="pointerdown"?se(Y):J(Y)})}function Ce(oe){if(oe.type==="pointercancel"&&(E.current=!1),!w.current)return;const Y=O.current;if(ee(),ie()==="intentional"){if(oe.type==="pointercancel"){Y&&q();return}if(!Z(oe)){if(Y){q();return}typeof g=="function"&&!g(oe)||(Q.clear(),P.current=!0,$())}}}function Ae(oe){if(ie()!=="sloppy"||!T.current||I(oe))return;const Y=oe.touches[0];if(!Y)return;const ge=Math.abs(Y.clientX-T.current.startX),_e=Math.abs(Y.clientY-T.current.startY),He=Math.sqrt(ge*ge+_e*_e);He>5&&(T.current.dismissOnTouchEnd=!0),He>10&&(J(oe),_.clear(),T.current=null)}function Se(oe){ae(oe,Ae)}function We(oe){ie()!=="sloppy"||!T.current||I(oe)||(T.current.dismissOnTouchEnd&&J(oe),_.clear(),T.current=null)}function te(oe){ae(oe,We)}const pe=Oi(r&&Oi(Me(G,"keydown",N),Me(G,"compositionstart",le),Me(G,"compositionend",X)),y&&Oi(Me(G,"click",ce,!0),Me(G,"pointerdown",ce,!0),Me(G,"pointerup",Ce,!0),Me(G,"pointercancel",Ce,!0),Me(G,"mousedown",ce,!0),Me(G,"mouseup",Ce,!0),Me(G,"touchstart",be,{capture:!0,passive:!0}),Me(G,"touchmove",Se,{capture:!0,passive:!0}),Me(G,"touchend",te,{capture:!0,passive:!0})));return()=>{pe(),W.clear(),Q.clear(),ee(),P.current=!1,$()}},[p,d,r,y,g,c,n,b,S,N,$,x,R,I,v,u,_]);const U=j.useMemo(()=>({onKeyDown:N,onPointerDown:B,onClick:B}),[N,B]),V=j.useMemo(()=>({onKeyDown:N,onPointerDown:z,onMouseDown:z,onClickCapture:L,onMouseDownCapture(W){L(),M(W)},onPointerDownCapture(W){L(),M(W)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[N,L,M,z]);return j.useMemo(()=>n?{reference:U,floating:V,trigger:U}:{},[n,U,V])}function P_(e,t,n){let{reference:r,floating:i}=e;const o=_r(t),a=Lj(t),s=Dj(a),l=Nr(t),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let m;switch(l){case"top":m={x:c,y:r.y-i.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}const v=po(t);return v&&(m[a]+=p*(v==="end"?1:-1)*(n&&u?-1:1)),m}async function Gge(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=xa(t,e),v=SL(m),g=s[p?d==="floating"?"reference":"floating":d],y=bd(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),x=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),S=await(o.isElement==null?void 0:o.isElement(b))&&await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1},w=bd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-w.top+v.top)/S.y,bottom:(w.bottom-y.bottom+v.bottom)/S.y,left:(y.left-w.left+v.left)/S.x,right:(w.right-y.right+v.right)/S.x}}const Xge=50,Yge=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Gge},l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=P_(u,r,l),p=r,m=0;const v={};for(let h=0;h<o.length;h++){const g=o[h];if(!g)continue;const{name:y,fn:x}=g,{x:b,y:S,data:w,reset:O}=await x({x:c,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:v,rects:u,platform:s,elements:{reference:e,floating:t}});c=b??c,d=S??d,v[y]={...v[y],...w},O&&m<Xge&&(m++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(u=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:c,y:d}=P_(u,p,l)),h=-1)}return{x:c,y:d,placement:p,strategy:i,middlewareData:v}},Qge=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...g}=xa(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Nr(i),x=_r(s),b=Nr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),w=p||(b||!h?[ig(s)]:yge(s)),O=v!=="none";!p&&O&&w.push(...wge(s,h,v,S));const P=[s,...w],E=await l.detectOverflow(t,g),A=[];let C=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&A.push(E[y]),d){const $=gge(i,a,S);A.push(E[$[0]],E[$[1]])}if(C=[...C,{placement:i,overflows:A}],!A.every($=>$<=0)){var T,_;const $=(((T=o.flip)==null?void 0:T.index)||0)+1,R=P[$];if(R&&(!(d==="alignment"?x!==_r(R):!1)||C.every(N=>_r(N.placement)===x?N.overflows[0]>0:!0)))return{data:{index:$,overflows:C},reset:{placement:R}};let I=(_=C.filter(B=>B.overflows[0]<=0).sort((B,N)=>B.overflows[1]-N.overflows[1])[0])==null?void 0:_.placement;if(!I)switch(m){case"bestFit":{var k;const B=(k=C.filter(N=>{if(O){const L=_r(N.placement);return L===x||L==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(L=>L>0).reduce((L,M)=>L+M,0)]).sort((N,L)=>N[1]-L[1])[0])==null?void 0:k[0];B&&(I=B);break}case"initialPlacement":I=s;break}if(i!==I)return{reset:{placement:I}}}return{}}}},FL=new Set(["left","top"]);async function Jge(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Nr(n),s=po(n),l=_r(n)==="y",u=FL.has(a)?-1:1,c=o&&l?-1:1,d=xa(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(m=s==="end"?v*-1:v),l?{x:m*c,y:p*u}:{x:p*u,y:m*c}}const Zge=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await Jge(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},eye=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:x=>{let{x:b,y:S}=x;return{x:b,y:S}}},...u}=xa(e,t),c={x:n,y:r},d=await o.detectOverflow(t,u),p=_r(i),m=Ij(p);let v=c[m],h=c[p];const g=(x,b)=>wL(b+d[x==="y"?"top":"left"],b,b-d[x==="y"?"bottom":"right"]);a&&(v=g(m,v)),s&&(h=g(p,h));const y=l.fn({...t,[m]:v,[p]:h});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[m]:a,[p]:s}}}}}},tye=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:i,y:o,placement:a,rects:s,middlewareData:l}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=xa(e,t),p={x:i,y:o},m=_r(a),v=Ij(m);let h=p[v],g=p[m];const y=xa(u,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:(n=y.mainAxis)!=null?n:0,crossAxis:(r=y.crossAxis)!=null?r:0};if(c){const w=v==="y"?"height":"width",O=s.reference[v]-s.floating[w]+x.mainAxis,P=s.reference[v]+s.reference[w]-x.mainAxis;h<O?h=O:h>P&&(h=P)}if(d){var b,S;const w=v==="y"?"width":"height",O=FL.has(Nr(a)),P=s.reference[m]-s.floating[w]+(O&&((b=l.offset)==null?void 0:b[m])||0)+(O?0:x.crossAxis),E=s.reference[m]+s.reference[w]+(O?0:((S=l.offset)==null?void 0:S[m])||0)-(O?x.crossAxis:0);g<P?g=P:g>E&&(g=E)}return{[v]:h,[m]:g}}}},nye=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=xa(e,t),l=await i.detectOverflow(t,s),u=Nr(n),c=po(n),d=_r(n)==="y",{width:p,height:m}=r.floating;let v,h;u==="top"||u==="bottom"?(v=u,h=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(h=u,v=c==="end"?"top":"bottom");const g=m-l.top-l.bottom,y=p-l.left-l.right,x=Nu(m-l[v],g),b=Nu(p-l[h],y),S=t.middlewareData.shift,w=!S;let O=x,P=b;S!=null&&S.enabled.x&&(P=y),S!=null&&S.enabled.y&&(O=g),w&&!c&&(d?P=p-2*eo(l.left,l.right):O=m-2*eo(l.top,l.bottom)),await a({...t,availableWidth:P,availableHeight:O});const E=await i.getDimensions(o.floating);return p!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function BL(e){const t=hr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ot(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=rg(n)!==o||rg(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function zj(e){return De(e)?e:e.contextElement}function Rl(e){const t=zj(e);if(!ot(t))return to(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=BL(t);let a=(o?rg(n.width):n.width)/r,s=(o?rg(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const rye=to(0);function UL(e){const t=ft(e);return!Ej()||!t.visualViewport?rye:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iye(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ft(e)}function Ls(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=zj(e);let a=to(1);t&&(r?De(r)&&(a=Rl(r)):a=Rl(e));const s=iye(o,n,r)?UL(o):to(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o&&r){const p=ft(o),m=De(r)?ft(r):r;let v=p,h=Sw(v);for(;h&&m!==v;){const g=Rl(h),y=h.getBoundingClientRect(),x=hr(h),b=y.left+(h.clientLeft+parseFloat(x.paddingLeft))*g.x,S=y.top+(h.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,d*=g.y,l+=b,u+=S,v=ft(h),h=Sw(v)}}return bd({width:c,height:d,x:l,y:u})}function zy(e,t){const n=_y(e).scrollLeft;return t?t.left+n:Ls(Po(e)).left+n}function zL(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-zy(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function oye(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Po(r),s=t?Ty(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=to(1);const c=to(0),d=ot(r);if((d||!o)&&((yn(r)!=="body"||Wd(a))&&(l=_y(r)),d)){const m=Ls(r);u=Rl(r),c.x=m.x+r.clientLeft,c.y=m.y+r.clientTop}const p=a&&!d&&!o?zL(a,l):to(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-l.scrollTop*u.y+c.y+p.y}}function aye(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function sye(e){const t=_y(e),n=e.ownerDocument.body,r=eo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=eo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+zy(e);const a=-t.scrollTop;return hr(n).direction==="rtl"&&(o+=eo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:o,y:a}}const lye=25;function uye(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",i=ft(e),o=Po(e),a=i.visualViewport;let s=o.clientWidth,l=o.clientHeight,u=0,c=0;if(a){const p=!Ej()||t==="fixed";r?p||(u=-a.offsetLeft,c=-a.offsetTop):(s=a.width,l=a.height,p&&(u=a.offsetLeft,c=a.offsetTop))}if(zy(o)<=0){const p=o.ownerDocument,m=p.body,v=getComputedStyle(m),h=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,g=Math.abs(o.clientWidth-m.clientWidth-h),y=getComputedStyle(o).scrollbarGutter==="stable both-edges"?g/2:g;y<=lye&&(s-=y)}return{width:s,height:l,x:u,y:c}}function cye(e,t){const n=Ls(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Rl(e),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function E_(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=uye(e,n,t);else if(t==="document")r=sye(Po(e));else if(De(t))r=cye(t,n);else{const i=UL(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return bd(r)}function fye(e,t){const n=t.get(e);if(n)return n;let r=vd(e,[],!1).filter(s=>De(s)&&yn(s)!=="body"),i=null;const o=hr(e).position==="fixed";let a=o?ya(e):e;for(;De(a)&&!ca(a);){const s=hr(a),l=Pj(a),u=i?i.position:o?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&s.position==="static")?r=r.filter(d=>d!==a):i=s,a=ya(a)}return t.set(e,r),r}function dye(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Ty(t)?[]:fye(t,this._c):[].concat(n),r],s=E_(t,a[0],i);let l=s.top,u=s.right,c=s.bottom,d=s.left;for(let p=1;p<a.length;p++){const m=E_(t,a[p],i);l=eo(m.top,l),u=Nu(m.right,u),c=Nu(m.bottom,c),d=eo(m.left,d)}return{width:u-d,height:c-l,x:d,y:l}}function pye(e){const{width:t,height:n}=BL(e);return{width:t,height:n}}function hye(e,t,n){const r=ot(t),i=Po(t),o=n==="fixed",a=Ls(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=to(0);if((r||!o)&&((yn(t)!=="body"||Wd(i))&&(s=_y(t)),r)){const p=Ls(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!r&&i&&(l.x=zy(i));const u=i&&!r&&!o?zL(i,s):to(0),c=a.left+s.scrollLeft-l.x-u.x,d=a.top+s.scrollTop-l.y-u.y;return{x:c,y:d,width:a.width,height:a.height}}function mx(e){return hr(e).position==="static"}function A_(e,t){if(!ot(e)||hr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Po(e)===n&&(n=n.ownerDocument.body),n}function HL(e,t){const n=ft(e);if(Ty(e))return n;if(!ot(e)){let i=ya(e);for(;i&&!ca(i);){if(De(i)&&!mx(i))return i;i=ya(i)}return n}let r=A_(e,t);for(;r&&Ime(r)&&mx(r);)r=A_(r,t);return r&&ca(r)&&mx(r)&&!Pj(r)?n:r||Fme(e)||n}const mye=async function(e){const t=this.getOffsetParent||HL,n=this.getDimensions,r=await n(e.floating);return{reference:hye(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gye(e){return hr(e).direction==="rtl"}const VL={convertOffsetParentRelativeRectToViewportRelativeRect:oye,getDocumentElement:Po,getClippingRect:dye,getOffsetParent:HL,getElementRects:mye,getClientRects:aye,getDimensions:pye,getScale:Rl,isElement:De,isRTL:gye};function WL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yye(e,t,n){let r=null,i;const o=Po(e);function a(){var c;clearTimeout(i),(c=r)==null||c.disconnect(),r=null}function s(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const p=e.getBoundingClientRect(),{left:m,top:v,width:h,height:g}=p;if(c||t(),!h||!g)return;const y=Mp(v),x=Mp(o.clientWidth-(m+h)),b=Mp(o.clientHeight-(v+g)),S=Mp(m),O={rootMargin:-y+"px "+-x+"px "+-b+"px "+-S+"px",threshold:eo(0,Nu(1,d))||1};let P=!0;function E(A){const C=A[0].intersectionRatio;if(!WL(p,e.getBoundingClientRect()))return s();if(C!==d){if(!P)return s();C?s(!1,C):i=setTimeout(()=>{s(!1,1e-7)},1e3)}P=!1}try{r=new IntersectionObserver(E,{...O,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,O)}r.observe(e)}const l=ft(e),u=()=>s(n);return l.addEventListener("resize",u),s(!0),()=>{l.removeEventListener("resize",u),a()}}function C_(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=zj(e),c=i||o?[...u?vd(u):[],...t?vd(t):[]]:[];c.forEach(y=>{i&&y.addEventListener("scroll",n),o&&y.addEventListener("resize",n)});const d=u&&s?yye(u,n,o):null;let p=-1,m=null;a&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!l&&m.observe(u),t&&m.observe(t));let v,h=l?Ls(e):null;l&&g();function g(){const y=Ls(e);h&&!WL(h,y)&&n(),h=y,v=requestAnimationFrame(g)}return n(),()=>{var y;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const vye=Zge,xye=eye,bye=Qge,wye=nye,Sye=tye,jye=(e,t,n)=>{const r=new Map,i=n??{},o={...VL,...i.platform,_c:r};return Yge(e,t,{...i,platform:o})};var Oye=typeof document<"u",Pye=function(){},hh=Oye?j.useLayoutEffect:Pye;function og(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!og(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!og(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function qL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function T_(e,t){const n=qL(e);return Math.round(t*n)/n}function gx(e){const t=j.useRef(e);return hh(()=>{t.current=e}),t}function Eye(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=j.useState(r);og(p,r)||m(r);const[v,h]=j.useState(null),[g,y]=j.useState(null),x=j.useCallback(N=>{N!==O.current&&(O.current=N,h(N))},[]),b=j.useCallback(N=>{N!==P.current&&(P.current=N,y(N))},[]),S=o||v,w=a||g,O=j.useRef(null),P=j.useRef(null),E=j.useRef(c),A=l!=null,C=gx(l),T=gx(i),_=gx(u),k=j.useCallback(()=>{if(!O.current||!P.current)return;const N={placement:t,strategy:n,middleware:p};T.current&&(N.platform=T.current),jye(O.current,P.current,N).then(L=>{const M={...L,isPositioned:_.current!==!1};$.current&&!og(E.current,M)&&(E.current=M,go.flushSync(()=>{d(M)}))})},[p,t,n,T,_]);hh(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[u]);const $=j.useRef(!1);hh(()=>($.current=!0,()=>{$.current=!1}),[]),hh(()=>{if(S&&(O.current=S),w&&(P.current=w),S&&w){if(C.current)return C.current(S,w,k);k()}},[S,w,k,C,A]);const R=j.useMemo(()=>({reference:O,floating:P,setReference:x,setFloating:b}),[x,b]),I=j.useMemo(()=>({reference:S,floating:w}),[S,w]),B=j.useMemo(()=>{const N={position:n,left:0,top:0};if(!I.floating)return N;const L=T_(I.floating,c.x),M=T_(I.floating,c.y);return s?{...N,transform:"translate("+L+"px, "+M+"px)",...qL(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:M}},[n,s,I.floating,c.x,c.y]);return j.useMemo(()=>({...c,update:k,refs:R,elements:I,floatingStyles:B}),[c,k,R,I,B])}const Aye=(e,t)=>{const n=vye(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cye=(e,t)=>{const n=xye(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tye=(e,t)=>({fn:Sye(e).fn,options:[e,t]}),_ye=(e,t)=>{const n=bye(e);return{name:n.name,fn:n.fn,options:[e,t]}},kye=(e,t)=>{const n=wye(e);return{name:n.name,fn:n.fn,options:[e,t]}};var KL={exports:{}},GL={};/**
|
|
139
|
-
* @license React
|
|
140
|
-
* use-sync-external-store-shim.production.js
|
|
141
|
-
*
|
|
142
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the MIT license found in the
|
|
145
|
-
* LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/var Ru=j;function Nye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rye=typeof Object.is=="function"?Object.is:Nye,$ye=Ru.useState,Mye=Ru.useEffect,Iye=Ru.useLayoutEffect,Dye=Ru.useDebugValue;function Lye(e,t){var n=t(),r=$ye({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Iye(function(){i.value=n,i.getSnapshot=t,yx(i)&&o({inst:i})},[e,n,t]),Mye(function(){return yx(i)&&o({inst:i}),e(function(){yx(i)&&o({inst:i})})},[e]),Dye(n),n}function yx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rye(e,n)}catch{return!0}}function Fye(e,t){return t()}var Bye=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Fye:Lye;GL.useSyncExternalStore=Ru.useSyncExternalStore!==void 0?Ru.useSyncExternalStore:Bye;KL.exports=GL;var Hy=KL.exports,XL={exports:{}},YL={};/**
|
|
147
|
-
* @license React
|
|
148
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
149
|
-
*
|
|
150
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
151
|
-
*
|
|
152
|
-
* This source code is licensed under the MIT license found in the
|
|
153
|
-
* LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/var Vy=j,Uye=Hy;function zye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Hye=typeof Object.is=="function"?Object.is:zye,Vye=Uye.useSyncExternalStore,Wye=Vy.useRef,qye=Vy.useEffect,Kye=Vy.useMemo,Gye=Vy.useDebugValue;YL.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Wye(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Kye(function(){function l(m){if(!u){if(u=!0,c=m,m=r(m),i!==void 0&&a.hasValue){var v=a.value;if(i(v,m))return d=v}return d=m}if(v=d,Hye(c,m))return v;var h=r(m);return i!==void 0&&i(v,h)?(c=m,v):(c=m,d=h)}var u=!1,c,d,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=Vye(e,o[0],o[1]);return qye(function(){a.hasValue=!0,a.value=s},[s]),Gye(s),s};XL.exports=YL;var QL=XL.exports;const kw=[];let Nw;function Xye(){return Nw}function Yye(e){kw.push(e)}function Hj(e){const t=(n,r)=>{const i=zn(Jye).current;let o;try{Nw=i;for(const a of kw)a.before(i);o=e(n,r);for(const a of kw)a.after(i);i.didInitialize=!0}finally{Nw=void 0}return o};return t.displayName=e.displayName||e.name,t}function Qye(e){return j.forwardRef(Hj(e))}function Jye(){return{didInitialize:!1}}const Zye=bj(19),eve=Zye?nve:rve;function JL(e,t,n,r,i){return eve(e,t,n,r,i)}function tve(e,t,n,r,i){const o=j.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return Hy.useSyncExternalStore(e.subscribe,o,o)}Yye({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),Hy.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function nve(e,t,n,r,i){const o=Xye();if(!o)return tve(e,t,n,r,i);const a=o.syncIndex;o.syncIndex+=1;let s;return o.didInitialize?(s=o.syncHooks[a],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(o.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},o.syncHooks.push(s)),s.value}function rve(e,t,n,r,i){return QL.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class ive{constructor(t){tt(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));tt(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new this(t)}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return JL(this,t,n,r,i)}}class Wy extends ive{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){j.useDebugValue(t);const r=this;fe(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;fe(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);fe(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){j.useDebugValue(t);const r=this,i=n!==void 0;fe(()=>{i&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,i])}select(t,n,r,i){const o=this.selectors[t];return o(this.state,n,r,i)}useState(t,n,r,i){return j.useDebugValue(t),JL(this,this.selectors[t],n,r,i)}useContextCallback(t,n){j.useDebugValue(t);const r=de(n??Pt);this.context[t]=r}useStateSetter(t){const n=j.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(o=>{const a=r(o);if(!Object.is(i,a)){const s=i;i=a,n(a,s,this)}})}}const ove={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class Vj extends Wy{constructor(n){const{syncOnly:r,nested:i,onOpenChange:o,triggerElements:a,...s}=n;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:Lge(),nested:i,triggerElements:a},ove);tt(this,"syncOpenEvent",(n,r)=>{(!n||!this.state.open||r!=null&&rge(r))&&(this.context.dataRef.current.openEvent=n?r:void 0)});tt(this,"dispatchOpenChange",(n,r)=>{this.syncOpenEvent(n,r.event);const i={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",i)});tt(this,"setOpen",(n,r)=>{var i,o,a,s;if(this.syncOnly){(o=(i=this.context).onOpenChange)==null||o.call(i,n,r);return}this.dispatchOpenChange(n,r),(s=(a=this.context).onOpenChange)==null||s.call(a,n,r)});this.syncOnly=r}}function ave(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:o,onOpenChange:a}=e,s=t.useState("open"),l=t.useState("activeTriggerElement"),u=t.useState(n?"popupElement":"positionerElement"),c=t.context.triggerElements,d=a,p=j.useRef(null);r===void 0&&p.current===null&&(p.current=new Vj({open:s,transitionStatus:void 0,referenceElement:l,floatingElement:u,triggerElements:c,onOpenChange:d,floatingId:i,syncOnly:!0,nested:o}));const m=r??p.current;return t.useSyncedValue("floatingId",i),fe(()=>{const v={open:s,floatingId:i,referenceElement:l,floatingElement:u};De(l)&&(v.domReferenceElement=l),m.state.positionReference===m.state.referenceElement&&(v.positionReference=l),m.update(v)},[s,i,l,u,m]),m.context.onOpenChange=d,m.context.nested=o,m}function ZL(e,t=!1,n=!1,r=!1){const[i,o]=j.useState(e&&t?"idle":void 0),[a,s]=j.useState(e&&!r);return e&&!a&&(s(!0),o("starting")),!e&&a&&i!=="ending"&&!n&&o("ending"),!e&&!a&&i==="ending"&&o(void 0),fe(()=>{if(!e&&a&&i!=="ending"&&n){const l=hi.request(()=>{o("ending")});return()=>{hi.cancel(l)}}},[e,a,i,n]),fe(()=>{if(!e||t)return;const l=hi.request(()=>{o(void 0)});return()=>{hi.cancel(l)}},[t,e]),fe(()=>{if(!e||!t)return;e&&a&&i!=="idle"&&o("starting");const l=hi.request(()=>{o("idle")});return()=>{hi.cancel(l)}},[t,e,a,i]),{mounted:a,setMounted:s,transitionStatus:i}}let Dp=null;function sve(e){if(!Dp){const t=[];Dp=t,queueMicrotask(()=>{Dp=null,go.flushSync(()=>{for(const n of t)n()})})}Dp.push(e)}function lve(e,t=!1,n=!1){const r=ku();return de((i,o=null)=>{r.cancel();const a=Mi(e);if(a==null)return;const s=a,l=()=>{if(!n){go.flushSync(i);return}sve(()=>{o!=null&&o.aborted||i()})};if(typeof s.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function u(){Promise.all(s.getAnimations().map(c=>c.finished)).then(()=>{o!=null&&o.aborted||l()},()=>{if(o!=null&&o.aborted)return;if(s.getAnimations().some(d=>d.pending||d.playState!=="finished")){u();return}l()})}if(t){const c=aL;if(!s.hasAttribute(c)){r.request(u);return}const d=new MutationObserver(()=>{s.hasAttribute(c)||(d.disconnect(),u())});d.observe(s,{attributes:!0,attributeFilter:[c]}),o==null||o.addEventListener("abort",()=>d.disconnect(),{once:!0});return}r.request(u)})}function Kd(e){const{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:o}=e,a=de(o),s=lve(r,n,i);j.useEffect(()=>{if(!t)return;const l=new AbortController;return s(a,l.signal),()=>{l.abort()}},[t,n,a,s])}const Wj={tabIndex:-1,[Ow]:""};function uve(e){return t=>t==="touch"?e.current:!0}function eF(e,t=!1){const n=Ny(),r=Uy()!=null,i=zn(()=>e(n,r)).current;return ave({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function tF({handle:e,store:t}){return fe(()=>e.attachStore(t),[e,t]),null}function __(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function cve(e,t){const n=j.useRef(null);return de(r=>{const i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;const o=i.store;o.context.triggerElements.getById(i.id)===i.element&&(o.context.triggerElements.delete(i.id),__(o))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),__(t))})}function nF(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);const o=(n==null?void 0:n.id)??null;let a=e.activeTriggerId,s=e.activeTriggerElement;return(o||t)&&(a=o,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:a,activeTriggerElement:s}}function fve(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function dve(e,t,n,r={}){var c,d,p;const i=n.reason,o=i===Kn,a=t&&i===fh,s=!t&&(i===qd||i===kj),l=fve(n);if((d=(c=e.context).onOpenChange)==null||d.call(c,t,n),n.isCanceled)return;(p=r.onBeforeDispatch)==null||p.call(r),e.state.floatingRootContext.dispatchOpenChange(t,n);const u=()=>{const m=nF(e.state,t,n.trigger,l()),v={...r.extraState,...m};a?v.instantType="focus":s?v.instantType="dismiss":o&&(v.instantType=void 0),e.update(v)};o?go.flushSync(u):u()}function pve(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=cve(e,n),a=de(l=>{const u=n.select("open"),c=n.select("activeTriggerId");if(c===e){const d={activeTriggerElement:l,...u?r:null};n.update(d);return}if(c==null&&u){const d={activeTriggerId:e??null,activeTriggerElement:l,...r};n.update(d)}}),s=de(l=>{o(l),l&&a(l)});return fe(()=>(s(t.current),()=>s(null)),[s,t,n,e]),fe(()=>{if(i){const l={activeTriggerElement:t.current,...r};n.update(l)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function rF(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=j.useRef(null),i=e.useState("open"),o=e.useState("triggerCount"),a=e.useState("activeTriggerId"),s=e.useState("activeTriggerElement");fe(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const l=e.context.triggerElements.size,u={};e.state.triggerCount!==l&&(u.triggerCount=l);const c=e.select("activeTriggerId");let d=null;if(c){const p=e.context.triggerElements.getById(c);if(p)r.current=c,p!==e.state.activeTriggerElement&&(u.activeTriggerElement=p);else{for(const[m,v]of e.context.triggerElements.entries())if(v===e.state.activeTriggerElement){u.activeTriggerId=m,u.activeTriggerElement=v,r.current=m;break}u.activeTriggerId===void 0&&(r.current===c?d=c:r.current=null)}}else r.current=null;if(!d&&!c&&l===1){const p=e.context.triggerElements.entries().next();if(!p.done){const[m,v]=p.value;u.activeTriggerId=m,u.activeTriggerElement=v,r.current=m}}(u.triggerCount!==void 0||u.activeTriggerId!==void 0||u.activeTriggerElement!==void 0)&&e.update(u),d&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){const p=Ie(va);e.setOpen(!1,p),p.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,o,a,s,n])}function iF(e,t,n,r){const{mounted:i,setMounted:o,transitionStatus:a}=ZL(e,!1,!1,r),s=t.useState("preventUnmountingOnClose"),l=e?!1:s;t.useSyncedValues({mounted:i,transitionStatus:a,preventUnmountingOnClose:l});const u=de(()=>{var c,d;o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),(d=(c=t.context).onOpenChangeComplete)==null||d.call(c,!1)});return Kd({enabled:i&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||u()}}),{forceUnmount:u,transitionStatus:a}}function oF(e,t){e.useSyncedValues(t),fe(()=>()=>{e.update({activeTriggerProps:$t,inactiveTriggerProps:$t,popupProps:$t})},[e])}function hve(e,t){fe(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),fe(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class qj{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function aF(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Vj({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:$t,inactiveTriggerProps:$t,popupProps:$t}}const hf=e=>e.triggerIdProp??e.activeTriggerId,Kj=e=>e.openProp??e.open,k_=e=>{var n;return(((n=e.popupElement)==null?void 0:n.id)??e.floatingId)||void 0};function sF(e,t){return t!==void 0&&Kj(e)&&hf(e)===t}function mve(e,t){return sF(e,t)?!0:t!==void 0&&Kj(e)&&hf(e)==null&&e.triggerCount===1}const lF={open:Kj,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:hf,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:k_,isTriggerActive:(e,t)=>t!==void 0&&hf(e)===t,isOpenedByTrigger:(e,t)=>sF(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&hf(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>mve(e,t)?k_(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function gve(e){const t=j.useCallback(r=>e===void 0?Pt:e.subscribeStore(r),[e]),n=j.useCallback(()=>e===void 0?void 0:e.store,[e]);return Hy.useSyncExternalStore(t,n,()=>e==null?void 0:e.serverStore)}function yve(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Ny(),o=Uy()!=null,a=zn(()=>new Vj({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new qj,floatingId:i,syncOnly:!1,nested:o})).current;return fe(()=>{const s={open:t,floatingId:i};r.reference!==void 0&&(s.referenceElement=r.reference,s.domReferenceElement=De(r.reference)?r.reference:null),r.floating!==void 0&&(s.floatingElement=r.floating),a.update(s)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a}function vve(e){return xve(e,e.rootContext)}function xve(e,t){const{nodeId:n,externalTree:r}=e,i=t.useState("referenceElement"),o=t.useState("floatingElement"),a=t.useState("domReferenceElement"),s=t.useState("open"),l=t.useState("floatingId"),[u,c]=j.useState(null),[d,p]=j.useState(void 0),[m,v]=j.useState(void 0),h=j.useRef(null),g=ac(r),y=j.useMemo(()=>({reference:i,floating:o,domReference:a}),[i,o,a]),x=Eye({...e,elements:{...y,...u&&{reference:u}}}),b=De(d)?d:null,S=m===void 0?t.state.floatingElement:m;t.useSyncedValue("referenceElement",d??null),t.useSyncedValue("domReferenceElement",d===void 0?a:b),t.useSyncedValue("floatingElement",S);const w=j.useCallback(T=>{const _=De(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;c(_),x.refs.setReference(_)},[x.refs]),O=j.useCallback(T=>{(De(T)||T===null)&&(h.current=T,p(T)),(De(x.refs.reference.current)||x.refs.reference.current===null||T!==null&&!De(T))&&x.refs.setReference(T)},[x.refs,p]),P=j.useCallback(T=>{v(T),x.refs.setFloating(T)},[x.refs]),E=j.useMemo(()=>({...x.refs,setReference:O,setFloating:P,setPositionReference:w,domReference:h}),[x.refs,O,P,w]),A=j.useMemo(()=>({...x.elements,domReference:a}),[x.elements,a]),C=j.useMemo(()=>({...x,dataRef:t.context.dataRef,open:s,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:E,elements:A,nodeId:n,rootStore:t}),[x,E,A,n,t,s,l]);return fe(()=>{a&&(h.current=a)},[a]),fe(()=>{t.context.dataRef.current.floatingContext=C;const T=g==null?void 0:g.nodesRef.current.find(_=>_.id===n);T&&(T.context=C)}),j.useMemo(()=>({...x,context:C,refs:E,elements:A,rootStore:t}),[x,E,A,C,t])}const vx=hL&&Eo;function bve(e,t={}){const{enabled:n=!0,delay:r}=t,i="rootStore"in e?e.rootStore:e,{events:o,dataRef:a}=i.context,s=j.useRef(!1),l=j.useRef(null),u=j.useRef(!0),c=dr();j.useEffect(()=>{const p=i.select("domReferenceElement");if(!n)return;const m=ft(p);function v(){const y=i.select("domReferenceElement");!i.select("open")&&ot(y)&&y===Ln(qe(y))&&(s.current=!0,l.current=y)}function h(){u.current=!0}function g(){u.current=!1}return Oi(Me(m,"blur",v),vx&&Me(m,"keydown",h,!0),vx&&Me(m,"pointerdown",g,!0))},[i,n]),j.useEffect(()=>{if(!n)return;function p(m){if(m.reason===qd||m.reason===kj){const v=i.select("domReferenceElement");De(v)&&(l.current=v,s.current=!0)}}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,n,i]);const d=j.useMemo(()=>{function p(){s.current=!1,l.current=null}return{onMouseLeave(){p()},onFocus(m){const v=m.currentTarget;if(s.current){if(l.current===v)return;p()}const h=hn(m.nativeEvent);if(De(h)){if(vx&&!m.relatedTarget){if(!u.current&&!Ly(h))return}else if(!age(h))return}const g=eg(m.relatedTarget,i.context.triggerElements),{nativeEvent:y,currentTarget:x}=m,b=typeof r=="function"?r():r;if(i.select("open")&&g||b===0||b===void 0){i.setOpen(!0,Ie(fh,y,x));return}c.start(b,()=>{s.current||i.setOpen(!0,Ie(fh,y,x))})},onBlur(m){p();const v=m.relatedTarget,h=m.nativeEvent,g=De(v)&&v.hasAttribute(wd("focus-guard"))&&v.getAttribute("data-type")==="outside";c.start(0,()=>{var S;const y=i.select("domReferenceElement"),x=Ln(qe(y));!v&&x===y||xe((S=a.current.floatingContext)==null?void 0:S.refs.floating.current,x)||xe(y,x)||g||eg(v??x,i.context.triggerElements)||i.setOpen(!1,Ie(fh,h))})}}},[a,r,i,c]);return j.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}class Gj{constructor(){tt(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});tt(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new ti,this.restTimeout=new ti,this.handleCloseOptions=void 0}static create(){return new Gj}}const ag=new WeakMap;function sg(e){var n,r,i;if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&ag.get(t)===e&&((n=e.pointerEventsScopeElement)==null||n.style.removeProperty("pointer-events"),(r=e.pointerEventsReferenceElement)==null||r.style.removeProperty("pointer-events"),(i=e.pointerEventsFloatingElement)==null||i.style.removeProperty("pointer-events"),ag.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function uF(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t,o=ag.get(n);o&&o!==e&&sg(o),sg(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,ag.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}function Xj(e){const t=e.context.dataRef.current,n=zn(()=>t.hoverInteractionState??Gj.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Nj(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function wve(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,o="rootStore"in e?e.rootStore:e,a=o.useState("open"),s=o.useState("floatingElement"),l=o.useState("domReferenceElement"),{dataRef:u}=o.context,c=ac(),d=Uy(),p=Xj(o),m=dr(),v=de(()=>{var y;return yL((y=u.current.openEvent)==null?void 0:y.type,p.interactedInside)}),h=de(()=>{var y;return lge((y=u.current.openEvent)==null?void 0:y.type)}),g=de(()=>{sg(p)});fe(()=>{a||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,g())},[a,p,g]),j.useEffect(()=>g,[g]),fe(()=>{var y,x,b,S,w;if(n&&a&&(y=p.handleCloseOptions)!=null&&y.blockPointerEvents&&h()&&De(l)&&s){const O=l,P=s,E=qe(s),A=(b=(x=c==null?void 0:c.nodesRef.current.find(k=>k.id===d))==null?void 0:x.context)==null?void 0:b.elements.floating;A&&(A.style.pointerEvents="");const C=p.pointerEventsScopeElement!==P?p.pointerEventsScopeElement:null,T=A!==P?A:null,_=((w=(S=p.handleCloseOptions)==null?void 0:S.getScope)==null?void 0:w.call(S))??C??T??O.closest("[data-rootownerid]")??E.body;return uF(p,{scopeElement:_,referenceElement:O,floatingElement:P}),()=>{g()}}},[n,a,l,s,p,h,c,d,g]),j.useEffect(()=>{if(!n)return;function y(){return!!(c&&d&&ba(c.nodesRef.current,d).length>0)}function x(E){const A=Ds(r,"close",p.pointerType),C=()=>{o.setOpen(!1,Ie(Kn,E)),c==null||c.events.emit("floating.closed",E)};A?p.openChangeTimeout.start(A,C):(p.openChangeTimeout.clear(),C())}function b(E){const A=hn(E);if(!oge(A)){p.interactedInside=!1;return}p.interactedInside=(A==null?void 0:A.closest("[aria-haspopup]"))!=null}function S(){p.openChangeTimeout.clear(),m.clear(),c==null||c.events.off("floating.closed",O),g()}function w(E){var _;if(y()&&c){c.events.on("floating.closed",O);return}if(eg(E.relatedTarget,o.context.triggerElements))return;const A=((_=u.current.floatingContext)==null?void 0:_.nodeId)??i,C=E.relatedTarget;if(!(c&&A&&De(C)&&ba(c.nodesRef.current,A,!1).some(k=>{var $;return xe(($=k.context)==null?void 0:$.elements.floating,C)}))){if(p.handler){p.handler(E);return}g(),h()&&!v()&&x(E)}}function O(E){!c||!d||y()||m.start(0,()=>{c.events.off("floating.closed",O),o.setOpen(!1,Ie(Kn,E)),c.events.emit("floating.closed",E)})}const P=s;return Oi(P&&Me(P,"mouseenter",S),P&&Me(P,"mouseleave",w),P&&Me(P,"pointerdown",b,!0),()=>{c==null||c.events.off("floating.closed",O)})},[n,s,o,u,r,i,h,v,g,p,c,d,m])}const Sve={current:null};function jve(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:o=!1,restMs:a=0,move:s=!0,triggerElementRef:l=Sve,externalTree:u,isActiveTrigger:c=!0,getHandleCloseContext:d,isClosing:p,shouldOpen:m,guardStaleOpen:v=!1}=t,h="rootStore"in e?e.rootStore:e,{dataRef:g,events:y}=h.context,x=ac(u),b=Xj(h),S=j.useRef(!1),w=kt(i),O=kt(r),P=kt(a),E=kt(n),A=kt(m),C=kt(p),T=de(()=>{var I;return yL((I=g.current.openEvent)==null?void 0:I.type,b.interactedInside)}),_=de(()=>{var I;return((I=A.current)==null?void 0:I.call(A))!==!1}),k=de((I,B,N)=>{const L=h.context.triggerElements;if(L.hasElement(B))return!I||!xe(I,B);if(!De(N))return!1;const M=N;return L.hasMatchingElement(z=>xe(z,M))&&(!I||!xe(I,M))}),$=de(()=>{if(!b.handler)return;qe(h.select("domReferenceElement")).removeEventListener("mousemove",b.handler),b.handler=void 0}),R=de(()=>{sg(b)});return c&&(b.handleCloseOptions=i==null?void 0:i.__options),j.useEffect(()=>$,[$]),j.useEffect(()=>{if(!n)return;function I(B){B.open?S.current=!1:(S.current=B.reason===Kn,$(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}return y.on("openchange",I),()=>{y.off("openchange",I)}},[n,y,b,$]),j.useEffect(()=>{if(!n)return;function I(U,V=!0){const W=Ds(O.current,"close",b.pointerType);W?b.openChangeTimeout.start(W,()=>{h.setOpen(!1,Ie(Kn,U)),x==null||x.events.emit("floating.closed",U)}):V&&(b.openChangeTimeout.clear(),h.setOpen(!1,Ie(Kn,U)),x==null||x.events.emit("floating.closed",U))}const B=l.current??(c?h.select("domReferenceElement"):null);if(!De(B))return;function N(U){var ae;if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,o&&!fa(b.pointerType))return;const V=c_(P.current),W=Ds(O.current,"open",b.pointerType),Q=hn(U),G=U.currentTarget??null,le=h.select("domReferenceElement");let X=G;if(De(Q)&&!h.context.triggerElements.hasElement(Q)){for(const be of h.context.triggerElements.elements())if(xe(be,Q)){X=be;break}}De(G)&&De(le)&&!h.context.triggerElements.hasElement(G)&&xe(G,le)&&(X=le);const q=X==null?!1:k(le,X,Q),ee=h.select("open"),ie=((ae=C.current)==null?void 0:ae.call(C))??h.select("transitionStatus")==="ending",H=!ee&&ie&&S.current,Z=!q&&De(X)&&De(le)&&xe(le,X)&&H,J=V>0&&!W,se=q&&(ee||H)||Z,we=!ee||q;if(se){_()&&h.setOpen(!0,Ie(Kn,U,X));return}J||(W?b.openChangeTimeout.start(W,()=>{we&&_()&&h.setOpen(!0,Ie(Kn,U,X))}):we&&_()&&h.setOpen(!0,Ie(Kn,U,X)))}function L(U){if(T()){R();return}$();const V=h.select("domReferenceElement"),W=qe(V);b.restTimeout.clear(),b.restTimeoutPending=!1;const Q=g.current.floatingContext??(d==null?void 0:d());if(eg(U.relatedTarget,h.context.triggerElements))return;if(w.current&&Q){h.select("open")||b.openChangeTimeout.clear();const le=l.current;b.handler=w.current({...Q,tree:x,x:U.clientX,y:U.clientY,onClose(){R(),$(),E.current&&!T()&&le===h.select("domReferenceElement")&&I(U,!0)}}),W.addEventListener("mousemove",b.handler),b.handler(U);return}(b.pointerType==="touch"?!xe(h.select("floatingElement"),U.relatedTarget):!0)&&I(U)}function M(U){xe(B,U.relatedTarget)||(b.openChangeTimeout.clear(),b.restTimeout.clear(),b.restTimeoutPending=!1)}const z=v?Me(B,"mouseout",M):void 0;return s?Oi(Me(B,"mousemove",N,{once:!0}),Me(B,"mouseenter",N),Me(B,"mouseleave",L),z):Oi(Me(B,"mouseenter",N),Me(B,"mouseleave",L),z)},[$,R,g,O,h,n,w,b,c,k,T,o,s,P,l,x,E,d,C,_,v]),j.useMemo(()=>{if(!n)return;function I(B){b.pointerType=B.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(B){var Q,G,le;const{nativeEvent:N}=B,L=B.currentTarget,M=h.select("domReferenceElement"),z=h.select("open"),U=k(M,L,B.target);if(o&&!fa(b.pointerType))return;if(z&&U&&((Q=b.handleCloseOptions)!=null&&Q.blockPointerEvents)){const X=h.select("floatingElement");if(X){const q=((le=(G=b.handleCloseOptions)==null?void 0:G.getScope)==null?void 0:le.call(G))??L.ownerDocument.body;uF(b,{scopeElement:q,referenceElement:L,floatingElement:X})}}const V=c_(P.current);if(z&&!U||V===0||!U&&b.restTimeoutPending&&B.movementX**2+B.movementY**2<2)return;b.restTimeout.clear();function W(){if(b.restTimeoutPending=!1,T())return;const X=h.select("open");!b.blockMouseMove&&(!X||U)&&_()&&h.setOpen(!0,Ie(Kn,N,L))}b.pointerType==="touch"?go.flushSync(()=>{W()}):U&&z?W():(b.restTimeoutPending=!0,b.restTimeout.start(V,W))}}},[n,b,T,k,o,h,P,_])}const Ove="Escape";function N_(e){return Eo&&e.movementX===0&&e.movementY===0}function qy(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Lp(e,t){return qy(t,e===gL||e===Mj,e===Iy||e===Dy)}function xx(e,t,n){return qy(t,e===Mj,n?e===Iy:e===Dy)||e==="Enter"||e===" "||e===""}function Pve(e,t,n){return qy(t,n?e===Iy:e===Dy,e===Mj)}function Eve(e,t,n,r){const i=n?e===Dy:e===Iy,o=e===gL;return t==="both"||t==="horizontal"&&r?e===Ove:qy(t,i,o)}function Ave(e,t){const{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:o=!0,selectedIndex:a=null,allowEscape:s=!1,loopFocus:l=!1,nested:u=!1,rtl:c=!1,virtual:d=!1,focusItemOnOpen:p="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:v=!0,disabledIndices:h=void 0,orientation:g="vertical",parentOrientation:y,id:x,resetOnPointerLeave:b=!0,externalTree:S,grid:w}=t,O=w!=null,P="rootStore"in e?e.rootStore:e,E=P.useState("open"),A=P.useState("floatingElement"),C=P.useState("domReferenceElement"),T=P.context.dataRef,_=tg(A),k=Ew(C),$=kt(_),R=Uy(),I=ac(S),B=j.useRef(p),N=j.useRef(a??-1),L=j.useRef(null),M=j.useRef(!0),z=de(te=>{i(N.current===-1?null:N.current,te)}),U=j.useRef(!!A),V=j.useRef(E),W=j.useRef(!1),Q=j.useRef(!1),G=j.useRef(null),le=kt(h),X=kt(E),q=kt(a),ee=kt(b),ie=ku(),H=ku(),Z=de(()=>{function te(ge){d?I==null||I.events.emit("virtualfocus",ge):G.current=ph(ge,{sync:W.current,preventScroll:!0})}const pe=n.current[N.current],oe=Q.current;pe&&te(pe),(W.current?ge=>ge():ge=>ie.request(ge))(()=>{var He;const ge=n.current[N.current]||pe;if(!ge)return;pe||te(ge),ce&&(oe||!M.current)&&((He=ge.scrollIntoView)==null||He.call(ge,{block:"nearest",inline:"nearest"}))})});fe(()=>{T.current.orientation=g},[T,g]),fe(()=>{o&&(E&&A?(N.current=a??-1,B.current&&a!=null&&(Q.current=!0,z())):U.current&&(N.current=-1,z()))},[o,E,A,a,z]),fe(()=>{if(o){if(!E){W.current=!1;return}if(A)if(r==null){if(W.current=!1,q.current!=null)return;if(U.current&&(N.current=-1,Z()),(!V.current||!U.current)&&B.current&&(L.current!=null||B.current===!0&&L.current==null)){let te=0;const pe=()=>{n.current[0]==null?(te<2&&(te?Y=>H.request(Y):queueMicrotask)(pe),te+=1):(N.current=L.current==null||xx(L.current,g,c)||u?dh(n):Cw(n),L.current=null,z())};pe()}}else df(n.current,r)||(N.current=r,Z(),Q.current=!1)}},[o,E,A,r,q,u,n,g,c,z,Z,H]),fe(()=>{var ge,_e;if(!o||A||!I||d||!U.current)return;const te=I.nodesRef.current,pe=(_e=(ge=te.find(He=>He.id===R))==null?void 0:ge.context)==null?void 0:_e.elements.floating,oe=Ln(qe(C??pe??null)),Y=te.some(He=>He.context&&xe(He.context.elements.floating,oe));pe&&!Y&&M.current&&pe.focus({preventScroll:!0})},[o,A,C,I,R,d]),fe(()=>{V.current=E,U.current=!!A}),fe(()=>{E||(L.current=null,B.current=p)},[E,p]);const J=r!=null,se=de(te=>{if(!X.current)return;const pe=n.current.indexOf(te.currentTarget);pe!==-1&&(N.current!==pe||r!==pe)&&(N.current=pe,z(te))}),we=de(()=>{var te,pe,oe;return y??((oe=(pe=(te=I==null?void 0:I.nodesRef.current.find(Y=>Y.id===R))==null?void 0:te.context)==null?void 0:pe.dataRef)==null?void 0:oe.current.orientation)}),ae=de(()=>dh(n,le.current)),be=de(te=>{if(M.current=!1,W.current=!0,te.which===229||!X.current&&te.currentTarget===$.current)return;if(u&&Eve(te.key,g,c,O)){Lp(te.key,we())||ui(te),P.setOpen(!1,Ie(i_,te.nativeEvent)),ot(C)&&(d?I==null||I.events.emit("virtualfocus",C):C.focus());return}const pe=N.current,oe=dh(n,h),Y=Cw(n,h);if(k||(te.key==="Home"&&(ui(te),N.current=oe,z(te)),te.key==="End"&&(ui(te),N.current=Y,z(te))),w!=null){const ge=w(te,N.current,n,g,l,c,h,oe,Y);if(ge!=null&&(N.current=ge,z(te)),g==="both")return}if(Lp(te.key,g)){if(ui(te),E&&!d&&Ln(te.currentTarget.ownerDocument)===te.currentTarget){N.current=xx(te.key,g,c)?oe:Y,z(te);return}xx(te.key,g,c)?l?pe>=Y?s&&pe!==n.current.length?N.current=-1:(W.current=!1,N.current=oe):N.current=Xi(n.current,{startingIndex:pe,disabledIndices:h}):N.current=Math.min(Y,Xi(n.current,{startingIndex:pe,disabledIndices:h})):l?pe<=oe?s&&pe!==-1?N.current=n.current.length:(W.current=!1,N.current=Y):N.current=Xi(n.current,{startingIndex:pe,decrement:!0,disabledIndices:h}):N.current=Math.max(oe,Xi(n.current,{startingIndex:pe,decrement:!0,disabledIndices:h})),df(n.current,N.current)&&(N.current=-1),z(te)}}),ce=j.useMemo(()=>({onFocus(pe){W.current=!0,se(pe)},onClick:({currentTarget:pe})=>pe.focus({preventScroll:!0}),onMouseMove(pe){N_(pe)||(W.current=!0,Q.current=!1,m&&se(pe))},onPointerLeave(pe){var Y;if(!X.current||!M.current||pe.pointerType==="touch")return;W.current=!0;const oe=pe.relatedTarget;if(!(!m||n.current.includes(oe))&&ee.current&&((Y=G.current)==null||Y.call(G),G.current=null,N.current=-1,z(pe),!d)){const ge=$.current,_e=Ln(qe(ge));ge&&xe(ge,_e)&&ge.focus({preventScroll:!0})}}}),[se,X,$,m,n,z,ee,d]),Ce=j.useMemo(()=>d&&E&&J&&{"aria-activedescendant":`${x}-${r}`},[d,E,J,x,r]),Ae=j.useMemo(()=>({...k?{}:Ce,onKeyDown(te){if(te.key==="Tab"&&te.shiftKey&&E&&!d){const pe=hn(te.nativeEvent);if(pe&&!xe($.current,pe))return;ui(te),P.setOpen(!1,Ie(ky,te.nativeEvent)),ot(C)&&C.focus();return}be(te)},onPointerMove(te){N_(te)||(M.current=!0)}}),[Ce,be,$,k,P,E,d,C]),Se=j.useMemo(()=>{function te(Y){P.setOpen(!0,Ie(i_,Y.nativeEvent,Y.currentTarget))}function pe(Y){p==="auto"&&My(Y.nativeEvent)&&(B.current=!d)}function oe(Y){B.current=p,p==="auto"&&$j(Y.nativeEvent)&&(B.current=!0)}return{onKeyDown(Y){const ge=P.select("open");M.current=!1;const _e=Y.key.startsWith("Arrow"),He=Pve(Y.key,we(),c),an=Lp(Y.key,g),Nn=(u?He:an)||Y.key==="Enter"||Y.key.trim()==="";if(d&&ge)return be(Y);if(!(!ge&&!v&&_e)){if(Nn){const St=Lp(Y.key,we());L.current=u&&St?null:Y.key}if(u){He&&(ui(Y),ge?(N.current=ae(),z(Y)):te(Y));return}an&&(q.current!=null&&(N.current=q.current),ui(Y),!ge&&v?te(Y):be(Y),ge&&z(Y))}},onFocus(Y){P.select("open")&&!d&&(N.current=-1,z(Y))},onPointerDown:oe,onPointerEnter:oe,onMouseDown:pe,onClick:pe}},[be,p,ae,u,z,P,v,g,we,c,q,d]),We=j.useMemo(()=>({...Ce,...Se}),[Ce,Se]);return j.useMemo(()=>o?{reference:We,floating:Ae,item:ce,trigger:Se}:{},[o,We,Ae,Se,ce])}function Cve(e,t){const{listRef:n,elementsRef:r,activeIndex:i,onMatch:o,disabledIndices:a,onTyping:s,enabled:l=!0,resetMs:u=750,selectedIndex:c=null}=t,d="rootStore"in e?e.rootStore:e,p=d.useState("open"),m=dr(),v=j.useRef(""),h=j.useRef(c??i??-1),g=j.useRef(null),y=de(S=>{function w($){return r==null?void 0:r.current[$]}function O($){const R=w($);return R&&!Fy(R)||R!=null&&R.matches(":disabled")?!1:a==null||!Nl(ga,$,a)}function P($,R,I=0){if($.length===0)return-1;const B=(I%$.length+$.length)%$.length,N=R.toLowerCase();for(let L=0;L<$.length;L+=1){const M=(B+L)%$.length,z=$[M];if(!(!(z!=null&&z.toLowerCase().startsWith(N))||!O(M)))return M}return-1}const E=n.current;if(v.current.length>0&&S.key===" "&&(ui(S),s==null||s(!0)),v.current.length>0&&v.current[0]!==" "&&P(E,v.current)===-1&&S.key!==" "&&(s==null||s(!1)),E==null||S.key.length!==1||S.ctrlKey||S.metaKey||S.altKey)return;p&&S.key!==" "&&(ui(S),s==null||s(!0));const A=v.current==="";A&&(h.current=c??i??-1),E.every(($,R)=>{var I,B;return $&&O(R)?((I=$[0])==null?void 0:I.toLowerCase())!==((B=$[1])==null?void 0:B.toLowerCase()):!0})&&v.current===S.key&&(v.current="",h.current=g.current),v.current+=S.key,m.start(u,()=>{v.current="",h.current=g.current,s==null||s(!1)});const _=((A?c??i??-1:h.current)??0)+1,k=P(E,v.current,_);k!==-1?(o==null||o(k),g.current=k):S.key!==" "&&(v.current="",s==null||s(!1))}),x=de(S=>{const w=S.relatedTarget,O=d.select("domReferenceElement"),P=d.select("floatingElement");xe(O,w)||xe(P,w)||(m.clear(),v.current="",h.current=g.current,s==null||s(!1))});fe(()=>{!p&&c!==null||(m.clear(),g.current=null,v.current!==""&&(v.current=""))},[p,c,m]);const b=j.useMemo(()=>({onKeyDown:y,onBlur:x}),[y,x]);return j.useMemo(()=>l?{reference:b,floating:b}:{},[l,b])}const R_=.1,Tve=R_*R_,nt=.5;function Fp(e,t,n,r,i,o){return r>=t!=o>=t&&e<=(i-n)*(t-r)/(o-r)+n}function Bp(e,t,n,r,i,o,a,s,l,u){let c=!1;return Fp(e,t,n,r,i,o)&&(c=!c),Fp(e,t,i,o,a,s)&&(c=!c),Fp(e,t,a,s,l,u)&&(c=!c),Fp(e,t,l,u,n,r)&&(c=!c),c}function _ve(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Up(e,t,n,r,i,o){const a=Math.min(n,i),s=Math.max(n,i),l=Math.min(r,o),u=Math.max(r,o);return e>=a&&e<=s&&t>=l&&t<=u}function kve(e={}){const{blockPointerEvents:t=!1}=e,n=new ti,r=({x:i,y:o,placement:a,elements:s,onClose:l,nodeId:u,tree:c})=>{const d=a==null?void 0:a.split("-")[0];let p=!1,m=null,v=null,h=typeof performance<"u"?performance.now():0;function g(x,b){const S=performance.now(),w=S-h;if(m===null||v===null||w===0)return m=x,v=b,h=S,!1;const O=x-m,P=b-v,E=O*O+P*P,A=w*w*Tve;return m=x,v=b,h=S,E<A}function y(){n.clear(),l()}return function(b){n.clear();const S=s.domReference,w=s.floating;if(!S||!w||d==null||i==null||o==null)return;const{clientX:O,clientY:P}=b,E=hn(b),A=b.type==="mouseleave",C=xe(w,E),T=xe(S,E);if(C&&(p=!0,!A))return;if(T&&(p=!1,!A)){p=!0;return}if(A&&De(b.relatedTarget)&&xe(w,b.relatedTarget))return;function _(){return!!(c&&ba(c.nodesRef.current,u).length>0)}function k(){_()||y()}if(_())return;const $=S.getBoundingClientRect(),R=w.getBoundingClientRect(),I=i>R.right-R.width/2,B=o>R.bottom-R.height/2,N=R.width>$.width,L=R.height>$.height,M=(N?$:R).left,z=(N?$:R).right,U=(L?$:R).top,V=(L?$:R).bottom;if(d==="top"&&o>=$.bottom-1||d==="bottom"&&o<=$.top+1||d==="left"&&i>=$.right-1||d==="right"&&i<=$.left+1){k();return}let W=!1;switch(d){case"top":W=Up(O,P,M,$.top+1,z,R.bottom-1);break;case"bottom":W=Up(O,P,M,R.top+1,z,$.bottom-1);break;case"left":W=Up(O,P,R.right-1,V,$.left+1,U);break;case"right":W=Up(O,P,$.right-1,V,R.left+1,U);break}if(W)return;if(p&&!_ve(O,P,$)){k();return}if(!A&&g(O,P)){k();return}let Q=!1;switch(d){case"top":{const G=N?nt/2:nt*4,le=N||I?i+G:i-G,X=N?i-G:I?i+G:i-G,q=o+nt+1,ee=I||N?R.bottom-nt:R.top,ie=I?N?R.bottom-nt:R.top:R.bottom-nt;Q=Bp(O,P,le,q,X,q,R.left,ee,R.right,ie);break}case"bottom":{const G=N?nt/2:nt*4,le=N||I?i+G:i-G,X=N?i-G:I?i+G:i-G,q=o-nt,ee=I||N?R.top+nt:R.bottom,ie=I?N?R.top+nt:R.bottom:R.top+nt;Q=Bp(O,P,le,q,X,q,R.left,ee,R.right,ie);break}case"left":{const G=L?nt/2:nt*4,le=L||B?o+G:o-G,X=L?o-G:B?o+G:o-G,q=i+nt+1,ee=B||L?R.right-nt:R.left,ie=B?L?R.right-nt:R.left:R.right-nt;Q=Bp(O,P,ee,R.top,ie,R.bottom,q,le,q,X);break}case"right":{const G=L?nt/2:nt*4,le=L||B?o+G:o-G,X=L?o-G:B?o+G:o-G,q=i-nt,ee=B||L?R.left+nt:R.right,ie=B?L?R.left+nt:R.right:R.left+nt;Q=Bp(O,P,q,le,q,X,ee,R.top,ie,R.bottom);break}}Q?p||n.start(40,k):k()}};return r.__options={...e,blockPointerEvents:t},r}const cF=j.createContext(void 0);function Nve(){const e=j.useContext(cF);if(e===void 0)throw new Error(vn(26));return e}const Rw="ArrowUp",$w="ArrowDown",Mw="ArrowLeft",Iw="ArrowRight",Dw="Home",Lw="End",Yj=new Set([Rw,$w,Mw,Iw,Dw,Lw]),Rve="Shift",$ve=[Rve,"Control","Alt","Meta"];function Mve(e){return ot(e)&&e.tagName==="INPUT"}function $_(e){return!!(Mve(e)&&e.selectionStart!=null||ot(e)&&e.tagName==="TEXTAREA")}function M_(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,o=e.scrollTop;const a=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(a&&r!=="vertical"){const l=I_(e,t,"left"),u=zp(e),c=zp(t);n==="ltr"&&(l+t.offsetWidth+c.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight?i=l+t.offsetWidth+c.scrollMarginRight-e.clientWidth+u.scrollPaddingRight:l-c.scrollMarginLeft<e.scrollLeft+u.scrollPaddingLeft&&(i=l-c.scrollMarginLeft-u.scrollPaddingLeft)),n==="rtl"&&(l-c.scrollMarginLeft<e.scrollLeft+u.scrollPaddingLeft?i=l-c.scrollMarginLeft-u.scrollPaddingLeft:l+t.offsetWidth+c.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight&&(i=l+t.offsetWidth+c.scrollMarginRight-e.clientWidth+u.scrollPaddingRight))}if(s&&r!=="horizontal"){const l=I_(e,t,"top"),u=zp(e),c=zp(t);l-c.scrollMarginTop<e.scrollTop+u.scrollPaddingTop?o=l-c.scrollMarginTop-u.scrollPaddingTop:l+t.offsetHeight+c.scrollMarginBottom>e.scrollTop+e.clientHeight-u.scrollPaddingBottom&&(o=l+t.offsetHeight+c.scrollMarginBottom-e.clientHeight+u.scrollPaddingBottom)}e.scrollTo({left:i,top:o,behavior:"auto"})}function I_(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function zp(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const Ive="--nested-dialogs",Dve="data-nested-dialog-open",Lve={...Ay,...jj,nestedDialogOpen(e){return e?{[Dve]:""}:null}},Fve=j.forwardRef(function(t,n){const{render:r,className:i,style:o,finalFocus:a,initialFocus:s,...l}=t,u=ic(),c=u.useState("descriptionElementId"),d=u.useState("disablePointerDismissal"),p=u.useState("floatingRootContext"),m=u.useState("popupProps"),v=u.useState("modal"),h=u.useState("mounted"),g=u.useState("nested"),y=u.useState("nestedOpenDialogCount"),x=u.useState("open"),b=u.useState("openMethod"),S=u.useState("titleElementId"),w=u.useState("transitionStatus"),O=u.useState("role"),P=p.useState("floatingId");Nve(),Kd({open:x,ref:u.context.popupRef,onComplete(){var k,$;x&&(($=(k=u.context).onOpenChangeComplete)==null||$.call(k,!0))}});const E=s===void 0?uve(u.context.popupRef):s,A=y>0,C=u.useStateSetter("popupElement"),_=on("div",t,{state:{open:x,nested:g,transitionStatus:w,nestedDialogOpen:A},props:[m,{id:P,"aria-labelledby":S,"aria-describedby":c,role:O,...Wj,hidden:!h,onKeyDown(k){Yj.has(k.key)&&k.stopPropagation()},style:{[Ive]:y}},l],ref:[n,u.context.popupRef,C],stateAttributesMapping:Lve});return f.jsx(LL,{context:p,openInteractionType:b,disabled:!h,closeOnFocusOut:!d,initialFocus:E,returnFocus:a,modal:v!==!1,restoreFocus:"popup",children:_})});function fF(e){return bj(19)?e:e?"true":void 0}const dF=j.forwardRef(function(t,n){const{cutout:r,...i}=t;let o;if(r){const a=r.getBoundingClientRect();o=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${a.left}px ${a.top}px,${a.left}px ${a.bottom}px,${a.right}px ${a.bottom}px,${a.right}px ${a.top}px,${a.left}px ${a.top}px)`}return f.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})}),Bve=j.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,o=ic(),a=o.useState("mounted"),s=o.useState("modal"),l=o.useState("open");return a||r?f.jsx(cF.Provider,{value:r,children:f.jsxs(DL,{ref:n,...i,children:[a&&s===!0&&f.jsx(dF,{ref:o.context.internalBackdropRef,inert:fF(!l)}),t.children]})}):null});let D_={},L_={},F_="";function Ky(e,t){return Wd(e)?e:t}function B_(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Ky(t,n)).overflowY)}function Uve(e){if(typeof document>"u")return!1;const t=qe(e);return ft(t).innerWidth-t.documentElement.clientWidth>0}function zve(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=qe(e),r=n.documentElement,i=n.body,o=Ky(r,i),a=o.style.overflowY,s=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const l=o.offsetWidth;o.style.overflowY="hidden";const u=o.offsetWidth;return o.style.overflowY=a,r.style.scrollbarGutter=s,l===u}function Hve(e){const t=qe(e),n=t.documentElement,r=t.body,i=Ky(n,r),o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}function Vve(e){var m;const t=qe(e),n=t.documentElement,r=t.body,i=ft(n);let o=0,a=0,s=!1;const l=hi.create();if(Eo&&(((m=i.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function u(){const v=i.getComputedStyle(n),h=i.getComputedStyle(r),x=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,D_={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},F_=n.style.scrollBehavior,L_={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const b=n.scrollHeight>n.clientHeight,S=n.scrollWidth>n.clientWidth,w=v.overflowY==="scroll"||h.overflowY==="scroll",O=v.overflowX==="scroll"||h.overflowX==="scroll",P=Math.max(0,i.innerWidth-r.clientWidth),E=Math.max(0,i.innerHeight-r.clientHeight),A=parseFloat(h.marginTop)+parseFloat(h.marginBottom),C=parseFloat(h.marginLeft)+parseFloat(h.marginRight),T=Ky(n,r);if(s=zve(e),s){n.style.scrollbarGutter=x,T.style.overflowY="hidden",T.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(b||w)&&(n.style.overflowY="scroll"),(S||O)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:A||E?`calc(100dvh - ${A+E}px)`:"100dvh",width:C||P?`calc(100vw - ${C+P}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function c(){Object.assign(n.style,D_),Object.assign(r.style,L_),s||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=F_)}function d(){c(),l.request(u)}u();const p=Me(i,"resize",d);return()=>{l.cancel(),c(),typeof i.removeEventListener=="function"&&p()}}class Wve{constructor(){tt(this,"lockCount",0);tt(this,"restore",null);tt(this,"timeoutLock",ti.create());tt(this,"timeoutUnlock",ti.create());tt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});tt(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=qe(t),r=n.documentElement,i=n.body,o=ft(r);if(B_(o,r,i)){const s=new o.MutationObserver(()=>{B_(o,r,i)||(s.disconnect(),this.restore=null,this.lock(t))}),l={attributes:!0};s.observe(r,l),s.observe(i,l),this.restore=()=>s.disconnect();return}const a=$y||!Uve(t);this.restore=a?Hve(t):Vve(t)}}const qve=new Wve;function pF(e=!0,t=null){fe(()=>{if(e)return qve.acquire(t)},[e,t])}function Kve({store:e,parentContext:t,isDrawer:n}){const r=e.useState("open"),i=e.useState("disablePointerDismissal"),o=e.useState("modal"),a=e.useState("popupElement"),s=e.useState("floatingRootContext"),[l,u]=j.useState(0),[c,d]=j.useState(0),p=l===0,m=Uj(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:o==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(v){if(!e.context.outsidePressEnabledRef.current||"button"in v&&v.button!==0)return!1;if("touches"in v){if(v.type==="touchend"){if(v.changedTouches.length!==1||v.touches.length!==0)return!1}else if(v.touches.length!==1)return!1}const h=hn(v);if(p&&!i){if(o){const g=e.context.internalBackdropRef.current,y=e.context.backdropRef.current;return g||y?g===h||y===h||xe(h,a)&&!(h!=null&&h.hasAttribute("data-base-ui-portal")):!0}return!0}return!1},escapeKey:p});return pF(r&&o===!0,a),e.useContextCallback("onNestedDialogOpen",(v,h)=>{u(v),d(h)}),fe(()=>(t!=null&&t.onNestedDialogOpen&&(r?t.onNestedDialogOpen(l+1,c+(n?1:0)):t.onNestedDialogOpen(0,0)),()=>{t!=null&&t.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,c,t]),oF(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:c}),null}const Gve={...lF,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class Xve extends Wy{constructor(n,r,i){const o=new qj,a=Yve(n,o,r,i);super(a,Qve(o),Gve);tt(this,"setOpen",(n,r)=>{var i,o;r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(o=(i=this.context).onOpenChange)==null||o.call(i,n,r),!r.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,r),this.update(nF(this.state,n,r.trigger)))})}}function Yve(e,t,n,r=!1){return{...aF(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function Qve(e){return{popupRef:j.createRef(),backdropRef:j.createRef(),internalBackdropRef:j.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Jve(e,t){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:o,onOpenChangeComplete:a,disablePointerDismissal:s=!1,modal:l=!0,actionsRef:u,handle:c,triggerId:d,defaultTriggerId:p=null}=t,m=e==="drawer",v=l,h=s,g="dialog",y=ic(!0),x=y!=null,b={modal:v,disablePointerDismissal:h,nested:x,role:g},S=eF((C,T)=>new Xve({open:i,openProp:r,activeTriggerId:p,triggerIdProp:d,...b},C,T),!0);S.useControlledProp("openProp",r),S.useControlledProp("triggerIdProp",d),S.useSyncedValues(b),S.useContextCallback("onOpenChange",o),S.useContextCallback("onOpenChangeComplete",a);const w=S.useState("open"),O=S.useState("mounted"),P=S.useState("payload");hve(S,w),rF(S);const{forceUnmount:E}=iF(w,S);j.useImperativeHandle(u,()=>({unmount:E,close:()=>S.setOpen(!1,Ie(pL))}),[E,S]);const A=w||O;return f.jsxs(JD.Provider,{value:S,children:[c&&f.jsx(tF,{handle:c,store:S}),A&&f.jsx(Kve,{store:S,parentContext:y==null?void 0:y.context,isDrawer:m}),typeof n=="function"?n({payload:P}):n]})}const Zve=Hj(function(t){return Jve("dialog",t)}),exe=j.forwardRef(function(t,n){const{render:r,className:i,style:o,id:a,...s}=t,l=ic(),u=oc(a);return l.useSyncedValueWithCleanup("titleElementId",u),on("h2",t,{ref:n,props:[{id:u},s]})});function txe(e){const t=j.useRef(""),n=j.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:j.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function hF(e,t){const n=j.useRef(e),r=de(t);fe(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function nxe(e,t){const n=de((o,a)=>{(typeof e=="function"?e():e)||t(a||($y?"touch":""))}),{onClick:r,onPointerDown:i}=txe(n);return j.useMemo(()=>({onClick:r,onPointerDown:i}),[r,i])}function rxe(e){const[t,n]=j.useState(null),r=nxe(e,n);return hF(e,i=>{i&&!e&&n(null)}),j.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const Qj=Zve,ixe=j.forwardRef(function({className:t,...n},r){return f.jsx(Mme,{ref:r,className:yt("fixed inset-0 z-40 bg-black/60 backdrop-blur-[2px]",t),...n})}),Jj=j.forwardRef(function({className:t,placement:n="center",children:r,...i},o){const a=n==="right"?"inset-y-0 right-0 w-full max-w-xl border-l":n==="top"?"left-1/2 top-[12vh] w-[min(36rem,92vw)] -translate-x-1/2 rounded-lg border":"left-1/2 top-1/2 w-[min(36rem,92vw)] -translate-x-1/2 -translate-y-1/2 rounded-lg border";return f.jsxs(Bve,{children:[f.jsx(ixe,{}),f.jsx(Fve,{ref:o,className:yt("fixed z-50 border-line bg-panel-2 text-foreground shadow-2xl focus:outline-none font-mono",a,t),...i,children:r})]})}),mF=j.forwardRef(function({className:t,...n},r){return f.jsx(exe,{ref:r,className:yt("text-sm font-semibold text-foreground",t),...n})}),oxe=j.forwardRef(function({className:t,...n},r){return f.jsx(Xme,{ref:r,className:yt("text-xs text-muted-foreground",t),...n})}),$u=j.forwardRef(function({className:t,...n},r){return f.jsx("input",{ref:r,className:yt("rounded border border-input bg-panel px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...n})});function axe(e){const t=j.useRef(!0);t.current&&(t.current=!1,e())}function sxe(e){const[t,n]=j.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function gF(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Fw({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=j.useRef(e!==void 0),[o,a]=j.useState(t),s=i&&e!==void 0?e:o,l=j.useCallback(u=>{i||a(u)},[]);return[s,l]}const yF=j.createContext(void 0),vF=j.createContext(void 0),xF=j.createContext(void 0);function Na(){const e=j.useContext(yF);if(e===void 0)throw new Error(vn(60));return e}function Zj(){const e=j.useContext(vF);if(e===void 0)throw new Error(vn(101));return e}function bF(){const e=j.useContext(xF);if(e===void 0)throw new Error(vn(61));return e}const lxe="data-valid",uxe="data-invalid",cxe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},fxe={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},dxe={disabled:!1,...fxe},pxe={valid(e){return e===null?null:e?{[lxe]:""}:{[uxe]:""}}},hxe={invalid:void 0,name:void 0,validityData:{state:cxe,errors:[],error:"",value:"",initialValue:null},setValidityData:Pt,disabled:void 0,setTouched:Pt,setDirty:Pt,setFilled:Pt,setFocused:Pt,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:dxe,registerFieldControl:Pt,validation:{getValidationProps:(e,t=$t)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Pt,getInputControl:()=>null,commit:async()=>{},change:Pt}},mxe=j.createContext(hxe);function eO(e=!0){const t=j.useContext(mxe);if(t.setValidityData===Pt&&!e)throw new Error(vn(28));return t}function gxe(e,t,n,r,i=!0,o){const{registerFieldControl:a}=eO(),s=zn(()=>Symbol());fe(()=>{const l=s.current;if(!i){a(l,void 0);return}a(l,{controlRef:e,getValue:r,id:t,name:o,value:n})},[e,i,r,t,o,a,s,n]),fe(()=>{const l=s.current;return()=>{a(l,void 0)}},[a,s])}const yxe=j.createContext({controlId:void 0,registerControlId:Pt,resetControlId:Pt,labelId:void 0,setLabelId:Pt,messageIds:[],setMessageIds:Pt,getDescriptionProps:e=>e});function wF(){return j.useContext(yxe)}function SF(e={}){const{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:o}=wF(),a=oc(),s=zn(()=>Symbol()),l=j.useRef(!1),u=j.useRef(!1),c=de(()=>{!l.current||i===Pt||(l.current=!1,i(s.current,void 0))});return fe(()=>{if(!n||i===Pt){c();return}let d;if(t!==void 0)u.current=!0,d=t;else if(u.current)d=a;else{o();return}if(d===void 0){c();return}l.current=!0,i(s.current,d)},[t,n,i,o,a,s,c]),fe(()=>c,[c]),(n?r:void 0)??t??a}function vxe(e,t,n=Object.is){const{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}const jF=(e,t)=>Object.is(e,t);function Fs(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function xxe(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!vxe(e,t,(r,i)=>Fs(r,i,n)):e!==t}function Bw(e,t,n){return e?e.some(r=>r===void 0?!1:Fs(t,r,n)):!1}function mh(e,t,n){return e?e.findIndex(r=>r===void 0?!1:Fs(r,t,n)):-1}function bxe(e,t){if(t!==jF)return r=>Bw(e,r,t);const n=new Set(e);return n.delete(void 0),r=>n.has(r)&&(r!==0||e.some(i=>Object.is(r,i)))}function OF(e,t,n,r){const i=r&&Array.isArray(t)?e.findIndex(bxe(t,n)):mh(e,t,n);return i===-1?null:i}function wxe(e,t,n,r,i,o){return Bw(r,t,i)?o!=null&&e>o&&Bw(r,n[o],i)?o:e:e===o?OF(n,r,i,!0):o}function Sxe(e,t,n){return e.filter(r=>!Fs(t,r,n))}function Uw(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function jxe(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function PF(e){return jxe(e==null?void 0:e[0])}function Oxe(e){return PF(e)?e.flatMap(t=>t.items):e}function Pxe(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(PF(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function EF(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Uw(e)}function tl(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Uw(e.value):Uw(e)}function AF(e,t,n){function r(){return EF(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){const o=Oxe(t);if(e==null||typeof e!="object"){const a=o.find(s=>s.value===e);return a&&a.label!=null?a.label:r()}if("value"in e){const a=o.find(s=>s&&s.value===e.value);if(a&&a.label!=null)return a.label}}return r()}function Exe(e,t,n){return e.reduce((r,i,o)=>(o>0&&r.push(", "),r.push(f.jsx(j.Fragment,{children:AF(i,t,n)},o)),r),[])}const Axe={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:tl(t,r)!==""},hasNullItemLabel:(e,t)=>t?Pxe(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(i=>Fs(t,i,n)):Fs(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},Cxe=j.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Pt,validationMode:"onSubmit",submitCountRef:{current:0}});function Txe(){return j.useContext(Cxe)}function Kc(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Li=1;function CF(e,t){return Math.max(0,e-t)}function _xe(e,t){if(t<=0)return 0;const n=Kc(e,0,t),r=n,i=t-n,o=r<=Li,a=i<=Li;return o&&a?r<=i?0:t:o?0:a?t:n}function kxe(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:a=!1,onOpenChange:s,name:l,form:u,autoComplete:c,disabled:d=!1,readOnly:p=!1,required:m=!1,modal:v=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:y,items:x,multiple:b=!1,itemToStringLabel:S,itemToStringValue:w,isItemEqualToValue:O=jF,highlightItemOnHover:P=!0,children:E}=e,{clearErrors:A}=Txe(),{setDirty:C,setTouched:T,setFocused:_,validityData:k,setFilled:$,name:R,disabled:I,validation:B,validationMode:N}=eO(),L=SF({id:t}),M=I||d,z=R??l,[U,V]=Fw({controlled:n,default:b?r??ga:r,name:"Select",state:"value"}),[W,Q]=Fw({controlled:o,default:a,name:"Select",state:"open"}),G=j.useRef([]),le=j.useRef([]),X=j.useRef(null),q=j.useRef(null),ee=j.useRef(0),ie=j.useRef(null),H=j.useRef([]),Z=j.useRef(!1),J=j.useRef(null),se=j.useRef(null),we=j.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ae=j.useRef(!1),be=j.useRef(U),{mounted:ce,setMounted:Ce,transitionStatus:Ae}=ZL(W),{openMethod:Se,triggerProps:We}=rxe(W),te=zn(()=>new Wy({id:L,labelId:void 0,modal:v,multiple:b,itemToStringLabel:S,itemToStringValue:w,isItemEqualToValue:O,value:U,open:W,mounted:ce,transitionStatus:Ae,items:x,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:$t,triggerProps:$t,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Pt,setOpen:Pt,handleScrollArrowVisibility:Pt,onOpenChangeComplete:Pt,listRef:G,popupRef:X,scrollHandlerRef:q,scrollArrowsMountedCountRef:ee,valueRef:ie,valuesRef:H,labelsRef:le,typingRef:Z,selectionRef:we,firstItemTextRef:J,selectedItemTextRef:se,alignItemWithTriggerActiveRef:ae,initialValueRef:be},Axe)).current,pe=te.useState("activeIndex"),oe=te.useState("selectedIndex"),Y=te.useState("triggerElement"),ge=te.useState("positionerElement"),_e=sxe(Se),He=Se??_e,an=j.useMemo(()=>b?"":tl(U,w),[b,U,w]),Nn=j.useMemo(()=>b&&Array.isArray(U)?U.map(Fe=>tl(Fe,w)):tl(U,w),[b,U,w]),St=kt(Y),xn=de(()=>Nn);gxe(St,L,U,xn,!M,l);const nr=b?Array.isArray(U)&&U.length>0:U!=null&&an!=="";fe(()=>{$(nr)},[nr,$]),fe(function(){const it=OF(H.current,U,O,b);it===null&&(se.current=null),!W&&te.set("selectedIndex",it)},[b,W,U,O,te]),hF(U,()=>{A(z),C(xxe(U,k.initialValue,O)),B.change(U)});const Rn=de((Fe,it)=>{s==null||s(Fe,it),!it.isCanceled&&(Q(Fe),!Fe&&(it.reason===ky||it.reason===_j)&&(T(!0),_(!1),N==="onBlur"&&B.commit(U)))}),ii=de(()=>{Ce(!1),te.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),y==null||y(!1)});Kd({enabled:!h,open:W,ref:X,onComplete(){W||ii()}}),j.useImperativeHandle(h,()=>({unmount:ii}),[ii]);const Lr=de((Fe,it)=>{i==null||i(Fe,it),!it.isCanceled&&V(Fe)}),Ti=de(Fe=>{const it=CF(Fe.scrollHeight,Fe.clientHeight),Wn=_xe(Fe.scrollTop,it),ki=Wn>0,oi=Wn<it;te.set("scrollUpArrowVisible",ki),te.set("scrollDownArrowVisible",oi)}),yr=yve({open:W,onOpenChange:Rn,elements:{reference:Y,floating:ge}}),_i=Hge(yr,{enabled:!M,event:"mousedown"}),Fr=Uj(yr),Kt=Ave(yr,{enabled:!M,listRef:G,activeIndex:pe,selectedIndex:oe,disabledIndices:ga,onNavigate(Fe){Fe===null&&!W||te.set("activeIndex",Fe)},focusItemOnHover:P}),ke=Cve(yr,{enabled:!M&&(W||!p&&!b),listRef:le,activeIndex:pe,selectedIndex:oe,disabledIndices:Fe=>gF(G.current[Fe]),onMatch(Fe){W?te.set("activeIndex",Fe):Lr(H.current[Fe],Ie(va))},onTyping(Fe){Z.current=Fe}}),Ct=j.useMemo(()=>Is(ke.reference,Kt.reference,Fr.reference,_i.reference,We),[_i.reference,ke.reference,Kt.reference,Fr.reference,We]),sn=j.useMemo(()=>Is(Wj,ke.floating,Kt.floating,Fr.floating),[ke.floating,Kt.floating,Fr.floating]),ln=Kt.item??$t;te.useContextCallback("setValue",Lr),te.useContextCallback("setOpen",Rn),te.useContextCallback("handleScrollArrowVisibility",Ti),te.useContextCallback("onOpenChangeComplete",y),axe(()=>{te.update({popupProps:sn,triggerProps:Ct})}),te.useSyncedValues({id:L,modal:v,multiple:b,value:U,open:W,mounted:ce,transitionStatus:Ae,popupProps:sn,triggerProps:Ct,items:x,itemToStringLabel:S,itemToStringValue:w,isItemEqualToValue:O,openMethod:He});const vr=j.useMemo(()=>({disabled:M,readOnly:p,required:m,multiple:b,highlightItemOnHover:P,itemProps:ln}),[M,p,m,b,P,ln]),rr=Ms(g,B.inputRef),Da=b?void 0:z,Co=j.useMemo(()=>!b||!Array.isArray(U)||!z?null:U.map(Fe=>{const it=tl(Fe,w);return f.jsx("input",{type:"hidden",form:u,name:z,value:it,disabled:M},it)}),[b,U,u,z,w,M]);return f.jsxs(yF.Provider,{value:te,children:[f.jsx(vF.Provider,{value:vr,children:f.jsx(xF.Provider,{value:yr,children:E})}),f.jsx("input",{...B.getValidationProps(M,{onFocus(){var Fe;(Fe=te.state.triggerElement)==null||Fe.focus({focusVisible:!0})},onChange(Fe){if(Fe.nativeEvent.defaultPrevented||M||p)return;const it=Fe.currentTarget.value,Wn=Ie(va,Fe.nativeEvent);function ki(){if(b)return;const oi=it.toLowerCase();let La=H.current.findIndex(Xs=>tl(Xs,w).toLowerCase()===oi||EF(Xs,S).toLowerCase()===oi);La===-1&&(La=H.current.findIndex((Xs,Jd)=>{const pc=le.current[Jd];return pc!=null&&pc.toLowerCase()===oi}));const dc=H.current[La];dc!=null&&Lr(dc,Wn)}te.set("forceMount",!0),queueMicrotask(ki)}}),id:L&&Da==null?`${L}-hidden-input`:void 0,form:u,name:Da,autoComplete:c,value:an,disabled:M,required:m&&!(b&&nr),readOnly:p,ref:rr,style:z?hge:bL,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Co]})}function Nxe(e,t){return e??t}const Hp=5;function Rxe(e,t){const n=$xe(t);return e.clientX>=n.left-Hp&&e.clientX<=n.right+Hp&&e.clientY>=n.top-Hp&&e.clientY<=n.bottom+Hp}function $xe(e){const t=e.getBoundingClientRect(),n=ft(e);if(Rj)return t;const r=n.getComputedStyle(e,"::before"),i=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||i.content!=="none"))return t;const a=parseFloat(r.width)||0,s=parseFloat(r.height)||0,l=parseFloat(i.width)||0,u=parseFloat(i.height)||0,c=Math.max(t.width,a,l),d=Math.max(t.height,s,u),p=c-t.width,m=d-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-m/2,bottom:t.bottom+m/2}}const Mxe="data-popup-side",Ixe=400,Dxe={...$me,...pxe,popupSide:e=>e?{[Mxe]:e}:null,value:()=>null},Lxe=j.forwardRef(function(t,n){var ee;const{render:r,className:i,id:o,disabled:a=!1,nativeButton:s=!0,style:l,...u}=t,{setTouched:c,setFocused:d,validationMode:p,validation:m,state:v,disabled:h}=eO(),{labelId:g}=wF(),y=Na(),{readOnly:x,required:b,disabled:S}=Zj(),w=h||S||a,O=y.useState("open"),P=y.useState("mounted"),E=y.useState("value"),A=y.useState("triggerProps"),C=y.useState("positionerElement"),T=y.useState("listElement"),_=y.useState("popupSide"),k=y.useState("id"),$=y.useState("labelId"),R=y.useState("hasSelectedValue"),I=P&&C?_:null,B=o??k,N=Nxe(g,$);SF({id:o});const L=kt(C),M=j.useRef(null),{getButtonProps:z,buttonRef:U}=Tj({disabled:w,native:s}),V=y.useStateSetter("triggerElement"),W=dr(),Q=dr(),G=dr();j.useEffect(()=>{if(O)return G.start(Ixe,()=>{y.context.selectionRef.current.allowUnselectedMouseUp=!0,y.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{G.clear()};y.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},Q.clear()},[O,y,Q,G]);const le=Is(A,{id:B,role:"combobox","aria-expanded":O,"aria-haspopup":"listbox","aria-controls":O?(T==null?void 0:T.id)??((ee=tg(C))==null?void 0:ee.id):void 0,"aria-labelledby":N,"aria-readonly":x||void 0,"aria-required":b||void 0,tabIndex:w?-1:0,onFocus(ie){d(!0),O&&y.context.alignItemWithTriggerActiveRef.current&&y.context.setOpen(!1,Ie(va,ie.nativeEvent)),W.start(0,()=>{y.set("forceMount",!0)})},onBlur(ie){xe(C,ie.relatedTarget)||(c(!0),d(!1),p==="onBlur"&&m.commit(E))},onMouseDown(ie){if(O)return;const H=qe(ie.currentTarget);function Z(J){if(!M.current)return;const se=J.target;xe(M.current,se)||xe(L.current,se)||Rxe(J,M.current)||y.context.setOpen(!1,Ie(qme,J))}Q.start(0,()=>{H.addEventListener("mouseup",Z,{once:!0})})}},u,z),X=m.getValidationProps(w,le);X.role="combobox";const q={...v,open:O,disabled:w,value:E,readOnly:x,popupSide:I,placeholder:!R};return on("button",t,{ref:[n,M,U,V],state:q,stateAttributesMapping:Dxe,props:X})}),Fxe={value:()=>null},Bxe=j.forwardRef(function(t,n){const{className:r,render:i,children:o,placeholder:a,style:s,...l}=t,u=Na(),c=u.useState("value"),d=u.useState("items"),p=u.useState("itemToStringLabel"),m=u.useState("hasSelectedValue"),v=!m&&a!=null&&o==null,h=u.useState("hasNullItemLabel",v),g={value:c,placeholder:!m};let y=null;return typeof o=="function"?y=o(c):o!=null?y=o:v&&!h?y=a:Array.isArray(c)?y=Exe(c,d,p):y=AF(c,d,p),on("span",t,{state:g,ref:[n,u.context.valueRef],props:[{children:y},l],stateAttributesMapping:Fxe})}),Uxe=j.forwardRef(function(t,n){const{render:r,className:i,style:o,...a}=t,u={open:Na().useState("open")};return on("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},a],stateAttributesMapping:lL})}),zxe=j.forwardRef(function(t,n){const r=Na(),i=r.useState("mounted"),o=r.useState("forceMount");return i||o?f.jsx(DL,{ref:n,...t}):null}),TF=j.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Hxe(){return j.useContext(TF)}function tO(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=de(i),[,a]=j.useState(!1),s=zn(Wxe).current,l=zn(Vxe).current,u=j.useRef(0),c=j.useRef(!0),d=j.useRef(null),p=j.useRef(null),m=de(()=>{c.current||(c.current=!0,a(w=>!w))}),v=de((w,O)=>{l.set(w,O),m()}),h=de(w=>{l.delete(w),m()}),g=de(w=>{const O=new Map;return n.current.length=0,r&&(r.current.length=0),w.forEach(P=>{var E,A;O.set(P.element,{...P.registration.metadata??{},index:P.index}),n.current[P.index]=P.element,r&&(r.current[P.index]=P.registration.label!==void 0?P.registration.label:((A=(E=P.registration.textRef)==null?void 0:E.current)==null?void 0:A.textContent)??P.element.textContent)}),u.current=n.current.length,O});function y(w){var E;if((E=p.current)==null||E.disconnect(),p.current=null,typeof MutationObserver!="function"||w.length<2)return;const O=new MutationObserver(A=>{if(!Gxe(A))return;let C=null;for(const T of w)if(T.isConnected){if(C&&_F(C,T)>0){O.disconnect(),m();return}C=T}});p.current=O;const P=new Set;for(let A=1;A<w.length;A+=1){const C=Kxe(w[A-1],w[A]);C&&P.add(C)}P.forEach(A=>O.observe(A,{childList:!0}))}const x=de(()=>{const[w,O]=qxe(l),P=g(w),E=d.current,A=!E||E.length!==w.length||w.some((C,T)=>{const _=E[T];return C.index!==_.index||C.element!==_.element||C.registration.index!==_.registration.index||C.registration.metadata!==_.registration.metadata});y(O),d.current=w,c.current=!1,A&&(s.forEach(C=>C(P)),o(P))});fe(()=>(!c.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),fe(()=>{c.current&&x()}),fe(()=>()=>{var w;(w=p.current)==null||w.disconnect(),c.current=!0},[]);const b=de(w=>(s.add(w),()=>{s.delete(w)})),S=j.useMemo(()=>({register:v,unregister:h,subscribeMapChange:b,nextIndexRef:u}),[v,h,b,u]);return f.jsx(TF.Provider,{value:S,children:t})}function Vxe(){return new Map}function Wxe(){return new Set}function qxe(e){const t=new Set,n=[],r=[];e.forEach((o,a)=>{if(!a.isConnected)return;const s=o.index,l={index:s??-1,element:a,registration:o};s===null?r.push(l):s>=0&&(t.add(s),n.push(l))});let i=0;return r.sort((o,a)=>_F(o.element,a.element)),r.forEach(o=>{for(;t.has(i);)i+=1;o.index=i,n.push(o),i+=1}),t.size>0&&n.sort((o,a)=>o.index-a.index),[n,r.map(o=>o.element)]}function Kxe(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Gxe(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function _F(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Xxe=j.createContext(void 0);function nO(){const e=j.useContext(Xxe);return(e==null?void 0:e.direction)??"ltr"}const Yxe=e=>({name:"arrow",options:e,async fn(t){var L,M;const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0,offsetParent:d="real"}=xa(e,t)||{};if(u==null)return{};const p=SL(c),m={x:n,y:r},v=Lj(i),h=Dj(v),g=await a.getDimensions(u),y=v==="y",x=y?"top":"left",b=y?"bottom":"right",S=y?"clientHeight":"clientWidth",w=o.reference[h]+o.reference[v]-m[v]-o.floating[h],O=m[v]-o.reference[v],P=d==="real"?await((L=a.getOffsetParent)==null?void 0:L.call(a,u)):s.floating;let E=s.floating[S]||o.floating[h];(!E||!await((M=a.isElement)==null?void 0:M.call(a,P)))&&(E=s.floating[S]||o.floating[h]);const A=w/2-O/2,C=E/2-g[h]/2-1,T=Math.min(p[x],C),_=Math.min(p[b],C),k=T,$=E-g[h]-_,R=E/2-g[h]/2+A,I=wL(k,R,$),B=!l.arrow&&po(i)!=null&&R!==I&&o.reference[h]/2-(R<k?T:_)-g[h]/2<0,N=B?R<k?R-k:R-$:0;return{[v]:m[v]+N,data:{[v]:I,centerOffset:R-I-N,...B&&{alignmentOffset:N}},reset:B}}}),Qxe=(e,t)=>{const{name:n,fn:r}=Yxe(e);return{name:n,fn:r,options:[e,t]}},Jxe={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0,a=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:a.top-n>=0||a.right-t>=0||a.bottom-n>=0||a.left-t>=0||o}}}},Zxe={sideX:"left",sideY:"top"},ebe="--available-width",tbe="--available-height",nbe="--anchor-width",rbe="--anchor-height",ibe="--transform-origin",U_=ebe,z_=tbe;function kF(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function H_(e,t,n){const{rects:r,placement:i}=e;return{side:kF(t,Nr(i),n),align:po(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function NF(e){return obe(e,vve)}function obe(e,t){var Fr,Kt;const{anchor:n,positionMethod:r="absolute",side:i="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,collisionBoundary:l,collisionPadding:u=5,sticky:c=!1,arrowPadding:d=5,disableAnchorTracking:p=!1,inline:m,keepMounted:v=!1,floatingRootContext:h,mounted:g,collisionAvoidance:y,shift:x,nodeId:b,adaptiveOrigin:S,lazyFlip:w=!1,externalTree:O}=e,[P,E]=j.useState(null);!g&&P!==null&&E(null);const A=y.side||"flip",C=y.align||"flip",T=y.fallbackAxisSide||"end",_=(x==null?void 0:x.crossAxis)??!1,k=x==null?void 0:x.rootBoundary,$=typeof n=="function"?n:void 0,R=de($),I=$?R:n,B=kt(n),N=kt(g),M=nO()==="rtl",z=P||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":M?"left":"right","inline-start":M?"right":"left"}[i],U=a==="center"?z:`${z}-${a}`;let V=u;typeof V=="number"?V={top:V,right:V,bottom:V,left:V}:V&&(V={top:V.top||0,right:V.right||0,bottom:V.bottom||0,left:V.left||0});const W=1,Q=i==="bottom"?W:0,G=i==="top"?W:0,le=i==="right"?W:0,X=i==="left"?W:0,q={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:V},ee=j.useRef(null),ie=kt(o),H=kt(s),Z=typeof o!="function"?o:0,J=typeof s!="function"?s:0,se=[];m&&se.push(m),se.push(Aye(ke=>{const Ct=H_(ke,i,M),sn=typeof ie.current=="function"?ie.current(Ct):ie.current,ln=typeof H.current=="function"?H.current(Ct):H.current;return{mainAxis:sn,crossAxis:ln,alignmentAxis:ln}},[Z,J,M,i]));const we=C==="none"&&A!=="shift",ae=!we&&(c||_||A==="shift"),be=A==="none"?null:_ye({...q,padding:{top:V.top+W+Q,right:V.right+W+X,bottom:V.bottom+W+G,left:V.left+W+le},mainAxis:!_&&A==="flip",crossAxis:C==="flip"?"alignment":!1,fallbackAxisSideDirection:T}),ce=we?null:Cye({...q,rootBoundary:k,mainAxis:C!=="none",crossAxis:ae,limiter:c||_?void 0:Tye(ke=>{if(!ee.current)return{};const{width:Ct,height:sn}=ee.current.getBoundingClientRect(),ln=_r(Nr(ke.placement)),vr=ln==="y"?Ct:sn,rr=ln==="y"?V.left+V.right:V.top+V.bottom;return{offset:vr/2+rr/2}})},[q,c,_,k,V,C]);A==="shift"||C==="shift"||a==="center"?se.push(ce,be):se.push(be,ce),se.push(kye({...q,apply({elements:{floating:ke},availableWidth:Ct,availableHeight:sn,rects:ln}){if(!N.current)return;const vr=ke.style;vr.setProperty(U_,`${Ct}px`),vr.setProperty(z_,`${sn}px`);const rr=ft(ke).devicePixelRatio||1,{x:Da,y:Co,width:Fe,height:it}=ln.reference,Wn=(Math.round((Da+Fe)*rr)-Math.round(Da*rr))/rr,ki=(Math.round((Co+it)*rr)-Math.round(Co*rr))/rr;vr.setProperty(nbe,`${Wn}px`),vr.setProperty(rbe,`${ki}px`)}}),Qxe(ke=>({element:ee.current||qe(ke.elements.floating).createElement("div"),padding:ee.current?d:0,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(ke){var dc,Xs,Jd,pc,wO,SO;const{elements:{floating:Ct},middlewareData:sn,placement:ln,platform:vr,rects:rr,y:Da}=ke,Co=Nr(ln),Fe=po(ln),it=_r(Co)==="y",Wn=ee.current,ki=typeof o=="function"?o(H_(ke,i,M)):o;let oi;if(!Wn&&Fe&&Math.abs(it?((dc=sn.shift)==null?void 0:dc.x)||0:((Xs=sn.shift)==null?void 0:Xs.y)||0)<=1)oi=Fe==="start"===(it&&((Jd=vr.isRTL)==null?void 0:Jd.call(vr,Ct))===!0)?"100%":"0%";else{const Q3=it?((pc=sn.arrow)==null?void 0:pc.x)||0:((wO=sn.arrow)==null?void 0:wO.y)||0,J3=it?(Wn==null?void 0:Wn.clientWidth)||0:(Wn==null?void 0:Wn.clientHeight)||0;oi=`${Q3+J3/2}px`}let La=Co==="top"||Co==="left"?`calc(100% + ${ki}px)`:`${-ki}px`;return ae&&it&&Math.abs(((SO=sn.shift)==null?void 0:SO.y)||0)>ki&&(La=`${rr.reference.y+rr.reference.height/2-Da}px`),Ct.style.setProperty(ibe,it?`${oi} ${La}`:`${La} ${oi}`),{}}},Jxe,S),fe(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);const Ce=j.useMemo(()=>({ancestorScroll:!p,elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:Ae,elements:Se,x:We,y:te,middlewareData:pe,update:oe,placement:Y,context:ge,isPositioned:_e,floatingStyles:He}=t({rootContext:h,open:v?g:void 0,placement:U,middleware:se,strategy:r,whileElementsMounted:v?void 0:(...ke)=>C_(...ke,Ce),nodeId:b,externalTree:O}),{sideX:an,sideY:Nn}=pe.adaptiveOrigin||Zxe,St=_e?r:"fixed",xn=j.useMemo(()=>{let ke;return _e?S?ke={position:St,[an]:We,[Nn]:te}:ke={...He,position:St}:ke={position:St,top:0,left:0},ke[U_]="100vw",ke[z_]="100vh",_e||(ke.opacity=0),ke},[S,St,an,We,Nn,te,He,_e]),nr=j.useRef(null);fe(()=>{if(!g)return;const ke=B.current,Ct=typeof ke=="function"?ke():ke,ln=(V_(Ct)?Ct.current:Ct)||null||null;ln!==nr.current&&(Ae.setPositionReference(ln),nr.current=ln)},[g,Ae,I,B]),j.useEffect(()=>{if(!g)return;const ke=B.current;typeof ke!="function"&&V_(ke)&&ke.current!==nr.current&&(Ae.setPositionReference(ke.current),nr.current=ke.current)},[g,Ae,I,B]),j.useEffect(()=>{if(v&&g&&Se.reference&&Se.floating)return C_(Se.reference,Se.floating,oe,Ce)},[v,g,Se,oe,Ce]);const Rn=Nr(Y),ii=kF(i,Rn,M),Lr=po(Y)||"center",Ti=!!((Fr=pe.hide)!=null&&Fr.referenceHidden);fe(()=>{w&&g&&_e&&Rn!==z&&E(Rn)},[w,g,_e,Rn,z]);const yr=j.useMemo(()=>{var ke,Ct;return{position:"absolute",top:(ke=pe.arrow)==null?void 0:ke.y,left:(Ct=pe.arrow)==null?void 0:Ct.x}},[pe.arrow]),_i=((Kt=pe.arrow)==null?void 0:Kt.centerOffset)!==0;return j.useMemo(()=>({positionerStyles:xn,arrowStyles:yr,arrowRef:ee,arrowUncentered:_i,side:ii,align:Lr,physicalSide:Rn,anchorHidden:Ti,refs:Ae,context:ge,isPositioned:_e,update:oe}),[xn,yr,ee,_i,ii,Lr,Rn,Ti,Ae,ge,_e,oe])}function V_(e){return e!=null&&"current"in e}const RF=j.createContext(void 0);function abe(){const e=j.useContext(RF);if(!e)throw new Error(vn(59));return e}function lg(e,t){e&&Object.assign(e.style,t)}const sbe={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};function rO(e){return e==="starting"?Nge:$t}function $F(e,t,{styles:n,transitionStatus:r,props:i,refs:o,hidden:a,inert:s=!1}){const l={...n};return s&&(l.pointerEvents="none"),on("div",e,{state:t,ref:o,props:[{role:"presentation",hidden:a,style:l},rO(r),i],stateAttributesMapping:Ay})}const lbe=20;function ube(e,t,n,r){const[i,o]=j.useState(!1);fe(()=>{if(!e||!t||n==null){o(!1);return}const a=qe(n).documentElement.clientWidth,s=n.offsetWidth;o(a>0&&s>0&&s>=a-lbe)},[e,t,n]),pF(e&&(!t||i),r)}const cbe={position:"fixed"},fbe=j.forwardRef(function(t,n){const{anchor:r,className:i,render:o,positionMethod:a,side:s,align:l,sideOffset:u,alignOffset:c,collisionBoundary:d="clipping-ancestors",collisionPadding:p,arrowPadding:m,sticky:v,disableAnchorTracking:h,alignItemWithTrigger:g=!0,collisionAvoidance:y=$ge,style:x,...b}=t,S=Na(),w=bF(),O=S.useState("open"),P=S.useState("mounted"),E=S.useState("modal"),A=S.useState("value"),C=S.useState("openMethod"),T=S.useState("positionerElement"),_=S.useState("triggerElement"),k=S.useState("isItemEqualToValue"),$=S.useState("transitionStatus"),R=j.useRef(null),I=j.useRef(null),[B,N]=j.useState(g),L=P&&B&&C!=="touch";!P&&B!==g&&N(g),j.useImperativeHandle(S.context.alignItemWithTriggerActiveRef,()=>L),ube((L||E)&&O,C==="touch",T,_);const M=NF({anchor:r,floatingRootContext:w,positionMethod:a,mounted:P,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:m,collisionBoundary:d,collisionPadding:p,sticky:v,disableAnchorTracking:h??L,collisionAvoidance:y,keepMounted:!0}),z=L?"none":M.side,U=L?cbe:M.positionerStyles,V={open:O,side:z,align:M.align,anchorHidden:M.anchorHidden};fe(()=>{S.set("popupSide",M.side)},[S,M.side]);const W=S.useStateSetter("positionerElement"),Q=$F(t,V,{styles:U,transitionStatus:$,props:b,refs:[n,W],hidden:!P,inert:!O}),G=j.useRef(0),le=de(q=>{if(S.context.valuesRef.current.length===0)return;const ee=G.current;G.current=q.size;const ie=Ie(va);if(ee!==0&&!S.state.multiple&&A!==null&&mh(S.context.valuesRef.current,A,k)===-1){const Z=S.context.initialValueRef.current,se=Z!=null&&mh(S.context.valuesRef.current,Z,k)!==-1?Z:null;S.context.setValue(se,ie),se===null&&(S.set("selectedIndex",null),S.context.selectedItemTextRef.current=null)}if(ee!==0&&S.state.multiple&&Array.isArray(A)){const H=A.filter(Z=>mh(S.context.valuesRef.current,Z,k)!==-1);H.length!==A.length&&(S.context.setValue(H,ie),H.length===0&&(S.set("selectedIndex",null),S.context.selectedItemTextRef.current=null))}if(O&&L){S.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const H={height:""};lg(T,H),lg(S.context.popupRef.current,H)}}),X=j.useMemo(()=>({...M,side:z,alignItemWithTriggerActive:L,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:R,scrollDownArrowRef:I}),[M,z,L,N]);return f.jsx(tO,{elementsRef:S.context.listRef,labelsRef:S.context.labelsRef,onMapChange:le,children:f.jsxs(RF.Provider,{value:X,children:[P&&E&&f.jsx(dF,{inert:fF(!O),cutout:_}),Q]})})}),Vp="base-ui-disable-scrollbar",W_={className:Vp,getElement(e){return f.jsx("style",{nonce:e,href:Vp,precedence:"base-ui:low",children:`.${Vp}{scrollbar-width:none}.${Vp}::-webkit-scrollbar{display:none}`})}},dbe=j.createContext(void 0);function pbe(e){return j.useContext(dbe)}const hbe=j.createContext(void 0),mbe={disableStyleElements:!1};function gbe(){return j.useContext(hbe)??mbe}const q_="--transform-origin",ybe={...Ay,...jj},vbe=j.forwardRef(function(t,n){const{render:r,className:i,style:o,finalFocus:a,...s}=t,l=Na(),{multiple:u,readOnly:c,highlightItemOnHover:d}=Zj(),p=bF(),{side:m,align:v,alignItemWithTriggerActive:h,isPositioned:g,setControlledAlignItemWithTrigger:y}=abe(),x=pbe()!=null,b=nO(),{nonce:S,disableStyleElements:w}=gbe(),O=l.useState("id"),P=l.useState("open"),E=l.useState("openMethod"),A=l.useState("mounted"),C=l.useState("popupProps"),T=l.useState("transitionStatus"),_=l.useState("triggerElement"),k=l.useState("positionerElement"),$=l.useState("listElement"),R=j.useRef(!1),I=j.useRef(!1),B=j.useRef({}),N=ku(),L=de(V=>{if(!k||!l.context.popupRef.current||!I.current)return;const W=k.style.top==="0px",Q=k.style.bottom==="0px";if(R.current||!h||!W&&!Q){l.context.handleScrollArrowVisibility(V);return}const G=G_(k),le=Gc(k.getBoundingClientRect().height,"y",G),X=qe(k),q=ft(k),ee=q.getComputedStyle(k),ie=parseFloat(ee.marginTop),H=parseFloat(ee.marginBottom),Z=K_(q.getComputedStyle(l.context.popupRef.current)),J=Math.min(X.documentElement.clientHeight-ie-H,Z),se=V.scrollTop,we=Wp(V);let ae=null;const be=Se=>{k.style.height=`${Se}px`},ce=W?we-se:se,Ce=Math.min(le+ce,J);if(ce<=Li){const Se=Kc(ce,0,J-le);Se>0&&be(le+Se),V.scrollTop=W?we:0,J-(le+Se)<=Li&&(R.current=!0),l.context.handleScrollArrowVisibility(V);return}if(J-Ce>Li)ae=W?1/0:0;else if(Q&&se<we){const Se=le+ce-J;ae=se-(ce-Se)}const Ae=Math.ceil(Ce);if(Ae!==0&&be(Ae),ae!=null){const Se=Kc(ae,0,Wp(V));Math.abs(V.scrollTop-Se)>Li&&(V.scrollTop=Se)}Ae>=J-Li&&(R.current=!0),l.context.handleScrollArrowVisibility(V)});j.useImperativeHandle(l.context.scrollHandlerRef,()=>L,[L]),Kd({open:P,ref:l.context.popupRef,onComplete(){P&&l.context.onOpenChangeComplete(!0)}});const M={open:P,transitionStatus:T,side:m,align:v};fe(()=>{!k||!l.context.popupRef.current||Object.keys(B.current).length||(B.current={top:k.style.top||"0",left:k.style.left||"0",right:k.style.right,height:k.style.height,bottom:k.style.bottom,minHeight:k.style.minHeight,maxHeight:k.style.maxHeight,marginTop:k.style.marginTop,marginBottom:k.style.marginBottom})},[l,k]),fe(()=>{P||h||(I.current=!1,R.current=!1,lg(k,B.current))},[P,h,k]),fe(()=>{var Q,G;const V=l.context.popupRef.current;if(!P||!_||!k||!V||h&&!g||l.state.transitionStatus==="ending")return;if(I.current=!0,V.style.removeProperty(q_),!h){N.request(()=>l.context.handleScrollArrowVisibility($||V));return}const W=xbe(V);try{let le=l.context.selectedItemTextRef.current;le!=null&&le.isConnected||(le=!l.select("hasSelectedValue")&&((Q=l.context.firstItemTextRef.current)!=null&&Q.isConnected)?l.context.firstItemTextRef.current:null);const X=l.context.valueRef.current,q=ft(k),ee=q.getComputedStyle(k),ie=q.getComputedStyle(V),H=qe(_),Z=G_(_),J=qp(_.getBoundingClientRect(),Z),se=qp(k.getBoundingClientRect(),Z),we=J.height,ae=$||V,be=ae.scrollHeight,ce=parseFloat(ie.borderBottomWidth),Ce=parseFloat(ee.marginTop)||10,Ae=parseFloat(ee.marginBottom)||10,Se=parseFloat(ee.minHeight)||100,We=K_(ie),te=5,pe=5,oe=20,Y=H.documentElement.clientHeight-Ce-Ae,ge=H.documentElement.clientWidth,_e=Y-J.bottom+we;let He,an=b==="rtl"?J.right-se.width:J.left,Nn=0;if(le&&X){const Kt=qp(X.getBoundingClientRect(),Z);He=qp(le.getBoundingClientRect(),Z),an=se.left+(b==="rtl"?Kt.right-He.right:Kt.left-He.left);const ke=Kt.top-J.top+Kt.height/2;Nn=He.top-se.top+He.height/2-ke}const St=_e+Nn+Ae+ce;let xn=Math.min(Y,St);const nr=Y-Ce-Ae,Rn=St-xn,ii=ge-pe;k.style.left=`${Kc(an,te,ii-se.width)}px`,k.style.height=`${xn}px`,k.style.maxHeight="none",k.style.marginTop=`${Ce}px`,k.style.marginBottom=`${Ae}px`,V.style.height="100%";const Lr=Wp(ae),Ti=Rn>=Lr-Li;Ti&&(xn=Math.min(Y,se.height)-(Rn-Lr));const yr=J.top<oe||J.bottom>Y-oe||Math.ceil(xn)+Li<Math.min(be,Se),_i=(((G=q.visualViewport)==null?void 0:G.scale)??1)!==1&&Eo;if(yr||_i){lg(k,B.current),y(!1);return}const Fr=Math.max(Se,xn);if(Ti){const Kt=Math.max(0,Y-St);k.style.top=se.height>=nr?"0":`${Kt}px`,k.style.height=`${xn}px`,ae.scrollTop=Wp(ae)}else k.style.bottom="0",ae.scrollTop=Rn;if(He){const Kt=se.top,ke=se.height,Ct=He.top+He.height/2,sn=Kc(ke>0?(Ct-Kt)/ke*100:50,0,100);V.style.setProperty(q_,`50% ${sn}%`)}(Fr===Y||xn>=We)&&(R.current=!0),l.context.handleScrollArrowVisibility(ae),d&&l.state.selectedIndex===null&&l.state.activeIndex===null&&l.context.listRef.current[0]!=null&&l.set("activeIndex",0)}finally{W()}},[l,P,k,_,h,y,N,$,d,b,g]),j.useEffect(()=>{if(!h||!k||!P)return;const V=ft(k);function W(Q){l.context.setOpen(!1,Ie(Kme,Q))}return Me(V,"resize",W)},[l,h,k,P]);const z={...$?{role:"presentation"}:{role:"listbox","aria-multiselectable":u||void 0,"aria-readonly":c||void 0,id:`${O}-list`},onKeyDown(V){x&&Yj.has(V.key)&&V.stopPropagation()},onScroll(V){$||L(V.currentTarget)},...h&&{style:$?{height:"100%"}:sbe},className:!$&&h?W_.className:void 0},U=on("div",t,{ref:[n,l.context.popupRef],state:M,stateAttributesMapping:ybe,props:[C,z,rO(T),s]});return f.jsxs(j.Fragment,{children:[!w&&W_.getElement(S),f.jsx(LL,{context:p,modal:!1,disabled:!A,openInteractionType:E,returnFocus:a,restoreFocus:!0,children:U})]})});function K_(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function Wp(e){return CF(e.scrollHeight,e.clientHeight)}function G_(e){return VL.getScale(e)}function Gc(e,t,n){return e/n[t]}function qp(e,t){return bd({x:Gc(e.x,"x",t),y:Gc(e.y,"y",t),width:Gc(e.width,"x",t),height:Gc(e.height,"y",t)})}const X_=[["transform","none"],["scale","1"],["translate","0 0"]];function xbe(e){const{style:t}=e,n={};for(const[r,i]of X_)n[r]=t.getPropertyValue(r),t.setProperty(r,i,"important");return()=>{for(const[r]of X_){const i=n[r];i?t.setProperty(r,i):t.removeProperty(r)}}}function MF(e={}){const{guess:t,label:n,metadata:r,textRef:i,index:o}=e,{register:a,unregister:s,subscribeMapChange:l,nextIndexRef:u}=Hxe(),c=j.useRef(-1),[d,p]=j.useState(o==null&&t?()=>{if(c.current===-1){const g=u.current;u.current+=1,c.current=g}return c.current}:-1),m=o??d,v=j.useRef(null),h=j.useCallback(g=>{const y=v.current;y&&s(y),v.current=g,g&&a(g,{metadata:r??null,index:o??null,label:n,textRef:i})},[o,a,s,r,n,i]);return fe(()=>{if(o==null)return l(g=>{var x;const y=v.current?(x=g.get(v.current))==null?void 0:x.index:null;y!=null&&p(y)})},[o,l]),{ref:h,index:m}}const IF=j.createContext(void 0);function bbe(){const e=j.useContext(IF);if(!e)throw new Error(vn(57));return e}const wbe=j.memo(j.forwardRef(function(t,n){const{render:r,className:i,style:o,value:a=null,label:s,disabled:l=!1,nativeButton:u=!1,...c}=t,d=j.useRef(null),p=MF({guess:!0,label:s,textRef:d}),m=Na(),{itemProps:v,multiple:h,disabled:g,readOnly:y}=Zj(),x=g||l,b=m.useState("isActive",p.index),S=m.useState("open"),w=m.useState("isSelected",a),O=m.useState("isSelectedByFocus",p.index),P=m.useState("isItemEqualToValue"),E=p.index,A=j.useRef(null);fe(()=>{const M=m.context.valuesRef.current;return M[E]=a,()=>{delete M[E]}},[E,a,m]),fe(()=>{const M=m.state.value,z=m.state.selectedIndex;let U=z,V;h&&Array.isArray(M)?(U=wxe(E,a,m.context.valuesRef.current,M,P,z),V=U===E,E===z&&!V&&(m.context.selectedItemTextRef.current=null)):(V=M!==void 0&&Fs(a,M,P),V&&(U=E)),m.set("selectedIndex",U),V&&d.current&&(m.context.selectedItemTextRef.current=d.current)},[E,h,P,m,a]);const C=j.useRef("mouse"),T=j.useRef(!1),{getButtonProps:_,buttonRef:k}=Tj({disabled:x,focusableWhenDisabled:!0,native:u,composite:!0}),$={disabled:x,selected:w,highlighted:b};function R(M){if(g||y)return;const z=m.state.value;if(h){const U=Array.isArray(z)?z:[],V=w?Sxe(U,a,P):[...U,a];m.context.setValue(V,Ie(cx,M))}else m.context.setValue(a,Ie(cx,M)),m.context.setOpen(!1,Ie(cx,M))}function I(){m.context.selectionRef.current.dragY=0}const B={role:"option","aria-selected":w,tabIndex:S&&b?0:-1,onKeyDown(M){m.set("activeIndex",E),M.key===" "&&m.context.typingRef.current&&M.preventDefault()},onClick(M){const z=C.current!=="touch",U=M.nativeEvent.pointerType,V=z&&My(M.nativeEvent)&&(U!==void 0||b),W=z&&!V&&!T.current;T.current=!1,!(x||W)&&R(M.nativeEvent)},onPointerEnter(M){C.current=M.pointerType},onPointerMove(M){if(M.pointerType==="mouse"&&M.buttons===1){const z=m.context.selectionRef.current;z.dragY+=M.movementY,z.dragY**2>=64&&(z.allowUnselectedMouseUp=!0)}},onPointerDown(M){C.current=M.pointerType,T.current=!0,I()},onMouseUp(){var U;if(I(),x||C.current==="touch"||T.current)return;const M=!m.context.selectionRef.current.allowSelectedMouseUp&&w,z=!m.context.selectionRef.current.allowUnselectedMouseUp&&!w;M||z||(T.current=!0,(U=A.current)==null||U.click(),T.current=!1)}},N=on("div",t,{ref:[k,n,p.ref,A],state:$,props:[v,B,c,_]}),L=j.useMemo(()=>({selected:w,index:E,textRef:d,selectedByFocus:O}),[w,E,d,O]);return f.jsx(IF.Provider,{value:L,children:N})})),Sbe=j.memo(j.forwardRef(function(t,n){const{index:r,textRef:i,selectedByFocus:o}=bbe(),a=Na(),{render:s,className:l,style:u,...c}=t,d=j.useCallback(m=>{m&&(r===0&&(a.context.firstItemTextRef.current=m),o&&(a.context.selectedItemTextRef.current=m))},[a,r,o]);return on("div",t,{ref:[d,n,i],props:c})})),jbe=j.createContext(void 0);function Obe(){const e=j.useContext(jbe);if(e===void 0)throw new Error(vn(56));return e}const Pbe=j.forwardRef(function(t,n){const{render:r,className:i,style:o,id:a,...s}=t,{setLabelId:l}=Obe(),u=oc(a);return fe(()=>(l(u),()=>{l(d=>d===u?void 0:d)}),[u,l]),on("div",t,{ref:n,props:[{id:u,"aria-hidden":!0},s]})}),zw=kxe,Hw=Bxe,Vw=j.forwardRef(function({className:t,children:n,...r},i){return f.jsxs(Lxe,{ref:i,className:yt("inline-flex items-center justify-between gap-1.5 rounded border border-line bg-panel px-2 py-1 text-xs text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",t),...r,children:[n,f.jsx(Uxe,{className:"text-muted-foreground","aria-hidden":"true",children:"▾"})]})}),Ww=j.forwardRef(function({className:t,children:n,side:r="bottom",align:i="start",...o},a){return f.jsx(zxe,{children:f.jsx(fbe,{side:r,align:i,sideOffset:4,className:"z-50",children:f.jsx(vbe,{ref:a,className:yt("min-w-[6rem] overflow-hidden rounded border border-line bg-popover p-1 text-popover-foreground shadow-lg font-mono",t),...o,children:n})})})}),Xc=j.forwardRef(function({className:t,children:n,...r},i){return f.jsx(wbe,{ref:i,className:yt("relative flex cursor-default select-none items-center rounded-sm px-2 py-1 text-xs text-foreground outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-panel data-[selected]:text-brand",t),...r,children:f.jsx(Sbe,{children:n})})});j.forwardRef(function({className:t,...n},r){return f.jsx(Pbe,{ref:r,className:yt("px-2 py-1 text-[10px] uppercase tracking-wide text-muted-foreground",t),...n})});const Ra=j.forwardRef(function({className:t,containerClassName:n,...r},i){return f.jsx("div",{className:yt("w-full overflow-x-auto",n),children:f.jsx("table",{ref:i,className:yt("w-full border-collapse text-xs",t),...r})})}),$a=j.forwardRef(function({className:t,...n},r){return f.jsx("thead",{ref:r,className:yt("border-b border-line text-left text-[10px] uppercase tracking-wide text-muted-foreground",t),...n})}),Ma=j.forwardRef(function({className:t,...n},r){return f.jsx("tbody",{ref:r,className:yt("divide-y divide-line-soft",t),...n})}),en=j.forwardRef(function({className:t,...n},r){return f.jsx("tr",{ref:r,className:yt("transition-colors",t),...n})}),Oe=j.forwardRef(function({className:t,...n},r){return f.jsx("th",{ref:r,className:yt("px-3 py-2 font-normal",t),...n})}),Ee=j.forwardRef(function({className:t,...n},r){return f.jsx("td",{ref:r,className:yt("px-3 py-2 align-top",t),...n})}),DF=j.createContext(void 0);function LF(){const e=j.useContext(DF);if(e===void 0)throw new Error(vn(64));return e}const Ebe="data-activation-direction",iO={tabActivationDirection:e=>({[Ebe]:e})},Abe=j.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:o,orientation:a="horizontal",render:s,value:l,style:u,...c}=t,d=t.defaultValue!==void 0,p=j.useRef([]),[m,v]=j.useState(()=>new Map),[h,g]=Fw({controlled:l,default:i,name:"Tabs",state:"value"}),y=l!==void 0,[x,b]=j.useState(()=>new Map),S=j.useRef(void 0),w=j.useCallback(X=>qw(x,X),[x]),[O,P]=j.useState(()=>({previousValue:h,tabActivationDirection:"none"})),{previousValue:E,tabActivationDirection:A}=O;let C=A,T=!1;E!==h&&(C=Y_(E,h,a,x),T=E!=null&&h!=null&&w(h)==null);const _=T?E:h,k=E!==_||A!==C;fe(()=>{k&&P({previousValue:_,tabActivationDirection:C})},[_,k,C]);const $=de((X,q)=>{const ee=Y_(h,X,a,x);q.activationDirection=ee,o==null||o(X,q),!q.isCanceled&&g(X)}),R=de((X,q)=>{o==null||o(X,Ie(q,void 0,void 0,{activationDirection:"none"}))}),I=de((X,q)=>(v(ee=>{const ie=new Map(ee);return ie.set(X,q),ie}),()=>{v(ee=>{if(ee.get(X)!==q)return ee;const ie=new Map(ee);return ie.delete(X),ie})})),B=j.useCallback(X=>m.get(X),[m]),N=j.useCallback(X=>{for(const q of x.values())if(X===q.value)return q.id},[x]),L=j.useMemo(()=>({getTabElementBySelectedValue:w,getTabIdByPanelValue:N,getTabPanelIdByValue:B,onValueChange:$,orientation:a,registerMountedTabPanel:I,setTabMap:b,tabActivationDirection:C,value:h}),[w,N,B,$,a,I,b,C,h]),M=j.useMemo(()=>{for(const X of x.values())if(X.value===h)return X},[x,h]),z=j.useMemo(()=>{for(const X of x.values())if(!X.disabled)return X.value},[x]),U=j.useRef(!d),V=j.useRef(i),W=j.useRef(d),Q=j.useRef(!1);fe(()=>{var H;if(y)return;function X(Z,J){g(Z),P({previousValue:Z,tabActivationDirection:"none"}),R(Z,J),U.current=!1}if(x.size===0){Q.current&&h!==null&&!((H=S.current)!=null&&H.isConnected)&&X(null,o_);return}Q.current=!0,S.current=x.keys().next().value;const q=M==null?void 0:M.disabled,ee=M==null&&h!==null;if(!q&&h===V.current&&(W.current=!1),W.current&&q&&h===V.current)return;const ie=U.current;if(q||ee){const Z=z??null;if(h===Z){U.current=!1;return}let J=o_;ie?J=a_:q&&(J=dL),X(Z,J);return}ie&&M!=null&&(R(h,a_),U.current=!1)},[z,y,R,M,g,x,h]);const le=on("div",t,{state:{orientation:a,tabActivationDirection:C},ref:n,props:c,stateAttributesMapping:iO});return f.jsx(DF.Provider,{value:L,children:f.jsx(tO,{elementsRef:p,children:le})})});function qw(e,t){for(const[n,r]of e.entries())if(t===r.value)return n;return null}function Y_(e,t,n,r){if(e==null||t==null)return"none";const[i,o,a]=n==="horizontal"?["left","left","right"]:["top","up","down"],s=qw(r,e),l=qw(r,t);if(s==null||l==null)return s!==l&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?a:o:"none";const u=s.getBoundingClientRect()[i],c=l.getBoundingClientRect()[i];return c<u?o:c>u?a:"none"}const oO="data-composite-item-active";function Cbe(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Cj(),{ref:i,index:o}=MF(e),a=n===o,s=j.useRef(null),l=Ms(i,s);return{compositeProps:{tabIndex:a?0:-1,onFocus(){r(o)},onMouseMove(){const c=s.current;if(!t||!c)return;const d=c.hasAttribute("disabled")||c.ariaDisabled==="true";!a&&!d&&c.focus()}},compositeRef:l,index:o}}const FF=j.createContext(void 0);function Tbe(){const e=j.useContext(FF);if(e===void 0)throw new Error(vn(65));return e}const _be=j.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:o,value:a,id:s,nativeButton:l=!0,style:u,...c}=t,{value:d,getTabPanelIdByValue:p,onValueChange:m,orientation:v,tabActivationDirection:h}=LF(),{activateOnFocus:g,registerTabResizeObserverElement:y,tabsListElement:x}=Tbe(),{highlightedIndex:b,onHighlightedIndexChange:S}=Cj(),w=oc(s),O=j.useMemo(()=>({disabled:i,id:w,value:a}),[i,w,a]),{compositeProps:P,compositeRef:E,index:A}=Cbe({metadata:O}),C=a===d,T=j.useRef(!1),_=j.useRef(null),k=de(Q=>{var G;(G=_.current)==null||G.call(_),_.current=Q?y(Q):null});fe(()=>{if(T.current){T.current=!1;return}if(!(C&&A>-1&&b!==A))return;const Q=x;if(Q!=null){const G=Ln(qe(Q));if(G&&xe(Q,G))return}i||S(A)},[C,A,b,S,i,x]);const{getButtonProps:$,buttonRef:R}=Tj({disabled:i,native:l,focusableWhenDisabled:!0}),I=p(a),B=j.useRef(!1),N=j.useRef(!1);function L(Q){m(a,Ie(va,Q.nativeEvent,void 0,{activationDirection:"none"}))}function M(Q){C||i||L(Q)}function z(Q){C||i||g&&(!B.current||N.current)&&L(Q)}function U(Q){if(C||i)return;B.current=!0,N.current=Q.button===0;const G=qe(Q.currentTarget);function le(){B.current=!1,N.current=!1,G.removeEventListener("pointerup",le),G.removeEventListener("pointercancel",le)}G.addEventListener("pointerup",le),G.addEventListener("pointercancel",le)}return on("button",t,{state:{disabled:i,active:C,orientation:v,tabActivationDirection:h},ref:[n,R,E,k],props:[P,{role:"tab","aria-controls":I,"aria-selected":C,id:w,onClick:M,onFocus:z,onPointerDown:U,[oO]:C?"":void 0,onKeyDownCapture(){T.current=!0}},c,$],stateAttributesMapping:iO})});function kbe(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:i,direction:o,highlightedIndex:a,onHighlightedIndexChange:s,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:c,disabledIndices:d,modifierKeys:p=ga}=e,[m,v]=j.useState(0),h=r!=null,g=j.useRef(null),y=Ms(g,l),x=j.useRef([]),b=j.useRef(!1),S=j.useRef(null),w=a??m,O=de((T,_=!1)=>{if(S.current=x.current[T]??null,(s??v)(T),_){const k=x.current[T];M_(g.current,k,o,n)}}),P=de(T=>{var R;if(T.size===0)return;if(b.current){const I=x.current,B=I.indexOf(S.current);if(B===-1){const N=I[w];!N||Nl(I,w,d)?O(Nbe(I,d)):S.current=N}else B!==w&&O(B);return}b.current=!0;const _=Array.from(T.keys()),k=_.find(I=>I==null?void 0:I.hasAttribute(oO))??null,$=k?((R=T.get(k))==null?void 0:R.index)??-1:-1;if($!==-1)O($);else if(Nl(_,w,d)){const I=Xi(_,{disabledIndices:d});df(_,I)||O(I)}M_(g.current,k,o,n)});fe(()=>{if(d==null||a!=null||!b.current)return;const T=x.current;if(Nl(T,w,d)){const _=Xi(T,{disabledIndices:d});df(T,_)||O(_)}},[d,a,w,x,O]);const E=de((T,_,k)=>i?i(T,_,k,x):k),A=de(T=>{const _=T.key===Dw||T.key===Lw;if(!Yj.has(T.key)||!u&&_||Rbe(T,p)||!g.current)return;const $=o==="rtl",R=$?Mw:Iw,I=$?Iw:Mw,B=n==="vertical"?$w:R,N=n==="vertical"?Rw:I,L=hn(T.nativeEvent);if(L!=null&&$_(L)&&!gF(L)){const Q=L.selectionStart,G=L.selectionEnd,le=L.value;if(Q==null||T.shiftKey||Q!==G||T.key!==N&&Q<le.length||T.key!==B&&Q>0)return}let M=w;const z=dh(x,d),U=Cw(x,d);r!=null&&(M=r({disabledIndices:d,elementsRef:x,event:T,highlightedIndex:w,loopFocus:t,maxIndex:U,minIndex:z,onLoop:E,orientation:n,rtl:$}));const V=n!=="vertical"&&T.key===R||n!=="horizontal"&&T.key===$w,W=n!=="vertical"&&T.key===I||n!=="horizontal"&&T.key===Rw;u&&(T.key===Dw?M=z:T.key===Lw&&(M=U)),M===w&&(V||W)&&(t&&M===U&&V?(M=z,i&&(M=i(T,w,M,x))):t&&M===z&&W?(M=U,i&&(M=i(T,w,M,x))):M=Xi(x.current,{startingIndex:M,decrement:W,disabledIndices:d})),M!==w&&!df(x.current,M)&&(c&&T.stopPropagation(),(h||_||V||W)&&T.preventDefault(),O(M,!0),queueMicrotask(()=>{var Q;(Q=x.current[M])==null||Q.focus()}))});return{props:{ref:y,onFocus(T){const _=g.current,k=hn(T.nativeEvent);!_||k==null||!$_(k)||k.setSelectionRange(0,k.value.length)},onKeyDown:A},highlightedIndex:w,onHighlightedIndexChange:O,elementsRef:x,onMapChange:P,relayKeyboardEvent:A}}function Nbe(e,t){let n=-1;for(let r=0;r<e.length;r+=1){const i=e[r];if(!(!i||Nl(e,r,t))){if(i.hasAttribute(oO))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Rbe(e,t){for(const n of $ve)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function $be(e){const{render:t,className:n,style:r,refs:i=ga,props:o=ga,state:a=$t,stateAttributesMapping:s,highlightedIndex:l,onHighlightedIndexChange:u,orientation:c,grid:d,loopFocus:p,onLoop:m,enableHomeAndEndKeys:v,onMapChange:h,stopEventPropagation:g=!0,rootRef:y,disabledIndices:x,modifierKeys:b,highlightItemOnHover:S=!1,tag:w="div",...O}=e,P=nO(),{props:E,highlightedIndex:A,onHighlightedIndexChange:C,elementsRef:T,onMapChange:_,relayKeyboardEvent:k}=kbe({grid:d,loopFocus:p,onLoop:m,orientation:c,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:y,stopEventPropagation:g,enableHomeAndEndKeys:v,direction:P,disabledIndices:x,modifierKeys:b}),$=on(w,e,{state:a,ref:i,props:[E,...o,O],stateAttributesMapping:s}),R=j.useMemo(()=>({highlightedIndex:A,onHighlightedIndexChange:C,highlightItemOnHover:S,relayKeyboardEvent:k}),[A,C,S,k]);return f.jsx(fL.Provider,{value:R,children:f.jsx(tO,{elementsRef:T,onMapChange:I=>{h==null||h(I),_(I)},children:$})})}const Mbe=j.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:o=!0,render:a,style:s,...l}=t,{orientation:u,setTabMap:c,tabActivationDirection:d}=LF(),[p,m]=j.useState(0),[v,h]=j.useState(null),g=j.useRef(new Set),y=j.useRef(new Set),x=j.useRef(null);fe(()=>{if(typeof ResizeObserver>"u")return;const E=new ResizeObserver(()=>{g.current.forEach(A=>{A()})});return x.current=E,v&&E.observe(v),y.current.forEach(A=>{E.observe(A)}),()=>{E.disconnect(),x.current=null}},[v]);const b=de(E=>(g.current.add(E),()=>{g.current.delete(E)})),S=de(E=>{var A;return y.current.add(E),(A=x.current)==null||A.observe(E),()=>{var C;y.current.delete(E),(C=x.current)==null||C.unobserve(E)}}),w={orientation:u,tabActivationDirection:d},O={"aria-orientation":u==="vertical"?"vertical":void 0,role:"tablist"},P=j.useMemo(()=>({activateOnFocus:r,registerIndicatorUpdateListener:b,registerTabResizeObserverElement:S,tabsListElement:v}),[r,b,S,v]);return f.jsx(FF.Provider,{value:P,children:f.jsx($be,{render:a,className:i,style:s,state:w,refs:[n,h],props:[O,l],stateAttributesMapping:iO,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:o,orientation:u,onHighlightedIndexChange:m,onMapChange:c,disabledIndices:ga})})}),Ibe=Abe,Dbe=j.forwardRef(function({className:t,...n},r){return f.jsx(Mbe,{ref:r,className:yt("flex flex-wrap gap-1 border-b border-line pb-2",t),...n})}),Lbe=j.forwardRef(function({className:t,...n},r){return f.jsx(_be,{ref:r,className:yt("flex items-baseline gap-1.5 rounded-md px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-panel hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-[active]:bg-panel-2 data-[active]:text-foreground",t),...n})}),BF=j.createContext(void 0);function Gy(e){const t=j.useContext(BF);if(t===void 0&&!e)throw new Error(vn(72));return t}const Fbe={...lF,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class Bbe extends Wy{constructor(n,r,i){const o=new qj;super(Ube(n,o,r,i),zbe(o),Fbe);tt(this,"setOpen",(n,r)=>{dve(this,n,r,{extraState:{openChangeReason:r.reason}})})}cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,Ie(qd,n))}}function Ube(e,t,n,r=!1){return{...aF(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function zbe(e){return{popupRef:j.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const Hbe=Hj(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:i,disableHoverablePopup:o=!1,trackCursorAxis:a="none",actionsRef:s,onOpenChange:l,onOpenChangeComplete:u,handle:c,triggerId:d,defaultTriggerId:p=null,children:m}=t,v=eF((T,_)=>new Bbe({open:r,openProp:i,activeTriggerId:p,triggerIdProp:d},T,_));v.useControlledProp("openProp",i),v.useControlledProp("triggerIdProp",d),v.useContextCallback("onOpenChange",l),v.useContextCallback("onOpenChangeComplete",u);const h=v.useState("open"),g=!n&&h,y=v.useState("activeTriggerId"),x=v.useState("mounted"),b=v.useState("payload");v.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:o,disabled:n}),rF(v,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S,transitionStatus:w}=iF(g,v),O=v.useState("isInstantPhase"),P=v.useState("instantType"),E=v.useState("lastOpenChangeReason"),A=j.useRef(null);fe(()=>{h&&n&&v.setOpen(!1,Ie(dL))},[h,n,v]),fe(()=>{w==="ending"&&E===va||w!=="ending"&&O?(P!=="delay"&&(A.current=P),v.set("instantType","delay")):A.current!==null&&(v.set("instantType",A.current),A.current=null)},[w,O,E,P,v]),fe(()=>{g&&y==null&&v.set("payload",void 0)},[v,y,g]),j.useImperativeHandle(s,()=>({unmount:S,close:()=>v.setOpen(!1,Ie(pL))}),[S,v]);const C=g||x||!n&&a!=="none";return f.jsxs(BF.Provider,{value:v,children:[c&&f.jsx(tF,{handle:c,store:v}),C&&f.jsx(Vbe,{store:v,disabled:n,trackCursorAxis:a}),typeof m=="function"?m({payload:b}):m]})});function Vbe({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),i=Uj(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),o=Wge(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),a=j.useMemo(()=>Is(o.reference,i.reference),[o.reference,i.reference]);return oF(e,{activeTriggerProps:a,inactiveTriggerProps:a,popupProps:i.floating??$t}),null}const UF=j.createContext(void 0);function Wbe(){return j.useContext(UF)}const qbe=600,zF="data-base-ui-tooltip-trigger";function Q_(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const i=n[r];if(De(i))return i}}const t=e.target;return De(t)?t:null}function Kbe(e){let t=e;for(;t;){const n=t.closest(`[${zF}]`);if(n)return n;const r=t.getRootNode();t="host"in r&&De(r.host)?r.host:null}return null}const Gbe=Qye(function(t,n){const{render:r,className:i,style:o,handle:a,payload:s,disabled:l,delay:u,closeOnClick:c=!0,closeDelay:d,id:p,...m}=t,v=Gy(!0),g=gve(a)??v;if(!g)throw new Error(vn(82));const y=oc(p),x=g.useState("isTriggerActive",y),b=g.useState("isOpenedByTrigger",y),S=g.useState("floatingRootContext"),w=j.useRef(null),O=d??0,{registerTrigger:P,isMountedByThisTrigger:E}=pve(y,w,g,{payload:s,closeOnClick:c,closeDelay:O}),A=Wbe(),{activeIdRef:C,delayRef:T,isInstantPhase:_,hasProvider:k}=fge(S,{open:b}),$=Xj(S);g.useSyncedValue("isInstantPhase",_);const R=g.useState("disabled"),I=l??R,B=kt(I),N=g.useState("trackCursorAxis"),L=g.useState("disableHoverablePopup"),M=j.useRef(!1),z=dr(),U=j.useRef(void 0);function V(){return k&&C.current!=null?0:u??A??qbe}function W(Z){const J=w.current;if(!J||!Z)return!1;const se=Kbe(Z);return se!==null&&se!==J&&xe(J,se)}function Q(Z){const J=W(Z);return M.current=J,J&&($.openChangeTimeout.clear(),$.restTimeout.clear(),$.restTimeoutPending=!1,z.clear()),J}const G=jve(S,{enabled:!I,mouseOnly:!0,move:!1,handleClose:!L&&N!=="both"?kve():null,restMs:V,delay(){return d==null&&k?{close:Ds(T.current,"close")}:{close:O}},triggerElementRef:w,isActiveTrigger:x,isClosing:()=>g.select("transitionStatus")==="ending",shouldOpen(){return!M.current}}),le=bve(S,{enabled:!I}).reference,X=Z=>{const J=M.current,se=Q_(Z),we=Q(se),ae=w.current,be=ae&&se&&xe(ae,se);if(we&&g.select("open")&&g.select("lastOpenChangeReason")===Kn){g.setOpen(!1,Ie(Kn,Z));return}if(J&&!we&&be&&!B.current&&!g.select("open")&&ae&&fa(U.current)){const ce=()=>{!M.current&&!B.current&&!g.select("open")&&g.setOpen(!0,Ie(Kn,Z,ae))},Ce=V();Ce===0?(z.clear(),ce()):z.start(Ce,ce)}},q=g.useState("triggerProps",E);return on("button",t,{state:{open:b},ref:[n,P,w],props:[G,le,E||N!=="none"?q:void 0,{onMouseOver(Z){X(Z.nativeEvent)},onFocus(Z){W(Q_(Z.nativeEvent))&&Z.preventBaseUIHandler()},onMouseLeave(){M.current=!1,z.clear(),U.current=void 0},onPointerEnter(Z){U.current=Z.pointerType},onPointerDown(Z){U.current=Z.pointerType,g.set("closeOnClick",c),c&&!g.select("open")&&g.cancelPendingOpen(Z.nativeEvent)},onClick(Z){c&&!g.select("open")&&g.cancelPendingOpen(Z.nativeEvent)},id:y,[Pw]:I?"":void 0,[zF]:I?void 0:""},m],stateAttributesMapping:lL})}),HF=j.createContext(void 0);function Xbe(){const e=j.useContext(HF);if(e===void 0)throw new Error(vn(70));return e}const Ybe=j.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,style:s,...l}=t,{node:u,subtree:c}=IL({container:i,ref:n,componentProps:t,elementProps:l});return!c&&!u?null:f.jsxs(j.Fragment,{children:[c,u&&go.createPortal(r,u)]})}),Qbe=j.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Gy().useState("mounted")||r?f.jsx(HF.Provider,{value:r,children:f.jsx(Ybe,{ref:n,...i})}):null}),VF=j.createContext(void 0);function Jbe(){const e=j.useContext(VF);if(e===void 0)throw new Error(vn(71));return e}const Zbe=j.forwardRef(function(t,n){const{render:r,className:i,anchor:o,positionMethod:a="absolute",side:s="top",align:l="center",sideOffset:u=0,alignOffset:c=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:v=!1,disableAnchorTracking:h=!1,collisionAvoidance:g=Mge,style:y,...x}=t,b=Gy(),S=Xbe(),w=b.useState("open"),O=b.useState("mounted"),P=b.useState("trackCursorAxis"),E=b.useState("disableHoverablePopup"),A=b.useState("floatingRootContext"),C=b.useState("instantType"),T=b.useState("transitionStatus"),_=b.useState("adaptiveOrigin"),k=NF({anchor:o,positionMethod:a,floatingRootContext:A,mounted:O,side:s,sideOffset:u,align:l,alignOffset:c,collisionBoundary:d,collisionPadding:p,sticky:v,arrowPadding:m,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:g,adaptiveOrigin:_}),$=j.useMemo(()=>({open:w,side:k.side,align:k.align,anchorHidden:k.anchorHidden,instant:P!=="none"?"tracking-cursor":C}),[w,k.side,k.align,k.anchorHidden,P,C]),R=$F(t,$,{styles:k.positionerStyles,transitionStatus:T,props:x,refs:[n,b.useStateSetter("positionerElement")],hidden:!O,inert:!w||P==="both"||E});return f.jsx(VF.Provider,{value:k,children:R})}),e0e=j.forwardRef(function(t,n){const{render:r,className:i,style:o,...a}=t,s=Gy(),{side:l,align:u}=Jbe(),c=s.useState("open"),d=s.useState("instantType"),p=s.useState("transitionStatus"),m=s.useState("popupProps"),v=s.useState("floatingRootContext"),h=s.useState("disabled"),g=s.useState("closeDelay");Kd({open:c,ref:s.context.popupRef,onComplete(){var S,w;c&&((w=(S=s.context).onOpenChangeComplete)==null||w.call(S,!0))}}),wve(v,{enabled:!h,closeDelay:g});const y=s.useStateSetter("popupElement");return on("div",t,{state:{open:c,side:l,align:u,instant:d,transitionStatus:p},ref:[n,s.context.popupRef,y],props:[Wj,m,rO(p),a],stateAttributesMapping:uL})}),t0e=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,o=j.useMemo(()=>({open:n,close:r}),[n,r]);return f.jsx(UF.Provider,{value:n,children:f.jsx(cge,{delay:o,timeoutMs:i,children:t.children})})},n0e=t0e,aO=Hbe,sO=Gbe,lO=j.forwardRef(function({className:t,side:n="top",sideOffset:r=6,...i},o){return f.jsx(Qbe,{children:f.jsx(Zbe,{side:n,sideOffset:r,className:"z-50",children:f.jsx(e0e,{ref:o,className:yt("max-w-xs rounded border border-line bg-popover px-2 py-1 text-[11px] leading-snug text-popover-foreground shadow-lg font-mono",t),...i})})})}),r0e=new Set(["get","set","delete","clear"]);function i0e(e){if(typeof e!="object"||e===null||!("operation"in e)||!("hit"in e)||!("key"in e))return!1;const{operation:t,hit:n,key:r}=e;return typeof t!="string"||!r0e.has(t)||n!==null&&typeof n!="boolean"?!1:typeof r=="string"}function Ic(e,t){return{label:e,variant:t,className:cS({variant:t})}}function o0e(e){if(!i0e(e))return null;const t=typeof e.tier=="string"?` ${e.tier.toUpperCase()}`:"";if(e.operation==="set")return Ic(`SET${t}`,"muted");if(e.operation==="delete")return Ic("DEL","muted");if(e.operation==="clear")return Ic("CLEAR","muted");if(e.hit===!0){const n=e.stale===!0;return Ic(`${n?"HIT·STALE":"HIT"}${t}`,n?"warn":"good")}return e.hit===!1?Ic(`MISS${t}`,"warn"):null}function WF({content:e}){const t=o0e(e);return t===null?null:f.jsx(Al,{variant:t.variant,children:t.label})}function a0e(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.component!="string")return null;const n=typeof t.props=="object"&&t.props!==null?t.props:{},r=typeof n.deferred=="object"&&n.deferred!==null?n.deferred:{};return{isPartial:t.isPartial===!0,versionMismatch:t.versionMismatch===!0,pageBytes:typeof t.pageBytes=="number"?t.pageBytes:0,deferred:r}}function Kp(e,t){return{label:e,variant:t,className:cS({variant:t})}}function qF(e){if(!Number.isFinite(e)||e<=0)return"0 B";if(e<1024)return`${e} B`;const t=e/1024;return t<1024?`${t.toFixed(1)} KB`:`${(t/1024).toFixed(1)} MB`}function s0e(e){const t=a0e(e);if(t===null)return[];const n=[];return t.versionMismatch&&n.push(Kp("409","bad")),t.isPartial&&n.push(Kp("partial","warn")),Object.keys(t.deferred).length>0&&n.push(Kp("deferred","brand")),n.push(Kp(qF(t.pageBytes),"muted")),n}function KF({content:e}){const t=s0e(e);return t.length===0?null:f.jsx("span",{className:"inline-flex items-center gap-1",children:t.map(n=>f.jsx(Al,{variant:n.variant,children:n.label},n.label))})}const l0e=["resilience","workflow","auth"];function GF(e){return l0e.includes(e)}function XF(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}function Sr(e){return typeof e=="string"&&e!==""?e:null}const u0e=new Set(["event","source","error","output","waits","status"]),c0e=new Set(["timeout","circuit-open","circuit-rejected","bulkhead-rejected","rate-limited","workflow-failed","workflow-compensation-failed","step-failed","signal-timed-out","mfa-failed","refresh-token-reused","magic-link-refused","session-touch-failed","denied"]);function YF(e,t){if(e==="resilience"){const n=Sr(t.source);return`${Sr(t.policy)??"unknown"}${n?` · ${n}`:""}`}if(e==="workflow"){const n=Sr(t.step);return`${Sr(t.workflow)??"unknown"}${n?` › ${n}`:""}`}if(t.source==="authorization"){const n=Sr(t.policy);return`${n?`${n}.${Sr(t.ability)??"?"}`:"no check declared"}${Sr(t.reason)?` (${String(t.reason)})`:""}`}return Sr(t.userId)??Sr(t.email)??""}function f0e(e,t){const n=XF(t),r=Sr(n.event)??e,i=YF(e,n);return i?`${r} ${i}`:r}function d0e(e){return typeof e=="number"&&e>1e12&&e<1e14?`${new Date(e).toISOString()} (${e})`:Array.isArray(e)?e.map(t=>String(t)).join(", "):String(e)}function p0e({type:e,content:t}){const n=XF(t),r=Sr(n.event)??e,i=c0e.has(r),o=Object.entries(n).filter(([l,u])=>!u0e.has(l)&&u!==null&&u!==void 0&&(typeof u!="object"||Array.isArray(u)&&u.every(c=>typeof c!="object"))),a=n.error,s=["output","status","waits"].filter(l=>n[l]!==void 0).map(l=>[l,n[l]]);return f.jsxs("div",{"data-testid":"official-event",children:[f.jsxs("h3",{className:"mb-3 flex flex-wrap items-center gap-2 font-mono text-sm text-foreground",children:[f.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase ${i?"text-bad":"text-brand"}`,children:r}),f.jsx("span",{children:YF(e,n)}),Sr(n.source)?f.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["@nestjs/",String(n.source)]}):null]}),o.length>0?f.jsx("dl",{className:"mb-4 grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1 text-xs",children:o.map(([l,u])=>f.jsxs("div",{className:"contents",children:[f.jsx("dt",{className:"text-muted-foreground",children:l}),f.jsx("dd",{className:"break-all font-mono text-foreground",children:d0e(u)})]},l))}):null,a!=null?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Error"}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-bad",children:JSON.stringify(a,null,2)})]}):null,s.map(([l,u])=>f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:l}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:JSON.stringify(u,null,2)})]},l))]})}const Mu="user:";function QF(e){for(const t of e)if(t.startsWith(Mu)&&t.length>Mu.length)return t;return null}function uO(e){return e.slice(Mu.length)}function JF(e){return`#/entries?tag=${encodeURIComponent(e)}`}const h0e=Mu;function m0e(e){return e.startsWith(Mu)&&e.length>Mu.length}function ug(e){const t=e.content;if(typeof t=="object"&&t!==null){const n=t;if(typeof n.uri=="string")return typeof n.method=="string"?`${n.method} ${n.uri}`:n.uri;if(typeof n.sql=="string")return n.sql;if(typeof n.queue=="string"&&typeof n.name=="string")return`${n.queue}:${n.name}`;if(e.type==="dump")return typeof n.label=="string"&&n.label.length>0?n.label:y0e(n.value);if(e.type==="event"&&typeof n.name=="string")return n.name;if(GF(e.type))return f0e(e.type,n);if(e.type==="mail"&&typeof n.status=="string"){const r=typeof n.subject=="string"?n.subject:"(no subject)";return`[${n.status}] ${r}`}if(e.type==="model"&&typeof n.action=="string"){const r=typeof n.entity=="string"?n.entity:"",i=n.id===null||n.id===void 0?"":`#${String(n.id)}`;return`${n.action} ${r}${i}`}if(e.type==="redis"&&typeof n.command=="string")return`${n.command} ${g0e(n.args)}`.trim();if(e.type==="inertia"&&typeof n.component=="string"){const r=typeof n.method=="string"?n.method:"",i=n.isPartial===!0?" (partial)":"";return`${r} → ${n.component}${i}`.trim()}if(e.type==="log"&&typeof n.message=="string")return`[${typeof n.level=="string"?n.level:"log"}] ${n.message}`;if(typeof n.message=="string")return n.message;if(typeof n.url=="string")return typeof n.method=="string"?`${n.method} ${n.url}`:n.url}return e.type}function g0e(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.map(n=>typeof n=="string"?n:String(n)).join(" ");return t.length>60?`${t.slice(0,60)}…`:t}function y0e(e){if(typeof e=="string")return e;let t;try{t=JSON.stringify(e)??String(e)}catch{t=String(e)}return t.length>80?`${t.slice(0,80)}…`:t}function ZF({entries:e,onSelect:t}){return f.jsxs(Ra,{className:"text-left",children:[f.jsx($a,{children:f.jsxs(en,{children:[f.jsx(Oe,{className:"px-0 py-2",children:"Time"}),f.jsx(Oe,{className:"px-0",children:"Type"}),f.jsx(Oe,{className:"px-0",children:"Summary"}),f.jsx(Oe,{className:"px-0",children:"Duration"}),f.jsx(Oe,{className:"px-0",children:"Tags"})]})}),f.jsx(Ma,{children:e.map(n=>{const r=QF(n.tags),i=n.tags.filter(o=>o!==r);return f.jsxs(en,{onClick:()=>t==null?void 0:t(n.id),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(t==null||t(n.id))},className:"cursor-pointer hover:bg-panel",children:[f.jsx(Ee,{className:"px-0 py-1.5 align-middle text-muted-foreground",children:new Date(n.createdAt).toLocaleTimeString()}),f.jsx(Ee,{className:"px-0 py-1.5 align-middle text-brand",children:n.type}),f.jsx(Ee,{className:"max-w-md truncate px-0 py-1.5 align-middle text-foreground",children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[n.type==="cache"?f.jsx(WF,{content:n.content}):null,n.type==="inertia"?f.jsx(KF,{content:n.content}):null,f.jsx("span",{className:"truncate",children:ug(n)})]})}),f.jsx(Ee,{className:"px-0 py-1.5 align-middle text-muted-foreground",children:n.durationMs!=null?`${n.durationMs}ms`:"—"}),f.jsx(Ee,{className:"px-0 py-1.5 align-middle text-muted-foreground",children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[n.traceId!==null&&f.jsxs("a",{href:`#/traces/${n.traceId}`,title:`View trace ${n.traceId}`,onClick:o=>o.stopPropagation(),className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-brand hover:bg-panel-2",children:["trace:",n.traceId.slice(0,6)]}),r!==null&&f.jsx("a",{href:JF(r),title:`View all activity for user ${uO(r)}`,onClick:o=>o.stopPropagation(),className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-good hover:bg-panel-2",children:r}),i.length>0&&f.jsx("span",{children:i.join(" ")})]})})]},n.id)})})]})}function v0e({batch:e,currentId:t,onSelect:n}){return f.jsx("ol",{className:"space-y-1",children:[...e].sort((r,i)=>r.sequence-i.sequence).map(r=>f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(r.id),className:`flex w-full justify-between gap-4 px-2 py-1 text-left text-xs ${r.id===t?"bg-panel-2 text-brand":"text-muted-foreground hover:bg-panel"}`,children:[f.jsxs("span",{children:[f.jsx("span",{className:"text-brand",children:r.type})," ",ug(r)]}),f.jsx("span",{className:"text-muted-foreground",children:r.durationMs!=null?`${r.durationMs}ms`:""})]})},r.id))})}const x0e={request:"bg-sky-500",query:"bg-amber-500",http_client:"bg-violet-500",job:"bg-emerald-500",cache:"bg-teal-500",exception:"bg-rose-500",event:"bg-indigo-500",log:"bg-zinc-500",mail:"bg-pink-500",redis:"bg-red-500"};function b0e(e){return x0e[e]??"bg-zinc-600"}function gh(e){return e<1?"<1ms":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function w0e(e){const t=[],n=r=>{for(const i of r)t.push(i),i.children.length>0&&n(i.children)};return n(e),t}function S0e({span:e,totalDurationMs:t,onSelect:n}){const r=t>0?t:1,i=Math.min(100,e.offsetMs/r*100),o=Math.max(.5,Math.min(100-i,e.durationMs/r*100));return f.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(e.id),"data-testid":"waterfall-row",className:"flex w-full items-center gap-2 rounded px-1 py-0.5 text-left text-[11px] hover:bg-panel-2",children:[f.jsxs("span",{className:"min-w-0 flex-shrink-0 truncate font-mono text-foreground",style:{width:"40%",paddingLeft:`${e.depth*12}px`},title:e.label,children:[f.jsx("span",{className:"mr-1 text-muted-foreground",children:e.type}),e.label]}),f.jsx("span",{className:"relative h-3 flex-1 rounded bg-panel",children:f.jsx("span",{className:`absolute top-0 h-3 rounded ${b0e(e.type)}`,style:{left:`${i}%`,width:`${o}%`},title:`${gh(e.offsetMs)} +${gh(e.durationMs)}`})}),f.jsx("span",{className:"w-16 flex-shrink-0 text-right tabular-nums text-muted-foreground",children:gh(e.durationMs)})]})}function j0e({waterfall:e,onSelect:t}){const n=w0e(e.spans);return n.length===0?f.jsx("p",{className:"text-muted-foreground",children:"No spans in this trace"}):f.jsxs("div",{className:"space-y-0.5",children:[f.jsxs("div",{className:"mb-1 flex items-center justify-between text-[10px] uppercase tracking-wide text-muted-foreground",children:[f.jsx("span",{children:"Span"}),f.jsxs("span",{children:["Total ",gh(e.totalDurationMs)]})]}),n.map(r=>f.jsx(S0e,{span:r,totalDurationMs:e.totalDurationMs,onSelect:t},r.id))]})}function O0e(e,t=.002){const n=e.totalMs>0?e.totalMs:1,r=[],i=(o,a,s,l,u)=>{if(l<t)return;r.push({key:u,node:o,depth:a,x:s,width:l});const c=[...o.children].sort((p,m)=>m.totalMs-p.totalMs);let d=s;for(let p=0;p<c.length;p++){const m=c[p];if(m===void 0)continue;const v=m.totalMs/n*1;i(m,a+1,d,v,`${u}.${p}`),d+=v}};return i(e,0,0,1,"0"),r}function P0e(e){return e.reduce((t,n)=>Math.max(t,n.depth),0)+1}function E0e(e){let t=0;for(let o=0;o<e.length;o++)t=t*31+e.charCodeAt(o)|0;const n=Math.abs(t)%46,r=55+Math.abs(t>>8)%25,i=45+Math.abs(t>>16)%12;return`hsl(${n}, ${r}%, ${i}%)`}function Sd(e){return e<1?"<1ms":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}const bx=18;function A0e({tree:e}){const[t,n]=j.useState("0"),r=j.useMemo(()=>O0e(e),[e]),i=P0e(r),o=r.find(d=>d.key===t)??r[0],a=(o==null?void 0:o.x)??0,s=(o==null?void 0:o.width)??1,l=(o==null?void 0:o.depth)??0;if(e.totalMs<=0||r.length===0)return f.jsx("div",{className:"flex h-24 items-center justify-center rounded-lg border border-line bg-panel/40 text-xs text-muted-foreground",children:"No samples — the capture was empty."});const u=r.filter(d=>d.key===t||d.key.startsWith(`${t}.`)),c=i-l;return f.jsxs("div",{children:[t!=="0"&&f.jsx("button",{type:"button",onClick:()=>n("0"),className:"mb-2 rounded border border-line px-2 py-0.5 text-[10px] text-foreground hover:bg-panel-2",children:"← Reset zoom"}),f.jsx("div",{"data-testid":"flamegraph",className:"relative w-full overflow-hidden rounded-lg border border-line bg-background",style:{height:c*bx+2},children:u.map(d=>{const p=(d.x-a)/s*100,m=d.width/s*100,v=(d.depth-l)*bx,h=(d.node.totalMs/e.totalMs*100).toFixed(1);return f.jsx("button",{type:"button",onClick:()=>n(d.key),title:`${d.node.name}${d.node.file?` — ${d.node.file}`:""}
|
|
155
|
-
total ${Sd(d.node.totalMs)} (${h}%) · self ${Sd(d.node.selfMs)}`,className:"absolute flex items-center overflow-hidden border border-line-soft/60 px-1 text-left text-[10px] leading-none text-black/80 hover:brightness-110",style:{left:`${p}%`,width:`${m}%`,top:v,height:bx-1,background:d.node.name==="(root)"?"var(--line)":E0e(d.node.name)},children:f.jsx("span",{className:"truncate",style:d.node.name==="(root)"?{color:"var(--text)"}:{},children:d.node.name})},d.key)})})]})}function e3(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}async function C0e(e){var r;const t=e3(e),n=(r=globalThis.navigator)==null?void 0:r.clipboard;if(!(n!=null&&n.writeText))return!1;try{return await n.writeText(t),!0}catch{return!1}}function cO(e,t){const n=e3(t),r=new Blob([n],{type:"application/json"}),i=URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=e,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(i)}const J_="rounded border border-line bg-panel px-2.5 py-1 text-[11px] text-foreground transition-colors hover:border-line hover:bg-panel-2 hover:text-foreground";function T0e({value:e,filename:t}){const[n,r]=j.useState(!1);async function i(){await C0e(e)&&(r(!0),setTimeout(()=>r(!1),1500))}return f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{type:"button",onClick:i,className:J_,children:n?"Copied":"Copy JSON"}),f.jsx("button",{type:"button",onClick:()=>cO(t,e),className:J_,children:"Download JSON"})]})}function _0e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.component=="string"?t.component:"",r=typeof t.method=="string"?t.method:"",i=typeof t.url=="string"?t.url:"",o=typeof t.statusCode=="number"?t.statusCode:null,a=t.isPartial===!0,s=t.versionMismatch===!0,l=typeof t.assetVersion=="string"?t.assetVersion:null,u=typeof t.clientVersion=="string"?t.clientVersion:null,c=t.encryptHistory===!0,d=t.clearHistory===!0,p=typeof t.pageBytes=="number"?t.pageBytes:0,m=t.ssr===!0,v=k0e(t.partial),h=N0e(t.props),g=R0e([...v.except,...h.excludedKeys]),y=[{label:"Shared",keys:h.sharedKeys,accent:"text-sky-300"},{label:"Final",keys:h.finalKeys,accent:"text-foreground"},{label:"Optional",keys:h.optionalKeys,accent:"text-indigo-300"},{label:"Once",keys:h.onceKeys,accent:"text-fuchsia-300"},{label:"Merge",keys:h.merge,accent:"text-teal-300",annotations:h.matchPropsOn},{label:"Deep-merge",keys:h.deepMerge,accent:"text-teal-300",annotations:h.matchPropsOn},{label:"Prepend",keys:h.prepend,accent:"text-teal-300",annotations:h.matchPropsOn},{label:"Rescued",keys:h.rescued,accent:"text-bad"}];return f.jsxs("div",{children:[f.jsxs("h3",{className:"mb-2 flex flex-wrap items-center gap-2 font-mono text-sm text-cyan-400",children:[r?f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase",children:r}):null,i?f.jsx("span",{className:"text-muted-foreground",children:i}):null,f.jsx("span",{className:"text-muted-foreground",children:"→"}),f.jsx("span",{className:"text-foreground",children:n}),o!==null?f.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] ${o===409?"text-bad":"text-muted-foreground"}`,children:o}):null,a?f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-warn",children:"partial"}):null,l?f.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:["asset ",l]}):null]}),s?f.jsxs("div",{className:"mb-4 rounded border border-bad tint-bad p-3 text-xs text-bad",children:["Version mismatch: client ",f.jsx("code",{className:"font-mono",children:u??"unknown"})," ≠ server ",f.jsx("code",{className:"font-mono",children:l??"unknown"})," → 409 forced full reload."]}):null,a?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Partial reload"}),f.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[f.jsx(Z_,{label:"Kept",keys:v.only,accent:"text-brand"}),f.jsx(Z_,{label:"Excluded",keys:g,accent:"text-bad"})]}),v.reset.length>0||v.resetOnce.length>0||v.exceptOnce.length>0?f.jsxs("div",{className:"mt-2 flex flex-wrap gap-3",children:[f.jsx(Gp,{label:"reset",keys:v.reset,accent:"text-warn"}),f.jsx(Gp,{label:"reset-once",keys:v.resetOnce,accent:"text-warn"}),f.jsx(Gp,{label:"except-once",keys:v.exceptOnce,accent:"text-warn"})]}):null]}):null,f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Props"}),f.jsx("div",{className:"flex flex-col gap-1.5",children:y.map(x=>j.createElement(Gp,{...x,key:x.label}))})]}),Object.keys(h.deferred).length>0?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Deferred"}),f.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(h.deferred).map(([x,b])=>f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[f.jsxs("span",{className:"font-mono text-[11px] text-violet-300",children:[x,":"]}),b.map(S=>f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:S},S))]},x))})]}):null,Object.keys(h.once).length>0?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Once cache"}),f.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(h.once).map(([x,b])=>f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-fuchsia-300",children:x}),f.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["→ ",b.prop]}),f.jsx("span",{className:"text-[10px] text-muted-foreground",children:b.expiresAt==null?"no expiry":`expires ${b.expiresAt}`})]},x))})]}):null,Object.keys(h.scroll).length>0?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Scroll"}),f.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(h.scroll).map(([x,b])=>f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-teal-300",children:x}),f.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["page «",b.pageName,"»"]}),f.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[wx(b.previousPage)," ← ",wx(b.currentPage)," →"," ",wx(b.nextPage)]}),b.reset?f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-warn",children:"reset"}):null]},x))})]}):null,f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Resolved props"}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(t.resolvedProps)})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[f.jsx(ek,{label:"encryptHistory",on:c}),f.jsx(ek,{label:"clearHistory",on:d}),f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:qF(p)}),f.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:["SSR: ",m?"yes":"no"]})]})]})}function k0e(e){const t=typeof e=="object"&&e!==null?e:{};return{only:qn(t.only),except:qn(t.except),reset:qn(t.reset),resetOnce:qn(t.resetOnce),exceptOnce:qn(t.exceptOnce)}}function N0e(e){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.deferred=="object"&&t.deferred!==null?t.deferred:{},r={};if(typeof t.matchPropsOn=="object"&&t.matchPropsOn!==null)for(const[a,s]of Object.entries(t.matchPropsOn))r[a]=Array.isArray(s)?s.join(", "):String(s);const i=typeof t.once=="object"&&t.once!==null?t.once:{},o=typeof t.scroll=="object"&&t.scroll!==null?t.scroll:{};return{sharedKeys:qn(t.sharedKeys),finalKeys:qn(t.finalKeys),deferred:n,merge:qn(t.merge),deepMerge:qn(t.deepMerge),prepend:qn(t.prepend),matchPropsOn:r,optionalKeys:qn(t.optionalKeys),onceKeys:qn(t.onceKeys),once:i,scroll:o,rescued:qn(t.rescued),excludedKeys:qn(t.excludedKeys)}}function qn(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function wx(e){return e==null?"∅":String(e)}function R0e(e){return[...new Set(e)]}function Gp({label:e,keys:t,accent:n,annotations:r}){return t.length===0?null:f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[f.jsx("span",{className:"w-20 shrink-0 text-[11px] text-muted-foreground",children:e}),t.map(i=>{const o=r==null?void 0:r[i];return f.jsxs("span",{className:`rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] ${n}`,children:[i,o?f.jsxs("span",{className:"text-muted-foreground",children:[" · ",o]}):null]},i)})]})}function Z_({label:e,keys:t,accent:n}){return f.jsxs("div",{className:"rounded bg-panel p-2",children:[f.jsx("div",{className:"mb-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),t.length>0?f.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(r=>f.jsx("span",{className:`font-mono text-[10px] ${n}`,children:r},r))}):f.jsx("span",{className:"text-[10px] text-muted-foreground",children:"—"})]})}function ek({label:e,on:t}){return f.jsxs("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] ${t?"text-brand":"text-muted-foreground"}`,children:[e,": ",t?"on":"off"]})}const $0e=50;function M0e({batch:e,requestId:t,onSelect:n}){const r=[...e].sort((s,l)=>s.sequence-l.sequence),i=r.reduce((s,l)=>l.durationMs!=null&&l.durationMs>s?l.durationMs:s,0),o=r.slice(0,$0e),a=r.length-o.length;return f.jsxs("div",{children:[f.jsx("ol",{className:"space-y-1",children:o.map(s=>f.jsx("li",{children:f.jsx(I0e,{entry:s,maxDuration:i,isRequest:s.id===t,onSelect:n})},s.id))}),a>0?f.jsxs("p",{className:"mt-1 px-2 text-[10px] text-muted-foreground",children:["+",a," more"]}):null]})}function I0e({entry:e,maxDuration:t,isRequest:n,onSelect:r}){const i=t>0&&e.durationMs!=null?e.durationMs/t:0,o=Math.max(0,Math.min(100,i*100));return f.jsxs("button",{type:"button",onClick:a=>{a.stopPropagation(),r==null||r(e.id)},className:`flex w-full items-center gap-2 rounded px-2 py-1 text-left text-xs ${n?"bg-panel-2 text-brand":"text-muted-foreground hover:bg-panel"}`,children:[f.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${lS(e.type)}`,"aria-hidden":!0}),f.jsx("span",{className:"w-40 shrink-0 truncate",title:ug(e),children:ug(e)}),f.jsx("span",{className:"h-2 flex-1 overflow-hidden rounded bg-panel",children:f.jsx("span",{className:"block h-full rounded bg-brand",style:{width:`${o}%`},"aria-hidden":!0})}),f.jsx("span",{className:"w-12 shrink-0 text-right tabular-nums text-muted-foreground",children:e.durationMs!=null?`${e.durationMs}ms`:"—"})]})}function D0e(e,t,n){return e?e.replaceAll("{traceId}",t).replaceAll("{spanId}",n):null}function L0e({entry:e,onSelect:t}){var o,a;const{data:n}=Ea(),r=e.type==="request"&&e.batch.length>1,i=QF(e.tags);return f.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[f.jsxs("section",{className:"col-span-2",children:[f.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-sm text-brand",children:[e.type,e.type==="cache"?f.jsx(WF,{content:e.content}):null,e.type==="inertia"?f.jsx(KF,{content:e.content}):null]}),f.jsx(T0e,{value:e,filename:`telescope-entry-${e.id}.json`})]}),r?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Timeline"}),f.jsx(M0e,{batch:e.batch,requestId:e.id,onSelect:t})]}):null,e.type==="dump"?f.jsx(B0e,{content:e.content}):e.type==="event"?f.jsx(z0e,{content:e.content}):e.type==="log"?f.jsx(Y0e,{content:e.content}):e.type==="model"?f.jsx(V0e,{content:e.content}):e.type==="redis"?f.jsx(W0e,{content:e.content}):e.type==="inertia"?f.jsx(_0e,{content:e.content}):e.type==="client_exception"?f.jsxs(f.Fragment,{children:[f.jsx(q0e,{content:e.content}),f.jsx(nk,{entryId:e.id,aiEnabled:((o=n==null?void 0:n.ai)==null?void 0:o.enabled)??!1})]}):e.type==="exception"?f.jsxs(f.Fragment,{children:[f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:JSON.stringify(e.content,null,2)}),f.jsx(nk,{entryId:e.id,aiEnabled:((a=n==null?void 0:n.ai)==null?void 0:a.enabled)??!1})]}):e.type==="request"?f.jsx(G0e,{content:e.content}):GF(e.type)?f.jsx(p0e,{type:e.type,content:e.content}):e.type==="query"?f.jsx(X0e,{entryId:e.id,content:e.content,explainEnabled:(n==null?void 0:n.explainEnabled)??!1}):f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:JSON.stringify(e.content,null,2)})]}),f.jsxs("aside",{children:[i!==null?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"User"}),f.jsx("div",{className:"font-mono text-[11px] text-foreground",children:uO(i)}),f.jsx("a",{href:JF(i),className:"mt-1 inline-block text-[11px] text-brand hover:underline",children:"View all activity for this user"})]}):null,e.traceId?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Trace"}),f.jsx(Q0e,{traceId:e.traceId,spanId:e.spanId,traceLink:(n==null?void 0:n.traceLink)??null})]}):null,f.jsx(F0e,{entry:e}),f.jsxs("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:["Batch (",e.batch.length,")"]}),f.jsx(v0e,{batch:e.batch,currentId:e.id,onSelect:t})]})]})}function F0e({entry:e}){const t=[];if(e.familyHash&&t.push({label:`All ${e.type} like this`,href:`#/entries/${encodeURIComponent(e.type)}?familyHash=${encodeURIComponent(e.familyHash)}`}),e.type!=="request"){const n=e.batch.find(r=>r.type==="request"&&r.id!==e.id);n&&t.push({label:"Originating request",href:`#/entries/view/${n.id}`})}return e.type==="job"&&t.push({label:"Open queue console",href:"#/queues"}),t.length===0?null:f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Related"}),f.jsx("div",{className:"flex flex-col gap-1",children:t.map(n=>f.jsxs("a",{href:n.href,className:"text-[11px] text-brand hover:underline",children:[n.label," →"]},`${n.href}:${n.label}`))})]})}function ni(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}function B0e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.label=="string"?t.label:null;return f.jsxs("div",{children:[n?f.jsx("h3",{className:"mb-2 font-mono text-sm text-fuchsia-400",children:n}):null,f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(t.value)})]})}function U0e(e){switch(e){case"error":return"text-bad";case"warn":return"text-warn";case"debug":case"verbose":return"text-muted-foreground";default:return"text-foreground"}}function z0e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.name=="string"?t.name:String(t.name??""),r=typeof t.listenerCount=="number"?t.listenerCount:null;return f.jsxs("div",{children:[f.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-mono text-sm text-indigo-400",children:[n,r!==null?f.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[r," listener",r===1?"":"s"]}):null]}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(t.payload)})]})}function H0e(e){switch(e){case"create":return"text-brand";case"update":return"text-warn";case"delete":return"text-bad";default:return"text-foreground"}}function V0e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.action=="string"?t.action:"update",r=typeof t.entity=="string"?t.entity:String(t.entity??""),i=t.id===null||t.id===void 0?null:String(t.id);return f.jsxs("div",{children:[f.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-mono text-sm text-lime-400",children:[f.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase ${H0e(n)}`,children:n}),f.jsx("span",{children:r}),i!==null?f.jsxs("span",{className:"text-muted-foreground",children:["#",i]}):null]}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(t.changes)})]})}function W0e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.command=="string"?t.command:String(t.command??""),r=typeof t.durationMs=="number"?t.durationMs:null;return f.jsxs("div",{children:[f.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-mono text-sm text-bad",children:[n,r!==null?f.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[r," ms"]}):null]}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(t.args)})]})}function tk({label:e,value:t}){return f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:e}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs leading-relaxed text-foreground",children:t})]})}function q0e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.name=="string"?t.name:null,r=typeof t.message=="string"?t.message:String(t.message??""),i=typeof t.url=="string"?t.url:null,o=typeof t.userAgent=="string"?t.userAgent:null,a=typeof t.release=="string"?t.release:null,s=typeof t.stack=="string"?t.stack:null,l=typeof t.componentStack=="string"?t.componentStack:null;return f.jsxs("div",{children:[f.jsxs("h3",{className:"mb-3 flex flex-wrap items-center gap-2 font-mono text-sm text-orange-400",children:[n?f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase",children:n}):null,f.jsx("span",{className:"text-foreground",children:r}),a?f.jsx("span",{className:"text-[10px] text-muted-foreground",children:a}):null]}),i?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"URL"}),f.jsx("div",{className:"break-all font-mono text-xs text-foreground",children:i})]}):null,o?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"User agent"}),f.jsx("div",{className:"break-all font-mono text-[11px] text-muted-foreground",children:o})]}):null,s?f.jsx(tk,{label:"Stack",value:s}):null,l?f.jsx(tk,{label:"Component stack",value:l}):null,t3(t.extra)?f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Extra"}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(t.extra)})]}):null]})}function t3(e){return e==null?!1:Array.isArray(e)?e.length>0:typeof e=="object"?Object.keys(e).length>0:!0}function K0e({headers:e}){const t=Object.entries(e);return f.jsxs("details",{className:"mb-4",children:[f.jsxs("summary",{className:"cursor-pointer text-xs uppercase tracking-wide text-muted-foreground",children:["Headers (",t.length,")"]}),f.jsx("dl",{className:"mt-2 grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 rounded bg-panel p-3 text-xs",children:t.map(([n,r])=>f.jsxs("div",{className:"contents",children:[f.jsx("dt",{className:"font-mono text-muted-foreground",children:n}),f.jsx("dd",{className:"break-all font-mono text-foreground",children:typeof r=="string"?r:ni(r)})]},n))})]})}function G0e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.headers=="object"&&t.headers!==null?t.headers:{},r=typeof t.method=="string"?t.method:String(t.method??""),i=typeof t.uri=="string"?t.uri:String(t.uri??""),o=typeof t.statusCode=="number"?t.statusCode:null,a=typeof t.ip=="string"?t.ip:null,s="user"in t&&t.user!==null&&t.user!==void 0;return f.jsxs("div",{children:[f.jsxs("h3",{className:"mb-3 flex items-center gap-2 font-mono text-sm text-brand",children:[f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase",children:r}),f.jsx("span",{className:"text-foreground",children:i}),o!==null?f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:o}):null,a?f.jsx("span",{className:"text-[10px] text-muted-foreground",children:a}):null]}),f.jsx(K0e,{headers:n}),f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Payload"}),t3(t.payload)?f.jsx("pre",{className:"mb-4 overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(t.payload)}):f.jsx("p",{className:"mb-4 text-xs text-muted-foreground",children:"No payload"}),f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"User"}),s?f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(t.user)}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"anonymous"})]})}function X0e({entryId:e,content:t,explainEnabled:n}){const r=typeof t=="object"&&t!==null?t:{},i=typeof r.sql=="string"?r.sql:String(r.sql??""),o=r.slow===!0,a=nH(),s=a.data;async function l(){try{await a.mutateAsync(e)}catch{}}return f.jsxs("div",{children:[f.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[f.jsxs("h3",{className:"flex items-center gap-2 font-mono text-sm text-sky-400",children:["query",o?f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-warn",children:"slow"}):null]}),n?f.jsx("button",{type:"button",onClick:l,disabled:a.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:a.isPending?"Explaining…":"Explain"}):null]}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:i}),Array.isArray(r.bindings)&&r.bindings.length>0?f.jsxs(f.Fragment,{children:[f.jsx("h3",{className:"mt-3 mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Bindings"}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(r.bindings)})]}):null,a.isPending?f.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Running EXPLAIN…"}):s===void 0?null:s.ok?f.jsxs(f.Fragment,{children:[f.jsx("h3",{className:"mt-3 mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:"Query plan"}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:ni(s.plan)})]}):f.jsx("p",{className:"mt-3 rounded bg-panel p-3 text-xs text-bad",children:s.message})]})}function Y0e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.level=="string"?t.level:"log",r=typeof t.message=="string"?t.message:String(t.message??""),i=typeof t.context=="string"?t.context:null;return f.jsxs("div",{children:[f.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm",children:[f.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] uppercase ${U0e(n)}`,children:n}),i?f.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:i}):null]}),f.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:r})]})}function Q0e({traceId:e,spanId:t,traceLink:n}){const r=D0e(n,e,t??"");return f.jsxs("div",{children:[r?f.jsx("a",{href:r,target:"_blank",rel:"noreferrer",className:"font-mono text-[11px] text-brand hover:underline",children:e}):f.jsx("div",{className:"font-mono text-[11px] text-foreground",children:e}),t?f.jsx("div",{className:"font-mono text-[10px] text-muted-foreground",children:t}):null,f.jsx("a",{href:`#/traces/${e}`,className:"mt-1 inline-block text-[11px] text-brand hover:underline",children:"View all in this trace"})]})}function nk({entryId:e,aiEnabled:t}){const n=rH(),r=oH(e,t),[i,o]=j.useState(null);if(!t)return null;async function a(p){try{const m=await n.mutateAsync({entryId:e,force:p});o(m)}catch{o({ok:!1,message:"Diagnosis request failed."})}}const s=r.data??null,l=i,u=l!==null?l.ok===!0&&l.cached:s!==null,c=l!==null?l.ok===!0:s!==null,d=l===null&&r.isLoading;return f.jsxs("div",{className:"mt-4 rounded border border-line p-3",children:[f.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[f.jsxs("h3",{className:"flex items-center gap-2 text-xs uppercase tracking-wide text-muted-foreground",children:["AI diagnosis",u?f.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] normal-case text-warn",children:"cached"}):null]}),f.jsx("div",{className:"flex items-center gap-2",children:d?null:c?f.jsx("button",{type:"button",onClick:()=>a(!0),disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Re-running…":"Re-run"}):f.jsx("button",{type:"button",onClick:()=>a(!1),disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-brand hover:border-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Diagnosing…":"Diagnose with AI"})})]}),n.isPending?f.jsx("p",{className:"text-xs text-muted-foreground",children:"Asking the model…"}):d?f.jsx("p",{className:"text-xs text-muted-foreground",children:"Checking for an existing diagnosis…"}):l!==null?l.ok?f.jsx(rk,{source:l.markdown}):f.jsx("p",{className:"rounded bg-panel p-3 text-xs text-bad",children:l.message}):s!==null?f.jsx(rk,{source:s.markdown}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"Get an AI-generated probable cause, where to look, and a suggested fix."})]})}function J0e(e){const t=[];let n=[],r=[],i=0;const o=()=>`block-${i++}`;function a(){n.length!==0&&(t.push({id:o(),kind:"paragraph",text:n.join(`
|
|
156
|
-
`)}),n=[])}function s(){r.length!==0&&(t.push({id:o(),kind:"bullets",items:r}),r=[])}for(const l of e.split(`
|
|
157
|
-
`)){const u=l.trimEnd();/^#{1,6}\s+/.test(u)?(a(),s(),t.push({id:o(),kind:"heading",text:u.replace(/^#{1,6}\s+/,"")})):/^[-*]\s+/.test(u)?(a(),r.push({id:o(),text:u.replace(/^[-*]\s+/,"")})):u.trim()===""?(a(),s()):(s(),n.push(u))}return a(),s(),t}function rk({source:e}){const t=J0e(e);return f.jsx("div",{className:"rounded bg-panel p-3",children:t.map(n=>n.kind==="heading"?f.jsx("h4",{className:"mt-3 mb-1 text-xs font-semibold text-brand",children:n.text},n.id):n.kind==="bullets"?f.jsx("ul",{className:"ml-4 list-disc text-xs leading-relaxed text-foreground",children:n.items.map(r=>f.jsx("li",{children:r.text},r.id))},n.id):f.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground",children:n.text},n.id))})}const Z0e=["id","type","createdAt","durationMs","tags","familyHash","traceId","content"];function ik(e){return/[",\r\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function ewe(e){if(e==null)return"";try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function twe(e){return[e.id,e.type,e.createdAt,e.durationMs===null?"":String(e.durationMs),e.tags.join("; "),e.familyHash??"",e.traceId??"",ewe(e.content)]}function nwe(e){const t=[Z0e.map(ik).join(",")];for(const n of e)t.push(twe(n).map(ik).join(","));return t.join(`\r
|
|
158
|
-
`)}function rwe(e,t){const n=new Blob([t],{type:"text/csv"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=e,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}const Kw=1e3,Gw=60*Kw,Xw=60*Gw,ok=24*Xw;function mf(e){return e>=ok?`${Math.round(e/ok)}d`:e>=Xw?`${Math.round(e/Xw)}h`:e>=Gw?`${Math.round(e/Gw)}m`:e>=Kw?`${Math.round(e/Kw)}s`:`${e}ms`}function iwe(e){for(const[t,n]of Object.entries(e))if(n<1)return`${t} sampled @ ${Math.round(n*100)}%`;return null}function owe(){const{data:e}=Ea();if(!e)return null;const t=iwe(e.sampling??{});return f.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",title:t??void 0,children:[f.jsx("span",{className:"uppercase tracking-wide text-muted-foreground",children:"retention:"}),e.retention?f.jsx("span",{className:"text-muted-foreground",children:mf(e.retention.afterMs)}):f.jsx("span",{className:"text-muted-foreground",children:"none"}),t?f.jsx("span",{"aria-label":t,className:"cursor-help rounded-full border border-line px-1 text-[9px] text-muted-foreground",children:"?"}):null]})}const n3={request:"#34d399",query:"#38bdf8",job:"#a78bfa",exception:"#f87171",http_client:"#fbbf24",mail:"#f472b6"},ak=["#71717a","#a1a1aa","#22d3ee","#c084fc","#fb923c","#4ade80"],sk=["#34d399","#fbbf24","#f87171","#38bdf8","#a78bfa"],r3="var(--accent)";function awe(e,t=0){const n=ak[t%ak.length];return n3[e]??n??"#71717a"}function Sx(e,t,n){if(n)return n;const r=sk[t%sk.length];return n3[e]??r??"#71717a"}function sc(e,t,n){const r={};return e.forEach((i,o)=>{r[i]={label:(n==null?void 0:n(i))??i,color:t(i,o)}}),r}function Gd(e){return{label:e.label,...e.series!==void 0?{series:e.series}:{},...e.id!==void 0?{id:e.id}:{},...e.value!==void 0?{value:e.value}:{}}}function swe(e){return typeof e=="object"&&e!==null}function i3(e){if(!swe(e))return;const t=e.activeLabel;return typeof t=="string"&&t.length>0?t:typeof t=="number"?String(t):void 0}function da({title:e,right:t,height:n=220,children:r}){return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[f.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),t]}),f.jsx("div",{style:{height:n},children:r})]})}function Xd({height:e}){return f.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",style:e===void 0?void 0:{height:e},children:"No data in window."})}const lwe=24;function Gs({title:e,data:t,right:n,color:r=r3,valueLabel:i="value",height:o=220,brush:a,valueFormatter:s,onSelect:l}){const u=j.useId(),c=o-64,d=j.useMemo(()=>sc(["value"],()=>r,()=>i),[r,i]),p=a??t.length>=lwe,m=l?{onClick:v=>{const h=i3(v);if(h===void 0)return;const g=t.find(y=>y.label===h);l(Gd({label:h,series:"value",value:g==null?void 0:g.value}))},className:"cursor-pointer"}:{};return f.jsx(da,{title:e,right:n,height:c,children:t.length===0?f.jsx(Xd,{height:c}):f.jsx($s,{config:d,children:f.jsxs(VD,{data:t,margin:{top:4,right:8,bottom:0,left:-16},...m,children:[f.jsx("defs",{children:f.jsxs("linearGradient",{id:u,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0%",stopColor:Zi("value"),stopOpacity:.35}),f.jsx("stop",{offset:"100%",stopColor:Zi("value"),stopOpacity:0})]})}),f.jsx(Vd,{vertical:!1}),f.jsx(co,{dataKey:"label",tickLine:!1,minTickGap:24}),f.jsx(fo,{tickLine:!1,width:40,allowDecimals:!1}),f.jsx(Cu,{cursor:{stroke:"var(--line)"},content:f.jsx(Tu,{...s?{valueFormatter:v=>s(v)}:{}})}),f.jsx(Oo,{type:"monotone",dataKey:"value",name:i,stroke:Zi("value"),strokeWidth:2,fill:`url(#${u})`,isAnimationActive:!1,dot:!1,activeDot:{r:3}}),p&&f.jsx(ma,{...KD,dataKey:"label"})]})})})}const uwe=24;function Xy({title:e,data:t,series:n,right:r,height:i=240,brush:o,onSelect:a,colors:s}){const l=i-64,u=j.useMemo(()=>sc(n,(h,g)=>(s==null?void 0:s[h])??awe(h,g)),[n,s]),{hidden:c,toggle:d,isHidden:p}=rme(),m=o??t.length>=uwe,v=a?{onClick:h=>{const g=i3(h);g!==void 0&&a(Gd({label:g}))},className:"cursor-pointer"}:{};return f.jsx(da,{title:e,right:r,height:l,children:t.length===0||n.length===0?f.jsx(Xd,{height:l}):f.jsx($s,{config:u,children:f.jsxs(VD,{data:t,margin:{top:4,right:8,bottom:0,left:-16},...v,children:[f.jsx(Vd,{vertical:!1}),f.jsx(co,{dataKey:"label",tickLine:!1,minTickGap:24}),f.jsx(fo,{tickLine:!1,width:40,allowDecimals:!1}),f.jsx(Cu,{cursor:{stroke:"var(--line)"},content:f.jsx(Tu,{})}),f.jsx(vw,{content:f.jsx(bw,{hidden:c,onToggle:d})}),n.map(h=>f.jsx(Oo,{type:"monotone",dataKey:h,name:h,stackId:"1",stroke:Zi(h),strokeWidth:1.5,fill:Zi(h),fillOpacity:.25,hide:p(h),isAnimationActive:!1},h)),m&&f.jsx(ma,{...KD,dataKey:"label"})]})})})}function cwe(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}function ws({title:e,data:t,right:n,color:r=r3,valueLabel:i="value",height:o=220,horizontal:a=!1,truncateLabel:s,valueFormatter:l,onSelect:u}){const c=o-64,d=j.useMemo(()=>sc(["value"],()=>r,()=>i),[r,i]);function p(g,y){const x=t[y];x&&(u==null||u(Gd({label:x.label,id:x.id,value:x.value})))}const m=s!==void 0?{tickFormatter:g=>cwe(g,s)}:{},h=u!==void 0?{onClick:p,cursor:"pointer"}:{};return f.jsx(da,{title:e,right:n,height:c,children:t.length===0?f.jsx(Xd,{height:c}):f.jsx($s,{config:d,children:f.jsxs(xj,{data:t,layout:a?"vertical":"horizontal",margin:{top:4,right:8,bottom:0,left:a?8:-16},children:[f.jsx(Vd,{horizontal:!a,vertical:a}),a?f.jsx(co,{type:"number",tickLine:!1,allowDecimals:!1}):f.jsx(co,{dataKey:"label",tickLine:!1,interval:0,...m}),a?f.jsx(fo,{type:"category",dataKey:"label",tickLine:!1,width:160,interval:0,...m}):f.jsx(fo,{tickLine:!1,width:40,allowDecimals:!1}),f.jsx(Cu,{cursor:{fill:"color-mix(in srgb, var(--text) 5%, transparent)"},content:f.jsx(Tu,{...l?{valueFormatter:g=>l(g)}:{}})}),f.jsx(jo,{dataKey:"value",name:i,fill:Zi("value"),radius:a?[0,3,3,0]:[3,3,0,0],isAnimationActive:!1,...h,children:t.map(g=>f.jsx(Ju,{fill:g.color??Zi("value")},g.id??g.label))})]})})})}const o3=["waiting","active","delayed","failed","completed","paused"],a3={waiting:"text-foreground",active:"text-brand",delayed:"text-warn",failed:"text-bad",completed:"text-good",paused:"text-muted-foreground"};function Ao(e){if(e==null)return"—";const t=Date.now()-e;if(t<0)return"just now";const n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}const fwe="1h";function dwe(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Yd(e){return((e==null?void 0:e.buckets)??[]).map(t=>({label:dwe(t.t),value:t.total}))}function Cn({label:e,value:t,accent:n="text-foreground"}){return f.jsxs("div",{className:"rounded-lg border border-line bg-panel/40 px-4 py-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),f.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${n}`,children:t})]})}function Qd({children:e}){return f.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:e})}function fO({children:e}){return f.jsx("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:e})}function pwe(e){return e.map(t=>({label:t.label!==""?t.label:t.familyHash.slice(0,12),value:t.p99,id:t.familyHash}))}function hwe(e){return[{label:"2xx",value:e["2xx"],color:"var(--good)"},{label:"3xx",value:e["3xx"],color:"#38bdf8"},{label:"4xx",value:e["4xx"],color:"var(--warn)"},{label:"5xx",value:e["5xx"],color:"var(--bad)"},{label:"other",value:e.other,color:"var(--muted)"}]}function mwe(e){return e.topKeys.map(t=>({label:t.key,value:t.count}))}function gwe({stats:e}){const t=e.latency,n=Ei();return f.jsxs(f.Fragment,{children:[f.jsxs(Qd,{children:[f.jsx(Cn,{label:"Total",value:e.total.toLocaleString()}),f.jsx(Cn,{label:"p50 ms",value:t?t.p50.toLocaleString():"—"}),f.jsx(Cn,{label:"p99 ms",value:t?t.p99.toLocaleString():"—",accent:"text-sky-400"}),f.jsx(Cn,{label:"Slow",value:t?t.slow.toLocaleString():"—",accent:t&&t.slow>0?"text-warn":"text-foreground"})]}),f.jsxs(fO,{children:[e.families?f.jsx(ws,{title:"Slowest query shapes (p99)",valueLabel:"p99 ms",data:pwe(e.families),horizontal:!0,truncateLabel:40,onSelect:r=>{r.id!==void 0&&n(`/entries/query?familyHash=${encodeURIComponent(r.id)}`)}}):null,f.jsx(Gs,{title:"Queries over time",valueLabel:"queries",data:Yd(e.overTime)})]})]})}function ywe(e){return Object.entries(e).map(([t,n])=>({label:t,value:n.hits})).sort((t,n)=>t.label.localeCompare(n.label))}function vwe({stats:e}){const t=e.cache,n=(t==null?void 0:t.byTier)??{},r=Object.keys(n),i=(t==null?void 0:t.staleHits)??0,o=(t==null?void 0:t.deletes)??0;return f.jsxs(f.Fragment,{children:[f.jsxs(Qd,{children:[f.jsx(Cn,{label:"Hit ratio",value:t?`${Math.round(t.hitRatio*100)}%`:"—",accent:"text-brand"}),f.jsx(Cn,{label:"Hits",value:t?t.hits.toLocaleString():"—"}),f.jsx(Cn,{label:"Misses",value:t?t.misses.toLocaleString():"—"}),f.jsx(Cn,{label:"Sets",value:t?t.sets.toLocaleString():"—"}),o>0?f.jsx(Cn,{label:"Deletes",value:o.toLocaleString()}):null,i>0?f.jsx(Cn,{label:"Stale hits",value:i.toLocaleString(),accent:"text-warn"}):null]}),f.jsxs(fO,{children:[t?f.jsx(ws,{title:"Hits vs misses",valueLabel:"count",data:[{label:"hits",value:t.hits,color:"var(--good)"},{label:"misses",value:t.misses,color:"var(--bad)"}]}):null,r.length>0?f.jsx(ws,{title:"Hits by tier",valueLabel:"hits",data:ywe(n)}):null,f.jsx(Gs,{title:"Cache over time",valueLabel:"ops",data:Yd(e.overTime)})]}),t?f.jsx(ws,{title:"Top keys",valueLabel:"count",data:mwe(t)}):null]})}function xwe({stats:e}){const t=e.latency,n=e.status,r=n?n["4xx"]+n["5xx"]:0,i=e.total>0?Math.round(r/e.total*100):0;return f.jsxs(f.Fragment,{children:[f.jsxs(Qd,{children:[f.jsx(Cn,{label:"Total",value:e.total.toLocaleString()}),f.jsx(Cn,{label:"p99 ms",value:t?t.p99.toLocaleString():"—",accent:"text-sky-400"}),f.jsx(Cn,{label:"Error %",value:`${i}%`,accent:r>0?"text-bad":"text-foreground"})]}),f.jsxs(fO,{children:[n?f.jsx(ws,{title:"Status codes",valueLabel:"count",data:hwe(n)}):null,f.jsx(Gs,{title:"Throughput",valueLabel:"requests",data:Yd(e.overTime)})]})]})}function bwe({values:e}){if(e.length===0)return null;const t=Math.max(1,...e);return f.jsx("div",{className:"flex h-6 items-end gap-px","aria-hidden":"true",children:e.map((n,r)=>f.jsx("div",{className:"w-1 rounded-sm bg-warn",style:{height:`${Math.max(2,Math.round(n/t*100))}%`}},r))})}function wwe({group:e}){const t=new Date(e.lastAt).getTime();return f.jsxs(qh,{to:`/entries/exception?familyHash=${encodeURIComponent(e.key)}`,className:"flex items-center gap-3 rounded-lg border border-line bg-panel/40 px-4 py-3 transition hover:border-line hover:bg-panel/70",children:[f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("p",{className:"truncate font-mono text-sm font-semibold text-bad",children:e.class}),f.jsx("p",{className:"truncate text-xs text-muted-foreground",children:e.message})]}),f.jsx(bwe,{values:e.overTime}),f.jsxs("div",{className:"shrink-0 text-right",children:[f.jsx("p",{className:"text-sm font-semibold tabular-nums text-foreground",children:e.count.toLocaleString()}),f.jsx("p",{className:"text-[10px] text-muted-foreground",children:Ao(Number.isNaN(t)?null:t)})]})]})}function Swe({stats:e}){const t=e.exceptions??[];return f.jsxs(f.Fragment,{children:[f.jsxs(Qd,{children:[f.jsx(Cn,{label:"Total",value:e.total.toLocaleString()}),f.jsx(Cn,{label:"Groups",value:t.length.toLocaleString(),accent:t.length>0?"text-warn":"text-foreground"})]}),t.length>0?f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Exception groups"}),t.map(n=>f.jsx(wwe,{group:n},n.key))]}):null,f.jsx(Gs,{title:"Exceptions over time",valueLabel:"exceptions",data:Yd(e.overTime)})]})}function jwe({stats:e}){return f.jsxs(f.Fragment,{children:[f.jsx(Qd,{children:f.jsx(Cn,{label:"Total",value:e.total.toLocaleString()})}),f.jsx(Gs,{title:"Over time",valueLabel:"entries",data:Yd(e.overTime)})]})}function Owe({stats:e}){return e.type==="query"?f.jsx(gwe,{stats:e}):e.type==="cache"?f.jsx(vwe,{stats:e}):e.type==="request"?f.jsx(xwe,{stats:e}):e.type==="exception"?f.jsx(Swe,{stats:e}):f.jsx(jwe,{stats:e})}function Pwe({type:e}){const{data:t}=dH(e,fwe);return t?f.jsxs("div",{className:"mb-4 space-y-4",children:[f.jsx(Owe,{stats:t}),t.truncated?f.jsx("p",{className:"text-[10px] text-muted-foreground",children:"sampled (window capped)"}):null]}):f.jsx("div",{className:"mb-4 h-24 animate-pulse rounded-lg border border-line bg-panel/20"})}const Ewe=["15m","1h","6h","24h"];function lc({value:e,onChange:t}){return f.jsxs(zw,{value:e,onValueChange:n=>{typeof n=="string"&&t(n)},children:[f.jsx(Vw,{"aria-label":"Time window",children:f.jsx(Hw,{})}),f.jsx(Ww,{align:"end",children:Ewe.map(n=>f.jsx(Xc,{value:n,children:n},n))})]})}const Awe=200,Cwe=48;function Twe(e,t){const[n,r]=j.useState(e);return j.useEffect(()=>{const i=setTimeout(()=>r(e),t);return()=>clearTimeout(i)},[e,t]),n}function lk({onSelect:e,prefix:t="",placeholder:n="Filter by tag…",ariaLabel:r="Filter by tag"}){var E;const[i,o]=j.useState(""),[a,s]=j.useState(!1),[l,u]=j.useState(0),c=j.useRef(null),d=j.useId(),p=i.trim(),m=`${t}${p}`,v=Twe(p,Awe),h=fH(t,v),g=((E=h.data)==null?void 0:E.pages.flat())??[],y=a&&g.length>0,x=j.useRef(null);function b(){const A=x.current;!A||!h.hasNextPage||h.isFetchingNextPage||A.scrollTop+A.clientHeight>=A.scrollHeight-Cwe&&h.fetchNextPage()}function S(A){return t!==""&&A.startsWith(t)?A.slice(t.length):A}j.useEffect(()=>{u(A=>A>=g.length?0:A)},[g.length]),j.useEffect(()=>{function A(C){var _;const T=C.target;T instanceof Node&&!((_=c.current)!=null&&_.contains(T))&&s(!1)}return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]);function w(A){e(A),o(S(A)),s(!1)}function O(A){if(A.key==="Escape"){s(!1);return}if(!y){A.key==="Enter"&&p!==""&&w(m);return}if(A.key==="ArrowDown")A.preventDefault(),u(C=>(C+1)%g.length);else if(A.key==="ArrowUp")A.preventDefault(),u(C=>(C-1+g.length)%g.length);else if(A.key==="Enter"){A.preventDefault();const C=g[l];C?w(C.tag):p!==""&&w(m)}}const P=y?`${d}-option-${l}`:void 0;return f.jsxs("div",{ref:c,className:"relative",children:[f.jsx($u,{type:"text",value:i,onChange:A=>{o(A.target.value),s(!0)},onFocus:()=>s(!0),onKeyDown:O,placeholder:n,"aria-label":r,role:"combobox","aria-expanded":y,"aria-controls":d,"aria-autocomplete":"list",...P?{"aria-activedescendant":P}:{}}),y?f.jsxs("div",{id:d,role:"listbox","aria-label":"Tag suggestions",tabIndex:-1,ref:x,onScroll:b,className:"absolute left-0 top-full z-10 mt-1 max-h-64 w-48 overflow-auto rounded border border-line bg-popover py-1 shadow-lg",children:[g.map((A,C)=>f.jsxs("div",{id:`${d}-option-${C}`,role:"option",tabIndex:-1,"aria-selected":C===l,onMouseDown:T=>{T.preventDefault(),w(A.tag)},onMouseEnter:()=>u(C),className:`flex cursor-pointer items-center justify-between gap-3 px-2 py-1 text-xs ${C===l?"bg-panel-2 text-foreground":"text-foreground"}`,children:[f.jsx("span",{className:"truncate",children:S(A.tag)}),f.jsx("span",{className:"shrink-0 text-muted-foreground",children:A.count})]},A.tag)),h.isFetchingNextPage?f.jsx("p",{className:"px-2 py-1 text-[10px] text-muted-foreground",children:"loading more…"}):null]}):null]})}function el({title:e,children:t}){return f.jsxs("section",{className:"mb-6",children:[f.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:e}),t]})}function _we({report:e,onSelectEntry:t,onSelectFamily:n,onSelectRoute:r,onSelectOutgoing:i}){return f.jsxs("div",{className:"text-xs",children:[e.truncated&&f.jsxs("p",{className:"mb-4 text-warn",children:["Scan truncated at ",e.scanned," entries — widen the window with care."]}),f.jsx(el,{title:"Entries by type",children:f.jsxs("div",{className:"flex flex-wrap gap-3",children:[Object.entries(e.counts).map(([o,a])=>f.jsxs("span",{className:"rounded bg-panel px-2 py-1",children:[f.jsx("span",{className:"text-brand",children:o})," ",f.jsx("span",{className:"text-foreground",children:a})]},o)),Object.keys(e.counts).length===0&&f.jsx("span",{className:"text-muted-foreground",children:"No entries in window."})]})}),f.jsx(el,{title:"Slowest",children:f.jsx("table",{className:"w-full text-left",children:f.jsxs("tbody",{children:[e.slowest.map(o=>f.jsxs("tr",{tabIndex:0,onClick:()=>t==null?void 0:t(o.id),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(t==null||t(o.id))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[f.jsx("td",{className:"py-1 text-brand",children:o.type}),f.jsx("td",{className:"max-w-md truncate text-foreground",children:o.label}),f.jsxs("td",{className:"text-right text-muted-foreground",children:[o.durationMs,"ms"]})]},o.id)),e.slowest.length===0&&f.jsx("tr",{children:f.jsx("td",{className:"py-1 text-muted-foreground",children:"—"})})]})})}),f.jsx(el,{title:"Top exceptions",children:f.jsx("table",{className:"w-full text-left",children:f.jsxs("tbody",{children:[e.topExceptions.map(o=>f.jsxs("tr",{className:"border-t border-line-soft",children:[f.jsx("td",{className:"py-1 text-bad",children:o.class}),f.jsx("td",{className:"max-w-md truncate text-foreground",children:o.message}),f.jsxs("td",{className:"text-right text-muted-foreground",children:["×",o.count]})]},o.familyHash)),e.topExceptions.length===0&&f.jsx("tr",{children:f.jsx("td",{className:"py-1 text-muted-foreground",children:"No exceptions 🎉"})})]})})}),f.jsx(el,{title:"N+1 query hotspots",children:f.jsx("table",{className:"w-full text-left",children:f.jsxs("tbody",{children:[e.nPlusOne.map(o=>f.jsxs("tr",{tabIndex:0,onClick:()=>n==null?void 0:n(o.familyHash),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(n==null||n(o.familyHash))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[f.jsxs("td",{className:"whitespace-nowrap py-1 text-warn",children:["×",o.perRequest,f.jsx("span",{className:"text-muted-foreground",children:" per request"})]}),f.jsx("td",{className:"max-w-md truncate text-foreground",children:o.sql}),f.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:[o.requests," requests · ",o.total," total"]})]},o.familyHash)),e.nPlusOne.length===0&&f.jsx("tr",{children:f.jsx("td",{className:"py-1 text-muted-foreground",children:"None detected"})})]})})}),f.jsx(el,{title:"Slow request hotspots",children:f.jsx("table",{className:"w-full text-left",children:f.jsxs("tbody",{children:[e.slowRoutes.map(o=>f.jsxs("tr",{tabIndex:0,onClick:()=>r==null?void 0:r(o.route),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(r==null||r(o.route))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[f.jsx("td",{className:"max-w-md truncate py-1 font-mono text-foreground",children:o.route}),f.jsxs("td",{className:"whitespace-nowrap text-right text-warn",children:[o.p99,"ms",f.jsx("span",{className:"text-muted-foreground",children:" p99"})]}),f.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:["×",o.count]})]},o.route)),e.slowRoutes.length===0&&f.jsx("tr",{children:f.jsx("td",{className:"py-1 text-muted-foreground",children:"No routes over the slow threshold"})})]})})}),f.jsx(el,{title:"Slow outgoing HTTP",children:f.jsx("table",{className:"w-full text-left",children:f.jsxs("tbody",{children:[e.slowOutgoing.map(o=>f.jsxs("tr",{tabIndex:0,onClick:()=>i==null?void 0:i(o.route),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(i==null||i(o.route))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[f.jsx("td",{className:"max-w-md truncate py-1 font-mono text-foreground",children:o.route}),f.jsxs("td",{className:"whitespace-nowrap text-right text-warn",children:[o.p99,"ms",f.jsx("span",{className:"text-muted-foreground",children:" p99"})]}),f.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:["×",o.count]})]},o.route)),e.slowOutgoing.length===0&&f.jsx("tr",{children:f.jsx("td",{className:"py-1 text-muted-foreground",children:"No outgoing calls over the slow threshold"})})]})})})]})}function uk(e){return e?`${Math.round(e.p95)}ms`:"—"}function kwe({report:e,sparkline:t}){return f.jsxs("table",{className:"w-full text-left text-xs",children:[f.jsx("thead",{className:"text-muted-foreground",children:f.jsxs("tr",{children:[f.jsx("th",{className:"py-2 font-normal",children:"Queue"}),f.jsx("th",{className:"font-normal",children:"Total"}),f.jsx("th",{className:"font-normal",children:"Failed"}),f.jsx("th",{className:"font-normal",children:"Fail %"}),f.jsx("th",{className:"font-normal",children:"Per min"}),f.jsx("th",{className:"font-normal",children:"Runtime p95"}),f.jsx("th",{className:"font-normal",children:"Wait p95"}),t&&f.jsx("th",{className:"font-normal",children:"Trend"})]})}),f.jsxs("tbody",{children:[e.queues.map(n=>f.jsxs("tr",{className:"border-t border-line-soft",children:[f.jsx("td",{className:"py-1.5 text-brand",children:n.queue}),f.jsx("td",{className:"text-foreground",children:n.total}),f.jsx("td",{className:"text-foreground",children:n.failed}),f.jsxs("td",{className:n.failureRate>0?"text-bad":"text-muted-foreground",children:[(n.failureRate*100).toFixed(1),"%"]}),f.jsx("td",{className:"text-muted-foreground",children:n.throughputPerMinute.toFixed(1)}),f.jsx("td",{className:"text-muted-foreground",children:uk(n.runtimeMs)}),f.jsx("td",{className:"text-muted-foreground",children:uk(n.waitMs)}),t&&f.jsx("td",{className:"text-muted-foreground",children:t(n.queue)})]},n.queue)),e.queues.length===0&&f.jsx("tr",{children:f.jsx("td",{className:"py-2 text-muted-foreground",colSpan:t?8:7,children:"No queue activity in window."})})]})]})}function Nwe(e,t,n){if(e.length===0)return"";const r=Math.max(...e,1),i=e.length>1?t/(e.length-1):0;return e.map((o,a)=>{const s=a*i,l=n-o/r*n;return`${s.toFixed(1)},${l.toFixed(1)}`}).join(" ")}function yh({values:e,width:t=160,height:n=36}){const r=Nwe(e,t,n),i=r?`0,${n} ${r} ${t},${n}`:"";return f.jsxs("svg",{width:t,height:n,viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"none",role:"img","aria-label":"throughput",children:[i&&f.jsx("polygon",{points:i,className:"fill-accent opacity-10"}),r&&f.jsx("polyline",{points:r,className:"fill-none stroke-accent",strokeWidth:1.5})]})}const ck={request:"fill-emerald-400",query:"fill-sky-400",job:"fill-violet-400",exception:"fill-red-400",http_client:"fill-amber-400",mail:"fill-pink-400"};function dO(e){const t=new Set;for(const i of e)for(const o of Object.keys(i.byType))t.add(o);const n=Object.keys(ck).filter(i=>t.has(i)),r=[...t].filter(i=>!(i in ck)).sort();return[...n,...r]}function Rwe({queue:e,window:t}){const{data:n}=sS({window:t,tag:`queue:${e}`,buckets:24});return f.jsx(yh,{values:((n==null?void 0:n.buckets)??[]).map(r=>r.total),width:120,height:20})}function $we({state:e,value:t}){const n=e==="failed"&&t>0;return f.jsxs("span",{className:`flex items-baseline gap-1 rounded px-1.5 py-0.5 ${n?"tint-bad":"bg-panel-2/60"}`,title:`${t} ${e}`,children:[f.jsx("span",{className:"text-[9px] uppercase tracking-wide text-muted-foreground",children:e.slice(0,4)}),f.jsx("span",{className:`tabular-nums ${t>0?a3[e]:"text-muted-foreground"}`,children:t})]})}function Mwe({summary:e,active:t,onSelect:n}){return f.jsxs("button",{type:"button",onClick:()=>n(e.driver,e.queue),className:`w-full rounded-lg border px-3 py-2.5 text-left transition-colors ${t?"border-brand bg-panel-2":"border-line bg-panel/40 hover:border-line hover:bg-panel"}`,children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:e.queue}),e.isPaused&&f.jsx("span",{className:"shrink-0 rounded bg-violet-500/15 px-1.5 py-0.5 text-[9px] uppercase tracking-wide text-violet-300",children:"paused"})]}),f.jsx("div",{className:"mt-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:e.driver}),f.jsx("div",{className:"mt-2 flex flex-wrap gap-1 text-[10px]",children:o3.map(r=>f.jsx($we,{state:r,value:e.counts[r]},r))})]})}function Iwe({selected:e,onSelect:t}){const{data:n,isLoading:r,isError:i}=F$();if(r)return f.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading queues…"});if(i)return f.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load queues."});const o=(n==null?void 0:n.queues)??[];return o.length===0?f.jsx("div",{className:"rounded-lg border border-dashed border-line px-3 py-6 text-center text-xs text-muted-foreground",children:"No live queues detected."}):f.jsx("div",{className:"space-y-2",children:o.map(a=>f.jsx(Mwe,{summary:a,active:(e==null?void 0:e.driver)===a.driver&&(e==null?void 0:e.queue)===a.queue,onSelect:t},`${a.driver}:${a.queue}`))})}function Dwe({counts:e,state:t,onState:n}){return f.jsx(Ibe,{value:t,onValueChange:r=>{typeof r=="string"&&n(r)},children:f.jsx(Dbe,{children:o3.map(r=>{const i=r===t,o=(e==null?void 0:e[r])??0;return f.jsxs(Lbe,{value:r,children:[f.jsx("span",{className:"capitalize",children:r}),f.jsx("span",{className:`tabular-nums text-[11px] ${i?a3[r]:"text-muted-foreground"}`,children:o})]},r)})})})}const fk=25;function Lwe(e){return e.maxAttempts!=null?`${e.attemptsMade}/${e.maxAttempts}`:`${e.attemptsMade}`}function Fwe({job:e,onOpen:t}){return f.jsxs("tr",{onClick:()=>t(e.id),onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&t(e.id)},className:"cursor-pointer border-t border-line-soft align-top hover:bg-panel",children:[f.jsx("td",{className:"py-1.5 pr-2 font-mono text-[11px] text-muted-foreground",children:e.id}),f.jsx("td",{className:"pr-2 text-emerald-400",children:e.name||"—"}),f.jsx("td",{className:"pr-2 tabular-nums text-muted-foreground",children:Lwe(e)}),f.jsx("td",{className:"pr-2 whitespace-nowrap text-muted-foreground",children:Ao(e.timestamp)}),f.jsx("td",{className:"max-w-xs truncate pr-2 text-muted-foreground",children:e.failedReason?f.jsx("span",{className:"text-bad",children:e.failedReason}):f.jsx("span",{className:"text-muted-foreground",children:"open to inspect payload →"})})]})}function Bwe(e,t){const n=new Map;for(const r of e)n.set(r.id,r);for(const r of t)n.set(r.id,r);return[...n.values()]}function Uwe({driver:e,queue:t,state:n,onOpen:r}){const[i,o]=j.useState(void 0),[a,s]=j.useState([]),l=`${e}\0${t}\0${n}`,u=j.useRef(l);u.current!==l&&(u.current=l,i!==void 0&&o(void 0),a.length>0&&s([]));const{data:c,isLoading:d,isError:p}=Yz(e,t,n,i!==void 0?{cursor:i,limit:fk}:{limit:fk}),m=(c==null?void 0:c.nextCursor)??null,v=c==null?void 0:c.jobs;return j.useEffect(()=>{v&&s(i===void 0?h=>zwe(h,v):h=>Bwe(h,v))},[v,i]),d&&a.length===0?f.jsx("p",{className:"px-1 py-3 text-xs text-muted-foreground",children:"Loading jobs…"}):p&&a.length===0?f.jsx("p",{className:"px-1 py-3 text-xs text-bad",children:"Failed to load jobs."}):a.length===0?f.jsxs("div",{className:"rounded-lg border border-dashed border-line px-3 py-8 text-center text-xs text-muted-foreground",children:["No ",f.jsx("span",{className:"text-muted-foreground",children:n})," jobs."]}):f.jsxs("div",{className:"space-y-3",children:[f.jsxs("table",{className:"w-full text-left text-xs",children:[f.jsx("thead",{className:"text-muted-foreground",children:f.jsxs("tr",{children:[f.jsx("th",{className:"py-1.5 pr-2 font-normal",children:"ID"}),f.jsx("th",{className:"pr-2 font-normal",children:"Name"}),f.jsx("th",{className:"pr-2 font-normal",children:"Attempts"}),f.jsx("th",{className:"pr-2 font-normal",children:"Age"}),f.jsx("th",{className:"pr-2 font-normal",children:"Reason / Payload"})]})}),f.jsx("tbody",{children:a.map(h=>f.jsx(Fwe,{job:h,onOpen:r},h.id))})]}),m!=null&&f.jsx("button",{type:"button",onClick:()=>o(m),className:"w-full rounded-md border border-line py-1.5 text-[11px] text-muted-foreground transition-colors hover:border-line hover:text-foreground",children:"Load more"})]})}function zwe(e,t){const n=new Set(t.map(i=>i.id)),r=e.filter(i=>!n.has(i.id));return[...t,...r]}function Yy(e,t,n){return e!=null&&e.mutationsEnabled?(e.actionsByDriver[t]??[]).includes(n):!1}function Hwe(e,t){switch(e){case"promote":return t==="delayed";case"retry":return t==="failed"||t==="completed";case"remove":return!0;default:return!1}}function pO(e){return e instanceof Error&&/\b403\b/.test(e.message)}const Vwe={retry:"good",promote:"warn",remove:"bad"};function Wwe({driver:e,queue:t,id:n,action:r,onDone:i}){const o=Jz(),[a,s]=j.useState(!1),l=o.isPending,u=pO(o.error);async function c(){s(!1);try{await o.mutateAsync({driver:e,queue:t,id:n,action:r}),i==null||i()}catch{}}return r==="remove"&&a?f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(Qe,{variant:"bad",disabled:l,onClick:c,children:l?"Removing…":"Confirm remove"}),f.jsx(Qe,{variant:"ghost",onClick:()=>s(!1),children:"Cancel"})]}):f.jsxs("span",{className:"inline-flex flex-col",children:[f.jsx(Qe,{variant:Vwe[r],disabled:l,onClick:r==="remove"?()=>s(!0):c,className:"capitalize",children:l?`${r}…`:r}),u&&f.jsx("span",{className:"mt-0.5 text-[10px] text-bad",children:"Not authorized"})]})}function qwe({capabilities:e,driver:t,queue:n,id:r,state:i,onDone:o}){const a=["retry","promote","remove"].filter(s=>Yy(e,t,s)&&Hwe(s,i));return a.length===0?null:f.jsx("div",{className:"flex flex-wrap items-start gap-1.5",children:a.map(s=>f.jsx(Wwe,{driver:t,queue:n,id:r,action:s,onDone:o},s))})}function Kwe({capabilities:e,driver:t,queue:n}){const r=B$();if(!Yy(e,t,"retry-all"))return null;const i=pO(r.error);async function o(){try{await r.mutateAsync({driver:t,queue:n,action:"retry-all",state:"failed"})}catch{}}return f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx(Qe,{variant:"good",disabled:r.isPending,onClick:o,children:r.isPending?"Retrying all…":"Retry all failed"}),i&&f.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"})]})}function Gwe({capabilities:e,driver:t,queue:n}){const r=B$(),[i,o]=j.useState(!1);if(!Yy(e,t,"redrive"))return null;const a=pO(r.error);async function s(){o(!1);try{await r.mutateAsync({driver:t,queue:n,action:"redrive"})}catch{}}return i?f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(Qe,{variant:"warn",disabled:r.isPending,onClick:s,children:r.isPending?"Redriving…":"Confirm redrive"}),f.jsx(Qe,{variant:"ghost",onClick:()=>o(!1),children:"Cancel"})]}):f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx(Qe,{variant:"warn",disabled:r.isPending,onClick:()=>o(!0),children:"Redrive DLQ"}),a&&f.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"})]})}function Xwe(e){if(e===void 0)return"—";try{return JSON.stringify(e,null,2)}catch{return String(e)}}function jx({label:e,value:t}){return f.jsxs("section",{children:[f.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),f.jsx("pre",{className:"overflow-auto rounded bg-background p-2.5 text-[11px] leading-relaxed text-foreground ring-1 ring-line",children:Xwe(t)})]})}function Dc({label:e,value:t}){return f.jsxs("div",{className:"flex items-baseline justify-between gap-3 border-t border-line-soft py-1 first:border-0",children:[f.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),f.jsx("span",{className:"tabular-nums text-foreground",children:t})]})}function Ox(e){return e==null?"—":`${new Date(e).toLocaleString()} (${Ao(e)})`}function Ywe({detail:e,capabilities:t,driver:n,queue:r,state:i,onClose:o}){return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("header",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm font-medium text-brand",children:e.name||"job"}),f.jsx(Al,{className:"capitalize",children:e.state})]}),f.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:e.id})]}),f.jsx(qwe,{capabilities:t,driver:n,queue:r,id:e.id,state:i,onDone:o}),f.jsxs("div",{className:"rounded-lg border border-line bg-panel px-3 py-2 text-xs",children:[f.jsx(Dc,{label:"Attempts",value:e.maxAttempts!=null?`${e.attemptsMade}/${e.maxAttempts}`:`${e.attemptsMade}`}),f.jsx(Dc,{label:"Progress",value:e.progress!=null?`${e.progress}`:"—"}),f.jsx(Dc,{label:"Created",value:Ox(e.timestamp)}),f.jsx(Dc,{label:"Processed",value:Ox(e.processedOn)}),f.jsx(Dc,{label:"Finished",value:Ox(e.finishedOn)})]}),e.failedReason&&f.jsxs("section",{children:[f.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-wide text-bad",children:"Failed reason"}),f.jsx("p",{className:"tint-bad rounded border px-2.5 py-2 text-[11px]",children:e.failedReason})]}),f.jsx(jx,{label:"Payload (data)",value:e.data}),f.jsx(jx,{label:"Options (opts)",value:e.opts}),e.returnValue!==void 0&&e.returnValue!==null&&f.jsx(jx,{label:"Return value",value:e.returnValue}),e.stacktrace&&e.stacktrace.length>0&&f.jsxs("section",{children:[f.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Stacktrace"}),f.jsx("pre",{className:"overflow-auto rounded bg-background p-2.5 text-[11px] leading-relaxed text-bad ring-1 ring-line",children:e.stacktrace.join(`
|
|
159
|
-
`)})]})]})}function Qwe({driver:e,queue:t,jobId:n,state:r,capabilities:i,onClose:o}){const{data:a,isLoading:s,isError:l}=Qz(e,t,n);return f.jsx(Qj,{open:!0,onOpenChange:u=>{u||o()},children:f.jsxs(Jj,{placement:"right",className:"flex flex-col",children:[f.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2.5",children:[f.jsx(mF,{className:"text-xs font-normal uppercase tracking-wide text-muted-foreground",children:"Job detail"}),f.jsx(Qe,{variant:"ghost",size:"xs","aria-label":"Close job detail",onClick:o,children:"✕"})]}),f.jsx("div",{className:"flex-1 overflow-auto p-4",children:s?f.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading job…"}):l?f.jsx("p",{className:"text-xs text-bad",children:"Failed to load job."}):a?f.jsx(Ywe,{detail:a,capabilities:i,driver:e,queue:t,state:r,onClose:o}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"Job not found (it may have been removed)."})})]})})}function Jwe(e){return e instanceof Error&&/\b403\b/.test(e.message)}function Zwe(e){const t=e.trim();if(t==="")return{ok:!1,message:"Payload is required."};try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,message:"Payload must be valid JSON."}}}function e1e({capabilities:e,driver:t,queue:n}){const r=Zz(),[i,o]=j.useState(""),[a,s]=j.useState(""),[l,u]=j.useState(null),[c,d]=j.useState(void 0);if(!Yy(e,t,"enqueue"))return null;const p=Jwe(r.error);async function m(v){v.preventDefault(),d(void 0);const h=Zwe(a);if(!h.ok){u(h.message);return}u(null);try{const g=await r.mutateAsync({driver:t,queue:n,...i.trim()!==""?{name:i.trim()}:{},payload:h.value});d(g.id),s("")}catch{}}return f.jsxs("form",{onSubmit:m,className:"space-y-2 rounded-lg border border-line p-3",children:[f.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Send message"}),f.jsx("input",{type:"text",value:i,onChange:v=>o(v.target.value),placeholder:"Job name (optional)","aria-label":"Job name",className:"w-full rounded border border-line bg-background px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground"}),f.jsx("textarea",{value:a,onChange:v=>s(v.target.value),placeholder:'{"to": "a@b.c"}',"aria-label":"Payload (JSON)",rows:4,className:"w-full rounded border border-line bg-background px-2 py-1 font-mono text-xs text-foreground placeholder:text-muted-foreground"}),l&&f.jsx("p",{className:"text-[10px] text-bad",children:l}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Qe,{type:"submit",variant:"good",disabled:r.isPending,children:r.isPending?"Sending…":"Send message"}),p&&f.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"}),c!==void 0&&!p&&f.jsx("span",{className:"text-[10px] text-good",children:c?`Enqueued job ${c}`:"Message enqueued"})]})]})}function t1e(){const[e,t]=j.useState(null);return j.useEffect(()=>{const n=r=>{t(r.detail)};return window.addEventListener(Bb,n),()=>window.removeEventListener(Bb,n)},[]),e}function n1e({denial:e}){const t=e.reason==="unauthenticated";return f.jsx("main",{role:"alert",className:"flex min-h-screen items-center justify-center bg-background p-6 text-foreground",children:f.jsxs("div",{className:"max-w-md rounded-lg border border-line bg-panel/40 p-6 text-center",children:[f.jsx("h1",{className:"text-lg font-semibold",children:t?"Sign in required":"Access denied"}),f.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:t?"Sign in to the app to open Telescope, then reload this page.":"Your account is not allowed to open Telescope."})]})})}function r1e({children:e}){const t=t1e();return t?f.jsx(n1e,{denial:t}):f.jsx(f.Fragment,{children:e})}const s3={workflow:f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"3",y:"4",width:"6",height:"6",rx:"1.5"}),f.jsx("rect",{x:"15",y:"14",width:"6",height:"6",rx:"1.5"}),f.jsx("path",{d:"M9 7h4a2 2 0 0 1 2 2v5"})]}),telescope:f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"m4 14 13-6 2 4-13 6z"}),f.jsx("path",{d:"m10 16 2 5M14 15l-2 6M17 8l1-3 3 1-1 3"})]}),media:f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),f.jsx("circle",{cx:"9",cy:"10",r:"2"}),f.jsx("path",{d:"m21 16-5-5-9 9"})]}),payments:f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"2.5",y:"5",width:"19",height:"14",rx:"2"}),f.jsx("path",{d:"M2.5 10h19M6.5 15h4"})]}),agent:f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"5",y:"8",width:"14",height:"11",rx:"3"}),f.jsx("path",{d:"M12 8V4M9 13h.01M15 13h.01M9.5 16.5h5"}),f.jsx("circle",{cx:"12",cy:"3.5",r:"0.5"})]}),identity:f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M12 3 4.5 6v5.5c0 4.5 3.2 8.2 7.5 9.5 4.3-1.3 7.5-5 7.5-9.5V6z"}),f.jsx("circle",{cx:"12",cy:"10",r:"2.5"}),f.jsx("path",{d:"M8 16a4.5 4.5 0 0 1 8 0"})]}),generic:f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),f.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),f.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),f.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})};function hO(e){return typeof e=="string"&&Object.hasOwn(s3,e)?e:"generic"}function dk({icon:e,className:t}){const n=hO(e);return f.jsx("svg",{viewBox:"0 0 24 24",width:16,height:16,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true","data-icon":n,children:s3[n]})}function mO(e){return typeof e=="string"&&e.startsWith("/")&&e[1]!=="/"&&e[1]!=="\\"&&!Array.from(e).some(t=>t.charCodeAt(0)<32)}function i1e(e){if(typeof document>"u")return;const t=document.getElementById(e);if(t!==null)try{const n=JSON.parse(t.textContent??""),r=n==null?void 0:n.switcher;return!r||!mO(r.endpoint)||typeof r.others!="number"||r.others<=0?void 0:{endpoint:r.endpoint,others:r.others}}catch{return}}function o1e(e){return Array.isArray(e)?e.flatMap(t=>{if(typeof t!="object"||t===null)return[];const n=t;return typeof n.id!="string"||typeof n.title!="string"||!mO(n.href)?[]:[{id:n.id,title:n.title,icon:hO(n.icon),href:n.href}]}):[]}let Lc;function a1e(e){if((Lc==null?void 0:Lc.endpoint)===e.endpoint)return Lc.result;const t=fetch(e.endpoint,{headers:{accept:"application/json"},credentials:"same-origin"}).then(async n=>{var r;return n.ok?o1e((r=await n.json())==null?void 0:r.consoles):[]}).catch(()=>[]);return Lc={endpoint:e.endpoint,result:t},t}function s1e(e){const t=typeof e=="object"&&e!==null?e:{};return{groups:(Array.isArray(t.results)?t.results:[]).flatMap(r=>{if(typeof r!="object"||r===null)return[];const i=r;if(typeof i.id!="string"||typeof i.title!="string"||!Array.isArray(i.hits))return[];const o=i.hits.flatMap(a=>{if(typeof a!="object"||a===null)return[];const s=a;return typeof s.title!="string"||!mO(s.href)?[]:[{title:s.title,...typeof s.subtitle=="string"?{subtitle:s.subtitle}:{},href:s.href}]});return o.length>0?[{id:i.id,title:i.title,icon:hO(i.icon),hits:o}]:[]}),partial:t.partial===!0}}async function l1e(e,t,n){try{const r=await fetch(`${e}/search?q=${encodeURIComponent(t)}`,{headers:{accept:"application/json"},credentials:"same-origin",...n?{signal:n}:{}});return r.ok?s1e(await r.json()):{groups:[],partial:!1}}catch{return{groups:[],partial:!1}}}function u1e({brand:e,current:t,config:n,onSearch:r}){const[i,o]=j.useState([]),[a,s]=j.useState(!1),l=j.useRef(null),u=j.useRef(null),c=j.useRef(null);j.useEffect(()=>{if(!n)return;let g=!0;return a1e(n).then(y=>{g&&o(y)}),()=>{g=!1}},[n]);const d=j.useCallback(g=>{var y;s(!1),g&&((y=u.current)==null||y.focus())},[]);j.useEffect(()=>{if(!a)return;const g=y=>{l.current&&!l.current.contains(y.target)&&d(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[a,d]);const p=()=>{var g;return Array.from(((g=c.current)==null?void 0:g.querySelectorAll('[role="menuitem"]'))??[])},m=g=>{var x;const y=p();y.length>0&&((x=y[(g+y.length)%y.length])==null||x.focus())};if(j.useEffect(()=>{var g,y;a&&((y=(g=c.current)==null?void 0:g.querySelector('[role="menuitem"]'))==null||y.focus())},[a]),!n||i.length===0)return f.jsx(f.Fragment,{children:e});const v=g=>{const y=p().indexOf(document.activeElement),b={ArrowDown:()=>m(y+1),ArrowUp:()=>m(y-1),Home:()=>m(0),End:()=>m(-1),Escape:()=>d(!0)}[g.key];b?(g.preventDefault(),b()):g.key==="Tab"&&d(!1)},h="flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm text-foreground outline-none focus:bg-line-soft";return f.jsxs("div",{ref:l,className:"relative","data-aviary-switcher":"",children:[f.jsxs("button",{ref:u,type:"button","aria-haspopup":"menu","aria-expanded":a,"aria-label":`${t.title}: switch console`,className:"flex items-center gap-1.5 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>s(g=>!g),onKeyDown:g=>{(g.key==="ArrowDown"||g.key==="Enter"||g.key===" ")&&(g.preventDefault(),s(!0))},children:[e,f.jsx("svg",{viewBox:"0 0 24 24",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:2,className:"text-muted-foreground","aria-hidden":"true",children:f.jsx("path",{d:"m6 9 6 6 6-6"})})]}),a&&f.jsxs("div",{ref:c,role:"menu","aria-label":"Consoles",tabIndex:-1,onKeyDown:v,className:"absolute left-0 top-full z-50 mt-2 w-52 rounded-lg border border-line bg-popover p-1 text-popover-foreground shadow-lg",children:[f.jsxs("div",{role:"menuitem","aria-current":"page","aria-disabled":"true",tabIndex:-1,className:h,children:[f.jsx(dk,{icon:t.icon,className:"text-brand"}),f.jsx("span",{className:"truncate",children:t.title}),f.jsx("svg",{viewBox:"0 0 24 24",width:14,height:14,fill:"none",stroke:"currentColor",strokeWidth:2,className:"ml-auto text-brand","aria-hidden":"true",children:f.jsx("path",{d:"m5 12 5 5 9-10"})})]}),r&&f.jsxs("button",{type:"button",role:"menuitem",tabIndex:-1,className:`${h} w-full hover:bg-line-soft`,onClick:()=>{d(!1),r()},children:[f.jsxs("svg",{viewBox:"0 0 24 24",width:16,height:16,fill:"none",stroke:"currentColor",strokeWidth:2,className:"text-muted-foreground","aria-hidden":"true",children:[f.jsx("circle",{cx:"11",cy:"11",r:"7"}),f.jsx("path",{d:"m20 20-3.5-3.5"})]}),f.jsx("span",{className:"truncate",children:"Search all consoles"}),f.jsx("kbd",{className:"ml-auto text-[10px] text-muted-foreground",children:"⌘K"})]}),i.map(g=>f.jsxs("a",{role:"menuitem",href:g.href,tabIndex:-1,className:`${h} hover:bg-line-soft`,children:[f.jsx(dk,{icon:g.icon,className:"text-muted-foreground"}),f.jsx("span",{className:"truncate",children:g.title})]},g.id))]})]})}const c1e=200,f1e=2;function d1e(e){return e.groups.flatMap(t=>t.hits.map((n,r)=>({id:`search-${t.id}-${r}`,label:n.title,to:"",href:n.href,detail:n.subtitle?`${t.title} · ${n.subtitle}`:t.title})))}function p1e(e,t){const[n,r]=j.useState({groups:[],partial:!1});return j.useEffect(()=>{const i=t.trim();if(e===void 0||i.length<f1e){r({groups:[],partial:!1});return}const o=new AbortController,a=setTimeout(()=>{l1e(e,i,o.signal).then(s=>{o.signal.aborted||r(s)})},c1e);return()=>{clearTimeout(a),o.abort()}},[e,t]),n}const h1e=[{id:"page-overview",label:"Overview",to:"/"},{id:"page-entries",label:"Entries",to:"/entries"},{id:"page-pulse",label:"Pulse",to:"/pulse"},{id:"page-ai",label:"AI",to:"/ai"},{id:"page-queues",label:"Queues",to:"/queues"},{id:"page-metrics",label:"Queue Metrics",to:"/queues/metrics"},{id:"page-schedules",label:"Schedules",to:"/schedules"},{id:"page-traces",label:"Traces",to:"/traces"}],m1e=[...h1e,...nu.map(e=>({id:`entry-${e.id}`,label:e.label,to:`/entries/${e.id}`}))];function g1e(e,t){const n=t.trim().toLowerCase();return n?e.filter(r=>r.label.toLowerCase().includes(n)):e}function y1e(){const[e,t]=j.useState(!1);return j.useEffect(()=>{function n(r){(r.metaKey||r.ctrlKey)&&r.key.toLowerCase()==="k"&&(r.preventDefault(),t(i=>!i))}return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),{open:e,setOpen:t}}function v1e({open:e,onClose:t,searchEndpoint:n}){const r=Ei(),i=j.useRef(null),[o,a]=j.useState(""),[s,l]=j.useState(0),u=j.useId(),c=p1e(e?n:void 0,o),d=j.useMemo(()=>[...g1e(m1e,o),...d1e(c)],[o,c]);j.useEffect(()=>{var h;e&&(a(""),l(0),(h=i.current)==null||h.focus())},[e]),j.useEffect(()=>{l(h=>d.length===0?0:Math.min(h,d.length-1))},[d.length]);const p=j.useCallback(h=>{h&&(t(),h.href!==void 0?window.location.assign(h.href):r(h.to))},[r,t]);function m(h){d.length!==0&&(h.key==="ArrowDown"?(h.preventDefault(),l(g=>(g+1)%d.length)):h.key==="ArrowUp"?(h.preventDefault(),l(g=>(g-1+d.length)%d.length)):h.key==="Enter"&&(h.preventDefault(),p(d[s])))}const v=d[s]?`${u}-${d[s].id}`:void 0;return f.jsx(Qj,{open:e,onOpenChange:h=>{h||t()},children:f.jsxs(Jj,{placement:"top","aria-label":"Command palette",className:"overflow-hidden",initialFocus:i,onKeyDown:m,children:[f.jsx("input",{ref:i,type:"text",value:o,onChange:h=>a(h.target.value),placeholder:n?"Jump to, or search by id or tag…":"Jump to…","aria-label":"Search actions","aria-controls":u,"aria-activedescendant":v,className:"w-full border-b border-line bg-transparent px-4 py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"}),f.jsx("ul",{id:u,role:"listbox",className:"max-h-72 overflow-y-auto py-1",children:d.length===0?f.jsx("li",{className:"px-4 py-3 text-xs text-muted-foreground",children:"No matching actions"}):d.map((h,g)=>f.jsxs("li",{id:`${u}-${h.id}`,role:"option","aria-selected":g===s,onMouseEnter:()=>l(g),onMouseDown:y=>{y.preventDefault(),p(h)},className:`cursor-pointer px-4 py-2 text-sm ${g===s?"bg-panel-2 text-brand":"text-foreground"}`,children:[h.label,h.detail&&f.jsx("span",{className:"block truncate text-[11px] text-muted-foreground",children:h.detail})]},h.id))}),c.partial&&f.jsx("p",{className:"border-t border-line px-4 py-2 text-[11px] text-muted-foreground",children:"Some consoles did not answer in time; their results are missing."})]})})}const Px="All organizations";function pk(e){const t=new URL(window.location.href);e===null?t.searchParams.delete("tenant"):t.searchParams.set("tenant",e),window.location.assign(t.toString())}function x1e(e,t){const[n,r]=j.useState(e);return j.useEffect(()=>{const i=setTimeout(()=>r(e),t);return()=>clearTimeout(i)},[e,t]),n}function b1e(){var v;const e=Ub(),[t,n]=j.useState(!1),[r,i]=j.useState(""),o=x1e(r.trim(),200),a=Ub(t?o:""),s=j.useRef(null),l=j.useId();j.useEffect(()=>{function h(g){var x;const y=g.target;y instanceof Node&&!((x=s.current)!=null&&x.contains(y))&&n(!1)}return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const u=e.data;if(!(u!=null&&u.enabled))return null;const c=h=>{var g;return h===null?u.tenants==="*"?Px:"none":((g=u.options.find(y=>y.id===h))==null?void 0:g.label)??h},d="rounded border border-line px-2 py-1 text-xs";if(Array.isArray(u.tenants)&&u.tenants.length<=1)return f.jsxs("span",{className:d,title:"Organization",children:[f.jsx("span",{className:"text-muted-foreground",children:"Organization: "}),u.tenants[0]!==void 0?c(u.tenants[0]):"none"]});const p=(v=a.data)!=null&&v.enabled?a.data.options:u.options,m=[...u.tenants==="*"&&(o===""||Px.toLowerCase().includes(o.toLowerCase()))?[{id:null,label:Px}]:[],...p];return f.jsxs("div",{ref:s,className:"relative",children:[f.jsxs("button",{type:"button",className:`${d} hover:bg-panel-2`,"aria-haspopup":"listbox","aria-expanded":t,"aria-controls":l,onClick:()=>n(h=>!h),children:[f.jsx("span",{className:"text-muted-foreground",children:"Organization: "}),c(u.selected)]}),t?f.jsxs("div",{className:"absolute right-0 top-full z-20 mt-1 w-64 rounded border border-line bg-popover p-1 shadow-lg",children:[f.jsx($u,{type:"text",value:r,autoFocus:!0,onChange:h=>i(h.target.value),placeholder:"Search organizations…","aria-label":"Search organizations"}),f.jsxs("div",{id:l,role:"listbox","aria-label":"Organizations",tabIndex:-1,className:"mt-1 max-h-64 overflow-auto",children:[m.map(h=>f.jsx("div",{role:"option",tabIndex:0,"aria-selected":h.id===u.selected,onClick:()=>pk(h.id),onKeyDown:g=>{g.key==="Enter"&&pk(h.id)},className:`cursor-pointer truncate px-2 py-1 text-xs hover:bg-panel-2 ${h.id===u.selected?"text-brand":"text-foreground"}`,children:h.label},h.id??"*")),m.length===0?f.jsx("p",{className:"px-2 py-1 text-xs text-muted-foreground",children:"No organization found."}):null]})]}):null]})}function w1e(){const e=Ub().data;return(e==null?void 0:e.enabled)===!0&&Array.isArray(e.tenants)&&e.tenants.length===0}const l3="telescope-theme",Ex="dark",u3=j.createContext(null);function hk(){if(typeof window>"u"||!window.localStorage)return Ex;try{const e=window.localStorage.getItem(l3);return e==="light"||e==="dark"?e:Ex}catch{return Ex}}function S1e(e){if(!(typeof window>"u"||!window.localStorage))try{window.localStorage.setItem(l3,e)}catch{}}function j1e({children:e}){const[t,n]=j.useState(hk),r=j.useCallback(()=>{n(o=>{const a=o==="dark"?"light":"dark";return S1e(a),a})},[]);j.useEffect(()=>{n(hk())},[]),j.useEffect(()=>{if(typeof document>"u")return;const o=document.documentElement;return o.classList.toggle("light",t==="light"),o.classList.toggle("dark",t==="dark"),()=>{o.classList.remove("light","dark")}},[t]);const i=j.useMemo(()=>({theme:t,toggleTheme:r}),[t,r]);return f.jsx(u3.Provider,{value:i,children:f.jsx("div",{className:t,"data-theme":t,"data-testid":"telescope-root",children:e})})}function O1e(){const e=j.useContext(u3);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}const P1e=[{to:"/",label:"Overview",end:!0},{to:"/entries",label:"Entries",end:!0},{to:"/traces",label:"Traces",end:!0},{to:"/pulse",label:"Pulse",end:!1},{to:"/ai",label:"AI",end:!1},{to:"/queues",label:"Queues",end:!1},{to:"/schedules",label:"Schedules",end:!1},{to:"/prunes",label:"Prunes",end:!1},{to:"/exports",label:"Exports",end:!1},{to:"/profiles",label:"Profiles",end:!1}];function E1e(e,t,n){return e.filter(r=>!(r.to==="/traces"&&t===!1||r.to==="/profiles"&&n!==!0))}function mk({isActive:e}){return`block rounded px-3 py-1.5 text-xs uppercase tracking-wide ${e?"bg-panel-2 text-brand":"text-muted-foreground hover:bg-panel hover:text-foreground"}`}function A1e({isActive:e}){return`flex items-center gap-2 rounded px-3 py-1.5 text-xs ${e?"bg-panel-2 text-foreground":"text-muted-foreground hover:bg-panel hover:text-foreground"}`}function C1e(){const{paused:e,setPaused:t}=I$();return f.jsxs(aO,{children:[f.jsx(sO,{render:f.jsxs(Qe,{variant:e?"warn":"good",onClick:()=>t(!e),"aria-pressed":e,className:"uppercase tracking-wide",children:[f.jsx("span",{"aria-hidden":"true",children:e?"⏸":"●"}),e?"Paused":"Live"]})}),f.jsx(lO,{children:e?"Resume live tail":"Pause live tail"})]})}function T1e(){const{theme:e,toggleTheme:t}=O1e(),n=e==="dark";return f.jsxs(aO,{children:[f.jsx(sO,{render:f.jsxs(Qe,{onClick:t,"aria-pressed":!n,children:[f.jsx("span",{"aria-hidden":"true",children:n?"☾":"☀"}),n?"Dark":"Light"]})}),f.jsx(lO,{children:n?"Switch to light theme":"Switch to dark theme"})]})}function _1e({onClick:e}){return f.jsxs(aO,{children:[f.jsx(sO,{render:f.jsx(Qe,{onClick:e,"aria-label":"Open command palette","aria-keyshortcuts":"Meta+K Control+K",className:"text-muted-foreground hover:text-foreground",children:f.jsx("span",{"aria-hidden":"true",children:"⌘K"})})}),f.jsx(lO,{children:"Open command palette (⌘K)"})]})}const k1e=i1e("telescope-dashboard-config");function N1e({children:e}){var l,u,c,d,p,m;const{open:t,setOpen:n}=y1e(),r=ze(),i=Ea(),o=w1e(),a=CH(AH((l=i.data)==null?void 0:l.entryTypes),(u=i.data)==null?void 0:u.watchers),s=E1e(P1e,(c=i.data)==null?void 0:c.tracesEnabled,(p=(d=i.data)==null?void 0:d.profiling)==null?void 0:p.enabled);return f.jsxs("div",{className:"flex min-h-screen bg-background font-mono text-sm text-foreground",children:[f.jsx(v1e,{open:t,onClose:()=>n(!1),searchEndpoint:`${r.baseUrl}/consoles`}),f.jsxs("aside",{className:"flex w-56 shrink-0 flex-col gap-6 border-r border-line px-3 py-4",children:[f.jsx("div",{className:"px-3",children:f.jsx(u1e,{config:k1e,current:{title:"Telescope",icon:"telescope"},brand:f.jsx("span",{className:"text-base font-semibold text-brand",children:"Telescope"}),onSearch:()=>n(!0)})}),f.jsxs("nav",{className:"flex flex-col gap-1",children:[s.map(v=>f.jsx(uh,{to:v.to,end:v.end,className:mk,children:v.label},v.to)),(((m=i.data)==null?void 0:m.dashboards)??[]).map(v=>f.jsx(uh,{to:`/ext/${v.id}`,className:mk,children:v.label},v.id))]}),f.jsxs("nav",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"px-3 pb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Watchers"}),a.map(v=>f.jsxs(uh,{to:`/entries/${v.id}`,className:A1e,children:[f.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${v.dot}`,"aria-hidden":"true"}),v.label]},v.id))]})]}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f.jsx("header",{className:"flex items-center justify-end gap-4 border-b border-line px-4 py-2",children:f.jsxs(n0e,{delay:200,children:[f.jsx(b1e,{}),f.jsx(owe,{}),f.jsx(_1e,{onClick:()=>n(!0)}),f.jsx(T1e,{}),f.jsx(C1e,{})]})}),f.jsx("main",{className:"min-w-0 flex-1",children:o?f.jsx("p",{className:"p-8 text-center text-muted-foreground",children:"Choose an organization to see its data."}):e})]})]})}function R1e(e,t){if(e===void 0||!t)return null;const n=t.direction==="up-bad";return(n?e>=t.bad:e<=t.bad)?"bad":(n?e>=t.warn:e<=t.warn)?"warn":"ok"}const $1e={ok:"var(--good)",warn:"var(--warn)",bad:"var(--bad)"};function M1e({points:e}){if(e.length<2)return null;const t=Math.max(...e),n=Math.min(...e),r=t-n||1,i=e.map((o,a)=>{const s=a/(e.length-1)*100,l=20-(o-n)/r*18-1;return`${a===0?"M":"L"}${s.toFixed(1)},${l.toFixed(1)}`}).join(" ");return f.jsxs("svg",{className:"mt-2",width:"100%",height:"22",viewBox:"0 0 100 22",preserveAspectRatio:"none",children:[f.jsx("title",{children:"Trend sparkline"}),f.jsx("path",{d:i,fill:"none",stroke:"var(--muted)",strokeWidth:"1.5"})]})}function Be({label:e,value:t,delta:n,deltaLabel:r,spark:i,thresholds:o,currentValue:a,accent:s="text-foreground",hint:l}){const u=R1e(a,o),c=n===void 0||!o?null:o.direction==="up-bad"?n<0:n>0,d=c===null?"#a1a1aa":c?"var(--good)":"var(--bad)",p=n===void 0?"":n>0?"▲":n<0?"▼":"◆";return f.jsxs("div",{"data-health":u??void 0,className:"rounded-lg border border-line bg-panel/40 px-4 py-3 overflow-hidden",children:[u&&f.jsx("div",{style:{height:3,background:$1e[u],margin:"-12px -16px 9px"}}),f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),f.jsxs("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${s} flex items-baseline gap-2`,children:[t,n!==void 0&&f.jsxs("span",{className:"text-xs font-semibold",style:{color:d},children:[p," ",r??Math.abs(n)]})]}),i&&f.jsx(M1e,{points:i}),l&&f.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground",children:l})]})}function I1e(e){const t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return n>0?`${n}d ${r}h`:r>0?`${r}h ${i}m`:`${i}m ${t%60}s`}function D1e({stats:e}){return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Server"}),e?f.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:[f.jsx(Be,{label:"Uptime",value:I1e(e.uptimeSec),accent:"text-brand"}),f.jsx(Be,{label:"RSS",value:`${e.memory.rssMb} MB`,hint:`heap ${e.memory.heapUsedMb}/${e.memory.heapTotalMb} MB`}),f.jsx(Be,{label:"Heap used",value:`${e.memory.heapUsedMb} MB`,accent:"text-sky-400"}),f.jsx(Be,{label:"CPU",value:`${Math.round(e.cpu.userMs)} ms`,accent:"text-violet-400",hint:`sys ${Math.round(e.cpu.systemMs)} ms`}),f.jsx(Be,{label:"Event loop",value:e.eventLoopDelayMs===null?"n/a":`${e.eventLoopDelayMs} ms`,accent:e.eventLoopDelayMs!==null&&e.eventLoopDelayMs>100?"text-bad":"text-foreground",hint:`instance ${e.instanceId}`})]}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function L1e(e){return`${(Math.max(0,e)/1e3).toFixed(1)} µs`}function gk(e){return e===null?"n/a":`${e.toFixed(1)} ms`}function F1e({health:e}){return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[f.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Telescope health"}),f.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Captures run off the response path — your requests don't wait on Telescope."})]}),e?f.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[f.jsx(Be,{label:"Capture cost",value:`${L1e(e.captureCostNanos)}/capture`,accent:"text-brand",hint:"micro-benchmark"}),f.jsx(Be,{label:"Buffer",value:`${e.bufferUsed} / ${e.bufferSize}`,accent:"text-sky-400",hint:`high-water ${e.bufferHighWater}`}),f.jsx(Be,{label:"Last flush",value:gk(e.lastFlushMs),hint:`max ${gk(e.maxFlushMs)}`}),f.jsx(Be,{label:"Flushes",value:e.flushes.toLocaleString(),accent:"text-violet-400",hint:`${e.flushedEntries.toLocaleString()} entries`}),f.jsx(Be,{label:"Dropped",value:e.droppedCount.toLocaleString(),accent:e.droppedCount>0?"text-bad":"text-good",hint:e.droppedCount>0?`overflow ${e.overflowDropped} · store ${e.storeFailedDropped}`:"keeping up"}),f.jsx(Be,{label:"Truncated",value:e.truncatedCount.toLocaleString(),accent:e.truncatedCount>0?"text-warn":"text-good",hint:e.truncatedCount>0?"fat content — tune redact/sampling":"within bounds"})]}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function B1e({retention:e,pruneEnabled:t}){const n=U$(),r=e==null?void 0:e.retention;async function i(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const o=await n.mutateAsync();globalThis.alert(`Pruned ${o.pruned} ${o.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[f.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Retention"}),t?f.jsx("button",{type:"button",onClick:i,disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Pruning…":"Prune now"}):null]}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[f.jsx(Be,{label:"Window",value:r?mf(r.afterMs):"none",accent:r?"text-brand":"text-muted-foreground",hint:(r==null?void 0:r.keepLast)!=null?`keep last ${r.keepLast}`:"unbounded"}),f.jsx(Be,{label:"Entries",value:(e==null?void 0:e.entryCount)!=null?e.entryCount.toLocaleString():"n/a"}),f.jsx(Be,{label:"Oldest",value:(e==null?void 0:e.oldestCreatedAt)!=null?"tracked":"n/a"})]})]})}function c3(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function U1e(e){return((e==null?void 0:e.buckets)??[]).map(t=>({label:c3(t.t),value:t.total}))}function f3(e){const t=dO((e==null?void 0:e.buckets)??[]);return((e==null?void 0:e.buckets)??[]).map(n=>{const r={label:c3(n.t)};for(const i of t)r[i]=n.byType[i]??0;return r})}function z1e(e){return Object.values(e).reduce((t,n)=>t+n,0)}function H1e(e){const t=e.request??0;return t===0?null:(e.exception??0)/t}const V1e=.05;function W1e(e){return e===null?"n/a":`${(e*100).toFixed(1)}%`}function q1e(e){return(e==null?void 0:e.slowRoutes.length)??0}const Yw=100;function K1e(e){return((e==null?void 0:e.queues)??[]).filter(t=>{const n=Math.max(0,t.total-t.completed-t.failed);return t.failed>0||n>=Yw})}function G1e({pulse:e,queues:t}){const n=(e==null?void 0:e.counts)??{},r=z1e(n),i=n.request??0,o=n.exception??0,a=H1e(n),s=((t==null?void 0:t.queues)??[]).reduce((u,c)=>u+c.failed,0),l=q1e(e);return f.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[f.jsx(Be,{label:"Requests",value:i.toLocaleString(),accent:"text-brand",hint:`${r.toLocaleString()} entries total`}),f.jsx(Be,{label:"Error rate",value:W1e(a),accent:a!==null&&a>V1e?"text-bad":"text-foreground",hint:`${o.toLocaleString()} exceptions`}),f.jsx(Be,{label:"Failed jobs",value:s.toLocaleString(),accent:s>0?"text-bad":"text-foreground",hint:"across queues"}),f.jsx(Be,{label:"Slow routes",value:l.toLocaleString(),accent:l>0?"text-warn":"text-foreground",hint:"routes over the slow p99 threshold"})]})}function yk({title:e,emptyLabel:t,children:n}){const r=Array.isArray(n)?n.length>0:!!n;return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),r?f.jsx("ul",{className:"space-y-1 text-xs",children:n}):f.jsx("p",{className:"text-xs text-muted-foreground",children:t})]})}function X1e({hotspots:e,onSelectFamily:t}){return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"N+1 query hotspots"}),e.length>0?f.jsx("ul",{className:"space-y-1 text-xs",children:e.map(n=>f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>t(n.familyHash),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[f.jsxs("span",{className:"min-w-0 truncate",children:[f.jsxs("span",{className:"whitespace-nowrap text-warn",children:["×",n.perRequest]})," ",f.jsx("span",{className:"text-muted-foreground",children:n.sql})]}),f.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.requests," req · ",n.total," total",n.totalDurationMs>0?` · ${Math.round(n.totalDurationMs)}ms`:""]})]})},n.familyHash))}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"None detected"})]})}function Y1e({queues:e,onOpenQueues:t}){return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[f.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Queues needing attention"}),f.jsx("button",{type:"button",onClick:t,className:"text-[11px] text-muted-foreground hover:text-brand",children:"All queues →"})]}),e.length>0?f.jsx("ul",{className:"space-y-1 text-xs",children:e.map(n=>{const r=Math.max(0,n.total-n.completed-n.failed);return f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[f.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.queue}),f.jsxs("span",{className:"shrink-0 tabular-nums",children:[n.failed>0?f.jsxs("span",{className:"text-bad",children:[n.failed," failed"]}):null,n.failed>0&&r>=Yw?f.jsx("span",{className:"text-muted-foreground",children:" · "}):null,r>=Yw?f.jsxs("span",{className:"text-warn",children:[r.toLocaleString()," pending"]}):null]})]})},n.queue)})}):f.jsx("p",{className:"text-xs text-good",children:"All queues healthy"})]})}function Q1e({hotspots:e}){return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Slowest jobs"}),e.length>0?f.jsx("ul",{className:"space-y-1 text-xs",children:e.map(t=>f.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[f.jsx("span",{className:"min-w-0 truncate text-foreground",children:t.route}),f.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[f.jsxs("span",{className:"text-warn",children:[Math.round(t.p99),"ms"]})," p99 · ",t.count,"×"]})]},t.route))}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"No jobs in window."})]})}function J1e({users:e,onSelectUser:t}){return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Load by user"}),e.length>0?f.jsx("ul",{className:"space-y-1 text-xs",children:e.map(n=>f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>t(n.user),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[f.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.user}),f.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.count," req · ",Math.round(n.totalDurationMs),"ms"]})]})},n.user))}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"No identified users in window."})]})}function Z1e({history:e}){const t=(e==null?void 0:e.samples)??[],n=t.map(a=>a.cpuPercent),r=t.map(a=>a.rssMb),i=t.map(a=>a.heapUsedMb),o=t[t.length-1];return f.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[f.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Resource history"}),t.length>1?f.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["CPU ",o?`${o.cpuPercent}%`:""]}),f.jsx(yh,{values:n})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["RSS ",o?`${o.rssMb}MB`:""]}),f.jsx(yh,{values:r})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["Heap ",o?`${o.heapUsedMb}MB`:""]}),f.jsx(yh,{values:i})]})]}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"Collecting samples…"})]})}function eSe(){var h,g,y,x,b,S,w;const[e,t]=j.useState("1h"),n=Ei(),r=H$(e),i=V$(e),o=sS({window:e,buckets:60}),a=sH(),s=lH(),l=cH(),u=eH(),c=Ea(),d=U1e(o.data),p=f3(o.data),m=dO(((h=o.data)==null?void 0:h.buckets)??[]),v=K1e(i.data);return f.jsxs("div",{className:"space-y-4 p-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-sm text-brand",children:"Overview"}),f.jsx(lc,{value:e,onChange:t})]}),f.jsx(G1e,{pulse:r.data,queues:i.data}),f.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[f.jsx(yk,{title:"Recent failures",emptyLabel:"No exceptions 🎉",children:(((g=r.data)==null?void 0:g.topExceptions)??[]).map(O=>f.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[f.jsxs("span",{className:"min-w-0",children:[f.jsx("span",{className:"text-bad",children:O.class})," ",f.jsx("span",{className:"text-muted-foreground",children:O.message})]}),f.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["×",O.count]})]},O.familyHash))}),f.jsx(X1e,{hotspots:((y=r.data)==null?void 0:y.nPlusOne)??[],onSelectFamily:O=>n(`/entries/query?familyHash=${encodeURIComponent(O)}`)})]}),f.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[f.jsx(yk,{title:"Slowest",emptyLabel:"Nothing slow in window.",children:(((x=r.data)==null?void 0:x.slowest)??[]).map(O=>f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>n(`/entries/view/${O.id}`),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[f.jsxs("span",{className:"min-w-0 truncate",children:[f.jsx("span",{className:"text-brand",children:O.type})," ",f.jsx("span",{className:"text-muted-foreground",children:O.label})]}),f.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[O.durationMs,"ms"]})]})},O.id))}),f.jsx(Y1e,{queues:v,onOpenQueues:()=>n("/queues")})]}),f.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[f.jsx(Q1e,{hotspots:((b=r.data)==null?void 0:b.slowJobs)??[]}),f.jsx(J1e,{users:((S=r.data)==null?void 0:S.loadByUser)??[],onSelectUser:O=>n(`/entries?tag=${encodeURIComponent(`user:${O}`)}`)})]}),f.jsx(Z1e,{history:s.data}),f.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[f.jsx(Gs,{title:"Throughput",valueLabel:"entries",data:d}),f.jsx(Xy,{title:"By type",series:m,data:p})]}),f.jsx(D1e,{stats:a.data}),f.jsx(F1e,{health:l.data}),f.jsx(B1e,{retention:u.data,pruneEnabled:((w=c.data)==null?void 0:w.pruneEnabled)??!1})]})}function tSe(){const{data:e}=F$(),t=(e==null?void 0:e.queues)??[],n=e==null?void 0:e.capabilities,[r,i]=j.useState(void 0),[o,a]=j.useState("waiting"),[s,l]=j.useState(null);j.useEffect(()=>{if(r||t.length===0)return;const d=t[0];d&&i({driver:d.driver,queue:d.queue})},[t,r]);const u=t.find(d=>d.driver===(r==null?void 0:r.driver)&&d.queue===(r==null?void 0:r.queue));function c(d,p){i({driver:d,queue:p}),l(null)}return f.jsxs("div",{className:"grid grid-cols-1 gap-4 p-4 lg:grid-cols-[280px_minmax(0,1fr)]",children:[f.jsxs("aside",{className:"space-y-2",children:[f.jsx("h3",{className:"px-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Live queues"}),f.jsx(Iwe,{...r?{selected:r}:{},onSelect:c})]}),f.jsx("section",{className:"min-w-0 space-y-3",children:r?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center justify-between gap-3",children:[f.jsxs("h2",{className:"truncate text-sm text-brand",children:[r.queue,f.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-muted-foreground",children:r.driver})]}),o==="failed"&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Kwe,{capabilities:n,driver:r.driver,queue:r.queue}),f.jsx(Gwe,{capabilities:n,driver:r.driver,queue:r.queue})]})]}),f.jsx(Dwe,{counts:u==null?void 0:u.counts,state:o,onState:a}),f.jsx(Uwe,{driver:r.driver,queue:r.queue,state:o,onOpen:l}),f.jsx(e1e,{capabilities:n,driver:r.driver,queue:r.queue})]}):f.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"Select a queue to inspect its jobs."})}),r&&s&&f.jsx(Qwe,{driver:r.driver,queue:r.queue,jobId:s,state:o,capabilities:n,onClose:()=>l(null)})]})}const jd={queue:"#71717a",model:"#38bdf8",tools:"#2dd4bf"},nSe={users:"#38bdf8",platform:"#c084fc"};function is(e){if(e==null)return"—";if(e===0)return"$0";const t=Math.abs(e);return t<.01?`$${e.toFixed(4)}`:t<100?`$${e.toFixed(2)}`:`$${Math.round(e).toLocaleString("en-US")}`}function Pn(e){return e==null?"—":e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(e<1e4?2:1)}s`:`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}function Or(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(1)}k`:e.toLocaleString("en-US")}function vk(e,t){return t<=0?"0%":`${Math.round(e/t*100)}%`}function rSe(e){return e==="@platform"?"Platform (@platform)":e}function xl({title:e,hint:t}){return f.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[f.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),t&&f.jsx("span",{className:"text-[10px] text-muted-foreground",children:t})]})}function Od({children:e}){return f.jsx("section",{className:"space-y-3 rounded-lg border border-line bg-panel/40 p-4",children:e})}function Ax({title:e,rows:t,total:n,label:r=i=>i}){return f.jsxs(Od,{children:[f.jsx(xl,{title:e}),t.length===0?f.jsx("p",{className:"text-xs text-muted-foreground",children:"Nothing in this window."}):f.jsx("ul",{className:"space-y-2",children:t.map(i=>f.jsxs("li",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs",children:[f.jsx("span",{className:"truncate font-mono text-foreground",title:i.key,children:r(i.key)}),f.jsxs("span",{className:"shrink-0 tabular-nums text-foreground",children:[is(i.costUsd),f.jsxs("span",{className:"ml-2 text-muted-foreground",children:[Or(i.calls)," calls",i.unpricedCalls>0?` · ${i.unpricedCalls} unpriced`:""]})]})]}),f.jsx("div",{className:"h-1 rounded bg-line",children:f.jsx("div",{className:"h-1 rounded bg-brand",style:{width:n>0?`${Math.max(1,i.costUsd/n*100)}%`:0}})})]},i.key))})]})}function iSe({run:e,scaleMs:t}){const n=[{key:"queue",ms:e.queueMs??0},{key:"model",ms:e.modelMs??0},{key:"tools",ms:e.toolsMs??0}],r=n.reduce((o,a)=>o+a.ms,0);if(r===0)return f.jsx("span",{className:"text-[10px] text-muted-foreground",children:"no breakdown"});const i=Math.max(t,r,1);return f.jsx("div",{className:"flex h-2 w-40 overflow-hidden rounded bg-line",role:"img","aria-label":`queue ${Pn(e.queueMs)}, model ${Pn(e.modelMs)}, tools ${Pn(e.toolsMs)}`,title:`queue ${Pn(e.queueMs)} · model ${Pn(e.modelMs)} · tools ${Pn(e.toolsMs)}`,children:n.map(o=>o.ms>0?f.jsx("span",{style:{width:`${o.ms/i*100}%`,background:jd[o.key]}},o.key):null)})}function oSe(){return f.jsx("span",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:Object.keys(jd).map(e=>f.jsxs("span",{className:"flex items-center gap-1",children:[f.jsx("span",{className:"h-2 w-2 rounded-sm",style:{background:jd[e]}}),e]},e))})}function d3({status:e,code:t}){return e==="completed"?f.jsx(Al,{variant:"good",children:"completed"}):e==="cancelled"?f.jsx(Al,{variant:"muted",children:"cancelled"}):f.jsxs(Al,{variant:"bad",title:t??void 0,children:["failed",t?` · ${t}`:""]})}function aSe({runs:e,selectedId:t,onSelect:n}){const r=Math.max(1,...e.map(i=>(i.queueMs??0)+(i.modelMs??0)+(i.toolsMs??0)));return f.jsxs(Ra,{containerClassName:"max-h-[28rem]",children:[f.jsx($a,{children:f.jsxs(en,{children:[f.jsx(Oe,{children:"When"}),f.jsx(Oe,{children:"Agent"}),f.jsx(Oe,{children:"Status"}),f.jsx(Oe,{children:"Model"}),f.jsx(Oe,{className:"text-right",children:"Duration"}),f.jsx(Oe,{children:"Queue · model · tools"}),f.jsx(Oe,{className:"text-right",children:"Steps"}),f.jsx(Oe,{className:"text-right",children:"Tool calls"}),f.jsx(Oe,{className:"text-right",children:"Cost"})]})}),f.jsx(Ma,{children:e.map(i=>f.jsxs(en,{onClick:()=>n(i),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n(i))},tabIndex:0,"aria-selected":t===i.entryId,className:`cursor-pointer ${t===i.entryId?"bg-panel-2":"hover:bg-panel"}`,children:[f.jsx(Ee,{className:"whitespace-nowrap text-muted-foreground",title:i.at,children:Ao(new Date(i.at).getTime())}),f.jsx(Ee,{className:"font-mono",children:i.agent}),f.jsx(Ee,{children:f.jsx(d3,{status:i.status,code:i.code})}),f.jsx(Ee,{className:"max-w-[12rem] truncate font-mono text-muted-foreground",children:i.modelId??"—"}),f.jsx(Ee,{className:"text-right tabular-nums",children:Pn(i.durationMs)}),f.jsx(Ee,{children:f.jsx(iSe,{run:i,scaleMs:r})}),f.jsx(Ee,{className:"text-right tabular-nums",children:i.steps??"—"}),f.jsx(Ee,{className:"text-right tabular-nums",children:i.toolCalls??"—"}),f.jsx(Ee,{className:"text-right tabular-nums",children:is(i.costUsd)})]},i.entryId))})]})}function sSe({step:e,scaleMs:t}){const n=Math.max(1,t);return f.jsxs("div",{className:"flex h-2 w-56 overflow-hidden rounded bg-line","aria-hidden":"true",children:[e.modelMs?f.jsx("span",{style:{width:`${e.modelMs/n*100}%`,background:jd.model}}):null,e.toolsMs>0?f.jsx("span",{style:{width:`${e.toolsMs/n*100}%`,background:jd.tools}}):null]})}function lSe({run:e,onClose:t}){const n=Math.max(1,...e.stepTimings.map(r=>(r.modelMs??0)+r.toolsMs));return f.jsxs(Od,{children:[f.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[f.jsxs("div",{className:"flex flex-wrap items-baseline gap-3",children:[f.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Run"}),f.jsx("span",{className:"font-mono text-xs text-foreground",children:e.runId??e.entryId}),f.jsx(d3,{status:e.status,code:e.code})]}),f.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[e.traceId?f.jsx(qh,{className:"text-brand hover:underline",to:`/traces/${encodeURIComponent(e.traceId)}`,children:"Open trace waterfall →"}):f.jsx("span",{className:"text-muted-foreground",children:"No trace recorded"}),f.jsx(qh,{className:"text-brand hover:underline",to:`/entries/view/${encodeURIComponent(e.entryId)}`,children:"Open entry →"}),f.jsx("button",{type:"button",onClick:t,className:"text-muted-foreground hover:text-foreground","aria-label":"Close run detail",children:"✕"})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-8",children:[f.jsx(Be,{label:"Agent",value:e.agent}),f.jsx(Be,{label:"Duration",value:Pn(e.durationMs),accent:"text-brand"}),f.jsx(Be,{label:"Queue",value:Pn(e.queueMs)}),f.jsx(Be,{label:"Model",value:Pn(e.modelMs),hint:`${e.modelCalls??"—"} calls`}),f.jsx(Be,{label:"Tools",value:Pn(e.toolsMs),hint:`${e.toolCalls??"—"} calls`}),f.jsx(Be,{label:"TTFT",value:Pn(e.ttftMs)}),f.jsx(Be,{label:"Tokens",value:e.inputTokens===null?"—":Or(e.inputTokens+(e.outputTokens??0)),...e.inputTokens===null?{}:{hint:`${e.inputTokens} in · ${e.outputTokens??0} out`}}),f.jsx(Be,{label:"Cost",value:is(e.costUsd),...e.modelId===null?{}:{hint:e.modelId}})]}),e.stepTimings.length===0?f.jsx("p",{className:"text-xs text-muted-foreground",children:"This run carried no per-step timings. They arrive with @dudousxd/nestjs-agent 1.38.0 (core 0.60.0) and later."}):f.jsxs(Ra,{children:[f.jsx($a,{children:f.jsxs(en,{children:[f.jsx(Oe,{children:"Step"}),f.jsx(Oe,{className:"text-right",children:"Model"}),f.jsx(Oe,{className:"text-right",children:"Tools"}),f.jsx(Oe,{children:"Model · tools"}),f.jsx(Oe,{children:"Tool calls"})]})}),f.jsx(Ma,{children:e.stepTimings.map(r=>f.jsxs(en,{children:[f.jsxs(Ee,{className:"tabular-nums",children:["#",r.step]}),f.jsx(Ee,{className:"text-right tabular-nums",children:Pn(r.modelMs)}),f.jsx(Ee,{className:"text-right tabular-nums",children:Pn(r.toolsMs)}),f.jsx(Ee,{children:f.jsx(sSe,{step:r,scaleMs:n})}),f.jsx(Ee,{className:"font-mono text-muted-foreground",children:r.tools.length===0?"—":r.tools.map(i=>`${i.toolName} ${Pn(i.ms)}`).join(" · ")})]},r.step))})]})]})}function xk({title:e,runs:t,value:n,onSelect:r}){return f.jsxs(Od,{children:[f.jsx(xl,{title:e}),t.length===0?f.jsx("p",{className:"text-xs text-muted-foreground",children:"Nothing in this window."}):f.jsx("ul",{className:"divide-y divide-line-soft",children:t.map(i=>f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>r(i),className:"flex w-full items-center justify-between gap-3 py-1.5 text-left text-xs hover:bg-panel",children:[f.jsxs("span",{className:"truncate font-mono text-foreground",children:[i.agent,f.jsx("span",{className:"ml-2 text-muted-foreground",children:i.modelId??""})]}),f.jsx("span",{className:"shrink-0 tabular-nums text-foreground",children:n(i)})]})},i.entryId))})]})}function uSe({rows:e}){return f.jsxs(Ra,{children:[f.jsx($a,{children:f.jsxs(en,{children:[f.jsx(Oe,{children:"Feature"}),f.jsx(Oe,{children:"Model"}),f.jsx(Oe,{children:"Provider"}),f.jsx(Oe,{className:"text-right",children:"Calls"}),f.jsx(Oe,{className:"text-right",children:"Tokens in · out"}),f.jsx(Oe,{className:"text-right",children:"Audio"}),f.jsx(Oe,{children:"Last seen"})]})}),f.jsx(Ma,{children:e.map(t=>f.jsxs(en,{children:[f.jsx(Ee,{className:"font-mono",children:t.feature}),f.jsx(Ee,{className:"font-mono text-muted-foreground",children:t.model}),f.jsx(Ee,{className:"text-muted-foreground",children:t.provider}),f.jsx(Ee,{className:"text-right tabular-nums",children:Or(t.calls)}),f.jsxs(Ee,{className:"text-right tabular-nums",children:[Or(t.inputTokens)," · ",Or(t.outputTokens)]}),f.jsx(Ee,{className:"text-right tabular-nums",children:t.audioSeconds>0?`${Math.round(t.audioSeconds)}s`:"—"}),f.jsx(Ee,{className:"text-muted-foreground",children:Ao(new Date(t.lastAt).getTime())})]},`${t.feature}|${t.model}|${t.provider}`))})]})}function cSe(e){return e.spend.buckets.map(t=>({label:new Date(t.start).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),users:Number((t.costUsd-t.platformUsd).toFixed(6)),platform:Number(t.platformUsd.toFixed(6))}))}function bk({report:e}){return e.coverage.legacyAgentLib?f.jsxs("div",{className:"rounded-md border border-dashed border-line px-4 py-6 text-sm text-muted-foreground",children:[f.jsxs("p",{children:[f.jsx("span",{className:"text-warn",children:"No AI spend recorded."})," This window has"," ",e.coverage.agentEvents," agent events but no ",f.jsx("code",{children:"usage.recorded"})," — the app most likely runs an agent lib older than ",f.jsx("code",{children:"@dudousxd/nestjs-agent"})," 1.38.0 (core 0.60.0), which is the first to publish one event per usage-ledger row."]}),f.jsx("p",{className:"mt-2",children:"Upgrade the agent packages to see spend, models and unpriced calls here."})]}):f.jsxs("div",{className:"rounded-md border border-dashed border-line px-4 py-6 text-sm text-muted-foreground",children:[f.jsx("p",{children:"No AI usage or agent runs in this window."}),f.jsxs("p",{className:"mt-2",children:["This screen reads the ",f.jsx("code",{children:"aviary:agent:*"})," events of"," ",f.jsx("code",{children:"@dudousxd/nestjs-agent"})," 1.38.0+ (core 0.60.0+), recorded by its Telescope watcher (",f.jsx("code",{children:"@dudousxd/nestjs-agent-telescope"}),") or the generic diagnostics bridge (",f.jsx("code",{children:"@dudousxd/nestjs-diagnostics-telescope"}),"). Widen the window, or check that one of them is registered."]})]})}function fSe(){const[e,t]=j.useState("24h"),[n,r]=$$(),{data:i,isLoading:o,error:a}=pH(e),s=n.get("run"),l=j.useMemo(()=>!i||s===null?null:i.runs.find(p=>p.entryId===s)??i.slowest.find(p=>p.entryId===s)??i.mostExpensive.find(p=>p.entryId===s)??null,[i,s]),u=p=>{const m=new URLSearchParams(n);p===null?m.delete("run"):m.set("run",p.entryId),r(m,{replace:!0})},c=i==null?void 0:i.spend,d=i!==void 0&&(i.coverage.usageEvents>0||i.coverage.runEvents>0);return f.jsxs("div",{className:"space-y-4 p-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-sm text-brand",children:"AI"}),f.jsx(lc,{value:e,onChange:t})]}),a?f.jsxs("p",{className:"text-sm text-bad",children:["Failed to load: ",a.message]}):o||!i||!c?f.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):d?f.jsxs(f.Fragment,{children:[i.coverage.legacyAgentLib&&f.jsx(bk,{report:i}),i.truncated&&f.jsxs("p",{className:"text-[11px] text-warn",children:["Scanned ",Or(i.scanned)," entries and hit the scan cap — older entries in this window are not counted."]}),i.coverage.usageEvents>0&&f.jsxs(f.Fragment,{children:[f.jsx(xl,{title:"Spend",hint:`${Or(c.calls)} calls in ${e}`}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[f.jsx(Be,{label:"Total spend",value:is(c.totalUsd),accent:"text-brand"}),f.jsx(Be,{label:"Platform share",value:vk(c.platformUsd,c.totalUsd),hint:`${is(c.platformUsd)} paid by @platform`}),f.jsx(Be,{label:"Estimated share",value:vk(c.estimatedUsd,c.totalUsd),hint:`${is(c.estimatedUsd)} priced by estimate`}),f.jsx(Be,{label:"Unpriced calls",value:Or(c.unpricedCalls),accent:c.unpricedCalls>0?"text-warn":"text-foreground",hint:"calls with no cost"}),f.jsx(Be,{label:"Tokens",value:Or(c.inputTokens+c.outputTokens),hint:`${Or(c.inputTokens)} in · ${Or(c.outputTokens)} out · ${Or(c.cacheReadTokens)} cached`}),f.jsx(Be,{label:"Audio",value:c.audioSeconds>0?`${Math.round(c.audioSeconds/60)} min`:"—",hint:`${Math.round(c.audioSeconds)} s processed`})]}),f.jsx(Xy,{title:"Spend over time (USD) — users vs platform",series:["users","platform"],data:cSe(i),colors:nSe,brush:!1}),f.jsxs("div",{className:"grid gap-3 lg:grid-cols-3",children:[f.jsx(Ax,{title:"By feature",rows:c.byFeature,total:c.totalUsd}),f.jsx(Ax,{title:"By model",rows:c.byModel,total:c.totalUsd}),f.jsx(Ax,{title:"Top payers",rows:c.byActor,total:c.totalUsd,label:rSe})]})]}),i.coverage.runEvents>0&&f.jsxs(f.Fragment,{children:[f.jsx(xl,{title:"Runs",hint:i.coverage.runsWithoutTimings>0?`${i.coverage.runsWithoutTimings} of ${i.coverage.runEvents} runs carried no timing breakdown`:`${i.coverage.runEvents} runs`}),f.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[f.jsx(xk,{title:"Slowest",runs:i.slowest,value:p=>Pn(p.durationMs),onSelect:u}),f.jsx(xk,{title:"Most expensive",runs:i.mostExpensive,value:p=>is(p.costUsd),onSelect:u})]}),l&&f.jsx(lSe,{run:l,onClose:()=>u(null)}),f.jsxs(Od,{children:[f.jsxs("div",{className:"flex items-center justify-between gap-3",children:[f.jsx(xl,{title:"Recent runs",hint:"click a run for its steps"}),f.jsx(oSe,{})]}),f.jsx(aSe,{runs:i.runs,selectedId:s,onSelect:u})]})]}),i.coverage.usageEvents>0&&f.jsxs(Od,{children:[f.jsx(xl,{title:"Unpriced",hint:"calls the ledger recorded with no cost — give them a price or a provider cost"}),i.unpriced.length===0?f.jsx("p",{className:"text-xs text-muted-foreground",children:"Every call in this window was priced."}):f.jsx(uSe,{rows:i.unpriced})]})]}):f.jsx(bk,{report:i})]})}function dSe(e,t){return t.trim()!==""?`No entries match tag '${t.trim()}'`:e?`No ${Mg(e)} entries`:"No entries"}function wk(){const{type:e}=Ng(),t=Ei(),[n]=$$(),[r,i]=j.useState(()=>n.get("tag")??""),[o,a]=j.useState(""),[s,l]=j.useState(""),[u,c]=j.useState(0),[d,p]=j.useState(0);function m(R){i(R),p(I=>I+1)}function v(R){i(R),c(I=>I+1)}const h=e&&PH(e)?e:void 0,g=r.trim(),y=m0e(g)?g:"",x=y===""?g:"",b=s.trim(),S=n.get("familyHash")??"",w=S!=="",O=b!=="",P=h!==void 0||g!==""||w||O,{data:E,isLoading:A}=z$({...h?W$(h):{},...g!==""?{tag:g}:{},...w?{familyHash:S}:{},...O?{search:b}:{}}),C=(E==null?void 0:E.data)??[];function T(){l(o)}function _(){a(""),l("")}function k(){i(""),_(),t("/entries")}function $(){t(h?`/entries/${h}`:"/entries")}return f.jsxs("div",{className:"p-4",children:[h?f.jsx(Pwe,{type:h}):null,f.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3 border-b border-line pb-3",children:[h?f.jsxs(Qe,{variant:"ghost",onClick:()=>t("/entries"),className:"bg-panel text-foreground hover:bg-panel-2",children:[f.jsx("span",{className:`h-2 w-2 rounded-full ${lS(h)}`,"aria-hidden":"true"}),Mg(h),f.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):f.jsx("span",{className:"rounded bg-panel px-2 py-1 text-xs text-muted-foreground",children:"All types"}),f.jsx(lk,{onSelect:m},`tag-${u}`),f.jsx(lk,{prefix:h0e,placeholder:"Filter by user…",ariaLabel:"Filter by user",onSelect:v},`user-${d}`),x!==""?f.jsxs(Qe,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[f.jsx("span",{children:`tag:${x}`}),f.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,y!==""?f.jsxs(Qe,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[f.jsx("span",{children:`User: ${uO(y)}`}),f.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,f.jsx($u,{type:"text",value:o,onChange:R=>a(R.target.value),onKeyDown:R=>{R.key==="Enter"&&T()},onBlur:T,placeholder:"Search content…","aria-label":"Search content"}),O?f.jsxs(Qe,{variant:"ghost",onClick:_,className:"bg-panel text-foreground hover:bg-panel-2",children:[f.jsx("span",{children:`search:"${b}"`}),f.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,w?f.jsxs(Qe,{variant:"ghost",onClick:$,className:"bg-panel text-foreground hover:bg-panel-2",children:[f.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"family:"}),S.slice(0,12),f.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,P?f.jsx(Qe,{variant:"ghost",onClick:k,children:"Clear filters"}):null]}),E!=null&&E.partial?f.jsx("output",{className:"tint-warn mb-4 block rounded-lg border px-4 py-3 text-sm",children:"Older entries are unavailable right now — the store could only read part of its data, so this list may be missing them."}):null,A?f.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):C.length===0?f.jsx("p",{className:"text-muted-foreground",children:dSe(h,r)}):f.jsx(ZF,{entries:C,onSelect:R=>t(`/entries/view/${R}`)})]})}function pSe(){const{id:e=""}=Ng(),t=Ei(),{data:n,isLoading:r}=aH(e);return f.jsxs("div",{className:"p-4",children:[f.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"mb-4 text-xs text-muted-foreground hover:text-foreground",children:"← entries"}),r||!n?f.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):f.jsx(L0e,{entry:n,onSelect:i=>t(`/entries/view/${i}`)})]})}const hSe={json:"JSON",csv:"CSV"},mSe={all:"all",...Object.fromEntries(nu.map(e=>[e.id,e.label]))},gSe=200,Sk=1e3,jk=1e4,Ok={"15m":15*6e4,"1h":60*6e4,"6h":6*60*6e4,"24h":24*60*6e4};function ySe(e){return e==="all"?{}:W$(e)}async function vSe(e,t,n,r,i){const o=[];let a;for(;o.length<n;){const s=Math.min(gSe,n-o.length),l=await e.entries({...t,limit:s,...a!==void 0?{cursor:a}:{}});let u=!1;for(const c of l.data){if(new Date(c.createdAt).getTime()<r){u=!0;break}if(o.push(c),o.length>=n)break}if(i(o.length),u||l.nextCursor===null)break;a=l.nextCursor}return o}function xSe({records:e}){return e.length===0?null:f.jsx("div",{className:"rounded-lg border border-line",children:f.jsxs(Ra,{className:"min-w-[640px] text-left",children:[f.jsx($a,{children:f.jsxs(en,{children:[f.jsx(Oe,{children:"Filename"}),f.jsx(Oe,{children:"Type"}),f.jsx(Oe,{children:"Rows"}),f.jsx(Oe,{children:"Format"}),f.jsx(Oe,{children:"Time"})]})}),f.jsx(Ma,{children:e.map(t=>f.jsxs(en,{className:"hover:bg-panel",children:[f.jsx(Ee,{className:"font-mono text-foreground",children:t.filename}),f.jsx(Ee,{className:"text-muted-foreground",children:t.type}),f.jsx(Ee,{className:"tabular-nums text-foreground",children:t.rows.toLocaleString()}),f.jsx(Ee,{className:"uppercase text-muted-foreground",children:t.format}),f.jsx(Ee,{className:"text-muted-foreground",children:new Date(t.at).toLocaleTimeString()})]},`${t.filename}:${t.at}`))})]})})}function bSe(){const e=ze(),t=j.useId(),n=j.useId(),[r,i]=j.useState("all"),[o,a]=j.useState("1h"),[s,l]=j.useState(""),[u,c]=j.useState(Sk),[d,p]=j.useState("json"),[m,v]=j.useState(!1),[h,g]=j.useState(null),[y,x]=j.useState(null),[b,S]=j.useState([]);async function w(){v(!0),x(null),g(0);const O=Math.min(Math.max(1,u),jk),P=Date.now()-(Ok[o]??Ok["1h"]),E={...ySe(r),...s.trim()!==""?{search:s.trim()}:{}};try{const A=await vSe(e,E,O,P,g),C=new Date().toISOString().replace(/[:.]/g,"-"),T=`telescope-export-${r}-${C}.${d}`;d==="csv"?rwe(T,nwe(A)):cO(T,A),S(_=>[{filename:T,type:r,rows:A.length,format:d,at:Date.now()},..._])}catch{x("Export failed while gathering entries.")}finally{v(!1)}}return f.jsxs("div",{className:"space-y-4 p-4",children:[f.jsxs("div",{className:"px-1",children:[f.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Export workbench"}),f.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Page captured entries into a downloadable JSON or CSV file. Gathering runs in your browser against the live store, newest-first within the selected window."})]}),f.jsxs("div",{className:"flex flex-wrap items-end gap-3 rounded-lg border border-line bg-panel/40 p-4",children:[f.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:["Type",f.jsxs(zw,{items:mSe,value:r,onValueChange:O=>{typeof O=="string"&&i(O)},children:[f.jsx(Vw,{"aria-label":"Entry type",children:f.jsx(Hw,{})}),f.jsxs(Ww,{children:[f.jsx(Xc,{value:"all",children:"all"}),nu.map(O=>f.jsx(Xc,{value:O.id,children:O.label},O.id))]})]})]}),f.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:["Window",f.jsx(lc,{value:o,onChange:a})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",htmlFor:t,children:["Search",f.jsx($u,{id:t,type:"text",value:s,onChange:O=>l(O.target.value),placeholder:"content filter"})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",htmlFor:n,children:["Limit",f.jsx($u,{id:n,type:"number",min:1,max:jk,value:u,onChange:O=>c(Number(O.target.value)||Sk),className:"w-24 tabular-nums"})]}),f.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:["Format",f.jsxs(zw,{items:hSe,value:d,onValueChange:O=>p(O==="csv"?"csv":"json"),children:[f.jsx(Vw,{"aria-label":"Export format",children:f.jsx(Hw,{})}),f.jsxs(Ww,{children:[f.jsx(Xc,{value:"json",children:"JSON"}),f.jsx(Xc,{value:"csv",children:"CSV"})]})]})]}),f.jsx(Qe,{onClick:w,disabled:m,size:"md",children:m?"Exporting…":"Export"}),m&&h!==null&&f.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:["gathered ",h.toLocaleString(),"…"]})]}),y&&f.jsx("p",{className:"px-1 text-xs text-bad",children:y}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h4",{className:"px-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Recent exports (this session)"}),b.length===0?f.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-10 text-center text-xs text-muted-foreground",children:"No exports yet. Pick a type, window, and format, then export."}):f.jsx(xSe,{records:b})]})]})}const p3=j.createContext(null);function Pk(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>String(t[r]??""))}function wSe(e,t){return e.showWhen?Object.entries(e.showWhen).every(([n,r])=>r.some(i=>i===t[n])):!0}function SSe({ext:e,children:t}){var h,g;const n=Oz(),r=yo(),i=Ea(),[o,a]=j.useState(null),[s,l]=j.useState(!1),[u,c]=j.useState(null),d=(((h=i.data)==null?void 0:h.actions)??[]).filter(y=>y.ext===e),m=((g=i.data)==null?void 0:g.mutations)===!0&&(n==null?void 0:n.extAction)!==void 0?{info:y=>d.find(x=>x.name===y.name),request(y,x){const b=d.find(P=>P.name===y.name);if(!b)return;const S=y.label??b.label??b.name,w=y.confirm??b.confirm??`${S}?`,O={};for(const[P,E]of Object.entries(y.input??{}))O[P]=Pk(E,x);c(null),a({ext:e,name:b.name,label:S,question:Pk(w,x),destructive:y.destructive??b.destructive??!1,input:O})}}:null;async function v(){if(!(!o||!(n!=null&&n.extAction))){l(!0);try{await n.extAction(o.ext,o.name,o.input),c({ok:!0,text:`${o.label}: done.`}),await r.invalidateQueries({queryKey:["telescope","ext-data",o.ext]})}catch(y){c({ok:!1,text:`${o.label} failed: ${y instanceof Error?y.message:String(y)}`})}finally{l(!1),a(null)}}}return f.jsxs(p3.Provider,{value:m,children:[u&&f.jsx("output",{className:`mb-3 block rounded border px-3 py-1.5 text-xs ${u.ok?"tint-good":"tint-bad"}`,children:u.text}),t,f.jsx(Qj,{open:o!==null,onOpenChange:y=>{!y&&!s&&a(null)},children:f.jsxs(Jj,{"aria-label":"Confirm action",className:"space-y-3 p-4",children:[f.jsx(mF,{children:o==null?void 0:o.label}),f.jsx(oxe,{children:o==null?void 0:o.question}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx(Qe,{variant:"ghost",disabled:s,onClick:()=>a(null),children:"Cancel"}),f.jsx(Qe,{variant:o!=null&&o.destructive?"bad":"solid",disabled:s,onClick:()=>void v(),children:o==null?void 0:o.label})]})]})})]})}function jSe({action:e,row:t}){const n=j.useContext(p3),r=n==null?void 0:n.info(e);return n===null||r===void 0||!wSe(e,t)?null:f.jsx(Qe,{size:"xs",variant:e.destructive??r.destructive?"bad":"outline",className:"ml-2",onClick:()=>n.request(e,t),children:e.label??r.label??r.name})}function OSe({title:e,segments:t,style:n="donut",height:r=220,onSelect:i}){const o=r-64,a=j.useMemo(()=>sc(t.map(c=>c.label),(c,d)=>{var p;return Sx(c,d,(p=t[d])==null?void 0:p.color)}),[t]);function s(c){const d=t[c];d&&i&&i(Gd({label:d.label,value:d.value}))}const l=i?{onClick:(c,d)=>s(d),cursor:"pointer"}:{};if(t.length===0)return f.jsx(da,{title:e,height:o,children:f.jsx(Xd,{height:o})});if(n==="bar"){const c=[{name:"breakdown",...Object.fromEntries(t.map(d=>[d.label,d.value]))}];return f.jsx(da,{title:e,height:o,children:f.jsx($s,{config:a,children:f.jsxs(xj,{data:c,layout:"vertical",children:[f.jsx(Cu,{content:f.jsx(Tu,{hideLabel:!0})}),f.jsx(vw,{content:f.jsx(bw,{})}),t.map((d,p)=>f.jsx(jo,{dataKey:d.label,stackId:"a",fill:Sx(d.label,p,d.color),isAnimationActive:!1,...i?{onClick:()=>s(p),cursor:"pointer"}:{}},d.label))]})})})}const u=t.map((c,d)=>({name:c.label,value:c.value,color:Sx(c.label,d,c.color)}));return f.jsx(da,{title:e,height:o,children:f.jsx($s,{config:a,children:f.jsxs(Xhe,{children:[f.jsx(Cu,{content:f.jsx(Tu,{hideLabel:!0})}),f.jsx(vw,{content:f.jsx(bw,{})}),f.jsx(So,{data:u,dataKey:"value",nameKey:"name",innerRadius:"55%",outerRadius:"80%",isAnimationActive:!1,...l,children:u.map(c=>f.jsx(Ju,{fill:c.color},c.name))})]})})})}function PSe(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}const ESe={p50:"tint-good",p95:"tint-warn",p99:"tint-bad"};function ASe({title:e,buckets:t,p50:n,p95:r,p99:i,height:o=220,onSelect:a}){const s=[];n!==void 0&&s.push([n,"p50"]),r!==void 0&&s.push([r,"p95"]),i!==void 0&&s.push([i,"p99"]);const l=o-64,u=j.useMemo(()=>sc(["count"],()=>"var(--live)"),[]),c=a?{onClick:(d,p)=>{const m=t[p];m&&a(Gd({label:m.label,value:m.count}))},cursor:"pointer"}:{};return f.jsx(da,{title:e,height:l,children:f.jsxs("div",{className:"flex h-full flex-col",children:[s.length>0&&f.jsx("div",{className:"mb-1.5 flex flex-wrap gap-2",children:s.map(([d,p])=>f.jsxs("span",{className:`rounded border px-1.5 text-[10px] tabular-nums ${ESe[p]}`,children:[p,": ",PSe(d)]},p))}),f.jsx("div",{className:"min-h-0 flex-1",children:t.length===0?f.jsx(Xd,{}):f.jsx($s,{config:u,children:f.jsxs(xj,{data:t,margin:{top:4,right:8,bottom:0,left:-16},children:[f.jsx(Vd,{vertical:!1}),f.jsx(co,{dataKey:"label",tickLine:!1}),f.jsx(fo,{tickLine:!1,allowDecimals:!1,width:40}),f.jsx(Cu,{cursor:{fill:"color-mix(in srgb, var(--text) 5%, transparent)"},content:f.jsx(Tu,{})}),f.jsx(jo,{dataKey:"count",name:"count",fill:Zi("count"),radius:[3,3,0,0],isAnimationActive:!1,...c})]})})})]})})}function CSe({title:e,value:t,min:n=0,max:r=1,label:i,color:o="var(--good)",height:a=220}){const s=r-n,l=s===0?0:Math.max(0,Math.min(1,(t-n)/s)),u=i??`${Math.round(l*100)}%`,c=a-64,d=j.useMemo(()=>sc(["value"],()=>o,()=>e),[o,e]),p=[{value:l*100}];return f.jsx(da,{title:e,height:c,children:f.jsxs("div",{className:"relative h-full",children:[f.jsx($s,{config:d,children:f.jsxs(Yhe,{innerRadius:"60%",outerRadius:"100%",data:p,startAngle:180,endAngle:0,barSize:16,children:[f.jsx(nc,{type:"number",domain:[0,100],tick:!1,axisLine:!1}),f.jsx(Hd,{dataKey:"value",fill:Zi("value"),background:!0,cornerRadius:4,isAnimationActive:!1})]})}),f.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center pt-[40%]",children:f.jsx("span",{className:"text-xl font-semibold tabular-nums text-foreground",children:u})})]})})}function TSe({columns:e}){const[t,n]=j.useState(!1),r=j.useRef(null),i=e.filter(a=>a.getCanHide());if(j.useEffect(()=>{if(!t)return;function a(l){var u;l.target instanceof Node&&((u=r.current)!=null&&u.contains(l.target))||n(!1)}function s(l){l.key==="Escape"&&n(!1)}return document.addEventListener("mousedown",a),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",s)}},[t]),i.length===0)return null;const o=i.filter(a=>!a.getIsVisible()).length;return f.jsxs("div",{className:"relative",ref:r,children:[f.jsxs(Qe,{variant:"ghost",size:"xs","aria-haspopup":"menu","aria-expanded":t,onClick:()=>n(a=>!a),className:"px-1.5 text-muted-foreground",children:["Columns",o>0?` (${i.length-o}/${i.length})`:""]}),t&&f.jsx("div",{role:"menu",className:"absolute right-0 z-20 mt-1 min-w-[10rem] rounded border border-line bg-popover p-1 shadow-lg",children:i.map(a=>f.jsxs(Qe,{role:"menuitemcheckbox","aria-checked":a.getIsVisible(),variant:"ghost",size:"xs",onClick:()=>a.toggleVisibility(),className:"w-full justify-start gap-2 normal-case tracking-normal",children:[f.jsx("span",{"aria-hidden":"true",className:a.getIsVisible()?"":"opacity-30",children:a.getIsVisible()?"☑":"☐"}),typeof a.columnDef.header=="string"?a.columnDef.header:a.id]},a.id))})]})}function _Se(e){return kSe(e)||typeof e=="function"||NSe(e)}function kSe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function NSe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function os(e,t){return e==null?null:_Se(e)?D.createElement(e,t):e}function RSe(e){var t,n;if("cell"in e&&e.cell){const r=e.cell,i=r.column.columnDef,o=r,a=i;return(t=o.getIsAggregated)!=null&&t.call(o)?os(a.aggregatedCell??i.cell,r.getContext()):(n=o.getIsPlaceholder)!=null&&n.call(o)?null:os(i.cell,r.getContext())}return"header"in e&&e.header?os(e.header.column.columnDef.header,e.header.getContext()):"footer"in e&&e.footer?os(e.footer.column.columnDef.footer,e.footer.getContext()):null}function $Se({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:o,checkDirty:a,shallowPropagate:s};function r(u,c,d){const p=c.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:c.deps;if(m!==void 0&&m.dep===u){m.version=d,c.depsTail=m;return}const v=u.subsTail;if(v!==void 0&&v.version===d&&v.sub===c)return;const h=c.depsTail=u.subsTail={version:d,dep:u,sub:c,prevDep:p,nextDep:m,prevSub:v,nextSub:void 0};m!==void 0&&(m.prevDep=h),p!==void 0?p.nextDep=h:c.deps=h,v!==void 0?v.nextSub=h:u.subs=h}function i(u,c=u.sub){const d=u.dep,p=u.prevDep,m=u.nextDep,v=u.nextSub,h=u.prevSub;return m!==void 0?m.prevDep=p:c.depsTail=p,p!==void 0?p.nextDep=m:c.deps=m,v!==void 0?v.prevSub=h:d.subsTail=h,h!==void 0?h.nextSub=v:(d.subs=v)===void 0&&n(d),m}function o(u){let c=u.nextSub,d;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&l(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&t(p),m&1){const v=p.subs;if(v!==void 0){const h=(u=v).nextSub;h!==void 0&&(d={value:c,prev:d},c=h);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function a(u,c){let d,p=0,m=!1;e:do{const v=u.dep,h=v.flags;if(c.flags&16)m=!0;else if((h&17)===17){if(e(v)){const g=v.subs;g.nextSub!==void 0&&s(g),m=!0}}else if((h&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=v.deps,c=v,++p;continue}if(!m){const g=u.nextDep;if(g!==void 0){u=g;continue}}for(;p--;){const g=c.subs,y=g.nextSub!==void 0;if(y?(u=d.value,d=d.prev):u=g,m){if(e(c)){y&&s(g),c=u.sub;continue}m=!1}else c.flags&=-33;c=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return m}while(!0)}function s(u){do{const c=u.sub,d=c.flags;(d&48)===32&&(c.flags=d|16,(d&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let d=c.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function MSe(e,t,n){var o,a,s;const r=typeof e=="object",i=r?e:void 0;return{next:(o=r?e.next:e)==null?void 0:o.bind(i),error:(a=r?e.error:t)==null?void 0:a.bind(i),complete:(s=r?e.complete:n)==null?void 0:s.bind(i)}}const Qw=[];let vh=0;const{link:Ek,unlink:ISe,propagate:DSe,checkDirty:h3,shallowPropagate:Ak}=$Se({update(e){return e._update()},notify(e){Qw[Jw++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,cg(e))}});let Xp=0,Jw=0,ci,Zw=0;function LSe(e){try{++Zw,e()}finally{--Zw||m3()}}function cg(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=ISe(n,e)}function m3(){if(!(Zw>0)){for(;Xp<Jw;){const e=Qw[Xp];Qw[Xp++]=void 0,e.notify()}Xp=0,Jw=0}}function FSe(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?0:1,get(){return ci!==void 0&&Ek(i,ci,vh),i._snapshot},subscribe(o){const a=MSe(o),s={current:!1},l=BSe(()=>{var u;i.get(),s.current?(u=a.next)==null||u.call(a,i._snapshot):s.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(o){const a=ci,s=(t==null?void 0:t.compare)??Object.is;if(n)ci=i,++vh,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=5);try{const l=i._snapshot,u=typeof o=="function"?o(l):o===void 0&&n?r(l):o;return l===void 0||!s(l,u)?(i._snapshot=u,!0):!1}finally{ci=a,n&&(i.flags&=-5),cg(i)}}};return n?(i.flags=17,i.get=function(){const o=i.flags;if(o&16||o&32&&h3(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&Ak(a)}}else o&32&&(i.flags=o&-33);return ci!==void 0&&Ek(i,ci,vh),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(DSe(a),Ak(a),m3())}},i}function BSe(e){const t=()=>{const r=ci;ci=n,++vh,n.depsTail=void 0,n.flags=6;try{return e()}finally{ci=r,n.flags&=-5,cg(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&h3(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,cg(this)}};return t(),n}function gf(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Ck(e);if(n.length!==Ck(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Ck(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function USe(e,t){return e===t}function g3(e,t=r=>r,n){const r=(n==null?void 0:n.compare)??USe,i=j.useCallback(a=>{const{unsubscribe:s}=e.subscribe(a);return s},[e]),o=j.useCallback(()=>e.get(),[e]);return QL.useSyncExternalStoreWithSelector(i,o,o,t,r)}function zSe(e){const t=g3(e.source,e.selector,{compare:gf});return typeof e.children=="function"?e.children(t):e.children}function HSe(e){const t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),"set"in e&&(t.setState=e.set.bind(e)),t}function VSe(e){const{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw new Error("Feature not supported in current reactivity implementation")},unmount:()=>{throw new Error("Feature not supported in current reactivity implementation")},schedule:e.schedule??(i=>queueMicrotask(i)),batch:n,untrack:i=>i(),createReadonlyAtom:(i,o)=>{const a=(o==null?void 0:o.compare)??Object.is;let s=!1,l;const u=()=>{const d=i();return(!s||!a(l,d))&&(l=d,s=!0),l},c=t(()=>(r.get(),u()),{compare:a});return{get:u,subscribe:c.subscribe.bind(c)}},createWritableAtom:(i,o)=>t(i,{compare:o==null?void 0:o.compare}),commit:()=>{r.set(i=>i+1)}}}function WSe(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:i=>{r=i,n=!0},subscribe:i=>e.subscribe(o=>{(!n||!t(r,o))&&i(o)})}}function qSe(){return VSe({createAtom:FSe,batch:LSe})}function uc(e,t){return typeof e=="function"?e(t):e}function ho(e){if(Array.isArray(e))return e.map(ho);if(e&&typeof e=="object"){const t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;const n=t===null?_n():{},r=Object.keys(e);for(let i=0;i<r.length;i++){const o=r[i];Object.defineProperty(n,o,{configurable:!0,enumerable:!0,value:ho(e[o]),writable:!0})}return n}return e}function _n(){return Object.create(null)}function Qy(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gO(e,t){return n=>{var r;(((r=t.options.atoms)==null?void 0:r[e])??t.baseAtoms[e]).set(i=>uc(n,i))}}function Tk(e){if(typeof e!="object"||e===null)return!1;if(Array.isArray(e))return!0;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function _k(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}const KSe=3;function GSe(e,t){return y3(e,t,KSe)}function y3(e,t,n){if(Object.is(e,t))return!0;if(n<=0||!Tk(e)||!Tk(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;const r=_k(e),i=_k(t);if(r.length!==i.length)return!1;const o=e,a=t;for(let s=0;s<r.length;s++){const l=r[s];if(!Object.prototype.propertyIsEnumerable.call(t,l)||!y3(o[l],a[l],n-1))return!1}return!0}function cc(e,t,n,r=GSe){const i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,o=e.options[i];o&&o(a=>{const s=uc(n,a);return r(a,s)?a:s})}function v3(e){return e instanceof Function}function XSe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a.length&&r(a)})};return r(e),n}const YSe=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:o})=>{let a=[],s;return u=>{i==null||i();const c=t==null?void 0:t(u);let d=!c||c.length!==(a==null?void 0:a.length);if(!d&&c){for(let p=0;p<c.length;p++)if(c[p]!==a[p]){d=!0;break}}return n==null||n(d),d&&(a=c,o==null||o(),s=e(...c??[]),r==null||r(s)),s}};function QSe(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}function yO({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...o}){const a=()=>{if(!r)return;const{schedule:l,untrack:u}=i._reactivity;l(()=>u(()=>r()))};return YSe({...o,...{onAfterUpdate:()=>{a()}}})}function x3(e,t="_"){const[n,r]=e.split(t);return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function Ia(e,t,n){for(const[r,{fn:i,memoDeps:o}]of Object.entries(n)){const{fnKey:a,fnName:s}=x3(r);t[a]=o?yO({memoDeps:o,fn:i,fnName:s,table:t,feature:e}):i}}function wa(e,t,n,r){for(const[i,{fn:o,memoDeps:a}]of Object.entries(r)){const{fnKey:s,fnName:l}=x3(i);if(a){const u=`_memo_${s}`;t[s]=function(...c){if(!this[u]){const d=this;this[u]=yO({memoDeps:p=>a(d,p),fn:(...p)=>o(d,...p),fnName:l,objectId:d.id,table:n,feature:e})}return this[u](...c)}}else t[s]=function(...u){return o(this,...u)}}}function mn(e,t,n,...r){var i;return((i=e[t])==null?void 0:i.call(e,...r))??n(e,...r)}function JSe(e){return e.row.getValue(e.column.id)}function ZSe(e){return e.getValue()??e.table.options.renderFallbackValue}function eje(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}const tje={assignCellPrototype:(e,t)=>{wa("coreCellsFeature",e,t,{cell_getValue:{fn:n=>JSe(n)},cell_renderValue:{fn:n=>ZSe(n)},cell_getContext:{fn:n=>eje(n),memoDeps:n=>[n]}})}};function nje(e){var t,n;if(!e._headerPrototype){e._headerPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignHeaderPrototype)==null||n.call(t,e._headerPrototype,e)}return e._headerPrototype}function b3(e,t,n){const r=nje(e),i=Object.create(r);i.colSpan=0,i.column=t,i.depth=n.depth,i.headerGroup=null,i.id=n.id??t.id,i.index=n.index,i.isPlaceholder=!!n.isPlaceholder,i.placeholderId=n.placeholderId,i.rowSpan=0,i.subHeaders=[];const o=e._headerInstanceInitFns;for(let a=0;a<o.length;a++)o[a](i);return i}function w3(){return{start:[],end:[]}}function rje(){return _n()}function S3(e,t){fg(e)&&Jy(e.table,n=>{const r=Object.assign(_n(),n),i=t??!mn(e,"getIsVisible",er),o=e.getLeafColumns();for(let a=0;a<o.length;a++){const s=o[a];fg(s)&&(r[s.id]=i)}return r})}function er(e){var r;const t=(r=e.table.atoms.columnVisibility)==null?void 0:r.get();if(!t)return!0;const n=e.columns;return n.length?n.some(i=>mn(i,"getIsVisible",er)):(Qy(t,e.id)?t[e.id]:void 0)??!0}function fg(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function ije(e){return t=>{S3(e,t.target.checked)}}function oje(e){var u;const t=e.getAllCells(),n=[];for(let c=0;c<t.length;c++){const d=t[c];mn(d.column,"getIsVisible",er)&&n.push(d)}const{start:r,end:i}=((u=e.table.atoms.columnPinning)==null?void 0:u.get())??w3();if(!r.length&&!i.length)return n;const o=mn(e,"getVisibleCellsByColumnId",j3),a=[];for(let c=0;c<r.length;c++){const d=o[r[c]];d&&a.push(d)}const s=[];for(let c=0;c<i.length;c++){const d=o[i[c]];d&&s.push(d)}const l=[];for(let c=0;c<n.length;c++){const d=n[c],p=d.column.id;!r.includes(p)&&!i.includes(p)&&l.push(d)}return[...a,...l,...s]}function j3(e){const t=_n(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];mn(i.column,"getIsVisible",er)&&(t[i.column.id]=i)}return t}function aje(e){return e.getAllFlatColumns().filter(t=>mn(t,"getIsVisible",er))}function O3(e){return e.getAllLeafColumns().filter(t=>mn(t,"getIsVisible",er))}function Jy(e,t){cc(e,"columnVisibility",t)}function sje(e,t){Jy(e,t?_n():Object.assign(_n(),ho(e.initialState.columnVisibility??{})))}function P3(e,t){t=t??!E3(e);const n=_n(),r=e.getAllLeafColumns();for(let i=0;i<r.length;i++){const o=r[i];n[o.id]=t||!fg(o)}Jy(e,n)}function E3(e){return!e.getAllLeafColumns().some(t=>!mn(t,"getIsVisible",er))}function lje(e){return e.getAllLeafColumns().some(t=>mn(t,"getIsVisible",er))}function uje(e){return t=>{P3(e,t.target.checked)}}function A3(e,t=1){let n=t;for(let r=0;r<e.length;r++){const i=e[r];mn(i,"getIsVisible",er)&&i.columns.length&&(n=Math.max(n,A3(i.columns,t+1)))}return n}function cje(e,t){return String(t)}function fje(e,t,n,r){let i=e??"";return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}function dje(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}function C3(e,t,n,r,i,o){const a={depth:t,id:cje(r,t),headers:[]},s=[];for(let l=0;l<e.length;l++){if(!(l in e))continue;const u=e[l],c=s[s.length-1],d=u.column.depth===a.depth;let p,m=!1;if(d&&u.column.parent?p=u.column.parent:(p=u.column,m=!0),c&&c.column===p)c.subHeaders.push(u);else{const v=b3(n,p,{id:fje(r,t,p.id,u.id),isPlaceholder:m,placeholderId:m?String(dje(s,p)):void 0,depth:t,index:s.length});v.subHeaders.push(u),s.push(v)}a.headers.push(u),u.headerGroup=a}for(let l=0;l<o.length;l++)o[l](a);i.push(a),t>0&&C3(s,t-1,n,r,i,o)}function T3(e){for(let t=0;t<e.length;t++){const n=e[t];if(!mn(n.column,"getIsVisible",er))continue;let r=0;if(n.subHeaders.length){T3(n.subHeaders);for(let i=0;i<n.subHeaders.length;i++){const o=n.subHeaders[i];mn(o.column,"getIsVisible",er)&&(r+=o.colSpan)}}else r=1;if(n.colSpan=r,n.isPlaceholder&&n.subHeaders.length===1&&n.subHeaders[0].column===n.column){let i=1,o=n.subHeaders[0];for(;o;)o.rowSpan=0,i++,o=o.subHeaders.length===1&&o.subHeaders[0].column===n.column?o.subHeaders[0]:void 0;n.rowSpan=i}else n.rowSpan=1}}function kk(e,t,n,r){var l;const i=A3(e),o=[],a=n._headerGroupInstanceInitFns,s=new Array(t.length);for(let u=0;u<t.length;u++)u in t&&(s[u]=b3(n,t[u],{depth:i,index:u}));return C3(s,i-1,n,r,o,a),o.reverse(),T3(((l=o[0])==null?void 0:l.headers)??[]),o}function pje(e){var t,n;if(!e._columnPrototype){e._columnPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignColumnPrototype)==null||n.call(t,e._columnPrototype,e)}return e._columnPrototype}function hje(e,t,n,r){const i={...e.getDefaultColumnDef(),...t},o=i.accessorKey,a=o===void 0?void 0:String(o),s=i.id??(a==null?void 0:a.replaceAll(".","_"))??(typeof i.header=="string"?i.header:void 0);let l;if(i.accessorFn)l=i.accessorFn;else if(o!==void 0)if(typeof o=="string"&&o.includes(".")){const p=o.split(".");l=m=>{let v=m;for(let h=0;h<p.length;h++){const g=p[h];v=v==null?void 0:v[g]}return v}}else l=p=>p[i.accessorKey];if(!s)throw new Error;const u=pje(e),c=Object.create(u);c.accessorFn=l,c.columnDef=i,c.columns=[],c.depth=n,c.id=`${String(s)}`,c.parent=r;const d=e._columnInstanceInitFns;for(let p=0;p<d.length;p++)d[p](c);return c}function _3(e){var n;const t=(n=e.atoms.columnOrder)==null?void 0:n.get();return r=>{let i=[];if(!(t!=null&&t.length))i=r;else{const o=new Map;for(let a=0;a<r.length;a++){const s=r[a];o.set(s.id,s)}for(let a=0;a<t.length;a++){const s=t[a],l=o.get(s);l&&(i.push(l),o.delete(s))}for(let a=0;a<r.length;a++){const s=r[a];o.has(s.id)&&i.push(s)}}return mje(e,i)}}function mje(e,t){var s;const n=((s=e.atoms.grouping)==null?void 0:s.get())??[],{groupedColumnMode:r}=e.options;if(!n.length||!r)return t;const i=t.filter(l=>!n.includes(l.id));if(r==="remove")return i;const o=new Map;for(let l=0;l<t.length;l++){const u=t[l];o.set(u.id,u)}const a=[];for(let l=0;l<n.length;l++){const u=o.get(n[l]);u&&a.push(u)}return[...a,...i]}function gje(e){return[e,...e.columns.flatMap(t=>t.getFlatColumns())]}function yje(e){if(e.columns.length){const t=e.columns.flatMap(n=>n.getLeafColumns());return mn(e.table,"getOrderColumns",_3)(t)}return[e]}function vje(e){return{header:t=>{const n=t.header.column.columnDef;return n.accessorKey?n.accessorKey:n.accessorFn?n.id:null},cell:t=>{var n,r;return((r=(n=t.renderValue())==null?void 0:n.toString)==null?void 0:r.call(n))??null},...Object.values(e._features).reduce((t,n)=>{var r;return Object.assign(t,(r=n.getDefaultColumnDef)==null?void 0:r.call(n))},{}),...e.options.defaultColumn}}function k3(e,t,n,r=0){const i=new Array(t.length);for(let o=0;o<t.length;o++){if(!(o in t))continue;const a=t[o],s=hje(e,a,r,n),l=a;s.columns=l.columns?k3(e,l.columns,s,r+1):[],i[o]=s}return i}function xje(e){return k3(e,e.options.columns)}function bje(e){return e.getAllColumns().flatMap(t=>t.getFlatColumns())}function wje(e){const t=_n(),n=e.getAllFlatColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function Sje(e){const t=e.getAllColumns().flatMap(n=>n.getLeafColumns());return mn(e,"getOrderColumns",_3)(t)}function jje(e){const t=_n(),n=e.getAllLeafColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function Oje(e,t){return e.getAllFlatColumnsById()[t]}const Pje={assignColumnPrototype:(e,t)=>{wa("coreColumnsFeature",e,t,{column_getFlatColumns:{fn:n=>gje(n),memoDeps:n=>[n.table.options.columns]},column_getLeafColumns:{fn:n=>yje(n),memoDeps:n=>{var r,i;return[(r=n.table.atoms.columnOrder)==null?void 0:r.get(),(i=n.table.atoms.grouping)==null?void 0:i.get(),n.table.options.columns,n.table.options.groupedColumnMode]}}})},constructTableAPIs:e=>{Ia("coreColumnsFeature",e,{table_getDefaultColumnDef:{fn:()=>vje(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>xje(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>bje(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>wje(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>Sje(e),memoDeps:()=>{var t,n;return[(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),e.options.columns,e.options.groupedColumnMode]}},table_getAllLeafColumnsById:{fn:()=>jje(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>Oje(e,t)}})}};function N3(e,t){for(let n=0;n<e.subHeaders.length;n++)N3(e.subHeaders[n],t);t.push(e)}function Eje(e){const t=[];return N3(e,t),t}function Aje(e){return{column:e.column,header:e,table:e.column.table}}function Cje(e){var u;const{start:t,end:n}=((u=e.atoms.columnPinning)==null?void 0:u.get())??w3(),r=e.getAllColumns(),i=mn(e,"getVisibleLeafColumns",O3);if(!t.length&&!n.length)return kk(r,i,e);const o=e.getAllLeafColumnsById(),a=[];for(let c=0;c<t.length;c++){const d=o[t[c]];d&&mn(d,"getIsVisible",er)&&a.push(d)}const s=[];for(let c=0;c<n.length;c++){const d=o[n[c]];d&&mn(d,"getIsVisible",er)&&s.push(d)}const l=i.filter(c=>!t.includes(c.id)&&!n.includes(c.id));return kk(r,[...a,...l,...s],e)}function Tje(e){return[...e.getHeaderGroups()].reverse()}function _je(e){const t=e.getHeaderGroups(),n=[];for(let r=0;r<t.length;r++){const i=t[r].headers;for(let o=0;o<i.length;o++)n.push(i[o])}return n}function kje(e){var r;const t=((r=e.getHeaderGroups()[0])==null?void 0:r.headers)??[],n=[];for(let i=0;i<t.length;i++){const o=t[i].getLeafHeaders();for(let a=0;a<o.length;a++)n.push(o[a])}return n}const Nje={assignHeaderPrototype:(e,t)=>{wa("coreHeadersFeature",e,t,{header_getLeafHeaders:{fn:n=>Eje(n),memoDeps:n=>[n.column.table.options.columns]},header_getContext:{fn:n=>Aje(n),memoDeps:n=>[n.column.table.options.columns]}})},constructTableAPIs:e=>{Ia("coreHeadersFeature",e,{table_getHeaderGroups:{fn:()=>Cje(e),memoDeps:()=>{var t,n,r,i;return[e.options.columns,(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),(r=e.atoms.columnPinning)==null?void 0:r.get(),(i=e.atoms.columnVisibility)==null?void 0:i.get(),e.options.groupedColumnMode]}},table_getFooterGroups:{fn:()=>Tje(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>_je(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>kje(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function Rje(e){var t,n;if(!e._rowPrototype){e._rowPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignRowPrototype)==null||n.call(t,e._rowPrototype,e)}return e._rowPrototype}const $je=(e,t,n,r,i,o,a)=>{const s=Rje(e),l=Object.create(s);l._displayIndexCache=-1,l._uniqueValuesCache=_n(),l._valuesCache=_n(),l.depth=i,l.id=t,l.index=r,l.original=n,l.parentId=a,l.subRows=[];const u=e._rowInstanceInitFns;for(let c=0;c<u.length;c++)u[c](l);return l},Mje=/([0-9]+)/gm;function fc(e){const t=Object.assign((n,r,i)=>{let o=n.getValue(i),a=r.getValue(i);const s=t.resolveDataValue;return s&&(o=s(o),a=s(a)),t.sort(o,a,n,r,i)},e);return t}fc({resolveDataValue:e=>Zy(e).toLowerCase(),sort:(e,t)=>$3(e,t)});fc({resolveDataValue:e=>Zy(e),sort:(e,t)=>$3(e,t)});fc({resolveDataValue:e=>Zy(e).toLowerCase(),sort:(e,t)=>vO(e,t)});fc({resolveDataValue:e=>Zy(e),sort:(e,t)=>vO(e,t)});fc({resolveDataValue:e=>Ije(e),sort:(e,t)=>e>t?1:e<t?-1:0});const R3=fc({sort:(e,t)=>vO(e,t)});function vO(e,t){return e===t?0:e>t?1:-1}function Ije(e){return e instanceof Date?e.getTime():e}function Zy(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function $3(e,t){let n=0,r=0;const i=e.length,o=t.length;for(;n<i&&r<o;){const a=dg(e.charCodeAt(n)),s=dg(t.charCodeAt(r)),l=e1(e,n,a),u=e1(t,r,s);if(!a&&!s){const d=Dje(e,n,l,t,r,u);if(d)return d;n=l,r=u;continue}if(a!==s)return a?1:-1;const c=Lje(e,n,l,t,r,u);if(c)return c;n=l,r=u}return Rk(e,n)-Rk(t,r)}function dg(e){return e>=48&&e<=57}function e1(e,t,n){let r=t+1;for(;r<e.length&&dg(e.charCodeAt(r))===n;)r++;return r}function Dje(e,t,n,r,i,o){const a=n-t,s=o-i,l=a<s?a:s;for(let u=0;u<l;u++){const c=e.charCodeAt(t+u),d=r.charCodeAt(i+u);if(c>d)return 1;if(d>c)return-1}return a>s?1:s>a?-1:0}function Lje(e,t,n,r,i,o){let a=t;for(;a<n&&e.charCodeAt(a)===48;)a++;let s=i;for(;s<o&&r.charCodeAt(s)===48;)s++;const l=n-a,u=o-s;if(l===0&&u===0)return 0;if(l<=15&&u<=15){const p=Nk(e,a,n),m=Nk(r,s,o);return p>m?1:m>p?-1:0}const c=parseInt(e.slice(t,n),10),d=parseInt(r.slice(i,o),10);return c>d?1:d>c?-1:0}function Nk(e,t,n){let r=0;for(let i=t;i<n;i++)r=r*10+e.charCodeAt(i)-48;return r}function Rk(e,t){let n=0,r=t;for(;r<e.length;)n++,r=e1(e,r,dg(e.charCodeAt(r)));return n}function Fje(){return[]}function Bje(e,t){cc(e,"cellSelection",ho(e.initialState.cellSelection)??Fje())}function Uje(e){e.atoms.cellSelection&&(e.options.autoResetAll??e.options.autoResetCellSelection??!0)&&e._reactivity.schedule(()=>Bje(e))}function zje(e){e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>Hje(e))}function Hje(e,t){const n=e.initialState.expanded;cc(e,"expanded",n===!0?!0:Object.assign(_n(),ho(n??{})))}const t1=0;function Vje(e){var t,n;if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if((((n=(t=e.atoms.pagination)==null?void 0:t.get())==null?void 0:n.pageIndex)??t1)===t1)return;Kje(e)}}function Wje(e,t){cc(e,"pagination",t)}function qje(e,t){Wje(e,n=>{let r=uc(t,n.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})}function Kje(e,t){qje(e,t1)}function Gje(){return[]}function ev(e,t){cc(e,"sorting",t)}function M3(e,t){ev(e,t?[]:ho(e.initialState.sorting??[]))}function Xje(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&M3(e)}function I3(e){const t=e.table._rowModelFns.sortFns,n=e.table.getFilteredRowModel().flatRows.slice(0,10);let r,i=!1;for(let o=0;o<n.length;o++){const a=n[o].getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]"){r="datetime";break}if(typeof a=="string"&&(i=!0,a.split(Mje).length>1)){r="alphanumeric";break}}if(!r&&i&&(r="text"),r){let o=t==null?void 0:t[r];if(o||r==="alphanumeric"&&(o=t==null?void 0:t.text),o)return o}return R3}function D3(e){const t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){const r=t[n].getValue(e.id);if(r!=null)return typeof r=="string"?"asc":"desc"}return"desc"}function Yje(e){const t=e.table._rowModelFns.sortFns;return v3(e.columnDef.sortFn)?e.columnDef.sortFn:e.columnDef.sortFn==="auto"?I3(e):(t==null?void 0:t[e.columnDef.sortFn])??R3}function L3(e,t,n){const r=B3(e,n&&pg(e)),i=typeof t<"u";ev(e.table,o=>{const a=o.findIndex(p=>p.id===e.id),s=a===-1?void 0:o[a];let l=[],u;const c=i?t:r==="desc",d=!!(o.length&&pg(e)&&n);return d?s?u="toggle":u="add":s?u="toggle":u="replace",u==="toggle"&&(i||r||(u="remove")),u==="add"?(l=[...o,{id:e.id,desc:c}],l.splice(0,l.length-(e.table.options.maxMultiSortColCount??Number.MAX_SAFE_INTEGER))):u==="toggle"?l=d?o.map(p=>p.id===e.id?{...p,desc:c}:p):[{id:e.id,desc:c}]:u==="remove"?l=d?o.filter(p=>p.id!==e.id):[]:l=[{id:e.id,desc:c}],l})}function F3(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??D3(e)==="desc"?"desc":"asc"}function B3(e,t){const n=F3(e),r=z3(e);return r?r!==n&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:r==="desc"?"asc":"desc":n}function U3(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function pg(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function z3(e){var n,r;const t=(r=(n=e.table.atoms.sorting)==null?void 0:n.get())==null?void 0:r.find(i=>i.id===e.id);return t?t.desc?"desc":"asc":!1}function Qje(e){var t,n;return((n=(t=e.table.atoms.sorting)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function Jje(e){ev(e.table,t=>t.length?t.filter(n=>n.id!==e.id):[])}function Zje(e){const t=U3(e);return n=>{var r,i;t&&L3(e,void 0,pg(e)?(i=(r=e.table.options).isMultiSortEvent)==null?void 0:i.call(r,n):!1)}}function eOe(){return e=>yO({feature:"coreRowModelsFeature",table:e,fnName:"table.getCoreRowModel",memoDeps:()=>[e.options.data],fn:()=>tOe(e,e.options.data),onAfterUpdate:QSe(()=>{zje(e),Vje(e),Xje(e),Uje(e)})})}function H3(e,t,n,r=0,i){var a;const o=[];for(let s=0;s<n.length;s++){const l=n[s],u=$je(e,e.getRowId(l,s,i),l,s,r,void 0,i==null?void 0:i.id);t.flatRows.push(u),t.rowsById[u.id]=u,o.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(l,s),(a=u.originalSubRows)!=null&&a.length&&(u.subRows=H3(e,t,u.originalSubRows,r+1,u)))}return o}function tOe(e,t){const n={rows:[],flatRows:[],rowsById:_n()};return n.rows=H3(e,n,t),n}function nOe(e){var t,n;return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=((n=(t=e.options.features).coreRowModel)==null?void 0:n.call(t,e))??eOe()(e)),e._rowModels.coreRowModel()}function rOe(e){return e.getCoreRowModel()}function iOe(e){var t,n;return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=(n=(t=e.options.features).filteredRowModel)==null?void 0:n.call(t,e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function oOe(e){return e.getFilteredRowModel()}function aOe(e){var t,n;return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=(n=(t=e.options.features).groupedRowModel)==null?void 0:n.call(t,e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function sOe(e){return e.getGroupedRowModel()}function lOe(e){var t,n;return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=(n=(t=e.options.features).sortedRowModel)==null?void 0:n.call(t,e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function uOe(e){return e.getSortedRowModel()}function cOe(e){var t,n;return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=(n=(t=e.options.features).expandedRowModel)==null?void 0:n.call(t,e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function fOe(e){return e.getExpandedRowModel()}function dOe(e){var t,n;return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=(n=(t=e.options.features).paginatedRowModel)==null?void 0:n.call(t,e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function pOe(e){return e.getPaginatedRowModel()}const hOe={constructTableAPIs:e=>{Ia("coreRowModelsFeature",e,{table_getCoreRowModel:{fn:()=>nOe(e)},table_getPreFilteredRowModel:{fn:()=>rOe(e)},table_getFilteredRowModel:{fn:()=>iOe(e)},table_getPreGroupedRowModel:{fn:()=>oOe(e)},table_getGroupedRowModel:{fn:()=>aOe(e)},table_getPreSortedRowModel:{fn:()=>sOe(e)},table_getSortedRowModel:{fn:()=>lOe(e)},table_getPreExpandedRowModel:{fn:()=>uOe(e)},table_getExpandedRowModel:{fn:()=>cOe(e)},table_getPrePaginatedRowModel:{fn:()=>fOe(e)},table_getPaginatedRowModel:{fn:()=>dOe(e)},table_getRowModel:{fn:()=>pOe(e)}})}};function mOe(e){var t,n;if(!e._cellPrototype){e._cellPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignCellPrototype)==null||n.call(t,e._cellPrototype,e)}return e._cellPrototype}function gOe(e,t,n){const r=mOe(n),i=Object.create(r);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;const o=n._cellInstanceInitFns;for(let a=0;a<o.length;a++)o[a](i);return i}function yOe(e){const t=e.table.getRowsInDisplayOrder(),n=e._displayIndexCache;return t[n]===e?n:-1}function vOe(e){const t=e.getPrePaginatedRowModel().rows;if(e.options.paginateExpandedRows===!1){const n=[],r=i=>{var o;i._displayIndexCache=n.length,n.push(i),i.subRows.length&&((o=i.getIsExpanded)!=null&&o.call(i))&&i.subRows.forEach(r)};return t.forEach(r),n}for(let n=0;n<t.length;n++)t[n]._displayIndexCache=n;return t}function xOe(e,t){if(Qy(e._valuesCache,t))return e._valuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]}function bOe(e,t){if(Qy(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function wOe(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function SOe(e){return XSe(e.subRows,t=>t.subRows)}function jOe(e){const t=e.getCoreRowModel().flatRows;let n=0;for(let r=0;r<t.length;r++)n=Math.max(n,t[r].depth);return n}function OOe(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function POe(e){const t=[];let n=e;for(;;){const r=n.getParentRow();if(!r)break;t.push(r),n=r}return t.reverse()}function EOe(e){const t=e.table.getAllLeafColumns();let n=e._cellsCache;n||(n=e._cellsCache=new WeakMap);const r=new Array(t.length);for(let i=0;i<t.length;i++){const o=t[i];let a=n.get(o);a||(a=gOe(o,e,e.table),n.set(o,a)),r[i]=a}return r}function AOe(e){const t=_n(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];t[i.column.id]=i}return t}function COe(e,t,n,r){var i,o;return((o=(i=t.options).getRowId)==null?void 0:o.call(i,e,n,r))??(r?`${r.id}.${n}`:String(n))}function TOe(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&(r=e.getCoreRowModel().rowsById[t],!r))throw new Error;return r}const _Oe={assignRowPrototype:(e,t)=>{wa("coreRowsFeature",e,t,{row_getDisplayIndex:{fn:n=>yOe(n)},row_getAllCellsByColumnId:{fn:n=>AOe(n),memoDeps:n=>[n.getAllCells()]},row_getAllCells:{fn:n=>EOe(n),memoDeps:n=>[n.table.getAllLeafColumns()]},row_getLeafRows:{fn:n=>SOe(n),memoDeps:n=>[n.subRows]},row_getParentRow:{fn:n=>OOe(n)},row_getParentRows:{fn:n=>POe(n)},row_getUniqueValues:{fn:(n,r)=>bOe(n,r)},row_getValue:{fn:(n,r)=>xOe(n,r)},row_renderValue:{fn:(n,r)=>wOe(n,r)}})},constructTableAPIs:e=>{Ia("coreRowsFeature",e,{table_getRowsInDisplayOrder:{fn:()=>vOe(e),memoDeps:()=>{var t;return[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?(t=e.atoms.expanded)==null?void 0:t.get():void 0]}},table_getRowId:{fn:(t,n,r)=>COe(t,e,n,r)},table_getRow:{fn:(t,n)=>TOe(e,t,n)},table_getMaxSubRowDepth:{fn:()=>jOe(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function V3(e,t,n=(r,i)=>r===i){const r=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(r)for(const i in r){const o=e.baseAtoms[i];if(!o)continue;const a=r[i],s=a===void 0?e.initialState[i]:a;n(e._reactivity.untrack(()=>o.get()),s)||o.set(()=>s)}})}function W3(e,t,n=(r,i)=>r===i){e._reactivity.batch(()=>{var r,i;V3(e,t,n),(i=(r=e._reactivity).commit)==null||i.call(r)})}function kOe(e){var r,i;const t=ho(e.initialState);e._reactivity.batch(()=>{const o=Object.keys(t);for(let a=0;a<o.length;a++){const s=o[a];e.baseAtoms[s].set(t[s])}});const n=Object.values(e._features);for(let o=0;o<n.length;o++)(i=(r=n[o]).resetTableInstanceData)==null||i.call(r,e)}function NOe(e,t){const{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};const o=e.options.mergeOptions(e.options,t),a={...Object.getOwnPropertyDescriptors(o)};return Object.defineProperties(Object.create(Object.getPrototypeOf(o)),{...a,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function q3(e,t,n){const r=NOe(e,uc(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,(n==null?void 0:n.syncExternalState)!==!1&&W3(e,r.state??null)}const ROe={constructTableAPIs:e=>{Ia("coreTablesFeature",e,{table_reset:{fn:()=>kOe(e)},table_setOptions:{fn:t=>q3(e,t)}})}},$Oe={coreCellsFeature:tje,coreColumnsFeature:Pje,coreHeadersFeature:Nje,coreRowModelsFeature:hOe,coreRowsFeature:_Oe,coreTablesFeature:ROe};function MOe(e,t={}){return Object.values(e).forEach(n=>{var r;t=((r=n.getInitialState)==null?void 0:r.call(n,t))??t}),ho(t)}function IOe(e){var O,P;const t=e.features.coreReactivityFeature,{aggregationFns:n,columnMeta:r,coreRowModel:i,expandedRowModel:o,facetedMinMaxValues:a,facetedRowModel:s,facetedUniqueValues:l,filterFns:u,filterMeta:c,filteredRowModel:d,groupedRowModel:p,paginatedRowModel:m,sortFns:v,sortedRowModel:h,tableMeta:g,...y}=e.features,x={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...$Oe,...y},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:n,filterFns:u,sortFns:v},_rowModels:{},atoms:{},baseAtoms:{}},b=Object.values(x._features),S={...b.reduce((E,A)=>{var C;return Object.assign(E,(C=A.getDefaultTableOptions)==null?void 0:C.call(A,x))},{}),...e};if(t.wrapExternalAtoms&&S.atoms)for(const[E,A]of Object.entries(S.atoms)){const C=A,T=t.createWritableAtom(C.get(),{debugName:`externalAtom/${E}`});S.atoms[E]=T;let _=!1;const k=C.subscribe(R=>{_||T.set(R)}),$=T.subscribe(R=>{_=!0,C.set(R),_=!1});t.addSubscription(k),t.addSubscription($)}t.createOptionsStore?(x.optionsStore=t.createWritableAtom(S,{debugName:"table/optionsStore"}),Object.defineProperty(x,"options",{configurable:!0,enumerable:!0,get(){return x.optionsStore.get()},set(E){x.optionsStore.set(()=>E)}})):x.options=S,x.initialState=MOe(x._features,x.options.initialState);const w=Object.keys(x.initialState);for(let E=0;E<w.length;E++){const A=w[E];x.baseAtoms[A]=t.createWritableAtom(x.initialState[A],{debugName:`table/baseAtoms/${A}`}),x.atoms[A]=t.createReadonlyAtom(()=>{var $;const C=x.options,T=($=C.atoms)==null?void 0:$[A],_=T?T.get():x.baseAtoms[A].get();if(T)return _;const k=C.state;if(k&&Qy(k,A)){const R=k[A];return R===void 0?x.initialState[A]:R}return _},{debugName:`table/atoms/${A}`})}V3(x),x.store=HSe(t.createReadonlyAtom(()=>{const E={};for(let A=0;A<w.length;A++){const C=w[A];E[C]=x.atoms[C].get()}return E},{compare:gf,debugName:"table/store"}));for(let E=0;E<b.length;E++){const A=b[E];(O=A.initTableInstanceData)==null||O.call(A,x),A.initCellInstanceData&&x._cellInstanceInitFns.push(A.initCellInstanceData.bind(A)),A.initColumnInstanceData&&x._columnInstanceInitFns.push(A.initColumnInstanceData.bind(A)),A.initHeaderGroupInstanceData&&x._headerGroupInstanceInitFns.push(A.initHeaderGroupInstanceData.bind(A)),A.initHeaderInstanceData&&x._headerInstanceInitFns.push(A.initHeaderInstanceData.bind(A)),A.initRowInstanceData&&x._rowInstanceInitFns.push(A.initRowInstanceData.bind(A)),(P=A.constructTableAPIs)==null||P.call(A,x)}return x}function DOe(){return[]}function K3(e){const t=e.table._rowModelFns.filterFns,n=e.table.getCoreRowModel().flatRows;let r;for(let a=0;a<n.length;a++){const s=n[a].getValue(e.id);if(s!=null){r=s;break}}let i;return typeof r=="string"?i="includesString":typeof r=="number"?i="inNumberRange":typeof r=="boolean"?i="equals":Array.isArray(r)?i="arrIncludes":Object.prototype.toString.call(r)==="[object Date]"?i="inDateRange":r!==null&&typeof r=="object"?i="equals":i="weakEquals",t==null?void 0:t[i]}function xO(e){let t=null;const n=e.table._rowModelFns.filterFns;return t=v3(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?K3(e):n==null?void 0:n[e.columnDef.filterFn],t??void 0}function LOe(e){return(e.columnDef.enableColumnFilter??!0)&&(e.table.options.enableColumnFilters??!0)&&(e.table.options.enableFilters??!0)&&!!e.accessorFn}function FOe(e){return G3(e)>-1}function BOe(e){var t,n,r;return(r=(n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.find(i=>i.id===e.id))==null?void 0:r.value}function G3(e){var t,n;return((n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function UOe(e,t){bO(e.table,n=>{const r=xO(e),i=n.find(s=>s.id===e.id),o=uc(t,i?i.value:void 0);if(X3(r,o,e))return n.filter(s=>s.id!==e.id);const a={id:e.id,value:o};return i?n.map(s=>s.id===e.id?a:s):n.length?[...n,a]:[a]})}function bO(e,t){const n=e.getAllLeafColumnsById();cc(e,"columnFilters",i=>uc(t,i).filter(o=>{const a=n[o.id];return!(a&&X3(xO(a),o.value,a))}))}function zOe(e,t){bO(e,t?[]:ho(e.initialState.columnFilters??[]))}function X3(e,t,n){return typeof t>"u"?!0:e!=null&&e.autoRemove?!!e.autoRemove(t,n):typeof t=="string"&&!t}const HOe={getInitialState:e=>({columnFilters:DOe(),...e}),getDefaultColumnDef:()=>({filterFn:"auto"}),getDefaultTableOptions:e=>({onColumnFiltersChange:gO("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),assignColumnPrototype:(e,t)=>{wa("columnFilteringFeature",e,t,{column_getAutoFilterFn:{fn:n=>K3(n)},column_getFilterFn:{fn:n=>xO(n)},column_getCanFilter:{fn:n=>LOe(n)},column_getIsFiltered:{fn:n=>FOe(n)},column_getFilterValue:{fn:n=>BOe(n)},column_getFilterIndex:{fn:n=>G3(n)},column_setFilterValue:{fn:(n,r)=>UOe(n,r)}})},initRowInstanceData:e=>{e.columnFilters=_n(),e.columnFiltersMeta=_n()},constructTableAPIs:e=>{Ia("columnFilteringFeature",e,{table_setColumnFilters:{fn:t=>bO(e,t)},table_resetColumnFilters:{fn:t=>zOe(e,t)}})}},VOe={getInitialState:e=>({columnVisibility:rje(),...e}),getDefaultTableOptions:e=>({onColumnVisibilityChange:gO("columnVisibility",e)}),assignColumnPrototype:(e,t)=>{wa("columnVisibilityFeature",e,t,{column_getIsVisible:{fn:n=>er(n),memoDeps:n=>{var r;return[t.options.columns,(r=t.atoms.columnVisibility)==null?void 0:r.get(),n.columns]}},column_getCanHide:{fn:n=>fg(n)},column_getToggleVisibilityHandler:{fn:n=>ije(n)},column_toggleVisibility:{fn:(n,r)=>S3(n,r)}})},assignRowPrototype:(e,t)=>{wa("columnVisibilityFeature",e,t,{row_getVisibleCells:{fn:n=>oje(n),memoDeps:n=>{var r,i;return[n.getAllCells(),(r=t.atoms.columnPinning)==null?void 0:r.get(),(i=t.atoms.columnVisibility)==null?void 0:i.get()]}},row_getVisibleCellsByColumnId:{fn:n=>j3(n),memoDeps:n=>{var r;return[n.getAllCells(),(r=t.atoms.columnVisibility)==null?void 0:r.get()]}}})},constructTableAPIs:e=>{Ia("columnVisibilityFeature",e,{table_getVisibleFlatColumns:{fn:()=>aje(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_getVisibleLeafColumns:{fn:()=>O3(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_setColumnVisibility:{fn:t=>Jy(e,t)},table_resetColumnVisibility:{fn:t=>sje(e,t)},table_toggleAllColumnsVisible:{fn:t=>P3(e,t)},table_getIsAllColumnsVisible:{fn:()=>E3(e)},table_getIsSomeColumnsVisible:{fn:()=>lje(e)},table_getToggleAllColumnsVisibilityHandler:{fn:()=>uje(e)}})}},WOe={getInitialState(e){return{sorting:Gje(),...e}},getDefaultColumnDef(){return{sortFn:"auto",sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:gO("sorting",e),isMultiSortEvent:t=>t.shiftKey}},assignColumnPrototype(e,t){wa("rowSortingFeature",e,t,{column_getAutoSortFn:{fn:n=>I3(n)},column_getAutoSortDir:{fn:n=>D3(n)},column_getSortFn:{fn:n=>Yje(n)},column_toggleSorting:{fn:(n,r,i)=>L3(n,r,i)},column_getFirstSortDir:{fn:n=>F3(n)},column_getNextSortingOrder:{fn:(n,r)=>B3(n,r)},column_getCanSort:{fn:n=>U3(n)},column_getCanMultiSort:{fn:n=>pg(n)},column_getIsSorted:{fn:n=>z3(n)},column_getSortIndex:{fn:n=>Qje(n)},column_clearSorting:{fn:n=>Jje(n)},column_getToggleSortingHandler:{fn:n=>Zje(n)}})},constructTableAPIs(e){Ia("rowSortingFeature",e,{table_setSorting:{fn:t=>ev(e,t)},table_resetSorting:{fn:t=>M3(e,t)}})}},qOe=typeof window>"u"?j.useEffect:j.useLayoutEffect;function KOe(e,t){const[{table:n,rootSource:r}]=j.useState(()=>{const l=IOe({...e,features:{coreReactivityFeature:qSe(),...e.features}});return l.Subscribe=u=>zSe({...u,source:u.source??l.store}),l.FlexRender=RSe,{table:l,rootSource:WSe(l.store,gf)}}),i=n;q3(i,l=>({...l,...e}),{syncExternalState:!1});const o=i.options.state,a=r.get(),s=g3(r,t,{compare:gf});return qOe(()=>{r.markCommitted(a),W3(i,o??null,gf)}),j.useMemo(()=>({...n,options:e,state:s}),[n,e,s])}const GOe={rowSortingFeature:WOe,columnFilteringFeature:HOe,columnVisibilityFeature:VOe};function XOe({direction:e}){return e==="asc"?f.jsx("span",{"aria-hidden":"true",children:"↑"}):e==="desc"?f.jsx("span",{"aria-hidden":"true",children:"↓"}):f.jsx("span",{"aria-hidden":"true",className:"opacity-30",children:"↕"})}function YOe({header:e,className:t}){const n=e.column.getIsSorted(),r=os(e.column.columnDef.header,e.getContext());return f.jsx(Oe,{className:`whitespace-nowrap p-0 ${t}`,"aria-sort":n==="asc"?"ascending":n==="desc"?"descending":"none",children:f.jsxs(Qe,{variant:"ghost",size:"xs",onClick:e.column.getToggleSortingHandler(),className:"w-full justify-start gap-1 px-3 py-2 font-normal",children:[r,f.jsx(XOe,{direction:n})]})})}function QOe({header:e}){const t=e.column.getFilterValue(),n=typeof t=="string"?t:"",[r,i]=j.useState(n);j.useEffect(()=>i(n),[n]);const o=()=>{r!==n&&e.column.setFilterValue(r)};return f.jsx($u,{value:r,"aria-label":`Filter by ${e.column.id}`,placeholder:"Filter…",className:"w-full py-0.5",onChange:a=>i(a.target.value),onBlur:o,onKeyDown:a=>{a.key==="Enter"&&o(),a.key==="Escape"&&i(n)}})}function JOe({table:e,sticky:t,menu:n}){var s;const r=((s=e.getHeaderGroups().at(-1))==null?void 0:s.headers)??[],i=r.some(l=>l.column.getCanFilter()),o=t?"sticky top-0 z-10 bg-panel":"",a=t?"sticky top-8 z-10 bg-panel":"";return f.jsxs($a,{children:[f.jsxs(en,{children:[r.map(l=>l.column.getCanSort()?f.jsx(YOe,{header:l,className:o},l.id):f.jsx(Oe,{className:`whitespace-nowrap ${o}`,children:os(l.column.columnDef.header,l.getContext())},l.id)),n?f.jsx(Oe,{className:`w-px whitespace-nowrap text-right ${o}`,children:n}):null]}),i&&f.jsxs(en,{children:[r.map(l=>f.jsx(Oe,{className:`py-1 ${a}`,children:l.column.getCanFilter()?f.jsx(QOe,{header:l}):null},l.id)),n?f.jsx(Oe,{className:a}):null]})]})}function ZOe(e,t){const n=e.replace(/\{(\w+)\}/g,(r,i)=>String(t[i]??""));return/^\s*(javascript|data|vbscript):/i.test(n)?"#":n}function ePe({spec:e,row:t}){const n=String(t[e.key]??""),r=e.link?f.jsx("a",{className:"text-sky-400 hover:underline",href:ZOe(e.link.href,t),...e.link.external?{target:"_blank",rel:"noreferrer"}:{},children:n}):n;return e.action?f.jsxs(f.Fragment,{children:[r,f.jsx(jSe,{action:e.action,row:t})]}):f.jsx(f.Fragment,{children:r})}function tPe(e){return e.map(t=>({id:t.key,accessorFn:n=>n[t.key],header:t.label,enableSorting:t.sortable===!0,enableColumnFilter:t.filterable===!0,enableHiding:t.hideable===!0,cell:({row:n})=>f.jsx(ePe,{spec:t,row:n.original})}))}const nPe="max-h-[28rem]";function rPe(e,t,n){return`${t.map(r=>String(e[r.key]??"")).join("|")}#${n}`}function iPe({columns:e,rows:t,sort:n,onSortChange:r,filters:i,onFiltersChange:o,scrolls:a}){const[s,l]=j.useState({}),u=j.useMemo(()=>tPe(e),[e]),c=n?[{id:n.key,desc:n.dir==="desc"}]:[],d=Object.entries(i??{}).map(([g,y])=>({id:g,value:y})),p=KOe({features:GOe,columns:u,data:t,state:{sorting:c,columnFilters:d,columnVisibility:s},onColumnVisibilityChange:l,onSortingChange:g=>{const x=(typeof g=="function"?g(c):g)[0];r==null||r(x?{key:x.id,dir:x.desc?"desc":"asc"}:void 0)},onColumnFiltersChange:g=>{const y=typeof g=="function"?g(d):g,x={};for(const b of y)typeof b.value=="string"&&b.value!==""&&(x[b.id]=b.value);o==null||o(x)},manualSorting:!0,manualFiltering:!0,getRowId:(g,y)=>rPe(g,e,y)}),m=p.getAllLeafColumns(),v=m.some(g=>g.getCanHide()),h=p.getVisibleLeafColumns().length+(v?1:0);return f.jsxs(Ra,{containerClassName:a?nPe:"",children:[f.jsx(JOe,{table:p,sticky:a===!0,...v?{menu:f.jsx(TSe,{columns:m})}:{}}),f.jsxs(Ma,{children:[t.length===0?f.jsx(en,{children:f.jsx(Ee,{colSpan:h,className:"py-6 text-center text-muted-foreground",children:"No data in this window."})}):null,p.getRowModel().rows.map(g=>f.jsxs(en,{children:[g.getVisibleCells().map(y=>f.jsx(Ee,{className:"whitespace-nowrap text-foreground",children:os(y.column.columnDef.cell,y.getContext())},y.id)),v?f.jsx(Ee,{}):null]},g.id))]})]})}function oPe(e,t){return t==="percent"?`${Math.round(e*100)}%`:t==="duration"?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`:t==="rate"?`${new Intl.NumberFormat().format(Math.round(e))}/hr`:new Intl.NumberFormat().format(e)}function Y3(e){if(typeof e!="object"||e===null||!("rows"in e))return[];const t=e.rows;return Array.isArray(t)?t.filter(n=>typeof n=="object"&&n!==null):[]}function Cx(e,t){if(typeof e!="object"||e===null||!(t in e))return;const n=Reflect.get(e,t);return typeof n=="number"&&Number.isFinite(n)?n:void 0}function aPe(e){const t=Y3(e);return{rows:t,total:Cx(e,"total")??t.length,page:Cx(e,"page")??1,limit:Cx(e,"limit")??0}}function sPe({title:e}){return f.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[f.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e}),f.jsx("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:"No data in this window."})]})}function lPe({page:e,totalPages:t,onPageChange:n}){return f.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[f.jsx(Qe,{variant:"outline",size:"xs",disabled:e<=1,onClick:()=>n==null?void 0:n(e-1),className:"px-1.5 text-muted-foreground",children:"Prev"}),f.jsxs("span",{children:["Page ",e," of ",t]}),f.jsx(Qe,{variant:"outline",size:"xs",disabled:e>=t,onClick:()=>n==null?void 0:n(e+1),className:"px-1.5 text-muted-foreground",children:"Next"})]})}function uPe({panel:e,data:t,onPageChange:n,requestedPage:r,sort:i,onSortChange:o,filters:a,onFiltersChange:s,onSelect:l}){const u=l?{onSelect:l}:{};switch(e.kind){case"stat":{const c=t??{};return f.jsx(Be,{label:e.title,value:oPe(c.value??0,e.format),...c.value!==void 0?{currentValue:c.value}:{},...c.delta!==void 0?{delta:c.delta}:{},...c.deltaLabel?{deltaLabel:c.deltaLabel}:{},...e.spark&&c.spark?{spark:c.spark}:{},...e.thresholds?{thresholds:e.thresholds}:{},...e.accent?{accent:e.accent}:{}})}case"distribution":{const c=t??{};return f.jsx(ASe,{title:e.title,buckets:c.buckets??[],...c.p50!==void 0?{p50:c.p50}:{},...c.p95!==void 0?{p95:c.p95}:{},...c.p99!==void 0?{p99:c.p99}:{},...u})}case"gauge":{const c=t??{};return f.jsx(CSe,{title:e.title,value:c.value??0,...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}})}case"breakdown":{const c=t??{};return f.jsx(OSe,{title:e.title,segments:c.segments??[],...e.style?{style:e.style}:{},...u})}case"timeseries":{const c=(t==null?void 0:t.rows)??[],d=e.series[0];return e.style==="stacked"?f.jsx(Xy,{title:e.title,data:c,series:e.series,...u}):f.jsx(Gs,{title:e.title,data:c.map(p=>({label:p.label,value:d?Number(p[d]??0):0})),...u})}case"topN":{const c=(t==null?void 0:t.items)??[],d=e.limit?c.slice(0,e.limit):c;return d.length===0?f.jsx(sPe,{title:e.title}):f.jsx(ws,{title:e.title,data:d,horizontal:!0,truncateLabel:32,...u})}case"table":{const c=f.jsx(iPe,{columns:e.columns,rows:Y3(t),scrolls:e.paged===!0,sort:i,...o?{onSortChange:o}:{},filters:a,...s?{onFiltersChange:s}:{}});if(e.paged){const{rows:d,total:p,page:m,limit:v}=aPe(t),h=Math.max(1,Math.ceil(p/(v||d.length||1)));return f.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[f.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2",children:[f.jsx("p",{className:"text-xs font-medium text-foreground",children:e.title}),f.jsx(lPe,{page:r??m,totalPages:h,...n?{onPageChange:n}:{}})]}),c]})}return f.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[f.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e.title}),c]})}default:return null}}const cPe="sort",fPe="dir",dPe="filter.";function pPe(e,t){const n=Object.entries(t.filters??{}).filter(([,i])=>i!=="");if(!t.paging&&!t.sort&&n.length===0)return e;const r={...e};t.paging&&(r.page=t.paging.page,r.limit=t.paging.limit),t.sort&&(r[cPe]=t.sort.key,r[fPe]=t.sort.dir);for(const[i,o]of n)r[`${dPe}${i}`]=o;return r}const hPe={1:"",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-2 lg:grid-cols-4"},mPe=50;function gPe(e){return"drilldown"in e?e.drilldown:void 0}function yPe({status:e}){const t=e==="live";return f.jsxs("span",{"data-telescope-status":e,className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide ${t?"tint-good":"tint-warn"}`,children:[f.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${t?"animate-pulse bg-good":"bg-warn"}`}),t?"live":e]})}function vPe({ext:e,panel:t,focus:n,onSelect:r}){const i=t.kind==="table"&&t.paged===!0,[o,a]=j.useState(1),[s,l]=j.useState(void 0),[u,c]=j.useState({}),d=n?{[n.param]:n.value}:void 0,p=d?{...t.data.query,...d}:t.data.query,m=pPe(p,{...i?{paging:{page:o,limit:mPe}}:{},...s?{sort:s}:{},filters:u}),v=uH(e,t.data.provider,m);return v.isError?f.jsxs("div",{className:"tint-bad rounded-lg border px-4 py-3 text-sm",children:['Failed to load "',t.title,'".']}):f.jsx(uPe,{panel:t,data:v.data,...i?{onPageChange:a,requestedPage:o}:{},sort:s,onSortChange:h=>{a(1),l(h)},filters:u,onFiltersChange:h=>{a(1),c(h)},...r?{onSelect:r}:{}})}function xPe(){var u,c;const{dashboardId:e}=Ng(),t=Ea(),{status:n}=jH(),[r,i]=j.useState(null),o=(c=(u=t.data)==null?void 0:u.dashboards)==null?void 0:c.find(d=>d.id===e);if(!o)return f.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Dashboard not found."});const a=(e==null?void 0:e.split(".")[0])??"",s=o.sections??[{panels:o.panels,cols:2}];function l(d,p){const m=p.id??p.label,v=p.series?`${p.series} · ${p.label}`:p.label;i(h=>(h==null?void 0:h.param)===d&&h.value===m?null:{param:d,value:m,label:v})}return f.jsx(SSe,{ext:a,children:f.jsxs("div",{className:"p-4",children:[f.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[f.jsx("h2",{className:"text-sm font-semibold text-foreground",children:o.label}),f.jsx(yPe,{status:n}),r&&f.jsxs("span",{className:"tint-brand inline-flex items-center gap-1 rounded border py-0.5 pl-1.5 text-[10px]",children:[r.param,": ",r.label,f.jsx(Qe,{variant:"ghost",size:"xs",className:"px-1 text-inherit",onClick:()=>i(null),children:"Clear"})]})]}),s.map((d,p)=>f.jsxs("section",{className:"mb-6",children:[d.title&&f.jsx("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-muted-foreground",children:d.title}),f.jsx("div",{className:`grid grid-cols-1 gap-3 ${hPe[d.cols??2]}`,children:d.panels.map(m=>{const v=gPe(m);return f.jsx(vPe,{ext:a,panel:m,focus:r,...v?{onSelect:h=>l(v.param,h)}:{}},`${m.kind}-${m.title}`)})})]},d.title??`s${p}`))]})})}function bPe({profile:e,selected:t,onSelect:n}){return f.jsxs("button",{type:"button",onClick:n,className:`flex w-full flex-col gap-0.5 border-b border-line-soft px-3 py-2 text-left hover:bg-panel ${t?"bg-panel":""}`,children:[f.jsx("span",{className:"truncate font-mono text-xs text-foreground",title:e.familyHash??e.id,children:e.familyHash??"(unlabelled)"}),f.jsxs("span",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[f.jsx("span",{children:e.durationMs!==null?Sd(e.durationMs):"—"}),e.tags.includes("manual")&&f.jsx("span",{className:"text-warn",children:"manual"}),e.tags.includes("sampled")&&f.jsx("span",{className:"text-sky-400",children:"sampled"}),f.jsx("span",{className:"ml-auto",children:Ao(new Date(e.createdAt).getTime())})]})]})}function wPe({hot:e}){return e.length===0?f.jsx("p",{className:"text-xs text-muted-foreground",children:"No hot frames."}):f.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[f.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[f.jsx("span",{className:"flex-1",children:"Function"}),f.jsx("span",{className:"w-16 text-right",children:"Self"}),f.jsx("span",{className:"w-12 text-right",children:"%"})]}),e.map(t=>f.jsxs("div",{className:"flex items-center gap-2 border-b border-line-soft px-3 py-1 text-[11px] last:border-0",children:[f.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-foreground",title:`${t.name} ${t.file}`,children:[t.name,t.file&&f.jsx("span",{className:"ml-1 text-muted-foreground",children:t.file})]}),f.jsx("span",{className:"w-16 text-right tabular-nums text-foreground",children:Sd(t.selfMs)}),f.jsx("span",{className:"w-12 text-right tabular-nums text-warn",children:t.selfPct.toFixed(1)})]},`${t.name}:${t.file}`))]})}function SPe({id:e}){const{data:t,isLoading:n}=wH(e);if(n)return f.jsx("p",{className:"text-muted-foreground",children:"Loading profile…"});if(!t)return f.jsx("p",{className:"text-muted-foreground",children:"Profile not found."});const r=t.content;return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1",children:[f.jsx("h3",{className:"font-mono text-sm text-foreground",children:r.label??"(unlabelled)"}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:[Sd(r.durationMs)," · ",r.sampleCount," samples · ",r.reason]})]}),f.jsx(A0e,{tree:r.tree}),f.jsx(wPe,{hot:r.hot})]})}function jPe({pendingManual:e}){const[t,n]=j.useState(1),[r,i]=j.useState(""),o=SH();return f.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border border-line bg-panel/40 px-3 py-2",children:[f.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Capture next"}),f.jsx("input",{type:"number",min:1,value:t,onChange:a=>n(Math.max(1,Number(a.target.value))),className:"w-14 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),f.jsx("span",{className:"text-[10px] text-muted-foreground",children:"request(s) matching"}),f.jsx("input",{type:"text",placeholder:"any route (e.g. GET /users/:id)",value:r,onChange:a=>i(a.target.value),className:"w-56 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),f.jsx("button",{type:"button",disabled:o.isPending,onClick:()=>o.mutate({count:t,...r?{label:r}:{}}),className:"rounded bg-primary px-2 py-0.5 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50",children:o.isPending?"Arming…":"Arm capture"}),e>0&&f.jsxs("span",{className:"text-[10px] text-warn",children:[e," pending"]}),o.isError&&f.jsx("span",{className:"text-[10px] text-bad",children:o.error instanceof Error?o.error.message:"Failed to arm (mutations disabled?)"})]})}function OPe(){var u,c,d,p,m;const e=Ea(),t=xH(),{data:n,isLoading:r}=bH(100),i=(n==null?void 0:n.data)??[],[o,a]=j.useState(null),s=((c=(u=e.data)==null?void 0:u.profiling)==null?void 0:c.enabled)??((d=t.data)==null?void 0:d.enabled)??!1,l=o??((p=i[0])==null?void 0:p.id)??null;return s?f.jsxs("div",{className:"space-y-4 p-4",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[f.jsx("h2",{className:"text-sm text-brand",children:"CPU Profiles"}),t.data&&f.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["sampling ",(t.data.sampleRate*100).toFixed(0),"% · ",t.data.active," active"]})]}),f.jsx(jPe,{pendingManual:((m=t.data)==null?void 0:m.pendingManual)??0}),f.jsxs("div",{className:"flex gap-4",children:[f.jsx("div",{className:"w-64 shrink-0 rounded-lg border border-line",children:r?f.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"Loading…"}):i.length===0?f.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"No profiles captured yet."}):i.map(v=>f.jsx(bPe,{profile:v,selected:v.id===l,onSelect:()=>a(v.id)},v.id))}),f.jsx("div",{className:"min-w-0 flex-1",children:l?f.jsx(SPe,{id:l}):f.jsx("p",{className:"text-xs text-muted-foreground",children:"Select a profile to view its flamegraph."})})]})]}):f.jsxs("div",{className:"space-y-3 p-4",children:[f.jsx("h2",{className:"text-sm text-brand",children:"CPU Profiles"}),f.jsxs("div",{className:"rounded-lg border border-line bg-panel/40 p-6 text-xs text-muted-foreground",children:[f.jsx("p",{className:"mb-2 text-foreground",children:"CPU profiling is disabled."}),f.jsxs("p",{children:["Enable it with"," ",f.jsxs("code",{className:"rounded bg-panel-2 px-1 text-brand",children:["profiling: ","{"," enabled: true ","}"]})," ","in ",f.jsx("code",{className:"rounded bg-panel-2 px-1",children:"TelescopeModule.forRoot"}),". Profiling is opt-in because it carries real CPU overhead; when off there is zero cost on the request path."]})]})]})}const PPe={scheduled:"text-sky-300 bg-sky-500/10",manual:"text-warn tint-warn"};function EPe({trigger:e}){return f.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${PPe[e]}`,children:e})}function APe({type:e,count:t}){return f.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[f.jsx("span",{className:"text-muted-foreground",children:Mg(e)}),f.jsx("span",{className:"tabular-nums text-foreground",children:t})]})}function CPe(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function TPe(e,t){if(e===null)return"—";const n=new Date(e).getTime()-t;if(Number.isNaN(n))return"—";if(n<=0)return"now";const r=Math.round(n/1e3);return r<60?`~${r}s`:`~${Math.floor(r/60)}m ${r%60}s`}function _Pe(){const[e,t]=j.useState(()=>Date.now());return j.useEffect(()=>{const n=setInterval(()=>t(Date.now()),1e3);return()=>clearInterval(n)},[]),e}function kPe({config:e,nextRunAt:t,nowMs:n}){const r=Object.entries(e.perType??{});return f.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[f.jsx(Be,{label:"Window",value:mf(e.afterMs),accent:"text-brand"}),f.jsx(Be,{label:"Interval",value:mf(e.intervalMs)}),f.jsx(Be,{label:"Keep last",value:e.keepLast!=null?e.keepLast.toLocaleString():"unbounded"}),f.jsx(Be,{label:"Next prune",value:TPe(t,n),accent:"text-sky-300",...r.length>0?{hint:`${r.length} per-type override(s)`}:{}}),r.length>0&&f.jsxs("div",{className:"col-span-2 rounded-lg border border-line bg-panel/40 p-3 sm:col-span-4",children:[f.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Per-type overrides"}),f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:r.map(([i,o])=>f.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[f.jsx("span",{className:"text-muted-foreground",children:Mg(i)}),f.jsx("span",{className:"tabular-nums text-foreground",children:mf(o)})]},i))})]})]})}function NPe({run:e}){const t=Object.entries(e.deletedByType);return f.jsxs(en,{className:"border-t border-line/60 align-top hover:bg-panel/40",children:[f.jsx(Ee,{className:"text-xs text-muted-foreground",children:Ao(new Date(e.at).getTime())}),f.jsx(Ee,{children:f.jsx(EPe,{trigger:e.trigger})}),f.jsx(Ee,{className:"text-xs tabular-nums text-muted-foreground",children:CPe(e.durationMs)}),f.jsx(Ee,{className:"text-xs tabular-nums text-foreground",children:e.deletedTotal.toLocaleString()}),f.jsx(Ee,{children:t.length>0?f.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(([n,r])=>f.jsx(APe,{type:n,count:r},n))}):f.jsx("span",{className:"text-muted-foreground",children:"—"})}),f.jsx(Ee,{className:"text-xs tabular-nums text-muted-foreground",children:e.archivedTotal!=null?e.archivedTotal.toLocaleString():"—"}),f.jsx(Ee,{className:"text-xs text-bad",children:e.error??""})]})}function RPe(){var c;const{data:e,isLoading:t,isError:n}=tH(),r=Ea(),i=U$(),o=_Pe(),a=((c=r.data)==null?void 0:c.pruneEnabled)??!1,s=(e==null?void 0:e.runs)??[],l=(e==null?void 0:e.config)??null;async function u(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const d=await i.mutateAsync();globalThis.alert(`Pruned ${d.pruned} ${d.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return f.jsxs("div",{className:"space-y-4 p-4",children:[f.jsxs("div",{className:"flex items-center justify-between px-1",children:[f.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Prune activity"}),f.jsx(Qe,{onClick:u,disabled:!a||i.isPending,title:a?"Run a prune cycle now":"Mutations are disabled (set `mutations: true` to enable on-demand pruning).",children:i.isPending?"Pruning…":"Prune now"})]}),l?f.jsx(kPe,{config:l,nextRunAt:(e==null?void 0:e.nextRunAt)??null,nowMs:o}):f.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-6 text-center text-xs text-muted-foreground",children:"No retention window is configured. Set a `prune` option to enable automatic pruning."}),t&&f.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading prune runs…"}),n&&f.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load prune runs."}),!t&&!n&&s.length===0&&f.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"No prune runs recorded yet on this pod."}),s.length>0&&f.jsx("div",{className:"rounded-lg border border-line",children:f.jsxs(Ra,{className:"min-w-[760px] text-left text-sm",children:[f.jsx($a,{children:f.jsxs(en,{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:[f.jsx(Oe,{children:"Time"}),f.jsx(Oe,{children:"Trigger"}),f.jsx(Oe,{children:"Duration"}),f.jsx(Oe,{children:"Deleted"}),f.jsx(Oe,{children:"By type"}),f.jsx(Oe,{children:"Archived"}),f.jsx(Oe,{children:"Error"})]})}),f.jsx(Ma,{children:s.map((d,p)=>f.jsx(NPe,{run:d},`${d.at}:${p}`))})]})})]})}function $Pe(){var s;const[e,t]=j.useState("1h"),n=Ei(),{data:r,isLoading:i}=H$(e),o=sS({window:e,buckets:60}),a=dO(((s=o.data)==null?void 0:s.buckets)??[]);return f.jsxs("div",{className:"space-y-4 p-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-sm text-brand",children:"Pulse"}),f.jsx(lc,{value:e,onChange:t})]}),f.jsx(Xy,{title:"Throughput by type",series:a,data:f3(o.data)}),i||!r?f.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):f.jsx(_we,{report:r,onSelectEntry:l=>n(`/entries/view/${l}`),onSelectFamily:l=>n(`/entries/query?familyHash=${encodeURIComponent(l)}`),onSelectRoute:l=>n(`/entries/request?familyHash=${encodeURIComponent(l)}`),onSelectOutgoing:l=>n(`/entries/http_client?familyHash=${encodeURIComponent(l)}`)})]})}const MPe="var(--bad)",IPe="var(--good)";function DPe(e){return((e==null?void 0:e.queues)??[]).map(t=>({label:t.queue,value:Number((t.failureRate*100).toFixed(1)),color:t.failureRate>0?MPe:IPe}))}function LPe(){const[e,t]=j.useState("1h"),{data:n,isLoading:r}=V$(e);return f.jsxs("div",{className:"space-y-4 p-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-sm text-brand",children:"Queue metrics"}),f.jsx(lc,{value:e,onChange:t})]}),f.jsx(ws,{title:"Failure rate by queue",valueLabel:"fail %",data:DPe(n)}),r||!n?f.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):f.jsx(kwe,{report:n,sparkline:i=>f.jsx(Rwe,{queue:i,window:e})})]})}const FPe=[{to:"/queues",label:"Manage",end:!0},{to:"/queues/metrics",label:"Metrics",end:!1}];function BPe(){return f.jsxs("div",{className:"space-y-1",children:[f.jsx("div",{className:"flex gap-1 border-b border-line px-4 pt-3",children:FPe.map(e=>f.jsx(uh,{to:e.to,end:e.end,className:({isActive:t})=>`rounded-t-md px-3 py-1.5 text-xs transition-colors ${t?"bg-panel text-brand":"text-muted-foreground hover:text-foreground"}`,children:e.label},e.to))}),f.jsx(ez,{})]})}const UPe={cron:"tint-brand",interval:"tint-muted",timeout:"text-warn tint-warn"};function zPe({kind:e}){return f.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${UPe[e]}`,children:e})}function HPe({running:e}){return e==null?f.jsx("span",{className:"rounded bg-panel-2 px-1.5 py-0.5 text-[9px] uppercase tracking-wide text-muted-foreground",children:"unknown"}):f.jsxs("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${e?"tint-good":"tint-bad"}`,children:[f.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${e?"bg-good":"bg-bad"}`}),e?"active":"stopped"]})}function VPe({status:e}){if(e===null)return f.jsx("span",{className:"text-muted-foreground",children:"—"});const t=e==="completed"?"tint-good":"tint-bad";return f.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${t}`,children:e})}function WPe(e){return e===null?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function qPe(e){if(e===null)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString()}function KPe({task:e}){return f.jsxs(en,{className:"border-t border-line/60 hover:bg-panel/40",children:[f.jsx(Ee,{className:"font-medium text-foreground",children:e.name}),f.jsx(Ee,{children:f.jsx(zPe,{kind:e.kind})}),f.jsx(Ee,{children:f.jsx(HPe,{running:e.running})}),f.jsx(Ee,{className:"font-mono text-xs text-muted-foreground",children:e.schedule}),f.jsx(Ee,{className:"text-xs text-muted-foreground",children:qPe(e.nextRunAt)}),f.jsx(Ee,{className:"text-xs text-muted-foreground",children:Ao(GPe(e.lastRunAt))}),f.jsx(Ee,{className:"text-xs tabular-nums text-muted-foreground",children:WPe(e.lastDurationMs)}),f.jsx(Ee,{children:f.jsx(VPe,{status:e.lastStatus})})]})}function GPe(e){if(e===null)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function XPe(){const{data:e,isLoading:t,isError:n}=Xz(),r=(e==null?void 0:e.tasks)??[],i=r.filter(a=>a.running===!0).length,o=r.filter(a=>a.running===!1).length;return f.jsxs("div",{className:"space-y-3 p-4",children:[f.jsxs("div",{className:"flex items-center justify-between px-1",children:[f.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Scheduled tasks"}),r.length>0&&f.jsxs("div",{className:"flex items-center gap-3 text-[10px] uppercase tracking-wide",children:[f.jsxs("span",{className:"text-good",children:[i," active"]}),o>0&&f.jsxs("span",{className:"text-bad",children:[o," stopped"]}),f.jsxs("span",{className:"text-muted-foreground",children:[r.length," total"]})]})]}),t&&f.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading schedules…"}),n&&f.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load schedules."}),!t&&!n&&r.length===0&&f.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"No scheduled tasks detected. Register a ScheduleManager (the @nestjs/schedule watcher) to populate this console."}),r.length>0&&f.jsx("div",{className:"rounded-lg border border-line",children:f.jsxs(Ra,{className:"min-w-[760px] text-left text-sm",children:[f.jsx($a,{children:f.jsxs(en,{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:[f.jsx(Oe,{children:"Name"}),f.jsx(Oe,{children:"Kind"}),f.jsx(Oe,{children:"Active"}),f.jsx(Oe,{children:"Schedule"}),f.jsx(Oe,{children:"Next run"}),f.jsx(Oe,{children:"Last run"}),f.jsx(Oe,{children:"Duration"}),f.jsx(Oe,{children:"Status"})]})}),f.jsx(Ma,{children:r.map(a=>f.jsx(KPe,{task:a},`${a.kind}:${a.name}`))})]})})]})}function YPe(){const{traceId:e=""}=Ng(),t=Ei(),[n,r]=j.useState("waterfall"),{data:i,isLoading:o}=z$({traceId:e}),a=(i==null?void 0:i.data)??[],{data:s,isLoading:l}=mH(e);return f.jsxs("div",{className:"p-4",children:[f.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"mb-4 text-xs text-muted-foreground hover:text-foreground",children:"← entries"}),f.jsxs("div",{className:"mb-4 flex flex-wrap items-baseline gap-3 border-b border-line pb-3",children:[f.jsx("h2",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Trace"}),f.jsx("span",{className:"max-w-md truncate font-mono text-xs text-foreground",title:e,children:e}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:[a.length," ",a.length===1?"entry":"entries"]}),f.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[f.jsxs("div",{className:"flex overflow-hidden rounded border border-line text-[11px]",children:[f.jsx("button",{type:"button",onClick:()=>r("waterfall"),className:`px-2.5 py-1 transition-colors ${n==="waterfall"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Waterfall"}),f.jsx("button",{type:"button",onClick:()=>r("entries"),className:`border-l border-line px-2.5 py-1 transition-colors ${n==="entries"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Entries"})]}),a.length>0?f.jsx("button",{type:"button",onClick:()=>cO(`telescope-trace-${e}.json`,a),className:"rounded border border-line bg-panel px-2.5 py-1 text-[11px] text-foreground transition-colors hover:border-line hover:bg-panel-2 hover:text-foreground",children:"Download JSON"}):null]})]}),n==="waterfall"?l?f.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):s===void 0||s.spans.length===0?f.jsx("p",{className:"text-muted-foreground",children:"No spans in this trace"}):f.jsx(j0e,{waterfall:s,onSelect:u=>t(`/entries/view/${u}`)}):o?f.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):a.length===0?f.jsx("p",{className:"text-muted-foreground",children:"No entries in this trace"}):f.jsx(ZF,{entries:a,onSelect:u=>t(`/entries/view/${u}`)})]})}function QPe(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function JPe({trace:e}){const t=Ei(),n=e.rootLabel??e.traceId;return f.jsxs("button",{type:"button",onClick:()=>t(`/traces/${e.traceId}`),className:"flex w-full items-center gap-3 border-b border-line-soft px-3 py-2 text-left hover:bg-panel",children:[f.jsx("span",{className:"flex shrink-0 items-center gap-1","aria-hidden":"true",children:e.types.map(r=>f.jsx("span",{className:`h-2 w-2 rounded-full ${lS(r)}`,title:r},r))}),f.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",title:n,children:n}),f.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:[e.entryCount," ",e.entryCount===1?"entry":"entries"]}),f.jsx("span",{className:"w-16 shrink-0 text-right text-xs text-muted-foreground",children:QPe(e.totalDurationMs)}),f.jsx("span",{className:"w-16 shrink-0 text-right text-xs text-muted-foreground",children:Ao(new Date(e.lastAt).getTime())})]})}function ZPe(){const[e,t]=j.useState("1h"),{data:n,isLoading:r}=hH(e),i=(n==null?void 0:n.traces)??[];return f.jsxs("div",{className:"space-y-4 p-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-sm text-brand",children:"Traces"}),f.jsx(lc,{value:e,onChange:t})]}),r?f.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):i.length===0?f.jsx("p",{className:"text-muted-foreground",children:"No traces in this window"}):f.jsx("div",{className:"border border-line",children:i.map(o=>f.jsx(JPe,{trace:o},o.traceId))})]})}const eEe=new e5;function tEe(){return f.jsx(fz,{children:f.jsx(N1e,{children:f.jsxs(nz,{children:[f.jsx(un,{path:"/",element:f.jsx(eSe,{})}),f.jsx(un,{path:"/entries",element:f.jsx(wk,{})}),f.jsx(un,{path:"/entries/view/:id",element:f.jsx(pSe,{})}),f.jsx(un,{path:"/entries/:type",element:f.jsx(wk,{})}),f.jsx(un,{path:"/traces",element:f.jsx(ZPe,{})}),f.jsx(un,{path:"/traces/:traceId",element:f.jsx(YPe,{})}),f.jsx(un,{path:"/pulse",element:f.jsx($Pe,{})}),f.jsx(un,{path:"/ai",element:f.jsx(fSe,{})}),f.jsxs(un,{path:"/queues",element:f.jsx(BPe,{}),children:[f.jsx(un,{index:!0,element:f.jsx(tSe,{})}),f.jsx(un,{path:"metrics",element:f.jsx(LPe,{})})]}),f.jsx(un,{path:"/schedules",element:f.jsx(XPe,{})}),f.jsx(un,{path:"/prunes",element:f.jsx(RPe,{})}),f.jsx(un,{path:"/exports",element:f.jsx(bSe,{})}),f.jsx(un,{path:"/profiles",element:f.jsx(OPe,{})}),f.jsx(un,{path:"/ext/:dashboardId",element:f.jsx(xPe,{})})]})})})}function nEe(){return f.jsx(j1e,{children:f.jsx(jz,{children:f.jsx(AU,{client:eEe,children:f.jsx(r1e,{children:f.jsx(tEe,{})})})})})}const $k=document.getElementById("root");$k&&a$($k).render(f.jsx(j.StrictMode,{children:f.jsx(nEe,{})}));
|