@stacksjs/components 0.2.991 → 0.2.997

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/ApiOperation-369y1zgt.stx +114 -0
  2. package/dist/ApiReference-ww45jj32.stx +92 -0
  3. package/dist/ApiSchema-dsx4tsv4.stx +47 -0
  4. package/dist/AreaChart-8fy34adp.stx +77 -0
  5. package/dist/BarChart-4xdrjhhn.stx +77 -0
  6. package/dist/{Combobox-9n04ec5w.stx → Combobox-fgbpxbty.stx} +174 -5
  7. package/dist/ComboboxOptions-sfkc98a9.stx +36 -0
  8. package/dist/{CommandPalette-cj6pe5ph.stx → CommandPalette-sf03s7b2.stx} +3 -1
  9. package/dist/LineChart-ctebkkm8.stx +77 -0
  10. package/dist/{Notification-ke5vw4k8.stx → Notification-1pvt347q.stx} +11 -3
  11. package/dist/{Popover-jjt7p7sn.stx → Popover-gntg33xd.stx} +1 -1
  12. package/dist/PricingPlan-h7jt2696.stx +67 -0
  13. package/dist/PricingTable-v3vdn6av.stx +149 -0
  14. package/dist/SecretField-q2xgth94.stx +219 -0
  15. package/dist/{Select-36s22z6d.stx → Select-yhmtvqcx.stx} +7 -4
  16. package/dist/Sparkline-gp859n4h.stx +29 -0
  17. package/dist/StatCard-gff0yx6b.stx +93 -0
  18. package/dist/StatGroup-e0d5dmt7.stx +17 -0
  19. package/dist/components/CodeBlock.d.ts +4 -1
  20. package/dist/components/CodeGroup.d.ts +34 -0
  21. package/dist/components/code-group.d.ts +19 -0
  22. package/dist/components/index.d.ts +2 -0
  23. package/dist/index.d.ts +13 -0
  24. package/dist/index.js +25 -22
  25. package/dist/ui/api-reference/ApiOperation.d.ts +17 -0
  26. package/dist/ui/api-reference/ApiReference.d.ts +28 -0
  27. package/dist/ui/api-reference/ApiSchema.d.ts +17 -0
  28. package/dist/ui/api-reference/index.d.ts +30 -0
  29. package/dist/ui/api-reference/openapi.d.ts +137 -0
  30. package/dist/ui/chart/AreaChart.d.ts +33 -0
  31. package/dist/ui/chart/BarChart.d.ts +33 -0
  32. package/dist/ui/chart/LineChart.d.ts +33 -0
  33. package/dist/ui/chart/Sparkline.d.ts +19 -0
  34. package/dist/ui/chart/core.d.ts +111 -0
  35. package/dist/ui/chart/index.d.ts +51 -0
  36. package/dist/ui/chart/interaction.d.ts +11 -0
  37. package/dist/ui/combobox/Combobox.d.ts +10 -1
  38. package/dist/ui/combobox/ComboboxOptions.d.ts +6 -0
  39. package/dist/ui/combobox/index.d.ts +7 -0
  40. package/dist/ui/command-palette/CommandPalette.d.ts +2 -0
  41. package/dist/ui/input/SecretField.d.ts +56 -0
  42. package/dist/ui/input/index.d.ts +21 -0
  43. package/dist/ui/notification/Notification.d.ts +2 -0
  44. package/dist/ui/pricing/PricingPlan.d.ts +21 -0
  45. package/dist/ui/pricing/PricingTable.d.ts +50 -0
  46. package/dist/ui/pricing/index.d.ts +38 -0
  47. package/dist/ui/pricing/pricing.d.ts +64 -0
  48. package/dist/ui/select/Select.d.ts +2 -0
  49. package/dist/ui/stat/StatCard.d.ts +42 -0
  50. package/dist/ui/stat/StatGroup.d.ts +12 -0
  51. package/dist/ui/stat/format.d.ts +37 -0
  52. package/dist/ui/stat/index.d.ts +23 -0
  53. package/package.json +3 -3
  54. package/src/components/CodeBlock.stx +4 -1
  55. package/src/components/CodeGroup.stx +217 -0
  56. package/src/components/code-group.ts +57 -0
  57. package/src/components/index.ts +2 -0
  58. package/src/index.ts +18 -0
  59. package/src/ui/api-reference/ApiOperation.stx +114 -0
  60. package/src/ui/api-reference/ApiReference.stx +92 -0
  61. package/src/ui/api-reference/ApiSchema.stx +47 -0
  62. package/src/ui/api-reference/README.md +44 -0
  63. package/src/ui/api-reference/index.ts +35 -0
  64. package/src/ui/api-reference/openapi.ts +825 -0
  65. package/src/ui/chart/AreaChart.stx +77 -0
  66. package/src/ui/chart/BarChart.stx +77 -0
  67. package/src/ui/chart/LineChart.stx +77 -0
  68. package/src/ui/chart/README.md +97 -0
  69. package/src/ui/chart/Sparkline.stx +29 -0
  70. package/src/ui/chart/core.ts +730 -0
  71. package/src/ui/chart/index.ts +71 -0
  72. package/src/ui/chart/interaction.ts +175 -0
  73. package/src/ui/combobox/Combobox.stx +174 -5
  74. package/src/ui/combobox/ComboboxOptions.stx +20 -0
  75. package/src/ui/combobox/README.md +41 -0
  76. package/src/ui/combobox/index.ts +13 -0
  77. package/src/ui/command-palette/CommandPalette.stx +3 -1
  78. package/src/ui/input/SecretField.stx +219 -0
  79. package/src/ui/input/index.ts +32 -0
  80. package/src/ui/notification/Notification.stx +11 -3
  81. package/src/ui/popover/Popover.stx +1 -1
  82. package/src/ui/pricing/PricingPlan.stx +67 -0
  83. package/src/ui/pricing/PricingTable.stx +149 -0
  84. package/src/ui/pricing/README.md +74 -0
  85. package/src/ui/pricing/index.ts +49 -0
  86. package/src/ui/pricing/pricing.ts +177 -0
  87. package/src/ui/select/Select.stx +7 -4
  88. package/src/ui/stat/README.md +60 -0
  89. package/src/ui/stat/StatCard.stx +93 -0
  90. package/src/ui/stat/StatGroup.stx +17 -0
  91. package/src/ui/stat/format.ts +147 -0
  92. package/src/ui/stat/index.ts +38 -0
  93. package/dist/ComboboxOptions-zhr9b6rx.stx +0 -16
package/dist/index.js CHANGED
@@ -1,23 +1,26 @@
1
1
  // @bun
2
- var Ya={__stx:!0,src:"./components/CodeBlock.stx"};var Xa={__stx:!0,src:"./components/Footer.stx"};var Za={__stx:!0,src:"./components/Hero.stx"};var Qa={__stx:!0,src:"./components/Installation.stx"};function Eu(e){let{code:t,onSuccess:s,onError:a,timeout:n=2000}=e,o=!1,i=null;return{copied:o,copy:async()=>{try{if(!navigator.clipboard)throw Error("Clipboard API not available");await navigator.clipboard.writeText(t),o=!0,s?.(),i=setTimeout(()=>{o=!1,i=null},n)}catch(l){let d=l instanceof Error?l:Error("Failed to copy code");a?.(d),console.error("Failed to copy code:",d)}},reset:()=>{if(o=!1,i)clearTimeout(i),i=null}}}async function Iu(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function en(){if(typeof window>"u")return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function yt(e){return e==="system"?en():e}function Pu(e={}){let{storageKey:t="theme",defaultTheme:s="system"}=e,a=s;if(typeof window<"u"&&typeof localStorage<"u"){let c=localStorage.getItem(t);if(c)a=c}let n=yt(a)==="dark",o=(c)=>{let l=yt(c);if(typeof document<"u")if(l==="dark")document.documentElement.classList.add("dark");else document.documentElement.classList.remove("dark");if(typeof localStorage<"u")localStorage.setItem(t,c)},i=(c)=>{a=c,o(c)},r=()=>{let l=yt(a)==="dark"?"light":"dark";i(l)};if(o(a),typeof window<"u"&&a==="system")window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(c)=>{if(a==="system")o("system")});return{isDark:n,theme:a,toggle:r,setTheme:i}}function tn(e,t){if(typeof document>"u")return;document.title=t?t.replace("%s",e):e}function W(e,t,s=!1){if(typeof document>"u")return;let a=s?"property":"name",n=document.querySelector(`meta[${a}="${e}"]`);if(!n)n=document.createElement("meta"),n.setAttribute(a,e),document.head.appendChild(n);n.setAttribute("content",t)}function sn(e,t){if(typeof document>"u")return;let s=document.querySelector(`link[rel="${e}"]`);if(!s)s=document.createElement("link"),s.setAttribute("rel",e),document.head.appendChild(s);s.setAttribute("href",t)}function Ru(e){let{title:t,description:s,author:a,keywords:n,ogImage:o,ogImageWidth:i,ogImageHeight:r,twitterCard:c="summary_large_image",twitterSite:l,twitterCreator:d,canonical:u}=e;if(t)tn(t),W("og:title",t,!0),W("twitter:title",t);if(s)W("description",s),W("og:description",s,!0),W("twitter:description",s);if(a)W("author",a);if(n&&n.length>0)W("keywords",n.join(", "));if(o)W("og:image",o,!0),W("twitter:image",o);if(i)W("og:image:width",i,!0);if(r)W("og:image:height",r,!0);if(W("twitter:card",c),l)W("twitter:site",l);if(d)W("twitter:creator",d);if(u)sn("canonical",u);if(W("og:type","website",!0),typeof window<"u")W("og:url",window.location.href,!0)}function Nu(e){let t=[],{title:s,description:a,author:n,keywords:o,ogImage:i,ogImageWidth:r,ogImageHeight:c,twitterCard:l="summary_large_image",twitterSite:d,twitterCreator:u,canonical:p}=e;if(s)t.push(`<title>${G(s)}</title>`),t.push(`<meta property="og:title" content="${G(s)}" />`),t.push(`<meta name="twitter:title" content="${G(s)}" />`);if(a)t.push(`<meta name="description" content="${G(a)}" />`),t.push(`<meta property="og:description" content="${G(a)}" />`),t.push(`<meta name="twitter:description" content="${G(a)}" />`);if(n)t.push(`<meta name="author" content="${G(n)}" />`);if(o&&o.length>0)t.push(`<meta name="keywords" content="${G(o.join(", "))}" />`);if(i)t.push(`<meta property="og:image" content="${G(i)}" />`),t.push(`<meta name="twitter:image" content="${G(i)}" />`);if(r)t.push(`<meta property="og:image:width" content="${G(r)}" />`);if(c)t.push(`<meta property="og:image:height" content="${G(c)}" />`);if(t.push(`<meta name="twitter:card" content="${G(l)}" />`),d)t.push(`<meta name="twitter:site" content="${G(d)}" />`);if(u)t.push(`<meta name="twitter:creator" content="${G(u)}" />`);if(p)t.push(`<link rel="canonical" href="${G(p)}" />`);return t.push('<meta property="og:type" content="website" />'),t.join(`
3
- `)}function G(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Du(e,t,s={}){let{enabled:a=!0,ignore:n=[]}=s,o=(i)=>{if(!a||!e)return;let r=i.target;if(!e.contains(r)){if(!n.some((l)=>{let d=document.querySelectorAll(l);return Array.from(d).some((u)=>u.contains(r))}))t(i)}};if(typeof document<"u")document.addEventListener("mousedown",o),document.addEventListener("touchstart",o);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}}function zu(e,t={}){let{enabled:s=!0,initialFocus:a=null,returnFocus:n=!0,fallbackFocus:o=null}=t,i=null,r=!1;function c(){if(!e)return[];let h=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(h))}function l(h){if(!s||!r||!e)return;let g=c();if(g.length===0){h.preventDefault();return}let m=g[0],w=g[g.length-1];if(h.shiftKey){if(document.activeElement===m||document.activeElement===e)h.preventDefault(),w.focus()}else if(document.activeElement===w)h.preventDefault(),m.focus()}function d(h){if(h.key==="Escape"&&s&&r)p()}function u(){if(!s||!e||r)return;if(i=document.activeElement,a)a.focus();else{let h=c();if(h.length>0)h[0].focus();else if(o)o.focus();else e.focus()}document.addEventListener("keydown",l),document.addEventListener("keydown",d),r=!0}function p(){if(!r)return;if(document.removeEventListener("keydown",l),document.removeEventListener("keydown",d),n&&i)i.focus();r=!1}return{activate:u,deactivate:p}}function Fu(e,t={}){let{enabled:s=!0,preventDefault:a=!0,stopPropagation:n=!1,target:o=typeof document<"u"?document:null}=t,i=Array.isArray(e)?e:[e],r=(c)=>{if(!s)return;i.forEach((l)=>{if(!(Array.isArray(l.key)?l.key:[l.key]).some((p)=>p.toLowerCase()===c.key.toLowerCase()))return;if(l.ctrl!==void 0&&l.ctrl!==c.ctrlKey)return;if(l.shift!==void 0&&l.shift!==c.shiftKey)return;if(l.alt!==void 0&&l.alt!==c.altKey)return;if(l.meta!==void 0&&l.meta!==c.metaKey)return;if(a)c.preventDefault();if(n)c.stopPropagation();l.handler(c)})};if(o)o.addEventListener("keydown",r);return()=>{if(o)o.removeEventListener("keydown",r)}}var Vu={ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function Bu(e,t,s={}){let{serializer:a=JSON.stringify,deserializer:n=JSON.parse,onError:o=console.error}=s,i=t;try{if(typeof window<"u"){let u=window.localStorage.getItem(e);if(u!==null)i=n(u)}}catch(u){o(u)}let r=i,c=new Set;function l(u){try{let p=typeof u==="function"?u(r):u;if(r=p,typeof window<"u")window.localStorage.setItem(e,a(p));c.forEach((h)=>h(p))}catch(p){o(p)}}function d(){try{if(r=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((u)=>u(t))}catch(u){o(u)}}if(typeof window<"u"){let u=(p)=>{if(p.key===e&&p.newValue!==null)try{let h=n(p.newValue);r=h,c.forEach((g)=>g(h))}catch(h){o(h)}else if(p.key===e&&p.newValue===null)r=t,c.forEach((h)=>h(t))};window.addEventListener("storage",u)}return{value:r,setValue:l,removeValue:d}}function Ce(e,t={}){let{defaultValue:s=!1}=t,a=s,n=null;if(typeof window<"u"&&"matchMedia"in window){n=window.matchMedia(e),a=n.matches;let i=(r)=>{a=r.matches};if(n.addEventListener)n.addEventListener("change",i);else n.addListener(i)}function o(){if(n)a=n.matches}return{matches:a,updateMatches:o}}var $e={xs:"(min-width: 320px)",sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)",mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",reducedMotion:"(prefers-reduced-motion: reduce)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Ku(e){return Ce($e[e])}function qu(){return Ce($e.mobile)}function Wu(){return Ce($e.desktop)}function Gu(){return Ce($e.dark)}function Uu(){return Ce($e.reducedMotion)}function He(){return globalThis.stx?.overlays}function Yu(e,t){He()?.open(e,t)}function Xu(e){He()?.close(e)}function Zu(e){return He()?.isTop(e)??!1}function Qu(){return He()?.list()??[]}var as=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],th="--stx-color";function an(e,t){return t===void 0?`var(${e})`:`var(${e}, ${t})`}function sh(e={}){let t={};for(let s of as){let a=e[s];if(!a||typeof a==="string")continue;let n={};for(let[o,i]of Object.entries(a))n[o]=an(`--stx-color-${s}-${o}`,i);t[s]=n}return t}function ah(e={}){let t=[];for(let s of as){let a=e[s];if(!a||typeof a==="string")continue;for(let n of Object.keys(a))t.push(`--stx-color-${s}-${n}`)}return t}var on="./Accordion-ehpymjam.stx";var ln="./AccordionItem-fc4ekdqf.stx";var dn="./AddressField-gcydmvkf.stx";var un="./CommandBar-k35nsefs.stx";var fn="./ContentCard-gjsm9qrr.stx";var gn="./FloatingPanel-qp8cq8hz.stx";var bn="./SidebarDivider-6whech7a.stx";var wn="./SidebarRow-301dd797.stx";var kn="./SpaceSwitcher-297p5gnb.stx";var Cn="./TileGrid-nne4x506.stx";var Tn="./AppearancePicker-34758z53.stx";var In="./Audio-ay34sh1f.stx";var Pn="./BiometricSignIn-6enqcn9e.stx";var Rn="./Login-4666t7j4.stx";var Ln="./Signup-pm2r0f2m.stx";var On="./SocialSignInButton-9x4qbd03.stx";var Hn="./TwoFactorChallenge-3tsbfdsd.stx";var Hh="session",Fn={faceId:"Face ID",touchId:"Touch ID",fingerprint:"Fingerprint"};function ns(e){return typeof e==="string"?Fn[e]||"":""}function Fh(e){let t=ns(e);return t?`Sign in with ${t}`:""}function Vn(){let t=globalThis.craft?.biometrics;if(!t)return null;return["isAvailable","getBiometricType","storeCredential","getCredential","hasCredential","deleteCredential"].every((a)=>typeof t[a]==="function")?t:null}var Fe=Object.freeze({available:!1,kind:null,label:"",saved:!1});function jn(e){let t=e?.code;return typeof t==="string"&&t?t:"UNKNOWN"}function Bn(e){return e instanceof Error?e.message:String(e??"")}function Vh(e="session",t){let s=String(e||"").trim()||"session",a=()=>t===void 0?Vn():t;async function n(){let c=a();if(!c)return Fe;try{if(!await c.isAvailable())return Fe;let l=await c.getBiometricType(),d=ns(l);if(!d)return Fe;return{available:!0,kind:l,label:d,saved:await c.hasCredential(s)===!0}}catch{return Fe}}async function o(c){let l=a();if(!l)return{status:"failed",code:"UNSUPPORTED",message:"Biometric sign-in is not available here."};try{let d=await l.getCredential(s,c||void 0);if(typeof d==="string"&&d)return{status:"signed-in",token:d};return await l.deleteCredential(s).catch(()=>{}),{status:"invalidated"}}catch(d){let u=jn(d);if(u==="AUTHENTICATION_CANCELLED")return{status:"cancelled"};return{status:"failed",code:u,message:Bn(d)}}}async function i(c){let l=a();if(!l||typeof c!=="string"||!c)return!1;try{if(!await l.isAvailable())return!1;return await l.storeCredential(s,c),!0}catch{return!1}}async function r(){let c=a();if(!c)return;await c.deleteCredential(s).catch(()=>{})}return{probe:n,signIn:o,enable:i,forget:r}}var Kn="./Avatar-6gexb2xv.stx";var Wn="./Badge-wnz3v82e.stx";var Un="./Breadcrumb-cgw1bb6s.stx";class X extends Error{component;context;constructor(e,t,s={}){let a=X.formatMessage(e,t,s);super(a);if(this.name="ComponentError",this.component=e,this.context={component:e,...s},Error.captureStackTrace)Error.captureStackTrace(this,X)}static formatMessage(e,t,s){let a=`[${e}] ${t}`;if(s.prop)a+=`
2
+ var Gn={__stx:!0,src:"./components/CodeBlock.stx"};var Un={__stx:!0,src:"./components/CodeGroup.stx"};var Jn=/<[a-z][\w-]*((?:\s+[^\s=>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+))?)*)\s*\/?>/gi,Yn=/<CodeBlock\b((?:\s+[^\s=>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+))?)*)\s*\/?>/g,Xn=/([^\s=>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,Zn=new Set(["false","0","no","off"]);function $s(e){let t={};for(let s of e.matchAll(Xn))t[s[1]]=s[2]??s[3]??s[4]??"";return t}function Qn(e){let t=typeof e==="string"?e:"",s=[...t.matchAll(Jn)].map((a)=>$s(a[1]||"")).filter((a)=>("data-stx-code-block"in a));if(s.length)return s.map((a,n)=>{let o=a["data-language"]||"typescript";return{index:n,language:o,label:a["data-label"]||o,isDefault:"data-default"in a}});return[...t.matchAll(Yn)].map((a,n)=>{let o=$s(a[1]||""),i=o.language||"typescript";return{index:n,language:i,label:o.label||i,isDefault:"default"in o&&!Zn.has(String(o.default).toLowerCase())}})}function eo(e){let t=e.findIndex((s)=>s.isDefault);return t>=0?t:0}var to={__stx:!0,src:"./components/Footer.stx"};var so={__stx:!0,src:"./components/Hero.stx"};var ao={__stx:!0,src:"./components/Installation.stx"};function Pf(e){let{code:t,onSuccess:s,onError:a,timeout:n=2000}=e,o=!1,i=null;return{copied:o,copy:async()=>{try{if(!navigator.clipboard)throw Error("Clipboard API not available");await navigator.clipboard.writeText(t),o=!0,s?.(),i=setTimeout(()=>{o=!1,i=null},n)}catch(l){let d=l instanceof Error?l:Error("Failed to copy code");a?.(d),console.error("Failed to copy code:",d)}},reset:()=>{if(o=!1,i)clearTimeout(i),i=null}}}async function Nf(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function no(){if(typeof window>"u")return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function zt(e){return e==="system"?no():e}function Rf(e={}){let{storageKey:t="theme",defaultTheme:s="system"}=e,a=s;if(typeof window<"u"&&typeof localStorage<"u"){let c=localStorage.getItem(t);if(c)a=c}let n=zt(a)==="dark",o=(c)=>{let l=zt(c);if(typeof document<"u")if(l==="dark")document.documentElement.classList.add("dark");else document.documentElement.classList.remove("dark");if(typeof localStorage<"u")localStorage.setItem(t,c)},i=(c)=>{a=c,o(c)},r=()=>{let l=zt(a)==="dark"?"light":"dark";i(l)};if(o(a),typeof window<"u"&&a==="system")window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(c)=>{if(a==="system")o("system")});return{isDark:n,theme:a,toggle:r,setTheme:i}}function oo(e,t){if(typeof document>"u")return;document.title=t?t.replace("%s",e):e}function X(e,t,s=!1){if(typeof document>"u")return;let a=s?"property":"name",n=document.querySelector(`meta[${a}="${e}"]`);if(!n)n=document.createElement("meta"),n.setAttribute(a,e),document.head.appendChild(n);n.setAttribute("content",t)}function io(e,t){if(typeof document>"u")return;let s=document.querySelector(`link[rel="${e}"]`);if(!s)s=document.createElement("link"),s.setAttribute("rel",e),document.head.appendChild(s);s.setAttribute("href",t)}function Of(e){let{title:t,description:s,author:a,keywords:n,ogImage:o,ogImageWidth:i,ogImageHeight:r,twitterCard:c="summary_large_image",twitterSite:l,twitterCreator:d,canonical:p}=e;if(t)oo(t),X("og:title",t,!0),X("twitter:title",t);if(s)X("description",s),X("og:description",s,!0),X("twitter:description",s);if(a)X("author",a);if(n&&n.length>0)X("keywords",n.join(", "));if(o)X("og:image",o,!0),X("twitter:image",o);if(i)X("og:image:width",i,!0);if(r)X("og:image:height",r,!0);if(X("twitter:card",c),l)X("twitter:site",l);if(d)X("twitter:creator",d);if(p)io("canonical",p);if(X("og:type","website",!0),typeof window<"u")X("og:url",window.location.href,!0)}function Df(e){let t=[],{title:s,description:a,author:n,keywords:o,ogImage:i,ogImageWidth:r,ogImageHeight:c,twitterCard:l="summary_large_image",twitterSite:d,twitterCreator:p,canonical:u}=e;if(s)t.push(`<title>${Z(s)}</title>`),t.push(`<meta property="og:title" content="${Z(s)}" />`),t.push(`<meta name="twitter:title" content="${Z(s)}" />`);if(a)t.push(`<meta name="description" content="${Z(a)}" />`),t.push(`<meta property="og:description" content="${Z(a)}" />`),t.push(`<meta name="twitter:description" content="${Z(a)}" />`);if(n)t.push(`<meta name="author" content="${Z(n)}" />`);if(o&&o.length>0)t.push(`<meta name="keywords" content="${Z(o.join(", "))}" />`);if(i)t.push(`<meta property="og:image" content="${Z(i)}" />`),t.push(`<meta name="twitter:image" content="${Z(i)}" />`);if(r)t.push(`<meta property="og:image:width" content="${Z(r)}" />`);if(c)t.push(`<meta property="og:image:height" content="${Z(c)}" />`);if(t.push(`<meta name="twitter:card" content="${Z(l)}" />`),d)t.push(`<meta name="twitter:site" content="${Z(d)}" />`);if(p)t.push(`<meta name="twitter:creator" content="${Z(p)}" />`);if(u)t.push(`<link rel="canonical" href="${Z(u)}" />`);return t.push('<meta property="og:type" content="website" />'),t.join(`
3
+ `)}function Z(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Hf(e,t,s={}){let{enabled:a=!0,ignore:n=[]}=s,o=(i)=>{if(!a||!e)return;let r=i.target;if(!e.contains(r)){if(!n.some((l)=>{let d=document.querySelectorAll(l);return Array.from(d).some((p)=>p.contains(r))}))t(i)}};if(typeof document<"u")document.addEventListener("mousedown",o),document.addEventListener("touchstart",o);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}}function Ff(e,t={}){let{enabled:s=!0,initialFocus:a=null,returnFocus:n=!0,fallbackFocus:o=null}=t,i=null,r=!1;function c(){if(!e)return[];let f=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(f))}function l(f){if(!s||!r||!e)return;let h=c();if(h.length===0){f.preventDefault();return}let m=h[0],b=h[h.length-1];if(f.shiftKey){if(document.activeElement===m||document.activeElement===e)f.preventDefault(),b.focus()}else if(document.activeElement===b)f.preventDefault(),m.focus()}function d(f){if(f.key==="Escape"&&s&&r)u()}function p(){if(!s||!e||r)return;if(i=document.activeElement,a)a.focus();else{let f=c();if(f.length>0)f[0].focus();else if(o)o.focus();else e.focus()}document.addEventListener("keydown",l),document.addEventListener("keydown",d),r=!0}function u(){if(!r)return;if(document.removeEventListener("keydown",l),document.removeEventListener("keydown",d),n&&i)i.focus();r=!1}return{activate:p,deactivate:u}}function Bf(e,t={}){let{enabled:s=!0,preventDefault:a=!0,stopPropagation:n=!1,target:o=typeof document<"u"?document:null}=t,i=Array.isArray(e)?e:[e],r=(c)=>{if(!s)return;i.forEach((l)=>{if(!(Array.isArray(l.key)?l.key:[l.key]).some((u)=>u.toLowerCase()===c.key.toLowerCase()))return;if(l.ctrl!==void 0&&l.ctrl!==c.ctrlKey)return;if(l.shift!==void 0&&l.shift!==c.shiftKey)return;if(l.alt!==void 0&&l.alt!==c.altKey)return;if(l.meta!==void 0&&l.meta!==c.metaKey)return;if(a)c.preventDefault();if(n)c.stopPropagation();l.handler(c)})};if(o)o.addEventListener("keydown",r);return()=>{if(o)o.removeEventListener("keydown",r)}}var _f={ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function Kf(e,t,s={}){let{serializer:a=JSON.stringify,deserializer:n=JSON.parse,onError:o=console.error}=s,i=t;try{if(typeof window<"u"){let p=window.localStorage.getItem(e);if(p!==null)i=n(p)}}catch(p){o(p)}let r=i,c=new Set;function l(p){try{let u=typeof p==="function"?p(r):p;if(r=u,typeof window<"u")window.localStorage.setItem(e,a(u));c.forEach((f)=>f(u))}catch(u){o(u)}}function d(){try{if(r=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((p)=>p(t))}catch(p){o(p)}}if(typeof window<"u"){let p=(u)=>{if(u.key===e&&u.newValue!==null)try{let f=n(u.newValue);r=f,c.forEach((h)=>h(f))}catch(f){o(f)}else if(u.key===e&&u.newValue===null)r=t,c.forEach((f)=>f(t))};window.addEventListener("storage",p)}return{value:r,setValue:l,removeValue:d}}function ze(e,t={}){let{defaultValue:s=!1}=t,a=s,n=null;if(typeof window<"u"&&"matchMedia"in window){n=window.matchMedia(e),a=n.matches;let i=(r)=>{a=r.matches};if(n.addEventListener)n.addEventListener("change",i);else n.addListener(i)}function o(){if(n)a=n.matches}return{matches:a,updateMatches:o}}var He={xs:"(min-width: 320px)",sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)",mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",reducedMotion:"(prefers-reduced-motion: reduce)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Gf(e){return ze(He[e])}function Uf(){return ze(He.mobile)}function Jf(){return ze(He.desktop)}function Yf(){return ze(He.dark)}function Xf(){return ze(He.reducedMotion)}function Ze(){return globalThis.stx?.overlays}function Qf(e,t){Ze()?.open(e,t)}function em(e){Ze()?.close(e)}function tm(e){return Ze()?.isTop(e)??!1}function sm(){return Ze()?.list()??[]}var Ts=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],nm="--stx-color";function ro(e,t){return t===void 0?`var(${e})`:`var(${e}, ${t})`}function om(e={}){let t={};for(let s of Ts){let a=e[s];if(!a||typeof a==="string")continue;let n={};for(let[o,i]of Object.entries(a))n[o]=ro(`--stx-color-${s}-${o}`,i);t[s]=n}return t}function im(e={}){let t=[];for(let s of Ts){let a=e[s];if(!a||typeof a==="string")continue;for(let n of Object.keys(a))t.push(`--stx-color-${s}-${n}`)}return t}var co="./Accordion-ehpymjam.stx";var uo="./AccordionItem-fc4ekdqf.stx";var fo="./ApiOperation-369y1zgt.stx";var go="./ApiReference-ww45jj32.stx";var bo="./ApiSchema-dsx4tsv4.stx";class W extends Error{path;stxBuildFailure=!0;constructor(e,t){super(`Invalid OpenAPI document at ${e||"(root)"}: ${t}`);this.name="OpenApiError",this.path=e}}var Ms=["get","put","post","delete","options","head","patch","trace"];function et(e,t="document"){let s=e.trim();if(s.startsWith("{"))try{return JSON.parse(s)}catch(n){throw new W("",`${t} is not valid JSON (${n.message})`)}let a=globalThis.Bun?.YAML;if(!a)throw new W("",`${t} looks like YAML, which needs Bun's YAML parser; give the document as JSON`);try{return a.parse(s)}catch(n){throw new W("",`${t} is not valid YAML (${n.message})`)}}async function Rs(e){if(/^https?:\/\//i.test(e)){let s=await fetch(e);if(!s.ok)throw new W("",`could not fetch ${e} (${s.status})`);return s.text()}let t=globalThis.Bun?.file(e);if(!t||!await t.exists())throw new W("",`no OpenAPI document at ${e}`);return t.text()}function vo(e,t){if(/^https?:\/\//i.test(t)||t.startsWith("/"))return t;if(/^https?:\/\//i.test(e))return new URL(t,e).href;return(e.includes("/")?e.slice(0,e.lastIndexOf("/")+1):"")+t}function wo(e,t,s){let a=e;for(let n of t.replace(/^#?\/?/,"").split("/").filter(Boolean).map((o)=>o.replace(/~1/g,"/").replace(/~0/g,"~")))if(a=a?.[n],a===void 0)throw new W(s,`#/${t.replace(/^#?\/?/,"")} does not exist`);return a}async function yo(e,t){let s=new Map,a=(o)=>{if(!s.has(o))s.set(o,Rs(o).then((i)=>et(i,o)));return s.get(o)};async function n(o,i,r,c){if(Array.isArray(o))return Promise.all(o.map((p,u)=>n(p,i,`${r}[${u}]`,c)));if(!o||typeof o!=="object")return o;let l=o.$ref;if(typeof l==="string"&&(!l.startsWith("#")||i!==t)){let[p,u=""]=l.split("#"),f=p?vo(i,p):i,h=`${f}#${u}`;if(c.has(h))return o;let m=wo(await a(f),u,r);return n(m,f,r,new Set(c).add(h))}let d={};for(let[p,u]of Object.entries(o))d[p]=await n(u,i,r?`${r}.${p}`:p,c);return d}return await n(e,t,"",new Set)}async function ko(e){let t=e,s="";if(typeof e==="string")if(e.trim().startsWith("{")||/^\s*openapi\s*:/m.test(e))t=et(e);else s=e,t=et(await Rs(e),e);if(s&&t&&typeof t==="object")t=await yo(t,s);return Ls(t),t}function Ls(e){if(!e||typeof e!=="object"||Array.isArray(e))throw new W("","the document must be an object");let t=e;if(typeof t.openapi!=="string"||!/^3\.[01]\./.test(t.openapi))throw new W("openapi",`expected a 3.0.x or 3.1.x version string, found ${JSON.stringify(t.openapi)}`);if(!t.info||typeof t.info!=="object")throw new W("info","is required");if(typeof t.info.title!=="string")throw new W("info.title","is required");if(t.paths!==void 0&&(typeof t.paths!=="object"||Array.isArray(t.paths)))throw new W("paths","must be an object");if(t.webhooks!==void 0&&(typeof t.webhooks!=="object"||Array.isArray(t.webhooks)))throw new W("webhooks","must be an object");for(let[s,a]of Object.entries(t.paths||{}))Es(t,`paths.${s}`,a,s);for(let[s,a]of Object.entries(t.webhooks||{}))Es(t,`webhooks.${s}`,a,null);Os(t,t,"")}function Es(e,t,s,a){if(a!==null&&!a.startsWith("/"))throw new W(t,'a path must start with "/"');let n=K(e,s,t);if(!n||typeof n!=="object")throw new W(t,"must be a path item object");for(let o of Ms){let i=n[o];if(i===void 0)continue;let r=`${t}.${o}`;if(!i||typeof i!=="object")throw new W(r,"must be an operation object");if(!i.responses||typeof i.responses!=="object"||!Object.keys(i.responses).length)throw new W(`${r}.responses`,"an operation needs at least one response");for(let[c,l]of(i.parameters||[]).entries())Is(e,l,`${r}.parameters[${c}]`)}for(let[o,i]of(n.parameters||[]).entries())Is(e,i,`${t}.parameters[${o}]`)}function Is(e,t,s){let a=K(e,t,s);if(!a||typeof a!=="object")throw new W(s,"must be a parameter object");if(typeof a.name!=="string"||!a.name)throw new W(`${s}.name`,"is required");if(!["query","header","path","cookie"].includes(a.in))throw new W(`${s}.in`,`must be query, header, path or cookie, found ${JSON.stringify(a.in)}`)}function Os(e,t,s,a=new Set){if(!t||typeof t!=="object"||a.has(t))return;if(a.add(t),typeof t.$ref==="string")K(e,t,s);for(let[n,o]of Object.entries(t))Os(e,o,s?`${s}.${n}`:n,a)}function K(e,t,s=""){let a=t,n=new Set;while(a&&typeof a==="object"&&typeof a.$ref==="string"){let o=a.$ref;if(n.has(o))return a;if(n.add(o),!o.startsWith("#/"))throw new W(s,`${o} is in another file, which is resolved only when the document is loaded from a path or URL`);let i=e;for(let r of o.slice(2).split("/").map((c)=>c.replace(/~1/g,"/").replace(/~0/g,"~")))if(i=i?.[r],i===void 0)throw new W(s,`${o} does not exist`);a=i}return a}function ie(e){return e.toLowerCase().replace(/\{([^}]+)\}/g,"$1").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"item"}function de(e){let t=e&&typeof e==="object"?e.$ref:void 0;if(typeof t==="string"&&t.startsWith("#/components/schemas/"))return t.slice(21);return}function ve(e,t){let s=de(t),a=K(e,t);if(!a||typeof a!=="object")return"any";if(s)return s;if(a.oneOf)return"one of";if(a.anyOf)return"any of";if(a.allOf)return"all of";let n=Array.isArray(a.type)?a.type.filter((i)=>i!=="null").join(" | "):a.type;if(!n)n=a.properties?"object":a.items?"array":"any";if(n==="array")return`${ve(e,a.items)}[]`;return a.nullable===!0||Array.isArray(a.type)&&a.type.includes("null")?`${n} | null`:n}function So(e){let t=[];if(e.format)t.push(`format: ${e.format}`);if(Array.isArray(e.enum))t.push(`one of: ${e.enum.map((s)=>JSON.stringify(s)).join(", ")}`);if(e.default!==void 0)t.push(`default: ${JSON.stringify(e.default)}`);if(e.minimum!==void 0)t.push(`min: ${e.minimum}`);if(e.maximum!==void 0)t.push(`max: ${e.maximum}`);if(e.minLength!==void 0)t.push(`min length: ${e.minLength}`);if(e.maxLength!==void 0)t.push(`max length: ${e.maxLength}`);if(e.pattern)t.push(`pattern: ${e.pattern}`);if(e.readOnly)t.push("read only");if(e.writeOnly)t.push("write only");if(e.deprecated)t.push("deprecated");return t}function Qe(e,t,s={}){let a=[],n=s.maxDepth??6;function o(i,r,c,l,d){let p=K(e,i);if(!p||typeof p!=="object"||c>n)return;if(de(i)&&!d)return;for(let h of["allOf","oneOf","anyOf"]){if(!Array.isArray(p[h]))continue;if(h==="allOf"){for(let m of p[h])o(m,r,c,new Set([...l,...K(e,m)?.required||[]]),!0);continue}p[h].forEach((m,b)=>{let w=de(m);if(a.push({name:`${r||"value"} (option ${b+1})`,depth:c,type:ve(e,m),required:!1,description:K(e,m)?.description||"",notes:[],ref:w?`schema-${ie(w)}`:void 0,combinator:h}),!w)o(m,r,c+1,new Set(K(e,m)?.required||[]),!0)})}let f=p.properties&&typeof p.properties==="object"?p.properties:null;if(f){let h=new Set([...p.required||[],...l]);for(let[m,b]of Object.entries(f)){let w=K(e,b)||{},S=de(b),g=S||(w.items?de(w.items):void 0),T=r?`${r}.${m}`:m;if(a.push({name:T,depth:c,type:ve(e,b),required:h.has(m),description:w.description||"",notes:So(w),ref:g?`schema-${ie(g)}`:void 0}),S)continue;if(w.properties||w.allOf||w.oneOf||w.anyOf)o(b,T,c+1,new Set(w.required||[]),!0);else if(w.items){let M=K(e,w.items);if(!de(w.items)&&M&&(M.properties||M.allOf))o(w.items,`${T}[]`,c+1,new Set(M.required||[]),!0)}}}else if(p.items&&c===0&&!r){let h=de(p.items);if(a.push({name:"[]",depth:c,type:ve(e,p.items),required:!0,description:K(e,p.items)?.description||"",notes:[],ref:h?`schema-${ie(h)}`:void 0}),!h)o(p.items,"[]",c+1,new Set(K(e,p.items)?.required||[]),!0)}}return o(t,"",0,new Set,s.expandTopRef!==!1),a}function Ee(e,t,s=0,a=new Set){let n=de(t);if(n){if(a.has(n)||s>6)return{};a=new Set(a).add(n)}let o=K(e,t);if(!o||typeof o!=="object")return null;if(o.example!==void 0)return o.example;if(Array.isArray(o.examples)&&o.examples.length)return o.examples[0];if(o.default!==void 0)return o.default;if(Array.isArray(o.enum)&&o.enum.length)return o.enum[0];if(o.allOf)return Object.assign({},...o.allOf.map((r)=>Ee(e,r,s+1,a)).filter((r)=>r&&typeof r==="object"));if(o.oneOf||o.anyOf)return Ee(e,(o.oneOf||o.anyOf)[0],s+1,a);let i=Array.isArray(o.type)?o.type.find((r)=>r!=="null"):o.type;if(i==="object"||o.properties){let r={};for(let[c,l]of Object.entries(o.properties||{}))r[c]=Ee(e,l,s+1,a);return r}if(i==="array")return[Ee(e,o.items,s+1,a)];if(i==="integer"||i==="number")return o.minimum??0;if(i==="boolean")return!0;if(i==="string"){if(o.format==="date-time")return"2026-01-01T00:00:00Z";if(o.format==="date")return"2026-01-01";if(o.format==="email")return"user@example.com";if(o.format==="uuid")return"00000000-0000-0000-0000-000000000000";if(o.format==="uri"||o.format==="url")return"https://example.com";return"string"}return null}function As(e){if(!e||typeof e!=="object")return null;let t=Object.entries(e);return t.find(([s])=>s.includes("json"))||t[0]||null}function Ps(e,t){if(t.example!==void 0)return t.example;let s=t.examples&&Object.values(t.examples)[0];if(s){let a=K(e,s);if(a&&a.value!==void 0)return a.value}return Ee(e,t.schema)}function Co(e){if(e.type==="apiKey")return`${String(e.in).charAt(0).toUpperCase()}${String(e.in).slice(1)} ${e.name}`;if(e.type==="http")return e.scheme==="bearer"?`Bearer token${e.bearerFormat?` (${e.bearerFormat})`:""}`:`HTTP ${e.scheme}`;if(e.type==="oauth2")return`OAuth 2 (${Object.keys(e.flows||{}).join(", ")||"flows"})`;if(e.type==="openIdConnect")return"OpenID Connect";if(e.type==="mutualTLS")return"Mutual TLS";return String(e.type||"unknown")}var Ns=(e)=>`'${e.replace(/'/g,"'\\''")}'`;function Ht(e){if(e.example!==void 0)return String(e.example);return e.in==="path"?`{${e.name}}`:`<${e.name}>`}function Ds(e,t,s){let a=e.path;for(let I of e.parameters.filter((R)=>R.in==="path"))a=a.replace(`{${I.name}}`,encodeURIComponent(Ht(I)).replace(/%7B/g,"{").replace(/%7D/g,"}"));let n=e.parameters.filter((I)=>I.in==="query"&&I.required),o=n.length?`?${n.map((I)=>`${encodeURIComponent(I.name)}=${encodeURIComponent(Ht(I))}`).join("&")}`:"",i=`${t.replace(/\/+$/,"")}${a}${o}`,r=[],c=e.security[0]||[];for(let I of c){let R=s.find((B)=>B.name===I.name);if(!R)continue;if(R.type==="apiKey"&&R.in==="header")r.push([R.paramName,"$API_KEY"]);else if(R.type==="http"&&R.scheme==="bearer")r.push(["Authorization","Bearer $TOKEN"]);else if(R.type==="http"&&R.scheme==="basic")r.push(["Authorization","Basic $CREDENTIALS"]);else if(R.type==="oauth2"||R.type==="openIdConnect")r.push(["Authorization","Bearer $ACCESS_TOKEN"])}for(let I of e.parameters.filter((R)=>R.in==="header"&&R.required))r.push([I.name,Ht(I)]);let l=c.map((I)=>s.find((R)=>R.name===I.name)).find((I)=>I?.type==="apiKey"&&I.in==="query"),d=l?`${i}${i.includes("?")?"&":"?"}${encodeURIComponent(l.paramName)}=$API_KEY`:i,p=e.body?e.body.example:"";if(e.body)r.push(["Content-Type",e.body.mediaType]);let u=e.method.toUpperCase(),f=(I)=>I.includes("$")?`"${I.replace(/(["\\`])/g,"\\$1")}"`:Ns(I),h=[`curl -X ${u} ${f(d)}`].concat(r.map(([I,R])=>` -H ${f(`${I}: ${R}`)}`)).concat(e.body?[` -d ${Ns(p)}`]:[]).join(" \\\n"),m=(I)=>I.replace(/\$(API_KEY|TOKEN|ACCESS_TOKEN|CREDENTIALS)/g,(R,B)=>`\${process.env.${B}}`),b=d.includes("$")?`\`${m(d)}\``:JSON.stringify(d),w=r.map(([I,R])=>` ${JSON.stringify(I)}: ${R.includes("$")?`\`${m(R)}\``:JSON.stringify(R)},`),S=[`const response = await fetch(${b}, {`,` method: ${JSON.stringify(u)},`,...w.length?[" headers: {",...w," },"]:[],...e.body?[` body: JSON.stringify(${p.replace(/\n/g,`
4
+ `)}),`]:[],"})","const data = await response.json()"].join(`
5
+ `),g=(I)=>I.replace(/\$(API_KEY|TOKEN|ACCESS_TOKEN|CREDENTIALS)/g,(R,B)=>`{os.environ['${B}']}`),T=(I)=>I.includes("$")?`f${JSON.stringify(g(I))}`:JSON.stringify(I),P=[...r.some(([,I])=>I.includes("$"))||d.includes("$")?["import os",""]:[],"import requests","","response = requests.request(",` ${JSON.stringify(u)},`,` ${T(d)},`,...r.length?[` headers={${r.map(([I,R])=>`${JSON.stringify(I)}: ${T(R)}`).join(", ")}},`]:[],...e.body?[` json=${jt(JSON.parse(p||"null"))},`]:[],")","data = response.json()"].join(`
6
+ `);return{curl:h,javascript:S,python:P}}function jt(e){if(e===null||e===void 0)return"None";if(e===!0)return"True";if(e===!1)return"False";if(typeof e==="number")return String(e);if(typeof e==="string")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(jt).join(", ")}]`;return`{${Object.entries(e).map(([t,s])=>`${JSON.stringify(t)}: ${jt(s)}`).join(", ")}}`}function $o(e,t={}){let s=t.baseUrl||e.servers?.[0]?.url||"https://api.example.com",a=e.components||{},n=Object.entries(a.securitySchemes||{}).map(([h,m])=>{let b=K(e,m);return{name:h,anchor:`security-${ie(h)}`,type:b.type,summary:Co(b),description:b.description||"",in:b.in,paramName:b.name,scheme:b.scheme}}),o=new Map((e.tags||[]).map((h)=>[h.name,h])),i=new Map,r=new Set,c=[...Object.entries(e.paths||{}).map(([h,m])=>[h,m,!1]),...Object.entries(e.webhooks||{}).map(([h,m])=>[h,m,!0])];for(let[h,m,b]of c){let w=K(e,m);for(let S of Ms){let g=w[S];if(!g)continue;let T=new Map;for(let y of[...w.parameters||[],...g.parameters||[]]){let N=K(e,y);T.set(`${N.in}:${N.name}`,N)}let M=[...T.values()].map((y)=>({name:y.name,in:y.in,required:y.in==="path"?!0:y.required===!0,type:ve(e,y.schema),description:y.description||"",deprecated:y.deprecated===!0,example:y.example??K(e,y.schema)?.example})),P=null;if(g.requestBody){let y=K(e,g.requestBody),N=As(y.content);if(N){let[C,x]=N,E=de(x.schema);P={mediaType:C,required:y.required===!0,description:y.description||"",rows:Qe(e,x.schema),ref:E?`schema-${ie(E)}`:void 0,schema:E,example:JSON.stringify(Ps(e,x),null,2)}}}let I=Object.entries(g.responses||{}).map(([y,N])=>{let C=K(e,N),x=As(C.content),E=x?de(x[1].schema):void 0;return{status:y,description:C.description||"",mediaType:x?x[0]:"",rows:x?Qe(e,x[1].schema):[],ref:E?`schema-${ie(E)}`:void 0,schema:E,example:x?JSON.stringify(Ps(e,x[1]),null,2):"",headers:Object.entries(C.headers||{}).map(([q,z])=>{let H=K(e,z)||{};return{name:q,type:ve(e,H.schema),description:H.description||"",required:H.required===!0}})}}),B=(b?g.security??[]:g.security??e.security??[]).map((y)=>Object.entries(y).map(([N,C])=>({name:N,anchor:`security-${ie(N)}`,scopes:C||[]}))).filter((y)=>y.length>0),k=typeof g.operationId==="string"&&g.operationId?g.operationId:`${S}-${h}`,A=`${b?"webhook":"op"}-${ie(k)}`;for(let y=2;r.has(A);y++)A=`${b?"webhook":"op"}-${ie(k)}-${y}`;r.add(A),k=g.operationId||k;let j=b?"Webhooks":Array.isArray(g.tags)&&g.tags.length?String(g.tags[0]):"Endpoints",D={id:k,anchor:A,method:S.toUpperCase(),path:h,summary:g.summary||"",description:g.description||"",deprecated:g.deprecated===!0,tag:j,parameters:M,body:P,responses:I,security:B},F={...D,webhook:b,examples:b?null:Ds(D,s,n)};if(!i.has(j))i.set(j,[]);i.get(j).push(F)}}let d=[...(e.tags||[]).map((h)=>h.name),...i.keys()].filter((h,m,b)=>i.has(h)&&b.indexOf(h)===m).map((h)=>({name:h,anchor:`tag-${ie(h)}`,description:o.get(h)?.description||"",operations:i.get(h)})),p=Object.entries(a.schemas||{}).map(([h,m])=>{let b=K(e,m);return{name:h,anchor:`schema-${ie(h)}`,description:b?.description||"",type:ve(e,{...b,$ref:void 0}),rows:Qe(e,m)}}),u=[...n.length?[{text:"Authentication",anchor:"authentication",children:n.map((h)=>({text:h.name,anchor:h.anchor}))}]:[],...d.map((h)=>({text:h.name,anchor:h.anchor,children:h.operations.map((m)=>({text:m.summary||`${m.method} ${m.path}`,anchor:m.anchor,method:m.method}))})),...p.length?[{text:"Schemas",anchor:"schemas",children:p.map((h)=>({text:h.name,anchor:h.anchor}))}]:[]],f=[...d.map((h)=>({title:h.name,anchor:h.anchor,text:h.description,kind:"tag"})),...d.flatMap((h)=>h.operations.map((m)=>({title:m.summary||`${m.method} ${m.path}`,anchor:m.anchor,text:`${m.method} ${m.path} ${m.description}`.trim(),kind:"operation"}))),...p.map((h)=>({title:h.name,anchor:h.anchor,text:h.description,kind:"schema"}))];return{title:e.info.title,version:e.info.version||"",description:e.info.description||"",baseUrl:s,tags:d,schemas:p,securitySchemes:n,toc:u,search:f}}var Eo="./AddressField-gcydmvkf.stx";var Ao="./CommandBar-k35nsefs.stx";var No="./ContentCard-gjsm9qrr.stx";var Ro="./FloatingPanel-qp8cq8hz.stx";var Oo="./SidebarDivider-6whech7a.stx";var zo="./SidebarRow-301dd797.stx";var jo="./SpaceSwitcher-297p5gnb.stx";var Vo="./TileGrid-nne4x506.stx";var _o="./AppearancePicker-34758z53.stx";var Ko="./Audio-ay34sh1f.stx";var Go="./BiometricSignIn-6enqcn9e.stx";var Jo="./Login-4666t7j4.stx";var Xo="./Signup-pm2r0f2m.stx";var Qo="./SocialSignInButton-9x4qbd03.stx";var ti="./TwoFactorChallenge-3tsbfdsd.stx";var Ym="session",si={faceId:"Face ID",touchId:"Touch ID",fingerprint:"Fingerprint"};function zs(e){return typeof e==="string"?si[e]||"":""}function Xm(e){let t=zs(e);return t?`Sign in with ${t}`:""}function ai(){let t=globalThis.craft?.biometrics;if(!t)return null;return["isAvailable","getBiometricType","storeCredential","getCredential","hasCredential","deleteCredential"].every((a)=>typeof t[a]==="function")?t:null}var tt=Object.freeze({available:!1,kind:null,label:"",saved:!1});function ni(e){let t=e?.code;return typeof t==="string"&&t?t:"UNKNOWN"}function oi(e){return e instanceof Error?e.message:String(e??"")}function Zm(e="session",t){let s=String(e||"").trim()||"session",a=()=>t===void 0?ai():t;async function n(){let c=a();if(!c)return tt;try{if(!await c.isAvailable())return tt;let l=await c.getBiometricType(),d=zs(l);if(!d)return tt;return{available:!0,kind:l,label:d,saved:await c.hasCredential(s)===!0}}catch{return tt}}async function o(c){let l=a();if(!l)return{status:"failed",code:"UNSUPPORTED",message:"Biometric sign-in is not available here."};try{let d=await l.getCredential(s,c||void 0);if(typeof d==="string"&&d)return{status:"signed-in",token:d};return await l.deleteCredential(s).catch(()=>{}),{status:"invalidated"}}catch(d){let p=ni(d);if(p==="AUTHENTICATION_CANCELLED")return{status:"cancelled"};return{status:"failed",code:p,message:oi(d)}}}async function i(c){let l=a();if(!l||typeof c!=="string"||!c)return!1;try{if(!await l.isAvailable())return!1;return await l.storeCredential(s,c),!0}catch{return!1}}async function r(){let c=a();if(!c)return;await c.deleteCredential(s).catch(()=>{})}return{probe:n,signIn:o,enable:i,forget:r}}var ri="./Avatar-6gexb2xv.stx";var ci="./Badge-wnz3v82e.stx";var pi="./Breadcrumb-cgw1bb6s.stx";class te extends Error{component;context;constructor(e,t,s={}){let a=te.formatMessage(e,t,s);super(a);if(this.name="ComponentError",this.component=e,this.context={component:e,...s},Error.captureStackTrace)Error.captureStackTrace(this,te)}static formatMessage(e,t,s){let a=`[${e}] ${t}`;if(s.prop)a+=`
4
7
  Prop: "${s.prop}"`;if(s.received!==void 0)a+=`
5
8
  Received: ${JSON.stringify(s.received)}`;if(s.expected!==void 0){let n=Array.isArray(s.expected)?s.expected.map((o)=>JSON.stringify(o)).join(", "):JSON.stringify(s.expected);a+=`
6
9
  Expected: ${n}`}if(s.details)a+=`
7
10
  Details: ${s.details}`;if(s.docsUrl)a+=`
8
11
  Documentation: ${s.docsUrl}`;else if(e)a+=`
9
- Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return a}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var xe={invalidProp(e,t,s,a){return new X(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:a,details:Array.isArray(a)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new X(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,a){return new X(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:a,details:`Expected "${t}" to be of type ${a}, but received ${typeof s}`})},componentNotFound(e){return new X("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new X(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new X(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new X(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new X(e,"Failed to render component",{details:t.message})}},Ve=null;function nf(e){Ve=e}function of(){Ve=null}function je(e,t={}){let{throwError:s=!0,logError:a=!0}=t;if(a){if(console.error("Component Error:",e),e instanceof X)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(Ve)try{Ve(e)}catch(n){console.error("Error in error handler:",n)}if(s)throw e}function os(e,t,s){return(...a)=>{try{let n=e(...a);if(n instanceof Promise)return n.catch((o)=>{let i=xe.eventHandler(t,s,o);throw je(i,{throwError:!1}),i});return n}catch(n){let o=xe.eventHandler(t,s,n);throw je(o,{throwError:!1}),o}}}function Jn(e,t){if(!e)throw t}function Yn(e,t,s={}){let a=X.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${a}`)}function rf(e,t){Jn(e,t)}function lf(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,a){Yn(e,s,a)},error(s,a){let n=new X(e,s,a);je(n,{throwError:!1})}}}function cf(e,t,s){try{return t()}catch(a){let n=xe.render(e,a);return je(n,{throwError:!1}),s}}class _{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new _(this.validate,this.message,!0)}}var f={string:new _((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new _((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new _((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new _((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new _((e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`object\`.`),array:new _((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new _(()=>!0,()=>""),oneOf(e){return new _((t)=>e.includes(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected one of [${e.map((n)=>JSON.stringify(n)).join(", ")}].`)},oneOfType(e){return new _((t,s,a)=>e.some((n)=>n.validate(t,s,a)),(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected one of the specified types.`)},arrayOf(e){return new _((t,s,a)=>{if(!Array.isArray(t))return!1;return t.every((n,o)=>e.validate(n,`${s}[${o}]`,a))},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected array of specified type.`)},shape(e){return new _((t,s,a)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[n,o]of Object.entries(e)){if(o.isRequired&&!(n in t))return!1;if(n in t&&!o.validate(t[n],`${s}.${n}`,a))return!1}return!0},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected object matching specified shape.`)},instanceOf(e){return new _((t)=>t instanceof e,(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new _(e,typeof t==="string"?()=>t:t)},min(e){return new _((t)=>typeof t==="number"&&t>=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value >= ${e}.`)},max(e){return new _((t)=>typeof t==="number"&&t<=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value <= ${e}.`)},range(e,t){return new _((s)=>typeof s==="number"&&s>=e&&s<=t,(s,a,n)=>`Invalid prop \`${a}\` of value \`${s}\` supplied to \`${n}\`, expected value between ${e} and ${t}.`)},pattern(e){return new _((t)=>typeof t==="string"&&e.test(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value matching pattern ${e}.`)},email:new _((e)=>typeof e==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid email address.`),url:new _((e)=>{if(typeof e!=="string")return!1;try{let t=new URL(e);return!0}catch{return!1}},(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid URL.`)};function Xn(e,t,s,a={}){let{throwOnError:n=!1,logWarnings:o=!0}=a,i=[];for(let[r,c]of Object.entries(s)){let l=t[r],d=l===void 0;if(c.isRequired&&d){let u=`Required prop \`${r}\` was not specified in \`${e}\`.`;i.push(u);continue}if(d)continue;if(!c.validate(l,r,e)){let u=c.message(l,r,e);i.push(u)}}if(i.length>0){if(o)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),i.forEach((r)=>console.warn(r)),console.groupEnd();if(n)throw Error(`Prop validation failed for \`${e}\`:
12
+ Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return a}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var Ie={invalidProp(e,t,s,a){return new te(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:a,details:Array.isArray(a)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new te(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,a){return new te(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:a,details:`Expected "${t}" to be of type ${a}, but received ${typeof s}`})},componentNotFound(e){return new te("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new te(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new te(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new te(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new te(e,"Failed to render component",{details:t.message})}},st=null;function gg(e){st=e}function xg(){st=null}function at(e,t={}){let{throwError:s=!0,logError:a=!0}=t;if(a){if(console.error("Component Error:",e),e instanceof te)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(st)try{st(e)}catch(n){console.error("Error in error handler:",n)}if(s)throw e}function Hs(e,t,s){return(...a)=>{try{let n=e(...a);if(n instanceof Promise)return n.catch((o)=>{let i=Ie.eventHandler(t,s,o);throw at(i,{throwError:!1}),i});return n}catch(n){let o=Ie.eventHandler(t,s,n);throw at(o,{throwError:!1}),o}}}function ui(e,t){if(!e)throw t}function hi(e,t,s={}){let a=te.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${a}`)}function bg(e,t){ui(e,t)}function vg(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,a){hi(e,s,a)},error(s,a){let n=new te(e,s,a);at(n,{throwError:!1})}}}function wg(e,t,s){try{return t()}catch(a){let n=Ie.render(e,a);return at(n,{throwError:!1}),s}}class J{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new J(this.validate,this.message,!0)}}var v={string:new J((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new J((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new J((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new J((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new J((e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`object\`.`),array:new J((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new J(()=>!0,()=>""),oneOf(e){return new J((t)=>e.includes(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected one of [${e.map((n)=>JSON.stringify(n)).join(", ")}].`)},oneOfType(e){return new J((t,s,a)=>e.some((n)=>n.validate(t,s,a)),(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected one of the specified types.`)},arrayOf(e){return new J((t,s,a)=>{if(!Array.isArray(t))return!1;return t.every((n,o)=>e.validate(n,`${s}[${o}]`,a))},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected array of specified type.`)},shape(e){return new J((t,s,a)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[n,o]of Object.entries(e)){if(o.isRequired&&!(n in t))return!1;if(n in t&&!o.validate(t[n],`${s}.${n}`,a))return!1}return!0},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected object matching specified shape.`)},instanceOf(e){return new J((t)=>t instanceof e,(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new J(e,typeof t==="string"?()=>t:t)},min(e){return new J((t)=>typeof t==="number"&&t>=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value >= ${e}.`)},max(e){return new J((t)=>typeof t==="number"&&t<=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value <= ${e}.`)},range(e,t){return new J((s)=>typeof s==="number"&&s>=e&&s<=t,(s,a,n)=>`Invalid prop \`${a}\` of value \`${s}\` supplied to \`${n}\`, expected value between ${e} and ${t}.`)},pattern(e){return new J((t)=>typeof t==="string"&&e.test(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value matching pattern ${e}.`)},email:new J((e)=>typeof e==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid email address.`),url:new J((e)=>{if(typeof e!=="string")return!1;try{let t=new URL(e);return!0}catch{return!1}},(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid URL.`)};function fi(e,t,s,a={}){let{throwOnError:n=!1,logWarnings:o=!0}=a,i=[];for(let[r,c]of Object.entries(s)){let l=t[r],d=l===void 0;if(c.isRequired&&d){let p=`Required prop \`${r}\` was not specified in \`${e}\`.`;i.push(p);continue}if(d)continue;if(!c.validate(l,r,e)){let p=c.message(l,r,e);i.push(p)}}if(i.length>0){if(o)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),i.forEach((r)=>console.warn(r)),console.groupEnd();if(n)throw Error(`Prop validation failed for \`${e}\`:
10
13
  ${i.join(`
11
- `)}`)}return{valid:i.length===0,errors:i}}function ae(e,t,s){return(a)=>Xn(e,a,t,s)}function pf(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function uf(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Qn="./Button-rns3jhjh.stx";var eo={variant:f.oneOf(["primary","secondary","outline","ghost","danger"]),appearance:f.oneOf(["mac"]),size:f.oneOf(["xs","sm","md","lg","xl"]),disabled:f.boolean,loading:f.boolean,type:f.oneOf(["button","submit","reset"]),fullWidth:f.boolean,label:f.string,text:f.string,ariaExpanded:f.oneOf([!0,!1,"true","false"]),ariaControls:f.string,ariaPressed:f.oneOf([!0,!1,"true","false","mixed"]),leftIcon:f.string,rightIcon:f.string,className:f.string,onClick:f.func},xf=ae("Button",eo);function bf(e){return os(e,"Button","onClick")}function vf(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw xe.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function wf(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw xe.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var so="./Calendar-hkh42jz0.stx";var no="./DateRangePicker-4zmf34e4.stx";var io="./DateTimePicker-7zk8tc4s.stx";var Be=new Map;function is(e){let t=Be.get(e);if(!t){if(t=new Intl.DateTimeFormat("en-CA",{timeZone:e,calendar:"iso8601",numberingSystem:"latn",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),Be.size>=64)Be.clear();Be.set(e,t)}return t}function rs(e){if(typeof e!=="string"||!e)return!1;try{return is(e),!0}catch{return!1}}function St(e){if(e==null||e==="")return null;if(typeof e!=="string"&&!(e instanceof Date))return null;if(typeof e==="string"){let s=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:\d{2})$/i.exec(e);if(!s||_e(s[1],s[2])==null)return null}let t=new Date(e instanceof Date?e.getTime():e);return Number.isFinite(t.getTime())?t.toISOString():null}function kt(e,t){let s=St(e);if(!s)return null;try{let a=Object.fromEntries(is(t).formatToParts(new Date(s)).map((n)=>[n.type,n.value]));return{date:`${a.year.padStart(4,"0")}-${a.month}-${a.day}`,time:`${a.hour}:${a.minute}`}}catch{return null}}function _e(e,t){let s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),a=/^(\d{2}):(\d{2})$/.exec(t);if(!s||!a)return null;let[n,o,i,r,c]=[+s[1],+s[2],+s[3],+a[1],+a[2]];if(n<100||o<1||o>12||i<1||r>23||c>59)return null;let l=Date.UTC(n,o-1,i,r,c),d=new Date(l);return d.getUTCFullYear()===n&&d.getUTCMonth()===o-1&&d.getUTCDate()===i?l:null}function ro(e,t,s,a="earlier"){let n=_e(e,t);if(n==null||!rs(s))return null;let o=new Set;for(let r of[-2,-1,0,1,2]){let c=n+r*86400000,l=kt(new Date(c),s);if(!l)continue;let d=_e(l.date,l.time);if(d!=null)o.add(d-c)}let i=[];for(let r of o){let c=n-r,l=kt(new Date(c),s);if(l?.date===e&&l.time===t)i.push(c)}if(!i.length)return null;return new Date(a==="later"?Math.max(...i):Math.min(...i)).toISOString()}function Pf(e,t,s="en-US"){let a=St(e);if(!a)return null;try{return new Intl.DateTimeFormat(s,{timeZone:t,year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(new Date(a))}catch{return null}}function Mf(e,t,s=new Date,a=null){if(!rs(t)||!Number.isFinite(s.getTime()))return null;if(e==="hour")return new Date(s.getTime()+3600000).toISOString();if(e==="suggested")return St(a);let n=kt(s,t);if(!n)return null;let o=_e(n.date,"00:00");if(o==null)return null;let i=new Date(o+86400000).toISOString().slice(0,10);return ro(i,"09:00",t)}var co="./EmptyState-gk5fmbfg.stx";var uo="./ErrorState-qb7af5zb.stx";var fo="./ThemeToggle-4wm9zare.stx";var go="./Card-r55zpjqh.stx";var bo="./Checkbox-4g3hemtw.stx";var wo="./ChoiceChips-0bsd0rzw.stx";var ko="./CodeEditor-kaywcb83.stx";var Co="./ColorSwatches-mz9kt78g.stx";var To="./Combobox-9n04ec5w.stx";var Io="./ComboboxButton-4r6a45s1.stx";var Po="./ComboboxInput-1gyfpnca.stx";var Ro="./ComboboxOption-wkw70js7.stx";var Lo="./ComboboxOptions-zhr9b6rx.stx";var Oo="./CommandPalette-cj6pe5ph.stx";var Ho="./CommandPaletteItem-bzvp48j8.stx";var Vo="./ContextMenu-43g3w5tp.stx";function Ct(e,t=[]){let s=[];if(!Array.isArray(e))return s;for(let a of e){if(!a||typeof a!=="object")continue;if(a.separator){if(s.length>0&&!s[s.length-1].separator)s.push({separator:!0,id:"",path:[]});continue}s.push({...a,id:a.id==null?"":String(a.id),path:[]})}while(s.length>0&&s[s.length-1].separator)s.pop();return s.forEach((a,n)=>{if(a.path=[...t,n],a.separator||a.id==="")a.id=a.path.join(".");if(!a.separator&&Array.isArray(a.children))a.children=Ct(a.children,a.path)}),s}function ls(e){return Boolean(e)&&!e.separator}function cs(e){return Boolean(e)&&!e.separator&&!e.disabled}function be(e){return Boolean(e)&&!e.separator&&Array.isArray(e.children)&&e.children.length>0}function Te(e,t,s){let a=e.length;if(a===0)return-1;let n=t;for(let o=0;o<a;o++)if(n=n<0?s===1?0:a-1:(n+s+a)%a,ls(e[n]))return n;return-1}function Ee(e){return Te(e,-1,1)}function ds(e){return Te(e,-1,-1)}function ps(e,t,s){let a=s.toLowerCase();if(a===""||e.length===0)return-1;let n=a.length>1&&a.split("").every((r)=>r===a.charAt(0)),o=n?a.charAt(0):a,i=a.length===1||n?t+1:Math.max(t,0);for(let r=0;r<e.length;r++){let c=(i+r+e.length)%e.length,l=e[c];if(ls(l)&&(l.label||"").toLowerCase().startsWith(o))return c}return-1}function jo(e,t){for(let s of e){if(s.separator)continue;if(s.id===t)return s;if(s.children){let a=jo(s.children,t);if(a)return a}}return null}function us(e,t,s,a=8){let n=(o,i,r)=>{if(o+i<=r-a)return o;if(o-i>=a)return o-i;return Math.max(a,r-a-i)};return{x:n(e.x,t.width,s.width),y:n(e.y,t.height,s.height)}}function hs(e,t,s,a=8,n=4){let o=e.left;if(o+t.width>s.width-a)o=Math.max(a,Math.min(e.right-t.width,s.width-a-t.width));let i=e.bottom+n;if(i+t.height>s.height-a){let r=e.top-n-t.height;i=r>=a?r:Math.max(a,s.height-a-t.height)}return{x:Math.max(a,o),y:i}}function fs(e,t,s,a=8,n=4){let o="right",i=e.right-n;if(i+t.width>s.width-a){let c=e.left+n-t.width;if(c>=a)i=c,o="left";else i=Math.max(a,s.width-a-t.width)}let r=Math.max(a,Math.min(e.top-n,s.height-a-t.height));return{x:i,y:r,side:o}}var Bo={mod:"\u2318",meta:"\u2318",cmd:"\u2318",command:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7"},_o={mod:"Ctrl",meta:"Win",cmd:"Ctrl",command:"Ctrl",ctrl:"Ctrl",control:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift"},Ko={enter:"\u21A9",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},qo={escape:"Esc",esc:"Esc",delete:"Del",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},Wo=["ctrl","control","alt","option","shift","mod","meta","cmd","command"],Go=["mod","ctrl","control","cmd","command","meta","alt","option","shift"];function ms(e){let s=(e.endsWith("++")?[...e.slice(0,-2).split("+"),"+"]:e.split("+")).map((n)=>n.trim()).filter((n)=>n!==""),a=s.pop()||"";return{modifiers:s.map((n)=>n.toLowerCase()),key:a}}function Ke(e){return e.length===1?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function gs(e,t){if(!e)return"";let{modifiers:s,key:a}=ms(e),n=t?Wo:Go,i=[...s].sort((c,l)=>n.indexOf(c)-n.indexOf(l)).map((c)=>(t?Bo:_o)[c]??Ke(c)),r=(t?Ko:qo)[a.toLowerCase()]??Ke(a);return t?i.join("")+r:[...new Set(i),r].join("+")}function xs(e,t){if(!e)return"";let{modifiers:s,key:a}=ms(e),n={mod:t?"Meta":"Control",meta:"Meta",cmd:"Meta",command:"Meta",ctrl:"Control",control:"Control",alt:"Alt",option:"Alt",shift:"Shift"};return[...new Set(s.map((o)=>n[o]??Ke(o))),Ke(a)].join("+")}var Uo=160,Jo=600;function Yo(){let e=typeof navigator>"u"?"":navigator.platform||navigator.userAgent||"";return/mac|iphone|ipad/i.test(e)}var Xo=0;class Zo{root;callbacks;items;label;disabled;apple;layer;uid=`stx-menu-${++Xo}`;stack=[];target=null;returnFocus=null;hoverTimer=null;typed="";typedAt=0;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.items=t.items??null,this.label=t.label||"Context menu",this.disabled=Boolean(t.disabled),this.apple=t.apple??Yo(),this.layer=document.createElement("div"),this.layer.className="stx-menu-layer",this.layer.setAttribute("data-menu-layer",""),this.layer.__stx_inert_content=!0,"popover"in HTMLElement.prototype)this.layer.setAttribute("popover","manual");else this.layer.hidden=!0;this.root.appendChild(this.layer),this.listen(this.root,"contextmenu",(a)=>this.onContextMenu(a)),this.listen(this.root,"keydown",(a)=>this.onHostKeyDown(a)),this.listen(this.layer,"keydown",(a)=>this.onMenuKeyDown(a)),this.listen(this.layer,"click",(a)=>this.onMenuClick(a)),this.listen(this.layer,"pointermove",(a)=>this.onMenuPointerMove(a)),this.listen(this.layer,"contextmenu",(a)=>a.preventDefault()),this.root.setAttribute("data-menu-ready","")}get isOpen(){return this.stack.length>0}setItems(e){this.items=e??null}setDisabled(e){if(this.disabled=e,e)this.close("api")}setLabel(e){this.label=e||"Context menu"}open(e,t,s={}){this.close("api",!1);let a=e instanceof Element?e:null,n=s.target??a??null,o=t??(typeof this.items==="function"?this.items(n):this.items),i=Ct(o);if(i.length===0)return!1;this.target=n;let r=document.activeElement;this.returnFocus=r instanceof HTMLElement&&r!==document.body?r:null,this.showLayer();let c=this.buildMenu(i,null),l=c.element.getBoundingClientRect(),d={width:window.innerWidth,height:window.innerHeight},u=a?hs(bs(a),l,d):us(e,l,d);if(this.position(c.element,u),this.listenWhileOpen(),s.keyboard||a)this.focusItem(c,Ee(c.items));else c.element.focus({preventScroll:!0});return this.callbacks.onOpen?.({x:u.x,y:u.y,target:n,keyboard:Boolean(s.keyboard)}),!0}close(e="api",t=!0){if(!this.isOpen)return;this.clearHover();for(let a of this.stack)a.element.remove();this.stack=[],this.hideLayer(),this.stopListeningWhileOpen();let s=this.returnFocus;if(this.returnFocus=null,this.target=null,t&&e!=="outside"&&e!=="blur"&&s&&s.isConnected)s.focus({preventScroll:!0});this.callbacks.onClose?.({reason:e})}destroy(){this.close("api",!1);for(let e of this.disposers)e();this.layer.remove(),this.root.removeAttribute("data-menu-ready")}listen(e,t,s,a){e.addEventListener(t,s,a);let n=()=>e.removeEventListener(t,s,a);return this.disposers.push(n),n}whileOpen=[];listenWhileOpen(){let e=(s,a,n,o)=>{s.addEventListener(a,n,o),this.whileOpen.push(()=>s.removeEventListener(a,n,o))},t=(s)=>{if(!(s.target instanceof Node)||!this.layer.contains(s.target))this.close("outside")};e(document,"pointerdown",t,{capture:!0}),e(document,"scroll",t,{capture:!0,passive:!0}),e(window,"resize",()=>this.close("blur")),e(window,"blur",()=>this.close("blur"))}stopListeningWhileOpen(){for(let e of this.whileOpen)e();this.whileOpen=[]}showLayer(){if(this.layer.hasAttribute("popover"))try{this.layer.showPopover()}catch{}else this.layer.hidden=!1}hideLayer(){if(this.layer.hasAttribute("popover"))try{this.layer.hidePopover()}catch{}else this.layer.hidden=!0}position(e,t){e.style.left=`${Math.round(t.x)}px`,e.style.top=`${Math.round(t.y)}px`}buildMenu(e,t){let s=document.createElement("div");if(s.className="stx-menu",s.setAttribute("role","menu"),s.setAttribute("tabindex","-1"),s.setAttribute("data-menu-depth",String(this.stack.length)),t)s.setAttribute("aria-labelledby",t.id);else s.setAttribute("aria-label",this.label);e.forEach((n,o)=>{if(n.separator){let l=document.createElement("div");l.className="stx-menu-separator",l.setAttribute("role","separator"),s.appendChild(l);return}let i=document.createElement("div");if(i.className="stx-menu-item",i.id=`${this.uid}-${n.path.join("-")}`,i.setAttribute("role",typeof n.checked==="boolean"?"menuitemcheckbox":"menuitem"),i.setAttribute("tabindex","-1"),i.setAttribute("data-menu-index",String(o)),i.setAttribute("data-menu-id",n.id),typeof n.checked==="boolean")i.setAttribute("aria-checked",String(n.checked));if(n.disabled)i.setAttribute("aria-disabled","true");if(n.danger)i.setAttribute("data-danger","");let r=document.createElement("span");r.className="stx-menu-check",r.setAttribute("aria-hidden","true"),r.textContent=n.checked===!0?"\u2713":"",i.appendChild(r);let c=document.createElement("span");if(c.className="stx-menu-label",c.textContent=n.label||"",i.appendChild(c),be(n)){i.setAttribute("aria-haspopup","menu"),i.setAttribute("aria-expanded","false");let l=document.createElement("span");l.className="stx-menu-arrow",l.setAttribute("aria-hidden","true"),l.textContent="\u203A",i.appendChild(l)}else if(n.shortcut){i.setAttribute("aria-keyshortcuts",xs(n.shortcut,this.apple));let l=document.createElement("span");l.className="stx-menu-shortcut",l.setAttribute("aria-hidden","true"),l.textContent=gs(n.shortcut,this.apple),i.appendChild(l)}s.appendChild(i)}),this.layer.appendChild(s);let a={element:s,items:e,opener:t};return this.stack.push(a),a}menuOf(e){if(!(e instanceof Element))return null;let t=e.closest(".stx-menu");return this.stack.find((s)=>s.element===t)??null}rowAt(e,t){return t<0?null:e.element.querySelector(`:scope > [data-menu-index="${t}"]`)}activeIndex(e){let t=document.activeElement;if(!(t instanceof HTMLElement)||t.parentElement!==e.element)return-1;let s=Number(t.getAttribute("data-menu-index"));return Number.isInteger(s)?s:-1}focusItem(e,t){let s=this.rowAt(e,t);if(s)s.focus({preventScroll:!1});else e.element.focus({preventScroll:!0})}closeBelow(e){let t=this.stack.indexOf(e);for(let s of this.stack.splice(t+1))s.opener?.setAttribute("aria-expanded","false"),s.element.remove()}openSubmenu(e,t,s){let a=e.items[t],n=this.rowAt(e,t);if(!n||!be(a)||a.disabled)return;let o=this.stack[this.stack.indexOf(e)+1];if(o&&o.opener===n){if(s)this.focusItem(o,Ee(o.items));return}this.closeBelow(e),n.setAttribute("aria-expanded","true");let i=this.buildMenu(a.children,n),r=fs(bs(n),i.element.getBoundingClientRect(),{width:window.innerWidth,height:window.innerHeight});if(i.element.setAttribute("data-side",r.side),this.position(i.element,r),s)this.focusItem(i,Ee(i.items))}choose(e,t){let s=e.items[t];if(!cs(s))return;if(be(s)){this.openSubmenu(e,t,!0);return}let{children:a,path:n,id:o,...i}=s,r={item:{...i,id:o},id:o,path:[...n],target:this.target};this.close("select"),this.callbacks.onSelect?.(r)}clearHover(){if(this.hoverTimer)clearTimeout(this.hoverTimer);this.hoverTimer=null}onContextMenu(e){if(this.disabled||this.layer.contains(e.target))return;let t=e.target instanceof Element?e.target:null;if(e.button!==2&&e.detail===0&&e.clientX===0&&e.clientY===0&&t?this.open(t,null,{keyboard:!0,target:t}):this.open({x:e.clientX,y:e.clientY},null,{target:t}))e.preventDefault()}onHostKeyDown(e){if(this.disabled||this.isOpen||this.layer.contains(e.target))return;if(e.key!=="ContextMenu"&&!(e.key==="F10"&&e.shiftKey))return;let t=e.target instanceof Element?e.target:null;if(t&&this.open(t,null,{keyboard:!0,target:t}))e.preventDefault()}onMenuClick(e){let t=this.menuOf(e.target),s=e.target instanceof Element?e.target.closest(".stx-menu-item"):null;if(!t||!s)return;this.choose(t,Number(s.getAttribute("data-menu-index")))}onMenuPointerMove(e){let t=this.menuOf(e.target),s=e.target instanceof Element?e.target.closest(".stx-menu-item"):null;if(!t||!s||document.activeElement===s)return;let a=Number(s.getAttribute("data-menu-index"));s.focus({preventScroll:!0}),this.clearHover(),this.hoverTimer=setTimeout(()=>{if(document.activeElement!==s)return;if(be(t.items[a]))this.openSubmenu(t,a,!1);else this.closeBelow(t)},Uo)}onMenuKeyDown(e){let t=this.menuOf(e.target)??this.stack[this.stack.length-1];if(!t)return;let s=this.activeIndex(t),a=this.stack.indexOf(t),n=!0;switch(e.key){case"ArrowDown":this.focusItem(t,Te(t.items,s,1));break;case"ArrowUp":this.focusItem(t,Te(t.items,s,-1));break;case"Home":case"PageUp":this.focusItem(t,Ee(t.items));break;case"End":case"PageDown":this.focusItem(t,ds(t.items));break;case"ArrowRight":if(be(t.items[s]))this.openSubmenu(t,s,!0);break;case"ArrowLeft":if(a>0)this.closeSubmenu(t);break;case"Escape":if(a>0)this.closeSubmenu(t);else this.close("escape");break;case"Enter":case" ":if(s>=0)this.choose(t,s);break;case"Tab":this.close("tab"),n=!1;break;default:n=this.typeAhead(t,s,e)}if(n)e.preventDefault(),e.stopPropagation()}closeSubmenu(e){let t=e.opener,s=this.stack[this.stack.indexOf(e)-1];if(s)this.closeBelow(s);t?.focus({preventScroll:!0})}typeAhead(e,t,s){if(s.key.length!==1||s.metaKey||s.ctrlKey||s.altKey)return!1;let a=Date.now();this.typed=a-this.typedAt>Jo?s.key:this.typed+s.key,this.typedAt=a;let n=ps(e.items,t,this.typed);if(n>=0)this.focusItem(e,n);return!0}}function bs(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}var Pm=48,Mm=2000,Rm=420,Nm=160,Qo=/^-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,ei=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function Ae(e,t){let s=new WeakSet,a=JSON.stringify(e,(n,o)=>{if(typeof o==="bigint")return o.toString();if(typeof o==="object"&&o!==null){if(s.has(o))return"[Circular]";s.add(o)}return o},t);return a===void 0?"null":a}function ne(e,t){if(t.accessor)return t.accessor(e);return e==null?void 0:e[t.key]}function ti(e){let t=0,s=0,a=0,n=0,o=0;for(let i of e){if(i===null||i===void 0||i==="")continue;if(t++,typeof i==="number"||typeof i==="bigint")s++;else if(typeof i==="boolean")n++;else if(i instanceof Date)a++;else if(typeof i==="object")o++;else if(typeof i==="string"){let r=i.trim();if(Qo.test(r))s++;else if(ei.test(r)&&!Number.isNaN(Date.parse(r)))a++}}if(t===0)return"string";if(s===t)return"number";if(a===t)return"date";if(n===t)return"boolean";if(o===t)return"json";return"string"}function si(e,t=200){let s=[],a=new Set,n=Math.min(e.length,t);for(let o=0;o<n;o++){let i=e[o];if(i===null||typeof i!=="object")continue;if(Array.isArray(i)){for(let r=0;r<i.length;r++){let c=String(r);if(!a.has(c))a.add(c),s.push(c)}continue}for(let r in i)if(!a.has(r))a.add(r),s.push(r)}if(s.length>0&&s.every((o)=>/^\d+$/.test(o)))s.sort((o,i)=>Number(o)-Number(i));return s.map((o)=>({key:o}))}function ys(e){if(e===null)return"null";return e===void 0?"undefined":"value"}function Ie(e,t="string"){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e==="string")return e;if(typeof e==="number"||typeof e==="boolean"||typeof e==="bigint")return String(e);if(e instanceof Date)return Number.isNaN(e.getTime())?"Invalid Date":e.toISOString();if(typeof e==="object"||t==="json"){let s=Ae(e);return s.length>160?`${s.slice(0,160)}...`:s}return String(e)}function ks(e){return Ae(e)}function Ss(e,t){let s={};for(let a of t){let n=ne(e,a);s[a.key]=n===void 0?null:n}return s}function Cs(e,t){return Ae(Ss(e,t),2)}function ai(e,t){return Ae(e.map((s)=>Ss(s,t)),2)}function vs(e){if(e===null||e===void 0)return"";let t;if(typeof e==="string")t=e;else if(e instanceof Date)t=Number.isNaN(e.getTime())?"":e.toISOString();else if(typeof e==="object")t=Ae(e);else t=String(e);if(/[",\r\n]/.test(t)||t!==t.trim())return`"${t.replace(/"/g,'""')}"`;return t}function ni(e,t){let s=Array.from({length:e.length+1});s[0]=t.map((n)=>vs(n.label??n.key)).join(",");let a=t.length;for(let n=0;n<e.length;n++){let o=e[n],i="";for(let r=0;r<a;r++){if(r>0)i+=",";i+=vs(ne(o,t[r]))}s[n+1]=i}return`${s.join(`\r
14
+ `)}`)}return{valid:i.length===0,errors:i}}function pe(e,t,s){return(a)=>fi(e,a,t,s)}function kg(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Sg(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var gi="./Button-rns3jhjh.stx";var xi={variant:v.oneOf(["primary","secondary","outline","ghost","danger"]),appearance:v.oneOf(["mac"]),size:v.oneOf(["xs","sm","md","lg","xl"]),disabled:v.boolean,loading:v.boolean,type:v.oneOf(["button","submit","reset"]),fullWidth:v.boolean,label:v.string,text:v.string,ariaExpanded:v.oneOf([!0,!1,"true","false"]),ariaControls:v.string,ariaPressed:v.oneOf([!0,!1,"true","false","mixed"]),leftIcon:v.string,rightIcon:v.string,className:v.string,onClick:v.func},Ig=pe("Button",xi);function Ag(e){return Hs(e,"Button","onClick")}function Pg(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw Ie.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Ng(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw Ie.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var vi="./Calendar-hkh42jz0.stx";var yi="./DateRangePicker-4zmf34e4.stx";var Si="./DateTimePicker-7zk8tc4s.stx";var nt=new Map;function js(e){let t=nt.get(e);if(!t){if(t=new Intl.DateTimeFormat("en-CA",{timeZone:e,calendar:"iso8601",numberingSystem:"latn",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),nt.size>=64)nt.clear();nt.set(e,t)}return t}function Fs(e){if(typeof e!=="string"||!e)return!1;try{return js(e),!0}catch{return!1}}function Vt(e){if(e==null||e==="")return null;if(typeof e!=="string"&&!(e instanceof Date))return null;if(typeof e==="string"){let s=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:\d{2})$/i.exec(e);if(!s||ot(s[1],s[2])==null)return null}let t=new Date(e instanceof Date?e.getTime():e);return Number.isFinite(t.getTime())?t.toISOString():null}function Ft(e,t){let s=Vt(e);if(!s)return null;try{let a=Object.fromEntries(js(t).formatToParts(new Date(s)).map((n)=>[n.type,n.value]));return{date:`${a.year.padStart(4,"0")}-${a.month}-${a.day}`,time:`${a.hour}:${a.minute}`}}catch{return null}}function ot(e,t){let s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),a=/^(\d{2}):(\d{2})$/.exec(t);if(!s||!a)return null;let[n,o,i,r,c]=[+s[1],+s[2],+s[3],+a[1],+a[2]];if(n<100||o<1||o>12||i<1||r>23||c>59)return null;let l=Date.UTC(n,o-1,i,r,c),d=new Date(l);return d.getUTCFullYear()===n&&d.getUTCMonth()===o-1&&d.getUTCDate()===i?l:null}function Ci(e,t,s,a="earlier"){let n=ot(e,t);if(n==null||!Fs(s))return null;let o=new Set;for(let r of[-2,-1,0,1,2]){let c=n+r*86400000,l=Ft(new Date(c),s);if(!l)continue;let d=ot(l.date,l.time);if(d!=null)o.add(d-c)}let i=[];for(let r of o){let c=n-r,l=Ft(new Date(c),s);if(l?.date===e&&l.time===t)i.push(c)}if(!i.length)return null;return new Date(a==="later"?Math.max(...i):Math.min(...i)).toISOString()}function Vg(e,t,s="en-US"){let a=Vt(e);if(!a)return null;try{return new Intl.DateTimeFormat(s,{timeZone:t,year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(new Date(a))}catch{return null}}function Bg(e,t,s=new Date,a=null){if(!Fs(t)||!Number.isFinite(s.getTime()))return null;if(e==="hour")return new Date(s.getTime()+3600000).toISOString();if(e==="suggested")return Vt(a);let n=Ft(s,t);if(!n)return null;let o=ot(n.date,"00:00");if(o==null)return null;let i=new Date(o+86400000).toISOString().slice(0,10);return Ci(i,"09:00",t)}var Ti="./EmptyState-gk5fmbfg.stx";var Ii="./ErrorState-qb7af5zb.stx";var Pi="./ThemeToggle-4wm9zare.stx";var Mi="./Card-r55zpjqh.stx";var Li="./AreaChart-8fy34adp.stx";var Di="./BarChart-4xdrjhhn.stx";var Hi="./LineChart-ctebkkm8.stx";var Fi="./Sparkline-gp859n4h.stx";var Vi=["number","percent","duration","bytes","currency"];function _s(e){return typeof e==="string"&&Vi.includes(e)}function qs(e){if(typeof e==="number")return e;if(typeof e==="string"&&e.trim()!=="")return Number(e);return Number.NaN}function re(e,t){try{return new Intl.NumberFormat(e,t)}catch{return new Intl.NumberFormat("en-US",t)}}function Vs(e,t){return t?`${e} ${t}`:e}var Bt=[{limit:1000,divisor:1,unit:"ms"},{limit:60000,divisor:1000,unit:"s"},{limit:3600000,divisor:60000,unit:"min"},{limit:86400000,divisor:3600000,unit:"h"},{limit:Number.POSITIVE_INFINITY,divisor:86400000,unit:"d"}],Bs=["B","KB","MB","GB","TB","PB"];function _t(e,t="number",s={}){let a=s.locale||"en-US",n=s.unit||"",o=qs(e);if(!Number.isFinite(o))return{short:"\u2014",exact:"\u2014"};switch(t){case"percent":return{short:re(a,{style:"percent",maximumFractionDigits:Math.abs(o)<0.1?2:1}).format(o),exact:re(a,{style:"percent",maximumFractionDigits:4}).format(o)};case"duration":{let i=Math.abs(o),r=Bt.find((d)=>i<d.limit)||Bt[Bt.length-1],c=o/r.divisor,l=r.unit==="ms"?0:1;return{short:`${re(a,{maximumFractionDigits:l}).format(c)} ${r.unit}`,exact:`${re(a,{maximumFractionDigits:3}).format(o)} ms`}}case"bytes":{let i=Math.abs(o),r=0;while(r<Bs.length-1&&i>=1000**(r+1))r++;let c=o/1000**r;return{short:`${re(a,{maximumFractionDigits:r===0?0:1}).format(c)} ${Bs[r]}`,exact:`${re(a,{maximumFractionDigits:0}).format(o)} bytes`}}case"currency":{let i=(n||"USD").toUpperCase();return{short:re(a,{style:"currency",currency:i,notation:"compact",maximumFractionDigits:1}).format(o),exact:re(a,{style:"currency",currency:i}).format(o)}}default:return{short:Vs(re(a,{notation:"compact",maximumFractionDigits:1}).format(o),n),exact:Vs(re(a,{maximumFractionDigits:6}).format(o),n)}}}function Bi(e,t="up-good",s="en-US"){let a=qs(e);if(!Number.isFinite(a))return null;let n=a>0?"up":a<0?"down":"flat",o=re(s,{style:"percent",maximumFractionDigits:1}).format(Math.abs(a)),i="neutral";if(n!=="flat"&&t!=="neutral")i=n==="up"===(t==="up-good")?"good":"bad";let r=n==="flat"?`unchanged, ${o}`:`${n} ${o}`;return{direction:n,tone:i,text:o,spoken:r}}var Zs=["var(--stx-accent, #2563eb)","var(--stx-info, #0891b2)","var(--stx-success, #16a34a)","var(--stx-warning, #d97706)","var(--stx-danger, #dc2626)","var(--stx-secondary, #7c3aed)"],_i=["line","area","bar","sparkline"],qi=["time","linear","band"],Ki=["linear","monotone","step"],Ks=0.000000001;function Ws(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Gs(e){return/^[\w#%(),.\s-]+$/.test(e)?e:Zs[0]}function Us(e,t,s,a){if(typeof t==="function")return t(e,s);if(typeof t==="string"&&e!==null&&typeof e==="object")return e[t];return a}function it(e){if(e===null||e===void 0||e==="")return null;let t=typeof e==="number"?e:Number(e);return Number.isFinite(t)?t:null}function Js(e){if(e instanceof Date)return Number.isFinite(e.getTime())?e.getTime():null;if(typeof e==="number")return Number.isFinite(e)?e:null;if(typeof e==="string"&&e){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function Wi(e,t){return typeof e==="string"?e:`series${t+1}`}function Qs(e,t){let s=e/Math.max(1,t),a=10**Math.floor(Math.log10(s)),n=s/a;return(n<=1?1:n<=2?2:n<=2.5?2.5:n<=5?5:10)*a}function Ys(e,t,s=5){if(e===t){let c=e===0?1:Math.abs(e)*0.1;e-=c,t+=c}let a=Qs(t-e,s),n=Math.floor(e/a)*a,o=Math.ceil(t/a)*a,i=[],r=Math.max(0,-Math.floor(Math.log10(a))+2);for(let c=n;c<=o+a/2;c+=a)i.push(Number(c.toFixed(r)));return{domain:[n,o],ticks:i}}var Fe=1000,Ae=60*Fe,we=60*Ae,le=24*we,Gi=[Fe,5*Fe,15*Fe,30*Fe,Ae,5*Ae,15*Ae,30*Ae,we,3*we,6*we,12*we,le,2*le,7*le];function Ui(e,t,s=5){let a=Math.max(1,t-e),n=a/Math.max(1,s),o=Gi.find((d)=>d>=n);if(o){let d=[];for(let p=Math.ceil(e/o)*o;p<=t;p+=o)d.push(p);return{ticks:d,step:o}}let i=[1,3,6].find((d)=>d*30*le>=n),r=[],c=new Date(e);if(i){let d=c.getUTCFullYear(),p=Math.ceil(c.getUTCMonth()/i)*i;for(;;){let u=Date.UTC(d,p,1);if(u>t)break;if(u>=e)r.push(u);if(p+=i,p>=12)d+=Math.floor(p/12),p%=12}return{ticks:r,step:i*30*le}}let l=Math.max(1,Math.round(Qs(a/(365*le),s)));for(let d=Math.ceil(c.getUTCFullYear()/l)*l;Date.UTC(d,0,1)<=t;d+=l){let p=Date.UTC(d,0,1);if(p>=e)r.push(p)}return{ticks:r,step:l*365*le}}function qt(e,t,s){let a;try{a=new Intl.DateTimeFormat(e,{timeZone:t,...s})}catch{a=new Intl.DateTimeFormat("en-US",{timeZone:"UTC",...s})}return(n)=>a.format(new Date(n))}function Ji(e){if(e<Ae)return{hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"};if(e<le)return{hour:"2-digit",minute:"2-digit",hourCycle:"h23"};if(e<28*le)return{month:"short",day:"numeric"};if(e<365*le)return{month:"short",year:"numeric"};return{year:"numeric"}}function je(e,t,s){if(typeof e==="function")return(a,n)=>{try{return String(e(a,n)??"")}catch{return s(a,n)}};if(_s(e))return(a)=>_t(a,e,{locale:t}).short;return s}function Yi(e){let t=_i.includes(e.type)?e.type:"line",s=Array.isArray(e.data)?e.data:[],a=s.length>0&&s.every((x)=>typeof x==="number"||x===null),n=e.locale||"en-US",o=e.timeZone||"UTC",i=Math.max(2,Math.round(Number(e.ticks)||5)),r=Math.max(16,Number(e.height)||(t==="sparkline"?32:240)),c=e.axes??t!=="sparkline",l=Ki.includes(e.curve)?e.curve:t==="bar"?"linear":"monotone",d=(Array.isArray(e.colors)&&e.colors.length?e.colors:Zs).map((x)=>Gs(String(x))),p=[e.y??"y"];if(Array.isArray(e.series)&&e.series.length)p=e.series;else if(Array.isArray(e.y))p=e.y;let u=p.map((x)=>x!==null&&typeof x==="object"&&("key"in x)?x:{key:x}),f=s.map((x,E)=>a?E:Us(x,e.x??"x",E,E)),h=qi.includes(e.xType)?e.xType:"linear";if(!e.xType){if(t==="bar")h="band";else if(f.some((x)=>x instanceof Date||typeof x==="string"&&Number.isNaN(Number(x))&&Number.isFinite(Date.parse(x))))h="time";else if(f.some((x)=>typeof x==="string"&&x!==""&&Number.isNaN(Number(x))))h="band"}let m=f.map((x,E)=>h==="band"?E:h==="time"?Js(x):it(x)),b=m.map((x)=>x!==null),w=s.filter((x,E)=>b[E]),S=f.filter((x,E)=>b[E]);m=m.filter((x,E)=>b[E]);let g=m,T=u.map((x,E)=>{let q=w.map((z,H)=>it(a?z:Us(z,x.key,H,void 0)));return{key:Wi(x.key,E),label:x.label||(typeof x.key==="string"?x.key:`Series ${E+1}`),color:x.color?Gs(String(x.color)):d[E%d.length],values:q,labels:[]}}),M=T.flatMap((x)=>x.values).filter((x)=>x!==null),P=M.length?Math.min(...M):0,I=M.length?Math.max(...M):1;if(t==="bar"||t==="area")P=Math.min(0,P),I=Math.max(0,I);let R=it(e.yDomain?.[0]),B=it(e.yDomain?.[1]);if(R!==null)P=R;if(B!==null)I=B;let k=Ys(P,I,i),A=[R??k.domain[0],B??k.domain[1]],j=k.ticks.filter((x)=>x>=A[0]-Ks&&x<=A[1]+Ks),D=je(e.formatY,n,(x)=>new Intl.NumberFormat(n,{maximumFractionDigits:2}).format(x)),F=(t==="sparkline"?[]:j).map((x)=>({value:x,label:D(x)}));for(let x of T)x.labels=x.values.map((E)=>E===null?"\u2014":D(E));let y,N=[],C;if(h==="band"){y=[0,Math.max(1,g.length)];let x=qt(n,o,{month:"short",day:"numeric"}),E=je(e.formatX,n,(z,H)=>{let G=S[H??0];return G instanceof Date||typeof G==="string"&&Number.isNaN(Number(G))&&Number.isFinite(Date.parse(G))?x(Js(G)):String(G??"")});C=S.map((z,H)=>E(z,H));let q=Math.max(1,Math.ceil(g.length/Math.max(i,8)));N=g.filter((z,H)=>H%q===0).map((z)=>({value:z,label:C[z]}))}else{let x=g.length?Math.min(...g):0,E=g.length?Math.max(...g):1;if(h==="time"){y=x===E?[x-we,E+we]:[x,E];let{ticks:q,step:z}=Ui(y[0],y[1],i),H=je(e.formatX,n,qt(n,o,Ji(z))),G=je(e.formatX,n,qt(n,o,z<le?{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}:{year:"numeric",month:"short",day:"numeric"}));N=q.map((ce)=>({value:ce,label:H(new Date(ce))})),C=g.map((ce,De)=>G(new Date(ce),De))}else{let q=Ys(x,E,i);y=x===E?q.domain:[x,E];let z=je(e.formatX,n,(H)=>new Intl.NumberFormat(n,{maximumFractionDigits:2}).format(H));N=q.ticks.filter((H)=>H>=y[0]&&H<=y[1]).map((H)=>({value:H,label:z(H)})),C=g.map((H,G)=>z(H,G))}}if(!c)N=[];return{type:t,curve:l,xType:h,height:r,axes:c,fill:t==="area"||t!=="bar"&&e.fill===!0,label:e.label||"",xs:g,xLabels:C,xDomain:y,yDomain:A,xTicks:N,yTicks:F,series:T,data:w.map((x)=>Xi(x))}}function Xi(e){if(e instanceof Date)return e.toISOString();if(e===null||typeof e!=="object")return typeof e==="function"?void 0:e;try{return JSON.parse(JSON.stringify(e))}catch{return}}function Zi(e,t){let s=Math.max(40,Math.round(t)),a=e.height,n=e.yTicks.reduce((g,T)=>Math.max(g,T.label.length),0),o=e.axes?Math.min(96,10+n*7):2,i=e.axes?8:2,r=e.axes?12:2,c=e.axes?26:2,l=Math.max(1,s-o-r),d=Math.max(1,a-i-c),[p,u]=e.xDomain,[f,h]=e.yDomain,m=Math.max(1,e.xs.length),b=e.xType==="band"?l/m:0,w=e.xType==="band"?(g)=>o+(g+0.5)*b:(g)=>o+(u===p?l/2:(g-p)/(u-p)*l);return{width:s,height:a,left:o,top:i,plotWidth:l,plotHeight:d,x:(g)=>w(e.xs[g]??g),xValue:w,y:(g)=>{let T=Math.min(Math.max(g,Math.min(f,h)),Math.max(f,h));return i+d-(h===f?0.5:(T-f)/(h-f))*d},bandWidth:b}}var V=(e)=>String(Math.round(e*100)/100);function Qi(e,t){let s=[],a=[];if(e.forEach((n,o)=>{if(n===null){if(a.length)s.push(a);a=[];return}a.push([t.x(o),t.y(n)])}),a.length)s.push(a);return s}function er(e){let t=e.length;if(t<3)return ea(e);let s=[],a=[];for(let i=0;i<t-1;i++)s[i]=e[i+1][0]-e[i][0],a[i]=s[i]===0?0:(e[i+1][1]-e[i][1])/s[i];let n=[a[0]];for(let i=1;i<t-1;i++){let r=a[i-1],c=a[i];if(r*c<=0)n[i]=0;else{let l=2*s[i]+s[i-1],d=s[i]+2*s[i-1];n[i]=(l+d)/(l/r+d/c)}}n[t-1]=a[t-2];let o=`M${V(e[0][0])},${V(e[0][1])}`;for(let i=0;i<t-1;i++){let[r,c]=e[i],[l,d]=e[i+1],p=s[i]/3;o+=`C${V(r+p)},${V(c+p*n[i])},${V(l-p)},${V(d-p*n[i+1])},${V(l)},${V(d)}`}return o}function ea(e){return e.map(([t,s],a)=>`${a?"L":"M"}${V(t)},${V(s)}`).join("")}function tr(e){let t="";return e.forEach(([s,a],n)=>{if(n===0){t=`M${V(s)},${V(a)}`;return}let o=(e[n-1][0]+s)/2;t+=`H${V(o)}V${V(a)}H${V(s)}`}),t}function Xs(e,t){if(t==="step")return tr(e);if(t==="monotone")return er(e);return ea(e)}function sr(e,t){let s=Zi(e,t),a=[],n=s.y(Math.max(e.yDomain[0],Math.min(0,e.yDomain[1])));if(e.axes){a.push('<g data-chart-grid aria-hidden="true">');for(let i of e.yTicks){let r=V(s.y(i.value));a.push(`<line x1="${V(s.left)}" x2="${V(s.left+s.plotWidth)}" y1="${r}" y2="${r}" style="stroke:var(--stx-line, #e5e5e5)" stroke-width="1" />`),a.push(`<text x="${V(s.left-8)}" y="${r}" dy="0.32em" text-anchor="end" font-size="11" style="fill:var(--stx-fg-soft, #737373)">${Ws(i.label)}</text>`)}let o=Number.NEGATIVE_INFINITY;for(let i of e.xTicks){let r=i.label.length*6.5/2,c=s.xValue(i.value);if(c-r<o+8)continue;o=c+r;let l=V(c);a.push(`<text data-chart-x-tick x="${l}" y="${V(s.top+s.plotHeight+18)}" text-anchor="middle" font-size="11" style="fill:var(--stx-fg-soft, #737373)">${Ws(i.label)}</text>`)}a.push(`<line x1="${V(s.left)}" x2="${V(s.left+s.plotWidth)}" y1="${V(n)}" y2="${V(n)}" style="stroke:var(--stx-line-strong, #d4d4d4)" stroke-width="1" />`),a.push("</g>")}if(e.series.forEach((o,i)=>{let r=`stroke:${o.color};fill:${o.color}`;if(a.push(`<g data-chart-series="${i}" style="${r}">`),e.type==="bar"){let c=e.series.length,l=s.bandWidth*0.72,d=Math.max(1,l/c);o.values.forEach((p,u)=>{if(p===null)return;let f=s.x(u)-l/2+i*d,h=s.y(p),m=Math.min(h,n),b=Math.max(p===0?0:1,Math.abs(n-h));a.push(`<rect x="${V(f)}" y="${V(m)}" width="${V(Math.max(1,d-1))}" height="${V(b)}" rx="2" stroke="none" />`)})}else for(let c of Qi(o.values,s)){if(e.fill&&c.length>1){let d=`${Xs(c,e.curve)}L${V(c[c.length-1][0])},${V(n)}L${V(c[0][0])},${V(n)}Z`;a.push(`<path d="${d}" fill-opacity="0.16" stroke="none" />`)}if(c.length>1)a.push(`<path d="${Xs(c,e.curve)}" fill="none" stroke-width="${e.type==="sparkline"?1.5:2}" stroke-linejoin="round" stroke-linecap="round"${e.type==="sparkline"?' vector-effect="non-scaling-stroke"':""} />`);else a.push(`<circle cx="${V(c[0][0])}" cy="${V(c[0][1])}" r="3" stroke="none" />`)}a.push("</g>")}),e.type!=="sparkline")a.push(`<g data-chart-focus visibility="hidden" aria-hidden="true"><line data-chart-crosshair x1="0" x2="0" y1="${V(s.top)}" y2="${V(s.top+s.plotHeight)}" style="stroke:var(--stx-fg-soft, #737373)" stroke-width="1" stroke-dasharray="3 3" />`),e.series.forEach((o,i)=>{a.push(`<circle data-chart-marker="${i}" cx="0" cy="0" r="4" stroke-width="2" style="fill:var(--stx-panel, #fff);stroke:${o.color}" />`)}),a.push("</g>");if(e.type==="sparkline")return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s.width} ${s.height}" preserveAspectRatio="none" aria-hidden="true" focusable="false" style="display:block;width:100%;height:${s.height}px;overflow:visible">${a.join("")}</svg>`;return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s.width} ${s.height}" aria-hidden="true" focusable="false" data-chart-width="${s.width}" style="display:block;width:100%;height:auto;overflow:visible">${a.join("")}</svg>`}var nr="./Checkbox-4g3hemtw.stx";var ir="./ChoiceChips-0bsd0rzw.stx";var lr="./CodeEditor-kaywcb83.stx";var dr="./ColorSwatches-mz9kt78g.stx";var ur="./Combobox-fgbpxbty.stx";var fr="./ComboboxButton-4r6a45s1.stx";var gr="./ComboboxInput-1gyfpnca.stx";var br="./ComboboxOption-wkw70js7.stx";var wr="./ComboboxOptions-sfkc98a9.stx";var kr="./CommandPalette-sf03s7b2.stx";var Cr="./CommandPaletteItem-bzvp48j8.stx";var Tr="./ContextMenu-43g3w5tp.stx";function Kt(e,t=[]){let s=[];if(!Array.isArray(e))return s;for(let a of e){if(!a||typeof a!=="object")continue;if(a.separator){if(s.length>0&&!s[s.length-1].separator)s.push({separator:!0,id:"",path:[]});continue}s.push({...a,id:a.id==null?"":String(a.id),path:[]})}while(s.length>0&&s[s.length-1].separator)s.pop();return s.forEach((a,n)=>{if(a.path=[...t,n],a.separator||a.id==="")a.id=a.path.join(".");if(!a.separator&&Array.isArray(a.children))a.children=Kt(a.children,a.path)}),s}function ta(e){return Boolean(e)&&!e.separator}function sa(e){return Boolean(e)&&!e.separator&&!e.disabled}function Pe(e){return Boolean(e)&&!e.separator&&Array.isArray(e.children)&&e.children.length>0}function Ve(e,t,s){let a=e.length;if(a===0)return-1;let n=t;for(let o=0;o<a;o++)if(n=n<0?s===1?0:a-1:(n+s+a)%a,ta(e[n]))return n;return-1}function Be(e){return Ve(e,-1,1)}function aa(e){return Ve(e,-1,-1)}function na(e,t,s){let a=s.toLowerCase();if(a===""||e.length===0)return-1;let n=a.length>1&&a.split("").every((r)=>r===a.charAt(0)),o=n?a.charAt(0):a,i=a.length===1||n?t+1:Math.max(t,0);for(let r=0;r<e.length;r++){let c=(i+r+e.length)%e.length,l=e[c];if(ta(l)&&(l.label||"").toLowerCase().startsWith(o))return c}return-1}function Er(e,t){for(let s of e){if(s.separator)continue;if(s.id===t)return s;if(s.children){let a=Er(s.children,t);if(a)return a}}return null}function oa(e,t,s,a=8){let n=(o,i,r)=>{if(o+i<=r-a)return o;if(o-i>=a)return o-i;return Math.max(a,r-a-i)};return{x:n(e.x,t.width,s.width),y:n(e.y,t.height,s.height)}}function ia(e,t,s,a=8,n=4){let o=e.left;if(o+t.width>s.width-a)o=Math.max(a,Math.min(e.right-t.width,s.width-a-t.width));let i=e.bottom+n;if(i+t.height>s.height-a){let r=e.top-n-t.height;i=r>=a?r:Math.max(a,s.height-a-t.height)}return{x:Math.max(a,o),y:i}}function ra(e,t,s,a=8,n=4){let o="right",i=e.right-n;if(i+t.width>s.width-a){let c=e.left+n-t.width;if(c>=a)i=c,o="left";else i=Math.max(a,s.width-a-t.width)}let r=Math.max(a,Math.min(e.top-n,s.height-a-t.height));return{x:i,y:r,side:o}}var Ir={mod:"\u2318",meta:"\u2318",cmd:"\u2318",command:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7"},Ar={mod:"Ctrl",meta:"Win",cmd:"Ctrl",command:"Ctrl",ctrl:"Ctrl",control:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift"},Pr={enter:"\u21A9",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},Nr={escape:"Esc",esc:"Esc",delete:"Del",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},Mr=["ctrl","control","alt","option","shift","mod","meta","cmd","command"],Rr=["mod","ctrl","control","cmd","command","meta","alt","option","shift"];function la(e){let s=(e.endsWith("++")?[...e.slice(0,-2).split("+"),"+"]:e.split("+")).map((n)=>n.trim()).filter((n)=>n!==""),a=s.pop()||"";return{modifiers:s.map((n)=>n.toLowerCase()),key:a}}function rt(e){return e.length===1?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function ca(e,t){if(!e)return"";let{modifiers:s,key:a}=la(e),n=t?Mr:Rr,i=[...s].sort((c,l)=>n.indexOf(c)-n.indexOf(l)).map((c)=>(t?Ir:Ar)[c]??rt(c)),r=(t?Pr:Nr)[a.toLowerCase()]??rt(a);return t?i.join("")+r:[...new Set(i),r].join("+")}function da(e,t){if(!e)return"";let{modifiers:s,key:a}=la(e),n={mod:t?"Meta":"Control",meta:"Meta",cmd:"Meta",command:"Meta",ctrl:"Control",control:"Control",alt:"Alt",option:"Alt",shift:"Shift"};return[...new Set(s.map((o)=>n[o]??rt(o))),rt(a)].join("+")}var Lr=160,Or=600;function Dr(){let e=typeof navigator>"u"?"":navigator.platform||navigator.userAgent||"";return/mac|iphone|ipad/i.test(e)}var zr=0;class Hr{root;callbacks;items;label;disabled;apple;layer;uid=`stx-menu-${++zr}`;stack=[];target=null;returnFocus=null;hoverTimer=null;typed="";typedAt=0;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.items=t.items??null,this.label=t.label||"Context menu",this.disabled=Boolean(t.disabled),this.apple=t.apple??Dr(),this.layer=document.createElement("div"),this.layer.className="stx-menu-layer",this.layer.setAttribute("data-menu-layer",""),this.layer.__stx_inert_content=!0,"popover"in HTMLElement.prototype)this.layer.setAttribute("popover","manual");else this.layer.hidden=!0;this.root.appendChild(this.layer),this.listen(this.root,"contextmenu",(a)=>this.onContextMenu(a)),this.listen(this.root,"keydown",(a)=>this.onHostKeyDown(a)),this.listen(this.layer,"keydown",(a)=>this.onMenuKeyDown(a)),this.listen(this.layer,"click",(a)=>this.onMenuClick(a)),this.listen(this.layer,"pointermove",(a)=>this.onMenuPointerMove(a)),this.listen(this.layer,"contextmenu",(a)=>a.preventDefault()),this.root.setAttribute("data-menu-ready","")}get isOpen(){return this.stack.length>0}setItems(e){this.items=e??null}setDisabled(e){if(this.disabled=e,e)this.close("api")}setLabel(e){this.label=e||"Context menu"}open(e,t,s={}){this.close("api",!1);let a=e instanceof Element?e:null,n=s.target??a??null,o=t??(typeof this.items==="function"?this.items(n):this.items),i=Kt(o);if(i.length===0)return!1;this.target=n;let r=document.activeElement;this.returnFocus=r instanceof HTMLElement&&r!==document.body?r:null,this.showLayer();let c=this.buildMenu(i,null),l=c.element.getBoundingClientRect(),d={width:window.innerWidth,height:window.innerHeight},p=a?ia(pa(a),l,d):oa(e,l,d);if(this.position(c.element,p),this.listenWhileOpen(),s.keyboard||a)this.focusItem(c,Be(c.items));else c.element.focus({preventScroll:!0});return this.callbacks.onOpen?.({x:p.x,y:p.y,target:n,keyboard:Boolean(s.keyboard)}),!0}close(e="api",t=!0){if(!this.isOpen)return;this.clearHover();for(let a of this.stack)a.element.remove();this.stack=[],this.hideLayer(),this.stopListeningWhileOpen();let s=this.returnFocus;if(this.returnFocus=null,this.target=null,t&&e!=="outside"&&e!=="blur"&&s&&s.isConnected)s.focus({preventScroll:!0});this.callbacks.onClose?.({reason:e})}destroy(){this.close("api",!1);for(let e of this.disposers)e();this.layer.remove(),this.root.removeAttribute("data-menu-ready")}listen(e,t,s,a){e.addEventListener(t,s,a);let n=()=>e.removeEventListener(t,s,a);return this.disposers.push(n),n}whileOpen=[];listenWhileOpen(){let e=(s,a,n,o)=>{s.addEventListener(a,n,o),this.whileOpen.push(()=>s.removeEventListener(a,n,o))},t=(s)=>{if(!(s.target instanceof Node)||!this.layer.contains(s.target))this.close("outside")};e(document,"pointerdown",t,{capture:!0}),e(document,"scroll",t,{capture:!0,passive:!0}),e(window,"resize",()=>this.close("blur")),e(window,"blur",()=>this.close("blur"))}stopListeningWhileOpen(){for(let e of this.whileOpen)e();this.whileOpen=[]}showLayer(){if(this.layer.hasAttribute("popover"))try{this.layer.showPopover()}catch{}else this.layer.hidden=!1}hideLayer(){if(this.layer.hasAttribute("popover"))try{this.layer.hidePopover()}catch{}else this.layer.hidden=!0}position(e,t){e.style.left=`${Math.round(t.x)}px`,e.style.top=`${Math.round(t.y)}px`}buildMenu(e,t){let s=document.createElement("div");if(s.className="stx-menu",s.setAttribute("role","menu"),s.setAttribute("tabindex","-1"),s.setAttribute("data-menu-depth",String(this.stack.length)),t)s.setAttribute("aria-labelledby",t.id);else s.setAttribute("aria-label",this.label);e.forEach((n,o)=>{if(n.separator){let l=document.createElement("div");l.className="stx-menu-separator",l.setAttribute("role","separator"),s.appendChild(l);return}let i=document.createElement("div");if(i.className="stx-menu-item",i.id=`${this.uid}-${n.path.join("-")}`,i.setAttribute("role",typeof n.checked==="boolean"?"menuitemcheckbox":"menuitem"),i.setAttribute("tabindex","-1"),i.setAttribute("data-menu-index",String(o)),i.setAttribute("data-menu-id",n.id),typeof n.checked==="boolean")i.setAttribute("aria-checked",String(n.checked));if(n.disabled)i.setAttribute("aria-disabled","true");if(n.danger)i.setAttribute("data-danger","");let r=document.createElement("span");r.className="stx-menu-check",r.setAttribute("aria-hidden","true"),r.textContent=n.checked===!0?"\u2713":"",i.appendChild(r);let c=document.createElement("span");if(c.className="stx-menu-label",c.textContent=n.label||"",i.appendChild(c),Pe(n)){i.setAttribute("aria-haspopup","menu"),i.setAttribute("aria-expanded","false");let l=document.createElement("span");l.className="stx-menu-arrow",l.setAttribute("aria-hidden","true"),l.textContent="\u203A",i.appendChild(l)}else if(n.shortcut){i.setAttribute("aria-keyshortcuts",da(n.shortcut,this.apple));let l=document.createElement("span");l.className="stx-menu-shortcut",l.setAttribute("aria-hidden","true"),l.textContent=ca(n.shortcut,this.apple),i.appendChild(l)}s.appendChild(i)}),this.layer.appendChild(s);let a={element:s,items:e,opener:t};return this.stack.push(a),a}menuOf(e){if(!(e instanceof Element))return null;let t=e.closest(".stx-menu");return this.stack.find((s)=>s.element===t)??null}rowAt(e,t){return t<0?null:e.element.querySelector(`:scope > [data-menu-index="${t}"]`)}activeIndex(e){let t=document.activeElement;if(!(t instanceof HTMLElement)||t.parentElement!==e.element)return-1;let s=Number(t.getAttribute("data-menu-index"));return Number.isInteger(s)?s:-1}focusItem(e,t){let s=this.rowAt(e,t);if(s)s.focus({preventScroll:!1});else e.element.focus({preventScroll:!0})}closeBelow(e){let t=this.stack.indexOf(e);for(let s of this.stack.splice(t+1))s.opener?.setAttribute("aria-expanded","false"),s.element.remove()}openSubmenu(e,t,s){let a=e.items[t],n=this.rowAt(e,t);if(!n||!Pe(a)||a.disabled)return;let o=this.stack[this.stack.indexOf(e)+1];if(o&&o.opener===n){if(s)this.focusItem(o,Be(o.items));return}this.closeBelow(e),n.setAttribute("aria-expanded","true");let i=this.buildMenu(a.children,n),r=ra(pa(n),i.element.getBoundingClientRect(),{width:window.innerWidth,height:window.innerHeight});if(i.element.setAttribute("data-side",r.side),this.position(i.element,r),s)this.focusItem(i,Be(i.items))}choose(e,t){let s=e.items[t];if(!sa(s))return;if(Pe(s)){this.openSubmenu(e,t,!0);return}let{children:a,path:n,id:o,...i}=s,r={item:{...i,id:o},id:o,path:[...n],target:this.target};this.close("select"),this.callbacks.onSelect?.(r)}clearHover(){if(this.hoverTimer)clearTimeout(this.hoverTimer);this.hoverTimer=null}onContextMenu(e){if(this.disabled||this.layer.contains(e.target))return;let t=e.target instanceof Element?e.target:null;if(e.button!==2&&e.detail===0&&e.clientX===0&&e.clientY===0&&t?this.open(t,null,{keyboard:!0,target:t}):this.open({x:e.clientX,y:e.clientY},null,{target:t}))e.preventDefault()}onHostKeyDown(e){if(this.disabled||this.isOpen||this.layer.contains(e.target))return;if(e.key!=="ContextMenu"&&!(e.key==="F10"&&e.shiftKey))return;let t=e.target instanceof Element?e.target:null;if(t&&this.open(t,null,{keyboard:!0,target:t}))e.preventDefault()}onMenuClick(e){let t=this.menuOf(e.target),s=e.target instanceof Element?e.target.closest(".stx-menu-item"):null;if(!t||!s)return;this.choose(t,Number(s.getAttribute("data-menu-index")))}onMenuPointerMove(e){let t=this.menuOf(e.target),s=e.target instanceof Element?e.target.closest(".stx-menu-item"):null;if(!t||!s||document.activeElement===s)return;let a=Number(s.getAttribute("data-menu-index"));s.focus({preventScroll:!0}),this.clearHover(),this.hoverTimer=setTimeout(()=>{if(document.activeElement!==s)return;if(Pe(t.items[a]))this.openSubmenu(t,a,!1);else this.closeBelow(t)},Lr)}onMenuKeyDown(e){let t=this.menuOf(e.target)??this.stack[this.stack.length-1];if(!t)return;let s=this.activeIndex(t),a=this.stack.indexOf(t),n=!0;switch(e.key){case"ArrowDown":this.focusItem(t,Ve(t.items,s,1));break;case"ArrowUp":this.focusItem(t,Ve(t.items,s,-1));break;case"Home":case"PageUp":this.focusItem(t,Be(t.items));break;case"End":case"PageDown":this.focusItem(t,aa(t.items));break;case"ArrowRight":if(Pe(t.items[s]))this.openSubmenu(t,s,!0);break;case"ArrowLeft":if(a>0)this.closeSubmenu(t);break;case"Escape":if(a>0)this.closeSubmenu(t);else this.close("escape");break;case"Enter":case" ":if(s>=0)this.choose(t,s);break;case"Tab":this.close("tab"),n=!1;break;default:n=this.typeAhead(t,s,e)}if(n)e.preventDefault(),e.stopPropagation()}closeSubmenu(e){let t=e.opener,s=this.stack[this.stack.indexOf(e)-1];if(s)this.closeBelow(s);t?.focus({preventScroll:!0})}typeAhead(e,t,s){if(s.key.length!==1||s.metaKey||s.ctrlKey||s.altKey)return!1;let a=Date.now();this.typed=a-this.typedAt>Or?s.key:this.typed+s.key,this.typedAt=a;let n=na(e.items,t,this.typed);if(n>=0)this.focusItem(e,n);return!0}}function pa(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}var eb=48,tb=2000,sb=420,ab=160,jr=/^-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,Fr=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function qe(e,t){let s=new WeakSet,a=JSON.stringify(e,(n,o)=>{if(typeof o==="bigint")return o.toString();if(typeof o==="object"&&o!==null){if(s.has(o))return"[Circular]";s.add(o)}return o},t);return a===void 0?"null":a}function ue(e,t){if(t.accessor)return t.accessor(e);return e==null?void 0:e[t.key]}function Vr(e){let t=0,s=0,a=0,n=0,o=0;for(let i of e){if(i===null||i===void 0||i==="")continue;if(t++,typeof i==="number"||typeof i==="bigint")s++;else if(typeof i==="boolean")n++;else if(i instanceof Date)a++;else if(typeof i==="object")o++;else if(typeof i==="string"){let r=i.trim();if(jr.test(r))s++;else if(Fr.test(r)&&!Number.isNaN(Date.parse(r)))a++}}if(t===0)return"string";if(s===t)return"number";if(a===t)return"date";if(n===t)return"boolean";if(o===t)return"json";return"string"}function Br(e,t=200){let s=[],a=new Set,n=Math.min(e.length,t);for(let o=0;o<n;o++){let i=e[o];if(i===null||typeof i!=="object")continue;if(Array.isArray(i)){for(let r=0;r<i.length;r++){let c=String(r);if(!a.has(c))a.add(c),s.push(c)}continue}for(let r in i)if(!a.has(r))a.add(r),s.push(r)}if(s.length>0&&s.every((o)=>/^\d+$/.test(o)))s.sort((o,i)=>Number(o)-Number(i));return s.map((o)=>({key:o}))}function fa(e){if(e===null)return"null";return e===void 0?"undefined":"value"}function _e(e,t="string"){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e==="string")return e;if(typeof e==="number"||typeof e==="boolean"||typeof e==="bigint")return String(e);if(e instanceof Date)return Number.isNaN(e.getTime())?"Invalid Date":e.toISOString();if(typeof e==="object"||t==="json"){let s=qe(e);return s.length>160?`${s.slice(0,160)}...`:s}return String(e)}function ma(e){return qe(e)}function ga(e,t){let s={};for(let a of t){let n=ue(e,a);s[a.key]=n===void 0?null:n}return s}function xa(e,t){return qe(ga(e,t),2)}function _r(e,t){return qe(e.map((s)=>ga(s,t)),2)}function ua(e){if(e===null||e===void 0)return"";let t;if(typeof e==="string")t=e;else if(e instanceof Date)t=Number.isNaN(e.getTime())?"":e.toISOString();else if(typeof e==="object")t=qe(e);else t=String(e);if(/[",\r\n]/.test(t)||t!==t.trim())return`"${t.replace(/"/g,'""')}"`;return t}function qr(e,t){let s=Array.from({length:e.length+1});s[0]=t.map((n)=>ua(n.label??n.key)).join(",");let a=t.length;for(let n=0;n<e.length;n++){let o=e[n],i="";for(let r=0;r<a;r++){if(r>0)i+=",";i+=ua(ue(o,t[r]))}s[n+1]=i}return`${s.join(`\r
12
15
  `)}\r
13
- `}function $s(e,t,s,a,n=0){if(a<=0||s<=0)return{start:0,end:0};let o=Math.floor(Math.max(0,e)/s),i=Math.ceil((Math.max(0,e)+Math.max(0,t))/s),r=Math.min(a,Math.max(0,o-n));return{start:r,end:Math.max(r,Math.min(a,i+n))}}function Ts(e,t,s){let a=s.rows-1,n=Math.max(0,s.columns-1),o=Math.max(1,s.page),{row:i,column:r}=e;switch(t){case"ArrowUp":i=Math.max(-1,i-1);break;case"ArrowDown":i=Math.min(a,i+1);break;case"ArrowLeft":r-=1;break;case"ArrowRight":r+=1;break;case"PageUp":i=i<=0?i:Math.max(0,i-o);break;case"PageDown":i=Math.min(a,Math.max(0,i)+(i<0?0:o));break;case"Home":if(r=0,s.mod)i=Math.min(0,a);break;case"End":if(r=n,s.mod)i=a;break;default:return e}return{row:Math.max(-1,Math.min(a,i)),column:Math.max(0,Math.min(n,r))}}function oi(e,t,s=!1){let a=e.find((o)=>o.key===t),n=!a?{key:t,direction:"asc"}:a.direction==="asc"?{key:t,direction:"desc"}:null;if(!s)return n?[n]:[];if(!a)return[...e,n];return n?e.map((o)=>o.key===t?n:o):e.filter((o)=>o.key!==t)}var ws=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});class $t{rows=[];columns=[];view=new Uint32Array(0);sort=[];filter="";selected=new Set;given=null;filtered=new Uint32Array(0);searchText=null;sortKeys=new Map;offsets=new Float64Array(1);anchor=-1;charWidth;cellPadding;constructor(e=[],t=null,s={}){this.charWidth=s.charWidth??7.25,this.cellPadding=s.cellPadding??24,this.given=t&&t.length>0?[...t]:null,this.setRows(e)}get count(){return this.view.length}get totalWidth(){return this.offsets[this.columns.length]}setRows(e){this.rows=Array.isArray(e)?e:[],this.selected.clear(),this.anchor=-1,this.forget(),this.resolveColumns(),this.refilter()}setColumns(e){this.given=e&&e.length>0?[...e]:null,this.forget(),this.resolveColumns(),this.sort=this.sort.filter((t)=>this.columns.some((s)=>s.key===t.key)),this.refilter()}setFilter(e){return this.filter=e==null?"":String(e),this.refilter(),this.count}setSort(e){this.sort=(e??[]).filter((t)=>t&&(t.direction==="asc"||t.direction==="desc")&&this.columns.some((s)=>s.key===t.key)),this.resort()}toggleSort(e,t=!1){let s=this.columns.find((a)=>a.key===e);if(!s||!s.sortable)return this.sort;return this.sort=oi(this.sort,e,t),this.resort(),this.sort}sortOf(e){let t=this.sort.findIndex((s)=>s.key===e);return t<0?null:{direction:this.sort[t].direction,priority:t+1}}rowAt(e){return e>=0&&e<this.view.length?this.rows[this.view[e]]:void 0}valueAt(e,t){let s=this.columns[t],a=this.rowAt(e);return s&&a!==void 0?ne(a,s):void 0}viewRows(){let e=Array.from({length:this.view.length});for(let t=0;t<e.length;t++)e[t]=this.rows[this.view[t]];return e}toCsv(){return ni(this.viewRows(),this.columns)}toJson(){return ai(this.viewRows(),this.columns)}select(e,t="replace"){if(e<0||e>=this.view.length)return;let s=this.view[e];if(t==="range"&&this.anchor>=0){let a=Math.min(this.anchor,e),n=Math.max(this.anchor,e);this.selected.clear();for(let o=a;o<=n&&o<this.view.length;o++)this.selected.add(this.view[o]);return}if(t==="toggle")if(this.selected.has(s))this.selected.delete(s);else this.selected.add(s);else this.selected.clear(),this.selected.add(s);this.anchor=e}selectAll(){this.selected.clear();for(let e=0;e<this.view.length;e++)this.selected.add(this.view[e])}clearSelection(){this.selected.clear(),this.anchor=-1}isSelected(e){return e>=0&&e<this.view.length&&this.selected.has(this.view[e])}selectedIndices(){return[...this.selected].sort((e,t)=>e-t)}selectedRows(){return this.selectedIndices().map((e)=>this.rows[e])}offsetOf(e){return this.offsets[Math.max(0,Math.min(this.columns.length,e))]}columnAt(e){let t=this.columns.length;if(t===0)return-1;let s=0,a=t-1;while(s<a){let n=s+a+1>>1;if(this.offsets[n]<=e)s=n;else a=n-1}return s}columnRange(e,t,s=0){let a=this.columns.length;if(a===0)return{start:0,end:0};let n=this.columnAt(Math.max(0,e)),o=this.columnAt(Math.max(0,e)+Math.max(0,t));return{start:Math.max(0,n-s),end:Math.min(a,o+1+s)}}resizeColumn(e,t){let s=this.columns[e];if(!s)return 0;return s.width=Math.round(Math.max(s.minWidth,Math.min(s.maxWidth,t))),this.measure(),s.width}autoWidth(e,t=200){let s=this.columns[e];if(!s)return 0;let a=s.label.length+3,n=Math.min(this.view.length,t);for(let i=0;i<n;i++){let r=Ie(ne(this.rows[this.view[i]],s),s.type).length;if(r>a)a=r}let o=Math.ceil(a*this.charWidth+this.cellPadding);return Math.max(s.minWidth,Math.min(s.maxWidth,420,o))}forget(){this.searchText=null,this.sortKeys.clear()}resolveColumns(){let e=this.given??si(this.rows),t=Math.min(this.rows.length,200),s=this.view;this.view=new Uint32Array(t);for(let a=0;a<t;a++)this.view[a]=a;this.columns=e.map((a)=>{let n=a.type;if(!n){let o=[];for(let i=0;i<t;i++)o.push(ne(this.rows[i],a));n=ti(o)}return{...a,label:a.label??a.key,type:n,width:a.width??0,minWidth:a.minWidth??48,maxWidth:a.maxWidth??2000,align:a.align??(n==="number"?"right":"left"),sortable:a.sortable!==!1}}),this.columns.forEach((a,n)=>{if(!a.width)a.width=this.autoWidth(n);a.width=Math.max(a.minWidth,Math.min(a.maxWidth,a.width))}),this.view=s,this.measure()}measure(){let e=new Float64Array(this.columns.length+1);for(let t=0;t<this.columns.length;t++)e[t+1]=e[t]+this.columns[t].width;this.offsets=e}searchable(){if(this.searchText)return this.searchText;let e=this.rows,t=this.columns,s=Array.from({length:e.length});for(let a=0;a<e.length;a++){let n=e[a],o="";for(let i=0;i<t.length;i++){let r=ne(n,t[i]);if(r===null||r===void 0)continue;o+=typeof r==="string"?r:Ie(r,t[i].type),o+="\x01"}s[a]=o.toLowerCase()}return this.searchText=s,s}refilter(){let e=this.rows.length,t=this.filter.toLowerCase().split(/\s+/).filter(Boolean);if(t.length===0){let s=new Uint32Array(e);for(let a=0;a<e;a++)s[a]=a;this.filtered=s}else{let s=this.searchable(),a=new Uint32Array(e),n=0,o=t.length===1?t[0]:null;for(let i=0;i<e;i++){let r=s[i];if(o!==null){if(r.includes(o))a[n++]=i;continue}let c=!0;for(let l=0;l<t.length;l++)if(!r.includes(t[l])){c=!1;break}if(c)a[n++]=i}this.filtered=a.slice(0,n)}this.anchor=-1,this.resort()}keysFor(e){let t=this.sortKeys.get(e.key);if(t)return t;let s=this.rows,a=new Float64Array(s.length);if(e.type==="number"||e.type==="date"||e.type==="boolean")for(let n=0;n<s.length;n++){let o=ne(s[n],e),i=Number.NaN;if(o===null||o===void 0||o==="")i=Number.NaN;else if(typeof o==="number")i=o;else if(typeof o==="boolean")i=o?1:0;else if(o instanceof Date)i=o.getTime();else if(e.type==="date")i=Date.parse(String(o));else if(e.type==="boolean")i=String(o).toLowerCase()==="true"?1:0;else i=Number(o);a[n]=i}else{let n=Array.from({length:s.length}),o=new Map;for(let c=0;c<s.length;c++){let l=ne(s[c],e);if(l===null||l===void 0){n[c]=null;continue}let d=typeof l==="string"?l:Ie(l,e.type);if(n[c]=d,!o.has(d))o.set(d,0)}let i=[...o.keys()].sort(ws.compare),r=0;for(let c=0;c<i.length;c++){if(c>0&&ws.compare(i[c-1],i[c])!==0)r++;o.set(i[c],r)}for(let c=0;c<s.length;c++){let l=n[c];a[c]=l===null?Number.NaN:o.get(l)}}return this.sortKeys.set(e.key,a),a}resort(){let e=[];for(let s of this.sort){let a=this.columns.find((n)=>n.key===s.key);if(a)e.push({keys:this.keysFor(a),sign:s.direction==="desc"?-1:1})}let t=this.filtered.slice();if(e.length===1){let{keys:s,sign:a}=e[0];t.sort((n,o)=>{let i=s[n],r=s[o];if(i<r)return-a;if(i>r)return a;if(i===r)return n-o;let c=i!==i;return c===(r!==r)?n-o:c?1:-1})}else if(e.length>1)t.sort((s,a)=>{for(let n=0;n<e.length;n++){let o=e[n].keys[s],i=e[n].keys[a];if(o<i)return-e[n].sign;if(o>i)return e[n].sign;if(o===i)continue;let r=o!==o;if(r!==(i!==i))return r?1:-1}return s-a});this.view=t}}var ri="./DataGrid-7rt7v865.stx";var li=120,qe=new Intl.NumberFormat("en-US");function re(e,t){return e.querySelector(`[data-dg="${t}"]`)}function ci(e){let t=()=>{let s=document.createElement("textarea");s.value=e,s.setAttribute("aria-hidden","true"),s.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(s);let a=document.activeElement;s.select();try{document.execCommand("copy")}catch{}s.remove(),a?.focus({preventScroll:!0})};if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText==="function")navigator.clipboard.writeText(e).catch(t);else t()}class di{root;callbacks;model;scroller;content;header;body;status;filterInput;prefix;rowHeight;headerHeight;overscan;columnOverscan;selectable;resizeStep;fileName;contextMenu;slots=new Map;pool=[];headerCells=[];rows={start:0,end:0};cols={start:0,end:0};stale=!0;active={row:0,column:0};activeEl=null;filterTimer=null;resize=null;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;let a=re(e,"scroller"),n=re(e,"content"),o=re(e,"header"),i=re(e,"body");if(!a||!n||!o||!i)throw Error("DataGridView: the root is missing its scroller, content, header or body");if(this.scroller=a,this.content=n,this.header=o,this.body=i,this.status=re(e,"status"),this.filterInput=re(e,"filter"),this.prefix=a.id||`data-grid-${Math.random().toString(36).slice(2,8)}`,this.rowHeight=Math.max(8,t.rowHeight??28),this.headerHeight=Math.max(8,t.headerHeight??32),this.overscan=t.overscan??6,this.columnOverscan=t.columnOverscan??2,this.selectable=t.selectable!==!1,this.resizeStep=t.resizeStep??16,this.fileName=t.fileName||"data",this.contextMenu=Boolean(t.contextMenu),this.header.__stx_inert_content=!0,this.body.__stx_inert_content=!0,e.style.setProperty("--stx-grid-row-height",`${this.rowHeight}px`),e.style.setProperty("--stx-grid-header-height",`${this.headerHeight}px`),this.model=new $t(t.rows??[],t.columns??null),t.filter){if(this.model.setFilter(t.filter),this.filterInput)this.filterInput.value=t.filter}if(this.listen(this.scroller,"scroll",()=>this.render()),this.listen(this.scroller,"keydown",(l)=>this.onKeyDown(l)),this.listen(this.body,"click",(l)=>this.onBodyClick(l)),this.listen(this.body,"dblclick",(l)=>this.onBodyDoubleClick(l)),this.listen(this.body,"contextmenu",(l)=>this.onContextMenu(l)),this.listen(this.header,"click",(l)=>this.onHeaderClick(l)),this.listen(this.header,"dblclick",(l)=>this.onHeaderDoubleClick(l)),this.listen(this.header,"pointerdown",(l)=>this.onResizeStart(l)),this.listen(this.header,"pointermove",(l)=>this.onResizeMove(l)),this.listen(this.header,"pointerup",(l)=>this.onResizeEnd(l)),this.listen(this.header,"pointercancel",(l)=>this.onResizeEnd(l)),this.filterInput)this.listen(this.filterInput,"input",()=>this.onFilterInput());let r=re(e,"export-csv"),c=re(e,"export-json");if(r)this.listen(r,"click",()=>this.download("csv"));if(c)this.listen(c,"click",()=>this.download("json"));if(typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.render()),this.observer.observe(this.scroller);this.refresh(),e.setAttribute("data-dg-ready","")}setRows(e){this.model.setRows(e),this.active={row:Math.min(0,this.model.count-1),column:Math.min(this.active.column,Math.max(0,this.model.columns.length-1))},this.scroller.scrollTop=0,this.refresh()}setColumns(e){this.model.setColumns(e),this.active={row:this.active.row,column:Math.min(this.active.column,Math.max(0,this.model.columns.length-1))},this.refresh()}setFilter(e){let t=e==null?"":String(e);if(this.filterInput&&this.filterInput.value!==t)this.filterInput.value=t;this.applyFilter(t)}setSort(e){this.model.setSort(e),this.refresh()}setFileName(e){this.fileName=e||"data"}getView(){return this.model.viewRows()}getSelection(){let e=this.model.selectedIndices();return{rows:e.map((t)=>this.model.rows[t]),indices:e}}clearSelection(){this.model.clearSelection(),this.paintSelection(),this.reportSelection()}exportCsv(){return this.model.toCsv()}exportJson(){return this.model.toJson()}download(e){let t=e==="json"?this.model.toJson():this.model.toCsv(),s=new Blob([t],{type:e==="json"?"application/json":"text/csv;charset=utf-8"}),a=URL.createObjectURL(s),n=document.createElement("a");return n.href=a,n.download=`${this.fileName}.${e}`,n.style.display="none",this.root.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(a),1000),this.callbacks.onExport?.({format:e,text:t,rows:this.model.count}),t}scrollToRow(e){let t=Math.max(0,Math.min(this.model.count-1,e));this.revealRow(t),this.render()}focus(){this.scroller.focus({preventScroll:!0})}getActiveCell(){return{...this.active}}setActiveCell(e,t){this.moveTo({row:e,column:t},!1)}destroy(){if(this.observer?.disconnect(),this.filterTimer)clearTimeout(this.filterTimer);for(let e of this.disposers)e();this.header.replaceChildren(),this.body.replaceChildren(),this.slots.clear(),this.pool.length=0,this.root.removeAttribute("data-dg-ready")}refresh(){let e=this.model;this.content.style.width=`${e.totalWidth}px`,this.content.style.height=`${this.headerHeight+e.count*this.rowHeight}px`,this.header.style.width=`${e.totalWidth}px`,this.body.style.height=`${e.count*this.rowHeight}px`,this.scroller.setAttribute("aria-rowcount",String(e.count+1)),this.scroller.setAttribute("aria-colcount",String(e.columns.length)),this.root.toggleAttribute("data-empty",e.count===0),this.stale=!0,this.render(),this.paintStatus()}render(){let e=this.model,t=this.scroller,s=$s(t.scrollTop,Math.max(0,t.clientHeight-this.headerHeight),this.rowHeight,e.count,this.overscan),a=e.columnRange(t.scrollLeft,t.clientWidth,this.columnOverscan),n=this.stale||a.start!==this.cols.start||a.end!==this.cols.end;if(!n&&s.start===this.rows.start&&s.end===this.rows.end)return;if(this.rows=s,this.cols=a,n)this.renderHeader();for(let[o,i]of this.slots)if(o<s.start||o>=s.end)this.slots.delete(o),i.index=-1,i.el.style.display="none",this.pool.push(i);for(let o=s.start;o<s.end;o++){let i=this.slots.get(o);if(i){if(n)this.fill(i);continue}i=this.pool.pop()??this.createSlot(),i.index=o,i.el.style.display="",this.slots.set(o,i),this.fill(i)}this.stale=!1,this.paintActive()}createSlot(){let e=document.createElement("div");return e.className="stx-dg-row",e.setAttribute("role","row"),this.body.appendChild(e),{el:e,index:-1,cells:[]}}fill(e){let t=this.model,s=e.index,a=t.rowAt(s),n=this.selectable&&t.isSelected(s),o=e.el;if(o.__dgRow=s,o.style.transform=`translateY(${s*this.rowHeight}px)`,o.setAttribute("aria-rowindex",String(s+2)),this.selectable)o.setAttribute("aria-selected",n?"true":"false");let i=this.cols.end-this.cols.start;while(e.cells.length<i){let r=document.createElement("div");r.className="stx-dg-cell",r.setAttribute("role","gridcell"),r.appendChild(document.createTextNode("")),o.appendChild(r),e.cells.push(r)}while(e.cells.length>i)e.cells.pop().remove();for(let r=0;r<i;r++){let c=this.cols.start+r,l=t.columns[c],d=e.cells[r],u=a===void 0?void 0:ne(a,l),p=ys(u);if(d.__dgColumn=c,d.id=`${this.prefix}-r${s}-c${c}`,d.style.left=`${t.offsetOf(c)}px`,d.style.width=`${l.width}px`,d.setAttribute("aria-colindex",String(c+1)),d.setAttribute("data-type",l.type),d.setAttribute("data-align",l.align),p==="value")d.removeAttribute("data-empty");else d.setAttribute("data-empty",p);if(this.selectable)d.setAttribute("aria-selected",n?"true":"false");d.firstChild.data=typeof u==="string"?u:Ie(u,l.type)}}renderHeader(){let e=this.model,t=this.cols.end-this.cols.start;while(this.headerCells.length<t){let s=document.createElement("div");s.className="stx-dg-head",s.setAttribute("role","columnheader");let a=document.createElement("span");a.className="stx-dg-head-label",a.appendChild(document.createTextNode(""));let n=document.createElement("span");n.className="stx-dg-sort",n.setAttribute("aria-hidden","true"),n.appendChild(document.createTextNode(""));let o=document.createElement("span");o.className="stx-dg-resize",o.setAttribute("aria-hidden","true"),s.append(a,n,o),this.header.appendChild(s),this.headerCells.push(s)}while(this.headerCells.length>t)this.headerCells.pop().remove();for(let s=0;s<t;s++){let a=this.cols.start+s,n=e.columns[a],o=this.headerCells[s],i=e.sortOf(n.key);if(o.__dgColumn=a,o.id=`${this.prefix}-h-c${a}`,o.style.left=`${e.offsetOf(a)}px`,o.style.width=`${n.width}px`,o.setAttribute("aria-colindex",String(a+1)),o.setAttribute("data-align",n.align),o.toggleAttribute("data-sortable",n.sortable),n.sortable)o.setAttribute("aria-sort",i?i.direction==="asc"?"ascending":"descending":"none");else o.removeAttribute("aria-sort");o.children[0].firstChild.data=n.label,o.children[1].firstChild.data=i?`${i.direction==="asc"?"\u25B2":"\u25BC"}${e.sort.length>1?i.priority:""}`:""}}cellElement(e){if(e.column<this.cols.start||e.column>=this.cols.end)return null;let t=e.column-this.cols.start;if(e.row<0)return this.headerCells[t]??null;return this.slots.get(e.row)?.cells[t]??null}paintActive(){let e=this.cellElement(this.active);if(this.activeEl&&this.activeEl!==e)this.activeEl.removeAttribute("data-active");if(this.activeEl=e,e)e.setAttribute("data-active",""),this.scroller.setAttribute("aria-activedescendant",e.id);else this.scroller.removeAttribute("aria-activedescendant")}paintSelection(){if(!this.selectable)return;for(let[e,t]of this.slots){let s=this.model.isSelected(e)?"true":"false";t.el.setAttribute("aria-selected",s);for(let a of t.cells)a.setAttribute("aria-selected",s)}this.paintStatus()}paintStatus(){if(!this.status)return;let e=this.model,t=e.rows.length,s=e.count===t?`${qe.format(t)} ${t===1?"row":"rows"}`:`${qe.format(e.count)} of ${qe.format(t)} rows`;if(e.selected.size>0)s+=`, ${qe.format(e.selected.size)} selected`;if(this.status.textContent!==s)this.status.textContent=s}revealRow(e){let t=this.scroller,s=e*this.rowHeight,a=t.clientHeight-this.headerHeight;if(s<t.scrollTop)t.scrollTop=s;else if(s+this.rowHeight>t.scrollTop+a)t.scrollTop=s+this.rowHeight-a}revealColumn(e){let t=this.scroller,s=this.model.offsetOf(e),a=this.model.offsetOf(e+1);if(s<t.scrollLeft)t.scrollLeft=s;else if(a>t.scrollLeft+t.clientWidth)t.scrollLeft=Math.min(s,a-t.clientWidth)}detail(e){return{row:this.model.rowAt(e.row),rowIndex:e.row,column:this.model.columns[e.column],value:e.row<0?void 0:this.model.valueAt(e.row,e.column)}}moveTo(e,t=!0){let s=this.model,a={row:Math.max(-1,Math.min(s.count-1,e.row)),column:Math.max(0,Math.min(s.columns.length-1,e.column))};if(this.active=a,a.row>=0)this.revealRow(a.row);if(this.revealColumn(a.column),this.render(),this.paintActive(),t)this.callbacks.onCell?.(this.detail(a))}reportSelection(){this.callbacks.onSelect?.(this.getSelection())}applyFilter(e){let t=this.model.setFilter(e);this.active={row:Math.min(0,t-1),column:this.active.column},this.scroller.scrollTop=0,this.refresh(),this.callbacks.onFilter?.({text:e,count:t})}sortBy(e,t){let s=this.model.columns[e];if(!s||!s.sortable)return;let a=this.model.toggleSort(s.key,t);this.refresh(),this.callbacks.onSort?.([...a])}setColumnWidth(e,t){this.model.resizeColumn(e,t),this.content.style.width=`${this.model.totalWidth}px`,this.header.style.width=`${this.model.totalWidth}px`,this.stale=!0,this.render()}copy(e){if(this.active.row<0)return;let t=this.model.rowAt(this.active.row);if(t===void 0)return;let s=e==="row"?Cs(t,this.model.columns):ks(this.model.valueAt(this.active.row,this.active.column));ci(s),this.callbacks.onCopy?.({what:e,text:s})}listen(e,t,s){e.addEventListener(t,s),this.disposers.push(()=>e.removeEventListener(t,s))}cellFrom(e){let s=e.target?.closest(".stx-dg-cell"),a=s?.parentElement;if(!s||!a||s.__dgColumn===void 0||a.__dgRow===void 0)return null;return{row:a.__dgRow,column:s.__dgColumn}}headFrom(e){let t=e.target,s=t?.closest(".stx-dg-head");if(!s||s.__dgColumn===void 0)return null;let a=t.closest(".stx-dg-resize");return{column:s.__dgColumn,onHandle:Boolean(a),handle:a}}onBodyClick(e){let t=this.cellFrom(e);if(!t)return;if(this.selectable)this.model.select(t.row,e.shiftKey?"range":e.metaKey||e.ctrlKey?"toggle":"replace"),this.paintSelection(),this.reportSelection();this.moveTo(t)}onBodyDoubleClick(e){let t=this.cellFrom(e),s=t?this.model.rowAt(t.row):void 0;if(t&&s!==void 0)this.callbacks.onActivate?.({row:s,rowIndex:t.row})}onContextMenu(e){let t=this.cellFrom(e);if(!t)return;if(this.contextMenu)e.preventDefault();this.moveTo(t,!1),this.callbacks.onContext?.({...this.detail(t),x:e.clientX,y:e.clientY})}onHeaderClick(e){let t=this.headFrom(e);if(!t||t.onHandle)return;this.active={row:-1,column:t.column},this.sortBy(t.column,e.shiftKey)}onHeaderDoubleClick(e){let t=this.headFrom(e);if(t&&t.onHandle)this.setColumnWidth(t.column,this.model.autoWidth(t.column))}onResizeStart(e){let t=this.headFrom(e);if(!t||!t.onHandle||!t.handle||e.button!==0)return;e.preventDefault();try{t.handle.setPointerCapture(e.pointerId)}catch{}this.resize={column:t.column,start:e.clientX,width:this.model.columns[t.column].width,pointer:e.pointerId,handle:t.handle},this.root.setAttribute("data-resizing","")}onResizeMove(e){let t=this.resize;if(!t||e.pointerId!==t.pointer)return;this.setColumnWidth(t.column,t.width+e.clientX-t.start)}onResizeEnd(e){let t=this.resize;if(!t||e.pointerId!==t.pointer)return;this.resize=null,this.root.removeAttribute("data-resizing");try{t.handle.releasePointerCapture(e.pointerId)}catch{}}onFilterInput(){if(this.filterTimer)clearTimeout(this.filterTimer);this.filterTimer=setTimeout(()=>{this.filterTimer=null,this.applyFilter(this.filterInput?this.filterInput.value:"")},li)}onKeyDown(e){if(e.target!==this.scroller)return;let t=this.model,s=e.metaKey||e.ctrlKey,a=this.active.row<0,n=e.key;if(s&&(n==="a"||n==="A")){if(!this.selectable)return;e.preventDefault(),t.selectAll(),this.paintSelection(),this.reportSelection();return}if(s&&(n==="c"||n==="C")){if(a)return;e.preventDefault(),this.copy(e.shiftKey?"row":"cell");return}if(a&&e.altKey&&(n==="ArrowLeft"||n==="ArrowRight")){e.preventDefault();let r=t.columns[this.active.column];if(r)this.setColumnWidth(this.active.column,r.width+(n==="ArrowRight"?this.resizeStep:-this.resizeStep));this.paintActive();return}if(n==="Enter"||n===" "){if(e.preventDefault(),a){this.sortBy(this.active.column,e.shiftKey);return}if(n===" "){if(!this.selectable)return;t.select(this.active.row,"toggle"),this.paintSelection(),this.reportSelection();return}let r=t.rowAt(this.active.row);if(r!==void 0)this.callbacks.onActivate?.({row:r,rowIndex:this.active.row});return}if(n==="Escape"&&this.selectable&&t.selected.size>0){e.preventDefault(),this.clearSelection();return}let o=Math.max(1,Math.floor((this.scroller.clientHeight-this.headerHeight)/this.rowHeight)-1),i=Ts(this.active,n,{rows:t.count,columns:t.columns.length,page:o,mod:s});if(i===this.active)return;if(e.preventDefault(),i.row===this.active.row&&i.column===this.active.column)return;if(e.shiftKey&&this.selectable&&i.row>=0&&i.row!==this.active.row){if(t.selected.size===0&&this.active.row>=0)t.select(this.active.row,"replace");t.select(i.row,"range"),this.paintSelection(),this.reportSelection()}this.moveTo(i)}}var ui="./Dialog-wm7zjqnb.stx";var fi="./DialogBackdrop-de5m5m4w.stx";var gi="./DialogDescription-yd2jgt2m.stx";var bi="./DialogPanel-aav3werz.stx";var wi="./DialogTitle-nw0pw114.stx";var ki="./Drawer-p4vgvyd5.stx";var Ci="./Dropdown-hb8ks69x.stx";var Ti="./DropdownButton-wxc25hsy.stx";var Ii="./DropdownItem-af0vzc8a.stx";var Pi="./DropdownItems-bkz7jkyz.stx";var Ri="./Form-cybgg9ym.stx";var Ni={action:f.string,method:f.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:f.object,initialValues:f.object,validateOnChange:f.boolean,validateOnBlur:f.boolean,onSubmit:f.func,onError:f.func,className:f.string},hg=ae("Form",Ni);var Di="./FileDrop-p9wqdx75.stx";var Es=(e)=>Math.round(e*100)/100,Q=(e)=>`${Es(e.x)} ${Es(e.y)}`;function Is(e,t,s){let a=s.x-e.x,n=s.y-e.y;if(a===0&&n===0)return{x:e.x,y:e.y};let o=a===0?Number.POSITIVE_INFINITY:t.width/2/Math.abs(a),i=n===0?Number.POSITIVE_INFINITY:t.height/2/Math.abs(n),r=Math.min(o,i);return{x:e.x+a*r,y:e.y+n*r}}function As(e,t,s){let a=e.x-t.x,n=e.y-t.y,o=Math.sqrt(a*a+n*n);if(s<=0||o<=s)return e;return{x:e.x-a/o*s,y:e.y-n/o*s}}function Oi(e,t,s=0){let a=26+Math.abs(s),n={x:e.x+t.width/4,y:e.y-t.height/2},o={x:e.x+t.width/2,y:e.y-t.height/4},i={x:n.x,y:n.y-a},r={x:o.x+a,y:o.y};return{d:`M ${Q(n)} C ${Q(i)}, ${Q(r)}, ${Q(o)}`,start:n,end:o,label:Ps(n,i,r,o,0.5),angle:Math.atan2(o.y-r.y,o.x-r.x)}}function Ps(e,t,s,a,n){let o=1-n;return{x:o*o*o*e.x+3*o*o*n*t.x+3*o*n*n*s.x+n*n*n*a.x,y:o*o*o*e.y+3*o*o*n*t.y+3*o*n*n*s.y+n*n*n*a.y}}function Ms(e,t={}){let{source:s,sourceSize:a,target:n,targetSize:o}=e,i=t.offset??0,r=t.inset??0;if(s.x===n.x&&s.y===n.y)return Oi(s,a,i);if(t.curve==="bezier"){let w=t.direction!=="TB",y=(w?n.x-s.x:n.y-s.y)>=0?1:-1,v=w?{x:s.x+y*a.width/2,y:s.y}:{x:s.x,y:s.y+y*a.height/2},b=w?{x:n.x-y*o.width/2,y:n.y}:{x:n.x,y:n.y-y*o.height/2},C=Math.abs(w?b.x-v.x:b.y-v.y),P=Math.max(C/2,24)*y,T=w?{x:b.x-y*r,y:b.y}:{x:b.x,y:b.y-y*r},F=w?{x:v.x+P,y:v.y+i}:{x:v.x+i,y:v.y+P},V=w?{x:T.x-P,y:T.y+i}:{x:T.x+i,y:T.y-P};return{d:`M ${Q(v)} C ${Q(F)}, ${Q(V)}, ${Q(T)}`,start:v,end:T,label:Ps(v,F,V,T,0.5),angle:Math.atan2(T.y-V.y,T.x-V.x)}}let c=Is(s,a,n),l=Is(n,o,s);if(i===0){let w=As(l,c,r);return{d:`M ${Q(c)} L ${Q(w)}`,start:c,end:w,label:{x:(c.x+w.x)/2,y:(c.y+w.y)/2},angle:Math.atan2(w.y-c.y,w.x-c.x)}}let d=s.x<n.x||s.x===n.x&&s.y<n.y?1:-1,u=(n.x-s.x)*d,p=(n.y-s.y)*d,h=Math.sqrt(u*u+p*p)||1,g={x:(c.x+l.x)/2+-p/h*i*2,y:(c.y+l.y)/2+u/h*i*2},m=As(l,g,r);return{d:`M ${Q(c)} Q ${Q(g)}, ${Q(m)}`,start:c,end:m,label:{x:0.25*c.x+0.5*g.x+0.25*m.x,y:0.25*c.y+0.5*g.y+0.25*m.y},angle:Math.atan2(m.y-g.y,m.x-g.x)}}function Rs(e,t=14){let s=new Map;for(let n of e){let o=n.source<n.target?`${n.source}\x00${n.target}`:`${n.target}\x00${n.source}`,i=s.get(o);if(i)i.push(n);else s.set(o,[n])}let a=new Map;for(let n of s.values()){if(n.length<2)continue;n.forEach((o,i)=>{let r=(i-(n.length-1)/2)*t;a.set(o.id,o.source===o.target?i*t:r)})}return a}var Tt={charWidth:7,paddingX:12,minWidth:48,maxWidth:220,height:32,detailHeight:14};function oe(e){return e.label==null||e.label===""?e.id:String(e.label)}function Ns(e){return e.id!=null&&e.id!==""?String(e.id):`${e.source}->${e.target}${e.label?`:${e.label}`:""}`}function Ls(e,t=Tt){let s=Math.max(oe(e).length,e.detail?e.detail.length*0.85:0),a=e.expandable===!0?t.charWidth+4:0;return{width:Math.min(t.maxWidth,Math.max(t.minWidth,Math.ceil(s*t.charWidth)+t.paddingX*2+a)),height:t.height+(e.detail?t.detailHeight:0)}}function Ds(e=Tt){return Math.floor((e.maxWidth-e.paddingX*2)/e.charWidth)}function We(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-1))}\u2026`}class Ge{metrics;nodeMap=new Map;edgeMap=new Map;incident=new Map;sizes=new Map;constructor(e=[],t=[],s=Tt){this.metrics=s;this.merge(e,t)}get nodes(){return[...this.nodeMap.values()]}get edges(){return[...this.edgeMap.values()]}get nodeCount(){return this.nodeMap.size}get edgeCount(){return this.edgeMap.size}has(e){return this.nodeMap.has(e)}node(e){return this.nodeMap.get(e)}edge(e){return this.edgeMap.get(e)}addNode(e){if(!e||e.id==null||e.id==="")return!1;let t=String(e.id);if(this.nodeMap.has(t))return!1;let s={...e,id:t};return this.nodeMap.set(t,s),this.incident.set(t,new Set),this.sizes.set(t,Ls(s,this.metrics)),!0}addEdge(e){if(!e)return!1;let t=String(e.source),s=String(e.target);if(!this.nodeMap.has(t)||!this.nodeMap.has(s))return!1;let a=Ns({...e,source:t,target:s});if(this.edgeMap.has(a))return!1;return this.edgeMap.set(a,{...e,id:a,source:t,target:s}),this.incident.get(t).add(a),this.incident.get(s).add(a),!0}updateNode(e,t){let s=this.nodeMap.get(e);if(!s)return!1;let a={...s,...t,id:e};return this.nodeMap.set(e,a),this.sizes.set(e,Ls(a,this.metrics)),!0}removeNode(e){if(!this.nodeMap.has(e))return!1;for(let t of[...this.incident.get(e)])this.removeEdge(t);return this.nodeMap.delete(e),this.incident.delete(e),this.sizes.delete(e),!0}removeEdge(e){let t=this.edgeMap.get(e);if(!t)return!1;return this.edgeMap.delete(e),this.incident.get(t.source)?.delete(e),this.incident.get(t.target)?.delete(e),!0}merge(e=[],t=[]){let s={nodes:[],edges:[]};for(let a of e)if(this.addNode(a))s.nodes.push(String(a.id));for(let a of t)if(this.addEdge(a))s.edges.push(Ns({...a,source:String(a.source),target:String(a.target)}));return s}edgesOf(e){let t=this.incident.get(e);return t?[...t].map((s)=>this.edgeMap.get(s)):[]}neighbours(e){let t=new Set;for(let s of this.edgesOf(e)){let a=s.source===e?s.target:s.source;if(a!==e)t.add(a)}return[...t]}degree(e){return this.neighbours(e).length}size(e){return this.sizes.get(e)??{width:this.metrics.minWidth,height:this.metrics.height}}bounds(e){let{POSITIVE_INFINITY:t,POSITIVE_INFINITY:s,NEGATIVE_INFINITY:a,NEGATIVE_INFINITY:n}=Number;for(let[o,i]of e){if(!this.nodeMap.has(o))continue;let r=this.size(o);t=Math.min(t,i.x-r.width/2),a=Math.max(a,i.x+r.width/2),s=Math.min(s,i.y-r.height/2),n=Math.max(n,i.y+r.height/2)}return Number.isFinite(t)?{x:t,y:s,width:a-t,height:n-s}:null}}function Os(e){let t=e>>>0||1;return()=>{t=t+1831565813>>>0;let s=t;return s=Math.imul(s^s>>>15,s|1),s^=s+Math.imul(s^s>>>7,s|61),((s^s>>>14)>>>0)/4294967296}}var zi=0.15,zs=0.06;function Hs(e,t={}){let s=e.nodes,a=s.length,n=new Map;if(a===0)return n;let o=t.linkDistance??90,i=t.padding??16,r=Os(t.seed??1),c=t.positions??null,l=new Set(t.pinned??[]),d=new Map(s.map((R,N)=>[R.id,N])),u=new Float64Array(a),p=new Float64Array(a),h=new Float64Array(a),g=new Float64Array(a),m=new Uint8Array(a),w=new Uint8Array(a),y=new Float64Array(a).fill(1),v=0;s.forEach((R,N)=>{let E=e.size(R.id);h[N]=E.width/2,g[N]=E.height/2;let M=c?.get(R.id);if(M&&Number.isFinite(M.x)&&Number.isFinite(M.y))u[N]=M.x,p[N]=M.y,w[N]=1,m[N]=l.has(R.id)?1:0,y[N]=0,v++});let b=o*Math.sqrt(a)*0.6;s.forEach((R,N)=>{if(w[N])return;let E=e.neighbours(R.id).map((k)=>d.get(k)).find((k)=>w[k]),M=r()*Math.PI*2;if(E!==void 0)u[N]=u[E]+Math.cos(M)*o*0.5,p[N]=p[E]+Math.sin(M)*o*0.5;else{let k=Math.sqrt(r())*b;u[N]=Math.cos(M)*k,p[N]=Math.sin(M)*k}});let C=Uint8Array.from(w),P=v>0,T=Math.max(0,t.iterations??(P?80:300)),F=[],V=new Set;for(let R of e.edges){let N=d.get(R.source),E=d.get(R.target);if(N===E)continue;let M=N<E?N*a+E:E*a+N;if(!V.has(M))V.add(M),F.push(N,E)}let j=new Float64Array(a),x=new Float64Array(a),S=o,L=P?S*0.5:S*1.5;for(let R=0;R<T;R++){let N=L*(1-R/T);j.fill(0),x.fill(0);for(let E=0;E<a;E++)for(let M=E+1;M<a;M++){if(C[E]&&C[M])continue;let k=u[E]-u[M],O=p[E]-p[M],D=Math.sqrt(k*k+O*O);if(D<0.01){let K=(E*31+M*17)%360*Math.PI/180;k=Math.cos(K)*0.01,O=Math.sin(K)*0.01,D=0.01}let Y=Math.max(1,D-(h[E]+h[M])*0.5),H=S*S*zi/Y/D;j[E]+=k*H,x[E]+=O*H,j[M]-=k*H,x[M]-=O*H}for(let E=0;E<F.length;E+=2){let M=F[E],k=F[E+1];if(C[M]&&C[k])continue;let O=u[M]-u[k],D=p[M]-p[k],Y=Math.sqrt(O*O+D*D)||0.01,H=(h[M]+h[k])*0.5,K=Math.max(0,Y-H),te=K*K/S/Y;j[M]-=O*te,x[M]-=D*te,j[k]+=O*te,x[k]+=D*te}for(let E=0;E<a;E++){if(m[E])continue;if(!C[E])j[E]-=u[E]*zs,x[E]-=p[E]*zs;let M=Math.sqrt(j[E]*j[E]+x[E]*x[E]);if(M>0){let k=Math.min(M,N)/M*y[E];u[E]+=j[E]*k,p[E]+=x[E]*k}}}return Hi(u,p,h,g,m,i),s.forEach((R,N)=>{n.set(R.id,{x:Math.round(u[N]*100)/100,y:Math.round(p[N]*100)/100})}),n}function Hi(e,t,s,a,n,o){let i=e.length;for(let r=0;r<40;r++){let c=!1;for(let l=0;l<i;l++)for(let d=l+1;d<i;d++){let u=s[l]+s[d]+o-Math.abs(e[l]-e[d]);if(u<=0)continue;let p=a[l]+a[d]+o-Math.abs(t[l]-t[d]);if(p<=0)continue;if(n[l]&&n[d])continue;c=!0;let h=n[l]?0:n[d]?1:0.5,g=1-h;if(u<p){let m=e[l]<e[d]||e[l]===e[d]&&l<d?-1:1;e[l]+=m*u*h,e[d]-=m*u*g}else{let m=t[l]<t[d]||t[l]===t[d]&&l<d?-1:1;t[l]+=m*p*h,t[d]-=m*p*g}}if(!c)break}}function Fi(e){let t=new Set,s=[];for(let n of e.nodes){if(t.has(n.id))continue;let o=[],i=[n.id];t.add(n.id);while(i.length){let r=i.shift();o.push(r);for(let c of e.neighbours(r))if(!t.has(c))t.add(c),i.push(c)}s.push(o)}let a=new Map(e.nodes.map((n,o)=>[n.id,o]));for(let n of s)n.sort((o,i)=>a.get(o)-a.get(i));return s}function Vi(e){let t=new Map;for(let n of e.nodes)t.set(n.id,[]);for(let n of e.edges)if(n.source!==n.target)t.get(n.source).push({id:n.id,to:n.target});let s=new Set,a=new Map;for(let n of e.nodes){if(a.has(n.id))continue;let o=[{id:n.id,next:0}];a.set(n.id,1);while(o.length){let i=o[o.length-1],r=t.get(i.id);if(i.next>=r.length){a.set(i.id,2),o.pop();continue}let c=r[i.next++],l=a.get(c.to);if(l===1)s.add(c.id);else if(l===void 0)a.set(c.to,1),o.push({id:c.to,next:0})}}return s}function Fs(e,t){let s=e.map((n)=>[t.get(n.from),t.get(n.to)]).sort((n,o)=>n[0]-o[0]||n[1]-o[1]),a=0;for(let n=0;n<s.length;n++)for(let o=n+1;o<s.length;o++)if(s[n][0]<s[o][0]&&s[n][1]>s[o][1])a++;return a}function Vs(e,t={}){let s=t.direction==="TB"?"TB":"LR",a=t.nodeGap??24,n=t.layerGap??80,o=t.componentGap??48,i=t.sweeps??4,r=s==="LR",c=Vi(e),l=[],d=new Set;for(let b of e.edges){if(b.source===b.target)continue;let C=c.has(b.id)?b.target:b.source,P=c.has(b.id)?b.source:b.target,T=`${C}\x00${P}`;if(!d.has(T))d.add(T),l.push({from:C,to:P})}let u=new Map,p=new Map;for(let b of e.nodes)u.set(b.id,[]),p.set(b.id,[]);for(let b of l)u.get(b.from).push(b.to),p.get(b.to).push(b.from);let h=new Map,g=new Map,m=[];for(let b of e.nodes)if(g.set(b.id,p.get(b.id).length),p.get(b.id).length===0)m.push(b.id),h.set(b.id,0);for(let b=0;b<m.length;b++){let C=m[b];for(let P of u.get(C)){h.set(P,Math.max(h.get(P)??0,h.get(C)+1));let T=g.get(P)-1;if(g.set(P,T),T===0)m.push(P)}}let w=new Map,y=[],v=0;for(let b of Fi(e)){let C=[];for(let k of b){let O=h.get(k)??0;while(C.length<=O)C.push([]);C[O].push(k)}let P=new Set(b),T=l.filter((k)=>P.has(k.from)&&h.get(k.to)-h.get(k.from)===1),F=new Map,V=()=>{for(let k of C)k.forEach((O,D)=>F.set(O,k.length>1?D/(k.length-1):0.5))},j=(k,O)=>{let D=new Map;k.forEach((H,K)=>{let te=O.get(H),De=k.length>1?K/(k.length-1):0.5;D.set(H,te.length?te.reduce((mt,Oe)=>mt+F.get(Oe),0)/te.length:De)});let Y=new Map(k.map((H,K)=>[H,K]));k.sort((H,K)=>D.get(H)-D.get(K)||Y.get(H)-Y.get(K)),k.forEach((H,K)=>F.set(H,k.length>1?K/(k.length-1):0.5))};V();let x=C.map((k)=>[...k]),S=Fs(T,F);for(let k=0;k<i&&S>0;k++){for(let D=1;D<C.length;D++)j(C[D],p);for(let D=C.length-2;D>=0;D--)j(C[D],u);let O=Fs(T,F);if(O<S)S=O,x=C.map((D)=>[...D])}let L=(k)=>r?e.size(k).width:e.size(k).height,R=(k)=>r?e.size(k).height:e.size(k).width,N=x.map((k)=>k.reduce((O,D)=>O+R(D),0)+a*Math.max(0,k.length-1)),E=Math.max(0,...N),M=0;x.forEach((k,O)=>{let D=Math.max(0,...k.map(L)),Y=v+(E-N[O])/2;for(let H of k){let K=Y+R(H)/2;w.set(H,r?{x:M+D/2,y:K}:{x:K,y:M+D/2}),Y+=R(H)+a}M+=D+n}),y.push(x),v+=E+o}return{positions:w,layerOf:h,reversed:c,components:y,bounds:e.bounds(w)}}var ji={x:0,y:0,k:1};function js(e,t,s){return Math.min(Math.max(e,t),s)}function Cg(e,t){return{x:t.x*e.k+e.x,y:t.y*e.k+e.y}}function Et(e,t){return{x:(t.x-e.x)/e.k,y:(t.y-e.y)/e.k}}function Ue(e,t,s){return{x:e.x+t,y:e.y+s,k:e.k}}function Bs(e,t,s,a=0.1,n=4){let o=js(e.k*s,a,n),i=o/e.k;return{x:t.x-(t.x-e.x)*i,y:t.y-(t.y-e.y)*i,k:o}}function _s(e,t,s=24,a=0.1,n=1){if(!e||t.width<=0||t.height<=0)return{...ji};let o=Math.max(1,t.width-s*2),i=Math.max(1,t.height-s*2),r=js(Math.min(o/Math.max(1,e.width),i/Math.max(1,e.height)),a,n);return{x:t.width/2-(e.x+e.width/2)*r,y:t.height/2-(e.y+e.height/2)*r,k:r}}function Ks(e,t,s){return{x:s.width/2-t.x*e.k,y:s.height/2-t.y*e.k,k:e.k}}function qs(e,t,s,a=16){let n=t.x*e.k+e.x,o=t.y*e.k+e.y,i=n+t.width*e.k,r=o+t.height*e.k,c=0,l=0;if(n<a)c=a-n;else if(i>s.width-a)c=s.width-a-i;if(o<a)l=a-o;else if(r>s.height-a)l=s.height-a-r;return c===0&&l===0?e:Ue(e,c,l)}function Ws(e,t,s){let a=e.get(t);if(!a)return null;let n=s==="left"?-1:s==="right"?1:0,o=s==="up"?-1:s==="down"?1:0,i=null,r=Number.POSITIVE_INFINITY;for(let[c,l]of e){if(c===t)continue;let d=l.x-a.x,u=l.y-a.y,p=d*n+u*o;if(p<=0.5)continue;let h=Math.abs(d*o)+Math.abs(u*n);if(h>p*2)continue;let g=p+h*2;if(g<r)r=g,i=c}return i}function Gs(e,t){let s=null,a=Number.POSITIVE_INFINITY;for(let[n,o]of e){let i=(o.x-t.x)**2+(o.y-t.y)**2;if(i<a)a=i,s=n}return s}function $g(e,t,s){let a=null;for(let[n,o]of t){let i=e.size(n);if(Math.abs(s.x-o.x)<=i.width/2&&Math.abs(s.y-o.y)<=i.height/2)a=n}return a}var _i="./GraphView-0t3t9mec.stx";var Ki="http://www.w3.org/2000/svg",Us=3,Js=350,qi=240,Wi=6.2;function q(e,t={}){let s=document.createElementNS(Ki,e);for(let a in t)s.setAttribute(a,String(t[a]));return s}var Gi=0;class Ui{root;callbacks;timings={layout:0,render:0};model=new Ge;positions=new Map;shown=new Map;pinned=new Set;view={x:0,y:0,k:1};size={width:0,height:0};layoutName;direction;selected=null;autoFit=!0;animate;minZoom;maxZoom;contextMenu;prefix;surface;status;svg;stage;edgeLayer;nodeLayer;labelLayer;nodeEls=new Map;edgeEls=new Map;idOf=new WeakMap;offsets=new Map;serial=0;gesture=null;pinch=null;lastClick={id:"",at:0};lastExpand=0;frame=0;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.prefix=`${e.id||"graph"}-${++Gi}`,this.layoutName=t.layout==="force"?"force":"layered",this.direction=t.direction==="TB"?"TB":"LR",this.minZoom=t.minZoom??0.1,this.maxZoom=t.maxZoom??4,this.contextMenu=Boolean(t.contextMenu),this.animate=t.animate!==!1,this.surface=e.querySelector('[data-gv="surface"]')??e,this.status=e.querySelector('[data-gv="status"]'),t.label)this.surface.setAttribute("aria-label",t.label);this.svg=q("svg",{class:"stx-gv-svg","aria-hidden":"false",focusable:"false"}),this.svg.__stx_inert_content=!0;let a=q("defs");for(let n of["arrow","arrow-active"]){let o=q("marker",{id:`${this.prefix}-${n}`,viewBox:"0 0 10 10",refX:9,refY:5,markerWidth:7,markerHeight:7,orient:"auto-start-reverse",class:`stx-gv-${n}`});o.append(q("path",{d:"M 0 0 L 10 5 L 0 10 z"})),a.append(o)}if(this.stage=q("g",{class:"stx-gv-stage"}),this.edgeLayer=q("g",{class:"stx-gv-edges"}),this.nodeLayer=q("g",{class:"stx-gv-nodes"}),this.labelLayer=q("g",{class:"stx-gv-edge-labels"}),this.stage.append(this.edgeLayer,this.nodeLayer,this.labelLayer),this.svg.append(a,this.stage),this.surface.append(this.svg),this.listen(),this.measure(),this.setGraph(t.nodes??[],t.edges??[]),t.selected)this.select(t.selected,{silent:!0});if(typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>{if(this.measure(),this.autoFit)this.fit()}),this.observer.observe(this.surface);e.setAttribute("data-gv-ready","")}graph(){return this.model}getViewport(){return{...this.view}}getLayout(){return this.layoutName}getSelected(){return this.selected}getPositions(){return Object.fromEntries([...this.positions].map(([e,t])=>[e,{...t}]))}setGraph(e,t){if(this.stop(),this.model=new Ge(e??[],t??[]),this.positions=new Map,this.pinned.clear(),this.selected&&!this.model.has(this.selected))this.selected=null;this.layout(!1),this.shown=new Map(this.positions),this.render(),this.autoFit=!0,this.fit(),this.mark()}addNeighbours(e,t,s){let a=this.model.merge(t??[],s??[]);if(a.nodes.length===0&&a.edges.length===0)return a;let n=this.shown.get(e)??this.positions.get(e)??Et(this.view,{x:this.size.width/2,y:this.size.height/2});for(let o of a.nodes)this.shown.set(o,{...n});if(this.layout(!0),this.sync(),this.moveToPlace(),this.mark(),a.nodes.length)this.announce(`${a.nodes.length} ${a.nodes.length===1?"node":"nodes"} added${this.model.has(e)?` to ${oe(this.model.node(e))}`:""}`);return a}updateNode(e,t){if(!this.model.updateNode(e,t))return;let s=this.nodeEls.get(e);if(s)s.remove(),this.nodeEls.delete(e);this.sync(),this.draw(),this.mark()}setLayout(e){let t=e==="force"?"force":"layered";if(t===this.layoutName)return;this.layoutName=t,this.relayout(),this.callbacks.onLayout?.({layout:t})}setDirection(e){let t=e==="TB"?"TB":"LR";if(t===this.direction)return;if(this.direction=t,this.layoutName==="layered")this.relayout()}select(e,t={}){let s=e!=null&&this.model.has(e)?e:null;if(s===this.selected)return;if(this.selected=s,this.mark(),s)this.describe(s);if(!t.silent)this.callbacks.onSelect?.(this.selection())}focusNode(e){if(!this.model.has(e))return;this.select(e);let t=this.positions.get(e);if(t)this.autoFit=!1,this.setView(Ks(this.view,t,this.size))}fit(){this.measure(),this.setView(_s(this.model.bounds(this.positions),this.size,32,this.minZoom,Math.min(1,this.maxZoom))),this.autoFit=!0}zoomIn(){this.zoomBy(1.25)}zoomOut(){this.zoomBy(0.8)}zoomBy(e,t){this.autoFit=!1,this.setView(Bs(this.view,t??{x:this.size.width/2,y:this.size.height/2},e,this.minZoom,this.maxZoom))}panBy(e,t){this.autoFit=!1,this.setView(Ue(this.view,e,t))}setZoomLimits(e,t){this.minZoom=e,this.maxZoom=t}destroy(){this.stop(),this.observer?.disconnect();for(let e of this.disposers)e();this.svg.remove(),this.root.removeAttribute("data-gv-ready")}selection(){let e=this.selected?this.model.node(this.selected)??null:null;return{node:e,neighbours:e?this.model.neighbours(e.id).map((t)=>this.model.node(t)):[]}}measure(){let e=this.surface.getBoundingClientRect();this.size={width:e.width,height:e.height}}layout(e){let t=performance.now();if(this.layoutName==="layered")this.positions=Vs(this.model,{direction:this.direction}).positions;else this.positions=Hs(this.model,{positions:e&&this.positions.size?this.positions:null,pinned:e?this.pinned:null});this.timings.layout=performance.now()-t}relayout(){if(this.pinned.clear(),this.layout(!1),this.sync(),this.moveToPlace(),this.autoFit)this.fit()}render(){let e=performance.now();this.sync(),this.draw(),this.timings.render=performance.now()-e}sync(){let e=Ds(this.model.metrics);for(let[t,s]of this.nodeEls)if(!this.model.has(t))s.remove(),this.nodeEls.delete(t);for(let t of this.model.nodes){let s=this.nodeEls.get(t.id);if(!s)s=this.buildNode(t,e),this.nodeEls.set(t.id,s),this.idOf.set(s,t.id),this.nodeLayer.append(s);let a=this.model.degree(t.id);s.setAttribute("aria-label",`${oe(t)}, ${a} ${a===1?"connection":"connections"}`)}for(let[t,s]of this.edgeEls)if(!this.model.edge(t))s.group.remove(),s.label?.remove(),this.edgeEls.delete(t);for(let t of this.model.edges)if(!this.edgeEls.has(t.id))this.edgeEls.set(t.id,this.buildEdge(t));this.offsets=Rs(this.model.edges)}buildNode(e,t){let s=this.model.size(e.id),a=q("g",{class:"stx-gv-node",id:`${this.prefix}-node-${this.serial++}`,role:"group","data-node":e.id});if(e.kind)a.setAttribute("data-kind",e.kind);if(e.expandable===!0)a.setAttribute("data-expandable","");let n=q("title");n.textContent=e.detail?`${oe(e)}: ${e.detail}`:oe(e);let o=q("rect",{x:-s.width/2,y:-s.height/2,width:s.width,height:s.height,rx:6,ry:6}),i=e.expandable===!0?(this.model.metrics.charWidth+4)/2:0,r=q("text",{class:"stx-gv-node-label",x:-i,y:e.detail?-6:0,"text-anchor":"middle","dominant-baseline":"central"});if(r.textContent=We(oe(e),t),a.append(n,o,r),e.detail){let c=q("text",{class:"stx-gv-node-detail",x:-i,y:9,"text-anchor":"middle","dominant-baseline":"central"});c.textContent=We(e.detail,Math.floor(t/0.85)),a.append(c)}if(e.expandable===!0){let c=q("text",{class:"stx-gv-node-mark",x:s.width/2-10,y:0,"text-anchor":"middle","dominant-baseline":"central","aria-hidden":"true"});c.textContent="+",a.append(c)}return a}buildEdge(e){let t=q("g",{class:"stx-gv-edge","data-edge":e.id}),s=q("path",{fill:"none"});if(e.directed!==!1)s.setAttribute("marker-end",`url(#${this.prefix}-arrow)`);t.append(s),this.edgeLayer.append(t);let a=null;if(e.label){let n=We(String(e.label),32),o=Math.ceil(n.length*Wi)+8;a=q("g",{class:"stx-gv-edge-label","data-edge":e.id});let i=q("rect",{x:-o/2,y:-8,width:o,height:16,rx:3,ry:3}),r=q("text",{"text-anchor":"middle","dominant-baseline":"central"});r.textContent=n,a.append(i,r),this.labelLayer.append(a)}return{group:t,path:s,label:a}}draw(){for(let[e,t]of this.nodeEls){let s=this.shown.get(e)??this.positions.get(e);if(s)t.setAttribute("transform",`translate(${s.x} ${s.y})`)}for(let e of this.model.edges)this.drawEdge(e)}shape(e){let t=this.shown.get(e.source)??this.positions.get(e.source),s=this.shown.get(e.target)??this.positions.get(e.target);if(!t||!s)return null;return Ms({source:t,sourceSize:this.model.size(e.source),target:s,targetSize:this.model.size(e.target)},{curve:this.layoutName==="layered"?"bezier":"straight",direction:this.direction,offset:this.offsets.get(e.id)??0,inset:e.directed!==!1?1:0})}drawEdge(e){let t=this.edgeEls.get(e.id),s=t&&this.shape(e);if(!t||!s)return;t.path.setAttribute("d",s.d),t.label?.setAttribute("transform",`translate(${Math.round(s.label.x*10)/10} ${Math.round(s.label.y*10)/10})`)}moveToPlace(){this.stop();let e=typeof matchMedia==="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!this.animate||e||typeof requestAnimationFrame!=="function"){this.shown=new Map(this.positions),this.draw();return}let t=new Map;for(let[n,o]of this.positions)t.set(n,this.shown.get(n)??o);let s=performance.now(),a=(n)=>{let o=Math.min(1,(n-s)/qi),i=1-(1-o)**3;for(let[r,c]of this.positions){let l=t.get(r);this.shown.set(r,{x:l.x+(c.x-l.x)*i,y:l.y+(c.y-l.y)*i})}if(this.draw(),this.frame=o<1?requestAnimationFrame(a):0,o>=1)this.shown=new Map(this.positions)};this.frame=requestAnimationFrame(a)}stop(){if(this.frame)cancelAnimationFrame(this.frame);this.frame=0}setView(e){this.view=e,this.stage.setAttribute("transform",`translate(${e.x} ${e.y}) scale(${e.k})`),this.callbacks.onViewport?.({...e})}mark(){let e=this.selected,t=new Set(e?this.model.neighbours(e):[]);this.root.toggleAttribute("data-has-selection",Boolean(e));for(let[a,n]of this.nodeEls)if(n.toggleAttribute("data-selected",a===e),n.toggleAttribute("data-neighbour",t.has(a)),a===e)n.setAttribute("aria-current","true");else n.removeAttribute("aria-current");for(let a of this.model.edges){let n=this.edgeEls.get(a.id);if(!n)continue;let o=e!=null&&(a.source===e||a.target===e);if(n.group.toggleAttribute("data-active",o),n.label?.toggleAttribute("data-active",o),a.directed!==!1)n.path.setAttribute("marker-end",`url(#${this.prefix}-${o?"arrow-active":"arrow"})`)}let s=e?this.nodeEls.get(e):null;if(s)this.surface.setAttribute("aria-activedescendant",s.id);else this.surface.removeAttribute("aria-activedescendant")}describe(e){let t=this.model.node(e);if(!t)return;let s=this.model.neighbours(e).map((o)=>oe(this.model.node(o))),a=s.slice(0,5).join(", "),n=s.length>5?` and ${s.length-5} more`:"";this.announce(s.length===0?`${oe(t)}, no connections`:`${oe(t)}, ${s.length} ${s.length===1?"connection":"connections"}: ${a}${n}`)}announce(e){if(this.status)this.status.textContent=e}expand(e,t=!1){let s=this.model.node(e);if(!s)return;if(this.lastExpand=performance.now(),t||s.expandable===!1)this.callbacks.onOpen?.({node:s});else this.callbacks.onExpand?.({node:s})}nodeUnder(e){let t=e instanceof Element?e.closest(".stx-gv-node"):null;return t?this.idOf.get(t)??null:null}local(e){let t=this.surface.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}listen(){let e=(s,a,n)=>{this.surface.addEventListener(s,a,n),this.disposers.push(()=>this.surface.removeEventListener(s,a,n))};e("pointerdown",(s)=>this.onPointerDown(s)),e("pointermove",(s)=>this.onPointerMove(s)),e("pointerup",(s)=>this.onPointerUp(s)),e("pointercancel",()=>this.endGesture()),e("dblclick",(s)=>{let a=this.nodeUnder(s.target);if(a&&performance.now()-this.lastExpand>Js)this.expand(a,s.metaKey||s.ctrlKey)}),e("wheel",(s)=>this.onWheel(s),{passive:!1}),e("keydown",(s)=>this.onKeyDown(s)),e("contextmenu",(s)=>{if(this.contextMenu)s.preventDefault();let a=this.nodeUnder(s.target);if(a)this.select(a);this.callbacks.onContext?.({node:a?this.model.node(a):null,x:s.clientX,y:s.clientY})});let t=(s,a)=>{this.surface.addEventListener(s,a),this.disposers.push(()=>this.surface.removeEventListener(s,a))};t("gesturestart",(s)=>{s.preventDefault();let a=this.local(s);this.pinch={k:this.view.k,x:a.x,y:a.y}}),t("gesturechange",(s)=>{if(!this.pinch)return;s.preventDefault(),this.zoomBy(this.pinch.k*s.scale/this.view.k,{x:this.pinch.x,y:this.pinch.y})}),t("gestureend",()=>{this.pinch=null})}onPointerDown(e){if(e.button!==0)return;let t=this.nodeUnder(e.target);this.surface.focus({preventScroll:!0});try{this.surface.setPointerCapture(e.pointerId)}catch{}this.gesture={pointer:e.pointerId,node:t,startX:e.clientX,startY:e.clientY,origin:t?{...this.positions.get(t)??{x:0,y:0}}:{x:0,y:0},view:{...this.view},moved:!1}}onPointerMove(e){let t=this.gesture;if(!t||e.pointerId!==t.pointer)return;let s=e.clientX-t.startX,a=e.clientY-t.startY;if(!t.moved){if(Math.abs(s)<Us&&Math.abs(a)<Us)return;t.moved=!0,this.stop(),this.shown=new Map(this.positions),this.root.setAttribute("data-dragging",t.node?"node":"pan")}if(t.node){let n={x:t.origin.x+s/this.view.k,y:t.origin.y+a/this.view.k};this.positions.set(t.node,n),this.shown.set(t.node,n),this.nodeEls.get(t.node)?.setAttribute("transform",`translate(${n.x} ${n.y})`);for(let o of this.model.edgesOf(t.node))this.drawEdge(o)}else this.autoFit=!1,this.setView(Ue(t.view,s,a))}onPointerUp(e){let t=this.gesture;if(!t||e.pointerId!==t.pointer)return;if(this.endGesture(),t.moved){if(t.node){this.pinned.add(t.node),this.autoFit=!1;let n=this.positions.get(t.node);this.callbacks.onMove?.({node:this.model.node(t.node),x:n.x,y:n.y})}return}if(!t.node){this.select(null);return}let s=performance.now(),a=this.lastClick.id===t.node&&s-this.lastClick.at<Js;if(this.lastClick=a?{id:"",at:0}:{id:t.node,at:s},this.select(t.node),a)this.expand(t.node,e.metaKey||e.ctrlKey)}endGesture(){let e=this.gesture;if(this.gesture=null,this.root.removeAttribute("data-dragging"),e)try{this.surface.releasePointerCapture(e.pointer)}catch{}}onWheel(e){if(e.preventDefault(),e.ctrlKey||e.metaKey){this.zoomBy(Math.exp(-e.deltaY*(e.deltaMode===1?0.05:0.01)),this.local(e));return}let t=e.deltaMode===1?16:1;this.panBy(-e.deltaX*t,-e.deltaY*t)}onKeyDown(e){let s={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"}[e.key];if(s){e.preventDefault();let n=this.selected?Ws(this.positions,this.selected,s):Gs(this.positions,Et(this.view,{x:this.size.width/2,y:this.size.height/2}));if(n)this.select(n),this.bringIntoView(n);return}let a=e.metaKey||e.ctrlKey;if(e.key==="Enter"||e.key===" "){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,a)}else if(a||e.altKey);else if(e.key==="+"||e.key==="=")e.preventDefault(),this.zoomIn();else if(e.key==="-"||e.key==="_")e.preventDefault(),this.zoomOut();else if(e.key==="0")e.preventDefault(),this.fit();else if(e.key==="f"||e.key==="F"){if(!this.selected)return;e.preventDefault(),this.focusNode(this.selected)}else if(e.key==="o"||e.key==="O"){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,!0)}else if(e.key==="Escape"&&this.selected)e.preventDefault(),this.select(null)}bringIntoView(e){let t=this.positions.get(e);if(!t)return;let s=this.model.size(e),a=qs(this.view,{x:t.x-s.width/2,y:t.y-s.height/2,width:s.width,height:s.height},this.size);if(a!==this.view)this.autoFit=!1,this.setView(a)}}var Yi="./GroupedList-j3sxv5pb.stx";var Zi="./GroupedListRow-x8fgb8sx.stx";var er="./Image-6x38ddd7.stx";var sr="./EmailInput-sf9jfrgz.stx";var nr="./NumberInput-nqqen5a6.stx";var ir="./PasswordInput-j38f2n01.stx";var lr="./SearchInput-w15r5t95.stx";var dr="./TextInput-4v09vw1r.stx";var pr={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string},ur={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,leftIcon:f.string,rightIcon:f.string,clearable:f.boolean,maxLength:f.number,showCount:f.boolean,type:f.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:f.string,list:f.string,minLength:f.number,htmlSize:f.number,autofocus:f.boolean},hr={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,min:f.number,max:f.number,step:f.number,showControls:f.boolean},fr={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,showStrength:f.boolean},mr={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,onSearch:f.func,loading:f.boolean},Ug=ae("TextInput",ur),Jg=ae("EmailInput",pr),Yg=ae("PasswordInput",fr),Xg=ae("NumberInput",hr),Zg=ae("SearchInput",mr);var gr=new Set(["array","set"]),xr=/^[A-Z_$][\w$]*$/i;function Pt(e){return gr.has(e.kind)}function It(e){return e.ref===void 0&&(e.children!==void 0&&e.children.length>0||(e.more??0)>0)}function Mt(e,t="$"){let s=t;for(let a of e)if(typeof a==="number")s+=`[${a}]`;else if(xr.test(a))s+=`.${a}`;else s+=`[${JSON.stringify(a)}]`;return s}function At(e){if(e.ref!==void 0)return"[Circular]";if(e.children){if(Pt(e))return e.children.map((s)=>At(s));let t={};return e.children.forEach((s,a)=>{t[s.key!==void 0?String(s.key):s.label??String(a)]=At(s)}),t}if("value"in e){let t=e.value;if(typeof t==="bigint")return t.toString();if(typeof t==="number"&&!Number.isFinite(t))return String(t);if(typeof t==="function"||typeof t==="symbol")return e.preview??String(t);return t}return e.preview??null}function Xs(e,t=2){let s=At(e);return s===void 0?"undefined":JSON.stringify(s,null,t)}var Ys=80;function Rt(e){if(e.preview!==void 0)return e.preview;if(e.ref!==void 0)return"[Circular]";if(e.children||e.more){let t=(e.children?.length??0)+(e.more??0);if(Pt(e))return`${e.kind==="set"?"Set":"Array"}(${t})`;return t===0?"{}":`{${t}}`}if("value"in e){let t=e.value;if(typeof t==="string")return JSON.stringify(t.length>Ys?`${t.slice(0,Ys)}\u2026`:t);if(typeof t==="bigint")return`${t}n`;return String(t)}return e.kind}function ox(e,t,s={}){let a=s.maxItems??1000,n=s.maxDepth??32,o=new Map,i=1,r=(l,d)=>{if(d!==void 0)l.label=d;return l},c=(l,d,u)=>{if(l===null)return r({kind:"null",value:null,preview:"null"},d);switch(typeof l){case"undefined":return r({kind:"undefined",value:void 0,preview:"undefined"},d);case"string":case"number":case"boolean":case"bigint":return r({kind:typeof l,value:l},d);case"symbol":return r({kind:"symbol",preview:l.toString()},d);case"function":return r({kind:"function",preview:`\u0192 ${l.name||"(anonymous)"}()`},d)}let p=l,h=o.get(p);if(h!==void 0)return r({kind:"ref",ref:h},d);if(p instanceof Date)return r({kind:"date",value:Number.isNaN(p.getTime())?null:p.toISOString(),preview:Number.isNaN(p.getTime())?"Invalid Date":p.toISOString()},d);if(p instanceof RegExp)return r({kind:"regexp",value:p.toString(),preview:p.toString()},d);let g=`v${i++}`;o.set(p,g);let m=Array.isArray(p),w=p instanceof Set,y=p instanceof Map,v=r({id:g,kind:m?"array":w?"set":y?"map":"object",children:[]},d);if(u>=n)return v.preview=m?"Array":"Object",delete v.children,v;let b=v.children,C=0;if(m||w)for(let P of p){if(C<a)b.push(c(P,String(C),u+1));C++}else if(y)for(let[P,T]of p){if(C<a)b.push(c(T,typeof P==="string"?P:Rt(c(P,void 0,n)),u+1));C++}else{for(let T of Object.keys(p)){if(C<a)b.push(c(p[T],T,u+1));C++}let P=p.constructor?.name;if(P&&P!=="Object")v.preview=`${P} {${C}}`}if(C>b.length)v.more=C-b.length;if(y)v.preview=`Map(${C})`;return v};return c(e,t,0)}class Nt{rows=[];version=0;roots=[];depth;opened=new Set;closed=new Set;index=null;constructor(e,t={}){this.depth=t.depth??1,this.setValue(e)}setValue(e){this.roots=e==null?[]:Array.isArray(e)?e:[e],this.opened.clear(),this.closed.clear(),this.flatten()}setDepth(e){this.depth=e,this.opened.clear(),this.closed.clear(),this.flatten()}getRoots(){return this.roots}indexOf(e){if(!this.index){this.index=new Map;for(let t=0;t<this.rows.length;t++)this.index.set(this.rows[t].id,t)}return this.index.get(e)??-1}pathOf(e){let t=[];for(let s=e;s>=0;s=this.rows[s].parent){let a=this.rows[s];if(a.isMore)continue;if(a.parent!==-1||this.roots.length>1)t.push(a.key)}return t.reverse()}isExpanded(e,t){return this.opened.has(e)||t<this.depth&&!this.closed.has(e)}expand(e){return this.set(e,!0)}collapse(e){return this.set(e,!1)}toggle(e){let t=this.indexOf(e);if(t===-1)return!1;return this.set(e,!this.rows[t].expanded)}expandAll(e){let t=(s,a,n)=>{if(!It(s))return;if(n>=this.depth)this.opened.add(a);this.closed.delete(a),s.children?.forEach((o,i)=>t(o,o.id??`${a}.${i}`,n+1))};if(e===void 0)this.roots.forEach((s,a)=>t(s,s.id??String(a),0));else{let s=this.find(e);if(!s)return;t(s.node,e,s.ancestors.length)}this.flatten()}collapseAll(){this.opened.clear(),this.closed.clear();let e=(t,s,a)=>{if(a>=this.depth||!It(t))return;this.closed.add(s),t.children?.forEach((n,o)=>e(n,n.id??`${s}.${o}`,a+1))};this.roots.forEach((t,s)=>e(t,t.id??String(s),0)),this.flatten()}reveal(e){let t=this.find(e);if(!t)return-1;return t.ancestors.forEach((s,a)=>{if(this.closed.delete(s),a>=this.depth)this.opened.add(s)}),this.flatten(),this.indexOf(e)}appendChildren(e,t,s=0){let a=this.find(e);if(!a)return!1;let n=a.node;if(n.children=[...n.children??[],...t],s>0)n.more=s;else delete n.more;return this.flatten(),!0}move(e,t,s=10){let a=this.rows.length-1;if(a<0)return{index:-1,changed:!1};let n=Math.min(Math.max(e,0),a),o=this.rows[n],i=(r)=>({index:Math.min(Math.max(r,0),a),changed:!1});switch(t){case"ArrowDown":return i(e<0?0:n+1);case"ArrowUp":return i(n-1);case"Home":return i(0);case"End":return i(a);case"PageDown":return i(n+s);case"PageUp":return i(n-s);case"ArrowRight":if(!o.expandable||o.isMore)return i(n);if(!o.expanded)return{index:n,changed:this.expand(o.id)};return i(n+1);case"ArrowLeft":if(o.expanded&&!o.isMore)return{index:n,changed:this.collapse(o.id)};return i(o.parent===-1?n:o.parent);case"*":{let r=!1,c=o.parent,l=this.rows.filter((d)=>d.parent===c&&d.depth===o.depth&&d.expandable&&!d.expanded&&!d.isMore);for(let d of l)this.mark(d.id,d.depth,!0),r=!0;if(r)this.flatten();return{index:this.indexOf(o.id),changed:r}}}return i(n)}typeahead(e,t){let s=t.toLowerCase(),a=this.rows.length;if(s===""||a===0)return-1;let n=s.length===1?e+1:Math.max(e,0);for(let o=0;o<a;o++){let i=(n+o+a)%a,r=this.rows[i];if(!r.isMore&&(r.node.label??"").toLowerCase().startsWith(s))return i}return-1}set(e,t){let s=this.indexOf(e);if(s===-1)return!1;let a=this.rows[s];if(!a.expandable||a.isMore||a.expanded===t)return!1;return this.mark(e,a.depth,t),this.flatten(),!0}mark(e,t,s){if(s){if(this.closed.delete(e),t>=this.depth)this.opened.add(e)}else if(this.opened.delete(e),t<this.depth)this.closed.add(e)}find(e){let t=[];for(let s=this.roots.length-1;s>=0;s--)t.push({node:this.roots[s],id:this.roots[s].id??String(s),ancestors:[]});while(t.length>0){let s=t.pop();if(s.id===e)return{node:s.node,ancestors:s.ancestors};let a=s.node.children;if(!a||s.node.ref!==void 0)continue;let n=[...s.ancestors,s.id];for(let o=a.length-1;o>=0;o--)t.push({node:a[o],id:a[o].id??`${s.id}.${o}`,ancestors:n})}return null}flatten(){let e=[],t=(s,a,n,o,i,r,c)=>{let l=It(s),d=l&&this.isExpanded(a,n),u=e.length;if(e.push({id:a,node:s,depth:n,key:i,parent:o,expandable:l,expanded:d,posInSet:r,setSize:c,isMore:!1}),!d)return;let p=s.children??[],h=s.more??0,g=Pt(s),m=p.length+(h>0?1:0);for(let w=0;w<p.length;w++){let y=p[w];t(y,y.id??`${a}.${w}`,n+1,u,y.key??(g?w:y.label??w),w+1,m)}if(h>0)e.push({id:`${a}.+`,node:s,depth:n+1,key:"",parent:u,expandable:!1,expanded:!1,posInSet:m,setSize:m,isMore:!0})};this.roots.forEach((s,a)=>t(s,s.id??String(a),0,-1,s.key??a,a+1,this.roots.length)),this.rows=e,this.index=null,this.version++}}var vr="./JsonTree-satc4010.stx";var ea=new Set(["array","object","map","set","model","error"]);function wr(e){return e.t==="object"||e.t==="model"}function Zs(e){return e.length>0&&e.slice(0,20).every(wr)}function Qs(e){return e.some((t)=>ea.has(t.t))}function Lt(e,t){let s=e.length>120?`${e.slice(0,120)}\u2026`:e;return t?`${JSON.stringify(s)} (${t} more characters)`:JSON.stringify(s)}function yr(e){if(!e.file)return"";return[e.file,e.line,e.column].filter((t)=>t!==void 0).join(":")}function lx(e,t,s={}){let a=s.idPrefix??"t",n=(l)=>`${a}${l}`,o=(l,d)=>{if(d!==void 0)l.label=d;return l},i=(l)=>c(l,void 0).preview??l.t,r=(l,d)=>{if(d.length>0)l.openable=d.length===1?d[0]:d;return l};function c(l,d){switch(l.t){case"undefined":return o({kind:"undefined",value:void 0,preview:"undefined"},d);case"null":return o({kind:"null",value:null,preview:"null"},d);case"boolean":return o({kind:"boolean",value:l.v,preview:String(l.v)},d);case"number":{let u=typeof l.v==="number"?l.v:l.v==="-0"?-0:Number(l.v);return o({kind:"number",value:u,preview:String(l.v)},d)}case"bigint":return o({kind:"bigint",value:l.v,preview:`${l.v}n`},d);case"string":return o({kind:"string",value:l.v,preview:Lt(l.v,l.truncated)},d);case"symbol":return o({kind:"symbol",preview:`Symbol(${l.v})`},d);case"function":{let u=l.kind==="class"?`class ${l.name}`:`${l.kind==="async"?"async ":""}\u0192${l.kind==="generator"?"*":""} ${l.name}()`;return o({kind:"function",preview:u},d)}case"date":return o({kind:"date",value:l.v,preview:l.v??"Invalid Date"},d);case"regexp":return o({kind:"regexp",value:l.v,preview:l.v},d);case"url":return o({kind:"url",value:l.v,preview:l.v},d);case"promise":return o({kind:"promise",preview:"Promise"},d);case"bytes":{let u=l.length*2>l.hex.length;return o({kind:"bytes",value:l.hex,preview:`${l.ctor}(${l.length}) <${l.hex}${u?"\u2026":""}>`},d)}case"ref":return o({kind:"ref",ref:n(l.id),preview:"[Circular]"},d);case"cut":return o({kind:"cut",preview:`${l.ctor??"Object"} \u2026 (${l.reason==="depth"?"too deep to show":"result too large to show"})`},d);case"array":{let u={id:n(l.id),kind:"array",preview:`${l.ctor??"Array"}(${l.length})`,children:l.items.map((p,h)=>c(p,String(h)))};if(l.more)u.more=l.more;return o(r(u,Zs(l.items)?["table"]:[]),d)}case"set":{let u={id:n(l.id),kind:"set",preview:`Set(${l.size})`,children:l.items.map((p,h)=>c(p,String(h)))};if(l.more)u.more=l.more;return o(r(u,Zs(l.items)?["table"]:[]),d)}case"object":{let u=l.entries.slice(0,5).map(([m])=>m).join(", "),p=l.entries.length+(l.more??0),h=p===0?"{}":`{${u}${p>5?", \u2026":""}}`,g={id:n(l.id),kind:"object",preview:l.ctor&&l.ctor!=="Object"?`${l.ctor} ${h}`:h,children:l.entries.map(([m,w])=>c(w,m))};if(l.more)g.more=l.more;return o(r(g,Qs(l.entries.map((m)=>m[1]))?["graph"]:[]),d)}case"map":{let u={id:n(l.id),kind:"map",preview:`Map(${l.size})`,children:l.entries.map(([p,h],g)=>{if(!ea.has(p.t)){let m=c(h,i(p));return m.key=p.t==="string"?p.v:i(p),m}return{kind:"entry",label:String(g),key:g,preview:`${i(p)} => ${i(h)}`,children:[c(p,"key"),c(h,"value")]}})};if(l.more)u.more=l.more;return o(r(u,Qs(l.entries.map((p)=>p[1]))?["graph"]:[]),d)}case"model":{let u=l.attributes.map(([g,m])=>c(m,g));for(let[g,m]of l.loaded??[]){let w=c(m,g);w.meta=w.meta??{relation:!0},u.push(w)}if(l.hidden?.length)u.push({kind:"hidden",label:"[hidden]",key:"[hidden]",preview:l.hidden.join(", "),children:l.hidden.map((g,m)=>({kind:"hidden",label:String(m),value:g,preview:g}))});if(l.relations?.length)u.push({kind:"relations",label:"[relations]",key:"[relations]",preview:`${l.relations.length} declared`,children:l.relations.map((g)=>({kind:"relation",label:g.name??g.model,value:g,preview:`${g.kind} ${g.model}`}))});let p={model:l.model,hidden:l.hidden??[],relations:l.relations??[]};if(l.table)p.table=l.table;if(l.primaryKey)p.primaryKey=l.primaryKey;let h={id:n(l.id),kind:"model",preview:l.key?`${l.model} #${i(l.key).replace(/^"|"$/g,"")}`:l.model,children:u,meta:p};if(l.more)h.more=l.more;return o(r(h,["graph"]),d)}case"html":{let u={kind:l.kind};if(l.title)u.title=l.title;if(l.text)u.text=l.text;if(l.truncated)u.truncated=l.truncated;let p=l.truncated?`, ${l.truncated} more cut`:"",h=l.title?`: ${l.title}`:"";return o(r({kind:"html",value:l.html,preview:`${l.kind}${h} (${l.html.length} characters${p})`,meta:u},["preview"]),d)}case"error":{let u=[{kind:"string",label:"message",value:l.message,preview:Lt(l.message)}];if(l.frames?.length)u.push({kind:"stack",label:"stack",preview:`${l.frames.length} frames`,value:l.stack,children:l.frames.map((p,h)=>({kind:"frame",label:String(h),value:p,preview:[p.function,yr(p)].filter(Boolean).join(" at ")||"(unknown)",meta:p}))});else if(l.stack)u.push({kind:"string",label:"stack",value:l.stack,preview:Lt(l.stack)});if(l.cause)u.push(c(l.cause,"cause"));for(let[p,h]of l.entries??[])u.push(c(h,p));return o({kind:"error",preview:l.message?`${l.name}: ${l.message}`:l.name,children:u},d)}}return o({kind:"unknown",preview:String(l.t??"unknown")},d)}return c(e,t)}var kr=600,ta=400,sa={table:"Table",graph:"Graph",preview:"Preview"};function aa(e){return e.length>ta?`${e.slice(0,ta)}\u2026`:e}function na(e){if(e==null||e==="")return[];return Array.isArray(e)?e:[e]}class Sr{root;callbacks;model;scroller;content;rowsEl;status;prefix;rowHeight;overscan;openable;contextMenu;pool=[];parts=new WeakMap;active=-1;activeId="";typed="";typedAt=0;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;let a=(o)=>e.querySelector(`[data-jt="${o}"]`);this.scroller=a("scroller")??e,this.content=a("content")??this.scroller,this.rowsEl=a("rows")??this.content,this.status=a("status"),this.prefix=`${e.id||`json-tree-${Math.random().toString(36).slice(2,8)}`}-row-`,this.rowHeight=t.rowHeight&&t.rowHeight>0?t.rowHeight:22,this.overscan=t.overscan??6,this.openable=t.openable??null,this.contextMenu=Boolean(t.contextMenu),this.model=new Nt(t.value,{depth:t.depth??1}),this.rowsEl.__stx_inert_content=!0,e.style.setProperty("--stx-tree-row-height",`${this.rowHeight}px`);let n=(o,i,r,c)=>{o.addEventListener(i,r,c),this.disposers.push(()=>o.removeEventListener(i,r,c))};if(n(this.scroller,"scroll",()=>this.render(),{passive:!0}),n(this.scroller,"keydown",(o)=>this.onKeyDown(o)),n(this.scroller,"focus",()=>{if(this.active===-1&&this.model.rows.length>0)this.setActive(0,!1)}),n(this.rowsEl,"mousedown",(o)=>{if(o.target.closest("[data-jt-action]"))o.preventDefault()}),n(this.rowsEl,"click",(o)=>this.onClick(o)),n(this.rowsEl,"dblclick",(o)=>this.onDoubleClick(o)),n(this.rowsEl,"contextmenu",(o)=>this.onContextMenu(o)),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.render()),this.observer.observe(this.scroller);this.render(),e.setAttribute("data-jt-ready","")}setValue(e){this.model.setValue(e),this.active=-1,this.activeId="",this.scroller.scrollTop=0,this.render()}setDepth(e){this.model.setDepth(e),this.afterChange()}setOpenable(e){this.openable=e??null,this.model.version++,this.render()}setContextMenu(e){this.contextMenu=e}expandAll(e){this.model.expandAll(e),this.afterChange()}collapseAll(){this.model.collapseAll(),this.afterChange()}expand(e){let t=this.model.expand(e);if(t)this.afterChange();return t}collapse(e){let t=this.model.collapse(e);if(t)this.afterChange();return t}reveal(e){let t=this.model.reveal(e);if(t===-1)return this.afterChange(),!1;return this.active=t,this.activeId=e,this.scrollToRow(t),this.render(),this.emitSelect(),!0}appendChildren(e,t,s=0){let a=this.model.appendChildren(e,t,s);if(a)this.afterChange();return a}getSelected(){return this.active===-1?null:this.detail(this.active)}select(e){let t=this.model.indexOf(e);if(t===-1)return!1;return this.setActive(t,!0),!0}focus(){this.scroller.focus()}get drawn(){return this.pool.filter((e)=>e.style.display!=="none").length}destroy(){this.observer?.disconnect();for(let e of this.disposers)e();this.rowsEl.textContent="",this.pool=[],this.root.removeAttribute("data-jt-ready")}afterChange(){if(this.activeId){let e=this.model.indexOf(this.activeId);if(this.active=e,e===-1)this.activeId=""}this.render()}detail(e){let t=this.model.rows[e],s=this.model.pathOf(e);return{id:t.id,node:t.node,path:s,pathText:Mt(s)}}emitSelect(){if(this.active!==-1)this.callbacks.onSelect?.(this.detail(this.active))}setActive(e,t){if(e<0||e>=this.model.rows.length)return;let s=e!==this.active;if(this.active=e,this.activeId=this.model.rows[e].id,t)this.scrollToRow(e);if(this.render(),s)this.emitSelect()}scrollToRow(e){let t=e*this.rowHeight,s=this.scroller.clientHeight;if(t<this.scroller.scrollTop)this.scroller.scrollTop=t;else if(t+this.rowHeight>this.scroller.scrollTop+s)this.scroller.scrollTop=t+this.rowHeight-s}pageSize(){return Math.max(1,Math.floor(this.scroller.clientHeight/this.rowHeight)-1)}createRow(){let e=document.createElement("div");e.setAttribute("role","treeitem"),e.className="stx-jt-row";let t=(a,n)=>{let o=document.createElement("span");if(o.className=a,n)o.setAttribute("aria-hidden","true");return e.appendChild(o),o},s={twisty:t("stx-jt-twisty",!0),label:t("stx-jt-label",!1),separator:t("stx-jt-separator",!0),preview:t("stx-jt-preview",!1),actions:t("stx-jt-actions",!1)};return s.separator.textContent=": ",this.parts.set(e,s),this.rowsEl.appendChild(e),e}button(e,t,s,a){let n=document.createElement("button");if(n.type="button",n.tabIndex=-1,n.className="stx-jt-action",n.setAttribute("data-jt-action",e),a)n.setAttribute("data-jt-as",a);return n.setAttribute("aria-label",s),n.textContent=t,n}opensOf(e,t){if(e.isMore)return[];if(this.openable){let s=this.openable(e.node,this.model.pathOf(t));if(s!==void 0)return na(s)}return na(e.node.openable)}render(){let e=this.model.rows,t=e.length,s=this.scroller.clientHeight;this.content.style.height=`${t*this.rowHeight}px`;let a=Math.max(0,Math.min(this.scroller.scrollTop,t*this.rowHeight-s)),n=Math.max(0,Math.floor(a/this.rowHeight)-this.overscan),o=Math.min(t,Math.ceil((a+s)/this.rowHeight)+this.overscan),i=Math.max(0,o-n);while(this.pool.length<i)this.pool.push(this.createRow());let r=this.pool.length,c=new Uint8Array(r);for(let d=n;d<o;d++){let u=d%r;c[u]=1,this.paint(this.pool[u],e[d],d)}for(let d=0;d<r;d++)if(!c[d]&&this.pool[d].style.display!=="none")this.pool[d].style.display="none",this.pool[d].__jt=void 0,this.pool[d].removeAttribute("id");if(this.active>=n&&this.active<o)this.scroller.setAttribute("aria-activedescendant",this.prefix+this.active);else this.scroller.removeAttribute("aria-activedescendant")}paint(e,t,s){let a=this.model.version,n=s===this.active,o=e.__jt;if(!o||o.index!==s||o.version!==a){let i=this.parts.get(e),r=t.node;if(e.style.display="",e.style.transform=`translateY(${s*this.rowHeight}px)`,e.style.setProperty("--stx-tree-depth",String(t.depth)),e.id=this.prefix+s,e.setAttribute("data-jt-index",String(s)),e.setAttribute("aria-level",String(t.depth+1)),e.setAttribute("aria-posinset",String(t.posInSet)),e.setAttribute("aria-setsize",String(t.setSize)),t.expandable)e.setAttribute("aria-expanded",t.expanded?"true":"false");else e.removeAttribute("aria-expanded");if(t.isMore)e.setAttribute("data-kind","more"),i.twisty.textContent="",i.label.textContent="",i.separator.style.display="none",i.preview.textContent=`\u2026 ${r.more} more`,i.preview.setAttribute("data-kind","more");else{e.setAttribute("data-kind",r.kind),i.twisty.textContent=t.expandable?t.expanded?"\u25BE":"\u25B8":"";let d=r.label??(typeof t.key==="number"&&t.parent!==-1?String(t.key):"");i.label.textContent=aa(d),i.separator.style.display=d===""?"none":"",i.preview.textContent=aa(Rt(r)),i.preview.setAttribute("data-kind",r.kind)}let c=this.opensOf(t,s),l=t.isMore?"+":c.join("|");if(!o||o.opens!==l)if(i.actions.textContent="",t.isMore)i.actions.appendChild(this.button("more","Load","Load more"));else{for(let d of c)i.actions.appendChild(this.button("open",sa[d]??d,`Open as ${sa[d]?.toLowerCase()??d}`,d));i.actions.appendChild(this.button("copy-value","Copy","Copy value")),i.actions.appendChild(this.button("copy-path","Path","Copy path"))}e.__jt={index:s,version:a,opens:l}}if(n)e.setAttribute("aria-selected","true"),e.setAttribute("data-active","");else e.setAttribute("aria-selected","false"),e.removeAttribute("data-active")}rowIndexOf(e){let t=e instanceof Element?e.closest("[data-jt-index]"):null;if(!t||t.style.display==="none")return-1;return Number(t.getAttribute("data-jt-index"))}say(e){if(this.status)this.status.textContent=e}toggleRow(e){let t=this.model.rows[e];if(!t)return;if(t.isMore){this.loadMore(e);return}if(t.node.ref!==void 0){this.follow(e);return}if(!t.expandable)return;let s=t.id;this.model.toggle(s),this.afterChange();let a=this.model.indexOf(s);if(a!==-1)this.callbacks.onToggle?.({...this.detail(a),expanded:this.model.rows[a].expanded})}follow(e){let t=this.model.rows[e].node.ref;if(t===void 0)return;if(!this.reveal(t))this.say("The value this points back to is not part of what was sent.")}loadMore(e){let s=this.model.rows[e].parent;if(s===-1)return;this.callbacks.onLoadMore?.(this.detail(s))}copy(e,t){let s=this.model.rows[e];if(!s)return;let a=s.isMore?s.parent:e,n=this.model.pathOf(a),o=this.model.rows[a].node,i=t==="path"?Mt(n):Xs(o);try{navigator.clipboard?.writeText(i)?.catch(()=>{})}catch{}this.say(t==="path"?`Copied path ${i}`:"Copied value"),this.callbacks.onCopy?.({what:t,text:i,path:n,node:o})}open(e,t){let s=this.model.rows[e];if(!s||s.isMore)return;let a=t??this.opensOf(s,e)[0];if(a===void 0)return;this.callbacks.onOpen?.({...this.detail(e),as:a})}onClick(e){let t=this.rowIndexOf(e.target);if(t===-1)return;let s=e.target instanceof Element?e.target.closest("[data-jt-action]"):null;if(this.setActive(t,!1),s){let n=s.getAttribute("data-jt-action");if(n==="copy-value")this.copy(t,"value");else if(n==="copy-path")this.copy(t,"path");else if(n==="open")this.open(t,s.getAttribute("data-jt-as")??void 0);else if(n==="more")this.loadMore(t);return}let a=this.model.rows[t];if(a.expandable||a.isMore||a.node.ref!==void 0)this.toggleRow(t)}onDoubleClick(e){let t=this.rowIndexOf(e.target);if(t===-1||e.target instanceof Element&&e.target.closest("[data-jt-action]"))return;let s=this.model.rows[t];if(!s.expandable&&!s.isMore&&s.node.ref===void 0)this.open(t)}onContextMenu(e){let t=this.rowIndexOf(e.target);if(t===-1)return;if(this.setActive(t,!1),this.contextMenu)e.preventDefault();this.callbacks.onContext?.({...this.detail(t),x:e.clientX,y:e.clientY})}onKeyDown(e){let t=this.model.rows;if(t.length===0)return;let s=e.metaKey||e.ctrlKey,a=e.key;if(s&&(a==="c"||a==="C")){if(this.active===-1)return;e.preventDefault(),this.copy(this.active,e.shiftKey?"path":"value");return}if(s||e.altKey)return;if(a==="Enter"&&e.shiftKey){if(e.preventDefault(),this.active!==-1)this.open(this.active);return}let n=this.typed!==""&&Date.now()-this.typedAt<=kr;if(a==="Enter"||a===" "&&!n){if(e.preventDefault(),this.active!==-1)this.toggleRow(this.active);return}if(a==="ArrowDown"||a==="ArrowUp"||a==="ArrowLeft"||a==="ArrowRight"||a==="Home"||a==="End"||a==="PageDown"||a==="PageUp"||a==="*"){e.preventDefault(),this.typed="";let o=this.active===-1?null:t[this.active],i=o?.expanded,r=this.model.move(this.active,a,this.pageSize());if(r.changed){if(this.active=r.index,this.activeId=this.model.rows[r.index]?.id??"",this.scrollToRow(r.index),this.render(),o&&a!=="*"){let c=this.model.indexOf(o.id);if(c!==-1&&this.model.rows[c].expanded!==i)this.callbacks.onToggle?.({...this.detail(c),expanded:this.model.rows[c].expanded})}}else this.setActive(r.index,!0);return}if(a.length===1){let o=Date.now();if(!n)this.typed="";this.typedAt=o,this.typed+=a;let i=this.model.typeahead(this.active,this.typed);if(i!==-1)e.preventDefault(),this.setActive(i,!0)}}}var $r="./List-mjkged1z.stx";var Er="./SwipeRow-az09d4tb.stx";var Ar="./Listbox-83j2q4x6.stx";var Mr="./ListboxButton-gan8e3nw.stx";var Nr="./ListboxLabel-ka0hfm7b.stx";var Dr="./ListboxOption-gpaqvk3s.stx";var zr="./ListboxOptions-2928864k.stx";var Fr="./FilterChip-bynt5maa.stx";var jr="./FilterChips-xg7pgkk2.stx";var _r="./ListRow-1qvkjt4v.stx";var qr="./NavBar-ky8tedjb.stx";var Gr="./SectionCard-8b5fyrjd.stx";var Jr="./TabBar-6m1ajm1d.stx";var Xr="./TabBarItem-kddfnhk3.stx";var Qr="./Navigator-1yk1c3pp.stx";var tl="./Notification-ke5vw4k8.stx";var al="./Pager-w4eb64na.stx";var ol="./PagerDots-076w890y.stx";var rl="./Pagination-8bhbkpcp.stx";var cl="./Checkout-crbegxyv.stx";var pl="./DefaultPaymentMethod-ss3x61tr.stx";var hl="./PaymentMethods-z4hhr0kv.stx";var ml="./SubscriptionCheckout-rdcv32n1.stx";var xl="./Popover-jjt7p7sn.stx";var vl="./PopoverButton-ks3cttd9.stx";var yl="./PopoverPanel-ddgj4gz3.stx";var Sl="./Portal-m73vz879.stx";var ia=[{name:"phone",label:"Phone",width:390,height:844},{name:"tablet",label:"Tablet",width:820,height:1180},{name:"desktop",label:"Desktop",width:1280,height:800}];function oa(e){let t=typeof e==="string"?Number.parseFloat(e):e;return typeof t==="number"&&Number.isFinite(t)&&t>0?Math.round(t):null}function Dt(e,t={}){let s=oa(t.width),a=oa(t.height),n=Boolean(t.landscape);if(s&&a)return{name:"custom",size:{width:s,height:a},landscape:!1};let o=ia.find((r)=>r.name===e);if(!o)return{name:"fill",size:null,landscape:!1};let i=n&&o.height>o.width;return{name:o.name,size:i?{width:o.height,height:o.width}:{width:o.width,height:o.height},landscape:i}}function ra(e,t,s=0){let a=t.width-s*2,n=t.height-s*2;if(a<=0||n<=0||e.width<=0||e.height<=0)return 1;return Math.min(1,a/e.width,n/e.height)}function la(e,t=1){if(!e.size)return"Fills the frame";let s=`${e.size.width} \xD7 ${e.size.height}`;return t<0.995?`${s} at ${Math.round(t*100)}%`:s}function Ot(e){return e==="light"||e==="dark"?e:"auto"}var Cl=["allow-same-origin","allow-top-navigation","allow-top-navigation-by-user-activation","allow-top-navigation-to-custom-protocols","allow-popups","allow-popups-to-escape-sandbox","allow-modals","allow-downloads","allow-pointer-lock","allow-presentation","allow-storage-access-by-user-activation"];function ca(e={}){let t=[];if(e.scripts)t.push("allow-scripts");if(e.forms)t.push("allow-forms");return t.join(" ")}function Eb(e){return!e.toLowerCase().split(/\s+/).filter(Boolean).some((s)=>Cl.includes(s))}var $l=/<!doctype\s|<html[\s>]/i,Je=/<head(?:\s[^>]*)?>/i,Ye=/<html(?:\s[^>]*)?>/i,Tl=/<base[\s>]/i,El=/<meta[^>]+name\s*=\s*["']?color-scheme/i,Il=/\(\s*prefers-color-scheme\s*:\s*(light|dark)\s*\)/gi,Al=/(<(style|script)\b[^>]*>)([\s\S]*?)(<\/\2\s*>)/gi,Pl=/(\smedia\s*=\s*)("[^"]*"|'[^']*')/gi,Ml="(min-width: 0px)",Rl="(max-width: 0px)";function Nl(e,t){let s=(o)=>o.replace(Il,(i,r)=>r.toLowerCase()===t?Ml:Rl),a=e.replace(Al,(o,i,r,c,l)=>i+s(c)+l).replace(Pl,(o,i,r)=>i+s(r)),n=`<style data-stx-preview-scheme>:root{color-scheme:${t} !important}</style>`;if(Je.test(a))return a.replace(Je,(o)=>o+n);if(Ye.test(a))return a.replace(Ye,(o)=>`${o}<head>${n}</head>`);return n+a}function Ll(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function da(e,t={}){let s=Dl(e,t);return t.forceScheme?Nl(s,t.forceScheme):s}function Dl(e,t){let s=e==null?"":String(e),a='<base target="_blank">';if(!$l.test(s))return`<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="color-scheme" content="light dark"><base target="_blank">${t.title?`<title>${Ll(t.title)}</title>`:""}</head><body>${s}</body></html>`;if(Tl.test(s))return s;if(Je.test(s))return s.replace(Je,(n)=>n+'<base target="_blank">');if(Ye.test(s))return s.replace(Ye,(n)=>`${n}<head><base target="_blank"></head>`);return'<base target="_blank">'+s}function Ib(e){return El.test(e)}function pa(e,t){let s=["fill",...ia.map((n)=>n.name)],a=s.indexOf(e);return s[((a<0?0:a)+t+s.length)%s.length]}var zl="./PreviewFrame-erbgvzj8.stx";var Hl=16,ua="(prefers-color-scheme: dark)",Pe;function Fl(){if(Pe!==void 0)return Pe;try{if(typeof matchMedia!=="function"||!document.body)return!0;let e=matchMedia(ua).matches,t=document.createElement("iframe");t.setAttribute("aria-hidden","true"),t.tabIndex=-1,t.style.cssText=`position:absolute;width:1px;height:1px;border:0;opacity:0;pointer-events:none;color-scheme:${e?"light":"dark"}`,document.body.appendChild(t),t.offsetWidth;let s=t.contentWindow?.matchMedia?.(ua).matches;t.remove(),Pe=typeof s==="boolean"?s!==e:!0}catch{Pe=!0}return Pe}class Vl{root;callbacks;html;viewportName;frameWidth;frameHeight;landscape;scheme;scripts;forms;title;viewport;scale=1;frame=null;written;stage;device;observer=null;pending=0;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;this.html=t.html??"",this.viewportName=t.viewport||"fill",this.frameWidth=t.frameWidth??null,this.frameHeight=t.frameHeight??null,this.landscape=Boolean(t.landscape),this.scheme=Ot(t.scheme),this.scripts=Boolean(t.scripts),this.forms=Boolean(t.forms),this.title=t.title||"Preview",this.viewport=this.resolve(),this.stage=this.part("stage"),this.device=this.part("device");let a=(o)=>this.onToolbarClick(o),n=(o)=>this.onToolbarKey(o);if(this.root.addEventListener("click",a),this.root.addEventListener("keydown",n),this.disposers.push(()=>this.root.removeEventListener("click",a),()=>this.root.removeEventListener("keydown",n)),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>{cancelAnimationFrame(this.pending),this.pending=requestAnimationFrame(()=>this.layout())}),this.observer.observe(this.stage);this.load(),this.reflect(),this.root.setAttribute("data-preview-ready","")}getState(){return{viewport:this.viewport.name,width:this.viewport.size?.width??null,height:this.viewport.size?.height??null,landscape:this.viewport.landscape,scale:this.scale,scheme:this.scheme,effectiveScheme:this.effectiveScheme()}}setHtml(e){let t=e==null?"":String(e);if(t===this.html)return;this.html=t,this.load()}setViewport(e,t={}){if(this.viewportName=e||"fill","landscape"in t)this.landscape=Boolean(t.landscape);if("width"in t)this.frameWidth=t.width??null;if("height"in t)this.frameHeight=t.height??null;let s=JSON.stringify(this.viewport);if(this.viewport=this.resolve(),this.layout(),this.reflect(),JSON.stringify(this.viewport)!==s)this.callbacks.onViewport?.(this.getState())}setScheme(e){let t=Ot(e);if(t===this.scheme)return;if(this.scheme=t,this.schemeToWrite()!==this.written)this.load();else this.applyScheme();this.reflect(),this.callbacks.onScheme?.(this.getState())}setPermissions(e){let t=e.scripts??this.scripts,s=e.forms??this.forms;if(t===this.scripts&&s===this.forms)return;this.scripts=t,this.forms=s,this.load()}reload(){this.load(),this.callbacks.onReload?.(this.getState())}destroy(){this.observer?.disconnect(),cancelAnimationFrame(this.pending);for(let e of this.disposers)e();this.frame?.remove(),this.frame=null,this.root.removeAttribute("data-preview-ready")}part(e){let t=this.root.querySelector(`[data-pf="${e}"]`);if(!t)throw Error(`PreviewFrame: the template has no ${e} part`);return t}resolve(){return Dt(this.viewportName,{width:this.frameWidth,height:this.frameHeight,landscape:this.landscape})}effectiveScheme(){if(this.scheme!=="auto")return this.scheme;if(this.root.closest(".dark"))return"dark";if(this.root.closest(".light"))return"light";return typeof matchMedia==="function"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}schemeToWrite(){if(Fl())return;if(this.scheme==="auto"&&!this.root.closest(".dark, .light"))return;return this.effectiveScheme()}load(){let e=document.createElement("iframe");e.setAttribute("sandbox",ca({scripts:this.scripts,forms:this.forms})),e.setAttribute("referrerpolicy","no-referrer"),e.setAttribute("title",this.title),e.setAttribute("data-pf","frame"),e.className="stx-preview-frame",e.addEventListener("load",()=>{if(e===this.frame)this.callbacks.onLoad?.(this.getState())}),this.written=this.schemeToWrite(),e.srcdoc=da(this.html,{title:this.title,forceScheme:this.written}),this.frame?.remove(),this.frame=e,this.applyScheme(),this.device.appendChild(e),this.layout()}applyScheme(){let e=this.effectiveScheme();if(this.root.setAttribute("data-scheme",e),this.frame)this.frame.style.colorScheme=e}layout(){let e=this.frame;if(!e)return;let t=this.viewport.size;if(this.root.setAttribute("data-viewport",this.viewport.name),!t)this.scale=1,this.device.style.width="",this.device.style.height="",e.style.width="",e.style.height="",e.style.transform="";else{let a=this.stage.getBoundingClientRect();this.scale=ra(t,{width:a.width,height:a.height},Hl),this.device.style.width=`${t.width*this.scale}px`,this.device.style.height=`${t.height*this.scale}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=this.scale===1?"":`scale(${this.scale})`}let s=this.root.querySelector('[data-pf="size"]');if(s)s.textContent=la(this.viewport,this.scale)}reflect(){for(let a of this.root.querySelectorAll("[data-pf-viewport]")){let n=a.getAttribute("data-pf-viewport")===this.viewport.name;a.setAttribute("aria-checked",String(n)),a.tabIndex=n?0:-1}if(!this.root.querySelector('[data-pf-viewport][tabindex="0"]'))this.root.querySelector("[data-pf-viewport]")?.setAttribute("tabindex","0");let e=this.effectiveScheme()==="dark",t=this.root.querySelector('[data-pf-action="scheme"]');if(t){t.setAttribute("aria-pressed",String(e));let a=t.querySelector('[data-pf="scheme-text"]');if(a)a.textContent=e?"Dark":"Light"}let s=this.root.querySelector('[data-pf-action="rotate"]');if(s){let a=Dt(this.viewportName,{width:this.frameWidth,height:this.frameHeight}).size;s.disabled=!a||this.viewport.name==="custom"||a.height<=a.width,s.setAttribute("aria-pressed",String(this.viewport.landscape))}}onToolbarClick(e){let t=e.target instanceof Element?e.target.closest("[data-pf-viewport], [data-pf-action]"):null;if(!t||!this.root.contains(t))return;let s=t.getAttribute("data-pf-viewport");if(s){this.setViewport(s,{width:null,height:null});return}switch(t.getAttribute("data-pf-action")){case"scheme":this.setScheme(this.effectiveScheme()==="dark"?"light":"dark");break;case"rotate":this.setViewport(this.viewportName,{landscape:!this.landscape});break;case"reload":this.reload();break}}onToolbarKey(e){let t=e.target instanceof Element?e.target.closest("[data-pf-viewport]"):null;if(!t)return;let s=e.key==="ArrowRight"||e.key==="ArrowDown"?1:e.key==="ArrowLeft"||e.key==="ArrowUp"?-1:0;if(s===0)return;e.preventDefault();let a=t.getAttribute("data-pf-viewport")||"fill",n=pa(a,s);this.setViewport(n,{width:null,height:null}),this.root.querySelector(`[data-pf-viewport="${n}"]`)?.focus()}}var Bl="./Progress-2qzb77kc.stx";var Kl="./Radio-8153x74w.stx";var Wl="./RadioGroup-mz3pv7he.stx";var Ul="./RadioGroupDescription-z34r9avr.stx";var Yl="./RadioGroupLabel-ka0hfm7b.stx";var Zl="./RadioGroupOption-mk98taz5.stx";var ec="./RenderSurface-z9zr4d75.stx";var tc=8192,ve=globalThis;function sc(){return ve.__stxRenderSurfaces??=new Map,ve.__stxRenderSurfaces}function ha(e,t){return Object.assign(Error(t),{code:e})}function fa(){return Boolean(ve.stx?._host?.isNative)}function ac(){if(fa())return typeof ve.craft?.renderSurface?.present==="function"&&ve.craft?.capabilities?.renderSurface===!0?"native":"none";if(typeof document>"u")return"none";return"canvas"}function nc(e,t,s,a){if(typeof e!=="string"||!e)throw TypeError("presentFrame needs the surface's name");if(!(t instanceof Uint32Array))throw TypeError("presentFrame takes a Uint32Array of 0xAARRGGBB words");for(let[n,o]of[["width",s],["height",a]])if(!Number.isInteger(o)||o<1||o>8192)throw TypeError(`presentFrame's ${n} must be a whole number from 1 to 8192, not ${o}`);if(t.length!==s*a)throw TypeError(`presentFrame was given ${t.length} words for a ${s} x ${a} frame (${s*a})`)}function ma(e,t,s,a){if(fa()){let o=ve.craft?.renderSurface;if(!o||typeof o.present!=="function")throw ha("UNAVAILABLE","This device cannot draw a RenderSurface");return o.present(e,t,s,a)}nc(e,t,s,a);let n=sc().get(e);if(!n)throw ha("NOT_FOUND",`No RenderSurface named "${e}" is on the page`);return oc(n,t,s,a),!0}function oc(e,t,s,a){let{canvas:n,context:o,opaque:i}=e;if(n.width!==s)n.width=s;if(n.height!==a)n.height=a;if(!e.image||e.image.width!==s||e.image.height!==a)e.image=o.createImageData(s,a);let r=e.image.data;for(let c=0,l=0;c<t.length;c++,l+=4){let d=t[c],u=d>>>24,p=d>>>16&255,h=d>>>8&255,g=d&255;if(i)u=255;else if(u>0&&u<255)p=Math.min(255,Math.round(p*255/u)),h=Math.min(255,Math.round(h*255/u)),g=Math.min(255,Math.round(g*255/u));r[l]=p,r[l+1]=h,r[l+2]=g,r[l+3]=u}o.putImageData(e.image,0,0)}function ic(e,t,s={}){let a=typeof requestAnimationFrame==="function"?requestAnimationFrame:(r)=>setTimeout(()=>r(Date.now()),16),n=!1,o=!1,i=(r)=>{if(n)return;if(!o)try{let c=t(r);if(c&&!ma(e,c.pixels,c.width,c.height))o=!0}catch(c){if(n=!0,c?.code==="NOT_FOUND")return;if(s.onError)s.onError(c);else throw c;return}a(i)};return a(i),{stop:()=>{n=!0},wake:()=>{o=!1},get waiting(){return o},get ended(){return n}}}var lc="./SegmentedControl-jm6tb9f8.stx";var dc="./Select-36s22z6d.stx";var Z={NONE:0,KEYWORD:1,SUBSTRING:2,WORD_PREFIX:3,PREFIX:4},cv=700,Xe=1600;function we(e){return`stx:settings:${e}`}function U(e,t){if(!t)return null;return e.find((s)=>s.id===t)??null}function pc(e){return(e.find((s)=>!s.parent)??e[0])?.id??""}function Ze(e,...t){for(let s of t)if(U(e,s))return s;return pc(e)}function Qe(e,t){let s=new Set,a=U(e,t);while(a&&a.parent&&!s.has(a.id)){s.add(a.id);let n=U(e,a.parent);if(!n)break;a=n}return a?.id??""}function ue(e,t){let s=U(e,t);if(!s?.parent||s.parent===t)return"";return U(e,s.parent)?s.parent:""}function et(){return{trail:[],cursor:-1}}function he(e){return e.trail[e.cursor]??""}function Me(e,t){if(!t||he(e)===t)return e;let s=[...e.trail.slice(0,e.cursor+1),t];return{trail:s,cursor:s.length-1}}function Re(e){return e.cursor<e.trail.length-1}function tt(e,t=[]){if(e.cursor>0)return!0;return e.cursor===0&&ue(t,he(e))!==""}function st(e,t=[]){if(e.cursor>0)return{trail:e.trail,cursor:e.cursor-1};if(e.cursor===0){let s=ue(t,he(e));if(s)return{trail:[s,...e.trail],cursor:0}}return e}function at(e){return Re(e)?{trail:e.trail,cursor:e.cursor+1}:e}function pe(e){return String(e??"").normalize("NFD").replace(/[\u0300-\u036F]/g,"").toLowerCase().replace(/\s+/g," ").trim()}function ga(e,t){let s=e.indexOf(t);while(s!==-1){if(s===0||!/[\p{L}\p{N}]/u.test(e.charAt(s-1)))return!0;s=e.indexOf(t,s+1)}return!1}function xa(e,t,s){if(t.startsWith(e))return Z.PREFIX;if(ga(t,e))return Z.WORD_PREFIX;if(t.includes(e))return Z.SUBSTRING;if(ga(s,e))return Z.KEYWORD;return Z.NONE}function ba(e,t,s=""){let a=pe(e);if(a==="")return Z.NONE;let n=pe(t),o=pe(s),i=xa(a,n,o),r=a.split(" ");if(i!==Z.NONE||r.length===1)return i;let c=Z.PREFIX;for(let l of r){let d=xa(l,n,o);if(d===Z.NONE)return Z.NONE;c=Math.min(c,d===Z.PREFIX&&l!==r[0]?Z.WORD_PREFIX:d)}return c}function nt(e,t){let s=pe(e);if(s==="")return{query:"",panes:[],settings:[]};let a=[];for(let o of t.items){let i=U(t.panes,o.id),r=`${o.keywords??""} ${i?.keywords??""} ${i&&i.title!==o.label?i.title:""}`;if(ba(s,o.label,r)!==Z.NONE)a.push(o.id)}let n=[];return t.rows.forEach((o,i)=>{if(!o.label)return;let c=U(t.panes,o.pane)?.title??"",l=ba(s,o.label,`${o.keywords??""} ${c}`);if(l!==Z.NONE)n.push({id:o.id,label:o.label,pane:o.pane,paneTitle:c,row:i,rank:l})}),n.sort((o,i)=>i.rank-o.rank||o.row-i.row),{query:s,panes:a,settings:n}}function va(e){if(e<=0)return"No results";return e===1?"1 result":`${e} results`}function zt(e,t,s){if(s<=0)return-1;if(e==="ArrowDown")return Math.min(s-1,t+1);if(e==="ArrowUp")return t<0?s-1:Math.max(0,t-1);if(e==="Home")return 0;if(e==="End")return s-1;return-1}function wa(e,t,s,a=700){return{buffer:(!e||s-e.at>a?"":e.buffer)+pe(t),at:s}}function ya(e,t,s){let a=e.length,n=pe(t);if(a===0||n==="")return-1;let o=n.split("").every((c)=>c===n.charAt(0)),i=o?n.charAt(0):n,r=o?s+1:Math.max(0,s);for(let c=0;c<a;c++){let l=((r+c)%a+a)%a;if(pe(e[l]).startsWith(i))return l}return-1}var hc="./SettingsGroup-t3emsgk2.stx";var mc="./SettingsPane-tqe8q5cw.stx";var xc="./SettingsPaneHeader-wznh6dss.stx";var vc="./SettingsRow-5jgay5ae.stx";var yc="./SettingsSidebarGroup-p5h359bn.stx";var Sc="./SettingsSidebarItem-69zs4b55.stx";var $c="./SettingsUpdateRow-1gsqj04f.stx";var Ec="./SettingsWindow-z76981eg.stx";var Ic="data-stx-settings",ye="data-settings-item",ke="data-settings-pane",Ac="data-settings-row";class Pc{tree;root;options;callbacks;history=et();current="";query="";hits=[];highlighted=null;highlightTimer=null;pressed=new Map;visible=new Map;disposers=[];destroyed=!1;constructor(e,t,s={},a={}){this.tree=e;this.root=t;this.options=s;this.callbacks=a;this.hear(),this.disposers.push(e.observeChildren(t,()=>{if(this.destroyed)return;this.hear(),this.show(!1),this.applySearch(!1)}));let n=this.panes(),o=this.paneNodes().find((i)=>this.tree.getAttribute(i,"data-active")!=null);this.history=Me(this.history,Ze(n,this.stored(),s.pane,o?this.attribute(o,ke):"")),this.show(!0),this.applySearch(!1)}getPane(){return this.current}showPane(e){if(!U(this.panes(),e))return!1;return this.open(e),!0}revealSetting(e){if(!e)return!1;let t=this.rowNodes().find((a)=>this.attribute(a,"data-setting")===e),s=t?this.paneOf(t):"";if(!t||!s)return!1;return this.open(s),this.reveal(t),!0}back(){this.travel(st(this.history,this.panes()))}forward(){this.travel(at(this.history))}search(e){this.query=String(e??""),this.applySearch(!0)}chooseResult(e){let t=this.hits[e];if(!t||this.tree.parent(t.row)===null)return;this.open(t.hit.pane),this.reveal(t.row)}destroy(){this.destroyed=!0;for(let e of this.disposers)e();this.disposers.length=0;for(let e of this.pressed.values())e();this.pressed.clear(),this.visible.clear(),this.clearHighlight()}attribute(e,t){return this.tree.getAttribute(e,t)??""}toggle(e,t){let s=this.attribute(e,"class").split(/\s+/).filter(Boolean),a=this.visible.has(e)?this.visible.get(e):!s.includes("hidden");if(this.visible.set(e,t),a===t)return;let n=s.filter((o)=>o!=="hidden");this.tree.setAttribute(e,"class",(t?n:[...n,"hidden"]).join(" "))}has(e,t){return this.tree.getAttribute(e,t)!=null}closest(e,t){for(let s=e;s;s=this.tree.parent(s))if(this.has(s,t))return s;return null}all(e,t=this.root){return this.tree.descendants(t).filter((s)=>this.has(s,e)&&this.closest(this.tree.parent(s),Ic)===this.root)}paneNodes(){return this.all(ke)}panes(){return this.paneNodes().map((e)=>{let t=this.attribute(e,ke);return{id:t,title:this.attribute(e,"data-title")||t,keywords:this.attribute(e,"data-keywords"),parent:this.attribute(e,"data-parent")}})}itemNodes(){return this.all(ye)}items(){return this.itemNodes().map((e)=>({id:this.attribute(e,ye),label:this.attribute(e,"data-label").trim(),keywords:this.attribute(e,"data-keywords")}))}rowNodes(){return this.all(Ac).filter((e)=>this.paneOf(e)!=="")}paneOf(e){let t=this.closest(e,ke);return t?this.attribute(t,ke):""}stored(){if(!this.options.storageKey||!this.options.storage)return"";try{return this.options.storage.get(we(this.options.storageKey))||""}catch{return""}}store(){if(!this.options.storageKey||!this.options.storage||!this.current)return;try{this.options.storage.set(we(this.options.storageKey),this.current)}catch{}}hear(){let e=new Set;for(let t of this.itemNodes())if(e.add(t),!this.pressed.has(t))this.pressed.set(t,this.tree.listen(t,"click",()=>this.open(this.attribute(t,ye))));for(let t of this.rowNodes()){if(!this.has(t,"data-navigate"))continue;if(e.add(t),!this.pressed.has(t))this.pressed.set(t,this.tree.listen(t,"click",()=>this.navigate(t)))}for(let[t,s]of this.pressed){if(e.has(t))continue;s(),this.pressed.delete(t)}}navigate(e){if(this.attribute(e,"aria-disabled")==="true")return;let t=this.attribute(e,"data-navigate");if(!U(this.panes(),t))return;let s=this.current;this.open(t),this.callbacks.onNavigate?.({id:t,from:s,setting:this.attribute(e,"data-setting")})}open(e){if(!e)return;this.history=Me(this.history,e),this.show(!0)}travel(e){if(e===this.history)return;this.history=e,this.show(!0)}show(e){let t=this.panes(),s=he(this.history),a=U(t,s);if(!a)return;for(let i of this.paneNodes())this.toggle(i,this.attribute(i,ke)===s);let n=Qe(t,s);for(let i of this.itemNodes()){let r=this.attribute(i,ye)===n;for(let c of[i,...this.tree.descendants(i)])this.tree.setAttribute(c,"aria-selected",r?"true":"false")}let o=this.current!==s;if(this.current=s,this.report(),o){if(this.store(),e)this.callbacks.onPane?.({id:s,title:a.title,parent:ue(t,s)})}}report(){let e=this.panes(),t=U(e,this.current),s=this.query.trim()!=="";this.callbacks.onState?.({pane:this.current,title:t?.title??"",canGoBack:tt(this.history,e),canGoForward:Re(this.history),query:this.query,searching:s,results:this.hits.map(({hit:a},n)=>({position:n,label:a.label,pane:a.paneTitle})),empty:s&&this.shownItems===0&&this.hits.length===0})}shownItems=0;applySearch(e){let t=this.rowNodes(),s=t.map((r)=>({id:this.attribute(r,"data-setting"),label:this.attribute(r,"data-label").trim(),keywords:this.attribute(r,"data-keywords"),pane:this.paneOf(r)})),a=nt(this.query,{panes:this.panes(),items:this.items(),rows:s}),n=a.query!=="",o=new Set;for(let r of this.itemNodes()){let c=!n||a.panes.includes(this.attribute(r,ye));if(c)o.add(r);this.toggle(r,c)}this.shownItems=n?a.panes.length:o.size;let i=!0;for(let r of this.all("data-settings-group")){let c=this.all(ye,r).some((l)=>o.has(l));this.toggle(r,c);for(let l of this.all("data-settings-group-gap",r))this.toggle(l,c&&!i);if(c)i=!1}for(let r of this.all("data-settings-account"))this.toggle(r,!n);if(this.hits=a.settings.map((r)=>({hit:r,row:t[r.row]})),this.report(),e)this.callbacks.onSearch?.({query:this.query.trim(),panes:a.panes,settings:a.settings.map((r)=>({id:r.id,label:r.label,pane:r.pane}))})}reveal(e){this.clearHighlight(),this.tree.setAttribute(e,"data-highlight","");let t=this.options.wash?.();if(t)this.tree.setStyle(e,{backgroundColor:t});this.highlighted=e,this.highlightTimer=setTimeout(()=>this.clearHighlight(),Xe)}clearHighlight(){if(this.highlightTimer)clearTimeout(this.highlightTimer);if(this.highlightTimer=null,this.highlighted)this.tree.removeAttribute(this.highlighted,"data-highlight"),this.tree.setStyle(this.highlighted,{backgroundColor:"transparent"});this.highlighted=null}}var yv={grey:"bg-[#8e8e93] dark:bg-[#8e8e93]",blue:"bg-[#007aff] dark:bg-[#0a84ff]",red:"bg-[#ff3b30] dark:bg-[#ff453a]",orange:"bg-[#ff9500] dark:bg-[#ff9f0a]",yellow:"bg-[#ffcc00] dark:bg-[#ffd60a]",green:"bg-[#34c759] dark:bg-[#30d158]",indigo:"bg-[#5856d6] dark:bg-[#5e5ce6]",purple:"bg-[#af52de] dark:bg-[#bf5af2]",pink:"bg-[#ff2d55] dark:bg-[#ff375f]",ink:"bg-[#1d1d1f] dark:bg-[#dcdce0]"};function kv(e){return e==="ink"?"text-[#ffffff] dark:text-[#1d1d1f]":"text-[#ffffff]"}var le="text-[#000000]/85 dark:text-[#ffffff]/85",ee="text-[#000000]/50 dark:text-[#ffffff]/55",ka="text-[#000000]/26 dark:text-[#ffffff]/25",Ht="text-[#ff3b30] dark:text-[#ff453a]",Mc="text-[#007aff] dark:text-[#0a84ff]",Rc="aria-selected:bg-[#007aff] dark:aria-selected:bg-[#0a84ff]",Sa="aria-selected:text-[#ffffff] dark:aria-selected:text-[#ffffff]",Nc="bg-[#000000]/10 dark:bg-[#ffffff]/10",Ca="bg-[#000000]/4 dark:bg-[#ffffff]/5",Sv={shell:"flex-1 flex-row",sidebar:"flex-col bg-[#f2f1f0] dark:bg-[#2a2a2a]",sidebarWidth:226,sidebarMaterial:"sidebar",sidebarTop:"pt-[38px] px-[9px] pb-[6px]",search:"h-[28px] text-[13px]",nav:"flex-1 flex-col px-[9px] pb-[12px]",account:"mt-[7px]",list:"flex-col pt-[7px]",results:"flex-col gap-[2px] pt-[7px]",result:"flex-col justify-center min-h-[38px] px-[8px] py-[4px] rounded-[8px] hover:bg-[#000000]/5 dark:hover:bg-[#ffffff]/6",resultLabel:`text-[13px] ${le}`,resultPane:`text-[11px] ${ee}`,empty:`py-[24px] px-[8px] text-[13px] text-center ${ee}`,group:"flex-col gap-[2px]",groupGap:"h-[11px]",groupLabel:`px-[8px] pb-[3px] text-[11px] font-semibold ${ee}`,item:`flex-row items-center gap-[8px] h-[30px] px-[8px] rounded-[8px] ${Rc}`,itemTile:"h-[20px] w-[20px] rounded-[5.5px] items-center justify-center",itemGlyph:"h-[13px] w-[13px]",itemLabel:`flex-1 text-[13px] ${le} ${Sa}`,itemBadge:`text-[11px] ${ee} ${Sa}`,detail:"flex-1 flex-col bg-[#ffffff] dark:bg-[#1e1e1e]",toolbar:"flex-row items-center gap-[12px] h-[52px] pl-[8px] pr-[16px]",history:"flex-row items-center",historyButton:`text-[15px] ${ee}`,title:`flex-1 text-[20px] font-semibold ${le}`,body:"flex-1 flex-col",pane:"flex-1",paneContent:"flex-col px-[20px] pt-[11px] pb-[20px]",hero:`flex-col items-center mb-[10px] p-[22px] rounded-[12px] ${Ca}`,heroTile:"h-[48px] w-[48px] rounded-[12px] items-center justify-center",heroGlyph:"h-[30px] w-[30px]",heroTitle:`mt-[10px] text-[17px] font-semibold text-center ${le}`,heroDescription:`mt-[4px] text-[13px] text-center ${ee}`,heroExtra:"mt-[8px] flex-col items-center",section:"flex-col mb-[10px]",sectionHeader:`pt-[18px] px-[10px] pb-[8px] text-[13px] font-bold ${le}`,card:`flex-col rounded-[12px] ${Ca}`,sectionFooter:`pt-[6px] px-[10px] text-[11px] ${ee}`,rowRule:`mx-[10px] h-[0.5px] ${Nc}`,row:"flex-row items-center gap-[10px] min-h-[38px] px-[10px]",rowTall:"min-h-[44px]",rowMultiline:"items-start",rowStacked:"flex-col items-stretch gap-[4px] min-h-[38px] px-[10px]",rowPressed:"active:bg-[#000000]/5 dark:active:bg-[#ffffff]/6",rowWash:{light:"#007aff33",dark:"#0a84ff33"},rowTile:"h-[24px] w-[24px] rounded-[6px] items-center justify-center",rowTileMultiline:"mt-[10px]",rowGlyph:"h-[15px] w-[15px]",rowText:"flex-1 flex-col justify-center py-[7px]",rowTextMultiline:"flex-1 flex-col py-[10px]",rowTextStacked:"flex-col pt-[10px]",rowLabel:`text-[13px] ${le}`,rowLabelDestructive:`text-[13px] ${Ht}`,rowDescription:`mt-[1px] text-[11px] ${ee}`,rowControl:"flex-row items-center justify-end gap-[8px]",rowControlMultiline:"flex-row items-center justify-end gap-[8px] py-[10px]",rowControlStacked:"flex-col items-stretch pb-[7px]",rowValue:`text-[13px] ${ee}`,rowChevron:`h-[11px] w-[11px] ${ka}`,rowDisabled:"opacity-50",appearance:"flex-row gap-[14px]",appearanceOption:"flex-col items-center gap-[5px]",appearanceFrame:"p-[3px] rounded-[9px] border-2 border-transparent aria-checked:border-[#007aff] dark:aria-checked:border-[#0a84ff]",appearanceThumb:"h-[44px] w-[67px] flex-row rounded-[6px] overflow-hidden",appearanceLight:"flex-1 bg-[#e9e9eb]",appearanceDark:"flex-1 bg-[#2c2c2e]",appearanceCaption:`text-[11px] ${le}`,updateStatus:`mt-[1px] text-[11px] ${ee}`,updateError:`mt-[1px] text-[11px] ${Ht}`,updateProgress:`text-[11px] ${ee}`,ink:le,inkSecondary:ee,inkTertiary:ka,danger:Ht,accentText:Mc},Cv={back:"chevron.left",forward:"chevron.right",disclosure:"chevron.right"};var Lc={check:"Check Now",install:"Download and Install",relaunch:"Restart to Update"};function Dc(e){let t=Number(e);if(!Number.isFinite(t))return"";return`${Math.round(Math.min(1,Math.max(0,t))*100)}%`}function Tv(e,t=""){let s=String(t||"").trim(),a=String(e?.currentVersion||"").trim(),n=[s,a].filter(Boolean).join(" "),o=(u,p,h={})=>({title:n,sentence:u,action:p,actionLabel:p?Lc[p]:"",busy:!1,progress:"",failed:!1,...h});if(!e||typeof e.state!=="string")return o("",null);let i=s||"This app",r=String(e.version||"").trim(),c=r?`Version ${r}`:"An update",l=e.selfUpdating!==!1,d=String(e.reason||"").trim();switch(e.state){case"unavailable":return o(d||`${i} cannot update itself.`,null);case"idle":return o("Check for a newer version.","check");case"checking":return o("Checking for updates...","check",{busy:!0});case"current":return o(`${i} is up to date.`,"check");case"available":return l?o(`${c} is available.`,"install"):o(`${c} is available. ${d||`${i} cannot update itself.`}`,"check");case"downloading":return o(`Downloading ${r?`version ${r}`:"the update"}...`,"install",{busy:!0,progress:Dc(e.progress)});case"installing":return o(`Installing ${r?`version ${r}`:"the update"}...`,"install",{busy:!0});case"installed":return o(`${c} is installed. Restart ${i} to finish updating.`,"relaunch");case"error":return o(String(e.error||"").trim()||"The update could not be completed.","check",{failed:!0});default:return o("",null)}}import{loadStaticFragment as Oc}from"@stacksjs/stx/static-fragment-client";var Ft="[data-stx-settings]",ot="[data-settings-item]",$a="[data-settings-pane]",zc="[data-settings-row]",Vt="[data-settings-result]",Hc='button, a[href], input, select, textarea, label, [role="switch"], [role="checkbox"], [role="radio"], [role="slider"], [role="button"], [contenteditable]';function Ta(e){return e.replace(/[^\w-]+/g,"-")}class Fc{root;options;callbacks;history=et();current="";query="";storageKey;storage;typed=null;hits=[];queuedReveal=null;fragmentDownloads=new AbortController;highlighted=null;highlightTimer=null;disposers=[];list;account;input;field;results;empty;live;backButton;forwardButton;title;body;constructor(e,t={},s={}){this.root=e;this.options=t;this.callbacks=s;if(this.storageKey=t.storageKey||"",this.storage=t.storage??null,!e.id)e.id=`settings-${Math.random().toString(36).slice(2,8)}`;this.list=this.own("[data-settings-list]"),this.account=this.own("[data-settings-account]"),this.input=this.own("[data-settings-search-input]"),this.field=this.own("[data-settings-search]"),this.results=this.own("[data-settings-results]"),this.empty=this.own("[data-settings-empty]"),this.live=this.own("[data-settings-live]"),this.backButton=this.own("[data-settings-back]"),this.forwardButton=this.own("[data-settings-forward]"),this.title=this.own("[data-settings-title]"),this.body=this.own("[data-settings-body]");for(let o of[this.results,this.live,this.title])if(o)o.__stx_inert_content=!0;if(this.listen(e,"click",(o)=>this.onClick(o)),this.listen(t.globalKeys?document:e,"keydown",(o)=>this.onKeyDown(o)),this.input)this.listen(this.input,"input",()=>this.search(this.input.value));if(this.body)this.listen(this.body,"scroll",()=>this.syncScrolled(),{passive:!0});this.listen(window,"focus",()=>e.setAttribute("data-stx-window-active","true")),this.listen(window,"blur",()=>e.setAttribute("data-stx-window-active","false")),this.describe();let a=this.panes(),n=this.paneElements().find((o)=>!o.hidden)?.getAttribute("data-settings-pane");this.open(Ze(a,this.stored(),t.pane,n)),e.setAttribute("data-settings-ready","")}getPane(){return this.current}showPane(e){if(!U(this.panes(),e))return!1;return this.open(e),!0}revealSetting(e){if(!e)return!1;let t=this.searchableRows().find((s)=>s.id===e);if(!t)return!1;return this.open(t.pane),this.revealRow(t),!0}back(){this.travel(st(this.history,this.panes()))}forward(){this.travel(at(this.history))}focusSearch(){if(!this.input)return;this.input.focus(),this.input.select()}search(e){if(this.query=e,this.input&&this.input.value!==e)this.input.value=e;this.applySearch(!0)}destroy(){this.fragmentDownloads.abort();for(let e of this.disposers)e();this.disposers.length=0,this.clearHighlight(),this.root.removeAttribute("data-settings-ready")}own(e){return this.all(e)[0]??null}all(e,t=this.root){return Array.from(t.querySelectorAll(e)).filter((s)=>s.closest(Ft)===this.root)}listen(e,t,s,a){e.addEventListener(t,s,a),this.disposers.push(()=>e.removeEventListener(t,s,a))}paneElements(){return this.all($a)}paneElement(e){return this.paneElements().find((t)=>t.getAttribute("data-settings-pane")===e)??null}panes(){return this.paneElements().map((e)=>({id:e.getAttribute("data-settings-pane")||"",title:e.getAttribute("data-title")||e.getAttribute("data-settings-pane")||"",keywords:e.getAttribute("data-keywords")||"",parent:e.getAttribute("data-parent")||""})).filter((e)=>e.id!=="")}itemElements(){return this.list?this.all(ot,this.list):[]}visibleItems(){return this.itemElements().filter((e)=>!e.hidden&&!e.disabled)}labelOf(e){return(e.querySelector(".stx-settings-item-label")?.textContent||e.getAttribute("aria-label")||e.textContent||"").trim()}items(){return this.itemElements().map((e)=>({id:e.getAttribute("data-settings-item")||"",label:this.labelOf(e),keywords:e.getAttribute("data-keywords")||""}))}rowElements(e){return this.all(zc,e).filter((t)=>t.closest($a)===e)}searchableRows(){return this.paneElements().flatMap((e)=>{let t=e.getAttribute("data-settings-pane")||"";if(!t)return[];if(e.hasAttribute("data-stx-fragment"))return JSON.parse(e.getAttribute("data-stx-fragment-metadata")||"[]").map(([a,n,o],i)=>({id:a,label:n.trim(),keywords:o,pane:t,position:i}));return this.rowElements(e).map((s,a)=>({id:s.getAttribute("data-setting")||"",label:(s.getAttribute("data-label")||"").trim(),keywords:s.getAttribute("data-keywords")||"",pane:t,position:a}))})}stored(){if(!this.storageKey)return"";try{let e=we(this.storageKey);return(this.storage?this.storage.get(e):localStorage.getItem(e))||""}catch{return""}}store(){if(!this.storageKey||!this.current)return;try{let e=we(this.storageKey);if(this.storage)this.storage.set(e,this.current);else localStorage.setItem(e,this.current)}catch{}}describe(){let e=this.root.id,t=new Map;for(let s of this.itemElements()){let a=s.getAttribute("data-settings-item")||"";if(!s.id)s.id=`${e}-item-${Ta(a)}`;s.setAttribute("role","tab"),t.set(a,s);for(let n=s.parentElement;n&&n!==this.list;n=n.parentElement)if(!n.hasAttribute("role"))n.setAttribute("role","presentation")}for(let s of this.paneElements()){let a=s.getAttribute("data-settings-pane")||"";if(!s.id)s.id=`${e}-pane-${Ta(a)}`;let n=t.get(a);if(n)n.setAttribute("aria-controls",s.id),s.setAttribute("role","tabpanel"),s.setAttribute("aria-labelledby",n.id),s.removeAttribute("aria-label");else if(this.title?.id){if(s.setAttribute("role","region"),!s.hasAttribute("aria-label"))s.setAttribute("aria-label",s.getAttribute("data-title")||a)}}}open(e){if(!e)return;this.history=Me(this.history,e),this.show()}travel(e){if(e===this.history)return;this.history=e,this.show()}show(){this.describe();let e=this.panes(),t=he(this.history),s=U(e,t),a=this.paneElement(t);if(!s||!a)return;let n=document.activeElement,o=n instanceof HTMLElement&&this.paneElements().some((c)=>c!==a&&c.contains(n));for(let c of this.paneElements())c.hidden=c!==a,c.toggleAttribute("data-active",c===a);let i=Qe(e,t);for(let c of this.itemElements()){let l=c.getAttribute("data-settings-item")===i;c.setAttribute("aria-selected",l?"true":"false"),c.toggleAttribute("data-active",l)}if(this.syncTabStops(),this.title)this.title.textContent=s.title;this.root.setAttribute("data-pane",t),this.root.toggleAttribute("data-subpane",ue(e,t)!==""),this.syncHistoryButtons(e);let r=t!==this.current;if(this.current=t,r){if(this.queuedReveal=null,this.clearHighlight(),this.body)this.body.scrollTop=0;if(this.syncScrolled(),o){if(!a.hasAttribute("tabindex"))a.setAttribute("tabindex","-1");a.focus({preventScroll:!0})}this.store(),this.callbacks.onPane?.({id:t,title:s.title,parent:ue(e,t)})}if(a.hasAttribute("data-stx-fragment")&&!a.hasChildNodes())this.loadPane(a)}async loadPane(e){let t=document.createElement("p");if(t.setAttribute("role","status"),t.textContent=this.options.loadingPane??"Loading settings\u2026",e.contains(document.activeElement))e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0});e.replaceChildren(t),e.setAttribute("aria-busy","true");let s=this.fragmentDownloads.signal;try{await Oc(e,s);let a=this.queuedReveal;if(a&&this.current===a.pane&&this.paneElement(a.pane)===e)this.queuedReveal=null,this.revealRow(a)}catch{if(s.aborted||!e.isConnected)return;t.textContent=this.options.failedPane??"Could not load this pane.";let a=document.createElement("button");a.type="button",a.textContent=this.options.retryPane??"Try again",a.addEventListener("click",()=>void this.loadPane(e),{once:!0}),e.replaceChildren(t,a)}finally{e.removeAttribute("aria-busy")}}syncTabStops(){let e=this.visibleItems(),t=e.find((s)=>s.getAttribute("aria-selected")==="true")??e[0];for(let s of this.itemElements())s.setAttribute("tabindex",s===t?"0":"-1")}syncHistoryButtons(e){let t=(n,o,i)=>{if(!n)return;let r=document.activeElement===n;if(n.disabled=!o,r&&!o&&i&&!i.disabled)i.focus()},s=tt(this.history,e),a=Re(this.history);if(s)t(this.backButton,!0,null),t(this.forwardButton,a,this.backButton);else t(this.forwardButton,a,null),t(this.backButton,!1,this.forwardButton)}syncScrolled(){this.root.toggleAttribute("data-scrolled",Boolean(this.body&&this.body.scrollTop>0))}applySearch(e){let t=this.searchableRows(),s=nt(this.query,{panes:this.panes(),items:this.items(),rows:t}),a=s.query!=="";this.root.toggleAttribute("data-searching",a),this.field?.toggleAttribute("data-filled",this.query!=="");for(let o of this.itemElements())o.hidden=a&&!s.panes.includes(o.getAttribute("data-settings-item")||"");if(this.list){for(let o of this.all("[data-settings-group]",this.list))o.hidden=a&&this.all(ot,o).every((i)=>i.hidden);this.list.hidden=a&&s.panes.length===0}if(this.account)this.account.hidden=a;this.hits=s.settings.map((o)=>({hit:o,row:t[o.row]})),this.drawResults();let n=s.panes.length+s.settings.length;if(this.empty)this.empty.hidden=!a||n>0;if(this.live)this.live.textContent=a?va(n):"";if(this.syncTabStops(),e)this.callbacks.onSearch?.({query:this.query.trim(),panes:s.panes,settings:s.settings.map((o)=>({id:o.id,label:o.label,pane:o.pane}))})}drawResults(){let e=this.results;if(!e)return;e.replaceChildren(),e.hidden=this.hits.length===0,this.hits.forEach(({hit:t},s)=>{let a=document.createElement("button");a.type="button",a.className="stx-settings-result",a.setAttribute("data-settings-result",String(s)),a.setAttribute("tabindex","-1");let n=document.createElement("span");n.className="stx-settings-result-label",n.textContent=t.label;let o=document.createElement("span");o.className="stx-settings-result-pane",o.textContent=t.paneTitle,a.append(n,o),e.append(a)})}chooseResult(e){let t=this.hits[e];if(!t)return;this.open(t.hit.pane),this.revealRow(t.row)}clearSearch(){if(this.query===""&&(!this.input||this.input.value===""))return;this.search("")}revealRow(e){let t=this.paneElement(e.pane);if(!t)return;if(t.hasAttribute("data-stx-fragment")){this.queuedReveal=e;return}let s=this.rowElements(t),a=e.id?s.find((n)=>n.getAttribute("data-setting")===e.id):s[e.position];if(a)this.reveal(a)}reveal(e){if(this.body){let t=this.body.getBoundingClientRect(),s=e.getBoundingClientRect();this.body.scrollTop+=s.top-t.top-(t.height-s.height)/2,this.syncScrolled()}this.clearHighlight(),e.setAttribute("data-highlight",""),this.highlighted=e,this.highlightTimer=setTimeout(()=>this.clearHighlight(),Xe)}clearHighlight(){if(this.highlightTimer)clearTimeout(this.highlightTimer);this.highlightTimer=null,this.highlighted?.removeAttribute("data-highlight"),this.highlighted=null}inside(e){return e instanceof Element&&e.closest(Ft)===this.root}navigationRow(e){let t=e.closest("[data-navigate]");if(!t||t.closest(Ft)!==this.root||t.getAttribute("aria-disabled")==="true")return null;let s=e.closest(Hc);if(s&&s!==t&&t.contains(s))return null;return t}navigate(e){let t=e.getAttribute("data-navigate")||"";if(!U(this.panes(),t))return;let s=this.current;this.open(t),this.callbacks.onNavigate?.({id:t,from:s,setting:e.getAttribute("data-setting")||""})}onClick(e){let t=e.target;if(!this.inside(t))return;let s=t.closest(ot);if(s&&this.list?.contains(s)){this.open(s.getAttribute("data-settings-item")||"");return}let a=t.closest(Vt);if(a){this.chooseResult(Number(a.getAttribute("data-settings-result")));return}if(t.closest("[data-settings-back]")){this.back();return}if(t.closest("[data-settings-forward]")){this.forward();return}if(t.closest("[data-settings-search-clear]")){this.clearSearch(),this.input?.focus();return}let n=this.navigationRow(t);if(n)this.navigate(n)}onKeyDown(e){if(e.defaultPrevented)return;let t=(e.metaKey||e.ctrlKey)&&!e.altKey;if(t&&!e.shiftKey){let o=e.key.toLowerCase();if(o==="f"&&this.input){e.preventDefault(),this.focusSearch();return}if(o==="["){e.preventDefault(),this.back();return}if(o==="]"){e.preventDefault(),this.forward();return}}let s=e.target;if(!this.inside(s))return;if(e.key==="Escape"&&this.query!==""){e.preventDefault(),this.clearSearch(),this.visibleItems().find((o)=>o.getAttribute("tabindex")==="0")?.focus();return}if(s===this.input){this.onSearchKey(e);return}let a=s.closest(Vt);if(a){this.onResultKey(e,a);return}let n=s.closest(ot);if(n&&this.list?.contains(n)){this.onItemKey(e,n);return}if((e.key==="Enter"||e.key===" ")&&!t&&!e.altKey){let o=s.closest("[data-navigate]");if(o&&o===s&&this.navigationRow(s))e.preventDefault(),this.navigate(o)}}resultButtons(){return this.results?Array.from(this.results.querySelectorAll(Vt)):[]}onSearchKey(e){if(e.key==="ArrowDown"){let t=this.visibleItems()[0]??this.resultButtons()[0];if(t)e.preventDefault(),t.focus()}else if(e.key==="Enter"&&this.query.trim()!==""){e.preventDefault();let t=this.visibleItems()[0];if(t)this.open(t.getAttribute("data-settings-item")||"");else this.chooseResult(0)}}onResultKey(e,t){let s=this.resultButtons(),a=s.indexOf(t);if(e.key==="ArrowUp"&&a===0){let o=this.visibleItems(),i=o[o.length-1]??this.input;if(i)e.preventDefault(),i.focus();return}let n=zt(e.key,a,s.length);if(n===-1)return;e.preventDefault(),s[n].focus()}onItemKey(e,t){if(e.metaKey||e.ctrlKey||e.altKey)return;let s=this.visibleItems(),a=s.indexOf(t);if(e.key==="ArrowDown"&&a===s.length-1){let o=this.resultButtons()[0];if(o){e.preventDefault(),o.focus();return}}let n=zt(e.key,a,s.length);if(n===-1&&e.key.length===1&&(e.key!==" "||this.typed!==null)){let o=wa(this.typed,e.key,Date.now());if(e.key===" "&&o.buffer.trim()===""){this.typed=null;return}if(this.typed=o,n=ya(s.map((i)=>this.labelOf(i)),o.buffer,a),n===-1){e.preventDefault();return}}if(n===-1)return;e.preventDefault(),s[n].focus(),this.open(s[n].getAttribute("data-settings-item")||"")}}var jc="./Sidebar-7rya9gcp.stx";var _c="./SidebarFooter-s7skj92y.stx";var qc="./SidebarHeader-x7jdhmyr.stx";var Gc="./SidebarItem-64sjb2fe.stx";var Jc="./SidebarPinned-48kyk193.stx";var Xc="./SidebarSection-vx5bahsk.stx";var Qc="./SidebarSpace-3w1cfnzj.stx";var td="./SidebarSpaces-mdtrynr2.stx";var ad="./SidebarSpaceSwitcher-1mycft2g.stx";var it={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},fe={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/75 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/60 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/75 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},nd={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},od={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},id={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},rd={...fe,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},ld={...fe,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},cd={...fe,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ea={macos:fe,tahoe:fe,"macos-tahoe":fe,"macos-latest":fe,arc:id,workspace:nd,desktop:od,solid:rd,transparent:ld,vibrancy:cd};function ew(e){return Ea[e||"macos"]||Ea.macos}function tw(e){if(!e)return;return it[e]||e}var dd=it.gray;function ce(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Ia(e){return{light:{from:ce(e,35,"#ffffff"),to:ce(e,12.5,"#ffffff"),ink:ce(e,22,"#17171b"),accent:ce(e,88,"#2a2a30")},dark:{from:ce(e,27,"#101014"),to:ce(e,10,"#08080b"),ink:ce(e,12,"#f4f4f7"),accent:ce(e,74,"#ffffff")}}}function nw(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function pd(e){if(!e)return Ia(dd);if(typeof e!=="string")return e;return Ia(it[e]||e)}function ud(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Aa(e,t,s,a){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||a}}function hd(e){let t=pd(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Aa(e.action,e.id,"action","i-f7-plus"),clear:Aa(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:ud(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function ow(e){return(e||[]).map(hd)}function iw(e,t){if(!t)return 0;let s=e.findIndex((a)=>a.id===t);return s===-1?0:s}function rw(e){return e.map((t)=>t.tint)}var md="./Skeleton-7et0tqrp.stx";var $w=101;function Se(e,t){let s=typeof e==="number"?e:Number.parseFloat(String(e));return Number.isFinite(s)?s:t}function Tw(e,t,s){let a=Se(e,0),n=Se(t,100),o=Se(s,1);return{min:Math.min(a,n),max:Math.max(a,n),step:o>0?o:0}}function Pa(e){if(!Number.isFinite(e))return 0;let t=String(e).toLowerCase(),s=t.indexOf("e-");if(s!==-1)return Number.parseInt(t.slice(s+2),10)+Math.max(0,t.slice(0,s).split(".")[1]?.length??0);return t.split(".")[1]?.length??0}function me(e,t){let{min:s,max:a,step:n}=t,o=Math.min(a,Math.max(s,Se(e,s)));if(n<=0)return o;let i=Math.round((o-s)/n),r=Math.floor((a-s)/n+0.0000001);if(i>r)i=r;let c=Math.max(Pa(n),Pa(s));return Number((s+i*n).toFixed(Math.min(c,20)))}function Ew(e,t){let s=t.max-t.min;if(s<=0)return 0;return(Math.min(t.max,Math.max(t.min,Se(e,t.min)))-t.min)/s}function Iw(e,t){let s=Math.min(1,Math.max(0,Number.isFinite(e)?e:0));return me(t.min+s*(t.max-t.min),t)}function Aw(e,t){let s=t.max-t.min;if(s<=0||e===!1||e==null||e===""||e==="false")return[];if(e===!0||e==="true"){if(t.step<=0)return[];let n=Math.floor(s/t.step+0.0000001)+1;if(n<2||n>101)return[];return Array.from({length:n},(o,i)=>Math.min(1,i*t.step/s))}let a=Math.floor(Se(e,0));if(a<2||a>101)return[];return Array.from({length:a},(n,o)=>o/(a-1))}function Pw(e,t,s,a=10){let n=s.step>0?s.step:(s.max-s.min)/100;if(e==="ArrowRight"||e==="ArrowUp")return me(t+n,s);if(e==="ArrowLeft"||e==="ArrowDown")return me(t-n,s);if(e==="PageUp")return me(t+n*a,s);if(e==="PageDown")return me(t-n*a,s);if(e==="Home")return me(s.min,s);if(e==="End")return me(s.max,s);return null}var xd="./Slider-cebse060.stx";var vd="./Spinner-vhnc3y03.stx";function wd(e){return Array.from({length:e},()=>1/e)}function rt(e,t){if(t<=0)return[];if(!e||e.length!==t||e.some((a)=>typeof a!=="number"||!Number.isFinite(a)||a<=0))return wd(t);let s=e.reduce((a,n)=>a+n,0);return e.map((a)=>a/s)}function Ma(e){let t=e;if(typeof e==="string"){let a=e.trim();if(a==="")return null;if(a.charAt(0)==="[")try{t=JSON.parse(a)}catch{return null}else t=a.split(/[\s,]+/).map((n)=>Number.parseFloat(n))}if(!Array.isArray(t)||t.length===0)return null;let s=t.map((a)=>typeof a==="string"?Number.parseFloat(a):a);return s.every((a)=>typeof a==="number"&&Number.isFinite(a)&&a>0)?s:null}function jt(e,t){if(typeof e==="number")return Number.isFinite(e)&&e>=0?e:t;if(typeof e!=="string"||e.trim()==="")return t;let s=Number.parseFloat(e);return Number.isFinite(s)&&s>=0?s:t}function Ra(e,t,s){let a=e.length;if(a===0||t<=0)return[...e];let n=s.map((c)=>Math.max(0,c.min)),o=n.reduce((c,l)=>c+l,0);if(o>=t)return o===0?[...e]:n.map((c)=>c/o);let i=e.map((c)=>c*t);for(let c=0;c<=a;c++){let l=0;for(let p=0;p<a;p++){let h=Math.min(Math.max(i[p],n[p]),s[p].max);l+=i[p]-h,i[p]=h}if(Math.abs(l)<0.000000001)break;let d=i.map((p,h)=>l>0?s[h].max-p:p-n[h]),u=d.reduce((p,h)=>p+(Number.isFinite(h)?h:t),0);if(u<0.000000001)break;for(let p=0;p<a;p++){let h=(Number.isFinite(d[p])?d[p]:t)/u;i[p]+=l*h}}let r=i.reduce((c,l)=>c+l,0);return i.map((c)=>c/r)}function Bt(e,t,s,a,n){let o=e.length;if(t<0||t>=o-1||a<=0||s===0)return[...e];let i=e.map((p)=>p*a),r=s>0,c=r?t:t+1,l=r?1:-1,d=Math.min(Math.abs(s),n[c].max-i[c]);if(d<=0)return[...e];let u=0;for(let p=r?t+1:t;p>=0&&p<o&&d>0.000000001;p+=l){let h=Math.min(d,Math.max(0,i[p]-Math.max(0,n[p].min)));i[p]-=h,u+=h,d-=h}return i[c]+=u,i.map((p)=>p/a)}function lt(e,t,s,a){let n=e.map((i)=>i*s),o=(i,r)=>{let c=0;for(let l=i;l<=r;l++)c+=Math.max(0,n[l]-Math.max(0,a[l].min));return c};return{back:Math.min(o(0,t),a[t+1].max-n[t+1]),forward:Math.min(o(t+1,e.length-1),a[t].max-n[t])}}function Na(e,t,s,a){let n=lt(e,t,s,a),o=e[t]*100,i=s>0?100/s:0;return{now:Math.round(o),min:Math.round(o-n.back*i),max:Math.round(o+n.forward*i)}}function _t(e){return`stx:split-pane:${e}`}function La(e){return JSON.stringify(e.map((t)=>Math.round(t*1e4)/1e4))}var kd="./SplitPane-7sqfdwqa.stx";var Da="data-split-separator";class Sd{root;callbacks;direction;panes=[];separators=[];sizes=[];initial=[];limits=[];minSize;step;label;storageKey;observer=null;drag=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.direction=t.direction==="vertical"?"vertical":"horizontal",this.minSize=t.minSize??48,this.step=t.step??16,this.label=t.label||"Resize panes",this.storageKey=t.storageKey||"",this.collect(),this.initial=this.startingSizes(t.sizes),this.sizes=rt(this.stored()??this.initial,this.panes.length),this.build(),this.apply(!1),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.apply(!1)),this.observer.observe(this.root);this.root.setAttribute("data-split-ready","")}getSizes(){return[...this.sizes]}setSizes(e){if(!e||e.length!==this.panes.length)return;this.sizes=rt(e,this.panes.length),this.apply(!0),this.report(-1,"api",!0)}reset(e=-1){this.sizes=[...this.initial],this.apply(!0),this.report(e,"reset",!0)}setDirection(e){let t=e==="vertical"?"vertical":"horizontal";if(t===this.direction)return;this.direction=t,this.root.setAttribute("data-direction",t);for(let s of this.separators)s.setAttribute("aria-orientation",t==="horizontal"?"vertical":"horizontal");this.apply(!1)}destroy(){this.observer?.disconnect();for(let e of this.disposers)e();for(let e of this.separators)e.remove();for(let e of this.panes)e.style.removeProperty("flex"),e.removeAttribute("data-split-pane");this.root.removeAttribute("data-split-ready")}available(){let e=this.root.getBoundingClientRect(),t=this.direction==="horizontal"?e.width:e.height,s=0;for(let a of this.separators){let n=a.getBoundingClientRect();s+=this.direction==="horizontal"?n.width:n.height}return Math.max(0,t-s)}collect(){this.panes=Array.from(this.root.children).filter((e)=>e instanceof HTMLElement&&!e.hasAttribute(Da)),this.limits=this.panes.map((e)=>({min:jt(e.getAttribute("data-min-size"),this.minSize),max:jt(e.getAttribute("data-max-size"),Number.POSITIVE_INFINITY)}))}startingSizes(e){let t=this.panes.map((a)=>Number.parseFloat(a.getAttribute("data-size")||"")),s=t.every((a)=>Number.isFinite(a)&&a>0)?t:null;return rt(e&&e.length===this.panes.length?e:s,this.panes.length)}stored(){if(!this.storageKey)return null;try{let e=Ma(localStorage.getItem(_t(this.storageKey)));return e&&e.length===this.panes.length?e:null}catch{return null}}store(){if(!this.storageKey)return;try{localStorage.setItem(_t(this.storageKey),La(this.sizes))}catch{}}build(){let e=this.root.id||`split-${Math.random().toString(36).slice(2,8)}`;this.panes.forEach((t,s)=>{if(t.setAttribute("data-split-pane",""),!t.id)t.id=`${e}-pane-${s}`;if(s===this.panes.length-1)return;let a=document.createElement("div");a.setAttribute(Da,""),a.setAttribute("role","separator"),a.setAttribute("tabindex","0"),a.setAttribute("aria-orientation",this.direction==="horizontal"?"vertical":"horizontal"),a.setAttribute("aria-controls",t.id),a.setAttribute("aria-label",this.panes.length>2?`${this.label} ${s+1} and ${s+2}`:this.label),a.className="stx-split-separator",t.after(a),this.separators.push(a);let n=(o,i)=>{a.addEventListener(o,i),this.disposers.push(()=>a.removeEventListener(o,i))};n("pointerdown",(o)=>this.onPointerDown(o,s)),n("pointermove",(o)=>this.onPointerMove(o)),n("pointerup",(o)=>this.onPointerEnd(o)),n("pointercancel",(o)=>this.onPointerEnd(o)),n("dblclick",()=>this.reset(s)),n("keydown",(o)=>this.onKeyDown(o,s))})}apply(e){let t=this.available();if(t>0)this.sizes=Ra(this.sizes,t,this.limits);if(this.panes.forEach((s,a)=>{s.style.flex=`${(this.sizes[a]*1000).toFixed(3)} 1 0px`}),this.separators.forEach((s,a)=>{let n=Na(this.sizes,a,t,this.limits);s.setAttribute("aria-valuenow",String(n.now)),s.setAttribute("aria-valuemin",String(n.min)),s.setAttribute("aria-valuemax",String(n.max))}),e)this.store()}report(e,t,s){let a=this.available(),n={sizes:[...this.sizes],pixels:this.sizes.map((o)=>Math.round(o*a)),index:e,source:t};if(this.callbacks.onResize?.(n),s)this.callbacks.onResizeEnd?.(n)}position(e){return this.direction==="horizontal"?e.clientX:e.clientY}onPointerDown(e,t){if(e.button!==0)return;e.preventDefault();let s=this.separators[t];try{s.setPointerCapture(e.pointerId)}catch{}this.drag={index:t,start:this.position(e),sizes:[...this.sizes],pointer:e.pointerId},this.root.setAttribute("data-dragging",""),s.setAttribute("data-active","")}onPointerMove(e){let t=this.drag;if(!t||e.pointerId!==t.pointer)return;this.sizes=Bt(t.sizes,t.index,this.position(e)-t.start,this.available(),this.limits),this.apply(!1),this.report(t.index,"pointer",!1)}onPointerEnd(e){let t=this.drag;if(!t||e.pointerId!==t.pointer)return;this.drag=null,this.root.removeAttribute("data-dragging"),this.separators[t.index].removeAttribute("data-active");try{this.separators[t.index].releasePointerCapture(e.pointerId)}catch{}this.store(),this.report(t.index,"pointer",!0)}onKeyDown(e,t){let s=this.direction==="horizontal",a=this.available(),n=this.step*(e.shiftKey?5:1),o=0;if(e.key===(s?"ArrowLeft":"ArrowUp"))o=-n;else if(e.key===(s?"ArrowRight":"ArrowDown"))o=n;else if(e.key==="Home")o=-lt(this.sizes,t,a,this.limits).back;else if(e.key==="End")o=lt(this.sizes,t,a,this.limits).forward;else if(e.key==="Enter"){e.preventDefault(),this.reset(t);return}else return;e.preventDefault(),this.sizes=Bt(this.sizes,t,o,a,this.limits),this.apply(!0),this.report(t,"keyboard",!0)}}var $d="./Stepper-68gxcmej.stx";var Ed="./StepperStep-zf4pq1s0.stx";class ct{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let a=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((o)=>o(n,a,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let a=0;a<t.length;a++)s+=String.fromCharCode(t.charCodeAt(a)^this.encryptionKey.charCodeAt(a%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,a=[],n="";for(let o=0;o<e.length;o++){let i=e.charAt(o),r=n+i;if(t[r]!==void 0)n=r;else a.push(n.length>1?t[n]:n.charCodeAt(0)),t[r]=s++,n=i}if(n!=="")a.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(a)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},a=256,n=String.fromCharCode(t[0]),o=n;for(let i=1;i<t.length;i++){let r=t[i],c;if(s[r]!==void 0)c=s[r];else if(r===a)c=n+n.charAt(0);else return e;o+=c,s[a++]=n+c.charAt(0),n=c}return o}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let a=this.getKey(e),n=this.get(e),o={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let i=JSON.stringify(o);if(s?.compress)i=this.compress(i);if(s?.encrypt)i=this.encrypt(i);this.storage.setItem(a,i),this.notifyWatchers(e,t,n)}catch(i){console.error("Storage set error:",i)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let a=JSON.parse(s);if(a.expire&&Date.now()-a.timestamp>a.expire)return this.remove(e),null;return a.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let a=this.watchers.get(e);if(a)a.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let a=this.storage.key(s);if(a){let n=this.storage.getItem(a)||"";e+=a.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,a])=>{this.set(s,a,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var Zw={local:new ct("local"),session:new ct("session")};function Qw(e="local",t){return new ct(e,t)}var Ad="./Switch-7s3bhjg4.stx";var Md="./Table-0a4y46vd.stx";var Nd="./TableBody-y49bqb1p.stx";var Dd="./TableCell-jhvsxw8b.stx";var zd="./TableHead-e9xvjx2j.stx";var Fd="./TableHeader-krzcx4sv.stx";var jd="./TableRow-dt8e11aj.stx";var _d="./Tab-j9f4t166.stx";var qd="./TabList-r1pc87xs.stx";var Gd="./TabPanel-5htevsq6.stx";var Jd="./Tabs-psm5wj7c.stx";var Xd="./Teleport-vqs75x36.stx";var Qd="./Textarea-bb63fsz0.stx";var tp="./AiTextarea-bg6xq5wc.stx";var ap="./Tooltip-68ka4jw7.stx";var op="./Transition-7m0mk45s.stx";var rp="./Video-bqsx3wr8.stx";var cp="./VirtualList-fa7v5a3h.stx";var pp="./VirtualTable-kp7b3wyv.stx";var up=0;function Oa(e="a11y"){return`${e}-${++up}-${Date.now()}`}function Jy(e,t,s={}){let{visible:a=!1,id:n=Oa("label")}=s,o=document.createElement(a?"label":"span");if(o.id=n,o.textContent=e,!a)Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return n}function Yy(e,t){let s=Oa("desc"),a=document.createElement("span");if(a.id=s,a.textContent=e,Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return s}function Xy(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function Kt(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function Zy(e,t={}){let{initialFocus:s,returnFocus:a,escapeDeactivates:n=!0,clickOutsideDeactivates:o=!0,allowOutsideClick:i=!1,onActivate:r,onDeactivate:c}=t,l=!1,d=!1,u=null,p=(v)=>{if(d)return;if(n&&v.key==="Escape"){v.preventDefault(),m();return}if(v.key==="Tab"){let b=Kt(e);if(b.length===0){v.preventDefault();return}let C=b[0],P=b[b.length-1];if(v.shiftKey){if(document.activeElement===C)v.preventDefault(),P.focus()}else if(document.activeElement===P)v.preventDefault(),C.focus()}},h=(v)=>{if(d)return;if(!e.contains(v.target)){if(typeof i==="function"){if(!i(v)&&o)m()}else if(!i&&o)m()}};function g(){if(l)return;l=!0,u=document.activeElement;let v=s||Kt(e)[0];if(v&&typeof v.focus==="function")v.focus();document.addEventListener("keydown",p),document.addEventListener("click",h),r?.()}function m(){if(!l)return;l=!1;let v=a||u;if(v&&typeof v.focus==="function")v.focus();document.removeEventListener("keydown",p),document.removeEventListener("click",h),c?.()}function w(){d=!0}function y(){d=!1}return{activate:g,deactivate:m,pause:w,unpause:y}}function Qy(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:a=0,orientation:n="both",loop:o=!0,onFocusChange:i}=t,r=a,c=()=>Array.from(e.querySelectorAll(s)),l=(u)=>{let p=c();if(u<0||u>=p.length)return;p.forEach((h,g)=>{if(g===u){if(h.setAttribute("tabindex","0"),typeof h.focus==="function")h.focus()}else h.setAttribute("tabindex","-1")}),r=u,i?.(u,p[u])},d=(u)=>{let h=c().length-1,g=!1,m=r;switch(u.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(m=r+1,m>h)m=o?0:h;g=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(m=r-1,m<0)m=o?h:0;g=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(m=r+1,m>h)m=o?0:h;g=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(m=r-1,m<0)m=o?h:0;g=!0}break;case"Home":m=0,g=!0;break;case"End":m=h,g=!0;break}if(g)u.preventDefault(),l(m)};return l(a),e.addEventListener("keydown",d),()=>{e.removeEventListener("keydown",d)}}var e0={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function t0(e){return document.activeElement===e}function s0(e,t){let s=t||document.activeElement,a=Kt(document.body),n=a.indexOf(s);if(n===-1)return;let o=e==="next"?n+1:n-1,i=a[o];if(i)i.focus()}function a0(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var n0={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function o0(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function i0(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function r0(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function l0(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function c0(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function d0(e){let t=[],s=(a)=>{let n=e.getAttribute(a);if(n){let o=n.split(" ");for(let i of o)if(!document.getElementById(i))t.push(`${a} references non-existent ID: ${i}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var hp=(e,t,s,a)=>s*e/a+t,fp=(e,t,s,a)=>(e/=a,s*e*e+t),mp=(e,t,s,a)=>(e/=a,-s*e*(e-2)+t),gp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},xp=(e,t,s,a)=>(e/=a,s*e*e*e+t),bp=(e,t,s,a)=>(e/=a,e--,s*(e*e*e+1)+t),vp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},wp=(e,t,s,a)=>(e/=a,s*e*e*e*e+t),yp=(e,t,s,a)=>(e/=a,e--,-s*(e*e*e*e-1)+t),kp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},Sp=(e,t,s,a)=>(e/=a,s*e*e*e*e*e+t),Cp=(e,t,s,a)=>(e/=a,e--,s*(e*e*e*e*e+1)+t),$p=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Tp=(e,t,s,a)=>-s*Math.cos(e/a*(Math.PI/2))+s+t,Ep=(e,t,s,a)=>s*Math.sin(e/a*(Math.PI/2))+t,Ip=(e,t,s,a)=>-s/2*(Math.cos(Math.PI*e/a)-1)+t,Ap=(e,t,s,a)=>e===0?t:s*2**(10*(e/a-1))+t,Pp=(e,t,s,a)=>e===a?t+s:s*(-(2**(-10*e/a))+1)+t,Mp=(e,t,s,a)=>{if(e===0)return t;if(e===a)return t+s;if(e/=a/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Rp=(e,t,s,a)=>(e/=a,-s*(Math.sqrt(1-e*e)-1)+t),Np=(e,t,s,a)=>(e/=a,e--,s*Math.sqrt(1-e*e)+t),Lp=(e,t,s,a)=>{if(e/=a/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Dp=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!o)o=a*0.3;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);return e-=1,-(i*2**(10*e)*Math.sin((e*a-n)*(2*Math.PI)/o))+t},Op=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!o)o=a*0.3;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);return i*2**(-10*e)*Math.sin((e*a-n)*(2*Math.PI)/o)+s+t},zp=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a/2,e===2)return t+s;if(!o)o=a*0.44999999999999996;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);if(e<1)return e-=1,-0.5*(i*2**(10*e)*Math.sin((e*a-n)*(2*Math.PI)/o))+t;return e-=1,i*2**(-10*e)*Math.sin((e*a-n)*(2*Math.PI)/o)*0.5+s+t},Hp=(e,t,s,a)=>(e/=a,s*e*e*(2.70158*e-1.70158)+t),Fp=(e,t,s,a)=>(e/=a,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),Vp=(e,t,s,a)=>{let n=1.70158;if(e/=a/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},qt=(e,t,s,a)=>{if(e/=a,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},za=(e,t,s,a)=>s-qt(a-e,0,s,a)+t,jp=(e,t,s,a)=>{if(e<a/2)return za(e*2,0,s,a)*0.5+t;return qt(e*2-a,0,s,a)*0.5+s*0.5+t},u0={linear:hp,easeInQuad:fp,easeOutQuad:mp,easeInOutQuad:gp,easeInCubic:xp,easeOutCubic:bp,easeInOutCubic:vp,easeInQuart:wp,easeOutQuart:yp,easeInOutQuart:kp,easeInQuint:Sp,easeOutQuint:Cp,easeInOutQuint:$p,easeInSine:Tp,easeOutSine:Ep,easeInOutSine:Ip,easeInExpo:Ap,easeOutExpo:Pp,easeInOutExpo:Mp,easeInCirc:Rp,easeOutCirc:Np,easeInOutCirc:Lp,easeInElastic:Dp,easeOutElastic:Op,easeInOutElastic:zp,easeInBack:Hp,easeOutBack:Fp,easeInOutBack:Vp,easeInBounce:za,easeOutBounce:qt,easeInOutBounce:jp};function Bp(e,t={}){let{duration:s="1s",timing:a="ease",delay:n="0s",iteration:o="1",direction:i="normal",fill:r="both",playState:c="running"}=t;return`${e} ${s} ${a} ${n} ${o} ${i} ${r} ${c}`}function Ha(e,t,s={}){e.style.animation=Bp(t,s)}function f0(e){e.style.animation=""}function _p(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function m0(e,t,s={}){let{stagger:a=100,...n}=s;e.forEach((o,i)=>{let r=`${i*a}ms`;Ha(o,t,{...n,delay:r})})}async function g0(e,t){for(let s of t)Ha(e,s.name,s.options),await _p(e)}var x0={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function b0(e,t,s=1000){return new Promise((a)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),a()},s)})}function v0(e,t){let s=`
16
+ `}function ba(e,t,s,a,n=0){if(a<=0||s<=0)return{start:0,end:0};let o=Math.floor(Math.max(0,e)/s),i=Math.ceil((Math.max(0,e)+Math.max(0,t))/s),r=Math.min(a,Math.max(0,o-n));return{start:r,end:Math.max(r,Math.min(a,i+n))}}function va(e,t,s){let a=s.rows-1,n=Math.max(0,s.columns-1),o=Math.max(1,s.page),{row:i,column:r}=e;switch(t){case"ArrowUp":i=Math.max(-1,i-1);break;case"ArrowDown":i=Math.min(a,i+1);break;case"ArrowLeft":r-=1;break;case"ArrowRight":r+=1;break;case"PageUp":i=i<=0?i:Math.max(0,i-o);break;case"PageDown":i=Math.min(a,Math.max(0,i)+(i<0?0:o));break;case"Home":if(r=0,s.mod)i=Math.min(0,a);break;case"End":if(r=n,s.mod)i=a;break;default:return e}return{row:Math.max(-1,Math.min(a,i)),column:Math.max(0,Math.min(n,r))}}function Kr(e,t,s=!1){let a=e.find((o)=>o.key===t),n=!a?{key:t,direction:"asc"}:a.direction==="asc"?{key:t,direction:"desc"}:null;if(!s)return n?[n]:[];if(!a)return[...e,n];return n?e.map((o)=>o.key===t?n:o):e.filter((o)=>o.key!==t)}var ha=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});class Wt{rows=[];columns=[];view=new Uint32Array(0);sort=[];filter="";selected=new Set;given=null;filtered=new Uint32Array(0);searchText=null;sortKeys=new Map;offsets=new Float64Array(1);anchor=-1;charWidth;cellPadding;constructor(e=[],t=null,s={}){this.charWidth=s.charWidth??7.25,this.cellPadding=s.cellPadding??24,this.given=t&&t.length>0?[...t]:null,this.setRows(e)}get count(){return this.view.length}get totalWidth(){return this.offsets[this.columns.length]}setRows(e){this.rows=Array.isArray(e)?e:[],this.selected.clear(),this.anchor=-1,this.forget(),this.resolveColumns(),this.refilter()}setColumns(e){this.given=e&&e.length>0?[...e]:null,this.forget(),this.resolveColumns(),this.sort=this.sort.filter((t)=>this.columns.some((s)=>s.key===t.key)),this.refilter()}setFilter(e){return this.filter=e==null?"":String(e),this.refilter(),this.count}setSort(e){this.sort=(e??[]).filter((t)=>t&&(t.direction==="asc"||t.direction==="desc")&&this.columns.some((s)=>s.key===t.key)),this.resort()}toggleSort(e,t=!1){let s=this.columns.find((a)=>a.key===e);if(!s||!s.sortable)return this.sort;return this.sort=Kr(this.sort,e,t),this.resort(),this.sort}sortOf(e){let t=this.sort.findIndex((s)=>s.key===e);return t<0?null:{direction:this.sort[t].direction,priority:t+1}}rowAt(e){return e>=0&&e<this.view.length?this.rows[this.view[e]]:void 0}valueAt(e,t){let s=this.columns[t],a=this.rowAt(e);return s&&a!==void 0?ue(a,s):void 0}viewRows(){let e=Array.from({length:this.view.length});for(let t=0;t<e.length;t++)e[t]=this.rows[this.view[t]];return e}toCsv(){return qr(this.viewRows(),this.columns)}toJson(){return _r(this.viewRows(),this.columns)}select(e,t="replace"){if(e<0||e>=this.view.length)return;let s=this.view[e];if(t==="range"&&this.anchor>=0){let a=Math.min(this.anchor,e),n=Math.max(this.anchor,e);this.selected.clear();for(let o=a;o<=n&&o<this.view.length;o++)this.selected.add(this.view[o]);return}if(t==="toggle")if(this.selected.has(s))this.selected.delete(s);else this.selected.add(s);else this.selected.clear(),this.selected.add(s);this.anchor=e}selectAll(){this.selected.clear();for(let e=0;e<this.view.length;e++)this.selected.add(this.view[e])}clearSelection(){this.selected.clear(),this.anchor=-1}isSelected(e){return e>=0&&e<this.view.length&&this.selected.has(this.view[e])}selectedIndices(){return[...this.selected].sort((e,t)=>e-t)}selectedRows(){return this.selectedIndices().map((e)=>this.rows[e])}offsetOf(e){return this.offsets[Math.max(0,Math.min(this.columns.length,e))]}columnAt(e){let t=this.columns.length;if(t===0)return-1;let s=0,a=t-1;while(s<a){let n=s+a+1>>1;if(this.offsets[n]<=e)s=n;else a=n-1}return s}columnRange(e,t,s=0){let a=this.columns.length;if(a===0)return{start:0,end:0};let n=this.columnAt(Math.max(0,e)),o=this.columnAt(Math.max(0,e)+Math.max(0,t));return{start:Math.max(0,n-s),end:Math.min(a,o+1+s)}}resizeColumn(e,t){let s=this.columns[e];if(!s)return 0;return s.width=Math.round(Math.max(s.minWidth,Math.min(s.maxWidth,t))),this.measure(),s.width}autoWidth(e,t=200){let s=this.columns[e];if(!s)return 0;let a=s.label.length+3,n=Math.min(this.view.length,t);for(let i=0;i<n;i++){let r=_e(ue(this.rows[this.view[i]],s),s.type).length;if(r>a)a=r}let o=Math.ceil(a*this.charWidth+this.cellPadding);return Math.max(s.minWidth,Math.min(s.maxWidth,420,o))}forget(){this.searchText=null,this.sortKeys.clear()}resolveColumns(){let e=this.given??Br(this.rows),t=Math.min(this.rows.length,200),s=this.view;this.view=new Uint32Array(t);for(let a=0;a<t;a++)this.view[a]=a;this.columns=e.map((a)=>{let n=a.type;if(!n){let o=[];for(let i=0;i<t;i++)o.push(ue(this.rows[i],a));n=Vr(o)}return{...a,label:a.label??a.key,type:n,width:a.width??0,minWidth:a.minWidth??48,maxWidth:a.maxWidth??2000,align:a.align??(n==="number"?"right":"left"),sortable:a.sortable!==!1}}),this.columns.forEach((a,n)=>{if(!a.width)a.width=this.autoWidth(n);a.width=Math.max(a.minWidth,Math.min(a.maxWidth,a.width))}),this.view=s,this.measure()}measure(){let e=new Float64Array(this.columns.length+1);for(let t=0;t<this.columns.length;t++)e[t+1]=e[t]+this.columns[t].width;this.offsets=e}searchable(){if(this.searchText)return this.searchText;let e=this.rows,t=this.columns,s=Array.from({length:e.length});for(let a=0;a<e.length;a++){let n=e[a],o="";for(let i=0;i<t.length;i++){let r=ue(n,t[i]);if(r===null||r===void 0)continue;o+=typeof r==="string"?r:_e(r,t[i].type),o+="\x01"}s[a]=o.toLowerCase()}return this.searchText=s,s}refilter(){let e=this.rows.length,t=this.filter.toLowerCase().split(/\s+/).filter(Boolean);if(t.length===0){let s=new Uint32Array(e);for(let a=0;a<e;a++)s[a]=a;this.filtered=s}else{let s=this.searchable(),a=new Uint32Array(e),n=0,o=t.length===1?t[0]:null;for(let i=0;i<e;i++){let r=s[i];if(o!==null){if(r.includes(o))a[n++]=i;continue}let c=!0;for(let l=0;l<t.length;l++)if(!r.includes(t[l])){c=!1;break}if(c)a[n++]=i}this.filtered=a.slice(0,n)}this.anchor=-1,this.resort()}keysFor(e){let t=this.sortKeys.get(e.key);if(t)return t;let s=this.rows,a=new Float64Array(s.length);if(e.type==="number"||e.type==="date"||e.type==="boolean")for(let n=0;n<s.length;n++){let o=ue(s[n],e),i=Number.NaN;if(o===null||o===void 0||o==="")i=Number.NaN;else if(typeof o==="number")i=o;else if(typeof o==="boolean")i=o?1:0;else if(o instanceof Date)i=o.getTime();else if(e.type==="date")i=Date.parse(String(o));else if(e.type==="boolean")i=String(o).toLowerCase()==="true"?1:0;else i=Number(o);a[n]=i}else{let n=Array.from({length:s.length}),o=new Map;for(let c=0;c<s.length;c++){let l=ue(s[c],e);if(l===null||l===void 0){n[c]=null;continue}let d=typeof l==="string"?l:_e(l,e.type);if(n[c]=d,!o.has(d))o.set(d,0)}let i=[...o.keys()].sort(ha.compare),r=0;for(let c=0;c<i.length;c++){if(c>0&&ha.compare(i[c-1],i[c])!==0)r++;o.set(i[c],r)}for(let c=0;c<s.length;c++){let l=n[c];a[c]=l===null?Number.NaN:o.get(l)}}return this.sortKeys.set(e.key,a),a}resort(){let e=[];for(let s of this.sort){let a=this.columns.find((n)=>n.key===s.key);if(a)e.push({keys:this.keysFor(a),sign:s.direction==="desc"?-1:1})}let t=this.filtered.slice();if(e.length===1){let{keys:s,sign:a}=e[0];t.sort((n,o)=>{let i=s[n],r=s[o];if(i<r)return-a;if(i>r)return a;if(i===r)return n-o;let c=i!==i;return c===(r!==r)?n-o:c?1:-1})}else if(e.length>1)t.sort((s,a)=>{for(let n=0;n<e.length;n++){let o=e[n].keys[s],i=e[n].keys[a];if(o<i)return-e[n].sign;if(o>i)return e[n].sign;if(o===i)continue;let r=o!==o;if(r!==(i!==i))return r?1:-1}return s-a});this.view=t}}var Gr="./DataGrid-7rt7v865.stx";var Ur=120,lt=new Intl.NumberFormat("en-US");function me(e,t){return e.querySelector(`[data-dg="${t}"]`)}function Jr(e){let t=()=>{let s=document.createElement("textarea");s.value=e,s.setAttribute("aria-hidden","true"),s.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(s);let a=document.activeElement;s.select();try{document.execCommand("copy")}catch{}s.remove(),a?.focus({preventScroll:!0})};if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText==="function")navigator.clipboard.writeText(e).catch(t);else t()}class Yr{root;callbacks;model;scroller;content;header;body;status;filterInput;prefix;rowHeight;headerHeight;overscan;columnOverscan;selectable;resizeStep;fileName;contextMenu;slots=new Map;pool=[];headerCells=[];rows={start:0,end:0};cols={start:0,end:0};stale=!0;active={row:0,column:0};activeEl=null;filterTimer=null;resize=null;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;let a=me(e,"scroller"),n=me(e,"content"),o=me(e,"header"),i=me(e,"body");if(!a||!n||!o||!i)throw Error("DataGridView: the root is missing its scroller, content, header or body");if(this.scroller=a,this.content=n,this.header=o,this.body=i,this.status=me(e,"status"),this.filterInput=me(e,"filter"),this.prefix=a.id||`data-grid-${Math.random().toString(36).slice(2,8)}`,this.rowHeight=Math.max(8,t.rowHeight??28),this.headerHeight=Math.max(8,t.headerHeight??32),this.overscan=t.overscan??6,this.columnOverscan=t.columnOverscan??2,this.selectable=t.selectable!==!1,this.resizeStep=t.resizeStep??16,this.fileName=t.fileName||"data",this.contextMenu=Boolean(t.contextMenu),this.header.__stx_inert_content=!0,this.body.__stx_inert_content=!0,e.style.setProperty("--stx-grid-row-height",`${this.rowHeight}px`),e.style.setProperty("--stx-grid-header-height",`${this.headerHeight}px`),this.model=new Wt(t.rows??[],t.columns??null),t.filter){if(this.model.setFilter(t.filter),this.filterInput)this.filterInput.value=t.filter}if(this.listen(this.scroller,"scroll",()=>this.render()),this.listen(this.scroller,"keydown",(l)=>this.onKeyDown(l)),this.listen(this.body,"click",(l)=>this.onBodyClick(l)),this.listen(this.body,"dblclick",(l)=>this.onBodyDoubleClick(l)),this.listen(this.body,"contextmenu",(l)=>this.onContextMenu(l)),this.listen(this.header,"click",(l)=>this.onHeaderClick(l)),this.listen(this.header,"dblclick",(l)=>this.onHeaderDoubleClick(l)),this.listen(this.header,"pointerdown",(l)=>this.onResizeStart(l)),this.listen(this.header,"pointermove",(l)=>this.onResizeMove(l)),this.listen(this.header,"pointerup",(l)=>this.onResizeEnd(l)),this.listen(this.header,"pointercancel",(l)=>this.onResizeEnd(l)),this.filterInput)this.listen(this.filterInput,"input",()=>this.onFilterInput());let r=me(e,"export-csv"),c=me(e,"export-json");if(r)this.listen(r,"click",()=>this.download("csv"));if(c)this.listen(c,"click",()=>this.download("json"));if(typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.render()),this.observer.observe(this.scroller);this.refresh(),e.setAttribute("data-dg-ready","")}setRows(e){this.model.setRows(e),this.active={row:Math.min(0,this.model.count-1),column:Math.min(this.active.column,Math.max(0,this.model.columns.length-1))},this.scroller.scrollTop=0,this.refresh()}setColumns(e){this.model.setColumns(e),this.active={row:this.active.row,column:Math.min(this.active.column,Math.max(0,this.model.columns.length-1))},this.refresh()}setFilter(e){let t=e==null?"":String(e);if(this.filterInput&&this.filterInput.value!==t)this.filterInput.value=t;this.applyFilter(t)}setSort(e){this.model.setSort(e),this.refresh()}setFileName(e){this.fileName=e||"data"}getView(){return this.model.viewRows()}getSelection(){let e=this.model.selectedIndices();return{rows:e.map((t)=>this.model.rows[t]),indices:e}}clearSelection(){this.model.clearSelection(),this.paintSelection(),this.reportSelection()}exportCsv(){return this.model.toCsv()}exportJson(){return this.model.toJson()}download(e){let t=e==="json"?this.model.toJson():this.model.toCsv(),s=new Blob([t],{type:e==="json"?"application/json":"text/csv;charset=utf-8"}),a=URL.createObjectURL(s),n=document.createElement("a");return n.href=a,n.download=`${this.fileName}.${e}`,n.style.display="none",this.root.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(a),1000),this.callbacks.onExport?.({format:e,text:t,rows:this.model.count}),t}scrollToRow(e){let t=Math.max(0,Math.min(this.model.count-1,e));this.revealRow(t),this.render()}focus(){this.scroller.focus({preventScroll:!0})}getActiveCell(){return{...this.active}}setActiveCell(e,t){this.moveTo({row:e,column:t},!1)}destroy(){if(this.observer?.disconnect(),this.filterTimer)clearTimeout(this.filterTimer);for(let e of this.disposers)e();this.header.replaceChildren(),this.body.replaceChildren(),this.slots.clear(),this.pool.length=0,this.root.removeAttribute("data-dg-ready")}refresh(){let e=this.model;this.content.style.width=`${e.totalWidth}px`,this.content.style.height=`${this.headerHeight+e.count*this.rowHeight}px`,this.header.style.width=`${e.totalWidth}px`,this.body.style.height=`${e.count*this.rowHeight}px`,this.scroller.setAttribute("aria-rowcount",String(e.count+1)),this.scroller.setAttribute("aria-colcount",String(e.columns.length)),this.root.toggleAttribute("data-empty",e.count===0),this.stale=!0,this.render(),this.paintStatus()}render(){let e=this.model,t=this.scroller,s=ba(t.scrollTop,Math.max(0,t.clientHeight-this.headerHeight),this.rowHeight,e.count,this.overscan),a=e.columnRange(t.scrollLeft,t.clientWidth,this.columnOverscan),n=this.stale||a.start!==this.cols.start||a.end!==this.cols.end;if(!n&&s.start===this.rows.start&&s.end===this.rows.end)return;if(this.rows=s,this.cols=a,n)this.renderHeader();for(let[o,i]of this.slots)if(o<s.start||o>=s.end)this.slots.delete(o),i.index=-1,i.el.style.display="none",this.pool.push(i);for(let o=s.start;o<s.end;o++){let i=this.slots.get(o);if(i){if(n)this.fill(i);continue}i=this.pool.pop()??this.createSlot(),i.index=o,i.el.style.display="",this.slots.set(o,i),this.fill(i)}this.stale=!1,this.paintActive()}createSlot(){let e=document.createElement("div");return e.className="stx-dg-row",e.setAttribute("role","row"),this.body.appendChild(e),{el:e,index:-1,cells:[]}}fill(e){let t=this.model,s=e.index,a=t.rowAt(s),n=this.selectable&&t.isSelected(s),o=e.el;if(o.__dgRow=s,o.style.transform=`translateY(${s*this.rowHeight}px)`,o.setAttribute("aria-rowindex",String(s+2)),this.selectable)o.setAttribute("aria-selected",n?"true":"false");let i=this.cols.end-this.cols.start;while(e.cells.length<i){let r=document.createElement("div");r.className="stx-dg-cell",r.setAttribute("role","gridcell"),r.appendChild(document.createTextNode("")),o.appendChild(r),e.cells.push(r)}while(e.cells.length>i)e.cells.pop().remove();for(let r=0;r<i;r++){let c=this.cols.start+r,l=t.columns[c],d=e.cells[r],p=a===void 0?void 0:ue(a,l),u=fa(p);if(d.__dgColumn=c,d.id=`${this.prefix}-r${s}-c${c}`,d.style.left=`${t.offsetOf(c)}px`,d.style.width=`${l.width}px`,d.setAttribute("aria-colindex",String(c+1)),d.setAttribute("data-type",l.type),d.setAttribute("data-align",l.align),u==="value")d.removeAttribute("data-empty");else d.setAttribute("data-empty",u);if(this.selectable)d.setAttribute("aria-selected",n?"true":"false");d.firstChild.data=typeof p==="string"?p:_e(p,l.type)}}renderHeader(){let e=this.model,t=this.cols.end-this.cols.start;while(this.headerCells.length<t){let s=document.createElement("div");s.className="stx-dg-head",s.setAttribute("role","columnheader");let a=document.createElement("span");a.className="stx-dg-head-label",a.appendChild(document.createTextNode(""));let n=document.createElement("span");n.className="stx-dg-sort",n.setAttribute("aria-hidden","true"),n.appendChild(document.createTextNode(""));let o=document.createElement("span");o.className="stx-dg-resize",o.setAttribute("aria-hidden","true"),s.append(a,n,o),this.header.appendChild(s),this.headerCells.push(s)}while(this.headerCells.length>t)this.headerCells.pop().remove();for(let s=0;s<t;s++){let a=this.cols.start+s,n=e.columns[a],o=this.headerCells[s],i=e.sortOf(n.key);if(o.__dgColumn=a,o.id=`${this.prefix}-h-c${a}`,o.style.left=`${e.offsetOf(a)}px`,o.style.width=`${n.width}px`,o.setAttribute("aria-colindex",String(a+1)),o.setAttribute("data-align",n.align),o.toggleAttribute("data-sortable",n.sortable),n.sortable)o.setAttribute("aria-sort",i?i.direction==="asc"?"ascending":"descending":"none");else o.removeAttribute("aria-sort");o.children[0].firstChild.data=n.label,o.children[1].firstChild.data=i?`${i.direction==="asc"?"\u25B2":"\u25BC"}${e.sort.length>1?i.priority:""}`:""}}cellElement(e){if(e.column<this.cols.start||e.column>=this.cols.end)return null;let t=e.column-this.cols.start;if(e.row<0)return this.headerCells[t]??null;return this.slots.get(e.row)?.cells[t]??null}paintActive(){let e=this.cellElement(this.active);if(this.activeEl&&this.activeEl!==e)this.activeEl.removeAttribute("data-active");if(this.activeEl=e,e)e.setAttribute("data-active",""),this.scroller.setAttribute("aria-activedescendant",e.id);else this.scroller.removeAttribute("aria-activedescendant")}paintSelection(){if(!this.selectable)return;for(let[e,t]of this.slots){let s=this.model.isSelected(e)?"true":"false";t.el.setAttribute("aria-selected",s);for(let a of t.cells)a.setAttribute("aria-selected",s)}this.paintStatus()}paintStatus(){if(!this.status)return;let e=this.model,t=e.rows.length,s=e.count===t?`${lt.format(t)} ${t===1?"row":"rows"}`:`${lt.format(e.count)} of ${lt.format(t)} rows`;if(e.selected.size>0)s+=`, ${lt.format(e.selected.size)} selected`;if(this.status.textContent!==s)this.status.textContent=s}revealRow(e){let t=this.scroller,s=e*this.rowHeight,a=t.clientHeight-this.headerHeight;if(s<t.scrollTop)t.scrollTop=s;else if(s+this.rowHeight>t.scrollTop+a)t.scrollTop=s+this.rowHeight-a}revealColumn(e){let t=this.scroller,s=this.model.offsetOf(e),a=this.model.offsetOf(e+1);if(s<t.scrollLeft)t.scrollLeft=s;else if(a>t.scrollLeft+t.clientWidth)t.scrollLeft=Math.min(s,a-t.clientWidth)}detail(e){return{row:this.model.rowAt(e.row),rowIndex:e.row,column:this.model.columns[e.column],value:e.row<0?void 0:this.model.valueAt(e.row,e.column)}}moveTo(e,t=!0){let s=this.model,a={row:Math.max(-1,Math.min(s.count-1,e.row)),column:Math.max(0,Math.min(s.columns.length-1,e.column))};if(this.active=a,a.row>=0)this.revealRow(a.row);if(this.revealColumn(a.column),this.render(),this.paintActive(),t)this.callbacks.onCell?.(this.detail(a))}reportSelection(){this.callbacks.onSelect?.(this.getSelection())}applyFilter(e){let t=this.model.setFilter(e);this.active={row:Math.min(0,t-1),column:this.active.column},this.scroller.scrollTop=0,this.refresh(),this.callbacks.onFilter?.({text:e,count:t})}sortBy(e,t){let s=this.model.columns[e];if(!s||!s.sortable)return;let a=this.model.toggleSort(s.key,t);this.refresh(),this.callbacks.onSort?.([...a])}setColumnWidth(e,t){this.model.resizeColumn(e,t),this.content.style.width=`${this.model.totalWidth}px`,this.header.style.width=`${this.model.totalWidth}px`,this.stale=!0,this.render()}copy(e){if(this.active.row<0)return;let t=this.model.rowAt(this.active.row);if(t===void 0)return;let s=e==="row"?xa(t,this.model.columns):ma(this.model.valueAt(this.active.row,this.active.column));Jr(s),this.callbacks.onCopy?.({what:e,text:s})}listen(e,t,s){e.addEventListener(t,s),this.disposers.push(()=>e.removeEventListener(t,s))}cellFrom(e){let s=e.target?.closest(".stx-dg-cell"),a=s?.parentElement;if(!s||!a||s.__dgColumn===void 0||a.__dgRow===void 0)return null;return{row:a.__dgRow,column:s.__dgColumn}}headFrom(e){let t=e.target,s=t?.closest(".stx-dg-head");if(!s||s.__dgColumn===void 0)return null;let a=t.closest(".stx-dg-resize");return{column:s.__dgColumn,onHandle:Boolean(a),handle:a}}onBodyClick(e){let t=this.cellFrom(e);if(!t)return;if(this.selectable)this.model.select(t.row,e.shiftKey?"range":e.metaKey||e.ctrlKey?"toggle":"replace"),this.paintSelection(),this.reportSelection();this.moveTo(t)}onBodyDoubleClick(e){let t=this.cellFrom(e),s=t?this.model.rowAt(t.row):void 0;if(t&&s!==void 0)this.callbacks.onActivate?.({row:s,rowIndex:t.row})}onContextMenu(e){let t=this.cellFrom(e);if(!t)return;if(this.contextMenu)e.preventDefault();this.moveTo(t,!1),this.callbacks.onContext?.({...this.detail(t),x:e.clientX,y:e.clientY})}onHeaderClick(e){let t=this.headFrom(e);if(!t||t.onHandle)return;this.active={row:-1,column:t.column},this.sortBy(t.column,e.shiftKey)}onHeaderDoubleClick(e){let t=this.headFrom(e);if(t&&t.onHandle)this.setColumnWidth(t.column,this.model.autoWidth(t.column))}onResizeStart(e){let t=this.headFrom(e);if(!t||!t.onHandle||!t.handle||e.button!==0)return;e.preventDefault();try{t.handle.setPointerCapture(e.pointerId)}catch{}this.resize={column:t.column,start:e.clientX,width:this.model.columns[t.column].width,pointer:e.pointerId,handle:t.handle},this.root.setAttribute("data-resizing","")}onResizeMove(e){let t=this.resize;if(!t||e.pointerId!==t.pointer)return;this.setColumnWidth(t.column,t.width+e.clientX-t.start)}onResizeEnd(e){let t=this.resize;if(!t||e.pointerId!==t.pointer)return;this.resize=null,this.root.removeAttribute("data-resizing");try{t.handle.releasePointerCapture(e.pointerId)}catch{}}onFilterInput(){if(this.filterTimer)clearTimeout(this.filterTimer);this.filterTimer=setTimeout(()=>{this.filterTimer=null,this.applyFilter(this.filterInput?this.filterInput.value:"")},Ur)}onKeyDown(e){if(e.target!==this.scroller)return;let t=this.model,s=e.metaKey||e.ctrlKey,a=this.active.row<0,n=e.key;if(s&&(n==="a"||n==="A")){if(!this.selectable)return;e.preventDefault(),t.selectAll(),this.paintSelection(),this.reportSelection();return}if(s&&(n==="c"||n==="C")){if(a)return;e.preventDefault(),this.copy(e.shiftKey?"row":"cell");return}if(a&&e.altKey&&(n==="ArrowLeft"||n==="ArrowRight")){e.preventDefault();let r=t.columns[this.active.column];if(r)this.setColumnWidth(this.active.column,r.width+(n==="ArrowRight"?this.resizeStep:-this.resizeStep));this.paintActive();return}if(n==="Enter"||n===" "){if(e.preventDefault(),a){this.sortBy(this.active.column,e.shiftKey);return}if(n===" "){if(!this.selectable)return;t.select(this.active.row,"toggle"),this.paintSelection(),this.reportSelection();return}let r=t.rowAt(this.active.row);if(r!==void 0)this.callbacks.onActivate?.({row:r,rowIndex:this.active.row});return}if(n==="Escape"&&this.selectable&&t.selected.size>0){e.preventDefault(),this.clearSelection();return}let o=Math.max(1,Math.floor((this.scroller.clientHeight-this.headerHeight)/this.rowHeight)-1),i=va(this.active,n,{rows:t.count,columns:t.columns.length,page:o,mod:s});if(i===this.active)return;if(e.preventDefault(),i.row===this.active.row&&i.column===this.active.column)return;if(e.shiftKey&&this.selectable&&i.row>=0&&i.row!==this.active.row){if(t.selected.size===0&&this.active.row>=0)t.select(this.active.row,"replace");t.select(i.row,"range"),this.paintSelection(),this.reportSelection()}this.moveTo(i)}}var Zr="./Dialog-wm7zjqnb.stx";var el="./DialogBackdrop-de5m5m4w.stx";var sl="./DialogDescription-yd2jgt2m.stx";var nl="./DialogPanel-aav3werz.stx";var il="./DialogTitle-nw0pw114.stx";var ll="./Drawer-p4vgvyd5.stx";var dl="./Dropdown-hb8ks69x.stx";var ul="./DropdownButton-wxc25hsy.stx";var fl="./DropdownItem-af0vzc8a.stx";var gl="./DropdownItems-bkz7jkyz.stx";var bl="./Form-cybgg9ym.stx";var vl={action:v.string,method:v.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:v.object,initialValues:v.object,validateOnChange:v.boolean,validateOnBlur:v.boolean,onSubmit:v.func,onError:v.func,className:v.string},zb=pe("Form",vl);var yl="./FileDrop-p9wqdx75.stx";var wa=(e)=>Math.round(e*100)/100,ae=(e)=>`${wa(e.x)} ${wa(e.y)}`;function ya(e,t,s){let a=s.x-e.x,n=s.y-e.y;if(a===0&&n===0)return{x:e.x,y:e.y};let o=a===0?Number.POSITIVE_INFINITY:t.width/2/Math.abs(a),i=n===0?Number.POSITIVE_INFINITY:t.height/2/Math.abs(n),r=Math.min(o,i);return{x:e.x+a*r,y:e.y+n*r}}function ka(e,t,s){let a=e.x-t.x,n=e.y-t.y,o=Math.sqrt(a*a+n*n);if(s<=0||o<=s)return e;return{x:e.x-a/o*s,y:e.y-n/o*s}}function kl(e,t,s=0){let a=26+Math.abs(s),n={x:e.x+t.width/4,y:e.y-t.height/2},o={x:e.x+t.width/2,y:e.y-t.height/4},i={x:n.x,y:n.y-a},r={x:o.x+a,y:o.y};return{d:`M ${ae(n)} C ${ae(i)}, ${ae(r)}, ${ae(o)}`,start:n,end:o,label:Sa(n,i,r,o,0.5),angle:Math.atan2(o.y-r.y,o.x-r.x)}}function Sa(e,t,s,a,n){let o=1-n;return{x:o*o*o*e.x+3*o*o*n*t.x+3*o*n*n*s.x+n*n*n*a.x,y:o*o*o*e.y+3*o*o*n*t.y+3*o*n*n*s.y+n*n*n*a.y}}function Ca(e,t={}){let{source:s,sourceSize:a,target:n,targetSize:o}=e,i=t.offset??0,r=t.inset??0;if(s.x===n.x&&s.y===n.y)return kl(s,a,i);if(t.curve==="bezier"){let b=t.direction!=="TB",w=(b?n.x-s.x:n.y-s.y)>=0?1:-1,S=b?{x:s.x+w*a.width/2,y:s.y}:{x:s.x,y:s.y+w*a.height/2},g=b?{x:n.x-w*o.width/2,y:n.y}:{x:n.x,y:n.y-w*o.height/2},T=Math.abs(b?g.x-S.x:g.y-S.y),M=Math.max(T/2,24)*w,P=b?{x:g.x-w*r,y:g.y}:{x:g.x,y:g.y-w*r},I=b?{x:S.x+M,y:S.y+i}:{x:S.x+i,y:S.y+M},R=b?{x:P.x-M,y:P.y+i}:{x:P.x+i,y:P.y-M};return{d:`M ${ae(S)} C ${ae(I)}, ${ae(R)}, ${ae(P)}`,start:S,end:P,label:Sa(S,I,R,P,0.5),angle:Math.atan2(P.y-R.y,P.x-R.x)}}let c=ya(s,a,n),l=ya(n,o,s);if(i===0){let b=ka(l,c,r);return{d:`M ${ae(c)} L ${ae(b)}`,start:c,end:b,label:{x:(c.x+b.x)/2,y:(c.y+b.y)/2},angle:Math.atan2(b.y-c.y,b.x-c.x)}}let d=s.x<n.x||s.x===n.x&&s.y<n.y?1:-1,p=(n.x-s.x)*d,u=(n.y-s.y)*d,f=Math.sqrt(p*p+u*u)||1,h={x:(c.x+l.x)/2+-u/f*i*2,y:(c.y+l.y)/2+p/f*i*2},m=ka(l,h,r);return{d:`M ${ae(c)} Q ${ae(h)}, ${ae(m)}`,start:c,end:m,label:{x:0.25*c.x+0.5*h.x+0.25*m.x,y:0.25*c.y+0.5*h.y+0.25*m.y},angle:Math.atan2(m.y-h.y,m.x-h.x)}}function $a(e,t=14){let s=new Map;for(let n of e){let o=n.source<n.target?`${n.source}\x00${n.target}`:`${n.target}\x00${n.source}`,i=s.get(o);if(i)i.push(n);else s.set(o,[n])}let a=new Map;for(let n of s.values()){if(n.length<2)continue;n.forEach((o,i)=>{let r=(i-(n.length-1)/2)*t;a.set(o.id,o.source===o.target?i*t:r)})}return a}var Gt={charWidth:7,paddingX:12,minWidth:48,maxWidth:220,height:32,detailHeight:14};function he(e){return e.label==null||e.label===""?e.id:String(e.label)}function Ta(e){return e.id!=null&&e.id!==""?String(e.id):`${e.source}->${e.target}${e.label?`:${e.label}`:""}`}function Ea(e,t=Gt){let s=Math.max(he(e).length,e.detail?e.detail.length*0.85:0),a=e.expandable===!0?t.charWidth+4:0;return{width:Math.min(t.maxWidth,Math.max(t.minWidth,Math.ceil(s*t.charWidth)+t.paddingX*2+a)),height:t.height+(e.detail?t.detailHeight:0)}}function Ia(e=Gt){return Math.floor((e.maxWidth-e.paddingX*2)/e.charWidth)}function ct(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-1))}\u2026`}class dt{metrics;nodeMap=new Map;edgeMap=new Map;incident=new Map;sizes=new Map;constructor(e=[],t=[],s=Gt){this.metrics=s;this.merge(e,t)}get nodes(){return[...this.nodeMap.values()]}get edges(){return[...this.edgeMap.values()]}get nodeCount(){return this.nodeMap.size}get edgeCount(){return this.edgeMap.size}has(e){return this.nodeMap.has(e)}node(e){return this.nodeMap.get(e)}edge(e){return this.edgeMap.get(e)}addNode(e){if(!e||e.id==null||e.id==="")return!1;let t=String(e.id);if(this.nodeMap.has(t))return!1;let s={...e,id:t};return this.nodeMap.set(t,s),this.incident.set(t,new Set),this.sizes.set(t,Ea(s,this.metrics)),!0}addEdge(e){if(!e)return!1;let t=String(e.source),s=String(e.target);if(!this.nodeMap.has(t)||!this.nodeMap.has(s))return!1;let a=Ta({...e,source:t,target:s});if(this.edgeMap.has(a))return!1;return this.edgeMap.set(a,{...e,id:a,source:t,target:s}),this.incident.get(t).add(a),this.incident.get(s).add(a),!0}updateNode(e,t){let s=this.nodeMap.get(e);if(!s)return!1;let a={...s,...t,id:e};return this.nodeMap.set(e,a),this.sizes.set(e,Ea(a,this.metrics)),!0}removeNode(e){if(!this.nodeMap.has(e))return!1;for(let t of[...this.incident.get(e)])this.removeEdge(t);return this.nodeMap.delete(e),this.incident.delete(e),this.sizes.delete(e),!0}removeEdge(e){let t=this.edgeMap.get(e);if(!t)return!1;return this.edgeMap.delete(e),this.incident.get(t.source)?.delete(e),this.incident.get(t.target)?.delete(e),!0}merge(e=[],t=[]){let s={nodes:[],edges:[]};for(let a of e)if(this.addNode(a))s.nodes.push(String(a.id));for(let a of t)if(this.addEdge(a))s.edges.push(Ta({...a,source:String(a.source),target:String(a.target)}));return s}edgesOf(e){let t=this.incident.get(e);return t?[...t].map((s)=>this.edgeMap.get(s)):[]}neighbours(e){let t=new Set;for(let s of this.edgesOf(e)){let a=s.source===e?s.target:s.source;if(a!==e)t.add(a)}return[...t]}degree(e){return this.neighbours(e).length}size(e){return this.sizes.get(e)??{width:this.metrics.minWidth,height:this.metrics.height}}bounds(e){let{POSITIVE_INFINITY:t,POSITIVE_INFINITY:s,NEGATIVE_INFINITY:a,NEGATIVE_INFINITY:n}=Number;for(let[o,i]of e){if(!this.nodeMap.has(o))continue;let r=this.size(o);t=Math.min(t,i.x-r.width/2),a=Math.max(a,i.x+r.width/2),s=Math.min(s,i.y-r.height/2),n=Math.max(n,i.y+r.height/2)}return Number.isFinite(t)?{x:t,y:s,width:a-t,height:n-s}:null}}function Aa(e){let t=e>>>0||1;return()=>{t=t+1831565813>>>0;let s=t;return s=Math.imul(s^s>>>15,s|1),s^=s+Math.imul(s^s>>>7,s|61),((s^s>>>14)>>>0)/4294967296}}var Sl=0.15,Pa=0.06;function Na(e,t={}){let s=e.nodes,a=s.length,n=new Map;if(a===0)return n;let o=t.linkDistance??90,i=t.padding??16,r=Aa(t.seed??1),c=t.positions??null,l=new Set(t.pinned??[]),d=new Map(s.map((D,F)=>[D.id,F])),p=new Float64Array(a),u=new Float64Array(a),f=new Float64Array(a),h=new Float64Array(a),m=new Uint8Array(a),b=new Uint8Array(a),w=new Float64Array(a).fill(1),S=0;s.forEach((D,F)=>{let y=e.size(D.id);f[F]=y.width/2,h[F]=y.height/2;let N=c?.get(D.id);if(N&&Number.isFinite(N.x)&&Number.isFinite(N.y))p[F]=N.x,u[F]=N.y,b[F]=1,m[F]=l.has(D.id)?1:0,w[F]=0,S++});let g=o*Math.sqrt(a)*0.6;s.forEach((D,F)=>{if(b[F])return;let y=e.neighbours(D.id).map((C)=>d.get(C)).find((C)=>b[C]),N=r()*Math.PI*2;if(y!==void 0)p[F]=p[y]+Math.cos(N)*o*0.5,u[F]=u[y]+Math.sin(N)*o*0.5;else{let C=Math.sqrt(r())*g;p[F]=Math.cos(N)*C,u[F]=Math.sin(N)*C}});let T=Uint8Array.from(b),M=S>0,P=Math.max(0,t.iterations??(M?80:300)),I=[],R=new Set;for(let D of e.edges){let F=d.get(D.source),y=d.get(D.target);if(F===y)continue;let N=F<y?F*a+y:y*a+F;if(!R.has(N))R.add(N),I.push(F,y)}let B=new Float64Array(a),k=new Float64Array(a),A=o,j=M?A*0.5:A*1.5;for(let D=0;D<P;D++){let F=j*(1-D/P);B.fill(0),k.fill(0);for(let y=0;y<a;y++)for(let N=y+1;N<a;N++){if(T[y]&&T[N])continue;let C=p[y]-p[N],x=u[y]-u[N],E=Math.sqrt(C*C+x*x);if(E<0.01){let H=(y*31+N*17)%360*Math.PI/180;C=Math.cos(H)*0.01,x=Math.sin(H)*0.01,E=0.01}let q=Math.max(1,E-(f[y]+f[N])*0.5),z=A*A*Sl/q/E;B[y]+=C*z,k[y]+=x*z,B[N]-=C*z,k[N]-=x*z}for(let y=0;y<I.length;y+=2){let N=I[y],C=I[y+1];if(T[N]&&T[C])continue;let x=p[N]-p[C],E=u[N]-u[C],q=Math.sqrt(x*x+E*E)||0.01,z=(f[N]+f[C])*0.5,H=Math.max(0,q-z),G=H*H/A/q;B[N]-=x*G,k[N]-=E*G,B[C]+=x*G,k[C]+=E*G}for(let y=0;y<a;y++){if(m[y])continue;if(!T[y])B[y]-=p[y]*Pa,k[y]-=u[y]*Pa;let N=Math.sqrt(B[y]*B[y]+k[y]*k[y]);if(N>0){let C=Math.min(N,F)/N*w[y];p[y]+=B[y]*C,u[y]+=k[y]*C}}}return Cl(p,u,f,h,m,i),s.forEach((D,F)=>{n.set(D.id,{x:Math.round(p[F]*100)/100,y:Math.round(u[F]*100)/100})}),n}function Cl(e,t,s,a,n,o){let i=e.length;for(let r=0;r<40;r++){let c=!1;for(let l=0;l<i;l++)for(let d=l+1;d<i;d++){let p=s[l]+s[d]+o-Math.abs(e[l]-e[d]);if(p<=0)continue;let u=a[l]+a[d]+o-Math.abs(t[l]-t[d]);if(u<=0)continue;if(n[l]&&n[d])continue;c=!0;let f=n[l]?0:n[d]?1:0.5,h=1-f;if(p<u){let m=e[l]<e[d]||e[l]===e[d]&&l<d?-1:1;e[l]+=m*p*f,e[d]-=m*p*h}else{let m=t[l]<t[d]||t[l]===t[d]&&l<d?-1:1;t[l]+=m*u*f,t[d]-=m*u*h}}if(!c)break}}function $l(e){let t=new Set,s=[];for(let n of e.nodes){if(t.has(n.id))continue;let o=[],i=[n.id];t.add(n.id);while(i.length){let r=i.shift();o.push(r);for(let c of e.neighbours(r))if(!t.has(c))t.add(c),i.push(c)}s.push(o)}let a=new Map(e.nodes.map((n,o)=>[n.id,o]));for(let n of s)n.sort((o,i)=>a.get(o)-a.get(i));return s}function Tl(e){let t=new Map;for(let n of e.nodes)t.set(n.id,[]);for(let n of e.edges)if(n.source!==n.target)t.get(n.source).push({id:n.id,to:n.target});let s=new Set,a=new Map;for(let n of e.nodes){if(a.has(n.id))continue;let o=[{id:n.id,next:0}];a.set(n.id,1);while(o.length){let i=o[o.length-1],r=t.get(i.id);if(i.next>=r.length){a.set(i.id,2),o.pop();continue}let c=r[i.next++],l=a.get(c.to);if(l===1)s.add(c.id);else if(l===void 0)a.set(c.to,1),o.push({id:c.to,next:0})}}return s}function Ma(e,t){let s=e.map((n)=>[t.get(n.from),t.get(n.to)]).sort((n,o)=>n[0]-o[0]||n[1]-o[1]),a=0;for(let n=0;n<s.length;n++)for(let o=n+1;o<s.length;o++)if(s[n][0]<s[o][0]&&s[n][1]>s[o][1])a++;return a}function Ra(e,t={}){let s=t.direction==="TB"?"TB":"LR",a=t.nodeGap??24,n=t.layerGap??80,o=t.componentGap??48,i=t.sweeps??4,r=s==="LR",c=Tl(e),l=[],d=new Set;for(let g of e.edges){if(g.source===g.target)continue;let T=c.has(g.id)?g.target:g.source,M=c.has(g.id)?g.source:g.target,P=`${T}\x00${M}`;if(!d.has(P))d.add(P),l.push({from:T,to:M})}let p=new Map,u=new Map;for(let g of e.nodes)p.set(g.id,[]),u.set(g.id,[]);for(let g of l)p.get(g.from).push(g.to),u.get(g.to).push(g.from);let f=new Map,h=new Map,m=[];for(let g of e.nodes)if(h.set(g.id,u.get(g.id).length),u.get(g.id).length===0)m.push(g.id),f.set(g.id,0);for(let g=0;g<m.length;g++){let T=m[g];for(let M of p.get(T)){f.set(M,Math.max(f.get(M)??0,f.get(T)+1));let P=h.get(M)-1;if(h.set(M,P),P===0)m.push(M)}}let b=new Map,w=[],S=0;for(let g of $l(e)){let T=[];for(let C of g){let x=f.get(C)??0;while(T.length<=x)T.push([]);T[x].push(C)}let M=new Set(g),P=l.filter((C)=>M.has(C.from)&&f.get(C.to)-f.get(C.from)===1),I=new Map,R=()=>{for(let C of T)C.forEach((x,E)=>I.set(x,C.length>1?E/(C.length-1):0.5))},B=(C,x)=>{let E=new Map;C.forEach((z,H)=>{let G=x.get(z),ce=C.length>1?H/(C.length-1):0.5;E.set(z,G.length?G.reduce((De,Ye)=>De+I.get(Ye),0)/G.length:ce)});let q=new Map(C.map((z,H)=>[z,H]));C.sort((z,H)=>E.get(z)-E.get(H)||q.get(z)-q.get(H)),C.forEach((z,H)=>I.set(z,C.length>1?H/(C.length-1):0.5))};R();let k=T.map((C)=>[...C]),A=Ma(P,I);for(let C=0;C<i&&A>0;C++){for(let E=1;E<T.length;E++)B(T[E],u);for(let E=T.length-2;E>=0;E--)B(T[E],p);let x=Ma(P,I);if(x<A)A=x,k=T.map((E)=>[...E])}let j=(C)=>r?e.size(C).width:e.size(C).height,D=(C)=>r?e.size(C).height:e.size(C).width,F=k.map((C)=>C.reduce((x,E)=>x+D(E),0)+a*Math.max(0,C.length-1)),y=Math.max(0,...F),N=0;k.forEach((C,x)=>{let E=Math.max(0,...C.map(j)),q=S+(y-F[x])/2;for(let z of C){let H=q+D(z)/2;b.set(z,r?{x:N+E/2,y:H}:{x:H,y:N+E/2}),q+=D(z)+a}N+=E+n}),w.push(k),S+=y+o}return{positions:b,layerOf:f,reversed:c,components:w,bounds:e.bounds(b)}}var El={x:0,y:0,k:1};function La(e,t,s){return Math.min(Math.max(e,t),s)}function Ub(e,t){return{x:t.x*e.k+e.x,y:t.y*e.k+e.y}}function Ut(e,t){return{x:(t.x-e.x)/e.k,y:(t.y-e.y)/e.k}}function pt(e,t,s){return{x:e.x+t,y:e.y+s,k:e.k}}function Oa(e,t,s,a=0.1,n=4){let o=La(e.k*s,a,n),i=o/e.k;return{x:t.x-(t.x-e.x)*i,y:t.y-(t.y-e.y)*i,k:o}}function Da(e,t,s=24,a=0.1,n=1){if(!e||t.width<=0||t.height<=0)return{...El};let o=Math.max(1,t.width-s*2),i=Math.max(1,t.height-s*2),r=La(Math.min(o/Math.max(1,e.width),i/Math.max(1,e.height)),a,n);return{x:t.width/2-(e.x+e.width/2)*r,y:t.height/2-(e.y+e.height/2)*r,k:r}}function za(e,t,s){return{x:s.width/2-t.x*e.k,y:s.height/2-t.y*e.k,k:e.k}}function Ha(e,t,s,a=16){let n=t.x*e.k+e.x,o=t.y*e.k+e.y,i=n+t.width*e.k,r=o+t.height*e.k,c=0,l=0;if(n<a)c=a-n;else if(i>s.width-a)c=s.width-a-i;if(o<a)l=a-o;else if(r>s.height-a)l=s.height-a-r;return c===0&&l===0?e:pt(e,c,l)}function ja(e,t,s){let a=e.get(t);if(!a)return null;let n=s==="left"?-1:s==="right"?1:0,o=s==="up"?-1:s==="down"?1:0,i=null,r=Number.POSITIVE_INFINITY;for(let[c,l]of e){if(c===t)continue;let d=l.x-a.x,p=l.y-a.y,u=d*n+p*o;if(u<=0.5)continue;let f=Math.abs(d*o)+Math.abs(p*n);if(f>u*2)continue;let h=u+f*2;if(h<r)r=h,i=c}return i}function Fa(e,t){let s=null,a=Number.POSITIVE_INFINITY;for(let[n,o]of e){let i=(o.x-t.x)**2+(o.y-t.y)**2;if(i<a)a=i,s=n}return s}function Jb(e,t,s){let a=null;for(let[n,o]of t){let i=e.size(n);if(Math.abs(s.x-o.x)<=i.width/2&&Math.abs(s.y-o.y)<=i.height/2)a=n}return a}var Al="./GraphView-0t3t9mec.stx";var Pl="http://www.w3.org/2000/svg",Va=3,Ba=350,Nl=240,Ml=6.2;function Y(e,t={}){let s=document.createElementNS(Pl,e);for(let a in t)s.setAttribute(a,String(t[a]));return s}var Rl=0;class Ll{root;callbacks;timings={layout:0,render:0};model=new dt;positions=new Map;shown=new Map;pinned=new Set;view={x:0,y:0,k:1};size={width:0,height:0};layoutName;direction;selected=null;autoFit=!0;animate;minZoom;maxZoom;contextMenu;prefix;surface;status;svg;stage;edgeLayer;nodeLayer;labelLayer;nodeEls=new Map;edgeEls=new Map;idOf=new WeakMap;offsets=new Map;serial=0;gesture=null;pinch=null;lastClick={id:"",at:0};lastExpand=0;frame=0;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.prefix=`${e.id||"graph"}-${++Rl}`,this.layoutName=t.layout==="force"?"force":"layered",this.direction=t.direction==="TB"?"TB":"LR",this.minZoom=t.minZoom??0.1,this.maxZoom=t.maxZoom??4,this.contextMenu=Boolean(t.contextMenu),this.animate=t.animate!==!1,this.surface=e.querySelector('[data-gv="surface"]')??e,this.status=e.querySelector('[data-gv="status"]'),t.label)this.surface.setAttribute("aria-label",t.label);this.svg=Y("svg",{class:"stx-gv-svg","aria-hidden":"false",focusable:"false"}),this.svg.__stx_inert_content=!0;let a=Y("defs");for(let n of["arrow","arrow-active"]){let o=Y("marker",{id:`${this.prefix}-${n}`,viewBox:"0 0 10 10",refX:9,refY:5,markerWidth:7,markerHeight:7,orient:"auto-start-reverse",class:`stx-gv-${n}`});o.append(Y("path",{d:"M 0 0 L 10 5 L 0 10 z"})),a.append(o)}if(this.stage=Y("g",{class:"stx-gv-stage"}),this.edgeLayer=Y("g",{class:"stx-gv-edges"}),this.nodeLayer=Y("g",{class:"stx-gv-nodes"}),this.labelLayer=Y("g",{class:"stx-gv-edge-labels"}),this.stage.append(this.edgeLayer,this.nodeLayer,this.labelLayer),this.svg.append(a,this.stage),this.surface.append(this.svg),this.listen(),this.measure(),this.setGraph(t.nodes??[],t.edges??[]),t.selected)this.select(t.selected,{silent:!0});if(typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>{if(this.measure(),this.autoFit)this.fit()}),this.observer.observe(this.surface);e.setAttribute("data-gv-ready","")}graph(){return this.model}getViewport(){return{...this.view}}getLayout(){return this.layoutName}getSelected(){return this.selected}getPositions(){return Object.fromEntries([...this.positions].map(([e,t])=>[e,{...t}]))}setGraph(e,t){if(this.stop(),this.model=new dt(e??[],t??[]),this.positions=new Map,this.pinned.clear(),this.selected&&!this.model.has(this.selected))this.selected=null;this.layout(!1),this.shown=new Map(this.positions),this.render(),this.autoFit=!0,this.fit(),this.mark()}addNeighbours(e,t,s){let a=this.model.merge(t??[],s??[]);if(a.nodes.length===0&&a.edges.length===0)return a;let n=this.shown.get(e)??this.positions.get(e)??Ut(this.view,{x:this.size.width/2,y:this.size.height/2});for(let o of a.nodes)this.shown.set(o,{...n});if(this.layout(!0),this.sync(),this.moveToPlace(),this.mark(),a.nodes.length)this.announce(`${a.nodes.length} ${a.nodes.length===1?"node":"nodes"} added${this.model.has(e)?` to ${he(this.model.node(e))}`:""}`);return a}updateNode(e,t){if(!this.model.updateNode(e,t))return;let s=this.nodeEls.get(e);if(s)s.remove(),this.nodeEls.delete(e);this.sync(),this.draw(),this.mark()}setLayout(e){let t=e==="force"?"force":"layered";if(t===this.layoutName)return;this.layoutName=t,this.relayout(),this.callbacks.onLayout?.({layout:t})}setDirection(e){let t=e==="TB"?"TB":"LR";if(t===this.direction)return;if(this.direction=t,this.layoutName==="layered")this.relayout()}select(e,t={}){let s=e!=null&&this.model.has(e)?e:null;if(s===this.selected)return;if(this.selected=s,this.mark(),s)this.describe(s);if(!t.silent)this.callbacks.onSelect?.(this.selection())}focusNode(e){if(!this.model.has(e))return;this.select(e);let t=this.positions.get(e);if(t)this.autoFit=!1,this.setView(za(this.view,t,this.size))}fit(){this.measure(),this.setView(Da(this.model.bounds(this.positions),this.size,32,this.minZoom,Math.min(1,this.maxZoom))),this.autoFit=!0}zoomIn(){this.zoomBy(1.25)}zoomOut(){this.zoomBy(0.8)}zoomBy(e,t){this.autoFit=!1,this.setView(Oa(this.view,t??{x:this.size.width/2,y:this.size.height/2},e,this.minZoom,this.maxZoom))}panBy(e,t){this.autoFit=!1,this.setView(pt(this.view,e,t))}setZoomLimits(e,t){this.minZoom=e,this.maxZoom=t}destroy(){this.stop(),this.observer?.disconnect();for(let e of this.disposers)e();this.svg.remove(),this.root.removeAttribute("data-gv-ready")}selection(){let e=this.selected?this.model.node(this.selected)??null:null;return{node:e,neighbours:e?this.model.neighbours(e.id).map((t)=>this.model.node(t)):[]}}measure(){let e=this.surface.getBoundingClientRect();this.size={width:e.width,height:e.height}}layout(e){let t=performance.now();if(this.layoutName==="layered")this.positions=Ra(this.model,{direction:this.direction}).positions;else this.positions=Na(this.model,{positions:e&&this.positions.size?this.positions:null,pinned:e?this.pinned:null});this.timings.layout=performance.now()-t}relayout(){if(this.pinned.clear(),this.layout(!1),this.sync(),this.moveToPlace(),this.autoFit)this.fit()}render(){let e=performance.now();this.sync(),this.draw(),this.timings.render=performance.now()-e}sync(){let e=Ia(this.model.metrics);for(let[t,s]of this.nodeEls)if(!this.model.has(t))s.remove(),this.nodeEls.delete(t);for(let t of this.model.nodes){let s=this.nodeEls.get(t.id);if(!s)s=this.buildNode(t,e),this.nodeEls.set(t.id,s),this.idOf.set(s,t.id),this.nodeLayer.append(s);let a=this.model.degree(t.id);s.setAttribute("aria-label",`${he(t)}, ${a} ${a===1?"connection":"connections"}`)}for(let[t,s]of this.edgeEls)if(!this.model.edge(t))s.group.remove(),s.label?.remove(),this.edgeEls.delete(t);for(let t of this.model.edges)if(!this.edgeEls.has(t.id))this.edgeEls.set(t.id,this.buildEdge(t));this.offsets=$a(this.model.edges)}buildNode(e,t){let s=this.model.size(e.id),a=Y("g",{class:"stx-gv-node",id:`${this.prefix}-node-${this.serial++}`,role:"group","data-node":e.id});if(e.kind)a.setAttribute("data-kind",e.kind);if(e.expandable===!0)a.setAttribute("data-expandable","");let n=Y("title");n.textContent=e.detail?`${he(e)}: ${e.detail}`:he(e);let o=Y("rect",{x:-s.width/2,y:-s.height/2,width:s.width,height:s.height,rx:6,ry:6}),i=e.expandable===!0?(this.model.metrics.charWidth+4)/2:0,r=Y("text",{class:"stx-gv-node-label",x:-i,y:e.detail?-6:0,"text-anchor":"middle","dominant-baseline":"central"});if(r.textContent=ct(he(e),t),a.append(n,o,r),e.detail){let c=Y("text",{class:"stx-gv-node-detail",x:-i,y:9,"text-anchor":"middle","dominant-baseline":"central"});c.textContent=ct(e.detail,Math.floor(t/0.85)),a.append(c)}if(e.expandable===!0){let c=Y("text",{class:"stx-gv-node-mark",x:s.width/2-10,y:0,"text-anchor":"middle","dominant-baseline":"central","aria-hidden":"true"});c.textContent="+",a.append(c)}return a}buildEdge(e){let t=Y("g",{class:"stx-gv-edge","data-edge":e.id}),s=Y("path",{fill:"none"});if(e.directed!==!1)s.setAttribute("marker-end",`url(#${this.prefix}-arrow)`);t.append(s),this.edgeLayer.append(t);let a=null;if(e.label){let n=ct(String(e.label),32),o=Math.ceil(n.length*Ml)+8;a=Y("g",{class:"stx-gv-edge-label","data-edge":e.id});let i=Y("rect",{x:-o/2,y:-8,width:o,height:16,rx:3,ry:3}),r=Y("text",{"text-anchor":"middle","dominant-baseline":"central"});r.textContent=n,a.append(i,r),this.labelLayer.append(a)}return{group:t,path:s,label:a}}draw(){for(let[e,t]of this.nodeEls){let s=this.shown.get(e)??this.positions.get(e);if(s)t.setAttribute("transform",`translate(${s.x} ${s.y})`)}for(let e of this.model.edges)this.drawEdge(e)}shape(e){let t=this.shown.get(e.source)??this.positions.get(e.source),s=this.shown.get(e.target)??this.positions.get(e.target);if(!t||!s)return null;return Ca({source:t,sourceSize:this.model.size(e.source),target:s,targetSize:this.model.size(e.target)},{curve:this.layoutName==="layered"?"bezier":"straight",direction:this.direction,offset:this.offsets.get(e.id)??0,inset:e.directed!==!1?1:0})}drawEdge(e){let t=this.edgeEls.get(e.id),s=t&&this.shape(e);if(!t||!s)return;t.path.setAttribute("d",s.d),t.label?.setAttribute("transform",`translate(${Math.round(s.label.x*10)/10} ${Math.round(s.label.y*10)/10})`)}moveToPlace(){this.stop();let e=typeof matchMedia==="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!this.animate||e||typeof requestAnimationFrame!=="function"){this.shown=new Map(this.positions),this.draw();return}let t=new Map;for(let[n,o]of this.positions)t.set(n,this.shown.get(n)??o);let s=performance.now(),a=(n)=>{let o=Math.min(1,(n-s)/Nl),i=1-(1-o)**3;for(let[r,c]of this.positions){let l=t.get(r);this.shown.set(r,{x:l.x+(c.x-l.x)*i,y:l.y+(c.y-l.y)*i})}if(this.draw(),this.frame=o<1?requestAnimationFrame(a):0,o>=1)this.shown=new Map(this.positions)};this.frame=requestAnimationFrame(a)}stop(){if(this.frame)cancelAnimationFrame(this.frame);this.frame=0}setView(e){this.view=e,this.stage.setAttribute("transform",`translate(${e.x} ${e.y}) scale(${e.k})`),this.callbacks.onViewport?.({...e})}mark(){let e=this.selected,t=new Set(e?this.model.neighbours(e):[]);this.root.toggleAttribute("data-has-selection",Boolean(e));for(let[a,n]of this.nodeEls)if(n.toggleAttribute("data-selected",a===e),n.toggleAttribute("data-neighbour",t.has(a)),a===e)n.setAttribute("aria-current","true");else n.removeAttribute("aria-current");for(let a of this.model.edges){let n=this.edgeEls.get(a.id);if(!n)continue;let o=e!=null&&(a.source===e||a.target===e);if(n.group.toggleAttribute("data-active",o),n.label?.toggleAttribute("data-active",o),a.directed!==!1)n.path.setAttribute("marker-end",`url(#${this.prefix}-${o?"arrow-active":"arrow"})`)}let s=e?this.nodeEls.get(e):null;if(s)this.surface.setAttribute("aria-activedescendant",s.id);else this.surface.removeAttribute("aria-activedescendant")}describe(e){let t=this.model.node(e);if(!t)return;let s=this.model.neighbours(e).map((o)=>he(this.model.node(o))),a=s.slice(0,5).join(", "),n=s.length>5?` and ${s.length-5} more`:"";this.announce(s.length===0?`${he(t)}, no connections`:`${he(t)}, ${s.length} ${s.length===1?"connection":"connections"}: ${a}${n}`)}announce(e){if(this.status)this.status.textContent=e}expand(e,t=!1){let s=this.model.node(e);if(!s)return;if(this.lastExpand=performance.now(),t||s.expandable===!1)this.callbacks.onOpen?.({node:s});else this.callbacks.onExpand?.({node:s})}nodeUnder(e){let t=e instanceof Element?e.closest(".stx-gv-node"):null;return t?this.idOf.get(t)??null:null}local(e){let t=this.surface.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}listen(){let e=(s,a,n)=>{this.surface.addEventListener(s,a,n),this.disposers.push(()=>this.surface.removeEventListener(s,a,n))};e("pointerdown",(s)=>this.onPointerDown(s)),e("pointermove",(s)=>this.onPointerMove(s)),e("pointerup",(s)=>this.onPointerUp(s)),e("pointercancel",()=>this.endGesture()),e("dblclick",(s)=>{let a=this.nodeUnder(s.target);if(a&&performance.now()-this.lastExpand>Ba)this.expand(a,s.metaKey||s.ctrlKey)}),e("wheel",(s)=>this.onWheel(s),{passive:!1}),e("keydown",(s)=>this.onKeyDown(s)),e("contextmenu",(s)=>{if(this.contextMenu)s.preventDefault();let a=this.nodeUnder(s.target);if(a)this.select(a);this.callbacks.onContext?.({node:a?this.model.node(a):null,x:s.clientX,y:s.clientY})});let t=(s,a)=>{this.surface.addEventListener(s,a),this.disposers.push(()=>this.surface.removeEventListener(s,a))};t("gesturestart",(s)=>{s.preventDefault();let a=this.local(s);this.pinch={k:this.view.k,x:a.x,y:a.y}}),t("gesturechange",(s)=>{if(!this.pinch)return;s.preventDefault(),this.zoomBy(this.pinch.k*s.scale/this.view.k,{x:this.pinch.x,y:this.pinch.y})}),t("gestureend",()=>{this.pinch=null})}onPointerDown(e){if(e.button!==0)return;let t=this.nodeUnder(e.target);this.surface.focus({preventScroll:!0});try{this.surface.setPointerCapture(e.pointerId)}catch{}this.gesture={pointer:e.pointerId,node:t,startX:e.clientX,startY:e.clientY,origin:t?{...this.positions.get(t)??{x:0,y:0}}:{x:0,y:0},view:{...this.view},moved:!1}}onPointerMove(e){let t=this.gesture;if(!t||e.pointerId!==t.pointer)return;let s=e.clientX-t.startX,a=e.clientY-t.startY;if(!t.moved){if(Math.abs(s)<Va&&Math.abs(a)<Va)return;t.moved=!0,this.stop(),this.shown=new Map(this.positions),this.root.setAttribute("data-dragging",t.node?"node":"pan")}if(t.node){let n={x:t.origin.x+s/this.view.k,y:t.origin.y+a/this.view.k};this.positions.set(t.node,n),this.shown.set(t.node,n),this.nodeEls.get(t.node)?.setAttribute("transform",`translate(${n.x} ${n.y})`);for(let o of this.model.edgesOf(t.node))this.drawEdge(o)}else this.autoFit=!1,this.setView(pt(t.view,s,a))}onPointerUp(e){let t=this.gesture;if(!t||e.pointerId!==t.pointer)return;if(this.endGesture(),t.moved){if(t.node){this.pinned.add(t.node),this.autoFit=!1;let n=this.positions.get(t.node);this.callbacks.onMove?.({node:this.model.node(t.node),x:n.x,y:n.y})}return}if(!t.node){this.select(null);return}let s=performance.now(),a=this.lastClick.id===t.node&&s-this.lastClick.at<Ba;if(this.lastClick=a?{id:"",at:0}:{id:t.node,at:s},this.select(t.node),a)this.expand(t.node,e.metaKey||e.ctrlKey)}endGesture(){let e=this.gesture;if(this.gesture=null,this.root.removeAttribute("data-dragging"),e)try{this.surface.releasePointerCapture(e.pointer)}catch{}}onWheel(e){if(e.preventDefault(),e.ctrlKey||e.metaKey){this.zoomBy(Math.exp(-e.deltaY*(e.deltaMode===1?0.05:0.01)),this.local(e));return}let t=e.deltaMode===1?16:1;this.panBy(-e.deltaX*t,-e.deltaY*t)}onKeyDown(e){let s={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"}[e.key];if(s){e.preventDefault();let n=this.selected?ja(this.positions,this.selected,s):Fa(this.positions,Ut(this.view,{x:this.size.width/2,y:this.size.height/2}));if(n)this.select(n),this.bringIntoView(n);return}let a=e.metaKey||e.ctrlKey;if(e.key==="Enter"||e.key===" "){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,a)}else if(a||e.altKey);else if(e.key==="+"||e.key==="=")e.preventDefault(),this.zoomIn();else if(e.key==="-"||e.key==="_")e.preventDefault(),this.zoomOut();else if(e.key==="0")e.preventDefault(),this.fit();else if(e.key==="f"||e.key==="F"){if(!this.selected)return;e.preventDefault(),this.focusNode(this.selected)}else if(e.key==="o"||e.key==="O"){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,!0)}else if(e.key==="Escape"&&this.selected)e.preventDefault(),this.select(null)}bringIntoView(e){let t=this.positions.get(e);if(!t)return;let s=this.model.size(e),a=Ha(this.view,{x:t.x-s.width/2,y:t.y-s.height/2,width:s.width,height:s.height},this.size);if(a!==this.view)this.autoFit=!1,this.setView(a)}}var Dl="./GroupedList-j3sxv5pb.stx";var Hl="./GroupedListRow-x8fgb8sx.stx";var Fl="./Image-6x38ddd7.stx";var Bl="./EmailInput-sf9jfrgz.stx";var ql="./NumberInput-nqqen5a6.stx";var Wl="./PasswordInput-j38f2n01.stx";var Ul="./SearchInput-w15r5t95.stx";var Yl="./SecretField-q2xgth94.stx";var Zl="./TextInput-4v09vw1r.stx";var Ql={value:v.string,onChange:v.func,placeholder:v.string,disabled:v.boolean,readonly:v.boolean,size:v.oneOf(["sm","md","lg"]),error:v.boolean,label:v.string,helperText:v.string,required:v.boolean,className:v.string,inputClassName:v.string},ec={value:v.string,onChange:v.func,placeholder:v.string,disabled:v.boolean,readonly:v.boolean,size:v.oneOf(["sm","md","lg"]),error:v.boolean,label:v.string,helperText:v.string,required:v.boolean,className:v.string,inputClassName:v.string,leftIcon:v.string,rightIcon:v.string,clearable:v.boolean,maxLength:v.number,showCount:v.boolean,type:v.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:v.string,list:v.string,minLength:v.number,htmlSize:v.number,autofocus:v.boolean},tc={value:v.string,onChange:v.func,placeholder:v.string,disabled:v.boolean,readonly:v.boolean,size:v.oneOf(["sm","md","lg"]),error:v.boolean,label:v.string,helperText:v.string,required:v.boolean,className:v.string,inputClassName:v.string,min:v.number,max:v.number,step:v.number,showControls:v.boolean},sc={value:v.string,onChange:v.func,placeholder:v.string,disabled:v.boolean,readonly:v.boolean,size:v.oneOf(["sm","md","lg"]),error:v.boolean,label:v.string,helperText:v.string,required:v.boolean,className:v.string,inputClassName:v.string,showStrength:v.boolean},ac={value:v.string,onChange:v.func,placeholder:v.string,disabled:v.boolean,readonly:v.boolean,size:v.oneOf(["sm","md","lg"]),error:v.boolean,label:v.string,helperText:v.string,required:v.boolean,className:v.string,inputClassName:v.string,onSearch:v.func,loading:v.boolean},vv=pe("TextInput",ec),wv=pe("EmailInput",Ql),yv=pe("PasswordInput",sc),kv=pe("NumberInput",tc),Sv=pe("SearchInput",ac);var nc=new Set(["array","set"]),oc=/^[A-Z_$][\w$]*$/i;function Xt(e){return nc.has(e.kind)}function Jt(e){return e.ref===void 0&&(e.children!==void 0&&e.children.length>0||(e.more??0)>0)}function Zt(e,t="$"){let s=t;for(let a of e)if(typeof a==="number")s+=`[${a}]`;else if(oc.test(a))s+=`.${a}`;else s+=`[${JSON.stringify(a)}]`;return s}function Yt(e){if(e.ref!==void 0)return"[Circular]";if(e.children){if(Xt(e))return e.children.map((s)=>Yt(s));let t={};return e.children.forEach((s,a)=>{t[s.key!==void 0?String(s.key):s.label??String(a)]=Yt(s)}),t}if("value"in e){let t=e.value;if(typeof t==="bigint")return t.toString();if(typeof t==="number"&&!Number.isFinite(t))return String(t);if(typeof t==="function"||typeof t==="symbol")return e.preview??String(t);return t}return e.preview??null}function qa(e,t=2){let s=Yt(e);return s===void 0?"undefined":JSON.stringify(s,null,t)}var _a=80;function Qt(e){if(e.preview!==void 0)return e.preview;if(e.ref!==void 0)return"[Circular]";if(e.children||e.more){let t=(e.children?.length??0)+(e.more??0);if(Xt(e))return`${e.kind==="set"?"Set":"Array"}(${t})`;return t===0?"{}":`{${t}}`}if("value"in e){let t=e.value;if(typeof t==="string")return JSON.stringify(t.length>_a?`${t.slice(0,_a)}\u2026`:t);if(typeof t==="bigint")return`${t}n`;return String(t)}return e.kind}function Nv(e,t,s={}){let a=s.maxItems??1000,n=s.maxDepth??32,o=new Map,i=1,r=(l,d)=>{if(d!==void 0)l.label=d;return l},c=(l,d,p)=>{if(l===null)return r({kind:"null",value:null,preview:"null"},d);switch(typeof l){case"undefined":return r({kind:"undefined",value:void 0,preview:"undefined"},d);case"string":case"number":case"boolean":case"bigint":return r({kind:typeof l,value:l},d);case"symbol":return r({kind:"symbol",preview:l.toString()},d);case"function":return r({kind:"function",preview:`\u0192 ${l.name||"(anonymous)"}()`},d)}let u=l,f=o.get(u);if(f!==void 0)return r({kind:"ref",ref:f},d);if(u instanceof Date)return r({kind:"date",value:Number.isNaN(u.getTime())?null:u.toISOString(),preview:Number.isNaN(u.getTime())?"Invalid Date":u.toISOString()},d);if(u instanceof RegExp)return r({kind:"regexp",value:u.toString(),preview:u.toString()},d);let h=`v${i++}`;o.set(u,h);let m=Array.isArray(u),b=u instanceof Set,w=u instanceof Map,S=r({id:h,kind:m?"array":b?"set":w?"map":"object",children:[]},d);if(p>=n)return S.preview=m?"Array":"Object",delete S.children,S;let g=S.children,T=0;if(m||b)for(let M of u){if(T<a)g.push(c(M,String(T),p+1));T++}else if(w)for(let[M,P]of u){if(T<a)g.push(c(P,typeof M==="string"?M:Qt(c(M,void 0,n)),p+1));T++}else{for(let P of Object.keys(u)){if(T<a)g.push(c(u[P],P,p+1));T++}let M=u.constructor?.name;if(M&&M!=="Object")S.preview=`${M} {${T}}`}if(T>g.length)S.more=T-g.length;if(w)S.preview=`Map(${T})`;return S};return c(e,t,0)}class es{rows=[];version=0;roots=[];depth;opened=new Set;closed=new Set;index=null;constructor(e,t={}){this.depth=t.depth??1,this.setValue(e)}setValue(e){this.roots=e==null?[]:Array.isArray(e)?e:[e],this.opened.clear(),this.closed.clear(),this.flatten()}setDepth(e){this.depth=e,this.opened.clear(),this.closed.clear(),this.flatten()}getRoots(){return this.roots}indexOf(e){if(!this.index){this.index=new Map;for(let t=0;t<this.rows.length;t++)this.index.set(this.rows[t].id,t)}return this.index.get(e)??-1}pathOf(e){let t=[];for(let s=e;s>=0;s=this.rows[s].parent){let a=this.rows[s];if(a.isMore)continue;if(a.parent!==-1||this.roots.length>1)t.push(a.key)}return t.reverse()}isExpanded(e,t){return this.opened.has(e)||t<this.depth&&!this.closed.has(e)}expand(e){return this.set(e,!0)}collapse(e){return this.set(e,!1)}toggle(e){let t=this.indexOf(e);if(t===-1)return!1;return this.set(e,!this.rows[t].expanded)}expandAll(e){let t=(s,a,n)=>{if(!Jt(s))return;if(n>=this.depth)this.opened.add(a);this.closed.delete(a),s.children?.forEach((o,i)=>t(o,o.id??`${a}.${i}`,n+1))};if(e===void 0)this.roots.forEach((s,a)=>t(s,s.id??String(a),0));else{let s=this.find(e);if(!s)return;t(s.node,e,s.ancestors.length)}this.flatten()}collapseAll(){this.opened.clear(),this.closed.clear();let e=(t,s,a)=>{if(a>=this.depth||!Jt(t))return;this.closed.add(s),t.children?.forEach((n,o)=>e(n,n.id??`${s}.${o}`,a+1))};this.roots.forEach((t,s)=>e(t,t.id??String(s),0)),this.flatten()}reveal(e){let t=this.find(e);if(!t)return-1;return t.ancestors.forEach((s,a)=>{if(this.closed.delete(s),a>=this.depth)this.opened.add(s)}),this.flatten(),this.indexOf(e)}appendChildren(e,t,s=0){let a=this.find(e);if(!a)return!1;let n=a.node;if(n.children=[...n.children??[],...t],s>0)n.more=s;else delete n.more;return this.flatten(),!0}move(e,t,s=10){let a=this.rows.length-1;if(a<0)return{index:-1,changed:!1};let n=Math.min(Math.max(e,0),a),o=this.rows[n],i=(r)=>({index:Math.min(Math.max(r,0),a),changed:!1});switch(t){case"ArrowDown":return i(e<0?0:n+1);case"ArrowUp":return i(n-1);case"Home":return i(0);case"End":return i(a);case"PageDown":return i(n+s);case"PageUp":return i(n-s);case"ArrowRight":if(!o.expandable||o.isMore)return i(n);if(!o.expanded)return{index:n,changed:this.expand(o.id)};return i(n+1);case"ArrowLeft":if(o.expanded&&!o.isMore)return{index:n,changed:this.collapse(o.id)};return i(o.parent===-1?n:o.parent);case"*":{let r=!1,c=o.parent,l=this.rows.filter((d)=>d.parent===c&&d.depth===o.depth&&d.expandable&&!d.expanded&&!d.isMore);for(let d of l)this.mark(d.id,d.depth,!0),r=!0;if(r)this.flatten();return{index:this.indexOf(o.id),changed:r}}}return i(n)}typeahead(e,t){let s=t.toLowerCase(),a=this.rows.length;if(s===""||a===0)return-1;let n=s.length===1?e+1:Math.max(e,0);for(let o=0;o<a;o++){let i=(n+o+a)%a,r=this.rows[i];if(!r.isMore&&(r.node.label??"").toLowerCase().startsWith(s))return i}return-1}set(e,t){let s=this.indexOf(e);if(s===-1)return!1;let a=this.rows[s];if(!a.expandable||a.isMore||a.expanded===t)return!1;return this.mark(e,a.depth,t),this.flatten(),!0}mark(e,t,s){if(s){if(this.closed.delete(e),t>=this.depth)this.opened.add(e)}else if(this.opened.delete(e),t<this.depth)this.closed.add(e)}find(e){let t=[];for(let s=this.roots.length-1;s>=0;s--)t.push({node:this.roots[s],id:this.roots[s].id??String(s),ancestors:[]});while(t.length>0){let s=t.pop();if(s.id===e)return{node:s.node,ancestors:s.ancestors};let a=s.node.children;if(!a||s.node.ref!==void 0)continue;let n=[...s.ancestors,s.id];for(let o=a.length-1;o>=0;o--)t.push({node:a[o],id:a[o].id??`${s.id}.${o}`,ancestors:n})}return null}flatten(){let e=[],t=(s,a,n,o,i,r,c)=>{let l=Jt(s),d=l&&this.isExpanded(a,n),p=e.length;if(e.push({id:a,node:s,depth:n,key:i,parent:o,expandable:l,expanded:d,posInSet:r,setSize:c,isMore:!1}),!d)return;let u=s.children??[],f=s.more??0,h=Xt(s),m=u.length+(f>0?1:0);for(let b=0;b<u.length;b++){let w=u[b];t(w,w.id??`${a}.${b}`,n+1,p,w.key??(h?b:w.label??b),b+1,m)}if(f>0)e.push({id:`${a}.+`,node:s,depth:n+1,key:"",parent:p,expandable:!1,expanded:!1,posInSet:m,setSize:m,isMore:!0})};this.roots.forEach((s,a)=>t(s,s.id??String(a),0,-1,s.key??a,a+1,this.roots.length)),this.rows=e,this.index=null,this.version++}}var rc="./JsonTree-satc4010.stx";var Ga=new Set(["array","object","map","set","model","error"]);function lc(e){return e.t==="object"||e.t==="model"}function Ka(e){return e.length>0&&e.slice(0,20).every(lc)}function Wa(e){return e.some((t)=>Ga.has(t.t))}function ts(e,t){let s=e.length>120?`${e.slice(0,120)}\u2026`:e;return t?`${JSON.stringify(s)} (${t} more characters)`:JSON.stringify(s)}function cc(e){if(!e.file)return"";return[e.file,e.line,e.column].filter((t)=>t!==void 0).join(":")}function Lv(e,t,s={}){let a=s.idPrefix??"t",n=(l)=>`${a}${l}`,o=(l,d)=>{if(d!==void 0)l.label=d;return l},i=(l)=>c(l,void 0).preview??l.t,r=(l,d)=>{if(d.length>0)l.openable=d.length===1?d[0]:d;return l};function c(l,d){switch(l.t){case"undefined":return o({kind:"undefined",value:void 0,preview:"undefined"},d);case"null":return o({kind:"null",value:null,preview:"null"},d);case"boolean":return o({kind:"boolean",value:l.v,preview:String(l.v)},d);case"number":{let p=typeof l.v==="number"?l.v:l.v==="-0"?-0:Number(l.v);return o({kind:"number",value:p,preview:String(l.v)},d)}case"bigint":return o({kind:"bigint",value:l.v,preview:`${l.v}n`},d);case"string":return o({kind:"string",value:l.v,preview:ts(l.v,l.truncated)},d);case"symbol":return o({kind:"symbol",preview:`Symbol(${l.v})`},d);case"function":{let p=l.kind==="class"?`class ${l.name}`:`${l.kind==="async"?"async ":""}\u0192${l.kind==="generator"?"*":""} ${l.name}()`;return o({kind:"function",preview:p},d)}case"date":return o({kind:"date",value:l.v,preview:l.v??"Invalid Date"},d);case"regexp":return o({kind:"regexp",value:l.v,preview:l.v},d);case"url":return o({kind:"url",value:l.v,preview:l.v},d);case"promise":return o({kind:"promise",preview:"Promise"},d);case"bytes":{let p=l.length*2>l.hex.length;return o({kind:"bytes",value:l.hex,preview:`${l.ctor}(${l.length}) <${l.hex}${p?"\u2026":""}>`},d)}case"ref":return o({kind:"ref",ref:n(l.id),preview:"[Circular]"},d);case"cut":return o({kind:"cut",preview:`${l.ctor??"Object"} \u2026 (${l.reason==="depth"?"too deep to show":"result too large to show"})`},d);case"array":{let p={id:n(l.id),kind:"array",preview:`${l.ctor??"Array"}(${l.length})`,children:l.items.map((u,f)=>c(u,String(f)))};if(l.more)p.more=l.more;return o(r(p,Ka(l.items)?["table"]:[]),d)}case"set":{let p={id:n(l.id),kind:"set",preview:`Set(${l.size})`,children:l.items.map((u,f)=>c(u,String(f)))};if(l.more)p.more=l.more;return o(r(p,Ka(l.items)?["table"]:[]),d)}case"object":{let p=l.entries.slice(0,5).map(([m])=>m).join(", "),u=l.entries.length+(l.more??0),f=u===0?"{}":`{${p}${u>5?", \u2026":""}}`,h={id:n(l.id),kind:"object",preview:l.ctor&&l.ctor!=="Object"?`${l.ctor} ${f}`:f,children:l.entries.map(([m,b])=>c(b,m))};if(l.more)h.more=l.more;return o(r(h,Wa(l.entries.map((m)=>m[1]))?["graph"]:[]),d)}case"map":{let p={id:n(l.id),kind:"map",preview:`Map(${l.size})`,children:l.entries.map(([u,f],h)=>{if(!Ga.has(u.t)){let m=c(f,i(u));return m.key=u.t==="string"?u.v:i(u),m}return{kind:"entry",label:String(h),key:h,preview:`${i(u)} => ${i(f)}`,children:[c(u,"key"),c(f,"value")]}})};if(l.more)p.more=l.more;return o(r(p,Wa(l.entries.map((u)=>u[1]))?["graph"]:[]),d)}case"model":{let p=l.attributes.map(([h,m])=>c(m,h));for(let[h,m]of l.loaded??[]){let b=c(m,h);b.meta=b.meta??{relation:!0},p.push(b)}if(l.hidden?.length)p.push({kind:"hidden",label:"[hidden]",key:"[hidden]",preview:l.hidden.join(", "),children:l.hidden.map((h,m)=>({kind:"hidden",label:String(m),value:h,preview:h}))});if(l.relations?.length)p.push({kind:"relations",label:"[relations]",key:"[relations]",preview:`${l.relations.length} declared`,children:l.relations.map((h)=>({kind:"relation",label:h.name??h.model,value:h,preview:`${h.kind} ${h.model}`}))});let u={model:l.model,hidden:l.hidden??[],relations:l.relations??[]};if(l.table)u.table=l.table;if(l.primaryKey)u.primaryKey=l.primaryKey;let f={id:n(l.id),kind:"model",preview:l.key?`${l.model} #${i(l.key).replace(/^"|"$/g,"")}`:l.model,children:p,meta:u};if(l.more)f.more=l.more;return o(r(f,["graph"]),d)}case"html":{let p={kind:l.kind};if(l.title)p.title=l.title;if(l.text)p.text=l.text;if(l.truncated)p.truncated=l.truncated;let u=l.truncated?`, ${l.truncated} more cut`:"",f=l.title?`: ${l.title}`:"";return o(r({kind:"html",value:l.html,preview:`${l.kind}${f} (${l.html.length} characters${u})`,meta:p},["preview"]),d)}case"error":{let p=[{kind:"string",label:"message",value:l.message,preview:ts(l.message)}];if(l.frames?.length)p.push({kind:"stack",label:"stack",preview:`${l.frames.length} frames`,value:l.stack,children:l.frames.map((u,f)=>({kind:"frame",label:String(f),value:u,preview:[u.function,cc(u)].filter(Boolean).join(" at ")||"(unknown)",meta:u}))});else if(l.stack)p.push({kind:"string",label:"stack",value:l.stack,preview:ts(l.stack)});if(l.cause)p.push(c(l.cause,"cause"));for(let[u,f]of l.entries??[])p.push(c(f,u));return o({kind:"error",preview:l.message?`${l.name}: ${l.message}`:l.name,children:p},d)}}return o({kind:"unknown",preview:String(l.t??"unknown")},d)}return c(e,t)}var dc=600,Ua=400,Ja={table:"Table",graph:"Graph",preview:"Preview"};function Ya(e){return e.length>Ua?`${e.slice(0,Ua)}\u2026`:e}function Xa(e){if(e==null||e==="")return[];return Array.isArray(e)?e:[e]}class pc{root;callbacks;model;scroller;content;rowsEl;status;prefix;rowHeight;overscan;openable;contextMenu;pool=[];parts=new WeakMap;active=-1;activeId="";typed="";typedAt=0;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;let a=(o)=>e.querySelector(`[data-jt="${o}"]`);this.scroller=a("scroller")??e,this.content=a("content")??this.scroller,this.rowsEl=a("rows")??this.content,this.status=a("status"),this.prefix=`${e.id||`json-tree-${Math.random().toString(36).slice(2,8)}`}-row-`,this.rowHeight=t.rowHeight&&t.rowHeight>0?t.rowHeight:22,this.overscan=t.overscan??6,this.openable=t.openable??null,this.contextMenu=Boolean(t.contextMenu),this.model=new es(t.value,{depth:t.depth??1}),this.rowsEl.__stx_inert_content=!0,e.style.setProperty("--stx-tree-row-height",`${this.rowHeight}px`);let n=(o,i,r,c)=>{o.addEventListener(i,r,c),this.disposers.push(()=>o.removeEventListener(i,r,c))};if(n(this.scroller,"scroll",()=>this.render(),{passive:!0}),n(this.scroller,"keydown",(o)=>this.onKeyDown(o)),n(this.scroller,"focus",()=>{if(this.active===-1&&this.model.rows.length>0)this.setActive(0,!1)}),n(this.rowsEl,"mousedown",(o)=>{if(o.target.closest("[data-jt-action]"))o.preventDefault()}),n(this.rowsEl,"click",(o)=>this.onClick(o)),n(this.rowsEl,"dblclick",(o)=>this.onDoubleClick(o)),n(this.rowsEl,"contextmenu",(o)=>this.onContextMenu(o)),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.render()),this.observer.observe(this.scroller);this.render(),e.setAttribute("data-jt-ready","")}setValue(e){this.model.setValue(e),this.active=-1,this.activeId="",this.scroller.scrollTop=0,this.render()}setDepth(e){this.model.setDepth(e),this.afterChange()}setOpenable(e){this.openable=e??null,this.model.version++,this.render()}setContextMenu(e){this.contextMenu=e}expandAll(e){this.model.expandAll(e),this.afterChange()}collapseAll(){this.model.collapseAll(),this.afterChange()}expand(e){let t=this.model.expand(e);if(t)this.afterChange();return t}collapse(e){let t=this.model.collapse(e);if(t)this.afterChange();return t}reveal(e){let t=this.model.reveal(e);if(t===-1)return this.afterChange(),!1;return this.active=t,this.activeId=e,this.scrollToRow(t),this.render(),this.emitSelect(),!0}appendChildren(e,t,s=0){let a=this.model.appendChildren(e,t,s);if(a)this.afterChange();return a}getSelected(){return this.active===-1?null:this.detail(this.active)}select(e){let t=this.model.indexOf(e);if(t===-1)return!1;return this.setActive(t,!0),!0}focus(){this.scroller.focus()}get drawn(){return this.pool.filter((e)=>e.style.display!=="none").length}destroy(){this.observer?.disconnect();for(let e of this.disposers)e();this.rowsEl.textContent="",this.pool=[],this.root.removeAttribute("data-jt-ready")}afterChange(){if(this.activeId){let e=this.model.indexOf(this.activeId);if(this.active=e,e===-1)this.activeId=""}this.render()}detail(e){let t=this.model.rows[e],s=this.model.pathOf(e);return{id:t.id,node:t.node,path:s,pathText:Zt(s)}}emitSelect(){if(this.active!==-1)this.callbacks.onSelect?.(this.detail(this.active))}setActive(e,t){if(e<0||e>=this.model.rows.length)return;let s=e!==this.active;if(this.active=e,this.activeId=this.model.rows[e].id,t)this.scrollToRow(e);if(this.render(),s)this.emitSelect()}scrollToRow(e){let t=e*this.rowHeight,s=this.scroller.clientHeight;if(t<this.scroller.scrollTop)this.scroller.scrollTop=t;else if(t+this.rowHeight>this.scroller.scrollTop+s)this.scroller.scrollTop=t+this.rowHeight-s}pageSize(){return Math.max(1,Math.floor(this.scroller.clientHeight/this.rowHeight)-1)}createRow(){let e=document.createElement("div");e.setAttribute("role","treeitem"),e.className="stx-jt-row";let t=(a,n)=>{let o=document.createElement("span");if(o.className=a,n)o.setAttribute("aria-hidden","true");return e.appendChild(o),o},s={twisty:t("stx-jt-twisty",!0),label:t("stx-jt-label",!1),separator:t("stx-jt-separator",!0),preview:t("stx-jt-preview",!1),actions:t("stx-jt-actions",!1)};return s.separator.textContent=": ",this.parts.set(e,s),this.rowsEl.appendChild(e),e}button(e,t,s,a){let n=document.createElement("button");if(n.type="button",n.tabIndex=-1,n.className="stx-jt-action",n.setAttribute("data-jt-action",e),a)n.setAttribute("data-jt-as",a);return n.setAttribute("aria-label",s),n.textContent=t,n}opensOf(e,t){if(e.isMore)return[];if(this.openable){let s=this.openable(e.node,this.model.pathOf(t));if(s!==void 0)return Xa(s)}return Xa(e.node.openable)}render(){let e=this.model.rows,t=e.length,s=this.scroller.clientHeight;this.content.style.height=`${t*this.rowHeight}px`;let a=Math.max(0,Math.min(this.scroller.scrollTop,t*this.rowHeight-s)),n=Math.max(0,Math.floor(a/this.rowHeight)-this.overscan),o=Math.min(t,Math.ceil((a+s)/this.rowHeight)+this.overscan),i=Math.max(0,o-n);while(this.pool.length<i)this.pool.push(this.createRow());let r=this.pool.length,c=new Uint8Array(r);for(let d=n;d<o;d++){let p=d%r;c[p]=1,this.paint(this.pool[p],e[d],d)}for(let d=0;d<r;d++)if(!c[d]&&this.pool[d].style.display!=="none")this.pool[d].style.display="none",this.pool[d].__jt=void 0,this.pool[d].removeAttribute("id");if(this.active>=n&&this.active<o)this.scroller.setAttribute("aria-activedescendant",this.prefix+this.active);else this.scroller.removeAttribute("aria-activedescendant")}paint(e,t,s){let a=this.model.version,n=s===this.active,o=e.__jt;if(!o||o.index!==s||o.version!==a){let i=this.parts.get(e),r=t.node;if(e.style.display="",e.style.transform=`translateY(${s*this.rowHeight}px)`,e.style.setProperty("--stx-tree-depth",String(t.depth)),e.id=this.prefix+s,e.setAttribute("data-jt-index",String(s)),e.setAttribute("aria-level",String(t.depth+1)),e.setAttribute("aria-posinset",String(t.posInSet)),e.setAttribute("aria-setsize",String(t.setSize)),t.expandable)e.setAttribute("aria-expanded",t.expanded?"true":"false");else e.removeAttribute("aria-expanded");if(t.isMore)e.setAttribute("data-kind","more"),i.twisty.textContent="",i.label.textContent="",i.separator.style.display="none",i.preview.textContent=`\u2026 ${r.more} more`,i.preview.setAttribute("data-kind","more");else{e.setAttribute("data-kind",r.kind),i.twisty.textContent=t.expandable?t.expanded?"\u25BE":"\u25B8":"";let d=r.label??(typeof t.key==="number"&&t.parent!==-1?String(t.key):"");i.label.textContent=Ya(d),i.separator.style.display=d===""?"none":"",i.preview.textContent=Ya(Qt(r)),i.preview.setAttribute("data-kind",r.kind)}let c=this.opensOf(t,s),l=t.isMore?"+":c.join("|");if(!o||o.opens!==l)if(i.actions.textContent="",t.isMore)i.actions.appendChild(this.button("more","Load","Load more"));else{for(let d of c)i.actions.appendChild(this.button("open",Ja[d]??d,`Open as ${Ja[d]?.toLowerCase()??d}`,d));i.actions.appendChild(this.button("copy-value","Copy","Copy value")),i.actions.appendChild(this.button("copy-path","Path","Copy path"))}e.__jt={index:s,version:a,opens:l}}if(n)e.setAttribute("aria-selected","true"),e.setAttribute("data-active","");else e.setAttribute("aria-selected","false"),e.removeAttribute("data-active")}rowIndexOf(e){let t=e instanceof Element?e.closest("[data-jt-index]"):null;if(!t||t.style.display==="none")return-1;return Number(t.getAttribute("data-jt-index"))}say(e){if(this.status)this.status.textContent=e}toggleRow(e){let t=this.model.rows[e];if(!t)return;if(t.isMore){this.loadMore(e);return}if(t.node.ref!==void 0){this.follow(e);return}if(!t.expandable)return;let s=t.id;this.model.toggle(s),this.afterChange();let a=this.model.indexOf(s);if(a!==-1)this.callbacks.onToggle?.({...this.detail(a),expanded:this.model.rows[a].expanded})}follow(e){let t=this.model.rows[e].node.ref;if(t===void 0)return;if(!this.reveal(t))this.say("The value this points back to is not part of what was sent.")}loadMore(e){let s=this.model.rows[e].parent;if(s===-1)return;this.callbacks.onLoadMore?.(this.detail(s))}copy(e,t){let s=this.model.rows[e];if(!s)return;let a=s.isMore?s.parent:e,n=this.model.pathOf(a),o=this.model.rows[a].node,i=t==="path"?Zt(n):qa(o);try{navigator.clipboard?.writeText(i)?.catch(()=>{})}catch{}this.say(t==="path"?`Copied path ${i}`:"Copied value"),this.callbacks.onCopy?.({what:t,text:i,path:n,node:o})}open(e,t){let s=this.model.rows[e];if(!s||s.isMore)return;let a=t??this.opensOf(s,e)[0];if(a===void 0)return;this.callbacks.onOpen?.({...this.detail(e),as:a})}onClick(e){let t=this.rowIndexOf(e.target);if(t===-1)return;let s=e.target instanceof Element?e.target.closest("[data-jt-action]"):null;if(this.setActive(t,!1),s){let n=s.getAttribute("data-jt-action");if(n==="copy-value")this.copy(t,"value");else if(n==="copy-path")this.copy(t,"path");else if(n==="open")this.open(t,s.getAttribute("data-jt-as")??void 0);else if(n==="more")this.loadMore(t);return}let a=this.model.rows[t];if(a.expandable||a.isMore||a.node.ref!==void 0)this.toggleRow(t)}onDoubleClick(e){let t=this.rowIndexOf(e.target);if(t===-1||e.target instanceof Element&&e.target.closest("[data-jt-action]"))return;let s=this.model.rows[t];if(!s.expandable&&!s.isMore&&s.node.ref===void 0)this.open(t)}onContextMenu(e){let t=this.rowIndexOf(e.target);if(t===-1)return;if(this.setActive(t,!1),this.contextMenu)e.preventDefault();this.callbacks.onContext?.({...this.detail(t),x:e.clientX,y:e.clientY})}onKeyDown(e){let t=this.model.rows;if(t.length===0)return;let s=e.metaKey||e.ctrlKey,a=e.key;if(s&&(a==="c"||a==="C")){if(this.active===-1)return;e.preventDefault(),this.copy(this.active,e.shiftKey?"path":"value");return}if(s||e.altKey)return;if(a==="Enter"&&e.shiftKey){if(e.preventDefault(),this.active!==-1)this.open(this.active);return}let n=this.typed!==""&&Date.now()-this.typedAt<=dc;if(a==="Enter"||a===" "&&!n){if(e.preventDefault(),this.active!==-1)this.toggleRow(this.active);return}if(a==="ArrowDown"||a==="ArrowUp"||a==="ArrowLeft"||a==="ArrowRight"||a==="Home"||a==="End"||a==="PageDown"||a==="PageUp"||a==="*"){e.preventDefault(),this.typed="";let o=this.active===-1?null:t[this.active],i=o?.expanded,r=this.model.move(this.active,a,this.pageSize());if(r.changed){if(this.active=r.index,this.activeId=this.model.rows[r.index]?.id??"",this.scrollToRow(r.index),this.render(),o&&a!=="*"){let c=this.model.indexOf(o.id);if(c!==-1&&this.model.rows[c].expanded!==i)this.callbacks.onToggle?.({...this.detail(c),expanded:this.model.rows[c].expanded})}}else this.setActive(r.index,!0);return}if(a.length===1){let o=Date.now();if(!n)this.typed="";this.typedAt=o,this.typed+=a;let i=this.model.typeahead(this.active,this.typed);if(i!==-1)e.preventDefault(),this.setActive(i,!0)}}}var hc="./List-mjkged1z.stx";var mc="./SwipeRow-az09d4tb.stx";var xc="./Listbox-83j2q4x6.stx";var vc="./ListboxButton-gan8e3nw.stx";var yc="./ListboxLabel-ka0hfm7b.stx";var Sc="./ListboxOption-gpaqvk3s.stx";var $c="./ListboxOptions-2928864k.stx";var Ec="./FilterChip-bynt5maa.stx";var Ac="./FilterChips-xg7pgkk2.stx";var Nc="./ListRow-1qvkjt4v.stx";var Rc="./NavBar-ky8tedjb.stx";var Oc="./SectionCard-8b5fyrjd.stx";var zc="./TabBar-6m1ajm1d.stx";var jc="./TabBarItem-kddfnhk3.stx";var Vc="./Navigator-1yk1c3pp.stx";var _c="./Notification-1pvt347q.stx";var Kc="./Pager-w4eb64na.stx";var Gc="./PagerDots-076w890y.stx";var Jc="./Pagination-8bhbkpcp.stx";var Xc="./Checkout-crbegxyv.stx";var Qc="./DefaultPaymentMethod-ss3x61tr.stx";var td="./PaymentMethods-z4hhr0kv.stx";var ad="./SubscriptionCheckout-rdcv32n1.stx";var od="./Popover-gntg33xd.stx";var rd="./PopoverButton-ks3cttd9.stx";var cd="./PopoverPanel-ddgj4gz3.stx";var pd="./Portal-m73vz879.stx";var Qa=[{name:"phone",label:"Phone",width:390,height:844},{name:"tablet",label:"Tablet",width:820,height:1180},{name:"desktop",label:"Desktop",width:1280,height:800}];function Za(e){let t=typeof e==="string"?Number.parseFloat(e):e;return typeof t==="number"&&Number.isFinite(t)&&t>0?Math.round(t):null}function ss(e,t={}){let s=Za(t.width),a=Za(t.height),n=Boolean(t.landscape);if(s&&a)return{name:"custom",size:{width:s,height:a},landscape:!1};let o=Qa.find((r)=>r.name===e);if(!o)return{name:"fill",size:null,landscape:!1};let i=n&&o.height>o.width;return{name:o.name,size:i?{width:o.height,height:o.width}:{width:o.width,height:o.height},landscape:i}}function en(e,t,s=0){let a=t.width-s*2,n=t.height-s*2;if(a<=0||n<=0||e.width<=0||e.height<=0)return 1;return Math.min(1,a/e.width,n/e.height)}function tn(e,t=1){if(!e.size)return"Fills the frame";let s=`${e.size.width} \xD7 ${e.size.height}`;return t<0.995?`${s} at ${Math.round(t*100)}%`:s}function as(e){return e==="light"||e==="dark"?e:"auto"}var ud=["allow-same-origin","allow-top-navigation","allow-top-navigation-by-user-activation","allow-top-navigation-to-custom-protocols","allow-popups","allow-popups-to-escape-sandbox","allow-modals","allow-downloads","allow-pointer-lock","allow-presentation","allow-storage-access-by-user-activation"];function sn(e={}){let t=[];if(e.scripts)t.push("allow-scripts");if(e.forms)t.push("allow-forms");return t.join(" ")}function Qw(e){return!e.toLowerCase().split(/\s+/).filter(Boolean).some((s)=>ud.includes(s))}var hd=/<!doctype\s|<html[\s>]/i,ut=/<head(?:\s[^>]*)?>/i,ht=/<html(?:\s[^>]*)?>/i,fd=/<base[\s>]/i,md=/<meta[^>]+name\s*=\s*["']?color-scheme/i,gd=/\(\s*prefers-color-scheme\s*:\s*(light|dark)\s*\)/gi,xd=/(<(style|script)\b[^>]*>)([\s\S]*?)(<\/\2\s*>)/gi,bd=/(\smedia\s*=\s*)("[^"]*"|'[^']*')/gi,vd="(min-width: 0px)",wd="(max-width: 0px)";function yd(e,t){let s=(o)=>o.replace(gd,(i,r)=>r.toLowerCase()===t?vd:wd),a=e.replace(xd,(o,i,r,c,l)=>i+s(c)+l).replace(bd,(o,i,r)=>i+s(r)),n=`<style data-stx-preview-scheme>:root{color-scheme:${t} !important}</style>`;if(ut.test(a))return a.replace(ut,(o)=>o+n);if(ht.test(a))return a.replace(ht,(o)=>`${o}<head>${n}</head>`);return n+a}function kd(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function an(e,t={}){let s=Sd(e,t);return t.forceScheme?yd(s,t.forceScheme):s}function Sd(e,t){let s=e==null?"":String(e),a='<base target="_blank">';if(!hd.test(s))return`<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="color-scheme" content="light dark"><base target="_blank">${t.title?`<title>${kd(t.title)}</title>`:""}</head><body>${s}</body></html>`;if(fd.test(s))return s;if(ut.test(s))return s.replace(ut,(n)=>n+'<base target="_blank">');if(ht.test(s))return s.replace(ht,(n)=>`${n}<head><base target="_blank"></head>`);return'<base target="_blank">'+s}function ey(e){return md.test(e)}function nn(e,t){let s=["fill",...Qa.map((n)=>n.name)],a=s.indexOf(e);return s[((a<0?0:a)+t+s.length)%s.length]}var $d="./PreviewFrame-erbgvzj8.stx";var Td=16,on="(prefers-color-scheme: dark)",Ke;function Ed(){if(Ke!==void 0)return Ke;try{if(typeof matchMedia!=="function"||!document.body)return!0;let e=matchMedia(on).matches,t=document.createElement("iframe");t.setAttribute("aria-hidden","true"),t.tabIndex=-1,t.style.cssText=`position:absolute;width:1px;height:1px;border:0;opacity:0;pointer-events:none;color-scheme:${e?"light":"dark"}`,document.body.appendChild(t),t.offsetWidth;let s=t.contentWindow?.matchMedia?.(on).matches;t.remove(),Ke=typeof s==="boolean"?s!==e:!0}catch{Ke=!0}return Ke}class Id{root;callbacks;html;viewportName;frameWidth;frameHeight;landscape;scheme;scripts;forms;title;viewport;scale=1;frame=null;written;stage;device;observer=null;pending=0;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;this.html=t.html??"",this.viewportName=t.viewport||"fill",this.frameWidth=t.frameWidth??null,this.frameHeight=t.frameHeight??null,this.landscape=Boolean(t.landscape),this.scheme=as(t.scheme),this.scripts=Boolean(t.scripts),this.forms=Boolean(t.forms),this.title=t.title||"Preview",this.viewport=this.resolve(),this.stage=this.part("stage"),this.device=this.part("device");let a=(o)=>this.onToolbarClick(o),n=(o)=>this.onToolbarKey(o);if(this.root.addEventListener("click",a),this.root.addEventListener("keydown",n),this.disposers.push(()=>this.root.removeEventListener("click",a),()=>this.root.removeEventListener("keydown",n)),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>{cancelAnimationFrame(this.pending),this.pending=requestAnimationFrame(()=>this.layout())}),this.observer.observe(this.stage);this.load(),this.reflect(),this.root.setAttribute("data-preview-ready","")}getState(){return{viewport:this.viewport.name,width:this.viewport.size?.width??null,height:this.viewport.size?.height??null,landscape:this.viewport.landscape,scale:this.scale,scheme:this.scheme,effectiveScheme:this.effectiveScheme()}}setHtml(e){let t=e==null?"":String(e);if(t===this.html)return;this.html=t,this.load()}setViewport(e,t={}){if(this.viewportName=e||"fill","landscape"in t)this.landscape=Boolean(t.landscape);if("width"in t)this.frameWidth=t.width??null;if("height"in t)this.frameHeight=t.height??null;let s=JSON.stringify(this.viewport);if(this.viewport=this.resolve(),this.layout(),this.reflect(),JSON.stringify(this.viewport)!==s)this.callbacks.onViewport?.(this.getState())}setScheme(e){let t=as(e);if(t===this.scheme)return;if(this.scheme=t,this.schemeToWrite()!==this.written)this.load();else this.applyScheme();this.reflect(),this.callbacks.onScheme?.(this.getState())}setPermissions(e){let t=e.scripts??this.scripts,s=e.forms??this.forms;if(t===this.scripts&&s===this.forms)return;this.scripts=t,this.forms=s,this.load()}reload(){this.load(),this.callbacks.onReload?.(this.getState())}destroy(){this.observer?.disconnect(),cancelAnimationFrame(this.pending);for(let e of this.disposers)e();this.frame?.remove(),this.frame=null,this.root.removeAttribute("data-preview-ready")}part(e){let t=this.root.querySelector(`[data-pf="${e}"]`);if(!t)throw Error(`PreviewFrame: the template has no ${e} part`);return t}resolve(){return ss(this.viewportName,{width:this.frameWidth,height:this.frameHeight,landscape:this.landscape})}effectiveScheme(){if(this.scheme!=="auto")return this.scheme;if(this.root.closest(".dark"))return"dark";if(this.root.closest(".light"))return"light";return typeof matchMedia==="function"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}schemeToWrite(){if(Ed())return;if(this.scheme==="auto"&&!this.root.closest(".dark, .light"))return;return this.effectiveScheme()}load(){let e=document.createElement("iframe");e.setAttribute("sandbox",sn({scripts:this.scripts,forms:this.forms})),e.setAttribute("referrerpolicy","no-referrer"),e.setAttribute("title",this.title),e.setAttribute("data-pf","frame"),e.className="stx-preview-frame",e.addEventListener("load",()=>{if(e===this.frame)this.callbacks.onLoad?.(this.getState())}),this.written=this.schemeToWrite(),e.srcdoc=an(this.html,{title:this.title,forceScheme:this.written}),this.frame?.remove(),this.frame=e,this.applyScheme(),this.device.appendChild(e),this.layout()}applyScheme(){let e=this.effectiveScheme();if(this.root.setAttribute("data-scheme",e),this.frame)this.frame.style.colorScheme=e}layout(){let e=this.frame;if(!e)return;let t=this.viewport.size;if(this.root.setAttribute("data-viewport",this.viewport.name),!t)this.scale=1,this.device.style.width="",this.device.style.height="",e.style.width="",e.style.height="",e.style.transform="";else{let a=this.stage.getBoundingClientRect();this.scale=en(t,{width:a.width,height:a.height},Td),this.device.style.width=`${t.width*this.scale}px`,this.device.style.height=`${t.height*this.scale}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=this.scale===1?"":`scale(${this.scale})`}let s=this.root.querySelector('[data-pf="size"]');if(s)s.textContent=tn(this.viewport,this.scale)}reflect(){for(let a of this.root.querySelectorAll("[data-pf-viewport]")){let n=a.getAttribute("data-pf-viewport")===this.viewport.name;a.setAttribute("aria-checked",String(n)),a.tabIndex=n?0:-1}if(!this.root.querySelector('[data-pf-viewport][tabindex="0"]'))this.root.querySelector("[data-pf-viewport]")?.setAttribute("tabindex","0");let e=this.effectiveScheme()==="dark",t=this.root.querySelector('[data-pf-action="scheme"]');if(t){t.setAttribute("aria-pressed",String(e));let a=t.querySelector('[data-pf="scheme-text"]');if(a)a.textContent=e?"Dark":"Light"}let s=this.root.querySelector('[data-pf-action="rotate"]');if(s){let a=ss(this.viewportName,{width:this.frameWidth,height:this.frameHeight}).size;s.disabled=!a||this.viewport.name==="custom"||a.height<=a.width,s.setAttribute("aria-pressed",String(this.viewport.landscape))}}onToolbarClick(e){let t=e.target instanceof Element?e.target.closest("[data-pf-viewport], [data-pf-action]"):null;if(!t||!this.root.contains(t))return;let s=t.getAttribute("data-pf-viewport");if(s){this.setViewport(s,{width:null,height:null});return}switch(t.getAttribute("data-pf-action")){case"scheme":this.setScheme(this.effectiveScheme()==="dark"?"light":"dark");break;case"rotate":this.setViewport(this.viewportName,{landscape:!this.landscape});break;case"reload":this.reload();break}}onToolbarKey(e){let t=e.target instanceof Element?e.target.closest("[data-pf-viewport]"):null;if(!t)return;let s=e.key==="ArrowRight"||e.key==="ArrowDown"?1:e.key==="ArrowLeft"||e.key==="ArrowUp"?-1:0;if(s===0)return;e.preventDefault();let a=t.getAttribute("data-pf-viewport")||"fill",n=nn(a,s);this.setViewport(n,{width:null,height:null}),this.root.querySelector(`[data-pf-viewport="${n}"]`)?.focus()}}var Pd="./PricingPlan-h7jt2696.stx";var Md="./PricingTable-v3vdn6av.stx";var Rd=["month","year"];function Ld(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"plan"}function rn(e,t,s){let a=Number.isInteger(e);try{return new Intl.NumberFormat(s,{style:"currency",currency:t,minimumFractionDigits:a?0:2,maximumFractionDigits:2}).format(e)}catch{return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:a?0:2}).format(e)}}function ln(e){let t=e?.month,s=e?.year;if(typeof t!=="number"||typeof s!=="number"||t<=0||s<=0)return 0;let a=1-s/(t*12);return a>0.005?a:0}function cn(e,t,s="en-US"){let a=(e.currency||"USD").toUpperCase(),n=e.prices?.[t];if(n===null||n===void 0||!Number.isFinite(Number(n)))return{interval:t,amount:"Custom",per:"",note:"",spoken:`${e.name}: custom pricing`};let o=Number(n);if(o===0)return{interval:t,amount:"Free",per:"",note:"",spoken:`${e.name}: free`};let i=rn(o,a,s),r=t==="year"?`${rn(Math.round(o/12*100)/100,a,s)}/month billed yearly`:"";return{interval:t,amount:i,per:`/${t}`,note:r,spoken:`${e.name}: ${i} per ${t}`}}function ns(e,t,s="en-US"){if(e===!0)return{kind:"included",text:"",spoken:"Included"};if(e===!1||e===null||e===void 0||e==="")return{kind:"excluded",text:"",spoken:"Not included"};let a=typeof e==="number"?`${new Intl.NumberFormat(s).format(e)}${t.unit?` ${t.unit}`:""}`:String(e);return{kind:"value",text:a,spoken:a}}function Od(e,t){if(Array.isArray(e)&&e.length)return e.filter((a)=>!!a&&Array.isArray(a.items)).map((a)=>({section:a.section||"",items:a.items.filter((n)=>n&&typeof n.key==="string").map((n)=>({...n,label:n.label||n.key}))}));let s=[];for(let a of t)for(let n of Object.keys(a.features||{}))if(!s.includes(n))s.push(n);return s.length?[{section:"",items:s.map((a)=>({key:a,label:a}))}]:[]}function Dd(e,t,s={}){let a=s.locale||"en-US",n=(Array.isArray(e)?e:[]).filter((l)=>!!l&&typeof l==="object"&&typeof l.name==="string"),o=Od(t,n),i=o.flatMap((l)=>l.items),r=0;return{plans:n.map((l)=>{let d=l.id||Ld(l.name),p=!!s.currentPlan&&s.currentPlan===d,u=ln(l.prices);r=Math.max(r,u);let f=typeof l.cta==="string"?{label:l.cta}:l.cta||{},h=Array.isArray(l.highlights)&&l.highlights.length?l.highlights.map(String):i.map((m)=>({f:m,cell:ns(l.features?.[m.key],m,a)})).filter(({cell:m})=>m.kind!=="excluded").map(({f:m,cell:b})=>b.kind==="value"?`${m.label}: ${b.text}`:m.label);return{id:d,name:l.name,description:l.description||"",highlighted:l.highlighted===!0,badge:l.highlighted?l.badge||"Most popular":"",current:p,prices:Rd.map((m)=>cn(l,m,a)),saving:u?`Save ${Math.round(u*100)}%`:"",highlights:h,ctaLabel:p?"Current plan":f.label||(l.prices?.month===null?"Contact sales":"Get started"),ctaHref:p?"":f.href||"",cells:o.map((m)=>m.items.map((b)=>ns(l.features?.[b.key],b,a)))}}),sections:o,maxSaving:r}}var Hd="./Progress-2qzb77kc.stx";var Fd="./Radio-8153x74w.stx";var Bd="./RadioGroup-mz3pv7he.stx";var qd="./RadioGroupDescription-z34r9avr.stx";var Wd="./RadioGroupLabel-ka0hfm7b.stx";var Ud="./RadioGroupOption-mk98taz5.stx";var Yd="./RenderSurface-z9zr4d75.stx";var Xd=8192,Ne=globalThis;function Zd(){return Ne.__stxRenderSurfaces??=new Map,Ne.__stxRenderSurfaces}function dn(e,t){return Object.assign(Error(t),{code:e})}function pn(){return Boolean(Ne.stx?._host?.isNative)}function Qd(){if(pn())return typeof Ne.craft?.renderSurface?.present==="function"&&Ne.craft?.capabilities?.renderSurface===!0?"native":"none";if(typeof document>"u")return"none";return"canvas"}function ep(e,t,s,a){if(typeof e!=="string"||!e)throw TypeError("presentFrame needs the surface's name");if(!(t instanceof Uint32Array))throw TypeError("presentFrame takes a Uint32Array of 0xAARRGGBB words");for(let[n,o]of[["width",s],["height",a]])if(!Number.isInteger(o)||o<1||o>8192)throw TypeError(`presentFrame's ${n} must be a whole number from 1 to 8192, not ${o}`);if(t.length!==s*a)throw TypeError(`presentFrame was given ${t.length} words for a ${s} x ${a} frame (${s*a})`)}function un(e,t,s,a){if(pn()){let o=Ne.craft?.renderSurface;if(!o||typeof o.present!=="function")throw dn("UNAVAILABLE","This device cannot draw a RenderSurface");return o.present(e,t,s,a)}ep(e,t,s,a);let n=Zd().get(e);if(!n)throw dn("NOT_FOUND",`No RenderSurface named "${e}" is on the page`);return tp(n,t,s,a),!0}function tp(e,t,s,a){let{canvas:n,context:o,opaque:i}=e;if(n.width!==s)n.width=s;if(n.height!==a)n.height=a;if(!e.image||e.image.width!==s||e.image.height!==a)e.image=o.createImageData(s,a);let r=e.image.data;for(let c=0,l=0;c<t.length;c++,l+=4){let d=t[c],p=d>>>24,u=d>>>16&255,f=d>>>8&255,h=d&255;if(i)p=255;else if(p>0&&p<255)u=Math.min(255,Math.round(u*255/p)),f=Math.min(255,Math.round(f*255/p)),h=Math.min(255,Math.round(h*255/p));r[l]=u,r[l+1]=f,r[l+2]=h,r[l+3]=p}o.putImageData(e.image,0,0)}function sp(e,t,s={}){let a=typeof requestAnimationFrame==="function"?requestAnimationFrame:(r)=>setTimeout(()=>r(Date.now()),16),n=!1,o=!1,i=(r)=>{if(n)return;if(!o)try{let c=t(r);if(c&&!un(e,c.pixels,c.width,c.height))o=!0}catch(c){if(n=!0,c?.code==="NOT_FOUND")return;if(s.onError)s.onError(c);else throw c;return}a(i)};return a(i),{stop:()=>{n=!0},wake:()=>{o=!1},get waiting(){return o},get ended(){return n}}}var np="./SegmentedControl-jm6tb9f8.stx";var ip="./Select-yhmtvqcx.stx";var se={NONE:0,KEYWORD:1,SUBSTRING:2,WORD_PREFIX:3,PREFIX:4},By=700,ft=1600;function Me(e){return`stx:settings:${e}`}function Q(e,t){if(!t)return null;return e.find((s)=>s.id===t)??null}function rp(e){return(e.find((s)=>!s.parent)??e[0])?.id??""}function mt(e,...t){for(let s of t)if(Q(e,s))return s;return rp(e)}function gt(e,t){let s=new Set,a=Q(e,t);while(a&&a.parent&&!s.has(a.id)){s.add(a.id);let n=Q(e,a.parent);if(!n)break;a=n}return a?.id??""}function ke(e,t){let s=Q(e,t);if(!s?.parent||s.parent===t)return"";return Q(e,s.parent)?s.parent:""}function xt(){return{trail:[],cursor:-1}}function Se(e){return e.trail[e.cursor]??""}function We(e,t){if(!t||Se(e)===t)return e;let s=[...e.trail.slice(0,e.cursor+1),t];return{trail:s,cursor:s.length-1}}function Ge(e){return e.cursor<e.trail.length-1}function bt(e,t=[]){if(e.cursor>0)return!0;return e.cursor===0&&ke(t,Se(e))!==""}function vt(e,t=[]){if(e.cursor>0)return{trail:e.trail,cursor:e.cursor-1};if(e.cursor===0){let s=ke(t,Se(e));if(s)return{trail:[s,...e.trail],cursor:0}}return e}function wt(e){return Ge(e)?{trail:e.trail,cursor:e.cursor+1}:e}function ye(e){return String(e??"").normalize("NFD").replace(/[\u0300-\u036F]/g,"").toLowerCase().replace(/\s+/g," ").trim()}function hn(e,t){let s=e.indexOf(t);while(s!==-1){if(s===0||!/[\p{L}\p{N}]/u.test(e.charAt(s-1)))return!0;s=e.indexOf(t,s+1)}return!1}function fn(e,t,s){if(t.startsWith(e))return se.PREFIX;if(hn(t,e))return se.WORD_PREFIX;if(t.includes(e))return se.SUBSTRING;if(hn(s,e))return se.KEYWORD;return se.NONE}function mn(e,t,s=""){let a=ye(e);if(a==="")return se.NONE;let n=ye(t),o=ye(s),i=fn(a,n,o),r=a.split(" ");if(i!==se.NONE||r.length===1)return i;let c=se.PREFIX;for(let l of r){let d=fn(l,n,o);if(d===se.NONE)return se.NONE;c=Math.min(c,d===se.PREFIX&&l!==r[0]?se.WORD_PREFIX:d)}return c}function yt(e,t){let s=ye(e);if(s==="")return{query:"",panes:[],settings:[]};let a=[];for(let o of t.items){let i=Q(t.panes,o.id),r=`${o.keywords??""} ${i?.keywords??""} ${i&&i.title!==o.label?i.title:""}`;if(mn(s,o.label,r)!==se.NONE)a.push(o.id)}let n=[];return t.rows.forEach((o,i)=>{if(!o.label)return;let c=Q(t.panes,o.pane)?.title??"",l=mn(s,o.label,`${o.keywords??""} ${c}`);if(l!==se.NONE)n.push({id:o.id,label:o.label,pane:o.pane,paneTitle:c,row:i,rank:l})}),n.sort((o,i)=>i.rank-o.rank||o.row-i.row),{query:s,panes:a,settings:n}}function gn(e){if(e<=0)return"No results";return e===1?"1 result":`${e} results`}function os(e,t,s){if(s<=0)return-1;if(e==="ArrowDown")return Math.min(s-1,t+1);if(e==="ArrowUp")return t<0?s-1:Math.max(0,t-1);if(e==="Home")return 0;if(e==="End")return s-1;return-1}function xn(e,t,s,a=700){return{buffer:(!e||s-e.at>a?"":e.buffer)+ye(t),at:s}}function bn(e,t,s){let a=e.length,n=ye(t);if(a===0||n==="")return-1;let o=n.split("").every((c)=>c===n.charAt(0)),i=o?n.charAt(0):n,r=o?s+1:Math.max(0,s);for(let c=0;c<a;c++){let l=((r+c)%a+a)%a;if(ye(e[l]).startsWith(i))return l}return-1}var cp="./SettingsGroup-t3emsgk2.stx";var pp="./SettingsPane-tqe8q5cw.stx";var hp="./SettingsPaneHeader-wznh6dss.stx";var mp="./SettingsRow-5jgay5ae.stx";var xp="./SettingsSidebarGroup-p5h359bn.stx";var vp="./SettingsSidebarItem-69zs4b55.stx";var yp="./SettingsUpdateRow-1gsqj04f.stx";var Sp="./SettingsWindow-z76981eg.stx";var Cp="data-stx-settings",Re="data-settings-item",Le="data-settings-pane",$p="data-settings-row";class Tp{tree;root;options;callbacks;history=xt();current="";query="";hits=[];highlighted=null;highlightTimer=null;pressed=new Map;visible=new Map;disposers=[];destroyed=!1;constructor(e,t,s={},a={}){this.tree=e;this.root=t;this.options=s;this.callbacks=a;this.hear(),this.disposers.push(e.observeChildren(t,()=>{if(this.destroyed)return;this.hear(),this.show(!1),this.applySearch(!1)}));let n=this.panes(),o=this.paneNodes().find((i)=>this.tree.getAttribute(i,"data-active")!=null);this.history=We(this.history,mt(n,this.stored(),s.pane,o?this.attribute(o,Le):"")),this.show(!0),this.applySearch(!1)}getPane(){return this.current}showPane(e){if(!Q(this.panes(),e))return!1;return this.open(e),!0}revealSetting(e){if(!e)return!1;let t=this.rowNodes().find((a)=>this.attribute(a,"data-setting")===e),s=t?this.paneOf(t):"";if(!t||!s)return!1;return this.open(s),this.reveal(t),!0}back(){this.travel(vt(this.history,this.panes()))}forward(){this.travel(wt(this.history))}search(e){this.query=String(e??""),this.applySearch(!0)}chooseResult(e){let t=this.hits[e];if(!t||this.tree.parent(t.row)===null)return;this.open(t.hit.pane),this.reveal(t.row)}destroy(){this.destroyed=!0;for(let e of this.disposers)e();this.disposers.length=0;for(let e of this.pressed.values())e();this.pressed.clear(),this.visible.clear(),this.clearHighlight()}attribute(e,t){return this.tree.getAttribute(e,t)??""}toggle(e,t){let s=this.attribute(e,"class").split(/\s+/).filter(Boolean),a=this.visible.has(e)?this.visible.get(e):!s.includes("hidden");if(this.visible.set(e,t),a===t)return;let n=s.filter((o)=>o!=="hidden");this.tree.setAttribute(e,"class",(t?n:[...n,"hidden"]).join(" "))}has(e,t){return this.tree.getAttribute(e,t)!=null}closest(e,t){for(let s=e;s;s=this.tree.parent(s))if(this.has(s,t))return s;return null}all(e,t=this.root){return this.tree.descendants(t).filter((s)=>this.has(s,e)&&this.closest(this.tree.parent(s),Cp)===this.root)}paneNodes(){return this.all(Le)}panes(){return this.paneNodes().map((e)=>{let t=this.attribute(e,Le);return{id:t,title:this.attribute(e,"data-title")||t,keywords:this.attribute(e,"data-keywords"),parent:this.attribute(e,"data-parent")}})}itemNodes(){return this.all(Re)}items(){return this.itemNodes().map((e)=>({id:this.attribute(e,Re),label:this.attribute(e,"data-label").trim(),keywords:this.attribute(e,"data-keywords")}))}rowNodes(){return this.all($p).filter((e)=>this.paneOf(e)!=="")}paneOf(e){let t=this.closest(e,Le);return t?this.attribute(t,Le):""}stored(){if(!this.options.storageKey||!this.options.storage)return"";try{return this.options.storage.get(Me(this.options.storageKey))||""}catch{return""}}store(){if(!this.options.storageKey||!this.options.storage||!this.current)return;try{this.options.storage.set(Me(this.options.storageKey),this.current)}catch{}}hear(){let e=new Set;for(let t of this.itemNodes())if(e.add(t),!this.pressed.has(t))this.pressed.set(t,this.tree.listen(t,"click",()=>this.open(this.attribute(t,Re))));for(let t of this.rowNodes()){if(!this.has(t,"data-navigate"))continue;if(e.add(t),!this.pressed.has(t))this.pressed.set(t,this.tree.listen(t,"click",()=>this.navigate(t)))}for(let[t,s]of this.pressed){if(e.has(t))continue;s(),this.pressed.delete(t)}}navigate(e){if(this.attribute(e,"aria-disabled")==="true")return;let t=this.attribute(e,"data-navigate");if(!Q(this.panes(),t))return;let s=this.current;this.open(t),this.callbacks.onNavigate?.({id:t,from:s,setting:this.attribute(e,"data-setting")})}open(e){if(!e)return;this.history=We(this.history,e),this.show(!0)}travel(e){if(e===this.history)return;this.history=e,this.show(!0)}show(e){let t=this.panes(),s=Se(this.history),a=Q(t,s);if(!a)return;for(let i of this.paneNodes())this.toggle(i,this.attribute(i,Le)===s);let n=gt(t,s);for(let i of this.itemNodes()){let r=this.attribute(i,Re)===n;for(let c of[i,...this.tree.descendants(i)])this.tree.setAttribute(c,"aria-selected",r?"true":"false")}let o=this.current!==s;if(this.current=s,this.report(),o){if(this.store(),e)this.callbacks.onPane?.({id:s,title:a.title,parent:ke(t,s)})}}report(){let e=this.panes(),t=Q(e,this.current),s=this.query.trim()!=="";this.callbacks.onState?.({pane:this.current,title:t?.title??"",canGoBack:bt(this.history,e),canGoForward:Ge(this.history),query:this.query,searching:s,results:this.hits.map(({hit:a},n)=>({position:n,label:a.label,pane:a.paneTitle})),empty:s&&this.shownItems===0&&this.hits.length===0})}shownItems=0;applySearch(e){let t=this.rowNodes(),s=t.map((r)=>({id:this.attribute(r,"data-setting"),label:this.attribute(r,"data-label").trim(),keywords:this.attribute(r,"data-keywords"),pane:this.paneOf(r)})),a=yt(this.query,{panes:this.panes(),items:this.items(),rows:s}),n=a.query!=="",o=new Set;for(let r of this.itemNodes()){let c=!n||a.panes.includes(this.attribute(r,Re));if(c)o.add(r);this.toggle(r,c)}this.shownItems=n?a.panes.length:o.size;let i=!0;for(let r of this.all("data-settings-group")){let c=this.all(Re,r).some((l)=>o.has(l));this.toggle(r,c);for(let l of this.all("data-settings-group-gap",r))this.toggle(l,c&&!i);if(c)i=!1}for(let r of this.all("data-settings-account"))this.toggle(r,!n);if(this.hits=a.settings.map((r)=>({hit:r,row:t[r.row]})),this.report(),e)this.callbacks.onSearch?.({query:this.query.trim(),panes:a.panes,settings:a.settings.map((r)=>({id:r.id,label:r.label,pane:r.pane}))})}reveal(e){this.clearHighlight(),this.tree.setAttribute(e,"data-highlight","");let t=this.options.wash?.();if(t)this.tree.setStyle(e,{backgroundColor:t});this.highlighted=e,this.highlightTimer=setTimeout(()=>this.clearHighlight(),ft)}clearHighlight(){if(this.highlightTimer)clearTimeout(this.highlightTimer);if(this.highlightTimer=null,this.highlighted)this.tree.removeAttribute(this.highlighted,"data-highlight"),this.tree.setStyle(this.highlighted,{backgroundColor:"transparent"});this.highlighted=null}}var e0={grey:"bg-[#8e8e93] dark:bg-[#8e8e93]",blue:"bg-[#007aff] dark:bg-[#0a84ff]",red:"bg-[#ff3b30] dark:bg-[#ff453a]",orange:"bg-[#ff9500] dark:bg-[#ff9f0a]",yellow:"bg-[#ffcc00] dark:bg-[#ffd60a]",green:"bg-[#34c759] dark:bg-[#30d158]",indigo:"bg-[#5856d6] dark:bg-[#5e5ce6]",purple:"bg-[#af52de] dark:bg-[#bf5af2]",pink:"bg-[#ff2d55] dark:bg-[#ff375f]",ink:"bg-[#1d1d1f] dark:bg-[#dcdce0]"};function t0(e){return e==="ink"?"text-[#ffffff] dark:text-[#1d1d1f]":"text-[#ffffff]"}var ge="text-[#000000]/85 dark:text-[#ffffff]/85",ne="text-[#000000]/50 dark:text-[#ffffff]/55",vn="text-[#000000]/26 dark:text-[#ffffff]/25",is="text-[#ff3b30] dark:text-[#ff453a]",Ep="text-[#007aff] dark:text-[#0a84ff]",Ip="aria-selected:bg-[#007aff] dark:aria-selected:bg-[#0a84ff]",wn="aria-selected:text-[#ffffff] dark:aria-selected:text-[#ffffff]",Ap="bg-[#000000]/10 dark:bg-[#ffffff]/10",yn="bg-[#000000]/4 dark:bg-[#ffffff]/5",s0={shell:"flex-1 flex-row",sidebar:"flex-col bg-[#f2f1f0] dark:bg-[#2a2a2a]",sidebarWidth:226,sidebarMaterial:"sidebar",sidebarTop:"pt-[38px] px-[9px] pb-[6px]",search:"h-[28px] text-[13px]",nav:"flex-1 flex-col px-[9px] pb-[12px]",account:"mt-[7px]",list:"flex-col pt-[7px]",results:"flex-col gap-[2px] pt-[7px]",result:"flex-col justify-center min-h-[38px] px-[8px] py-[4px] rounded-[8px] hover:bg-[#000000]/5 dark:hover:bg-[#ffffff]/6",resultLabel:`text-[13px] ${ge}`,resultPane:`text-[11px] ${ne}`,empty:`py-[24px] px-[8px] text-[13px] text-center ${ne}`,group:"flex-col gap-[2px]",groupGap:"h-[11px]",groupLabel:`px-[8px] pb-[3px] text-[11px] font-semibold ${ne}`,item:`flex-row items-center gap-[8px] h-[30px] px-[8px] rounded-[8px] ${Ip}`,itemTile:"h-[20px] w-[20px] rounded-[5.5px] items-center justify-center",itemGlyph:"h-[13px] w-[13px]",itemLabel:`flex-1 text-[13px] ${ge} ${wn}`,itemBadge:`text-[11px] ${ne} ${wn}`,detail:"flex-1 flex-col bg-[#ffffff] dark:bg-[#1e1e1e]",toolbar:"flex-row items-center gap-[12px] h-[52px] pl-[8px] pr-[16px]",history:"flex-row items-center",historyButton:`text-[15px] ${ne}`,title:`flex-1 text-[20px] font-semibold ${ge}`,body:"flex-1 flex-col",pane:"flex-1",paneContent:"flex-col px-[20px] pt-[11px] pb-[20px]",hero:`flex-col items-center mb-[10px] p-[22px] rounded-[12px] ${yn}`,heroTile:"h-[48px] w-[48px] rounded-[12px] items-center justify-center",heroGlyph:"h-[30px] w-[30px]",heroTitle:`mt-[10px] text-[17px] font-semibold text-center ${ge}`,heroDescription:`mt-[4px] text-[13px] text-center ${ne}`,heroExtra:"mt-[8px] flex-col items-center",section:"flex-col mb-[10px]",sectionHeader:`pt-[18px] px-[10px] pb-[8px] text-[13px] font-bold ${ge}`,card:`flex-col rounded-[12px] ${yn}`,sectionFooter:`pt-[6px] px-[10px] text-[11px] ${ne}`,rowRule:`mx-[10px] h-[0.5px] ${Ap}`,row:"flex-row items-center gap-[10px] min-h-[38px] px-[10px]",rowTall:"min-h-[44px]",rowMultiline:"items-start",rowStacked:"flex-col items-stretch gap-[4px] min-h-[38px] px-[10px]",rowPressed:"active:bg-[#000000]/5 dark:active:bg-[#ffffff]/6",rowWash:{light:"#007aff33",dark:"#0a84ff33"},rowTile:"h-[24px] w-[24px] rounded-[6px] items-center justify-center",rowTileMultiline:"mt-[10px]",rowGlyph:"h-[15px] w-[15px]",rowText:"flex-1 flex-col justify-center py-[7px]",rowTextMultiline:"flex-1 flex-col py-[10px]",rowTextStacked:"flex-col pt-[10px]",rowLabel:`text-[13px] ${ge}`,rowLabelDestructive:`text-[13px] ${is}`,rowDescription:`mt-[1px] text-[11px] ${ne}`,rowControl:"flex-row items-center justify-end gap-[8px]",rowControlMultiline:"flex-row items-center justify-end gap-[8px] py-[10px]",rowControlStacked:"flex-col items-stretch pb-[7px]",rowValue:`text-[13px] ${ne}`,rowChevron:`h-[11px] w-[11px] ${vn}`,rowDisabled:"opacity-50",appearance:"flex-row gap-[14px]",appearanceOption:"flex-col items-center gap-[5px]",appearanceFrame:"p-[3px] rounded-[9px] border-2 border-transparent aria-checked:border-[#007aff] dark:aria-checked:border-[#0a84ff]",appearanceThumb:"h-[44px] w-[67px] flex-row rounded-[6px] overflow-hidden",appearanceLight:"flex-1 bg-[#e9e9eb]",appearanceDark:"flex-1 bg-[#2c2c2e]",appearanceCaption:`text-[11px] ${ge}`,updateStatus:`mt-[1px] text-[11px] ${ne}`,updateError:`mt-[1px] text-[11px] ${is}`,updateProgress:`text-[11px] ${ne}`,ink:ge,inkSecondary:ne,inkTertiary:vn,danger:is,accentText:Ep},a0={back:"chevron.left",forward:"chevron.right",disclosure:"chevron.right"};var Pp={check:"Check Now",install:"Download and Install",relaunch:"Restart to Update"};function Np(e){let t=Number(e);if(!Number.isFinite(t))return"";return`${Math.round(Math.min(1,Math.max(0,t))*100)}%`}function o0(e,t=""){let s=String(t||"").trim(),a=String(e?.currentVersion||"").trim(),n=[s,a].filter(Boolean).join(" "),o=(p,u,f={})=>({title:n,sentence:p,action:u,actionLabel:u?Pp[u]:"",busy:!1,progress:"",failed:!1,...f});if(!e||typeof e.state!=="string")return o("",null);let i=s||"This app",r=String(e.version||"").trim(),c=r?`Version ${r}`:"An update",l=e.selfUpdating!==!1,d=String(e.reason||"").trim();switch(e.state){case"unavailable":return o(d||`${i} cannot update itself.`,null);case"idle":return o("Check for a newer version.","check");case"checking":return o("Checking for updates...","check",{busy:!0});case"current":return o(`${i} is up to date.`,"check");case"available":return l?o(`${c} is available.`,"install"):o(`${c} is available. ${d||`${i} cannot update itself.`}`,"check");case"downloading":return o(`Downloading ${r?`version ${r}`:"the update"}...`,"install",{busy:!0,progress:Np(e.progress)});case"installing":return o(`Installing ${r?`version ${r}`:"the update"}...`,"install",{busy:!0});case"installed":return o(`${c} is installed. Restart ${i} to finish updating.`,"relaunch");case"error":return o(String(e.error||"").trim()||"The update could not be completed.","check",{failed:!0});default:return o("",null)}}import{loadStaticFragment as Mp}from"@stacksjs/stx/static-fragment-client";var rs="[data-stx-settings]",kt="[data-settings-item]",kn="[data-settings-pane]",Rp="[data-settings-row]",ls="[data-settings-result]",Lp='button, a[href], input, select, textarea, label, [role="switch"], [role="checkbox"], [role="radio"], [role="slider"], [role="button"], [contenteditable]';function Sn(e){return e.replace(/[^\w-]+/g,"-")}class Op{root;options;callbacks;history=xt();current="";query="";storageKey;storage;typed=null;hits=[];queuedReveal=null;fragmentDownloads=new AbortController;highlighted=null;highlightTimer=null;disposers=[];list;account;input;field;results;empty;live;backButton;forwardButton;title;body;constructor(e,t={},s={}){this.root=e;this.options=t;this.callbacks=s;if(this.storageKey=t.storageKey||"",this.storage=t.storage??null,!e.id)e.id=`settings-${Math.random().toString(36).slice(2,8)}`;this.list=this.own("[data-settings-list]"),this.account=this.own("[data-settings-account]"),this.input=this.own("[data-settings-search-input]"),this.field=this.own("[data-settings-search]"),this.results=this.own("[data-settings-results]"),this.empty=this.own("[data-settings-empty]"),this.live=this.own("[data-settings-live]"),this.backButton=this.own("[data-settings-back]"),this.forwardButton=this.own("[data-settings-forward]"),this.title=this.own("[data-settings-title]"),this.body=this.own("[data-settings-body]");for(let o of[this.results,this.live,this.title])if(o)o.__stx_inert_content=!0;if(this.listen(e,"click",(o)=>this.onClick(o)),this.listen(t.globalKeys?document:e,"keydown",(o)=>this.onKeyDown(o)),this.input)this.listen(this.input,"input",()=>this.search(this.input.value));if(this.body)this.listen(this.body,"scroll",()=>this.syncScrolled(),{passive:!0});this.listen(window,"focus",()=>e.setAttribute("data-stx-window-active","true")),this.listen(window,"blur",()=>e.setAttribute("data-stx-window-active","false")),this.describe();let a=this.panes(),n=this.paneElements().find((o)=>!o.hidden)?.getAttribute("data-settings-pane");this.open(mt(a,this.stored(),t.pane,n)),e.setAttribute("data-settings-ready","")}getPane(){return this.current}showPane(e){if(!Q(this.panes(),e))return!1;return this.open(e),!0}revealSetting(e){if(!e)return!1;let t=this.searchableRows().find((s)=>s.id===e);if(!t)return!1;return this.open(t.pane),this.revealRow(t),!0}back(){this.travel(vt(this.history,this.panes()))}forward(){this.travel(wt(this.history))}focusSearch(){if(!this.input)return;this.input.focus(),this.input.select()}search(e){if(this.query=e,this.input&&this.input.value!==e)this.input.value=e;this.applySearch(!0)}destroy(){this.fragmentDownloads.abort();for(let e of this.disposers)e();this.disposers.length=0,this.clearHighlight(),this.root.removeAttribute("data-settings-ready")}own(e){return this.all(e)[0]??null}all(e,t=this.root){return Array.from(t.querySelectorAll(e)).filter((s)=>s.closest(rs)===this.root)}listen(e,t,s,a){e.addEventListener(t,s,a),this.disposers.push(()=>e.removeEventListener(t,s,a))}paneElements(){return this.all(kn)}paneElement(e){return this.paneElements().find((t)=>t.getAttribute("data-settings-pane")===e)??null}panes(){return this.paneElements().map((e)=>({id:e.getAttribute("data-settings-pane")||"",title:e.getAttribute("data-title")||e.getAttribute("data-settings-pane")||"",keywords:e.getAttribute("data-keywords")||"",parent:e.getAttribute("data-parent")||""})).filter((e)=>e.id!=="")}itemElements(){return this.list?this.all(kt,this.list):[]}visibleItems(){return this.itemElements().filter((e)=>!e.hidden&&!e.disabled)}labelOf(e){return(e.querySelector(".stx-settings-item-label")?.textContent||e.getAttribute("aria-label")||e.textContent||"").trim()}items(){return this.itemElements().map((e)=>({id:e.getAttribute("data-settings-item")||"",label:this.labelOf(e),keywords:e.getAttribute("data-keywords")||""}))}rowElements(e){return this.all(Rp,e).filter((t)=>t.closest(kn)===e)}searchableRows(){return this.paneElements().flatMap((e)=>{let t=e.getAttribute("data-settings-pane")||"";if(!t)return[];if(e.hasAttribute("data-stx-fragment"))return JSON.parse(e.getAttribute("data-stx-fragment-metadata")||"[]").map(([a,n,o],i)=>({id:a,label:n.trim(),keywords:o,pane:t,position:i}));return this.rowElements(e).map((s,a)=>({id:s.getAttribute("data-setting")||"",label:(s.getAttribute("data-label")||"").trim(),keywords:s.getAttribute("data-keywords")||"",pane:t,position:a}))})}stored(){if(!this.storageKey)return"";try{let e=Me(this.storageKey);return(this.storage?this.storage.get(e):localStorage.getItem(e))||""}catch{return""}}store(){if(!this.storageKey||!this.current)return;try{let e=Me(this.storageKey);if(this.storage)this.storage.set(e,this.current);else localStorage.setItem(e,this.current)}catch{}}describe(){let e=this.root.id,t=new Map;for(let s of this.itemElements()){let a=s.getAttribute("data-settings-item")||"";if(!s.id)s.id=`${e}-item-${Sn(a)}`;s.setAttribute("role","tab"),t.set(a,s);for(let n=s.parentElement;n&&n!==this.list;n=n.parentElement)if(!n.hasAttribute("role"))n.setAttribute("role","presentation")}for(let s of this.paneElements()){let a=s.getAttribute("data-settings-pane")||"";if(!s.id)s.id=`${e}-pane-${Sn(a)}`;let n=t.get(a);if(n)n.setAttribute("aria-controls",s.id),s.setAttribute("role","tabpanel"),s.setAttribute("aria-labelledby",n.id),s.removeAttribute("aria-label");else if(this.title?.id){if(s.setAttribute("role","region"),!s.hasAttribute("aria-label"))s.setAttribute("aria-label",s.getAttribute("data-title")||a)}}}open(e){if(!e)return;this.history=We(this.history,e),this.show()}travel(e){if(e===this.history)return;this.history=e,this.show()}show(){this.describe();let e=this.panes(),t=Se(this.history),s=Q(e,t),a=this.paneElement(t);if(!s||!a)return;let n=document.activeElement,o=n instanceof HTMLElement&&this.paneElements().some((c)=>c!==a&&c.contains(n));for(let c of this.paneElements())c.hidden=c!==a,c.toggleAttribute("data-active",c===a);let i=gt(e,t);for(let c of this.itemElements()){let l=c.getAttribute("data-settings-item")===i;c.setAttribute("aria-selected",l?"true":"false"),c.toggleAttribute("data-active",l)}if(this.syncTabStops(),this.title)this.title.textContent=s.title;this.root.setAttribute("data-pane",t),this.root.toggleAttribute("data-subpane",ke(e,t)!==""),this.syncHistoryButtons(e);let r=t!==this.current;if(this.current=t,r){if(this.queuedReveal=null,this.clearHighlight(),this.body)this.body.scrollTop=0;if(this.syncScrolled(),o){if(!a.hasAttribute("tabindex"))a.setAttribute("tabindex","-1");a.focus({preventScroll:!0})}this.store(),this.callbacks.onPane?.({id:t,title:s.title,parent:ke(e,t)})}if(a.hasAttribute("data-stx-fragment")&&!a.hasChildNodes())this.loadPane(a)}async loadPane(e){let t=document.createElement("p");if(t.setAttribute("role","status"),t.textContent=this.options.loadingPane??"Loading settings\u2026",e.contains(document.activeElement))e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0});e.replaceChildren(t),e.setAttribute("aria-busy","true");let s=this.fragmentDownloads.signal;try{await Mp(e,s);let a=this.queuedReveal;if(a&&this.current===a.pane&&this.paneElement(a.pane)===e)this.queuedReveal=null,this.revealRow(a)}catch{if(s.aborted||!e.isConnected)return;t.textContent=this.options.failedPane??"Could not load this pane.";let a=document.createElement("button");a.type="button",a.textContent=this.options.retryPane??"Try again",a.addEventListener("click",()=>void this.loadPane(e),{once:!0}),e.replaceChildren(t,a)}finally{e.removeAttribute("aria-busy")}}syncTabStops(){let e=this.visibleItems(),t=e.find((s)=>s.getAttribute("aria-selected")==="true")??e[0];for(let s of this.itemElements())s.setAttribute("tabindex",s===t?"0":"-1")}syncHistoryButtons(e){let t=(n,o,i)=>{if(!n)return;let r=document.activeElement===n;if(n.disabled=!o,r&&!o&&i&&!i.disabled)i.focus()},s=bt(this.history,e),a=Ge(this.history);if(s)t(this.backButton,!0,null),t(this.forwardButton,a,this.backButton);else t(this.forwardButton,a,null),t(this.backButton,!1,this.forwardButton)}syncScrolled(){this.root.toggleAttribute("data-scrolled",Boolean(this.body&&this.body.scrollTop>0))}applySearch(e){let t=this.searchableRows(),s=yt(this.query,{panes:this.panes(),items:this.items(),rows:t}),a=s.query!=="";this.root.toggleAttribute("data-searching",a),this.field?.toggleAttribute("data-filled",this.query!=="");for(let o of this.itemElements())o.hidden=a&&!s.panes.includes(o.getAttribute("data-settings-item")||"");if(this.list){for(let o of this.all("[data-settings-group]",this.list))o.hidden=a&&this.all(kt,o).every((i)=>i.hidden);this.list.hidden=a&&s.panes.length===0}if(this.account)this.account.hidden=a;this.hits=s.settings.map((o)=>({hit:o,row:t[o.row]})),this.drawResults();let n=s.panes.length+s.settings.length;if(this.empty)this.empty.hidden=!a||n>0;if(this.live)this.live.textContent=a?gn(n):"";if(this.syncTabStops(),e)this.callbacks.onSearch?.({query:this.query.trim(),panes:s.panes,settings:s.settings.map((o)=>({id:o.id,label:o.label,pane:o.pane}))})}drawResults(){let e=this.results;if(!e)return;e.replaceChildren(),e.hidden=this.hits.length===0,this.hits.forEach(({hit:t},s)=>{let a=document.createElement("button");a.type="button",a.className="stx-settings-result",a.setAttribute("data-settings-result",String(s)),a.setAttribute("tabindex","-1");let n=document.createElement("span");n.className="stx-settings-result-label",n.textContent=t.label;let o=document.createElement("span");o.className="stx-settings-result-pane",o.textContent=t.paneTitle,a.append(n,o),e.append(a)})}chooseResult(e){let t=this.hits[e];if(!t)return;this.open(t.hit.pane),this.revealRow(t.row)}clearSearch(){if(this.query===""&&(!this.input||this.input.value===""))return;this.search("")}revealRow(e){let t=this.paneElement(e.pane);if(!t)return;if(t.hasAttribute("data-stx-fragment")){this.queuedReveal=e;return}let s=this.rowElements(t),a=e.id?s.find((n)=>n.getAttribute("data-setting")===e.id):s[e.position];if(a)this.reveal(a)}reveal(e){if(this.body){let t=this.body.getBoundingClientRect(),s=e.getBoundingClientRect();this.body.scrollTop+=s.top-t.top-(t.height-s.height)/2,this.syncScrolled()}this.clearHighlight(),e.setAttribute("data-highlight",""),this.highlighted=e,this.highlightTimer=setTimeout(()=>this.clearHighlight(),ft)}clearHighlight(){if(this.highlightTimer)clearTimeout(this.highlightTimer);this.highlightTimer=null,this.highlighted?.removeAttribute("data-highlight"),this.highlighted=null}inside(e){return e instanceof Element&&e.closest(rs)===this.root}navigationRow(e){let t=e.closest("[data-navigate]");if(!t||t.closest(rs)!==this.root||t.getAttribute("aria-disabled")==="true")return null;let s=e.closest(Lp);if(s&&s!==t&&t.contains(s))return null;return t}navigate(e){let t=e.getAttribute("data-navigate")||"";if(!Q(this.panes(),t))return;let s=this.current;this.open(t),this.callbacks.onNavigate?.({id:t,from:s,setting:e.getAttribute("data-setting")||""})}onClick(e){let t=e.target;if(!this.inside(t))return;let s=t.closest(kt);if(s&&this.list?.contains(s)){this.open(s.getAttribute("data-settings-item")||"");return}let a=t.closest(ls);if(a){this.chooseResult(Number(a.getAttribute("data-settings-result")));return}if(t.closest("[data-settings-back]")){this.back();return}if(t.closest("[data-settings-forward]")){this.forward();return}if(t.closest("[data-settings-search-clear]")){this.clearSearch(),this.input?.focus();return}let n=this.navigationRow(t);if(n)this.navigate(n)}onKeyDown(e){if(e.defaultPrevented)return;let t=(e.metaKey||e.ctrlKey)&&!e.altKey;if(t&&!e.shiftKey){let o=e.key.toLowerCase();if(o==="f"&&this.input){e.preventDefault(),this.focusSearch();return}if(o==="["){e.preventDefault(),this.back();return}if(o==="]"){e.preventDefault(),this.forward();return}}let s=e.target;if(!this.inside(s))return;if(e.key==="Escape"&&this.query!==""){e.preventDefault(),this.clearSearch(),this.visibleItems().find((o)=>o.getAttribute("tabindex")==="0")?.focus();return}if(s===this.input){this.onSearchKey(e);return}let a=s.closest(ls);if(a){this.onResultKey(e,a);return}let n=s.closest(kt);if(n&&this.list?.contains(n)){this.onItemKey(e,n);return}if((e.key==="Enter"||e.key===" ")&&!t&&!e.altKey){let o=s.closest("[data-navigate]");if(o&&o===s&&this.navigationRow(s))e.preventDefault(),this.navigate(o)}}resultButtons(){return this.results?Array.from(this.results.querySelectorAll(ls)):[]}onSearchKey(e){if(e.key==="ArrowDown"){let t=this.visibleItems()[0]??this.resultButtons()[0];if(t)e.preventDefault(),t.focus()}else if(e.key==="Enter"&&this.query.trim()!==""){e.preventDefault();let t=this.visibleItems()[0];if(t)this.open(t.getAttribute("data-settings-item")||"");else this.chooseResult(0)}}onResultKey(e,t){let s=this.resultButtons(),a=s.indexOf(t);if(e.key==="ArrowUp"&&a===0){let o=this.visibleItems(),i=o[o.length-1]??this.input;if(i)e.preventDefault(),i.focus();return}let n=os(e.key,a,s.length);if(n===-1)return;e.preventDefault(),s[n].focus()}onItemKey(e,t){if(e.metaKey||e.ctrlKey||e.altKey)return;let s=this.visibleItems(),a=s.indexOf(t);if(e.key==="ArrowDown"&&a===s.length-1){let o=this.resultButtons()[0];if(o){e.preventDefault(),o.focus();return}}let n=os(e.key,a,s.length);if(n===-1&&e.key.length===1&&(e.key!==" "||this.typed!==null)){let o=xn(this.typed,e.key,Date.now());if(e.key===" "&&o.buffer.trim()===""){this.typed=null;return}if(this.typed=o,n=bn(s.map((i)=>this.labelOf(i)),o.buffer,a),n===-1){e.preventDefault();return}}if(n===-1)return;e.preventDefault(),s[n].focus(),this.open(s[n].getAttribute("data-settings-item")||"")}}var zp="./Sidebar-7rya9gcp.stx";var jp="./SidebarFooter-s7skj92y.stx";var Vp="./SidebarHeader-x7jdhmyr.stx";var _p="./SidebarItem-64sjb2fe.stx";var Kp="./SidebarPinned-48kyk193.stx";var Gp="./SidebarSection-vx5bahsk.stx";var Jp="./SidebarSpace-3w1cfnzj.stx";var Xp="./SidebarSpaces-mdtrynr2.stx";var Qp="./SidebarSpaceSwitcher-1mycft2g.stx";var St={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},Ce={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/75 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/60 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/75 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},eu={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},tu={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},su={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},au={...Ce,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},nu={...Ce,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},ou={...Ce,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Cn={macos:Ce,tahoe:Ce,"macos-tahoe":Ce,"macos-latest":Ce,arc:su,workspace:eu,desktop:tu,solid:au,transparent:nu,vibrancy:ou};function R0(e){return Cn[e||"macos"]||Cn.macos}function L0(e){if(!e)return;return St[e]||e}var iu=St.gray;function xe(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function $n(e){return{light:{from:xe(e,35,"#ffffff"),to:xe(e,12.5,"#ffffff"),ink:xe(e,22,"#17171b"),accent:xe(e,88,"#2a2a30")},dark:{from:xe(e,27,"#101014"),to:xe(e,10,"#08080b"),ink:xe(e,12,"#f4f4f7"),accent:xe(e,74,"#ffffff")}}}function z0(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function ru(e){if(!e)return $n(iu);if(typeof e!=="string")return e;return $n(St[e]||e)}function lu(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Tn(e,t,s,a){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||a}}function cu(e){let t=ru(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Tn(e.action,e.id,"action","i-f7-plus"),clear:Tn(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:lu(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function H0(e){return(e||[]).map(cu)}function j0(e,t){if(!t)return 0;let s=e.findIndex((a)=>a.id===t);return s===-1?0:s}function F0(e){return e.map((t)=>t.tint)}var pu="./Skeleton-7et0tqrp.stx";var nk=101;function Oe(e,t){let s=typeof e==="number"?e:Number.parseFloat(String(e));return Number.isFinite(s)?s:t}function ok(e,t,s){let a=Oe(e,0),n=Oe(t,100),o=Oe(s,1);return{min:Math.min(a,n),max:Math.max(a,n),step:o>0?o:0}}function En(e){if(!Number.isFinite(e))return 0;let t=String(e).toLowerCase(),s=t.indexOf("e-");if(s!==-1)return Number.parseInt(t.slice(s+2),10)+Math.max(0,t.slice(0,s).split(".")[1]?.length??0);return t.split(".")[1]?.length??0}function $e(e,t){let{min:s,max:a,step:n}=t,o=Math.min(a,Math.max(s,Oe(e,s)));if(n<=0)return o;let i=Math.round((o-s)/n),r=Math.floor((a-s)/n+0.0000001);if(i>r)i=r;let c=Math.max(En(n),En(s));return Number((s+i*n).toFixed(Math.min(c,20)))}function ik(e,t){let s=t.max-t.min;if(s<=0)return 0;return(Math.min(t.max,Math.max(t.min,Oe(e,t.min)))-t.min)/s}function rk(e,t){let s=Math.min(1,Math.max(0,Number.isFinite(e)?e:0));return $e(t.min+s*(t.max-t.min),t)}function lk(e,t){let s=t.max-t.min;if(s<=0||e===!1||e==null||e===""||e==="false")return[];if(e===!0||e==="true"){if(t.step<=0)return[];let n=Math.floor(s/t.step+0.0000001)+1;if(n<2||n>101)return[];return Array.from({length:n},(o,i)=>Math.min(1,i*t.step/s))}let a=Math.floor(Oe(e,0));if(a<2||a>101)return[];return Array.from({length:a},(n,o)=>o/(a-1))}function ck(e,t,s,a=10){let n=s.step>0?s.step:(s.max-s.min)/100;if(e==="ArrowRight"||e==="ArrowUp")return $e(t+n,s);if(e==="ArrowLeft"||e==="ArrowDown")return $e(t-n,s);if(e==="PageUp")return $e(t+n*a,s);if(e==="PageDown")return $e(t-n*a,s);if(e==="Home")return $e(s.min,s);if(e==="End")return $e(s.max,s);return null}var hu="./Slider-cebse060.stx";var mu="./Spinner-vhnc3y03.stx";function gu(e){return Array.from({length:e},()=>1/e)}function Ct(e,t){if(t<=0)return[];if(!e||e.length!==t||e.some((a)=>typeof a!=="number"||!Number.isFinite(a)||a<=0))return gu(t);let s=e.reduce((a,n)=>a+n,0);return e.map((a)=>a/s)}function In(e){let t=e;if(typeof e==="string"){let a=e.trim();if(a==="")return null;if(a.charAt(0)==="[")try{t=JSON.parse(a)}catch{return null}else t=a.split(/[\s,]+/).map((n)=>Number.parseFloat(n))}if(!Array.isArray(t)||t.length===0)return null;let s=t.map((a)=>typeof a==="string"?Number.parseFloat(a):a);return s.every((a)=>typeof a==="number"&&Number.isFinite(a)&&a>0)?s:null}function cs(e,t){if(typeof e==="number")return Number.isFinite(e)&&e>=0?e:t;if(typeof e!=="string"||e.trim()==="")return t;let s=Number.parseFloat(e);return Number.isFinite(s)&&s>=0?s:t}function An(e,t,s){let a=e.length;if(a===0||t<=0)return[...e];let n=s.map((c)=>Math.max(0,c.min)),o=n.reduce((c,l)=>c+l,0);if(o>=t)return o===0?[...e]:n.map((c)=>c/o);let i=e.map((c)=>c*t);for(let c=0;c<=a;c++){let l=0;for(let u=0;u<a;u++){let f=Math.min(Math.max(i[u],n[u]),s[u].max);l+=i[u]-f,i[u]=f}if(Math.abs(l)<0.000000001)break;let d=i.map((u,f)=>l>0?s[f].max-u:u-n[f]),p=d.reduce((u,f)=>u+(Number.isFinite(f)?f:t),0);if(p<0.000000001)break;for(let u=0;u<a;u++){let f=(Number.isFinite(d[u])?d[u]:t)/p;i[u]+=l*f}}let r=i.reduce((c,l)=>c+l,0);return i.map((c)=>c/r)}function ds(e,t,s,a,n){let o=e.length;if(t<0||t>=o-1||a<=0||s===0)return[...e];let i=e.map((u)=>u*a),r=s>0,c=r?t:t+1,l=r?1:-1,d=Math.min(Math.abs(s),n[c].max-i[c]);if(d<=0)return[...e];let p=0;for(let u=r?t+1:t;u>=0&&u<o&&d>0.000000001;u+=l){let f=Math.min(d,Math.max(0,i[u]-Math.max(0,n[u].min)));i[u]-=f,p+=f,d-=f}return i[c]+=p,i.map((u)=>u/a)}function $t(e,t,s,a){let n=e.map((i)=>i*s),o=(i,r)=>{let c=0;for(let l=i;l<=r;l++)c+=Math.max(0,n[l]-Math.max(0,a[l].min));return c};return{back:Math.min(o(0,t),a[t+1].max-n[t+1]),forward:Math.min(o(t+1,e.length-1),a[t].max-n[t])}}function Pn(e,t,s,a){let n=$t(e,t,s,a),o=e[t]*100,i=s>0?100/s:0;return{now:Math.round(o),min:Math.round(o-n.back*i),max:Math.round(o+n.forward*i)}}function ps(e){return`stx:split-pane:${e}`}function Nn(e){return JSON.stringify(e.map((t)=>Math.round(t*1e4)/1e4))}var bu="./SplitPane-7sqfdwqa.stx";var Mn="data-split-separator";class vu{root;callbacks;direction;panes=[];separators=[];sizes=[];initial=[];limits=[];minSize;step;label;storageKey;observer=null;drag=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.direction=t.direction==="vertical"?"vertical":"horizontal",this.minSize=t.minSize??48,this.step=t.step??16,this.label=t.label||"Resize panes",this.storageKey=t.storageKey||"",this.collect(),this.initial=this.startingSizes(t.sizes),this.sizes=Ct(this.stored()??this.initial,this.panes.length),this.build(),this.apply(!1),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.apply(!1)),this.observer.observe(this.root);this.root.setAttribute("data-split-ready","")}getSizes(){return[...this.sizes]}setSizes(e){if(!e||e.length!==this.panes.length)return;this.sizes=Ct(e,this.panes.length),this.apply(!0),this.report(-1,"api",!0)}reset(e=-1){this.sizes=[...this.initial],this.apply(!0),this.report(e,"reset",!0)}setDirection(e){let t=e==="vertical"?"vertical":"horizontal";if(t===this.direction)return;this.direction=t,this.root.setAttribute("data-direction",t);for(let s of this.separators)s.setAttribute("aria-orientation",t==="horizontal"?"vertical":"horizontal");this.apply(!1)}destroy(){this.observer?.disconnect();for(let e of this.disposers)e();for(let e of this.separators)e.remove();for(let e of this.panes)e.style.removeProperty("flex"),e.removeAttribute("data-split-pane");this.root.removeAttribute("data-split-ready")}available(){let e=this.root.getBoundingClientRect(),t=this.direction==="horizontal"?e.width:e.height,s=0;for(let a of this.separators){let n=a.getBoundingClientRect();s+=this.direction==="horizontal"?n.width:n.height}return Math.max(0,t-s)}collect(){this.panes=Array.from(this.root.children).filter((e)=>e instanceof HTMLElement&&!e.hasAttribute(Mn)),this.limits=this.panes.map((e)=>({min:cs(e.getAttribute("data-min-size"),this.minSize),max:cs(e.getAttribute("data-max-size"),Number.POSITIVE_INFINITY)}))}startingSizes(e){let t=this.panes.map((a)=>Number.parseFloat(a.getAttribute("data-size")||"")),s=t.every((a)=>Number.isFinite(a)&&a>0)?t:null;return Ct(e&&e.length===this.panes.length?e:s,this.panes.length)}stored(){if(!this.storageKey)return null;try{let e=In(localStorage.getItem(ps(this.storageKey)));return e&&e.length===this.panes.length?e:null}catch{return null}}store(){if(!this.storageKey)return;try{localStorage.setItem(ps(this.storageKey),Nn(this.sizes))}catch{}}build(){let e=this.root.id||`split-${Math.random().toString(36).slice(2,8)}`;this.panes.forEach((t,s)=>{if(t.setAttribute("data-split-pane",""),!t.id)t.id=`${e}-pane-${s}`;if(s===this.panes.length-1)return;let a=document.createElement("div");a.setAttribute(Mn,""),a.setAttribute("role","separator"),a.setAttribute("tabindex","0"),a.setAttribute("aria-orientation",this.direction==="horizontal"?"vertical":"horizontal"),a.setAttribute("aria-controls",t.id),a.setAttribute("aria-label",this.panes.length>2?`${this.label} ${s+1} and ${s+2}`:this.label),a.className="stx-split-separator",t.after(a),this.separators.push(a);let n=(o,i)=>{a.addEventListener(o,i),this.disposers.push(()=>a.removeEventListener(o,i))};n("pointerdown",(o)=>this.onPointerDown(o,s)),n("pointermove",(o)=>this.onPointerMove(o)),n("pointerup",(o)=>this.onPointerEnd(o)),n("pointercancel",(o)=>this.onPointerEnd(o)),n("dblclick",()=>this.reset(s)),n("keydown",(o)=>this.onKeyDown(o,s))})}apply(e){let t=this.available();if(t>0)this.sizes=An(this.sizes,t,this.limits);if(this.panes.forEach((s,a)=>{s.style.flex=`${(this.sizes[a]*1000).toFixed(3)} 1 0px`}),this.separators.forEach((s,a)=>{let n=Pn(this.sizes,a,t,this.limits);s.setAttribute("aria-valuenow",String(n.now)),s.setAttribute("aria-valuemin",String(n.min)),s.setAttribute("aria-valuemax",String(n.max))}),e)this.store()}report(e,t,s){let a=this.available(),n={sizes:[...this.sizes],pixels:this.sizes.map((o)=>Math.round(o*a)),index:e,source:t};if(this.callbacks.onResize?.(n),s)this.callbacks.onResizeEnd?.(n)}position(e){return this.direction==="horizontal"?e.clientX:e.clientY}onPointerDown(e,t){if(e.button!==0)return;e.preventDefault();let s=this.separators[t];try{s.setPointerCapture(e.pointerId)}catch{}this.drag={index:t,start:this.position(e),sizes:[...this.sizes],pointer:e.pointerId},this.root.setAttribute("data-dragging",""),s.setAttribute("data-active","")}onPointerMove(e){let t=this.drag;if(!t||e.pointerId!==t.pointer)return;this.sizes=ds(t.sizes,t.index,this.position(e)-t.start,this.available(),this.limits),this.apply(!1),this.report(t.index,"pointer",!1)}onPointerEnd(e){let t=this.drag;if(!t||e.pointerId!==t.pointer)return;this.drag=null,this.root.removeAttribute("data-dragging"),this.separators[t.index].removeAttribute("data-active");try{this.separators[t.index].releasePointerCapture(e.pointerId)}catch{}this.store(),this.report(t.index,"pointer",!0)}onKeyDown(e,t){let s=this.direction==="horizontal",a=this.available(),n=this.step*(e.shiftKey?5:1),o=0;if(e.key===(s?"ArrowLeft":"ArrowUp"))o=-n;else if(e.key===(s?"ArrowRight":"ArrowDown"))o=n;else if(e.key==="Home")o=-$t(this.sizes,t,a,this.limits).back;else if(e.key==="End")o=$t(this.sizes,t,a,this.limits).forward;else if(e.key==="Enter"){e.preventDefault(),this.reset(t);return}else return;e.preventDefault(),this.sizes=ds(this.sizes,t,o,a,this.limits),this.apply(!0),this.report(t,"keyboard",!0)}}var yu="./StatCard-gff0yx6b.stx";var Su="./StatGroup-e0d5dmt7.stx";var $u="./Stepper-68gxcmej.stx";var Eu="./StepperStep-zf4pq1s0.stx";class Tt{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let a=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((o)=>o(n,a,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let a=0;a<t.length;a++)s+=String.fromCharCode(t.charCodeAt(a)^this.encryptionKey.charCodeAt(a%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,a=[],n="";for(let o=0;o<e.length;o++){let i=e.charAt(o),r=n+i;if(t[r]!==void 0)n=r;else a.push(n.length>1?t[n]:n.charCodeAt(0)),t[r]=s++,n=i}if(n!=="")a.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(a)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},a=256,n=String.fromCharCode(t[0]),o=n;for(let i=1;i<t.length;i++){let r=t[i],c;if(s[r]!==void 0)c=s[r];else if(r===a)c=n+n.charAt(0);else return e;o+=c,s[a++]=n+c.charAt(0),n=c}return o}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let a=this.getKey(e),n=this.get(e),o={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let i=JSON.stringify(o);if(s?.compress)i=this.compress(i);if(s?.encrypt)i=this.encrypt(i);this.storage.setItem(a,i),this.notifyWatchers(e,t,n)}catch(i){console.error("Storage set error:",i)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let a=JSON.parse(s);if(a.expire&&Date.now()-a.timestamp>a.expire)return this.remove(e),null;return a.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let a=this.watchers.get(e);if(a)a.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let a=this.storage.key(s);if(a){let n=this.storage.getItem(a)||"";e+=a.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,a])=>{this.set(s,a,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var zk={local:new Tt("local"),session:new Tt("session")};function Hk(e="local",t){return new Tt(e,t)}var Au="./Switch-7s3bhjg4.stx";var Nu="./Table-0a4y46vd.stx";var Ru="./TableBody-y49bqb1p.stx";var Ou="./TableCell-jhvsxw8b.stx";var zu="./TableHead-e9xvjx2j.stx";var ju="./TableHeader-krzcx4sv.stx";var Vu="./TableRow-dt8e11aj.stx";var _u="./Tab-j9f4t166.stx";var Ku="./TabList-r1pc87xs.stx";var Gu="./TabPanel-5htevsq6.stx";var Ju="./Tabs-psm5wj7c.stx";var Xu="./Teleport-vqs75x36.stx";var Qu="./Textarea-bb63fsz0.stx";var th="./AiTextarea-bg6xq5wc.stx";var ah="./Tooltip-68ka4jw7.stx";var oh="./Transition-7m0mk45s.stx";var rh="./Video-bqsx3wr8.stx";var ch="./VirtualList-fa7v5a3h.stx";var ph="./VirtualTable-kp7b3wyv.stx";var uh=0;function Rn(e="a11y"){return`${e}-${++uh}-${Date.now()}`}function L1(e,t,s={}){let{visible:a=!1,id:n=Rn("label")}=s,o=document.createElement(a?"label":"span");if(o.id=n,o.textContent=e,!a)Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return n}function O1(e,t){let s=Rn("desc"),a=document.createElement("span");if(a.id=s,a.textContent=e,Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return s}function D1(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function us(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function z1(e,t={}){let{initialFocus:s,returnFocus:a,escapeDeactivates:n=!0,clickOutsideDeactivates:o=!0,allowOutsideClick:i=!1,onActivate:r,onDeactivate:c}=t,l=!1,d=!1,p=null,u=(S)=>{if(d)return;if(n&&S.key==="Escape"){S.preventDefault(),m();return}if(S.key==="Tab"){let g=us(e);if(g.length===0){S.preventDefault();return}let T=g[0],M=g[g.length-1];if(S.shiftKey){if(document.activeElement===T)S.preventDefault(),M.focus()}else if(document.activeElement===M)S.preventDefault(),T.focus()}},f=(S)=>{if(d)return;if(!e.contains(S.target)){if(typeof i==="function"){if(!i(S)&&o)m()}else if(!i&&o)m()}};function h(){if(l)return;l=!0,p=document.activeElement;let S=s||us(e)[0];if(S&&typeof S.focus==="function")S.focus();document.addEventListener("keydown",u),document.addEventListener("click",f),r?.()}function m(){if(!l)return;l=!1;let S=a||p;if(S&&typeof S.focus==="function")S.focus();document.removeEventListener("keydown",u),document.removeEventListener("click",f),c?.()}function b(){d=!0}function w(){d=!1}return{activate:h,deactivate:m,pause:b,unpause:w}}function H1(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:a=0,orientation:n="both",loop:o=!0,onFocusChange:i}=t,r=a,c=()=>Array.from(e.querySelectorAll(s)),l=(p)=>{let u=c();if(p<0||p>=u.length)return;u.forEach((f,h)=>{if(h===p){if(f.setAttribute("tabindex","0"),typeof f.focus==="function")f.focus()}else f.setAttribute("tabindex","-1")}),r=p,i?.(p,u[p])},d=(p)=>{let f=c().length-1,h=!1,m=r;switch(p.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(m=r+1,m>f)m=o?0:f;h=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(m=r-1,m<0)m=o?f:0;h=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(m=r+1,m>f)m=o?0:f;h=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(m=r-1,m<0)m=o?f:0;h=!0}break;case"Home":m=0,h=!0;break;case"End":m=f,h=!0;break}if(h)p.preventDefault(),l(m)};return l(a),e.addEventListener("keydown",d),()=>{e.removeEventListener("keydown",d)}}var j1={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function F1(e){return document.activeElement===e}function V1(e,t){let s=t||document.activeElement,a=us(document.body),n=a.indexOf(s);if(n===-1)return;let o=e==="next"?n+1:n-1,i=a[o];if(i)i.focus()}function B1(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var _1={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function q1(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function K1(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function W1(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function G1(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function U1(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function J1(e){let t=[],s=(a)=>{let n=e.getAttribute(a);if(n){let o=n.split(" ");for(let i of o)if(!document.getElementById(i))t.push(`${a} references non-existent ID: ${i}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var hh=(e,t,s,a)=>s*e/a+t,fh=(e,t,s,a)=>(e/=a,s*e*e+t),mh=(e,t,s,a)=>(e/=a,-s*e*(e-2)+t),gh=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},xh=(e,t,s,a)=>(e/=a,s*e*e*e+t),bh=(e,t,s,a)=>(e/=a,e--,s*(e*e*e+1)+t),vh=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},wh=(e,t,s,a)=>(e/=a,s*e*e*e*e+t),yh=(e,t,s,a)=>(e/=a,e--,-s*(e*e*e*e-1)+t),kh=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},Sh=(e,t,s,a)=>(e/=a,s*e*e*e*e*e+t),Ch=(e,t,s,a)=>(e/=a,e--,s*(e*e*e*e*e+1)+t),$h=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Th=(e,t,s,a)=>-s*Math.cos(e/a*(Math.PI/2))+s+t,Eh=(e,t,s,a)=>s*Math.sin(e/a*(Math.PI/2))+t,Ih=(e,t,s,a)=>-s/2*(Math.cos(Math.PI*e/a)-1)+t,Ah=(e,t,s,a)=>e===0?t:s*2**(10*(e/a-1))+t,Ph=(e,t,s,a)=>e===a?t+s:s*(-(2**(-10*e/a))+1)+t,Nh=(e,t,s,a)=>{if(e===0)return t;if(e===a)return t+s;if(e/=a/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Mh=(e,t,s,a)=>(e/=a,-s*(Math.sqrt(1-e*e)-1)+t),Rh=(e,t,s,a)=>(e/=a,e--,s*Math.sqrt(1-e*e)+t),Lh=(e,t,s,a)=>{if(e/=a/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Oh=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!o)o=a*0.3;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);return e-=1,-(i*2**(10*e)*Math.sin((e*a-n)*(2*Math.PI)/o))+t},Dh=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!o)o=a*0.3;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);return i*2**(-10*e)*Math.sin((e*a-n)*(2*Math.PI)/o)+s+t},zh=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a/2,e===2)return t+s;if(!o)o=a*0.44999999999999996;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);if(e<1)return e-=1,-0.5*(i*2**(10*e)*Math.sin((e*a-n)*(2*Math.PI)/o))+t;return e-=1,i*2**(-10*e)*Math.sin((e*a-n)*(2*Math.PI)/o)*0.5+s+t},Hh=(e,t,s,a)=>(e/=a,s*e*e*(2.70158*e-1.70158)+t),jh=(e,t,s,a)=>(e/=a,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),Fh=(e,t,s,a)=>{let n=1.70158;if(e/=a/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},hs=(e,t,s,a)=>{if(e/=a,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},Ln=(e,t,s,a)=>s-hs(a-e,0,s,a)+t,Vh=(e,t,s,a)=>{if(e<a/2)return Ln(e*2,0,s,a)*0.5+t;return hs(e*2-a,0,s,a)*0.5+s*0.5+t},X1={linear:hh,easeInQuad:fh,easeOutQuad:mh,easeInOutQuad:gh,easeInCubic:xh,easeOutCubic:bh,easeInOutCubic:vh,easeInQuart:wh,easeOutQuart:yh,easeInOutQuart:kh,easeInQuint:Sh,easeOutQuint:Ch,easeInOutQuint:$h,easeInSine:Th,easeOutSine:Eh,easeInOutSine:Ih,easeInExpo:Ah,easeOutExpo:Ph,easeInOutExpo:Nh,easeInCirc:Mh,easeOutCirc:Rh,easeInOutCirc:Lh,easeInElastic:Oh,easeOutElastic:Dh,easeInOutElastic:zh,easeInBack:Hh,easeOutBack:jh,easeInOutBack:Fh,easeInBounce:Ln,easeOutBounce:hs,easeInOutBounce:Vh};function Bh(e,t={}){let{duration:s="1s",timing:a="ease",delay:n="0s",iteration:o="1",direction:i="normal",fill:r="both",playState:c="running"}=t;return`${e} ${s} ${a} ${n} ${o} ${i} ${r} ${c}`}function On(e,t,s={}){e.style.animation=Bh(t,s)}function Q1(e){e.style.animation=""}function _h(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function eS(e,t,s={}){let{stagger:a=100,...n}=s;e.forEach((o,i)=>{let r=`${i*a}ms`;On(o,t,{...n,delay:r})})}async function tS(e,t){for(let s of t)On(e,s.name,s.options),await _h(e)}var sS={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function aS(e,t,s=1000){return new Promise((a)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),a()},s)})}function nS(e,t){let s=`
14
17
  @keyframes ${e} {
15
18
  ${Object.entries(t).map(([n,o])=>{let i=Object.entries(o).map(([r,c])=>`${r}: ${c};`).join(" ");return`${n} { ${i} }`}).join(`
16
19
  `)}
17
20
  }
18
- `,a=document.createElement("style");a.textContent=s,document.head.appendChild(a)}function Kp(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:a=1000,easing:n="ease",delay:o=0,iterations:i=1,direction:r="normal",fill:c="both"}=s;return e.animate([...t],{duration:a,easing:n,delay:o,iterations:i,direction:r,fill:c})}var qp={fadeIn:[{offset:0,opacity:0},{offset:1,opacity:1}],fadeOut:[{offset:0,opacity:1},{offset:1,opacity:0}],slideInUp:[{offset:0,transform:"translateY(100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInDown:[{offset:0,transform:"translateY(-100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInLeft:[{offset:0,transform:"translateX(-100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideInRight:[{offset:0,transform:"translateX(100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideOutUp:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(-100%)",opacity:0}],slideOutDown:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(100%)",opacity:0}],slideOutLeft:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(-100%)",opacity:0}],slideOutRight:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(100%)",opacity:0}],zoomIn:[{offset:0,transform:"scale(0)",opacity:0},{offset:0.5,opacity:1},{offset:1,transform:"scale(1)"}],zoomOut:[{offset:0,transform:"scale(1)",opacity:1},{offset:0.5,opacity:1},{offset:1,transform:"scale(0)",opacity:0}],rotate:[{offset:0,transform:"rotate(0deg)"},{offset:1,transform:"rotate(360deg)"}],bounce:[{offset:0,transform:"translateY(0)"},{offset:0.2,transform:"translateY(0)"},{offset:0.4,transform:"translateY(-30px)"},{offset:0.43,transform:"translateY(-30px)"},{offset:0.53,transform:"translateY(0)"},{offset:0.7,transform:"translateY(-15px)"},{offset:0.8,transform:"translateY(0)"},{offset:0.9,transform:"translateY(-4px)"},{offset:1,transform:"translateY(0)"}],pulse:[{offset:0,transform:"scale(1)"},{offset:0.5,transform:"scale(1.05)"},{offset:1,transform:"scale(1)"}],shake:[{offset:0,transform:"translateX(0)"},{offset:0.1,transform:"translateX(-10px)"},{offset:0.2,transform:"translateX(10px)"},{offset:0.3,transform:"translateX(-10px)"},{offset:0.4,transform:"translateX(10px)"},{offset:0.5,transform:"translateX(-10px)"},{offset:0.6,transform:"translateX(10px)"},{offset:0.7,transform:"translateX(-10px)"},{offset:0.8,transform:"translateX(10px)"},{offset:0.9,transform:"translateX(-10px)"},{offset:1,transform:"translateX(0)"}],swing:[{offset:0,transform:"rotate(0deg)"},{offset:0.2,transform:"rotate(15deg)"},{offset:0.4,transform:"rotate(-10deg)"},{offset:0.6,transform:"rotate(5deg)"},{offset:0.8,transform:"rotate(-5deg)"},{offset:1,transform:"rotate(0deg)"}],flip:[{offset:0,transform:"perspective(400px) rotateY(0)",animationTimingFunction:"ease-out"},{offset:0.4,transform:"perspective(400px) translateZ(150px) rotateY(170deg)",animationTimingFunction:"ease-out"},{offset:0.5,transform:"perspective(400px) translateZ(150px) rotateY(190deg)",animationTimingFunction:"ease-in"},{offset:0.8,transform:"perspective(400px) rotateY(360deg)",animationTimingFunction:"ease-in"},{offset:1,transform:"perspective(400px)",animationTimingFunction:"ease-in"}],rubberBand:[{offset:0,transform:"scale(1)"},{offset:0.3,transform:"scaleX(1.25) scaleY(0.75)"},{offset:0.4,transform:"scaleX(0.75) scaleY(1.25)"},{offset:0.5,transform:"scaleX(1.15) scaleY(0.85)"},{offset:0.65,transform:"scaleX(0.95) scaleY(1.05)"},{offset:0.75,transform:"scaleX(1.05) scaleY(0.95)"},{offset:1,transform:"scale(1)"}],heartbeat:[{offset:0,transform:"scale(1)"},{offset:0.14,transform:"scale(1.3)"},{offset:0.28,transform:"scale(1)"},{offset:0.42,transform:"scale(1.3)"},{offset:0.7,transform:"scale(1)"}]};function y0(e,t,s={}){return Kp(e,qp[t],s)}function Wp(e){if(!e)return null;if(typeof e!=="string")return e;if(typeof document>"u")return null;let t=/^[\w-]+$/.test(e)?document.getElementById(e):null;if(t)return t;try{return document.querySelector(e)}catch{return null}}var Fa="__stxComponentApis";function Wt(){let e=globalThis;return e[Fa]??(e[Fa]=Object.create(null))}function S0(e,t){if(!e)return()=>{};let s=Wt();return s[e]=t,()=>{if(s[e]===t)delete s[e]}}function C0(e){let t=Wp(e);if(!t||typeof t.closest!=="function"){let a=typeof e==="string"?e.replace(/^#/,""):"";return a&&a in Wt()?Wt()[a]:null}if(t.__stx_exposed)return t.__stx_exposed;let s=t.closest("[data-stx-scope]");if(s?.__stx_exposed)return s.__stx_exposed;for(let a of Array.from(t.querySelectorAll("[data-stx-scope]")))if(a.__stx_exposed)return a.__stx_exposed;return null}var Va=["keyword","string","comment","numeric","constant","function","operator","punctuation","type","variable","tag","attribute"],Gt={background:"#ffffff",foreground:"#24292f",keyword:"#cf222e",string:"#0a3069",comment:"#6e7781",numeric:"#0550ae",constant:"#0550ae",function:"#8250df",operator:"#cf222e",punctuation:"#24292f",type:"#953800",variable:"#953800",tag:"#116329",attribute:"#0550ae"},Ut={background:"#0d1117",foreground:"#c9d1d9",keyword:"#ff7b72",string:"#a5d6ff",comment:"#8b949e",numeric:"#79c0ff",constant:"#79c0ff",function:"#d2a8ff",operator:"#ff7b72",punctuation:"#c9d1d9",type:"#ffa657",variable:"#ffa657",tag:"#7ee787",attribute:"#79c0ff"},Gp=["background","foreground",...Va];function dt(e,t=" "){return Gp.map((s)=>`${t}--stx-syntax-${s}: ${e[s]};`).join(`
19
- `)}function Jt(){return Va.map((e)=>`.tok-${e} { color: var(--stx-syntax-${e}); }`).concat(".tok-comment { font-style: italic; }").join(`
20
- `)}function Up(){let e=dt(Gt),t=dt(Ut);return[`:where(:root) {
21
+ `,a=document.createElement("style");a.textContent=s,document.head.appendChild(a)}function qh(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:a=1000,easing:n="ease",delay:o=0,iterations:i=1,direction:r="normal",fill:c="both"}=s;return e.animate([...t],{duration:a,easing:n,delay:o,iterations:i,direction:r,fill:c})}var Kh={fadeIn:[{offset:0,opacity:0},{offset:1,opacity:1}],fadeOut:[{offset:0,opacity:1},{offset:1,opacity:0}],slideInUp:[{offset:0,transform:"translateY(100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInDown:[{offset:0,transform:"translateY(-100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInLeft:[{offset:0,transform:"translateX(-100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideInRight:[{offset:0,transform:"translateX(100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideOutUp:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(-100%)",opacity:0}],slideOutDown:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(100%)",opacity:0}],slideOutLeft:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(-100%)",opacity:0}],slideOutRight:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(100%)",opacity:0}],zoomIn:[{offset:0,transform:"scale(0)",opacity:0},{offset:0.5,opacity:1},{offset:1,transform:"scale(1)"}],zoomOut:[{offset:0,transform:"scale(1)",opacity:1},{offset:0.5,opacity:1},{offset:1,transform:"scale(0)",opacity:0}],rotate:[{offset:0,transform:"rotate(0deg)"},{offset:1,transform:"rotate(360deg)"}],bounce:[{offset:0,transform:"translateY(0)"},{offset:0.2,transform:"translateY(0)"},{offset:0.4,transform:"translateY(-30px)"},{offset:0.43,transform:"translateY(-30px)"},{offset:0.53,transform:"translateY(0)"},{offset:0.7,transform:"translateY(-15px)"},{offset:0.8,transform:"translateY(0)"},{offset:0.9,transform:"translateY(-4px)"},{offset:1,transform:"translateY(0)"}],pulse:[{offset:0,transform:"scale(1)"},{offset:0.5,transform:"scale(1.05)"},{offset:1,transform:"scale(1)"}],shake:[{offset:0,transform:"translateX(0)"},{offset:0.1,transform:"translateX(-10px)"},{offset:0.2,transform:"translateX(10px)"},{offset:0.3,transform:"translateX(-10px)"},{offset:0.4,transform:"translateX(10px)"},{offset:0.5,transform:"translateX(-10px)"},{offset:0.6,transform:"translateX(10px)"},{offset:0.7,transform:"translateX(-10px)"},{offset:0.8,transform:"translateX(10px)"},{offset:0.9,transform:"translateX(-10px)"},{offset:1,transform:"translateX(0)"}],swing:[{offset:0,transform:"rotate(0deg)"},{offset:0.2,transform:"rotate(15deg)"},{offset:0.4,transform:"rotate(-10deg)"},{offset:0.6,transform:"rotate(5deg)"},{offset:0.8,transform:"rotate(-5deg)"},{offset:1,transform:"rotate(0deg)"}],flip:[{offset:0,transform:"perspective(400px) rotateY(0)",animationTimingFunction:"ease-out"},{offset:0.4,transform:"perspective(400px) translateZ(150px) rotateY(170deg)",animationTimingFunction:"ease-out"},{offset:0.5,transform:"perspective(400px) translateZ(150px) rotateY(190deg)",animationTimingFunction:"ease-in"},{offset:0.8,transform:"perspective(400px) rotateY(360deg)",animationTimingFunction:"ease-in"},{offset:1,transform:"perspective(400px)",animationTimingFunction:"ease-in"}],rubberBand:[{offset:0,transform:"scale(1)"},{offset:0.3,transform:"scaleX(1.25) scaleY(0.75)"},{offset:0.4,transform:"scaleX(0.75) scaleY(1.25)"},{offset:0.5,transform:"scaleX(1.15) scaleY(0.85)"},{offset:0.65,transform:"scaleX(0.95) scaleY(1.05)"},{offset:0.75,transform:"scaleX(1.05) scaleY(0.95)"},{offset:1,transform:"scale(1)"}],heartbeat:[{offset:0,transform:"scale(1)"},{offset:0.14,transform:"scale(1.3)"},{offset:0.28,transform:"scale(1)"},{offset:0.42,transform:"scale(1.3)"},{offset:0.7,transform:"scale(1)"}]};function iS(e,t,s={}){return qh(e,Kh[t],s)}function Wh(e){if(!e)return null;if(typeof e!=="string")return e;if(typeof document>"u")return null;let t=/^[\w-]+$/.test(e)?document.getElementById(e):null;if(t)return t;try{return document.querySelector(e)}catch{return null}}var Dn="__stxComponentApis";function fs(){let e=globalThis;return e[Dn]??(e[Dn]=Object.create(null))}function lS(e,t){if(!e)return()=>{};let s=fs();return s[e]=t,()=>{if(s[e]===t)delete s[e]}}function cS(e){let t=Wh(e);if(!t||typeof t.closest!=="function"){let a=typeof e==="string"?e.replace(/^#/,""):"";return a&&a in fs()?fs()[a]:null}if(t.__stx_exposed)return t.__stx_exposed;let s=t.closest("[data-stx-scope]");if(s?.__stx_exposed)return s.__stx_exposed;for(let a of Array.from(t.querySelectorAll("[data-stx-scope]")))if(a.__stx_exposed)return a.__stx_exposed;return null}var zn=["keyword","string","comment","numeric","constant","function","operator","punctuation","type","variable","tag","attribute"],ms={background:"#ffffff",foreground:"#24292f",keyword:"#cf222e",string:"#0a3069",comment:"#6e7781",numeric:"#0550ae",constant:"#0550ae",function:"#8250df",operator:"#cf222e",punctuation:"#24292f",type:"#953800",variable:"#953800",tag:"#116329",attribute:"#0550ae"},gs={background:"#0d1117",foreground:"#c9d1d9",keyword:"#ff7b72",string:"#a5d6ff",comment:"#8b949e",numeric:"#79c0ff",constant:"#79c0ff",function:"#d2a8ff",operator:"#ff7b72",punctuation:"#c9d1d9",type:"#ffa657",variable:"#ffa657",tag:"#7ee787",attribute:"#79c0ff"},Gh=["background","foreground",...zn];function Et(e,t=" "){return Gh.map((s)=>`${t}--stx-syntax-${s}: ${e[s]};`).join(`
22
+ `)}function xs(){return zn.map((e)=>`.tok-${e} { color: var(--stx-syntax-${e}); }`).concat(".tok-comment { font-style: italic; }").join(`
23
+ `)}function Uh(){let e=Et(ms),t=Et(gs);return[`:where(:root) {
21
24
  ${e}
22
25
  }`,`@media (prefers-color-scheme: dark) {
23
26
  :where(:root:not(.light)) {
@@ -29,27 +32,27 @@ ${t}
29
32
  ${e}
30
33
  }`,`:where([data-syntax-theme="dark"]) {
31
34
  ${t}
32
- }`,Jt()].join(`
33
- `)}function Yt(){return[".syntax {"," margin: 0;"," padding: 1rem;"," overflow-x: auto;"," border-radius: 0.375rem;"," background-color: var(--stx-syntax-background);"," color: var(--stx-syntax-foreground);",' font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;'," font-size: 0.875rem;"," line-height: 1.5;"," tab-size: 2;","}",".syntax code { display: block; font-family: inherit; }",".syntax[data-line-numbers] { counter-reset: stx-syntax-line; }",".syntax[data-line-numbers] .line::before {"," counter-increment: stx-syntax-line;"," content: counter(stx-syntax-line);"," display: inline-block;"," width: 2.5em;"," margin-right: 1em;"," text-align: right;"," opacity: 0.5;"," user-select: none;","}"].join(`
34
- `)}function ja(){return`${Up()}
35
- ${Yt()}`}var Ba=null;function Jp(){return Ba??=import("ts-syntax-highlighter/browser").catch(()=>null),Ba}var Xt=null,_a="github-light",Ka="github-dark";function Zt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Yp(e){return`<pre class="syntax"><code>${Zt(e)}</code></pre>`}async function I0(){if(!Xt){let{createHighlighter:e}=await import("ts-syntax-highlighter");Xt=await e({theme:"github-light"})}return Xt}async function Xp(e,t={}){let s=await Jp();if(!s)return null;let a;try{let i=await s.resolveGrammar(t.language??"typescript");if(!i)return null;a=new s.Tokenizer(i).tokenizeLinesFrom(e.replace(/\r\n?/g,`
35
+ }`,xs()].join(`
36
+ `)}function bs(){return[".syntax {"," margin: 0;"," padding: 1rem;"," overflow-x: auto;"," border-radius: 0.375rem;"," background-color: var(--stx-syntax-background);"," color: var(--stx-syntax-foreground);",' font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;'," font-size: 0.875rem;"," line-height: 1.5;"," tab-size: 2;","}",".syntax code { display: block; font-family: inherit; }",".syntax[data-line-numbers] { counter-reset: stx-syntax-line; }",".syntax[data-line-numbers] .line::before {"," counter-increment: stx-syntax-line;"," content: counter(stx-syntax-line);"," display: inline-block;"," width: 2.5em;"," margin-right: 1em;"," text-align: right;"," opacity: 0.5;"," user-select: none;","}"].join(`
37
+ `)}function Hn(){return`${Uh()}
38
+ ${bs()}`}var jn=null;function Jh(){return jn??=import("ts-syntax-highlighter/browser").catch(()=>null),jn}var vs=null,Fn="github-light",Vn="github-dark";function ws(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Yh(e){return`<pre class="syntax"><code>${ws(e)}</code></pre>`}async function hS(){if(!vs){let{createHighlighter:e}=await import("ts-syntax-highlighter");vs=await e({theme:"github-light"})}return vs}async function Xh(e,t={}){let s=await Jh();if(!s)return null;let a;try{let i=await s.resolveGrammar(t.language??"typescript");if(!i)return null;a=new s.Tokenizer(i).tokenizeLinesFrom(e.replace(/\r\n?/g,`
36
39
  `).split(`
37
- `)).lines}catch{return null}let n=a.map((i)=>{let r="",c="",l="",d=()=>{if(c!=="")r+=l===""?Zt(c):`<span class="tok-${l}">${Zt(c)}</span>`;c=""};for(let u of i.tokens){let p=s.tokenClass(u.type);if(p!==l)d(),l=p;c+=u.content}return d(),`<span class="line">${r}</span>`}).join(`
38
- `);return`<pre ${['class="syntax"',t.theme==="light"||t.theme==="dark"?`data-syntax-theme="${t.theme}"`:"",t.lineNumbers?"data-line-numbers":""].filter(Boolean).join(" ")}><code>${n}</code></pre>`}function Zp(e){if(e==="auto")return ja();return[`[data-syntax-theme="${e}"] {
39
- ${dt(e==="dark"?Ut:Gt)}
40
- }`,Jt(),Yt()].join(`
41
- `)}async function A0(e,t={}){let{theme:s="auto",language:a="typescript",lineNumbers:n=!1}=t,o=await Xp(e,{language:a,theme:s,lineNumbers:n});if(o===null)return{html:Yp(e),css:"",language:a,theme:s==="dark"?Ka:_a};return{html:o,css:Zp(s),language:a,theme:s==="auto"?"auto":s==="dark"?Ka:_a}}function P0(e){if(e.includes("<!DOCTYPE")||e.includes("<html"))return"html";if(e.includes("<?php"))return"php";if(e.includes("import")&&e.includes("from"))return"typescript";if(e.includes("function")||e.includes("const"))return"javascript";if(e.includes("{")&&e.includes("}"))return"json";if(e.includes("$")&&e.includes("|"))return"bash";if(e.includes("#")&&e.includes("##"))return"markdown";return"typescript"}function M0(e,t){return`<div class="${t?`rounded-md overflow-auto text-sm leading-relaxed font-mono ${t}`:"rounded-md overflow-auto text-sm leading-relaxed font-mono"}">${e}</div>`}var ie=null,Qp=(e)=>e===1?0:1;function pt(e,t){return t.split(".").reduce((s,a)=>s?.[a],e)}function Qt(e,t={}){return e.replace(/\{(\w+)\}/g,(s,a)=>t[a]!==void 0?String(t[a]):s)}function N0(e){let{locale:t,fallbackLocale:s="en",messages:a,pluralRules:n={},dateTimeFormats:o={},numberFormats:i={},missing:r,warnMissing:c=!0}=e;function l(y,v={}){let b=pt(a[t],y);if(b===void 0&&s)b=pt(a[s],y);if(b===void 0){if(r){let C=r(t,y);if(C)return Qt(C,v)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${y}" in locale "${t}"`);return y}if(typeof b==="string")return Qt(b,v);return String(b)}function d(y,v,b={}){let C=l(y,{...b,count:v});if(C.includes("|")){let P=C.split("|").map((j)=>j.trim()),F=(n[t]||Qp)(v,t),V=P[F]||P[P.length-1];return Qt(V,{...b,count:v})}return C}function u(y,v="default"){let b=typeof y==="number"?new Date(y):y,C=o[v]||o.default||{};return new Intl.DateTimeFormat(t,C).format(b)}function p(y,v="default"){let b=i[v]||i.default||{};return new Intl.NumberFormat(t,b).format(y)}function h(y){if(pt(a[t],y)!==void 0)return!0;if(s)return pt(a[s],y)!==void 0;return!1}function g(y){if(!a[y]){console.warn(`[i18n] Locale "${y}" not found. Available locales: ${Object.keys(a).join(", ")}`);return}t=y}function m(y,v){if(!a[y])a[y]={};a[y]={...a[y],...v}}function w(y){delete a[y]}return{get locale(){return t},get availableLocales(){return Object.keys(a)},setLocale:g,t:l,tc:d,d:u,n:p,te:h,addMessages:m,removeLocale:w}}function L0(e){ie=e}function D0(){return ie}function O0(e,t){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return ie.t(e,t)}function z0(e,t,s){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return ie.tc(e,t,s)}function H0(e,t){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return ie.d(e,t)}function F0(e,t){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return ie.n(e,t)}var V0={en:(e)=>e===1?0:1,de:(e)=>e===1?0:1,nl:(e)=>e===1?0:1,sv:(e)=>e===1?0:1,fr:(e)=>e===0||e===1?0:1,pt_BR:(e)=>e===0||e===1?0:1,ru:(e)=>{if(e%10===1&&e%100!==11)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},pl:(e)=>{if(e===1)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},cs:(e)=>{if(e===1)return 0;if(e>=2&&e<=4)return 1;return 2},ar:(e)=>{if(e===0)return 0;if(e===1)return 1;if(e===2)return 2;if(e%100>=3&&e%100<=10)return 3;if(e%100>=11)return 4;return 5},ja:()=>0,ko:()=>0,zh:()=>0,th:()=>0,vi:()=>0},j0={short:{year:"numeric",month:"numeric",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}},B0={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function _0(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function K0(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var q0={en:{common:{loading:"Loading...",error:"Error",retry:"Retry",cancel:"Cancel",confirm:"Confirm",close:"Close",save:"Save",delete:"Delete",edit:"Edit",search:"Search",clear:"Clear",submit:"Submit",reset:"Reset"},form:{required:"This field is required",invalid:"Invalid value",tooShort:"Value is too short (minimum {min} characters)",tooLong:"Value is too long (maximum {max} characters)",invalidEmail:"Invalid email address",invalidUrl:"Invalid URL"},pagination:{previous:"Previous",next:"Next",page:"Page {page}",of:"of {total}"}},es:{common:{loading:"Cargando...",error:"Error",retry:"Reintentar",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",save:"Guardar",delete:"Eliminar",edit:"Editar",search:"Buscar",clear:"Limpiar",submit:"Enviar",reset:"Restablecer"},form:{required:"Este campo es obligatorio",invalid:"Valor inv\xE1lido",tooShort:"El valor es demasiado corto (m\xEDnimo {min} caracteres)",tooLong:"El valor es demasiado largo (m\xE1ximo {max} caracteres)",invalidEmail:"Direcci\xF3n de correo electr\xF3nico inv\xE1lida",invalidUrl:"URL inv\xE1lida"},pagination:{previous:"Anterior",next:"Siguiente",page:"P\xE1gina {page}",of:"de {total}"}},fr:{common:{loading:"Chargement...",error:"Erreur",retry:"R\xE9essayer",cancel:"Annuler",confirm:"Confirmer",close:"Fermer",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",search:"Rechercher",clear:"Effacer",submit:"Soumettre",reset:"R\xE9initialiser"},form:{required:"Ce champ est obligatoire",invalid:"Valeur invalide",tooShort:"La valeur est trop courte (minimum {min} caract\xE8res)",tooLong:"La valeur est trop longue (maximum {max} caract\xE8res)",invalidEmail:"Adresse e-mail invalide",invalidUrl:"URL invalide"},pagination:{previous:"Pr\xE9c\xE9dent",next:"Suivant",page:"Page {page}",of:"sur {total}"}}};function G0(e={}){let{max:t=10,ttl:s=0,include:a,exclude:n,hooks:o,debug:i=!1}=e,r=new Map,c=0,l=0;function d(...x){if(i)console.log("[KeepAlive]",...x)}function u(x){if(n){if(n instanceof RegExp&&n.test(x))return!1;if(Array.isArray(n)&&n.includes(x))return!1}if(a){if(a instanceof RegExp&&!a.test(x))return!1;if(Array.isArray(a)&&!a.includes(x))return!1}return!0}function p(x){if(!s||!x.expiresAt)return!1;return Date.now()>x.expiresAt}function h(x){let S=r.get(x);if(S)S.lastAccessedAt=Date.now(),S.accessCount++,S.instance.lastAccessedAt=S.lastAccessedAt,r.delete(x),r.set(x,S),d(`Touched: ${x} (access count: ${S.accessCount})`)}function g(){if(r.size===0)return!1;let x=r.keys().next().value;if(!x)return!1;let S=r.get(x);if(S){d(`Evicting LRU: ${x}`);let L=S.instance.hooks;if(L?.onDeactivate)L.onDeactivate(S.instance);if(o?.onDeactivate)o.onDeactivate(S.instance);return r.delete(x),!0}return!1}function m(x,S,L){if(!u(S.type))return d(`Type not cacheable: ${S.type}`),S;if(r.size>=t)g();let R=Date.now(),N={instance:{...S,hooks:L||S.hooks,createdAt:S.createdAt||R,lastAccessedAt:R},accessCount:0,createdAt:R,lastAccessedAt:R,expiresAt:s?R+s:void 0};if(r.set(x,N),d(`Cached: ${x} (size: ${r.size}/${t})`),L?.onMount)L.onMount(N.instance);if(o?.onMount)o.onMount(N.instance);return N.instance}function w(x){let S=r.get(x);if(!S)return l++,d(`Miss: ${x}`),null;if(p(S))return d(`Expired: ${x}`),r.delete(x),l++,null;return c++,h(x),d(`Hit: ${x}`),S.instance}function y(x){let S=r.get(x);if(!S)return!1;if(p(S))return r.delete(x),!1;return!0}function v(x){let S=r.get(x);if(!S)return!1;d(`Removing: ${x}`);let L=S.instance.hooks;if(L?.onUnmount)L.onUnmount(S.instance);if(o?.onUnmount)o.onUnmount(S.instance);return r.delete(x)}function b(){d("Clearing cache"),r.forEach((x)=>{let S=x.instance.hooks;if(S?.onUnmount)S.onUnmount(x.instance);if(o?.onUnmount)o.onUnmount(x.instance)}),r.clear(),c=0,l=0}function C(){let x=0,S=Date.now();for(let[L,R]of r.entries())if(p(R))d(`Pruning expired: ${L}`),v(L),x++;while(r.size>t)if(g())x++;else break;if(x>0)d(`Pruned ${x} entries`);return x}function P(x){let S=w(x);if(!S)return null;d(`Activating: ${x}`);let L=S.hooks;if(L?.onActivate)L.onActivate(S);if(o?.onActivate)o.onActivate(S);if(S.state&&L?.onRestore)L.onRestore(S,S.state);return S}function T(x){let S=r.get(x);if(!S)return!1;d(`Deactivating: ${x}`);let L=S.instance,R=L.hooks;if(R?.onSave)L.state=R.onSave(L);if(R?.onDeactivate)R.onDeactivate(L);if(o?.onDeactivate)o.onDeactivate(L);return!0}function F(){let x=c+l;return{hits:c,misses:l,size:r.size,max:t,hitRate:x>0?c/x:0,keys:Array.from(r.keys())}}function V(){return Array.from(r.keys())}function j(){return r.size}return{cache:m,get:w,has:y,remove:v,clear:b,prune:C,activate:P,deactivate:T,getStats:F,keys:V,size:j}}function U0(e){let t=new Map;return{set(s,a){if(t.has(s))t.delete(s);if(t.set(s,a),t.size>e){let n=t.keys().next().value;if(n)t.delete(n)}},get(s){if(!t.has(s))return;let a=t.get(s);return t.delete(s),t.set(s,a),a},has(s){return t.has(s)},delete(s){return t.delete(s)},clear(){t.clear()},get size(){return t.size},keys(){return Array.from(t.keys())},values(){return Array.from(t.values())},forEach(s){t.forEach(s)}}}function J0(){let e=new Map;return{save(t,s){e.set(t,JSON.parse(JSON.stringify(s)))},restore(t){let s=e.get(t);return s?JSON.parse(JSON.stringify(s)):null},has(t){return e.has(t)},remove(t){return e.delete(t)},clear(){e.clear()},keys(){return Array.from(e.keys())},get size(){return e.size}}}function Y0(e,t={}){let{maxSize:s=100,reset:a}=t,n=[];return{acquire(){if(n.length>0)return n.pop();return e()},release(o){if(n.length<s){if(a)a(o);n.push(o)}},clear(){n.length=0},get size(){return n.length},get maxSize(){return s}}}var de=new Map;async function ut(e,t){let s=t||e.toString();if(de.has(s))return de.get(s);let a=e();de.set(s,a);try{return await a}catch(n){throw de.delete(s),n}}function Z0(e,t={}){let{retryAttempts:s=3,retryDelay:a=1000,onLoading:n,onLoaded:o,onError:i}=t,r="idle",c,l,d=async(u=0)=>{try{if(r==="loading"||r==="loaded"){if(c)return c}r="loading",n?.();let p=await ut(e);return c=p,r="loaded",o?.(p),p}catch(p){let h=p;if(u<s)return await new Promise((g)=>setTimeout(g,a*(u+1))),d(u+1);throw r="error",l=h,i?.(h),h}};return{get state(){return r},get module(){return c},get error(){return l},load:()=>d(),preload:()=>d()}}function eu(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:a=null,rootMargin:n="0px",threshold:o=0.01,placeholder:i,errorContent:r,onLoading:c,onLoaded:l,onError:d}=s,u=!1,p=null;if(i)if(typeof i==="string")e.innerHTML=i;else e.innerHTML="",e.appendChild(i);return p=new IntersectionObserver(async(g)=>{for(let m of g)if(m.isIntersecting&&!u){u=!0,p?.disconnect();try{c?.();let w=await ut(t);if(l?.(w),w&&typeof w.default?.render==="function"){let y=await w.default.render();e.innerHTML=y}}catch(w){let y=w;if(d?.(y),r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);else e.innerHTML=`<div style="color: red;">Failed to load component: ${y.message}</div>`}}},{root:a,rootMargin:n,threshold:o}),p.observe(e),()=>{p?.disconnect(),p=null}}function Q0(e,t,s={}){let a=[],n=Array.from(e);for(let o of n){let i=typeof t==="function"&&t.length>0?()=>t(o):t,r=eu(o,i,s);a.push(r)}return()=>{a.forEach((o)=>o())}}function tu(e){return ut(e)}function ek(e){return Promise.all(e.map((t)=>tu(t)))}function tk(e){if(e)de.delete(e);else de.clear()}function sk(){return{size:de.size,keys:Array.from(de.keys())}}function ak(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return ut(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function su(e,t,s={}){if(!e)return()=>{};let{root:a=null,rootMargin:n="50px",threshold:o=0.01,placeholder:i,onLoading:r,onLoaded:c,onError:l}=s;if(i&&typeof i==="string")e.src=i;let d=!1,u=null;return u=new IntersectionObserver((h)=>{for(let g of h)if(g.isIntersecting&&!d)d=!0,u?.disconnect(),r?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(m)=>{let w=Error(`Failed to load image: ${t}`);l?.(w),e.classList.add("error")},{once:!0})},{root:a,rootMargin:n,threshold:o}),u.observe(e),()=>{u?.disconnect(),u=null}}function nk(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),a=[];return s.forEach((n)=>{let o=n.getAttribute("data-lazy-src");if(o){let i=su(n,o,t);a.push(i)}}),()=>{a.forEach((n)=>n())}}var au={accent:"var(--stx-accent, rgb(0, 122, 255))","accent-ink":"#ffffff",ink:"rgba(0, 0, 0, 0.85)","ink-secondary":"rgba(0, 0, 0, 0.5)","ink-tertiary":"rgba(0, 0, 0, 0.26)",window:"#ffffff",sidebar:"#f2f1f0",card:"rgba(0, 0, 0, 0.04)",separator:"rgba(0, 0, 0, 0.1)",hover:"rgba(0, 0, 0, 0.05)","selection-inactive":"rgba(0, 0, 0, 0.08)",well:"rgba(0, 0, 0, 0.07)",control:"#ffffff","control-line":"rgba(0, 0, 0, 0.12)","control-shadow":"0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08)","switch-on":"#34c759",knob:"#ffffff",danger:"#ff3b30"},nu={accent:"var(--stx-accent, #0a84ff)","accent-ink":"#ffffff",ink:"rgba(255, 255, 255, 0.85)","ink-secondary":"rgba(255, 255, 255, 0.55)","ink-tertiary":"rgba(255, 255, 255, 0.25)",window:"#1e1e1e",sidebar:"#2a2a2a",card:"rgba(255, 255, 255, 0.05)",separator:"rgba(255, 255, 255, 0.1)",hover:"rgba(255, 255, 255, 0.06)","selection-inactive":"rgba(255, 255, 255, 0.1)",well:"rgba(255, 255, 255, 0.1)",control:"rgba(255, 255, 255, 0.14)","control-line":"rgba(255, 255, 255, 0.06)","control-shadow":"0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12)","switch-on":"#30d158",knob:"#ffffff",danger:"#ff453a"},ou={font:"-apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif","font-size":"13px","font-size-small":"11px",hairline:"0.5px","focus-ring":"0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent)","card-radius":"12px","control-radius":"6px","row-height":"38px","row-inset":"10px","sidebar-width":"226px"};function ht(e,t){let s=Object.entries(t).map(([a,n])=>` --stx-mac-${a}: ${n};`);return`${e} {
40
+ `)).lines}catch{return null}let n=a.map((i)=>{let r="",c="",l="",d=()=>{if(c!=="")r+=l===""?ws(c):`<span class="tok-${l}">${ws(c)}</span>`;c=""};for(let p of i.tokens){let u=s.tokenClass(p.type);if(u!==l)d(),l=u;c+=p.content}return d(),`<span class="line">${r}</span>`}).join(`
41
+ `);return`<pre ${['class="syntax"',t.theme==="light"||t.theme==="dark"?`data-syntax-theme="${t.theme}"`:"",t.lineNumbers?"data-line-numbers":""].filter(Boolean).join(" ")}><code>${n}</code></pre>`}function Zh(e){if(e==="auto")return Hn();return[`[data-syntax-theme="${e}"] {
42
+ ${Et(e==="dark"?gs:ms)}
43
+ }`,xs(),bs()].join(`
44
+ `)}async function fS(e,t={}){let{theme:s="auto",language:a="typescript",lineNumbers:n=!1}=t,o=await Xh(e,{language:a,theme:s,lineNumbers:n});if(o===null)return{html:Yh(e),css:"",language:a,theme:s==="dark"?Vn:Fn};return{html:o,css:Zh(s),language:a,theme:s==="auto"?"auto":s==="dark"?Vn:Fn}}function mS(e){if(e.includes("<!DOCTYPE")||e.includes("<html"))return"html";if(e.includes("<?php"))return"php";if(e.includes("import")&&e.includes("from"))return"typescript";if(e.includes("function")||e.includes("const"))return"javascript";if(e.includes("{")&&e.includes("}"))return"json";if(e.includes("$")&&e.includes("|"))return"bash";if(e.includes("#")&&e.includes("##"))return"markdown";return"typescript"}function gS(e,t){return`<div class="${t?`rounded-md overflow-auto text-sm leading-relaxed font-mono ${t}`:"rounded-md overflow-auto text-sm leading-relaxed font-mono"}">${e}</div>`}var fe=null,Qh=(e)=>e===1?0:1;function It(e,t){return t.split(".").reduce((s,a)=>s?.[a],e)}function ys(e,t={}){return e.replace(/\{(\w+)\}/g,(s,a)=>t[a]!==void 0?String(t[a]):s)}function bS(e){let{locale:t,fallbackLocale:s="en",messages:a,pluralRules:n={},dateTimeFormats:o={},numberFormats:i={},missing:r,warnMissing:c=!0}=e;function l(w,S={}){let g=It(a[t],w);if(g===void 0&&s)g=It(a[s],w);if(g===void 0){if(r){let T=r(t,w);if(T)return ys(T,S)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${w}" in locale "${t}"`);return w}if(typeof g==="string")return ys(g,S);return String(g)}function d(w,S,g={}){let T=l(w,{...g,count:S});if(T.includes("|")){let M=T.split("|").map((B)=>B.trim()),I=(n[t]||Qh)(S,t),R=M[I]||M[M.length-1];return ys(R,{...g,count:S})}return T}function p(w,S="default"){let g=typeof w==="number"?new Date(w):w,T=o[S]||o.default||{};return new Intl.DateTimeFormat(t,T).format(g)}function u(w,S="default"){let g=i[S]||i.default||{};return new Intl.NumberFormat(t,g).format(w)}function f(w){if(It(a[t],w)!==void 0)return!0;if(s)return It(a[s],w)!==void 0;return!1}function h(w){if(!a[w]){console.warn(`[i18n] Locale "${w}" not found. Available locales: ${Object.keys(a).join(", ")}`);return}t=w}function m(w,S){if(!a[w])a[w]={};a[w]={...a[w],...S}}function b(w){delete a[w]}return{get locale(){return t},get availableLocales(){return Object.keys(a)},setLocale:h,t:l,tc:d,d:p,n:u,te:f,addMessages:m,removeLocale:b}}function vS(e){fe=e}function wS(){return fe}function yS(e,t){if(!fe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return fe.t(e,t)}function kS(e,t,s){if(!fe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return fe.tc(e,t,s)}function SS(e,t){if(!fe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return fe.d(e,t)}function CS(e,t){if(!fe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return fe.n(e,t)}var $S={en:(e)=>e===1?0:1,de:(e)=>e===1?0:1,nl:(e)=>e===1?0:1,sv:(e)=>e===1?0:1,fr:(e)=>e===0||e===1?0:1,pt_BR:(e)=>e===0||e===1?0:1,ru:(e)=>{if(e%10===1&&e%100!==11)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},pl:(e)=>{if(e===1)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},cs:(e)=>{if(e===1)return 0;if(e>=2&&e<=4)return 1;return 2},ar:(e)=>{if(e===0)return 0;if(e===1)return 1;if(e===2)return 2;if(e%100>=3&&e%100<=10)return 3;if(e%100>=11)return 4;return 5},ja:()=>0,ko:()=>0,zh:()=>0,th:()=>0,vi:()=>0},TS={short:{year:"numeric",month:"numeric",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}},ES={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function IS(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function AS(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var PS={en:{common:{loading:"Loading...",error:"Error",retry:"Retry",cancel:"Cancel",confirm:"Confirm",close:"Close",save:"Save",delete:"Delete",edit:"Edit",search:"Search",clear:"Clear",submit:"Submit",reset:"Reset"},form:{required:"This field is required",invalid:"Invalid value",tooShort:"Value is too short (minimum {min} characters)",tooLong:"Value is too long (maximum {max} characters)",invalidEmail:"Invalid email address",invalidUrl:"Invalid URL"},pagination:{previous:"Previous",next:"Next",page:"Page {page}",of:"of {total}"}},es:{common:{loading:"Cargando...",error:"Error",retry:"Reintentar",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",save:"Guardar",delete:"Eliminar",edit:"Editar",search:"Buscar",clear:"Limpiar",submit:"Enviar",reset:"Restablecer"},form:{required:"Este campo es obligatorio",invalid:"Valor inv\xE1lido",tooShort:"El valor es demasiado corto (m\xEDnimo {min} caracteres)",tooLong:"El valor es demasiado largo (m\xE1ximo {max} caracteres)",invalidEmail:"Direcci\xF3n de correo electr\xF3nico inv\xE1lida",invalidUrl:"URL inv\xE1lida"},pagination:{previous:"Anterior",next:"Siguiente",page:"P\xE1gina {page}",of:"de {total}"}},fr:{common:{loading:"Chargement...",error:"Erreur",retry:"R\xE9essayer",cancel:"Annuler",confirm:"Confirmer",close:"Fermer",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",search:"Rechercher",clear:"Effacer",submit:"Soumettre",reset:"R\xE9initialiser"},form:{required:"Ce champ est obligatoire",invalid:"Valeur invalide",tooShort:"La valeur est trop courte (minimum {min} caract\xE8res)",tooLong:"La valeur est trop longue (maximum {max} caract\xE8res)",invalidEmail:"Adresse e-mail invalide",invalidUrl:"URL invalide"},pagination:{previous:"Pr\xE9c\xE9dent",next:"Suivant",page:"Page {page}",of:"sur {total}"}}};function MS(e={}){let{max:t=10,ttl:s=0,include:a,exclude:n,hooks:o,debug:i=!1}=e,r=new Map,c=0,l=0;function d(...k){if(i)console.log("[KeepAlive]",...k)}function p(k){if(n){if(n instanceof RegExp&&n.test(k))return!1;if(Array.isArray(n)&&n.includes(k))return!1}if(a){if(a instanceof RegExp&&!a.test(k))return!1;if(Array.isArray(a)&&!a.includes(k))return!1}return!0}function u(k){if(!s||!k.expiresAt)return!1;return Date.now()>k.expiresAt}function f(k){let A=r.get(k);if(A)A.lastAccessedAt=Date.now(),A.accessCount++,A.instance.lastAccessedAt=A.lastAccessedAt,r.delete(k),r.set(k,A),d(`Touched: ${k} (access count: ${A.accessCount})`)}function h(){if(r.size===0)return!1;let k=r.keys().next().value;if(!k)return!1;let A=r.get(k);if(A){d(`Evicting LRU: ${k}`);let j=A.instance.hooks;if(j?.onDeactivate)j.onDeactivate(A.instance);if(o?.onDeactivate)o.onDeactivate(A.instance);return r.delete(k),!0}return!1}function m(k,A,j){if(!p(A.type))return d(`Type not cacheable: ${A.type}`),A;if(r.size>=t)h();let D=Date.now(),F={instance:{...A,hooks:j||A.hooks,createdAt:A.createdAt||D,lastAccessedAt:D},accessCount:0,createdAt:D,lastAccessedAt:D,expiresAt:s?D+s:void 0};if(r.set(k,F),d(`Cached: ${k} (size: ${r.size}/${t})`),j?.onMount)j.onMount(F.instance);if(o?.onMount)o.onMount(F.instance);return F.instance}function b(k){let A=r.get(k);if(!A)return l++,d(`Miss: ${k}`),null;if(u(A))return d(`Expired: ${k}`),r.delete(k),l++,null;return c++,f(k),d(`Hit: ${k}`),A.instance}function w(k){let A=r.get(k);if(!A)return!1;if(u(A))return r.delete(k),!1;return!0}function S(k){let A=r.get(k);if(!A)return!1;d(`Removing: ${k}`);let j=A.instance.hooks;if(j?.onUnmount)j.onUnmount(A.instance);if(o?.onUnmount)o.onUnmount(A.instance);return r.delete(k)}function g(){d("Clearing cache"),r.forEach((k)=>{let A=k.instance.hooks;if(A?.onUnmount)A.onUnmount(k.instance);if(o?.onUnmount)o.onUnmount(k.instance)}),r.clear(),c=0,l=0}function T(){let k=0,A=Date.now();for(let[j,D]of r.entries())if(u(D))d(`Pruning expired: ${j}`),S(j),k++;while(r.size>t)if(h())k++;else break;if(k>0)d(`Pruned ${k} entries`);return k}function M(k){let A=b(k);if(!A)return null;d(`Activating: ${k}`);let j=A.hooks;if(j?.onActivate)j.onActivate(A);if(o?.onActivate)o.onActivate(A);if(A.state&&j?.onRestore)j.onRestore(A,A.state);return A}function P(k){let A=r.get(k);if(!A)return!1;d(`Deactivating: ${k}`);let j=A.instance,D=j.hooks;if(D?.onSave)j.state=D.onSave(j);if(D?.onDeactivate)D.onDeactivate(j);if(o?.onDeactivate)o.onDeactivate(j);return!0}function I(){let k=c+l;return{hits:c,misses:l,size:r.size,max:t,hitRate:k>0?c/k:0,keys:Array.from(r.keys())}}function R(){return Array.from(r.keys())}function B(){return r.size}return{cache:m,get:b,has:w,remove:S,clear:g,prune:T,activate:M,deactivate:P,getStats:I,keys:R,size:B}}function RS(e){let t=new Map;return{set(s,a){if(t.has(s))t.delete(s);if(t.set(s,a),t.size>e){let n=t.keys().next().value;if(n)t.delete(n)}},get(s){if(!t.has(s))return;let a=t.get(s);return t.delete(s),t.set(s,a),a},has(s){return t.has(s)},delete(s){return t.delete(s)},clear(){t.clear()},get size(){return t.size},keys(){return Array.from(t.keys())},values(){return Array.from(t.values())},forEach(s){t.forEach(s)}}}function LS(){let e=new Map;return{save(t,s){e.set(t,JSON.parse(JSON.stringify(s)))},restore(t){let s=e.get(t);return s?JSON.parse(JSON.stringify(s)):null},has(t){return e.has(t)},remove(t){return e.delete(t)},clear(){e.clear()},keys(){return Array.from(e.keys())},get size(){return e.size}}}function OS(e,t={}){let{maxSize:s=100,reset:a}=t,n=[];return{acquire(){if(n.length>0)return n.pop();return e()},release(o){if(n.length<s){if(a)a(o);n.push(o)}},clear(){n.length=0},get size(){return n.length},get maxSize(){return s}}}var be=new Map;async function At(e,t){let s=t||e.toString();if(be.has(s))return be.get(s);let a=e();be.set(s,a);try{return await a}catch(n){throw be.delete(s),n}}function zS(e,t={}){let{retryAttempts:s=3,retryDelay:a=1000,onLoading:n,onLoaded:o,onError:i}=t,r="idle",c,l,d=async(p=0)=>{try{if(r==="loading"||r==="loaded"){if(c)return c}r="loading",n?.();let u=await At(e);return c=u,r="loaded",o?.(u),u}catch(u){let f=u;if(p<s)return await new Promise((h)=>setTimeout(h,a*(p+1))),d(p+1);throw r="error",l=f,i?.(f),f}};return{get state(){return r},get module(){return c},get error(){return l},load:()=>d(),preload:()=>d()}}function ef(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:a=null,rootMargin:n="0px",threshold:o=0.01,placeholder:i,errorContent:r,onLoading:c,onLoaded:l,onError:d}=s,p=!1,u=null;if(i)if(typeof i==="string")e.innerHTML=i;else e.innerHTML="",e.appendChild(i);return u=new IntersectionObserver(async(h)=>{for(let m of h)if(m.isIntersecting&&!p){p=!0,u?.disconnect();try{c?.();let b=await At(t);if(l?.(b),b&&typeof b.default?.render==="function"){let w=await b.default.render();e.innerHTML=w}}catch(b){let w=b;if(d?.(w),r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);else e.innerHTML=`<div style="color: red;">Failed to load component: ${w.message}</div>`}}},{root:a,rootMargin:n,threshold:o}),u.observe(e),()=>{u?.disconnect(),u=null}}function HS(e,t,s={}){let a=[],n=Array.from(e);for(let o of n){let i=typeof t==="function"&&t.length>0?()=>t(o):t,r=ef(o,i,s);a.push(r)}return()=>{a.forEach((o)=>o())}}function tf(e){return At(e)}function jS(e){return Promise.all(e.map((t)=>tf(t)))}function FS(e){if(e)be.delete(e);else be.clear()}function VS(){return{size:be.size,keys:Array.from(be.keys())}}function BS(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return At(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function sf(e,t,s={}){if(!e)return()=>{};let{root:a=null,rootMargin:n="50px",threshold:o=0.01,placeholder:i,onLoading:r,onLoaded:c,onError:l}=s;if(i&&typeof i==="string")e.src=i;let d=!1,p=null;return p=new IntersectionObserver((f)=>{for(let h of f)if(h.isIntersecting&&!d)d=!0,p?.disconnect(),r?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(m)=>{let b=Error(`Failed to load image: ${t}`);l?.(b),e.classList.add("error")},{once:!0})},{root:a,rootMargin:n,threshold:o}),p.observe(e),()=>{p?.disconnect(),p=null}}function _S(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),a=[];return s.forEach((n)=>{let o=n.getAttribute("data-lazy-src");if(o){let i=sf(n,o,t);a.push(i)}}),()=>{a.forEach((n)=>n())}}var af={accent:"var(--stx-accent, rgb(0, 122, 255))","accent-ink":"#ffffff",ink:"rgba(0, 0, 0, 0.85)","ink-secondary":"rgba(0, 0, 0, 0.5)","ink-tertiary":"rgba(0, 0, 0, 0.26)",window:"#ffffff",sidebar:"#f2f1f0",card:"rgba(0, 0, 0, 0.04)",separator:"rgba(0, 0, 0, 0.1)",hover:"rgba(0, 0, 0, 0.05)","selection-inactive":"rgba(0, 0, 0, 0.08)",well:"rgba(0, 0, 0, 0.07)",control:"#ffffff","control-line":"rgba(0, 0, 0, 0.12)","control-shadow":"0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08)","switch-on":"#34c759",knob:"#ffffff",danger:"#ff3b30"},nf={accent:"var(--stx-accent, #0a84ff)","accent-ink":"#ffffff",ink:"rgba(255, 255, 255, 0.85)","ink-secondary":"rgba(255, 255, 255, 0.55)","ink-tertiary":"rgba(255, 255, 255, 0.25)",window:"#1e1e1e",sidebar:"#2a2a2a",card:"rgba(255, 255, 255, 0.05)",separator:"rgba(255, 255, 255, 0.1)",hover:"rgba(255, 255, 255, 0.06)","selection-inactive":"rgba(255, 255, 255, 0.1)",well:"rgba(255, 255, 255, 0.1)",control:"rgba(255, 255, 255, 0.14)","control-line":"rgba(255, 255, 255, 0.06)","control-shadow":"0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12)","switch-on":"#30d158",knob:"#ffffff",danger:"#ff453a"},of={font:"-apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif","font-size":"13px","font-size-small":"11px",hairline:"0.5px","focus-ring":"0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent)","card-radius":"12px","control-radius":"6px","row-height":"38px","row-inset":"10px","sidebar-width":"226px"};function Pt(e,t){let s=Object.entries(t).map(([a,n])=>` --stx-mac-${a}: ${n};`);return`${e} {
42
45
  ${s.join(`
43
46
  `)}
44
- }`}function ik(){return[ht(":where(:root)",{...ou,...au}),ht(":where(.dark)",nu),`@media (max-resolution: 1.5dppx) {
47
+ }`}function KS(){return[Pt(":where(:root)",{...of,...af}),Pt(":where(.dark)",nf),`@media (max-resolution: 1.5dppx) {
45
48
  :where(:root) {
46
49
  --stx-mac-hairline: 1px;
47
50
  }
48
51
  }`,`@media (prefers-contrast: more) {
49
- ${ht(":where(:root)",{separator:"rgba(0, 0, 0, 0.4)","control-line":"rgba(0, 0, 0, 0.5)","ink-secondary":"rgba(0, 0, 0, 0.75)",hairline:"1px"})}
50
- ${ht(":where(.dark)",{separator:"rgba(255, 255, 255, 0.45)","control-line":"rgba(255, 255, 255, 0.5)","ink-secondary":"rgba(255, 255, 255, 0.8)"})}
52
+ ${Pt(":where(:root)",{separator:"rgba(0, 0, 0, 0.4)","control-line":"rgba(0, 0, 0, 0.5)","ink-secondary":"rgba(0, 0, 0, 0.75)",hairline:"1px"})}
53
+ ${Pt(":where(.dark)",{separator:"rgba(255, 255, 255, 0.45)","control-line":"rgba(255, 255, 255, 0.5)","ink-secondary":"rgba(255, 255, 255, 0.8)"})}
51
54
  }`].join(`
52
- `)}var es={colors:{primary:"#3b82f6",secondary:"#8b5cf6",success:"#10b981",warning:"#f59e0b",danger:"#ef4444",info:"#06b6d4",gray:"#6b7280",white:"#ffffff",black:"#000000"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{light:"300",normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem"},borderRadius:{none:"0",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",none:"none"},components:{button:{borderRadius:"0.375rem",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:"500"},input:{borderRadius:"0.375rem",padding:"0.5rem 0.75rem",fontSize:"0.875rem",borderWidth:"1px"},card:{borderRadius:"0.5rem",padding:"1.5rem",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"}}};function qa(e,t){let s={...e};for(let a in t)if(t[a]instanceof Object&&a in e)s[a]=qa(e[a],t[a]);else s[a]=t[a];return s}function Ne(e){return qa(es,e)}var ft=es;function lk(){return ft}function iu(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,a])=>{if(a)t.push(`--color-${s}: ${a};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,a])=>{if(a)t.push(`--font-${s}: ${a};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,a])=>{if(a)t.push(`--text-${s}: ${a};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,a])=>{if(a)t.push(`--font-weight-${s}: ${a};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,a])=>{if(a)t.push(`--leading-${s}: ${a};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,a])=>{if(a)t.push(`--spacing-${s}: ${a};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,a])=>{if(a)t.push(`--radius-${s}: ${a};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,a])=>{if(a)t.push(`--shadow-${s}: ${a};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,a])=>{if(a)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,a])=>{if(a)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,a])=>{if(a)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});return`:root {
55
+ `)}var ks={colors:{primary:"#3b82f6",secondary:"#8b5cf6",success:"#10b981",warning:"#f59e0b",danger:"#ef4444",info:"#06b6d4",gray:"#6b7280",white:"#ffffff",black:"#000000"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{light:"300",normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem"},borderRadius:{none:"0",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",none:"none"},components:{button:{borderRadius:"0.375rem",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:"500"},input:{borderRadius:"0.375rem",padding:"0.5rem 0.75rem",fontSize:"0.875rem",borderWidth:"1px"},card:{borderRadius:"0.5rem",padding:"1.5rem",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"}}};function Bn(e,t){let s={...e};for(let a in t)if(t[a]instanceof Object&&a in e)s[a]=Bn(e[a],t[a]);else s[a]=t[a];return s}function Ue(e){return Bn(ks,e)}var Nt=ks;function GS(){return Nt}function rf(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,a])=>{if(a)t.push(`--color-${s}: ${a};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,a])=>{if(a)t.push(`--font-${s}: ${a};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,a])=>{if(a)t.push(`--text-${s}: ${a};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,a])=>{if(a)t.push(`--font-weight-${s}: ${a};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,a])=>{if(a)t.push(`--leading-${s}: ${a};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,a])=>{if(a)t.push(`--spacing-${s}: ${a};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,a])=>{if(a)t.push(`--radius-${s}: ${a};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,a])=>{if(a)t.push(`--shadow-${s}: ${a};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,a])=>{if(a)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,a])=>{if(a)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,a])=>{if(a)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});return`:root {
53
56
  ${t.join(`
54
57
  `)}
55
- }`}function ck(e,t){if(ft=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([a,n])=>{if(n)s.style.setProperty(`--color-${a}`,n)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([a,n])=>{if(n)s.style.setProperty(`--font-${a}`,n)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([a,n])=>{if(n)s.style.setProperty(`--text-${a}`,n)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([a,n])=>{if(n)s.style.setProperty(`--font-weight-${a}`,n)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([a,n])=>{if(n)s.style.setProperty(`--leading-${a}`,n)});if(e.spacing)Object.entries(e.spacing).forEach(([a,n])=>{if(n)s.style.setProperty(`--spacing-${a}`,n)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([a,n])=>{if(n)s.style.setProperty(`--radius-${a}`,n)});if(e.shadows)Object.entries(e.shadows).forEach(([a,n])=>{if(n)s.style.setProperty(`--shadow-${a}`,n)});if(e.components?.button)Object.entries(e.components.button).forEach(([a,n])=>{if(n)s.style.setProperty(`--button-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.input)Object.entries(e.components.input).forEach(([a,n])=>{if(n)s.style.setProperty(`--input-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.card)Object.entries(e.components.card).forEach(([a,n])=>{if(n)s.style.setProperty(`--card-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)})}function dk(){return ft}function pk(e){let t=e.split("."),s=ft;for(let a of t)if(s&&typeof s==="object"&&a in s)s=s[a];else return;return s}var uk={default:es,purple:Ne({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:Ne({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:Ne({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:Ne({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:Ne({borderRadius:{none:"0",sm:"0",md:"0.125rem",lg:"0.25rem",full:"0.25rem"},shadows:{sm:"none",md:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",lg:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",xl:"0 4px 6px -1px rgba(0, 0, 0, 0.1)","2xl":"0 10px 15px -3px rgba(0, 0, 0, 0.1)",none:"none"}})};function hk(e){return iu(e)}var lu="./ChatInbox-swjc2p6x.stx";var du="./ChatMessage-rj37tdgn.stx";var uu="./ConversationListItem-fjha2cgq.stx";var fu="./MessageBubble-v5m96g43.stx";function vk(e,t=""){if(!e)return"";let s=e;if(typeof s.href==="string"&&s.href)return s.href;if(!t)return"";let a=!1,n=t.replace(/\{(\w+)\}/g,(o,i)=>{let r=s[i];if(r==null||r==="")return a=!0,"";return encodeURIComponent(String(r))});return a?"":n}import{derived as Le,effect as mu,sharedRequest as gu,state as J}from"@stacksjs/stx";import{useBroadcastStream as xu}from"@stacksjs/stx/composables/use-broadcast-stream";var bu=1500;function Sk(e){let t=e.endpoint??"/messages",s=Le(e.scopeKey),a=J([]),n=J([]),o=J(null),i=J(""),r=J([]),c=J(!1),l=J(!1),d=J(!1),u=J(""),p=J(""),h=J(""),g=J(!1),m=J(!1),w=J(4000),y=J(!1),v=new Set,b=null,C=null,P="",T=0,F=new Map,V=null,j=!1,x=0;function S(){T++,a.set([]),n.set([]),o.set(null),i.set(""),r.set([]),p.set(""),u.set(""),c.set(!1),l.set(!1),d.set(!1),F=new Map,V=null,x=0,m.set(!1),b?.close(),b=null}function L(){let A=e.scopeKey();if(A!==P)S(),P=A;return Ua(),T}async function R(A,I){let z=await e.request(`${t}${A}`,{...I,cache:"no-store"}),B=await z.json().catch(()=>({}));if(!z.ok)throw Error(B.error||"Could not load messages. Try again.");return B}let N=Le(()=>{let A=h().toLowerCase().trim();return a().map((I)=>({...I,conversation:n().find((z)=>z.recipient_id===I.id)})).filter((I)=>(!A||`${I.name} ${I.role}`.toLowerCase().includes(A))&&(!g()||(I.conversation?.unread??0)>0)).sort((I,z)=>(z.conversation?.last_message?.id??0)-(I.conversation?.last_message?.id??0)||I.name.localeCompare(z.name))}),E=Le(()=>n().reduce((A,I)=>A+I.unread,0)),M=Le(()=>!!i()&&!!p().trim()&&p().trim().length<=w()&&!d()&&!l()),k=Le(e.selfId);function O(A){u.set(A instanceof Error?A.message:"Could not load messages. Try again.")}async function D(A,I,z=!0){let B=await R(`/conversations/${I}`);if(A!==T||I!==i()||e.scopeKey()!==P)return;let se=B.messages[0]?.id;if(r.set([...r().filter((vt)=>se&&vt.id<se),...B.messages]),r().length===B.messages.length)m.set(B.has_more);let ze=B.messages.at(-1);if(z&&ze){if(await R(`/conversations/${I}/read`,{method:"POST",body:JSON.stringify({through_id:ze.id})}),A===T&&I===i())n.update((vt)=>vt.map((wt)=>wt.id===I?{...wt,unread:0}:wt))}}let Y=gu(),H=new Set;function K(){if(!e.broadcastEndpoint||!e.selfId()||y())return Promise.resolve();return new Promise((A)=>{let I=()=>{clearTimeout(z),H.delete(I),A()},z=setTimeout(I,bu);H.add(I)})}function te(){if(!H.size)return!1;for(let A of[...H])A();return!0}function De(){return L(),Y.run(T,()=>K().then(Oe)).finally(ge)}async function mt(){L(),await Y.fresh(T,()=>Oe()).finally(ge)}async function Oe(){let A=L();c.set(!0),u.set("");try{let I=await R("");if(A!==T||e.scopeKey()!==P)return;a.set(I.contacts),n.set(I.conversations),w.set(I.max_length),c.set(!1);let z=o()?I.contacts.find((se)=>se.id===o().id):null;if(o()&&!z){let se=o().id;ts(),F.delete(se),p.set(""),V=null}else if(z)o.set(z);let B=e.initialRecipient?.()??0;if(B>0&&B!==x){let se=I.contacts.find((ze)=>ze.id===B);if(se)x=B,await gt(se)}}catch(I){if(A===T)O(I)}finally{if(A===T)c.set(!1)}}async function gt(A){if(L(),o())F.set(o().id,p());let I=++T;d.set(!1),o.set(A),p.set(F.get(A.id)??""),i.set(""),r.set([]),m.set(!1),u.set(""),l.set(!0);try{let z=await R("/conversations",{method:"POST",body:JSON.stringify({recipient_id:A.id})});if(I!==T||e.scopeKey()!==P)return;i.set(z.id),await D(I,z.id)}catch(z){if(I===T)O(z)}finally{if(I===T)l.set(!1);ge()}}function ts(){if(o())F.set(o().id,p());T++,d.set(!1),l.set(!1),o.set(null),i.set(""),r.set([]),u.set("")}async function Wa(){if(L(),!M())return;let A=i(),I=p().trim(),z=T,B=V?.body===I&&V.thread===A?V.key:crypto.randomUUID();V={body:I,key:B,thread:A},d.set(!0),u.set("");try{if(await R(`/conversations/${A}/messages`,{method:"POST",body:JSON.stringify({body:I,client_key:B})}),z!==T||e.scopeKey()!==P)return;if(p().trim()===I)p.set("");F.delete(o().id),V=null,await D(z,A),await mt()}catch(se){if(z===T)O(se)}finally{if(z===T)d.set(!1);ge()}}async function Ga(){let A=i(),I=r()[0]?.id,z=T;if(!A||!I||l())return;l.set(!0);try{let B=await R(`/conversations/${A}?before=${I}`);if(z===T&&A===i())r.set([...B.messages,...r()]),m.set(B.has_more)}catch(B){if(z===T)O(B)}finally{if(z===T)l.set(!1);ge()}}async function ss(A=!1){if(j||d()||l())return;j=!0;try{if(await De(),A&&o()&&!i())await gt(o());else if(A&&i())await D(T,i())}catch(I){O(I)}finally{j=!1,ge()}}let xt=!1;async function bt(){if(j||Y.busy||d()||l()){xt=!0;return}await ss([...v].some((A)=>A()))}function Ua(){if(b||!v.size||!e.selfId()||!e.broadcastEndpoint)return;let A=P;b=xu({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(I)=>{if(y.set(I),!I)te()},onConnected:()=>{if(!te()&&A===e.scopeKey())bt()},onMessage:(I)=>{if(A===e.scopeKey()&&I.event.startsWith("messaging."))bt()}})}function Ja(A=()=>!1){if(v.add(A),L(),!C)C=mu(()=>{L()});return()=>{if(v.delete(A),!v.size)b?.close(),b=null,C?.(),C=null}}function ge(){if(xt)xt=!1,bt()}return{contacts:a,conversations:n,selected:o,threadId:i,messages:r,loading:c,threadLoading:l,sending:d,error:u,draft:p,search:h,unreadOnly:g,hasMore:m,maxLength:w,rows:N,unread:E,canSend:M,selfId:k,scopeKey:s,load:De,open:gt,back:ts,send:Wa,older:Ga,refresh:ss,reset:S,observe:Ja,connected:y}}var wu="./ChatUnreadBadge-3vq0t8d2.stx";var ku="./ChatLauncher-3zph4trh.stx";export{on as Accordion,ln as AccordionItem,dn as AddressField,tp as AiTextarea,x0 as AnimationClasses,Tn as AppearancePicker,In as Audio,Kn as Avatar,Hh as BIOMETRIC_DEFAULT_KEY,Wn as Badge,Pn as BiometricSignIn,Un as Breadcrumb,$e as Breakpoints,Qn as Button,so as Calendar,go as Card,lu as ChatInbox,ku as ChatLauncher,du as ChatMessage,wu as ChatUnreadBadge,bo as Checkbox,cl as Checkout,wo as ChoiceChips,Ya as CodeBlock,ko as CodeEditor,Co as ColorSwatches,To as Combobox,Io as ComboboxButton,Po as ComboboxInput,Ro as ComboboxOption,Lo as ComboboxOptions,un as CommandBar,Oo as CommandPalette,Ho as CommandPaletteItem,X as ComponentError,fn as ContentCard,Vo as ContextMenu,Zo as ContextMenuView,uu as ConversationListItem,Mm as DEFAULT_MAX_WIDTH,Pm as DEFAULT_MIN_WIDTH,ri as DataGrid,di as DataGridView,no as DateRangePicker,io as DateTimePicker,pl as DefaultPaymentMethod,ui as Dialog,fi as DialogBackdrop,gi as DialogDescription,bi as DialogPanel,wi as DialogTitle,ki as Drawer,Ci as Dropdown,Ti as DropdownButton,Ii as DropdownItem,Pi as DropdownItems,u0 as Easing,sr as EmailInput,co as EmptyState,uo as ErrorState,xe as ErrorTypes,Rm as FIT_MAX_WIDTH,Cl as FORBIDDEN_SANDBOX_TOKENS,Di as FileDrop,Fr as FilterChip,jr as FilterChips,gn as FloatingPanel,Xa as Footer,Ri as Form,Ui as GraphCanvas,Ge as GraphModel,_i as GraphView,$t as GridModel,Yi as GroupedList,Zi as GroupedListRow,Za as Hero,er as Image,Qa as Installation,Nm as JSON_PREVIEW_LENGTH,vr as JsonTree,Sr as JsonTreeView,e0 as KeyboardKeys,Vu as KeyboardShortcuts,qp as KeyframeAnimations,$r as List,_r as ListRow,Ar as Listbox,Mr as ListboxButton,Nr as ListboxLabel,Dr as ListboxOption,zr as ListboxOptions,Rn as Login,nu as MAC_DARK,au as MAC_LIGHT,ou as MAC_METRICS,fu as MessageBubble,qr as NavBar,Qr as Navigator,tl as Notification,nr as NumberInput,al as Pager,ol as PagerDots,rl as Pagination,ir as PasswordInput,hl as PaymentMethods,xl as Popover,vl as PopoverButton,yl as PopoverPanel,Sl as Portal,zl as PreviewFrame,Vl as PreviewFrameView,Bl as Progress,f as PropTypes,tc as RENDER_SURFACE_MAX_SIDE,Kl as Radio,Wl as RadioGroup,Ul as RadioGroupDescription,Yl as RadioGroupLabel,Zl as RadioGroupOption,ec as RenderSurface,Xe as SETTINGS_HIGHLIGHT_MS,Sv as SETTINGS_NATIVE,Cv as SETTINGS_NATIVE_SYMBOLS,yv as SETTINGS_NATIVE_TONES,Z as SETTINGS_RANK,cv as SETTINGS_TYPE_AHEAD_MS,Lc as SETTINGS_UPDATE_LABELS,th as SHADE_VAR_PREFIX,$w as SLIDER_MAX_TICKS,Ut as SYNTAX_DARK,Gt as SYNTAX_LIGHT,Gp as SYNTAX_PROPERTIES,Va as SYNTAX_TOKENS,lr as SearchInput,Gr as SectionCard,lc as SegmentedControl,dc as Select,hc as SettingsGroup,mc as SettingsPane,xc as SettingsPaneHeader,vc as SettingsRow,yc as SettingsSidebarGroup,Sc as SettingsSidebarItem,$c as SettingsUpdateRow,Ec as SettingsWindow,Pc as SettingsWindowTree,Fc as SettingsWindowView,jc as Sidebar,bn as SidebarDivider,_c as SidebarFooter,qc as SidebarHeader,Gc as SidebarItem,Jc as SidebarPinned,wn as SidebarRow,Xc as SidebarSection,Qc as SidebarSpace,ad as SidebarSpaceSwitcher,td as SidebarSpaces,Ln as Signup,md as Skeleton,xd as Slider,On as SocialSignInButton,kn as SpaceSwitcher,vd as Spinner,kd as SplitPane,Sd as SplitPaneView,$d as Stepper,Ed as StepperStep,ct as StorageManager,ml as SubscriptionCheckout,Er as SwipeRow,Ad as Switch,as as THEMED_FAMILIES,_d as Tab,Jr as TabBar,Xr as TabBarItem,qd as TabList,Gd as TabPanel,Md as Table,Nd as TableBody,Dd as TableCell,zd as TableHead,Fd as TableHeader,jd as TableRow,Jd as Tabs,Xd as Teleport,dr as TextInput,Qd as Textarea,fo as ThemeToggle,Cn as TileGrid,ap as Tooltip,op as Transition,Nt as TreeModel,Hn as TwoFactorChallenge,ia as VIEWPORT_PRESETS,rp as Video,cp as VirtualList,pp as VirtualTable,y0 as animate,b0 as animateWithClass,Xy as announceToScreenReader,Ha as applyAnimation,M0 as applyHeadwindClasses,ck as applyTheme,n0 as aria,xs as ariaShortcut,Jn as assert,pf as assertProp,Vn as biometricHost,ns as biometricLabel,Fh as biometricSignInLabel,da as buildDocument,eo as buttonPropSchema,ks as cellJson,ys as cellKind,ne as cellValue,Ks as centreOn,js as clampZoom,of as clearErrorHandler,tk as clearModuleCache,Is as clipToRect,Xu as closeOverlay,ja as codeBlockCss,C0 as componentApi,q0 as componentMessages,Fi as connectedComponents,vk as contactLink,Iu as copyToClipboard,Yy as createAriaDescription,Jy as createAriaLabel,Vh as createBiometricSignIn,Sk as createChat,Y0 as createComponentPool,lf as createDebugger,Zy as createFocusTrap,N0 as createI18n,G0 as createKeepAlive,Kp as createKeyframeAnimation,v0 as createKeyframes,U0 as createLRUCache,ae as createPropValidator,ak as createRouteLoader,Qy as createRovingTabindex,bf as createSafeClickHandler,o0 as createScreenReaderText,c0 as createSkipLink,J0 as createStateManager,Qw as createStorage,Ne as createTheme,Bp as cssAnimation,oi as cycleSort,H0 as d,kt as dateTimeFields,j0 as dateTimeFormats,St as dateTimeInstant,Mf as dateTimePreset,ro as dateTimeToIso,Ib as declaresColorScheme,Tt as defaultNodeMetrics,es as defaultTheme,Ia as deriveSpaceTint,la as describeViewport,P0 as detectLanguage,rf as devAssert,lt as dividerRange,Hp as easeInBack,za as easeInBounce,Rp as easeInCirc,xp as easeInCubic,Dp as easeInElastic,Ap as easeInExpo,Vp as easeInOutBack,jp as easeInOutBounce,Lp as easeInOutCirc,vp as easeInOutCubic,zp as easeInOutElastic,Mp as easeInOutExpo,gp as easeInOutQuad,kp as easeInOutQuart,$p as easeInOutQuint,Ip as easeInOutSine,fp as easeInQuad,wp as easeInQuart,Sp as easeInQuint,Tp as easeInSine,Fp as easeOutBack,qt as easeOutBounce,Np as easeOutCirc,bp as easeOutCubic,Op as easeOutElastic,Pp as easeOutExpo,mp as easeOutQuad,yp as easeOutQuart,Cp as easeOutQuint,Ep as easeOutSine,Ns as edgeIdOf,Ms as edgeShape,et as emptySettingsHistory,wd as equalSizes,cf as errorBoundary,Vi as findBackEdges,jo as findItem,U as findSettingsPane,Ee as firstIndex,pc as firstSettingsPane,_s as fit,We as fitLabel,ra as fitScale,Ra as fitSizes,Nl as forceColorScheme,Hs as forceLayout,Ni as formPropSchema,Ie as formatCell,Pf as formatDateTime,Mt as formatPath,gs as formatShortcut,Fl as framePassesColorScheme,lx as fromTinkerValue,ox as fromValue,Oa as generateId,Nu as generateSEOTags,hk as generateThemeCSS,sk as getCacheStats,l0 as getColorSchemePreference,yt as getEffectiveTheme,Kt as getFocusableElements,I0 as getHighlighter,D0 as getI18n,en as getSystemTheme,lk as getTheme,pk as getThemeValue,je as handleError,t0 as hasFocus,be as hasSubmenu,A0 as highlight,Xp as highlightToHtml,ji as identityViewport,si as inferColumns,ti as inferType,cs as isActionable,It as isExpandable,ls as isFocusable,Pt as isIndexed,Eb as isIsolatingSandbox,_0 as isRTL,Zu as isTopOverlay,a0 as isVisibleToScreenReader,oe as labelOf,ds as lastIndex,Vs as layeredLayout,eu as lazyLoad,Q0 as lazyLoadAll,Z0 as lazyLoadComponent,su as lazyLoadImage,nk as lazyLoadImages,ut as lazyLoadModule,hp as linear,K0 as loadLocaleMessages,ik as macThemeCss,it as macosColors,Ds as maxLabelLength,Ts as moveCell,s0 as moveFocus,F0 as n,Ws as nearestInDirection,Gs as nearestTo,$g as nodeAt,Ls as nodeSize,Xs as nodeToJson,At as nodeToPlain,Ot as normalizeScheme,pe as normalizeSettingsText,rt as normalizeSizes,hd as normalizeSpace,ow as normalizeSpaces,B0 as numberFormats,hr as numberInputPropSchema,Yu as openOverlay,Qu as openOverlays,Ue as pan,Rs as parallelOffsets,jt as parseLength,Ma as parseSizes,hs as placeAtBox,us as placeAtPoint,fs as placeSubmenu,V0 as pluralRules,r0 as prefersHighContrast,i0 as prefersReducedMotion,tu as preloadModule,ek as preloadModules,ma as presentFrame,Rt as previewOf,Ss as projectRow,S0 as registerComponentApi,f0 as removeAnimation,ac as renderSurfaceHost,Bt as resizeAt,tw as resolveIconColor,Ct as resolveItems,Ze as resolveSettingsPane,ew as resolveSidebarTheme,pd as resolveSpaceTint,Dt as resolveViewport,qs as reveal,Cs as rowJson,$s as rowRange,ca as sandboxValue,nt as searchSettings,Os as seededRandom,Oi as selfLoopShape,Na as separatorValue,g0 as sequenceAnimations,La as serializeSizes,nf as setErrorHandler,L0 as setI18n,sn as setLink,W as setMeta,tn as setTitle,tt as settingsCanGoBack,Re as settingsCanGoForward,st as settingsHistoryBack,he as settingsHistoryCurrent,at as settingsHistoryForward,Me as settingsHistoryVisit,ba as settingsMatchRank,kv as settingsNativeGlyph,ue as settingsParentPane,va as settingsResultsAnnouncement,zt as settingsRovingIndex,Qe as settingsSidebarPane,we as settingsStorageName,wa as settingsTypeAheadAdd,ya as settingsTypeAheadMatch,Tv as settingsUpdateView,Ea as sidebarThemes,Pa as sliderDecimals,Ew as sliderFraction,Pw as sliderKeyValue,Tw as sliderRange,me as sliderSnap,Aw as sliderTicks,Iw as sliderValueAt,iw as spaceIndexOf,rw as spaceTintPayload,ud as spaceTintVars,nw as spaceWashGradient,m0 as staggerAnimation,ic as startRenderLoop,Te as stepIndex,pa as stepViewport,Zw as storage,_t as storageName,sh as stxThemePreset,Yt as syntaxPanelCss,Up as syntaxThemeCss,Jt as syntaxTokenRules,dt as syntaxVariables,O0 as t,z0 as tc,ur as textInputPropSchema,uk as themePresets,iu as themeToCSSProperties,ah as themeVariableNames,ni as toCsv,Et as toGraph,ai as toJson,Cg as toScreen,ps as typeAheadIndex,Ku as useBreakpoint,Du as useClickOutside,Eu as useCopyCode,Pu as useDarkMode,zu as useFocusTrap,Gu as useIsDarkMode,Wu as useIsDesktop,qu as useIsMobile,Fu as useKeyboard,Bu as useLocalStorage,Ce as useMediaQuery,Uu as usePrefersReducedMotion,Ru as useSEO,dk as useTheme,rs as validTimeZone,d0 as validateAriaRelationships,xf as validateButtonProps,Jg as validateEmailInputProps,hg as validateFormProps,Xg as validateNumberInputProps,Yg as validatePasswordInputProps,Xn as validateProps,Zg as validateSearchInputProps,wf as validateSize,Ug as validateTextInputProps,vf as validateVariant,_p as waitForAnimation,Yn as warn,uf as warnProp,os as wrapErrorHandler,Bs as zoomAt};
58
+ }`}function US(e,t){if(Nt=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([a,n])=>{if(n)s.style.setProperty(`--color-${a}`,n)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([a,n])=>{if(n)s.style.setProperty(`--font-${a}`,n)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([a,n])=>{if(n)s.style.setProperty(`--text-${a}`,n)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([a,n])=>{if(n)s.style.setProperty(`--font-weight-${a}`,n)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([a,n])=>{if(n)s.style.setProperty(`--leading-${a}`,n)});if(e.spacing)Object.entries(e.spacing).forEach(([a,n])=>{if(n)s.style.setProperty(`--spacing-${a}`,n)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([a,n])=>{if(n)s.style.setProperty(`--radius-${a}`,n)});if(e.shadows)Object.entries(e.shadows).forEach(([a,n])=>{if(n)s.style.setProperty(`--shadow-${a}`,n)});if(e.components?.button)Object.entries(e.components.button).forEach(([a,n])=>{if(n)s.style.setProperty(`--button-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.input)Object.entries(e.components.input).forEach(([a,n])=>{if(n)s.style.setProperty(`--input-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.card)Object.entries(e.components.card).forEach(([a,n])=>{if(n)s.style.setProperty(`--card-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)})}function JS(){return Nt}function YS(e){let t=e.split("."),s=Nt;for(let a of t)if(s&&typeof s==="object"&&a in s)s=s[a];else return;return s}var XS={default:ks,purple:Ue({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:Ue({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:Ue({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:Ue({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:Ue({borderRadius:{none:"0",sm:"0",md:"0.125rem",lg:"0.25rem",full:"0.25rem"},shadows:{sm:"none",md:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",lg:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",xl:"0 4px 6px -1px rgba(0, 0, 0, 0.1)","2xl":"0 10px 15px -3px rgba(0, 0, 0, 0.1)",none:"none"}})};function ZS(e){return rf(e)}var cf="./ChatInbox-swjc2p6x.stx";var pf="./ChatMessage-rj37tdgn.stx";var hf="./ConversationListItem-fjha2cgq.stx";var mf="./MessageBubble-v5m96g43.stx";function nC(e,t=""){if(!e)return"";let s=e;if(typeof s.href==="string"&&s.href)return s.href;if(!t)return"";let a=!1,n=t.replace(/\{(\w+)\}/g,(o,i)=>{let r=s[i];if(r==null||r==="")return a=!0,"";return encodeURIComponent(String(r))});return a?"":n}import{derived as Je,effect as gf,sharedRequest as xf,state as ee}from"@stacksjs/stx";import{useBroadcastStream as bf}from"@stacksjs/stx/composables/use-broadcast-stream";var vf=1500;function lC(e){let t=e.endpoint??"/messages",s=Je(e.scopeKey),a=ee([]),n=ee([]),o=ee(null),i=ee(""),r=ee([]),c=ee(!1),l=ee(!1),d=ee(!1),p=ee(""),u=ee(""),f=ee(""),h=ee(!1),m=ee(!1),b=ee(4000),w=ee(!1),S=new Set,g=null,T=null,M="",P=0,I=new Map,R=null,B=!1,k=0;function A(){P++,a.set([]),n.set([]),o.set(null),i.set(""),r.set([]),u.set(""),p.set(""),c.set(!1),l.set(!1),d.set(!1),I=new Map,R=null,k=0,m.set(!1),g?.close(),g=null}function j(){let O=e.scopeKey();if(O!==M)A(),M=O;return Kn(),P}async function D(O,L){let _=await e.request(`${t}${O}`,{...L,cache:"no-store"}),U=await _.json().catch(()=>({}));if(!_.ok)throw Error(U.error||"Could not load messages. Try again.");return U}let F=Je(()=>{let O=f().toLowerCase().trim();return a().map((L)=>({...L,conversation:n().find((_)=>_.recipient_id===L.id)})).filter((L)=>(!O||`${L.name} ${L.role}`.toLowerCase().includes(O))&&(!h()||(L.conversation?.unread??0)>0)).sort((L,_)=>(_.conversation?.last_message?.id??0)-(L.conversation?.last_message?.id??0)||L.name.localeCompare(_.name))}),y=Je(()=>n().reduce((O,L)=>O+L.unread,0)),N=Je(()=>!!i()&&!!u().trim()&&u().trim().length<=b()&&!d()&&!l()),C=Je(e.selfId);function x(O){p.set(O instanceof Error?O.message:"Could not load messages. Try again.")}async function E(O,L,_=!0){let U=await D(`/conversations/${L}`);if(O!==P||L!==i()||e.scopeKey()!==M)return;let oe=U.messages[0]?.id;if(r.set([...r().filter((Ot)=>oe&&Ot.id<oe),...U.messages]),r().length===U.messages.length)m.set(U.has_more);let Xe=U.messages.at(-1);if(_&&Xe){if(await D(`/conversations/${L}/read`,{method:"POST",body:JSON.stringify({through_id:Xe.id})}),O===P&&L===i())n.update((Ot)=>Ot.map((Dt)=>Dt.id===L?{...Dt,unread:0}:Dt))}}let q=xf(),z=new Set;function H(){if(!e.broadcastEndpoint||!e.selfId()||w())return Promise.resolve();return new Promise((O)=>{let L=()=>{clearTimeout(_),z.delete(L),O()},_=setTimeout(L,vf);z.add(L)})}function G(){if(!z.size)return!1;for(let O of[...z])O();return!0}function ce(){return j(),q.run(P,()=>H().then(Ye)).finally(Te)}async function De(){j(),await q.fresh(P,()=>Ye()).finally(Te)}async function Ye(){let O=j();c.set(!0),p.set("");try{let L=await D("");if(O!==P||e.scopeKey()!==M)return;a.set(L.contacts),n.set(L.conversations),b.set(L.max_length),c.set(!1);let _=o()?L.contacts.find((oe)=>oe.id===o().id):null;if(o()&&!_){let oe=o().id;Ss(),I.delete(oe),u.set(""),R=null}else if(_)o.set(_);let U=e.initialRecipient?.()??0;if(U>0&&U!==k){let oe=L.contacts.find((Xe)=>Xe.id===U);if(oe)k=U,await Mt(oe)}}catch(L){if(O===P)x(L)}finally{if(O===P)c.set(!1)}}async function Mt(O){if(j(),o())I.set(o().id,u());let L=++P;d.set(!1),o.set(O),u.set(I.get(O.id)??""),i.set(""),r.set([]),m.set(!1),p.set(""),l.set(!0);try{let _=await D("/conversations",{method:"POST",body:JSON.stringify({recipient_id:O.id})});if(L!==P||e.scopeKey()!==M)return;i.set(_.id),await E(L,_.id)}catch(_){if(L===P)x(_)}finally{if(L===P)l.set(!1);Te()}}function Ss(){if(o())I.set(o().id,u());P++,d.set(!1),l.set(!1),o.set(null),i.set(""),r.set([]),p.set("")}async function _n(){if(j(),!N())return;let O=i(),L=u().trim(),_=P,U=R?.body===L&&R.thread===O?R.key:crypto.randomUUID();R={body:L,key:U,thread:O},d.set(!0),p.set("");try{if(await D(`/conversations/${O}/messages`,{method:"POST",body:JSON.stringify({body:L,client_key:U})}),_!==P||e.scopeKey()!==M)return;if(u().trim()===L)u.set("");I.delete(o().id),R=null,await E(_,O),await De()}catch(oe){if(_===P)x(oe)}finally{if(_===P)d.set(!1);Te()}}async function qn(){let O=i(),L=r()[0]?.id,_=P;if(!O||!L||l())return;l.set(!0);try{let U=await D(`/conversations/${O}?before=${L}`);if(_===P&&O===i())r.set([...U.messages,...r()]),m.set(U.has_more)}catch(U){if(_===P)x(U)}finally{if(_===P)l.set(!1);Te()}}async function Cs(O=!1){if(B||d()||l())return;B=!0;try{if(await ce(),O&&o()&&!i())await Mt(o());else if(O&&i())await E(P,i())}catch(L){x(L)}finally{B=!1,Te()}}let Rt=!1;async function Lt(){if(B||q.busy||d()||l()){Rt=!0;return}await Cs([...S].some((O)=>O()))}function Kn(){if(g||!S.size||!e.selfId()||!e.broadcastEndpoint)return;let O=M;g=bf({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(L)=>{if(w.set(L),!L)G()},onConnected:()=>{if(!G()&&O===e.scopeKey())Lt()},onMessage:(L)=>{if(O===e.scopeKey()&&L.event.startsWith("messaging."))Lt()}})}function Wn(O=()=>!1){if(S.add(O),j(),!T)T=gf(()=>{j()});return()=>{if(S.delete(O),!S.size)g?.close(),g=null,T?.(),T=null}}function Te(){if(Rt)Rt=!1,Lt()}return{contacts:a,conversations:n,selected:o,threadId:i,messages:r,loading:c,threadLoading:l,sending:d,error:p,draft:u,search:f,unreadOnly:h,hasMore:m,maxLength:b,rows:F,unread:y,canSend:N,selfId:C,scopeKey:s,load:ce,open:Mt,back:Ss,send:_n,older:qn,refresh:Cs,reset:A,observe:Wn,connected:w}}var yf="./ChatUnreadBadge-3vq0t8d2.stx";var Sf="./ChatLauncher-3zph4trh.stx";export{co as Accordion,uo as AccordionItem,Eo as AddressField,th as AiTextarea,sS as AnimationClasses,fo as ApiOperation,go as ApiReference,bo as ApiSchema,_o as AppearancePicker,Li as AreaChart,Ko as Audio,ri as Avatar,Ym as BIOMETRIC_DEFAULT_KEY,ci as Badge,Di as BarChart,Go as BiometricSignIn,pi as Breadcrumb,He as Breakpoints,gi as Button,vi as Calendar,Mi as Card,cf as ChatInbox,Sf as ChatLauncher,pf as ChatMessage,yf as ChatUnreadBadge,nr as Checkbox,Xc as Checkout,ir as ChoiceChips,Gn as CodeBlock,lr as CodeEditor,Un as CodeGroup,dr as ColorSwatches,ur as Combobox,fr as ComboboxButton,gr as ComboboxInput,br as ComboboxOption,wr as ComboboxOptions,Ao as CommandBar,kr as CommandPalette,Cr as CommandPaletteItem,te as ComponentError,No as ContentCard,Tr as ContextMenu,Hr as ContextMenuView,hf as ConversationListItem,tb as DEFAULT_MAX_WIDTH,eb as DEFAULT_MIN_WIDTH,Gr as DataGrid,Yr as DataGridView,yi as DateRangePicker,Si as DateTimePicker,Qc as DefaultPaymentMethod,Zr as Dialog,el as DialogBackdrop,sl as DialogDescription,nl as DialogPanel,il as DialogTitle,ll as Drawer,dl as Dropdown,ul as DropdownButton,fl as DropdownItem,gl as DropdownItems,X1 as Easing,Bl as EmailInput,Ti as EmptyState,Ii as ErrorState,Ie as ErrorTypes,sb as FIT_MAX_WIDTH,ud as FORBIDDEN_SANDBOX_TOKENS,yl as FileDrop,Ec as FilterChip,Ac as FilterChips,Ro as FloatingPanel,to as Footer,bl as Form,Ll as GraphCanvas,dt as GraphModel,Al as GraphView,Wt as GridModel,Dl as GroupedList,Hl as GroupedListRow,so as Hero,Fl as Image,ao as Installation,ab as JSON_PREVIEW_LENGTH,rc as JsonTree,pc as JsonTreeView,j1 as KeyboardKeys,_f as KeyboardShortcuts,Kh as KeyframeAnimations,Hi as LineChart,hc as List,Nc as ListRow,xc as Listbox,vc as ListboxButton,yc as ListboxLabel,Sc as ListboxOption,$c as ListboxOptions,Jo as Login,nf as MAC_DARK,af as MAC_LIGHT,of as MAC_METRICS,mf as MessageBubble,Rc as NavBar,Vc as Navigator,_c as Notification,ql as NumberInput,W as OpenApiError,Kc as Pager,Gc as PagerDots,Jc as Pagination,Wl as PasswordInput,td as PaymentMethods,od as Popover,rd as PopoverButton,cd as PopoverPanel,pd as Portal,$d as PreviewFrame,Id as PreviewFrameView,Pd as PricingPlan,Md as PricingTable,Hd as Progress,v as PropTypes,Xd as RENDER_SURFACE_MAX_SIDE,Fd as Radio,Bd as RadioGroup,qd as RadioGroupDescription,Wd as RadioGroupLabel,Ud as RadioGroupOption,Yd as RenderSurface,ft as SETTINGS_HIGHLIGHT_MS,s0 as SETTINGS_NATIVE,a0 as SETTINGS_NATIVE_SYMBOLS,e0 as SETTINGS_NATIVE_TONES,se as SETTINGS_RANK,By as SETTINGS_TYPE_AHEAD_MS,Pp as SETTINGS_UPDATE_LABELS,nm as SHADE_VAR_PREFIX,nk as SLIDER_MAX_TICKS,gs as SYNTAX_DARK,ms as SYNTAX_LIGHT,Gh as SYNTAX_PROPERTIES,zn as SYNTAX_TOKENS,Ul as SearchInput,Yl as SecretField,Oc as SectionCard,np as SegmentedControl,ip as Select,cp as SettingsGroup,pp as SettingsPane,hp as SettingsPaneHeader,mp as SettingsRow,xp as SettingsSidebarGroup,vp as SettingsSidebarItem,yp as SettingsUpdateRow,Sp as SettingsWindow,Tp as SettingsWindowTree,Op as SettingsWindowView,zp as Sidebar,Oo as SidebarDivider,jp as SidebarFooter,Vp as SidebarHeader,_p as SidebarItem,Kp as SidebarPinned,zo as SidebarRow,Gp as SidebarSection,Jp as SidebarSpace,Qp as SidebarSpaceSwitcher,Xp as SidebarSpaces,Xo as Signup,pu as Skeleton,hu as Slider,Qo as SocialSignInButton,jo as SpaceSwitcher,Fi as Sparkline,mu as Spinner,bu as SplitPane,vu as SplitPaneView,yu as StatCard,Su as StatGroup,$u as Stepper,Eu as StepperStep,Tt as StorageManager,ad as SubscriptionCheckout,mc as SwipeRow,Au as Switch,Ts as THEMED_FAMILIES,_u as Tab,zc as TabBar,jc as TabBarItem,Ku as TabList,Gu as TabPanel,Nu as Table,Ru as TableBody,Ou as TableCell,zu as TableHead,ju as TableHeader,Vu as TableRow,Ju as Tabs,Xu as Teleport,Zl as TextInput,Qu as Textarea,Pi as ThemeToggle,Vo as TileGrid,ah as Tooltip,oh as Transition,es as TreeModel,ti as TwoFactorChallenge,Qa as VIEWPORT_PRESETS,rh as Video,ch as VirtualList,ph as VirtualTable,iS as animate,aS as animateWithClass,D1 as announceToScreenReader,On as applyAnimation,gS as applyHeadwindClasses,US as applyTheme,_1 as aria,da as ariaShortcut,ui as assert,kg as assertProp,ai as biometricHost,zs as biometricLabel,Xm as biometricSignInLabel,$o as buildApiReference,Yi as buildChartModel,an as buildDocument,xi as buttonPropSchema,ma as cellJson,fa as cellKind,ue as cellValue,za as centreOn,La as clampZoom,xg as clearErrorHandler,FS as clearModuleCache,ya as clipToRect,em as closeOverlay,Hn as codeBlockCss,cS as componentApi,PS as componentMessages,$l as connectedComponents,nC as contactLink,Nf as copyToClipboard,O1 as createAriaDescription,L1 as createAriaLabel,Zm as createBiometricSignIn,lC as createChat,OS as createComponentPool,vg as createDebugger,z1 as createFocusTrap,bS as createI18n,MS as createKeepAlive,qh as createKeyframeAnimation,nS as createKeyframes,RS as createLRUCache,pe as createPropValidator,BS as createRouteLoader,H1 as createRovingTabindex,Ag as createSafeClickHandler,q1 as createScreenReaderText,U1 as createSkipLink,LS as createStateManager,Hk as createStorage,Ue as createTheme,Bh as cssAnimation,Kr as cycleSort,SS as d,Ft as dateTimeFields,TS as dateTimeFormats,Vt as dateTimeInstant,Bg as dateTimePreset,Ci as dateTimeToIso,ey as declaresColorScheme,Gt as defaultNodeMetrics,eo as defaultTabIndex,ks as defaultTheme,$n as deriveSpaceTint,tn as describeViewport,mS as detectLanguage,bg as devAssert,$t as dividerRange,Hh as easeInBack,Ln as easeInBounce,Mh as easeInCirc,xh as easeInCubic,Oh as easeInElastic,Ah as easeInExpo,Fh as easeInOutBack,Vh as easeInOutBounce,Lh as easeInOutCirc,vh as easeInOutCubic,zh as easeInOutElastic,Nh as easeInOutExpo,gh as easeInOutQuad,kh as easeInOutQuart,$h as easeInOutQuint,Ih as easeInOutSine,fh as easeInQuad,wh as easeInQuart,Sh as easeInQuint,Th as easeInSine,jh as easeOutBack,hs as easeOutBounce,Rh as easeOutCirc,bh as easeOutCubic,Dh as easeOutElastic,Ph as easeOutExpo,mh as easeOutQuad,yh as easeOutQuart,Ch as easeOutQuint,Eh as easeOutSine,Ta as edgeIdOf,Ca as edgeShape,xt as emptySettingsHistory,gu as equalSizes,wg as errorBoundary,Ee as exampleFor,Tl as findBackEdges,Er as findItem,Q as findSettingsPane,Be as firstIndex,rp as firstSettingsPane,Da as fit,ct as fitLabel,en as fitScale,An as fitSizes,yd as forceColorScheme,Na as forceLayout,vl as formPropSchema,_e as formatCell,Bi as formatChange,Vg as formatDateTime,ns as formatFeature,Zt as formatPath,cn as formatPrice,ca as formatShortcut,_t as formatStat,Ed as framePassesColorScheme,Lv as fromTinkerValue,Nv as fromValue,Rn as generateId,Df as generateSEOTags,ZS as generateThemeCSS,VS as getCacheStats,G1 as getColorSchemePreference,zt as getEffectiveTheme,us as getFocusableElements,hS as getHighlighter,wS as getI18n,no as getSystemTheme,GS as getTheme,YS as getThemeValue,at as handleError,F1 as hasFocus,Pe as hasSubmenu,fS as highlight,Xh as highlightToHtml,El as identityViewport,Br as inferColumns,Vr as inferType,sa as isActionable,Jt as isExpandable,ta as isFocusable,Xt as isIndexed,Qw as isIsolatingSandbox,IS as isRTL,tm as isTopOverlay,B1 as isVisibleToScreenReader,he as labelOf,aa as lastIndex,Ra as layeredLayout,ef as lazyLoad,HS as lazyLoadAll,zS as lazyLoadComponent,sf as lazyLoadImage,_S as lazyLoadImages,At as lazyLoadModule,hh as linear,AS as loadLocaleMessages,ko as loadOpenApi,KS as macThemeCss,St as macosColors,Ia as maxLabelLength,va as moveCell,V1 as moveFocus,CS as n,ja as nearestInDirection,Fa as nearestTo,Jb as nodeAt,Ea as nodeSize,qa as nodeToJson,Yt as nodeToPlain,as as normalizeScheme,ye as normalizeSettingsText,Ct as normalizeSizes,cu as normalizeSpace,H0 as normalizeSpaces,ES as numberFormats,tc as numberInputPropSchema,Qf as openOverlay,sm as openOverlays,pt as pan,$a as parallelOffsets,cs as parseLength,et as parseOpenApiText,In as parseSizes,ia as placeAtBox,oa as placeAtPoint,ra as placeSubmenu,$S as pluralRules,W1 as prefersHighContrast,K1 as prefersReducedMotion,tf as preloadModule,jS as preloadModules,Dd as preparePlans,un as presentFrame,Qt as previewOf,ga as projectRow,Qn as readCodeTabs,lS as registerComponentApi,Q1 as removeAnimation,sr as renderChartSvg,Qd as renderSurfaceHost,Ds as requestExamples,ds as resizeAt,L0 as resolveIconColor,Kt as resolveItems,K as resolveRef,mt as resolveSettingsPane,R0 as resolveSidebarTheme,ru as resolveSpaceTint,ss as resolveViewport,Ha as reveal,xa as rowJson,ba as rowRange,sn as sandboxValue,Qe as schemaRows,yt as searchSettings,Aa as seededRandom,kl as selfLoopShape,Pn as separatorValue,tS as sequenceAnimations,Nn as serializeSizes,gg as setErrorHandler,vS as setI18n,io as setLink,X as setMeta,oo as setTitle,bt as settingsCanGoBack,Ge as settingsCanGoForward,vt as settingsHistoryBack,Se as settingsHistoryCurrent,wt as settingsHistoryForward,We as settingsHistoryVisit,mn as settingsMatchRank,t0 as settingsNativeGlyph,ke as settingsParentPane,gn as settingsResultsAnnouncement,os as settingsRovingIndex,gt as settingsSidebarPane,Me as settingsStorageName,xn as settingsTypeAheadAdd,bn as settingsTypeAheadMatch,o0 as settingsUpdateView,Cn as sidebarThemes,En as sliderDecimals,ik as sliderFraction,ck as sliderKeyValue,ok as sliderRange,$e as sliderSnap,lk as sliderTicks,rk as sliderValueAt,j0 as spaceIndexOf,F0 as spaceTintPayload,lu as spaceTintVars,z0 as spaceWashGradient,eS as staggerAnimation,sp as startRenderLoop,Ve as stepIndex,nn as stepViewport,zk as storage,ps as storageName,om as stxThemePreset,bs as syntaxPanelCss,Uh as syntaxThemeCss,xs as syntaxTokenRules,Et as syntaxVariables,yS as t,kS as tc,ec as textInputPropSchema,XS as themePresets,rf as themeToCSSProperties,im as themeVariableNames,qr as toCsv,Ut as toGraph,_r as toJson,Ub as toScreen,na as typeAheadIndex,Gf as useBreakpoint,Hf as useClickOutside,Pf as useCopyCode,Rf as useDarkMode,Ff as useFocusTrap,Yf as useIsDarkMode,Jf as useIsDesktop,Uf as useIsMobile,Bf as useKeyboard,Kf as useLocalStorage,ze as useMediaQuery,Xf as usePrefersReducedMotion,Of as useSEO,JS as useTheme,Fs as validTimeZone,J1 as validateAriaRelationships,Ig as validateButtonProps,wv as validateEmailInputProps,zb as validateFormProps,kv as validateNumberInputProps,Ls as validateOpenApi,yv as validatePasswordInputProps,fi as validateProps,Sv as validateSearchInputProps,Ng as validateSize,vv as validateTextInputProps,Pg as validateVariant,_h as waitForAnimation,hi as warn,Sg as warnProp,Hs as wrapErrorHandler,ln as yearlySaving,Oa as zoomAt};