@texturehq/edges 5.23.1 → 5.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{colors-Dy4u9vTC.d.cts → colors-CLXvnqoE.d.cts} +5 -1
- package/dist/{colors-BbvlWkbj.d.ts → colors-l4VlC6X4.d.ts} +5 -1
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -6
- package/dist/index.d.ts +34 -6
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/dist/rhf/index.cjs +1 -1
- package/dist/rhf/index.cjs.map +1 -1
- package/dist/rhf/index.js +1 -1
- package/dist/rhf/index.js.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
'use strict';var reactAriaComponents=require('react-aria-components'),ot=require('react'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),pg=require('@phosphor-icons/react'),luxon=require('luxon'),reactVirtual=require('@tanstack/react-virtual'),EN=require('@phosphor-icons/react/ssr'),reactAria=require('react-aria'),reactStately=require('react-stately'),lucideReact=require('lucide-react'),framerMotion=require('framer-motion'),AP=require('react-ace'),reactColorful=require('react-colorful'),curve=require('@visx/curve'),shape=require('@visx/shape'),gradient=require('@visx/gradient'),group=require('@visx/group'),scale=require('@visx/scale'),d3Array=require('d3-array'),axis=require('@visx/axis'),responsive=require('@visx/responsive'),zoom=require('@visx/zoom'),eR=require('papaparse'),brush=require('@visx/brush'),pattern=require('@visx/pattern'),dateFns=require('date-fns'),date=require('@internationalized/date'),d3Scale=require('d3-scale'),d3Time=require('d3-time'),core=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),reactDom=require('react-dom'),KI=require('react-map-gl'),server=require('react-dom/server'),m5=require('@tiptap/extension-link'),react=require('@tiptap/react'),menus=require('@tiptap/react/menus'),b5=require('@tiptap/starter-kit'),b3=require('fuse.js');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var ot__namespace=/*#__PURE__*/_interopNamespace(ot);var pg__namespace=/*#__PURE__*/_interopNamespace(pg);var EN__namespace=/*#__PURE__*/_interopNamespace(EN);var AP__default=/*#__PURE__*/_interopDefault(AP);var eR__default=/*#__PURE__*/_interopDefault(eR);var KI__default=/*#__PURE__*/_interopDefault(KI);var m5__default=/*#__PURE__*/_interopDefault(m5);var b5__default=/*#__PURE__*/_interopDefault(b5);var b3__default=/*#__PURE__*/_interopDefault(b3);var XS=Object.create;var ku=Object.defineProperty;var JS=Object.getOwnPropertyDescriptor;var jS=Object.getOwnPropertyNames;var qS=Object.getPrototypeOf,ZS=Object.prototype.hasOwnProperty;var QS=(e,t,r)=>t in e?ku(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r;var _S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var $S=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of jS(t))!ZS.call(e,n)&&n!==r&&ku(e,n,{get:()=>t[n],enumerable:!(o=JS(t,n))||o.enumerable});return e};var lg=(e,t,r)=>(r=e!=null?XS(qS(e)):{},$S(ku(r,"default",{value:e,enumerable:true}),e));var Qi=(e,t,r)=>QS(e,typeof t!="symbol"?t+"":t,r);var cm=_S((sm,lm)=>{(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof sm<"u"?t():(t(),e.FileSaver={});})(sm,function(){function e(s,l){return typeof l>"u"?l={autoBom:false}:typeof l!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function t(s,l,d){var c=new XMLHttpRequest;c.open("GET",s),c.responseType="blob",c.onload=function(){i(c.response,l,d);},c.onerror=function(){console.error("could not download file");},c.send();}function r(s){var l=new XMLHttpRequest;l.open("HEAD",s,false);try{l.send();}catch{}return 200<=l.status&&299>=l.status}function o(s){try{s.dispatchEvent(new MouseEvent("click"));}catch{var l=document.createEvent("MouseEvents");l.initMouseEvent("click",true,true,window,0,0,0,80,20,false,false,false,false,0,null),s.dispatchEvent(l);}}var n=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,a=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),i=n.saveAs||(typeof window!="object"||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(s,l,d){var c=n.URL||n.webkitURL,u=document.createElement("a");l=l||s.name||"download",u.download=l,u.rel="noopener",typeof s=="string"?(u.href=s,u.origin===location.origin?o(u):r(u.href)?t(s,l,d):o(u,u.target="_blank")):(u.href=c.createObjectURL(s),setTimeout(function(){c.revokeObjectURL(u.href);},4e4),setTimeout(function(){o(u);},0));}:"msSaveOrOpenBlob"in navigator?function(s,l,d){if(l=l||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(e(s,d),l);else if(r(s))t(s,l,d);else {var c=document.createElement("a");c.href=s,c.target="_blank",setTimeout(function(){o(c);});}}:function(s,l,d,c){if(c=c||open("","_blank"),c&&(c.document.title=c.document.body.innerText="downloading..."),typeof s=="string")return t(s,l,d);var u=s.type==="application/octet-stream",m=/constructor/i.test(n.HTMLElement)||n.safari,p=/CriOS\/[\d]+/.test(navigator.userAgent);if((p||u&&m||a)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var h=g.result;h=p?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=h:location=h,c=null;},g.readAsDataURL(s);}else {var f=n.URL||n.webkitURL,b=f.createObjectURL(s);c?c.location=b:location.href=b,c=null,setTimeout(function(){f.revokeObjectURL(b);},4e4);}});n.saveAs=i.saveAs=i,typeof lm<"u"&&(lm.exports=i);});});function Pr(e,t=false){let[r,o]=ot.useState(t);return ot.useEffect(()=>{if(typeof window>"u")return;let n=window.matchMedia(e);o(n.matches);let a=i=>{o(i.matches);};return n.addEventListener("change",a),()=>{n.removeEventListener("change",a);}},[e]),r}var oa={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function Rr(e="base"){let t=Pr(`(min-width: ${oa.sm})`,e!=="base"),r=Pr(`(min-width: ${oa.md})`,["md","lg","xl","2xl"].includes(e)),o=Pr(`(min-width: ${oa.lg})`,["lg","xl","2xl"].includes(e)),n=Pr(`(min-width: ${oa.xl})`,["xl","2xl"].includes(e)),a=Pr(`(min-width: ${oa["2xl"]})`,e==="2xl"),i=!r,s=r,l="base";return a?l="2xl":n?l="xl":o?l="lg":r?l="md":t&&(l="sm"),{current:l,isSm:t,isMd:r,isLg:o,isXl:n,is2Xl:a,isMobile:i,isDesktop:s}}function Xe(e,t){let r=ot.forwardRef(({size:o=24,color:n="currentColor",className:a,mirrored:i,alt:s,weight:l,...d},c)=>{let u=!!s||"aria-label"in d;return jsxRuntime.jsx("svg",{ref:c,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 256 256",fill:n,color:n,className:a,transform:i?"scale(-1, 1)":void 0,"aria-hidden":u?void 0:true,role:u?"img":void 0,"aria-label":s,...d,children:t})});return r.displayName=e,r}var Cl=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M12 128h44M200 128h44",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"76",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("circle",{cx:"180",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"})]}),cg=()=>jsxRuntime.jsx("path",{d:"M166 120 88 70",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),dg=()=>jsxRuntime.jsx("path",{d:"M162 122 92 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),ug=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 85.7 A32 32 0 1 1 144 85.7",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"58",r:"8",fill:"currentColor",stroke:"none"})]}),nw=Xe("TextureRecloser",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"R"})]})),aw=Xe("TextureFuse",jsxRuntime.jsx("path",{d:"M20 128h72q18 -84 36 0q18 84 36 0h72",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})),iw=Xe("TextureBreaker",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"B"})]})),sw=Xe("TextureSource",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M4 128h40M212 128h40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"84",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("path",{d:"M92 128q18 -84 36 0q18 84 36 0",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),lw=Xe("TextureCapacitor",jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("path",{d:"M4 128h106M146 128h106M110 72v112M146 72v112",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"})})),cw=Xe("TextureRegulator",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"92",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"128",fontWeight:"700",fill:"currentColor",stroke:"none",children:"V"})]})),dw=Xe("TextureSwitch",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Cl,{}),jsxRuntime.jsx(cg,{})]})),uw=Xe("TextureSwitchClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Cl,{}),jsxRuntime.jsx(dg,{})]})),pw=Xe("TextureOpenPoint",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 52 C 74 92, 74 164, 112 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M144 52 C 182 92, 182 164, 144 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"})]})),mw=Xe("TextureSectionalizerOpen",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Cl,{}),jsxRuntime.jsx(cg,{}),jsxRuntime.jsx(ug,{})]})),fw=Xe("TextureSectionalizerClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Cl,{}),jsxRuntime.jsx(dg,{}),jsxRuntime.jsx(ug,{})]})),gw=Xe("TextureTransformer",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M40 64H88A22 22 0 0 1 88 108A22 22 0 0 1 88 152A22 22 0 0 1 88 196H40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M216 64H168A22 22 0 0 0 168 108A22 22 0 0 0 168 152A22 22 0 0 0 168 196H216",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),ri={1:[128],2:[110,146],3:[92,128,164]},Pu=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"},e),Ru=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",pathLength:100,strokeDasharray:"20 20"},e),hw=Xe("TextureSinglePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[1].map(Pu)})),bw=Xe("TextureTwoPhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[2].map(Pu)})),xw=Xe("TextureThreePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[3].map(Pu)})),yw=Xe("TextureSinglePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[1].map(Ru)})),vw=Xe("TextureTwoPhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[2].map(Ru)})),Cw=Xe("TextureThreePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[3].map(Ru)})),Sw=Xe("TextureSupportStructure",jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"currentColor",stroke:"none"})),ww=Xe("TextureExplore",jsxRuntime.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2",children:[jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"96"}),jsxRuntime.jsx("path",{d:"M170.667 85.333 149.333 149.333 85.333 170.667 106.667 106.667Z M106.667 106.667 149.333 149.333"})]})),Tw=Xe("TextureBoards",jsxRuntime.jsx("path",{d:"M32 21.333H106.667V128H32Z M149.333 21.333H224V85.333H149.333Z M32 170.667H106.667V234.667H32Z M149.333 128H224V234.667H149.333Z",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Nw=Xe("TextureMonitors",jsxRuntime.jsx("path",{d:"M32 74.667H224 M42.667 202.667H106.667L170.667 117.333H224",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),kw=Xe("TextureSurvey",jsxRuntime.jsx("path",{d:"M 32 74.667 V 32 H 74.667 M 181.333 32 H 224 V 74.667 M 224 181.333 V 224 H 181.333 M 74.667 224 H 32 V 181.333 M 74.667 128 H 96 M 160 128 H 181.333 M 128 74.667 V 96 M 128 160 V 181.333 M 96 128 A 32 32 0 1 0 160 128 A 32 32 0 1 0 96 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Pw=Xe("TextureSeismic",jsxRuntime.jsx("path",{d:"M 32 55.36 H 224 M 21.333 162.027 H 53.333 L 74.667 119.36 L 96 204.693 L 117.333 98.027 L 138.667 183.36 L 160 140.693 L 181.333 162.027 H 234.667",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Rw=Xe("TextureWaypoint",jsxRuntime.jsx("path",{d:"M 17.067 180.267 L 49.067 148.267 L 81.067 180.267 L 49.067 212.267 Z M 81.067 180.267 H 102.4 L 166.4 116.267 M 155.733 41.6 H 134.4 C 91.733 41.6 91.733 105.6 134.4 105.6 H 155.733 M 198.4 41.6 H 209.067 C 251.733 41.6 251.733 105.6 209.067 105.6 H 198.4 M 145.067 73.6 H 198.4",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Mw=Xe("TextureTerrain",jsxRuntime.jsx("path",{d:"M 32 32 H 224 V 224 H 32 Z M 32 128 H 224 M 128 32 V 224 M 32 128 L 128 32 M 128 224 L 224 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Ew=Xe("TextureMagma",jsxRuntime.jsx("path",{d:"M 32 226.667 V 162.667 C 32 88 128 130.667 128 56 V 34.667 H 224 M 85.333 226.667 V 194.667 C 85.333 130.667 181.333 173.333 181.333 98.667 V 88 H 224 M 138.667 226.667 C 138.667 184 224 194.667 224 141.333",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Lw=Xe("TextureGround",jsxRuntime.jsx("path",{d:"M 32 80 L 128 32 L 224 80 V 176 L 128 224 L 32 176 Z M 32 80 L 85.333 106.667 M 170.667 106.667 L 224 80 M 128 170.667 V 224 M 85.333 106.667 L 128 85.333 L 170.667 106.667 V 149.333 L 128 170.667 L 85.333 149.333 Z M 85.333 106.667 L 128 128 L 170.667 106.667 M 128 128 V 170.667",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Dw=Xe("TextureSensor",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M88 40H40v48M168 40h48v48M216 168v48h-48M88 216H40v-48",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"36",fill:"currentColor",stroke:"none"})]})),wn={TextureSensor:Dw,TextureSurvey:kw,TextureSeismic:Pw,TextureWaypoint:Rw,TextureTerrain:Mw,TextureMagma:Ew,TextureGround:Lw,TextureExplore:ww,TextureBoards:Tw,TextureMonitors:Nw,TextureRecloser:nw,TextureFuse:aw,TextureBreaker:iw,TextureSource:sw,TextureCapacitor:lw,TextureRegulator:cw,TextureSwitch:dw,TextureSwitchClosed:uw,TextureOpenPoint:pw,TextureSectionalizerOpen:mw,TextureSectionalizerClosed:fw,TextureTransformer:gw,TextureSinglePhaseOverheadLine:hw,TextureTwoPhaseOverheadLine:bw,TextureThreePhaseOverheadLine:xw,TextureSinglePhaseUndergroundLine:yw,TextureTwoPhaseUndergroundLine:vw,TextureThreePhaseUndergroundLine:Cw,TextureSupportStructure:Sw};if(process.env.NODE_ENV==="development")for(let e of Object.keys(wn))e in pg__namespace&&console.error(`Custom icon "${e}" collides with a Phosphor icon of the same name. Rename it (use the "Texture" prefix) to keep the icon namespace unambiguous.`);var oi={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},G=ot.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=wn[e]??pg__namespace[e];if(!s)return process.env.NODE_ENV==="development"&&console.error(`Icon "${e}" not found in @phosphor-icons/react or the custom icon registry`),null;let l=typeof t=="string"&&t in oi?oi[t]:t,d=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:l,color:r,weight:o,className:d,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});G.displayName="Icon";var Aw=ot.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:l,ariaLabel:d,ref:c,...u})=>{let m=typeof n=="string"&&n in oi?oi[n]:n,p=r?typeof r=="string"&&r in oi?oi[r]:r:m*1.75,g=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",o);return jsxRuntime.jsx("div",{className:g,style:{width:p,height:p},children:jsxRuntime.jsx(G,{...u,name:i,size:n,color:s,weight:l,className:a,ariaLabel:d})})});Aw.displayName="IconWithContainer";function Yr({transparent:e=false,className:t,children:r,...o}){return jsxRuntime.jsx(reactAriaComponents.ModalOverlay,{...o,className:reactAriaComponents.composeRenderProps(t,(n,a)=>tailwindMerge.twMerge("fixed inset-0 z-50","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",e?"bg-transparent":["bg-gradient-to-br from-background-modal/20 via-background-modal/15 to-background-modal/20","backdrop-blur-[2px]","supports-[backdrop-filter]:bg-background-modal/15"].join(" "),a.isEntering&&["animate-in fade-in","duration-300 ease-out"].join(" "),a.isExiting&&["animate-out fade-out","duration-200 ease-in"].join(" "),n)),children:r})}function Kw({isEntering:e,isExiting:t,className:r="",disableGroup:o=false}){let n=[!o&&"group","bg-background-surface","forced-colors:bg-[Canvas]","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none"].filter(Boolean).join(" "),a=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",i=t?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [n,a,i,r].filter(Boolean).join(" ")}function Et({children:e,showArrow:t=false,withBackdrop:r=false,className:o,isDismissable:n=true,disableGroup:a=false,...i}){let l=reactAriaComponents.useSlottedContext(reactAriaComponents.PopoverContext)?.trigger==="SubmenuTrigger",d=t?12:8;d=l?d-6:d;let c=jsxRuntime.jsxs(reactAriaComponents.Popover,{offset:d,...i,className:reactAriaComponents.composeRenderProps(o,(u,m)=>Kw({...m,className:u,disableGroup:a})),children:[t&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});return r?jsxRuntime.jsx(Yr,{isDismissable:n,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:n,children:c})}):c}function Sl(e=true){let[t,r]=ot.useState(null);return ot.useEffect(()=>{if(!e){r(null);return}let o=typeof window<"u"?window.visualViewport:null;if(!o)return;let n=()=>{let a=Math.max(0,window.innerHeight-o.height-(o.offsetTop??0));r({height:o.height,keyboardOffset:a});};return n(),o.addEventListener("resize",n),o.addEventListener("scroll",n),()=>{o.removeEventListener("resize",n),o.removeEventListener("scroll",n);}},[e]),t}var qw={"--color-brand-primary":["--color-action-brand","--color-text-link-default","--action-brand-background"],"--color-brand-dark":["--color-action-brand-hover","--color-text-link-hover","--action-brand-hover"],"--color-action-brand":["--color-text-link-default","--action-brand-background"],"--color-action-brand-hover":["--color-text-link-hover","--action-brand-hover"]};function gg(e){let t={...e};for(let[r,o]of Object.entries(qw))if(e[r])for(let n of o)e[n]||(t[n]=e[r]);return t}function hg(e){return e.replace(/[{}<>]/g,"")}function bg(e){return Object.entries(e).map(([t,r])=>`${hg(t)}: ${hg(r)};`).join(" ")}function yg({variables:e,darkVariables:t,children:r}){let n=ot.useId().replace(/:/g,""),a=e&&Object.keys(e).length>0,i=t&&Object.keys(t).length>0;if(!a&&!i)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r});let s=a?gg(e):null,l=i?gg(t):null,d=s?`[data-brand-scope="${n}"] { ${bg(s)} }`:"",c=l?`.theme-dark [data-brand-scope="${n}"] { ${bg(l)} }`:"",u=[d,c].filter(Boolean).join(`
|
|
2
|
-
`);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),jsxRuntime.jsx("div",{"data-brand-scope":n,children:r})]})}var ni=new Map,Qw=8;function _w(e){if(!e.startsWith("var("))return e;let t=e.slice(4,e.lastIndexOf(")")).trim(),r=t.indexOf(",");return (r===-1?t:t.slice(0,r)).trim()}var _t=(e,t="#000000")=>typeof window>"u"?t:vg(e,t,0);function vg(e,t,r){if(r>Qw)return t;let o=e.startsWith("var(")?_w(e):e.startsWith("--")?e:`--${e}`;if(!e.startsWith("--")&&!e.startsWith("var(")&&!o.startsWith("--color-")&&(o=`--color-${o.slice(2)}`),ni.has(o))return ni.get(o);try{let n=document.body||document.documentElement,i=getComputedStyle(n).getPropertyValue(o).trim();if(i){if(i.startsWith("var(")){let d=vg(i,t,r+1);return ni.set(o,d),d}return ni.set(o,i),i}let s=document.createElement("div");s.style.color=`var(${o})`,document.body.appendChild(s);let l=getComputedStyle(s).color;return document.body.removeChild(s),l&&l!=="rgb(0, 0, 0)"?(ni.set(o,l),l):t}catch(n){return console.warn(`Failed to resolve color for ${e}:`,n),t}}var wl=()=>{ni.clear();},tn=()=>{let e=[];for(let t=1;t<=12;t++){let r=_t(`--color-viz-categorical-${t}`,"");r&&e.push(r);}return e.length===0?Tl():e},Tl=()=>["#5424db","#d92361","#e86a00","#5d89ff","#9a47e2","#f24cb8","#0ba286","#9c28af","#036e45","#52a119","#ff513d","#046691"],$i=()=>_t("--color-viz-default","#444ae1"),$w=(e,t)=>{let r={},o=tn();return e.forEach((n,a)=>{t&&t[n]?r[n]=t[n]:r[n]=o[a%o.length];}),r},Cg=e=>{let t=e.match(/\d+/g);if(!t||t.length<3)return true;let[r,o,n]=t.map(Number);return (.299*r+.587*o+.114*n)/255>.5},eT=e=>Cg(e)?_t("--color-text-primary","#333333"):_t("--color-text-inverse","#ffffff"),Sg=(e,t)=>{if(!e||typeof e!="object")return console.warn("[Colors] Invalid GeoJSON data provided to extractUniqueValues"),[];if(!("type"in e)||e.type!=="FeatureCollection"&&e.type!=="Feature")return console.warn("[Colors] Data is not valid GeoJSON (missing type or invalid type)"),[];let r=new Set,o="features"in e?e.features:[e];if(!Array.isArray(o)||o.length===0)return console.warn("[Colors] No features found in GeoJSON data"),[];let n=0;return o.forEach(a=>{if(!(!a||typeof a!="object")&&a.properties&&t in a.properties){n++;let i=a.properties[t];i!=null&&r.add(i);}}),n===0&&console.warn(`[Colors] Property "${t}" not found on any features. Available properties: ${o[0]?.properties?Object.keys(o[0].properties).join(", "):"none"}`),Array.from(r).sort()},es=e=>{let t=tn(),r={};return e.forEach((o,n)=>{r[o]=t[n%t.length];}),r};var Lu=(e,t)=>{if(!e||typeof e!="object")return console.warn("[Colors] Invalid GeoJSON data provided to extractNumericValues"),[];if(!("type"in e)||e.type!=="FeatureCollection"&&e.type!=="Feature")return console.warn("[Colors] Data is not valid GeoJSON (missing type or invalid type)"),[];let r="features"in e?e.features:[e];if(!Array.isArray(r)||r.length===0)return console.warn("[Colors] No features found in GeoJSON data"),[];let o=new Set,n=0;return r.forEach(a=>{if(!(!a||typeof a!="object")&&a.properties&&t in a.properties){n++;let i=a.properties[t];typeof i=="number"&&!isNaN(i)&&o.add(i);}}),n===0&&console.warn(`[Colors] Property "${t}" not found on any features. Available properties: ${r[0]?.properties?Object.keys(r[0].properties).join(", "):"none"}`),Array.from(o).sort((a,i)=>a-i)},Du=e=>e.length===0?(console.warn("[Colors] Cannot calculate bounds from empty array"),{min:0,max:1}):{min:e[0],max:e[e.length-1]},wg=(e,t)=>{if(typeof t=="number")return t;if(e.length===0)return console.warn("[Colors] Cannot calculate center from empty array, defaulting to 0"),0;if(t==="median"){let r=Math.floor(e.length/2);return e.length%2===0?(e[r-1]+e[r])/2:e[r]}return e.reduce((r,o)=>r+o,0)/e.length},ts=(e="viridis")=>{let o=`viz-sequential-${{redYellowGreen:"red-yellow-green"}[e]||e}`,n=[];for(let a=1;a<=10;a++){let i=`${o}-${a}`,s=_t(i);n.push(s);}return n},rs=(e="redYellowBlue")=>{let o=`viz-diverging-${{orangeYellowSeafoam:"orange-yellow-seafoam",redYellowBlue:"red-yellow-blue",redBlue:"red-blue"}[e]||e}`,n=[];for(let a=1;a<=10;a++){let i=`${o}-${a}`,s=_t(i);n.push(s);}return n},os=(e,t,r,o="viridis")=>{let n=ts(o);if(e<=t)return n[0];if(e>=r)return n[n.length-1];if(t===r)return n[Math.floor(n.length/2)];let i=(e-t)/(r-t)*(n.length-1),s=Math.floor(i);return n[s]},ns=(e,t,r,o,n="redYellowBlue")=>{let a=rs(n),i=4;if(e<=t)return a[0];if(e>=r)return a[a.length-1];if(e===o||t===r)return a[i];if(e<o){let l=(e-t)/(o-t)*i,d=Math.floor(l);return a[Math.min(d,i)]}else {let s=(e-o)/(r-o),l=i+s*(a.length-1-i),d=Math.floor(l);return a[Math.min(d,a.length-1)]}};var Au=ot.createContext({mode:"system",colorMode:"light",isDarkTheme:false,toggleTheme:()=>{}}),hr=()=>ot.useContext(Au);function aT(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function kg(){if(typeof window>"u")return "system";let e=localStorage.getItem("colorModePreference");return e==="light"||e==="dark"||e==="system"?e:"system"}function Pg(e){return e==="system"?aT():e}var Mg=({children:e})=>{let[t,r]=ot.useState(kg),[o,n]=ot.useState(()=>Pg(kg())),a=o==="dark",i=ot.useCallback(l=>{l==="dark"?(document.documentElement.classList.add("theme-dark"),document.body.classList.add("theme-dark")):(document.documentElement.classList.remove("theme-dark"),document.body.classList.remove("theme-dark")),wl();},[]);ot.useEffect(()=>{wl();let l=Pg(t);if(n(l),i(l),t==="system"){let d=window.matchMedia("(prefers-color-scheme: dark)"),c=u=>{let m=u.matches?"dark":"light";n(m),i(m);};return d.addEventListener("change",c),()=>{d.removeEventListener("change",c);}}},[t,i]);let s=ot.useCallback(()=>{r(l=>{let d=l==="system"?"light":l==="light"?"dark":"system";return localStorage.setItem("colorModePreference",d),d});},[]);return jsxRuntime.jsx(Au.Provider,{value:{mode:t,colorMode:o,isDarkTheme:a,toggleTheme:s},children:e})};function Er(...e){return e.filter(Boolean).join(" ")}var Iu=class{constructor(){Qi(this,"formatters",new Map);}register(t,r){this.formatters.set(t,r);}format(t,r,...o){let n=this.formatters.get(t);return n?n(r,...o):(console.warn(`No formatter registered for key: ${t}`),null)}has(t){return this.formatters.has(t)}keys(){return Array.from(this.formatters.keys())}unregister(t){this.formatters.delete(t);}clear(){this.formatters.clear();}},de=new Iu;var Tn=(e,t="Yes",r="No")=>e==null?null:e?t:r,iT=e=>Tn(e,"Enabled","Disabled"),sT=e=>Tn(e,"On","Off"),lT=e=>Tn(e,"Active","Inactive"),cT=e=>Tn(e,"True","False"),dT=e=>Tn(e,"\u2713","\u2717"),Nn=e=>{if(e==null)return null;if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.toLowerCase().trim();return t==="true"||t==="yes"||t==="1"||t==="on"||t==="enabled"?true:t==="false"||t==="no"||t==="0"||t==="off"||t==="disabled"?false:null}return typeof e=="number"?e!==0:null},Eg=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=Nn(e);return r===null?t.nullText??null:Tn(r,t.trueText??"Yes",t.falseText??"No")};de.register("boolean",(e,t,r)=>{let o=Nn(e);return o!==null?Tn(o,typeof t=="string"?t:"Yes",typeof r=="string"?r:"No"):null});de.register("yesNo",e=>{let t=Nn(e);return t!==null?Tn(t,"Yes","No"):null});de.register("enabledDisabled",e=>{let t=Nn(e);return t!==null?iT(t):null});de.register("onOff",e=>{let t=Nn(e);return t!==null?sT(t):null});de.register("activeInactive",e=>{let t=Nn(e);return t!==null?lT(t):null});de.register("trueFalse",e=>{let t=Nn(e);return t!==null?cT(t):null});de.register("checkmark",e=>{let t=Nn(e);return t!==null?dT(t):null});var xe=e=>e==null,Lg=(e,t=0)=>xe(e)?null:`${e.toFixed(t)}%`,Dg=(e,t=0)=>Lg(e,t)??"\u2014",uT=e=>xe(e)?null:Math.round(e).toString(),pT=(e,t=1)=>xe(e)?null:e.toFixed(t),mT=(e,t,r=true)=>{if(xe(e))return null;let o={useGrouping:r};return t!==void 0&&(o.minimumFractionDigits=t,o.maximumFractionDigits=t),new Intl.NumberFormat("en-US",o).format(e)},fT=(e,t="short")=>xe(e)?null:new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:t}).format(e),gT=(e,t=2)=>xe(e)?null:e.toExponential(t),Ag=(e,t="USD",r)=>{if(xe(e))return null;let o={style:"currency",currency:t,currencyDisplay:r?.currencyDisplay??"symbol",useGrouping:r?.thousandsSeparator??true};return r?.minimumFractionDigits!==void 0&&(o.minimumFractionDigits=r.minimumFractionDigits),r?.maximumFractionDigits!==void 0&&(o.maximumFractionDigits=r.maximumFractionDigits),new Intl.NumberFormat("en-US",o).format(e)},Ig=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o={useGrouping:t.thousandsSeparator??false};return t.decimals!==void 0&&(o.minimumFractionDigits=t.decimals,o.maximumFractionDigits=t.decimals),t.notation&&(o.notation=t.notation,t.notation==="compact"&&t.compactDisplay&&(o.compactDisplay=t.compactDisplay)),t.sign&&(o.signDisplay=t.sign),new Intl.NumberFormat("en-US",o).format(r)},Fg=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);return isNaN(r)?t.nullText??null:Ag(r,t.currency,t)};de.register("percentage",(e,t)=>typeof e=="number"?Lg(e,typeof t=="number"?t:0):null);de.register("integer",e=>typeof e=="number"?uT(e):null);de.register("float",(e,t)=>typeof e=="number"?pT(e,typeof t=="number"?t:1):null);de.register("number",(e,t,r)=>{let o=typeof e=="string"?parseFloat(e):Number(e);return isNaN(o)?null:mT(o,typeof t=="number"?t:void 0,typeof r=="boolean"?r:true)});de.register("compact",(e,t)=>typeof e=="number"?fT(e,t==="long"?"long":"short"):null);de.register("scientific",(e,t)=>typeof e=="number"?gT(e,typeof t=="number"?t:2):null);de.register("currency",(e,t,r)=>typeof e=="number"?Ag(e,typeof t=="string"?t:"USD",typeof r=="object"&&r!==null?r:{}):null);function AF(e,t=1){return xe(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MWh`:`${e.toFixed(t)} kWh`}function IF(e,t=1){return xe(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MW`:`${e.toFixed(t)} kW`}function Ao({value:e,formatter:t,emptyClassName:r="text-text-secondary",emptyText:o="\u2014"}){if(e==null)return jsxRuntime.jsx("span",{className:r,children:o});if(typeof t=="function")return t(e);if(t&&typeof t=="object"){let n=Xr(e,t);return e instanceof Date&&n?jsxRuntime.jsx("time",{dateTime:e.toISOString(),title:e.toISOString(),children:n}):n||jsxRuntime.jsx("span",{className:r,children:o})}if(!t){if(typeof e=="string")return e;if(e instanceof Date){let n=Xr(e,{type:"date"});return jsxRuntime.jsx("time",{dateTime:e.toISOString(),title:e.toISOString(),children:n})}if(typeof e=="number")return Xr(e,{type:"number"});if(typeof e=="boolean")return Xr(e,{type:"boolean"})}return String(e)}function OF(e,t,r){return ot__namespace.default.useCallback(o=>Ao({value:o,formatter:e,emptyClassName:t,emptyText:r}),[e,t,r])}var Fu=(e,t=0)=>{if(xe(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mA`:`${r.toFixed(t)} mA`},kl=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} A`,Bu=(e,t=2)=>xe(e)?null:`${(e/1e3).toFixed(t)} kA`,bT=(e,t)=>{if(xe(e))return null;let r=Math.abs(e);return r>=1e3?Bu(e,t??2):r<1?Fu(e,t??0):kl(e,t??1)},Vu=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "kA":return Bu(r,o??2);case "mA":return Fu(r,o??0);case "A":return kl(r,o??1)}return t.autoScale!==false?bT(r,o):kl(r,o??1)};de.register("current",Vu);var UF=Fu,KF=kl,YF=Bu;var na=e=>{if(e==null)return null;if(e instanceof Date)return luxon.DateTime.fromJSDate(e);if(typeof e=="string"){let t=luxon.DateTime.fromISO(e);return t.isValid?t:null}if(typeof e=="number"){let t=luxon.DateTime.fromMillis(e);return t.isValid?t:null}return null},xT=(e,t=false,r)=>{if(!e)return null;let o=na(e);if(!o)return "Invalid Date";let n=r?o.setZone(r):o;return t?n.toLocaleString(luxon.DateTime.DATETIME_SHORT):n.toLocaleString(luxon.DateTime.DATE_SHORT)},Pl=e=>{if(!e)return null;let t=na(e);return t?t.toRelative():"Invalid Date"},yT=(e,t)=>{if(!e)return null;let r=na(e);return r?(t?r.setZone(t):r).toLocaleString(luxon.DateTime.DATETIME_MED_WITH_WEEKDAY):"Invalid Date"},vT=e=>{if(!e)return null;let t=na(e);return t?t.toISO():null},CT=(e,t,r)=>{if(!e)return null;let o=na(e);return o?(r?o.setZone(r):o).toFormat(t):"Invalid Date"},qF=e=>{let t=na(e);return t?{year:t.year,month:t.month,day:t.day,weekday:t.weekday,hour:t.hour,minute:t.minute,second:t.second,millisecond:t.millisecond,weekdayShort:t.weekdayShort,weekdayLong:t.weekdayLong,monthShort:t.monthShort,monthLong:t.monthLong}:null},Bg=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=na(e);if(!r)return t.nullText??"Invalid Date";let o=t.timezone?r.setZone(t.timezone):r;if(t.relative)return o.toRelative();if(t.format)return o.toFormat(t.format);if(t.dateStyle||t.timeStyle){let n={};if(t.dateStyle)switch(t.dateStyle){case "short":n.date=luxon.DateTime.DATE_SHORT;break;case "medium":n.date=luxon.DateTime.DATE_MED;break;case "long":n.date=luxon.DateTime.DATE_FULL;break;case "full":n.date=luxon.DateTime.DATE_HUGE;break}if(t.timeStyle)switch(t.timeStyle){case "short":n.time=luxon.DateTime.TIME_SIMPLE;break;case "medium":n.time=luxon.DateTime.TIME_WITH_SECONDS;break;case "long":case "full":n.time=luxon.DateTime.TIME_WITH_SHORT_OFFSET;break}if(n.date&&n.time)return o.toLocaleString({...n.date,...n.time});if(n.date)return o.toLocaleString(n.date);if(n.time)return o.toLocaleString(n.time)}return o.toLocaleString(luxon.DateTime.DATETIME_SHORT)};de.register("date",(e,t,r)=>xT(e,typeof t=="boolean"?t:false,typeof r=="string"?r:void 0));de.register("relativeTime",e=>Pl(e));de.register("fullDateTime",(e,t)=>yT(e,typeof t=="string"?t:void 0));de.register("isoString",e=>vT(e));de.register("customDateFormat",(e,t,r)=>typeof t=="string"?CT(e,t,typeof r=="string"?r:void 0):null);var Ou=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} m`,ST=(e,t=1)=>xe(e)?null:`${(e*100).toFixed(t)} cm`,wT=(e,t=0)=>xe(e)?null:`${(e*1e3).toFixed(t)} mm`,zu=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} km`,Hu=(e,t=0)=>xe(e)?null:`${e.toFixed(t)} ft`,TT=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} in`,Gu=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} mi`,Wu=(e,t=0)=>xe(e)?null:`${e.toFixed(t)} yd`,$F=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} nm`,eB=e=>e*3.28084,tB=e=>e/3.28084,rB=e=>e*1.60934,oB=e=>e/1.60934,nB=e=>e/5280,Vg=e=>e*5280,aB=e=>e/1609.34,iB=e=>e*1609.34,sB=e=>e*.9144,lB=e=>e/.9144,cB=e=>e*2.54,dB=e=>e/2.54,Og=(e,t=false,r=1)=>{if(xe(e))return null;let o=Math.abs(e);return t?o>=1e3?zu(e,r):o<.01?wT(e,0):o<1?ST(e,r):Ou(e,r):o<.01?Hu(Vg(e),0):o<.1?Wu(Vg(e)/3,0):Gu(e,r)},zg=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals??1;if(t.autoScale){let n=t.unit==="m"||t.unit==="km";return Og(r,n,o)}switch(t.unit){case "km":return zu(r,o);case "ft":return Hu(r,o);case "mi":return Gu(r,o);case "yd":return Wu(r,o);default:return Ou(r,o)}};de.register("miles",(e,t)=>typeof e=="number"?Gu(e,typeof t=="number"?t:1):null);de.register("kilometers",(e,t)=>typeof e=="number"?zu(e,typeof t=="number"?t:1):null);de.register("meters",(e,t)=>typeof e=="number"?Ou(e,typeof t=="number"?t:1):null);de.register("feet",(e,t)=>typeof e=="number"?Hu(e,typeof t=="number"?t:0):null);de.register("yards",(e,t)=>typeof e=="number"?Wu(e,typeof t=="number"?t:0):null);de.register("inches",(e,t)=>typeof e=="number"?TT(e,typeof t=="number"?t:1):null);de.register("autoScaleDistance",(e,t,r)=>typeof e=="number"?Og(e,typeof t=="boolean"?t:false,typeof r=="number"?r:1):null);var Uu=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} Wh`,Ku=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} kWh`,Hg=(e,t=1)=>xe(e)?null:`${(e/1e6).toFixed(t)} MWh`,Gg=(e,t=1)=>xe(e)?null:`${(e/1e9).toFixed(t)} GWh`,Yu=e=>{let t=Math.abs(e);return t>=1e9?"GWh":t>=1e6?"MWh":t>=1e3?"kWh":"Wh"},Wg=(e,t=1)=>{if(xe(e))return null;switch(Yu(e)){case "GWh":return Gg(e,t);case "MWh":return Hg(e,t);case "kWh":return Ku(e,t);default:return Uu(e,t)}},Xu={Wh:1,kWh:1e3,MWh:1e6,GWh:1e9},Ju=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.sourceUnit?r*Xu[t.sourceUnit]:r,n=t.decimals??1;if(t.unit)switch(t.unit){case "GWh":return Gg(o,n);case "MWh":return Hg(o,n);case "kWh":return Ku(o,n);case "Wh":return Uu(o,n)}return t.autoScale!==false?Wg(o,n):Uu(o,n)};de.register("kWh",e=>typeof e=="number"?Ku(e):null);de.register("autoScaleEnergy",(e,t)=>typeof e=="number"?Wg(e,typeof t=="number"?t:1):null);de.register("energy",Ju);var Rl=e=>{if(!e)return null;let t=e.replace(/\D/g,"");return t.length===10?t.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3"):t.length===11&&t.startsWith("1")?t.replace(/1(\d{3})(\d{3})(\d{4})/,"+1 ($1) $2-$3"):e},ju=e=>{if(!e)return null;let t=e.replace(/[^\d+]/g,"");return t.startsWith("+")?t.length===12&&t.startsWith("+1")?t.replace(/\+1(\d{3})(\d{3})(\d{4})/,"+1 ($1) $2-$3"):t.length===13&&t.startsWith("+44")?t.replace(/\+44(\d{2})(\d{4})(\d{4})/,"+44 $1 $2 $3"):t.replace(/(\+\d{1,3})(\d{3,4})(\d{3,4})(\d{3,4})?/,"$1 $2 $3 $4").trim():Rl(e)},ai=e=>e?e.startsWith("+")||e.length>11?ju(e):Rl(e):null,Ug=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=String(e);if(t.international)return ju(r);switch(t.country){case "US":case "CA":return Rl(r);default:return ai(r)}};de.register("phoneNumber",e=>typeof e=="string"?ai(e):null);de.register("usPhone",e=>typeof e=="string"?Rl(e):null);de.register("internationalPhone",e=>typeof e=="string"?ju(e):null);var Ml=(e,t=0)=>xe(e)?null:t===0?`${Math.round(e)} W`:`${e.toFixed(t)} W`,qu=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} kW`,Zu=(e,t=1)=>xe(e)?null:`${(e/1e6).toFixed(t)} MW`,Qu=(e,t=2)=>xe(e)?null:`${(e/1e9).toFixed(t)} GW`,NT=(e,t)=>{if(xe(e))return null;let r=Math.abs(e);return r>=1e9?Qu(e,t??2):r>=1e6?Zu(e,t??1):r>=1e3?qu(e,t??1):Ml(e,t??0)},_u=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "GW":return Qu(r,o??2);case "MW":return Zu(r,o??1);case "kW":return qu(r,o??1);case "W":return Ml(r,o??0)}return t.autoScale!==false?NT(r,o):Ml(r,o??0)};de.register("power",_u);var yB=Ml,vB=qu,CB=Zu,SB=Qu;var $u=(e,t=1)=>xe(e)?null:`${(e*1e3).toFixed(t)} m\u03A9`,El=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} \u03A9`,Kg=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} k\u03A9`,Yg=(e,t=2)=>xe(e)?null:`${(e/1e6).toFixed(t)} M\u03A9`,kT=(e,t)=>{if(xe(e))return null;let r=Math.abs(e);return r>=1e6?Yg(e,t??2):r>=1e3?Kg(e,t??1):r<1?$u(e,t??1):El(e,t??1)},ep=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "M\u03A9":return Yg(r,o??2);case "k\u03A9":return Kg(r,o??1);case "m\u03A9":return $u(r,o??1);case "\u03A9":return El(r,o??1)}return t.autoScale!==false?kT(r,o):El(r,o??1)};de.register("resistance",ep);de.register("ohms",e=>typeof e=="number"?El(e):null);de.register("milliohms",e=>typeof e=="number"?$u(e):null);var Xg=e=>{switch(e){case "FAHRENHEIT":return "F";case "CELSIUS":return "C";case "KELVIN":return "K";default:return "F"}},Jg=(e,t=0)=>xe(e)?null:`${e.toFixed(t)}\xB0F`,jg=(e,t=true,r=0)=>xe(e)?null:`${(t?(e-32)*(5/9):e).toFixed(r)}\xB0C`,qg=(e,t=true,r=0)=>xe(e)?null:`${(t?(e-32)*(5/9)+273.15:e+273.15).toFixed(r)}K`,PT=e=>e*9/5+32,RT=e=>(e-32)*(5/9),MB=e=>e+273.15,MT=e=>e-273.15,EB=e=>RT(e)+273.15,LB=e=>PT(MT(e)),Zg=(e,t="F",r=0)=>{if(xe(e))return null;switch(typeof t=="string"&&t.length>1?Xg(t):t){case "C":return jg(e,true,r);case "K":return qg(e,true,r);default:return Jg(e,r)}},Qg=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals??0,n=t.unit??"F";if(t.showUnit===false)switch(typeof n=="string"&&n.length>1?Xg(n):n){case "C":return ((r-32)*.5555555555555556).toFixed(o);case "K":return ((r-32)*.5555555555555556+273.15).toFixed(o);default:return r.toFixed(o)}return Zg(r,n,o)};de.register("temperature",(e,t,r)=>typeof e=="number"?Zg(e,typeof t=="string"?t:"F",typeof r=="number"?r:0):null);de.register("fahrenheit",(e,t)=>typeof e=="number"?Jg(e,typeof t=="number"?t:0):null);de.register("celsius",(e,t,r)=>typeof e=="number"?jg(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);de.register("kelvin",(e,t,r)=>typeof e=="number"?qg(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);var ET=(e,t)=>!!(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0),_g=e=>e?.toUpperCase()??"",$g=e=>e?.toLowerCase()??"",eh=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",th=e=>{if(!e)return "";let t=new Set(["a","an","the","and","but","or","for","nor","on","at","of","to","with","in","as","by"]);return e.toLowerCase().split(/\s+/).map((r,o)=>t.has(r)&&o!==0?r:r.charAt(0).toUpperCase()+r.slice(1)).join(" ")},rh=e=>e?e.split(/\s+/).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" "):"",oh=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",nh=e=>e?e.replace(/([A-Z])/g," $1").replace(/^./,t=>t.toUpperCase()).trim():"",ah=e=>e?e.toLowerCase().split("_").map(t=>oh(t)).join(" "):"",LT=e=>e?e.includes("_")?ah(e):e.toUpperCase()===e?oh(e.toLowerCase()):nh(e):"",ii=(e,t=16)=>{if(!e)return "";if(t<5||e.length<=t)return e;let r=t-3,o=Math.ceil(r/2),n=Math.floor(r/2);return `${e.slice(0,o)}...${e.slice(-n)}`},Ll=(e,t=8)=>e?e.length<=t?e:`...${e.slice(-t)}`:"",Dl=(e,t=16,r="...")=>e?e.length<=t?e:e.slice(0,t)+r:"",DT=e=>{if(!e)return "";let t=e.toString(),r=t.slice(-4),o=t.length-4;return o>0?"*".repeat(o)+r:t},ih=(e,t)=>{if(ET(e,t))return null;if(e==null)return t.nullText??null;let r=String(e);if(t.transform&&(Array.isArray(t.transform)?t.transform:[t.transform]).forEach(n=>{switch(n){case "uppercase":r=_g(r);break;case "lowercase":r=$g(r);break;case "capitalize":r=rh(r);break;case "titleCase":r=th(r);break;case "sentenceCase":r=eh(r);break}}),t.truncate){let{length:o,position:n,ellipsis:a="..."}=t.truncate;switch(n){case "start":r=Ll(r,o);break;case "middle":r=ii(r,o);break;case "end":r=Dl(r,o,a);break}}return r};de.register("uppercase",e=>_g(String(e)));de.register("lowercase",e=>$g(String(e)));de.register("sentenceCase",e=>eh(String(e)));de.register("titleCase",e=>th(String(e)));de.register("capitalize",e=>rh(String(e)));de.register("camelCaseToWords",e=>nh(String(e)));de.register("snakeCaseToWords",e=>ah(String(e)));de.register("enumToSentenceCase",e=>LT(String(e)));de.register("truncateMiddle",(e,t)=>ii(String(e),typeof t=="number"?t:16));de.register("truncateStart",(e,t)=>Ll(String(e),typeof t=="number"?t:8));de.register("truncateEnd",(e,t,r)=>Dl(String(e),typeof t=="number"?t:16,typeof r=="string"?r:"..."));de.register("secret",e=>DT(String(e)));var tp=(e,t=0)=>{if(xe(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mV`:`${r.toFixed(t)} mV`},Al=(e,t=0)=>xe(e)?null:t===0?`${Math.round(e)} V`:`${e.toFixed(t)} V`,rp=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} kV`,AT=(e,t)=>{if(xe(e))return null;let r=Math.abs(e);return r>=1e3?rp(e,t??1):r<1?tp(e,t??0):Al(e,t??0)},op=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "kV":return rp(r,o??1);case "mV":return tp(r,o??0);case "V":return Al(r,o??0)}return t.autoScale!==false?AT(r,o):Al(r,o??0)};de.register("voltage",op);var VB=tp,OB=Al,zB=rp;var IT=(e,t)=>{if(e==null)return t.nullText??null;if(t.hideWhenNull&&e===null)return null;let r=typeof e=="number"?e:Number(e);return Number.isNaN(r)?t.nullText??null:Dg(r,t.decimals??0)},Xr=(e,t)=>{switch(t.type){case "text":return ih(e,t);case "number":return Ig(e,t);case "percentage":return IT(e,t);case "currency":return Fg(e,t);case "date":return Bg(e,t);case "boolean":return Eg(e,t);case "energy":return Ju(e,t);case "power":return _u(e,t);case "voltage":return op(e,t);case "current":return Vu(e,t);case "resistance":return ep(e,t);case "temperature":return Qg(e,t);case "distance":return zg(e,t);case "phone":return Ug(e,t);case "custom":{let r=t;return r.hideWhenNull&&e==null?null:e==null?r.nullText??null:r.formatter(e,r.options)}default:return e!=null?String(e):null}};var si={power:"W",energy:"Wh",voltage:"V",current:"A",resistance:"\u03A9",distance:"m"},FT=new Set(["number","power","energy","voltage","current","resistance","temperature","distance","percentage"]);function np(e){if(!e)return null;switch(e.type){case "percentage":return "%";case "power":return e.unit??si.power;case "energy":return e.unit??e.sourceUnit??si.energy;case "voltage":return e.unit??si.voltage;case "current":return e.unit??si.current;case "resistance":return e.unit??si.resistance;case "temperature":{let t=typeof e.unit=="string"?e.unit:"F";return t==="C"||t==="CELSIUS"?"\xB0C":t==="F"||t==="FAHRENHEIT"?"\xB0F":t==="K"||t==="KELVIN"?"K":t}case "distance":return e.unit??si.distance;default:return null}}function sh(e,t){if(!FT.has(t.type))return null;let r;if(typeof e=="number")r=e;else if(typeof e=="string"){let n=parseFloat(e);if(Number.isNaN(n))return null;r=n;}else return null;let o=np(t);if(o!==null){let n;if(t.type==="percentage")n=t;else if(t.type==="energy")n=t.unit?{...t,autoScale:false}:{...t,unit:t.sourceUnit??"Wh",autoScale:false};else if(t.type==="temperature")n={...t};else {let s=t.unit;n={...t,unit:s??o,autoScale:false};}let a=Xr(r,n);if(!a)return "";if(typeof a=="string"&&a.startsWith("device."))return null;let i=String(a);return i.endsWith(` ${o}`)?i.slice(0,-(o.length+1)):i.endsWith(o)?i.slice(0,-o.length):i}if(t.type==="number"){let n=Xr(r,t);return n?String(n):""}return String(r)}var rV=(e,t)=>({type:e,...t});function ia(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function aa(e,t){return ia(e)?t.format(e):""}function lh(e){if(!ia(e.start)||!ia(e.end))return ()=>"";if((e.end.getTime()-e.start.getTime())/(1e3*60*60)<=720){let i=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});return s=>aa(s,i)}let r=e.start.getFullYear(),o=e.end.getFullYear(),n=r!==o,a=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",...n&&{year:"numeric"}});return i=>aa(i,a)}var BT=864e5;function ch(e,t){let r=t?.compact??false,o=e<5*BT,n=a=>{let i=a.getHours(),s=i>=12?"PM":"AM";return {displayHour:i%12||12,period:s}};return a=>{if(!ia(a))return "";let i=a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0;if(i&&a.getDate()===1)return a.getMonth()===0?String(a.getFullYear()):a.toLocaleDateString("en",{month:"short"});if(i){let c=a.getDate();if(o){let u=a.toLocaleDateString("en",{weekday:"short"});return r?`${u.charAt(0)}${c}`:`${u} ${c}`}return r?`${a.getMonth()+1}/${c}`:`${a.toLocaleDateString("en",{month:"short"})} ${c}`}let{displayHour:s,period:l}=n(a);if(a.getMinutes()===0&&a.getSeconds()===0)return r?`${s}${l.charAt(0).toLowerCase()}`:`${s} ${l}`;let d=String(a.getMinutes()).padStart(2,"0");return r?`${s}:${d}${l.charAt(0).toLowerCase()}`:`${s}:${d} ${l}`}}function ap(e,t){if(!ia(e.start)||!ia(e.end))return ()=>"";let r=(e.end.getTime()-e.start.getTime())/(1e3*60*60),o=t?.compact??false,n=d=>c=>ia(c)?d(c):"";if(r<=24){if(o)return n(c=>{let u=c.getHours(),m=u>=12?"pm":"am";return `${u%12||12}${m}`});let d=new Intl.DateTimeFormat("en",{hour:"numeric",minute:"2-digit"});return c=>aa(c,d)}if(r<=48){if(o)return n(c=>{let u=c.getMonth()+1,m=c.getDate(),p=c.getHours(),g=p>=12?"p":"a",f=p%12||12;return `${u}/${m} ${f}${g}`});let d=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric"});return c=>aa(c,d)}if(r<=168){if(o)return n(c=>{let u=c.getDate();return `${c.toLocaleDateString("en",{weekday:"short"}).charAt(0)}${u}`});let d=new Intl.DateTimeFormat("en",{weekday:"short",day:"numeric"});return c=>aa(c,d)}if(r<=720){if(o)return n(c=>{let u=c.getMonth()+1,m=c.getDate();return `${u}/${m}`});let d=new Intl.DateTimeFormat("en",{month:"short",day:"numeric"});return c=>aa(c,d)}let a=e.start.getFullYear(),i=e.end.getFullYear(),s=a!==i;if(o)return n(d=>{let c=d.getMonth()+1,u=d.getDate(),m=s?`/${d.getFullYear().toString().slice(-2)}`:"";return `${c}/${u}${m}`});let l=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",...s&&{year:"numeric"}});return d=>aa(d,l)}var Io={displayXl:"text-display-xl",displayLg:"text-display-lg",displayMd:"text-display-md",displaySm:"text-display-sm",headingXl:"text-heading-xl",headingLg:"text-heading-lg",headingMd:"text-heading-md",headingSm:"text-heading-sm",bodyLg:"text-body-lg",bodyMd:"text-body-md",bodySm:"text-body-sm",labelLg:"text-label-lg",labelMd:"text-label-md",labelSm:"text-label-sm",code:"text-code",agent:"text-agent"};function zt(e,...t){return Er(Io[e],...t)}function pt(e=false){return `${e?"outline outline-1 outline-border-input data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none data-[focus-visible]:outline data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function Fe(e,t){return reactAriaComponents.composeRenderProps(e,r=>tailwindMerge.twMerge(t,r))}var _e={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",paddingY:"py-[var(--control-gap-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",paddingY:"py-[var(--control-gap-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",paddingY:"py-[var(--control-gap-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",paddingY:"py-[var(--control-gap-xl)]",gap:"gap-[var(--control-gap-xl)]"}};var GT="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",WT="bg-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",UT={primary:WT,secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border-2 border-border-muted hover:bg-action-secondary-hover forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-primary hover:bg-text-primary/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-feedback-error-text border-2 border-border-muted hover:bg-feedback-error-background/50 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-primary hover:bg-background-hover hover:text-text-primary forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-1 flex-shrink-0 rounded-[var(--control-border-radius)]",unstyled:"bg-transparent"},uh={full:"w-full",default:"w-fit"},KT="opacity-50 cursor-not-allowed pointer-events-none",YT="opacity-100 cursor-pointer",XT={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},JT={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function jT(e){return !e||e==="default"||e==="brand"?"primary":e}function qT(e){let{variant:t="primary",size:r="md",isDisabled:o,fullWidth:n=false,isLoading:a=false}=e,i=jT(t),s=i==="unstyled"?"":`${GT} ${UT[i]}`;i!=="unstyled"&&(s+=` ${_e[r].text} ${_e[r].height} ${_e[r].padding} ${_e[r].gap}`),o||a?s+=` ${KT}`:s+=` ${YT}`,n?s+=` ${uh.full}`:s+=` ${uh.default}`;let l=i==="primary"?"focus-visible:outline-action-primary":void 0;return [s,pt(),l].filter(Boolean).join(" ")}function te(e){let{icon:t,children:r,isLoading:o=false,loadingText:n,loadingIndicator:a,size:i="md",iconPosition:s="left",iconWeight:l,href:d,className:c,badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",style:g,target:f,rel:b,...h}=e,v=t?jsxRuntime.jsx(G,{name:t,size:i,weight:l}):null,x=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,typeof r=="function"?null:r,s==="right"&&v]}),C=jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a||jsxRuntime.jsx(G,{name:"CircleNotch",size:i,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:x}),n&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:n})]}),S=(u??0)>0,w=tailwindMerge.twMerge(qT(e),c),T=d?{href:d,target:f,rel:b,...h}:{};if(d){let{onPress:k,onPressStart:R,onPressEnd:A,onPressChange:M,onPressUp:B,onAuxClick:D,onContextMenu:W,onDoubleClick:X,...H}=h;Object.assign(T,H);}let N=d?jsxRuntime.jsx(reactAriaComponents.Link,{...T,...o&&{"aria-busy":true},style:S?void 0:g,className:w,children:o?C:typeof r=="function"?(function(k){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,r(k),s==="right"&&v]})}):x}):jsxRuntime.jsx(reactAriaComponents.Button,{...h,...o&&{"aria-busy":true},style:S?void 0:g,className:w,children:o?C:typeof r=="function"?(function(k){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,r(k),s==="right"&&v]})}):x});return S?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",c),style:g,children:[N,jsxRuntime.jsx("span",{className:`absolute ${XT[p]} flex h-5 w-5 items-center justify-center rounded-full ${JT[m]} text-xs font-medium`,"aria-label":`${u} items`,children:u})]}):N}function sp({action:e,defaultVariant:t,defaultSize:r="lg"}){let o=!!e.formId;return jsxRuntime.jsx(te,{type:o?"submit":"button",form:o?e.formId:void 0,size:e.size||r,variant:e.variant||t,onPress:o?void 0:e.onPress,isLoading:e.isLoading,isDisabled:e.isDisabled,children:e.label})}function Pn({primaryAction:e,secondaryAction:t,tertiaryAction:r,footerContent:o}){let n=e||t||r;return !n&&!o?null:jsxRuntime.jsxs("div",{className:`flex w-full flex-col items-center justify-center border-t p-4 ${o?"h-28":""}`,children:[o&&jsxRuntime.jsx("div",{className:"flex h-10 justify-center",children:o}),n&&jsxRuntime.jsxs("div",{className:"flex w-full items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{children:r&&jsxRuntime.jsx(sp,{action:r,defaultVariant:"destructive"})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx(sp,{action:t,defaultVariant:"secondary"}),e&&jsxRuntime.jsx(sp,{action:e,defaultVariant:"primary"})]})]})]})}var ZT={heading:{sm:Io.headingSm,md:Io.headingMd,lg:Io.headingLg,xl:Io.headingXl},display:{sm:Io.displaySm,md:Io.displayMd,lg:Io.displayLg,xl:Io.displayXl}},QT={page:"h-16 leading-[62px]"};function vr({tag:e="h1",variant:t="heading",size:r="lg",height:o,className:n="",children:a}){let i=r==="xs"?"sm":r,s=ZT[t][i],l=o?QT[o]:"";return jsxRuntime.jsx(e,{className:Er(s,"text-text-primary",l,n),children:a})}var Cr=({title:e,onClose:t,hideCloseIcon:r=false,titleAlign:o="left",hasBackArrow:n=false,onBack:a,headerContent:i})=>jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex h-16 w-full flex-shrink-0 items-center justify-between border-b px-6",e&&"border-b",o==="center"?"justify-center":""),children:[n&&jsxRuntime.jsx(te,{variant:"icon",onPress:a,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(G,{name:"CaretLeft","data-testid":"back-arrow"})}),i||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(vr,{size:"xs",children:e}),t&&!r&&jsxRuntime.jsx(te,{variant:"icon",onPress:t,"aria-label":"Close dialog",children:jsxRuntime.jsx(G,{name:"X","data-testid":"close-button"})})]})]});var dp=48,ss=ot.createContext(false),xh=ot.createContext(null);function yh(){return ot.useContext(xh)}function Mn({children:e}){return jsxRuntime.jsx(ss.Provider,{value:true,children:e})}function vh({children:e}){return jsxRuntime.jsx(ss.Provider,{value:false,children:e})}function ci(e,t){let r=ot.useContext(ss),{ref:o,height:n}=Bl();return {headerRef:o,headerHeight:!r||e||t?n||dp:0}}function Fl(){return !ot.useContext(ss)}function Bl(){let[e,t]=ot.useState(0),r=ot.useRef(null),o=ot.useRef(null),n=ot.useCallback(a=>{if(o.current?.disconnect(),o.current=null,r.current=a,!a){t(0);return}let i=()=>t(r.current?.offsetHeight??0);i(),o.current=new ResizeObserver(i),o.current.observe(a);},[]);return ot.useEffect(()=>()=>o.current?.disconnect(),[]),{ref:n,height:e}}var tN=`
|
|
1
|
+
'use strict';var reactAriaComponents=require('react-aria-components'),ot=require('react'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),bg=require('@phosphor-icons/react'),core=require('@phosphor-icons/core'),cT=require('fuse.js'),luxon=require('luxon'),reactVirtual=require('@tanstack/react-virtual'),mk=require('@phosphor-icons/react/ssr'),reactAria=require('react-aria'),reactStately=require('react-stately'),lucideReact=require('lucide-react'),framerMotion=require('framer-motion'),v1=require('react-ace'),reactColorful=require('react-colorful'),curve=require('@visx/curve'),shape=require('@visx/shape'),gradient=require('@visx/gradient'),group=require('@visx/group'),scale=require('@visx/scale'),d3Array=require('d3-array'),axis=require('@visx/axis'),responsive=require('@visx/responsive'),zoom=require('@visx/zoom'),GR=require('papaparse'),brush=require('@visx/brush'),pattern=require('@visx/pattern'),dateFns=require('date-fns'),date=require('@internationalized/date'),d3Scale=require('d3-scale'),d3Time=require('d3-time'),core$1=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),reactDom=require('react-dom'),g4=require('react-map-gl'),server=require('react-dom/server'),O5=require('@tiptap/extension-link'),react=require('@tiptap/react'),menus=require('@tiptap/react/menus'),W5=require('@tiptap/starter-kit');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var ot__namespace=/*#__PURE__*/_interopNamespace(ot);var bg__namespace=/*#__PURE__*/_interopNamespace(bg);var cT__default=/*#__PURE__*/_interopDefault(cT);var mk__namespace=/*#__PURE__*/_interopNamespace(mk);var v1__default=/*#__PURE__*/_interopDefault(v1);var GR__default=/*#__PURE__*/_interopDefault(GR);var g4__default=/*#__PURE__*/_interopDefault(g4);var O5__default=/*#__PURE__*/_interopDefault(O5);var W5__default=/*#__PURE__*/_interopDefault(W5);var ow=Object.create;var Ru=Object.defineProperty;var nw=Object.getOwnPropertyDescriptor;var aw=Object.getOwnPropertyNames;var iw=Object.getPrototypeOf,sw=Object.prototype.hasOwnProperty;var lw=(e,t,r)=>t in e?Ru(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r;var cw=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var dw=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of aw(t))!sw.call(e,n)&&n!==r&&Ru(e,n,{get:()=>t[n],enumerable:!(o=nw(t,n))||o.enumerable});return e};var mg=(e,t,r)=>(r=e!=null?ow(iw(e)):{},dw(Ru(r,"default",{value:e,enumerable:true}),e));var Qi=(e,t,r)=>lw(e,typeof t!="symbol"?t+"":t,r);var fm=cw((pm,mm)=>{(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof pm<"u"?t():(t(),e.FileSaver={});})(pm,function(){function e(s,d){return typeof d>"u"?d={autoBom:false}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function t(s,d,c){var l=new XMLHttpRequest;l.open("GET",s),l.responseType="blob",l.onload=function(){i(l.response,d,c);},l.onerror=function(){console.error("could not download file");},l.send();}function r(s){var d=new XMLHttpRequest;d.open("HEAD",s,false);try{d.send();}catch{}return 200<=d.status&&299>=d.status}function o(s){try{s.dispatchEvent(new MouseEvent("click"));}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",true,true,window,0,0,0,80,20,false,false,false,false,0,null),s.dispatchEvent(d);}}var n=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,a=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),i=n.saveAs||(typeof window!="object"||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(s,d,c){var l=n.URL||n.webkitURL,u=document.createElement("a");d=d||s.name||"download",u.download=d,u.rel="noopener",typeof s=="string"?(u.href=s,u.origin===location.origin?o(u):r(u.href)?t(s,d,c):o(u,u.target="_blank")):(u.href=l.createObjectURL(s),setTimeout(function(){l.revokeObjectURL(u.href);},4e4),setTimeout(function(){o(u);},0));}:"msSaveOrOpenBlob"in navigator?function(s,d,c){if(d=d||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(e(s,c),d);else if(r(s))t(s,d,c);else {var l=document.createElement("a");l.href=s,l.target="_blank",setTimeout(function(){o(l);});}}:function(s,d,c,l){if(l=l||open("","_blank"),l&&(l.document.title=l.document.body.innerText="downloading..."),typeof s=="string")return t(s,d,c);var u=s.type==="application/octet-stream",m=/constructor/i.test(n.HTMLElement)||n.safari,p=/CriOS\/[\d]+/.test(navigator.userAgent);if((p||u&&m||a)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var b=g.result;b=p?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),l?l.location.href=b:location=b,l=null;},g.readAsDataURL(s);}else {var f=n.URL||n.webkitURL,h=f.createObjectURL(s);l?l.location=h:location.href=h,l=null,setTimeout(function(){f.revokeObjectURL(h);},4e4);}});n.saveAs=i.saveAs=i,typeof mm<"u"&&(mm.exports=i);});});function Pr(e,t=false){let[r,o]=ot.useState(t);return ot.useEffect(()=>{if(typeof window>"u")return;let n=window.matchMedia(e);o(n.matches);let a=i=>{o(i.matches);};return n.addEventListener("change",a),()=>{n.removeEventListener("change",a);}},[e]),r}var oa={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function Rr(e="base"){let t=Pr(`(min-width: ${oa.sm})`,e!=="base"),r=Pr(`(min-width: ${oa.md})`,["md","lg","xl","2xl"].includes(e)),o=Pr(`(min-width: ${oa.lg})`,["lg","xl","2xl"].includes(e)),n=Pr(`(min-width: ${oa.xl})`,["xl","2xl"].includes(e)),a=Pr(`(min-width: ${oa["2xl"]})`,e==="2xl"),i=!r,s=r,d="base";return a?d="2xl":n?d="xl":o?d="lg":r?d="md":t&&(d="sm"),{current:d,isSm:t,isMd:r,isLg:o,isXl:n,is2Xl:a,isMobile:i,isDesktop:s}}function Xe(e,t){let r=ot.forwardRef(({size:o=24,color:n="currentColor",className:a,mirrored:i,alt:s,weight:d,...c},l)=>{let u=!!s||"aria-label"in c;return jsxRuntime.jsx("svg",{ref:l,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 256 256",fill:n,color:n,className:a,transform:i?"scale(-1, 1)":void 0,"aria-hidden":u?void 0:true,role:u?"img":void 0,"aria-label":s,...c,children:t})});return r.displayName=e,r}var wl=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M12 128h44M200 128h44",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"76",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("circle",{cx:"180",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"})]}),fg=()=>jsxRuntime.jsx("path",{d:"M166 120 88 70",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),gg=()=>jsxRuntime.jsx("path",{d:"M162 122 92 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),hg=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 85.7 A32 32 0 1 1 144 85.7",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"58",r:"8",fill:"currentColor",stroke:"none"})]}),gw=Xe("TextureRecloser",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"R"})]})),hw=Xe("TextureFuse",jsxRuntime.jsx("path",{d:"M20 128h72q18 -84 36 0q18 84 36 0h72",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})),bw=Xe("TextureBreaker",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"B"})]})),xw=Xe("TextureSource",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M4 128h40M212 128h40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"84",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("path",{d:"M92 128q18 -84 36 0q18 84 36 0",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),yw=Xe("TextureCapacitor",jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("path",{d:"M4 128h106M146 128h106M110 72v112M146 72v112",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"})})),vw=Xe("TextureRegulator",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"92",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"128",fontWeight:"700",fill:"currentColor",stroke:"none",children:"V"})]})),Cw=Xe("TextureSwitch",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(wl,{}),jsxRuntime.jsx(fg,{})]})),Sw=Xe("TextureSwitchClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(wl,{}),jsxRuntime.jsx(gg,{})]})),ww=Xe("TextureOpenPoint",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 52 C 74 92, 74 164, 112 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M144 52 C 182 92, 182 164, 144 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"})]})),Tw=Xe("TextureSectionalizerOpen",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(wl,{}),jsxRuntime.jsx(fg,{}),jsxRuntime.jsx(hg,{})]})),Nw=Xe("TextureSectionalizerClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(wl,{}),jsxRuntime.jsx(gg,{}),jsxRuntime.jsx(hg,{})]})),kw=Xe("TextureTransformer",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M40 64H88A22 22 0 0 1 88 108A22 22 0 0 1 88 152A22 22 0 0 1 88 196H40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M216 64H168A22 22 0 0 0 168 108A22 22 0 0 0 168 152A22 22 0 0 0 168 196H216",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),ri={1:[128],2:[110,146],3:[92,128,164]},Mu=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"},e),Eu=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",pathLength:100,strokeDasharray:"20 20"},e),Pw=Xe("TextureSinglePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[1].map(Mu)})),Rw=Xe("TextureTwoPhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[2].map(Mu)})),Mw=Xe("TextureThreePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[3].map(Mu)})),Ew=Xe("TextureSinglePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[1].map(Eu)})),Lw=Xe("TextureTwoPhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[2].map(Eu)})),Dw=Xe("TextureThreePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ri[3].map(Eu)})),Aw=Xe("TextureSupportStructure",jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"currentColor",stroke:"none"})),Iw=Xe("TextureExplore",jsxRuntime.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2",children:[jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"96"}),jsxRuntime.jsx("path",{d:"M170.667 85.333 149.333 149.333 85.333 170.667 106.667 106.667Z M106.667 106.667 149.333 149.333"})]})),Fw=Xe("TextureBoards",jsxRuntime.jsx("path",{d:"M32 21.333H106.667V128H32Z M149.333 21.333H224V85.333H149.333Z M32 170.667H106.667V234.667H32Z M149.333 128H224V234.667H149.333Z",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Bw=Xe("TextureMonitors",jsxRuntime.jsx("path",{d:"M32 74.667H224 M42.667 202.667H106.667L170.667 117.333H224",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Vw=Xe("TextureSurvey",jsxRuntime.jsx("path",{d:"M 32 74.667 V 32 H 74.667 M 181.333 32 H 224 V 74.667 M 224 181.333 V 224 H 181.333 M 74.667 224 H 32 V 181.333 M 74.667 128 H 96 M 160 128 H 181.333 M 128 74.667 V 96 M 128 160 V 181.333 M 96 128 A 32 32 0 1 0 160 128 A 32 32 0 1 0 96 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Ow=Xe("TextureSeismic",jsxRuntime.jsx("path",{d:"M 32 55.36 H 224 M 21.333 162.027 H 53.333 L 74.667 119.36 L 96 204.693 L 117.333 98.027 L 138.667 183.36 L 160 140.693 L 181.333 162.027 H 234.667",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),zw=Xe("TextureWaypoint",jsxRuntime.jsx("path",{d:"M 17.067 180.267 L 49.067 148.267 L 81.067 180.267 L 49.067 212.267 Z M 81.067 180.267 H 102.4 L 166.4 116.267 M 155.733 41.6 H 134.4 C 91.733 41.6 91.733 105.6 134.4 105.6 H 155.733 M 198.4 41.6 H 209.067 C 251.733 41.6 251.733 105.6 209.067 105.6 H 198.4 M 145.067 73.6 H 198.4",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Hw=Xe("TextureTerrain",jsxRuntime.jsx("path",{d:"M 32 32 H 224 V 224 H 32 Z M 32 128 H 224 M 128 32 V 224 M 32 128 L 128 32 M 128 224 L 224 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Gw=Xe("TextureMagma",jsxRuntime.jsx("path",{d:"M 32 226.667 V 162.667 C 32 88 128 130.667 128 56 V 34.667 H 224 M 85.333 226.667 V 194.667 C 85.333 130.667 181.333 173.333 181.333 98.667 V 88 H 224 M 138.667 226.667 C 138.667 184 224 194.667 224 141.333",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Ww=Xe("TextureGround",jsxRuntime.jsx("path",{d:"M 32 80 L 128 32 L 224 80 V 176 L 128 224 L 32 176 Z M 32 80 L 85.333 106.667 M 170.667 106.667 L 224 80 M 128 170.667 V 224 M 85.333 106.667 L 128 85.333 L 170.667 106.667 V 149.333 L 128 170.667 L 85.333 149.333 Z M 85.333 106.667 L 128 128 L 170.667 106.667 M 128 128 V 170.667",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"2"})),Uw=Xe("TextureSensor",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M88 40H40v48M168 40h48v48M216 168v48h-48M88 216H40v-48",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"36",fill:"currentColor",stroke:"none"})]})),Io={TextureSensor:Uw,TextureSurvey:Vw,TextureSeismic:Ow,TextureWaypoint:zw,TextureTerrain:Hw,TextureMagma:Gw,TextureGround:Ww,TextureExplore:Iw,TextureBoards:Fw,TextureMonitors:Bw,TextureRecloser:gw,TextureFuse:hw,TextureBreaker:bw,TextureSource:xw,TextureCapacitor:yw,TextureRegulator:vw,TextureSwitch:Cw,TextureSwitchClosed:Sw,TextureOpenPoint:ww,TextureSectionalizerOpen:Tw,TextureSectionalizerClosed:Nw,TextureTransformer:kw,TextureSinglePhaseOverheadLine:Pw,TextureTwoPhaseOverheadLine:Rw,TextureThreePhaseOverheadLine:Mw,TextureSinglePhaseUndergroundLine:Ew,TextureTwoPhaseUndergroundLine:Lw,TextureThreePhaseUndergroundLine:Dw,TextureSupportStructure:Aw};if(process.env.NODE_ENV==="development")for(let e of Object.keys(Io))e in bg__namespace&&console.error(`Custom icon "${e}" collides with a Phosphor icon of the same name. Rename it (use the "Texture" prefix) to keep the icon namespace unambiguous.`);var oi={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},W=ot.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=Io[e]??bg__namespace[e];if(!s)return process.env.NODE_ENV==="development"&&console.error(`Icon "${e}" not found in @phosphor-icons/react or the custom icon registry`),null;let d=typeof t=="string"&&t in oi?oi[t]:t,c=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:d,color:r,weight:o,className:c,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});W.displayName="Icon";var Kw=ot.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:d,ariaLabel:c,ref:l,...u})=>{let m=typeof n=="string"&&n in oi?oi[n]:n,p=r?typeof r=="string"&&r in oi?oi[r]:r:m*1.75,g=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",o);return jsxRuntime.jsx("div",{className:g,style:{width:p,height:p},children:jsxRuntime.jsx(W,{...u,name:i,size:n,color:s,weight:d,className:a,ariaLabel:c})})});Kw.displayName="IconWithContainer";var Yw={open:{className:"text-feedback-success-border",token:"--color-feedback-success-border",label:"Open"},closed:{className:"text-feedback-error-border",token:"--color-feedback-error-border",label:"Closed"}},Xw={platform:{label:"Platform",description:"Core product objects that structure the Texture workspace.",icon:"Stack",order:0},grid:{label:"Grid Elements",description:"Physical utility-grid infrastructure imported from a customer's GIS export.",icon:"TreeStructure",order:1},device:{label:"Devices",description:"Behind-the-meter connected energy devices.",icon:"Lightning",order:2}},Jw=["energized","customerName","gs_max_continuous_current"],jw=["MOTOR.voltage"],qw=[{key:"total_kvar",label:"Rated kvar",format:{type:"power",unit:"kvar",decimals:1}}],Zw=[{key:"kvar_a",label:"kvar A",format:{type:"power",unit:"kvar",decimals:1}},{key:"kvar_b",label:"kvar B",format:{type:"power",unit:"kvar",decimals:1}},{key:"kvar_c",label:"kvar C",format:{type:"power",unit:"kvar",decimals:1}}],gt={TRANSFORMER:[{key:"capacityKva",label:"kVA Rating",format:{type:"power",unit:"kVA",decimals:0}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"primaryVoltageKv",label:"Primary Voltage",format:{type:"voltage",unit:"kV",decimals:1}},{key:"outputVoltageKv",label:"Output Voltage",format:{type:"voltage",unit:"kV",decimals:2}},{key:"manufacturer",label:"Manufacturer",format:{type:"text"}},{key:"xfmr_conductor_description",label:"Conductor",format:{type:"text"}}],CONSUMER:[{key:"service_address",label:"Service address",format:{type:"text"}},{key:"name",label:"Customer",format:{type:"text"}},{key:"account_number",label:"Account #",format:{type:"text"}},{key:"meterNumber",label:"Meter Number",format:{type:"text"}},{key:"service_type",label:"Service type",format:{type:"text"}}],SOURCE:[{key:"voltageKv",label:"Nominal Voltage",format:{type:"voltage",unit:"kV",decimals:1}},{key:"substationNumber",label:"Substation Number",format:{type:"text"}},{key:"trf_capacity",label:"Rated Capacity",format:{type:"text"}},{key:"connection_code",label:"Connection",format:{type:"text"}}],SWITCH:[{key:"switchId",label:"Switch ID",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"max_continuous_current",label:"Max Continuous Current",format:{type:"number",unit:"A",decimals:0}},{key:"switchIsOpen",label:"Position",format:{type:"text"}},{key:"switch_status",label:"Status",format:{type:"text"}},{key:"partnerIdentifier",label:"Partner ID",format:{type:"text"}}],CAPACITOR:[{key:"phase",label:"Phase",format:{type:"text"}},{key:"nominalVoltageV",label:"Nominal Voltage",format:{type:"voltage",unit:"V",decimals:0}}],OVERCURRENT_DEVICE:[{key:"size_value",label:"Size",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}}],REGULATOR:[{key:"rated_kva",label:"Rated kVA",format:{type:"power",unit:"kVA",decimals:0}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"manufacturer",label:"Manufacturer",format:{type:"text"}},{key:"high_side_configuration",label:"High Side",format:{type:"text"}},{key:"forwardSetVoltageV",label:"Forward Set Voltage",format:{type:"voltage",unit:"V",decimals:1}}],OVERHEAD_LINE:[{key:"impedanceLength",label:"Length",format:{type:"distance",unit:"ft",decimals:2}},{key:"conductorDescPhA",label:"Conductor Phase A",format:{type:"text"}},{key:"conductorDescPhB",label:"Conductor Phase B",format:{type:"text"}},{key:"conductorDescPhC",label:"Conductor Phase C",format:{type:"text"}},{key:"conductorDescNeutral",label:"Conductor Neutral",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"subtype_cd",label:"Subtype",format:{type:"text"}}],UNDERGROUND_LINE:[{key:"impedanceLength",label:"Length",format:{type:"distance",unit:"ft",decimals:2}},{key:"conductorDescPhA",label:"Conductor Phase A",format:{type:"text"}},{key:"conductorDescPhB",label:"Conductor Phase B",format:{type:"text"}},{key:"conductorDescPhC",label:"Conductor Phase C",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"subtype_cd",label:"Subtype",format:{type:"text"}}],NODE:[],SUPPORT_STRUCTURE:[{key:"height",label:"Height",format:{type:"distance",unit:"ft",decimals:0}},{key:"class",label:"Class",format:{type:"text"}},{key:"species",label:"Material",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"substation",label:"Substation",format:{type:"text"}}],GENERATOR:[{key:"phase",label:"Phase",format:{type:"text"}},{key:"generator_system_size",label:"System Size",format:{type:"number",decimals:1}}],MOTOR:[{key:"ratedPower",label:"Rated Power",format:{type:"power",unit:"kW",decimals:1}},{key:"voltage",label:"Voltage",format:{type:"voltage",unit:"V",decimals:0}}],DEVICE_LEADER:[],TRANSFORMER_BANK:[]},ao={app:{icon:"AppWindow",category:"platform",archetype:"platform",detailPage:false,label:{singular:"App",plural:"Apps"},description:"Workspace tools and third-party integrations"},site:{icon:"MapPin",category:"platform",archetype:"platform",detailPage:true,label:{singular:"Site",plural:"Sites"},description:"Physical location housing energy systems"},device:{icon:"ShareNetwork",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Device",plural:"Devices"},description:"Connected, controllable energy device"},customer:{icon:"Users",category:"platform",archetype:"platform",detailPage:true,label:{singular:"Customer",plural:"Customers"},description:"End customer or owner of one or more sites"},contact:{icon:"Users",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Contact",plural:"Contacts"},description:"Person associated with a customer or site"},program:{icon:"ClipboardText",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Program",plural:"Programs"},description:"Demand-response or virtual power plant program"},workflow:{icon:"FlowArrow",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Workflow",plural:"Workflows"},description:"Automated rule that runs in response to events"},collection:{icon:"Stack",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Collection",plural:"Collections"},description:"Named group of related entities or records"},board:{icon:"TextureBoards",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Board",plural:"Boards"},description:"Dashboard for monitoring metrics and devices"},report:{icon:"ChartLine",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Report",plural:"Reports"},description:"Saved analytics view or generated report"},event:{icon:"ClockCounterClockwise",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Event",plural:"Events"},description:"Recorded system event or logged activity"},alert:{icon:"Warning",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Alert",plural:"Alerts"},description:"Notification raised when attention is needed"},monitor:{icon:"TextureMonitors",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Monitor",plural:"Monitors"},description:"Rule that watches a metric against a threshold"},insight:{icon:"LightbulbFilament",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Insight",plural:"Insights"},description:"Derived finding surfaced from platform data"},command:{icon:"Play",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Command",plural:"Commands"},description:"Control action issued to a connected device"},explore:{icon:"TextureExplore",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Explore",plural:"Explore"},description:"The BEAM map surface for exploring the connected grid."},boards:{icon:"TextureBoards",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Boards",plural:"Boards"},description:"The BEAM surface for building and viewing grid dashboards."},monitors:{icon:"TextureMonitors",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Monitors",plural:"Monitors"},description:"The BEAM surface for watching conditions across the grid."},askTexture:{icon:"Sparkle",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Ask Texture",plural:"Ask Texture"},description:"The BEAM conversational surface for investigating grid data and creating views and monitors."},survey:{icon:"TextureSurvey",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Survey",plural:"Survey"},description:"The onboarding engagement that maps a utility's systems to the Terrain schema."},seismic:{icon:"TextureSeismic",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Seismic",plural:"Seismic"},description:"AI-powered interpretation of raw data, automatically mapped into the grid model."},waypoint:{icon:"TextureWaypoint",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Waypoint",plural:"Waypoint"},description:"Flexible customer data collection and authorization for consumer devices."},terrain:{icon:"TextureTerrain",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Terrain",plural:"Terrain"},description:"The shared schema for grid assets, locations, and relationships. An AI-ready data model standard."},magma:{icon:"TextureMagma",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Magma",plural:"Magma"},description:"The execution engine for streaming, monitoring, automation, insights, and simulations, using data in the Terrain schema."},ground:{icon:"TextureGround",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Ground",plural:"Ground"},description:"On-premises hardware Stations for local control, AI processing, and continuity when cloud connectivity drops."},source:{icon:"TextureSource",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SOURCE},label:{singular:"Source",plural:"Sources"},description:"Upstream feed where the network originates"},substation:{icon:"TextureSource",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SOURCE},label:{singular:"Substation",plural:"Substations"},description:"Facility that steps down transmission voltage"},capacitor:{icon:"TextureCapacitor",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.CAPACITOR},label:{singular:"Capacitor",plural:"Capacitors"},description:"Capacitor bank for power-factor and voltage support"},switch:{icon:"TextureSwitchClosed",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SWITCH},label:{singular:"Switch",plural:"Switches"},description:"Sectionalizing or disconnect switch on the line",states:{open:{icon:"TextureSwitch",color:"open"},closed:{icon:"TextureSwitchClosed",color:"closed"}}},sectionalizer:{icon:"TextureSectionalizerClosed",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SWITCH},label:{singular:"Sectionalizer",plural:"Sectionalizers"},description:"Counts upstream recloser trips and opens to isolate a faulted section",states:{open:{icon:"TextureSectionalizerOpen",color:"open"},closed:{icon:"TextureSectionalizerClosed",color:"closed"}}},relay:{icon:"Cpu",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.NODE},label:{singular:"Relay",plural:"Relays"},description:"Microprocessor relay that senses faults and trips devices"},transformer:{icon:"TextureTransformer",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.TRANSFORMER},label:{singular:"Transformer",plural:"Transformers"},description:"Transformer that steps voltage up or down"},meter:{icon:"Gauge",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.CONSUMER},label:{singular:"Meter",plural:"Meters"},description:"Revenue meter at the point of consumption"},consumer:{icon:"Gauge",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.CONSUMER},label:{singular:"Consumer",plural:"Consumers"},description:"Service point or customer premise on the grid"},singlePhaseOverheadLine:{icon:"TextureSinglePhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.OVERHEAD_LINE},label:{singular:"Single-Phase Overhead Line",plural:"Single-Phase Overhead Lines"},description:"Overhead line carrying one phase conductor"},twoPhaseOverheadLine:{icon:"TextureTwoPhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.OVERHEAD_LINE},label:{singular:"Two-Phase Overhead Line",plural:"Two-Phase Overhead Lines"},description:"Overhead line carrying two phase conductors"},threePhaseOverheadLine:{icon:"TextureThreePhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.OVERHEAD_LINE},label:{singular:"Three-Phase Overhead Line",plural:"Three-Phase Overhead Lines"},description:"Overhead line carrying three phase conductors"},singlePhaseUndergroundLine:{icon:"TextureSinglePhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.UNDERGROUND_LINE},label:{singular:"Single-Phase Underground Line",plural:"Single-Phase Underground Lines"},description:"Buried line carrying one phase conductor"},twoPhaseUndergroundLine:{icon:"TextureTwoPhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.UNDERGROUND_LINE},label:{singular:"Two-Phase Underground Line",plural:"Two-Phase Underground Lines"},description:"Buried line carrying two phase conductors"},threePhaseUndergroundLine:{icon:"TextureThreePhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.UNDERGROUND_LINE},label:{singular:"Three-Phase Underground Line",plural:"Three-Phase Underground Lines"},description:"Buried line carrying three phase conductors"},motorSwitch:{icon:"Diamond",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.MOTOR},label:{singular:"Motor Switch",plural:"Motor Switches"},description:"Motor-operated switch or motor load element"},recloser:{icon:"TextureRecloser",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.OVERCURRENT_DEVICE},label:{singular:"Recloser",plural:"Reclosers"},description:"Auto-reclosing device that clears transient faults",states:{open:{color:"open"},closed:{color:"closed"}}},fuse:{icon:"TextureFuse",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.OVERCURRENT_DEVICE},label:{singular:"Fuse",plural:"Fuses"},description:"Fusible element providing overcurrent protection"},breaker:{icon:"TextureBreaker",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.OVERCURRENT_DEVICE},label:{singular:"Breaker",plural:"Breakers"},description:"Circuit breaker that interrupts fault current",states:{open:{color:"open"},closed:{color:"closed"}}},generator:{icon:"Wind",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.GENERATOR},label:{singular:"Generator",plural:"Generators"},description:"Distributed generation unit feeding the grid"},regulator:{icon:"TextureRegulator",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.REGULATOR},label:{singular:"Regulator",plural:"Regulators"},description:"Voltage regulator that holds line voltage in range"},supportStructure:{icon:"TextureSupportStructure",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.SUPPORT_STRUCTURE},label:{singular:"Support Structure",plural:"Support Structures"},description:"Structure carrying overhead line equipment"},deviceLeader:{icon:"FlowArrow",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.DEVICE_LEADER},label:{singular:"Device Leader",plural:"Device Leaders"},description:"Cartographic leader line pointing an offset device symbol to its true location"},transformerBank:{icon:"TextureTransformer",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.TRANSFORMER_BANK},label:{singular:"Transformer Bank",plural:"Transformer Banks"},description:"Grouping of single-phase transformer units sharing a bank id"},battery:{icon:"BatteryHigh",category:"device",archetype:"device",detailPage:true,label:{singular:"Battery",plural:"Batteries"},description:"Behind-the-meter battery or storage system",fusedMetricId:"soc",fields:{headlineMetrics:[{id:"power",label:"device.battery.fields.gridPower",source:{kind:"state",path:"state.gridPower"},format:{type:"power",decimals:1},icon:"Lightning"},{id:"soc",label:"device.battery.fields.soc",source:{kind:"state",path:"state.chargePercentage"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"batteryPower",label:"device.battery.fields.batteryPower",source:{kind:"state",path:"state.chargeRate"},format:{type:"power",decimals:1},icon:"TrendUp"},{id:"backupReserve",label:"device.battery.fields.backupReserve",source:{kind:"state",path:"state.backupReserve"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"}]},stateRules:{primaryState:{label:"device.battery.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"},secondaryState:{label:"device.battery.fields.gridState",fieldPath:"state.gridStatus",mapping:{importing:"importing",exporting:"exporting",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},evCharger:{icon:"ChargingStation",category:"device",archetype:"device",detailPage:true,label:{singular:"EV Charger",plural:"EV Chargers"},description:"Electric-vehicle charging station or port",fusedMetricId:"power",fields:{headlineMetrics:[{id:"power",label:"device.evCharger.fields.power",source:{kind:"state",path:"state.chargerWattage"},format:{type:"power",decimals:1},icon:"Lightning"},{id:"isPluggedIn",label:"device.evCharger.fields.isPluggedIn",source:{kind:"state",path:"state.isPluggedIn"},format:{type:"boolean",trueText:"Yes",falseText:"No"},icon:"Plug"},{id:"voltage",label:"device.evCharger.fields.voltage",source:{kind:"state",path:"state.chargerVoltage"},format:{type:"voltage",decimals:1},icon:"Lightning"},{id:"current",label:"device.evCharger.fields.current",source:{kind:"state",path:"state.chargerCurrent"},format:{type:"current",decimals:1},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.evCharger.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},inverter:{icon:"Sun",category:"device",archetype:"device",detailPage:true,label:{singular:"Solar / Inverter",plural:"Solar / Inverters"},description:"Solar PV inverter and its connected array",fusedMetricId:"power",fields:{headlineMetrics:[{id:"power",label:"device.inverter.fields.power",source:{kind:"state",path:"state.power"},format:{type:"power",decimals:0},icon:"Lightning"},{id:"gridPower",label:"device.inverter.fields.gridPower",source:{kind:"state",path:"state.gridPower"},format:{type:"power",decimals:0},icon:"GridFour"},{id:"generatedEnergy",label:"device.inverter.fields.generatedEnergy",source:{kind:"state",path:"state.generatedEnergy"},format:{type:"energy",decimals:1},icon:"Lightning"},{id:"lifetimeEnergyGenerated",label:"device.inverter.fields.lifetimeEnergyGenerated",source:{kind:"state",path:"state.lifetimeEnergyGenerated"},format:{type:"energy",decimals:0},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.inverter.fields.gridStatus",fieldPath:"state.gridStatus",mapping:{exporting:"exporting",importing:"importing",idle:"idle"},fallback:"unknown"}}},sensor:{icon:"TextureSensor",category:"device",archetype:"device",detailPage:true,label:{singular:"Sensor",plural:"Sensors"},description:"Connected grid and power-quality sensor"},thermostat:{icon:"Thermometer",category:"device",archetype:"device",detailPage:true,label:{singular:"Thermostat",plural:"Thermostats"},description:"Smart thermostat or connected HVAC control",fusedMetricId:"ambientTemperature",fields:{headlineMetrics:[{id:"ambientTemperature",label:"device.thermostat.fields.ambientTemperature",source:{kind:"state",path:"state.ambientTemperature"},format:{type:"temperature",decimals:0},icon:"Thermometer"},{id:"heatTarget",label:"device.thermostat.fields.heatTarget",source:{kind:"state",path:"state.heatTarget"},format:{type:"temperature",decimals:0},icon:"Flame"},{id:"coolTarget",label:"device.thermostat.fields.coolTarget",source:{kind:"state",path:"state.coolTarget"},format:{type:"temperature",decimals:0},icon:"Snowflake"},{id:"fanMode",label:"device.thermostat.fields.fanMode",source:{kind:"state",path:"state.fanMode"},format:{type:"text"}}]},stateRules:{primaryState:{label:"device.thermostat.fields.operatingMode",fieldPath:"state.operatingMode",mapping:{heat:"heat",cool:"cool",auto:"auto",off:"off",eco:"eco",unknown:"unknown"},fallback:"unknown"}}},vehicle:{icon:"Car",category:"device",archetype:"device",detailPage:true,label:{singular:"EV",plural:"EVs"},description:"Electric vehicle managed as a flexible load",fusedMetricId:"chargePercentage",fields:{headlineMetrics:[{id:"chargePercentage",label:"device.vehicle.fields.chargePercentage",source:{kind:"state",path:"state.chargePercentage"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"range",label:"device.vehicle.fields.range",source:{kind:"state",path:"state.range"},format:{type:"distance",unit:"mi",decimals:0},icon:"GasPump"},{id:"chargeLimit",label:"device.vehicle.fields.chargeLimit",source:{kind:"state",path:"state.chargeLimit"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"isPluggedIn",label:"device.vehicle.fields.isPluggedIn",source:{kind:"state",path:"state.isPluggedIn"},format:{type:"boolean",trueText:"Yes",falseText:"No"},icon:"Plug"}]},stateRules:{primaryState:{label:"device.vehicle.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},waterHeater:{icon:"Drop",category:"device",archetype:"device",detailPage:true,label:{singular:"Water Heater",plural:"Water Heaters"},description:"Connected or smart electric water heater"}},vg=Object.freeze(Object.keys(ao).filter(e=>ao[e].category==="grid")),Qw=new Set(vg);function _w(e){return typeof e=="string"&&Qw.has(e)}var $w={source:"SOURCE",substation:"SOURCE",capacitor:"CAPACITOR",switch:"SWITCH",sectionalizer:"SWITCH",relay:"NODE",transformer:"TRANSFORMER",meter:"CONSUMER",consumer:"CONSUMER",singlePhaseOverheadLine:"OVERHEAD_LINE",twoPhaseOverheadLine:"OVERHEAD_LINE",threePhaseOverheadLine:"OVERHEAD_LINE",singlePhaseUndergroundLine:"UNDERGROUND_LINE",twoPhaseUndergroundLine:"UNDERGROUND_LINE",threePhaseUndergroundLine:"UNDERGROUND_LINE",motorSwitch:"MOTOR",recloser:"OVERCURRENT_DEVICE",fuse:"OVERCURRENT_DEVICE",breaker:"OVERCURRENT_DEVICE",generator:"GENERATOR",regulator:"REGULATOR",supportStructure:"SUPPORT_STRUCTURE",deviceLeader:"DEVICE_LEADER",transformerBank:"TRANSFORMER_BANK"};function Tl(e){return ao[e]}function _i(e){return ao[e].icon}function eT(e,t=false){return t?ao[e].label.plural:ao[e].label.singular}function tT(e){return ao[e].category}var rT={min:2,max:4};function oT(e){let t=ao[e];if(!t)throw new Error(`archetypeFor: unknown entity type "${String(e)}"`);return t.archetype}function nT(e){return Tl(e).detailPage}function aT(e){return (Tl(e).fields?.headlineMetrics.length??0)>0}function Cg(e){return Tl(e).properties?.statList??[]}function iT(e){return Cg(e).length>0}var Du=e=>e.replace(/([a-z\d])([A-Z])/g,"$1 $2"),Nl=e=>Du(e).toLowerCase().replace(/[^a-z0-9]+/g," ").trim(),Sg=e=>Nl(e).replace(/ /g,""),wg=Object.keys(bg__namespace).filter(e=>!e.endsWith("Icon")&&e!=="SSR"&&e!=="IconContext"&&e!=="IconBase"),Tg=Object.keys(Io),dT=new Set([...Tg,...wg]),Au=[...Tg.map(e=>({name:e,label:Du(e),source:"texture"})),...wg.map(e=>({name:e,label:Du(e),source:"phosphor"}))];function Ng(e){return dT.has(e)}var uT=new Map(core.icons.map(e=>[e.pascal_name,e])),pT={[ao.meter.icon]:["AMI","advanced metering infrastructure","smart meter"]},mT=Object.values(ao),kg=Au.map(e=>{let t=uT.get(e.name),r=mT.filter(o=>o.icon===e.name);return {...e,aliases:t?.alias?[t.alias.name,t.alias.pascal_name]:[],tags:[...t?.tags.filter(o=>!o.startsWith("*"))??[],...pT[e.name]??[]],categories:t?.categories??[],entities:r.flatMap(o=>[o.label.singular,o.label.plural]),descriptions:r.flatMap(o=>o.description?[o.description]:[])}}),fT=new cT__default.default(kg,{keys:[{name:"label",weight:4},{name:"aliases",weight:4},{name:"entities",weight:4},{name:"tags",weight:3},{name:"categories",weight:1},{name:"descriptions",weight:1}],includeScore:true,includeMatches:true,ignoreLocation:true,threshold:.25}),gT=new Set("a an and are as at be by for from in into is it of on or the this to with icon icons".split(" "));function Pg(e,t=12){let r=Nl(e.slice(0,600)),o=[...new Set(r.split(" ").filter(i=>i&&!gT.has(i)))].slice(0,24);if(!o.length)return [];let n=new Map;for(let i of o){let s=fT.search(i),d=s.filter(c=>c.matches?.some(l=>Nl(l.value??"").split(" ").some(u=>u===i||i.length>=4&&u.startsWith(i))));for(let c of d.length?d:i.length>=4?s:[]){let l=n.get(c.item.name)??{entry:c.item,score:0,matches:new Set};l.score+=1+(1-(c.score??1));for(let u of c.matches??[])u.value&&u.value.length<=60&&l.matches.add(u.value);n.set(c.item.name,l);}}for(let i of kg){let s=[i.name,...i.aliases].some(c=>Sg(c)===Sg(r)),d=i.entities.some(c=>Nl(c)===r);if(s||d){let c=n.get(i.name)??{entry:i,score:0,matches:new Set};c.score+=s?1e3:500,c.matches.add(s?i.label:r),n.set(i.name,c);}}let a=Number.isFinite(t)?Math.max(1,Math.min(Math.floor(t),24)):12;return [...n.values()].sort((i,s)=>s.score-i.score||i.entry.name.length-s.entry.name.length||i.entry.name.localeCompare(s.entry.name)).slice(0,a).map(({entry:i,matches:s})=>({name:i.name,label:i.label,source:i.source,matches:[...s].slice(0,3)}))}function Kr({transparent:e=false,className:t,children:r,...o}){return jsxRuntime.jsx(reactAriaComponents.ModalOverlay,{...o,className:reactAriaComponents.composeRenderProps(t,(n,a)=>tailwindMerge.twMerge("fixed inset-0 z-50","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",e?"bg-transparent":["bg-gradient-to-br from-background-modal/20 via-background-modal/15 to-background-modal/20","backdrop-blur-[2px]","supports-[backdrop-filter]:bg-background-modal/15"].join(" "),a.isEntering&&["animate-in fade-in","duration-300 ease-out"].join(" "),a.isExiting&&["animate-out fade-out","duration-200 ease-in"].join(" "),n)),children:r})}function kT({isEntering:e,isExiting:t,className:r="",disableGroup:o=false}){let n=[!o&&"group","bg-background-surface","forced-colors:bg-[Canvas]","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none"].filter(Boolean).join(" "),a=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",i=t?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [n,a,i,r].filter(Boolean).join(" ")}function Et({children:e,showArrow:t=false,withBackdrop:r=false,className:o,isDismissable:n=true,disableGroup:a=false,...i}){let d=reactAriaComponents.useSlottedContext(reactAriaComponents.PopoverContext)?.trigger==="SubmenuTrigger",c=t?12:8;c=d?c-6:c;let l=jsxRuntime.jsxs(reactAriaComponents.Popover,{offset:c,...i,className:reactAriaComponents.composeRenderProps(o,(u,m)=>kT({...m,className:u,disableGroup:a})),children:[t&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});return r?jsxRuntime.jsx(Kr,{isDismissable:n,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:n,children:l})}):l}function kl(e=true){let[t,r]=ot.useState(null);return ot.useEffect(()=>{if(!e){r(null);return}let o=typeof window<"u"?window.visualViewport:null;if(!o)return;let n=()=>{let a=Math.max(0,window.innerHeight-o.height-(o.offsetTop??0));r({height:o.height,keyboardOffset:a});};return n(),o.addEventListener("resize",n),o.addEventListener("scroll",n),()=>{o.removeEventListener("resize",n),o.removeEventListener("scroll",n);}},[e]),t}var LT={"--color-brand-primary":["--color-action-brand","--color-text-link-default","--action-brand-background"],"--color-brand-dark":["--color-action-brand-hover","--color-text-link-hover","--action-brand-hover"],"--color-action-brand":["--color-text-link-default","--action-brand-background"],"--color-action-brand-hover":["--color-text-link-hover","--action-brand-hover"]};function Rg(e){let t={...e};for(let[r,o]of Object.entries(LT))if(e[r])for(let n of o)e[n]||(t[n]=e[r]);return t}function Mg(e){return e.replace(/[{}<>]/g,"")}function Eg(e){return Object.entries(e).map(([t,r])=>`${Mg(t)}: ${Mg(r)};`).join(" ")}function Dg({variables:e,darkVariables:t,children:r}){let n=ot.useId().replace(/:/g,""),a=e&&Object.keys(e).length>0,i=t&&Object.keys(t).length>0;if(!a&&!i)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r});let s=a?Rg(e):null,d=i?Rg(t):null,c=s?`[data-brand-scope="${n}"] { ${Eg(s)} }`:"",l=d?`.theme-dark [data-brand-scope="${n}"] { ${Eg(d)} }`:"",u=[c,l].filter(Boolean).join(`
|
|
2
|
+
`);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),jsxRuntime.jsx("div",{"data-brand-scope":n,children:r})]})}var ni=new Map,AT=8;function IT(e){if(!e.startsWith("var("))return e;let t=e.slice(4,e.lastIndexOf(")")).trim(),r=t.indexOf(",");return (r===-1?t:t.slice(0,r)).trim()}var _t=(e,t="#000000")=>typeof window>"u"?t:Ag(e,t,0);function Ag(e,t,r){if(r>AT)return t;let o=e.startsWith("var(")?IT(e):e.startsWith("--")?e:`--${e}`;if(!e.startsWith("--")&&!e.startsWith("var(")&&!o.startsWith("--color-")&&(o=`--color-${o.slice(2)}`),ni.has(o))return ni.get(o);try{let n=document.body||document.documentElement,i=getComputedStyle(n).getPropertyValue(o).trim();if(i){if(i.startsWith("var(")){let c=Ag(i,t,r+1);return ni.set(o,c),c}return ni.set(o,i),i}let s=document.createElement("div");s.style.color=`var(${o})`,document.body.appendChild(s);let d=getComputedStyle(s).color;return document.body.removeChild(s),d&&d!=="rgb(0, 0, 0)"?(ni.set(o,d),d):t}catch(n){return console.warn(`Failed to resolve color for ${e}:`,n),t}}var Pl=()=>{ni.clear();},on=()=>{let e=[];for(let t=1;t<=12;t++){let r=_t(`--color-viz-categorical-${t}`,"");r&&e.push(r);}return e.length===0?Rl():e},Rl=()=>["#5424db","#d92361","#e86a00","#5d89ff","#9a47e2","#f24cb8","#0ba286","#9c28af","#036e45","#52a119","#ff513d","#046691"],es=()=>_t("--color-viz-default","#444ae1"),FT=(e,t)=>{let r={},o=on();return e.forEach((n,a)=>{t&&t[n]?r[n]=t[n]:r[n]=o[a%o.length];}),r},Ig=e=>{let t=e.match(/\d+/g);if(!t||t.length<3)return true;let[r,o,n]=t.map(Number);return (.299*r+.587*o+.114*n)/255>.5},BT=e=>Ig(e)?_t("--color-text-primary","#333333"):_t("--color-text-inverse","#ffffff"),Fg=(e,t)=>{if(!e||typeof e!="object")return console.warn("[Colors] Invalid GeoJSON data provided to extractUniqueValues"),[];if(!("type"in e)||e.type!=="FeatureCollection"&&e.type!=="Feature")return console.warn("[Colors] Data is not valid GeoJSON (missing type or invalid type)"),[];let r=new Set,o="features"in e?e.features:[e];if(!Array.isArray(o)||o.length===0)return console.warn("[Colors] No features found in GeoJSON data"),[];let n=0;return o.forEach(a=>{if(!(!a||typeof a!="object")&&a.properties&&t in a.properties){n++;let i=a.properties[t];i!=null&&r.add(i);}}),n===0&&console.warn(`[Colors] Property "${t}" not found on any features. Available properties: ${o[0]?.properties?Object.keys(o[0].properties).join(", "):"none"}`),Array.from(r).sort()},ts=e=>{let t=on(),r={};return e.forEach((o,n)=>{r[o]=t[n%t.length];}),r};var Fu=(e,t)=>{if(!e||typeof e!="object")return console.warn("[Colors] Invalid GeoJSON data provided to extractNumericValues"),[];if(!("type"in e)||e.type!=="FeatureCollection"&&e.type!=="Feature")return console.warn("[Colors] Data is not valid GeoJSON (missing type or invalid type)"),[];let r="features"in e?e.features:[e];if(!Array.isArray(r)||r.length===0)return console.warn("[Colors] No features found in GeoJSON data"),[];let o=new Set,n=0;return r.forEach(a=>{if(!(!a||typeof a!="object")&&a.properties&&t in a.properties){n++;let i=a.properties[t];typeof i=="number"&&!isNaN(i)&&o.add(i);}}),n===0&&console.warn(`[Colors] Property "${t}" not found on any features. Available properties: ${r[0]?.properties?Object.keys(r[0].properties).join(", "):"none"}`),Array.from(o).sort((a,i)=>a-i)},Bu=e=>e.length===0?(console.warn("[Colors] Cannot calculate bounds from empty array"),{min:0,max:1}):{min:e[0],max:e[e.length-1]},Bg=(e,t)=>{if(typeof t=="number")return t;if(e.length===0)return console.warn("[Colors] Cannot calculate center from empty array, defaulting to 0"),0;if(t==="median"){let r=Math.floor(e.length/2);return e.length%2===0?(e[r-1]+e[r])/2:e[r]}return e.reduce((r,o)=>r+o,0)/e.length},rs=(e="viridis")=>{let o=`viz-sequential-${{redYellowGreen:"red-yellow-green"}[e]||e}`,n=[];for(let a=1;a<=10;a++){let i=`${o}-${a}`,s=_t(i);n.push(s);}return n},os=(e="redYellowBlue")=>{let o=`viz-diverging-${{orangeYellowSeafoam:"orange-yellow-seafoam",redYellowBlue:"red-yellow-blue",redBlue:"red-blue"}[e]||e}`,n=[];for(let a=1;a<=10;a++){let i=`${o}-${a}`,s=_t(i);n.push(s);}return n},ns=(e,t,r,o="viridis")=>{let n=rs(o);if(e<=t)return n[0];if(e>=r)return n[n.length-1];if(t===r)return n[Math.floor(n.length/2)];let i=(e-t)/(r-t)*(n.length-1),s=Math.floor(i);return n[s]},as=(e,t,r,o,n="redYellowBlue")=>{let a=os(n),i=4;if(e<=t)return a[0];if(e>=r)return a[a.length-1];if(e===o||t===r)return a[i];if(e<o){let d=(e-t)/(o-t)*i,c=Math.floor(d);return a[Math.min(c,i)]}else {let s=(e-o)/(r-o),d=i+s*(a.length-1-i),c=Math.floor(d);return a[Math.min(c,a.length-1)]}};var Ou=ot.createContext({mode:"system",colorMode:"light",isDarkTheme:false,setMode:()=>{},toggleTheme:()=>{}}),hr=()=>ot.useContext(Ou);function GT(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function WT(e){if(typeof window>"u")return e;try{let t=window.localStorage.getItem("colorModePreference");if(t==="light"||t==="dark"||t==="system")return t}catch{}return e}function Og(e){try{window.localStorage.setItem("colorModePreference",e);}catch{}}function zg(e){return e==="system"?GT():e}var Gg=({children:e,fallbackMode:t="system"})=>{let[r,o]=ot.useState(()=>WT(t)),[n,a]=ot.useState(()=>zg(r)),i=n==="dark",s=ot.useCallback(l=>{l==="dark"?(document.documentElement.classList.add("theme-dark"),document.body.classList.add("theme-dark")):(document.documentElement.classList.remove("theme-dark"),document.body.classList.remove("theme-dark")),Pl();},[]);ot.useLayoutEffect(()=>{Pl();let l=zg(r);if(a(l),s(l),r==="system"){let u=window.matchMedia("(prefers-color-scheme: dark)"),m=p=>{let g=p.matches?"dark":"light";a(g),s(g);};return u.addEventListener("change",m),()=>{u.removeEventListener("change",m);}}},[r,s]);let d=ot.useCallback(l=>{o(l),Og(l);},[]),c=ot.useCallback(()=>{o(l=>{let u=l==="system"?"light":l==="light"?"dark":"system";return Og(u),u});},[]);return jsxRuntime.jsx(Ou.Provider,{value:{mode:r,colorMode:n,isDarkTheme:i,setMode:d,toggleTheme:c},children:e})};function Yr(...e){return e.filter(Boolean).join(" ")}var zu=class{constructor(){Qi(this,"formatters",new Map);}register(t,r){this.formatters.set(t,r);}format(t,r,...o){let n=this.formatters.get(t);return n?n(r,...o):(console.warn(`No formatter registered for key: ${t}`),null)}has(t){return this.formatters.has(t)}keys(){return Array.from(this.formatters.keys())}unregister(t){this.formatters.delete(t);}clear(){this.formatters.clear();}},de=new zu;var Tn=(e,t="Yes",r="No")=>e==null?null:e?t:r,UT=e=>Tn(e,"Enabled","Disabled"),KT=e=>Tn(e,"On","Off"),YT=e=>Tn(e,"Active","Inactive"),XT=e=>Tn(e,"True","False"),JT=e=>Tn(e,"\u2713","\u2717"),Nn=e=>{if(e==null)return null;if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.toLowerCase().trim();return t==="true"||t==="yes"||t==="1"||t==="on"||t==="enabled"?true:t==="false"||t==="no"||t==="0"||t==="off"||t==="disabled"?false:null}return typeof e=="number"?e!==0:null},Wg=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=Nn(e);return r===null?t.nullText??null:Tn(r,t.trueText??"Yes",t.falseText??"No")};de.register("boolean",(e,t,r)=>{let o=Nn(e);return o!==null?Tn(o,typeof t=="string"?t:"Yes",typeof r=="string"?r:"No"):null});de.register("yesNo",e=>{let t=Nn(e);return t!==null?Tn(t,"Yes","No"):null});de.register("enabledDisabled",e=>{let t=Nn(e);return t!==null?UT(t):null});de.register("onOff",e=>{let t=Nn(e);return t!==null?KT(t):null});de.register("activeInactive",e=>{let t=Nn(e);return t!==null?YT(t):null});de.register("trueFalse",e=>{let t=Nn(e);return t!==null?XT(t):null});de.register("checkmark",e=>{let t=Nn(e);return t!==null?JT(t):null});var xe=e=>e==null,Ug=(e,t=0)=>xe(e)?null:`${e.toFixed(t)}%`,Kg=(e,t=0)=>Ug(e,t)??"\u2014",jT=e=>xe(e)?null:Math.round(e).toString(),qT=(e,t=1)=>xe(e)?null:e.toFixed(t),ZT=(e,t,r=true)=>{if(xe(e))return null;let o={useGrouping:r};return t!==void 0&&(o.minimumFractionDigits=t,o.maximumFractionDigits=t),new Intl.NumberFormat("en-US",o).format(e)},QT=(e,t="short")=>xe(e)?null:new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:t}).format(e),_T=(e,t=2)=>xe(e)?null:e.toExponential(t),Yg=(e,t="USD",r)=>{if(xe(e))return null;let o={style:"currency",currency:t,currencyDisplay:r?.currencyDisplay??"symbol",useGrouping:r?.thousandsSeparator??true};return r?.minimumFractionDigits!==void 0&&(o.minimumFractionDigits=r.minimumFractionDigits),r?.maximumFractionDigits!==void 0&&(o.maximumFractionDigits=r.maximumFractionDigits),new Intl.NumberFormat("en-US",o).format(e)},Xg=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o={useGrouping:t.thousandsSeparator??false};return t.decimals!==void 0&&(o.minimumFractionDigits=t.decimals,o.maximumFractionDigits=t.decimals),t.notation&&(o.notation=t.notation,t.notation==="compact"&&t.compactDisplay&&(o.compactDisplay=t.compactDisplay)),t.sign&&(o.signDisplay=t.sign),new Intl.NumberFormat("en-US",o).format(r)},Jg=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);return isNaN(r)?t.nullText??null:Yg(r,t.currency,t)};de.register("percentage",(e,t)=>typeof e=="number"?Ug(e,typeof t=="number"?t:0):null);de.register("integer",e=>typeof e=="number"?jT(e):null);de.register("float",(e,t)=>typeof e=="number"?qT(e,typeof t=="number"?t:1):null);de.register("number",(e,t,r)=>{let o=typeof e=="string"?parseFloat(e):Number(e);return isNaN(o)?null:ZT(o,typeof t=="number"?t:void 0,typeof r=="boolean"?r:true)});de.register("compact",(e,t)=>typeof e=="number"?QT(e,t==="long"?"long":"short"):null);de.register("scientific",(e,t)=>typeof e=="number"?_T(e,typeof t=="number"?t:2):null);de.register("currency",(e,t,r)=>typeof e=="number"?Yg(e,typeof t=="string"?t:"USD",typeof r=="object"&&r!==null?r:{}):null);function uB(e,t=1){return xe(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MWh`:`${e.toFixed(t)} kWh`}function pB(e,t=1){return xe(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MW`:`${e.toFixed(t)} kW`}function Fo({value:e,formatter:t,emptyClassName:r="text-text-secondary",emptyText:o="\u2014"}){if(e==null)return jsxRuntime.jsx("span",{className:r,children:o});if(typeof t=="function")return t(e);if(t&&typeof t=="object"){let n=Xr(e,t);return e instanceof Date&&n?jsxRuntime.jsx("time",{dateTime:e.toISOString(),title:e.toISOString(),children:n}):n||jsxRuntime.jsx("span",{className:r,children:o})}if(!t){if(typeof e=="string")return e;if(e instanceof Date){let n=Xr(e,{type:"date"});return jsxRuntime.jsx("time",{dateTime:e.toISOString(),title:e.toISOString(),children:n})}if(typeof e=="number")return Xr(e,{type:"number"});if(typeof e=="boolean")return Xr(e,{type:"boolean"})}return String(e)}function hB(e,t,r){return ot__namespace.default.useCallback(o=>Fo({value:o,formatter:e,emptyClassName:t,emptyText:r}),[e,t,r])}var Hu=(e,t=0)=>{if(xe(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mA`:`${r.toFixed(t)} mA`},El=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} A`,Gu=(e,t=2)=>xe(e)?null:`${(e/1e3).toFixed(t)} kA`,eN=(e,t)=>{if(xe(e))return null;let r=Math.abs(e);return r>=1e3?Gu(e,t??2):r<1?Hu(e,t??0):El(e,t??1)},Wu=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "kA":return Gu(r,o??2);case "mA":return Hu(r,o??0);case "A":return El(r,o??1)}return t.autoScale!==false?eN(r,o):El(r,o??1)};de.register("current",Wu);var CB=Hu,SB=El,wB=Gu;var na=e=>{if(e==null)return null;if(e instanceof Date)return luxon.DateTime.fromJSDate(e);if(typeof e=="string"){let t=luxon.DateTime.fromISO(e);return t.isValid?t:null}if(typeof e=="number"){let t=luxon.DateTime.fromMillis(e);return t.isValid?t:null}return null},tN=(e,t=false,r)=>{if(!e)return null;let o=na(e);if(!o)return "Invalid Date";let n=r?o.setZone(r):o;return t?n.toLocaleString(luxon.DateTime.DATETIME_SHORT):n.toLocaleString(luxon.DateTime.DATE_SHORT)},Ll=e=>{if(!e)return null;let t=na(e);return t?t.toRelative():"Invalid Date"},rN=(e,t)=>{if(!e)return null;let r=na(e);return r?(t?r.setZone(t):r).toLocaleString(luxon.DateTime.DATETIME_MED_WITH_WEEKDAY):"Invalid Date"},oN=e=>{if(!e)return null;let t=na(e);return t?t.toISO():null},nN=(e,t,r)=>{if(!e)return null;let o=na(e);return o?(r?o.setZone(r):o).toFormat(t):"Invalid Date"},PB=e=>{let t=na(e);return t?{year:t.year,month:t.month,day:t.day,weekday:t.weekday,hour:t.hour,minute:t.minute,second:t.second,millisecond:t.millisecond,weekdayShort:t.weekdayShort,weekdayLong:t.weekdayLong,monthShort:t.monthShort,monthLong:t.monthLong}:null},jg=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=na(e);if(!r)return t.nullText??"Invalid Date";let o=t.timezone?r.setZone(t.timezone):r;if(t.relative)return o.toRelative();if(t.format)return o.toFormat(t.format);if(t.dateStyle||t.timeStyle){let n={};if(t.dateStyle)switch(t.dateStyle){case "short":n.date=luxon.DateTime.DATE_SHORT;break;case "medium":n.date=luxon.DateTime.DATE_MED;break;case "long":n.date=luxon.DateTime.DATE_FULL;break;case "full":n.date=luxon.DateTime.DATE_HUGE;break}if(t.timeStyle)switch(t.timeStyle){case "short":n.time=luxon.DateTime.TIME_SIMPLE;break;case "medium":n.time=luxon.DateTime.TIME_WITH_SECONDS;break;case "long":case "full":n.time=luxon.DateTime.TIME_WITH_SHORT_OFFSET;break}if(n.date&&n.time)return o.toLocaleString({...n.date,...n.time});if(n.date)return o.toLocaleString(n.date);if(n.time)return o.toLocaleString(n.time)}return o.toLocaleString(luxon.DateTime.DATETIME_SHORT)};de.register("date",(e,t,r)=>tN(e,typeof t=="boolean"?t:false,typeof r=="string"?r:void 0));de.register("relativeTime",e=>Ll(e));de.register("fullDateTime",(e,t)=>rN(e,typeof t=="string"?t:void 0));de.register("isoString",e=>oN(e));de.register("customDateFormat",(e,t,r)=>typeof t=="string"?nN(e,t,typeof r=="string"?r:void 0):null);var Uu=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} m`,aN=(e,t=1)=>xe(e)?null:`${(e*100).toFixed(t)} cm`,iN=(e,t=0)=>xe(e)?null:`${(e*1e3).toFixed(t)} mm`,Ku=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} km`,Yu=(e,t=0)=>xe(e)?null:`${e.toFixed(t)} ft`,sN=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} in`,Xu=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} mi`,Ju=(e,t=0)=>xe(e)?null:`${e.toFixed(t)} yd`,LB=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} nm`,DB=e=>e*3.28084,AB=e=>e/3.28084,IB=e=>e*1.60934,FB=e=>e/1.60934,BB=e=>e/5280,qg=e=>e*5280,VB=e=>e/1609.34,OB=e=>e*1609.34,zB=e=>e*.9144,HB=e=>e/.9144,GB=e=>e*2.54,WB=e=>e/2.54,Zg=(e,t=false,r=1)=>{if(xe(e))return null;let o=Math.abs(e);return t?o>=1e3?Ku(e,r):o<.01?iN(e,0):o<1?aN(e,r):Uu(e,r):o<.01?Yu(qg(e),0):o<.1?Ju(qg(e)/3,0):Xu(e,r)},Qg=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals??1;if(t.autoScale){let n=t.unit==="m"||t.unit==="km";return Zg(r,n,o)}switch(t.unit){case "km":return Ku(r,o);case "ft":return Yu(r,o);case "mi":return Xu(r,o);case "yd":return Ju(r,o);default:return Uu(r,o)}};de.register("miles",(e,t)=>typeof e=="number"?Xu(e,typeof t=="number"?t:1):null);de.register("kilometers",(e,t)=>typeof e=="number"?Ku(e,typeof t=="number"?t:1):null);de.register("meters",(e,t)=>typeof e=="number"?Uu(e,typeof t=="number"?t:1):null);de.register("feet",(e,t)=>typeof e=="number"?Yu(e,typeof t=="number"?t:0):null);de.register("yards",(e,t)=>typeof e=="number"?Ju(e,typeof t=="number"?t:0):null);de.register("inches",(e,t)=>typeof e=="number"?sN(e,typeof t=="number"?t:1):null);de.register("autoScaleDistance",(e,t,r)=>typeof e=="number"?Zg(e,typeof t=="boolean"?t:false,typeof r=="number"?r:1):null);var ju=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} Wh`,qu=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} kWh`,_g=(e,t=1)=>xe(e)?null:`${(e/1e6).toFixed(t)} MWh`,$g=(e,t=1)=>xe(e)?null:`${(e/1e9).toFixed(t)} GWh`,Zu=e=>{let t=Math.abs(e);return t>=1e9?"GWh":t>=1e6?"MWh":t>=1e3?"kWh":"Wh"},eh=(e,t=1)=>{if(xe(e))return null;switch(Zu(e)){case "GWh":return $g(e,t);case "MWh":return _g(e,t);case "kWh":return qu(e,t);default:return ju(e,t)}},Qu={Wh:1,kWh:1e3,MWh:1e6,GWh:1e9},_u=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.sourceUnit?r*Qu[t.sourceUnit]:r,n=t.decimals??1;if(t.unit)switch(t.unit){case "GWh":return $g(o,n);case "MWh":return _g(o,n);case "kWh":return qu(o,n);case "Wh":return ju(o,n)}return t.autoScale!==false?eh(o,n):ju(o,n)};de.register("kWh",e=>typeof e=="number"?qu(e):null);de.register("autoScaleEnergy",(e,t)=>typeof e=="number"?eh(e,typeof t=="number"?t:1):null);de.register("energy",_u);var Dl=e=>{if(!e)return null;let t=e.replace(/\D/g,"");return t.length===10?t.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3"):t.length===11&&t.startsWith("1")?t.replace(/1(\d{3})(\d{3})(\d{4})/,"+1 ($1) $2-$3"):e},$u=e=>{if(!e)return null;let t=e.replace(/[^\d+]/g,"");return t.startsWith("+")?t.length===12&&t.startsWith("+1")?t.replace(/\+1(\d{3})(\d{3})(\d{4})/,"+1 ($1) $2-$3"):t.length===13&&t.startsWith("+44")?t.replace(/\+44(\d{2})(\d{4})(\d{4})/,"+44 $1 $2 $3"):t.replace(/(\+\d{1,3})(\d{3,4})(\d{3,4})(\d{3,4})?/,"$1 $2 $3 $4").trim():Dl(e)},ai=e=>e?e.startsWith("+")||e.length>11?$u(e):Dl(e):null,th=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=String(e);if(t.international)return $u(r);switch(t.country){case "US":case "CA":return Dl(r);default:return ai(r)}};de.register("phoneNumber",e=>typeof e=="string"?ai(e):null);de.register("usPhone",e=>typeof e=="string"?Dl(e):null);de.register("internationalPhone",e=>typeof e=="string"?$u(e):null);var Al=(e,t=0)=>xe(e)?null:t===0?`${Math.round(e)} W`:`${e.toFixed(t)} W`,ep=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} kW`,tp=(e,t=1)=>xe(e)?null:`${(e/1e6).toFixed(t)} MW`,rp=(e,t=2)=>xe(e)?null:`${(e/1e9).toFixed(t)} GW`,lN=(e,t)=>{if(xe(e))return null;let r=Math.abs(e);return r>=1e9?rp(e,t??2):r>=1e6?tp(e,t??1):r>=1e3?ep(e,t??1):Al(e,t??0)},op=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "GW":return rp(r,o??2);case "MW":return tp(r,o??1);case "kW":return ep(r,o??1);case "W":return Al(r,o??0)}return t.autoScale!==false?lN(r,o):Al(r,o??0)};de.register("power",op);var QB=Al,_B=ep,$B=tp,eV=rp;var np=(e,t=1)=>xe(e)?null:`${(e*1e3).toFixed(t)} m\u03A9`,Il=(e,t=1)=>xe(e)?null:`${e.toFixed(t)} \u03A9`,rh=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} k\u03A9`,oh=(e,t=2)=>xe(e)?null:`${(e/1e6).toFixed(t)} M\u03A9`,cN=(e,t)=>{if(xe(e))return null;let r=Math.abs(e);return r>=1e6?oh(e,t??2):r>=1e3?rh(e,t??1):r<1?np(e,t??1):Il(e,t??1)},ap=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "M\u03A9":return oh(r,o??2);case "k\u03A9":return rh(r,o??1);case "m\u03A9":return np(r,o??1);case "\u03A9":return Il(r,o??1)}return t.autoScale!==false?cN(r,o):Il(r,o??1)};de.register("resistance",ap);de.register("ohms",e=>typeof e=="number"?Il(e):null);de.register("milliohms",e=>typeof e=="number"?np(e):null);var nh=e=>{switch(e){case "FAHRENHEIT":return "F";case "CELSIUS":return "C";case "KELVIN":return "K";default:return "F"}},ah=(e,t=0)=>xe(e)?null:`${e.toFixed(t)}\xB0F`,ih=(e,t=true,r=0)=>xe(e)?null:`${(t?(e-32)*(5/9):e).toFixed(r)}\xB0C`,sh=(e,t=true,r=0)=>xe(e)?null:`${(t?(e-32)*(5/9)+273.15:e+273.15).toFixed(r)}K`,dN=e=>e*9/5+32,uN=e=>(e-32)*(5/9),sV=e=>e+273.15,pN=e=>e-273.15,lV=e=>uN(e)+273.15,cV=e=>dN(pN(e)),lh=(e,t="F",r=0)=>{if(xe(e))return null;switch(typeof t=="string"&&t.length>1?nh(t):t){case "C":return ih(e,true,r);case "K":return sh(e,true,r);default:return ah(e,r)}},ch=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals??0,n=t.unit??"F";if(t.showUnit===false)switch(typeof n=="string"&&n.length>1?nh(n):n){case "C":return ((r-32)*.5555555555555556).toFixed(o);case "K":return ((r-32)*.5555555555555556+273.15).toFixed(o);default:return r.toFixed(o)}return lh(r,n,o)};de.register("temperature",(e,t,r)=>typeof e=="number"?lh(e,typeof t=="string"?t:"F",typeof r=="number"?r:0):null);de.register("fahrenheit",(e,t)=>typeof e=="number"?ah(e,typeof t=="number"?t:0):null);de.register("celsius",(e,t,r)=>typeof e=="number"?ih(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);de.register("kelvin",(e,t,r)=>typeof e=="number"?sh(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);var mN=(e,t)=>!!(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0),dh=e=>e?.toUpperCase()??"",uh=e=>e?.toLowerCase()??"",ph=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",mh=e=>{if(!e)return "";let t=new Set(["a","an","the","and","but","or","for","nor","on","at","of","to","with","in","as","by"]);return e.toLowerCase().split(/\s+/).map((r,o)=>t.has(r)&&o!==0?r:r.charAt(0).toUpperCase()+r.slice(1)).join(" ")},fh=e=>e?e.split(/\s+/).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" "):"",gh=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",hh=e=>e?e.replace(/([A-Z])/g," $1").replace(/^./,t=>t.toUpperCase()).trim():"",bh=e=>e?e.toLowerCase().split("_").map(t=>gh(t)).join(" "):"",fN=e=>e?e.includes("_")?bh(e):e.toUpperCase()===e?gh(e.toLowerCase()):hh(e):"",ii=(e,t=16)=>{if(!e)return "";if(t<5||e.length<=t)return e;let r=t-3,o=Math.ceil(r/2),n=Math.floor(r/2);return `${e.slice(0,o)}...${e.slice(-n)}`},Fl=(e,t=8)=>e?e.length<=t?e:`...${e.slice(-t)}`:"",Bl=(e,t=16,r="...")=>e?e.length<=t?e:e.slice(0,t)+r:"",gN=e=>{if(!e)return "";let t=e.toString(),r=t.slice(-4),o=t.length-4;return o>0?"*".repeat(o)+r:t},xh=(e,t)=>{if(mN(e,t))return null;if(e==null)return t.nullText??null;let r=String(e);if(t.transform&&(Array.isArray(t.transform)?t.transform:[t.transform]).forEach(n=>{switch(n){case "uppercase":r=dh(r);break;case "lowercase":r=uh(r);break;case "capitalize":r=fh(r);break;case "titleCase":r=mh(r);break;case "sentenceCase":r=ph(r);break}}),t.truncate){let{length:o,position:n,ellipsis:a="..."}=t.truncate;switch(n){case "start":r=Fl(r,o);break;case "middle":r=ii(r,o);break;case "end":r=Bl(r,o,a);break}}return r};de.register("uppercase",e=>dh(String(e)));de.register("lowercase",e=>uh(String(e)));de.register("sentenceCase",e=>ph(String(e)));de.register("titleCase",e=>mh(String(e)));de.register("capitalize",e=>fh(String(e)));de.register("camelCaseToWords",e=>hh(String(e)));de.register("snakeCaseToWords",e=>bh(String(e)));de.register("enumToSentenceCase",e=>fN(String(e)));de.register("truncateMiddle",(e,t)=>ii(String(e),typeof t=="number"?t:16));de.register("truncateStart",(e,t)=>Fl(String(e),typeof t=="number"?t:8));de.register("truncateEnd",(e,t,r)=>Bl(String(e),typeof t=="number"?t:16,typeof r=="string"?r:"..."));de.register("secret",e=>gN(String(e)));var ip=(e,t=0)=>{if(xe(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mV`:`${r.toFixed(t)} mV`},Vl=(e,t=0)=>xe(e)?null:t===0?`${Math.round(e)} V`:`${e.toFixed(t)} V`,sp=(e,t=1)=>xe(e)?null:`${(e/1e3).toFixed(t)} kV`,hN=(e,t)=>{if(xe(e))return null;let r=Math.abs(e);return r>=1e3?sp(e,t??1):r<1?ip(e,t??0):Vl(e,t??0)},lp=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "kV":return sp(r,o??1);case "mV":return ip(r,o??0);case "V":return Vl(r,o??0)}return t.autoScale!==false?hN(r,o):Vl(r,o??0)};de.register("voltage",lp);var gV=ip,hV=Vl,bV=sp;var bN=(e,t)=>{if(e==null)return t.nullText??null;if(t.hideWhenNull&&e===null)return null;let r=typeof e=="number"?e:Number(e);return Number.isNaN(r)?t.nullText??null:Kg(r,t.decimals??0)},Xr=(e,t)=>{switch(t.type){case "text":return xh(e,t);case "number":return Xg(e,t);case "percentage":return bN(e,t);case "currency":return Jg(e,t);case "date":return jg(e,t);case "boolean":return Wg(e,t);case "energy":return _u(e,t);case "power":return op(e,t);case "voltage":return lp(e,t);case "current":return Wu(e,t);case "resistance":return ap(e,t);case "temperature":return ch(e,t);case "distance":return Qg(e,t);case "phone":return th(e,t);case "custom":{let r=t;return r.hideWhenNull&&e==null?null:e==null?r.nullText??null:r.formatter(e,r.options)}default:return e!=null?String(e):null}};var si={power:"W",energy:"Wh",voltage:"V",current:"A",resistance:"\u03A9",distance:"m"},xN=new Set(["number","power","energy","voltage","current","resistance","temperature","distance","percentage"]);function cp(e){if(!e)return null;switch(e.type){case "percentage":return "%";case "power":return e.unit??si.power;case "energy":return e.unit??e.sourceUnit??si.energy;case "voltage":return e.unit??si.voltage;case "current":return e.unit??si.current;case "resistance":return e.unit??si.resistance;case "temperature":{let t=typeof e.unit=="string"?e.unit:"F";return t==="C"||t==="CELSIUS"?"\xB0C":t==="F"||t==="FAHRENHEIT"?"\xB0F":t==="K"||t==="KELVIN"?"K":t}case "distance":return e.unit??si.distance;default:return null}}function yh(e,t){if(!xN.has(t.type))return null;let r;if(typeof e=="number")r=e;else if(typeof e=="string"){let n=parseFloat(e);if(Number.isNaN(n))return null;r=n;}else return null;let o=cp(t);if(o!==null){let n;if(t.type==="percentage")n=t;else if(t.type==="energy")n=t.unit?{...t,autoScale:false}:{...t,unit:t.sourceUnit??"Wh",autoScale:false};else if(t.type==="temperature")n={...t};else {let s=t.unit;n={...t,unit:s??o,autoScale:false};}let a=Xr(r,n);if(!a)return "";if(typeof a=="string"&&a.startsWith("device."))return null;let i=String(a);return i.endsWith(` ${o}`)?i.slice(0,-(o.length+1)):i.endsWith(o)?i.slice(0,-o.length):i}if(t.type==="number"){let n=Xr(r,t);return n?String(n):""}return String(r)}var IV=(e,t)=>({type:e,...t});function ia(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function aa(e,t){return ia(e)?t.format(e):""}function vh(e){if(!ia(e.start)||!ia(e.end))return ()=>"";if((e.end.getTime()-e.start.getTime())/(1e3*60*60)<=720){let i=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});return s=>aa(s,i)}let r=e.start.getFullYear(),o=e.end.getFullYear(),n=r!==o,a=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",...n&&{year:"numeric"}});return i=>aa(i,a)}var yN=864e5;function Ch(e,t){let r=t?.compact??false,o=e<5*yN,n=a=>{let i=a.getHours(),s=i>=12?"PM":"AM";return {displayHour:i%12||12,period:s}};return a=>{if(!ia(a))return "";let i=a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0;if(i&&a.getDate()===1)return a.getMonth()===0?String(a.getFullYear()):a.toLocaleDateString("en",{month:"short"});if(i){let l=a.getDate();if(o){let u=a.toLocaleDateString("en",{weekday:"short"});return r?`${u.charAt(0)}${l}`:`${u} ${l}`}return r?`${a.getMonth()+1}/${l}`:`${a.toLocaleDateString("en",{month:"short"})} ${l}`}let{displayHour:s,period:d}=n(a);if(a.getMinutes()===0&&a.getSeconds()===0)return r?`${s}${d.charAt(0).toLowerCase()}`:`${s} ${d}`;let c=String(a.getMinutes()).padStart(2,"0");return r?`${s}:${c}${d.charAt(0).toLowerCase()}`:`${s}:${c} ${d}`}}function dp(e,t){if(!ia(e.start)||!ia(e.end))return ()=>"";let r=(e.end.getTime()-e.start.getTime())/(1e3*60*60),o=t?.compact??false,n=c=>l=>ia(l)?c(l):"";if(r<=24){if(o)return n(l=>{let u=l.getHours(),m=u>=12?"pm":"am";return `${u%12||12}${m}`});let c=new Intl.DateTimeFormat("en",{hour:"numeric",minute:"2-digit"});return l=>aa(l,c)}if(r<=48){if(o)return n(l=>{let u=l.getMonth()+1,m=l.getDate(),p=l.getHours(),g=p>=12?"p":"a",f=p%12||12;return `${u}/${m} ${f}${g}`});let c=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric"});return l=>aa(l,c)}if(r<=168){if(o)return n(l=>{let u=l.getDate();return `${l.toLocaleDateString("en",{weekday:"short"}).charAt(0)}${u}`});let c=new Intl.DateTimeFormat("en",{weekday:"short",day:"numeric"});return l=>aa(l,c)}if(r<=720){if(o)return n(l=>{let u=l.getMonth()+1,m=l.getDate();return `${u}/${m}`});let c=new Intl.DateTimeFormat("en",{month:"short",day:"numeric"});return l=>aa(l,c)}let a=e.start.getFullYear(),i=e.end.getFullYear(),s=a!==i;if(o)return n(c=>{let l=c.getMonth()+1,u=c.getDate(),m=s?`/${c.getFullYear().toString().slice(-2)}`:"";return `${l}/${u}${m}`});let d=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",...s&&{year:"numeric"}});return c=>aa(c,d)}var Bo={displayXl:"text-display-xl",displayLg:"text-display-lg",displayMd:"text-display-md",displaySm:"text-display-sm",headingXl:"text-heading-xl",headingLg:"text-heading-lg",headingMd:"text-heading-md",headingSm:"text-heading-sm",bodyLg:"text-body-lg",bodyMd:"text-body-md",bodySm:"text-body-sm",labelLg:"text-label-lg",labelMd:"text-label-md",labelSm:"text-label-sm",code:"text-code",agent:"text-agent"};function zt(e,...t){return Yr(Bo[e],...t)}function pt(e=false){return `${e?"outline outline-1 outline-border-input data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none data-[focus-visible]:outline data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function Fe(e,t){return reactAriaComponents.composeRenderProps(e,r=>tailwindMerge.twMerge(t,r))}var _e={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",paddingY:"py-[var(--control-gap-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",paddingY:"py-[var(--control-gap-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",paddingY:"py-[var(--control-gap-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",paddingY:"py-[var(--control-gap-xl)]",gap:"gap-[var(--control-gap-xl)]"}};var TN="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",NN="bg-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",kN={primary:NN,secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border-2 border-border-muted hover:bg-action-secondary-hover forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-primary hover:bg-text-primary/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-feedback-error-text border-2 border-border-muted hover:bg-feedback-error-background/50 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-primary hover:bg-background-hover hover:text-text-primary forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-1 flex-shrink-0 rounded-[var(--control-border-radius)]",unstyled:"bg-transparent"},wh={full:"w-full",default:"w-fit"},PN="opacity-50 cursor-not-allowed pointer-events-none",RN="opacity-100 cursor-pointer",MN={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},EN={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function LN(e){return !e||e==="default"||e==="brand"?"primary":e}function DN(e){let{variant:t="primary",size:r="md",isDisabled:o,fullWidth:n=false,isLoading:a=false}=e,i=LN(t),s=i==="unstyled"?"":`${TN} ${kN[i]}`;i!=="unstyled"&&(s+=` ${_e[r].text} ${_e[r].height} ${_e[r].padding} ${_e[r].gap}`),o||a?s+=` ${PN}`:s+=` ${RN}`,n?s+=` ${wh.full}`:s+=` ${wh.default}`;let d=i==="primary"?"focus-visible:outline-action-primary":void 0;return [s,pt(),d].filter(Boolean).join(" ")}function te(e){let{icon:t,children:r,isLoading:o=false,loadingText:n,loadingIndicator:a,size:i="md",iconPosition:s="left",iconWeight:d,href:c,className:l,badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",style:g,target:f,rel:h,...b}=e,v=t?jsxRuntime.jsx(W,{name:t,size:i,weight:d}):null,x=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,typeof r=="function"?null:r,s==="right"&&v]}),C=jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a||jsxRuntime.jsx(W,{name:"CircleNotch",size:i,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:x}),n&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:n})]}),w=(u??0)>0,S=tailwindMerge.twMerge(DN(e),l),T=c?{href:c,target:f,rel:h,...b}:{};if(c){let{onPress:k,onPressStart:R,onPressEnd:L,onPressChange:E,onPressUp:B,onAuxClick:A,onContextMenu:H,onDoubleClick:Y,...G}=b;Object.assign(T,G);}let N=c?jsxRuntime.jsx(reactAriaComponents.Link,{...T,...o&&{"aria-busy":true},style:w?void 0:g,className:S,children:o?C:typeof r=="function"?(function(k){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,r(k),s==="right"&&v]})}):x}):jsxRuntime.jsx(reactAriaComponents.Button,{...b,...o&&{"aria-busy":true},style:w?void 0:g,className:S,children:o?C:typeof r=="function"?(function(k){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,r(k),s==="right"&&v]})}):x});return w?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",l),style:g,children:[N,jsxRuntime.jsx("span",{className:`absolute ${MN[p]} flex h-5 w-5 items-center justify-center rounded-full ${EN[m]} text-xs font-medium`,"aria-label":`${u} items`,children:u})]}):N}function pp({action:e,defaultVariant:t,defaultSize:r="lg"}){let o=!!e.formId;return jsxRuntime.jsx(te,{type:o?"submit":"button",form:o?e.formId:void 0,size:e.size||r,variant:e.variant||t,onPress:o?void 0:e.onPress,isLoading:e.isLoading,isDisabled:e.isDisabled,children:e.label})}function Pn({primaryAction:e,secondaryAction:t,tertiaryAction:r,footerContent:o}){let n=e||t||r;return !n&&!o?null:jsxRuntime.jsxs("div",{className:`flex w-full flex-col items-center justify-center border-t p-4 ${o?"h-28":""}`,children:[o&&jsxRuntime.jsx("div",{className:"flex h-10 justify-center",children:o}),n&&jsxRuntime.jsxs("div",{className:"flex w-full items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{children:r&&jsxRuntime.jsx(pp,{action:r,defaultVariant:"destructive"})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx(pp,{action:t,defaultVariant:"secondary"}),e&&jsxRuntime.jsx(pp,{action:e,defaultVariant:"primary"})]})]})]})}var AN={heading:{sm:Bo.headingSm,md:Bo.headingMd,lg:Bo.headingLg,xl:Bo.headingXl},display:{sm:Bo.displaySm,md:Bo.displayMd,lg:Bo.displayLg,xl:Bo.displayXl}},IN={page:"h-16 leading-[62px]"};function vr({tag:e="h1",variant:t="heading",size:r="lg",height:o,className:n="",children:a}){let i=r==="xs"?"sm":r,s=AN[t][i],d=o?IN[o]:"";return jsxRuntime.jsx(e,{className:Yr(s,"text-text-primary",d,n),children:a})}var Cr=({title:e,onClose:t,hideCloseIcon:r=false,titleAlign:o="left",hasBackArrow:n=false,onBack:a,headerContent:i})=>jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex h-16 w-full flex-shrink-0 items-center justify-between border-b px-6",e&&"border-b",o==="center"?"justify-center":""),children:[n&&jsxRuntime.jsx(te,{variant:"icon",onPress:a,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(W,{name:"CaretLeft","data-testid":"back-arrow"})}),i||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(vr,{size:"xs",children:e}),t&&!r&&jsxRuntime.jsx(te,{variant:"icon",onPress:t,"aria-label":"Close dialog",children:jsxRuntime.jsx(W,{name:"X","data-testid":"close-button"})})]})]});var gp=48,ls=ot.createContext(false),Eh=ot.createContext(null);function Lh(){return ot.useContext(Eh)}function Mn({children:e}){return jsxRuntime.jsx(ls.Provider,{value:true,children:e})}function Dh({children:e}){return jsxRuntime.jsx(ls.Provider,{value:false,children:e})}function ci(e,t){let r=ot.useContext(ls),{ref:o,height:n}=Hl();return {headerRef:o,headerHeight:!r||e||t?n||gp:0}}function zl(){return !ot.useContext(ls)}function Hl(){let[e,t]=ot.useState(0),r=ot.useRef(null),o=ot.useRef(null),n=ot.useCallback(a=>{if(o.current?.disconnect(),o.current=null,r.current=a,!a){t(0);return}let i=()=>t(r.current?.offsetHeight??0);i(),o.current=new ResizeObserver(i),o.current.observe(a);},[]);return ot.useEffect(()=>()=>o.current?.disconnect(),[]),{ref:n,height:e}}var ON=`
|
|
3
3
|
/*
|
|
4
4
|
* The container is a WRAPPER, not the grid itself. A container query cannot
|
|
5
5
|
* style its own container, so when .chart-header carried container-type the
|
|
@@ -136,21 +136,21 @@
|
|
|
136
136
|
grid-column: 2;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
`;function di({title:e,controls:t,actions:r,containerRef:o,marginLeft:n=0,marginRight:a=0}){let s=!ot.useContext(ss),[l,d]=ot.useState(null),c=ot.useRef(null),u=ot.useCallback(m=>{if(o?.(m),c.current?.disconnect(),c.current=null,!m)return;let p=()=>d(m.offsetWidth);p(),c.current=new ResizeObserver(p),c.current.observe(m);},[o]);return ot.useEffect(()=>()=>c.current?.disconnect(),[]),!s&&!t&&!r?null:jsxRuntime.jsxs(xh.Provider,{value:l,children:[jsxRuntime.jsx("style",{children:tN}),jsxRuntime.jsx("div",{className:"chart-header-container shrink-0",style:{marginLeft:n,marginRight:a},children:jsxRuntime.jsxs("div",{ref:u,"data-chart-header":"",...s?{}:{"data-chart-header-untitled":""},className:"chart-header pb-4",children:[s?jsxRuntime.jsx("h3",{className:"chart-header__title truncate text-sm font-medium text-text-primary",children:e}):jsxRuntime.jsx("span",{className:"chart-header__title"}),t?jsxRuntime.jsx("div",{"data-chart-header-controls":"",className:"chart-header__controls",children:t}):null,r?jsxRuntime.jsx("div",{"data-chart-header-actions":"",className:"chart-header__actions flex shrink-0 items-center gap-1",children:r}):null]})})]})}var q=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:n=false,flex:a=false,stack:i,responsive:s,delay:l=0,adjustAnimationSpeedBasedOnWidth:d=false,ariaLabel:c,className:u,"data-testid":m})=>{let[p,g]=ot.useState(l===0);if(ot.useEffect(()=>{if(l>0){let S=setTimeout(()=>g(true),l);return ()=>clearTimeout(S)}},[l]),!p)return null;let f=n?"bg-gradient-to-r from-[var(--color-skeleton-base)] via-[var(--color-skeleton-highlight)] to-[var(--color-skeleton-base)]":"bg-[var(--color-skeleton-base)]",b=d&&e?(()=>{let S=typeof e=="number"?e:parseFloat(String(e));return isNaN(S)?"":`animation-duration-[${Math.max(.8,S/100)}s]`})():"",h=o==="pulse"?`animate-pulse ${b}`:o==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--color-skeleton-wave)] before:to-transparent before:animate-wave ${b}`:"",v="rounded-sm";r==="circle"&&(v="rounded-full"),r==="text"&&(v="h-4 w-full rounded-sm");let x=a?"flex-1 min-w-0":"",C=s?Object.entries(s).map(([S,w])=>`${S}:w-[${w}]`).join(" "):"";return i?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":m,children:i.map((S,w)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,h,v,x,C,u),style:{width:S,height:t}},w))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,h,v,x,C,u),style:{width:e,height:t},role:"presentation","aria-hidden":!c,"aria-label":c??void 0,"data-testid":m})},Sh=({count:e=1,children:t,className:r,"data-testid":o})=>jsxRuntime.jsx("div",{className:r,"data-testid":o,children:Array.from({length:e}).map((n,a)=>jsxRuntime.jsx("div",{children:t},a))});var nN={outlined:"bg-background-surface border border-border-default",elevated:"bg-background-surface border-0 shadow-md",filled:"bg-background-muted border-0",ghost:"bg-transparent border-0 shadow-none"},aN="rounded-lg",pp={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},iN={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function wh(e){return ot__namespace.default.Children.toArray(e).some(t=>ot__namespace.default.isValidElement(t)?t.type===ot__namespace.default.Fragment?wh(t.props.children):t.type===Vl&&!!t.props.title:false)}function at({variant:e="outlined",className:t,children:r,isLoading:o=false,layout:n="default"}){let a=wh(r)?jsxRuntime.jsx(Mn,{children:r}):r;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",nN[e],aN,n==="flex"&&"flex flex-col",t),"data-testid":"card",children:o?jsxRuntime.jsx(q,{width:"100%",height:"100%",className:"rounded-none"}):a})}function Vl({title:e,subtitle:t,actions:r,leading:o,className:n,isLoading:a=false}){return a?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx(q,{width:120,height:20}),jsxRuntime.jsx(q,{width:24,height:24})]}),t&&jsxRuntime.jsx(q,{width:200,height:16})]}):!e&&!t&&!r&&!o?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:o}),jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(vr,{tag:"h3",size:"sm",className:"text-text-primary",children:e}):e}),t&&jsxRuntime.jsx("div",{className:zt("bodySm","text-text-secondary"),children:t})]}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r})]})})}function mp({src:e,alt:t,aspectRatio:r="auto",className:o,children:n,isLoading:a=false}){return a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("bg-background-muted",pp[r],o),children:jsxRuntime.jsx(q,{width:"100%",height:"100%"})}):n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",pp[r],o),children:n}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",pp[r],o),children:jsxRuntime.jsx("img",{src:e,alt:t||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function fp({className:e,children:t,isLoading:r=false,fill:o=false,style:n}){let i=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return r?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(i,o&&"flex-1 flex flex-col min-h-0",e),style:n,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(q,{width:"100%",height:16}),jsxRuntime.jsx(q,{width:"80%",height:16}),jsxRuntime.jsx(q,{width:"60%",height:16})]})}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(i,"text-text-primary",o&&"flex-1 flex flex-col min-h-0",e),style:n,children:t}):null}function gp({className:e,children:t,align:r="end",isLoading:o=false}){return o?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("px-6 py-4 flex gap-2 justify-end",e),children:[jsxRuntime.jsx(q,{width:80,height:32}),jsxRuntime.jsx(q,{width:60,height:32})]}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 flex items-center gap-2",iN[r],e),children:t}):null}at.Header=Vl;at.Media=mp;at.Content=fp;at.Footer=gp;var Co=class extends ot.Component{constructor(){super(...arguments);Qi(this,"state",{hasError:false});Qi(this,"handleRetry",()=>{this.setState({hasError:false,error:void 0}),typeof window<"u"&&window.location.reload();});}static getDerivedStateFromError(r){return {hasError:true,error:r}}componentDidCatch(r,o){console.error("Error Boundary caught an error:",r,o);}render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsxs(at,{children:[this.props.title&&jsxRuntime.jsx(at.Header,{title:this.props.title}),jsxRuntime.jsx(at.Content,{children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center gap-4","data-testid":"error-boundary",children:[jsxRuntime.jsx("p",{className:"text-feedback-error-text",children:this.state.error?.message||"Something went wrong"}),jsxRuntime.jsx("button",{className:"rounded bg-action-default px-4 py-2 text-[color:var(--color-action-default-text)] hover:bg-action-default-hover",onClick:this.handleRetry,children:"Retry"})]})})]}):this.props.children}};var dN=.3,uN=.5;function Lt({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,onClose:l,isDismissable:d=true,transparentOverlay:c=false,primaryAction:u,secondaryAction:m,footerContent:p,maxHeight:g="80vh",height:f,maxWidth:b="640px",contentPadding:h=true,showHandle:v=true,animationVariant:x="scale",className:C}){let[S,w]=ot.useState(false),[T,N]=ot.useState(0),[k,R]=ot.useState(false),A=Sl(s),M=A?.height??null,B=A?.keyboardOffset??0,D=ot.useRef(null),W=ot.useRef(null),X=ot.useRef(null),H=ot.useRef({isDragging:false,startY:0,startTime:0,pointerId:null});ot.useEffect(()=>{if(s){let O=setTimeout(()=>{w(true),setTimeout(()=>w(false),600);},400);return ()=>clearTimeout(O)}},[s]),ot.useEffect(()=>{s||(N(0),R(false),H.current={isDragging:false,startY:0,startTime:0,pointerId:null});},[s]),ot.useEffect(()=>{let O=W.current;if(!O||!s)return;let V=null,L=y=>{let E=y.target;E&&["INPUT","TEXTAREA","SELECT"].includes(E.tagName)&&(V&&clearTimeout(V),V=setTimeout(()=>{E.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return O.addEventListener("focusin",L),()=>{O.removeEventListener("focusin",L),V&&clearTimeout(V);}},[s]);let I=ot.useCallback(O=>{d&&(O.pointerType!=="touch"&&O.pointerType!=="pen"||(X.current&&(clearTimeout(X.current),X.current=null),H.current={isDragging:true,startY:O.clientY,startTime:Date.now(),pointerId:O.pointerId},R(false),O.currentTarget.setPointerCapture(O.pointerId)));},[d]),F=ot.useCallback(O=>{let{isDragging:V,startY:L,pointerId:y}=H.current;if(!V||O.pointerId!==y)return;let E=O.clientY-L;N(Math.max(0,E));},[]),z=ot.useCallback(O=>{let{isDragging:V,startY:L,startTime:y,pointerId:E}=H.current;if(!V||O.pointerId!==E)return;let P=O.clientY-L,Y=Date.now()-y,$=P/Y;H.current={isDragging:false,startY:0,startTime:0,pointerId:null};let re=(D.current?.getBoundingClientRect().height??0)*dN;(P>re||$>uN&&P>50)&&d?(l?.(),N(0)):(R(true),N(0),X.current=setTimeout(()=>{R(false),X.current=null;},200));},[d,l]);if(!s)return null;let U=t||r,K=u||m||p;return jsxRuntime.jsx(Co,{children:jsxRuntime.jsx(Yr,{isOpen:s,onOpenChange:O=>{O||l?.();},isDismissable:d,transparent:c,style:{paddingBottom:B>0?`${B}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center p-0 sm:p-4",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full max-w-full p-0 sm:p-2 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:d,children:jsxRuntime.jsx("div",{ref:D,className:tailwindMerge.twMerge("w-full",k&&"transition-transform duration-200"),style:{transform:T>0?`translateY(${T}px)`:void 0},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("relative flex w-full flex-col overflow-hidden","bg-background-surface","shadow-2xl shadow-black/30 dark:shadow-black/60","border-t border-x border-border-default/40","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0 focus:shadow-none","origin-bottom",x==="scale"?"animate-[tray-enter-scale_400ms_cubic-bezier(0.32,0.72,0,1)]":"animate-[tray-enter_400ms_cubic-bezier(0.32,0.72,0,1)]",x==="scale"?"data-[exiting]:animate-[tray-exit-scale_250ms_cubic-bezier(0.32,0,0.67,0)]":"data-[exiting]:animate-[tray-exit_250ms_cubic-bezier(0.32,0,0.67,0)]",C),style:{maxWidth:b,...f?{height:f}:{maxHeight:/\d/.test(g)?M!==null?`min(${g}, ${Math.max(M-8,0)}px, 100dvh)`:`min(${g}, 100dvh)`:g}},children:[v&&jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-8 z-10 flex justify-center items-start pt-2 touch-none cursor-grab active:cursor-grabbing",onPointerDown:I,onPointerMove:F,onPointerUp:z,onPointerCancel:z,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-1 w-12 rounded-full bg-border-muted transition-all duration-300","hover:bg-border-default hover:w-16",S&&"animate-[handle-wiggle_0.6s_ease-in-out]")})}),U&&(a?jsxRuntime.jsx(Cr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!l,hasBackArrow:true,onBack:i??(()=>{}),onClose:l||(()=>{})}):jsxRuntime.jsx(Cr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!l,onClose:l||(()=>{})})),jsxRuntime.jsx("div",{ref:W,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",h?"p-4":"p-0"),children:e}),K&&jsxRuntime.jsx(Pn,{primaryAction:u,secondaryAction:m,footerContent:p})]})})})})})}Lt.displayName="Tray";function pi({children:e,items:t,className:r,align:o="left",textAlign:n="left",size:a="md",onAction:i,header:s,footer:l,useMobileTray:d=true,popoverClassName:c}){let[u,m]=ot.useState(false),{isMobile:p}=Rr();if(d&&p){let f=ot__namespace.default.isValidElement(e)?ot__namespace.default.cloneElement(e,{onPress:()=>m(true)}):e,v=(x=>{if(typeof x=="string")return x;if(ot__namespace.default.isValidElement(x)){let C=x.props;if(typeof C.children=="string")return C.children;if(Array.isArray(C.children))return C.children.find(w=>typeof w=="string")||""}return ""})(e)||"Actions";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:r,children:f}),jsxRuntime.jsx(Lt,{isOpen:u,onClose:()=>m(false),title:v,contentPadding:false,headerContent:s,footerContent:l,children:jsxRuntime.jsx("div",{className:"flex flex-col",children:t.map(x=>{let C=x.href&&!x.disabled?"a":"button";return jsxRuntime.jsxs(C,{...x.href&&!x.disabled?{href:x.href}:{},onClick:()=>{x.disabled||(x.onAction?x.onAction():i?.(x),m(false));},disabled:x.disabled,"data-testid":x.testId,className:tailwindMerge.twMerge("flex w-full items-center text-start transition-colors",!x.noPadding&&"px-6 py-3","border-b border-border-muted last:border-0",x.variant==="destructive"?"text-feedback-error-text hover:bg-feedback-error-background active:bg-feedback-error-background/80":"text-text-primary hover:bg-background-hover active:bg-background-hover/80",x.disabled&&"opacity-50 cursor-not-allowed"),children:[x.iconName&&jsxRuntime.jsx(G,{name:x.iconName,size:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsx("div",{className:"flex flex-1 flex-col",children:x.render?x.render():jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:x.subtitle?"font-medium":"",children:x.name}),x.subtitle&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:x.subtitle})]})})]},x.id)})})})]})}return jsxRuntime.jsx("div",{className:r,children:jsxRuntime.jsxs(reactAriaComponents.MenuTrigger,{children:[e,jsxRuntime.jsx(Et,{className:tailwindMerge.twMerge("w-fit min-w-[180px] overflow-auto rounded-[var(--control-border-radius)] border border-border-default","bg-background-surface shadow-lg","animate-in fade-in zoom-in-97","duration-200 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-97","data-[exiting]:duration-150 data-[exiting]:ease-in",o==="right"?"origin-top-right":"origin-top-left",c),placement:o==="right"?"bottom end":"bottom start",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex min-w-[180px] flex-col gap-1 py-1",c),children:[s?jsxRuntime.jsx("div",{className:"px-3 pb-2 pt-3",children:s}):null,jsxRuntime.jsx(reactAriaComponents.Menu,{className:"!outline-none",children:t.map(f=>jsxRuntime.jsx(hN,{id:f.id,href:f.href,onAction:()=>{f.onAction?f.onAction():i?.(f);},textAlign:n,size:a,iconName:f.iconName,isDisabled:f.disabled,variant:f.variant,subtitle:f.subtitle,render:f.render,noPadding:f.noPadding,"data-testid":f.testId,children:f.name},f.id))}),l?jsxRuntime.jsx("div",{className:"px-3 pb-3 pt-2",children:l}):null]})})]})})}function hN({textAlign:e="left",iconName:t,size:r="md",isDisabled:o,children:n,variant:a="default",subtitle:i,render:s,noPadding:l,...d}){let c={sm:"px-3 py-2 text-sm",md:i?"px-4 py-2.5 text-base":"px-4 py-2 text-base"},u="text-text-primary hover:bg-background-hover data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-primary data-[focus-visible]:ring-inset",m={primary:u,default:u,destructive:"text-feedback-error-text hover:bg-feedback-error-background data-[focused]:bg-feedback-error-background data-[focus-visible]:ring-2 data-[focus-visible]:ring-feedback-error-border data-[focus-visible]:ring-inset"};return s?jsxRuntime.jsx(reactAriaComponents.MenuItem,{...d,isDisabled:o,className:tailwindMerge.twMerge("group box-border flex w-full cursor-pointer items-center rounded-sm outline-none transition-colors",!l&&c[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:s()}):jsxRuntime.jsxs(reactAriaComponents.MenuItem,{...d,isDisabled:o,className:tailwindMerge.twMerge("group box-border flex w-full cursor-pointer items-center rounded-sm outline-none transition-colors",!l&&c[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:[t&&e==="left"&&jsxRuntime.jsx(G,{name:t,size:r==="sm"?16:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:i?"font-medium":"",children:n}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:i})]}),t&&e==="right"&&jsxRuntime.jsx(G,{name:t,size:r==="sm"?16:20,className:"ml-3 flex-shrink-0"})]})}var ao=({className:e,size:t=24,color:r="text-action-brand"})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",r,e),style:{width:t,height:t},role:"status","aria-label":"loading",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Loading..."})});function io({state:e,message:t,className:r,customIndicator:o}){if(e!=="loading-more")return null;let n=jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-center gap-2 py-4","text-text-secondary",r),"aria-label":t||"Loading",children:[jsxRuntime.jsx(ao,{size:20,color:"text-text-secondary"}),t&&jsxRuntime.jsx("span",{className:"text-sm","aria-hidden":"true",children:t})]});return o||n}function En({items:e,onLoadMore:t,hasMore:r,isLoading:o=false,loadingState:n,enableVirtualization:a,estimatedItemSize:i=50,overscan:s=5,scrollElement:l,loadMoreThreshold:d=100}){let c=ot.useRef(null),u=ot.useRef(null),m=ot.useRef(false),[p,g]=ot.useState(0);ot.useEffect(()=>{u.current&&(l||c.current)&&g(R=>R+1);},[l,e.length,r,o,n]);let f=n||(o?e.length===0?"loading":"loading-more":"idle"),b=f==="loading",h=f==="loading-more",v=a!==void 0?a:e.length>=100,x=reactVirtual.useVirtualizer({count:e.length,getScrollElement:()=>l||c.current,estimateSize:()=>i,overscan:s}),C=v?x:null,S=v?x.getVirtualItems():[],w=ot.useRef({hasMore:r,isInitialLoad:b,isLoadingMore:h,onLoadMore:t});w.current={hasMore:r,isInitialLoad:b,isLoadingMore:h,onLoadMore:t};let T=ot.useRef(null);ot.useEffect(()=>{let R=u.current,A=l||c.current;if(!R||!A)return;let M=()=>{let D=w.current;if(m.current||!D.hasMore||D.isInitialLoad||D.isLoadingMore||!D.onLoadMore)return;let W=u.current;if(!W?.isConnected)return;let X=W.getBoundingClientRect(),H=A.getBoundingClientRect();X.top>H.bottom+d||(m.current=true,Promise.resolve().then(()=>D.onLoadMore?.()).catch(I=>{console.error("Infinite-scroll load failed.",I);}).finally(()=>{m.current=false;}));},B=new IntersectionObserver(()=>M(),{root:A,rootMargin:`0px 0px ${d}px 0px`,threshold:0});return B.observe(R),A.addEventListener("scroll",M,{passive:true}),T.current=M,()=>{B.disconnect(),A.removeEventListener("scroll",M),T.current=null;}},[l,d,p]),ot.useEffect(()=>{h||b||T.current?.();},[b,h,e.length,r]);let N=ot.useCallback((R,A)=>{C?C.scrollToIndex(R,A):c.current&&c.current.children[R]?.scrollIntoView({behavior:"smooth",block:A?.align||"start"});},[C]),k=ot.useCallback(()=>{C?C.scrollToIndex(0,{align:"start"}):c.current&&c.current.scrollTo({top:0,behavior:"smooth"});},[C]);return {virtualizer:C,virtualItems:S,computedLoadingState:f,isInitialLoad:b,isLoadingMore:h,scrollRef:c,loadMoreRef:u,scrollToIndex:N,scrollToTop:k}}var mi=ot.createContext({variant:"timeline",size:"md"});function Dh(){return ot.useContext(mi)}function Gl(e){return ot.isValidElement(e)&&e.type===Kl}function kN(e){return ot.isValidElement(e)&&e.type===Ul}function Sp({variant:e="timeline",size:t="md",className:r,children:o,items:n,renderItem:a,isLoading:i=false,loadingState:s,error:l=null,renderLoadingSkeleton:d,loadingSkeletonCount:c=5,emptyMessage:u="No activity found.",onLoadMore:m,hasMore:p=false,enableVirtualization:g,estimatedItemSize:f,loadingIndicator:b,height:h,maxHeight:v,...x}){let C=ot.useRef(null),{isMobile:S}=Rr(),w=S?"stacked":e,T=n!==void 0&&a!==void 0,{scrollRef:N,loadMoreRef:k,virtualizer:R,virtualItems:A,isLoadingMore:M,computedLoadingState:B}=En({items:n||[],onLoadMore:T?m:void 0,hasMore:T?p:false,isLoading:i,loadingState:s,enableVirtualization:T?g:false,estimatedItemSize:f||(w==="stacked"?120:150),overscan:5}),D=T&&N?N:C,W=ot.useMemo(()=>({variant:w,size:t}),[w,t]),X=w==="timeline"?t==="sm"?"gap-4":"gap-6":"gap-0",H=w==="stacked"?"divide-y divide-border-subtle rounded-lg border border-border-subtle bg-background-surface":"",I={};if(T&&m&&(h?(I.height=typeof h=="number"?`${h}px`:h,I.overflowY="auto"):v?(I.maxHeight=typeof v=="number"?`${v}px`:v,I.overflowY="auto"):(I.height="600px",I.overflowY="auto")),T){let U=B==="loading"||i&&(!n||n.length===0);if(U){let O=d?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:c}).map((V,L)=>jsxRuntime.jsx("div",{children:d()},`skeleton-${L}`))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:c}).map((V,L)=>{let y=t==="sm"?"gap-2":"gap-3";if(w==="timeline"){let E=t==="sm"?"pt-3":"pt-4",P=t==="sm"?"p-3":"p-4";return jsxRuntime.jsxs("div",{className:"group relative grid items-start gap-4 grid-cols-[3rem_1fr]",children:[jsxRuntime.jsxs("div",{className:`relative flex h-full flex-col items-center ${E}`,children:[jsxRuntime.jsx(q,{width:32,height:32,variant:"circle"}),L<c-1&&jsxRuntime.jsx("span",{className:"absolute top-[2rem] left-1/2 w-0 border-l-2 border-dotted -translate-x-1/2 h-[calc(100%+2.5rem)] border-border-muted"})]}),jsxRuntime.jsxs("div",{className:`min-w-0 flex flex-col ${y} ${P} rounded-md border border-border-subtle bg-background-surface`,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx(q,{width:"50%",height:16}),jsxRuntime.jsx(q,{width:"15%",height:12})]}),jsxRuntime.jsx(q,{width:"85%",height:t==="sm"?14:15}),jsxRuntime.jsx(q,{width:"70%",height:t==="sm"?14:15})]})]},`skeleton-${L}`)}else return jsxRuntime.jsxs("div",{className:`flex flex-col ${t==="sm"?"px-3 py-3":"px-4 py-4"}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(q,{width:24,height:24,variant:"circle"}),jsxRuntime.jsx(q,{width:"50%",height:16})]}),jsxRuntime.jsxs("div",{className:`mt-3 flex flex-col ${y}`,children:[jsxRuntime.jsx(q,{width:"85%",height:t==="sm"?14:15}),jsxRuntime.jsx(q,{width:"70%",height:t==="sm"?14:15}),jsxRuntime.jsx(q,{width:"20%",height:12})]})]},`skeleton-${L}`)})});return jsxRuntime.jsx(mi.Provider,{value:W,children:jsxRuntime.jsx("div",{ref:D,"data-slot":"feed","data-variant":w,className:tailwindMerge.twMerge("flex flex-col",X,H,r),style:I,...x,children:O})})}if(l)return jsxRuntime.jsx(mi.Provider,{value:W,children:jsxRuntime.jsx("div",{ref:D,"data-slot":"feed","data-variant":w,className:tailwindMerge.twMerge("flex flex-col",X,H,r),style:I,...x,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:l})})});if(!n||n.length===0)return jsxRuntime.jsx(mi.Provider,{value:W,children:jsxRuntime.jsx("div",{ref:D,"data-slot":"feed","data-variant":w,className:tailwindMerge.twMerge("flex flex-col",X,H,r),style:I,...x,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:u})})});let K=R?A?.map(O=>({virtualItem:O,item:n[O.index],index:O.index}))||[]:n.map((O,V)=>({item:O,index:V,virtualItem:null}));return jsxRuntime.jsx(mi.Provider,{value:W,children:jsxRuntime.jsxs("div",{ref:D,"data-slot":"feed","data-variant":w,className:tailwindMerge.twMerge("flex flex-col",X,H,r),style:{...I,position:R?"relative":void 0},...x,children:[R?jsxRuntime.jsxs("div",{style:{height:`${R.getTotalSize()}px`,position:"relative"},children:[K.map(({item:O,index:V,virtualItem:L})=>{if(!O||!L)return null;let y=a(O,V),E=w==="timeline"&&ot.isValidElement(y)&&Gl(y)?ot.cloneElement(y,{showConnector:V!==n.length-1}):y;return jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${L.start}px)`},"data-index":L.index,ref:R.measureElement,children:E},`item-${V}`)}),M&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${R.getTotalSize()}px`,left:0,width:"100%"},children:b||jsxRuntime.jsx(io,{state:"loading-more"})})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[K.map(({item:O,index:V})=>{let L=a(O,V);if(w==="timeline"&&ot.isValidElement(L)&&Gl(L)){let y=V===n.length-1;return jsxRuntime.jsx("div",{children:ot.cloneElement(L,{showConnector:!y})},`item-${V}`)}return jsxRuntime.jsx("div",{children:L},`item-${V}`)}),M&&(b||jsxRuntime.jsx(io,{state:"loading-more"}))]}),m&&p&&!U&&jsxRuntime.jsx("div",{ref:k,style:R?{position:"absolute",top:`${R.getTotalSize()}px`,left:0,width:"100%",height:1}:{height:1,width:"100%"}})]})})}let F=ot.Children.toArray(o),z=F.map((U,K)=>{if(Gl(U)){let O=U.props.showConnector??(w==="timeline"&&K<F.length-1),V=w==="timeline"&&K>0;return ot.cloneElement(U,{showConnector:O,showIncomingConnector:V})}if(kN(U)){let O=K===F.length-1;return ot.cloneElement(U,{__isLastGroup:O,__isFirstGroup:K===0})}return U});return jsxRuntime.jsx(mi.Provider,{value:W,children:jsxRuntime.jsx("div",{"data-slot":"feed","data-variant":w,className:tailwindMerge.twMerge("flex flex-col",X,H,r),...x,children:z})})}Sp.displayName="ActivityFeed";function Ul(e){let{variant:t,size:r}=Dh(),{title:o,description:n,actions:a,children:i,className:s,__isLastGroup:l=false,__isFirstGroup:d=false,...c}=e,u=ot.Children.toArray(i),m=u.map((f,b)=>{if(Gl(f)){let h=f.props.showConnector??(t==="timeline"&&!(l&&b===u.length-1));return ot.cloneElement(f,{showConnector:h,showIncomingConnector:t==="timeline"&&!(d&&b===0)})}return f}),p=t==="timeline"?"pl-[3rem]":r==="sm"?"px-3":"px-4",g=r==="sm"?"gap-3":"gap-4";return jsxRuntime.jsxs("section",{"data-slot":"group",className:tailwindMerge.twMerge("flex flex-col",s),...c,children:[(o||n||a)&&jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("mb-2 flex flex-wrap items-end justify-between gap-2",p),children:[jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[o&&jsxRuntime.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-secondary",children:o}),n&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:n})]}),a&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center gap-2",children:a})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex flex-col",g),children:m})]})}Ul.displayName="ActivityFeedGroup";var Eh={neutral:"bg-background-muted text-text-secondary border-border-muted",brand:"bg-background-muted text-action-brand border-action-brand/30",success:"bg-background-muted text-feedback-success-text border-feedback-success-border/40",warning:"bg-background-muted text-feedback-warning-text border-feedback-warning-border/40",danger:"bg-background-muted text-feedback-error-text border-feedback-error-border/40",info:"bg-background-muted text-feedback-info-text border-feedback-info-border/40"},PN={neutral:"bg-background-subtle",brand:"bg-action-brand/5",success:"bg-feedback-success-background",warning:"bg-feedback-warning-background",danger:"bg-feedback-error-background",info:"bg-feedback-info-background"},RN={neutral:"border-border-muted",brand:"border-action-brand",success:"border-feedback-success-border",warning:"border-feedback-warning-border",danger:"border-feedback-error-border",info:"border-feedback-info-border"};function Kl(e){let{variant:t,size:r}=Dh(),{title:o,description:n,timestamp:a,meta:i,media:s,actions:l,visual:d,icon:c,iconWeight:u,tone:m="neutral",surface:p,isHighlighted:g=false,showConnector:f=true,hideIndicator:b=false,interactive:h,className:v,children:x,onKeyDown:C,showIncomingConnector:S,...w}=e,T=d??(c?jsxRuntime.jsx(G,{name:c,weight:u||"fill",className:"h-4 w-4"}):null),N=p??(t==="stacked"?"minimal":"subtle"),k=r==="sm"?"gap-2":"gap-3",R="text-xs text-text-secondary",A=r==="sm"?"text-sm":"text-[15px]",M="text-xs text-text-secondary",B=h??typeof w.onClick=="function",D=K=>{if(!B){C?.(K);return}K.key===" "?K.preventDefault():K.key==="Enter"&&(K.preventDefault(),K.currentTarget.click()),C?.(K);},W=K=>{B&&K.key===" "&&(K.preventDefault(),K.currentTarget.click());},X=B?tailwindMerge.twMerge("group cursor-pointer",pt()):void 0,I=jsxRuntime.jsxs("div",{"data-slot":"connector",className:tailwindMerge.twMerge("relative flex h-full flex-col items-center",N==="minimal"?r==="sm"?"pt-2":"pt-3":r==="sm"?"pt-3":"pt-4"),children:[jsxRuntime.jsx("span",{"data-slot":"indicator",className:tailwindMerge.twMerge("relative z-10 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full border text-sm font-medium shadow-sm ring-2 ring-background-surface",Eh[m]),children:T}),t==="timeline"&&f&&jsxRuntime.jsx("span",{"data-slot":"separator",className:"absolute top-[2rem] left-1/2 w-0 border-l-2 border-dotted -translate-x-1/2 h-[calc(100%+2.5rem)] border-border-muted"})]}),F=g?tailwindMerge.twMerge(PN[m],N==="minimal"?"rounded-md border border-border-muted":RN[m]):"";if(t==="stacked")return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"stacked",role:B?"button":void 0,tabIndex:B?0:void 0,className:tailwindMerge.twMerge("flex flex-col",r==="sm"?"px-3 py-3":"px-4 py-4",{minimal:"",subtle:"bg-background-subtle",solid:"bg-background-muted"}[N],F,X,B?"transition-colors hover:bg-background-subtle/80":"",v),onKeyDown:D,onKeyUp:W,...w,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[!b&&jsxRuntime.jsx("span",{"data-slot":"indicator",className:tailwindMerge.twMerge("flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-full border text-sm font-medium shadow-sm ring-2 ring-background-surface",Eh[m]),children:T}),jsxRuntime.jsx("div",{"data-slot":"title",className:"min-w-0 flex-1 text-sm font-semibold text-text-primary",children:o})]}),jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("mt-3 flex flex-col",k),children:[n&&jsxRuntime.jsx("div",{"data-slot":"description",className:tailwindMerge.twMerge("text-text-secondary",A),children:n}),i&&jsxRuntime.jsx("div",{className:M,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),x,l&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:l}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("-mt-1.5",R),children:a})]})]});let z=N==="minimal"?r==="sm"?"py-2":"py-3":r==="sm"?"p-3":"p-4",U={minimal:"",subtle:"rounded-md border border-border-subtle bg-background-surface",solid:"rounded-md bg-background-muted shadow-sm"};return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"timeline",role:B?"button":void 0,tabIndex:B?0:void 0,className:tailwindMerge.twMerge("group relative grid items-start gap-4 grid-cols-[3rem_1fr]",X,v),onKeyDown:D,onKeyUp:W,...w,children:[b?jsxRuntime.jsx("div",{}):I,jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("min-w-0 flex flex-col",k,z,U[N],F,B?"transition-colors group-hover:bg-background-subtle/70":""),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{"data-slot":"title",className:"min-w-0 flex-1 text-sm font-semibold text-text-primary",children:o}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0",R),children:a})]}),n&&jsxRuntime.jsx("div",{"data-slot":"description",className:tailwindMerge.twMerge("text-text-secondary",A),children:n}),i&&jsxRuntime.jsx("div",{className:M,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),x,l&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:l})]})]})}Kl.displayName="ActivityItem";function Dr({isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n="left",hideCloseIcon:a=false,hasBackArrow:i=false,onBack:s,children:l,primaryAction:d,secondaryAction:c,tertiaryAction:u,footerContent:m,transparentOverlay:p=false,maxWidth:g="600px",minWidth:f="400px",maxHeight:b="85vh",height:h,mobileMaxHeight:v="90vh",mobileHeight:x,contentPadding:C=true,className:S}){let w=Pr("(max-width: 767px)"),T=Sl(w&&e===void 0),N=T?.height??null,k=T?.keyboardOffset??0,R=ot.useRef(null),A=ot.useCallback(()=>{R.current&&R.current.scrollTop!==0&&(R.current.scrollTop=0);},[]),M=ot.useRef(null),B=ot.useRef(null);ot.useEffect(()=>{let I=B.current;if(!I||!w)return;let F=null,z=U=>{let K=U.target;K&&["INPUT","TEXTAREA","SELECT"].includes(K.tagName)&&(F&&clearTimeout(F),F=setTimeout(()=>{K.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return I.addEventListener("focusin",z),()=>{I.removeEventListener("focusin",z),F&&clearTimeout(F);}},[w]);let D=ot.useCallback(()=>{M.current&&M.current.scrollTop!==0&&(M.current.scrollTop=0);},[]);if(e===false)return null;let W=r||o,X=d||c||u||m,H=e!==void 0;return w?H?jsxRuntime.jsx(Lt,{isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n,hideCloseIcon:a,hasBackArrow:i,onBack:s,primaryAction:d,secondaryAction:c,footerContent:m,transparentOverlay:p,maxHeight:v,height:x,maxWidth:g,contentPadding:C,showHandle:true,animationVariant:"scale",className:S,children:l}):jsxRuntime.jsx(Co,{children:jsxRuntime.jsx(Yr,{isDismissable:true,transparent:p,style:{paddingBottom:k>0?`${k}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-0 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:R,onScroll:A,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border-t border-x border-border-default/40","rounded-t-xl","overflow-hidden","animate-in slide-in-from-bottom","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:slide-out-to-bottom","data-[exiting]:duration-200 data-[exiting]:ease-in",S),style:{...x?{height:x}:{maxHeight:/\d/.test(v)?N!==null?`min(${v}, ${Math.max(N-8,0)}px, 100dvh)`:`min(${v}, 100dvh)`:v}},children:[jsxRuntime.jsx("div",{className:"flex justify-center pt-2",children:jsxRuntime.jsx("div",{className:"h-1.5 w-12 rounded-full bg-border-muted"})}),W&&(i?jsxRuntime.jsx(Cr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(Cr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{ref:B,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",C?"px-6 py-6":"p-0"),children:l}),X&&jsxRuntime.jsx(Pn,{primaryAction:d,secondaryAction:c,tertiaryAction:u,footerContent:m})]})})})}):jsxRuntime.jsx(Co,{children:jsxRuntime.jsx(Yr,{...H?{isOpen:e,onOpenChange:I=>{!I&&t&&t();}}:{},isDismissable:true,transparent:p,className:"flex items-center justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",style:{maxWidth:g},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:M,onScroll:D,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border border-border-default/50","rounded-md","overflow-hidden","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0","animate-in fade-in zoom-in-96 slide-in-from-bottom-2","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-95","data-[exiting]:duration-200 data-[exiting]:ease-in",S),style:{minWidth:f,...h?{height:h}:{maxHeight:b}},children:[W&&(i?jsxRuntime.jsx(Cr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(Cr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto",C?"px-6 py-6":"p-0"),children:l}),X&&jsxRuntime.jsx(Pn,{primaryAction:d,secondaryAction:c,tertiaryAction:u,footerContent:m})]})})})})}function Oh({isOpen:e,onClose:t,title:r,message:o,confirmLabel:n="OK",confirmVariant:a="primary",maxWidth:i="400px",minWidth:s="320px"}){return jsxRuntime.jsx(Dr,{isOpen:e,onClose:t,title:r,maxWidth:i,minWidth:s,primaryAction:{label:n,onPress:t,variant:a},children:jsxRuntime.jsx("div",{className:"text-text-primary",children:o})})}var Ln={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},Jr=ot.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=wn[e]??EN__namespace[e];if(!s)return null;let l=typeof t=="string"?t in Ln?Ln[t]:Ln.md:t,d=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:l,color:r,weight:o,className:d,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});Jr.displayName="IconSSR";var LN=ot.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:l,ariaLabel:d,ref:c,...u})=>{let m=typeof n=="string"?n in Ln?Ln[n]:Ln.md:n,p=r?typeof r=="string"?r in Ln?Ln[r]:m*1.75:r:m*1.75,g=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",o);return jsxRuntime.jsx("div",{className:g,style:{width:p,height:p},children:jsxRuntime.jsx(Jr,{...u,name:i,size:n,color:s,weight:l,className:a,ariaLabel:d})})});LN.displayName="IconSSRWithContainer";var fi=({className:e,showWordmark:t=true,width:r,fill:o})=>{let n,a;if(o?o.startsWith("fill-")?a=o:n=o:e?a=e:n="var(--color-text-primary)",t){let l=r||270,d=l/270*80;return jsxRuntime.jsxs("svg",{width:l,height:d,viewBox:"0 0 270 80",xmlns:"http://www.w3.org/2000/svg",className:a,style:n?{fill:n}:void 0,children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_796_283)",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"}),jsxRuntime.jsx("path",{d:"M269.838 49.4457H249.005C249.266 51.801 250.162 53.6985 251.695 55.1377C253.225 56.577 255.134 57.2967 257.416 57.2967C259.307 57.2967 260.887 56.8715 262.159 56.021C263.463 55.1377 264.408 53.9927 264.996 52.5862H269.251C268.502 54.9415 267.084 56.937 264.996 58.5725C262.943 60.208 260.414 61.026 257.416 61.026C255.069 61.026 252.917 60.4697 250.961 59.3575C249.037 58.2127 247.504 56.6587 246.363 54.696C245.255 52.7332 244.7 50.558 244.7 48.17C244.7 45.782 245.255 43.6067 246.363 41.644C247.504 39.6812 249.037 38.1437 250.961 37.0315C252.917 35.8867 255.069 35.3142 257.416 35.3142C259.73 35.3142 261.833 35.8702 263.724 36.9825C265.615 38.0947 267.098 39.6485 268.176 41.644C269.283 43.6395 269.838 45.913 269.838 48.4645V49.4457ZM257.416 39.0432C255.263 39.0432 253.439 39.6812 251.939 40.957C250.47 42.2327 249.542 43.9337 249.152 46.06H265.583C265.192 43.9992 264.262 42.3145 262.796 41.006C261.36 39.6975 259.568 39.0432 257.416 39.0432Z"}),jsxRuntime.jsx("path",{d:"M228.356 60.5352V35.8049H232.219V39.7794H232.464C233.05 38.5689 233.963 37.5712 235.202 36.7862C236.474 35.9684 237.974 35.5594 239.701 35.5594H243.125V39.4359H239.701C237.517 39.4359 235.757 40.1554 234.42 41.5949C233.083 43.0342 232.414 44.9152 232.414 47.2377V60.5352H228.356Z"}),jsxRuntime.jsx("path",{d:"M208.607 61.0259C205.64 61.0259 203.326 60.1262 201.663 58.3272C200 56.4952 199.169 53.8947 199.169 50.5252V35.8047H203.228V49.8874C203.228 52.2427 203.766 54.0744 204.842 55.3829C205.95 56.6587 207.532 57.2967 209.586 57.2967C211.02 57.2967 212.308 56.9694 213.449 56.3152C214.623 55.6284 215.536 54.6959 216.188 53.5184C216.84 52.3407 217.166 50.9997 217.166 49.4949V35.8047H221.225V60.5352H217.313V56.5607H217.068C216.286 57.9019 215.161 58.9814 213.694 59.7992C212.226 60.6169 210.531 61.0259 208.607 61.0259Z"}),jsxRuntime.jsx("path",{d:"M186.736 39.534V56.806H194.756V60.5352H182.677V39.534H177.199V35.8047H182.677V29.5732H186.736V35.8047H193.24V39.534H186.736Z"}),jsxRuntime.jsx("path",{d:"M156.585 60.5352H151.988L158.394 48.0227L152.33 35.8047H156.976L162.062 46.0599H165.388L170.474 35.8047H175.022L168.958 48.0227L175.365 60.5352H170.67L165.29 49.7892H162.013L156.585 60.5352Z"}),jsxRuntime.jsx("path",{d:"M150.138 49.1315H129.304C129.565 51.4867 130.461 53.3842 131.994 54.8235C133.526 56.2627 135.433 56.9825 137.715 56.9825C139.606 56.9825 141.188 56.5572 142.459 55.7067C143.763 54.8235 144.709 53.6785 145.296 52.272H149.551C148.801 54.6272 147.382 56.6227 145.296 58.2582C143.242 59.8937 140.715 60.7118 137.715 60.7118C135.368 60.7118 133.216 60.1555 131.26 59.0432C129.336 57.8985 127.804 56.3445 126.663 54.3817C125.554 52.419 125 50.2437 125 47.8557C125 45.4677 125.554 43.2925 126.663 41.3298C127.804 39.367 129.336 37.8295 131.26 36.7173C133.216 35.5725 135.368 35 137.715 35C140.03 35 142.133 35.556 144.024 36.6682C145.915 37.7805 147.399 39.3342 148.475 41.3298C149.583 43.3252 150.138 45.5987 150.138 48.1502V49.1315ZM137.715 38.729C135.564 38.729 133.738 39.367 132.238 40.6427C130.771 41.9185 129.842 43.6195 129.45 45.7458H145.883C145.491 43.685 144.562 42.0002 143.095 40.6917C141.661 39.3832 139.867 38.729 137.715 38.729Z"}),jsxRuntime.jsx("path",{d:"M116.961 60.5353H112.559V30.4072H101.164V26.1875H128.307V30.4072H116.961V60.5353Z"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_796_283",children:jsxRuntime.jsx("rect",{width:"270",height:"80",fill:"white"})})})]})}let i=r||80;return jsxRuntime.jsxs("svg",{width:i,height:i,viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg",className:a,style:n?{fill:n}:void 0,children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"})]})};var Xl=({topItems:e=[],bottomItems:t=[],bottomContent:r,logo:o,showLogo:n=true,linkComponent:a="a",className:i="",mobileMenuId:s="app-mobile-menu",sidebarCollapseId:l="app-sidebar-collapse"})=>{let d=p=>p.length>0&&"items"in p[0],c=p=>d(p)?p:[{id:"default-section",items:p}],u=(p,g,f)=>jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[p.title&&jsxRuntime.jsx("div",{className:"px-6 py-1 text-xs font-medium text-text-secondary uppercase tracking-wider",children:p.title}),jsxRuntime.jsx("div",{className:"space-y-0.5",children:p.items.map(b=>m(b))}),g<f-1&&jsxRuntime.jsx("div",{className:"border-b border-border-subtle mx-6 my-2"})]},p.id),m=(p,g=false)=>{if(p.children&&p.children.length>0){let h=`category-${p.id}`;return jsxRuntime.jsxs("div",{className:"group/category",children:[jsxRuntime.jsx("input",{type:"checkbox",id:h,className:"peer/category hidden",defaultChecked:p.isExpanded,"aria-hidden":"true"}),jsxRuntime.jsxs("label",{htmlFor:h,className:"flex items-center gap-3 px-6 py-1 text-text-primary hover:bg-background-hover hover:text-text-primary cursor-pointer transition-all duration-200",children:[p.icon&&jsxRuntime.jsx("span",{className:"flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-all duration-200",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200",children:p.label}),jsxRuntime.jsx("span",{className:"flex-1"}),jsxRuntime.jsx("svg",{className:"w-4 h-4 transform transition-transform duration-200 peer-checked/category:rotate-180 ml-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),jsxRuntime.jsx("div",{className:"hidden peer-checked/category:block bg-background-subtle border-l-2 border-border-subtle ml-6",children:p.children.map(v=>m(v,true))})]},p.id)}let f={href:p.href||"#",className:`flex items-center gap-3 transition-all duration-200 hover:bg-background-hover ${g?"pl-8 pr-6 py-1 text-sm":"px-6 py-1"} ${p.isActive?`bg-action-brand/10 text-action-brand ${g?"":"border-l-2 border-action-brand"}`:"text-text-primary hover:text-text-primary"}`,"aria-current":p.isActive?"page":void 0},b=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p.icon&&!g&&jsxRuntime.jsx("span",{className:"flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-all duration-200",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200",children:p.label})]});return a==="a"?jsxRuntime.jsx("a",{...f,children:b},p.id):jsxRuntime.jsx(a,{...f,children:b},p.id)};return jsxRuntime.jsxs("div",{className:`flex flex-col h-full ${i}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between h-[60px] px-6 border-b border-border-default",children:[n&&jsxRuntime.jsx("div",{className:"relative top-[-1px] transition-all duration-200",children:o||jsxRuntime.jsx(fi,{showWordmark:true,width:120})}),jsxRuntime.jsx("label",{htmlFor:l,className:"hidden md:flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-all duration-200 relative top-[-1px]","aria-label":"Collapse sidebar",children:jsxRuntime.jsx(Jr,{name:"Sidebar",size:"sm"})}),jsxRuntime.jsx("label",{htmlFor:s,className:"md:hidden flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-colors","aria-label":"Close menu",children:jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),jsxRuntime.jsxs("nav",{className:"flex-1 flex flex-col overflow-hidden",children:[e&&e.length>0&&jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto py-2 scrollbar-hide",children:c(e).map((p,g,f)=>u(p,g,f.length))}),t&&t.length>0&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t bg-background-muted/30",children:jsxRuntime.jsx("div",{className:"mt-2 pb-2 space-y-0.5",children:t.map(p=>m(p))})}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t border-border-default",children:jsxRuntime.jsx("div",{children:r})})]})]})};function ca(e){return e.id??e.href??e.label}function kp(e,t,r=[]){for(let o of e){if(o.href===t||o.id===t)return o.children?.length&&o.pushOnSelect!==false?[...r,ca(o)]:r;if(o.children?.length){let n=kp(o.children,t,[...r,ca(o)]);if(n)return n}}return null}function Yh(e,t){let r=[],o=e;for(let n of t){let a=o.find(i=>ca(i)===n);if(!a)break;r.push(a),o=a.children??[];}return r}function AN(e,t,r){let o=t.length>0?[...e,...t]:e,n=[{path:[],items:e,bottomItems:t.length>0?t:void 0}],a=Yh(o,r),i=[];for(let s of a){if(!s.children?.length)break;i=[...i,ca(s)],n.push({path:i,parent:s,items:s.children});}return n}var IN=({href:e,...t})=>jsxRuntime.jsx("a",{href:e,...t}),Gh=[];function FN(e){let t=[];for(let r of e){let o=r.items??[];o.length!==0&&(t.length>0&&t.push({id:`__divider__${r.id}`,label:"",divider:true}),r.title&&t.push({id:`__group__${r.id}`,label:r.title,groupLabel:true}),t.push(...o));}return t}function BN(e,t){if(process.env.NODE_ENV==="production"||t.length===0)return;let r=new Map;for(let o of e)o.id&&r.set(o.id,"id"),o.href&&!r.has(o.href)&&r.set(o.href,"href");for(let o of t){let n=null;o.id&&r.has(o.id)?n=r.get(o.id)==="id"?`id "${o.id}"`:`id "${o.id}" (matches an items \`href\`)`:o.href&&r.has(o.href)&&(n=r.get(o.href)==="href"?`href "${o.href}"`:`href "${o.href}" (matches an items \`id\`)`),n&&console.warn(`[StackNav] L1 ${n} appears in both \`items\` and \`bottomItems\`. Stack tokens and value lookups will resolve to the \`items\` entry, making the bottomItems entry unreachable. L1 ids and hrefs must be unique across both arrays.`);}}function VN(e){if(!e)return {};let t={};return e.background!==void 0&&(t["--edges-stack-nav-background"]=e.background),e.activeBackground!==void 0&&(t["--edges-stack-nav-row-active-background"]=e.activeBackground),e.activeColor!==void 0&&(t["--edges-stack-nav-row-active-color"]=e.activeColor),e.hoverBackground!==void 0&&(t["--edges-stack-nav-row-hover-background"]=e.hoverBackground),e.borderColor!==void 0&&(t["--edges-stack-nav-border-color"]=e.borderColor),t}function gi({items:e,groups:t,bottomItems:r,value:o,defaultStack:n,stack:a,onStackChange:i,onSelect:s,linkComponent:l=IN,renderRow:d,showLogo:c=false,logo:u,header:m,footer:p,mobileMenuId:g,sidebarCollapseId:f,rootLabel:b,sticky:h=true,width:v=260,ariaLabel:x="Navigation",theme:C,animated:S=true,style:w,className:T}){process.env.NODE_ENV!=="production"&&t&&e&&console.warn("[StackNav] Both `items` and `groups` were provided. `groups` takes precedence and `items` is ignored.");let N=ot__namespace.useMemo(()=>t?FN(t):e??Gh,[t,e]),k=r??Gh,R=ot__namespace.useMemo(()=>k.length>0?[...N,...k]:N,[N,k]);ot__namespace.useEffect(()=>{BN(N,k);},[N,k]);let[A,M]=ot__namespace.useState(()=>a!==void 0?a:n!==void 0?n:o?kp(R,o)??[]:[]),B=a??A,D=ot__namespace.useCallback(V=>{a===void 0&&M(V),i?.(V);},[a,i]),W=ot__namespace.useRef(false);ot__namespace.useEffect(()=>{if(a!==void 0||!W.current&&(W.current=true,n!==void 0)||!o)return;let V=kp(R,o);M(L=>{let y=V??[];return HN(L,y)?L:y});},[o,R,a,n]);let X=ot__namespace.useMemo(()=>AN(N,k,B),[N,k,B]),H=ot__namespace.useCallback((V,L)=>{V.children?.length&&D([...L,ca(V)]);},[D]),I=ot__namespace.useCallback(()=>{D(B.slice(0,-1));},[B,D]),F=ot__namespace.useCallback((V,L)=>{let y=Yh(R,B);if(s?.(L,y),!!L.children?.length&&!(L.href&&L.pushOnSelect===false)){let P=X[X.length-1]?.path??[];H(L,P);}L.href||V.preventDefault();},[R,B,s,H,X]),z=ot__namespace.useCallback(V=>{let L=X[X.length-1]?.path??[];H(V,L);},[H,X]),U=ot__namespace.useCallback(V=>o?V.href===o||V.id===o:false,[o]),K=h?"sticky top-0 h-[100dvh]":"",O={...v!=null?{width:v}:{},...VN(C),...w};return jsxRuntime.jsxs("aside",{role:"navigation","aria-label":x,"data-edges-stack-nav":"",className:tailwindMerge.twMerge("edges-stack-nav flex flex-col flex-shrink-0 overflow-hidden",S&&"edges-stack-nav--animated",K,T),style:O,children:[c?jsxRuntime.jsxs("div",{className:"edges-stack-nav__logo",children:[jsxRuntime.jsx("div",{className:"relative top-[-1px]",children:u??jsxRuntime.jsx(fi,{showWordmark:true,width:120})}),f?jsxRuntime.jsx("label",{htmlFor:f,className:"hidden md:flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-all duration-200 relative top-[-1px]","aria-label":"Collapse sidebar",children:jsxRuntime.jsx(Jr,{name:"Sidebar",size:"sm"})}):null,g?jsxRuntime.jsx("label",{htmlFor:g,className:"md:hidden flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-colors","aria-label":"Close menu",children:jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}):null]}):null,m?jsxRuntime.jsx("div",{className:"edges-stack-nav__header",children:m}):null,jsxRuntime.jsx("div",{className:"relative flex-1 overflow-hidden",children:X.map((V,L)=>{let y=V.path.length,E=L===X.length-1,P=L<X.length-1,Y=y===0?"__root__":V.path.join("/");return jsxRuntime.jsx(ON,{pane:V,parentPath:V.path.slice(0,-1),depth:y,isTop:E,isAbove:P,rootLabel:b,LinkComponent:l,renderRow:d,isActive:U,onSelect:F,onDrillIn:z,onBack:I,animated:S},Y)})}),p?jsxRuntime.jsx("div",{className:"edges-stack-nav__footer",children:p}):null]})}function ON({pane:e,depth:t,isTop:r,isAbove:o,rootLabel:n,LinkComponent:a,renderRow:i,isActive:s,onSelect:l,onDrillIn:d,onBack:c,animated:u}){let m=r?"edges-stack-nav__pane--top":o?"edges-stack-nav__pane--above":"edges-stack-nav__pane--below";return jsxRuntime.jsxs("nav",{"aria-label":e.parent?.label??n??"Navigation","aria-hidden":r?void 0:true,inert:r?void 0:true,className:tailwindMerge.twMerge("edges-stack-nav__pane absolute inset-0 flex flex-col gap-px overflow-y-auto px-2 py-3",!u&&"edges-stack-nav__pane--instant",m),children:[t>0&&e.parent?jsxRuntime.jsxs("button",{type:"button",className:"edges-stack-nav__back edges-stack-nav__row flex w-full cursor-pointer items-center gap-2 rounded-sm border-0 bg-transparent px-3 py-2 mb-2 text-left text-sm font-semibold text-text-primary",onClick:c,"aria-label":`Back from ${e.parent.label}`,children:[jsxRuntime.jsx(zN,{}),jsxRuntime.jsx("span",{children:e.parent.label})]}):n?jsxRuntime.jsx("div",{className:"px-3 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-text-secondary",children:n}):null,e.items.map(p=>jsxRuntime.jsx(Wh,{item:p,LinkComponent:a,renderRow:i,isActive:s(p),onSelect:l,onDrillIn:d},ca(p))),e.bottomItems&&e.bottomItems.length>0?jsxRuntime.jsx("div",{className:"edges-stack-nav__bottom-items mt-auto flex flex-col gap-px pt-3",children:e.bottomItems.map(p=>jsxRuntime.jsx(Wh,{item:p,LinkComponent:a,renderRow:i,isActive:s(p),onSelect:l,onDrillIn:d},ca(p)))}):null]})}function Wh({item:e,LinkComponent:t,renderRow:r,isActive:o,onSelect:n,onDrillIn:a}){if(e.divider)return jsxRuntime.jsx("div",{className:"edges-stack-nav__divider my-2",role:"separator"});if(e.groupLabel)return jsxRuntime.jsx("div",{className:"px-3 pt-6 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-text-secondary",children:e.label});let i=!!e.children?.length,s=tailwindMerge.twMerge("edges-stack-nav__row flex items-center justify-between gap-3 rounded-sm px-3 py-2 text-sm font-normal text-text-primary no-underline cursor-pointer text-left bg-transparent border-0 transition-colors",o&&"edges-stack-nav__row--active font-semibold");if(r)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r({item:e,isActive:o,hasChildren:i,select:c=>n(c,e),drillIn:()=>a(e),LinkComponent:t,className:s})});let l=jsxRuntime.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.leading??e.icon?jsxRuntime.jsx("span",{className:"inline-flex items-center flex-shrink-0",children:e.leading??e.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:e.label})]});if(e.href&&i&&e.pushOnSelect===false)return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(s,"cursor-default p-0"),children:[jsxRuntime.jsx(t,{href:e.href,"aria-label":e.ariaLabel,className:"flex min-w-0 flex-1 items-center gap-2 rounded-sm px-3 py-2 text-inherit no-underline","aria-current":o?"page":void 0,onClick:c=>n(c,e),children:l}),jsxRuntime.jsxs("span",{className:"flex flex-shrink-0 items-center gap-2 pr-2 text-text-secondary",children:[e.trailing,jsxRuntime.jsx("button",{type:"button",className:"edges-stack-nav__drill-in inline-flex cursor-pointer items-center rounded-sm border-0 bg-transparent p-1 text-inherit","aria-label":`Open ${e.label}`,onClick:()=>a(e),children:jsxRuntime.jsx(Uh,{})})]})]});let d=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l,jsxRuntime.jsxs("span",{className:"flex flex-shrink-0 items-center gap-2 text-text-secondary",children:[e.trailing,i?jsxRuntime.jsx(Uh,{}):null]})]});return e.href?jsxRuntime.jsx(t,{href:e.href,"aria-label":e.ariaLabel,className:s,"aria-current":o?"page":void 0,onClick:c=>n(c,e),children:d}):jsxRuntime.jsx("button",{type:"button",className:s,"aria-label":e.ariaLabel,onClick:c=>{n(c,e);},children:d})}function Uh(){return jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M4.5 3 7.5 6 4.5 9"})})}function zN(){return jsxRuntime.jsx("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M8.5 3 4.5 7 8.5 11"})})}function HN(e,t){if(e===t)return true;if(e.length!==t.length)return false;for(let r=0;r<e.length;r+=1)if(e[r]!==t[r])return false;return true}var ps=({rightContent:e,centerContent:t,showMobileMenu:r=true,avatar:o,showColorModeSwitcher:n=false,toggleTheme:a,isDarkThemeEnabled:i=false,colorMode:s,actions:l,className:d="",mobileMenuId:c="app-mobile-menu"})=>{let u=()=>{switch(s||(i?"dark":"light")){case "system":return jsxRuntime.jsx(Jr,{name:"Monitor",size:"sm"});case "light":return jsxRuntime.jsx(Jr,{name:"Sun",size:"sm"});case "dark":return jsxRuntime.jsx(Jr,{name:"Moon",size:"sm"})}},m=()=>{switch(s||(i?"dark":"light")){case "system":return "Switch to light mode";case "light":return "Switch to dark mode";case "dark":return "Switch to system mode";default:return "Toggle theme"}};return jsxRuntime.jsx("header",{className:`h-[60px] bg-background-surface border-b ${d}`,children:jsxRuntime.jsxs("div",{className:"relative flex h-full items-center",children:[jsxRuntime.jsx("div",{className:"flex items-center h-full flex-shrink-0",children:r&&jsxRuntime.jsx("label",{htmlFor:c,className:"md:hidden cursor-pointer","aria-label":"Open menu",children:jsxRuntime.jsx("div",{className:"flex h-full w-14 flex-col items-center justify-center border-r hover:bg-background-hover transition-colors",children:jsxRuntime.jsx(Jr,{name:"List",size:"sm"})})})}),t&&jsxRuntime.jsx("div",{className:"flex-1 flex justify-end md:justify-center md:px-4 min-w-0",children:jsxRuntime.jsx("div",{className:"w-full md:max-w-4xl min-w-0",children:t})}),!t&&jsxRuntime.jsx("div",{className:"flex-1"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 pr-4 flex-shrink-0 ml-4",children:[e,n&&a&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover transition-colors","aria-label":m(),children:u()}),l,o&&jsxRuntime.jsx("div",{className:"flex items-center",children:o})]})]})})};function Jh({sideNav:e,stackNav:t,topNav:r,children:o,contentPaddingX:n,contentPaddingY:a,showSidebarBorder:i=true,mainClassName:s,enableJsEnhancements:l=false}){let d="app-mobile-menu",c="app-sidebar-collapse";return ot.useEffect(()=>{if(!l)return;let u=document.getElementById(c),m=document.getElementById(d),p=document.querySelector("[data-app-shell]"),g=document.getElementById("app-sidebar");if(!u||!p||!g)return;let f=null,b=false;try{let R=localStorage.getItem("sidebar-collapsed");R!==null&&(u.checked=R==="true");}catch{}let h=()=>{try{localStorage.setItem("sidebar-collapsed",String(u.checked));}catch{}u.checked?b=true:(f&&(clearTimeout(f),f=null),p.removeAttribute("data-peek"),b=false);};u.addEventListener("change",h);let v=R=>{R.key==="Escape"&&(m&&(m.checked=false),p.removeAttribute("data-peek"));};document.addEventListener("keydown",v);let x=null;m&&(x=()=>{document.body.style.overflow=m.checked?"hidden":"";},m.addEventListener("change",x));let C=R=>{let M=R.target.closest("a");M&&M.href&&window.innerWidth<768&&m&&setTimeout(()=>{m.checked=false,document.body.style.overflow="";},100);};g.addEventListener("click",C);let S=16,w=200,T=()=>{f&&(clearTimeout(f),f=null),p.getAttribute("data-peek")!=="true"&&p.setAttribute("data-peek","true");},N=()=>{f&&clearTimeout(f),f=setTimeout(()=>{p.removeAttribute("data-peek"),f=null;},w);},k=R=>{if(window.innerWidth<768||!u.checked)return;let A=g.contains(R.target);if(b&&!A&&(b=false),b)return;R.clientX<=S||A?T():p.getAttribute("data-peek")==="true"&&N();};return document.addEventListener("mousemove",k),()=>{u.removeEventListener("change",h),document.removeEventListener("keydown",v),m&&x&&m.removeEventListener("change",x),g.removeEventListener("click",C),document.removeEventListener("mousemove",k),f&&clearTimeout(f);}},[l,d,c]),jsxRuntime.jsxs("div",{className:"min-h-[100dvh] bg-background text-text-primary relative","data-app-shell":"",children:[jsxRuntime.jsx("input",{type:"checkbox",id:c,className:"sr-only peer/sidebar","aria-hidden":"true"}),jsxRuntime.jsx("a",{href:"#app-content",className:"sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 z-50 rounded px-3 py-2 bg-background-surface shadow",children:"Skip to content"}),jsxRuntime.jsx(ps,{...r,mobileMenuId:d,className:["sticky top-0 flex-shrink-0 z-30 md:hidden",r?.className].filter(Boolean).join(" ")}),jsxRuntime.jsxs("div",{className:"flex w-full h-[calc(100dvh-60px)] md:h-[100dvh] relative overflow-hidden",children:[jsxRuntime.jsx("input",{type:"checkbox",id:d,className:"sr-only peer/mobile","aria-hidden":"true"}),jsxRuntime.jsx("label",{htmlFor:d,className:"fixed inset-0 bg-background-modal z-[55] opacity-0 pointer-events-none peer-checked/mobile:opacity-100 peer-checked/mobile:pointer-events-auto transition-opacity md:hidden","aria-label":"Close menu"}),jsxRuntime.jsx("div",{"aria-hidden":"true","data-peek-zone":"",className:"hidden md:block fixed left-0 top-0 bottom-0 w-4 z-[70] pointer-events-none"}),jsxRuntime.jsx("label",{htmlFor:c,"data-expand-rail":"",className:"hidden fixed left-3 top-3 z-[75] items-center justify-center w-9 h-9 rounded-md bg-background-surface border border-border-default shadow-sm hover:bg-background-hover cursor-pointer transition-all duration-200","aria-label":"Expand sidebar",children:jsxRuntime.jsx(Jr,{name:"Sidebar",size:"sm"})}),jsxRuntime.jsx("aside",{id:"app-sidebar","data-app-sidebar":"",className:["bg-background-surface","border-r border-border-default","transition-transform duration-300 ease-in-out md:transition-[transform,width] md:duration-300 md:ease-in-out","fixed md:relative","left-0 top-0 bottom-0","z-[60] md:z-10","w-full md:w-64","h-[100dvh] md:h-full","-translate-x-full","peer-checked/mobile:translate-x-0","md:translate-x-0",i?"":"!border-r-0",(t??e)?.className||""].filter(Boolean).join(" "),children:t?jsxRuntime.jsx(gi,{...t,mobileMenuId:d,sidebarCollapseId:c,sticky:false,width:null,className:["h-full !border-r-0",t.className].filter(Boolean).join(" ")}):jsxRuntime.jsx(Xl,{...e,mobileMenuId:d,sidebarCollapseId:c,className:"h-full"})}),jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[jsxRuntime.jsx("div",{className:"sticky top-0 flex-shrink-0 hidden md:block z-20","data-top-nav-wrapper":"",children:jsxRuntime.jsx(ps,{...r,className:r?.className})}),jsxRuntime.jsx("main",{id:"app-content",className:["flex-1 overflow-y-auto overflow-x-hidden bg-background-body scrollbar-visible",n,a,s||""].join(" "),role:"main",children:o})]})]}),jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
139
|
+
`;function di({title:e,controls:t,actions:r,containerRef:o,marginLeft:n=0,marginRight:a=0}){let s=!ot.useContext(ls),[d,c]=ot.useState(null),l=ot.useRef(null),u=ot.useCallback(m=>{if(o?.(m),l.current?.disconnect(),l.current=null,!m)return;let p=()=>c(m.offsetWidth);p(),l.current=new ResizeObserver(p),l.current.observe(m);},[o]);return ot.useEffect(()=>()=>l.current?.disconnect(),[]),!s&&!t&&!r?null:jsxRuntime.jsxs(Eh.Provider,{value:d,children:[jsxRuntime.jsx("style",{children:ON}),jsxRuntime.jsx("div",{className:"chart-header-container shrink-0",style:{marginLeft:n,marginRight:a},children:jsxRuntime.jsxs("div",{ref:u,"data-chart-header":"",...s?{}:{"data-chart-header-untitled":""},className:"chart-header pb-4",children:[s?jsxRuntime.jsx("h3",{className:"chart-header__title truncate text-sm font-medium text-text-primary",children:e}):jsxRuntime.jsx("span",{className:"chart-header__title"}),t?jsxRuntime.jsx("div",{"data-chart-header-controls":"",className:"chart-header__controls",children:t}):null,r?jsxRuntime.jsx("div",{"data-chart-header-actions":"",className:"chart-header__actions flex shrink-0 items-center gap-1",children:r}):null]})})]})}var q=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:n=false,flex:a=false,stack:i,responsive:s,delay:d=0,adjustAnimationSpeedBasedOnWidth:c=false,ariaLabel:l,className:u,"data-testid":m})=>{let[p,g]=ot.useState(d===0);if(ot.useEffect(()=>{if(d>0){let w=setTimeout(()=>g(true),d);return ()=>clearTimeout(w)}},[d]),!p)return null;let f=n?"bg-gradient-to-r from-[var(--color-skeleton-base)] via-[var(--color-skeleton-highlight)] to-[var(--color-skeleton-base)]":"bg-[var(--color-skeleton-base)]",h=c&&e?(()=>{let w=typeof e=="number"?e:parseFloat(String(e));return isNaN(w)?"":`animation-duration-[${Math.max(.8,w/100)}s]`})():"",b=o==="pulse"?`animate-pulse ${h}`:o==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--color-skeleton-wave)] before:to-transparent before:animate-wave ${h}`:"",v="rounded-sm";r==="circle"&&(v="rounded-full"),r==="text"&&(v="h-4 w-full rounded-sm");let x=a?"flex-1 min-w-0":"",C=s?Object.entries(s).map(([w,S])=>`${w}:w-[${S}]`).join(" "):"";return i?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":m,children:i.map((w,S)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,b,v,x,C,u),style:{width:w,height:t}},S))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,b,v,x,C,u),style:{width:e,height:t},role:"presentation","aria-hidden":!l,"aria-label":l??void 0,"data-testid":m})},Ih=({count:e=1,children:t,className:r,"data-testid":o})=>jsxRuntime.jsx("div",{className:r,"data-testid":o,children:Array.from({length:e}).map((n,a)=>jsxRuntime.jsx("div",{children:t},a))});var GN={outlined:"bg-background-surface border border-border-default",elevated:"bg-background-surface border-0 shadow-md",filled:"bg-background-muted border-0",ghost:"bg-transparent border-0 shadow-none"},WN="rounded-lg",bp={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},UN={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function Fh(e){return ot__namespace.default.Children.toArray(e).some(t=>ot__namespace.default.isValidElement(t)?t.type===ot__namespace.default.Fragment?Fh(t.props.children):t.type===Gl&&!!t.props.title:false)}function at({variant:e="outlined",className:t,children:r,isLoading:o=false,layout:n="default"}){let a=Fh(r)?jsxRuntime.jsx(Mn,{children:r}):r;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",GN[e],WN,n==="flex"&&"flex flex-col",t),"data-testid":"card",children:o?jsxRuntime.jsx(q,{width:"100%",height:"100%",className:"rounded-none"}):a})}function Gl({title:e,subtitle:t,actions:r,leading:o,className:n,isLoading:a=false}){return a?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx(q,{width:120,height:20}),jsxRuntime.jsx(q,{width:24,height:24})]}),t&&jsxRuntime.jsx(q,{width:200,height:16})]}):!e&&!t&&!r&&!o?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:o}),jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(vr,{tag:"h3",size:"sm",className:"text-text-primary",children:e}):e}),t&&jsxRuntime.jsx("div",{className:zt("bodySm","text-text-secondary"),children:t})]}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r})]})})}function xp({src:e,alt:t,aspectRatio:r="auto",className:o,children:n,isLoading:a=false}){return a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("bg-background-muted",bp[r],o),children:jsxRuntime.jsx(q,{width:"100%",height:"100%"})}):n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",bp[r],o),children:n}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",bp[r],o),children:jsxRuntime.jsx("img",{src:e,alt:t||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function yp({className:e,children:t,isLoading:r=false,fill:o=false,style:n}){let i=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return r?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(i,o&&"flex-1 flex flex-col min-h-0",e),style:n,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(q,{width:"100%",height:16}),jsxRuntime.jsx(q,{width:"80%",height:16}),jsxRuntime.jsx(q,{width:"60%",height:16})]})}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(i,"text-text-primary",o&&"flex-1 flex flex-col min-h-0",e),style:n,children:t}):null}function vp({className:e,children:t,align:r="end",isLoading:o=false}){return o?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("px-6 py-4 flex gap-2 justify-end",e),children:[jsxRuntime.jsx(q,{width:80,height:32}),jsxRuntime.jsx(q,{width:60,height:32})]}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 flex items-center gap-2",UN[r],e),children:t}):null}at.Header=Gl;at.Media=xp;at.Content=yp;at.Footer=vp;var So=class extends ot.Component{constructor(){super(...arguments);Qi(this,"state",{hasError:false});Qi(this,"handleRetry",()=>{this.setState({hasError:false,error:void 0}),typeof window<"u"&&window.location.reload();});}static getDerivedStateFromError(r){return {hasError:true,error:r}}componentDidCatch(r,o){console.error("Error Boundary caught an error:",r,o);}render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsxs(at,{children:[this.props.title&&jsxRuntime.jsx(at.Header,{title:this.props.title}),jsxRuntime.jsx(at.Content,{children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center gap-4","data-testid":"error-boundary",children:[jsxRuntime.jsx("p",{className:"text-feedback-error-text",children:this.state.error?.message||"Something went wrong"}),jsxRuntime.jsx("button",{className:"rounded bg-action-default px-4 py-2 text-[color:var(--color-action-default-text)] hover:bg-action-default-hover",onClick:this.handleRetry,children:"Retry"})]})})]}):this.props.children}};var JN=.3,jN=.5;function Lt({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,onClose:d,isDismissable:c=true,transparentOverlay:l=false,primaryAction:u,secondaryAction:m,footerContent:p,maxHeight:g="80vh",height:f,maxWidth:h="640px",contentPadding:b=true,showHandle:v=true,animationVariant:x="scale",className:C}){let[w,S]=ot.useState(false),[T,N]=ot.useState(0),[k,R]=ot.useState(false),L=kl(s),E=L?.height??null,B=L?.keyboardOffset??0,A=ot.useRef(null),H=ot.useRef(null),Y=ot.useRef(null),G=ot.useRef({isDragging:false,startY:0,startTime:0,pointerId:null});ot.useEffect(()=>{if(s){let z=setTimeout(()=>{S(true),setTimeout(()=>S(false),600);},400);return ()=>clearTimeout(z)}},[s]),ot.useEffect(()=>{s||(N(0),R(false),G.current={isDragging:false,startY:0,startTime:0,pointerId:null});},[s]),ot.useEffect(()=>{let z=H.current;if(!z||!s)return;let V=null,D=y=>{let M=y.target;M&&["INPUT","TEXTAREA","SELECT"].includes(M.tagName)&&(V&&clearTimeout(V),V=setTimeout(()=>{M.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return z.addEventListener("focusin",D),()=>{z.removeEventListener("focusin",D),V&&clearTimeout(V);}},[s]);let I=ot.useCallback(z=>{c&&(z.pointerType!=="touch"&&z.pointerType!=="pen"||(Y.current&&(clearTimeout(Y.current),Y.current=null),G.current={isDragging:true,startY:z.clientY,startTime:Date.now(),pointerId:z.pointerId},R(false),z.currentTarget.setPointerCapture(z.pointerId)));},[c]),F=ot.useCallback(z=>{let{isDragging:V,startY:D,pointerId:y}=G.current;if(!V||z.pointerId!==y)return;let M=z.clientY-D;N(Math.max(0,M));},[]),O=ot.useCallback(z=>{let{isDragging:V,startY:D,startTime:y,pointerId:M}=G.current;if(!V||z.pointerId!==M)return;let P=z.clientY-D,X=Date.now()-y,$=P/X;G.current={isDragging:false,startY:0,startTime:0,pointerId:null};let re=(A.current?.getBoundingClientRect().height??0)*JN;(P>re||$>jN&&P>50)&&c?(d?.(),N(0)):(R(true),N(0),Y.current=setTimeout(()=>{R(false),Y.current=null;},200));},[c,d]);if(!s)return null;let U=t||r,K=u||m||p;return jsxRuntime.jsx(So,{children:jsxRuntime.jsx(Kr,{isOpen:s,onOpenChange:z=>{z||d?.();},isDismissable:c,transparent:l,style:{paddingBottom:B>0?`${B}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center p-0 sm:p-4",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full max-w-full p-0 sm:p-2 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:c,children:jsxRuntime.jsx("div",{ref:A,className:tailwindMerge.twMerge("w-full",k&&"transition-transform duration-200"),style:{transform:T>0?`translateY(${T}px)`:void 0},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("relative flex w-full flex-col overflow-hidden","bg-background-surface","shadow-2xl shadow-black/30 dark:shadow-black/60","border-t border-x border-border-default/40","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0 focus:shadow-none","origin-bottom",x==="scale"?"animate-[tray-enter-scale_400ms_cubic-bezier(0.32,0.72,0,1)]":"animate-[tray-enter_400ms_cubic-bezier(0.32,0.72,0,1)]",x==="scale"?"data-[exiting]:animate-[tray-exit-scale_250ms_cubic-bezier(0.32,0,0.67,0)]":"data-[exiting]:animate-[tray-exit_250ms_cubic-bezier(0.32,0,0.67,0)]",C),style:{maxWidth:h,...f?{height:f}:{maxHeight:/\d/.test(g)?E!==null?`min(${g}, ${Math.max(E-8,0)}px, 100dvh)`:`min(${g}, 100dvh)`:g}},children:[v&&jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-8 z-10 flex justify-center items-start pt-2 touch-none cursor-grab active:cursor-grabbing",onPointerDown:I,onPointerMove:F,onPointerUp:O,onPointerCancel:O,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-1 w-12 rounded-full bg-border-muted transition-all duration-300","hover:bg-border-default hover:w-16",w&&"animate-[handle-wiggle_0.6s_ease-in-out]")})}),U&&(a?jsxRuntime.jsx(Cr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!d,hasBackArrow:true,onBack:i??(()=>{}),onClose:d||(()=>{})}):jsxRuntime.jsx(Cr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!d,onClose:d||(()=>{})})),jsxRuntime.jsx("div",{ref:H,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",b?"p-4":"p-0"),children:e}),K&&jsxRuntime.jsx(Pn,{primaryAction:u,secondaryAction:m,footerContent:p})]})})})})})}Lt.displayName="Tray";function pi({children:e,items:t,className:r,align:o="left",textAlign:n="left",size:a="md",onAction:i,header:s,footer:d,useMobileTray:c=true,popoverClassName:l}){let[u,m]=ot.useState(false),{isMobile:p}=Rr();if(c&&p){let f=ot__namespace.default.isValidElement(e)?ot__namespace.default.cloneElement(e,{onPress:()=>m(true)}):e,v=(x=>{if(typeof x=="string")return x;if(ot__namespace.default.isValidElement(x)){let C=x.props;if(typeof C.children=="string")return C.children;if(Array.isArray(C.children))return C.children.find(S=>typeof S=="string")||""}return ""})(e)||"Actions";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:r,children:f}),jsxRuntime.jsx(Lt,{isOpen:u,onClose:()=>m(false),title:v,contentPadding:false,headerContent:s,footerContent:d,children:jsxRuntime.jsx("div",{className:"flex flex-col",children:t.map(x=>{let C=x.href&&!x.disabled?"a":"button";return jsxRuntime.jsxs(C,{...x.href&&!x.disabled?{href:x.href}:{},...x.href&&!x.disabled&&x.openInNewTab?{target:"_blank",rel:"noreferrer"}:{},onClick:()=>{x.disabled||(x.onAction?x.onAction():i?.(x),m(false));},disabled:x.disabled,"data-testid":x.testId,className:tailwindMerge.twMerge("flex w-full items-center text-start transition-colors",!x.noPadding&&"px-6 py-3","border-b border-border-muted last:border-0",x.variant==="destructive"?"text-feedback-error-text hover:bg-feedback-error-background active:bg-feedback-error-background/80":"text-text-primary hover:bg-background-hover active:bg-background-hover/80",x.disabled&&"opacity-50 cursor-not-allowed"),children:[x.iconName&&jsxRuntime.jsx(W,{name:x.iconName,size:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsx("div",{className:"flex flex-1 flex-col",children:x.render?x.render():jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:x.subtitle?"font-medium":"",children:x.name}),x.subtitle&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:x.subtitle})]})})]},x.id)})})})]})}return jsxRuntime.jsx("div",{className:r,children:jsxRuntime.jsxs(reactAriaComponents.MenuTrigger,{children:[e,jsxRuntime.jsx(Et,{className:tailwindMerge.twMerge("w-fit min-w-[180px] overflow-auto rounded-[var(--control-border-radius)] border border-border-default","bg-background-surface shadow-lg","animate-in fade-in zoom-in-97","duration-200 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-97","data-[exiting]:duration-150 data-[exiting]:ease-in",o==="right"?"origin-top-right":"origin-top-left",l),placement:o==="right"?"bottom end":"bottom start",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex min-w-[180px] flex-col gap-1 py-1",l),children:[s?jsxRuntime.jsx("div",{className:"px-3 pb-2 pt-3",children:s}):null,jsxRuntime.jsx(reactAriaComponents.Menu,{className:"!outline-none",children:t.map(f=>jsxRuntime.jsx($N,{id:f.id,href:f.href,...f.href&&f.openInNewTab?{target:"_blank",rel:"noreferrer"}:{},onAction:()=>{f.onAction?f.onAction():i?.(f);},textAlign:n,size:a,iconName:f.iconName,isDisabled:f.disabled,variant:f.variant,subtitle:f.subtitle,render:f.render,noPadding:f.noPadding,"data-testid":f.testId,children:f.name},f.id))}),d?jsxRuntime.jsx("div",{className:"px-3 pb-3 pt-2",children:d}):null]})})]})})}function $N({textAlign:e="left",iconName:t,size:r="md",isDisabled:o,children:n,variant:a="default",subtitle:i,render:s,noPadding:d,...c}){let l={sm:"px-3 py-2 text-sm",md:i?"px-4 py-2.5 text-base":"px-4 py-2 text-base"},u="text-text-primary hover:bg-background-hover data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-primary data-[focus-visible]:ring-inset",m={primary:u,default:u,destructive:"text-feedback-error-text hover:bg-feedback-error-background data-[focused]:bg-feedback-error-background data-[focus-visible]:ring-2 data-[focus-visible]:ring-feedback-error-border data-[focus-visible]:ring-inset"};return s?jsxRuntime.jsx(reactAriaComponents.MenuItem,{...c,isDisabled:o,className:tailwindMerge.twMerge("group box-border flex w-full cursor-pointer items-center rounded-sm outline-none transition-colors",!d&&l[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:s()}):jsxRuntime.jsxs(reactAriaComponents.MenuItem,{...c,isDisabled:o,className:tailwindMerge.twMerge("group box-border flex w-full cursor-pointer items-center rounded-sm outline-none transition-colors",!d&&l[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:[t&&e==="left"&&jsxRuntime.jsx(W,{name:t,size:r==="sm"?16:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:i?"font-medium":"",children:n}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:i})]}),t&&e==="right"&&jsxRuntime.jsx(W,{name:t,size:r==="sm"?16:20,className:"ml-3 flex-shrink-0"})]})}var io=({className:e,size:t=24,color:r="text-action-brand"})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",r,e),style:{width:t,height:t},role:"status","aria-label":"loading",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Loading..."})});function so({state:e,message:t,className:r,customIndicator:o}){if(e!=="loading-more")return null;let n=jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-center gap-2 py-4","text-text-secondary",r),"aria-label":t||"Loading",children:[jsxRuntime.jsx(io,{size:20,color:"text-text-secondary"}),t&&jsxRuntime.jsx("span",{className:"text-sm","aria-hidden":"true",children:t})]});return o||n}function En({items:e,onLoadMore:t,hasMore:r,isLoading:o=false,loadingState:n,enableVirtualization:a,estimatedItemSize:i=50,overscan:s=5,scrollElement:d,loadMoreThreshold:c=100}){let l=ot.useRef(null),u=ot.useRef(null),m=ot.useRef(false),[p,g]=ot.useState(0);ot.useEffect(()=>{u.current&&(d||l.current)&&g(R=>R+1);},[d,e.length,r,o,n]);let f=n||(o?e.length===0?"loading":"loading-more":"idle"),h=f==="loading",b=f==="loading-more",v=a!==void 0?a:e.length>=100,x=reactVirtual.useVirtualizer({count:e.length,getScrollElement:()=>d||l.current,estimateSize:()=>i,overscan:s}),C=v?x:null,w=v?x.getVirtualItems():[],S=ot.useRef({hasMore:r,isInitialLoad:h,isLoadingMore:b,onLoadMore:t});S.current={hasMore:r,isInitialLoad:h,isLoadingMore:b,onLoadMore:t};let T=ot.useRef(null);ot.useEffect(()=>{let R=u.current,L=d||l.current;if(!R||!L)return;let E=()=>{let A=S.current;if(m.current||!A.hasMore||A.isInitialLoad||A.isLoadingMore||!A.onLoadMore)return;let H=u.current;if(!H?.isConnected)return;let Y=H.getBoundingClientRect(),G=L.getBoundingClientRect();Y.top>G.bottom+c||(m.current=true,Promise.resolve().then(()=>A.onLoadMore?.()).catch(I=>{console.error("Infinite-scroll load failed.",I);}).finally(()=>{m.current=false;}));},B=new IntersectionObserver(()=>E(),{root:L,rootMargin:`0px 0px ${c}px 0px`,threshold:0});return B.observe(R),L.addEventListener("scroll",E,{passive:true}),T.current=E,()=>{B.disconnect(),L.removeEventListener("scroll",E),T.current=null;}},[d,c,p]),ot.useEffect(()=>{b||h||T.current?.();},[h,b,e.length,r]);let N=ot.useCallback((R,L)=>{C?C.scrollToIndex(R,L):l.current&&l.current.children[R]?.scrollIntoView({behavior:"smooth",block:L?.align||"start"});},[C]),k=ot.useCallback(()=>{C?C.scrollToIndex(0,{align:"start"}):l.current&&l.current.scrollTo({top:0,behavior:"smooth"});},[C]);return {virtualizer:C,virtualItems:w,computedLoadingState:f,isInitialLoad:h,isLoadingMore:b,scrollRef:l,loadMoreRef:u,scrollToIndex:N,scrollToTop:k}}var mi=ot.createContext({variant:"timeline",size:"md"});function Kh(){return ot.useContext(mi)}function Yl(e){return ot.isValidElement(e)&&e.type===jl}function ck(e){return ot.isValidElement(e)&&e.type===Jl}function Pp({variant:e="timeline",size:t="md",className:r,children:o,items:n,renderItem:a,isLoading:i=false,loadingState:s,error:d=null,renderLoadingSkeleton:c,loadingSkeletonCount:l=5,emptyMessage:u="No activity found.",onLoadMore:m,hasMore:p=false,enableVirtualization:g,estimatedItemSize:f,loadingIndicator:h,height:b,maxHeight:v,...x}){let C=ot.useRef(null),{isMobile:w}=Rr(),S=w?"stacked":e,T=n!==void 0&&a!==void 0,{scrollRef:N,loadMoreRef:k,virtualizer:R,virtualItems:L,isLoadingMore:E,computedLoadingState:B}=En({items:n||[],onLoadMore:T?m:void 0,hasMore:T?p:false,isLoading:i,loadingState:s,enableVirtualization:T?g:false,estimatedItemSize:f||(S==="stacked"?120:150),overscan:5}),A=T&&N?N:C,H=ot.useMemo(()=>({variant:S,size:t}),[S,t]),Y=S==="timeline"?t==="sm"?"gap-4":"gap-6":"gap-0",G=S==="stacked"?"divide-y divide-border-subtle rounded-lg border border-border-subtle bg-background-surface":"",I={};if(T&&m&&(b?(I.height=typeof b=="number"?`${b}px`:b,I.overflowY="auto"):v?(I.maxHeight=typeof v=="number"?`${v}px`:v,I.overflowY="auto"):(I.height="600px",I.overflowY="auto")),T){let U=B==="loading"||i&&(!n||n.length===0);if(U){let z=c?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:l}).map((V,D)=>jsxRuntime.jsx("div",{children:c()},`skeleton-${D}`))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:l}).map((V,D)=>{let y=t==="sm"?"gap-2":"gap-3";if(S==="timeline"){let M=t==="sm"?"pt-3":"pt-4",P=t==="sm"?"p-3":"p-4";return jsxRuntime.jsxs("div",{className:"group relative grid items-start gap-4 grid-cols-[3rem_1fr]",children:[jsxRuntime.jsxs("div",{className:`relative flex h-full flex-col items-center ${M}`,children:[jsxRuntime.jsx(q,{width:32,height:32,variant:"circle"}),D<l-1&&jsxRuntime.jsx("span",{className:"absolute top-[2rem] left-1/2 w-0 border-l-2 border-dotted -translate-x-1/2 h-[calc(100%+2.5rem)] border-border-muted"})]}),jsxRuntime.jsxs("div",{className:`min-w-0 flex flex-col ${y} ${P} rounded-md border border-border-subtle bg-background-surface`,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx(q,{width:"50%",height:16}),jsxRuntime.jsx(q,{width:"15%",height:12})]}),jsxRuntime.jsx(q,{width:"85%",height:t==="sm"?14:15}),jsxRuntime.jsx(q,{width:"70%",height:t==="sm"?14:15})]})]},`skeleton-${D}`)}else return jsxRuntime.jsxs("div",{className:`flex flex-col ${t==="sm"?"px-3 py-3":"px-4 py-4"}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(q,{width:24,height:24,variant:"circle"}),jsxRuntime.jsx(q,{width:"50%",height:16})]}),jsxRuntime.jsxs("div",{className:`mt-3 flex flex-col ${y}`,children:[jsxRuntime.jsx(q,{width:"85%",height:t==="sm"?14:15}),jsxRuntime.jsx(q,{width:"70%",height:t==="sm"?14:15}),jsxRuntime.jsx(q,{width:"20%",height:12})]})]},`skeleton-${D}`)})});return jsxRuntime.jsx(mi.Provider,{value:H,children:jsxRuntime.jsx("div",{ref:A,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",Y,G,r),style:I,...x,children:z})})}if(d)return jsxRuntime.jsx(mi.Provider,{value:H,children:jsxRuntime.jsx("div",{ref:A,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",Y,G,r),style:I,...x,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:d})})});if(!n||n.length===0)return jsxRuntime.jsx(mi.Provider,{value:H,children:jsxRuntime.jsx("div",{ref:A,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",Y,G,r),style:I,...x,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:u})})});let K=R?L?.map(z=>({virtualItem:z,item:n[z.index],index:z.index}))||[]:n.map((z,V)=>({item:z,index:V,virtualItem:null}));return jsxRuntime.jsx(mi.Provider,{value:H,children:jsxRuntime.jsxs("div",{ref:A,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",Y,G,r),style:{...I,position:R?"relative":void 0},...x,children:[R?jsxRuntime.jsxs("div",{style:{height:`${R.getTotalSize()}px`,position:"relative"},children:[K.map(({item:z,index:V,virtualItem:D})=>{if(!z||!D)return null;let y=a(z,V),M=S==="timeline"&&ot.isValidElement(y)&&Yl(y)?ot.cloneElement(y,{showConnector:V!==n.length-1}):y;return jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${D.start}px)`},"data-index":D.index,ref:R.measureElement,children:M},`item-${V}`)}),E&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${R.getTotalSize()}px`,left:0,width:"100%"},children:h||jsxRuntime.jsx(so,{state:"loading-more"})})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[K.map(({item:z,index:V})=>{let D=a(z,V);if(S==="timeline"&&ot.isValidElement(D)&&Yl(D)){let y=V===n.length-1;return jsxRuntime.jsx("div",{children:ot.cloneElement(D,{showConnector:!y})},`item-${V}`)}return jsxRuntime.jsx("div",{children:D},`item-${V}`)}),E&&(h||jsxRuntime.jsx(so,{state:"loading-more"}))]}),m&&p&&!U&&jsxRuntime.jsx("div",{ref:k,style:R?{position:"absolute",top:`${R.getTotalSize()}px`,left:0,width:"100%",height:1}:{height:1,width:"100%"}})]})})}let F=ot.Children.toArray(o),O=F.map((U,K)=>{if(Yl(U)){let z=U.props.showConnector??(S==="timeline"&&K<F.length-1),V=S==="timeline"&&K>0;return ot.cloneElement(U,{showConnector:z,showIncomingConnector:V})}if(ck(U)){let z=K===F.length-1;return ot.cloneElement(U,{__isLastGroup:z,__isFirstGroup:K===0})}return U});return jsxRuntime.jsx(mi.Provider,{value:H,children:jsxRuntime.jsx("div",{"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",Y,G,r),...x,children:O})})}Pp.displayName="ActivityFeed";function Jl(e){let{variant:t,size:r}=Kh(),{title:o,description:n,actions:a,children:i,className:s,__isLastGroup:d=false,__isFirstGroup:c=false,...l}=e,u=ot.Children.toArray(i),m=u.map((f,h)=>{if(Yl(f)){let b=f.props.showConnector??(t==="timeline"&&!(d&&h===u.length-1));return ot.cloneElement(f,{showConnector:b,showIncomingConnector:t==="timeline"&&!(c&&h===0)})}return f}),p=t==="timeline"?"pl-[3rem]":r==="sm"?"px-3":"px-4",g=r==="sm"?"gap-3":"gap-4";return jsxRuntime.jsxs("section",{"data-slot":"group",className:tailwindMerge.twMerge("flex flex-col",s),...l,children:[(o||n||a)&&jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("mb-2 flex flex-wrap items-end justify-between gap-2",p),children:[jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[o&&jsxRuntime.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-secondary",children:o}),n&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:n})]}),a&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center gap-2",children:a})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex flex-col",g),children:m})]})}Jl.displayName="ActivityFeedGroup";var Wh={neutral:"bg-background-muted text-text-secondary border-border-muted",brand:"bg-background-muted text-action-brand border-action-brand/30",success:"bg-background-muted text-feedback-success-text border-feedback-success-border/40",warning:"bg-background-muted text-feedback-warning-text border-feedback-warning-border/40",danger:"bg-background-muted text-feedback-error-text border-feedback-error-border/40",info:"bg-background-muted text-feedback-info-text border-feedback-info-border/40"},dk={neutral:"bg-background-subtle",brand:"bg-action-brand/5",success:"bg-feedback-success-background",warning:"bg-feedback-warning-background",danger:"bg-feedback-error-background",info:"bg-feedback-info-background"},uk={neutral:"border-border-muted",brand:"border-action-brand",success:"border-feedback-success-border",warning:"border-feedback-warning-border",danger:"border-feedback-error-border",info:"border-feedback-info-border"};function jl(e){let{variant:t,size:r}=Kh(),{title:o,description:n,timestamp:a,meta:i,media:s,actions:d,visual:c,icon:l,iconWeight:u,tone:m="neutral",surface:p,isHighlighted:g=false,showConnector:f=true,hideIndicator:h=false,interactive:b,className:v,children:x,onKeyDown:C,showIncomingConnector:w,...S}=e,T=c??(l?jsxRuntime.jsx(W,{name:l,weight:u||"fill",className:"h-4 w-4"}):null),N=p??(t==="stacked"?"minimal":"subtle"),k=r==="sm"?"gap-2":"gap-3",R="text-xs text-text-secondary",L=r==="sm"?"text-sm":"text-[15px]",E="text-xs text-text-secondary",B=b??typeof S.onClick=="function",A=K=>{if(!B){C?.(K);return}K.key===" "?K.preventDefault():K.key==="Enter"&&(K.preventDefault(),K.currentTarget.click()),C?.(K);},H=K=>{B&&K.key===" "&&(K.preventDefault(),K.currentTarget.click());},Y=B?tailwindMerge.twMerge("group cursor-pointer",pt()):void 0,I=jsxRuntime.jsxs("div",{"data-slot":"connector",className:tailwindMerge.twMerge("relative flex h-full flex-col items-center",N==="minimal"?r==="sm"?"pt-2":"pt-3":r==="sm"?"pt-3":"pt-4"),children:[jsxRuntime.jsx("span",{"data-slot":"indicator",className:tailwindMerge.twMerge("relative z-10 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full border text-sm font-medium shadow-sm ring-2 ring-background-surface",Wh[m]),children:T}),t==="timeline"&&f&&jsxRuntime.jsx("span",{"data-slot":"separator",className:"absolute top-[2rem] left-1/2 w-0 border-l-2 border-dotted -translate-x-1/2 h-[calc(100%+2.5rem)] border-border-muted"})]}),F=g?tailwindMerge.twMerge(dk[m],N==="minimal"?"rounded-md border border-border-muted":uk[m]):"";if(t==="stacked")return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"stacked",role:B?"button":void 0,tabIndex:B?0:void 0,className:tailwindMerge.twMerge("flex flex-col",r==="sm"?"px-3 py-3":"px-4 py-4",{minimal:"",subtle:"bg-background-subtle",solid:"bg-background-muted"}[N],F,Y,B?"transition-colors hover:bg-background-subtle/80":"",v),onKeyDown:A,onKeyUp:H,...S,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[!h&&jsxRuntime.jsx("span",{"data-slot":"indicator",className:tailwindMerge.twMerge("flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-full border text-sm font-medium shadow-sm ring-2 ring-background-surface",Wh[m]),children:T}),jsxRuntime.jsx("div",{"data-slot":"title",className:"min-w-0 flex-1 text-sm font-semibold text-text-primary",children:o})]}),jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("mt-3 flex flex-col",k),children:[n&&jsxRuntime.jsx("div",{"data-slot":"description",className:tailwindMerge.twMerge("text-text-secondary",L),children:n}),i&&jsxRuntime.jsx("div",{className:E,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),x,d&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:d}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("-mt-1.5",R),children:a})]})]});let O=N==="minimal"?r==="sm"?"py-2":"py-3":r==="sm"?"p-3":"p-4",U={minimal:"",subtle:"rounded-md border border-border-subtle bg-background-surface",solid:"rounded-md bg-background-muted shadow-sm"};return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"timeline",role:B?"button":void 0,tabIndex:B?0:void 0,className:tailwindMerge.twMerge("group relative grid items-start gap-4 grid-cols-[3rem_1fr]",Y,v),onKeyDown:A,onKeyUp:H,...S,children:[h?jsxRuntime.jsx("div",{}):I,jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("min-w-0 flex flex-col",k,O,U[N],F,B?"transition-colors group-hover:bg-background-subtle/70":""),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{"data-slot":"title",className:"min-w-0 flex-1 text-sm font-semibold text-text-primary",children:o}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0",R),children:a})]}),n&&jsxRuntime.jsx("div",{"data-slot":"description",className:tailwindMerge.twMerge("text-text-secondary",L),children:n}),i&&jsxRuntime.jsx("div",{className:E,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),x,d&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:d})]})]})}jl.displayName="ActivityItem";function Lr({isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n="left",hideCloseIcon:a=false,hasBackArrow:i=false,onBack:s,children:d,primaryAction:c,secondaryAction:l,tertiaryAction:u,footerContent:m,transparentOverlay:p=false,maxWidth:g="600px",minWidth:f="400px",maxHeight:h="85vh",height:b,mobileMaxHeight:v="90vh",mobileHeight:x,contentPadding:C=true,className:w}){let S=Pr("(max-width: 767px)"),T=kl(S&&e===void 0),N=T?.height??null,k=T?.keyboardOffset??0,R=ot.useRef(null),L=ot.useCallback(()=>{R.current&&R.current.scrollTop!==0&&(R.current.scrollTop=0);},[]),E=ot.useRef(null),B=ot.useRef(null);ot.useEffect(()=>{let I=B.current;if(!I||!S)return;let F=null,O=U=>{let K=U.target;K&&["INPUT","TEXTAREA","SELECT"].includes(K.tagName)&&(F&&clearTimeout(F),F=setTimeout(()=>{K.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return I.addEventListener("focusin",O),()=>{I.removeEventListener("focusin",O),F&&clearTimeout(F);}},[S]);let A=ot.useCallback(()=>{E.current&&E.current.scrollTop!==0&&(E.current.scrollTop=0);},[]);if(e===false)return null;let H=r||o,Y=c||l||u||m,G=e!==void 0;return S?G?jsxRuntime.jsx(Lt,{isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n,hideCloseIcon:a,hasBackArrow:i,onBack:s,primaryAction:c,secondaryAction:l,footerContent:m,transparentOverlay:p,maxHeight:v,height:x,maxWidth:g,contentPadding:C,showHandle:true,animationVariant:"scale",className:w,children:d}):jsxRuntime.jsx(So,{children:jsxRuntime.jsx(Kr,{isDismissable:true,transparent:p,style:{paddingBottom:k>0?`${k}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-0 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:R,onScroll:L,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border-t border-x border-border-default/40","rounded-t-xl","overflow-hidden","animate-in slide-in-from-bottom","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:slide-out-to-bottom","data-[exiting]:duration-200 data-[exiting]:ease-in",w),style:{...x?{height:x}:{maxHeight:/\d/.test(v)?N!==null?`min(${v}, ${Math.max(N-8,0)}px, 100dvh)`:`min(${v}, 100dvh)`:v}},children:[jsxRuntime.jsx("div",{className:"flex justify-center pt-2",children:jsxRuntime.jsx("div",{className:"h-1.5 w-12 rounded-full bg-border-muted"})}),H&&(i?jsxRuntime.jsx(Cr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(Cr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{ref:B,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",C?"px-6 py-6":"p-0"),children:d}),Y&&jsxRuntime.jsx(Pn,{primaryAction:c,secondaryAction:l,tertiaryAction:u,footerContent:m})]})})})}):jsxRuntime.jsx(So,{children:jsxRuntime.jsx(Kr,{...G?{isOpen:e,onOpenChange:I=>{!I&&t&&t();}}:{},isDismissable:true,transparent:p,className:"flex items-center justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",style:{maxWidth:g},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:E,onScroll:A,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border border-border-default/50","rounded-md","overflow-hidden","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0","animate-in fade-in zoom-in-96 slide-in-from-bottom-2","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-95","data-[exiting]:duration-200 data-[exiting]:ease-in",w),style:{minWidth:f,...b?{height:b}:{maxHeight:h}},children:[H&&(i?jsxRuntime.jsx(Cr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(Cr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto",C?"px-6 py-6":"p-0"),children:d}),Y&&jsxRuntime.jsx(Pn,{primaryAction:c,secondaryAction:l,tertiaryAction:u,footerContent:m})]})})})})}function Zh({isOpen:e,onClose:t,title:r,message:o,confirmLabel:n="OK",confirmVariant:a="primary",maxWidth:i="400px",minWidth:s="320px"}){return jsxRuntime.jsx(Lr,{isOpen:e,onClose:t,title:r,maxWidth:i,minWidth:s,primaryAction:{label:n,onPress:t,variant:a},children:jsxRuntime.jsx("div",{className:"text-text-primary",children:o})})}var Ln={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},Jr=ot.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=Io[e]??mk__namespace[e];if(!s)return null;let d=typeof t=="string"?t in Ln?Ln[t]:Ln.md:t,c=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:d,color:r,weight:o,className:c,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});Jr.displayName="IconSSR";var fk=ot.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:d,ariaLabel:c,ref:l,...u})=>{let m=typeof n=="string"?n in Ln?Ln[n]:Ln.md:n,p=r?typeof r=="string"?r in Ln?Ln[r]:m*1.75:r:m*1.75,g=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",o);return jsxRuntime.jsx("div",{className:g,style:{width:p,height:p},children:jsxRuntime.jsx(Jr,{...u,name:i,size:n,color:s,weight:d,className:a,ariaLabel:c})})});fk.displayName="IconSSRWithContainer";var fi=({className:e,showWordmark:t=true,width:r,fill:o})=>{let n,a;if(o?o.startsWith("fill-")?a=o:n=o:e?a=e:n="var(--color-text-primary)",t){let d=r||270,c=d/270*80;return jsxRuntime.jsxs("svg",{width:d,height:c,viewBox:"0 0 270 80",xmlns:"http://www.w3.org/2000/svg",className:a,style:n?{fill:n}:void 0,children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_796_283)",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"}),jsxRuntime.jsx("path",{d:"M269.838 49.4457H249.005C249.266 51.801 250.162 53.6985 251.695 55.1377C253.225 56.577 255.134 57.2967 257.416 57.2967C259.307 57.2967 260.887 56.8715 262.159 56.021C263.463 55.1377 264.408 53.9927 264.996 52.5862H269.251C268.502 54.9415 267.084 56.937 264.996 58.5725C262.943 60.208 260.414 61.026 257.416 61.026C255.069 61.026 252.917 60.4697 250.961 59.3575C249.037 58.2127 247.504 56.6587 246.363 54.696C245.255 52.7332 244.7 50.558 244.7 48.17C244.7 45.782 245.255 43.6067 246.363 41.644C247.504 39.6812 249.037 38.1437 250.961 37.0315C252.917 35.8867 255.069 35.3142 257.416 35.3142C259.73 35.3142 261.833 35.8702 263.724 36.9825C265.615 38.0947 267.098 39.6485 268.176 41.644C269.283 43.6395 269.838 45.913 269.838 48.4645V49.4457ZM257.416 39.0432C255.263 39.0432 253.439 39.6812 251.939 40.957C250.47 42.2327 249.542 43.9337 249.152 46.06H265.583C265.192 43.9992 264.262 42.3145 262.796 41.006C261.36 39.6975 259.568 39.0432 257.416 39.0432Z"}),jsxRuntime.jsx("path",{d:"M228.356 60.5352V35.8049H232.219V39.7794H232.464C233.05 38.5689 233.963 37.5712 235.202 36.7862C236.474 35.9684 237.974 35.5594 239.701 35.5594H243.125V39.4359H239.701C237.517 39.4359 235.757 40.1554 234.42 41.5949C233.083 43.0342 232.414 44.9152 232.414 47.2377V60.5352H228.356Z"}),jsxRuntime.jsx("path",{d:"M208.607 61.0259C205.64 61.0259 203.326 60.1262 201.663 58.3272C200 56.4952 199.169 53.8947 199.169 50.5252V35.8047H203.228V49.8874C203.228 52.2427 203.766 54.0744 204.842 55.3829C205.95 56.6587 207.532 57.2967 209.586 57.2967C211.02 57.2967 212.308 56.9694 213.449 56.3152C214.623 55.6284 215.536 54.6959 216.188 53.5184C216.84 52.3407 217.166 50.9997 217.166 49.4949V35.8047H221.225V60.5352H217.313V56.5607H217.068C216.286 57.9019 215.161 58.9814 213.694 59.7992C212.226 60.6169 210.531 61.0259 208.607 61.0259Z"}),jsxRuntime.jsx("path",{d:"M186.736 39.534V56.806H194.756V60.5352H182.677V39.534H177.199V35.8047H182.677V29.5732H186.736V35.8047H193.24V39.534H186.736Z"}),jsxRuntime.jsx("path",{d:"M156.585 60.5352H151.988L158.394 48.0227L152.33 35.8047H156.976L162.062 46.0599H165.388L170.474 35.8047H175.022L168.958 48.0227L175.365 60.5352H170.67L165.29 49.7892H162.013L156.585 60.5352Z"}),jsxRuntime.jsx("path",{d:"M150.138 49.1315H129.304C129.565 51.4867 130.461 53.3842 131.994 54.8235C133.526 56.2627 135.433 56.9825 137.715 56.9825C139.606 56.9825 141.188 56.5572 142.459 55.7067C143.763 54.8235 144.709 53.6785 145.296 52.272H149.551C148.801 54.6272 147.382 56.6227 145.296 58.2582C143.242 59.8937 140.715 60.7118 137.715 60.7118C135.368 60.7118 133.216 60.1555 131.26 59.0432C129.336 57.8985 127.804 56.3445 126.663 54.3817C125.554 52.419 125 50.2437 125 47.8557C125 45.4677 125.554 43.2925 126.663 41.3298C127.804 39.367 129.336 37.8295 131.26 36.7173C133.216 35.5725 135.368 35 137.715 35C140.03 35 142.133 35.556 144.024 36.6682C145.915 37.7805 147.399 39.3342 148.475 41.3298C149.583 43.3252 150.138 45.5987 150.138 48.1502V49.1315ZM137.715 38.729C135.564 38.729 133.738 39.367 132.238 40.6427C130.771 41.9185 129.842 43.6195 129.45 45.7458H145.883C145.491 43.685 144.562 42.0002 143.095 40.6917C141.661 39.3832 139.867 38.729 137.715 38.729Z"}),jsxRuntime.jsx("path",{d:"M116.961 60.5353H112.559V30.4072H101.164V26.1875H128.307V30.4072H116.961V60.5353Z"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_796_283",children:jsxRuntime.jsx("rect",{width:"270",height:"80",fill:"white"})})})]})}let i=r||80;return jsxRuntime.jsxs("svg",{width:i,height:i,viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg",className:a,style:n?{fill:n}:void 0,children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"})]})};var Zl=({topItems:e=[],bottomItems:t=[],bottomContent:r,logo:o,showLogo:n=true,linkComponent:a="a",className:i="",mobileMenuId:s="app-mobile-menu",sidebarCollapseId:d="app-sidebar-collapse"})=>{let c=p=>p.length>0&&"items"in p[0],l=p=>c(p)?p:[{id:"default-section",items:p}],u=(p,g,f)=>jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[p.title&&jsxRuntime.jsx("div",{className:"px-6 py-1 text-xs font-medium text-text-secondary uppercase tracking-wider",children:p.title}),jsxRuntime.jsx("div",{className:"space-y-0.5",children:p.items.map(h=>m(h))}),g<f-1&&jsxRuntime.jsx("div",{className:"border-b border-border-subtle mx-6 my-2"})]},p.id),m=(p,g=false)=>{if(p.children&&p.children.length>0){let b=`category-${p.id}`;return jsxRuntime.jsxs("div",{className:"group/category",children:[jsxRuntime.jsx("input",{type:"checkbox",id:b,className:"peer/category hidden",defaultChecked:p.isExpanded,"aria-hidden":"true"}),jsxRuntime.jsxs("label",{htmlFor:b,className:"flex items-center gap-3 px-6 py-1 text-text-primary hover:bg-background-hover hover:text-text-primary cursor-pointer transition-all duration-200",children:[p.icon&&jsxRuntime.jsx("span",{className:"flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-all duration-200",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200",children:p.label}),jsxRuntime.jsx("span",{className:"flex-1"}),jsxRuntime.jsx("svg",{className:"w-4 h-4 transform transition-transform duration-200 peer-checked/category:rotate-180 ml-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),jsxRuntime.jsx("div",{className:"hidden peer-checked/category:block bg-background-subtle border-l-2 border-border-subtle ml-6",children:p.children.map(v=>m(v,true))})]},p.id)}let f={href:p.href||"#",className:`flex items-center gap-3 transition-all duration-200 hover:bg-background-hover ${g?"pl-8 pr-6 py-1 text-sm":"px-6 py-1"} ${p.isActive?`bg-action-brand/10 text-action-brand ${g?"":"border-l-2 border-action-brand"}`:"text-text-primary hover:text-text-primary"}`,"aria-current":p.isActive?"page":void 0},h=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p.icon&&!g&&jsxRuntime.jsx("span",{className:"flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-all duration-200",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200",children:p.label})]});return a==="a"?jsxRuntime.jsx("a",{...f,children:h},p.id):jsxRuntime.jsx(a,{...f,children:h},p.id)};return jsxRuntime.jsxs("div",{className:`flex flex-col h-full ${i}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between h-[60px] px-6 border-b border-border-default",children:[n&&jsxRuntime.jsx("div",{className:"relative top-[-1px] transition-all duration-200",children:o||jsxRuntime.jsx(fi,{showWordmark:true,width:120})}),jsxRuntime.jsx("label",{htmlFor:d,className:"hidden md:flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-all duration-200 relative top-[-1px]","aria-label":"Collapse sidebar",children:jsxRuntime.jsx(Jr,{name:"Sidebar",size:"sm"})}),jsxRuntime.jsx("label",{htmlFor:s,className:"md:hidden flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-colors","aria-label":"Close menu",children:jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),jsxRuntime.jsxs("nav",{className:"flex-1 flex flex-col overflow-hidden",children:[e&&e.length>0&&jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto py-2 scrollbar-hide",children:l(e).map((p,g,f)=>u(p,g,f.length))}),t&&t.length>0&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t bg-background-muted/30",children:jsxRuntime.jsx("div",{className:"mt-2 pb-2 space-y-0.5",children:t.map(p=>m(p))})}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t border-border-default",children:jsxRuntime.jsx("div",{children:r})})]})]})};function ca(e){return e.id??e.href??e.label}function Lp(e,t,r=[]){for(let o of e){if(o.href===t||o.id===t)return o.children?.length&&o.pushOnSelect!==false?[...r,ca(o)]:r;if(o.children?.length){let n=Lp(o.children,t,[...r,ca(o)]);if(n)return n}}return null}function ob(e,t){let r=[],o=e;for(let n of t){let a=o.find(i=>ca(i)===n);if(!a)break;r.push(a),o=a.children??[];}return r}function hk(e,t,r){let o=t.length>0?[...e,...t]:e,n=[{path:[],items:e,bottomItems:t.length>0?t:void 0}],a=ob(o,r),i=[];for(let s of a){if(!s.children?.length)break;i=[...i,ca(s)],n.push({path:i,parent:s,items:s.children});}return n}var bk=({href:e,...t})=>jsxRuntime.jsx("a",{href:e,...t}),$h=[];function xk(e){let t=[];for(let r of e){let o=r.items??[];o.length!==0&&(t.length>0&&t.push({id:`__divider__${r.id}`,label:"",divider:true}),r.title&&t.push({id:`__group__${r.id}`,label:r.title,groupLabel:true}),t.push(...o));}return t}function yk(e,t){if(process.env.NODE_ENV==="production"||t.length===0)return;let r=new Map;for(let o of e)o.id&&r.set(o.id,"id"),o.href&&!r.has(o.href)&&r.set(o.href,"href");for(let o of t){let n=null;o.id&&r.has(o.id)?n=r.get(o.id)==="id"?`id "${o.id}"`:`id "${o.id}" (matches an items \`href\`)`:o.href&&r.has(o.href)&&(n=r.get(o.href)==="href"?`href "${o.href}"`:`href "${o.href}" (matches an items \`id\`)`),n&&console.warn(`[StackNav] L1 ${n} appears in both \`items\` and \`bottomItems\`. Stack tokens and value lookups will resolve to the \`items\` entry, making the bottomItems entry unreachable. L1 ids and hrefs must be unique across both arrays.`);}}function vk(e){if(!e)return {};let t={};return e.background!==void 0&&(t["--edges-stack-nav-background"]=e.background),e.activeBackground!==void 0&&(t["--edges-stack-nav-row-active-background"]=e.activeBackground),e.activeColor!==void 0&&(t["--edges-stack-nav-row-active-color"]=e.activeColor),e.hoverBackground!==void 0&&(t["--edges-stack-nav-row-hover-background"]=e.hoverBackground),e.borderColor!==void 0&&(t["--edges-stack-nav-border-color"]=e.borderColor),t}function gi({items:e,groups:t,bottomItems:r,value:o,defaultStack:n,stack:a,onStackChange:i,onSelect:s,linkComponent:d=bk,renderRow:c,showLogo:l=false,logo:u,header:m,footer:p,mobileMenuId:g,sidebarCollapseId:f,rootLabel:h,sticky:b=true,width:v=260,ariaLabel:x="Navigation",theme:C,animated:w=true,style:S,className:T}){process.env.NODE_ENV!=="production"&&t&&e&&console.warn("[StackNav] Both `items` and `groups` were provided. `groups` takes precedence and `items` is ignored.");let N=ot__namespace.useMemo(()=>t?xk(t):e??$h,[t,e]),k=r??$h,R=ot__namespace.useMemo(()=>k.length>0?[...N,...k]:N,[N,k]);ot__namespace.useEffect(()=>{yk(N,k);},[N,k]);let[L,E]=ot__namespace.useState(()=>a!==void 0?a:n!==void 0?n:o?Lp(R,o)??[]:[]),B=a??L,A=ot__namespace.useCallback(V=>{a===void 0&&E(V),i?.(V);},[a,i]),H=ot__namespace.useRef(false);ot__namespace.useEffect(()=>{if(a!==void 0||!H.current&&(H.current=true,n!==void 0)||!o)return;let V=Lp(R,o);E(D=>{let y=V??[];return wk(D,y)?D:y});},[o,R,a,n]);let Y=ot__namespace.useMemo(()=>hk(N,k,B),[N,k,B]),G=ot__namespace.useCallback((V,D)=>{V.children?.length&&A([...D,ca(V)]);},[A]),I=ot__namespace.useCallback(()=>{A(B.slice(0,-1));},[B,A]),F=ot__namespace.useCallback((V,D)=>{let y=ob(R,B);if(s?.(D,y),!!D.children?.length&&!(D.href&&D.pushOnSelect===false)){let P=Y[Y.length-1]?.path??[];G(D,P);}D.href||V.preventDefault();},[R,B,s,G,Y]),O=ot__namespace.useCallback(V=>{let D=Y[Y.length-1]?.path??[];G(V,D);},[G,Y]),U=ot__namespace.useCallback(V=>o?V.href===o||V.id===o:false,[o]),K=b?"sticky top-0 h-[100dvh]":"",z={...v!=null?{width:v}:{},...vk(C),...S};return jsxRuntime.jsxs("aside",{role:"navigation","aria-label":x,"data-edges-stack-nav":"",className:tailwindMerge.twMerge("edges-stack-nav flex flex-col flex-shrink-0 overflow-hidden",w&&"edges-stack-nav--animated",K,T),style:z,children:[l?jsxRuntime.jsxs("div",{className:"edges-stack-nav__logo",children:[jsxRuntime.jsx("div",{className:"relative top-[-1px]",children:u??jsxRuntime.jsx(fi,{showWordmark:true,width:120})}),f?jsxRuntime.jsx("label",{htmlFor:f,className:"hidden md:flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-all duration-200 relative top-[-1px]","aria-label":"Collapse sidebar",children:jsxRuntime.jsx(Jr,{name:"Sidebar",size:"sm"})}):null,g?jsxRuntime.jsx("label",{htmlFor:g,className:"md:hidden flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-colors","aria-label":"Close menu",children:jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}):null]}):null,m?jsxRuntime.jsx("div",{className:"edges-stack-nav__header",children:m}):null,jsxRuntime.jsx("div",{className:"relative flex-1 overflow-hidden",children:Y.map((V,D)=>{let y=V.path.length,M=D===Y.length-1,P=D<Y.length-1,X=y===0?"__root__":V.path.join("/");return jsxRuntime.jsx(Ck,{pane:V,parentPath:V.path.slice(0,-1),depth:y,isTop:M,isAbove:P,rootLabel:h,LinkComponent:d,renderRow:c,isActive:U,onSelect:F,onDrillIn:O,onBack:I,animated:w},X)})}),p?jsxRuntime.jsx("div",{className:"edges-stack-nav__footer",children:p}):null]})}function Ck({pane:e,depth:t,isTop:r,isAbove:o,rootLabel:n,LinkComponent:a,renderRow:i,isActive:s,onSelect:d,onDrillIn:c,onBack:l,animated:u}){let m=r?"edges-stack-nav__pane--top":o?"edges-stack-nav__pane--above":"edges-stack-nav__pane--below";return jsxRuntime.jsxs("nav",{"aria-label":e.parent?.label??n??"Navigation","aria-hidden":r?void 0:true,inert:r?void 0:true,className:tailwindMerge.twMerge("edges-stack-nav__pane absolute inset-0 flex flex-col gap-px overflow-y-auto px-2 py-3",!u&&"edges-stack-nav__pane--instant",m),children:[t>0&&e.parent?jsxRuntime.jsxs("button",{type:"button",className:"edges-stack-nav__back edges-stack-nav__row flex w-full cursor-pointer items-center gap-2 rounded-sm border-0 bg-transparent px-3 py-2 mb-2 text-left text-sm font-semibold text-text-primary",onClick:l,"aria-label":`Back from ${e.parent.label}`,children:[jsxRuntime.jsx(Sk,{}),jsxRuntime.jsx("span",{children:e.parent.label})]}):n?jsxRuntime.jsx("div",{className:"px-3 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-text-secondary",children:n}):null,e.items.map(p=>jsxRuntime.jsx(eb,{item:p,LinkComponent:a,renderRow:i,isActive:s(p),onSelect:d,onDrillIn:c},ca(p))),e.bottomItems&&e.bottomItems.length>0?jsxRuntime.jsx("div",{className:"edges-stack-nav__bottom-items mt-auto flex flex-col gap-px pt-3",children:e.bottomItems.map(p=>jsxRuntime.jsx(eb,{item:p,LinkComponent:a,renderRow:i,isActive:s(p),onSelect:d,onDrillIn:c},ca(p)))}):null]})}function eb({item:e,LinkComponent:t,renderRow:r,isActive:o,onSelect:n,onDrillIn:a}){if(e.divider)return jsxRuntime.jsx("div",{className:"edges-stack-nav__divider my-2",role:"separator"});if(e.groupLabel)return jsxRuntime.jsx("div",{className:"px-3 pt-6 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-text-secondary",children:e.label});let i=!!e.children?.length,s=tailwindMerge.twMerge("edges-stack-nav__row flex items-center justify-between gap-3 rounded-sm px-3 py-2 text-sm font-normal text-text-primary no-underline cursor-pointer text-left bg-transparent border-0 transition-colors",o&&"edges-stack-nav__row--active font-semibold");if(r)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r({item:e,isActive:o,hasChildren:i,select:l=>n(l,e),drillIn:()=>a(e),LinkComponent:t,className:s})});let d=jsxRuntime.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.leading??e.icon?jsxRuntime.jsx("span",{className:"inline-flex items-center flex-shrink-0",children:e.leading??e.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:e.label})]});if(e.href&&i&&e.pushOnSelect===false)return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(s,"cursor-default p-0"),children:[jsxRuntime.jsx(t,{href:e.href,"aria-label":e.ariaLabel,className:"flex min-w-0 flex-1 items-center gap-2 rounded-sm px-3 py-2 text-inherit no-underline","aria-current":o?"page":void 0,onClick:l=>n(l,e),children:d}),jsxRuntime.jsxs("span",{className:"flex flex-shrink-0 items-center gap-2 pr-2 text-text-secondary",children:[e.trailing,jsxRuntime.jsx("button",{type:"button",className:"edges-stack-nav__drill-in inline-flex cursor-pointer items-center rounded-sm border-0 bg-transparent p-1 text-inherit","aria-label":`Open ${e.label}`,onClick:()=>a(e),children:jsxRuntime.jsx(tb,{})})]})]});let c=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d,jsxRuntime.jsxs("span",{className:"flex flex-shrink-0 items-center gap-2 text-text-secondary",children:[e.trailing,i?jsxRuntime.jsx(tb,{}):null]})]});return e.href?jsxRuntime.jsx(t,{href:e.href,"aria-label":e.ariaLabel,className:s,"aria-current":o?"page":void 0,onClick:l=>n(l,e),children:c}):jsxRuntime.jsx("button",{type:"button",className:s,"aria-label":e.ariaLabel,onClick:l=>{n(l,e);},children:c})}function tb(){return jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M4.5 3 7.5 6 4.5 9"})})}function Sk(){return jsxRuntime.jsx("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M8.5 3 4.5 7 8.5 11"})})}function wk(e,t){if(e===t)return true;if(e.length!==t.length)return false;for(let r=0;r<e.length;r+=1)if(e[r]!==t[r])return false;return true}var ms=({rightContent:e,centerContent:t,showMobileMenu:r=true,avatar:o,showColorModeSwitcher:n=false,toggleTheme:a,isDarkThemeEnabled:i=false,colorMode:s,actions:d,className:c="",mobileMenuId:l="app-mobile-menu"})=>{let u=()=>{switch(s||(i?"dark":"light")){case "system":return jsxRuntime.jsx(Jr,{name:"Monitor",size:"sm"});case "light":return jsxRuntime.jsx(Jr,{name:"Sun",size:"sm"});case "dark":return jsxRuntime.jsx(Jr,{name:"Moon",size:"sm"})}},m=()=>{switch(s||(i?"dark":"light")){case "system":return "Switch to light mode";case "light":return "Switch to dark mode";case "dark":return "Switch to system mode";default:return "Toggle theme"}};return jsxRuntime.jsx("header",{className:`h-[60px] bg-background-surface border-b ${c}`,children:jsxRuntime.jsxs("div",{className:"relative flex h-full items-center",children:[jsxRuntime.jsx("div",{className:"flex items-center h-full flex-shrink-0",children:r&&jsxRuntime.jsx("label",{htmlFor:l,className:"md:hidden cursor-pointer","aria-label":"Open menu",children:jsxRuntime.jsx("div",{className:"flex h-full w-14 flex-col items-center justify-center border-r hover:bg-background-hover transition-colors",children:jsxRuntime.jsx(Jr,{name:"List",size:"sm"})})})}),t&&jsxRuntime.jsx("div",{className:"flex-1 flex justify-end md:justify-center md:px-4 min-w-0",children:jsxRuntime.jsx("div",{className:"w-full md:max-w-4xl min-w-0",children:t})}),!t&&jsxRuntime.jsx("div",{className:"flex-1"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 pr-4 flex-shrink-0 ml-4",children:[e,n&&a&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover transition-colors","aria-label":m(),children:u()}),d,o&&jsxRuntime.jsx("div",{className:"flex items-center",children:o})]})]})})};function ab({sideNav:e,stackNav:t,topNav:r,children:o,contentPaddingX:n,contentPaddingY:a,showSidebarBorder:i=true,mainClassName:s,enableJsEnhancements:d=false}){let c="app-mobile-menu",l="app-sidebar-collapse";return ot.useEffect(()=>{if(!d)return;let u=document.getElementById(l),m=document.getElementById(c),p=document.querySelector("[data-app-shell]"),g=document.getElementById("app-sidebar");if(!u||!p||!g)return;let f=null,h=false;try{let R=localStorage.getItem("sidebar-collapsed");R!==null&&(u.checked=R==="true");}catch{}let b=()=>{try{localStorage.setItem("sidebar-collapsed",String(u.checked));}catch{}u.checked?h=true:(f&&(clearTimeout(f),f=null),p.removeAttribute("data-peek"),h=false);};u.addEventListener("change",b);let v=R=>{R.key==="Escape"&&(m&&(m.checked=false),p.removeAttribute("data-peek"));};document.addEventListener("keydown",v);let x=null;m&&(x=()=>{document.body.style.overflow=m.checked?"hidden":"";},m.addEventListener("change",x));let C=R=>{let E=R.target.closest("a");E&&E.href&&window.innerWidth<768&&m&&setTimeout(()=>{m.checked=false,document.body.style.overflow="";},100);};g.addEventListener("click",C);let w=16,S=200,T=()=>{f&&(clearTimeout(f),f=null),p.getAttribute("data-peek")!=="true"&&p.setAttribute("data-peek","true");},N=()=>{f&&clearTimeout(f),f=setTimeout(()=>{p.removeAttribute("data-peek"),f=null;},S);},k=R=>{if(window.innerWidth<768||!u.checked)return;let L=g.contains(R.target);if(h&&!L&&(h=false),h)return;R.clientX<=w||L?T():p.getAttribute("data-peek")==="true"&&N();};return document.addEventListener("mousemove",k),()=>{u.removeEventListener("change",b),document.removeEventListener("keydown",v),m&&x&&m.removeEventListener("change",x),g.removeEventListener("click",C),document.removeEventListener("mousemove",k),f&&clearTimeout(f);}},[d,c,l]),jsxRuntime.jsxs("div",{className:"min-h-[100dvh] bg-background text-text-primary relative","data-app-shell":"",children:[jsxRuntime.jsx("input",{type:"checkbox",id:l,className:"sr-only peer/sidebar","aria-hidden":"true"}),jsxRuntime.jsx("a",{href:"#app-content",className:"sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 z-50 rounded px-3 py-2 bg-background-surface shadow",children:"Skip to content"}),jsxRuntime.jsx(ms,{...r,mobileMenuId:c,className:["sticky top-0 flex-shrink-0 z-30 md:hidden",r?.className].filter(Boolean).join(" ")}),jsxRuntime.jsxs("div",{className:"flex w-full h-[calc(100dvh-60px)] md:h-[100dvh] relative overflow-hidden",children:[jsxRuntime.jsx("input",{type:"checkbox",id:c,className:"sr-only peer/mobile","aria-hidden":"true"}),jsxRuntime.jsx("label",{htmlFor:c,className:"fixed inset-0 bg-background-modal z-[55] opacity-0 pointer-events-none peer-checked/mobile:opacity-100 peer-checked/mobile:pointer-events-auto transition-opacity md:hidden","aria-label":"Close menu"}),jsxRuntime.jsx("div",{"aria-hidden":"true","data-peek-zone":"",className:"hidden md:block fixed left-0 top-0 bottom-0 w-4 z-[70] pointer-events-none"}),jsxRuntime.jsx("label",{htmlFor:l,"data-expand-rail":"",className:"hidden fixed left-3 top-3 z-[75] items-center justify-center w-9 h-9 rounded-md bg-background-surface border border-border-default shadow-sm hover:bg-background-hover cursor-pointer transition-all duration-200","aria-label":"Expand sidebar",children:jsxRuntime.jsx(Jr,{name:"Sidebar",size:"sm"})}),jsxRuntime.jsx("aside",{id:"app-sidebar","data-app-sidebar":"",className:["bg-background-surface","border-r border-border-default","transition-transform duration-300 ease-in-out md:transition-[transform,width] md:duration-300 md:ease-in-out","fixed md:relative","left-0 top-0 bottom-0","z-[60] md:z-10","w-full md:w-64","h-[100dvh] md:h-full","-translate-x-full","peer-checked/mobile:translate-x-0","md:translate-x-0",i?"":"!border-r-0",(t??e)?.className||""].filter(Boolean).join(" "),children:t?jsxRuntime.jsx(gi,{...t,mobileMenuId:c,sidebarCollapseId:l,sticky:false,width:null,className:["h-full !border-r-0",t.className].filter(Boolean).join(" ")}):jsxRuntime.jsx(Zl,{...e,mobileMenuId:c,sidebarCollapseId:l,className:"h-full"})}),jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[jsxRuntime.jsx("div",{className:"sticky top-0 flex-shrink-0 hidden md:block z-20","data-top-nav-wrapper":"",children:jsxRuntime.jsx(ms,{...r,className:r?.className})}),jsxRuntime.jsx("main",{id:"app-content",className:["flex-1 overflow-y-auto overflow-x-hidden bg-background-body scrollbar-visible",n,a,s||""].join(" "),role:"main",children:o})]})]}),jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
140
140
|
@media (min-width: 768px) {
|
|
141
141
|
/* Collapsed: hide the rail offscreen, surface the floating expand
|
|
142
142
|
button, and let the edge zone receive hover events. */
|
|
143
|
-
#${
|
|
143
|
+
#${l}:checked ~ * [data-app-sidebar] {
|
|
144
144
|
transform: translateX(-100%);
|
|
145
145
|
position: absolute;
|
|
146
146
|
}
|
|
147
|
-
#${
|
|
147
|
+
#${l}:checked ~ * [data-expand-rail] {
|
|
148
148
|
display: flex;
|
|
149
149
|
}
|
|
150
|
-
#${
|
|
150
|
+
#${l}:checked ~ * [data-top-nav-wrapper] {
|
|
151
151
|
padding-left: 3.5rem;
|
|
152
152
|
}
|
|
153
|
-
#${
|
|
153
|
+
#${l}:checked ~ * [data-peek-zone] {
|
|
154
154
|
pointer-events: auto;
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -164,8 +164,8 @@
|
|
|
164
164
|
z-index: 50;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
`}})]})}function Dn(e,t=300){let[r,o]=ot.useState(e);return ot.useEffect(()=>{let n=setTimeout(()=>o(e),t);return ()=>clearTimeout(n)},[e,t]),r}function jl(e,t=300){let[r,o]=ot.useState(false);return ot.useEffect(()=>{if(e){let n=setTimeout(()=>{o(true);},t);return ()=>clearTimeout(n)}o(false);},[e,t]),r}var $N=({isEntering:e,isExiting:t,className:r})=>["max-w-xs group bg-background-surface border border-border-default text-text-primary text-sm leading-relaxed rounded-lg shadow-lg will-change-transform px-3 py-2",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",t?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",r].filter(Boolean).join(" ");function Zh({content:e,tooltipRef:t,...r}){return jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...r,ref:t,offset:r.offset??8,className:reactAriaComponents.composeRenderProps(r.className,(o,n)=>$N({...n,className:o})),children:[jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-background-surface stroke-border-default group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),e]})}function ek({children:e,content:t,delay:r=200,closeDelay:o,...n}){let[a,i]=ot.useState(false),s=ot.useRef(false),l=ot.useRef(null),d=ot.useRef(null),c=ot.useId();if(ot.useEffect(()=>{if(!a)return;let m=()=>{s.current=false,i(false);},p=f=>{f.key==="Escape"&&m();},g=f=>{!(f.target instanceof Node)||document.querySelector(`[data-tooltip-trigger="${c}"]`)?.contains(f.target)||d.current?.contains(f.target)||m();};return document.addEventListener("keydown",p,true),document.addEventListener("pointerdown",g),()=>{document.removeEventListener("keydown",p,true),document.removeEventListener("pointerdown",g);}},[a,c]),ot.useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]),!ot.isValidElement(e))throw new Error("Tooltip with openOnPress requires a single pressable child");let u=ot__namespace.default.cloneElement(e,{"data-tooltip-trigger":c,onHoverStart:m=>{e.props.onHoverStart?.(m),l.current=setTimeout(()=>i(true),r);},onHoverEnd:m=>{e.props.onHoverEnd?.(m),l.current&&clearTimeout(l.current),s.current||i(false);},onPress:m=>{e.props.onPress?.(m),l.current&&clearTimeout(l.current),s.current=!s.current,i(s.current);}});return jsxRuntime.jsxs(reactAriaComponents.TooltipTrigger,{delay:r,closeDelay:o,shouldCloseOnPress:false,isOpen:a,onOpenChange:m=>{!m&&s.current||i(m);},children:[u,jsxRuntime.jsx(Zh,{...n,content:t,tooltipRef:d})]})}function tr({children:e,content:t,openOnPress:r=false,delay:o=200,closeDelay:n,...a}){return r?jsxRuntime.jsx(ek,{...a,content:t,delay:o,closeDelay:n,children:e}):jsxRuntime.jsxs(reactAriaComponents.TooltipTrigger,{delay:o,closeDelay:n,children:[e,jsxRuntime.jsx(Zh,{...a,content:t})]})}function Ar(){let[e,t]=ot__namespace.default.useState(false),r=ot__namespace.default.useCallback((n,a)=>{t(true),a?.(n);},[]),o=ot__namespace.default.useCallback((n,a)=>{t(false),a?.(n);},[]);return {isFocused:e,handleFocus:r,handleBlur:o}}var Dt=ot__namespace.default.forwardRef(({children:e,className:t},r)=>jsxRuntime.jsx("div",{ref:r,className:tailwindMerge.twMerge("relative w-full",t),children:e}));Dt.displayName="InputWrapper";function ms({onClick:e,size:t="md",className:r}){return jsxRuntime.jsx("button",{type:"button",onClick:o=>{o.preventDefault(),o.stopPropagation(),e();},className:tailwindMerge.twMerge("absolute right-2 top-[48%] -translate-y-1/2 transform text-text-secondary hover:text-text-primary cursor-pointer",r),"aria-label":"Clear input",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},children:jsxRuntime.jsx(G,{name:"X",size:t==="sm"?16:20})})}function An(e){let{isInvalid:t,isDisabled:r,isFocused:o}=e,n="border rounded-[var(--control-border-radius)] !outline-none ";return r?`${n} border-border-muted`:t&&o?`${n} border-feedback-error-border shadow-[inset_0_0_0_1px_var(--color-feedback-error-border)]`:t?`${n} border-feedback-error-border`:o?`${n} border-border-focus shadow-[inset_0_0_0_1px_var(--color-border-focus)]`:`${n} border-border-input`}function Qh(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function tk(e){return e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":""}function rr(e){let{isInvalid:t,isDisabled:r,isFocused:o,transparent:n,size:a="md",className:i}=e;return tailwindMerge.twMerge("w-full",An({isInvalid:t,isDisabled:r,isFocused:o}),Qh({transparent:n,isDisabled:r}),_e[a].text,_e[a].height,_e[a].padding,tk(a),i)}function rk(e){let{size:t="md",isFocusWithin:r,isInvalid:o,isDisabled:n,transparent:a,className:i}=e;return tailwindMerge.twMerge("group flex items-center rounded-[var(--control-border-radius)] overflow-hidden",Qh({transparent:a,isDisabled:n}),_e[t].height,An({isFocused:r,isInvalid:o,isDisabled:n}),i)}function et({children:e,size:t="md",tooltip:r,description:o,descriptionPlacement:n="below",isRequired:a,className:i,htmlFor:s}){let l=r||o&&n==="tooltip",d=r||o,c=o&&n==="inline",u=jsxRuntime.jsxs("label",{htmlFor:s,className:tailwindMerge.twMerge(_e[t].text,"!text-text-label font-semibold flex items-center gap-1",i),children:[e,a&&jsxRuntime.jsx("span",{children:"*"}),l&&jsxRuntime.jsx("span",{className:"inline-flex items-center text-text-secondary",children:jsxRuntime.jsx(G,{name:"Info",size:t==="sm"?16:20})}),c&&jsxRuntime.jsx("span",{className:"text-text-secondary font-normal ml-1",children:o})]});return l&&d?jsxRuntime.jsx(tr,{content:d,children:u}):u}function Ee({size:e="md",className:t,children:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("leading-[2.25] text-text-secondary",_e[e].text,t),children:r})}function ye({children:e,size:t="md",className:r}){return jsxRuntime.jsx("div",{role:"alert",className:tailwindMerge.twMerge(_e[t].text,"text-feedback-error-text",r),children:e})}function Zl({size:e="md",isInvalid:t,isDisabled:r,isFocused:o,transparent:n,className:a,...i}){let s=r??i.disabled;return jsxRuntime.jsx("input",{className:rr({isInvalid:t,isDisabled:r,isFocused:o,transparent:n,size:e,className:a}),...i,disabled:s,"aria-disabled":s||void 0})}function _h(e){let{children:t,...r}=e;return jsxRuntime.jsx("div",{...r,className:rk(e),children:typeof t=="function"?t(e):t})}var Ip=ot.createContext("md");function ob(){return ot.useContext(Ip)}function Lp(e="md"){let t=e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":"";return `flex-1 text-start data-[placeholder]:text-text-disabled overflow-hidden text-ellipsis whitespace-nowrap ${_e[e].text} ${t}`}function lk(){let e=ot__namespace.default.useCallback((r,o)=>{o?.(r);},[]),t=ot__namespace.default.useCallback((r,o)=>{o?.(r);},[]);return {handleFocus:e,handleBlur:t}}function on({label:e,description:t,errorMessage:r,children:o,items:n,renderItem:a,renderSelectedValue:i,size:s="md",selectedKey:l,defaultSelectedKey:d,onSelectionChange:c,placeholder:u,showErrors:m=false,tooltip:p,isRequired:g,transparent:f,reserveErrorSpace:b=false,placement:h="bottom start",shouldFlip:v=true,menuWidth:x="match",descriptionPlacement:C="below",useMobileTray:S=true,...w}){let[T,N]=ot.useState(null),[k,R]=ot.useState(null),[A,M]=ot.useState(false),B=l??T??d,{handleFocus:D,handleBlur:W}=lk(),{isMobile:X}=Rr(),H=S&&X,I=ot__namespace.default.useMemo(()=>!i||!B||!n?null:Array.from(n).find(V=>V.id===B)??null,[i,B,n]),F=O=>{c&&O!==null&&c(O),c||N(O);},z=ot.useRef(null),U=ot.useRef(null),K=()=>{H&&M(!A);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAriaComponents.Select,{...w,selectedKey:B,defaultSelectedKey:d,onSelectionChange:F,placeholder:u,className:Fe(w.className,"group flex w-full flex-col"),ref:z,onOpenChange:O=>{H||(O&&U.current?R(U.current.offsetWidth):O||z.current?.blur());},children:({isDisabled:O,isInvalid:V,isOpen:L})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:s,tooltip:p,description:C==="tooltip"||C==="inline"?t:void 0,descriptionPlacement:C,isRequired:g,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsx("div",{ref:U,children:jsxRuntime.jsxs(te,{variant:"unstyled",className:tailwindMerge.twMerge(rr({isInvalid:V||m&&!!r,isDisabled:O,isFocused:H?A:L,transparent:f,size:s}),"flex items-center text-start gap-4 cursor-pointer pl-[var(--control-padding-sm)]"),onFocus:y=>D(y,w.onFocus),onBlur:y=>W(y,w.onBlur),onPress:H?K:void 0,"data-open":H?A:L,children:[i&&I?jsxRuntime.jsx("div",{className:Lp(s),children:i(I)}):H&&B?jsxRuntime.jsx("div",{className:Lp(s),children:n?Array.from(n).find(P=>P.id===B)?.label:String(B)}):jsxRuntime.jsx(reactAriaComponents.SelectValue,{className:Lp(s)}),jsxRuntime.jsx(G,{name:"CaretDown","aria-hidden":true,className:tailwindMerge.twMerge("h-4 w-4 text-text-primary group-disabled:text-text-disabled forced-colors:text-[ButtonText] transition-transform",(H?A:L)&&"rotate-180")})]})})}),b?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:m?jsxRuntime.jsx(ye,{size:s,className:"text-feedback-error-text",children:typeof r=="function"&&w.validationResult?r(w.validationResult):typeof r=="string"?r:null}):t&&C==="below"?jsxRuntime.jsx(Ee,{size:s,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:m?jsxRuntime.jsx(ye,{size:s,className:"mt-1 text-feedback-error-text",children:typeof r=="function"&&w.validationResult?r(w.validationResult):typeof r=="string"?r:null}):t&&C==="below"?jsxRuntime.jsx(Ee,{size:s,className:"mt-1",children:t}):null}),H?null:jsxRuntime.jsx(Et,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-[var(--control-border-radius)]",style:{width:x==="match"&&k?`${k}px`:void 0,minWidth:x==="auto"&&k?`${k}px`:void 0,maxWidth:x==="auto"?"min(600px, 90vw)":void 0},placement:h,shouldFlip:v,children:jsxRuntime.jsx(Ip.Provider,{value:"md",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:n,className:"w-full max-h-[300px] overflow-auto bg-background-input p-0 outline-0",children:a&&n?y=>jsxRuntime.jsx(Ir,{id:y.id,textValue:y.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:a(y)})},y.id):o})})})]})}),H&&jsxRuntime.jsx(Lt,{isOpen:A,onClose:()=>M(false),title:e??"Select an option",contentPadding:false,children:jsxRuntime.jsx(Ip.Provider,{value:"md",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:n,className:"w-full bg-background-surface p-0 outline-0 [&_[role=option]]:border-b [&_[role=option]]:border-border-default [&_[role=option]:last-child]:border-0 [&_[role=option]]:!px-6 [&_[role=option]]:!py-4 [&_[role=option]]:rounded-none",selectionMode:"single",selectedKeys:B!=null?[B]:[],onSelectionChange:O=>{let V=Array.from(O)[0];V!=null&&(F(V),M(false));},children:a&&n?O=>jsxRuntime.jsx(Ir,{id:O.id,textValue:O.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:a(O)})},O.id):o})})})]})}function Ir({size:e,className:t,...r}){let o=ob(),n=e??o;return jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{...r,className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 outline-none text-text-primary data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-default data-[focus-visible]:ring-inset data-[selected]:bg-background-selected data-[selected]:font-medium overflow-hidden",_e[n].paddingY,_e[n].text,t)})}var vk=[],Ck={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},Sk={sm:"pl-8",md:"pl-10",lg:"pl-11",xl:"pl-13"},ab={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"},Bp=(e,t,r)=>{if(e==null||e==="")return "";let n=(r?r.flatMap(a=>a.items):t||[]).find(a=>a.id===e);return n?n.name:""};async function wk(e,t,r){try{let o=e.url.replace("{q}",t),n=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([l,d])=>{n.append(l,d.toString());});let a=`${o}${n.toString()?"?"+n.toString():""}`,i=await fetch(a,{method:"GET",headers:e.headers,signal:r});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);let s=await i.json();return {items:e.transformResponse(s)}}catch(o){if(o instanceof Error&&o.name==="AbortError")return {items:[]};console.error("Error in REST request:",o);let n=o instanceof Error?o.message:"Unknown error occurred";return {items:[],error:n}}}async function Tk(e,t,r){try{let o=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${t}"`),n=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:o}),signal:r});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);let a=await n.json();if(a.errors)throw new Error(a.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(a=e.responsePath.split(".").reduce((i,s)=>i?.[s],a)),{items:e.transformResponse(a)}}catch(o){if(o instanceof Error&&o.name==="AbortError")return {items:[]};console.error("Error in GraphQL request:",o);let n=o instanceof Error?o.message:"Unknown error occurred";return {items:[],error:n}}}function $l({label:e,staticItems:t=vk,sections:r,selectedKey:o,defaultSelectedKey:n,onSelectionChange:a,requestConfig:i,defaultFilter:s,placeholder:l,errorMessage:d,description:c,size:u="md",tooltip:m,isRequired:p,isDisabled:g,isInvalid:f,validationResult:b,showErrors:h=true,renderItem:v,renderLeftIcon:x,renderSection:C,autoFocus:S=false,reserveErrorSpace:w=false,hideChevron:T=false,useMobileTray:N=true,className:k}){let R=ot__namespace.default.useRef(null),A=ot__namespace.default.useRef(null),[M,B]=ot__namespace.default.useState(),[D,W]=ot.useState(()=>Bp(o||n,t,r)),[X,H]=ot.useState(false),[I,F]=ot.useState(false),z=Dn(D),{contains:U}=reactAria.useFilter({sensitivity:"base"}),[K,O]=ot.useState(),{isMobile:V}=Rr(),L=N&&V,y=_e[u].text,E=reactStately.useAsyncList({async load({signal:me,filterText:ue=""}){if(!i)return {items:[]};if(!i.url||i.shouldLoad&&!i.shouldLoad(ue))return {items:[]};try{let ie;return i.requestType==="GraphQL"?ie=await Tk(i,ue,me):ie=await wk(i,ue,me),O(ie.error),{items:ie.items}}catch(ie){return ie instanceof Error&&ie.name==="AbortError"?{items:[]}:(console.error("Error loading items:",ie),O(ie instanceof Error?ie.message:"Unknown error occurred"),{items:[]})}},initialFilterText:""}),P=i&&z!==""?E:null,Y=false,$=ot.useRef("");ot.useEffect(()=>{S&&H(true);},[S]),ot.useEffect(()=>{let me=Bp(o,t,r);me!==D&&W(me);},[o,t,r]),ot.useEffect(()=>{let me=()=>{R.current&&B(R.current.offsetWidth);};return me(),window.addEventListener("resize",me),()=>window.removeEventListener("resize",me)},[]),ot.useEffect(()=>{z===""?$.current="":P&&z!==$.current&&($.current=z,P.setFilterText(z));},[z,P]),Y=jl(!!P?.isLoading,300);let oe=ot__namespace.default.useMemo(()=>{if(!L||!D)return P?P.items:t;let me=P?P.items:t,ue=s??(i?()=>true:U);return me.filter(ie=>ue(ie.name,D))},[L,D,P,t,s,U]),re=me=>{let ue=Bp(me,t,r);W(ue),a&&a(me);},_=me=>{W(me);},he=()=>{L&&F(true);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAriaComponents.ComboBox,{onSelectionChange:re,selectedKey:o||void 0,defaultSelectedKey:n||void 0,items:P?P.items:r?r.flatMap(me=>me.items):t,className:Fe(k,"group flex flex-col w-full"),menuTrigger:L?"manual":i?"input":"focus",allowsEmptyCollection:!!i,isDisabled:g,isInvalid:f||!!d,inputValue:D,onInputChange:_,autoFocus:S&&!L,defaultFilter:s??(i?()=>true:U),"aria-label":e||l||"Autocomplete",children:me=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:u,tooltip:m,isRequired:p,children:e}),jsxRuntime.jsxs(Dt,{ref:R,children:[x?jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-[45%] -translate-y-1/2 z-10",children:x(Y)}):jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 z-10 flex items-center",children:Y?jsxRuntime.jsx(ao,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(G,{name:"MagnifyingGlass",className:`${Ck[u]} text-text-secondary`})}),jsxRuntime.jsx(reactAriaComponents.Input,{className:rr({isInvalid:f||!!d,isDisabled:g,isFocused:X||(L?I:me.isOpen),size:u,className:tailwindMerge.twMerge(Sk[u],D&&!g||!T&&!D?"pr-10":"pr-3",L&&"cursor-pointer",k)}),placeholder:l,disabled:g,onFocus:ue=>{H(true),L&&(ue.currentTarget.blur(),he());},onBlur:()=>{H(false);},onClick:L?he:void 0,readOnly:L,"aria-label":e||l||"Autocomplete"}),D&&!g&&jsxRuntime.jsx(ms,{onClick:()=>{W(""),a?.(null);},size:u}),!T&&!D&&jsxRuntime.jsx(reactAriaComponents.Button,{className:"absolute right-3 top-[46%] -translate-y-1/2 transform text-text-secondary hover:text-text-primary","aria-label":"Toggle menu",isDisabled:g,children:({isPressed:ue})=>jsxRuntime.jsx(G,{name:ue?"CaretUp":"CaretDown",className:"h-4 w-4"})})]}),w?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:h&&K?jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text",children:K}):h&&typeof d=="string"?jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text",children:d}):h&&typeof d=="function"&&b?jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text",children:d(b)}):c?jsxRuntime.jsx(Ee,{size:u,children:c}):null}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[c&&jsxRuntime.jsx(Ee,{size:u,className:"mt-1",children:c}),h&&K&&jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text mt-1",children:K}),h&&typeof d=="string"&&jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text mt-1",children:d}),h&&typeof d=="function"&&b&&jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text mt-1",children:d(b)})]}),!L&&jsxRuntime.jsx(Et,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm ring-1 ring-black/5 rounded-[var(--control-border-radius)]",style:{minWidth:M?`${M}px`:void 0,zIndex:9999},children:jsxRuntime.jsx(reactAriaComponents.ListBox,{"aria-label":e||l||"Suggestions",className:`max-h-[300px] overflow-auto bg-background-input outline-none ${y}`,children:r?r.map(ue=>{let ie=ue.items.map(fe=>jsxRuntime.jsx(Ir,{id:fe.id,textValue:fe.name,size:u,className:`flex cursor-default items-center gap-2 px-3 ${ab[u]} text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0`,children:v?v(fe):fe.name},fe.id));if(C){let fe=C(ue,ie);return ot__namespace.default.isValidElement(fe)&&fe.type===reactAriaComponents.ListBoxSection?fe:jsxRuntime.jsx(reactAriaComponents.ListBoxSection,{children:fe},ue.name)}return jsxRuntime.jsxs(reactAriaComponents.ListBoxSection,{children:[jsxRuntime.jsx(reactAriaComponents.Header,{className:"px-3 py-1 text-sm font-bold text-text-secondary",children:ue.name}),ie]},ue.name)}):ue=>jsxRuntime.jsx(Ir,{id:ue.id,textValue:ue.name,size:u,className:`flex cursor-default items-center gap-2 px-3 ${ab[u]} text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0`,children:v?v(ue):ue.name},ue.id)})})]})}),L&&jsxRuntime.jsx(Lt,{isOpen:I,onClose:()=>F(false),title:e??l??"Search",contentPadding:false,height:"80vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"p-4 border-b border-border-default",children:jsxRuntime.jsxs(Dt,{children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-[45%] -translate-y-1/2 z-10 flex items-center",children:Y?jsxRuntime.jsx(ao,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(G,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-secondary"})}),jsxRuntime.jsx("input",{ref:A,type:"text",value:D,onChange:me=>_(me.target.value),placeholder:l,autoFocus:true,className:rr({isInvalid:false,isDisabled:false,isFocused:true,size:"md",className:"pl-10 pr-10"})}),D&&jsxRuntime.jsx(ms,{onClick:()=>{W(""),a?.(null);},size:"md"})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{"aria-label":e||l||"Suggestions",items:oe,selectedKeys:o?[o]:[],selectionMode:"single",onSelectionChange:me=>{let ue=Array.from(me)[0];ue&&(re(ue),F(false));},className:"bg-background-input outline-none",children:me=>jsxRuntime.jsx(Ir,{id:me.id,textValue:me.name,size:"md",className:"flex cursor-default items-center gap-2 px-4 py-3 text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0",children:v?v(me):me.name},me.id)})})]})})]})}function nn({src:e,alt:t,firstName:r,lastName:o,fullName:n,onClick:a,size:i="md",shape:s="circle",variant:l="user",className:d,status:c,bordered:u=false,piiEntity:m}){let[p,g]=ot.useState(false),f=ot.useCallback(()=>g(true),[]);ot.useEffect(()=>{g(false);},[e]);let b={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},h={xs:"h-1.5 w-1.5",sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3",xl:"h-4 w-4"},v={xs:"bottom-0 right-0",sm:"bottom-0 right-0",md:"bottom-0 right-0",lg:"bottom-0.5 right-0.5",xl:"bottom-1 right-1"},x={online:"bg-feedback-success-background border-feedback-success-border",offline:"bg-text-secondary border-border-muted",away:"bg-feedback-warning-background border-feedback-warning-border",busy:"bg-feedback-error-background border-feedback-error-border"},C={user:"bg-feedback-info-background text-feedback-info-text",team:"bg-feedback-info-background text-feedback-info-text",organization:"bg-feedback-success-background text-feedback-success-text"},S=s==="circle"?"rounded-full":"rounded-md",w=tailwindMerge.twMerge("relative inline-flex items-center justify-center overflow-hidden transition-opacity outline-none",b[i],S,a&&"cursor-pointer hover:opacity-80",u&&"ring-2 ring-background-surface",d),N=(()=>{if(r||o){let M=r?.[0]||"",B=o?.[0]||"";return (M+B).toUpperCase()}if(n){let M=n.split(" "),B=M[0]?.[0]||"",D=M[M.length-1]?.[0]||"";return B===D?B.toUpperCase():(B+D).toUpperCase()}return ""})(),k=()=>{let M={xs:14,sm:16,md:20,lg:24,xl:32}[i];switch(l){case "team":return jsxRuntime.jsx(lucideReact.Users,{size:M});case "organization":return jsxRuntime.jsx(lucideReact.Building2,{size:M});default:return jsxRuntime.jsx(lucideReact.User,{size:M})}},R=M=>{if(m)return l==="organization"?M?"organization-logo":"initials":M?"avatar":"initials"},A=()=>e&&!p?jsxRuntime.jsx("img",{src:e,alt:t||n||"Avatar",className:"h-full w-full object-cover",onError:f,"data-pii-type":R(true),"data-pii-entity":m}):N?jsxRuntime.jsx("span",{className:"font-semibold","data-pii-type":R(false),"data-pii-entity":m,children:N}):k();return jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx("div",{"data-avatar":true,className:tailwindMerge.twMerge(w,!e||p?C[l]:""),onClick:a,role:a?"button":void 0,tabIndex:a?0:void 0,children:A()}),c&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("absolute border-2 border-background-surface",S,h[i],v[i],x[c]),"aria-label":`Status: ${c}`})]})}var Dk={default:"bg-feedback-info-background text-feedback-info-text",success:"bg-feedback-success-background text-feedback-success-text",error:"bg-feedback-error-background text-feedback-error-text",warning:"bg-feedback-warning-background text-feedback-warning-text",info:"bg-feedback-info-background text-feedback-info-text",primary:"bg-action-primary/10 text-action-primary border border-action-primary/20",brand:"bg-action-primary/10 text-action-primary border border-action-primary/20",secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border border-border-muted",neutral:"bg-background-muted text-text-secondary",charging:"bg-state-charging text-state-charging-text",discharging:"bg-state-discharging text-state-discharging-text",heat:"bg-state-heat text-state-heat-text",cool:"bg-state-cool text-state-cool-text",eco:"bg-state-eco text-state-eco-text",auto:"bg-state-auto text-state-auto-text",on:"bg-state-on text-state-on-text",off:"bg-state-off text-state-off-text",idle:"bg-state-idle text-state-idle-text",circulate:"bg-state-circulate text-state-circulate-text",unknown:"bg-state-unknown text-state-unknown-text",connected:"bg-feedback-success-background text-feedback-success-text",disconnected:"bg-feedback-error-background text-feedback-error-text",importing:"bg-state-importing text-state-importing-text",exporting:"bg-state-exporting text-state-exporting-text"},Ak={xs:"px-1.5 py-0.5 text-xs",sm:"px-2.5 py-1.5 text-xs",md:"px-3.5 py-2 text-sm",lg:"px-4 py-2.5 text-base"},Ik={pill:"rounded-full",rounded:"rounded-lg",square:"rounded-sm"},Fk={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};function kt({children:e,variant:t="default",size:r="sm",shape:o="square",dot:n=false,dotPosition:a="left",dotPulse:i=false,title:s,className:l}){let d=n&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("rounded-full bg-current opacity-75",Fk[r],i&&"animate-pulse"),"aria-hidden":"true"});return jsxRuntime.jsxs("span",{title:s,className:tailwindMerge.twMerge("inline-flex items-center gap-1.5 font-medium",Ak[r],Ik[o],Dk[t],l),children:[n&&a==="left"&&d,e,n&&a==="right"&&d]})}var St=({href:e,children:t,className:r="",external:o=false,title:n,variant:a="secondary",onClick:i,asButton:s=false,onPress:l,showArrow:d=false,alwaysUnderlined:c=false,LinkComponent:u,"data-pii-type":m,"data-pii-entity":p})=>{let g={...m&&{"data-pii-type":m},...p&&{"data-pii-entity":p}},f=o?{target:"_blank",rel:"noopener noreferrer"}:{},C=`${`${c?"underline decoration-1 underline-offset-4 decoration-current":"hover:underline hover:decoration-1 hover:underline-offset-4 hover:decoration-current"} cursor-pointer`} ${{primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",secondary:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",muted:"text-text-secondary hover:text-text-secondary visited:text-text-secondary",unstyled:""}[a==="brand"?"primary":a==="default"?"secondary":a]} ${r}`,S=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,d&&jsxRuntime.jsxs("span",{children:["\xA0","\u2192"]})]});return s?jsxRuntime.jsx("button",{type:"button",className:C,onClick:l,title:n,...g,children:S}):u&&e?jsxRuntime.jsx(u,{href:e,className:C,title:n,onClick:i,...f,...g,children:S}):jsxRuntime.jsx("a",{href:e||"#",className:C,...f,...g,title:n,onClick:i,children:S})};var Yk={info:{subtle:{container:"bg-feedback-info-background border-l-4 border-l-feedback-info-border",iconColor:"text-feedback-info-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-info-border border-feedback-info-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.Info},success:{subtle:{container:"bg-feedback-success-background border-l-4 border-l-feedback-success-border",iconColor:"text-feedback-success-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-success-border border-feedback-success-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.CheckCircle},warning:{subtle:{container:"bg-feedback-warning-background border-l-4 border-l-feedback-warning-border",iconColor:"text-feedback-warning-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-warning-border border-feedback-warning-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.AlertCircle},error:{subtle:{container:"bg-feedback-error-background border-l-4 border-l-feedback-error-border",iconColor:"text-feedback-error-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-error-border border-feedback-error-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.XCircle},discovery:{subtle:{container:"bg-background-muted border-l-4 border-l-action-brand",iconColor:"text-action-brand",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-action-brand border-action-brand",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.Lightbulb}};function tc({variant:e="info",appearance:t="subtle",title:r,children:o,dismissible:n=false,onDismiss:a,primaryAction:i,secondaryAction:s,icon:l,hideIcon:d=false,className:c,testId:u}){let m=Yk[e],p=m[t],g=m.icon,f=!!(i||s),b=!!(r||o);return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex gap-3 rounded-sm border p-4",p.container,c),role:"region","aria-live":"polite","data-testid":u,children:[!d&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0",p.iconColor),"aria-hidden":"true",children:l||jsxRuntime.jsx(g,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:[b&&jsxRuntime.jsxs("div",{className:"flex-1",children:[r&&jsxRuntime.jsx("div",{className:Er(zt("headingSm"),p.titleColor),children:r}),o&&jsxRuntime.jsx("div",{className:Er(zt("bodySm"),r?"mt-1":"",p.bodyColor),children:o})]}),f&&jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i&&(i.asLink?jsxRuntime.jsx(St,{asButton:true,onPress:i.onPress,variant:t==="bold"?"unstyled":"default",className:t==="bold"?"text-text-inverse hover:text-text-inverse/80":"",children:i.label}):jsxRuntime.jsx(te,{size:"sm",variant:"primary",onPress:i.onPress,className:t==="bold"?"bg-background-surface text-text-primary hover:bg-background-surface/90":"",children:i.label})),s&&(s.asLink?jsxRuntime.jsx(St,{asButton:true,onPress:s.onPress,variant:t==="bold"?"unstyled":"default",className:t==="bold"?"text-text-inverse hover:text-text-inverse/80":"",children:s.label}):jsxRuntime.jsx(te,{size:"sm",variant:"secondary",onPress:s.onPress,className:t==="bold"?"border-text-inverse/30 text-text-inverse hover:bg-text-inverse/10":"",children:s.label}))]})]}),n&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:tailwindMerge.twMerge("flex h-8 w-8 flex-shrink-0 items-center justify-center self-start rounded-md transition-colors hover:bg-background-modal/10",p.iconColor,pt()),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function cb({isOpen:e=true,position:t="sticky",className:r,...o}){let n=t==="fixed"?"fixed top-0 left-0 right-0 z-50":"sticky top-0 z-50",a=r?`${r} !rounded-none`:"!rounded-none";return jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&jsxRuntime.jsx(framerMotion.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:n,children:jsxRuntime.jsx(tc,{...o,className:a})})})}function bi(){let[e,t]=ot.useState({width:0,height:0}),r=ot.useRef(null),o=ot.useRef(void 0),n=ot.useCallback(a=>{if(r.current&&(r.current.disconnect(),r.current=null),o.current&&(cancelAnimationFrame(o.current),o.current=void 0),!a){t({width:0,height:0});return}let i=a.getBoundingClientRect();t({width:i.width,height:i.height}),r.current=new ResizeObserver(s=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(l=>{for(let d of s){let{width:c,height:u}=d.contentRect;t(m=>m.width!==c||m.height!==u?{width:c,height:u}:m);}});}),r.current.observe(a);},[]);return ot.useEffect(()=>()=>{o.current&&cancelAnimationFrame(o.current),r.current&&r.current.disconnect();},[]),{ref:n,width:e.width,height:e.height}}function In({value:e,children:t,className:r,size:o="sm",iconPosition:n="right"}){let[a,i]=ot.useState(false),d=jsxRuntime.jsx(te,{variant:"icon",size:o,onPress:()=>{let u=e||(typeof t=="string"?t:"");navigator.clipboard.writeText(u),i(true),setTimeout(()=>{i(false);},2e3);},className:"!px-2 relative",style:{top:"0.5px"},children:jsxRuntime.jsx(G,{name:"Copy",size:o==="sm"?14:16})}),c=a?jsxRuntime.jsx(tr,{content:"Copied!",children:d}):d;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center gap-0.5",r),children:[n==="left"&&c,t,n==="right"&&c]})}function rc(e){let{children:t,maxWidth:r=600,className:o,...n}=e,{ref:a,width:i}=bi(),[s,l]=ot__namespace.default.useState(false),[d,c]=ot__namespace.default.useState(false),u=ot__namespace.default.useRef(false),m=ot__namespace.default.useMemo(()=>t&&!e.items&&typeof t!="function"?ot__namespace.default.Children.toArray(t):null,[t,e.items]);if(ot__namespace.default.useEffect(()=>{m&&m.length>=4&&i>0&&!u.current?(u.current=true,l(i>r),c(true)):(!m||m&&m.length<4)&&c(true);let p=setTimeout(()=>{d||c(true);},100);return ()=>clearTimeout(p)},[i,r,m,d]),m&&s&&m.length>=4){let p=m[0],g=m.slice(1,-2),f=m.slice(-2),b=g.map(h=>{if(ot__namespace.default.isValidElement(h)){let v=h.props;if(typeof v.children=="string")return {label:v.children,href:v.href}}return {label:"..."}});return jsxRuntime.jsxs(reactAriaComponents.Breadcrumbs,{...n,ref:a,className:tailwindMerge.twMerge("flex gap-2",d?"opacity-100":"opacity-0",o),children:[p,jsxRuntime.jsx(eP,{items:b}),f]})}return jsxRuntime.jsx(reactAriaComponents.Breadcrumbs,{...n,ref:a,className:tailwindMerge.twMerge("flex gap-2",d?"opacity-100":"opacity-0",o),children:t})}function eP({items:e}){let t=e.map((r,o)=>({id:`breadcrumb-${o}`,name:r.label,href:r.href}));return jsxRuntime.jsx(reactAriaComponents.Breadcrumb,{className:"flex items-center gap-2",children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(pi,{items:t,align:"left",size:"sm",children:jsxRuntime.jsx(te,{variant:"icon",size:"sm",icon:"DotsThree","aria-label":"Show hidden breadcrumbs",className:"px-0.5"})}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 text-text-secondary"})]})})}function oc(e){let{className:t,children:r,href:o,copyable:n,copyValue:a,...i}=e;return jsxRuntime.jsx(reactAriaComponents.Breadcrumb,{className:Fe(t,"flex items-center gap-2"),...i,children:s=>{let l=s.isCurrent,d=typeof r=="function"?r(s):r;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:l?n?jsxRuntime.jsx(In,{value:a||(typeof d=="string"?d:void 0),size:"sm",iconPosition:"right",children:jsxRuntime.jsx("span",{className:"max-w-[200px] truncate font-semibold text-text-primary sm:max-w-none",children:d})}):jsxRuntime.jsx("span",{className:"max-w-[200px] truncate font-semibold text-text-primary sm:max-w-none",children:d}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(St,{variant:"muted",href:o,className:"max-w-[150px] truncate sm:max-w-[300px] md:max-w-none",children:d}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 shrink-0 text-text-secondary"})]})})}})}function dP({isSelected:e,isDisabled:t}){let r=[pt,"w-9 h-9 text-sm cursor-default rounded-sm flex items-center justify-center forced-color-adjust-none font-semibold"];return t?r.push("text-text-disabled forced-colors:text-[GrayText]"):e?r.push("bg-action-default text-text-inverse invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):r.push("text-text-primary hover:bg-background-hover pressed:bg-background-selected"),r.join(" ")}function xi({errorMessage:e,...t}){return jsxRuntime.jsxs(reactAriaComponents.Calendar,{...t,children:[jsxRuntime.jsx(nc,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(ac,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:r=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:r,className:({isSelected:o,isDisabled:n})=>`${dP({isSelected:o,isDisabled:n})} border-0`})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-feedback-error-text",children:e})]})}function nc(){let{direction:e}=reactAriaComponents.useLocale(),t=18;return jsxRuntime.jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsxRuntime.jsx(te,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsxRuntime.jsx(G,{name:"CaretRight","aria-hidden":true,size:t}):jsxRuntime.jsx(G,{name:"CaretLeft","aria-hidden":true,size:t})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-text-primary"}),jsxRuntime.jsx(te,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsxRuntime.jsx(G,{name:"CaretLeft","aria-hidden":true,size:t}):jsxRuntime.jsx(G,{name:"CaretRight","aria-hidden":true,size:t})})]})}function ac(){return jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:e=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:"text-xs font-semibold text-text-secondary",children:e})})}var hb=ot__namespace.createContext(null);function Fn(){let e=ot__namespace.useContext(hb);if(!e)throw new Error("Carousel components must be used within a CarouselRoot");return e}function bb({page:e,defaultPage:t=0,onPageChange:r,orientation:o="horizontal",loop:n=false,autoplay:a=false,autoplayDelay:i=4e3,allowMouseDrag:s=false,spacing:l="1rem",slidesPerView:d=1,slidesPerMove:c=1,className:u,children:m,...p}){let g=e!==void 0,[f,b]=ot__namespace.useState(t),h=g?e:f,v=ot__namespace.useRef(null),[x,C]=ot__namespace.useState(0),[S,w]=ot__namespace.useState(typeof a=="boolean"?a:!!a),[T,N]=ot__namespace.useState(false),k=ot__namespace.useRef(null),R=ot__namespace.useRef(null),A=typeof a=="object"&&a!==null&&a.delay?a.delay:i;ot__namespace.useEffect(()=>{if(v.current){let y=Math.max(1,Math.floor(Number(d)||1)),E=v.current.children;if(E.length===0){C(0);return}let P=Math.ceil(E.length/y);C(P);}},[m,d]);let M=ot__namespace.useRef(-1);ot__namespace.useEffect(()=>{if(h!==M.current&&v.current){let y=Array.from(v.current.children);if(y.length===0)return;let E=h*d,P=Math.min(E,y.length-1),Y=y[P];Y&&typeof Y.scrollIntoView=="function"&&(Y.scrollIntoView({behavior:"smooth",block:o==="vertical"?"start":"nearest",inline:o==="horizontal"?"start":"nearest"}),M.current=h);}},[h,d,o]);let B=ot__namespace.useCallback(y=>{let E=y;n?E<0?E=x-1:E>=x&&(E=0):E=Math.max(0,Math.min(y,x-1)),g||b(E),r?.(E);},[g,n,r,x]),D=ot__namespace.useCallback(()=>{B(h+c);},[h,B,c]),W=ot__namespace.useCallback(()=>{B(h-c);},[h,B,c]),X=ot__namespace.useRef(D);ot__namespace.useEffect(()=>{X.current=D;},[D]);let H=x>0&&(n||h<x-1),I=x>0&&(n||h>0),F=ot__namespace.useCallback(()=>{w(y=>!y);},[]);ot__namespace.useEffect(()=>{if(S&&x>1)return k.current=setInterval(()=>{X.current();},A),()=>{k.current&&(clearInterval(k.current),k.current=null);}},[S,x,A]);let z=ot__namespace.useCallback(()=>{k.current&&(clearInterval(k.current),k.current=null);},[]),U=ot__namespace.useCallback(()=>{S&&x>1&&(k.current=setInterval(()=>{X.current();},A));},[S,x,A]),K=ot__namespace.useCallback(y=>{if(!s)return;N(true);let E="touches"in y&&y.touches&&y.touches.length>0?y.touches[0].clientX:"clientX"in y?y.clientX:0,P="touches"in y&&y.touches&&y.touches.length>0?y.touches[0].clientY:"clientY"in y?y.clientY:0;R.current={x:E,y:P};},[s]),O=ot__namespace.useCallback(y=>{if(!T||!R.current)return;let E="touches"in y&&y.touches&&y.touches.length>0?y.touches[0].clientX:"clientX"in y?y.clientX:0,P="touches"in y&&y.touches&&y.touches.length>0?y.touches[0].clientY:"clientY"in y?y.clientY:0,Y=E-R.current.x,$=P-R.current.y,oe=50;o==="horizontal"&&Math.abs(Y)>oe?(Y>0?W():D(),N(false),R.current=null):o==="vertical"&&Math.abs($)>oe&&($>0?W():D(),N(false),R.current=null);},[T,o,D,W]),V=ot__namespace.useCallback(()=>{N(false),R.current=null;},[]),L={currentPage:h,totalPages:x,orientation:o,loop:n,spacing:l,slidesPerView:d,goToPage:B,goToNext:D,goToPrev:W,canGoNext:H,canGoPrev:I,isAutoplayActive:S,toggleAutoplay:F,itemsRef:v,isDragging:T,allowMouseDrag:s,handleDragStart:K,handleDragMove:O,handleDragEnd:V};return jsxRuntime.jsx(hb.Provider,{value:L,children:jsxRuntime.jsx("div",{...p,className:tailwindMerge.twMerge("relative w-full",o==="vertical"?"h-full":"",u),onMouseEnter:z,onMouseLeave:U,children:m})})}function xb({className:e,children:t,...r}){let{itemsRef:o,orientation:n,spacing:a,isDragging:i,allowMouseDrag:s,handleDragStart:l,handleDragMove:d,handleDragEnd:c}=Fn();return jsxRuntime.jsx("div",{ref:o,...r,className:tailwindMerge.twMerge("flex overflow-x-auto overflow-y-hidden snap-x snap-mandatory scrollbar-hide scroll-smooth",n==="vertical"&&"flex-col overflow-y-auto overflow-x-hidden snap-y",s&&i&&"cursor-grabbing select-none",s&&!i&&"cursor-grab",e),style:{gap:a,"--carousel-spacing":a,...r.style},onMouseDown:l,onMouseMove:d,onMouseUp:c,onMouseLeave:c,onTouchStart:l,onTouchMove:d,onTouchEnd:c,children:t})}function yb({index:e,className:t,children:r,...o}){let{orientation:n,slidesPerView:a}=Fn();return jsxRuntime.jsx("div",{...o,"data-index":e,className:tailwindMerge.twMerge("shrink-0 snap-start",n==="horizontal"?"h-full":"w-full",t),style:{width:n==="horizontal"?`calc((100% - (${a-1} * var(--carousel-spacing, 1rem))) / ${a})`:void 0,height:n==="vertical"?`calc((100% - (${a-1} * var(--carousel-spacing, 1rem))) / ${a})`:void 0,...o.style},children:r})}function vb({className:e,children:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("flex items-center justify-center gap-4 mt-4",e),children:t})}function Cb({className:e,children:t,...r}){let{goToPrev:o,canGoPrev:n}=Fn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{o(),r.onClick?.(a);},disabled:!n||r.disabled,"aria-label":"Previous slide",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(G,{name:"CaretLeft",size:"sm"})})}function Sb({className:e,children:t,...r}){let{goToNext:o,canGoNext:n}=Fn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{o(),r.onClick?.(a);},disabled:!n||r.disabled,"aria-label":"Next slide",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(G,{name:"CaretRight",size:"sm"})})}function Kp({index:e,className:t,children:r,...o}){let{currentPage:n,goToPage:a}=Fn(),i=n===e;return jsxRuntime.jsx("button",{type:"button",...o,onClick:s=>{a(e),o.onClick?.(s);},"aria-label":`Go to slide ${e+1}`,"aria-current":i,className:tailwindMerge.twMerge("h-2 rounded-full transition-all duration-200",i?"w-6 bg-action-brand":"w-2 bg-border-muted hover:bg-border-input","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",t),children:r})}function wb({className:e,...t}){let{totalPages:r}=Fn();return jsxRuntime.jsx("div",{...t,className:tailwindMerge.twMerge("flex items-center gap-2",e),role:"group","aria-label":"Carousel indicators",children:Array.from({length:r},(o,n)=>jsxRuntime.jsx(Kp,{index:n},n))})}function Tb({className:e,children:t,...r}){let{isAutoplayActive:o,toggleAutoplay:n}=Fn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{n(),r.onClick?.(a);},"aria-label":o?"Pause autoplay":"Start autoplay",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(G,{name:o?"Pause":"Play",size:"sm"})})}function Nb({className:e,...t}){let{currentPage:r,totalPages:o}=Fn();return jsxRuntime.jsxs("div",{...t,className:tailwindMerge.twMerge("text-sm text-text-secondary tabular-nums",e),"aria-live":"polite","aria-atomic":"true",children:[r+1," / ",o]})}var bP="focus:ring-action-primary",xP="bg-action-primary border-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover hover:border-action-primary-hover";function Yp(e){return jsxRuntime.jsxs(reactAriaComponents.CheckboxGroup,{...e,className:Fe(e.className,"flex flex-col gap-2"),children:[jsxRuntime.jsx(et,{children:e.label}),e.children,e.description&&jsxRuntime.jsx(Ee,{children:e.description}),jsxRuntime.jsx(ye,{children:typeof e.errorMessage=="function"?void 0:e.errorMessage})]})}function yP({isDisabled:e}){return `relative flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-secondary"}`}function vP({isSelected:e,isInvalid:t,isDisabled:r,isIndeterminate:o}){let n="w-5 h-5 flex-shrink-0 rounded-[var(--control-border-radius)] flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2",a=bP,i="";return r?i="border-border-muted bg-background-muted":t?i="border-feedback-error-border bg-feedback-error-background":e||o?i=xP:i="bg-background-input border-border-input hover:border-border-focus",`${n} ${a} ${i}`}var kb="w-4 h-4 text-current group-disabled:text-text-disabled";function Xp({className:e,...t}){return jsxRuntime.jsx("div",{"aria-hidden":"true",className:`${vP(t)} ${e||""}`,children:t.isIndeterminate?jsxRuntime.jsx(lucideReact.Minus,{"aria-hidden":true,className:kb}):t.isSelected?jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":true,className:kb}):null})}function So(e){let{children:t,variant:r,...o}=e;return jsxRuntime.jsx(reactAriaComponents.Checkbox,{...o,className:reactAriaComponents.composeRenderProps(e.className,(n,a)=>`${yP(a)} ${n||""}`),children:n=>{let{isSelected:a,isIndeterminate:i,isDisabled:s,isInvalid:l}=n;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Xp,{isSelected:a,isIndeterminate:i,isDisabled:s,isInvalid:l}),typeof t=="function"?t(n):t]})}})}var wP={primary:"bg-action-primary/10 text-action-primary border border-action-primary/20 hover:bg-action-primary/15",secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border border-border-muted hover:bg-action-secondary-hover",info:"bg-feedback-info-background text-feedback-info-text border border-feedback-info-border hover:bg-feedback-info-background/80"};function Rb(e){return !e||e==="default"?"secondary":e==="brand"?"primary":e}var TP={xs:"px-1.5 py-[2px] gap-0.5",sm:"px-2 py-1 gap-1",md:"px-3 py-1.5 gap-1.5",lg:"px-3 py-2 gap-2",xl:"px-4 py-2.5 gap-2"},NP="opacity-75 cursor-not-allowed pointer-events-none";function Mb(e){let{variant:t,size:r,isDisabled:o,isClickable:n,className:a}=e,i=r==="xs"?"text-xs":_e[r].text;return tailwindMerge.twMerge("inline-flex items-center justify-center rounded-full font-medium transition-colors","whitespace-nowrap select-none",TP[r],i,wP[t],n&&!o&&"cursor-pointer",o&&NP,a)}function lo({children:e,onRemove:t,removeLabel:r="Remove",size:o="md",variant:n="secondary",isRemovable:a=true,isDisabled:i=false,className:s,onClick:l}){let d=!!l&&!i,c=a&&t&&!i,u=b=>{b.stopPropagation(),b.preventDefault(),t&&!i&&t();},m=()=>{l&&!i&&l();},p=o==="xs"?10:o==="sm"?12:o==="md"?14:16,f=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"truncate",children:e}),c?d?jsxRuntime.jsx("span",{onClick:u,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),u(b));},role:"button",tabIndex:0,className:"flex-shrink-0 rounded-full p-0.5 hover:bg-text-primary/10 transition-colors cursor-pointer","aria-label":r,title:r,children:jsxRuntime.jsx(G,{name:"X",size:p,className:"text-current opacity-70 hover:opacity-100"})}):jsxRuntime.jsx("button",{type:"button",onClick:u,className:"flex-shrink-0 rounded-full p-0.5 hover:bg-text-primary/10 transition-colors cursor-pointer","aria-label":r,title:r,tabIndex:-1,children:jsxRuntime.jsx(G,{name:"X",size:p,className:"text-current opacity-70 hover:opacity-100"})}):null]});return d?jsxRuntime.jsx("button",{type:"button",onClick:m,className:Mb({variant:Rb(n),size:o,isDisabled:i,isClickable:d,className:s}),disabled:i,children:f}):jsxRuntime.jsx("span",{className:Mb({variant:Rb(n),size:o,isDisabled:i,isClickable:d,className:s}),children:f})}function Db({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a=false,isDisabled:i=false,isInvalid:s=false,validationResult:l,placeholder:d="Add items...",selectedItems:c=[],onItemsChange:u,staticItems:m,fetchSuggestions:p,chipVariant:g="secondary",showErrors:f=true,className:b}){let[h,v]=ot.useState(""),[x,C]=ot.useState([]),[S,w]=ot.useState(false),[T,N]=ot.useState(false),[k,R]=ot.useState(-1),A=Dn(h,300),M=ot.useRef(null),B=ot.useRef(null),{isFocused:D,handleFocus:W,handleBlur:X}=Ar(),H=ot.useId(),I=ot.useCallback(L=>{if(!u||!L.trim())return;let y=L.trim();if(c.includes(y)){v(""),N(false),C([]),R(-1);return}u([...c,y]),v(""),N(false),C([]),R(-1),M.current?.focus();},[c,u]),F=ot.useCallback(L=>{u&&u(c.filter(y=>y!==L));},[c,u]);ot.useEffect(()=>{if(!p)return;let L=true;return (async()=>{let E=A.trim();if(!E){L&&(w(false),C([]),N(false));return}w(true);try{let P=await p(E);if(!L)return;C(P),N(!0);}catch(P){if(!L)return;console.error("Error fetching suggestions:",P),C([]),N(false);}finally{L&&w(false);}})(),()=>{L=false;}},[A,p]),ot.useEffect(()=>{if(p||!m)return;if(!A.trim()){C([]),N(false);return}let L=m.filter(y=>y.name.toLowerCase().includes(A.toLowerCase())).map(y=>y.id);C(L),N(L.length>0||A.trim().length>0);},[A,m,p]);let z=ot.useMemo(()=>{let L=x.filter(y=>!c.includes(y));return h.trim()&&!L.includes(h.trim())&&!c.includes(h.trim())?[...L,`Create tag: "${h.trim()}"`]:L},[x,h,c]),U=ot.useCallback(L=>{v(L.target.value),R(-1),L.target.value&&N(true);},[]),K=ot.useCallback(L=>{i||(L.startsWith("Create tag:")?I(h):I(L));},[I,h,i]),O=ot.useCallback(L=>{if(!i)switch(L.key){case "Enter":case ",":if(L.preventDefault(),k>=0&&k<z.length){let y=z[k];y.startsWith("Create tag:")?I(h):I(y);}else h.trim()&&I(h.trim());break;case "Backspace":!h&&c.length>0&&(L.preventDefault(),F(c[c.length-1]));break;case "ArrowDown":L.preventDefault(),T&&R(y=>y<z.length-1?y+1:y);break;case "ArrowUp":L.preventDefault(),T&&R(y=>y>0?y-1:-1);break;case "Escape":N(false),R(-1);break}},[i,h,c,z,k,T,I,F]);ot.useEffect(()=>{let L=y=>{B.current&&y.target instanceof Node&&!B.current.contains(y.target)&&N(false);};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);let V=()=>tailwindMerge.twMerge("flex items-center gap-1.5 rounded-md overflow-x-auto overflow-y-hidden","[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",An({isInvalid:s,isDisabled:i,isFocused:D}),"bg-background-input",o==="sm"&&"px-2 py-1 h-[32px]",o==="md"&&"px-2.5 py-1.5 h-[40px]",o==="lg"&&"px-3 py-2 h-[44px]",o==="xl"&&"px-3.5 py-2.5 h-[48px]",i&&"opacity-50 cursor-not-allowed bg-background-muted");return jsxRuntime.jsxs("div",{ref:B,className:tailwindMerge.twMerge("relative flex flex-col gap-1",b),children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsxs("div",{className:V(),onClick:()=>!i&&M.current?.focus(),children:[c.map(L=>jsxRuntime.jsx(lo,{variant:g,size:"xs",onRemove:()=>F(L),isDisabled:i,className:"shrink-0 max-h-full",children:L},L)),jsxRuntime.jsx("input",{ref:M,type:"text",role:"combobox","aria-expanded":T,"aria-haspopup":"listbox","aria-controls":H,"aria-autocomplete":"list",value:h,onChange:U,onKeyDown:O,onFocus:L=>W(L),onBlur:L=>X(L),placeholder:c.length===0?d:"",disabled:i,className:"flex-1 min-w-[120px] h-full !border-0 !outline-none !ring-0 bg-transparent text-text-primary text-sm placeholder:text-text-disabled disabled:cursor-not-allowed focus:!ring-0 focus:!outline-none focus:!border-0 focus-visible:!ring-0 focus-visible:!outline-none focus-visible:!border-0",style:{boxShadow:"none",WebkitAppearance:"none",appearance:"none",border:"none",outline:"none"}})]})}),T&&(h||z.length>0)&&jsxRuntime.jsx("div",{id:H,role:"listbox",className:tailwindMerge.twMerge("absolute z-50 mt-1 rounded-lg border border-border-default","max-h-60 overflow-auto bg-background-surface shadow-lg","left-0 right-0 top-full"),children:S?jsxRuntime.jsx("div",{className:"px-3 py-2 text-sm text-text-secondary",children:"Loading..."}):z.length>0?z.map((L,y)=>jsxRuntime.jsx("div",{role:"option","aria-selected":y===k,className:tailwindMerge.twMerge("cursor-pointer px-3 py-2 text-sm transition-colors","hover:bg-background-hover",y===k&&"bg-background-selected",L.startsWith("Create tag:")&&"italic text-text-secondary"),onClick:()=>K(L),children:L},L)):h&&jsxRuntime.jsx("div",{className:"px-3 py-2 text-sm text-text-secondary",children:"No suggestions found"})}),t&&jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}),f&&typeof r=="string"&&jsxRuntime.jsx(ye,{size:o,className:"text-feedback-error-text mt-1",children:r}),f&&typeof r=="function"&&l&&jsxRuntime.jsx(ye,{size:o,className:"text-feedback-error-text mt-1",children:r(l)})]})}var FP={json:()=>import('ace-builds/src-noconflict/mode-json'),javascript:()=>import('ace-builds/src-noconflict/mode-javascript'),typescript:()=>import('ace-builds/src-noconflict/mode-typescript'),html:()=>import('ace-builds/src-noconflict/mode-html'),css:()=>import('ace-builds/src-noconflict/mode-css'),markdown:()=>import('ace-builds/src-noconflict/mode-markdown'),yaml:()=>import('ace-builds/src-noconflict/mode-yaml'),xml:()=>import('ace-builds/src-noconflict/mode-xml'),python:()=>import('ace-builds/src-noconflict/mode-python'),sql:()=>import('ace-builds/src-noconflict/mode-sql')},BP={github:()=>import('ace-builds/src-noconflict/theme-github'),github_dark:()=>import('ace-builds/src-noconflict/theme-github_dark')},VP={"ext-language-tools":()=>import('ace-builds/src-noconflict/ext-language_tools')},bs=new Set;async function jp(e,t){bs.has(e)||(await t(),bs.add(e));}async function OP(e,t,r){await Promise.all([jp(`language:${e}`,FP[e]),jp(`theme:${t}`,BP[t]),r?jp("extension:language-tools",VP["ext-language-tools"]):void 0]);}function Ib(e,t,r){let o=bs.has(`language:${e}`)&&bs.has(`theme:${t}`);return r?o&&bs.has("extension:language-tools"):o}function Fb({value:e,readOnly:t=false,onChange:r,language:o="json",theme:n="github_dark",height:a,width:i="100%",className:s,lineHeight:l=19,minLines:d=3,maxLines:c=50,showLineNumbers:u=true,showGutter:m=true,fontSize:p=14,wrapEnabled:g=false}){let f=ot.useRef(null),[b,h]=ot.useState(()=>Ib(o,n,!t)),v=ot.useMemo(()=>{if(a)return a;let x=(e.match(/\n/g)||[]).length+1;return `${Math.max(d,Math.min(x,c))*l+10}px`},[e,a,l,d,c]);return ot.useEffect(()=>{let x=false,C=!t;return Ib(o,n,C)?(h(true),()=>{x=true;}):(h(false),OP(o,n,C).then(()=>{x||h(true);}).catch(S=>{x||h(true),console.error("Failed to load Ace editor resources",S);}),()=>{x=true;})},[o,t,n]),ot.useEffect(()=>{b&&f.current?.editor&&f.current.editor.resize();},[v,b]),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden rounded-md border border-border-input",s),style:{width:i,height:v},children:b?jsxRuntime.jsx(AP__default.default,{ref:f,mode:o,theme:n,value:e,onChange:r,readOnly:t,width:"100%",height:"100%",fontSize:p,showPrintMargin:false,showGutter:m,highlightActiveLine:!t,setOptions:{useWorker:true,showLineNumbers:u,tabSize:2,enableBasicAutocompletion:!t,enableLiveAutocompletion:!t,enableSnippets:!t,showFoldWidgets:true,wrap:g},editorProps:{$blockScrolling:true}}):jsxRuntime.jsx("div",{className:"flex h-full w-full items-center justify-center bg-surface-muted text-foreground-muted",children:"Loading editor\u2026"})})}var Vb=ot__namespace.createContext({variant:"contained",density:"comfortable",showDividers:true}),Ob=ot__namespace.createContext(null),UP={contained:"rounded-lg border border-border-default bg-background-surface overflow-hidden",bordered:"rounded-lg border border-border-default bg-background-surface",plain:"bg-transparent"},Bb={true:"divide-y divide-border-default",false:"gap-3"},KP={comfortable:"px-5 py-3",compact:"px-4 py-2.5"},YP={comfortable:"px-5 pt-0",compact:"px-4 pt-0"},XP={comfortable:"h-4 w-4",compact:"h-3.5 w-3.5"};function _p(){return ot__namespace.useContext(Vb)}function JP(e){let t=ot__namespace.useContext(Ob);if(!t)throw new Error(`${e} must be used within a <CollapseItem>`);return t}function jP({variant:e,showDividers:t,className:r}){let o="group/collapse-item w-full transition-colors",n={contained:"bg-background-surface",bordered:"bg-background-surface",plain:"bg-transparent"},a=t?"":"rounded-lg border border-border-default bg-background-surface overflow-hidden";return tailwindMerge.twMerge(o,n[e],a,r)}function qP({isDisabled:e,isPressed:t,density:r,variant:o,showDividers:n,className:a}){let i="group/collapse-header flex w-full items-start gap-4 text-left transition-colors duration-150",s=e?"cursor-not-allowed text-text-disabled":"cursor-pointer text-text-primary",l=t&&!e?"bg-background-hover":"",d=KP[r];return tailwindMerge.twMerge(i,pt(),d,s,l,o==="plain"&&n?"px-0":"",a)}function ZP({density:e,variant:t,showDividers:r,className:o}){let n="text-text-primary",a=YP[e];return tailwindMerge.twMerge(n,a,r?"":"rounded-b-lg",t==="plain"&&r?"px-0":"",o)}function yi({variant:e="contained",density:t="comfortable",showDividers:r=true,className:o,...n}){let a=ot__namespace.useMemo(()=>({variant:e,density:t,showDividers:r}),[e,t,r]),i=tailwindMerge.twMerge("flex w-full flex-col",UP[e],r?Bb.true:Bb.false,e==="plain"&&r?"border-y border-border-default/60":"");return jsxRuntime.jsx(Vb.Provider,{value:a,children:jsxRuntime.jsx(reactAriaComponents.DisclosureGroup,{...n,className:Fe(o,i)})})}function On({className:e,children:t,...r}){let{variant:o,showDividers:n}=_p();return jsxRuntime.jsx(reactAriaComponents.Disclosure,{...r,className:reactAriaComponents.composeRenderProps(e,a=>jP({variant:o,showDividers:n,className:a})),children:a=>jsxRuntime.jsx(Ob.Provider,{value:a,children:t})})}On.displayName="CollapseItem";function zn({title:e,description:t,startContent:r,endContent:o,indicator:n,indicatorPosition:a="end",showIndicator:i=true,keepIndicatorSpace:s=false,children:l,className:d,...c}){let u=JP("CollapseHeader"),{density:m,variant:p,showDividers:g}=_p(),f=XP[m];return jsxRuntime.jsx(reactAriaComponents.Button,{...c,slot:"trigger","data-expanded":u.isExpanded?"true":void 0,className:reactAriaComponents.composeRenderProps(d,(b,h)=>qP({isDisabled:h.isDisabled??false,isPressed:h.isPressed??false,density:m,variant:p,showDividers:g,className:b})),children:b=>{let h=b.isDisabled??false,v=i?typeof n=="function"?n({isExpanded:u.isExpanded,isDisabled:h}):n??jsxRuntime.jsx(G,{name:"CaretDown",size:m==="compact"?"xs":"sm",weight:"bold","aria-hidden":"true",className:tailwindMerge.twMerge("text-text-secondary transition-transform duration-200",u.isExpanded?"rotate-180":"rotate-0")}):null,x=v?jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex flex-shrink-0 items-center justify-center text-text-secondary",f),"aria-hidden":"true",children:v}):s?jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex flex-shrink-0 items-center justify-center",f),"aria-hidden":"true"}):null;return jsxRuntime.jsxs("div",{className:"flex w-full items-center gap-4",children:[a==="start"&&x,r&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center text-text-secondary",children:r}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[l??jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1 text-left",children:[e&&jsxRuntime.jsx("span",{className:"truncate font-medium text-text-primary",children:e}),t&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:t})]}),o&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center text-sm text-text-secondary",children:o})]}),a==="end"&&x]})}})}zn.displayName="CollapseHeader";function Hn({className:e,children:t,...r}){let{density:o,variant:n,showDividers:a}=_p();return jsxRuntime.jsx(reactAriaComponents.DisclosurePanel,{...r,className:reactAriaComponents.composeRenderProps(e,i=>ZP({density:o,variant:n,showDividers:a,className:i})),children:jsxRuntime.jsx(Mn,{children:t})})}Hn.displayName="CollapseContent";function vi(e){if(!e)return false;let t=e.startsWith("#")?e.slice(1):e;return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(t)}function em(e){if(!e)return "";let t=e.startsWith("#")?e.slice(1):e;return t.length===3&&(t=t.split("").map(r=>r+r).join("")),`#${t.toUpperCase()}`}function e1({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,className:s,validationResult:l,value:d,defaultValue:c,onChange:u,placeholder:m="#000000",showColorSwatch:p=true,reserveErrorSpace:g=true,...f}){let[b,h]=ot.useState(c||""),[v,x]=ot.useState(d||c||""),[C,S]=ot.useState(false),[w,T]=ot.useState(null),{isFocused:N,handleFocus:k,handleBlur:R}=Ar(),A=d!==void 0?d:b;ot.useEffect(()=>{d!==void 0&&x(d);},[d]);let M=A?!vi(A):false,B=ot.useCallback(X=>{if(x(X),vi(X)){let H=em(X);u?u(H):h(H);}else X===""&&(u?u(""):h(""));},[u]),D=ot.useCallback(X=>{let H=em(X);x(H),u?u(H):h(H);},[u]),W=ot.useCallback(X=>{if(vi(v)){let H=em(v);x(H),u&&H!==A?u(H):!u&&H!==b&&h(H);}R(X,f.onBlur);},[v,A,b,u,R,f.onBlur]);return jsxRuntime.jsx(reactAriaComponents.TextField,{...f,isRequired:a,className:Fe(s,"group flex flex-col"),children:({isDisabled:X})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 relative",children:[jsxRuntime.jsx(Zl,{size:o,disabled:X,type:"text",value:v,placeholder:m,onFocus:H=>k(H,f.onFocus),onBlur:W,onChange:H=>B(H.target.value),className:tailwindMerge.twMerge(rr({isInvalid:M,isDisabled:X,isFocused:N,size:o,transparent:i}),p?"pr-12":"pr-3","pl-3")}),p&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none",style:{width:_e[o].height},children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-6 h-6 rounded border shadow-sm",vi(A)?"border-border-default":"border-border-default bg-background-muted"),style:vi(A)?{backgroundColor:A}:void 0,"aria-hidden":"true",children:!vi(A)&&jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full border-2 border-border-muted"})})})})]}),jsxRuntime.jsx("div",{ref:T,children:jsxRuntime.jsx(te,{variant:"secondary",size:o,icon:"Palette",onPress:()=>S(!C),isDisabled:X,className:"flex-shrink-0",children:"Pick"})})]})}),g?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&l?jsxRuntime.jsx(ye,{size:o,children:r(l)}):t?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&l?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(l)}):t?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null}),C&&w&&jsxRuntime.jsx(Et,{triggerRef:{current:w},isOpen:C,onOpenChange:S,placement:"bottom end",className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-lg p-4",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:A||"#000000",onChange:D,style:{width:"200px",height:"200px"}}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded border border-border-default shadow-sm flex-shrink-0",style:{backgroundColor:A||"#000000"}}),jsxRuntime.jsx("div",{className:"flex-1 text-text-primary text-[length:var(--control-text-sm)] font-mono",children:A||"#000000"})]})]})})]})})}function Gb({isOpen:e,onClose:t,onConfirm:r,title:o,message:n,confirmLabel:a="Confirm",cancelLabel:i="Cancel",confirmVariant:s,isDestructive:l=false,isLoading:d=false,maxWidth:c="500px",minWidth:u="400px"}){return jsxRuntime.jsx(Dr,{isOpen:e,onClose:t,title:o,maxWidth:c,minWidth:u,primaryAction:{label:a,onPress:()=>{r();},variant:s??(l?"destructive":"primary"),isLoading:d},secondaryAction:{label:i,onPress:t,variant:"secondary",isDisabled:d},children:jsxRuntime.jsx("div",{className:"text-text-primary",children:n})})}function Wb({isConnected:e,connectedAt:t,disconnectedAt:r,showTimestamp:o=false,isLoading:n,size:a="sm",shape:i="pill",...s}){if(n)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-24"});let l=e?"Connected":"Disconnected",d=e?"success":"neutral",c=null;if(o){if(e&&t)c=Pl(t);else if(!e&&r){let u=Pl(r);c=u?`Offline ${u}`:null;}}return jsxRuntime.jsxs("div",{className:"inline-flex flex-col gap-1",children:[jsxRuntime.jsx(kt,{variant:d,size:a,shape:i,dot:e,dotPulse:e,...s,children:l}),c&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:c})]})}function Ub({firstName:e,lastName:t,email:r,phone:o,avatarUrl:n,href:a,LinkComponent:i,variant:s="outlined",layout:l="horizontal",showEmail:d=true,showPhone:c=false,isLoading:u=false,className:m,contentClassName:p,piiEntity:g}){let f=`${e} ${t}`.trim(),b=({children:v,className:x})=>a?i?jsxRuntime.jsx(i,{href:a,className:x,children:v}):jsxRuntime.jsx(St,{href:a,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",x),asButton:false,children:v}):jsxRuntime.jsx("span",{className:x,children:v}),h=l==="vertical";return u?jsxRuntime.jsx(at,{variant:s,className:tailwindMerge.twMerge("flex flex-col",m),children:jsxRuntime.jsx(at.Content,{className:"flex items-center flex-1",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",h?"flex flex-col items-center gap-4":"flex items-center gap-4"),children:[jsxRuntime.jsx(q,{width:56,height:56,className:"rounded flex-shrink-0"}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(h?"w-full text-center":"flex-1","space-y-2"),children:[jsxRuntime.jsx(q,{width:"70%",height:20,className:tailwindMerge.twMerge(h&&"mx-auto")}),jsxRuntime.jsx(q,{width:"100%",height:16,className:tailwindMerge.twMerge(h&&"mx-auto")})]})]})})}):jsxRuntime.jsx(at,{variant:s,className:tailwindMerge.twMerge("group/card flex flex-col",m),children:jsxRuntime.jsx(at.Content,{className:tailwindMerge.twMerge("flex items-center flex-1",a&&"cursor-pointer",p),children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative w-full",h?"flex flex-col items-center gap-4 text-center":"flex items-center gap-4"),children:[jsxRuntime.jsx(nn,{firstName:e,lastName:t,src:n,size:"xl",variant:"user",shape:"square",className:"flex-shrink-0",piiEntity:g}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(h?"w-full":"flex-1 min-w-0"),children:[a&&jsxRuntime.jsx(b,{className:"after:absolute after:inset-0",children:jsxRuntime.jsx("span",{className:"sr-only",children:f})}),jsxRuntime.jsx("span",{className:"text-lg font-semibold leading-tight text-text-primary block mb-1.5 group-hover/card:text-text-brand transition-colors","data-pii-type":g?"full-name":void 0,"data-pii-entity":g,children:f}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("space-y-0.5",h&&"flex flex-col items-center"),children:[d&&r&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2.5 text-text-primary",children:[jsxRuntime.jsx(G,{name:"Envelope",size:16,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(St,{href:`mailto:${r}`,variant:"unstyled",className:tailwindMerge.twMerge("text-sm leading-relaxed text-text-primary relative z-20",h?"":"truncate"),"data-pii-type":g?"email":void 0,"data-pii-entity":g,children:r})]}),c&&o&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2.5 text-text-primary",children:[jsxRuntime.jsx(G,{name:"Phone",size:16,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(St,{href:`tel:${o}`,variant:"unstyled",className:tailwindMerge.twMerge("text-sm leading-relaxed text-text-primary relative z-20",h?"":"truncate"),"data-pii-type":g?"phone":void 0,"data-pii-entity":g,children:ai(o)})]})]})]})]})})})}function lc({firstName:e,lastName:t,email:r,avatarUrl:o,layout:n="stacked",size:a="md",href:i,LinkComponent:s,linkVariant:l="unstyled",emphasis:d="normal",showEmail:c=false,badge:u,avatarShape:m,isLoading:p=false,className:g,piiEntity:f,piiPrimaryTextType:b="full-name"}){let h=m??(n==="inline"?"circle":"square"),x={xs:{avatarSize:"xs",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",skeletonAvatar:24,skeletonText:80,skeletonSecondary:60},sm:{avatarSize:"sm",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",skeletonAvatar:32,skeletonText:96,skeletonSecondary:72},md:{avatarSize:"md",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",skeletonAvatar:40,skeletonText:128,skeletonSecondary:96},lg:{avatarSize:"lg",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",skeletonAvatar:48,skeletonText:160,skeletonSecondary:120}}[a],C=`${e} ${t}`.trim(),w={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[d],T=({children:N,className:k})=>i?s?jsxRuntime.jsx(s,{href:i,className:k,children:N}):jsxRuntime.jsx(St,{href:i,variant:l,className:tailwindMerge.twMerge("hover:underline",k),asButton:false,children:N}):jsxRuntime.jsx("span",{className:k,children:N});return p?n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",x.gap,g),children:[jsxRuntime.jsx(q,{width:x.skeletonAvatar,height:x.skeletonAvatar,className:"flex-shrink-0 rounded-full"}),jsxRuntime.jsx(q,{width:x.skeletonText,height:x.skeletonAvatar*.5})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",x.gap,g),children:[jsxRuntime.jsx(q,{width:x.skeletonAvatar,height:x.skeletonAvatar,className:"flex-shrink-0 rounded-full"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(q,{width:x.skeletonText,height:16}),c&&jsxRuntime.jsx(q,{width:x.skeletonSecondary,height:12})]})]}):n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",x.gap,g),children:[jsxRuntime.jsxs(T,{className:tailwindMerge.twMerge("flex items-center",x.gap),children:[jsxRuntime.jsx(nn,{firstName:e,lastName:t,src:o,size:x.avatarSize,variant:"user",shape:h,className:"flex-shrink-0",piiEntity:f}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",w,x.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),"data-pii-type":f?b:void 0,"data-pii-entity":f,children:C})]}),u]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",x.gap,g),children:[jsxRuntime.jsx(nn,{firstName:e,lastName:t,src:o,size:x.avatarSize,variant:"user",shape:h,className:"flex-shrink-0",piiEntity:f}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(T,{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",w,x.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?b:void 0,"data-pii-entity":f,children:C})}),u]}),c&&r&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary leading-normal truncate",x.secondaryTextSize),"data-pii-type":f?"email":void 0,"data-pii-entity":f,children:r})]})]})}var rm=ot.createContext(null);function Kb(e){let t=ot.useContext(rm),r=ot.useRef(null),o=e??r,[n,a]=ot.useState(()=>t||{current:"xl",isSm:true,isMd:true,isLg:true,isXl:true,is2Xl:false,isMobile:false,isDesktop:true});return ot.useEffect(()=>{if(t){a(t);return}let i=o.current;if(!i||typeof ResizeObserver>"u")return;let s=()=>{let d=i.offsetWidth,c=d>=640,u=d>=768,m=d>=1024,p=d>=1280,g=d>=1536,f="base";g?f="2xl":p?f="xl":m?f="lg":u?f="md":c&&(f="sm"),a({current:f,isSm:c,isMd:u,isLg:m,isXl:p,is2Xl:g,isMobile:!u,isDesktop:u});};s();let l=new ResizeObserver(s);return l.observe(i),()=>l.disconnect()},[t,o]),n}function Xb({children:e,className:t}){let r=ot.useRef(null),[o,n]=ot.useState({current:"base",isSm:false,isMd:false,isLg:false,isXl:false,is2Xl:false,isMobile:true,isDesktop:false});return ot.useEffect(()=>{let a=r.current;if(!a||typeof ResizeObserver>"u")return;let i=()=>{let l=a.offsetWidth,d=l>=640,c=l>=768,u=l>=1024,m=l>=1280,p=l>=1536,g="base";p?g="2xl":m?g="xl":u?g="lg":c?g="md":d&&(g="sm"),n({current:g,isSm:d,isMd:c,isLg:u,isXl:m,is2Xl:p,isMobile:!c,isDesktop:c});};i();let s=new ResizeObserver(i);return s.observe(a),()=>s.disconnect()},[]),jsxRuntime.jsx(rm.Provider,{value:o,children:jsxRuntime.jsx("div",{ref:r,className:t,style:{width:"100%"},children:e})})}var cc={duration:.5,ease:"easeInOut"},co=ot.createContext(null);function dc(){let e=ot.useRef({played:false});return ot.useEffect(()=>{e.current.played=true;},[]),e.current}var ba=()=>{let e=ot.useContext(co);if(!e)throw new Error("useChartContext must be used within a ChartContextProvider");return e};function uc(e,t){if(t<=0||e.length<2)return e;let r=[e[0]];for(let o=1;o<e.length;o++)e[o].xValue.getTime()-e[o-1].xValue.getTime()>t&&r.push(null),r.push(e[o]);return r}var Wn=({data:e,color:t="var(--color-viz-default)",baseline:r,fillOpacity:o=.1,showLine:n=true,maxGapMs:a,animate:i=true})=>{let s=ot.useId(),l=ot.useId(),{xScale:d,yScale:c,animationSettings:u,entrance:m}=ba(),[p]=ot__namespace.default.useState(()=>m?.played!==true),g=i&&p,f=d.range(),b=c.range(),h=(N,k)=>typeof r=="function"?r(N,k):r??0,v=N=>N.chartYValue??N.yValue,x=e??[],C=a!=null?uc(x,a):x,S=i?void 0:"non-scaling-stroke",w={transformOrigin:`0 ${b[0]}px`,transformBox:"fill-box",isolation:"isolate"},T=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r===void 0?jsxRuntime.jsx(shape.AreaClosed,{data:C,x:N=>N?d(N.xValue):0,y:N=>N?c(v(N)):0,yScale:c,defined:N=>N!=null,fill:`url(#${s})`,curve:curve.curveLinear}):jsxRuntime.jsx(shape.Area,{data:C,x:N=>N?d(N.xValue):0,y0:(N,k)=>N?c(h(N,k)):0,y1:N=>N?c(v(N)):0,defined:N=>N!=null,fill:t,fillOpacity:o,curve:curve.curveLinear}),n?jsxRuntime.jsx(shape.LinePath,{data:C,x:N=>N?d(N.xValue):0,y:N=>N?c(v(N)):0,defined:N=>N!=null,stroke:t,strokeWidth:3,vectorEffect:S,curve:curve.curveLinear}):null]});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsxs("linearGradient",{id:s,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"50%",stopColor:t,stopOpacity:o}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:t,stopOpacity:0})]}),g&&jsxRuntime.jsx("clipPath",{id:l,children:jsxRuntime.jsx("rect",{x:f[0],y:b[1],width:f[1]-f[0],height:b[0]-b[1]})})]}),g?jsxRuntime.jsx("g",{clipPath:`url(#${l})`,children:jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:u.duration,ease:u.ease},style:w,children:T})}):jsxRuntime.jsx("g",{style:w,children:T})]})};var mc=({data:e,color:t="var(--color-viz-default)",opacity:r=1,categoryColors:o={}})=>{let{xScale:n,yScale:a,animationSettings:i}=ba(),s=ot.useId(),l=n.range(),d=a.range(),c=[...e??[]].sort((p,g)=>p.xValue.getTime()-g.xValue.getTime());if(c.length===0)return null;let u=c.length>1?c[1].xValue.getTime()-c[0].xValue.getTime():15*6e4,m=Math.abs(n(new Date(c[0].xValue.getTime()+u))-n(c[0].xValue));return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:s,children:jsxRuntime.jsx("rect",{x:l[0],y:d[1],width:l[1]-l[0],height:d[0]-d[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${s})`,children:jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:i.duration,ease:i.ease},style:{transformOrigin:`0 ${a(0)}px`,isolation:"isolate"},children:c.map((p,g)=>{let f=n(p.xValue),b=p.chartYValue??p.yValue,h=p.baselineValue??0,v=a(b),x=a(h),C=Math.min(v,x),S=Math.abs(v-x),w=c[g+1],T=w?Math.abs(n(w.xValue)-f):m,N=p.category&&o[p.category]?o[p.category]:t;return jsxRuntime.jsx(shape.Bar,{x:f-T/2,y:C,width:T,height:S,fill:N,opacity:r,rx:1},p.xValue.getTime())})})})]})};function N1(e,t){return e.length*(t*.6)}var xa;function k1(){if(xa!==void 0)return xa;if(typeof window>"u"||typeof document>"u")return xa=null,xa;try{xa=document.createElement("canvas").getContext("2d");}catch{xa=null;}return xa}function fc(e,t=12,r="system-ui"){let o=k1();return o?(o.font=`${t}px ${r}`,o.measureText(e).width):N1(e,t)}function sn(e,t=12,r="system-ui"){return e.length===0?0:Math.max(...e.map(o=>fc(o,t,r)))}function qb(e,t,r=12,o="system-ui"){if(t<=0)return "";if(fc(e,r,o)<=t)return e;let n="\u2026";if(fc(n,r,o)>t)return "";let a=0,i=e.length;for(;a<i;){let s=Math.ceil((a+i)/2);fc(e.slice(0,s)+n,r,o)<=t?a=s:i=s-1;}return e.slice(0,a)+n}var gc=(e,t,r)=>{if(!e.tooltipRange||e.baseline===void 0)return;let o=typeof e.baseline=="function"?e.baseline(t,r):e.baseline;return typeof o=="number"&&Number.isFinite(o)&&o!==t.yValue?o:void 0};function L1(e){return e>=1e9?"GW":e>=1e6?"MW":e>=1e3?"kW":"W"}function D1(e){return e>=1e3?"kA":e<1?"mA":"A"}function A1(e){return e>=1e3?"kV":e<1?"mV":"V"}function I1(e){return e>=1e6?"M\u03A9":e>=1e3?"k\u03A9":e<1?"m\u03A9":"\u03A9"}function Si(e,t){if(typeof e!="object"||e===null)return e;switch(e.type){case "energy":{if(e.unit||e.autoScale===false)return e;let r=e.sourceUnit?Xu[e.sourceUnit]:1;return {...e,unit:Yu(t*r)}}case "power":return e.unit||e.autoScale===false?e:{...e,unit:L1(t)};case "current":return e.unit||e.autoScale===false?e:{...e,unit:D1(t)};case "voltage":return e.unit||e.autoScale===false?e:{...e,unit:A1(t)};case "resistance":return e.unit||e.autoScale===false?e:{...e,unit:I1(t)};default:return e}}var F1=e=>e.baselineValue??0,je={top:8,right:0,bottom:50,left:60};function zr(e={type:"number"}){let t=i=>{if(i==null)return "-";let s=Ao({value:i,formatter:e});if(s===null)return "-";if(typeof s=="string")return s;if(typeof s=="number")return s.toString();if(typeof s=="object"&&s!==null&&"props"in s){let l=c=>{if(c==null)return "";if(typeof c=="string")return c;if(typeof c=="number")return c.toString();if(typeof c=="object"&&"props"in c){let u=c.props;if(u?.children)return Array.isArray(u.children)?u.children.map(l).join(""):l(u.children)}return ""};return l(s)||i.toString()}return i.toString()},r=i=>{if(i==null)return "-";if(typeof e=="string"){let s=Ao({value:i,formatter:e});return s===null?"-":String(s)}if(typeof e=="object"&&e.type)switch(e.type){case "energy":case "power":case "voltage":case "current":case "resistance":case "temperature":case "distance":return t(i);case "currency":return t(i);default:return t(i)}return t(i)},o,n,a;return typeof e=="object"&&e.type&&e.type==="number"&&("min"in e&&(o=e.min),"max"in e&&(n=e.max)),{format:t,tickFormat:r,min:o,max:n,tickInterval:a}}var nm=(e,t)=>{let r=d3Array.extent(e,o=>o.xValue);return scale.scaleTime({range:[je.left,t-je.right],domain:r,nice:true})},ys=(e,t,r,o)=>{let n=zr(r);if(o)return scale.scaleLinear({range:[t-je.bottom,je.top],domain:o,nice:true});let a=d3Array.min(e,d=>Math.min(d.yValue,d.chartYValue??d.yValue,d.baselineValue??d.yValue))||0,i=d3Array.max(e,d=>Math.max(d.yValue,d.chartYValue??d.yValue,d.baselineValue??d.yValue))||0,s=n.min!==void 0?n.min:a>=0?0:a*1.1,l=n.max!==void 0?n.max:i<=0?0:i*1.1;return scale.scaleLinear({range:[t-je.bottom,je.top],domain:[s,l],nice:true})};function vs(e){return e instanceof Date&&!Number.isNaN(e.getTime())}var Cs=12;function B1(e,t,r=12,o=false){if(!vs(t[0])||!vs(t[1]))return console.warn("ChartAxis: Invalid date in domain, skipping tick calculation"),[];let n=t[0].getTime(),a=t[1].getTime(),i=a-n;if(i===0||i<1e3)return [t[0]];let s=ap({start:t[0],end:t[1]},{compact:o}),d=[t[0],new Date((t[0].getTime()+t[1].getTime())/2),t[1]].map(v=>s(v)),c=sn(d,r),m=c+c,p=Math.floor(e/m),g=Math.max(2,Math.min(8,p));if(g<=2)return [t[0],t[1]];let f=[t[0]],b=i/36e5,h;b<=1?h=6e4:b<=6?h=5*6e4:b<=48?h=60*6e4:b<=168?h=360*6e4:h=1440*6e4;for(let v=1;v<g-1;v++){let x=v/(g-1),C=n+i*x,S=Math.round(C/h)*h,w=f[f.length-1].getTime(),T=S>w?S:w+h;if(T>=a)break;f.push(new Date(T));}return f.push(t[1]),f}var V1=({top:e,scale:t,width:r})=>{let o=t.domain(),n=[o[0],o[o.length-1]],a=vs(n[0])&&vs(n[1]),i=r<400,s=a?n[0].getTime():0,l=a?n[1].getTime():0,d=ot.useMemo(()=>a?ap({start:n[0],end:n[1]},{compact:i}):()=>"",[s,l,i,a]),c=ot.useMemo(()=>B1(r,n,12,i),[r,s,l,i]);return c.length===0?null:jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,tickValues:c,tickFormat:u=>{let m=u;return vs(m)?d(m):""},stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:(u,m,p)=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:m===0?"start":m===p.length-1?"end":"middle"}),rangePadding:0})};function ya(e,t=12){let r=t*2.5,o=Math.floor(e/r);return Math.max(2,Math.min(6,o))}var hc=12;function Qb(e,t,r){let o=zr(t),n=o.tickFormat||o.format,a=e.ticks(r?ya(r):5).map(i=>String(n(i)));return Math.ceil(sn(a,hc,"system-ui"))+12}var O1=({left:e,scale:t,yFormatter:r,height:o,labelLeft:n})=>{let a=zr(r),i=ot.useMemo(()=>!o||o<=0?5:ya(o),[o]);return jsxRuntime.jsx(axis.Axis,{orientation:"left",left:e,scale:t,numTicks:i,tickFormat:s=>(a.tickFormat||a.format)(s),stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:s=>{let l={fill:"var(--color-text-secondary)",fontSize:hc,textAnchor:n===void 0?"end":"start",...n===void 0?{}:{x:n}},d=t(s),[c,u]=t.range(),m=Math.min(c,u),p=Math.max(c,u);return d-m<hc/2?{...l,verticalAnchor:"start"}:p-d<hc/2?{...l,verticalAnchor:"end"}:{...l,dy:"0.33em"}}})},z1=({top:e,scale:t})=>jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:"middle",dy:"0.25em"})}),H1=({left:e,scale:t,availableWidth:r,labelLeft:o})=>jsxRuntime.jsx(axis.Axis,{orientation:"left",left:e,scale:t,stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickFormat:r===void 0?void 0:n=>qb(String(n),r,Cs),tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:Cs,textAnchor:o===void 0?"end":"start",...o===void 0?{}:{x:o},dx:o===void 0?"-0.25em":0,dy:"0.33em"})}),G1=({top:e,scale:t,yFormatter:r,width:o})=>{let n=zr(r),a=ot.useMemo(()=>{if(!o||o<=0)return 5;let s=Math.floor(o/60);return Math.max(2,Math.min(8,s))},[o]);return jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,numTicks:a,tickFormat:i=>(n.tickFormat||n.format)(i),stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:"middle",dy:"0.25em"})})},uo={Bottom:V1,Left:O1,CategoryBottom:z1,CategoryLeft:H1,NumericBottom:G1};var Ho=({data:e,formatter:t,label:r,categoryLabels:o})=>{let n=ot__namespace.default.useContext(co),a=o??n?.categoryLabels,i=n?.xScale,s=n?.width,l=n?.height,d=zr(t),c=v=>{if(v.baselineValue===void 0)return d.format(v.value);let x=Math.min(v.baselineValue,v.value),C=Math.max(v.baselineValue,v.value);return `${d.format(x)} \u2013 ${d.format(C)}`},u=ot__namespace.default.useRef(null),[m,p]=ot__namespace.default.useState({x:0,y:0,translate:"translate(-50%, -100%)"});if(ot__namespace.default.useEffect(()=>{if(!e||!u.current)return;let x=u.current.getBoundingClientRect(),C=s??window.innerWidth,S=l??window.innerHeight,w=e.x,T=e.y,N=16,k=e.x+x.width+N<=C,R=e.x-x.width-N>=0,A;e.position==="left"?A=R||!k:A=!k&&R;let M=A?"translate(calc(-100% - 16px), -50%)":"translate(16px, -50%)";if(!k&&!R){let B=C-e.x,D=e.x;B<=D?(w=C,M="translate(-100%, -50%)"):(w=0,M="translate(0, -50%)");}T-x.height/2<0?T=x.height/2:T+x.height/2>S&&(T=S-x.height/2),p({x:w,y:T,translate:M});},[e?.x,e?.y,e?.position,s,l]),!e)return null;let g=i?.domain(),b=g&&g.length===2&&g.every(v=>v instanceof Date)?lh({start:g[0],end:g[1]}):null,h=r||(b&&e.xValue instanceof Date?b(e.xValue):String(e.xValue));return jsxRuntime.jsx(framerMotion.AnimatePresence,{children:jsxRuntime.jsxs(framerMotion.motion.div,{ref:u,role:"tooltip","aria-live":"polite",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},"data-testid":"tooltip",className:"pointer-events-none absolute z-50 rounded-lg bg-background-surface p-4 text-sm shadow-xl ring-1 ring-border-default whitespace-nowrap",style:{left:m.x,top:m.y,transform:m.translate},children:[jsxRuntime.jsx("div",{className:"mb-1 font-medium text-text-primary",children:h}),e.isEvent?jsxRuntime.jsxs("div",{className:"space-y-2",children:[e.series.length>1&&jsxRuntime.jsx("ul",{className:"list-none p-0 border-b border-border-default pb-2",children:e.series.slice(0,-1).map(v=>jsxRuntime.jsxs("li",{className:"py-0.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"font-medium text-text-primary",children:[v.label,":"]}),jsxRuntime.jsx("span",{className:"text-text-secondary",children:c(v)})]}),v.category&&jsxRuntime.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3",style:{backgroundColor:v.categoryColor||v.color,borderRadius:"1px"}}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:a?.[v.category]||v.category})]}),v.extraTooltipRows&&v.extraTooltipRows.length>0&&jsxRuntime.jsx("div",{className:"mt-0.5 space-y-0.5",children:v.extraTooltipRows.map(x=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[jsxRuntime.jsxs("span",{children:[x.label,":"]}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:x.value})]},x.label))})]},v.label))}),(()=>{let v=e.series[e.series.length-1],x=e.eventItems?.length?e.eventItems:[{label:v.label,color:v.color,metadata:e.eventMetadata}];return jsxRuntime.jsx("div",{className:"space-y-2",children:x.map((C,S)=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:C.color}}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:C.label})]}),C.metadata&&Object.keys(C.metadata).length>0&&jsxRuntime.jsx("div",{className:"ml-4 mt-1 space-y-0.5 text-xs text-text-secondary",children:Object.entries(C.metadata).map(([w,T])=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"capitalize",children:[w,":"]}),jsxRuntime.jsx("span",{className:"font-medium",children:T})]},w))})]},`${C.label}-${S}`))})})()]}):jsxRuntime.jsx("ul",{className:"list-none p-0",children:e.series.map(v=>jsxRuntime.jsxs("li",{className:"py-0.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"font-medium text-text-primary",children:[v.label,":"]}),jsxRuntime.jsx("span",{className:"text-text-secondary",children:c(v)})]}),v.category&&jsxRuntime.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3",style:{backgroundColor:v.categoryColor||v.color,borderRadius:"1px"}}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:a?.[v.category]||v.category})]}),v.extraTooltipRows&&v.extraTooltipRows.length>0&&jsxRuntime.jsx("div",{className:"mt-0.5 space-y-0.5",children:v.extraTooltipRows.map(x=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[jsxRuntime.jsxs("span",{children:[x.label,":"]}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:x.value})]},x.label))})]},v.label))})]})})};var ox={top:20,right:20,bottom:50,left:60},sx=12,q1=.4,nx=60;function Z1({margin:e,orientation:t,labelsKey:r,width:o}){return ot.useMemo(()=>{if(e)return e;if(t!=="horizontal")return ox;let n=sn(r.split("\0"),Cs,"system-ui"),a=Math.max(nx,Math.floor(o*q1)),i=Math.ceil(n)+sx;return {...ox,left:Math.min(Math.max(i,nx),a)}},[e,t,r,o])}var lx=({data:e,width:t,height:r,margin:o,scaleToFit:n=false,color:a,yFormatter:i={type:"number"},showGrid:s=true,showAxes:l=true,animate:d=true,barRadius:c=4,barPadding:u=.3,onBarClick:m,onBarHover:p,activeIndex:g,className:f,style:b,"aria-label":h,orientation:v="horizontal",showTooltip:x=true})=>{let[C,S]=ot.useState(null),[w,T]=ot.useState(null),[N,k]=ot.useState(null),R=n&&t!==void 0&&r!==void 0,[A,M]=ot.useState(t??600),[B,D]=ot.useState(r??300),W=ot.useRef(null),X=g??C,H=ot.useId(),I=a||"var(--color-viz-default)";ot.useEffect(()=>{if(t!==void 0&&r!==void 0){M(t),D(r);return}if(!W.current)return;let E=new ResizeObserver(P=>{for(let Y of P)t===void 0&&M(Y.contentRect.width),r===void 0&&D(Y.contentRect.height);});return E.observe(W.current),t===void 0&&M(W.current.offsetWidth),r===void 0&&D(W.current.offsetHeight||300),()=>{E.disconnect();}},[t,r]);let F=e.map(E=>E.label).join("\0"),z=Z1({margin:o,orientation:v,labelsKey:F,width:A}),U=Math.max(0,z.left-sx),{xScale:K,yScale:O,innerWidth:V,innerHeight:L}=ot.useMemo(()=>{let E=A-z.left-z.right,P=B-z.top-z.bottom;if(v==="horizontal"){let $=d3Array.max(e,oe=>oe.value)||0;return {xScale:scale.scaleLinear({range:[0,E],domain:[0,$*1.1],nice:true}),yScale:scale.scaleBand({range:[0,P],domain:e.map(oe=>oe.label),padding:u}),innerWidth:E,innerHeight:P}}let Y=d3Array.max(e,$=>$.value)||0;return {xScale:scale.scaleBand({range:[0,E],domain:e.map($=>$.label),padding:u}),yScale:scale.scaleLinear({range:[P,0],domain:[0,Y*1.1],nice:true}),innerWidth:E,innerHeight:P}},[e,A,B,z,u,v]);if(e.length===0)return jsxRuntime.jsx("div",{ref:W,className:tailwindMerge.twMerge("flex h-full min-h-[200px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",f),style:r!==void 0?{height:r,...b}:b,children:"No data available"});let y=(E,P)=>{if(S(E),p?.(P,E),E!==null&&P){let Y,$;if(v==="horizontal"){let re=K(P.value),_=O(P.label)||0,he=O.bandwidth();Y=z.left+re,$=z.top+_+he/2;}else {let re=K,_=O,he=re(P.label)??0,me=re.bandwidth(),ue=_(P.value);Y=z.left+he+me/2,$=z.top+ue;}let oe=Y>A/2;k(P.label),T({xValue:new Date,series:[{label:"Value",value:P.value,color:P.color||I}],x:Y,y:$,position:oe?"left":"right"});}else T(null),k(null);};return jsxRuntime.jsxs("div",{ref:W,className:tailwindMerge.twMerge("relative w-full overflow-hidden rounded-lg bg-background-surface",!R&&"h-full",f),style:!R&&r!==void 0?{height:r,...b}:b,"aria-label":h,role:"img",children:[jsxRuntime.jsxs("svg",{width:A,height:B,viewBox:R?`0 0 ${A} ${B}`:void 0,style:R?{display:"block",width:"100%",height:"auto"}:void 0,children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx(gradient.LinearGradient,{id:`${H}-bar`,from:I,to:I,toOpacity:.85})}),jsxRuntime.jsxs(group.Group,{left:z.left,top:z.top,children:[s&&jsxRuntime.jsx("g",{className:"grid-lines",children:(v==="horizontal"?K.ticks(5):O.ticks(5)).map(E=>{let P=v==="horizontal"?0:O(E),Y=v==="horizontal"?K(E):0;return jsxRuntime.jsx("line",{x1:v==="horizontal"?Y:0,y1:v==="horizontal"?0:P,x2:v==="horizontal"?Y:V,y2:v==="horizontal"?L:P,stroke:"var(--color-border-default)",strokeOpacity:.5,strokeDasharray:"2,3"},E)})}),e.map((E,P)=>{let Y=X===P||X==null,$=E.color||`url(#${H}-bar)`;if(v==="horizontal"){let ie=K(E.value),fe=O.bandwidth(),Te=O(E.label)||0;return jsxRuntime.jsx(framerMotion.motion.rect,{x:0,y:Te,width:ie,height:fe,fill:$,rx:c,ry:c,initial:d?{width:0,opacity:.5}:void 0,animate:{width:ie,opacity:Y?1:.5},transition:{duration:.5,delay:P*.05,ease:"easeOut",opacity:{duration:.15,delay:0}},style:{cursor:m||p?"pointer":"default"},onMouseEnter:()=>y(P,E),onMouseLeave:()=>y(null,null),onClick:()=>m?.(E,P)},E.label)}let oe=K,re=O,_=oe.bandwidth(),he=oe(E.label)??0,me=re(E.value),ue=Math.max(0,L-me);return d?jsxRuntime.jsx(framerMotion.motion.rect,{x:he,width:_,fill:$,rx:c,ry:c,initial:{y:L,height:0,opacity:.5},animate:{y:me,height:ue,opacity:Y?1:.5},transition:{duration:.5,delay:P*.05,ease:"easeOut",opacity:{duration:.15,delay:0}},style:{cursor:m||p?"pointer":"default"},onMouseEnter:()=>y(P,E),onMouseLeave:()=>y(null,null),onClick:()=>m?.(E,P)},E.label):jsxRuntime.jsx("rect",{x:he,y:me,width:_,height:ue,fill:$,rx:c,ry:c,opacity:Y?1:.5,style:{cursor:m||p?"pointer":"default",transition:"opacity 150ms ease-out"},onMouseEnter:()=>y(P,E),onMouseLeave:()=>y(null,null),onClick:()=>m?.(E,P)},E.label)}),l&&v==="vertical"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(uo.CategoryBottom,{top:L,scale:K}),jsxRuntime.jsx(uo.Left,{left:0,scale:O,yFormatter:i,height:L})]}),l&&v==="horizontal"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(uo.NumericBottom,{top:L,scale:K,yFormatter:i,width:V}),jsxRuntime.jsx(uo.CategoryLeft,{left:0,labelLeft:-z.left,scale:O,availableWidth:U})]})]})]}),x&&!R&&jsxRuntime.jsx(Ho,{data:w,formatter:i,label:N??void 0})]})};var cx=({item:e,onToggle:t})=>{let r=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-3 w-3 shrink-0",style:{backgroundColor:e.fill,borderRadius:"1px",opacity:e.isHidden?.35:1}}),jsxRuntime.jsx("span",{className:`text-sm whitespace-nowrap ${e.isHidden?"text-text-disabled line-through":"text-text-secondary"}`,children:e.category})]});return t?jsxRuntime.jsx("button",{type:"button",className:"flex items-center gap-2 shrink-0 rounded-sm focus:outline-none focus:ring-2 focus:ring-border-focus disabled:cursor-not-allowed disabled:opacity-60","aria-pressed":!e.isHidden,"aria-label":`${e.isHidden?"Show":"Hide"} ${e.category}`,disabled:e.isDisabled,onClick:()=>t(e.id??e.category),children:r}):jsxRuntime.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})},$1=({items:e,onToggle:t})=>e.length===0?null:jsxRuntime.jsx("div",{className:"flex items-center gap-3 flex-wrap",children:e.map((r,o)=>jsxRuntime.jsx(cx,{item:r,onToggle:t},`${r.category}:${o}`))}),Ti=({items:e,onExport:t,marginLeft:r=0,marginRight:o=0,hideExport:n=false,isZoomed:a=false,onResetZoom:i,onLegendItemToggle:s})=>{let[l,d]=ot__namespace.default.useState(false),[c,u]=ot__namespace.default.useState(null),[m,p]=ot__namespace.default.useState(false),[g,f]=ot__namespace.default.useState(false),b=ot__namespace.default.useCallback(async v=>{d(true),u(v),f(false);try{await t(v);}catch(x){console.error("Export failed:",x);}finally{d(false),u(null);}},[t]),h=ot__namespace.default.useCallback(async v=>{await b(v);},[b]);return jsxRuntime.jsxs("div",{className:"mt-2 flex items-center justify-between gap-3 min-h-[32px]",style:{marginLeft:r,marginRight:o},children:[jsxRuntime.jsx("div",{className:"hidden sm:block flex-1 min-w-0",children:jsxRuntime.jsx($1,{items:e,onToggle:s})}),jsxRuntime.jsx("div",{className:"sm:hidden flex items-center gap-3",children:e.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>p(true),className:"text-sm text-text-secondary hover:text-text-primary transition-colors underline decoration-dotted underline-offset-4",children:"Legend"}),jsxRuntime.jsx(Lt,{isOpen:m,onClose:()=>p(false),title:"Legend",children:jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-3 p-4",children:e.map((v,x)=>jsxRuntime.jsx(cx,{item:v,onToggle:s},`${v.category}:${x}`))})})]})}),jsxRuntime.jsxs("div",{className:"sm:hidden flex items-center gap-2 shrink-0",children:[a&&i&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",onPress:i,"aria-label":"Reset Zoom",children:jsxRuntime.jsx(G,{name:"ArrowsOut",size:16})}),!n&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(te,{variant:"secondary",size:"sm",onPress:()=>f(true),isDisabled:l,"aria-label":"Export chart",children:jsxRuntime.jsx(G,{name:"Export",size:16})}),jsxRuntime.jsx(Lt,{isOpen:g,onClose:()=>f(false),title:"Export Chart",contentPadding:false,children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsxs("button",{onClick:()=>b("csv"),disabled:l,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(G,{name:"List",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:c==="csv"?"Exporting...":"Export as CSV"})]}),jsxRuntime.jsxs("button",{onClick:()=>b("svg"),disabled:l,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(G,{name:"Code",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:c==="svg"?"Exporting...":"Export as SVG"})]}),jsxRuntime.jsxs("button",{onClick:()=>b("png"),disabled:l,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(G,{name:"DownloadSimple",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:c==="png"?"Exporting...":"Export as PNG"})]})]})})]})]}),jsxRuntime.jsxs("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[a&&i&&jsxRuntime.jsxs(te,{variant:"secondary",size:"sm",onPress:i,children:[jsxRuntime.jsx(G,{name:"ArrowsOut",size:16}),jsxRuntime.jsx("span",{className:"hidden sm:inline",children:"Reset Zoom"})]}),!n&&jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(te,{variant:"secondary",size:"sm",isDisabled:l,children:[jsxRuntime.jsx(G,{name:"Export",size:16}),l?"Exporting...":"Export"]}),jsxRuntime.jsx(Et,{placement:"top end",className:"min-w-48 p-1 bg-background-surface rounded-lg shadow-xl ring-1 ring-border-default",children:jsxRuntime.jsxs(reactAriaComponents.Menu,{onAction:h,className:"outline-none",children:[jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"csv",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:l,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(G,{name:"List",size:14}),c==="csv"?"Exporting...":"Export as CSV"]})}),jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"svg",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:l,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(G,{name:"Code",size:14}),c==="svg"?"Exporting...":"Export as SVG"]})}),jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"png",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:l,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(G,{name:"DownloadSimple",size:14}),c==="png"?"Exporting...":"Export as PNG"]})})]})})]})]})]})};var yc=lg(cm());var dx=["stroke","fill","color","stop-color","flood-color","lighting-color"],ux=/var\s*\(/;function px(e,t){let r=[e,...Array.from(e.querySelectorAll("*"))],o=[t,...Array.from(t.querySelectorAll("*"))],n=Math.min(r.length,o.length);for(let a=0;a<n;a++){let i=r[a],s=o[a];if(!(i instanceof Element)||!(s instanceof Element))continue;let l=window.getComputedStyle(i);for(let d of dx){let c=s.getAttribute(d);if(c&&ux.test(c)){let u=l.getPropertyValue(d);u&&s.setAttribute(d,u.trim());}}if(s instanceof HTMLElement||s instanceof SVGElement)for(let d of dx){let c=d,u=s.style.getPropertyValue(c);if(u&&ux.test(u)){let m=l.getPropertyValue(c);m&&s.style.setProperty(c,m.trim());}}}}function dm(e,t,r=true){let o=e||"chart";if(r){let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return `${o}-${n}.${t}`}return `${o}.${t}`}async function um(e,t,r={},o){let n=Array.isArray(t[0])?t:[t];try{switch(e){case "csv":await tR(n,r);break;case "svg":await rR(o,r);break;case "png":await oR(o,r);break;default:throw new Error(`Unsupported export type: ${e}`)}}catch(a){throw console.error("Export failed:",a),new Error(`Failed to export chart as ${e}: ${a instanceof Error?a.message:"Unknown error"}`)}}async function tR(e,t){try{let r=t.yFormat?np(t.yFormat):null,o=t.yFormat,n=m=>{if(m==null||m==="")return "";if(!o)return typeof m=="number"?m:String(m);let p=sh(m,o);return p===null?typeof m=="number"?m:String(m):p},a=new Map;e.forEach(m=>{m.forEach(p=>{let g=p.xValue.getTime();a.has(g)||a.set(g,p.xValue);});});let i=Array.from(a.values()).sort((m,p)=>m.getTime()-p.getTime()),s=e.map((m,p)=>{let g=t.seriesLabels?.[p]||`Series ${p+1}`;return r&&!g.includes(`(${r})`)?`${g} (${r})`:g}),l=i.map(m=>{let p={[t.xLabel||"Date"]:m.toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})};return e.forEach((g,f)=>{let b=s[f],h=g.find(v=>v.xValue.getTime()===m.getTime());p[b]=h?n(h.yValue):"",h?.category&&(p[`${b} Category`]=h.category);}),p}),d=eR__default.default.unparse(l,{header:!0,skipEmptyLines:!0}),c=new Blob([d],{type:"text/csv;charset=utf-8;"}),u=dm(t.filename||"chart-data","csv",t.timestamp!==!1);(0,yc.saveAs)(c,u);}catch(r){throw new Error(`CSV export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function rR(e,t){if(!e.current)throw new Error("SVG element not found");try{let r=e.current,o=r.cloneNode(!0);if(px(r,o),!o.querySelector("rect[data-background]")){let d=document.createElementNS("http://www.w3.org/2000/svg","rect");d.setAttribute("width",o.getAttribute("width")||"100%"),d.setAttribute("height",o.getAttribute("height")||"100%"),d.setAttribute("fill","white"),d.setAttribute("data-background","true"),o.insertBefore(d,o.firstChild);}let i=new XMLSerializer().serializeToString(o);i.includes("<?xml")||(i=`<?xml version="1.0" encoding="UTF-8"?>
|
|
168
|
-
`+i),i.includes("xmlns=")||(i=i.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let s=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=dm(t.filename||"chart","svg",t.timestamp!==!1);(0,yc.saveAs)(s,l);}catch(r){throw new Error(`SVG export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function oR(e,t,r=2){if(!e.current)throw new Error("SVG element not found");let o="";try{let n=e.current,a=n.getBoundingClientRect(),i=n.cloneNode(!0);px(n,i),i.setAttribute("width",String(a.width)),i.setAttribute("height",String(a.height)),i.removeAttribute("transform");let s=i.getElementsByTagName("text");Array.from(s).forEach(m=>{m.style.fontFamily||(m.style.fontFamily="system-ui, -apple-system, sans-serif"),m.style.fontSize||(m.style.fontSize="12px");});let l=document.createElementNS("http://www.w3.org/2000/svg","rect");l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)),l.setAttribute("fill","white"),i.insertBefore(l,i.firstChild);let c=new XMLSerializer().serializeToString(i);c.includes("xmlns=")||(c=c.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let u=new Blob([c],{type:"image/svg+xml;charset=utf-8"});return o=URL.createObjectURL(u),new Promise((m,p)=>{let g=new Image,f=setTimeout(()=>{o&&URL.revokeObjectURL(o),p(new Error("Image loading timeout"));},1e4);g.onload=()=>{clearTimeout(f);try{let b=document.createElement("canvas");b.width=a.width*r,b.height=a.height*r;let h=b.getContext("2d");if(!h)throw new Error("Canvas context not available");h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.scale(r,r),h.fillStyle="white",h.fillRect(0,0,a.width,a.height),h.drawImage(g,0,0,a.width,a.height),b.toBlob(v=>{if(v){let x=dm(t.filename||"chart","png",t.timestamp!==!1);(0,yc.saveAs)(v,x),m();}else p(new Error("Failed to create PNG blob"));o&&URL.revokeObjectURL(o);},"image/png",1);}catch(b){o&&URL.revokeObjectURL(o),p(b);}},g.onerror=()=>{clearTimeout(f),o&&URL.revokeObjectURL(o),p(new Error("Failed to load SVG as image"));},g.src=o;})}catch(n){throw o&&URL.revokeObjectURL(o),new Error(`PNG export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function nR(e){if(typeof window>"u")return false;switch(e){case "csv":return true;case "svg":return typeof XMLSerializer<"u";case "png":return typeof HTMLCanvasElement<"u"&&typeof HTMLCanvasElement.prototype.toBlob=="function";default:return false}}function aR(e){return {csv:"CSV Spreadsheet",svg:"SVG Vector Image",png:"PNG Image"}[e]||"Unknown Format"}function vc({datasets:e,metadata:t,svgRef:r}){return ot.useCallback(async o=>{try{await um(o,e,t,r);}catch(n){throw console.error("Chart export failed:",n),n}},[e,t,r])}var pm=({data:e,seriesMetadata:t,width:r,height:o,onBrushChange:n,brushRegion:a,margin:i=je,yDomain:s})=>{let l=ot.useRef(null),d=ot.useRef(false),c=ot.useMemo(()=>e.flat(),[e]),u=ot.useMemo(()=>({top:10,bottom:15,left:i.left,right:i.right}),[i]),m=r-u.left-u.right,p=ot.useMemo(()=>{if(c.length===0)return scale.scaleTime({domain:[new Date,new Date],range:[0,m]});let v=new Date(Math.min(...c.map(C=>C.xValue.getTime()))),x=new Date(Math.max(...c.map(C=>C.xValue.getTime())));return scale.scaleTime({domain:[v,x],range:[0,m]})},[c,m]),g=ot.useMemo(()=>{let v=c.length>0?Math.max(0,...c.map(x=>x.yValue)):1;return scale.scaleLinear({domain:s??[0,v],range:[o-u.bottom,u.top]})},[c,o,s,u.top,u.bottom]),f=v=>{if(d.current)return;if(!v){n(null);return}let{x0:x,x1:C}=v;if(x===C)return;let S=new Date(x),w=new Date(C);if(!(Number.isNaN(S.getTime())||Number.isNaN(w.getTime()))){if(c.length>0){let T=Math.min(...c.map(M=>M.xValue.getTime())),N=Math.max(...c.map(M=>M.xValue.getTime())),R=(N-T)*.05;if(Math.abs(S.getTime()-T)<R&&Math.abs(w.getTime()-N)<R){n(null);return}}n([S,w]);}},b=ot.useMemo(()=>{if(c.length!==0)return {start:{x:0,y:u.top},end:{x:m,y:o-u.bottom}}},[m,o,c]);ot.useEffect(()=>{if(!l.current||c.length===0)return;let v=l.current.state;if(v?.isBrushing||v?.activeHandle)return;let x=Math.min(...c.map(k=>k.xValue.getTime())),C=Math.max(...c.map(k=>k.xValue.getTime())),S=a?a[0]:new Date(x),w=a?a[1]:new Date(C),T=l.current.state?.extent;if(T){let k=p.invert(T.x0),R=p.invert(T.x1),A=Math.abs(k.getTime()-S.getTime()),M=Math.abs(R.getTime()-w.getTime());if(A<1e3&&M<1e3)return}d.current=true;let N=k=>{let R=l.current.getExtent({x:p(S),y:u.top},{x:p(w),y:o-u.bottom});return {...k,start:{y:R.y0,x:R.x0},end:{y:R.y1,x:R.x1},extent:R}};l.current.updateBrush(N),setTimeout(()=>{d.current=false;},50);},[a,p,o,c]);let h={fill:"url(#brush_pattern)",fillOpacity:.15,stroke:"var(--color-border-focus)",strokeWidth:1.5,strokeOpacity:.3};return jsxRuntime.jsx("div",{className:"mt-2",children:jsxRuntime.jsxs("svg",{width:r,height:o,children:[jsxRuntime.jsx(pattern.PatternLines,{id:"brush_pattern",height:8,width:8,stroke:"var(--color-text-secondary)",strokeWidth:1,orientation:["diagonal"]}),jsxRuntime.jsxs("g",{transform:`translate(${u.left}, 0)`,children:[e.map((v,x)=>jsxRuntime.jsx(shape.LinePath,{data:v,x:C=>p(C.xValue),y:C=>g(C.yValue),stroke:t[x]?.color||"var(--color-gray-500)",strokeWidth:1.5,opacity:.8},`brush-series-${x}`)),jsxRuntime.jsx(brush.Brush,{xScale:p,yScale:g,width:m,height:o-u.top-u.bottom,margin:{top:u.top,bottom:u.bottom,left:0,right:0},handleSize:8,innerRef:l,resizeTriggerAreas:["left","right"],brushDirection:"horizontal",initialBrushPosition:b,onChange:f,onClick:()=>n(null),selectedBoxStyle:h,useWindowMoveEvents:true})]})]})})};function ln(e){switch(e){case "command":return _t("--color-action-brand","#111111");case "success":return _t("--color-feedback-success-border","#278a4a");case "warning":return _t("--color-feedback-warning-border","#c88420");case "error":return _t("--color-feedback-error-border","#c42d2d");case "alert":return _t("--color-feedback-warning-border","#c88420");default:return _t("--color-text-secondary","#525250")}}function Sc({events:e,color:t,showLabels:r=false}){let o=ot.useContext(co),[n,a]=ot.useState(null);if(!o)return console.warn("ChartEventMarkers must be used within a ChartContainer"),null;let{xScale:i,yScale:s,height:l,tooltip:d,datasets:c,seriesMetadata:u,seriesTypes:m,categoryColors:p}=o,g=e.filter(h=>{let v=i(h.timestamp);return v>=je.left&&v<=i.range()[1]}),f=ot.useCallback((h,v)=>{a(v);let x=i(h.timestamp),C=x>(i.range()[1]-je.right-je.left)/2+je.left,S=[];c&&u&&c.forEach((N,k)=>{if(N.length===0)return;let R=d3Array.bisector(W=>W.xValue).left,A=R(N,h.timestamp),M=N[A-1],B=N[A],D;if(!M)D=B;else if(!B)D=M;else {let W=Math.abs(h.timestamp.getTime()-M.xValue.getTime()),X=Math.abs(h.timestamp.getTime()-B.xValue.getTime());D=W<X?M:B;}D&&u[k]&&S.push({label:u[k].label,value:D.yValue,color:u[k].color,type:m?.[k]||"line",...D.category&&{category:D.category,categoryColor:p?.[D.category]}});});let T=g.filter(N=>Math.abs(i(N.timestamp)-x)<=10).map(N=>({label:N.label,color:N.color??t??ln(N.type),metadata:N.metadata}));S.push({label:T.length>1?`${T.length} events`:h.label,value:0,color:h.color??t??ln(h.type),type:"event"}),d.show({xValue:h.timestamp,series:S,x,y:S.length>1&&typeof S[0].value=="number"?s(S[0].value):l/2,position:C?"left":"right",isEvent:true,eventMetadata:h.metadata,eventItems:T});},[i,s,l,d,t,c,u,m,p,g]),b=ot.useCallback(()=>{a(null),d.hide();},[d]);return g.length===0?null:jsxRuntime.jsx("g",{className:"chart-event-markers","data-testid":"chart-event-markers",children:g.map((h,v)=>{let x=i(h.timestamp),C=h.color??t??ln(h.type),S=n===v;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:x,y1:je.top,x2:x,y2:l-je.bottom,stroke:C,strokeWidth:S?3:2,strokeDasharray:"4 4",strokeOpacity:S?.9:.6,pointerEvents:"none"}),jsxRuntime.jsx("circle",{cx:x,cy:je.top,r:S?5:4,fill:C,stroke:"var(--color-background-surface)",strokeWidth:2,pointerEvents:"none"}),jsxRuntime.jsx("circle",{cx:x,cy:l-je.bottom,r:S?5:4,fill:C,stroke:"var(--color-background-surface)",strokeWidth:2,pointerEvents:"none"}),r&&jsxRuntime.jsx("text",{x,y:je.top-8,textAnchor:"middle",fill:"var(--color-text-secondary)",fontSize:11,fontWeight:500,pointerEvents:"none",children:h.label}),jsxRuntime.jsx("rect",{x:x-10,y:je.top,width:20,height:l-je.top-je.bottom,fill:"transparent",style:{cursor:"pointer"},onMouseEnter:()=>f(h,v),onMouseLeave:b})]},`${h.timestamp.getTime()}-${v}`)})})}var vR=d3Array.bisector(e=>e.xValue).left;function CR(e,t){if(e.length===0)return;let r=vR(e,t),o=e[r-1],n=e[r];return o?n?Math.abs(t.getTime()-o.xValue.getTime())<Math.abs(t.getTime()-n.xValue.getTime())?{point:o,index:r-1}:{point:n,index:r}:{point:o,index:r-1}:n?{point:n,index:r}:void 0}function wc({spans:e,opacity:t=.25,color:r}){let o=ot.useContext(co),[n,a]=ot.useState(null),i=ot.useRef(Number.NEGATIVE_INFINITY),s=o?.xScale,l=o?.yScale,d=o?.height,c=o?.tooltip,u=o?.datasets,m=o?.seriesMetadata,p=o?.seriesTypes,g=o?.categoryColors,[f,b]=s?.domain()??[new Date(0),new Date(0)],[h,v]=s?.range()??[0,0],x=ot.useCallback((A,M,B)=>{if(!s||!c||(a(B),A.timeStamp-i.current<16))return;i.current=A.timeStamp;let{left:D}=A.currentTarget.ownerSVGElement?.getBoundingClientRect()??{left:0},W=A.clientX-D,X=s.invert(W),H=[];u&&m&&u.forEach((K,O)=>{let V=m[O],L=CR(K,X);if(!L||!V)return;let{point:y,index:E}=L,P=gc(V,y,E);H.push({label:V.label,value:y.yValue,...P!==void 0?{baselineValue:P}:{},chartY:y.chartYValue??y.yValue,showMarker:y.showTooltipMarker??true,color:V.color,type:p?.[O]??"line",...y.category?{category:y.category,categoryColor:g?.[y.category]}:{},...y.extraTooltipRows&&y.extraTooltipRows.length>0?{extraTooltipRows:y.extraTooltipRows}:{}});});let I=W>(v-h)/2+h,z=e.filter(K=>K.end>K.start&&K.start<M.end&&K.end>M.start).map(K=>({label:K.label,color:K.color??r??ln(K.type),metadata:K.metadata}));H.push({label:z.length>1?`${z.length} scheduled commands`:M.label,value:0,color:M.color??r??ln(M.type),type:"event"});let U=H.length>1?H[0]?.chartY??H[0]?.value:void 0;c.show({xValue:X,series:H,x:W,y:typeof U=="number"&&l?l(U):(d??0)/2,position:I?"left":"right",isEvent:true,eventMetadata:M.metadata,eventItems:z});},[s,l,d,c,u,m,p,g,r,h,v,e]),C=ot.useCallback(()=>{a(null),c?.hide();},[c]);if(!o)return console.warn("ChartEventSpans must be used within a ChartContainer"),null;let{xScale:S,height:w}=o,T=je.top,k=w-je.bottom-T,R=e.filter(A=>A.end>A.start);return R.length===0?null:jsxRuntime.jsx("g",{className:"chart-event-spans","data-testid":"chart-event-spans",children:R.map((A,M)=>{let B=A.start<f?f:A.start,D=A.end>b?b:A.end;if(B>=b||D<=f)return null;let W=S(B),H=S(D)-W;if(H<=0)return null;let I=A.color??r??ln(A.type);return jsxRuntime.jsx("rect",{x:W,y:T,width:H,height:k,fill:I,fillOpacity:n===M?Math.min((t??.25)*1.8,1):t??.25,pointerEvents:"all",style:{cursor:"pointer"},onMouseMove:z=>x(z,A,M),onMouseLeave:C},`${A.start.getTime()}-${A.end.getTime()}-${M}`)})})}var vx=ot.createContext(false);function fm({children:e}){return jsxRuntime.jsx(vx.Provider,{value:true,children:e})}function va(e){let t=ot.useContext(vx),[r,o]=ot.useState(false),[n,a]=ot.useState(null),i=ot.useRef(null),s=ot.useCallback(u=>{if(i.current?.disconnect(),i.current=null,!u||typeof ResizeObserver>"u")return;let m=new ResizeObserver(([p])=>{if(!p)return;let{width:g,height:f}=p.contentRect;a(b=>b&&b.width===g&&b.height===f?b:{width:g,height:f});});m.observe(u),i.current=m;},[]);ot.useEffect(()=>()=>i.current?.disconnect(),[]);let l=ot.useCallback(()=>{o(false),a(null);},[]),d=t?null:jsxRuntime.jsx(te,{variant:"icon",size:"sm",icon:"ArrowsOutSimple","aria-label":`Expand ${e} chart`,onPress:()=>o(true)}),c=ot.useCallback(u=>r&&!t?jsxRuntime.jsx(Dr,{isOpen:true,onClose:l,title:e,contentPadding:false,maxWidth:"min(1200px, 100vw)",minWidth:"min(360px, 100vw)",height:"82vh",mobileHeight:"82vh",children:jsxRuntime.jsx("div",{ref:s,className:"h-full w-full p-4",children:u})}):u,[r,t,l,e,s]);return {isExpanded:r,action:d,expandedSize:n,present:c}}function Nc(e){return e?.kind==="streaming"}function kc(e){if(typeof e!="string")return null;let t=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d{1,3})?(Z|[+-]\d{2}:\d{2})$/.exec(e);if(!t)return null;let r=Date.parse(e);if(!Number.isFinite(r))return null;let o=new Date(r),[,n,a,i]=t,s=new Date(`${n}-${a}-${i}T00:00:00Z`);return s.getUTCFullYear()!==Number(n)||s.getUTCMonth()+1!==Number(a)||s.getUTCDate()!==Number(i)?null:o}var kR={sm:"gap-4 px-6 py-8",md:"gap-5 px-8 py-12",lg:"gap-6 px-10 py-16"},PR={sm:"xs",md:"sm",lg:"md"},RR={sm:zt("bodySm"),md:zt("bodySm"),lg:zt("bodyMd")},MR={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-16 w-16"},ER={sm:20,md:24,lg:32},LR={center:"items-center text-center [&_.empty-state-actions]:justify-center [&_.empty-state-actions]:text-center",start:"items-start text-left [&_.empty-state-actions]:justify-start [&_.empty-state-actions]:text-left"},DR={mesh:"radial-gradient(at 20% 20%, rgba(68, 74, 225, 0.06) 0px, transparent 45%), radial-gradient(at 80% 80%, rgba(68, 74, 225, 0.045) 0px, transparent 45%), radial-gradient(at 50% 50%, rgba(68, 74, 225, 0.03) 0px, transparent 50%)","top-fade":"linear-gradient(to bottom, rgba(68, 74, 225, 0.06) 0%, rgba(68, 74, 225, 0.02) 60%, transparent 100%)",center:"radial-gradient(ellipse 600px 400px at center, rgba(68, 74, 225, 0.06) 0px, transparent 60%)",corners:"radial-gradient(at 0% 0%, rgba(68, 74, 225, 0.06) 0px, transparent 40%), radial-gradient(at 100% 100%, rgba(68, 74, 225, 0.045) 0px, transparent 40%)",bottom:"radial-gradient(ellipse 700px 300px at 50% 100%, rgba(68, 74, 225, 0.06) 0px, transparent 60%)",asymmetric:"radial-gradient(at 15% 30%, rgba(68, 74, 225, 0.06) 0px, transparent 45%), radial-gradient(at 85% 70%, rgba(68, 74, 225, 0.04) 0px, transparent 50%)"};function ki({icon:e,title:t,description:r,primaryAction:o,secondaryAction:n,actions:a,size:i="md",alignment:s="center",variant:l="default",spotlightPattern:d="mesh",fullHeight:c=false,className:u}){let m=i==="sm"?"sm":"md",p=l==="spotlight",g=p?{background:DR[d]}:void 0,f=()=>a?jsxRuntime.jsx("div",{className:"empty-state-actions mt-2 flex flex-wrap items-center gap-3",children:a}):o||n?jsxRuntime.jsxs("div",{className:"empty-state-actions mt-2 flex flex-col gap-3",children:[o&&(o.href?jsxRuntime.jsx(te,{variant:"secondary",size:m,onPress:o.onPress,isDisabled:o.isDisabled,isLoading:o.isLoading,href:o.href,children:o.label}):jsxRuntime.jsx(te,{variant:"secondary",size:m,onPress:o.onPress,isDisabled:o.isDisabled,isLoading:o.isLoading,children:o.label})),n&&jsxRuntime.jsx(St,{href:n.href||"#",variant:"muted",onPress:n.onPress,className:zt("labelMd"),children:n.label})]}):null;return jsxRuntime.jsxs("section",{"data-testid":"empty-state",role:"status","aria-live":"polite",className:tailwindMerge.twMerge("flex w-full flex-col rounded-xl text-text-primary",kR[i],LR[s],c?"h-full justify-center":"",p?"relative overflow-hidden":"",u),style:g,children:[e&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center justify-center rounded-full border border-border-muted bg-background-muted text-text-secondary",MR[i]),children:jsxRuntime.jsx(G,{name:e,size:ER[i]})}),jsxRuntime.jsx(vr,{size:PR[i],tag:"h2",className:"text-text-secondary",children:t}),r&&jsxRuntime.jsx("p",{className:tailwindMerge.twMerge("max-w-xs text-text-secondary whitespace-pre-line",RR[i]),children:r}),f()]})}function cn(e,t=""){return ot.Children.toArray(e).flatMap(r=>ot.isValidElement(r)&&r.type===ot.Fragment?cn(r.props.children,`${t}${String(r.key)}`):t&&ot.isValidElement(r)?[ot.cloneElement(r,{key:`${t}${String(r.key)}`})]:[r])}function Pc(e,t,r,o){if(r.length===0)throw new Error("tierForViewport: resolution ladder is empty");let n=[...r].sort((s,l)=>s.bucketMs-l.bucketMs),a=e/Math.max(1,t*o.targetPointsPerPx),i=Math.max(o.nativeMs,a);return n.find(s=>s.bucketMs>=i)??n[n.length-1]}function BR(e,t){return Math.floor(e/t.tileSpanMs)}function dn(e,t,r){let o=BR(e.startMs,t)-r,n=Math.ceil(e.endMs/t.tileSpanMs)-1+r,a=[];for(let i=o;i<=n;i++)a.push({tierId:t.id,index:i,startMs:i*t.tileSpanMs,endMs:(i+1)*t.tileSpanMs});return a}var br=(e,t)=>`${e}:${t}`,Ca=e=>!!e&&(e.line.length>0||(e.band?.length??0)>0||Object.values(e.lines??{}).some(t=>t.length>0));var wx={erroredTiles:0};function hm(e,t){let r=new Map,o=new Map,n=new Map,a=0;for(let m of e){let p=t.get(br(m.tierId,m.index));if(p&&(p.error&&(a+=1),!!p.data)){for(let g of p.data.line)r.set(g.xValue.getTime(),g);for(let g of p.data.band??[])o.set(g.xValue.getTime(),g);for(let[g,f]of Object.entries(p.data.lines??{})){let b=n.get(g);b||(b=new Map,n.set(g,b));for(let h of f)b.set(h.xValue.getTime(),h);}}}let i=(m,p)=>m.xValue.getTime()-p.xValue.getTime(),s=[...r.values()].sort(i),l=[...o.values()].sort(i),d=Object.fromEntries([...n.entries()].map(([m,p])=>[m,[...p.values()].sort(i)])),c,u;for(let m of [s,l,...Object.values(d)]){if(!m.length)continue;let p=m[0].xValue.getTime(),g=m[m.length-1].xValue.getTime();c=Math.min(c??p,p),u=Math.max(u??g,g);}return {line:s,band:l,lines:d,coverage:{earliestMs:c,latestMs:u,erroredTiles:a}}}function VR(e,t,r,o){let n=dn(e,t,0).filter(a=>o==null||a.startMs<o);return n.length===0?false:n.every(a=>{let i=r.get(br(a.tierId,a.index));return i!=null&&(i.status==="loaded"||i.status==="empty")})}function Tx(e,t,r){return dn(e,t,0).some(n=>{let a=r.get(br(n.tierId,n.index));return a?.status==="loaded"&&Ca(a.data)})}function OR(e,t){if(!Ca(e))return false;let r=e.coverage.earliestMs,o=e.coverage.latestMs;return r==null||o==null?false:r<t.endMs&&o>t.startMs}function Nx({viewport:e,targetTier:t,ladder:r,store:o,overscanTiles:n,prev:a,prevViewport:i,maxFutureMs:s}){let l=VR(e,t,o,s),d=dn(e,t,0).filter(p=>s==null||p.startMs<s).map(p=>o.get(br(p.tierId,p.index))),c=d.every(p=>p?.revalidated&&!p.refreshing&&!p.error),u=Tx(e,t,o);if(l&&(!u||a?.isFallback)&&d.some(p=>p?.refreshing||p?.error||p?.revalidated===false)&&a&&a.targetTier.id===t.id&&i?.startMs===e.startMs&&i?.endMs===e.endMs)return a;if(l&&(c||u)){let p=dn(e,t,n),{line:g,band:f,lines:b,coverage:h}=hm(p,o);return {line:g,band:f,lines:b,renderTier:t,targetTier:t,isFallback:false,isStale:false,coverage:h}}let m=r.findIndex(p=>p.id===t.id);for(let p=m+1;p<r.length;p++){let g=r[p];if(Tx(e,g,o)){let f=dn(e,g,n),{line:b,band:h,lines:v,coverage:x}=hm(f,o);return {line:b,band:h,lines:v,renderTier:g,targetTier:t,isFallback:true,isStale:false,coverage:x}}}if(l){let p=dn(e,t,n),{line:g,band:f,lines:b,coverage:h}=hm(p,o);return {line:g,band:f,lines:b,renderTier:t,targetTier:t,isFallback:false,isStale:false,coverage:h}}return a?OR(a,e)?{...a,targetTier:t,isFallback:true,isStale:false}:{line:a.line,band:a.band,lines:a.lines,renderTier:null,targetTier:t,isFallback:true,isStale:true,coverage:wx}:{line:[],band:[],lines:{},renderTier:null,targetTier:t,isFallback:false,isStale:false,coverage:wx}}var bm=new Map;function kx(e,t){switch(t.type){case "reset":return new Map;case "request":{let r=new Map(e);for(let o of t.ids){let n=r.get(o);t.refresh&&n?.data?r.set(o,{...n,refreshing:true,error:void 0,revalidated:false}):(!n||n.status==="error")&&r.set(o,{status:"loading",refreshing:!!t.refresh});}return r}case "cancel":{let r=new Map(e);for(let o of t.ids){let n=r.get(o);n&&r.set(o,{...n,refreshing:false,status:n.data?n.status:"error"});}return r}case "fulfilled":{let r=new Map(e);return r.set(t.id,{status:Ca(t.data)?"loaded":"empty",data:t.data,revision:(e.get(t.id)?.revision??0)+1,revalidated:t.refresh||e.get(t.id)?.revalidated}),r}case "failed":{let r=new Map(e),o=e.get(t.id);return r.set(t.id,o?.data?{...o,refreshing:false,error:t.error}:{status:"error",error:t.error}),r}default:return e}}function Rx({refs:e,refsKey:t,store:r,tier:o,viewport:n,fetchTile:a,dispatch:i,concurrency:s,maxFutureMs:l,resetKey:d,refreshKey:c,refreshEnabled:u=true,automaticLoads:m=false}){let p=ot.useRef({resetKey:d,refreshKey:c,refreshEnabled:u});ot.useLayoutEffect(()=>{p.current={resetKey:d,refreshKey:c,refreshEnabled:u};},[d,c,u]);let g=ot.useRef(new Map),f=ot.useRef(new Map),b=ot.useRef(0),h=ot.useRef(false),v=ot.useRef(null),x=ot.useRef(new Map),C=ot.useRef({resetKey:d,refreshKey:c,refreshEnabled:u}),S=ot.useRef(`${o.id}:${n.startMs}:${n.endMs}`),[w,T]=ot.useReducer(k=>k+1,0),N=ot.useCallback(()=>{for(let k of g.current.values())k.ac.abort();g.current.clear(),f.current.clear(),v.current=null,h.current=false,x.current.clear();},[]);return ot.useEffect(()=>{let k=`${o.id}:${n.startMs}:${n.endMs}`,R=C.current.resetKey!==d,A=C.current.refreshKey!==c,M=C.current.refreshEnabled&&!u;if(R&&N(),u)(A||h.current)&&!R&&(h.current=false,b.current+=1,v.current={generation:b.current,seen:new Set});else {h.current||(h.current=f.current.size>0||[...g.current.values()].some(F=>F.refresh));let I=[...f.current.keys()];for(let F of I)x.current.set(F,S.current);f.current.clear(),v.current=null;for(let[F,z]of g.current)!z.refresh&&!(M&&z.automatic)||(z.ac.abort(),g.current.delete(F),I.push(F),x.current.set(F,M&&S.current===k?k:z.viewportKey));I.length&&i({type:"cancel",ids:I});}C.current={resetKey:d,refreshKey:u||R?c:C.current.refreshKey,refreshEnabled:u},S.current=k;let B=v.current;if(B){let I=[];for(let F of e){let z=br(F.tierId,F.index);B.seen.has(z)||l!=null&&F.startMs>=l||(B.seen.add(z),f.current.set(z,B.generation),I.push(z));}I.length&&i({type:"request",ids:I,refresh:true});}let D=new Set(e.map(I=>br(I.tierId,I.index)));for(let I of f.current.keys())D.has(I)||(f.current.delete(I),x.current.set(I,k),i({type:"cancel",ids:[I]}));for(let[I,F]of g.current)(F.tierId!==o.id||F.refresh&&!D.has(I))&&(F.ac.abort(),g.current.delete(I),x.current.set(I,k),i({type:"cancel",ids:[I]}));let W=e.filter(I=>{if(l!=null&&I.startMs>=l)return false;let F=br(I.tierId,I.index);if(g.current.has(F))return false;let z=r.get(F),U=x.current.get(F);return U===k&&!f.current.has(F)?false:f.current.has(F)||U!=null||!z||z.status==="loading"}),X=(n.startMs+n.endMs)/2;W.sort((I,F)=>Math.abs((I.startMs+I.endMs)/2-X)-Math.abs((F.startMs+F.endMs)/2-X));let H=W.slice(0,Math.max(0,s-g.current.size));for(let I of H){let F=br(I.tierId,I.index),z=f.current.get(F),U=z!==void 0,K={ac:new AbortController,tierId:I.tierId,generation:z??b.current,refresh:U,automatic:m&&u,viewportKey:k};x.current.delete(F),g.current.set(F,K),i({type:"request",ids:[F],refresh:U});let O=l!=null?Math.min(I.endMs,l):I.endMs,V=()=>!K.ac.signal.aborted&&p.current.resetKey===d&&g.current.get(F)===K&&(!K.automatic||p.current.refreshEnabled)&&(!U||p.current.refreshEnabled&&p.current.refreshKey===c)&&(f.current.get(F)??K.generation)===K.generation;Promise.resolve().then(()=>{if(K.ac.signal.aborted)throw new DOMException("Aborted","AbortError");return a(o,I.startMs,O,K.ac.signal,{reason:U?"refresh":"load",isCurrent:V})}).then(L=>{V()&&i({type:"fulfilled",id:F,data:L,refresh:U});}).catch(L=>{if(!V())return;let y=L instanceof Error?L.message:String(L);i({type:"failed",id:F,error:new Error(`tile fetch failed (tile ${F}, tier ${o.id}): ${y}`)});}).finally(()=>{g.current.get(F)===K&&(g.current.delete(F),f.current.get(F)===K.generation&&f.current.delete(F),!f.current.size&&![...g.current.values()].some(L=>L.refresh)&&(v.current=null),T());});}},[e,t,r,a,o,n,i,s,l,d,c,u,m,N,w]),ot.useEffect(()=>N,[N]),{abortAll:N}}var Ex=1.3,KR=25e4,YR=3;function XR(e,t,r){let o=t.tileSpanMs/t.bucketMs,n=Math.max(1,Math.floor(KR/o/r));return Math.min(Math.max(1,Math.ceil(.5*e/t.tileSpanMs)),n)}function Rc(e){let{fetchTile:t,ladder:r,nativeMs:o,viewport:n,widthPx:a,maxFutureMs:i,targetPointsPerPx:s=1,concurrency:l=3,tileCostSeriesCount:d=YR,resetKey:c,refreshKey:u,refreshEnabled:m,automaticLoads:p}=e,g=ot.useMemo(()=>({targetPointsPerPx:s,nativeMs:o}),[s,o]),[f,b]=ot.useState(()=>Pc(n.endMs-n.startMs,Math.max(1,a),r,g)),[h,v]=ot.useReducer(kx,bm),[x,C]=ot.useState(c),S=x===c?h:bm,w=ot.useRef(null),T=ot.useRef(null);x!==c&&(C(c),w.current=null,T.current=null,v({type:"reset"}));let N=ot.useRef(n.endMs-n.startMs),k=ot.useRef(g);ot.useEffect(()=>{let V=n.endMs-n.startMs,L=Pc(V,Math.max(1,a),r,g);if(L.id===f.id){k.current=g;return}let E=Pc(V,Math.max(1,a),r,k.current).id!==L.id,P=V/N.current;(E||P>Ex||P<1/Ex)&&(N.current=V,k.current=g,b(L));},[n,a,r,f.id,g]);let R=n.endMs-n.startMs,A=ot.useMemo(()=>XR(R,f,d),[R,f,d]),M=ot.useMemo(()=>dn(n,f,A),[n,f,A]),B=ot.useMemo(()=>M.map(V=>br(V.tierId,V.index)).join(","),[M]),D=ot.useRef(M);D.current=M;let W=ot.useRef(n);W.current=n;let X=ot.useRef(S);X.current=S,Rx({refs:M,refsKey:B,store:S,tier:f,viewport:n,fetchTile:t,dispatch:v,concurrency:l,resetKey:c,refreshKey:u,refreshEnabled:m,automaticLoads:p,...i!=null?{maxFutureMs:i}:{}});let H=ot.useMemo(()=>D.current.map(V=>{let L=br(V.tierId,V.index),y=S.get(L);return `${L}:${y?.status??"\u2205"}:${y?.revision??0}:${!!y?.error}`}).join("|"),[B,S]),I=ot.useMemo(()=>{let V=Nx({viewport:W.current,targetTier:f,ladder:r,store:X.current,overscanTiles:A,prev:w.current,prevViewport:T.current,maxFutureMs:i});return w.current=V,T.current=W.current,V},[H,f,r,A,n.startMs,n.endMs,i,c]),F=ot.useMemo(()=>D.current.some(V=>X.current.get(br(V.tierId,V.index))?.status==="loading"),[H]),z=ot.useMemo(()=>{let V=D.current[0];return V?X.current.get(br(V.tierId,V.index))?.status==="empty":false},[H]),U=M.map(V=>S.get(br(V.tierId,V.index))),K=U.some(V=>V?.refreshing),O=U.find(V=>V?.error)?.error;return {tier:f,series:I,loading:F,refreshing:K,refreshError:O,atDataStart:z}}function ym(e){let{initialViewport:t,...r}=e,[o,n]=ot.useState(t),a=Rc({...r,viewport:o}),i=ot.useCallback(l=>n(l),[]),s=ot.useCallback(l=>n(l),[]);return {viewport:o,onViewportChange:i,jumpTo:s,...a}}var jR=1440*60*1e3,qR=[{id:"5y",label:"5 years",days:5*365},{id:"year",label:"Year",days:365},{id:"month",label:"Month",days:30},{id:"week",label:"Week",days:7},{id:"day",label:"24h",days:1}],ZR=[{id:"day",days:1},{id:"week",days:7},{id:"month",days:30}];function Lx(e,t=Date.now){return ZR.map(({id:r,days:o})=>({id:r,label:e[r],getRange:()=>{let n=new Date(t());return {after:dateFns.subDays(n,o),before:n}}}))}function Mc(e=Date.now){return qR.map(({id:t,label:r,days:o})=>({id:t,label:r,getRange:()=>{let n=e();return {after:new Date(n-o*jR),before:new Date(n)}}}))}function r2({selectionState:e,isDisabled:t}){let r=`${pt} w-full h-full flex items-center justify-center rounded-sm forced-color-adjust-none font-semibold`,o={none:"text-text-primary group-hover:bg-background-muted group-pressed:bg-background-muted",middle:["bg-background-selected group-hover:bg-background-muted forced-colors:group-hover:bg-[Highlight]","group-invalid:group-hover:bg-feedback-error-background forced-colors:group-invalid:group-hover:bg-[Mark]","group-pressed:bg-background-muted forced-colors:group-pressed:bg-[Highlight] forced-colors:text-[HighlightText]","group-invalid:group-pressed:bg-feedback-error-background forced-colors:group-invalid:group-pressed:bg-[Mark]"].join(" "),cap:"bg-action-default text-[color:var(--color-action-default-text)] group-invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:group-invalid:bg-[Mark] forced-colors:text-[HighlightText]"},n=t?"text-text-disabled forced-colors:text-text-disabled font-light":"";return [r,o[e],n].filter(Boolean).join(" ")}function Ri({errorMessage:e,...t}){return jsxRuntime.jsxs(reactAriaComponents.RangeCalendar,{...t,children:[jsxRuntime.jsx(nc,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"w-full border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(ac,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:r=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:r,className:"selection-start:rounded-s-full selection-end:rounded-e-full [td:last-child_&]:rounded-e-end group h-9 w-9 cursor-default text-sm border-0 outside-month:text-text-disabled invalid:selected:bg-feedback-error-background forced-colors:selected:bg-[Highlight] forced-colors:selected:text-[HighlightText] forced-colors:invalid:selected:bg-[Mark] [td:first-child_&]:rounded-s-full [&]:border-0",children:({formattedDate:o,isSelected:n,isSelectionStart:a,isSelectionEnd:i,isFocusVisible:s,isDisabled:l})=>jsxRuntime.jsx("span",{className:r2({selectionState:n&&(a||i)?"cap":n?"middle":"none",isDisabled:l}),children:o})})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-feedback-error-text",children:e})]})}function Ax(e){return e==="brand"?"primary":e==="default"||e==="secondary"||!e?"subtle":e}var n2={sm:"h-[var(--control-sm-height)] text-xs",md:"h-[var(--control-md-height)] text-sm",lg:"h-[var(--control-lg-height)] text-base",xl:"h-[var(--control-xl-height)] text-lg"},a2={sm:14,md:16,lg:18,xl:20},i2=({isSelected:e,isFirst:t,isLast:r,isDisabled:o,variant:n="subtle"})=>{let a=Ax(n),i=a==="primary"?"focus-visible:outline-action-primary":"focus-visible:outline-[color:var(--color-action-secondary-text)]";return a==="subtle"?tailwindMerge.twMerge(pt(),"focus-visible:outline-[color:var(--color-action-secondary-text)]","px-3 text-center transition cursor-pointer forced-color-adjust-none -ml-px first:ml-0 flex items-center justify-center h-full gap-2",e?"bg-background-muted text-text-primary font-medium forced-colors:!bg-[Highlight] forced-colors:!text-[HighlightText]":"text-text-secondary hover:bg-background-hover pressed:bg-background-hover forced-colors:!bg-[ButtonFace] forced-colors:!text-[ButtonText]",!r&&"border-r border-border-muted",o&&"bg-background-muted text-text-disabled forced-colors:!bg-[ButtonFace] forced-colors:!text-[GrayText] border-border-muted forced-colors:border-[GrayText] cursor-not-allowed"):tailwindMerge.twMerge(pt(),i,"px-3 text-center transition cursor-pointer forced-color-adjust-none -ml-px first:ml-0 flex items-center justify-center h-full gap-2",e?"bg-action-primary text-[color:var(--color-action-primary-text)] font-semibold forced-colors:!bg-[Highlight] forced-colors:!text-[HighlightText]":"text-text-secondary hover:bg-background-hover pressed:bg-background-hover forced-colors:!bg-[ButtonFace] forced-colors:!text-[ButtonText] hover:font-semibold",!r&&"border-r border-border-muted",o&&"bg-background-muted text-text-disabled forced-colors:!bg-[ButtonFace] forced-colors:!text-[GrayText] border-border-muted forced-colors:border-[GrayText] cursor-not-allowed")};function Lc({options:e,value:t,onChange:r,size:o="md",className:n,isDisabled:a,variant:i="subtle",iconOnly:s=false,"aria-label":l}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-flex overflow-hidden rounded-[var(--control-border-radius)]",Ax(i)==="subtle"?"border border-border-muted":"border-2 border-border-muted",n2[o],n),role:"group","aria-label":l,children:e.map((d,c)=>{let u=s&&!!d.icon;return jsxRuntime.jsxs(reactAriaComponents.ToggleButton,{isSelected:t===d.id,onChange:()=>r(d.id),className:i2({isSelected:t===d.id,isFirst:c===0,isLast:c===e.length-1,isDisabled:a,variant:i}),isDisabled:a,"aria-label":d.label,children:[d.icon&&jsxRuntime.jsx(G,{name:d.icon,size:a2[o]}),u?jsxRuntime.jsx("span",{className:"sr-only",children:d.label}):jsxRuntime.jsx("span",{className:"inline-flex flex-col items-center after:content-[attr(data-label)] after:font-semibold after:h-0 after:overflow-hidden after:invisible","data-label":d.label,children:d.label})]},d.id)})})}function d2(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function Sm(e){return d2(e)?e:(console.warn("Invalid date detected in TimeControls, using fallback:",e),new Date)}var zx=120*1e3,u2=.02,Hx={ONE_MINUTE:0,FIVE_MINUTES:1,FIFTEEN_MINUTES:2,HOUR:3,DAY:4,WEEK:5,MONTH:6,YEAR:7},p2=[{id:"FIFTEEN_MINUTES",label:"15m"},{id:"HOUR",label:"1h"},{id:"DAY",label:"1d"},{id:"WEEK",label:"1w"}];function Dc({dateRange:e,onDateRangeChange:t,windowSize:r,onWindowSizeChange:o,showWindowSize:n=true,showRangeSelector:a=true,allowDatePicker:i=false,lockWindowSize:s=false,showReset:l=true,restrictToSingleDay:d=false,presetRanges:c=[],windowSizeOptions:u=p2,autoAdjustWindowSize:m=false,size:p="md",className:g}){let[f,b]=ot.useState(0),h=ot.useRef(null),[v,x]=ot.useState(false),[C,S]=ot.useState(null),w=y=>{let P=(y.before.getTime()-y.after.getTime())/(1e3*60*60);return P<=24?"FIFTEEN_MINUTES":P<=72||P<=168?"HOUR":("DAY")};ot.useEffect(()=>{if(m&&!v&&o){let y=w(e);o(y);}},[e,m,v,o]);let T=y=>{let E;for(let P of c){let Y=P.getRange(),$=(Y.before.getTime()-Y.after.getTime())*u2,oe=Math.abs(Y.after.getTime()-y.after.getTime()),re=Math.abs(Y.before.getTime()-y.before.getTime());if(oe>$||re>$)continue;let _=oe+re;(!E||_<E.distance)&&(E={id:P.id,distance:_});}return E?.id},N=C&&c.some(y=>y.id===C.id)&&Math.abs(C.after-e.after.getTime())<=zx&&Math.abs(C.before-e.before.getTime())<=zx?C.id:T(e),k=Sm(e.after),R=Sm(e.before),A=new Date(R.getTime()-1),M={start:date.fromDate(k,date.getLocalTimeZone()),end:date.fromDate(A,date.getLocalTimeZone())};ot.useEffect(()=>{let y=new ResizeObserver(E=>{for(let P of E)b(P.contentRect.width);});return h.current&&y.observe(h.current),()=>{h.current&&y.unobserve(h.current);}},[]);let B=[...u].sort((y,E)=>Hx[y.id]-Hx[E.id]),D=y=>{let E=y.toString(),P=c.find(Y=>Y.id===E);if(P){let Y=P.getRange();S({id:E,after:Y.after.getTime(),before:Y.before.getTime()}),x(false),t(Y,{presetId:E});}},W=y=>{if(y?.start&&y?.end){S(null);let E=new Date(y.start.year,y.start.month-1,y.start.day,0,0,0,0),P=new Date(y.end.year,y.end.month-1,y.end.day+1,0,0,0,0);t({after:E,before:P});}},X=y=>{if(y){S(null);let E=new Date(y.year,y.month-1,y.day,0,0,0,0),P=new Date(y.year,y.month-1,y.day+1,0,0,0,0);t({after:E,before:P});}},H=y=>{o&&(x(true),o(y.toString()));},I=()=>{c.length>0&&D(c[0].id);},F=y=>Sm(y).toLocaleDateString("en-US"),z=B.map(y=>({id:y.id,label:y.label,value:y.id})),U=c.map(y=>({id:y.id,label:y.label,value:y.id})),K=s?jsxRuntime.jsx("div",{className:"flex items-center rounded-md border border-border-muted bg-background-muted px-3 py-2 text-sm text-text-secondary",children:B.find(y=>y.id===r)?.label||r}):jsxRuntime.jsx(on,{className:"w-full md:w-auto",selectedKey:r,onSelectionChange:H,items:z,size:p,"aria-label":"Select Window Size",children:y=>jsxRuntime.jsx(Ir,{id:y.id,"aria-label":y.label,size:p,children:y.label},y.id)}),O=l&&!N&&c.length>0,V=d?jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(te,{className:"border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",variant:"secondary",size:p,children:[jsxRuntime.jsx(G,{name:"CalendarBlank",size:18}),jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:F(e.after)})]}),jsxRuntime.jsx(Et,{className:"z-50 w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(xi,{"aria-label":"Select date",value:date.parseDate(k.toISOString().split("T")[0]),onChange:X})})]})}):jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(te,{className:tailwindMerge.twMerge("border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",O&&"rounded-r-none"),variant:"secondary",size:p,children:[jsxRuntime.jsx(G,{name:"CalendarBlank",size:18}),!N&&jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:`${F(e.after)} - ${F(A)}`})]}),jsxRuntime.jsx(Et,{className:"z-50 w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(Ri,{"aria-label":"Date range calendar",value:M,onChange:W})})]}),O&&jsxRuntime.jsx(te,{variant:"ghost",size:p,onPress:I,children:"Reset"})]}),L=f<600;return jsxRuntime.jsx("div",{ref:h,className:tailwindMerge.twMerge("flex w-full flex-wrap items-center justify-between gap-4",g),children:L?jsxRuntime.jsxs("div",{className:"flex w-full justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[i&&V,a&&c.length>0&&jsxRuntime.jsx(on,{selectedKey:N??"",onSelectionChange:D,items:U,size:p,"aria-label":"Select Date Range",children:y=>jsxRuntime.jsx(Ir,{id:y.id,size:p,children:y.label},y.id)})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&K})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[i&&V,a&&c.length>0&&jsxRuntime.jsx(Lc,{options:c.map(y=>({id:y.id,label:y.label})),value:N??"",onChange:D,size:"sm",variant:"secondary","aria-label":"Select Date Range"})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&K})]})})}function Ac({children:e,label:t="About this chart"}){return jsxRuntime.jsx(tr,{content:e,placement:"bottom end",openOnPress:true,children:jsxRuntime.jsx(te,{variant:"ghost",size:"sm","aria-label":t,className:"px-1.5",children:jsxRuntime.jsx(G,{name:"Info",size:16})})})}function Ic(){let e=new Map;return {publish(t,r){for(let[o,n]of e)o!==t&&n(r);},subscribe(t,r){return e.set(t,r),()=>{e.delete(t);}}}}var g2=d3Array.bisector(e=>e.xValue).left,h2=(e,t,r)=>{if(!e.tooltipRange||e.baseline===void 0)return;let o=typeof e.baseline=="function"?e.baseline(t,r):e.baseline;return typeof o=="number"&&Number.isFinite(o)&&o!==t.yValue?o:void 0};function Gx(e){let{mouseX:t,datasets:r,seriesMetadata:o,seriesTypes:n,xScale:a,yScale:i,plotLeft:s,plotRight:l}=e,d=a.invert(t),c=r.map((p,g)=>{if(!p||p.length===0)return null;let f=g2(p,d,1);if(f===0)return {point:p[0],index:0,datasetIndex:g};if(f>=p.length)return {point:p[p.length-1],index:p.length-1,datasetIndex:g};let b=p[f-1],h=p[f];if(!b||!h)return null;let v=Math.abs(b.xValue.getTime()-d.getTime()),x=Math.abs(h.xValue.getTime()-d.getTime()),C=v<x;return {point:C?b:h,index:C?f-1:f,datasetIndex:g}}).filter(p=>p!==null&&o[p.datasetIndex]!==void 0).map(({point:p,index:g,datasetIndex:f})=>({label:o[f].label,value:p.yValue,baselineValue:h2(o[f],p,g),color:o[f].color,point:p,type:n[f]}));if(c.length===0)return null;let u=a(c[0].point.xValue),m=u>(s+l)/2;return {xValue:c[0].point.xValue,series:c.map(({label:p,value:g,baselineValue:f,color:b,point:h,type:v})=>({label:p,value:g,...f!==void 0?{baselineValue:f}:{},chartY:h.chartYValue??g,showMarker:h.showTooltipMarker??true,color:b,type:v,...h.category!==void 0?{category:h.category}:{},...h.extraTooltipRows&&h.extraTooltipRows.length>0?{extraTooltipRows:h.extraTooltipRows}:{}})),x:u,y:i(c[0].point.chartYValue??c[0].value),position:m?"left":"right"}}var Kx=e=>e instanceof Date&&!Number.isNaN(e.getTime()),v2=160;function Fc(e,t,r){let[o,n]=ot.useState(null);ot.useImperativeHandle(r,()=>({setPreview:n}),[]);let[a,i]=e.range(),s=ot.useMemo(()=>o?d3Scale.scaleTime().domain([new Date(o[0]),new Date(o[1])]).range([a,i]):e,[o,e,a,i]),l=s.domain(),d=l[0],c=l[l.length-1],u=Kx(d)&&Kx(c),m=t<400,p=Math.max(2,Math.min(8,Math.floor(t/(m?70:110)))),g=ot.useMemo(()=>{if(!u)return [];let f=i-a;if(f<=0)return s.ticks(p);let[b,h]=s.domain(),v=b.getTime(),x=h.getTime(),C=(x-v)/f,S=Math.min(v2,f),w=S*C,T=d3Scale.scaleTime().domain([new Date(v-w),new Date(x+w)]).range([a-S,i+S]),N=d3Time.timeTickInterval(b,h,p);if(N)return T.ticks(N);let k=Math.max(2,Math.round(p*(f+2*S)/f));return T.ticks(k)},[s,p,u,a,i]);return {activeScale:s,ticks:g,start:d,end:c,valid:u,compact:m,rangeStart:a,rangeEnd:i}}var T2=6,Yx=20,Nm=ot.forwardRef(({top:e,scale:t,width:r},o)=>{let{activeScale:n,ticks:a,start:i,end:s,valid:l,compact:d,rangeStart:c,rangeEnd:u}=Fc(t,r,o),m=a.length>=2?a[1].getTime()-a[0].getTime():s.getTime()-i.getTime(),p=ot.useMemo(()=>l?ch(m,{compact:d}):()=>"",[m,d,l]),g=ot.useId(),f=Math.min(c,u),b=Math.abs(u-c);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:c,x2:u,y1:e,y2:e,stroke:"var(--color-border-muted)",strokeWidth:1}),a.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:g,children:jsxRuntime.jsx("rect",{x:f,y:e-4,width:b,height:Yx+16})})}),jsxRuntime.jsx("g",{clipPath:`url(#${g})`,children:a.map(h=>jsxRuntime.jsxs("g",{transform:`translate(${n(h)},${e})`,children:[jsxRuntime.jsx("line",{x1:0,x2:0,y1:0,y2:T2,stroke:"var(--color-border-muted)",strokeWidth:1}),jsxRuntime.jsx("text",{x:0,y:Yx,textAnchor:"middle",fontSize:12,fill:"var(--color-text-secondary)",children:p(h)})]},h.getTime()))})]})]})});Nm.displayName="LiveTimeAxisBottom";var km=ot.forwardRef(({scale:e,width:t,top:r,bottom:o},n)=>{let{activeScale:a,ticks:i,rangeStart:s,rangeEnd:l}=Fc(e,t,n),d=ot.useId(),c=Math.min(s,l),u=Math.abs(l-s);return jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:d,children:jsxRuntime.jsx("rect",{x:c,y:r,width:u,height:o-r})})}),jsxRuntime.jsx("g",{clipPath:`url(#${d})`,children:i.map(m=>{let p=a(m);return jsxRuntime.jsx("line",{x1:p,x2:p,y1:r,y2:o,stroke:"var(--color-border-muted)",strokeWidth:1},m.getTime())})})]})});km.displayName="LiveTimeGridlines";function Bc(e,t,r){let o=e[1]-e[0],n=t/Math.max(1,r)*o;return [e[0]-n,e[1]-n]}function Xx(e,t,r){let o=e[1]-e[0],n=e[0]+t*o,a=o/r,i=n-t*a;return [i,i+a]}function Pm(e,t,r=16,o=800){return t===1?e*r:t===2?e*o:e}var Jx=(e,t,r,o,n)=>{let a=t!==1?Xx(e,r,t):e;return o!==0&&(a=Bc(a,o,n)),a},Rm=(e,t)=>{if(!t)return e;let r=e[1]-e[0];if(r>=t[1]-t[0])return [t[0],t[1]];let[o,n]=e;return n>t[1]&&(n=t[1],o=n-r),o<t[0]&&(o=t[0],n=o+r),[o,n]},E2=e=>typeof requestAnimationFrame=="function"?requestAnimationFrame(e):setTimeout(()=>e(0),0),L2=e=>{typeof cancelAnimationFrame=="function"?cancelAnimationFrame(e):clearTimeout(e);};function jx(e){let{groupRef:t,overlayRef:r}=e,o=ot.useRef({xDomain:e.xDomain,plotWidthPx:e.plotWidthPx,plotLeftPx:e.plotLeftPx??0});o.current={xDomain:e.xDomain,plotWidthPx:e.plotWidthPx,plotLeftPx:e.plotLeftPx??0};let n=ot.useRef(e.onCommit);n.current=e.onCommit;let a=ot.useRef(e.panBoundsMs);a.current=e.panBoundsMs;let i=ot.useRef(e.getPanBoundsMs);i.current=e.getPanBoundsMs;let s=ot.useRef(e.settleMs??140);s.current=e.settleMs??140;let l=ot.useRef(e.zoomIntent??(F=>F.ctrlKey));l.current=e.zoomIntent??(F=>F.ctrlKey);let d=ot.useRef(e.onGestureStart);d.current=e.onGestureStart;let c=ot.useRef(e.onFramePreview);c.current=e.onFramePreview;let u=F=>F.button===0&&(F.shiftKey||F.ctrlKey||F.metaKey),m=ot.useRef(e.selectIntent??u);m.current=e.selectIntent??u;let p=ot.useRef(e.onSelectPreview);p.current=e.onSelectPreview;let g=ot.useRef(null),f=ot.useRef(null),b=ot.useRef({scale:1,cursorFrac:.5,panDxPx:0,timer:null}),h=ot.useRef(null),v=ot.useRef(null),x=ot.useRef(false),C=ot.useCallback((F,z,U)=>{v.current={translateX:F,scaleX:z,preview:U},h.current==null&&(h.current=E2(()=>{h.current=null;let K=v.current;if(K!=null){let O=`translate(${K.translateX},0) scale(${K.scaleX},1)`;t.current?.setAttribute("transform",O),r?.current?.setAttribute("transform",O),c.current?.(K.preview);}}));},[t,r]),S=ot.useCallback(()=>{h.current!=null&&(L2(h.current),h.current=null),v.current=null,t.current?.removeAttribute("transform"),r?.current?.removeAttribute("transform"),c.current?.(null);},[t,r]),w=ot.useCallback(()=>{x.current||(x.current=true,d.current?.());},[]),T=ot.useCallback(()=>{x.current=false;},[]),N=ot.useCallback(()=>{b.current.timer!=null&&(clearTimeout(b.current.timer),b.current.timer=null);},[]),k=ot.useCallback(()=>{b.current={scale:1,cursorFrac:.5,panDxPx:0,timer:null};},[]),R=ot.useCallback(()=>{let{xDomain:F,plotWidthPx:z}=o.current,{scale:U,cursorFrac:K,panDxPx:O}=b.current;U===1&&O===0||n.current(Rm(Jx(F,U,K,O,z),i.current?.()??a.current));},[]),A=ot.useCallback(()=>{b.current.timer!=null&&(N(),R(),k(),S());},[N,R,k,S]),M=ot.useCallback(F=>{if(A(),F.currentTarget.setPointerCapture?.(F.pointerId),p.current&&m.current(F)){let z=F.currentTarget.getBoundingClientRect().left,U=F.clientX-z;f.current={startX:U,currentX:U,leftPx:z},p.current?.([0,0]),w();return}g.current={startX:F.clientX,dxPx:0},w();},[A,w]),B=ot.useCallback(F=>{if(f.current){f.current.currentX=F.clientX-f.current.leftPx;let K=Math.max(1,o.current.plotWidthPx),O=Math.min(1,Math.max(0,f.current.startX/K)),V=Math.min(1,Math.max(0,f.current.currentX/K));p.current?.(O<=V?[O,V]:[V,O]);return}if(!g.current)return;g.current.dxPx=F.clientX-g.current.startX;let{xDomain:z,plotWidthPx:U}=o.current;C(g.current.dxPx,1,Bc(z,g.current.dxPx,U));},[C]),D=8,W=ot.useCallback(F=>{if(f.current){let{startX:U,currentX:K}=f.current;if(f.current=null,p.current?.(null),T(),Math.abs(K-U)<D)return;let{xDomain:O,plotWidthPx:V}=o.current,L=Math.max(1,V),y=O[1]-O[0],E=$=>O[0]+Math.min(1,Math.max(0,$/L))*y,P=E(Math.min(U,K)),Y=E(Math.max(U,K));n.current(Rm([P,Y],i.current?.()??a.current));return}if(!g.current)return;let{dxPx:z}=g.current;g.current=null,S(),T(),z!==0&&n.current(Rm(Bc(o.current.xDomain,z,o.current.plotWidthPx),i.current?.()??a.current));},[S,T]),X=ot.useCallback(()=>{if(f.current){f.current=null,p.current?.(null),T();return}g.current&&(g.current=null,S(),T());},[S,T]),H=ot.useRef(null),I=ot.useCallback(F=>{if(H.current?.(),H.current=null,!F)return;let z=U=>{if(g.current)return;let{plotWidthPx:K,plotLeftPx:O}=o.current,V=Pm(U.deltaY,U.deltaMode),L=Pm(U.deltaX,U.deltaMode),y=l.current(U);if(!y&&L===0)return;if(U.preventDefault(),w(),y){let $=Math.min(1,Math.max(0,(U.clientX-F.getBoundingClientRect().left)/Math.max(1,K)));b.current.scale*=Math.exp(-V/200),b.current.cursorFrac=$;}else b.current.panDxPx-=L;let{scale:E,cursorFrac:P,panDxPx:Y}=b.current;C((O+P*K)*(1-E)+Y,E,Jx(o.current.xDomain,E,P,Y,K)),N(),b.current.timer=setTimeout(()=>{R(),k(),S(),T();},s.current);};F.addEventListener("wheel",z,{passive:false}),H.current=()=>F.removeEventListener("wheel",z);},[C,S,N,R,k,w,T]);return ot.useEffect(()=>()=>{H.current?.(),H.current=null,S(),b.current.timer!=null&&clearTimeout(b.current.timer);},[S]),{onPointerDown:M,onPointerMove:B,onPointerUp:W,onPointerCancel:X,wheelTargetRef:I,gestureActiveRef:x}}var Ta=({data:e,color:t="var(--color-viz-default)",strokeWidth:r=3,strokeDasharray:o,categoryColors:n={},maxGapMs:a,animate:i=true})=>{let{xScale:s,yScale:l,animationSettings:d,entrance:c}=ba(),[u]=ot__namespace.default.useState(()=>c?.played!==true),m=i&&u,p=l.range(),g=Object.keys(n).length>0,f=T=>T.category?n[T.category]??t:t,b=T=>T.chartYValue??T.yValue,h=e??[],v=h.length===1?h[0]:void 0,x=a!=null?uc(h,a):h,C=i?void 0:"non-scaling-stroke",S=v?jsxRuntime.jsx("circle",{cx:s(v.xValue),cy:l(b(v)),r,fill:g?f(v):t}):g?h.slice(0,-1).map((T,N)=>{let k=h[N+1];return a!=null&&a>0&&k.xValue.getTime()-T.xValue.getTime()>a?null:jsxRuntime.jsx(shape.LinePath,{data:[T,k],x:R=>s(R.xValue),y:R=>l(b(R)),stroke:f(T),strokeWidth:r,strokeDasharray:o,strokeLinecap:"round",vectorEffect:C,curve:curve.curveLinear},`${T.xValue.getTime()}-${k.xValue.getTime()}`)}):jsxRuntime.jsx(shape.LinePath,{data:x,x:T=>T?s(T.xValue):0,y:T=>T?l(b(T)):0,defined:T=>T!=null,stroke:t,strokeWidth:r,strokeDasharray:o,strokeLinecap:"round",vectorEffect:C,curve:curve.curveLinear}),w={transformOrigin:`0 ${p[0]}px`,transformBox:"fill-box",isolation:"isolate"};return m?jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:d.duration,ease:d.ease},style:w,children:S}):jsxRuntime.jsx("g",{style:w,children:S})};var _x=ot.forwardRef(function({leftPx:t,topPx:r,widthPx:o,heightPx:n},a){let i=ot.useRef(null),s=ot.useRef(null),l=ot.useRef(null),d=ot.useRef(null);return ot.useImperativeHandle(a,()=>({setRange:c=>{let u=i.current;if(!u)return;if(!c||c[1]-c[0]<=0){u.setAttribute("opacity","0");return}u.setAttribute("opacity","1");let m=t+c[0]*o,p=t+c[1]*o;s.current?.setAttribute("x",String(m)),s.current?.setAttribute("width",String(p-m)),l.current?.setAttribute("x1",String(m)),l.current?.setAttribute("x2",String(m)),d.current?.setAttribute("x1",String(p)),d.current?.setAttribute("x2",String(p));}})),jsxRuntime.jsxs("g",{ref:i,opacity:0,pointerEvents:"none",children:[jsxRuntime.jsx("rect",{ref:s,x:t,y:r,width:0,height:n,fill:"var(--color-viz-categorical-1)",fillOpacity:.12}),[l,d].map((c,u)=>jsxRuntime.jsx("line",{ref:c,x1:t,x2:t,y1:r,y2:r+n,stroke:"var(--color-viz-categorical-1)",strokeOpacity:.9,strokeWidth:1,strokeDasharray:"4 3"},u))]})});var ty=e=>e.type===Wn||e.type===Ta,W2=({children:e,title:t,hideExport:r=false,hiddenSeriesLabels:o,onLegendItemToggle:n,legend:a,xMarkers:i,headerActions:s,headerControls:l,viewport:d,panBounds:c,getPanBounds:u,onViewportChange:m,onPlotWidthChange:p,yFormatter:g={type:"number"},yDomain:f,referenceLines:b,cameraSync:h,parentWidth:v=0,parentHeight:x=0})=>{let[C,S]=ot.useState(null),w=ot.useRef(null),T=ot.useRef(0),N=ot.useId(),k=ot.useRef(null),R=ot.useRef(null),A=ot.useRef(null),{colorMode:M}=hr(),B=ot.useMemo(()=>tn(),[M]),D=ot.useMemo(()=>$i(),[M]),{datasets:W,seriesMetadata:X,seriesTypes:H}=ot.useMemo(()=>{let Z=cn(e).filter(Tt=>ot.isValidElement(Tt)&&ty(Tt)),le=Z.filter(Tt=>Tt.props.data).length,Ae=[],Oe=[],it=[];return Z.forEach((Tt,Ot)=>{let tt=Tt.props;if(!tt.data)return;let xr="label"in tt&&tt.label||`Series ${Ae.length+1}`;Ae.push(o?.has(xr)?[]:tt.data);let xo=("color"in tt&&tt.color?tt.color:void 0)||(le===1?D:B[Ot%B.length]),ne=Tt.type===Wn;Oe.push({label:xr,color:xo,maxGapMs:tt.maxGapMs,...ne&&"baseline"in tt&&tt.baseline!==void 0?{baseline:tt.baseline,tooltipRange:"tooltipRange"in tt&&tt.tooltipRange||false}:{}}),it.push(ne?"area":"line");}),{datasets:Ae,seriesMetadata:Oe,seriesTypes:it}},[e,D,B,o]),I=va(t),F=I.expandedSize?.width??v,z=s||I.action?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s,I.action]}):void 0,{headerRef:U,headerHeight:K}=ci(!!z,!!l),{ref:O,height:V}=Bl(),L=Math.max(100,(I.expandedSize?.height??x)-K-(V||50)),y=ot.useMemo(()=>[new Date(d.startMs),new Date(d.endMs)],[d.startMs,d.endMs]),E=ot.useMemo(()=>{let Z=W.flat(),le=W.flatMap((Ae,Oe)=>Ae.filter((it,Tt)=>{let Ot=it.xValue.getTime();if(Ot>=d.startMs&&Ot<=d.endMs)return true;if(typeof f!="function")return false;let tt=Ot<d.startMs?Ae[Tt+1]:Ae[Tt-1];if(!tt)return false;let xr=tt.xValue.getTime(),gr=X[Oe].maxGapMs;return gr!=null&&gr>0&&Math.abs(xr-Ot)>gr?false:Ot<d.startMs?xr>d.startMs:xr<d.endMs}));return le.length>0?le:Z},[W,X,d.startMs,d.endMs,f]),P=ot.useMemo(()=>{let Z=typeof f=="function"?f(E):f,le=ys(E,L,g,Z);if(!f){let[Ae,Oe]=le.domain();Oe>Ae&&le.domain([Ae,Oe+(Oe-Ae)*.05]);}return le},[E,L,g,f]),Y=ot.useRef(JSON.stringify(g)),$=ot.useRef(null),oe=ot.useMemo(()=>{let[Z,le]=P.domain(),Ae=Math.max(Math.abs(Z),Math.abs(le)),Oe=JSON.stringify(g);if(Oe!==Y.current&&(Y.current=Oe,$.current=null),$.current!==null)return $.current;if(Ae===0)return Si(g,0);let it=Si(g,Ae);return $.current=it,it},[P,g]),re=ot.useMemo(()=>{let Z=L-je.top-je.bottom;return ya(Z)},[L]),_=ot.useMemo(()=>{let Z=zr(oe),le=Z.tickFormat||Z.format,Oe=P.ticks(re).map(Ot=>le(Ot)),it=sn(Oe,12,"system-ui"),Tt=Math.ceil(it)+12;return {...je,left:Math.max(Tt,30),bottom:30}},[P,oe,re]),he=ot.useMemo(()=>scale.scaleTime({domain:y,range:[_.left,F-_.right]}),[y,F,_]),me=ot.useMemo(()=>[d.startMs,d.endMs],[d.startMs,d.endMs]),ue=ot.useMemo(()=>c?[c.startMs,c.endMs]:void 0,[c]),ie=ot.useCallback(Z=>{m({startMs:Z[0],endMs:Z[1]});},[m]),fe=F-_.left-_.right,Te=ot.useCallback(()=>S(null),[]),Ye=ot.useRef({}),yt=ot.useRef(h);yt.current=h;let Qt=ot.useCallback(Z=>{R.current?.setPreview(Z),A.current?.setPreview(Z),yt.current?.publish(Ye.current,Z);},[]),Ze=ot.useRef(null),fr=ot.useRef(null),lr=ot.useCallback(Z=>{fr.current?.setRange(Z);},[]),{onPointerDown:Ce,onPointerMove:Vt,onPointerUp:ee,onPointerCancel:Be,wheelTargetRef:Ve,gestureActiveRef:nt}=jx({onSelectPreview:lr,overlayRef:Ze,xDomain:me,plotWidthPx:fe,plotLeftPx:_.left,groupRef:k,onCommit:ie,onGestureStart:Te,onFramePreview:Qt,...ue?{panBoundsMs:ue}:{},...u?{getPanBoundsMs:()=>{let Z=u();return [Z.startMs,Z.endMs]}}:{}}),wt=ot.useRef({startMs:d.startMs,endMs:d.endMs,left:0,width:0});wt.current={startMs:d.startMs,endMs:d.endMs,left:_.left,width:fe},ot.useEffect(()=>{if(!h)return;let Z=()=>{k.current?.removeAttribute("transform"),R.current?.setPreview(null),A.current?.setPreview(null);},le=Oe=>{if(nt.current)return;if(Oe==null){Z();return}let{startMs:it,endMs:Tt,left:Ot,width:tt}=wt.current,xr=Tt-it,gr=Oe[1]-Oe[0];if(xr<=0||gr<=0||tt<=0)return;let xo=xr/gr,ne=Ot*(1-xo)+(it-Oe[0])*tt/gr;k.current?.setAttribute("transform",`translate(${ne},0) scale(${xo},1)`),R.current?.setPreview(Oe),A.current?.setPreview(Oe);},Ae=h.subscribe(Ye.current,le);return ()=>{Ae(),nt.current||Z();}},[h,nt]),ot.useEffect(()=>{p?.(Math.max(0,F-_.left-_.right));},[F,_,p]);let Xt=ot.useCallback(Z=>{if(nt.current)return;let{left:le}=w.current?.getBoundingClientRect()||{left:0},Ae=Z.clientX-le;Z.timeStamp-(T.current||0)<16||(T.current=Z.timeStamp,S(Gx({mouseX:Ae,datasets:W,seriesMetadata:X,seriesTypes:H,xScale:he,yScale:P,plotLeft:_.left,plotRight:F-_.right})));},[W,X,H,he,P,F,_,nt]),Q=ot.useCallback(()=>S(null),[]),j=dc(),pe={width:F,height:L,xScale:he,yScale:P,yFormatter:oe,animationSettings:cc,entrance:j,tooltip:{data:C,show:S,hide:()=>S(null)},datasets:W,seriesMetadata:X,seriesTypes:H},ae=0,Ne=[];cn(e).forEach(Z=>{if(!ot.isValidElement(Z)){Ne.push(Z);return}if(ty(Z)){let le=ae;ae++;let Ae=Z.props;Ne.push(ot__namespace.default.cloneElement(Z,{...Ae,...X[le]&&o?.has(X[le].label)?{data:[]}:{},color:X[le]?.color,animate:false}));}else Ne.push(Z);});let Qe=a??X.map(Z=>({category:Z.label,fill:Z.color,isHidden:o?.has(Z.label)??false})),Ue=vc({datasets:W,metadata:{xLabel:"Date",yLabel:"Value",seriesLabels:X.map(Z=>Z.label),timestamp:true},svgRef:w}),cr=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("title",{children:t}),jsxRuntime.jsx("g",{children:P.ticks(re).map(Z=>{let le=Math.abs(Z)<Number.EPSILON;return jsxRuntime.jsx(shape.Line,{from:{x:_.left,y:P(Z)},to:{x:F-_.right,y:P(Z)},stroke:le?"var(--color-border-default)":"var(--color-border-muted)",strokeWidth:le?1.5:1},`grid-line-${Z}`)})}),jsxRuntime.jsx(km,{ref:A,scale:he,width:F-_.left-_.right,top:P.range()[1],bottom:P.range()[0]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:N,children:jsxRuntime.jsx("rect",{x:he.range()[0],y:P.range()[1],width:he.range()[1]-he.range()[0],height:P.range()[0]-P.range()[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${N})`,children:jsxRuntime.jsx("g",{"data-camera-plot-group":"",ref:k,children:Ne})}),b&&b.length>0&&jsxRuntime.jsx("g",{children:b.map((Z,le)=>{let Ae=P(Z.value),Oe=Z.color??"var(--color-error-base)";return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(shape.Line,{from:{x:_.left,y:Ae},to:{x:F-_.right,y:Ae},stroke:Oe,strokeWidth:1.5,strokeDasharray:"6 4"}),Z.label&&jsxRuntime.jsx("text",{x:F-_.right-4,y:Ae-4,textAnchor:"end",fontSize:11,fill:Oe,children:Z.label})]},`ref-line-${le}`)})}),jsxRuntime.jsx(Nm,{ref:R,top:L-_.bottom,scale:he,width:F-_.left-_.right}),jsxRuntime.jsx(uo.Left,{left:_.left,scale:P,yFormatter:oe,height:L-_.top-_.bottom}),C&&!C.isEvent&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(shape.Line,{"data-testid":"chart-hover-crosshair",from:{x:he(C.xValue),y:P.range()[1]},to:{x:he(C.xValue),y:P.range()[0]},stroke:"var(--color-text-secondary)",strokeWidth:1,strokeDasharray:"3 3",opacity:.7}),C.series.filter(Z=>Z.type!=="bar"&&Z.showMarker!==false).map(Z=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("circle",{cx:he(C.xValue),cy:P(Z.chartY??Z.value),r:8,fill:"white",stroke:Z.color,strokeWidth:2,style:{transition:"all 100ms ease-out"}}),jsxRuntime.jsx("circle",{cx:he(C.xValue),cy:P(Z.chartY??Z.value),r:4,fill:Z.color,style:{transition:"all 100ms ease-out"}})]},`highlight-${Z.label}`))]}),jsxRuntime.jsx("rect",{"data-camera-surface":"",x:_.left,y:_.top,width:F-_.left-_.right,height:L-_.top-_.bottom,fill:"transparent",style:{cursor:"grab",touchAction:"none"},onMouseMove:Xt,onMouseLeave:Q,onPointerDown:Ce,onPointerMove:Vt,onPointerUp:ee,onPointerCancel:Be,onContextMenu:Z=>{(Z.ctrlKey||Z.metaKey)&&Z.preventDefault();},ref:Ve}),jsxRuntime.jsx("g",{ref:Ze,children:i?.map(Z=>{let le=he(new Date(Z.timeMs));if(!Number.isFinite(le)||le<_.left||le>F-_.right)return null;let Ae=Z.color??"var(--color-error-base)",Oe=()=>{Z.point&&S({xValue:new Date(Z.timeMs),series:[{label:Z.point.label,value:Z.point.value,color:Ae,showMarker:false}],x:le,y:P(Z.point.value),position:le>(_.left+(F-_.right))/2?"left":"right"});};return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:le,x2:le,y1:_.top,y2:L-_.bottom,stroke:"transparent",strokeWidth:7,onMouseMove:Z.point?Oe:Xt,onMouseLeave:Q}),jsxRuntime.jsx("line",{x1:le,x2:le,y1:_.top,y2:L-_.bottom,stroke:Ae,strokeWidth:1,strokeOpacity:.75,vectorEffect:"non-scaling-stroke",pointerEvents:"none"})]},`${Z.timeMs}:${Z.label}`)})}),jsxRuntime.jsx(_x,{ref:fr,leftPx:_.left,topPx:_.top,widthPx:F-_.left-_.right,heightPx:L-_.top-_.bottom})]});return I.present(jsxRuntime.jsx("div",{className:"relative flex h-full flex-col",children:jsxRuntime.jsxs(co.Provider,{value:pe,children:[jsxRuntime.jsx(di,{title:t,controls:l,actions:z,containerRef:U}),jsxRuntime.jsx("svg",{width:F,height:L,className:"overflow-visible",ref:w,role:"img","aria-label":t,children:cr}),jsxRuntime.jsx(Ho,{data:C,formatter:oe}),jsxRuntime.jsx("div",{ref:O,children:jsxRuntime.jsx(Ti,{onExport:Ue,items:Qe,hideExport:r,marginLeft:12,marginRight:12,...n&&{onLegendItemToggle:n}})})]})}))},Ms=responsive.withParentSize(W2);var K2={single:[],band:["net"],pair:["import","export"]};function Y2({kind:e,series:t,seriesKeys:r}){let o=r??K2[e];return e==="single"?[t.line]:e==="band"?[...o.map(n=>t.lines[n]??[]),t.band.filter(n=>Number.isFinite(n.baselineValue))]:o.map(n=>t.lines[n]??[])}function X2(e){let{viewport:t,maxDataTimeMs:r}=e,o=null;for(let n of Y2(e))for(let a of n){let i=a.xValue.getTime();Number.isFinite(i)&&Number.isFinite(a.yValue)&&i>=t.startMs&&i<t.endMs&&i<=r&&(o===null||i>o)&&(o=i);}return o}function ry(e){let t=ot.useId(),r=X2(e),o=r===null?null:new Date(r);return jsxRuntime.jsxs("span",{className:"inline-flex max-w-full flex-wrap items-baseline gap-x-1","aria-describedby":t,title:"Time marks the start of the latest interval with data plotted in this view.",children:[jsxRuntime.jsx("span",{children:"Latest data in view:"}),o?jsxRuntime.jsx("time",{dateTime:o.toISOString(),className:"font-medium text-text-primary",children:o.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"})}):jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:"Unavailable"}),jsxRuntime.jsx("span",{id:t,className:"sr-only",children:"Time marks the start of the latest interval with data plotted in this view."})]})}var q2={live:"Receiving updates",connecting:"Waiting for next update",reconnecting:"Reconnecting\u2026",stale:"No recent updates",delayed:"Measurements delayed","refresh-failed":"Update delayed"};function ny({label:e,checked:t,onChange:r,status:o,disabledReason:n,waitingDescription:a}){let i=ot.useId(),s=t&&o==="live",l=n||(t?q2[o]:void 0);return jsxRuntime.jsxs("div",{className:"flex max-w-full shrink-0 flex-col items-end gap-1",children:[jsxRuntime.jsxs(te,{variant:"ghost",size:"sm","aria-label":e,"aria-pressed":t,...l&&{"aria-describedby":i},isDisabled:!!n,onPress:()=>r(!t),className:t?"text-text-primary":"text-text-secondary",children:[jsxRuntime.jsx("span",{"aria-hidden":"true","data-live-indicator":s?"live":"neutral",className:`size-1.5 shrink-0 rounded-full ${s?"bg-error-base":"bg-text-secondary"}`}),jsxRuntime.jsx("span",{children:t?"Live":"Static"})]}),jsxRuntime.jsxs("span",{id:i,role:"status","aria-atomic":"true",className:"max-w-64 text-right text-xs text-text-secondary",children:[l,!n&&t&&o==="connecting"&&a&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[". ",a]})]})]})}var $2=1440*60*1e3,Dm=6e4,ay=(e,t)=>({startMs:t-e*$2,endMs:t}),eM=e=>({after:new Date(e.startMs),before:new Date(e.endMs)});function Gc({source:e,hideExport:t=false,hideWindowSummary:r=false,leadingControls:o,trailingControls:n,xMarkers:a,legend:i,hiddenSeriesLabels:s,onLegendItemToggle:l,title:d,liveControl:c,initialRange:u,viewportEnd:m,yFormatter:p,yDomain:g,referenceLines:f,emptyState:b,presetRanges:h,tierToWindow:v,windowSizeOptions:x,height:C=360,fitParent:S=false,hint:w,dataBounds:T,onViewChange:N,followLatest:k=false,followLatestKey:R,children:A,latestDataReadout:M,latestDataSeriesKeys:B,renderMetadata:D,panels:W}){let X=W!==void 0&&W.length>0,H=ot.useMemo(()=>X?Ic():void 0,[X]),[I,F]=ot.useState(900),z=e.refreshEnabled!==false,U=T?.endMs,[K,O]=ot.useState(()=>U??Date.now()),V=m?.getTime()??U,L=k&&m===void 0&&T===void 0,[y,E]=ot.useState(true),[P,Y]=ot.useState(null),$=L&&y,[oe,re]=ot.useState({resetKey:e.resetKey,automatic:false}),_=m===void 0&&T===void 0&&y,he=u?.days??30,me=ot.useMemo(()=>ay(he,V??Date.now()),[he,V]),ue=ot.useRef({resetKey:e.resetKey,refreshKey:e.refreshKey,refreshEnabled:z,followLatestKey:R}),ie=z&&(ue.current.resetKey!==e.resetKey||ue.current.refreshKey!==e.refreshKey||ue.current.refreshEnabled===false),fe=ue.current.resetKey===e.resetKey,Te=L&&ue.current.followLatestKey!==R,Ye=U??(ie||Te?Date.now():K);ot.useEffect(()=>{ue.current={resetKey:e.resetKey,refreshKey:e.refreshKey,refreshEnabled:z,followLatestKey:R},(ie||Te)&&(fe&&re({resetKey:e.resetKey,automatic:true}),O(Ye));},[e.resetKey,e.refreshKey,z,R,ie,Te,Ye,fe]);let[yt,Qt]=ot.useState(null),[Ze,fr]=ot.useState(null),lr=yt??me,Ce=ym({fetchTile:e.fetchTile,ladder:e.ladder,nativeMs:e.nativeMs,initialViewport:me,widthPx:I,maxFutureMs:Ye,tileCostSeriesCount:e.tileCostSeriesCount,resetKey:e.resetKey,...e.refreshKey!==void 0&&{refreshKey:e.refreshKey},refreshEnabled:z&&P===null,automaticLoads:($||Te)&&(oe.resetKey===e.resetKey&&oe.automatic||fe&&(ie||Te))}),Vt=Ce.series.targetTier.bucketMs,ee=L?(Math.floor(Ye/Vt)+1)*Vt:Ye,Be=V==null?Math.max(ee,Ce.viewport.endMs):ee,Ve=ot.useMemo(()=>({startMs:T?.startMs??0,endMs:Be}),[T?.startMs,Be]),nt=Le=>{let J=V==null?Math.max(Ve.endMs,Date.now()):Ve.endMs,se=Math.min(Le.endMs-Le.startMs,J-Ve.startMs),Pe=Math.max(Math.min(Le.endMs,J),Ve.startMs+se);return {startMs:Pe-se,endMs:Pe}},wt=(Le,J=true)=>{re({resetKey:e.resetKey,automatic:false});let se=Math.abs(Ve.endMs-Le)<=Dm||Math.abs(Date.now()-Le)<=Dm,Pe=J&&se;z&&Y(""),E(Pe),U==null&&O(Date.now());};ot.useEffect(()=>{if(U!=null){O(U);return}if(!z)return;let Le,J=(Pe=true)=>{let Re=Date.now();Pe&&$&&re({resetKey:e.resetKey,automatic:true}),O(Re);let He=Vt-Re%Vt;Le=setTimeout(J,Math.min(Dm,He));},se=()=>{document.visibilityState==="visible"&&(clearTimeout(Le),J());};return J(false),document.addEventListener("visibilitychange",se),()=>{clearTimeout(Le),document.removeEventListener("visibilitychange",se);}},[U,Vt,z,$,e.resetKey]);let Xt=ot.useRef(R);ot.useEffect(()=>{let Le=Xt.current!==R;Xt.current=R,!(!Le||!L)&&(E(true),O(Date.now()));},[L,R]),ot.useEffect(()=>{$&&z&&O(Date.now());},[$,z,e.resetKey,e.refreshKey]);let Q=Ce.jumpTo,{startMs:j,endMs:pe}=Ce.viewport;ot.useEffect(()=>{if(!$)return;let Le=Math.max(pe-j,Vt);ee===pe&&Le===pe-j||(re({resetKey:e.resetKey,automatic:true}),Q({startMs:ee-Le,endMs:ee}));},[$,ee,j,pe,Vt,Q,e.resetKey]);let ae=ot.useMemo(()=>Mc(()=>V??Date.now()),[V]),Ne=h??ae,Qe=()=>{if(Ze&&"presetId"in Ze){let Le=Ne.find(J=>J.id===Ze.presetId);if(Le){let J=Le.getRange();return {startMs:J.after.getTime(),endMs:J.before.getTime()}}}return Ze&&"range"in Ze?Ze.range:ay(he,V??Date.now())},{coverage:Ue,renderTier:cr,targetTier:Z,isFallback:le,isStale:Ae}=Ce.series,Oe=Z.id,it=cr?.id??null,{startMs:Tt,endMs:Ot}=Ce.viewport,tt=ot.useRef(N);ot.useEffect(()=>{tt.current=N;},[N]),ot.useEffect(()=>{tt.current?.({targetTierId:Oe,renderedTierId:it,viewport:{startMs:Tt,endMs:Ot},followingLatest:$,atLiveEdge:_});},[Oe,it,Tt,Ot,$,_]),ot.useEffect(()=>{if(P===null)return;let Le=`${Oe}:${Tt}:${Ot}`;Y(P===Le?null:Le);},[P,Oe,Tt,Ot]);let xr=cr?cr.bucketMs*1.5:0,gr=Le=>Le==null?"\u2014":new Date(Le).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),xo=(Le,J)=>{let se=J-Le<1728e5?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{month:"short",day:"numeric",year:"numeric"},Pe=new Intl.DateTimeFormat("en-US",se);return `${Pe.format(new Date(Le))} \u2013 ${Pe.format(new Date(J))}`},ne=$?Ce.viewport.endMs-Ce.viewport.startMs!==lr.endMs-lr.startMs:Ce.viewport.startMs!==lr.startMs||Ce.viewport.endMs!==lr.endMs,Se=Ae||Ce.loading&&Ue.earliestMs==null,ce=(Ce.viewport.endMs-Ce.viewport.startMs)*.03,ct=!Se&&Ue.earliestMs!=null&&Ue.earliestMs>Ce.viewport.startMs+ce,yr=!Ce.loading&&Ue.earliestMs==null&&Ue.latestMs==null&&!Ca(Ce.series)&&!Ae,yo=va(d),vo=Fl(),yl=typeof a=="function"?a(Ce.series):a,Nu=sy(A({series:Ce.series,gapMs:xr})),Zi=jsxRuntime.jsxs("div",{className:`flex flex-col gap-3${yo.isExpanded||S?" h-full":""}`,children:[o&&jsxRuntime.jsx("div",{className:"flex flex-wrap items-center gap-3",children:o}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-start gap-2",children:[jsxRuntime.jsx("div",{className:"min-w-0 flex-[1_1_16rem]",children:jsxRuntime.jsx(Dc,{dateRange:eM(Ce.viewport),onDateRangeChange:(Le,J)=>{let se=nt({startMs:Le.after.getTime(),endMs:Le.before.getTime()});wt(se.endMs,!!J?.presetId),fr(J?.presetId?{presetId:J.presetId}:{range:se}),Qt(se),Ce.jumpTo(se);},windowSize:v[Z.id],windowSizeOptions:x,lockWindowSize:true,presetRanges:Ne,allowDatePicker:true,showReset:false})}),jsxRuntime.jsxs("div",{className:"ml-auto flex max-w-full flex-wrap items-start gap-2",children:[c&&jsxRuntime.jsx(ny,{...c,status:Ce.refreshError?"refresh-failed":c.status}),w&&!yr&&jsxRuntime.jsx(Ac,{label:`About ${d}`,children:w}),!yo.isExpanded&&!yr&&yo.action]})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-text-secondary",children:[!r&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("span",{children:["Window"," ",jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:xo(Ce.viewport.startMs,Ce.viewport.endMs)})]}),jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"\u2022"}),jsxRuntime.jsxs("span",{children:["Resolution ",jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:cr?.id??Z.id}),le&&jsxRuntime.jsxs("span",{className:"text-text-tertiary",children:[" \xB7 loading ",Z.id]})]})]}),M&&jsxRuntime.jsx(ry,{kind:M,series:Ce.series,viewport:Ce.viewport,maxDataTimeMs:Ye,...B!==void 0?{seriesKeys:B}:{}}),D?.({series:Ce.series,viewport:Ce.viewport,maxDataTimeMs:Ye}),Ce.loading&&jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"loading\u2026"}),Ce.refreshError&&jsxRuntime.jsx("span",{role:"status",className:"text-text-tertiary",children:Ue.earliestMs==null?"Unable to load telemetry":"Refresh failed \xB7 showing previous data"}),ct&&jsxRuntime.jsxs("span",{className:"text-text-tertiary",children:["showing available history from ",gr(Ue.earliestMs)]}),!r&&!ct&&!Se&&Ce.atDataStart&&jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"no earlier data loaded"})]}),X&&!vo&&jsxRuntime.jsx("span",{className:"text-[11px] font-medium text-text-secondary",children:d}),jsxRuntime.jsxs("div",{className:`relative overflow-hidden rounded-md border border-border-subtle${yo.isExpanded||S?" min-h-0 flex-1":""}`,style:yo.isExpanded||S?void 0:{height:C},children:[ne&&!yr&&jsxRuntime.jsx("div",{className:"absolute top-2 right-2 z-10",children:jsxRuntime.jsx(te,{variant:"secondary",size:"sm",onPress:()=>{let Le=nt(Qe());wt(Le.endMs,!(Ze&&"range"in Ze)),Qt(Le),Ce.jumpTo(Le);},children:"\u27F2 Reset"})}),yr?jsxRuntime.jsx(ki,{title:b.title,description:b.description}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ms,{title:d,hideExport:t,viewport:Ce.viewport,panBounds:Ve,getPanBounds:()=>({startMs:Ve.startMs,endMs:U??Math.max(Ve.endMs,Date.now())}),onViewportChange:Le=>{wt(Le.endMs),Ce.onViewportChange(Le);},onPlotWidthChange:F,...H&&{cameraSync:H},...p&&{yFormatter:p},...g&&{yDomain:g},...f&&{referenceLines:f},...yl?.length&&{xMarkers:yl},...i&&{legend:i},...s&&{hiddenSeriesLabels:s},...l&&{onLegendItemToggle:l},children:Nu}),Ce.loading&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-0.5 animate-pulse bg-[var(--color-viz-categorical-1)] opacity-60"})]})]}),X&&W.map(Le=>jsxRuntime.jsx(tM,{panel:Le,hideExport:Le.hideExport??t,viewport:Ce.viewport,panBounds:Ve,staticEndMs:U,maxFutureMs:Ye,widthPx:I,onViewportChange:J=>{wt(J.endMs),Ce.onViewportChange(J);},...H&&{cameraSync:H}},Le.key)),n&&jsxRuntime.jsx("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1",children:jsxRuntime.jsx("div",{className:"ml-auto flex flex-wrap items-center gap-x-4 gap-y-1",children:n})})]});return jsxRuntime.jsx(fm,{children:yo.present(Zi)})}function sy(e){return ot.isValidElement(e)&&e.type===ot.Fragment?e.props.children:e}function tM({panel:e,hideExport:t,viewport:r,panBounds:o,staticEndMs:n,maxFutureMs:a,widthPx:i,onViewportChange:s,cameraSync:l}){let d=Rc({fetchTile:e.source.fetchTile,ladder:e.source.ladder,nativeMs:e.source.nativeMs,viewport:r,widthPx:i,maxFutureMs:a,resetKey:e.source.resetKey,tileCostSeriesCount:e.source.tileCostSeriesCount,...e.source.refreshKey!==void 0?{refreshKey:e.source.refreshKey}:{},...e.source.refreshEnabled!==void 0?{refreshEnabled:e.source.refreshEnabled}:{}}),c=d.series.renderTier?d.series.renderTier.bucketMs*1.5:0;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx("span",{className:"text-[11px] font-medium text-text-secondary",children:e.title}),jsxRuntime.jsxs("div",{className:"relative overflow-hidden rounded-md border border-border-subtle",style:{height:e.height??220},children:[jsxRuntime.jsx(Ms,{title:e.title,hideExport:t,viewport:r,panBounds:o,getPanBounds:()=>({startMs:o.startMs,endMs:n??Math.max(o.endMs,Date.now())}),onViewportChange:s,...l&&{cameraSync:l},...e.yFormatter&&{yFormatter:e.yFormatter},...e.yDomain&&{yDomain:e.yDomain},...e.referenceLines&&{referenceLines:e.referenceLines},...e.legend&&{legend:e.legend},...e.hiddenSeriesLabels&&{hiddenSeriesLabels:e.hiddenSeriesLabels},...e.onLegendItemToggle&&{onLegendItemToggle:e.onLegendItemToggle},children:sy(e.children({series:d.series,gapMs:c}))}),d.loading&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-0.5 animate-pulse bg-[var(--color-viz-categorical-1)] opacity-60"})]})]})}var aM=12;function ly(e){let t=Number.isFinite(e)?Math.max(1,Math.floor(e)):1,r=0,o=[],n=()=>{for(;o.length>0;){let i=o[0];if(r+i.permits>t)return;o.shift(),r+=i.permits,i.grant();}},a=i=>()=>{r=Math.max(0,r-i),n();};return {acquire(i=1){let s=Math.min(t,Number.isFinite(i)?Math.max(1,Math.floor(i)):1);return o.length===0&&r+s<=t?(r+=s,Promise.resolve(dy(a(s)))):new Promise(l=>{o.push({permits:s,grant:()=>l(dy(a(s)))});})},get stats(){return {active:r,waiting:o.length}}}}function cy(){let e=new Error("The operation was aborted.");return e.name="AbortError",e}function dy(e){let t=false;return ()=>{t||(t=true,e());}}var iM=()=>{},sM={acquire:()=>Promise.resolve(iM),stats:{active:0,waiting:0}},Am=ot.createContext(null);function py({maxConcurrent:e,children:t}){let r=ot.useContext(Am),o=ot.useMemo(()=>e!==void 0?ly(e):r??ly(aM),[e,r]);return ot.createElement(Am.Provider,{value:o},t)}function Im(){return ot.useContext(Am)??sM}function Fm(e,t,r=1){return async(...o)=>{let n=o[3],a=()=>n instanceof AbortSignal&&n.aborted;if(a())throw cy();let i=await e.acquire(r);try{if(a())throw cy();return await t(...o)}finally{i();}}}var gy=ot.createContext(null),hy=ot.createContext(null);function by({resolve:e,host:t,maxConcurrentFetches:r,children:o}){return jsxRuntime.jsx(gy.Provider,{value:e??null,children:jsxRuntime.jsx(hy.Provider,{value:t??null,children:jsxRuntime.jsx(py,{...r!==void 0?{maxConcurrent:r}:{},children:o})})})}function Es(){return ot.useContext(gy)}function Ls(){return ot.useContext(hy)}var Cy="line";function dM(e,t){return t===Cy?e.line:t==="band"?e.band:e.lines[t]??[]}function Sy(e){let t=0;for(let r of e)typeof r?.bucketMs=="number"&&Number.isFinite(r.bucketMs)&&r.bucketMs>0&&(t=t===0?r.bucketMs:Math.min(t,r.bucketMs));return t}function Wc(e){let t=Ls();return t?jsxRuntime.jsx(t,{source:e.source,children:r=>r?jsxRuntime.jsx(wy,{...e,resolved:r}):jsxRuntime.jsx(xy,{...e})}):jsxRuntime.jsx(xy,{...e})}function wy(e){let t=e.panels;return !t||t.length===0?jsxRuntime.jsx(yy,{...e}):jsxRuntime.jsx(Ty,{panels:t,index:0,acc:[],render:r=>jsxRuntime.jsx(yy,{...e,resolvedPanels:r})})}function xy(e){let t=Es(),r=ot.useMemo(()=>t?.(e.source)??null,[t,e.source]);return r?jsxRuntime.jsx(wy,{...e,resolved:r}):jsxRuntime.jsx(ki,{icon:"ChartLine",title:e.emptyState?.title??"No data source",description:e.emptyState?.description??"This chart's data source is unavailable."})}function yy({source:e,title:t,children:r,yFormatter:o,yDomain:n,referenceLines:a,headerActions:i,height:s,hint:l,emptyState:d,tierToWindow:c,windowSizeOptions:u,presetRanges:m,latestDataReadout:p,latestDataSeriesKeys:g,resolved:f,resolvedPanels:b=[]}){let h=kc(e.viewportEnd),v=Im(),C={fetchTile:ot.useMemo(()=>Fm(v,f.fetchSlice,f.fetchesPerSlice??1),[v,f.fetchSlice,f.fetchesPerSlice]),ladder:e.ladder,...f.refreshEnabled!==void 0?{refreshEnabled:f.refreshEnabled}:{},nativeMs:f.nativeMs??e.nativeMs??Sy(e.ladder),resetKey:e.resetKey??"",...f.refreshKey!==void 0?{refreshKey:f.refreshKey}:e.refreshKey!==void 0?{refreshKey:e.refreshKey}:{},tileCostSeriesCount:f.costSeriesCount??1};return jsxRuntime.jsx(Gc,{title:t,source:C,yFormatter:o,...n!==void 0?{yDomain:n}:{},...a!==void 0?{referenceLines:a}:{},...i!==void 0?{headerActions:i}:{},...s!==void 0?{height:s}:{fitParent:true},...f.liveControl!==void 0?{liveControl:f.liveControl}:{},...f.onViewChange!==void 0?{onViewChange:f.onViewChange}:{},...f.followLatest!==void 0?{followLatest:f.followLatest}:{},...f.followLatestKey!==void 0?{followLatestKey:f.followLatestKey}:{},...l!==void 0?{hint:l}:{},...e.initialRange!==void 0?{initialRange:e.initialRange}:{},...h!==null?{viewportEnd:h}:{},...m!==void 0?{presetRanges:m}:{},...p!==void 0?{latestDataReadout:p}:{},...g!==void 0?{latestDataSeriesKeys:g}:{},emptyState:d??{title:"No data",description:"No readings in this window."},tierToWindow:c??{},windowSizeOptions:u??[],...b.length>0?{panels:b}:{},children:({series:S,gapMs:w})=>ky(r,S,w)})}function Ty({panels:e,index:t,acc:r,render:o}){if(t>=e.length)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:o(r)});let n=e[t];return jsxRuntime.jsx(uM,{panel:n,children:a=>jsxRuntime.jsx(Ty,{panels:e,index:t+1,acc:a?[...r,a]:r,render:o})})}function uM({panel:e,children:t}){let r=Ls();return r?jsxRuntime.jsx(r,{source:e.source,children:o=>o?jsxRuntime.jsx(Ny,{panel:e,resolved:o,children:t}):jsxRuntime.jsx(vy,{panel:e,children:t})}):jsxRuntime.jsx(vy,{panel:e,children:t})}function vy({panel:e,children:t}){let r=Es(),o=ot.useMemo(()=>r?.(e.source)??null,[r,e.source]);return o?jsxRuntime.jsx(Ny,{panel:e,resolved:o,children:t}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:t(null)})}function Ny({panel:e,resolved:t,children:r}){let o=Im(),n=ot.useMemo(()=>Fm(o,t.fetchSlice,t.fetchesPerSlice??1),[o,t.fetchSlice,t.fetchesPerSlice]),a=ot.useMemo(()=>({key:e.key,title:e.title,source:{fetchTile:n,ladder:e.source.ladder,nativeMs:t.nativeMs??e.source.nativeMs??Sy(e.source.ladder),resetKey:e.source.resetKey??"",tileCostSeriesCount:t.costSeriesCount??1,...t.refreshEnabled!==void 0?{refreshEnabled:t.refreshEnabled}:{},...t.refreshKey!==void 0?{refreshKey:t.refreshKey}:e.source.refreshKey!==void 0?{refreshKey:e.source.refreshKey}:{}},...e.yFormatter!==void 0?{yFormatter:e.yFormatter}:{},...e.yDomain!==void 0?{yDomain:e.yDomain}:{},...e.referenceLines!==void 0?{referenceLines:e.referenceLines}:{},...e.height!==void 0?{height:e.height}:{},children:({series:i,gapMs:s})=>ky(e.children,i,s)}),[e,n,t.nativeMs,t.costSeriesCount,t.refreshEnabled,t.refreshKey]);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r(a)})}function ky(e,t,r){return cn(e).map(o=>{if(!ot.isValidElement(o))return o;let n=o.props;if(n.data)return o;let a=dM(t,n.seriesKey??Cy);return ot.cloneElement(o,{data:a,maxGapMs:r,...n.labelFromData?{label:n.labelFromData(a,t)}:{}})})}var My=e=>e.type===Wn||e.type===Ta||e.type===mc,xM=e=>e.type===Sc||e.type===wc,Ey=280,yM=d3Array.bisector(e=>e.xValue).left,vM=()=>jsxRuntime.jsx("div",{className:"flex h-full items-center justify-center",children:jsxRuntime.jsx("p",{className:"text-text-secondary",children:"No data available"})}),CM=()=>jsxRuntime.jsxs("div",{className:"flex h-full flex-col gap-4 p-4",children:[jsxRuntime.jsx(q,{className:"h-full w-full"}),jsxRuntime.jsxs("div",{className:"flex gap-4",children:[jsxRuntime.jsx(q,{className:"h-4 w-24"}),jsxRuntime.jsx(q,{className:"h-4 w-24"})]})]}),SM=({parentWidth:e,parentHeight:t,yFormatter:r={type:"number"},yDomain:o,referenceLines:n,isLoading:a=false,enableZoom:i=false,enableBrush:s=false,brushHeight:l=60,onZoomChange:d,zoomDomain:c,hiddenSeriesLabels:u,onHiddenSeriesChange:m,hideBottomBar:p=false,headerActions:g,headerControls:f,title:b,children:h})=>{let v=u!==void 0,x=c!==void 0,[C,S]=ot.useState(null),[w,T]=ot.useState(null),N=x?c:w,[k,R]=ot.useState(()=>new Set),A=v?u:k,M=ot.useRef(null),B=ot.useId(),D=ot.useRef(0),W=ot.useRef(""),X=ot.useRef(null),{colorMode:H}=hr(),I=ot.useMemo(()=>tn(),[H]),F=ot.useMemo(()=>$i(),[H]),{datasets:z,seriesMetadata:U,categoryInfo:K,categoryColors:O,categoryLabels:V,seriesTypes:L}=ot.useMemo(()=>{let se=cn(h).filter(Ge=>ot.isValidElement(Ge)&&My(Ge)),Pe=se.filter(Ge=>Ge.props.data).length,Re=[],He=[],ut=[],Nt=null,ze=null;se.forEach((Ge,Mt)=>{let Ie=Ge.props;if(!Ie.data)return;Re.push(Ie.data);let $o=("color"in Ie&&Ie.color?Ie.color:void 0)||(Pe===1?F:I[Mt%I.length]),en=Ge.type===Wn;He.push({label:"label"in Ie&&Ie.label||`Series ${Re.length}`,color:$o,...en&&"baseline"in Ie&&Ie.baseline!==void 0?{baseline:Ie.baseline,tooltipRange:"tooltipRange"in Ie&&Ie.tooltipRange||false}:{}});let ra=en?"area":Ge.type===Ta?"line":"bar";ut.push(ra),"categoryColors"in Ie&&Ie.categoryColors&&(Nt=Ie.categoryColors),"categoryLabels"in Ie&&Ie.categoryLabels&&(ze=Ie.categoryLabels);});let vt=null;if(Nt){let Ge=new Set;Re.forEach(Mt=>{Mt.forEach(Ie=>{Ie.category&&Ge.add(Ie.category);});}),vt=Array.from(Ge).map(Mt=>({label:ze?.[Mt]||Mt,color:Nt[Mt]||"#6b7280"}));}return {datasets:Re,seriesMetadata:He,categoryInfo:vt,categoryColors:Nt,categoryLabels:ze,seriesTypes:ut}},[h,F,I,H]),y=va(b),E=y.expandedSize?.width??e,P=y.expandedSize?.height??t,$=!p?y.action:null,oe=g||$?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g,$]}):void 0,{headerRef:re,headerHeight:_}=ci(!!oe,!!f),he=p?0:60,me=s?l+8:0,ue=P-_-he-me,ie=Math.max(100,ue),fe=ot.useCallback(J=>J?A.has(J):false,[A]),Te=ot.useMemo(()=>U.map((J,se)=>fe(J.label)?null:se).filter(J=>J!==null),[U,fe]),Ye=ot.useMemo(()=>Te.map(J=>z[J]).filter(J=>!!J),[z,Te]),yt=ot.useMemo(()=>Te.map(J=>U[J]).filter(J=>!!J),[U,Te]),Qt=ot.useMemo(()=>Te.map(J=>L[J]).filter(J=>!!J),[L,Te]),Ze=Qt.findIndex(J=>J==="bar"),fr=Ze!==-1,lr=ot.useCallback((J,se)=>{let Pe=J.has(se);if(!Pe&&U.reduce((ut,Nt)=>J.has(Nt.label)||Nt.label===se?ut:ut+1,0)<1)return J;let Re=new Set(J);return Pe?Re.delete(se):Re.add(se),Re},[U]),Ce=ot.useCallback(J=>{if(v){let se=u;if(!se.has(J)&&U.reduce((He,ut)=>se.has(ut.label)||ut.label===J?He:He+1,0)<1){S(null);return}m?.(Re=>lr(Re,J));}else R(se=>lr(se,J));S(null);},[v,u,m,U,lr]),Vt=ot.useMemo(()=>U.map(J=>J.label).join(""),[U]),ee=ot.useRef(Vt);ot.useEffect(()=>{ee.current!==Vt&&(ee.current=Vt,v||R(J=>J.size===0?J:new Set));},[Vt,v]);let Be=ot.useMemo(()=>Ye.flat(),[Ye]),Ve=ot.useMemo(()=>{if(Be.length===0)return null;let J=[...Be].sort((se,Pe)=>se.xValue.getTime()-Pe.xValue.getTime());return [J[0].xValue,J[J.length-1].xValue]},[Be]),wt=N||Ve,Xt=ot.useCallback(J=>{x?d?.(J):T(J);},[x,d]),Q=ot.useMemo(()=>wt?z.map(se=>se.filter(Pe=>Pe.xValue>=wt[0]&&Pe.xValue<=wt[1])):z,[z,wt]),j=ot.useMemo(()=>Te.map(J=>Q[J]??[]),[Te,Q]);ot.useEffect(()=>{d&&d(N);},[N,d]);let pe=ot.useMemo(()=>Te.flatMap(J=>Q[J]??[]),[Q,Te]),ae=ot.useMemo(()=>ys(pe,ie,r,o),[pe,ie,r,o]),Ne=ot.useRef(JSON.stringify(r)),Qe=ot.useRef(null),Ue=ot.useMemo(()=>{let[J,se]=ae.domain(),Pe=Math.max(Math.abs(J),Math.abs(se)),Re=JSON.stringify(r);if(Re!==Ne.current&&(Ne.current=Re,Qe.current=null),Qe.current!==null)return Qe.current;if(Pe===0)return Si(r,0);let He=Si(r,Pe);return Qe.current=He,He},[ae,r]),cr=ot.useMemo(()=>{let J=ie-je.top-je.bottom;return ya(J)},[ie]),Z=ot.useMemo(()=>{let J=zr(Ue),se=J.tickFormat||J.format,Re=ae.ticks(cr).map(Nt=>se(Nt)),He=sn(Re,12,"system-ui"),ut=Math.ceil(He)+12;return {...je,left:Math.max(ut,30),right:8}},[ae,Ue,cr]),le=ot.useMemo(()=>wt?scale.scaleTime({domain:wt,range:[Z.left,E-Z.right]}):nm(Be,E),[wt,Be,E,Z]),Ae=ot.useCallback(J=>{if(!Ve)return;let{scaleX:se,translateX:Pe}=J,Re=E-Z.left-Z.right,[He,ut]=Ve,Nt=ut.getTime()-He.getTime();if(Nt<=0){Xt(null);return}let ze=-Pe,vt=ze+Re,Ge=Re*se/Nt,Mt=ze/Ge,Ie=vt/Ge,_o=new Date(He.getTime()+Mt),$o=new Date(He.getTime()+Ie),en=Math.abs(_o.getTime()-He.getTime()),ra=Math.abs($o.getTime()-ut.getTime()),vl=Nt*.02;en<vl&&ra<vl?Xt(null):Xt([_o,$o]);},[Ve,E,Z,Xt]),Oe=ot.useCallback(J=>{let{left:se}=M.current?.getBoundingClientRect()||{left:0},Pe=J.clientX-se;if(J.timeStamp-(D.current||0)<16)return;D.current=J.timeStamp;let Re=le.invert(Pe),He=j.map((ze,vt)=>{if(!ze||ze.length===0)return null;let Ge=yM(ze,Re,1);if(Ge===0)return {point:ze[0],index:0,datasetIndex:vt};if(Ge>=ze.length)return {point:ze[ze.length-1],index:ze.length-1,datasetIndex:vt};let Mt=ze[Ge-1],Ie=ze[Ge];if(!Mt||!Ie)return null;let _o=Math.abs(Mt.xValue.getTime()-Re.getTime()),$o=Math.abs(Ie.xValue.getTime()-Re.getTime()),en=_o<$o;return {point:en?Mt:Ie,index:en?Ge-1:Ge,datasetIndex:vt}}).filter(ze=>ze!==null&&yt[ze.datasetIndex]!==void 0).map(({point:ze,index:vt,datasetIndex:Ge})=>({label:yt[Ge].label,value:ze.yValue,baselineValue:gc(yt[Ge],ze,vt),color:yt[Ge].color,point:ze,type:Qt[Ge]}));if(He.length===0){S(null);return}let ut=le(He[0].point.xValue),Nt=ut>(E-Z.right-Z.left)/2+Z.left;S({xValue:He[0].point.xValue,series:He.map(({label:ze,value:vt,baselineValue:Ge,color:Mt,point:Ie,type:_o})=>({label:ze,value:vt,...Ge!==void 0?{baselineValue:Ge}:{},chartY:Ie.chartYValue??vt,showMarker:Ie.showTooltipMarker??true,color:Mt,type:_o,category:Ie.category,categoryColor:Ie.category&&O?O[Ie.category]:void 0,...Ie.extraTooltipRows&&Ie.extraTooltipRows.length>0?{extraTooltipRows:Ie.extraTooltipRows}:{}})),x:ut,y:ae(He[0].point.chartYValue??He[0].value),position:Nt?"left":"right"});},[j,yt,Qt,le,ae,E,O,Z]),it=()=>{S(null);},Tt=ot.useCallback(()=>{Xt(null),X.current&&X.current.reset();},[Xt]),Ot=ot.useCallback(J=>{let se={scaleX:1,scaleY:1,translateX:0,translateY:0,skewX:0,skewY:0};if(!J||!Ve)return se;let[Pe,Re]=Ve,He=Re.getTime()-Pe.getTime();if(He<=0)return se;let[ut,Nt]=J,ze=Nt.getTime()-ut.getTime();if(ze<=0)return se;let vt=He/ze,Ge=E-Z.left-Z.right,Mt=ut.getTime()-Pe.getTime();return {scaleX:vt,scaleY:1,translateX:-(Mt/He)*Ge*vt,translateY:0,skewX:0,skewY:0}},[Ve,E,Z]),tt=ot.useCallback(J=>{if(!(X.current&&Ve))return;let[se,Pe]=Ve,Re=Pe.getTime()-se.getTime();if(Re<=0){X.current.reset();return}if(!J){X.current.reset();return}let[He,ut]=J,Nt=ut.getTime()-He.getTime();if(Nt<=0){X.current.reset();return}let ze=Re/Nt,vt=E-Z.left-Z.right,Mt=-((He.getTime()-se.getTime())/Re)*vt*ze;X.current.setTransformMatrix({scaleX:ze,scaleY:1,translateX:Mt,translateY:0,skewX:0,skewY:0});},[Ve,E,Z]),xr=ot.useCallback(J=>{Xt(J),tt(J);},[Xt,tt]);ot.useEffect(()=>{x&&tt(c??null);},[x,c,tt]);let gr=dc(),xo={width:E,height:ie,xScale:le,yScale:ae,yFormatter:Ue,animationSettings:cc,entrance:gr,tooltip:{data:C,show:S,hide:()=>S(null)},datasets:j,seriesMetadata:yt,seriesTypes:Qt,categoryColors:O||void 0,categoryLabels:V||void 0},ne=cn(h),Se=0,ce=[],ct=[],yr=[];ne.forEach(J=>{if(!ot.isValidElement(J)){yr.push(J);return}if(xM(J))ct.push(J);else if(My(J)){let se=Se;Se++;let Pe=J.props,Re=U[se]?.label;if(fe(Re))return;ce.push(ot__namespace.default.cloneElement(J,{...Pe,data:Q[se]||Pe.data,color:U[se]?.color}));}else yr.push(J);});let yo=Te.length,vo=(K||U).map(J=>{let se=!K&&fe(J.label);return {category:J.label,fill:J.color,isHidden:se,isDisabled:!K&&!se&&yo<=1}}),yl=typeof r=="object"&&r!==null&&typeof r.type=="string",Nu=vc({datasets:Ye,metadata:{xLabel:"Date",yLabel:"Value",seriesLabels:yt.map(J=>J.label),timestamp:true,...yl?{yFormat:r}:{}},svgRef:M}),Zi=jsxRuntime.jsx(di,{title:b,controls:f,actions:oe,containerRef:re});if(a)return y.present(jsxRuntime.jsxs("div",{className:"relative flex h-full flex-col",children:[Zi,jsxRuntime.jsx(CM,{})]}));if(z.length===0)return y.present(jsxRuntime.jsxs("div",{className:"relative flex h-full flex-col",children:[Zi,jsxRuntime.jsx(vM,{})]}));let Le=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("title",{children:b}),jsxRuntime.jsx("g",{children:ae.ticks(cr).map(J=>{let se=Math.abs(J)<Number.EPSILON;return jsxRuntime.jsx(shape.Line,{from:{x:Z.left,y:ae(J)},to:{x:E-Z.right,y:ae(J)},stroke:se?"var(--color-border-default)":"var(--color-border-muted)",strokeWidth:se?1.5:1},`grid-line-${J}`)})}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:B,children:jsxRuntime.jsx("rect",{x:le.range()[0],y:ae.range()[1],width:le.range()[1]-le.range()[0],height:ae.range()[0]-ae.range()[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${B})`,children:ce}),yr,n&&n.length>0&&jsxRuntime.jsx("g",{children:n.map((J,se)=>{let Pe=ae(J.value),Re=J.color??"var(--color-error-base)";return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(shape.Line,{from:{x:Z.left,y:Pe},to:{x:E-Z.right,y:Pe},stroke:Re,strokeWidth:1.5,strokeDasharray:"6 4"}),J.label&&jsxRuntime.jsx("text",{x:E-Z.right-4,y:Pe-4,textAnchor:"end",fontSize:11,fill:Re,children:J.label})]},`ref-line-${se}`)})}),jsxRuntime.jsx(uo.Bottom,{top:ie-Z.bottom,scale:le,width:E-Z.left-Z.right}),jsxRuntime.jsx(uo.Left,{left:Z.left,scale:ae,yFormatter:Ue,height:ie-Z.top-Z.bottom}),C&&!C.isEvent&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[fr?(()=>{let J=Ye[Ze]??[];if(J.length===0)return null;let se=[...J].sort((ra,vl)=>ra.xValue.getTime()-vl.xValue.getTime()),Pe=se.findIndex(ra=>ra.xValue.getTime()===C.xValue.getTime()),Re=se[Pe+1],He=se.length>1&&Re?Re.xValue.getTime()-C.xValue.getTime():15*6e4,ut=Math.abs(le(new Date(C.xValue.getTime()+He))-le(C.xValue)),ze=le(C.xValue)-ut/2,vt=ae.range(),[Ge,Mt]=le.range(),Ie=Math.min(Ge,Mt),_o=Math.max(Ge,Mt),$o=Math.max(ze,Ie),en=Math.max(0,Math.min(ze+ut,_o)-$o);return jsxRuntime.jsx("rect",{x:$o,y:vt[1],width:en,height:vt[0]-vt[1],className:"fill-background-muted",opacity:.5,pointerEvents:"none",style:{transition:"all 100ms ease-out"}})})():null,C.series.filter(J=>J.type!=="bar"&&J.showMarker!==false).map(J=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("circle",{cx:le(C.xValue),cy:ae(J.chartY??J.value),r:8,fill:"white",stroke:J.color,strokeWidth:2,style:{transition:"all 100ms ease-out"}}),jsxRuntime.jsx("circle",{cx:le(C.xValue),cy:ae(J.chartY??J.value),r:4,fill:J.color,style:{transition:"all 100ms ease-out"}})]},`highlight-${J.label}`))]}),jsxRuntime.jsx("rect",{x:Z.left,y:Z.top,width:E-Z.left-Z.right,height:ie-Z.top-Z.bottom,fill:"transparent",style:{cursor:i?"grab":"crosshair",touchAction:"none"},onMouseMove:Oe,onMouseLeave:it}),ct]});return y.present(jsxRuntime.jsx("div",{className:"relative flex h-full flex-col",children:jsxRuntime.jsxs(co.Provider,{value:xo,children:[Zi,i?jsxRuntime.jsx(zoom.Zoom,{initialTransformMatrix:Ot(N),width:E,height:ie,scaleXMin:1,scaleXMax:20,scaleYMin:1,scaleYMax:1,constrain:J=>{let{scaleX:se,translateX:Pe}=J,Re=Math.max(1,Math.min(20,se)),He=1,ut=E-Z.left-Z.right,Nt=0,ze=ut*(1-Re),vt=Math.max(ze,Math.min(Nt,Pe));return {...J,scaleX:Re,scaleY:He,translateX:vt,translateY:0}},children:J=>{if(X.current=J,J.transformMatrix){let{scaleX:se,translateX:Pe}=J.transformMatrix,Re=`${se.toFixed(4)}-${Pe.toFixed(2)}`;Re!==W.current&&(W.current=Re,setTimeout(()=>{Ae(J.transformMatrix);},0));}return jsxRuntime.jsx("svg",{width:E,height:ie,className:"overflow-visible",ref:se=>{M.current=se,J.containerRef.current!==se&&(J.containerRef.current=se);},role:"img","aria-label":b,style:{cursor:J.isDragging?"grabbing":"grab",touchAction:"none"},onMouseDown:J.dragStart,onMouseMove:J.dragMove,onMouseUp:J.dragEnd,onMouseLeave:()=>{J.isDragging&&J.dragEnd();},onTouchStart:J.dragStart,onTouchMove:J.dragMove,onTouchEnd:J.dragEnd,children:Le})}},`zoom-${Math.round(E)}x${Math.round(ie)}`):jsxRuntime.jsx("svg",{width:E,height:ie,className:"overflow-visible",ref:M,role:"img","aria-label":b,children:Le}),jsxRuntime.jsx(Ho,{data:C,formatter:Ue}),s&&Ve&&jsxRuntime.jsx(pm,{data:Ye,seriesMetadata:yt,width:E,height:l,onBrushChange:xr,brushRegion:N,margin:Z,...o?{yDomain:o}:{}}),!p&&jsxRuntime.jsx(Ti,{onExport:Nu,items:vo,isZoomed:N!==null,onResetZoom:Tt,onLegendItemToggle:K?void 0:Ce,marginLeft:Z.left,marginRight:Z.right})]})}))},wM=responsive.withParentSize(SM),Gm=({source:e,streaming:t,...r})=>{if(Nc(e))return jsxRuntime.jsx(Wc,{source:e,title:r.title??"Chart",...r.yFormatter!==void 0?{yFormatter:r.yFormatter}:{},...r.yDomain!==void 0?{yDomain:r.yDomain}:{},...r.referenceLines!==void 0?{referenceLines:r.referenceLines}:{},...r.headerActions!==void 0?{headerActions:r.headerActions}:{},...t?.tierToWindow!==void 0?{tierToWindow:t.tierToWindow}:{},...t?.windowSizeOptions!==void 0?{windowSizeOptions:t.windowSizeOptions}:{},...t?.presetRanges!==void 0?{presetRanges:t.presetRanges}:{},...t?.hint!==void 0?{hint:t.hint}:{},...t?.emptyState!==void 0?{emptyState:t.emptyState}:{},...t?.height!==void 0?{height:t.height}:{},...t?.latestDataReadout!==void 0?{latestDataReadout:t.latestDataReadout}:{},...t?.latestDataSeriesKeys!==void 0?{latestDataSeriesKeys:t.latestDataSeriesKeys}:{},...t?.panels!==void 0?{panels:t.panels}:{},children:r.children});let{yDomain:o,...n}=r;return jsxRuntime.jsx(wM,{...n,...typeof o=="function"?{}:{yDomain:o}})};Gm.displayName="ChartContainer";var MM=e=>e.toLocaleString(),EM=e=>`${Math.round(e*100)}%`,Iy=({data:e,width:t=800,height:r=400,padding:o=0,barGap:n=30,formatValue:a=MM,formatPercentage:i=EM,color:s,showScale:l=true,showOverallConversion:d=true,overallConversionLabel:c="Overall Conversion:",activeStageId:u,onStageClick:m,onStageHover:p,className:g,style:f,"aria-label":b="Funnel chart"})=>{let[h,v]=ot.useState(null),[x,C]=ot.useState(t),S=ot.useRef(null),w=u??h,T=ot.useId(),N=s||"var(--color-viz-default)";ot.useEffect(()=>{if(!S.current)return;let D=new ResizeObserver(W=>{for(let X of W)C(X.contentRect.width);});return D.observe(S.current),()=>{D.disconnect();}},[]);let{layout:k,overallConversion:R}=ot.useMemo(()=>{if(e.length===0)return {layout:[],overallConversion:0};let D=e[0].value,W=d?60:0,X=r-o*2-W,H=(e.length-1)*n,I=(X-H)/e.length,F=e.map((U,K)=>{let O=o+W+K*(I+n),V=D===0?0:U.value/D,L=V,y=K===0?null:e[K-1].value,E=y==null||y===0?0:1-U.value/y;return {stage:U,index:K,y:O,barHeight:I,widthPercent:V,conversionRate:L,dropOff:E}}),z=D===0?0:e[e.length-1].value/D;return {layout:F,overallConversion:z,maxValue:D}},[e,x,r,o,n,l,d]);if(e.length===0)return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex h-full min-h-[280px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",g),style:{width:t,height:r,...f},children:"No funnel data available"});let A=l?60:0,M=o+A,B=x-o*2-A;return jsxRuntime.jsx("div",{ref:S,className:tailwindMerge.twMerge("relative w-full overflow-hidden rounded-lg bg-background-surface",g),style:{height:r,...f},"aria-label":b,role:"img",children:jsxRuntime.jsxs("svg",{width:"100%",height:r,className:"relative",children:[jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsx(gradient.LinearGradient,{id:`${T}-bar`,from:N,to:N,toOpacity:.85}),jsxRuntime.jsx(gradient.LinearGradient,{id:`${T}-bg`,from:N,to:N,fromOpacity:.01,toOpacity:.15,x1:"0",y1:"0",x2:"1",y2:"0"})]}),d&&jsxRuntime.jsxs("text",{x:M,y:o+20,className:"fill-text-primary text-sm font-medium",children:[jsxRuntime.jsx("tspan",{className:"fill-text-secondary",children:c})," ",i(R)]}),l&&jsxRuntime.jsx("g",{children:k.map(D=>{let W=D.y+D.barHeight/2;return jsxRuntime.jsx("text",{x:o+A-12,y:W,textAnchor:"end",dominantBaseline:"middle",className:"fill-text-secondary text-xs",children:i(D.conversionRate)},D.stage.id)})}),k.map(D=>{let W=w===D.stage.id,X=B*D.widthPercent;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:M,y:D.y,width:B,height:D.barHeight,fill:`url(#${T}-bg)`,rx:4}),jsxRuntime.jsx(framerMotion.motion.rect,{x:M,y:D.y,width:X,height:D.barHeight,fill:`url(#${T}-bar)`,rx:4,initial:{width:0},animate:{width:X},transition:{duration:.6,delay:D.index*.1,ease:"easeOut"},opacity:W||w==null?1:.5,style:{cursor:m||p?"pointer":"default",transition:"opacity 150ms ease"},onMouseEnter:()=>{v(D.stage.id),p?.(D.stage);},onMouseLeave:()=>{v(null),p?.(null);},onClick:()=>m?.(D.stage)}),jsxRuntime.jsx("rect",{x:M+10,y:D.y+D.barHeight/2-10,width:70,height:20,className:"fill-background-surface stroke-border-default",strokeWidth:1,rx:4,style:{pointerEvents:"none"}}),jsxRuntime.jsx("text",{x:M+16,y:D.y+D.barHeight/2+4,className:"fill-text-primary text-xs font-semibold",style:{pointerEvents:"none"},children:a(D.stage.value)}),jsxRuntime.jsxs("text",{x:M,y:D.y-8,className:"fill-text-secondary text-xs",style:{pointerEvents:"none"},children:[jsxRuntime.jsx("tspan",{children:D.index+1})," ",D.stage.label]}),D.stage.secondaryValue&&jsxRuntime.jsx("text",{x:M+16,y:D.y-24,className:"fill-text-secondary text-xs",style:{pointerEvents:"none"},children:D.stage.secondaryValue}),D.index>0&&D.dropOff>0&&jsxRuntime.jsxs("text",{x:M+B,y:D.y-8,textAnchor:"end",className:"fill-text-secondary text-xs",children:[i(D.dropOff)," drop"]}),D.stage.annotation&&jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:M+X+8,y:D.y+8,width:60,height:24,rx:3,className:"fill-background-muted"}),jsxRuntime.jsx("text",{x:M+X+16,y:D.y+20,className:"fill-text-secondary text-xs font-medium",children:D.stage.annotation})]})]},D.stage.id)})]})})};var FM=.005,Vy=320;function Uc(e){return e>0?e:0}function BM(e,t,r){let o=t===0?0:Uc(e.value)/t*100;return `${e.label}: ${r(e.value)}, ${o.toFixed(1)}%`}var Oy=({data:e,width:t,height:r,innerRadiusRatio:o=0,yFormatter:n={type:"number"},showLegend:a=true,showTooltip:i=true,onSliceClick:s,onSliceHover:l,className:d,style:c,"aria-label":u})=>{let[m,p]=ot.useState(null),[g,f]=ot.useState(null),[b,h]=ot.useState(null),[v,x]=ot.useState(t??600),[C,S]=ot.useState(r??300),w=ot.useRef(null);ot.useEffect(()=>{if(t!==void 0&&r!==void 0){x(t),S(r);return}if(!w.current)return;let H=new ResizeObserver(I=>{for(let F of I)t===void 0&&x(F.contentRect.width),r===void 0&&S(F.contentRect.height);});return H.observe(w.current),t===void 0&&x(w.current.offsetWidth),r===void 0&&S(w.current.offsetHeight||300),()=>{H.disconnect();}},[t,r]);let T=ot.useMemo(()=>e.reduce((H,I)=>H+Uc(I.value),0),[e]),N=ot.useMemo(()=>{let H=es(e.map(I=>I.label));return e.map(I=>({...I,color:I.color||H[I.label]||"var(--color-viz-default)"}))},[e]),k=zr(n),R=s!==void 0,A=a&&v>=Vy,M=A?Math.max(v*.45,Vy*.45):v,D=Math.max(0,Math.min(M,C)-8)/2,W=D*Math.min(Math.max(o,0),.95);if(e.length===0||T===0)return jsxRuntime.jsx("div",{ref:w,className:tailwindMerge.twMerge("flex h-full min-h-[200px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",d),style:r!==void 0?{height:r,...c}:c,children:"No data available"});let X=(H,I,F)=>{if(p(H),l?.(I,H),H!==null&&I&&F){let z=M/2+F[0],U=C/2+F[1];h(I.label),f({xValue:new Date,series:[{label:"Value",value:I.value,color:I.color||"var(--color-viz-default)"}],x:z,y:U,position:z>v/2?"left":"right"});}else f(null),h(null);};return jsxRuntime.jsxs("div",{ref:w,className:tailwindMerge.twMerge("relative flex h-full w-full items-center gap-4 rounded-lg bg-background-surface",d),style:r!==void 0?{height:r,...c}:c,children:[jsxRuntime.jsx("svg",{width:M,height:C,className:"flex-shrink-0",role:R?"group":"img","aria-label":u,children:jsxRuntime.jsx(group.Group,{top:C/2,left:M/2,children:jsxRuntime.jsx(shape.Pie,{data:N,pieValue:H=>Uc(H.value),pieSort:null,pieSortValues:null,outerRadius:D,innerRadius:W,padAngle:FM,children:H=>H.arcs.map((I,F)=>{let z=m===F||m===null,U=H.path.centroid(I);return jsxRuntime.jsx("path",{d:H.path(I)??void 0,fill:I.data.color,opacity:z?1:.5,style:{cursor:s||l?"pointer":"default",transition:"opacity 150ms ease-out"},onMouseEnter:()=>X(F,I.data,U),onMouseLeave:()=>X(null,null),onClick:()=>s?.(I.data,F),...R?{role:"button",tabIndex:0,"aria-label":BM(I.data,T,k.format),onFocus:()=>X(F,I.data,U),onBlur:()=>X(null,null),onKeyDown:K=>{K.key!=="Enter"&&K.key!==" "||(K.preventDefault(),s?.(I.data,F));}}:{}},I.data.label)})})})}),A?jsxRuntime.jsx("ul",{className:"flex min-w-0 flex-col gap-1 overflow-y-auto py-2 text-xs",children:N.map((H,I)=>jsxRuntime.jsxs("li",{className:"flex items-center gap-2",style:{opacity:m===I||m===null?1:.5},onMouseEnter:()=>X(I,H),onMouseLeave:()=>X(null,null),children:[jsxRuntime.jsx("span",{className:"h-3 w-3 flex-shrink-0 rounded-sm",style:{backgroundColor:H.color}}),jsxRuntime.jsx("span",{className:"truncate text-text-primary",title:H.label,children:H.label}),jsxRuntime.jsxs("span",{className:"ml-auto flex-shrink-0 tabular-nums text-text-secondary",children:[k.format(H.value)," (",(Uc(H.value)/T*100).toFixed(1),"%)"]})]},H.label))}):null,i&&jsxRuntime.jsx(Ho,{data:g,formatter:n,label:b??void 0})]})};function Is({count:e,label:t="results",suffix:r,unknownLabel:o="\u2014",isLoading:n=false,className:a="",testId:i}){if(n)return jsxRuntime.jsx("div",{className:`flex items-center ${a}`,children:jsxRuntime.jsx(q,{width:80,height:16})});if(e===null)return jsxRuntime.jsx("div",{"data-testid":i,className:`text-sm text-text-secondary whitespace-nowrap ${a}`,children:o});let s=t.endsWith("s")?t.slice(0,-1):t,l=e===1&&!r?s:t,d=`${e.toLocaleString()}${r??""}${l?` ${l}`:""}`;return jsxRuntime.jsx("div",{"data-testid":i,className:`text-sm text-text-secondary whitespace-nowrap ${a}`,children:d})}var HM=e=>{let t=rr({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=[e.showSearchIcon?"":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return tailwindMerge.twMerge(t,r,e.className)};function fo({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,showSearchIcon:s,isClearable:l,onClear:d,type:c,validationResult:u,reserveErrorSpace:m=true,isLoading:p=false,descriptionPlacement:g="below",...f}){let[b,h]=ot__namespace.default.useState(false),{isFocused:v,handleFocus:x,handleBlur:C}=Ar(),S=c==="password",w=jl(p,300);return jsxRuntime.jsx(reactAriaComponents.TextField,{...f,isRequired:a,className:Fe(f.className,"group flex flex-col"),children:({isDisabled:T,isInvalid:N})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,description:g==="tooltip"||g==="inline"?t:void 0,descriptionPlacement:g,isRequired:a,children:e}),jsxRuntime.jsxs(Dt,{children:[s&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute top-1/2 -translate-y-1/2 transform flex items-center z-10",style:{left:9},children:(()=>{let k={sm:14,md:16,lg:18,xl:20}[o];return w?jsxRuntime.jsx(ao,{size:k,color:"text-text-secondary"}):jsxRuntime.jsx(G,{name:"MagnifyingGlass",size:k,className:`transition-colors ${v?"text-action-brand":"text-text-secondary"}`})})()}),jsxRuntime.jsx(Zl,{size:o,disabled:T,type:S?b?"text":"password":c,name:f.name,autoComplete:f.autoComplete,value:f.value,defaultValue:f.defaultValue,placeholder:f.placeholder,onFocus:k=>x(k,f.onFocus),onBlur:k=>C(k,f.onBlur),onChange:k=>f.onChange?.(k.target.value),style:s?{paddingLeft:{sm:28,md:32,lg:36,xl:37}[o]}:void 0,className:HM({isInvalid:N,isDisabled:T,isFocused:v,size:o,transparent:i,showSearchIcon:s,isClearable:l,hasValue:!!f.value,isPassword:S,className:typeof f.className=="string"?f.className:void 0})}),l&&f.value&&!T&&jsxRuntime.jsx(ms,{onClick:()=>{d?d():f.onChange&&f.onChange("");},size:o}),S&&!T&&jsxRuntime.jsx("button",{type:"button",onClick:()=>h(!b),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-secondary hover:text-text-primary","aria-label":b?"Hide password":"Show password",onMouseDown:k=>{k.preventDefault(),k.stopPropagation();},children:jsxRuntime.jsx(G,{name:b?"EyeSlash":"Eye",size:o==="sm"?16:20,className:"text-text-primary"})})]}),m?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&u?jsxRuntime.jsx(ye,{size:o,children:r(u)}):t&&g==="below"?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&u?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(u)}):t&&g==="below"?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})})}function Ma({value:e,onChange:t,onClear:r,placeholder:o="Search...",size:n="sm",className:a="",isLoading:i=false}){return jsxRuntime.jsx("div",{className:`flex-1 min-w-0 sm:max-w-sm ${a}`,children:jsxRuntime.jsx(fo,{value:e,onChange:t,placeholder:o,showSearchIcon:true,isClearable:!!e&&!!r,onClear:r,size:n,"aria-label":o,reserveErrorSpace:false,isLoading:i})})}function Fs({value:e,options:t,onChange:r,direction:o,onDirectionChange:n,showLabel:a=true,size:i="sm",className:s="",compact:l=false}){let[d,c]=ot.useState(false),u=o!==void 0&&n!==void 0,m=t.find(p=>p.value===e);return l?jsxRuntime.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[jsxRuntime.jsx(te,{variant:"secondary",size:i,icon:"ArrowsDownUp","aria-label":`Sort by: ${m?.label||"Select"}`,onPress:()=>c(true)}),jsxRuntime.jsx(Lt,{isOpen:d,onClose:()=>c(false),title:"Sort by",contentPadding:false,children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:t.map(p=>({id:p.value,label:p.label,value:p.value})),className:"w-full bg-background-surface p-0 outline-0 [&_[role=option]]:border-b [&_[role=option]]:border-border-default [&_[role=option]:last-child]:border-0 [&_[role=option]]:!px-6 [&_[role=option]]:!py-4 [&_[role=option]]:rounded-none",selectionMode:"single",selectedKeys:e?[e]:[],onSelectionChange:p=>{let g=Array.from(p)[0];g!=null&&(r(g),c(false));},children:p=>jsxRuntime.jsx(Ir,{id:p.id,textValue:p.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:p.label})},p.id)})})]}):jsxRuntime.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[a&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary whitespace-nowrap",children:"Sort by:"}),jsxRuntime.jsx(on,{selectedKey:e,onSelectionChange:p=>r(p),size:i,className:"min-w-32",items:t.map(p=>({id:p.value,label:p.label,value:p.value})),renderItem:p=>p.label,"aria-label":"Sort by",reserveErrorSpace:false}),u&&jsxRuntime.jsx(te,{variant:"ghost",size:i,onClick:()=>n(o==="asc"?"desc":"asc"),"aria-label":`Sort ${o==="asc"?"descending":"ascending"}`,className:"p-1.5",children:o==="asc"?jsxRuntime.jsx(lucideReact.ArrowUp,{className:"w-4 h-4"}):jsxRuntime.jsx(lucideReact.ArrowDown,{className:"w-4 h-4"})})]})}function Wy({search:e,searchMobileMode:t="expanded",filters:r=[],onRemoveFilter:o,onClearAllFilters:n,onManageFilters:a,exportControl:i,maxVisibleFilterChips:s=3,sort:l,resultsCount:d,leftControls:c,onManageColumns:u,columnPicker:m,customControls:p,actions:g,interactionMode:f="auto",sticky:b,stickyTop:h="0",zIndex:v=10,className:x="",style:C}){let S=r.length>0;if(!(e||S||a||l||d||c||u||m||p||g||i))return null;let T=b?"sticky bg-background-surface":"",N=b?{top:h,zIndex:v}:{};return jsxRuntime.jsxs("div",{className:`@container flex flex-col gap-3 bg-background-surface py-3 border-b border-border-default ${T} ${x}`,style:{...C,...N},children:[jsxRuntime.jsxs("div",{className:"hidden @[640px]:flex @[640px]:items-center @[640px]:justify-between @[640px]:gap-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[c,c&&d&&jsxRuntime.jsx("div",{className:"h-4 w-px bg-border-default"}),d&&jsxRuntime.jsx(Is,{count:d.count,label:d.label,suffix:d.suffix,unknownLabel:d.unknownLabel,isLoading:d.isLoading,testId:d.testId}),d&&l&&jsxRuntime.jsx("div",{className:"h-4 w-px bg-border-default"}),l&&jsxRuntime.jsx(Fs,{value:l.value,options:l.options,onChange:l.onChange,showLabel:l.showLabel,direction:l.direction,onDirectionChange:l.onDirectionChange}),u?jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:"Columns",onClick:u,children:"Columns"}):m,S&&o&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.slice(0,s).map(k=>jsxRuntime.jsxs(lo,{variant:"primary",size:"sm",onRemove:()=>o(k.id),isRemovable:true,children:[k.label,": ",k.value]},k.id)),r.length>s&&a&&jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",onClick:a,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:["+",r.length-s," more"]}),n&&jsxRuntime.jsx(te,{variant:"ghost",size:"sm",onClick:n,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:"Clear all"})]})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-3 flex-shrink-0",children:p||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&g.items.length>0&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:g.items.map(k=>jsxRuntime.jsx(te,{variant:k.variant||"secondary",size:"sm",icon:k.icon,onPress:k.onClick,isDisabled:k.disabled,children:k.label},k.id))}),e&&jsxRuntime.jsx("div",{className:"w-64",children:jsxRuntime.jsx(Ma,{value:e.value,onChange:e.onChange,onClear:e.onClear,placeholder:e.placeholder,isLoading:e.isLoading})}),a&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:"Sliders",badgeNumber:r.length>0?r.length:void 0,onClick:a,children:"Filters"}),i&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:i.icon??"Upload",onClick:i.onClick,isDisabled:i.isDisabled,isLoading:i.isLoading,children:i.label})]})})]}),jsxRuntime.jsxs("div",{className:"@[640px]:hidden",children:[jsxRuntime.jsx("div",{className:"flex flex-col gap-3 mb-3",children:jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:p?jsxRuntime.jsx("div",{className:"flex-1",children:p}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&g.items.length>0&&jsxRuntime.jsx(pi,{items:g.items.map(k=>({id:k.id,name:k.label,iconName:k.icon,variant:k.variant==="destructive"?"destructive":"primary",disabled:k.disabled,onAction:k.onClick})),align:"left",size:"sm",children:jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:"DotsThreeVertical","aria-label":g.menuLabel||"Actions"})}),e&&jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsx(Ma,{value:e.value,onChange:e.onChange,onClear:e.onClear,placeholder:e.placeholder,isLoading:e.isLoading})}),a&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:"Sliders",badgeNumber:r.length>0?r.length:void 0,onClick:a,"aria-label":`Filters${r.length>0?` (${r.length} active)`:""}`}),i&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:i.icon??"Upload",onClick:i.onClick,isDisabled:i.isDisabled,isLoading:i.isLoading,children:i.label})]})})}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[c,d&&jsxRuntime.jsx(Is,{count:d.count,label:d.label,suffix:d.suffix,unknownLabel:d.unknownLabel,isLoading:d.isLoading})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:l&&jsxRuntime.jsx(Fs,{value:l.value,options:l.options,onChange:l.onChange,showLabel:false,direction:l.direction,onDirectionChange:l.onDirectionChange,compact:f!=="desktop"})})]})]})]})}function Uy({filters:e,onRemove:t,onClearAll:r,onManageFilters:o,maxVisibleChips:n=3,mode:a="chips",showManageButton:i=true,size:s="sm",className:l=""}){let d=e.length>0,c=e.slice(0,n),u=Math.max(0,e.length-n),m=u>0,p=a==="button"&&!!o,g=a==="chips"&&i&&!!o;if(!d&&!p&&!g)return null;let f=p&&jsxRuntime.jsxs(te,{variant:"secondary",size:s,onClick:o,className:"whitespace-nowrap",children:[e.length," ",e.length===1?"filter":"filters"]}),b=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&jsxRuntime.jsx(te,{variant:"secondary",size:s,icon:"Sliders",onClick:o,className:"whitespace-nowrap",children:"Filters"}),d&&c.map(v=>jsxRuntime.jsxs(lo,{variant:"secondary",size:s,onRemove:()=>t(v.id),isRemovable:true,children:[v.label,": ",v.value]},v.id)),d&&m&&o&&jsxRuntime.jsxs(te,{variant:"ghost",size:s,onClick:o,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:["+",u," more"]}),d&&r&&jsxRuntime.jsx(te,{variant:"ghost",size:s,onClick:r,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:"Clear all"})]}),h=a==="button"?f:b;return jsxRuntime.jsx("div",{className:`flex flex-wrap items-center gap-2 ${l}`,children:h})}var Ky=["isEmpty","isNotEmpty"];function Yy(e){return Ky.includes(e)}var Xy={isEmpty:"is empty",isNotEmpty:"is not empty"};function JM(e,t,r){return {field:e,operator:t,value:r}}function jM(e,t="AND"){return {logic:t,conditions:e}}function Bs(){return {logic:"AND",conditions:[]}}function Jc(e){return !e||e.conditions.length===0?true:e.conditions.every(t=>"conditions"in t?Jc(t):false)}function qM(e,t){if(!e)return [];let r=new Map(t?.map(i=>[i.field,i])),o=new Map;function n(i){if("conditions"in i)i.conditions.forEach(s=>n(s));else {let s=o.get(i.field)||[];s.push(i),o.set(i.field,s);}}e.conditions.forEach(i=>n(i));let a=[];for(let[i,s]of o.entries()){let l=r.get(i),d=l?.label||i,c=[],u=[],m=[];for(let p of s)p.operator==="in"&&Array.isArray(p.value)?c.push(...p.value):p.operator==="eq"?p.value!==void 0&&typeof p.value!="boolean"&&!Array.isArray(p.value)?c.push(p.value):m.push(p):["gte","gt","lte","lt"].includes(p.operator)&&p.value!==void 0?u.push({operator:p.operator,value:typeof p.value=="boolean"||Array.isArray(p.value)?String(p.value):p.value}):m.push(p);if(c.length>0){let g=Array.from(new Set(c)).map(f=>l?.values?.find(h=>String(h.value)===String(f))?.label??f);a.push({id:`${i}-in`,label:d,value:g.join(", ")});}if(u.length>0){let p=u.find(f=>f.operator==="gte"||f.operator==="gt"),g=u.find(f=>f.operator==="lte"||f.operator==="lt");if(p&&g){let f=p.operator==="gte"?"\u2265":">",b=g.operator==="lte"?"\u2264":"<";a.push({id:`${i}-range`,label:d,value:`${f} ${p.value} and ${b} ${g.value}`});}else for(let f of u){let b;f.operator==="gte"?b="\u2265":f.operator==="gt"?b=">":f.operator==="lte"?b="\u2264":b="<",a.push({id:`${i}-${f.operator}`,label:d,value:`${b} ${f.value}`});}}for(let p of m){let g;p.operator==="neq"?g=`\u2260 ${p.value}`:p.operator==="contains"?g=`contains "${p.value}"`:p.operator==="startsWith"?g=`starts with "${p.value}"`:p.operator==="endsWith"?g=`ends with "${p.value}"`:Yy(p.operator)?g=Xy[p.operator]:g=String(p.value),a.push({id:`${i}-${p.operator}`,label:d,value:g});}}return a}function Xn(e,t){let r=e||Bs();return {...r,conditions:[...r.conditions,t]}}function Ea(e,t){if(!e)return Bs();let r=e.conditions.filter(o=>"conditions"in o?Ea(o,t).conditions.length>0:o.field!==t);return {...e,conditions:r}}function La(e){if(!e)return [];let t=new Set;function r(o){"conditions"in o?o.conditions.forEach(r):t.add(o.field);}return e.conditions.forEach(r),Array.from(t)}function jy({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,showCalendar:l=true,reserveErrorSpace:d=true,validationResult:c,className:u,...m}){let[p,g]=ot.useState(false),f=b=>{m.onChange&&b&&m.onChange(b),g(false);};return jsxRuntime.jsxs(reactAriaComponents.DateField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Fe(u,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsxs("div",{className:"relative w-full",children:[jsxRuntime.jsx(Vs,{size:o,isDisabled:i,isInvalid:s,hasCalendar:l}),l&&!i&&jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:p,onOpenChange:g,children:[jsxRuntime.jsx(te,{variant:"unstyled",className:"absolute right-2 top-1/2 -translate-y-1/2 flex h-8 w-8 items-center justify-center rounded hover:bg-background-hover text-text-secondary hover:text-text-primary transition-colors","aria-label":"Open calendar",children:jsxRuntime.jsx(G,{name:"Calendar",size:18})}),jsxRuntime.jsx(reactAriaComponents.Popover,{className:"bg-background-surface rounded-lg border border-border-default shadow-xl",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"p-4 outline-none",children:jsxRuntime.jsx(xi,{value:m.value,onChange:f,minValue:m.minValue,maxValue:m.maxValue,isDisabled:i,isReadOnly:m.isReadOnly,isDateUnavailable:m.isDateUnavailable})})})]})]})}),d?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&c?jsxRuntime.jsx(ye,{size:o,children:r(c)}):t?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&c?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(c)}):t?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})}function oE({isPlaceholder:e,isDisabled:t,size:r="md"}){return tailwindMerge.twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[r],e?"text-text-disabled italic":"text-text-primary",t?"text-text-disabled cursor-not-allowed":"cursor-text",!t&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-primary")}function Vs({size:e="md",isDisabled:t,isInvalid:r,hasCalendar:o,className:n,...a}){return jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(An({isInvalid:r,isDisabled:t}),"px-3 py-2 flex items-center gap-0.5 w-full",o&&"pr-10",n),...a,children:i=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:i,className:oE({isPlaceholder:i.isPlaceholder,isDisabled:!i.isEditable||t,size:e})})})}function jc({label:e,description:t,errorMessage:r,...o}){return jsxRuntime.jsxs(reactAriaComponents.DateRangePicker,{...o,className:Fe(o.className,"group flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(et,{children:e}),jsxRuntime.jsxs(_h,{className:"w-auto min-w-[208px]",children:[jsxRuntime.jsx(Vs,{slot:"start",className:"px-2 py-1.5 text-sm"}),jsxRuntime.jsx("span",{"aria-hidden":"true",className:"text-text-primary group-disabled:text-text-disabled forced-colors:text-[ButtonText] group-disabled:forced-colors:text-[GrayText]",children:"\u2013"}),jsxRuntime.jsx(Vs,{slot:"end",className:"flex-1 px-2 py-1.5 text-sm"}),jsxRuntime.jsx(te,{variant:"icon",className:"mr-1 w-6 rounded outline-offset-0",children:jsxRuntime.jsx(lucideReact.CalendarIcon,{"aria-hidden":true,className:"h-4 w-4"})})]}),t&&jsxRuntime.jsx(Ee,{children:t}),typeof r=="string"?jsxRuntime.jsx(ye,{children:r}):null,jsxRuntime.jsx(Et,{children:jsxRuntime.jsx(Ri,{})})]})}var pE=e=>{let t=rr({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return tailwindMerge.twMerge(t,"pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className)};function Os({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,validationResult:s,reserveErrorSpace:l=true,descriptionPlacement:d="below",...c}){let u=ot.useId(),{isFocused:m,handleFocus:p,handleBlur:g}=Ar();return jsxRuntime.jsx(reactAriaComponents.NumberField,{...c,id:u,isRequired:a,className:Fe(c.className,"group flex flex-col gap-1"),step:c.step??1,onChange:f=>{typeof f=="number"&&(c.maxValue!=null&&f>c.maxValue?c.onChange?.(c.maxValue):c.minValue!=null&&f<c.minValue?c.onChange?.(c.minValue):c.onChange?.(f));},isInvalid:!!r||typeof c.value=="number"&&(c.maxValue!=null&&c.value>c.maxValue||c.minValue!=null&&c.value<c.minValue),children:({isDisabled:f,isInvalid:b})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,description:d==="tooltip"||d==="inline"?t:void 0,descriptionPlacement:d,isRequired:a,htmlFor:u,children:e}),jsxRuntime.jsx("div",{className:"relative",children:jsxRuntime.jsxs(reactAriaComponents.Group,{className:"relative",children:[jsxRuntime.jsx(reactAriaComponents.Input,{onFocus:v=>p(v,c.onFocus),onBlur:v=>g(v,c.onBlur),className:pE({isInvalid:b||!!r,isDisabled:f,isFocused:m,transparent:i,size:o,className:typeof c.className=="string"?c.className:void 0})}),jsxRuntime.jsxs("div",{className:"absolute inset-y-[2px] right-[2px] flex flex-col divide-y divide-border-default border-l border-border-default overflow-hidden rounded-r-[calc(var(--control-border-radius)-2px)]",children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"increment",isDisabled:f,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(G,{name:"CaretUp",size:14})}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"decrement",isDisabled:f,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(G,{name:"CaretDown",size:14})})]})]})}),l?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:r?jsxRuntime.jsx(ye,{size:o,children:typeof r=="function"?r(s):r}):t&&d==="below"?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:r?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:typeof r=="function"?r(s):r}):t&&d==="below"?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})})}var Jm={sm:{track:"h-4 w-7",handle:"h-3.5 w-3.5",text:"text-xs"},md:{track:"h-5 w-9",handle:"h-4 w-4",text:"text-sm"},lg:{track:"h-6 w-11",handle:"h-5 w-5",text:"text-base"},xl:{track:"h-7 w-14",handle:"h-6 w-6",text:"text-lg"}};function gE({isSelected:e,isDisabled:t,size:r="md"}){let o="flex px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",n=Jm[r].track,a=pt,i="focus-visible:outline-action-primary",s="";return e?s="bg-action-primary forced-colors:!bg-[Highlight] group-pressed:bg-action-primary-hover":s="bg-border-input group-pressed:bg-border-focus",[o,n,a,i,s,t?"bg-background-muted forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function hE({isSelected:e,isDisabled:t,size:r="md"}){let o="transform rounded-full bg-background-surface outline-none shadow transition duration-200 ease-in-out",n=Jm[r].handle;return [o,n,e?"translate-x-[100%]":"translate-x-0",t?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function qc({children:e,variant:t="primary",size:r="md",...o}){return jsxRuntime.jsx(reactAriaComponents.Switch,{...o,className:Fe(o.className,`relative group flex items-center gap-2 ${Jm[r].text} text-text-primary transition disabled:text-text-disabled forced-colors:disabled:text-[GrayText]`),children:n=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:gE({...n,size:r}),children:jsxRuntime.jsx("span",{className:hE({...n,size:r})})}),e]})})}function Qy(e){return new Intl.NumberFormat("en-US").format(e)}function _y({isOpen:e,onClose:t,facetConfigs:r,facetCounts:o={},currentFilters:n,onApply:a,onClear:i,title:s="Filters",resultCount:l}){let[d,c]=ot.useState(n),[u,m]=ot.useState({}),[p,g]=ot.useState({}),[f,b]=ot.useState(null),{isMobile:h}=Rr(),v=ot.useMemo(()=>r.some(y=>y.group),[r]),{groups:x,ungroupedFacets:C,facetsByGroup:S}=ot.useMemo(()=>{let y=new Set,E=[],P={};for(let Y of r)Y.group?(y.has(Y.group)||(y.add(Y.group),P[Y.group]=[]),P[Y.group].push(Y)):E.push(Y);return {groups:Array.from(y),ungroupedFacets:E,facetsByGroup:P}},[r]);ot.useEffect(()=>{e&&(c(n),m({}),g({}),b(!h&&x.length>0?x[0]:null));},[e,n,x,h]);let w=ot.useMemo(()=>!d||Jc(d)?0:La(d).length,[d]),T=()=>{a(d),t();},N=()=>{let y=Bs();c(y),i?i():a(y),t();},k=y=>{if(!d)return [];if(!La(d).includes(y))return [];let P=[];function Y($){if($)for(let oe of $.conditions)"conditions"in oe?Y(oe):oe.field===y&&oe.operator==="in"&&Array.isArray(oe.value)&&P.push(...oe.value.map(String));}return Y(d),P},R=(y,E,P)=>{let Y=Ea(d,y);E!==void 0&&(Y=Xn(Y,{field:y,operator:"gte",value:E})),P!==void 0&&(Y=Xn(Y,{field:y,operator:"lte",value:P})),c(Y);},A=y=>{if(!d)return;let E;function P(Y){if(Y)for(let $ of Y.conditions)"conditions"in $?P($):$.field===y&&$.operator==="eq"&&typeof $.value=="boolean"&&(E=$.value);}return P(d),E},M=(y,E)=>{let P=Ea(d,y);E!==void 0&&(P=Xn(P,{field:y,operator:"eq",value:E})),c(P);},B=(y,E,P)=>{let Y=Ea(d,y);E&&(Y=Xn(Y,{field:y,operator:"gte",value:E.toString()})),P&&(Y=Xn(Y,{field:y,operator:"lte",value:P.toString()})),c(Y);},D=y=>{let E=S[y]||[],P=d?La(d):[];return E.filter(Y=>P.includes(Y.field)).length},W="pr-9 bg-background-muted/50",X="border-t border-border-muted",H="text-sm font-medium text-text-link-default",I=y=>jsxRuntime.jsx("span",{className:H,children:y}),F=y=>{let E=o[y.field]||{},P=u[y.field]||"",Y=[];y.values?Y=y.values.map(re=>({value:String(re.value),label:re.label,count:E[String(re.value)]})):Y=Object.entries(E).map(([re,_])=>({value:re,label:re,count:_}));let $=Y.length;if(P){let re=P.toLowerCase();Y=Y.filter(_=>_.label.toLowerCase().includes(re));}Y.sort((re,_)=>re.count!==void 0&&_.count!==void 0&&_.count!==re.count?_.count-re.count:re.label.localeCompare(_.label));let oe=y.type||"string";if(oe==="string"||!y.type){let re=k(y.field),_=y.searchThreshold??10,he=y.maxVisibleOptions??50,me=p[y.field]??false,ue=me||Y.length<=he?Y:Y.slice(0,he),ie=Y.length>he&&!me;return jsxRuntime.jsxs(On,{id:y.field,children:[jsxRuntime.jsx(zn,{title:y.label,description:y.description,className:W,endContent:re.length>0?I(`${re.length} selected`):void 0}),jsxRuntime.jsx(Hn,{className:X,children:jsxRuntime.jsxs("div",{className:"space-y-4 pt-4 pb-4",children:[$>_&&jsxRuntime.jsx(Ma,{value:P,onChange:fe=>m(Te=>({...Te,[y.field]:fe})),onClear:()=>m(fe=>({...fe,[y.field]:""})),placeholder:`Search ${y.label.toLowerCase()}...`,size:"sm",className:"w-full !max-w-none pr-4"}),jsxRuntime.jsx(Yp,{value:re,onChange:fe=>{let Te=Ea(d,y.field);fe.length>0&&(Te=Xn(Te,{field:y.field,operator:"in",value:fe})),c(Te);},children:jsxRuntime.jsx("div",{className:"space-y-1.5",children:ue.map(fe=>jsxRuntime.jsx("div",{className:"rounded-md py-2 pr-4 transition-colors hover:bg-background-hover",children:jsxRuntime.jsx(So,{value:fe.value,children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3 flex-1",children:[y.renderLabel?y.renderLabel(fe.value,fe.label):jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:fe.label}),fe.count!==void 0&&jsxRuntime.jsx("span",{className:"text-xs font-medium text-text-secondary tabular-nums",children:Qy(fe.count)})]})})},fe.value))})}),ie&&jsxRuntime.jsx("div",{className:"pt-2 border-t border-border-muted",children:jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",onPress:()=>g(fe=>({...fe,[y.field]:true})),className:"w-full",children:["Show all ",Y.length," options"]})}),me&&Y.length>he&&jsxRuntime.jsx("div",{className:"pt-2 border-t border-border-muted",children:jsxRuntime.jsx(te,{variant:"ghost",size:"sm",onPress:()=>g(fe=>({...fe,[y.field]:false})),className:"w-full",children:"Show less"})})]})})]},y.field)}if(oe==="number"){let re,_,he=ue=>{if(ue)for(let ie of ue.conditions)"conditions"in ie?he(ie):ie.field===y.field&&(ie.operator==="gte"&&typeof ie.value=="number"&&(re=ie.value),ie.operator==="lte"&&typeof ie.value=="number"&&(_=ie.value));};he(d);let me=re!==void 0||_!==void 0;return jsxRuntime.jsxs(On,{id:y.field,children:[jsxRuntime.jsx(zn,{title:y.label,description:y.description,className:W,endContent:me?I(re!==void 0&&_!==void 0?`${re} - ${_}`:re!==void 0?`\u2265 ${re}`:`\u2264 ${_}`):void 0}),jsxRuntime.jsx(Hn,{className:X,children:jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-4 pb-4",children:[jsxRuntime.jsx(Os,{label:"Min",value:re,onChange:ue=>R(y.field,ue,_)},`${y.field}-min`),jsxRuntime.jsx(Os,{label:"Max",value:_,onChange:ue=>R(y.field,re,ue)},`${y.field}-max`)]})})]},y.field)}if(oe==="boolean"){let re=A(y.field);return jsxRuntime.jsxs(On,{id:y.field,children:[jsxRuntime.jsx(zn,{title:y.label,description:y.description,className:W,endContent:re!==void 0?I(re?"Yes":"No"):void 0}),jsxRuntime.jsx(Hn,{className:X,children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between pt-4 pb-4",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:re!==void 0?re?"Enabled":"Disabled":"No filter applied"}),jsxRuntime.jsx(qc,{size:"lg",isSelected:re??false,onChange:_=>M(y.field,_?true:void 0),children:re?"Yes":"No"})]})})]},y.field)}if(oe==="date"){let re,_,he=Te=>{if(Te)for(let Ye of Te.conditions)"conditions"in Ye?he(Ye):Ye.field===y.field&&(Ye.operator==="gte"&&(re=String(Ye.value)),Ye.operator==="lte"&&(_=String(Ye.value)));};he(d);let me=re!==void 0||_!==void 0,ue=Te=>{if(Te)try{return /^\d{4}-\d{2}-\d{2}$/.test(Te)?date.parseDate(Te):void 0}catch{return}},ie=ue(re),fe=ue(_);return jsxRuntime.jsxs(On,{id:y.field,children:[jsxRuntime.jsx(zn,{title:y.label,description:y.description,className:W,endContent:me?I("Date range selected"):void 0}),jsxRuntime.jsx(Hn,{className:X,children:jsxRuntime.jsx("div",{className:"pt-4 pb-4",children:jsxRuntime.jsx(jc,{label:"Date Range",value:ie&&fe?{start:ie,end:fe}:void 0,onChange:Te=>{Te?B(y.field,Te.start,Te.end):B(y.field,void 0,void 0);}})})})]},y.field)}return null},z=()=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[C.map(y=>{let P=(d?La(d):[]).includes(y.field);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>b(`__ungrouped__${y.field}`),className:"flex items-center justify-between px-6 py-3 text-left hover:bg-background-hover border-b border-border-muted transition-colors",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:y.label}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[P&&jsxRuntime.jsx("span",{className:H,children:"1 active"}),jsxRuntime.jsx(G,{name:"CaretRight",size:"sm",className:"text-text-secondary"})]})]},y.field)}),x.map(y=>{let E=D(y);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>b(y),className:"flex items-center justify-between px-6 py-3 text-left hover:bg-background-hover border-b border-border-muted transition-colors",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:y}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[E>0&&jsxRuntime.jsxs("span",{className:H,children:[E," active"]}),jsxRuntime.jsx(G,{name:"CaretRight",size:"sm",className:"text-text-secondary"})]})]},y)})]}),U=y=>{if(y.startsWith("__ungrouped__")){let P=y.replace("__ungrouped__",""),Y=C.find($=>$.field===P);return Y?jsxRuntime.jsx(yi,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[Y.field],children:F(Y)}):null}let E=S[y]||[];return E.length===0?null:jsxRuntime.jsx(yi,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[E[0].field],children:E.map(P=>F(P))})},K=()=>{if(f){let y=f.startsWith("__ungrouped__")&&C.find(E=>E.field===f.replace("__ungrouped__",""))?.label||f;return jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>b(null),className:"flex items-center gap-2 px-4 py-3 border-b border-border-muted hover:bg-background-hover transition-colors",children:[jsxRuntime.jsx(G,{name:"CaretLeft",size:"sm",className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:y})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:U(f)})]})}return z()},O=()=>jsxRuntime.jsxs("div",{className:"flex h-full",children:[jsxRuntime.jsxs("div",{className:"w-48 flex-shrink-0 border-r border-border-muted overflow-y-auto bg-background-muted/30",children:[C.map(y=>{let P=(d?La(d):[]).includes(y.field),Y=f===`__ungrouped__${y.field}`;return jsxRuntime.jsxs("button",{type:"button",onClick:()=>b(`__ungrouped__${y.field}`),className:`flex items-center justify-between w-full px-4 py-3 text-left border-b border-border-muted transition-colors ${Y?"bg-background-selected":"hover:bg-background-hover"}`,children:[jsxRuntime.jsx("span",{className:`text-sm truncate ${Y?"font-semibold text-text-primary":"font-medium text-text-primary"}`,children:y.label}),P&&jsxRuntime.jsx("span",{className:"w-2 h-2 rounded-full bg-action-primary flex-shrink-0 ml-2"})]},y.field)}),x.map(y=>{let E=D(y),P=f===y;return jsxRuntime.jsxs("button",{type:"button",onClick:()=>b(y),className:`flex items-center justify-between w-full px-4 py-3 text-left border-b border-border-muted transition-colors ${P?"bg-background-selected":"hover:bg-background-hover"}`,children:[jsxRuntime.jsx("span",{className:`text-sm truncate ${P?"font-semibold text-text-primary":"font-medium text-text-primary"}`,children:y}),E>0&&jsxRuntime.jsx("span",{className:"w-2 h-2 rounded-full bg-action-primary flex-shrink-0 ml-2"})]},y)})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:f?U(f):jsxRuntime.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-sm",children:"Select a category to view filters"})})]}),V=()=>jsxRuntime.jsx(yi,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[r[0].field],children:r.map(y=>F(y))});return jsxRuntime.jsx(Dr,{isOpen:e,onClose:t,title:v&&h&&f?f.startsWith("__ungrouped__")?C.find(y=>y.field===f.replace("__ungrouped__",""))?.label||s:f:w>0?`${s} (${w} active)`:s,hideCloseIcon:false,primaryAction:{label:"Apply filters",onPress:T,variant:"primary"},secondaryAction:{label:"Clear all",onPress:N},maxWidth:v?"800px":"700px",height:"600px",mobileHeight:"85vh",contentPadding:false,footerContent:l!==void 0?jsxRuntime.jsxs("div",{className:"text-sm text-text-secondary text-center",children:[jsxRuntime.jsx("span",{className:"font-semibold text-text-primary",children:Qy(l)})," ",l===1?"result":"results"," with current filters"]}):void 0,children:r.length===0?jsxRuntime.jsx("div",{className:"py-12 text-center",children:jsxRuntime.jsx("div",{className:"text-sm font-medium text-text-secondary",children:"No filters available"})}):v?h?K():O():V()})}function qm(e="left"){switch(e){case "center":return "justify-center text-center";case "right":return "justify-end text-right";default:return "justify-start text-left"}}function Gr(e="normal",t){return tailwindMerge.twMerge({strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[e],t&&"hover:text-action-primary cursor-pointer transition-colors")}function ke(e="left",t){return tailwindMerge.twMerge("flex items-center gap-1 min-w-0 overflow-hidden",qm(e),t)}function _c(e,t="\u2014"){return e==null||e===""?t:String(e)}var Jn={xs:"h-4 w-12",sm:"h-4 w-20",md:"h-4 w-24",lg:"h-4 w-32",xl:"h-4 w-40"};function Ft(e="normal"){return {strong:Jn.lg,high:Jn.lg,normal:Jn.md,low:Jn.sm}[e]}function ge(e,...t){return typeof e=="function"?e(...t):e}function $y(e="neutral",t="sm"){return tailwindMerge.twMerge("inline-flex items-center rounded-full font-medium",t==="sm"?"px-2 py-0.5 text-xs":"px-2.5 py-1 text-sm",{success:"bg-feedback-success-background text-feedback-success-text",error:"bg-feedback-error-background text-feedback-error-text",warning:"bg-feedback-warning-background text-feedback-warning-text",info:"bg-feedback-info-background text-feedback-info-text",neutral:"bg-background-muted text-text-secondary"}[e])}function ev(e){return e?"success":"neutral"}function $c(e,t=false){return t?e>0?"text-feedback-success-text":e<0?"text-feedback-error-text":"text-text-primary":"text-text-primary"}function Zm(e="hover",t="secondary"){let r={primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",secondary:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",default:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",brand:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",muted:"text-text-secondary hover:text-text-secondary visited:text-text-secondary",unstyled:""},o={visible:"underline underline-offset-4 decoration-1 cursor-pointer",hover:"hover:underline hover:underline-offset-4 hover:decoration-1 cursor-pointer transition-colors",none:"cursor-pointer"},n=r[t],a=o[e]||"";return `${n} ${a}`.trim()}function Yo(e,t,r,o="hover",n="secondary",a,i){if(!t)return e;let s=typeof t=="function"&&r?t(r):t,l=Zm(o,n);return jsxRuntime.jsx("a",{href:s,className:tailwindMerge.twMerge(l,a==="strong"||a==="high"?"font-semibold":"",i),onClick:c=>{c.metaKey||c.ctrlKey;},children:e})}function tv({row:e,context:t,actions:r,align:o="right",size:n="sm"}){let{isLoading:a}=t;if(a)return jsxRuntime.jsx(q,{className:Jn.sm});let s=(typeof r=="function"?r(e):r).filter(d=>!ge(d.hidden,e));if(s.length===0)return null;let l=ke(o);return jsxRuntime.jsx("div",{className:l,children:s.map(d=>{let c=ge(d.disabled,e);return d.variant==="icon"||!d.label?jsxRuntime.jsx(te,{variant:"icon",size:n,onPress:()=>{d.onClick(e);},isDisabled:c,"aria-label":d.label||d.id,children:jsxRuntime.jsx(G,{name:d.icon||"DotsThree",size:n==="sm"?16:20})},d.id):jsxRuntime.jsxs(te,{variant:d.variant||"secondary",size:n,onPress:()=>{d.onClick(e);},isDisabled:c,children:[d.icon&&jsxRuntime.jsx(G,{name:d.icon,size:n==="sm"?14:16}),d.label]},d.id)})})}function ov({value:e,row:t,context:r,variant:o="default",label:n,size:a="sm",shape:i="square",dot:s,dotPosition:l="left",dotPulse:d,align:c="left",emptyText:u="\u2014",className:m,maxVisible:p=2,maxLabelLength:g}){let{isLoading:f}=r,b=(w,T)=>{if(!g||w.length<=g)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:w});let N=w.slice(0,g-1)+"\u2026";return jsxRuntime.jsx(tr,{content:T,children:jsxRuntime.jsx("span",{children:N})})};if(f)return jsxRuntime.jsx(q,{className:Ft("normal")});if(e==null||e==="")return jsxRuntime.jsx("div",{className:ke(c,"text-text-secondary"),children:u});if(Array.isArray(e)&&e.length===0)return jsxRuntime.jsx("div",{className:ke(c,"text-text-secondary"),children:u});let h=ke(c,m);if(Array.isArray(e)){let w=e.slice(0,p),T=e.slice(p),N=T.length>0;return jsxRuntime.jsx("div",{className:h,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[w.map((k,R)=>{let A=ge(o,k,t),M=n!==void 0?ge(n,k,t):String(k),B=ge(s,k,t),D=ge(d,k,t);return jsxRuntime.jsx("span",{className:"flex-shrink-0 whitespace-nowrap",children:jsxRuntime.jsx(kt,{variant:A,size:a,shape:i,dot:B,dotPosition:l,dotPulse:D,children:b(M,M)})},R)}),N&&jsxRuntime.jsx(tr,{content:T.join(", "),children:jsxRuntime.jsx("span",{className:"flex-shrink-0 whitespace-nowrap",children:jsxRuntime.jsxs(kt,{variant:"neutral",size:a,shape:i,children:["+",T.length]})})})]})})}let v=ge(o,e,t),x=n!==void 0?ge(n,e,t):String(e),C=ge(s,e,t),S=ge(d,e,t);return jsxRuntime.jsx("div",{className:h,children:jsxRuntime.jsx(kt,{variant:v,size:a,shape:i,dot:C,dotPosition:l,dotPulse:S,children:b(x,x)})})}function nv({value:e,context:t,format:r="icon",trueText:o="Yes",falseText:n="No",trueIcon:a="Check",falseIcon:i="X",showFalse:s=true,align:l="center",emphasis:d="normal",className:c}){let{isLoading:u}=t;if(u)return jsxRuntime.jsx(q,{className:Ft(d)});let m=!!e;if(!m&&!s)return jsxRuntime.jsx("div",{className:ke(l,c)});let p=ke(l,c);switch(r){case "icon":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx(G,{name:m?a:i,size:16,className:m?"text-feedback-success-text":"text-text-disabled"})});case "text":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx("span",{className:Gr(d),children:m?o:n})});case "badge":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx(kt,{variant:m?"success":"neutral",size:"sm",children:m?o:n})});default:return null}}var ed="var(--color-text-subtle)",av=Tl().map((e,t)=>`var(--color-viz-categorical-${t+1})`);function sv({value:e,row:t,context:r,color:o,swatch:n="dot",emptyText:a="\u2014",align:i="left",className:s}){let{isLoading:l}=r;if(l)return jsxRuntime.jsx(q,{className:Ft("normal")});let d=ge(e,t),c=d==null?"":String(d);return c.length===0?jsxRuntime.jsx("div",{className:ke(i,"text-text-secondary"),children:a}):jsxRuntime.jsxs("div",{className:ke(i,tailwindMerge.twMerge("gap-2",s)),children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:tailwindMerge.twMerge("h-2 w-2 flex-shrink-0",n==="dot"?"rounded-full":"rounded-sm"),style:{backgroundColor:o??ed}}),jsxRuntime.jsx("span",{className:"truncate",children:c})]})}function cv({row:e,context:t,firstName:r,lastName:o,email:n,avatarUrl:a,layout:i="stacked",size:s="sm",href:l,LinkComponent:d,linkVariant:c="secondary",showEmail:u=false,badge:m,emphasis:p="normal",align:g="left",className:f,piiEntity:b}){let{isLoading:h}=t,v=ge(r,e),x=ge(o,e),C=ge(n,e),S=ge(a,e),w=ge(l,e),T=ge(m,e),N=ge(b,e),k=ke(g,f);return jsxRuntime.jsx("div",{className:k,children:jsxRuntime.jsx(lc,{firstName:v,lastName:x,email:C,avatarUrl:S,layout:i,size:s,href:w,LinkComponent:d,linkVariant:c,showEmail:u,badge:T,emphasis:p,isLoading:h,piiEntity:N})})}function dv({value:e,row:t,context:r,render:o,className:n}){let a=o(e,t,r);return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-full w-full",n),children:a})}function uv({value:e,row:t,context:r,format:o="date",customFormat:n,emptyText:a="\u2014",align:i="left",emphasis:s="normal",href:l,linkBehavior:d="hover",className:c}){let{isLoading:u}=r;if(u)return jsxRuntime.jsx(q,{className:Ft(s)});if(!e)return jsxRuntime.jsx("div",{className:ke(i,"text-text-secondary"),children:a});let m=e instanceof Date?e:new Date(e);if(isNaN(m.getTime()))return jsxRuntime.jsx("div",{className:ke(i,"text-text-secondary"),children:a});let p;switch(o){case "date":p=m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});break;case "time":p=m.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});break;case "datetime":p=m.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});break;case "relative":p=RE(m);break;case "custom":p=n?m.toLocaleString("en-US",n):m.toISOString();break;default:p=m.toLocaleDateString();}let g=ke(i,tailwindMerge.twMerge(Gr(s),c)),f=ge(l,t);return f?jsxRuntime.jsx("div",{className:g,children:Yo(p,f,t,d)}):jsxRuntime.jsx("div",{className:g,children:p})}function RE(e){let r=new Date().getTime()-e.getTime(),o=Math.floor(r/1e3),n=Math.floor(o/60),a=Math.floor(n/60),i=Math.floor(a/24);return o<60?"just now":n<60?`${n} minute${n!==1?"s":""} ago`:a<24?`${a} hour${a!==1?"s":""} ago`:i<7?`${i} day${i!==1?"s":""} ago`:e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}var EE={up:"ArrowUp",down:"ArrowDown",flat:"Minus"},LE={positive:"text-feedback-success-text",negative:"text-feedback-error-text",neutral:"text-text-secondary"};function Qm(e){return e>0?"up":e<0?"down":"flat"}function DE(e,t,r){switch(e){case "percent":return {type:"percentage",decimals:t};case "currency":return {type:"currency",currency:r,minimumFractionDigits:t,maximumFractionDigits:t};case "compact":return {type:"number",notation:"compact",decimals:t,thousandsSeparator:true};default:return {type:"number",decimals:t,thousandsSeparator:true}}}function pv({value:e,row:t,context:r,direction:o,tone:n="neutral",format:a="number",decimals:i=0,currency:s="USD",showIcon:l=true,align:d="right",emphasis:c="normal",emptyText:u="\u2014",className:m}){let{isLoading:p}=r;if(p)return jsxRuntime.jsx(q,{className:Ft(c)});let g=typeof e=="number"?e:Number(e);if(e==null||e===""||!Number.isFinite(g))return jsxRuntime.jsx("div",{className:ke(d,"text-text-secondary"),children:u});let f=ge(o,t)??Qm(g),b=ge(n,t)??"neutral",h=Xr(g,DE(a,i,s))??u,v=g>0?"+":"",C=ke(d,tailwindMerge.twMerge(c==="strong"||c==="high"?"font-semibold":void 0,m,LE[b]));return jsxRuntime.jsxs("div",{className:C,children:[l&&jsxRuntime.jsx(G,{name:EE[f],size:"xs","aria-hidden":true}),jsxRuntime.jsx("span",{children:`${v}${h}`})]})}var IE={open:{className:"text-feedback-success-border",token:"--color-feedback-success-border",label:"Open"},closed:{className:"text-feedback-error-border",token:"--color-feedback-error-border",label:"Closed"}},FE={platform:{label:"Platform",description:"Core product objects that structure the Texture workspace.",icon:"Stack",order:0},grid:{label:"Grid Elements",description:"Physical utility-grid infrastructure imported from a customer's GIS export.",icon:"TreeStructure",order:1},device:{label:"Devices",description:"Behind-the-meter connected energy devices.",icon:"Lightning",order:2}},BE=["energized","customerName","gs_max_continuous_current"],VE=["MOTOR.voltage"],OE=[{key:"total_kvar",label:"Rated kvar",format:{type:"power",unit:"kvar",decimals:1}}],zE=[{key:"kvar_a",label:"kvar A",format:{type:"power",unit:"kvar",decimals:1}},{key:"kvar_b",label:"kvar B",format:{type:"power",unit:"kvar",decimals:1}},{key:"kvar_c",label:"kvar C",format:{type:"power",unit:"kvar",decimals:1}}],xt={TRANSFORMER:[{key:"capacityKva",label:"kVA Rating",format:{type:"power",unit:"kVA",decimals:0}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"primaryVoltageKv",label:"Primary Voltage",format:{type:"voltage",unit:"kV",decimals:1}},{key:"outputVoltageKv",label:"Output Voltage",format:{type:"voltage",unit:"kV",decimals:2}},{key:"manufacturer",label:"Manufacturer",format:{type:"text"}},{key:"xfmr_conductor_description",label:"Conductor",format:{type:"text"}}],CONSUMER:[{key:"service_address",label:"Service address",format:{type:"text"}},{key:"name",label:"Customer",format:{type:"text"}},{key:"account_number",label:"Account #",format:{type:"text"}},{key:"meterNumber",label:"Meter Number",format:{type:"text"}},{key:"service_type",label:"Service type",format:{type:"text"}}],SOURCE:[{key:"voltageKv",label:"Nominal Voltage",format:{type:"voltage",unit:"kV",decimals:1}},{key:"substationNumber",label:"Substation Number",format:{type:"text"}},{key:"trf_capacity",label:"Rated Capacity",format:{type:"text"}},{key:"connection_code",label:"Connection",format:{type:"text"}}],SWITCH:[{key:"switchId",label:"Switch ID",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"max_continuous_current",label:"Max Continuous Current",format:{type:"number",unit:"A",decimals:0}},{key:"switchIsOpen",label:"Position",format:{type:"text"}},{key:"switch_status",label:"Status",format:{type:"text"}},{key:"partnerIdentifier",label:"Partner ID",format:{type:"text"}}],CAPACITOR:[{key:"phase",label:"Phase",format:{type:"text"}},{key:"nominalVoltageV",label:"Nominal Voltage",format:{type:"voltage",unit:"V",decimals:0}}],OVERCURRENT_DEVICE:[{key:"size_value",label:"Size",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}}],REGULATOR:[{key:"rated_kva",label:"Rated kVA",format:{type:"power",unit:"kVA",decimals:0}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"manufacturer",label:"Manufacturer",format:{type:"text"}},{key:"high_side_configuration",label:"High Side",format:{type:"text"}},{key:"forwardSetVoltageV",label:"Forward Set Voltage",format:{type:"voltage",unit:"V",decimals:1}}],OVERHEAD_LINE:[{key:"impedanceLength",label:"Length",format:{type:"distance",unit:"ft",decimals:2}},{key:"conductorDescPhA",label:"Conductor Phase A",format:{type:"text"}},{key:"conductorDescPhB",label:"Conductor Phase B",format:{type:"text"}},{key:"conductorDescPhC",label:"Conductor Phase C",format:{type:"text"}},{key:"conductorDescNeutral",label:"Conductor Neutral",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"subtype_cd",label:"Subtype",format:{type:"text"}}],UNDERGROUND_LINE:[{key:"impedanceLength",label:"Length",format:{type:"distance",unit:"ft",decimals:2}},{key:"conductorDescPhA",label:"Conductor Phase A",format:{type:"text"}},{key:"conductorDescPhB",label:"Conductor Phase B",format:{type:"text"}},{key:"conductorDescPhC",label:"Conductor Phase C",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"subtype_cd",label:"Subtype",format:{type:"text"}}],NODE:[],SUPPORT_STRUCTURE:[{key:"height",label:"Height",format:{type:"distance",unit:"ft",decimals:0}},{key:"class",label:"Class",format:{type:"text"}},{key:"species",label:"Material",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"substation",label:"Substation",format:{type:"text"}}],GENERATOR:[{key:"phase",label:"Phase",format:{type:"text"}},{key:"generator_system_size",label:"System Size",format:{type:"number",decimals:1}}],MOTOR:[{key:"ratedPower",label:"Rated Power",format:{type:"power",unit:"kW",decimals:1}},{key:"voltage",label:"Voltage",format:{type:"voltage",unit:"V",decimals:0}}],DEVICE_LEADER:[],TRANSFORMER_BANK:[]},fn={app:{icon:"AppWindow",category:"platform",archetype:"platform",detailPage:false,label:{singular:"App",plural:"Apps"},description:"Workspace tools and third-party integrations"},site:{icon:"MapPin",category:"platform",archetype:"platform",detailPage:true,label:{singular:"Site",plural:"Sites"},description:"Physical location housing energy systems"},device:{icon:"ShareNetwork",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Device",plural:"Devices"},description:"Connected, controllable energy device"},customer:{icon:"Users",category:"platform",archetype:"platform",detailPage:true,label:{singular:"Customer",plural:"Customers"},description:"End customer or owner of one or more sites"},contact:{icon:"Users",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Contact",plural:"Contacts"},description:"Person associated with a customer or site"},program:{icon:"ClipboardText",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Program",plural:"Programs"},description:"Demand-response or virtual power plant program"},workflow:{icon:"FlowArrow",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Workflow",plural:"Workflows"},description:"Automated rule that runs in response to events"},collection:{icon:"Stack",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Collection",plural:"Collections"},description:"Named group of related entities or records"},board:{icon:"TextureBoards",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Board",plural:"Boards"},description:"Dashboard for monitoring metrics and devices"},report:{icon:"ChartLine",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Report",plural:"Reports"},description:"Saved analytics view or generated report"},event:{icon:"ClockCounterClockwise",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Event",plural:"Events"},description:"Recorded system event or logged activity"},alert:{icon:"Warning",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Alert",plural:"Alerts"},description:"Notification raised when attention is needed"},monitor:{icon:"TextureMonitors",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Monitor",plural:"Monitors"},description:"Rule that watches a metric against a threshold"},insight:{icon:"LightbulbFilament",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Insight",plural:"Insights"},description:"Derived finding surfaced from platform data"},command:{icon:"Play",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Command",plural:"Commands"},description:"Control action issued to a connected device"},explore:{icon:"TextureExplore",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Explore",plural:"Explore"},description:"The BEAM map surface for exploring the connected grid."},boards:{icon:"TextureBoards",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Boards",plural:"Boards"},description:"The BEAM surface for building and viewing grid dashboards."},monitors:{icon:"TextureMonitors",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Monitors",plural:"Monitors"},description:"The BEAM surface for watching conditions across the grid."},askTexture:{icon:"Sparkle",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Ask Texture",plural:"Ask Texture"},description:"The BEAM conversational surface for investigating grid data and creating views and monitors."},survey:{icon:"TextureSurvey",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Survey",plural:"Survey"},description:"The onboarding engagement that maps a utility's systems to the Terrain schema."},seismic:{icon:"TextureSeismic",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Seismic",plural:"Seismic"},description:"AI-powered interpretation of raw data, automatically mapped into the grid model."},waypoint:{icon:"TextureWaypoint",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Waypoint",plural:"Waypoint"},description:"Flexible customer data collection and authorization for consumer devices."},terrain:{icon:"TextureTerrain",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Terrain",plural:"Terrain"},description:"The shared schema for grid assets, locations, and relationships. An AI-ready data model standard."},magma:{icon:"TextureMagma",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Magma",plural:"Magma"},description:"The execution engine for streaming, monitoring, automation, insights, and simulations, using data in the Terrain schema."},ground:{icon:"TextureGround",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Ground",plural:"Ground"},description:"On-premises hardware Stations for local control, AI processing, and continuity when cloud connectivity drops."},source:{icon:"TextureSource",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.SOURCE},label:{singular:"Source",plural:"Sources"},description:"Upstream feed where the network originates"},substation:{icon:"TextureSource",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.SOURCE},label:{singular:"Substation",plural:"Substations"},description:"Facility that steps down transmission voltage"},capacitor:{icon:"TextureCapacitor",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.CAPACITOR},label:{singular:"Capacitor",plural:"Capacitors"},description:"Capacitor bank for power-factor and voltage support"},switch:{icon:"TextureSwitchClosed",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.SWITCH},label:{singular:"Switch",plural:"Switches"},description:"Sectionalizing or disconnect switch on the line",states:{open:{icon:"TextureSwitch",color:"open"},closed:{icon:"TextureSwitchClosed",color:"closed"}}},sectionalizer:{icon:"TextureSectionalizerClosed",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.SWITCH},label:{singular:"Sectionalizer",plural:"Sectionalizers"},description:"Counts upstream recloser trips and opens to isolate a faulted section",states:{open:{icon:"TextureSectionalizerOpen",color:"open"},closed:{icon:"TextureSectionalizerClosed",color:"closed"}}},relay:{icon:"Cpu",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.NODE},label:{singular:"Relay",plural:"Relays"},description:"Microprocessor relay that senses faults and trips devices"},transformer:{icon:"TextureTransformer",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.TRANSFORMER},label:{singular:"Transformer",plural:"Transformers"},description:"Transformer that steps voltage up or down"},meter:{icon:"Gauge",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.CONSUMER},label:{singular:"Meter",plural:"Meters"},description:"Revenue meter at the point of consumption"},consumer:{icon:"Gauge",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.CONSUMER},label:{singular:"Consumer",plural:"Consumers"},description:"Service point or customer premise on the grid"},singlePhaseOverheadLine:{icon:"TextureSinglePhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:xt.OVERHEAD_LINE},label:{singular:"Single-Phase Overhead Line",plural:"Single-Phase Overhead Lines"},description:"Overhead line carrying one phase conductor"},twoPhaseOverheadLine:{icon:"TextureTwoPhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:xt.OVERHEAD_LINE},label:{singular:"Two-Phase Overhead Line",plural:"Two-Phase Overhead Lines"},description:"Overhead line carrying two phase conductors"},threePhaseOverheadLine:{icon:"TextureThreePhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:xt.OVERHEAD_LINE},label:{singular:"Three-Phase Overhead Line",plural:"Three-Phase Overhead Lines"},description:"Overhead line carrying three phase conductors"},singlePhaseUndergroundLine:{icon:"TextureSinglePhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:xt.UNDERGROUND_LINE},label:{singular:"Single-Phase Underground Line",plural:"Single-Phase Underground Lines"},description:"Buried line carrying one phase conductor"},twoPhaseUndergroundLine:{icon:"TextureTwoPhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:xt.UNDERGROUND_LINE},label:{singular:"Two-Phase Underground Line",plural:"Two-Phase Underground Lines"},description:"Buried line carrying two phase conductors"},threePhaseUndergroundLine:{icon:"TextureThreePhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:xt.UNDERGROUND_LINE},label:{singular:"Three-Phase Underground Line",plural:"Three-Phase Underground Lines"},description:"Buried line carrying three phase conductors"},motorSwitch:{icon:"Diamond",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.MOTOR},label:{singular:"Motor Switch",plural:"Motor Switches"},description:"Motor-operated switch or motor load element"},recloser:{icon:"TextureRecloser",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.OVERCURRENT_DEVICE},label:{singular:"Recloser",plural:"Reclosers"},description:"Auto-reclosing device that clears transient faults",states:{open:{color:"open"},closed:{color:"closed"}}},fuse:{icon:"TextureFuse",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.OVERCURRENT_DEVICE},label:{singular:"Fuse",plural:"Fuses"},description:"Fusible element providing overcurrent protection"},breaker:{icon:"TextureBreaker",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.OVERCURRENT_DEVICE},label:{singular:"Breaker",plural:"Breakers"},description:"Circuit breaker that interrupts fault current",states:{open:{color:"open"},closed:{color:"closed"}}},generator:{icon:"Wind",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.GENERATOR},label:{singular:"Generator",plural:"Generators"},description:"Distributed generation unit feeding the grid"},regulator:{icon:"TextureRegulator",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.REGULATOR},label:{singular:"Regulator",plural:"Regulators"},description:"Voltage regulator that holds line voltage in range"},supportStructure:{icon:"TextureSupportStructure",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:xt.SUPPORT_STRUCTURE},label:{singular:"Support Structure",plural:"Support Structures"},description:"Structure carrying overhead line equipment"},deviceLeader:{icon:"FlowArrow",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:xt.DEVICE_LEADER},label:{singular:"Device Leader",plural:"Device Leaders"},description:"Cartographic leader line pointing an offset device symbol to its true location"},transformerBank:{icon:"TextureTransformer",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:xt.TRANSFORMER_BANK},label:{singular:"Transformer Bank",plural:"Transformer Banks"},description:"Grouping of single-phase transformer units sharing a bank id"},battery:{icon:"BatteryHigh",category:"device",archetype:"device",detailPage:true,label:{singular:"Battery",plural:"Batteries"},description:"Behind-the-meter battery or storage system",fusedMetricId:"soc",fields:{headlineMetrics:[{id:"power",label:"device.battery.fields.gridPower",source:{kind:"state",path:"state.gridPower"},format:{type:"power",decimals:1},icon:"Lightning"},{id:"soc",label:"device.battery.fields.soc",source:{kind:"state",path:"state.chargePercentage"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"batteryPower",label:"device.battery.fields.batteryPower",source:{kind:"state",path:"state.chargeRate"},format:{type:"power",decimals:1},icon:"TrendUp"},{id:"backupReserve",label:"device.battery.fields.backupReserve",source:{kind:"state",path:"state.backupReserve"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"}]},stateRules:{primaryState:{label:"device.battery.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"},secondaryState:{label:"device.battery.fields.gridState",fieldPath:"state.gridStatus",mapping:{importing:"importing",exporting:"exporting",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},evCharger:{icon:"ChargingStation",category:"device",archetype:"device",detailPage:true,label:{singular:"EV Charger",plural:"EV Chargers"},description:"Electric-vehicle charging station or port",fusedMetricId:"power",fields:{headlineMetrics:[{id:"power",label:"device.evCharger.fields.power",source:{kind:"state",path:"state.chargerWattage"},format:{type:"power",decimals:1},icon:"Lightning"},{id:"isPluggedIn",label:"device.evCharger.fields.isPluggedIn",source:{kind:"state",path:"state.isPluggedIn"},format:{type:"boolean",trueText:"Yes",falseText:"No"},icon:"Plug"},{id:"voltage",label:"device.evCharger.fields.voltage",source:{kind:"state",path:"state.chargerVoltage"},format:{type:"voltage",decimals:1},icon:"Lightning"},{id:"current",label:"device.evCharger.fields.current",source:{kind:"state",path:"state.chargerCurrent"},format:{type:"current",decimals:1},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.evCharger.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},inverter:{icon:"Sun",category:"device",archetype:"device",detailPage:true,label:{singular:"Solar / Inverter",plural:"Solar / Inverters"},description:"Solar PV inverter and its connected array",fusedMetricId:"power",fields:{headlineMetrics:[{id:"power",label:"device.inverter.fields.power",source:{kind:"state",path:"state.power"},format:{type:"power",decimals:0},icon:"Lightning"},{id:"gridPower",label:"device.inverter.fields.gridPower",source:{kind:"state",path:"state.gridPower"},format:{type:"power",decimals:0},icon:"GridFour"},{id:"generatedEnergy",label:"device.inverter.fields.generatedEnergy",source:{kind:"state",path:"state.generatedEnergy"},format:{type:"energy",decimals:1},icon:"Lightning"},{id:"lifetimeEnergyGenerated",label:"device.inverter.fields.lifetimeEnergyGenerated",source:{kind:"state",path:"state.lifetimeEnergyGenerated"},format:{type:"energy",decimals:0},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.inverter.fields.gridStatus",fieldPath:"state.gridStatus",mapping:{exporting:"exporting",importing:"importing",idle:"idle"},fallback:"unknown"}}},sensor:{icon:"TextureSensor",category:"device",archetype:"device",detailPage:true,label:{singular:"Sensor",plural:"Sensors"},description:"Connected grid and power-quality sensor"},thermostat:{icon:"Thermometer",category:"device",archetype:"device",detailPage:true,label:{singular:"Thermostat",plural:"Thermostats"},description:"Smart thermostat or connected HVAC control",fusedMetricId:"ambientTemperature",fields:{headlineMetrics:[{id:"ambientTemperature",label:"device.thermostat.fields.ambientTemperature",source:{kind:"state",path:"state.ambientTemperature"},format:{type:"temperature",decimals:0},icon:"Thermometer"},{id:"heatTarget",label:"device.thermostat.fields.heatTarget",source:{kind:"state",path:"state.heatTarget"},format:{type:"temperature",decimals:0},icon:"Flame"},{id:"coolTarget",label:"device.thermostat.fields.coolTarget",source:{kind:"state",path:"state.coolTarget"},format:{type:"temperature",decimals:0},icon:"Snowflake"},{id:"fanMode",label:"device.thermostat.fields.fanMode",source:{kind:"state",path:"state.fanMode"},format:{type:"text"}}]},stateRules:{primaryState:{label:"device.thermostat.fields.operatingMode",fieldPath:"state.operatingMode",mapping:{heat:"heat",cool:"cool",auto:"auto",off:"off",eco:"eco",unknown:"unknown"},fallback:"unknown"}}},vehicle:{icon:"Car",category:"device",archetype:"device",detailPage:true,label:{singular:"EV",plural:"EVs"},description:"Electric vehicle managed as a flexible load",fusedMetricId:"chargePercentage",fields:{headlineMetrics:[{id:"chargePercentage",label:"device.vehicle.fields.chargePercentage",source:{kind:"state",path:"state.chargePercentage"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"range",label:"device.vehicle.fields.range",source:{kind:"state",path:"state.range"},format:{type:"distance",unit:"mi",decimals:0},icon:"GasPump"},{id:"chargeLimit",label:"device.vehicle.fields.chargeLimit",source:{kind:"state",path:"state.chargeLimit"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"isPluggedIn",label:"device.vehicle.fields.isPluggedIn",source:{kind:"state",path:"state.isPluggedIn"},format:{type:"boolean",trueText:"Yes",falseText:"No"},icon:"Plug"}]},stateRules:{primaryState:{label:"device.vehicle.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},waterHeater:{icon:"Drop",category:"device",archetype:"device",detailPage:true,label:{singular:"Water Heater",plural:"Water Heaters"},description:"Connected or smart electric water heater"}},mv=Object.freeze(Object.keys(fn).filter(e=>fn[e].category==="grid")),HE=new Set(mv);function GE(e){return typeof e=="string"&&HE.has(e)}var WE={source:"SOURCE",substation:"SOURCE",capacitor:"CAPACITOR",switch:"SWITCH",sectionalizer:"SWITCH",relay:"NODE",transformer:"TRANSFORMER",meter:"CONSUMER",consumer:"CONSUMER",singlePhaseOverheadLine:"OVERHEAD_LINE",twoPhaseOverheadLine:"OVERHEAD_LINE",threePhaseOverheadLine:"OVERHEAD_LINE",singlePhaseUndergroundLine:"UNDERGROUND_LINE",twoPhaseUndergroundLine:"UNDERGROUND_LINE",threePhaseUndergroundLine:"UNDERGROUND_LINE",motorSwitch:"MOTOR",recloser:"OVERCURRENT_DEVICE",fuse:"OVERCURRENT_DEVICE",breaker:"OVERCURRENT_DEVICE",generator:"GENERATOR",regulator:"REGULATOR",supportStructure:"SUPPORT_STRUCTURE",deviceLeader:"DEVICE_LEADER",transformerBank:"TRANSFORMER_BANK"};function od(e){return fn[e]}function Gs(e){return fn[e].icon}function UE(e,t=false){return t?fn[e].label.plural:fn[e].label.singular}function KE(e){return fn[e].category}var YE={min:2,max:4};function XE(e){let t=fn[e];if(!t)throw new Error(`archetypeFor: unknown entity type "${String(e)}"`);return t.archetype}function JE(e){return od(e).detailPage}function jE(e){return (od(e).fields?.headlineMetrics.length??0)>0}function fv(e){return od(e).properties?.statList??[]}function qE(e){return fv(e).length>0}function nd({manufacturer:e,model:t,deviceType:r,deviceTypeIconName:o,logoUrl:n,layout:a="stacked",size:i="md",href:s,LinkComponent:l,linkVariant:d="unstyled",showDeviceTypeIcon:c=true,showLogo:u=true,emphasis:m="normal",isLoading:p=false,className:g,piiEntity:f}){let[b,h]=ot.useState(false),v=o||(r?QE(r):"DeviceMobile"),C={xs:{iconSize:28,logoSize:"w-7 h-7",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",iconInTextSize:12,skeletonIcon:28,skeletonText:80,skeletonSecondary:60},sm:{iconSize:32,logoSize:"w-8 h-8",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",iconInTextSize:14,skeletonIcon:32,skeletonText:96,skeletonSecondary:72},md:{iconSize:32,logoSize:"w-9 h-9",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",iconInTextSize:16,skeletonIcon:36,skeletonText:128,skeletonSecondary:96},lg:{iconSize:40,logoSize:"w-10 h-10",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",iconInTextSize:18,skeletonIcon:40,skeletonText:160,skeletonSecondary:120}}[i],S=n&&!b&&u,T={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[m],N=({children:k,className:R})=>s?l?jsxRuntime.jsx(l,{href:s,className:R,children:k}):jsxRuntime.jsx(St,{href:s,variant:d,className:tailwindMerge.twMerge("hover:underline",R),asButton:false,children:k}):jsxRuntime.jsx("span",{className:R,children:k});if(p)return a==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",C.gap,g),children:[jsxRuntime.jsx(q,{width:C.skeletonIcon,height:C.skeletonIcon,className:"flex-shrink-0 rounded"}),jsxRuntime.jsx(q,{width:C.skeletonText,height:C.skeletonIcon*.6})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",C.gap,g),children:[jsxRuntime.jsx(q,{width:C.skeletonIcon,height:C.skeletonIcon,className:"flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(q,{width:C.skeletonText,height:16}),jsxRuntime.jsx(q,{width:C.skeletonSecondary,height:12})]})]});if(a==="inline"){let k=`${e} ${t}`;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",C.gap,g),children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",C.logoSize),children:S?jsxRuntime.jsx("img",{src:n,alt:`${e} logo`,className:"w-full h-full object-contain",onError:()=>h(true)}):jsxRuntime.jsx(G,{name:v,size:C.iconSize*.6,className:"text-text-secondary"})}),jsxRuntime.jsx(N,{className:tailwindMerge.twMerge("truncate leading-normal hover:text-text-primary",T,C.textSize,s&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:k})})]})}return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",C.gap,g),children:[u&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",C.logoSize),children:S?jsxRuntime.jsx("img",{src:n,alt:`${e} logo`,className:"w-full h-full object-contain",onError:()=>h(true)}):jsxRuntime.jsx(G,{name:v,size:C.iconSize*.6,className:"text-text-secondary"})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsx(N,{className:tailwindMerge.twMerge("truncate leading-normal hover:text-text-primary",T,C.textSize,s&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:e})}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center gap-1.5 text-text-secondary leading-normal",C.secondaryTextSize),children:[c&&jsxRuntime.jsx(G,{name:v,size:C.iconInTextSize,className:"flex-shrink-0"}),jsxRuntime.jsx("span",{className:"truncate","data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:t})]})]})]})}function QE(e){switch(e){case "battery":return "BatteryHigh";case "charger":return "ChargingStation";case "inverter":return "Power";case "thermostat":return "ThermometerSimple";case "vehicle":return "CarSimple";case "water_heater":return "DropHalfBottom";case "meter":return "Gauge";case "sensor":return Gs("sensor");default:return "DeviceMobile"}}function hv({row:e,context:t,manufacturer:r,model:o,deviceType:n,logoUrl:a,layout:i="stacked",size:s="sm",href:l,LinkComponent:d,linkVariant:c="secondary",showDeviceTypeIcon:u=true,showLogo:m=true,emphasis:p="normal",align:g="left",className:f,piiEntity:b}){let{isLoading:h}=t,v=ge(r,e),x=ge(o,e),C=ge(n,e),S=ge(a,e),w=ge(l,e),T=ge(b,e),N=ke(g,f);return jsxRuntime.jsx("div",{className:N,children:jsxRuntime.jsx(nd,{manufacturer:v,model:x,deviceType:C,logoUrl:S,layout:i,size:s,href:w,LinkComponent:d,linkVariant:c,showDeviceTypeIcon:u,showLogo:m,emphasis:p,isLoading:h,piiEntity:T})})}var MZ={charging:"percentage",discharging:"percentage",on:"kW",idle:void 0,off:void 0,heat:"temperature",cool:"temperature",auto:"temperature",eco:"temperature",circulate:void 0,unknown:void 0,connected:void 0,disconnected:void 0},_E=["charging","discharging","heat","cool","on","circulate","connected"],$E={unknown:"Unknown",on:"On",off:"Off",idle:"Idle",charging:"Charging",discharging:"Discharging",heat:"Heating",eco:"Eco Mode",cool:"Cooling",auto:"Auto",circulate:"Circulating",connected:"Connected",disconnected:"Disconnected"};function _m(e){return _E.includes(e)}function $m(e){return $E[e]}function Aa({state:e,label:t,icon:r,isLoading:o,size:n="sm",shape:a="pill",dot:i,dotPulse:s,fixedWidth:l,className:d,...c}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-20"});let u=t??$m(e),m=_m(e);return jsxRuntime.jsxs(kt,{variant:e,size:n,shape:a,dot:i??m,dotPulse:s??m,className:l?`w-28 justify-center ${d||""}`:d,...c,children:[r&&jsxRuntime.jsx(G,{name:r,size:n==="sm"?12:n==="md"?14:16}),u]})}var tL={importing:"Importing",exporting:"Exporting",idle:"Idle",unknown:"Unknown"};function xv(e){return tL[e]}var rL={importing:"ArrowDown",exporting:"ArrowUp"};function id({state:e,label:t,showIcon:r=false,isLoading:o,size:n="sm",shape:a="pill",fixedWidth:i,className:s,...l}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-24"});let d=t??xv(e),c=rL[e],u=n==="sm"?12:n==="md"?14:16;return r&&c?jsxRuntime.jsx(kt,{variant:e,size:n,shape:a,className:`w-6 justify-center ${s||""}`,...l,children:jsxRuntime.jsx(G,{name:c,size:u})}):jsxRuntime.jsx(kt,{variant:e,size:n,shape:a,className:i?`w-28 justify-center ${s||""}`:s,...l,children:d})}function sd({state:e,stateLabel:t,metric:r,metricFormatter:o,secondaryState:n,layout:a="horizontal",isLoading:i,size:s="sm",shape:l="pill",icon:d,fixedWidth:c,secondaryStateIconOnly:u=false,className:m}){if(i)return jsxRuntime.jsx(q,{className:tailwindMerge.twMerge("inline-flex h-6 w-32",m)});let p=r!=null&&o?Xr(r,o):null,g=a==="horizontal",f=o&&!p;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center",g?"gap-2":"flex-col gap-1",m),children:[(p||f)&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("font-medium inline-block",p?"text-text-primary":"text-text-secondary",s==="sm"&&"text-xs min-w-12",s==="md"&&"text-sm min-w-14",s==="lg"&&"text-base min-w-16"),children:p||"\u2014"}),jsxRuntime.jsx(Aa,{state:e,label:t,icon:d,size:s,shape:l,fixedWidth:c}),n&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:n==="importing"||n==="exporting"?jsxRuntime.jsx(id,{state:n,size:s,shape:l,fixedWidth:c,showIcon:u}):jsxRuntime.jsx(Aa,{state:n,size:s,shape:l,fixedWidth:c})})]})}function yv({value:e,row:t,context:r,metric:o,metricFormatter:n,secondaryState:a,size:i="sm",shape:s="pill",label:l,icon:d,fixedWidth:c=true,align:u="left",compact:m=false,className:p}){let{isLoading:g}=r;if(g){let C={pill:"rounded-full",rounded:"rounded-lg",square:"rounded-sm"}[s],S=o!=null||n!=null;return jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:S?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(q,{className:"h-4 w-12"}),jsxRuntime.jsx(q,{className:`h-6 w-24 ${C}`}),jsxRuntime.jsx(q,{className:`h-6 w-20 ${C}`})]}):jsxRuntime.jsx(q,{className:`h-6 w-24 ${C}`})})}if(!e)return jsxRuntime.jsx("div",{className:ke(u,p),children:jsxRuntime.jsx("span",{className:"text-text-secondary",children:"\u2014"})});let f=ge(o,t),b=ge(a,t),h=typeof l=="function"?l(e,t):l,v=ke(u,p);return f!=null||n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(v),children:jsxRuntime.jsx(sd,{state:e,stateLabel:h,metric:f,metricFormatter:n,secondaryState:b||void 0,size:i,shape:s,icon:d,fixedWidth:c,secondaryStateIconOnly:m,layout:"horizontal"})}):jsxRuntime.jsx("div",{className:v,children:jsxRuntime.jsx(Aa,{state:e,label:h,icon:d,size:i,shape:s,fixedWidth:c})})}function Cv({value:e,row:t,context:r,formatter:o,align:n="left",emphasis:a="normal",href:i,linkBehavior:s="hover",className:l,emptyText:d="\u2014",emptyClassName:c="text-text-secondary"}){let{isLoading:u}=r;if(u)return jsxRuntime.jsx(q,{className:Ft(a)});let m=Ao({value:e,formatter:o,emptyText:d,emptyClassName:c}),p=Gr(a),g=ke(n,tailwindMerge.twMerge(p,l)),f=jsxRuntime.jsx("div",{className:g,children:m}),b=ge(i,t);return b?Yo(f,b,t,s):f}var tf=ot__namespace.default.memo(({value:e,min:t,max:r,color:o="var(--color-viz-default)",backgroundColor:n="var(--color-background-muted)",colorScale:a,showLabel:i=true,formatLabel:s,height:l=20,minWidth:d=4,segments:c,segmentGap:u=2,barWidth:m,context:p})=>{let g=ot.useMemo(()=>r===t?100:Math.max(0,Math.min(100,(e-t)/(r-t)*100)),[e,t,r]),f=ot.useMemo(()=>o==="auto"&&a?a.type==="diverging"&&a.center!==void 0?ns(e,t,r,a.center,a.scheme):os(e,t,r,a.scheme):o,[o,a,e,t,r]);if(p.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-2 w-full",style:{height:l},children:jsxRuntime.jsx("div",{className:"h-full flex-1 animate-pulse bg-border-default rounded"})});if(c&&c>0){let v=`calc((100% - ${u*(c-1)}px) / ${c})`,x=Math.ceil(g/100*c),C={height:l,...m&&{width:typeof m=="number"?`${m}px`:m,flexShrink:0}};return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full",children:[jsxRuntime.jsx("div",{className:`flex gap-0.5 ${m?"":"flex-1"}`,style:C,children:Array.from({length:c}).map((S,w)=>{let T=w<x;return jsxRuntime.jsx("div",{className:"rounded-sm",style:{width:v,backgroundColor:T?f:n==="none"?"transparent":n,marginRight:w<c-1?`${u}px`:0}},w)})}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-primary whitespace-nowrap",children:s?s(e):e.toLocaleString()})]})}let b={height:l,backgroundColor:n==="none"?"transparent":n,...m&&{width:typeof m=="number"?`${m}px`:m,flexShrink:0}};return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full",children:[jsxRuntime.jsx("div",{className:`relative rounded-sm ${m?"":"flex-1"}`,style:b,children:jsxRuntime.jsx("div",{className:"absolute left-0 top-0 h-full rounded-sm",style:{width:`${g}%`,minWidth:g>0?d:0,backgroundColor:f}})}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-primary whitespace-nowrap",children:s?s(e):e.toLocaleString()})]})});tf.displayName="HorizontalBarCell";function uL(e){return Math.max(1,String(Math.max(1,Math.trunc(e))).length)}function Tv({context:e,startAt:t=1,padTo:r,rowCount:o,align:n="right",className:a}){let{isLoading:i,rowIndex:s}=e;if(i)return jsxRuntime.jsx(q,{className:Ft("normal")});if(typeof s!="number"||!Number.isFinite(s))return jsxRuntime.jsx("div",{className:ke(n,"text-text-muted"),children:"\u2014"});let l=s+t,d=r??(o===void 0?void 0:uL(o+t-1)),c=d===void 0?String(l):String(l).padStart(d,"0");return jsxRuntime.jsx("div",{className:ke(n,tailwindMerge.twMerge("font-mono text-text-muted tabular-nums",a)),children:jsxRuntime.jsx("span",{children:c})})}var rf=ot__namespace.default.memo(({value:e,data:t,color:r="var(--color-viz-default)",categoryColors:o,context:n,width:a,height:i=40})=>{let s=e||t||[],l=b=>"xValue"in b?b.xValue:b.x,d=b=>"yValue"in b?b.yValue:b.y,c=a||100,u=i,{xScale:m,yScale:p,barWidth:g}=ot.useMemo(()=>{if(s.length===0)return {xScale:scale.scaleTime({range:[0,c],domain:[new Date,new Date]}),yScale:scale.scaleLinear({range:[u,0],domain:[0,1]}),barWidth:2};let b=d3Array.extent(s,T=>l(T)),h=d3Array.min(s,T=>d(T))??0,v=d3Array.max(s,T=>d(T))??0,x=h<0?h:0,C=scale.scaleTime({range:[0,c],domain:b}),S=scale.scaleLinear({range:[u,0],domain:[x,v*1.05]}),w=s.length>1?c/s.length*.8:8;return {xScale:C,yScale:S,barWidth:Math.max(2,w)}},[s,c,u]);if(n.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-0.5",style:{width:c,height:u},children:Array.from({length:5}).map((b,h)=>jsxRuntime.jsx("div",{className:"flex-1 animate-pulse bg-border-default rounded"},h))});if(!s||s.length===0)return jsxRuntime.jsx("div",{className:"flex items-center justify-center text-text-secondary text-xs",style:{width:c,height:u},children:"No data"});let f=p(0);return jsxRuntime.jsx("svg",{width:c,height:u,children:s.map((b,h)=>{let v=d(b),x=m(l(b)),C=p(v),S=Math.abs(f-C),w=b.category&&o?.[b.category]?o[b.category]:r;return jsxRuntime.jsx(shape.Bar,{x:x-g/2,y:v>=0?C:f,width:g,height:S,fill:w,rx:1},`bar-${h}`)})})});rf.displayName="MiniBarCell";function Pv({value:e,row:t,context:r,format:o="number",decimals:n=0,prefix:a,suffix:i,emptyText:s="\u2014",align:l="right",emphasis:d="normal",href:c,linkBehavior:u="hover",showPositiveSign:m=false,colorCode:p=false,className:g}){let{isLoading:f}=r;if(f)return jsxRuntime.jsx(q,{className:Ft(d)});if(e==null||isNaN(Number(e)))return jsxRuntime.jsx("div",{className:ke(l,"text-text-secondary"),children:s});let b=Number(e),h;switch(o){case "currency":h=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:n,maximumFractionDigits:n}).format(b);break;case "percent":h=new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:n,maximumFractionDigits:n}).format(b/100);break;case "compact":h=new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:n>0?1:0,maximumFractionDigits:n}).format(b);break;default:h=new Intl.NumberFormat("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).format(b);}let x=`${m&&b>0?"+":""}${h}`,C=p?$c(b,true):Gr(d),S=ke(l,tailwindMerge.twMerge(C,g)),w=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:a}),jsxRuntime.jsx("span",{children:x}),i&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:i})]}),T=ge(c,t);return T?jsxRuntime.jsx("div",{className:S,children:Yo(w,T,t,u)}):jsxRuntime.jsx("div",{className:S,children:w})}var SL={low:"var(--color-feedback-warning-text)",critical:"var(--color-feedback-error-text)"};function nf(e,t){if(t){if(t.critical!==void 0&&e<=t.critical)return "critical";if(t.low!==void 0&&e<=t.low)return "low"}}var af=ot__namespace.default.memo(({value:e,showLabel:t=true,color:r="var(--color-viz-categorical-1)",backgroundColor:o="var(--color-background-muted)",height:n=20,segments:a,segmentGap:i=2,colorScale:s,thresholds:l,context:d})=>{let c=ot.useMemo(()=>Math.max(0,Math.min(100,e)),[e]),u=ot.useMemo(()=>nf(c,l),[c,l]),m=ot.useMemo(()=>u?SL[u]:r==="auto"&&s?s.type==="diverging"&&s.center!==void 0?ns(e,0,100,s.center,s.scheme):os(e,0,100,s.scheme):r,[r,s,u,e]);if(d.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-2",style:{height:n},children:jsxRuntime.jsx("div",{className:"h-full w-full animate-pulse bg-border-default rounded"})});if(a&&a>0){let g=`calc((100% - ${i*(a-1)}px) / ${a})`,f=Math.ceil(c/100*a);return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full","data-threshold":u,children:[jsxRuntime.jsx("div",{className:"flex gap-0.5 flex-1",style:{height:n},children:Array.from({length:a}).map((b,h)=>{let v=h<f,x=m;if(!u&&r==="auto"&&s&&v){let C=(h+1)/a*100;s.type==="diverging"&&s.center!==void 0?x=ns(C,0,100,s.center,s.scheme):x=os(C,0,100,s.scheme);}return jsxRuntime.jsx("div",{className:"rounded-sm",style:{width:g,backgroundColor:v?x:o==="none"?"transparent":o,marginRight:h<a-1?`${i}px`:0}},h)})}),t&&jsxRuntime.jsxs("span",{className:"text-sm text-text-primary whitespace-nowrap",children:[c.toFixed(0),"%"]})]})}return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full","data-threshold":u,children:[jsxRuntime.jsx("div",{className:"relative flex-1 rounded-sm",style:{height:n,backgroundColor:o==="none"?"transparent":o},children:jsxRuntime.jsx("div",{className:"absolute left-0 top-0 h-full rounded-sm transition-all duration-300",style:{width:`${c}%`,backgroundColor:m}})}),t&&jsxRuntime.jsxs("span",{className:"text-sm text-text-primary whitespace-nowrap",children:[c.toFixed(0),"%"]})]})});af.displayName="PercentBarCell";var TL="\u2013",Rv="\u200A";function Mv(e){if(e==null||e==="")return;let t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?t:void 0}function Ev({row:e,context:t,min:r,max:o,decimals:n=0,unit:a,emptyText:i="\u2014",align:s="right",emphasis:l="normal",className:d}){let{isLoading:c}=t;if(c)return jsxRuntime.jsx(q,{className:Ft(l)});let u=Mv(ge(r,e)),m=Mv(ge(o,e));if(u===void 0&&m===void 0)return jsxRuntime.jsx("div",{className:ke(s,"text-text-secondary"),children:i});let p=b=>new Intl.NumberFormat("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).format(b),g=u!==void 0&&m!==void 0?`${p(u)}${Rv}${TL}${Rv}${p(m)}`:p(u!==void 0?u:m),f=ke(s,tailwindMerge.twMerge("tabular-nums",Gr(l),d));return jsxRuntime.jsxs("div",{className:f,children:[jsxRuntime.jsx("span",{children:g}),a&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:a})]})}function pd({row:e,context:t,isSelected:r=false,onSelect:o,isDisabled:n=false,align:a="center"}){let{isLoading:i}=t;if(i)return jsxRuntime.jsx("div",{className:ke(a),children:jsxRuntime.jsx(q,{className:"h-4 w-4 rounded"})});let s=ge(n,e),l=ke(a);return jsxRuntime.jsx("div",{className:l,children:jsxRuntime.jsx(So,{isSelected:r,onChange:d=>{o?.(e,d);},isDisabled:s,"aria-label":"Select row"})})}function md({streetAddress:e,city:t,state:r,postalCode:o,layout:n="stacked",size:a="md",href:i,LinkComponent:s,linkVariant:l="unstyled",emphasis:d="normal",isLoading:c=false,showIcon:u=true,className:m,piiEntity:p}){let f={xs:{iconSize:16,iconContainerSize:"w-7 h-7",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",skeletonIconStacked:28,skeletonIconInline:16,skeletonText:80,skeletonSecondary:60},sm:{iconSize:20,iconContainerSize:"w-8 h-8",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",skeletonIconStacked:32,skeletonIconInline:20,skeletonText:96,skeletonSecondary:72},md:{iconSize:24,iconContainerSize:"w-9 h-9",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",skeletonIconStacked:36,skeletonIconInline:24,skeletonText:128,skeletonSecondary:96},lg:{iconSize:28,iconContainerSize:"w-10 h-10",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",skeletonIconStacked:40,skeletonIconInline:28,skeletonText:160,skeletonSecondary:120}}[a],h={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[d],v=[];t&&v.push(t),r&&o?v.push(`${r} ${o}`):r?v.push(r):o&&v.push(o);let x=v.join(", "),C=({children:w,className:T})=>i?s?jsxRuntime.jsx(s,{href:i,className:T,children:w}):jsxRuntime.jsx(St,{href:i,variant:l,className:tailwindMerge.twMerge("hover:underline",T),asButton:false,children:w}):jsxRuntime.jsx("span",{className:T,children:w});if(c)return n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",f.gap,m),children:[u&&jsxRuntime.jsx(q,{width:f.skeletonIconInline,height:f.skeletonIconInline,className:"flex-shrink-0 rounded"}),jsxRuntime.jsx(q,{width:f.skeletonText,height:f.skeletonIconInline*.8})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",f.gap,m),children:[u&&jsxRuntime.jsx(q,{width:f.skeletonIconStacked,height:f.skeletonIconStacked,className:"flex-shrink-0 rounded"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(q,{width:f.skeletonText,height:16}),jsxRuntime.jsx(q,{width:f.skeletonSecondary,height:12})]})]});if(n==="inline")return jsxRuntime.jsxs(C,{className:tailwindMerge.twMerge("flex items-center",f.gap,i&&"hover:bg-background-hover transition-colors",m),children:[u&&jsxRuntime.jsx(G,{name:"MapPin",size:f.iconSize,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",h,f.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),"data-pii-type":p?"address":void 0,"data-pii-entity":p,children:e})]});let S=()=>{if(p){if(t&&r&&o)return "city-state-zip";if(t&&r)return "city-state";if(t)return "city";if(r)return "state";if(o)return "postal-code"}};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",f.gap,m),children:[u&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",f.iconContainerSize),children:jsxRuntime.jsx(G,{name:"MapPin",size:f.iconSize,className:"text-text-secondary"})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsx(C,{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",h,f.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":p?"address":void 0,"data-pii-entity":p,children:e})}),x&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary leading-normal truncate",f.secondaryTextSize),"data-pii-type":S(),"data-pii-entity":p,children:x})]})]})}function Dv({row:e,context:t,streetAddress:r,city:o,state:n,postalCode:a,layout:i="stacked",size:s="sm",href:l,LinkComponent:d,linkVariant:c="secondary",emphasis:u="normal",align:m="left",className:p,piiEntity:g}){let{isLoading:f}=t,b=ge(r,e),h=ge(o,e),v=ge(n,e),x=ge(a,e),C=ge(l,e),S=ge(g,e),w=ke(m,p);return jsxRuntime.jsx("div",{className:w,children:jsxRuntime.jsx(md,{streetAddress:b,city:h,state:v,postalCode:x,layout:i,size:s,href:C,LinkComponent:d,linkVariant:c,emphasis:u,isLoading:f,piiEntity:S})})}var sf=ot__namespace.default.memo(({value:e,data:t,type:r="line",color:o="var(--color-viz-default)",strokeWidth:n=2,categoryColors:a,context:i,width:s,height:l=40})=>{let d=e||t||[],c=s||100,u=l,{xScale:m,yScale:p}=ot.useMemo(()=>{if(d.length===0)return {xScale:scale.scaleTime({range:[0,c],domain:[new Date,new Date]}),yScale:scale.scaleLinear({range:[u,0],domain:[0,1]})};let f=d3Array.extent(d,x=>x.xValue),b=d3Array.min(d,x=>x.yValue)||0,h=d3Array.max(d,x=>x.yValue)||0,v=(h-b)*.1||1;return {xScale:scale.scaleTime({range:[0,c],domain:f}),yScale:scale.scaleLinear({range:[u,0],domain:[b-v,h+v]})}},[d,c,u]);if(i.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center",style:{width:c,height:u},children:jsxRuntime.jsx("div",{className:"h-1 w-full animate-pulse bg-border-default rounded"})});if(!d||d.length===0)return jsxRuntime.jsx("div",{className:"flex items-center justify-center text-text-secondary text-xs",style:{width:c,height:u},children:"No data"});let g=a&&d[0]?.category&&a[d[0].category]?a[d[0].category]:o;return jsxRuntime.jsxs("svg",{width:c,height:u,className:"overflow-visible",children:[(r==="area"||r==="both")&&jsxRuntime.jsx(shape.AreaClosed,{data:d,x:f=>m(f.xValue),y:f=>p(f.yValue),yScale:p,fill:g,fillOpacity:.15,curve:curve.curveLinear}),(r==="line"||r==="both")&&jsxRuntime.jsx(shape.LinePath,{data:d,x:f=>m(f.xValue),y:f=>p(f.yValue),stroke:g,strokeWidth:n,strokeLinecap:"round",curve:curve.curveLinear})]})});sf.displayName="SparklineCell";function Bv({value:e,row:t,context:r,prefix:o,suffix:n,emptyText:a="\u2014",href:i,linkBehavior:s="hover",linkVariant:l="secondary",emphasis:d="normal",truncate:c=true,copyable:u=false,align:m="left",className:p,piiType:g,piiEntity:f}){let{isLoading:b}=r;if(b)return jsxRuntime.jsx(q,{className:Ft(d)});let h=_c(e,a),v=ge(i,t),x=ge(f,t),C=h,S=false,w=false;if(c&&h&&typeof h=="string")if(typeof c=="boolean")w=true;else {let{position:D="end",length:W=16,ellipsis:X="...",tooltip:H=true}=c;if(h.length>W){switch(D){case "start":C=Ll(h,W);break;case "middle":C=ii(h,W);break;case "end":C=Dl(h,W,X);break}S=H;}}let T=g&&x?{"data-pii-type":g,"data-pii-entity":x}:{},N=Object.keys(T).length>0,k=jsxRuntime.jsx("span",{className:w?"truncate":"",...T,children:C}),R=S?jsxRuntime.jsx(tr,{content:N?jsxRuntime.jsx("span",{...T,children:String(h)}):String(h),children:k}):k,A=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:o}),R,n&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:n})]}),M=A;if(u&&h&&h!==a){let D=typeof u=="function"?u(t):String(h);M=jsxRuntime.jsx(In,{value:D,size:"sm",children:A});}if(v){let D=ke(m,p);return jsxRuntime.jsx("div",{className:D,children:Yo(M,v,t,s,l,d)})}let B=ke(m,tailwindMerge.twMerge(Gr(d),p));return jsxRuntime.jsx("div",{className:B,children:M})}var VL={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"},OL={sm:"hidden sm:grid",md:"hidden md:grid",lg:"hidden lg:grid",xl:"hidden xl:grid"};function fd(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function gd(e,t,r,o){if(r.cell){let n=r.cell,a=typeof r.cellProps=="function"?r.cellProps(e,t):r.cellProps;return jsxRuntime.jsx(n,{value:e,row:t,context:o,...a})}return r.render?r.render(e,t,o):e?.toString()??"\u2014"}function bd({row:e,columns:t,density:r,isLoading:o,onClick:n}){let a=t.filter(u=>u.mobile!==false).map(u=>{let m=u.mobile===false?null:u.mobile;return {...u,mobilePriority:m?.priority??2,mobileFormat:m?.format??"secondary",showLabel:m?.label??m?.format==="secondary",icon:m?.icon}}).sort((u,m)=>u.mobilePriority-m.mobilePriority),i=a.filter(u=>u.mobilePriority===1||u.mobileFormat==="primary"),s=a.filter(u=>u.mobilePriority===2&&u.mobileFormat!=="primary"),l=a.filter(u=>u.mobileFormat==="badge"),d={isLoading:!!o,rowIndex:0,columnIndex:0,density:r};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface transition-colors",n&&"cursor-pointer hover:bg-background-hover active:bg-background-pressed",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[r]),onClick:n,role:n?"button":void 0,tabIndex:n?0:void 0,children:[i.length>0&&jsxRuntime.jsxs("div",{className:"mb-2 flex items-start justify-between",children:[jsxRuntime.jsx("div",{className:"flex-1",children:i.map(u=>{let m=fd(e,u);return jsxRuntime.jsx("div",{className:"font-medium text-text-primary [&>*]:!justify-start [&>*]:!text-left",children:gd(m,e,u,d)},u.id)})}),l.length>0&&jsxRuntime.jsx("div",{className:"ml-2 flex flex-wrap gap-1",children:l.map(u=>{let m=fd(e,u);return jsxRuntime.jsx("div",{className:"inline-flex",children:gd(m,e,u,d)},u.id)})})]}),s.length>0&&jsxRuntime.jsx("div",{className:"space-y-1",children:s.map(u=>{let m=fd(e,u),p=u.showLabel&&u.label;return jsxRuntime.jsxs("div",{className:"flex items-center text-sm text-text-secondary",children:[u.icon&&jsxRuntime.jsx(G,{name:u.icon,className:"mr-1.5 h-4 w-4 flex-shrink-0"}),p&&jsxRuntime.jsxs("span",{className:"mr-1 font-medium",children:[u.label,":"]}),jsxRuntime.jsx("span",{className:"truncate [&>*]:!justify-start [&>*]:!text-left",children:gd(m,e,u,d)})]},u.id)})})]})}function xd({row:e,columns:t,density:r,isLoading:o,onClick:n}){let a=t.filter(l=>l.mobile!==false),i={isLoading:!!o,rowIndex:0,columnIndex:0,density:r};return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface transition-colors",n&&"cursor-pointer hover:bg-background-hover active:bg-background-pressed",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[r]),onClick:n,role:n?"button":void 0,tabIndex:n?0:void 0,children:jsxRuntime.jsx("div",{className:"space-y-2",children:a.map((l,d)=>{let c=fd(e,l),u=d===0;return jsxRuntime.jsxs("div",{children:[!u&&jsxRuntime.jsx("div",{className:"text-xs text-text-secondary",children:l.label}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(u?"font-medium text-text-primary":"text-sm text-text-primary","[&>*]:!justify-start [&>*]:!text-left"),children:gd(c,e,l,i)})]},l.id)})})})}function Vv(e="md"){return {mobile:VL[e],desktop:OL[e]}}function Ov({density:e}){return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[e]),children:[jsxRuntime.jsx("div",{className:"mb-2 h-5 w-3/4 animate-pulse rounded bg-background-muted"}),jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-background-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-2/3 animate-pulse rounded bg-background-muted"})]})]})}var yd=10,lf=200;function zL(e){return e===void 0||!Number.isInteger(e)||e<=0?yd:Math.min(e,lf)}function vd(e,t,r){let o=typeof e=="boolean"?{}:e??{},n=zL(o.pageSize),a=o.totalRows??t,i=Math.max(1,Math.ceil(a/n)),s=Math.min(Math.max(Math.trunc(r)||0,0),i-1),l=s*n,d=Math.min(l+n,o.totalRows!==void 0?t:a),c=Math.max(0,d-(o.totalRows!==void 0?0:l));return {page:s,pageCount:i,start:l,end:d,from:a===0?0:l+1,to:a===0?0:l+c,total:a}}var HL={compact:"px-3 py-1.5",default:"px-3 py-2",relaxed:"px-4 py-3"};function Cd({page:e,pageCount:t,from:r,to:o,total:n,density:a,onPageChange:i,label:s="Pagination"}){let l=e<=0,d=e>=t-1;return jsxRuntime.jsxs("nav",{"data-testid":"data-table-pagination","aria-label":s,className:tailwindMerge.twMerge("flex items-center gap-3 border-t border-border-default","justify-between @sm:justify-start",HL[a]),children:[jsxRuntime.jsx(te,{size:"sm",variant:"ghost",icon:"CaretLeft",isDisabled:l,onPress:()=>i(e-1),"aria-label":"Previous page",className:"order-1 @sm:order-2",children:jsxRuntime.jsx("span",{className:"@sm:hidden",children:"Previous"})}),jsxRuntime.jsx("p",{className:tailwindMerge.twMerge("m-0 flex min-w-0 items-baseline gap-2 text-body-sm text-text-secondary","order-2 @sm:order-1 @sm:grow"),children:jsxRuntime.jsx("span",{className:"truncate tabular-nums",children:n===0?"No rows":`Showing ${r}\u2013${o} of ${n.toLocaleString()}`})}),jsxRuntime.jsx(te,{size:"sm",variant:"ghost",icon:"CaretRight",iconPosition:"right",isDisabled:d,onPress:()=>i(e+1),"aria-label":"Next page",className:"order-3",children:jsxRuntime.jsx("span",{className:"@sm:hidden",children:"Next"})}),jsxRuntime.jsx("span",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:n===0?"No rows":`Page ${e+1} of ${t}, showing rows ${r} to ${o} of ${n}`})]})}var $L={compact:"py-1.5 px-3 text-sm",default:"py-3 px-4 text-sm",relaxed:"py-4 px-4 text-base"},eD={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};function tD(e){let t={};return e.width!==void 0&&(t.width=typeof e.width=="number"?`${e.width}px`:e.width),e.minWidth!==void 0&&(t.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),e.maxWidth!==void 0&&(t.maxWidth=typeof e.maxWidth=="number"?`${e.maxWidth}px`:e.maxWidth),e.flex!==void 0&&(t.flex=`${e.flex} 1 0`),t}function rD({column:e,sortConfig:t,onSort:r,stickyHeader:o,stickyFirstColumn:n,isFirstColumn:a,density:i="default",isLoading:s=false,headerContent:l,sortNote:d}){let c=e.reorderable!==false,{attributes:u,listeners:m,setNodeRef:p,transform:g,transition:f,isDragging:b}=sortable.useSortable({id:e.id,disabled:!c||s}),{role:h,"aria-pressed":v,...x}=u,C=t?.columnId===e.id,S=C?t.direction:null,w=n&&a,T=C?d:void 0,N={...tD(e),transform:utilities.CSS.Transform.toString(g),transition:f,opacity:b?.8:1,zIndex:b?50:void 0};return jsxRuntime.jsx("div",{ref:p,className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.sortable?"gap-2":"gap-1",$L[i],eD[e.align||"left"],o&&"sticky top-0 z-10",w&&"sticky left-0 z-20 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",o&&w&&"z-30",e.sortable&&!s&&"hover:bg-background-hover",s&&"cursor-not-allowed opacity-60",C?"font-bold text-text-primary":"font-medium text-text-secondary",b&&"bg-background-hover"),style:N,...x,...m,role:"columnheader","aria-sort":C?S==="asc"?"ascending":"descending":"none","aria-disabled":s,title:T,"data-sort-note":T,children:s?jsxRuntime.jsx(q,{className:"h-4 w-24"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l??jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex-1 truncate",e.sortable&&"cursor-pointer"),onClick:()=>!s&&e.sortable&&r(e.id),children:e.label}),T&&jsxRuntime.jsx("span",{className:"sr-only",children:T}),e.sortable?jsxRuntime.jsx("button",{type:"button",className:"flex flex-shrink-0 cursor-pointer",onClick:()=>!s&&r(e.id),"aria-label":`Sort by ${e.label}`,children:C?jsxRuntime.jsx(G,{name:S==="asc"?"CaretUp":"CaretDown",size:14,weight:T?"regular":"bold",className:T?"text-text-secondary opacity-40":"text-text-primary"}):jsxRuntime.jsx(G,{name:"CaretUpDown",size:12,className:"text-text-secondary opacity-40"})}):C?jsxRuntime.jsx("span",{className:"flex flex-shrink-0",children:jsxRuntime.jsx(G,{name:S==="asc"?"CaretUp":"CaretDown",size:14,weight:T?"regular":"bold",className:T?"text-text-secondary opacity-40":"text-text-primary"})}):null]})})}function Wv({columns:e,columnOrder:t,onColumnOrderChange:r,sortConfig:o,onSort:n,stickyHeader:a,stickyFirstColumn:i,density:s="default",isLoading:l=false,renderHeaderContent:d,sortNote:c}){let u=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:5}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),m=new Map(e.map(f=>[f.id,f])),p=f=>{let{active:b,over:h}=f;if(h&&b.id!==h.id){let v=t.indexOf(b.id),x=t.indexOf(h.id);if(m.get(h.id)?.reorderable===false)return;let S=0;for(let k=0;k<t.length&&m.get(t[k])?.reorderable===false;k++)S=k+1;if(x<S)return;let w=Math.min(v,x),T=Math.max(v,x);for(let k=w;k<=T;k++){if(k===v)continue;if(m.get(t[k])?.reorderable===false)return}let N=sortable.arrayMove(t,v,x);r(N);}},g=t.map(f=>m.get(f)).filter(f=>f!==void 0);return jsxRuntime.jsx(core.DndContext,{sensors:u,collisionDetection:core.closestCenter,onDragEnd:p,children:jsxRuntime.jsx(sortable.SortableContext,{items:t,strategy:sortable.horizontalListSortingStrategy,children:jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:g.map((f,b)=>jsxRuntime.jsx(rD,{column:f,sortConfig:o,onSort:n,stickyHeader:a,stickyFirstColumn:i,isFirstColumn:b===0,density:s,isLoading:l,headerContent:d?.(f),sortNote:c},f.id))})})})}var Sd="__select",sD=new Set,cf={compact:"py-1.5 px-3 text-sm",default:"py-3 px-4 text-sm",relaxed:"py-4 px-4 text-base"},df={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"},lD={full:"w-full",auto:"w-auto inline-block",contained:"w-full max-w-6xl mx-auto"},cD={auto:"table-auto",fixed:"table-fixed",responsive:"table-auto"};function Kv(e){if(typeof e=="number")return e;let t=/^(\d+(?:\.\d+)?)px$/.exec(e.trim());return t?Number(t[1]):0}function uf(e){let t={};return e.width!==void 0&&(t.width=typeof e.width=="number"?`${e.width}px`:e.width),e.minWidth!==void 0&&(t.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),e.maxWidth!==void 0&&(t.maxWidth=typeof e.maxWidth=="number"?`${e.maxWidth}px`:e.maxWidth),e.flex!==void 0&&(t.flex=`${e.flex} 1 0`),t}function dD(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function uD({column:e,sortConfig:t,onSort:r,stickyHeader:o,stickyFirstColumn:n,isFirstColumn:a,density:i="default",isLoading:s=false,headerContent:l,sortNote:d}){let c=t?.columnId===e.id,u=c?t.direction:null,m=n&&a,p=c?d:void 0;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.sortable?"gap-2":"gap-1",cf[i],df[e.align||"left"],o&&"sticky top-0 z-10",m&&"sticky left-0 z-20 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",o&&m&&"z-30",e.sortable&&!s&&"cursor-pointer hover:bg-background-hover",s&&"cursor-not-allowed opacity-60",c?"font-bold text-text-primary":"font-medium text-text-secondary"),onClick:()=>!s&&e.sortable&&r(e.id),role:"columnheader","aria-sort":c?u==="asc"?"ascending":"descending":"none","aria-disabled":s,title:p,"data-sort-note":p,style:uf(e),children:s?jsxRuntime.jsx(q,{className:"h-4 w-24"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l??jsxRuntime.jsx("span",{className:"truncate",children:e.label}),e.headerTooltip&&jsxRuntime.jsx(tr,{content:e.headerTooltip,children:jsxRuntime.jsx(te,{variant:"ghost","aria-label":`About ${e.label}`,onClick:g=>g.stopPropagation(),className:"h-auto min-h-0 flex-shrink-0 p-0 text-text-tertiary hover:text-text-secondary",children:jsxRuntime.jsx(G,{name:"Info",size:12,"aria-hidden":true})})}),p&&jsxRuntime.jsx("span",{className:"sr-only",children:p}),(e.sortable||c)&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0",children:c?jsxRuntime.jsx(G,{name:u==="asc"?"CaretUp":"CaretDown",size:14,weight:p?"regular":"bold",className:p?"text-text-secondary opacity-40":"text-text-primary"}):jsxRuntime.jsx(G,{name:"CaretUpDown",size:12,className:"text-text-secondary opacity-40"})})]})})}function pD({column:e,row:t,rowIndex:r,columnIndex:o,isHovered:n,isSelected:a,density:i="default",className:s,stickyFirstColumn:l}){let d=l&&o===0,c=dD(t,e),u={isLoading:false,isHovered:n,...a===void 0?{}:{isSelected:a},rowIndex:r,columnIndex:o,density:i},m;if(e.cell){let p=e.cell,g=typeof e.cellProps=="function"?e.cellProps(c,t):e.cellProps;m=jsxRuntime.jsx(p,{value:c,row:t,context:u,...g});}else e.render?m=e.render(c,t,u):m=jsxRuntime.jsx("span",{className:"truncate",children:c?.toString()??""});if(e.popover){let p=e.popover,g,f="top",b=false,h="hover";typeof p=="string"?g=p:typeof p=="function"?g=p(c,t):(g=typeof p.content=="function"?p.content(c,t):p.content,f=p.placement||"top",b=p.showArrow??false,h=p.trigger||"hover"),m=jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{...h==="hover"?{trigger:"longPress"}:{},children:[jsxRuntime.jsx("div",{className:"cursor-help",children:m}),jsxRuntime.jsx(Et,{placement:f,showArrow:b,children:jsxRuntime.jsx("div",{className:"p-2",children:g})})]});}return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.noCellPadding?"":cf[i],df[e.align||"left"],d&&"sticky left-0 z-10 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",s),role:"cell",style:uf(e),children:m})}function mD({column:e,rowIndex:t,columnIndex:r,density:o="default",stickyFirstColumn:n}){let a=n&&r===0,i={isLoading:true,rowIndex:t,columnIndex:r,density:o},s;if(e.cell){let l=e.cell,d=typeof e.cellProps=="function"?e.cellProps(null,{}):e.cellProps;s=jsxRuntime.jsx(l,{value:null,row:{},context:i,...d});}else e.render?s=e.render(null,{},i):s=jsxRuntime.jsx(q,{className:"h-4 w-full max-w-[200px]"});return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.noCellPadding?"":cf[o],df[e.align||"left"],a&&"sticky left-0 z-10 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]"),role:"cell",style:uf(e),children:s})}function fD(e,t){let r=new Set(["BUTTON","A","INPUT","SELECT","TEXTAREA"]),o=new Set(["button","link","checkbox","switch","menuitem","option"]),n=e;for(;n&&n!==t;){if(r.has(n.tagName))return true;let a=n.getAttribute("role");if(a&&o.has(a))return true;n=n.parentElement;}return false}function Yv({columns:e,row:t,rowIndex:r,density:o="default",onClick:n,stickyFirstColumn:a,isSelected:i}){let[s,l]=ot.useState(false),d=ot.useCallback(c=>{if(!n)return;let u=c.target,m=c.currentTarget;fD(u,m)||n(t);},[n,t]);return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("contents group",n&&"cursor-pointer"),role:"row","aria-selected":i===void 0?void 0:i,onClick:d,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),children:e.map((c,u)=>jsxRuntime.jsx(pD,{column:c,row:t,rowIndex:r,columnIndex:u,isHovered:s,isSelected:i,density:o,className:tailwindMerge.twMerge(n?"group-hover:bg-background-hover":"",i&&"bg-background-selected"),stickyFirstColumn:a},c.id))})}function gD({columns:e,rowIndex:t,density:r="default",stickyFirstColumn:o}){return jsxRuntime.jsx("div",{className:"contents",role:"row",children:e.map((n,a)=>jsxRuntime.jsx(mD,{column:n,rowIndex:t,columnIndex:a,density:r,stickyFirstColumn:o},n.id))})}function Xv({columns:e,data:t,className:r,density:o="default",width:n="full",height:a,maxHeight:i,layout:s="auto",mobileRenderer:l="auto",customMobileRowRender:d,mobileBreakpoint:c="md",isLoading:u=false,loadingState:m,loadingRowCount:p=5,onLoadMore:g,hasMore:f=false,enableVirtualization:b,estimatedRowHeight:h,loadingIndicator:v,stickyHeader:x=false,stickyFirstColumn:C=false,onRowClick:S,getRowId:w,selectedRowIds:T,onSelectionChange:N,selectionMode:k="multi",hideHeader:R=false,sortConfig:A,onSort:M,sortNote:B,"aria-label":D,enableColumnReorder:W=false,columnOrder:X,onColumnOrderChange:H,pagination:I}){let F=I!==void 0&&I!==false,z=typeof I=="object"?I:void 0,U=z?.page,K=U!==void 0,[O,V]=ot.useState(0),L=vd(I,t.length,K?U:O),y=ot.useCallback(ne=>{let Se=Math.min(Math.max(ne,0),L.pageCount-1);K||V(Se),z?.onPageChange?.(Se);},[K,z,L.pageCount]),E=ot.useMemo(()=>!F||z?.totalRows!==void 0?t:t.slice(L.start,L.end),[t,F,z?.totalRows,L.start,L.end]);ot.useEffect(()=>{K||!F||O!==L.page&&V(L.page);},[K,F,O,L.page]);let P=N!==void 0,Y=T??sD,$=ot.useCallback((ne,Se)=>{if(w)return w(ne);let ce=ne.id;return typeof ce=="string"&&ce.length>0?ce:typeof ce=="number"&&Number.isFinite(ce)?String(ce):`row-${Se}`},[w]),oe=ot.useMemo(()=>E.map((ne,Se)=>$(ne,Se)),[E,$]),re=ot.useCallback((ne,Se)=>{if(!N)return;if(k==="single"){N(Se?new Set([ne]):new Set);return}let ce=new Set(Y);Se?ce.add(ne):ce.delete(ne),N(ce);},[N,Y,k]),_=oe.filter(ne=>Y.has(ne)).length,he=oe.length>0&&_===oe.length,me=_>0&&!he,ue=ot.useCallback(ne=>{if(!N)return;let Se=new Set(Y);for(let ce of oe)ne?Se.add(ce):Se.delete(ce);N(Se);},[N,oe,Y]),ie=ot.useMemo(()=>P?[{id:Sd,label:"",width:44,align:"center",sortable:false,reorderable:false,exportable:false,mobile:false,render:(Se,ce,ct)=>{let yr=$(ce,ct.rowIndex);return jsxRuntime.jsx(pd,{value:void 0,row:ce,context:ct,isSelected:Y.has(yr),onSelect:(yo,vo)=>re(yr,vo)})}},...e]:e,[e,P,Y,$,re]),fe=P&&k==="multi"?jsxRuntime.jsx(So,{isSelected:he,isIndeterminate:me,onChange:ne=>ue(ne),isDisabled:oe.length===0,"aria-label":he?"Deselect all rows on this page":"Select all rows on this page"}):void 0,Te=ot.useCallback(ne=>ne.id===Sd?fe:void 0,[fe]),[Ye,yt]=ot.useState(null),Qt=A!==void 0,Ze=Qt?A:Ye,fr=ot.useRef(null),lr=ot.useMemo(()=>ie.map(ne=>ne.id),[ie]),[Ce,Vt]=ot.useState(lr),ee=X!==void 0,Be=ee?X:Ce;ot.useEffect(()=>{ee||Vt(ne=>{let Se=ie.map(vo=>vo.id),ce=new Set(Se),ct=new Set(ne),yr=ne.filter(vo=>ce.has(vo)),yo=Se.filter(vo=>!ct.has(vo));return [...yr,...yo]});},[ie,ee]);let Ve=ot.useCallback(ne=>{ee||Vt(ne),H?.(ne);},[ee,H]),nt=ot.useMemo(()=>{if(!W&&!X)return ie;let ne=new Map(ie.map(ct=>[ct.id,ct])),Se=Be.map(ct=>ne.get(ct)).filter(ct=>ct!==void 0),ce=ne.get(Sd);return ce&&!Se.some(ct=>ct.id===Sd)?[ce,...Se]:Se},[ie,Be,W,X]),wt=En({items:E,onLoadMore:g,hasMore:f,isLoading:u,loadingState:m,enableVirtualization:b,estimatedItemSize:h||(o==="compact"?40:o==="relaxed"?60:48),overscan:5}),Xt=g||b?wt:null,Q=Xt?.scrollRef??fr,{loadMoreRef:j,virtualizer:pe,virtualItems:ae,isLoadingMore:Ne,computedLoadingState:Qe}=Xt||{},{gridTemplateColumns:Ue,totalMinWidth:cr}=ot.useMemo(()=>{let ne=0;return {gridTemplateColumns:nt.map(ce=>{if(ce.minWidth?ne+=Kv(ce.minWidth):ce.width&&(ne+=Kv(ce.width)),ce.width)return typeof ce.width=="number"?`${ce.width}px`:ce.width;if(ce.flex)return `${ce.flex}fr`;if(ce.minWidth&&ce.maxWidth){let ct=typeof ce.minWidth=="number"?`${ce.minWidth}px`:ce.minWidth,yr=typeof ce.maxWidth=="number"?`${ce.maxWidth}px`:ce.maxWidth;return `minmax(${ct}, ${yr})`}return ce.minWidth?`minmax(${typeof ce.minWidth=="number"?`${ce.minWidth}px`:ce.minWidth}, 1fr)`:ce.maxWidth?`minmax(0, ${typeof ce.maxWidth=="number"?`${ce.maxWidth}px`:ce.maxWidth})`:"1fr"}).join(" "),totalMinWidth:ne}},[nt]),Z=ot.useCallback(ne=>{if(!ie.find(ct=>ct.id===ne)?.sortable)return;let ce;Ze?.columnId===ne?ce={columnId:ne,direction:Ze.direction==="asc"?"desc":"asc"}:ce={columnId:ne,direction:"asc"},Qt||yt(ce),M?.(ce);},[ie,Ze,M,Qt]),le=Qe==="loading"||u&&E.length===0,Ae=F&&(z?.alwaysShow||L.pageCount>1)&&!u&&!le,Oe=Ae&&a!==void 0,it={};a?(Oe?(it.flex="1 1 auto",it.minHeight=0):it.height=typeof a=="number"?`${a}px`:a,it.overflowY="auto"):i?(it.maxHeight=typeof i=="number"?`${i}px`:i,it.overflowY="auto"):g&&(it.height="600px",it.overflowY="auto"),g&&(it.overflowX="auto");let Tt=tailwindMerge.twMerge(lD[n],!g&&(s==="responsive"?"overflow-x-auto scrollbar-visible":"overflow-auto scrollbar-visible"),r),Ot=Vv(c),tt=l!=="none",xr=(ne,Se)=>tt?l==="custom"&&d?d(ne,Se):jsxRuntime.jsx(l==="cards"?xd:bd,{row:ne,columns:nt,density:o,isLoading:u,onClick:S?()=>S(ne):void 0}):null,gr=pe?ae?.map(ne=>({virtualItem:ne,row:E[ne.index],index:ne.index}))||[]:E.map((ne,Se)=>({row:ne,index:Se,virtualItem:null})),xo=jsxRuntime.jsxs("div",{ref:Q,className:Tt,style:{...it,position:pe?"relative":void 0},children:[jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("grid border-separate border-spacing-0",cD[s],n==="auto"?"inline-grid w-auto":"w-full",tt&&Ot.desktop),role:"table","aria-label":D,style:{gridTemplateColumns:Ue,minWidth:cr>0?`${cr}px`:void 0},children:[!R&&(W?jsxRuntime.jsx(Wv,{columns:ie,columnOrder:Be,onColumnOrderChange:Ve,sortConfig:Ze,onSort:Z,stickyHeader:x,stickyFirstColumn:C,density:o,isLoading:le,renderHeaderContent:Te,sortNote:B}):jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:nt.map((ne,Se)=>jsxRuntime.jsx(uD,{column:ne,sortConfig:Ze,onSort:Z,stickyHeader:x,stickyFirstColumn:C,isFirstColumn:Se===0,density:o,isLoading:le,headerContent:Te(ne),sortNote:B},ne.id))})),pe&&!le?jsxRuntime.jsx("div",{className:"col-span-full",style:{gridColumn:"1 / -1",height:`${pe.getTotalSize()}px`,position:"relative"},role:"rowgroup",children:E.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[gr.map(({row:ne,index:Se,virtualItem:ce})=>{if(!ne||!ce)return null;let ct=w?w(ne):`row-${Se}`;return jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",display:"grid",gridTemplateColumns:Ue,transform:`translateY(${ce.start}px)`},"data-index":ce.index,ref:pe.measureElement,children:jsxRuntime.jsx(Yv,{columns:nt,row:ne,rowIndex:Se,density:o,onClick:S,stickyFirstColumn:C,isSelected:P?Y.has($(ne,Se)):void 0})},ct)}),Ne&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${pe.getTotalSize()}px`,left:0,width:"100%"},children:v||jsxRuntime.jsx(io,{state:"loading-more"})})]}):jsxRuntime.jsx("div",{className:"py-12 text-center text-text-secondary",children:"No data available"})}):jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:le?Array.from({length:p}).map((ne,Se)=>jsxRuntime.jsx(gD,{columns:nt,rowIndex:Se,density:o,stickyFirstColumn:C},`loading-${Se}`)):E.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[gr.map(({row:ne,index:Se})=>{if(!ne)return null;let ce=w?w(ne):`row-${Se}`;return jsxRuntime.jsx(Yv,{columns:nt,row:ne,rowIndex:Se,density:o,onClick:S,stickyFirstColumn:C,isSelected:P?Y.has($(ne,Se)):void 0},ce)}),Ne&&jsxRuntime.jsx("div",{className:"col-span-full",style:{gridColumn:"1 / -1"},children:v||jsxRuntime.jsx(io,{state:"loading-more"})})]}):jsxRuntime.jsx("div",{className:"col-span-full py-12 text-center text-text-secondary",role:"row",children:jsxRuntime.jsx("div",{role:"cell",children:"No data available"})})})]}),tt&&jsxRuntime.jsx("div",{className:Ot.mobile,children:le?Array.from({length:p}).map((ne,Se)=>jsxRuntime.jsx(Ov,{density:o},`mobile-loading-${Se}`)):E.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[gr.map(({row:ne,index:Se})=>{if(!ne)return null;let ce=w?w(ne):`mobile-row-${Se}`;return jsxRuntime.jsx("div",{className:"border-b border-border-default last:border-b-0",children:xr(ne,Se)},ce)}),Ne&&(v||jsxRuntime.jsx(io,{state:"loading-more"}))]}):jsxRuntime.jsx("div",{className:"py-12 text-center text-text-secondary",children:"No data available"})}),g&&f&&!le&&(pe?jsxRuntime.jsx("div",{ref:j,style:{position:"absolute",top:`${pe.getTotalSize()}px`,left:0,width:"100%",height:1}}):jsxRuntime.jsx("div",{ref:j,className:"h-px w-full"}))]});return Ae?jsxRuntime.jsxs("div",{className:"@container flex flex-col",style:Oe?{height:typeof a=="number"?`${a}px`:a,minHeight:0}:void 0,children:[xo,jsxRuntime.jsx(Cd,{...L,density:o,onPageChange:y,...D?{label:`${D} pagination`}:{}})]}):xo}function jv({status:e,alertCount:t,showCount:r=false,isLoading:o,size:n="sm",shape:a="pill",...i}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-20"});let s={healthy:"success",warning:"warning",error:"error",unknown:"neutral"},l={healthy:"Healthy",warning:"Warning",error:"Error",unknown:"Unknown"},d=e==="warning"||e==="error",c=r&&t?`${l[e]} (${t})`:l[e];return jsxRuntime.jsx(kt,{variant:s[e],size:n,shape:a,dot:d,dotPulse:d,...i,children:c})}var bD={battery:"BatteryHigh",charger:"ChargingStation",thermostat:"ThermometerSimple",inverter:"Power",vehicle:"Car",water_heater:"DropHalfBottom",meter:"Gauge",sensor:Gs("sensor"),gateway:"WifiHigh",other:"Cube",unknown:"Question"},xD={battery:"Battery",charger:"Charger",thermostat:"Thermostat",inverter:"Inverter",vehicle:"Vehicle",water_heater:"Water Heater",meter:"Meter",sensor:"Sensor",gateway:"Gateway",other:"Other",unknown:"Unknown"};function Zv({deviceType:e,iconName:t,size:r="md",showLabel:o=false,className:n}){let a=t||(e?bD[e]:"Question"),i=e?xD[e]:void 0;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center",o?"flex-col gap-1":"gap-0",n),children:[jsxRuntime.jsx(G,{name:a,size:r}),o&&i&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:i})]})}function Ks({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,slideInFrom:l="right",transparentOverlay:d=false,onClose:c,className:u,primaryAction:m,secondaryAction:p,tertiaryAction:g,footerContent:f,contentPadding:b=true,maxWidth:h="400px"}){if(!s)return null;let v=t||r,x=m||p||g||f;return jsxRuntime.jsx(Co,{children:jsxRuntime.jsx(Yr,{isOpen:s,onOpenChange:C=>!C&&c?.(),isDismissable:true,transparent:d,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("fixed top-0 bottom-0 flex flex-col bg-background-surface shadow-xl overflow-hidden",l==="right"?"right-0":"left-0",l==="right"?"animate-in slide-in-from-right duration-300 ease-out":"animate-in slide-in-from-left duration-300 ease-out","data-[exiting]:animate-out",l==="right"?"data-[exiting]:slide-out-to-right":"data-[exiting]:slide-out-to-left","data-[exiting]:duration-200 data-[exiting]:ease-in","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default focus-visible:outline-offset-0",u),style:{maxWidth:h,width:"100%"},children:[v&&(a&&i?jsxRuntime.jsx(Cr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n,hasBackArrow:true,onBack:i,onClose:c}):jsxRuntime.jsx(Cr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n,onClose:c})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-y-auto overscroll-contain",b?"px-6 py-6":"p-0"),children:e}),x&&jsxRuntime.jsx(Pn,{primaryAction:m,secondaryAction:p,tertiaryAction:g,footerContent:f})]})})})})}Ks.displayName="Drawer";function _v({status:e,programName:t,isLoading:r,size:o="sm",shape:n="pill",...a}){if(r)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-20"});let i={enrolled:"success",eligible:"info",pending:"warning",not_eligible:"neutral",opted_out:"neutral"},s={enrolled:"Enrolled",eligible:"Eligible",pending:"Pending",not_eligible:"Not Eligible",opted_out:"Opted Out"},l=jsxRuntime.jsx(kt,{variant:i[e],size:o,shape:n,...a,children:s[e]});return t?jsxRuntime.jsx(tr,{content:t,children:l}):l}function eC({value:e,onChange:t,onUrlChange:r,accept:o="image/*",maxSize:n,isDisabled:a=false,onUpload:i,className:s,showPreview:l=true,placeholder:d="Drop files here or click to browse"}){let[c,u]=ot.useState(false),[m,p]=ot.useState(false),[g,f]=ot.useState(null),[b,h]=ot.useState(e),v=ot.useRef(null),x=async w=>{if(f(null),n&&w.size>n){f(`File size must be less than ${(n/1024/1024).toFixed(2)}MB`);return}if(l&&w.type.startsWith("image/")){let T=new FileReader;T.onloadend=()=>{h(T.result);},T.readAsDataURL(w);}if(i){p(true);try{let T=await i(w);h(T),r?.(T);}catch(T){f("Failed to upload file"),console.error("Upload error:",T);}finally{p(false);}}t?.(w,b);},C=async w=>{try{let T=w.items;if(T.length>0){let N=T[0];if(N.kind==="file"){let k=await N.getFile();k&&x(k);}}}catch(T){f("Failed to upload file"),console.error("Upload error:",T);}finally{u(false);}},S=()=>{h(void 0),f(null),t?.(null),r?.(""),v.current&&(v.current.value="");};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",s),children:[jsxRuntime.jsxs(reactAriaComponents.DropZone,{className:tailwindMerge.twMerge("relative flex min-h-[200px] w-full flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",c?"border-action-brand bg-action-brand/5":"border-border-muted hover:border-border-default",a&&"pointer-events-none opacity-50",g&&"border-feedback-error-border bg-feedback-error-background/50"),onDrop:C,onDropEnter:()=>u(true),onDropExit:()=>u(false),children:[b?jsxRuntime.jsxs("div",{className:"relative flex h-full w-full items-center justify-center p-4",children:[l&&(b.startsWith("data:image")||b.startsWith("http"))?jsxRuntime.jsx("img",{src:b,alt:"Preview",className:"max-h-48 max-w-full rounded-md object-contain"}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-12 w-12 text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:"File uploaded"})]}),!a&&jsxRuntime.jsx(te,{variant:"icon",size:"sm",onPress:S,className:"absolute right-2 top-2 bg-background-surface shadow-md",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[jsxRuntime.jsx(lucideReact.Upload,{className:"h-12 w-12 text-text-secondary"}),jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("p",{className:"text-sm text-text-primary",children:d}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:o==="image/*"?"PNG, JPG, GIF up to 10MB":`Accepts ${o}`})]}),jsxRuntime.jsx(reactAriaComponents.FileTrigger,{acceptedFileTypes:o.split(","),onSelect:w=>{let T=Array.from(w||[]);T.length>0&&x(T[0]);},children:jsxRuntime.jsx(te,{variant:"secondary",size:"sm",isDisabled:a,children:"Choose File"})})]}),m&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-lg bg-background-surface/80",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-action-brand border-t-transparent"}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:"Uploading..."})]})})]}),g&&jsxRuntime.jsx("p",{className:"mt-2 text-sm text-feedback-error-text",children:g})]})}function rC({version:e,isLatest:t,updateAvailable:r,isLoading:o,size:n="sm",shape:a="rounded",...i}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-16"});let s="neutral",l=e;return t?s="success":r&&(s="warning",l=`${e} (Update)`),jsxRuntime.jsx(kt,{variant:s,size:n,shape:a,...i,children:l})}function Ii(e){return jsxRuntime.jsx(reactAriaComponents.Form,{validationBehavior:"aria",...e,className:tailwindMerge.twMerge("flex flex-col gap-6",e.className)})}function nC({placeholder:e="Search...",value:t,onChange:r,isOpen:o,onOpenChange:n,trigger:a,children:i,showShortcutHint:s=true,showInput:l=true,className:d}){let[c,u]=ot.useState(false),m=Pr("(max-width: 767px)"),p=o!==void 0?o:c,g=ot.useCallback(v=>{n?n(v):u(v);},[n]);ot.useEffect(()=>{let v=x=>{(x.metaKey||x.ctrlKey)&&x.key==="k"&&(x.preventDefault(),g(!p)),x.key==="Escape"&&p&&g(false);};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[p,g]);let f=ot.useCallback(v=>{r?.(v);},[r]),b=jsxRuntime.jsxs("button",{type:"button",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-text-primary hover:bg-background-hover rounded-md transition-colors","aria-label":"Open search",children:[jsxRuntime.jsx(G,{name:"MagnifyingGlass",size:18}),!m&&s&&jsxRuntime.jsxs("span",{className:"hidden md:flex items-center gap-1 text-xs",children:[jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 bg-background-muted border border-border-muted rounded text-xs",children:navigator.platform.includes("Mac")?"\u2318":"Ctrl"}),jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 bg-background-muted border border-border-muted rounded text-xs",children:"K"})]})]}),h=a===null||ot.isValidElement(a)&&a.type===ot.Fragment&&!a.props.children;return m?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!h&&(a?jsxRuntime.jsx("button",{type:"button",onClick:()=>g(true),className:"appearance-none bg-transparent border-none p-0 cursor-pointer",children:a}):jsxRuntime.jsx("button",{type:"button",onClick:()=>g(true),className:"appearance-none bg-transparent border-none p-0 cursor-pointer",children:b})),jsxRuntime.jsx(Lt,{isOpen:p,onClose:()=>g(false),hideCloseIcon:false,contentPadding:false,maxHeight:"90vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[l&&jsxRuntime.jsx("div",{className:"p-4 border-b border-border-muted flex-shrink-0",children:jsxRuntime.jsx(fo,{value:t,onChange:f,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:d,autoFocus:true})}),jsxRuntime.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:i})]})})]}):h?null:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:p,onOpenChange:g,children:[a||b,jsxRuntime.jsx(Et,{placement:"bottom",className:"w-[600px] max-w-[90vw] bg-background-surface shadow-xl border border-border-default rounded-lg overflow-hidden",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[l&&jsxRuntime.jsx("div",{className:"p-4 border-b border-border-muted",children:jsxRuntime.jsx(fo,{value:t,onChange:f,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:d,autoFocus:true})}),jsxRuntime.jsx("div",{className:"max-h-[500px] overflow-hidden",children:i})]})})]})}function sC({placeholder:e="Search...",value:t,onChange:r,isOpen:o,onOpenChange:n,children:a,maxHeight:i="400px",variant:s="default",className:l}){let[d,c]=ot.useState(false),u=Pr("(max-width: 767px)"),m=ot.useRef(null),p=ot.useRef(null),g=o!==void 0?o:d,f=ot.useCallback(R=>{n?n(R):c(R);},[n]);ot.useEffect(()=>{let R=A=>{(A.metaKey||A.ctrlKey)&&A.key==="k"&&(A.preventDefault(),f(!g)),A.key==="Escape"&&g&&f(false);};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[g,f]),ot.useEffect(()=>{g&&!u&&m.current&&setTimeout(()=>{m.current?.querySelector("input")?.focus();},0);},[g,u]),ot.useEffect(()=>{if(!g||u)return;let R=A=>{let M=A.target,B=m.current?.contains(M),D=p.current?.contains(M);!B&&!D&&f(false);};return document.addEventListener("mousedown",R,true),()=>document.removeEventListener("mousedown",R,true)},[g,u,f]);let b=R=>{r?.(R);},h=ot.useCallback(()=>{f(false);},[f]),v=ot.useCallback(()=>{r?.("");},[r]),[x,C]=ot.useState(null);ot.useEffect(()=>{if(g&&!u&&m.current){let R=null,A=()=>{let B=m.current?.getBoundingClientRect();B&&C({top:B.bottom+8,left:B.left,width:B.width});},M=()=>{R===null&&(R=requestAnimationFrame(()=>{A(),R=null;}));};return A(),window.addEventListener("resize",M),window.addEventListener("scroll",M,true),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true),R!==null&&cancelAnimationFrame(R);}}},[g,u]);let S=ot.useCallback(()=>{f(true);},[f]);if(u)return jsxRuntime.jsxs("div",{className:l,children:[jsxRuntime.jsx("button",{type:"button",onClick:S,className:"flex items-center justify-center w-10 h-10 rounded-lg hover:bg-background-hover transition-colors","aria-label":"Open search",children:jsxRuntime.jsx(G,{name:"MagnifyingGlass",size:"md"})}),jsxRuntime.jsxs(Lt,{isOpen:g,onClose:h,contentPadding:false,height:"80vh",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-4 pt-4",children:[jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsx(fo,{value:t,onChange:b,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:v,reserveErrorSpace:false,autoFocus:true})}),jsxRuntime.jsx(te,{variant:"icon",onPress:h,"aria-label":"Close search",className:"flex-shrink-0",children:jsxRuntime.jsx(G,{name:"X",size:"md"})})]}),jsxRuntime.jsx("div",{className:"mt-4",children:a})]})]},"mobile");let w=R=>{let M=R.target.tagName==="INPUT";if(R.key==="ArrowDown"&&g&&M){R.preventDefault();let B=p.current?.querySelector("[data-search-result]");B&&B.focus();}},T=R=>{let A=R.target;if(!A.hasAttribute("data-search-result"))return;let B=Array.from(p.current?.querySelectorAll("[data-search-result]")||[]),D=B.indexOf(A);if(R.key==="ArrowDown"){R.preventDefault(),R.stopPropagation();let W=Math.min(D+1,B.length-1);B[W]?.focus();}else if(R.key==="ArrowUp")if(R.preventDefault(),R.stopPropagation(),D===0)m.current?.querySelector("input")?.focus();else {let W=Math.max(D-1,0);B[W]?.focus();}else R.key==="Escape"&&(R.preventDefault(),R.stopPropagation(),f(false),m.current?.querySelector("input")?.focus());},N=g&&x&&typeof document<"u"?reactDom.createPortal(jsxRuntime.jsx("div",{ref:p,style:{position:"fixed",top:`${x.top}px`,left:`${x.left}px`,width:`${x.width}px`,zIndex:9999},role:"listbox",onKeyDown:T,children:jsxRuntime.jsx("div",{className:"bg-background-surface shadow-2xl border border-border-default rounded-lg overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:jsxRuntime.jsx("div",{className:"overflow-y-auto",style:{maxHeight:i},children:a})})}),document.body):null,k=s==="elevated"?"bg-background-muted/50 border-border-subtle/50 focus-within:bg-background-body focus-within:border-border-focus focus-within:shadow-md backdrop-blur-sm transition-all duration-200":"";return jsxRuntime.jsxs("div",{ref:m,className:`relative w-full ${l||""}`,onKeyDown:w,children:[jsxRuntime.jsx(fo,{value:t,onChange:b,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:k,onFocus:()=>f(true)}),N]},"desktop")}function lC({message:e="No results found",suggestion:t,icon:r="MagnifyingGlass",className:o=""}){return jsxRuntime.jsxs("div",{className:`flex flex-col items-center justify-center py-12 px-4 text-center ${o}`,children:[jsxRuntime.jsx("div",{className:"text-text-secondary mb-3",children:jsxRuntime.jsx(G,{name:r,size:48})}),jsxRuntime.jsx("p",{className:"text-base font-medium text-text-primary mb-1",children:e}),t&&jsxRuntime.jsx("p",{className:"text-sm text-text-secondary max-w-xs",children:t})]})}function dC({count:e=3,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`,children:Array.from({length:e}).map((r,o)=>jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[jsxRuntime.jsx(q,{width:20,height:20,variant:"circle"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[jsxRuntime.jsx(q,{width:"60%",height:16}),jsxRuntime.jsx(q,{width:"40%",height:12})]}),jsxRuntime.jsx(q,{width:16,height:16})]},o))})}function pC({title:e,count:t,isLoading:r,footer:o,children:n,className:a}){return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex flex-col",a),children:[jsxRuntime.jsxs("div",{className:"flex items-baseline gap-1.5 px-4 pt-4 pb-2 border-t border-border-muted first:border-t-0",children:[jsxRuntime.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:e}),!r&&t!==void 0&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:t}),r&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary animate-pulse",children:"Loading..."})]}),jsxRuntime.jsx("div",{className:"flex flex-col",children:n}),o&&jsxRuntime.jsx("div",{className:"px-4 py-2 border-t border-border-subtle",children:o})]})}function mC({id:e,title:t,subtitle:r,metadata:o,icon:n,customIcon:a,onSelect:i,isFocused:s=false,className:l,testId:d}){return jsxRuntime.jsxs("div",{role:"option",tabIndex:0,onClick:()=>{i?.(e);},onKeyDown:m=>{let p=m.currentTarget;switch(m.key){case "Enter":case " ":{m.preventDefault(),i?.(e);break}case "ArrowDown":{m.preventDefault();let g=Array.from(document.querySelectorAll("[data-search-result]")),f=g.indexOf(p);f!==-1&&f<g.length-1&&g[f+1].focus();break}case "ArrowUp":{m.preventDefault();let g=Array.from(document.querySelectorAll("[data-search-result]")),f=g.indexOf(p);if(f>0)g[f-1].focus();else {let b=document.querySelector('input[type="text"][placeholder*="Search"]');b&&b.focus();}break}case "Escape":{m.preventDefault();let g=document.querySelector('input[type="text"][placeholder*="Search"]');g&&g.focus();break}}},"data-testid":d,"data-search-result":true,className:tailwindMerge.twMerge("group flex items-center gap-3 px-4 py-3 cursor-pointer outline-none transition-colors","text-text-primary hover:bg-background-hover","focus-visible:bg-background-muted focus-visible:outline-none","data-[focused]:bg-background-hover",s&&"bg-background-hover",l),"data-focused":s||void 0,children:[a?jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a}):n?jsxRuntime.jsx("div",{className:"flex-shrink-0 text-text-secondary",children:jsxRuntime.jsx(G,{name:n,size:20})}):null,jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-baseline gap-2",children:[jsxRuntime.jsx("span",{className:"font-medium text-text-primary truncate",children:t}),o&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary flex-shrink-0",children:o})]}),r&&jsxRuntime.jsx("div",{className:"text-sm text-text-secondary truncate mt-0.5",children:r})]}),jsxRuntime.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 group-data-[focused]:opacity-100 transition-opacity",children:jsxRuntime.jsx(G,{name:"ArrowRight",size:16,className:"text-text-secondary"})})]})}function fC({children:e,maxHeight:t="400px",className:r}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-y-auto overscroll-contain","divide-y divide-border-muted",r),style:{maxHeight:t},children:e})}function hC({placeholder:e="Search...",onClick:t,showShortcut:r=true,variant:o="default",className:n=""}){let a=typeof navigator<"u"&&navigator.platform.includes("Mac");return jsxRuntime.jsxs("button",{type:"button",onClick:t,className:`
|
|
167
|
+
`}})]})}function Dn(e,t=300){let[r,o]=ot.useState(e);return ot.useEffect(()=>{let n=setTimeout(()=>o(e),t);return ()=>clearTimeout(n)},[e,t]),r}function _l(e,t=300){let[r,o]=ot.useState(false);return ot.useEffect(()=>{if(e){let n=setTimeout(()=>{o(true);},t);return ()=>clearTimeout(n)}o(false);},[e,t]),r}var Bk=({isEntering:e,isExiting:t,className:r})=>["max-w-xs group bg-background-surface border border-border-default text-text-primary text-sm leading-relaxed rounded-lg shadow-lg will-change-transform px-3 py-2",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",t?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",r].filter(Boolean).join(" ");function lb({content:e,tooltipRef:t,...r}){return jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...r,ref:t,offset:r.offset??8,className:reactAriaComponents.composeRenderProps(r.className,(o,n)=>Bk({...n,className:o})),children:[jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-background-surface stroke-border-default group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),e]})}function Vk({children:e,content:t,delay:r=200,closeDelay:o,...n}){let[a,i]=ot.useState(false),s=ot.useRef(false),d=ot.useRef(null),c=ot.useRef(null),l=ot.useId();if(ot.useEffect(()=>{if(!a)return;let m=()=>{s.current=false,i(false);},p=f=>{f.key==="Escape"&&m();},g=f=>{!(f.target instanceof Node)||document.querySelector(`[data-tooltip-trigger="${l}"]`)?.contains(f.target)||c.current?.contains(f.target)||m();};return document.addEventListener("keydown",p,true),document.addEventListener("pointerdown",g),()=>{document.removeEventListener("keydown",p,true),document.removeEventListener("pointerdown",g);}},[a,l]),ot.useEffect(()=>()=>{d.current&&clearTimeout(d.current);},[]),!ot.isValidElement(e))throw new Error("Tooltip with openOnPress requires a single pressable child");let u=ot__namespace.default.cloneElement(e,{"data-tooltip-trigger":l,onHoverStart:m=>{e.props.onHoverStart?.(m),d.current=setTimeout(()=>i(true),r);},onHoverEnd:m=>{e.props.onHoverEnd?.(m),d.current&&clearTimeout(d.current),s.current||i(false);},onPress:m=>{e.props.onPress?.(m),d.current&&clearTimeout(d.current),s.current=!s.current,i(s.current);}});return jsxRuntime.jsxs(reactAriaComponents.TooltipTrigger,{delay:r,closeDelay:o,shouldCloseOnPress:false,isOpen:a,onOpenChange:m=>{!m&&s.current||i(m);},children:[u,jsxRuntime.jsx(lb,{...n,content:t,tooltipRef:c})]})}function tr({children:e,content:t,openOnPress:r=false,delay:o=200,closeDelay:n,...a}){return r?jsxRuntime.jsx(Vk,{...a,content:t,delay:o,closeDelay:n,children:e}):jsxRuntime.jsxs(reactAriaComponents.TooltipTrigger,{delay:o,closeDelay:n,children:[e,jsxRuntime.jsx(lb,{...a,content:t})]})}function Dr(){let[e,t]=ot__namespace.default.useState(false),r=ot__namespace.default.useCallback((n,a)=>{t(true),a?.(n);},[]),o=ot__namespace.default.useCallback((n,a)=>{t(false),a?.(n);},[]);return {isFocused:e,handleFocus:r,handleBlur:o}}var Dt=ot__namespace.default.forwardRef(({children:e,className:t},r)=>jsxRuntime.jsx("div",{ref:r,className:tailwindMerge.twMerge("relative w-full",t),children:e}));Dt.displayName="InputWrapper";function fs({onClick:e,size:t="md",className:r}){return jsxRuntime.jsx("button",{type:"button",onClick:o=>{o.preventDefault(),o.stopPropagation(),e();},className:tailwindMerge.twMerge("absolute right-2 top-[48%] -translate-y-1/2 transform text-text-secondary hover:text-text-primary cursor-pointer",r),"aria-label":"Clear input",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},children:jsxRuntime.jsx(W,{name:"X",size:t==="sm"?16:20})})}function An(e){let{isInvalid:t,isDisabled:r,isFocused:o}=e,n="border rounded-[var(--control-border-radius)] !outline-none ";return r?`${n} border-border-muted`:t&&o?`${n} border-feedback-error-border shadow-[inset_0_0_0_1px_var(--color-feedback-error-border)]`:t?`${n} border-feedback-error-border`:o?`${n} border-border-focus shadow-[inset_0_0_0_1px_var(--color-border-focus)]`:`${n} border-border-input`}function cb(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function Ok(e){return e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":""}function rr(e){let{isInvalid:t,isDisabled:r,isFocused:o,transparent:n,size:a="md",className:i}=e;return tailwindMerge.twMerge("w-full",An({isInvalid:t,isDisabled:r,isFocused:o}),cb({transparent:n,isDisabled:r}),_e[a].text,_e[a].height,_e[a].padding,Ok(a),i)}function zk(e){let{size:t="md",isFocusWithin:r,isInvalid:o,isDisabled:n,transparent:a,className:i}=e;return tailwindMerge.twMerge("group flex items-center rounded-[var(--control-border-radius)] overflow-hidden",cb({transparent:a,isDisabled:n}),_e[t].height,An({isFocused:r,isInvalid:o,isDisabled:n}),i)}function et({children:e,size:t="md",tooltip:r,description:o,descriptionPlacement:n="below",isRequired:a,className:i,htmlFor:s}){let d=r||o&&n==="tooltip",c=r||o,l=o&&n==="inline",u=jsxRuntime.jsxs("label",{htmlFor:s,className:tailwindMerge.twMerge(_e[t].text,"!text-text-label font-semibold flex items-center gap-1",i),children:[e,a&&jsxRuntime.jsx("span",{children:"*"}),d&&jsxRuntime.jsx("span",{className:"inline-flex items-center text-text-secondary",children:jsxRuntime.jsx(W,{name:"Info",size:t==="sm"?16:20})}),l&&jsxRuntime.jsx("span",{className:"text-text-secondary font-normal ml-1",children:o})]});return d&&c?jsxRuntime.jsx(tr,{content:c,children:u}):u}function Ee({size:e="md",className:t,children:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("leading-[2.25] text-text-secondary",_e[e].text,t),children:r})}function ye({children:e,size:t="md",className:r}){return jsxRuntime.jsx("div",{role:"alert",className:tailwindMerge.twMerge(_e[t].text,"text-feedback-error-text",r),children:e})}function ec({size:e="md",isInvalid:t,isDisabled:r,isFocused:o,transparent:n,className:a,...i}){let s=r??i.disabled;return jsxRuntime.jsx("input",{className:rr({isInvalid:t,isDisabled:r,isFocused:o,transparent:n,size:e,className:a}),...i,disabled:s,"aria-disabled":s||void 0})}function db(e){let{children:t,...r}=e;return jsxRuntime.jsx("div",{...r,className:zk(e),children:typeof t=="function"?t(e):t})}var zp=ot.createContext("md");function gb(){return ot.useContext(zp)}function Bp(e="md"){let t=e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":"";return `flex-1 text-start data-[placeholder]:text-text-disabled overflow-hidden text-ellipsis whitespace-nowrap ${_e[e].text} ${t}`}function Yk(){let e=ot__namespace.default.useCallback((r,o)=>{o?.(r);},[]),t=ot__namespace.default.useCallback((r,o)=>{o?.(r);},[]);return {handleFocus:e,handleBlur:t}}function an({label:e,description:t,errorMessage:r,children:o,items:n,renderItem:a,renderSelectedValue:i,size:s="md",selectedKey:d,defaultSelectedKey:c,onSelectionChange:l,placeholder:u,showErrors:m=false,tooltip:p,isRequired:g,transparent:f,reserveErrorSpace:h=false,placement:b="bottom start",shouldFlip:v=true,menuWidth:x="match",descriptionPlacement:C="below",useMobileTray:w=true,...S}){let[T,N]=ot.useState(null),[k,R]=ot.useState(null),[L,E]=ot.useState(false),B=d??T??c,{handleFocus:A,handleBlur:H}=Yk(),{isMobile:Y}=Rr(),G=w&&Y,I=ot__namespace.default.useMemo(()=>!i||!B||!n?null:Array.from(n).find(V=>V.id===B)??null,[i,B,n]),F=z=>{l&&z!==null&&l(z),l||N(z);},O=ot.useRef(null),U=ot.useRef(null),K=()=>{G&&E(!L);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAriaComponents.Select,{...S,selectedKey:B,defaultSelectedKey:c,onSelectionChange:F,placeholder:u,className:Fe(S.className,"group flex w-full flex-col"),ref:O,onOpenChange:z=>{G||(z&&U.current?R(U.current.offsetWidth):z||O.current?.blur());},children:({isDisabled:z,isInvalid:V,isOpen:D})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:s,tooltip:p,description:C==="tooltip"||C==="inline"?t:void 0,descriptionPlacement:C,isRequired:g,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsx("div",{ref:U,children:jsxRuntime.jsxs(te,{variant:"unstyled",className:tailwindMerge.twMerge(rr({isInvalid:V||m&&!!r,isDisabled:z,isFocused:G?L:D,transparent:f,size:s}),"flex items-center text-start gap-4 cursor-pointer pl-[var(--control-padding-sm)]"),onFocus:y=>A(y,S.onFocus),onBlur:y=>H(y,S.onBlur),onPress:G?K:void 0,"data-open":G?L:D,children:[i&&I?jsxRuntime.jsx("div",{className:Bp(s),children:i(I)}):G&&B?jsxRuntime.jsx("div",{className:Bp(s),children:n?Array.from(n).find(P=>P.id===B)?.label:String(B)}):jsxRuntime.jsx(reactAriaComponents.SelectValue,{className:Bp(s)}),jsxRuntime.jsx(W,{name:"CaretDown","aria-hidden":true,className:tailwindMerge.twMerge("h-4 w-4 text-text-primary group-disabled:text-text-disabled forced-colors:text-[ButtonText] transition-transform",(G?L:D)&&"rotate-180")})]})})}),h?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:m?jsxRuntime.jsx(ye,{size:s,className:"text-feedback-error-text",children:typeof r=="function"&&S.validationResult?r(S.validationResult):typeof r=="string"?r:null}):t&&C==="below"?jsxRuntime.jsx(Ee,{size:s,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:m?jsxRuntime.jsx(ye,{size:s,className:"mt-1 text-feedback-error-text",children:typeof r=="function"&&S.validationResult?r(S.validationResult):typeof r=="string"?r:null}):t&&C==="below"?jsxRuntime.jsx(Ee,{size:s,className:"mt-1",children:t}):null}),G?null:jsxRuntime.jsx(Et,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-[var(--control-border-radius)]",style:{width:x==="match"&&k?`${k}px`:void 0,minWidth:x==="auto"&&k?`${k}px`:void 0,maxWidth:x==="auto"?"min(600px, 90vw)":void 0},placement:b,shouldFlip:v,children:jsxRuntime.jsx(zp.Provider,{value:"md",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:n,className:"w-full max-h-[300px] overflow-auto bg-background-input p-0 outline-0",children:a&&n?y=>jsxRuntime.jsx(Ar,{id:y.id,textValue:y.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:a(y)})},y.id):o})})})]})}),G&&jsxRuntime.jsx(Lt,{isOpen:L,onClose:()=>E(false),title:e??"Select an option",contentPadding:false,children:jsxRuntime.jsx(zp.Provider,{value:"md",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:n,className:"w-full bg-background-surface p-0 outline-0 [&_[role=option]]:border-b [&_[role=option]]:border-border-default [&_[role=option]:last-child]:border-0 [&_[role=option]]:!px-6 [&_[role=option]]:!py-4 [&_[role=option]]:rounded-none",selectionMode:"single",selectedKeys:B!=null?[B]:[],onSelectionChange:z=>{let V=Array.from(z)[0];V!=null&&(F(V),E(false));},children:a&&n?z=>jsxRuntime.jsx(Ar,{id:z.id,textValue:z.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:a(z)})},z.id):o})})})]})}function Ar({size:e,className:t,...r}){let o=gb(),n=e??o;return jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{...r,className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 outline-none text-text-primary data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-default data-[focus-visible]:ring-inset data-[selected]:bg-background-selected data-[selected]:font-medium overflow-hidden",_e[n].paddingY,_e[n].text,t)})}var oP=[],nP={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},aP={sm:"pl-8",md:"pl-10",lg:"pl-11",xl:"pl-13"},bb={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"},Gp=(e,t,r)=>{if(e==null||e==="")return "";let n=(r?r.flatMap(a=>a.items):t||[]).find(a=>a.id===e);return n?n.name:""};async function iP(e,t,r){try{let o=e.url.replace("{q}",t),n=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([d,c])=>{n.append(d,c.toString());});let a=`${o}${n.toString()?"?"+n.toString():""}`,i=await fetch(a,{method:"GET",headers:e.headers,signal:r});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);let s=await i.json();return {items:e.transformResponse(s)}}catch(o){if(o instanceof Error&&o.name==="AbortError")return {items:[]};console.error("Error in REST request:",o);let n=o instanceof Error?o.message:"Unknown error occurred";return {items:[],error:n}}}async function sP(e,t,r){try{let o=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${t}"`),n=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:o}),signal:r});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);let a=await n.json();if(a.errors)throw new Error(a.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(a=e.responsePath.split(".").reduce((i,s)=>i?.[s],a)),{items:e.transformResponse(a)}}catch(o){if(o instanceof Error&&o.name==="AbortError")return {items:[]};console.error("Error in GraphQL request:",o);let n=o instanceof Error?o.message:"Unknown error occurred";return {items:[],error:n}}}function oc({label:e,staticItems:t=oP,sections:r,selectedKey:o,defaultSelectedKey:n,onSelectionChange:a,requestConfig:i,defaultFilter:s,placeholder:d,errorMessage:c,description:l,size:u="md",tooltip:m,isRequired:p,isDisabled:g,isInvalid:f,validationResult:h,showErrors:b=true,renderItem:v,renderLeftIcon:x,renderSection:C,autoFocus:w=false,reserveErrorSpace:S=false,hideChevron:T=false,useMobileTray:N=true,className:k}){let R=ot__namespace.default.useRef(null),L=ot__namespace.default.useRef(null),[E,B]=ot__namespace.default.useState(),[A,H]=ot.useState(()=>Gp(o||n,t,r)),[Y,G]=ot.useState(false),[I,F]=ot.useState(false),O=Dn(A),{contains:U}=reactAria.useFilter({sensitivity:"base"}),[K,z]=ot.useState(),{isMobile:V}=Rr(),D=N&&V,y=_e[u].text,M=reactStately.useAsyncList({async load({signal:me,filterText:ue=""}){if(!i)return {items:[]};if(!i.url||i.shouldLoad&&!i.shouldLoad(ue))return {items:[]};try{let ie;return i.requestType==="GraphQL"?ie=await sP(i,ue,me):ie=await iP(i,ue,me),z(ie.error),{items:ie.items}}catch(ie){return ie instanceof Error&&ie.name==="AbortError"?{items:[]}:(console.error("Error loading items:",ie),z(ie instanceof Error?ie.message:"Unknown error occurred"),{items:[]})}},initialFilterText:""}),P=i&&O!==""?M:null,X=false,$=ot.useRef("");ot.useEffect(()=>{w&&G(true);},[w]),ot.useEffect(()=>{let me=Gp(o,t,r);me!==A&&H(me);},[o,t,r]),ot.useEffect(()=>{let me=()=>{R.current&&B(R.current.offsetWidth);};return me(),window.addEventListener("resize",me),()=>window.removeEventListener("resize",me)},[]),ot.useEffect(()=>{O===""?$.current="":P&&O!==$.current&&($.current=O,P.setFilterText(O));},[O,P]),X=_l(!!P?.isLoading,300);let oe=ot__namespace.default.useMemo(()=>{if(!D||!A)return P?P.items:t;let me=P?P.items:t,ue=s??(i?()=>true:U);return me.filter(ie=>ue(ie.name,A))},[D,A,P,t,s,U]),re=me=>{let ue=Gp(me,t,r);H(ue),a&&a(me);},_=me=>{H(me);},he=()=>{D&&F(true);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAriaComponents.ComboBox,{onSelectionChange:re,selectedKey:o||void 0,defaultSelectedKey:n||void 0,items:P?P.items:r?r.flatMap(me=>me.items):t,className:Fe(k,"group flex flex-col w-full"),menuTrigger:D?"manual":i?"input":"focus",allowsEmptyCollection:!!i,isDisabled:g,isInvalid:f||!!c,inputValue:A,onInputChange:_,autoFocus:w&&!D,defaultFilter:s??(i?()=>true:U),"aria-label":e||d||"Autocomplete",children:me=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:u,tooltip:m,isRequired:p,children:e}),jsxRuntime.jsxs(Dt,{ref:R,children:[x?jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-[45%] -translate-y-1/2 z-10",children:x(X)}):jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 z-10 flex items-center",children:X?jsxRuntime.jsx(io,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(W,{name:"MagnifyingGlass",className:`${nP[u]} text-text-secondary`})}),jsxRuntime.jsx(reactAriaComponents.Input,{className:rr({isInvalid:f||!!c,isDisabled:g,isFocused:Y||(D?I:me.isOpen),size:u,className:tailwindMerge.twMerge(aP[u],A&&!g||!T&&!A?"pr-10":"pr-3",D&&"cursor-pointer",k)}),placeholder:d,disabled:g,onFocus:ue=>{G(true),D&&(ue.currentTarget.blur(),he());},onBlur:()=>{G(false);},onClick:D?he:void 0,readOnly:D,"aria-label":e||d||"Autocomplete"}),A&&!g&&jsxRuntime.jsx(fs,{onClick:()=>{H(""),a?.(null);},size:u}),!T&&!A&&jsxRuntime.jsx(reactAriaComponents.Button,{className:"absolute right-3 top-[46%] -translate-y-1/2 transform text-text-secondary hover:text-text-primary","aria-label":"Toggle menu",isDisabled:g,children:({isPressed:ue})=>jsxRuntime.jsx(W,{name:ue?"CaretUp":"CaretDown",className:"h-4 w-4"})})]}),S?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:b&&K?jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text",children:K}):b&&typeof c=="string"?jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text",children:c}):b&&typeof c=="function"&&h?jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text",children:c(h)}):l?jsxRuntime.jsx(Ee,{size:u,children:l}):null}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l&&jsxRuntime.jsx(Ee,{size:u,className:"mt-1",children:l}),b&&K&&jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text mt-1",children:K}),b&&typeof c=="string"&&jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text mt-1",children:c}),b&&typeof c=="function"&&h&&jsxRuntime.jsx(ye,{size:u,className:"text-feedback-error-text mt-1",children:c(h)})]}),!D&&jsxRuntime.jsx(Et,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm ring-1 ring-black/5 rounded-[var(--control-border-radius)]",style:{minWidth:E?`${E}px`:void 0,zIndex:9999},children:jsxRuntime.jsx(reactAriaComponents.ListBox,{"aria-label":e||d||"Suggestions",className:`max-h-[300px] overflow-auto bg-background-input outline-none ${y}`,children:r?r.map(ue=>{let ie=ue.items.map(fe=>jsxRuntime.jsx(Ar,{id:fe.id,textValue:fe.name,size:u,className:`flex cursor-default items-center gap-2 px-3 ${bb[u]} text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0`,children:v?v(fe):fe.name},fe.id));if(C){let fe=C(ue,ie);return ot__namespace.default.isValidElement(fe)&&fe.type===reactAriaComponents.ListBoxSection?fe:jsxRuntime.jsx(reactAriaComponents.ListBoxSection,{children:fe},ue.name)}return jsxRuntime.jsxs(reactAriaComponents.ListBoxSection,{children:[jsxRuntime.jsx(reactAriaComponents.Header,{className:"px-3 py-1 text-sm font-bold text-text-secondary",children:ue.name}),ie]},ue.name)}):ue=>jsxRuntime.jsx(Ar,{id:ue.id,textValue:ue.name,size:u,className:`flex cursor-default items-center gap-2 px-3 ${bb[u]} text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0`,children:v?v(ue):ue.name},ue.id)})})]})}),D&&jsxRuntime.jsx(Lt,{isOpen:I,onClose:()=>F(false),title:e??d??"Search",contentPadding:false,height:"80vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"p-4 border-b border-border-default",children:jsxRuntime.jsxs(Dt,{children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-[45%] -translate-y-1/2 z-10 flex items-center",children:X?jsxRuntime.jsx(io,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(W,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-secondary"})}),jsxRuntime.jsx("input",{ref:L,type:"text",value:A,onChange:me=>_(me.target.value),placeholder:d,autoFocus:true,className:rr({isInvalid:false,isDisabled:false,isFocused:true,size:"md",className:"pl-10 pr-10"})}),A&&jsxRuntime.jsx(fs,{onClick:()=>{H(""),a?.(null);},size:"md"})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{"aria-label":e||d||"Suggestions",items:oe,selectedKeys:o?[o]:[],selectionMode:"single",onSelectionChange:me=>{let ue=Array.from(me)[0];ue&&(re(ue),F(false));},className:"bg-background-input outline-none",children:me=>jsxRuntime.jsx(Ar,{id:me.id,textValue:me.name,size:"md",className:"flex cursor-default items-center gap-2 px-4 py-3 text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0",children:v?v(me):me.name},me.id)})})]})})]})}var yb=ot.createContext(e=>e);function dP({resolve:e,children:t}){return jsxRuntime.jsx(yb.Provider,{value:e,children:t})}function hs(e){let t=ot.useContext(yb);return e===void 0?void 0:t(e)}function sn({src:e,alt:t,firstName:r,lastName:o,fullName:n,onClick:a,size:i="md",shape:s="circle",variant:d="user",className:c,status:l,bordered:u=false,piiEntity:m}){let p=hs(e),[g,f]=ot.useState(false),h=ot.useCallback(()=>f(true),[]);ot.useEffect(()=>{f(false);},[p]);let b={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},v={xs:"h-1.5 w-1.5",sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3",xl:"h-4 w-4"},x={xs:"bottom-0 right-0",sm:"bottom-0 right-0",md:"bottom-0 right-0",lg:"bottom-0.5 right-0.5",xl:"bottom-1 right-1"},C={online:"bg-feedback-success-background border-feedback-success-border",offline:"bg-text-secondary border-border-muted",away:"bg-feedback-warning-background border-feedback-warning-border",busy:"bg-feedback-error-background border-feedback-error-border"},w={user:"bg-feedback-info-background text-feedback-info-text",team:"bg-feedback-info-background text-feedback-info-text",organization:"bg-feedback-success-background text-feedback-success-text"},S=s==="circle"?"rounded-full":"rounded-md",T=tailwindMerge.twMerge("relative inline-flex items-center justify-center overflow-hidden transition-opacity outline-none",b[i],S,a&&"cursor-pointer hover:opacity-80",u&&"ring-2 ring-background-surface",c),k=(()=>{if(r||o){let B=r?.[0]||"",A=o?.[0]||"";return (B+A).toUpperCase()}if(n){let B=n.split(" "),A=B[0]?.[0]||"",H=B[B.length-1]?.[0]||"";return A===H?A.toUpperCase():(A+H).toUpperCase()}return ""})(),R=()=>{let B={xs:14,sm:16,md:20,lg:24,xl:32}[i];switch(d){case "team":return jsxRuntime.jsx(lucideReact.Users,{size:B});case "organization":return jsxRuntime.jsx(lucideReact.Building2,{size:B});default:return jsxRuntime.jsx(lucideReact.User,{size:B})}},L=B=>{if(m)return d==="organization"?B?"organization-logo":"initials":B?"avatar":"initials"},E=()=>p&&!g?jsxRuntime.jsx("img",{src:p,alt:t||n||"Avatar",className:"h-full w-full object-cover",onError:h,"data-pii-type":L(true),"data-pii-entity":m}):k?jsxRuntime.jsx("span",{className:"font-semibold","data-pii-type":L(false),"data-pii-entity":m,children:k}):R();return jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx("div",{"data-avatar":true,className:tailwindMerge.twMerge(T,!p||g?w[d]:""),onClick:a,role:a?"button":void 0,tabIndex:a?0:void 0,children:E()}),l&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("absolute border-2 border-background-surface",S,v[i],x[i],C[l]),"aria-label":`Status: ${l}`})]})}var yP={default:"bg-feedback-info-background text-feedback-info-text",success:"bg-feedback-success-background text-feedback-success-text",error:"bg-feedback-error-background text-feedback-error-text",warning:"bg-feedback-warning-background text-feedback-warning-text",info:"bg-feedback-info-background text-feedback-info-text",primary:"bg-action-primary/10 text-action-primary border border-action-primary/20",brand:"bg-action-primary/10 text-action-primary border border-action-primary/20",secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border border-border-muted",neutral:"bg-background-muted text-text-secondary",charging:"bg-state-charging text-state-charging-text",discharging:"bg-state-discharging text-state-discharging-text",heat:"bg-state-heat text-state-heat-text",cool:"bg-state-cool text-state-cool-text",eco:"bg-state-eco text-state-eco-text",auto:"bg-state-auto text-state-auto-text",on:"bg-state-on text-state-on-text",off:"bg-state-off text-state-off-text",idle:"bg-state-idle text-state-idle-text",circulate:"bg-state-circulate text-state-circulate-text",unknown:"bg-state-unknown text-state-unknown-text",connected:"bg-feedback-success-background text-feedback-success-text",disconnected:"bg-feedback-error-background text-feedback-error-text",importing:"bg-state-importing text-state-importing-text",exporting:"bg-state-exporting text-state-exporting-text"},vP={xs:"px-1.5 py-0.5 text-xs",sm:"px-2.5 py-1.5 text-xs",md:"px-3.5 py-2 text-sm",lg:"px-4 py-2.5 text-base"},CP={pill:"rounded-full",rounded:"rounded-lg",square:"rounded-sm"},SP={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};function kt({children:e,variant:t="default",size:r="sm",shape:o="square",dot:n=false,dotPosition:a="left",dotPulse:i=false,title:s,className:d}){let c=n&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("rounded-full bg-current opacity-75",SP[r],i&&"animate-pulse"),"aria-hidden":"true"});return jsxRuntime.jsxs("span",{title:s,className:tailwindMerge.twMerge("inline-flex items-center gap-1.5 font-medium",vP[r],CP[o],yP[t],d),children:[n&&a==="left"&&c,e,n&&a==="right"&&c]})}var St=({href:e,children:t,className:r="",external:o=false,title:n,variant:a="secondary",onClick:i,asButton:s=false,onPress:d,showArrow:c=false,alwaysUnderlined:l=false,LinkComponent:u,"data-pii-type":m,"data-pii-entity":p})=>{let g={...m&&{"data-pii-type":m},...p&&{"data-pii-entity":p}},f=o?{target:"_blank",rel:"noopener noreferrer"}:{},C=`${`${l?"underline decoration-1 underline-offset-4 decoration-current":"hover:underline hover:decoration-1 hover:underline-offset-4 hover:decoration-current"} cursor-pointer`} ${{primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",secondary:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",muted:"text-text-secondary hover:text-text-secondary visited:text-text-secondary",unstyled:""}[a==="brand"?"primary":a==="default"?"secondary":a]} ${r}`,w=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,c&&jsxRuntime.jsxs("span",{children:["\xA0","\u2192"]})]});return s?jsxRuntime.jsx("button",{type:"button",className:C,onClick:d,title:n,...g,children:w}):u&&e?jsxRuntime.jsx(u,{href:e,className:C,title:n,onClick:i,...f,...g,children:w}):jsxRuntime.jsx("a",{href:e||"#",className:C,...f,...g,title:n,onClick:i,children:w})};var DP={info:{subtle:{container:"bg-feedback-info-background border-l-4 border-l-feedback-info-border",iconColor:"text-feedback-info-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-info-border border-feedback-info-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.Info},success:{subtle:{container:"bg-feedback-success-background border-l-4 border-l-feedback-success-border",iconColor:"text-feedback-success-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-success-border border-feedback-success-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.CheckCircle},warning:{subtle:{container:"bg-feedback-warning-background border-l-4 border-l-feedback-warning-border",iconColor:"text-feedback-warning-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-warning-border border-feedback-warning-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.AlertCircle},error:{subtle:{container:"bg-feedback-error-background border-l-4 border-l-feedback-error-border",iconColor:"text-feedback-error-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-error-border border-feedback-error-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.XCircle},discovery:{subtle:{container:"bg-background-muted border-l-4 border-l-action-brand",iconColor:"text-action-brand",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-action-brand border-action-brand",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.Lightbulb}};function ac({variant:e="info",appearance:t="subtle",title:r,children:o,dismissible:n=false,onDismiss:a,primaryAction:i,secondaryAction:s,icon:d,hideIcon:c=false,className:l,testId:u}){let m=DP[e],p=m[t],g=m.icon,f=!!(i||s),h=!!(r||o);return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex gap-3 rounded-sm border p-4",p.container,l),role:"region","aria-live":"polite","data-testid":u,children:[!c&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0",p.iconColor),"aria-hidden":"true",children:d||jsxRuntime.jsx(g,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:[h&&jsxRuntime.jsxs("div",{className:"flex-1",children:[r&&jsxRuntime.jsx("div",{className:Yr(zt("headingSm"),p.titleColor),children:r}),o&&jsxRuntime.jsx("div",{className:Yr(zt("bodySm"),r?"mt-1":"",p.bodyColor),children:o})]}),f&&jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i&&(i.asLink?jsxRuntime.jsx(St,{asButton:true,onPress:i.onPress,variant:t==="bold"?"unstyled":"default",className:t==="bold"?"text-text-inverse hover:text-text-inverse/80":"",children:i.label}):jsxRuntime.jsx(te,{size:"sm",variant:"primary",onPress:i.onPress,className:t==="bold"?"bg-background-surface text-text-primary hover:bg-background-surface/90":"",children:i.label})),s&&(s.asLink?jsxRuntime.jsx(St,{asButton:true,onPress:s.onPress,variant:t==="bold"?"unstyled":"default",className:t==="bold"?"text-text-inverse hover:text-text-inverse/80":"",children:s.label}):jsxRuntime.jsx(te,{size:"sm",variant:"secondary",onPress:s.onPress,className:t==="bold"?"border-text-inverse/30 text-text-inverse hover:bg-text-inverse/10":"",children:s.label}))]})]}),n&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:tailwindMerge.twMerge("flex h-8 w-8 flex-shrink-0 items-center justify-center self-start rounded-md transition-colors hover:bg-background-modal/10",p.iconColor,pt()),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function Sb({isOpen:e=true,position:t="sticky",className:r,...o}){let n=t==="fixed"?"fixed top-0 left-0 right-0 z-50":"sticky top-0 z-50",a=r?`${r} !rounded-none`:"!rounded-none";return jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&jsxRuntime.jsx(framerMotion.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:n,children:jsxRuntime.jsx(ac,{...o,className:a})})})}function bi(){let[e,t]=ot.useState({width:0,height:0}),r=ot.useRef(null),o=ot.useRef(void 0),n=ot.useCallback(a=>{if(r.current&&(r.current.disconnect(),r.current=null),o.current&&(cancelAnimationFrame(o.current),o.current=void 0),!a){t({width:0,height:0});return}let i=a.getBoundingClientRect();t({width:i.width,height:i.height}),r.current=new ResizeObserver(s=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(d=>{for(let c of s){let{width:l,height:u}=c.contentRect;t(m=>m.width!==l||m.height!==u?{width:l,height:u}:m);}});}),r.current.observe(a);},[]);return ot.useEffect(()=>()=>{o.current&&cancelAnimationFrame(o.current),r.current&&r.current.disconnect();},[]),{ref:n,width:e.width,height:e.height}}function In({value:e,children:t,className:r,size:o="sm",iconPosition:n="right"}){let[a,i]=ot.useState(false),c=jsxRuntime.jsx(te,{variant:"icon",size:o,onPress:()=>{let u=e||(typeof t=="string"?t:"");navigator.clipboard.writeText(u),i(true),setTimeout(()=>{i(false);},2e3);},className:"!px-2 relative",style:{top:"0.5px"},children:jsxRuntime.jsx(W,{name:"Copy",size:o==="sm"?14:16})}),l=a?jsxRuntime.jsx(tr,{content:"Copied!",children:c}):c;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center gap-0.5",r),children:[n==="left"&&l,t,n==="right"&&l]})}function ic(e){let{children:t,maxWidth:r=600,className:o,...n}=e,{ref:a,width:i}=bi(),[s,d]=ot__namespace.default.useState(false),[c,l]=ot__namespace.default.useState(false),u=ot__namespace.default.useRef(false),m=ot__namespace.default.useMemo(()=>t&&!e.items&&typeof t!="function"?ot__namespace.default.Children.toArray(t):null,[t,e.items]);if(ot__namespace.default.useEffect(()=>{m&&m.length>=4&&i>0&&!u.current?(u.current=true,d(i>r),l(true)):(!m||m&&m.length<4)&&l(true);let p=setTimeout(()=>{c||l(true);},100);return ()=>clearTimeout(p)},[i,r,m,c]),m&&s&&m.length>=4){let p=m[0],g=m.slice(1,-2),f=m.slice(-2),h=g.map(b=>{if(ot__namespace.default.isValidElement(b)){let v=b.props;if(typeof v.children=="string")return {label:v.children,href:v.href}}return {label:"..."}});return jsxRuntime.jsxs(reactAriaComponents.Breadcrumbs,{...n,ref:a,className:tailwindMerge.twMerge("flex gap-2",c?"opacity-100":"opacity-0",o),children:[p,jsxRuntime.jsx(GP,{items:h}),f]})}return jsxRuntime.jsx(reactAriaComponents.Breadcrumbs,{...n,ref:a,className:tailwindMerge.twMerge("flex gap-2",c?"opacity-100":"opacity-0",o),children:t})}function GP({items:e}){let t=e.map((r,o)=>({id:`breadcrumb-${o}`,name:r.label,href:r.href}));return jsxRuntime.jsx(reactAriaComponents.Breadcrumb,{className:"flex items-center gap-2",children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(pi,{items:t,align:"left",size:"sm",children:jsxRuntime.jsx(te,{variant:"icon",size:"sm",icon:"DotsThree","aria-label":"Show hidden breadcrumbs",className:"px-0.5"})}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 text-text-secondary"})]})})}function sc(e){let{className:t,children:r,href:o,copyable:n,copyValue:a,...i}=e;return jsxRuntime.jsx(reactAriaComponents.Breadcrumb,{className:Fe(t,"flex items-center gap-2"),...i,children:s=>{let d=s.isCurrent,c=typeof r=="function"?r(s):r;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:d?n?jsxRuntime.jsx(In,{value:a||(typeof c=="string"?c:void 0),size:"sm",iconPosition:"right",children:jsxRuntime.jsx("span",{className:"max-w-[200px] truncate font-semibold text-text-primary sm:max-w-none",children:c})}):jsxRuntime.jsx("span",{className:"max-w-[200px] truncate font-semibold text-text-primary sm:max-w-none",children:c}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(St,{variant:"muted",href:o,className:"max-w-[150px] truncate sm:max-w-[300px] md:max-w-none",children:c}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 shrink-0 text-text-secondary"})]})})}})}function QP({isSelected:e,isDisabled:t}){let r=[pt,"w-9 h-9 text-sm cursor-default rounded-sm flex items-center justify-center forced-color-adjust-none font-semibold"];return t?r.push("text-text-disabled forced-colors:text-[GrayText]"):e?r.push("bg-action-default text-text-inverse invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):r.push("text-text-primary hover:bg-background-hover pressed:bg-background-selected"),r.join(" ")}function xi({errorMessage:e,...t}){return jsxRuntime.jsxs(reactAriaComponents.Calendar,{...t,children:[jsxRuntime.jsx(lc,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(cc,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:r=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:r,className:({isSelected:o,isDisabled:n})=>`${QP({isSelected:o,isDisabled:n})} border-0`})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-feedback-error-text",children:e})]})}function lc(){let{direction:e}=reactAriaComponents.useLocale(),t=18;return jsxRuntime.jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsxRuntime.jsx(te,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsxRuntime.jsx(W,{name:"CaretRight","aria-hidden":true,size:t}):jsxRuntime.jsx(W,{name:"CaretLeft","aria-hidden":true,size:t})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-text-primary"}),jsxRuntime.jsx(te,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsxRuntime.jsx(W,{name:"CaretLeft","aria-hidden":true,size:t}):jsxRuntime.jsx(W,{name:"CaretRight","aria-hidden":true,size:t})})]})}function cc(){return jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:e=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:"text-xs font-semibold text-text-secondary",children:e})})}var Mb=ot__namespace.createContext(null);function Fn(){let e=ot__namespace.useContext(Mb);if(!e)throw new Error("Carousel components must be used within a CarouselRoot");return e}function Eb({page:e,defaultPage:t=0,onPageChange:r,orientation:o="horizontal",loop:n=false,autoplay:a=false,autoplayDelay:i=4e3,allowMouseDrag:s=false,spacing:d="1rem",slidesPerView:c=1,slidesPerMove:l=1,className:u,children:m,...p}){let g=e!==void 0,[f,h]=ot__namespace.useState(t),b=g?e:f,v=ot__namespace.useRef(null),[x,C]=ot__namespace.useState(0),[w,S]=ot__namespace.useState(typeof a=="boolean"?a:!!a),[T,N]=ot__namespace.useState(false),k=ot__namespace.useRef(null),R=ot__namespace.useRef(null),L=typeof a=="object"&&a!==null&&a.delay?a.delay:i;ot__namespace.useEffect(()=>{if(v.current){let y=Math.max(1,Math.floor(Number(c)||1)),M=v.current.children;if(M.length===0){C(0);return}let P=Math.ceil(M.length/y);C(P);}},[m,c]);let E=ot__namespace.useRef(-1);ot__namespace.useEffect(()=>{if(b!==E.current&&v.current){let y=Array.from(v.current.children);if(y.length===0)return;let M=b*c,P=Math.min(M,y.length-1),X=y[P];X&&typeof X.scrollIntoView=="function"&&(X.scrollIntoView({behavior:"smooth",block:o==="vertical"?"start":"nearest",inline:o==="horizontal"?"start":"nearest"}),E.current=b);}},[b,c,o]);let B=ot__namespace.useCallback(y=>{let M=y;n?M<0?M=x-1:M>=x&&(M=0):M=Math.max(0,Math.min(y,x-1)),g||h(M),r?.(M);},[g,n,r,x]),A=ot__namespace.useCallback(()=>{B(b+l);},[b,B,l]),H=ot__namespace.useCallback(()=>{B(b-l);},[b,B,l]),Y=ot__namespace.useRef(A);ot__namespace.useEffect(()=>{Y.current=A;},[A]);let G=x>0&&(n||b<x-1),I=x>0&&(n||b>0),F=ot__namespace.useCallback(()=>{S(y=>!y);},[]);ot__namespace.useEffect(()=>{if(w&&x>1)return k.current=setInterval(()=>{Y.current();},L),()=>{k.current&&(clearInterval(k.current),k.current=null);}},[w,x,L]);let O=ot__namespace.useCallback(()=>{k.current&&(clearInterval(k.current),k.current=null);},[]),U=ot__namespace.useCallback(()=>{w&&x>1&&(k.current=setInterval(()=>{Y.current();},L));},[w,x,L]),K=ot__namespace.useCallback(y=>{if(!s)return;N(true);let M="touches"in y&&y.touches&&y.touches.length>0?y.touches[0].clientX:"clientX"in y?y.clientX:0,P="touches"in y&&y.touches&&y.touches.length>0?y.touches[0].clientY:"clientY"in y?y.clientY:0;R.current={x:M,y:P};},[s]),z=ot__namespace.useCallback(y=>{if(!T||!R.current)return;let M="touches"in y&&y.touches&&y.touches.length>0?y.touches[0].clientX:"clientX"in y?y.clientX:0,P="touches"in y&&y.touches&&y.touches.length>0?y.touches[0].clientY:"clientY"in y?y.clientY:0,X=M-R.current.x,$=P-R.current.y,oe=50;o==="horizontal"&&Math.abs(X)>oe?(X>0?H():A(),N(false),R.current=null):o==="vertical"&&Math.abs($)>oe&&($>0?H():A(),N(false),R.current=null);},[T,o,A,H]),V=ot__namespace.useCallback(()=>{N(false),R.current=null;},[]),D={currentPage:b,totalPages:x,orientation:o,loop:n,spacing:d,slidesPerView:c,goToPage:B,goToNext:A,goToPrev:H,canGoNext:G,canGoPrev:I,isAutoplayActive:w,toggleAutoplay:F,itemsRef:v,isDragging:T,allowMouseDrag:s,handleDragStart:K,handleDragMove:z,handleDragEnd:V};return jsxRuntime.jsx(Mb.Provider,{value:D,children:jsxRuntime.jsx("div",{...p,className:tailwindMerge.twMerge("relative w-full",o==="vertical"?"h-full":"",u),onMouseEnter:O,onMouseLeave:U,children:m})})}function Lb({className:e,children:t,...r}){let{itemsRef:o,orientation:n,spacing:a,isDragging:i,allowMouseDrag:s,handleDragStart:d,handleDragMove:c,handleDragEnd:l}=Fn();return jsxRuntime.jsx("div",{ref:o,...r,className:tailwindMerge.twMerge("flex overflow-x-auto overflow-y-hidden snap-x snap-mandatory scrollbar-hide scroll-smooth",n==="vertical"&&"flex-col overflow-y-auto overflow-x-hidden snap-y",s&&i&&"cursor-grabbing select-none",s&&!i&&"cursor-grab",e),style:{gap:a,"--carousel-spacing":a,...r.style},onMouseDown:d,onMouseMove:c,onMouseUp:l,onMouseLeave:l,onTouchStart:d,onTouchMove:c,onTouchEnd:l,children:t})}function Db({index:e,className:t,children:r,...o}){let{orientation:n,slidesPerView:a}=Fn();return jsxRuntime.jsx("div",{...o,"data-index":e,className:tailwindMerge.twMerge("shrink-0 snap-start",n==="horizontal"?"h-full":"w-full",t),style:{width:n==="horizontal"?`calc((100% - (${a-1} * var(--carousel-spacing, 1rem))) / ${a})`:void 0,height:n==="vertical"?`calc((100% - (${a-1} * var(--carousel-spacing, 1rem))) / ${a})`:void 0,...o.style},children:r})}function Ab({className:e,children:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("flex items-center justify-center gap-4 mt-4",e),children:t})}function Ib({className:e,children:t,...r}){let{goToPrev:o,canGoPrev:n}=Fn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{o(),r.onClick?.(a);},disabled:!n||r.disabled,"aria-label":"Previous slide",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(W,{name:"CaretLeft",size:"sm"})})}function Fb({className:e,children:t,...r}){let{goToNext:o,canGoNext:n}=Fn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{o(),r.onClick?.(a);},disabled:!n||r.disabled,"aria-label":"Next slide",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(W,{name:"CaretRight",size:"sm"})})}function qp({index:e,className:t,children:r,...o}){let{currentPage:n,goToPage:a}=Fn(),i=n===e;return jsxRuntime.jsx("button",{type:"button",...o,onClick:s=>{a(e),o.onClick?.(s);},"aria-label":`Go to slide ${e+1}`,"aria-current":i,className:tailwindMerge.twMerge("h-2 rounded-full transition-all duration-200",i?"w-6 bg-action-brand":"w-2 bg-border-muted hover:bg-border-input","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",t),children:r})}function Bb({className:e,...t}){let{totalPages:r}=Fn();return jsxRuntime.jsx("div",{...t,className:tailwindMerge.twMerge("flex items-center gap-2",e),role:"group","aria-label":"Carousel indicators",children:Array.from({length:r},(o,n)=>jsxRuntime.jsx(qp,{index:n},n))})}function Vb({className:e,children:t,...r}){let{isAutoplayActive:o,toggleAutoplay:n}=Fn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{n(),r.onClick?.(a);},"aria-label":o?"Pause autoplay":"Start autoplay",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(W,{name:o?"Pause":"Play",size:"sm"})})}function Ob({className:e,...t}){let{currentPage:r,totalPages:o}=Fn();return jsxRuntime.jsxs("div",{...t,className:tailwindMerge.twMerge("text-sm text-text-secondary tabular-nums",e),"aria-live":"polite","aria-atomic":"true",children:[r+1," / ",o]})}var n1="focus:ring-action-primary",a1="bg-action-primary border-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover hover:border-action-primary-hover";function Zp(e){return jsxRuntime.jsxs(reactAriaComponents.CheckboxGroup,{...e,className:Fe(e.className,"flex flex-col gap-2"),children:[jsxRuntime.jsx(et,{children:e.label}),e.children,e.description&&jsxRuntime.jsx(Ee,{children:e.description}),jsxRuntime.jsx(ye,{children:typeof e.errorMessage=="function"?void 0:e.errorMessage})]})}function i1({isDisabled:e}){return `relative flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-secondary"}`}function s1({isSelected:e,isInvalid:t,isDisabled:r,isIndeterminate:o}){let n="w-5 h-5 flex-shrink-0 rounded-[var(--control-border-radius)] flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2",a=n1,i="";return r?i="border-border-muted bg-background-muted":t?i="border-feedback-error-border bg-feedback-error-background":e||o?i=a1:i="bg-background-input border-border-input hover:border-border-focus",`${n} ${a} ${i}`}var zb="w-4 h-4 text-current group-disabled:text-text-disabled";function Qp({className:e,...t}){return jsxRuntime.jsx("div",{"aria-hidden":"true",className:`${s1(t)} ${e||""}`,children:t.isIndeterminate?jsxRuntime.jsx(lucideReact.Minus,{"aria-hidden":true,className:zb}):t.isSelected?jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":true,className:zb}):null})}function wo(e){let{children:t,variant:r,...o}=e;return jsxRuntime.jsx(reactAriaComponents.Checkbox,{...o,className:reactAriaComponents.composeRenderProps(e.className,(n,a)=>`${i1(a)} ${n||""}`),children:n=>{let{isSelected:a,isIndeterminate:i,isDisabled:s,isInvalid:d}=n;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Qp,{isSelected:a,isIndeterminate:i,isDisabled:s,isInvalid:d}),typeof t=="function"?t(n):t]})}})}var d1={primary:"bg-action-primary/10 text-action-primary border border-action-primary/20 hover:bg-action-primary/15",secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border border-border-muted hover:bg-action-secondary-hover",info:"bg-feedback-info-background text-feedback-info-text border border-feedback-info-border hover:bg-feedback-info-background/80"};function Gb(e){return !e||e==="default"?"secondary":e==="brand"?"primary":e}var u1={xs:"px-1.5 py-[2px] gap-0.5",sm:"px-2 py-1 gap-1",md:"px-3 py-1.5 gap-1.5",lg:"px-3 py-2 gap-2",xl:"px-4 py-2.5 gap-2"},p1="opacity-75 cursor-not-allowed pointer-events-none";function Wb(e){let{variant:t,size:r,isDisabled:o,isClickable:n,className:a}=e,i=r==="xs"?"text-xs":_e[r].text;return tailwindMerge.twMerge("inline-flex items-center justify-center rounded-full font-medium transition-colors","whitespace-nowrap select-none",u1[r],i,d1[t],n&&!o&&"cursor-pointer",o&&p1,a)}function co({children:e,onRemove:t,removeLabel:r="Remove",size:o="md",variant:n="secondary",isRemovable:a=true,isDisabled:i=false,className:s,onClick:d}){let c=!!d&&!i,l=a&&t&&!i,u=h=>{h.stopPropagation(),h.preventDefault(),t&&!i&&t();},m=()=>{d&&!i&&d();},p=o==="xs"?10:o==="sm"?12:o==="md"?14:16,f=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"truncate",children:e}),l?c?jsxRuntime.jsx("span",{onClick:u,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),u(h));},role:"button",tabIndex:0,className:"flex-shrink-0 rounded-full p-0.5 hover:bg-text-primary/10 transition-colors cursor-pointer","aria-label":r,title:r,children:jsxRuntime.jsx(W,{name:"X",size:p,className:"text-current opacity-70 hover:opacity-100"})}):jsxRuntime.jsx("button",{type:"button",onClick:u,className:"flex-shrink-0 rounded-full p-0.5 hover:bg-text-primary/10 transition-colors cursor-pointer","aria-label":r,title:r,tabIndex:-1,children:jsxRuntime.jsx(W,{name:"X",size:p,className:"text-current opacity-70 hover:opacity-100"})}):null]});return c?jsxRuntime.jsx("button",{type:"button",onClick:m,className:Wb({variant:Gb(n),size:o,isDisabled:i,isClickable:c,className:s}),disabled:i,children:f}):jsxRuntime.jsx("span",{className:Wb({variant:Gb(n),size:o,isDisabled:i,isClickable:c,className:s}),children:f})}function Yb({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a=false,isDisabled:i=false,isInvalid:s=false,validationResult:d,placeholder:c="Add items...",selectedItems:l=[],onItemsChange:u,staticItems:m,fetchSuggestions:p,chipVariant:g="secondary",showErrors:f=true,className:h}){let[b,v]=ot.useState(""),[x,C]=ot.useState([]),[w,S]=ot.useState(false),[T,N]=ot.useState(false),[k,R]=ot.useState(-1),L=Dn(b,300),E=ot.useRef(null),B=ot.useRef(null),{isFocused:A,handleFocus:H,handleBlur:Y}=Dr(),G=ot.useId(),I=ot.useCallback(D=>{if(!u||!D.trim())return;let y=D.trim();if(l.includes(y)){v(""),N(false),C([]),R(-1);return}u([...l,y]),v(""),N(false),C([]),R(-1),E.current?.focus();},[l,u]),F=ot.useCallback(D=>{u&&u(l.filter(y=>y!==D));},[l,u]);ot.useEffect(()=>{if(!p)return;let D=true;return (async()=>{let M=L.trim();if(!M){D&&(S(false),C([]),N(false));return}S(true);try{let P=await p(M);if(!D)return;C(P),N(!0);}catch(P){if(!D)return;console.error("Error fetching suggestions:",P),C([]),N(false);}finally{D&&S(false);}})(),()=>{D=false;}},[L,p]),ot.useEffect(()=>{if(p||!m)return;if(!L.trim()){C([]),N(false);return}let D=m.filter(y=>y.name.toLowerCase().includes(L.toLowerCase())).map(y=>y.id);C(D),N(D.length>0||L.trim().length>0);},[L,m,p]);let O=ot.useMemo(()=>{let D=x.filter(y=>!l.includes(y));return b.trim()&&!D.includes(b.trim())&&!l.includes(b.trim())?[...D,`Create tag: "${b.trim()}"`]:D},[x,b,l]),U=ot.useCallback(D=>{v(D.target.value),R(-1),D.target.value&&N(true);},[]),K=ot.useCallback(D=>{i||(D.startsWith("Create tag:")?I(b):I(D));},[I,b,i]),z=ot.useCallback(D=>{if(!i)switch(D.key){case "Enter":case ",":if(D.preventDefault(),k>=0&&k<O.length){let y=O[k];y.startsWith("Create tag:")?I(b):I(y);}else b.trim()&&I(b.trim());break;case "Backspace":!b&&l.length>0&&(D.preventDefault(),F(l[l.length-1]));break;case "ArrowDown":D.preventDefault(),T&&R(y=>y<O.length-1?y+1:y);break;case "ArrowUp":D.preventDefault(),T&&R(y=>y>0?y-1:-1);break;case "Escape":N(false),R(-1);break}},[i,b,l,O,k,T,I,F]);ot.useEffect(()=>{let D=y=>{B.current&&y.target instanceof Node&&!B.current.contains(y.target)&&N(false);};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);let V=()=>tailwindMerge.twMerge("flex items-center gap-1.5 rounded-md overflow-x-auto overflow-y-hidden","[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",An({isInvalid:s,isDisabled:i,isFocused:A}),"bg-background-input",o==="sm"&&"px-2 py-1 h-[32px]",o==="md"&&"px-2.5 py-1.5 h-[40px]",o==="lg"&&"px-3 py-2 h-[44px]",o==="xl"&&"px-3.5 py-2.5 h-[48px]",i&&"opacity-50 cursor-not-allowed bg-background-muted");return jsxRuntime.jsxs("div",{ref:B,className:tailwindMerge.twMerge("relative flex flex-col gap-1",h),children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsxs("div",{className:V(),onClick:()=>!i&&E.current?.focus(),children:[l.map(D=>jsxRuntime.jsx(co,{variant:g,size:"xs",onRemove:()=>F(D),isDisabled:i,className:"shrink-0 max-h-full",children:D},D)),jsxRuntime.jsx("input",{ref:E,type:"text",role:"combobox","aria-expanded":T,"aria-haspopup":"listbox","aria-controls":G,"aria-autocomplete":"list",value:b,onChange:U,onKeyDown:z,onFocus:D=>H(D),onBlur:D=>Y(D),placeholder:l.length===0?c:"",disabled:i,className:"flex-1 min-w-[120px] h-full !border-0 !outline-none !ring-0 bg-transparent text-text-primary text-sm placeholder:text-text-disabled disabled:cursor-not-allowed focus:!ring-0 focus:!outline-none focus:!border-0 focus-visible:!ring-0 focus-visible:!outline-none focus-visible:!border-0",style:{boxShadow:"none",WebkitAppearance:"none",appearance:"none",border:"none",outline:"none"}})]})}),T&&(b||O.length>0)&&jsxRuntime.jsx("div",{id:G,role:"listbox",className:tailwindMerge.twMerge("absolute z-50 mt-1 rounded-lg border border-border-default","max-h-60 overflow-auto bg-background-surface shadow-lg","left-0 right-0 top-full"),children:w?jsxRuntime.jsx("div",{className:"px-3 py-2 text-sm text-text-secondary",children:"Loading..."}):O.length>0?O.map((D,y)=>jsxRuntime.jsx("div",{role:"option","aria-selected":y===k,className:tailwindMerge.twMerge("cursor-pointer px-3 py-2 text-sm transition-colors","hover:bg-background-hover",y===k&&"bg-background-selected",D.startsWith("Create tag:")&&"italic text-text-secondary"),onClick:()=>K(D),children:D},D)):b&&jsxRuntime.jsx("div",{className:"px-3 py-2 text-sm text-text-secondary",children:"No suggestions found"})}),t&&jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}),f&&typeof r=="string"&&jsxRuntime.jsx(ye,{size:o,className:"text-feedback-error-text mt-1",children:r}),f&&typeof r=="function"&&d&&jsxRuntime.jsx(ye,{size:o,className:"text-feedback-error-text mt-1",children:r(d)})]})}var S1={json:()=>import('ace-builds/src-noconflict/mode-json'),javascript:()=>import('ace-builds/src-noconflict/mode-javascript'),typescript:()=>import('ace-builds/src-noconflict/mode-typescript'),html:()=>import('ace-builds/src-noconflict/mode-html'),css:()=>import('ace-builds/src-noconflict/mode-css'),markdown:()=>import('ace-builds/src-noconflict/mode-markdown'),yaml:()=>import('ace-builds/src-noconflict/mode-yaml'),xml:()=>import('ace-builds/src-noconflict/mode-xml'),python:()=>import('ace-builds/src-noconflict/mode-python'),sql:()=>import('ace-builds/src-noconflict/mode-sql')},w1={github:()=>import('ace-builds/src-noconflict/theme-github'),github_dark:()=>import('ace-builds/src-noconflict/theme-github_dark')},T1={"ext-language-tools":()=>import('ace-builds/src-noconflict/ext-language_tools')},ys=new Set;async function $p(e,t){ys.has(e)||(await t(),ys.add(e));}async function N1(e,t,r){await Promise.all([$p(`language:${e}`,S1[e]),$p(`theme:${t}`,w1[t]),r?$p("extension:language-tools",T1["ext-language-tools"]):void 0]);}function Jb(e,t,r){let o=ys.has(`language:${e}`)&&ys.has(`theme:${t}`);return r?o&&ys.has("extension:language-tools"):o}function jb({value:e,readOnly:t=false,onChange:r,language:o="json",theme:n="github_dark",height:a,width:i="100%",className:s,lineHeight:d=19,minLines:c=3,maxLines:l=50,showLineNumbers:u=true,showGutter:m=true,fontSize:p=14,wrapEnabled:g=false}){let f=ot.useRef(null),[h,b]=ot.useState(()=>Jb(o,n,!t)),v=ot.useMemo(()=>{if(a)return a;let x=(e.match(/\n/g)||[]).length+1;return `${Math.max(c,Math.min(x,l))*d+10}px`},[e,a,d,c,l]);return ot.useEffect(()=>{let x=false,C=!t;return Jb(o,n,C)?(b(true),()=>{x=true;}):(b(false),N1(o,n,C).then(()=>{x||b(true);}).catch(w=>{x||b(true),console.error("Failed to load Ace editor resources",w);}),()=>{x=true;})},[o,t,n]),ot.useEffect(()=>{h&&f.current?.editor&&f.current.editor.resize();},[v,h]),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden rounded-md border border-border-input",s),style:{width:i,height:v},children:h?jsxRuntime.jsx(v1__default.default,{ref:f,mode:o,theme:n,value:e,onChange:r,readOnly:t,width:"100%",height:"100%",fontSize:p,showPrintMargin:false,showGutter:m,highlightActiveLine:!t,setOptions:{useWorker:true,showLineNumbers:u,tabSize:2,enableBasicAutocompletion:!t,enableLiveAutocompletion:!t,enableSnippets:!t,showFoldWidgets:true,wrap:g},editorProps:{$blockScrolling:true}}):jsxRuntime.jsx("div",{className:"flex h-full w-full items-center justify-center bg-surface-muted text-foreground-muted",children:"Loading editor\u2026"})})}var Zb=ot__namespace.createContext({variant:"contained",density:"comfortable",showDividers:true}),Qb=ot__namespace.createContext(null),E1={contained:"rounded-lg border border-border-default bg-background-surface overflow-hidden",bordered:"rounded-lg border border-border-default bg-background-surface",plain:"bg-transparent"},qb={true:"divide-y divide-border-default",false:"gap-3"},L1={comfortable:"px-5 py-3",compact:"px-4 py-2.5"},D1={comfortable:"px-5 pt-0",compact:"px-4 pt-0"},A1={comfortable:"h-4 w-4",compact:"h-3.5 w-3.5"};function om(){return ot__namespace.useContext(Zb)}function I1(e){let t=ot__namespace.useContext(Qb);if(!t)throw new Error(`${e} must be used within a <CollapseItem>`);return t}function F1({variant:e,showDividers:t,className:r}){let o="group/collapse-item w-full transition-colors",n={contained:"bg-background-surface",bordered:"bg-background-surface",plain:"bg-transparent"},a=t?"":"rounded-lg border border-border-default bg-background-surface overflow-hidden";return tailwindMerge.twMerge(o,n[e],a,r)}function B1({isDisabled:e,isPressed:t,density:r,variant:o,showDividers:n,className:a}){let i="group/collapse-header flex w-full items-start gap-4 text-left transition-colors duration-150",s=e?"cursor-not-allowed text-text-disabled":"cursor-pointer text-text-primary",d=t&&!e?"bg-background-hover":"",c=L1[r];return tailwindMerge.twMerge(i,pt(),c,s,d,o==="plain"&&n?"px-0":"",a)}function V1({density:e,variant:t,showDividers:r,className:o}){let n="text-text-primary",a=D1[e];return tailwindMerge.twMerge(n,a,r?"":"rounded-b-lg",t==="plain"&&r?"px-0":"",o)}function yi({variant:e="contained",density:t="comfortable",showDividers:r=true,className:o,...n}){let a=ot__namespace.useMemo(()=>({variant:e,density:t,showDividers:r}),[e,t,r]),i=tailwindMerge.twMerge("flex w-full flex-col",E1[e],r?qb.true:qb.false,e==="plain"&&r?"border-y border-border-default/60":"");return jsxRuntime.jsx(Zb.Provider,{value:a,children:jsxRuntime.jsx(reactAriaComponents.DisclosureGroup,{...n,className:Fe(o,i)})})}function On({className:e,children:t,...r}){let{variant:o,showDividers:n}=om();return jsxRuntime.jsx(reactAriaComponents.Disclosure,{...r,className:reactAriaComponents.composeRenderProps(e,a=>F1({variant:o,showDividers:n,className:a})),children:a=>jsxRuntime.jsx(Qb.Provider,{value:a,children:t})})}On.displayName="CollapseItem";function zn({title:e,description:t,startContent:r,endContent:o,indicator:n,indicatorPosition:a="end",showIndicator:i=true,keepIndicatorSpace:s=false,children:d,className:c,...l}){let u=I1("CollapseHeader"),{density:m,variant:p,showDividers:g}=om(),f=A1[m];return jsxRuntime.jsx(reactAriaComponents.Button,{...l,slot:"trigger","data-expanded":u.isExpanded?"true":void 0,className:reactAriaComponents.composeRenderProps(c,(h,b)=>B1({isDisabled:b.isDisabled??false,isPressed:b.isPressed??false,density:m,variant:p,showDividers:g,className:h})),children:h=>{let b=h.isDisabled??false,v=i?typeof n=="function"?n({isExpanded:u.isExpanded,isDisabled:b}):n??jsxRuntime.jsx(W,{name:"CaretDown",size:m==="compact"?"xs":"sm",weight:"bold","aria-hidden":"true",className:tailwindMerge.twMerge("text-text-secondary transition-transform duration-200",u.isExpanded?"rotate-180":"rotate-0")}):null,x=v?jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex flex-shrink-0 items-center justify-center text-text-secondary",f),"aria-hidden":"true",children:v}):s?jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex flex-shrink-0 items-center justify-center",f),"aria-hidden":"true"}):null;return jsxRuntime.jsxs("div",{className:"flex w-full items-center gap-4",children:[a==="start"&&x,r&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center text-text-secondary",children:r}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[d??jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1 text-left",children:[e&&jsxRuntime.jsx("span",{className:"truncate font-medium text-text-primary",children:e}),t&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:t})]}),o&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center text-sm text-text-secondary",children:o})]}),a==="end"&&x]})}})}zn.displayName="CollapseHeader";function Hn({className:e,children:t,...r}){let{density:o,variant:n,showDividers:a}=om();return jsxRuntime.jsx(reactAriaComponents.DisclosurePanel,{...r,className:reactAriaComponents.composeRenderProps(e,i=>V1({density:o,variant:n,showDividers:a,className:i})),children:jsxRuntime.jsx(Mn,{children:t})})}Hn.displayName="CollapseContent";function vi(e){if(!e)return false;let t=e.startsWith("#")?e.slice(1):e;return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(t)}function am(e){if(!e)return "";let t=e.startsWith("#")?e.slice(1):e;return t.length===3&&(t=t.split("").map(r=>r+r).join("")),`#${t.toUpperCase()}`}function G1({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,className:s,validationResult:d,value:c,defaultValue:l,onChange:u,placeholder:m="#000000",showColorSwatch:p=true,reserveErrorSpace:g=true,...f}){let[h,b]=ot.useState(l||""),[v,x]=ot.useState(c||l||""),[C,w]=ot.useState(false),[S,T]=ot.useState(null),{isFocused:N,handleFocus:k,handleBlur:R}=Dr(),L=c!==void 0?c:h;ot.useEffect(()=>{c!==void 0&&x(c);},[c]);let E=L?!vi(L):false,B=ot.useCallback(Y=>{if(x(Y),vi(Y)){let G=am(Y);u?u(G):b(G);}else Y===""&&(u?u(""):b(""));},[u]),A=ot.useCallback(Y=>{let G=am(Y);x(G),u?u(G):b(G);},[u]),H=ot.useCallback(Y=>{if(vi(v)){let G=am(v);x(G),u&&G!==L?u(G):!u&&G!==h&&b(G);}R(Y,f.onBlur);},[v,L,h,u,R,f.onBlur]);return jsxRuntime.jsx(reactAriaComponents.TextField,{...f,isRequired:a,className:Fe(s,"group flex flex-col"),children:({isDisabled:Y})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 relative",children:[jsxRuntime.jsx(ec,{size:o,disabled:Y,type:"text",value:v,placeholder:m,onFocus:G=>k(G,f.onFocus),onBlur:H,onChange:G=>B(G.target.value),className:tailwindMerge.twMerge(rr({isInvalid:E,isDisabled:Y,isFocused:N,size:o,transparent:i}),p?"pr-12":"pr-3","pl-3")}),p&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none",style:{width:_e[o].height},children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-6 h-6 rounded border shadow-sm",vi(L)?"border-border-default":"border-border-default bg-background-muted"),style:vi(L)?{backgroundColor:L}:void 0,"aria-hidden":"true",children:!vi(L)&&jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full border-2 border-border-muted"})})})})]}),jsxRuntime.jsx("div",{ref:T,children:jsxRuntime.jsx(te,{variant:"secondary",size:o,icon:"Palette",onPress:()=>w(!C),isDisabled:Y,className:"flex-shrink-0",children:"Pick"})})]})}),g?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&d?jsxRuntime.jsx(ye,{size:o,children:r(d)}):t?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&d?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(d)}):t?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null}),C&&S&&jsxRuntime.jsx(Et,{triggerRef:{current:S},isOpen:C,onOpenChange:w,placement:"bottom end",className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-lg p-4",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:L||"#000000",onChange:A,style:{width:"200px",height:"200px"}}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded border border-border-default shadow-sm flex-shrink-0",style:{backgroundColor:L||"#000000"}}),jsxRuntime.jsx("div",{className:"flex-1 text-text-primary text-[length:var(--control-text-sm)] font-mono",children:L||"#000000"})]})]})})]})})}function ex({isOpen:e,onClose:t,onConfirm:r,title:o,message:n,confirmLabel:a="Confirm",cancelLabel:i="Cancel",confirmVariant:s,isDestructive:d=false,isLoading:c=false,maxWidth:l="500px",minWidth:u="400px"}){return jsxRuntime.jsx(Lr,{isOpen:e,onClose:t,title:o,maxWidth:l,minWidth:u,primaryAction:{label:a,onPress:()=>{r();},variant:s??(d?"destructive":"primary"),isLoading:c},secondaryAction:{label:i,onPress:t,variant:"secondary",isDisabled:c},children:jsxRuntime.jsx("div",{className:"text-text-primary",children:n})})}function tx({isConnected:e,connectedAt:t,disconnectedAt:r,showTimestamp:o=false,isLoading:n,size:a="sm",shape:i="pill",...s}){if(n)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-24"});let d=e?"Connected":"Disconnected",c=e?"success":"neutral",l=null;if(o){if(e&&t)l=Ll(t);else if(!e&&r){let u=Ll(r);l=u?`Offline ${u}`:null;}}return jsxRuntime.jsxs("div",{className:"inline-flex flex-col gap-1",children:[jsxRuntime.jsx(kt,{variant:c,size:a,shape:i,dot:e,dotPulse:e,...s,children:d}),l&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:l})]})}function rx({firstName:e,lastName:t,email:r,phone:o,avatarUrl:n,href:a,LinkComponent:i,variant:s="outlined",layout:d="horizontal",showEmail:c=true,showPhone:l=false,isLoading:u=false,className:m,contentClassName:p,piiEntity:g}){let f=`${e} ${t}`.trim(),h=({children:v,className:x})=>a?i?jsxRuntime.jsx(i,{href:a,className:x,children:v}):jsxRuntime.jsx(St,{href:a,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",x),asButton:false,children:v}):jsxRuntime.jsx("span",{className:x,children:v}),b=d==="vertical";return u?jsxRuntime.jsx(at,{variant:s,className:tailwindMerge.twMerge("flex flex-col",m),children:jsxRuntime.jsx(at.Content,{className:"flex items-center flex-1",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",b?"flex flex-col items-center gap-4":"flex items-center gap-4"),children:[jsxRuntime.jsx(q,{width:56,height:56,className:"rounded flex-shrink-0"}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(b?"w-full text-center":"flex-1","space-y-2"),children:[jsxRuntime.jsx(q,{width:"70%",height:20,className:tailwindMerge.twMerge(b&&"mx-auto")}),jsxRuntime.jsx(q,{width:"100%",height:16,className:tailwindMerge.twMerge(b&&"mx-auto")})]})]})})}):jsxRuntime.jsx(at,{variant:s,className:tailwindMerge.twMerge("group/card flex flex-col",m),children:jsxRuntime.jsx(at.Content,{className:tailwindMerge.twMerge("flex items-center flex-1",a&&"cursor-pointer",p),children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative w-full",b?"flex flex-col items-center gap-4 text-center":"flex items-center gap-4"),children:[jsxRuntime.jsx(sn,{firstName:e,lastName:t,src:n,size:"xl",variant:"user",shape:"square",className:"flex-shrink-0",piiEntity:g}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(b?"w-full":"flex-1 min-w-0"),children:[a&&jsxRuntime.jsx(h,{className:"after:absolute after:inset-0",children:jsxRuntime.jsx("span",{className:"sr-only",children:f})}),jsxRuntime.jsx("span",{className:"text-lg font-semibold leading-tight text-text-primary block mb-1.5 group-hover/card:text-text-brand transition-colors","data-pii-type":g?"full-name":void 0,"data-pii-entity":g,children:f}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("space-y-0.5",b&&"flex flex-col items-center"),children:[c&&r&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2.5 text-text-primary",children:[jsxRuntime.jsx(W,{name:"Envelope",size:16,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(St,{href:`mailto:${r}`,variant:"unstyled",className:tailwindMerge.twMerge("text-sm leading-relaxed text-text-primary relative z-20",b?"":"truncate"),"data-pii-type":g?"email":void 0,"data-pii-entity":g,children:r})]}),l&&o&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2.5 text-text-primary",children:[jsxRuntime.jsx(W,{name:"Phone",size:16,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(St,{href:`tel:${o}`,variant:"unstyled",className:tailwindMerge.twMerge("text-sm leading-relaxed text-text-primary relative z-20",b?"":"truncate"),"data-pii-type":g?"phone":void 0,"data-pii-entity":g,children:ai(o)})]})]})]})]})})})}function pc({firstName:e,lastName:t,email:r,avatarUrl:o,layout:n="stacked",size:a="md",href:i,LinkComponent:s,linkVariant:d="unstyled",emphasis:c="normal",showEmail:l=false,badge:u,avatarShape:m,isLoading:p=false,className:g,piiEntity:f,piiPrimaryTextType:h="full-name"}){let b=m??(n==="inline"?"circle":"square"),x={xs:{avatarSize:"xs",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",skeletonAvatar:24,skeletonText:80,skeletonSecondary:60},sm:{avatarSize:"sm",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",skeletonAvatar:32,skeletonText:96,skeletonSecondary:72},md:{avatarSize:"md",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",skeletonAvatar:40,skeletonText:128,skeletonSecondary:96},lg:{avatarSize:"lg",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",skeletonAvatar:48,skeletonText:160,skeletonSecondary:120}}[a],C=`${e} ${t}`.trim(),S={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[c],T=({children:N,className:k})=>i?s?jsxRuntime.jsx(s,{href:i,className:k,children:N}):jsxRuntime.jsx(St,{href:i,variant:d,className:tailwindMerge.twMerge("hover:underline",k),asButton:false,children:N}):jsxRuntime.jsx("span",{className:k,children:N});return p?n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",x.gap,g),children:[jsxRuntime.jsx(q,{width:x.skeletonAvatar,height:x.skeletonAvatar,className:"flex-shrink-0 rounded-full"}),jsxRuntime.jsx(q,{width:x.skeletonText,height:x.skeletonAvatar*.5})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",x.gap,g),children:[jsxRuntime.jsx(q,{width:x.skeletonAvatar,height:x.skeletonAvatar,className:"flex-shrink-0 rounded-full"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(q,{width:x.skeletonText,height:16}),l&&jsxRuntime.jsx(q,{width:x.skeletonSecondary,height:12})]})]}):n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",x.gap,g),children:[jsxRuntime.jsxs(T,{className:tailwindMerge.twMerge("flex items-center",x.gap),children:[jsxRuntime.jsx(sn,{firstName:e,lastName:t,src:o,size:x.avatarSize,variant:"user",shape:b,className:"flex-shrink-0",piiEntity:f}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",S,x.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),"data-pii-type":f?h:void 0,"data-pii-entity":f,children:C})]}),u]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",x.gap,g),children:[jsxRuntime.jsx(sn,{firstName:e,lastName:t,src:o,size:x.avatarSize,variant:"user",shape:b,className:"flex-shrink-0",piiEntity:f}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(T,{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",S,x.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?h:void 0,"data-pii-entity":f,children:C})}),u]}),l&&r&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary leading-normal truncate",x.secondaryTextSize),"data-pii-type":f?"email":void 0,"data-pii-entity":f,children:r})]})]})}var sm=ot.createContext(null);function ox(e){let t=ot.useContext(sm),r=ot.useRef(null),o=e??r,[n,a]=ot.useState(()=>t||{current:"xl",isSm:true,isMd:true,isLg:true,isXl:true,is2Xl:false,isMobile:false,isDesktop:true});return ot.useEffect(()=>{if(t){a(t);return}let i=o.current;if(!i||typeof ResizeObserver>"u")return;let s=()=>{let c=i.offsetWidth,l=c>=640,u=c>=768,m=c>=1024,p=c>=1280,g=c>=1536,f="base";g?f="2xl":p?f="xl":m?f="lg":u?f="md":l&&(f="sm"),a({current:f,isSm:l,isMd:u,isLg:m,isXl:p,is2Xl:g,isMobile:!u,isDesktop:u});};s();let d=new ResizeObserver(s);return d.observe(i),()=>d.disconnect()},[t,o]),n}function ax({children:e,className:t}){let r=ot.useRef(null),[o,n]=ot.useState({current:"base",isSm:false,isMd:false,isLg:false,isXl:false,is2Xl:false,isMobile:true,isDesktop:false});return ot.useEffect(()=>{let a=r.current;if(!a||typeof ResizeObserver>"u")return;let i=()=>{let d=a.offsetWidth,c=d>=640,l=d>=768,u=d>=1024,m=d>=1280,p=d>=1536,g="base";p?g="2xl":m?g="xl":u?g="lg":l?g="md":c&&(g="sm"),n({current:g,isSm:c,isMd:l,isLg:u,isXl:m,is2Xl:p,isMobile:!l,isDesktop:l});};i();let s=new ResizeObserver(i);return s.observe(a),()=>s.disconnect()},[]),jsxRuntime.jsx(sm.Provider,{value:o,children:jsxRuntime.jsx("div",{ref:r,className:t,style:{width:"100%"},children:e})})}var mc={duration:.5,ease:"easeInOut"},uo=ot.createContext(null);function fc(){let e=ot.useRef({played:false});return ot.useEffect(()=>{e.current.played=true;},[]),e.current}var ba=()=>{let e=ot.useContext(uo);if(!e)throw new Error("useChartContext must be used within a ChartContextProvider");return e};function gc(e,t){if(t<=0||e.length<2)return e;let r=[e[0]];for(let o=1;o<e.length;o++)e[o].xValue.getTime()-e[o-1].xValue.getTime()>t&&r.push(null),r.push(e[o]);return r}var Wn=({data:e,color:t="var(--color-viz-default)",baseline:r,fillOpacity:o=.1,showLine:n=true,maxGapMs:a,animate:i=true})=>{let s=ot.useId(),d=ot.useId(),{xScale:c,yScale:l,animationSettings:u,entrance:m}=ba(),[p]=ot__namespace.default.useState(()=>m?.played!==true),g=i&&p,f=c.range(),h=l.range(),b=(N,k)=>typeof r=="function"?r(N,k):r??0,v=N=>N.chartYValue??N.yValue,x=e??[],C=a!=null?gc(x,a):x,w=i?void 0:"non-scaling-stroke",S={transformOrigin:`0 ${h[0]}px`,transformBox:"fill-box",isolation:"isolate"},T=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r===void 0?jsxRuntime.jsx(shape.AreaClosed,{data:C,x:N=>N?c(N.xValue):0,y:N=>N?l(v(N)):0,yScale:l,defined:N=>N!=null,fill:`url(#${s})`,curve:curve.curveLinear}):jsxRuntime.jsx(shape.Area,{data:C,x:N=>N?c(N.xValue):0,y0:(N,k)=>N?l(b(N,k)):0,y1:N=>N?l(v(N)):0,defined:N=>N!=null,fill:t,fillOpacity:o,curve:curve.curveLinear}),n?jsxRuntime.jsx(shape.LinePath,{data:C,x:N=>N?c(N.xValue):0,y:N=>N?l(v(N)):0,defined:N=>N!=null,stroke:t,strokeWidth:3,vectorEffect:w,curve:curve.curveLinear}):null]});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsxs("linearGradient",{id:s,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"50%",stopColor:t,stopOpacity:o}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:t,stopOpacity:0})]}),g&&jsxRuntime.jsx("clipPath",{id:d,children:jsxRuntime.jsx("rect",{x:f[0],y:h[1],width:f[1]-f[0],height:h[0]-h[1]})})]}),g?jsxRuntime.jsx("g",{clipPath:`url(#${d})`,children:jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:u.duration,ease:u.ease},style:S,children:T})}):jsxRuntime.jsx("g",{style:S,children:T})]})};var bc=({data:e,color:t="var(--color-viz-default)",opacity:r=1,categoryColors:o={}})=>{let{xScale:n,yScale:a,animationSettings:i}=ba(),s=ot.useId(),d=n.range(),c=a.range(),l=[...e??[]].sort((p,g)=>p.xValue.getTime()-g.xValue.getTime());if(l.length===0)return null;let u=l.length>1?l[1].xValue.getTime()-l[0].xValue.getTime():15*6e4,m=Math.abs(n(new Date(l[0].xValue.getTime()+u))-n(l[0].xValue));return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:s,children:jsxRuntime.jsx("rect",{x:d[0],y:c[1],width:d[1]-d[0],height:c[0]-c[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${s})`,children:jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:i.duration,ease:i.ease},style:{transformOrigin:`0 ${a(0)}px`,isolation:"isolate"},children:l.map((p,g)=>{let f=n(p.xValue),h=p.chartYValue??p.yValue,b=p.baselineValue??0,v=a(h),x=a(b),C=Math.min(v,x),w=Math.abs(v-x),S=l[g+1],T=S?Math.abs(n(S.xValue)-f):m,N=p.category&&o[p.category]?o[p.category]:t;return jsxRuntime.jsx(shape.Bar,{x:f-T/2,y:C,width:T,height:w,fill:N,opacity:r,rx:1},p.xValue.getTime())})})})]})};function pR(e,t){return e.length*(t*.6)}var xa;function mR(){if(xa!==void 0)return xa;if(typeof window>"u"||typeof document>"u")return xa=null,xa;try{xa=document.createElement("canvas").getContext("2d");}catch{xa=null;}return xa}function xc(e,t=12,r="system-ui"){let o=mR();return o?(o.font=`${t}px ${r}`,o.measureText(e).width):pR(e,t)}function cn(e,t=12,r="system-ui"){return e.length===0?0:Math.max(...e.map(o=>xc(o,t,r)))}function lx(e,t,r=12,o="system-ui"){if(t<=0)return "";if(xc(e,r,o)<=t)return e;let n="\u2026";if(xc(n,r,o)>t)return "";let a=0,i=e.length;for(;a<i;){let s=Math.ceil((a+i)/2);xc(e.slice(0,s)+n,r,o)<=t?a=s:i=s-1;}return e.slice(0,a)+n}var yc=(e,t,r)=>{if(!e.tooltipRange||e.baseline===void 0)return;let o=typeof e.baseline=="function"?e.baseline(t,r):e.baseline;return typeof o=="number"&&Number.isFinite(o)&&o!==t.yValue?o:void 0};function xR(e){return e>=1e9?"GW":e>=1e6?"MW":e>=1e3?"kW":"W"}function yR(e){return e>=1e3?"kA":e<1?"mA":"A"}function vR(e){return e>=1e3?"kV":e<1?"mV":"V"}function CR(e){return e>=1e6?"M\u03A9":e>=1e3?"k\u03A9":e<1?"m\u03A9":"\u03A9"}function Si(e,t){if(typeof e!="object"||e===null)return e;switch(e.type){case "energy":{if(e.unit||e.autoScale===false)return e;let r=e.sourceUnit?Qu[e.sourceUnit]:1;return {...e,unit:Zu(t*r)}}case "power":return e.unit||e.autoScale===false?e:{...e,unit:xR(t)};case "current":return e.unit||e.autoScale===false?e:{...e,unit:yR(t)};case "voltage":return e.unit||e.autoScale===false?e:{...e,unit:vR(t)};case "resistance":return e.unit||e.autoScale===false?e:{...e,unit:CR(t)};default:return e}}var SR=e=>e.baselineValue??0,je={top:8,right:0,bottom:50,left:60};function Or(e={type:"number"}){let t=i=>{if(i==null)return "-";let s=Fo({value:i,formatter:e});if(s===null)return "-";if(typeof s=="string")return s;if(typeof s=="number")return s.toString();if(typeof s=="object"&&s!==null&&"props"in s){let d=l=>{if(l==null)return "";if(typeof l=="string")return l;if(typeof l=="number")return l.toString();if(typeof l=="object"&&"props"in l){let u=l.props;if(u?.children)return Array.isArray(u.children)?u.children.map(d).join(""):d(u.children)}return ""};return d(s)||i.toString()}return i.toString()},r=i=>{if(i==null)return "-";if(typeof e=="string"){let s=Fo({value:i,formatter:e});return s===null?"-":String(s)}if(typeof e=="object"&&e.type)switch(e.type){case "energy":case "power":case "voltage":case "current":case "resistance":case "temperature":case "distance":return t(i);case "currency":return t(i);default:return t(i)}return t(i)},o,n,a;return typeof e=="object"&&e.type&&e.type==="number"&&("min"in e&&(o=e.min),"max"in e&&(n=e.max)),{format:t,tickFormat:r,min:o,max:n,tickInterval:a}}var cm=(e,t)=>{let r=d3Array.extent(e,o=>o.xValue);return scale.scaleTime({range:[je.left,t-je.right],domain:r,nice:true})},Cs=(e,t,r,o)=>{let n=Or(r);if(o)return scale.scaleLinear({range:[t-je.bottom,je.top],domain:o,nice:true});let a=d3Array.min(e,c=>Math.min(c.yValue,c.chartYValue??c.yValue,c.baselineValue??c.yValue))||0,i=d3Array.max(e,c=>Math.max(c.yValue,c.chartYValue??c.yValue,c.baselineValue??c.yValue))||0,s=n.min!==void 0?n.min:a>=0?0:a*1.1,d=n.max!==void 0?n.max:i<=0?0:i*1.1;return scale.scaleLinear({range:[t-je.bottom,je.top],domain:[s,d],nice:true})};function Ss(e){return e instanceof Date&&!Number.isNaN(e.getTime())}var ws=12;function wR(e,t,r=12,o=false){if(!Ss(t[0])||!Ss(t[1]))return console.warn("ChartAxis: Invalid date in domain, skipping tick calculation"),[];let n=t[0].getTime(),a=t[1].getTime(),i=a-n;if(i===0||i<1e3)return [t[0]];let s=dp({start:t[0],end:t[1]},{compact:o}),c=[t[0],new Date((t[0].getTime()+t[1].getTime())/2),t[1]].map(v=>s(v)),l=cn(c,r),m=l+l,p=Math.floor(e/m),g=Math.max(2,Math.min(8,p));if(g<=2)return [t[0],t[1]];let f=[t[0]],h=i/36e5,b;h<=1?b=6e4:h<=6?b=5*6e4:h<=48?b=60*6e4:h<=168?b=360*6e4:b=1440*6e4;for(let v=1;v<g-1;v++){let x=v/(g-1),C=n+i*x,w=Math.round(C/b)*b,S=f[f.length-1].getTime(),T=w>S?w:S+b;if(T>=a)break;f.push(new Date(T));}return f.push(t[1]),f}var TR=({top:e,scale:t,width:r})=>{let o=t.domain(),n=[o[0],o[o.length-1]],a=Ss(n[0])&&Ss(n[1]),i=r<400,s=a?n[0].getTime():0,d=a?n[1].getTime():0,c=ot.useMemo(()=>a?dp({start:n[0],end:n[1]},{compact:i}):()=>"",[s,d,i,a]),l=ot.useMemo(()=>wR(r,n,12,i),[r,s,d,i]);return l.length===0?null:jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,tickValues:l,tickFormat:u=>{let m=u;return Ss(m)?c(m):""},stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:(u,m,p)=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:m===0?"start":m===p.length-1?"end":"middle"}),rangePadding:0})};function ya(e,t=12){let r=t*2.5,o=Math.floor(e/r);return Math.max(2,Math.min(6,o))}var vc=12;function dx(e,t,r){let o=Or(t),n=o.tickFormat||o.format,a=e.ticks(r?ya(r):5).map(i=>String(n(i)));return Math.ceil(cn(a,vc,"system-ui"))+12}var NR=({left:e,scale:t,yFormatter:r,height:o,labelLeft:n})=>{let a=Or(r),i=ot.useMemo(()=>!o||o<=0?5:ya(o),[o]);return jsxRuntime.jsx(axis.Axis,{orientation:"left",left:e,scale:t,numTicks:i,tickFormat:s=>(a.tickFormat||a.format)(s),stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:s=>{let d={fill:"var(--color-text-secondary)",fontSize:vc,textAnchor:n===void 0?"end":"start",...n===void 0?{}:{x:n}},c=t(s),[l,u]=t.range(),m=Math.min(l,u),p=Math.max(l,u);return c-m<vc/2?{...d,verticalAnchor:"start"}:p-c<vc/2?{...d,verticalAnchor:"end"}:{...d,dy:"0.33em"}}})},kR=({top:e,scale:t})=>jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:"middle",dy:"0.25em"})}),PR=({left:e,scale:t,availableWidth:r,labelLeft:o})=>jsxRuntime.jsx(axis.Axis,{orientation:"left",left:e,scale:t,stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickFormat:r===void 0?void 0:n=>lx(String(n),r,ws),tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:ws,textAnchor:o===void 0?"end":"start",...o===void 0?{}:{x:o},dx:o===void 0?"-0.25em":0,dy:"0.33em"})}),RR=({top:e,scale:t,yFormatter:r,width:o})=>{let n=Or(r),a=ot.useMemo(()=>{if(!o||o<=0)return 5;let s=Math.floor(o/60);return Math.max(2,Math.min(8,s))},[o]);return jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,numTicks:a,tickFormat:i=>(n.tickFormat||n.format)(i),stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:"middle",dy:"0.25em"})})},po={Bottom:TR,Left:NR,CategoryBottom:kR,CategoryLeft:PR,NumericBottom:RR};var Wo=({data:e,formatter:t,label:r,categoryLabels:o})=>{let n=ot__namespace.default.useContext(uo),a=o??n?.categoryLabels,i=n?.xScale,s=n?.width,d=n?.height,c=Or(t),l=v=>{if(v.baselineValue===void 0)return c.format(v.value);let x=Math.min(v.baselineValue,v.value),C=Math.max(v.baselineValue,v.value);return `${c.format(x)} \u2013 ${c.format(C)}`},u=ot__namespace.default.useRef(null),[m,p]=ot__namespace.default.useState({x:0,y:0,translate:"translate(-50%, -100%)"});if(ot__namespace.default.useEffect(()=>{if(!e||!u.current)return;let x=u.current.getBoundingClientRect(),C=s??window.innerWidth,w=d??window.innerHeight,S=e.x,T=e.y,N=16,k=e.x+x.width+N<=C,R=e.x-x.width-N>=0,L;e.position==="left"?L=R||!k:L=!k&&R;let E=L?"translate(calc(-100% - 16px), -50%)":"translate(16px, -50%)";if(!k&&!R){let B=C-e.x,A=e.x;B<=A?(S=C,E="translate(-100%, -50%)"):(S=0,E="translate(0, -50%)");}T-x.height/2<0?T=x.height/2:T+x.height/2>w&&(T=w-x.height/2),p({x:S,y:T,translate:E});},[e?.x,e?.y,e?.position,s,d]),!e)return null;let g=i?.domain(),h=g&&g.length===2&&g.every(v=>v instanceof Date)?vh({start:g[0],end:g[1]}):null,b=r||(h&&e.xValue instanceof Date?h(e.xValue):String(e.xValue));return jsxRuntime.jsx(framerMotion.AnimatePresence,{children:jsxRuntime.jsxs(framerMotion.motion.div,{ref:u,role:"tooltip","aria-live":"polite",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},"data-testid":"tooltip",className:"pointer-events-none absolute z-50 rounded-lg bg-background-surface p-4 text-sm shadow-xl ring-1 ring-border-default whitespace-nowrap",style:{left:m.x,top:m.y,transform:m.translate},children:[jsxRuntime.jsx("div",{className:"mb-1 font-medium text-text-primary",children:b}),e.isEvent?jsxRuntime.jsxs("div",{className:"space-y-2",children:[e.series.length>1&&jsxRuntime.jsx("ul",{className:"list-none p-0 border-b border-border-default pb-2",children:e.series.slice(0,-1).map(v=>jsxRuntime.jsxs("li",{className:"py-0.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"font-medium text-text-primary",children:[v.label,":"]}),jsxRuntime.jsx("span",{className:"text-text-secondary",children:l(v)})]}),v.category&&jsxRuntime.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3",style:{backgroundColor:v.categoryColor||v.color,borderRadius:"1px"}}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:a?.[v.category]||v.category})]}),v.extraTooltipRows&&v.extraTooltipRows.length>0&&jsxRuntime.jsx("div",{className:"mt-0.5 space-y-0.5",children:v.extraTooltipRows.map(x=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[jsxRuntime.jsxs("span",{children:[x.label,":"]}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:x.value})]},x.label))})]},v.label))}),(()=>{let v=e.series[e.series.length-1],x=e.eventItems?.length?e.eventItems:[{label:v.label,color:v.color,metadata:e.eventMetadata}];return jsxRuntime.jsx("div",{className:"space-y-2",children:x.map((C,w)=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:C.color}}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:C.label})]}),C.metadata&&Object.keys(C.metadata).length>0&&jsxRuntime.jsx("div",{className:"ml-4 mt-1 space-y-0.5 text-xs text-text-secondary",children:Object.entries(C.metadata).map(([S,T])=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"capitalize",children:[S,":"]}),jsxRuntime.jsx("span",{className:"font-medium",children:T})]},S))})]},`${C.label}-${w}`))})})()]}):jsxRuntime.jsx("ul",{className:"list-none p-0",children:e.series.map(v=>jsxRuntime.jsxs("li",{className:"py-0.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"font-medium text-text-primary",children:[v.label,":"]}),jsxRuntime.jsx("span",{className:"text-text-secondary",children:l(v)})]}),v.category&&jsxRuntime.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3",style:{backgroundColor:v.categoryColor||v.color,borderRadius:"1px"}}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:a?.[v.category]||v.category})]}),v.extraTooltipRows&&v.extraTooltipRows.length>0&&jsxRuntime.jsx("div",{className:"mt-0.5 space-y-0.5",children:v.extraTooltipRows.map(x=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[jsxRuntime.jsxs("span",{children:[x.label,":"]}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:x.value})]},x.label))})]},v.label))})]})})};var hx={top:20,right:20,bottom:50,left:60},vx=12,BR=.4,bx=60;function VR({margin:e,orientation:t,labelsKey:r,width:o}){return ot.useMemo(()=>{if(e)return e;if(t!=="horizontal")return hx;let n=cn(r.split("\0"),ws,"system-ui"),a=Math.max(bx,Math.floor(o*BR)),i=Math.ceil(n)+vx;return {...hx,left:Math.min(Math.max(i,bx),a)}},[e,t,r,o])}var Cx=({data:e,width:t,height:r,margin:o,scaleToFit:n=false,color:a,yFormatter:i={type:"number"},showGrid:s=true,showAxes:d=true,animate:c=true,barRadius:l=4,barPadding:u=.3,onBarClick:m,onBarHover:p,activeIndex:g,className:f,style:h,"aria-label":b,orientation:v="horizontal",showTooltip:x=true})=>{let[C,w]=ot.useState(null),[S,T]=ot.useState(null),[N,k]=ot.useState(null),R=n&&t!==void 0&&r!==void 0,[L,E]=ot.useState(t??600),[B,A]=ot.useState(r??300),H=ot.useRef(null),Y=g??C,G=ot.useId(),I=a||"var(--color-viz-default)";ot.useEffect(()=>{if(t!==void 0&&r!==void 0){E(t),A(r);return}if(!H.current)return;let M=new ResizeObserver(P=>{for(let X of P)t===void 0&&E(X.contentRect.width),r===void 0&&A(X.contentRect.height);});return M.observe(H.current),t===void 0&&E(H.current.offsetWidth),r===void 0&&A(H.current.offsetHeight||300),()=>{M.disconnect();}},[t,r]);let F=e.map(M=>M.label).join("\0"),O=VR({margin:o,orientation:v,labelsKey:F,width:L}),U=Math.max(0,O.left-vx),{xScale:K,yScale:z,innerWidth:V,innerHeight:D}=ot.useMemo(()=>{let M=L-O.left-O.right,P=B-O.top-O.bottom;if(v==="horizontal"){let $=d3Array.max(e,oe=>oe.value)||0;return {xScale:scale.scaleLinear({range:[0,M],domain:[0,$*1.1],nice:true}),yScale:scale.scaleBand({range:[0,P],domain:e.map(oe=>oe.label),padding:u}),innerWidth:M,innerHeight:P}}let X=d3Array.max(e,$=>$.value)||0;return {xScale:scale.scaleBand({range:[0,M],domain:e.map($=>$.label),padding:u}),yScale:scale.scaleLinear({range:[P,0],domain:[0,X*1.1],nice:true}),innerWidth:M,innerHeight:P}},[e,L,B,O,u,v]);if(e.length===0)return jsxRuntime.jsx("div",{ref:H,className:tailwindMerge.twMerge("flex h-full min-h-[200px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",f),style:r!==void 0?{height:r,...h}:h,children:"No data available"});let y=(M,P)=>{if(w(M),p?.(P,M),M!==null&&P){let X,$;if(v==="horizontal"){let re=K(P.value),_=z(P.label)||0,he=z.bandwidth();X=O.left+re,$=O.top+_+he/2;}else {let re=K,_=z,he=re(P.label)??0,me=re.bandwidth(),ue=_(P.value);X=O.left+he+me/2,$=O.top+ue;}let oe=X>L/2;k(P.label),T({xValue:new Date,series:[{label:"Value",value:P.value,color:P.color||I}],x:X,y:$,position:oe?"left":"right"});}else T(null),k(null);};return jsxRuntime.jsxs("div",{ref:H,className:tailwindMerge.twMerge("relative w-full overflow-hidden rounded-lg bg-background-surface",!R&&"h-full",f),style:!R&&r!==void 0?{height:r,...h}:h,"aria-label":b,role:"img",children:[jsxRuntime.jsxs("svg",{width:L,height:B,viewBox:R?`0 0 ${L} ${B}`:void 0,style:R?{display:"block",width:"100%",height:"auto"}:void 0,children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx(gradient.LinearGradient,{id:`${G}-bar`,from:I,to:I,toOpacity:.85})}),jsxRuntime.jsxs(group.Group,{left:O.left,top:O.top,children:[s&&jsxRuntime.jsx("g",{className:"grid-lines",children:(v==="horizontal"?K.ticks(5):z.ticks(5)).map(M=>{let P=v==="horizontal"?0:z(M),X=v==="horizontal"?K(M):0;return jsxRuntime.jsx("line",{x1:v==="horizontal"?X:0,y1:v==="horizontal"?0:P,x2:v==="horizontal"?X:V,y2:v==="horizontal"?D:P,stroke:"var(--color-border-default)",strokeOpacity:.5,strokeDasharray:"2,3"},M)})}),e.map((M,P)=>{let X=Y===P||Y==null,$=M.color||`url(#${G}-bar)`;if(v==="horizontal"){let ie=K(M.value),fe=z.bandwidth(),Te=z(M.label)||0;return jsxRuntime.jsx(framerMotion.motion.rect,{x:0,y:Te,width:ie,height:fe,fill:$,rx:l,ry:l,initial:c?{width:0,opacity:.5}:void 0,animate:{width:ie,opacity:X?1:.5},transition:{duration:.5,delay:P*.05,ease:"easeOut",opacity:{duration:.15,delay:0}},style:{cursor:m||p?"pointer":"default"},onMouseEnter:()=>y(P,M),onMouseLeave:()=>y(null,null),onClick:()=>m?.(M,P)},M.label)}let oe=K,re=z,_=oe.bandwidth(),he=oe(M.label)??0,me=re(M.value),ue=Math.max(0,D-me);return c?jsxRuntime.jsx(framerMotion.motion.rect,{x:he,width:_,fill:$,rx:l,ry:l,initial:{y:D,height:0,opacity:.5},animate:{y:me,height:ue,opacity:X?1:.5},transition:{duration:.5,delay:P*.05,ease:"easeOut",opacity:{duration:.15,delay:0}},style:{cursor:m||p?"pointer":"default"},onMouseEnter:()=>y(P,M),onMouseLeave:()=>y(null,null),onClick:()=>m?.(M,P)},M.label):jsxRuntime.jsx("rect",{x:he,y:me,width:_,height:ue,fill:$,rx:l,ry:l,opacity:X?1:.5,style:{cursor:m||p?"pointer":"default",transition:"opacity 150ms ease-out"},onMouseEnter:()=>y(P,M),onMouseLeave:()=>y(null,null),onClick:()=>m?.(M,P)},M.label)}),d&&v==="vertical"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(po.CategoryBottom,{top:D,scale:K}),jsxRuntime.jsx(po.Left,{left:0,scale:z,yFormatter:i,height:D})]}),d&&v==="horizontal"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(po.NumericBottom,{top:D,scale:K,yFormatter:i,width:V}),jsxRuntime.jsx(po.CategoryLeft,{left:0,labelLeft:-O.left,scale:z,availableWidth:U})]})]})]}),x&&!R&&jsxRuntime.jsx(Wo,{data:S,formatter:i,label:N??void 0})]})};var Sx=({item:e,onToggle:t})=>{let r=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-3 w-3 shrink-0",style:{backgroundColor:e.fill,borderRadius:"1px",opacity:e.isHidden?.35:1}}),jsxRuntime.jsx("span",{className:`text-sm whitespace-nowrap ${e.isHidden?"text-text-disabled line-through":"text-text-secondary"}`,children:e.category})]});return t?jsxRuntime.jsx("button",{type:"button",className:"flex items-center gap-2 shrink-0 rounded-sm focus:outline-none focus:ring-2 focus:ring-border-focus disabled:cursor-not-allowed disabled:opacity-60","aria-pressed":!e.isHidden,"aria-label":`${e.isHidden?"Show":"Hide"} ${e.category}`,disabled:e.isDisabled,onClick:()=>t(e.id??e.category),children:r}):jsxRuntime.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})},HR=({items:e,onToggle:t})=>e.length===0?null:jsxRuntime.jsx("div",{className:"flex items-center gap-3 flex-wrap",children:e.map((r,o)=>jsxRuntime.jsx(Sx,{item:r,onToggle:t},`${r.category}:${o}`))}),Ti=({items:e,onExport:t,marginLeft:r=0,marginRight:o=0,hideExport:n=false,isZoomed:a=false,onResetZoom:i,onLegendItemToggle:s})=>{let[d,c]=ot__namespace.default.useState(false),[l,u]=ot__namespace.default.useState(null),[m,p]=ot__namespace.default.useState(false),[g,f]=ot__namespace.default.useState(false),h=ot__namespace.default.useCallback(async v=>{c(true),u(v),f(false);try{await t(v);}catch(x){console.error("Export failed:",x);}finally{c(false),u(null);}},[t]),b=ot__namespace.default.useCallback(async v=>{await h(v);},[h]);return jsxRuntime.jsxs("div",{className:"mt-2 flex items-center justify-between gap-3 min-h-[32px]",style:{marginLeft:r,marginRight:o},children:[jsxRuntime.jsx("div",{className:"hidden sm:block flex-1 min-w-0",children:jsxRuntime.jsx(HR,{items:e,onToggle:s})}),jsxRuntime.jsx("div",{className:"sm:hidden flex items-center gap-3",children:e.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>p(true),className:"text-sm text-text-secondary hover:text-text-primary transition-colors underline decoration-dotted underline-offset-4",children:"Legend"}),jsxRuntime.jsx(Lt,{isOpen:m,onClose:()=>p(false),title:"Legend",children:jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-3 p-4",children:e.map((v,x)=>jsxRuntime.jsx(Sx,{item:v,onToggle:s},`${v.category}:${x}`))})})]})}),jsxRuntime.jsxs("div",{className:"sm:hidden flex items-center gap-2 shrink-0",children:[a&&i&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",onPress:i,"aria-label":"Reset Zoom",children:jsxRuntime.jsx(W,{name:"ArrowsOut",size:16})}),!n&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(te,{variant:"secondary",size:"sm",onPress:()=>f(true),isDisabled:d,"aria-label":"Export chart",children:jsxRuntime.jsx(W,{name:"Export",size:16})}),jsxRuntime.jsx(Lt,{isOpen:g,onClose:()=>f(false),title:"Export Chart",contentPadding:false,children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsxs("button",{onClick:()=>h("csv"),disabled:d,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(W,{name:"List",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:l==="csv"?"Exporting...":"Export as CSV"})]}),jsxRuntime.jsxs("button",{onClick:()=>h("svg"),disabled:d,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(W,{name:"Code",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:l==="svg"?"Exporting...":"Export as SVG"})]}),jsxRuntime.jsxs("button",{onClick:()=>h("png"),disabled:d,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(W,{name:"DownloadSimple",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:l==="png"?"Exporting...":"Export as PNG"})]})]})})]})]}),jsxRuntime.jsxs("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[a&&i&&jsxRuntime.jsxs(te,{variant:"secondary",size:"sm",onPress:i,children:[jsxRuntime.jsx(W,{name:"ArrowsOut",size:16}),jsxRuntime.jsx("span",{className:"hidden sm:inline",children:"Reset Zoom"})]}),!n&&jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(te,{variant:"secondary",size:"sm",isDisabled:d,children:[jsxRuntime.jsx(W,{name:"Export",size:16}),d?"Exporting...":"Export"]}),jsxRuntime.jsx(Et,{placement:"top end",className:"min-w-48 p-1 bg-background-surface rounded-lg shadow-xl ring-1 ring-border-default",children:jsxRuntime.jsxs(reactAriaComponents.Menu,{onAction:b,className:"outline-none",children:[jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"csv",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:d,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(W,{name:"List",size:14}),l==="csv"?"Exporting...":"Export as CSV"]})}),jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"svg",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:d,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(W,{name:"Code",size:14}),l==="svg"?"Exporting...":"Export as SVG"]})}),jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"png",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:d,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(W,{name:"DownloadSimple",size:14}),l==="png"?"Exporting...":"Export as PNG"]})})]})})]})]})]})};var wc=mg(fm());var wx=["stroke","fill","color","stop-color","flood-color","lighting-color"],Tx=/var\s*\(/;function Nx(e,t){let r=[e,...Array.from(e.querySelectorAll("*"))],o=[t,...Array.from(t.querySelectorAll("*"))],n=Math.min(r.length,o.length);for(let a=0;a<n;a++){let i=r[a],s=o[a];if(!(i instanceof Element)||!(s instanceof Element))continue;let d=window.getComputedStyle(i);for(let c of wx){let l=s.getAttribute(c);if(l&&Tx.test(l)){let u=d.getPropertyValue(c);u&&s.setAttribute(c,u.trim());}}if(s instanceof HTMLElement||s instanceof SVGElement)for(let c of wx){let l=c,u=s.style.getPropertyValue(l);if(u&&Tx.test(u)){let m=d.getPropertyValue(l);m&&s.style.setProperty(l,m.trim());}}}}function gm(e,t,r=true){let o=e||"chart";if(r){let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return `${o}-${n}.${t}`}return `${o}.${t}`}async function hm(e,t,r={},o){let n=Array.isArray(t[0])?t:[t];try{switch(e){case "csv":await WR(n,r);break;case "svg":await UR(o,r);break;case "png":await KR(o,r);break;default:throw new Error(`Unsupported export type: ${e}`)}}catch(a){throw console.error("Export failed:",a),new Error(`Failed to export chart as ${e}: ${a instanceof Error?a.message:"Unknown error"}`)}}async function WR(e,t){try{let r=t.yFormat?cp(t.yFormat):null,o=t.yFormat,n=m=>{if(m==null||m==="")return "";if(!o)return typeof m=="number"?m:String(m);let p=yh(m,o);return p===null?typeof m=="number"?m:String(m):p},a=new Map;e.forEach(m=>{m.forEach(p=>{let g=p.xValue.getTime();a.has(g)||a.set(g,p.xValue);});});let i=Array.from(a.values()).sort((m,p)=>m.getTime()-p.getTime()),s=e.map((m,p)=>{let g=t.seriesLabels?.[p]||`Series ${p+1}`;return r&&!g.includes(`(${r})`)?`${g} (${r})`:g}),d=i.map(m=>{let p={[t.xLabel||"Date"]:m.toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})};return e.forEach((g,f)=>{let h=s[f],b=g.find(v=>v.xValue.getTime()===m.getTime());p[h]=b?n(b.yValue):"",b?.category&&(p[`${h} Category`]=b.category);}),p}),c=GR__default.default.unparse(d,{header:!0,skipEmptyLines:!0}),l=new Blob([c],{type:"text/csv;charset=utf-8;"}),u=gm(t.filename||"chart-data","csv",t.timestamp!==!1);(0,wc.saveAs)(l,u);}catch(r){throw new Error(`CSV export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function UR(e,t){if(!e.current)throw new Error("SVG element not found");try{let r=e.current,o=r.cloneNode(!0);if(Nx(r,o),!o.querySelector("rect[data-background]")){let c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("width",o.getAttribute("width")||"100%"),c.setAttribute("height",o.getAttribute("height")||"100%"),c.setAttribute("fill","white"),c.setAttribute("data-background","true"),o.insertBefore(c,o.firstChild);}let i=new XMLSerializer().serializeToString(o);i.includes("<?xml")||(i=`<?xml version="1.0" encoding="UTF-8"?>
|
|
168
|
+
`+i),i.includes("xmlns=")||(i=i.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let s=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),d=gm(t.filename||"chart","svg",t.timestamp!==!1);(0,wc.saveAs)(s,d);}catch(r){throw new Error(`SVG export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function KR(e,t,r=2){if(!e.current)throw new Error("SVG element not found");let o="";try{let n=e.current,a=n.getBoundingClientRect(),i=n.cloneNode(!0);Nx(n,i),i.setAttribute("width",String(a.width)),i.setAttribute("height",String(a.height)),i.removeAttribute("transform");let s=i.getElementsByTagName("text");Array.from(s).forEach(m=>{m.style.fontFamily||(m.style.fontFamily="system-ui, -apple-system, sans-serif"),m.style.fontSize||(m.style.fontSize="12px");});let d=document.createElementNS("http://www.w3.org/2000/svg","rect");d.setAttribute("width",String(a.width)),d.setAttribute("height",String(a.height)),d.setAttribute("fill","white"),i.insertBefore(d,i.firstChild);let l=new XMLSerializer().serializeToString(i);l.includes("xmlns=")||(l=l.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let u=new Blob([l],{type:"image/svg+xml;charset=utf-8"});return o=URL.createObjectURL(u),new Promise((m,p)=>{let g=new Image,f=setTimeout(()=>{o&&URL.revokeObjectURL(o),p(new Error("Image loading timeout"));},1e4);g.onload=()=>{clearTimeout(f);try{let h=document.createElement("canvas");h.width=a.width*r,h.height=a.height*r;let b=h.getContext("2d");if(!b)throw new Error("Canvas context not available");b.imageSmoothingEnabled=!0,b.imageSmoothingQuality="high",b.scale(r,r),b.fillStyle="white",b.fillRect(0,0,a.width,a.height),b.drawImage(g,0,0,a.width,a.height),h.toBlob(v=>{if(v){let x=gm(t.filename||"chart","png",t.timestamp!==!1);(0,wc.saveAs)(v,x),m();}else p(new Error("Failed to create PNG blob"));o&&URL.revokeObjectURL(o);},"image/png",1);}catch(h){o&&URL.revokeObjectURL(o),p(h);}},g.onerror=()=>{clearTimeout(f),o&&URL.revokeObjectURL(o),p(new Error("Failed to load SVG as image"));},g.src=o;})}catch(n){throw o&&URL.revokeObjectURL(o),new Error(`PNG export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function YR(e){if(typeof window>"u")return false;switch(e){case "csv":return true;case "svg":return typeof XMLSerializer<"u";case "png":return typeof HTMLCanvasElement<"u"&&typeof HTMLCanvasElement.prototype.toBlob=="function";default:return false}}function XR(e){return {csv:"CSV Spreadsheet",svg:"SVG Vector Image",png:"PNG Image"}[e]||"Unknown Format"}function Tc({datasets:e,metadata:t,svgRef:r}){return ot.useCallback(async o=>{try{await hm(o,e,t,r);}catch(n){throw console.error("Chart export failed:",n),n}},[e,t,r])}var bm=({data:e,seriesMetadata:t,width:r,height:o,onBrushChange:n,brushRegion:a,margin:i=je,yDomain:s})=>{let d=ot.useRef(null),c=ot.useRef(false),l=ot.useMemo(()=>e.flat(),[e]),u=ot.useMemo(()=>({top:10,bottom:15,left:i.left,right:i.right}),[i]),m=r-u.left-u.right,p=ot.useMemo(()=>{if(l.length===0)return scale.scaleTime({domain:[new Date,new Date],range:[0,m]});let v=new Date(Math.min(...l.map(C=>C.xValue.getTime()))),x=new Date(Math.max(...l.map(C=>C.xValue.getTime())));return scale.scaleTime({domain:[v,x],range:[0,m]})},[l,m]),g=ot.useMemo(()=>{let v=l.length>0?Math.max(0,...l.map(x=>x.yValue)):1;return scale.scaleLinear({domain:s??[0,v],range:[o-u.bottom,u.top]})},[l,o,s,u.top,u.bottom]),f=v=>{if(c.current)return;if(!v){n(null);return}let{x0:x,x1:C}=v;if(x===C)return;let w=new Date(x),S=new Date(C);if(!(Number.isNaN(w.getTime())||Number.isNaN(S.getTime()))){if(l.length>0){let T=Math.min(...l.map(E=>E.xValue.getTime())),N=Math.max(...l.map(E=>E.xValue.getTime())),R=(N-T)*.05;if(Math.abs(w.getTime()-T)<R&&Math.abs(S.getTime()-N)<R){n(null);return}}n([w,S]);}},h=ot.useMemo(()=>{if(l.length!==0)return {start:{x:0,y:u.top},end:{x:m,y:o-u.bottom}}},[m,o,l]);ot.useEffect(()=>{if(!d.current||l.length===0)return;let v=d.current.state;if(v?.isBrushing||v?.activeHandle)return;let x=Math.min(...l.map(k=>k.xValue.getTime())),C=Math.max(...l.map(k=>k.xValue.getTime())),w=a?a[0]:new Date(x),S=a?a[1]:new Date(C),T=d.current.state?.extent;if(T){let k=p.invert(T.x0),R=p.invert(T.x1),L=Math.abs(k.getTime()-w.getTime()),E=Math.abs(R.getTime()-S.getTime());if(L<1e3&&E<1e3)return}c.current=true;let N=k=>{let R=d.current.getExtent({x:p(w),y:u.top},{x:p(S),y:o-u.bottom});return {...k,start:{y:R.y0,x:R.x0},end:{y:R.y1,x:R.x1},extent:R}};d.current.updateBrush(N),setTimeout(()=>{c.current=false;},50);},[a,p,o,l]);let b={fill:"url(#brush_pattern)",fillOpacity:.15,stroke:"var(--color-border-focus)",strokeWidth:1.5,strokeOpacity:.3};return jsxRuntime.jsx("div",{className:"mt-2",children:jsxRuntime.jsxs("svg",{width:r,height:o,children:[jsxRuntime.jsx(pattern.PatternLines,{id:"brush_pattern",height:8,width:8,stroke:"var(--color-text-secondary)",strokeWidth:1,orientation:["diagonal"]}),jsxRuntime.jsxs("g",{transform:`translate(${u.left}, 0)`,children:[e.map((v,x)=>jsxRuntime.jsx(shape.LinePath,{data:v,x:C=>p(C.xValue),y:C=>g(C.yValue),stroke:t[x]?.color||"var(--color-gray-500)",strokeWidth:1.5,opacity:.8},`brush-series-${x}`)),jsxRuntime.jsx(brush.Brush,{xScale:p,yScale:g,width:m,height:o-u.top-u.bottom,margin:{top:u.top,bottom:u.bottom,left:0,right:0},handleSize:8,innerRef:d,resizeTriggerAreas:["left","right"],brushDirection:"horizontal",initialBrushPosition:h,onChange:f,onClick:()=>n(null),selectedBoxStyle:b,useWindowMoveEvents:true})]})]})})};function dn(e){switch(e){case "command":return _t("--color-action-brand","#111111");case "success":return _t("--color-feedback-success-border","#278a4a");case "warning":return _t("--color-feedback-warning-border","#c88420");case "error":return _t("--color-feedback-error-border","#c42d2d");case "alert":return _t("--color-feedback-warning-border","#c88420");default:return _t("--color-text-secondary","#525250")}}function kc({events:e,color:t,showLabels:r=false}){let o=ot.useContext(uo),[n,a]=ot.useState(null);if(!o)return console.warn("ChartEventMarkers must be used within a ChartContainer"),null;let{xScale:i,yScale:s,height:d,tooltip:c,datasets:l,seriesMetadata:u,seriesTypes:m,categoryColors:p}=o,g=e.filter(b=>{let v=i(b.timestamp);return v>=je.left&&v<=i.range()[1]}),f=ot.useCallback((b,v)=>{a(v);let x=i(b.timestamp),C=x>(i.range()[1]-je.right-je.left)/2+je.left,w=[];l&&u&&l.forEach((N,k)=>{if(N.length===0)return;let R=d3Array.bisector(H=>H.xValue).left,L=R(N,b.timestamp),E=N[L-1],B=N[L],A;if(!E)A=B;else if(!B)A=E;else {let H=Math.abs(b.timestamp.getTime()-E.xValue.getTime()),Y=Math.abs(b.timestamp.getTime()-B.xValue.getTime());A=H<Y?E:B;}A&&u[k]&&w.push({label:u[k].label,value:A.yValue,color:u[k].color,type:m?.[k]||"line",...A.category&&{category:A.category,categoryColor:p?.[A.category]}});});let T=g.filter(N=>Math.abs(i(N.timestamp)-x)<=10).map(N=>({label:N.label,color:N.color??t??dn(N.type),metadata:N.metadata}));w.push({label:T.length>1?`${T.length} events`:b.label,value:0,color:b.color??t??dn(b.type),type:"event"}),c.show({xValue:b.timestamp,series:w,x,y:w.length>1&&typeof w[0].value=="number"?s(w[0].value):d/2,position:C?"left":"right",isEvent:true,eventMetadata:b.metadata,eventItems:T});},[i,s,d,c,t,l,u,m,p,g]),h=ot.useCallback(()=>{a(null),c.hide();},[c]);return g.length===0?null:jsxRuntime.jsx("g",{className:"chart-event-markers","data-testid":"chart-event-markers",children:g.map((b,v)=>{let x=i(b.timestamp),C=b.color??t??dn(b.type),w=n===v;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:x,y1:je.top,x2:x,y2:d-je.bottom,stroke:C,strokeWidth:w?3:2,strokeDasharray:"4 4",strokeOpacity:w?.9:.6,pointerEvents:"none"}),jsxRuntime.jsx("circle",{cx:x,cy:je.top,r:w?5:4,fill:C,stroke:"var(--color-background-surface)",strokeWidth:2,pointerEvents:"none"}),jsxRuntime.jsx("circle",{cx:x,cy:d-je.bottom,r:w?5:4,fill:C,stroke:"var(--color-background-surface)",strokeWidth:2,pointerEvents:"none"}),r&&jsxRuntime.jsx("text",{x,y:je.top-8,textAnchor:"middle",fill:"var(--color-text-secondary)",fontSize:11,fontWeight:500,pointerEvents:"none",children:b.label}),jsxRuntime.jsx("rect",{x:x-10,y:je.top,width:20,height:d-je.top-je.bottom,fill:"transparent",style:{cursor:"pointer"},onMouseEnter:()=>f(b,v),onMouseLeave:h})]},`${b.timestamp.getTime()}-${v}`)})})}var s2=d3Array.bisector(e=>e.xValue).left;function l2(e,t){if(e.length===0)return;let r=s2(e,t),o=e[r-1],n=e[r];return o?n?Math.abs(t.getTime()-o.xValue.getTime())<Math.abs(t.getTime()-n.xValue.getTime())?{point:o,index:r-1}:{point:n,index:r}:{point:o,index:r-1}:n?{point:n,index:r}:void 0}function Pc({spans:e,opacity:t=.25,color:r}){let o=ot.useContext(uo),[n,a]=ot.useState(null),i=ot.useRef(Number.NEGATIVE_INFINITY),s=o?.xScale,d=o?.yScale,c=o?.height,l=o?.tooltip,u=o?.datasets,m=o?.seriesMetadata,p=o?.seriesTypes,g=o?.categoryColors,[f,h]=s?.domain()??[new Date(0),new Date(0)],[b,v]=s?.range()??[0,0],x=ot.useCallback((L,E,B)=>{if(!s||!l||(a(B),L.timeStamp-i.current<16))return;i.current=L.timeStamp;let{left:A}=L.currentTarget.ownerSVGElement?.getBoundingClientRect()??{left:0},H=L.clientX-A,Y=s.invert(H),G=[];u&&m&&u.forEach((K,z)=>{let V=m[z],D=l2(K,Y);if(!D||!V)return;let{point:y,index:M}=D,P=yc(V,y,M);G.push({label:V.label,value:y.yValue,...P!==void 0?{baselineValue:P}:{},chartY:y.chartYValue??y.yValue,showMarker:y.showTooltipMarker??true,color:V.color,type:p?.[z]??"line",...y.category?{category:y.category,categoryColor:g?.[y.category]}:{},...y.extraTooltipRows&&y.extraTooltipRows.length>0?{extraTooltipRows:y.extraTooltipRows}:{}});});let I=H>(v-b)/2+b,O=e.filter(K=>K.end>K.start&&K.start<E.end&&K.end>E.start).map(K=>({label:K.label,color:K.color??r??dn(K.type),metadata:K.metadata}));G.push({label:O.length>1?`${O.length} scheduled commands`:E.label,value:0,color:E.color??r??dn(E.type),type:"event"});let U=G.length>1?G[0]?.chartY??G[0]?.value:void 0;l.show({xValue:Y,series:G,x:H,y:typeof U=="number"&&d?d(U):(c??0)/2,position:I?"left":"right",isEvent:true,eventMetadata:E.metadata,eventItems:O});},[s,d,c,l,u,m,p,g,r,b,v,e]),C=ot.useCallback(()=>{a(null),l?.hide();},[l]);if(!o)return console.warn("ChartEventSpans must be used within a ChartContainer"),null;let{xScale:w,height:S}=o,T=je.top,k=S-je.bottom-T,R=e.filter(L=>L.end>L.start);return R.length===0?null:jsxRuntime.jsx("g",{className:"chart-event-spans","data-testid":"chart-event-spans",children:R.map((L,E)=>{let B=L.start<f?f:L.start,A=L.end>h?h:L.end;if(B>=h||A<=f)return null;let H=w(B),G=w(A)-H;if(G<=0)return null;let I=L.color??r??dn(L.type);return jsxRuntime.jsx("rect",{x:H,y:T,width:G,height:k,fill:I,fillOpacity:n===E?Math.min((t??.25)*1.8,1):t??.25,pointerEvents:"all",style:{cursor:"pointer"},onMouseMove:O=>x(O,L,E),onMouseLeave:C},`${L.start.getTime()}-${L.end.getTime()}-${E}`)})})}var Ax=ot.createContext(false);function ym({children:e}){return jsxRuntime.jsx(Ax.Provider,{value:true,children:e})}function va(e){let t=ot.useContext(Ax),[r,o]=ot.useState(false),[n,a]=ot.useState(null),i=ot.useRef(null),s=ot.useCallback(u=>{if(i.current?.disconnect(),i.current=null,!u||typeof ResizeObserver>"u")return;let m=new ResizeObserver(([p])=>{if(!p)return;let{width:g,height:f}=p.contentRect;a(h=>h&&h.width===g&&h.height===f?h:{width:g,height:f});});m.observe(u),i.current=m;},[]);ot.useEffect(()=>()=>i.current?.disconnect(),[]);let d=ot.useCallback(()=>{o(false),a(null);},[]),c=t?null:jsxRuntime.jsx(te,{variant:"icon",size:"sm",icon:"ArrowsOutSimple","aria-label":`Expand ${e} chart`,onPress:()=>o(true)}),l=ot.useCallback(u=>r&&!t?jsxRuntime.jsx(Lr,{isOpen:true,onClose:d,title:e,contentPadding:false,maxWidth:"min(1200px, 100vw)",minWidth:"min(360px, 100vw)",height:"82vh",mobileHeight:"82vh",children:jsxRuntime.jsx("div",{ref:s,className:"h-full w-full p-4",children:u})}):u,[r,t,d,e,s]);return {isExpanded:r,action:c,expandedSize:n,present:l}}function Mc(e){return e?.kind==="streaming"}function Ec(e){if(typeof e!="string")return null;let t=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d{1,3})?(Z|[+-]\d{2}:\d{2})$/.exec(e);if(!t)return null;let r=Date.parse(e);if(!Number.isFinite(r))return null;let o=new Date(r),[,n,a,i]=t,s=new Date(`${n}-${a}-${i}T00:00:00Z`);return s.getUTCFullYear()!==Number(n)||s.getUTCMonth()+1!==Number(a)||s.getUTCDate()!==Number(i)?null:o}var m2={sm:"gap-4 px-6 py-8",md:"gap-5 px-8 py-12",lg:"gap-6 px-10 py-16"},f2={sm:"xs",md:"sm",lg:"md"},g2={sm:zt("bodySm"),md:zt("bodySm"),lg:zt("bodyMd")},h2={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-16 w-16"},b2={sm:20,md:24,lg:32},x2={center:"items-center text-center [&_.empty-state-actions]:justify-center [&_.empty-state-actions]:text-center",start:"items-start text-left [&_.empty-state-actions]:justify-start [&_.empty-state-actions]:text-left"},y2={mesh:"radial-gradient(at 20% 20%, rgba(68, 74, 225, 0.06) 0px, transparent 45%), radial-gradient(at 80% 80%, rgba(68, 74, 225, 0.045) 0px, transparent 45%), radial-gradient(at 50% 50%, rgba(68, 74, 225, 0.03) 0px, transparent 50%)","top-fade":"linear-gradient(to bottom, rgba(68, 74, 225, 0.06) 0%, rgba(68, 74, 225, 0.02) 60%, transparent 100%)",center:"radial-gradient(ellipse 600px 400px at center, rgba(68, 74, 225, 0.06) 0px, transparent 60%)",corners:"radial-gradient(at 0% 0%, rgba(68, 74, 225, 0.06) 0px, transparent 40%), radial-gradient(at 100% 100%, rgba(68, 74, 225, 0.045) 0px, transparent 40%)",bottom:"radial-gradient(ellipse 700px 300px at 50% 100%, rgba(68, 74, 225, 0.06) 0px, transparent 60%)",asymmetric:"radial-gradient(at 15% 30%, rgba(68, 74, 225, 0.06) 0px, transparent 45%), radial-gradient(at 85% 70%, rgba(68, 74, 225, 0.04) 0px, transparent 50%)"};function ki({icon:e,title:t,description:r,primaryAction:o,secondaryAction:n,actions:a,size:i="md",alignment:s="center",variant:d="default",spotlightPattern:c="mesh",fullHeight:l=false,className:u}){let m=i==="sm"?"sm":"md",p=d==="spotlight",g=p?{background:y2[c]}:void 0,f=()=>a?jsxRuntime.jsx("div",{className:"empty-state-actions mt-2 flex flex-wrap items-center gap-3",children:a}):o||n?jsxRuntime.jsxs("div",{className:"empty-state-actions mt-2 flex flex-col gap-3",children:[o&&(o.href?jsxRuntime.jsx(te,{variant:"secondary",size:m,onPress:o.onPress,isDisabled:o.isDisabled,isLoading:o.isLoading,href:o.href,children:o.label}):jsxRuntime.jsx(te,{variant:"secondary",size:m,onPress:o.onPress,isDisabled:o.isDisabled,isLoading:o.isLoading,children:o.label})),n&&jsxRuntime.jsx(St,{href:n.href||"#",variant:"muted",onPress:n.onPress,className:zt("labelMd"),children:n.label})]}):null;return jsxRuntime.jsxs("section",{"data-testid":"empty-state",role:"status","aria-live":"polite",className:tailwindMerge.twMerge("flex w-full flex-col rounded-xl text-text-primary",m2[i],x2[s],l?"h-full justify-center":"",p?"relative overflow-hidden":"",u),style:g,children:[e&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center justify-center rounded-full border border-border-muted bg-background-muted text-text-secondary",h2[i]),children:jsxRuntime.jsx(W,{name:e,size:b2[i]})}),jsxRuntime.jsx(vr,{size:f2[i],tag:"h2",className:"text-text-secondary",children:t}),r&&jsxRuntime.jsx("p",{className:tailwindMerge.twMerge("max-w-xs text-text-secondary whitespace-pre-line",g2[i]),children:r}),f()]})}function un(e,t=""){return ot.Children.toArray(e).flatMap(r=>ot.isValidElement(r)&&r.type===ot.Fragment?un(r.props.children,`${t}${String(r.key)}`):t&&ot.isValidElement(r)?[ot.cloneElement(r,{key:`${t}${String(r.key)}`})]:[r])}function Lc(e,t,r,o){if(r.length===0)throw new Error("tierForViewport: resolution ladder is empty");let n=[...r].sort((s,d)=>s.bucketMs-d.bucketMs),a=e/Math.max(1,t*o.targetPointsPerPx),i=Math.max(o.nativeMs,a);return n.find(s=>s.bucketMs>=i)??n[n.length-1]}function w2(e,t){return Math.floor(e/t.tileSpanMs)}function pn(e,t,r){let o=w2(e.startMs,t)-r,n=Math.ceil(e.endMs/t.tileSpanMs)-1+r,a=[];for(let i=o;i<=n;i++)a.push({tierId:t.id,index:i,startMs:i*t.tileSpanMs,endMs:(i+1)*t.tileSpanMs});return a}var br=(e,t)=>`${e}:${t}`,Ca=e=>!!e&&(e.line.length>0||(e.band?.length??0)>0||Object.values(e.lines??{}).some(t=>t.length>0));var Bx={erroredTiles:0};function Cm(e,t){let r=new Map,o=new Map,n=new Map,a=0;for(let m of e){let p=t.get(br(m.tierId,m.index));if(p&&(p.error&&(a+=1),!!p.data)){for(let g of p.data.line)r.set(g.xValue.getTime(),g);for(let g of p.data.band??[])o.set(g.xValue.getTime(),g);for(let[g,f]of Object.entries(p.data.lines??{})){let h=n.get(g);h||(h=new Map,n.set(g,h));for(let b of f)h.set(b.xValue.getTime(),b);}}}let i=(m,p)=>m.xValue.getTime()-p.xValue.getTime(),s=[...r.values()].sort(i),d=[...o.values()].sort(i),c=Object.fromEntries([...n.entries()].map(([m,p])=>[m,[...p.values()].sort(i)])),l,u;for(let m of [s,d,...Object.values(c)]){if(!m.length)continue;let p=m[0].xValue.getTime(),g=m[m.length-1].xValue.getTime();l=Math.min(l??p,p),u=Math.max(u??g,g);}return {line:s,band:d,lines:c,coverage:{earliestMs:l,latestMs:u,erroredTiles:a}}}function T2(e,t,r,o){let n=pn(e,t,0).filter(a=>o==null||a.startMs<o);return n.length===0?false:n.every(a=>{let i=r.get(br(a.tierId,a.index));return i!=null&&(i.status==="loaded"||i.status==="empty")})}function Vx(e,t,r){return pn(e,t,0).some(n=>{let a=r.get(br(n.tierId,n.index));return a?.status==="loaded"&&Ca(a.data)})}function N2(e,t){if(!Ca(e))return false;let r=e.coverage.earliestMs,o=e.coverage.latestMs;return r==null||o==null?false:r<t.endMs&&o>t.startMs}function Ox({viewport:e,targetTier:t,ladder:r,store:o,overscanTiles:n,prev:a,prevViewport:i,maxFutureMs:s}){let d=T2(e,t,o,s),c=pn(e,t,0).filter(p=>s==null||p.startMs<s).map(p=>o.get(br(p.tierId,p.index))),l=c.every(p=>p?.revalidated&&!p.refreshing&&!p.error),u=Vx(e,t,o);if(d&&(!u||a?.isFallback)&&c.some(p=>p?.refreshing||p?.error||p?.revalidated===false)&&a&&a.targetTier.id===t.id&&i?.startMs===e.startMs&&i?.endMs===e.endMs)return a;if(d&&(l||u)){let p=pn(e,t,n),{line:g,band:f,lines:h,coverage:b}=Cm(p,o);return {line:g,band:f,lines:h,renderTier:t,targetTier:t,isFallback:false,isStale:false,coverage:b}}let m=r.findIndex(p=>p.id===t.id);for(let p=m+1;p<r.length;p++){let g=r[p];if(Vx(e,g,o)){let f=pn(e,g,n),{line:h,band:b,lines:v,coverage:x}=Cm(f,o);return {line:h,band:b,lines:v,renderTier:g,targetTier:t,isFallback:true,isStale:false,coverage:x}}}if(d){let p=pn(e,t,n),{line:g,band:f,lines:h,coverage:b}=Cm(p,o);return {line:g,band:f,lines:h,renderTier:t,targetTier:t,isFallback:false,isStale:false,coverage:b}}return a?N2(a,e)?{...a,targetTier:t,isFallback:true,isStale:false}:{line:a.line,band:a.band,lines:a.lines,renderTier:null,targetTier:t,isFallback:true,isStale:true,coverage:Bx}:{line:[],band:[],lines:{},renderTier:null,targetTier:t,isFallback:false,isStale:false,coverage:Bx}}var Sm=new Map;function zx(e,t){switch(t.type){case "reset":return new Map;case "request":{let r=new Map(e);for(let o of t.ids){let n=r.get(o);t.refresh&&n?.data?r.set(o,{...n,refreshing:true,error:void 0,revalidated:false}):(!n||n.status==="error")&&r.set(o,{status:"loading",refreshing:!!t.refresh});}return r}case "cancel":{let r=new Map(e);for(let o of t.ids){let n=r.get(o);n&&r.set(o,{...n,refreshing:false,status:n.data?n.status:"error"});}return r}case "fulfilled":{let r=new Map(e);return r.set(t.id,{status:Ca(t.data)?"loaded":"empty",data:t.data,revision:(e.get(t.id)?.revision??0)+1,revalidated:t.refresh||e.get(t.id)?.revalidated}),r}case "failed":{let r=new Map(e),o=e.get(t.id);return r.set(t.id,o?.data?{...o,refreshing:false,error:t.error}:{status:"error",error:t.error}),r}default:return e}}function Gx({refs:e,refsKey:t,store:r,tier:o,viewport:n,fetchTile:a,dispatch:i,concurrency:s,maxFutureMs:d,resetKey:c,refreshKey:l,refreshEnabled:u=true,automaticLoads:m=false}){let p=ot.useRef({resetKey:c,refreshKey:l,refreshEnabled:u});ot.useLayoutEffect(()=>{p.current={resetKey:c,refreshKey:l,refreshEnabled:u};},[c,l,u]);let g=ot.useRef(new Map),f=ot.useRef(new Map),h=ot.useRef(0),b=ot.useRef(false),v=ot.useRef(null),x=ot.useRef(new Map),C=ot.useRef({resetKey:c,refreshKey:l,refreshEnabled:u}),w=ot.useRef(`${o.id}:${n.startMs}:${n.endMs}`),[S,T]=ot.useReducer(k=>k+1,0),N=ot.useCallback(()=>{for(let k of g.current.values())k.ac.abort();g.current.clear(),f.current.clear(),v.current=null,b.current=false,x.current.clear();},[]);return ot.useEffect(()=>{let k=`${o.id}:${n.startMs}:${n.endMs}`,R=C.current.resetKey!==c,L=C.current.refreshKey!==l,E=C.current.refreshEnabled&&!u;if(R&&N(),u)(L||b.current)&&!R&&(b.current=false,h.current+=1,v.current={generation:h.current,seen:new Set});else {b.current||(b.current=f.current.size>0||[...g.current.values()].some(F=>F.refresh));let I=[...f.current.keys()];for(let F of I)x.current.set(F,w.current);f.current.clear(),v.current=null;for(let[F,O]of g.current)!O.refresh&&!(E&&O.automatic)||(O.ac.abort(),g.current.delete(F),I.push(F),x.current.set(F,E&&w.current===k?k:O.viewportKey));I.length&&i({type:"cancel",ids:I});}C.current={resetKey:c,refreshKey:u||R?l:C.current.refreshKey,refreshEnabled:u},w.current=k;let B=v.current;if(B){let I=[];for(let F of e){let O=br(F.tierId,F.index);B.seen.has(O)||d!=null&&F.startMs>=d||(B.seen.add(O),f.current.set(O,B.generation),I.push(O));}I.length&&i({type:"request",ids:I,refresh:true});}let A=new Set(e.map(I=>br(I.tierId,I.index)));for(let I of f.current.keys())A.has(I)||(f.current.delete(I),x.current.set(I,k),i({type:"cancel",ids:[I]}));for(let[I,F]of g.current)(F.tierId!==o.id||F.refresh&&!A.has(I))&&(F.ac.abort(),g.current.delete(I),x.current.set(I,k),i({type:"cancel",ids:[I]}));let H=e.filter(I=>{if(d!=null&&I.startMs>=d)return false;let F=br(I.tierId,I.index);if(g.current.has(F))return false;let O=r.get(F),U=x.current.get(F);return U===k&&!f.current.has(F)?false:f.current.has(F)||U!=null||!O||O.status==="loading"}),Y=(n.startMs+n.endMs)/2;H.sort((I,F)=>Math.abs((I.startMs+I.endMs)/2-Y)-Math.abs((F.startMs+F.endMs)/2-Y));let G=H.slice(0,Math.max(0,s-g.current.size));for(let I of G){let F=br(I.tierId,I.index),O=f.current.get(F),U=O!==void 0,K={ac:new AbortController,tierId:I.tierId,generation:O??h.current,refresh:U,automatic:m&&u,viewportKey:k};x.current.delete(F),g.current.set(F,K),i({type:"request",ids:[F],refresh:U});let z=d!=null?Math.min(I.endMs,d):I.endMs,V=()=>!K.ac.signal.aborted&&p.current.resetKey===c&&g.current.get(F)===K&&(!K.automatic||p.current.refreshEnabled)&&(!U||p.current.refreshEnabled&&p.current.refreshKey===l)&&(f.current.get(F)??K.generation)===K.generation;Promise.resolve().then(()=>{if(K.ac.signal.aborted)throw new DOMException("Aborted","AbortError");return a(o,I.startMs,z,K.ac.signal,{reason:U?"refresh":"load",isCurrent:V})}).then(D=>{V()&&i({type:"fulfilled",id:F,data:D,refresh:U});}).catch(D=>{if(!V())return;let y=D instanceof Error?D.message:String(D);i({type:"failed",id:F,error:new Error(`tile fetch failed (tile ${F}, tier ${o.id}): ${y}`)});}).finally(()=>{g.current.get(F)===K&&(g.current.delete(F),f.current.get(F)===K.generation&&f.current.delete(F),!f.current.size&&![...g.current.values()].some(D=>D.refresh)&&(v.current=null),T());});}},[e,t,r,a,o,n,i,s,d,c,l,u,m,N,S]),ot.useEffect(()=>N,[N]),{abortAll:N}}var Ux=1.3,L2=25e4,D2=3;function A2(e,t,r){let o=t.tileSpanMs/t.bucketMs,n=Math.max(1,Math.floor(L2/o/r));return Math.min(Math.max(1,Math.ceil(.5*e/t.tileSpanMs)),n)}function Dc(e){let{fetchTile:t,ladder:r,nativeMs:o,viewport:n,widthPx:a,maxFutureMs:i,targetPointsPerPx:s=1,concurrency:d=3,tileCostSeriesCount:c=D2,resetKey:l,refreshKey:u,refreshEnabled:m,automaticLoads:p}=e,g=ot.useMemo(()=>({targetPointsPerPx:s,nativeMs:o}),[s,o]),[f,h]=ot.useState(()=>Lc(n.endMs-n.startMs,Math.max(1,a),r,g)),[b,v]=ot.useReducer(zx,Sm),[x,C]=ot.useState(l),w=x===l?b:Sm,S=ot.useRef(null),T=ot.useRef(null);x!==l&&(C(l),S.current=null,T.current=null,v({type:"reset"}));let N=ot.useRef(n.endMs-n.startMs),k=ot.useRef(g);ot.useEffect(()=>{let V=n.endMs-n.startMs,D=Lc(V,Math.max(1,a),r,g);if(D.id===f.id){k.current=g;return}let M=Lc(V,Math.max(1,a),r,k.current).id!==D.id,P=V/N.current;(M||P>Ux||P<1/Ux)&&(N.current=V,k.current=g,h(D));},[n,a,r,f.id,g]);let R=n.endMs-n.startMs,L=ot.useMemo(()=>A2(R,f,c),[R,f,c]),E=ot.useMemo(()=>pn(n,f,L),[n,f,L]),B=ot.useMemo(()=>E.map(V=>br(V.tierId,V.index)).join(","),[E]),A=ot.useRef(E);A.current=E;let H=ot.useRef(n);H.current=n;let Y=ot.useRef(w);Y.current=w,Gx({refs:E,refsKey:B,store:w,tier:f,viewport:n,fetchTile:t,dispatch:v,concurrency:d,resetKey:l,refreshKey:u,refreshEnabled:m,automaticLoads:p,...i!=null?{maxFutureMs:i}:{}});let G=ot.useMemo(()=>A.current.map(V=>{let D=br(V.tierId,V.index),y=w.get(D);return `${D}:${y?.status??"\u2205"}:${y?.revision??0}:${!!y?.error}`}).join("|"),[B,w]),I=ot.useMemo(()=>{let V=Ox({viewport:H.current,targetTier:f,ladder:r,store:Y.current,overscanTiles:L,prev:S.current,prevViewport:T.current,maxFutureMs:i});return S.current=V,T.current=H.current,V},[G,f,r,L,n.startMs,n.endMs,i,l]),F=ot.useMemo(()=>A.current.some(V=>Y.current.get(br(V.tierId,V.index))?.status==="loading"),[G]),O=ot.useMemo(()=>{let V=A.current[0];return V?Y.current.get(br(V.tierId,V.index))?.status==="empty":false},[G]),U=E.map(V=>w.get(br(V.tierId,V.index))),K=U.some(V=>V?.refreshing),z=U.find(V=>V?.error)?.error;return {tier:f,series:I,loading:F,refreshing:K,refreshError:z,atDataStart:O}}function Tm(e){let{initialViewport:t,...r}=e,[o,n]=ot.useState(t),a=Dc({...r,viewport:o}),i=ot.useCallback(d=>n(d),[]),s=ot.useCallback(d=>n(d),[]);return {viewport:o,onViewportChange:i,jumpTo:s,...a}}var F2=1440*60*1e3,B2=[{id:"5y",label:"5 years",days:5*365},{id:"year",label:"Year",days:365},{id:"month",label:"Month",days:30},{id:"week",label:"Week",days:7},{id:"day",label:"24h",days:1}],V2=[{id:"day",days:1},{id:"week",days:7},{id:"month",days:30}];function Kx(e,t=Date.now){return V2.map(({id:r,days:o})=>({id:r,label:e[r],getRange:()=>{let n=new Date(t());return {after:dateFns.subDays(n,o),before:n}}}))}function Ac(e=Date.now){return B2.map(({id:t,label:r,days:o})=>({id:t,label:r,getRange:()=>{let n=e();return {after:new Date(n-o*F2),before:new Date(n)}}}))}function U2({selectionState:e,isDisabled:t}){let r=`${pt} w-full h-full flex items-center justify-center rounded-sm forced-color-adjust-none font-semibold`,o={none:"text-text-primary group-hover:bg-background-muted group-pressed:bg-background-muted",middle:["bg-background-selected group-hover:bg-background-muted forced-colors:group-hover:bg-[Highlight]","group-invalid:group-hover:bg-feedback-error-background forced-colors:group-invalid:group-hover:bg-[Mark]","group-pressed:bg-background-muted forced-colors:group-pressed:bg-[Highlight] forced-colors:text-[HighlightText]","group-invalid:group-pressed:bg-feedback-error-background forced-colors:group-invalid:group-pressed:bg-[Mark]"].join(" "),cap:"bg-action-default text-[color:var(--color-action-default-text)] group-invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:group-invalid:bg-[Mark] forced-colors:text-[HighlightText]"},n=t?"text-text-disabled forced-colors:text-text-disabled font-light":"";return [r,o[e],n].filter(Boolean).join(" ")}function Ri({errorMessage:e,...t}){return jsxRuntime.jsxs(reactAriaComponents.RangeCalendar,{...t,children:[jsxRuntime.jsx(lc,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"w-full border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(cc,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:r=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:r,className:"selection-start:rounded-s-full selection-end:rounded-e-full [td:last-child_&]:rounded-e-end group h-9 w-9 cursor-default text-sm border-0 outside-month:text-text-disabled invalid:selected:bg-feedback-error-background forced-colors:selected:bg-[Highlight] forced-colors:selected:text-[HighlightText] forced-colors:invalid:selected:bg-[Mark] [td:first-child_&]:rounded-s-full [&]:border-0",children:({formattedDate:o,isSelected:n,isSelectionStart:a,isSelectionEnd:i,isFocusVisible:s,isDisabled:d})=>jsxRuntime.jsx("span",{className:U2({selectionState:n&&(a||i)?"cap":n?"middle":"none",isDisabled:d}),children:o})})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-feedback-error-text",children:e})]})}function Xx(e){return e==="brand"?"primary":e==="default"||e==="secondary"||!e?"subtle":e}var Y2={sm:"h-[var(--control-sm-height)] text-xs",md:"h-[var(--control-md-height)] text-sm",lg:"h-[var(--control-lg-height)] text-base",xl:"h-[var(--control-xl-height)] text-lg"},X2={sm:14,md:16,lg:18,xl:20},J2=({isSelected:e,isFirst:t,isLast:r,isDisabled:o,variant:n="subtle"})=>{let a=Xx(n),i=a==="primary"?"focus-visible:outline-action-primary":"focus-visible:outline-[color:var(--color-action-secondary-text)]";return a==="subtle"?tailwindMerge.twMerge(pt(),"focus-visible:outline-[color:var(--color-action-secondary-text)]","px-3 text-center transition cursor-pointer forced-color-adjust-none -ml-px first:ml-0 flex items-center justify-center h-full gap-2",e?"bg-background-muted text-text-primary font-medium forced-colors:!bg-[Highlight] forced-colors:!text-[HighlightText]":"text-text-secondary hover:bg-background-hover pressed:bg-background-hover forced-colors:!bg-[ButtonFace] forced-colors:!text-[ButtonText]",!r&&"border-r border-border-muted",o&&"bg-background-muted text-text-disabled forced-colors:!bg-[ButtonFace] forced-colors:!text-[GrayText] border-border-muted forced-colors:border-[GrayText] cursor-not-allowed"):tailwindMerge.twMerge(pt(),i,"px-3 text-center transition cursor-pointer forced-color-adjust-none -ml-px first:ml-0 flex items-center justify-center h-full gap-2",e?"bg-action-primary text-[color:var(--color-action-primary-text)] font-semibold forced-colors:!bg-[Highlight] forced-colors:!text-[HighlightText]":"text-text-secondary hover:bg-background-hover pressed:bg-background-hover forced-colors:!bg-[ButtonFace] forced-colors:!text-[ButtonText] hover:font-semibold",!r&&"border-r border-border-muted",o&&"bg-background-muted text-text-disabled forced-colors:!bg-[ButtonFace] forced-colors:!text-[GrayText] border-border-muted forced-colors:border-[GrayText] cursor-not-allowed")};function Fc({options:e,value:t,onChange:r,size:o="md",className:n,isDisabled:a,variant:i="subtle",iconOnly:s=false,"aria-label":d}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-flex overflow-hidden rounded-[var(--control-border-radius)]",Xx(i)==="subtle"?"border border-border-muted":"border-2 border-border-muted",Y2[o],n),role:"group","aria-label":d,children:e.map((c,l)=>{let u=s&&!!c.icon;return jsxRuntime.jsxs(reactAriaComponents.ToggleButton,{isSelected:t===c.id,onChange:()=>r(c.id),className:J2({isSelected:t===c.id,isFirst:l===0,isLast:l===e.length-1,isDisabled:a,variant:i}),isDisabled:a,"aria-label":c.label,children:[c.icon&&jsxRuntime.jsx(W,{name:c.icon,size:X2[o]}),u?jsxRuntime.jsx("span",{className:"sr-only",children:c.label}):jsxRuntime.jsx("span",{className:"inline-flex flex-col items-center after:content-[attr(data-label)] after:font-semibold after:h-0 after:overflow-hidden after:invisible","data-label":c.label,children:c.label})]},c.id)})})}function Q2(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function Pm(e){return Q2(e)?e:(console.warn("Invalid date detected in TimeControls, using fallback:",e),new Date)}var _x=120*1e3,_2=.02,$x={ONE_MINUTE:0,FIVE_MINUTES:1,FIFTEEN_MINUTES:2,HOUR:3,DAY:4,WEEK:5,MONTH:6,YEAR:7},$2=[{id:"FIFTEEN_MINUTES",label:"15m"},{id:"HOUR",label:"1h"},{id:"DAY",label:"1d"},{id:"WEEK",label:"1w"}];function Bc({dateRange:e,onDateRangeChange:t,windowSize:r,onWindowSizeChange:o,showWindowSize:n=true,showRangeSelector:a=true,allowDatePicker:i=false,lockWindowSize:s=false,showReset:d=true,restrictToSingleDay:c=false,presetRanges:l=[],windowSizeOptions:u=$2,autoAdjustWindowSize:m=false,size:p="md",className:g}){let[f,h]=ot.useState(0),b=ot.useRef(null),[v,x]=ot.useState(false),[C,w]=ot.useState(null),S=y=>{let P=(y.before.getTime()-y.after.getTime())/(1e3*60*60);return P<=24?"FIFTEEN_MINUTES":P<=72||P<=168?"HOUR":("DAY")};ot.useEffect(()=>{if(m&&!v&&o){let y=S(e);o(y);}},[e,m,v,o]);let T=y=>{let M;for(let P of l){let X=P.getRange(),$=(X.before.getTime()-X.after.getTime())*_2,oe=Math.abs(X.after.getTime()-y.after.getTime()),re=Math.abs(X.before.getTime()-y.before.getTime());if(oe>$||re>$)continue;let _=oe+re;(!M||_<M.distance)&&(M={id:P.id,distance:_});}return M?.id},N=C&&l.some(y=>y.id===C.id)&&Math.abs(C.after-e.after.getTime())<=_x&&Math.abs(C.before-e.before.getTime())<=_x?C.id:T(e),k=Pm(e.after),R=Pm(e.before),L=new Date(R.getTime()-1),E={start:date.fromDate(k,date.getLocalTimeZone()),end:date.fromDate(L,date.getLocalTimeZone())};ot.useEffect(()=>{let y=new ResizeObserver(M=>{for(let P of M)h(P.contentRect.width);});return b.current&&y.observe(b.current),()=>{b.current&&y.unobserve(b.current);}},[]);let B=[...u].sort((y,M)=>$x[y.id]-$x[M.id]),A=y=>{let M=y.toString(),P=l.find(X=>X.id===M);if(P){let X=P.getRange();w({id:M,after:X.after.getTime(),before:X.before.getTime()}),x(false),t(X,{presetId:M});}},H=y=>{if(y?.start&&y?.end){w(null);let M=new Date(y.start.year,y.start.month-1,y.start.day,0,0,0,0),P=new Date(y.end.year,y.end.month-1,y.end.day+1,0,0,0,0);t({after:M,before:P});}},Y=y=>{if(y){w(null);let M=new Date(y.year,y.month-1,y.day,0,0,0,0),P=new Date(y.year,y.month-1,y.day+1,0,0,0,0);t({after:M,before:P});}},G=y=>{o&&(x(true),o(y.toString()));},I=()=>{l.length>0&&A(l[0].id);},F=y=>Pm(y).toLocaleDateString("en-US"),O=B.map(y=>({id:y.id,label:y.label,value:y.id})),U=l.map(y=>({id:y.id,label:y.label,value:y.id})),K=s?jsxRuntime.jsx("div",{className:"flex items-center rounded-md border border-border-muted bg-background-muted px-3 py-2 text-sm text-text-secondary",children:B.find(y=>y.id===r)?.label||r}):jsxRuntime.jsx(an,{className:"w-full md:w-auto",selectedKey:r,onSelectionChange:G,items:O,size:p,"aria-label":"Select Window Size",children:y=>jsxRuntime.jsx(Ar,{id:y.id,"aria-label":y.label,size:p,children:y.label},y.id)}),z=d&&!N&&l.length>0,V=c?jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(te,{className:"border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",variant:"secondary",size:p,children:[jsxRuntime.jsx(W,{name:"CalendarBlank",size:18}),jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:F(e.after)})]}),jsxRuntime.jsx(Et,{className:"z-50 w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(xi,{"aria-label":"Select date",value:date.parseDate(k.toISOString().split("T")[0]),onChange:Y})})]})}):jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(te,{className:tailwindMerge.twMerge("border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",z&&"rounded-r-none"),variant:"secondary",size:p,children:[jsxRuntime.jsx(W,{name:"CalendarBlank",size:18}),!N&&jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:`${F(e.after)} - ${F(L)}`})]}),jsxRuntime.jsx(Et,{className:"z-50 w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(Ri,{"aria-label":"Date range calendar",value:E,onChange:H})})]}),z&&jsxRuntime.jsx(te,{variant:"ghost",size:p,onPress:I,children:"Reset"})]}),D=f<600;return jsxRuntime.jsx("div",{ref:b,className:tailwindMerge.twMerge("flex w-full flex-wrap items-center justify-between gap-4",g),children:D?jsxRuntime.jsxs("div",{className:"flex w-full justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[i&&V,a&&l.length>0&&jsxRuntime.jsx(an,{selectedKey:N??"",onSelectionChange:A,items:U,size:p,"aria-label":"Select Date Range",children:y=>jsxRuntime.jsx(Ar,{id:y.id,size:p,children:y.label},y.id)})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&K})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[i&&V,a&&l.length>0&&jsxRuntime.jsx(Fc,{options:l.map(y=>({id:y.id,label:y.label})),value:N??"",onChange:A,size:"sm",variant:"secondary","aria-label":"Select Date Range"})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&K})]})})}function Vc({children:e,label:t="About this chart"}){return jsxRuntime.jsx(tr,{content:e,placement:"bottom end",openOnPress:true,children:jsxRuntime.jsx(te,{variant:"ghost",size:"sm","aria-label":t,className:"px-1.5",children:jsxRuntime.jsx(W,{name:"Info",size:16})})})}function Oc(){let e=new Map;return {publish(t,r){for(let[o,n]of e)o!==t&&n(r);},subscribe(t,r){return e.set(t,r),()=>{e.delete(t);}}}}var rM=d3Array.bisector(e=>e.xValue).left,oM=(e,t,r)=>{if(!e.tooltipRange||e.baseline===void 0)return;let o=typeof e.baseline=="function"?e.baseline(t,r):e.baseline;return typeof o=="number"&&Number.isFinite(o)&&o!==t.yValue?o:void 0};function ey(e){let{mouseX:t,datasets:r,seriesMetadata:o,seriesTypes:n,xScale:a,yScale:i,plotLeft:s,plotRight:d}=e,c=a.invert(t),l=r.map((p,g)=>{if(!p||p.length===0)return null;let f=rM(p,c,1);if(f===0)return {point:p[0],index:0,datasetIndex:g};if(f>=p.length)return {point:p[p.length-1],index:p.length-1,datasetIndex:g};let h=p[f-1],b=p[f];if(!h||!b)return null;let v=Math.abs(h.xValue.getTime()-c.getTime()),x=Math.abs(b.xValue.getTime()-c.getTime()),C=v<x;return {point:C?h:b,index:C?f-1:f,datasetIndex:g}}).filter(p=>p!==null&&o[p.datasetIndex]!==void 0).map(({point:p,index:g,datasetIndex:f})=>({label:o[f].label,value:p.yValue,baselineValue:oM(o[f],p,g),color:o[f].color,point:p,type:n[f]}));if(l.length===0)return null;let u=a(l[0].point.xValue),m=u>(s+d)/2;return {xValue:l[0].point.xValue,series:l.map(({label:p,value:g,baselineValue:f,color:h,point:b,type:v})=>({label:p,value:g,...f!==void 0?{baselineValue:f}:{},chartY:b.chartYValue??g,showMarker:b.showTooltipMarker??true,color:h,type:v,...b.category!==void 0?{category:b.category}:{},...b.extraTooltipRows&&b.extraTooltipRows.length>0?{extraTooltipRows:b.extraTooltipRows}:{}})),x:u,y:i(l[0].point.chartYValue??l[0].value),position:m?"left":"right"}}var oy=e=>e instanceof Date&&!Number.isNaN(e.getTime()),sM=160;function zc(e,t,r){let[o,n]=ot.useState(null);ot.useImperativeHandle(r,()=>({setPreview:n}),[]);let[a,i]=e.range(),s=ot.useMemo(()=>o?d3Scale.scaleTime().domain([new Date(o[0]),new Date(o[1])]).range([a,i]):e,[o,e,a,i]),d=s.domain(),c=d[0],l=d[d.length-1],u=oy(c)&&oy(l),m=t<400,p=Math.max(2,Math.min(8,Math.floor(t/(m?70:110)))),g=ot.useMemo(()=>{if(!u)return [];let f=i-a;if(f<=0)return s.ticks(p);let[h,b]=s.domain(),v=h.getTime(),x=b.getTime(),C=(x-v)/f,w=Math.min(sM,f),S=w*C,T=d3Scale.scaleTime().domain([new Date(v-S),new Date(x+S)]).range([a-w,i+w]),N=d3Time.timeTickInterval(h,b,p);if(N)return T.ticks(N);let k=Math.max(2,Math.round(p*(f+2*w)/f));return T.ticks(k)},[s,p,u,a,i]);return {activeScale:s,ticks:g,start:c,end:l,valid:u,compact:m,rangeStart:a,rangeEnd:i}}var uM=6,ny=20,Em=ot.forwardRef(({top:e,scale:t,width:r},o)=>{let{activeScale:n,ticks:a,start:i,end:s,valid:d,compact:c,rangeStart:l,rangeEnd:u}=zc(t,r,o),m=a.length>=2?a[1].getTime()-a[0].getTime():s.getTime()-i.getTime(),p=ot.useMemo(()=>d?Ch(m,{compact:c}):()=>"",[m,c,d]),g=ot.useId(),f=Math.min(l,u),h=Math.abs(u-l);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:l,x2:u,y1:e,y2:e,stroke:"var(--color-border-muted)",strokeWidth:1}),a.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:g,children:jsxRuntime.jsx("rect",{x:f,y:e-4,width:h,height:ny+16})})}),jsxRuntime.jsx("g",{clipPath:`url(#${g})`,children:a.map(b=>jsxRuntime.jsxs("g",{transform:`translate(${n(b)},${e})`,children:[jsxRuntime.jsx("line",{x1:0,x2:0,y1:0,y2:uM,stroke:"var(--color-border-muted)",strokeWidth:1}),jsxRuntime.jsx("text",{x:0,y:ny,textAnchor:"middle",fontSize:12,fill:"var(--color-text-secondary)",children:p(b)})]},b.getTime()))})]})]})});Em.displayName="LiveTimeAxisBottom";var Lm=ot.forwardRef(({scale:e,width:t,top:r,bottom:o},n)=>{let{activeScale:a,ticks:i,rangeStart:s,rangeEnd:d}=zc(e,t,n),c=ot.useId(),l=Math.min(s,d),u=Math.abs(d-s);return jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:c,children:jsxRuntime.jsx("rect",{x:l,y:r,width:u,height:o-r})})}),jsxRuntime.jsx("g",{clipPath:`url(#${c})`,children:i.map(m=>{let p=a(m);return jsxRuntime.jsx("line",{x1:p,x2:p,y1:r,y2:o,stroke:"var(--color-border-muted)",strokeWidth:1},m.getTime())})})]})});Lm.displayName="LiveTimeGridlines";function Hc(e,t,r){let o=e[1]-e[0],n=t/Math.max(1,r)*o;return [e[0]-n,e[1]-n]}function ay(e,t,r){let o=e[1]-e[0],n=e[0]+t*o,a=o/r,i=n-t*a;return [i,i+a]}function Dm(e,t,r=16,o=800){return t===1?e*r:t===2?e*o:e}var iy=(e,t,r,o,n)=>{let a=t!==1?ay(e,r,t):e;return o!==0&&(a=Hc(a,o,n)),a},Am=(e,t)=>{if(!t)return e;let r=e[1]-e[0];if(r>=t[1]-t[0])return [t[0],t[1]];let[o,n]=e;return n>t[1]&&(n=t[1],o=n-r),o<t[0]&&(o=t[0],n=o+r),[o,n]},bM=e=>typeof requestAnimationFrame=="function"?requestAnimationFrame(e):setTimeout(()=>e(0),0),xM=e=>{typeof cancelAnimationFrame=="function"?cancelAnimationFrame(e):clearTimeout(e);};function sy(e){let{groupRef:t,overlayRef:r}=e,o=ot.useRef({xDomain:e.xDomain,plotWidthPx:e.plotWidthPx,plotLeftPx:e.plotLeftPx??0});o.current={xDomain:e.xDomain,plotWidthPx:e.plotWidthPx,plotLeftPx:e.plotLeftPx??0};let n=ot.useRef(e.onCommit);n.current=e.onCommit;let a=ot.useRef(e.panBoundsMs);a.current=e.panBoundsMs;let i=ot.useRef(e.getPanBoundsMs);i.current=e.getPanBoundsMs;let s=ot.useRef(e.settleMs??140);s.current=e.settleMs??140;let d=ot.useRef(e.zoomIntent??(F=>F.ctrlKey));d.current=e.zoomIntent??(F=>F.ctrlKey);let c=ot.useRef(e.onGestureStart);c.current=e.onGestureStart;let l=ot.useRef(e.onFramePreview);l.current=e.onFramePreview;let u=F=>F.button===0&&(F.shiftKey||F.ctrlKey||F.metaKey),m=ot.useRef(e.selectIntent??u);m.current=e.selectIntent??u;let p=ot.useRef(e.onSelectPreview);p.current=e.onSelectPreview;let g=ot.useRef(null),f=ot.useRef(null),h=ot.useRef({scale:1,cursorFrac:.5,panDxPx:0,timer:null}),b=ot.useRef(null),v=ot.useRef(null),x=ot.useRef(false),C=ot.useCallback((F,O,U)=>{v.current={translateX:F,scaleX:O,preview:U},b.current==null&&(b.current=bM(()=>{b.current=null;let K=v.current;if(K!=null){let z=`translate(${K.translateX},0) scale(${K.scaleX},1)`;t.current?.setAttribute("transform",z),r?.current?.setAttribute("transform",z),l.current?.(K.preview);}}));},[t,r]),w=ot.useCallback(()=>{b.current!=null&&(xM(b.current),b.current=null),v.current=null,t.current?.removeAttribute("transform"),r?.current?.removeAttribute("transform"),l.current?.(null);},[t,r]),S=ot.useCallback(()=>{x.current||(x.current=true,c.current?.());},[]),T=ot.useCallback(()=>{x.current=false;},[]),N=ot.useCallback(()=>{h.current.timer!=null&&(clearTimeout(h.current.timer),h.current.timer=null);},[]),k=ot.useCallback(()=>{h.current={scale:1,cursorFrac:.5,panDxPx:0,timer:null};},[]),R=ot.useCallback(()=>{let{xDomain:F,plotWidthPx:O}=o.current,{scale:U,cursorFrac:K,panDxPx:z}=h.current;U===1&&z===0||n.current(Am(iy(F,U,K,z,O),i.current?.()??a.current));},[]),L=ot.useCallback(()=>{h.current.timer!=null&&(N(),R(),k(),w());},[N,R,k,w]),E=ot.useCallback(F=>{if(L(),F.currentTarget.setPointerCapture?.(F.pointerId),p.current&&m.current(F)){let O=F.currentTarget.getBoundingClientRect().left,U=F.clientX-O;f.current={startX:U,currentX:U,leftPx:O},p.current?.([0,0]),S();return}g.current={startX:F.clientX,dxPx:0},S();},[L,S]),B=ot.useCallback(F=>{if(f.current){f.current.currentX=F.clientX-f.current.leftPx;let K=Math.max(1,o.current.plotWidthPx),z=Math.min(1,Math.max(0,f.current.startX/K)),V=Math.min(1,Math.max(0,f.current.currentX/K));p.current?.(z<=V?[z,V]:[V,z]);return}if(!g.current)return;g.current.dxPx=F.clientX-g.current.startX;let{xDomain:O,plotWidthPx:U}=o.current;C(g.current.dxPx,1,Hc(O,g.current.dxPx,U));},[C]),A=8,H=ot.useCallback(F=>{if(f.current){let{startX:U,currentX:K}=f.current;if(f.current=null,p.current?.(null),T(),Math.abs(K-U)<A)return;let{xDomain:z,plotWidthPx:V}=o.current,D=Math.max(1,V),y=z[1]-z[0],M=$=>z[0]+Math.min(1,Math.max(0,$/D))*y,P=M(Math.min(U,K)),X=M(Math.max(U,K));n.current(Am([P,X],i.current?.()??a.current));return}if(!g.current)return;let{dxPx:O}=g.current;g.current=null,w(),T(),O!==0&&n.current(Am(Hc(o.current.xDomain,O,o.current.plotWidthPx),i.current?.()??a.current));},[w,T]),Y=ot.useCallback(()=>{if(f.current){f.current=null,p.current?.(null),T();return}g.current&&(g.current=null,w(),T());},[w,T]),G=ot.useRef(null),I=ot.useCallback(F=>{if(G.current?.(),G.current=null,!F)return;let O=U=>{if(g.current)return;let{plotWidthPx:K,plotLeftPx:z}=o.current,V=Dm(U.deltaY,U.deltaMode),D=Dm(U.deltaX,U.deltaMode),y=d.current(U);if(!y&&D===0)return;if(U.preventDefault(),S(),y){let $=Math.min(1,Math.max(0,(U.clientX-F.getBoundingClientRect().left)/Math.max(1,K)));h.current.scale*=Math.exp(-V/200),h.current.cursorFrac=$;}else h.current.panDxPx-=D;let{scale:M,cursorFrac:P,panDxPx:X}=h.current;C((z+P*K)*(1-M)+X,M,iy(o.current.xDomain,M,P,X,K)),N(),h.current.timer=setTimeout(()=>{R(),k(),w(),T();},s.current);};F.addEventListener("wheel",O,{passive:false}),G.current=()=>F.removeEventListener("wheel",O);},[C,w,N,R,k,S,T]);return ot.useEffect(()=>()=>{G.current?.(),G.current=null,w(),h.current.timer!=null&&clearTimeout(h.current.timer);},[w]),{onPointerDown:E,onPointerMove:B,onPointerUp:H,onPointerCancel:Y,wheelTargetRef:I,gestureActiveRef:x}}var Ta=({data:e,color:t="var(--color-viz-default)",strokeWidth:r=3,strokeDasharray:o,categoryColors:n={},maxGapMs:a,animate:i=true})=>{let{xScale:s,yScale:d,animationSettings:c,entrance:l}=ba(),[u]=ot__namespace.default.useState(()=>l?.played!==true),m=i&&u,p=d.range(),g=Object.keys(n).length>0,f=T=>T.category?n[T.category]??t:t,h=T=>T.chartYValue??T.yValue,b=e??[],v=b.length===1?b[0]:void 0,x=a!=null?gc(b,a):b,C=i?void 0:"non-scaling-stroke",w=v?jsxRuntime.jsx("circle",{cx:s(v.xValue),cy:d(h(v)),r,fill:g?f(v):t}):g?b.slice(0,-1).map((T,N)=>{let k=b[N+1];return a!=null&&a>0&&k.xValue.getTime()-T.xValue.getTime()>a?null:jsxRuntime.jsx(shape.LinePath,{data:[T,k],x:R=>s(R.xValue),y:R=>d(h(R)),stroke:f(T),strokeWidth:r,strokeDasharray:o,strokeLinecap:"round",vectorEffect:C,curve:curve.curveLinear},`${T.xValue.getTime()}-${k.xValue.getTime()}`)}):jsxRuntime.jsx(shape.LinePath,{data:x,x:T=>T?s(T.xValue):0,y:T=>T?d(h(T)):0,defined:T=>T!=null,stroke:t,strokeWidth:r,strokeDasharray:o,strokeLinecap:"round",vectorEffect:C,curve:curve.curveLinear}),S={transformOrigin:`0 ${p[0]}px`,transformBox:"fill-box",isolation:"isolate"};return m?jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:c.duration,ease:c.ease},style:S,children:w}):jsxRuntime.jsx("g",{style:S,children:w})};var uy=ot.forwardRef(function({leftPx:t,topPx:r,widthPx:o,heightPx:n},a){let i=ot.useRef(null),s=ot.useRef(null),d=ot.useRef(null),c=ot.useRef(null);return ot.useImperativeHandle(a,()=>({setRange:l=>{let u=i.current;if(!u)return;if(!l||l[1]-l[0]<=0){u.setAttribute("opacity","0");return}u.setAttribute("opacity","1");let m=t+l[0]*o,p=t+l[1]*o;s.current?.setAttribute("x",String(m)),s.current?.setAttribute("width",String(p-m)),d.current?.setAttribute("x1",String(m)),d.current?.setAttribute("x2",String(m)),c.current?.setAttribute("x1",String(p)),c.current?.setAttribute("x2",String(p));}})),jsxRuntime.jsxs("g",{ref:i,opacity:0,pointerEvents:"none",children:[jsxRuntime.jsx("rect",{ref:s,x:t,y:r,width:0,height:n,fill:"var(--color-viz-categorical-1)",fillOpacity:.12}),[d,c].map((l,u)=>jsxRuntime.jsx("line",{ref:l,x1:t,x2:t,y1:r,y2:r+n,stroke:"var(--color-viz-categorical-1)",strokeOpacity:.9,strokeWidth:1,strokeDasharray:"4 3"},u))]})});var fy=e=>e.type===Wn||e.type===Ta,MM=({children:e,title:t,hideExport:r=false,hiddenSeriesLabels:o,onLegendItemToggle:n,legend:a,xMarkers:i,headerActions:s,headerControls:d,viewport:c,panBounds:l,getPanBounds:u,onViewportChange:m,onPlotWidthChange:p,yFormatter:g={type:"number"},yDomain:f,referenceLines:h,cameraSync:b,parentWidth:v=0,parentHeight:x=0})=>{let[C,w]=ot.useState(null),S=ot.useRef(null),T=ot.useRef(0),N=ot.useId(),k=ot.useRef(null),R=ot.useRef(null),L=ot.useRef(null),{colorMode:E}=hr(),B=ot.useMemo(()=>on(),[E]),A=ot.useMemo(()=>es(),[E]),{datasets:H,seriesMetadata:Y,seriesTypes:G}=ot.useMemo(()=>{let Z=un(e).filter(Tt=>ot.isValidElement(Tt)&&fy(Tt)),le=Z.filter(Tt=>Tt.props.data).length,Ae=[],Oe=[],it=[];return Z.forEach((Tt,Ot)=>{let tt=Tt.props;if(!tt.data)return;let xr="label"in tt&&tt.label||`Series ${Ae.length+1}`;Ae.push(o?.has(xr)?[]:tt.data);let yo=("color"in tt&&tt.color?tt.color:void 0)||(le===1?A:B[Ot%B.length]),ne=Tt.type===Wn;Oe.push({label:xr,color:yo,maxGapMs:tt.maxGapMs,...ne&&"baseline"in tt&&tt.baseline!==void 0?{baseline:tt.baseline,tooltipRange:"tooltipRange"in tt&&tt.tooltipRange||false}:{}}),it.push(ne?"area":"line");}),{datasets:Ae,seriesMetadata:Oe,seriesTypes:it}},[e,A,B,o]),I=va(t),F=I.expandedSize?.width??v,O=s||I.action?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s,I.action]}):void 0,{headerRef:U,headerHeight:K}=ci(!!O,!!d),{ref:z,height:V}=Hl(),D=Math.max(100,(I.expandedSize?.height??x)-K-(V||50)),y=ot.useMemo(()=>[new Date(c.startMs),new Date(c.endMs)],[c.startMs,c.endMs]),M=ot.useMemo(()=>{let Z=H.flat(),le=H.flatMap((Ae,Oe)=>Ae.filter((it,Tt)=>{let Ot=it.xValue.getTime();if(Ot>=c.startMs&&Ot<=c.endMs)return true;if(typeof f!="function")return false;let tt=Ot<c.startMs?Ae[Tt+1]:Ae[Tt-1];if(!tt)return false;let xr=tt.xValue.getTime(),gr=Y[Oe].maxGapMs;return gr!=null&&gr>0&&Math.abs(xr-Ot)>gr?false:Ot<c.startMs?xr>c.startMs:xr<c.endMs}));return le.length>0?le:Z},[H,Y,c.startMs,c.endMs,f]),P=ot.useMemo(()=>{let Z=typeof f=="function"?f(M):f,le=Cs(M,D,g,Z);if(!f){let[Ae,Oe]=le.domain();Oe>Ae&&le.domain([Ae,Oe+(Oe-Ae)*.05]);}return le},[M,D,g,f]),X=ot.useRef(JSON.stringify(g)),$=ot.useRef(null),oe=ot.useMemo(()=>{let[Z,le]=P.domain(),Ae=Math.max(Math.abs(Z),Math.abs(le)),Oe=JSON.stringify(g);if(Oe!==X.current&&(X.current=Oe,$.current=null),$.current!==null)return $.current;if(Ae===0)return Si(g,0);let it=Si(g,Ae);return $.current=it,it},[P,g]),re=ot.useMemo(()=>{let Z=D-je.top-je.bottom;return ya(Z)},[D]),_=ot.useMemo(()=>{let Z=Or(oe),le=Z.tickFormat||Z.format,Oe=P.ticks(re).map(Ot=>le(Ot)),it=cn(Oe,12,"system-ui"),Tt=Math.ceil(it)+12;return {...je,left:Math.max(Tt,30),bottom:30}},[P,oe,re]),he=ot.useMemo(()=>scale.scaleTime({domain:y,range:[_.left,F-_.right]}),[y,F,_]),me=ot.useMemo(()=>[c.startMs,c.endMs],[c.startMs,c.endMs]),ue=ot.useMemo(()=>l?[l.startMs,l.endMs]:void 0,[l]),ie=ot.useCallback(Z=>{m({startMs:Z[0],endMs:Z[1]});},[m]),fe=F-_.left-_.right,Te=ot.useCallback(()=>w(null),[]),Ye=ot.useRef({}),yt=ot.useRef(b);yt.current=b;let Qt=ot.useCallback(Z=>{R.current?.setPreview(Z),L.current?.setPreview(Z),yt.current?.publish(Ye.current,Z);},[]),Ze=ot.useRef(null),fr=ot.useRef(null),lr=ot.useCallback(Z=>{fr.current?.setRange(Z);},[]),{onPointerDown:Ce,onPointerMove:Vt,onPointerUp:ee,onPointerCancel:Be,wheelTargetRef:Ve,gestureActiveRef:nt}=sy({onSelectPreview:lr,overlayRef:Ze,xDomain:me,plotWidthPx:fe,plotLeftPx:_.left,groupRef:k,onCommit:ie,onGestureStart:Te,onFramePreview:Qt,...ue?{panBoundsMs:ue}:{},...u?{getPanBoundsMs:()=>{let Z=u();return [Z.startMs,Z.endMs]}}:{}}),wt=ot.useRef({startMs:c.startMs,endMs:c.endMs,left:0,width:0});wt.current={startMs:c.startMs,endMs:c.endMs,left:_.left,width:fe},ot.useEffect(()=>{if(!b)return;let Z=()=>{k.current?.removeAttribute("transform"),R.current?.setPreview(null),L.current?.setPreview(null);},le=Oe=>{if(nt.current)return;if(Oe==null){Z();return}let{startMs:it,endMs:Tt,left:Ot,width:tt}=wt.current,xr=Tt-it,gr=Oe[1]-Oe[0];if(xr<=0||gr<=0||tt<=0)return;let yo=xr/gr,ne=Ot*(1-yo)+(it-Oe[0])*tt/gr;k.current?.setAttribute("transform",`translate(${ne},0) scale(${yo},1)`),R.current?.setPreview(Oe),L.current?.setPreview(Oe);},Ae=b.subscribe(Ye.current,le);return ()=>{Ae(),nt.current||Z();}},[b,nt]),ot.useEffect(()=>{p?.(Math.max(0,F-_.left-_.right));},[F,_,p]);let Xt=ot.useCallback(Z=>{if(nt.current)return;let{left:le}=S.current?.getBoundingClientRect()||{left:0},Ae=Z.clientX-le;Z.timeStamp-(T.current||0)<16||(T.current=Z.timeStamp,w(ey({mouseX:Ae,datasets:H,seriesMetadata:Y,seriesTypes:G,xScale:he,yScale:P,plotLeft:_.left,plotRight:F-_.right})));},[H,Y,G,he,P,F,_,nt]),Q=ot.useCallback(()=>w(null),[]),j=fc(),pe={width:F,height:D,xScale:he,yScale:P,yFormatter:oe,animationSettings:mc,entrance:j,tooltip:{data:C,show:w,hide:()=>w(null)},datasets:H,seriesMetadata:Y,seriesTypes:G},ae=0,Ne=[];un(e).forEach(Z=>{if(!ot.isValidElement(Z)){Ne.push(Z);return}if(fy(Z)){let le=ae;ae++;let Ae=Z.props;Ne.push(ot__namespace.default.cloneElement(Z,{...Ae,...Y[le]&&o?.has(Y[le].label)?{data:[]}:{},color:Y[le]?.color,animate:false}));}else Ne.push(Z);});let Qe=a??Y.map(Z=>({category:Z.label,fill:Z.color,isHidden:o?.has(Z.label)??false})),Ue=Tc({datasets:H,metadata:{xLabel:"Date",yLabel:"Value",seriesLabels:Y.map(Z=>Z.label),timestamp:true},svgRef:S}),cr=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("title",{children:t}),jsxRuntime.jsx("g",{children:P.ticks(re).map(Z=>{let le=Math.abs(Z)<Number.EPSILON;return jsxRuntime.jsx(shape.Line,{from:{x:_.left,y:P(Z)},to:{x:F-_.right,y:P(Z)},stroke:le?"var(--color-border-default)":"var(--color-border-muted)",strokeWidth:le?1.5:1},`grid-line-${Z}`)})}),jsxRuntime.jsx(Lm,{ref:L,scale:he,width:F-_.left-_.right,top:P.range()[1],bottom:P.range()[0]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:N,children:jsxRuntime.jsx("rect",{x:he.range()[0],y:P.range()[1],width:he.range()[1]-he.range()[0],height:P.range()[0]-P.range()[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${N})`,children:jsxRuntime.jsx("g",{"data-camera-plot-group":"",ref:k,children:Ne})}),h&&h.length>0&&jsxRuntime.jsx("g",{children:h.map((Z,le)=>{let Ae=P(Z.value),Oe=Z.color??"var(--color-error-base)";return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(shape.Line,{from:{x:_.left,y:Ae},to:{x:F-_.right,y:Ae},stroke:Oe,strokeWidth:1.5,strokeDasharray:"6 4"}),Z.label&&jsxRuntime.jsx("text",{x:F-_.right-4,y:Ae-4,textAnchor:"end",fontSize:11,fill:Oe,children:Z.label})]},`ref-line-${le}`)})}),jsxRuntime.jsx(Em,{ref:R,top:D-_.bottom,scale:he,width:F-_.left-_.right}),jsxRuntime.jsx(po.Left,{left:_.left,scale:P,yFormatter:oe,height:D-_.top-_.bottom}),C&&!C.isEvent&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(shape.Line,{"data-testid":"chart-hover-crosshair",from:{x:he(C.xValue),y:P.range()[1]},to:{x:he(C.xValue),y:P.range()[0]},stroke:"var(--color-text-secondary)",strokeWidth:1,strokeDasharray:"3 3",opacity:.7}),C.series.filter(Z=>Z.type!=="bar"&&Z.showMarker!==false).map(Z=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("circle",{cx:he(C.xValue),cy:P(Z.chartY??Z.value),r:8,fill:"white",stroke:Z.color,strokeWidth:2,style:{transition:"all 100ms ease-out"}}),jsxRuntime.jsx("circle",{cx:he(C.xValue),cy:P(Z.chartY??Z.value),r:4,fill:Z.color,style:{transition:"all 100ms ease-out"}})]},`highlight-${Z.label}`))]}),jsxRuntime.jsx("rect",{"data-camera-surface":"",x:_.left,y:_.top,width:F-_.left-_.right,height:D-_.top-_.bottom,fill:"transparent",style:{cursor:"grab",touchAction:"none"},onMouseMove:Xt,onMouseLeave:Q,onPointerDown:Ce,onPointerMove:Vt,onPointerUp:ee,onPointerCancel:Be,onContextMenu:Z=>{(Z.ctrlKey||Z.metaKey)&&Z.preventDefault();},ref:Ve}),jsxRuntime.jsx("g",{ref:Ze,children:i?.map(Z=>{let le=he(new Date(Z.timeMs));if(!Number.isFinite(le)||le<_.left||le>F-_.right)return null;let Ae=Z.color??"var(--color-error-base)",Oe=()=>{Z.point&&w({xValue:new Date(Z.timeMs),series:[{label:Z.point.label,value:Z.point.value,color:Ae,showMarker:false}],x:le,y:P(Z.point.value),position:le>(_.left+(F-_.right))/2?"left":"right"});};return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:le,x2:le,y1:_.top,y2:D-_.bottom,stroke:"transparent",strokeWidth:7,onMouseMove:Z.point?Oe:Xt,onMouseLeave:Q}),jsxRuntime.jsx("line",{x1:le,x2:le,y1:_.top,y2:D-_.bottom,stroke:Ae,strokeWidth:1,strokeOpacity:.75,vectorEffect:"non-scaling-stroke",pointerEvents:"none"})]},`${Z.timeMs}:${Z.label}`)})}),jsxRuntime.jsx(uy,{ref:fr,leftPx:_.left,topPx:_.top,widthPx:F-_.left-_.right,heightPx:D-_.top-_.bottom})]});return I.present(jsxRuntime.jsx("div",{className:"relative flex h-full flex-col",children:jsxRuntime.jsxs(uo.Provider,{value:pe,children:[jsxRuntime.jsx(di,{title:t,controls:d,actions:O,containerRef:U}),jsxRuntime.jsx("svg",{width:F,height:D,className:"overflow-visible",ref:S,role:"img","aria-label":t,children:cr}),jsxRuntime.jsx(Wo,{data:C,formatter:oe}),jsxRuntime.jsx("div",{ref:z,children:jsxRuntime.jsx(Ti,{onExport:Ue,items:Qe,hideExport:r,marginLeft:12,marginRight:12,...n&&{onLegendItemToggle:n}})})]})}))},Ls=responsive.withParentSize(MM);var LM={single:[],band:["net"],pair:["import","export"]};function DM({kind:e,series:t,seriesKeys:r}){let o=r??LM[e];return e==="single"?[t.line]:e==="band"?[...o.map(n=>t.lines[n]??[]),t.band.filter(n=>Number.isFinite(n.baselineValue))]:o.map(n=>t.lines[n]??[])}function AM(e){let{viewport:t,maxDataTimeMs:r}=e,o=null;for(let n of DM(e))for(let a of n){let i=a.xValue.getTime();Number.isFinite(i)&&Number.isFinite(a.yValue)&&i>=t.startMs&&i<t.endMs&&i<=r&&(o===null||i>o)&&(o=i);}return o}function gy(e){let t=ot.useId(),r=AM(e),o=r===null?null:new Date(r);return jsxRuntime.jsxs("span",{className:"inline-flex max-w-full flex-wrap items-baseline gap-x-1","aria-describedby":t,title:"Time marks the start of the latest interval with data plotted in this view.",children:[jsxRuntime.jsx("span",{children:"Latest data in view:"}),o?jsxRuntime.jsx("time",{dateTime:o.toISOString(),className:"font-medium text-text-primary",children:o.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"})}):jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:"Unavailable"}),jsxRuntime.jsx("span",{id:t,className:"sr-only",children:"Time marks the start of the latest interval with data plotted in this view."})]})}var BM={live:"Receiving updates",connecting:"Waiting for next update",reconnecting:"Reconnecting\u2026",stale:"No recent updates",delayed:"Measurements delayed","refresh-failed":"Update delayed"};function by({label:e,checked:t,onChange:r,status:o,disabledReason:n,waitingDescription:a}){let i=ot.useId(),s=t&&o==="live",d=n||(t?BM[o]:void 0);return jsxRuntime.jsxs("div",{className:"flex max-w-full shrink-0 flex-col items-end gap-1",children:[jsxRuntime.jsxs(te,{variant:"ghost",size:"sm","aria-label":e,"aria-pressed":t,...d&&{"aria-describedby":i},isDisabled:!!n,onPress:()=>r(!t),className:t?"text-text-primary":"text-text-secondary",children:[jsxRuntime.jsx("span",{"aria-hidden":"true","data-live-indicator":s?"live":"neutral",className:`size-1.5 shrink-0 rounded-full ${s?"bg-error-base":"bg-text-secondary"}`}),jsxRuntime.jsx("span",{children:t?"Live":"Static"})]}),jsxRuntime.jsxs("span",{id:i,role:"status","aria-atomic":"true",className:"max-w-64 text-right text-xs text-text-secondary",children:[d,!n&&t&&o==="connecting"&&a&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[". ",a]})]})]})}var HM=1440*60*1e3,Vm=6e4,xy=(e,t)=>({startMs:t-e*HM,endMs:t}),GM=e=>({after:new Date(e.startMs),before:new Date(e.endMs)});function Yc({source:e,hideExport:t=false,hideWindowSummary:r=false,leadingControls:o,trailingControls:n,xMarkers:a,legend:i,hiddenSeriesLabels:s,onLegendItemToggle:d,title:c,liveControl:l,initialRange:u,viewportEnd:m,yFormatter:p,yDomain:g,referenceLines:f,emptyState:h,presetRanges:b,tierToWindow:v,windowSizeOptions:x,height:C=360,fitParent:w=false,hint:S,dataBounds:T,onViewChange:N,followLatest:k=false,followLatestKey:R,children:L,latestDataReadout:E,latestDataSeriesKeys:B,renderMetadata:A,panels:H}){let Y=H!==void 0&&H.length>0,G=ot.useMemo(()=>Y?Oc():void 0,[Y]),[I,F]=ot.useState(900),O=e.refreshEnabled!==false,U=T?.endMs,[K,z]=ot.useState(()=>U??Date.now()),V=m?.getTime()??U,D=k&&m===void 0&&T===void 0,[y,M]=ot.useState(true),[P,X]=ot.useState(null),$=D&&y,[oe,re]=ot.useState({resetKey:e.resetKey,automatic:false}),_=m===void 0&&T===void 0&&y,he=u?.days??30,me=ot.useMemo(()=>xy(he,V??Date.now()),[he,V]),ue=ot.useRef({resetKey:e.resetKey,refreshKey:e.refreshKey,refreshEnabled:O,followLatestKey:R}),ie=O&&(ue.current.resetKey!==e.resetKey||ue.current.refreshKey!==e.refreshKey||ue.current.refreshEnabled===false),fe=ue.current.resetKey===e.resetKey,Te=D&&ue.current.followLatestKey!==R,Ye=U??(ie||Te?Date.now():K);ot.useEffect(()=>{ue.current={resetKey:e.resetKey,refreshKey:e.refreshKey,refreshEnabled:O,followLatestKey:R},(ie||Te)&&(fe&&re({resetKey:e.resetKey,automatic:true}),z(Ye));},[e.resetKey,e.refreshKey,O,R,ie,Te,Ye,fe]);let[yt,Qt]=ot.useState(null),[Ze,fr]=ot.useState(null),lr=yt??me,Ce=Tm({fetchTile:e.fetchTile,ladder:e.ladder,nativeMs:e.nativeMs,initialViewport:me,widthPx:I,maxFutureMs:Ye,tileCostSeriesCount:e.tileCostSeriesCount,resetKey:e.resetKey,...e.refreshKey!==void 0&&{refreshKey:e.refreshKey},refreshEnabled:O&&P===null,automaticLoads:($||Te)&&(oe.resetKey===e.resetKey&&oe.automatic||fe&&(ie||Te))}),Vt=Ce.series.targetTier.bucketMs,ee=D?(Math.floor(Ye/Vt)+1)*Vt:Ye,Be=V==null?Math.max(ee,Ce.viewport.endMs):ee,Ve=ot.useMemo(()=>({startMs:T?.startMs??0,endMs:Be}),[T?.startMs,Be]),nt=Le=>{let J=V==null?Math.max(Ve.endMs,Date.now()):Ve.endMs,se=Math.min(Le.endMs-Le.startMs,J-Ve.startMs),Pe=Math.max(Math.min(Le.endMs,J),Ve.startMs+se);return {startMs:Pe-se,endMs:Pe}},wt=(Le,J=true)=>{re({resetKey:e.resetKey,automatic:false});let se=Math.abs(Ve.endMs-Le)<=Vm||Math.abs(Date.now()-Le)<=Vm,Pe=J&&se;O&&X(""),M(Pe),U==null&&z(Date.now());};ot.useEffect(()=>{if(U!=null){z(U);return}if(!O)return;let Le,J=(Pe=true)=>{let Re=Date.now();Pe&&$&&re({resetKey:e.resetKey,automatic:true}),z(Re);let He=Vt-Re%Vt;Le=setTimeout(J,Math.min(Vm,He));},se=()=>{document.visibilityState==="visible"&&(clearTimeout(Le),J());};return J(false),document.addEventListener("visibilitychange",se),()=>{clearTimeout(Le),document.removeEventListener("visibilitychange",se);}},[U,Vt,O,$,e.resetKey]);let Xt=ot.useRef(R);ot.useEffect(()=>{let Le=Xt.current!==R;Xt.current=R,!(!Le||!D)&&(M(true),z(Date.now()));},[D,R]),ot.useEffect(()=>{$&&O&&z(Date.now());},[$,O,e.resetKey,e.refreshKey]);let Q=Ce.jumpTo,{startMs:j,endMs:pe}=Ce.viewport;ot.useEffect(()=>{if(!$)return;let Le=Math.max(pe-j,Vt);ee===pe&&Le===pe-j||(re({resetKey:e.resetKey,automatic:true}),Q({startMs:ee-Le,endMs:ee}));},[$,ee,j,pe,Vt,Q,e.resetKey]);let ae=ot.useMemo(()=>Ac(()=>V??Date.now()),[V]),Ne=b??ae,Qe=()=>{if(Ze&&"presetId"in Ze){let Le=Ne.find(J=>J.id===Ze.presetId);if(Le){let J=Le.getRange();return {startMs:J.after.getTime(),endMs:J.before.getTime()}}}return Ze&&"range"in Ze?Ze.range:xy(he,V??Date.now())},{coverage:Ue,renderTier:cr,targetTier:Z,isFallback:le,isStale:Ae}=Ce.series,Oe=Z.id,it=cr?.id??null,{startMs:Tt,endMs:Ot}=Ce.viewport,tt=ot.useRef(N);ot.useEffect(()=>{tt.current=N;},[N]),ot.useEffect(()=>{tt.current?.({targetTierId:Oe,renderedTierId:it,viewport:{startMs:Tt,endMs:Ot},followingLatest:$,atLiveEdge:_});},[Oe,it,Tt,Ot,$,_]),ot.useEffect(()=>{if(P===null)return;let Le=`${Oe}:${Tt}:${Ot}`;X(P===Le?null:Le);},[P,Oe,Tt,Ot]);let xr=cr?cr.bucketMs*1.5:0,gr=Le=>Le==null?"\u2014":new Date(Le).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),yo=(Le,J)=>{let se=J-Le<1728e5?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{month:"short",day:"numeric",year:"numeric"},Pe=new Intl.DateTimeFormat("en-US",se);return `${Pe.format(new Date(Le))} \u2013 ${Pe.format(new Date(J))}`},ne=$?Ce.viewport.endMs-Ce.viewport.startMs!==lr.endMs-lr.startMs:Ce.viewport.startMs!==lr.startMs||Ce.viewport.endMs!==lr.endMs,Se=Ae||Ce.loading&&Ue.earliestMs==null,ce=(Ce.viewport.endMs-Ce.viewport.startMs)*.03,ct=!Se&&Ue.earliestMs!=null&&Ue.earliestMs>Ce.viewport.startMs+ce,yr=!Ce.loading&&Ue.earliestMs==null&&Ue.latestMs==null&&!Ca(Ce.series)&&!Ae,vo=va(c),Co=zl(),Cl=typeof a=="function"?a(Ce.series):a,Pu=vy(L({series:Ce.series,gapMs:xr})),Zi=jsxRuntime.jsxs("div",{className:`flex flex-col gap-3${vo.isExpanded||w?" h-full":""}`,children:[o&&jsxRuntime.jsx("div",{className:"flex flex-wrap items-center gap-3",children:o}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-start gap-2",children:[jsxRuntime.jsx("div",{className:"min-w-0 flex-[1_1_16rem]",children:jsxRuntime.jsx(Bc,{dateRange:GM(Ce.viewport),onDateRangeChange:(Le,J)=>{let se=nt({startMs:Le.after.getTime(),endMs:Le.before.getTime()});wt(se.endMs,!!J?.presetId),fr(J?.presetId?{presetId:J.presetId}:{range:se}),Qt(se),Ce.jumpTo(se);},windowSize:v[Z.id],windowSizeOptions:x,lockWindowSize:true,presetRanges:Ne,allowDatePicker:true,showReset:false})}),jsxRuntime.jsxs("div",{className:"ml-auto flex max-w-full flex-wrap items-start gap-2",children:[l&&jsxRuntime.jsx(by,{...l,status:Ce.refreshError?"refresh-failed":l.status}),S&&!yr&&jsxRuntime.jsx(Vc,{label:`About ${c}`,children:S}),!vo.isExpanded&&!yr&&vo.action]})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-text-secondary",children:[!r&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("span",{children:["Window"," ",jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:yo(Ce.viewport.startMs,Ce.viewport.endMs)})]}),jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"\u2022"}),jsxRuntime.jsxs("span",{children:["Resolution ",jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:cr?.id??Z.id}),le&&jsxRuntime.jsxs("span",{className:"text-text-tertiary",children:[" \xB7 loading ",Z.id]})]})]}),E&&jsxRuntime.jsx(gy,{kind:E,series:Ce.series,viewport:Ce.viewport,maxDataTimeMs:Ye,...B!==void 0?{seriesKeys:B}:{}}),A?.({series:Ce.series,viewport:Ce.viewport,maxDataTimeMs:Ye}),Ce.loading&&jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"loading\u2026"}),Ce.refreshError&&jsxRuntime.jsx("span",{role:"status",className:"text-text-tertiary",children:Ue.earliestMs==null?"Unable to load telemetry":"Refresh failed \xB7 showing previous data"}),ct&&jsxRuntime.jsxs("span",{className:"text-text-tertiary",children:["showing available history from ",gr(Ue.earliestMs)]}),!r&&!ct&&!Se&&Ce.atDataStart&&jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"no earlier data loaded"})]}),Y&&!Co&&jsxRuntime.jsx("span",{className:"text-[11px] font-medium text-text-secondary",children:c}),jsxRuntime.jsxs("div",{className:`relative overflow-hidden rounded-md border border-border-subtle${vo.isExpanded||w?" min-h-0 flex-1":""}`,style:vo.isExpanded||w?void 0:{height:C},children:[ne&&!yr&&jsxRuntime.jsx("div",{className:"absolute top-2 right-2 z-10",children:jsxRuntime.jsx(te,{variant:"secondary",size:"sm",onPress:()=>{let Le=nt(Qe());wt(Le.endMs,!(Ze&&"range"in Ze)),Qt(Le),Ce.jumpTo(Le);},children:"\u27F2 Reset"})}),yr?jsxRuntime.jsx(ki,{title:h.title,description:h.description}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ls,{title:c,hideExport:t,viewport:Ce.viewport,panBounds:Ve,getPanBounds:()=>({startMs:Ve.startMs,endMs:U??Math.max(Ve.endMs,Date.now())}),onViewportChange:Le=>{wt(Le.endMs),Ce.onViewportChange(Le);},onPlotWidthChange:F,...G&&{cameraSync:G},...p&&{yFormatter:p},...g&&{yDomain:g},...f&&{referenceLines:f},...Cl?.length&&{xMarkers:Cl},...i&&{legend:i},...s&&{hiddenSeriesLabels:s},...d&&{onLegendItemToggle:d},children:Pu}),Ce.loading&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-0.5 animate-pulse bg-[var(--color-viz-categorical-1)] opacity-60"})]})]}),Y&&H.map(Le=>jsxRuntime.jsx(WM,{panel:Le,hideExport:Le.hideExport??t,viewport:Ce.viewport,panBounds:Ve,staticEndMs:U,maxFutureMs:Ye,widthPx:I,onViewportChange:J=>{wt(J.endMs),Ce.onViewportChange(J);},...G&&{cameraSync:G}},Le.key)),n&&jsxRuntime.jsx("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1",children:jsxRuntime.jsx("div",{className:"ml-auto flex flex-wrap items-center gap-x-4 gap-y-1",children:n})})]});return jsxRuntime.jsx(ym,{children:vo.present(Zi)})}function vy(e){return ot.isValidElement(e)&&e.type===ot.Fragment?e.props.children:e}function WM({panel:e,hideExport:t,viewport:r,panBounds:o,staticEndMs:n,maxFutureMs:a,widthPx:i,onViewportChange:s,cameraSync:d}){let c=Dc({fetchTile:e.source.fetchTile,ladder:e.source.ladder,nativeMs:e.source.nativeMs,viewport:r,widthPx:i,maxFutureMs:a,resetKey:e.source.resetKey,tileCostSeriesCount:e.source.tileCostSeriesCount,...e.source.refreshKey!==void 0?{refreshKey:e.source.refreshKey}:{},...e.source.refreshEnabled!==void 0?{refreshEnabled:e.source.refreshEnabled}:{}}),l=c.series.renderTier?c.series.renderTier.bucketMs*1.5:0;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx("span",{className:"text-[11px] font-medium text-text-secondary",children:e.title}),jsxRuntime.jsxs("div",{className:"relative overflow-hidden rounded-md border border-border-subtle",style:{height:e.height??220},children:[jsxRuntime.jsx(Ls,{title:e.title,hideExport:t,viewport:r,panBounds:o,getPanBounds:()=>({startMs:o.startMs,endMs:n??Math.max(o.endMs,Date.now())}),onViewportChange:s,...d&&{cameraSync:d},...e.yFormatter&&{yFormatter:e.yFormatter},...e.yDomain&&{yDomain:e.yDomain},...e.referenceLines&&{referenceLines:e.referenceLines},...e.legend&&{legend:e.legend},...e.hiddenSeriesLabels&&{hiddenSeriesLabels:e.hiddenSeriesLabels},...e.onLegendItemToggle&&{onLegendItemToggle:e.onLegendItemToggle},children:vy(e.children({series:c.series,gapMs:l}))}),c.loading&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-0.5 animate-pulse bg-[var(--color-viz-categorical-1)] opacity-60"})]})]})}var XM=12;function Cy(e){let t=Number.isFinite(e)?Math.max(1,Math.floor(e)):1,r=0,o=[],n=()=>{for(;o.length>0;){let i=o[0];if(r+i.permits>t)return;o.shift(),r+=i.permits,i.grant();}},a=i=>()=>{r=Math.max(0,r-i),n();};return {acquire(i=1){let s=Math.min(t,Number.isFinite(i)?Math.max(1,Math.floor(i)):1);return o.length===0&&r+s<=t?(r+=s,Promise.resolve(wy(a(s)))):new Promise(d=>{o.push({permits:s,grant:()=>d(wy(a(s)))});})},get stats(){return {active:r,waiting:o.length}}}}function Sy(){let e=new Error("The operation was aborted.");return e.name="AbortError",e}function wy(e){let t=false;return ()=>{t||(t=true,e());}}var JM=()=>{},jM={acquire:()=>Promise.resolve(JM),stats:{active:0,waiting:0}},Om=ot.createContext(null);function Ny({maxConcurrent:e,children:t}){let r=ot.useContext(Om),o=ot.useMemo(()=>e!==void 0?Cy(e):r??Cy(XM),[e,r]);return ot.createElement(Om.Provider,{value:o},t)}function zm(){return ot.useContext(Om)??jM}function Hm(e,t,r=1){return async(...o)=>{let n=o[3],a=()=>n instanceof AbortSignal&&n.aborted;if(a())throw Sy();let i=await e.acquire(r);try{if(a())throw Sy();return await t(...o)}finally{i();}}}var Ry=ot.createContext(null),My=ot.createContext(null);function Ey({resolve:e,host:t,maxConcurrentFetches:r,children:o}){return jsxRuntime.jsx(Ry.Provider,{value:e??null,children:jsxRuntime.jsx(My.Provider,{value:t??null,children:jsxRuntime.jsx(Ny,{...r!==void 0?{maxConcurrent:r}:{},children:o})})})}function Ds(){return ot.useContext(Ry)}function As(){return ot.useContext(My)}var Iy="line";function QM(e,t){return t===Iy?e.line:t==="band"?e.band:e.lines[t]??[]}function Fy(e){let t=0;for(let r of e)typeof r?.bucketMs=="number"&&Number.isFinite(r.bucketMs)&&r.bucketMs>0&&(t=t===0?r.bucketMs:Math.min(t,r.bucketMs));return t}function Xc(e){let t=As();return t?jsxRuntime.jsx(t,{source:e.source,children:r=>r?jsxRuntime.jsx(By,{...e,resolved:r}):jsxRuntime.jsx(Ly,{...e})}):jsxRuntime.jsx(Ly,{...e})}function By(e){let t=e.panels;return !t||t.length===0?jsxRuntime.jsx(Dy,{...e}):jsxRuntime.jsx(Vy,{panels:t,index:0,acc:[],render:r=>jsxRuntime.jsx(Dy,{...e,resolvedPanels:r})})}function Ly(e){let t=Ds(),r=ot.useMemo(()=>t?.(e.source)??null,[t,e.source]);return r?jsxRuntime.jsx(By,{...e,resolved:r}):jsxRuntime.jsx(ki,{icon:"ChartLine",title:e.emptyState?.title??"No data source",description:e.emptyState?.description??"This chart's data source is unavailable."})}function Dy({source:e,title:t,children:r,yFormatter:o,yDomain:n,referenceLines:a,headerActions:i,height:s,hint:d,emptyState:c,tierToWindow:l,windowSizeOptions:u,presetRanges:m,latestDataReadout:p,latestDataSeriesKeys:g,resolved:f,resolvedPanels:h=[]}){let b=Ec(e.viewportEnd),v=zm(),C={fetchTile:ot.useMemo(()=>Hm(v,f.fetchSlice,f.fetchesPerSlice??1),[v,f.fetchSlice,f.fetchesPerSlice]),ladder:e.ladder,...f.refreshEnabled!==void 0?{refreshEnabled:f.refreshEnabled}:{},nativeMs:f.nativeMs??e.nativeMs??Fy(e.ladder),resetKey:e.resetKey??"",...f.refreshKey!==void 0?{refreshKey:f.refreshKey}:e.refreshKey!==void 0?{refreshKey:e.refreshKey}:{},tileCostSeriesCount:f.costSeriesCount??1};return jsxRuntime.jsx(Yc,{title:t,source:C,yFormatter:o,...n!==void 0?{yDomain:n}:{},...a!==void 0?{referenceLines:a}:{},...i!==void 0?{headerActions:i}:{},...s!==void 0?{height:s}:{fitParent:true},...f.liveControl!==void 0?{liveControl:f.liveControl}:{},...f.onViewChange!==void 0?{onViewChange:f.onViewChange}:{},...f.followLatest!==void 0?{followLatest:f.followLatest}:{},...f.followLatestKey!==void 0?{followLatestKey:f.followLatestKey}:{},...d!==void 0?{hint:d}:{},...e.initialRange!==void 0?{initialRange:e.initialRange}:{},...b!==null?{viewportEnd:b}:{},...m!==void 0?{presetRanges:m}:{},...p!==void 0?{latestDataReadout:p}:{},...g!==void 0?{latestDataSeriesKeys:g}:{},emptyState:c??{title:"No data",description:"No readings in this window."},tierToWindow:l??{},windowSizeOptions:u??[],...h.length>0?{panels:h}:{},children:({series:w,gapMs:S})=>zy(r,w,S)})}function Vy({panels:e,index:t,acc:r,render:o}){if(t>=e.length)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:o(r)});let n=e[t];return jsxRuntime.jsx(_M,{panel:n,children:a=>jsxRuntime.jsx(Vy,{panels:e,index:t+1,acc:a?[...r,a]:r,render:o})})}function _M({panel:e,children:t}){let r=As();return r?jsxRuntime.jsx(r,{source:e.source,children:o=>o?jsxRuntime.jsx(Oy,{panel:e,resolved:o,children:t}):jsxRuntime.jsx(Ay,{panel:e,children:t})}):jsxRuntime.jsx(Ay,{panel:e,children:t})}function Ay({panel:e,children:t}){let r=Ds(),o=ot.useMemo(()=>r?.(e.source)??null,[r,e.source]);return o?jsxRuntime.jsx(Oy,{panel:e,resolved:o,children:t}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:t(null)})}function Oy({panel:e,resolved:t,children:r}){let o=zm(),n=ot.useMemo(()=>Hm(o,t.fetchSlice,t.fetchesPerSlice??1),[o,t.fetchSlice,t.fetchesPerSlice]),a=ot.useMemo(()=>({key:e.key,title:e.title,source:{fetchTile:n,ladder:e.source.ladder,nativeMs:t.nativeMs??e.source.nativeMs??Fy(e.source.ladder),resetKey:e.source.resetKey??"",tileCostSeriesCount:t.costSeriesCount??1,...t.refreshEnabled!==void 0?{refreshEnabled:t.refreshEnabled}:{},...t.refreshKey!==void 0?{refreshKey:t.refreshKey}:e.source.refreshKey!==void 0?{refreshKey:e.source.refreshKey}:{}},...e.yFormatter!==void 0?{yFormatter:e.yFormatter}:{},...e.yDomain!==void 0?{yDomain:e.yDomain}:{},...e.referenceLines!==void 0?{referenceLines:e.referenceLines}:{},...e.height!==void 0?{height:e.height}:{},children:({series:i,gapMs:s})=>zy(e.children,i,s)}),[e,n,t.nativeMs,t.costSeriesCount,t.refreshEnabled,t.refreshKey]);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r(a)})}function zy(e,t,r){return un(e).map(o=>{if(!ot.isValidElement(o))return o;let n=o.props;if(n.data)return o;let a=QM(t,n.seriesKey??Iy);return ot.cloneElement(o,{data:a,maxGapMs:r,...n.labelFromData?{label:n.labelFromData(a,t)}:{}})})}var Wy=e=>e.type===Wn||e.type===Ta||e.type===bc,aE=e=>e.type===kc||e.type===Pc,Uy=280,iE=d3Array.bisector(e=>e.xValue).left,sE=()=>jsxRuntime.jsx("div",{className:"flex h-full items-center justify-center",children:jsxRuntime.jsx("p",{className:"text-text-secondary",children:"No data available"})}),lE=()=>jsxRuntime.jsxs("div",{className:"flex h-full flex-col gap-4 p-4",children:[jsxRuntime.jsx(q,{className:"h-full w-full"}),jsxRuntime.jsxs("div",{className:"flex gap-4",children:[jsxRuntime.jsx(q,{className:"h-4 w-24"}),jsxRuntime.jsx(q,{className:"h-4 w-24"})]})]}),cE=({parentWidth:e,parentHeight:t,yFormatter:r={type:"number"},yDomain:o,referenceLines:n,isLoading:a=false,enableZoom:i=false,enableBrush:s=false,brushHeight:d=60,onZoomChange:c,zoomDomain:l,hiddenSeriesLabels:u,onHiddenSeriesChange:m,hideBottomBar:p=false,headerActions:g,headerControls:f,title:h,children:b})=>{let v=u!==void 0,x=l!==void 0,[C,w]=ot.useState(null),[S,T]=ot.useState(null),N=x?l:S,[k,R]=ot.useState(()=>new Set),L=v?u:k,E=ot.useRef(null),B=ot.useId(),A=ot.useRef(0),H=ot.useRef(""),Y=ot.useRef(null),{colorMode:G}=hr(),I=ot.useMemo(()=>on(),[G]),F=ot.useMemo(()=>es(),[G]),{datasets:O,seriesMetadata:U,categoryInfo:K,categoryColors:z,categoryLabels:V,seriesTypes:D}=ot.useMemo(()=>{let se=un(b).filter(Ge=>ot.isValidElement(Ge)&&Wy(Ge)),Pe=se.filter(Ge=>Ge.props.data).length,Re=[],He=[],ut=[],Nt=null,ze=null;se.forEach((Ge,Mt)=>{let Ie=Ge.props;if(!Ie.data)return;Re.push(Ie.data);let tn=("color"in Ie&&Ie.color?Ie.color:void 0)||(Pe===1?F:I[Mt%I.length]),rn=Ge.type===Wn;He.push({label:"label"in Ie&&Ie.label||`Series ${Re.length}`,color:tn,...rn&&"baseline"in Ie&&Ie.baseline!==void 0?{baseline:Ie.baseline,tooltipRange:"tooltipRange"in Ie&&Ie.tooltipRange||false}:{}});let ra=rn?"area":Ge.type===Ta?"line":"bar";ut.push(ra),"categoryColors"in Ie&&Ie.categoryColors&&(Nt=Ie.categoryColors),"categoryLabels"in Ie&&Ie.categoryLabels&&(ze=Ie.categoryLabels);});let vt=null;if(Nt){let Ge=new Set;Re.forEach(Mt=>{Mt.forEach(Ie=>{Ie.category&&Ge.add(Ie.category);});}),vt=Array.from(Ge).map(Mt=>({label:ze?.[Mt]||Mt,color:Nt[Mt]||"#6b7280"}));}return {datasets:Re,seriesMetadata:He,categoryInfo:vt,categoryColors:Nt,categoryLabels:ze,seriesTypes:ut}},[b,F,I,G]),y=va(h),M=y.expandedSize?.width??e,P=y.expandedSize?.height??t,$=!p?y.action:null,oe=g||$?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g,$]}):void 0,{headerRef:re,headerHeight:_}=ci(!!oe,!!f),he=p?0:60,me=s?d+8:0,ue=P-_-he-me,ie=Math.max(100,ue),fe=ot.useCallback(J=>J?L.has(J):false,[L]),Te=ot.useMemo(()=>U.map((J,se)=>fe(J.label)?null:se).filter(J=>J!==null),[U,fe]),Ye=ot.useMemo(()=>Te.map(J=>O[J]).filter(J=>!!J),[O,Te]),yt=ot.useMemo(()=>Te.map(J=>U[J]).filter(J=>!!J),[U,Te]),Qt=ot.useMemo(()=>Te.map(J=>D[J]).filter(J=>!!J),[D,Te]),Ze=Qt.findIndex(J=>J==="bar"),fr=Ze!==-1,lr=ot.useCallback((J,se)=>{let Pe=J.has(se);if(!Pe&&U.reduce((ut,Nt)=>J.has(Nt.label)||Nt.label===se?ut:ut+1,0)<1)return J;let Re=new Set(J);return Pe?Re.delete(se):Re.add(se),Re},[U]),Ce=ot.useCallback(J=>{if(v){let se=u;if(!se.has(J)&&U.reduce((He,ut)=>se.has(ut.label)||ut.label===J?He:He+1,0)<1){w(null);return}m?.(Re=>lr(Re,J));}else R(se=>lr(se,J));w(null);},[v,u,m,U,lr]),Vt=ot.useMemo(()=>U.map(J=>J.label).join(""),[U]),ee=ot.useRef(Vt);ot.useEffect(()=>{ee.current!==Vt&&(ee.current=Vt,v||R(J=>J.size===0?J:new Set));},[Vt,v]);let Be=ot.useMemo(()=>Ye.flat(),[Ye]),Ve=ot.useMemo(()=>{if(Be.length===0)return null;let J=[...Be].sort((se,Pe)=>se.xValue.getTime()-Pe.xValue.getTime());return [J[0].xValue,J[J.length-1].xValue]},[Be]),wt=N||Ve,Xt=ot.useCallback(J=>{x?c?.(J):T(J);},[x,c]),Q=ot.useMemo(()=>wt?O.map(se=>se.filter(Pe=>Pe.xValue>=wt[0]&&Pe.xValue<=wt[1])):O,[O,wt]),j=ot.useMemo(()=>Te.map(J=>Q[J]??[]),[Te,Q]);ot.useEffect(()=>{c&&c(N);},[N,c]);let pe=ot.useMemo(()=>Te.flatMap(J=>Q[J]??[]),[Q,Te]),ae=ot.useMemo(()=>Cs(pe,ie,r,o),[pe,ie,r,o]),Ne=ot.useRef(JSON.stringify(r)),Qe=ot.useRef(null),Ue=ot.useMemo(()=>{let[J,se]=ae.domain(),Pe=Math.max(Math.abs(J),Math.abs(se)),Re=JSON.stringify(r);if(Re!==Ne.current&&(Ne.current=Re,Qe.current=null),Qe.current!==null)return Qe.current;if(Pe===0)return Si(r,0);let He=Si(r,Pe);return Qe.current=He,He},[ae,r]),cr=ot.useMemo(()=>{let J=ie-je.top-je.bottom;return ya(J)},[ie]),Z=ot.useMemo(()=>{let J=Or(Ue),se=J.tickFormat||J.format,Re=ae.ticks(cr).map(Nt=>se(Nt)),He=cn(Re,12,"system-ui"),ut=Math.ceil(He)+12;return {...je,left:Math.max(ut,30),right:8}},[ae,Ue,cr]),le=ot.useMemo(()=>wt?scale.scaleTime({domain:wt,range:[Z.left,M-Z.right]}):cm(Be,M),[wt,Be,M,Z]),Ae=ot.useCallback(J=>{if(!Ve)return;let{scaleX:se,translateX:Pe}=J,Re=M-Z.left-Z.right,[He,ut]=Ve,Nt=ut.getTime()-He.getTime();if(Nt<=0){Xt(null);return}let ze=-Pe,vt=ze+Re,Ge=Re*se/Nt,Mt=ze/Ge,Ie=vt/Ge,en=new Date(He.getTime()+Mt),tn=new Date(He.getTime()+Ie),rn=Math.abs(en.getTime()-He.getTime()),ra=Math.abs(tn.getTime()-ut.getTime()),Sl=Nt*.02;rn<Sl&&ra<Sl?Xt(null):Xt([en,tn]);},[Ve,M,Z,Xt]),Oe=ot.useCallback(J=>{let{left:se}=E.current?.getBoundingClientRect()||{left:0},Pe=J.clientX-se;if(J.timeStamp-(A.current||0)<16)return;A.current=J.timeStamp;let Re=le.invert(Pe),He=j.map((ze,vt)=>{if(!ze||ze.length===0)return null;let Ge=iE(ze,Re,1);if(Ge===0)return {point:ze[0],index:0,datasetIndex:vt};if(Ge>=ze.length)return {point:ze[ze.length-1],index:ze.length-1,datasetIndex:vt};let Mt=ze[Ge-1],Ie=ze[Ge];if(!Mt||!Ie)return null;let en=Math.abs(Mt.xValue.getTime()-Re.getTime()),tn=Math.abs(Ie.xValue.getTime()-Re.getTime()),rn=en<tn;return {point:rn?Mt:Ie,index:rn?Ge-1:Ge,datasetIndex:vt}}).filter(ze=>ze!==null&&yt[ze.datasetIndex]!==void 0).map(({point:ze,index:vt,datasetIndex:Ge})=>({label:yt[Ge].label,value:ze.yValue,baselineValue:yc(yt[Ge],ze,vt),color:yt[Ge].color,point:ze,type:Qt[Ge]}));if(He.length===0){w(null);return}let ut=le(He[0].point.xValue),Nt=ut>(M-Z.right-Z.left)/2+Z.left;w({xValue:He[0].point.xValue,series:He.map(({label:ze,value:vt,baselineValue:Ge,color:Mt,point:Ie,type:en})=>({label:ze,value:vt,...Ge!==void 0?{baselineValue:Ge}:{},chartY:Ie.chartYValue??vt,showMarker:Ie.showTooltipMarker??true,color:Mt,type:en,category:Ie.category,categoryColor:Ie.category&&z?z[Ie.category]:void 0,...Ie.extraTooltipRows&&Ie.extraTooltipRows.length>0?{extraTooltipRows:Ie.extraTooltipRows}:{}})),x:ut,y:ae(He[0].point.chartYValue??He[0].value),position:Nt?"left":"right"});},[j,yt,Qt,le,ae,M,z,Z]),it=()=>{w(null);},Tt=ot.useCallback(()=>{Xt(null),Y.current&&Y.current.reset();},[Xt]),Ot=ot.useCallback(J=>{let se={scaleX:1,scaleY:1,translateX:0,translateY:0,skewX:0,skewY:0};if(!J||!Ve)return se;let[Pe,Re]=Ve,He=Re.getTime()-Pe.getTime();if(He<=0)return se;let[ut,Nt]=J,ze=Nt.getTime()-ut.getTime();if(ze<=0)return se;let vt=He/ze,Ge=M-Z.left-Z.right,Mt=ut.getTime()-Pe.getTime();return {scaleX:vt,scaleY:1,translateX:-(Mt/He)*Ge*vt,translateY:0,skewX:0,skewY:0}},[Ve,M,Z]),tt=ot.useCallback(J=>{if(!(Y.current&&Ve))return;let[se,Pe]=Ve,Re=Pe.getTime()-se.getTime();if(Re<=0){Y.current.reset();return}if(!J){Y.current.reset();return}let[He,ut]=J,Nt=ut.getTime()-He.getTime();if(Nt<=0){Y.current.reset();return}let ze=Re/Nt,vt=M-Z.left-Z.right,Mt=-((He.getTime()-se.getTime())/Re)*vt*ze;Y.current.setTransformMatrix({scaleX:ze,scaleY:1,translateX:Mt,translateY:0,skewX:0,skewY:0});},[Ve,M,Z]),xr=ot.useCallback(J=>{Xt(J),tt(J);},[Xt,tt]);ot.useEffect(()=>{x&&tt(l??null);},[x,l,tt]);let gr=fc(),yo={width:M,height:ie,xScale:le,yScale:ae,yFormatter:Ue,animationSettings:mc,entrance:gr,tooltip:{data:C,show:w,hide:()=>w(null)},datasets:j,seriesMetadata:yt,seriesTypes:Qt,categoryColors:z||void 0,categoryLabels:V||void 0},ne=un(b),Se=0,ce=[],ct=[],yr=[];ne.forEach(J=>{if(!ot.isValidElement(J)){yr.push(J);return}if(aE(J))ct.push(J);else if(Wy(J)){let se=Se;Se++;let Pe=J.props,Re=U[se]?.label;if(fe(Re))return;ce.push(ot__namespace.default.cloneElement(J,{...Pe,data:Q[se]||Pe.data,color:U[se]?.color}));}else yr.push(J);});let vo=Te.length,Co=(K||U).map(J=>{let se=!K&&fe(J.label);return {category:J.label,fill:J.color,isHidden:se,isDisabled:!K&&!se&&vo<=1}}),Cl=typeof r=="object"&&r!==null&&typeof r.type=="string",Pu=Tc({datasets:Ye,metadata:{xLabel:"Date",yLabel:"Value",seriesLabels:yt.map(J=>J.label),timestamp:true,...Cl?{yFormat:r}:{}},svgRef:E}),Zi=jsxRuntime.jsx(di,{title:h,controls:f,actions:oe,containerRef:re});if(a)return y.present(jsxRuntime.jsxs("div",{className:"relative flex h-full flex-col",children:[Zi,jsxRuntime.jsx(lE,{})]}));if(O.length===0)return y.present(jsxRuntime.jsxs("div",{className:"relative flex h-full flex-col",children:[Zi,jsxRuntime.jsx(sE,{})]}));let Le=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("title",{children:h}),jsxRuntime.jsx("g",{children:ae.ticks(cr).map(J=>{let se=Math.abs(J)<Number.EPSILON;return jsxRuntime.jsx(shape.Line,{from:{x:Z.left,y:ae(J)},to:{x:M-Z.right,y:ae(J)},stroke:se?"var(--color-border-default)":"var(--color-border-muted)",strokeWidth:se?1.5:1},`grid-line-${J}`)})}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:B,children:jsxRuntime.jsx("rect",{x:le.range()[0],y:ae.range()[1],width:le.range()[1]-le.range()[0],height:ae.range()[0]-ae.range()[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${B})`,children:ce}),yr,n&&n.length>0&&jsxRuntime.jsx("g",{children:n.map((J,se)=>{let Pe=ae(J.value),Re=J.color??"var(--color-error-base)";return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(shape.Line,{from:{x:Z.left,y:Pe},to:{x:M-Z.right,y:Pe},stroke:Re,strokeWidth:1.5,strokeDasharray:"6 4"}),J.label&&jsxRuntime.jsx("text",{x:M-Z.right-4,y:Pe-4,textAnchor:"end",fontSize:11,fill:Re,children:J.label})]},`ref-line-${se}`)})}),jsxRuntime.jsx(po.Bottom,{top:ie-Z.bottom,scale:le,width:M-Z.left-Z.right}),jsxRuntime.jsx(po.Left,{left:Z.left,scale:ae,yFormatter:Ue,height:ie-Z.top-Z.bottom}),C&&!C.isEvent&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[fr?(()=>{let J=Ye[Ze]??[];if(J.length===0)return null;let se=[...J].sort((ra,Sl)=>ra.xValue.getTime()-Sl.xValue.getTime()),Pe=se.findIndex(ra=>ra.xValue.getTime()===C.xValue.getTime()),Re=se[Pe+1],He=se.length>1&&Re?Re.xValue.getTime()-C.xValue.getTime():15*6e4,ut=Math.abs(le(new Date(C.xValue.getTime()+He))-le(C.xValue)),ze=le(C.xValue)-ut/2,vt=ae.range(),[Ge,Mt]=le.range(),Ie=Math.min(Ge,Mt),en=Math.max(Ge,Mt),tn=Math.max(ze,Ie),rn=Math.max(0,Math.min(ze+ut,en)-tn);return jsxRuntime.jsx("rect",{x:tn,y:vt[1],width:rn,height:vt[0]-vt[1],className:"fill-background-muted",opacity:.5,pointerEvents:"none",style:{transition:"all 100ms ease-out"}})})():null,C.series.filter(J=>J.type!=="bar"&&J.showMarker!==false).map(J=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("circle",{cx:le(C.xValue),cy:ae(J.chartY??J.value),r:8,fill:"white",stroke:J.color,strokeWidth:2,style:{transition:"all 100ms ease-out"}}),jsxRuntime.jsx("circle",{cx:le(C.xValue),cy:ae(J.chartY??J.value),r:4,fill:J.color,style:{transition:"all 100ms ease-out"}})]},`highlight-${J.label}`))]}),jsxRuntime.jsx("rect",{x:Z.left,y:Z.top,width:M-Z.left-Z.right,height:ie-Z.top-Z.bottom,fill:"transparent",style:{cursor:i?"grab":"crosshair",touchAction:"none"},onMouseMove:Oe,onMouseLeave:it}),ct]});return y.present(jsxRuntime.jsx("div",{className:"relative flex h-full flex-col",children:jsxRuntime.jsxs(uo.Provider,{value:yo,children:[Zi,i?jsxRuntime.jsx(zoom.Zoom,{initialTransformMatrix:Ot(N),width:M,height:ie,scaleXMin:1,scaleXMax:20,scaleYMin:1,scaleYMax:1,constrain:J=>{let{scaleX:se,translateX:Pe}=J,Re=Math.max(1,Math.min(20,se)),He=1,ut=M-Z.left-Z.right,Nt=0,ze=ut*(1-Re),vt=Math.max(ze,Math.min(Nt,Pe));return {...J,scaleX:Re,scaleY:He,translateX:vt,translateY:0}},children:J=>{if(Y.current=J,J.transformMatrix){let{scaleX:se,translateX:Pe}=J.transformMatrix,Re=`${se.toFixed(4)}-${Pe.toFixed(2)}`;Re!==H.current&&(H.current=Re,setTimeout(()=>{Ae(J.transformMatrix);},0));}return jsxRuntime.jsx("svg",{width:M,height:ie,className:"overflow-visible",ref:se=>{E.current=se,J.containerRef.current!==se&&(J.containerRef.current=se);},role:"img","aria-label":h,style:{cursor:J.isDragging?"grabbing":"grab",touchAction:"none"},onMouseDown:J.dragStart,onMouseMove:J.dragMove,onMouseUp:J.dragEnd,onMouseLeave:()=>{J.isDragging&&J.dragEnd();},onTouchStart:J.dragStart,onTouchMove:J.dragMove,onTouchEnd:J.dragEnd,children:Le})}},`zoom-${Math.round(M)}x${Math.round(ie)}`):jsxRuntime.jsx("svg",{width:M,height:ie,className:"overflow-visible",ref:E,role:"img","aria-label":h,children:Le}),jsxRuntime.jsx(Wo,{data:C,formatter:Ue}),s&&Ve&&jsxRuntime.jsx(bm,{data:Ye,seriesMetadata:yt,width:M,height:d,onBrushChange:xr,brushRegion:N,margin:Z,...o?{yDomain:o}:{}}),!p&&jsxRuntime.jsx(Ti,{onExport:Pu,items:Co,isZoomed:N!==null,onResetZoom:Tt,onLegendItemToggle:K?void 0:Ce,marginLeft:Z.left,marginRight:Z.right})]})}))},dE=responsive.withParentSize(cE),Xm=({source:e,streaming:t,...r})=>{if(Mc(e))return jsxRuntime.jsx(Xc,{source:e,title:r.title??"Chart",...r.yFormatter!==void 0?{yFormatter:r.yFormatter}:{},...r.yDomain!==void 0?{yDomain:r.yDomain}:{},...r.referenceLines!==void 0?{referenceLines:r.referenceLines}:{},...r.headerActions!==void 0?{headerActions:r.headerActions}:{},...t?.tierToWindow!==void 0?{tierToWindow:t.tierToWindow}:{},...t?.windowSizeOptions!==void 0?{windowSizeOptions:t.windowSizeOptions}:{},...t?.presetRanges!==void 0?{presetRanges:t.presetRanges}:{},...t?.hint!==void 0?{hint:t.hint}:{},...t?.emptyState!==void 0?{emptyState:t.emptyState}:{},...t?.height!==void 0?{height:t.height}:{},...t?.latestDataReadout!==void 0?{latestDataReadout:t.latestDataReadout}:{},...t?.latestDataSeriesKeys!==void 0?{latestDataSeriesKeys:t.latestDataSeriesKeys}:{},...t?.panels!==void 0?{panels:t.panels}:{},children:r.children});let{yDomain:o,...n}=r;return jsxRuntime.jsx(dE,{...n,...typeof o=="function"?{}:{yDomain:o}})};Xm.displayName="ChartContainer";var hE=e=>e.toLocaleString(),bE=e=>`${Math.round(e*100)}%`,Jy=({data:e,width:t=800,height:r=400,padding:o=0,barGap:n=30,formatValue:a=hE,formatPercentage:i=bE,color:s,showScale:d=true,showOverallConversion:c=true,overallConversionLabel:l="Overall Conversion:",activeStageId:u,onStageClick:m,onStageHover:p,className:g,style:f,"aria-label":h="Funnel chart"})=>{let[b,v]=ot.useState(null),[x,C]=ot.useState(t),w=ot.useRef(null),S=u??b,T=ot.useId(),N=s||"var(--color-viz-default)";ot.useEffect(()=>{if(!w.current)return;let A=new ResizeObserver(H=>{for(let Y of H)C(Y.contentRect.width);});return A.observe(w.current),()=>{A.disconnect();}},[]);let{layout:k,overallConversion:R}=ot.useMemo(()=>{if(e.length===0)return {layout:[],overallConversion:0};let A=e[0].value,H=c?60:0,Y=r-o*2-H,G=(e.length-1)*n,I=(Y-G)/e.length,F=e.map((U,K)=>{let z=o+H+K*(I+n),V=A===0?0:U.value/A,D=V,y=K===0?null:e[K-1].value,M=y==null||y===0?0:1-U.value/y;return {stage:U,index:K,y:z,barHeight:I,widthPercent:V,conversionRate:D,dropOff:M}}),O=A===0?0:e[e.length-1].value/A;return {layout:F,overallConversion:O,maxValue:A}},[e,x,r,o,n,d,c]);if(e.length===0)return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex h-full min-h-[280px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",g),style:{width:t,height:r,...f},children:"No funnel data available"});let L=d?60:0,E=o+L,B=x-o*2-L;return jsxRuntime.jsx("div",{ref:w,className:tailwindMerge.twMerge("relative w-full overflow-hidden rounded-lg bg-background-surface",g),style:{height:r,...f},"aria-label":h,role:"img",children:jsxRuntime.jsxs("svg",{width:"100%",height:r,className:"relative",children:[jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsx(gradient.LinearGradient,{id:`${T}-bar`,from:N,to:N,toOpacity:.85}),jsxRuntime.jsx(gradient.LinearGradient,{id:`${T}-bg`,from:N,to:N,fromOpacity:.01,toOpacity:.15,x1:"0",y1:"0",x2:"1",y2:"0"})]}),c&&jsxRuntime.jsxs("text",{x:E,y:o+20,className:"fill-text-primary text-sm font-medium",children:[jsxRuntime.jsx("tspan",{className:"fill-text-secondary",children:l})," ",i(R)]}),d&&jsxRuntime.jsx("g",{children:k.map(A=>{let H=A.y+A.barHeight/2;return jsxRuntime.jsx("text",{x:o+L-12,y:H,textAnchor:"end",dominantBaseline:"middle",className:"fill-text-secondary text-xs",children:i(A.conversionRate)},A.stage.id)})}),k.map(A=>{let H=S===A.stage.id,Y=B*A.widthPercent;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:E,y:A.y,width:B,height:A.barHeight,fill:`url(#${T}-bg)`,rx:4}),jsxRuntime.jsx(framerMotion.motion.rect,{x:E,y:A.y,width:Y,height:A.barHeight,fill:`url(#${T}-bar)`,rx:4,initial:{width:0},animate:{width:Y},transition:{duration:.6,delay:A.index*.1,ease:"easeOut"},opacity:H||S==null?1:.5,style:{cursor:m||p?"pointer":"default",transition:"opacity 150ms ease"},onMouseEnter:()=>{v(A.stage.id),p?.(A.stage);},onMouseLeave:()=>{v(null),p?.(null);},onClick:()=>m?.(A.stage)}),jsxRuntime.jsx("rect",{x:E+10,y:A.y+A.barHeight/2-10,width:70,height:20,className:"fill-background-surface stroke-border-default",strokeWidth:1,rx:4,style:{pointerEvents:"none"}}),jsxRuntime.jsx("text",{x:E+16,y:A.y+A.barHeight/2+4,className:"fill-text-primary text-xs font-semibold",style:{pointerEvents:"none"},children:a(A.stage.value)}),jsxRuntime.jsxs("text",{x:E,y:A.y-8,className:"fill-text-secondary text-xs",style:{pointerEvents:"none"},children:[jsxRuntime.jsx("tspan",{children:A.index+1})," ",A.stage.label]}),A.stage.secondaryValue&&jsxRuntime.jsx("text",{x:E+16,y:A.y-24,className:"fill-text-secondary text-xs",style:{pointerEvents:"none"},children:A.stage.secondaryValue}),A.index>0&&A.dropOff>0&&jsxRuntime.jsxs("text",{x:E+B,y:A.y-8,textAnchor:"end",className:"fill-text-secondary text-xs",children:[i(A.dropOff)," drop"]}),A.stage.annotation&&jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:E+Y+8,y:A.y+8,width:60,height:24,rx:3,className:"fill-background-muted"}),jsxRuntime.jsx("text",{x:E+Y+16,y:A.y+20,className:"fill-text-secondary text-xs font-medium",children:A.stage.annotation})]})]},A.stage.id)})]})})};var SE=.005,Zy=320;function Jc(e){return e>0?e:0}function wE(e,t,r){let o=t===0?0:Jc(e.value)/t*100;return `${e.label}: ${r(e.value)}, ${o.toFixed(1)}%`}var Qy=({data:e,width:t,height:r,innerRadiusRatio:o=0,yFormatter:n={type:"number"},showLegend:a=true,showTooltip:i=true,onSliceClick:s,onSliceHover:d,className:c,style:l,"aria-label":u})=>{let[m,p]=ot.useState(null),[g,f]=ot.useState(null),[h,b]=ot.useState(null),[v,x]=ot.useState(t??600),[C,w]=ot.useState(r??300),S=ot.useRef(null);ot.useEffect(()=>{if(t!==void 0&&r!==void 0){x(t),w(r);return}if(!S.current)return;let G=new ResizeObserver(I=>{for(let F of I)t===void 0&&x(F.contentRect.width),r===void 0&&w(F.contentRect.height);});return G.observe(S.current),t===void 0&&x(S.current.offsetWidth),r===void 0&&w(S.current.offsetHeight||300),()=>{G.disconnect();}},[t,r]);let T=ot.useMemo(()=>e.reduce((G,I)=>G+Jc(I.value),0),[e]),N=ot.useMemo(()=>{let G=ts(e.map(I=>I.label));return e.map(I=>({...I,color:I.color||G[I.label]||"var(--color-viz-default)"}))},[e]),k=Or(n),R=s!==void 0,L=a&&v>=Zy,E=L?Math.max(v*.45,Zy*.45):v,A=Math.max(0,Math.min(E,C)-8)/2,H=A*Math.min(Math.max(o,0),.95);if(e.length===0||T===0)return jsxRuntime.jsx("div",{ref:S,className:tailwindMerge.twMerge("flex h-full min-h-[200px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",c),style:r!==void 0?{height:r,...l}:l,children:"No data available"});let Y=(G,I,F)=>{if(p(G),d?.(I,G),G!==null&&I&&F){let O=E/2+F[0],U=C/2+F[1];b(I.label),f({xValue:new Date,series:[{label:"Value",value:I.value,color:I.color||"var(--color-viz-default)"}],x:O,y:U,position:O>v/2?"left":"right"});}else f(null),b(null);};return jsxRuntime.jsxs("div",{ref:S,className:tailwindMerge.twMerge("relative flex h-full w-full items-center gap-4 rounded-lg bg-background-surface",c),style:r!==void 0?{height:r,...l}:l,children:[jsxRuntime.jsx("svg",{width:E,height:C,className:"flex-shrink-0",role:R?"group":"img","aria-label":u,children:jsxRuntime.jsx(group.Group,{top:C/2,left:E/2,children:jsxRuntime.jsx(shape.Pie,{data:N,pieValue:G=>Jc(G.value),pieSort:null,pieSortValues:null,outerRadius:A,innerRadius:H,padAngle:SE,children:G=>G.arcs.map((I,F)=>{let O=m===F||m===null,U=G.path.centroid(I);return jsxRuntime.jsx("path",{d:G.path(I)??void 0,fill:I.data.color,opacity:O?1:.5,style:{cursor:s||d?"pointer":"default",transition:"opacity 150ms ease-out"},onMouseEnter:()=>Y(F,I.data,U),onMouseLeave:()=>Y(null,null),onClick:()=>s?.(I.data,F),...R?{role:"button",tabIndex:0,"aria-label":wE(I.data,T,k.format),onFocus:()=>Y(F,I.data,U),onBlur:()=>Y(null,null),onKeyDown:K=>{K.key!=="Enter"&&K.key!==" "||(K.preventDefault(),s?.(I.data,F));}}:{}},I.data.label)})})})}),L?jsxRuntime.jsx("ul",{className:"flex min-w-0 flex-col gap-1 overflow-y-auto py-2 text-xs",children:N.map((G,I)=>jsxRuntime.jsxs("li",{className:"flex items-center gap-2",style:{opacity:m===I||m===null?1:.5},onMouseEnter:()=>Y(I,G),onMouseLeave:()=>Y(null,null),children:[jsxRuntime.jsx("span",{className:"h-3 w-3 flex-shrink-0 rounded-sm",style:{backgroundColor:G.color}}),jsxRuntime.jsx("span",{className:"truncate text-text-primary",title:G.label,children:G.label}),jsxRuntime.jsxs("span",{className:"ml-auto flex-shrink-0 tabular-nums text-text-secondary",children:[k.format(G.value)," (",(Jc(G.value)/T*100).toFixed(1),"%)"]})]},G.label))}):null,i&&jsxRuntime.jsx(Wo,{data:g,formatter:n,label:h??void 0})]})};function Bs({count:e,label:t="results",suffix:r,unknownLabel:o="\u2014",isLoading:n=false,className:a="",testId:i}){if(n)return jsxRuntime.jsx("div",{className:`flex items-center ${a}`,children:jsxRuntime.jsx(q,{width:80,height:16})});if(e===null)return jsxRuntime.jsx("div",{"data-testid":i,className:`text-sm text-text-secondary whitespace-nowrap ${a}`,children:o});let s=t.endsWith("s")?t.slice(0,-1):t,d=e===1&&!r?s:t,c=`${e.toLocaleString()}${r??""}${d?` ${d}`:""}`;return jsxRuntime.jsx("div",{"data-testid":i,className:`text-sm text-text-secondary whitespace-nowrap ${a}`,children:c})}var PE=e=>{let t=rr({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=[e.showSearchIcon?"":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return tailwindMerge.twMerge(t,r,e.className)};function go({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,showSearchIcon:s,isClearable:d,onClear:c,type:l,validationResult:u,reserveErrorSpace:m=true,isLoading:p=false,descriptionPlacement:g="below",...f}){let[h,b]=ot__namespace.default.useState(false),{isFocused:v,handleFocus:x,handleBlur:C}=Dr(),w=l==="password",S=_l(p,300);return jsxRuntime.jsx(reactAriaComponents.TextField,{...f,isRequired:a,className:Fe(f.className,"group flex flex-col"),children:({isDisabled:T,isInvalid:N})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,description:g==="tooltip"||g==="inline"?t:void 0,descriptionPlacement:g,isRequired:a,children:e}),jsxRuntime.jsxs(Dt,{children:[s&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute top-1/2 -translate-y-1/2 transform flex items-center z-10",style:{left:9},children:(()=>{let k={sm:14,md:16,lg:18,xl:20}[o];return S?jsxRuntime.jsx(io,{size:k,color:"text-text-secondary"}):jsxRuntime.jsx(W,{name:"MagnifyingGlass",size:k,className:`transition-colors ${v?"text-action-brand":"text-text-secondary"}`})})()}),jsxRuntime.jsx(ec,{size:o,disabled:T,type:w?h?"text":"password":l,name:f.name,autoComplete:f.autoComplete,inputMode:f.inputMode,value:f.value,defaultValue:f.defaultValue,placeholder:f.placeholder,onFocus:k=>x(k,f.onFocus),onBlur:k=>C(k,f.onBlur),onChange:k=>f.onChange?.(k.target.value),style:s?{paddingLeft:{sm:28,md:32,lg:36,xl:37}[o]}:void 0,className:PE({isInvalid:N,isDisabled:T,isFocused:v,size:o,transparent:i,showSearchIcon:s,isClearable:d,hasValue:!!f.value,isPassword:w,className:typeof f.className=="string"?f.className:void 0})}),d&&f.value&&!T&&jsxRuntime.jsx(fs,{onClick:()=>{c?c():f.onChange&&f.onChange("");},size:o}),w&&!T&&jsxRuntime.jsx("button",{type:"button",onClick:()=>b(!h),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-secondary hover:text-text-primary","aria-label":h?"Hide password":"Show password",onMouseDown:k=>{k.preventDefault(),k.stopPropagation();},children:jsxRuntime.jsx(W,{name:h?"EyeSlash":"Eye",size:o==="sm"?16:20,className:"text-text-primary"})})]}),m?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&u?jsxRuntime.jsx(ye,{size:o,children:r(u)}):t&&g==="below"?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&u?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(u)}):t&&g==="below"?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})})}function Ma({value:e,onChange:t,onClear:r,placeholder:o="Search...",size:n="sm",className:a="",isLoading:i=false}){return jsxRuntime.jsx("div",{className:`flex-1 min-w-0 sm:max-w-sm ${a}`,children:jsxRuntime.jsx(go,{value:e,onChange:t,placeholder:o,showSearchIcon:true,isClearable:!!e&&!!r,onClear:r,size:n,"aria-label":o,reserveErrorSpace:false,isLoading:i})})}function Vs({value:e,options:t,onChange:r,direction:o,onDirectionChange:n,showLabel:a=true,size:i="sm",className:s="",compact:d=false}){let[c,l]=ot.useState(false),u=o!==void 0&&n!==void 0,m=t.find(p=>p.value===e);return d?jsxRuntime.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[jsxRuntime.jsx(te,{variant:"secondary",size:i,icon:"ArrowsDownUp","aria-label":`Sort by: ${m?.label||"Select"}`,onPress:()=>l(true)}),jsxRuntime.jsx(Lt,{isOpen:c,onClose:()=>l(false),title:"Sort by",contentPadding:false,children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:t.map(p=>({id:p.value,label:p.label,value:p.value})),className:"w-full bg-background-surface p-0 outline-0 [&_[role=option]]:border-b [&_[role=option]]:border-border-default [&_[role=option]:last-child]:border-0 [&_[role=option]]:!px-6 [&_[role=option]]:!py-4 [&_[role=option]]:rounded-none",selectionMode:"single",selectedKeys:e?[e]:[],onSelectionChange:p=>{let g=Array.from(p)[0];g!=null&&(r(g),l(false));},children:p=>jsxRuntime.jsx(Ar,{id:p.id,textValue:p.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:p.label})},p.id)})})]}):jsxRuntime.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[a&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary whitespace-nowrap",children:"Sort by:"}),jsxRuntime.jsx(an,{selectedKey:e,onSelectionChange:p=>r(p),size:i,className:"min-w-32",items:t.map(p=>({id:p.value,label:p.label,value:p.value})),renderItem:p=>p.label,"aria-label":"Sort by",reserveErrorSpace:false}),u&&jsxRuntime.jsx(te,{variant:"ghost",size:i,onClick:()=>n(o==="asc"?"desc":"asc"),"aria-label":`Sort ${o==="asc"?"descending":"ascending"}`,className:"p-1.5",children:o==="asc"?jsxRuntime.jsx(lucideReact.ArrowUp,{className:"w-4 h-4"}):jsxRuntime.jsx(lucideReact.ArrowDown,{className:"w-4 h-4"})})]})}function tv({search:e,searchMobileMode:t="expanded",filters:r=[],onRemoveFilter:o,onClearAllFilters:n,onManageFilters:a,exportControl:i,maxVisibleFilterChips:s=3,sort:d,resultsCount:c,leftControls:l,onManageColumns:u,columnPicker:m,customControls:p,actions:g,interactionMode:f="auto",sticky:h,stickyTop:b="0",zIndex:v=10,className:x="",style:C}){let w=r.length>0;if(!(e||w||a||d||c||l||u||m||p||g||i))return null;let T=h?"sticky bg-background-surface":"",N=h?{top:b,zIndex:v}:{};return jsxRuntime.jsxs("div",{className:`@container flex flex-col gap-3 bg-background-surface py-3 border-b border-border-default ${T} ${x}`,style:{...C,...N},children:[jsxRuntime.jsxs("div",{className:"hidden @[640px]:flex @[640px]:items-center @[640px]:justify-between @[640px]:gap-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[l,l&&c&&jsxRuntime.jsx("div",{className:"h-4 w-px bg-border-default"}),c&&jsxRuntime.jsx(Bs,{count:c.count,label:c.label,suffix:c.suffix,unknownLabel:c.unknownLabel,isLoading:c.isLoading,testId:c.testId}),c&&d&&jsxRuntime.jsx("div",{className:"h-4 w-px bg-border-default"}),d&&jsxRuntime.jsx(Vs,{value:d.value,options:d.options,onChange:d.onChange,showLabel:d.showLabel,direction:d.direction,onDirectionChange:d.onDirectionChange}),u?jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:"Columns",onClick:u,children:"Columns"}):m,w&&o&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.slice(0,s).map(k=>jsxRuntime.jsxs(co,{variant:"primary",size:"sm",onRemove:()=>o(k.id),isRemovable:true,children:[k.label,": ",k.value]},k.id)),r.length>s&&a&&jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",onClick:a,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:["+",r.length-s," more"]}),n&&jsxRuntime.jsx(te,{variant:"ghost",size:"sm",onClick:n,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:"Clear all"})]})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-3 flex-shrink-0",children:p||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&g.items.length>0&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:g.items.map(k=>jsxRuntime.jsx(te,{variant:k.variant||"secondary",size:"sm",icon:k.icon,onPress:k.onClick,isDisabled:k.disabled,children:k.label},k.id))}),e&&jsxRuntime.jsx("div",{className:"w-64",children:jsxRuntime.jsx(Ma,{value:e.value,onChange:e.onChange,onClear:e.onClear,placeholder:e.placeholder,isLoading:e.isLoading})}),a&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:"Sliders",badgeNumber:r.length>0?r.length:void 0,onClick:a,children:"Filters"}),i&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:i.icon??"Upload",onClick:i.onClick,isDisabled:i.isDisabled,isLoading:i.isLoading,children:i.label})]})})]}),jsxRuntime.jsxs("div",{className:"@[640px]:hidden",children:[jsxRuntime.jsx("div",{className:"flex flex-col gap-3 mb-3",children:jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:p?jsxRuntime.jsx("div",{className:"flex-1",children:p}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&g.items.length>0&&jsxRuntime.jsx(pi,{items:g.items.map(k=>({id:k.id,name:k.label,iconName:k.icon,variant:k.variant==="destructive"?"destructive":"primary",disabled:k.disabled,onAction:k.onClick})),align:"left",size:"sm",children:jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:"DotsThreeVertical","aria-label":g.menuLabel||"Actions"})}),e&&jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsx(Ma,{value:e.value,onChange:e.onChange,onClear:e.onClear,placeholder:e.placeholder,isLoading:e.isLoading})}),a&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:"Sliders",badgeNumber:r.length>0?r.length:void 0,onClick:a,"aria-label":`Filters${r.length>0?` (${r.length} active)`:""}`}),i&&jsxRuntime.jsx(te,{variant:"secondary",size:"sm",icon:i.icon??"Upload",onClick:i.onClick,isDisabled:i.isDisabled,isLoading:i.isLoading,children:i.label})]})})}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[l,c&&jsxRuntime.jsx(Bs,{count:c.count,label:c.label,suffix:c.suffix,unknownLabel:c.unknownLabel,isLoading:c.isLoading})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:d&&jsxRuntime.jsx(Vs,{value:d.value,options:d.options,onChange:d.onChange,showLabel:false,direction:d.direction,onDirectionChange:d.onDirectionChange,compact:f!=="desktop"})})]})]})]})}function rv({filters:e,onRemove:t,onClearAll:r,onManageFilters:o,maxVisibleChips:n=3,mode:a="chips",showManageButton:i=true,size:s="sm",className:d=""}){let c=e.length>0,l=e.slice(0,n),u=Math.max(0,e.length-n),m=u>0,p=a==="button"&&!!o,g=a==="chips"&&i&&!!o;if(!c&&!p&&!g)return null;let f=p&&jsxRuntime.jsxs(te,{variant:"secondary",size:s,onClick:o,className:"whitespace-nowrap",children:[e.length," ",e.length===1?"filter":"filters"]}),h=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&jsxRuntime.jsx(te,{variant:"secondary",size:s,icon:"Sliders",onClick:o,className:"whitespace-nowrap",children:"Filters"}),c&&l.map(v=>jsxRuntime.jsxs(co,{variant:"secondary",size:s,onRemove:()=>t(v.id),isRemovable:true,children:[v.label,": ",v.value]},v.id)),c&&m&&o&&jsxRuntime.jsxs(te,{variant:"ghost",size:s,onClick:o,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:["+",u," more"]}),c&&r&&jsxRuntime.jsx(te,{variant:"ghost",size:s,onClick:r,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:"Clear all"})]}),b=a==="button"?f:h;return jsxRuntime.jsx("div",{className:`flex flex-wrap items-center gap-2 ${d}`,children:b})}var ov=["isEmpty","isNotEmpty"];function nv(e){return ov.includes(e)}var av={isEmpty:"is empty",isNotEmpty:"is not empty"};function IE(e,t,r){return {field:e,operator:t,value:r}}function FE(e,t="AND"){return {logic:t,conditions:e}}function Os(){return {logic:"AND",conditions:[]}}function Qc(e){return !e||e.conditions.length===0?true:e.conditions.every(t=>"conditions"in t?Qc(t):false)}function BE(e,t){if(!e)return [];let r=new Map(t?.map(i=>[i.field,i])),o=new Map;function n(i){if("conditions"in i)i.conditions.forEach(s=>n(s));else {let s=o.get(i.field)||[];s.push(i),o.set(i.field,s);}}e.conditions.forEach(i=>n(i));let a=[];for(let[i,s]of o.entries()){let d=r.get(i),c=d?.label||i,l=[],u=[],m=[];for(let p of s)p.operator==="in"&&Array.isArray(p.value)?l.push(...p.value):p.operator==="eq"?p.value!==void 0&&typeof p.value!="boolean"&&!Array.isArray(p.value)?l.push(p.value):m.push(p):["gte","gt","lte","lt"].includes(p.operator)&&p.value!==void 0?u.push({operator:p.operator,value:typeof p.value=="boolean"||Array.isArray(p.value)?String(p.value):p.value}):m.push(p);if(l.length>0){let g=Array.from(new Set(l)).map(f=>d?.values?.find(b=>String(b.value)===String(f))?.label??f);a.push({id:`${i}-in`,label:c,value:g.join(", ")});}if(u.length>0){let p=u.find(f=>f.operator==="gte"||f.operator==="gt"),g=u.find(f=>f.operator==="lte"||f.operator==="lt");if(p&&g){let f=p.operator==="gte"?"\u2265":">",h=g.operator==="lte"?"\u2264":"<";a.push({id:`${i}-range`,label:c,value:`${f} ${p.value} and ${h} ${g.value}`});}else for(let f of u){let h;f.operator==="gte"?h="\u2265":f.operator==="gt"?h=">":f.operator==="lte"?h="\u2264":h="<",a.push({id:`${i}-${f.operator}`,label:c,value:`${h} ${f.value}`});}}for(let p of m){let g;p.operator==="neq"?g=`\u2260 ${p.value}`:p.operator==="contains"?g=`contains "${p.value}"`:p.operator==="startsWith"?g=`starts with "${p.value}"`:p.operator==="endsWith"?g=`ends with "${p.value}"`:nv(p.operator)?g=av[p.operator]:g=String(p.value),a.push({id:`${i}-${p.operator}`,label:c,value:g});}}return a}function Xn(e,t){let r=e||Os();return {...r,conditions:[...r.conditions,t]}}function Ea(e,t){if(!e)return Os();let r=e.conditions.filter(o=>"conditions"in o?Ea(o,t).conditions.length>0:o.field!==t);return {...e,conditions:r}}function La(e){if(!e)return [];let t=new Set;function r(o){"conditions"in o?o.conditions.forEach(r):t.add(o.field);}return e.conditions.forEach(r),Array.from(t)}function sv({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,showCalendar:d=true,reserveErrorSpace:c=true,validationResult:l,className:u,...m}){let[p,g]=ot.useState(false),f=h=>{m.onChange&&h&&m.onChange(h),g(false);};return jsxRuntime.jsxs(reactAriaComponents.DateField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Fe(u,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsxs("div",{className:"relative w-full",children:[jsxRuntime.jsx(zs,{size:o,isDisabled:i,isInvalid:s,hasCalendar:d}),d&&!i&&jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:p,onOpenChange:g,children:[jsxRuntime.jsx(te,{variant:"unstyled",className:"absolute right-2 top-1/2 -translate-y-1/2 flex h-8 w-8 items-center justify-center rounded hover:bg-background-hover text-text-secondary hover:text-text-primary transition-colors","aria-label":"Open calendar",children:jsxRuntime.jsx(W,{name:"Calendar",size:18})}),jsxRuntime.jsx(reactAriaComponents.Popover,{className:"bg-background-surface rounded-lg border border-border-default shadow-xl",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"p-4 outline-none",children:jsxRuntime.jsx(xi,{value:m.value,onChange:f,minValue:m.minValue,maxValue:m.maxValue,isDisabled:i,isReadOnly:m.isReadOnly,isDateUnavailable:m.isDateUnavailable})})})]})]})}),c?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&l?jsxRuntime.jsx(ye,{size:o,children:r(l)}):t?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&l?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(l)}):t?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})}function KE({isPlaceholder:e,isDisabled:t,size:r="md"}){return tailwindMerge.twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[r],e?"text-text-disabled italic":"text-text-primary",t?"text-text-disabled cursor-not-allowed":"cursor-text",!t&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-primary")}function zs({size:e="md",isDisabled:t,isInvalid:r,hasCalendar:o,className:n,...a}){return jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(An({isInvalid:r,isDisabled:t}),"px-3 py-2 flex items-center gap-0.5 w-full",o&&"pr-10",n),...a,children:i=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:i,className:KE({isPlaceholder:i.isPlaceholder,isDisabled:!i.isEditable||t,size:e})})})}function _c({label:e,description:t,errorMessage:r,...o}){return jsxRuntime.jsxs(reactAriaComponents.DateRangePicker,{...o,className:Fe(o.className,"group flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(et,{children:e}),jsxRuntime.jsxs(db,{className:"w-auto min-w-[208px]",children:[jsxRuntime.jsx(zs,{slot:"start",className:"px-2 py-1.5 text-sm"}),jsxRuntime.jsx("span",{"aria-hidden":"true",className:"text-text-primary group-disabled:text-text-disabled forced-colors:text-[ButtonText] group-disabled:forced-colors:text-[GrayText]",children:"\u2013"}),jsxRuntime.jsx(zs,{slot:"end",className:"flex-1 px-2 py-1.5 text-sm"}),jsxRuntime.jsx(te,{variant:"icon",className:"mr-1 w-6 rounded outline-offset-0",children:jsxRuntime.jsx(lucideReact.CalendarIcon,{"aria-hidden":true,className:"h-4 w-4"})})]}),t&&jsxRuntime.jsx(Ee,{children:t}),typeof r=="string"?jsxRuntime.jsx(ye,{children:r}):null,jsxRuntime.jsx(Et,{children:jsxRuntime.jsx(Ri,{})})]})}var $E=e=>{let t=rr({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return tailwindMerge.twMerge(t,"pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className)};function Hs({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,validationResult:s,reserveErrorSpace:d=true,descriptionPlacement:c="below",...l}){let u=ot.useId(),{isFocused:m,handleFocus:p,handleBlur:g}=Dr();return jsxRuntime.jsx(reactAriaComponents.NumberField,{...l,id:u,isRequired:a,className:Fe(l.className,"group flex flex-col gap-1"),step:l.step??1,onChange:f=>{typeof f=="number"&&(l.maxValue!=null&&f>l.maxValue?l.onChange?.(l.maxValue):l.minValue!=null&&f<l.minValue?l.onChange?.(l.minValue):l.onChange?.(f));},isInvalid:!!r||typeof l.value=="number"&&(l.maxValue!=null&&l.value>l.maxValue||l.minValue!=null&&l.value<l.minValue),children:({isDisabled:f,isInvalid:h})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,description:c==="tooltip"||c==="inline"?t:void 0,descriptionPlacement:c,isRequired:a,htmlFor:u,children:e}),jsxRuntime.jsx("div",{className:"relative",children:jsxRuntime.jsxs(reactAriaComponents.Group,{className:"relative",children:[jsxRuntime.jsx(reactAriaComponents.Input,{onFocus:v=>p(v,l.onFocus),onBlur:v=>g(v,l.onBlur),className:$E({isInvalid:h||!!r,isDisabled:f,isFocused:m,transparent:i,size:o,className:typeof l.className=="string"?l.className:void 0})}),jsxRuntime.jsxs("div",{className:"absolute inset-y-[2px] right-[2px] flex flex-col divide-y divide-border-default border-l border-border-default overflow-hidden rounded-r-[calc(var(--control-border-radius)-2px)]",children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"increment",isDisabled:f,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(W,{name:"CaretUp",size:14})}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"decrement",isDisabled:f,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(W,{name:"CaretDown",size:14})})]})]})}),d?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:r?jsxRuntime.jsx(ye,{size:o,children:typeof r=="function"?r(s):r}):t&&c==="below"?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:r?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:typeof r=="function"?r(s):r}):t&&c==="below"?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})})}var _m={sm:{track:"h-4 w-7",handle:"h-3.5 w-3.5",text:"text-xs"},md:{track:"h-5 w-9",handle:"h-4 w-4",text:"text-sm"},lg:{track:"h-6 w-11",handle:"h-5 w-5",text:"text-base"},xl:{track:"h-7 w-14",handle:"h-6 w-6",text:"text-lg"}};function rL({isSelected:e,isDisabled:t,size:r="md"}){let o="flex px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",n=_m[r].track,a=pt,i="focus-visible:outline-action-primary",s="";return e?s="bg-action-primary forced-colors:!bg-[Highlight] group-pressed:bg-action-primary-hover":s="bg-border-input group-pressed:bg-border-focus",[o,n,a,i,s,t?"bg-background-muted forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function oL({isSelected:e,isDisabled:t,size:r="md"}){let o="transform rounded-full bg-background-surface outline-none shadow transition duration-200 ease-in-out",n=_m[r].handle;return [o,n,e?"translate-x-[100%]":"translate-x-0",t?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function $c({children:e,variant:t="primary",size:r="md",...o}){return jsxRuntime.jsx(reactAriaComponents.Switch,{...o,className:Fe(o.className,`relative group flex items-center gap-2 ${_m[r].text} text-text-primary transition disabled:text-text-disabled forced-colors:disabled:text-[GrayText]`),children:n=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:rL({...n,size:r}),children:jsxRuntime.jsx("span",{className:oL({...n,size:r})})}),e]})})}function dv(e){return new Intl.NumberFormat("en-US").format(e)}function uv({isOpen:e,onClose:t,facetConfigs:r,facetCounts:o={},currentFilters:n,onApply:a,onClear:i,title:s="Filters",resultCount:d}){let[c,l]=ot.useState(n),[u,m]=ot.useState({}),[p,g]=ot.useState({}),[f,h]=ot.useState(null),{isMobile:b}=Rr(),v=ot.useMemo(()=>r.some(y=>y.group),[r]),{groups:x,ungroupedFacets:C,facetsByGroup:w}=ot.useMemo(()=>{let y=new Set,M=[],P={};for(let X of r)X.group?(y.has(X.group)||(y.add(X.group),P[X.group]=[]),P[X.group].push(X)):M.push(X);return {groups:Array.from(y),ungroupedFacets:M,facetsByGroup:P}},[r]);ot.useEffect(()=>{e&&(l(n),m({}),g({}),h(!b&&x.length>0?x[0]:null));},[e,n,x,b]);let S=ot.useMemo(()=>!c||Qc(c)?0:La(c).length,[c]),T=()=>{a(c),t();},N=()=>{let y=Os();l(y),i?i():a(y),t();},k=y=>{if(!c)return [];if(!La(c).includes(y))return [];let P=[];function X($){if($)for(let oe of $.conditions)"conditions"in oe?X(oe):oe.field===y&&oe.operator==="in"&&Array.isArray(oe.value)&&P.push(...oe.value.map(String));}return X(c),P},R=(y,M,P)=>{let X=Ea(c,y);M!==void 0&&(X=Xn(X,{field:y,operator:"gte",value:M})),P!==void 0&&(X=Xn(X,{field:y,operator:"lte",value:P})),l(X);},L=y=>{if(!c)return;let M;function P(X){if(X)for(let $ of X.conditions)"conditions"in $?P($):$.field===y&&$.operator==="eq"&&typeof $.value=="boolean"&&(M=$.value);}return P(c),M},E=(y,M)=>{let P=Ea(c,y);M!==void 0&&(P=Xn(P,{field:y,operator:"eq",value:M})),l(P);},B=(y,M,P)=>{let X=Ea(c,y);M&&(X=Xn(X,{field:y,operator:"gte",value:M.toString()})),P&&(X=Xn(X,{field:y,operator:"lte",value:P.toString()})),l(X);},A=y=>{let M=w[y]||[],P=c?La(c):[];return M.filter(X=>P.includes(X.field)).length},H="pr-9 bg-background-muted/50",Y="border-t border-border-muted",G="text-sm font-medium text-text-link-default",I=y=>jsxRuntime.jsx("span",{className:G,children:y}),F=y=>{let M=o[y.field]||{},P=u[y.field]||"",X=[];y.values?X=y.values.map(re=>({value:String(re.value),label:re.label,count:M[String(re.value)]})):X=Object.entries(M).map(([re,_])=>({value:re,label:re,count:_}));let $=X.length;if(P){let re=P.toLowerCase();X=X.filter(_=>_.label.toLowerCase().includes(re));}X.sort((re,_)=>re.count!==void 0&&_.count!==void 0&&_.count!==re.count?_.count-re.count:re.label.localeCompare(_.label));let oe=y.type||"string";if(oe==="string"||!y.type){let re=k(y.field),_=y.searchThreshold??10,he=y.maxVisibleOptions??50,me=p[y.field]??false,ue=me||X.length<=he?X:X.slice(0,he),ie=X.length>he&&!me;return jsxRuntime.jsxs(On,{id:y.field,children:[jsxRuntime.jsx(zn,{title:y.label,description:y.description,className:H,endContent:re.length>0?I(`${re.length} selected`):void 0}),jsxRuntime.jsx(Hn,{className:Y,children:jsxRuntime.jsxs("div",{className:"space-y-4 pt-4 pb-4",children:[$>_&&jsxRuntime.jsx(Ma,{value:P,onChange:fe=>m(Te=>({...Te,[y.field]:fe})),onClear:()=>m(fe=>({...fe,[y.field]:""})),placeholder:`Search ${y.label.toLowerCase()}...`,size:"sm",className:"w-full !max-w-none pr-4"}),jsxRuntime.jsx(Zp,{value:re,onChange:fe=>{let Te=Ea(c,y.field);fe.length>0&&(Te=Xn(Te,{field:y.field,operator:"in",value:fe})),l(Te);},children:jsxRuntime.jsx("div",{className:"space-y-1.5",children:ue.map(fe=>jsxRuntime.jsx("div",{className:"rounded-md py-2 pr-4 transition-colors hover:bg-background-hover",children:jsxRuntime.jsx(wo,{value:fe.value,children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3 flex-1",children:[y.renderLabel?y.renderLabel(fe.value,fe.label):jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:fe.label}),fe.count!==void 0&&jsxRuntime.jsx("span",{className:"text-xs font-medium text-text-secondary tabular-nums",children:dv(fe.count)})]})})},fe.value))})}),ie&&jsxRuntime.jsx("div",{className:"pt-2 border-t border-border-muted",children:jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",onPress:()=>g(fe=>({...fe,[y.field]:true})),className:"w-full",children:["Show all ",X.length," options"]})}),me&&X.length>he&&jsxRuntime.jsx("div",{className:"pt-2 border-t border-border-muted",children:jsxRuntime.jsx(te,{variant:"ghost",size:"sm",onPress:()=>g(fe=>({...fe,[y.field]:false})),className:"w-full",children:"Show less"})})]})})]},y.field)}if(oe==="number"){let re,_,he=ue=>{if(ue)for(let ie of ue.conditions)"conditions"in ie?he(ie):ie.field===y.field&&(ie.operator==="gte"&&typeof ie.value=="number"&&(re=ie.value),ie.operator==="lte"&&typeof ie.value=="number"&&(_=ie.value));};he(c);let me=re!==void 0||_!==void 0;return jsxRuntime.jsxs(On,{id:y.field,children:[jsxRuntime.jsx(zn,{title:y.label,description:y.description,className:H,endContent:me?I(re!==void 0&&_!==void 0?`${re} - ${_}`:re!==void 0?`\u2265 ${re}`:`\u2264 ${_}`):void 0}),jsxRuntime.jsx(Hn,{className:Y,children:jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-4 pb-4",children:[jsxRuntime.jsx(Hs,{label:"Min",value:re,onChange:ue=>R(y.field,ue,_)},`${y.field}-min`),jsxRuntime.jsx(Hs,{label:"Max",value:_,onChange:ue=>R(y.field,re,ue)},`${y.field}-max`)]})})]},y.field)}if(oe==="boolean"){let re=L(y.field);return jsxRuntime.jsxs(On,{id:y.field,children:[jsxRuntime.jsx(zn,{title:y.label,description:y.description,className:H,endContent:re!==void 0?I(re?"Yes":"No"):void 0}),jsxRuntime.jsx(Hn,{className:Y,children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between pt-4 pb-4",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:re!==void 0?re?"Enabled":"Disabled":"No filter applied"}),jsxRuntime.jsx($c,{size:"lg",isSelected:re??false,onChange:_=>E(y.field,_?true:void 0),children:re?"Yes":"No"})]})})]},y.field)}if(oe==="date"){let re,_,he=Te=>{if(Te)for(let Ye of Te.conditions)"conditions"in Ye?he(Ye):Ye.field===y.field&&(Ye.operator==="gte"&&(re=String(Ye.value)),Ye.operator==="lte"&&(_=String(Ye.value)));};he(c);let me=re!==void 0||_!==void 0,ue=Te=>{if(Te)try{return /^\d{4}-\d{2}-\d{2}$/.test(Te)?date.parseDate(Te):void 0}catch{return}},ie=ue(re),fe=ue(_);return jsxRuntime.jsxs(On,{id:y.field,children:[jsxRuntime.jsx(zn,{title:y.label,description:y.description,className:H,endContent:me?I("Date range selected"):void 0}),jsxRuntime.jsx(Hn,{className:Y,children:jsxRuntime.jsx("div",{className:"pt-4 pb-4",children:jsxRuntime.jsx(_c,{label:"Date Range",value:ie&&fe?{start:ie,end:fe}:void 0,onChange:Te=>{Te?B(y.field,Te.start,Te.end):B(y.field,void 0,void 0);}})})})]},y.field)}return null},O=()=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[C.map(y=>{let P=(c?La(c):[]).includes(y.field);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>h(`__ungrouped__${y.field}`),className:"flex items-center justify-between px-6 py-3 text-left hover:bg-background-hover border-b border-border-muted transition-colors",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:y.label}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[P&&jsxRuntime.jsx("span",{className:G,children:"1 active"}),jsxRuntime.jsx(W,{name:"CaretRight",size:"sm",className:"text-text-secondary"})]})]},y.field)}),x.map(y=>{let M=A(y);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>h(y),className:"flex items-center justify-between px-6 py-3 text-left hover:bg-background-hover border-b border-border-muted transition-colors",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:y}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[M>0&&jsxRuntime.jsxs("span",{className:G,children:[M," active"]}),jsxRuntime.jsx(W,{name:"CaretRight",size:"sm",className:"text-text-secondary"})]})]},y)})]}),U=y=>{if(y.startsWith("__ungrouped__")){let P=y.replace("__ungrouped__",""),X=C.find($=>$.field===P);return X?jsxRuntime.jsx(yi,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[X.field],children:F(X)}):null}let M=w[y]||[];return M.length===0?null:jsxRuntime.jsx(yi,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[M[0].field],children:M.map(P=>F(P))})},K=()=>{if(f){let y=f.startsWith("__ungrouped__")&&C.find(M=>M.field===f.replace("__ungrouped__",""))?.label||f;return jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>h(null),className:"flex items-center gap-2 px-4 py-3 border-b border-border-muted hover:bg-background-hover transition-colors",children:[jsxRuntime.jsx(W,{name:"CaretLeft",size:"sm",className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:y})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:U(f)})]})}return O()},z=()=>jsxRuntime.jsxs("div",{className:"flex h-full",children:[jsxRuntime.jsxs("div",{className:"w-48 flex-shrink-0 border-r border-border-muted overflow-y-auto bg-background-muted/30",children:[C.map(y=>{let P=(c?La(c):[]).includes(y.field),X=f===`__ungrouped__${y.field}`;return jsxRuntime.jsxs("button",{type:"button",onClick:()=>h(`__ungrouped__${y.field}`),className:`flex items-center justify-between w-full px-4 py-3 text-left border-b border-border-muted transition-colors ${X?"bg-background-selected":"hover:bg-background-hover"}`,children:[jsxRuntime.jsx("span",{className:`text-sm truncate ${X?"font-semibold text-text-primary":"font-medium text-text-primary"}`,children:y.label}),P&&jsxRuntime.jsx("span",{className:"w-2 h-2 rounded-full bg-action-primary flex-shrink-0 ml-2"})]},y.field)}),x.map(y=>{let M=A(y),P=f===y;return jsxRuntime.jsxs("button",{type:"button",onClick:()=>h(y),className:`flex items-center justify-between w-full px-4 py-3 text-left border-b border-border-muted transition-colors ${P?"bg-background-selected":"hover:bg-background-hover"}`,children:[jsxRuntime.jsx("span",{className:`text-sm truncate ${P?"font-semibold text-text-primary":"font-medium text-text-primary"}`,children:y}),M>0&&jsxRuntime.jsx("span",{className:"w-2 h-2 rounded-full bg-action-primary flex-shrink-0 ml-2"})]},y)})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:f?U(f):jsxRuntime.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-sm",children:"Select a category to view filters"})})]}),V=()=>jsxRuntime.jsx(yi,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[r[0].field],children:r.map(y=>F(y))});return jsxRuntime.jsx(Lr,{isOpen:e,onClose:t,title:v&&b&&f?f.startsWith("__ungrouped__")?C.find(y=>y.field===f.replace("__ungrouped__",""))?.label||s:f:S>0?`${s} (${S} active)`:s,hideCloseIcon:false,primaryAction:{label:"Apply filters",onPress:T,variant:"primary"},secondaryAction:{label:"Clear all",onPress:N},maxWidth:v?"800px":"700px",height:"600px",mobileHeight:"85vh",contentPadding:false,footerContent:d!==void 0?jsxRuntime.jsxs("div",{className:"text-sm text-text-secondary text-center",children:[jsxRuntime.jsx("span",{className:"font-semibold text-text-primary",children:dv(d)})," ",d===1?"result":"results"," with current filters"]}):void 0,children:r.length===0?jsxRuntime.jsx("div",{className:"py-12 text-center",children:jsxRuntime.jsx("div",{className:"text-sm font-medium text-text-secondary",children:"No filters available"})}):v?b?K():z():V()})}function ef(e="left"){switch(e){case "center":return "justify-center text-center";case "right":return "justify-end text-right";default:return "justify-start text-left"}}function Hr(e="normal",t){return tailwindMerge.twMerge({strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[e],t&&"hover:text-action-primary cursor-pointer transition-colors")}function ke(e="left",t){return tailwindMerge.twMerge("flex items-center gap-1 min-w-0 overflow-hidden",ef(e),t)}function rd(e,t="\u2014"){return e==null||e===""?t:String(e)}var Jn={xs:"h-4 w-12",sm:"h-4 w-20",md:"h-4 w-24",lg:"h-4 w-32",xl:"h-4 w-40"};function Ft(e="normal"){return {strong:Jn.lg,high:Jn.lg,normal:Jn.md,low:Jn.sm}[e]}function ge(e,...t){return typeof e=="function"?e(...t):e}function pv(e="neutral",t="sm"){return tailwindMerge.twMerge("inline-flex items-center rounded-full font-medium",t==="sm"?"px-2 py-0.5 text-xs":"px-2.5 py-1 text-sm",{success:"bg-feedback-success-background text-feedback-success-text",error:"bg-feedback-error-background text-feedback-error-text",warning:"bg-feedback-warning-background text-feedback-warning-text",info:"bg-feedback-info-background text-feedback-info-text",neutral:"bg-background-muted text-text-secondary"}[e])}function mv(e){return e?"success":"neutral"}function od(e,t=false){return t?e>0?"text-feedback-success-text":e<0?"text-feedback-error-text":"text-text-primary":"text-text-primary"}function tf(e="hover",t="secondary"){let r={primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",secondary:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",default:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",brand:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",muted:"text-text-secondary hover:text-text-secondary visited:text-text-secondary",unstyled:""},o={visible:"underline underline-offset-4 decoration-1 cursor-pointer",hover:"hover:underline hover:underline-offset-4 hover:decoration-1 cursor-pointer transition-colors",none:"cursor-pointer"},n=r[t],a=o[e]||"";return `${n} ${a}`.trim()}function Jo(e,t,r,o="hover",n="secondary",a,i){if(!t)return e;let s=typeof t=="function"&&r?t(r):t,d=tf(o,n);return jsxRuntime.jsx("a",{href:s,className:tailwindMerge.twMerge(d,a==="strong"||a==="high"?"font-semibold":"",i),onClick:l=>{l.metaKey||l.ctrlKey;},children:e})}function fv({row:e,context:t,actions:r,align:o="right",size:n="sm"}){let{isLoading:a}=t;if(a)return jsxRuntime.jsx(q,{className:Jn.sm});let s=(typeof r=="function"?r(e):r).filter(c=>!ge(c.hidden,e));if(s.length===0)return null;let d=ke(o);return jsxRuntime.jsx("div",{className:d,children:s.map(c=>{let l=ge(c.disabled,e);return c.variant==="icon"||!c.label?jsxRuntime.jsx(te,{variant:"icon",size:n,onPress:()=>{c.onClick(e);},isDisabled:l,"aria-label":c.label||c.id,children:jsxRuntime.jsx(W,{name:c.icon||"DotsThree",size:n==="sm"?16:20})},c.id):jsxRuntime.jsxs(te,{variant:c.variant||"secondary",size:n,onPress:()=>{c.onClick(e);},isDisabled:l,children:[c.icon&&jsxRuntime.jsx(W,{name:c.icon,size:n==="sm"?14:16}),c.label]},c.id)})})}function hv({value:e,row:t,context:r,variant:o="default",label:n,size:a="sm",shape:i="square",dot:s,dotPosition:d="left",dotPulse:c,align:l="left",emptyText:u="\u2014",className:m,maxVisible:p=2,maxLabelLength:g}){let{isLoading:f}=r,h=(S,T)=>{if(!g||S.length<=g)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:S});let N=S.slice(0,g-1)+"\u2026";return jsxRuntime.jsx(tr,{content:T,children:jsxRuntime.jsx("span",{children:N})})};if(f)return jsxRuntime.jsx(q,{className:Ft("normal")});if(e==null||e==="")return jsxRuntime.jsx("div",{className:ke(l,"text-text-secondary"),children:u});if(Array.isArray(e)&&e.length===0)return jsxRuntime.jsx("div",{className:ke(l,"text-text-secondary"),children:u});let b=ke(l,m);if(Array.isArray(e)){let S=e.slice(0,p),T=e.slice(p),N=T.length>0;return jsxRuntime.jsx("div",{className:b,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[S.map((k,R)=>{let L=ge(o,k,t),E=n!==void 0?ge(n,k,t):String(k),B=ge(s,k,t),A=ge(c,k,t);return jsxRuntime.jsx("span",{className:"flex-shrink-0 whitespace-nowrap",children:jsxRuntime.jsx(kt,{variant:L,size:a,shape:i,dot:B,dotPosition:d,dotPulse:A,children:h(E,E)})},R)}),N&&jsxRuntime.jsx(tr,{content:T.join(", "),children:jsxRuntime.jsx("span",{className:"flex-shrink-0 whitespace-nowrap",children:jsxRuntime.jsxs(kt,{variant:"neutral",size:a,shape:i,children:["+",T.length]})})})]})})}let v=ge(o,e,t),x=n!==void 0?ge(n,e,t):String(e),C=ge(s,e,t),w=ge(c,e,t);return jsxRuntime.jsx("div",{className:b,children:jsxRuntime.jsx(kt,{variant:v,size:a,shape:i,dot:C,dotPosition:d,dotPulse:w,children:h(x,x)})})}function bv({value:e,context:t,format:r="icon",trueText:o="Yes",falseText:n="No",trueIcon:a="Check",falseIcon:i="X",showFalse:s=true,align:d="center",emphasis:c="normal",className:l}){let{isLoading:u}=t;if(u)return jsxRuntime.jsx(q,{className:Ft(c)});let m=!!e;if(!m&&!s)return jsxRuntime.jsx("div",{className:ke(d,l)});let p=ke(d,l);switch(r){case "icon":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx(W,{name:m?a:i,size:16,className:m?"text-feedback-success-text":"text-text-disabled"})});case "text":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx("span",{className:Hr(c),children:m?o:n})});case "badge":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx(kt,{variant:m?"success":"neutral",size:"sm",children:m?o:n})});default:return null}}var nd="var(--color-text-subtle)",xv=Rl().map((e,t)=>`var(--color-viz-categorical-${t+1})`);function vv({value:e,row:t,context:r,color:o,swatch:n="dot",emptyText:a="\u2014",align:i="left",className:s}){let{isLoading:d}=r;if(d)return jsxRuntime.jsx(q,{className:Ft("normal")});let c=ge(e,t),l=c==null?"":String(c);return l.length===0?jsxRuntime.jsx("div",{className:ke(i,"text-text-secondary"),children:a}):jsxRuntime.jsxs("div",{className:ke(i,tailwindMerge.twMerge("gap-2",s)),children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:tailwindMerge.twMerge("h-2 w-2 flex-shrink-0",n==="dot"?"rounded-full":"rounded-sm"),style:{backgroundColor:o??nd}}),jsxRuntime.jsx("span",{className:"truncate",children:l})]})}function Sv({row:e,context:t,firstName:r,lastName:o,email:n,avatarUrl:a,layout:i="stacked",size:s="sm",href:d,LinkComponent:c,linkVariant:l="secondary",showEmail:u=false,badge:m,emphasis:p="normal",align:g="left",className:f,piiEntity:h}){let{isLoading:b}=t,v=ge(r,e),x=ge(o,e),C=ge(n,e),w=ge(a,e),S=ge(d,e),T=ge(m,e),N=ge(h,e),k=ke(g,f);return jsxRuntime.jsx("div",{className:k,children:jsxRuntime.jsx(pc,{firstName:v,lastName:x,email:C,avatarUrl:w,layout:i,size:s,href:S,LinkComponent:c,linkVariant:l,showEmail:u,badge:T,emphasis:p,isLoading:b,piiEntity:N})})}function wv({value:e,row:t,context:r,render:o,className:n}){let a=o(e,t,r);return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-full w-full",n),children:a})}function Tv({value:e,row:t,context:r,format:o="date",customFormat:n,emptyText:a="\u2014",align:i="left",emphasis:s="normal",href:d,linkBehavior:c="hover",className:l}){let{isLoading:u}=r;if(u)return jsxRuntime.jsx(q,{className:Ft(s)});if(!e)return jsxRuntime.jsx("div",{className:ke(i,"text-text-secondary"),children:a});let m=e instanceof Date?e:new Date(e);if(isNaN(m.getTime()))return jsxRuntime.jsx("div",{className:ke(i,"text-text-secondary"),children:a});let p;switch(o){case "date":p=m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});break;case "time":p=m.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});break;case "datetime":p=m.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});break;case "relative":p=gL(m);break;case "custom":p=n?m.toLocaleString("en-US",n):m.toISOString();break;default:p=m.toLocaleDateString();}let g=ke(i,tailwindMerge.twMerge(Hr(s),l)),f=ge(d,t);return f?jsxRuntime.jsx("div",{className:g,children:Jo(p,f,t,c)}):jsxRuntime.jsx("div",{className:g,children:p})}function gL(e){let r=new Date().getTime()-e.getTime(),o=Math.floor(r/1e3),n=Math.floor(o/60),a=Math.floor(n/60),i=Math.floor(a/24);return o<60?"just now":n<60?`${n} minute${n!==1?"s":""} ago`:a<24?`${a} hour${a!==1?"s":""} ago`:i<7?`${i} day${i!==1?"s":""} ago`:e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}var bL={up:"ArrowUp",down:"ArrowDown",flat:"Minus"},xL={positive:"text-feedback-success-text",negative:"text-feedback-error-text",neutral:"text-text-secondary"};function rf(e){return e>0?"up":e<0?"down":"flat"}function yL(e,t,r){switch(e){case "percent":return {type:"percentage",decimals:t};case "currency":return {type:"currency",currency:r,minimumFractionDigits:t,maximumFractionDigits:t};case "compact":return {type:"number",notation:"compact",decimals:t,thousandsSeparator:true};default:return {type:"number",decimals:t,thousandsSeparator:true}}}function Nv({value:e,row:t,context:r,direction:o,tone:n="neutral",format:a="number",decimals:i=0,currency:s="USD",showIcon:d=true,align:c="right",emphasis:l="normal",emptyText:u="\u2014",className:m}){let{isLoading:p}=r;if(p)return jsxRuntime.jsx(q,{className:Ft(l)});let g=typeof e=="number"?e:Number(e);if(e==null||e===""||!Number.isFinite(g))return jsxRuntime.jsx("div",{className:ke(c,"text-text-secondary"),children:u});let f=ge(o,t)??rf(g),h=ge(n,t)??"neutral",b=Xr(g,yL(a,i,s))??u,v=g>0?"+":"",C=ke(c,tailwindMerge.twMerge(l==="strong"||l==="high"?"font-semibold":void 0,m,xL[h]));return jsxRuntime.jsxs("div",{className:C,children:[d&&jsxRuntime.jsx(W,{name:bL[f],size:"xs","aria-hidden":true}),jsxRuntime.jsx("span",{children:`${v}${b}`})]})}function sd({manufacturer:e,model:t,deviceType:r,deviceTypeIconName:o,logoUrl:n,layout:a="stacked",size:i="md",href:s,LinkComponent:d,linkVariant:c="unstyled",showDeviceTypeIcon:l=true,showLogo:u=true,emphasis:m="normal",isLoading:p=false,className:g,piiEntity:f}){let h=hs(n),[b,v]=ot.useState(),x=b!==void 0&&b===h,C=o||(r?SL(r):"DeviceMobile"),S={xs:{iconSize:28,logoSize:"w-7 h-7",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",iconInTextSize:12,skeletonIcon:28,skeletonText:80,skeletonSecondary:60},sm:{iconSize:32,logoSize:"w-8 h-8",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",iconInTextSize:14,skeletonIcon:32,skeletonText:96,skeletonSecondary:72},md:{iconSize:32,logoSize:"w-9 h-9",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",iconInTextSize:16,skeletonIcon:36,skeletonText:128,skeletonSecondary:96},lg:{iconSize:40,logoSize:"w-10 h-10",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",iconInTextSize:18,skeletonIcon:40,skeletonText:160,skeletonSecondary:120}}[i],T=h&&!x&&u,k={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[m],R=({children:L,className:E})=>s?d?jsxRuntime.jsx(d,{href:s,className:E,children:L}):jsxRuntime.jsx(St,{href:s,variant:c,className:tailwindMerge.twMerge("hover:underline",E),asButton:false,children:L}):jsxRuntime.jsx("span",{className:E,children:L});if(p)return a==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",S.gap,g),children:[jsxRuntime.jsx(q,{width:S.skeletonIcon,height:S.skeletonIcon,className:"flex-shrink-0 rounded"}),jsxRuntime.jsx(q,{width:S.skeletonText,height:S.skeletonIcon*.6})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",S.gap,g),children:[jsxRuntime.jsx(q,{width:S.skeletonIcon,height:S.skeletonIcon,className:"flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(q,{width:S.skeletonText,height:16}),jsxRuntime.jsx(q,{width:S.skeletonSecondary,height:12})]})]});if(a==="inline"){let L=`${e} ${t}`;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",S.gap,g),children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",S.logoSize),children:T?jsxRuntime.jsx("img",{src:h,alt:`${e} logo`,className:"w-full h-full object-contain",onError:()=>v(h)}):jsxRuntime.jsx(W,{name:C,size:S.iconSize*.6,className:"text-text-secondary"})}),jsxRuntime.jsx(R,{className:tailwindMerge.twMerge("truncate leading-normal hover:text-text-primary",k,S.textSize,s&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:L})})]})}return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",S.gap,g),children:[u&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",S.logoSize),children:T?jsxRuntime.jsx("img",{src:h,alt:`${e} logo`,className:"w-full h-full object-contain",onError:()=>v(h)}):jsxRuntime.jsx(W,{name:C,size:S.iconSize*.6,className:"text-text-secondary"})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsx(R,{className:tailwindMerge.twMerge("truncate leading-normal hover:text-text-primary",k,S.textSize,s&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:e})}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center gap-1.5 text-text-secondary leading-normal",S.secondaryTextSize),children:[l&&jsxRuntime.jsx(W,{name:C,size:S.iconInTextSize,className:"flex-shrink-0"}),jsxRuntime.jsx("span",{className:"truncate","data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:t})]})]})]})}function SL(e){switch(e){case "battery":return "BatteryHigh";case "charger":return "ChargingStation";case "inverter":return "Power";case "thermostat":return "ThermometerSimple";case "vehicle":return "CarSimple";case "water_heater":return "DropHalfBottom";case "meter":return "Gauge";case "sensor":return _i("sensor");default:return "DeviceMobile"}}function Pv({row:e,context:t,manufacturer:r,model:o,deviceType:n,logoUrl:a,layout:i="stacked",size:s="sm",href:d,LinkComponent:c,linkVariant:l="secondary",showDeviceTypeIcon:u=true,showLogo:m=true,emphasis:p="normal",align:g="left",className:f,piiEntity:h}){let{isLoading:b}=t,v=ge(r,e),x=ge(o,e),C=ge(n,e),w=ge(a,e),S=ge(d,e),T=ge(h,e),N=ke(g,f);return jsxRuntime.jsx("div",{className:N,children:jsxRuntime.jsx(sd,{manufacturer:v,model:x,deviceType:C,logoUrl:w,layout:i,size:s,href:S,LinkComponent:c,linkVariant:l,showDeviceTypeIcon:u,showLogo:m,emphasis:p,isLoading:b,piiEntity:T})})}var uQ={charging:"percentage",discharging:"percentage",on:"kW",idle:void 0,off:void 0,heat:"temperature",cool:"temperature",auto:"temperature",eco:"temperature",circulate:void 0,unknown:void 0,connected:void 0,disconnected:void 0},wL=["charging","discharging","heat","cool","on","circulate","connected"],TL={unknown:"Unknown",on:"On",off:"Off",idle:"Idle",charging:"Charging",discharging:"Discharging",heat:"Heating",eco:"Eco Mode",cool:"Cooling",auto:"Auto",circulate:"Circulating",connected:"Connected",disconnected:"Disconnected"};function of(e){return wL.includes(e)}function nf(e){return TL[e]}function Aa({state:e,label:t,icon:r,isLoading:o,size:n="sm",shape:a="pill",dot:i,dotPulse:s,fixedWidth:d,className:c,...l}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-20"});let u=t??nf(e),m=of(e);return jsxRuntime.jsxs(kt,{variant:e,size:n,shape:a,dot:i??m,dotPulse:s??m,className:d?`w-28 justify-center ${c||""}`:c,...l,children:[r&&jsxRuntime.jsx(W,{name:r,size:n==="sm"?12:n==="md"?14:16}),u]})}var kL={importing:"Importing",exporting:"Exporting",idle:"Idle",unknown:"Unknown"};function Mv(e){return kL[e]}var PL={importing:"ArrowDown",exporting:"ArrowUp"};function cd({state:e,label:t,showIcon:r=false,isLoading:o,size:n="sm",shape:a="pill",fixedWidth:i,className:s,...d}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-24"});let c=t??Mv(e),l=PL[e],u=n==="sm"?12:n==="md"?14:16;return r&&l?jsxRuntime.jsx(kt,{variant:e,size:n,shape:a,className:`w-6 justify-center ${s||""}`,...d,children:jsxRuntime.jsx(W,{name:l,size:u})}):jsxRuntime.jsx(kt,{variant:e,size:n,shape:a,className:i?`w-28 justify-center ${s||""}`:s,...d,children:c})}function dd({state:e,stateLabel:t,metric:r,metricFormatter:o,secondaryState:n,layout:a="horizontal",isLoading:i,size:s="sm",shape:d="pill",icon:c,fixedWidth:l,secondaryStateIconOnly:u=false,className:m}){if(i)return jsxRuntime.jsx(q,{className:tailwindMerge.twMerge("inline-flex h-6 w-32",m)});let p=r!=null&&o?Xr(r,o):null,g=a==="horizontal",f=o&&!p;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center",g?"gap-2":"flex-col gap-1",m),children:[(p||f)&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("font-medium inline-block",p?"text-text-primary":"text-text-secondary",s==="sm"&&"text-xs min-w-12",s==="md"&&"text-sm min-w-14",s==="lg"&&"text-base min-w-16"),children:p||"\u2014"}),jsxRuntime.jsx(Aa,{state:e,label:t,icon:c,size:s,shape:d,fixedWidth:l}),n&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:n==="importing"||n==="exporting"?jsxRuntime.jsx(cd,{state:n,size:s,shape:d,fixedWidth:l,showIcon:u}):jsxRuntime.jsx(Aa,{state:n,size:s,shape:d,fixedWidth:l})})]})}function Ev({value:e,row:t,context:r,metric:o,metricFormatter:n,secondaryState:a,size:i="sm",shape:s="pill",label:d,icon:c,fixedWidth:l=true,align:u="left",compact:m=false,className:p}){let{isLoading:g}=r;if(g){let C={pill:"rounded-full",rounded:"rounded-lg",square:"rounded-sm"}[s],w=o!=null||n!=null;return jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:w?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(q,{className:"h-4 w-12"}),jsxRuntime.jsx(q,{className:`h-6 w-24 ${C}`}),jsxRuntime.jsx(q,{className:`h-6 w-20 ${C}`})]}):jsxRuntime.jsx(q,{className:`h-6 w-24 ${C}`})})}if(!e)return jsxRuntime.jsx("div",{className:ke(u,p),children:jsxRuntime.jsx("span",{className:"text-text-secondary",children:"\u2014"})});let f=ge(o,t),h=ge(a,t),b=typeof d=="function"?d(e,t):d,v=ke(u,p);return f!=null||n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(v),children:jsxRuntime.jsx(dd,{state:e,stateLabel:b,metric:f,metricFormatter:n,secondaryState:h||void 0,size:i,shape:s,icon:c,fixedWidth:l,secondaryStateIconOnly:m,layout:"horizontal"})}):jsxRuntime.jsx("div",{className:v,children:jsxRuntime.jsx(Aa,{state:e,label:b,icon:c,size:i,shape:s,fixedWidth:l})})}function Dv({value:e,row:t,context:r,formatter:o,align:n="left",emphasis:a="normal",href:i,linkBehavior:s="hover",className:d,emptyText:c="\u2014",emptyClassName:l="text-text-secondary"}){let{isLoading:u}=r;if(u)return jsxRuntime.jsx(q,{className:Ft(a)});let m=Fo({value:e,formatter:o,emptyText:c,emptyClassName:l}),p=Hr(a),g=ke(n,tailwindMerge.twMerge(p,d)),f=jsxRuntime.jsx("div",{className:g,children:m}),h=ge(i,t);return h?Jo(f,h,t,s):f}var sf=ot__namespace.default.memo(({value:e,min:t,max:r,color:o="var(--color-viz-default)",backgroundColor:n="var(--color-background-muted)",colorScale:a,showLabel:i=true,formatLabel:s,height:d=20,minWidth:c=4,segments:l,segmentGap:u=2,barWidth:m,context:p})=>{let g=ot.useMemo(()=>r===t?100:Math.max(0,Math.min(100,(e-t)/(r-t)*100)),[e,t,r]),f=ot.useMemo(()=>o==="auto"&&a?a.type==="diverging"&&a.center!==void 0?as(e,t,r,a.center,a.scheme):ns(e,t,r,a.scheme):o,[o,a,e,t,r]);if(p.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-2 w-full",style:{height:d},children:jsxRuntime.jsx("div",{className:"h-full flex-1 animate-pulse bg-border-default rounded"})});if(l&&l>0){let v=`calc((100% - ${u*(l-1)}px) / ${l})`,x=Math.ceil(g/100*l),C={height:d,...m&&{width:typeof m=="number"?`${m}px`:m,flexShrink:0}};return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full",children:[jsxRuntime.jsx("div",{className:`flex gap-0.5 ${m?"":"flex-1"}`,style:C,children:Array.from({length:l}).map((w,S)=>{let T=S<x;return jsxRuntime.jsx("div",{className:"rounded-sm",style:{width:v,backgroundColor:T?f:n==="none"?"transparent":n,marginRight:S<l-1?`${u}px`:0}},S)})}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-primary whitespace-nowrap",children:s?s(e):e.toLocaleString()})]})}let h={height:d,backgroundColor:n==="none"?"transparent":n,...m&&{width:typeof m=="number"?`${m}px`:m,flexShrink:0}};return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full",children:[jsxRuntime.jsx("div",{className:`relative rounded-sm ${m?"":"flex-1"}`,style:h,children:jsxRuntime.jsx("div",{className:"absolute left-0 top-0 h-full rounded-sm",style:{width:`${g}%`,minWidth:g>0?c:0,backgroundColor:f}})}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-primary whitespace-nowrap",children:s?s(e):e.toLocaleString()})]})});sf.displayName="HorizontalBarCell";function BL(e){return Math.max(1,String(Math.max(1,Math.trunc(e))).length)}function Fv({context:e,startAt:t=1,padTo:r,rowCount:o,align:n="right",className:a}){let{isLoading:i,rowIndex:s}=e;if(i)return jsxRuntime.jsx(q,{className:Ft("normal")});if(typeof s!="number"||!Number.isFinite(s))return jsxRuntime.jsx("div",{className:ke(n,"text-text-muted"),children:"\u2014"});let d=s+t,c=r??(o===void 0?void 0:BL(o+t-1)),l=c===void 0?String(d):String(d).padStart(c,"0");return jsxRuntime.jsx("div",{className:ke(n,tailwindMerge.twMerge("font-mono text-text-muted tabular-nums",a)),children:jsxRuntime.jsx("span",{children:l})})}var lf=ot__namespace.default.memo(({value:e,data:t,color:r="var(--color-viz-default)",categoryColors:o,context:n,width:a,height:i=40})=>{let s=e||t||[],d=h=>"xValue"in h?h.xValue:h.x,c=h=>"yValue"in h?h.yValue:h.y,l=a||100,u=i,{xScale:m,yScale:p,barWidth:g}=ot.useMemo(()=>{if(s.length===0)return {xScale:scale.scaleTime({range:[0,l],domain:[new Date,new Date]}),yScale:scale.scaleLinear({range:[u,0],domain:[0,1]}),barWidth:2};let h=d3Array.extent(s,T=>d(T)),b=d3Array.min(s,T=>c(T))??0,v=d3Array.max(s,T=>c(T))??0,x=b<0?b:0,C=scale.scaleTime({range:[0,l],domain:h}),w=scale.scaleLinear({range:[u,0],domain:[x,v*1.05]}),S=s.length>1?l/s.length*.8:8;return {xScale:C,yScale:w,barWidth:Math.max(2,S)}},[s,l,u]);if(n.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-0.5",style:{width:l,height:u},children:Array.from({length:5}).map((h,b)=>jsxRuntime.jsx("div",{className:"flex-1 animate-pulse bg-border-default rounded"},b))});if(!s||s.length===0)return jsxRuntime.jsx("div",{className:"flex items-center justify-center text-text-secondary text-xs",style:{width:l,height:u},children:"No data"});let f=p(0);return jsxRuntime.jsx("svg",{width:l,height:u,children:s.map((h,b)=>{let v=c(h),x=m(d(h)),C=p(v),w=Math.abs(f-C),S=h.category&&o?.[h.category]?o[h.category]:r;return jsxRuntime.jsx(shape.Bar,{x:x-g/2,y:v>=0?C:f,width:g,height:w,fill:S,rx:1},`bar-${b}`)})})});lf.displayName="MiniBarCell";function Ov({value:e,row:t,context:r,format:o="number",decimals:n=0,prefix:a,suffix:i,emptyText:s="\u2014",align:d="right",emphasis:c="normal",href:l,linkBehavior:u="hover",showPositiveSign:m=false,colorCode:p=false,className:g}){let{isLoading:f}=r;if(f)return jsxRuntime.jsx(q,{className:Ft(c)});if(e==null||isNaN(Number(e)))return jsxRuntime.jsx("div",{className:ke(d,"text-text-secondary"),children:s});let h=Number(e),b;switch(o){case "currency":b=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:n,maximumFractionDigits:n}).format(h);break;case "percent":b=new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:n,maximumFractionDigits:n}).format(h/100);break;case "compact":b=new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:n>0?1:0,maximumFractionDigits:n}).format(h);break;default:b=new Intl.NumberFormat("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).format(h);}let x=`${m&&h>0?"+":""}${b}`,C=p?od(h,true):Hr(c),w=ke(d,tailwindMerge.twMerge(C,g)),S=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:a}),jsxRuntime.jsx("span",{children:x}),i&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:i})]}),T=ge(l,t);return T?jsxRuntime.jsx("div",{className:w,children:Jo(S,T,t,u)}):jsxRuntime.jsx("div",{className:w,children:S})}var JL={low:"var(--color-feedback-warning-text)",critical:"var(--color-feedback-error-text)"};function df(e,t){if(t){if(t.critical!==void 0&&e<=t.critical)return "critical";if(t.low!==void 0&&e<=t.low)return "low"}}var uf=ot__namespace.default.memo(({value:e,showLabel:t=true,color:r="var(--color-viz-categorical-1)",backgroundColor:o="var(--color-background-muted)",height:n=20,segments:a,segmentGap:i=2,colorScale:s,thresholds:d,context:c})=>{let l=ot.useMemo(()=>Math.max(0,Math.min(100,e)),[e]),u=ot.useMemo(()=>df(l,d),[l,d]),m=ot.useMemo(()=>u?JL[u]:r==="auto"&&s?s.type==="diverging"&&s.center!==void 0?as(e,0,100,s.center,s.scheme):ns(e,0,100,s.scheme):r,[r,s,u,e]);if(c.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-2",style:{height:n},children:jsxRuntime.jsx("div",{className:"h-full w-full animate-pulse bg-border-default rounded"})});if(a&&a>0){let g=`calc((100% - ${i*(a-1)}px) / ${a})`,f=Math.ceil(l/100*a);return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full","data-threshold":u,children:[jsxRuntime.jsx("div",{className:"flex gap-0.5 flex-1",style:{height:n},children:Array.from({length:a}).map((h,b)=>{let v=b<f,x=m;if(!u&&r==="auto"&&s&&v){let C=(b+1)/a*100;s.type==="diverging"&&s.center!==void 0?x=as(C,0,100,s.center,s.scheme):x=ns(C,0,100,s.scheme);}return jsxRuntime.jsx("div",{className:"rounded-sm",style:{width:g,backgroundColor:v?x:o==="none"?"transparent":o,marginRight:b<a-1?`${i}px`:0}},b)})}),t&&jsxRuntime.jsxs("span",{className:"text-sm text-text-primary whitespace-nowrap",children:[l.toFixed(0),"%"]})]})}return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full","data-threshold":u,children:[jsxRuntime.jsx("div",{className:"relative flex-1 rounded-sm",style:{height:n,backgroundColor:o==="none"?"transparent":o},children:jsxRuntime.jsx("div",{className:"absolute left-0 top-0 h-full rounded-sm transition-all duration-300",style:{width:`${l}%`,backgroundColor:m}})}),t&&jsxRuntime.jsxs("span",{className:"text-sm text-text-primary whitespace-nowrap",children:[l.toFixed(0),"%"]})]})});uf.displayName="PercentBarCell";var qL="\u2013",zv="\u200A";function Hv(e){if(e==null||e==="")return;let t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?t:void 0}function Gv({row:e,context:t,min:r,max:o,decimals:n=0,unit:a,emptyText:i="\u2014",align:s="right",emphasis:d="normal",className:c}){let{isLoading:l}=t;if(l)return jsxRuntime.jsx(q,{className:Ft(d)});let u=Hv(ge(r,e)),m=Hv(ge(o,e));if(u===void 0&&m===void 0)return jsxRuntime.jsx("div",{className:ke(s,"text-text-secondary"),children:i});let p=h=>new Intl.NumberFormat("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).format(h),g=u!==void 0&&m!==void 0?`${p(u)}${zv}${qL}${zv}${p(m)}`:p(u!==void 0?u:m),f=ke(s,tailwindMerge.twMerge("tabular-nums",Hr(d),c));return jsxRuntime.jsxs("div",{className:f,children:[jsxRuntime.jsx("span",{children:g}),a&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:a})]})}function gd({row:e,context:t,isSelected:r=false,onSelect:o,isDisabled:n=false,align:a="center"}){let{isLoading:i}=t;if(i)return jsxRuntime.jsx("div",{className:ke(a),children:jsxRuntime.jsx(q,{className:"h-4 w-4 rounded"})});let s=ge(n,e),d=ke(a);return jsxRuntime.jsx("div",{className:d,children:jsxRuntime.jsx(wo,{isSelected:r,onChange:c=>{o?.(e,c);},isDisabled:s,"aria-label":"Select row"})})}function hd({streetAddress:e,city:t,state:r,postalCode:o,layout:n="stacked",size:a="md",href:i,LinkComponent:s,linkVariant:d="unstyled",emphasis:c="normal",isLoading:l=false,showIcon:u=true,className:m,piiEntity:p}){let f={xs:{iconSize:16,iconContainerSize:"w-7 h-7",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",skeletonIconStacked:28,skeletonIconInline:16,skeletonText:80,skeletonSecondary:60},sm:{iconSize:20,iconContainerSize:"w-8 h-8",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",skeletonIconStacked:32,skeletonIconInline:20,skeletonText:96,skeletonSecondary:72},md:{iconSize:24,iconContainerSize:"w-9 h-9",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",skeletonIconStacked:36,skeletonIconInline:24,skeletonText:128,skeletonSecondary:96},lg:{iconSize:28,iconContainerSize:"w-10 h-10",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",skeletonIconStacked:40,skeletonIconInline:28,skeletonText:160,skeletonSecondary:120}}[a],b={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[c],v=[];t&&v.push(t),r&&o?v.push(`${r} ${o}`):r?v.push(r):o&&v.push(o);let x=v.join(", "),C=({children:S,className:T})=>i?s?jsxRuntime.jsx(s,{href:i,className:T,children:S}):jsxRuntime.jsx(St,{href:i,variant:d,className:tailwindMerge.twMerge("hover:underline",T),asButton:false,children:S}):jsxRuntime.jsx("span",{className:T,children:S});if(l)return n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",f.gap,m),children:[u&&jsxRuntime.jsx(q,{width:f.skeletonIconInline,height:f.skeletonIconInline,className:"flex-shrink-0 rounded"}),jsxRuntime.jsx(q,{width:f.skeletonText,height:f.skeletonIconInline*.8})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",f.gap,m),children:[u&&jsxRuntime.jsx(q,{width:f.skeletonIconStacked,height:f.skeletonIconStacked,className:"flex-shrink-0 rounded"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(q,{width:f.skeletonText,height:16}),jsxRuntime.jsx(q,{width:f.skeletonSecondary,height:12})]})]});if(n==="inline")return jsxRuntime.jsxs(C,{className:tailwindMerge.twMerge("flex items-center",f.gap,i&&"hover:bg-background-hover transition-colors",m),children:[u&&jsxRuntime.jsx(W,{name:"MapPin",size:f.iconSize,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",b,f.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),"data-pii-type":p?"address":void 0,"data-pii-entity":p,children:e})]});let w=()=>{if(p){if(t&&r&&o)return "city-state-zip";if(t&&r)return "city-state";if(t)return "city";if(r)return "state";if(o)return "postal-code"}};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",f.gap,m),children:[u&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",f.iconContainerSize),children:jsxRuntime.jsx(W,{name:"MapPin",size:f.iconSize,className:"text-text-secondary"})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsx(C,{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",b,f.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":p?"address":void 0,"data-pii-entity":p,children:e})}),x&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary leading-normal truncate",f.secondaryTextSize),"data-pii-type":w(),"data-pii-entity":p,children:x})]})]})}function Uv({row:e,context:t,streetAddress:r,city:o,state:n,postalCode:a,layout:i="stacked",size:s="sm",href:d,LinkComponent:c,linkVariant:l="secondary",emphasis:u="normal",align:m="left",className:p,piiEntity:g}){let{isLoading:f}=t,h=ge(r,e),b=ge(o,e),v=ge(n,e),x=ge(a,e),C=ge(d,e),w=ge(g,e),S=ke(m,p);return jsxRuntime.jsx("div",{className:S,children:jsxRuntime.jsx(hd,{streetAddress:h,city:b,state:v,postalCode:x,layout:i,size:s,href:C,LinkComponent:c,linkVariant:l,emphasis:u,isLoading:f,piiEntity:w})})}var pf=ot__namespace.default.memo(({value:e,data:t,type:r="line",color:o="var(--color-viz-default)",strokeWidth:n=2,categoryColors:a,context:i,width:s,height:d=40})=>{let c=e||t||[],l=s||100,u=d,{xScale:m,yScale:p}=ot.useMemo(()=>{if(c.length===0)return {xScale:scale.scaleTime({range:[0,l],domain:[new Date,new Date]}),yScale:scale.scaleLinear({range:[u,0],domain:[0,1]})};let f=d3Array.extent(c,x=>x.xValue),h=d3Array.min(c,x=>x.yValue)||0,b=d3Array.max(c,x=>x.yValue)||0,v=(b-h)*.1||1;return {xScale:scale.scaleTime({range:[0,l],domain:f}),yScale:scale.scaleLinear({range:[u,0],domain:[h-v,b+v]})}},[c,l,u]);if(i.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center",style:{width:l,height:u},children:jsxRuntime.jsx("div",{className:"h-1 w-full animate-pulse bg-border-default rounded"})});if(!c||c.length===0)return jsxRuntime.jsx("div",{className:"flex items-center justify-center text-text-secondary text-xs",style:{width:l,height:u},children:"No data"});let g=a&&c[0]?.category&&a[c[0].category]?a[c[0].category]:o;return jsxRuntime.jsxs("svg",{width:l,height:u,className:"overflow-visible",children:[(r==="area"||r==="both")&&jsxRuntime.jsx(shape.AreaClosed,{data:c,x:f=>m(f.xValue),y:f=>p(f.yValue),yScale:p,fill:g,fillOpacity:.15,curve:curve.curveLinear}),(r==="line"||r==="both")&&jsxRuntime.jsx(shape.LinePath,{data:c,x:f=>m(f.xValue),y:f=>p(f.yValue),stroke:g,strokeWidth:n,strokeLinecap:"round",curve:curve.curveLinear})]})});pf.displayName="SparklineCell";function Jv({value:e,row:t,context:r,prefix:o,suffix:n,emptyText:a="\u2014",href:i,linkBehavior:s="hover",linkVariant:d="secondary",emphasis:c="normal",truncate:l=true,copyable:u=false,align:m="left",className:p,piiType:g,piiEntity:f}){let{isLoading:h}=r;if(h)return jsxRuntime.jsx(q,{className:Ft(c)});let b=rd(e,a),v=ge(i,t),x=ge(f,t),C=b,w=false,S=false;if(l&&b&&typeof b=="string")if(typeof l=="boolean")S=true;else {let{position:A="end",length:H=16,ellipsis:Y="...",tooltip:G=true}=l;if(b.length>H){switch(A){case "start":C=Fl(b,H);break;case "middle":C=ii(b,H);break;case "end":C=Bl(b,H,Y);break}w=G;}}let T=g&&x?{"data-pii-type":g,"data-pii-entity":x}:{},N=Object.keys(T).length>0,k=jsxRuntime.jsx("span",{className:S?"truncate":"",...T,children:C}),R=w?jsxRuntime.jsx(tr,{content:N?jsxRuntime.jsx("span",{...T,children:String(b)}):String(b),children:k}):k,L=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:o}),R,n&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:n})]}),E=L;if(u&&b&&b!==a){let A=typeof u=="function"?u(t):String(b);E=jsxRuntime.jsx(In,{value:A,size:"sm",children:L});}if(v){let A=ke(m,p);return jsxRuntime.jsx("div",{className:A,children:Jo(E,v,t,s,d,c)})}let B=ke(m,tailwindMerge.twMerge(Hr(c),p));return jsxRuntime.jsx("div",{className:B,children:E})}var lD={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"},cD={sm:"hidden sm:grid",md:"hidden md:grid",lg:"hidden lg:grid",xl:"hidden xl:grid"};function bd(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function xd(e,t,r,o){if(r.cell){let n=r.cell,a=typeof r.cellProps=="function"?r.cellProps(e,t):r.cellProps;return jsxRuntime.jsx(n,{value:e,row:t,context:o,...a})}return r.render?r.render(e,t,o):e?.toString()??"\u2014"}function vd({row:e,columns:t,density:r,isLoading:o,onClick:n}){let a=t.filter(u=>u.mobile!==false).map(u=>{let m=u.mobile===false?null:u.mobile;return {...u,mobilePriority:m?.priority??2,mobileFormat:m?.format??"secondary",showLabel:m?.label??m?.format==="secondary",icon:m?.icon}}).sort((u,m)=>u.mobilePriority-m.mobilePriority),i=a.filter(u=>u.mobilePriority===1||u.mobileFormat==="primary"),s=a.filter(u=>u.mobilePriority===2&&u.mobileFormat!=="primary"),d=a.filter(u=>u.mobileFormat==="badge"),c={isLoading:!!o,rowIndex:0,columnIndex:0,density:r};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface transition-colors",n&&"cursor-pointer hover:bg-background-hover active:bg-background-pressed",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[r]),onClick:n,role:n?"button":void 0,tabIndex:n?0:void 0,children:[i.length>0&&jsxRuntime.jsxs("div",{className:"mb-2 flex items-start justify-between",children:[jsxRuntime.jsx("div",{className:"flex-1",children:i.map(u=>{let m=bd(e,u);return jsxRuntime.jsx("div",{className:"font-medium text-text-primary [&>*]:!justify-start [&>*]:!text-left",children:xd(m,e,u,c)},u.id)})}),d.length>0&&jsxRuntime.jsx("div",{className:"ml-2 flex flex-wrap gap-1",children:d.map(u=>{let m=bd(e,u);return jsxRuntime.jsx("div",{className:"inline-flex",children:xd(m,e,u,c)},u.id)})})]}),s.length>0&&jsxRuntime.jsx("div",{className:"space-y-1",children:s.map(u=>{let m=bd(e,u),p=u.showLabel&&u.label;return jsxRuntime.jsxs("div",{className:"flex items-center text-sm text-text-secondary",children:[u.icon&&jsxRuntime.jsx(W,{name:u.icon,className:"mr-1.5 h-4 w-4 flex-shrink-0"}),p&&jsxRuntime.jsxs("span",{className:"mr-1 font-medium",children:[u.label,":"]}),jsxRuntime.jsx("span",{className:"truncate [&>*]:!justify-start [&>*]:!text-left",children:xd(m,e,u,c)})]},u.id)})})]})}function Cd({row:e,columns:t,density:r,isLoading:o,onClick:n}){let a=t.filter(d=>d.mobile!==false),i={isLoading:!!o,rowIndex:0,columnIndex:0,density:r};return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface transition-colors",n&&"cursor-pointer hover:bg-background-hover active:bg-background-pressed",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[r]),onClick:n,role:n?"button":void 0,tabIndex:n?0:void 0,children:jsxRuntime.jsx("div",{className:"space-y-2",children:a.map((d,c)=>{let l=bd(e,d),u=c===0;return jsxRuntime.jsxs("div",{children:[!u&&jsxRuntime.jsx("div",{className:"text-xs text-text-secondary",children:d.label}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(u?"font-medium text-text-primary":"text-sm text-text-primary","[&>*]:!justify-start [&>*]:!text-left"),children:xd(l,e,d,i)})]},d.id)})})})}function jv(e="md"){return {mobile:lD[e],desktop:cD[e]}}function qv({density:e}){return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[e]),children:[jsxRuntime.jsx("div",{className:"mb-2 h-5 w-3/4 animate-pulse rounded bg-background-muted"}),jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-background-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-2/3 animate-pulse rounded bg-background-muted"})]})]})}var Sd=10,mf=200;function dD(e){return e===void 0||!Number.isInteger(e)||e<=0?Sd:Math.min(e,mf)}function wd(e,t,r){let o=typeof e=="boolean"?{}:e??{},n=dD(o.pageSize),a=o.totalRows??t,i=Math.max(1,Math.ceil(a/n)),s=Math.min(Math.max(Math.trunc(r)||0,0),i-1),d=s*n,c=Math.min(d+n,o.totalRows!==void 0?t:a),l=Math.max(0,c-(o.totalRows!==void 0?0:d));return {page:s,pageCount:i,start:d,end:c,from:a===0?0:d+1,to:a===0?0:d+l,total:a}}var uD={compact:"px-3 py-1.5",default:"px-3 py-2",relaxed:"px-4 py-3"};function Td({page:e,pageCount:t,from:r,to:o,total:n,density:a,onPageChange:i,label:s="Pagination"}){let d=e<=0,c=e>=t-1;return jsxRuntime.jsxs("nav",{"data-testid":"data-table-pagination","aria-label":s,className:tailwindMerge.twMerge("flex items-center gap-3 border-t border-border-default","justify-between @sm:justify-start",uD[a]),children:[jsxRuntime.jsx(te,{size:"sm",variant:"ghost",icon:"CaretLeft",isDisabled:d,onPress:()=>i(e-1),"aria-label":"Previous page",className:"order-1 @sm:order-2",children:jsxRuntime.jsx("span",{className:"@sm:hidden",children:"Previous"})}),jsxRuntime.jsx("p",{className:tailwindMerge.twMerge("m-0 flex min-w-0 items-baseline gap-2 text-body-sm text-text-secondary","order-2 @sm:order-1 @sm:grow"),children:jsxRuntime.jsx("span",{className:"truncate tabular-nums",children:n===0?"No rows":`Showing ${r}\u2013${o} of ${n.toLocaleString()}`})}),jsxRuntime.jsx(te,{size:"sm",variant:"ghost",icon:"CaretRight",iconPosition:"right",isDisabled:c,onPress:()=>i(e+1),"aria-label":"Next page",className:"order-3",children:jsxRuntime.jsx("span",{className:"@sm:hidden",children:"Next"})}),jsxRuntime.jsx("span",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:n===0?"No rows":`Page ${e+1} of ${t}, showing rows ${r} to ${o} of ${n}`})]})}var TD={compact:"py-1.5 px-3 text-sm",default:"py-3 px-4 text-sm",relaxed:"py-4 px-4 text-base"},ND={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};function kD(e){let t={};return e.width!==void 0&&(t.width=typeof e.width=="number"?`${e.width}px`:e.width),e.minWidth!==void 0&&(t.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),e.maxWidth!==void 0&&(t.maxWidth=typeof e.maxWidth=="number"?`${e.maxWidth}px`:e.maxWidth),e.flex!==void 0&&(t.flex=`${e.flex} 1 0`),t}function PD({column:e,sortConfig:t,onSort:r,stickyHeader:o,stickyFirstColumn:n,isFirstColumn:a,density:i="default",isLoading:s=false,headerContent:d,sortNote:c}){let l=e.reorderable!==false,{attributes:u,listeners:m,setNodeRef:p,transform:g,transition:f,isDragging:h}=sortable.useSortable({id:e.id,disabled:!l||s}),{role:b,"aria-pressed":v,...x}=u,C=t?.columnId===e.id,w=C?t.direction:null,S=n&&a,T=C?c:void 0,N={...kD(e),transform:utilities.CSS.Transform.toString(g),transition:f,opacity:h?.8:1,zIndex:h?50:void 0};return jsxRuntime.jsx("div",{ref:p,className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.sortable?"gap-2":"gap-1",TD[i],ND[e.align||"left"],o&&"sticky top-0 z-10",S&&"sticky left-0 z-20 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",o&&S&&"z-30",e.sortable&&!s&&"hover:bg-background-hover",s&&"cursor-not-allowed opacity-60",C?"font-bold text-text-primary":"font-medium text-text-secondary",h&&"bg-background-hover"),style:N,...x,...m,role:"columnheader","aria-sort":C?w==="asc"?"ascending":"descending":"none","aria-disabled":s,title:T,"data-sort-note":T,children:s?jsxRuntime.jsx(q,{className:"h-4 w-24"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d??jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex-1 truncate",e.sortable&&"cursor-pointer"),onClick:()=>!s&&e.sortable&&r(e.id),children:e.label}),T&&jsxRuntime.jsx("span",{className:"sr-only",children:T}),e.sortable?jsxRuntime.jsx("button",{type:"button",className:"flex flex-shrink-0 cursor-pointer",onClick:()=>!s&&r(e.id),"aria-label":`Sort by ${e.label}`,children:C?jsxRuntime.jsx(W,{name:w==="asc"?"CaretUp":"CaretDown",size:14,weight:T?"regular":"bold",className:T?"text-text-secondary opacity-40":"text-text-primary"}):jsxRuntime.jsx(W,{name:"CaretUpDown",size:12,className:"text-text-secondary opacity-40"})}):C?jsxRuntime.jsx("span",{className:"flex flex-shrink-0",children:jsxRuntime.jsx(W,{name:w==="asc"?"CaretUp":"CaretDown",size:14,weight:T?"regular":"bold",className:T?"text-text-secondary opacity-40":"text-text-primary"})}):null]})})}function $v({columns:e,columnOrder:t,onColumnOrderChange:r,sortConfig:o,onSort:n,stickyHeader:a,stickyFirstColumn:i,density:s="default",isLoading:d=false,renderHeaderContent:c,sortNote:l}){let u=core$1.useSensors(core$1.useSensor(core$1.PointerSensor,{activationConstraint:{distance:5}}),core$1.useSensor(core$1.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),m=new Map(e.map(f=>[f.id,f])),p=f=>{let{active:h,over:b}=f;if(b&&h.id!==b.id){let v=t.indexOf(h.id),x=t.indexOf(b.id);if(m.get(b.id)?.reorderable===false)return;let w=0;for(let k=0;k<t.length&&m.get(t[k])?.reorderable===false;k++)w=k+1;if(x<w)return;let S=Math.min(v,x),T=Math.max(v,x);for(let k=S;k<=T;k++){if(k===v)continue;if(m.get(t[k])?.reorderable===false)return}let N=sortable.arrayMove(t,v,x);r(N);}},g=t.map(f=>m.get(f)).filter(f=>f!==void 0);return jsxRuntime.jsx(core$1.DndContext,{sensors:u,collisionDetection:core$1.closestCenter,onDragEnd:p,children:jsxRuntime.jsx(sortable.SortableContext,{items:t,strategy:sortable.horizontalListSortingStrategy,children:jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:g.map((f,h)=>jsxRuntime.jsx(PD,{column:f,sortConfig:o,onSort:n,stickyHeader:a,stickyFirstColumn:i,isFirstColumn:h===0,density:s,isLoading:d,headerContent:c?.(f),sortNote:l},f.id))})})})}var Nd="__select",DD=new Set,ff={compact:"py-1.5 px-3 text-sm",default:"py-3 px-4 text-sm",relaxed:"py-4 px-4 text-base"},gf={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"},AD={full:"w-full",auto:"w-auto inline-block",contained:"w-full max-w-6xl mx-auto"},ID={auto:"table-auto",fixed:"table-fixed",responsive:"table-auto"};function tC(e){if(typeof e=="number")return e;let t=/^(\d+(?:\.\d+)?)px$/.exec(e.trim());return t?Number(t[1]):0}function hf(e){let t={};return e.width!==void 0&&(t.width=typeof e.width=="number"?`${e.width}px`:e.width),e.minWidth!==void 0&&(t.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),e.maxWidth!==void 0&&(t.maxWidth=typeof e.maxWidth=="number"?`${e.maxWidth}px`:e.maxWidth),e.flex!==void 0&&(t.flex=`${e.flex} 1 0`),t}function FD(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function BD({column:e,sortConfig:t,onSort:r,stickyHeader:o,stickyFirstColumn:n,isFirstColumn:a,density:i="default",isLoading:s=false,headerContent:d,sortNote:c}){let l=t?.columnId===e.id,u=l?t.direction:null,m=n&&a,p=l?c:void 0;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.sortable?"gap-2":"gap-1",ff[i],gf[e.align||"left"],o&&"sticky top-0 z-10",m&&"sticky left-0 z-20 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",o&&m&&"z-30",e.sortable&&!s&&"cursor-pointer hover:bg-background-hover",s&&"cursor-not-allowed opacity-60",l?"font-bold text-text-primary":"font-medium text-text-secondary"),onClick:()=>!s&&e.sortable&&r(e.id),role:"columnheader","aria-sort":l?u==="asc"?"ascending":"descending":"none","aria-disabled":s,title:p,"data-sort-note":p,style:hf(e),children:s?jsxRuntime.jsx(q,{className:"h-4 w-24"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d??jsxRuntime.jsx("span",{className:"truncate",children:e.label}),e.headerTooltip&&jsxRuntime.jsx(tr,{content:e.headerTooltip,children:jsxRuntime.jsx(te,{variant:"ghost","aria-label":`About ${e.label}`,onClick:g=>g.stopPropagation(),className:"h-auto min-h-0 flex-shrink-0 p-0 text-text-tertiary hover:text-text-secondary",children:jsxRuntime.jsx(W,{name:"Info",size:12,"aria-hidden":true})})}),p&&jsxRuntime.jsx("span",{className:"sr-only",children:p}),(e.sortable||l)&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0",children:l?jsxRuntime.jsx(W,{name:u==="asc"?"CaretUp":"CaretDown",size:14,weight:p?"regular":"bold",className:p?"text-text-secondary opacity-40":"text-text-primary"}):jsxRuntime.jsx(W,{name:"CaretUpDown",size:12,className:"text-text-secondary opacity-40"})})]})})}function VD({column:e,row:t,rowIndex:r,columnIndex:o,isHovered:n,isSelected:a,density:i="default",className:s,stickyFirstColumn:d}){let c=d&&o===0,l=FD(t,e),u={isLoading:false,isHovered:n,...a===void 0?{}:{isSelected:a},rowIndex:r,columnIndex:o,density:i},m;if(e.cell){let p=e.cell,g=typeof e.cellProps=="function"?e.cellProps(l,t):e.cellProps;m=jsxRuntime.jsx(p,{value:l,row:t,context:u,...g});}else e.render?m=e.render(l,t,u):m=jsxRuntime.jsx("span",{className:"truncate",children:l?.toString()??""});if(e.popover){let p=e.popover,g,f="top",h=false,b="hover";typeof p=="string"?g=p:typeof p=="function"?g=p(l,t):(g=typeof p.content=="function"?p.content(l,t):p.content,f=p.placement||"top",h=p.showArrow??false,b=p.trigger||"hover"),m=jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{...b==="hover"?{trigger:"longPress"}:{},children:[jsxRuntime.jsx("div",{className:"cursor-help",children:m}),jsxRuntime.jsx(Et,{placement:f,showArrow:h,children:jsxRuntime.jsx("div",{className:"p-2",children:g})})]});}return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.noCellPadding?"":ff[i],gf[e.align||"left"],c&&"sticky left-0 z-10 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",s),role:"cell",style:hf(e),children:m})}function OD({column:e,rowIndex:t,columnIndex:r,density:o="default",stickyFirstColumn:n}){let a=n&&r===0,i={isLoading:true,rowIndex:t,columnIndex:r,density:o},s;if(e.cell){let d=e.cell,c=typeof e.cellProps=="function"?e.cellProps(null,{}):e.cellProps;s=jsxRuntime.jsx(d,{value:null,row:{},context:i,...c});}else e.render?s=e.render(null,{},i):s=jsxRuntime.jsx(q,{className:"h-4 w-full max-w-[200px]"});return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.noCellPadding?"":ff[o],gf[e.align||"left"],a&&"sticky left-0 z-10 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]"),role:"cell",style:hf(e),children:s})}function zD(e,t){let r=new Set(["BUTTON","A","INPUT","SELECT","TEXTAREA"]),o=new Set(["button","link","checkbox","switch","menuitem","option"]),n=e;for(;n&&n!==t;){if(r.has(n.tagName))return true;let a=n.getAttribute("role");if(a&&o.has(a))return true;n=n.parentElement;}return false}function rC({columns:e,row:t,rowIndex:r,density:o="default",onClick:n,stickyFirstColumn:a,isSelected:i}){let[s,d]=ot.useState(false),c=ot.useCallback(l=>{if(!n)return;let u=l.target,m=l.currentTarget;zD(u,m)||n(t);},[n,t]);return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("contents group",n&&"cursor-pointer"),role:"row","aria-selected":i===void 0?void 0:i,onClick:c,onMouseEnter:()=>d(true),onMouseLeave:()=>d(false),children:e.map((l,u)=>jsxRuntime.jsx(VD,{column:l,row:t,rowIndex:r,columnIndex:u,isHovered:s,isSelected:i,density:o,className:tailwindMerge.twMerge(n?"group-hover:bg-background-hover":"",i&&"bg-background-selected"),stickyFirstColumn:a},l.id))})}function HD({columns:e,rowIndex:t,density:r="default",stickyFirstColumn:o}){return jsxRuntime.jsx("div",{className:"contents",role:"row",children:e.map((n,a)=>jsxRuntime.jsx(OD,{column:n,rowIndex:t,columnIndex:a,density:r,stickyFirstColumn:o},n.id))})}function oC({columns:e,data:t,className:r,density:o="default",width:n="full",height:a,maxHeight:i,layout:s="auto",mobileRenderer:d="auto",customMobileRowRender:c,mobileBreakpoint:l="md",isLoading:u=false,loadingState:m,loadingRowCount:p=5,onLoadMore:g,hasMore:f=false,enableVirtualization:h,estimatedRowHeight:b,loadingIndicator:v,stickyHeader:x=false,stickyFirstColumn:C=false,onRowClick:w,getRowId:S,selectedRowIds:T,onSelectionChange:N,selectionMode:k="multi",hideHeader:R=false,sortConfig:L,onSort:E,sortNote:B,"aria-label":A,enableColumnReorder:H=false,columnOrder:Y,onColumnOrderChange:G,pagination:I}){let F=I!==void 0&&I!==false,O=typeof I=="object"?I:void 0,U=O?.page,K=U!==void 0,[z,V]=ot.useState(0),D=wd(I,t.length,K?U:z),y=ot.useCallback(ne=>{let Se=Math.min(Math.max(ne,0),D.pageCount-1);K||V(Se),O?.onPageChange?.(Se);},[K,O,D.pageCount]),M=ot.useMemo(()=>!F||O?.totalRows!==void 0?t:t.slice(D.start,D.end),[t,F,O?.totalRows,D.start,D.end]);ot.useEffect(()=>{K||!F||z!==D.page&&V(D.page);},[K,F,z,D.page]);let P=N!==void 0,X=T??DD,$=ot.useCallback((ne,Se)=>{if(S)return S(ne);let ce=ne.id;return typeof ce=="string"&&ce.length>0?ce:typeof ce=="number"&&Number.isFinite(ce)?String(ce):`row-${Se}`},[S]),oe=ot.useMemo(()=>M.map((ne,Se)=>$(ne,Se)),[M,$]),re=ot.useCallback((ne,Se)=>{if(!N)return;if(k==="single"){N(Se?new Set([ne]):new Set);return}let ce=new Set(X);Se?ce.add(ne):ce.delete(ne),N(ce);},[N,X,k]),_=oe.filter(ne=>X.has(ne)).length,he=oe.length>0&&_===oe.length,me=_>0&&!he,ue=ot.useCallback(ne=>{if(!N)return;let Se=new Set(X);for(let ce of oe)ne?Se.add(ce):Se.delete(ce);N(Se);},[N,oe,X]),ie=ot.useMemo(()=>P?[{id:Nd,label:"",width:44,align:"center",sortable:false,reorderable:false,exportable:false,mobile:false,render:(Se,ce,ct)=>{let yr=$(ce,ct.rowIndex);return jsxRuntime.jsx(gd,{value:void 0,row:ce,context:ct,isSelected:X.has(yr),onSelect:(vo,Co)=>re(yr,Co)})}},...e]:e,[e,P,X,$,re]),fe=P&&k==="multi"?jsxRuntime.jsx(wo,{isSelected:he,isIndeterminate:me,onChange:ne=>ue(ne),isDisabled:oe.length===0,"aria-label":he?"Deselect all rows on this page":"Select all rows on this page"}):void 0,Te=ot.useCallback(ne=>ne.id===Nd?fe:void 0,[fe]),[Ye,yt]=ot.useState(null),Qt=L!==void 0,Ze=Qt?L:Ye,fr=ot.useRef(null),lr=ot.useMemo(()=>ie.map(ne=>ne.id),[ie]),[Ce,Vt]=ot.useState(lr),ee=Y!==void 0,Be=ee?Y:Ce;ot.useEffect(()=>{ee||Vt(ne=>{let Se=ie.map(Co=>Co.id),ce=new Set(Se),ct=new Set(ne),yr=ne.filter(Co=>ce.has(Co)),vo=Se.filter(Co=>!ct.has(Co));return [...yr,...vo]});},[ie,ee]);let Ve=ot.useCallback(ne=>{ee||Vt(ne),G?.(ne);},[ee,G]),nt=ot.useMemo(()=>{if(!H&&!Y)return ie;let ne=new Map(ie.map(ct=>[ct.id,ct])),Se=Be.map(ct=>ne.get(ct)).filter(ct=>ct!==void 0),ce=ne.get(Nd);return ce&&!Se.some(ct=>ct.id===Nd)?[ce,...Se]:Se},[ie,Be,H,Y]),wt=En({items:M,onLoadMore:g,hasMore:f,isLoading:u,loadingState:m,enableVirtualization:h,estimatedItemSize:b||(o==="compact"?40:o==="relaxed"?60:48),overscan:5}),Xt=g||h?wt:null,Q=Xt?.scrollRef??fr,{loadMoreRef:j,virtualizer:pe,virtualItems:ae,isLoadingMore:Ne,computedLoadingState:Qe}=Xt||{},{gridTemplateColumns:Ue,totalMinWidth:cr}=ot.useMemo(()=>{let ne=0;return {gridTemplateColumns:nt.map(ce=>{if(ce.minWidth?ne+=tC(ce.minWidth):ce.width&&(ne+=tC(ce.width)),ce.width)return typeof ce.width=="number"?`${ce.width}px`:ce.width;if(ce.flex)return `${ce.flex}fr`;if(ce.minWidth&&ce.maxWidth){let ct=typeof ce.minWidth=="number"?`${ce.minWidth}px`:ce.minWidth,yr=typeof ce.maxWidth=="number"?`${ce.maxWidth}px`:ce.maxWidth;return `minmax(${ct}, ${yr})`}return ce.minWidth?`minmax(${typeof ce.minWidth=="number"?`${ce.minWidth}px`:ce.minWidth}, 1fr)`:ce.maxWidth?`minmax(0, ${typeof ce.maxWidth=="number"?`${ce.maxWidth}px`:ce.maxWidth})`:"1fr"}).join(" "),totalMinWidth:ne}},[nt]),Z=ot.useCallback(ne=>{if(!ie.find(ct=>ct.id===ne)?.sortable)return;let ce;Ze?.columnId===ne?ce={columnId:ne,direction:Ze.direction==="asc"?"desc":"asc"}:ce={columnId:ne,direction:"asc"},Qt||yt(ce),E?.(ce);},[ie,Ze,E,Qt]),le=Qe==="loading"||u&&M.length===0,Ae=F&&(O?.alwaysShow||D.pageCount>1)&&!u&&!le,Oe=Ae&&a!==void 0,it={};a?(Oe?(it.flex="1 1 auto",it.minHeight=0):it.height=typeof a=="number"?`${a}px`:a,it.overflowY="auto"):i?(it.maxHeight=typeof i=="number"?`${i}px`:i,it.overflowY="auto"):g&&(it.height="600px",it.overflowY="auto"),g&&(it.overflowX="auto");let Tt=tailwindMerge.twMerge(AD[n],!g&&(s==="responsive"?"overflow-x-auto scrollbar-visible":"overflow-auto scrollbar-visible"),r),Ot=jv(l),tt=d!=="none",xr=(ne,Se)=>tt?d==="custom"&&c?c(ne,Se):jsxRuntime.jsx(d==="cards"?Cd:vd,{row:ne,columns:nt,density:o,isLoading:u,onClick:w?()=>w(ne):void 0}):null,gr=pe?ae?.map(ne=>({virtualItem:ne,row:M[ne.index],index:ne.index}))||[]:M.map((ne,Se)=>({row:ne,index:Se,virtualItem:null})),yo=jsxRuntime.jsxs("div",{ref:Q,className:Tt,style:{...it,position:pe?"relative":void 0},children:[jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("grid border-separate border-spacing-0",ID[s],n==="auto"?"inline-grid w-auto":"w-full",tt&&Ot.desktop),role:"table","aria-label":A,style:{gridTemplateColumns:Ue,minWidth:cr>0?`${cr}px`:void 0},children:[!R&&(H?jsxRuntime.jsx($v,{columns:ie,columnOrder:Be,onColumnOrderChange:Ve,sortConfig:Ze,onSort:Z,stickyHeader:x,stickyFirstColumn:C,density:o,isLoading:le,renderHeaderContent:Te,sortNote:B}):jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:nt.map((ne,Se)=>jsxRuntime.jsx(BD,{column:ne,sortConfig:Ze,onSort:Z,stickyHeader:x,stickyFirstColumn:C,isFirstColumn:Se===0,density:o,isLoading:le,headerContent:Te(ne),sortNote:B},ne.id))})),pe&&!le?jsxRuntime.jsx("div",{className:"col-span-full",style:{gridColumn:"1 / -1",height:`${pe.getTotalSize()}px`,position:"relative"},role:"rowgroup",children:M.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[gr.map(({row:ne,index:Se,virtualItem:ce})=>{if(!ne||!ce)return null;let ct=S?S(ne):`row-${Se}`;return jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",display:"grid",gridTemplateColumns:Ue,transform:`translateY(${ce.start}px)`},"data-index":ce.index,ref:pe.measureElement,children:jsxRuntime.jsx(rC,{columns:nt,row:ne,rowIndex:Se,density:o,onClick:w,stickyFirstColumn:C,isSelected:P?X.has($(ne,Se)):void 0})},ct)}),Ne&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${pe.getTotalSize()}px`,left:0,width:"100%"},children:v||jsxRuntime.jsx(so,{state:"loading-more"})})]}):jsxRuntime.jsx("div",{className:"py-12 text-center text-text-secondary",children:"No data available"})}):jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:le?Array.from({length:p}).map((ne,Se)=>jsxRuntime.jsx(HD,{columns:nt,rowIndex:Se,density:o,stickyFirstColumn:C},`loading-${Se}`)):M.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[gr.map(({row:ne,index:Se})=>{if(!ne)return null;let ce=S?S(ne):`row-${Se}`;return jsxRuntime.jsx(rC,{columns:nt,row:ne,rowIndex:Se,density:o,onClick:w,stickyFirstColumn:C,isSelected:P?X.has($(ne,Se)):void 0},ce)}),Ne&&jsxRuntime.jsx("div",{className:"col-span-full",style:{gridColumn:"1 / -1"},children:v||jsxRuntime.jsx(so,{state:"loading-more"})})]}):jsxRuntime.jsx("div",{className:"col-span-full py-12 text-center text-text-secondary",role:"row",children:jsxRuntime.jsx("div",{role:"cell",children:"No data available"})})})]}),tt&&jsxRuntime.jsx("div",{className:Ot.mobile,children:le?Array.from({length:p}).map((ne,Se)=>jsxRuntime.jsx(qv,{density:o},`mobile-loading-${Se}`)):M.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[gr.map(({row:ne,index:Se})=>{if(!ne)return null;let ce=S?S(ne):`mobile-row-${Se}`;return jsxRuntime.jsx("div",{className:"border-b border-border-default last:border-b-0",children:xr(ne,Se)},ce)}),Ne&&(v||jsxRuntime.jsx(so,{state:"loading-more"}))]}):jsxRuntime.jsx("div",{className:"py-12 text-center text-text-secondary",children:"No data available"})}),g&&f&&!le&&(pe?jsxRuntime.jsx("div",{ref:j,style:{position:"absolute",top:`${pe.getTotalSize()}px`,left:0,width:"100%",height:1}}):jsxRuntime.jsx("div",{ref:j,className:"h-px w-full"}))]});return Ae?jsxRuntime.jsxs("div",{className:"@container flex flex-col",style:Oe?{height:typeof a=="number"?`${a}px`:a,minHeight:0}:void 0,children:[yo,jsxRuntime.jsx(Td,{...D,density:o,onPageChange:y,...A?{label:`${A} pagination`}:{}})]}):yo}function aC({status:e,alertCount:t,showCount:r=false,isLoading:o,size:n="sm",shape:a="pill",...i}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-20"});let s={healthy:"success",warning:"warning",error:"error",unknown:"neutral"},d={healthy:"Healthy",warning:"Warning",error:"Error",unknown:"Unknown"},c=e==="warning"||e==="error",l=r&&t?`${d[e]} (${t})`:d[e];return jsxRuntime.jsx(kt,{variant:s[e],size:n,shape:a,dot:c,dotPulse:c,...i,children:l})}var WD={battery:"BatteryHigh",charger:"ChargingStation",thermostat:"ThermometerSimple",inverter:"Power",vehicle:"Car",water_heater:"DropHalfBottom",meter:"Gauge",sensor:_i("sensor"),gateway:"WifiHigh",other:"Cube",unknown:"Question"},UD={battery:"Battery",charger:"Charger",thermostat:"Thermostat",inverter:"Inverter",vehicle:"Vehicle",water_heater:"Water Heater",meter:"Meter",sensor:"Sensor",gateway:"Gateway",other:"Other",unknown:"Unknown"};function sC({deviceType:e,iconName:t,size:r="md",showLabel:o=false,className:n}){let a=t||(e?WD[e]:"Question"),i=e?UD[e]:void 0;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center",o?"flex-col gap-1":"gap-0",n),children:[jsxRuntime.jsx(W,{name:a,size:r}),o&&i&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:i})]})}function Ys({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,slideInFrom:d="right",transparentOverlay:c=false,onClose:l,className:u,primaryAction:m,secondaryAction:p,tertiaryAction:g,footerContent:f,contentPadding:h=true,maxWidth:b="400px"}){if(!s)return null;let v=t||r,x=m||p||g||f;return jsxRuntime.jsx(So,{children:jsxRuntime.jsx(Kr,{isOpen:s,onOpenChange:C=>!C&&l?.(),isDismissable:true,transparent:c,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("fixed top-0 bottom-0 flex flex-col bg-background-surface shadow-xl overflow-hidden",d==="right"?"right-0":"left-0",d==="right"?"animate-in slide-in-from-right duration-300 ease-out":"animate-in slide-in-from-left duration-300 ease-out","data-[exiting]:animate-out",d==="right"?"data-[exiting]:slide-out-to-right":"data-[exiting]:slide-out-to-left","data-[exiting]:duration-200 data-[exiting]:ease-in","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default focus-visible:outline-offset-0",u),style:{maxWidth:b,width:"100%"},children:[v&&(a&&i?jsxRuntime.jsx(Cr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n,hasBackArrow:true,onBack:i,onClose:l}):jsxRuntime.jsx(Cr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n,onClose:l})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-y-auto overscroll-contain",h?"px-6 py-6":"p-0"),children:e}),x&&jsxRuntime.jsx(Pn,{primaryAction:m,secondaryAction:p,tertiaryAction:g,footerContent:f})]})})})})}Ys.displayName="Drawer";function cC({status:e,programName:t,isLoading:r,size:o="sm",shape:n="pill",...a}){if(r)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-20"});let i={enrolled:"success",eligible:"info",pending:"warning",not_eligible:"neutral",opted_out:"neutral"},s={enrolled:"Enrolled",eligible:"Eligible",pending:"Pending",not_eligible:"Not Eligible",opted_out:"Opted Out"},d=jsxRuntime.jsx(kt,{variant:i[e],size:o,shape:n,...a,children:s[e]});return t?jsxRuntime.jsx(tr,{content:t,children:d}):d}function uC({value:e,onChange:t,onUrlChange:r,accept:o="image/*",maxSize:n,isDisabled:a=false,onUpload:i,className:s,showPreview:d=true,placeholder:c="Drop files here or click to browse"}){let[l,u]=ot.useState(false),[m,p]=ot.useState(false),[g,f]=ot.useState(null),[h,b]=ot.useState(e),v=ot.useRef(null),x=async S=>{if(f(null),n&&S.size>n){f(`File size must be less than ${(n/1024/1024).toFixed(2)}MB`);return}if(d&&S.type.startsWith("image/")){let T=new FileReader;T.onloadend=()=>{b(T.result);},T.readAsDataURL(S);}if(i){p(true);try{let T=await i(S);b(T),r?.(T);}catch(T){f("Failed to upload file"),console.error("Upload error:",T);}finally{p(false);}}t?.(S,h);},C=async S=>{try{let T=S.items;if(T.length>0){let N=T[0];if(N.kind==="file"){let k=await N.getFile();k&&x(k);}}}catch(T){f("Failed to upload file"),console.error("Upload error:",T);}finally{u(false);}},w=()=>{b(void 0),f(null),t?.(null),r?.(""),v.current&&(v.current.value="");};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",s),children:[jsxRuntime.jsxs(reactAriaComponents.DropZone,{className:tailwindMerge.twMerge("relative flex min-h-[200px] w-full flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",l?"border-action-brand bg-action-brand/5":"border-border-muted hover:border-border-default",a&&"pointer-events-none opacity-50",g&&"border-feedback-error-border bg-feedback-error-background/50"),onDrop:C,onDropEnter:()=>u(true),onDropExit:()=>u(false),children:[h?jsxRuntime.jsxs("div",{className:"relative flex h-full w-full items-center justify-center p-4",children:[d&&(h.startsWith("data:image")||h.startsWith("http"))?jsxRuntime.jsx("img",{src:h,alt:"Preview",className:"max-h-48 max-w-full rounded-md object-contain"}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-12 w-12 text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:"File uploaded"})]}),!a&&jsxRuntime.jsx(te,{variant:"icon",size:"sm",onPress:w,className:"absolute right-2 top-2 bg-background-surface shadow-md",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[jsxRuntime.jsx(lucideReact.Upload,{className:"h-12 w-12 text-text-secondary"}),jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("p",{className:"text-sm text-text-primary",children:c}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:o==="image/*"?"PNG, JPG, GIF up to 10MB":`Accepts ${o}`})]}),jsxRuntime.jsx(reactAriaComponents.FileTrigger,{acceptedFileTypes:o.split(","),onSelect:S=>{let T=Array.from(S||[]);T.length>0&&x(T[0]);},children:jsxRuntime.jsx(te,{variant:"secondary",size:"sm",isDisabled:a,children:"Choose File"})})]}),m&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-lg bg-background-surface/80",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-action-brand border-t-transparent"}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:"Uploading..."})]})})]}),g&&jsxRuntime.jsx("p",{className:"mt-2 text-sm text-feedback-error-text",children:g})]})}function mC({version:e,isLatest:t,updateAvailable:r,isLoading:o,size:n="sm",shape:a="rounded",...i}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-16"});let s="neutral",d=e;return t?s="success":r&&(s="warning",d=`${e} (Update)`),jsxRuntime.jsx(kt,{variant:s,size:n,shape:a,...i,children:d})}function Ii(e){return jsxRuntime.jsx(reactAriaComponents.Form,{validationBehavior:"aria",...e,className:tailwindMerge.twMerge("flex flex-col gap-6",e.className)})}function gC({placeholder:e="Search...",value:t,onChange:r,isOpen:o,onOpenChange:n,trigger:a,children:i,showShortcutHint:s=true,showInput:d=true,className:c}){let[l,u]=ot.useState(false),m=Pr("(max-width: 767px)"),p=o!==void 0?o:l,g=ot.useCallback(v=>{n?n(v):u(v);},[n]);ot.useEffect(()=>{let v=x=>{(x.metaKey||x.ctrlKey)&&x.key==="k"&&(x.preventDefault(),g(!p)),x.key==="Escape"&&p&&g(false);};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[p,g]);let f=ot.useCallback(v=>{r?.(v);},[r]),h=jsxRuntime.jsxs("button",{type:"button",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-text-primary hover:bg-background-hover rounded-md transition-colors","aria-label":"Open search",children:[jsxRuntime.jsx(W,{name:"MagnifyingGlass",size:18}),!m&&s&&jsxRuntime.jsxs("span",{className:"hidden md:flex items-center gap-1 text-xs",children:[jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 bg-background-muted border border-border-muted rounded text-xs",children:navigator.platform.includes("Mac")?"\u2318":"Ctrl"}),jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 bg-background-muted border border-border-muted rounded text-xs",children:"K"})]})]}),b=a===null||ot.isValidElement(a)&&a.type===ot.Fragment&&!a.props.children;return m?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!b&&(a?jsxRuntime.jsx("button",{type:"button",onClick:()=>g(true),className:"appearance-none bg-transparent border-none p-0 cursor-pointer",children:a}):jsxRuntime.jsx("button",{type:"button",onClick:()=>g(true),className:"appearance-none bg-transparent border-none p-0 cursor-pointer",children:h})),jsxRuntime.jsx(Lt,{isOpen:p,onClose:()=>g(false),hideCloseIcon:false,contentPadding:false,maxHeight:"90vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[d&&jsxRuntime.jsx("div",{className:"p-4 border-b border-border-muted flex-shrink-0",children:jsxRuntime.jsx(go,{value:t,onChange:f,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:c,autoFocus:true})}),jsxRuntime.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:i})]})})]}):b?null:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:p,onOpenChange:g,children:[a||h,jsxRuntime.jsx(Et,{placement:"bottom",className:"w-[600px] max-w-[90vw] bg-background-surface shadow-xl border border-border-default rounded-lg overflow-hidden",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[d&&jsxRuntime.jsx("div",{className:"p-4 border-b border-border-muted",children:jsxRuntime.jsx(go,{value:t,onChange:f,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:c,autoFocus:true})}),jsxRuntime.jsx("div",{className:"max-h-[500px] overflow-hidden",children:i})]})})]})}function xC({placeholder:e="Search...",value:t,onChange:r,isOpen:o,onOpenChange:n,children:a,maxHeight:i="400px",variant:s="default",className:d}){let[c,l]=ot.useState(false),u=Pr("(max-width: 767px)"),m=ot.useRef(null),p=ot.useRef(null),g=o!==void 0?o:c,f=ot.useCallback(R=>{n?n(R):l(R);},[n]);ot.useEffect(()=>{let R=L=>{(L.metaKey||L.ctrlKey)&&L.key==="k"&&(L.preventDefault(),f(!g)),L.key==="Escape"&&g&&f(false);};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[g,f]),ot.useEffect(()=>{g&&!u&&m.current&&setTimeout(()=>{m.current?.querySelector("input")?.focus();},0);},[g,u]),ot.useEffect(()=>{if(!g||u)return;let R=L=>{let E=L.target,B=m.current?.contains(E),A=p.current?.contains(E);!B&&!A&&f(false);};return document.addEventListener("mousedown",R,true),()=>document.removeEventListener("mousedown",R,true)},[g,u,f]);let h=R=>{r?.(R);},b=ot.useCallback(()=>{f(false);},[f]),v=ot.useCallback(()=>{r?.("");},[r]),[x,C]=ot.useState(null);ot.useEffect(()=>{if(g&&!u&&m.current){let R=null,L=()=>{let B=m.current?.getBoundingClientRect();B&&C({top:B.bottom+8,left:B.left,width:B.width});},E=()=>{R===null&&(R=requestAnimationFrame(()=>{L(),R=null;}));};return L(),window.addEventListener("resize",E),window.addEventListener("scroll",E,true),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true),R!==null&&cancelAnimationFrame(R);}}},[g,u]);let w=ot.useCallback(()=>{f(true);},[f]);if(u)return jsxRuntime.jsxs("div",{className:d,children:[jsxRuntime.jsx("button",{type:"button",onClick:w,className:"flex items-center justify-center w-10 h-10 rounded-lg hover:bg-background-hover transition-colors","aria-label":"Open search",children:jsxRuntime.jsx(W,{name:"MagnifyingGlass",size:"md"})}),jsxRuntime.jsxs(Lt,{isOpen:g,onClose:b,contentPadding:false,height:"80vh",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-4 pt-4",children:[jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsx(go,{value:t,onChange:h,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:v,reserveErrorSpace:false,autoFocus:true})}),jsxRuntime.jsx(te,{variant:"icon",onPress:b,"aria-label":"Close search",className:"flex-shrink-0",children:jsxRuntime.jsx(W,{name:"X",size:"md"})})]}),jsxRuntime.jsx("div",{className:"mt-4",children:a})]})]},"mobile");let S=R=>{let E=R.target.tagName==="INPUT";if(R.key==="ArrowDown"&&g&&E){R.preventDefault();let B=p.current?.querySelector("[data-search-result]");B&&B.focus();}},T=R=>{let L=R.target;if(!L.hasAttribute("data-search-result"))return;let B=Array.from(p.current?.querySelectorAll("[data-search-result]")||[]),A=B.indexOf(L);if(R.key==="ArrowDown"){R.preventDefault(),R.stopPropagation();let H=Math.min(A+1,B.length-1);B[H]?.focus();}else if(R.key==="ArrowUp")if(R.preventDefault(),R.stopPropagation(),A===0)m.current?.querySelector("input")?.focus();else {let H=Math.max(A-1,0);B[H]?.focus();}else R.key==="Escape"&&(R.preventDefault(),R.stopPropagation(),f(false),m.current?.querySelector("input")?.focus());},N=g&&x&&typeof document<"u"?reactDom.createPortal(jsxRuntime.jsx("div",{ref:p,style:{position:"fixed",top:`${x.top}px`,left:`${x.left}px`,width:`${x.width}px`,zIndex:9999},role:"listbox",onKeyDown:T,children:jsxRuntime.jsx("div",{className:"bg-background-surface shadow-2xl border border-border-default rounded-lg overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:jsxRuntime.jsx("div",{className:"overflow-y-auto",style:{maxHeight:i},children:a})})}),document.body):null,k=s==="elevated"?"bg-background-muted/50 border-border-subtle/50 focus-within:bg-background-body focus-within:border-border-focus focus-within:shadow-md backdrop-blur-sm transition-all duration-200":"";return jsxRuntime.jsxs("div",{ref:m,className:`relative w-full ${d||""}`,onKeyDown:S,children:[jsxRuntime.jsx(go,{value:t,onChange:h,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:k,onFocus:()=>f(true)}),N]},"desktop")}function yC({message:e="No results found",suggestion:t,icon:r="MagnifyingGlass",className:o=""}){return jsxRuntime.jsxs("div",{className:`flex flex-col items-center justify-center py-12 px-4 text-center ${o}`,children:[jsxRuntime.jsx("div",{className:"text-text-secondary mb-3",children:jsxRuntime.jsx(W,{name:r,size:48})}),jsxRuntime.jsx("p",{className:"text-base font-medium text-text-primary mb-1",children:e}),t&&jsxRuntime.jsx("p",{className:"text-sm text-text-secondary max-w-xs",children:t})]})}function CC({count:e=3,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`,children:Array.from({length:e}).map((r,o)=>jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[jsxRuntime.jsx(q,{width:20,height:20,variant:"circle"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[jsxRuntime.jsx(q,{width:"60%",height:16}),jsxRuntime.jsx(q,{width:"40%",height:12})]}),jsxRuntime.jsx(q,{width:16,height:16})]},o))})}function wC({title:e,count:t,isLoading:r,footer:o,children:n,className:a}){return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex flex-col",a),children:[jsxRuntime.jsxs("div",{className:"flex items-baseline gap-1.5 px-4 pt-4 pb-2 border-t border-border-muted first:border-t-0",children:[jsxRuntime.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:e}),!r&&t!==void 0&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:t}),r&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary animate-pulse",children:"Loading..."})]}),jsxRuntime.jsx("div",{className:"flex flex-col",children:n}),o&&jsxRuntime.jsx("div",{className:"px-4 py-2 border-t border-border-subtle",children:o})]})}function TC({id:e,title:t,subtitle:r,metadata:o,icon:n,customIcon:a,onSelect:i,isFocused:s=false,className:d,testId:c}){return jsxRuntime.jsxs("div",{role:"option",tabIndex:0,onClick:()=>{i?.(e);},onKeyDown:m=>{let p=m.currentTarget;switch(m.key){case "Enter":case " ":{m.preventDefault(),i?.(e);break}case "ArrowDown":{m.preventDefault();let g=Array.from(document.querySelectorAll("[data-search-result]")),f=g.indexOf(p);f!==-1&&f<g.length-1&&g[f+1].focus();break}case "ArrowUp":{m.preventDefault();let g=Array.from(document.querySelectorAll("[data-search-result]")),f=g.indexOf(p);if(f>0)g[f-1].focus();else {let h=document.querySelector('input[type="text"][placeholder*="Search"]');h&&h.focus();}break}case "Escape":{m.preventDefault();let g=document.querySelector('input[type="text"][placeholder*="Search"]');g&&g.focus();break}}},"data-testid":c,"data-search-result":true,className:tailwindMerge.twMerge("group flex items-center gap-3 px-4 py-3 cursor-pointer outline-none transition-colors","text-text-primary hover:bg-background-hover","focus-visible:bg-background-muted focus-visible:outline-none","data-[focused]:bg-background-hover",s&&"bg-background-hover",d),"data-focused":s||void 0,children:[a?jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a}):n?jsxRuntime.jsx("div",{className:"flex-shrink-0 text-text-secondary",children:jsxRuntime.jsx(W,{name:n,size:20})}):null,jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-baseline gap-2",children:[jsxRuntime.jsx("span",{className:"font-medium text-text-primary truncate",children:t}),o&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary flex-shrink-0",children:o})]}),r&&jsxRuntime.jsx("div",{className:"text-sm text-text-secondary truncate mt-0.5",children:r})]}),jsxRuntime.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 group-data-[focused]:opacity-100 transition-opacity",children:jsxRuntime.jsx(W,{name:"ArrowRight",size:16,className:"text-text-secondary"})})]})}function NC({children:e,maxHeight:t="400px",className:r}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-y-auto overscroll-contain","divide-y divide-border-muted",r),style:{maxHeight:t},children:e})}function PC({placeholder:e="Search...",onClick:t,showShortcut:r=true,variant:o="default",className:n=""}){let a=typeof navigator<"u"&&navigator.platform.includes("Mac");return jsxRuntime.jsxs("button",{type:"button",onClick:t,className:`
|
|
169
169
|
flex items-center gap-3 w-full px-4 py-2.5 rounded-lg
|
|
170
170
|
transition-all duration-200 cursor-text
|
|
171
171
|
${{default:`
|
|
@@ -177,12 +177,12 @@
|
|
|
177
177
|
backdrop-blur-sm
|
|
178
178
|
`}[o]}
|
|
179
179
|
${n}
|
|
180
|
-
`,"aria-label":"Open search",children:[jsxRuntime.jsx(G,{name:"MagnifyingGlass",size:18,className:"flex-shrink-0 transition-colors text-text-secondary"}),jsxRuntime.jsx("span",{className:`flex-1 text-left text-sm transition-colors ${o==="elevated"?"text-text-secondary font-normal":"text-text-disabled"}`,children:e}),r&&jsxRuntime.jsxs("div",{className:"hidden sm:flex items-center gap-1 flex-shrink-0",children:[jsxRuntime.jsx("kbd",{className:`px-2 py-1 text-xs font-medium rounded transition-colors ${o==="elevated"?"bg-background-surface/80 border border-border-muted text-text-secondary":"bg-background-muted border border-border-muted"}`,children:a?"\u2318":"Ctrl"}),jsxRuntime.jsx("kbd",{className:`px-2 py-1 text-xs font-medium rounded transition-colors ${o==="elevated"?"bg-background-surface/80 border border-border-muted text-text-secondary":"bg-background-muted border border-border-muted"}`,children:"K"})]})]})}var KD={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none"},YD={sm:{1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12",none:"sm:grid-cols-none"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12",none:"md:grid-cols-none"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12",none:"lg:grid-cols-none"},xl:{1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12",none:"xl:grid-cols-none"},"2xl":{1:"2xl:grid-cols-1",2:"2xl:grid-cols-2",3:"2xl:grid-cols-3",4:"2xl:grid-cols-4",5:"2xl:grid-cols-5",6:"2xl:grid-cols-6",7:"2xl:grid-cols-7",8:"2xl:grid-cols-8",9:"2xl:grid-cols-9",10:"2xl:grid-cols-10",11:"2xl:grid-cols-11",12:"2xl:grid-cols-12",none:"2xl:grid-cols-none"}},XD={none:"gap-0",xs:"gap-x-2 gap-y-1",sm:"gap-x-3 gap-y-2",md:"gap-x-4 gap-y-3",lg:"gap-x-6 gap-y-4",xl:"gap-x-8 gap-y-6","2xl":"gap-x-12 gap-y-8"},JD={none:"gap-x-0",xs:"gap-x-2",sm:"gap-x-3",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},jD={none:"gap-y-0",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-3",lg:"gap-y-4",xl:"gap-y-6","2xl":"gap-y-8"},qD={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},ZD={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},QD={row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},_D={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full",auto:"col-auto"},$D={sm:{1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",full:"sm:col-span-full",auto:"sm:col-auto"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",full:"md:col-span-full",auto:"md:col-auto"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",full:"lg:col-span-full",auto:"lg:col-auto"},xl:{1:"xl:col-span-1",2:"xl:col-span-2",3:"xl:col-span-3",4:"xl:col-span-4",5:"xl:col-span-5",6:"xl:col-span-6",7:"xl:col-span-7",8:"xl:col-span-8",9:"xl:col-span-9",10:"xl:col-span-10",11:"xl:col-span-11",12:"xl:col-span-12",full:"xl:col-span-full",auto:"xl:col-auto"},"2xl":{1:"2xl:col-span-1",2:"2xl:col-span-2",3:"2xl:col-span-3",4:"2xl:col-span-4",5:"2xl:col-span-5",6:"2xl:col-span-6",7:"2xl:col-span-7",8:"2xl:col-span-8",9:"2xl:col-span-9",10:"2xl:col-span-10",11:"2xl:col-span-11",12:"2xl:col-span-12",full:"2xl:col-span-full",auto:"2xl:col-auto"}};function xC(e,t,r){if(!e)return "";if(typeof e!="object")return t[e]||"";let o=[];return "base"in e&&e.base!==void 0&&o.push(t[e.base]),Object.entries(r).forEach(([n,a])=>{let i=e[n];i!==void 0&&o.push(a[i]);}),o.join(" ")}function ff({cols:e=1,gap:t="md",gapX:r,gapY:o,align:n="stretch",justify:a="start",flow:i="row",autoFit:s,autoFill:l,className:d,children:c}){let u=tailwindMerge.twMerge("grid",s||l?"":xC(e,KD,YD),!r&&!o&&XD[t],r&&JD[r],o&&jD[o],qD[n],ZD[a],QD[i],d),m={};return s?m.gridTemplateColumns=`repeat(auto-fit, minmax(${s}, 1fr))`:l&&(m.gridTemplateColumns=`repeat(auto-fill, minmax(${l}, 1fr))`),jsxRuntime.jsx("div",{className:u,style:m,children:c})}function eA({span:e,className:t,children:r}){let o=tailwindMerge.twMerge(xC(e,_D,$D),t);return jsxRuntime.jsx("div",{className:o,children:r})}ff.Item=eA;function tA(e,t){return ot__namespace.default.isValidElement(e)?e:Ao({value:e,formatter:t,emptyClassName:"text-text-secondary",emptyText:"\u2014"})}function rA(e){if(e.thresholds&&e.value!==null&&e.value!==void 0){for(let t of e.thresholds)if(t.when(e.value))return t.tone}return e.tone}var oA={neutral:"text-text-primary",success:"text-feedback-success",warning:"text-feedback-warning",error:"text-feedback-error",info:"text-feedback-info"},nA=24,aA=20;function iA({item:e,dense:t,valueAlign:r,divider:o}){let n=rA(e),a=n?oA[n]:"",i=e.stackOnMobile,s=typeof e.value=="string"&&e.value.length>nA&&!e.formatter&&!ot__namespace.default.isValidElement(e.value),l=tA(e.value,e.formatter),d=s?ii(e.value,aA):null,c=typeof e.copyable=="function"?e.copyable(e.value):String(e.value),u=e.piiType&&e.piiEntity?{"data-pii-type":e.piiType,"data-pii-entity":e.piiEntity}:{},m=Object.keys(u).length>0,p=s?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(tr,{content:m?jsxRuntime.jsx("span",{...u,children:String(e.value)}):String(e.value),children:jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("@md:hidden",e.href?"hover:underline cursor-pointer":""),...u,children:d})}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("hidden @md:inline",e.href?"hover:underline cursor-pointer":""),...u,children:l})]}):jsxRuntime.jsx("span",{className:e.href?"hover:underline cursor-pointer":"",...u,children:l}),g=e.copyable?jsxRuntime.jsx(In,{value:c,size:"sm",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Copy"})}):null,f=e.copyable&&(e.copyIconPosition==="left"||!e.copyIconPosition),b=e.copyable&&e.copyIconPosition==="right",v=jsxRuntime.jsxs("dd",{className:tailwindMerge.twMerge(t?"text-sm":"text-base","font-medium",i?r==="start"?"text-left":"text-left @sm:text-right":r==="start"?"text-left":"text-right",a,e.disabled&&"opacity-50","overflow-hidden min-w-0"),children:[jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center gap-1 max-w-full",r==="start"?"justify-start":"justify-end"),children:[jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 min-w-0",children:[p,e.iconRight]}),b&&g]}),e.meta&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-xs text-text-secondary mt-0.5",r==="start"?"text-left":"text-right"),children:e.meta})]}),x=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("dt",{className:tailwindMerge.twMerge(t?"text-xs":"text-sm","text-text-secondary truncate","flex items-center gap-1",e.disabled&&"opacity-50"),children:[e.iconLeft,jsxRuntime.jsx("span",{title:typeof e.label=="string"?e.label:void 0,children:e.label}),e.tooltip&&jsxRuntime.jsx(G,{name:"Question",size:10,className:"text-text-secondary","aria-label":"More information"})]}),f&&jsxRuntime.jsx("div",{className:"flex h-5 items-center -mr-2 [&_button]:h-5 [&_button]:py-0 [&_button]:top-0",children:g}),e.href?jsxRuntime.jsx("a",{href:e.href,onClick:e.onAction,className:"block",children:v}):v]});return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("grid",i?"items-start @sm:items-center":"items-center",i?f?"grid-cols-1 gap-y-1 @sm:grid-cols-[1fr_auto_auto] @sm:gap-x-1 @sm:gap-y-0":t?"grid-cols-1 gap-y-1 @sm:grid-cols-[minmax(120px,1fr)_1fr] @sm:gap-x-2 @sm:gap-y-0":"grid-cols-1 gap-y-1 @sm:grid-cols-[minmax(120px,1fr)_1fr] @sm:gap-x-4 @sm:gap-y-0":f?"grid-cols-[1fr_auto_auto] gap-x-1":t?"grid-cols-[minmax(120px,1fr)_1fr] gap-x-2":"grid-cols-[minmax(120px,1fr)_1fr] gap-x-4",o,o&&sA(o,t)),children:x})}function sA(e,t){let r=e.includes("@md:");return t?r?"@md:pb-1":"pb-1":r?"@md:pb-2":"pb-2"}function lA(e,t,r){if(e!==t-1){if(r!=="two-column")return "border-b border-border-default";if(!(t%2===0&&e===t-2))return "@md:border-b @md:border-border-default"}}function Ld({items:e,layout:t="one-column",dense:r=false,valueAlign:o="end",showDividers:n=false,skeleton:a=false,empty:i=false,error:s,className:l}){return a?jsxRuntime.jsx("div",{className:"@container",children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("grid",t==="two-column"?"@md:grid-cols-2 gap-x-6":"grid-cols-1",r?"gap-y-1":"gap-y-2",l),children:Array.from({length:e.length||4}).map((d,c)=>jsxRuntime.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-start gap-x-4",children:[jsxRuntime.jsx(q,{className:"h-4 w-24"}),jsxRuntime.jsx(q,{className:"h-5 w-16"})]},c))})}):s?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-sm text-feedback-error",l),children:s}):i||!e.length?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-sm text-text-secondary",l),children:"No data available"}):jsxRuntime.jsx("div",{className:"@container",children:jsxRuntime.jsx("dl",{className:tailwindMerge.twMerge("grid",t==="two-column"?"@md:grid-cols-2 gap-x-6":"grid-cols-1",r?"gap-y-1":"gap-y-2",l),children:e.map((d,c)=>jsxRuntime.jsx(iA,{item:d,dense:r,valueAlign:o,divider:n?lA(c,e.length,t):void 0},d.id))})})}function SC({node:e,renderNodeList:t}){let r=e.children||[],o=e.metadata&&Object.keys(e.metadata).length>0;return jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0 px-4 py-4",children:jsxRuntime.jsx("h3",{className:"font-semibold text-text-primary text-lg",children:e.name})}),o&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-y border-border-default px-4 py-4 bg-background-muted",children:jsxRuntime.jsx(Ld,{items:Object.entries(e.metadata||{}).map(([n,a])=>({id:n,label:n,value:a??"\u2014"})),dense:true,layout:"one-column",valueAlign:"end",showDividers:true})}),r.length>0&&jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:t(r,false)})]})}var Pt={xs:{node:"px-2 py-2 text-xs",icon:"xs",bullet:24,spacing:{x:8,y:8}},sm:{node:"px-3 py-2.5 text-sm",icon:"xs",bullet:28,spacing:{x:12,y:10}},md:{node:"px-4 py-3 text-base",icon:"sm",bullet:32,spacing:{x:16,y:12}}};var gf=ot__namespace.createContext(null);function wC(){let e=ot__namespace.useContext(gf);if(!e)throw new Error("Hierarchy components must be used within HierarchyExplorer");return e}function NC({node:e,renderNode:t}){let{selectedId:r,selectNode:o,navigateToNode:n,variant:a,size:i,showBullets:s,rootNodeId:l,stickyRootNode:d,navigationStack:c,setRootNodeSticky:u,useSplitLayout:m}=wC(),p=ot__namespace.useRef(null),g=ot__namespace.useRef(null),f=r===e.id,b=e.disabled||false,h=!!(e.children&&e.children.length>0),v=!!(e.metadata&&Object.keys(e.metadata).length>0),x=h||v,C=l!==void 0&&e.id!==void 0&&l===e.id&&c.length===0;ot__namespace.useLayoutEffect(()=>{C&&d&&p.current&&g.current===null&&requestAnimationFrame(()=>{p.current&&(g.current=p.current.offsetTop);});},[C,d]),ot__namespace.useEffect(()=>{if(!C||!d||!p.current)return;let A=p.current.parentElement;for(;A;){let B=window.getComputedStyle(A).overflowY;if(B==="auto"||B==="scroll")break;A=A.parentElement;}if(!A)return;let M=()=>{if(!p.current||g.current===null)return;let B=A.getBoundingClientRect(),D=A.scrollTop,W=B.height,X=p.current.offsetHeight,I=g.current-D,F=I+X,z=I<0,U=F>W;z?u("top",e):U?u("bottom",e):u(null,null);};return A.addEventListener("scroll",M),M(),()=>{A.removeEventListener("scroll",M);}},[C,d,e,u]);let S=()=>{b||(m?o(e):x?n(e):o(e));},w=A=>{b||(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),S());},T={isSelected:f,isDisabled:b,hasChildren:h,hasMetadata:v,level:0},N=tailwindMerge.twMerge("relative cursor-pointer group",b&&"opacity-50 cursor-not-allowed"),k=tailwindMerge.twMerge("absolute inset-0 transition-colors",C&&!f&&!b&&"group-hover:bg-background-hover",C&&f&&!b&&a==="subtle"&&"bg-background-selected group-hover:bg-background-hover",C&&f&&b&&a==="subtle"&&"bg-background-selected",C&&f&&!b&&a==="solid"&&"bg-action-brand group-hover:bg-action-brand-hover",C&&f&&b&&a==="solid"&&"bg-action-brand",!C&&a==="subtle"&&!f&&!b&&"group-hover:bg-background-hover",!C&&a==="subtle"&&f&&!b&&"bg-background-selected group-hover:bg-background-hover",!C&&a==="subtle"&&f&&b&&"bg-background-selected",!C&&a==="solid"&&!f&&!b&&"group-hover:bg-background-hover",!C&&a==="solid"&&f&&!b&&"bg-action-brand group-hover:bg-action-brand-hover",!C&&a==="solid"&&f&&b&&"bg-action-brand"),R=tailwindMerge.twMerge("relative flex items-center gap-2 text-text-primary hover:text-text-primary transition-colors",Pt[i].node,C&&!f&&"font-semibold",a==="subtle"&&f&&"text-text-link-default",a==="solid"&&f&&"text-[color:var(--color-action-brand-text)]");return jsxRuntime.jsxs("div",{ref:p,className:N,onClick:S,onKeyDown:w,role:"treeitem","aria-selected":f,"aria-disabled":b,tabIndex:0,"data-node-id":e.id,children:[jsxRuntime.jsx("div",{className:k}),jsxRuntime.jsxs("div",{className:R,children:[s&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative rounded-full flex items-center justify-center flex-shrink-0 z-20",C&&"bg-action-brand border-action-brand",!C&&"bg-background-muted border border-border-default"),style:{width:Pt[i].bullet,height:Pt[i].bullet},children:e.icon&&jsxRuntime.jsx(G,{name:e.icon,size:Pt[i].icon,weight:C?"fill":"regular",className:C?"text-[color:var(--color-action-brand-text)]":"text-text-primary"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:t?t(e,T):jsxRuntime.jsx("span",{className:"truncate",children:e.name})}),x&&!m&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:jsxRuntime.jsx(G,{name:"CaretRight",size:Pt[i].icon,className:"text-text-secondary"})})]})]})}function PC({items:e,showConnector:t=false,scrollContainerRef:r,showBullets:o,size:n,renderNode:a}){return jsxRuntime.jsxs("div",{className:"relative",ref:t&&r?r:void 0,children:[o&&e.length>0&&t&&jsxRuntime.jsx("div",{className:"absolute w-px bg-text-secondary z-10 pointer-events-none",style:{left:`${Pt[n].spacing.x+Pt[n].bullet/2}px`,top:`${Pt[n].spacing.y+Pt[n].bullet/2}px`,bottom:`${Pt[n].spacing.y+Pt[n].bullet/2}px`},"aria-hidden":"true"}),e.map(i=>jsxRuntime.jsx(NC,{node:i,renderNode:a},i.id))]})}function js({children:e,mode:t="sync",presenceKey:r}){let o=r!==void 0&&ot__namespace.default.isValidElement(e)?ot__namespace.default.cloneElement(e,{key:r}):r!==void 0?jsxRuntime.jsx("div",{children:e},r):e;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:t,children:o})}function EC(){let[e,t]=ot.useState(()=>typeof window>"u"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return ot.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=n=>{t(n.matches);};return r.addEventListener("change",o),()=>{r.removeEventListener("change",o);}},[]),e}var gA={instant:0,fast:150,normal:250,slow:350,slower:500},hf={xs:"4px",sm:"8px",md:"16px"};function hA(e){return e?typeof e=="string"&&e in hf?hf[e]:typeof e=="number"?`${e}px`:e:hf.sm}function qs({children:e,direction:t,distance:r="sm",duration:o="normal",delay:n=0,className:a}){let i=EC(),s=typeof o=="number"?o:gA[o],l=hA(r),d=p=>{switch(t){case "left":return {x:`-${p}`};case "right":return {x:p};case "up":return {y:`-${p}`};case "down":return {y:p}}},c=i?{opacity:0}:{opacity:0,...d(l)},u={opacity:1,x:0,y:0},m=i?{opacity:0}:{opacity:0,...d(l)};return jsxRuntime.jsx(framerMotion.motion.div,{className:a,initial:c,animate:u,exit:m,transition:{duration:i?0:s/1e3,delay:i?0:n/1e3,ease:[.4,0,.2,1]},children:e})}function Id({navigationStack:e,onNavigateBack:t,size:r}){let o=e.length===1?"Back to main":`Back to ${e[e.length-2]?.name}`;return jsxRuntime.jsx("div",{className:"sticky top-0 z-10 bg-background-surface border-b border-border-default flex-shrink-0",children:jsxRuntime.jsxs("button",{type:"button",onClick:t,className:tailwindMerge.twMerge("w-full flex items-center gap-2 transition-colors text-left group",Pt[r].node),children:[jsxRuntime.jsx(G,{name:"CaretLeft",size:Pt[r].icon,className:"text-text-secondary group-hover:text-text-primary transition-colors"}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary group-hover:text-text-link-hover transition-colors",children:o})]})})}function Fd({node:e,position:t,selectedId:r,variant:o,size:n,showBullets:a}){let i=r===e.id;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("absolute z-30 left-0 right-0 border-border-default transition-all duration-200 bg-background-surface",Pt[n].node,i?o==="subtle"?"text-text-link-default":"bg-action-brand text-[color:var(--color-action-brand-text)]":"font-semibold",t==="top"&&"top-0 border-b shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1)]",t==="bottom"&&"bottom-0 border-t shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]"),children:[i&&o==="subtle"&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-background-selected"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 cursor-pointer relative z-10",children:[a&&jsxRuntime.jsx("div",{className:"flex-shrink-0 rounded-full flex items-center justify-center bg-action-brand border-action-brand",style:{width:Pt[n].bullet,height:Pt[n].bullet},children:e.icon&&jsxRuntime.jsx(G,{name:e.icon,size:Pt[n].icon,weight:"fill",className:"text-[color:var(--color-action-brand-text)]"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:jsxRuntime.jsx("span",{className:"truncate",children:e.name})})]})]})}function DC({currentItems:e,currentParent:t,navigationStack:r,selectedId:o,variant:n,size:a,showBullets:i,slideDirection:s,viewKey:l,hasHeight:d,rootNodeStickyState:c,renderNodeList:u,renderDetailContent:m,onNavigateBack:p}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.length===0&&c.position&&c.node&&jsxRuntime.jsx(Fd,{node:c.node,position:c.position,selectedId:o,variant:n,size:a,showBullets:i}),r.length>0&&jsxRuntime.jsx(Id,{navigationStack:r,onNavigateBack:p,size:a}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative",d&&"overflow-auto h-full"),children:jsxRuntime.jsx(js,{mode:"wait",presenceKey:l,children:r.length===0?u(e,true):jsxRuntime.jsx(qs,{direction:s,distance:"100%",duration:"normal",children:m(t)})})})]})}function xf(e,t){for(let r of e){if(r.id===t)return r;if(r.children&&r.children.length>0){let o=xf(r.children,t);if(o)return o}}return null}function Bd(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}function AC(e,t){if(process.env.NODE_ENV!=="development")return;let r=new Set,o=(n,a="root")=>{for(let i=0;i<n.length;i++){let s=n[i],l=`${a}[${i}]`;s.id?r.has(s.id)?console.warn(`[HierarchyExplorer] Duplicate node ID found: "${s.id}". Each node must have a unique ID.`):r.add(s.id):console.warn(`[HierarchyExplorer] Node at ${l} is missing an "id" field. Node name: "${s.name||"(unnamed)"}"`),s.children&&o(s.children,`${l}.children`);}};o(e),t&&!r.has(t)&&console.warn(`[HierarchyExplorer] Root node ID "${t}" not found in data. No node will be highlighted as root.`);}function FC({data:e,currentItems:t,navigationStack:r,selectedId:o,variant:n,size:a,showBullets:i,rootNodeStickyState:s,renderNodeList:l,renderDetailContent:d,renderEmptyState:c,onNavigateBack:u}){let m=o?xf(e,o):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex-1 min-w-0 border-r border-border-default flex flex-col relative",children:[r.length===0&&s.position&&s.node&&jsxRuntime.jsx(Fd,{node:s.node,position:s.position,selectedId:o,variant:n,size:a,showBullets:i}),r.length>0&&jsxRuntime.jsx(Id,{navigationStack:r,onNavigateBack:u,size:a}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:l(t,r.length===0)})]}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0 overflow-auto bg-background-body",children:jsxRuntime.jsx(js,{mode:"wait",presenceKey:m?.id||"empty",children:m?jsxRuntime.jsx(qs,{direction:"left",duration:"fast",children:d(m)}):c?c():jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary text-center",Pt[a].node,"py-8"),children:"Select an item to view details"})})})]})}function BC({data:e,renderNode:t,onNodeSelect:r,onNavigate:o,selectedId:n,rootNodeId:a,stickyRootNode:i=true,height:s,minHeight:l,maxHeight:d,variant:c="subtle",size:u="md",showBullets:m=true,layout:p="auto",splitBreakpoint:g=768,renderEmptyState:f,renderDetailView:b,className:h,"aria-label":v="Hierarchy explorer"}){let[x,C]=ot__namespace.useState(null),[S,w]=ot__namespace.useState([]),[T,N]=ot__namespace.useState("left"),[k,R]=ot__namespace.useState({position:null,node:null}),{ref:A,width:M}=bi(),B=ot__namespace.useMemo(()=>p==="split"?true:p==="single"?false:M>=g,[p,M,g]),D=n!==void 0?n:x;ot__namespace.useEffect(()=>{AC(e,a);},[e,a]);let W=S.length>0?S[S.length-1]:null,X=W?W.children||[]:e,H=ot__namespace.useCallback(P=>{N("left"),w(Y=>[...Y,P]),o?.(P,[...S,P]);},[S,o]),I=ot__namespace.useCallback(()=>{N("right"),w(P=>{let Y=P.slice(0,-1);return o?.(Y.length>0?Y[Y.length-1]:null,Y),Y});},[o]),F=ot__namespace.useCallback(P=>{n===void 0&&C(P.id),r?.(P,[...S,P]);},[n,S,r]),z=ot__namespace.useCallback((P,Y)=>{R({position:P,node:Y});},[]),U=ot__namespace.useMemo(()=>({selectedId:D,selectNode:F,navigateToNode:H,navigateBack:I,rootNodeId:a,stickyRootNode:i,variant:c,size:u,showBullets:m,onNodeSelect:r,onNavigate:o,navigationStack:S,setRootNodeSticky:z,useSplitLayout:B}),[D,F,H,I,a,i,c,u,m,r,o,S,z,B]),K=ot__namespace.useRef(null);ot__namespace.useEffect(()=>{if(!a||!K.current||S.length>0||B)return;let P=K.current,Y=setTimeout(()=>{let $=P.querySelector(`[data-node-id="${a}"]`);$&&$.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"});},100);return ()=>clearTimeout(Y)},[a,S.length,B]);let O={height:Bd(s),minHeight:Bd(l),maxHeight:Bd(d)},V=s!==void 0||d!==void 0,L=W?W.id:"root",y=ot__namespace.useCallback((P,Y=false)=>jsxRuntime.jsx(PC,{items:P,showConnector:Y,scrollContainerRef:Y?K:null,showBullets:m,size:u,renderNode:t}),[m,u,t]),E=ot__namespace.useCallback(P=>P?b?b(P,y):jsxRuntime.jsx(SC,{node:P,renderNodeList:y}):null,[b,y]);return jsxRuntime.jsx(gf.Provider,{value:U,children:jsxRuntime.jsx("div",{ref:A,className:tailwindMerge.twMerge("select-none bg-background-surface rounded-lg border border-border-default relative",V&&"overflow-hidden",!V&&"h-full flex flex-col",B&&!V&&"flex-row",B&&V&&"flex",h),style:O,role:"tree","aria-label":v,children:B?jsxRuntime.jsx(FC,{data:e,currentItems:X,navigationStack:S,selectedId:D,variant:c,size:u,showBullets:m,rootNodeStickyState:k,renderNodeList:y,renderDetailContent:E,renderEmptyState:f,onNavigateBack:I}):jsxRuntime.jsx(DC,{currentItems:X,currentParent:W,navigationStack:S,selectedId:D,variant:c,size:u,showBullets:m,slideDirection:T,viewKey:L,hasHeight:V,rootNodeStickyState:k,renderNodeList:y,renderDetailContent:E,onNavigateBack:I})})})}function LA({isEntering:e,isExiting:t,className:r=""}){let o=["group","bg-background-surface","forced-colors:bg-[Canvas]","text-text-primary","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none","p-4","min-w-[260px]","max-w-[360px]"].filter(Boolean).join(" "),n=e?["animate-in","fade-in","zoom-in-95","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",a=t?["animate-out","fade-out","zoom-out-95","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [o,n,a,r].filter(Boolean).join(" ")}var VC=({children:e,delay:t=700,closeDelay:r=0,isOpen:o,defaultOpen:n,onOpenChange:a,isDisabled:i=false,...s})=>jsxRuntime.jsx(reactAriaComponents.TooltipTrigger,{delay:t,closeDelay:r,isOpen:o,defaultOpen:n,onOpenChange:a,isDisabled:i,...s,children:e}),OC=({children:e,className:t,showArrow:r=false,offset:o,...n})=>jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...n,offset:o??(r?12:8),className:reactAriaComponents.composeRenderProps(t,(i,s)=>LA({...s,className:i})),children:[r&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});OC.displayName="HoverCardContent";var DA=Object.assign(VC,{Root:VC,Content:OC});var FA={md:{fontFamily:"var(--font-family-brand)",fontSize:24,lineHeight:1,letterSpacing:"-0.02em"},lg:{fontFamily:"var(--font-family-brand)",fontSize:34,lineHeight:1.1}},BA={md:{fontSize:12},lg:{fontSize:16}},VA={fontSize:11};function OA(e,t){return Ao({value:e,formatter:t,emptyClassName:"text-text-secondary",emptyText:"\u2014"})}function zA(e,t="upIsGood"){if(e===0)return "text-text-secondary";let r=e>0;return t==="upIsGood"?r?"text-feedback-success-text":"text-feedback-error-text":r?"text-feedback-error-text":"text-feedback-success-text"}function HA({points:e,className:t,ariaLabel:r}){let i=e.map(p=>typeof p.y=="number"?p.y:0);if(i.length===0)return null;let s=Math.min(...i),d=Math.max(...i)-s,c=p=>d===0?20/2:18-(p-s)/d*16,u=60/Math.max(e.length-1,1),m=e.map((p,g)=>{let f=2+g*u,b=c(typeof p.y=="number"?p.y:0);return `${g===0?"M":"L"} ${f} ${b}`}).join(" ");return jsxRuntime.jsx("svg",{width:64,height:20,role:"img","aria-label":r,className:tailwindMerge.twMerge("overflow-visible",t),children:jsxRuntime.jsx("path",{d:m,fill:"none",strokeWidth:"1.5",className:"stroke-border-muted"})})}var zC=100,Ka=30,HC=1.5,GC=4,GA=12;function WA(e,t){if(e.length<=t)return e;let r=(e.length-1)/(t-1),o=[];for(let n=0;n<t;n++)o.push(e[Math.round(n*r)]);return o}function UA(e){if(e.length<2)return e.length===1?`M ${e[0][0]} ${e[0][1]}`:"";let t=`M ${e[0][0]} ${e[0][1]}`;for(let r=0;r<e.length-1;r++){let o=e[r-1]??e[r],n=e[r],a=e[r+1],i=e[r+2]??a,s=n[0]+(a[0]-o[0])/6,l=n[1]+(a[1]-o[1])/6,d=a[0]-(i[0]-n[0])/6,c=a[1]-(i[1]-n[1])/6;t+=` C ${s} ${l} ${d} ${c} ${a[0]} ${a[1]}`;}return t}function KA({points:e,gradientId:t,tone:r,className:o}){if(!e||e.length<2)return null;let n=WA(e,GA),a=n.map(b=>typeof b.y=="number"?b.y:0),i=Math.min(...a),l=Math.max(...a)-i,d=b=>l===0?Ka/2:Ka-GC-(b-i)/l*(Ka-2*GC),c=(zC-2*HC)/Math.max(n.length-1,1),u=n.map((b,h)=>[HC+h*c,d(typeof b.y=="number"?b.y:0)]),m=UA(u),p=u[u.length-1],g=u[0],f=`${m} L ${p[0]} ${Ka} L ${g[0]} ${Ka} Z`;return jsxRuntime.jsxs("svg",{width:"100%",height:Ka,viewBox:`0 0 ${zC} ${Ka}`,preserveAspectRatio:"none",role:"img","aria-label":"Trend",className:tailwindMerge.twMerge("mt-2 block w-full",r,o),children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"0",y2:"1",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:.22}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:0})]})}),jsxRuntime.jsx("path",{d:f,fill:`url(#${t})`,stroke:"none"}),jsxRuntime.jsx("path",{d:m,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})}function WC({label:e,value:t,formatter:r,delta:o,deltaPeriodLabel:n,deltaIntent:a="upIsGood",trend:i,status:s,helpText:l,size:d="md",orientation:c="vertical",isLoading:u,empty:m,error:p,onClick:g,className:f,labelClassName:b,renderValue:h,renderDelta:v,renderTrend:x,unit:C,sub:S,dashed:w,sparkVariant:T="line",sparkTone:N,tileValueSize:k}){let R=ot.useId(),M={sm:{label:zt("labelSm"),value:zt("displaySm"),delta:zt("labelSm"),gap:"gap-1"},md:{label:zt("labelMd"),value:zt("displayMd"),delta:zt("bodySm"),gap:"gap-2"},lg:{label:zt("labelLg"),value:zt("displayLg"),delta:zt("bodyMd"),gap:"gap-3"}}[d],B=I=>k?jsxRuntime.jsxs("span",{style:FA[k],className:w?"opacity-45":void 0,children:[I,C?jsxRuntime.jsxs("span",{className:"text-text-secondary",style:BA[k],children:[" ",C]}):null]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[I,C?jsxRuntime.jsxs("span",{className:"text-text-secondary",children:[" ",C]}):null]}),D=u?jsxRuntime.jsx(q,{className:"h-7 w-20"}):m?jsxRuntime.jsx("span",{className:"text-text-secondary",children:"\u2014"}):p?jsxRuntime.jsx("span",{className:zt("bodySm","text-feedback-error"),children:typeof p=="string"?p:"Error"}):w?B("\u2014"):h?h(t):B(k?t:OA(t,r)),W=v?v(o):o!==void 0&&!u&&!m&&!p&&!w?jsxRuntime.jsxs("div",{className:Er(M.delta,zA(o,a),"flex items-center gap-1"),children:[o>0&&jsxRuntime.jsx(G,{name:"ArrowUp",size:12}),o<0&&jsxRuntime.jsx(G,{name:"ArrowDown",size:12}),o===0&&jsxRuntime.jsx(G,{name:"Minus",size:12}),jsxRuntime.jsxs("span",{children:[o>0?"+":"",Math.abs(o).toFixed(1),"%"]}),n&&jsxRuntime.jsxs("span",{className:"text-text-secondary",children:["\xB7 ",n]})]}):u&&o!==void 0?jsxRuntime.jsx(q,{className:"h-4 w-24"}):null,X=x?x(i):i&&i.length>0&&!u&&!p&&!w?T==="area"?jsxRuntime.jsx(KA,{points:i,gradientId:R,tone:N,className:m?"opacity-30":""}):jsxRuntime.jsx(HA,{points:i,ariaLabel:`${e} trend`,className:m?"opacity-30":""}):u&&i!==void 0?jsxRuntime.jsx(q,{className:"h-5 w-16"}):null,H=S&&!u&&!p?jsxRuntime.jsx("div",{className:"text-text-secondary",style:VA,children:S}):null;return jsxRuntime.jsxs("section",{className:tailwindMerge.twMerge("flex min-w-0",c==="horizontal"?`items-center ${M.gap}`:`flex-col ${M.gap}`,g&&"cursor-pointer hover:bg-background-muted rounded-lg px-3 py-2 -mx-3 -my-2 transition-colors",f),"aria-labelledby":`kpi-${e}`,onClick:g,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{id:`kpi-${e}`,className:tailwindMerge.twMerge(Er(M.label,"text-text-secondary truncate"),b),children:u?jsxRuntime.jsx(q,{className:"h-4 w-24"}):e}),l&&!u&&jsxRuntime.jsx(G,{name:"Question",size:12,className:"text-text-secondary cursor-help","aria-label":"Help"})]}),jsxRuntime.jsxs("div",{className:"flex items-baseline gap-2",children:[jsxRuntime.jsx("output",{className:Er(k?void 0:M.value,p?"text-feedback-error":"text-text-primary"),"aria-label":`Value: ${t}`,children:D}),s&&!u&&!p&&jsxRuntime.jsx(kt,{variant:s.tone||"neutral",size:"sm",children:s.value})]}),H,(W||X)&&jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[W,X]})]})}var UC={xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-6",xl:"gap-8"},KC={start:"items-start",center:"items-center",stretch:"items-stretch"};function YC(e){if(typeof e=="number")return `grid-cols-${e}`;let t=[];return e.base!==void 0&&t.push(`grid-cols-${e.base}`),e.sm!==void 0&&t.push(`sm:grid-cols-${e.sm}`),e.md!==void 0&&t.push(`md:grid-cols-${e.md}`),e.lg!==void 0&&t.push(`lg:grid-cols-${e.lg}`),e.xl!==void 0&&t.push(`xl:grid-cols-${e.xl}`),e["2xl"]!==void 0&&t.push(`2xl:grid-cols-${e["2xl"]}`),t.join(" ")}function Cf({children:e,cols:t={base:1,sm:2,md:3,lg:4},gap:r="md",align:o="stretch",equalizeHeights:n=true,header:a,isLoading:i,scrollOnMobile:s=false,scrollItemMinWidth:l="140px",className:d}){let c=i?ot__namespace.default.Children.map(e,p=>ot__namespace.default.isValidElement(p)&&p.type&&typeof p.type!="string"&&"displayName"in p.type?ot__namespace.default.cloneElement(p,{isLoading:true}):p):e,u=s?ot__namespace.default.Children.map(c,p=>jsxRuntime.jsx("div",{className:"shrink-0",style:{minWidth:l},children:p})):c,m=s?tailwindMerge.twMerge("flex overflow-x-auto pb-2 -mb-2",UC[r],"sm:grid sm:overflow-visible sm:pb-0 sm:-mb-0",YC({...typeof t=="object"?t:{base:t},base:void 0}),KC[o],n&&"sm:auto-rows-fr"):tailwindMerge.twMerge("grid",YC(t),UC[r],KC[o],n&&"auto-rows-fr","w-full");return jsxRuntime.jsxs("section",{className:tailwindMerge.twMerge("w-full",d),"aria-label":"Key metrics",children:[a&&jsxRuntime.jsx("div",{className:"mb-4",children:a}),jsxRuntime.jsx("div",{className:m,children:s?u:c})]})}Cf.displayName="KpiGroup";function jC({items:e,renderItem:t,selectedId:r,onSelect:o,onHoverChange:n,isLoading:a=false,loadingState:i,error:s=null,renderLoadingSkeleton:l,loadingSkeletonCount:d=5,emptyMessage:c="No results found.",variant:u="relaxed",showDividers:m=true,onLoadMore:p,hasMore:g=false,enableVirtualization:f,estimatedItemSize:b=60,loadingIndicator:h,"aria-label":v,className:x="",style:C}){let[S,w]=ot.useState(null),T=ot.useRef(null),N=ot.useRef(new Map),{scrollRef:k,loadMoreRef:R,virtualizer:A,virtualItems:M,isLoadingMore:B,computedLoadingState:D}=En({items:e,onLoadMore:p,hasMore:g,isLoading:a,loadingState:i,enableVirtualization:f,estimatedItemSize:b,overscan:5}),W=k??T,X=ot.useCallback((y,E)=>{o?.(y,E);},[o]),H=ot.useCallback((y,E)=>{w(y),n?.(y,E);},[n]),I=ot.useCallback((y,E)=>{let P=y?.id;return typeof P=="string"&&P?P:`item-${E}`},[]),F=ot.useCallback(y=>{if(!W.current||e.length===0)return;let E=document.activeElement,P=e.findIndex((re,_)=>{let he=I(re,_),me=N.current.get(he);return me&&(me===E||me.contains(E))}),Y=P;switch(y.key){case "ArrowDown":y.preventDefault(),Y=P===-1?0:Math.min(P+1,e.length-1);break;case "ArrowUp":y.preventDefault(),Y=P===-1?0:Math.max(P-1,0);break;case "Home":y.preventDefault(),Y=0;break;case "End":y.preventDefault(),Y=e.length-1;break;default:return}let $=I(e[Y],Y);N.current.get($)?.focus();},[e,I,W]),z=["flex flex-col","bg-background-surface","focus:outline-none focus:ring-2 focus:ring-border-focus focus:ring-offset-2"],U={dense:"gap-0",relaxed:"gap-0"},K=m?"divide-y divide-border-muted":"",O=[...z,U[u],K,x].filter(Boolean).join(" ");if(D==="loading"||a&&e.length===0){let y=l?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:d}).map((E,P)=>jsxRuntime.jsx("div",{children:l()},`skeleton-${P}`))}):jsxRuntime.jsx(Sh,{count:d,className:"space-y-0",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[jsxRuntime.jsx(q,{width:16,height:16,variant:"circle"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-2",children:[jsxRuntime.jsx(q,{width:"75%",height:16}),jsxRuntime.jsx(q,{width:"50%",height:14})]}),jsxRuntime.jsx(q,{width:60,height:20})]})});return jsxRuntime.jsx("div",{ref:W,className:O,style:C,role:"listbox","aria-label":v,"aria-busy":"true","aria-live":"polite",children:y})}if(s)return jsxRuntime.jsx("div",{ref:W,className:O,style:C,role:"listbox","aria-label":v,"aria-live":"polite",children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:s})});if(e.length===0)return jsxRuntime.jsx("div",{ref:W,className:O,style:C,role:"listbox","aria-label":v,"aria-live":"polite",children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:c})});let L=A?M?.map(y=>({virtualItem:y,item:e[y.index],index:y.index}))||[]:e.map((y,E)=>({item:y,index:E,virtualItem:null}));return jsxRuntime.jsxs("div",{ref:W,className:O,style:{...C,...p&&{overflow:"auto",height:C?.height||"600px"}},role:"listbox","aria-label":v,"aria-live":"polite",onKeyDown:F,tabIndex:0,children:[A&&jsxRuntime.jsxs("div",{style:{height:`${A.getTotalSize()}px`,width:"100%",position:"relative"},children:[L.map(({virtualItem:y,item:E,index:P})=>{if(!y)return null;let Y=I(E,P),$=r===Y,oe=S===Y,re={id:Y,role:"option","aria-selected":$,"aria-current":$?"page":void 0,tabIndex:$||r==null&&P===0?0:-1,onClick:_=>X(_,E),onMouseEnter:_=>H(_,E),onMouseLeave:_=>H(null),onFocus:_=>H(_,E),onBlur:_=>H(null),ref:_=>{_?N.current.set(Y,_):N.current.delete(Y);}};return jsxRuntime.jsx("div",{"data-index":y.index,ref:A.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${y.start}px)`},children:t({item:E,index:P,isSelected:$,isHovered:oe,rowProps:re})},Y)}),p&&g&&jsxRuntime.jsx("div",{ref:R,style:{position:"absolute",top:`${A.getTotalSize()}px`,left:0,width:"100%",height:1,pointerEvents:"none"}}),B&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${A.getTotalSize()}px`,left:0,width:"100%"},children:h||jsxRuntime.jsx(io,{state:"loading-more"})})]}),!A&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[L.map(({item:y,index:E})=>{let P=I(y,E),Y=r===P,$=S===P,oe={id:P,role:"option","aria-selected":Y,"aria-current":Y?"page":void 0,tabIndex:Y||r==null&&E===0?0:-1,onClick:re=>X(re,y),onMouseEnter:re=>H(re,y),onMouseLeave:re=>H(null),onFocus:re=>H(re,y),onBlur:re=>H(null),ref:re=>{re?N.current.set(P,re):N.current.delete(P);}};return jsxRuntime.jsx("div",{children:t({item:y,index:E,isSelected:Y,isHovered:$,rowProps:oe})},P)}),p&&g&&jsxRuntime.jsx("div",{ref:R,style:{height:1}}),B&&(h||jsxRuntime.jsx(io,{state:"loading-more"}))]})]})}function ZC({id:e,title:t,subtitle:r,meta:o,leading:n,trailing:a,isSelected:i=false,isHovered:s=false,disabled:l=false,href:d,size:c="md",onClick:u,onMouseEnter:m,onMouseLeave:p,className:g="",style:f,piiTitleType:b,piiSubtitleType:h,piiEntity:v}){let x=()=>{!l&&u&&u(e);},C=()=>{!l&&m&&m(e);},S=()=>{!l&&p&&p(e);},T={sm:{container:"px-3 py-2 gap-2",title:"text-sm leading-tight",subtitle:"text-xs leading-tight",meta:"text-xs leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},md:{container:"px-4 py-3 gap-3",title:"text-base leading-tight",subtitle:"text-sm leading-tight",meta:"text-sm leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},lg:{container:"px-4 py-4 gap-3",title:"text-lg leading-tight",subtitle:"text-base leading-tight",meta:"text-sm leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},xl:{container:"px-5 py-5 gap-4",title:"text-xl leading-tight",subtitle:"text-base leading-tight",meta:"text-base leading-tight",subtitleSpacing:"mt-1.5",metaSpacing:"mt-1.5"}}[c],N=["flex items-center w-full text-left transition-all duration-200 ease-in-out",T.container,"border-l-2 border-l-transparent","rounded-sm",pt()],k=[s&&!i&&"bg-background-hover",i&&"bg-action-default/5 border-l-action-default shadow-sm",l&&"opacity-50 cursor-not-allowed",!l&&!i&&"hover:bg-background-hover"],R=[...N,...k,g].filter(Boolean).join(" "),A=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n&&jsxRuntime.jsx("div",{className:"flex-shrink-0 flex items-center justify-center",children:n}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:jsxRuntime.jsx("div",{className:"flex items-start justify-between gap-2",children:jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:`text-text-primary font-medium truncate ${T.title}`,title:typeof t=="string"?t:void 0,"data-pii-type":b&&v?b:void 0,"data-pii-entity":b&&v?v:void 0,children:t}),r&&jsxRuntime.jsx("div",{className:`text-text-secondary truncate ${T.subtitle} ${T.subtitleSpacing}`,title:typeof r=="string"?r:void 0,"data-pii-type":h&&v?h:void 0,"data-pii-entity":h&&v?v:void 0,children:r}),o&&jsxRuntime.jsx("div",{className:`text-text-secondary ${T.meta} ${T.metaSpacing}`,children:o})]})})}),a&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a})]});return d?jsxRuntime.jsx("a",{href:d,className:R,style:f,onMouseEnter:C,onMouseLeave:S,"aria-selected":i,"aria-current":i?"page":void 0,tabIndex:l?-1:0,children:A}):jsxRuntime.jsx("button",{type:"button",className:R,style:f,onClick:x,onMouseEnter:C,onMouseLeave:S,disabled:l,"aria-selected":i,tabIndex:l?-1:0,children:A})}function QC({header:e,children:t,footer:r,width:o="md",tone:n="neutral",elevation:a="sm",showDivider:i=true,"aria-label":s,"aria-labelledby":l,className:d="",style:c}){let u={sm:"w-64",md:"w-80",lg:"w-96",xl:"w-[28rem]","2xl":"w-[32rem]",auto:"w-auto"},m={neutral:"bg-background-surface",subtle:"bg-background-subtle",brand:"bg-background-brand"},p={none:"",sm:"shadow-sm",md:"shadow-md"},g=tailwindMerge.twMerge("flex flex-col h-full",u[o],m[n],p[a],i&&"border-r border-border-muted",d);return jsxRuntime.jsxs("div",{className:g,style:c,role:"complementary","aria-label":s,"aria-labelledby":l,children:[e&&jsxRuntime.jsx("div",{className:"flex-shrink-0 sticky top-0 z-10 bg-inherit border-b border-border-muted",children:e}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:t}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t border-border-muted bg-inherit",children:r})]})}function _A({children:e,...t}){return jsxRuntime.jsx(reactAriaComponents.ListBox,{...t,className:Fe(t.className,"outline-0"),children:e})}function Gd(){try{if(typeof process<"u"){let e=process.env.MAPBOX_ACCESS_TOKEN;if(e)return e}}catch{}try{if(typeof process<"u"){let e=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN;if(e)return e}}catch{}try{let e=undefined.VITE_MAPBOX_ACCESS_TOKEN;if(e)return e}catch{}}function Wd(e,t){let[r,o]=ot.useState(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.error(`Error reading localStorage key "${e}":`,i),t}});ot.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(r));}catch(i){console.error(`Error writing to localStorage key "${e}":`,i);}},[e,r]);let n=ot.useCallback(i=>{try{o(s=>i instanceof Function?i(s):i);}catch(s){console.error(`Error setting value for localStorage key "${e}":`,s);}},[e]),a=ot.useCallback(()=>{try{typeof window<"u"&&window.localStorage.removeItem(e),o(t);}catch(i){console.error(`Error removing localStorage key "${e}":`,i);}},[e,t]);return [r,n,a]}var wf=[{type:"navigation",position:"bottom-right",showCompass:true,showGeolocate:true,showResetZoom:true}];function $C(e="top-right"){switch(e){case "top-left":return "absolute top-4 left-4 z-10";case "top-right":return "absolute top-4 right-4 z-10";case "bottom-left":return "absolute bottom-4 left-4 z-10";case "bottom-right":return "absolute bottom-4 right-4 z-10";default:return "absolute top-4 right-4 z-10"}}var oI="h-12 w-12 md:h-10 md:w-10 p-0 bg-background-surface hover:bg-background-hover shadow-lg border border-border";function e0(e){return tailwindMerge.twMerge(oI,e)}var t0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAACXCAYAAAAYn8l5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABtCSURBVHgB7Z2Jkty0GoV7hlz2HcIeSPGkPCmELRC2sO8kN5+L03XmR7IlW3LbSZ+qrp7pdtuydPTvki9u3Lhx/7ASLi4uDvfv973cvXv3Dn/++efh2rVrx2vyAo899tjwThu8Hfo+1d5SLLkv2vXzzz8fnnvuucPff/99eFhw7bAi/vnnn8Pl5eWVz3IDOHewGKgnnnjiCoEgHH///vvvh8cff3z4nrbE63lb+LvFQHMe2jR2P7p2bNMe4f24Grk02LkOjCQTCfmNE3KKdLo5l1jCk08+efjtt98OP/300yAlUgRTW3RdiLkEJZOEa4hccfItuWaN5O2B1cg1daNxEHzg4wCj8koGLXVOCMbnP/zww+GZZ54ZpIoGV8eLoC3IVYNWZPDzRIncG36t5dNkZ5CKfPHFFw9//PHH4ddffz3aYi7tJGkjkXvZjCJy6/P7/bRAzaTeJblaSJO//vrr8PTTTw/2F1IMSCX5gHAtV1VzpEBJe//3v/8NNl4vKdNDKo4dM5gVhxXR21OsgWwc3l944YXBFsPglxQDfM9rjXbTDqnnhwWrkStlYJ8aag8Ekv31448/DpJK3021me9RnU7KiOhktAh9zMWaE3zVUMSWgdSAIHiRxJxQU5CmVA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zha8dbY+rvA7Erz2Jf1VQQm9t9zxzU0kLlDp2uX9IwZVZxyO2G19y9ieD165lH9Fosk8DI5sufSSLSZBQSF3maHFuDcVGsLHjqrgKZLUX5JqjGehdg3ULYhq7fAkpy5voaGxxtFgmygtNBJMSfalN4Ghq0DVGhNw+TbZUJBvl6KdlImJXLsphrcJtyi/rBx7bNiPF3drqCfiaI7S/0yAfzPgdNJKqQ+lwh1XfSmYClPT+R2b/03chQhh/fQH7Dav+EOO2oojEn8WdyuYzZbw6+e/WpX6eGYK0xR3BJhumCL/0lYS1EWShiFKXp4HOjIdwcvzNzjuNg4uobmh3lmZNljg+RHIokP7iJ+//S9/0JF4UWgALQSUifcPn+AvCxKcp8u7vR5XAiSC3WYDByQWZ1myzFUtOgbu577+f5ZPq/B5Pf+nAAAAAElFTkSuQmCC";function Ud(e){return e.selection?.mode==="single"}function $n(e){let t=[],r=o=>{o.layerId&&t.push(o.layerId);for(let n of o.children??[])r(n);};return r(e),t}function Tf(e,t){let r=$n(e);if(r.length===0)return "unchecked";let o=0;for(let n of r)t(n)&&o++;return o===0?"unchecked":Ud(e)||o===r.length?"checked":"indeterminate"}var Ya=(e,t)=>Object.fromEntries(e.map(r=>[r,t]));function i0(e,t){let r=$n(e);if(!(Tf(e,t)!=="checked"))return Ya(r,false);if(Ud(e)){let n=e.children?.[0],a=n?$n(n):[];return {...Ya(r,false),...Ya(a,true)}}return Ya(r,true)}function s0(e,t,r){let o=e.children?.find(s=>s.id===t);if(!o)return {};let n=$n(e),a=$n(o);return a.length>0&&a.every(r)?e.selection?.mode==="single"&&e.selection.allowNone?Ya(a,false):{}:{...Ya(n,false),...Ya(a,true)}}function Nf(e,t){for(let r of e){if(r.id===t)return r;let o=Nf(r.children??[],t);if(o)return o}}function kf(e,t){for(let r of e){if(r.children?.some(n=>n.id===t))return r;let o=kf(r.children??[],t);if(o)return o}}function l0(e){let t=new Set,r=new Set,o=new Set,n=(i,s)=>{i&&(s.has(i)?o.add(i):s.add(i));},a=i=>{n(i.id,t),n(i.layerId,r);for(let s of i.children??[])a(s);};for(let i of e)a(i);return [...o]}function u0(e){return e.map(t=>({id:t.id,label:t.label,...t.children?.length?{children:u0(t.children)}:{}}))}function p0(e){let t=e.length;for(let r of e)r.children?.length&&(t=Math.max(t,p0(r.children)));return t}function c0({type:e,color:t,icon:r}){if(r)return jsxRuntime.jsx("span",{"aria-hidden":"true",className:"flex h-5 w-5 shrink-0 items-center justify-center text-text-primary",children:r});let o=t?{backgroundColor:t}:void 0;switch(e){case "line":return jsxRuntime.jsx("span",{className:"inline-block h-0.5 w-4 flex-shrink-0 rounded-full",style:o});case "polygon":return jsxRuntime.jsx("span",{className:"inline-block h-2.5 w-3.5 flex-shrink-0 rounded-sm border border-border",style:o});case "pin":return jsxRuntime.jsx("span",{className:"inline-block h-2.5 w-2.5 flex-shrink-0 rotate-45 rounded-full rounded-bl-none border border-border",style:o});default:return null}}function nI({isSelected:e,onPress:t,label:r}){return jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":e,"aria-label":r,onClick:t,className:`grid h-4 w-4 flex-shrink-0 cursor-pointer place-items-center rounded-full border-2 bg-transparent p-0 ${e?"border-action-primary":"border-border-default"}`,children:e?jsxRuntime.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-action-primary"}):null})}function d0(){return jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-text-secondary",children:jsxRuntime.jsx("path",{d:"M4.5 2.5 8 6l-3.5 3.5"})})}var aI=41,iI=44,sI=132,lI=360;function m0({tree:e,layers:t,onVisibilityChange:r}){let o=new Map(t.map(s=>[s.id,s])),n=s=>{let l=o.get(s);return !!l&&l.visible!==false};if(process.env.NODE_ENV!=="production"){let s=l0(e);s.length>0&&console.warn(`[LayersPanel] Duplicate id(s) in \`layerTree\`: ${s.join(", ")}. Row lookups and pane keys resolve to the first match, so the later entry is unreachable. Node ids must be unique among node ids, and layer ids unique among layer ids.`);let l=e.flatMap($n).filter(d=>!o.has(d));l.length>0&&console.warn(`[LayersPanel] \`layerTree\` references layer id(s) not present in \`layers\`: ${l.join(", ")}. Those rows render as hidden and cannot be turned on.`);}let a=u0(e),i=Math.min(lI,Math.max(sI,p0(e)*aI+iI));return jsxRuntime.jsx("div",{className:"overflow-hidden",style:{height:i},"data-layers-panel":"",children:jsxRuntime.jsx(gi,{items:a,ariaLabel:"Map layers",animated:false,width:null,sticky:false,theme:{background:"transparent",borderColor:"transparent"},className:"h-full w-full",renderRow:({item:s,hasChildren:l,select:d})=>{let c=Nf(e,s.id);if(!c)return null;if(c.content!==void 0)return l?jsxRuntime.jsxs("div",{className:"space-y-2",children:[c.content,jsxRuntime.jsxs("button",{type:"button",onClick:d,className:"flex w-full cursor-pointer items-center justify-between gap-2 border-0 bg-transparent py-2.5 text-left text-sm text-text-primary","aria-label":`Open ${c.label}`,children:[jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:c.label}),jsxRuntime.jsx(d0,{})]})]}):c.content;let u=Tf(c,n),p=(c.layerId?o.get(c.layerId):void 0)?.legend,g=$n(c),f=g.filter(n).length,b=l&&u==="indeterminate"?`${f} of ${g.length} on`:null,h=kf(e,c.id),v=!!h&&Ud(h),x=w=>{Object.keys(w).length>0&&r?.(w);},C=v?jsxRuntime.jsx(nI,{isSelected:u!=="unchecked",onPress:()=>x(s0(h,c.id,n)),label:c.label}):jsxRuntime.jsx(So,{isSelected:u==="checked",isIndeterminate:u==="indeterminate",onChange:()=>x(i0(c,n)),"aria-label":c.label}),S=jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[jsxRuntime.jsx("span",{className:`truncate text-sm ${u==="unchecked"?"text-text-secondary":"text-text-primary"}`,children:c.label}),b?jsxRuntime.jsx("span",{className:"text-[10px] text-text-secondary",children:b}):null]});return jsxRuntime.jsxs("div",{className:"edges-layers-panel__row flex cursor-default items-center gap-2 py-2.5",children:[C,l?jsxRuntime.jsxs("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left","aria-label":`Open ${c.label}`,children:[p?jsxRuntime.jsx(c0,{type:p.swatch,color:p.color,icon:p.icon}):null,S,jsxRuntime.jsx(d0,{})]}):jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[p?jsxRuntime.jsx(c0,{type:p.swatch,color:p.color,icon:p.icon}):null,S]})]})}})})}function ea({position:e="top-right",className:t,style:r,children:o}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge($C(e),t),style:r,children:o})}function no({icon:e,iconSize:t=24,onPress:r,isDisabled:o=false,className:n,iconClassName:a="text-text-primary",variant:i="secondary",isActive:s=false,ariaLabel:l,iconWeight:d="regular",...c}){let u=tailwindMerge.twMerge(e0(),s&&"bg-action-brand hover:bg-action-brand-hover border-action-brand",n),m=tailwindMerge.twMerge(a,s&&"text-text-inverse");return jsxRuntime.jsx(te,{...c,className:u,onPress:r,variant:i,size:"sm",isDisabled:o,"aria-label":l,"aria-pressed":s||void 0,type:"button",children:jsxRuntime.jsx(G,{name:e,size:t,className:m,weight:d})})}var fI=e=>[{id:"streets",name:"Streets",description:"Standard street map with traffic data",preview:e?n0:a0},{id:"satellite",name:"Satellite",description:"Aerial imagery with street labels",preview:o0},{id:"neutral",name:"Neutral",description:"Clean design with light/dark variants",preview:e?t0:r0}];function gI({type:e,color:t,icon:r}){if(r)return jsxRuntime.jsx("span",{"aria-hidden":"true",className:"flex h-5 w-5 shrink-0 items-center justify-center text-text-primary",children:r});let o="inline-block",n=t?{backgroundColor:t}:{};switch(e){case "dot":return null;case "line":return jsxRuntime.jsx("span",{className:`${o} h-0.5 w-6 rounded-full`,style:n});case "polygon":return jsxRuntime.jsx("span",{className:`${o} h-3 w-4 rounded-sm border border-border`,style:n});case "pin":return jsxRuntime.jsx("span",{className:`${o} h-3 w-3 rounded-full rounded-bl-none border border-border transform rotate-45`,style:n});default:return null}}function h0({position:e="bottom-left",className:t,style:r,currentMapType:o="streets",onMapTypeChange:n,layers:a=[],onLayerToggle:i,onClearAll:s,onLayerVariantChange:l,layerTree:d,onVisibilityChange:c}){let{isDarkTheme:u}=hr(),{isMobile:m}=Rr(),[p,g]=ot.useState(false),f=fI(u),b=x=>{n?.(x);},h=a.filter(x=>x.legend),v=jsxRuntime.jsxs("div",{className:m?"space-y-6 pb-6":"space-y-6",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary mb-3",children:"Map type"}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-3",children:f.map(x=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>b(x.id),className:"flex flex-col items-center space-y-2 p-3 rounded-lg text-center hover:bg-background-muted transition-colors border border-transparent "+(o===x.id?"bg-background-muted border-border":"hover:border-border"),children:[jsxRuntime.jsx("div",{className:"w-12 h-12 rounded-lg overflow-hidden bg-background-surface "+(o===x.id?"border-2 border-action-default":"border border-border-default"),children:jsxRuntime.jsx("img",{src:x.preview,alt:`${x.name} map preview`,className:"w-full h-full object-cover"})}),jsxRuntime.jsx("div",{className:"text-sm "+(o===x.id?"font-bold text-text-primary":"font-normal text-text-secondary"),children:x.name})]},x.id))})]}),d?.length?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3",children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Map details"}),s&&jsxRuntime.jsx("button",{type:"button",onClick:s,className:"text-xs text-text-secondary hover:text-text-primary transition-colors",children:"Clear all"})]}),jsxRuntime.jsx(m0,{tree:d,layers:a,onVisibilityChange:c})]}):null,!d?.length&&h.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3",children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Map details"}),s&&jsxRuntime.jsx("button",{type:"button",onClick:s,className:"text-xs text-text-secondary hover:text-text-primary transition-colors",children:"Clear all"})]}),jsxRuntime.jsx("div",{className:"space-y-2",children:h.map(x=>{let C=x.visible!==false,S=x.legend?.variants;return jsxRuntime.jsxs("div",{className:S?"space-y-1.5":void 0,children:[jsxRuntime.jsx(So,{isSelected:C,onChange:()=>i?.(x.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[x.legend&&jsxRuntime.jsx(gI,{type:x.legend.swatch,color:x.legend.color,icon:x.legend.icon}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:x.legend?.label})]})}),S&&jsxRuntime.jsx("div",{className:"pl-6",children:jsxRuntime.jsx(on,{"aria-label":`${x.legend?.label} mode`,size:"sm",isDisabled:!C,items:S.options.map(w=>({...w,value:w.id})),renderItem:w=>w.label,selectedKey:S.selectedId,onSelectionChange:w=>l?.(x.id,String(w))})})]},x.id)})})]})]});return jsxRuntime.jsx(ea,{position:e,className:t,style:r,children:jsxRuntime.jsx("div",{className:"relative",children:m?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(no,{icon:"Stack",ariaLabel:"Map layers and settings",onPress:()=>g(true)}),jsxRuntime.jsx(Lt,{isOpen:p,onClose:()=>g(false),title:"Map layers",animationVariant:"scale",children:v})]}):jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsx(no,{icon:"Stack",ariaLabel:"Map layers and settings"}),jsxRuntime.jsx(Et,{placement:"top start",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{"aria-label":"Map layers and settings",className:"p-4 min-w-80 bg-background-surface border border-border rounded-lg shadow-xl focus:outline-none focus:ring-0",children:v})})]})})})}function x0({position:e="top-right",className:t,style:r,onToggle:o,isActive:n=false}){return jsxRuntime.jsx(ea,{position:e,className:tailwindMerge.twMerge("md:hidden",t),style:r,children:jsxRuntime.jsx(no,{icon:"ListDashes",onPress:o,isActive:n,ariaLabel:n?"Hide list view":"Show list view"})})}var yI={sm:"gap-2",md:"gap-4",lg:"gap-6"};function Kd({position:e="top-right",className:t,style:r,children:o,orientation:n="vertical",spacing:a="md"}){return jsxRuntime.jsx(ea,{position:e,style:r,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex",n==="vertical"?"flex-col":"flex-row",yI[a],t),children:o})})}function v0({mapRef:e,position:t="bottom-right",className:r,style:o,showCompass:n=true,showGeolocate:a=true,showResetZoom:i=true,onResetZoom:s,onCompassClick:l,onGeolocateClick:d}){let[c,u]=ot.useState(false),m=ot.useRef(true);ot.useEffect(()=>()=>{m.current=false;},[]);let p=()=>{l?l():e.current&&e.current.easeTo({bearing:0,duration:500});},g=async()=>{if(!c)if(d)d();else {if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}if(navigator.permissions?.query)try{if((await navigator.permissions.query({name:"geolocation"})).state==="denied"){console.warn("Geolocation permission was previously denied. Please enable location services in your browser settings.");return}}catch{}u(true),navigator.geolocation.getCurrentPosition(x=>{if(!m.current)return;let{latitude:C,longitude:S}=x.coords;e.current&&e.current.flyTo({center:[S,C],zoom:15,duration:2e3}),u(false);},x=>{if(m.current){switch(console.warn("Geolocation error:",{code:x.code,message:x.message,PERMISSION_DENIED:x.PERMISSION_DENIED,POSITION_UNAVAILABLE:x.POSITION_UNAVAILABLE,TIMEOUT:x.TIMEOUT}),x.code){case x.PERMISSION_DENIED:console.warn("Location access denied. Please enable location services in your browser settings.");break;case x.POSITION_UNAVAILABLE:console.warn("Location information unavailable.");break;case x.TIMEOUT:console.warn("Location request timed out.");break;default:console.warn("Error getting location:",x.message);break}u(false);}},{enableHighAccuracy:true,timeout:1e4,maximumAge:0});}};if(!n&&!a&&!i)return null;let f=!i&&n,b=!i&&!n&&a,h=!a&&n;return jsxRuntime.jsxs(Kd,{position:t,className:r,style:o,spacing:"sm",children:[i&&jsxRuntime.jsx(no,{icon:"ArrowsOut",onPress:s,ariaLabel:"Reset zoom to show all points",className:tailwindMerge.twMerge(!(!a&&!n&&i)&&"rounded-b-none",n&&"border-b-0")}),n&&jsxRuntime.jsx(no,{icon:"Compass",onPress:p,ariaLabel:"Reset map orientation",className:tailwindMerge.twMerge(!f&&"rounded-t-none border-t-0",!h&&"rounded-b-none border-b-0")}),a&&jsxRuntime.jsx(no,{icon:c?"Spinner":"NavigationArrow",onPress:g,isDisabled:c,ariaLabel:"Go to my location",iconClassName:tailwindMerge.twMerge("text-text-primary",c&&"animate-spin"),className:tailwindMerge.twMerge(!b&&"rounded-t-none border-t-0",!b&&n&&"lg:rounded-t lg:border-t")})]})}function T0({position:e="top-left",className:t,style:r,onSearch:o,placeholder:n="Search places...",showSearchInput:a=true}){let[i,s]=ot.useState(false),[l,d]=ot.useState(""),c=()=>{a?s(!i):o&&o("");},u=p=>{p.preventDefault(),o&&l.trim()&&(o(l.trim()),s(false));},m=p=>{p.key==="Escape"&&s(false);};return jsxRuntime.jsx(ea,{position:e,className:t,style:r,children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(no,{icon:"MagnifyingGlass",onPress:c,ariaLabel:"Search"}),i&&a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute top-12 left-0 min-w-64","bg-background-surface border border-border rounded-lg shadow-xl p-3"),children:jsxRuntime.jsx("form",{onSubmit:u,children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("input",{type:"text",value:l,onChange:p=>d(p.target.value),onKeyDown:m,placeholder:n,className:tailwindMerge.twMerge("flex-1 px-3 py-2 text-sm rounded border","bg-background border-border text-text-primary placeholder:text-text-secondary","focus:outline-none focus:ring-2 focus:ring-action-brand"),autoFocus:true}),jsxRuntime.jsx(te,{type:"submit",variant:"primary",size:"sm",className:"px-3 py-2",children:"Search"})]})})})]})})}var TI={navigation:"bottom-right",layers:"bottom-left",search:"top-left",list:"top-right",custom:"top-right"};function Rf(e){return e.position??TI[e.type]}function N0(e,t,r){let o=Rf(e),n=e.id??`${e.type}-${t}`;switch(e.type){case "navigation":{let i=e.showResetZoom!==false&&r.showResetButton;return jsxRuntime.jsx(v0,{mapRef:r.mapRef,position:o,showCompass:e.showCompass,showGeolocate:e.showGeolocate,showResetZoom:i,onResetZoom:e.onResetZoom,onCompassClick:e.onCompassClick,onGeolocateClick:e.onGeolocateClick,style:e.style,className:e.className},n)}case "layers":return jsxRuntime.jsx(h0,{position:o,currentMapType:e.currentMapType,onMapTypeChange:e.onMapTypeChange,layers:e.layers??r.layers,onLayerToggle:e.onLayerToggle,onClearAll:e.onClearAll,onLayerVariantChange:e.onLayerVariantChange,layerTree:e.layerTree,onVisibilityChange:e.onVisibilityChange,style:e.style,className:e.className},n);case "search":return jsxRuntime.jsx(T0,{position:o,onSearch:e.onSearch,placeholder:e.placeholder,showSearchInput:e.showSearchInput,style:e.style,className:e.className},n);case "list":return jsxRuntime.jsx(x0,{position:o,onToggle:e.onToggle,isActive:e.isActive,style:e.style,className:e.className},n);case "custom":return jsxRuntime.jsx("div",{children:e.render(r)},n);default:return null}}function Mf(e,t){let r=e.reduce((n,a,i)=>{let s=Rf(a);return n[s]||(n[s]=[]),n[s].push({control:a,index:i}),n},{}),o=[];for(let[n,a]of Object.entries(r)){if(a.length===1){o.push(N0(a[0].control,a[0].index,t));continue}let i={position:"static",top:"auto",right:"auto",bottom:"auto",left:"auto"};o.push(jsxRuntime.jsx(Kd,{position:n,spacing:"sm",children:a.map(({control:s,index:l})=>{let d={...s,style:{...s.style,...i}};return N0(d,l,t)})},`group-${n}`));}return o}var Ef={vector:e=>({kind:"vector",...e}),geojson:e=>({kind:"geojson",...e}),customPins:e=>({kind:"customPins",...e}),raster:e=>({kind:"raster",...e}),clusteredVector:e=>({kind:"clusteredVector",...e})};function Lf(e){return e.kind==="vector"}function Df(e){return e.kind==="geojson"}function Af(e){return e.kind==="customPins"}function If(e){return e.kind==="raster"}var $s=(e,t)=>({id:e,label:t,kind:"sequential",hint:"Low \u2192 High",stops:()=>ts(e),toColorSpec:({by:r,scale:o="auto"})=>({by:r,palette:"sequential",scheme:e,scale:o})}),Ff=(e,t)=>({id:e,label:t,kind:"diverging",hint:"Low \u2192 Mid \u2192 High",stops:()=>rs(e),toColorSpec:({by:r,scale:o="auto",center:n=0})=>({by:r,palette:"diverging",scheme:e,center:n,scale:o})}),Xd=[$s("viridis","Viridis"),$s("magma","Magma"),$s("cerulean","Cerulean"),$s("forest","Forest"),$s("rose","Rose")],Jd=[Ff("redYellowBlue","Red \u2192 Blue"),Ff("orangeYellowSeafoam","Orange \u2192 Seafoam"),Ff("redBlue","Red / Blue")],jd={id:"categorical",label:"Categorical",kind:"categorical",hint:"Distinct per value",stops:()=>tn(),toColorSpec:({by:e})=>({by:e,palette:"categorical",scale:"auto"})},el=[...Xd,...Jd,jd];function Bf(e){return el.find(t=>t.id===e)}function Vf(e){return el.filter(t=>t.kind===e)}function R0(e){return !e.includes("{z}")}function ol(e,t="streets"){let r=[...e].sort((o,n)=>(o.z??0)-(n.z??0));return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r.map(o=>{if(!o.visible&&o.visible!==void 0)return null;switch(o.kind){case "vector":return jsxRuntime.jsx(kI,{spec:o,mapType:t},o.id);case "geojson":return jsxRuntime.jsx(RI,{spec:o,mapType:t},o.id);case "customPins":return jsxRuntime.jsx(MI,{spec:o,mapType:t},o.id);case "raster":return jsxRuntime.jsx(EI,{spec:o},o.id);case "clusteredVector":return jsxRuntime.jsx(PI,{spec:o,mapType:t},o.id);default:return console.warn("[Layers] Unknown layer kind:",o.kind),null}})})}function kI({spec:e,mapType:t}){let{colorMode:r}=hr(),o=ot.useMemo(()=>{let l=E0(e.style,e.renderAs,r,t);if((e.hideChipWhen||e.revealChipOnHover)&&e.renderAs==="circle"){let d=l,c=u=>{let m=u;return e.revealChipOnHover&&(m=["case",["boolean",["feature-state","hover"],false],u,0]),e.hideChipWhen&&(m=["case",e.hideChipWhen,0,m]),m};return {...l,"circle-opacity":c(d["circle-opacity"]??1),"circle-stroke-opacity":c(d["circle-stroke-opacity"]??1)}}return l},[e.style,e.renderAs,e.hideChipWhen,e.revealChipOnHover,r,t]),n=ot.useMemo(()=>({visibility:e.visible===false?"none":"visible"}),[e.visible]),a={id:e.id,type:M0(e.renderAs),"source-layer":e.sourceLayer,paint:o,layout:n};if(e.filter!==void 0&&(a.filter=e.filter),e.minZoom!==void 0&&(a.minzoom=e.minZoom),e.maxZoom!==void 0&&(a.maxzoom=e.maxZoom),e.beforeId!==void 0&&(a.beforeId=e.beforeId),e.sourceId)return jsxRuntime.jsx(KI.Layer,{...a,source:e.sourceId});let i=R0(e.tileset),s={id:`${e.id}-source`,type:"vector"};return e.promoteId!==void 0&&(s.promoteId=e.promoteId),i?s.url=e.tileset:(s.tiles=[e.tileset],s.minzoom=0,s.maxzoom=22),jsxRuntime.jsx(KI.Source,{...s,children:jsxRuntime.jsx(KI.Layer,{...a})},`${e.tileset}:${e.renderAs}`)}function PI({spec:e}){let{colorMode:t,isDarkTheme:r}=hr(),o=1.25,n=9,a=3,i=n*1.4,s=.2,l=[0,5],d=ot.useMemo(()=>r?{clusters:e.clusterStyle?.color?go(e.clusterStyle.color):"#000000",shadow:e.clusterStyle?.shadowColor||"rgba(0, 0, 0, 0.5)",point:{fill:e.pointStyle?.color?go(e.pointStyle.color):"#000000",stroke:e.pointStyle?.borderColor||"#ffffff",shadow:"rgba(0, 0, 0, 0.5)"},text:{onCluster:"#ffffff"},selected:{fill:e.selectedStyle?.color?go(e.selectedStyle.color):"#444ae1"}}:{clusters:e.clusterStyle?.color?go(e.clusterStyle.color):"#000000",shadow:e.clusterStyle?.shadowColor||"rgba(0, 0, 0, 0.3)",point:{fill:e.pointStyle?.color?go(e.pointStyle.color):"#000000",stroke:e.pointStyle?.borderColor||"#ffffff",shadow:"rgba(0, 0, 0, 0.3)"},text:{onCluster:"#ffffff"},selected:{fill:e.selectedStyle?.color?go(e.selectedStyle.color):"#444ae1"}},[r,t,e.clusterStyle,e.pointStyle,e.selectedStyle]),c=10,u=30,m=Math.log(2),p=Math.log(2e3),g=(e.clusterStyle?.sizes?.length??0)>0,f=ot.useMemo(()=>g?e.clusterStyle.sizes.map(({threshold:S,radius:w})=>({threshold:S,radius:w,color:d.clusters})):[{threshold:30,radius:20,color:d.clusters},{threshold:200,radius:35,color:d.clusters},{threshold:1e3,radius:50,color:d.clusters}],[g,e.clusterStyle?.sizes,d.clusters]),b=S=>g?["step",["get","point_count"],S[0].radius,...S.flatMap(({threshold:w,radius:T})=>[w,T])]:["interpolate",["linear"],["ln",["max",2,["get","point_count"]]],m,c,p,u],h=S=>g?["step",["get","point_count"],S[0].radius*o,...S.flatMap(({threshold:w,radius:T})=>[w,T*o])]:["interpolate",["linear"],["ln",["max",2,["get","point_count"]]],m,c*o,p,u*o],v=R0(e.tileset),x={id:`${e.id}-source`,type:"vector"};v?x.url=e.tileset:(x.tiles=[e.tileset],x.minzoom=0,x.maxzoom=22);let C=ot.useMemo(()=>{let S=e.pointStyle?.radius??n,w=e.pointStyle?.borderWidth??a,T=e.selectedStyle?.radius??n*1.5,N=k=>{let R={...k};return e.minZoom!==void 0&&(R.minzoom=e.minZoom),e.maxZoom!==void 0&&(R.maxzoom=e.maxZoom),R};return [N({id:`${e.id}-cluster-shadows`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],paint:{"circle-radius":h(f),"circle-color":d.shadow,"circle-blur":.5,"circle-translate":[0,8]}}),N({id:`${e.id}-points-shadow`,type:"circle","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],paint:{"circle-radius":i,"circle-color":d.point.shadow,"circle-blur":s,"circle-translate":l}}),N({id:`${e.id}-clusters`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],paint:{"circle-radius":b(f),"circle-color":["step",["get","point_count"],f[0].color,...f.flatMap(({threshold:k,color:R})=>[k,R])]}}),N({id:`${e.id}-cluster-count`,type:"symbol","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],layout:{"text-field":["case",["has","point_count_abbreviated"],["get","point_count_abbreviated"],["to-string",["get","point_count"]]],"text-font":["DIN Offc Pro Medium","Arial Unicode MS Bold"],"text-size":14,"text-offset":[0,.1]},paint:{"text-color":d.text.onCluster}}),N({id:`${e.id}-points`,type:"circle","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],paint:{"circle-radius":S,"circle-color":d.point.fill,"circle-stroke-width":w,"circle-stroke-color":d.point.stroke}}),N({id:`${e.id}-selected-point`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","id"],e.selectedId||"selected"],paint:{"circle-radius":T,"circle-color":d.selected.fill,"circle-stroke-width":w,"circle-stroke-color":"#ffffff"}}),...e.pointStyle?.icon?[N({id:`${e.id}-points-icon`,type:"symbol","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],layout:{"icon-image":e.pointStyle.icon.name,"icon-size":k0(S,e.pointStyle.icon.size),"icon-allow-overlap":true,"icon-ignore-placement":true}}),N({id:`${e.id}-selected-point-icon`,type:"symbol","source-layer":e.sourceLayer,filter:["==",["get","id"],e.selectedId||"selected"],layout:{"icon-image":e.pointStyle.icon.name,"icon-size":k0(T,e.pointStyle.icon.size),"icon-allow-overlap":true,"icon-ignore-placement":true}})]:[]]},[e.id,e.sourceLayer,e.selectedId,e.minZoom,e.maxZoom,e.pointStyle,e.selectedStyle,f,d,n,a,i,s]);return jsxRuntime.jsx(KI.Source,{...x,children:C.map(S=>jsxRuntime.jsx(KI.Layer,{...S},S.id))},e.tileset)}function RI({spec:e,mapType:t}){let{colorMode:r}=hr(),o=ot.useMemo(()=>typeof e.data=="string"?null:e.data,[e.data]),n=ot.useMemo(()=>E0(e.style,e.renderAs,r,t,o),[e.style,e.renderAs,r,t,o]),a=ot.useMemo(()=>({visibility:e.visible===false?"none":"visible"}),[e.visible]),i=ot.useMemo(()=>(typeof e.data=="string",e.data),[e.data]),s={id:`${e.id}-source`,type:"geojson",data:i};e.cluster?.enabled&&(s.cluster=true,s.clusterRadius=e.cluster.radius??50,s.clusterMaxZoom=e.cluster.maxZoom??14);let l={id:e.id,type:M0(e.renderAs),paint:n,layout:a};return e.minZoom!==void 0&&(l.minzoom=e.minZoom),e.maxZoom!==void 0&&(l.maxzoom=e.maxZoom),jsxRuntime.jsx(KI.Source,{...s,children:jsxRuntime.jsx(KI.Layer,{...l})})}function MI({spec:e,mapType:t}){let r=e.pin;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.data.map((o,n)=>{let[a,i]=e.getPosition(o),s=e.pinProps?e.pinProps(o):{};return jsxRuntime.jsx(KI.Marker,{longitude:a,latitude:i,anchor:"bottom",children:jsxRuntime.jsx(r,{...s})},`${e.id}-${n}`)})})}function EI({spec:e}){let t=ot.useMemo(()=>{if(!e.style)return {};let n={};return e.style.opacity!==void 0&&(n["raster-opacity"]=e.style.opacity),e.style.brightnessMin!==void 0&&(n["raster-brightness-min"]=e.style.brightnessMin),e.style.brightnessMax!==void 0&&(n["raster-brightness-max"]=e.style.brightnessMax),e.style.contrast!==void 0&&(n["raster-contrast"]=e.style.contrast),e.style.saturation!==void 0&&(n["raster-saturation"]=e.style.saturation),e.style.hueRotate!==void 0&&(n["raster-hue-rotate"]=e.style.hueRotate),e.style.fadeDuration!==void 0&&(n["raster-fade-duration"]=e.style.fadeDuration),n},[e.style]),r={id:`${e.id}-source`,type:"raster",tiles:[e.tileset]};e.tileSize&&(r.tileSize=e.tileSize);let o={id:e.id,type:"raster",paint:t};return e.minZoom!==void 0&&(o.minzoom=e.minZoom),e.maxZoom!==void 0&&(o.maxzoom=e.maxZoom),jsxRuntime.jsx(KI.Source,{...r,children:jsxRuntime.jsx(KI.Layer,{...o})},e.tileset)}var Mo="#666";function k0(e,t){let r=t??64;return e*2/r}function M0(e){switch(e){case "line":return "line";case "fill":return "fill";case "circle":return "circle";case "symbol":return "symbol";case "heatmap":return "heatmap";default:return "circle"}}function E0(e,t,r,o,n){if(!e)return {};let a={};if(e.color){let i=go(e.color,r,n);switch(t){case "line":a["line-color"]=i;break;case "fill":a["fill-color"]=i;break;case "circle":a["circle-color"]=i;break}}if(e.width&&t==="line"&&(a["line-width"]=tl(e.width)),e.lineOffset!==void 0&&t==="line"&&(a["line-offset"]=typeof e.lineOffset=="object"&&"expression"in e.lineOffset?e.lineOffset.expression:tl(e.lineOffset)),e.dashArray!==void 0&&t==="line"&&(a["line-dasharray"]=e.dashArray),e.radius&&t==="circle"&&(a["circle-radius"]=tl(e.radius)),e.opacity!==void 0)switch(t){case "line":a["line-opacity"]=e.opacity;break;case "fill":a["fill-opacity"]=e.opacity;break;case "circle":a["circle-opacity"]=e.opacity;break}if(e.fillOpacity!==void 0&&t==="fill"&&(a["fill-opacity"]=e.fillOpacity),t==="fill"&&e.borderWidth&&(a["fill-outline-color"]=e.borderColor?go(e.borderColor,r,n):go(e.color||"#000",r,n)),t==="circle"&&e.borderWidth){a["circle-stroke-width"]=e.borderWidth;let i=e.borderColor?go(e.borderColor,r,n):_t(`map-${o}-border`,"#ffffff");a["circle-stroke-color"]=i;}return t==="heatmap"&&(e.weight!==void 0&&(a["heatmap-weight"]=typeof e.weight=="string"?["get",e.weight]:tl(e.weight)),e.intensity!==void 0&&(a["heatmap-intensity"]=e.intensity),e.radius!==void 0&&(a["heatmap-radius"]=tl(e.radius)),e.opacity!==void 0&&(a["heatmap-opacity"]=e.opacity)),a}function LI(e,t){let r=e.by,o=e.mapping,n=["match",["get",r]];for(let[i,s]of Object.entries(o))n.push(i),n.push(go(s));let a=e.fallback?go(e.fallback):Mo;return n.push(a),n}function DI(e,t){let r=Sg(t,e);r.length>20&&console.warn(`[Layers] Categorical auto-assignment found ${r.length} unique values for property "${e}". The 6-color palette will repeat ${Math.ceil(r.length/6)} times. Consider using explicit color mapping or reducing categories.`);let o=es(r),n=["match",["get",e]];for(let[a,i]of Object.entries(o))n.push(a),n.push(i);return n.push(Mo),n}function AI(e,t="viridis",r,o){let n=Lu(r,e),a;if(o&&o!=="auto")a=o;else {if(a=Du(n),n.length===0)return console.warn(`[Layers] No numeric values found for property "${e}"`),Mo;console.log(`[Layers] Auto-calculated sequential scale for "${e}": ${a.min} to ${a.max}`);}let i=ts(t),s=["interpolate",["linear"],["get",e]];return i.forEach((l,d)=>{let c=d/(i.length-1),u=a.min+c*(a.max-a.min);s.push(u,l);}),s}function II(e,t="redYellowBlue",r,o,n){let a=Lu(r,e),i=wg(a,o),s;if(n&&n!=="auto")s=n;else {if(s=Du(a),a.length===0)return console.warn(`[Layers] No numeric values found for property "${e}"`),Mo;console.log(`[Layers] Auto-calculated diverging scale for "${e}": ${s.min} \u2190 ${i} \u2192 ${s.max}`);}let l=rs(t),d=4,c=["interpolate",["linear"],["get",e]];for(let u=0;u<=d;u++){let m=u/d,p=s.min+m*(i-s.min);c.push(p,l[u]);}for(let u=d+1;u<l.length;u++){let m=(u-d)/(l.length-1-d),p=i+m*(s.max-i);c.push(p,l[u]);}return c}function P0(e){if(!(e.startsWith("var(")||e.startsWith("--")||e.startsWith("color-")))return e;let r=_t(e,Mo);return r.includes("var(")?Mo:r}function go(e,t,r){if(typeof e=="object"&&"expression"in e)return e.expression;if(typeof e=="string")return P0(e);if("token"in e)return _t(e.token,Mo);if("hex"in e)return P0(e.hex);if("by"in e){if("palette"in e){if(e.palette==="categorical")return r?DI(e.by,r):(console.warn("[Layers] Categorical auto-assignment requires GeoJSON data (not URL-based data)"),Mo);if(e.palette==="sequential")return r?AI(e.by,e.scheme,r,e.scale):(console.warn("[Layers] Sequential palette requires GeoJSON data (not URL-based data)"),Mo);if(e.palette==="diverging")return r?II(e.by,e.scheme,r,e.center,e.scale):(console.warn("[Layers] Diverging palette requires GeoJSON data (not URL-based data)"),Mo)}if("mapping"in e)return LI(e)}return Mo}function tl(e){return typeof e=="number"?e:"byZoom"in e?["interpolate",["linear"],["zoom"],...e.byZoom.flatMap(([t,r])=>[t,r])]:e}var Zd=null;function Qd(){return typeof window>"u"||process.env.NODE_ENV==="test"||typeof process<"u"&&process.env?.CHROMATIC||typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) })<"u"&&undefined?.CHROMATIC?Promise.resolve():(Zd||(Zd=import('mapbox-gl/dist/mapbox-gl.css').then(()=>{}).catch(t=>{console.error("Failed to load Mapbox CSS",t),Zd=null;})),Zd)}function _d(){return jsxRuntime.jsx("div",{className:"absolute inset-0 z-50 bg-background-surface/90 backdrop-blur-sm pointer-events-none","data-testid":"map-loading-overlay",children:jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-20",children:jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundImage:`
|
|
180
|
+
`,"aria-label":"Open search",children:[jsxRuntime.jsx(W,{name:"MagnifyingGlass",size:18,className:"flex-shrink-0 transition-colors text-text-secondary"}),jsxRuntime.jsx("span",{className:`flex-1 text-left text-sm transition-colors ${o==="elevated"?"text-text-secondary font-normal":"text-text-disabled"}`,children:e}),r&&jsxRuntime.jsxs("div",{className:"hidden sm:flex items-center gap-1 flex-shrink-0",children:[jsxRuntime.jsx("kbd",{className:`px-2 py-1 text-xs font-medium rounded transition-colors ${o==="elevated"?"bg-background-surface/80 border border-border-muted text-text-secondary":"bg-background-muted border border-border-muted"}`,children:a?"\u2318":"Ctrl"}),jsxRuntime.jsx("kbd",{className:`px-2 py-1 text-xs font-medium rounded transition-colors ${o==="elevated"?"bg-background-surface/80 border border-border-muted text-text-secondary":"bg-background-muted border border-border-muted"}`,children:"K"})]})]})}var gA={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none"},hA={sm:{1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12",none:"sm:grid-cols-none"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12",none:"md:grid-cols-none"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12",none:"lg:grid-cols-none"},xl:{1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12",none:"xl:grid-cols-none"},"2xl":{1:"2xl:grid-cols-1",2:"2xl:grid-cols-2",3:"2xl:grid-cols-3",4:"2xl:grid-cols-4",5:"2xl:grid-cols-5",6:"2xl:grid-cols-6",7:"2xl:grid-cols-7",8:"2xl:grid-cols-8",9:"2xl:grid-cols-9",10:"2xl:grid-cols-10",11:"2xl:grid-cols-11",12:"2xl:grid-cols-12",none:"2xl:grid-cols-none"}},bA={none:"gap-0",xs:"gap-x-2 gap-y-1",sm:"gap-x-3 gap-y-2",md:"gap-x-4 gap-y-3",lg:"gap-x-6 gap-y-4",xl:"gap-x-8 gap-y-6","2xl":"gap-x-12 gap-y-8"},xA={none:"gap-x-0",xs:"gap-x-2",sm:"gap-x-3",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},yA={none:"gap-y-0",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-3",lg:"gap-y-4",xl:"gap-y-6","2xl":"gap-y-8"},vA={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},CA={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},SA={row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},wA={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full",auto:"col-auto"},TA={sm:{1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",full:"sm:col-span-full",auto:"sm:col-auto"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",full:"md:col-span-full",auto:"md:col-auto"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",full:"lg:col-span-full",auto:"lg:col-auto"},xl:{1:"xl:col-span-1",2:"xl:col-span-2",3:"xl:col-span-3",4:"xl:col-span-4",5:"xl:col-span-5",6:"xl:col-span-6",7:"xl:col-span-7",8:"xl:col-span-8",9:"xl:col-span-9",10:"xl:col-span-10",11:"xl:col-span-11",12:"xl:col-span-12",full:"xl:col-span-full",auto:"xl:col-auto"},"2xl":{1:"2xl:col-span-1",2:"2xl:col-span-2",3:"2xl:col-span-3",4:"2xl:col-span-4",5:"2xl:col-span-5",6:"2xl:col-span-6",7:"2xl:col-span-7",8:"2xl:col-span-8",9:"2xl:col-span-9",10:"2xl:col-span-10",11:"2xl:col-span-11",12:"2xl:col-span-12",full:"2xl:col-span-full",auto:"2xl:col-auto"}};function MC(e,t,r){if(!e)return "";if(typeof e!="object")return t[e]||"";let o=[];return "base"in e&&e.base!==void 0&&o.push(t[e.base]),Object.entries(r).forEach(([n,a])=>{let i=e[n];i!==void 0&&o.push(a[i]);}),o.join(" ")}function yf({cols:e=1,gap:t="md",gapX:r,gapY:o,align:n="stretch",justify:a="start",flow:i="row",autoFit:s,autoFill:d,className:c,children:l}){let u=tailwindMerge.twMerge("grid",s||d?"":MC(e,gA,hA),!r&&!o&&bA[t],r&&xA[r],o&&yA[o],vA[n],CA[a],SA[i],c),m={};return s?m.gridTemplateColumns=`repeat(auto-fit, minmax(${s}, 1fr))`:d&&(m.gridTemplateColumns=`repeat(auto-fill, minmax(${d}, 1fr))`),jsxRuntime.jsx("div",{className:u,style:m,children:l})}function NA({span:e,className:t,children:r}){let o=tailwindMerge.twMerge(MC(e,wA,TA),t);return jsxRuntime.jsx("div",{className:o,children:r})}yf.Item=NA;function kA(e,t){return ot__namespace.default.isValidElement(e)?e:Fo({value:e,formatter:t,emptyClassName:"text-text-secondary",emptyText:"\u2014"})}function PA(e){if(e.thresholds&&e.value!==null&&e.value!==void 0){for(let t of e.thresholds)if(t.when(e.value))return t.tone}return e.tone}var RA={neutral:"text-text-primary",success:"text-feedback-success",warning:"text-feedback-warning",error:"text-feedback-error",info:"text-feedback-info"},MA=24,EA=20;function LA({item:e,dense:t,valueAlign:r,divider:o}){let n=PA(e),a=n?RA[n]:"",i=e.stackOnMobile,s=typeof e.value=="string"&&e.value.length>MA&&!e.formatter&&!ot__namespace.default.isValidElement(e.value),d=kA(e.value,e.formatter),c=s?ii(e.value,EA):null,l=typeof e.copyable=="function"?e.copyable(e.value):String(e.value),u=e.piiType&&e.piiEntity?{"data-pii-type":e.piiType,"data-pii-entity":e.piiEntity}:{},m=Object.keys(u).length>0,p=s?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(tr,{content:m?jsxRuntime.jsx("span",{...u,children:String(e.value)}):String(e.value),children:jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("@md:hidden",e.href?"hover:underline cursor-pointer":""),...u,children:c})}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("hidden @md:inline",e.href?"hover:underline cursor-pointer":""),...u,children:d})]}):jsxRuntime.jsx("span",{className:e.href?"hover:underline cursor-pointer":"",...u,children:d}),g=e.copyable?jsxRuntime.jsx(In,{value:l,size:"sm",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Copy"})}):null,f=e.copyable&&(e.copyIconPosition==="left"||!e.copyIconPosition),h=e.copyable&&e.copyIconPosition==="right",v=jsxRuntime.jsxs("dd",{className:tailwindMerge.twMerge(t?"text-sm":"text-base","font-medium",i?r==="start"?"text-left":"text-left @sm:text-right":r==="start"?"text-left":"text-right",a,e.disabled&&"opacity-50","overflow-hidden min-w-0"),children:[jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center gap-1 max-w-full",r==="start"?"justify-start":"justify-end"),children:[jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 min-w-0",children:[p,e.iconRight]}),h&&g]}),e.meta&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-xs text-text-secondary mt-0.5",r==="start"?"text-left":"text-right"),children:e.meta})]}),x=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("dt",{className:tailwindMerge.twMerge(t?"text-xs":"text-sm","text-text-secondary truncate","flex items-center gap-1",e.disabled&&"opacity-50"),children:[e.iconLeft,jsxRuntime.jsx("span",{title:typeof e.label=="string"?e.label:void 0,children:e.label}),e.tooltip&&jsxRuntime.jsx(W,{name:"Question",size:10,className:"text-text-secondary","aria-label":"More information"})]}),f&&jsxRuntime.jsx("div",{className:"flex h-5 items-center -mr-2 [&_button]:h-5 [&_button]:py-0 [&_button]:top-0",children:g}),e.href?jsxRuntime.jsx("a",{href:e.href,onClick:e.onAction,className:"block",children:v}):v]});return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("grid",i?"items-start @sm:items-center":"items-center",i?f?"grid-cols-1 gap-y-1 @sm:grid-cols-[1fr_auto_auto] @sm:gap-x-1 @sm:gap-y-0":t?"grid-cols-1 gap-y-1 @sm:grid-cols-[minmax(120px,1fr)_1fr] @sm:gap-x-2 @sm:gap-y-0":"grid-cols-1 gap-y-1 @sm:grid-cols-[minmax(120px,1fr)_1fr] @sm:gap-x-4 @sm:gap-y-0":f?"grid-cols-[1fr_auto_auto] gap-x-1":t?"grid-cols-[minmax(120px,1fr)_1fr] gap-x-2":"grid-cols-[minmax(120px,1fr)_1fr] gap-x-4",o,o&&DA(o,t)),children:x})}function DA(e,t){let r=e.includes("@md:");return t?r?"@md:pb-1":"pb-1":r?"@md:pb-2":"pb-2"}function AA(e,t,r){if(e!==t-1){if(r!=="two-column")return "border-b border-border-default";if(!(t%2===0&&e===t-2))return "@md:border-b @md:border-border-default"}}function Id({items:e,layout:t="one-column",dense:r=false,valueAlign:o="end",showDividers:n=false,skeleton:a=false,empty:i=false,error:s,className:d}){return a?jsxRuntime.jsx("div",{className:"@container",children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("grid",t==="two-column"?"@md:grid-cols-2 gap-x-6":"grid-cols-1",r?"gap-y-1":"gap-y-2",d),children:Array.from({length:e.length||4}).map((c,l)=>jsxRuntime.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-start gap-x-4",children:[jsxRuntime.jsx(q,{className:"h-4 w-24"}),jsxRuntime.jsx(q,{className:"h-5 w-16"})]},l))})}):s?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-sm text-feedback-error",d),children:s}):i||!e.length?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-sm text-text-secondary",d),children:"No data available"}):jsxRuntime.jsx("div",{className:"@container",children:jsxRuntime.jsx("dl",{className:tailwindMerge.twMerge("grid",t==="two-column"?"@md:grid-cols-2 gap-x-6":"grid-cols-1",r?"gap-y-1":"gap-y-2",d),children:e.map((c,l)=>jsxRuntime.jsx(LA,{item:c,dense:r,valueAlign:o,divider:n?AA(l,e.length,t):void 0},c.id))})})}function AC({node:e,renderNodeList:t}){let r=e.children||[],o=e.metadata&&Object.keys(e.metadata).length>0;return jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0 px-4 py-4",children:jsxRuntime.jsx("h3",{className:"font-semibold text-text-primary text-lg",children:e.name})}),o&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-y border-border-default px-4 py-4 bg-background-muted",children:jsxRuntime.jsx(Id,{items:Object.entries(e.metadata||{}).map(([n,a])=>({id:n,label:n,value:a??"\u2014"})),dense:true,layout:"one-column",valueAlign:"end",showDividers:true})}),r.length>0&&jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:t(r,false)})]})}var Pt={xs:{node:"px-2 py-2 text-xs",icon:"xs",bullet:24,spacing:{x:8,y:8}},sm:{node:"px-3 py-2.5 text-sm",icon:"xs",bullet:28,spacing:{x:12,y:10}},md:{node:"px-4 py-3 text-base",icon:"sm",bullet:32,spacing:{x:16,y:12}}};var vf=ot__namespace.createContext(null);function IC(){let e=ot__namespace.useContext(vf);if(!e)throw new Error("Hierarchy components must be used within HierarchyExplorer");return e}function BC({node:e,renderNode:t}){let{selectedId:r,selectNode:o,navigateToNode:n,variant:a,size:i,showBullets:s,rootNodeId:d,stickyRootNode:c,navigationStack:l,setRootNodeSticky:u,useSplitLayout:m}=IC(),p=ot__namespace.useRef(null),g=ot__namespace.useRef(null),f=r===e.id,h=e.disabled||false,b=!!(e.children&&e.children.length>0),v=!!(e.metadata&&Object.keys(e.metadata).length>0),x=b||v,C=d!==void 0&&e.id!==void 0&&d===e.id&&l.length===0;ot__namespace.useLayoutEffect(()=>{C&&c&&p.current&&g.current===null&&requestAnimationFrame(()=>{p.current&&(g.current=p.current.offsetTop);});},[C,c]),ot__namespace.useEffect(()=>{if(!C||!c||!p.current)return;let L=p.current.parentElement;for(;L;){let B=window.getComputedStyle(L).overflowY;if(B==="auto"||B==="scroll")break;L=L.parentElement;}if(!L)return;let E=()=>{if(!p.current||g.current===null)return;let B=L.getBoundingClientRect(),A=L.scrollTop,H=B.height,Y=p.current.offsetHeight,I=g.current-A,F=I+Y,O=I<0,U=F>H;O?u("top",e):U?u("bottom",e):u(null,null);};return L.addEventListener("scroll",E),E(),()=>{L.removeEventListener("scroll",E);}},[C,c,e,u]);let w=()=>{h||(m?o(e):x?n(e):o(e));},S=L=>{h||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),w());},T={isSelected:f,isDisabled:h,hasChildren:b,hasMetadata:v,level:0},N=tailwindMerge.twMerge("relative cursor-pointer group",h&&"opacity-50 cursor-not-allowed"),k=tailwindMerge.twMerge("absolute inset-0 transition-colors",C&&!f&&!h&&"group-hover:bg-background-hover",C&&f&&!h&&a==="subtle"&&"bg-background-selected group-hover:bg-background-hover",C&&f&&h&&a==="subtle"&&"bg-background-selected",C&&f&&!h&&a==="solid"&&"bg-action-brand group-hover:bg-action-brand-hover",C&&f&&h&&a==="solid"&&"bg-action-brand",!C&&a==="subtle"&&!f&&!h&&"group-hover:bg-background-hover",!C&&a==="subtle"&&f&&!h&&"bg-background-selected group-hover:bg-background-hover",!C&&a==="subtle"&&f&&h&&"bg-background-selected",!C&&a==="solid"&&!f&&!h&&"group-hover:bg-background-hover",!C&&a==="solid"&&f&&!h&&"bg-action-brand group-hover:bg-action-brand-hover",!C&&a==="solid"&&f&&h&&"bg-action-brand"),R=tailwindMerge.twMerge("relative flex items-center gap-2 text-text-primary hover:text-text-primary transition-colors",Pt[i].node,C&&!f&&"font-semibold",a==="subtle"&&f&&"text-text-link-default",a==="solid"&&f&&"text-[color:var(--color-action-brand-text)]");return jsxRuntime.jsxs("div",{ref:p,className:N,onClick:w,onKeyDown:S,role:"treeitem","aria-selected":f,"aria-disabled":h,tabIndex:0,"data-node-id":e.id,children:[jsxRuntime.jsx("div",{className:k}),jsxRuntime.jsxs("div",{className:R,children:[s&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative rounded-full flex items-center justify-center flex-shrink-0 z-20",C&&"bg-action-brand border-action-brand",!C&&"bg-background-muted border border-border-default"),style:{width:Pt[i].bullet,height:Pt[i].bullet},children:e.icon&&jsxRuntime.jsx(W,{name:e.icon,size:Pt[i].icon,weight:C?"fill":"regular",className:C?"text-[color:var(--color-action-brand-text)]":"text-text-primary"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:t?t(e,T):jsxRuntime.jsx("span",{className:"truncate",children:e.name})}),x&&!m&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:jsxRuntime.jsx(W,{name:"CaretRight",size:Pt[i].icon,className:"text-text-secondary"})})]})]})}function OC({items:e,showConnector:t=false,scrollContainerRef:r,showBullets:o,size:n,renderNode:a}){return jsxRuntime.jsxs("div",{className:"relative",ref:t&&r?r:void 0,children:[o&&e.length>0&&t&&jsxRuntime.jsx("div",{className:"absolute w-px bg-text-secondary z-10 pointer-events-none",style:{left:`${Pt[n].spacing.x+Pt[n].bullet/2}px`,top:`${Pt[n].spacing.y+Pt[n].bullet/2}px`,bottom:`${Pt[n].spacing.y+Pt[n].bullet/2}px`},"aria-hidden":"true"}),e.map(i=>jsxRuntime.jsx(BC,{node:i,renderNode:a},i.id))]})}function qs({children:e,mode:t="sync",presenceKey:r}){let o=r!==void 0&&ot__namespace.default.isValidElement(e)?ot__namespace.default.cloneElement(e,{key:r}):r!==void 0?jsxRuntime.jsx("div",{children:e},r):e;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:t,children:o})}function GC(){let[e,t]=ot.useState(()=>typeof window>"u"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return ot.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=n=>{t(n.matches);};return r.addEventListener("change",o),()=>{r.removeEventListener("change",o);}},[]),e}var HA={instant:0,fast:150,normal:250,slow:350,slower:500},Cf={xs:"4px",sm:"8px",md:"16px"};function GA(e){return e?typeof e=="string"&&e in Cf?Cf[e]:typeof e=="number"?`${e}px`:e:Cf.sm}function Zs({children:e,direction:t,distance:r="sm",duration:o="normal",delay:n=0,className:a}){let i=GC(),s=typeof o=="number"?o:HA[o],d=GA(r),c=p=>{switch(t){case "left":return {x:`-${p}`};case "right":return {x:p};case "up":return {y:`-${p}`};case "down":return {y:p}}},l=i?{opacity:0}:{opacity:0,...c(d)},u={opacity:1,x:0,y:0},m=i?{opacity:0}:{opacity:0,...c(d)};return jsxRuntime.jsx(framerMotion.motion.div,{className:a,initial:l,animate:u,exit:m,transition:{duration:i?0:s/1e3,delay:i?0:n/1e3,ease:[.4,0,.2,1]},children:e})}function Vd({navigationStack:e,onNavigateBack:t,size:r}){let o=e.length===1?"Back to main":`Back to ${e[e.length-2]?.name}`;return jsxRuntime.jsx("div",{className:"sticky top-0 z-10 bg-background-surface border-b border-border-default flex-shrink-0",children:jsxRuntime.jsxs("button",{type:"button",onClick:t,className:tailwindMerge.twMerge("w-full flex items-center gap-2 transition-colors text-left group",Pt[r].node),children:[jsxRuntime.jsx(W,{name:"CaretLeft",size:Pt[r].icon,className:"text-text-secondary group-hover:text-text-primary transition-colors"}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary group-hover:text-text-link-hover transition-colors",children:o})]})})}function Od({node:e,position:t,selectedId:r,variant:o,size:n,showBullets:a}){let i=r===e.id;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("absolute z-30 left-0 right-0 border-border-default transition-all duration-200 bg-background-surface",Pt[n].node,i?o==="subtle"?"text-text-link-default":"bg-action-brand text-[color:var(--color-action-brand-text)]":"font-semibold",t==="top"&&"top-0 border-b shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1)]",t==="bottom"&&"bottom-0 border-t shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]"),children:[i&&o==="subtle"&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-background-selected"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 cursor-pointer relative z-10",children:[a&&jsxRuntime.jsx("div",{className:"flex-shrink-0 rounded-full flex items-center justify-center bg-action-brand border-action-brand",style:{width:Pt[n].bullet,height:Pt[n].bullet},children:e.icon&&jsxRuntime.jsx(W,{name:e.icon,size:Pt[n].icon,weight:"fill",className:"text-[color:var(--color-action-brand-text)]"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:jsxRuntime.jsx("span",{className:"truncate",children:e.name})})]})]})}function UC({currentItems:e,currentParent:t,navigationStack:r,selectedId:o,variant:n,size:a,showBullets:i,slideDirection:s,viewKey:d,hasHeight:c,rootNodeStickyState:l,renderNodeList:u,renderDetailContent:m,onNavigateBack:p}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.length===0&&l.position&&l.node&&jsxRuntime.jsx(Od,{node:l.node,position:l.position,selectedId:o,variant:n,size:a,showBullets:i}),r.length>0&&jsxRuntime.jsx(Vd,{navigationStack:r,onNavigateBack:p,size:a}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative",c&&"overflow-auto h-full"),children:jsxRuntime.jsx(qs,{mode:"wait",presenceKey:d,children:r.length===0?u(e,true):jsxRuntime.jsx(Zs,{direction:s,distance:"100%",duration:"normal",children:m(t)})})})]})}function wf(e,t){for(let r of e){if(r.id===t)return r;if(r.children&&r.children.length>0){let o=wf(r.children,t);if(o)return o}}return null}function zd(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}function KC(e,t){if(process.env.NODE_ENV!=="development")return;let r=new Set,o=(n,a="root")=>{for(let i=0;i<n.length;i++){let s=n[i],d=`${a}[${i}]`;s.id?r.has(s.id)?console.warn(`[HierarchyExplorer] Duplicate node ID found: "${s.id}". Each node must have a unique ID.`):r.add(s.id):console.warn(`[HierarchyExplorer] Node at ${d} is missing an "id" field. Node name: "${s.name||"(unnamed)"}"`),s.children&&o(s.children,`${d}.children`);}};o(e),t&&!r.has(t)&&console.warn(`[HierarchyExplorer] Root node ID "${t}" not found in data. No node will be highlighted as root.`);}function XC({data:e,currentItems:t,navigationStack:r,selectedId:o,variant:n,size:a,showBullets:i,rootNodeStickyState:s,renderNodeList:d,renderDetailContent:c,renderEmptyState:l,onNavigateBack:u}){let m=o?wf(e,o):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex-1 min-w-0 border-r border-border-default flex flex-col relative",children:[r.length===0&&s.position&&s.node&&jsxRuntime.jsx(Od,{node:s.node,position:s.position,selectedId:o,variant:n,size:a,showBullets:i}),r.length>0&&jsxRuntime.jsx(Vd,{navigationStack:r,onNavigateBack:u,size:a}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:d(t,r.length===0)})]}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0 overflow-auto bg-background-body",children:jsxRuntime.jsx(qs,{mode:"wait",presenceKey:m?.id||"empty",children:m?jsxRuntime.jsx(Zs,{direction:"left",duration:"fast",children:c(m)}):l?l():jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary text-center",Pt[a].node,"py-8"),children:"Select an item to view details"})})})]})}function JC({data:e,renderNode:t,onNodeSelect:r,onNavigate:o,selectedId:n,rootNodeId:a,stickyRootNode:i=true,height:s,minHeight:d,maxHeight:c,variant:l="subtle",size:u="md",showBullets:m=true,layout:p="auto",splitBreakpoint:g=768,renderEmptyState:f,renderDetailView:h,className:b,"aria-label":v="Hierarchy explorer"}){let[x,C]=ot__namespace.useState(null),[w,S]=ot__namespace.useState([]),[T,N]=ot__namespace.useState("left"),[k,R]=ot__namespace.useState({position:null,node:null}),{ref:L,width:E}=bi(),B=ot__namespace.useMemo(()=>p==="split"?true:p==="single"?false:E>=g,[p,E,g]),A=n!==void 0?n:x;ot__namespace.useEffect(()=>{KC(e,a);},[e,a]);let H=w.length>0?w[w.length-1]:null,Y=H?H.children||[]:e,G=ot__namespace.useCallback(P=>{N("left"),S(X=>[...X,P]),o?.(P,[...w,P]);},[w,o]),I=ot__namespace.useCallback(()=>{N("right"),S(P=>{let X=P.slice(0,-1);return o?.(X.length>0?X[X.length-1]:null,X),X});},[o]),F=ot__namespace.useCallback(P=>{n===void 0&&C(P.id),r?.(P,[...w,P]);},[n,w,r]),O=ot__namespace.useCallback((P,X)=>{R({position:P,node:X});},[]),U=ot__namespace.useMemo(()=>({selectedId:A,selectNode:F,navigateToNode:G,navigateBack:I,rootNodeId:a,stickyRootNode:i,variant:l,size:u,showBullets:m,onNodeSelect:r,onNavigate:o,navigationStack:w,setRootNodeSticky:O,useSplitLayout:B}),[A,F,G,I,a,i,l,u,m,r,o,w,O,B]),K=ot__namespace.useRef(null);ot__namespace.useEffect(()=>{if(!a||!K.current||w.length>0||B)return;let P=K.current,X=setTimeout(()=>{let $=P.querySelector(`[data-node-id="${a}"]`);$&&$.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"});},100);return ()=>clearTimeout(X)},[a,w.length,B]);let z={height:zd(s),minHeight:zd(d),maxHeight:zd(c)},V=s!==void 0||c!==void 0,D=H?H.id:"root",y=ot__namespace.useCallback((P,X=false)=>jsxRuntime.jsx(OC,{items:P,showConnector:X,scrollContainerRef:X?K:null,showBullets:m,size:u,renderNode:t}),[m,u,t]),M=ot__namespace.useCallback(P=>P?h?h(P,y):jsxRuntime.jsx(AC,{node:P,renderNodeList:y}):null,[h,y]);return jsxRuntime.jsx(vf.Provider,{value:U,children:jsxRuntime.jsx("div",{ref:L,className:tailwindMerge.twMerge("select-none bg-background-surface rounded-lg border border-border-default relative",V&&"overflow-hidden",!V&&"h-full flex flex-col",B&&!V&&"flex-row",B&&V&&"flex",b),style:z,role:"tree","aria-label":v,children:B?jsxRuntime.jsx(XC,{data:e,currentItems:Y,navigationStack:w,selectedId:A,variant:l,size:u,showBullets:m,rootNodeStickyState:k,renderNodeList:y,renderDetailContent:M,renderEmptyState:f,onNavigateBack:I}):jsxRuntime.jsx(UC,{currentItems:Y,currentParent:H,navigationStack:w,selectedId:A,variant:l,size:u,showBullets:m,slideDirection:T,viewKey:D,hasHeight:V,rootNodeStickyState:k,renderNodeList:y,renderDetailContent:M,onNavigateBack:I})})})}function rI({isEntering:e,isExiting:t,className:r=""}){let o=["group","bg-background-surface","forced-colors:bg-[Canvas]","text-text-primary","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none","p-4","min-w-[260px]","max-w-[360px]"].filter(Boolean).join(" "),n=e?["animate-in","fade-in","zoom-in-95","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",a=t?["animate-out","fade-out","zoom-out-95","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [o,n,a,r].filter(Boolean).join(" ")}var jC=({children:e,delay:t=700,closeDelay:r=0,isOpen:o,defaultOpen:n,onOpenChange:a,isDisabled:i=false,...s})=>jsxRuntime.jsx(reactAriaComponents.TooltipTrigger,{delay:t,closeDelay:r,isOpen:o,defaultOpen:n,onOpenChange:a,isDisabled:i,...s,children:e}),qC=({children:e,className:t,showArrow:r=false,offset:o,...n})=>jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...n,offset:o??(r?12:8),className:reactAriaComponents.composeRenderProps(t,(i,s)=>rI({...s,className:i})),children:[r&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});qC.displayName="HoverCardContent";var oI=Object.assign(jC,{Root:jC,Content:qC});var iI={md:{fontFamily:"var(--font-family-brand)",fontSize:24,lineHeight:1,letterSpacing:"-0.02em"},lg:{fontFamily:"var(--font-family-brand)",fontSize:34,lineHeight:1.1}},sI={md:{fontSize:12},lg:{fontSize:16}},lI={fontSize:11};function cI(e,t){return Fo({value:e,formatter:t,emptyClassName:"text-text-secondary",emptyText:"\u2014"})}function dI(e,t="upIsGood"){if(e===0)return "text-text-secondary";let r=e>0;return t==="upIsGood"?r?"text-feedback-success-text":"text-feedback-error-text":r?"text-feedback-error-text":"text-feedback-success-text"}function uI({points:e,className:t,ariaLabel:r}){let i=e.map(p=>typeof p.y=="number"?p.y:0);if(i.length===0)return null;let s=Math.min(...i),c=Math.max(...i)-s,l=p=>c===0?20/2:18-(p-s)/c*16,u=60/Math.max(e.length-1,1),m=e.map((p,g)=>{let f=2+g*u,h=l(typeof p.y=="number"?p.y:0);return `${g===0?"M":"L"} ${f} ${h}`}).join(" ");return jsxRuntime.jsx("svg",{width:64,height:20,role:"img","aria-label":r,className:tailwindMerge.twMerge("overflow-visible",t),children:jsxRuntime.jsx("path",{d:m,fill:"none",strokeWidth:"1.5",className:"stroke-border-muted"})})}var ZC=100,Ka=30,QC=1.5,_C=4,pI=12;function mI(e,t){if(e.length<=t)return e;let r=(e.length-1)/(t-1),o=[];for(let n=0;n<t;n++)o.push(e[Math.round(n*r)]);return o}function fI(e){if(e.length<2)return e.length===1?`M ${e[0][0]} ${e[0][1]}`:"";let t=`M ${e[0][0]} ${e[0][1]}`;for(let r=0;r<e.length-1;r++){let o=e[r-1]??e[r],n=e[r],a=e[r+1],i=e[r+2]??a,s=n[0]+(a[0]-o[0])/6,d=n[1]+(a[1]-o[1])/6,c=a[0]-(i[0]-n[0])/6,l=a[1]-(i[1]-n[1])/6;t+=` C ${s} ${d} ${c} ${l} ${a[0]} ${a[1]}`;}return t}function gI({points:e,gradientId:t,tone:r,className:o}){if(!e||e.length<2)return null;let n=mI(e,pI),a=n.map(h=>typeof h.y=="number"?h.y:0),i=Math.min(...a),d=Math.max(...a)-i,c=h=>d===0?Ka/2:Ka-_C-(h-i)/d*(Ka-2*_C),l=(ZC-2*QC)/Math.max(n.length-1,1),u=n.map((h,b)=>[QC+b*l,c(typeof h.y=="number"?h.y:0)]),m=fI(u),p=u[u.length-1],g=u[0],f=`${m} L ${p[0]} ${Ka} L ${g[0]} ${Ka} Z`;return jsxRuntime.jsxs("svg",{width:"100%",height:Ka,viewBox:`0 0 ${ZC} ${Ka}`,preserveAspectRatio:"none",role:"img","aria-label":"Trend",className:tailwindMerge.twMerge("mt-2 block w-full",r,o),children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"0",y2:"1",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:.22}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:0})]})}),jsxRuntime.jsx("path",{d:f,fill:`url(#${t})`,stroke:"none"}),jsxRuntime.jsx("path",{d:m,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})}function $C({label:e,value:t,formatter:r,delta:o,deltaPeriodLabel:n,deltaIntent:a="upIsGood",trend:i,status:s,helpText:d,size:c="md",orientation:l="vertical",isLoading:u,empty:m,error:p,onClick:g,className:f,labelClassName:h,labelPosition:b="above",valueClassName:v,renderValue:x,renderDelta:C,renderTrend:w,unit:S,sub:T,dashed:N,sparkVariant:k="line",sparkTone:R,tileValueSize:L}){let E=ot.useId(),B=`${E}-label`,H={sm:{label:zt("labelSm"),value:zt("displaySm"),delta:zt("labelSm"),gap:"gap-1"},md:{label:zt("labelMd"),value:zt("displayMd"),delta:zt("bodySm"),gap:"gap-2"},lg:{label:zt("labelLg"),value:zt("displayLg"),delta:zt("bodyMd"),gap:"gap-3"}}[c],Y=K=>L?jsxRuntime.jsxs("span",{style:iI[L],className:N?"opacity-45":void 0,children:[K,S?jsxRuntime.jsxs("span",{className:"text-text-secondary",style:sI[L],children:[" ",S]}):null]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[K,S?jsxRuntime.jsxs("span",{className:"text-text-secondary",children:[" ",S]}):null]}),G=u?jsxRuntime.jsx(q,{className:"h-7 w-20"}):m?jsxRuntime.jsx("span",{className:"text-text-secondary",children:"\u2014"}):p?jsxRuntime.jsx("span",{className:zt("bodySm","text-feedback-error"),children:typeof p=="string"?p:"Error"}):N?Y("\u2014"):x?x(t):Y(L?t:cI(t,r)),I=C?C(o):o!==void 0&&!u&&!m&&!p&&!N?jsxRuntime.jsxs("div",{className:Yr(H.delta,dI(o,a),"flex items-center gap-1"),children:[o>0&&jsxRuntime.jsx(W,{name:"ArrowUp",size:12}),o<0&&jsxRuntime.jsx(W,{name:"ArrowDown",size:12}),o===0&&jsxRuntime.jsx(W,{name:"Minus",size:12}),jsxRuntime.jsxs("span",{children:[o>0?"+":"",Math.abs(o).toFixed(1),"%"]}),n&&jsxRuntime.jsxs("span",{className:"text-text-secondary",children:["\xB7 ",n]})]}):u&&o!==void 0?jsxRuntime.jsx(q,{className:"h-4 w-24"}):null,F=w?w(i):i&&i.length>0&&!u&&!p&&!N?k==="area"?jsxRuntime.jsx(gI,{points:i,gradientId:E,tone:R,className:m?"opacity-30":""}):jsxRuntime.jsx(uI,{points:i,ariaLabel:`${e} trend`,className:m?"opacity-30":""}):u&&i!==void 0?jsxRuntime.jsx(q,{className:"h-5 w-16"}):null,O=T&&!u&&!p?jsxRuntime.jsx("div",{className:"text-text-secondary",style:lI,children:T}):null,U=jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{id:B,className:tailwindMerge.twMerge(Yr(H.label,"text-text-secondary truncate"),h),children:u?jsxRuntime.jsx(q,{className:"h-4 w-24"}):e}),d&&!u&&jsxRuntime.jsx(W,{name:"Question",size:12,className:"text-text-secondary cursor-help","aria-label":"Help"})]});return jsxRuntime.jsxs("section",{className:tailwindMerge.twMerge("flex min-w-0",l==="horizontal"?`items-center ${H.gap}`:`flex-col ${H.gap}`,g&&"cursor-pointer hover:bg-background-muted rounded-lg px-3 py-2 -mx-3 -my-2 transition-colors",f),"aria-labelledby":B,onClick:g,children:[b==="above"&&U,jsxRuntime.jsxs("div",{className:"flex items-baseline gap-2",children:[jsxRuntime.jsx("output",{className:tailwindMerge.twMerge(L?void 0:H.value,p?"text-feedback-error":"text-text-primary",v),"aria-label":`Value: ${t}`,children:G}),s&&!u&&!p&&jsxRuntime.jsx(kt,{variant:s.tone||"neutral",size:"sm",children:s.value})]}),b==="below"&&U,O,(I||F)&&jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[I,F]})]})}var e0={xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-6",xl:"gap-8"},t0={start:"items-start",center:"items-center",stretch:"items-stretch"};function r0(e){if(typeof e=="number")return `grid-cols-${e}`;let t=[];return e.base!==void 0&&t.push(`grid-cols-${e.base}`),e.sm!==void 0&&t.push(`sm:grid-cols-${e.sm}`),e.md!==void 0&&t.push(`md:grid-cols-${e.md}`),e.lg!==void 0&&t.push(`lg:grid-cols-${e.lg}`),e.xl!==void 0&&t.push(`xl:grid-cols-${e.xl}`),e["2xl"]!==void 0&&t.push(`2xl:grid-cols-${e["2xl"]}`),t.join(" ")}function kf({children:e,cols:t={base:1,sm:2,md:3,lg:4},gap:r="md",align:o="stretch",equalizeHeights:n=true,header:a,isLoading:i,scrollOnMobile:s=false,scrollItemMinWidth:d="140px",className:c}){let l=i?ot__namespace.default.Children.map(e,p=>ot__namespace.default.isValidElement(p)&&p.type&&typeof p.type!="string"&&"displayName"in p.type?ot__namespace.default.cloneElement(p,{isLoading:true}):p):e,u=s?ot__namespace.default.Children.map(l,p=>jsxRuntime.jsx("div",{className:"shrink-0",style:{minWidth:d},children:p})):l,m=s?tailwindMerge.twMerge("flex overflow-x-auto pb-2 -mb-2",e0[r],"sm:grid sm:overflow-visible sm:pb-0 sm:-mb-0",r0({...typeof t=="object"?t:{base:t},base:void 0}),t0[o],n&&"sm:auto-rows-fr"):tailwindMerge.twMerge("grid",r0(t),e0[r],t0[o],n&&"auto-rows-fr","w-full");return jsxRuntime.jsxs("section",{className:tailwindMerge.twMerge("w-full",c),"aria-label":"Key metrics",children:[a&&jsxRuntime.jsx("div",{className:"mb-4",children:a}),jsxRuntime.jsx("div",{className:m,children:s?u:l})]})}kf.displayName="KpiGroup";function a0({items:e,renderItem:t,selectedId:r,onSelect:o,onHoverChange:n,isLoading:a=false,loadingState:i,error:s=null,renderLoadingSkeleton:d,loadingSkeletonCount:c=5,emptyMessage:l="No results found.",variant:u="relaxed",showDividers:m=true,onLoadMore:p,hasMore:g=false,enableVirtualization:f,estimatedItemSize:h=60,loadingIndicator:b,"aria-label":v,className:x="",style:C}){let[w,S]=ot.useState(null),T=ot.useRef(null),N=ot.useRef(new Map),{scrollRef:k,loadMoreRef:R,virtualizer:L,virtualItems:E,isLoadingMore:B,computedLoadingState:A}=En({items:e,onLoadMore:p,hasMore:g,isLoading:a,loadingState:i,enableVirtualization:f,estimatedItemSize:h,overscan:5}),H=k??T,Y=ot.useCallback((y,M)=>{o?.(y,M);},[o]),G=ot.useCallback((y,M)=>{S(y),n?.(y,M);},[n]),I=ot.useCallback((y,M)=>{let P=y?.id;return typeof P=="string"&&P?P:`item-${M}`},[]),F=ot.useCallback(y=>{if(!H.current||e.length===0)return;let M=document.activeElement,P=e.findIndex((re,_)=>{let he=I(re,_),me=N.current.get(he);return me&&(me===M||me.contains(M))}),X=P;switch(y.key){case "ArrowDown":y.preventDefault(),X=P===-1?0:Math.min(P+1,e.length-1);break;case "ArrowUp":y.preventDefault(),X=P===-1?0:Math.max(P-1,0);break;case "Home":y.preventDefault(),X=0;break;case "End":y.preventDefault(),X=e.length-1;break;default:return}let $=I(e[X],X);N.current.get($)?.focus();},[e,I,H]),O=["flex flex-col","bg-background-surface","focus:outline-none focus:ring-2 focus:ring-border-focus focus:ring-offset-2"],U={dense:"gap-0",relaxed:"gap-0"},K=m?"divide-y divide-border-muted":"",z=[...O,U[u],K,x].filter(Boolean).join(" ");if(A==="loading"||a&&e.length===0){let y=d?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:c}).map((M,P)=>jsxRuntime.jsx("div",{children:d()},`skeleton-${P}`))}):jsxRuntime.jsx(Ih,{count:c,className:"space-y-0",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[jsxRuntime.jsx(q,{width:16,height:16,variant:"circle"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-2",children:[jsxRuntime.jsx(q,{width:"75%",height:16}),jsxRuntime.jsx(q,{width:"50%",height:14})]}),jsxRuntime.jsx(q,{width:60,height:20})]})});return jsxRuntime.jsx("div",{ref:H,className:z,style:C,role:"listbox","aria-label":v,"aria-busy":"true","aria-live":"polite",children:y})}if(s)return jsxRuntime.jsx("div",{ref:H,className:z,style:C,role:"listbox","aria-label":v,"aria-live":"polite",children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:s})});if(e.length===0)return jsxRuntime.jsx("div",{ref:H,className:z,style:C,role:"listbox","aria-label":v,"aria-live":"polite",children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:l})});let D=L?E?.map(y=>({virtualItem:y,item:e[y.index],index:y.index}))||[]:e.map((y,M)=>({item:y,index:M,virtualItem:null}));return jsxRuntime.jsxs("div",{ref:H,className:z,style:{...C,...p&&{overflow:"auto",height:C?.height||"600px"}},role:"listbox","aria-label":v,"aria-live":"polite",onKeyDown:F,tabIndex:0,children:[L&&jsxRuntime.jsxs("div",{style:{height:`${L.getTotalSize()}px`,width:"100%",position:"relative"},children:[D.map(({virtualItem:y,item:M,index:P})=>{if(!y)return null;let X=I(M,P),$=r===X,oe=w===X,re={id:X,role:"option","aria-selected":$,"aria-current":$?"page":void 0,tabIndex:$||r==null&&P===0?0:-1,onClick:_=>Y(_,M),onMouseEnter:_=>G(_,M),onMouseLeave:_=>G(null),onFocus:_=>G(_,M),onBlur:_=>G(null),ref:_=>{_?N.current.set(X,_):N.current.delete(X);}};return jsxRuntime.jsx("div",{"data-index":y.index,ref:L.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${y.start}px)`},children:t({item:M,index:P,isSelected:$,isHovered:oe,rowProps:re})},X)}),p&&g&&jsxRuntime.jsx("div",{ref:R,style:{position:"absolute",top:`${L.getTotalSize()}px`,left:0,width:"100%",height:1,pointerEvents:"none"}}),B&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${L.getTotalSize()}px`,left:0,width:"100%"},children:b||jsxRuntime.jsx(so,{state:"loading-more"})})]}),!L&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[D.map(({item:y,index:M})=>{let P=I(y,M),X=r===P,$=w===P,oe={id:P,role:"option","aria-selected":X,"aria-current":X?"page":void 0,tabIndex:X||r==null&&M===0?0:-1,onClick:re=>Y(re,y),onMouseEnter:re=>G(re,y),onMouseLeave:re=>G(null),onFocus:re=>G(re,y),onBlur:re=>G(null),ref:re=>{re?N.current.set(P,re):N.current.delete(P);}};return jsxRuntime.jsx("div",{children:t({item:y,index:M,isSelected:X,isHovered:$,rowProps:oe})},P)}),p&&g&&jsxRuntime.jsx("div",{ref:R,style:{height:1}}),B&&(b||jsxRuntime.jsx(so,{state:"loading-more"}))]})]})}function s0({id:e,title:t,subtitle:r,meta:o,leading:n,trailing:a,isSelected:i=false,isHovered:s=false,disabled:d=false,href:c,size:l="md",onClick:u,onMouseEnter:m,onMouseLeave:p,className:g="",style:f,piiTitleType:h,piiSubtitleType:b,piiEntity:v}){let x=()=>{!d&&u&&u(e);},C=()=>{!d&&m&&m(e);},w=()=>{!d&&p&&p(e);},T={sm:{container:"px-3 py-2 gap-2",title:"text-sm leading-tight",subtitle:"text-xs leading-tight",meta:"text-xs leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},md:{container:"px-4 py-3 gap-3",title:"text-base leading-tight",subtitle:"text-sm leading-tight",meta:"text-sm leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},lg:{container:"px-4 py-4 gap-3",title:"text-lg leading-tight",subtitle:"text-base leading-tight",meta:"text-sm leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},xl:{container:"px-5 py-5 gap-4",title:"text-xl leading-tight",subtitle:"text-base leading-tight",meta:"text-base leading-tight",subtitleSpacing:"mt-1.5",metaSpacing:"mt-1.5"}}[l],N=["flex items-center w-full text-left transition-all duration-200 ease-in-out",T.container,"border-l-2 border-l-transparent","rounded-sm",pt()],k=[s&&!i&&"bg-background-hover",i&&"bg-action-default/5 border-l-action-default shadow-sm",d&&"opacity-50 cursor-not-allowed",!d&&!i&&"hover:bg-background-hover"],R=[...N,...k,g].filter(Boolean).join(" "),L=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n&&jsxRuntime.jsx("div",{className:"flex-shrink-0 flex items-center justify-center",children:n}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:jsxRuntime.jsx("div",{className:"flex items-start justify-between gap-2",children:jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:`text-text-primary font-medium truncate ${T.title}`,title:typeof t=="string"?t:void 0,"data-pii-type":h&&v?h:void 0,"data-pii-entity":h&&v?v:void 0,children:t}),r&&jsxRuntime.jsx("div",{className:`text-text-secondary truncate ${T.subtitle} ${T.subtitleSpacing}`,title:typeof r=="string"?r:void 0,"data-pii-type":b&&v?b:void 0,"data-pii-entity":b&&v?v:void 0,children:r}),o&&jsxRuntime.jsx("div",{className:`text-text-secondary ${T.meta} ${T.metaSpacing}`,children:o})]})})}),a&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a})]});return c?jsxRuntime.jsx("a",{href:c,className:R,style:f,onMouseEnter:C,onMouseLeave:w,"aria-selected":i,"aria-current":i?"page":void 0,tabIndex:d?-1:0,children:L}):jsxRuntime.jsx("button",{type:"button",className:R,style:f,onClick:x,onMouseEnter:C,onMouseLeave:w,disabled:d,"aria-selected":i,tabIndex:d?-1:0,children:L})}function l0({header:e,children:t,footer:r,width:o="md",tone:n="neutral",elevation:a="sm",showDivider:i=true,"aria-label":s,"aria-labelledby":d,className:c="",style:l}){let u={sm:"w-64",md:"w-80",lg:"w-96",xl:"w-[28rem]","2xl":"w-[32rem]",auto:"w-auto"},m={neutral:"bg-background-surface",subtle:"bg-background-subtle",brand:"bg-background-brand"},p={none:"",sm:"shadow-sm",md:"shadow-md"},g=tailwindMerge.twMerge("flex flex-col h-full",u[o],m[n],p[a],i&&"border-r border-border-muted",c);return jsxRuntime.jsxs("div",{className:g,style:l,role:"complementary","aria-label":s,"aria-labelledby":d,children:[e&&jsxRuntime.jsx("div",{className:"flex-shrink-0 sticky top-0 z-10 bg-inherit border-b border-border-muted",children:e}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:t}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t border-border-muted bg-inherit",children:r})]})}function wI({children:e,...t}){return jsxRuntime.jsx(reactAriaComponents.ListBox,{...t,className:Fe(t.className,"outline-0"),children:e})}function Ud(){try{if(typeof process<"u"){let e=process.env.MAPBOX_ACCESS_TOKEN;if(e)return e}}catch{}try{if(typeof process<"u"){let e=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN;if(e)return e}}catch{}try{let e=undefined.VITE_MAPBOX_ACCESS_TOKEN;if(e)return e}catch{}}function Kd(e,t){let[r,o]=ot.useState(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.error(`Error reading localStorage key "${e}":`,i),t}});ot.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(r));}catch(i){console.error(`Error writing to localStorage key "${e}":`,i);}},[e,r]);let n=ot.useCallback(i=>{try{o(s=>i instanceof Function?i(s):i);}catch(s){console.error(`Error setting value for localStorage key "${e}":`,s);}},[e]),a=ot.useCallback(()=>{try{typeof window<"u"&&window.localStorage.removeItem(e),o(t);}catch(i){console.error(`Error removing localStorage key "${e}":`,i);}},[e,t]);return [r,n,a]}var Rf=[{type:"navigation",position:"bottom-right",showCompass:true,showGeolocate:true,showResetZoom:true}];function d0(e="top-right"){switch(e){case "top-left":return "absolute top-4 left-4 z-10";case "top-right":return "absolute top-4 right-4 z-10";case "bottom-left":return "absolute bottom-4 left-4 z-10";case "bottom-right":return "absolute bottom-4 right-4 z-10";default:return "absolute top-4 right-4 z-10"}}var RI="h-12 w-12 md:h-10 md:w-10 p-0 bg-background-surface hover:bg-background-hover shadow-lg border border-border";function u0(e){return tailwindMerge.twMerge(RI,e)}var p0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAACXCAYAAAAYn8l5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABtCSURBVHgB7Z2Jkty0GoV7hlz2HcIeSPGkPCmELRC2sO8kN5+L03XmR7IlW3LbSZ+qrp7pdtuydPTvki9u3Lhx/7ASLi4uDvfv973cvXv3Dn/++efh2rVrx2vyAo899tjwThu8Hfo+1d5SLLkv2vXzzz8fnnvuucPff/99eFhw7bAi/vnnn8Pl5eWVz3IDOHewGKgnnnjiCoEgHH///vvvh8cff3z4nrbE63lb+LvFQHMe2jR2P7p2bNMe4f24Grk02LkOjCQTCfmNE3KKdLo5l1jCk08+efjtt98OP/300yAlUgRTW3RdiLk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gdmvMEgw11AkbR5N6amqujqnCAkYbl8gHs4wFShtxY9vm9oFqdwubeWeqKTznacNJ/CbCpqTjwKTE7jMs3QHaRzUkyvCvTdKQmzuGyfyqHEKJkOQJmBwazq0Nl88X77Dk09SoHR6YU2RxMUSDP8fw6bxvv7AnkLrBK/29eNS5r4U+x8EA6nBlsj0ETm9gjUO7p5DqPDOkOIptbQgNDeH/unQWDz/ZdA0zBOJ/f1sXQI6QyPqxtnMII3/NEh9kJGEBI+zqmyVwLXglLm+u3o6W6t8oiBZc1pwpF3Z/Tq1kX1oKDcglalt0Mq5G+Zzha8dbY+rvA7Erz2Jf1VQQm9t9zxzU0kLlDp2uX9IwZVZxyO2G19y9ieD165lH9Fosk8DI5sufSSLSZBQSF3maHFuDcVGsLHjqrgKZLUX5JqjGehdg3ULYhq7fAkpy5voaGxxtFgmygtNBJMSfalN4Ghq0DVGhNw+TbZUJBvl6KdlImJXLsphrcJtyi/rBx7bNiPF3drqCfiaI7S/0yAfzPgdNJKqQ+lwh1XfSmYClPT+R2b/03chQhh/fQH7Dav+EOO2oojEn8WdyuYzZbw6+e/WpX6eGYK0xR3BJhumCL/0lYS1EWShiFKXp4HOjIdwcvzNzjuNg4uobmh3lmZNljg+RHIokP7iJ+//S9/0JF4UWgALQSUifcPn+AvCxKcp8u7vR5XAiSC3WYDByQWZ1myzFUtOgbu577+f5ZPq/B5Pf+nAAAAAElFTkSuQmCC";function Yd(e){return e.selection?.mode==="single"}function $n(e){let t=[],r=o=>{o.layerId&&t.push(o.layerId);for(let n of o.children??[])r(n);};return r(e),t}function Mf(e,t){let r=$n(e);if(r.length===0)return "unchecked";let o=0;for(let n of r)t(n)&&o++;return o===0?"unchecked":Yd(e)||o===r.length?"checked":"indeterminate"}var Ya=(e,t)=>Object.fromEntries(e.map(r=>[r,t]));function b0(e,t){let r=$n(e);if(!(Mf(e,t)!=="checked"))return Ya(r,false);if(Yd(e)){let n=e.children?.[0],a=n?$n(n):[];return {...Ya(r,false),...Ya(a,true)}}return Ya(r,true)}function x0(e,t,r){let o=e.children?.find(s=>s.id===t);if(!o)return {};let n=$n(e),a=$n(o);return a.length>0&&a.every(r)?e.selection?.mode==="single"&&e.selection.allowNone?Ya(a,false):{}:{...Ya(n,false),...Ya(a,true)}}function Ef(e,t){for(let r of e){if(r.id===t)return r;let o=Ef(r.children??[],t);if(o)return o}}function Lf(e,t){for(let r of e){if(r.children?.some(n=>n.id===t))return r;let o=Lf(r.children??[],t);if(o)return o}}function y0(e){let t=new Set,r=new Set,o=new Set,n=(i,s)=>{i&&(s.has(i)?o.add(i):s.add(i));},a=i=>{n(i.id,t),n(i.layerId,r);for(let s of i.children??[])a(s);};for(let i of e)a(i);return [...o]}function S0(e){return e.map(t=>({id:t.id,label:t.label,...t.children?.length?{children:S0(t.children)}:{}}))}function w0(e){let t=e.length;for(let r of e)r.children?.length&&(t=Math.max(t,w0(r.children)));return t}function v0({type:e,color:t,icon:r}){if(r)return jsxRuntime.jsx("span",{"aria-hidden":"true",className:"flex h-5 w-5 shrink-0 items-center justify-center text-text-primary",children:r});let o=t?{backgroundColor:t}:void 0;switch(e){case "line":return jsxRuntime.jsx("span",{className:"inline-block h-0.5 w-4 flex-shrink-0 rounded-full",style:o});case "polygon":return jsxRuntime.jsx("span",{className:"inline-block h-2.5 w-3.5 flex-shrink-0 rounded-sm border border-border",style:o});case "pin":return jsxRuntime.jsx("span",{className:"inline-block h-2.5 w-2.5 flex-shrink-0 rotate-45 rounded-full rounded-bl-none border border-border",style:o});default:return null}}function MI({isSelected:e,onPress:t,label:r}){return jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":e,"aria-label":r,onClick:t,className:`grid h-4 w-4 flex-shrink-0 cursor-pointer place-items-center rounded-full border-2 bg-transparent p-0 ${e?"border-action-primary":"border-border-default"}`,children:e?jsxRuntime.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-action-primary"}):null})}function C0(){return jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-text-secondary",children:jsxRuntime.jsx("path",{d:"M4.5 2.5 8 6l-3.5 3.5"})})}var EI=41,LI=44,DI=132,AI=360;function T0({tree:e,layers:t,onVisibilityChange:r}){let o=new Map(t.map(s=>[s.id,s])),n=s=>{let d=o.get(s);return !!d&&d.visible!==false};if(process.env.NODE_ENV!=="production"){let s=y0(e);s.length>0&&console.warn(`[LayersPanel] Duplicate id(s) in \`layerTree\`: ${s.join(", ")}. Row lookups and pane keys resolve to the first match, so the later entry is unreachable. Node ids must be unique among node ids, and layer ids unique among layer ids.`);let d=e.flatMap($n).filter(c=>!o.has(c));d.length>0&&console.warn(`[LayersPanel] \`layerTree\` references layer id(s) not present in \`layers\`: ${d.join(", ")}. Those rows render as hidden and cannot be turned on.`);}let a=S0(e),i=Math.min(AI,Math.max(DI,w0(e)*EI+LI));return jsxRuntime.jsx("div",{className:"overflow-hidden",style:{height:i},"data-layers-panel":"",children:jsxRuntime.jsx(gi,{items:a,ariaLabel:"Map layers",animated:false,width:null,sticky:false,theme:{background:"transparent",borderColor:"transparent"},className:"h-full w-full",renderRow:({item:s,hasChildren:d,select:c})=>{let l=Ef(e,s.id);if(!l)return null;if(l.content!==void 0)return d?jsxRuntime.jsxs("div",{className:"space-y-2",children:[l.content,jsxRuntime.jsxs("button",{type:"button",onClick:c,className:"flex w-full cursor-pointer items-center justify-between gap-2 border-0 bg-transparent py-2.5 text-left text-sm text-text-primary","aria-label":`Open ${l.label}`,children:[jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:l.label}),jsxRuntime.jsx(C0,{})]})]}):l.content;let u=Mf(l,n),p=(l.layerId?o.get(l.layerId):void 0)?.legend,g=$n(l),f=g.filter(n).length,h=d&&u==="indeterminate"?`${f} of ${g.length} on`:null,b=Lf(e,l.id),v=!!b&&Yd(b),x=S=>{Object.keys(S).length>0&&r?.(S);},C=v?jsxRuntime.jsx(MI,{isSelected:u!=="unchecked",onPress:()=>x(x0(b,l.id,n)),label:l.label}):jsxRuntime.jsx(wo,{isSelected:u==="checked",isIndeterminate:u==="indeterminate",onChange:()=>x(b0(l,n)),"aria-label":l.label}),w=jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[jsxRuntime.jsx("span",{className:`truncate text-sm ${u==="unchecked"?"text-text-secondary":"text-text-primary"}`,children:l.label}),h?jsxRuntime.jsx("span",{className:"text-[10px] text-text-secondary",children:h}):null]});return jsxRuntime.jsxs("div",{className:"edges-layers-panel__row flex cursor-default items-center gap-2 py-2.5",children:[C,d?jsxRuntime.jsxs("button",{type:"button",onClick:c,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left","aria-label":`Open ${l.label}`,children:[p?jsxRuntime.jsx(v0,{type:p.swatch,color:p.color,icon:p.icon}):null,w,jsxRuntime.jsx(C0,{})]}):jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[p?jsxRuntime.jsx(v0,{type:p.swatch,color:p.color,icon:p.icon}):null,w]})]})}})})}function ea({position:e="top-right",className:t,style:r,children:o}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(d0(e),t),style:r,children:o})}function no({icon:e,iconSize:t=24,onPress:r,isDisabled:o=false,className:n,iconClassName:a="text-text-primary",variant:i="secondary",isActive:s=false,ariaLabel:d,iconWeight:c="regular",...l}){let u=tailwindMerge.twMerge(u0(),s&&"bg-action-brand hover:bg-action-brand-hover border-action-brand",n),m=tailwindMerge.twMerge(a,s&&"text-text-inverse");return jsxRuntime.jsx(te,{...l,className:u,onPress:r,variant:i,size:"sm",isDisabled:o,"aria-label":d,"aria-pressed":s||void 0,type:"button",children:jsxRuntime.jsx(W,{name:e,size:t,className:m,weight:c})})}var zI=e=>[{id:"streets",name:"Streets",description:"Standard street map with traffic data",preview:e?g0:h0},{id:"satellite",name:"Satellite",description:"Aerial imagery with street labels",preview:f0},{id:"neutral",name:"Neutral",description:"Clean design with light/dark variants",preview:e?p0:m0}];function HI({type:e,color:t,icon:r}){if(r)return jsxRuntime.jsx("span",{"aria-hidden":"true",className:"flex h-5 w-5 shrink-0 items-center justify-center text-text-primary",children:r});let o="inline-block",n=t?{backgroundColor:t}:{};switch(e){case "dot":return null;case "line":return jsxRuntime.jsx("span",{className:`${o} h-0.5 w-6 rounded-full`,style:n});case "polygon":return jsxRuntime.jsx("span",{className:`${o} h-3 w-4 rounded-sm border border-border`,style:n});case "pin":return jsxRuntime.jsx("span",{className:`${o} h-3 w-3 rounded-full rounded-bl-none border border-border transform rotate-45`,style:n});default:return null}}function P0({position:e="bottom-left",className:t,style:r,currentMapType:o="streets",onMapTypeChange:n,layers:a=[],onLayerToggle:i,onClearAll:s,onLayerVariantChange:d,layerTree:c,onVisibilityChange:l}){let{isDarkTheme:u}=hr(),{isMobile:m}=Rr(),[p,g]=ot.useState(false),f=zI(u),h=x=>{n?.(x);},b=a.filter(x=>x.legend),v=jsxRuntime.jsxs("div",{className:m?"space-y-6 pb-6":"space-y-6",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary mb-3",children:"Map type"}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-3",children:f.map(x=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>h(x.id),className:"flex flex-col items-center space-y-2 p-3 rounded-lg text-center hover:bg-background-muted transition-colors border border-transparent "+(o===x.id?"bg-background-muted border-border":"hover:border-border"),children:[jsxRuntime.jsx("div",{className:"w-12 h-12 rounded-lg overflow-hidden bg-background-surface "+(o===x.id?"border-2 border-action-default":"border border-border-default"),children:jsxRuntime.jsx("img",{src:x.preview,alt:`${x.name} map preview`,className:"w-full h-full object-cover"})}),jsxRuntime.jsx("div",{className:"text-sm "+(o===x.id?"font-bold text-text-primary":"font-normal text-text-secondary"),children:x.name})]},x.id))})]}),c?.length?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3",children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Map details"}),s&&jsxRuntime.jsx("button",{type:"button",onClick:s,className:"text-xs text-text-secondary hover:text-text-primary transition-colors",children:"Clear all"})]}),jsxRuntime.jsx(T0,{tree:c,layers:a,onVisibilityChange:l})]}):null,!c?.length&&b.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3",children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Map details"}),s&&jsxRuntime.jsx("button",{type:"button",onClick:s,className:"text-xs text-text-secondary hover:text-text-primary transition-colors",children:"Clear all"})]}),jsxRuntime.jsx("div",{className:"space-y-2",children:b.map(x=>{let C=x.visible!==false,w=x.legend?.variants;return jsxRuntime.jsxs("div",{className:w?"space-y-1.5":void 0,children:[jsxRuntime.jsx(wo,{isSelected:C,onChange:()=>i?.(x.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[x.legend&&jsxRuntime.jsx(HI,{type:x.legend.swatch,color:x.legend.color,icon:x.legend.icon}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:x.legend?.label})]})}),w&&jsxRuntime.jsx("div",{className:"pl-6",children:jsxRuntime.jsx(an,{"aria-label":`${x.legend?.label} mode`,size:"sm",isDisabled:!C,items:w.options.map(S=>({...S,value:S.id})),renderItem:S=>S.label,selectedKey:w.selectedId,onSelectionChange:S=>d?.(x.id,String(S))})})]},x.id)})})]})]});return jsxRuntime.jsx(ea,{position:e,className:t,style:r,children:jsxRuntime.jsx("div",{className:"relative",children:m?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(no,{icon:"Stack",ariaLabel:"Map layers and settings",onPress:()=>g(true)}),jsxRuntime.jsx(Lt,{isOpen:p,onClose:()=>g(false),title:"Map layers",animationVariant:"scale",children:v})]}):jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsx(no,{icon:"Stack",ariaLabel:"Map layers and settings"}),jsxRuntime.jsx(Et,{placement:"top start",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{"aria-label":"Map layers and settings",className:"p-4 min-w-80 bg-background-surface border border-border rounded-lg shadow-xl focus:outline-none focus:ring-0",children:v})})]})})})}function M0({position:e="top-right",className:t,style:r,onToggle:o,isActive:n=false}){return jsxRuntime.jsx(ea,{position:e,className:tailwindMerge.twMerge("md:hidden",t),style:r,children:jsxRuntime.jsx(no,{icon:"ListDashes",onPress:o,isActive:n,ariaLabel:n?"Hide list view":"Show list view"})})}var KI={sm:"gap-2",md:"gap-4",lg:"gap-6"};function Xd({position:e="top-right",className:t,style:r,children:o,orientation:n="vertical",spacing:a="md"}){return jsxRuntime.jsx(ea,{position:e,style:r,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex",n==="vertical"?"flex-col":"flex-row",KI[a],t),children:o})})}function L0({mapRef:e,position:t="bottom-right",className:r,style:o,showCompass:n=true,showGeolocate:a=true,showResetZoom:i=true,onResetZoom:s,onCompassClick:d,onGeolocateClick:c}){let[l,u]=ot.useState(false),m=ot.useRef(true);ot.useEffect(()=>()=>{m.current=false;},[]);let p=()=>{d?d():e.current&&e.current.easeTo({bearing:0,duration:500});},g=async()=>{if(!l)if(c)c();else {if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}if(navigator.permissions?.query)try{if((await navigator.permissions.query({name:"geolocation"})).state==="denied"){console.warn("Geolocation permission was previously denied. Please enable location services in your browser settings.");return}}catch{}u(true),navigator.geolocation.getCurrentPosition(x=>{if(!m.current)return;let{latitude:C,longitude:w}=x.coords;e.current&&e.current.flyTo({center:[w,C],zoom:15,duration:2e3}),u(false);},x=>{if(m.current){switch(console.warn("Geolocation error:",{code:x.code,message:x.message,PERMISSION_DENIED:x.PERMISSION_DENIED,POSITION_UNAVAILABLE:x.POSITION_UNAVAILABLE,TIMEOUT:x.TIMEOUT}),x.code){case x.PERMISSION_DENIED:console.warn("Location access denied. Please enable location services in your browser settings.");break;case x.POSITION_UNAVAILABLE:console.warn("Location information unavailable.");break;case x.TIMEOUT:console.warn("Location request timed out.");break;default:console.warn("Error getting location:",x.message);break}u(false);}},{enableHighAccuracy:true,timeout:1e4,maximumAge:0});}};if(!n&&!a&&!i)return null;let f=!i&&n,h=!i&&!n&&a,b=!a&&n;return jsxRuntime.jsxs(Xd,{position:t,className:r,style:o,spacing:"sm",children:[i&&jsxRuntime.jsx(no,{icon:"ArrowsOut",onPress:s,ariaLabel:"Reset zoom to show all points",className:tailwindMerge.twMerge(!(!a&&!n&&i)&&"rounded-b-none",n&&"border-b-0")}),n&&jsxRuntime.jsx(no,{icon:"Compass",onPress:p,ariaLabel:"Reset map orientation",className:tailwindMerge.twMerge(!f&&"rounded-t-none border-t-0",!b&&"rounded-b-none border-b-0")}),a&&jsxRuntime.jsx(no,{icon:l?"Spinner":"NavigationArrow",onPress:g,isDisabled:l,ariaLabel:"Go to my location",iconClassName:tailwindMerge.twMerge("text-text-primary",l&&"animate-spin"),className:tailwindMerge.twMerge(!h&&"rounded-t-none border-t-0",!h&&n&&"lg:rounded-t lg:border-t")})]})}function F0({position:e="top-left",className:t,style:r,onSearch:o,placeholder:n="Search places...",showSearchInput:a=true}){let[i,s]=ot.useState(false),[d,c]=ot.useState(""),l=()=>{a?s(!i):o&&o("");},u=p=>{p.preventDefault(),o&&d.trim()&&(o(d.trim()),s(false));},m=p=>{p.key==="Escape"&&s(false);};return jsxRuntime.jsx(ea,{position:e,className:t,style:r,children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(no,{icon:"MagnifyingGlass",onPress:l,ariaLabel:"Search"}),i&&a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute top-12 left-0 min-w-64","bg-background-surface border border-border rounded-lg shadow-xl p-3"),children:jsxRuntime.jsx("form",{onSubmit:u,children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("input",{type:"text",value:d,onChange:p=>c(p.target.value),onKeyDown:m,placeholder:n,className:tailwindMerge.twMerge("flex-1 px-3 py-2 text-sm rounded border","bg-background border-border text-text-primary placeholder:text-text-secondary","focus:outline-none focus:ring-2 focus:ring-action-brand"),autoFocus:true}),jsxRuntime.jsx(te,{type:"submit",variant:"primary",size:"sm",className:"px-3 py-2",children:"Search"})]})})})]})})}var qI={navigation:"bottom-right",layers:"bottom-left",search:"top-left",list:"top-right",custom:"top-right"};function Af(e){return e.position??qI[e.type]}function B0(e,t,r){let o=Af(e),n=e.id??`${e.type}-${t}`;switch(e.type){case "navigation":{let i=e.showResetZoom!==false&&r.showResetButton;return jsxRuntime.jsx(L0,{mapRef:r.mapRef,position:o,showCompass:e.showCompass,showGeolocate:e.showGeolocate,showResetZoom:i,onResetZoom:e.onResetZoom,onCompassClick:e.onCompassClick,onGeolocateClick:e.onGeolocateClick,style:e.style,className:e.className},n)}case "layers":return jsxRuntime.jsx(P0,{position:o,currentMapType:e.currentMapType,onMapTypeChange:e.onMapTypeChange,layers:e.layers??r.layers,onLayerToggle:e.onLayerToggle,onClearAll:e.onClearAll,onLayerVariantChange:e.onLayerVariantChange,layerTree:e.layerTree,onVisibilityChange:e.onVisibilityChange,style:e.style,className:e.className},n);case "search":return jsxRuntime.jsx(F0,{position:o,onSearch:e.onSearch,placeholder:e.placeholder,showSearchInput:e.showSearchInput,style:e.style,className:e.className},n);case "list":return jsxRuntime.jsx(M0,{position:o,onToggle:e.onToggle,isActive:e.isActive,style:e.style,className:e.className},n);case "custom":return jsxRuntime.jsx("div",{children:e.render(r)},n);default:return null}}function If(e,t){let r=e.reduce((n,a,i)=>{let s=Af(a);return n[s]||(n[s]=[]),n[s].push({control:a,index:i}),n},{}),o=[];for(let[n,a]of Object.entries(r)){if(a.length===1){o.push(B0(a[0].control,a[0].index,t));continue}let i={position:"static",top:"auto",right:"auto",bottom:"auto",left:"auto"};o.push(jsxRuntime.jsx(Xd,{position:n,spacing:"sm",children:a.map(({control:s,index:d})=>{let c={...s,style:{...s.style,...i}};return B0(c,d,t)})},`group-${n}`));}return o}var Ff={vector:e=>({kind:"vector",...e}),geojson:e=>({kind:"geojson",...e}),customPins:e=>({kind:"customPins",...e}),raster:e=>({kind:"raster",...e}),clusteredVector:e=>({kind:"clusteredVector",...e})};function Bf(e){return e.kind==="vector"}function Vf(e){return e.kind==="geojson"}function Of(e){return e.kind==="customPins"}function zf(e){return e.kind==="raster"}var tl=(e,t)=>({id:e,label:t,kind:"sequential",hint:"Low \u2192 High",stops:()=>rs(e),toColorSpec:({by:r,scale:o="auto"})=>({by:r,palette:"sequential",scheme:e,scale:o})}),Hf=(e,t)=>({id:e,label:t,kind:"diverging",hint:"Low \u2192 Mid \u2192 High",stops:()=>os(e),toColorSpec:({by:r,scale:o="auto",center:n=0})=>({by:r,palette:"diverging",scheme:e,center:n,scale:o})}),jd=[tl("viridis","Viridis"),tl("magma","Magma"),tl("cerulean","Cerulean"),tl("forest","Forest"),tl("rose","Rose")],qd=[Hf("redYellowBlue","Red \u2192 Blue"),Hf("orangeYellowSeafoam","Orange \u2192 Seafoam"),Hf("redBlue","Red / Blue")],Zd={id:"categorical",label:"Categorical",kind:"categorical",hint:"Distinct per value",stops:()=>on(),toColorSpec:({by:e})=>({by:e,palette:"categorical",scale:"auto"})},rl=[...jd,...qd,Zd];function Gf(e){return rl.find(t=>t.id===e)}function Wf(e){return rl.filter(t=>t.kind===e)}function z0(e){return !e.includes("{z}")}function al(e,t="streets"){let r=[...e].sort((o,n)=>(o.z??0)-(n.z??0));return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r.map(o=>{if(!o.visible&&o.visible!==void 0)return null;switch(o.kind){case "vector":return jsxRuntime.jsx(QI,{spec:o,mapType:t},o.id);case "geojson":return jsxRuntime.jsx($I,{spec:o,mapType:t},o.id);case "customPins":return jsxRuntime.jsx(e4,{spec:o,mapType:t},o.id);case "raster":return jsxRuntime.jsx(t4,{spec:o},o.id);case "clusteredVector":return jsxRuntime.jsx(_I,{spec:o,mapType:t},o.id);default:return console.warn("[Layers] Unknown layer kind:",o.kind),null}})})}function QI({spec:e,mapType:t}){let{colorMode:r}=hr(),o=ot.useMemo(()=>{let d=G0(e.style,e.renderAs,r,t);if((e.hideChipWhen||e.revealChipOnHover)&&e.renderAs==="circle"){let c=d,l=u=>{let m=u;return e.revealChipOnHover&&(m=["case",["boolean",["feature-state","hover"],false],u,0]),e.hideChipWhen&&(m=["case",e.hideChipWhen,0,m]),m};return {...d,"circle-opacity":l(c["circle-opacity"]??1),"circle-stroke-opacity":l(c["circle-stroke-opacity"]??1)}}return d},[e.style,e.renderAs,e.hideChipWhen,e.revealChipOnHover,r,t]),n=ot.useMemo(()=>({visibility:e.visible===false?"none":"visible"}),[e.visible]),a={id:e.id,type:H0(e.renderAs),"source-layer":e.sourceLayer,paint:o,layout:n};if(e.filter!==void 0&&(a.filter=e.filter),e.minZoom!==void 0&&(a.minzoom=e.minZoom),e.maxZoom!==void 0&&(a.maxzoom=e.maxZoom),e.beforeId!==void 0&&(a.beforeId=e.beforeId),e.sourceId)return jsxRuntime.jsx(g4.Layer,{...a,source:e.sourceId});let i=z0(e.tileset),s={id:`${e.id}-source`,type:"vector"};return e.promoteId!==void 0&&(s.promoteId=e.promoteId),i?s.url=e.tileset:(s.tiles=[e.tileset],s.minzoom=0,s.maxzoom=22),jsxRuntime.jsx(g4.Source,{...s,children:jsxRuntime.jsx(g4.Layer,{...a})},`${e.tileset}:${e.renderAs}`)}function _I({spec:e}){let{colorMode:t,isDarkTheme:r}=hr(),o=1.25,n=9,a=3,i=n*1.4,s=.2,d=[0,5],c=ot.useMemo(()=>r?{clusters:e.clusterStyle?.color?ho(e.clusterStyle.color):"#000000",shadow:e.clusterStyle?.shadowColor||"rgba(0, 0, 0, 0.5)",point:{fill:e.pointStyle?.color?ho(e.pointStyle.color):"#000000",stroke:e.pointStyle?.borderColor||"#ffffff",shadow:"rgba(0, 0, 0, 0.5)"},text:{onCluster:"#ffffff"},selected:{fill:e.selectedStyle?.color?ho(e.selectedStyle.color):"#444ae1"}}:{clusters:e.clusterStyle?.color?ho(e.clusterStyle.color):"#000000",shadow:e.clusterStyle?.shadowColor||"rgba(0, 0, 0, 0.3)",point:{fill:e.pointStyle?.color?ho(e.pointStyle.color):"#000000",stroke:e.pointStyle?.borderColor||"#ffffff",shadow:"rgba(0, 0, 0, 0.3)"},text:{onCluster:"#ffffff"},selected:{fill:e.selectedStyle?.color?ho(e.selectedStyle.color):"#444ae1"}},[r,t,e.clusterStyle,e.pointStyle,e.selectedStyle]),l=10,u=30,m=Math.log(2),p=Math.log(2e3),g=(e.clusterStyle?.sizes?.length??0)>0,f=ot.useMemo(()=>g?e.clusterStyle.sizes.map(({threshold:w,radius:S})=>({threshold:w,radius:S,color:c.clusters})):[{threshold:30,radius:20,color:c.clusters},{threshold:200,radius:35,color:c.clusters},{threshold:1e3,radius:50,color:c.clusters}],[g,e.clusterStyle?.sizes,c.clusters]),h=w=>g?["step",["get","point_count"],w[0].radius,...w.flatMap(({threshold:S,radius:T})=>[S,T])]:["interpolate",["linear"],["ln",["max",2,["get","point_count"]]],m,l,p,u],b=w=>g?["step",["get","point_count"],w[0].radius*o,...w.flatMap(({threshold:S,radius:T})=>[S,T*o])]:["interpolate",["linear"],["ln",["max",2,["get","point_count"]]],m,l*o,p,u*o],v=z0(e.tileset),x={id:`${e.id}-source`,type:"vector"};v?x.url=e.tileset:(x.tiles=[e.tileset],x.minzoom=0,x.maxzoom=22);let C=ot.useMemo(()=>{let w=e.pointStyle?.radius??n,S=e.pointStyle?.borderWidth??a,T=e.selectedStyle?.radius??n*1.5,N=k=>{let R={...k};return e.minZoom!==void 0&&(R.minzoom=e.minZoom),e.maxZoom!==void 0&&(R.maxzoom=e.maxZoom),R};return [N({id:`${e.id}-cluster-shadows`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],paint:{"circle-radius":b(f),"circle-color":c.shadow,"circle-blur":.5,"circle-translate":[0,8]}}),N({id:`${e.id}-points-shadow`,type:"circle","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],paint:{"circle-radius":i,"circle-color":c.point.shadow,"circle-blur":s,"circle-translate":d}}),N({id:`${e.id}-clusters`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],paint:{"circle-radius":h(f),"circle-color":["step",["get","point_count"],f[0].color,...f.flatMap(({threshold:k,color:R})=>[k,R])]}}),N({id:`${e.id}-cluster-count`,type:"symbol","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],layout:{"text-field":["case",["has","point_count_abbreviated"],["get","point_count_abbreviated"],["to-string",["get","point_count"]]],"text-font":["DIN Offc Pro Medium","Arial Unicode MS Bold"],"text-size":14,"text-offset":[0,.1]},paint:{"text-color":c.text.onCluster}}),N({id:`${e.id}-points`,type:"circle","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],paint:{"circle-radius":w,"circle-color":c.point.fill,"circle-stroke-width":S,"circle-stroke-color":c.point.stroke}}),N({id:`${e.id}-selected-point`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","id"],e.selectedId||"selected"],paint:{"circle-radius":T,"circle-color":c.selected.fill,"circle-stroke-width":S,"circle-stroke-color":"#ffffff"}}),...e.pointStyle?.icon?[N({id:`${e.id}-points-icon`,type:"symbol","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],layout:{"icon-image":e.pointStyle.icon.name,"icon-size":V0(w,e.pointStyle.icon.size),"icon-allow-overlap":true,"icon-ignore-placement":true}}),N({id:`${e.id}-selected-point-icon`,type:"symbol","source-layer":e.sourceLayer,filter:["==",["get","id"],e.selectedId||"selected"],layout:{"icon-image":e.pointStyle.icon.name,"icon-size":V0(T,e.pointStyle.icon.size),"icon-allow-overlap":true,"icon-ignore-placement":true}})]:[]]},[e.id,e.sourceLayer,e.selectedId,e.minZoom,e.maxZoom,e.pointStyle,e.selectedStyle,f,c,n,a,i,s]);return jsxRuntime.jsx(g4.Source,{...x,children:C.map(w=>jsxRuntime.jsx(g4.Layer,{...w},w.id))},e.tileset)}function $I({spec:e,mapType:t}){let{colorMode:r}=hr(),o=ot.useMemo(()=>typeof e.data=="string"?null:e.data,[e.data]),n=ot.useMemo(()=>G0(e.style,e.renderAs,r,t,o),[e.style,e.renderAs,r,t,o]),a=ot.useMemo(()=>({visibility:e.visible===false?"none":"visible"}),[e.visible]),i=ot.useMemo(()=>(typeof e.data=="string",e.data),[e.data]),s={id:`${e.id}-source`,type:"geojson",data:i};e.cluster?.enabled&&(s.cluster=true,s.clusterRadius=e.cluster.radius??50,s.clusterMaxZoom=e.cluster.maxZoom??14);let d={id:e.id,type:H0(e.renderAs),paint:n,layout:a};return e.minZoom!==void 0&&(d.minzoom=e.minZoom),e.maxZoom!==void 0&&(d.maxzoom=e.maxZoom),jsxRuntime.jsx(g4.Source,{...s,children:jsxRuntime.jsx(g4.Layer,{...d})})}function e4({spec:e,mapType:t}){let r=e.pin;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.data.map((o,n)=>{let[a,i]=e.getPosition(o),s=e.pinProps?e.pinProps(o):{};return jsxRuntime.jsx(g4.Marker,{longitude:a,latitude:i,anchor:"bottom",children:jsxRuntime.jsx(r,{...s})},`${e.id}-${n}`)})})}function t4({spec:e}){let t=ot.useMemo(()=>{if(!e.style)return {};let n={};return e.style.opacity!==void 0&&(n["raster-opacity"]=e.style.opacity),e.style.brightnessMin!==void 0&&(n["raster-brightness-min"]=e.style.brightnessMin),e.style.brightnessMax!==void 0&&(n["raster-brightness-max"]=e.style.brightnessMax),e.style.contrast!==void 0&&(n["raster-contrast"]=e.style.contrast),e.style.saturation!==void 0&&(n["raster-saturation"]=e.style.saturation),e.style.hueRotate!==void 0&&(n["raster-hue-rotate"]=e.style.hueRotate),e.style.fadeDuration!==void 0&&(n["raster-fade-duration"]=e.style.fadeDuration),n},[e.style]),r={id:`${e.id}-source`,type:"raster",tiles:[e.tileset]};e.tileSize&&(r.tileSize=e.tileSize);let o={id:e.id,type:"raster",paint:t};return e.minZoom!==void 0&&(o.minzoom=e.minZoom),e.maxZoom!==void 0&&(o.maxzoom=e.maxZoom),jsxRuntime.jsx(g4.Source,{...r,children:jsxRuntime.jsx(g4.Layer,{...o})},e.tileset)}var Eo="#666";function V0(e,t){let r=t??64;return e*2/r}function H0(e){switch(e){case "line":return "line";case "fill":return "fill";case "circle":return "circle";case "symbol":return "symbol";case "heatmap":return "heatmap";default:return "circle"}}function G0(e,t,r,o,n){if(!e)return {};let a={};if(e.color){let i=ho(e.color,r,n);switch(t){case "line":a["line-color"]=i;break;case "fill":a["fill-color"]=i;break;case "circle":a["circle-color"]=i;break}}if(e.width&&t==="line"&&(a["line-width"]=ol(e.width)),e.lineOffset!==void 0&&t==="line"&&(a["line-offset"]=typeof e.lineOffset=="object"&&"expression"in e.lineOffset?e.lineOffset.expression:ol(e.lineOffset)),e.dashArray!==void 0&&t==="line"&&(a["line-dasharray"]=e.dashArray),e.radius&&t==="circle"&&(a["circle-radius"]=ol(e.radius)),e.opacity!==void 0)switch(t){case "line":a["line-opacity"]=e.opacity;break;case "fill":a["fill-opacity"]=e.opacity;break;case "circle":a["circle-opacity"]=e.opacity;break}if(e.fillOpacity!==void 0&&t==="fill"&&(a["fill-opacity"]=e.fillOpacity),t==="fill"&&e.borderWidth&&(a["fill-outline-color"]=e.borderColor?ho(e.borderColor,r,n):ho(e.color||"#000",r,n)),t==="circle"&&e.borderWidth){a["circle-stroke-width"]=e.borderWidth;let i=e.borderColor?ho(e.borderColor,r,n):_t(`map-${o}-border`,"#ffffff");a["circle-stroke-color"]=i;}return t==="heatmap"&&(e.weight!==void 0&&(a["heatmap-weight"]=typeof e.weight=="string"?["get",e.weight]:ol(e.weight)),e.intensity!==void 0&&(a["heatmap-intensity"]=e.intensity),e.radius!==void 0&&(a["heatmap-radius"]=ol(e.radius)),e.opacity!==void 0&&(a["heatmap-opacity"]=e.opacity)),a}function r4(e,t){let r=e.by,o=e.mapping,n=["match",["get",r]];for(let[i,s]of Object.entries(o))n.push(i),n.push(ho(s));let a=e.fallback?ho(e.fallback):Eo;return n.push(a),n}function o4(e,t){let r=Fg(t,e);r.length>20&&console.warn(`[Layers] Categorical auto-assignment found ${r.length} unique values for property "${e}". The 6-color palette will repeat ${Math.ceil(r.length/6)} times. Consider using explicit color mapping or reducing categories.`);let o=ts(r),n=["match",["get",e]];for(let[a,i]of Object.entries(o))n.push(a),n.push(i);return n.push(Eo),n}function n4(e,t="viridis",r,o){let n=Fu(r,e),a;if(o&&o!=="auto")a=o;else {if(a=Bu(n),n.length===0)return console.warn(`[Layers] No numeric values found for property "${e}"`),Eo;console.log(`[Layers] Auto-calculated sequential scale for "${e}": ${a.min} to ${a.max}`);}let i=rs(t),s=["interpolate",["linear"],["get",e]];return i.forEach((d,c)=>{let l=c/(i.length-1),u=a.min+l*(a.max-a.min);s.push(u,d);}),s}function a4(e,t="redYellowBlue",r,o,n){let a=Fu(r,e),i=Bg(a,o),s;if(n&&n!=="auto")s=n;else {if(s=Bu(a),a.length===0)return console.warn(`[Layers] No numeric values found for property "${e}"`),Eo;console.log(`[Layers] Auto-calculated diverging scale for "${e}": ${s.min} \u2190 ${i} \u2192 ${s.max}`);}let d=os(t),c=4,l=["interpolate",["linear"],["get",e]];for(let u=0;u<=c;u++){let m=u/c,p=s.min+m*(i-s.min);l.push(p,d[u]);}for(let u=c+1;u<d.length;u++){let m=(u-c)/(d.length-1-c),p=i+m*(s.max-i);l.push(p,d[u]);}return l}function O0(e){if(!(e.startsWith("var(")||e.startsWith("--")||e.startsWith("color-")))return e;let r=_t(e,Eo);return r.includes("var(")?Eo:r}function ho(e,t,r){if(typeof e=="object"&&"expression"in e)return e.expression;if(typeof e=="string")return O0(e);if("token"in e)return _t(e.token,Eo);if("hex"in e)return O0(e.hex);if("by"in e){if("palette"in e){if(e.palette==="categorical")return r?o4(e.by,r):(console.warn("[Layers] Categorical auto-assignment requires GeoJSON data (not URL-based data)"),Eo);if(e.palette==="sequential")return r?n4(e.by,e.scheme,r,e.scale):(console.warn("[Layers] Sequential palette requires GeoJSON data (not URL-based data)"),Eo);if(e.palette==="diverging")return r?a4(e.by,e.scheme,r,e.center,e.scale):(console.warn("[Layers] Diverging palette requires GeoJSON data (not URL-based data)"),Eo)}if("mapping"in e)return r4(e)}return Eo}function ol(e){return typeof e=="number"?e:"byZoom"in e?["interpolate",["linear"],["zoom"],...e.byZoom.flatMap(([t,r])=>[t,r])]:e}var _d=null;function $d(){return typeof window>"u"||process.env.NODE_ENV==="test"||typeof process<"u"&&process.env?.CHROMATIC||typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) })<"u"&&undefined?.CHROMATIC?Promise.resolve():(_d||(_d=import('mapbox-gl/dist/mapbox-gl.css').then(()=>{}).catch(t=>{console.error("Failed to load Mapbox CSS",t),_d=null;})),_d)}function eu(){return jsxRuntime.jsx("div",{className:"absolute inset-0 z-50 bg-background-surface/90 backdrop-blur-sm pointer-events-none","data-testid":"map-loading-overlay",children:jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-20",children:jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundImage:`
|
|
181
181
|
linear-gradient(rgba(0,0,0,0.15) 1px, transparent 1px),
|
|
182
182
|
linear-gradient(90deg, rgba(0,0,0,0.15) 1px, transparent 1px)
|
|
183
|
-
`,backgroundSize:"30px 30px"}})})})}var A0="color-mix(in srgb, var(--color-map-neutral-border) 8%, transparent)",FI={backgroundImage:`linear-gradient(to right, ${A0} 1px, transparent 1px), linear-gradient(to bottom, ${A0} 1px, transparent 1px)`,backgroundSize:"24px 24px"},BI={backgroundColor:"color-mix(in srgb, var(--color-map-marker-default) 12%, transparent)"};function $d({style:e,className:t,message:r="Map requires Mapbox token",schematic:o=false,showMarker:n=true}){return o?jsxRuntime.jsxs("div",{style:e,"data-testid":"map-schematic",className:tailwindMerge.twMerge("relative overflow-hidden border border-map-neutral-border bg-background-muted",t),children:[jsxRuntime.jsx("div",{"aria-hidden":"true",className:"absolute inset-0",style:FI}),n?jsxRuntime.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:"absolute h-24 w-24 rounded-full",style:BI}),jsxRuntime.jsx(G,{name:"MapPin",size:36,weight:"fill",className:"relative text-map-marker-default"})]}):null]}):jsxRuntime.jsx("div",{style:e,className:tailwindMerge.twMerge("flex items-center justify-center bg-background-muted text-text-secondary",t),children:jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx(G,{name:"MapPin",size:48,className:"mx-auto mb-2 opacity-50"}),jsxRuntime.jsx("p",{className:"text-sm",children:r})]})})}var I0=ot.createContext(null);function F0({mapStyleUrl:e,children:t}){return jsxRuntime.jsx(I0.Provider,{value:e??null,children:t})}function Gi(){return ot.useContext(I0)}var B0={streets:"streets",satellite:"satellite",neutral:"neutral"},eu="streets";function tu(e,t,r){if(r)return r;switch(e){case "streets":return t?"mapbox://styles/victor-texture/clzwxtrng005s01p93rtr04op":"mapbox://styles/mapbox/streets-v12";case "satellite":return "mapbox://styles/mapbox/satellite-streets-v12";case "neutral":return t?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11";default:return t?"mapbox://styles/victor-texture/clzwxtrng005s01p93rtr04op":"mapbox://styles/mapbox/streets-v12"}}function V0({longitude:e,latitude:t,showPulse:r=true,accuracy:o}){return jsxRuntime.jsx(KI.Marker,{longitude:e,latitude:t,anchor:"center",children:jsxRuntime.jsxs("div",{className:"relative flex items-center justify-center",children:[r&&jsxRuntime.jsx("div",{className:"absolute h-12 w-12 animate-[ping_2s_ease-in-out_infinite] rounded-full bg-action-brand opacity-30",style:{animationDelay:"0s"}}),jsxRuntime.jsx("div",{className:"relative z-10 flex h-5 w-5 items-center justify-center rounded-full bg-background-surface shadow-lg",children:jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-action-brand"})}),o&&o>0&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute rounded-full border border-action-brand/20 bg-action-brand/10",style:{width:`${Math.min(o/2,100)}px`,height:`${Math.min(o/2,100)}px`}})]})})}var qI={name:"mercator"},ZI=[],al=ot__namespace.default.forwardRef(({initialViewState:e,mapStyleUrl:t,viewState:r,onViewStateChange:o,scrollEnabled:n=true,className:a,previewMode:i=false,previewModeCta:s,onPreviewModePress:l,mapType:d=eu,layers:c=[],mapboxAccessToken:u,transformRequest:m,isLoading:p=false,onLoad:g,controls:f="default",showUserLocation:b=true,onUserLocationChange:h,children:v,additionalInteractiveLayerIds:x=ZI,onMapClick:C,showMarker:S=false,markerLocation:w},T)=>{let N=u??Gd();if(!N)return jsxRuntime.jsx("div",{className:`relative ${a||""}`,style:{width:"100%",height:"100%"},children:jsxRuntime.jsx($d,{className:"w-full h-full",message:"Map unavailable"})});let{isDarkTheme:k}=hr(),R=Gi(),A=t??R,M=ot.useRef(null),B=ot.useRef(null),[D,W]=ot.useState(false),[X,H]=ot.useState(false);ot.useEffect(()=>{Qd();},[]);let[I,F]=ot.useState(false),z=ot.useRef(0),[U,K]=ot.useState(null),[O,V]=ot.useState(null),L=ot.useRef(null),y=ot.useRef(null),[E,P]=Wd("interactiveMap.trackingLocation",false),[Y,$]=ot.useState(false);ot.useEffect(()=>{if(!navigator.geolocation){$(true);return}if(E){if(!navigator.permissions?.query){$(true);return}navigator.permissions.query({name:"geolocation"}).then(Q=>{Q.state!=="granted"&&P(false),$(true);}).catch(()=>{$(true);});}else $(true);},[]),ot.useEffect(()=>{let Q=setTimeout(()=>{D||H(true);},200);return ()=>clearTimeout(Q)},[D]),ot.useEffect(()=>{y.current=null;},[d,k]),ot.useEffect(()=>{if(D)return;let Q=setInterval(()=>{if(M.current?.loaded()){W(true),H(false);let j=M.current.getMap?.();j&&y.current!==j&&(y.current=j,g?.()),clearInterval(Q);}},200);return ()=>clearInterval(Q)},[D,g]),ot.useEffect(()=>{if(Y){if(!E||i){L.current!==null&&(navigator.geolocation.clearWatch(L.current),L.current=null);return}if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}return L.current=navigator.geolocation.watchPosition(Q=>{let j={latitude:Q.coords.latitude,longitude:Q.coords.longitude,accuracy:Q.coords.accuracy};V(j),h?.(j);},Q=>{console.warn("Geolocation error:",Q.message),V(null),h?.(null);},{enableHighAccuracy:true,maximumAge:3e4,timeout:3e4}),()=>{L.current!==null&&(navigator.geolocation.clearWatch(L.current),L.current=null);}}},[E,i,h,Y]);let oe=ot.useCallback(()=>{W(true),H(false);let Q=M.current?.getMap?.();Q&&y.current!==Q&&(y.current=Q,g?.());},[g]),re=ot.useCallback(()=>{M.current&&e&&(F(false),z.current=0,M.current.flyTo({center:[e.longitude||0,e.latitude||0],zoom:e.zoom||0,bearing:e.bearing||0,pitch:e.pitch||0,duration:1e3}));},[e]),_=ot.useMemo(()=>f===false||f===null?[]:f==="default"||f===void 0?wf:f,[f]),he=ot.useCallback(()=>{if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}P(true),navigator.geolocation.getCurrentPosition(Q=>{let{latitude:j,longitude:pe}=Q.coords;M.current&&M.current.jumpTo({center:[pe,j],zoom:15});},Q=>{console.warn("Geolocation error:",Q.message),Q.code===Q.PERMISSION_DENIED&&P(false);},{enableHighAccuracy:true,timeout:1e4,maximumAge:0});},[]),me=ot.useMemo(()=>{if(i)return null;let Q=_.map(j=>j.type==="navigation"?{...j,onResetZoom:j.onResetZoom||re,onGeolocateClick:j.onGeolocateClick||he}:j);return Mf(Q,{mapRef:M,layers:c,showResetButton:I})},[_,M,i,c,re,I,he]),ue=ot.useMemo(()=>{let Q=[];return c.filter(j=>j.events?.onClick||j.events?.onMouseEnter||j.events?.onMouseLeave||j.tooltip||j.kind==="vector"&&j.revealChipOnHover).forEach(j=>{j.kind==="clusteredVector"?(Q.push(`${j.id}-clusters`),Q.push(`${j.id}-points`),Q.push(`${j.id}-selected-point`)):Q.push(j.id);}),[...Q,...x]},[c,x]),ie=ot.useMemo(()=>{let Q=new Map;return c.forEach(j=>{j.events&&(Q.set(j.id,j.events),j.kind==="clusteredVector"&&(Q.set(`${j.id}-clusters`,j.events),Q.set(`${j.id}-points`,j.events),Q.set(`${j.id}-selected-point`,j.events)));}),Q},[c]),fe=ot.useMemo(()=>{let Q=new Map;return c.forEach(j=>{j.tooltip&&(Q.set(j.id,j.tooltip),j.kind==="clusteredVector"&&(Q.set(`${j.id}-clusters`,j.tooltip),Q.set(`${j.id}-points`,j.tooltip),Q.set(`${j.id}-selected-point`,j.tooltip)));}),Q},[c]),Te=ot.useMemo(()=>{let Q=new Map;return c.forEach(j=>{j.kind==="clusteredVector"&&(Q.set(j.id,j),Q.set(`${j.id}-clusters`,j),Q.set(`${j.id}-points`,j),Q.set(`${j.id}-selected-point`,j));}),Q},[c]),Ye=ot.useMemo(()=>{if(!S)return null;let Q=w?.longitude??r?.longitude??e?.longitude,j=w?.latitude??r?.latitude??e?.latitude;return Q===void 0||j===void 0?null:{longitude:Q,latitude:j}},[S,w,r,e]),yt=ot.useCallback(Q=>{if(i)return;let j=Q.features?.[0];if(!j||!j.layer)return;let pe=j.layer.id,ae=ie.get(pe),Ne=fe.get(pe),Qe;j.geometry.type==="Point"?Qe=j.geometry.coordinates:Qe=[Q.lngLat.lng,Q.lngLat.lat];let Ue={id:j.id??j.properties?.id,lngLat:Qe,properties:j.properties||{},layerId:pe},cr=Te.get(pe),Z=j.properties?.cluster===true;if(cr&&Z){let le=M.current;if(le){let Ae=le.getZoom(),Oe=Math.min(Ae+3,18);le.flyTo({center:Qe,zoom:Oe,duration:1e3});}return}if(ae?.onClick&&ae.onClick(Ue),Ne&&Ne.trigger==="click"){let le;cr&&"cluster"in Ne?Ne.point&&(le=Ne.point(Ue)):"content"in Ne&&(le=typeof Ne.content=="function"?Ne.content(Ue):Ne.content),le&&K({feature:Ue,content:le,bare:Ne.bare});}C&&C(Q);},[ie,fe,i,C,Te,M,ue]),Qt=ot.useMemo(()=>new Set(c.filter(Q=>Q.kind==="vector"&&Q.revealChipOnHover).map(Q=>Q.id)),[c]),Ze=ot.useRef(null),fr=ot.useCallback(()=>{let Q=Ze.current;if(!(!Q||!M.current)){Ze.current=null;try{M.current.removeFeatureState({source:Q.source,sourceLayer:Q.sourceLayer,id:Q.id},"hover");}catch{}}},[M]);ot.useEffect(()=>{Ze.current=null;},[d,k,A]);let lr=ot.useCallback(Q=>{let j=Q.features?.find(ae=>ae.layer&&Qt.has(ae.layer.id));if(!j||j.id==null){fr();return}let pe=Ze.current;pe&&pe.source===j.source&&pe.id===j.id||(fr(),M.current&&(Ze.current={source:j.source,sourceLayer:j.sourceLayer,id:j.id},M.current.setFeatureState({source:j.source,sourceLayer:j.sourceLayer,id:j.id},{hover:true})));},[Qt,fr,M]),Ce=ot.useCallback(Q=>{let j=Q.features?.[0];if(!j||!j.layer)return null;let pe=j.layer.id,ae=fe.get(pe);if(!ae||ae.trigger!=="hover"&&ae.trigger!==void 0)return null;let Ne;j.geometry.type==="Point"?Ne=j.geometry.coordinates:Ne=[Q.lngLat.lng,Q.lngLat.lat];let Qe={id:j.id??j.properties?.id,lngLat:Ne,properties:j.properties||{},layerId:pe},Ue;if(Te.get(pe)&&"cluster"in ae){let Z=j.properties?.cluster===true;if(Z&&ae.cluster){let le=j.properties?.point_count||0;Ue=ae.cluster(le,Qe);}else !Z&&ae.point?Ue=ae.point(Qe):Ue=Z?`${j.properties?.point_count||0} items`:null;}else "content"in ae&&(Ue=typeof ae.content=="function"?ae.content(Qe):ae.content);return Ue?{feature:Qe,content:Ue,bare:ae.bare}:null},[fe,Te]),Vt=ot.useCallback(Q=>{if(i)return;let j=Q.features?.[0];if(!j||!j.layer)return;let pe=j.layer.id,ae=ie.get(pe);if(ae?.onMouseEnter){let Qe;j.geometry.type==="Point"?Qe=j.geometry.coordinates:Qe=[Q.lngLat.lng,Q.lngLat.lat];let Ue={id:j.id??j.properties?.id,lngLat:Qe,properties:j.properties||{},layerId:pe};ae.onMouseEnter(Ue);}let Ne=Ce(Q);Ne&&K(Ne),M.current&&(M.current.getCanvas().style.cursor="pointer");},[ie,i,M,Ce]),ee=ot.useCallback(Q=>{if(i)return;lr(Q);let j=Q.features?.[0];if(!j||!j.layer)return;let pe=Ce(Q);if(pe){K(ae=>ae&&ae.feature.layerId===pe.feature.layerId&&ae.feature.id===pe.feature.id?ae:pe);return}K(ae=>{if(!ae)return ae;let Ne=fe.get(ae.feature.layerId);return Ne&&(Ne.trigger==="hover"||Ne.trigger===void 0)?null:ae});},[i,Ce,fe,lr]),Be=ot.useCallback(()=>{if(!i){if(fr(),ie.forEach(Q=>{Q.onMouseLeave?.();}),U){let Q=U.feature.layerId,j=c.find(pe=>pe.id===Q);if(!j){let pe=Q.replace(/-(?:clusters|points|selected-point|cluster-shadows|points-shadow|cluster-count)$/,"");j=c.find(ae=>ae.id===pe);}j?.tooltip&&(j.tooltip.trigger||"hover")==="hover"&&K(null);}M.current&&(M.current.getCanvas().style.cursor="");}},[ie,i,M,U,c,fr]),Ve=ot.useCallback((Q,j)=>{for(let pe of c)if(pe.tooltip&&!(j&&pe.id!==j)){if(pe.kind==="geojson"){if(typeof pe.data=="string")continue;let ae=pe.data,Qe=(ae.type==="FeatureCollection"?ae.features:[ae]).find(Ue=>Ue.id===Q);if(Qe&&Qe.geometry.type==="Point")return {id:Qe.id,lngLat:Qe.geometry.coordinates,properties:Qe.properties||{},layerId:pe.id}}else if(pe.kind==="customPins"){let ae=pe.data.find(Ne=>Ne.id===Q||Ne._id===Q||Ne.key===Q);if(ae)return {id:Q,lngLat:pe.getPosition(ae),properties:ae,layerId:pe.id}}}return null},[c]);ot.useImperativeHandle(T,()=>({showTooltip:(Q,j)=>{let pe=Ve(Q,j);if(!pe)return;let ae=c.find(Ne=>Ne.id===pe.layerId);if(ae?.tooltip&&"content"in ae.tooltip){let Ne=typeof ae.tooltip.content=="function"?ae.tooltip.content(pe):ae.tooltip.content;K({feature:pe,content:Ne,bare:ae.tooltip.bare});}},hideTooltip:()=>{K(null);},getMap:()=>M.current,markMapAsMoved:()=>{F(true);}}),[Ve,c]);let nt=(Q,j)=>m?m(Q,j):{url:Q},wt=p||X,Xt=ot.useMemo(()=>ol(c,d),[c,d]);return jsxRuntime.jsx("div",{ref:B,className:tailwindMerge.twMerge("relative flex h-full w-full overflow-hidden",i&&"cursor-pointer",a),onClick:i?l:void 0,children:jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsxs(KI__default.default,{ref:M,initialViewState:e,...r&&r,style:{width:"100%",height:"100%"},mapStyle:tu(d,k,A),styleDiffing:false,projection:qI,mapboxAccessToken:N,transformRequest:nt,onLoad:oe,onMove:i?void 0:Q=>{if(Q.originalEvent&&D){let j=Q.originalEvent.type,pe=Math.abs((Q.viewState.latitude??0)-(e?.latitude??0)),ae=Math.abs((Q.viewState.longitude??0)-(e?.longitude??0)),Ne=Math.abs((Q.viewState.zoom??0)-(e?.zoom??0));e&&(pe>1e-4||ae>1e-4||Ne>.1)&&(j==="mousemove"||j==="touchmove"||j==="pointermove"?F(true):(j==="wheel"||j==="mousewheel")&&(z.current+=1,z.current>=3&&F(true)));}o?.(Q.viewState);},onClick:i?void 0:yt,onMouseMove:i?void 0:ee,onMouseEnter:i?void 0:Vt,onMouseLeave:i?void 0:Be,interactiveLayerIds:i?[]:ue,scrollZoom:i?false:n,dragPan:!i,dragRotate:!i,doubleClickZoom:!i,interactive:!i,attributionControl:false,children:[jsxRuntime.jsx(KI.AttributionControl,{position:"top-left"}),me,Xt,v,Ye&&jsxRuntime.jsx(KI.Marker,{longitude:Ye.longitude,latitude:Ye.latitude,anchor:"bottom",children:jsxRuntime.jsx(G,{name:"MapPin",size:36,className:"text-map-marker-default",weight:"fill"})}),b&&O&&jsxRuntime.jsx(V0,{longitude:O.longitude,latitude:O.latitude,accuracy:O.accuracy}),U&&jsxRuntime.jsx(KI.Popup,{longitude:U.feature.lngLat[0],latitude:U.feature.lngLat[1],offset:15,closeButton:false,closeOnClick:false,className:U.bare?"map-tooltip map-tooltip-bare":"map-tooltip",maxWidth:"none",children:U.content})]},`map-${d}-${k}-${A??"default"}`),wt&&jsxRuntime.jsx(_d,{}),i&&s&&jsxRuntime.jsx("div",{className:"absolute bottom-8 right-8 z-10",children:s})]})})});al.displayName="InteractiveMap";async function z0(e,t,r,o={}){if(e.hasImage(t))return;let n=o.size??64,a=o.color??"#2c2a26",i=o.weight??"regular",s=server.renderToStaticMarkup(ot.createElement(r,{size:n,color:a,weight:i})),l=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`;await new Promise((d,c)=>{let u=new Image(n,n);u.onload=()=>{try{e.hasImage(t)||e.addImage(t,u,{sdf:!1}),d();}catch(m){c(m instanceof Error?m:new Error(`Failed to addImage "${t}": ${String(m)}`));}},u.onerror=m=>{c(m instanceof Error?m:new Error(`Failed to load icon "${t}"`));},u.src=l;});}function Ki({width:e="100%",height:t="100%",initialViewState:r={longitude:-122.4194,latitude:37.7749,zoom:14},isLoading:o=false,mapType:n="streets",mapStyleUrl:a,layers:i=[],mapboxAccessToken:s,showMarker:l=true,markerOffsetY:d=0,showAttribution:c=false,onLoad:u,className:m,showExpandToggle:p=false,expandedMapTitle:g="Explore map",expandedMapAddressLabel:f,schematicPlaceholder:b=false}){let h=s??Gd(),{isDarkTheme:v}=hr(),[x,C]=ot.useState(false),[S,w]=ot.useState(false),T=Gi(),N=a??T,[k,R]=ot.useState(false),A=ot.useRef(null),M=ot.useRef(null),B=ot.useCallback(()=>R(true),[]),D=ot.useCallback(()=>R(false),[]);ot.useEffect(()=>{Qd();},[]);let W={width:typeof e=="number"?`${e}px`:e,height:typeof t=="number"?`${t}px`:t};ot.useEffect(()=>{let I=setTimeout(()=>{x||w(true);},200);return ()=>clearTimeout(I)},[x]);let X=ot.useCallback(()=>{C(true),w(false),u?.();},[u]);ot.useEffect(()=>{if(!M.current)return;let I=new ResizeObserver(()=>{A.current&&A.current.resize();});return I.observe(M.current),()=>{I.disconnect();}},[]);let H=o||S;return h?jsxRuntime.jsxs("div",{ref:M,style:W,className:`relative ${m||""}`,children:[jsxRuntime.jsxs(KI__default.default,{ref:A,mapboxAccessToken:h,initialViewState:r,style:{width:"100%",height:"100%"},mapStyle:tu(n,v,N),onLoad:X,scrollZoom:false,dragPan:false,dragRotate:false,doubleClickZoom:false,touchZoomRotate:false,interactive:false,attributionControl:false,children:[c&&jsxRuntime.jsx(KI.AttributionControl,{position:"top-left"}),ol(i,n),l&&r.longitude!==void 0&&r.latitude!==void 0&&jsxRuntime.jsx(KI.Marker,{longitude:r.longitude,latitude:r.latitude,anchor:"bottom",offset:[0,d],children:jsxRuntime.jsx(G,{name:"MapPin",size:36,className:"text-map-marker-default",weight:"fill"})})]}),p&&jsxRuntime.jsx("div",{className:"absolute top-4 right-4 z-20",children:jsxRuntime.jsx(no,{icon:"ArrowsOutSimple",ariaLabel:"Expand map to fullscreen",onPress:B})}),p&&jsxRuntime.jsx(Dr,{isOpen:k,onClose:D,title:g,contentPadding:false,maxWidth:"min(1100px, 100vw)",minWidth:"min(360px, 100vw)",height:"80vh",mobileHeight:"82vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"flex-1 min-h-0 overflow-hidden sm:mx-4 sm:mt-4 sm:rounded-xl sm:border sm:border-border-default",children:jsxRuntime.jsx(al,{initialViewState:r,mapType:n,mapStyleUrl:N,mapboxAccessToken:h,showMarker:l,markerLocation:r.longitude!==void 0&&r.latitude!==void 0?{latitude:r.latitude,longitude:r.longitude}:void 0,layers:i})}),f&&jsxRuntime.jsx("p",{className:"text-sm text-text-secondary px-4 py-3 flex-shrink-0",children:f})]})}),H&&jsxRuntime.jsx(_d,{})]}):jsxRuntime.jsx($d,{style:W,className:m,schematic:b,showMarker:l})}var n4={xs:{bar:"h-1 w-14",text:"text-xs",icon:"h-2.5 w-2.5"},sm:{bar:"h-1.5 w-48",text:"text-xs",icon:"h-3 w-3"},md:{bar:"h-2 w-64",text:"text-sm",icon:"h-4 w-4"},lg:{bar:"h-3 w-80",text:"text-base",icon:"h-5 w-5"}};function G0({label:e,size:t="md",variant:r="default",showWarningIndicator:o=true,warningThreshold:n=80,hideValueText:a=false,className:i,...s}){let l=n4[t],d=a&&e&&!s["aria-label"]&&!s["aria-labelledby"]?{"aria-label":e}:{};return jsxRuntime.jsx(reactAriaComponents.Meter,{...s,...d,className:Fe(i,"flex flex-col gap-1"),children:({percentage:c,valueText:u})=>{let m=o&&c>=n,p=r==="default"?a4(c):r;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!a&&jsxRuntime.jsxs("div",{className:"flex justify-between gap-2",children:[e&&jsxRuntime.jsx(et,{children:e}),jsxRuntime.jsxs("span",{className:tailwindMerge.twMerge(l.text,m?"text-feedback-error-text":"text-text-secondary"),children:[m&&jsxRuntime.jsx(lucideReact.AlertTriangle,{"aria-label":"Warning: High value",className:tailwindMerge.twMerge("inline-block align-text-bottom mr-1",l.icon)}),u]})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative rounded-full bg-background-muted","ring-1 ring-inset ring-border-muted",l.bar),children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute left-0 top-0 h-full rounded-full transition-all duration-300","forced-colors:bg-[Highlight]",i4(p)),style:{width:`${Math.min(100,Math.max(0,c))}%`},role:"presentation","aria-hidden":"true"})})]})}})}function a4(e){return e<50?"success":e<70?"info":e<90?"warning":"error"}function i4(e){switch(e){case "success":return "bg-feedback-success-text";case "warning":return "bg-feedback-warning-text";case "error":return "bg-feedback-error-text";case "info":return "bg-feedback-info-text";case "neutral":return "bg-text-subtle";default:return "bg-action-brand"}}var Yf=(e,t)=>e.toLocaleLowerCase().includes(t.toLocaleLowerCase());function Xf(e){return [e.value,e.label]}function ou(e,t,r=Yf){let o=t.trim();return o===""?[...e]:e.filter(n=>Xf(n).some(a=>r(a,o)))}function nu(e){let t=e.query.trim();if(t==="")return false;let r=t.toLocaleLowerCase();return e.options.some(n=>n.value.toLocaleLowerCase()===r||n.label.toLocaleLowerCase()===r)?false:!e.selected.some(n=>n.toLocaleLowerCase()===r)}function au(e,t){return e.map(r=>{let o=t.find(n=>n.value===r);return o?o.count===void 0?{value:r,label:o.label,isUnknown:false}:{value:r,label:o.label,count:o.count,isUnknown:false}:{value:r,label:r,isUnknown:true}})}var u4=e=>e.kind==="literal"?`literal:${e.value}`:`option:${e.option.value}`,Jf=e=>e.kind==="literal"?e.value:e.option.value,W0=e=>e.kind==="literal"?e.value:e.option.label,p4={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},m4={sm:"pl-8",md:"pl-10",lg:"pl-11",xl:"pl-13"},f4={sm:"xs",md:"xs",lg:"sm",xl:"sm"};function U0({options:e,value:t,defaultValue:r,onChange:o,label:n,placeholder:a,size:i="md",loading:s=false,disabled:l=false,maxSelected:d,allowLiteral:c=false,onSearchChange:u,truncated:m=false,totalCount:p,emptyMessage:g,showSelectAll:f=false,description:b,errorMessage:h,isRequired:v=false,onBlur:x,inputRef:C,labelHidden:S=false,className:w,id:T}){let N=ot.useId(),k=T??`multiselect-${N}`,R=`${k}-input`,A=`${k}-listbox`,M=ot.useRef(null),B=ot.useCallback(ee=>{M.current=ee,typeof C=="function"?C(ee):C&&(C.current=ee);},[C]),{contains:D}=reactAria.useFilter({sensitivity:"base"}),{isFocused:W,handleFocus:X,handleBlur:H}=Ar(),[I,F]=ot.useState(""),[z,U]=ot.useState(true),[K,O]=ot.useState(null),[V,L]=ot.useState(""),[y,E]=ot.useState(()=>[...r??[]]),P=ot.useMemo(()=>t?[...t]:y,[t,y]),Y=ot.useMemo(()=>ou(e,I,D),[e,I,D]),$=c&&!s&&nu({query:I,options:e,selected:P}),oe=ot.useMemo(()=>{let ee=Y.map(Be=>({kind:"option",option:Be}));return $?[{kind:"literal",value:I.trim()},...ee]:ee},[Y,$,I]),re=ot.useMemo(()=>au(P,e),[P,e]),_=d!==void 0&&P.length>=d,he=ot.useCallback((ee,Be)=>{t||E(ee),L(`${Be} ${ee.length} selected.`),o(ee);},[o,t]),me=ot.useCallback((ee,Be)=>{if(!l){if(P.includes(ee)){he(P.filter(Ve=>Ve!==ee),`${Be} removed.`);return}_||he([...P,ee],`${Be} selected.`);}},[_,he,l,P]),ue=ot.useCallback(ee=>{ee.kind==="option"&&ee.option.disabled||me(Jf(ee),W0(ee));},[me]),ie=ee=>{if(l||ee.length===0)return;let Be=new Set(ee),Ve=ee.map(nt=>re.find(wt=>wt.value===nt)?.label??nt);he(P.filter(nt=>!Be.has(nt)),`${Ve.join(", ")} removed.`);},fe=ee=>{F(ee),O(null),U(true),u?.(ee);},Te=ee=>{if(oe.length===0){O(null);return}O(Be=>Be===null?ee>0?0:oe.length-1:(Be+ee+oe.length)%oe.length);},Ye=ee=>{if(l)return;let Be=K===null?void 0:oe[K];switch(ee.key){case "ArrowDown":ee.preventDefault(),U(true),Te(1);break;case "ArrowUp":ee.preventDefault(),U(true),Te(-1);break;case "Home":oe.length>0&&(ee.preventDefault(),U(true),O(0));break;case "End":oe.length>0&&(ee.preventDefault(),U(true),O(oe.length-1));break;case "Enter":Be&&(ee.preventDefault(),ue(Be));break;case " ":I===""&&Be&&(ee.preventDefault(),ue(Be));break;case "Escape":ee.preventDefault(),I!==""?fe(""):(U(false),O(null));break;case "Backspace":I===""&&P.length>0&&(ee.preventDefault(),ie([P[P.length-1]]));break;}},yt=Y.filter(ee=>!ee.disabled&&!P.includes(ee.value)).map(ee=>ee.value),Qt=d===void 0?yt.length:Math.max(0,d-P.length),Ze=Math.min(yt.length,Qt),fr=Ze===yt.length?`Select all ${yt.length} matching`:`Select ${Ze} of ${yt.length} matching`,lr=()=>{if(l||Ze===0)return;let ee=yt.slice(0,Ze);he([...P,...ee],`${ee.length} matching options selected.`);},Ce=s?"loading":e.length===0?"empty":Y.length===0&&I.trim()!==""?"no-match":null,Vt=_e[i].text;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex w-full flex-col gap-1",w),"data-testid":"multiselect",children:[jsxRuntime.jsx(et,{size:i,htmlFor:R,isRequired:v,...S?{className:"sr-only"}:{},children:n}),jsxRuntime.jsxs(Dt,{children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 z-10 flex -translate-y-1/2 items-center",children:s?jsxRuntime.jsx(ao,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(G,{name:"MagnifyingGlass",className:tailwindMerge.twMerge(p4[i],"text-text-secondary")})}),jsxRuntime.jsx("input",{ref:B,id:R,type:"text",role:"combobox",autoComplete:"off","aria-expanded":z,"aria-controls":A,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":z&&K!==null&&oe[K]?`${k}-row-${K}`:void 0,"aria-required":v||void 0,"aria-invalid":h?true:void 0,value:I,placeholder:a,disabled:l,onChange:ee=>fe(ee.target.value),onKeyDown:Ye,onFocus:ee=>{U(true),X(ee);},onBlur:ee=>{H(ee),x?.(ee);},className:rr({isDisabled:l,isFocused:W,isInvalid:!!h,size:i,className:tailwindMerge.twMerge(m4[i],"pr-3")})})]}),re.length>0&&jsxRuntime.jsx("div",{"data-testid":"multiselect-selection-region",role:"group","aria-label":`Selected ${n}`,className:"flex flex-wrap gap-1.5 rounded-[var(--control-border-radius)] border border-border-default bg-background-muted p-2",children:re.map(ee=>jsxRuntime.jsx(lo,{size:f4[i],variant:"primary",isDisabled:l,removeLabel:`Remove ${ee.label}`,onRemove:()=>ie([ee.value]),className:"shrink-0",children:ee.isUnknown?jsxRuntime.jsx("span",{"data-testid":`multiselect-selection-unknown-${ee.value}`,title:"Not in the current option list",children:`${ee.label} (custom)`}):ee.label},ee.value))}),f&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(te,{variant:"link",size:i,onPress:lr,isDisabled:l||Ze===0,children:fr}),jsxRuntime.jsx(te,{variant:"link",size:i,onPress:()=>ie(P),isDisabled:l||P.length===0,children:"Clear all"})]}),jsxRuntime.jsx("div",{id:A,role:"listbox","aria-multiselectable":"true","aria-label":`${n} options`,hidden:!z,className:tailwindMerge.twMerge(Vt,"max-h-[260px] overflow-y-auto rounded-[var(--control-border-radius)] border border-border-input bg-background-input"),children:z&&oe.map((ee,Be)=>{let Ve=P.includes(Jf(ee)),nt=l||ee.kind==="option"&&ee.option.disabled===true||!Ve&&_;return jsxRuntime.jsxs("div",{id:`${k}-row-${Be}`,role:"option","aria-selected":Ve,"aria-disabled":nt||void 0,"data-value":Jf(ee),"data-literal":ee.kind==="literal"?"true":void 0,"data-active":K===Be?"true":void 0,onMouseDown:wt=>wt.preventDefault(),onClick:()=>{nt||(ue(ee),M.current?.focus());},className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 px-3",_e[i].paddingY,"text-text-primary",K===Be&&"bg-background-hover",Ve&&"bg-background-selected font-medium",nt&&"text-text-disabled"),children:[jsxRuntime.jsx(Xp,{isSelected:Ve,isDisabled:nt,className:"!w-4 !h-4"}),jsxRuntime.jsx("span",{className:"flex-1 truncate",children:W0(ee)}),ee.kind==="literal"&&jsxRuntime.jsx("span",{"data-testid":"multiselect-literal-badge",className:"italic text-text-secondary",children:"Use as typed"}),ee.kind==="option"&&ee.option.count!==void 0&&jsxRuntime.jsx("span",{"data-testid":`multiselect-count-${ee.option.value}`,className:"text-text-secondary",children:ee.option.count.toLocaleString()})]},u4(ee))})}),Ce==="loading"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-loading","data-status":"loading",children:jsxRuntime.jsxs(Ee,{size:i,className:"flex items-center gap-2",children:[jsxRuntime.jsx(ao,{size:14,color:"text-text-secondary"}),jsxRuntime.jsx("span",{children:"Loading options\u2026"})]})}),Ce==="empty"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-empty","data-status":"empty",children:jsxRuntime.jsxs(Ee,{size:i,className:"flex items-center gap-2",children:[jsxRuntime.jsx(G,{name:"Tray",className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:g??"No options available"})]})}),Ce==="no-match"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-no-match","data-status":"no-match",children:jsxRuntime.jsxs(Ee,{size:i,className:"flex items-center gap-2 text-feedback-warning-text",children:[jsxRuntime.jsx(G,{name:"MagnifyingGlass",className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:`No options match \u201C${I.trim()}\u201D`})]})}),m&&jsxRuntime.jsx("div",{"data-testid":"multiselect-truncation",children:jsxRuntime.jsx(Ee,{size:i,children:p===void 0?"Showing a partial list \u2014 refine your search to see more":`Showing ${e.length} of ${p} \u2014 refine your search to see more`})}),d!==void 0&&jsxRuntime.jsx("div",{"data-testid":"multiselect-limit",children:jsxRuntime.jsx(Ee,{size:i,children:_?`${P.length} of ${d} selected \u2014 limit reached, remove one to choose another`:`${P.length} of ${d} selected`})}),b&&jsxRuntime.jsx(Ee,{size:i,children:b}),h&&jsxRuntime.jsx(ye,{size:i,children:h}),jsxRuntime.jsx("div",{"data-testid":"multiselect-live-region",role:"status","aria-live":"polite",className:"sr-only",children:V})]})}var lu="bg-background-surface border-l-[3px] border-y border-r border-border-default text-text-primary",x4={success:{container:lu,iconName:"CheckCircle",iconColor:"text-feedback-success-text",borderColor:"var(--color-feedback-success-border)"},error:{container:lu,iconName:"XCircle",iconColor:"text-feedback-error-text",borderColor:"var(--color-feedback-error-border)"},warning:{container:lu,iconName:"Warning",iconColor:"text-feedback-warning-text",borderColor:"var(--color-feedback-warning-border)"},info:{container:lu,iconName:"Info",iconColor:"text-feedback-info-text",borderColor:"var(--color-feedback-info-border)"}};function du({id:e,message:t,variant:r="info",duration:o=5e3,dismissible:n=true,onDismiss:a,className:i}){let{container:s,iconName:l,iconColor:d,borderColor:c}=x4[r];return ot.useEffect(()=>{if(o>0){let u=setTimeout(()=>{a?.();},o);return ()=>clearTimeout(u)}},[o,a]),jsxRuntime.jsxs(framerMotion.motion.div,{layout:true,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.2}},className:tailwindMerge.twMerge("pointer-events-auto flex items-center gap-3 rounded-lg p-4 shadow-lg",s,i),style:{borderLeftColor:c},children:[jsxRuntime.jsx(G,{name:l,size:20,className:d}),jsxRuntime.jsx("p",{className:"flex-1 select-text text-sm font-medium",children:t}),n&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"flex-shrink-0 rounded-md p-1 transition-colors hover:bg-background-hover","aria-label":"Dismiss notification",children:jsxRuntime.jsx(G,{name:"X",size:16})})]})}var N4={"top-left":"top-4 left-4 items-start","top-center":"top-4 left-1/2 -translate-x-1/2 items-start","top-right":"top-4 right-4 items-end","bottom-left":"bottom-4 left-4 items-start","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-start","bottom-right":"bottom-4 right-4 items-end"};function uu({notices:e,onDismiss:t,position:r="bottom-center",className:o}){let[n,a]=ot.useState(false);if(ot.useEffect(()=>{a(true);},[]),!n)return null;let i=jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("pointer-events-none fixed z-50 flex flex-col gap-2",N4[r],o),"aria-live":"polite","aria-atomic":"true",children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"sync",children:e.map(s=>jsxRuntime.jsx(du,{id:s.id,message:s.message,variant:s.variant,duration:s.duration,dismissible:s.dismissible,onDismiss:()=>t(s.id)},s.id))})});return reactDom.createPortal(i,document.body)}var K0=ot.createContext(void 0);function Y0({children:e,position:t="bottom-center",maxNotices:r=5,defaultDuration:o=5e3,defaultDismissible:n=true}){let[a,i]=ot.useState([]),s=ot.useCallback((u,m)=>{let p=`notice-${Date.now()}-${Math.random()}`,g={id:p,message:u,variant:m?.variant||"info",duration:m?.duration??o,dismissible:m?.dismissible??n};return i(f=>{let b=[...f,g];return b.length>r?b.slice(-r):b}),p},[r,o,n]),l=ot.useCallback(u=>{i(m=>m.filter(p=>p.id!==u));},[]),d=ot.useCallback(()=>{i([]);},[]),c={notices:a,addNotice:s,removeNotice:l,clearNotices:d};return jsxRuntime.jsxs(K0.Provider,{value:c,children:[e,jsxRuntime.jsx(uu,{notices:a,onDismiss:l,position:t})]})}function X0(){let e=ot.useContext(K0);if(!e)throw new Error("useNoticeContext must be used within a NoticeProvider");return e}function J0(){let{addNotice:e,removeNotice:t,clearNotices:r}=X0(),o=ot.useCallback((l,d)=>e(l,d),[e]),n=ot.useCallback((l,d)=>e(l,{...d,variant:"success"}),[e]),a=ot.useCallback((l,d)=>e(l,{...d,variant:"error"}),[e]),i=ot.useCallback((l,d)=>e(l,{...d,variant:"warning"}),[e]),s=ot.useCallback((l,d)=>e(l,{...d,variant:"info"}),[e]);return {show:o,success:n,error:a,warning:i,info:s,dismiss:t,clear:r}}var Yi="edges:section-navigate",L4={plain:"",contained:"bg-background-surface rounded-lg border border-border-default p-6",bordered:"border-y border-border-default py-6"},D4={none:"",sm:"my-4",md:"my-6 md:my-8",lg:"my-8 md:my-12"};function Xi({id:e,title:t,description:r,actions:o,variant:n="plain",spacing:a="none",withDivider:i=false,headingAs:s="h2",className:l,children:d,collapsible:c=false,defaultCollapsed:u=false,badge:m}){let p=ot__namespace.default.useId(),g=e?`${e}-heading`:p,f=`${g}-body`,b=t||r||o,[h,v]=ot__namespace.default.useState(c&&u),x=ot__namespace.default.useRef(false),C=!c||!h;ot__namespace.default.useEffect(()=>{x.current||v(c&&u);},[c,u]),ot__namespace.default.useEffect(()=>{if(!c||!e)return;let w=()=>{x.current=true,v(false);},T=()=>{window.location.hash===`#${e}`&&w();},N=k=>{k.detail?.id===e&&w();};return T(),window.addEventListener(Yi,N),window.addEventListener("hashchange",T),window.addEventListener("popstate",T),()=>{window.removeEventListener(Yi,N),window.removeEventListener("hashchange",T),window.removeEventListener("popstate",T);}},[c,e]);let S=t?c?jsxRuntime.jsx(vr,{tag:s,size:"md",className:"text-text-primary",children:jsxRuntime.jsxs("button",{type:"button",onClick:()=>{x.current=true,v(w=>!w);},"aria-expanded":C,"aria-controls":f,className:"flex w-full items-center gap-2 text-left",children:[jsxRuntime.jsx(G,{name:"CaretRight",size:"sm","aria-hidden":true,className:tailwindMerge.twMerge("text-text-secondary transition-transform",C&&"rotate-90")}),jsxRuntime.jsx("span",{children:t}),m!=null&&jsxRuntime.jsx("span",{className:"text-sm font-normal text-text-secondary",children:m})]})}):jsxRuntime.jsx(vr,{tag:s,size:"md",className:"text-text-primary",children:t}):null;return jsxRuntime.jsxs("section",{id:e,className:tailwindMerge.twMerge(D4[a],L4[n],l),"aria-labelledby":t?g:void 0,children:[b&&jsxRuntime.jsxs("header",{id:g,className:tailwindMerge.twMerge("flex flex-col sm:flex-row sm:flex-wrap sm:items-center sm:justify-between gap-4",i&&"border-b border-border-default pb-4 mb-6",!i&&d&&C&&"mb-6"),children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[S,r&&jsxRuntime.jsx("p",{className:"mt-2 text-base text-text-secondary",children:r})]}),o&&jsxRuntime.jsx("div",{className:"min-w-0 shrink",children:o})]}),d&&C&&jsxRuntime.jsx("div",{id:f,className:"",children:t?jsxRuntime.jsx(Mn,{children:d}):d})]})}Xi.displayName="Section";function fu({sections:e,activeSection:t,onSectionChange:r,orientation:o="responsive",className:n,scrollBehavior:a="smooth",stickyTop:i="1.5rem",heading:s,sectionIdPrefix:l="section-",filterSection:d,scrollContainerId:c}){let u=ot__namespace.useRef(null),m=ot__namespace.useRef(null),[p,g]=ot__namespace.useState(e[0]?.id||null),f=t??p,b=ot__namespace.useCallback(()=>c?document.getElementById(c):null,[c]),h=ot__namespace.useCallback(w=>document.getElementById(`${l}${w}`)??document.getElementById(w),[l]);ot__namespace.useEffect(()=>{let w=window.location.hash;if(!w)return;let T=w.slice(1),N=T.startsWith(l)?T.slice(l.length):T,k=e.find(R=>R.id===N);k&&requestAnimationFrame(()=>{let R=h(k.id);if(!R)return;let A=b();if(A){let M=A.getBoundingClientRect(),B=R.getBoundingClientRect(),D=A.scrollTop+(B.top-M.top);A.scrollTo({top:Math.max(0,D),behavior:"instant"});}else R.scrollIntoView({behavior:"instant",block:"start"});r?r(k.id):g(k.id);});},[]),ot__namespace.useEffect(()=>{if(t!==void 0&&r)return;let w=R=>{if(!R)return false;let A=window.getComputedStyle(R);return A.display!=="none"&&A.visibility!=="hidden"&&A.opacity!=="0"},T=()=>{let R=w(u.current),A=w(m.current);if(!R&&!A)return null;let M=b(),B=new IntersectionObserver(D=>{D.forEach(W=>{if(W.isIntersecting){let X=W.target.id.replace(l,"");r?r(X):g(X);}});},{root:M??void 0,rootMargin:"-20% 0px -70% 0px",threshold:0});return e.forEach(D=>{let W=h(D.id);W&&B.observe(W);}),B},N=T(),k=()=>{N&&N.disconnect(),N=T();};return window.addEventListener("resize",k),()=>{N&&N.disconnect(),window.removeEventListener("resize",k);}},[e,l,t,r,o,b,h]);let v=ot__namespace.useMemo(()=>d?e.filter(d):e,[e,d]),x=ot__namespace.useCallback((w,T)=>{w.preventDefault();let N=h(T);if(N){window.dispatchEvent(new CustomEvent(Yi,{detail:{id:N.id}}));let k=b();if(k){let R=k.getBoundingClientRect(),A=N.getBoundingClientRect(),M=k.scrollTop+(A.top-R.top),B=Math.max(0,k.scrollHeight-k.clientHeight);k.scrollTo({top:Math.max(0,Math.min(M,B)),behavior:a});}else {let R=N.getBoundingClientRect().top+window.scrollY,A=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),M=Math.max(0,Math.min(R,A));window.scrollTo({top:M,behavior:a});}window.history.pushState&&window.history.pushState(null,"",`#${l}${T}`),r?r(T):g(T);}},[l,a,r,b,h]);if(v.length===0)return null;let C=o==="vertical"?"":o==="horizontal"?"hidden":"hidden lg:block",S=o==="horizontal"?"":o==="vertical"?"hidden":"lg:hidden";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("nav",{ref:u,className:tailwindMerge.twMerge(C,n),"aria-label":"Section navigation",children:jsxRuntime.jsxs("div",{className:"space-y-1",style:{position:"sticky",top:i},children:[s?jsxRuntime.jsx("div",{className:"px-3 pb-2 text-label-sm font-semibold uppercase tracking-wide text-text-tertiary",children:s}):null,v.map(w=>{let T=f===w.id;return jsxRuntime.jsx("a",{href:`#${l}${w.id}`,onClick:N=>x(N,w.id),className:tailwindMerge.twMerge("block w-full text-left px-3 py-2 rounded-md text-sm transition-colors no-underline",T?"bg-background-muted text-text-primary font-semibold":"text-text-secondary hover:text-text-primary hover:bg-background-hover"),"aria-current":T?"page":void 0,children:jsxRuntime.jsxs("span",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("span",{children:w.label}),w.count!==void 0&&jsxRuntime.jsx("span",{className:"text-xs tabular-nums text-text-secondary",children:w.count})]})},w.id)})]})}),jsxRuntime.jsx("nav",{ref:m,className:tailwindMerge.twMerge(S,"overflow-x-auto scrollbar-hide sticky top-0 z-10 py-4 -mt-4",n),"aria-label":"Section navigation",children:jsxRuntime.jsx("div",{className:"flex gap-2 min-w-max",children:v.map(w=>{let T=f===w.id;return jsxRuntime.jsx("a",{href:`#${l}${w.id}`,onClick:N=>x(N,w.id),className:tailwindMerge.twMerge("inline-block px-4 py-2 rounded-md text-sm whitespace-nowrap transition-colors no-underline",T?"bg-background-muted text-text-primary font-semibold":"text-text-secondary hover:text-text-primary hover:bg-background-hover"),"aria-current":T?"page":void 0,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{children:w.label}),w.count!==void 0&&jsxRuntime.jsxs("span",{className:"text-xs tabular-nums text-text-secondary",children:["(",w.count,")"]})]})},w.id)})})})]})}function j0(e){return "primary"}var gu=ot__namespace.createContext({variant:"primary"});function O4({orientation:e,className:t=""}){return `flex flex-col w-full ${{horizontal:"",vertical:"flex-row"}[e]||""} ${t}`.trim()}function bu({variant:e="primary",...t}){let r=j0();return jsxRuntime.jsx(gu.Provider,{value:{variant:r},children:jsxRuntime.jsx("div",{className:"w-full h-auto",children:jsxRuntime.jsx(reactAriaComponents.Tabs,{...t,className:reactAriaComponents.composeRenderProps(t.className,(o,n)=>O4({...n,className:o}))})})})}function z4({orientation:e,sticky:t=false,className:r=""}){let o="flex gap-10 relative after:absolute after:bottom-0 after:left-0 after:right-0 after:h-[2px] after:bg-border-muted",n={horizontal:"flex-row w-full flex-nowrap overflow-x-auto scrollbar-hide",vertical:"flex-col items-start"},a=t?"sticky top-0 bg-background-surface z-10":"";return `${o} ${n[e]||""} ${a} ${r}`.trim()}function xu({variant:e,sticky:t=false,...r}){let o=ot__namespace.useContext(gu),n=j0(e??o.variant);return jsxRuntime.jsx(gu.Provider,{value:{variant:n},children:jsxRuntime.jsx(reactAriaComponents.TabList,{...r,className:reactAriaComponents.composeRenderProps(r.className,(a,i)=>z4({...i,sticky:t,className:a||""}))})})}function H4({isSelected:e,isDisabled:t,variant:r,className:o=""}){let n="flex items-center cursor-default px-1 py-2 font-medium transition-all hover:cursor-pointer relative shrink-0 whitespace-nowrap",a=`${pt()} ${r==="primary"?"focus-visible:outline-action-primary":""}`.trim(),i="";return t?i="text-text-disabled forced-colors:text-[GrayText] cursor-not-allowed":e?i="text-action-primary border-b-2 border-action-primary z-10 forced-colors:bg-[Highlight]":i="text-text-disabled hover:text-text-secondary",`${n} ${a} ${i} ${o}`.trim()}function yu(e){let{variant:t}=ot__namespace.useContext(gu);return jsxRuntime.jsx(reactAriaComponents.Tab,{...e,"data-testid":e.id?`tab-${e.id}`:void 0,className:reactAriaComponents.composeRenderProps(e.className,(r,o)=>H4({...o,className:r,isSelected:o.isSelected,variant:t}))})}function G4({className:e=""}){let t="block w-full mt-4 text-text-primary",r=pt();return `${t} ${r} ${e}`.trim()}function q0(e){return jsxRuntime.jsx(reactAriaComponents.TabPanel,{...e,className:reactAriaComponents.composeRenderProps(e.className,(t,r)=>G4({...r,className:t||""}))})}function qa({children:e,maxWidth:t=1400,paddingXClass:r="px-4 md:px-6",paddingYClass:o="pt-8 pb-14 md:pt-12 md:pb-28",className:n}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(`w-full ${r} ${o}`,n),style:{marginInline:"auto",maxWidth:t},children:e})}function W4({title:e,subtitle:t,breadcrumbs:r,breadcrumbsNode:o,media:n,actions:a,metadata:i,headingAs:s,sticky:l,stickyTop:d="0",zIndex:c=10,isLoading:u=false,className:m}){let p=l?"sticky bg-background-body":"",g=l?{top:d,zIndex:c}:{};return u?jsxRuntime.jsxs("header",{className:tailwindMerge.twMerge("mb-8 md:mb-12",p,m),style:g,"aria-labelledby":"page-title",children:[o||r?.length?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:jsxRuntime.jsx(q,{className:"h-4 w-32"})}):null,jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("div",{id:"page-title",children:jsxRuntime.jsx(q,{className:"h-8 w-64"})}),t?jsxRuntime.jsx(q,{className:"mt-2 h-5 w-48"}):null,i?jsxRuntime.jsx(q,{className:"mt-2 h-4 w-40"}):null,a?.length?jsxRuntime.jsx("div",{className:"mt-6 flex flex-col items-stretch gap-3 md:hidden",children:a.map((f,b)=>jsxRuntime.jsx(q,{className:"h-9 w-full"},b))}):null]}),a?.length?jsxRuntime.jsx("div",{className:"hidden md:flex md:items-start gap-2 shrink-0",children:a.map((f,b)=>jsxRuntime.jsx(q,{className:"h-9 w-24"},b))}):null]}),n?jsxRuntime.jsx("div",{className:"mt-4 md:mt-6",children:jsxRuntime.jsx(q,{className:"h-64 w-full"})}):null]}):jsxRuntime.jsxs("header",{className:tailwindMerge.twMerge("mb-8 md:mb-12",p,m),style:g,"aria-labelledby":"page-title",children:[o?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:o}):r?.length?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:jsxRuntime.jsx(rc,{children:r.map((f,b)=>{let{label:h,...v}=f;return jsxRuntime.jsx(oc,{...v,children:h},`${h}-${b}`)})})}):null,jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("div",{id:"page-title",children:jsxRuntime.jsx(vr,{tag:s||"h1",size:"xl",children:e})}),t?jsxRuntime.jsx("p",{className:"mt-2 text-base md:text-lg text-text-secondary",children:t}):null,i?jsxRuntime.jsx("div",{className:"mt-2 text-sm text-text-secondary",children:i}):null,a?.length?jsxRuntime.jsx("div",{className:"mt-6 flex flex-col items-stretch gap-3 md:hidden",children:a.map((f,b)=>jsxRuntime.jsx(ot__namespace.default.Fragment,{children:f},b))}):null]}),a?.length?jsxRuntime.jsx("div",{className:"hidden md:flex md:items-start gap-2 shrink-0",children:a.map((f,b)=>jsxRuntime.jsx(ot__namespace.default.Fragment,{children:f},b))}):null]}),n?jsxRuntime.jsx("div",{className:"mt-4 md:mt-6",children:n}):null]})}function U4({tabs:e,value:t,defaultValue:r,onChange:o,className:n,children:a}){let i=s=>{o?.(s);};return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("mb-3 md:mb-4 border-b-2 border-border-muted",n),children:jsxRuntime.jsxs(bu,{selectedKey:t,defaultSelectedKey:r||e[0]?.id,onSelectionChange:i,children:[jsxRuntime.jsx(xu,{className:"after:bg-transparent",children:e.map(s=>jsxRuntime.jsx(yu,{id:s.id,isDisabled:s.disabled,children:s.label},s.id))}),a]})})}function K4({children:e,className:t,withSectionNav:r,navWidth:o="240px",gap:n="2rem",activeSection:a,onSectionChange:i,scrollBehavior:s,sectionIdPrefix:l="section-",scrollContainerId:d,navHeading:c,navStickyTop:u}){return r?jsxRuntime.jsx(X4,{position:r,navWidth:o,gap:n,activeSection:a,onSectionChange:i,scrollBehavior:s,sectionIdPrefix:l,scrollContainerId:d,navHeading:c,navStickyTop:u,className:t,children:e}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full space-y-8 md:space-y-12",t),children:e})}function Y4({children:e,sticky:t=true,className:r}){return jsxRuntime.jsx("aside",{className:tailwindMerge.twMerge(t?"lg:sticky lg:top-20":"",r),children:e})}function X4({activeSection:e,onSectionChange:t,position:r,navWidth:o,gap:n,children:a,className:i,scrollBehavior:s,sectionIdPrefix:l,scrollContainerId:d,navHeading:c,navStickyTop:u}){let m=ot__namespace.default.useMemo(()=>{let x=[];return ot__namespace.default.Children.forEach(a,C=>{if(ot__namespace.default.isValidElement(C)&&(C.type===Xi||typeof C.type=="object"&&C.type?.displayName==="Section"||typeof C.type=="function"&&C.type?.displayName==="Section")){let S=C.props;S.id?x.push({id:S.id,label:S.navLabel||(typeof S.title=="string"?S.title:`Section ${S.id}`)}):process.env.NODE_ENV==="development"&&console.warn("Section component used within PageLayout.Content with withSectionNav must have an id prop");}}),x},[a]),p=ot__namespace.default.useMemo(()=>{let x=ot__namespace.default.Children.map(a,C=>{if(ot__namespace.default.isValidElement(C)&&(C.type===Xi||typeof C.type=="object"&&C.type?.displayName==="Section"||typeof C.type=="function"&&C.type?.displayName==="Section")){let S=C.props;if(S.id)return ot__namespace.default.cloneElement(C,{...S,id:`${l}${S.id}`})}return C});return jsxRuntime.jsx("div",{className:"space-y-8 md:space-y-12",children:x})},[a,l]),g=(x,C)=>jsxRuntime.jsx(fu,{sections:m,activeSection:e,onSectionChange:t,orientation:x,scrollBehavior:s,sectionIdPrefix:l,scrollContainerId:d,heading:c,className:C});if(r==="above")return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("space-y-4",i),children:[jsxRuntime.jsx("div",{className:"sticky top-0 z-10 bg-background-body",children:g("horizontal")}),p]});let f=r==="left"?"var(--nav-width) minmax(0, 1fr)":"minmax(0, 1fr) var(--nav-width)",b=u?"":"top-20",h=u?{top:u}:void 0,v=tailwindMerge.twMerge("hidden lg:block sticky self-start",b);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"lg:hidden sticky top-0 z-10 mt-3 mb-4 bg-background-body border-b border-border-default shadow-sm",children:g("horizontal","py-3 mt-0")}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("lg:grid",i),style:{gridTemplateColumns:f,gap:n,"--nav-width":o},children:[r==="left"&&jsxRuntime.jsx("nav",{className:v,style:h,children:g("vertical")}),p,r==="right"&&jsxRuntime.jsx("nav",{className:v,style:h,children:g("vertical")})]})]})}function J4({children:e,className:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-auto min-h-0",t),children:e})}qa.Header=W4;qa.Tabs=U4;qa.Content=K4;qa.Aside=Y4;qa.ScrollableContent=J4;function q4(e){return typeof e=="object"&&e!==null&&"features"in e&&Array.isArray(e.features)&&"type"in e&&typeof e.type=="string"}var Z4=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN||"";function _0({label:e,selectedKey:t,defaultSelectedKey:r,onSelectionChange:o,placeholder:n="Enter a location...",errorMessage:a,description:i,size:s="md",tooltip:l,isRequired:d,isDisabled:c,showErrors:u=true,autoFocus:m=false,onSelect:p,searchTypes:g=["place","address"],defaultFilter:f,validationResult:b,countryRestrictions:h,proximity:v="ip",hideCountry:x=false,showIcon:C=true,useMobileTray:S=true,className:w}){let T=ot.useRef(new WeakMap),N=ot.useRef([]),k={requestType:"REST",method:"GET",url:"https://api.mapbox.com/geocoding/v5/mapbox.places/{q}.json",extraParams:{access_token:Z4,types:g.join(","),limit:"5",...h?.length?{country:h.join(",").toLowerCase()}:{},...v?{proximity:v==="ip"?"ip":v.join(",")}:{}},shouldLoad:M=>M.length>0,transformResponse:M=>{if(!q4(M))return [];let B=M.features.map(D=>{let W={id:D.id,name:D.place_name};return T.current.set(W,{type:D.place_type[0],center:D.center,context:D.context,address:D.address,text:D.text,properties:D.properties}),W});return B.length>0&&(N.current=B),B}},R=M=>{let B=T.current.get(M),D=M.name.split(", "),W=D[0],X=D.slice(1);x&&X.length>0&&(X=X.slice(0,-1));let H=X.join(", ");return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 py-0.5",children:[C&&jsxRuntime.jsx(G,{name:B?.type==="address"?"MapPin":B?.type==="place"?"Buildings":B?.type==="region"?"MapPinArea":B?.type==="country"?"Flag":"Circle",className:"h-5 w-5 flex-shrink-0 text-text-secondary"}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col",children:[jsxRuntime.jsx("span",{className:"truncate font-medium text-text-primary",children:W}),H&&jsxRuntime.jsx("span",{className:"truncate text-sm text-text-secondary",children:H})]})]})},A=M=>M?jsxRuntime.jsx(G,{name:"CircleNotch",className:"h-4 w-4 animate-spin text-text-secondary"}):jsxRuntime.jsx(G,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-secondary"});return jsxRuntime.jsx($l,{"data-testid":"autocomplete","data-config":JSON.stringify({types:g.join(","),country:h?.join(",")?.toLowerCase(),proximity:v==="ip"?"ip":v?.join(",")}),label:e||void 0,selectedKey:t,defaultSelectedKey:r,onSelectionChange:M=>{if(o?.(M),M){let D=N.current.find(W=>W.id===M);if(D){let W=T.current.get(D);W&&p({id:D.id,place_name:D.name,place_type:[W.type],center:W.center,context:W.context,address:W.address,text:W.text,properties:W.properties});}}},requestConfig:k,placeholder:n,errorMessage:a,description:i,size:s,tooltip:l,isRequired:d,isDisabled:c,showErrors:u,autoFocus:m,renderItem:R,renderLeftIcon:A,defaultFilter:f,validationResult:b,hideChevron:true,useMobileTray:S,className:w})}function eS({label:e,rightLabel:t,progressWidth:r=64,hideLabels:o=false,...n}){return jsxRuntime.jsx(reactAriaComponents.ProgressBar,{...n,className:Fe(n.className,"flex flex-col gap-1"),children:({percentage:a,valueText:i,isIndeterminate:s})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!o&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:e}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:t||i})]}),jsxRuntime.jsx("div",{className:`relative h-2 w-${r} overflow-hidden rounded-full bg-background-muted outline-none`,children:jsxRuntime.jsx("div",{className:`absolute top-0 h-full rounded-full bg-action-default forced-colors:bg-[Highlight] ${s?"left-full duration-1000 ease-out animate-in slide-out-to-right-full repeat-infinite [--tw-enter-translate-x:calc(-16rem-100%)]":"left-0"}`,style:{width:(s?40:a)+"%"}})})]})})}function tS({as:e="div",size:t="md",tone:r="editorial",className:o="",children:n,...a}){let i=t==="md"?"":`prose-${t}`,s=r==="editorial"?"":`prose-${r}`;return jsxRuntime.jsx(e,{className:Er("prose",i,s,o),...a,children:n})}function o5(e="2"){return {1:"p-2 text-xs",2:"p-3 text-sm",3:"p-4 text-base"}[e]}function n5(e){return e?"border-action-primary text-action-primary":"border-border text-text-primary"}function a5(){return "opacity-50 cursor-not-allowed"}function rS({value:e,isDisabled:t,className:r,children:o,size:n="2",variant:a="primary"}){return jsxRuntime.jsx(reactAriaComponents.Radio,{value:e,isDisabled:t,className:Fe(r,"relative flex items-center justify-center cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-action-primary focus:ring-offset-2 rounded-lg min-h-[44px]"),children:({isSelected:s,isDisabled:l})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center justify-center w-full h-full transition-all duration-200 rounded-lg border-2 bg-background-surface",!(t||l)&&!s&&"hover:bg-background-hover hover:border-border-hover",o5(n),n5(s),(t||l)&&a5(),r),children:o})})}function oS({value:e,defaultValue:t,onChange:r,isDisabled:o,isReadOnly:n,isRequired:a,className:i,children:s,size:l="2",variant:d="primary",columns:c="repeat(auto-fit, minmax(160px, 1fr))",gap:u="1"}){return jsxRuntime.jsx(reactAriaComponents.RadioGroup,{value:e,defaultValue:t,onChange:r,isDisabled:o,isReadOnly:n,isRequired:a,className:Fe(i,"grid"),style:{gridTemplateColumns:/^\d+$/.test(String(c))?`repeat(${c}, minmax(0, 1fr))`:c,gap:u==="1"?"0.25rem":u==="2"?"0.5rem":u==="3"?"0.75rem":u==="4"?"1rem":typeof u=="number"?`${u}px`:u},children:ot__namespace.default.Children.map(s,m=>ot__namespace.default.isValidElement(m)?ot__namespace.default.cloneElement(m,{size:l,variant:d}):m)})}function d5(e){return "primary"}var nS=ot.createContext({variant:"primary"});function aS(e){let{variant:t="primary",...r}=e,o=d5();return jsxRuntime.jsx(nS.Provider,{value:{variant:o},children:jsxRuntime.jsxs(reactAriaComponents.RadioGroup,{...r,className:Fe(e.className,"group flex flex-col gap-2"),children:[jsxRuntime.jsx(et,{children:e.label}),jsxRuntime.jsx("div",{className:`flex ${r.orientation==="horizontal"?"flex-row gap-4":"flex-col gap-2"}`,children:e.children}),e.description&&jsxRuntime.jsx(Ee,{children:e.description}),jsxRuntime.jsx(ye,{children:typeof e.errorMessage=="function"&&e.validationResult?e.errorMessage(e.validationResult):typeof e.errorMessage=="string"?e.errorMessage:null})]})})}function u5({isSelected:e,isInvalid:t,isDisabled:r}){let n=[pt(),"focus-visible:outline-action-primary","w-5 h-5 rounded-full border-2 bg-background-surface transition-all"];return r?n.push("border-border-muted forced-colors:!border-[GrayText]"):t?n.push("border-feedback-error-border group-pressed:border-feedback-error-border dark:group-pressed:border-feedback-error-border forced-colors:!border-[Mark]"):e?n.push("border-[7px] border-action-primary forced-colors:!border-[Highlight] group-pressed:border-action-primary-hover dark:group-pressed:border-action-primary-hover"):n.push("border-border-default group-pressed:border-border-focus dark:group-pressed:border-border-focus"),n.join(" ")}function iS(e){return ot.useContext(nS),jsxRuntime.jsx(reactAriaComponents.Radio,{...e,className:Fe(e.className,"relative group flex items-center gap-2 text-sm text-text-primary transition disabled:text-text-secondary dark:text-text-primary dark:disabled:text-text-secondary forced-colors:disabled:text-[GrayText]"),children:t=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:u5(t)}),e.children]})})}var C5={sm:{toolbar:"p-1.5",contentWrapper:"min-h-[100px]",contentPadding:"p-3",placeholderPos:"left-3 top-3",prose:"prose-xs",h1:"[&_.ProseMirror_h1]:mb-2 [&_.ProseMirror_h1]:text-base [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-1.5 [&_.ProseMirror_h2]:text-sm [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-1",list:"[&_.ProseMirror_ul]:mb-1 [&_.ProseMirror_ul]:ml-4 [&_.ProseMirror_ol]:mb-1 [&_.ProseMirror_ol]:ml-4",li:"[&_.ProseMirror_li]:mb-0.5",placeholderText:"text-xs"},md:{toolbar:"p-2",contentWrapper:"min-h-[200px]",contentPadding:"p-4",placeholderPos:"left-4 top-4",prose:"prose-sm",h1:"[&_.ProseMirror_h1]:mb-4 [&_.ProseMirror_h1]:text-2xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-3 [&_.ProseMirror_h2]:text-xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-2",list:"[&_.ProseMirror_ul]:mb-2 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ol]:mb-2 [&_.ProseMirror_ol]:ml-6",li:"[&_.ProseMirror_li]:mb-1",placeholderText:"text-sm"},lg:{toolbar:"p-2.5",contentWrapper:"min-h-[250px]",contentPadding:"p-5",placeholderPos:"left-5 top-5",prose:"prose-base",h1:"[&_.ProseMirror_h1]:mb-5 [&_.ProseMirror_h1]:text-3xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-4 [&_.ProseMirror_h2]:text-2xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-3",list:"[&_.ProseMirror_ul]:mb-3 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ol]:mb-3 [&_.ProseMirror_ol]:ml-6",li:"[&_.ProseMirror_li]:mb-1.5",placeholderText:"text-base"},xl:{toolbar:"p-3",contentWrapper:"min-h-[300px]",contentPadding:"p-6",placeholderPos:"left-6 top-6",prose:"prose-lg",h1:"[&_.ProseMirror_h1]:mb-6 [&_.ProseMirror_h1]:text-4xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-5 [&_.ProseMirror_h2]:text-3xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-3",list:"[&_.ProseMirror_ul]:mb-3 [&_.ProseMirror_ul]:ml-8 [&_.ProseMirror_ol]:mb-3 [&_.ProseMirror_ol]:ml-8",li:"[&_.ProseMirror_li]:mb-2",placeholderText:"text-lg"}},qi=({isActive:e=false,onPress:t,children:r})=>jsxRuntime.jsx(te,{variant:e?"secondary":"ghost",size:"sm",onPress:t,className:"p-1",children:r});function S5({initialUrl:e,isOpen:t,onClose:r,onSubmit:o}){let[n,a]=ot.useState(e);return ot__namespace.default.useEffect(()=>{a(e);},[e]),jsxRuntime.jsx(Yr,{isDismissable:true,isOpen:t,onOpenChange:s=>!s&&r(),children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"flex items-center justify-center p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"relative bg-background-surface rounded-lg shadow-xl max-w-md w-full",children:jsxRuntime.jsxs("form",{onSubmit:s=>{s.preventDefault(),o(n),r();},children:[jsxRuntime.jsx(Cr,{title:"Insert Link",onClose:r}),jsxRuntime.jsx("div",{className:"p-6",children:jsxRuntime.jsx(fo,{label:"URL",type:"url",value:n,onChange:a,autoFocus:true,className:"w-full"})}),jsxRuntime.jsxs("div",{className:"flex justify-end gap-2 border-t border-border-muted p-4",children:[jsxRuntime.jsx(te,{variant:"secondary",onPress:r,children:"Cancel"}),jsxRuntime.jsx(te,{type:"submit",children:"Save"})]})]})})})})}function cS({initialContent:e="",onChange:t,className:r,isDisabled:o=false,placeholder:n="Start typing...",id:a,size:i="md",headingLevels:s=[1,2]}){let l=C5[i],[d,c]=ot.useState(false),u=react.useEditor({immediatelyRender:false,extensions:[b5__default.default.configure({heading:s.length>0?{levels:s}:false}),m5__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-text-link-default hover:text-text-link-hover underline decoration-text-link-default/30 hover:decoration-text-link-hover cursor-pointer"}})],content:e,editable:!o,onUpdate:({editor:g})=>{t?.(g.getHTML());},editorProps:{attributes:{class:tailwindMerge.twMerge(`prose ${l.prose} max-w-none`,"focus:outline-none","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0")}}}),m=()=>{c(true);},p=g=>{g===""?u?.chain().focus().unsetLink().run():u?.chain().focus().setLink({href:g}).run();};return u?jsxRuntime.jsxs("div",{id:a,"data-richtexteditor":true,className:tailwindMerge.twMerge("flex flex-col rounded-md border border-border-input bg-background-input","outline-none focus-within:outline-none focus-within:border-border-input focus-within:ring-0 focus-within:shadow-none",o&&"opacity-50",r),style:{outline:"none"},children:[!o&&u&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(menus.BubbleMenu,{editor:u,shouldShow:({editor:g})=>g.isActive("link")&&!d,className:"flex items-center gap-1 rounded-md border border-border-input bg-background-surface p-1 shadow-md",children:[jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>{let g=u.getAttributes("link").href;g&&window.open(g,"_blank","noopener,noreferrer");},children:[jsxRuntime.jsx(G,{name:"ArrowSquareOut",className:"mr-1 h-4 w-4"}),"Open"]}),jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:m,children:[jsxRuntime.jsx(G,{name:"PencilSimple",className:"mr-1 h-4 w-4"}),"Edit"]}),jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>u.chain().focus().unsetLink().run(),children:[jsxRuntime.jsx(G,{name:"X",className:"mr-1 h-4 w-4"}),"Remove"]})]}),jsxRuntime.jsx(S5,{isOpen:d,onClose:()=>c(false),onSubmit:p,initialUrl:u.getAttributes("link").href||""})]}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center gap-1 border-b border-border-input",l.toolbar),children:[s.map(g=>jsxRuntime.jsx(qi,{isActive:u.isActive("heading",{level:g}),onPress:()=>u.chain().focus().toggleHeading({level:g}).run(),children:jsxRuntime.jsxs("span",{className:"text-xs font-bold",children:["H",g]})},g)),jsxRuntime.jsx(qi,{isActive:u.isActive("bold"),onPress:()=>u.chain().focus().toggleBold().run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"B"})}),jsxRuntime.jsx(qi,{isActive:u.isActive("italic"),onPress:()=>u.chain().focus().toggleItalic().run(),children:jsxRuntime.jsx("span",{className:"text-xs italic",children:"I"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(qi,{isActive:u.isActive("bulletList"),onPress:()=>u.chain().focus().toggleBulletList().run(),children:jsxRuntime.jsx(G,{name:"ListBullets",className:"h-4 w-4"})}),jsxRuntime.jsx(qi,{isActive:u.isActive("orderedList"),onPress:()=>u.chain().focus().toggleOrderedList().run(),children:jsxRuntime.jsx(G,{name:"ListNumbers",className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(qi,{isActive:u.isActive("link"),onPress:m,children:jsxRuntime.jsx(G,{name:"PaperclipHorizontal",className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative w-full outline-none focus:outline-none",l.contentWrapper),children:[jsxRuntime.jsx(react.EditorContent,{editor:u,className:tailwindMerge.twMerge("w-full outline-none focus:outline-none",l.contentPadding,"[&_.ProseMirror]:min-h-[inherit]","[&_.ProseMirror]:outline-none [&_.ProseMirror]:focus:outline-none",l.h1,l.h2,l.p,"[&_.ProseMirror_ul]:list-disc","[&_.ProseMirror_ol]:list-decimal",l.list,l.li,"[&_.ProseMirror_blockquote]:border-l-4 [&_.ProseMirror_blockquote]:border-border-muted [&_.ProseMirror_blockquote]:pl-4 [&_.ProseMirror_blockquote]:italic","[&_.ProseMirror_code]:rounded [&_.ProseMirror_code]:bg-background-muted [&_.ProseMirror_code]:px-1 [&_.ProseMirror_code]:py-0.5 [&_.ProseMirror_code]:font-mono [&_.ProseMirror_code]:text-sm","[&_.ProseMirror_pre]:rounded-md [&_.ProseMirror_pre]:bg-background-muted [&_.ProseMirror_pre]:p-3 [&_.ProseMirror_pre]:font-mono [&_.ProseMirror_pre]:text-sm","[&_.ProseMirror_hr]:border-border-muted",o&&"pointer-events-none")}),u.isEmpty&&!o&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("pointer-events-none absolute text-text-secondary",l.placeholderPos,l.placeholderText),children:n})]})]}):null}function dS({streetAddress:e,city:t,state:r,postalCode:o,longitude:n,latitude:a,href:i,LinkComponent:s,variant:l="outlined",layout:d="stacked",showMap:c=true,mapHeight:u=200,mapboxAccessToken:m,isLoading:p=false,className:g,contentClassName:f,showMapExpandToggle:b=false,expandedMapTitle:h="Explore map",expandedMapAddressLabel:v,piiEntity:x}){let C=[];t&&C.push(t),r&&o?C.push(`${r} ${o}`):r?C.push(r):o&&C.push(o);let S=C.join(", "),w=v||[e,S].filter(Boolean).join(", "),T=c&&n!==void 0&&a!==void 0,N=({children:R,className:A})=>i?s?jsxRuntime.jsx(s,{href:i,className:A,children:R}):jsxRuntime.jsx(St,{href:i,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",A),asButton:false,children:R}):jsxRuntime.jsx("span",{className:A,children:R});if(p){let R=d==="row";return jsxRuntime.jsxs(at,{variant:l,className:tailwindMerge.twMerge(R?"flex flex-col md:flex-row":"flex flex-col",g),children:[T&&jsxRuntime.jsx(at.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(R&&"md:order-2 md:flex-[2] md:min-w-0"),children:jsxRuntime.jsx(q,{width:"100%",height:u})}),jsxRuntime.jsxs(at.Content,{className:tailwindMerge.twMerge("space-y-2 px-4 md:px-6",R&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center"),children:[jsxRuntime.jsx(q,{width:"100%",height:16}),jsxRuntime.jsx(q,{width:"80%",height:16})]})]})}let k=d==="row";return jsxRuntime.jsxs(at,{variant:l,className:tailwindMerge.twMerge("group/card relative",i&&"cursor-pointer",k?"flex flex-col md:flex-row":"flex flex-col",g),children:[i&&jsxRuntime.jsx(N,{className:"after:absolute after:inset-0 after:z-10",children:jsxRuntime.jsx("span",{className:"sr-only",children:e})}),T&&jsxRuntime.jsx(at.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(k&&"md:order-2 md:flex-[2] md:min-w-0"),children:jsxRuntime.jsx(Ki,{height:u,initialViewState:{longitude:n,latitude:a,zoom:14},showMarker:true,mapboxAccessToken:m,showExpandToggle:b,expandedMapTitle:h,expandedMapAddressLabel:w})}),jsxRuntime.jsx(at.Content,{className:tailwindMerge.twMerge("px-4 md:px-6",k&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center",f),children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 min-w-0 text-left",children:[jsxRuntime.jsx("span",{className:"text-xl font-semibold leading-tight text-text-primary group-hover/card:text-text-brand transition-colors","data-pii-type":x?"address":void 0,"data-pii-entity":x,children:e}),S&&jsxRuntime.jsx("span",{className:"text-lg font-normal leading-relaxed text-text-secondary","data-pii-type":x?"city-state-zip":void 0,"data-pii-entity":x,children:S})]})})]})}function pS({site:e,contact:t,LinkComponent:r,variant:o="outlined",layout:n="stacked",showMap:a=true,mapHeight:i=200,mapboxAccessToken:s,showEmail:l=true,showPhone:d=false,isLoading:c=false,className:u,contentClassName:m,fullHeight:p=false,showMapExpandToggle:g=false,expandedMapTitle:f="Explore map",expandedMapAddressLabel:b}){let h=[];e.city&&h.push(e.city),e.state&&e.postalCode?h.push(`${e.state} ${e.postalCode}`):e.state?h.push(e.state):e.postalCode&&h.push(e.postalCode);let v=h.join(", "),x=b||[e.streetAddress,v].filter(Boolean).join(", "),C=a&&e.longitude!==void 0&&e.latitude!==void 0,S=t?`${t.firstName} ${t.lastName}`.trim():"",w=({children:N,href:k,className:R})=>k?r?jsxRuntime.jsx(r,{href:k,className:R,children:N}):jsxRuntime.jsx(St,{href:k,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",R),asButton:false,children:N}):jsxRuntime.jsx("span",{className:R,children:N});if(c){let N=n==="row";return jsxRuntime.jsxs(at,{variant:o,className:tailwindMerge.twMerge(p&&"h-full",N?"flex flex-col md:flex-row":"flex flex-col",u),children:[C&&jsxRuntime.jsx(at.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(N&&"md:order-2 md:flex-[2] md:min-w-0",p&&"flex-1"),children:jsxRuntime.jsx(q,{width:"100%",height:p?"100%":i})}),jsxRuntime.jsxs(at.Content,{className:tailwindMerge.twMerge("space-y-4 px-4 py-4",N&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center"),children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(q,{width:"100%",height:16}),jsxRuntime.jsx(q,{width:"80%",height:16})]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t border-border-default"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(q,{width:40,height:40,className:"rounded flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[jsxRuntime.jsx(q,{width:"50%",height:14}),jsxRuntime.jsx(q,{width:"100%",height:12})]})]})]})]})]})}let T=n==="row";return jsxRuntime.jsxs(at,{variant:o,className:tailwindMerge.twMerge("group/card relative",e.href&&"cursor-pointer",p&&"h-full",T?"flex flex-col md:flex-row":"flex flex-col",u),children:[e.href&&jsxRuntime.jsx(w,{href:e.href,className:"after:absolute after:inset-0 after:z-10",children:jsxRuntime.jsx("span",{className:"sr-only",children:e.streetAddress})}),C&&jsxRuntime.jsx(at.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(T&&"md:order-2 md:flex-[2] md:min-w-0",p&&"flex-1"),children:jsxRuntime.jsx(Ki,{height:p?"100%":i,initialViewState:{longitude:e.longitude,latitude:e.latitude,zoom:14},showMarker:true,mapboxAccessToken:s,showExpandToggle:g,expandedMapTitle:f,expandedMapAddressLabel:x})}),jsxRuntime.jsxs(at.Content,{className:tailwindMerge.twMerge("space-y-4 px-4 py-4",T&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center",m),children:[jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 min-w-0 text-left",children:[jsxRuntime.jsx("span",{className:"text-xl font-semibold leading-tight text-text-primary group-hover/card:text-text-brand transition-colors","data-pii-type":e.piiEntity?"address":void 0,"data-pii-entity":e.piiEntity,children:e.streetAddress}),v&&jsxRuntime.jsx("span",{className:"text-lg font-normal leading-relaxed text-text-secondary","data-pii-type":e.piiEntity?"city-state-zip":void 0,"data-pii-entity":e.piiEntity,children:v})]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t border-border-default"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 relative",children:[jsxRuntime.jsx(nn,{firstName:t.firstName,lastName:t.lastName,src:t.avatarUrl,size:"md",variant:"user",shape:"square",className:"flex-shrink-0",piiEntity:t.piiEntity}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[t.href?jsxRuntime.jsx(w,{href:t.href,className:"text-sm font-semibold leading-tight text-text-primary block mb-0.5 hover:text-text-brand transition-colors relative z-20",children:jsxRuntime.jsx("span",{"data-pii-type":t.piiEntity?"full-name":void 0,"data-pii-entity":t.piiEntity,children:S})}):jsxRuntime.jsx("span",{className:"text-sm font-semibold leading-tight text-text-primary block mb-0.5","data-pii-type":t.piiEntity?"full-name":void 0,"data-pii-entity":t.piiEntity,children:S}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[l&&t.email&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-text-primary",children:[jsxRuntime.jsx(G,{name:"Envelope",size:12,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(St,{href:`mailto:${t.email}`,variant:"unstyled",className:"text-xs leading-tight truncate text-text-primary relative z-20","data-pii-type":t.piiEntity?"email":void 0,"data-pii-entity":t.piiEntity,children:t.email})]}),d&&t.phone&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-text-primary",children:[jsxRuntime.jsx(G,{name:"Phone",size:12,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(St,{href:`tel:${t.phone}`,variant:"unstyled",className:"text-xs leading-tight truncate text-text-primary relative z-20","data-pii-type":t.piiEntity?"phone":void 0,"data-pii-entity":t.piiEntity,children:ai(t.phone)})]})]})]})]})]})]})]})}function mS({label:e,description:t,tooltip:r,errorMessage:o,size:n="md",className:a,value:i,defaultValue:s=0,onChange:l,min:d=0,max:c=100,step:u=1,disabled:m,showValue:p=true}){let g=typeof i=="number",[f,b]=ot__namespace.default.useState(s),h=g?i:f,v=Math.min(Math.max(h,d),c),x=Math.max(c-d,1e-5),C=(v-d)/x*100;return jsxRuntime.jsxs("div",{className:Fe(a,"group flex w-full flex-col gap-1"),children:[e&&jsxRuntime.jsx(et,{size:n,tooltip:r,className:"mb-1",children:e}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsxs("div",{className:"relative w-full select-none",children:[jsxRuntime.jsx("div",{className:"h-1.5 w-full rounded-full bg-background-muted"}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-action-brand",style:{width:`${C}%`},"aria-hidden":true}),jsxRuntime.jsx("input",{type:"range",min:d,max:c,step:u,value:h,disabled:m,"aria-invalid":!!o,onChange:S=>{let w=Number(S.currentTarget.value);g||b(w),l?.(w);},className:tailwindMerge.twMerge("absolute inset-0 w-full cursor-pointer appearance-none bg-transparent outline-none","[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-background-input [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-border-input","hover:[&::-webkit-slider-thumb]:shadow-sm focus-visible:[&::-webkit-slider-thumb]:outline-2 focus-visible:[&::-webkit-slider-thumb]:outline-action-default","[&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-background-input [&::-moz-range-thumb]:border [&::-moz-range-thumb]:border-border-input","hover:[&::-moz-range-thumb]:shadow-sm focus-visible:[&::-moz-range-thumb]:outline-2 focus-visible:[&::-moz-range-thumb]:outline-action-default",m?"cursor-not-allowed opacity-60":void 0)})]}),p&&jsxRuntime.jsx("div",{className:"min-w-10 text-right text-sm text-text-primary tabular-nums",children:Math.round(v)})]}),t&&jsxRuntime.jsx(Ee,{className:"mt-2 text-text-secondary",children:t}),o&&jsxRuntime.jsx(ye,{className:"mt-1",children:o})]})}var R5=ot__namespace.default.createContext({orientation:"horizontal",isResizing:false});function gS(e,t){return e===void 0?t:e}function M5(e,t){return typeof e=="number"?e:typeof e=="string"&&e.endsWith("%")?Number.parseFloat(e)/100*t:Number.parseFloat(e.toString())}function Cu({asideWidth:e,asideHeight:t,minAsideWidth:r=240,minAsideHeight:o=200,minMainWidth:n=400,minMainHeight:a=300,orientation:i="horizontal",resizable:s=false,onAsideResize:l,onResizeStart:d,onResizeEnd:c,className:u,dividerClassName:m,children:p}){let g=ot.useRef(null),[f,b]=ot.useState(false),h=i==="horizontal"?400:300,v=gS(i==="horizontal"?e:t,h),[x,C]=ot.useState(null),S=ot.useCallback(M=>{if(!g.current||!f)return;let B=g.current.getBoundingClientRect(),D=i==="horizontal"?B.width:B.height,W=i==="horizontal"?M.clientX:M.clientY,H=(i==="horizontal"?B.right:B.bottom)-W,I=D-H,F=i==="horizontal"?r:o,z=i==="horizontal"?n:a;H<F||I<z||(C(H),l?.(H));},[f,i,r,o,n,a,l]),w=ot.useCallback(()=>{b(false),c?.();},[c]),T=ot.useCallback(M=>{M.preventDefault(),M.stopPropagation(),b(true),d?.();},[d]);ot.useEffect(()=>{if(f)return document.addEventListener("mousemove",S),document.addEventListener("mouseup",w),document.body.style.cursor=i==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",w),document.body.style.cursor="",document.body.style.userSelect="";}},[f,S,w,i]);let N=ot__namespace.default.Children.toArray(p).find(M=>ot__namespace.default.isValidElement(M)&&M.type===bS),k=ot__namespace.default.Children.toArray(p).find(M=>ot__namespace.default.isValidElement(M)&&M.type===xS),R=x??v,A=typeof R=="number"?`${R}px`:R;return jsxRuntime.jsx(R5.Provider,{value:{orientation:i,isResizing:f},children:jsxRuntime.jsxs("div",{ref:g,className:tailwindMerge.twMerge("flex w-full h-full",i==="horizontal"?"flex-row":"flex-col",u),children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-auto flex-1",i==="horizontal"?"h-full":"w-full"),children:N}),s&&jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative group flex-shrink-0",i==="horizontal"?"w-2 -mx-1 cursor-col-resize":"h-2 -my-1 cursor-row-resize",m),onMouseDown:T,role:"separator","aria-orientation":i,"aria-label":"Resize divider",tabIndex:0,onKeyDown:M=>{if(!g.current)return;let B=g.current.getBoundingClientRect(),D=i==="horizontal"?B.width:B.height,W=x??M5(v,D),X=20,H=i==="horizontal"?r:o,I=i==="horizontal"?n:a;if(i==="horizontal"){if(M.key==="ArrowLeft"){let F=Math.min(W+X,D-I);C(F),l?.(F);}else if(M.key==="ArrowRight"){let F=Math.max(W-X,H);C(F),l?.(F);}}else if(M.key==="ArrowUp"){let F=Math.min(W+X,D-I);C(F),l?.(F);}else if(M.key==="ArrowDown"){let F=Math.max(W-X,H);C(F),l?.(F);}},children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute bg-border-default transition-all",i==="horizontal"?"left-1/2 -translate-x-1/2 w-px h-full group-hover:w-1":"top-1/2 -translate-y-1/2 h-px w-full group-hover:h-1","group-hover:bg-action-brand/50",f&&"bg-action-brand",f&&(i==="horizontal"?"w-1":"h-1"))}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute",i==="horizontal"?"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1 h-8":"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-8 h-1","bg-border-muted rounded-full opacity-0 group-hover:opacity-100 transition-opacity")})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-auto flex-shrink-0",i==="horizontal"?"h-full":"w-full"),style:{[i==="horizontal"?"width":"height"]:A},children:k})]})})}function bS({className:e,children:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full h-full",e),children:t})}function xS({className:e,children:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full h-full",e),children:t})}Cu.Main=bS;Cu.Aside=xS;var L5=e=>{let t=rr({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=`min-h-[100px] py-2 ${e.isDisabled?"resize-none":e.isResizable?"resize-y":"resize-none"}`;return tailwindMerge.twMerge(t,r,e.className)};function yS({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,required:a,transparent:i,isInvalid:s,isDisabled:l,isResizable:d=false,className:c,validationResult:u,reserveErrorSpace:m=true,...p}){let{isFocused:g,handleFocus:f,handleBlur:b}=Ar();return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsx("textarea",{...p,required:a,onFocus:h=>{p.onFocus&&p.onFocus(h),f(h);},onBlur:h=>{p.onBlur&&p.onBlur(h),b(h);},className:L5({isInvalid:s,isDisabled:l,isResizable:d,isFocused:g,size:o,transparent:i,className:c}),disabled:l})}),m?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&u?jsxRuntime.jsx(ye,{size:o,children:r(u)}):t?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&u?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(u)}):t?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})})}function wS({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,required:a,transparent:i,isInvalid:s,isDisabled:l,isResizable:d=false,className:c,validationResult:u,value:m="",onChange:p,chips:g=[],onChipsChange:f,triggerPattern:b="{{",onTriggerDetected:h,onTriggerDismissed:v,renderChip:x,chipVariant:C="primary",chipSize:S,...w}){let T=ot.useRef(null),{isFocused:N,handleFocus:k,handleBlur:R}=Ar(),A=S||"sm",M=ot.useRef(null),B=ot.useCallback(z=>{let U="",K=O=>{if(O.nodeType===Node.TEXT_NODE){if(!O.parentElement?.closest("[data-chip-id]")){let L=O.textContent||"";U+=L;}}else if(O.nodeType===Node.ELEMENT_NODE){let V=O;if(V.hasAttribute("data-chip-id")){let L=V.getAttribute("data-chip-id");U+=`{{${L}}}`;return}else if(V.tagName==="BR"){U+=`
|
|
184
|
-
`;return}else V.tagName;}for(let V=0;V<
|
|
183
|
+
`,backgroundSize:"30px 30px"}})})})}var K0="color-mix(in srgb, var(--color-map-neutral-border) 8%, transparent)",i4={backgroundImage:`linear-gradient(to right, ${K0} 1px, transparent 1px), linear-gradient(to bottom, ${K0} 1px, transparent 1px)`,backgroundSize:"24px 24px"},s4={backgroundColor:"color-mix(in srgb, var(--color-map-marker-default) 12%, transparent)"};function tu({style:e,className:t,message:r="Map requires Mapbox token",schematic:o=false,showMarker:n=true}){return o?jsxRuntime.jsxs("div",{style:e,"data-testid":"map-schematic",className:tailwindMerge.twMerge("relative overflow-hidden border border-map-neutral-border bg-background-muted",t),children:[jsxRuntime.jsx("div",{"aria-hidden":"true",className:"absolute inset-0",style:i4}),n?jsxRuntime.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:"absolute h-24 w-24 rounded-full",style:s4}),jsxRuntime.jsx(W,{name:"MapPin",size:36,weight:"fill",className:"relative text-map-marker-default"})]}):null]}):jsxRuntime.jsx("div",{style:e,className:tailwindMerge.twMerge("flex items-center justify-center bg-background-muted text-text-secondary",t),children:jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx(W,{name:"MapPin",size:48,className:"mx-auto mb-2 opacity-50"}),jsxRuntime.jsx("p",{className:"text-sm",children:r})]})})}var Y0=ot.createContext(null);function X0({mapStyleUrl:e,children:t}){return jsxRuntime.jsx(Y0.Provider,{value:e??null,children:t})}function Gi(){return ot.useContext(Y0)}var J0={streets:"streets",satellite:"satellite",neutral:"neutral"},ru="streets";function ou(e,t,r){if(r)return r;switch(e){case "streets":return t?"mapbox://styles/victor-texture/clzwxtrng005s01p93rtr04op":"mapbox://styles/mapbox/streets-v12";case "satellite":return "mapbox://styles/mapbox/satellite-streets-v12";case "neutral":return t?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11";default:return t?"mapbox://styles/victor-texture/clzwxtrng005s01p93rtr04op":"mapbox://styles/mapbox/streets-v12"}}function j0({longitude:e,latitude:t,showPulse:r=true,accuracy:o}){return jsxRuntime.jsx(g4.Marker,{longitude:e,latitude:t,anchor:"center",children:jsxRuntime.jsxs("div",{className:"relative flex items-center justify-center",children:[r&&jsxRuntime.jsx("div",{className:"absolute h-12 w-12 animate-[ping_2s_ease-in-out_infinite] rounded-full bg-action-brand opacity-30",style:{animationDelay:"0s"}}),jsxRuntime.jsx("div",{className:"relative z-10 flex h-5 w-5 items-center justify-center rounded-full bg-background-surface shadow-lg",children:jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-action-brand"})}),o&&o>0&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute rounded-full border border-action-brand/20 bg-action-brand/10",style:{width:`${Math.min(o/2,100)}px`,height:`${Math.min(o/2,100)}px`}})]})})}var v4={name:"mercator"},C4=[],sl=ot__namespace.default.forwardRef(({initialViewState:e,mapStyleUrl:t,viewState:r,onViewStateChange:o,scrollEnabled:n=true,className:a,previewMode:i=false,previewModeCta:s,onPreviewModePress:d,mapType:c=ru,layers:l=[],mapboxAccessToken:u,transformRequest:m,isLoading:p=false,onLoad:g,controls:f="default",showUserLocation:h=true,onUserLocationChange:b,children:v,additionalInteractiveLayerIds:x=C4,onMapClick:C,showMarker:w=false,markerLocation:S},T)=>{let N=u??Ud();if(!N)return jsxRuntime.jsx("div",{className:`relative ${a||""}`,style:{width:"100%",height:"100%"},children:jsxRuntime.jsx(tu,{className:"w-full h-full",message:"Map unavailable"})});let{isDarkTheme:k}=hr(),R=Gi(),L=t??R,E=ot.useRef(null),B=ot.useRef(null),[A,H]=ot.useState(false),[Y,G]=ot.useState(false);ot.useEffect(()=>{$d();},[]);let[I,F]=ot.useState(false),O=ot.useRef(0),[U,K]=ot.useState(null),[z,V]=ot.useState(null),D=ot.useRef(null),y=ot.useRef(null),[M,P]=Kd("interactiveMap.trackingLocation",false),[X,$]=ot.useState(false);ot.useEffect(()=>{if(!navigator.geolocation){$(true);return}if(M){if(!navigator.permissions?.query){$(true);return}navigator.permissions.query({name:"geolocation"}).then(Q=>{Q.state!=="granted"&&P(false),$(true);}).catch(()=>{$(true);});}else $(true);},[]),ot.useEffect(()=>{let Q=setTimeout(()=>{A||G(true);},200);return ()=>clearTimeout(Q)},[A]),ot.useEffect(()=>{y.current=null;},[c,k]),ot.useEffect(()=>{if(A)return;let Q=setInterval(()=>{if(E.current?.loaded()){H(true),G(false);let j=E.current.getMap?.();j&&y.current!==j&&(y.current=j,g?.()),clearInterval(Q);}},200);return ()=>clearInterval(Q)},[A,g]),ot.useEffect(()=>{if(X){if(!M||i){D.current!==null&&(navigator.geolocation.clearWatch(D.current),D.current=null);return}if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}return D.current=navigator.geolocation.watchPosition(Q=>{let j={latitude:Q.coords.latitude,longitude:Q.coords.longitude,accuracy:Q.coords.accuracy};V(j),b?.(j);},Q=>{console.warn("Geolocation error:",Q.message),V(null),b?.(null);},{enableHighAccuracy:true,maximumAge:3e4,timeout:3e4}),()=>{D.current!==null&&(navigator.geolocation.clearWatch(D.current),D.current=null);}}},[M,i,b,X]);let oe=ot.useCallback(()=>{H(true),G(false);let Q=E.current?.getMap?.();Q&&y.current!==Q&&(y.current=Q,g?.());},[g]),re=ot.useCallback(()=>{E.current&&e&&(F(false),O.current=0,E.current.flyTo({center:[e.longitude||0,e.latitude||0],zoom:e.zoom||0,bearing:e.bearing||0,pitch:e.pitch||0,duration:1e3}));},[e]),_=ot.useMemo(()=>f===false||f===null?[]:f==="default"||f===void 0?Rf:f,[f]),he=ot.useCallback(()=>{if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}P(true),navigator.geolocation.getCurrentPosition(Q=>{let{latitude:j,longitude:pe}=Q.coords;E.current&&E.current.jumpTo({center:[pe,j],zoom:15});},Q=>{console.warn("Geolocation error:",Q.message),Q.code===Q.PERMISSION_DENIED&&P(false);},{enableHighAccuracy:true,timeout:1e4,maximumAge:0});},[]),me=ot.useMemo(()=>{if(i)return null;let Q=_.map(j=>j.type==="navigation"?{...j,onResetZoom:j.onResetZoom||re,onGeolocateClick:j.onGeolocateClick||he}:j);return If(Q,{mapRef:E,layers:l,showResetButton:I})},[_,E,i,l,re,I,he]),ue=ot.useMemo(()=>{let Q=[];return l.filter(j=>j.events?.onClick||j.events?.onMouseEnter||j.events?.onMouseLeave||j.tooltip||j.kind==="vector"&&j.revealChipOnHover).forEach(j=>{j.kind==="clusteredVector"?(Q.push(`${j.id}-clusters`),Q.push(`${j.id}-points`),Q.push(`${j.id}-selected-point`)):Q.push(j.id);}),[...Q,...x]},[l,x]),ie=ot.useMemo(()=>{let Q=new Map;return l.forEach(j=>{j.events&&(Q.set(j.id,j.events),j.kind==="clusteredVector"&&(Q.set(`${j.id}-clusters`,j.events),Q.set(`${j.id}-points`,j.events),Q.set(`${j.id}-selected-point`,j.events)));}),Q},[l]),fe=ot.useMemo(()=>{let Q=new Map;return l.forEach(j=>{j.tooltip&&(Q.set(j.id,j.tooltip),j.kind==="clusteredVector"&&(Q.set(`${j.id}-clusters`,j.tooltip),Q.set(`${j.id}-points`,j.tooltip),Q.set(`${j.id}-selected-point`,j.tooltip)));}),Q},[l]),Te=ot.useMemo(()=>{let Q=new Map;return l.forEach(j=>{j.kind==="clusteredVector"&&(Q.set(j.id,j),Q.set(`${j.id}-clusters`,j),Q.set(`${j.id}-points`,j),Q.set(`${j.id}-selected-point`,j));}),Q},[l]),Ye=ot.useMemo(()=>{if(!w)return null;let Q=S?.longitude??r?.longitude??e?.longitude,j=S?.latitude??r?.latitude??e?.latitude;return Q===void 0||j===void 0?null:{longitude:Q,latitude:j}},[w,S,r,e]),yt=ot.useCallback(Q=>{if(i)return;let j=Q.features?.[0];if(!j||!j.layer)return;let pe=j.layer.id,ae=ie.get(pe),Ne=fe.get(pe),Qe;j.geometry.type==="Point"?Qe=j.geometry.coordinates:Qe=[Q.lngLat.lng,Q.lngLat.lat];let Ue={id:j.id??j.properties?.id,lngLat:Qe,properties:j.properties||{},layerId:pe},cr=Te.get(pe),Z=j.properties?.cluster===true;if(cr&&Z){let le=E.current;if(le){let Ae=le.getZoom(),Oe=Math.min(Ae+3,18);le.flyTo({center:Qe,zoom:Oe,duration:1e3});}return}if(ae?.onClick&&ae.onClick(Ue),Ne&&Ne.trigger==="click"){let le;cr&&"cluster"in Ne?Ne.point&&(le=Ne.point(Ue)):"content"in Ne&&(le=typeof Ne.content=="function"?Ne.content(Ue):Ne.content),le&&K({feature:Ue,content:le,bare:Ne.bare});}C&&C(Q);},[ie,fe,i,C,Te,E,ue]),Qt=ot.useMemo(()=>new Set(l.filter(Q=>Q.kind==="vector"&&Q.revealChipOnHover).map(Q=>Q.id)),[l]),Ze=ot.useRef(null),fr=ot.useCallback(()=>{let Q=Ze.current;if(!(!Q||!E.current)){Ze.current=null;try{E.current.removeFeatureState({source:Q.source,sourceLayer:Q.sourceLayer,id:Q.id},"hover");}catch{}}},[E]);ot.useEffect(()=>{Ze.current=null;},[c,k,L]);let lr=ot.useCallback(Q=>{let j=Q.features?.find(ae=>ae.layer&&Qt.has(ae.layer.id));if(!j||j.id==null){fr();return}let pe=Ze.current;pe&&pe.source===j.source&&pe.id===j.id||(fr(),E.current&&(Ze.current={source:j.source,sourceLayer:j.sourceLayer,id:j.id},E.current.setFeatureState({source:j.source,sourceLayer:j.sourceLayer,id:j.id},{hover:true})));},[Qt,fr,E]),Ce=ot.useCallback(Q=>{let j=Q.features?.[0];if(!j||!j.layer)return null;let pe=j.layer.id,ae=fe.get(pe);if(!ae||ae.trigger!=="hover"&&ae.trigger!==void 0)return null;let Ne;j.geometry.type==="Point"?Ne=j.geometry.coordinates:Ne=[Q.lngLat.lng,Q.lngLat.lat];let Qe={id:j.id??j.properties?.id,lngLat:Ne,properties:j.properties||{},layerId:pe},Ue;if(Te.get(pe)&&"cluster"in ae){let Z=j.properties?.cluster===true;if(Z&&ae.cluster){let le=j.properties?.point_count||0;Ue=ae.cluster(le,Qe);}else !Z&&ae.point?Ue=ae.point(Qe):Ue=Z?`${j.properties?.point_count||0} items`:null;}else "content"in ae&&(Ue=typeof ae.content=="function"?ae.content(Qe):ae.content);return Ue?{feature:Qe,content:Ue,bare:ae.bare}:null},[fe,Te]),Vt=ot.useCallback(Q=>{if(i)return;let j=Q.features?.[0];if(!j||!j.layer)return;let pe=j.layer.id,ae=ie.get(pe);if(ae?.onMouseEnter){let Qe;j.geometry.type==="Point"?Qe=j.geometry.coordinates:Qe=[Q.lngLat.lng,Q.lngLat.lat];let Ue={id:j.id??j.properties?.id,lngLat:Qe,properties:j.properties||{},layerId:pe};ae.onMouseEnter(Ue);}let Ne=Ce(Q);Ne&&K(Ne),E.current&&(E.current.getCanvas().style.cursor="pointer");},[ie,i,E,Ce]),ee=ot.useCallback(Q=>{if(i)return;lr(Q);let j=Q.features?.[0];if(!j||!j.layer)return;let pe=Ce(Q);if(pe){K(ae=>ae&&ae.feature.layerId===pe.feature.layerId&&ae.feature.id===pe.feature.id?ae:pe);return}K(ae=>{if(!ae)return ae;let Ne=fe.get(ae.feature.layerId);return Ne&&(Ne.trigger==="hover"||Ne.trigger===void 0)?null:ae});},[i,Ce,fe,lr]),Be=ot.useCallback(()=>{if(!i){if(fr(),ie.forEach(Q=>{Q.onMouseLeave?.();}),U){let Q=U.feature.layerId,j=l.find(pe=>pe.id===Q);if(!j){let pe=Q.replace(/-(?:clusters|points|selected-point|cluster-shadows|points-shadow|cluster-count)$/,"");j=l.find(ae=>ae.id===pe);}j?.tooltip&&(j.tooltip.trigger||"hover")==="hover"&&K(null);}E.current&&(E.current.getCanvas().style.cursor="");}},[ie,i,E,U,l,fr]),Ve=ot.useCallback((Q,j)=>{for(let pe of l)if(pe.tooltip&&!(j&&pe.id!==j)){if(pe.kind==="geojson"){if(typeof pe.data=="string")continue;let ae=pe.data,Qe=(ae.type==="FeatureCollection"?ae.features:[ae]).find(Ue=>Ue.id===Q);if(Qe&&Qe.geometry.type==="Point")return {id:Qe.id,lngLat:Qe.geometry.coordinates,properties:Qe.properties||{},layerId:pe.id}}else if(pe.kind==="customPins"){let ae=pe.data.find(Ne=>Ne.id===Q||Ne._id===Q||Ne.key===Q);if(ae)return {id:Q,lngLat:pe.getPosition(ae),properties:ae,layerId:pe.id}}}return null},[l]);ot.useImperativeHandle(T,()=>({showTooltip:(Q,j)=>{let pe=Ve(Q,j);if(!pe)return;let ae=l.find(Ne=>Ne.id===pe.layerId);if(ae?.tooltip&&"content"in ae.tooltip){let Ne=typeof ae.tooltip.content=="function"?ae.tooltip.content(pe):ae.tooltip.content;K({feature:pe,content:Ne,bare:ae.tooltip.bare});}},hideTooltip:()=>{K(null);},getMap:()=>E.current,markMapAsMoved:()=>{F(true);}}),[Ve,l]);let nt=(Q,j)=>m?m(Q,j):{url:Q},wt=p||Y,Xt=ot.useMemo(()=>al(l,c),[l,c]);return jsxRuntime.jsx("div",{ref:B,className:tailwindMerge.twMerge("relative flex h-full w-full overflow-hidden",i&&"cursor-pointer",a),onClick:i?d:void 0,children:jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsxs(g4__default.default,{ref:E,initialViewState:e,...r&&r,style:{width:"100%",height:"100%"},mapStyle:ou(c,k,L),styleDiffing:false,projection:v4,mapboxAccessToken:N,transformRequest:nt,onLoad:oe,onMove:i?void 0:Q=>{if(Q.originalEvent&&A){let j=Q.originalEvent.type,pe=Math.abs((Q.viewState.latitude??0)-(e?.latitude??0)),ae=Math.abs((Q.viewState.longitude??0)-(e?.longitude??0)),Ne=Math.abs((Q.viewState.zoom??0)-(e?.zoom??0));e&&(pe>1e-4||ae>1e-4||Ne>.1)&&(j==="mousemove"||j==="touchmove"||j==="pointermove"?F(true):(j==="wheel"||j==="mousewheel")&&(O.current+=1,O.current>=3&&F(true)));}o?.(Q.viewState);},onClick:i?void 0:yt,onMouseMove:i?void 0:ee,onMouseEnter:i?void 0:Vt,onMouseLeave:i?void 0:Be,interactiveLayerIds:i?[]:ue,scrollZoom:i?false:n,dragPan:!i,dragRotate:!i,doubleClickZoom:!i,interactive:!i,attributionControl:false,children:[jsxRuntime.jsx(g4.AttributionControl,{position:"top-left"}),me,Xt,v,Ye&&jsxRuntime.jsx(g4.Marker,{longitude:Ye.longitude,latitude:Ye.latitude,anchor:"bottom",children:jsxRuntime.jsx(W,{name:"MapPin",size:36,className:"text-map-marker-default",weight:"fill"})}),h&&z&&jsxRuntime.jsx(j0,{longitude:z.longitude,latitude:z.latitude,accuracy:z.accuracy}),U&&jsxRuntime.jsx(g4.Popup,{longitude:U.feature.lngLat[0],latitude:U.feature.lngLat[1],offset:15,closeButton:false,closeOnClick:false,className:U.bare?"map-tooltip map-tooltip-bare":"map-tooltip",maxWidth:"none",children:U.content})]},`map-${c}-${k}-${L??"default"}`),wt&&jsxRuntime.jsx(eu,{}),i&&s&&jsxRuntime.jsx("div",{className:"absolute bottom-8 right-8 z-10",children:s})]})})});sl.displayName="InteractiveMap";async function Z0(e,t,r,o={}){if(e.hasImage(t))return;let n=o.size??64,a=o.color??"#2c2a26",i=o.weight??"regular",s=server.renderToStaticMarkup(ot.createElement(r,{size:n,color:a,weight:i})),d=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`;await new Promise((c,l)=>{let u=new Image(n,n);u.onload=()=>{try{e.hasImage(t)||e.addImage(t,u,{sdf:!1}),c();}catch(m){l(m instanceof Error?m:new Error(`Failed to addImage "${t}": ${String(m)}`));}},u.onerror=m=>{l(m instanceof Error?m:new Error(`Failed to load icon "${t}"`));},u.src=d;});}function Ki({width:e="100%",height:t="100%",initialViewState:r={longitude:-122.4194,latitude:37.7749,zoom:14},isLoading:o=false,mapType:n="streets",mapStyleUrl:a,layers:i=[],mapboxAccessToken:s,showMarker:d=true,markerOffsetY:c=0,showAttribution:l=false,onLoad:u,className:m,showExpandToggle:p=false,expandedMapTitle:g="Explore map",expandedMapAddressLabel:f,schematicPlaceholder:h=false}){let b=s??Ud(),{isDarkTheme:v}=hr(),[x,C]=ot.useState(false),[w,S]=ot.useState(false),T=Gi(),N=a??T,[k,R]=ot.useState(false),L=ot.useRef(null),E=ot.useRef(null),B=ot.useCallback(()=>R(true),[]),A=ot.useCallback(()=>R(false),[]);ot.useEffect(()=>{$d();},[]);let H={width:typeof e=="number"?`${e}px`:e,height:typeof t=="number"?`${t}px`:t};ot.useEffect(()=>{let I=setTimeout(()=>{x||S(true);},200);return ()=>clearTimeout(I)},[x]);let Y=ot.useCallback(()=>{C(true),S(false),u?.();},[u]);ot.useEffect(()=>{if(!E.current)return;let I=new ResizeObserver(()=>{L.current&&L.current.resize();});return I.observe(E.current),()=>{I.disconnect();}},[]);let G=o||w;return b?jsxRuntime.jsxs("div",{ref:E,style:H,className:`relative ${m||""}`,children:[jsxRuntime.jsxs(g4__default.default,{ref:L,mapboxAccessToken:b,initialViewState:r,style:{width:"100%",height:"100%"},mapStyle:ou(n,v,N),onLoad:Y,scrollZoom:false,dragPan:false,dragRotate:false,doubleClickZoom:false,touchZoomRotate:false,interactive:false,attributionControl:false,children:[l&&jsxRuntime.jsx(g4.AttributionControl,{position:"top-left"}),al(i,n),d&&r.longitude!==void 0&&r.latitude!==void 0&&jsxRuntime.jsx(g4.Marker,{longitude:r.longitude,latitude:r.latitude,anchor:"bottom",offset:[0,c],children:jsxRuntime.jsx(W,{name:"MapPin",size:36,className:"text-map-marker-default",weight:"fill"})})]}),p&&jsxRuntime.jsx("div",{className:"absolute top-4 right-4 z-20",children:jsxRuntime.jsx(no,{icon:"ArrowsOutSimple",ariaLabel:"Expand map to fullscreen",onPress:B})}),p&&jsxRuntime.jsx(Lr,{isOpen:k,onClose:A,title:g,contentPadding:false,maxWidth:"min(1100px, 100vw)",minWidth:"min(360px, 100vw)",height:"80vh",mobileHeight:"82vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"flex-1 min-h-0 overflow-hidden sm:mx-4 sm:mt-4 sm:rounded-xl sm:border sm:border-border-default",children:jsxRuntime.jsx(sl,{initialViewState:r,mapType:n,mapStyleUrl:N,mapboxAccessToken:b,showMarker:d,markerLocation:r.longitude!==void 0&&r.latitude!==void 0?{latitude:r.latitude,longitude:r.longitude}:void 0,layers:i})}),f&&jsxRuntime.jsx("p",{className:"text-sm text-text-secondary px-4 py-3 flex-shrink-0",children:f})]})}),G&&jsxRuntime.jsx(eu,{})]}):jsxRuntime.jsx(tu,{style:H,className:m,schematic:h,showMarker:d})}var M4={xs:{bar:"h-1 w-14",text:"text-xs",icon:"h-2.5 w-2.5"},sm:{bar:"h-1.5 w-48",text:"text-xs",icon:"h-3 w-3"},md:{bar:"h-2 w-64",text:"text-sm",icon:"h-4 w-4"},lg:{bar:"h-3 w-80",text:"text-base",icon:"h-5 w-5"}};function _0({label:e,size:t="md",variant:r="default",showWarningIndicator:o=true,warningThreshold:n=80,hideValueText:a=false,className:i,...s}){let d=M4[t],c=a&&e&&!s["aria-label"]&&!s["aria-labelledby"]?{"aria-label":e}:{};return jsxRuntime.jsx(reactAriaComponents.Meter,{...s,...c,className:Fe(i,"flex flex-col gap-1"),children:({percentage:l,valueText:u})=>{let m=o&&l>=n,p=r==="default"?E4(l):r;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!a&&jsxRuntime.jsxs("div",{className:"flex justify-between gap-2",children:[e&&jsxRuntime.jsx(et,{children:e}),jsxRuntime.jsxs("span",{className:tailwindMerge.twMerge(d.text,m?"text-feedback-error-text":"text-text-secondary"),children:[m&&jsxRuntime.jsx(lucideReact.AlertTriangle,{"aria-label":"Warning: High value",className:tailwindMerge.twMerge("inline-block align-text-bottom mr-1",d.icon)}),u]})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative rounded-full bg-background-muted","ring-1 ring-inset ring-border-muted",d.bar),children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute left-0 top-0 h-full rounded-full transition-all duration-300","forced-colors:bg-[Highlight]",L4(p)),style:{width:`${Math.min(100,Math.max(0,l))}%`},role:"presentation","aria-hidden":"true"})})]})}})}function E4(e){return e<50?"success":e<70?"info":e<90?"warning":"error"}function L4(e){switch(e){case "success":return "bg-feedback-success-text";case "warning":return "bg-feedback-warning-text";case "error":return "bg-feedback-error-text";case "info":return "bg-feedback-info-text";case "neutral":return "bg-text-subtle";default:return "bg-action-brand"}}var Zf=(e,t)=>e.toLocaleLowerCase().includes(t.toLocaleLowerCase());function Qf(e){return [e.value,e.label]}function au(e,t,r=Zf){let o=t.trim();return o===""?[...e]:e.filter(n=>Qf(n).some(a=>r(a,o)))}function iu(e){let t=e.query.trim();if(t==="")return false;let r=t.toLocaleLowerCase();return e.options.some(n=>n.value.toLocaleLowerCase()===r||n.label.toLocaleLowerCase()===r)?false:!e.selected.some(n=>n.toLocaleLowerCase()===r)}function su(e,t){return e.map(r=>{let o=t.find(n=>n.value===r);return o?o.count===void 0?{value:r,label:o.label,isUnknown:false}:{value:r,label:o.label,count:o.count,isUnknown:false}:{value:r,label:r,isUnknown:true}})}var B4=e=>e.kind==="literal"?`literal:${e.value}`:`option:${e.option.value}`,_f=e=>e.kind==="literal"?e.value:e.option.value,$0=e=>e.kind==="literal"?e.value:e.option.label,V4={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},O4={sm:"pl-8",md:"pl-10",lg:"pl-11",xl:"pl-13"},z4={sm:"xs",md:"xs",lg:"sm",xl:"sm"};function eS({options:e,value:t,defaultValue:r,onChange:o,label:n,placeholder:a,size:i="md",loading:s=false,disabled:d=false,maxSelected:c,allowLiteral:l=false,onSearchChange:u,truncated:m=false,totalCount:p,emptyMessage:g,showSelectAll:f=false,description:h,errorMessage:b,isRequired:v=false,onBlur:x,inputRef:C,labelHidden:w=false,className:S,id:T}){let N=ot.useId(),k=T??`multiselect-${N}`,R=`${k}-input`,L=`${k}-listbox`,E=ot.useRef(null),B=ot.useCallback(ee=>{E.current=ee,typeof C=="function"?C(ee):C&&(C.current=ee);},[C]),{contains:A}=reactAria.useFilter({sensitivity:"base"}),{isFocused:H,handleFocus:Y,handleBlur:G}=Dr(),[I,F]=ot.useState(""),[O,U]=ot.useState(true),[K,z]=ot.useState(null),[V,D]=ot.useState(""),[y,M]=ot.useState(()=>[...r??[]]),P=ot.useMemo(()=>t?[...t]:y,[t,y]),X=ot.useMemo(()=>au(e,I,A),[e,I,A]),$=l&&!s&&iu({query:I,options:e,selected:P}),oe=ot.useMemo(()=>{let ee=X.map(Be=>({kind:"option",option:Be}));return $?[{kind:"literal",value:I.trim()},...ee]:ee},[X,$,I]),re=ot.useMemo(()=>su(P,e),[P,e]),_=c!==void 0&&P.length>=c,he=ot.useCallback((ee,Be)=>{t||M(ee),D(`${Be} ${ee.length} selected.`),o(ee);},[o,t]),me=ot.useCallback((ee,Be)=>{if(!d){if(P.includes(ee)){he(P.filter(Ve=>Ve!==ee),`${Be} removed.`);return}_||he([...P,ee],`${Be} selected.`);}},[_,he,d,P]),ue=ot.useCallback(ee=>{ee.kind==="option"&&ee.option.disabled||me(_f(ee),$0(ee));},[me]),ie=ee=>{if(d||ee.length===0)return;let Be=new Set(ee),Ve=ee.map(nt=>re.find(wt=>wt.value===nt)?.label??nt);he(P.filter(nt=>!Be.has(nt)),`${Ve.join(", ")} removed.`);},fe=ee=>{F(ee),z(null),U(true),u?.(ee);},Te=ee=>{if(oe.length===0){z(null);return}z(Be=>Be===null?ee>0?0:oe.length-1:(Be+ee+oe.length)%oe.length);},Ye=ee=>{if(d)return;let Be=K===null?void 0:oe[K];switch(ee.key){case "ArrowDown":ee.preventDefault(),U(true),Te(1);break;case "ArrowUp":ee.preventDefault(),U(true),Te(-1);break;case "Home":oe.length>0&&(ee.preventDefault(),U(true),z(0));break;case "End":oe.length>0&&(ee.preventDefault(),U(true),z(oe.length-1));break;case "Enter":Be&&(ee.preventDefault(),ue(Be));break;case " ":I===""&&Be&&(ee.preventDefault(),ue(Be));break;case "Escape":ee.preventDefault(),I!==""?fe(""):(U(false),z(null));break;case "Backspace":I===""&&P.length>0&&(ee.preventDefault(),ie([P[P.length-1]]));break;}},yt=X.filter(ee=>!ee.disabled&&!P.includes(ee.value)).map(ee=>ee.value),Qt=c===void 0?yt.length:Math.max(0,c-P.length),Ze=Math.min(yt.length,Qt),fr=Ze===yt.length?`Select all ${yt.length} matching`:`Select ${Ze} of ${yt.length} matching`,lr=()=>{if(d||Ze===0)return;let ee=yt.slice(0,Ze);he([...P,...ee],`${ee.length} matching options selected.`);},Ce=s?"loading":e.length===0?"empty":X.length===0&&I.trim()!==""?"no-match":null,Vt=_e[i].text;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex w-full flex-col gap-1",S),"data-testid":"multiselect",children:[jsxRuntime.jsx(et,{size:i,htmlFor:R,isRequired:v,...w?{className:"sr-only"}:{},children:n}),jsxRuntime.jsxs(Dt,{children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 z-10 flex -translate-y-1/2 items-center",children:s?jsxRuntime.jsx(io,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(W,{name:"MagnifyingGlass",className:tailwindMerge.twMerge(V4[i],"text-text-secondary")})}),jsxRuntime.jsx("input",{ref:B,id:R,type:"text",role:"combobox",autoComplete:"off","aria-expanded":O,"aria-controls":L,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":O&&K!==null&&oe[K]?`${k}-row-${K}`:void 0,"aria-required":v||void 0,"aria-invalid":b?true:void 0,value:I,placeholder:a,disabled:d,onChange:ee=>fe(ee.target.value),onKeyDown:Ye,onFocus:ee=>{U(true),Y(ee);},onBlur:ee=>{G(ee),x?.(ee);},className:rr({isDisabled:d,isFocused:H,isInvalid:!!b,size:i,className:tailwindMerge.twMerge(O4[i],"pr-3")})})]}),re.length>0&&jsxRuntime.jsx("div",{"data-testid":"multiselect-selection-region",role:"group","aria-label":`Selected ${n}`,className:"flex flex-wrap gap-1.5 rounded-[var(--control-border-radius)] border border-border-default bg-background-muted p-2",children:re.map(ee=>jsxRuntime.jsx(co,{size:z4[i],variant:"primary",isDisabled:d,removeLabel:`Remove ${ee.label}`,onRemove:()=>ie([ee.value]),className:"shrink-0",children:ee.isUnknown?jsxRuntime.jsx("span",{"data-testid":`multiselect-selection-unknown-${ee.value}`,title:"Not in the current option list",children:`${ee.label} (custom)`}):ee.label},ee.value))}),f&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(te,{variant:"link",size:i,onPress:lr,isDisabled:d||Ze===0,children:fr}),jsxRuntime.jsx(te,{variant:"link",size:i,onPress:()=>ie(P),isDisabled:d||P.length===0,children:"Clear all"})]}),jsxRuntime.jsx("div",{id:L,role:"listbox","aria-multiselectable":"true","aria-label":`${n} options`,hidden:!O,className:tailwindMerge.twMerge(Vt,"max-h-[260px] overflow-y-auto rounded-[var(--control-border-radius)] border border-border-input bg-background-input"),children:O&&oe.map((ee,Be)=>{let Ve=P.includes(_f(ee)),nt=d||ee.kind==="option"&&ee.option.disabled===true||!Ve&&_;return jsxRuntime.jsxs("div",{id:`${k}-row-${Be}`,role:"option","aria-selected":Ve,"aria-disabled":nt||void 0,"data-value":_f(ee),"data-literal":ee.kind==="literal"?"true":void 0,"data-active":K===Be?"true":void 0,onMouseDown:wt=>wt.preventDefault(),onClick:()=>{nt||(ue(ee),E.current?.focus());},className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 px-3",_e[i].paddingY,"text-text-primary",K===Be&&"bg-background-hover",Ve&&"bg-background-selected font-medium",nt&&"text-text-disabled"),children:[jsxRuntime.jsx(Qp,{isSelected:Ve,isDisabled:nt,className:"!w-4 !h-4"}),jsxRuntime.jsx("span",{className:"flex-1 truncate",children:$0(ee)}),ee.kind==="literal"&&jsxRuntime.jsx("span",{"data-testid":"multiselect-literal-badge",className:"italic text-text-secondary",children:"Use as typed"}),ee.kind==="option"&&ee.option.count!==void 0&&jsxRuntime.jsx("span",{"data-testid":`multiselect-count-${ee.option.value}`,className:"text-text-secondary",children:ee.option.count.toLocaleString()})]},B4(ee))})}),Ce==="loading"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-loading","data-status":"loading",children:jsxRuntime.jsxs(Ee,{size:i,className:"flex items-center gap-2",children:[jsxRuntime.jsx(io,{size:14,color:"text-text-secondary"}),jsxRuntime.jsx("span",{children:"Loading options\u2026"})]})}),Ce==="empty"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-empty","data-status":"empty",children:jsxRuntime.jsxs(Ee,{size:i,className:"flex items-center gap-2",children:[jsxRuntime.jsx(W,{name:"Tray",className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:g??"No options available"})]})}),Ce==="no-match"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-no-match","data-status":"no-match",children:jsxRuntime.jsxs(Ee,{size:i,className:"flex items-center gap-2 text-feedback-warning-text",children:[jsxRuntime.jsx(W,{name:"MagnifyingGlass",className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:`No options match \u201C${I.trim()}\u201D`})]})}),m&&jsxRuntime.jsx("div",{"data-testid":"multiselect-truncation",children:jsxRuntime.jsx(Ee,{size:i,children:p===void 0?"Showing a partial list \u2014 refine your search to see more":`Showing ${e.length} of ${p} \u2014 refine your search to see more`})}),c!==void 0&&jsxRuntime.jsx("div",{"data-testid":"multiselect-limit",children:jsxRuntime.jsx(Ee,{size:i,children:_?`${P.length} of ${c} selected \u2014 limit reached, remove one to choose another`:`${P.length} of ${c} selected`})}),h&&jsxRuntime.jsx(Ee,{size:i,children:h}),b&&jsxRuntime.jsx(ye,{size:i,children:b}),jsxRuntime.jsx("div",{"data-testid":"multiselect-live-region",role:"status","aria-live":"polite",className:"sr-only",children:V})]})}var du="bg-background-surface border-l-[3px] border-y border-r border-border-default text-text-primary",U4={success:{container:du,iconName:"CheckCircle",iconColor:"text-feedback-success-text",borderColor:"var(--color-feedback-success-border)"},error:{container:du,iconName:"XCircle",iconColor:"text-feedback-error-text",borderColor:"var(--color-feedback-error-border)"},warning:{container:du,iconName:"Warning",iconColor:"text-feedback-warning-text",borderColor:"var(--color-feedback-warning-border)"},info:{container:du,iconName:"Info",iconColor:"text-feedback-info-text",borderColor:"var(--color-feedback-info-border)"}};function pu({id:e,message:t,variant:r="info",duration:o=5e3,dismissible:n=true,onDismiss:a,className:i}){let{container:s,iconName:d,iconColor:c,borderColor:l}=U4[r];return ot.useEffect(()=>{if(o>0){let u=setTimeout(()=>{a?.();},o);return ()=>clearTimeout(u)}},[o,a]),jsxRuntime.jsxs(framerMotion.motion.div,{layout:true,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.2}},className:tailwindMerge.twMerge("pointer-events-auto flex items-center gap-3 rounded-lg p-4 shadow-lg",s,i),style:{borderLeftColor:l},children:[jsxRuntime.jsx(W,{name:d,size:20,className:c}),jsxRuntime.jsx("p",{className:"flex-1 select-text text-sm font-medium",children:t}),n&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"flex-shrink-0 rounded-md p-1 transition-colors hover:bg-background-hover","aria-label":"Dismiss notification",children:jsxRuntime.jsx(W,{name:"X",size:16})})]})}var Z4={"top-left":"top-4 left-4 items-start","top-center":"top-4 left-1/2 -translate-x-1/2 items-start","top-right":"top-4 right-4 items-end","bottom-left":"bottom-4 left-4 items-start","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-start","bottom-right":"bottom-4 right-4 items-end"};function mu({notices:e,onDismiss:t,position:r="bottom-center",className:o}){let[n,a]=ot.useState(false);if(ot.useEffect(()=>{a(true);},[]),!n)return null;let i=jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("pointer-events-none fixed z-50 flex flex-col gap-2",Z4[r],o),"aria-live":"polite","aria-atomic":"true",children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"sync",children:e.map(s=>jsxRuntime.jsx(pu,{id:s.id,message:s.message,variant:s.variant,duration:s.duration,dismissible:s.dismissible,onDismiss:()=>t(s.id)},s.id))})});return reactDom.createPortal(i,document.body)}var tS=ot.createContext(void 0);function rS({children:e,position:t="bottom-center",maxNotices:r=5,defaultDuration:o=5e3,defaultDismissible:n=true}){let[a,i]=ot.useState([]),s=ot.useCallback((u,m)=>{let p=`notice-${Date.now()}-${Math.random()}`,g={id:p,message:u,variant:m?.variant||"info",duration:m?.duration??o,dismissible:m?.dismissible??n};return i(f=>{let h=[...f,g];return h.length>r?h.slice(-r):h}),p},[r,o,n]),d=ot.useCallback(u=>{i(m=>m.filter(p=>p.id!==u));},[]),c=ot.useCallback(()=>{i([]);},[]),l={notices:a,addNotice:s,removeNotice:d,clearNotices:c};return jsxRuntime.jsxs(tS.Provider,{value:l,children:[e,jsxRuntime.jsx(mu,{notices:a,onDismiss:d,position:t})]})}function oS(){let e=ot.useContext(tS);if(!e)throw new Error("useNoticeContext must be used within a NoticeProvider");return e}function nS(){let{addNotice:e,removeNotice:t,clearNotices:r}=oS(),o=ot.useCallback((d,c)=>e(d,c),[e]),n=ot.useCallback((d,c)=>e(d,{...c,variant:"success"}),[e]),a=ot.useCallback((d,c)=>e(d,{...c,variant:"error"}),[e]),i=ot.useCallback((d,c)=>e(d,{...c,variant:"warning"}),[e]),s=ot.useCallback((d,c)=>e(d,{...c,variant:"info"}),[e]);return {show:o,success:n,error:a,warning:i,info:s,dismiss:t,clear:r}}var Yi="edges:section-navigate",r5={plain:"",contained:"bg-background-surface rounded-lg border border-border-default p-6",bordered:"border-y border-border-default py-6"},o5={none:"",sm:"my-4",md:"my-6 md:my-8",lg:"my-8 md:my-12"};function Xi({id:e,title:t,description:r,actions:o,variant:n="plain",spacing:a="none",withDivider:i=false,headingAs:s="h2",className:d,children:c,collapsible:l=false,defaultCollapsed:u=false,badge:m}){let p=ot__namespace.default.useId(),g=e?`${e}-heading`:p,f=`${g}-body`,h=t||r||o,[b,v]=ot__namespace.default.useState(l&&u),x=ot__namespace.default.useRef(false),C=!l||!b;ot__namespace.default.useEffect(()=>{x.current||v(l&&u);},[l,u]),ot__namespace.default.useEffect(()=>{if(!l||!e)return;let S=()=>{x.current=true,v(false);},T=()=>{window.location.hash===`#${e}`&&S();},N=k=>{k.detail?.id===e&&S();};return T(),window.addEventListener(Yi,N),window.addEventListener("hashchange",T),window.addEventListener("popstate",T),()=>{window.removeEventListener(Yi,N),window.removeEventListener("hashchange",T),window.removeEventListener("popstate",T);}},[l,e]);let w=t?l?jsxRuntime.jsx(vr,{tag:s,size:"md",className:"text-text-primary",children:jsxRuntime.jsxs("button",{type:"button",onClick:()=>{x.current=true,v(S=>!S);},"aria-expanded":C,"aria-controls":f,className:"flex w-full items-center gap-2 text-left",children:[jsxRuntime.jsx(W,{name:"CaretRight",size:"sm","aria-hidden":true,className:tailwindMerge.twMerge("text-text-secondary transition-transform",C&&"rotate-90")}),jsxRuntime.jsx("span",{children:t}),m!=null&&jsxRuntime.jsx("span",{className:"text-sm font-normal text-text-secondary",children:m})]})}):jsxRuntime.jsx(vr,{tag:s,size:"md",className:"text-text-primary",children:t}):null;return jsxRuntime.jsxs("section",{id:e,className:tailwindMerge.twMerge(o5[a],r5[n],d),"aria-labelledby":t?g:void 0,children:[h&&jsxRuntime.jsxs("header",{id:g,className:tailwindMerge.twMerge("flex flex-col sm:flex-row sm:flex-wrap sm:items-center sm:justify-between gap-4",i&&"border-b border-border-default pb-4 mb-6",!i&&c&&C&&"mb-6"),children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[w,r&&jsxRuntime.jsx("p",{className:"mt-2 text-base text-text-secondary",children:r})]}),o&&jsxRuntime.jsx("div",{className:"min-w-0 shrink",children:o})]}),c&&C&&jsxRuntime.jsx("div",{id:f,className:"",children:t?jsxRuntime.jsx(Mn,{children:c}):c})]})}Xi.displayName="Section";function hu({sections:e,activeSection:t,onSectionChange:r,orientation:o="responsive",className:n,scrollBehavior:a="smooth",stickyTop:i="1.5rem",heading:s,sectionIdPrefix:d="section-",filterSection:c,scrollContainerId:l}){let u=ot__namespace.useRef(null),m=ot__namespace.useRef(null),[p,g]=ot__namespace.useState(e[0]?.id||null),f=t??p,h=ot__namespace.useCallback(()=>l?document.getElementById(l):null,[l]),b=ot__namespace.useCallback(S=>document.getElementById(`${d}${S}`)??document.getElementById(S),[d]);ot__namespace.useEffect(()=>{let S=window.location.hash;if(!S)return;let T=S.slice(1),N=T.startsWith(d)?T.slice(d.length):T,k=e.find(R=>R.id===N);k&&requestAnimationFrame(()=>{let R=b(k.id);if(!R)return;let L=h();if(L){let E=L.getBoundingClientRect(),B=R.getBoundingClientRect(),A=L.scrollTop+(B.top-E.top);L.scrollTo({top:Math.max(0,A),behavior:"instant"});}else R.scrollIntoView({behavior:"instant",block:"start"});r?r(k.id):g(k.id);});},[]),ot__namespace.useEffect(()=>{if(t!==void 0&&r)return;let S=R=>{if(!R)return false;let L=window.getComputedStyle(R);return L.display!=="none"&&L.visibility!=="hidden"&&L.opacity!=="0"},T=()=>{let R=S(u.current),L=S(m.current);if(!R&&!L)return null;let E=h(),B=new IntersectionObserver(A=>{A.forEach(H=>{if(H.isIntersecting){let Y=H.target.id.replace(d,"");r?r(Y):g(Y);}});},{root:E??void 0,rootMargin:"-20% 0px -70% 0px",threshold:0});return e.forEach(A=>{let H=b(A.id);H&&B.observe(H);}),B},N=T(),k=()=>{N&&N.disconnect(),N=T();};return window.addEventListener("resize",k),()=>{N&&N.disconnect(),window.removeEventListener("resize",k);}},[e,d,t,r,o,h,b]);let v=ot__namespace.useMemo(()=>c?e.filter(c):e,[e,c]),x=ot__namespace.useCallback((S,T)=>{S.preventDefault();let N=b(T);if(N){window.dispatchEvent(new CustomEvent(Yi,{detail:{id:N.id}}));let k=h();if(k){let R=k.getBoundingClientRect(),L=N.getBoundingClientRect(),E=k.scrollTop+(L.top-R.top),B=Math.max(0,k.scrollHeight-k.clientHeight);k.scrollTo({top:Math.max(0,Math.min(E,B)),behavior:a});}else {let R=N.getBoundingClientRect().top+window.scrollY,L=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),E=Math.max(0,Math.min(R,L));window.scrollTo({top:E,behavior:a});}window.history.pushState&&window.history.pushState(null,"",`#${d}${T}`),r?r(T):g(T);}},[d,a,r,h,b]);if(v.length===0)return null;let C=o==="vertical"?"":o==="horizontal"?"hidden":"hidden lg:block",w=o==="horizontal"?"":o==="vertical"?"hidden":"lg:hidden";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("nav",{ref:u,className:tailwindMerge.twMerge(C,n),"aria-label":"Section navigation",children:jsxRuntime.jsxs("div",{className:"space-y-1",style:{position:"sticky",top:i},children:[s?jsxRuntime.jsx("div",{className:"px-3 pb-2 text-label-sm font-semibold uppercase tracking-wide text-text-tertiary",children:s}):null,v.map(S=>{let T=f===S.id;return jsxRuntime.jsx("a",{href:`#${d}${S.id}`,onClick:N=>x(N,S.id),className:tailwindMerge.twMerge("block w-full text-left px-3 py-2 rounded-md text-sm transition-colors no-underline",T?"bg-background-muted text-text-primary font-semibold":"text-text-secondary hover:text-text-primary hover:bg-background-hover"),"aria-current":T?"page":void 0,children:jsxRuntime.jsxs("span",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("span",{children:S.label}),S.count!==void 0&&jsxRuntime.jsx("span",{className:"text-xs tabular-nums text-text-secondary",children:S.count})]})},S.id)})]})}),jsxRuntime.jsx("nav",{ref:m,className:tailwindMerge.twMerge(w,"overflow-x-auto scrollbar-hide sticky top-0 z-10 py-4 -mt-4",n),"aria-label":"Section navigation",children:jsxRuntime.jsx("div",{className:"flex gap-2 min-w-max",children:v.map(S=>{let T=f===S.id;return jsxRuntime.jsx("a",{href:`#${d}${S.id}`,onClick:N=>x(N,S.id),className:tailwindMerge.twMerge("inline-block px-4 py-2 rounded-md text-sm whitespace-nowrap transition-colors no-underline",T?"bg-background-muted text-text-primary font-semibold":"text-text-secondary hover:text-text-primary hover:bg-background-hover"),"aria-current":T?"page":void 0,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{children:S.label}),S.count!==void 0&&jsxRuntime.jsxs("span",{className:"text-xs tabular-nums text-text-secondary",children:["(",S.count,")"]})]})},S.id)})})})]})}function aS(e){return "primary"}var bu=ot__namespace.createContext({variant:"primary"});function c5({orientation:e,className:t=""}){return `flex flex-col w-full ${{horizontal:"",vertical:"flex-row"}[e]||""} ${t}`.trim()}function yu({variant:e="primary",...t}){let r=aS();return jsxRuntime.jsx(bu.Provider,{value:{variant:r},children:jsxRuntime.jsx("div",{className:"w-full h-auto",children:jsxRuntime.jsx(reactAriaComponents.Tabs,{...t,className:reactAriaComponents.composeRenderProps(t.className,(o,n)=>c5({...n,className:o}))})})})}function d5({orientation:e,sticky:t=false,className:r=""}){let o="flex gap-10 relative after:absolute after:bottom-0 after:left-0 after:right-0 after:h-[2px] after:bg-border-muted",n={horizontal:"flex-row w-full flex-nowrap overflow-x-auto scrollbar-hide",vertical:"flex-col items-start"},a=t?"sticky top-0 bg-background-surface z-10":"";return `${o} ${n[e]||""} ${a} ${r}`.trim()}function vu({variant:e,sticky:t=false,...r}){let o=ot__namespace.useContext(bu),n=aS(e??o.variant);return jsxRuntime.jsx(bu.Provider,{value:{variant:n},children:jsxRuntime.jsx(reactAriaComponents.TabList,{...r,className:reactAriaComponents.composeRenderProps(r.className,(a,i)=>d5({...i,sticky:t,className:a||""}))})})}function u5({isSelected:e,isDisabled:t,variant:r,className:o=""}){let n="flex items-center cursor-default px-1 py-2 font-medium transition-all hover:cursor-pointer relative shrink-0 whitespace-nowrap",a=`${pt()} ${r==="primary"?"focus-visible:outline-action-primary":""}`.trim(),i="";return t?i="text-text-disabled forced-colors:text-[GrayText] cursor-not-allowed":e?i="text-action-primary border-b-2 border-action-primary z-10 forced-colors:bg-[Highlight]":i="text-text-disabled hover:text-text-secondary",`${n} ${a} ${i} ${o}`.trim()}function Cu(e){let{variant:t}=ot__namespace.useContext(bu);return jsxRuntime.jsx(reactAriaComponents.Tab,{...e,"data-testid":e.id?`tab-${e.id}`:void 0,className:reactAriaComponents.composeRenderProps(e.className,(r,o)=>u5({...o,className:r,isSelected:o.isSelected,variant:t}))})}function p5({className:e=""}){let t="block w-full mt-4 text-text-primary",r=pt();return `${t} ${r} ${e}`.trim()}function iS(e){return jsxRuntime.jsx(reactAriaComponents.TabPanel,{...e,className:reactAriaComponents.composeRenderProps(e.className,(t,r)=>p5({...r,className:t||""}))})}function qa({children:e,maxWidth:t=1400,paddingXClass:r="px-4 md:px-6",paddingYClass:o="pt-8 pb-14 md:pt-12 md:pb-28",className:n}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(`w-full ${r} ${o}`,n),style:{marginInline:"auto",maxWidth:t},children:e})}function m5({title:e,subtitle:t,breadcrumbs:r,breadcrumbsNode:o,media:n,actions:a,metadata:i,headingAs:s,sticky:d,stickyTop:c="0",zIndex:l=10,isLoading:u=false,className:m}){let p=d?"sticky bg-background-body":"",g=d?{top:c,zIndex:l}:{};return u?jsxRuntime.jsxs("header",{className:tailwindMerge.twMerge("mb-8 md:mb-12",p,m),style:g,"aria-labelledby":"page-title",children:[o||r?.length?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:jsxRuntime.jsx(q,{className:"h-4 w-32"})}):null,jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("div",{id:"page-title",children:jsxRuntime.jsx(q,{className:"h-8 w-64"})}),t?jsxRuntime.jsx(q,{className:"mt-2 h-5 w-48"}):null,i?jsxRuntime.jsx(q,{className:"mt-2 h-4 w-40"}):null,a?.length?jsxRuntime.jsx("div",{className:"mt-6 flex flex-col items-stretch gap-3 md:hidden",children:a.map((f,h)=>jsxRuntime.jsx(q,{className:"h-9 w-full"},h))}):null]}),a?.length?jsxRuntime.jsx("div",{className:"hidden md:flex md:items-start gap-2 shrink-0",children:a.map((f,h)=>jsxRuntime.jsx(q,{className:"h-9 w-24"},h))}):null]}),n?jsxRuntime.jsx("div",{className:"mt-4 md:mt-6",children:jsxRuntime.jsx(q,{className:"h-64 w-full"})}):null]}):jsxRuntime.jsxs("header",{className:tailwindMerge.twMerge("mb-8 md:mb-12",p,m),style:g,"aria-labelledby":"page-title",children:[o?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:o}):r?.length?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:jsxRuntime.jsx(ic,{children:r.map((f,h)=>{let{label:b,...v}=f;return jsxRuntime.jsx(sc,{...v,children:b},`${b}-${h}`)})})}):null,jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("div",{id:"page-title",children:jsxRuntime.jsx(vr,{tag:s||"h1",size:"xl",children:e})}),t?jsxRuntime.jsx("p",{className:"mt-2 text-base md:text-lg text-text-secondary",children:t}):null,i?jsxRuntime.jsx("div",{className:"mt-2 text-sm text-text-secondary",children:i}):null,a?.length?jsxRuntime.jsx("div",{className:"mt-6 flex flex-col items-stretch gap-3 md:hidden",children:a.map((f,h)=>jsxRuntime.jsx(ot__namespace.default.Fragment,{children:f},h))}):null]}),a?.length?jsxRuntime.jsx("div",{className:"hidden md:flex md:items-start gap-2 shrink-0",children:a.map((f,h)=>jsxRuntime.jsx(ot__namespace.default.Fragment,{children:f},h))}):null]}),n?jsxRuntime.jsx("div",{className:"mt-4 md:mt-6",children:n}):null]})}function f5({tabs:e,value:t,defaultValue:r,onChange:o,className:n,children:a}){let i=s=>{o?.(s);};return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("mb-3 md:mb-4 border-b-2 border-border-muted",n),children:jsxRuntime.jsxs(yu,{selectedKey:t,defaultSelectedKey:r||e[0]?.id,onSelectionChange:i,children:[jsxRuntime.jsx(vu,{className:"after:bg-transparent",children:e.map(s=>jsxRuntime.jsx(Cu,{id:s.id,isDisabled:s.disabled,children:s.label},s.id))}),a]})})}function g5({children:e,className:t,withSectionNav:r,navWidth:o="240px",gap:n="2rem",activeSection:a,onSectionChange:i,scrollBehavior:s,sectionIdPrefix:d="section-",scrollContainerId:c,navHeading:l,navStickyTop:u}){return r?jsxRuntime.jsx(b5,{position:r,navWidth:o,gap:n,activeSection:a,onSectionChange:i,scrollBehavior:s,sectionIdPrefix:d,scrollContainerId:c,navHeading:l,navStickyTop:u,className:t,children:e}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full space-y-8 md:space-y-12",t),children:e})}function h5({children:e,sticky:t=true,className:r}){return jsxRuntime.jsx("aside",{className:tailwindMerge.twMerge(t?"lg:sticky lg:top-20":"",r),children:e})}function b5({activeSection:e,onSectionChange:t,position:r,navWidth:o,gap:n,children:a,className:i,scrollBehavior:s,sectionIdPrefix:d,scrollContainerId:c,navHeading:l,navStickyTop:u}){let m=ot__namespace.default.useMemo(()=>{let x=[];return ot__namespace.default.Children.forEach(a,C=>{if(ot__namespace.default.isValidElement(C)&&(C.type===Xi||typeof C.type=="object"&&C.type?.displayName==="Section"||typeof C.type=="function"&&C.type?.displayName==="Section")){let w=C.props;w.id?x.push({id:w.id,label:w.navLabel||(typeof w.title=="string"?w.title:`Section ${w.id}`)}):process.env.NODE_ENV==="development"&&console.warn("Section component used within PageLayout.Content with withSectionNav must have an id prop");}}),x},[a]),p=ot__namespace.default.useMemo(()=>{let x=ot__namespace.default.Children.map(a,C=>{if(ot__namespace.default.isValidElement(C)&&(C.type===Xi||typeof C.type=="object"&&C.type?.displayName==="Section"||typeof C.type=="function"&&C.type?.displayName==="Section")){let w=C.props;if(w.id)return ot__namespace.default.cloneElement(C,{...w,id:`${d}${w.id}`})}return C});return jsxRuntime.jsx("div",{className:"space-y-8 md:space-y-12",children:x})},[a,d]),g=(x,C)=>jsxRuntime.jsx(hu,{sections:m,activeSection:e,onSectionChange:t,orientation:x,scrollBehavior:s,sectionIdPrefix:d,scrollContainerId:c,heading:l,className:C});if(r==="above")return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("space-y-4",i),children:[jsxRuntime.jsx("div",{className:"sticky top-0 z-10 bg-background-body",children:g("horizontal")}),p]});let f=r==="left"?"var(--nav-width) minmax(0, 1fr)":"minmax(0, 1fr) var(--nav-width)",h=u?"":"top-20",b=u?{top:u}:void 0,v=tailwindMerge.twMerge("hidden lg:block sticky self-start",h);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"lg:hidden sticky top-0 z-10 mt-3 mb-4 bg-background-body border-b border-border-default shadow-sm",children:g("horizontal","py-3 mt-0")}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("lg:grid",i),style:{gridTemplateColumns:f,gap:n,"--nav-width":o},children:[r==="left"&&jsxRuntime.jsx("nav",{className:v,style:b,children:g("vertical")}),p,r==="right"&&jsxRuntime.jsx("nav",{className:v,style:b,children:g("vertical")})]})]})}function x5({children:e,className:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-auto min-h-0",t),children:e})}qa.Header=m5;qa.Tabs=f5;qa.Content=g5;qa.Aside=h5;qa.ScrollableContent=x5;function v5(e){return typeof e=="object"&&e!==null&&"features"in e&&Array.isArray(e.features)&&"type"in e&&typeof e.type=="string"}var C5=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN||"";function cS({label:e,selectedKey:t,defaultSelectedKey:r,onSelectionChange:o,placeholder:n="Enter a location...",errorMessage:a,description:i,size:s="md",tooltip:d,isRequired:c,isDisabled:l,showErrors:u=true,autoFocus:m=false,onSelect:p,searchTypes:g=["place","address"],defaultFilter:f,validationResult:h,countryRestrictions:b,proximity:v="ip",hideCountry:x=false,showIcon:C=true,useMobileTray:w=true,className:S}){let T=ot.useRef(new WeakMap),N=ot.useRef([]),k={requestType:"REST",method:"GET",url:"https://api.mapbox.com/geocoding/v5/mapbox.places/{q}.json",extraParams:{access_token:C5,types:g.join(","),limit:"5",...b?.length?{country:b.join(",").toLowerCase()}:{},...v?{proximity:v==="ip"?"ip":v.join(",")}:{}},shouldLoad:E=>E.length>0,transformResponse:E=>{if(!v5(E))return [];let B=E.features.map(A=>{let H={id:A.id,name:A.place_name};return T.current.set(H,{type:A.place_type[0],center:A.center,context:A.context,address:A.address,text:A.text,properties:A.properties}),H});return B.length>0&&(N.current=B),B}},R=E=>{let B=T.current.get(E),A=E.name.split(", "),H=A[0],Y=A.slice(1);x&&Y.length>0&&(Y=Y.slice(0,-1));let G=Y.join(", ");return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 py-0.5",children:[C&&jsxRuntime.jsx(W,{name:B?.type==="address"?"MapPin":B?.type==="place"?"Buildings":B?.type==="region"?"MapPinArea":B?.type==="country"?"Flag":"Circle",className:"h-5 w-5 flex-shrink-0 text-text-secondary"}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col",children:[jsxRuntime.jsx("span",{className:"truncate font-medium text-text-primary",children:H}),G&&jsxRuntime.jsx("span",{className:"truncate text-sm text-text-secondary",children:G})]})]})},L=E=>E?jsxRuntime.jsx(W,{name:"CircleNotch",className:"h-4 w-4 animate-spin text-text-secondary"}):jsxRuntime.jsx(W,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-secondary"});return jsxRuntime.jsx(oc,{"data-testid":"autocomplete","data-config":JSON.stringify({types:g.join(","),country:b?.join(",")?.toLowerCase(),proximity:v==="ip"?"ip":v?.join(",")}),label:e||void 0,selectedKey:t,defaultSelectedKey:r,onSelectionChange:E=>{if(o?.(E),E){let A=N.current.find(H=>H.id===E);if(A){let H=T.current.get(A);H&&p({id:A.id,place_name:A.name,place_type:[H.type],center:H.center,context:H.context,address:H.address,text:H.text,properties:H.properties});}}},requestConfig:k,placeholder:n,errorMessage:a,description:i,size:s,tooltip:d,isRequired:c,isDisabled:l,showErrors:u,autoFocus:m,renderItem:R,renderLeftIcon:L,defaultFilter:f,validationResult:h,hideChevron:true,useMobileTray:w,className:S})}function uS({label:e,rightLabel:t,progressWidth:r=64,hideLabels:o=false,...n}){return jsxRuntime.jsx(reactAriaComponents.ProgressBar,{...n,className:Fe(n.className,"flex flex-col gap-1"),children:({percentage:a,valueText:i,isIndeterminate:s})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!o&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:e}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:t||i})]}),jsxRuntime.jsx("div",{className:`relative h-2 w-${r} overflow-hidden rounded-full bg-background-muted outline-none`,children:jsxRuntime.jsx("div",{className:`absolute top-0 h-full rounded-full bg-action-default forced-colors:bg-[Highlight] ${s?"left-full duration-1000 ease-out animate-in slide-out-to-right-full repeat-infinite [--tw-enter-translate-x:calc(-16rem-100%)]":"left-0"}`,style:{width:(s?40:a)+"%"}})})]})})}function pS({as:e="div",size:t="md",tone:r="editorial",className:o="",children:n,...a}){let i=t==="md"?"":`prose-${t}`,s=r==="editorial"?"":`prose-${r}`;return jsxRuntime.jsx(e,{className:Yr("prose",i,s,o),...a,children:n})}function R5(e="2"){return {1:"p-2 text-xs",2:"p-3 text-sm",3:"p-4 text-base"}[e]}function M5(e){return e?"border-action-primary text-action-primary":"border-border text-text-primary"}function E5(){return "opacity-50 cursor-not-allowed"}function mS({value:e,isDisabled:t,className:r,children:o,size:n="2",variant:a="primary"}){return jsxRuntime.jsx(reactAriaComponents.Radio,{value:e,isDisabled:t,className:Fe(r,"relative flex items-center justify-center cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-action-primary focus:ring-offset-2 rounded-lg min-h-[44px]"),children:({isSelected:s,isDisabled:d})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center justify-center w-full h-full transition-all duration-200 rounded-lg border-2 bg-background-surface",!(t||d)&&!s&&"hover:bg-background-hover hover:border-border-hover",R5(n),M5(s),(t||d)&&E5(),r),children:o})})}function fS({value:e,defaultValue:t,onChange:r,isDisabled:o,isReadOnly:n,isRequired:a,className:i,children:s,size:d="2",variant:c="primary",columns:l="repeat(auto-fit, minmax(160px, 1fr))",gap:u="1"}){return jsxRuntime.jsx(reactAriaComponents.RadioGroup,{value:e,defaultValue:t,onChange:r,isDisabled:o,isReadOnly:n,isRequired:a,className:Fe(i,"grid"),style:{gridTemplateColumns:/^\d+$/.test(String(l))?`repeat(${l}, minmax(0, 1fr))`:l,gap:u==="1"?"0.25rem":u==="2"?"0.5rem":u==="3"?"0.75rem":u==="4"?"1rem":typeof u=="number"?`${u}px`:u},children:ot__namespace.default.Children.map(s,m=>ot__namespace.default.isValidElement(m)?ot__namespace.default.cloneElement(m,{size:d,variant:c}):m)})}function F5(e){return "primary"}var gS=ot.createContext({variant:"primary"});function hS(e){let{variant:t="primary",...r}=e,o=F5();return jsxRuntime.jsx(gS.Provider,{value:{variant:o},children:jsxRuntime.jsxs(reactAriaComponents.RadioGroup,{...r,className:Fe(e.className,"group flex flex-col gap-2"),children:[jsxRuntime.jsx(et,{children:e.label}),jsxRuntime.jsx("div",{className:`flex ${r.orientation==="horizontal"?"flex-row gap-4":"flex-col gap-2"}`,children:e.children}),e.description&&jsxRuntime.jsx(Ee,{children:e.description}),jsxRuntime.jsx(ye,{children:typeof e.errorMessage=="function"&&e.validationResult?e.errorMessage(e.validationResult):typeof e.errorMessage=="string"?e.errorMessage:null})]})})}function B5({isSelected:e,isInvalid:t,isDisabled:r}){let n=[pt(),"focus-visible:outline-action-primary","w-5 h-5 rounded-full border-2 bg-background-surface transition-all"];return r?n.push("border-border-muted forced-colors:!border-[GrayText]"):t?n.push("border-feedback-error-border group-pressed:border-feedback-error-border dark:group-pressed:border-feedback-error-border forced-colors:!border-[Mark]"):e?n.push("border-[7px] border-action-primary forced-colors:!border-[Highlight] group-pressed:border-action-primary-hover dark:group-pressed:border-action-primary-hover"):n.push("border-border-default group-pressed:border-border-focus dark:group-pressed:border-border-focus"),n.join(" ")}function bS(e){return ot.useContext(gS),jsxRuntime.jsx(reactAriaComponents.Radio,{...e,className:Fe(e.className,"relative group flex items-center gap-2 text-sm text-text-primary transition disabled:text-text-secondary dark:text-text-primary dark:disabled:text-text-secondary forced-colors:disabled:text-[GrayText]"),children:t=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:B5(t)}),e.children]})})}var X5={sm:{toolbar:"p-1.5",contentWrapper:"min-h-[100px]",contentPadding:"p-3",placeholderPos:"left-3 top-3",prose:"prose-xs",h1:"[&_.ProseMirror_h1]:mb-2 [&_.ProseMirror_h1]:text-base [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-1.5 [&_.ProseMirror_h2]:text-sm [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-1",list:"[&_.ProseMirror_ul]:mb-1 [&_.ProseMirror_ul]:ml-4 [&_.ProseMirror_ol]:mb-1 [&_.ProseMirror_ol]:ml-4",li:"[&_.ProseMirror_li]:mb-0.5",placeholderText:"text-xs"},md:{toolbar:"p-2",contentWrapper:"min-h-[200px]",contentPadding:"p-4",placeholderPos:"left-4 top-4",prose:"prose-sm",h1:"[&_.ProseMirror_h1]:mb-4 [&_.ProseMirror_h1]:text-2xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-3 [&_.ProseMirror_h2]:text-xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-2",list:"[&_.ProseMirror_ul]:mb-2 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ol]:mb-2 [&_.ProseMirror_ol]:ml-6",li:"[&_.ProseMirror_li]:mb-1",placeholderText:"text-sm"},lg:{toolbar:"p-2.5",contentWrapper:"min-h-[250px]",contentPadding:"p-5",placeholderPos:"left-5 top-5",prose:"prose-base",h1:"[&_.ProseMirror_h1]:mb-5 [&_.ProseMirror_h1]:text-3xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-4 [&_.ProseMirror_h2]:text-2xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-3",list:"[&_.ProseMirror_ul]:mb-3 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ol]:mb-3 [&_.ProseMirror_ol]:ml-6",li:"[&_.ProseMirror_li]:mb-1.5",placeholderText:"text-base"},xl:{toolbar:"p-3",contentWrapper:"min-h-[300px]",contentPadding:"p-6",placeholderPos:"left-6 top-6",prose:"prose-lg",h1:"[&_.ProseMirror_h1]:mb-6 [&_.ProseMirror_h1]:text-4xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-5 [&_.ProseMirror_h2]:text-3xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-3",list:"[&_.ProseMirror_ul]:mb-3 [&_.ProseMirror_ul]:ml-8 [&_.ProseMirror_ol]:mb-3 [&_.ProseMirror_ol]:ml-8",li:"[&_.ProseMirror_li]:mb-2",placeholderText:"text-lg"}},qi=({isActive:e=false,onPress:t,children:r})=>jsxRuntime.jsx(te,{variant:e?"secondary":"ghost",size:"sm",onPress:t,className:"p-1",children:r});function J5({initialUrl:e,isOpen:t,onClose:r,onSubmit:o}){let[n,a]=ot.useState(e);return ot__namespace.default.useEffect(()=>{a(e);},[e]),jsxRuntime.jsx(Kr,{isDismissable:true,isOpen:t,onOpenChange:s=>!s&&r(),children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"flex items-center justify-center p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"relative bg-background-surface rounded-lg shadow-xl max-w-md w-full",children:jsxRuntime.jsxs("form",{onSubmit:s=>{s.preventDefault(),o(n),r();},children:[jsxRuntime.jsx(Cr,{title:"Insert Link",onClose:r}),jsxRuntime.jsx("div",{className:"p-6",children:jsxRuntime.jsx(go,{label:"URL",type:"url",value:n,onChange:a,autoFocus:true,className:"w-full"})}),jsxRuntime.jsxs("div",{className:"flex justify-end gap-2 border-t border-border-muted p-4",children:[jsxRuntime.jsx(te,{variant:"secondary",onPress:r,children:"Cancel"}),jsxRuntime.jsx(te,{type:"submit",children:"Save"})]})]})})})})}function vS({initialContent:e="",onChange:t,className:r,isDisabled:o=false,placeholder:n="Start typing...",id:a,size:i="md",headingLevels:s=[1,2]}){let d=X5[i],[c,l]=ot.useState(false),u=react.useEditor({immediatelyRender:false,extensions:[W5__default.default.configure({heading:s.length>0?{levels:s}:false}),O5__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-text-link-default hover:text-text-link-hover underline decoration-text-link-default/30 hover:decoration-text-link-hover cursor-pointer"}})],content:e,editable:!o,onUpdate:({editor:g})=>{t?.(g.getHTML());},editorProps:{attributes:{class:tailwindMerge.twMerge(`prose ${d.prose} max-w-none`,"focus:outline-none","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0")}}}),m=()=>{l(true);},p=g=>{g===""?u?.chain().focus().unsetLink().run():u?.chain().focus().setLink({href:g}).run();};return u?jsxRuntime.jsxs("div",{id:a,"data-richtexteditor":true,className:tailwindMerge.twMerge("flex flex-col rounded-md border border-border-input bg-background-input","outline-none focus-within:outline-none focus-within:border-border-input focus-within:ring-0 focus-within:shadow-none",o&&"opacity-50",r),style:{outline:"none"},children:[!o&&u&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(menus.BubbleMenu,{editor:u,shouldShow:({editor:g})=>g.isActive("link")&&!c,className:"flex items-center gap-1 rounded-md border border-border-input bg-background-surface p-1 shadow-md",children:[jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>{let g=u.getAttributes("link").href;g&&window.open(g,"_blank","noopener,noreferrer");},children:[jsxRuntime.jsx(W,{name:"ArrowSquareOut",className:"mr-1 h-4 w-4"}),"Open"]}),jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:m,children:[jsxRuntime.jsx(W,{name:"PencilSimple",className:"mr-1 h-4 w-4"}),"Edit"]}),jsxRuntime.jsxs(te,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>u.chain().focus().unsetLink().run(),children:[jsxRuntime.jsx(W,{name:"X",className:"mr-1 h-4 w-4"}),"Remove"]})]}),jsxRuntime.jsx(J5,{isOpen:c,onClose:()=>l(false),onSubmit:p,initialUrl:u.getAttributes("link").href||""})]}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center gap-1 border-b border-border-input",d.toolbar),children:[s.map(g=>jsxRuntime.jsx(qi,{isActive:u.isActive("heading",{level:g}),onPress:()=>u.chain().focus().toggleHeading({level:g}).run(),children:jsxRuntime.jsxs("span",{className:"text-xs font-bold",children:["H",g]})},g)),jsxRuntime.jsx(qi,{isActive:u.isActive("bold"),onPress:()=>u.chain().focus().toggleBold().run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"B"})}),jsxRuntime.jsx(qi,{isActive:u.isActive("italic"),onPress:()=>u.chain().focus().toggleItalic().run(),children:jsxRuntime.jsx("span",{className:"text-xs italic",children:"I"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(qi,{isActive:u.isActive("bulletList"),onPress:()=>u.chain().focus().toggleBulletList().run(),children:jsxRuntime.jsx(W,{name:"ListBullets",className:"h-4 w-4"})}),jsxRuntime.jsx(qi,{isActive:u.isActive("orderedList"),onPress:()=>u.chain().focus().toggleOrderedList().run(),children:jsxRuntime.jsx(W,{name:"ListNumbers",className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(qi,{isActive:u.isActive("link"),onPress:m,children:jsxRuntime.jsx(W,{name:"PaperclipHorizontal",className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative w-full outline-none focus:outline-none",d.contentWrapper),children:[jsxRuntime.jsx(react.EditorContent,{editor:u,className:tailwindMerge.twMerge("w-full outline-none focus:outline-none",d.contentPadding,"[&_.ProseMirror]:min-h-[inherit]","[&_.ProseMirror]:outline-none [&_.ProseMirror]:focus:outline-none",d.h1,d.h2,d.p,"[&_.ProseMirror_ul]:list-disc","[&_.ProseMirror_ol]:list-decimal",d.list,d.li,"[&_.ProseMirror_blockquote]:border-l-4 [&_.ProseMirror_blockquote]:border-border-muted [&_.ProseMirror_blockquote]:pl-4 [&_.ProseMirror_blockquote]:italic","[&_.ProseMirror_code]:rounded [&_.ProseMirror_code]:bg-background-muted [&_.ProseMirror_code]:px-1 [&_.ProseMirror_code]:py-0.5 [&_.ProseMirror_code]:font-mono [&_.ProseMirror_code]:text-sm","[&_.ProseMirror_pre]:rounded-md [&_.ProseMirror_pre]:bg-background-muted [&_.ProseMirror_pre]:p-3 [&_.ProseMirror_pre]:font-mono [&_.ProseMirror_pre]:text-sm","[&_.ProseMirror_hr]:border-border-muted",o&&"pointer-events-none")}),u.isEmpty&&!o&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("pointer-events-none absolute text-text-secondary",d.placeholderPos,d.placeholderText),children:n})]})]}):null}function CS({streetAddress:e,city:t,state:r,postalCode:o,longitude:n,latitude:a,href:i,LinkComponent:s,variant:d="outlined",layout:c="stacked",showMap:l=true,mapHeight:u=200,mapboxAccessToken:m,isLoading:p=false,className:g,contentClassName:f,showMapExpandToggle:h=false,expandedMapTitle:b="Explore map",expandedMapAddressLabel:v,piiEntity:x}){let C=[];t&&C.push(t),r&&o?C.push(`${r} ${o}`):r?C.push(r):o&&C.push(o);let w=C.join(", "),S=v||[e,w].filter(Boolean).join(", "),T=l&&n!==void 0&&a!==void 0,N=({children:R,className:L})=>i?s?jsxRuntime.jsx(s,{href:i,className:L,children:R}):jsxRuntime.jsx(St,{href:i,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",L),asButton:false,children:R}):jsxRuntime.jsx("span",{className:L,children:R});if(p){let R=c==="row";return jsxRuntime.jsxs(at,{variant:d,className:tailwindMerge.twMerge(R?"flex flex-col md:flex-row":"flex flex-col",g),children:[T&&jsxRuntime.jsx(at.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(R&&"md:order-2 md:flex-[2] md:min-w-0"),children:jsxRuntime.jsx(q,{width:"100%",height:u})}),jsxRuntime.jsxs(at.Content,{className:tailwindMerge.twMerge("space-y-2 px-4 md:px-6",R&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center"),children:[jsxRuntime.jsx(q,{width:"100%",height:16}),jsxRuntime.jsx(q,{width:"80%",height:16})]})]})}let k=c==="row";return jsxRuntime.jsxs(at,{variant:d,className:tailwindMerge.twMerge("group/card relative",i&&"cursor-pointer",k?"flex flex-col md:flex-row":"flex flex-col",g),children:[i&&jsxRuntime.jsx(N,{className:"after:absolute after:inset-0 after:z-10",children:jsxRuntime.jsx("span",{className:"sr-only",children:e})}),T&&jsxRuntime.jsx(at.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(k&&"md:order-2 md:flex-[2] md:min-w-0"),children:jsxRuntime.jsx(Ki,{height:u,initialViewState:{longitude:n,latitude:a,zoom:14},showMarker:true,mapboxAccessToken:m,showExpandToggle:h,expandedMapTitle:b,expandedMapAddressLabel:S})}),jsxRuntime.jsx(at.Content,{className:tailwindMerge.twMerge("px-4 md:px-6",k&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center",f),children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 min-w-0 text-left",children:[jsxRuntime.jsx("span",{className:"text-xl font-semibold leading-tight text-text-primary group-hover/card:text-text-brand transition-colors","data-pii-type":x?"address":void 0,"data-pii-entity":x,children:e}),w&&jsxRuntime.jsx("span",{className:"text-lg font-normal leading-relaxed text-text-secondary","data-pii-type":x?"city-state-zip":void 0,"data-pii-entity":x,children:w})]})})]})}function wS({site:e,contact:t,LinkComponent:r,variant:o="outlined",layout:n="stacked",showMap:a=true,mapHeight:i=200,mapboxAccessToken:s,showEmail:d=true,showPhone:c=false,isLoading:l=false,className:u,contentClassName:m,fullHeight:p=false,showMapExpandToggle:g=false,expandedMapTitle:f="Explore map",expandedMapAddressLabel:h}){let b=[];e.city&&b.push(e.city),e.state&&e.postalCode?b.push(`${e.state} ${e.postalCode}`):e.state?b.push(e.state):e.postalCode&&b.push(e.postalCode);let v=b.join(", "),x=h||[e.streetAddress,v].filter(Boolean).join(", "),C=a&&e.longitude!==void 0&&e.latitude!==void 0,w=t?`${t.firstName} ${t.lastName}`.trim():"",S=({children:N,href:k,className:R})=>k?r?jsxRuntime.jsx(r,{href:k,className:R,children:N}):jsxRuntime.jsx(St,{href:k,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",R),asButton:false,children:N}):jsxRuntime.jsx("span",{className:R,children:N});if(l){let N=n==="row";return jsxRuntime.jsxs(at,{variant:o,className:tailwindMerge.twMerge(p&&"h-full",N?"flex flex-col md:flex-row":"flex flex-col",u),children:[C&&jsxRuntime.jsx(at.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(N&&"md:order-2 md:flex-[2] md:min-w-0",p&&"flex-1"),children:jsxRuntime.jsx(q,{width:"100%",height:p?"100%":i})}),jsxRuntime.jsxs(at.Content,{className:tailwindMerge.twMerge("space-y-4 px-4 py-4",N&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center"),children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(q,{width:"100%",height:16}),jsxRuntime.jsx(q,{width:"80%",height:16})]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t border-border-default"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(q,{width:40,height:40,className:"rounded flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[jsxRuntime.jsx(q,{width:"50%",height:14}),jsxRuntime.jsx(q,{width:"100%",height:12})]})]})]})]})]})}let T=n==="row";return jsxRuntime.jsxs(at,{variant:o,className:tailwindMerge.twMerge("group/card relative",e.href&&"cursor-pointer",p&&"h-full",T?"flex flex-col md:flex-row":"flex flex-col",u),children:[e.href&&jsxRuntime.jsx(S,{href:e.href,className:"after:absolute after:inset-0 after:z-10",children:jsxRuntime.jsx("span",{className:"sr-only",children:e.streetAddress})}),C&&jsxRuntime.jsx(at.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(T&&"md:order-2 md:flex-[2] md:min-w-0",p&&"flex-1"),children:jsxRuntime.jsx(Ki,{height:p?"100%":i,initialViewState:{longitude:e.longitude,latitude:e.latitude,zoom:14},showMarker:true,mapboxAccessToken:s,showExpandToggle:g,expandedMapTitle:f,expandedMapAddressLabel:x})}),jsxRuntime.jsxs(at.Content,{className:tailwindMerge.twMerge("space-y-4 px-4 py-4",T&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center",m),children:[jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 min-w-0 text-left",children:[jsxRuntime.jsx("span",{className:"text-xl font-semibold leading-tight text-text-primary group-hover/card:text-text-brand transition-colors","data-pii-type":e.piiEntity?"address":void 0,"data-pii-entity":e.piiEntity,children:e.streetAddress}),v&&jsxRuntime.jsx("span",{className:"text-lg font-normal leading-relaxed text-text-secondary","data-pii-type":e.piiEntity?"city-state-zip":void 0,"data-pii-entity":e.piiEntity,children:v})]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t border-border-default"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 relative",children:[jsxRuntime.jsx(sn,{firstName:t.firstName,lastName:t.lastName,src:t.avatarUrl,size:"md",variant:"user",shape:"square",className:"flex-shrink-0",piiEntity:t.piiEntity}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[t.href?jsxRuntime.jsx(S,{href:t.href,className:"text-sm font-semibold leading-tight text-text-primary block mb-0.5 hover:text-text-brand transition-colors relative z-20",children:jsxRuntime.jsx("span",{"data-pii-type":t.piiEntity?"full-name":void 0,"data-pii-entity":t.piiEntity,children:w})}):jsxRuntime.jsx("span",{className:"text-sm font-semibold leading-tight text-text-primary block mb-0.5","data-pii-type":t.piiEntity?"full-name":void 0,"data-pii-entity":t.piiEntity,children:w}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[d&&t.email&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-text-primary",children:[jsxRuntime.jsx(W,{name:"Envelope",size:12,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(St,{href:`mailto:${t.email}`,variant:"unstyled",className:"text-xs leading-tight truncate text-text-primary relative z-20","data-pii-type":t.piiEntity?"email":void 0,"data-pii-entity":t.piiEntity,children:t.email})]}),c&&t.phone&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-text-primary",children:[jsxRuntime.jsx(W,{name:"Phone",size:12,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(St,{href:`tel:${t.phone}`,variant:"unstyled",className:"text-xs leading-tight truncate text-text-primary relative z-20","data-pii-type":t.piiEntity?"phone":void 0,"data-pii-entity":t.piiEntity,children:ai(t.phone)})]})]})]})]})]})]})]})}function TS({label:e,description:t,tooltip:r,errorMessage:o,size:n="md",className:a,value:i,defaultValue:s=0,onChange:d,min:c=0,max:l=100,step:u=1,disabled:m,showValue:p=true}){let g=typeof i=="number",[f,h]=ot__namespace.default.useState(s),b=g?i:f,v=Math.min(Math.max(b,c),l),x=Math.max(l-c,1e-5),C=(v-c)/x*100;return jsxRuntime.jsxs("div",{className:Fe(a,"group flex w-full flex-col gap-1"),children:[e&&jsxRuntime.jsx(et,{size:n,tooltip:r,className:"mb-1",children:e}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsxs("div",{className:"relative w-full select-none",children:[jsxRuntime.jsx("div",{className:"h-1.5 w-full rounded-full bg-background-muted"}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-action-brand",style:{width:`${C}%`},"aria-hidden":true}),jsxRuntime.jsx("input",{type:"range",min:c,max:l,step:u,value:b,disabled:m,"aria-invalid":!!o,onChange:w=>{let S=Number(w.currentTarget.value);g||h(S),d?.(S);},className:tailwindMerge.twMerge("absolute inset-0 w-full cursor-pointer appearance-none bg-transparent outline-none","[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-background-input [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-border-input","hover:[&::-webkit-slider-thumb]:shadow-sm focus-visible:[&::-webkit-slider-thumb]:outline-2 focus-visible:[&::-webkit-slider-thumb]:outline-action-default","[&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-background-input [&::-moz-range-thumb]:border [&::-moz-range-thumb]:border-border-input","hover:[&::-moz-range-thumb]:shadow-sm focus-visible:[&::-moz-range-thumb]:outline-2 focus-visible:[&::-moz-range-thumb]:outline-action-default",m?"cursor-not-allowed opacity-60":void 0)})]}),p&&jsxRuntime.jsx("div",{className:"min-w-10 text-right text-sm text-text-primary tabular-nums",children:Math.round(v)})]}),t&&jsxRuntime.jsx(Ee,{className:"mt-2 text-text-secondary",children:t}),o&&jsxRuntime.jsx(ye,{className:"mt-1",children:o})]})}var $5=ot__namespace.default.createContext({orientation:"horizontal",isResizing:false});function kS(e,t){return e===void 0?t:e}function e3(e,t){return typeof e=="number"?e:typeof e=="string"&&e.endsWith("%")?Number.parseFloat(e)/100*t:Number.parseFloat(e.toString())}function wu({asideWidth:e,asideHeight:t,minAsideWidth:r=240,minAsideHeight:o=200,minMainWidth:n=400,minMainHeight:a=300,orientation:i="horizontal",resizable:s=false,onAsideResize:d,onResizeStart:c,onResizeEnd:l,className:u,dividerClassName:m,children:p}){let g=ot.useRef(null),[f,h]=ot.useState(false),b=i==="horizontal"?400:300,v=kS(i==="horizontal"?e:t,b),[x,C]=ot.useState(null),w=ot.useCallback(E=>{if(!g.current||!f)return;let B=g.current.getBoundingClientRect(),A=i==="horizontal"?B.width:B.height,H=i==="horizontal"?E.clientX:E.clientY,G=(i==="horizontal"?B.right:B.bottom)-H,I=A-G,F=i==="horizontal"?r:o,O=i==="horizontal"?n:a;G<F||I<O||(C(G),d?.(G));},[f,i,r,o,n,a,d]),S=ot.useCallback(()=>{h(false),l?.();},[l]),T=ot.useCallback(E=>{E.preventDefault(),E.stopPropagation(),h(true),c?.();},[c]);ot.useEffect(()=>{if(f)return document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),document.body.style.cursor=i==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),document.body.style.cursor="",document.body.style.userSelect="";}},[f,w,S,i]);let N=ot__namespace.default.Children.toArray(p).find(E=>ot__namespace.default.isValidElement(E)&&E.type===RS),k=ot__namespace.default.Children.toArray(p).find(E=>ot__namespace.default.isValidElement(E)&&E.type===MS),R=x??v,L=typeof R=="number"?`${R}px`:R;return jsxRuntime.jsx($5.Provider,{value:{orientation:i,isResizing:f},children:jsxRuntime.jsxs("div",{ref:g,className:tailwindMerge.twMerge("flex w-full h-full",i==="horizontal"?"flex-row":"flex-col",u),children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-auto flex-1",i==="horizontal"?"h-full":"w-full"),children:N}),s&&jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative group flex-shrink-0",i==="horizontal"?"w-2 -mx-1 cursor-col-resize":"h-2 -my-1 cursor-row-resize",m),onMouseDown:T,role:"separator","aria-orientation":i,"aria-label":"Resize divider",tabIndex:0,onKeyDown:E=>{if(!g.current)return;let B=g.current.getBoundingClientRect(),A=i==="horizontal"?B.width:B.height,H=x??e3(v,A),Y=20,G=i==="horizontal"?r:o,I=i==="horizontal"?n:a;if(i==="horizontal"){if(E.key==="ArrowLeft"){let F=Math.min(H+Y,A-I);C(F),d?.(F);}else if(E.key==="ArrowRight"){let F=Math.max(H-Y,G);C(F),d?.(F);}}else if(E.key==="ArrowUp"){let F=Math.min(H+Y,A-I);C(F),d?.(F);}else if(E.key==="ArrowDown"){let F=Math.max(H-Y,G);C(F),d?.(F);}},children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute bg-border-default transition-all",i==="horizontal"?"left-1/2 -translate-x-1/2 w-px h-full group-hover:w-1":"top-1/2 -translate-y-1/2 h-px w-full group-hover:h-1","group-hover:bg-action-brand/50",f&&"bg-action-brand",f&&(i==="horizontal"?"w-1":"h-1"))}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute",i==="horizontal"?"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1 h-8":"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-8 h-1","bg-border-muted rounded-full opacity-0 group-hover:opacity-100 transition-opacity")})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-auto flex-shrink-0",i==="horizontal"?"h-full":"w-full"),style:{[i==="horizontal"?"width":"height"]:L},children:k})]})})}function RS({className:e,children:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full h-full",e),children:t})}function MS({className:e,children:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full h-full",e),children:t})}wu.Main=RS;wu.Aside=MS;var r3=e=>{let t=rr({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=`min-h-[100px] py-2 ${e.isDisabled?"resize-none":e.isResizable?"resize-y":"resize-none"}`;return tailwindMerge.twMerge(t,r,e.className)};function ES({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,required:a,transparent:i,isInvalid:s,isDisabled:d,isResizable:c=false,className:l,validationResult:u,reserveErrorSpace:m=true,...p}){let{isFocused:g,handleFocus:f,handleBlur:h}=Dr();return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsx("textarea",{...p,required:a,onFocus:b=>{p.onFocus&&p.onFocus(b),f(b);},onBlur:b=>{p.onBlur&&p.onBlur(b),h(b);},className:r3({isInvalid:s,isDisabled:d,isResizable:c,isFocused:g,size:o,transparent:i,className:l}),disabled:d})}),m?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&u?jsxRuntime.jsx(ye,{size:o,children:r(u)}):t?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&u?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(u)}):t?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})})}function IS({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,required:a,transparent:i,isInvalid:s,isDisabled:d,isResizable:c=false,className:l,validationResult:u,value:m="",onChange:p,chips:g=[],onChipsChange:f,triggerPattern:h="{{",onTriggerDetected:b,onTriggerDismissed:v,renderChip:x,chipVariant:C="primary",chipSize:w,...S}){let T=ot.useRef(null),{isFocused:N,handleFocus:k,handleBlur:R}=Dr(),L=w||"sm",E=ot.useRef(null),B=ot.useCallback(O=>{let U="",K=z=>{if(z.nodeType===Node.TEXT_NODE){if(!z.parentElement?.closest("[data-chip-id]")){let D=z.textContent||"";U+=D;}}else if(z.nodeType===Node.ELEMENT_NODE){let V=z;if(V.hasAttribute("data-chip-id")){let D=V.getAttribute("data-chip-id");U+=`{{${D}}}`;return}else if(V.tagName==="BR"){U+=`
|
|
184
|
+
`;return}else V.tagName;}for(let V=0;V<z.childNodes.length;V++)K(z.childNodes[V]);};return K(O),U},[]),A=ot.useCallback((O,U)=>{let K=document.createTreeWalker(O,NodeFilter.SHOW_TEXT,{acceptNode:M=>{let P=M.parentElement;return P&&P.closest("[data-chip-id]")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),z=K.nextNode(),V=Math.max(0,U);for(;z;){let M=z.nodeValue||"";if(M.length>=V){let P=document.createRange();P.setStart(z,V),P.collapse(true);let X=window.getSelection();X?.removeAllRanges(),X?.addRange(P);return}V-=M.length,z=K.nextNode();}let D=window.getSelection(),y=document.createRange();y.selectNodeContents(O),y.collapse(false),D?.removeAllRanges(),D?.addRange(y);},[]);ot.useEffect(()=>{T.current&&!m&&T.current.textContent!==""&&(T.current.textContent="");},[m]),ot.useLayoutEffect(()=>{if(T.current){if(m===""){if(N)try{T.current.focus({preventScroll:!0}),A(T.current,0);}catch{}return}if(E.current!=null)try{A(T.current,E.current);}finally{E.current=null;}}},[m,A,N]);let H=ot.useCallback((O,U)=>{if(p?.(O),O===""){v?.();return}if(h&&b&&U!==void 0){let K=O.slice(0,U),z=typeof h=="string"?new RegExp(`\\${h}([^\\s]*)$`):h,V=K.match(z);if(V){let D=V[1]||"",y=U-V[0].length;b({query:D,position:U,startIndex:y});}else v?.();}},[p,h,b,v]),Y=ot.useCallback(O=>{if(!f||!p)return;let U=g.filter(z=>z.id!==O);f(U);let K=m.replace(new RegExp(`\\{\\{${O}\\}\\}`,"g"),"");p(K);},[g,f,m,p]),G=ot.useCallback(O=>x?x(O,()=>Y(O.id)):jsxRuntime.jsx(co,{variant:C,size:L,onRemove:d?void 0:()=>Y(O.id),isDisabled:d,className:"py-0.5 px-1.5 gap-1 text-xs leading-none rounded-md",children:O.label},O.id),[x,C,L,Y,d]),I=()=>{let O=rr({isInvalid:s,isDisabled:d,isFocused:N,transparent:i,size:o}),U=`min-h-[100px] py-2 px-3 ${d?"resize-none":c?"resize-y":"resize-none"}`,K=tailwindMerge.twMerge("focus:outline-none overflow-auto","[&_[data-chip-id]::selection]:bg-action-primary/20","[&:empty]:before:content-[attr(data-placeholder)] [&:empty]:before:text-text-disabled [&:empty]:before:pointer-events-none");return tailwindMerge.twMerge(O,U,K,l)},F=()=>m?m.split(/(\{\{[^}]+\}\})/g).map((U,K)=>{let z=U.match(/\{\{([^}]+)\}\}/);if(z){let V=z[1],D=g.find(y=>y.id===V);if(D)return jsxRuntime.jsx("span",{className:"inline-block align-baseline cursor-pointer",contentEditable:false,suppressContentEditableWarning:true,"data-chip-id":V,style:{userSelect:"none",verticalAlign:"baseline",lineHeight:"1"},onClick:y=>{y.preventDefault();let M=window.getSelection(),P=document.createRange();P.selectNode(y.currentTarget),M?.removeAllRanges(),M?.addRange(P);},children:G(D)},`chip-${V}-${K}`)}return U.includes(`
|
|
185
185
|
`)?U.split(`
|
|
186
|
-
`).map((V,
|
|
187
|
-
`).length-1&&jsxRuntime.jsx("br",{})]},`line-${K}-${L}`)):U}):null;return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsx("div",{ref:T,contentEditable:!l,suppressContentEditableWarning:true,onInput:z=>{if(l)return;let U=z.target,K=U.querySelector("[data-chip-id]")!==null,O;if(K?(O=B(U),O=O.replace(/(\{\{[^}]+\}\})\s{2,}/g,"$1 ").replace(/\s{2,}(\{\{[^}]+\}\})/g," $1")):O=U.textContent||"",O===""){try{let y=document.createRange();y.selectNodeContents(U),y.collapse(!0);let E=window.getSelection();E?.removeAllRanges(),E?.addRange(y),M.current=0;}catch{}W("",0);return}if(O===m)return;let V=window.getSelection(),L=0;if(V&&V.rangeCount>0)try{let y=V.getRangeAt(0);if(K){let E=0,P=!1,Y=$=>{if(P)return !0;if($===y.startContainer)return E+=y.startOffset,P=!0,!0;if($.nodeType===Node.TEXT_NODE){if(!$.parentElement?.closest("[data-chip-id]")){if($.contains(y.startContainer))return E+=y.startOffset,P=!0,!0;E+=($.textContent||"").length;}}else if($.nodeType===Node.ELEMENT_NODE){let oe=$;if(oe.hasAttribute("data-chip-id")){if(oe.contains(y.startContainer)||oe===y.startContainer){let _=oe.getAttribute("data-chip-id");return E+=`{{${_}}}`.length,P=!0,!0}let re=oe.getAttribute("data-chip-id");return E+=`{{${re}}}`.length,!1}else if(oe.tagName==="BR")return oe===y.startContainer?(P=!0,!0):(E+=1,!1)}for(let oe=0;oe<$.childNodes.length;oe++)if(Y($.childNodes[oe]))return !0;return !1};Y(U),L=E;}else {let E=document.createRange();E.setStart(U,0),E.setEnd(y.startContainer,y.startOffset),L=E.toString().length;}}catch{L=O.length;}M.current=L,W(O,L);},onKeyDown:z=>{if(l)return;let U=window.getSelection();if(!(!U||U.rangeCount===0))try{let K=U.getRangeAt(0),O=K.commonAncestorContainer;if(z.key==="ArrowLeft"||z.key==="ArrowRight"){let V=O.nodeType===Node.TEXT_NODE?O.parentElement?.closest("[data-chip-id]"):O.closest("[data-chip-id]");if(V){z.preventDefault();try{let L=document.createRange(),y=window.getSelection();z.key==="ArrowLeft"?L.setStartBefore(V):L.setStartAfter(V),L.collapse(!0),y?.removeAllRanges(),y?.addRange(L);}catch{}}}if(z.key==="Backspace"){let V=null;if(V=(O.nodeType===Node.TEXT_NODE?O.parentElement?.closest("[data-chip-id]"):O.closest("[data-chip-id]"))||null,!V)if(O.nodeType===Node.TEXT_NODE){let L=O;if(K.startOffset===0&&L.parentElement){let y=L.previousSibling;if(y&&y.nodeType===Node.ELEMENT_NODE){let E=y.closest("[data-chip-id]");E&&(V=E);}}}else {let L=O;if(K.startOffset>0){let y=L.childNodes[K.startOffset-1];if(y&&y.nodeType===Node.ELEMENT_NODE){let E=y.closest("[data-chip-id]");E&&(V=E);}}}if(V){z.preventDefault(),z.stopPropagation();let L=V.getAttribute("data-chip-id");if(!L)return;let y=`{{${L}}}`,E=m.indexOf(y);if(E!==-1){let P=m.slice(0,E)+m.slice(E+y.length),Y=g.filter($=>$.id!==L);M.current=E;try{window.getSelection()?.removeAllRanges();}catch{}f?.(Y),p?.(P);}}}}catch{}},onFocus:z=>{l||(w.onFocus&&w.onFocus(z),k(z));},onBlur:z=>{l||(w.onBlur&&w.onBlur(z),R(z));},className:I(),style:{whiteSpace:"pre-wrap",wordBreak:"break-word",...w.style},"data-placeholder":w.placeholder,children:F()},m===""?"empty":"content")}),t&&jsxRuntime.jsx(Ee,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(u)})]})})}function H5({isPlaceholder:e,isDisabled:t,size:r="md"}){return tailwindMerge.twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[r],e?"text-text-disabled italic":"text-text-primary",t?"text-text-disabled cursor-not-allowed":"cursor-text",!t&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-primary")}function NS({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,reserveErrorSpace:l=true,validationResult:d,className:c,descriptionPlacement:u="below",...m}){return jsxRuntime.jsxs(reactAriaComponents.TimeField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Fe(c,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,description:u==="tooltip"||u==="inline"?t:void 0,descriptionPlacement:u,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(An({isInvalid:s,isDisabled:i}),"px-3 py-2 flex items-center gap-0.5 w-full"),children:p=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:p,className:H5({isPlaceholder:p.isPlaceholder,isDisabled:!p.isEditable||i,size:o})})})}),l?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&d?jsxRuntime.jsx(ye,{size:o,children:r(d)}):t&&u==="below"?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&d?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(d)}):t&&u==="below"?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})}function kS({children:e,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`.trim(),role:"list",children:e})}function PS({children:e,variant:t="default",icon:r,label:o,isLast:n=false,className:a=""}){let s={default:{dot:"bg-border-default border-border-default",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},active:{dot:"bg-text-primary border-text-primary",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary font-medium"},muted:{dot:"bg-border-muted border-border-muted",line:"bg-border-muted",label:"text-text-secondary",content:"text-text-secondary"},success:{dot:"bg-feedback-success-border border-feedback-success-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},error:{dot:"bg-feedback-error-border border-feedback-error-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},warning:{dot:"bg-feedback-warning-border border-feedback-warning-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},info:{dot:"bg-feedback-info-border border-feedback-info-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"}}[t];return jsxRuntime.jsxs("div",{className:`flex gap-3 ${a}`.trim(),role:"listitem",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center",style:{width:"20px"},children:[jsxRuntime.jsx("div",{className:`flex items-center justify-center rounded-full border-2 ${s.dot}`,style:{width:"20px",height:"20px",flexShrink:0},children:r&&jsxRuntime.jsx(G,{name:r,size:12,className:"text-background-body"})}),!n&&jsxRuntime.jsx("div",{className:`w-0.5 flex-1 ${s.line}`,style:{minHeight:"24px"}})]}),jsxRuntime.jsxs("div",{className:"flex-1 pb-6",children:[o&&jsxRuntime.jsx("div",{className:`text-xs mb-1 ${s.label}`,children:o}),jsxRuntime.jsx("div",{className:`text-sm ${s.content}`,children:e})]})]})}function Y5(e){return "primary"}var X5="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",RS={primary:{selected:"bg-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-action-primary border-2 border-border-muted hover:bg-text-primary/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"}},J5="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",j5="opacity-100 cursor-pointer",q5={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},Z5={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function Q5(e){let{variant:t="primary",size:r="md",isDisabled:o,isSelected:n,borderRadius:a,borderRight:i,borderLeft:s}=e,l=Y5(),d=`${X5} ${n?RS[l].selected:RS[l].unselected}`;return d+=` ${_e[r].text} ${_e[r].height} ${_e[r].padding} ${_e[r].gap}`,d+=` ${o?J5:j5}`,a==="left"&&(d+=" rounded-l-sm"),a==="right"&&(d+=" rounded-r-sm"),i&&(d+=" border-r"),s&&(d+=" border-l"),d+=` ${pt()}`,(d+=" focus-visible:outline-action-primary"),tailwindMerge.twMerge(d)}function ES(e){let{className:t,children:r,onPress:o,icon:n,iconPosition:a="left",iconWeight:i,isLoading:s=false,loadingText:l,loadingIndicator:d,size:c="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",...g}=e,f=n?jsxRuntime.jsx(G,{name:n,size:c,weight:i}):null,b=()=>{let v=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a==="left"&&f,r,a==="right"&&f]});return s?jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:d||jsxRuntime.jsx(G,{name:"CircleNotch",size:c,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:v}),l&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:l})]}):v},h=jsxRuntime.jsx(reactAriaComponents.ToggleButton,{onPress:o,...g,className:tailwindMerge.twMerge(Q5(e),t),"aria-busy":s,children:b()});return u&&u>0?jsxRuntime.jsxs("div",{className:"relative",children:[h,jsxRuntime.jsx("span",{className:`absolute ${q5[p]} flex h-5 w-5 items-center justify-center rounded-full ${Z5[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):h}function $5({formId:e="dialog-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,title:l,...d}){return jsxRuntime.jsx(Dr,{title:l,primaryAction:{label:r,onPress:()=>{let u=document.getElementById(e);u&&u.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...d,children:jsxRuntime.jsx(Ii,{id:e,onSubmit:t,children:s})})}function e3({formId:e="drawer-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,...l}){return jsxRuntime.jsx(Ks,{primaryAction:{label:r,onPress:()=>{let c=document.getElementById(e);c&&c.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...l,children:jsxRuntime.jsx(Ii,{id:e,onSubmit:t,className:"mt-2",children:s})})}function r3({align:e="end",className:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("flex gap-2",e==="start"?"justify-start":e==="between"?"justify-between":"justify-end",t)})}var a3={sm:"gap-2",md:"gap-4",lg:"gap-6"};function i3(e){if(!e)return "";let t=e.base?`grid-cols-${e.base}`:"",r=e.md?`md:grid-cols-${e.md}`:"",o=e.lg?`lg:grid-cols-${e.lg}`:"";return [t,r,o].filter(Boolean).join(" ")}function s3({cols:e={base:1},gap:t="lg",className:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("grid",i3(e),a3[t],r)})}function d3({title:e,description:t,showDivider:r,className:o,children:n,...a}){return jsxRuntime.jsxs("section",{...a,className:tailwindMerge.twMerge("flex flex-col",o),children:[(e||t)&&jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[typeof e=="string"?jsxRuntime.jsx(vr,{tag:"h3",size:"sm",children:e}):e,t?jsxRuntime.jsx(Ee,{size:"lg",children:t}):null]}),jsxRuntime.jsx("div",{className:"flex flex-col gap-6",children:n}),r&&jsxRuntime.jsx("hr",{className:"mt-2 border-border-muted"})]})}function u3(){return jsxRuntime.jsx("hr",{className:"border-border-muted"})}function p3({steps:e,currentStepId:t,onStepClick:r,className:o}){let n=e.findIndex(a=>a.id===t);return jsxRuntime.jsx("nav",{"aria-label":"Progress",className:tailwindMerge.twMerge("w-full",o),children:jsxRuntime.jsx("div",{className:"relative mb-12",children:jsxRuntime.jsx("ol",{className:"relative flex items-start justify-between",children:e.map((a,i)=>{let s=a.id===t,l=i<n,d=r&&(l||s);return jsxRuntime.jsxs("li",{className:"relative flex flex-col items-center",style:{flex:`1 1 ${100/e.length}%`},children:[jsxRuntime.jsx("button",{type:"button",disabled:!d,onClick:()=>d&&r?.(a.id),className:tailwindMerge.twMerge("relative z-10 flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors bg-background-body",l&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",s&&"border-action-primary bg-background-body text-action-primary",!l&&!s&&"border-border-default bg-background-body text-text-secondary",d&&"cursor-pointer",!d&&"cursor-default"),"aria-current":s?"step":void 0,children:l?jsxRuntime.jsx(G,{name:"Check",size:20,weight:"bold"}):jsxRuntime.jsx("span",{className:"text-sm font-semibold",children:i+1})}),i<e.length-1&&jsxRuntime.jsx("div",{className:"absolute top-5 h-0.5 transition-colors",style:{left:"50%",width:"100%",marginLeft:"20px",backgroundColor:i<n?"var(--color-action-primary)":"var(--color-border-default)"}}),jsxRuntime.jsxs("div",{className:"mt-3 flex flex-col items-center text-center w-32",children:[jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("text-sm font-medium",s&&"text-text-default",l&&"text-text-primary",!s&&!l&&"text-text-secondary"),children:a.title}),a.description&&jsxRuntime.jsx("span",{className:"mt-1 text-xs text-text-secondary",children:a.description})]})]},a.id)})})})})}function f3({formId:e,show:t,isSubmitting:r,onCancel:o,primaryLabel:n="Save changes",secondaryLabel:a="Cancel",className:i}){return t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("fixed inset-x-0 bottom-0 z-40 border-t border-border-muted bg-background-surface/95 backdrop-blur supports-[backdrop-filter]:bg-background-surface/70",i),children:jsxRuntime.jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsxRuntime.jsx("div",{className:"text-sm text-text-secondary",children:"You have unsaved changes"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(te,{variant:"secondary",onPress:o,children:a}),jsxRuntime.jsx(te,{type:"submit",form:e,isDisabled:!!r,children:r?"Saving...":n})]})]})}):null}function g3({when:e,message:t="You have unsaved changes. Leave anyway?"}){return ot__namespace.useEffect(()=>{if(!e)return;let r=o=>(o.preventDefault(),o.returnValue=t,t);return window.addEventListener("beforeunload",r),()=>window.removeEventListener("beforeunload",r)},[e,t]),null}function h3({steps:e,initialStepId:t,canNavigate:r}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[o,n]=ot__namespace.useState(t||e[0].id),a=e.findIndex(u=>u.id===o),i=a>0,s=a<e.length-1,l=async u=>u===o?true:r&&!await r(o,u)?false:(n(u),true);return {steps:e,currentStepId:o,setCurrentStepId:l,next:async()=>!s||a===-1?false:l(e[a+1].id),prev:async()=>!i||a===-1?false:l(e[a-1].id),hasNext:s,hasPrev:i,stepIndex:a}}function xl(e,t){return t.split(".").reduce((r,o)=>r?.[o],e)}function OS(e){return e==null?true:Array.isArray(e)?e.length===0:typeof e=="string"?e.trim()==="":false}function x3(e,t){let r=xl(e,t.field),o=t.value;switch(t.operator){case "eq":return r===o;case "neq":return r!==o;case "in":return Array.isArray(o)?Array.isArray(r)?r.some(n=>o.includes(n)):o.includes(r):false;case "nin":return Array.isArray(o)?Array.isArray(r)?!r.some(n=>o.includes(n)):!o.includes(r):false;case "gt":return r instanceof Date&&typeof o=="string"?r>new Date(o):r>o;case "gte":return r instanceof Date&&typeof o=="string"?r>=new Date(o):r>=o;case "lt":return r instanceof Date&&typeof o=="string"?r<new Date(o):r<o;case "lte":return r instanceof Date&&typeof o=="string"?r<=new Date(o):r<=o;case "contains":return typeof r!="string"?false:r.toLowerCase().includes(String(o).toLowerCase());case "startsWith":return typeof r!="string"?false:r.toLowerCase().startsWith(String(o).toLowerCase());case "endsWith":return typeof r!="string"?false:r.toLowerCase().endsWith(String(o).toLowerCase());case "isEmpty":return OS(r);case "isNotEmpty":return !OS(r);default:return false}}function zS(e,t){if(t.conditions.length===0)return true;let r=t.conditions.map(o=>"conditions"in o?zS(e,o):x3(e,o));return t.logic==="AND"?r.every(Boolean):r.some(Boolean)}function y3(e,t){return !t||t.conditions.length===0?e:e.filter(r=>zS(r,t))}function v3(e,t,r){if(e==null&&t==null)return 0;if(e==null)return r==="asc"?1:-1;if(t==null)return r==="asc"?-1:1;if(e instanceof Date&&t instanceof Date){let o=e.getTime()-t.getTime();return r==="asc"?o:-o}if(typeof e=="string"&&typeof t=="string"){let o=e.toLowerCase().localeCompare(t.toLowerCase());return r==="asc"?o:-o}return e<t?r==="asc"?-1:1:e>t?r==="asc"?1:-1:0}function C3(e,t){return t?[...e].sort((r,o)=>{let n=xl(r,t.field),a=xl(o,t.field);return v3(n,a,t.direction)}):e}function S3(e,t){if(!t||!t.query.trim())return e;let{query:r,fields:o,fuzzy:n=true,threshold:a=.3}=t;if(n)return new b3__default.default(e,{keys:o,threshold:a,ignoreLocation:true,includeScore:true}).search(r).map(d=>d.item);let i=r.toLowerCase();return e.filter(s=>o.some(l=>{let d=xl(s,l);return d==null?false:String(d).toLowerCase().includes(i)}))}function w3(e,t){let r={};for(let o of t){if(r[o.field]={},o.values)for(let n of o.values)r[o.field][String(n.value)]=0;for(let n of e){let a=xl(n,o.field);if(a!=null)if(Array.isArray(a))for(let i of a){let s=String(i);r[o.field][s]=(r[o.field][s]||0)+1;}else {let i=String(a);r[o.field][i]=(r[o.field][i]||0)+1;}}}return r}function ng({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){let a=S3(e,o||null);a=y3(a,t||null);let i=w3(a,n);return a=C3(a,r||null),{data:a,facetCounts:i,resultCount:a.length}}function wu({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){return ot.useMemo(()=>ng({data:e,filters:t,sort:r,search:o,facetConfigs:n}),[e,t,r,o,n])}function Tu({filters:e,sort:t,search:r,onStateChange:o,searchDebounce:n=300}){let a=Dn(r,n),i=ot.useRef(true);ot.useEffect(()=>{if(i.current){i.current=false;return}o({filters:e,sort:t,search:a});},[e,t,a,o]);}function HS(e){return e.mode==="client"?wu({data:e.data,filters:e.filters,sort:e.sort,search:e.search,facetConfigs:e.facetConfigs}):(Tu({filters:e.filters,sort:e.sort,search:e.search,onStateChange:e.onStateChange,searchDebounce:e.searchDebounce}),{data:e.data,facetCounts:e.facetCounts||{},resultCount:e.resultCount??e.data.length})}var GS=lg(cm());function R3(e,t,r=true){let o=e;if(r){let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return `${o}-${n}.${t}`}return `${o}.${t}`}function ag(e){return /^[=+\-@\t\r]/.test(e)?`'${e}`:e}function M3(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function WS(e,t){let r=M3(t,e);if(e.exportValue){let o=e.exportValue(r,t);return o==null?"":typeof o=="string"?ag(o):o}return r==null?"":r instanceof Date?r.toISOString():typeof r=="object"?ag(JSON.stringify(r)):typeof r=="string"?ag(r):r}function ig(e){return e.filter(t=>t.exportable!==false)}function US(e){let t=e.map(n=>n.exportLabel||n.label),r=new Set,o=[];for(let n of t)r.has(n)?o.includes(n)||o.push(n):r.add(n);if(o.length>0)throw new Error(`Duplicate export headers found: ${o.join(", ")}. Use exportLabel to provide unique headers.`)}async function sg(e){let{columns:t,data:r,metadata:o={}}=e;try{let n=ig(t);if(n.length===0)throw new Error("No exportable columns found");US(n);let a=r.map(d=>{let c={};for(let u of n){let m=u.exportLabel||u.label;c[m]=WS(u,d);}return c}),i=eR__default.default.unparse(a,{header:!0,skipEmptyLines:!0}),s=new Blob([i],{type:"text/csv;charset=utf-8;"}),l=R3(o.filename||"table-data","csv",o.timestamp!==!1);(0,GS.saveAs)(s,l);}catch(n){throw new Error(`CSV export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function E3(e){let{columns:t,data:r}=e,o=ig(t);return US(o),r.map(n=>{let a={};for(let i of o){let s=i.exportLabel||i.label;a[s]=WS(i,n);}return a})}function L3(e){return ig(e).map(t=>t.exportLabel||t.label)}function KS({columns:e,data:t,metadata:r}){let n=e.filter(l=>l.exportable!==false).length>0&&t.length>0,[a,i]=ot.useState(false);return {exportCSV:ot.useCallback(async()=>{i(true);try{await sg({columns:e,data:t,metadata:r});}catch(l){throw console.error("Table export failed:",l),l}finally{i(false);}},[e,t,r]),canExport:n,isExporting:a}}function epe(e){switch(e){case "charging":case "on":return "success";case "discharging":return "warning";case "heat":case "cool":return "info";case "off":case "idle":case "eco":case "auto":return "neutral";default:return "neutral"}}function YS(e=240){if(!(!Number.isFinite(e)||e<=0))return [1.05,.95].map(t=>{let r=Math.round(e*t);return {value:r,label:`${r} V`}})}function I3(e,t=240){let r=YS(t);if(!r)return;let o=Math.min(r[1].value-4,t-12),n=Math.max(r[0].value+4,t+12);for(let a of e)for(let i of [a.yValue,a.chartYValue,a.baselineValue])typeof i!="number"||!Number.isFinite(i)||(o=Math.min(o,i-4),n=Math.max(n,i+4));return [o,n]}Object.defineProperty(exports,"DialogTrigger",{enumerable:true,get:function(){return reactAriaComponents.DialogTrigger}});Object.defineProperty(exports,"Focusable",{enumerable:true,get:function(){return reactAriaComponents.Focusable}});exports.ABSENT_GRID_FIELDS=BE;exports.ActionCell=tv;exports.ActionMenu=pi;exports.ActivityFeed=Sp;exports.ActivityFeedGroup=Ul;exports.ActivityItem=Kl;exports.Alert=Oh;exports.AppShell=Jh;exports.AreaSeries=Wn;exports.AutoMobileRenderer=bd;exports.Autocomplete=$l;exports.Avatar=nn;exports.BREAKPOINTS=oa;exports.Badge=kt;exports.BadgeCell=ov;exports.Banner=tc;exports.BarSeries=mc;exports.BooleanCell=nv;exports.BrandProvider=yg;exports.BreadcrumbItem=oc;exports.Breadcrumbs=rc;exports.Button=te;exports.CATEGORICAL_RAMP=jd;exports.CATEGORY_COLOR_TOKENS=av;exports.CATEGORY_NEUTRAL_COLOR=ed;exports.CHART_HEADER_HEIGHT=dp;exports.COLOR_RAMPS=el;exports.CUSTOM_ICON_REGISTRY=wn;exports.Calendar=xi;exports.Card=at;exports.CardContent=fp;exports.CardFooter=gp;exports.CardHeader=Vl;exports.CardMedia=mp;exports.CardMobileRenderer=xd;exports.CarouselAutoplayTrigger=Tb;exports.CarouselControl=vb;exports.CarouselIndicator=Kp;exports.CarouselIndicatorGroup=wb;exports.CarouselItem=yb;exports.CarouselItemGroup=xb;exports.CarouselNextTrigger=Sb;exports.CarouselPrevTrigger=Cb;exports.CarouselProgressText=Nb;exports.CarouselRoot=bb;exports.CategoryBarChart=lx;exports.CategoryCell=sv;exports.ChartAxis=uo;exports.ChartBottomBar=Ti;exports.ChartContainer=Gm;exports.ChartContext=co;exports.ChartEventMarkers=Sc;exports.ChartEventSpans=wc;exports.ChartExpandOwnedByAncestor=fm;exports.ChartHeader=di;exports.ChartHint=Ac;exports.ChartLabelledBy=Mn;exports.ChartOwnsItsTitle=vh;exports.ChartSourceProvider=by;exports.ChartTooltip=Ho;exports.Checkbox=So;exports.CheckboxGroup=Yp;exports.Chip=lo;exports.ChipInputField=Db;exports.ClearButton=ms;exports.CodeEditor=Fb;exports.Collapse=yi;exports.CollapseContent=Hn;exports.CollapseHeader=zn;exports.CollapseItem=On;exports.ColorField=e1;exports.ColorModeProvider=Mg;exports.CommandPalette=nC;exports.Confirm=Gb;exports.ConnectionStatusBadge=Wb;exports.ContactCard=Ub;exports.ContactMetaCell=cv;exports.ContactMetaDisplay=lc;exports.ContainerQueryProvider=Xb;exports.CopyToClipboard=In;exports.CustomCell=dv;exports.DEFAULT_CHART_HEIGHT=Ey;exports.DEFAULT_MAP_TYPE=eu;exports.DEFAULT_PAGE_SIZE=yd;exports.DIVERGING_RAMPS=Jd;exports.DataControls=Wy;exports.DataTable=Xv;exports.DateCell=uv;exports.DateField=jy;exports.DateRangePicker=jc;exports.DeltaCell=pv;exports.Description=Ee;exports.DeviceHealthBadge=jv;exports.DeviceMetaCell=hv;exports.DeviceMetaDisplay=nd;exports.DeviceStateBadge=Aa;exports.DeviceStateCell=yv;exports.DeviceStateWithMetric=sd;exports.DeviceTypeIcon=Zv;exports.Dialog=Dr;exports.DialogForm=$5;exports.DialogHeader=Cr;exports.Drawer=Ks;exports.DrawerForm=e3;exports.ENTITY_CATEGORY_CONFIG=FE;exports.ENTITY_CONFIG=fn;exports.EmptyState=ki;exports.EnrollmentStatusBadge=_v;exports.ErrorBoundary=Co;exports.FieldError=ye;exports.FieldGroup=_h;exports.FileUpload=eC;exports.FilterChips=Uy;exports.FilterDialog=_y;exports.FirmwareVersionBadge=rC;exports.Form=Ii;exports.FormActions=r3;exports.FormDivider=u3;exports.FormGrid=s3;exports.FormSection=d3;exports.FormStepper=p3;exports.FormatRegistry=de;exports.FormattedCell=Cv;exports.FunnelSeries=Iy;exports.GRID_ELEMENT_TYPE_BY_ENTITY=WE;exports.GRID_STATE_COLORS=IE;exports.GRID_STAT_LIST=xt;exports.GRID_STAT_LIST_CAPACITOR_PER_PHASE_KVAR=zE;exports.GRID_STAT_LIST_CAPACITOR_TOTAL_KVAR=OE;exports.GlobalSearch=sC;exports.Grid=ff;exports.GridStateBadge=id;exports.HEADLINE_METRIC_BOUNDS=YE;exports.Heading=vr;exports.HierarchyExplorer=BC;exports.HorizontalBarCell=tf;exports.HoverCard=DA;exports.Icon=G;exports.IndexCell=Tv;exports.InfiniteScrollIndicator=io;exports.Input=Zl;exports.InputWrapper=Dt;exports.InteractiveMap=al;exports.Kpi=WC;exports.KpiGroup=Cf;exports.Label=et;exports.LineSeries=Ta;exports.List=jC;exports.ListBox=_A;exports.ListBoxItem=Ir;exports.ListItem=ZC;exports.ListPane=QC;exports.Loader=ao;exports.Logo=fi;exports.MAP_TYPES=B0;exports.MAX_PAGE_SIZE=lf;exports.MapStyleProvider=F0;exports.Meter=G0;exports.MiniBarCell=rf;exports.ModalBackdrop=Yr;exports.MultiSelect=U0;exports.Notice=du;exports.NoticeContainer=uu;exports.NoticeProvider=Y0;exports.NumberCell=Pv;exports.NumberField=Os;exports.PageBanner=cb;exports.PageLayout=qa;exports.PaginationFooter=Cd;exports.PercentBarCell=af;exports.PieChart=Oy;exports.PlaceSearch=_0;exports.Popover=Et;exports.ProgressBar=eS;exports.Prose=tS;exports.Radio=iS;exports.RadioCard=rS;exports.RadioCardGroup=oS;exports.RadioGroup=aS;exports.RangeCalendar=Ri;exports.RangeCell=Ev;exports.ResultsCount=Is;exports.RichTextEditor=cS;exports.SECTION_NAVIGATE_EVENT=Yi;exports.SEQUENTIAL_RAMPS=Xd;exports.SKELETON_SIZES=Jn;exports.SOURCE_UNIT_TO_WH=Xu;exports.SaveBar=f3;exports.SearchControl=Ma;exports.SearchEmptyState=lC;exports.SearchLoadingState=dC;exports.SearchResultGroup=pC;exports.SearchResultItem=mC;exports.SearchResultsList=fC;exports.SearchTrigger=hC;exports.Section=Xi;exports.SectionNav=fu;exports.SegmentedControl=Lc;exports.Select=on;exports.SelectCell=pd;exports.SideNav=Xl;exports.SiteCard=dS;exports.SiteContactCard=pS;exports.SiteMetaCell=Dv;exports.SiteMetaDisplay=md;exports.Skeleton=q;exports.Slider=mS;exports.SortControl=Fs;exports.SparklineCell=sf;exports.SplitPane=Cu;exports.StackNav=gi;exports.StatList=Ld;exports.StaticMap=Ki;exports.StreamingChart=Wc;exports.Switch=qc;exports.Tab=yu;exports.TabList=xu;exports.TabPanel=q0;exports.Tabs=bu;exports.TextArea=yS;exports.TextAreaWithChips=wS;exports.TextCell=Bv;exports.TextField=fo;exports.TextLink=St;exports.TiledTimeSeriesChart=Ms;exports.TiledTimeSeriesExplorer=Gc;exports.TimeControls=Dc;exports.TimeField=NS;exports.Timeline=kS;exports.TimelineItem=PS;exports.ToggleButton=ES;exports.Tooltip=tr;exports.TopNav=ps;exports.Tray=Lt;exports.UNARY_FILTER_OPERATORS=Ky;exports.UNARY_OPERATOR_LABELS=Xy;exports.UNVERIFIED_VOLTAGE_UNIT_ROWS=VE;exports.UnsavedChangesPrompt=g3;exports.activeDeviceStates=_E;exports.addFilterCondition=Xn;exports.applyDataOperations=ng;exports.archetypeFor=XE;exports.assembleSeries=Nx;exports.autoScaleCurrent=bT;exports.autoScaleDistance=Og;exports.autoScaleEnergy=Wg;exports.autoScalePower=NT;exports.autoScaleResistance=kT;exports.autoScaleVoltage=AT;exports.baselineFromPoint=F1;exports.camelCaseToWords=nh;exports.capitalize=rh;exports.celsiusToFahrenheit=PT;exports.celsiusToKelvin=MB;exports.centimetersToInches=dB;exports.classicPresetRanges=Lx;exports.clearColorCache=wl;exports.createCategoryColorMap=$w;exports.createEmptyFilter=Bs;exports.createFilter=JM;exports.createFilters=jM;exports.createFormat=rV;exports.createTextureIcon=Xe;exports.createTiledCameraSyncGroup=Ic;exports.createXScale=nm;exports.createYScale=ys;exports.csvUnitFor=np;exports.csvValueFor=sh;exports.defaultMargin=je;exports.defaultMultiSelectMatcher=Yf;exports.deltaDirectionFromValue=Qm;exports.deviceStateLabels=$E;exports.deviceStateMetricFormats=MZ;exports.emptyStore=bm;exports.entityHasDetailPage=JE;exports.entityHasStatList=qE;exports.entityShowsNow=jE;exports.enumToSentenceCase=LT;exports.exportChart=um;exports.exportTableAsCSV=sg;exports.fahrenheitToCelsius=RT;exports.fahrenheitToKelvin=EB;exports.feetToMeters=tB;exports.feetToMiles=nB;exports.filterMultiSelectOptions=ou;exports.filterToChips=qM;exports.formatBoolean=Eg;exports.formatCapacity=AF;exports.formatComponentValue=Ao;exports.formatCurrency=Fg;exports.formatCurrent=Vu;exports.formatDate=Bg;exports.formatDistance=zg;exports.formatEmptyValue=_c;exports.formatEnergy=Ju;exports.formatFieldValue=Xr;exports.formatInternationalPhone=ju;exports.formatNumber=Ig;exports.formatPercent=Dg;exports.formatPhone=Ug;exports.formatPhoneNumber=ai;exports.formatPower=_u;exports.formatPowerRating=IF;exports.formatResistance=ep;exports.formatTemperature=Qg;exports.formatText=ih;exports.formatUSPhone=Rl;exports.formatVoltage=op;exports.getBadgeClasses=$y;exports.getBooleanBadgeVariant=ev;exports.getCellAlignmentClasses=qm;exports.getCellContainerClasses=ke;exports.getCellTextClasses=Gr;exports.getColorRamp=Bf;exports.getColorRampsByKind=Vf;exports.getContrastingTextColor=eT;exports.getDateParts=qF;exports.getDefaultChartColor=$i;exports.getDefaultColors=Tl;exports.getDeviceStateDisplayLabel=$m;exports.getDeviceStateLabel=$m;exports.getEntityCategory=KE;exports.getEntityConfig=od;exports.getEntityIcon=Gs;exports.getEntityLabel=UE;exports.getEntityStatList=fv;exports.getEventColor=ln;exports.getExportFormatName=aR;exports.getExportHeaders=L3;exports.getFieldGroupStyles=rk;exports.getFilterFields=La;exports.getGridStateLabel=xv;exports.getInputBackgroundStyles=Qh;exports.getInputBaseStyles=rr;exports.getInputStateStyles=An;exports.getLinkClasses=Zm;exports.getNumericAxisGutter=Qb;exports.getNumericColorClasses=$c;exports.getResolvedColor=_t;exports.getSkeletonSize=Ft;exports.getStateTone=epe;exports.getThemeCategoricalColors=tn;exports.getYFormatSettings=zr;exports.gridEntityTypeKeys=mv;exports.gridStateLabels=tL;exports.hasTileData=Ca;exports.inchesToCentimeters=cB;exports.isActiveDeviceState=_m;exports.isActiveState=_m;exports.isCustomPinsLayer=Af;exports.isExportSupported=nR;exports.isFilterEmpty=Jc;exports.isGeoJsonLayer=Df;exports.isGridEntityTypeKey=GE;exports.isLightColor=Cg;exports.isNil=xe;exports.isRasterLayer=If;exports.isStreamingSource=Nc;exports.isUnaryFilterOperator=Yy;exports.isVectorLayer=Lf;exports.kelvinToCelsius=MT;exports.kelvinToFahrenheit=LB;exports.kilometersToMiles=oB;exports.layer=Ef;exports.mapValuesToCategoricalColors=es;exports.metersToFeet=eB;exports.metersToMiles=aB;exports.metersToYards=lB;exports.milesToFeet=Vg;exports.milesToKilometers=rB;exports.milesToMeters=iB;exports.multiSelectSearchKeys=Xf;exports.multiSelectSelectionEntries=au;exports.parseBoolean=Nn;exports.parseInstant=kc;exports.percentThresholdLevel=nf;exports.pickEnergyUnit=Yu;exports.prepareTableDataForExport=E3;exports.registerPhosphorIcon=z0;exports.removeFilterCondition=Ea;exports.resolvePagination=vd;exports.resolveValue=ge;exports.shouldOfferLiteralOption=nu;exports.snakeCaseToWords=ah;exports.telemetryPresetRanges=Mc;exports.temperatureStringToSymbol=Xg;exports.tierForViewport=Pc;exports.tileIndexAt=BR;exports.tileKey=br;exports.tileReducer=kx;exports.tilesForViewport=dn;exports.toA=KF;exports.toActiveInactive=lT;exports.toAmps=kl;exports.toBoolean=Tn;exports.toCelsius=jg;exports.toCentimeters=ST;exports.toCheckmark=dT;exports.toCompactNumber=fT;exports.toCurrency=Ag;exports.toCustomDateFormat=CT;exports.toDateString=xT;exports.toEnabledDisabled=iT;exports.toFahrenheit=Jg;exports.toFeet=Hu;exports.toFloat=pT;exports.toFormattedNumber=mT;exports.toFullDateTime=yT;exports.toGW=SB;exports.toGWh=Gg;exports.toGigawatts=Qu;exports.toISOString=vT;exports.toInches=TT;exports.toInteger=uT;exports.toKA=YF;exports.toKV=zB;exports.toKW=vB;exports.toKelvin=qg;exports.toKiloamps=Bu;exports.toKilohms=Kg;exports.toKilometers=zu;exports.toKilovolts=rp;exports.toKilowatts=qu;exports.toLowerCase=$g;exports.toMA=UF;exports.toMV=VB;exports.toMW=CB;exports.toMWh=Hg;exports.toMegawatts=Zu;exports.toMegohms=Yg;exports.toMeters=Ou;exports.toMiles=Gu;exports.toMilliamps=Fu;exports.toMillimeters=wT;exports.toMilliohms=$u;exports.toMillivolts=tp;exports.toNauticalMiles=$F;exports.toOhms=El;exports.toOnOff=sT;exports.toPercentage=Lg;exports.toRelativeTime=Pl;exports.toScientificNotation=gT;exports.toSecret=DT;exports.toSentenceCase=eh;exports.toTemperature=Zg;exports.toTitleCase=th;exports.toTrueFalse=cT;exports.toUpperCase=_g;exports.toV=OB;exports.toVolts=Al;exports.toW=yB;exports.toWatts=Ml;exports.toWh=Uu;exports.toYards=Wu;exports.tokWh=Ku;exports.truncateEnd=Dl;exports.truncateMiddle=ii;exports.truncateStart=Ll;exports.typeRole=zt;exports.typographyRole=Io;exports.ucFirst=oh;exports.useBreakpoint=Rr;exports.useChartContext=ba;exports.useChartExpand=va;exports.useChartHeaderMetrics=ci;exports.useChartHeaderWidth=yh;exports.useChartOwnsItsTitle=Fl;exports.useChartSourceHost=Ls;exports.useChartSourceResolver=Es;exports.useClientDataControls=wu;exports.useColorMode=hr;exports.useComponentFormatter=OF;exports.useContainerBreakpoint=Kb;exports.useDataControls=HS;exports.useDebounce=Dn;exports.useElementSize=bi;exports.useInfiniteScroll=En;exports.useInputFocus=Ar;exports.useLocalStorage=Wd;exports.useMapStyleOverride=Gi;exports.useMediaQuery=Pr;exports.useNotice=J0;exports.useServerDataControls=Tu;exports.useTableExport=KS;exports.useTileWindow=Rc;exports.useTiledTimeSeries=ym;exports.useWizard=h3;exports.voltageReferenceLines=YS;exports.voltageYDomain=I3;exports.wrapWithLink=Yo;exports.yardsToMeters=sB;//# sourceMappingURL=index.cjs.map
|
|
186
|
+
`).map((V,D)=>jsxRuntime.jsxs(ot__namespace.default.Fragment,{children:[V,D<U.split(`
|
|
187
|
+
`).length-1&&jsxRuntime.jsx("br",{})]},`line-${K}-${D}`)):U}):null;return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsx("div",{ref:T,contentEditable:!d,suppressContentEditableWarning:true,onInput:O=>{if(d)return;let U=O.target,K=U.querySelector("[data-chip-id]")!==null,z;if(K?(z=B(U),z=z.replace(/(\{\{[^}]+\}\})\s{2,}/g,"$1 ").replace(/\s{2,}(\{\{[^}]+\}\})/g," $1")):z=U.textContent||"",z===""){try{let y=document.createRange();y.selectNodeContents(U),y.collapse(!0);let M=window.getSelection();M?.removeAllRanges(),M?.addRange(y),E.current=0;}catch{}H("",0);return}if(z===m)return;let V=window.getSelection(),D=0;if(V&&V.rangeCount>0)try{let y=V.getRangeAt(0);if(K){let M=0,P=!1,X=$=>{if(P)return !0;if($===y.startContainer)return M+=y.startOffset,P=!0,!0;if($.nodeType===Node.TEXT_NODE){if(!$.parentElement?.closest("[data-chip-id]")){if($.contains(y.startContainer))return M+=y.startOffset,P=!0,!0;M+=($.textContent||"").length;}}else if($.nodeType===Node.ELEMENT_NODE){let oe=$;if(oe.hasAttribute("data-chip-id")){if(oe.contains(y.startContainer)||oe===y.startContainer){let _=oe.getAttribute("data-chip-id");return M+=`{{${_}}}`.length,P=!0,!0}let re=oe.getAttribute("data-chip-id");return M+=`{{${re}}}`.length,!1}else if(oe.tagName==="BR")return oe===y.startContainer?(P=!0,!0):(M+=1,!1)}for(let oe=0;oe<$.childNodes.length;oe++)if(X($.childNodes[oe]))return !0;return !1};X(U),D=M;}else {let M=document.createRange();M.setStart(U,0),M.setEnd(y.startContainer,y.startOffset),D=M.toString().length;}}catch{D=z.length;}E.current=D,H(z,D);},onKeyDown:O=>{if(d)return;let U=window.getSelection();if(!(!U||U.rangeCount===0))try{let K=U.getRangeAt(0),z=K.commonAncestorContainer;if(O.key==="ArrowLeft"||O.key==="ArrowRight"){let V=z.nodeType===Node.TEXT_NODE?z.parentElement?.closest("[data-chip-id]"):z.closest("[data-chip-id]");if(V){O.preventDefault();try{let D=document.createRange(),y=window.getSelection();O.key==="ArrowLeft"?D.setStartBefore(V):D.setStartAfter(V),D.collapse(!0),y?.removeAllRanges(),y?.addRange(D);}catch{}}}if(O.key==="Backspace"){let V=null;if(V=(z.nodeType===Node.TEXT_NODE?z.parentElement?.closest("[data-chip-id]"):z.closest("[data-chip-id]"))||null,!V)if(z.nodeType===Node.TEXT_NODE){let D=z;if(K.startOffset===0&&D.parentElement){let y=D.previousSibling;if(y&&y.nodeType===Node.ELEMENT_NODE){let M=y.closest("[data-chip-id]");M&&(V=M);}}}else {let D=z;if(K.startOffset>0){let y=D.childNodes[K.startOffset-1];if(y&&y.nodeType===Node.ELEMENT_NODE){let M=y.closest("[data-chip-id]");M&&(V=M);}}}if(V){O.preventDefault(),O.stopPropagation();let D=V.getAttribute("data-chip-id");if(!D)return;let y=`{{${D}}}`,M=m.indexOf(y);if(M!==-1){let P=m.slice(0,M)+m.slice(M+y.length),X=g.filter($=>$.id!==D);E.current=M;try{window.getSelection()?.removeAllRanges();}catch{}f?.(X),p?.(P);}}}}catch{}},onFocus:O=>{d||(S.onFocus&&S.onFocus(O),k(O));},onBlur:O=>{d||(S.onBlur&&S.onBlur(O),R(O));},className:I(),style:{whiteSpace:"pre-wrap",wordBreak:"break-word",...S.style},"data-placeholder":S.placeholder,children:F()},m===""?"empty":"content")}),t&&jsxRuntime.jsx(Ee,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(u)})]})})}function u3({isPlaceholder:e,isDisabled:t,size:r="md"}){return tailwindMerge.twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[r],e?"text-text-disabled italic":"text-text-primary",t?"text-text-disabled cursor-not-allowed":"cursor-text",!t&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-primary")}function BS({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,reserveErrorSpace:d=true,validationResult:c,className:l,descriptionPlacement:u="below",...m}){return jsxRuntime.jsxs(reactAriaComponents.TimeField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Fe(l,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(et,{size:o,tooltip:n,description:u==="tooltip"||u==="inline"?t:void 0,descriptionPlacement:u,isRequired:a,children:e}),jsxRuntime.jsx(Dt,{children:jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(An({isInvalid:s,isDisabled:i}),"px-3 py-2 flex items-center gap-0.5 w-full"),children:p=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:p,className:u3({isPlaceholder:p.isPlaceholder,isDisabled:!p.isEditable||i,size:o})})})}),d?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,children:r}):typeof r=="function"&&c?jsxRuntime.jsx(ye,{size:o,children:r(c)}):t&&u==="below"?jsxRuntime.jsx(Ee,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r}):typeof r=="function"&&c?jsxRuntime.jsx(ye,{size:o,className:"mt-1",children:r(c)}):t&&u==="below"?jsxRuntime.jsx(Ee,{size:o,className:"mt-1",children:t}):null})]})}function VS({children:e,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`.trim(),role:"list",children:e})}function OS({children:e,variant:t="default",icon:r,label:o,isLast:n=false,className:a=""}){let s={default:{dot:"bg-border-default border-border-default",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},active:{dot:"bg-text-primary border-text-primary",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary font-medium"},muted:{dot:"bg-border-muted border-border-muted",line:"bg-border-muted",label:"text-text-secondary",content:"text-text-secondary"},success:{dot:"bg-feedback-success-border border-feedback-success-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},error:{dot:"bg-feedback-error-border border-feedback-error-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},warning:{dot:"bg-feedback-warning-border border-feedback-warning-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},info:{dot:"bg-feedback-info-border border-feedback-info-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"}}[t];return jsxRuntime.jsxs("div",{className:`flex gap-3 ${a}`.trim(),role:"listitem",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center",style:{width:"20px"},children:[jsxRuntime.jsx("div",{className:`flex items-center justify-center rounded-full border-2 ${s.dot}`,style:{width:"20px",height:"20px",flexShrink:0},children:r&&jsxRuntime.jsx(W,{name:r,size:12,className:"text-background-body"})}),!n&&jsxRuntime.jsx("div",{className:`w-0.5 flex-1 ${s.line}`,style:{minHeight:"24px"}})]}),jsxRuntime.jsxs("div",{className:"flex-1 pb-6",children:[o&&jsxRuntime.jsx("div",{className:`text-xs mb-1 ${s.label}`,children:o}),jsxRuntime.jsx("div",{className:`text-sm ${s.content}`,children:e})]})]})}function h3(e){return "primary"}var b3="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",zS={primary:{selected:"bg-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-action-primary border-2 border-border-muted hover:bg-text-primary/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"}},x3="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",y3="opacity-100 cursor-pointer",v3={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},C3={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function S3(e){let{variant:t="primary",size:r="md",isDisabled:o,isSelected:n,borderRadius:a,borderRight:i,borderLeft:s}=e,d=h3(),c=`${b3} ${n?zS[d].selected:zS[d].unselected}`;return c+=` ${_e[r].text} ${_e[r].height} ${_e[r].padding} ${_e[r].gap}`,c+=` ${o?x3:y3}`,a==="left"&&(c+=" rounded-l-sm"),a==="right"&&(c+=" rounded-r-sm"),i&&(c+=" border-r"),s&&(c+=" border-l"),c+=` ${pt()}`,(c+=" focus-visible:outline-action-primary"),tailwindMerge.twMerge(c)}function GS(e){let{className:t,children:r,onPress:o,icon:n,iconPosition:a="left",iconWeight:i,isLoading:s=false,loadingText:d,loadingIndicator:c,size:l="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",...g}=e,f=n?jsxRuntime.jsx(W,{name:n,size:l,weight:i}):null,h=()=>{let v=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a==="left"&&f,r,a==="right"&&f]});return s?jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:c||jsxRuntime.jsx(W,{name:"CircleNotch",size:l,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:v}),d&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:d})]}):v},b=jsxRuntime.jsx(reactAriaComponents.ToggleButton,{onPress:o,...g,className:tailwindMerge.twMerge(S3(e),t),"aria-busy":s,children:h()});return u&&u>0?jsxRuntime.jsxs("div",{className:"relative",children:[b,jsxRuntime.jsx("span",{className:`absolute ${v3[p]} flex h-5 w-5 items-center justify-center rounded-full ${C3[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):b}function T3({formId:e="dialog-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,title:d,...c}){return jsxRuntime.jsx(Lr,{title:d,primaryAction:{label:r,onPress:()=>{let u=document.getElementById(e);u&&u.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...c,children:jsxRuntime.jsx(Ii,{id:e,onSubmit:t,children:s})})}function N3({formId:e="drawer-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,...d}){return jsxRuntime.jsx(Ys,{primaryAction:{label:r,onPress:()=>{let l=document.getElementById(e);l&&l.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...d,children:jsxRuntime.jsx(Ii,{id:e,onSubmit:t,className:"mt-2",children:s})})}function P3({align:e="end",className:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("flex gap-2",e==="start"?"justify-start":e==="between"?"justify-between":"justify-end",t)})}var E3={sm:"gap-2",md:"gap-4",lg:"gap-6"};function L3(e){if(!e)return "";let t=e.base?`grid-cols-${e.base}`:"",r=e.md?`md:grid-cols-${e.md}`:"",o=e.lg?`lg:grid-cols-${e.lg}`:"";return [t,r,o].filter(Boolean).join(" ")}function D3({cols:e={base:1},gap:t="lg",className:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("grid",L3(e),E3[t],r)})}function F3({title:e,description:t,showDivider:r,className:o,children:n,...a}){return jsxRuntime.jsxs("section",{...a,className:tailwindMerge.twMerge("flex flex-col",o),children:[(e||t)&&jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[typeof e=="string"?jsxRuntime.jsx(vr,{tag:"h3",size:"sm",children:e}):e,t?jsxRuntime.jsx(Ee,{size:"lg",children:t}):null]}),jsxRuntime.jsx("div",{className:"flex flex-col gap-6",children:n}),r&&jsxRuntime.jsx("hr",{className:"mt-2 border-border-muted"})]})}function B3(){return jsxRuntime.jsx("hr",{className:"border-border-muted"})}function V3({steps:e,currentStepId:t,onStepClick:r,className:o}){let n=e.findIndex(a=>a.id===t);return jsxRuntime.jsx("nav",{"aria-label":"Progress",className:tailwindMerge.twMerge("w-full",o),children:jsxRuntime.jsx("div",{className:"relative mb-12",children:jsxRuntime.jsx("ol",{className:"relative flex items-start justify-between",children:e.map((a,i)=>{let s=a.id===t,d=i<n,c=r&&(d||s);return jsxRuntime.jsxs("li",{className:"relative flex flex-col items-center",style:{flex:`1 1 ${100/e.length}%`},children:[jsxRuntime.jsx("button",{type:"button",disabled:!c,onClick:()=>c&&r?.(a.id),className:tailwindMerge.twMerge("relative z-10 flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors bg-background-body",d&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",s&&"border-action-primary bg-background-body text-action-primary",!d&&!s&&"border-border-default bg-background-body text-text-secondary",c&&"cursor-pointer",!c&&"cursor-default"),"aria-current":s?"step":void 0,children:d?jsxRuntime.jsx(W,{name:"Check",size:20,weight:"bold"}):jsxRuntime.jsx("span",{className:"text-sm font-semibold",children:i+1})}),i<e.length-1&&jsxRuntime.jsx("div",{className:"absolute top-5 h-0.5 transition-colors",style:{left:"50%",width:"100%",marginLeft:"20px",backgroundColor:i<n?"var(--color-action-primary)":"var(--color-border-default)"}}),jsxRuntime.jsxs("div",{className:"mt-3 flex flex-col items-center text-center w-32",children:[jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("text-sm font-medium",s&&"text-text-default",d&&"text-text-primary",!s&&!d&&"text-text-secondary"),children:a.title}),a.description&&jsxRuntime.jsx("span",{className:"mt-1 text-xs text-text-secondary",children:a.description})]})]},a.id)})})})})}function z3({formId:e,show:t,isSubmitting:r,onCancel:o,primaryLabel:n="Save changes",secondaryLabel:a="Cancel",className:i}){return t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("fixed inset-x-0 bottom-0 z-40 border-t border-border-muted bg-background-surface/95 backdrop-blur supports-[backdrop-filter]:bg-background-surface/70",i),children:jsxRuntime.jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsxRuntime.jsx("div",{className:"text-sm text-text-secondary",children:"You have unsaved changes"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(te,{variant:"secondary",onPress:o,children:a}),jsxRuntime.jsx(te,{type:"submit",form:e,isDisabled:!!r,children:r?"Saving...":n})]})]})}):null}function H3({when:e,message:t="You have unsaved changes. Leave anyway?"}){return ot__namespace.useEffect(()=>{if(!e)return;let r=o=>(o.preventDefault(),o.returnValue=t,t);return window.addEventListener("beforeunload",r),()=>window.removeEventListener("beforeunload",r)},[e,t]),null}function G3({steps:e,initialStepId:t,canNavigate:r}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[o,n]=ot__namespace.useState(t||e[0].id),a=e.findIndex(u=>u.id===o),i=a>0,s=a<e.length-1,d=async u=>u===o?true:r&&!await r(o,u)?false:(n(u),true);return {steps:e,currentStepId:o,setCurrentStepId:d,next:async()=>!s||a===-1?false:d(e[a+1].id),prev:async()=>!i||a===-1?false:d(e[a-1].id),hasNext:s,hasPrev:i,stepIndex:a}}function vl(e,t){return t.split(".").reduce((r,o)=>r?.[o],e)}function qS(e){return e==null?true:Array.isArray(e)?e.length===0:typeof e=="string"?e.trim()==="":false}function U3(e,t){let r=vl(e,t.field),o=t.value;switch(t.operator){case "eq":return r===o;case "neq":return r!==o;case "in":return Array.isArray(o)?Array.isArray(r)?r.some(n=>o.includes(n)):o.includes(r):false;case "nin":return Array.isArray(o)?Array.isArray(r)?!r.some(n=>o.includes(n)):!o.includes(r):false;case "gt":return r instanceof Date&&typeof o=="string"?r>new Date(o):r>o;case "gte":return r instanceof Date&&typeof o=="string"?r>=new Date(o):r>=o;case "lt":return r instanceof Date&&typeof o=="string"?r<new Date(o):r<o;case "lte":return r instanceof Date&&typeof o=="string"?r<=new Date(o):r<=o;case "contains":return typeof r!="string"?false:r.toLowerCase().includes(String(o).toLowerCase());case "startsWith":return typeof r!="string"?false:r.toLowerCase().startsWith(String(o).toLowerCase());case "endsWith":return typeof r!="string"?false:r.toLowerCase().endsWith(String(o).toLowerCase());case "isEmpty":return qS(r);case "isNotEmpty":return !qS(r);default:return false}}function ZS(e,t){if(t.conditions.length===0)return true;let r=t.conditions.map(o=>"conditions"in o?ZS(e,o):U3(e,o));return t.logic==="AND"?r.every(Boolean):r.some(Boolean)}function K3(e,t){return !t||t.conditions.length===0?e:e.filter(r=>ZS(r,t))}function Y3(e,t,r){if(e==null&&t==null)return 0;if(e==null)return r==="asc"?1:-1;if(t==null)return r==="asc"?-1:1;if(e instanceof Date&&t instanceof Date){let o=e.getTime()-t.getTime();return r==="asc"?o:-o}if(typeof e=="string"&&typeof t=="string"){let o=e.toLowerCase().localeCompare(t.toLowerCase());return r==="asc"?o:-o}return e<t?r==="asc"?-1:1:e>t?r==="asc"?1:-1:0}function X3(e,t){return t?[...e].sort((r,o)=>{let n=vl(r,t.field),a=vl(o,t.field);return Y3(n,a,t.direction)}):e}function J3(e,t){if(!t||!t.query.trim())return e;let{query:r,fields:o,fuzzy:n=true,threshold:a=.3}=t;if(n)return new cT__default.default(e,{keys:o,threshold:a,ignoreLocation:true,includeScore:true}).search(r).map(c=>c.item);let i=r.toLowerCase();return e.filter(s=>o.some(d=>{let c=vl(s,d);return c==null?false:String(c).toLowerCase().includes(i)}))}function j3(e,t){let r={};for(let o of t){if(r[o.field]={},o.values)for(let n of o.values)r[o.field][String(n.value)]=0;for(let n of e){let a=vl(n,o.field);if(a!=null)if(Array.isArray(a))for(let i of a){let s=String(i);r[o.field][s]=(r[o.field][s]||0)+1;}else {let i=String(a);r[o.field][i]=(r[o.field][i]||0)+1;}}}return r}function cg({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){let a=J3(e,o||null);a=K3(a,t||null);let i=j3(a,n);return a=X3(a,r||null),{data:a,facetCounts:i,resultCount:a.length}}function Nu({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){return ot.useMemo(()=>cg({data:e,filters:t,sort:r,search:o,facetConfigs:n}),[e,t,r,o,n])}function ku({filters:e,sort:t,search:r,onStateChange:o,searchDebounce:n=300}){let a=Dn(r,n),i=ot.useRef(true);ot.useEffect(()=>{if(i.current){i.current=false;return}o({filters:e,sort:t,search:a});},[e,t,a,o]);}function QS(e){return e.mode==="client"?Nu({data:e.data,filters:e.filters,sort:e.sort,search:e.search,facetConfigs:e.facetConfigs}):(ku({filters:e.filters,sort:e.sort,search:e.search,onStateChange:e.onStateChange,searchDebounce:e.searchDebounce}),{data:e.data,facetCounts:e.facetCounts||{},resultCount:e.resultCount??e.data.length})}var _S=mg(fm());function $3(e,t,r=true){let o=e;if(r){let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return `${o}-${n}.${t}`}return `${o}.${t}`}function dg(e){return /^[=+\-@\t\r]/.test(e)?`'${e}`:e}function eF(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function $S(e,t){let r=eF(t,e);if(e.exportValue){let o=e.exportValue(r,t);return o==null?"":typeof o=="string"?dg(o):o}return r==null?"":r instanceof Date?r.toISOString():typeof r=="object"?dg(JSON.stringify(r)):typeof r=="string"?dg(r):r}function ug(e){return e.filter(t=>t.exportable!==false)}function ew(e){let t=e.map(n=>n.exportLabel||n.label),r=new Set,o=[];for(let n of t)r.has(n)?o.includes(n)||o.push(n):r.add(n);if(o.length>0)throw new Error(`Duplicate export headers found: ${o.join(", ")}. Use exportLabel to provide unique headers.`)}async function pg(e){let{columns:t,data:r,metadata:o={}}=e;try{let n=ug(t);if(n.length===0)throw new Error("No exportable columns found");ew(n);let a=r.map(c=>{let l={};for(let u of n){let m=u.exportLabel||u.label;l[m]=$S(u,c);}return l}),i=GR__default.default.unparse(a,{header:!0,skipEmptyLines:!0}),s=new Blob([i],{type:"text/csv;charset=utf-8;"}),d=$3(o.filename||"table-data","csv",o.timestamp!==!1);(0,_S.saveAs)(s,d);}catch(n){throw new Error(`CSV export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function tF(e){let{columns:t,data:r}=e,o=ug(t);return ew(o),r.map(n=>{let a={};for(let i of o){let s=i.exportLabel||i.label;a[s]=$S(i,n);}return a})}function rF(e){return ug(e).map(t=>t.exportLabel||t.label)}function tw({columns:e,data:t,metadata:r}){let n=e.filter(d=>d.exportable!==false).length>0&&t.length>0,[a,i]=ot.useState(false);return {exportCSV:ot.useCallback(async()=>{i(true);try{await pg({columns:e,data:t,metadata:r});}catch(d){throw console.error("Table export failed:",d),d}finally{i(false);}},[e,t,r]),canExport:n,isExporting:a}}function Bpe(e){switch(e){case "charging":case "on":return "success";case "discharging":return "warning";case "heat":case "cool":return "info";case "off":case "idle":case "eco":case "auto":return "neutral";default:return "neutral"}}function rw(e=240){if(!(!Number.isFinite(e)||e<=0))return [1.05,.95].map(t=>{let r=Math.round(e*t);return {value:r,label:`${r} V`}})}function aF(e,t=240){let r=rw(t);if(!r)return;let o=Math.min(r[1].value-4,t-12),n=Math.max(r[0].value+4,t+12);for(let a of e)for(let i of [a.yValue,a.chartYValue,a.baselineValue])typeof i!="number"||!Number.isFinite(i)||(o=Math.min(o,i-4),n=Math.max(n,i+4));return [o,n]}Object.defineProperty(exports,"DialogTrigger",{enumerable:true,get:function(){return reactAriaComponents.DialogTrigger}});Object.defineProperty(exports,"Focusable",{enumerable:true,get:function(){return reactAriaComponents.Focusable}});exports.ABSENT_GRID_FIELDS=Jw;exports.ActionCell=fv;exports.ActionMenu=pi;exports.ActivityFeed=Pp;exports.ActivityFeedGroup=Jl;exports.ActivityItem=jl;exports.Alert=Zh;exports.AppShell=ab;exports.AreaSeries=Wn;exports.AssetImageProvider=dP;exports.AutoMobileRenderer=vd;exports.Autocomplete=oc;exports.Avatar=sn;exports.BREAKPOINTS=oa;exports.Badge=kt;exports.BadgeCell=hv;exports.Banner=ac;exports.BarSeries=bc;exports.BooleanCell=bv;exports.BrandProvider=Dg;exports.BreadcrumbItem=sc;exports.Breadcrumbs=ic;exports.Button=te;exports.CATEGORICAL_RAMP=Zd;exports.CATEGORY_COLOR_TOKENS=xv;exports.CATEGORY_NEUTRAL_COLOR=nd;exports.CHART_HEADER_HEIGHT=gp;exports.COLOR_RAMPS=rl;exports.CUSTOM_ICON_REGISTRY=Io;exports.Calendar=xi;exports.Card=at;exports.CardContent=yp;exports.CardFooter=vp;exports.CardHeader=Gl;exports.CardMedia=xp;exports.CardMobileRenderer=Cd;exports.CarouselAutoplayTrigger=Vb;exports.CarouselControl=Ab;exports.CarouselIndicator=qp;exports.CarouselIndicatorGroup=Bb;exports.CarouselItem=Db;exports.CarouselItemGroup=Lb;exports.CarouselNextTrigger=Fb;exports.CarouselPrevTrigger=Ib;exports.CarouselProgressText=Ob;exports.CarouselRoot=Eb;exports.CategoryBarChart=Cx;exports.CategoryCell=vv;exports.ChartAxis=po;exports.ChartBottomBar=Ti;exports.ChartContainer=Xm;exports.ChartContext=uo;exports.ChartEventMarkers=kc;exports.ChartEventSpans=Pc;exports.ChartExpandOwnedByAncestor=ym;exports.ChartHeader=di;exports.ChartHint=Vc;exports.ChartLabelledBy=Mn;exports.ChartOwnsItsTitle=Dh;exports.ChartSourceProvider=Ey;exports.ChartTooltip=Wo;exports.Checkbox=wo;exports.CheckboxGroup=Zp;exports.Chip=co;exports.ChipInputField=Yb;exports.ClearButton=fs;exports.CodeEditor=jb;exports.Collapse=yi;exports.CollapseContent=Hn;exports.CollapseHeader=zn;exports.CollapseItem=On;exports.ColorField=G1;exports.ColorModeProvider=Gg;exports.CommandPalette=gC;exports.Confirm=ex;exports.ConnectionStatusBadge=tx;exports.ContactCard=rx;exports.ContactMetaCell=Sv;exports.ContactMetaDisplay=pc;exports.ContainerQueryProvider=ax;exports.CopyToClipboard=In;exports.CustomCell=wv;exports.DEFAULT_CHART_HEIGHT=Uy;exports.DEFAULT_MAP_TYPE=ru;exports.DEFAULT_PAGE_SIZE=Sd;exports.DIVERGING_RAMPS=qd;exports.DataControls=tv;exports.DataTable=oC;exports.DateCell=Tv;exports.DateField=sv;exports.DateRangePicker=_c;exports.DeltaCell=Nv;exports.Description=Ee;exports.DeviceHealthBadge=aC;exports.DeviceMetaCell=Pv;exports.DeviceMetaDisplay=sd;exports.DeviceStateBadge=Aa;exports.DeviceStateCell=Ev;exports.DeviceStateWithMetric=dd;exports.DeviceTypeIcon=sC;exports.Dialog=Lr;exports.DialogForm=T3;exports.DialogHeader=Cr;exports.Drawer=Ys;exports.DrawerForm=N3;exports.ENTITY_CATEGORY_CONFIG=Xw;exports.ENTITY_CONFIG=ao;exports.EmptyState=ki;exports.EnrollmentStatusBadge=cC;exports.ErrorBoundary=So;exports.FieldError=ye;exports.FieldGroup=db;exports.FileUpload=uC;exports.FilterChips=rv;exports.FilterDialog=uv;exports.FirmwareVersionBadge=mC;exports.Form=Ii;exports.FormActions=P3;exports.FormDivider=B3;exports.FormGrid=D3;exports.FormSection=F3;exports.FormStepper=V3;exports.FormatRegistry=de;exports.FormattedCell=Dv;exports.FunnelSeries=Jy;exports.GRID_ELEMENT_TYPE_BY_ENTITY=$w;exports.GRID_STATE_COLORS=Yw;exports.GRID_STAT_LIST=gt;exports.GRID_STAT_LIST_CAPACITOR_PER_PHASE_KVAR=Zw;exports.GRID_STAT_LIST_CAPACITOR_TOTAL_KVAR=qw;exports.GlobalSearch=xC;exports.Grid=yf;exports.GridStateBadge=cd;exports.HEADLINE_METRIC_BOUNDS=rT;exports.Heading=vr;exports.HierarchyExplorer=JC;exports.HorizontalBarCell=sf;exports.HoverCard=oI;exports.Icon=W;exports.IndexCell=Fv;exports.InfiniteScrollIndicator=so;exports.Input=ec;exports.InputWrapper=Dt;exports.InteractiveMap=sl;exports.Kpi=$C;exports.KpiGroup=kf;exports.Label=et;exports.LineSeries=Ta;exports.List=a0;exports.ListBox=wI;exports.ListBoxItem=Ar;exports.ListItem=s0;exports.ListPane=l0;exports.Loader=io;exports.Logo=fi;exports.MAP_TYPES=J0;exports.MAX_PAGE_SIZE=mf;exports.MapStyleProvider=X0;exports.Meter=_0;exports.MiniBarCell=lf;exports.ModalBackdrop=Kr;exports.MultiSelect=eS;exports.Notice=pu;exports.NoticeContainer=mu;exports.NoticeProvider=rS;exports.NumberCell=Ov;exports.NumberField=Hs;exports.PageBanner=Sb;exports.PageLayout=qa;exports.PaginationFooter=Td;exports.PercentBarCell=uf;exports.PieChart=Qy;exports.PlaceSearch=cS;exports.Popover=Et;exports.ProgressBar=uS;exports.Prose=pS;exports.Radio=bS;exports.RadioCard=mS;exports.RadioCardGroup=fS;exports.RadioGroup=hS;exports.RangeCalendar=Ri;exports.RangeCell=Gv;exports.ResultsCount=Bs;exports.RichTextEditor=vS;exports.SECTION_NAVIGATE_EVENT=Yi;exports.SEQUENTIAL_RAMPS=jd;exports.SKELETON_SIZES=Jn;exports.SOURCE_UNIT_TO_WH=Qu;exports.SaveBar=z3;exports.SearchControl=Ma;exports.SearchEmptyState=yC;exports.SearchLoadingState=CC;exports.SearchResultGroup=wC;exports.SearchResultItem=TC;exports.SearchResultsList=NC;exports.SearchTrigger=PC;exports.Section=Xi;exports.SectionNav=hu;exports.SegmentedControl=Fc;exports.Select=an;exports.SelectCell=gd;exports.SideNav=Zl;exports.SiteCard=CS;exports.SiteContactCard=wS;exports.SiteMetaCell=Uv;exports.SiteMetaDisplay=hd;exports.Skeleton=q;exports.Slider=TS;exports.SortControl=Vs;exports.SparklineCell=pf;exports.SplitPane=wu;exports.StackNav=gi;exports.StatList=Id;exports.StaticMap=Ki;exports.StreamingChart=Xc;exports.Switch=$c;exports.Tab=Cu;exports.TabList=vu;exports.TabPanel=iS;exports.Tabs=yu;exports.TextArea=ES;exports.TextAreaWithChips=IS;exports.TextCell=Jv;exports.TextField=go;exports.TextLink=St;exports.TiledTimeSeriesChart=Ls;exports.TiledTimeSeriesExplorer=Yc;exports.TimeControls=Bc;exports.TimeField=BS;exports.Timeline=VS;exports.TimelineItem=OS;exports.ToggleButton=GS;exports.Tooltip=tr;exports.TopNav=ms;exports.Tray=Lt;exports.UNARY_FILTER_OPERATORS=ov;exports.UNARY_OPERATOR_LABELS=av;exports.UNVERIFIED_VOLTAGE_UNIT_ROWS=jw;exports.UnsavedChangesPrompt=H3;exports.activeDeviceStates=wL;exports.addFilterCondition=Xn;exports.applyDataOperations=cg;exports.archetypeFor=oT;exports.assembleSeries=Ox;exports.autoScaleCurrent=eN;exports.autoScaleDistance=Zg;exports.autoScaleEnergy=eh;exports.autoScalePower=lN;exports.autoScaleResistance=cN;exports.autoScaleVoltage=hN;exports.baselineFromPoint=SR;exports.camelCaseToWords=hh;exports.capitalize=fh;exports.celsiusToFahrenheit=dN;exports.celsiusToKelvin=sV;exports.centimetersToInches=WB;exports.classicPresetRanges=Kx;exports.clearColorCache=Pl;exports.createCategoryColorMap=FT;exports.createEmptyFilter=Os;exports.createFilter=IE;exports.createFilters=FE;exports.createFormat=IV;exports.createTextureIcon=Xe;exports.createTiledCameraSyncGroup=Oc;exports.createXScale=cm;exports.createYScale=Cs;exports.csvUnitFor=cp;exports.csvValueFor=yh;exports.defaultMargin=je;exports.defaultMultiSelectMatcher=Zf;exports.deltaDirectionFromValue=rf;exports.deviceStateLabels=TL;exports.deviceStateMetricFormats=uQ;exports.emptyStore=Sm;exports.entityHasDetailPage=nT;exports.entityHasStatList=iT;exports.entityShowsNow=aT;exports.enumToSentenceCase=fN;exports.exportChart=hm;exports.exportTableAsCSV=pg;exports.fahrenheitToCelsius=uN;exports.fahrenheitToKelvin=lV;exports.feetToMeters=AB;exports.feetToMiles=BB;exports.filterMultiSelectOptions=au;exports.filterToChips=BE;exports.formatBoolean=Wg;exports.formatCapacity=uB;exports.formatComponentValue=Fo;exports.formatCurrency=Jg;exports.formatCurrent=Wu;exports.formatDate=jg;exports.formatDistance=Qg;exports.formatEmptyValue=rd;exports.formatEnergy=_u;exports.formatFieldValue=Xr;exports.formatInternationalPhone=$u;exports.formatNumber=Xg;exports.formatPercent=Kg;exports.formatPhone=th;exports.formatPhoneNumber=ai;exports.formatPower=op;exports.formatPowerRating=pB;exports.formatResistance=ap;exports.formatTemperature=ch;exports.formatText=xh;exports.formatUSPhone=Dl;exports.formatVoltage=lp;exports.getBadgeClasses=pv;exports.getBooleanBadgeVariant=mv;exports.getCellAlignmentClasses=ef;exports.getCellContainerClasses=ke;exports.getCellTextClasses=Hr;exports.getColorRamp=Gf;exports.getColorRampsByKind=Wf;exports.getContrastingTextColor=BT;exports.getDateParts=PB;exports.getDefaultChartColor=es;exports.getDefaultColors=Rl;exports.getDeviceStateDisplayLabel=nf;exports.getDeviceStateLabel=nf;exports.getEntityCategory=tT;exports.getEntityConfig=Tl;exports.getEntityIcon=_i;exports.getEntityLabel=eT;exports.getEntityStatList=Cg;exports.getEventColor=dn;exports.getExportFormatName=XR;exports.getExportHeaders=rF;exports.getFieldGroupStyles=zk;exports.getFilterFields=La;exports.getGridStateLabel=Mv;exports.getInputBackgroundStyles=cb;exports.getInputBaseStyles=rr;exports.getInputStateStyles=An;exports.getLinkClasses=tf;exports.getNumericAxisGutter=dx;exports.getNumericColorClasses=od;exports.getResolvedColor=_t;exports.getSkeletonSize=Ft;exports.getStateTone=Bpe;exports.getThemeCategoricalColors=on;exports.getYFormatSettings=Or;exports.gridEntityTypeKeys=vg;exports.gridStateLabels=kL;exports.hasTileData=Ca;exports.iconCatalog=Au;exports.inchesToCentimeters=GB;exports.isActiveDeviceState=of;exports.isActiveState=of;exports.isCustomPinsLayer=Of;exports.isExportSupported=YR;exports.isFilterEmpty=Qc;exports.isGeoJsonLayer=Vf;exports.isGridEntityTypeKey=_w;exports.isIconName=Ng;exports.isLightColor=Ig;exports.isNil=xe;exports.isRasterLayer=zf;exports.isStreamingSource=Mc;exports.isUnaryFilterOperator=nv;exports.isVectorLayer=Bf;exports.kelvinToCelsius=pN;exports.kelvinToFahrenheit=cV;exports.kilometersToMiles=FB;exports.layer=Ff;exports.mapValuesToCategoricalColors=ts;exports.metersToFeet=DB;exports.metersToMiles=VB;exports.metersToYards=HB;exports.milesToFeet=qg;exports.milesToKilometers=IB;exports.milesToMeters=OB;exports.multiSelectSearchKeys=Qf;exports.multiSelectSelectionEntries=su;exports.parseBoolean=Nn;exports.parseInstant=Ec;exports.percentThresholdLevel=df;exports.pickEnergyUnit=Zu;exports.prepareTableDataForExport=tF;exports.registerPhosphorIcon=Z0;exports.removeFilterCondition=Ea;exports.resolvePagination=wd;exports.resolveValue=ge;exports.searchIconCatalog=Pg;exports.shouldOfferLiteralOption=iu;exports.snakeCaseToWords=bh;exports.telemetryPresetRanges=Ac;exports.temperatureStringToSymbol=nh;exports.tierForViewport=Lc;exports.tileIndexAt=w2;exports.tileKey=br;exports.tileReducer=zx;exports.tilesForViewport=pn;exports.toA=SB;exports.toActiveInactive=YT;exports.toAmps=El;exports.toBoolean=Tn;exports.toCelsius=ih;exports.toCentimeters=aN;exports.toCheckmark=JT;exports.toCompactNumber=QT;exports.toCurrency=Yg;exports.toCustomDateFormat=nN;exports.toDateString=tN;exports.toEnabledDisabled=UT;exports.toFahrenheit=ah;exports.toFeet=Yu;exports.toFloat=qT;exports.toFormattedNumber=ZT;exports.toFullDateTime=rN;exports.toGW=eV;exports.toGWh=$g;exports.toGigawatts=rp;exports.toISOString=oN;exports.toInches=sN;exports.toInteger=jT;exports.toKA=wB;exports.toKV=bV;exports.toKW=_B;exports.toKelvin=sh;exports.toKiloamps=Gu;exports.toKilohms=rh;exports.toKilometers=Ku;exports.toKilovolts=sp;exports.toKilowatts=ep;exports.toLowerCase=uh;exports.toMA=CB;exports.toMV=gV;exports.toMW=$B;exports.toMWh=_g;exports.toMegawatts=tp;exports.toMegohms=oh;exports.toMeters=Uu;exports.toMiles=Xu;exports.toMilliamps=Hu;exports.toMillimeters=iN;exports.toMilliohms=np;exports.toMillivolts=ip;exports.toNauticalMiles=LB;exports.toOhms=Il;exports.toOnOff=KT;exports.toPercentage=Ug;exports.toRelativeTime=Ll;exports.toScientificNotation=_T;exports.toSecret=gN;exports.toSentenceCase=ph;exports.toTemperature=lh;exports.toTitleCase=mh;exports.toTrueFalse=XT;exports.toUpperCase=dh;exports.toV=hV;exports.toVolts=Vl;exports.toW=QB;exports.toWatts=Al;exports.toWh=ju;exports.toYards=Ju;exports.tokWh=qu;exports.truncateEnd=Bl;exports.truncateMiddle=ii;exports.truncateStart=Fl;exports.typeRole=zt;exports.typographyRole=Bo;exports.ucFirst=gh;exports.useAssetImage=hs;exports.useBreakpoint=Rr;exports.useChartContext=ba;exports.useChartExpand=va;exports.useChartHeaderMetrics=ci;exports.useChartHeaderWidth=Lh;exports.useChartOwnsItsTitle=zl;exports.useChartSourceHost=As;exports.useChartSourceResolver=Ds;exports.useClientDataControls=Nu;exports.useColorMode=hr;exports.useComponentFormatter=hB;exports.useContainerBreakpoint=ox;exports.useDataControls=QS;exports.useDebounce=Dn;exports.useElementSize=bi;exports.useInfiniteScroll=En;exports.useInputFocus=Dr;exports.useLocalStorage=Kd;exports.useMapStyleOverride=Gi;exports.useMediaQuery=Pr;exports.useNotice=nS;exports.useServerDataControls=ku;exports.useTableExport=tw;exports.useTileWindow=Dc;exports.useTiledTimeSeries=Tm;exports.useWizard=G3;exports.voltageReferenceLines=rw;exports.voltageYDomain=aF;exports.wrapWithLink=Jo;exports.yardsToMeters=zB;//# sourceMappingURL=index.cjs.map
|
|
188
188
|
//# sourceMappingURL=index.cjs.map
|