@wascartech/devbot 2.1.1 → 2.2.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.
Files changed (55) hide show
  1. package/dist/admin/settings-routes.js +2 -1
  2. package/dist/admin/settings-routes.js.map +1 -1
  3. package/dist/global-settings-store.js +11 -4
  4. package/dist/global-settings-store.js.map +1 -1
  5. package/dist/platform/gitealike/base.js +5 -0
  6. package/dist/platform/gitealike/base.js.map +1 -1
  7. package/dist/platform/github/index.js +5 -0
  8. package/dist/platform/github/index.js.map +1 -1
  9. package/dist/platform/gitlab/api.js +7 -1
  10. package/dist/platform/gitlab/api.js.map +1 -1
  11. package/dist/platform/gitlab/index.js +5 -0
  12. package/dist/platform/gitlab/index.js.map +1 -1
  13. package/dist/platform/gitlab/schemas.js +14 -0
  14. package/dist/platform/gitlab/schemas.js.map +1 -1
  15. package/dist/platform/port.js +1 -1
  16. package/dist/platform/port.js.map +1 -1
  17. package/dist/platform/types.js.map +1 -1
  18. package/dist/settings-store.js +28 -4
  19. package/dist/settings-store.js.map +1 -1
  20. package/dist/types/global-settings.js +6 -0
  21. package/dist/types/global-settings.js.map +1 -1
  22. package/dist/types/project-settings.js +1 -0
  23. package/dist/types/project-settings.js.map +1 -1
  24. package/dist/webhook.js +35 -4
  25. package/dist/webhook.js.map +1 -1
  26. package/migrations/0032_confidential_work_items.sql +11 -0
  27. package/package.json +2 -1
  28. package/public/assets/{DashboardSidebarCollapse-rIuzCmVm.js → DashboardSidebarCollapse-CWmehYha.js} +1 -1
  29. package/public/assets/{DashboardToolbar-DFCUqZ4Z.js → DashboardToolbar-DHcR2yAt.js} +1 -1
  30. package/public/assets/{ErrorLogModal.vue_vue_type_script_setup_true_lang-BCyNIf1E.js → ErrorLogModal.vue_vue_type_script_setup_true_lang-B0yvkhY5.js} +1 -1
  31. package/public/assets/{ErrorLogsPage-DyYK2Rop.js → ErrorLogsPage-ClPltTSr.js} +1 -1
  32. package/public/assets/{LogSlideover.vue_vue_type_script_setup_true_lang-33xie7TE.js → LogSlideover.vue_vue_type_script_setup_true_lang-F1i8DRzf.js} +1 -1
  33. package/public/assets/{OverviewPage-CFfa0uwg.js → OverviewPage-DWz8IJ46.js} +1 -1
  34. package/public/assets/{PageGrid-CBROIU87.js → PageGrid-DelloK5f.js} +1 -1
  35. package/public/assets/{PeriodRangePicker.vue_vue_type_script_setup_true_lang-DiFUNem7.js → PeriodRangePicker.vue_vue_type_script_setup_true_lang-YOwfelec.js} +1 -1
  36. package/public/assets/ProjectDetailPage-QEdo9Ytu.js +1 -0
  37. package/public/assets/{ProjectsPage-CFx8-elJ.js → ProjectsPage-BJzRIlvb.js} +1 -1
  38. package/public/assets/{RunDetailSlideover.vue_vue_type_script_setup_true_lang-DopYYmCT.js → RunDetailSlideover.vue_vue_type_script_setup_true_lang-BLDs3UaU.js} +1 -1
  39. package/public/assets/{RunsPage-CRnnXU4P.js → RunsPage-BYlDZjwk.js} +1 -1
  40. package/public/assets/{Select-Bvx32Diz.js → Select-DGVDts9_.js} +1 -1
  41. package/public/assets/{SelectMenu-BjMxc4VB.js → SelectMenu-B6n06FSV.js} +1 -1
  42. package/public/assets/{SettingsPage-Bb6LM3wO.js → SettingsPage-BpLc2GAe.js} +21 -21
  43. package/public/assets/{TimeCell.vue_vue_type_script_setup_true_lang-DW_UB0Fu.js → TimeCell.vue_vue_type_script_setup_true_lang-BNWTJF4u.js} +1 -1
  44. package/public/assets/{UsagePage-BLMDEsv-.js → UsagePage-CSt7StoP.js} +1 -1
  45. package/public/assets/{VolumesPage-CxcLc3L2.js → VolumesPage-Cxav6H5n.js} +1 -1
  46. package/public/assets/WebhookConfigPanel.vue_vue_type_script_setup_true_lang-DQNacZEe.js +1 -0
  47. package/public/assets/{WorkItemCell.vue_vue_type_script_setup_true_lang-BQn6vTjd.js → WorkItemCell.vue_vue_type_script_setup_true_lang-DAJMkNI8.js} +1 -1
  48. package/public/assets/{index-C5RBBrPj.js → index-Cs2OnrL7.js} +2 -2
  49. package/public/assets/{index-BMbMibyb.js → index-RZx6yIXX.js} +1 -1
  50. package/public/assets/{usage-format-jsb31_O8.js → usage-format-RcSEOPCq.js} +1 -1
  51. package/public/assets/{useManagedProjects-8rtjRqVJ.js → useManagedProjects-DnOY5lQq.js} +1 -1
  52. package/public/assets/{useRouteTab-DfwrcMic.js → useRouteTab-B-Vrl8p9.js} +1 -1
  53. package/public/index.html +1 -1
  54. package/public/assets/ProjectDetailPage-CreyvUit.js +0 -1
  55. package/public/assets/WebhookConfigPanel.vue_vue_type_script_setup_true_lang-B2V2GF6b.js +0 -1
@@ -1 +1 @@
1
- import{d as a,c as o,t as r,e as c}from"./index-C5RBBrPj.js";const i={class:"text-sm text-muted whitespace-nowrap"},l=a({__name:"TimeCell",props:{value:{},unit:{}},setup(n){const e=n;function s(){if(!e.value)return"—";const t=e.unit==="s"?e.value*1e3:e.value;return new Date(t).toLocaleString()}return(t,p)=>(c(),o("span",i,r(s()),1))}});export{l as _};
1
+ import{d as a,c as o,t as r,e as c}from"./index-Cs2OnrL7.js";const i={class:"text-sm text-muted whitespace-nowrap"},l=a({__name:"TimeCell",props:{value:{},unit:{}},setup(n){const e=n;function s(){if(!e.value)return"—";const t=e.unit==="s"?e.value*1e3:e.value;return new Date(t).toLocaleString()}return(t,p)=>(c(),o("span",i,r(s()),1))}});export{l as _};
@@ -1,4 +1,4 @@
1
- import{_ as uu,a as hu,b as fu,c as du}from"./DashboardSidebarCollapse-rIuzCmVm.js";import{_ as xa,a as pu}from"./DashboardToolbar-DFCUqZ4Z.js";import{_ as gu}from"./SelectMenu-BjMxc4VB.js";import{d as St,e as U,h as Ut,w as z,c as J,g as Oi,_ as mu,f as X,t as K,a1 as ba,l as wa,j as An,F as Fe,x as ut,a8 as _u,a9 as jo,aa as yu,O as Ve,o as de,ab as Ye,p as pe,q as ht,r as Q,B as vu,ac as xu,ad as tr,D as bu,N as wu,Q as Je,ae as ku,u as nt,a as Y,af as Su,m as yr,s as ka,a4 as Tu,a5 as Cu,a6 as Mu,n as Au,b as $u,i as Du}from"./index-C5RBBrPj.js";import{b as Eu,_ as Nu}from"./PeriodRangePicker.vue_vue_type_script_setup_true_lang-DiFUNem7.js";import{_ as Pu,a as eo}from"./PageGrid-CBROIU87.js";import{a as gt,t as er,f as Ri,b as Fu}from"./usage-format-jsb31_O8.js";import{_ as Ou}from"./Select-Bvx32Diz.js";import{_ as Sa}from"./index-BMbMibyb.js";const Ru={class:"flex items-center gap-2"},Iu={class:"text-2xl font-semibold text-highlighted"},Lu=St({__name:"UsageStats",props:{totals:{},previous:{}},setup(t){const e=t;function n(r,o){return o?Math.round((r-o)/o*100):null}const i=ut(()=>{const r=e.totals,o=e.previous;return[{title:"Runs",icon:"i-lucide-activity",value:String(r.runs),variation:n(r.runs,o.runs)},{title:"Tokens in",icon:"i-lucide-arrow-down-to-line",value:gt(r.input),variation:n(r.input,o.input)},{title:"Tokens out",icon:"i-lucide-arrow-up-from-line",value:gt(r.output),variation:n(r.output,o.output)},{title:"Cache",icon:"i-lucide-database",value:gt(r.cacheRead+r.cacheWrite),variation:n(r.cacheRead+r.cacheWrite,o.cacheRead+o.cacheWrite)},{title:"Total tokens",icon:"i-lucide-sigma",value:gt(er(r)),variation:n(er(r),er(o))},{title:"Cost",icon:"i-lucide-circle-dollar-sign",value:Ri(r.costUsd),variation:n(r.costUsd,o.costUsd)}]});return(r,o)=>{const s=ba,a=mu,l=Pu;return U(),Ut(l,{class:"lg:grid-cols-6 gap-4"},{default:z(()=>[(U(!0),J(Fe,null,Oi(i.value,c=>(U(),Ut(a,{key:c.title,icon:c.icon,title:c.title,variant:"subtle",ui:{container:"gap-y-1.5",title:"font-normal text-muted text-xs uppercase"}},{default:z(()=>[X("div",Ru,[X("span",Iu,K(c.value),1),c.variation!==null?(U(),Ut(s,{key:0,color:c.variation>0?"success":c.variation<0?"error":"neutral",variant:"subtle",class:"text-xs"},{default:z(()=>[wa(K(c.variation>0?"+":"")+K(c.variation)+"% ",1)]),_:2},1032,["color"])):An("",!0)])]),_:2},1032,["icon","title"]))),128))]),_:1})}}});var vr="http://www.w3.org/1999/xhtml";const qo={svg:"http://www.w3.org/2000/svg",xhtml:vr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ii(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),qo.hasOwnProperty(e)?{space:qo[e],local:t}:t}function zu(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===vr&&e.documentElement.namespaceURI===vr?e.createElement(t):e.createElementNS(n,t)}}function Bu(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ta(t){var e=Ii(t);return(e.local?Bu:zu)(e)}function Uu(){}function no(t){return t==null?Uu:function(){return this.querySelector(t)}}function Wu(t){typeof t!="function"&&(t=no(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new yt(i,this._parents)}function Hu(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Vu(){return[]}function Ca(t){return t==null?Vu:function(){return this.querySelectorAll(t)}}function Yu(t){return function(){return Hu(t.apply(this,arguments))}}function Xu(t){typeof t=="function"?t=Yu(t):t=Ca(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(i.push(t.call(l,l.__data__,c,s)),r.push(l));return new yt(i,r)}function Ma(t){return function(){return this.matches(t)}}function Aa(t){return function(e){return e.matches(t)}}var Gu=Array.prototype.find;function ju(t){return function(){return Gu.call(this.children,t)}}function qu(){return this.firstElementChild}function Ku(t){return this.select(t==null?qu:ju(typeof t=="function"?t:Aa(t)))}var Zu=Array.prototype.filter;function Qu(){return Array.from(this.children)}function Ju(t){return function(){return Zu.call(this.children,t)}}function th(t){return this.selectAll(t==null?Qu:Ju(typeof t=="function"?t:Aa(t)))}function eh(t){typeof t!="function"&&(t=Ma(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new yt(i,this._parents)}function $a(t){return new Array(t.length)}function nh(){return new yt(this._enter||this._groups.map($a),this._parents)}function li(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}li.prototype={constructor:li,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ih(t){return function(){return t}}function rh(t,e,n,i,r,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new li(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function oh(t,e,n,i,r,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),d;for(a=0;a<h;++a)(l=e[a])&&(f[a]=d=s.call(l,l.__data__,a,e)+"",c.has(d)?r[a]=l:c.set(d,l));for(a=0;a<u;++a)d=s.call(t,o[a],a,o)+"",(l=c.get(d))?(i[a]=l,l.__data__=o[a],c.delete(d)):n[a]=new li(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(r[a]=l)}function sh(t){return t.__data__}function ah(t,e){if(!arguments.length)return Array.from(this,sh);var n=e?oh:rh,i=this._parents,r=this._groups;typeof t!="function"&&(t=ih(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],u=r[c],f=u.length,d=ch(t.call(h,h&&h.__data__,c,i)),p=d.length,g=a[c]=new Array(p),m=s[c]=new Array(p),v=l[c]=new Array(f);n(h,u,g,m,v,d,e);for(var y=0,x=0,_,b;y<p;++y)if(_=g[y]){for(y>=x&&(x=y+1);!(b=m[x])&&++x<p;);_._next=b||null}}return s=new yt(s,i),s._enter=a,s._exit=l,s}function ch(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lh(){return new yt(this._exit||this._groups.map($a),this._parents)}function uh(t,e,n){var i=this.enter(),r=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?o.remove():n(o),i&&r?i.merge(r).order():r}function hh(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c=n[l],h=i[l],u=c.length,f=a[l]=new Array(u),d,p=0;p<u;++p)(d=c[p]||h[p])&&(f[p]=d);for(;l<r;++l)a[l]=n[l];return new yt(a,this._parents)}function fh(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,o=i[r],s;--r>=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function dh(t){t||(t=ph);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s=n[o],a=s.length,l=r[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new yt(r,this._parents).order()}function ph(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function gh(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function mh(){return Array.from(this)}function _h(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null}function yh(){let t=0;for(const e of this)++t;return t}function vh(){return!this.node()}function xh(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],o=0,s=r.length,a;o<s;++o)(a=r[o])&&t.call(a,a.__data__,o,r);return this}function bh(t){return function(){this.removeAttribute(t)}}function wh(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kh(t,e){return function(){this.setAttribute(t,e)}}function Sh(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Th(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ch(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Mh(t,e){var n=Ii(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?wh:bh:typeof e=="function"?n.local?Ch:Th:n.local?Sh:kh)(n,e))}function Da(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ah(t){return function(){this.style.removeProperty(t)}}function $h(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dh(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Eh(t,e,n){return arguments.length>1?this.each((e==null?Ah:typeof e=="function"?Dh:$h)(t,e,n??"")):Oe(this.node(),t)}function Oe(t,e){return t.style.getPropertyValue(e)||Da(t).getComputedStyle(t,null).getPropertyValue(e)}function Nh(t){return function(){delete this[t]}}function Ph(t,e){return function(){this[t]=e}}function Fh(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Oh(t,e){return arguments.length>1?this.each((e==null?Nh:typeof e=="function"?Fh:Ph)(t,e)):this.node()[t]}function Ea(t){return t.trim().split(/^|\s+/)}function io(t){return t.classList||new Na(t)}function Na(t){this._node=t,this._names=Ea(t.getAttribute("class")||"")}Na.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Pa(t,e){for(var n=io(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function Fa(t,e){for(var n=io(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Rh(t){return function(){Pa(this,t)}}function Ih(t){return function(){Fa(this,t)}}function Lh(t,e){return function(){(e.apply(this,arguments)?Pa:Fa)(this,t)}}function zh(t,e){var n=Ea(t+"");if(arguments.length<2){for(var i=io(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Lh:e?Rh:Ih)(n,e))}function Bh(){this.textContent=""}function Uh(t){return function(){this.textContent=t}}function Wh(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Hh(t){return arguments.length?this.each(t==null?Bh:(typeof t=="function"?Wh:Uh)(t)):this.node().textContent}function Vh(){this.innerHTML=""}function Yh(t){return function(){this.innerHTML=t}}function Xh(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Gh(t){return arguments.length?this.each(t==null?Vh:(typeof t=="function"?Xh:Yh)(t)):this.node().innerHTML}function jh(){this.nextSibling&&this.parentNode.appendChild(this)}function qh(){return this.each(jh)}function Kh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zh(){return this.each(Kh)}function Qh(t){var e=typeof t=="function"?t:Ta(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Jh(){return null}function tf(t,e){var n=typeof t=="function"?t:Ta(t),i=e==null?Jh:typeof e=="function"?e:no(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function ef(){var t=this.parentNode;t&&t.removeChild(this)}function nf(){return this.each(ef)}function rf(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function of(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function sf(t){return this.select(t?of:rf)}function af(t){return arguments.length?this.property("__data__",t):this.node().__data__}function cf(t){return function(e){t.call(this,e,this.__data__)}}function lf(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function uf(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n<r;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function hf(t,e,n){return function(){var i=this.__on,r,o=cf(e);if(i){for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function ff(t,e,n){var i=lf(t+""),r,o=i.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(r=0,h=a[l];r<o;++r)if((s=i[r]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?hf:uf,r=0;r<o;++r)this.each(a(i[r],e,n));return this}function Oa(t,e,n){var i=Da(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function df(t,e){return function(){return Oa(this,t,e)}}function pf(t,e){return function(){return Oa(this,t,e.apply(this,arguments))}}function gf(t,e){return this.each((typeof e=="function"?pf:df)(t,e))}function*mf(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length,s;r<o;++r)(s=i[r])&&(yield s)}var Ra=[null];function yt(t,e){this._groups=t,this._parents=e}function $n(){return new yt([[document.documentElement]],Ra)}function _f(){return this}yt.prototype=$n.prototype={constructor:yt,select:Wu,selectAll:Xu,selectChild:Ku,selectChildren:th,filter:eh,data:ah,enter:nh,exit:lh,join:uh,merge:hh,selection:_f,order:fh,sort:dh,call:gh,nodes:mh,node:_h,size:yh,empty:vh,each:xh,attr:Mh,style:Eh,property:Oh,classed:zh,text:Hh,html:Gh,raise:qh,lower:Zh,append:Qh,insert:tf,remove:nf,clone:sf,datum:af,on:ff,dispatch:gf,[Symbol.iterator]:mf};function mt(t){return typeof t=="string"?new yt([[document.querySelector(t)]],[document.documentElement]):new yt([[t]],Ra)}function yf(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ui(t,e){if(t=yf(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}var Gn=(t=>(t[t.SVG=0]="SVG",t[t.HTML=1]="HTML",t))(Gn||{}),_n=(t=>(t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width",t))(_n||{});function Zt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vf(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ro(t){let e,n,i;t.length!==2?(e=Zt,n=(a,l)=>Zt(t(a),l),i=(a,l)=>t(a)-l):(e=t===Zt||t===vf?t:xf,n=t,i=t);function r(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=r(a,l,c,h-1);return u>c&&i(a[u-1],l)>-i(a[u],l)?u-1:u}return{left:r,center:s,right:o}}function xf(){return 0}function Ia(t){return t===null?NaN:+t}const La=ro(Zt),Dn=La.right,bf=La.left;ro(Ia).center;function wf(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class Ko extends Map{constructor(e,n=Tf){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(Zo(this,e))}has(e){return super.has(Zo(this,e))}set(e,n){return super.set(kf(this,e),n)}delete(e){return super.delete(Sf(this,e))}}function Zo({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function kf({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function Sf({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function Tf(t){return t!==null&&typeof t=="object"?t.valueOf():t}const Cf=Math.sqrt(50),Mf=Math.sqrt(10),Af=Math.sqrt(2);function hi(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=Cf?10:o>=Mf?5:o>=Af?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?hi(t,e,n*2):[a,l,c]}function xr(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,s]=i?hi(e,t,n):hi(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function br(t,e,n){return e=+e,t=+t,n=+n,hi(t,e,n)[2]}function wr(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?br(e,t,n):br(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function kr(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function fn(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function $f(t,e,n=Ia){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}}function Df(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n}function*Ef(t){for(const e of t)yield*e}function Nf(t){return Array.from(Ef(t))}function Pf(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(r);++i<r;)o[i]=t+i*n;return o}function Ff(t,e=Zt){let n,i=!1;if(e.length===1){let r;for(const o of t){const s=e(o);(i?Zt(s,r)<0:Zt(s,s)===0)&&(n=o,r=s,i=!0)}}else for(const r of t)(i?e(r,n)<0:e(r,r)===0)&&(n=r,i=!0);return n}function Of(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function Rf(t,e,n){var i={},r=i.noTrailing,o=r===void 0?!1:r,s=i.noLeading,a=s===void 0?!1:s,l=i.debounceMode,c=l===void 0?void 0:l,h,u=!1,f=0;function d(){h&&clearTimeout(h)}function p(m){var v=m||{},y=v.upcomingOnly,x=y===void 0?!1:y;d(),u=!x}function g(){for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];var x=this,_=Date.now()-f;if(u)return;function b(){f=Date.now(),e.apply(x,v)}function w(){h=void 0}!a&&c&&!h&&b(),d(),c===void 0&&_>t?a?(f=Date.now(),o||(h=setTimeout(c?w:b,t))):b():o!==!0&&(h=setTimeout(c?w:b,c===void 0?t-_:t))}return g.cancel=p,g}var jt=(t=>(t.Left="left",t.Right="right",t.Auto="auto",t))(jt||{});const st=t=>typeof t=="number",ue=t=>typeof t=="function",za=t=>typeof t=="string",Ht=t=>Array.isArray(t),If=t=>t instanceof Object,oo=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",Qo=t=>If(t)&&!Ht(t)&&!ue(t)&&!oo(t),Lf=t=>[Object,Array].includes((t||{}).constructor)&&!Object.entries(t||{}).length,he=(t,e,n=[],i=new Set)=>{if(t===e)return!0;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(i.has(t))return!0;i.add(t);for(let r=0;r<t.length;r++)if(!he(t[r],e[r],n,i))return!1;return i.delete(t),!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;const r=Object.keys(t).filter(s=>!n.includes(s)),o=Object.keys(e).filter(s=>!n.includes(s));if(r.length!==o.length)return!1;if(i.has(t))return!0;i.add(t);for(const s of r)if(!he(t[s],e[s],n,i))return!1;return i.delete(t),!0}return t===e},Sr=t=>t.flat(),dn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const i of t)n.push(e.has(i)?e.get(i):dn(i,e));return n}if(oo(t))return t;if(t instanceof Object){const n={};e.set(t,n);const i=t;return Object.keys(t).reduce((r,o)=>(r[o]=e.has(i[o])?e.get(i[o]):dn(i[o],e),r),n),n}return t},Re=(t,e,n=new Map)=>{if(!t||!e)return t&&dn(t);if(t===e)return t;const i=oo(t)?t:dn(t);return n.has(e)?n.get(e):(n.set(e,i),Object.keys(e).forEach(r=>{r==="__proto__"||r==="constructor"||(Qo(t[r])&&Qo(e[r])?i[r]=Re(t[r],e[r],n):i[r]=dn(e[r]))}),i)},fi=(t,e,n)=>Rf(e,t);function Xe(t,e,n){return ue(e)?e(t,n):e}function yn(t,e,n){return Xe(t,e,n)}function F(t,e,n){return Xe(t,e,n)}function tn(t){return t.filter(e=>e&&!st(e))}function xt(t,e,n){return Math.min(Math.max(t,e),n)}function Ba(t,e,...n){if(!t)return[void 0,void 0];if(Ht(n)){let i,r;return t.forEach((o,s)=>{const a=F(o,e,s)||0;let l=a,c=a;for(const h of n){const u=F(o,h,s)||0;u>=0?l+=u:c+=u}(r===void 0||l>r)&&(r=l),(i===void 0||c<i)&&(i=c)}),[i??0,r??0]}}function Ua(t,e,...n){const i=[];let r=0,o=0;for(const s of n){const a=F(t,s,e)||0;a>=0?i.push(r+=a):i.push(o+=a)}return i}function Wa(t,e,n,i){const r=t.map((a,l)=>F(a,e,l)||0),o=n.map((a,l)=>{const c=Df(t,(h,u)=>F(h,a,u)||0);return c===0&&Array.isArray(i)?i[l]:c<0}),s=n.map(()=>[]);return t.forEach((a,l)=>{let c=r[l],h=r[l];n.forEach((u,f)=>{const d=F(a,u,l)||0;d>=0?s[f].push([c,c+=d]):s[f].push([h,h+=d])})}),s.forEach((a,l)=>{a.isMostlyNegative=o[l]}),s}function zf(t,...e){return t?fn(t,(i,r)=>fn(e,o=>F(i,o,r))):void 0}function Bf(t,...e){return t?kr(t,(i,r)=>kr(e,o=>F(i,o,r))):void 0}function jn(t,...e){return[zf(t,...e),Bf(t,...e)]}function di(t,e,n,i=jt.Auto){if(t.length<=1)return t[0];const o=t.map((l,c)=>[l,c]).sort(([l,c],[h,u])=>F(l,n,c)-F(h,n,u)),s=o.map(([l,c])=>F(l,n,c)),a=i===jt.Right?bf(s,e,0,t.length-1):Dn(s,e,1,t.length);return i===jt.Right?o[a][0]:i===jt.Left?o[a-1][0]:e-s[a-1]>s[a]-e?o[a][0]:o[a-1][0]}function Uf(t,e,n,i,r,o=[],s=[],a){if(!t?.length||!r)return;const[l,c]=e;let h,u=-1,f=1/0;for(let d=0;d<t.length;d++){const p=t[d],g=n(F(p,r,d));if(!isFinite(g))continue;const m=(g-l)**2;if(s.length){const v=F(p,a,d)||0,y=Ua(p,d,...s);for(let x=0;x<y.length;x++){if(!st(F(p,s[x],x)))continue;const _=i(y[x]+v),b=m+(_-c)**2;b<f&&(f=b,h=p,u=d)}}for(let v=0;v<o.length;v++){const y=F(p,o[v],d);if(!st(y))continue;const x=i(y),_=m+(x-c)**2;_<f&&(f=_,h=p,u=d)}}if(u!==-1)return{datum:h,index:u,distanceSq:f}}function Ha(t,e,n,i=!1){if(!n)return[];const r=t.filter((o,s)=>{const a=F(o,n,s);return a>=e[0]&&a<=e[1]});if(i){if(r.length===0){const u=di(t,e[0],n,jt.Left),f=di(t,e[1],n,jt.Right);return[u,f].filter(Boolean)}const o=r[0],s=r[r.length-1],a=t.findIndex(u=>u===o),l=t.findIndex(u=>u===s),c=Math.max(0,a-1),h=Math.min(t.length-1,l+1);return t.slice(c,h+1)}return r}function Tr(t){t=String(t);const e=parseFloat(t),n=t.match(/[\d.\-+]*\s*(.*)/)?.[1]||"";return[e,n]}function Va(){return typeof window<"u"&&typeof document<"u"}function Cr(t,e){const n=Tr(getComputedStyle(t).getPropertyValue(e));return n[0]*(Ge(n[1],t)??1)}function Ya(t,e){const n=document.createElement("div");n.style.height=`128${t}`,e.appendChild(n);const i=Cr(n,"height")/128;return e.removeChild(n),i}let In=null;function en(){return Va()?(In===null&&(In=96,In=Ya("in",document.body)),In):96}function Ge(t,e){if(!t&&t!==0)return null;if(!Va()){const o=Tr(String(t));if(!isNaN(o[0])){const s=o[1]?.toLowerCase()||"px";if(s==="px"||s==="")return o[0];if(s==="em"||s==="rem")return o[0]*16;if(s==="in")return o[0]*96;if(s==="cm")return o[0]*(96/2.54);if(s==="mm")return o[0]*(96/25.4);if(s==="pt")return o[0]*(96/72);if(s==="pc")return o[0]*(96/6)}return null}let n=document.body;e&&e!==window&&e!==document&&(n=e);const i=(String(t)||"px").trim().toLowerCase();switch(i){case"%":return n.clientHeight/100;case"ch":case"ex":return Ya(i,n);case"em":return Cr(n,"font-size");case"rem":return Cr(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return en();case"cm":return en()/2.54;case"mm":return en()/25.4;case"pt":return en()/72;case"pc":return en()/6;case"px":return 1}const r=Tr(i);if(!isNaN(r[0])){if(r[1]){const o=Ge(r[1],n);return typeof o=="number"?r[0]*o:null}return r[0]}return null}function Xa(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function Wf(t){return(t||"").replace(/\W/g,"_")}function Hf(t){return za(t)?t.substring(0,6)==="var(--":!1}const Jo=new WeakMap;function Ga(t,e){if(!za(t))return"";const n=t.substr(4,t.length-5);let i=Jo.get(e);if(i||(i=new Map,Jo.set(e,i)),i.has(n))return i.get(n);const r=getComputedStyle(e).getPropertyValue(n);return i.set(n,r),r}function ts(t){return typeof t=="number"?t:Ge(t)}function Vf(t,e){const n=Math.sin(e),i=Math.cos(e),r=[[t.x,t.y],[t.x+t.width,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height]],o=r.map(([c,h])=>c*i-h*n),s=r.map(([c,h])=>c*n+h*i),a=Math.min(...o),l=Math.min(...s);return{x:a,y:l,width:Math.max(...o)-a,height:Math.max(...s)-l}}function ja(t,e,n=0){const[i,r,o,s]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[a,l,c,h]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(r<h||l<s||o<a||c<i)}var oe=[],Yf=function(){return oe.some(function(t){return t.activeTargets.length>0})},Xf=function(){return oe.some(function(t){return t.skippedTargets.length>0})},es="ResizeObserver loop completed with undelivered notifications.",Gf=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:es}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=es),window.dispatchEvent(t)},vn;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(vn||(vn={}));var se=function(t){return Object.freeze(t)},jf=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,se(this)}return t})(),qa=(function(){function t(e,n,i,r){return this.x=e,this.y=n,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,se(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,r=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:i,top:r,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),so=function(t){return t instanceof SVGElement&&"getBBox"in t},Ka=function(t){if(so(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},ns=function(t){var e;if(t instanceof Element)return!0;var n=(e=t?.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},qf=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},pn=typeof window<"u"?window:{},Ln=new WeakMap,is=/auto|scroll/,Kf=/^tb|vertical/,Zf=/msie|trident/i.test(pn.navigator&&pn.navigator.userAgent),Et=function(t){return parseFloat(t||"0")},Ce=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new jf((n?e:t)||0,(n?t:e)||0)},rs=se({devicePixelContentBoxSize:Ce(),borderBoxSize:Ce(),contentBoxSize:Ce(),contentRect:new qa(0,0,0,0)}),Za=function(t,e){if(e===void 0&&(e=!1),Ln.has(t)&&!e)return Ln.get(t);if(Ka(t))return Ln.set(t,rs),rs;var n=getComputedStyle(t),i=so(t)&&t.ownerSVGElement&&t.getBBox(),r=!Zf&&n.boxSizing==="border-box",o=Kf.test(n.writingMode||""),s=!i&&is.test(n.overflowY||""),a=!i&&is.test(n.overflowX||""),l=i?0:Et(n.paddingTop),c=i?0:Et(n.paddingRight),h=i?0:Et(n.paddingBottom),u=i?0:Et(n.paddingLeft),f=i?0:Et(n.borderTopWidth),d=i?0:Et(n.borderRightWidth),p=i?0:Et(n.borderBottomWidth),g=i?0:Et(n.borderLeftWidth),m=u+c,v=l+h,y=g+d,x=f+p,_=a?t.offsetHeight-x-t.clientHeight:0,b=s?t.offsetWidth-y-t.clientWidth:0,w=r?m+y:0,S=r?v+x:0,A=i?i.width:Et(n.width)-w-b,$=i?i.height:Et(n.height)-S-_,V=A+m+b+y,B=$+v+_+x,M=se({devicePixelContentBoxSize:Ce(Math.round(A*devicePixelRatio),Math.round($*devicePixelRatio),o),borderBoxSize:Ce(V,B,o),contentBoxSize:Ce(A,$,o),contentRect:new qa(u,l,A,$)});return Ln.set(t,M),M},Qa=function(t,e,n){var i=Za(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case vn.DEVICE_PIXEL_CONTENT_BOX:return s;case vn.BORDER_BOX:return r;default:return o}},Qf=(function(){function t(e){var n=Za(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=se([n.borderBoxSize]),this.contentBoxSize=se([n.contentBoxSize]),this.devicePixelContentBoxSize=se([n.devicePixelContentBoxSize])}return t})(),Ja=function(t){if(Ka(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Jf=function(){var t=1/0,e=[];oe.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var h=new Qf(c.target),u=Ja(c.target);a.push(h),c.lastReportedSize=Qa(c.target,c.observedBox),u<t&&(t=u)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,i=e;n<i.length;n++){var r=i[n];r()}return t},os=function(t){oe.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Ja(r.target)>t?n.activeTargets.push(r):n.skippedTargets.push(r))})})},td=function(){var t=0;for(os(t);Yf();)t=Jf(),os(t);return Xf()&&Gf(),t>0},nr,tc=[],ed=function(){return tc.splice(0).forEach(function(t){return t()})},nd=function(t){if(!nr){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return ed()}).observe(n,i),nr=function(){n.textContent="".concat(e?e--:e++)}}tc.push(t),nr()},id=function(t){nd(function(){requestAnimationFrame(t)})},qn=0,rd=function(){return!!qn},od=250,sd={attributes:!0,characterData:!0,childList:!0,subtree:!0},ss=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],as=function(t){return t===void 0&&(t=0),Date.now()+t},ir=!1,ad=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=od),!ir){ir=!0;var i=as(e);id(function(){var r=!1;try{r=td()}finally{if(ir=!1,e=i-as(),!rd())return;r?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,sd)};document.body?n():pn.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ss.forEach(function(n){return pn.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),ss.forEach(function(n){return pn.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),Mr=new ad,cs=function(t){!qn&&t>0&&Mr.start(),qn+=t,!qn&&Mr.stop()},cd=function(t){return!so(t)&&!qf(t)&&getComputedStyle(t).display==="inline"},ld=(function(){function t(e,n){this.target=e,this.observedBox=n||vn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Qa(this.target,this.observedBox,!0);return cd(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),ud=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),zn=new WeakMap,ls=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Bn=(function(){function t(){}return t.connect=function(e,n){var i=new ud(e,n);zn.set(e,i)},t.observe=function(e,n,i){var r=zn.get(e),o=r.observationTargets.length===0;ls(r.observationTargets,n)<0&&(o&&oe.push(r),r.observationTargets.push(new ld(n,i&&i.box)),cs(1),Mr.schedule())},t.unobserve=function(e,n){var i=zn.get(e),r=ls(i.observationTargets,n),o=i.observationTargets.length===1;r>=0&&(o&&oe.splice(oe.indexOf(i),1),i.observationTargets.splice(r,1),cs(-1))},t.disconnect=function(e){var n=this,i=zn.get(e);i.observationTargets.slice().forEach(function(r){return n.unobserve(e,r.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t})(),hd=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Bn.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ns(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Bn.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ns(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Bn.unobserve(this,e)},t.prototype.disconnect=function(){Bn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();const fd=globalThis.ResizeObserver||hd,ec={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:_n.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0,colorFunction:void 0},nc=class Ar{constructor(e){this._defaultConfig=ec,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=mt(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",Ar.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){this.prevConfig=this.config,this.config=Re(this._defaultConfig,e),e?.svgDefs!==this.prevConfig?.svgDefs&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_propagateSizeAndStyleToComponents(e,n){for(const i of e)i&&(i.setSize(this.width,this.height,this.containerWidth,this.containerHeight),i.setContainerMargin(n),i.setColorFunction(this.config.colorFunction))}_render(e){const{config:n}=this;mt(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,i=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",i),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth||ts(this.config.width)||0:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight||ts(this.config.height)||0:this._container.clientHeight||this._container.getBoundingClientRect().height||Ar.DEFAULT_CONTAINER_HEIGHT}get width(){return xt(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return xt(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_reconcileChildren(e){const n=e.filter(Boolean),i=new Set(n);let r=this.element.firstChild;for(;r;){const s=r.nextSibling;i.has(r)||this.element.removeChild(r),r=s}let o=this.element.firstChild;for(const s of n)s===o?o=o.nextSibling:this.element.insertBefore(s,o)}_onResize(){const{config:e}=this;(e.sizing===_n.Fit||e.sizing===_n.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new fd((n,i)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const r=this._container.getBoundingClientRect(),o={width:r.width,height:r.height};!he(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserver?.disconnect(),this.svg.remove()}};nc.DEFAULT_CONTAINER_HEIGHT=300;let dd=nc;function pd(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function gd(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var md=(function(){function t(n){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(gd(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=pd(r);try{o.insertRule(i,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t})(),ot="-ms-",pi="-moz-",I="-webkit-",ic="comm",ao="rule",co="decl",_d="@import",rc="@keyframes",yd="@layer",vd=Math.abs,Li=String.fromCharCode,xd=Object.assign;function bd(t,e){return rt(t,0)^45?(((e<<2^rt(t,0))<<2^rt(t,1))<<2^rt(t,2))<<2^rt(t,3):0}function oc(t){return t.trim()}function wd(t,e){return(t=e.exec(t))?t[0]:t}function L(t,e,n){return t.replace(e,n)}function $r(t,e){return t.indexOf(e)}function rt(t,e){return t.charCodeAt(e)|0}function xn(t,e,n){return t.slice(e,n)}function Nt(t){return t.length}function lo(t){return t.length}function Un(t,e){return e.push(t),t}function kd(t,e){return t.map(e).join("")}var zi=1,Ie=1,sc=0,ft=0,Z=0,je="";function Bi(t,e,n,i,r,o,s){return{value:t,root:e,parent:n,type:i,props:r,children:o,line:zi,column:Ie,length:s,return:""}}function nn(t,e){return xd(Bi("",null,null,"",null,null,0),t,{length:-t.length},e)}function Sd(){return Z}function Td(){return Z=ft>0?rt(je,--ft):0,Ie--,Z===10&&(Ie=1,zi--),Z}function _t(){return Z=ft<sc?rt(je,ft++):0,Ie++,Z===10&&(Ie=1,zi++),Z}function Pt(){return rt(je,ft)}function Kn(){return ft}function En(t,e){return xn(je,t,e)}function bn(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ac(t){return zi=Ie=1,sc=Nt(je=t),ft=0,[]}function cc(t){return je="",t}function Zn(t){return oc(En(ft-1,Dr(t===91?t+2:t===40?t+1:t)))}function Cd(t){for(;(Z=Pt())&&Z<33;)_t();return bn(t)>2||bn(Z)>3?"":" "}function Md(t,e){for(;--e&&_t()&&!(Z<48||Z>102||Z>57&&Z<65||Z>70&&Z<97););return En(t,Kn()+(e<6&&Pt()==32&&_t()==32))}function Dr(t){for(;_t();)switch(Z){case t:return ft;case 34:case 39:t!==34&&t!==39&&Dr(Z);break;case 40:t===41&&Dr(t);break;case 92:_t();break}return ft}function Ad(t,e){for(;_t()&&t+Z!==57;)if(t+Z===84&&Pt()===47)break;return"/*"+En(e,ft-1)+"*"+Li(t===47?t:_t())}function $d(t){for(;!bn(Pt());)_t();return En(t,ft)}function Dd(t){return cc(Qn("",null,null,null,[""],t=ac(t),0,[0],t))}function Qn(t,e,n,i,r,o,s,a,l){for(var c=0,h=0,u=s,f=0,d=0,p=0,g=1,m=1,v=1,y=0,x="",_=r,b=o,w=i,S=x;m;)switch(p=y,y=_t()){case 40:if(p!=108&&rt(S,u-1)==58){$r(S+=L(Zn(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=Zn(y);break;case 9:case 10:case 13:case 32:S+=Cd(p);break;case 92:S+=Md(Kn()-1,7);continue;case 47:switch(Pt()){case 42:case 47:Un(Ed(Ad(_t(),Kn()),e,n),l);break;default:S+="/"}break;case 123*g:a[c++]=Nt(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+h:v==-1&&(S=L(S,/\f/g,"")),d>0&&Nt(S)-u&&Un(d>32?hs(S+";",i,n,u-1):hs(L(S," ","")+";",i,n,u-2),l);break;case 59:S+=";";default:if(Un(w=us(S,e,n,c,h,r,a,x,_=[],b=[],u),o),y===123)if(h===0)Qn(S,e,w,w,_,o,u,a,b);else switch(f===99&&rt(S,3)===110?100:f){case 100:case 108:case 109:case 115:Qn(t,w,w,i&&Un(us(t,w,w,0,0,r,a,x,r,_=[],u),b),r,b,u,a,i?_:b);break;default:Qn(S,w,w,w,[""],b,0,a,b)}}c=h=d=0,g=v=1,x=S="",u=s;break;case 58:u=1+Nt(S),d=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&Td()==125)continue}switch(S+=Li(y),y*g){case 38:v=h>0?1:(S+="\f",-1);break;case 44:a[c++]=(Nt(S)-1)*v,v=1;break;case 64:Pt()===45&&(S+=Zn(_t())),f=Pt(),h=u=Nt(x=S+=$d(Kn())),y++;break;case 45:p===45&&Nt(S)==2&&(g=0)}}return o}function us(t,e,n,i,r,o,s,a,l,c,h){for(var u=r-1,f=r===0?o:[""],d=lo(f),p=0,g=0,m=0;p<i;++p)for(var v=0,y=xn(t,u+1,u=vd(g=s[p])),x=t;v<d;++v)(x=oc(g>0?f[v]+" "+y:L(y,/&\f/g,f[v])))&&(l[m++]=x);return Bi(t,e,n,r===0?ao:a,l,c,h)}function Ed(t,e,n){return Bi(t,e,n,ic,Li(Sd()),xn(t,2,-2),0)}function hs(t,e,n,i){return Bi(t,e,n,co,xn(t,0,i),xn(t,i+1,-1),i)}function Me(t,e){for(var n="",i=lo(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function Nd(t,e,n,i){switch(t.type){case yd:if(t.children.length)break;case _d:case co:return t.return=t.return||t.value;case ic:return"";case rc:return t.return=t.value+"{"+Me(t.children,i)+"}";case ao:t.value=t.props.join(",")}return Nt(n=Me(t.children,i))?t.return=t.value+"{"+n+"}":""}function Pd(t){var e=lo(t);return function(n,i,r,o){for(var s="",a=0;a<e;a++)s+=t[a](n,i,r,o)||"";return s}}function Fd(t){return function(e){e.root||(e=e.return)&&t(e)}}function Od(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Rd=function(e,n,i){for(var r=0,o=0;r=o,o=Pt(),r===38&&o===12&&(n[i]=1),!bn(o);)_t();return En(e,ft)},Id=function(e,n){var i=-1,r=44;do switch(bn(r)){case 0:r===38&&Pt()===12&&(n[i]=1),e[i]+=Rd(ft-1,n,i);break;case 2:e[i]+=Zn(r);break;case 4:if(r===44){e[++i]=Pt()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=Li(r)}while(r=_t());return e},Ld=function(e,n){return cc(Id(ac(e),n))},fs=new WeakMap,zd=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!fs.get(i))&&!r){fs.set(e,!0);for(var o=[],s=Ld(n,o),a=i.props,l=0,c=0;l<s.length;l++)for(var h=0;h<a.length;h++,c++)e.props[c]=o[l]?s[l].replace(/&\f/g,a[h]):a[h]+" "+s[l]}}},Bd=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function lc(t,e){switch(bd(t,e)){case 5103:return I+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return I+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return I+t+pi+t+ot+t+t;case 6828:case 4268:return I+t+ot+t+t;case 6165:return I+t+ot+"flex-"+t+t;case 5187:return I+t+L(t,/(\w+).+(:[^]+)/,I+"box-$1$2"+ot+"flex-$1$2")+t;case 5443:return I+t+ot+"flex-item-"+L(t,/flex-|-self/,"")+t;case 4675:return I+t+ot+"flex-line-pack"+L(t,/align-content|flex-|-self/,"")+t;case 5548:return I+t+ot+L(t,"shrink","negative")+t;case 5292:return I+t+ot+L(t,"basis","preferred-size")+t;case 6060:return I+"box-"+L(t,"-grow","")+I+t+ot+L(t,"grow","positive")+t;case 4554:return I+L(t,/([^-])(transform)/g,"$1"+I+"$2")+t;case 6187:return L(L(L(t,/(zoom-|grab)/,I+"$1"),/(image-set)/,I+"$1"),t,"")+t;case 5495:case 3959:return L(t,/(image-set\([^]*)/,I+"$1$`$1");case 4968:return L(L(t,/(.+:)(flex-)?(.*)/,I+"box-pack:$3"+ot+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+I+t+t;case 4095:case 3583:case 4068:case 2532:return L(t,/(.+)-inline(.+)/,I+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nt(t)-1-e>6)switch(rt(t,e+1)){case 109:if(rt(t,e+4)!==45)break;case 102:return L(t,/(.+:)(.+)-([^]+)/,"$1"+I+"$2-$3$1"+pi+(rt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~$r(t,"stretch")?lc(L(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(rt(t,e+1)!==115)break;case 6444:switch(rt(t,Nt(t)-3-(~$r(t,"!important")&&10))){case 107:return L(t,":",":"+I)+t;case 101:return L(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+I+(rt(t,14)===45?"inline-":"")+"box$3$1"+I+"$2$3$1"+ot+"$2box$3")+t}break;case 5936:switch(rt(t,e+11)){case 114:return I+t+ot+L(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return I+t+ot+L(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return I+t+ot+L(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return I+t+ot+t+t}return t}var Ud=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case co:e.return=lc(e.value,e.length);break;case rc:return Me([nn(e,{value:L(e.value,"@","@"+I)})],r);case ao:if(e.length)return kd(e.props,function(o){switch(wd(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Me([nn(e,{props:[L(o,/:(read-\w+)/,":"+pi+"$1")]})],r);case"::placeholder":return Me([nn(e,{props:[L(o,/:(plac\w+)/,":"+I+"input-$1")]}),nn(e,{props:[L(o,/:(plac\w+)/,":"+pi+"$1")]}),nn(e,{props:[L(o,/:(plac\w+)/,ot+"input-$1")]})],r)}return""})}},Wd=[Ud],Hd=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var r=e.stylisPlugins||Wd,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;v<m.length;v++)o[m[v]]=!0;a.push(g)});var l,c=[zd,Bd];{var h,u=[Nd,Fd(function(g){h.insert(g)})],f=Pd(c.concat(r,u)),d=function(m){return Me(Dd(m),f)};l=function(m,v,y,x){h=y,d(m?m+"{"+v.styles+"}":v.styles),x&&(p.inserted[v.name]=!0)}}var p={key:n,sheet:new md({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(a),p};function Vd(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Yd={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Xd=/[A-Z]|^ms/g,Gd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uc=function(e){return e.charCodeAt(1)===45},ds=function(e){return e!=null&&typeof e!="boolean"},rr=Od(function(t){return uc(t)?t:t.replace(Xd,"-$&").toLowerCase()}),ps=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Gd,function(i,r,o){return qt={name:r,styles:o,next:qt},r})}return Yd[e]!==1&&!uc(e)&&typeof n=="number"&&n!==0?n+"px":n};function gi(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return qt={name:r.name,styles:r.styles,next:qt},r.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)qt={name:s.name,styles:s.styles,next:qt},s=s.next;var a=o.styles+";";return a}return jd(t,e,n)}}var l=n;if(e==null)return l;var c=e[l];return c!==void 0?c:l}function jd(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=gi(t,e,n[r])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":ds(a)&&(i+=rr(o)+":"+ps(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)ds(s[l])&&(i+=rr(o)+":"+ps(o,s[l])+";");else{var c=gi(t,e,s);switch(o){case"animation":case"animationName":{i+=rr(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var gs=/label:\s*([^\s;{]+)\s*(;|$)/g,qt;function or(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";qt=void 0;var o=t[0];if(o==null||o.raw===void 0)i=!1,r+=gi(n,e,o);else{var s=o;r+=s[0]}for(var a=1;a<t.length;a++)if(r+=gi(n,e,t[a]),i){var l=o;r+=l[a]}gs.lastIndex=0;for(var c="",h;(h=gs.exec(r))!==null;)c+="-"+h[1];var u=Vd(r)+c;return{name:u,styles:r,next:qt}}function hc(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var qd=function(e,n,i){var r=e.key+"-"+n.name;e.registered[r]===void 0&&(e.registered[r]=n.styles)},Kd=function(e,n,i){qd(e,n);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function ms(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function _s(t,e,n){var i=[],r=hc(t,i,n);return i.length<2?n:r+e(i)}var fc=function(e){var n=Hd(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=or(c,n.registered,void 0);return Kd(n,u),n.key+"-"+u.name},r=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=or(c,n.registered),f="animation-"+u.name;return ms(n,{name:u.name,styles:"@keyframes "+f+"{"+u.styles+"}"}),f},o=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=or(c,n.registered);ms(n,u)},s=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];return _s(n.registered,i,Zd(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:hc.bind(null,n.registered),merge:_s.bind(null,n.registered,i)}},Zd=function t(e){for(var n="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=t(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},dc=fc({key:"css"}),Qd=dc.injectGlobal,Jd=dc.css;const tp=Object.freeze(Object.defineProperty({__proto__:null,css:Jd,injectGlobal:Qd},Symbol.toStringTag,{value:"Module"})),ys=globalThis?.UNOVIS_NONCE,ep=ys?fc({key:"unovis",nonce:ys}):tp,{css:P,injectGlobal:qe}=ep,Le='html[data-theme="dark"],html.dark-theme,body.dark-theme,html.theme-dark,body.theme-dark';function uo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function pc(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Nn(){}var wn=.7,mi=1/wn,Ae="\\s*([+-]?\\d+)\\s*",kn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",np=/^#([0-9a-f]{3,8})$/,ip=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),rp=new RegExp(`^rgb\\(${Ft},${Ft},${Ft}\\)$`),op=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${kn}\\)$`),sp=new RegExp(`^rgba\\(${Ft},${Ft},${Ft},${kn}\\)$`),ap=new RegExp(`^hsl\\(${kn},${Ft},${Ft}\\)$`),cp=new RegExp(`^hsla\\(${kn},${Ft},${Ft},${kn}\\)$`),vs={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};uo(Nn,Qt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xs,formatHex:xs,formatHex8:lp,formatHsl:up,formatRgb:bs,toString:bs});function xs(){return this.rgb().formatHex()}function lp(){return this.rgb().formatHex8()}function up(){return gc(this).formatHsl()}function bs(){return this.rgb().formatRgb()}function Qt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=np.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?ws(e):n===3?new ct(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Wn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Wn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=ip.exec(t))?new ct(e[1],e[2],e[3],1):(e=rp.exec(t))?new ct(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=op.exec(t))?Wn(e[1],e[2],e[3],e[4]):(e=sp.exec(t))?Wn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ap.exec(t))?Ts(e[1],e[2]/100,e[3]/100,1):(e=cp.exec(t))?Ts(e[1],e[2]/100,e[3]/100,e[4]):vs.hasOwnProperty(t)?ws(vs[t]):t==="transparent"?new ct(NaN,NaN,NaN,0):null}function ws(t){return new ct(t>>16&255,t>>8&255,t&255,1)}function Wn(t,e,n,i){return i<=0&&(t=e=n=NaN),new ct(t,e,n,i)}function hp(t){return t instanceof Nn||(t=Qt(t)),t?(t=t.rgb(),new ct(t.r,t.g,t.b,t.opacity)):new ct}function Er(t,e,n,i){return arguments.length===1?hp(t):new ct(t,e,n,i??1)}function ct(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}uo(ct,Er,pc(Nn,{brighter(t){return t=t==null?mi:Math.pow(mi,t),new ct(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?wn:Math.pow(wn,t),new ct(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ct(ae(this.r),ae(this.g),ae(this.b),_i(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:ks,formatHex:ks,formatHex8:fp,formatRgb:Ss,toString:Ss}));function ks(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}`}function fp(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}${ie((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ss(){const t=_i(this.opacity);return`${t===1?"rgb(":"rgba("}${ae(this.r)}, ${ae(this.g)}, ${ae(this.b)}${t===1?")":`, ${t})`}`}function _i(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ae(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ie(t){return t=ae(t),(t<16?"0":"")+t.toString(16)}function Ts(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Mt(t,e,n,i)}function gc(t){if(t instanceof Mt)return new Mt(t.h,t.s,t.l,t.opacity);if(t instanceof Nn||(t=Qt(t)),!t)return new Mt;if(t instanceof Mt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new Mt(s,a,l,t.opacity)}function ho(t,e,n,i){return arguments.length===1?gc(t):new Mt(t,e,n,i??1)}function Mt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}uo(Mt,ho,pc(Nn,{brighter(t){return t=t==null?mi:Math.pow(mi,t),new Mt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?wn:Math.pow(wn,t),new Mt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new ct(sr(t>=240?t-240:t+120,r,i),sr(t,r,i),sr(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Mt(Cs(this.h),Hn(this.s),Hn(this.l),_i(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 t=_i(this.opacity);return`${t===1?"hsl(":"hsla("}${Cs(this.h)}, ${Hn(this.s)*100}%, ${Hn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Cs(t){return t=(t||0)%360,t<0?t+360:t}function Hn(t){return Math.max(0,Math.min(1,t||0))}function sr(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Kt=globalThis?.UNOVIS_COLORS||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],dp=globalThis?.UNOVIS_COLORS_DARK||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],gn=t=>`--vis-${st(t)?`color${t%Kt.length}`:t}`;function pp(t,e=.4){const n=ho(t);return n.l=n.l*(1+e),n.formatHex()}function gp(t,e=.4,n=.6){const i=ho(t);return i.s=i.s*(1-n),i.l=i.l*(1-e),i.formatHex()}const Jt=10,yi=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],Sn=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}],mp=new Map(yi.map(t=>[t.id,t])),_p=new Map(Sn.map(t=>[t.id,t]));function we(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}function mc(t){return`vis-pattern-fill-${t}`}function _c(t){return`vis-pattern-marker-${t}`}function yc(t){return`vis-pattern-marker-ctx-${t}`}function yp(t){return mp.get(t)??_p.get(t)??null}const vp=t=>`<mask id="${mc(t.id)}">
1
+ import{_ as uu,a as hu,b as fu,c as du}from"./DashboardSidebarCollapse-CWmehYha.js";import{_ as xa,a as pu}from"./DashboardToolbar-DHcR2yAt.js";import{_ as gu}from"./SelectMenu-B6n06FSV.js";import{d as St,e as U,h as Ut,w as z,c as J,g as Oi,_ as mu,f as X,t as K,a1 as ba,l as wa,j as An,F as Fe,x as ut,a8 as _u,a9 as jo,aa as yu,O as Ve,o as de,ab as Ye,p as pe,q as ht,r as Q,B as vu,ac as xu,ad as tr,D as bu,N as wu,Q as Je,ae as ku,u as nt,a as Y,af as Su,m as yr,s as ka,a4 as Tu,a5 as Cu,a6 as Mu,n as Au,b as $u,i as Du}from"./index-Cs2OnrL7.js";import{b as Eu,_ as Nu}from"./PeriodRangePicker.vue_vue_type_script_setup_true_lang-YOwfelec.js";import{_ as Pu,a as eo}from"./PageGrid-DelloK5f.js";import{a as gt,t as er,f as Ri,b as Fu}from"./usage-format-RcSEOPCq.js";import{_ as Ou}from"./Select-DGVDts9_.js";import{_ as Sa}from"./index-RZx6yIXX.js";const Ru={class:"flex items-center gap-2"},Iu={class:"text-2xl font-semibold text-highlighted"},Lu=St({__name:"UsageStats",props:{totals:{},previous:{}},setup(t){const e=t;function n(r,o){return o?Math.round((r-o)/o*100):null}const i=ut(()=>{const r=e.totals,o=e.previous;return[{title:"Runs",icon:"i-lucide-activity",value:String(r.runs),variation:n(r.runs,o.runs)},{title:"Tokens in",icon:"i-lucide-arrow-down-to-line",value:gt(r.input),variation:n(r.input,o.input)},{title:"Tokens out",icon:"i-lucide-arrow-up-from-line",value:gt(r.output),variation:n(r.output,o.output)},{title:"Cache",icon:"i-lucide-database",value:gt(r.cacheRead+r.cacheWrite),variation:n(r.cacheRead+r.cacheWrite,o.cacheRead+o.cacheWrite)},{title:"Total tokens",icon:"i-lucide-sigma",value:gt(er(r)),variation:n(er(r),er(o))},{title:"Cost",icon:"i-lucide-circle-dollar-sign",value:Ri(r.costUsd),variation:n(r.costUsd,o.costUsd)}]});return(r,o)=>{const s=ba,a=mu,l=Pu;return U(),Ut(l,{class:"lg:grid-cols-6 gap-4"},{default:z(()=>[(U(!0),J(Fe,null,Oi(i.value,c=>(U(),Ut(a,{key:c.title,icon:c.icon,title:c.title,variant:"subtle",ui:{container:"gap-y-1.5",title:"font-normal text-muted text-xs uppercase"}},{default:z(()=>[X("div",Ru,[X("span",Iu,K(c.value),1),c.variation!==null?(U(),Ut(s,{key:0,color:c.variation>0?"success":c.variation<0?"error":"neutral",variant:"subtle",class:"text-xs"},{default:z(()=>[wa(K(c.variation>0?"+":"")+K(c.variation)+"% ",1)]),_:2},1032,["color"])):An("",!0)])]),_:2},1032,["icon","title"]))),128))]),_:1})}}});var vr="http://www.w3.org/1999/xhtml";const qo={svg:"http://www.w3.org/2000/svg",xhtml:vr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ii(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),qo.hasOwnProperty(e)?{space:qo[e],local:t}:t}function zu(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===vr&&e.documentElement.namespaceURI===vr?e.createElement(t):e.createElementNS(n,t)}}function Bu(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ta(t){var e=Ii(t);return(e.local?Bu:zu)(e)}function Uu(){}function no(t){return t==null?Uu:function(){return this.querySelector(t)}}function Wu(t){typeof t!="function"&&(t=no(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new yt(i,this._parents)}function Hu(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Vu(){return[]}function Ca(t){return t==null?Vu:function(){return this.querySelectorAll(t)}}function Yu(t){return function(){return Hu(t.apply(this,arguments))}}function Xu(t){typeof t=="function"?t=Yu(t):t=Ca(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(i.push(t.call(l,l.__data__,c,s)),r.push(l));return new yt(i,r)}function Ma(t){return function(){return this.matches(t)}}function Aa(t){return function(e){return e.matches(t)}}var Gu=Array.prototype.find;function ju(t){return function(){return Gu.call(this.children,t)}}function qu(){return this.firstElementChild}function Ku(t){return this.select(t==null?qu:ju(typeof t=="function"?t:Aa(t)))}var Zu=Array.prototype.filter;function Qu(){return Array.from(this.children)}function Ju(t){return function(){return Zu.call(this.children,t)}}function th(t){return this.selectAll(t==null?Qu:Ju(typeof t=="function"?t:Aa(t)))}function eh(t){typeof t!="function"&&(t=Ma(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new yt(i,this._parents)}function $a(t){return new Array(t.length)}function nh(){return new yt(this._enter||this._groups.map($a),this._parents)}function li(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}li.prototype={constructor:li,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ih(t){return function(){return t}}function rh(t,e,n,i,r,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new li(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function oh(t,e,n,i,r,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),d;for(a=0;a<h;++a)(l=e[a])&&(f[a]=d=s.call(l,l.__data__,a,e)+"",c.has(d)?r[a]=l:c.set(d,l));for(a=0;a<u;++a)d=s.call(t,o[a],a,o)+"",(l=c.get(d))?(i[a]=l,l.__data__=o[a],c.delete(d)):n[a]=new li(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(r[a]=l)}function sh(t){return t.__data__}function ah(t,e){if(!arguments.length)return Array.from(this,sh);var n=e?oh:rh,i=this._parents,r=this._groups;typeof t!="function"&&(t=ih(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],u=r[c],f=u.length,d=ch(t.call(h,h&&h.__data__,c,i)),p=d.length,g=a[c]=new Array(p),m=s[c]=new Array(p),v=l[c]=new Array(f);n(h,u,g,m,v,d,e);for(var y=0,x=0,_,b;y<p;++y)if(_=g[y]){for(y>=x&&(x=y+1);!(b=m[x])&&++x<p;);_._next=b||null}}return s=new yt(s,i),s._enter=a,s._exit=l,s}function ch(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lh(){return new yt(this._exit||this._groups.map($a),this._parents)}function uh(t,e,n){var i=this.enter(),r=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?o.remove():n(o),i&&r?i.merge(r).order():r}function hh(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c=n[l],h=i[l],u=c.length,f=a[l]=new Array(u),d,p=0;p<u;++p)(d=c[p]||h[p])&&(f[p]=d);for(;l<r;++l)a[l]=n[l];return new yt(a,this._parents)}function fh(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,o=i[r],s;--r>=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function dh(t){t||(t=ph);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s=n[o],a=s.length,l=r[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new yt(r,this._parents).order()}function ph(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function gh(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function mh(){return Array.from(this)}function _h(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null}function yh(){let t=0;for(const e of this)++t;return t}function vh(){return!this.node()}function xh(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],o=0,s=r.length,a;o<s;++o)(a=r[o])&&t.call(a,a.__data__,o,r);return this}function bh(t){return function(){this.removeAttribute(t)}}function wh(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kh(t,e){return function(){this.setAttribute(t,e)}}function Sh(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Th(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ch(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Mh(t,e){var n=Ii(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?wh:bh:typeof e=="function"?n.local?Ch:Th:n.local?Sh:kh)(n,e))}function Da(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ah(t){return function(){this.style.removeProperty(t)}}function $h(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dh(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Eh(t,e,n){return arguments.length>1?this.each((e==null?Ah:typeof e=="function"?Dh:$h)(t,e,n??"")):Oe(this.node(),t)}function Oe(t,e){return t.style.getPropertyValue(e)||Da(t).getComputedStyle(t,null).getPropertyValue(e)}function Nh(t){return function(){delete this[t]}}function Ph(t,e){return function(){this[t]=e}}function Fh(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Oh(t,e){return arguments.length>1?this.each((e==null?Nh:typeof e=="function"?Fh:Ph)(t,e)):this.node()[t]}function Ea(t){return t.trim().split(/^|\s+/)}function io(t){return t.classList||new Na(t)}function Na(t){this._node=t,this._names=Ea(t.getAttribute("class")||"")}Na.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Pa(t,e){for(var n=io(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function Fa(t,e){for(var n=io(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Rh(t){return function(){Pa(this,t)}}function Ih(t){return function(){Fa(this,t)}}function Lh(t,e){return function(){(e.apply(this,arguments)?Pa:Fa)(this,t)}}function zh(t,e){var n=Ea(t+"");if(arguments.length<2){for(var i=io(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Lh:e?Rh:Ih)(n,e))}function Bh(){this.textContent=""}function Uh(t){return function(){this.textContent=t}}function Wh(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Hh(t){return arguments.length?this.each(t==null?Bh:(typeof t=="function"?Wh:Uh)(t)):this.node().textContent}function Vh(){this.innerHTML=""}function Yh(t){return function(){this.innerHTML=t}}function Xh(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Gh(t){return arguments.length?this.each(t==null?Vh:(typeof t=="function"?Xh:Yh)(t)):this.node().innerHTML}function jh(){this.nextSibling&&this.parentNode.appendChild(this)}function qh(){return this.each(jh)}function Kh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zh(){return this.each(Kh)}function Qh(t){var e=typeof t=="function"?t:Ta(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Jh(){return null}function tf(t,e){var n=typeof t=="function"?t:Ta(t),i=e==null?Jh:typeof e=="function"?e:no(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function ef(){var t=this.parentNode;t&&t.removeChild(this)}function nf(){return this.each(ef)}function rf(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function of(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function sf(t){return this.select(t?of:rf)}function af(t){return arguments.length?this.property("__data__",t):this.node().__data__}function cf(t){return function(e){t.call(this,e,this.__data__)}}function lf(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function uf(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n<r;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function hf(t,e,n){return function(){var i=this.__on,r,o=cf(e);if(i){for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function ff(t,e,n){var i=lf(t+""),r,o=i.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(r=0,h=a[l];r<o;++r)if((s=i[r]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?hf:uf,r=0;r<o;++r)this.each(a(i[r],e,n));return this}function Oa(t,e,n){var i=Da(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function df(t,e){return function(){return Oa(this,t,e)}}function pf(t,e){return function(){return Oa(this,t,e.apply(this,arguments))}}function gf(t,e){return this.each((typeof e=="function"?pf:df)(t,e))}function*mf(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length,s;r<o;++r)(s=i[r])&&(yield s)}var Ra=[null];function yt(t,e){this._groups=t,this._parents=e}function $n(){return new yt([[document.documentElement]],Ra)}function _f(){return this}yt.prototype=$n.prototype={constructor:yt,select:Wu,selectAll:Xu,selectChild:Ku,selectChildren:th,filter:eh,data:ah,enter:nh,exit:lh,join:uh,merge:hh,selection:_f,order:fh,sort:dh,call:gh,nodes:mh,node:_h,size:yh,empty:vh,each:xh,attr:Mh,style:Eh,property:Oh,classed:zh,text:Hh,html:Gh,raise:qh,lower:Zh,append:Qh,insert:tf,remove:nf,clone:sf,datum:af,on:ff,dispatch:gf,[Symbol.iterator]:mf};function mt(t){return typeof t=="string"?new yt([[document.querySelector(t)]],[document.documentElement]):new yt([[t]],Ra)}function yf(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ui(t,e){if(t=yf(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}var Gn=(t=>(t[t.SVG=0]="SVG",t[t.HTML=1]="HTML",t))(Gn||{}),_n=(t=>(t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width",t))(_n||{});function Zt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vf(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ro(t){let e,n,i;t.length!==2?(e=Zt,n=(a,l)=>Zt(t(a),l),i=(a,l)=>t(a)-l):(e=t===Zt||t===vf?t:xf,n=t,i=t);function r(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=r(a,l,c,h-1);return u>c&&i(a[u-1],l)>-i(a[u],l)?u-1:u}return{left:r,center:s,right:o}}function xf(){return 0}function Ia(t){return t===null?NaN:+t}const La=ro(Zt),Dn=La.right,bf=La.left;ro(Ia).center;function wf(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class Ko extends Map{constructor(e,n=Tf){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(Zo(this,e))}has(e){return super.has(Zo(this,e))}set(e,n){return super.set(kf(this,e),n)}delete(e){return super.delete(Sf(this,e))}}function Zo({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function kf({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function Sf({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function Tf(t){return t!==null&&typeof t=="object"?t.valueOf():t}const Cf=Math.sqrt(50),Mf=Math.sqrt(10),Af=Math.sqrt(2);function hi(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=Cf?10:o>=Mf?5:o>=Af?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?hi(t,e,n*2):[a,l,c]}function xr(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,s]=i?hi(e,t,n):hi(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function br(t,e,n){return e=+e,t=+t,n=+n,hi(t,e,n)[2]}function wr(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?br(e,t,n):br(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function kr(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function fn(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function $f(t,e,n=Ia){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}}function Df(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n}function*Ef(t){for(const e of t)yield*e}function Nf(t){return Array.from(Ef(t))}function Pf(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(r);++i<r;)o[i]=t+i*n;return o}function Ff(t,e=Zt){let n,i=!1;if(e.length===1){let r;for(const o of t){const s=e(o);(i?Zt(s,r)<0:Zt(s,s)===0)&&(n=o,r=s,i=!0)}}else for(const r of t)(i?e(r,n)<0:e(r,r)===0)&&(n=r,i=!0);return n}function Of(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function Rf(t,e,n){var i={},r=i.noTrailing,o=r===void 0?!1:r,s=i.noLeading,a=s===void 0?!1:s,l=i.debounceMode,c=l===void 0?void 0:l,h,u=!1,f=0;function d(){h&&clearTimeout(h)}function p(m){var v=m||{},y=v.upcomingOnly,x=y===void 0?!1:y;d(),u=!x}function g(){for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];var x=this,_=Date.now()-f;if(u)return;function b(){f=Date.now(),e.apply(x,v)}function w(){h=void 0}!a&&c&&!h&&b(),d(),c===void 0&&_>t?a?(f=Date.now(),o||(h=setTimeout(c?w:b,t))):b():o!==!0&&(h=setTimeout(c?w:b,c===void 0?t-_:t))}return g.cancel=p,g}var jt=(t=>(t.Left="left",t.Right="right",t.Auto="auto",t))(jt||{});const st=t=>typeof t=="number",ue=t=>typeof t=="function",za=t=>typeof t=="string",Ht=t=>Array.isArray(t),If=t=>t instanceof Object,oo=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",Qo=t=>If(t)&&!Ht(t)&&!ue(t)&&!oo(t),Lf=t=>[Object,Array].includes((t||{}).constructor)&&!Object.entries(t||{}).length,he=(t,e,n=[],i=new Set)=>{if(t===e)return!0;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(i.has(t))return!0;i.add(t);for(let r=0;r<t.length;r++)if(!he(t[r],e[r],n,i))return!1;return i.delete(t),!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;const r=Object.keys(t).filter(s=>!n.includes(s)),o=Object.keys(e).filter(s=>!n.includes(s));if(r.length!==o.length)return!1;if(i.has(t))return!0;i.add(t);for(const s of r)if(!he(t[s],e[s],n,i))return!1;return i.delete(t),!0}return t===e},Sr=t=>t.flat(),dn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const i of t)n.push(e.has(i)?e.get(i):dn(i,e));return n}if(oo(t))return t;if(t instanceof Object){const n={};e.set(t,n);const i=t;return Object.keys(t).reduce((r,o)=>(r[o]=e.has(i[o])?e.get(i[o]):dn(i[o],e),r),n),n}return t},Re=(t,e,n=new Map)=>{if(!t||!e)return t&&dn(t);if(t===e)return t;const i=oo(t)?t:dn(t);return n.has(e)?n.get(e):(n.set(e,i),Object.keys(e).forEach(r=>{r==="__proto__"||r==="constructor"||(Qo(t[r])&&Qo(e[r])?i[r]=Re(t[r],e[r],n):i[r]=dn(e[r]))}),i)},fi=(t,e,n)=>Rf(e,t);function Xe(t,e,n){return ue(e)?e(t,n):e}function yn(t,e,n){return Xe(t,e,n)}function F(t,e,n){return Xe(t,e,n)}function tn(t){return t.filter(e=>e&&!st(e))}function xt(t,e,n){return Math.min(Math.max(t,e),n)}function Ba(t,e,...n){if(!t)return[void 0,void 0];if(Ht(n)){let i,r;return t.forEach((o,s)=>{const a=F(o,e,s)||0;let l=a,c=a;for(const h of n){const u=F(o,h,s)||0;u>=0?l+=u:c+=u}(r===void 0||l>r)&&(r=l),(i===void 0||c<i)&&(i=c)}),[i??0,r??0]}}function Ua(t,e,...n){const i=[];let r=0,o=0;for(const s of n){const a=F(t,s,e)||0;a>=0?i.push(r+=a):i.push(o+=a)}return i}function Wa(t,e,n,i){const r=t.map((a,l)=>F(a,e,l)||0),o=n.map((a,l)=>{const c=Df(t,(h,u)=>F(h,a,u)||0);return c===0&&Array.isArray(i)?i[l]:c<0}),s=n.map(()=>[]);return t.forEach((a,l)=>{let c=r[l],h=r[l];n.forEach((u,f)=>{const d=F(a,u,l)||0;d>=0?s[f].push([c,c+=d]):s[f].push([h,h+=d])})}),s.forEach((a,l)=>{a.isMostlyNegative=o[l]}),s}function zf(t,...e){return t?fn(t,(i,r)=>fn(e,o=>F(i,o,r))):void 0}function Bf(t,...e){return t?kr(t,(i,r)=>kr(e,o=>F(i,o,r))):void 0}function jn(t,...e){return[zf(t,...e),Bf(t,...e)]}function di(t,e,n,i=jt.Auto){if(t.length<=1)return t[0];const o=t.map((l,c)=>[l,c]).sort(([l,c],[h,u])=>F(l,n,c)-F(h,n,u)),s=o.map(([l,c])=>F(l,n,c)),a=i===jt.Right?bf(s,e,0,t.length-1):Dn(s,e,1,t.length);return i===jt.Right?o[a][0]:i===jt.Left?o[a-1][0]:e-s[a-1]>s[a]-e?o[a][0]:o[a-1][0]}function Uf(t,e,n,i,r,o=[],s=[],a){if(!t?.length||!r)return;const[l,c]=e;let h,u=-1,f=1/0;for(let d=0;d<t.length;d++){const p=t[d],g=n(F(p,r,d));if(!isFinite(g))continue;const m=(g-l)**2;if(s.length){const v=F(p,a,d)||0,y=Ua(p,d,...s);for(let x=0;x<y.length;x++){if(!st(F(p,s[x],x)))continue;const _=i(y[x]+v),b=m+(_-c)**2;b<f&&(f=b,h=p,u=d)}}for(let v=0;v<o.length;v++){const y=F(p,o[v],d);if(!st(y))continue;const x=i(y),_=m+(x-c)**2;_<f&&(f=_,h=p,u=d)}}if(u!==-1)return{datum:h,index:u,distanceSq:f}}function Ha(t,e,n,i=!1){if(!n)return[];const r=t.filter((o,s)=>{const a=F(o,n,s);return a>=e[0]&&a<=e[1]});if(i){if(r.length===0){const u=di(t,e[0],n,jt.Left),f=di(t,e[1],n,jt.Right);return[u,f].filter(Boolean)}const o=r[0],s=r[r.length-1],a=t.findIndex(u=>u===o),l=t.findIndex(u=>u===s),c=Math.max(0,a-1),h=Math.min(t.length-1,l+1);return t.slice(c,h+1)}return r}function Tr(t){t=String(t);const e=parseFloat(t),n=t.match(/[\d.\-+]*\s*(.*)/)?.[1]||"";return[e,n]}function Va(){return typeof window<"u"&&typeof document<"u"}function Cr(t,e){const n=Tr(getComputedStyle(t).getPropertyValue(e));return n[0]*(Ge(n[1],t)??1)}function Ya(t,e){const n=document.createElement("div");n.style.height=`128${t}`,e.appendChild(n);const i=Cr(n,"height")/128;return e.removeChild(n),i}let In=null;function en(){return Va()?(In===null&&(In=96,In=Ya("in",document.body)),In):96}function Ge(t,e){if(!t&&t!==0)return null;if(!Va()){const o=Tr(String(t));if(!isNaN(o[0])){const s=o[1]?.toLowerCase()||"px";if(s==="px"||s==="")return o[0];if(s==="em"||s==="rem")return o[0]*16;if(s==="in")return o[0]*96;if(s==="cm")return o[0]*(96/2.54);if(s==="mm")return o[0]*(96/25.4);if(s==="pt")return o[0]*(96/72);if(s==="pc")return o[0]*(96/6)}return null}let n=document.body;e&&e!==window&&e!==document&&(n=e);const i=(String(t)||"px").trim().toLowerCase();switch(i){case"%":return n.clientHeight/100;case"ch":case"ex":return Ya(i,n);case"em":return Cr(n,"font-size");case"rem":return Cr(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return en();case"cm":return en()/2.54;case"mm":return en()/25.4;case"pt":return en()/72;case"pc":return en()/6;case"px":return 1}const r=Tr(i);if(!isNaN(r[0])){if(r[1]){const o=Ge(r[1],n);return typeof o=="number"?r[0]*o:null}return r[0]}return null}function Xa(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function Wf(t){return(t||"").replace(/\W/g,"_")}function Hf(t){return za(t)?t.substring(0,6)==="var(--":!1}const Jo=new WeakMap;function Ga(t,e){if(!za(t))return"";const n=t.substr(4,t.length-5);let i=Jo.get(e);if(i||(i=new Map,Jo.set(e,i)),i.has(n))return i.get(n);const r=getComputedStyle(e).getPropertyValue(n);return i.set(n,r),r}function ts(t){return typeof t=="number"?t:Ge(t)}function Vf(t,e){const n=Math.sin(e),i=Math.cos(e),r=[[t.x,t.y],[t.x+t.width,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height]],o=r.map(([c,h])=>c*i-h*n),s=r.map(([c,h])=>c*n+h*i),a=Math.min(...o),l=Math.min(...s);return{x:a,y:l,width:Math.max(...o)-a,height:Math.max(...s)-l}}function ja(t,e,n=0){const[i,r,o,s]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[a,l,c,h]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(r<h||l<s||o<a||c<i)}var oe=[],Yf=function(){return oe.some(function(t){return t.activeTargets.length>0})},Xf=function(){return oe.some(function(t){return t.skippedTargets.length>0})},es="ResizeObserver loop completed with undelivered notifications.",Gf=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:es}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=es),window.dispatchEvent(t)},vn;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(vn||(vn={}));var se=function(t){return Object.freeze(t)},jf=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,se(this)}return t})(),qa=(function(){function t(e,n,i,r){return this.x=e,this.y=n,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,se(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,r=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:i,top:r,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),so=function(t){return t instanceof SVGElement&&"getBBox"in t},Ka=function(t){if(so(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},ns=function(t){var e;if(t instanceof Element)return!0;var n=(e=t?.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},qf=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},pn=typeof window<"u"?window:{},Ln=new WeakMap,is=/auto|scroll/,Kf=/^tb|vertical/,Zf=/msie|trident/i.test(pn.navigator&&pn.navigator.userAgent),Et=function(t){return parseFloat(t||"0")},Ce=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new jf((n?e:t)||0,(n?t:e)||0)},rs=se({devicePixelContentBoxSize:Ce(),borderBoxSize:Ce(),contentBoxSize:Ce(),contentRect:new qa(0,0,0,0)}),Za=function(t,e){if(e===void 0&&(e=!1),Ln.has(t)&&!e)return Ln.get(t);if(Ka(t))return Ln.set(t,rs),rs;var n=getComputedStyle(t),i=so(t)&&t.ownerSVGElement&&t.getBBox(),r=!Zf&&n.boxSizing==="border-box",o=Kf.test(n.writingMode||""),s=!i&&is.test(n.overflowY||""),a=!i&&is.test(n.overflowX||""),l=i?0:Et(n.paddingTop),c=i?0:Et(n.paddingRight),h=i?0:Et(n.paddingBottom),u=i?0:Et(n.paddingLeft),f=i?0:Et(n.borderTopWidth),d=i?0:Et(n.borderRightWidth),p=i?0:Et(n.borderBottomWidth),g=i?0:Et(n.borderLeftWidth),m=u+c,v=l+h,y=g+d,x=f+p,_=a?t.offsetHeight-x-t.clientHeight:0,b=s?t.offsetWidth-y-t.clientWidth:0,w=r?m+y:0,S=r?v+x:0,A=i?i.width:Et(n.width)-w-b,$=i?i.height:Et(n.height)-S-_,V=A+m+b+y,B=$+v+_+x,M=se({devicePixelContentBoxSize:Ce(Math.round(A*devicePixelRatio),Math.round($*devicePixelRatio),o),borderBoxSize:Ce(V,B,o),contentBoxSize:Ce(A,$,o),contentRect:new qa(u,l,A,$)});return Ln.set(t,M),M},Qa=function(t,e,n){var i=Za(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case vn.DEVICE_PIXEL_CONTENT_BOX:return s;case vn.BORDER_BOX:return r;default:return o}},Qf=(function(){function t(e){var n=Za(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=se([n.borderBoxSize]),this.contentBoxSize=se([n.contentBoxSize]),this.devicePixelContentBoxSize=se([n.devicePixelContentBoxSize])}return t})(),Ja=function(t){if(Ka(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Jf=function(){var t=1/0,e=[];oe.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var h=new Qf(c.target),u=Ja(c.target);a.push(h),c.lastReportedSize=Qa(c.target,c.observedBox),u<t&&(t=u)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,i=e;n<i.length;n++){var r=i[n];r()}return t},os=function(t){oe.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Ja(r.target)>t?n.activeTargets.push(r):n.skippedTargets.push(r))})})},td=function(){var t=0;for(os(t);Yf();)t=Jf(),os(t);return Xf()&&Gf(),t>0},nr,tc=[],ed=function(){return tc.splice(0).forEach(function(t){return t()})},nd=function(t){if(!nr){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return ed()}).observe(n,i),nr=function(){n.textContent="".concat(e?e--:e++)}}tc.push(t),nr()},id=function(t){nd(function(){requestAnimationFrame(t)})},qn=0,rd=function(){return!!qn},od=250,sd={attributes:!0,characterData:!0,childList:!0,subtree:!0},ss=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],as=function(t){return t===void 0&&(t=0),Date.now()+t},ir=!1,ad=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=od),!ir){ir=!0;var i=as(e);id(function(){var r=!1;try{r=td()}finally{if(ir=!1,e=i-as(),!rd())return;r?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,sd)};document.body?n():pn.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ss.forEach(function(n){return pn.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),ss.forEach(function(n){return pn.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),Mr=new ad,cs=function(t){!qn&&t>0&&Mr.start(),qn+=t,!qn&&Mr.stop()},cd=function(t){return!so(t)&&!qf(t)&&getComputedStyle(t).display==="inline"},ld=(function(){function t(e,n){this.target=e,this.observedBox=n||vn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Qa(this.target,this.observedBox,!0);return cd(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),ud=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),zn=new WeakMap,ls=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Bn=(function(){function t(){}return t.connect=function(e,n){var i=new ud(e,n);zn.set(e,i)},t.observe=function(e,n,i){var r=zn.get(e),o=r.observationTargets.length===0;ls(r.observationTargets,n)<0&&(o&&oe.push(r),r.observationTargets.push(new ld(n,i&&i.box)),cs(1),Mr.schedule())},t.unobserve=function(e,n){var i=zn.get(e),r=ls(i.observationTargets,n),o=i.observationTargets.length===1;r>=0&&(o&&oe.splice(oe.indexOf(i),1),i.observationTargets.splice(r,1),cs(-1))},t.disconnect=function(e){var n=this,i=zn.get(e);i.observationTargets.slice().forEach(function(r){return n.unobserve(e,r.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t})(),hd=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Bn.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ns(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Bn.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ns(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Bn.unobserve(this,e)},t.prototype.disconnect=function(){Bn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();const fd=globalThis.ResizeObserver||hd,ec={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:_n.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0,colorFunction:void 0},nc=class Ar{constructor(e){this._defaultConfig=ec,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=mt(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",Ar.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){this.prevConfig=this.config,this.config=Re(this._defaultConfig,e),e?.svgDefs!==this.prevConfig?.svgDefs&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_propagateSizeAndStyleToComponents(e,n){for(const i of e)i&&(i.setSize(this.width,this.height,this.containerWidth,this.containerHeight),i.setContainerMargin(n),i.setColorFunction(this.config.colorFunction))}_render(e){const{config:n}=this;mt(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,i=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",i),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth||ts(this.config.width)||0:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight||ts(this.config.height)||0:this._container.clientHeight||this._container.getBoundingClientRect().height||Ar.DEFAULT_CONTAINER_HEIGHT}get width(){return xt(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return xt(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_reconcileChildren(e){const n=e.filter(Boolean),i=new Set(n);let r=this.element.firstChild;for(;r;){const s=r.nextSibling;i.has(r)||this.element.removeChild(r),r=s}let o=this.element.firstChild;for(const s of n)s===o?o=o.nextSibling:this.element.insertBefore(s,o)}_onResize(){const{config:e}=this;(e.sizing===_n.Fit||e.sizing===_n.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new fd((n,i)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const r=this._container.getBoundingClientRect(),o={width:r.width,height:r.height};!he(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserver?.disconnect(),this.svg.remove()}};nc.DEFAULT_CONTAINER_HEIGHT=300;let dd=nc;function pd(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function gd(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var md=(function(){function t(n){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(gd(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=pd(r);try{o.insertRule(i,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t})(),ot="-ms-",pi="-moz-",I="-webkit-",ic="comm",ao="rule",co="decl",_d="@import",rc="@keyframes",yd="@layer",vd=Math.abs,Li=String.fromCharCode,xd=Object.assign;function bd(t,e){return rt(t,0)^45?(((e<<2^rt(t,0))<<2^rt(t,1))<<2^rt(t,2))<<2^rt(t,3):0}function oc(t){return t.trim()}function wd(t,e){return(t=e.exec(t))?t[0]:t}function L(t,e,n){return t.replace(e,n)}function $r(t,e){return t.indexOf(e)}function rt(t,e){return t.charCodeAt(e)|0}function xn(t,e,n){return t.slice(e,n)}function Nt(t){return t.length}function lo(t){return t.length}function Un(t,e){return e.push(t),t}function kd(t,e){return t.map(e).join("")}var zi=1,Ie=1,sc=0,ft=0,Z=0,je="";function Bi(t,e,n,i,r,o,s){return{value:t,root:e,parent:n,type:i,props:r,children:o,line:zi,column:Ie,length:s,return:""}}function nn(t,e){return xd(Bi("",null,null,"",null,null,0),t,{length:-t.length},e)}function Sd(){return Z}function Td(){return Z=ft>0?rt(je,--ft):0,Ie--,Z===10&&(Ie=1,zi--),Z}function _t(){return Z=ft<sc?rt(je,ft++):0,Ie++,Z===10&&(Ie=1,zi++),Z}function Pt(){return rt(je,ft)}function Kn(){return ft}function En(t,e){return xn(je,t,e)}function bn(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ac(t){return zi=Ie=1,sc=Nt(je=t),ft=0,[]}function cc(t){return je="",t}function Zn(t){return oc(En(ft-1,Dr(t===91?t+2:t===40?t+1:t)))}function Cd(t){for(;(Z=Pt())&&Z<33;)_t();return bn(t)>2||bn(Z)>3?"":" "}function Md(t,e){for(;--e&&_t()&&!(Z<48||Z>102||Z>57&&Z<65||Z>70&&Z<97););return En(t,Kn()+(e<6&&Pt()==32&&_t()==32))}function Dr(t){for(;_t();)switch(Z){case t:return ft;case 34:case 39:t!==34&&t!==39&&Dr(Z);break;case 40:t===41&&Dr(t);break;case 92:_t();break}return ft}function Ad(t,e){for(;_t()&&t+Z!==57;)if(t+Z===84&&Pt()===47)break;return"/*"+En(e,ft-1)+"*"+Li(t===47?t:_t())}function $d(t){for(;!bn(Pt());)_t();return En(t,ft)}function Dd(t){return cc(Qn("",null,null,null,[""],t=ac(t),0,[0],t))}function Qn(t,e,n,i,r,o,s,a,l){for(var c=0,h=0,u=s,f=0,d=0,p=0,g=1,m=1,v=1,y=0,x="",_=r,b=o,w=i,S=x;m;)switch(p=y,y=_t()){case 40:if(p!=108&&rt(S,u-1)==58){$r(S+=L(Zn(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=Zn(y);break;case 9:case 10:case 13:case 32:S+=Cd(p);break;case 92:S+=Md(Kn()-1,7);continue;case 47:switch(Pt()){case 42:case 47:Un(Ed(Ad(_t(),Kn()),e,n),l);break;default:S+="/"}break;case 123*g:a[c++]=Nt(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+h:v==-1&&(S=L(S,/\f/g,"")),d>0&&Nt(S)-u&&Un(d>32?hs(S+";",i,n,u-1):hs(L(S," ","")+";",i,n,u-2),l);break;case 59:S+=";";default:if(Un(w=us(S,e,n,c,h,r,a,x,_=[],b=[],u),o),y===123)if(h===0)Qn(S,e,w,w,_,o,u,a,b);else switch(f===99&&rt(S,3)===110?100:f){case 100:case 108:case 109:case 115:Qn(t,w,w,i&&Un(us(t,w,w,0,0,r,a,x,r,_=[],u),b),r,b,u,a,i?_:b);break;default:Qn(S,w,w,w,[""],b,0,a,b)}}c=h=d=0,g=v=1,x=S="",u=s;break;case 58:u=1+Nt(S),d=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&Td()==125)continue}switch(S+=Li(y),y*g){case 38:v=h>0?1:(S+="\f",-1);break;case 44:a[c++]=(Nt(S)-1)*v,v=1;break;case 64:Pt()===45&&(S+=Zn(_t())),f=Pt(),h=u=Nt(x=S+=$d(Kn())),y++;break;case 45:p===45&&Nt(S)==2&&(g=0)}}return o}function us(t,e,n,i,r,o,s,a,l,c,h){for(var u=r-1,f=r===0?o:[""],d=lo(f),p=0,g=0,m=0;p<i;++p)for(var v=0,y=xn(t,u+1,u=vd(g=s[p])),x=t;v<d;++v)(x=oc(g>0?f[v]+" "+y:L(y,/&\f/g,f[v])))&&(l[m++]=x);return Bi(t,e,n,r===0?ao:a,l,c,h)}function Ed(t,e,n){return Bi(t,e,n,ic,Li(Sd()),xn(t,2,-2),0)}function hs(t,e,n,i){return Bi(t,e,n,co,xn(t,0,i),xn(t,i+1,-1),i)}function Me(t,e){for(var n="",i=lo(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function Nd(t,e,n,i){switch(t.type){case yd:if(t.children.length)break;case _d:case co:return t.return=t.return||t.value;case ic:return"";case rc:return t.return=t.value+"{"+Me(t.children,i)+"}";case ao:t.value=t.props.join(",")}return Nt(n=Me(t.children,i))?t.return=t.value+"{"+n+"}":""}function Pd(t){var e=lo(t);return function(n,i,r,o){for(var s="",a=0;a<e;a++)s+=t[a](n,i,r,o)||"";return s}}function Fd(t){return function(e){e.root||(e=e.return)&&t(e)}}function Od(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Rd=function(e,n,i){for(var r=0,o=0;r=o,o=Pt(),r===38&&o===12&&(n[i]=1),!bn(o);)_t();return En(e,ft)},Id=function(e,n){var i=-1,r=44;do switch(bn(r)){case 0:r===38&&Pt()===12&&(n[i]=1),e[i]+=Rd(ft-1,n,i);break;case 2:e[i]+=Zn(r);break;case 4:if(r===44){e[++i]=Pt()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=Li(r)}while(r=_t());return e},Ld=function(e,n){return cc(Id(ac(e),n))},fs=new WeakMap,zd=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!fs.get(i))&&!r){fs.set(e,!0);for(var o=[],s=Ld(n,o),a=i.props,l=0,c=0;l<s.length;l++)for(var h=0;h<a.length;h++,c++)e.props[c]=o[l]?s[l].replace(/&\f/g,a[h]):a[h]+" "+s[l]}}},Bd=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function lc(t,e){switch(bd(t,e)){case 5103:return I+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return I+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return I+t+pi+t+ot+t+t;case 6828:case 4268:return I+t+ot+t+t;case 6165:return I+t+ot+"flex-"+t+t;case 5187:return I+t+L(t,/(\w+).+(:[^]+)/,I+"box-$1$2"+ot+"flex-$1$2")+t;case 5443:return I+t+ot+"flex-item-"+L(t,/flex-|-self/,"")+t;case 4675:return I+t+ot+"flex-line-pack"+L(t,/align-content|flex-|-self/,"")+t;case 5548:return I+t+ot+L(t,"shrink","negative")+t;case 5292:return I+t+ot+L(t,"basis","preferred-size")+t;case 6060:return I+"box-"+L(t,"-grow","")+I+t+ot+L(t,"grow","positive")+t;case 4554:return I+L(t,/([^-])(transform)/g,"$1"+I+"$2")+t;case 6187:return L(L(L(t,/(zoom-|grab)/,I+"$1"),/(image-set)/,I+"$1"),t,"")+t;case 5495:case 3959:return L(t,/(image-set\([^]*)/,I+"$1$`$1");case 4968:return L(L(t,/(.+:)(flex-)?(.*)/,I+"box-pack:$3"+ot+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+I+t+t;case 4095:case 3583:case 4068:case 2532:return L(t,/(.+)-inline(.+)/,I+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nt(t)-1-e>6)switch(rt(t,e+1)){case 109:if(rt(t,e+4)!==45)break;case 102:return L(t,/(.+:)(.+)-([^]+)/,"$1"+I+"$2-$3$1"+pi+(rt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~$r(t,"stretch")?lc(L(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(rt(t,e+1)!==115)break;case 6444:switch(rt(t,Nt(t)-3-(~$r(t,"!important")&&10))){case 107:return L(t,":",":"+I)+t;case 101:return L(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+I+(rt(t,14)===45?"inline-":"")+"box$3$1"+I+"$2$3$1"+ot+"$2box$3")+t}break;case 5936:switch(rt(t,e+11)){case 114:return I+t+ot+L(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return I+t+ot+L(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return I+t+ot+L(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return I+t+ot+t+t}return t}var Ud=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case co:e.return=lc(e.value,e.length);break;case rc:return Me([nn(e,{value:L(e.value,"@","@"+I)})],r);case ao:if(e.length)return kd(e.props,function(o){switch(wd(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Me([nn(e,{props:[L(o,/:(read-\w+)/,":"+pi+"$1")]})],r);case"::placeholder":return Me([nn(e,{props:[L(o,/:(plac\w+)/,":"+I+"input-$1")]}),nn(e,{props:[L(o,/:(plac\w+)/,":"+pi+"$1")]}),nn(e,{props:[L(o,/:(plac\w+)/,ot+"input-$1")]})],r)}return""})}},Wd=[Ud],Hd=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var r=e.stylisPlugins||Wd,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;v<m.length;v++)o[m[v]]=!0;a.push(g)});var l,c=[zd,Bd];{var h,u=[Nd,Fd(function(g){h.insert(g)})],f=Pd(c.concat(r,u)),d=function(m){return Me(Dd(m),f)};l=function(m,v,y,x){h=y,d(m?m+"{"+v.styles+"}":v.styles),x&&(p.inserted[v.name]=!0)}}var p={key:n,sheet:new md({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(a),p};function Vd(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Yd={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Xd=/[A-Z]|^ms/g,Gd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uc=function(e){return e.charCodeAt(1)===45},ds=function(e){return e!=null&&typeof e!="boolean"},rr=Od(function(t){return uc(t)?t:t.replace(Xd,"-$&").toLowerCase()}),ps=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Gd,function(i,r,o){return qt={name:r,styles:o,next:qt},r})}return Yd[e]!==1&&!uc(e)&&typeof n=="number"&&n!==0?n+"px":n};function gi(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return qt={name:r.name,styles:r.styles,next:qt},r.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)qt={name:s.name,styles:s.styles,next:qt},s=s.next;var a=o.styles+";";return a}return jd(t,e,n)}}var l=n;if(e==null)return l;var c=e[l];return c!==void 0?c:l}function jd(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=gi(t,e,n[r])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":ds(a)&&(i+=rr(o)+":"+ps(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)ds(s[l])&&(i+=rr(o)+":"+ps(o,s[l])+";");else{var c=gi(t,e,s);switch(o){case"animation":case"animationName":{i+=rr(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var gs=/label:\s*([^\s;{]+)\s*(;|$)/g,qt;function or(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";qt=void 0;var o=t[0];if(o==null||o.raw===void 0)i=!1,r+=gi(n,e,o);else{var s=o;r+=s[0]}for(var a=1;a<t.length;a++)if(r+=gi(n,e,t[a]),i){var l=o;r+=l[a]}gs.lastIndex=0;for(var c="",h;(h=gs.exec(r))!==null;)c+="-"+h[1];var u=Vd(r)+c;return{name:u,styles:r,next:qt}}function hc(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var qd=function(e,n,i){var r=e.key+"-"+n.name;e.registered[r]===void 0&&(e.registered[r]=n.styles)},Kd=function(e,n,i){qd(e,n);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function ms(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function _s(t,e,n){var i=[],r=hc(t,i,n);return i.length<2?n:r+e(i)}var fc=function(e){var n=Hd(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=or(c,n.registered,void 0);return Kd(n,u),n.key+"-"+u.name},r=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=or(c,n.registered),f="animation-"+u.name;return ms(n,{name:u.name,styles:"@keyframes "+f+"{"+u.styles+"}"}),f},o=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=or(c,n.registered);ms(n,u)},s=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];return _s(n.registered,i,Zd(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:hc.bind(null,n.registered),merge:_s.bind(null,n.registered,i)}},Zd=function t(e){for(var n="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=t(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},dc=fc({key:"css"}),Qd=dc.injectGlobal,Jd=dc.css;const tp=Object.freeze(Object.defineProperty({__proto__:null,css:Jd,injectGlobal:Qd},Symbol.toStringTag,{value:"Module"})),ys=globalThis?.UNOVIS_NONCE,ep=ys?fc({key:"unovis",nonce:ys}):tp,{css:P,injectGlobal:qe}=ep,Le='html[data-theme="dark"],html.dark-theme,body.dark-theme,html.theme-dark,body.theme-dark';function uo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function pc(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Nn(){}var wn=.7,mi=1/wn,Ae="\\s*([+-]?\\d+)\\s*",kn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",np=/^#([0-9a-f]{3,8})$/,ip=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),rp=new RegExp(`^rgb\\(${Ft},${Ft},${Ft}\\)$`),op=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${kn}\\)$`),sp=new RegExp(`^rgba\\(${Ft},${Ft},${Ft},${kn}\\)$`),ap=new RegExp(`^hsl\\(${kn},${Ft},${Ft}\\)$`),cp=new RegExp(`^hsla\\(${kn},${Ft},${Ft},${kn}\\)$`),vs={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};uo(Nn,Qt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xs,formatHex:xs,formatHex8:lp,formatHsl:up,formatRgb:bs,toString:bs});function xs(){return this.rgb().formatHex()}function lp(){return this.rgb().formatHex8()}function up(){return gc(this).formatHsl()}function bs(){return this.rgb().formatRgb()}function Qt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=np.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?ws(e):n===3?new ct(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Wn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Wn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=ip.exec(t))?new ct(e[1],e[2],e[3],1):(e=rp.exec(t))?new ct(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=op.exec(t))?Wn(e[1],e[2],e[3],e[4]):(e=sp.exec(t))?Wn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ap.exec(t))?Ts(e[1],e[2]/100,e[3]/100,1):(e=cp.exec(t))?Ts(e[1],e[2]/100,e[3]/100,e[4]):vs.hasOwnProperty(t)?ws(vs[t]):t==="transparent"?new ct(NaN,NaN,NaN,0):null}function ws(t){return new ct(t>>16&255,t>>8&255,t&255,1)}function Wn(t,e,n,i){return i<=0&&(t=e=n=NaN),new ct(t,e,n,i)}function hp(t){return t instanceof Nn||(t=Qt(t)),t?(t=t.rgb(),new ct(t.r,t.g,t.b,t.opacity)):new ct}function Er(t,e,n,i){return arguments.length===1?hp(t):new ct(t,e,n,i??1)}function ct(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}uo(ct,Er,pc(Nn,{brighter(t){return t=t==null?mi:Math.pow(mi,t),new ct(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?wn:Math.pow(wn,t),new ct(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ct(ae(this.r),ae(this.g),ae(this.b),_i(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:ks,formatHex:ks,formatHex8:fp,formatRgb:Ss,toString:Ss}));function ks(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}`}function fp(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}${ie((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ss(){const t=_i(this.opacity);return`${t===1?"rgb(":"rgba("}${ae(this.r)}, ${ae(this.g)}, ${ae(this.b)}${t===1?")":`, ${t})`}`}function _i(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ae(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ie(t){return t=ae(t),(t<16?"0":"")+t.toString(16)}function Ts(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Mt(t,e,n,i)}function gc(t){if(t instanceof Mt)return new Mt(t.h,t.s,t.l,t.opacity);if(t instanceof Nn||(t=Qt(t)),!t)return new Mt;if(t instanceof Mt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new Mt(s,a,l,t.opacity)}function ho(t,e,n,i){return arguments.length===1?gc(t):new Mt(t,e,n,i??1)}function Mt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}uo(Mt,ho,pc(Nn,{brighter(t){return t=t==null?mi:Math.pow(mi,t),new Mt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?wn:Math.pow(wn,t),new Mt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new ct(sr(t>=240?t-240:t+120,r,i),sr(t,r,i),sr(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Mt(Cs(this.h),Hn(this.s),Hn(this.l),_i(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 t=_i(this.opacity);return`${t===1?"hsl(":"hsla("}${Cs(this.h)}, ${Hn(this.s)*100}%, ${Hn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Cs(t){return t=(t||0)%360,t<0?t+360:t}function Hn(t){return Math.max(0,Math.min(1,t||0))}function sr(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Kt=globalThis?.UNOVIS_COLORS||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],dp=globalThis?.UNOVIS_COLORS_DARK||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],gn=t=>`--vis-${st(t)?`color${t%Kt.length}`:t}`;function pp(t,e=.4){const n=ho(t);return n.l=n.l*(1+e),n.formatHex()}function gp(t,e=.4,n=.6){const i=ho(t);return i.s=i.s*(1-n),i.l=i.l*(1-e),i.formatHex()}const Jt=10,yi=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],Sn=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}],mp=new Map(yi.map(t=>[t.id,t])),_p=new Map(Sn.map(t=>[t.id,t]));function we(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}function mc(t){return`vis-pattern-fill-${t}`}function _c(t){return`vis-pattern-marker-${t}`}function yc(t){return`vis-pattern-marker-ctx-${t}`}function yp(t){return mp.get(t)??_p.get(t)??null}const vp=t=>`<mask id="${mc(t.id)}">
2
2
  <pattern id="vis-pattern-tile-${t.id}" viewBox="0 0 10 10" width="${Jt}" height="${Jt}" patternUnits="userSpaceOnUse">
3
3
  <rect width="10" height="10" fill="#fff"/>
4
4
  ${t.svg}
@@ -1 +1 @@
1
- import{_ as me,a as ve,b as ge,c as pe}from"./DashboardSidebarCollapse-rIuzCmVm.js";import{_ as fe,a as be}from"./DashboardToolbar-DFCUqZ4Z.js";import{R as ye,S as ke,ar as xe,e as n,h as $,w as p,D as A,u as a,an as he,E as T,y as Y,X as C,j as y,f as d,c as m,l as k,t as I,F as P,g as G,i as D,P as we,x as R,$ as _e,Z as $e,d as F,a as i,a1 as H,r as g,m as Ie,aj as Ue,s as je,ai as Ve,n as Se,q as W,o as Ce,b as X,_ as Pe}from"./index-C5RBBrPj.js";import{_ as Ae,a as De}from"./SelectMenu-BjMxc4VB.js";import{_ as qe,w as ze}from"./index-BMbMibyb.js";import{_ as Me}from"./WorkItemCell.vue_vue_type_script_setup_true_lang-BQn6vTjd.js";import{_ as E}from"./TimeCell.vue_vue_type_script_setup_true_lang-DW_UB0Fu.js";const Ee={slots:{root:"relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",wrapper:"min-w-0 flex-1 flex flex-col",title:"text-sm font-medium",description:"text-sm opacity-90",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex flex-wrap gap-1.5 shrink-0",close:"p-0"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},compoundVariants:[{color:"primary",variant:"solid",class:{root:"bg-primary text-inverted"}},{color:"secondary",variant:"solid",class:{root:"bg-secondary text-inverted"}},{color:"success",variant:"solid",class:{root:"bg-success text-inverted"}},{color:"info",variant:"solid",class:{root:"bg-info text-inverted"}},{color:"warning",variant:"solid",class:{root:"bg-warning text-inverted"}},{color:"error",variant:"solid",class:{root:"bg-error text-inverted"}},{color:"primary",variant:"outline",class:{root:"text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"outline",class:{root:"text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"outline",class:{root:"text-success ring ring-inset ring-success/25"}},{color:"info",variant:"outline",class:{root:"text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"outline",class:{root:"text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"outline",class:{root:"text-error ring ring-inset ring-error/25"}},{color:"primary",variant:"soft",class:{root:"bg-primary/10 text-primary"}},{color:"secondary",variant:"soft",class:{root:"bg-secondary/10 text-secondary"}},{color:"success",variant:"soft",class:{root:"bg-success/10 text-success"}},{color:"info",variant:"soft",class:{root:"bg-info/10 text-info"}},{color:"warning",variant:"soft",class:{root:"bg-warning/10 text-warning"}},{color:"error",variant:"soft",class:{root:"bg-error/10 text-error"}},{color:"primary",variant:"subtle",class:{root:"bg-primary/10 text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"subtle",class:{root:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"subtle",class:{root:"bg-success/10 text-success ring ring-inset ring-success/25"}},{color:"info",variant:"subtle",class:{root:"bg-info/10 text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"subtle",class:{root:"bg-warning/10 text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"subtle",class:{root:"bg-error/10 text-error ring ring-inset ring-error/25"}},{color:"neutral",variant:"solid",class:{root:"text-inverted bg-inverted"}},{color:"neutral",variant:"outline",class:{root:"text-highlighted bg-default ring ring-inset ring-default"}},{color:"neutral",variant:"soft",class:{root:"text-highlighted bg-elevated/50"}},{color:"neutral",variant:"subtle",class:{root:"text-highlighted bg-elevated/50 ring ring-inset ring-accented"}}],defaultVariants:{color:"primary",variant:"solid"}},Be={__name:"Alert",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},emits:["update:open"],setup(t,{emit:r}){const v=t,l=r,c=ye(),e=ke("alert",v),{t:b}=xe(),w=_e(),u=R(()=>$e({extend:Ee,...w.ui?.alert||{}})({color:e.color,variant:e.variant,orientation:e.orientation,title:!!e.title||!!c.title}));return(f,j)=>(n(),$(a(we),{as:a(e).as,"data-orientation":a(e).orientation,"data-slot":"root",class:C(u.value.root({class:[a(e).ui?.root,a(e).class]}))},{default:p(()=>[A(f.$slots,"leading",{ui:u.value},()=>[a(e).avatar?(n(),$(he,T({key:0,size:a(e).ui?.avatarSize||u.value.avatarSize()},a(e).avatar,{"data-slot":"avatar",class:u.value.avatar({class:a(e).ui?.avatar})}),null,16,["size","class"])):a(e).icon?(n(),$(Y,{key:1,name:a(e).icon,"data-slot":"icon",class:C(u.value.icon({class:a(e).ui?.icon}))},null,8,["name","class"])):y("",!0)]),d("div",{"data-slot":"wrapper",class:C(u.value.wrapper({class:a(e).ui?.wrapper}))},[a(e).title||c.title?(n(),m("div",{key:0,"data-slot":"title",class:C(u.value.title({class:a(e).ui?.title}))},[A(f.$slots,"title",{},()=>[k(I(a(e).title),1)])],2)):y("",!0),a(e).description||c.description?(n(),m("div",{key:1,"data-slot":"description",class:C(u.value.description({class:a(e).ui?.description}))},[A(f.$slots,"description",{},()=>[k(I(a(e).description),1)])],2)):y("",!0),a(e).orientation==="vertical"&&(a(e).actions?.length||c.actions)?(n(),m("div",{key:2,"data-slot":"actions",class:C(u.value.actions({class:a(e).ui?.actions}))},[A(f.$slots,"actions",{},()=>[(n(!0),m(P,null,G(a(e).actions,(o,V)=>(n(),$(D,T({key:V,size:"xs"},{ref_for:!0},o),null,16))),128))])],2)):y("",!0)],2),a(e).orientation==="horizontal"&&(a(e).actions?.length||c.actions)||a(e).close?(n(),m("div",{key:0,"data-slot":"actions",class:C(u.value.actions({class:a(e).ui?.actions,orientation:"horizontal"}))},[a(e).orientation==="horizontal"&&(a(e).actions?.length||c.actions)?A(f.$slots,"actions",{},()=>[(n(!0),m(P,null,G(a(e).actions,(o,V)=>(n(),$(D,T({key:V,size:"xs"},{ref_for:!0},o),null,16))),128))],void 0,0):y("",!0),A(f.$slots,"close",{ui:u.value},()=>[a(e).close?(n(),$(D,T({key:0,icon:a(e).closeIcon||a(w).ui.icons.close,color:"neutral",variant:"link","aria-label":a(b)("alert.close")},typeof a(e).close=="object"?a(e).close:{},{"data-slot":"close",class:u.value.close({class:a(e).ui?.close}),onClick:j[0]||(j[0]=o=>l("update:open",!1))}),null,16,["icon","aria-label","class"])):y("",!0)])],2)):y("",!0)]),_:3},8,["as","data-orientation","class"]))}};function Te(t){return t==="eligible"?"warning":t==="expiring"?"primary":t==="untracked"?"warning":t==="missing"?"error":"neutral"}function J(t){return t.state==="untracked"?"Untracked":t.state==="unmapped"?"Unmapped":t.state==="missing"?"Missing":t.state==="eligible"?"Purge eligible":t.remainingMs===null?"Expiring":`Purges in ~${Le(t.remainingMs)}`}function Le(t){const r=Math.round(t/1e3);if(r<60)return`${r}s`;const v=Math.round(r/60);if(v<60)return`${v}m`;const l=Math.round(v/60);return l<48?`${l}h`:`${Math.round(l/24)}d`}function Q(t){const r=[];return t.volumes.workspace&&r.push("workspace"),t.volumes.podman&&r.push("podman"),t.volumes.xdg&&r.push("xdg"),r.length>0?r.join(", "):"—"}const Ne={key:0,class:"text-xs text-dimmed"},Oe={class:"text-sm text-muted"},Ge=F({__name:"VolumesTable",props:{volumes:{},loading:{type:Boolean},deleting:{}},emits:["delete","details"],setup(t,{emit:r}){const v=r,l=[{accessorKey:"workItemId",header:"Work item"},{accessorKey:"state",header:"GC state"},{accessorKey:"volumes",header:"Volumes"},{accessorKey:"createdAt",header:"Created"},{accessorKey:"lastRunAt",header:"Last used"},{id:"actions"}],c=g(null);function e(b){if(c.value!==b.workItemId){c.value=b.workItemId;return}c.value=null,v("delete",b)}return(b,w)=>{const u=H,f=D,j=qe;return n(),$(j,{data:t.volumes,columns:l,loading:t.loading},{"workItemId-cell":p(({row:o})=>[i(Me,{"work-item-iid":o.original.workItemNumber,"work-item-title":o.original.workItemTitle,"project-path":o.original.projectPath,"project-id":o.original.projectId,onOpen:V=>v("details",o.original)},null,8,["work-item-iid","work-item-title","project-path","project-id","onOpen"]),o.original.tracked?y("",!0):(n(),m("span",Ne,"volume id "+I(o.original.workItemId),1))]),"state-cell":p(({row:o})=>[i(u,{label:a(J)(o.original),color:a(Te)(o.original.state),variant:"subtle"},null,8,["label","color"])]),"volumes-cell":p(({row:o})=>[d("span",Oe,I(a(Q)(o.original)),1)]),"createdAt-cell":p(({row:o})=>[i(E,{value:o.original.createdAt||null,unit:"s"},null,8,["value"])]),"lastRunAt-cell":p(({row:o})=>[i(E,{value:o.original.lastRunAt||null,unit:"s"},null,8,["value"])]),"actions-cell":p(({row:o})=>[i(f,{label:c.value===o.original.workItemId?"Confirm":"Delete",icon:c.value===o.original.workItemId?"i-lucide-check":"i-lucide-trash-2",color:c.value===o.original.workItemId?"error":"neutral",variant:"ghost",size:"xs",loading:t.deleting===o.original.workItemId,"aria-label":`Delete volume for work item ${o.original.workItemId}`,onClick:V=>e(o.original)},null,8,["label","icon","color","loading","aria-label","onClick"])]),_:1},8,["data","loading"])}}}),Re={key:0,class:"text-sm text-muted space-y-1"},Fe={key:0},Ke={key:1},Ze=F({__name:"VolumeDetailSlideover",props:je({volume:{}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(t){const r=Ie(t,"open");return(v,l)=>{const c=D,e=Ve;return n(),$(e,{open:r.value,"onUpdate:open":l[0]||(l[0]=b=>r.value=b),title:"Volume detail",description:t.volume?`#${t.volume.workItemNumber} ${t.volume.workItemTitle}`:"",ui:{content:"max-w-xl",footer:"justify-end"}},Ue({body:p(()=>[t.volume?(n(),m("div",Re,[d("p",null,[l[1]||(l[1]=d("span",{class:"text-default font-medium"},"State:",-1)),k(" "+I(a(J)(t.volume)),1)]),d("p",null,[l[2]||(l[2]=d("span",{class:"text-default font-medium"},"Project:",-1)),k(" "+I(t.volume.projectPath||`project ${t.volume.projectId}`),1)]),d("p",null,[l[3]||(l[3]=d("span",{class:"text-default font-medium"},"Volumes:",-1)),k(" "+I(a(Q)(t.volume)),1)]),d("p",null,[l[4]||(l[4]=d("span",{class:"text-default font-medium"},"Created:",-1)),l[5]||(l[5]=k()),i(E,{value:t.volume.createdAt||null,unit:"s"},null,8,["value"])]),d("p",null,[l[6]||(l[6]=d("span",{class:"text-default font-medium"},"Last used:",-1)),l[7]||(l[7]=k()),i(E,{value:t.volume.lastRunAt||null,unit:"s"},null,8,["value"])]),t.volume.purgeEligibleAt?(n(),m("p",Fe,[l[8]||(l[8]=d("span",{class:"text-default font-medium"},"Purge eligible:",-1)),i(E,{value:t.volume.purgeEligibleAt,unit:"ms"},null,8,["value"])])):y("",!0),d("p",null,[l[9]||(l[9]=d("span",{class:"text-default font-medium"},"Tracked:",-1)),k(" "+I(t.volume.tracked?"Yes":"No"),1)]),t.volume.tracked?y("",!0):(n(),m("p",Ke,[l[10]||(l[10]=d("span",{class:"text-default font-medium"},"Volume ID:",-1)),k(" "+I(t.volume.workItemId),1)]))])):y("",!0)]),_:2},[t.volume&&t.volume.workItemUrl?{name:"footer",fn:p(()=>[i(c,{label:"Open in forge",icon:"i-lucide-external-link",color:"neutral",variant:"soft",to:t.volume.workItemUrl,target:"_blank",rel:"noopener"},null,8,["to"])]),key:"0"}:void 0]),1032,["open","description"])}}}),We={class:"space-y-4"},Xe={key:1,class:"space-y-3"},Ye={class:"space-y-3 py-6"},He={class:"text-muted"},Je={class:"text-xs text-dimmed"},Qe={key:0,class:"flex justify-center pt-2"},M=15,it=F({__name:"VolumesPage",setup(t){const r=g([]),v=g(!0),l=g(0),c=g(!0),e=g(!0),b=Se(),w=g(null),u=g(null),f=g(""),j=g({projects:[]}),o=g({}),V=[{label:"All states",value:null},{label:"Expiring",value:"expiring"},{label:"Purge eligible",value:"eligible"},{label:"Missing",value:"missing"},{label:"Untracked",value:"untracked"},{label:"Unmapped",value:"unmapped"}],ee=R(()=>[{label:"All projects",value:null},...j.value.projects.map(x=>({label:o.value[String(x)]??`#${x}`,value:x}))]),te=R(()=>w.value!==null||u.value!==null||f.value.trim()!==""),U=g(1),L=g(null),N=g(!1),K=g(null);function ae(x){K.value=x,N.value=!0}async function le(x){L.value=x.workItemId;const{data:s,error:S,status:_}=await X(`/api/volumes/${x.workItemId}`,{method:"DELETE"});if(L.value=null,S){_!==401&&b.add({title:"Failed to delete volume",description:S,color:"error",icon:"i-lucide-alert-circle"});return}s&&!s.ok?b.add({title:"Volume deletion failed",description:s.message,color:"error",icon:"i-lucide-alert-circle"}):b.add({title:"Volume deleted",...s?.notePosted?{description:"A note was posted to the work item."}:{},color:"success",icon:"i-lucide-check-circle"}),await q()}async function q(){v.value=!0;const x=(U.value-1)*M,s=new URLSearchParams;w.value!==null&&s.set("state",w.value),u.value!==null&&s.set("projectId",String(u.value));const S=f.value.trim();S.length>0&&s.set("q",S),s.set("limit",String(M)),s.set("offset",String(x));const{data:_,error:B,status:O}=await X(`/api/volumes?${s.toString()}`);if(v.value=!1,B){O!==401&&b.add({title:"Failed to load volumes",description:B,color:"error",icon:"i-lucide-alert-circle"});return}r.value=_?.volumes??[],l.value=_?.total??r.value.length,c.value=_?.gcEnabled??!0,e.value=_?.podmanAvailable??!0,j.value=_?.filterOptions??{projects:[]},o.value=_?.projectPaths??{};const z=Math.max(1,Math.ceil(l.value/M));if(U.value>z){U.value=z;return}}function Z(){U.value!==1?U.value=1:q()}return W([w,u],Z),ze(f,Z,{debounce:300}),W(U,()=>{q()}),Ce(q),(x,s)=>{const S=pe,_=H,B=D,O=ge,z=Ae,oe=De,ne=be,se=Be,ie=ve,re=Y,ue=Pe,ce=fe,de=me;return n(),m(P,null,[i(de,{id:"volumes"},{header:p(()=>[i(O,{title:"Volumes",icon:"i-lucide-hard-drive"},{leading:p(()=>[i(S)]),right:p(()=>[i(_,{label:c.value?"GC on":"GC off",color:c.value?"success":"neutral",variant:"subtle",icon:"i-lucide-recycle"},null,8,["label","color"]),i(B,{label:"Reload",icon:"i-lucide-refresh-cw",color:"neutral",variant:"soft",loading:v.value,onClick:q},null,8,["loading"])]),_:1}),i(ne,null,{left:p(()=>[i(z,{modelValue:w.value,"onUpdate:modelValue":s[0]||(s[0]=h=>w.value=h),items:V,"value-key":"value",class:"w-40","aria-label":"GC state filter"},null,8,["modelValue"]),i(z,{modelValue:u.value,"onUpdate:modelValue":s[1]||(s[1]=h=>u.value=h),items:ee.value,"value-key":"value",class:"w-48","aria-label":"Project filter"},null,8,["modelValue","items"]),i(oe,{modelValue:f.value,"onUpdate:modelValue":s[2]||(s[2]=h=>f.value=h),icon:"i-lucide-search",placeholder:"Search work item title","aria-label":"Search work item title",class:"w-64"},null,8,["modelValue"])]),_:1})]),body:p(()=>[d("div",We,[e.value?y("",!0):(n(),$(se,{key:0,color:"warning",variant:"subtle",icon:"i-lucide-triangle-alert",title:"Podman unavailable",description:"The list shows tracked volumes only; volumes created outside the ledger could not be read."})),v.value&&r.value.length===0?(n(),m("div",Xe,[(n(),m(P,null,G(3,h=>i(ie,{key:h,class:"h-10 w-full"})),64))])):r.value.length===0?(n(),$(ue,{key:2,class:"text-center"},{default:p(()=>[d("div",Ye,[i(re,{name:"i-lucide-hard-drive",class:"size-10 text-dimmed mx-auto"}),d("p",He,I(te.value?"No volumes match your filters.":"No volumes."),1)])]),_:1})):(n(),m(P,{key:3},[i(Ge,{volumes:r.value,loading:v.value,deleting:L.value,onDelete:le,onDetails:ae},null,8,["volumes","loading","deleting"]),d("p",Je,[s[5]||(s[5]=k(" GC state is based on the volume ledger and the inactivity TTL. ",-1)),c.value?(n(),m(P,{key:0},[k("Closed or deleted work items are purged on the next sweep.")],64)):(n(),m(P,{key:1},[k("Volume GC is disabled, so nothing is purged automatically.")],64))]),l.value>M?(n(),m("div",Qe,[i(ce,{page:U.value,"onUpdate:page":s[3]||(s[3]=h=>U.value=h),total:l.value,"items-per-page":M},null,8,["page","total"])])):y("",!0)],64))])]),_:1}),i(Ze,{open:N.value,"onUpdate:open":s[4]||(s[4]=h=>N.value=h),volume:K.value},null,8,["open","volume"])],64)}}});export{it as default};
1
+ import{_ as me,a as ve,b as ge,c as pe}from"./DashboardSidebarCollapse-CWmehYha.js";import{_ as fe,a as be}from"./DashboardToolbar-DHcR2yAt.js";import{R as ye,S as ke,ar as xe,e as n,h as $,w as p,D as A,u as a,an as he,E as T,y as Y,X as C,j as y,f as d,c as m,l as k,t as I,F as P,g as G,i as D,P as we,x as R,$ as _e,Z as $e,d as F,a as i,a1 as H,r as g,m as Ie,aj as Ue,s as je,ai as Ve,n as Se,q as W,o as Ce,b as X,_ as Pe}from"./index-Cs2OnrL7.js";import{_ as Ae,a as De}from"./SelectMenu-B6n06FSV.js";import{_ as qe,w as ze}from"./index-RZx6yIXX.js";import{_ as Me}from"./WorkItemCell.vue_vue_type_script_setup_true_lang-DAJMkNI8.js";import{_ as E}from"./TimeCell.vue_vue_type_script_setup_true_lang-BNWTJF4u.js";const Ee={slots:{root:"relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",wrapper:"min-w-0 flex-1 flex flex-col",title:"text-sm font-medium",description:"text-sm opacity-90",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex flex-wrap gap-1.5 shrink-0",close:"p-0"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},compoundVariants:[{color:"primary",variant:"solid",class:{root:"bg-primary text-inverted"}},{color:"secondary",variant:"solid",class:{root:"bg-secondary text-inverted"}},{color:"success",variant:"solid",class:{root:"bg-success text-inverted"}},{color:"info",variant:"solid",class:{root:"bg-info text-inverted"}},{color:"warning",variant:"solid",class:{root:"bg-warning text-inverted"}},{color:"error",variant:"solid",class:{root:"bg-error text-inverted"}},{color:"primary",variant:"outline",class:{root:"text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"outline",class:{root:"text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"outline",class:{root:"text-success ring ring-inset ring-success/25"}},{color:"info",variant:"outline",class:{root:"text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"outline",class:{root:"text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"outline",class:{root:"text-error ring ring-inset ring-error/25"}},{color:"primary",variant:"soft",class:{root:"bg-primary/10 text-primary"}},{color:"secondary",variant:"soft",class:{root:"bg-secondary/10 text-secondary"}},{color:"success",variant:"soft",class:{root:"bg-success/10 text-success"}},{color:"info",variant:"soft",class:{root:"bg-info/10 text-info"}},{color:"warning",variant:"soft",class:{root:"bg-warning/10 text-warning"}},{color:"error",variant:"soft",class:{root:"bg-error/10 text-error"}},{color:"primary",variant:"subtle",class:{root:"bg-primary/10 text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"subtle",class:{root:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"subtle",class:{root:"bg-success/10 text-success ring ring-inset ring-success/25"}},{color:"info",variant:"subtle",class:{root:"bg-info/10 text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"subtle",class:{root:"bg-warning/10 text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"subtle",class:{root:"bg-error/10 text-error ring ring-inset ring-error/25"}},{color:"neutral",variant:"solid",class:{root:"text-inverted bg-inverted"}},{color:"neutral",variant:"outline",class:{root:"text-highlighted bg-default ring ring-inset ring-default"}},{color:"neutral",variant:"soft",class:{root:"text-highlighted bg-elevated/50"}},{color:"neutral",variant:"subtle",class:{root:"text-highlighted bg-elevated/50 ring ring-inset ring-accented"}}],defaultVariants:{color:"primary",variant:"solid"}},Be={__name:"Alert",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},emits:["update:open"],setup(t,{emit:r}){const v=t,l=r,c=ye(),e=ke("alert",v),{t:b}=xe(),w=_e(),u=R(()=>$e({extend:Ee,...w.ui?.alert||{}})({color:e.color,variant:e.variant,orientation:e.orientation,title:!!e.title||!!c.title}));return(f,j)=>(n(),$(a(we),{as:a(e).as,"data-orientation":a(e).orientation,"data-slot":"root",class:C(u.value.root({class:[a(e).ui?.root,a(e).class]}))},{default:p(()=>[A(f.$slots,"leading",{ui:u.value},()=>[a(e).avatar?(n(),$(he,T({key:0,size:a(e).ui?.avatarSize||u.value.avatarSize()},a(e).avatar,{"data-slot":"avatar",class:u.value.avatar({class:a(e).ui?.avatar})}),null,16,["size","class"])):a(e).icon?(n(),$(Y,{key:1,name:a(e).icon,"data-slot":"icon",class:C(u.value.icon({class:a(e).ui?.icon}))},null,8,["name","class"])):y("",!0)]),d("div",{"data-slot":"wrapper",class:C(u.value.wrapper({class:a(e).ui?.wrapper}))},[a(e).title||c.title?(n(),m("div",{key:0,"data-slot":"title",class:C(u.value.title({class:a(e).ui?.title}))},[A(f.$slots,"title",{},()=>[k(I(a(e).title),1)])],2)):y("",!0),a(e).description||c.description?(n(),m("div",{key:1,"data-slot":"description",class:C(u.value.description({class:a(e).ui?.description}))},[A(f.$slots,"description",{},()=>[k(I(a(e).description),1)])],2)):y("",!0),a(e).orientation==="vertical"&&(a(e).actions?.length||c.actions)?(n(),m("div",{key:2,"data-slot":"actions",class:C(u.value.actions({class:a(e).ui?.actions}))},[A(f.$slots,"actions",{},()=>[(n(!0),m(P,null,G(a(e).actions,(o,V)=>(n(),$(D,T({key:V,size:"xs"},{ref_for:!0},o),null,16))),128))])],2)):y("",!0)],2),a(e).orientation==="horizontal"&&(a(e).actions?.length||c.actions)||a(e).close?(n(),m("div",{key:0,"data-slot":"actions",class:C(u.value.actions({class:a(e).ui?.actions,orientation:"horizontal"}))},[a(e).orientation==="horizontal"&&(a(e).actions?.length||c.actions)?A(f.$slots,"actions",{},()=>[(n(!0),m(P,null,G(a(e).actions,(o,V)=>(n(),$(D,T({key:V,size:"xs"},{ref_for:!0},o),null,16))),128))],void 0,0):y("",!0),A(f.$slots,"close",{ui:u.value},()=>[a(e).close?(n(),$(D,T({key:0,icon:a(e).closeIcon||a(w).ui.icons.close,color:"neutral",variant:"link","aria-label":a(b)("alert.close")},typeof a(e).close=="object"?a(e).close:{},{"data-slot":"close",class:u.value.close({class:a(e).ui?.close}),onClick:j[0]||(j[0]=o=>l("update:open",!1))}),null,16,["icon","aria-label","class"])):y("",!0)])],2)):y("",!0)]),_:3},8,["as","data-orientation","class"]))}};function Te(t){return t==="eligible"?"warning":t==="expiring"?"primary":t==="untracked"?"warning":t==="missing"?"error":"neutral"}function J(t){return t.state==="untracked"?"Untracked":t.state==="unmapped"?"Unmapped":t.state==="missing"?"Missing":t.state==="eligible"?"Purge eligible":t.remainingMs===null?"Expiring":`Purges in ~${Le(t.remainingMs)}`}function Le(t){const r=Math.round(t/1e3);if(r<60)return`${r}s`;const v=Math.round(r/60);if(v<60)return`${v}m`;const l=Math.round(v/60);return l<48?`${l}h`:`${Math.round(l/24)}d`}function Q(t){const r=[];return t.volumes.workspace&&r.push("workspace"),t.volumes.podman&&r.push("podman"),t.volumes.xdg&&r.push("xdg"),r.length>0?r.join(", "):"—"}const Ne={key:0,class:"text-xs text-dimmed"},Oe={class:"text-sm text-muted"},Ge=F({__name:"VolumesTable",props:{volumes:{},loading:{type:Boolean},deleting:{}},emits:["delete","details"],setup(t,{emit:r}){const v=r,l=[{accessorKey:"workItemId",header:"Work item"},{accessorKey:"state",header:"GC state"},{accessorKey:"volumes",header:"Volumes"},{accessorKey:"createdAt",header:"Created"},{accessorKey:"lastRunAt",header:"Last used"},{id:"actions"}],c=g(null);function e(b){if(c.value!==b.workItemId){c.value=b.workItemId;return}c.value=null,v("delete",b)}return(b,w)=>{const u=H,f=D,j=qe;return n(),$(j,{data:t.volumes,columns:l,loading:t.loading},{"workItemId-cell":p(({row:o})=>[i(Me,{"work-item-iid":o.original.workItemNumber,"work-item-title":o.original.workItemTitle,"project-path":o.original.projectPath,"project-id":o.original.projectId,onOpen:V=>v("details",o.original)},null,8,["work-item-iid","work-item-title","project-path","project-id","onOpen"]),o.original.tracked?y("",!0):(n(),m("span",Ne,"volume id "+I(o.original.workItemId),1))]),"state-cell":p(({row:o})=>[i(u,{label:a(J)(o.original),color:a(Te)(o.original.state),variant:"subtle"},null,8,["label","color"])]),"volumes-cell":p(({row:o})=>[d("span",Oe,I(a(Q)(o.original)),1)]),"createdAt-cell":p(({row:o})=>[i(E,{value:o.original.createdAt||null,unit:"s"},null,8,["value"])]),"lastRunAt-cell":p(({row:o})=>[i(E,{value:o.original.lastRunAt||null,unit:"s"},null,8,["value"])]),"actions-cell":p(({row:o})=>[i(f,{label:c.value===o.original.workItemId?"Confirm":"Delete",icon:c.value===o.original.workItemId?"i-lucide-check":"i-lucide-trash-2",color:c.value===o.original.workItemId?"error":"neutral",variant:"ghost",size:"xs",loading:t.deleting===o.original.workItemId,"aria-label":`Delete volume for work item ${o.original.workItemId}`,onClick:V=>e(o.original)},null,8,["label","icon","color","loading","aria-label","onClick"])]),_:1},8,["data","loading"])}}}),Re={key:0,class:"text-sm text-muted space-y-1"},Fe={key:0},Ke={key:1},Ze=F({__name:"VolumeDetailSlideover",props:je({volume:{}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(t){const r=Ie(t,"open");return(v,l)=>{const c=D,e=Ve;return n(),$(e,{open:r.value,"onUpdate:open":l[0]||(l[0]=b=>r.value=b),title:"Volume detail",description:t.volume?`#${t.volume.workItemNumber} ${t.volume.workItemTitle}`:"",ui:{content:"max-w-xl",footer:"justify-end"}},Ue({body:p(()=>[t.volume?(n(),m("div",Re,[d("p",null,[l[1]||(l[1]=d("span",{class:"text-default font-medium"},"State:",-1)),k(" "+I(a(J)(t.volume)),1)]),d("p",null,[l[2]||(l[2]=d("span",{class:"text-default font-medium"},"Project:",-1)),k(" "+I(t.volume.projectPath||`project ${t.volume.projectId}`),1)]),d("p",null,[l[3]||(l[3]=d("span",{class:"text-default font-medium"},"Volumes:",-1)),k(" "+I(a(Q)(t.volume)),1)]),d("p",null,[l[4]||(l[4]=d("span",{class:"text-default font-medium"},"Created:",-1)),l[5]||(l[5]=k()),i(E,{value:t.volume.createdAt||null,unit:"s"},null,8,["value"])]),d("p",null,[l[6]||(l[6]=d("span",{class:"text-default font-medium"},"Last used:",-1)),l[7]||(l[7]=k()),i(E,{value:t.volume.lastRunAt||null,unit:"s"},null,8,["value"])]),t.volume.purgeEligibleAt?(n(),m("p",Fe,[l[8]||(l[8]=d("span",{class:"text-default font-medium"},"Purge eligible:",-1)),i(E,{value:t.volume.purgeEligibleAt,unit:"ms"},null,8,["value"])])):y("",!0),d("p",null,[l[9]||(l[9]=d("span",{class:"text-default font-medium"},"Tracked:",-1)),k(" "+I(t.volume.tracked?"Yes":"No"),1)]),t.volume.tracked?y("",!0):(n(),m("p",Ke,[l[10]||(l[10]=d("span",{class:"text-default font-medium"},"Volume ID:",-1)),k(" "+I(t.volume.workItemId),1)]))])):y("",!0)]),_:2},[t.volume&&t.volume.workItemUrl?{name:"footer",fn:p(()=>[i(c,{label:"Open in forge",icon:"i-lucide-external-link",color:"neutral",variant:"soft",to:t.volume.workItemUrl,target:"_blank",rel:"noopener"},null,8,["to"])]),key:"0"}:void 0]),1032,["open","description"])}}}),We={class:"space-y-4"},Xe={key:1,class:"space-y-3"},Ye={class:"space-y-3 py-6"},He={class:"text-muted"},Je={class:"text-xs text-dimmed"},Qe={key:0,class:"flex justify-center pt-2"},M=15,it=F({__name:"VolumesPage",setup(t){const r=g([]),v=g(!0),l=g(0),c=g(!0),e=g(!0),b=Se(),w=g(null),u=g(null),f=g(""),j=g({projects:[]}),o=g({}),V=[{label:"All states",value:null},{label:"Expiring",value:"expiring"},{label:"Purge eligible",value:"eligible"},{label:"Missing",value:"missing"},{label:"Untracked",value:"untracked"},{label:"Unmapped",value:"unmapped"}],ee=R(()=>[{label:"All projects",value:null},...j.value.projects.map(x=>({label:o.value[String(x)]??`#${x}`,value:x}))]),te=R(()=>w.value!==null||u.value!==null||f.value.trim()!==""),U=g(1),L=g(null),N=g(!1),K=g(null);function ae(x){K.value=x,N.value=!0}async function le(x){L.value=x.workItemId;const{data:s,error:S,status:_}=await X(`/api/volumes/${x.workItemId}`,{method:"DELETE"});if(L.value=null,S){_!==401&&b.add({title:"Failed to delete volume",description:S,color:"error",icon:"i-lucide-alert-circle"});return}s&&!s.ok?b.add({title:"Volume deletion failed",description:s.message,color:"error",icon:"i-lucide-alert-circle"}):b.add({title:"Volume deleted",...s?.notePosted?{description:"A note was posted to the work item."}:{},color:"success",icon:"i-lucide-check-circle"}),await q()}async function q(){v.value=!0;const x=(U.value-1)*M,s=new URLSearchParams;w.value!==null&&s.set("state",w.value),u.value!==null&&s.set("projectId",String(u.value));const S=f.value.trim();S.length>0&&s.set("q",S),s.set("limit",String(M)),s.set("offset",String(x));const{data:_,error:B,status:O}=await X(`/api/volumes?${s.toString()}`);if(v.value=!1,B){O!==401&&b.add({title:"Failed to load volumes",description:B,color:"error",icon:"i-lucide-alert-circle"});return}r.value=_?.volumes??[],l.value=_?.total??r.value.length,c.value=_?.gcEnabled??!0,e.value=_?.podmanAvailable??!0,j.value=_?.filterOptions??{projects:[]},o.value=_?.projectPaths??{};const z=Math.max(1,Math.ceil(l.value/M));if(U.value>z){U.value=z;return}}function Z(){U.value!==1?U.value=1:q()}return W([w,u],Z),ze(f,Z,{debounce:300}),W(U,()=>{q()}),Ce(q),(x,s)=>{const S=pe,_=H,B=D,O=ge,z=Ae,oe=De,ne=be,se=Be,ie=ve,re=Y,ue=Pe,ce=fe,de=me;return n(),m(P,null,[i(de,{id:"volumes"},{header:p(()=>[i(O,{title:"Volumes",icon:"i-lucide-hard-drive"},{leading:p(()=>[i(S)]),right:p(()=>[i(_,{label:c.value?"GC on":"GC off",color:c.value?"success":"neutral",variant:"subtle",icon:"i-lucide-recycle"},null,8,["label","color"]),i(B,{label:"Reload",icon:"i-lucide-refresh-cw",color:"neutral",variant:"soft",loading:v.value,onClick:q},null,8,["loading"])]),_:1}),i(ne,null,{left:p(()=>[i(z,{modelValue:w.value,"onUpdate:modelValue":s[0]||(s[0]=h=>w.value=h),items:V,"value-key":"value",class:"w-40","aria-label":"GC state filter"},null,8,["modelValue"]),i(z,{modelValue:u.value,"onUpdate:modelValue":s[1]||(s[1]=h=>u.value=h),items:ee.value,"value-key":"value",class:"w-48","aria-label":"Project filter"},null,8,["modelValue","items"]),i(oe,{modelValue:f.value,"onUpdate:modelValue":s[2]||(s[2]=h=>f.value=h),icon:"i-lucide-search",placeholder:"Search work item title","aria-label":"Search work item title",class:"w-64"},null,8,["modelValue"])]),_:1})]),body:p(()=>[d("div",We,[e.value?y("",!0):(n(),$(se,{key:0,color:"warning",variant:"subtle",icon:"i-lucide-triangle-alert",title:"Podman unavailable",description:"The list shows tracked volumes only; volumes created outside the ledger could not be read."})),v.value&&r.value.length===0?(n(),m("div",Xe,[(n(),m(P,null,G(3,h=>i(ie,{key:h,class:"h-10 w-full"})),64))])):r.value.length===0?(n(),$(ue,{key:2,class:"text-center"},{default:p(()=>[d("div",Ye,[i(re,{name:"i-lucide-hard-drive",class:"size-10 text-dimmed mx-auto"}),d("p",He,I(te.value?"No volumes match your filters.":"No volumes."),1)])]),_:1})):(n(),m(P,{key:3},[i(Ge,{volumes:r.value,loading:v.value,deleting:L.value,onDelete:le,onDetails:ae},null,8,["volumes","loading","deleting"]),d("p",Je,[s[5]||(s[5]=k(" GC state is based on the volume ledger and the inactivity TTL. ",-1)),c.value?(n(),m(P,{key:0},[k("Closed or deleted work items are purged on the next sweep.")],64)):(n(),m(P,{key:1},[k("Volume GC is disabled, so nothing is purged automatically.")],64))]),l.value>M?(n(),m("div",Qe,[i(ce,{page:U.value,"onUpdate:page":s[3]||(s[3]=h=>U.value=h),total:l.value,"items-per-page":M},null,8,["page","total"])])):y("",!0)],64))])]),_:1}),i(Ze,{open:N.value,"onUpdate:open":s[4]||(s[4]=h=>N.value=h),volume:K.value},null,8,["open","volume"])],64)}}});export{it as default};