vanilla-breeze 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/custom-elements.json +13966 -11505
  2. package/dist/cdn/components/accordion-wc.js +1 -1
  3. package/dist/cdn/components/activity-feed.js +1 -1
  4. package/dist/cdn/components/ai-chat.js +9 -6
  5. package/dist/cdn/components/ai-summary.js +4 -2
  6. package/dist/cdn/components/analytics-panel.js +19 -21
  7. package/dist/cdn/components/audio-player.js +17 -7
  8. package/dist/cdn/components/audio-visualizer.js +3 -3
  9. package/dist/cdn/components/author-index.js +2 -2
  10. package/dist/cdn/components/brand-mark.js +1 -1
  11. package/dist/cdn/components/bread-crumb.js +1 -1
  12. package/dist/cdn/components/calendar-wc.js +2 -2
  13. package/dist/cdn/components/card-list.js +1 -1
  14. package/dist/cdn/components/carousel-wc.js +1 -1
  15. package/dist/cdn/components/change-set.js +1 -11
  16. package/dist/cdn/components/chart-wc.js +32 -32
  17. package/dist/cdn/components/chat-input.js +1 -1
  18. package/dist/cdn/components/chat-window.js +1 -1
  19. package/dist/cdn/components/color-picker.js +1 -1
  20. package/dist/cdn/components/combo-box.js +1 -1
  21. package/dist/cdn/components/command-palette.js +1 -1
  22. package/dist/cdn/components/comment-box.js +49 -49
  23. package/dist/cdn/components/comment-thread.js +32 -32
  24. package/dist/cdn/components/comment-wc.js +1 -1
  25. package/dist/cdn/components/compare-surface.js +1 -1
  26. package/dist/cdn/components/consent-banner.js +1 -1
  27. package/dist/cdn/components/content-lens.js +1 -1
  28. package/dist/cdn/components/content-swap.js +1 -1
  29. package/dist/cdn/components/context-menu.js +1 -1
  30. package/dist/cdn/components/data-table.js +1 -1
  31. package/dist/cdn/components/date-picker.js +1 -1
  32. package/dist/cdn/components/day-view.js +1 -1
  33. package/dist/cdn/components/diagram-wc.js +2 -2
  34. package/dist/cdn/components/drag-surface.js +1 -1
  35. package/dist/cdn/components/drop-down.js +1 -1
  36. package/dist/cdn/components/emoji-picker.js +1 -1
  37. package/dist/cdn/components/flow-diagram.js +1 -1
  38. package/dist/cdn/components/foot-notes.js +1 -1
  39. package/dist/cdn/components/form-field.js +1 -1
  40. package/dist/cdn/components/geo-map.js +4 -4
  41. package/dist/cdn/components/glossary-index.js +1 -1
  42. package/dist/cdn/components/glossary-wc.js +1 -1
  43. package/dist/cdn/components/heading-links.js +1 -1
  44. package/dist/cdn/components/highlight-wc.js +2 -2
  45. package/dist/cdn/components/image-gallery.js +1 -1
  46. package/dist/cdn/components/image-map.js +1 -1
  47. package/dist/cdn/components/include-file.js +1 -1
  48. package/dist/cdn/components/manifest.json +100 -100
  49. package/dist/cdn/components/markdown-editor.js +1 -1
  50. package/dist/cdn/components/markdown-viewer.js +11 -11
  51. package/dist/cdn/components/nav-bar.js +1 -1
  52. package/dist/cdn/components/note-wc.js +2 -2
  53. package/dist/cdn/components/notification-wc.js +4 -4
  54. package/dist/cdn/components/page-info.js +2 -2
  55. package/dist/cdn/components/page-stats.js +1 -1
  56. package/dist/cdn/components/page-toc.js +1 -1
  57. package/dist/cdn/components/page-tools.js +1 -1
  58. package/dist/cdn/components/page-tour.js +5 -5
  59. package/dist/cdn/components/pager-wc.js +1 -1
  60. package/dist/cdn/components/poll-wc.js +1 -1
  61. package/dist/cdn/components/pop-over.js +1 -1
  62. package/dist/cdn/components/popularity-index.js +4 -4
  63. package/dist/cdn/components/print-page.js +1 -1
  64. package/dist/cdn/components/progress-tracker.js +1 -1
  65. package/dist/cdn/components/qr-code.js +1 -1
  66. package/dist/cdn/components/reaction-bar.js +1 -1
  67. package/dist/cdn/components/reader-view.js +3 -3
  68. package/dist/cdn/components/reading-progress.js +1 -1
  69. package/dist/cdn/components/recently-visited.js +7 -7
  70. package/dist/cdn/components/score-card.js +2 -2
  71. package/dist/cdn/components/selection-menu.js +1 -1
  72. package/dist/cdn/components/settings-panel.js +4 -4
  73. package/dist/cdn/components/share-wc.js +2 -2
  74. package/dist/cdn/components/short-cuts.js +1 -1
  75. package/dist/cdn/components/site-index.js +6 -6
  76. package/dist/cdn/components/site-map.js +1 -1
  77. package/dist/cdn/components/site-search.js +3 -3
  78. package/dist/cdn/components/slide-accept.js +1 -1
  79. package/dist/cdn/components/social-embed.js +1 -1
  80. package/dist/cdn/components/split-surface.js +1 -1
  81. package/dist/cdn/components/star-rating.js +1 -1
  82. package/dist/cdn/components/status-wc.js +1 -1
  83. package/dist/cdn/components/stepper-wc.js +1 -1
  84. package/dist/cdn/components/tab-set.js +1 -1
  85. package/dist/cdn/components/text-reader.js +2 -2
  86. package/dist/cdn/components/theme-picker.js +44 -44
  87. package/dist/cdn/components/time-index.js +2 -2
  88. package/dist/cdn/components/time-picker.js +1 -1
  89. package/dist/cdn/components/toast-msg.js +1 -1
  90. package/dist/cdn/components/tool-tip.js +1 -1
  91. package/dist/cdn/components/topic-map.js +3 -3
  92. package/dist/cdn/components/trust-filter.js +3 -3
  93. package/dist/cdn/components/version-switcher.js +3 -13
  94. package/dist/cdn/components/video-player.js +1 -1
  95. package/dist/cdn/components/watch-wc.js +2 -2
  96. package/dist/cdn/components/week-view.js +1 -1
  97. package/dist/cdn/components/youtube-player.js +1 -1
  98. package/dist/cdn/packs/effects.full.js +1 -1
  99. package/dist/cdn/packs/kawaii.effects.css +1 -1
  100. package/dist/cdn/packs/kawaii.full.css +1 -1
  101. package/dist/cdn/packs/kawaii.full.js +4 -4
  102. package/dist/cdn/packs/manifest.json +7 -7
  103. package/dist/cdn/packs/memphis.full.css +1 -1
  104. package/dist/cdn/packs/memphis.theme.css +1 -1
  105. package/dist/cdn/packs/ui.full.js +46 -46
  106. package/dist/cdn/themes/8bit.css +1 -1
  107. package/dist/cdn/themes/8bit.tokens.json +1 -1
  108. package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
  109. package/dist/cdn/themes/alpha1999.tokens.json +1 -1
  110. package/dist/cdn/themes/art-deco-dark.tokens.json +33 -1
  111. package/dist/cdn/themes/art-deco.css +1 -1
  112. package/dist/cdn/themes/art-deco.tokens.json +23 -1
  113. package/dist/cdn/themes/bauhaus-dark.tokens.json +23 -1
  114. package/dist/cdn/themes/bauhaus.css +1 -1
  115. package/dist/cdn/themes/bauhaus.tokens.json +1 -1
  116. package/dist/cdn/themes/brutalist-dark.tokens.json +33 -1
  117. package/dist/cdn/themes/brutalist.css +1 -1
  118. package/dist/cdn/themes/brutalist.tokens.json +23 -1
  119. package/dist/cdn/themes/catppuccin-frappe.tokens.json +1 -1
  120. package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +1 -1
  121. package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
  122. package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
  123. package/dist/cdn/themes/catppuccin-mocha.tokens.json +1 -1
  124. package/dist/cdn/themes/classic-dark.tokens.json +1 -1
  125. package/dist/cdn/themes/classic.tokens.json +1 -1
  126. package/dist/cdn/themes/claymorphism-dark.tokens.json +33 -1
  127. package/dist/cdn/themes/claymorphism.css +1 -1
  128. package/dist/cdn/themes/claymorphism.tokens.json +23 -1
  129. package/dist/cdn/themes/clinical-dark.tokens.json +1 -1
  130. package/dist/cdn/themes/clinical.tokens.json +1 -1
  131. package/dist/cdn/themes/cottagecore-dark.tokens.json +1 -1
  132. package/dist/cdn/themes/cottagecore.css +1 -1
  133. package/dist/cdn/themes/cottagecore.tokens.json +1 -1
  134. package/dist/cdn/themes/cyber.css +1 -1
  135. package/dist/cdn/themes/cyber.tokens.json +1 -1
  136. package/dist/cdn/themes/dawn-dark.tokens.json +33 -1
  137. package/dist/cdn/themes/dawn.css +1 -1
  138. package/dist/cdn/themes/dawn.tokens.json +23 -1
  139. package/dist/cdn/themes/dracula.tokens.json +1 -1
  140. package/dist/cdn/themes/dusk.css +1 -1
  141. package/dist/cdn/themes/dusk.tokens.json +1 -1
  142. package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
  143. package/dist/cdn/themes/editorial.css +1 -1
  144. package/dist/cdn/themes/editorial.tokens.json +1 -1
  145. package/dist/cdn/themes/financial-dark.tokens.json +1 -1
  146. package/dist/cdn/themes/financial.tokens.json +1 -1
  147. package/dist/cdn/themes/genai.css +1 -1
  148. package/dist/cdn/themes/genai.tokens.json +1 -1
  149. package/dist/cdn/themes/glassmorphism-dark.tokens.json +1 -1
  150. package/dist/cdn/themes/glassmorphism.tokens.json +1 -1
  151. package/dist/cdn/themes/government-dark.tokens.json +1 -1
  152. package/dist/cdn/themes/government.tokens.json +1 -1
  153. package/dist/cdn/themes/gruvbox-dark.tokens.json +1 -1
  154. package/dist/cdn/themes/gruvbox.tokens.json +1 -1
  155. package/dist/cdn/themes/high-noon-dark.tokens.json +23 -1
  156. package/dist/cdn/themes/high-noon.css +1 -1
  157. package/dist/cdn/themes/high-noon.tokens.json +1 -1
  158. package/dist/cdn/themes/journal-dark.tokens.json +33 -1
  159. package/dist/cdn/themes/journal.css +1 -1
  160. package/dist/cdn/themes/journal.tokens.json +23 -1
  161. package/dist/cdn/themes/kawaii-dark.tokens.json +1 -1
  162. package/dist/cdn/themes/kawaii.css +1 -1
  163. package/dist/cdn/themes/kawaii.tokens.json +1 -1
  164. package/dist/cdn/themes/magna-dark.tokens.json +1 -1
  165. package/dist/cdn/themes/magna.tokens.json +1 -1
  166. package/dist/cdn/themes/manifest.json +26 -50
  167. package/dist/cdn/themes/midnight.tokens.json +1 -1
  168. package/dist/cdn/themes/minimal-dark.tokens.json +1 -1
  169. package/dist/cdn/themes/minimal.tokens.json +1 -1
  170. package/dist/cdn/themes/modern-dark.tokens.json +1 -1
  171. package/dist/cdn/themes/modern.tokens.json +1 -1
  172. package/dist/cdn/themes/nes-dark.tokens.json +1 -1
  173. package/dist/cdn/themes/nes.css +1 -1
  174. package/dist/cdn/themes/nes.tokens.json +1 -1
  175. package/dist/cdn/themes/neumorphism-dark.tokens.json +1 -1
  176. package/dist/cdn/themes/neumorphism.css +1 -1
  177. package/dist/cdn/themes/neumorphism.tokens.json +1 -1
  178. package/dist/cdn/themes/nord-dark.tokens.json +33 -1
  179. package/dist/cdn/themes/nord.css +1 -1
  180. package/dist/cdn/themes/nord.tokens.json +23 -1
  181. package/dist/cdn/themes/organic-dark.tokens.json +1 -1
  182. package/dist/cdn/themes/organic.css +1 -1
  183. package/dist/cdn/themes/organic.tokens.json +1 -1
  184. package/dist/cdn/themes/rose-pine-dark.tokens.json +1 -1
  185. package/dist/cdn/themes/rose-pine.tokens.json +1 -1
  186. package/dist/cdn/themes/rough-dark.tokens.json +1 -1
  187. package/dist/cdn/themes/rough.css +1 -1
  188. package/dist/cdn/themes/rough.tokens.json +1 -1
  189. package/dist/cdn/themes/solarized-dark.tokens.json +23 -1
  190. package/dist/cdn/themes/solarized.css +1 -1
  191. package/dist/cdn/themes/solarized.tokens.json +23 -1
  192. package/dist/cdn/themes/startup-dark.tokens.json +1 -1
  193. package/dist/cdn/themes/startup.tokens.json +1 -1
  194. package/dist/cdn/themes/super2026-dark.tokens.json +33 -1
  195. package/dist/cdn/themes/super2026.css +1 -1
  196. package/dist/cdn/themes/super2026.tokens.json +23 -1
  197. package/dist/cdn/themes/swiss-dark.tokens.json +1 -1
  198. package/dist/cdn/themes/swiss.css +1 -1
  199. package/dist/cdn/themes/swiss.tokens.json +1 -1
  200. package/dist/cdn/themes/terminal.css +1 -1
  201. package/dist/cdn/themes/terminal.tokens.json +1 -1
  202. package/dist/cdn/themes/tokyo-night-dark.tokens.json +33 -1
  203. package/dist/cdn/themes/tokyo-night.css +1 -1
  204. package/dist/cdn/themes/tokyo-night.tokens.json +23 -1
  205. package/dist/cdn/themes/vaporwave-dark.tokens.json +33 -1
  206. package/dist/cdn/themes/vaporwave.css +1 -1
  207. package/dist/cdn/themes/vaporwave.tokens.json +23 -1
  208. package/dist/cdn/themes/win9x-dark.tokens.json +15 -4
  209. package/dist/cdn/themes/win9x.css +1 -1
  210. package/dist/cdn/themes/win9x.tokens.json +1 -1
  211. package/dist/cdn/vanilla-breeze-autoload.js +663 -0
  212. package/dist/cdn/vanilla-breeze-charts.css +1 -1
  213. package/dist/cdn/vanilla-breeze-charts.js +32 -32
  214. package/dist/cdn/vanilla-breeze-core.css +1 -1
  215. package/dist/cdn/vanilla-breeze-core.js +78 -80
  216. package/dist/cdn/vanilla-breeze-dev.css +1 -1
  217. package/dist/cdn/vanilla-breeze-extras.js +47 -37
  218. package/dist/cdn/vanilla-breeze.css +1 -1
  219. package/dist/cdn/vanilla-breeze.js +180 -177
  220. package/package.json +12 -7
  221. package/dist/cdn/themes/amber.css +0 -2
  222. package/dist/cdn/themes/anthropic.css +0 -2
  223. package/dist/cdn/themes/anthropic.tokens.json +0 -564
  224. package/dist/cdn/themes/coral.css +0 -2
  225. package/dist/cdn/themes/emerald.css +0 -2
  226. package/dist/cdn/themes/forest.css +0 -2
  227. package/dist/cdn/themes/ibm.css +0 -2
  228. package/dist/cdn/themes/ibm.tokens.json +0 -568
  229. package/dist/cdn/themes/indigo.css +0 -2
  230. package/dist/cdn/themes/lavender.css +0 -2
  231. package/dist/cdn/themes/mcdonalds.css +0 -2
  232. package/dist/cdn/themes/mcdonalds.tokens.json +0 -533
  233. package/dist/cdn/themes/ocean.css +0 -2
  234. package/dist/cdn/themes/rose.css +0 -2
  235. package/dist/cdn/themes/slate.css +0 -2
  236. package/dist/cdn/themes/starbucks.css +0 -2
  237. package/dist/cdn/themes/starbucks.tokens.json +0 -593
  238. package/dist/cdn/themes/sunset.css +0 -2
@@ -1,5 +1,5 @@
1
- var Wl=Object.defineProperty;var w=(e,t)=>()=>(e&&(t=e(e=0)),t);var A=(e,t)=>{for(var i in t)Wl(e,i,{get:t[i],enumerable:!0})};function Zl(){let e=globalThis.localStorage;if(!e)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return e.getItem(t)},async setRaw(t,i){e.setItem(t,i)},async removeRaw(t){e.removeItem(t)},async keys(t){let i=[];for(let s=0;s<e.length;s++){let n=e.key(s);n&&n.startsWith(t)&&i.push(n)}return i}}}function G(){return ee||(ee=Zl()),ee}function Ke(e,t){if(typeof e!="string"||!e)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${e}:${t}`}function Nr(e){if(typeof e!="string"||!e)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${e}:`}function Mr(e){try{let t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var ee,S,X=w(()=>{ee=null;S={configure(e={}){ee=e.backend??null},async set(e,t,i){let s={data:i,timestamp:Date.now()};await G().setRaw(Ke(e,t),JSON.stringify(s))},async get(e,t,i){let s=await G().getRaw(Ke(e,t));if(s==null)return null;let n=Mr(s);return!n||i?.maxAge!=null&&Date.now()-n.timestamp>i.maxAge?null:n.data},async remove(e,t){await G().removeRaw(Ke(e,t))},async list(e){let t=Nr(e),i=await G().keys(t),s=[];for(let n of i){let r=await G().getRaw(n);if(r==null)continue;let a=Mr(r);a&&s.push({key:n.slice(t.length),data:a.data,timestamp:a.timestamp})}return s},async clear(e){let t=Nr(e),i=await G().keys(t);for(let s of i)await G().removeRaw(s)},async clearAll(){let e=await G().keys("vb:");for(let t of e)await G().removeRaw(t)},async setMany(e,t){for(let[i,s]of t)await S.set(e,i,s)}}});var Ur={};A(Ur,{copyRich:()=>od,copyText:()=>nt,initCopyButtons:()=>hi,pasteFromClipboard:()=>Vr});async function nt(e,t={}){if(e==null||e==="")return!1;let{button:i,announceMessage:s=zr,duration:n=1500}=t;try{await navigator.clipboard.writeText(e)}catch{return!1}return pi({button:i,duration:n,announceMessage:s,eventDetail:{text:e}}),!0}async function od(e,t={}){let{text:i,html:s,blob:n}=e??{};if(!i&&!s&&!n)return!1;let{button:r,announceMessage:a=zr,duration:o=1500}=t;if(typeof ClipboardItem<"u"&&typeof navigator.clipboard?.write=="function"){let d={};i&&(d["text/plain"]=new Blob([i],{type:"text/plain"})),s&&(d["text/html"]=new Blob([s],{type:"text/html"})),n&&(d[n.type]=n);try{return await navigator.clipboard.write([new ClipboardItem(d)]),pi({button:r,duration:o,announceMessage:a,eventDetail:{payload:e}}),!0}catch{}}return i?nt(i,t):!1}function pi({button:e,duration:t,announceMessage:i,eventDetail:s,state:n="copied",eventName:r="copy"}){if(e){e.dataset.state=n;let a=di.get(e);a&&clearTimeout(a),di.set(e,setTimeout(()=>{delete e.dataset.state,di.delete(e)},t)),e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:s}))}ld(i,e??document.body)}async function Vr(e,t={}){let{button:i,announceMessage:s=ad,duration:n=1500}=t,r;try{r=await navigator.clipboard.readText()}catch{return null}return e&&("value"in e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)?e.value=r:e.textContent=r,e.dispatchEvent(new Event("input",{bubbles:!0}))),pi({button:i,duration:n,announceMessage:s,eventDetail:{text:r},state:"pasted",eventName:"paste"}),r}function hi(e=document){e.querySelectorAll(ui).forEach(fi)}function fi(e){e.hasAttribute("data-copy-init")||(e.setAttribute("data-copy-init",""),e.addEventListener("click",()=>{if(e.dataset.pasteTarget){let i=document.querySelector(e.dataset.pasteTarget);if(!i)return;Vr(i,{button:e});return}let t=cd(e);t&&nt(t,{button:e})}))}function cd(e){if(e.dataset.copy)return e.dataset.copy;if(e.dataset.copyTarget){let t=document.querySelector(e.dataset.copyTarget);if(!t)return"";let i=e.dataset.copyAttr;return i?t.getAttribute(i)??"":t.textContent??""}return""}function ld(e,t){let i=document.createElement("div");i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.className="visually-hidden",i.textContent=e,t.appendChild(i),setTimeout(()=>i.remove(),1e3)}var ui,zr,ad,di,dd,Nt=w(()=>{ui="[data-copy], [data-copy-target], [data-paste-target]",zr="Copied to clipboard",ad="Pasted from clipboard",di=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>hi()):hi();dd=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(ui)&&fi(s),s.querySelectorAll(ui).forEach(n=>fi(n))}});dd.observe(document.documentElement,{childList:!0,subtree:!0})});function Wr(e){let t=ft?Mt.mac:Mt.other;return e.split("+").map(i=>{let s=i.trim().toLowerCase();return t[s]??s.toUpperCase()}).join(ft?"":"+")}function jr(e){let t=e.toLowerCase().split("+").map(s=>s.trim());return{key:t.pop()??"",meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt")}}function Yr(e,t){if(e.key.toLowerCase()!==t.key)return!1;let i,s;return ft?(i=t.meta,s=t.ctrl):(i=!1,s=t.meta||t.ctrl),!(i!==e.metaKey||s!==e.ctrlKey||t.shift!==e.shiftKey||t.alt!==e.altKey)}var ft,Mt,ae=w(()=>{ft=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),Mt={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",shift:"\u21E7",ctrl:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",shift:"Shift",ctrl:"Ctrl"}}});function hd(e){let t=ud.has(e.target.tagName)||e.target.isContentEditable;for(let i of pt)if(!(t&&!i.global)&&Yr(e,i.descriptor)){e.preventDefault(),i.callback(e);return}}function fd(){Gr||(document.addEventListener("keydown",hd),Gr=!0)}function mt(e,t,i={}){fd();let s=jr(e),n={combo:e,descriptor:s,callback:t,global:i.global===!0};return pt.find(a=>a.combo===e)&&console.warn(`[hotkey-bind] Shortcut "${e}" already bound. Last-connected-wins.`),pt.unshift(n),function(){let o=pt.indexOf(n);o!==-1&&pt.splice(o,1)}}function Kr(){return pt.map(e=>e.combo)}var ud,pt,Gr,oe=w(()=>{ae();ud=new Set(["INPUT","TEXTAREA","SELECT"]),pt=[],Gr=!1});var Ci={};A(Ci,{addDialogDismiss:()=>aa,addFlickListener:()=>sa,addLongPress:()=>ra,addPullToRefresh:()=>Ad,addSwipeListener:()=>ia,haptic:()=>de,initGestures:()=>oa,makeSwipeable:()=>na});function ia(e,t={}){let i=t.threshold??50,s=t.restraint??100,n=t.timeout??300,r=t.velocity??.5,a=t.minFlickDistance??10,o,c,d;function l(h){h.isPrimary&&(o=h.clientX,c=h.clientY,d=Date.now())}function u(h){if(!h.isPrimary)return;let f=h.clientX-o,v=h.clientY-c,p=Date.now()-d;if(p>n)return;let m=Math.abs(f),y=Math.abs(v),k=Math.max(m,y),L=p>0?k/p:0,V=L>=r&&k>=a,Y;if((m>=i||V&&m>y)&&y<=s?Y=f<0?"left":"right":(y>=i||V&&y>m)&&m<=s&&(Y=v<0?"up":"down"),Y){let Qt=Y==="left"||Y==="right"?m:y;e.dispatchEvent(new CustomEvent(`swipe-${Y}`,{bubbles:!0,detail:{distance:Qt,duration:p,velocity:L,flick:V}}))}}return e.addEventListener("pointerdown",l,{passive:!0}),e.addEventListener("pointerup",u,{passive:!0}),()=>{e.removeEventListener("pointerdown",l),e.removeEventListener("pointerup",u)}}function sa(e,t={}){let i=t.minDistance??10,s=t.velocity??.6,n=t.timeout??250,r=t.restraint??80,a,o,c;function d(u){u.isPrimary&&(a=u.clientX,o=u.clientY,c=Date.now())}function l(u){if(!u.isPrimary)return;let h=u.clientX-a,f=u.clientY-o,v=Date.now()-c;if(v===0||v>n)return;let p=Math.abs(h),m=Math.abs(f),y=Math.max(p,m);if(y<i)return;let k=y/v;if(k<s)return;let L;if(p>m&&m<=r?L=h<0?"left":"right":m>p&&p<=r&&(L=f<0?"up":"down"),L){let V=L==="left"||L==="right"?p:m;e.dispatchEvent(new CustomEvent(`swipe-${L}`,{bubbles:!0,detail:{distance:V,duration:v,velocity:k,flick:!0}}))}}return e.addEventListener("pointerdown",d,{passive:!0}),e.addEventListener("pointerup",l,{passive:!0}),()=>{e.removeEventListener("pointerdown",d),e.removeEventListener("pointerup",l)}}function na(e,t={}){let i=t.threshold??100,s=t.direction??"horizontal",n=t.removeOnDismiss??!0,r=s==="horizontal",a=0,o=0,c=!1;function d(p){!p.isPrimary||e.hasAttribute("data-dismissed")||(p.preventDefault(),c=!0,a=r?p.clientX:p.clientY,o=0,e.setPointerCapture(p.pointerId),e.setAttribute("data-swiping",""))}function l(p){if(!c||!p.isPrimary)return;o=(r?p.clientX:p.clientY)-a;let y=1-Math.min(Math.abs(o)/i,1)*.5;r?e.style.transform=`translateX(${o}px)`:e.style.transform=`translateY(${o}px)`,e.style.opacity=String(y)}function u(p){!c||!p.isPrimary||(c=!1,e.releasePointerCapture(p.pointerId),e.removeAttribute("data-swiping"),Math.abs(o)>=i?f(o>0?"right":"left"):v())}function h(p){!c||!p.isPrimary||(c=!1,e.releasePointerCapture(p.pointerId),e.removeAttribute("data-swiping"),v())}function f(p){let m=p==="right"?"100%":"-100%";e.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",e.style.transform=r?`translateX(${m})`:`translateY(${m})`,e.style.opacity="0",e.setAttribute("data-dismissed",""),de.dismiss(),e.dispatchEvent(new CustomEvent("swipe-dismiss",{bubbles:!0,detail:{direction:p,distance:Math.abs(o)}})),n&&e.addEventListener("transitionend",()=>e.remove(),{once:!0})}function v(){e.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",e.style.transform="",e.style.opacity="",e.addEventListener("transitionend",()=>{e.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",d),e.addEventListener("pointermove",l),e.addEventListener("pointerup",u),e.addEventListener("pointercancel",h),()=>{e.removeEventListener("pointerdown",d),e.removeEventListener("pointermove",l),e.removeEventListener("pointerup",u),e.removeEventListener("pointercancel",h)}}function Ad(e,t,i={}){let s=i.threshold??70,n=i.maxPull??120,r=document.createElement("div");r.setAttribute("data-pull-indicator",""),r.setAttribute("aria-hidden","true");let a=document.createElement("div");a.setAttribute("data-pull-spinner",""),r.appendChild(a),e.prepend(r);let o=0,c=!1,d=!1;function l(m){!m.isPrimary||d||e.scrollTop<=0&&(o=m.clientY,c=!0)}function u(m){if(!c||!m.isPrimary||d)return;let y=m.clientY-o;if(y<=0){r.style.transform="",r.style.opacity="";return}let k=Math.min(y,n),L=k/s;r.style.transform=`translateY(${k}px)`,r.style.opacity=String(Math.min(L,1)),L>=1?r.setAttribute("data-pull-ready",""):r.removeAttribute("data-pull-ready")}function h(m){!c||!m.isPrimary||(c=!1,r.hasAttribute("data-pull-ready")&&!d?v():p())}function f(m){!c||!m.isPrimary||(c=!1,p())}async function v(){d=!0,r.removeAttribute("data-pull-ready"),r.setAttribute("data-pull-loading",""),r.style.transform=`translateY(${s}px)`,r.style.opacity="1";try{await t()}finally{d=!1,r.removeAttribute("data-pull-loading"),p()}}function p(){r.style.transition="transform 0.3s ease, opacity 0.3s ease",r.style.transform="",r.style.opacity="",r.removeAttribute("data-pull-ready"),r.addEventListener("transitionend",()=>{r.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",l,{passive:!0}),e.addEventListener("pointermove",u,{passive:!0}),e.addEventListener("pointerup",h,{passive:!0}),e.addEventListener("pointercancel",f,{passive:!0}),()=>{e.removeEventListener("pointerdown",l),e.removeEventListener("pointermove",u),e.removeEventListener("pointerup",h),e.removeEventListener("pointercancel",f),r.remove()}}function ra(e,t,i={}){let s=i.duration??500,n=i.hapticFeedback??!0,r=i.blockContextMenu??!0,a=null;function o(l){l.isPrimary&&(a=setTimeout(()=>{n&&de.tap(),t(l),a=null},s))}function c(){a&&(clearTimeout(a),a=null)}function d(l){r&&l.preventDefault()}return e.addEventListener("pointerdown",o,{passive:!0}),e.addEventListener("pointermove",c,{passive:!0}),e.addEventListener("pointerup",c,{passive:!0}),e.addEventListener("pointercancel",c,{passive:!0}),e.addEventListener("contextmenu",d),()=>{c(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointermove",c),e.removeEventListener("pointerup",c),e.removeEventListener("pointercancel",c),e.removeEventListener("contextmenu",d)}}function aa(e,t={}){let i=t.threshold??80,s=0,n=0,r=!1;function a(h){if(!h.isPrimary||!e.open)return;let f=h.target;f.closest("a, button, input, select, textarea, [contenteditable]")&&!f.closest("header")||(r=!0,s=h.clientY,n=0,e.setPointerCapture(h.pointerId),e.style.transition="none")}function o(h){if(!r||!h.isPrimary)return;if(n=h.clientY-s,n<=0){e.style.transform="",e.style.opacity="";return}let v=1-Math.min(n/i,1)*.4;e.style.transform=`translateY(${n}px)`,e.style.opacity=String(v)}function c(h){!r||!h.isPrimary||(r=!1,e.releasePointerCapture(h.pointerId),n>=i?l():u())}function d(h){!r||!h.isPrimary||(r=!1,e.releasePointerCapture(h.pointerId),u())}function l(){e.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",e.style.transform="translateY(100%)",e.style.opacity="0",de.dismiss(),e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform="",e.style.opacity="",e.close("dismiss")},{once:!0})}function u(){e.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",e.style.transform="",e.style.opacity="",e.addEventListener("transitionend",()=>{e.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",a),e.addEventListener("pointermove",o),e.addEventListener("pointerup",c),e.addEventListener("pointercancel",d),()=>{e.removeEventListener("pointerdown",a),e.removeEventListener("pointermove",o),e.removeEventListener("pointerup",c),e.removeEventListener("pointercancel",d)}}function oa(e=document){let t=[];for(let i of e.querySelectorAll('[data-gesture="swipe"]'))t.push(ia(i));for(let i of e.querySelectorAll('[data-gesture="flick"]'))t.push(sa(i));for(let i of e.querySelectorAll('[data-gesture="dismiss"]'))t.push(na(i));for(let i of e.querySelectorAll('[data-gesture="long-press"]'))t.push(ra(i,()=>{i.dispatchEvent(new CustomEvent("long-press",{bubbles:!0}))}));for(let i of e.querySelectorAll('dialog[data-gesture="dismiss-down"]'))t.push(aa(i));return()=>t.forEach(i=>i())}var de,xi,ki=w(()=>{de={tap:()=>navigator.vibrate?.(8),confirm:()=>navigator.vibrate?.([8,40,8]),error:()=>navigator.vibrate?.([30,60,30]),dismiss:()=>navigator.vibrate?.(15)};xi=typeof document<"u"?document.documentElement:null;(!xi||!xi.hasAttribute("data-vb-gestures-init"))&&(xi?.setAttribute("data-vb-gestures-init",""),oa())});var ge={};A(ge,{destroyStickyManager:()=>Qd,initStickyManager:()=>ji});function ot(){let e=document.documentElement;if(!e.hasAttribute("data-sticky"))return;let t=document.querySelector("header");t&&!t.hasAttribute("data-sticky")&&(t.dataset.sticky="",Wi=!0);let i=document.querySelector("header[data-sticky]"),s=i?i.getBoundingClientRect().height:0;e.style.setProperty("--sticky-offset",`${s}px`)}function Aa(){ot()}function ji(){if(be)return;be=!0,ot(),requestAnimationFrame(ot),document.fonts?.ready?.then(ot),window.addEventListener("resize",ot,{passive:!0}),document.addEventListener("toggle",Aa,!0),Ui=new ResizeObserver(ot);let e=document.querySelector("header[data-sticky]");e&&Ui.observe(e)}function Qd(){if(be){if(be=!1,window.removeEventListener("resize",ot),document.removeEventListener("toggle",Aa,!0),Ui?.disconnect(),Wi){let e=document.querySelector("header[data-sticky]");e&&delete e.dataset.sticky,Wi=!1}document.documentElement.style.removeProperty("--sticky-offset")}}var be,Ui,Wi,qt=w(()=>{be=!1,Wi=!1});var xa={};A(xa,{SoundManager:()=>tu});var Sa,Yi,tu,Ca=w(()=>{Sa="vb-sound",Yi={enabled:!1,volume:.5},tu={_ctx:null,_enabled:!1,_volume:.5,_initialized:!1,init(){if(this._initialized)return this;let e=this._load();return this._enabled=e.enabled,this._volume=e.volume,this._initialized=!0,this},_getContext(){return this._ctx||(this._ctx=new(window.AudioContext||window.webkitAudioContext)),this._ctx.state==="suspended"&&this._ctx.resume(),this._ctx},_load(){try{let e=localStorage.getItem(Sa);return e?{...Yi,...JSON.parse(e)}:{...Yi}}catch{return{...Yi}}},_save(e){try{let t=this._load();localStorage.setItem(Sa,JSON.stringify({...t,...e}))}catch{}},_playTone(e,t,i="sine"){if(!this._enabled)return;let s=this._getContext(),n=s.createOscillator(),r=s.createGain();n.connect(r),r.connect(s.destination),n.frequency.value=e,n.type=i,r.gain.value=this._volume*.3,n.start(),r.gain.exponentialRampToValueAtTime(.01,s.currentTime+t),n.stop(s.currentTime+t)},enable(){this._enabled=!0,this._save({enabled:!0}),this.play("click")},disable(){this._enabled=!1,this._save({enabled:!1})},toggle(){return this._enabled?this.disable():this.enable(),this._enabled},isEnabled(){return this._enabled},setVolume(e){this._volume=Math.max(0,Math.min(1,e)),this._save({volume:this._volume})},getVolume(){return this._volume},play(e){if(this._enabled)switch(e){case"click":this._playTone(800,.1);break;case"success":this._playTone(523,.1),setTimeout(()=>this._playTone(659,.1),100),setTimeout(()=>this._playTone(784,.15),200);break;case"error":this._playTone(200,.15,"sawtooth"),setTimeout(()=>this._playTone(180,.2,"sawtooth"),150);break;case"notification":this._playTone(880,.1),setTimeout(()=>this._playTone(1100,.15),100);break;case"soft":this._playTone(600,.05);break;case"tick":this._playTone(1200,.02,"square");break}},getState(){return{enabled:this._enabled,volume:this._volume}}}});function eu(e,t){if(!t)return e;let i=e??new URLSearchParams;for(let[s,n]of Object.entries(t))n!=null&&i.set(s,String(n));return i}async function iu(e){if((e.headers.get("content-type")??"").includes("application/json"))try{return await e.json()}catch{return null}try{return await e.text()}catch{return null}}function ka(e){return e.endsWith("/")?e.slice(0,-1):e}var W,I,z,Bt=w(()=>{W={baseUrl:"/go",headers:{},services:{}},I=class extends Error{constructor(t,i,s,n){super(`VBService(${s}): ${t} ${n}`),this.name="VBServiceError",this.status=t,this.body=i,this.role=s,this.path=n}};z=class e{static configure(t={}){W={baseUrl:t.baseUrl??W.baseUrl,headers:{...W.headers,...t.headers??{}},services:{...W.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");return W.services[t]?ka(W.services[t]):W.baseUrl?`${ka(W.baseUrl)}/${t}`:`/go/${t}`}static _reset(){W={baseUrl:"/go",headers:{},services:{}}}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,i){return this.#e("GET",t,{params:i})}async post(t,i){return this.#e("POST",t,{body:i})}async patch(t,i){return this.#e("PATCH",t,{body:i})}async delete(t){return this.#e("DELETE",t,{})}async#e(t,i,s){let n=e.resolve(this.role),r=i?i.startsWith("/")?i:`/${i}`:"",a=new URL(`${n}${r}`,globalThis.location?.origin??"http://localhost"),o=eu(a.searchParams,s.params);o&&(a.search=o.toString());let c={method:t,headers:{...W.headers}};s.body!==void 0&&(c.body=JSON.stringify(s.body),c.headers["content-type"]="application/json");let d=a.toString(),l=await fetch(d,c),u=await iu(l);if(!l.ok)throw new I(l.status,u,this.role,`${r||"/"}`);return u}}});function ve(e){let t=2166136261;for(let i=0;i<e.length;i++)t^=e.charCodeAt(i),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function au(){return"hn-"+crypto.randomUUID().slice(0,8)}function ou(e,t){return getComputedStyle(e).getPropertyValue(`--highlight-${t}`).trim()}function cu(e){if(ct){Pt++;return}ct=new CSSStyleSheet;let t=e.map(i=>`::highlight(hn-${i}) { background-color: var(--highlight-${i}); text-decoration-line: underline; text-decoration-color: var(--highlight-${i}); text-underline-offset: 2px; }`).join(`
2
- `);ct.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,ct],Pt=1}function lu(){Pt--,Pt<=0&&ct&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(e=>e!==ct),ct=null,Pt=0)}function Xi(e){tt||(tt=document.createElement("div"),tt.setAttribute("aria-live","polite"),tt.setAttribute("aria-atomic","true"),tt.className="hn-sr-only",document.body.appendChild(tt)),tt.textContent="",requestAnimationFrame(()=>{tt.textContent=e})}function La(e,t,i){let s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=0;for(;s.nextNode();){if(s.currentNode===t)return n+i;n+=(s.currentNode.textContent??"").length}return-1}function wt(e,t,i){let s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=0,r=null,a=0,o=null,c=0;for(;s.nextNode();){let d=s.currentNode,l=(d.textContent??"").length;if(!r&&n+l>t&&(r=d,a=t-n),n+l>=i){o=d,c=i-n;break}n+=l}if(!r||!o)return null;try{let d=document.createRange();return d.setStart(r,Math.min(a,(r.textContent??"").length)),d.setEnd(o,Math.min(c,(o.textContent??"").length)),d}catch{return null}}function ts(e){if(Ji.has(e))return Ji.get(e);let t=new Qi(e);return Ji.set(e,t),t}function Na(e=document){e.querySelectorAll(Zi).forEach(t=>{t.hasAttribute("data-highlights-init")||ts(t)})}var Zi,Ta,nu,ru,ct,Pt,tt,Qi,Ji,du,Ma=w(()=>{X();Zi="[data-highlights]",Ta="highlights",nu=["yellow","green","blue","pink"],ru=typeof CSS<"u"&&"highlights"in CSS;ct=null,Pt=0;tt=null;Qi=class{#e;#t;#i;#s;#r=[];#n=!ru;#a;#c;#o=!1;#f=[];constructor(t){this.#e=t,this.#s=t.hasAttribute("data-highlights-readonly");let i=t.dataset.highlights;this.#t=i&&i!==""?i:location.pathname;let s=t.dataset.highlightsColors;this.#i=s?s.split(",").map(n=>n.trim()).filter(Boolean):[...nu],this.#n||cu(this.#i),this.#d(),this.#s||(this.#a=this.#h.bind(this),this.#c=this.#p.bind(this),t.addEventListener("pointerup",this.#a),t.addEventListener("click",this.#c)),t.setAttribute("data-highlights-init",""),this.#l().then(()=>{this.#o||this.#d()})}get colors(){return[...this.#i]}get element(){return this.#e}getHighlights(){return this.#r.map(t=>({...t}))}removeHighlight(t){let i=this.#r.findIndex(s=>s.id===t);i<0||(this.#r.splice(i,1),this.#m(),this.#d(),this.#g("highlights:removed",{id:t}),Xi("Highlight removed"))}clearAll(){this.#r=[],this.#m(),this.#d()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#r})}importHighlights(t){try{let i=typeof t=="string"?JSON.parse(t):t;if(!i.highlights||!Array.isArray(i.highlights))return;this.#r=i.highlights,this.#m(),this.#d()}catch{}}destroy(){if(!this.#o){if(this.#o=!0,this.#a&&this.#e.removeEventListener("pointerup",this.#a),this.#c&&this.#e.removeEventListener("click",this.#c),this.#n)this.#e.querySelectorAll("mark[data-hn-id]").forEach(t=>{let i=t.parentNode;for(;t.firstChild;)i.insertBefore(t.firstChild,t);i.removeChild(t),i.normalize()});else{for(let t of this.#i)CSS.highlights.delete(`hn-${t}`);lu()}this.#v(),this.#e.removeAttribute("data-highlights-init")}}#h(){requestAnimationFrame(()=>{if(this.#o)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let i=t.getRangeAt(0);this.#e.contains(i.commonAncestorContainer)&&this.#g("highlights:selected",{text:t.toString().trim(),rect:i.getBoundingClientRect()})})}#p(t){let i=t.target.closest?.(".hn-margin-annotation");if(i){let n=i.dataset.hnId,r=this.#r.find(a=>a.id===n);if(r){this.#g("highlights:clicked",{id:n,highlight:{...r}}),this.#g("highlights:request-note",{id:n,highlight:{...r},controller:this});return}}let s=t.target.closest?.("mark[data-hn-id]");if(s){let n=s.dataset.hnId,r=this.#r.find(a=>a.id===n);if(r){this.#g("highlights:clicked",{id:n,highlight:{...r}});return}}if(!this.#n){let n=this.#u(t.clientX,t.clientY);n&&this.#g("highlights:clicked",{id:n.id,highlight:{...n}})}}findHighlightRect(t){let i=this.#r.find(r=>r.id===t);if(!i)return null;let s=wt(this.#e,i.startOffset,i.endOffset);if(!s)return null;let n=s.getClientRects();return n.length?n[0]:null}#u(t,i){for(let s of this.#r){let n=wt(this.#e,s.startOffset,s.endOffset);if(!n)continue;let r=n.getClientRects();for(let a of r)if(t>=a.left&&t<=a.right&&i>=a.top&&i<=a.bottom)return s}return null}_createFromSelection(t){let i=window.getSelection();if(!i||i.isCollapsed)return;let s=i.getRangeAt(0);if(!this.#e.contains(s.commonAncestorContainer))return;let n=La(this.#e,s.startContainer,s.startOffset),r=La(this.#e,s.endContainer,s.endOffset);if(n<0||r<0||n>=r)return;let a=i.toString().trim(),o={id:au(),startOffset:n,endOffset:r,text:a,color:t,note:"",created:Date.now()};this.#r.push(o),this.#m(),this.#d(),i.removeAllRanges(),this.#g("highlights:added",{id:o.id,text:a,color:t,note:""}),Xi("Highlight added")}_changeColor(t,i){let s=this.#r.find(n=>n.id===t);s&&(s.color=i,this.#m(),this.#d())}_updateNote(t,i){let s=this.#r.find(n=>n.id===t);s&&(s.note=i,this.#m(),this.#b(),this.#g("highlights:note-changed",{id:t,note:i}),Xi("Note saved"))}async#l(){let t=await S.get(Ta,this.#t);if(!t||!Array.isArray(t.highlights))return;let i=ve(this.#e.textContent);t.contentHash&&t.contentHash!==i?(this.#r=t.highlights.filter(s=>{let n=wt(this.#e,s.startOffset,s.endOffset);return n?n.toString().trim()===s.text:!1}),this.#m()):this.#r=t.highlights}#m(){let t={version:1,contentHash:ve(this.#e.textContent),highlights:this.#r};S.set(Ta,this.#t,t).catch(()=>{})}#d(){this.#n?this.#w():this.#y(),this.#b()}#y(){let t=new Map;for(let i of this.#i)t.set(i,[]);for(let i of this.#r){let s=wt(this.#e,i.startOffset,i.endOffset);s&&t.has(i.color)&&t.get(i.color).push(s)}for(let[i,s]of t){let n=`hn-${i}`;s.length===0?CSS.highlights.delete(n):CSS.highlights.set(n,new Highlight(...s))}}#w(){this.#e.querySelectorAll("mark[data-hn-id]").forEach(i=>{let s=i.parentNode;for(;i.firstChild;)s.insertBefore(i.firstChild,i);s.removeChild(i)}),this.#e.normalize();let t=[...this.#r].sort((i,s)=>s.startOffset-i.startOffset);for(let i of t){let s=wt(this.#e,i.startOffset,i.endOffset);if(!s)continue;let n=ou(this.#e,i.color),r=document.createElement("mark");r.dataset.hnId=i.id,r.dataset.hnColor=i.color,n&&(r.style.backgroundColor=n,r.style.textDecorationColor=n);try{s.surroundContents(r)}catch{let a=s.extractContents();r.appendChild(a),s.insertNode(r)}}}#v(){for(let t of this.#f)t.remove();this.#f=[]}#b(){if(this.#v(),this.#r.length===0)return;getComputedStyle(this.#e).position==="static"&&(this.#e.style.position="relative");for(let i of this.#r){let s=wt(this.#e,i.startOffset,i.endOffset);if(!s)continue;let n=s.getClientRects();if(n.length===0)continue;let r=n[0],a=this.#e.getBoundingClientRect(),o=r.top-a.top,c=document.createElement("span");c.className="hn-margin-annotation",c.dataset.hnId=i.id,c.setAttribute("aria-hidden","true"),c.style.top=`${o}px`,i.note?(c.innerHTML='<span class="hn-note-indicator">*</span> You highlighted',c.classList.add("hn-has-note")):c.textContent="You highlighted",this.#e.appendChild(c),this.#f.push(c)}}#g(t,i={}){this.#e.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0}))}},Ji=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Na()):Na();du=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Zi)&&ts(s),s.querySelectorAll(Zi).forEach(n=>{n.hasAttribute("data-highlights-init")||ts(n)})}});du.observe(document.documentElement,{childList:!0,subtree:!0})});var os={};A(os,{currentHash:()=>as,initPageWatch:()=>ns,readWatch:()=>ye,removeWatch:()=>Da,writeWatch:()=>Ft});function _a(){return typeof window<"u"&&window.vbPageWatch?.serverSync===!0?!0:document.querySelector('meta[name="vb-page-watch-server"]')?.getAttribute("content")==="true"}async function uu(e){if(!_a())return null;try{let t=new z("notify"),i={url:e.url,type:"page-watch",notify:["panel"]},s=await t.post("/subscribe",i);return typeof s?.id=="string"?s.id:null}catch(t){let i=t instanceof I?`${t.status}`:String(t);return console.warn("[page-watch] server subscribe failed; client-only watch in effect.",i),null}}async function hu(e){if(!(!e||!_a()))try{await new z("notify").delete(`/subscribe/${encodeURIComponent(e)}`)}catch(t){let i=t instanceof I?`${t.status}`:String(t);console.warn("[page-watch] server unsubscribe failed; local state already cleared.",i)}}function fu(){return document.querySelector("main")||document.querySelector("article")||document.body}function Rt(){return location.pathname||"/"}function as(){let e=fu();return e?ve(e.textContent||""):""}function pu(){return document.title||Rt()}async function ye(){return await S.get(rs,Rt())}async function Ft(e){await S.set(rs,Rt(),e)}async function Da(){await S.remove(rs,Rt())}function es(e,t){e.setAttribute("aria-pressed",t?"true":"false"),e.dataset.watching="",t||delete e.dataset.watching;let i=e.querySelector("icon-wc");i&&i.setAttribute("name",t?"bookmark-check":"bookmark");let s=[...e.childNodes].find(n=>n.nodeType===Node.TEXT_NODE&&(n.textContent||"").trim());s&&!e.hasAttribute("data-watch-label-locked")&&(s.textContent=t?"Watching":"Watch for updates"),e.setAttribute("title",t?"Stop watching this page":"Watch this page for content updates")}async function ss(e){if(e.hasAttribute("data-watch-page-init"))return;e.setAttribute("data-watch-page-init",""),e.setAttribute("type",e.getAttribute("type")||"button");let t=await ye();es(e,!!t),e.addEventListener("click",async i=>{i.preventDefault();let s=await ye();if(s)await Da(),es(e,!1),e.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:s.url,subscriptionId:s.subscriptionId}})),hu(s.subscriptionId);else{let n={url:Rt(),title:pu(),contentHash:as(),watchedAt:new Date().toISOString(),lastChecked:new Date().toISOString(),lastChanged:null,subscriptionId:null};await Ft(n),es(e,!0),e.dispatchEvent(new CustomEvent("page-watch:add",{bubbles:!0,composed:!0,detail:{entry:n}}));let r=await uu(n);r&&await Ft({...n,subscriptionId:r})}})}async function mu(){let e=await ye();if(!e)return;let t=as(),i=new Date().toISOString(),s=e.contentHash,n={...e,lastChecked:i};if(t&&t!==s){n.contentHash=t,n.lastChanged=i,await Ft(n);let r={id:`page-watch:${e.url}:${t}`,type:"watch",title:`Updated: ${e.title}`,body:"Content changed since your last visit.",url:e.url,date:i,read:!1,dismissed:!1,priority:"normal"};document.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:r}}))}else await Ft(n)}function ns(e=document){for(let t of e.querySelectorAll(is))ss(t);mu()}var is,rs,bu,cs=w(()=>{X();Bt();Ma();is="[data-watch-page]",rs="watches";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ns()):ns();bu=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(is)&&ss(s),s.querySelectorAll?.(is).forEach(n=>ss(n))}});bu.observe(document.documentElement,{childList:!0,subtree:!0})});var Ua={};A(Ua,{initAll:()=>ws});function ys(e){e.hasAttribute("data-back-to-top-init")||(e.setAttribute("data-back-to-top-init",""),e.toggleAttribute("data-visible",!1),e.addEventListener("click",za),Se.add(e),Mu(),Va())}function Ra(e){e.hasAttribute("data-back-to-top-init")&&(e.removeAttribute("data-back-to-top-init"),e.removeEventListener("click",za),Se.delete(e),Se.size===0&&dt&&(window.removeEventListener("scroll",dt),dt=null))}function Ha(){if(At&&At.isConnected)return At;let e=document.documentElement,t=document.body;if(t&&t.scrollHeight>e.clientHeight+1&&t){let s=getComputedStyle(t);if(/auto|scroll/.test(s.overflowY))return At=t,t}return At=document.scrollingElement||e,At}function za(e){let t=e.currentTarget.getAttribute("href")||"";if(t===""||t==="#"||t==="#top")e.preventDefault();else return;Ha().scrollTo({top:0,left:0,behavior:Nu.matches?"auto":"smooth"})}function Mu(){dt||(dt=()=>{vs||(vs=!0,requestAnimationFrame(()=>{Va(),vs=!1}))},window.addEventListener("scroll",dt,{passive:!0}),document.addEventListener("scroll",dt,{capture:!0,passive:!0}))}function Va(){let t=Ha().scrollTop||window.scrollY,s=window.innerHeight*1,n=t>s,r=t<200;for(let a of Se)a.toggleAttribute("data-visible",n&&!r)}function ws(e=document){e.querySelectorAll(Ut).forEach(ys)}var Ut,Nu,Se,dt,vs,At,_u,Es=w(()=>{Ut="[data-back-to-top]",Nu=matchMedia("(prefers-reduced-motion: reduce)"),Se=new Set,dt=null,vs=!1;At=null;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ws(),{once:!0}):ws();_u=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Ut)&&ys(s),s.querySelectorAll(Ut).forEach(n=>ys(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(Ut)&&Ra(s),s.querySelectorAll?.(Ut).forEach(n=>Ra(n))}}});_u.observe(document.documentElement,{childList:!0,subtree:!0})});function St(){return document.documentElement.lang||navigator.language||"en"}var xe=w(()=>{});var ja={};A(ja,{initFormatNumber:()=>Cs});function Cs(e=document){e.querySelectorAll(xs).forEach(ks)}function ks(e){if(e.hasAttribute("data-format-number-init"))return;e.setAttribute("data-format-number-init","");let t=e.getAttribute("value");if(t==null)return;let i=Number(t);if(isNaN(i))return;e.title||(e.title=e.textContent.trim());let s=e.getAttribute("data-format-number")||"decimal",n=e.getAttribute("data-locale")||St(),r={};switch(s){case"currency":{r.style="currency",r.currency=e.getAttribute("data-currency")||"USD";break}case"percent":r.style="percent";break;case"compact":r.notation="compact";break;default:break}try{e.textContent=new Intl.NumberFormat(n,r).format(i)}catch{}}var xs,Iu,Ts=w(()=>{xe();xs="data[data-format-number]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Cs()):Cs();Iu=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(xs)&&ks(s),s.querySelectorAll(xs).forEach(n=>ks(n))}});Iu.observe(document.documentElement,{childList:!0,subtree:!0})});var Xa={};A(Xa,{initFormatDate:()=>Ls});function Ls(e=document){e.querySelectorAll(Ce).forEach(Ns)}function Ns(e){if(e.hasAttribute("data-format-date-init"))return;e.setAttribute("data-format-date-init","");let t=e.getAttribute("datetime");if(!t)return;let i=new Date(t);if(isNaN(i.getTime()))return;e.title||(e.title=e.textContent.trim());let s=e.getAttribute("data-format-date")||"medium",n=e.getAttribute("data-locale")||St();s==="relative"?(e.textContent=Ga(i,n),Ka(e,i,n)):e.textContent=Ou(i,s,e,n)}function Ou(e,t,i,s){let n=t||"medium",r=i.getAttribute("data-format-time")||void 0;try{let a={dateStyle:n};return r&&(a.timeStyle=r),new Intl.DateTimeFormat(s,a).format(e)}catch{return i.textContent}}function Ga(e,t){let i=Date.now(),s=Math.round((e.getTime()-i)/1e3),n=Math.abs(s),r=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(let{unit:a,seconds:o}of r)if(n>=o){let c=Math.round(s/o);try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(c,a)}catch{let d=Math.abs(c),l=d===1?a:`${a}s`;return c<0?`${d} ${l} ago`:`in ${d} ${l}`}}try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second")}catch{return"just now"}}function Ka(e,t,i){clearInterval(Wt.get(e));let s=Math.abs(Date.now()-t.getTime()),n=36e5,r=864e5,a;s<n?a=6e4:s<r?a=3e5:a=36e5;let o=setInterval(()=>{e.textContent=Ga(t,i),Ka(e,t,i)},a);Wt.set(e,o)}function Ya(e){Wt.has(e)&&(clearInterval(Wt.get(e)),Wt.delete(e))}var Ce,Wt,qu,Ms=w(()=>{xe();Ce="time[data-format-date]",Wt=new Map;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ls()):Ls();qu=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Ce)&&Ns(s),s.querySelectorAll(Ce).forEach(n=>Ns(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;Ya(s),s.querySelectorAll(Ce).forEach(Ya)}}});qu.observe(document.documentElement,{childList:!0,subtree:!0})});var Ja={};A(Ja,{initFormatBytes:()=>Is});function Is(e=document){e.querySelectorAll(Ds).forEach(Os)}function Os(e){if(e.hasAttribute("data-format-bytes-init"))return;e.setAttribute("data-format-bytes-init","");let t=e.getAttribute("value");if(t==null)return;let i=Number(t);if(isNaN(i)||i<0)return;e.title||(e.title=e.textContent.trim());let s=parseInt(e.getAttribute("data-format-bytes")??"0",10)||0,n=e.getAttribute("data-unit")==="decimal",r=e.getAttribute("data-locale")||St(),a=n?1e3:1024;if(i===0){e.textContent="0 B";return}let o=Math.min(Math.floor(Math.log(i)/Math.log(a)),_s.length-1),c=i/Math.pow(a,o);try{let d=new Intl.NumberFormat(r,{minimumFractionDigits:s,maximumFractionDigits:s}).format(c);e.textContent=`${d} ${_s[o]}`}catch{e.textContent=`${c.toFixed(s)} ${_s[o]}`}}var Ds,_s,$u,qs=w(()=>{xe();Ds="data[data-format-bytes]",_s=["B","KB","MB","GB","TB","PB"];document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Is()):Is();$u=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Ds)&&Os(s),s.querySelectorAll(Ds).forEach(n=>Os(n))}});$u.observe(document.documentElement,{childList:!0,subtree:!0})});var to={};A(to,{initSpoilers:()=>Bs});function Bs(e=document){e.querySelectorAll($s).forEach(Ps)}function Ps(e){if(e.hasAttribute("data-spoiler-init"))return;e.setAttribute("data-spoiler-init","");let t=e.getAttribute("data-spoiler")||"blur";e.getAttribute("data-spoiler")||e.setAttribute("data-spoiler","blur");let i=Qa.has(e.tagName),s=i?"span":"div";e.setAttribute("role","group"),e.setAttribute("aria-label","Spoiler");let n=document.createElement(s);for(n.setAttribute("data-spoiler-content",""),n.setAttribute("inert","");e.firstChild;)n.appendChild(e.firstChild);e.appendChild(n);let r=e.getAttribute("data-spoiler-label")||"Reveal spoiler",a;i?(a=document.createElement("span"),a.setAttribute("role","button"),a.setAttribute("tabindex","0")):(a=document.createElement("button"),a.setAttribute("type","button")),a.setAttribute("data-spoiler-trigger",""),a.setAttribute("aria-expanded","false");let o=document.createElement("span");o.setAttribute("data-spoiler-label",""),o.textContent=r,a.appendChild(o),e.appendChild(a),a.addEventListener("click",()=>Za(e)),i&&a.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),Za(e))}),e.addEventListener("keydown",c=>{c.key==="Escape"&&e.hasAttribute("data-spoiler-visible")&&(c.stopPropagation(),ke(e))})}function Za(e){let t=e.getAttribute("data-spoiler-group");t&&document.querySelectorAll(`[data-spoiler-group="${t}"][data-spoiler-visible]`).forEach(n=>{n!==e&&ke(n)});let i=e.querySelector("[data-spoiler-content]"),s=e.querySelector("[data-spoiler-trigger]");if(i&&i.removeAttribute("inert"),s&&(s.setAttribute("aria-expanded","true"),s.hidden=!0),e.setAttribute("data-spoiler-visible",""),!e.hasAttribute("data-spoiler-persist")){let n=Qa.has(e.tagName),r;n?(r=document.createElement("span"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),ke(e))})):(r=document.createElement("button"),r.setAttribute("type","button")),r.setAttribute("data-spoiler-hide",""),r.textContent="Hide",r.addEventListener("click",()=>ke(e)),e.appendChild(r)}Bu("Spoiler revealed"),e.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!0}}))}function ke(e){if(e.hasAttribute("data-spoiler-persist"))return;let t=e.querySelector("[data-spoiler-content]"),i=e.querySelector("[data-spoiler-trigger]"),s=e.querySelector("[data-spoiler-hide]");t&&t.setAttribute("inert",""),i&&(i.setAttribute("aria-expanded","false"),i.hidden=!1,i.focus()),s&&s.remove(),e.removeAttribute("data-spoiler-visible"),e.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!1}}))}function Bu(e){let t=document.createElement("div");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),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.textContent=e,document.body.appendChild(t),setTimeout(()=>t.remove(),1e3)}var $s,Qa,Pu,Fs=w(()=>{$s="[data-spoiler]",Qa=new Set(["SPAN","EM","STRONG","CODE","A","B","I","S","U","SMALL","SUB","SUP","MARK","ABBR","Q","CITE","DFN","SAMP","VAR","KBD","BDI","BDO","DATA","TIME","WBR"]);document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Bs()):Bs();Pu=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches($s)&&Ps(s),s.querySelectorAll($s).forEach(Ps)}});Pu.observe(document.documentElement,{childList:!0,subtree:!0})});var eo={};A(eo,{initSplitters:()=>Hs});function Hs(e=document){e.querySelectorAll(Rs).forEach(zs)}function zs(e){if(e.hasAttribute("data-splitter-init"))return;e.setAttribute("data-splitter-init","");let t=[...e.children];if(t.length<2)return;let i=t[0],s=t[1],n=e.getAttribute("data-splitter")==="vertical",r=Number(i.dataset.min)||10,a=Number(i.dataset.max)||90,o=document.createElement("div");o.className="split-divider",o.setAttribute("role","separator"),o.setAttribute("aria-orientation",n?"vertical":"horizontal"),o.setAttribute("aria-valuenow","50"),o.setAttribute("aria-valuemin",String(r)),o.setAttribute("aria-valuemax",String(a)),o.setAttribute("aria-label","Resize panels"),o.setAttribute("tabindex","0"),e.insertBefore(o,s),i.style.flexBasis="50%",i.style.flexGrow="0",i.style.flexShrink="0",i.style.overflow="auto",s.style.flexGrow="1",s.style.overflow="auto";let c=!1;function d(l){let u=Math.min(a,Math.max(r,l));i.style.flexBasis=`${u}%`,o.setAttribute("aria-valuenow",String(Math.round(u))),e.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:u},bubbles:!0}))}o.addEventListener("pointerdown",l=>{l.preventDefault(),c=!0,o.setPointerCapture(l.pointerId),e.style.userSelect="none"}),o.addEventListener("pointermove",l=>{if(!c)return;let u=e.getBoundingClientRect(),h;n?h=(l.clientY-u.top)/u.height*100:h=(l.clientX-u.left)/u.width*100,d(h)}),o.addEventListener("pointerup",l=>{c=!1,o.releasePointerCapture(l.pointerId),e.style.userSelect=""}),o.addEventListener("keydown",l=>{let u=l.shiftKey?10:1,h=Number(o.getAttribute("aria-valuenow")),f=n?["ArrowUp"]:["ArrowLeft"],v=n?["ArrowDown"]:["ArrowRight"];f.includes(l.key)?(l.preventDefault(),d(h-u)):v.includes(l.key)?(l.preventDefault(),d(h+u)):l.key==="Home"?(l.preventDefault(),d(r)):l.key==="End"&&(l.preventDefault(),d(a))})}var Rs,Fu,Vs=w(()=>{Rs="[data-splitter]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Hs()):Hs();Fu=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Rs)&&zs(s),s.querySelectorAll(Rs).forEach(zs)}});Fu.observe(document.documentElement,{childList:!0,subtree:!0})});var io={};A(io,{initSwitches:()=>js});function Ws(e){e.hasAttribute("data-switch-init")||(e.setAttribute("data-switch-init",""),e.setAttribute("role","switch"))}function js(e=document){e.querySelectorAll(Us).forEach(Ws)}var Us,Ru,Ys=w(()=>{Us='input[type="checkbox"][data-switch]';document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>js()):js();Ru=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Us)&&Ws(s),s.querySelectorAll(Us).forEach(n=>Ws(n))}});Ru.observe(document.documentElement,{childList:!0,subtree:!0})});function Hu(e){for(let[t,i]of Te)e.querySelectorAll(t).forEach(i)}function zu(e){if(e.nodeType!==Node.ELEMENT_NODE)return;let t=e;for(let[i,s]of Te)t.matches(i)&&s(t),t.querySelectorAll(i).forEach(s)}function Vu(){Gs||(Gs=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes)zu(i)}),Gs.observe(document.documentElement,{childList:!0,subtree:!0}))}function Uu(){Le||(Le=!0,Hu(document))}function C(e,t){Te.set(e,t),Vu(),Le||document.readyState!=="loading"?(Le=!0,document.querySelectorAll(e).forEach(t)):Te.size===1&&document.addEventListener("DOMContentLoaded",Uu)}var Te,Gs,Le,q=w(()=>{Te=new Map,Gs=null,Le=!1});var ro={};A(ro,{initTextareaCounts:()=>Wu});function no(e){if(e.hasAttribute("data-count-init"))return;e.setAttribute("data-count-init","");let t=e.dataset.count==="words",i=t?parseInt(e.dataset.maxwords??"0",10)||0:e.maxLength>0?e.maxLength:0,s=document.createElement("output");s.className="textarea-counter",s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true");let n=e.closest("form-field");n?n.appendChild(s):e.insertAdjacentElement("afterend",s);function r(){let a=e.value,o=t?a.trim()?a.trim().split(/\s+/).length:0:a.length;if(i>0){s.textContent=`${o} / ${i}`;let c=o/i;s.dataset.state=c>=1?"error":c>=.8?"warning":""}else{let c=t?o===1?"word":"words":o===1?"character":"characters";s.textContent=`${o} ${c}`,s.dataset.state=""}}e.addEventListener("input",r),r()}function Wu(e=document){e.querySelectorAll(so).forEach(no)}var so,Ks=w(()=>{q();so="textarea[data-count]";C(so,no)});var co={};A(co,{initTextareaGrow:()=>Yu});function oo(e){if(e.hasAttribute("data-grow-init"))return;e.setAttribute("data-grow-init","");let t=parseInt(e.dataset.maxRows??"0",10)||0;if(e.style.resize="none",ju){e.style.fieldSizing="content",t>0&&(e.style.maxBlockSize=`${t}lh`);return}e.style.overflow="hidden";function i(){e.style.blockSize="auto";let s=e.scrollHeight;if(t>0){let n=getComputedStyle(e),r=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2,a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=r*t+a;s>o?(s=o,e.style.overflow="auto"):e.style.overflow="hidden"}e.style.blockSize=s+"px"}e.addEventListener("input",i),e.addEventListener("change",i),i()}function Yu(e=document){e.querySelectorAll(ao).forEach(oo)}var ao,ju,Xs=w(()=>{q();ao="textarea[data-grow]",ju=CSS.supports("field-sizing","content");C(ao,oo)});var ho={};A(ho,{initConditionalFields:()=>Zs});function Js(e){let t=e.indexOf("=");return t===-1?{name:e,value:null}:{name:e.slice(0,t),value:e.slice(t+1)}}function Gu(e,t){let i=t.querySelectorAll(`[name="${CSS.escape(e)}"]`);if(!i.length)return"";let s=i[0];if(s.type==="radio"){let n=Array.from(i).find(r=>r.checked);return n?n.value:""}return s.type==="checkbox"?s.checked?s.value||"true":"":s.value}function lo(e,t){let i=Gu(e.name,t);return e.value===null?i!=="":i===e.value}function Me(e){let t=e.closest("form")||document,i;if(e.dataset.showWhen){let s=Js(e.dataset.showWhen);i=lo(s,t)}else if(e.dataset.hideWhen){let s=Js(e.dataset.hideWhen);i=!lo(s,t)}i?(e.removeAttribute("hidden"),e.removeAttribute("inert")):(e.setAttribute("hidden",""),e.setAttribute("inert",""))}function Zs(e=document){let t=e.querySelectorAll(Ne);t.forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),Me(n))});let i=new Set;t.forEach(n=>{let r=n.closest("form");r&&!r.hasAttribute("data-conditional-listener")&&(r.setAttribute("data-conditional-listener",""),i.add(r))}),(i.size?[...i]:[document]).forEach(n=>{n.addEventListener("change",uo),n.addEventListener("input",uo)})}function uo(e){let t=e.target.name;if(!t)return;(e.target.closest("form")||document).querySelectorAll(Ne).forEach(n=>{let r=n.dataset.showWhen||n.dataset.hideWhen||"";Js(r).name===t&&Me(n)})}var Ne,Ku,Qs=w(()=>{Ne="[data-show-when], [data-hide-when]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Zs()):Zs();Ku=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Ne)&&(s.hasAttribute("data-conditional-init")||(s.setAttribute("data-conditional-init",""),Me(s))),s.querySelectorAll(Ne).forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),Me(n))})}});Ku.observe(document.documentElement,{childList:!0,subtree:!0})});var mo={};A(mo,{initRangeSliders:()=>Xu});function po(e){if(e.hasAttribute("data-range-init"))return;e.setAttribute("data-range-init","");let t=e.dataset.prefix||"",i=e.dataset.suffix||"",s=e.hasAttribute("data-bubble"),n=document.createElement("div");if(n.className="range-wrapper",!e.parentNode)return;e.parentNode.insertBefore(n,e),n.appendChild(e);function r(){let l=parseFloat(e.min)||0,u=parseFloat(e.max)||100,f=(parseFloat(e.value)-l)/(u-l)*100;n.style.setProperty("--range-pct",`${f}%`)}let a;s&&(a=document.createElement("output"),a.className="range-bubble",a.setAttribute("for",e.id||""),n.appendChild(a));function o(){if(!a)return;a.textContent=`${t}${e.value}${i}`;let l=parseFloat(e.min)||0,u=parseFloat(e.max)||100,h=(parseFloat(e.value)-l)/(u-l),f=e.offsetWidth,p=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize),m=e.offsetLeft+p/2+h*(f-p);a.style.insetInlineStart=`${m}px`}if(e.hasAttribute("data-markers")){let l=parseFloat(e.min)||0,u=parseFloat(e.max)||100,h=parseFloat(e.step)||1,f=document.createElement("div");f.className="range-markers";let v=Math.round((u-l)/h);for(let p=0;p<=v;p++)f.appendChild(document.createElement("span"));n.appendChild(f)}let c=e.getAttribute("list");if(c){let l=document.getElementById(c);if(l){let u=document.createElement("div");u.className="range-labels";let h=parseFloat(e.min)||0,f=parseFloat(e.max)||100;requestAnimationFrame(()=>{let v=e.offsetWidth,m=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize);Array.from(l.options).forEach(y=>{let k=document.createElement("span");k.textContent=y.label||y.value;let L=(parseFloat(y.value)-h)/(f-h),V=e.offsetLeft+m/2+L*(v-m);k.style.insetInlineStart=`${V}px`,u.appendChild(k)})}),n.appendChild(u)}}function d(){r(),o()}e.addEventListener("input",d),d()}function Xu(e=document){e.querySelectorAll(fo).forEach(po)}var fo,tn=w(()=>{q();fo='input[type="range"][data-range]';C(fo,po)});var bo={};A(bo,{initUploadZones:()=>nn});function Ju(e){if(e===0)return"0 B";let t=["B","KB","MB","GB"],i=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,i)).toFixed(i>0?1:0)} ${t[i]}`}function sn(e){if(e.hasAttribute("data-upload-init"))return;e.setAttribute("data-upload-init","");let t=e.hasAttribute("multiple"),i=e.getAttribute("accept")||"",s=document.createElement("div");if(s.className="upload-zone",s.setAttribute("role","presentation"),!e.parentNode)return;e.parentNode.insertBefore(s,e),s.appendChild(e);let n=document.createElement("div");n.className="upload-prompt",n.innerHTML=`
1
+ var hd=Object.defineProperty;var y=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>{for(var i in t)hd(e,i,{get:t[i],enumerable:!0})};function yd(){let e=globalThis.localStorage;if(!e)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return e.getItem(t)},async setRaw(t,i){e.setItem(t,i)},async removeRaw(t){e.removeItem(t)},async keys(t){let i=[];for(let s=0;s<e.length;s++){let n=e.key(s);n&&n.startsWith(t)&&i.push(n)}return i}}}function j(){return re[ne]||(re[ne]=yd()),re[ne]}function si(e,t){if(typeof e!="string"||!e)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${e}:${t}`}function Vr(e){if(typeof e!="string"||!e)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${e}:`}function Ur(e){try{let t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var ne,re,E,Y=y(()=>{ne="__vbStoreBackend",re=globalThis;E={configure(e={}){re[ne]=e.backend??null},async set(e,t,i){let s={data:i,timestamp:Date.now()};await j().setRaw(si(e,t),JSON.stringify(s))},async get(e,t,i){let s=await j().getRaw(si(e,t));if(s==null)return null;let n=Ur(s);return!n||i?.maxAge!=null&&Date.now()-n.timestamp>i.maxAge?null:n.data},async remove(e,t){await j().removeRaw(si(e,t))},async list(e){let t=Vr(e),i=await j().keys(t),s=[];for(let n of i){let r=await j().getRaw(n);if(r==null)continue;let a=Ur(r);a&&s.push({key:n.slice(t.length),data:a.data,timestamp:a.timestamp})}return s},async clear(e){let t=Vr(e),i=await j().keys(t);for(let s of i)await j().removeRaw(s)},async clearAll(){let e=await j().keys("vb:");for(let t of e)await j().removeRaw(t)},async setMany(e,t){for(let[i,s]of t)await E.set(e,i,s)}};if(typeof window<"u"){let e=window.VB??(window.VB={});e.store??=E}});var na={};S(na,{copyRich:()=>Ld,copyText:()=>rt,initCopyButtons:()=>wi,pasteFromClipboard:()=>sa});async function rt(e,t={}){if(e==null||e==="")return!1;let{button:i,announceMessage:s=ia,duration:n=1500}=t;try{await navigator.clipboard.writeText(e)}catch{return!1}return Ei({button:i,duration:n,announceMessage:s,eventDetail:{text:e}}),!0}async function Ld(e,t={}){let{text:i,html:s,blob:n}=e??{};if(!i&&!s&&!n)return!1;let{button:r,announceMessage:a=ia,duration:o=1500}=t;if(typeof ClipboardItem<"u"&&typeof navigator.clipboard?.write=="function"){let l={};i&&(l["text/plain"]=new Blob([i],{type:"text/plain"})),s&&(l["text/html"]=new Blob([s],{type:"text/html"})),n&&(l[n.type]=n);try{return await navigator.clipboard.write([new ClipboardItem(l)]),Ei({button:r,duration:o,announceMessage:a,eventDetail:{payload:e}}),!0}catch{}}return i?rt(i,t):!1}function Ei({button:e,duration:t,announceMessage:i,eventDetail:s,state:n="copied",eventName:r="copy"}){if(e){e.dataset.state=n;let a=vi.get(e);a&&clearTimeout(a),vi.set(e,setTimeout(()=>{delete e.dataset.state,vi.delete(e)},t)),e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:s}))}Nd(i,e??document.body)}async function sa(e,t={}){let{button:i,announceMessage:s=Td,duration:n=1500}=t,r;try{r=await navigator.clipboard.readText()}catch{return null}return e&&("value"in e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)?e.value=r:e.textContent=r,e.dispatchEvent(new Event("input",{bubbles:!0}))),Ei({button:i,duration:n,announceMessage:s,eventDetail:{text:r},state:"pasted",eventName:"paste"}),r}function wi(e=document){e.querySelectorAll(yi).forEach(Ai)}function Ai(e){e.hasAttribute("data-copy-init")||(e.setAttribute("data-copy-init",""),e.addEventListener("click",()=>{if(e.dataset.pasteTarget){let i=document.querySelector(e.dataset.pasteTarget);if(!i)return;sa(i,{button:e});return}let t=Md(e);t&&rt(t,{button:e})}))}function Md(e){if(e.dataset.copy)return e.dataset.copy;if(e.dataset.copyTarget){let t=document.querySelector(e.dataset.copyTarget);if(!t)return"";let i=e.dataset.copyAttr;return i?t.getAttribute(i)??"":t.textContent??""}return""}function Nd(e,t){let i=document.createElement("div");i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.className="visually-hidden",i.textContent=e,t.appendChild(i),setTimeout(()=>i.remove(),1e3)}var yi,ia,Td,vi,_d,_t=y(()=>{yi="[data-copy], [data-copy-target], [data-paste-target]",ia="Copied to clipboard",Td="Pasted from clipboard",vi=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>wi()):wi();_d=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(yi)&&Ai(s),s.querySelectorAll(yi).forEach(n=>Ai(n))}});_d.observe(document.documentElement,{childList:!0,subtree:!0})});function ra(e){let t=X?Dt.mac:Dt.other;return e.split("+").map(i=>{let s=i.trim().toLowerCase();return t[s]??s.toUpperCase()}).join(X?"":"+")}function aa(e){let t=e.toLowerCase().split("+").map(s=>s.trim());return{key:t.pop()??"",meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt")}}function oa(e,t){if(e.key.toLowerCase()!==t.key)return!1;let i,s;return X?(i=t.meta,s=t.ctrl):(i=!1,s=t.meta||t.ctrl),!(i!==e.metaKey||s!==e.ctrlKey||t.shift!==e.shiftKey||t.alt!==e.altKey)}var X,Dt,de=y(()=>{X=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),Dt={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",shift:"\u21E7",ctrl:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",shift:"Shift",ctrl:"Ctrl"}}});function Id(e){let t=Dd.has(e.target.tagName)||e.target.isContentEditable;for(let i of ft)if(!(t&&!i.global)&&oa(e,i.descriptor)){e.preventDefault(),i.callback(e);return}}function Od(){ca||(document.addEventListener("keydown",Id),ca=!0)}function pt(e,t,i={}){Od();let s=aa(e),n={combo:e,descriptor:s,callback:t,global:i.global===!0};return ft.find(a=>a.combo===e)&&console.warn(`[hotkey-bind] Shortcut "${e}" already bound. Last-connected-wins.`),ft.unshift(n),function(){let o=ft.indexOf(n);o!==-1&&ft.splice(o,1)}}function la(){return ft.map(e=>e.combo)}var Dd,ft,ca,ue=y(()=>{de();Dd=new Set(["INPUT","TEXTAREA","SELECT"]),ft=[],ca=!1});var Ii={};S(Ii,{addDialogDismiss:()=>Sa,addFlickListener:()=>wa,addLongPress:()=>Ea,addPullToRefresh:()=>Kd,addSwipeListener:()=>ya,haptic:()=>me,initGestures:()=>xa,makeSwipeable:()=>Aa});function ya(e,t={}){let i=t.threshold??50,s=t.restraint??100,n=t.timeout??300,r=t.velocity??.5,a=t.minFlickDistance??10,o,c,l;function d(h){h.isPrimary&&(o=h.clientX,c=h.clientY,l=Date.now())}function u(h){if(!h.isPrimary)return;let f=h.clientX-o,g=h.clientY-c,p=Date.now()-l;if(p>n)return;let v=Math.abs(f),w=Math.abs(g),T=Math.max(v,w),M=p>0?T/p:0,G=M>=r&&T>=a,W;if((v>=i||G&&v>w)&&w<=s?W=f<0?"left":"right":(w>=i||G&&w>v)&&v<=s&&(W=g<0?"up":"down"),W){let ie=W==="left"||W==="right"?v:w;e.dispatchEvent(new CustomEvent(`swipe-${W}`,{bubbles:!0,detail:{distance:ie,duration:p,velocity:M,flick:G}}))}}return e.addEventListener("pointerdown",d,{passive:!0}),e.addEventListener("pointerup",u,{passive:!0}),()=>{e.removeEventListener("pointerdown",d),e.removeEventListener("pointerup",u)}}function wa(e,t={}){let i=t.minDistance??10,s=t.velocity??.6,n=t.timeout??250,r=t.restraint??80,a,o,c;function l(u){u.isPrimary&&(a=u.clientX,o=u.clientY,c=Date.now())}function d(u){if(!u.isPrimary)return;let h=u.clientX-a,f=u.clientY-o,g=Date.now()-c;if(g===0||g>n)return;let p=Math.abs(h),v=Math.abs(f),w=Math.max(p,v);if(w<i)return;let T=w/g;if(T<s)return;let M;if(p>v&&v<=r?M=h<0?"left":"right":v>p&&p<=r&&(M=f<0?"up":"down"),M){let G=M==="left"||M==="right"?p:v;e.dispatchEvent(new CustomEvent(`swipe-${M}`,{bubbles:!0,detail:{distance:G,duration:g,velocity:T,flick:!0}}))}}return e.addEventListener("pointerdown",l,{passive:!0}),e.addEventListener("pointerup",d,{passive:!0}),()=>{e.removeEventListener("pointerdown",l),e.removeEventListener("pointerup",d)}}function Aa(e,t={}){let i=t.threshold??100,s=t.direction??"horizontal",n=t.removeOnDismiss??!0,r=s==="horizontal",a=0,o=0,c=!1;function l(p){!p.isPrimary||e.hasAttribute("data-dismissed")||(p.preventDefault(),c=!0,a=r?p.clientX:p.clientY,o=0,e.setPointerCapture(p.pointerId),e.setAttribute("data-swiping",""))}function d(p){if(!c||!p.isPrimary)return;o=(r?p.clientX:p.clientY)-a;let w=1-Math.min(Math.abs(o)/i,1)*.5;r?e.style.transform=`translateX(${o}px)`:e.style.transform=`translateY(${o}px)`,e.style.opacity=String(w)}function u(p){!c||!p.isPrimary||(c=!1,e.releasePointerCapture(p.pointerId),e.removeAttribute("data-swiping"),Math.abs(o)>=i?f(o>0?"right":"left"):g())}function h(p){!c||!p.isPrimary||(c=!1,e.releasePointerCapture(p.pointerId),e.removeAttribute("data-swiping"),g())}function f(p){let v=p==="right"?"100%":"-100%";e.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",e.style.transform=r?`translateX(${v})`:`translateY(${v})`,e.style.opacity="0",e.setAttribute("data-dismissed",""),me.dismiss(),e.dispatchEvent(new CustomEvent("swipe-dismiss",{bubbles:!0,detail:{direction:p,distance:Math.abs(o)}})),n&&e.addEventListener("transitionend",()=>e.remove(),{once:!0})}function g(){e.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",e.style.transform="",e.style.opacity="",e.addEventListener("transitionend",()=>{e.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",l),e.addEventListener("pointermove",d),e.addEventListener("pointerup",u),e.addEventListener("pointercancel",h),()=>{e.removeEventListener("pointerdown",l),e.removeEventListener("pointermove",d),e.removeEventListener("pointerup",u),e.removeEventListener("pointercancel",h)}}function Kd(e,t,i={}){let s=i.threshold??70,n=i.maxPull??120,r=document.createElement("div");r.setAttribute("data-pull-indicator",""),r.setAttribute("aria-hidden","true");let a=document.createElement("div");a.setAttribute("data-pull-spinner",""),r.appendChild(a),e.prepend(r);let o=0,c=!1,l=!1;function d(v){!v.isPrimary||l||e.scrollTop<=0&&(o=v.clientY,c=!0)}function u(v){if(!c||!v.isPrimary||l)return;let w=v.clientY-o;if(w<=0){r.style.transform="",r.style.opacity="";return}let T=Math.min(w,n),M=T/s;r.style.transform=`translateY(${T}px)`,r.style.opacity=String(Math.min(M,1)),M>=1?r.setAttribute("data-pull-ready",""):r.removeAttribute("data-pull-ready")}function h(v){!c||!v.isPrimary||(c=!1,r.hasAttribute("data-pull-ready")&&!l?g():p())}function f(v){!c||!v.isPrimary||(c=!1,p())}async function g(){l=!0,r.removeAttribute("data-pull-ready"),r.setAttribute("data-pull-loading",""),r.style.transform=`translateY(${s}px)`,r.style.opacity="1";try{await t()}finally{l=!1,r.removeAttribute("data-pull-loading"),p()}}function p(){r.style.transition="transform 0.3s ease, opacity 0.3s ease",r.style.transform="",r.style.opacity="",r.removeAttribute("data-pull-ready"),r.addEventListener("transitionend",()=>{r.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",d,{passive:!0}),e.addEventListener("pointermove",u,{passive:!0}),e.addEventListener("pointerup",h,{passive:!0}),e.addEventListener("pointercancel",f,{passive:!0}),()=>{e.removeEventListener("pointerdown",d),e.removeEventListener("pointermove",u),e.removeEventListener("pointerup",h),e.removeEventListener("pointercancel",f),r.remove()}}function Ea(e,t,i={}){let s=i.duration??500,n=i.hapticFeedback??!0,r=i.blockContextMenu??!0,a=null;function o(d){d.isPrimary&&(a=setTimeout(()=>{n&&me.tap(),t(d),a=null},s))}function c(){a&&(clearTimeout(a),a=null)}function l(d){r&&d.preventDefault()}return e.addEventListener("pointerdown",o,{passive:!0}),e.addEventListener("pointermove",c,{passive:!0}),e.addEventListener("pointerup",c,{passive:!0}),e.addEventListener("pointercancel",c,{passive:!0}),e.addEventListener("contextmenu",l),()=>{c(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointermove",c),e.removeEventListener("pointerup",c),e.removeEventListener("pointercancel",c),e.removeEventListener("contextmenu",l)}}function Sa(e,t={}){let i=t.threshold??80,s=0,n=0,r=!1;function a(h){if(!h.isPrimary||!e.open)return;let f=h.target;f.closest("a, button, input, select, textarea, [contenteditable]")&&!f.closest("header")||(r=!0,s=h.clientY,n=0,e.setPointerCapture(h.pointerId),e.style.transition="none")}function o(h){if(!r||!h.isPrimary)return;if(n=h.clientY-s,n<=0){e.style.transform="",e.style.opacity="";return}let g=1-Math.min(n/i,1)*.4;e.style.transform=`translateY(${n}px)`,e.style.opacity=String(g)}function c(h){!r||!h.isPrimary||(r=!1,e.releasePointerCapture(h.pointerId),n>=i?d():u())}function l(h){!r||!h.isPrimary||(r=!1,e.releasePointerCapture(h.pointerId),u())}function d(){e.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",e.style.transform="translateY(100%)",e.style.opacity="0",me.dismiss(),e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform="",e.style.opacity="",e.close("dismiss")},{once:!0})}function u(){e.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",e.style.transform="",e.style.opacity="",e.addEventListener("transitionend",()=>{e.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",a),e.addEventListener("pointermove",o),e.addEventListener("pointerup",c),e.addEventListener("pointercancel",l),()=>{e.removeEventListener("pointerdown",a),e.removeEventListener("pointermove",o),e.removeEventListener("pointerup",c),e.removeEventListener("pointercancel",l)}}function xa(e=document){let t=[];for(let i of e.querySelectorAll('[data-gesture="swipe"]'))t.push(ya(i));for(let i of e.querySelectorAll('[data-gesture="flick"]'))t.push(wa(i));for(let i of e.querySelectorAll('[data-gesture="dismiss"]'))t.push(Aa(i));for(let i of e.querySelectorAll('[data-gesture="long-press"]'))t.push(Ea(i,()=>{i.dispatchEvent(new CustomEvent("long-press",{bubbles:!0}))}));for(let i of e.querySelectorAll('dialog[data-gesture="dismiss-down"]'))t.push(Sa(i));return()=>t.forEach(i=>i())}var me,Di,Oi=y(()=>{me={tap:()=>navigator.vibrate?.(8),confirm:()=>navigator.vibrate?.([8,40,8]),error:()=>navigator.vibrate?.([30,60,30]),dismiss:()=>navigator.vibrate?.(15)};Di=typeof document<"u"?document.documentElement:null;(!Di||!Di.hasAttribute("data-vb-gestures-init"))&&(Di?.setAttribute("data-vb-gestures-init",""),xa())});var Se={};S(Se,{destroyStickyManager:()=>_u,initStickyManager:()=>es});function ct(){let e=document.documentElement;if(!e.hasAttribute("data-sticky"))return;let t=document.querySelector("header");t&&!t.hasAttribute("data-sticky")&&(t.dataset.sticky="",ts=!0);let i=document.querySelector("header[data-sticky]"),s=i?i.getBoundingClientRect().height:0;e.style.setProperty("--sticky-offset",`${s}px`)}function Ba(){ct()}function es(){if(Ee)return;Ee=!0,ct(),requestAnimationFrame(ct),document.fonts?.ready?.then(ct),window.addEventListener("resize",ct,{passive:!0}),document.addEventListener("toggle",Ba,!0),Qi=new ResizeObserver(ct);let e=document.querySelector("header[data-sticky]");e&&Qi.observe(e)}function _u(){if(Ee){if(Ee=!1,window.removeEventListener("resize",ct),document.removeEventListener("toggle",Ba,!0),Qi?.disconnect(),ts){let e=document.querySelector("header[data-sticky]");e&&delete e.dataset.sticky,ts=!1}document.documentElement.style.removeProperty("--sticky-offset")}}var Ee,Qi,ts,Bt=y(()=>{Ee=!1,ts=!1});var Fa={};S(Fa,{SoundManager:()=>Du});var Pa,is,Du,Ra=y(()=>{Pa="vb-sound",is={enabled:!1,volume:.5},Du={_ctx:null,_enabled:!1,_volume:.5,_initialized:!1,init(){if(this._initialized)return this;let e=this._load();return this._enabled=e.enabled,this._volume=e.volume,this._initialized=!0,this},_getContext(){return this._ctx||(this._ctx=new(window.AudioContext||window.webkitAudioContext)),this._ctx.state==="suspended"&&this._ctx.resume(),this._ctx},_load(){try{let e=localStorage.getItem(Pa);return e?{...is,...JSON.parse(e)}:{...is}}catch{return{...is}}},_save(e){try{let t=this._load();localStorage.setItem(Pa,JSON.stringify({...t,...e}))}catch{}},_playTone(e,t,i="sine"){if(!this._enabled)return;let s=this._getContext(),n=s.createOscillator(),r=s.createGain();n.connect(r),r.connect(s.destination),n.frequency.value=e,n.type=i,r.gain.value=this._volume*.3,n.start(),r.gain.exponentialRampToValueAtTime(.01,s.currentTime+t),n.stop(s.currentTime+t)},enable(){this._enabled=!0,this._save({enabled:!0}),this.play("click")},disable(){this._enabled=!1,this._save({enabled:!1})},toggle(){return this._enabled?this.disable():this.enable(),this._enabled},isEnabled(){return this._enabled},setVolume(e){this._volume=Math.max(0,Math.min(1,e)),this._save({volume:this._volume})},getVolume(){return this._volume},play(e){if(this._enabled)switch(e){case"click":this._playTone(800,.1);break;case"success":this._playTone(523,.1),setTimeout(()=>this._playTone(659,.1),100),setTimeout(()=>this._playTone(784,.15),200);break;case"error":this._playTone(200,.15,"sawtooth"),setTimeout(()=>this._playTone(180,.2,"sawtooth"),150);break;case"notification":this._playTone(880,.1),setTimeout(()=>this._playTone(1100,.15),100);break;case"soft":this._playTone(600,.05);break;case"tick":this._playTone(1200,.02,"square");break}},getState(){return{enabled:this._enabled,volume:this._volume}}}});function Iu(e,t){if(!t)return e;let i=e??new URLSearchParams;for(let[s,n]of Object.entries(t))n!=null&&i.set(s,String(n));return i}async function Ou(e){if((e.headers.get("content-type")??"").includes("application/json"))try{return await e.json()}catch{return null}try{return await e.text()}catch{return null}}function Ha(e){return e.endsWith("/")?e.slice(0,-1):e}var Ft,Rt,za,ns,D,B,wt=y(()=>{Ft="__vbServiceConfig",Rt=globalThis,za=()=>({baseUrl:"/go",headers:{},services:{}});Rt[Ft]||(Rt[Ft]=za());ns=()=>Rt[Ft],D=class extends Error{constructor(t,i,s,n){super(`VBService(${s}): ${t} ${n}`),this.name="VBServiceError",this.status=t,this.body=i,this.role=s,this.path=n}};B=class e{static configure(t={}){let i=ns();Rt[Ft]={baseUrl:t.baseUrl??i.baseUrl,headers:{...i.headers,...t.headers??{}},services:{...i.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");let i=ns();return i.services[t]?Ha(i.services[t]):i.baseUrl?`${Ha(i.baseUrl)}/${t}`:`/go/${t}`}static _reset(){Rt[Ft]=za()}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,i){return this.#e("GET",t,{params:i})}async post(t,i){return this.#e("POST",t,{body:i})}async patch(t,i){return this.#e("PATCH",t,{body:i})}async delete(t){return this.#e("DELETE",t,{})}async#e(t,i,s){let n=e.resolve(this.role),r=i?i.startsWith("/")?i:`/${i}`:"",a=new URL(`${n}${r}`,globalThis.location?.origin??"http://localhost"),o=Iu(a.searchParams,s.params);o&&(a.search=o.toString());let c={method:t,headers:{...ns().headers}};s.body!==void 0&&(c.body=JSON.stringify(s.body),c.headers["content-type"]="application/json");let l=a.toString(),d=await fetch(l,c),u=await Ou(d);if(!d.ok)throw new D(d.status,u,this.role,`${r||"/"}`);return u}};if(typeof window<"u"){let e=window.VB??(window.VB={});e.service??=B,e.ServiceError??=D}});function xe(e){let t=2166136261;for(let i=0;i<e.length;i++)t^=e.charCodeAt(i),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Pu(){return"hn-"+crypto.randomUUID().slice(0,8)}function Ua(e){return typeof e=="string"&&Fu.test(e)}function Ga(){if(dt.size===0){lt&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(t=>t!==lt),lt=null);return}lt||(lt=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,lt]);let e=[...dt.keys()].map(t=>`::highlight(hn-${t}) { background-color: var(--highlight-${t}); text-decoration-line: underline; text-decoration-color: var(--highlight-${t}); text-underline-offset: 2px; }`).join(`
2
+ `);lt.replaceSync(e)}function Ru(e){for(let t of e)dt.set(t,(dt.get(t)??0)+1);Ga()}function Hu(e){for(let t of e){let i=(dt.get(t)??0)-1;i>0?dt.set(t,i):dt.delete(t)}Ga()}function zu(e){let t=Ht.get(e),i=t?[...t.values()].flat():[];i.length===0?(CSS.highlights.delete(`hn-${e}`),Ht.delete(e)):CSS.highlights.set(`hn-${e}`,new Highlight(...i))}function Wa(e,t){let i=new Set(t.keys());for(let[s,n]of Ht)n.has(e)&&i.add(s);for(let s of i){let n=t.get(s)??[],r=Ht.get(s);n.length?(r||Ht.set(s,r=new Map),r.set(e,n)):r?.delete(e),zu(s)}}function as(e){tt||(tt=document.createElement("div"),tt.setAttribute("aria-live","polite"),tt.setAttribute("aria-atomic","true"),tt.className="hn-sr-only",document.body.appendChild(tt)),tt.textContent="",requestAnimationFrame(()=>{tt.textContent=e})}function ja(e,t,i){let s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=0;for(;s.nextNode();){if(s.currentNode===t)return n+i;n+=(s.currentNode.textContent??"").length}return-1}function At(e,t,i){let s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=0,r=null,a=0,o=null,c=0;for(;s.nextNode();){let l=s.currentNode,d=(l.textContent??"").length;if(!r&&n+d>t&&(r=l,a=t-n),n+d>=i){o=l,c=i-n;break}n+=d}if(!r||!o)return null;try{let l=document.createRange();return l.setStart(r,Math.min(a,(r.textContent??"").length)),l.setEnd(o,Math.min(c,(o.textContent??"").length)),l}catch{return null}}function ds(e){if(os.has(e))return os.get(e);let t=new ls(e);return os.set(e,t),t}function Ya(e=document){e.querySelectorAll(cs).forEach(t=>{t.hasAttribute("data-highlights-init")||ds(t)})}var cs,Va,$u,Bu,Fu,lt,dt,Ht,tt,ls,os,Vu,Ka=y(()=>{Y();cs="[data-highlights]",Va="highlights",$u=["yellow","green","blue","pink"],Bu=typeof CSS<"u"&&"highlights"in CSS;Fu=/^[a-z0-9_-]+$/i;lt=null,dt=new Map,Ht=new Map;tt=null;ls=class{#e;#t;#i;#s;#r=[];#n=!Bu;#a;#o;#l=!1;#c=[];constructor(t){this.#e=t,this.#s=t.hasAttribute("data-highlights-readonly");let i=t.dataset.highlights;this.#t=i&&i!==""?i:location.pathname;let s=t.dataset.highlightsColors,n=s?s.split(",").map(r=>r.trim()).filter(Ua):[...$u];this.#i=[...new Set(n)],this.#n||Ru(this.#i),this.#d(),this.#s||(this.#a=this.#f.bind(this),this.#o=this.#m.bind(this),t.addEventListener("pointerup",this.#a),t.addEventListener("click",this.#o)),t.setAttribute("data-highlights-init",""),this.#u().then(()=>{this.#l||this.#d()})}get colors(){return[...this.#i]}get element(){return this.#e}getHighlights(){return this.#r.map(t=>({...t}))}removeHighlight(t){let i=this.#r.findIndex(s=>s.id===t);i<0||(this.#r.splice(i,1),this.#p(),this.#d(),this.#w("highlights:removed",{id:t}),as("Highlight removed"))}clearAll(){this.#r=[],this.#p(),this.#d()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#r})}importHighlights(t){try{let i=typeof t=="string"?JSON.parse(t):t;if(!i.highlights||!Array.isArray(i.highlights))return;this.#r=i.highlights,this.#p(),this.#d()}catch{}}destroy(){this.#l||(this.#l=!0,this.#a&&this.#e.removeEventListener("pointerup",this.#a),this.#o&&this.#e.removeEventListener("click",this.#o),this.#n?this.#e.querySelectorAll("mark[data-hn-id]").forEach(t=>{let i=t.parentNode;for(;t.firstChild;)i.insertBefore(t.firstChild,t);i.removeChild(t),i.normalize()}):(Wa(this,new Map),Hu(this.#i)),this.#S(),this.#e.removeAttribute("data-highlights-init"))}#f(){requestAnimationFrame(()=>{if(this.#l)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let i=t.getRangeAt(0);this.#e.contains(i.commonAncestorContainer)&&this.#w("highlights:selected",{text:t.toString().trim(),rect:i.getBoundingClientRect()})})}#m(t){let i=t.target.closest?.(".hn-margin-annotation");if(i){let n=i.dataset.hnId,r=this.#r.find(a=>a.id===n);if(r){this.#w("highlights:clicked",{id:n,highlight:{...r}}),this.#w("highlights:request-note",{id:n,highlight:{...r},controller:this});return}}let s=t.target.closest?.("mark[data-hn-id]");if(s){let n=s.dataset.hnId,r=this.#r.find(a=>a.id===n);if(r){this.#w("highlights:clicked",{id:n,highlight:{...r}});return}}if(!this.#n){let n=this.#h(t.clientX,t.clientY);n&&this.#w("highlights:clicked",{id:n.id,highlight:{...n}})}}findHighlightRect(t){let i=this.#r.find(r=>r.id===t);if(!i)return null;let s=At(this.#e,i.startOffset,i.endOffset);if(!s)return null;let n=s.getClientRects();return n.length?n[0]:null}#h(t,i){for(let s of this.#r){let n=At(this.#e,s.startOffset,s.endOffset);if(!n)continue;let r=n.getClientRects();for(let a of r)if(t>=a.left&&t<=a.right&&i>=a.top&&i<=a.bottom)return s}return null}_createFromSelection(t){let i=window.getSelection();if(!i||i.isCollapsed)return;let s=i.getRangeAt(0);if(!this.#e.contains(s.commonAncestorContainer))return;let n=ja(this.#e,s.startContainer,s.startOffset),r=ja(this.#e,s.endContainer,s.endOffset);if(n<0||r<0||n>=r)return;let a=i.toString().trim(),o={id:Pu(),startOffset:n,endOffset:r,text:a,color:t,note:"",created:Date.now()};this.#r.push(o),this.#p(),this.#d(),i.removeAllRanges(),this.#w("highlights:added",{id:o.id,text:a,color:t,note:""}),as("Highlight added")}_changeColor(t,i){let s=this.#r.find(n=>n.id===t);s&&(s.color=i,this.#p(),this.#d())}_updateNote(t,i){let s=this.#r.find(n=>n.id===t);s&&(s.note=i,this.#p(),this.#A(),this.#w("highlights:note-changed",{id:t,note:i}),as("Note saved"))}async#u(){let t=await E.get(Va,this.#t);if(!t||!Array.isArray(t.highlights))return;let i=xe(this.#e.textContent);t.contentHash&&t.contentHash!==i?(this.#r=t.highlights.filter(s=>{let n=At(this.#e,s.startOffset,s.endOffset);return n?n.toString().trim()===s.text:!1}),this.#p()):this.#r=t.highlights}#p(){let t={version:1,contentHash:xe(this.#e.textContent),highlights:this.#r};E.set(Va,this.#t,t).catch(()=>{})}#d(){this.#n?this.#g():this.#b(),this.#A()}#b(){let t=new Map;for(let i of this.#i)t.set(i,[]);for(let i of this.#r){let s=At(this.#e,i.startOffset,i.endOffset);s&&t.has(i.color)&&t.get(i.color).push(s)}Wa(this,t)}#g(){this.#e.querySelectorAll("mark[data-hn-id]").forEach(i=>{let s=i.parentNode;for(;i.firstChild;)s.insertBefore(i.firstChild,i);s.removeChild(i)}),this.#e.normalize();let t=[...this.#r].sort((i,s)=>s.startOffset-i.startOffset);for(let i of t){let s=At(this.#e,i.startOffset,i.endOffset);if(!s)continue;let n=document.createElement("mark");n.dataset.hnId=i.id,Ua(i.color)&&(n.dataset.hnColor=i.color,n.style.setProperty("--_hn-color",`var(--highlight-${i.color})`));try{s.surroundContents(n)}catch{let r=s.extractContents();n.appendChild(r),s.insertNode(n)}}}#S(){for(let t of this.#c)t.remove();this.#c=[]}#A(){if(this.#S(),this.#r.length===0)return;getComputedStyle(this.#e).position==="static"&&(this.#e.style.position="relative");for(let i of this.#r){let s=At(this.#e,i.startOffset,i.endOffset);if(!s)continue;let n=s.getClientRects();if(n.length===0)continue;let r=n[0],a=this.#e.getBoundingClientRect(),o=r.top-a.top,c=document.createElement("span");c.className="hn-margin-annotation",c.dataset.hnId=i.id,c.setAttribute("aria-hidden","true"),c.style.top=`${o}px`,i.note?(c.innerHTML='<span class="hn-note-indicator">*</span> You highlighted',c.classList.add("hn-has-note")):c.textContent="You highlighted",this.#e.appendChild(c),this.#c.push(c)}}#w(t,i={}){this.#e.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0}))}},os=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ya()):Ya();Vu=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(cs)&&ds(s),s.querySelectorAll(cs).forEach(n=>{n.hasAttribute("data-highlights-init")||ds(n)})}});Vu.observe(document.documentElement,{childList:!0,subtree:!0})});var gs={};S(gs,{currentHash:()=>bs,initPageWatch:()=>ps,readWatch:()=>Ce,removeWatch:()=>Ja,writeWatch:()=>zt});function Xa(){return typeof window<"u"&&window.vbPageWatch?.serverSync===!0?!0:document.querySelector('meta[name="vb-page-watch-server"]')?.getAttribute("content")==="true"}async function Uu(e){if(!Xa())return null;try{let t=new B("notify"),i={url:e.url,type:"page-watch",notify:["panel"]},s=await t.post("/subscribe",i);return typeof s?.id=="string"?s.id:null}catch(t){let i=t instanceof D?`${t.status}`:String(t);return console.warn("[page-watch] server subscribe failed; client-only watch in effect.",i),null}}async function Wu(e){if(!(!e||!Xa()))try{await new B("notify").delete(`/subscribe/${encodeURIComponent(e)}`)}catch(t){let i=t instanceof D?`${t.status}`:String(t);console.warn("[page-watch] server unsubscribe failed; local state already cleared.",i)}}function ju(){return document.querySelector("main")||document.querySelector("article")||document.body}function Vt(){return location.pathname||"/"}function bs(){let e=ju();return e?xe(e.textContent||""):""}function Yu(){return document.title||Vt()}async function Ce(){return await E.get(ms,Vt())}async function zt(e){await E.set(ms,Vt(),e)}async function Ja(){await E.remove(ms,Vt())}function us(e,t){e.setAttribute("aria-pressed",t?"true":"false"),e.dataset.watching="",t||delete e.dataset.watching;let i=e.querySelector("icon-wc");i&&i.setAttribute("name",t?"bookmark-check":"bookmark");let s=[...e.childNodes].find(n=>n.nodeType===Node.TEXT_NODE&&(n.textContent||"").trim());s&&!e.hasAttribute("data-watch-label-locked")&&(s.textContent=t?"Watching":"Watch for updates"),e.setAttribute("title",t?"Stop watching this page":"Watch this page for content updates")}async function fs(e){if(e.hasAttribute("data-watch-page-init"))return;e.setAttribute("data-watch-page-init",""),e.setAttribute("type",e.getAttribute("type")||"button");let t=await Ce();us(e,!!t),e.addEventListener("click",async i=>{i.preventDefault();let s=await Ce();if(s)await Ja(),us(e,!1),e.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:s.url,subscriptionId:s.subscriptionId}})),Wu(s.subscriptionId);else{let n={url:Vt(),title:Yu(),contentHash:bs(),watchedAt:new Date().toISOString(),lastChecked:new Date().toISOString(),lastChanged:null,subscriptionId:null};await zt(n),us(e,!0),e.dispatchEvent(new CustomEvent("page-watch:add",{bubbles:!0,composed:!0,detail:{entry:n}}));let r=await Uu(n);r&&await zt({...n,subscriptionId:r})}})}async function Gu(){let e=await Ce();if(!e)return;let t=bs(),i=new Date().toISOString(),s=e.contentHash,n={...e,lastChecked:i};if(t&&t!==s){n.contentHash=t,n.lastChanged=i,await zt(n);let r={id:`page-watch:${e.url}:${t}`,type:"watch",title:`Updated: ${e.title}`,body:"Content changed since your last visit.",url:e.url,date:i,read:!1,dismissed:!1,priority:"normal"};document.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:r}}))}else await zt(n)}function ps(e=document){for(let t of e.querySelectorAll(hs))fs(t);Gu()}var hs,ms,Ku,vs=y(()=>{Y();wt();Ka();hs="[data-watch-page]",ms="watches";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ps()):ps();Ku=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(hs)&&fs(s),s.querySelectorAll?.(hs).forEach(n=>fs(n))}});Ku.observe(document.documentElement,{childList:!0,subtree:!0})});function eo(e){let t=!1;try{t=sessionStorage.getItem("vb_optout")==="1"}catch{}let i=!1;if(typeof e?.consent=="function")try{i=e.consent()===!1}catch{i=!0}return{user:t,gpc:navigator.globalPrivacyControl===!0,dnt:navigator.doNotTrack==="1",consent:i}}function io(e){let t=eo(e);return t.user?"user":t.gpc?"gpc":t.dnt?"dnt":t.consent?"consent":null}function Le(e){return io(e)!==null}function so(e){return e?.closest?.("[data-vb-no-track]")!=null}function Ju(){let{dataset:e}=document.documentElement,t={};for(let i of Object.keys(e)){let s=e[i];s!=null&&s!==""&&(t[i]=s)}return t}function Zu(){let e={};for(let i of document.querySelectorAll('meta[name^="vb:"]')){let s=i.getAttribute("name")?.slice(3),n=i.getAttribute("content")?.trim();s&&n&&(e[s]=n)}let t=[];for(let i of document.querySelectorAll('meta[name="concept"]')){let s=i.getAttribute("content")?.trim();s&&t.push(s)}return t.length&&(e.concepts=t),e}function Qu(e,t){if(!t?.length)return e;for(let{pattern:i,replace:s}of t)if(i.test(e))return e.replace(i,s);return e}function th(e,t){let i=JSON.stringify(t);if(typeof navigator.sendBeacon=="function"){let s=new Blob([i],{type:"application/json"});if(navigator.sendBeacon(e,s))return!0}try{return fetch(e,{method:"POST",body:i,keepalive:!0,headers:{"content-type":"application/json"}}),!0}catch{return!1}}function ke(){try{document.dispatchEvent(new CustomEvent(Es))}catch{}}function Ss(e){return`${(L.config?.endpoint??"/api/analytics").replace(/\/+$/,"")}/${e}`}function Te(e,t){let i=L.config;if(!i)throw new Error("analytics: buildEnvelope called before init");let s=Qu(location.pathname+location.search,i.urlMasks),n=typeof i.context=="function"?i.context()??{}:{};return{name:e,ts:Date.now(),site:i.siteId,path:s,referrer:document.referrer||"",context:{...Ju(),...Zu(),...n},props:t??{}}}function Me(e,t){let i=L.config;if(!i||i.transport==="disabled")return!1;if(i.transport==="console")return console.log("%c[vb:analytics]","color:#0aa;font-weight:600",e,t),Et.logged++,ke(),!0;let s=th(Ss(e),t);return s&&(Et.sent++,ke()),s}function no(){let e=L.config?.sampleRate??1;return e>=1?!0:Math.random()<e}function ro(){if(!L.config||Le(L.config)||document.documentElement.hasAttribute("data-vb-no-track")||!no())return;let e=location.pathname+location.search;e!==Qa&&(Qa=e,Me("hit",Te("page.view",{})))}function eh(){let e,t=()=>{clearTimeout(e),e=setTimeout(ro,100)},i=history.pushState.bind(history);history.pushState=function(...n){i(...n),t()};let s=history.replaceState.bind(history);history.replaceState=function(...n){s(...n),t()},window.addEventListener("popstate",t)}function ih(e){let t={};for(let[i,s]of Object.entries(e.dataset)){if(i==="vbEvent"||!i.startsWith("vbEvent"))continue;let n=i.slice(7).replace(/^./,r=>r.toLowerCase());t[n]=s}return t}function sh(e){if(!L.config||Le(L.config))return;let i=e.target?.closest?.("[data-vb-event]");if(!i||so(i))return;let s=i.dataset.vbEvent;s&&A.track(s,ih(i))}function to(){let e=document.querySelectorAll('a[href^="http"]');for(let t of e){if(t.hostname===location.hostname||so(t)||t.hasAttribute("data-vb-analytics-wired"))continue;let i=encodeURIComponent(L.config?.siteId??"default"),s=`${Ss("click")}?site=${i}&from=${encodeURIComponent(location.pathname)}`;t.hasAttribute("ping")||t.setAttribute("ping",s),t.addEventListener("click",()=>{if(Le(L.config))return;let n=navigator.userAgent;/Firefox|Brave/.test(n)&&Me("click",Te("link.outbound",{to:t.hostname,href:t.href}))}),t.setAttribute("data-vb-analytics-wired","")}}function As(){if(!L.queue.length)return;let e=L.queue.splice(0);Me("events",{site:L.config?.siteId,events:e})}function nh(){document.visibilityState==="hidden"&&As()}function ah(){try{return window.top!==window.self}catch{return!0}}function xs(){return globalThis[ws]??A}var L,Et,ws,Es,Qa,rh,A,et=y(()=>{L={config:null,queue:[]},Et={sent:0,logged:0,iframeDisabled:!1},ws=Symbol.for("vanilla-breeze.analytics"),Es="vb:analytics-status";Qa=null;rh={endpoint:"/api/analytics",siteId:"default",transport:"disabled",sampleRate:1,consent:null,context:null,urlMasks:null,autoPageView:!0,autoOutboundLinks:!0,autoDeclarative:!0,allowInIframe:!1};A={init(e={}){if(L.config)return;let t={...rh,...e};if(L.config=t,globalThis[ws]||(globalThis[ws]=A),queueMicrotask(ke),ah()&&!t.allowInIframe){Et.iframeDisabled=!0,t.transport="disabled",t.autoPageView=!1,t.autoOutboundLinks=!1,t.autoDeclarative=!1;return}t.transport==="disabled"&&(t.autoOutboundLinks=!1),t.autoDeclarative&&document.addEventListener("click",sh,{capture:!0}),t.autoOutboundLinks&&(to(),new MutationObserver(()=>to()).observe(document.body,{childList:!0,subtree:!0})),t.autoPageView&&(ro(),eh()),document.addEventListener("visibilitychange",nh),window.addEventListener("pagehide",As)},track(e,t={}){L.config&&(Le(L.config)||no()&&Me("hit",Te(e,t)))},flush:As,setConsent(e){try{e?sessionStorage.removeItem("vb_optout"):sessionStorage.setItem("vb_optout","1")}catch{}ke()},getStatus(){let e=L.config,t=eo(e),i=io(e),s=null;if(e)try{s=Te("page.view",{})}catch{s=null}let n=e?.transport??null;return{initialized:e!=null,active:e!=null&&n!=="disabled"&&i===null,optedOut:i!==null,reason:i,signals:t,transport:n,inIframe:Et.iframeDisabled,endpoint:e?Ss("hit"):null,siteId:e?.siteId??null,sampleRate:e?.sampleRate??null,outboundLinks:e?.autoOutboundLinks??!1,queued:L.queue.length,sent:Et.sent,logged:Et.logged,collects:s?Object.keys(s):[],contextKeys:s?Object.keys(s.context):[],preview:s}},get config(){return L.config?{...L.config}:null}}});var vo={};S(vo,{initAll:()=>$s});function qs(e){e.hasAttribute("data-back-to-top-init")||(e.setAttribute("data-back-to-top-init",""),e.toggleAttribute("data-visible",!1),e.addEventListener("click",bo),Ie.add(e),Sh(),go())}function po(e){e.hasAttribute("data-back-to-top-init")&&(e.removeAttribute("data-back-to-top-init"),e.removeEventListener("click",bo),Ie.delete(e),Ie.size===0&&ut&&(window.removeEventListener("scroll",ut),ut=null))}function mo(){if(xt&&xt.isConnected)return xt;let e=document.documentElement,t=document.body;if(t&&t.scrollHeight>e.clientHeight+1&&t){let s=getComputedStyle(t);if(/auto|scroll/.test(s.overflowY))return xt=t,t}return xt=document.scrollingElement||e,xt}function bo(e){let t=e.currentTarget.getAttribute("href")||"";if(t===""||t==="#"||t==="#top")e.preventDefault();else return;mo().scrollTo({top:0,left:0,behavior:Eh.matches?"auto":"smooth"})}function Sh(){ut||(ut=()=>{Os||(Os=!0,requestAnimationFrame(()=>{go(),Os=!1}))},window.addEventListener("scroll",ut,{passive:!0}),document.addEventListener("scroll",ut,{capture:!0,passive:!0}))}function go(){let t=mo().scrollTop||window.scrollY,s=window.innerHeight*1,n=t>s,r=t<200;for(let a of Ie)a.toggleAttribute("data-visible",n&&!r)}function $s(e=document){e.querySelectorAll(Yt).forEach(qs)}var Yt,Eh,Ie,ut,Os,xt,xh,Bs=y(()=>{Yt="[data-back-to-top]",Eh=matchMedia("(prefers-reduced-motion: reduce)"),Ie=new Set,ut=null,Os=!1;xt=null;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>$s(),{once:!0}):$s();xh=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Yt)&&qs(s),s.querySelectorAll(Yt).forEach(n=>qs(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(Yt)&&po(s),s.querySelectorAll?.(Yt).forEach(n=>po(n))}}});xh.observe(document.documentElement,{childList:!0,subtree:!0})});function Ct(){return document.documentElement.lang||navigator.language||"en"}var Oe=y(()=>{});var wo={};S(wo,{initFormatNumber:()=>Hs});function Hs(e=document){e.querySelectorAll(Rs).forEach(zs)}function zs(e){if(e.hasAttribute("data-format-number-init"))return;e.setAttribute("data-format-number-init","");let t=e.getAttribute("value");if(t==null)return;let i=Number(t);if(isNaN(i))return;e.title||(e.title=e.textContent.trim());let s=e.getAttribute("data-format-number")||"decimal",n=e.getAttribute("data-locale")||Ct(),r={};switch(s){case"currency":{r.style="currency",r.currency=e.getAttribute("data-currency")||"USD";break}case"percent":r.style="percent";break;case"compact":r.notation="compact";break;default:break}try{e.textContent=new Intl.NumberFormat(n,r).format(i)}catch{}}var Rs,kh,Vs=y(()=>{Oe();Rs="data[data-format-number]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Hs()):Hs();kh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Rs)&&zs(s),s.querySelectorAll(Rs).forEach(n=>zs(n))}});kh.observe(document.documentElement,{childList:!0,subtree:!0})});var xo={};S(xo,{initFormatDate:()=>Us});function Us(e=document){e.querySelectorAll(qe).forEach(Ws)}function Ws(e){if(e.hasAttribute("data-format-date-init"))return;e.setAttribute("data-format-date-init","");let t=e.getAttribute("datetime");if(!t)return;let i=new Date(t);if(isNaN(i.getTime()))return;e.title||(e.title=e.textContent.trim());let s=e.getAttribute("data-format-date")||"medium",n=e.getAttribute("data-locale")||Ct();s==="relative"?(e.textContent=Eo(i,n),So(e,i,n)):e.textContent=Th(i,s,e,n)}function Th(e,t,i,s){let n=t||"medium",r=i.getAttribute("data-format-time")||void 0;try{let a={dateStyle:n};return r&&(a.timeStyle=r),new Intl.DateTimeFormat(s,a).format(e)}catch{return i.textContent}}function Eo(e,t){let i=Date.now(),s=Math.round((e.getTime()-i)/1e3),n=Math.abs(s),r=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(let{unit:a,seconds:o}of r)if(n>=o){let c=Math.round(s/o);try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(c,a)}catch{let l=Math.abs(c),d=l===1?a:`${a}s`;return c<0?`${l} ${d} ago`:`in ${l} ${d}`}}try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second")}catch{return"just now"}}function So(e,t,i){clearInterval(Gt.get(e));let s=Math.abs(Date.now()-t.getTime()),n=36e5,r=864e5,a;s<n?a=6e4:s<r?a=3e5:a=36e5;let o=setInterval(()=>{e.textContent=Eo(t,i),So(e,t,i)},a);Gt.set(e,o)}function Ao(e){Gt.has(e)&&(clearInterval(Gt.get(e)),Gt.delete(e))}var qe,Gt,Lh,js=y(()=>{Oe();qe="time[data-format-date]",Gt=new Map;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Us()):Us();Lh=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(qe)&&Ws(s),s.querySelectorAll(qe).forEach(n=>Ws(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;Ao(s),s.querySelectorAll(qe).forEach(Ao)}}});Lh.observe(document.documentElement,{childList:!0,subtree:!0})});var Co={};S(Co,{initFormatBytes:()=>Ks});function Ks(e=document){e.querySelectorAll(Gs).forEach(Xs)}function Xs(e){if(e.hasAttribute("data-format-bytes-init"))return;e.setAttribute("data-format-bytes-init","");let t=e.getAttribute("value");if(t==null)return;let i=Number(t);if(isNaN(i)||i<0)return;e.title||(e.title=e.textContent.trim());let s=parseInt(e.getAttribute("data-format-bytes")??"0",10)||0,n=e.getAttribute("data-unit")==="decimal",r=e.getAttribute("data-locale")||Ct(),a=n?1e3:1024;if(i===0){e.textContent="0 B";return}let o=Math.min(Math.floor(Math.log(i)/Math.log(a)),Ys.length-1),c=i/Math.pow(a,o);try{let l=new Intl.NumberFormat(r,{minimumFractionDigits:s,maximumFractionDigits:s}).format(c);e.textContent=`${l} ${Ys[o]}`}catch{e.textContent=`${c.toFixed(s)} ${Ys[o]}`}}var Gs,Ys,Mh,Js=y(()=>{Oe();Gs="data[data-format-bytes]",Ys=["B","KB","MB","GB","TB","PB"];document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ks()):Ks();Mh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Gs)&&Xs(s),s.querySelectorAll(Gs).forEach(n=>Xs(n))}});Mh.observe(document.documentElement,{childList:!0,subtree:!0})});var Lo={};S(Lo,{initSpoilers:()=>Qs});function Qs(e=document){e.querySelectorAll(Zs).forEach(tn)}function tn(e){if(e.hasAttribute("data-spoiler-init"))return;e.setAttribute("data-spoiler-init","");let t=e.getAttribute("data-spoiler")||"blur";e.getAttribute("data-spoiler")||e.setAttribute("data-spoiler","blur");let i=To.has(e.tagName),s=i?"span":"div";e.setAttribute("role","group"),e.setAttribute("aria-label","Spoiler");let n=document.createElement(s);for(n.setAttribute("data-spoiler-content",""),n.setAttribute("inert","");e.firstChild;)n.appendChild(e.firstChild);e.appendChild(n);let r=e.getAttribute("data-spoiler-label")||"Reveal spoiler",a;i?(a=document.createElement("span"),a.setAttribute("role","button"),a.setAttribute("tabindex","0")):(a=document.createElement("button"),a.setAttribute("type","button")),a.setAttribute("data-spoiler-trigger",""),a.setAttribute("aria-expanded","false");let o=document.createElement("span");o.setAttribute("data-spoiler-label",""),o.textContent=r,a.appendChild(o),e.appendChild(a),a.addEventListener("click",()=>ko(e)),i&&a.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),ko(e))}),e.addEventListener("keydown",c=>{c.key==="Escape"&&e.hasAttribute("data-spoiler-visible")&&(c.stopPropagation(),$e(e))})}function ko(e){let t=e.getAttribute("data-spoiler-group");t&&document.querySelectorAll(`[data-spoiler-group="${t}"][data-spoiler-visible]`).forEach(n=>{n!==e&&$e(n)});let i=e.querySelector("[data-spoiler-content]"),s=e.querySelector("[data-spoiler-trigger]");if(i&&i.removeAttribute("inert"),s&&(s.setAttribute("aria-expanded","true"),s.hidden=!0),e.setAttribute("data-spoiler-visible",""),!e.hasAttribute("data-spoiler-persist")){let n=To.has(e.tagName),r;n?(r=document.createElement("span"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),$e(e))})):(r=document.createElement("button"),r.setAttribute("type","button")),r.setAttribute("data-spoiler-hide",""),r.textContent="Hide",r.addEventListener("click",()=>$e(e)),e.appendChild(r)}Nh("Spoiler revealed"),e.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!0}}))}function $e(e){if(e.hasAttribute("data-spoiler-persist"))return;let t=e.querySelector("[data-spoiler-content]"),i=e.querySelector("[data-spoiler-trigger]"),s=e.querySelector("[data-spoiler-hide]");t&&t.setAttribute("inert",""),i&&(i.setAttribute("aria-expanded","false"),i.hidden=!1,i.focus()),s&&s.remove(),e.removeAttribute("data-spoiler-visible"),e.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!1}}))}function Nh(e){let t=document.createElement("div");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),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.textContent=e,document.body.appendChild(t),setTimeout(()=>t.remove(),1e3)}var Zs,To,_h,en=y(()=>{Zs="[data-spoiler]",To=new Set(["SPAN","EM","STRONG","CODE","A","B","I","S","U","SMALL","SUB","SUP","MARK","ABBR","Q","CITE","DFN","SAMP","VAR","KBD","BDI","BDO","DATA","TIME","WBR"]);document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Qs()):Qs();_h=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Zs)&&tn(s),s.querySelectorAll(Zs).forEach(tn)}});_h.observe(document.documentElement,{childList:!0,subtree:!0})});var Mo={};S(Mo,{initSplitters:()=>nn});function nn(e=document){e.querySelectorAll(sn).forEach(rn)}function rn(e){if(e.hasAttribute("data-splitter-init"))return;e.setAttribute("data-splitter-init","");let t=[...e.children];if(t.length<2)return;let i=t[0],s=t[1],n=e.getAttribute("data-splitter")==="vertical",r=Number(i.dataset.min)||10,a=Number(i.dataset.max)||90,o=document.createElement("div");o.className="split-divider",o.setAttribute("role","separator"),o.setAttribute("aria-orientation",n?"vertical":"horizontal"),o.setAttribute("aria-valuenow","50"),o.setAttribute("aria-valuemin",String(r)),o.setAttribute("aria-valuemax",String(a)),o.setAttribute("aria-label","Resize panels"),o.setAttribute("tabindex","0"),e.insertBefore(o,s),i.style.flexBasis="50%",i.style.flexGrow="0",i.style.flexShrink="0",i.style.overflow="auto",s.style.flexGrow="1",s.style.overflow="auto";let c=!1;function l(d){let u=Math.min(a,Math.max(r,d));i.style.flexBasis=`${u}%`,o.setAttribute("aria-valuenow",String(Math.round(u))),e.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:u},bubbles:!0}))}o.addEventListener("pointerdown",d=>{d.preventDefault(),c=!0,o.setPointerCapture(d.pointerId),e.style.userSelect="none"}),o.addEventListener("pointermove",d=>{if(!c)return;let u=e.getBoundingClientRect(),h;n?h=(d.clientY-u.top)/u.height*100:h=(d.clientX-u.left)/u.width*100,l(h)}),o.addEventListener("pointerup",d=>{c=!1,o.releasePointerCapture(d.pointerId),e.style.userSelect=""}),o.addEventListener("keydown",d=>{let u=d.shiftKey?10:1,h=Number(o.getAttribute("aria-valuenow")),f=n?["ArrowUp"]:["ArrowLeft"],g=n?["ArrowDown"]:["ArrowRight"];f.includes(d.key)?(d.preventDefault(),l(h-u)):g.includes(d.key)?(d.preventDefault(),l(h+u)):d.key==="Home"?(d.preventDefault(),l(r)):d.key==="End"&&(d.preventDefault(),l(a))})}var sn,Dh,an=y(()=>{sn="[data-splitter]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>nn()):nn();Dh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(sn)&&rn(s),s.querySelectorAll(sn).forEach(rn)}});Dh.observe(document.documentElement,{childList:!0,subtree:!0})});var No={};S(No,{initSwitches:()=>ln});function cn(e){e.hasAttribute("data-switch-init")||(e.setAttribute("data-switch-init",""),e.setAttribute("role","switch"))}function ln(e=document){e.querySelectorAll(on).forEach(cn)}var on,Ih,dn=y(()=>{on='input[type="checkbox"][data-switch]';document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ln()):ln();Ih=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(on)&&cn(s),s.querySelectorAll(on).forEach(n=>cn(n))}});Ih.observe(document.documentElement,{childList:!0,subtree:!0})});function Oh(e){for(let[t,i]of Be)e.querySelectorAll(t).forEach(i)}function qh(e){if(e.nodeType!==Node.ELEMENT_NODE)return;let t=e;for(let[i,s]of Be)t.matches(i)&&s(t),t.querySelectorAll(i).forEach(s)}function $h(){un||(un=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes)qh(i)}),un.observe(document.documentElement,{childList:!0,subtree:!0}))}function Bh(){Pe||(Pe=!0,Oh(document))}function C(e,t){Be.set(e,t),$h(),Pe||document.readyState!=="loading"?(Pe=!0,document.querySelectorAll(e).forEach(t)):Be.size===1&&document.addEventListener("DOMContentLoaded",Bh)}var Be,un,Pe,$=y(()=>{Be=new Map,un=null,Pe=!1});var Io={};S(Io,{initTextareaCounts:()=>Ph});function Do(e){if(e.hasAttribute("data-count-init"))return;e.setAttribute("data-count-init","");let t=e.dataset.count==="words",i=t?parseInt(e.dataset.maxwords??"0",10)||0:e.maxLength>0?e.maxLength:0,s=document.createElement("output");s.className="textarea-counter",s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true");let n=e.closest("form-field");n?n.appendChild(s):e.insertAdjacentElement("afterend",s);function r(){let a=e.value,o=t?a.trim()?a.trim().split(/\s+/).length:0:a.length;if(i>0){s.textContent=`${o} / ${i}`;let c=o/i;s.dataset.state=c>=1?"error":c>=.8?"warning":""}else{let c=t?o===1?"word":"words":o===1?"character":"characters";s.textContent=`${o} ${c}`,s.dataset.state=""}}e.addEventListener("input",r),r()}function Ph(e=document){e.querySelectorAll(_o).forEach(Do)}var _o,hn=y(()=>{$();_o="textarea[data-count]";C(_o,Do)});var $o={};S($o,{initTextareaGrow:()=>Rh});function qo(e){if(e.hasAttribute("data-grow-init"))return;e.setAttribute("data-grow-init","");let t=parseInt(e.dataset.maxRows??"0",10)||0;if(e.style.resize="none",Fh){e.style.fieldSizing="content",t>0&&(e.style.maxBlockSize=`${t}lh`);return}e.style.overflow="hidden";function i(){e.style.blockSize="auto";let s=e.scrollHeight;if(t>0){let n=getComputedStyle(e),r=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2,a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=r*t+a;s>o?(s=o,e.style.overflow="auto"):e.style.overflow="hidden"}e.style.blockSize=s+"px"}e.addEventListener("input",i),e.addEventListener("change",i),i()}function Rh(e=document){e.querySelectorAll(Oo).forEach(qo)}var Oo,Fh,fn=y(()=>{$();Oo="textarea[data-grow]",Fh=CSS.supports("field-sizing","content");C(Oo,qo)});var Fo={};S(Fo,{initConditionalFields:()=>mn});function pn(e){let t=e.indexOf("=");return t===-1?{name:e,value:null}:{name:e.slice(0,t),value:e.slice(t+1)}}function Hh(e,t){let i=t.querySelectorAll(`[name="${CSS.escape(e)}"]`);if(!i.length)return"";let s=i[0];if(s.type==="radio"){let n=Array.from(i).find(r=>r.checked);return n?n.value:""}return s.type==="checkbox"?s.checked?s.value||"true":"":s.value}function Bo(e,t){let i=Hh(e.name,t);return e.value===null?i!=="":i===e.value}function Re(e){let t=e.closest("form")||document,i;if(e.dataset.showWhen){let s=pn(e.dataset.showWhen);i=Bo(s,t)}else if(e.dataset.hideWhen){let s=pn(e.dataset.hideWhen);i=!Bo(s,t)}i?(e.removeAttribute("hidden"),e.removeAttribute("inert")):(e.setAttribute("hidden",""),e.setAttribute("inert",""))}function mn(e=document){let t=e.querySelectorAll(Fe);t.forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),Re(n))});let i=new Set;t.forEach(n=>{let r=n.closest("form");r&&!r.hasAttribute("data-conditional-listener")&&(r.setAttribute("data-conditional-listener",""),i.add(r))}),(i.size?[...i]:[document]).forEach(n=>{n.addEventListener("change",Po),n.addEventListener("input",Po)})}function Po(e){let t=e.target.name;if(!t)return;(e.target.closest("form")||document).querySelectorAll(Fe).forEach(n=>{let r=n.dataset.showWhen||n.dataset.hideWhen||"";pn(r).name===t&&Re(n)})}var Fe,zh,bn=y(()=>{Fe="[data-show-when], [data-hide-when]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>mn()):mn();zh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Fe)&&(s.hasAttribute("data-conditional-init")||(s.setAttribute("data-conditional-init",""),Re(s))),s.querySelectorAll(Fe).forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),Re(n))})}});zh.observe(document.documentElement,{childList:!0,subtree:!0})});var zo={};S(zo,{initRangeSliders:()=>Vh});function Ho(e){if(e.hasAttribute("data-range-init"))return;e.setAttribute("data-range-init","");let t=e.dataset.prefix||"",i=e.dataset.suffix||"",s=e.hasAttribute("data-bubble"),n=document.createElement("div");if(n.className="range-wrapper",!e.parentNode)return;e.parentNode.insertBefore(n,e),n.appendChild(e);function r(){let d=parseFloat(e.min)||0,u=parseFloat(e.max)||100,h=(parseFloat(e.value)-d)/(u-d);n.style.setProperty("--range-pct",`${h*100}%`),n.style.setProperty("--range-frac",String(h))}let a;s&&(a=document.createElement("output"),a.className="range-bubble",a.setAttribute("for",e.id||""),n.appendChild(a));function o(){a&&(a.textContent=`${t}${e.value}${i}`)}if(e.hasAttribute("data-markers")){let d=parseFloat(e.min)||0,u=parseFloat(e.max)||100,h=parseFloat(e.step)||1,f=document.createElement("div");f.className="range-markers";let g=Math.round((u-d)/h);for(let p=0;p<=g;p++)f.appendChild(document.createElement("span"));n.appendChild(f)}let c=e.getAttribute("list");if(c){let d=document.getElementById(c);if(d){let u=document.createElement("div");u.className="range-labels";let h=parseFloat(e.min)||0,f=parseFloat(e.max)||100;Array.from(d.options).forEach(g=>{let p=document.createElement("span");p.textContent=g.label||g.value,p.style.setProperty("--range-frac",String((parseFloat(g.value)-h)/(f-h))),u.appendChild(p)}),n.appendChild(u)}}function l(){r(),o()}e.addEventListener("input",l),l()}function Vh(e=document){e.querySelectorAll(Ro).forEach(Ho)}var Ro,gn=y(()=>{$();Ro='input[type="range"][data-range]';C(Ro,Ho)});var Vo={};S(Vo,{initUploadZones:()=>wn});function Uh(e){if(e===0)return"0 B";let t=["B","KB","MB","GB"],i=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,i)).toFixed(i>0?1:0)} ${t[i]}`}function yn(e){if(e.hasAttribute("data-upload-init"))return;e.setAttribute("data-upload-init","");let t=e.hasAttribute("multiple"),i=e.getAttribute("accept")||"",s=document.createElement("div");if(s.className="upload-zone",s.setAttribute("role","presentation"),!e.parentNode)return;e.parentNode.insertBefore(s,e),s.appendChild(e);let n=document.createElement("div");n.className="upload-prompt",n.innerHTML=`
3
3
  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
4
4
  <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
5
5
  <polyline points="17 8 12 3 7 8"/>
@@ -7,15 +7,15 @@ var Wl=Object.defineProperty;var w=(e,t)=>()=>(e&&(t=e(e=0)),t);var A=(e,t)=>{fo
7
7
  </svg>
8
8
  <span>Drag files here or <button type="button" class="upload-browse">browse</button></span>
9
9
  ${i?`<small>${i.replace(/\./g,"").toUpperCase().replace(/,/g,", ")}</small>`:""}
10
- `,s.appendChild(n);let r=document.createElement("ul");r.className="upload-file-list",r.setAttribute("aria-label","Selected files"),s.appendChild(r);let a=n.querySelector(".upload-browse");if(!a)return;a.addEventListener("click",()=>e.click()),s.addEventListener("click",c=>{(c.target===s||c.target===n||c.target.closest(".upload-prompt"))&&e.click()});let o=0;s.addEventListener("dragenter",c=>{c.preventDefault(),o++,s.dataset.dragover=""}),s.addEventListener("dragleave",()=>{o--,o===0&&delete s.dataset.dragover}),s.addEventListener("dragover",c=>{c.preventDefault()}),s.addEventListener("drop",c=>{c.preventDefault(),o=0,delete s.dataset.dragover,c.dataTransfer&&c.dataTransfer.files.length&&(e.files=c.dataTransfer.files,e.dispatchEvent(new Event("change",{bubbles:!0})))}),e.addEventListener("change",()=>{r.innerHTML="";let c=Array.from(e.files??[]);if(c.length===0){r.hidden=!0;return}r.hidden=!1,c.forEach(d=>{let l=document.createElement("li");l.innerHTML=`
11
- <span class="upload-file-name">${Zu(d.name)}</span>
12
- <span class="upload-file-size">${Ju(d.size)}</span>
13
- `,r.appendChild(l)})})}function Zu(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML}function nn(e=document){e.querySelectorAll(en).forEach(sn)}var en,Qu,rn=w(()=>{en='input[type="file"][data-upload]';document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>nn()):nn();Qu=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(en)&&sn(s),s.querySelectorAll(en).forEach(n=>sn(n))}});Qu.observe(document.documentElement,{childList:!0,subtree:!0})});var vo={};A(vo,{initAutosave:()=>ln});function eh(e){let t=e.dataset.autosave;if(typeof t=="string"&&t.trim()!=="")return t.trim();let i=(e.method||"get").toLowerCase(),s=e.action||(typeof location<"u"?location.href:"");return`${i} ${s}`}function ih(e){let t=e.dataset.autosaveRetain;if(typeof t!="string")return null;let i=t.trim();return i===""?null:new Set(i.split(/\s+/))}function cn(e){if(e.hasAttribute("data-autosave-init"))return;e.setAttribute("data-autosave-init","");let t=eh(e),i=ih(e),s;function n(l){return i===null||i.has(l)}function r(){let l={},u=e.elements;for(let h of u){let f=h;f.name&&(f.type==="password"||f.type==="file"||n(f.name)&&(f.type==="checkbox"?l[f.name]=f.checked?"on":"":f.type==="radio"?f.checked&&(l[f.name]=f.value):f instanceof HTMLSelectElement&&f.multiple?l[f.name]=Array.from(f.selectedOptions).map(v=>v.value):l[f.name]=f.value))}return l}function a(){S.set(an,t,r()).catch(()=>{})}async function o(){let l=await S.get(an,t,{maxAge:th});if(!l)return!1;let u=!1;for(let[h,f]of Object.entries(l)){if(!n(h))continue;let v=e.querySelectorAll(`[name="${CSS.escape(h)}"]`);v.forEach(p=>{let m=p;if(m.type==="checkbox")m.checked=f==="on";else if(m.type==="radio")m.checked=m.value===f;else if(m instanceof HTMLSelectElement&&m.multiple){let y=Array.isArray(f)?f:[f];Array.from(m.options).forEach(k=>{k.selected=y.includes(k.value)})}else typeof f=="string"&&(m.value=f)}),v.length&&(u=!0)}return u}function c(){S.remove(an,t).catch(()=>{})}function d(){if(customElements.get("toast-msg")){let l=document.createElement("toast-msg");l.setAttribute("variant","info"),l.setAttribute("duration","3000"),l.textContent="Draft restored",document.body.appendChild(l)}}o().then(l=>{l&&(d(),Array.from(e.elements).forEach(u=>{let h=u;h.name&&h.type!=="password"&&h.type!=="file"&&h.dispatchEvent(new Event("input",{bubbles:!0}))}))}),e.addEventListener("input",()=>{clearTimeout(s),s=setTimeout(a,go)}),e.addEventListener("change",()=>{clearTimeout(s),s=setTimeout(a,go)}),e.addEventListener("submit",c),e.addEventListener("reset",()=>{setTimeout(c,0)})}function ln(e=document){e.querySelectorAll(on).forEach(cn)}var on,an,go,th,sh,dn=w(()=>{X();on="form[data-autosave]",an="autosave",go=500,th=1440*60*1e3;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ln()):ln();sh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(on)&&cn(s),s.querySelectorAll(on).forEach(cn)}});sh.observe(document.documentElement,{childList:!0,subtree:!0})});var xo={};A(xo,{initMaskInputs:()=>ch});function rh(e){let t=e.dataset.mask;if(yo[t])return yo[t];if(t==="custom"&&e.dataset.pattern){let i=e.dataset.pattern,s=new Set;for(let r of i)r==="#"?s.add("0-9"):r==="A"?s.add("a-zA-Z"):r==="*"&&s.add("a-zA-Z0-9");let n=s.size>0?new RegExp(`[${[...s].join("")}]`):/./;return{pattern:i,accept:n}}return null}function _e(e){return e==="#"||e==="A"||e==="*"}function ah(e,t){let i=nh[e];return i?i.test(t):!1}function wo(e,t){let i="",s=0;for(let n=0;n<t.length&&s<e.length;n++){let r=t[n];if(_e(r)){for(;s<e.length&&!ah(r,e[s]);)s++;s<e.length&&(i+=e[s],s++)}else i+=r}return i}function Eo(e,t){return e.split("").filter(i=>t.test(i)).join("")}function oh(e){for(let t of e)if(_e(t)&&t!=="#")return!1;return!0}function So(e){if(e.hasAttribute("data-mask-init"))return;e.setAttribute("data-mask-init","");let t=rh(e);if(!t)return;let{pattern:i}=t,s=t.accept;oh(i)&&!e.getAttribute("inputmode")&&e.setAttribute("inputmode","numeric"),e.getAttribute("maxlength")||e.setAttribute("maxlength",String(i.length));let n=!1;e.addEventListener("compositionstart",()=>{n=!0}),e.addEventListener("compositionend",()=>{n=!1,r()});function r(){if(n)return;let a=e.selectionStart??0,o=0;for(let h=0;h<a&&h<e.value.length;h++)s.test(e.value[h])&&o++;let c=Eo(e.value,s),d=wo(c,i);e.value=d,e.dataset.rawValue=c;let l=0,u=d.length;for(let h=0;h<d.length;h++)if(h<i.length&&_e(i[h])&&(l++,l===o)){for(u=h+1;u<i.length&&!_e(i[u]);)u++;break}e.setSelectionRange(u,u)}if(e.addEventListener("input",r),e.value){let a=Eo(e.value,s);e.value=wo(a,i),e.dataset.rawValue=a}}function ch(e=document){e.querySelectorAll(Ao).forEach(So)}var Ao,yo,nh,un=w(()=>{q();Ao="input[data-mask]",yo={phone:{pattern:"(###) ###-####",accept:/\d/},"credit-card":{pattern:"#### #### #### ####",accept:/\d/},date:{pattern:"##/##/####",accept:/\d/},ssn:{pattern:"###-##-####",accept:/\d/},zip:{pattern:"#####",accept:/\d/}},nh={"#":/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/};C(Ao,So)});var To={};A(To,{initAcceptInputs:()=>hh});function dh(e){if(!e)return null;let t=lh[e];if(t)return{regex:new RegExp(t.pattern),inputmode:t.inputmode};if(e.startsWith("["))try{return{regex:new RegExp(e),inputmode:"text"}}catch{return console.warn(`[data-accept] Invalid character class: ${e}`),null}return console.warn(`[data-accept] Unknown preset: ${e}`),null}function ko(e){if(e.hasAttribute("data-accept-init"))return;if(e.setAttribute("data-accept-init",""),e.hasAttribute("data-mask")){console.warn("[data-accept] Conflict: data-mask is also present \u2014 deferring to mask.",e);return}let t=dh(e.dataset.accept||"");if(!t)return;let{regex:i,inputmode:s}=t;e.dataset.acceptPattern=i.source,e.getAttribute("inputmode")||e.setAttribute("inputmode",s);let n=!1;e.addEventListener("compositionstart",()=>{n=!0}),e.addEventListener("compositionend",()=>{n=!1,r()}),e.addEventListener("beforeinput",a=>{if(n)return;let o=a.data;if(o!=null){if(a.inputType==="insertFromPaste"){let c=o.split("").filter(d=>i.test(d)).join("");if(c===o||(a.preventDefault(),!c))return;document.execCommand("insertText",!1,c)||uh(e,c);return}if(a.inputType==="insertText"||a.inputType==="insertCompositionText"){for(let c of o)if(!i.test(c)){a.preventDefault();return}}}}),e.addEventListener("input",()=>{n||r()});function r(){let a=e.value,o=a.split("").filter(u=>i.test(u)).join("");if(o===a)return;let c=e.selectionStart??0,d=0;for(let u=0;u<c&&u<a.length;u++)i.test(a[u])&&d++;e.value=o;let l=Math.min(d,o.length);e.setSelectionRange(l,l)}if(e.value){let a=e.value.split("").filter(o=>i.test(o)).join("");a!==e.value&&(e.value=a)}}function uh(e,t){let i=e.selectionStart??0,s=e.selectionEnd??0,n=e.value.slice(0,i),r=e.value.slice(s);e.value=n+t+r;let a=i+t.length;e.setSelectionRange(a,a),e.dispatchEvent(new Event("input",{bubbles:!0}))}function hh(e=document){e.querySelectorAll(Co).forEach(ko)}var Co,lh,hn=w(()=>{q();Co="input[data-accept]",lh={digits:{pattern:"[0-9]",inputmode:"numeric"},alpha:{pattern:"[a-zA-Z]",inputmode:"text"},alphanum:{pattern:"[a-zA-Z0-9]",inputmode:"text"},phone:{pattern:"[0-9+()\\- ]",inputmode:"tel"},date:{pattern:"[0-9/\\-.]",inputmode:"numeric"},hex:{pattern:"[0-9a-fA-F]",inputmode:"text"},currency:{pattern:"[0-9.,]",inputmode:"decimal"},cc:{pattern:"[0-9 \\-]",inputmode:"numeric"}};C(Co,ko)});var Lo={};A(Lo,{initToggleTags:()=>mn});function pn(e){if(e.hasAttribute("data-toggle-tags-init"))return;e.setAttribute("data-toggle-tags-init","");let t=parseInt(e.dataset.max,10);if(!t||t<1)return;function i(){let s=e.querySelectorAll('input[type="checkbox"]'),n=e.querySelectorAll('input[type="checkbox"]:checked').length;s.forEach(r=>{r.checked||(r.disabled=n>=t)})}e.addEventListener("change",i),i()}function mn(e=document){e.querySelectorAll(fn).forEach(pn)}var fn,fh,bn=w(()=>{fn="fieldset[data-toggle-tags][data-max]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>mn()):mn();fh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(fn)&&pn(s),s.querySelectorAll(fn).forEach(pn)}});fh.observe(document.documentElement,{childList:!0,subtree:!0})});var _o={};A(_o,{initNumberSteppers:()=>bh});function Mo(e){if(e.hasAttribute("data-stepper-init"))return;e.setAttribute("data-stepper-init","");let t=document.createElement("div");t.className="number-wrapper",e.parentNode.insertBefore(t,e);let i=document.createElement("button");i.type="button",i.className="number-dec",i.innerHTML=ph,i.setAttribute("aria-label","Decrease"),i.tabIndex=-1;let s=document.createElement("button");s.type="button",s.className="number-inc",s.innerHTML=mh,s.setAttribute("aria-label","Increase"),s.tabIndex=-1,t.appendChild(i),t.appendChild(e),t.appendChild(s);function n(a){let o=e.min!==""?parseFloat(e.min):-1/0,c=e.max!==""?parseFloat(e.max):1/0,d=parseFloat(e.step)||1,l=parseFloat(e.value)||0,u=(d.toString().split(".")[1]||"").length,h=parseFloat((l+d*a).toFixed(u)),f=Math.min(Math.max(h,o),c);e.value=f,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})),r()}function r(){let a=e.min!==""?parseFloat(e.min):-1/0,o=e.max!==""?parseFloat(e.max):1/0,c=parseFloat(e.value)||0;i.disabled=c<=a,s.disabled=c>=o}i.addEventListener("click",()=>n(-1)),s.addEventListener("click",()=>n(1)),e.addEventListener("input",r),r()}function bh(e=document){e.querySelectorAll(No).forEach(Mo)}var No,ph,mh,gn=w(()=>{q();No='input[type="number"][data-stepper]',ph='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="5" y1="12" x2="19" y2="12"/></svg>',mh='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';C(No,Mo)});var Bo={};A(Bo,{initSelectAll:()=>En});function En(e=document){e.querySelectorAll(wn).forEach(An)}function An(e){if(e.hasAttribute("data-select-all-init"))return;e.setAttribute("data-select-all-init","");let t=e.dataset.selectAll??"";if(!t)return;function i(){return(e.closest("[data-select-all-scope]")||e.closest("table, form, fieldset")||document).querySelectorAll(t)}function s(){let a=i(),o=a.length,c=0;a.forEach(u=>{u.checked&&c++}),c===0?(e.checked=!1,e.indeterminate=!1):c===o?(e.checked=!0,e.indeterminate=!1):(e.checked=!1,e.indeterminate=!0);let l=(e.closest("[data-select-all-scope]")||e.closest("table, form, fieldset")||document).querySelector("[data-selected-count]");l&&(l.textContent=String(c)),e.dispatchEvent(new CustomEvent("select-all:change",{bubbles:!0,detail:{checked:c,total:o,selected:[...a].filter(u=>u.checked)}}))}let n=!1;e.addEventListener("change",()=>{n=!0;let a=e.checked;i().forEach(c=>{c.checked=a,c.dispatchEvent(new Event("change",{bubbles:!0}))}),n=!1,e.indeterminate=!1,s()}),(e.closest("[data-select-all-scope]")||e.closest("table, form, fieldset")||document).addEventListener("change",a=>{n||a.target!==e&&a.target.matches?.(t)&&s()}),s()}var wn,Ah,Sn=w(()=>{wn="[data-select-all]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>En()):En();Ah=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(wn)&&An(s),s.querySelectorAll(wn).forEach(n=>An(n))}});Ah.observe(document.documentElement,{childList:!0,subtree:!0})});var Fo={};A(Fo,{initMath:()=>Cn});function Cn(e=document){e.querySelectorAll(xn).forEach(kn)}function Sh(e){let t=e.getAttribute("data-math")||"";return new Set(t.split(/\s+/).filter(Boolean))}function kn(e){if(e.hasAttribute("data-math-init"))return;e.setAttribute("data-math-init",""),!e.hasAttribute("data-math")&&e.classList.contains("language-math")&&e.setAttribute("data-math","");let t=Sh(e),i=e.getAttribute("data-mathml"),s=e.textContent.trim(),n=t.has("inline");if(!i){e.setAttribute("data-math-state","source");return}let r=n?document.createElement("span"):document.createElement("div");r.setAttribute("data-math-rendered",""),r.innerHTML=i;let a=e.id||null;a&&(r.id=a,e.removeAttribute("id"));let o=r.querySelector("math");o&&!n&&o.setAttribute("display","block");let c=null;t.has("numbered")&&(Po++,c=Po,r.setAttribute("data-math-numbered",""),r.setAttribute("data-equation-number",String(c)),a&&window.VBMath?.equations.push({id:a,number:c,latex:s})),t.has("copyable")&&(r.setAttribute("data-math-copyable",""),r.style.cursor="copy",r.addEventListener("click",async()=>{try{await navigator.clipboard.writeText(s),Ch("Copied to clipboard",r)}catch{}})),e.setAttribute("data-math-state","rendered"),e.insertAdjacentElement("afterend",r);let d=e.closest("pre");d?(d.setAttribute("data-math-state","rendered"),d.hidden=!0):e.hidden=!0,xh(),e.dispatchEvent(new CustomEvent("math:rendered",{bubbles:!0,detail:{latex:s,inline:n,number:c}}))}function xh(){if(document.querySelector("[data-vb-math-font]"))return;let e=document.createElement("link");e.rel="stylesheet",e.href="/fonts/math-fonts.css",e.setAttribute("data-vb-math-font",""),document.head.appendChild(e)}function Ch(e,t){let i=document.createElement("div");i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.className="visually-hidden",i.textContent=e,t.appendChild(i),setTimeout(()=>i.remove(),1e3)}var xn,Po,kh,Tn=w(()=>{xn="[data-math], code.language-math",Po=0;window.VBMath=window.VBMath||{equations:[]};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Cn()):Cn();kh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(xn)&&kn(s),s.querySelectorAll(xn).forEach(kn)}});kh.observe(document.documentElement,{childList:!0,subtree:!0})});var Xo={};A(Xo,{WizardController:()=>Oe,initWizards:()=>$n});function qn(e){if(e.hasAttribute("data-wizard-enhanced"))return;let t=new Oe(e);e.wizardController=t,e.wizardGoTo=i=>t.goTo(i),e.wizardNext=()=>t.next(),e.wizardPrev=()=>t.prev(),e.wizardReset=()=>t.reset()}function $n(){document.querySelectorAll("form[data-wizard]").forEach(e=>{qn(e)})}function Ko(){new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches("form[data-wizard]")&&qn(n),n.querySelectorAll?.("form[data-wizard]:not([data-wizard-enhanced])").forEach(r=>{qn(r)})}}).observe(document.documentElement,{childList:!0,subtree:!0})}var Oe,Jo=w(()=>{Oe=class{#e;#t=[];#i=0;#s=null;#r=null;#n=null;#a=!1;#c="step";#o=null;#f="";#h=0;#p=0;constructor(t){if(!t||!(t instanceof HTMLFormElement))throw new Error("WizardController requires a form element");this.#e=t,this.#u()}#u(){if(this.#t=Array.from(this.#e.querySelectorAll("fieldset[data-wizard-step]")),this.#t.length===0){console.warn("Wizard form has no steps");return}this.#a=this.#e.hasAttribute("data-wizard-history"),this.#c=this.#e.getAttribute("data-wizard-validate")||"step",this.#l(),this.#s=this.#e.querySelector("[data-wizard-progress]"),this.#g(),this.#C(),this.#b(),this.#e.setAttribute("data-wizard-enhanced",""),this.#e.setAttribute("data-wizard-total",String(this.#t.length)),this.#B(),this.#S(),this.#q();let t=()=>{cancelAnimationFrame(this.#h),this.#h=requestAnimationFrame(()=>this.#A())};if(this.#e.addEventListener("change",t),this.#e.addEventListener("input",t),this.#o&&(this.#e.addEventListener("change",()=>this.#d()),this.#e.addEventListener("input",()=>this.#d())),this.#e.addEventListener("submit",i=>this.#v(i)),this.#e.addEventListener("reset",()=>{requestAnimationFrame(()=>this.reset())}),this.#a){let i=this.#_();i!==null&&i>=0&&i<this.#t.length&&(this.#i=i),window.addEventListener("hashchange",()=>{let s=this.#_();s!==null&&s!==this.#i&&this.goTo(s)})}this.#y(),this.#A(),this.#$()}#l(){let t=this.#e.getAttribute("data-wizard-persist");if(t){if(!this.#e.id){console.warn("Wizard persistence requires an id on the form element");return}this.#f=`vb-wizard:${this.#e.id}`,t==="local"?this.#o=localStorage:this.#o=sessionStorage}}#m(){if(!this.#o)return;let t={},i=new FormData(this.#e);for(let[s,n]of i.entries())t[s]!==void 0?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(n)):t[s]=n;try{this.#o.setItem(this.#f,JSON.stringify({step:this.#i,data:t}))}catch{}}#d(){this.#o&&(cancelAnimationFrame(this.#p),this.#p=requestAnimationFrame(()=>this.#m()))}#y(){if(this.#o)try{let t=this.#o.getItem(this.#f);if(!t)return;let i=JSON.parse(t);if(!i||typeof i!="object")return;if(i.data&&typeof i.data=="object")for(let[s,n]of Object.entries(i.data)){let r=this.#e.elements.namedItem(s);if(r)if(r instanceof RadioNodeList)r.value=n;else if(r instanceof HTMLInputElement)if(r.type==="checkbox"){let a=Array.isArray(n)?n:[n];r.checked=a.includes(r.value||"on")}else r.type==="radio"?r.checked=r.value===n:r.value=n;else(r instanceof HTMLSelectElement||r instanceof HTMLTextAreaElement)&&(r.value=n)}typeof i.step=="number"&&i.step>=0&&i.step<this.#t.length&&(this.#i=i.step)}catch{}}#w(){this.#o&&(cancelAnimationFrame(this.#p),this.#o.removeItem(this.#f))}#v(t){let i=this.#k();this.#i===i.length-1&&(this.#O("wizard:complete"),this.#w())}#b(){this.#r=document.createElement("div"),this.#r.setAttribute("role","status"),this.#r.setAttribute("aria-live","polite"),this.#r.setAttribute("aria-atomic","true"),this.#r.setAttribute("data-wizard-status",""),this.#e.prepend(this.#r)}#g(){let t=this.#e.getAttribute("data-wizard-steps");if(t){this.#n=document.querySelector(t);return}this.#n=this.#e.querySelector("nav.steps")}#C(){if(!this.#n)return;let t=this.#n.querySelector("ol");if(!(!t||t.children.length>0))for(let i of this.#t){let s=i.querySelector("legend"),n=document.createElement("li");n.textContent=s?.textContent||`Step ${this.#t.indexOf(i)+1}`,t.appendChild(n)}}#N(){if(!this.#n)return;let t=Array.from(this.#n.querySelectorAll("ol > li")),i=this.#k(),s=0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n],a=t[s];if(!a)break;if(r.hasAttribute("data-wizard-hidden")){a.setAttribute("hidden","");continue}else a.removeAttribute("hidden");let o=i.indexOf(r);if(a.removeAttribute("data-completed"),a.removeAttribute("aria-current"),a.removeAttribute("aria-disabled"),o<this.#i){a.setAttribute("data-completed",""),this.#L(a,o);let c=a.querySelector("a");if(c){let l=r.querySelector("legend")?.textContent||`Step ${o+1}`;c.setAttribute("aria-label",`Go to ${l} (completed)`)}}else o===this.#i?a.setAttribute("aria-current","step"):a.setAttribute("aria-disabled","true");s++}for(let n of t){if(n.hasAttribute("hidden"))continue;let r=n.querySelector("a, button")||n,a=n.hasAttribute("aria-current");r.setAttribute("tabindex",a?"0":"-1")}}#L(t,i){if(t.hasAttribute("data-wizard-nav-bound"))return;t.setAttribute("data-wizard-nav-bound","");let s=t.querySelector("a, button")||t;s.addEventListener("click",n=>{n.preventDefault(),this.goTo(i)}),s===t&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","0"),t.setAttribute("role","button"),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this.goTo(i))}))}#S(){let t=this.#e.querySelector("[data-wizard-prev]"),i=this.#e.querySelector("[data-wizard-next]");t?.addEventListener("click",s=>{s.preventDefault(),this.prev()}),i?.addEventListener("click",s=>{s.preventDefault(),this.next()})}#B(){if(this.#e.querySelector("[data-wizard-nav]"))return;let t=document.createElement("nav");t.setAttribute("data-wizard-nav","");let i=document.createElement("button");i.type="button",i.setAttribute("data-wizard-prev",""),i.textContent="Back";let s=document.createElement("button");s.type="button",s.setAttribute("data-wizard-next",""),s.textContent="Next";let n=document.createElement("button");n.type="submit",n.textContent="Submit",t.append(i,s,n),this.#e.appendChild(t)}#q(){this.#n&&this.#n.addEventListener("keydown",t=>{if(!this.#n)return;let i=Array.from(this.#n.querySelectorAll("ol > li:not([hidden])")),s=t.target.closest("li"),n=s?i.indexOf(s):-1;if(n===-1)return;let r;switch(t.key){case"ArrowRight":case"ArrowDown":r=Math.min(n+1,i.length-1);break;case"ArrowLeft":case"ArrowUp":r=Math.max(n-1,0);break;case"Home":r=0;break;case"End":r=i.length-1;break;default:return}t.preventDefault();let a=i[n].querySelector("a, button")||i[n],o=i[r].querySelector("a, button")||i[r];a.setAttribute("tabindex","-1"),o.setAttribute("tabindex","0"),o.focus()})}#k(){return this.#t.filter(t=>!t.hasAttribute("data-wizard-hidden"))}#I(){return this.#k()[this.#i]}#$(){let t=this.#k();this.#t.forEach(n=>{n.removeAttribute("data-wizard-active")});let i=t[this.#i];i&&i.setAttribute("data-wizard-active","");let s=this.#i+1;this.#e.setAttribute("data-wizard-current",String(s)),this.#e.setAttribute("data-wizard-total",String(t.length)),this.#i===t.length-1?this.#e.setAttribute("data-wizard-last",""):this.#e.removeAttribute("data-wizard-last"),this.#R(),this.#N(),this.#a&&this.#T(),this.#E(),this.#P()}#R(){if(!this.#s)return;let t=this.#k();this.#s.max=t.length,this.#s.value=this.#i+1}#T(){let t=`#step=${this.#i+1}`;window.location.hash!==t&&history.replaceState(null,"",t)}#_(){let i=window.location.hash.match(/step=(\d+)/);return i?parseInt(i[1],10)-1:null}#E(){if(!this.#r)return;let s=this.#I()?.querySelector("legend")?.textContent||`Step ${this.#i+1}`,n=this.#k();this.#r.textContent=`Now on step ${this.#i+1} of ${n.length}: ${s}`}#x(){if(this.#c==="none")return!0;let t=this.#I();if(!t||t.hasAttribute("data-wizard-optional"))return!0;let i=t.querySelectorAll("input, select, textarea"),s=!0;for(let n of i){let r=n;if(!r.checkValidity()){r.reportValidity(),s=!1;break}}return s}#A(){this.#t.forEach(i=>{let s=i.getAttribute("data-wizard-if");if(!s)return;this.#M(s)?i.removeAttribute("data-wizard-hidden"):i.setAttribute("data-wizard-hidden","")});let t=this.#k();this.#i>=t.length&&(this.#i=Math.max(0,t.length-1)),this.#$()}#M(t){return t.includes("||")?t.split("||").some(i=>this.#M(i.trim())):t.includes("&&")?t.split("&&").every(i=>this.#H(i.trim())):this.#H(t)}#H(t){let i=t.startsWith("!"),s=i?t.slice(1):t;if(s.includes(":")){let[o,c]=s.split(":"),d=c.startsWith("!"),l=d?c.slice(1):c,u=this.#F(o);return d?u!==l:u===l}let a=!!this.#F(s);return i?!a:a}#F(t){let i=this.#e.elements.namedItem(t);return i?i instanceof RadioNodeList?i.value:i instanceof HTMLInputElement?i.type==="checkbox"?i.checked?i.value||"true":"":i.value:i instanceof HTMLSelectElement||i instanceof HTMLTextAreaElement?i.value:"":""}#P(){let t=this.#I();if(!t||!t.hasAttribute("data-wizard-summary"))return;let i=t.querySelectorAll("[data-wizard-field]");if(i.length>0){for(let r of i){let a=r.getAttribute("data-wizard-field")||"";r.textContent=this.#F(a)||"\u2014"}return}let s=t.querySelector("[data-wizard-summary-list]");s||(s=document.createElement("dl"),s.setAttribute("data-wizard-summary-list",""),t.appendChild(s)),s.innerHTML="";let n=new Set;for(let r of this.#t){if(r===t||r.hasAttribute("data-wizard-hidden"))continue;let a=r.querySelectorAll("input, select, textarea");for(let o of a){let c=o.name;if(!c||n.has(c))continue;n.add(c);let d=this.#F(c);if(!d)continue;let l=this.#V(o),u=document.createElement("dt");u.textContent=l||c;let h=document.createElement("dd");h.textContent=d,s.append(u,h)}}}#V(t){if(t.id){let n=this.#e.querySelector(`label[for="${CSS.escape(t.id)}"]`);if(n)return n.textContent.trim()}let i=t.closest("label");if(i){let n=i.cloneNode(!0);n.querySelectorAll("input, select, textarea").forEach(a=>a.remove());let r=n.textContent.trim();if(r)return r}let s=t.closest("form-field");if(s){let n=s.querySelector("label");if(n)return n.textContent.trim()}return""}#O(t,i={}){this.#e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}goTo(t){let i=this.#k();if(t<0||t>=i.length||t>this.#i&&!this.#x())return!1;let s=this.#i;return this.#i=t,this.#$(),this.#O("wizard:step-change",{from:s,to:t}),this.#d(),!0}next(){let t=this.#k();return this.#i>=t.length-1?!1:this.goTo(this.#i+1)}prev(){return this.#i<=0?!1:this.goTo(this.#i-1)}reset(){this.#i=0,this.#$(),this.#w(),this.#O("wizard:reset")}get currentStep(){return this.#i}get totalSteps(){return this.#k().length}get form(){return this.#e}};typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{$n(),Ko()}):($n(),Ko()))});var Qo={};A(Qo,{initMobileForms:()=>Zo});function Zo(e=document){return()=>{}}var tc=w(()=>{typeof document<"u"&&Zo()});var ic={};A(ic,{activateTrap:()=>jt,deactivateTrap:()=>$e,initFocusTraps:()=>Bn});function Bn(e=document){e.querySelectorAll(qe).forEach(t=>jt(t))}function jt(e){if(xt.has(e))return;let t=document.activeElement,i=e.getAttribute("data-focus-trap")==="no-autofocus";function s(r){if(r.key!=="Tab")return;let a=ec(e);if(!a.length)return;let o=a[0],c=a[a.length-1],d=document.activeElement;r.shiftKey&&d===o?(r.preventDefault(),c.focus()):!r.shiftKey&&d===c&&(r.preventDefault(),o.focus())}e.addEventListener("keydown",s);let n=()=>{e.removeEventListener("keydown",s)};xt.set(e,{cleanup:n,previousFocus:t}),i||requestAnimationFrame(()=>{let r=e.querySelector("[autofocus]");if(r)r.focus();else{let a=ec(e);a.length&&a[0].focus()}})}function $e(e){let t=xt.get(e);t&&(t.cleanup(),xt.delete(e),t.previousFocus&&t.previousFocus.isConnected&&t.previousFocus.focus())}function ec(e){return[...e.querySelectorAll(Rh)].filter(t=>t.offsetParent!==null)}var qe,Rh,xt,Hh,sc=w(()=>{qe="[data-focus-trap]",Rh='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled])',xt=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Bn()):Bn();Hh=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(qe)&&jt(s),s.querySelectorAll(qe).forEach(n=>jt(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;xt.has(s)&&$e(s),s.querySelectorAll(qe).forEach(n=>{xt.has(n)&&$e(n)})}if(t.type==="attributes"&&t.attributeName==="data-focus-trap"){let i=t.target;i.hasAttribute("data-focus-trap")?jt(i):$e(i)}}});Hh.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-focus-trap"]})});var Uh={};var zh,Vh,nc=w(()=>{zh=80,Vh=40;document.querySelectorAll("header[data-scroll-hide]").forEach(e=>{let t=0,i=!1,s=e.closest("main")??window,n=()=>s===window?window.scrollY:s.scrollTop,r=()=>{let a=n(),o=a-t;!i&&o>0&&a>zh?(e.setAttribute("data-hidden",""),i=!0):i&&o<-Vh&&(e.removeAttribute("data-hidden"),i=!1),t=a};s.addEventListener("scroll",r,{passive:!0})})});var ac={};A(ac,{initSpotlights:()=>rc});function Wh(e){if(e.__vbSpotlight)return;e.__vbSpotlight=!0;let t=s=>{let n=e.getBoundingClientRect();e.style.setProperty("--spotlight-x",((s.clientX-n.left)/n.width*100).toFixed(1)+"%"),e.style.setProperty("--spotlight-y",((s.clientY-n.top)/n.height*100).toFixed(1)+"%")},i=()=>{e.style.setProperty("--spotlight-x","50%"),e.style.setProperty("--spotlight-y","50%")};e.addEventListener("mousemove",t,{passive:!0}),e.addEventListener("mouseleave",i,{passive:!0})}function rc(e=document){e.querySelectorAll?.("[data-spotlight]").forEach(Wh)}var oc=w(()=>{rc()});var hc={};A(hc,{getHotkeyActions:()=>uc});function Yh(e){if(cc.has(e))return;cc.add(e);let t=e.getAttribute("data-hotkey");if(!t)return;let i=e.getAttribute("data-hotkey-action")||"click",s=lc[i]||lc.click,n=e.hasAttribute("data-hotkey-global"),r=e.getAttribute("data-hotkey-label")||e.textContent?.trim()||t,a=e.getAttribute("data-hotkey-group")||"Page Actions",o=mt(t,()=>s(e),{global:n});dc.set(e,{combo:t,label:r,group:a,unbind:o}),document.dispatchEvent(new CustomEvent("vb:command-registry-change",{detail:{action:"add",element:e}}))}function uc(){let e=new Map;for(let[t,i]of dc){let s=t;if(s.hidden||s.closest("[hidden]"))continue;let n=e.get(i.group)||[];n.push({label:i.label,shortcut:i.combo,element:t}),e.set(i.group,n)}return e}var jh,cc,dc,lc,fc=w(()=>{q();oe();jh="[data-hotkey]:not(kbd)",cc=new WeakSet,dc=new Map,lc={click(e){e.click()},focus(e){e.focus()},submit(e){let t=e.closest("form")||(e.tagName==="FORM"?e:null);t&&t.requestSubmit()},toggle(e){"open"in e?e.open=!e.open:e.hasAttribute("hidden")?e.removeAttribute("hidden"):e.setAttribute("hidden","")}};typeof window<"u"&&(window.__hotkeyActionRegistry={getHotkeyActions:uc});C(jh,Yh)});var bc={};A(bc,{collectLinksByRel:()=>Xh,upgradeBlankTargets:()=>mc});function pc(e){return new Set((e.getAttribute("rel")||"").split(/\s+/).filter(Boolean))}function Kh(e,t){e.setAttribute("rel",[...t].join(" "))}function mc(e=document){let t=document.documentElement?.dataset?.linkPrivacy==="strict";for(let i of e.querySelectorAll('a[href][target="_blank"]')){let s=pc(i),n=[...s].some(a=>Gh.has(a)),r=!1;n||(s.add("noopener"),r=!0),t&&!s.has("noreferrer")&&(s.add("noreferrer"),r=!0),r&&Kh(i,s)}}function Xh(e=document){let t=new Map;for(let i of e.querySelectorAll("a[rel]"))for(let s of pc(i)){let n=t.get(s)??[];n.push(i),t.set(s,n)}return t}var Gh,gc=w(()=>{Gh=new Set(["opener","noopener","noreferrer"]);mc(document)});var wc={};A(wc,{initResponsiveImages:()=>yc});function Zh(e,t){let i=e.lastIndexOf(".");if(i===-1)return"";let s=e.substring(0,i),n=e.substring(i);return t.map(r=>`${s}-${r}${n} ${r}w`).join(", ")}function Qh(e){let t=document.createElement("span");t.setAttribute("aria-hidden","true"),Object.assign(t.style,{position:"absolute",top:"4px",left:"4px",padding:"2px 6px",fontSize:"11px",fontFamily:"monospace",lineHeight:"1.4",background:"oklch(0.15 0 0 / 0.8)",color:"#0f0",borderRadius:"3px",zIndex:"1",pointerEvents:"none"});function i(){let r=(e.currentSrc||e.src).split("/").pop(),a=e.naturalWidth;t.textContent=`${r} (${a}px)`}e.addEventListener("load",i),e.complete&&i();let s=e.parentElement;return getComputedStyle(s).position==="static"&&(s.style.position="relative"),s.insertBefore(t,e),t}function tf(e){new ResizeObserver(i=>{for(let s of i){let n=Math.round(s.contentBoxSize?.[0]?.inlineSize??s.contentRect.width);n>0&&(e.sizes=`${n}px`)}}).observe(e)}function yc(e){if(vc.has(e))return;vc.add(e);let t=e.getAttribute("data-responsive");if(t){let i=t.split(",").map(s=>parseInt(s.trim(),10)).filter(s=>s>0);i.length&&e.src&&(e.srcset=Zh(e.src,i))}e.srcset&&e.srcset.includes("w")&&tf(e),e.hasAttribute("loading")||(e.loading="lazy"),e.hasAttribute("decoding")||(e.decoding="async"),e.hasAttribute("data-responsive-debug")&&Qh(e)}var Jh,vc,Ec=w(()=>{q();Jh="img[data-responsive]",vc=new WeakSet;C(Jh,yc)});var xc={};A(xc,{initFloatingLabels:()=>Sc});function Sc(e){if(Ac.has(e))return;Ac.add(e);let t=e.querySelector("input, textarea, select");t&&(t.hasAttribute("placeholder")||t.setAttribute("placeholder"," "),e.setAttribute("data-floating-label-ready",""))}var ef,Ac,Cc=w(()=>{q();ef="form-field[data-floating-label]",Ac=new WeakSet;C(ef,Sc)});var Tc={};A(Tc,{activate:()=>Pn,deactivate:()=>Be});function Pn(e){if(e.getAttribute("aria-busy")==="true")return;e._vbLoadingOriginal=e.innerHTML,e._vbLoadingWidth=e.offsetWidth,e.style.minInlineSize=`${e._vbLoadingWidth}px`;let t=e.getAttribute("data-loading"),i='<span class="vb-btn-spinner" aria-hidden="true"></span>';e.innerHTML=t?`${i} ${t}`:i,e.setAttribute("aria-busy","true"),e.disabled=!0,e.dataset.loadingActive="";let s=parseInt(e.getAttribute("data-loading-timeout"),10)||nf;e._vbLoadingTimer=setTimeout(()=>Be(e),s)}function Be(e){e.getAttribute("aria-busy")==="true"&&(clearTimeout(e._vbLoadingTimer),e._vbLoadingOriginal!=null&&(e.innerHTML=e._vbLoadingOriginal,delete e._vbLoadingOriginal),e.style.minInlineSize="",e.removeAttribute("aria-busy"),e.disabled=!1,delete e.dataset.loadingActive)}function rf(e){if(kc.has(e))return;kc.add(e);let t=e.closest("form");t&&(e.type==="submit"||!e.type)&&(t.addEventListener("submit",()=>Pn(e)),new MutationObserver(()=>{!t.hasAttribute("data-submitting")&&e.getAttribute("aria-busy")==="true"&&Be(e)}).observe(t,{attributes:!0,attributeFilter:["data-submitting"]})),new MutationObserver(()=>{e.hasAttribute("data-loading-active")?Pn(e):e.getAttribute("aria-busy")==="true"&&Be(e)}).observe(e,{attributes:!0,attributeFilter:["data-loading-active"]})}var sf,kc,nf,Lc=w(()=>{q();sf="button[data-loading]",kc=new WeakSet,nf=1e4;C(sf,rf)});var Mc={};A(Mc,{initEmailForm:()=>zn});function af(e){let t={};for(let i of e.elements){let s=i;s.name&&(s.type==="password"||s.type==="file"||(s.type==="checkbox"?t[s.name]=s.checked:s.type==="radio"?s.checked&&(t[s.name]=s.value):t[s.name]=s.value))}return t}async function of(e){let t=e.currentTarget,i=t.getAttribute("data-vb-email-form"),s=t.getAttribute("data-vb-email-to");if(!i||(e.preventDefault(),t.hasAttribute(Fn)))return;t.setAttribute(Fn,"");let n=t.querySelector('button[type="submit"], button:not([type])'),r=n?.textContent;n&&(n.disabled=!0,t.dataset.vbEmailLoadingLabel&&(n.textContent=t.dataset.vbEmailLoadingLabel)),t.dispatchEvent(new CustomEvent("vb-email-form:submitting",{bubbles:!0,composed:!0,detail:{template:i}}));let a=af(t);try{let c=await new z("email").post("/",{to:s||a.to||a.email,template:i,data:a});t.dispatchEvent(new CustomEvent("vb-email-form:success",{bubbles:!0,composed:!0,detail:{id:c?.id}})),t.hasAttribute("data-vb-email-no-reset")||t.reset(),Nc(t,"success")}catch(o){let c={error:o};o instanceof I&&(c.status=o.status,c.body=o.body),t.dispatchEvent(new CustomEvent("vb-email-form:error",{bubbles:!0,composed:!0,detail:c})),Nc(t,"error")}finally{t.removeAttribute(Fn),n&&(n.disabled=!1,r&&(n.textContent=r))}}function Nc(e,t){let i=e.querySelector("[data-vb-email-status]");if(!i)return;let s=e.dataset.vbEmailSuccess||"Sent. Thank you.",n=e.dataset.vbEmailError||"Sorry, the message could not be sent. Try again.";i.dataset.state=t,i.textContent=t==="success"?s:n}function Hn(e){e.hasAttribute("data-vb-email-form-init")||(e.setAttribute("data-vb-email-form-init",""),e.addEventListener("submit",of))}function zn(e=document){for(let t of e.querySelectorAll(Rn))Hn(t)}var Rn,Fn,cf,_c=w(()=>{Bt();Rn="form[data-vb-email-form]",Fn="data-vb-email-submitting";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>zn()):zn();cf=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(Rn)&&Hn(s),s.querySelectorAll?.(Rn).forEach(n=>Hn(n))}});cf.observe(document.documentElement,{childList:!0,subtree:!0})});var Bc={};A(Bc,{initNewsletterForm:()=>Gn});function qc(e){let t=(e.getAttribute("data-vb-newsletter-form")||"subscribe").trim();return lf.includes(t)?t:"subscribe"}function Dc(e){let t=[...e.querySelectorAll('input[type="checkbox"][name="lists"]')].filter(s=>s.checked).map(s=>s.value);return t.length?t:(e.getAttribute("data-vb-newsletter-lists")||"").split(",").map(s=>s.trim()).filter(Boolean)}function $c(e){return e.querySelector('input[name="email"]')}function Un(e,t,i){let s=e.querySelector("[data-vb-newsletter-status]");s&&(s.dataset.state=t,s.textContent=i)}function Ic(e,t,i){return i==="error"?e.dataset.vbNewsletterError||"Sorry, that did not work. Try again.":t==="unsubscribe"?e.dataset.vbNewsletterUnsubscribed||"Unsubscribed.":t==="preferences"?e.dataset.vbNewsletterSaved||"Preferences saved.":e.dataset.vbNewsletterSubscribed||"Subscribed. Check your inbox."}function Oc(e,t){let i=e.querySelector('button[type="submit"], button:not([type])');i&&(t?(i.dataset.vbNewsletterPrevLabel=i.textContent||"",i.disabled=!0,e.dataset.vbNewsletterLoadingLabel&&(i.textContent=e.dataset.vbNewsletterLoadingLabel)):(i.disabled=!1,i.dataset.vbNewsletterPrevLabel!=null&&(i.textContent=i.dataset.vbNewsletterPrevLabel,delete i.dataset.vbNewsletterPrevLabel)))}async function Pe(e,t,i){let s=new z("newsletter");if(e==="POST")return s.post(t,i);if(e==="GET")return s.get(t,i);throw new Error(`unsupported method ${e}`)}async function df(e,t,i,s){if(!s.length&&t!=="preferences")throw new Error("No lists selected.");return Pe("POST",t==="unsubscribe"?"/unsubscribe":"/subscribe",{email:i,lists:s})}async function uf(e,t){if(t)try{let i=await Pe("GET","/preferences",{email:t});if(!i)return;let s=new Set(i.subscriptions||[]);for(let n of e.querySelectorAll('input[type="checkbox"][name="lists"]')){let r=n;r.checked=s.has(r.value)}e.dispatchEvent(new CustomEvent("vb-newsletter-form:preferences",{bubbles:!0,composed:!0,detail:{email:t,subscriptions:i.subscriptions,available:i.available}}))}catch(i){if(i instanceof I&&i.status===404)return;console.warn("[newsletter-form] preferences fetch failed",i)}}function jn(e){return new Set([...e.querySelectorAll('input[type="checkbox"][name="lists"]')].filter(t=>t.checked).map(t=>t.value))}async function hf(e,t){let i=e.__vbNewsletterSnapshot??new Set,s=jn(e),n=[...s].filter(o=>!i.has(o)),r=[...i].filter(o=>!s.has(o)),a={};return n.length&&(a.subscribe=await Pe("POST","/subscribe",{email:t,lists:n})),r.length&&(a.unsubscribe=await Pe("POST","/unsubscribe",{email:t,lists:r})),e.__vbNewsletterSnapshot=jn(e),a}async function ff(e){let t=e.currentTarget,i=qc(t),s=$c(t)?.value?.trim();if(e.preventDefault(),!s){Un(t,"error","Email is required.");return}if(!t.hasAttribute(Vn)){t.setAttribute(Vn,""),Oc(t,!0),t.dispatchEvent(new CustomEvent("vb-newsletter-form:submitting",{bubbles:!0,composed:!0,detail:{mode:i}}));try{let n;if(i==="preferences")n=await hf(t,s);else{let r=Dc(t);n=await df(t,i,s,r)}t.dispatchEvent(new CustomEvent("vb-newsletter-form:success",{bubbles:!0,composed:!0,detail:{mode:i,lists:Dc(t),response:n}})),Un(t,"success",Ic(t,i,"success")),i==="subscribe"&&!t.hasAttribute("data-vb-newsletter-no-reset")&&t.reset()}catch(n){let r={mode:i,error:n};n instanceof I&&(r.status=n.status,r.body=n.body),t.dispatchEvent(new CustomEvent("vb-newsletter-form:error",{bubbles:!0,composed:!0,detail:r}));let a=n instanceof Error&&n.message==="No lists selected."?"Pick at least one list.":Ic(t,i,"error");Un(t,"error",a)}finally{t.removeAttribute(Vn),Oc(t,!1)}}}function Yn(e){if(!e.hasAttribute("data-vb-newsletter-form-init")&&(e.setAttribute("data-vb-newsletter-form-init",""),e.addEventListener("submit",ff),qc(e)==="preferences")){let t=$c(e);if(t){let i=async()=>{let s=t.value.trim();s&&(await uf(e,s),e.__vbNewsletterSnapshot=jn(e))};t.addEventListener("change",i),t.addEventListener("blur",i)}}}function Gn(e=document){for(let t of e.querySelectorAll(Wn))Yn(t)}var Wn,Vn,lf,pf,Pc=w(()=>{Bt();Wn="form[data-vb-newsletter-form]",Vn="data-vb-newsletter-submitting",lf=["subscribe","unsubscribe","preferences"];document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Gn()):Gn();pf=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(Wn)&&Yn(s),s.querySelectorAll?.(Wn).forEach(n=>Yn(n))}});pf.observe(document.documentElement,{childList:!0,subtree:!0})});function mf(e,t){let i=Number(e);return!Number.isFinite(i)||t<=0?1:Math.min(Math.max(1,Math.floor(i)),t)}function bf({page:e,size:t}){let i=(e-1)*t;return{start:i,end:i+t}}function gf(e,t,i=2){if(t<=0)return[];if(t===1)return[1];let s=Math.max(2,e-i),n=Math.min(t-1,e+i),r=[1];s>2&&r.push("\u2026");for(let a=s;a<=n;a++)r.push(a);return n<t-1&&r.push("\u2026"),r.push(t),r}function Kn({total:e,size:t,page:i,window:s=2}){if(t<=0)return{page:(e>0,1),totalPages:e>0?1:0,start:0,end:e,pageNumbers:e>0?[1]:[]};let n=e>0?Math.ceil(e/t):0,r=mf(i,n),a=bf({page:r,size:t}),o=Math.min(a.end,e);return{page:r,totalPages:n,start:a.start,end:o,pageNumbers:gf(r,n,s)}}var Fc=w(()=>{});function Xn(e){switch(e.style){case"load-more":return wf(e);case"prev-next":return yf(e);default:return vf(e)}}function Jn(){let e=document.createElement("nav");return e.setAttribute("data-paged-nav",""),e.setAttribute("aria-label","Pagination"),e}function vf({page:e,totalPages:t,pageNumbers:i,prevLabel:s="Previous",nextLabel:n="Next"}){let r=Jn(),a=document.createElement("ol");a.setAttribute("role","list"),a.appendChild(Yt(s,e-1,e===1,!1,"prev"));for(let o of i)if(o==="\u2026"){let c=document.createElement("li");c.textContent="\u2026",c.setAttribute("aria-hidden","true"),c.setAttribute("data-paged-ellipsis",""),a.appendChild(c)}else a.appendChild(Yt(String(o),o,!1,o===e,"page"));return a.appendChild(Yt(n,e+1,e===t,!1,"next")),r.appendChild(a),r}function yf({page:e,totalPages:t,prevLabel:i="Previous",nextLabel:s="Next"}){let n=Jn(),r=document.createElement("ol");r.setAttribute("role","list"),r.appendChild(Yt(i,e-1,e===1,!1,"prev"));let a=document.createElement("li");return a.setAttribute("data-paged-status",""),a.setAttribute("aria-live","polite"),a.textContent=`Page ${e} of ${t}`,r.appendChild(a),r.appendChild(Yt(s,e+1,e===t,!1,"next")),n.appendChild(r),n}function wf({total:e,visible:t,loadMoreLabel:i=n=>`Load more (${n})`,noMoreLabel:s="No more"}){let n=Jn(),r=document.createElement("button");r.type="button",r.setAttribute("data-paged-loadmore","");let a=e-t;return r.textContent=a>0?i(a):s,r.disabled=a<=0,n.appendChild(r),n}function Yt(e,t,i,s,n){let r=document.createElement("li"),a=document.createElement("button");return a.type="button",a.setAttribute("data-paged-action",n),a.dataset.pagedTarget=String(t),a.textContent=e,s&&a.setAttribute("aria-current","page"),i&&(a.disabled=!0),r.appendChild(a),r}function Zn(e,{onNavigate:t,onLoadMore:i}){t&&e.querySelectorAll("button[data-paged-target]").forEach(s=>{s.addEventListener("click",()=>t(parseInt(s.dataset.pagedTarget||"1",10)))}),i&&e.querySelectorAll("button[data-paged-loadmore]").forEach(s=>{s.addEventListener("click",()=>i())})}var Rc=w(()=>{});var jc={};A(jc,{initDataPaged:()=>Vc});function Vc(e){if(Hc.has(e))return;let t={host:e,nav:{before:null,after:null},sentinel:null,intersect:null,children:[],childObserver:null,visible:0};Hc.set(e,t);let i=e.dataset.pagedUrl;if(i){let n=new URL(window.location.href).searchParams.get(i);n&&!e.hasAttribute("data-paged-page")&&e.setAttribute("data-paged-page",n),window.addEventListener("popstate",()=>{let a=new URL(window.location.href).searchParams.get(i);a&&e.setAttribute("data-paged-page",a)})}t.childObserver=new MutationObserver(()=>Fe(t)),t.childObserver.observe(e,{childList:!0}),e.addEventListener("paged:goto",s=>Wc(t,s.detail?.page??1)),e.addEventListener("paged:loadmore",()=>tr(t)),Fe(t)}function Qn(e){return{size:parseInt(e.dataset.pagedSize||"10",10)||0,page:parseInt(e.dataset.pagedPage||"1",10)||1,style:e.dataset.pagedStyle||"numbered",window:parseInt(e.dataset.pagedWindow||"2",10)||2,controls:e.dataset.pagedControls||"after",urlParam:e.dataset.pagedUrl||""}}function Uc(e){if(e.tagName==="TABLE"){let t=e.querySelector(":scope > tbody");if(t)return Array.from(t.children)}return Array.from(e.children).filter(t=>!t.matches("nav[data-paged-nav], div[data-paged-sentinel]"))}function Fe(e){let{host:t}=e,i=Qn(t),s=Uc(t);e.children=s;let n=Kn({total:s.length,size:i.size,page:i.page,window:i.window}),r=i.style==="load-more"||i.style==="infinite";if(r){e.visible===0&&(e.visible=i.size||s.length);let a=Math.min(e.visible,s.length);s.forEach((o,c)=>{o.hidden=c>=a})}else s.forEach((a,o)=>{a.hidden=o<n.start||o>=n.end});Af(e,n,i,r),t.dispatchEvent(new CustomEvent("paged:change",{bubbles:!0,detail:{page:n.page,size:i.size,total:s.length,totalPages:n.totalPages}}))}function Af(e,t,i,s){if(e.nav.before?.remove(),e.nav.after?.remove(),e.sentinel?.remove(),e.intersect?.disconnect(),e.intersect=null,e.nav={before:null,after:null},i.controls==="none"&&!s)return;if(s){if(i.style==="load-more"){let r=Xn({style:"load-more",page:t.page,totalPages:t.totalPages,pageNumbers:t.pageNumbers,total:e.children.length,visible:e.visible});zc(e,r,i)}else{let r=document.createElement("div");r.setAttribute("data-paged-sentinel",""),r.setAttribute("aria-hidden","true"),r.style.cssText="block-size:1px;inline-size:100%",e.host.parentNode?.insertBefore(r,e.host.nextSibling),e.sentinel=r,e.intersect=new IntersectionObserver(a=>{for(let o of a)o.isIntersecting&&tr(e)},{rootMargin:"200px"}),e.intersect.observe(r)}return}if(t.totalPages<=1)return;let n=Xn({style:i.style,page:t.page,totalPages:t.totalPages,pageNumbers:t.pageNumbers,total:e.children.length,visible:e.visible});zc(e,n,i)}function zc(e,t,i){let{host:s}=e,n={onNavigate:r=>Wc(e,r),onLoadMore:()=>tr(e)};if(i.controls==="before"||i.controls==="both"){let r=t.cloneNode(!0);Zn(r,n),s.parentNode?.insertBefore(r,s),e.nav.before=r}(i.controls==="after"||i.controls==="both"||i.controls==="none")&&(Zn(t,n),s.parentNode?.insertBefore(t,s.nextSibling),e.nav.after=t)}function Wc(e,t){let{host:i}=e,s=Qn(i),n=Uc(i),r=Kn({total:n.length,size:s.size,page:t,window:s.window});if(r.page!==s.page){if(i.setAttribute("data-paged-page",String(r.page)),s.urlParam){let a=new URL(window.location.href);a.searchParams.set(s.urlParam,String(r.page)),window.history.pushState({},"",a)}Fe(e)}}function tr(e){let i=Qn(e.host).size||10;e.visible=Math.min(e.visible+i,e.children.length),Fe(e)}var Ef,Hc,Yc=w(()=>{q();Fc();Rc();Ef="[data-paged]",Hc=new WeakMap;C(Ef,Vc)});function Gt(e){if(!e)return null;let t=String(e);return t.startsWith("-")?{key:t.slice(1),direction:"desc"}:t.startsWith("+")?{key:t.slice(1),direction:"asc"}:{key:t,direction:"asc"}}function Sf(e,t){let i=t==="desc"?-1:1,s=Gc[e]||Gc.text;return(n,r)=>{let a=Xc(n),o=Xc(r);return a&&o?0:a?1:o?-1:i*s(n,r)}}function Jc(e,t,i,s){let n=Sf(i,s),r=Array.from({length:e.length},(a,o)=>o);return r.sort((a,o)=>{let c=n(t(e[a]),t(e[o]));return c===0?a-o:c}),r}function Zc(e){return e==="asc"?"desc":e==="desc"?"none":"asc"}function Kc(e){return e instanceof Date?e.getTime():Date.parse(String(e))}function Xc(e){return e==null||e===""}var Gc,Qc=w(()=>{Gc={text(e,t){return String(e).localeCompare(String(t),void 0,{sensitivity:"base",numeric:!0})},number(e,t){let i=Number(e),s=Number(t);return Number.isNaN(i)&&Number.isNaN(s)?0:Number.isNaN(i)?1:Number.isNaN(s)||i<s?-1:i>s?1:0},date(e,t){let i=Kc(e),s=Kc(t);return Number.isNaN(i)&&Number.isNaN(s)?0:Number.isNaN(i)?1:Number.isNaN(s)||i<s?-1:i>s?1:0}}});var il={};A(il,{initDataSortable:()=>el});function el(e){if(Re.has(e))return;Re.add(e),e.tagName==="TABLE"&&Cf(e);let i=e.dataset.sortableDefault;if(i&&!e.dataset.sortBy){let s=Gt(i);s&&ut(e,s.key,s.direction)}}function Cf(e){e.querySelectorAll(":scope > thead th[data-sort]").forEach(i=>{i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.style.cursor="pointer";let s=()=>{let n=i.dataset.sort;if(!n)return;let r=e.dataset.sortBy===n?e.dataset.sortDirection:"none",a=Zc(r||"none");a==="none"?ut(e,"","none"):ut(e,n,a,i.dataset.sortType)};i.addEventListener("click",s),i.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),s())})})}function kf(){return document.querySelectorAll("[data-sort-target]")}function er(){for(let e of kf()){if(Re.has(e))continue;Re.add(e);let t=e.getAttribute("data-sort-target");if(!t)continue;let i=document.querySelector(t);if(!(!i||!i.matches("[data-sortable]")))if(e.tagName==="SELECT"){e.addEventListener("change",()=>{let n=e.value,r=Gt(n);if(!r){ut(i,"","none");return}ut(i,r.key,r.direction)});let s=e.value;if(s){let n=Gt(s);n&&ut(i,n.key,n.direction)}}else e.addEventListener("click",()=>{let s=e.getAttribute("data-sort-by")||"",n=Gt(s);n&&ut(i,n.key,n.direction)})}}function Tf(e,t,i,s={}){if(s.isTable){let r=s.colIndex,a=e.children[r];if(!a)return"";if(a.dataset.value!=null)return a.dataset.value;if(i==="date"){let o=a.querySelector("time[datetime]");if(o)return o.getAttribute("datetime")||""}return(a.textContent||"").trim()}let n=e.dataset[`sort${Lf(t)}`];return n??(e.dataset.value!=null?e.dataset.value:(e.textContent||"").trim())}function Lf(e){return e?e[0].toUpperCase()+e.slice(1):""}function Nf(e){if(e.tagName==="TABLE"){let t=e.querySelector(":scope > tbody");return t?Array.from(t.children):[]}return Array.from(e.children)}function Mf(e,t){return Array.from(e.querySelectorAll(":scope > thead th")).findIndex(s=>s.dataset.sort===t)}function ut(e,t,i,s){let n=e.tagName==="TABLE",r=Nf(e);if(i==="none"||!t){e.removeAttribute("data-sort-by"),e.dataset.sortDirection="none",n&&tl(e,"","none"),e.dispatchEvent(new CustomEvent("sort:change",{bubbles:!0,detail:{key:"",direction:"none",total:r.length}}));return}let a=_f(e,t,s),o=n?Mf(e,t):-1,c=Jc(r,l=>Tf(l,t,a,{isTable:n,colIndex:o}),a,i),d=n?e.querySelector(":scope > tbody"):e;if(d){for(let l of c)d.appendChild(r[l]);e.dataset.sortBy=t,e.dataset.sortDirection=i,n&&tl(e,t,i),e.hasAttribute("data-paged")&&e.dispatchEvent(new CustomEvent("paged:goto",{detail:{page:1}})),e.dispatchEvent(new CustomEvent("sort:change",{bubbles:!0,detail:{key:t,direction:i,total:r.length}}))}}function _f(e,t,i){if(i==="text"||i==="number"||i==="date")return i;if(e.tagName==="TABLE"){let r=e.querySelector(`:scope > thead th[data-sort="${Df(t)}"]`)?.dataset.sortType;if(r==="text"||r==="number"||r==="date")return r}let s=e.dataset.sortType;return s==="text"||s==="number"||s==="date"?s:"text"}function Df(e){return String(e).replace(/["\\]/g,"\\$&")}function tl(e,t,i){e.querySelectorAll(":scope > thead th[data-sort]").forEach(n=>{n.dataset.sort===t&&i!=="none"?n.setAttribute("aria-sort",i==="asc"?"ascending":"descending"):n.setAttribute("aria-sort","none")})}var xf,Re,sl=w(()=>{q();Qc();xf="[data-sortable]",Re=new WeakSet;C(xf,el);typeof document<"u"&&(document.readyState!=="loading"?er():document.addEventListener("DOMContentLoaded",er),C("[data-sort-target]",()=>er()))});function nl(e){if(!e)return null;let t=String(e).trim();if(!t)return null;if(t.startsWith("class:")){let i=t.slice(6).trim();return i?{kind:"class",name:i}:null}return{kind:"attr",name:t}}function Kt(e){return If.has(String(e).toLowerCase())}function ir(e){return Of.has(String(e).toLowerCase())}function rl(e,t,i){if(e.kind==="class")return t?{present:!1}:{present:!0};if(Kt(e.name))return t?{present:!1}:{present:!0,value:""};if(ir(e.name))return{present:!0,value:t==="true"||t===!0?"false":"true"};let s=i.on??"true",n=i.off??"false";return{present:!0,value:t===s?n:s}}var If,Of,al=w(()=>{If=new Set(["hidden","disabled","open","checked","readonly","required","multiple","selected","autofocus","autoplay","controls","defer","inert","loop","muted","nomodule","novalidate","playsinline","reversed"]),Of=new Set(["aria-pressed","aria-expanded","aria-selected","aria-checked"])});var dl={};A(dl,{initDataToggle:()=>ll});function ll(e){if(ol.has(e))return;ol.add(e);let t=nl(e.dataset.toggle);if(!t)return;let i=e.dataset.toggleTarget,s=i?document.querySelector(i):e;if(!s)return;let n=s!==e;n&&s.id&&e.setAttribute("aria-controls",s.id),t.kind==="attr"&&Kt(t.name)&&!n&&e.setAttribute("aria-pressed",String(s.hasAttribute(t.name))),cl(e,s,t),e.addEventListener("click",r=>{r.preventDefault();let a={on:e.dataset.toggleOn,off:e.dataset.toggleOff},o;t.kind==="class"?o=s.classList.contains(t.name):Kt(t.name)?o=s.hasAttribute(t.name):o=s.getAttribute(t.name);let c=rl(t,o,a);t.kind==="class"?c.present?s.classList.add(t.name):s.classList.remove(t.name):c.present?s.setAttribute(t.name,c.value??""):s.removeAttribute(t.name),!n&&Kt(t.name)&&e.setAttribute("aria-pressed",String(c.present)),!n&&ir(t.name),cl(e,s,t,c),e.dispatchEvent(new CustomEvent("toggle:change",{bubbles:!0,detail:{spec:t.kind==="class"?`class:${t.name}`:t.name,value:c.value,present:c.present,target:s}}))})}function cl(e,t,i,s){if(t===e)return;let n=t.hasAttribute("popover"),r=i.kind==="attr"&&i.name.startsWith("data-")&&(e.dataset.toggleOn||"").toLowerCase()==="open";if(!n&&!r)return;let a;s?a=n?s.present:s.value==="open":a=n?t.matches(":popover-open"):t.getAttribute(i.name)==="open",e.setAttribute("aria-expanded",String(a))}var qf,ol,ul=w(()=>{q();al();qf="[data-toggle]",ol=new WeakSet;C(qf,ll)});function ze(e){try{if(sessionStorage.getItem("vb_optout")==="1")return!0}catch{}if(navigator.globalPrivacyControl===!0||navigator.doNotTrack==="1")return!0;if(typeof e.consent=="function")try{return e.consent()===!1}catch{return!0}return!1}function xl(e){return e?.closest?.("[data-vb-no-track]")!=null}function Qf(){let{dataset:e}=document.documentElement,t={};for(let i of Object.keys(e)){let s=e[i];s!=null&&s!==""&&(t[i]=s)}return t}function tp(){let e={};for(let i of document.querySelectorAll('meta[name^="vb:"]')){let s=i.getAttribute("name")?.slice(3),n=i.getAttribute("content")?.trim();s&&n&&(e[s]=n)}let t=[];for(let i of document.querySelectorAll('meta[name="concept"]')){let s=i.getAttribute("content")?.trim();s&&t.push(s)}return t.length&&(e.concepts=t),e}function ep(e,t){if(!t?.length)return e;for(let{pattern:i,replace:s}of t)if(i.test(e))return e.replace(i,s);return e}function ip(e,t){let i=JSON.stringify(t);if(typeof navigator.sendBeacon=="function"){let s=new Blob([i],{type:"application/json"});if(navigator.sendBeacon(e,s))return!0}try{return fetch(e,{method:"POST",body:i,keepalive:!0,headers:{"content-type":"application/json"}}),!0}catch{return!1}}function Cl(e){return`${(N.config?.endpoint??"/api/analytics").replace(/\/+$/,"")}/${e}`}function lr(e,t){let i=N.config;if(!i)throw new Error("analytics: buildEnvelope called before init");let s=ep(location.pathname+location.search,i.urlMasks),n=typeof i.context=="function"?i.context()??{}:{};return{name:e,ts:Date.now(),site:i.siteId,path:s,referrer:document.referrer||"",context:{...Qf(),...tp(),...n},props:t??{}}}function Ve(e,t){let i=N.config;return!i||i.transport==="disabled"?!1:i.transport==="console"?(console.log("%c[vb:analytics]","color:#0aa;font-weight:600",e,t),!0):ip(Cl(e),t)}function kl(){let e=N.config?.sampleRate??1;return e>=1?!0:Math.random()<e}function Tl(){if(!N.config||ze(N.config)||document.documentElement.hasAttribute("data-vb-no-track")||!kl())return;let e=location.pathname+location.search;e!==Al&&(Al=e,Ve("hit",lr("page.view",{})))}function sp(){let e,t=()=>{clearTimeout(e),e=setTimeout(Tl,100)},i=history.pushState.bind(history);history.pushState=function(...n){i(...n),t()};let s=history.replaceState.bind(history);history.replaceState=function(...n){s(...n),t()},window.addEventListener("popstate",t)}function np(e){let t={};for(let[i,s]of Object.entries(e.dataset)){if(i==="vbEvent"||!i.startsWith("vbEvent"))continue;let n=i.slice(7).replace(/^./,r=>r.toLowerCase());t[n]=s}return t}function rp(e){if(!N.config||ze(N.config))return;let i=e.target?.closest?.("[data-vb-event]");if(!i||xl(i))return;let s=i.dataset.vbEvent;s&&E.track(s,np(i))}function Sl(){let e=document.querySelectorAll('a[href^="http"]');for(let t of e){if(t.hostname===location.hostname||xl(t)||t.hasAttribute("data-vb-analytics-wired"))continue;let i=encodeURIComponent(N.config?.siteId??"default"),s=`${Cl("click")}?site=${i}&from=${encodeURIComponent(location.pathname)}`;t.hasAttribute("ping")||t.setAttribute("ping",s),t.addEventListener("click",()=>{if(ze(N.config))return;let n=navigator.userAgent;/Firefox|Brave/.test(n)&&Ve("click",lr("link.outbound",{to:t.hostname,href:t.href}))}),t.setAttribute("data-vb-analytics-wired","")}}function cr(){if(!N.queue.length)return;let e=N.queue.splice(0);Ve("events",{site:N.config?.siteId,events:e})}function ap(){document.visibilityState==="hidden"&&cr()}function cp(){try{return window.top!==window.self}catch{return!0}}var N,Al,op,E,ht=w(()=>{N={config:null,queue:[]};Al=null;op={endpoint:"/api/analytics",siteId:"default",transport:"disabled",sampleRate:1,consent:null,context:null,urlMasks:null,autoPageView:!0,autoOutboundLinks:!0,autoDeclarative:!0,allowInIframe:!1};E={init(e={}){if(N.config)return;let t={...op,...e};if(N.config=t,cp()&&!t.allowInIframe){t.transport="disabled",t.autoPageView=!1,t.autoOutboundLinks=!1,t.autoDeclarative=!1;return}t.transport==="disabled"&&(t.autoOutboundLinks=!1),t.autoDeclarative&&document.addEventListener("click",rp,{capture:!0}),t.autoOutboundLinks&&(Sl(),new MutationObserver(()=>Sl()).observe(document.body,{childList:!0,subtree:!0})),t.autoPageView&&(Tl(),sp()),document.addEventListener("visibilitychange",ap),window.addEventListener("pagehide",cr)},track(e,t={}){N.config&&(ze(N.config)||kl()&&Ve("hit",lr(e,t)))},flush:cr,setConsent(e){try{e?sessionStorage.removeItem("vb_optout"):sessionStorage.setItem("vb_optout","1")}catch{}},get config(){return N.config?{...N.config}:null}}});var bp={};function hp(e,t,i){return e<=t?"good":e<=i?"needs-improvement":"poor"}function Ue(e,t,i,s,n={}){E.track(e,{value:Math.round(t*1e3)/1e3,rating:hp(t,i,s),...n})}function fp(){let e=null,t=new PerformanceObserver(s=>{let n=s.getEntries();e=n[n.length-1]});try{t.observe({type:"largest-contentful-paint",buffered:!0})}catch{return}let i=()=>{e&&(Ue("perf.lcp",e.startTime,2500,4e3),e=null)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function pp(){let e=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries()){let r=n;r.hadRecentInput||(e+=r.value)}});try{t.observe({type:"layout-shift",buffered:!0})}catch{return}let i=()=>{Ue("perf.cls",e,.1,.25),e=0};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function mp(){let e=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries())n.duration>e&&(e=n.duration)});try{t.observe({type:"event",durationThreshold:40,buffered:!0})}catch{return}let i=()=>{e!==0&&(Ue("perf.inp",e,200,500),e=0)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function _l(){try{let[e]=performance.getEntriesByType("navigation");if(!e||!e.responseStart)return;Ue("perf.ttfb",e.responseStart,800,1800,{navigationType:e.type})}catch{}}var Dl=w(()=>{ht();typeof window<"u"&&"PerformanceObserver"in window&&(fp(),pp(),mp(),document.readyState==="complete"?_l():window.addEventListener("load",_l,{once:!0}))});var vp={};function gp(e){if(typeof e!="string"||!e)return"";try{let t=new URL(e,location.origin);return t.pathname.split("/").pop()||t.pathname}catch{return e.split("/").pop()??e}}function Il(e){return typeof e!="string"?String(e??"").slice(0,ur):e.length>ur?e.slice(0,ur):e}var ur,Ol=w(()=>{ht();ur=200;typeof window<"u"&&(window.addEventListener("error",e=>{e.target&&e.target!==window||E.track("error.js_runtime",{message:Il(e.message),source:gp(e.filename),line:e.lineno??0,col:e.colno??0})}),window.addEventListener("unhandledrejection",e=>{let t=e.reason,i=t instanceof Error?t.message:typeof t=="string"?t:JSON.stringify(t??null);E.track("error.unhandled_promise",{message:Il(i)})}))});var wp={};function Fl(){let e=window.scrollY+window.innerHeight,t=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0);return t<=0?0:Math.min(100,Math.max(0,Math.round(e/t*100)))}function yp(){clearTimeout($l),$l=setTimeout(()=>{let e=Fl();e>hr&&(hr=e)},500)}function Bl(){Zt==null&&(Zt=Date.now())}function Rl(){Zt!=null&&(fr+=Date.now()-Zt,Zt=null)}function Pl(){if(ql)return;ql=!0,Rl();let e=Math.max(hr,Fl());e>0&&E.track("__scroll",{depth:e}),fr>0&&E.track("__attention",{ms:fr})}var hr,Zt,fr,ql,$l,Hl=w(()=>{ht();hr=0,Zt=null,fr=0,ql=!1,$l=null;typeof window<"u"&&(window.addEventListener("scroll",yp,{passive:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?Bl():(Rl(),Pl())}),window.addEventListener("pagehide",Pl),document.visibilityState==="visible"&&Bl())});var et=new Map,We=new Map;var Ar=null;function Sr(){if(typeof window<"u"&&window.__VB_THEME_BASE)return String(window.__VB_THEME_BASE).replace(/\/$/,"");if(Ar)return Ar;if(typeof document<"u"){let e=document.querySelectorAll('script[src*="vanilla-breeze"]');for(let t of e){let i=t.getAttribute("src");if(i){let s=i.lastIndexOf("/");if(s!==-1)return i.slice(0,s)}}}return"/cdn"}var jl=new Set(["default","a11y-high-contrast","a11y-large-text","a11y-dyslexia","modern","minimal","classic"]),Yl=new Set(["kawaii","memphis"]);function je(e){return Yl.has(e)}function Gl(e,t){return`${t}/themes/${e}.css`}function xr(e,t){if(!je(e))return Promise.resolve();if(We.has(e))return We.get(e);let i=import(`${t}/packs/${e}.full.js`).catch(()=>{});return We.set(e,i),i}function Kl(e,t){let i=Sr(),s=()=>{(je(t)||e.hasAttribute("data-vb-pack"))&&xr(t,i)};return e.getAttribute("data-vb-theme-state")==="error"?Promise.reject(new Error(`Failed to load theme: ${t}`)):e.getAttribute("data-vb-theme-state")==="ready"||e.sheet?(s(),Promise.resolve()):new Promise((n,r)=>{let a=()=>{e.setAttribute("data-vb-theme-state","ready"),c(),s(),n(void 0)},o=()=>{e.setAttribute("data-vb-theme-state","error"),et.delete(t),c(),r(new Error(`Failed to load theme: ${t}`))},c=()=>{e.removeEventListener("load",a),e.removeEventListener("error",o)};e.addEventListener("load",a,{once:!0}),e.addEventListener("error",o,{once:!0})})}async function kt(e){if(!e||jl.has(e))return;if(et.has(e))return et.get(e);if(typeof document<"u"){let s=document.querySelector(`link[data-vb-theme="${e}"]`);if(s){let n=Kl(s,e);return et.set(e,n),n}}let t=Sr(),i=je(e)?Jl(e,t):Xl(e,t);return et.set(e,i),i}async function Xl(e,t){let i=Gl(e,t);return new Promise((s,n)=>{let r=document.querySelector(`link[data-vb-theme-preload="${e}"]`);r&&r.remove();let a=document.createElement("link");a.rel="stylesheet",a.href=i,a.setAttribute("data-vb-theme",e),a.setAttribute("data-vb-theme-state","loading"),a.onload=()=>{a.setAttribute("data-vb-theme-state","ready"),s()},a.onerror=()=>{a.setAttribute("data-vb-theme-state","error"),a.remove(),et.delete(e),n(new Error(`Failed to load theme: ${e}`))},document.head.appendChild(a)})}function Jl(e,t){let i=`${t}/packs/${e}.theme.css`,s=`${t}/packs/${e}.effects.css`;return new Promise((n,r)=>{let a=document.querySelector(`link[data-vb-theme-preload="${e}"]`);a&&a.remove();let o=document.createElement("link");o.rel="stylesheet",o.href=i,o.setAttribute("data-vb-theme",e),o.setAttribute("data-vb-pack",e),o.setAttribute("data-vb-theme-state","loading"),o.onload=()=>{o.setAttribute("data-vb-theme-state","ready");let c=document.createElement("link");c.rel="stylesheet",c.href=s,c.setAttribute("data-vb-pack-effects",e),document.head.appendChild(c),xr(e,t),n()},o.onerror=()=>{o.setAttribute("data-vb-theme-state","error"),o.remove(),et.delete(e),r(new Error(`Failed to load pack: ${e}`))},document.head.appendChild(o)})}var Cr=[{id:"default",name:"Default",swatchBg:"#3b82f6",seeds:{}},{id:"ocean",name:"Ocean",swatchBg:"#0891b2",seeds:{"--hue-primary":200,"--hue-secondary":180,"--hue-accent":45,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"45%","--chroma-secondary":.1,"--lightness-accent":"70%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"forest",name:"Forest",swatchBg:"#059669",seeds:{"--hue-primary":145,"--hue-secondary":90,"--hue-accent":30,"--lightness-primary":"45%","--chroma-primary":.15,"--lightness-secondary":"55%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"55%","--chroma-primary":.12}},{id:"sunset",name:"Sunset",swatchBg:"#ea580c",seeds:{"--hue-primary":25,"--hue-secondary":0,"--hue-accent":280,"--lightness-primary":"60%","--chroma-primary":.2,"--lightness-secondary":"55%","--chroma-secondary":.18,"--lightness-accent":"55%","--chroma-accent":.18},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.16}},{id:"rose",name:"Rose",swatchBg:"#e11d48",seeds:{"--hue-primary":350,"--hue-secondary":330,"--hue-accent":200,"--lightness-primary":"55%","--chroma-primary":.18,"--lightness-secondary":"50%","--chroma-secondary":.14,"--lightness-accent":"60%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.14}},{id:"lavender",name:"Lavender",swatchBg:"#a855f7",seeds:{"--hue-primary":280,"--hue-secondary":300,"--hue-accent":60,"--lightness-primary":"55%","--chroma-primary":.14,"--lightness-secondary":"50%","--chroma-secondary":.12,"--lightness-accent":"70%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.12}},{id:"coral",name:"Coral",swatchBg:"#f97316",seeds:{"--hue-primary":15,"--hue-secondary":25,"--hue-accent":180,"--lightness-primary":"60%","--chroma-primary":.18,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"55%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.15}},{id:"slate",name:"Slate",swatchBg:"#64748b",seeds:{"--hue-primary":220,"--hue-secondary":210,"--hue-accent":45,"--lightness-primary":"48%","--chroma-primary":.1,"--lightness-secondary":"45%","--chroma-secondary":.06,"--lightness-accent":"68%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.08}},{id:"emerald",name:"Emerald",swatchBg:"#10b981",seeds:{"--hue-primary":160,"--hue-secondary":140,"--hue-accent":30,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"48%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"amber",name:"Amber",swatchBg:"#f59e0b",seeds:{"--hue-primary":45,"--hue-secondary":30,"--hue-accent":240,"--lightness-primary":"60%","--chroma-primary":.16,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"52%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"68%","--chroma-primary":.14}},{id:"indigo",name:"Indigo",swatchBg:"#6366f1",seeds:{"--hue-primary":250,"--hue-secondary":270,"--hue-accent":35,"--lightness-primary":"48%","--chroma-primary":.18,"--lightness-secondary":"45%","--chroma-secondary":.14,"--lightness-accent":"68%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"62%","--chroma-primary":.14}}],kr=[{id:"default",name:"Default",hue:210,shape:"balanced",character:"The default",swatchBg:"#3b82f6",tier:"core"},{id:"modern",name:"Modern",hue:270,shape:"rounded",character:"Vibrant & elevated",swatchBg:"#6366f1",tier:"core"},{id:"minimal",name:"Minimal",hue:240,shape:"sharp",character:"Clean & flat",swatchBg:"#71717a",tier:"core"},{id:"classic",name:"Classic",hue:220,shape:"subtle",character:"Serif & elegant",swatchBg:"#92400e",tier:"core"}],Ye=[{id:"swiss",name:"Swiss",icon:"grid-3x3",character:"Precision grid",swatchBg:"#ff3e00",swatchFg:"white",tier:"showcase",category:"Design"},{id:"brutalist",name:"Brutalist",icon:"square",character:"Raw, industrial",swatchBg:"#1a1a1a",swatchFg:"#f5f5f5",tier:"showcase",category:"Design"},{id:"art-deco",name:"Art Deco",icon:"crown",character:"1920s luxury",swatchBg:"#1A1A1A",swatchFg:"#C9A84C",tier:"showcase",category:"Design"},{id:"editorial",name:"Editorial",icon:"newspaper",character:"Magazine elegance",swatchBg:"#1a1a1a",swatchFg:"#c9a227",tier:"showcase",category:"Content"},{id:"genai",name:"GenAI",icon:"sparkles",character:"AI aesthetic",swatchBg:"#1a0a2e",swatchFg:"#a855f7",tier:"showcase",category:"Modern"},{id:"glassmorphism",name:"Glass",icon:"glass-water",character:"Frosted surfaces",swatchBg:"#667eea",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"startup",name:"Startup",icon:"rocket",character:"SaaS energy",swatchBg:"#4f46e5",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"organic",name:"Organic",icon:"leaf",character:"Natural, handcrafted",swatchBg:"#2d5016",swatchFg:"#faf5e6",tier:"showcase",category:"Creative"},{id:"rough",name:"Rough",icon:"pencil",character:"Hand-drawn sketch",swatchBg:"#f5f0e8",swatchFg:"#3a3a3a",tier:"showcase",category:"Creative"},{id:"cyber",name:"Cyber",icon:"zap",character:"Neon futuristic",swatchBg:"#0a0a1a",swatchFg:"#00ff88",tier:"showcase",category:"Creative"},{id:"journal",name:"Journal",icon:"notebook-pen",character:"Dot-grid bullet journal",swatchBg:"#f3ecdc",swatchFg:"#27313f",tier:"showcase",category:"Creative"},{id:"vaporwave",name:"Vaporwave",icon:"radio",character:"Neon dreamy",swatchBg:"#2b0040",swatchFg:"#ff6ad5",tier:"showcase",category:"Aesthetic"},{id:"neumorphism",name:"Neumorph",icon:"circle",character:"Soft embossed",swatchBg:"#e0e0e0",swatchFg:"#a0a0a0",tier:"showcase",category:"Aesthetic"},{id:"bauhaus",name:"Bauhaus",icon:"shapes",character:"Geometric",swatchBg:"#F1FAEE",swatchFg:"#E63946",tier:"showcase",category:"Aesthetic"},{id:"claymorphism",name:"Clay",icon:"circle-dot",character:"Puffy 3D",swatchBg:"#f0f0f5",swatchFg:"#FF6B9D",tier:"showcase",category:"Aesthetic"},{id:"alpha1999",name:"Alpha1999",icon:"orbit",character:"Space retro-fi",swatchBg:"#0a0a14",swatchFg:"#d4880f",tier:"showcase",category:"Signature"},{id:"super2026",name:"Super2026",icon:"triangle",character:"Supergraphic bold",swatchBg:"#f5f0e6",swatchFg:"#c23616",tier:"showcase",category:"Signature"},{id:"magna",name:"Magna",icon:"orbit",character:"Odyssey 2 retro",swatchBg:"#0d0b14",swatchFg:"#f97316",tier:"showcase",category:"Signature"},{id:"win9x",name:"Win9x",icon:"monitor",character:"Classic desktop",swatchBg:"#008080",swatchFg:"#c0c0c0",tier:"showcase",category:"OS Styles"},{id:"nes",name:"NES",icon:"joystick",character:"Console pixels",swatchBg:"#bcbcbc",swatchFg:"#e40521",tier:"showcase",category:"OS Styles"},{id:"8bit",name:"8-Bit",icon:"gamepad-2",character:"Retro pixel art",swatchBg:"#000080",swatchFg:"#ffff00",tier:"showcase",category:"OS Styles"}],Ge=[{id:"nord",name:"Nord",icon:"snowflake",character:"Arctic calm",swatchBg:"#2E3440",swatchFg:"#81A1C1",tier:"community",category:"Editor Palettes"},{id:"solarized",name:"Solarized",icon:"sun-dim",character:"Engineered precision",swatchBg:"#002B36",swatchFg:"#268BD2",tier:"community",category:"Editor Palettes"},{id:"dracula",name:"Dracula",icon:"moon-star",character:"Dark elegance",swatchBg:"#282A36",swatchFg:"#BD93F9",tier:"community",category:"Editor Palettes"},{id:"catppuccin-mocha",name:"Catppuccin",icon:"coffee",character:"Warm pastels",swatchBg:"#1E1E2E",swatchFg:"#CBA6F7",tier:"community",category:"Editor Palettes"},{id:"catppuccin-latte",name:"Ctp Latte",icon:"coffee",character:"Cozy daytime",swatchBg:"#eff1f5",swatchFg:"#8839ef",tier:"community",category:"Editor Palettes"},{id:"catppuccin-frappe",name:"Ctp Frapp\xE9",icon:"coffee",character:"Cool twilight",swatchBg:"#303446",swatchFg:"#ca9ee6",tier:"community",category:"Editor Palettes"},{id:"catppuccin-macchiato",name:"Ctp Macchiato",icon:"coffee",character:"Deep blue",swatchBg:"#24273a",swatchFg:"#c6a0f6",tier:"community",category:"Editor Palettes"},{id:"gruvbox",name:"Gruvbox",icon:"palette",character:"Retro warmth",swatchBg:"#282828",swatchFg:"#ebdbb2",tier:"community",category:"Editor Palettes"},{id:"tokyo-night",name:"Tokyo Night",icon:"moon",character:"Night-owl vibes",swatchBg:"#1a1b26",swatchFg:"#7aa2f7",tier:"community",category:"Editor Palettes"},{id:"rose-pine",name:"Ros\xE9 Pine",icon:"flower-2",character:"Muted elegance",swatchBg:"#191724",swatchFg:"#ebbcba",tier:"community",category:"Editor Palettes"},{id:"cottagecore",name:"Cottagecore",icon:"flower-2",character:"Pastoral",swatchBg:"#fdf8f0",swatchFg:"#7d8c6d",tier:"community",category:"Niche"},{id:"terminal",name:"Terminal",icon:"terminal",character:"Retro CRT",swatchBg:"#0d1117",swatchFg:"#00ff00",tier:"community",category:"Niche"},{id:"clinical",name:"Clinical",icon:"heart-pulse",character:"Sterile precision",swatchBg:"#ffffff",swatchFg:"#0077b6",tier:"community",category:"Industry"},{id:"financial",name:"Financial",icon:"landmark",character:"Navy + gold",swatchBg:"#1b2a4a",swatchFg:"#c9a84c",tier:"community",category:"Industry"},{id:"government",name:"Government",icon:"shield",character:"Official",swatchBg:"#002868",swatchFg:"#bf0a30",tier:"community",category:"Industry"},{id:"dawn",name:"Dawn",icon:"sunrise",character:"Golden morning",swatchBg:"#fef3e2",swatchFg:"#d4a574",tier:"community",category:"Mood/Time"},{id:"dusk",name:"Dusk",icon:"sunset",character:"Twilight",swatchBg:"#1a1b2e",swatchFg:"#e5a858",tier:"community",category:"Mood/Time"},{id:"midnight",name:"Midnight",icon:"moon",character:"Deep night",swatchBg:"#0d1117",swatchFg:"#58a6ff",tier:"community",category:"Mood/Time"},{id:"high-noon",name:"High Noon",icon:"sun",character:"Maximum bright",swatchBg:"#ffffff",swatchFg:"#e63946",tier:"community",category:"Mood/Time"}],Tr=[{id:"kawaii",name:"Kawaii",icon:"heart",character:"Cute aesthetic",swatchBg:"#ffb7c5",swatchFg:"#ff69b4",tier:"showcase",category:"Packs"},{id:"memphis",name:"Memphis",icon:"star",character:"Bold patterns",swatchBg:"#FFF8F0",swatchFg:"#d03040",tier:"showcase",category:"Packs"}];var Sp=[...Ye,...Ge],xp=[...kr,...Ye,...Ge,...Tr],it=e=>Ye.filter(t=>t.category===e),Lr=[{label:"Style",themes:kr,tier:"core"},{label:"Design",themes:it("Design"),tier:"showcase"},{label:"Content",themes:it("Content"),tier:"showcase"},{label:"Modern",themes:it("Modern"),tier:"showcase"},{label:"Creative",themes:it("Creative"),tier:"showcase"},{label:"Aesthetic",themes:it("Aesthetic"),tier:"showcase"},{label:"Signature",themes:it("Signature"),tier:"showcase"},{label:"OS Styles",themes:it("OS Styles"),tier:"showcase"},{label:"Packs",themes:Tr,tier:"showcase"},{label:"More Themes",themes:Ge,tier:"community"}];X();var ie="theme",se="current",P={mode:"auto",brand:"default",accent:"default",borderStyle:"",iconSet:"",fluid:"",backdrop:"",backdropChrome:"",pageBgType:"",pageBgColor:"",pageBgGradStart:"",pageBgGradEnd:"",pageBgGradDir:""};function Ir(e){return(e||"").split(/\s+/).find(t=>t&&!t.startsWith("a11y-"))||""}function _r(e,t){return e?.brand&&e.brand!==P.brand?e.brand:Ir(t)||P.brand}var Dr=["--hue-primary","--hue-secondary","--hue-accent","--lightness-primary","--chroma-primary","--lightness-secondary","--chroma-secondary","--lightness-accent","--chroma-accent"],T=null,st="",x={_initPromise:null,async init(){return this._initPromise?this._initPromise:(this._initPromise=(async()=>{let e=await S.get(ie,se);T=e?{...P,...e}:{...P},st=Ir(document.documentElement.dataset.theme),T.brand=_r(e,st);try{await kt(T.brand)}catch{T.brand!==st&&(T.brand=st||P.brand)}return this.apply(T),this._watchSystemPreference(),this._watchRootAttributes(),this._watchCrossDocumentStorage(),T})(),this._initPromise)},_watchCrossDocumentStorage(){typeof window>"u"||window.addEventListener("storage",async e=>{if(e.key!==`vb:${ie}:${se}`||!e.newValue)return;let t;try{t=JSON.parse(e.newValue)?.data}catch{return}if(!t||typeof t!="object")return;let i={...P,...T,...t};if(i.brand=_r(t,st),i.brand&&i.brand!==T?.brand)try{await kt(i.brand)}catch{i.brand=st||P.brand}T=i,this.apply(T||{})})},load(){return T?{...T}:{...P}},save(e){let t={...T??P,...e};return T=t,S.set(ie,se,t).catch(()=>{}),t},apply({mode:e="auto",brand:t="default",borderStyle:i="",iconSet:s="",fluid:n="",backdrop:r="",backdropChrome:a="",pageBgType:o="",pageBgColor:c="",pageBgGradStart:d="",pageBgGradEnd:l="",pageBgGradDir:u=""}={}){let h=document.documentElement;h.dataset.mode=e==="auto"?this.getEffectiveMode():e;let v=(h.dataset.theme||"").split(" ").filter(L=>L.startsWith("a11y-")),p=t!=="default"?[t,...v]:[...v];p.length?h.dataset.theme=p.join(" "):delete h.dataset.theme;let m=i||this._readCSSHint("--theme-border-style");m&&m!=="clean"?h.dataset.borderStyle=m:delete h.dataset.borderStyle;let y=s||this._readCSSHint("--theme-icon-set");if(y&&y!=="lucide"?h.dataset.iconSet=y:delete h.dataset.iconSet,n?h.dataset.fluid=n:delete h.dataset.fluid,r?h.dataset.backdrop=r:delete h.dataset.backdrop,a&&a!=="card"?h.dataset.backdropChrome=a:delete h.dataset.backdropChrome,o==="color"&&c)h.style.setProperty("--page-bg-color",c),h.style.removeProperty("--page-bg-gradient");else if(o==="gradient"&&d&&l){let L=u||"to bottom";h.style.setProperty("--page-bg-gradient",`linear-gradient(${L}, ${d}, ${l})`),h.style.removeProperty("--page-bg-color")}else h.style.removeProperty("--page-bg-color"),h.style.removeProperty("--page-bg-gradient");let k=this.load().accent||"default";this._applyAccent(k),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{mode:e,brand:t,accent:k,borderStyle:m,iconSet:y,fluid:n,backdrop:r,backdropChrome:a,pageBgType:o,effectiveMode:this.getEffectiveMode()}}))},setMode(e){let t=this.save({mode:e});this.apply(t)},async setBrand(e){try{await kt(e)}catch(i){console.warn(`[VB] Theme "${e}" failed to load, using default`,i),e="default"}let t=this.save({brand:e});this.apply(t)},setAccent(e){this.save({accent:e}),this._applyAccent(e),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}}))},setBorderStyle(e){let t=this.save({borderStyle:e});this.apply(t)},setIconSet(e){let t=this.save({iconSet:e});this.apply(t)},setFluid(e){let t=this.save({fluid:e});this.apply(t)},setBackdrop(e){let t=this.save({backdrop:e});this.apply(t)},setBackdropChrome(e){let t=this.save({backdropChrome:e});this.apply(t)},setPageBg({type:e="",color:t="",gradStart:i="",gradEnd:s="",gradDir:n=""}={}){let r=this.save({pageBgType:e,pageBgColor:t,pageBgGradStart:i,pageBgGradEnd:s,pageBgGradDir:n});this.apply(r)},getEffectiveMode(){let{mode:e}=this.load();return e!=="auto"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},getState(){let{mode:e,brand:t,accent:i,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:d,pageBgGradStart:l,pageBgGradEnd:u,pageBgGradDir:h}=this.load();return{mode:e,brand:t,accent:i,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:d,pageBgGradStart:l,pageBgGradEnd:u,pageBgGradDir:h,effectiveMode:this.getEffectiveMode()}},toggleMode(){let t=this.getEffectiveMode()==="dark"?"light":"dark";this.setMode(t)},reset(){T={...P,brand:st||P.brand},S.remove(ie,se).catch(()=>{});let e=document.documentElement;e.style.removeProperty("--page-bg-color"),e.style.removeProperty("--page-bg-gradient");for(let t of Dr)e.style.removeProperty(t);this.apply(T)},_readCSSHint(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()},_applyAccent(e){let t=document.documentElement,i=Cr.find(s=>s.id===e);for(let s of Dr)t.style.removeProperty(s);if(!(!i||!i.seeds||Object.keys(i.seeds).length===0)){for(let[s,n]of Object.entries(i.seeds))t.style.setProperty(s,String(n));if(i.seedsDark&&this.getEffectiveMode()==="dark")for(let[s,n]of Object.entries(i.seedsDark))t.style.setProperty(s,String(n))}},_watchRootAttributes(){this._rootObserver||(this._rootObserver=new MutationObserver(e=>{for(let t of e)t.attributeName==="data-theme"?this._syncFromDataTheme():t.attributeName==="data-mode"&&this._syncFromDataMode()}),this._rootObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","data-mode"]}))},_syncFromDataTheme(){if(!T)return;let i=(document.documentElement.dataset.theme||"").split(/\s+/).filter(Boolean).find(s=>!s.startsWith("a11y-"))||"default";i!==T.brand&&(T.brand=i,kt(i).catch(()=>{}),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_syncFromDataMode(){if(!T)return;let e=document.documentElement.dataset.mode||"auto",t=T.mode==="auto"?this.getEffectiveMode():T.mode;e!==t&&(T.mode=e,window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_watchSystemPreference(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{let t=this.load();t.mode==="auto"&&this.apply(t)})}};var Ql=["layout-text","layout-reel","layout-canvas","dl-item"];Ql.forEach(e=>{customElements.get(e)||customElements.define(e,class extends HTMLElement{})});var Dp=window.matchMedia("(prefers-reduced-motion: reduce)");var Or=new Map;function b(e,t,i={}){let s=i.priority??10,n={impl:t,bundle:i.bundle,contract:i.contract,priority:s},r=Or.get(e);if(customElements.get(e)){if(!r||r.priority>=s){r&&r.priority===s&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${e}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${i.bundle}".`);return}console.warn(`[VB Bundle] Tag <${e}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${i.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=s){r.priority===s&&console.warn(`[VB Bundle] Tag <${e}> already registered by "${r.bundle}". Skipping "${i.bundle}" (first wins at equal priority).`);return}Or.set(e,n),customElements.define(e,t)}var g=class extends HTMLElement{#e=[];#t;connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,i,s,n){t.addEventListener(i,s,n),this.#e.push(()=>t.removeEventListener(i,s,n))}setup(){}teardown(){}setState(t,i){this.#t||(this.#t=this.attachInternals());let s=this.#t.states;try{i?s.add(t):s.delete(t)}catch{let n=`--${t}`;i?s.add(n):s.delete(n)}}_adoptInternals(t){this.#t||(this.#t=t)}};var td=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],Xe=class extends g{#e=null;#t=null;#i=!1;setup(){return this.#e=this.querySelector("input, textarea, select"),this.#t=this.querySelector("output.error")??this.querySelector("output:not(.hint)"),this.#e?(this.listen(this.#e,"blur",()=>this.validate()),this.listen(this.#e,"input",()=>{this.#i&&this.validate()}),!0):!1}teardown(){this.#e=null,this.#t=null,this.#i=!1}validate(){let t=this.#e;if(!t)return!0;t.validity.customError||t.setCustomValidity("");let i=t.checkValidity();return i?(this.#s(t.value?"valid":null),t.removeAttribute("aria-invalid"),this.#t&&(this.#t.textContent="")):(this.#i=!0,this.#s("invalid"),t.setAttribute("aria-invalid","true"),this.#r(t.validity)),i}setError(t){this.#e&&(this.#e.setCustomValidity(t),this.#i=!0,this.#s("invalid"),this.#e.setAttribute("aria-invalid","true"),this.#t&&(this.#t.textContent=t))}clearError(){this.#e&&(this.#e.setCustomValidity(""),this.#s(null),this.#e.removeAttribute("aria-invalid"),this.#i=!1,this.#t&&(this.#t.textContent=""))}get fieldName(){return this.querySelector("label")?.textContent?.trim()??this.#e?.getAttribute("aria-label")??this.#e?.name??this.#e?.id??"Field"}get input(){return this.#e}#s(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#r(t){if(!this.#t)return;let i=this.#e;if(!(!i||!this.#t))for(let s of td){if(!t[s])continue;let n=`data-message-${s.toLowerCase()}`,r=i.getAttribute(n)??i.validationMessage;this.#t.textContent=r;return}}};b("form-field",Xe);function U(e){return document.startViewTransition?document.startViewTransition(e):e()}var ed=0,Je=class extends g{#e=[];#t=[];#i=!1;#s=0;setup(){return this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0?!1:(this.#a(),this.#c(),this.#r(),!0)}teardown(){this.#e=[],this.#t=[],this.#i=!1}get tabs(){return this.#e.map((t,i)=>({id:t.id||void 0,label:t.querySelector("summary")?.textContent?.trim()||`Tab ${i+1}`,content:t.querySelector(":scope > :not(summary)")?.innerHTML||"",active:t.hasAttribute("open")}))}set tabs(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();let s=!1;for(let n of i){let r=document.createElement("details");n.id&&(r.id=n.id),n.active&&!s&&(r.setAttribute("open",""),s=!0);let a=document.createElement("summary");a.textContent=n.label||"",r.appendChild(a);let o=document.createElement("div");o.innerHTML=n.content||"",r.appendChild(o),this.appendChild(r)}!s&&this.firstElementChild&&this.firstElementChild.setAttribute("open",""),this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("tab-set:tabs-changed",{detail:{tabs:i,source:"property"},bubbles:!0}))}#r(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#i=!0;let t=++ed,i=this.getAttribute("transition")||"fade",s=i==="slide"?"vt-tabs-slide":i==="scale"?"vt-tabs-scale":"vt-tabs";this.#e.forEach(n=>{let r=n.querySelector(":scope > :not(summary)");r&&(r.style.viewTransitionName=`tabs-${t}`,r.style.viewTransitionClass=s)}),this.#s=this.#e.findIndex(n=>n.open),this.#s===-1&&(this.#s=0)}#n(t){if(t===this.#s)return;let i=t>this.#s?"forward":"backward";document.documentElement.dataset.vtDirection=i,U(()=>{this.#e[t].open=!0}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}#a(){this.#e.forEach((t,i)=>{let s=this.#t[i],n=t.querySelector(":scope > :not(summary)");if(!s||!n)return;let r=s.id||`tab-${crypto.randomUUID().slice(0,8)}`,a=n.id||`panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,s.setAttribute("aria-controls",a),s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-expanded",t.open?"true":"false"),n.id=a,n.setAttribute("aria-labelledby",r),this.listen(s,"click",o=>{this.#i&&(o.preventDefault(),this.#n(i))}),this.listen(s,"keydown",o=>this.#h(o,i)),this.listen(t,"toggle",()=>this.#o(i))})}#c(){!this.#e.some(i=>i.open)&&this.#e.length>0&&(this.#e[0].open=!0,this.#f())}#o(t){this.#e[t].open&&(this.#s=t),this.#f(),this.dispatchEvent(new CustomEvent("tab-set:change",{detail:{index:t},bubbles:!0}))}#f(){this.#e.forEach((t,i)=>{let s=this.#t[i];s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-expanded",t.open?"true":"false")})}#h(t,i){let{key:s}=t,n;switch(s){case"ArrowRight":n=(i+1)%this.#e.length;break;case"ArrowLeft":n=(i-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#i?this.#n(n):this.#e[n].open=!0,this.#t[n].focus()}};b("tab-set",Je);var Ze=class e extends g{static#e=0;#t;#i=[];#s="Back to content";setup(){this.#t=++e.#e,this.hasAttribute("data-back-label")&&(this.#s=this.getAttribute("data-back-label")??this.#s),this.#r(),this.getAttribute("data-mode")==="sidenotes"?this.#c():this.#n()}#r(){let t=[...document.querySelectorAll("foot-note:not([data-enhanced])")];this.#i=t.filter(i=>this.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING)}#n(){if(this.#i.length===0)return;let t=document.createElement("ol");this.#i.forEach((i,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;this.#a(i,n,r,a);let o=this.#f(i,n,r,a);t.appendChild(o)}),this.appendChild(t)}#a(t,i,s,n){t.setAttribute("data-enhanced",""),t.id=s;let r=t.innerHTML,a=document.createElement("span");a.innerHTML=r;let o=document.createElement("a");o.href=`#${n}`,o.setAttribute("aria-describedby",n),o.textContent=`[${i}]`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#c(){if(this.#i.length===0)return;let t=[];if(this.#i.forEach((i,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;i.getAttribute("data-side")==="false"?(this.#a(i,n,r,a),t.push({ref:i,num:n,refId:r,noteId:a})):this.#o(i,n,r,a)}),t.length>0){let i=document.createElement("ol");for(let{ref:s,num:n,refId:r,noteId:a}of t)i.appendChild(this.#f(s,n,r,a));this.appendChild(i)}else this.hidden=!0}#o(t,i,s,n){let r=t.innerHTML;t.setAttribute("data-enhanced",""),t.setAttribute("data-side",""),t.id=s;let a=document.createElement("a");a.href=`#${n}`,a.setAttribute("aria-describedby",n),a.textContent=`[${i}]`;let o=document.createElement("aside");o.className="sidenote",o.id=n,o.setAttribute("role","note"),o.innerHTML=`<span class="sidenote-number">${i}.</span> ${r}`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#f(t,i,s,n){let r=document.createElement("li");r.id=n;let a=t.querySelector("span"),o=a?a.innerHTML:"",c=document.createElement("a");return c.href=`#${s}`,c.setAttribute("data-backref",""),c.setAttribute("aria-label",this.#s),c.textContent="\u21A9",r.innerHTML=o+" ",r.appendChild(c),r}},Qe=class extends HTMLElement{};b("foot-notes",Ze);b("foot-note",Qe);var qr=0,ti=class extends g{#e=[];#t=[];#i=[];#s=!1;setup(){return this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0?!1:(this.#r(),this.#c(),this.#n(),!0)}teardown(){this.#e=[],this.#t=[],this.#i=[],this.#s=!1}get panels(){return this.#e.map((t,i)=>({id:t.id||void 0,summary:t.querySelector("summary")?.textContent?.trim()||`Panel ${i+1}`,content:this.#i[i]?.innerHTML||"",open:t.hasAttribute("open")}))}set panels(t){let i=Array.isArray(t)?t:[],n=this.hasAttribute("single")?`acc-${++qr}`:null;for(;this.firstChild;)this.firstChild.remove();for(let r of i){let a=document.createElement("details");r.id&&(a.id=r.id),r.open&&a.setAttribute("open",""),n&&a.setAttribute("name",n);let o=document.createElement("summary");o.textContent=r.summary||"",a.appendChild(o);let c=document.createElement("div");c.innerHTML=r.content||"",a.appendChild(c),this.appendChild(a)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("accordion-wc:panels-changed",{detail:{panels:i,source:"property"},bubbles:!0}))}#r(){this.#i=this.#e.map(t=>{let i=t.querySelector("summary");if(!i)return null;let s=[...t.children].filter(n=>n!==i);if(s.length===1)return s[0];if(s.length>1){let n=document.createElement("div");for(let r of s)n.appendChild(r);return t.appendChild(n),n}return null})}#n(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#s=!0;let t=++qr,i=this.getAttribute("transition")||"fade",s=i==="slide"?"vt-accordion-slide":i==="scale"?"vt-accordion-scale":"vt-accordion";this.#i.forEach((n,r)=>{n&&(n.style.viewTransitionName=`accordion-${t}-${r}`,n.style.viewTransitionClass=s)})}#a(t){U(()=>{t.open=!t.open})}#c(){this.#e.forEach((t,i)=>{let s=this.#t[i],n=this.#i[i];if(s){if(n){let r=s.id||`accordion-heading-${crypto.randomUUID().slice(0,8)}`,a=n.id||`accordion-panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,n.id=a,s.setAttribute("aria-expanded",t.open?"true":"false"),s.setAttribute("aria-controls",a),n.setAttribute("aria-labelledby",r),n.setAttribute("role","region")}else s.setAttribute("aria-expanded",t.open?"true":"false");this.listen(s,"click",r=>{this.#s&&(r.preventDefault(),this.#a(t))}),this.listen(s,"keydown",r=>this.#f(r,i)),this.listen(t,"toggle",()=>this.#o(t,i))}})}#o(t,i){this.#t[i].setAttribute("aria-expanded",t.open?"true":"false"),this.hasAttribute("single")&&t.open&&this.#e.forEach((n,r)=>{r!==i&&n.open&&(n.open=!1,this.#t[r].setAttribute("aria-expanded","false"))}),this.dispatchEvent(new CustomEvent("accordion-wc:toggle",{detail:{index:i,open:t.open},bubbles:!0}))}#f(t,i){let{key:s}=t,n;switch(s){case"ArrowDown":n=(i+1)%this.#e.length;break;case"ArrowUp":n=(i-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#t[n].focus()}open(t){t<0||t>=this.#e.length||(this.#s&&!this.#e[t].open?U(()=>{this.#e[t].open=!0}):this.#e[t].open=!0)}close(t){t<0||t>=this.#e.length||(this.#s&&this.#e[t].open?U(()=>{this.#e[t].open=!1}):this.#e[t].open=!1)}toggle(t){t<0||t>=this.#e.length||(this.#s?this.#a(this.#e[t]):this.#e[t].open=!this.#e[t].open)}openAll(){this.hasAttribute("single")||this.#e.forEach(t=>{t.open=!0})}closeAll(){this.#e.forEach(t=>{t.open=!1})}};b("accordion-wc",ti);var ei=class extends g{#e=[];#t=[];static get observedAttributes(){return["position","max"]}setup(){this.setAttribute("role","region"),this.setAttribute("aria-label","Notifications"),this.setAttribute("aria-live","polite")}teardown(){this.#t.forEach(t=>{t._dismissTimer&&clearTimeout(t._dismissTimer)}),this.#e=[],this.#t=[]}show(t){let{message:i,variant:s="info",duration:n=this.#n(),dismissible:r=!0,action:a,onAction:o,source:c="api"}=t,d=this.#i({message:i,variant:s,dismissible:r,action:a,onAction:o}),l=this.#a();return this.#t.length>=l?this.#e.push({toast:d,duration:n}):this.#s(d,n),this.dispatchEvent(new CustomEvent("toast-msg:enqueued",{detail:{message:i,variant:s,duration:n,source:c},bubbles:!0})),d}get queue(){let t=this.#t.map(s=>({message:s.querySelector(".message")?.textContent||"",variant:s.getAttribute("data-variant")||"info",state:"visible"})),i=this.#e.map(({toast:s})=>({message:s.querySelector(".message")?.textContent||"",variant:s.getAttribute("data-variant")||"info",state:"queued"}));return[...t,...i]}#i({message:t,variant:i,dismissible:s,action:n,onAction:r}){let a=document.createElement("div");a.className="toast",a.setAttribute("role",i==="error"||i==="warning"?"alert":"status"),a.setAttribute("data-variant",i);let o={info:"&#9432;",success:"&#10003;",warning:"&#9888;",error:"&#10007;"};return a.innerHTML=`
10
+ `,s.appendChild(n);let r=document.createElement("ul");r.className="upload-file-list",r.setAttribute("aria-label","Selected files"),s.appendChild(r);let a=n.querySelector(".upload-browse");if(!a)return;a.addEventListener("click",()=>e.click()),s.addEventListener("click",c=>{(c.target===s||c.target===n||c.target.closest(".upload-prompt"))&&e.click()});let o=0;s.addEventListener("dragenter",c=>{c.preventDefault(),o++,s.dataset.dragover=""}),s.addEventListener("dragleave",()=>{o--,o===0&&delete s.dataset.dragover}),s.addEventListener("dragover",c=>{c.preventDefault()}),s.addEventListener("drop",c=>{c.preventDefault(),o=0,delete s.dataset.dragover,c.dataTransfer&&c.dataTransfer.files.length&&(e.files=c.dataTransfer.files,e.dispatchEvent(new Event("change",{bubbles:!0})))}),e.addEventListener("change",()=>{r.innerHTML="";let c=Array.from(e.files??[]);if(c.length===0){r.hidden=!0;return}r.hidden=!1,c.forEach(l=>{let d=document.createElement("li");d.innerHTML=`
11
+ <span class="upload-file-name">${Wh(l.name)}</span>
12
+ <span class="upload-file-size">${Uh(l.size)}</span>
13
+ `,r.appendChild(d)})})}function Wh(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML}function wn(e=document){e.querySelectorAll(vn).forEach(yn)}var vn,jh,An=y(()=>{vn='input[type="file"][data-upload]';document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>wn()):wn();jh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(vn)&&yn(s),s.querySelectorAll(vn).forEach(n=>yn(n))}});jh.observe(document.documentElement,{childList:!0,subtree:!0})});var Wo={};S(Wo,{initAutosave:()=>Cn});function Gh(e){let t=e.dataset.autosave;if(typeof t=="string"&&t.trim()!=="")return t.trim();let i=(e.method||"get").toLowerCase(),s=e.action||(typeof location<"u"?location.href:"");return`${i} ${s}`}function Kh(e){let t=e.dataset.autosaveRetain;if(typeof t!="string")return null;let i=t.trim();return i===""?null:new Set(i.split(/\s+/))}function xn(e){if(e.hasAttribute("data-autosave-init"))return;e.setAttribute("data-autosave-init","");let t=Gh(e),i=Kh(e),s;function n(d){return i===null||i.has(d)}function r(){let d={},u=e.elements;for(let h of u){let f=h;f.name&&(f.type==="password"||f.type==="file"||n(f.name)&&(f.type==="checkbox"?d[f.name]=f.checked?"on":"":f.type==="radio"?f.checked&&(d[f.name]=f.value):f instanceof HTMLSelectElement&&f.multiple?d[f.name]=Array.from(f.selectedOptions).map(g=>g.value):d[f.name]=f.value))}return d}function a(){E.set(En,t,r()).catch(()=>{})}async function o(){let d=await E.get(En,t,{maxAge:Yh});if(!d)return!1;let u=!1;for(let[h,f]of Object.entries(d)){if(!n(h))continue;let g=e.querySelectorAll(`[name="${CSS.escape(h)}"]`);g.forEach(p=>{let v=p;if(v.type==="checkbox")v.checked=f==="on";else if(v.type==="radio")v.checked=v.value===f;else if(v instanceof HTMLSelectElement&&v.multiple){let w=Array.isArray(f)?f:[f];Array.from(v.options).forEach(T=>{T.selected=w.includes(T.value)})}else typeof f=="string"&&(v.value=f)}),g.length&&(u=!0)}return u}function c(){E.remove(En,t).catch(()=>{})}function l(){if(customElements.get("toast-msg")){let d=document.createElement("toast-msg");d.setAttribute("variant","info"),d.setAttribute("duration","3000"),d.textContent="Draft restored",document.body.appendChild(d)}}o().then(d=>{d&&(l(),Array.from(e.elements).forEach(u=>{let h=u;h.name&&h.type!=="password"&&h.type!=="file"&&h.dispatchEvent(new Event("input",{bubbles:!0}))}))}),e.addEventListener("input",()=>{clearTimeout(s),s=setTimeout(a,Uo)}),e.addEventListener("change",()=>{clearTimeout(s),s=setTimeout(a,Uo)}),e.addEventListener("submit",c),e.addEventListener("reset",()=>{setTimeout(c,0)})}function Cn(e=document){e.querySelectorAll(Sn).forEach(xn)}var Sn,En,Uo,Yh,Xh,kn=y(()=>{Y();Sn="form[data-autosave]",En="autosave",Uo=500,Yh=1440*60*1e3;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Cn()):Cn();Xh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Sn)&&xn(s),s.querySelectorAll(Sn).forEach(xn)}});Xh.observe(document.documentElement,{childList:!0,subtree:!0})});var Jo={};S(Jo,{initMaskInputs:()=>ef});function Zh(e){let t=e.dataset.mask;if(jo[t])return jo[t];if(t==="custom"&&e.dataset.pattern){let i=e.dataset.pattern,s=new Set;for(let r of i)r==="#"?s.add("0-9"):r==="A"?s.add("a-zA-Z"):r==="*"&&s.add("a-zA-Z0-9");let n=s.size>0?new RegExp(`[${[...s].join("")}]`):/./;return{pattern:i,accept:n}}return null}function He(e){return e==="#"||e==="A"||e==="*"}function Qh(e,t){let i=Jh[e];return i?i.test(t):!1}function Yo(e,t){let i="",s=0;for(let n=0;n<t.length&&s<e.length;n++){let r=t[n];if(He(r)){for(;s<e.length&&!Qh(r,e[s]);)s++;s<e.length&&(i+=e[s],s++)}else i+=r}return i}function Go(e,t){return e.split("").filter(i=>t.test(i)).join("")}function tf(e){for(let t of e)if(He(t)&&t!=="#")return!1;return!0}function Xo(e){if(e.hasAttribute("data-mask-init"))return;e.setAttribute("data-mask-init","");let t=Zh(e);if(!t)return;let{pattern:i}=t,s=t.accept;tf(i)&&!e.getAttribute("inputmode")&&e.setAttribute("inputmode","numeric"),e.getAttribute("maxlength")||e.setAttribute("maxlength",String(i.length));let n=!1;e.addEventListener("compositionstart",()=>{n=!0}),e.addEventListener("compositionend",()=>{n=!1,r()});function r(){if(n)return;let a=e.selectionStart??0,o=0;for(let h=0;h<a&&h<e.value.length;h++)s.test(e.value[h])&&o++;let c=Go(e.value,s),l=Yo(c,i);e.value=l,e.dataset.rawValue=c;let d=0,u=l.length;for(let h=0;h<l.length;h++)if(h<i.length&&He(i[h])&&(d++,d===o)){for(u=h+1;u<i.length&&!He(i[u]);)u++;break}e.setSelectionRange(u,u)}if(e.addEventListener("input",r),e.value){let a=Go(e.value,s);e.value=Yo(a,i),e.dataset.rawValue=a}}function ef(e=document){e.querySelectorAll(Ko).forEach(Xo)}var Ko,jo,Jh,Tn=y(()=>{$();Ko="input[data-mask]",jo={phone:{pattern:"(###) ###-####",accept:/\d/},"credit-card":{pattern:"#### #### #### ####",accept:/\d/},date:{pattern:"##/##/####",accept:/\d/},ssn:{pattern:"###-##-####",accept:/\d/},zip:{pattern:"#####",accept:/\d/}},Jh={"#":/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/};C(Ko,Xo)});var tc={};S(tc,{initAcceptInputs:()=>af});function nf(e){if(!e)return null;let t=sf[e];if(t)return{regex:new RegExp(t.pattern),inputmode:t.inputmode};if(e.startsWith("["))try{return{regex:new RegExp(e),inputmode:"text"}}catch{return console.warn(`[data-accept] Invalid character class: ${e}`),null}return console.warn(`[data-accept] Unknown preset: ${e}`),null}function Qo(e){if(e.hasAttribute("data-accept-init"))return;if(e.setAttribute("data-accept-init",""),e.hasAttribute("data-mask")){console.warn("[data-accept] Conflict: data-mask is also present \u2014 deferring to mask.",e);return}let t=nf(e.dataset.accept||"");if(!t)return;let{regex:i,inputmode:s}=t;e.dataset.acceptPattern=i.source,e.getAttribute("inputmode")||e.setAttribute("inputmode",s);let n=!1;e.addEventListener("compositionstart",()=>{n=!0}),e.addEventListener("compositionend",()=>{n=!1,r()}),e.addEventListener("beforeinput",a=>{if(n)return;let o=a.data;if(o!=null){if(a.inputType==="insertFromPaste"){let c=o.split("").filter(l=>i.test(l)).join("");if(c===o||(a.preventDefault(),!c))return;document.execCommand("insertText",!1,c)||rf(e,c);return}if(a.inputType==="insertText"||a.inputType==="insertCompositionText"){for(let c of o)if(!i.test(c)){a.preventDefault();return}}}}),e.addEventListener("input",()=>{n||r()});function r(){let a=e.value,o=a.split("").filter(u=>i.test(u)).join("");if(o===a)return;let c=e.selectionStart??0,l=0;for(let u=0;u<c&&u<a.length;u++)i.test(a[u])&&l++;e.value=o;let d=Math.min(l,o.length);e.setSelectionRange(d,d)}if(e.value){let a=e.value.split("").filter(o=>i.test(o)).join("");a!==e.value&&(e.value=a)}}function rf(e,t){let i=e.selectionStart??0,s=e.selectionEnd??0,n=e.value.slice(0,i),r=e.value.slice(s);e.value=n+t+r;let a=i+t.length;e.setSelectionRange(a,a),e.dispatchEvent(new Event("input",{bubbles:!0}))}function af(e=document){e.querySelectorAll(Zo).forEach(Qo)}var Zo,sf,Ln=y(()=>{$();Zo="input[data-accept]",sf={digits:{pattern:"[0-9]",inputmode:"numeric"},alpha:{pattern:"[a-zA-Z]",inputmode:"text"},alphanum:{pattern:"[a-zA-Z0-9]",inputmode:"text"},phone:{pattern:"[0-9+()\\- ]",inputmode:"tel"},date:{pattern:"[0-9/\\-.]",inputmode:"numeric"},hex:{pattern:"[0-9a-fA-F]",inputmode:"text"},currency:{pattern:"[0-9.,]",inputmode:"decimal"},cc:{pattern:"[0-9 \\-]",inputmode:"numeric"}};C(Zo,Qo)});var ec={};S(ec,{initToggleTags:()=>_n});function Nn(e){if(e.hasAttribute("data-toggle-tags-init"))return;e.setAttribute("data-toggle-tags-init","");let t=parseInt(e.dataset.max,10);if(!t||t<1)return;function i(){let s=e.querySelectorAll('input[type="checkbox"]'),n=e.querySelectorAll('input[type="checkbox"]:checked').length;s.forEach(r=>{r.checked||(r.disabled=n>=t)})}e.addEventListener("change",i),i()}function _n(e=document){e.querySelectorAll(Mn).forEach(Nn)}var Mn,of,Dn=y(()=>{Mn="fieldset[data-toggle-tags][data-max]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>_n()):_n();of=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Mn)&&Nn(s),s.querySelectorAll(Mn).forEach(Nn)}});of.observe(document.documentElement,{childList:!0,subtree:!0})});var nc={};S(nc,{initNumberSteppers:()=>df});function sc(e){if(e.hasAttribute("data-stepper-init"))return;e.setAttribute("data-stepper-init","");let t=document.createElement("div");t.className="number-wrapper",e.parentNode.insertBefore(t,e);let i=document.createElement("button");i.type="button",i.className="number-dec",i.innerHTML=cf,i.setAttribute("aria-label","Decrease"),i.tabIndex=-1;let s=document.createElement("button");s.type="button",s.className="number-inc",s.innerHTML=lf,s.setAttribute("aria-label","Increase"),s.tabIndex=-1,t.appendChild(i),t.appendChild(e),t.appendChild(s);function n(a){let o=e.min!==""?parseFloat(e.min):-1/0,c=e.max!==""?parseFloat(e.max):1/0,l=parseFloat(e.step)||1,d=parseFloat(e.value)||0,u=(l.toString().split(".")[1]||"").length,h=parseFloat((d+l*a).toFixed(u)),f=Math.min(Math.max(h,o),c);e.value=f,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})),r()}function r(){let a=e.min!==""?parseFloat(e.min):-1/0,o=e.max!==""?parseFloat(e.max):1/0,c=parseFloat(e.value)||0;i.disabled=c<=a,s.disabled=c>=o}i.addEventListener("click",()=>n(-1)),s.addEventListener("click",()=>n(1)),e.addEventListener("input",r),r()}function df(e=document){e.querySelectorAll(ic).forEach(sc)}var ic,cf,lf,In=y(()=>{$();ic='input[type="number"][data-stepper]',cf='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="5" y1="12" x2="19" y2="12"/></svg>',lf='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';C(ic,sc)});var dc={};S(dc,{initSelectAll:()=>Bn});function Bn(e=document){e.querySelectorAll($n).forEach(Pn)}function Pn(e){if(e.hasAttribute("data-select-all-init"))return;e.setAttribute("data-select-all-init","");let t=e.dataset.selectAll??"";if(!t)return;function i(){return(e.closest("[data-select-all-scope]")||e.closest("table, form, fieldset")||document).querySelectorAll(t)}function s(){let a=i(),o=a.length,c=0;a.forEach(u=>{u.checked&&c++}),c===0?(e.checked=!1,e.indeterminate=!1):c===o?(e.checked=!0,e.indeterminate=!1):(e.checked=!1,e.indeterminate=!0);let d=(e.closest("[data-select-all-scope]")||e.closest("table, form, fieldset")||document).querySelector("[data-selected-count]");d&&(d.textContent=String(c)),e.dispatchEvent(new CustomEvent("select-all:change",{bubbles:!0,detail:{checked:c,total:o,selected:[...a].filter(u=>u.checked)}}))}let n=!1;e.addEventListener("change",()=>{n=!0;let a=e.checked;i().forEach(c=>{c.checked=a,c.dispatchEvent(new Event("change",{bubbles:!0}))}),n=!1,e.indeterminate=!1,s()}),(e.closest("[data-select-all-scope]")||e.closest("table, form, fieldset")||document).addEventListener("change",a=>{n||a.target!==e&&a.target.matches?.(t)&&s()}),s()}var $n,bf,Fn=y(()=>{$n="[data-select-all]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Bn()):Bn();bf=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches($n)&&Pn(s),s.querySelectorAll($n).forEach(n=>Pn(n))}});bf.observe(document.documentElement,{childList:!0,subtree:!0})});var hc={};S(hc,{initMath:()=>Hn});function Hn(e=document){e.querySelectorAll(Rn).forEach(zn)}function gf(e){let t=e.getAttribute("data-math")||"";return new Set(t.split(/\s+/).filter(Boolean))}function zn(e){if(e.hasAttribute("data-math-init"))return;e.setAttribute("data-math-init",""),!e.hasAttribute("data-math")&&e.classList.contains("language-math")&&e.setAttribute("data-math","");let t=gf(e),i=e.getAttribute("data-mathml"),s=e.textContent.trim(),n=t.has("inline");if(!i){e.setAttribute("data-math-state","source");return}let r=n?document.createElement("span"):document.createElement("div");r.setAttribute("data-math-rendered",""),r.innerHTML=i;let a=e.id||null;a&&(r.id=a,e.removeAttribute("id"));let o=r.querySelector("math");o&&!n&&o.setAttribute("display","block");let c=null;t.has("numbered")&&(uc++,c=uc,r.setAttribute("data-math-numbered",""),r.setAttribute("data-equation-number",String(c)),a&&window.VBMath?.equations.push({id:a,number:c,latex:s})),t.has("copyable")&&(r.setAttribute("data-math-copyable",""),r.style.cursor="copy",r.addEventListener("click",async()=>{try{await navigator.clipboard.writeText(s),yf("Copied to clipboard",r)}catch{}})),e.setAttribute("data-math-state","rendered"),e.insertAdjacentElement("afterend",r);let l=e.closest("pre");l?(l.setAttribute("data-math-state","rendered"),l.hidden=!0):e.hidden=!0,vf(),e.dispatchEvent(new CustomEvent("math:rendered",{bubbles:!0,detail:{latex:s,inline:n,number:c}}))}function vf(){if(document.querySelector("[data-vb-math-font]"))return;let e=document.createElement("link");e.rel="stylesheet",e.href="/fonts/math-fonts.css",e.setAttribute("data-vb-math-font",""),document.head.appendChild(e)}function yf(e,t){let i=document.createElement("div");i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.className="visually-hidden",i.textContent=e,t.appendChild(i),setTimeout(()=>i.remove(),1e3)}var Rn,uc,wf,Vn=y(()=>{Rn="[data-math], code.language-math",uc=0;window.VBMath=window.VBMath||{equations:[]};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Hn()):Hn();wf=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Rn)&&zn(s),s.querySelectorAll(Rn).forEach(zn)}});wf.observe(document.documentElement,{childList:!0,subtree:!0})});var Sc={};S(Sc,{WizardController:()=>Ue,initWizards:()=>Zn});function Jn(e){if(e.hasAttribute("data-wizard-enhanced"))return;let t=new Ue(e);e.wizardController=t,e.wizardGoTo=i=>t.goTo(i),e.wizardNext=()=>t.next(),e.wizardPrev=()=>t.prev(),e.wizardReset=()=>t.reset()}function Zn(){document.querySelectorAll("form[data-wizard]").forEach(e=>{Jn(e)})}function Ec(){new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches("form[data-wizard]")&&Jn(n),n.querySelectorAll?.("form[data-wizard]:not([data-wizard-enhanced])").forEach(r=>{Jn(r)})}}).observe(document.documentElement,{childList:!0,subtree:!0})}var Ue,xc=y(()=>{Ue=class{#e;#t=[];#i=0;#s=null;#r=null;#n=null;#a=!1;#o="step";#l=null;#c="";#f=0;#m=0;constructor(t){if(!t||!(t instanceof HTMLFormElement))throw new Error("WizardController requires a form element");this.#e=t,this.#h()}#h(){if(this.#t=Array.from(this.#e.querySelectorAll("fieldset[data-wizard-step]")),this.#t.length===0){console.warn("Wizard form has no steps");return}this.#a=this.#e.hasAttribute("data-wizard-history"),this.#o=this.#e.getAttribute("data-wizard-validate")||"step",this.#u(),this.#s=this.#e.querySelector("[data-wizard-progress]"),this.#w(),this.#v(),this.#A(),this.#e.setAttribute("data-wizard-enhanced",""),this.#e.setAttribute("data-wizard-total",String(this.#t.length)),this.#O(),this.#k(),this.#N();let t=()=>{cancelAnimationFrame(this.#f),this.#f=requestAnimationFrame(()=>this.#T())};if(this.#e.addEventListener("change",t),this.#e.addEventListener("input",t),this.#l&&(this.#e.addEventListener("change",()=>this.#d()),this.#e.addEventListener("input",()=>this.#d())),this.#e.addEventListener("submit",i=>this.#S(i)),this.#e.addEventListener("reset",()=>{requestAnimationFrame(()=>this.reset())}),this.#a){let i=this.#$();i!==null&&i>=0&&i<this.#t.length&&(this.#i=i),window.addEventListener("hashchange",()=>{let s=this.#$();s!==null&&s!==this.#i&&this.goTo(s)})}this.#b(),this.#T(),this.#P()}#u(){let t=this.#e.getAttribute("data-wizard-persist");if(t){if(!this.#e.id){console.warn("Wizard persistence requires an id on the form element");return}this.#c=`vb-wizard:${this.#e.id}`,t==="local"?this.#l=localStorage:this.#l=sessionStorage}}#p(){if(!this.#l)return;let t={},i=new FormData(this.#e);for(let[s,n]of i.entries())t[s]!==void 0?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(n)):t[s]=n;try{this.#l.setItem(this.#c,JSON.stringify({step:this.#i,data:t}))}catch{}}#d(){this.#l&&(cancelAnimationFrame(this.#m),this.#m=requestAnimationFrame(()=>this.#p()))}#b(){if(this.#l)try{let t=this.#l.getItem(this.#c);if(!t)return;let i=JSON.parse(t);if(!i||typeof i!="object")return;if(i.data&&typeof i.data=="object")for(let[s,n]of Object.entries(i.data)){let r=this.#e.elements.namedItem(s);if(r)if(r instanceof RadioNodeList)r.value=n;else if(r instanceof HTMLInputElement)if(r.type==="checkbox"){let a=Array.isArray(n)?n:[n];r.checked=a.includes(r.value||"on")}else r.type==="radio"?r.checked=r.value===n:r.value=n;else(r instanceof HTMLSelectElement||r instanceof HTMLTextAreaElement)&&(r.value=n)}typeof i.step=="number"&&i.step>=0&&i.step<this.#t.length&&(this.#i=i.step)}catch{}}#g(){this.#l&&(cancelAnimationFrame(this.#m),this.#l.removeItem(this.#c))}#S(t){let i=this.#_();this.#i===i.length-1&&(this.#V("wizard:complete"),this.#g())}#A(){this.#r=document.createElement("div"),this.#r.setAttribute("role","status"),this.#r.setAttribute("aria-live","polite"),this.#r.setAttribute("aria-atomic","true"),this.#r.setAttribute("data-wizard-status",""),this.#e.prepend(this.#r)}#w(){let t=this.#e.getAttribute("data-wizard-steps");if(t){this.#n=document.querySelector(t);return}this.#n=this.#e.querySelector("nav.steps")}#v(){if(!this.#n)return;let t=this.#n.querySelector("ol");if(!(!t||t.children.length>0))for(let i of this.#t){let s=i.querySelector("legend"),n=document.createElement("li");n.textContent=s?.textContent||`Step ${this.#t.indexOf(i)+1}`,t.appendChild(n)}}#E(){if(!this.#n)return;let t=Array.from(this.#n.querySelectorAll("ol > li")),i=this.#_(),s=0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n],a=t[s];if(!a)break;if(r.hasAttribute("data-wizard-hidden")){a.setAttribute("hidden","");continue}else a.removeAttribute("hidden");let o=i.indexOf(r);if(a.removeAttribute("data-completed"),a.removeAttribute("aria-current"),a.removeAttribute("aria-disabled"),o<this.#i){a.setAttribute("data-completed",""),this.#y(a,o);let c=a.querySelector("a");if(c){let d=r.querySelector("legend")?.textContent||`Step ${o+1}`;c.setAttribute("aria-label",`Go to ${d} (completed)`)}}else o===this.#i?a.setAttribute("aria-current","step"):a.setAttribute("aria-disabled","true");s++}for(let n of t){if(n.hasAttribute("hidden"))continue;let r=n.querySelector("a, button")||n,a=n.hasAttribute("aria-current");r.setAttribute("tabindex",a?"0":"-1")}}#y(t,i){if(t.hasAttribute("data-wizard-nav-bound"))return;t.setAttribute("data-wizard-nav-bound","");let s=t.querySelector("a, button")||t;s.addEventListener("click",n=>{n.preventDefault(),this.goTo(i)}),s===t&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","0"),t.setAttribute("role","button"),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this.goTo(i))}))}#k(){let t=this.#e.querySelector("[data-wizard-prev]"),i=this.#e.querySelector("[data-wizard-next]");t?.addEventListener("click",s=>{s.preventDefault(),this.prev()}),i?.addEventListener("click",s=>{s.preventDefault(),this.next()})}#O(){if(this.#e.querySelector("[data-wizard-nav]"))return;let t=document.createElement("nav");t.setAttribute("data-wizard-nav","");let i=document.createElement("button");i.type="button",i.setAttribute("data-wizard-prev",""),i.textContent="Back";let s=document.createElement("button");s.type="button",s.setAttribute("data-wizard-next",""),s.textContent="Next";let n=document.createElement("button");n.type="submit",n.textContent="Submit",t.append(i,s,n),this.#e.appendChild(t)}#N(){this.#n&&this.#n.addEventListener("keydown",t=>{if(!this.#n)return;let i=Array.from(this.#n.querySelectorAll("ol > li:not([hidden])")),s=t.target.closest("li"),n=s?i.indexOf(s):-1;if(n===-1)return;let r;switch(t.key){case"ArrowRight":case"ArrowDown":r=Math.min(n+1,i.length-1);break;case"ArrowLeft":case"ArrowUp":r=Math.max(n-1,0);break;case"Home":r=0;break;case"End":r=i.length-1;break;default:return}t.preventDefault();let a=i[n].querySelector("a, button")||i[n],o=i[r].querySelector("a, button")||i[r];a.setAttribute("tabindex","-1"),o.setAttribute("tabindex","0"),o.focus()})}#_(){return this.#t.filter(t=>!t.hasAttribute("data-wizard-hidden"))}#B(){return this.#_()[this.#i]}#P(){let t=this.#_();this.#t.forEach(n=>{n.removeAttribute("data-wizard-active")});let i=t[this.#i];i&&i.setAttribute("data-wizard-active","");let s=this.#i+1;this.#e.setAttribute("data-wizard-current",String(s)),this.#e.setAttribute("data-wizard-total",String(t.length)),this.#i===t.length-1?this.#e.setAttribute("data-wizard-last",""):this.#e.removeAttribute("data-wizard-last"),this.#D(),this.#E(),this.#a&&this.#L(),this.#I(),this.#x()}#D(){if(!this.#s)return;let t=this.#_();this.#s.max=t.length,this.#s.value=this.#i+1}#L(){let t=`#step=${this.#i+1}`;window.location.hash!==t&&history.replaceState(null,"",t)}#$(){let i=window.location.hash.match(/step=(\d+)/);return i?parseInt(i[1],10)-1:null}#I(){if(!this.#r)return;let s=this.#B()?.querySelector("legend")?.textContent||`Step ${this.#i+1}`,n=this.#_();this.#r.textContent=`Now on step ${this.#i+1} of ${n.length}: ${s}`}#C(){if(this.#o==="none")return!0;let t=this.#B();if(!t||t.hasAttribute("data-wizard-optional"))return!0;let i=t.querySelectorAll("input, select, textarea"),s=!0;for(let n of i){let r=n;if(!r.checkValidity()){r.reportValidity(),s=!1;break}}return s}#T(){this.#t.forEach(i=>{let s=i.getAttribute("data-wizard-if");if(!s)return;this.#q(s)?i.removeAttribute("data-wizard-hidden"):i.setAttribute("data-wizard-hidden","")});let t=this.#_();this.#i>=t.length&&(this.#i=Math.max(0,t.length-1)),this.#P()}#q(t){return t.includes("||")?t.split("||").some(i=>this.#q(i.trim())):t.includes("&&")?t.split("&&").every(i=>this.#H(i.trim())):this.#H(t)}#H(t){let i=t.startsWith("!"),s=i?t.slice(1):t;if(s.includes(":")){let[o,c]=s.split(":"),l=c.startsWith("!"),d=l?c.slice(1):c,u=this.#M(o);return l?u!==d:u===d}let a=!!this.#M(s);return i?!a:a}#M(t){let i=this.#e.elements.namedItem(t);return i?i instanceof RadioNodeList?i.value:i instanceof HTMLInputElement?i.type==="checkbox"?i.checked?i.value||"true":"":i.value:i instanceof HTMLSelectElement||i instanceof HTMLTextAreaElement?i.value:"":""}#x(){let t=this.#B();if(!t||!t.hasAttribute("data-wizard-summary"))return;let i=t.querySelectorAll("[data-wizard-field]");if(i.length>0){for(let r of i){let a=r.getAttribute("data-wizard-field")||"";r.textContent=this.#M(a)||"\u2014"}return}let s=t.querySelector("[data-wizard-summary-list]");s||(s=document.createElement("dl"),s.setAttribute("data-wizard-summary-list",""),t.appendChild(s)),s.innerHTML="";let n=new Set;for(let r of this.#t){if(r===t||r.hasAttribute("data-wizard-hidden"))continue;let a=r.querySelectorAll("input, select, textarea");for(let o of a){let c=o.name;if(!c||n.has(c))continue;n.add(c);let l=this.#M(c);if(!l)continue;let d=this.#R(o),u=document.createElement("dt");u.textContent=d||c;let h=document.createElement("dd");h.textContent=l,s.append(u,h)}}}#R(t){if(t.id){let n=this.#e.querySelector(`label[for="${CSS.escape(t.id)}"]`);if(n)return n.textContent.trim()}let i=t.closest("label");if(i){let n=i.cloneNode(!0);n.querySelectorAll("input, select, textarea").forEach(a=>a.remove());let r=n.textContent.trim();if(r)return r}let s=t.closest("form-field");if(s){let n=s.querySelector("label");if(n)return n.textContent.trim()}return""}#V(t,i={}){this.#e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}goTo(t){let i=this.#_();if(t<0||t>=i.length||t>this.#i&&!this.#C())return!1;let s=this.#i;return this.#i=t,this.#P(),this.#V("wizard:step-change",{from:s,to:t}),this.#d(),!0}next(){let t=this.#_();return this.#i>=t.length-1?!1:this.goTo(this.#i+1)}prev(){return this.#i<=0?!1:this.goTo(this.#i-1)}reset(){this.#i=0,this.#P(),this.#g(),this.#V("wizard:reset")}get currentStep(){return this.#i}get totalSteps(){return this.#_().length}get form(){return this.#e}};typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Zn(),Ec()}):(Zn(),Ec()))});var kc={};S(kc,{initMobileForms:()=>Cc});function Cc(e=document){return()=>{}}var Tc=y(()=>{typeof document<"u"&&Cc()});var Mc={};S(Mc,{activateTrap:()=>Kt,deactivateTrap:()=>je,initFocusTraps:()=>Qn});function Qn(e=document){e.querySelectorAll(We).forEach(t=>Kt(t))}function Kt(e){if(kt.has(e))return;let t=document.activeElement,i=e.getAttribute("data-focus-trap")==="no-autofocus";function s(r){if(r.key!=="Tab")return;let a=Lc(e);if(!a.length)return;let o=a[0],c=a[a.length-1],l=document.activeElement;r.shiftKey&&l===o?(r.preventDefault(),c.focus()):!r.shiftKey&&l===c&&(r.preventDefault(),o.focus())}e.addEventListener("keydown",s);let n=()=>{e.removeEventListener("keydown",s)};kt.set(e,{cleanup:n,previousFocus:t}),i||requestAnimationFrame(()=>{let r=e.querySelector("[autofocus]");if(r)r.focus();else{let a=Lc(e);a.length&&a[0].focus()}})}function je(e){let t=kt.get(e);t&&(t.cleanup(),kt.delete(e),t.previousFocus&&t.previousFocus.isConnected&&t.previousFocus.focus())}function Lc(e){return[...e.querySelectorAll(Of)].filter(t=>t.offsetParent!==null)}var We,Of,kt,qf,Nc=y(()=>{We="[data-focus-trap]",Of='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled])',kt=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Qn()):Qn();qf=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(We)&&Kt(s),s.querySelectorAll(We).forEach(n=>Kt(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;kt.has(s)&&je(s),s.querySelectorAll(We).forEach(n=>{kt.has(n)&&je(n)})}if(t.type==="attributes"&&t.attributeName==="data-focus-trap"){let i=t.target;i.hasAttribute("data-focus-trap")?Kt(i):je(i)}}});qf.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-focus-trap"]})});var Pf={};var $f,Bf,_c=y(()=>{$f=80,Bf=40;document.querySelectorAll("header[data-scroll-hide]").forEach(e=>{let t=0,i=!1,s=e.closest("main")??window,n=()=>s===window?window.scrollY:s.scrollTop,r=()=>{let a=n(),o=a-t;!i&&o>0&&a>$f?(e.setAttribute("data-hidden",""),i=!0):i&&o<-Bf&&(e.removeAttribute("data-hidden"),i=!1),t=a};s.addEventListener("scroll",r,{passive:!0})})});var Ic={};S(Ic,{initSpotlights:()=>Dc});function Ff(e){if(e.__vbSpotlight)return;e.__vbSpotlight=!0;let t=s=>{let n=e.getBoundingClientRect();e.style.setProperty("--spotlight-x",((s.clientX-n.left)/n.width*100).toFixed(1)+"%"),e.style.setProperty("--spotlight-y",((s.clientY-n.top)/n.height*100).toFixed(1)+"%")},i=()=>{e.style.setProperty("--spotlight-x","50%"),e.style.setProperty("--spotlight-y","50%")};e.addEventListener("mousemove",t,{passive:!0}),e.addEventListener("mouseleave",i,{passive:!0})}function Dc(e=document){e.querySelectorAll?.("[data-spotlight]").forEach(Ff)}var Oc=y(()=>{Dc()});var Fc={};S(Fc,{getHotkeyActions:()=>Pc});function Hf(e){if(qc.has(e))return;qc.add(e);let t=e.getAttribute("data-hotkey");if(!t)return;let i=e.getAttribute("data-hotkey-action")||"click",s=$c[i]||$c.click,n=e.hasAttribute("data-hotkey-global"),r=e.getAttribute("data-hotkey-label")||e.textContent?.trim()||t,a=e.getAttribute("data-hotkey-group")||"Page Actions",o=pt(t,()=>s(e),{global:n});Bc.set(e,{combo:t,label:r,group:a,unbind:o}),document.dispatchEvent(new CustomEvent("vb:command-registry-change",{detail:{action:"add",element:e}}))}function Pc(){let e=new Map;for(let[t,i]of Bc){let s=t;if(s.hidden||s.closest("[hidden]"))continue;let n=e.get(i.group)||[];n.push({label:i.label,shortcut:i.combo,element:t}),e.set(i.group,n)}return e}var Rf,qc,Bc,$c,Rc=y(()=>{$();ue();Rf="[data-hotkey]:not(kbd)",qc=new WeakSet,Bc=new Map,$c={click(e){e.click()},focus(e){e.focus()},submit(e){let t=e.closest("form")||(e.tagName==="FORM"?e:null);t&&t.requestSubmit()},toggle(e){"open"in e?e.open=!e.open:e.hasAttribute("hidden")?e.removeAttribute("hidden"):e.setAttribute("hidden","")}};typeof window<"u"&&(window.__hotkeyActionRegistry={getHotkeyActions:Pc});C(Rf,Hf)});var Vc={};S(Vc,{collectLinksByRel:()=>Uf,upgradeBlankTargets:()=>zc});function Hc(e){return new Set((e.getAttribute("rel")||"").split(/\s+/).filter(Boolean))}function Vf(e,t){e.setAttribute("rel",[...t].join(" "))}function zc(e=document){let t=document.documentElement?.dataset?.linkPrivacy==="strict";for(let i of e.querySelectorAll('a[href][target="_blank"]')){let s=Hc(i),n=[...s].some(a=>zf.has(a)),r=!1;n||(s.add("noopener"),r=!0),t&&!s.has("noreferrer")&&(s.add("noreferrer"),r=!0),r&&Vf(i,s)}}function Uf(e=document){let t=new Map;for(let i of e.querySelectorAll("a[rel]"))for(let s of Hc(i)){let n=t.get(s)??[];n.push(i),t.set(s,n)}return t}var zf,Uc=y(()=>{zf=new Set(["opener","noopener","noreferrer"]);zc(document)});var Yc={};S(Yc,{initResponsiveImages:()=>jc});function jf(e,t){let i=e.lastIndexOf(".");if(i===-1)return"";let s=e.substring(0,i),n=e.substring(i);return t.map(r=>`${s}-${r}${n} ${r}w`).join(", ")}function Yf(e){let t=document.createElement("span");t.setAttribute("aria-hidden","true"),Object.assign(t.style,{position:"absolute",top:"4px",left:"4px",padding:"2px 6px",fontSize:"11px",fontFamily:"monospace",lineHeight:"1.4",background:"oklch(0.15 0 0 / 0.8)",color:"#0f0",borderRadius:"3px",zIndex:"1",pointerEvents:"none"});function i(){let r=(e.currentSrc||e.src).split("/").pop(),a=e.naturalWidth;t.textContent=`${r} (${a}px)`}e.addEventListener("load",i),e.complete&&i();let s=e.parentElement;return getComputedStyle(s).position==="static"&&(s.style.position="relative"),s.insertBefore(t,e),t}function Gf(e){new ResizeObserver(i=>{for(let s of i){let n=Math.round(s.contentBoxSize?.[0]?.inlineSize??s.contentRect.width);n>0&&(e.sizes=`${n}px`)}}).observe(e)}function jc(e){if(Wc.has(e))return;Wc.add(e);let t=e.getAttribute("data-responsive");if(t){let i=t.split(",").map(s=>parseInt(s.trim(),10)).filter(s=>s>0);i.length&&e.src&&(e.srcset=jf(e.src,i))}e.srcset&&e.srcset.includes("w")&&Gf(e),e.hasAttribute("loading")||(e.loading="lazy"),e.hasAttribute("decoding")||(e.decoding="async"),e.hasAttribute("data-responsive-debug")&&Yf(e)}var Wf,Wc,Gc=y(()=>{$();Wf="img[data-responsive]",Wc=new WeakSet;C(Wf,jc)});var Jc={};S(Jc,{initFloatingLabels:()=>Xc});function Xc(e){if(Kc.has(e))return;Kc.add(e);let t=e.querySelector("input, textarea, select");t&&(t.hasAttribute("placeholder")||t.setAttribute("placeholder"," "),e.setAttribute("data-floating-label-ready",""))}var Kf,Kc,Zc=y(()=>{$();Kf="form-field[data-floating-label]",Kc=new WeakSet;C(Kf,Xc)});var tl={};S(tl,{activate:()=>tr,deactivate:()=>Ye});function tr(e){if(e.getAttribute("aria-busy")==="true")return;e._vbLoadingOriginal=e.innerHTML,e._vbLoadingWidth=e.offsetWidth,e.style.minInlineSize=`${e._vbLoadingWidth}px`;let t=e.getAttribute("data-loading"),i=document.createElement("span");i.className="vb-btn-spinner",i.setAttribute("aria-hidden","true");let s=document.createElement("span");t?s.textContent=t:(s.className="visually-hidden",s.textContent=e.textContent.trim()),e.replaceChildren(i," ",s),e.setAttribute("aria-busy","true"),e.setAttribute("aria-disabled","true"),e.dataset.loadingActive="";let n=parseInt(e.getAttribute("data-loading-timeout"),10)||Jf;e._vbLoadingTimer=setTimeout(()=>Ye(e),n)}function Ye(e){e.getAttribute("aria-busy")==="true"&&(clearTimeout(e._vbLoadingTimer),e._vbLoadingOriginal!=null&&(e.innerHTML=e._vbLoadingOriginal,delete e._vbLoadingOriginal),e.style.minInlineSize="",e.removeAttribute("aria-busy"),e.removeAttribute("aria-disabled"),delete e.dataset.loadingActive)}function Zf(e){if(Qc.has(e))return;Qc.add(e),e.addEventListener("click",s=>{e.getAttribute("aria-busy")==="true"&&(s.preventDefault(),s.stopImmediatePropagation())},!0);let t=e.form;t&&e.type==="submit"&&(t.addEventListener("submit",n=>{let r=n.submitter;(r?r===e:t.querySelector('button[type="submit"], button:not([type]), input[type="submit"]')===e)&&tr(e)}),new MutationObserver(()=>{!t.hasAttribute("data-submitting")&&e.getAttribute("aria-busy")==="true"&&Ye(e)}).observe(t,{attributes:!0,attributeFilter:["data-submitting"]})),new MutationObserver(()=>{e.hasAttribute("data-loading-active")?tr(e):e.getAttribute("aria-busy")==="true"&&Ye(e)}).observe(e,{attributes:!0,attributeFilter:["data-loading-active"]})}var Xf,Qc,Jf,el=y(()=>{$();Xf="button[data-loading]",Qc=new WeakSet,Jf=1e4;C(Xf,Zf)});var sl={};S(sl,{initEmailForm:()=>nr});function Qf(e){let t={};for(let i of e.elements){let s=i;s.name&&(s.type==="password"||s.type==="file"||(s.type==="checkbox"?t[s.name]=s.checked:s.type==="radio"?s.checked&&(t[s.name]=s.value):t[s.name]=s.value))}return t}async function tp(e){let t=e.currentTarget,i=t.getAttribute("data-vb-email-form"),s=t.getAttribute("data-vb-email-to");if(!i||(e.preventDefault(),t.hasAttribute(er)))return;t.setAttribute(er,"");let n=t.querySelector('button[type="submit"], button:not([type])'),r=n?.textContent;n&&(n.disabled=!0,t.dataset.vbEmailLoadingLabel&&(n.textContent=t.dataset.vbEmailLoadingLabel)),t.dispatchEvent(new CustomEvent("vb-email-form:submitting",{bubbles:!0,composed:!0,detail:{template:i}}));let a=Qf(t);try{let c=await new B("email").post("/",{to:s||a.to||a.email,template:i,data:a});t.dispatchEvent(new CustomEvent("vb-email-form:success",{bubbles:!0,composed:!0,detail:{id:c?.id}})),t.hasAttribute("data-vb-email-no-reset")||t.reset(),il(t,"success")}catch(o){let c={error:o};o instanceof D&&(c.status=o.status,c.body=o.body),t.dispatchEvent(new CustomEvent("vb-email-form:error",{bubbles:!0,composed:!0,detail:c})),il(t,"error")}finally{t.removeAttribute(er),n&&(n.disabled=!1,r&&(n.textContent=r))}}function il(e,t){let i=e.querySelector("[data-vb-email-status]");if(!i)return;let s=e.dataset.vbEmailSuccess||"Sent. Thank you.",n=e.dataset.vbEmailError||"Sorry, the message could not be sent. Try again.";i.dataset.state=t,i.textContent=t==="success"?s:n}function sr(e){e.hasAttribute("data-vb-email-form-init")||(e.setAttribute("data-vb-email-form-init",""),e.addEventListener("submit",tp))}function nr(e=document){for(let t of e.querySelectorAll(ir))sr(t)}var ir,er,ep,nl=y(()=>{wt();ir="form[data-vb-email-form]",er="data-vb-email-submitting";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>nr()):nr();ep=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(ir)&&sr(s),s.querySelectorAll?.(ir).forEach(n=>sr(n))}});ep.observe(document.documentElement,{childList:!0,subtree:!0})});var dl={};S(dl,{initNewsletterForm:()=>dr});function cl(e){let t=(e.getAttribute("data-vb-newsletter-form")||"subscribe").trim();return ip.includes(t)?t:"subscribe"}function rl(e){let t=[...e.querySelectorAll('input[type="checkbox"][name="lists"]')].filter(s=>s.checked).map(s=>s.value);return t.length?t:(e.getAttribute("data-vb-newsletter-lists")||"").split(",").map(s=>s.trim()).filter(Boolean)}function ll(e){return e.querySelector('input[name="email"]')}function ar(e,t,i){let s=e.querySelector("[data-vb-newsletter-status]");s&&(s.dataset.state=t,s.textContent=i)}function al(e,t,i){return i==="error"?e.dataset.vbNewsletterError||"Sorry, that did not work. Try again.":t==="unsubscribe"?e.dataset.vbNewsletterUnsubscribed||"Unsubscribed.":t==="preferences"?e.dataset.vbNewsletterSaved||"Preferences saved.":e.dataset.vbNewsletterSubscribed||"Subscribed. Check your inbox."}function ol(e,t){let i=e.querySelector('button[type="submit"], button:not([type])');i&&(t?(i.dataset.vbNewsletterPrevLabel=i.textContent||"",i.disabled=!0,e.dataset.vbNewsletterLoadingLabel&&(i.textContent=e.dataset.vbNewsletterLoadingLabel)):(i.disabled=!1,i.dataset.vbNewsletterPrevLabel!=null&&(i.textContent=i.dataset.vbNewsletterPrevLabel,delete i.dataset.vbNewsletterPrevLabel)))}async function Ge(e,t,i){let s=new B("newsletter");if(e==="POST")return s.post(t,i);if(e==="GET")return s.get(t,i);throw new Error(`unsupported method ${e}`)}async function sp(e,t,i,s){if(!s.length&&t!=="preferences")throw new Error("No lists selected.");return Ge("POST",t==="unsubscribe"?"/unsubscribe":"/subscribe",{email:i,lists:s})}async function np(e,t){if(t)try{let i=await Ge("GET","/preferences",{email:t});if(!i)return;let s=new Set(i.subscriptions||[]);for(let n of e.querySelectorAll('input[type="checkbox"][name="lists"]')){let r=n;r.checked=s.has(r.value)}e.dispatchEvent(new CustomEvent("vb-newsletter-form:preferences",{bubbles:!0,composed:!0,detail:{email:t,subscriptions:i.subscriptions,available:i.available}}))}catch(i){if(i instanceof D&&i.status===404)return;console.warn("[newsletter-form] preferences fetch failed",i)}}function cr(e){return new Set([...e.querySelectorAll('input[type="checkbox"][name="lists"]')].filter(t=>t.checked).map(t=>t.value))}async function rp(e,t){let i=e.__vbNewsletterSnapshot??new Set,s=cr(e),n=[...s].filter(o=>!i.has(o)),r=[...i].filter(o=>!s.has(o)),a={};return n.length&&(a.subscribe=await Ge("POST","/subscribe",{email:t,lists:n})),r.length&&(a.unsubscribe=await Ge("POST","/unsubscribe",{email:t,lists:r})),e.__vbNewsletterSnapshot=cr(e),a}async function ap(e){let t=e.currentTarget,i=cl(t),s=ll(t)?.value?.trim();if(e.preventDefault(),!s){ar(t,"error","Email is required.");return}if(!t.hasAttribute(rr)){t.setAttribute(rr,""),ol(t,!0),t.dispatchEvent(new CustomEvent("vb-newsletter-form:submitting",{bubbles:!0,composed:!0,detail:{mode:i}}));try{let n;if(i==="preferences")n=await rp(t,s);else{let r=rl(t);n=await sp(t,i,s,r)}t.dispatchEvent(new CustomEvent("vb-newsletter-form:success",{bubbles:!0,composed:!0,detail:{mode:i,lists:rl(t),response:n}})),ar(t,"success",al(t,i,"success")),i==="subscribe"&&!t.hasAttribute("data-vb-newsletter-no-reset")&&t.reset()}catch(n){let r={mode:i,error:n};n instanceof D&&(r.status=n.status,r.body=n.body),t.dispatchEvent(new CustomEvent("vb-newsletter-form:error",{bubbles:!0,composed:!0,detail:r}));let a=n instanceof Error&&n.message==="No lists selected."?"Pick at least one list.":al(t,i,"error");ar(t,"error",a)}finally{t.removeAttribute(rr),ol(t,!1)}}}function lr(e){if(!e.hasAttribute("data-vb-newsletter-form-init")&&(e.setAttribute("data-vb-newsletter-form-init",""),e.addEventListener("submit",ap),cl(e)==="preferences")){let t=ll(e);if(t){let i=async()=>{let s=t.value.trim();s&&(await np(e,s),e.__vbNewsletterSnapshot=cr(e))};t.addEventListener("change",i),t.addEventListener("blur",i)}}}function dr(e=document){for(let t of e.querySelectorAll(or))lr(t)}var or,rr,ip,op,ul=y(()=>{wt();or="form[data-vb-newsletter-form]",rr="data-vb-newsletter-submitting",ip=["subscribe","unsubscribe","preferences"];document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>dr()):dr();op=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(or)&&lr(s),s.querySelectorAll?.(or).forEach(n=>lr(n))}});op.observe(document.documentElement,{childList:!0,subtree:!0})});function cp(e,t){let i=Number(e);return!Number.isFinite(i)||t<=0?1:Math.min(Math.max(1,Math.floor(i)),t)}function lp({page:e,size:t}){let i=(e-1)*t;return{start:i,end:i+t}}function dp(e,t,i=2){if(t<=0)return[];if(t===1)return[1];let s=Math.max(2,e-i),n=Math.min(t-1,e+i),r=[1];s>2&&r.push("\u2026");for(let a=s;a<=n;a++)r.push(a);return n<t-1&&r.push("\u2026"),r.push(t),r}function ur({total:e,size:t,page:i,window:s=2}){if(t<=0)return{page:(e>0,1),totalPages:e>0?1:0,start:0,end:e,pageNumbers:e>0?[1]:[]};let n=e>0?Math.ceil(e/t):0,r=cp(i,n),a=lp({page:r,size:t}),o=Math.min(a.end,e);return{page:r,totalPages:n,start:a.start,end:o,pageNumbers:dp(r,n,s)}}var hl=y(()=>{});function hr(e){switch(e.style){case"load-more":return fp(e);case"prev-next":return hp(e);default:return up(e)}}function fr(){let e=document.createElement("nav");return e.setAttribute("data-paged-nav",""),e.setAttribute("aria-label","Pagination"),e}function up({page:e,totalPages:t,pageNumbers:i,prevLabel:s="Previous",nextLabel:n="Next"}){let r=fr(),a=document.createElement("ol");a.setAttribute("role","list"),a.appendChild(Xt(s,e-1,e===1,!1,"prev"));for(let o of i)if(o==="\u2026"){let c=document.createElement("li");c.textContent="\u2026",c.setAttribute("aria-hidden","true"),c.setAttribute("data-paged-ellipsis",""),a.appendChild(c)}else a.appendChild(Xt(String(o),o,!1,o===e,"page"));return a.appendChild(Xt(n,e+1,e===t,!1,"next")),r.appendChild(a),r}function hp({page:e,totalPages:t,prevLabel:i="Previous",nextLabel:s="Next"}){let n=fr(),r=document.createElement("ol");r.setAttribute("role","list"),r.appendChild(Xt(i,e-1,e===1,!1,"prev"));let a=document.createElement("li");return a.setAttribute("data-paged-status",""),a.setAttribute("aria-live","polite"),a.textContent=`Page ${e} of ${t}`,r.appendChild(a),r.appendChild(Xt(s,e+1,e===t,!1,"next")),n.appendChild(r),n}function fp({total:e,visible:t,loadMoreLabel:i=n=>`Load more (${n})`,noMoreLabel:s="No more"}){let n=fr(),r=document.createElement("button");r.type="button",r.setAttribute("data-paged-loadmore","");let a=e-t;return r.textContent=a>0?i(a):s,r.disabled=a<=0,n.appendChild(r),n}function Xt(e,t,i,s,n){let r=document.createElement("li"),a=document.createElement("button");return a.type="button",a.setAttribute("data-paged-action",n),a.dataset.pagedTarget=String(t),a.textContent=e,s&&a.setAttribute("aria-current","page"),i&&(a.disabled=!0),r.appendChild(a),r}function pr(e,{onNavigate:t,onLoadMore:i}){t&&e.querySelectorAll("button[data-paged-target]").forEach(s=>{s.addEventListener("click",()=>t(parseInt(s.dataset.pagedTarget||"1",10)))}),i&&e.querySelectorAll("button[data-paged-loadmore]").forEach(s=>{s.addEventListener("click",()=>i())})}var fl=y(()=>{});var yl={};S(yl,{initDataPaged:()=>bl});function bl(e){if(pl.has(e))return;let t={host:e,nav:{before:null,after:null},sentinel:null,intersect:null,children:[],childObserver:null,visible:0};pl.set(e,t);let i=e.dataset.pagedUrl;if(i){let n=new URL(window.location.href).searchParams.get(i);n&&!e.hasAttribute("data-paged-page")&&e.setAttribute("data-paged-page",n),window.addEventListener("popstate",()=>{let a=new URL(window.location.href).searchParams.get(i);a&&e.setAttribute("data-paged-page",a)})}t.childObserver=new MutationObserver(()=>Ke(t)),t.childObserver.observe(e,{childList:!0}),e.addEventListener("paged:goto",s=>vl(t,s.detail?.page??1)),e.addEventListener("paged:loadmore",()=>br(t)),Ke(t)}function mr(e){return{size:parseInt(e.dataset.pagedSize||"10",10)||0,page:parseInt(e.dataset.pagedPage||"1",10)||1,style:e.dataset.pagedStyle||"numbered",window:parseInt(e.dataset.pagedWindow||"2",10)||2,controls:e.dataset.pagedControls||"after",urlParam:e.dataset.pagedUrl||""}}function gl(e){if(e.tagName==="TABLE"){let t=e.querySelector(":scope > tbody");if(t)return Array.from(t.children)}return Array.from(e.children).filter(t=>!t.matches("nav[data-paged-nav], div[data-paged-sentinel]"))}function Ke(e){let{host:t}=e,i=mr(t),s=gl(t);e.children=s;let n=ur({total:s.length,size:i.size,page:i.page,window:i.window}),r=i.style==="load-more"||i.style==="infinite";if(r){e.visible===0&&(e.visible=i.size||s.length);let a=Math.min(e.visible,s.length);s.forEach((o,c)=>{o.hidden=c>=a})}else s.forEach((a,o)=>{a.hidden=o<n.start||o>=n.end});mp(e,n,i,r),t.dispatchEvent(new CustomEvent("paged:change",{bubbles:!0,detail:{page:n.page,size:i.size,total:s.length,totalPages:n.totalPages}}))}function mp(e,t,i,s){if(e.nav.before?.remove(),e.nav.after?.remove(),e.sentinel?.remove(),e.intersect?.disconnect(),e.intersect=null,e.nav={before:null,after:null},i.controls==="none"&&!s)return;if(s){if(i.style==="load-more"){let r=hr({style:"load-more",page:t.page,totalPages:t.totalPages,pageNumbers:t.pageNumbers,total:e.children.length,visible:e.visible});ml(e,r,i)}else{let r=document.createElement("div");r.setAttribute("data-paged-sentinel",""),r.setAttribute("aria-hidden","true"),r.style.cssText="block-size:1px;inline-size:100%",e.host.parentNode?.insertBefore(r,e.host.nextSibling),e.sentinel=r,e.intersect=new IntersectionObserver(a=>{for(let o of a)o.isIntersecting&&br(e)},{rootMargin:"200px"}),e.intersect.observe(r)}return}if(t.totalPages<=1)return;let n=hr({style:i.style,page:t.page,totalPages:t.totalPages,pageNumbers:t.pageNumbers,total:e.children.length,visible:e.visible});ml(e,n,i)}function ml(e,t,i){let{host:s}=e,n={onNavigate:r=>vl(e,r),onLoadMore:()=>br(e)};if(i.controls==="before"||i.controls==="both"){let r=t.cloneNode(!0);pr(r,n),s.parentNode?.insertBefore(r,s),e.nav.before=r}(i.controls==="after"||i.controls==="both"||i.controls==="none")&&(pr(t,n),s.parentNode?.insertBefore(t,s.nextSibling),e.nav.after=t)}function vl(e,t){let{host:i}=e,s=mr(i),n=gl(i),r=ur({total:n.length,size:s.size,page:t,window:s.window});if(r.page!==s.page){if(i.setAttribute("data-paged-page",String(r.page)),s.urlParam){let a=new URL(window.location.href);a.searchParams.set(s.urlParam,String(r.page)),window.history.pushState({},"",a)}Ke(e)}}function br(e){let i=mr(e.host).size||10;e.visible=Math.min(e.visible+i,e.children.length),Ke(e)}var pp,pl,wl=y(()=>{$();hl();fl();pp="[data-paged]",pl=new WeakMap;C(pp,bl)});function Jt(e){if(!e)return null;let t=String(e);return t.startsWith("-")?{key:t.slice(1),direction:"desc"}:t.startsWith("+")?{key:t.slice(1),direction:"asc"}:{key:t,direction:"asc"}}function bp(e,t){let i=t==="desc"?-1:1,s=Al[e]||Al.text;return(n,r)=>{let a=Sl(n),o=Sl(r);return a&&o?0:a?1:o?-1:i*s(n,r)}}function xl(e,t,i,s){let n=bp(i,s),r=Array.from({length:e.length},(a,o)=>o);return r.sort((a,o)=>{let c=n(t(e[a]),t(e[o]));return c===0?a-o:c}),r}function Cl(e){return e==="asc"?"desc":e==="desc"?"none":"asc"}function El(e){return e instanceof Date?e.getTime():Date.parse(String(e))}function Sl(e){return e==null||e===""}var Al,kl=y(()=>{Al={text(e,t){return String(e).localeCompare(String(t),void 0,{sensitivity:"base",numeric:!0})},number(e,t){let i=Number(e),s=Number(t);return Number.isNaN(i)&&Number.isNaN(s)?0:Number.isNaN(i)?1:Number.isNaN(s)||i<s?-1:i>s?1:0},date(e,t){let i=El(e),s=El(t);return Number.isNaN(i)&&Number.isNaN(s)?0:Number.isNaN(i)?1:Number.isNaN(s)||i<s?-1:i>s?1:0}}});var Ml={};S(Ml,{initDataSortable:()=>Ll});function Ll(e){if(Xe.has(e))return;Xe.add(e),e.tagName==="TABLE"&&vp(e);let i=e.dataset.sortableDefault;if(i&&!e.dataset.sortBy){let s=Jt(i);s&&ht(e,s.key,s.direction)}}function vp(e){e.querySelectorAll(":scope > thead th[data-sort]").forEach(i=>{i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.style.cursor="pointer";let s=()=>{let n=i.dataset.sort;if(!n)return;let r=e.dataset.sortBy===n?e.dataset.sortDirection:"none",a=Cl(r||"none");a==="none"?ht(e,"","none"):ht(e,n,a,i.dataset.sortType)};i.addEventListener("click",s),i.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),s())})})}function yp(){return document.querySelectorAll("[data-sort-target]")}function gr(){for(let e of yp()){if(Xe.has(e))continue;Xe.add(e);let t=e.getAttribute("data-sort-target");if(!t)continue;let i=document.querySelector(t);if(!(!i||!i.matches("[data-sortable]")))if(e.tagName==="SELECT"){e.addEventListener("change",()=>{let n=e.value,r=Jt(n);if(!r){ht(i,"","none");return}ht(i,r.key,r.direction)});let s=e.value;if(s){let n=Jt(s);n&&ht(i,n.key,n.direction)}}else e.addEventListener("click",()=>{let s=e.getAttribute("data-sort-by")||"",n=Jt(s);n&&ht(i,n.key,n.direction)})}}function wp(e,t,i,s={}){if(s.isTable){let r=s.colIndex,a=e.children[r];if(!a)return"";if(a.dataset.value!=null)return a.dataset.value;if(i==="date"){let o=a.querySelector("time[datetime]");if(o)return o.getAttribute("datetime")||""}return(a.textContent||"").trim()}let n=e.dataset[`sort${Ap(t)}`];return n??(e.dataset.value!=null?e.dataset.value:(e.textContent||"").trim())}function Ap(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ep(e){if(e.tagName==="TABLE"){let t=e.querySelector(":scope > tbody");return t?Array.from(t.children):[]}return Array.from(e.children)}function Sp(e,t){return Array.from(e.querySelectorAll(":scope > thead th")).findIndex(s=>s.dataset.sort===t)}function ht(e,t,i,s){let n=e.tagName==="TABLE",r=Ep(e);if(i==="none"||!t){e.removeAttribute("data-sort-by"),e.dataset.sortDirection="none",n&&Tl(e,"","none"),e.dispatchEvent(new CustomEvent("sort:change",{bubbles:!0,detail:{key:"",direction:"none",total:r.length}}));return}let a=xp(e,t,s),o=n?Sp(e,t):-1,c=xl(r,d=>wp(d,t,a,{isTable:n,colIndex:o}),a,i),l=n?e.querySelector(":scope > tbody"):e;if(l){for(let d of c)l.appendChild(r[d]);e.dataset.sortBy=t,e.dataset.sortDirection=i,n&&Tl(e,t,i),e.hasAttribute("data-paged")&&e.dispatchEvent(new CustomEvent("paged:goto",{detail:{page:1}})),e.dispatchEvent(new CustomEvent("sort:change",{bubbles:!0,detail:{key:t,direction:i,total:r.length}}))}}function xp(e,t,i){if(i==="text"||i==="number"||i==="date")return i;if(e.tagName==="TABLE"){let r=e.querySelector(`:scope > thead th[data-sort="${Cp(t)}"]`)?.dataset.sortType;if(r==="text"||r==="number"||r==="date")return r}let s=e.dataset.sortType;return s==="text"||s==="number"||s==="date"?s:"text"}function Cp(e){return String(e).replace(/["\\]/g,"\\$&")}function Tl(e,t,i){e.querySelectorAll(":scope > thead th[data-sort]").forEach(n=>{n.dataset.sort===t&&i!=="none"?n.setAttribute("aria-sort",i==="asc"?"ascending":"descending"):n.setAttribute("aria-sort","none")})}var gp,Xe,Nl=y(()=>{$();kl();gp="[data-sortable]",Xe=new WeakSet;C(gp,Ll);typeof document<"u"&&(document.readyState!=="loading"?gr():document.addEventListener("DOMContentLoaded",gr),C("[data-sort-target]",()=>gr()))});function _l(e){if(!e)return null;let t=String(e).trim();if(!t)return null;if(t.startsWith("class:")){let i=t.slice(6).trim();return i?{kind:"class",name:i}:null}return{kind:"attr",name:t}}function Zt(e){return kp.has(String(e).toLowerCase())}function vr(e){return Tp.has(String(e).toLowerCase())}function Dl(e,t,i){if(e.kind==="class")return t?{present:!1}:{present:!0};if(Zt(e.name))return t?{present:!1}:{present:!0,value:""};if(vr(e.name))return{present:!0,value:t==="true"||t===!0?"false":"true"};let s=i.on??"true",n=i.off??"false";return{present:!0,value:t===s?n:s}}var kp,Tp,Il=y(()=>{kp=new Set(["hidden","disabled","open","checked","readonly","required","multiple","selected","autofocus","autoplay","controls","defer","inert","loop","muted","nomodule","novalidate","playsinline","reversed"]),Tp=new Set(["aria-pressed","aria-expanded","aria-selected","aria-checked"])});var Bl={};S(Bl,{initDataToggle:()=>$l});function $l(e){if(Ol.has(e))return;Ol.add(e);let t=_l(e.dataset.toggle);if(!t)return;let i=e.dataset.toggleTarget,s=i?document.querySelector(i):e;if(!s)return;let n=s!==e;n&&s.id&&e.setAttribute("aria-controls",s.id),t.kind==="attr"&&Zt(t.name)&&!n&&e.setAttribute("aria-pressed",String(s.hasAttribute(t.name))),ql(e,s,t),e.addEventListener("click",r=>{r.preventDefault();let a={on:e.dataset.toggleOn,off:e.dataset.toggleOff},o;t.kind==="class"?o=s.classList.contains(t.name):Zt(t.name)?o=s.hasAttribute(t.name):o=s.getAttribute(t.name);let c=Dl(t,o,a);t.kind==="class"?c.present?s.classList.add(t.name):s.classList.remove(t.name):c.present?s.setAttribute(t.name,c.value??""):s.removeAttribute(t.name),!n&&Zt(t.name)&&e.setAttribute("aria-pressed",String(c.present)),!n&&vr(t.name),ql(e,s,t,c),e.dispatchEvent(new CustomEvent("toggle:change",{bubbles:!0,detail:{spec:t.kind==="class"?`class:${t.name}`:t.name,value:c.value,present:c.present,target:s}}))})}function ql(e,t,i,s){if(t===e)return;let n=t.hasAttribute("popover"),r=i.kind==="attr"&&i.name.startsWith("data-")&&(e.dataset.toggleOn||"").toLowerCase()==="open";if(!n&&!r)return;let a;s?a=n?s.present:s.value==="open":a=n?t.matches(":popover-open"):t.getAttribute(i.name)==="open",e.setAttribute("aria-expanded",String(a))}var Lp,Ol,Pl=y(()=>{$();Il();Lp="[data-toggle]",Ol=new WeakSet;C(Lp,$l)});var Qp={};function Kp(e,t,i){return e<=t?"good":e<=i?"needs-improvement":"poor"}function Ze(e,t,i,s,n={}){A.track(e,{value:Math.round(t*1e3)/1e3,rating:Kp(t,i,s),...n})}function Xp(){let e=null,t=new PerformanceObserver(s=>{let n=s.getEntries();e=n[n.length-1]});try{t.observe({type:"largest-contentful-paint",buffered:!0})}catch{return}let i=()=>{e&&(Ze("perf.lcp",e.startTime,2500,4e3),e=null)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function Jp(){let e=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries()){let r=n;r.hadRecentInput||(e+=r.value)}});try{t.observe({type:"layout-shift",buffered:!0})}catch{return}let i=()=>{Ze("perf.cls",e,.1,.25),e=0};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function Zp(){let e=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries())n.duration>e&&(e=n.duration)});try{t.observe({type:"event",durationThreshold:40,buffered:!0})}catch{return}let i=()=>{e!==0&&(Ze("perf.inp",e,200,500),e=0)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function Zl(){try{let[e]=performance.getEntriesByType("navigation");if(!e||!e.responseStart)return;Ze("perf.ttfb",e.responseStart,800,1800,{navigationType:e.type})}catch{}}var Ql=y(()=>{et();typeof window<"u"&&"PerformanceObserver"in window&&(Xp(),Jp(),Zp(),document.readyState==="complete"?Zl():window.addEventListener("load",Zl,{once:!0}))});var em={};function tm(e){if(typeof e!="string"||!e)return"";try{let t=new URL(e,location.origin);return t.pathname.split("/").pop()||t.pathname}catch{return e.split("/").pop()??e}}function td(e){return typeof e!="string"?String(e??"").slice(0,Cr):e.length>Cr?e.slice(0,Cr):e}var Cr,ed=y(()=>{et();Cr=200;typeof window<"u"&&(window.addEventListener("error",e=>{e.target&&e.target!==window||A.track("error.js_runtime",{message:td(e.message),source:tm(e.filename),line:e.lineno??0,col:e.colno??0})}),window.addEventListener("unhandledrejection",e=>{let t=e.reason,i=t instanceof Error?t.message:typeof t=="string"?t:JSON.stringify(t??null);A.track("error.unhandled_promise",{message:td(i)})}))});var sm={};function ad(){let e=window.scrollY+window.innerHeight,t=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0);return t<=0?0:Math.min(100,Math.max(0,Math.round(e/t*100)))}function im(){clearTimeout(sd),sd=setTimeout(()=>{let e=ad();e>kr&&(kr=e)},500)}function nd(){ee==null&&(ee=Date.now())}function od(){ee!=null&&(Tr+=Date.now()-ee,ee=null)}function rd(){if(id)return;id=!0,od();let e=Math.max(kr,ad());e>0&&A.track("__scroll",{depth:e}),Tr>0&&A.track("__attention",{ms:Tr})}var kr,ee,Tr,id,sd,cd=y(()=>{et();kr=0,ee=null,Tr=0,id=!1,sd=null;typeof window<"u"&&(window.addEventListener("scroll",im,{passive:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?nd():(od(),rd())}),window.addEventListener("pagehide",rd),document.visibilityState==="visible"&&nd())});var it=new Map,Qe=new Map;var $r=null;function Br(){if(typeof window<"u"&&window.__VB_THEME_BASE)return String(window.__VB_THEME_BASE).replace(/\/$/,"");if($r)return $r;if(typeof document<"u"){let e=document.querySelectorAll('script[src*="vanilla-breeze"]');for(let t of e){let i=t.getAttribute("src");if(i){let s=i.lastIndexOf("/");if(s!==-1)return i.slice(0,s)}}}return"/cdn"}var fd=new Set(["default","a11y-high-contrast","a11y-large-text","a11y-dyslexia","modern","minimal","classic"]),pd=new Set(["kawaii","memphis"]);function ti(e){return pd.has(e)}function md(e,t){return`${t}/themes/${e}.css`}function Pr(e,t){if(!ti(e))return Promise.resolve();if(Qe.has(e))return Qe.get(e);let i=import(`${t}/packs/${e}.full.js`).catch(()=>{});return Qe.set(e,i),i}function bd(e,t){let i=Br(),s=()=>{(ti(t)||e.hasAttribute("data-vb-pack"))&&Pr(t,i)};return e.getAttribute("data-vb-theme-state")==="error"?Promise.reject(new Error(`Failed to load theme: ${t}`)):e.getAttribute("data-vb-theme-state")==="ready"||e.sheet?(s(),Promise.resolve()):new Promise((n,r)=>{let a=()=>{e.setAttribute("data-vb-theme-state","ready"),c(),s(),n(void 0)},o=()=>{e.setAttribute("data-vb-theme-state","error"),it.delete(t),c(),r(new Error(`Failed to load theme: ${t}`))},c=()=>{e.removeEventListener("load",a),e.removeEventListener("error",o)};e.addEventListener("load",a,{once:!0}),e.addEventListener("error",o,{once:!0})})}async function Lt(e){if(!e||fd.has(e))return;if(it.has(e))return it.get(e);if(typeof document<"u"){let s=document.querySelector(`link[data-vb-theme="${e}"]`);if(s){let n=bd(s,e);return it.set(e,n),n}}let t=Br(),i=ti(e)?vd(e,t):gd(e,t);return it.set(e,i),i}async function gd(e,t){let i=md(e,t);return new Promise((s,n)=>{let r=document.querySelector(`link[data-vb-theme-preload="${e}"]`);r&&r.remove();let a=document.createElement("link");a.rel="stylesheet",a.href=i,a.setAttribute("data-vb-theme",e),a.setAttribute("data-vb-theme-state","loading"),a.onload=()=>{a.setAttribute("data-vb-theme-state","ready"),s()},a.onerror=()=>{a.setAttribute("data-vb-theme-state","error"),a.remove(),it.delete(e),n(new Error(`Failed to load theme: ${e}`))},document.head.appendChild(a)})}function vd(e,t){let i=`${t}/packs/${e}.theme.css`,s=`${t}/packs/${e}.effects.css`;return new Promise((n,r)=>{let a=document.querySelector(`link[data-vb-theme-preload="${e}"]`);a&&a.remove();let o=document.createElement("link");o.rel="stylesheet",o.href=i,o.setAttribute("data-vb-theme",e),o.setAttribute("data-vb-pack",e),o.setAttribute("data-vb-theme-state","loading"),o.onload=()=>{o.setAttribute("data-vb-theme-state","ready");let c=document.createElement("link");c.rel="stylesheet",c.href=s,c.setAttribute("data-vb-pack-effects",e),document.head.appendChild(c),Pr(e,t),n()},o.onerror=()=>{o.setAttribute("data-vb-theme-state","error"),o.remove(),it.delete(e),r(new Error(`Failed to load pack: ${e}`))},document.head.appendChild(o)})}var Fr=[{id:"default",name:"Default",swatchBg:"#3b82f6",seeds:{}},{id:"ocean",name:"Ocean",swatchBg:"#0891b2",seeds:{"--hue-primary":200,"--hue-secondary":180,"--hue-accent":45,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"45%","--chroma-secondary":.1,"--lightness-accent":"70%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"forest",name:"Forest",swatchBg:"#059669",seeds:{"--hue-primary":145,"--hue-secondary":90,"--hue-accent":30,"--lightness-primary":"45%","--chroma-primary":.15,"--lightness-secondary":"55%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"58%","--chroma-primary":.12}},{id:"sunset",name:"Sunset",swatchBg:"#ea580c",seeds:{"--hue-primary":25,"--hue-secondary":0,"--hue-accent":280,"--lightness-primary":"57%","--chroma-primary":.2,"--lightness-secondary":"55%","--chroma-secondary":.18,"--lightness-accent":"55%","--chroma-accent":.18},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.16}},{id:"rose",name:"Rose",swatchBg:"#e11d48",seeds:{"--hue-primary":350,"--hue-secondary":330,"--hue-accent":200,"--lightness-primary":"55%","--chroma-primary":.18,"--lightness-secondary":"50%","--chroma-secondary":.14,"--lightness-accent":"60%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.14}},{id:"lavender",name:"Lavender",swatchBg:"#a855f7",seeds:{"--hue-primary":280,"--hue-secondary":300,"--hue-accent":60,"--lightness-primary":"55%","--chroma-primary":.14,"--lightness-secondary":"50%","--chroma-secondary":.12,"--lightness-accent":"70%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.12}},{id:"coral",name:"Coral",swatchBg:"#f97316",seeds:{"--hue-primary":15,"--hue-secondary":25,"--hue-accent":180,"--lightness-primary":"57%","--chroma-primary":.18,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"55%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.15}},{id:"slate",name:"Slate",swatchBg:"#64748b",seeds:{"--hue-primary":220,"--hue-secondary":210,"--hue-accent":45,"--lightness-primary":"48%","--chroma-primary":.1,"--lightness-secondary":"45%","--chroma-secondary":.06,"--lightness-accent":"68%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.08}},{id:"emerald",name:"Emerald",swatchBg:"#10b981",seeds:{"--hue-primary":160,"--hue-secondary":140,"--hue-accent":30,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"48%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"amber",name:"Amber",swatchBg:"#f59e0b",seeds:{"--hue-primary":45,"--hue-secondary":30,"--hue-accent":240,"--lightness-primary":"56%","--chroma-primary":.16,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"52%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"68%","--chroma-primary":.14}},{id:"indigo",name:"Indigo",swatchBg:"#6366f1",seeds:{"--hue-primary":250,"--hue-secondary":270,"--hue-accent":35,"--lightness-primary":"48%","--chroma-primary":.18,"--lightness-secondary":"45%","--chroma-secondary":.14,"--lightness-accent":"68%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"62%","--chroma-primary":.14}}],Rr=[{id:"default",name:"Default",hue:210,shape:"balanced",character:"The default",swatchBg:"#3b82f6",tier:"core"},{id:"modern",name:"Modern",hue:270,shape:"rounded",character:"Vibrant & elevated",swatchBg:"#6366f1",tier:"core"},{id:"minimal",name:"Minimal",hue:240,shape:"sharp",character:"Clean & flat",swatchBg:"#71717a",tier:"core"},{id:"classic",name:"Classic",hue:220,shape:"subtle",character:"Serif & elegant",swatchBg:"#92400e",tier:"core"}],ei=[{id:"swiss",name:"Swiss",icon:"grid-3x3",character:"Precision grid",swatchBg:"#ff3e00",swatchFg:"white",tier:"showcase",category:"Design"},{id:"brutalist",name:"Brutalist",icon:"square",character:"Raw, industrial",swatchBg:"#1a1a1a",swatchFg:"#f5f5f5",tier:"showcase",category:"Design"},{id:"art-deco",name:"Art Deco",icon:"crown",character:"1920s luxury",swatchBg:"#1A1A1A",swatchFg:"#C9A84C",tier:"showcase",category:"Design"},{id:"editorial",name:"Editorial",icon:"newspaper",character:"Magazine elegance",swatchBg:"#1a1a1a",swatchFg:"#c9a227",tier:"showcase",category:"Content"},{id:"genai",name:"GenAI",icon:"sparkles",character:"AI aesthetic",swatchBg:"#1a0a2e",swatchFg:"#a855f7",tier:"showcase",category:"Modern"},{id:"glassmorphism",name:"Glass",icon:"glass-water",character:"Frosted surfaces",swatchBg:"#667eea",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"startup",name:"Startup",icon:"rocket",character:"SaaS energy",swatchBg:"#4f46e5",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"organic",name:"Organic",icon:"leaf",character:"Natural, handcrafted",swatchBg:"#2d5016",swatchFg:"#faf5e6",tier:"showcase",category:"Creative"},{id:"rough",name:"Rough",icon:"pencil",character:"Hand-drawn sketch",swatchBg:"#f5f0e8",swatchFg:"#3a3a3a",tier:"showcase",category:"Creative"},{id:"cyber",name:"Cyber",icon:"zap",character:"Neon futuristic",swatchBg:"#0a0a1a",swatchFg:"#00ff88",tier:"showcase",category:"Creative"},{id:"journal",name:"Journal",icon:"notebook-pen",character:"Dot-grid bullet journal",swatchBg:"#f3ecdc",swatchFg:"#27313f",tier:"showcase",category:"Creative"},{id:"vaporwave",name:"Vaporwave",icon:"radio",character:"Neon dreamy",swatchBg:"#2b0040",swatchFg:"#ff6ad5",tier:"showcase",category:"Aesthetic"},{id:"neumorphism",name:"Neumorph",icon:"circle",character:"Soft embossed",swatchBg:"#e0e0e0",swatchFg:"#a0a0a0",tier:"showcase",category:"Aesthetic"},{id:"bauhaus",name:"Bauhaus",icon:"shapes",character:"Geometric",swatchBg:"#F1FAEE",swatchFg:"#E63946",tier:"showcase",category:"Aesthetic"},{id:"claymorphism",name:"Clay",icon:"circle-dot",character:"Puffy 3D",swatchBg:"#f0f0f5",swatchFg:"#FF6B9D",tier:"showcase",category:"Aesthetic"},{id:"alpha1999",name:"Alpha1999",icon:"orbit",character:"Space retro-fi",swatchBg:"#0a0a14",swatchFg:"#d4880f",tier:"showcase",category:"Signature"},{id:"super2026",name:"Super2026",icon:"triangle",character:"Supergraphic bold",swatchBg:"#f5f0e6",swatchFg:"#c23616",tier:"showcase",category:"Signature"},{id:"magna",name:"Magna",icon:"orbit",character:"Odyssey 2 retro",swatchBg:"#0d0b14",swatchFg:"#f97316",tier:"showcase",category:"Signature"},{id:"win9x",name:"Win9x",icon:"monitor",character:"Classic desktop",swatchBg:"#008080",swatchFg:"#c0c0c0",tier:"showcase",category:"OS Styles"},{id:"nes",name:"NES",icon:"joystick",character:"Console pixels",swatchBg:"#bcbcbc",swatchFg:"#e40521",tier:"showcase",category:"OS Styles"},{id:"8bit",name:"8-Bit",icon:"gamepad-2",character:"Retro pixel art",swatchBg:"#000080",swatchFg:"#ffff00",tier:"showcase",category:"OS Styles"}],ii=[{id:"nord",name:"Nord",icon:"snowflake",character:"Arctic calm",swatchBg:"#2E3440",swatchFg:"#81A1C1",tier:"community",category:"Editor Palettes"},{id:"solarized",name:"Solarized",icon:"sun-dim",character:"Engineered precision",swatchBg:"#002B36",swatchFg:"#268BD2",tier:"community",category:"Editor Palettes"},{id:"dracula",name:"Dracula",icon:"moon-star",character:"Dark elegance",swatchBg:"#282A36",swatchFg:"#BD93F9",tier:"community",category:"Editor Palettes"},{id:"catppuccin-mocha",name:"Catppuccin",icon:"coffee",character:"Warm pastels",swatchBg:"#1E1E2E",swatchFg:"#CBA6F7",tier:"community",category:"Editor Palettes"},{id:"catppuccin-latte",name:"Ctp Latte",icon:"coffee",character:"Cozy daytime",swatchBg:"#eff1f5",swatchFg:"#8839ef",tier:"community",category:"Editor Palettes"},{id:"catppuccin-frappe",name:"Ctp Frapp\xE9",icon:"coffee",character:"Cool twilight",swatchBg:"#303446",swatchFg:"#ca9ee6",tier:"community",category:"Editor Palettes"},{id:"catppuccin-macchiato",name:"Ctp Macchiato",icon:"coffee",character:"Deep blue",swatchBg:"#24273a",swatchFg:"#c6a0f6",tier:"community",category:"Editor Palettes"},{id:"gruvbox",name:"Gruvbox",icon:"palette",character:"Retro warmth",swatchBg:"#282828",swatchFg:"#ebdbb2",tier:"community",category:"Editor Palettes"},{id:"tokyo-night",name:"Tokyo Night",icon:"moon",character:"Night-owl vibes",swatchBg:"#1a1b26",swatchFg:"#7aa2f7",tier:"community",category:"Editor Palettes"},{id:"rose-pine",name:"Ros\xE9 Pine",icon:"flower-2",character:"Muted elegance",swatchBg:"#191724",swatchFg:"#ebbcba",tier:"community",category:"Editor Palettes"},{id:"cottagecore",name:"Cottagecore",icon:"flower-2",character:"Pastoral",swatchBg:"#fdf8f0",swatchFg:"#7d8c6d",tier:"community",category:"Niche"},{id:"terminal",name:"Terminal",icon:"terminal",character:"Retro CRT",swatchBg:"#0d1117",swatchFg:"#00ff00",tier:"community",category:"Niche"},{id:"clinical",name:"Clinical",icon:"heart-pulse",character:"Sterile precision",swatchBg:"#ffffff",swatchFg:"#0077b6",tier:"community",category:"Industry"},{id:"financial",name:"Financial",icon:"landmark",character:"Navy + gold",swatchBg:"#1b2a4a",swatchFg:"#c9a84c",tier:"community",category:"Industry"},{id:"government",name:"Government",icon:"shield",character:"Official",swatchBg:"#002868",swatchFg:"#bf0a30",tier:"community",category:"Industry"},{id:"dawn",name:"Dawn",icon:"sunrise",character:"Golden morning",swatchBg:"#fef3e2",swatchFg:"#d4a574",tier:"community",category:"Mood/Time"},{id:"dusk",name:"Dusk",icon:"sunset",character:"Twilight",swatchBg:"#1a1b2e",swatchFg:"#e5a858",tier:"community",category:"Mood/Time"},{id:"midnight",name:"Midnight",icon:"moon",character:"Deep night",swatchBg:"#0d1117",swatchFg:"#58a6ff",tier:"community",category:"Mood/Time"},{id:"high-noon",name:"High Noon",icon:"sun",character:"Maximum bright",swatchBg:"#ffffff",swatchFg:"#e63946",tier:"community",category:"Mood/Time"}],Hr=[{id:"kawaii",name:"Kawaii",icon:"heart",character:"Cute aesthetic",swatchBg:"#ffb7c5",swatchFg:"#ff69b4",tier:"showcase",category:"Packs"},{id:"memphis",name:"Memphis",icon:"star",character:"Bold patterns",swatchBg:"#FFF8F0",swatchFg:"#d03040",tier:"showcase",category:"Packs"}];var am=[...ei,...ii],om=[...Rr,...ei,...ii,...Hr],st=e=>ei.filter(t=>t.category===e),zr=[{label:"Style",themes:Rr,tier:"core"},{label:"Design",themes:st("Design"),tier:"showcase"},{label:"Content",themes:st("Content"),tier:"showcase"},{label:"Modern",themes:st("Modern"),tier:"showcase"},{label:"Creative",themes:st("Creative"),tier:"showcase"},{label:"Aesthetic",themes:st("Aesthetic"),tier:"showcase"},{label:"Signature",themes:st("Signature"),tier:"showcase"},{label:"OS Styles",themes:st("OS Styles"),tier:"showcase"},{label:"Packs",themes:Hr,tier:"showcase"},{label:"More Themes",themes:ii,tier:"community"}];Y();var ae="theme",oe="current",F={mode:"auto",brand:"default",accent:"default",borderStyle:"",iconSet:"",fluid:"",backdrop:"",backdropChrome:"",pageBgType:"",pageBgColor:"",pageBgGradStart:"",pageBgGradEnd:"",pageBgGradDir:""};function Yr(e){return(e||"").split(/\s+/).find(t=>t&&!t.startsWith("a11y-"))||""}function Wr(e,t){return e?.brand&&e.brand!==F.brand?e.brand:Yr(t)||F.brand}var jr=["--hue-primary","--hue-secondary","--hue-accent","--lightness-primary","--chroma-primary","--lightness-secondary","--chroma-secondary","--lightness-accent","--chroma-accent"],k=null,nt="",x={_initPromise:null,async init(){return this._initPromise?this._initPromise:(this._initPromise=(async()=>{let e=await E.get(ae,oe);k=e?{...F,...e}:{...F},nt=Yr(document.documentElement.dataset.theme),k.brand=Wr(e,nt);try{await Lt(k.brand)}catch{k.brand!==nt&&(k.brand=nt||F.brand)}return this.apply(k),this._watchSystemPreference(),this._watchRootAttributes(),this._watchCrossDocumentStorage(),k})(),this._initPromise)},_watchCrossDocumentStorage(){typeof window>"u"||window.addEventListener("storage",async e=>{if(e.key!==`vb:${ae}:${oe}`||!e.newValue)return;let t;try{t=JSON.parse(e.newValue)?.data}catch{return}if(!t||typeof t!="object")return;let i={...F,...k,...t};if(i.brand=Wr(t,nt),i.brand&&i.brand!==k?.brand)try{await Lt(i.brand)}catch{i.brand=nt||F.brand}k=i,this.apply(k||{})})},load(){return k?{...k}:{...F}},save(e){let t={...k??F,...e};return k=t,E.set(ae,oe,t).catch(()=>{}),t},apply({mode:e="auto",brand:t="default",borderStyle:i="",iconSet:s="",fluid:n="",backdrop:r="",backdropChrome:a="",pageBgType:o="",pageBgColor:c="",pageBgGradStart:l="",pageBgGradEnd:d="",pageBgGradDir:u=""}={}){let h=document.documentElement;h.dataset.mode=e==="auto"?this.getEffectiveMode():e;let g=(h.dataset.theme||"").split(" ").filter(M=>M.startsWith("a11y-")),p=t!=="default"?[t,...g]:[...g];p.length?h.dataset.theme=p.join(" "):delete h.dataset.theme;let v=i||this._readCSSHint("--theme-border-style");v&&v!=="clean"?h.dataset.borderStyle=v:delete h.dataset.borderStyle;let w=s||this._readCSSHint("--theme-icon-set");if(w&&w!=="lucide"?h.dataset.iconSet=w:delete h.dataset.iconSet,n?h.dataset.fluid=n:delete h.dataset.fluid,r?h.dataset.backdrop=r:delete h.dataset.backdrop,a&&a!=="card"?h.dataset.backdropChrome=a:delete h.dataset.backdropChrome,o==="color"&&c)h.style.setProperty("--page-bg-color",c),h.style.removeProperty("--page-bg-gradient");else if(o==="gradient"&&l&&d){let M=u||"to bottom";h.style.setProperty("--page-bg-gradient",`linear-gradient(${M}, ${l}, ${d})`),h.style.removeProperty("--page-bg-color")}else h.style.removeProperty("--page-bg-color"),h.style.removeProperty("--page-bg-gradient");let T=this.load().accent||"default";this._applyAccent(T),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{mode:e,brand:t,accent:T,borderStyle:v,iconSet:w,fluid:n,backdrop:r,backdropChrome:a,pageBgType:o,effectiveMode:this.getEffectiveMode()}}))},setMode(e){let t=this.save({mode:e});this.apply(t)},async setBrand(e){try{await Lt(e)}catch(i){console.warn(`[VB] Theme "${e}" failed to load, using default`,i),e="default"}let t=this.save({brand:e});this.apply(t)},setAccent(e){this.save({accent:e}),this._applyAccent(e),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}}))},setBorderStyle(e){let t=this.save({borderStyle:e});this.apply(t)},setIconSet(e){let t=this.save({iconSet:e});this.apply(t)},setFluid(e){let t=this.save({fluid:e});this.apply(t)},setBackdrop(e){let t=this.save({backdrop:e});this.apply(t)},setBackdropChrome(e){let t=this.save({backdropChrome:e});this.apply(t)},setPageBg({type:e="",color:t="",gradStart:i="",gradEnd:s="",gradDir:n=""}={}){let r=this.save({pageBgType:e,pageBgColor:t,pageBgGradStart:i,pageBgGradEnd:s,pageBgGradDir:n});this.apply(r)},getEffectiveMode(){let{mode:e}=this.load();return e!=="auto"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},getState(){let{mode:e,brand:t,accent:i,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:l,pageBgGradStart:d,pageBgGradEnd:u,pageBgGradDir:h}=this.load();return{mode:e,brand:t,accent:i,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:l,pageBgGradStart:d,pageBgGradEnd:u,pageBgGradDir:h,effectiveMode:this.getEffectiveMode()}},toggleMode(){let t=this.getEffectiveMode()==="dark"?"light":"dark";this.setMode(t)},reset(){k={...F,brand:nt||F.brand},E.remove(ae,oe).catch(()=>{});let e=document.documentElement;e.style.removeProperty("--page-bg-color"),e.style.removeProperty("--page-bg-gradient");for(let t of jr)e.style.removeProperty(t);this.apply(k)},_readCSSHint(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()},_applyAccent(e){let t=document.documentElement;for(let s of jr)t.style.removeProperty(s);let i=Fr.find(s=>s.id===e);if(!i||!i.seeds||Object.keys(i.seeds).length===0){delete t.dataset.accent;return}t.dataset.accent=i.id},_watchRootAttributes(){this._rootObserver||(this._rootObserver=new MutationObserver(e=>{for(let t of e)t.attributeName==="data-theme"?this._syncFromDataTheme():t.attributeName==="data-mode"&&this._syncFromDataMode()}),this._rootObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","data-mode"]}))},_syncFromDataTheme(){if(!k)return;let i=(document.documentElement.dataset.theme||"").split(/\s+/).filter(Boolean).find(s=>!s.startsWith("a11y-"))||"default";i!==k.brand&&(k.brand=i,Lt(i).catch(()=>{}),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_syncFromDataMode(){if(!k)return;let e=document.documentElement.dataset.mode||"auto",t=k.mode==="auto"?this.getEffectiveMode():k.mode;e!==t&&(k.mode=e,window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_watchSystemPreference(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{let t=this.load();t.mode==="auto"&&this.apply(t)})}};var wd=["layout-text","layout-reel","layout-canvas","dl-item"];wd.forEach(e=>{customElements.get(e)||customElements.define(e,class extends HTMLElement{})});var mm=window.matchMedia("(prefers-reduced-motion: reduce)");var Gr=new Map;function m(e,t,i={}){let s=i.priority??10,n={impl:t,bundle:i.bundle,contract:i.contract,priority:s},r=Gr.get(e);if(customElements.get(e)){if(!r||r.priority>=s){r&&r.priority===s&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${e}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${i.bundle}".`);return}console.warn(`[VB Bundle] Tag <${e}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${i.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=s){r.priority===s&&console.warn(`[VB Bundle] Tag <${e}> already registered by "${r.bundle}". Skipping "${i.bundle}" (first wins at equal priority).`);return}Gr.set(e,n),customElements.define(e,t)}var b=class extends HTMLElement{#e=[];#t;connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,i,s,n){t.addEventListener(i,s,n),this.#e.push(()=>t.removeEventListener(i,s,n))}_reinit(){for(let t of this.#e)t();this.#e=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,i){this.#t||(this.#t=this.attachInternals());let s=this.#t.states;try{i?s.add(t):s.delete(t)}catch{let n=`--${t}`;i?s.add(n):s.delete(n)}}_adoptInternals(t){this.#t||(this.#t=t)}};var Ad=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],ni=class extends b{#e=null;#t=null;#i=!1;setup(){return this.#e=this.querySelector("input, textarea, select"),this.#t=this.querySelector("output.error")??this.querySelector("output:not(.hint)"),this.#e?(this.listen(this.#e,"blur",()=>this.validate()),this.listen(this.#e,"input",()=>{this.#i&&this.validate()}),!0):!1}teardown(){this.#e=null,this.#t=null,this.#i=!1}validate(){let t=this.#e;if(!t)return!0;t.validity.customError||t.setCustomValidity("");let i=t.checkValidity();return i?(this.#s(t.value?"valid":null),t.removeAttribute("aria-invalid"),this.#t&&(this.#t.textContent="")):(this.#i=!0,this.#s("invalid"),t.setAttribute("aria-invalid","true"),this.#r(t.validity)),i}setError(t){this.#e&&(this.#e.setCustomValidity(t),this.#i=!0,this.#s("invalid"),this.#e.setAttribute("aria-invalid","true"),this.#t&&(this.#t.textContent=t))}clearError(){this.#e&&(this.#e.setCustomValidity(""),this.#s(null),this.#e.removeAttribute("aria-invalid"),this.#i=!1,this.#t&&(this.#t.textContent=""))}get fieldName(){return this.querySelector("label")?.textContent?.trim()??this.#e?.getAttribute("aria-label")??this.#e?.name??this.#e?.id??"Field"}get input(){return this.#e}#s(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#r(t){if(!this.#t)return;let i=this.#e;if(!(!i||!this.#t))for(let s of Ad){if(!t[s])continue;let n=`data-message-${s.toLowerCase()}`,r=i.getAttribute(n)??i.validationMessage;this.#t.textContent=r;return}}};m("form-field",ni);function V(e){return document.startViewTransition?document.startViewTransition(e):e()}var Ed=0,ri=class extends b{#e=[];#t=[];#i=!1;#s=0;setup(){return this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0?!1:(this.style.setProperty("--_tab-count",String(this.#e.length)),this.#a(),this.#o(),this.#r(),!0)}teardown(){this.style.removeProperty("--_tab-count"),this.#e=[],this.#t=[],this.#i=!1}get tabs(){return this.#e.map((t,i)=>({id:t.id||void 0,label:t.querySelector("summary")?.textContent?.trim()||`Tab ${i+1}`,content:t.querySelector(":scope > :not(summary)")?.innerHTML||"",active:t.hasAttribute("open")}))}set tabs(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();let s=!1;for(let n of i){let r=document.createElement("details");n.id&&(r.id=n.id),n.active&&!s&&(r.setAttribute("open",""),s=!0);let a=document.createElement("summary");a.textContent=n.label||"",r.appendChild(a);let o=document.createElement("div");o.innerHTML=n.content||"",r.appendChild(o),this.appendChild(r)}!s&&this.firstElementChild&&this.firstElementChild.setAttribute("open",""),this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("tab-set:tabs-changed",{detail:{tabs:i,source:"property"},bubbles:!0}))}#r(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#i=!0;let t=++Ed,i=this.getAttribute("transition")||"fade",s=i==="slide"?"vt-tabs-slide":i==="scale"?"vt-tabs-scale":"vt-tabs";this.#e.forEach(n=>{let r=n.querySelector(":scope > :not(summary)");r&&(r.style.viewTransitionName=`tabs-${t}`,r.style.viewTransitionClass=s)}),this.#s=this.#e.findIndex(n=>n.open),this.#s===-1&&(this.#s=0)}#n(t){if(t===this.#s)return;let i=t>this.#s?"forward":"backward";document.documentElement.dataset.vtDirection=i,V(()=>{this.#e[t].open=!0}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}#a(){this.#e.forEach((t,i)=>{let s=this.#t[i],n=t.querySelector(":scope > :not(summary)");if(!s||!n)return;let r=s.id||`tab-${crypto.randomUUID().slice(0,8)}`,a=n.id||`panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,s.setAttribute("aria-controls",a),s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-expanded",t.open?"true":"false"),n.id=a,n.setAttribute("aria-labelledby",r),this.listen(s,"click",o=>{if(t.open){o.preventDefault();return}this.#i&&(o.preventDefault(),this.#n(i))}),this.listen(s,"keydown",o=>this.#f(o,i)),this.listen(t,"toggle",()=>this.#l(i))})}#o(){!this.#e.some(i=>i.open)&&this.#e.length>0&&(this.#e[0].open=!0,this.#c())}#l(t){this.#e[t].open&&(this.#s=t),this.#c(),this.dispatchEvent(new CustomEvent("tab-set:change",{detail:{index:t},bubbles:!0}))}#c(){this.#e.forEach((t,i)=>{let s=this.#t[i];s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-expanded",t.open?"true":"false")})}#f(t,i){let{key:s}=t,n;switch(s){case"ArrowRight":n=(i+1)%this.#e.length;break;case"ArrowLeft":n=(i-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#i?this.#n(n):this.#e[n].open=!0,this.#t[n].focus()}};m("tab-set",ri);var ai=class e extends b{static#e=0;#t;#i=[];#s="Back to content";setup(){this.#t=++e.#e,this.hasAttribute("data-back-label")&&(this.#s=this.getAttribute("data-back-label")??this.#s),this.#r(),this.getAttribute("data-mode")==="sidenotes"?this.#o():this.#n()}#r(){let t=[...document.querySelectorAll("foot-note:not([data-enhanced])")];this.#i=t.filter(i=>this.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING)}#n(){if(this.#i.length===0)return;let t=document.createElement("ol");this.#i.forEach((i,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;this.#a(i,n,r,a);let o=this.#c(i,n,r,a);t.appendChild(o)}),this.appendChild(t)}#a(t,i,s,n){t.setAttribute("data-enhanced",""),t.id=s;let r=t.innerHTML,a=document.createElement("span");a.innerHTML=r;let o=document.createElement("a");o.href=`#${n}`,o.setAttribute("aria-describedby",n),o.textContent=`[${i}]`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#o(){if(this.#i.length===0)return;let t=[];if(this.#i.forEach((i,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;i.getAttribute("data-side")==="false"?(this.#a(i,n,r,a),t.push({ref:i,num:n,refId:r,noteId:a})):this.#l(i,n,r,a)}),t.length>0){let i=document.createElement("ol");for(let{ref:s,num:n,refId:r,noteId:a}of t)i.appendChild(this.#c(s,n,r,a));this.appendChild(i)}else this.hidden=!0}#l(t,i,s,n){let r=t.innerHTML;t.setAttribute("data-enhanced",""),t.setAttribute("data-side",""),t.id=s;let a=document.createElement("a");a.href=`#${n}`,a.setAttribute("aria-describedby",n),a.textContent=`[${i}]`;let o=document.createElement("aside");o.className="sidenote",o.id=n,o.setAttribute("role","note"),o.innerHTML=`<span class="sidenote-number">${i}.</span> ${r}`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#c(t,i,s,n){let r=document.createElement("li");r.id=n;let a=t.querySelector("span"),o=a?a.innerHTML:"",c=document.createElement("a");return c.href=`#${s}`,c.setAttribute("data-backref",""),c.setAttribute("aria-label",this.#s),c.textContent="\u21A9",r.innerHTML=o+" ",r.appendChild(c),r}},oi=class extends HTMLElement{};m("foot-notes",ai);m("foot-note",oi);var Kr=0,ci=class extends b{#e=[];#t=[];#i=[];#s=!1;setup(){return this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0?!1:(this.#r(),this.#o(),this.#n(),!0)}teardown(){this.#e=[],this.#t=[],this.#i=[],this.#s=!1}get panels(){return this.#e.map((t,i)=>({id:t.id||void 0,summary:t.querySelector("summary")?.textContent?.trim()||`Panel ${i+1}`,content:this.#i[i]?.innerHTML||"",open:t.hasAttribute("open")}))}set panels(t){let i=Array.isArray(t)?t:[],n=this.hasAttribute("single")?`acc-${++Kr}`:null;for(;this.firstChild;)this.firstChild.remove();for(let r of i){let a=document.createElement("details");r.id&&(a.id=r.id),r.open&&a.setAttribute("open",""),n&&a.setAttribute("name",n);let o=document.createElement("summary");o.textContent=r.summary||"",a.appendChild(o);let c=document.createElement("div");c.innerHTML=r.content||"",a.appendChild(c),this.appendChild(a)}this._reinit(),this.dispatchEvent(new CustomEvent("accordion-wc:panels-changed",{detail:{panels:i,source:"property"},bubbles:!0}))}#r(){this.#i=this.#e.map(t=>{let i=t.querySelector("summary");if(!i)return null;let s=[...t.children].filter(n=>n!==i);if(s.length===1&&s[0].localName==="div")return s[0];if(s.length>=1){let n=document.createElement("div");for(let r of s)n.appendChild(r);return t.appendChild(n),n}return null})}#n(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#s=!0;let t=++Kr,i=this.getAttribute("transition")||"fade",s=i==="slide"?"vt-accordion-slide":i==="scale"?"vt-accordion-scale":"vt-accordion";this.#i.forEach((n,r)=>{n&&(n.style.viewTransitionName=`accordion-${t}-${r}`,n.style.viewTransitionClass=s)})}#a(t){V(()=>{t.open=!t.open})}#o(){this.#e.forEach((t,i)=>{let s=this.#t[i],n=this.#i[i];if(s){if(n){let r=s.id||`accordion-heading-${crypto.randomUUID().slice(0,8)}`,a=n.id||`accordion-panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,n.id=a,s.setAttribute("aria-expanded",t.open?"true":"false"),s.setAttribute("aria-controls",a),n.setAttribute("aria-labelledby",r),n.setAttribute("role","region")}else s.setAttribute("aria-expanded",t.open?"true":"false");this.listen(s,"click",r=>{this.#s&&(r.preventDefault(),this.#a(t))}),this.listen(s,"keydown",r=>this.#c(r,i)),this.listen(t,"toggle",()=>this.#l(t,i))}})}#l(t,i){this.#t[i].setAttribute("aria-expanded",t.open?"true":"false"),this.hasAttribute("single")&&t.open&&this.#e.forEach((n,r)=>{r!==i&&n.open&&(n.open=!1,this.#t[r].setAttribute("aria-expanded","false"))}),this.dispatchEvent(new CustomEvent("accordion-wc:toggle",{detail:{index:i,open:t.open},bubbles:!0}))}#c(t,i){let{key:s}=t,n;switch(s){case"ArrowDown":n=(i+1)%this.#e.length;break;case"ArrowUp":n=(i-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#t[n].focus()}open(t){t<0||t>=this.#e.length||(this.#s&&!this.#e[t].open?V(()=>{this.#e[t].open=!0}):this.#e[t].open=!0)}close(t){t<0||t>=this.#e.length||(this.#s&&this.#e[t].open?V(()=>{this.#e[t].open=!1}):this.#e[t].open=!1)}toggle(t){t<0||t>=this.#e.length||(this.#s?this.#a(this.#e[t]):this.#e[t].open=!this.#e[t].open)}openAll(){this.hasAttribute("single")||this.#e.forEach(t=>{t.open=!0})}closeAll(){this.#e.forEach(t=>{t.open=!1})}};m("accordion-wc",ci);var li=class extends b{#e=[];#t=[];static get observedAttributes(){return["position","max"]}setup(){this.setAttribute("role","region"),this.setAttribute("aria-label","Notifications"),this.setAttribute("aria-live","polite")}teardown(){this.#t.forEach(t=>{t._dismissTimer&&clearTimeout(t._dismissTimer)}),this.#e=[],this.#t=[]}show(t){let{message:i,variant:s="info",duration:n=this.#n(),dismissible:r=!0,action:a,onAction:o,source:c="api"}=t,l=this.#i({message:i,variant:s,dismissible:r,action:a,onAction:o}),d=this.#a();return this.#t.length>=d?this.#e.push({toast:l,duration:n}):this.#s(l,n),this.dispatchEvent(new CustomEvent("toast-msg:enqueued",{detail:{message:i,variant:s,duration:n,source:c},bubbles:!0})),l}get queue(){let t=this.#t.map(s=>({message:s.querySelector(".message")?.textContent||"",variant:s.getAttribute("data-variant")||"info",state:"visible"})),i=this.#e.map(({toast:s})=>({message:s.querySelector(".message")?.textContent||"",variant:s.getAttribute("data-variant")||"info",state:"queued"}));return[...t,...i]}#i({message:t,variant:i,dismissible:s,action:n,onAction:r}){let a=document.createElement("div");a.className="toast",a.setAttribute("role",i==="error"||i==="warning"?"alert":"status"),a.setAttribute("data-variant",i);let o={info:"&#9432;",success:"&#10003;",warning:"&#9888;",error:"&#10007;"};return a.innerHTML=`
14
14
  <span class="icon" aria-hidden="true">${o[i]||o.info}</span>
15
- <span class="message">${this.#c(t)}</span>
16
- ${n?`<button type="button" class="action">${this.#c(n)}</button>`:""}
15
+ <span class="message">${this.#o(t)}</span>
16
+ ${n?`<button type="button" class="action">${this.#o(n)}</button>`:""}
17
17
  ${s?'<button type="button" class="close" aria-label="Dismiss">&#x2715;</button>':""}
18
- `,s&&a.querySelector(".close")?.addEventListener("click",()=>{this.#r(a)}),n&&r&&a.querySelector(".action")?.addEventListener("click",()=>{r(),this.#r(a)}),a}#s(t,i){this.appendChild(t),this.#t.push(t),requestAnimationFrame(()=>{t.setAttribute("data-state","visible")}),i>0&&(t._dismissTimer=setTimeout(()=>{this.#r(t)},i)),this.dispatchEvent(new CustomEvent("toast-msg:show",{bubbles:!0,detail:{toast:t}}))}#r(t){if(!this.contains(t))return;t._dismissTimer&&clearTimeout(t._dismissTimer),t.setAttribute("data-state","hiding");let i=()=>{t.removeEventListener("animationend",i),t.remove();let s=this.#t.indexOf(t);if(s>-1&&this.#t.splice(s,1),this.#e.length>0){let{toast:n,duration:r}=this.#e.shift();this.#s(n,r)}this.dispatchEvent(new CustomEvent("toast-msg:hide",{bubbles:!0,detail:{toast:t}}))};t.addEventListener("animationend",i),setTimeout(()=>{this.contains(t)&&i()},300)}dismissAll(){this.#e=[],[...this.#t].forEach(t=>this.#r(t))}#n(){let t=this.getAttribute("duration");return t!==null?parseInt(t,10):5e3}#a(){let t=this.getAttribute("max");return t!==null?parseInt(t,10):5}#c(t){let i=document.createElement("div");return i.textContent=t,i.innerHTML}};b("toast-msg",ei);var ii=CSS.supports("anchor-name","--x"),id=CSS.supports("position-area","bottom"),sd=0,si=class extends g{#e=null;#t=null;#i=null;#s=null;setup(){this.id||(this.id=`pop-over-${++sd}`);let t=this.dataset.mode||"auto";this.hasAttribute("popover")||this.setAttribute("popover",t),this.#r(),this.#n(),this.#i=i=>{let s=i.newState==="open"?"show":"hide";this.dispatchEvent(new CustomEvent(`pop-over:${s}`,{detail:{state:i.newState},bubbles:!0,composed:!0})),!ii&&i.newState==="open"&&this.#e&&this.#c()},this.listen(this,"beforetoggle",this.#i),ii||(this.#s=()=>{this.matches(":popover-open")&&this.#e&&this.#c()},this.listen(window,"resize",this.#s),this.listen(window,"scroll",this.#s,{capture:!0,passive:!0}))}show(){this.matches(":popover-open")||this.showPopover()}hide(){this.matches(":popover-open")&&this.hidePopover()}toggle(){this.matches(":popover-open")?this.hide():this.show()}get open(){return this.matches(":popover-open")}#r(){let t=this.dataset.anchor;t?this.#e=document.getElementById(t)||document.querySelector(t):this.#e=document.querySelector(`[popovertarget="${CSS.escape(this.id)}"]`)}#n(){if(!(!this.#e||!ii)&&(this.#t=`--pop-over-anchor-${this.id}`,this.#e.style.setProperty("anchor-name",this.#t),this.style.setProperty("position-anchor",this.#t),this.setAttribute("data-anchor-name",this.#t||""),!id)){let t=this.dataset.position||"bottom";this.#a(t)}}#a(t){let i="var(--_pop-over-offset, var(--size-xs))",s={top:{bottom:`calc(anchor(top) + ${i})`,left:"anchor(left)"},bottom:{top:`calc(anchor(bottom) + ${i})`,left:"anchor(left)"},left:{right:`calc(anchor(left) + ${i})`,top:"anchor(top)"},right:{left:`calc(anchor(right) + ${i})`,top:"anchor(top)"}},n=t.split("-")[0],r=s[n]||s.bottom;Object.entries(r).forEach(([a,o])=>this.style.setProperty(a,o))}#c(){if(!this.#e)return;let t=this.#e.getBoundingClientRect(),i=this.dataset.position||"bottom",s=this.#o(),n,r;switch(i.split("-")[0]){case"top":n=t.top-this.offsetHeight-s,r=t.left;break;case"left":n=t.top,r=t.left-this.offsetWidth-s;break;case"right":n=t.top,r=t.right+s;break;default:n=t.bottom+s,r=t.left;break}i.endsWith("-end")&&(i.startsWith("top")||i.startsWith("bottom")?r=t.right-this.offsetWidth:n=t.bottom-this.offsetHeight),this.style.position="fixed",this.style.top=`${Math.round(n)}px`,this.style.left=`${Math.round(r)}px`,this.style.margin="0"}#o(){let t={none:0,xs:4,s:8,m:16,l:24};return t[this.dataset.offset]??t.xs}};b("pop-over",si);var nd=new Set(["BUTTON","A","AREA"]);function $r(e){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?nd.has(e.tagName):!1}var ne=0,ni=class extends g{#e=null;#t=null;#i;#s;#r=!1;#n=!1;#a;setup(){this.#r=this.getAttribute("variant")==="card",this.#r?this.#o():this.#c()}#c(){if(this.#e=this.querySelector(":scope > :not(template)"),!this.#e)return;this.#n=$r(this.#e);let t=this.querySelector(":scope > template[data-tooltip]"),i=this.getAttribute("content"),s=this.#e.getAttribute("title");if(!t&&!i&&!s)return;s&&(this.#a=s,this.#e.removeAttribute("title"));let n=this.getAttribute("position")||"top";this.#e.id||(this.#e.id=`tooltip-trigger-${++ne}`);let r=document.createElement("pop-over");r.className="tooltip",r.setAttribute("role","tooltip"),r.dataset.mode="hint",r.dataset.anchor=this.#e.id,r.dataset.tooltipPosition=n,r.id=`tooltip-${++ne}`,t?r.innerHTML=t.innerHTML:r.textContent=i||s;let a=document.createElement("span");a.className="tooltip-arrow",a.setAttribute("aria-hidden","true"),r.appendChild(a),this.appendChild(r),this.#t=r,this.#n?(this.#e.setAttribute("interestfor",r.id),this.#e.hasAttribute("aria-describedby")||this.#e.setAttribute("aria-describedby",r.id)):(this.#e.setAttribute("aria-describedby",r.id),this.listen(this.#e,"mouseenter",this.#f),this.listen(this.#e,"mouseleave",this.#h),this.listen(this.#e,"focus",this.#p),this.listen(this.#e,"blur",this.#u),this.listen(r,"mouseenter",this.#l),this.listen(r,"mouseleave",this.#h)),this.listen(r,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(r,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}#o(){this.#e=this.querySelector(":scope > [data-trigger]");let t=this.querySelector(":scope > [data-content]");if(!this.#e||!t)return;this.#n=$r(this.#e),this.#e.id||(this.#e.id=`tooltip-trigger-${++ne}`);let i=document.createElement("pop-over");i.className="hover-card",i.dataset.mode="manual",i.dataset.anchor=this.#e.id,i.dataset.position=this.getAttribute("position")||"bottom",i.id=`hc-${++ne}`,i.appendChild(t),t.removeAttribute("data-content"),t.hidden=!1,this.appendChild(i),this.#t=i,this.#n?this.#e.setAttribute("interestfor",i.id):(this.listen(this.#e,"mouseenter",this.#f),this.listen(this.#e,"mouseleave",this.#h),this.listen(this.#e,"focus",this.#p),this.listen(this.#e,"blur",this.#h),this.listen(i,"mouseenter",this.#l),this.listen(i,"mouseleave",this.#h),this.listen(document,"keydown",this.#m)),this.listen(i,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(i,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}teardown(){this.#e&&(this.#n&&this.#e.removeAttribute("interestfor"),this.#a&&(this.#e.setAttribute("title",this.#a),this.#a=void 0)),this.#t&&(this.#t.remove(),this.#t=null),clearTimeout(this.#i),clearTimeout(this.#s)}#f=()=>{clearTimeout(this.#s);let t=this.#r?300:200,i=parseInt(this.getAttribute("delay")||String(t),10);this.setState("show-pending",!0),this.#i=setTimeout(()=>{this.setState("show-pending",!1),this.show()},i)};#h=()=>{clearTimeout(this.#i),this.setState("show-pending",!1);let t=this.#r?200:100;this.#s=setTimeout(()=>this.hide(),t)};#p=()=>{clearTimeout(this.#s),this.show()};#u=()=>{clearTimeout(this.#i),this.setState("show-pending",!1),this.hide()};#l=()=>{clearTimeout(this.#s)};#m=t=>{t.key==="Escape"&&this.isVisible&&this.hide()};show(){!this.#t||this.isVisible||(typeof this.#t.show=="function"?this.#t.show():this.#t.showPopover())}hide(){!this.#t||!this.isVisible||(typeof this.#t.hide=="function"?this.#t.hide():this.#t.hidePopover())}get isVisible(){return this.#t?.matches(":popover-open")??!1}};b("tool-tip",ni);var ri=0,ai=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=!1;#c=null;setup(){let t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button");if(!t)return!1;this.#e=t;let i=this.querySelector('menu, ul[role="menu"]');if(!i)return!1;this.#t=i,this.#a=this.hasAttribute("hover"),this.#e.id||(this.#e.id=`dropdown-trigger-${++ri}`);let s=this.querySelector(":scope > pop-over[data-dropdown-host]");return s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-dropdown-host",""),this.#i.id=`dropdown-${++ri}`,this.#i.dataset.mode=this.#a?"manual":"auto",this.#i.dataset.position=this.getAttribute("position")||"bottom-start",this.#i.dataset.anchor=this.#e.id,this.#i.appendChild(this.#t),this.appendChild(this.#i)),this.#i.dataset.mode=this.#a?"manual":"auto",this.#i.dataset.position=this.getAttribute("position")||"bottom-start",this.#i.dataset.anchor=this.#e.id,this.#t.parentElement!==this.#i&&this.#i.appendChild(this.#t),this.#e.setAttribute("aria-haspopup","menu"),this.#e.setAttribute("aria-expanded","false"),this.#t.id||(this.#t.id=`dropdown-menu-${++ri}`),this.#e.setAttribute("aria-controls",this.#t.id),this.#t.setAttribute("role","menu"),this.#o(),this.#a?(this.listen(this,"mouseenter",this.#h),this.listen(this,"mouseleave",this.#p),this.listen(this.#e,"focus",this.#u),this.listen(this.#e,"blur",this.#l)):this.listen(this.#e,"click",this.#f),this.listen(this.#e,"keydown",this.#m),this.listen(this.#t,"keydown",this.#d),this.listen(this.#i,"pop-over:hide",this.#b),this.listen(this.#i,"pop-over:show",this.#v),this.#a&&this.listen(document,"keydown",this.#y),!0}teardown(){this.#c&&clearTimeout(this.#c)}get items(){if(!this.#t)return[];let t=[];for(let i of this.#t.querySelectorAll(":scope > li")){if(i.matches('[role="separator"]')||i.querySelector("hr")){t.push({separator:!0});continue}let s=i.querySelector('button, a, [role="menuitem"]');s&&t.push({label:s.textContent.trim().replace(/\s+/g," "),value:s.getAttribute("data-value")||void 0,href:s.tagName==="A"?s.getAttribute("href"):void 0,disabled:s.disabled||s.hasAttribute("data-disabled")||void 0})}return t}set items(t){let i=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.disabled&&(a.tagName==="BUTTON"?a.disabled=!0:a.setAttribute("data-disabled","")),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("drop-down:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#o(){this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.closest('[role="separator"]')),this.#s.forEach(t=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.addEventListener("click",this.#w)}),this.#t.querySelectorAll('li:empty, [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")})}#f=t=>{t.stopPropagation(),this.toggle()};#h=()=>{this.#c&&(clearTimeout(this.#c),this.#c=null,this.setState("hover-grace-pending",!1)),this.open()};#p=()=>{this.setState("hover-grace-pending",!0),this.#c=setTimeout(()=>{this.setState("hover-grace-pending",!1),this.close()},100)};#u=()=>{this.#c&&(clearTimeout(this.#c),this.#c=null,this.setState("hover-grace-pending",!1)),this.open()};#l=t=>{this.#t?.contains(t.relatedTarget)||(this.setState("hover-grace-pending",!0),this.#c=setTimeout(()=>{this.setState("hover-grace-pending",!1),this.contains(document.activeElement)||this.close()},100))};#m=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#g(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#g(this.#s.length-1);break}};#d=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#g(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#g(this.#r-1);break;case"Home":t.preventDefault(),this.#g(0);break;case"End":t.preventDefault(),this.#g(this.#s.length-1);break;case"Tab":this.close();break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break}};#y=t=>{t.key==="Escape"&&this.#n&&(t.preventDefault(),this.close(),this.#e?.focus())};#w=t=>{t.defaultPrevented||(this.close(),this.#e?.focus())};#v=()=>{this.#n||(this.#n=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0})))};#b=()=>{this.#n&&(this.#n=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#g(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}open(){this.#n||!this.#i||this.#i.show()}close(){!this.#n||!this.#i||this.#i.hide()}toggle(){this.#n?this.close():this.open()}get isOpen(){return this.#n}};b("drop-down",ai);function Br({basePath:e,set:t,name:i}){return`${e}/${t}/${i}.svg`}function Pr(e,t=document){let i=e.getAttribute("data-icon-set");if(i)return i;let s=e.closest("[data-icon-set]")?.getAttribute("data-icon-set");return s||t.documentElement.dataset.iconSet||"lucide"}function Fr(e=document){return e.documentElement.dataset.iconPath||"/cdn/icons"}function ci(e){let t=e.getAttribute("data-icon");if(!t){e.style.removeProperty("--vb-icon");return}let i=Br({basePath:Fr(document),set:Pr(e,document),name:t});e.style.setProperty("--vb-icon",`url("${i}")`)}function oi(e=document){for(let t of e.querySelectorAll("[data-icon]"))ci(t)}var Rr=!1;function rd(){if(Rr)return;Rr=!0,oi(),new MutationObserver(t=>{for(let i of t)if(i.type==="attributes"){let s=i.target;s.hasAttribute&&s.hasAttribute("data-icon")&&ci(s),i.attributeName==="data-icon-set"&&oi(s)}else for(let s of i.addedNodes){if(s.nodeType!==1)continue;let n=s;n.hasAttribute("data-icon")&&ci(n),oi(n)}}).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-icon","data-icon-set"]})}typeof document<"u"&&rd();var Hr=`
18
+ `,s&&a.querySelector(".close")?.addEventListener("click",()=>{this.#r(a)}),n&&r&&a.querySelector(".action")?.addEventListener("click",()=>{r(),this.#r(a)}),a}#s(t,i){this.appendChild(t),this.#t.push(t),requestAnimationFrame(()=>{t.setAttribute("data-state","visible")}),i>0&&(t._dismissTimer=setTimeout(()=>{this.#r(t)},i)),this.dispatchEvent(new CustomEvent("toast-msg:show",{bubbles:!0,detail:{toast:t}}))}#r(t){if(!this.contains(t))return;t._dismissTimer&&clearTimeout(t._dismissTimer),t.setAttribute("data-state","hiding");let i=()=>{t.removeEventListener("animationend",i),t.remove();let s=this.#t.indexOf(t);if(s>-1&&this.#t.splice(s,1),this.#e.length>0){let{toast:n,duration:r}=this.#e.shift();this.#s(n,r)}this.dispatchEvent(new CustomEvent("toast-msg:hide",{bubbles:!0,detail:{toast:t}}))};t.addEventListener("animationend",i),setTimeout(()=>{this.contains(t)&&i()},300)}dismissAll(){this.#e=[],[...this.#t].forEach(t=>this.#r(t))}#n(){let t=this.getAttribute("duration");return t!==null?parseInt(t,10):5e3}#a(){let t=this.getAttribute("max");return t!==null?parseInt(t,10):5}#o(t){let i=document.createElement("div");return i.textContent=t,i.innerHTML}};m("toast-msg",li);var di=CSS.supports("anchor-name","--x"),Sd=CSS.supports("position-area","bottom"),xd=0,ui=class extends b{#e=null;#t=null;#i=null;#s=null;setup(){this.id||(this.id=`pop-over-${++xd}`);let t=this.dataset.mode||"auto";this.hasAttribute("popover")||this.setAttribute("popover",t),this.#r(),this.#n(),this.#i=i=>{let s=i.newState==="open"?"show":"hide";this.dispatchEvent(new CustomEvent(`pop-over:${s}`,{detail:{state:i.newState},bubbles:!0,composed:!0})),!di&&i.newState==="open"&&this.#e&&this.#o()},this.listen(this,"beforetoggle",this.#i),di||(this.#s=()=>{this.matches(":popover-open")&&this.#e&&this.#o()},this.listen(window,"resize",this.#s),this.listen(window,"scroll",this.#s,{capture:!0,passive:!0}))}show(){this.matches(":popover-open")||this.showPopover()}hide(){this.matches(":popover-open")&&this.hidePopover()}toggle(){this.matches(":popover-open")?this.hide():this.show()}get open(){return this.matches(":popover-open")}#r(){let t=this.dataset.anchor;t?this.#e=document.getElementById(t)||document.querySelector(t):this.#e=document.querySelector(`[popovertarget="${CSS.escape(this.id)}"]`)}#n(){if(!(!this.#e||!di)&&(this.#t=`--pop-over-anchor-${this.id}`,this.#e.style.setProperty("anchor-name",this.#t),this.style.setProperty("position-anchor",this.#t),this.setAttribute("data-anchor-name",this.#t||""),!Sd)){let t=this.dataset.position||"bottom";this.#a(t)}}#a(t){let i="var(--_pop-over-offset, var(--size-xs))",s={top:{bottom:`calc(anchor(top) + ${i})`,left:"anchor(left)"},bottom:{top:`calc(anchor(bottom) + ${i})`,left:"anchor(left)"},left:{right:`calc(anchor(left) + ${i})`,top:"anchor(top)"},right:{left:`calc(anchor(right) + ${i})`,top:"anchor(top)"}},n=t.split("-")[0],r=s[n]||s.bottom;Object.entries(r).forEach(([a,o])=>this.style.setProperty(a,o))}#o(){if(!this.#e)return;let t=this.#e.getBoundingClientRect(),i=this.dataset.position||"bottom",s=this.#l(),n,r;switch(i.split("-")[0]){case"top":n=t.top-this.offsetHeight-s,r=t.left;break;case"left":n=t.top,r=t.left-this.offsetWidth-s;break;case"right":n=t.top,r=t.right+s;break;default:n=t.bottom+s,r=t.left;break}i.endsWith("-end")&&(i.startsWith("top")||i.startsWith("bottom")?r=t.right-this.offsetWidth:n=t.bottom-this.offsetHeight),this.style.position="fixed",this.style.top=`${Math.round(n)}px`,this.style.left=`${Math.round(r)}px`,this.style.margin="0"}#l(){let t={none:0,xs:4,s:8,m:16,l:24};return t[this.dataset.offset]??t.xs}};m("pop-over",ui);var Cd=new Set(["BUTTON","A","AREA"]);function Xr(e){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?Cd.has(e.tagName):!1}var ce=0,hi=class extends b{#e=null;#t=null;#i;#s;#r=!1;#n=!1;#a;setup(){this.#r=this.getAttribute("variant")==="card",this.#r?this.#l():this.#o()}#o(){if(this.#e=this.querySelector(":scope > :not(template)"),!this.#e)return;this.#n=Xr(this.#e);let t=this.querySelector(":scope > template[data-tooltip]"),i=this.getAttribute("content"),s=this.#e.getAttribute("title");if(!t&&!i&&!s)return;s&&(this.#a=s,this.#e.removeAttribute("title"));let n=this.getAttribute("position")||"top";this.#e.id||(this.#e.id=`tooltip-trigger-${++ce}`);let r=document.createElement("pop-over");r.className="tooltip",r.setAttribute("role","tooltip"),r.dataset.mode="hint",r.dataset.anchor=this.#e.id,r.dataset.tooltipPosition=n,r.id=`tooltip-${++ce}`,t?r.innerHTML=t.innerHTML:r.textContent=i||s;let a=document.createElement("span");a.className="tooltip-arrow",a.setAttribute("aria-hidden","true"),r.appendChild(a),this.appendChild(r),this.#t=r,this.#n?(this.#e.setAttribute("interestfor",r.id),this.#e.hasAttribute("aria-describedby")||this.#e.setAttribute("aria-describedby",r.id)):(this.#e.setAttribute("aria-describedby",r.id),this.listen(this.#e,"mouseenter",this.#c),this.listen(this.#e,"mouseleave",this.#f),this.listen(this.#e,"focus",this.#m),this.listen(this.#e,"blur",this.#h),this.listen(r,"mouseenter",this.#u),this.listen(r,"mouseleave",this.#f)),this.listen(r,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(r,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}#l(){this.#e=this.querySelector(":scope > [data-trigger]");let t=this.querySelector(":scope > [data-content]");if(!this.#e||!t)return;this.#n=Xr(this.#e),this.#e.id||(this.#e.id=`tooltip-trigger-${++ce}`);let i=document.createElement("pop-over");i.className="hover-card",i.dataset.mode="manual",i.dataset.anchor=this.#e.id,i.dataset.position=this.getAttribute("position")||"bottom",i.id=`hc-${++ce}`,i.appendChild(t),t.removeAttribute("data-content"),t.hidden=!1,this.appendChild(i),this.#t=i,this.#n?this.#e.setAttribute("interestfor",i.id):(this.listen(this.#e,"mouseenter",this.#c),this.listen(this.#e,"mouseleave",this.#f),this.listen(this.#e,"focus",this.#m),this.listen(this.#e,"blur",this.#f),this.listen(i,"mouseenter",this.#u),this.listen(i,"mouseleave",this.#f),this.listen(document,"keydown",this.#p)),this.listen(i,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(i,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}teardown(){this.#e&&(this.#n&&this.#e.removeAttribute("interestfor"),this.#a&&(this.#e.setAttribute("title",this.#a),this.#a=void 0)),this.#t&&(this.#t.remove(),this.#t=null),clearTimeout(this.#i),clearTimeout(this.#s)}#c=()=>{clearTimeout(this.#s);let t=this.#r?300:200,i=parseInt(this.getAttribute("delay")||String(t),10);this.setState("show-pending",!0),this.#i=setTimeout(()=>{this.setState("show-pending",!1),this.show()},i)};#f=()=>{clearTimeout(this.#i),this.setState("show-pending",!1);let t=this.#r?200:100;this.#s=setTimeout(()=>this.hide(),t)};#m=()=>{clearTimeout(this.#s),this.show()};#h=()=>{clearTimeout(this.#i),this.setState("show-pending",!1),this.hide()};#u=()=>{clearTimeout(this.#s)};#p=t=>{t.key==="Escape"&&this.isVisible&&this.hide()};show(){!this.#t||this.isVisible||(typeof this.#t.show=="function"?this.#t.show():this.#t.showPopover())}hide(){!this.#t||!this.isVisible||(typeof this.#t.hide=="function"?this.#t.hide():this.#t.hidePopover())}get isVisible(){return this.#t?.matches(":popover-open")??!1}};m("tool-tip",hi);var fi=0,pi=class extends b{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=!1;#o=null;setup(){let t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button");if(!t)return!1;this.#e=t;let i=this.querySelector('menu, ul[role="menu"]');if(!i)return!1;this.#t=i,this.#a=this.hasAttribute("hover"),this.#e.id||(this.#e.id=`dropdown-trigger-${++fi}`);let s=this.querySelector(":scope > pop-over[data-dropdown-host]");return s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-dropdown-host",""),this.#i.id=`dropdown-${++fi}`,this.#i.dataset.mode=this.#a?"manual":"auto",this.#i.dataset.position=this.getAttribute("position")||"bottom-start",this.#i.dataset.anchor=this.#e.id,this.#i.appendChild(this.#t),this.appendChild(this.#i)),this.#i.dataset.mode=this.#a?"manual":"auto",this.#i.dataset.position=this.getAttribute("position")||"bottom-start",this.#i.dataset.anchor=this.#e.id,this.#t.parentElement!==this.#i&&this.#i.appendChild(this.#t),this.#e.setAttribute("aria-haspopup","menu"),this.#e.setAttribute("aria-expanded","false"),this.#t.id||(this.#t.id=`dropdown-menu-${++fi}`),this.#e.setAttribute("aria-controls",this.#t.id),this.#t.setAttribute("role","menu"),this.#l(),this.#a?(this.listen(this,"mouseenter",this.#f),this.listen(this,"mouseleave",this.#m),this.listen(this.#e,"focus",this.#h),this.listen(this.#e,"blur",this.#u)):this.listen(this.#e,"click",this.#c),this.listen(this.#e,"keydown",this.#p),this.listen(this.#t,"keydown",this.#d),this.listen(this.#i,"pop-over:hide",this.#A),this.listen(this.#i,"pop-over:show",this.#S),this.#a&&this.listen(document,"keydown",this.#b),!0}teardown(){this.#o&&clearTimeout(this.#o)}get items(){if(!this.#t)return[];let t=[];for(let i of this.#t.querySelectorAll(":scope > li")){if(i.matches('[role="separator"]')||i.querySelector("hr")){t.push({separator:!0});continue}let s=i.querySelector('button, a, [role="menuitem"]');s&&t.push({label:s.textContent.trim().replace(/\s+/g," "),value:s.getAttribute("data-value")||void 0,href:s.tagName==="A"?s.getAttribute("href"):void 0,disabled:s.disabled||s.hasAttribute("data-disabled")||void 0})}return t}set items(t){let i=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.disabled&&(a.tagName==="BUTTON"?a.disabled=!0:a.setAttribute("data-disabled","")),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("drop-down:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#l(){this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.closest('[role="separator"]')),this.#s.forEach(t=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.addEventListener("click",this.#g)}),this.#t.querySelectorAll('li:empty, [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")})}#c=t=>{t.stopPropagation(),this.toggle()};#f=()=>{this.#o&&(clearTimeout(this.#o),this.#o=null,this.setState("hover-grace-pending",!1)),this.open()};#m=()=>{this.setState("hover-grace-pending",!0),this.#o=setTimeout(()=>{this.setState("hover-grace-pending",!1),this.close()},100)};#h=()=>{this.#o&&(clearTimeout(this.#o),this.#o=null,this.setState("hover-grace-pending",!1)),this.open()};#u=t=>{this.#t?.contains(t.relatedTarget)||(this.setState("hover-grace-pending",!0),this.#o=setTimeout(()=>{this.setState("hover-grace-pending",!1),this.contains(document.activeElement)||this.close()},100))};#p=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#w(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#w(this.#s.length-1);break}};#d=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#w(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#w(this.#r-1);break;case"Home":t.preventDefault(),this.#w(0);break;case"End":t.preventDefault(),this.#w(this.#s.length-1);break;case"Tab":this.close();break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break}};#b=t=>{t.key==="Escape"&&this.#n&&(t.preventDefault(),this.close(),this.#e?.focus())};#g=t=>{t.defaultPrevented||(this.close(),this.#e?.focus())};#S=()=>{this.#n||(this.#n=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0})))};#A=()=>{this.#n&&(this.#n=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#w(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}open(){this.#n||!this.#i||this.#i.show()}close(){!this.#n||!this.#i||this.#i.hide()}toggle(){this.#n?this.close():this.open()}get isOpen(){return this.#n}};m("drop-down",pi);function Jr({basePath:e,set:t,name:i}){return`${e}/${t}/${i}.svg`}function Zr(e,t=document){let i=e.getAttribute("data-icon-set");if(i)return i;let s=e.closest("[data-icon-set]")?.getAttribute("data-icon-set");return s||t.documentElement.dataset.iconSet||"lucide"}function Qr(e=document){return e.documentElement.dataset.iconPath||"/cdn/icons"}function bi(e){let t=e.getAttribute("data-icon");if(!t){e.style.removeProperty("--vb-icon");return}let i=Jr({basePath:Qr(document),set:Zr(e,document),name:t});e.style.setProperty("--vb-icon",`url("${i}")`)}function mi(e=document){for(let t of e.querySelectorAll("[data-icon]"))bi(t)}var ta=!1;function kd(){if(ta)return;ta=!0,mi(),new MutationObserver(t=>{for(let i of t)if(i.type==="attributes"){let s=i.target;s.hasAttribute&&s.hasAttribute("data-icon")&&bi(s),i.attributeName==="data-icon-set"&&mi(s)}else for(let s of i.addedNodes){if(s.nodeType!==1)continue;let n=s;n.hasAttribute("data-icon")&&bi(n),mi(n)}}).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-icon","data-icon-set"]})}typeof document<"u"&&kd();var ea=`
19
19
  :host {
20
20
  display: inline-flex;
21
21
  align-items: center;
@@ -76,10 +76,10 @@ svg {
76
76
  :host([hidden]) {
77
77
  display: none;
78
78
  }
79
- `;var Tt=new Map,Lt=new Map,li=class e extends HTMLElement{static#e=new Set;static#t=null;static#i(){e.#t||(e.#t=new MutationObserver(t=>{for(let i of t)if(i.attributeName==="data-icon-set")for(let s of e.#e)s.hasAttribute("set")||(s.render(),s.loadIcon())}),e.#t?.observe(document.documentElement,{attributes:!0,attributeFilter:["data-icon-set"]}))}static get observedAttributes(){return["name","set","size","label"]}constructor(){super(),this.attachShadow({mode:"open"})}get name(){return this.getAttribute("name")||""}get set(){return this.getAttribute("set")||document.documentElement.dataset.iconSet||"lucide"}get size(){return this.getAttribute("size")||"md"}get label(){return this.getAttribute("label")}get basePath(){return this.getAttribute("base-path")||document.documentElement.dataset.iconPath||"/cdn/icons"}get iconPath(){return`${this.basePath}/${this.set}/${this.name}.svg`}render(){this.shadowRoot.innerHTML=`
80
- <style>${Hr}</style>
79
+ `;var Mt=new Map,Nt=new Map,gi=class e extends HTMLElement{static#e=new Set;static#t=null;static#i(){e.#t||(e.#t=new MutationObserver(t=>{for(let i of t)if(i.attributeName==="data-icon-set")for(let s of e.#e)s.hasAttribute("set")||(s.render(),s.loadIcon())}),e.#t?.observe(document.documentElement,{attributes:!0,attributeFilter:["data-icon-set"]}))}static get observedAttributes(){return["name","set","size","label"]}constructor(){super(),this.attachShadow({mode:"open"})}get name(){return this.getAttribute("name")||""}get set(){return this.getAttribute("set")||document.documentElement.dataset.iconSet||"lucide"}get size(){return this.getAttribute("size")||"md"}get label(){return this.getAttribute("label")}get basePath(){return this.getAttribute("base-path")||document.documentElement.dataset.iconPath||"/cdn/icons"}get iconPath(){return`${this.basePath}/${this.set}/${this.name}.svg`}render(){this.shadowRoot.innerHTML=`
80
+ <style>${ea}</style>
81
81
  <slot></slot>
82
- `}async loadIcon(){if(!this.name){this.setError("No icon name specified");return}let t=`${this.set}/${this.name}`;if(Tt.has(t)){this.displayIcon(Tt.get(t));return}try{let i=await this.#s(this.set,t);this.displayIcon(i)}catch(i){let s="lucide";if(this.set!==s){let n=`${s}/${this.name}`;if(Tt.has(n)){this.displayIcon(Tt.get(n));return}try{let r=await this.#s(s,n);this.displayIcon(r);return}catch{}}this.setError(i.message)}}async#s(t,i){return Lt.has(i)||Lt.set(i,this.#r(t).then(s=>(Tt.set(i,s),Lt.delete(i),s)).catch(s=>{throw Lt.delete(i),s})),Lt.get(i)}async#r(t){let i=`${this.basePath}/${t}/${this.name}.svg`,s=await fetch(i);if(!s.ok)throw new Error(`Icon not found: ${this.name}`);let n=await s.text();if(!n.includes("<svg"))throw new Error(`Invalid SVG: ${this.name}`);return n}displayIcon(t){let n=new DOMParser().parseFromString(t,"image/svg+xml").querySelector("svg");if(!n){this.setError("Invalid SVG content");return}n.removeAttribute("width"),n.removeAttribute("height"),this.label?(n.setAttribute("role","img"),n.setAttribute("aria-label",this.label)):n.setAttribute("aria-hidden","true"),this.removeAttribute("data-error");let r=this.shadowRoot?.querySelector("slot");r&&r.replaceWith(n)}setError(t){this.setAttribute("data-error","true"),console.warn(`icon-wc: ${t}`);let i=this.shadowRoot?.querySelector("slot");i&&(i.textContent="")}connectedCallback(){e.#e.add(this),e.#i(),this.render(),this.loadIcon(),this._onThemeChange=()=>{let t=this.shadowRoot?.querySelector("svg");t&&(t.style.stroke="none",requestAnimationFrame(()=>{t.style.stroke=""}))},window.addEventListener("vb:theme-change",this._onThemeChange),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded"),e.#e.delete(this),this._onThemeChange&&window.removeEventListener("vb:theme-change",this._onThemeChange)}attributeChangedCallback(t,i,s){if(i!==s&&this.isConnected){if(t==="name"||t==="set")this.render(),this.loadIcon();else if(t==="label"){let n=this.shadowRoot?.querySelector("svg");n&&(s?(n.setAttribute("role","img"),n.setAttribute("aria-label",s)):(n.removeAttribute("role"),n.setAttribute("aria-hidden","true")))}}}};b("icon-wc",li);Nt();var mi=class extends g{#e;#t=new WeakSet;setup(){this.#i(),this.#e=new MutationObserver(t=>{for(let i of t)i.type==="childList"&&this.#i()}),this.#e.observe(this,{childList:!0,subtree:!0})}teardown(){this.#e?.disconnect()}#i(){let i=(this.getAttribute("levels")||"h2,h3").split(",").map(n=>n.trim()).join(","),s=this.querySelectorAll(i);for(let n of s)this.#t.has(n)||(this.#s(n),this.#t.add(n))}#s(t){if(t.closest("dialog, [data-toc-ignore]")||t.hasAttribute("data-toc-ignore")||(t.id||(t.id=this.#r(t.textContent)),t.querySelector(".heading-anchor")))return;let i=document.createElement("a");i.className="heading-anchor",i.href=`#${t.id}`,i.setAttribute("aria-label",`Link to ${t.textContent.trim()}`),i.innerHTML='<icon-wc name="link" size="sm"></icon-wc>',i.addEventListener("click",s=>{s.preventDefault(),this.#n(t,i)}),t.appendChild(i),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1")}#r(t){let i=t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").substring(0,50),s=i,n=1;for(;document.getElementById(s);)s=`${i}-${n}`,n++;return s}async#n(t,i){let s=new URL(window.location.href);if(s.hash=t.id,window.history.pushState(null,"",s),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),await nt(s.href,{button:i,announceMessage:"Link copied to clipboard"})){let r=i.innerHTML;i.innerHTML='<icon-wc name="check" size="sm"></icon-wc>',i.classList.add("copied"),setTimeout(()=>{i.innerHTML=r,i.classList.remove("copied")},1500)}this.dispatchEvent(new CustomEvent("heading-links:navigate",{bubbles:!0,detail:{id:t.id,url:s.href}}))}};b("heading-links",mi);var bi=class extends g{#e;#t=[];#i=new Map;#s;#r;#n;#a=!1;setup(){requestAnimationFrame(()=>this.#c())}get entries(){return this.#t.map(t=>({id:t.id||void 0,text:t.textContent?.trim()||"",level:parseInt(t.tagName.slice(1),10)||0}))}teardown(){this.#e?.disconnect(),clearTimeout(this.#n)}#c(){this.#a=this.#o(),this.#a?this.#f():this.#w(),this.#g(),this.#h(),this.#l()}#o(){return this.querySelector("nav, details")!==null}#f(){this.#r=this.querySelector("details");let t=this.querySelectorAll('a[href^="#"]');for(let i of t){let s=i.getAttribute("href");if(!s)continue;let n=s.slice(1);if(n){let r=document.getElementById(n);r&&(this.#t.push(r),this.#i.set(n,i),i.classList.contains("link")||i.classList.add("link"),i.addEventListener("click",a=>{a.preventDefault(),this.#b(r)}))}}}#h(){this.#s=window.matchMedia("(min-width: 64rem)"),this.listen(this.#s,"change",this.#p),this.listen(window,"resize",this.#u)}#p=t=>{t.matches&&this.#r&&(this.#r.open=!0)};#u=()=>{clearTimeout(this.#n),this.#n=setTimeout(()=>this.#d(),150)};#l(){this.listen(window,"hashchange",this.#m),this.#d()}#m=()=>{this.#d()};#d(){let t=window.location.hash.slice(1);t&&this.#i.has(t)&&this.#y(t)}#y(t){for(let s of this.#i.values())s.classList.remove("active"),s.removeAttribute("aria-current");let i=this.#i.get(t);i&&(i.classList.add("active"),i.setAttribute("aria-current","true"))}#w(){let t=(this.getAttribute("levels")||"h2,h3").split(",").map(l=>l.trim().toLowerCase()),i=this.getAttribute("scope")||"main",s=this.getAttribute("title")||"On this page",n=document.querySelector(i);if(!n||(this.#t=Array.from(n.querySelectorAll(t.join(","))).filter(l=>l.id).filter(l=>!l.hasAttribute("data-toc-ignore")&&!l.closest("[data-toc-ignore]")),this.#t.length===0))return;let r={depth:-1,children:[]},a=[r];for(let l of this.#t){let u=t.indexOf(l.tagName.toLowerCase());for(;a[a.length-1].depth>=u;)a.pop();let h={heading:l,depth:u,children:[]};a[a.length-1].children.push(h),a.push(h)}let o=l=>{let u=document.createElement("ul");u.className="list";for(let h of l){let f=document.createElement("li");f.className="item",f.dataset.level=String(h.depth);let v=document.createElement("a");v.href=`#${h.heading.id}`,v.className="link",v.textContent=this.#v(h.heading),v.addEventListener("click",p=>{p.preventDefault(),this.#b(h.heading)}),f.appendChild(v),h.children.length&&f.appendChild(o(h.children)),u.appendChild(f),this.#i.set(h.heading.id,v)}return u};this.#r=document.createElement("details"),this.#r.className="details",this.#r.open=!0;let c=document.createElement("summary");c.className="summary",c.textContent=s,this.#r.appendChild(c);let d=document.createElement("nav");d.className="nav",d.setAttribute("aria-label",s),d.appendChild(o(r.children)),this.#r.appendChild(d),this.appendChild(this.#r)}#v(t){let i=t.cloneNode(!0);return i.querySelectorAll(".heading-anchor").forEach(n=>n.remove()),i.textContent.trim()}#b(t){let i=new URL(window.location.href);i.hash=t.id,window.history.pushState(null,"",i),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:t.id}}))}#g(){if(this.#t.length===0)return;let t=new Set;this.#e=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting?t.add(s.target.id):t.delete(s.target.id);this.#C(t)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let i of this.#t)this.#e.observe(i)}#C(t){for(let i of this.#t)if(t.has(i.id)){this.#y(i.id);return}this.#d()}refresh(){this.#a||(this.innerHTML=""),this.#i.clear(),this.#t=[],this.#e?.disconnect(),this.#c()}};b("page-toc",bi);function re({newItems:e,nodes:t,keyOf:i,renderItem:s,containerFor:n}){let r=[],a=[],o=[],c=new Set;for(let l of e)c.add(i(l));for(let[l,u]of[...t])c.has(l)||(u.remove(),t.delete(l),o.push(l));let d=new Map;for(let l of e){let u=i(l),h=t.get(u)||null,f=n(l,h);d.has(f)||d.set(f,[]),d.get(f)?.push({item:l,key:u,existing:h})}for(let[l,u]of d)for(let h=0;h<u.length;h++){let{item:f,key:v,existing:p}=u[h],m=p;m?(m.parentElement!==l||l.children[h]!==m)&&a.push(v):(m=s(f),t.set(v,m),r.push(v));let y=l.children[h];y!==m&&l.insertBefore(m,y||null)}return{added:r,moved:a,removed:o}}var gi=class e extends g{#e;#t;#i=[];#s=[];#r=[];#n=-1;#a=null;#c=1;#o=0;#f=null;#h=null;#p=null;#u="";#l=null;#m=null;#d=[];#y=new Map;#w=[];setup(){return this.#e=this.querySelector(":scope > table"),!this.#e||(this.#t=this.#e.querySelector("tbody"),!this.#t)?!1:(this.#v(),!0)}teardown(){this.#k(),this.#i=[],this.#s=[],this.#r=[]}#v(){this.#s=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#r=[...this.#s],this.#w=[...this.#e.tHead?.rows[0]?.cells||[]].map(i=>({key:i.getAttribute("data-key")||i.textContent.trim().toLowerCase(),label:i.textContent.trim(),sort:i.getAttribute("data-sort")||void 0})),this.#y.clear(),this.#d=[];for(let i of this.#s){let s=i.getAttribute("data-id")||i.getAttribute("data-key");s&&(this.#y.set(s,i),this.#d.push({id:s}))}this.#N(),this.#L(),this.#q(),this.#I(),this.#e.hasAttribute("data-filterable")&&this.#M();let t=this.#e.getAttribute("data-paginate");t&&(this.#o=parseInt(t,10),this.#o>0&&this.#P()),this.#V(),this.#D(),this.#K()}get rows(){return this.#d}set rows(t){let i=t||[],s=re({newItems:i,nodes:this.#y,keyOf:n=>n.id,renderItem:n=>this._renderRow(n),containerFor:()=>this.#t});this.#d=i,this.#s=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#L(),this.#q(),this.#F(this.#u),this.dispatchEvent(new CustomEvent("data-table:rows-changed",{detail:{rows:i,added:s.added,moved:s.moved,removed:s.removed,source:"api"},bubbles:!0}))}get columns(){return this.#w}_renderRow(t){let i=this;if(typeof i.renderRow=="function"){let n=i.renderRow(t,this.#w);if(!(n instanceof Element))throw new Error("data-table: renderRow must return an Element");return n.hasAttribute("data-id")||n.setAttribute("data-id",String(t.id)),n}let s=document.createElement("tr");s.setAttribute("data-id",String(t.id));for(let n of this.#w){let r=document.createElement("td"),a=t[n.key];r.textContent=a==null?"":String(a),s.appendChild(r)}return s}#b=[];#g=[];#C=[];#N(){let t=[...this.#e.tHead?.rows[0]?.cells||[]];this.#b=t.map(i=>{let s=parseFloat(i.getAttribute("data-weight"));return Number.isFinite(s)?s:null}),this.#g=t.map(i=>i.getAttribute("data-rollup")||null),this.#C=t.map(i=>i.getAttribute("data-heatmap")||null)}#L(){if(this.#g.some(Boolean))for(let t=0;t<this.#g.length;t++){let i=this.#g[t];if(i)for(let s of this.#s){let n=s.children[t];if(!n)continue;let r=this.#S(s,t,i),a=e.#B(r);n.textContent=a,n.setAttribute("data-rollup-value",String(r)),n.hasAttribute("data-sort-value")||n.setAttribute("data-sort-value",String(r))}}}#S(t,i,s){let n=[...t.children],r=0,a=0,o=-1/0,c=0,d=1,l=!1;for(let u=0;u<n.length;u++){if(u===i||this.#g[u])continue;let h=n[u].getAttribute("data-sort-value")??n[u].textContent??"",f=parseFloat(h);if(!Number.isFinite(f))continue;r+=f,a++,f>o&&(o=f),d*=f,l=!0;let v=this.#b[u];v!==null&&(c+=f*v)}switch(s){case"sum":return r;case"avg":return a?r/a:0;case"max":return o===-1/0?0:o;case"weighted-sum":return c;case"product":return l?d:0;default:return r}}static#B(t){return Number.isFinite(t)?Number.isInteger(t)?String(t):(Math.round(t*100)/100).toString():""}#q(){if(this.#C.some(Boolean))for(let t=0;t<this.#C.length;t++){let i=this.#C[t];if(!i)continue;let s=this.#s.map(c=>{let d=c.children[t];if(!d)return null;let l=d.getAttribute("data-rollup-value")??d.getAttribute("data-sort-value")??d.textContent??"",u=parseFloat(l);return Number.isFinite(u)?u:null}),n=s.filter(c=>c!==null);if(!n.length)continue;let r=Math.min(...n),o=Math.max(...n)-r||1;for(let c=0;c<this.#s.length;c++){let d=this.#s[c].children[t];if(!d)continue;let l=s[c];if(l===null){d.removeAttribute("data-heat-level");continue}let u=(l-r)/o;i==="low-good"&&(u=1-u);let h=u<.34?"low":u<.67?"mid":"high";d.setAttribute("data-heat-level",h)}}}#k(){this.#p&&clearTimeout(this.#p),this.#f?.parentElement?.remove(),this.#h?.remove()}#I(){this.#e.querySelectorAll("thead th[data-sort]").forEach((i,s)=>{let n=i.getAttribute("data-sort"),r=this.#$(i);this.#i.push({th:i,sortType:n,columnIndex:r}),i.setAttribute("tabindex","0"),i.setAttribute("role","columnheader"),i.setAttribute("aria-sort","none"),i.dataset.columnIndex=r,this.listen(i,"click",this.#R),this.listen(i,"keydown",this.#T)})}#$(t){return[...t.parentElement.children].indexOf(t)}#R=t=>{let i=t.currentTarget,s=parseInt(i.dataset.columnIndex,10);this.#E(s)};#T=t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();let i=t.currentTarget,s=parseInt(i.dataset.columnIndex,10);this.#E(s)}};#_(t,i,s){let n=this.#r;if(n.length<2)return!0;let r=s==="asc"?1:-1;for(let a=1;a<n.length;a++){let o=this.#A(n[a-1].children[t],i),c=this.#A(n[a].children[t],i);if((typeof o=="string"?o.localeCompare(c)*r:(o-c)*r)>0)return!1}return!0}#E(t){let i=this.#i.find(n=>n.columnIndex===t);if(!i)return;let s;this.#n===t?s=this.#a==="asc"?"desc":"asc":this.#_(t,i.sortType,"asc")?s="desc":s="asc",this.#i.forEach(({th:n})=>{n.setAttribute("aria-sort","none")}),i.th.setAttribute("aria-sort",s==="asc"?"ascending":"descending"),this.#n=t,this.#a=s,this.#x(t,s,i.sortType),this.#c=1,this.#K(),this.dispatchEvent(new CustomEvent("data-table:sort",{detail:{column:t,direction:s,columnName:i.th.textContent.trim()},bubbles:!0}))}#x(t,i,s){let n=i==="asc"?1:-1;this.#r.sort((r,a)=>{let o=r.children[t],c=a.children[t];if(!o||!c)return 0;let d=this.#A(o,s),l=this.#A(c,s),u=0;switch(s){case"number":u=d-l;break;case"date":u=d-l;break;default:u=d.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"});break}return u*n})}#A(t,i){let n=t.getAttribute("data-sort-value")??t.textContent.trim();switch(i){case"number":return parseFloat(n)||0;case"date":return new Date(n).getTime()||0;default:return n.toLowerCase()}}#M(){let t=document.createElement("div");t.setAttribute("data-table-filter","");let i=document.createElement("input");i.type="search",i.setAttribute("data-filter-input",""),i.setAttribute("placeholder","Filter table..."),i.setAttribute("aria-label","Filter table rows"),t.appendChild(i),this.insertBefore(t,this.#e),this.#f=i,this.listen(i,"input",this.#H)}#H=t=>{let i=t.target.value;this.#p&&clearTimeout(this.#p),this.#p=setTimeout(()=>{this.#F(i)},150)};#F(t){if(this.#u=t.toLowerCase().trim(),this.#u===""?this.#r=[...this.#s]:this.#r=this.#s.filter(i=>[...i.children].some(n=>(n.getAttribute("data-filter-value")??n.textContent).toLowerCase().includes(this.#u))),this.#n>=0&&this.#a){let i=this.#i.find(s=>s.columnIndex===this.#n);i&&this.#x(this.#n,this.#a,i.sortType)}this.#c=1,this.#K(),this.dispatchEvent(new CustomEvent("data-table:filter",{detail:{query:this.#u,count:this.#r.length},bubbles:!0}))}#P(){let t=document.createElement("nav");t.setAttribute("data-pagination",""),t.setAttribute("aria-label","Table pagination"),this.appendChild(t),this.#h=t}#V(){this.listen(this.#e,"click",this.#O)}#O=t=>{let i=t.target.closest('[data-action="toggle-expand"]');if(!i)return;let s=i.closest("tr[data-expandable]");if(!s)return;let n=s.hasAttribute("data-state-expanded"),r=s.nextElementSibling;n?(s.removeAttribute("data-state-expanded"),i.setAttribute("aria-expanded","false"),r?.hasAttribute("data-expand-content")&&(r.hidden=!0,r.setAttribute("aria-hidden","true"))):(s.setAttribute("data-state-expanded",""),i.setAttribute("aria-expanded","true"),r?.hasAttribute("data-expand-content")&&(r.hidden=!1,r.removeAttribute("aria-hidden"))),this.dispatchEvent(new CustomEvent("data-table:expand",{detail:{row:s,expanded:!n},bubbles:!0}))};#D(){this.#l=this.#e.querySelector('thead [data-action="select-all"]'),this.#l&&this.listen(this.#l,"change",this.#z),this.listen(this.#t,"change",this.#W),this.#m=this.querySelector("[data-selected-count]"),this.#Y()}#z=t=>{let i=t.target.checked;this.#t.querySelectorAll("tr[data-selectable]").forEach(n=>{let r=n.querySelector('[data-action="select-row"]');i?(n.setAttribute("data-state-selected",""),r&&(r.checked=!0)):(n.removeAttribute("data-state-selected"),r&&(r.checked=!1))}),t.target.indeterminate=!1,this.#U(),this.#G()};#W=t=>{let i=t.target.closest('[data-action="select-row"]');if(!i)return;let s=i.closest("tr[data-selectable]");s&&(i.checked?s.setAttribute("data-state-selected",""):s.removeAttribute("data-state-selected"),this.#Y(),this.#G())};#Y(){if(!this.#l){this.#U();return}let t=this.#t.querySelectorAll("tr[data-selectable]"),i=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]"),s=t.length,n=i.length;n===0?(this.#l.checked=!1,this.#l.indeterminate=!1):n===s?(this.#l.checked=!0,this.#l.indeterminate=!1):(this.#l.checked=!1,this.#l.indeterminate=!0),this.#U()}#U(){let i=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]").length;this.#m&&(this.#m.textContent=i)}#G(){let t=[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")];this.dispatchEvent(new CustomEvent("data-table:selection",{detail:{count:t.length,rows:t},bubbles:!0}))}#j(){if(!this.#h||this.#o<=0)return;let t=this.#h,i=Math.ceil(this.#r.length/this.#o);if(t.innerHTML="",i<=1)return;let s=document.createElement("button");s.type="button",s.textContent="Previous",s.setAttribute("data-pagination-prev",""),s.disabled=this.#c===1,s.addEventListener("click",()=>this.goToPage(this.#c-1)),t.appendChild(s),this.#X(i).forEach(a=>{if(a==="..."){let o=document.createElement("span");o.textContent="...",o.setAttribute("data-pagination-ellipsis",""),t.appendChild(o)}else{let o=document.createElement("button");o.type="button",o.textContent=a,o.setAttribute("data-pagination-page",""),a===this.#c&&(o.setAttribute("aria-current","page"),o.setAttribute("data-current","")),o.addEventListener("click",()=>this.goToPage(a)),t.appendChild(o)}});let r=document.createElement("button");r.type="button",r.textContent="Next",r.setAttribute("data-pagination-next",""),r.disabled=this.#c===i,r.addEventListener("click",()=>this.goToPage(this.#c+1)),t.appendChild(r)}#X(t){let i=this.#c,s=[];if(t<=7)for(let n=1;n<=t;n++)s.push(n);else{s.push(1),i>3&&s.push("...");let n=Math.max(2,i-1),r=Math.min(t-1,i+1);for(let a=n;a<=r;a++)s.push(a);i<t-2&&s.push("..."),s.push(t)}return s}#K(){this.#s.forEach(i=>{i.setAttribute("data-state-hidden","")});let t;if(this.#o>0){let i=(this.#c-1)*this.#o,s=i+this.#o;t=this.#r.slice(i,s)}else t=this.#r;t.forEach(i=>{i.removeAttribute("data-state-hidden"),this.#t.appendChild(i);let s=i.nextElementSibling?.hasAttribute?.("data-expand-content")?i.nextElementSibling:this.#J(i);s&&this.#t.appendChild(s)}),this.#r.forEach(i=>{if(i.hasAttribute("data-state-hidden")){this.#t.appendChild(i);let s=this.#J(i);s&&this.#t.appendChild(s)}}),this.#s.forEach(i=>{if(!this.#r.includes(i)){this.#t.appendChild(i);let s=this.#J(i);s&&this.#t.appendChild(s)}}),this.#j()}#J(t){if(!t.hasAttribute("data-expandable"))return null;let i=t.nextElementSibling;return i?.hasAttribute("data-expand-content")?i:null}goToPage(t){let i=Math.ceil(this.#r.length/this.#o),s=Math.max(1,Math.min(t,i));s!==this.#c&&(this.#c=s,this.#K(),this.dispatchEvent(new CustomEvent("data-table:page",{detail:{page:this.#c},bubbles:!0})))}setFilter(t){this.#f&&(this.#f.value=t),this.#F(t)}refresh(){if(this.#s=[...this.#t.querySelectorAll(":scope > tr")],this.#u?this.#F(this.#u):this.#r=[...this.#s],this.#n>=0&&this.#a){let i=this.#i.find(s=>s.columnIndex===this.#n);i&&this.#x(this.#n,this.#a,i.sortType)}let t=Math.max(1,Math.ceil(this.#r.length/this.#o));this.#c>t&&(this.#c=t),this.#K()}get currentPage(){return this.#c}get totalPages(){return this.#o<=0?1:Math.ceil(this.#r.length/this.#o)}get filteredCount(){return this.#r.length}get totalCount(){return this.#s.length}getSelectedRows(){return this.#t?[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")]:[]}};b("data-table",gi);oe();var vi=class e extends g{static#e=150;static#t=8;#i=null;#s=null;#r=null;#n=null;#a=[];#c=-1;#o=!1;#f=null;#h=null;#p=null;setup(){this.#u(),this.#l()}teardown(){this.#o&&(document.body.style.overflow="",this.removeAttribute("open"),this.#o=!1),this.#p?.(),this.#B(),this.#s?.remove(),this.#s=null}get value(){return this.#r?.value??""}set value(t){if(!this.#r)return;let i=t==null?"":String(t);this.#r.value!==i&&(this.#r.value=i,this.#r.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new CustomEvent("site-search:change",{detail:{value:i,source:"api"},bubbles:!0})))}get results(){return[...this.#a]}#u(){this.#i=this.querySelector(":scope > [data-trigger]"),this.#i||(this.#i=this.querySelector(":scope > button")),this.#i||(this.#i=document.createElement("button"),this.#i.setAttribute("data-trigger",""),this.#i.innerHTML=`
82
+ `}async loadIcon(){if(!this.name){this.setError("No icon name specified");return}let t=`${this.set}/${this.name}`;if(Mt.has(t)){this.displayIcon(Mt.get(t));return}try{let i=await this.#s(this.set,t);this.displayIcon(i)}catch(i){let s="lucide";if(this.set!==s){let n=`${s}/${this.name}`;if(Mt.has(n)){this.displayIcon(Mt.get(n));return}try{let r=await this.#s(s,n);this.displayIcon(r);return}catch{}}this.setError(i.message)}}async#s(t,i){return Nt.has(i)||Nt.set(i,this.#r(t).then(s=>(Mt.set(i,s),Nt.delete(i),s)).catch(s=>{throw Nt.delete(i),s})),Nt.get(i)}async#r(t){let i=`${this.basePath}/${t}/${this.name}.svg`,s=await fetch(i);if(!s.ok)throw new Error(`Icon not found: ${this.name}`);let n=await s.text();if(!n.includes("<svg"))throw new Error(`Invalid SVG: ${this.name}`);return n}displayIcon(t){let n=new DOMParser().parseFromString(t,"image/svg+xml").querySelector("svg");if(!n){this.setError("Invalid SVG content");return}n.removeAttribute("width"),n.removeAttribute("height"),this.label?(n.setAttribute("role","img"),n.setAttribute("aria-label",this.label)):n.setAttribute("aria-hidden","true"),this.removeAttribute("data-error");let r=this.shadowRoot?.querySelector("slot");r&&r.replaceWith(n)}setError(t){this.setAttribute("data-error","true"),console.warn(`icon-wc: ${t}`);let i=this.shadowRoot?.querySelector("slot");i&&(i.textContent="")}connectedCallback(){e.#e.add(this),e.#i(),this.render(),this.loadIcon(),this._onThemeChange=()=>{let t=this.shadowRoot?.querySelector("svg");t&&(t.style.stroke="none",requestAnimationFrame(()=>{t.style.stroke=""}))},window.addEventListener("vb:theme-change",this._onThemeChange),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded"),e.#e.delete(this),this._onThemeChange&&window.removeEventListener("vb:theme-change",this._onThemeChange)}attributeChangedCallback(t,i,s){if(i!==s&&this.isConnected){if(t==="name"||t==="set")this.render(),this.loadIcon();else if(t==="label"){let n=this.shadowRoot?.querySelector("svg");n&&(s?(n.setAttribute("role","img"),n.setAttribute("aria-label",s)):(n.removeAttribute("role"),n.setAttribute("aria-hidden","true")))}}}};m("icon-wc",gi);_t();var Si=class extends b{#e;#t=new WeakSet;setup(){this.#i(),this.#e=new MutationObserver(t=>{for(let i of t)i.type==="childList"&&this.#i()}),this.#e.observe(this,{childList:!0,subtree:!0})}teardown(){this.#e?.disconnect()}#i(){let i=(this.getAttribute("levels")||"h2,h3").split(",").map(n=>n.trim()).join(","),s=this.querySelectorAll(i);for(let n of s)this.#t.has(n)||(this.#s(n),this.#t.add(n))}#s(t){if(t.closest("dialog, [data-toc-ignore]")||t.hasAttribute("data-toc-ignore")||(t.id||(t.id=this.#r(t.textContent)),t.querySelector(".heading-anchor")))return;let i=document.createElement("a");i.className="heading-anchor",i.href=`#${t.id}`,i.setAttribute("aria-label",`Link to ${t.textContent.trim()}`),i.innerHTML='<icon-wc name="link" size="sm"></icon-wc>',i.addEventListener("click",s=>{s.preventDefault(),this.#n(t,i)}),t.appendChild(i),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1")}#r(t){let i=t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").substring(0,50),s=i,n=1;for(;document.getElementById(s);)s=`${i}-${n}`,n++;return s}async#n(t,i){let s=new URL(window.location.href);if(s.hash=t.id,window.history.pushState(null,"",s),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),await rt(s.href,{button:i,announceMessage:"Link copied to clipboard"})){let r=i.innerHTML;i.innerHTML='<icon-wc name="check" size="sm"></icon-wc>',i.classList.add("copied"),setTimeout(()=>{i.innerHTML=r,i.classList.remove("copied")},1500)}this.dispatchEvent(new CustomEvent("heading-links:navigate",{bubbles:!0,detail:{id:t.id,url:s.href}}))}};m("heading-links",Si);var xi=class extends b{#e;#t=[];#i=new Map;#s;#r;#n;#a=!1;setup(){requestAnimationFrame(()=>this.#o())}get entries(){return this.#t.map(t=>({id:t.id||void 0,text:t.textContent?.trim()||"",level:parseInt(t.tagName.slice(1),10)||0}))}teardown(){this.#e?.disconnect(),clearTimeout(this.#n)}#o(){this.#a=this.#l(),this.#a?this.#c():this.#g(),this.#w(),this.#f(),this.#u()}#l(){return this.querySelector("nav, details")!==null}#c(){this.#r=this.querySelector("details");let t=this.querySelectorAll('a[href^="#"]');for(let i of t){let s=i.getAttribute("href");if(!s)continue;let n=s.slice(1);if(n){let r=document.getElementById(n);r&&(this.#t.push(r),this.#i.set(n,i),i.classList.contains("link")||i.classList.add("link"),i.addEventListener("click",a=>{a.preventDefault(),this.#A(r)}))}}}#f(){this.#s=window.matchMedia("(min-width: 64rem)"),this.listen(this.#s,"change",this.#m),this.listen(window,"resize",this.#h)}#m=t=>{t.matches&&this.#r&&(this.#r.open=!0)};#h=()=>{clearTimeout(this.#n),this.#n=setTimeout(()=>this.#d(),150)};#u(){this.listen(window,"hashchange",this.#p),this.#d()}#p=()=>{this.#d()};#d(){let t=window.location.hash.slice(1);t&&this.#i.has(t)&&this.#b(t)}#b(t){for(let s of this.#i.values())s.classList.remove("active"),s.removeAttribute("aria-current");let i=this.#i.get(t);i&&(i.classList.add("active"),i.setAttribute("aria-current","true"))}#g(){let t=(this.getAttribute("levels")||"h2,h3").split(",").map(d=>d.trim().toLowerCase()),i=this.getAttribute("scope")||"main",s=this.getAttribute("title")||"On this page",n=document.querySelector(i);if(!n||(this.#t=Array.from(n.querySelectorAll(t.join(","))).filter(d=>d.id).filter(d=>!d.hasAttribute("data-toc-ignore")&&!d.closest("[data-toc-ignore]")),this.#t.length===0))return;let r={depth:-1,children:[]},a=[r];for(let d of this.#t){let u=t.indexOf(d.tagName.toLowerCase());for(;a[a.length-1].depth>=u;)a.pop();let h={heading:d,depth:u,children:[]};a[a.length-1].children.push(h),a.push(h)}let o=d=>{let u=document.createElement("ul");u.className="list";for(let h of d){let f=document.createElement("li");f.className="item",f.dataset.level=String(h.depth);let g=document.createElement("a");g.href=`#${h.heading.id}`,g.className="link",g.textContent=this.#S(h.heading),g.addEventListener("click",p=>{p.preventDefault(),this.#A(h.heading)}),f.appendChild(g),h.children.length&&f.appendChild(o(h.children)),u.appendChild(f),this.#i.set(h.heading.id,g)}return u};this.#r=document.createElement("details"),this.#r.className="details",this.#r.open=!0;let c=document.createElement("summary");c.className="summary",c.textContent=s,this.#r.appendChild(c);let l=document.createElement("nav");l.className="nav",l.setAttribute("aria-label",s),l.appendChild(o(r.children)),this.#r.appendChild(l),this.appendChild(this.#r)}#S(t){let i=t.cloneNode(!0);return i.querySelectorAll(".heading-anchor").forEach(n=>n.remove()),i.textContent.trim()}#A(t){let i=new URL(window.location.href);i.hash=t.id,window.history.pushState(null,"",i),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:t.id}}))}#w(){if(this.#t.length===0)return;let t=new Set;this.#e=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting?t.add(s.target.id):t.delete(s.target.id);this.#v(t)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let i of this.#t)this.#e.observe(i)}#v(t){for(let i of this.#t)if(t.has(i.id)){this.#b(i.id);return}this.#d()}refresh(){this.#a||(this.innerHTML=""),this.#i.clear(),this.#t=[],this.#e?.disconnect(),this.#o()}};m("page-toc",xi);function le({newItems:e,nodes:t,keyOf:i,renderItem:s,containerFor:n}){let r=[],a=[],o=[],c=new Set;for(let d of e)c.add(i(d));for(let[d,u]of[...t])c.has(d)||(u.remove(),t.delete(d),o.push(d));let l=new Map;for(let d of e){let u=i(d),h=t.get(u)||null,f=n(d,h);l.has(f)||l.set(f,[]),l.get(f)?.push({item:d,key:u,existing:h})}for(let[d,u]of l)for(let h=0;h<u.length;h++){let{item:f,key:g,existing:p}=u[h],v=p;v?(v.parentElement!==d||d.children[h]!==v)&&a.push(g):(v=s(f),t.set(g,v),r.push(g));let w=d.children[h];w!==v&&d.insertBefore(v,w||null)}return{added:r,moved:a,removed:o}}var Ci=class e extends b{#e;#t;#i=[];#s=[];#r=[];#n=-1;#a=null;#o=1;#l=0;#c=null;#f=null;#m=null;#h="";#u=null;#p=null;#d=[];#b=new Map;#g=[];setup(){return this.#e=this.querySelector(":scope > table"),!this.#e||(this.#t=this.#e.querySelector("tbody"),!this.#t)?!1:(this.#S(),!0)}teardown(){this.#_(),this.#i=[],this.#s=[],this.#r=[]}#S(){this.#s=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#r=[...this.#s],this.#g=[...this.#e.tHead?.rows[0]?.cells||[]].map(i=>({key:i.getAttribute("data-key")||i.textContent.trim().toLowerCase(),label:i.textContent.trim(),sort:i.getAttribute("data-sort")||void 0})),this.#b.clear(),this.#d=[];for(let i of this.#s){let s=i.getAttribute("data-id")||i.getAttribute("data-key");s&&(this.#b.set(s,i),this.#d.push({id:s}))}this.#E(),this.#y(),this.#N(),this.#B(),this.#e.hasAttribute("data-filterable")&&this.#q();let t=this.#e.getAttribute("data-paginate");t&&(this.#l=parseInt(t,10),this.#l>0&&this.#x()),this.#R(),this.#F(),this.#j()}get rows(){return this.#d}set rows(t){let i=t||[],s=le({newItems:i,nodes:this.#b,keyOf:n=>n.id,renderItem:n=>this._renderRow(n),containerFor:()=>this.#t});this.#d=i,this.#s=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#y(),this.#N(),this.#M(this.#h),this.dispatchEvent(new CustomEvent("data-table:rows-changed",{detail:{rows:i,added:s.added,moved:s.moved,removed:s.removed,source:"api"},bubbles:!0}))}get columns(){return this.#g}_renderRow(t){let i=this;if(typeof i.renderRow=="function"){let n=i.renderRow(t,this.#g);if(!(n instanceof Element))throw new Error("data-table: renderRow must return an Element");return n.hasAttribute("data-id")||n.setAttribute("data-id",String(t.id)),n}let s=document.createElement("tr");s.setAttribute("data-id",String(t.id));for(let n of this.#g){let r=document.createElement("td"),a=t[n.key];r.textContent=a==null?"":String(a),s.appendChild(r)}return s}#A=[];#w=[];#v=[];#E(){let t=[...this.#e.tHead?.rows[0]?.cells||[]];this.#A=t.map(i=>{let s=parseFloat(i.getAttribute("data-weight"));return Number.isFinite(s)?s:null}),this.#w=t.map(i=>i.getAttribute("data-rollup")||null),this.#v=t.map(i=>i.getAttribute("data-heatmap")||null)}#y(){if(this.#w.some(Boolean))for(let t=0;t<this.#w.length;t++){let i=this.#w[t];if(i)for(let s of this.#s){let n=s.children[t];if(!n)continue;let r=this.#k(s,t,i),a=e.#O(r);n.textContent=a,n.setAttribute("data-rollup-value",String(r)),n.hasAttribute("data-sort-value")||n.setAttribute("data-sort-value",String(r))}}}#k(t,i,s){let n=[...t.children],r=0,a=0,o=-1/0,c=0,l=1,d=!1;for(let u=0;u<n.length;u++){if(u===i||this.#w[u])continue;let h=n[u].getAttribute("data-sort-value")??n[u].textContent??"",f=parseFloat(h);if(!Number.isFinite(f))continue;r+=f,a++,f>o&&(o=f),l*=f,d=!0;let g=this.#A[u];g!==null&&(c+=f*g)}switch(s){case"sum":return r;case"avg":return a?r/a:0;case"max":return o===-1/0?0:o;case"weighted-sum":return c;case"product":return d?l:0;default:return r}}static#O(t){return Number.isFinite(t)?Number.isInteger(t)?String(t):(Math.round(t*100)/100).toString():""}#N(){if(this.#v.some(Boolean))for(let t=0;t<this.#v.length;t++){let i=this.#v[t];if(!i)continue;let s=this.#s.map(c=>{let l=c.children[t];if(!l)return null;let d=l.getAttribute("data-rollup-value")??l.getAttribute("data-sort-value")??l.textContent??"",u=parseFloat(d);return Number.isFinite(u)?u:null}),n=s.filter(c=>c!==null);if(!n.length)continue;let r=Math.min(...n),o=Math.max(...n)-r||1;for(let c=0;c<this.#s.length;c++){let l=this.#s[c].children[t];if(!l)continue;let d=s[c];if(d===null){l.removeAttribute("data-heat-level");continue}let u=(d-r)/o;i==="low-good"&&(u=1-u);let h=u<.34?"low":u<.67?"mid":"high";l.setAttribute("data-heat-level",h)}}}#_(){this.#m&&clearTimeout(this.#m),this.#c?.parentElement?.remove(),this.#f?.remove()}#B(){this.#e.querySelectorAll("thead th[data-sort]").forEach((i,s)=>{let n=i.getAttribute("data-sort"),r=this.#P(i);this.#i.push({th:i,sortType:n,columnIndex:r}),i.setAttribute("tabindex","0"),i.setAttribute("role","columnheader"),i.setAttribute("aria-sort","none"),i.dataset.columnIndex=r,this.listen(i,"click",this.#D),this.listen(i,"keydown",this.#L)})}#P(t){return[...t.parentElement.children].indexOf(t)}#D=t=>{let i=t.currentTarget,s=parseInt(i.dataset.columnIndex,10);this.#I(s)};#L=t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();let i=t.currentTarget,s=parseInt(i.dataset.columnIndex,10);this.#I(s)}};#$(t,i,s){let n=this.#r;if(n.length<2)return!0;let r=s==="asc"?1:-1;for(let a=1;a<n.length;a++){let o=this.#T(n[a-1].children[t],i),c=this.#T(n[a].children[t],i);if((typeof o=="string"?o.localeCompare(c)*r:(o-c)*r)>0)return!1}return!0}#I(t){let i=this.#i.find(n=>n.columnIndex===t);if(!i)return;let s;this.#n===t?s=this.#a==="asc"?"desc":"asc":this.#$(t,i.sortType,"asc")?s="desc":s="asc",this.#i.forEach(({th:n})=>{n.setAttribute("aria-sort","none")}),i.th.setAttribute("aria-sort",s==="asc"?"ascending":"descending"),this.#n=t,this.#a=s,this.#C(t,s,i.sortType),this.#o=1,this.#j(),this.dispatchEvent(new CustomEvent("data-table:sort",{detail:{column:t,direction:s,columnName:i.th.textContent.trim()},bubbles:!0}))}#C(t,i,s){let n=i==="asc"?1:-1;this.#r.sort((r,a)=>{let o=r.children[t],c=a.children[t];if(!o||!c)return 0;let l=this.#T(o,s),d=this.#T(c,s),u=0;switch(s){case"number":u=l-d;break;case"date":u=l-d;break;default:u=l.localeCompare(d,void 0,{numeric:!0,sensitivity:"base"});break}return u*n})}#T(t,i){let n=t.getAttribute("data-sort-value")??t.textContent.trim();switch(i){case"number":return parseFloat(n)||0;case"date":return new Date(n).getTime()||0;default:return n.toLowerCase()}}#q(){let t=document.createElement("div");t.setAttribute("data-table-filter","");let i=document.createElement("input");i.type="search",i.setAttribute("data-filter-input",""),i.setAttribute("placeholder","Filter table..."),i.setAttribute("aria-label","Filter table rows"),t.appendChild(i),this.insertBefore(t,this.#e),this.#c=i,this.listen(i,"input",this.#H)}#H=t=>{let i=t.target.value;this.#m&&clearTimeout(this.#m),this.#m=setTimeout(()=>{this.#M(i)},150)};#M(t){if(this.#h=t.toLowerCase().trim(),this.#h===""?this.#r=[...this.#s]:this.#r=this.#s.filter(i=>[...i.children].some(n=>(n.getAttribute("data-filter-value")??n.textContent).toLowerCase().includes(this.#h))),this.#n>=0&&this.#a){let i=this.#i.find(s=>s.columnIndex===this.#n);i&&this.#C(this.#n,this.#a,i.sortType)}this.#o=1,this.#j(),this.dispatchEvent(new CustomEvent("data-table:filter",{detail:{query:this.#h,count:this.#r.length},bubbles:!0}))}#x(){let t=document.createElement("nav");t.setAttribute("data-pagination",""),t.setAttribute("aria-label","Table pagination"),this.appendChild(t),this.#f=t}#R(){this.listen(this.#e,"click",this.#V)}#V=t=>{let i=t.target.closest('[data-action="toggle-expand"]');if(!i)return;let s=i.closest("tr[data-expandable]");if(!s)return;let n=s.hasAttribute("data-state-expanded"),r=s.nextElementSibling;n?(s.removeAttribute("data-state-expanded"),i.setAttribute("aria-expanded","false"),r?.hasAttribute("data-expand-content")&&(r.hidden=!0,r.setAttribute("aria-hidden","true"))):(s.setAttribute("data-state-expanded",""),i.setAttribute("aria-expanded","true"),r?.hasAttribute("data-expand-content")&&(r.hidden=!1,r.removeAttribute("aria-hidden"))),this.dispatchEvent(new CustomEvent("data-table:expand",{detail:{row:s,expanded:!n},bubbles:!0}))};#F(){this.#u=this.#e.querySelector('thead [data-action="select-all"]'),this.#u&&this.listen(this.#u,"change",this.#z),this.listen(this.#t,"change",this.#Y),this.#p=this.querySelector("[data-selected-count]"),this.#K()}#z=t=>{let i=t.target.checked;this.#t.querySelectorAll("tr[data-selectable]").forEach(n=>{let r=n.querySelector('[data-action="select-row"]');i?(n.setAttribute("data-state-selected",""),r&&(r.checked=!0)):(n.removeAttribute("data-state-selected"),r&&(r.checked=!1))}),t.target.indeterminate=!1,this.#G(),this.#U()};#Y=t=>{let i=t.target.closest('[data-action="select-row"]');if(!i)return;let s=i.closest("tr[data-selectable]");s&&(i.checked?s.setAttribute("data-state-selected",""):s.removeAttribute("data-state-selected"),this.#K(),this.#U())};#K(){if(!this.#u){this.#G();return}let t=this.#t.querySelectorAll("tr[data-selectable]"),i=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]"),s=t.length,n=i.length;n===0?(this.#u.checked=!1,this.#u.indeterminate=!1):n===s?(this.#u.checked=!0,this.#u.indeterminate=!1):(this.#u.checked=!1,this.#u.indeterminate=!0),this.#G()}#G(){let i=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]").length;this.#p&&(this.#p.textContent=i)}#U(){let t=[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")];this.dispatchEvent(new CustomEvent("data-table:selection",{detail:{count:t.length,rows:t},bubbles:!0}))}#W(){if(!this.#f||this.#l<=0)return;let t=this.#f,i=Math.ceil(this.#r.length/this.#l);if(t.innerHTML="",i<=1)return;let s=document.createElement("button");s.type="button",s.textContent="Previous",s.setAttribute("data-pagination-prev",""),s.disabled=this.#o===1,s.addEventListener("click",()=>this.goToPage(this.#o-1)),t.appendChild(s),this.#X(i).forEach(a=>{if(a==="..."){let o=document.createElement("span");o.textContent="...",o.setAttribute("data-pagination-ellipsis",""),t.appendChild(o)}else{let o=document.createElement("button");o.type="button",o.textContent=a,o.setAttribute("data-pagination-page",""),a===this.#o&&(o.setAttribute("aria-current","page"),o.setAttribute("data-current","")),o.addEventListener("click",()=>this.goToPage(a)),t.appendChild(o)}});let r=document.createElement("button");r.type="button",r.textContent="Next",r.setAttribute("data-pagination-next",""),r.disabled=this.#o===i,r.addEventListener("click",()=>this.goToPage(this.#o+1)),t.appendChild(r)}#X(t){let i=this.#o,s=[];if(t<=7)for(let n=1;n<=t;n++)s.push(n);else{s.push(1),i>3&&s.push("...");let n=Math.max(2,i-1),r=Math.min(t-1,i+1);for(let a=n;a<=r;a++)s.push(a);i<t-2&&s.push("..."),s.push(t)}return s}#j(){this.#s.forEach(i=>{i.setAttribute("data-state-hidden","")});let t;if(this.#l>0){let i=(this.#o-1)*this.#l,s=i+this.#l;t=this.#r.slice(i,s)}else t=this.#r;t.forEach(i=>{i.removeAttribute("data-state-hidden"),this.#t.appendChild(i);let s=i.nextElementSibling?.hasAttribute?.("data-expand-content")?i.nextElementSibling:this.#J(i);s&&this.#t.appendChild(s)}),this.#r.forEach(i=>{if(i.hasAttribute("data-state-hidden")){this.#t.appendChild(i);let s=this.#J(i);s&&this.#t.appendChild(s)}}),this.#s.forEach(i=>{if(!this.#r.includes(i)){this.#t.appendChild(i);let s=this.#J(i);s&&this.#t.appendChild(s)}}),this.#W()}#J(t){if(!t.hasAttribute("data-expandable"))return null;let i=t.nextElementSibling;return i?.hasAttribute("data-expand-content")?i:null}goToPage(t){let i=Math.ceil(this.#r.length/this.#l),s=Math.max(1,Math.min(t,i));s!==this.#o&&(this.#o=s,this.#j(),this.dispatchEvent(new CustomEvent("data-table:page",{detail:{page:this.#o},bubbles:!0})))}setFilter(t){this.#c&&(this.#c.value=t),this.#M(t)}refresh(){if(this.#s=[...this.#t.querySelectorAll(":scope > tr")],this.#h?this.#M(this.#h):this.#r=[...this.#s],this.#n>=0&&this.#a){let i=this.#i.find(s=>s.columnIndex===this.#n);i&&this.#C(this.#n,this.#a,i.sortType)}let t=Math.max(1,Math.ceil(this.#r.length/this.#l));this.#o>t&&(this.#o=t),this.#j()}get currentPage(){return this.#o}get totalPages(){return this.#l<=0?1:Math.ceil(this.#r.length/this.#l)}get filteredCount(){return this.#r.length}get totalCount(){return this.#s.length}getSelectedRows(){return this.#t?[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")]:[]}};m("data-table",Ci);ue();var ki=class e extends b{static#e=150;static#t=8;#i=null;#s=null;#r=null;#n=null;#a=[];#o=-1;#l=!1;#c=null;#f=null;#m=null;setup(){this.#h(),this.#u()}teardown(){this.#l&&(document.body.style.overflow="",this.removeAttribute("open"),this.#l=!1),this.#m?.(),this.#O(),this.#s?.remove(),this.#s=null}get value(){return this.#r?.value??""}set value(t){if(!this.#r)return;let i=t==null?"":String(t);this.#r.value!==i&&(this.#r.value=i,this.#r.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new CustomEvent("site-search:change",{detail:{value:i,source:"api"},bubbles:!0})))}get results(){return[...this.#a]}#h(){this.#i=this.querySelector(":scope > [data-trigger]"),this.#i||(this.#i=this.querySelector(":scope > button")),this.#i||(this.#i=document.createElement("button"),this.#i.setAttribute("data-trigger",""),this.#i.innerHTML=`
83
83
  <icon-wc name="search" label="Search"></icon-wc>
84
84
  `,this.prepend(this.#i)),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#s=document.createElement("div"),this.#s.className="dialog",this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-label","Site search"),this.#s.id=`search-dialog-${crypto.randomUUID().slice(0,8)}`,this.#i.setAttribute("aria-controls",this.#s.id),this.#s.innerHTML=`
85
85
  <div class="backdrop"></div>
@@ -112,7 +112,7 @@ svg {
112
112
  </span>
113
113
  </div>
114
114
  </div>
115
- `,this.appendChild(this.#s),this.#r=this.#s.querySelector(".input"),this.#n=this.#s.querySelector(".results")}#l(){this.#i.addEventListener("click",this.#m),Kr().includes("meta+k")||(this.#p=mt("meta+k",()=>{this.#o?this.close():this.open()},{global:!0})),this.listen(document,"keydown",this.#d),this.#s.querySelector(".backdrop")?.addEventListener("click",()=>this.close()),this.#r.addEventListener("input",this.#y),this.#r.addEventListener("keydown",this.#w),this.#n.addEventListener("click",this.#v)}#m=t=>{t.stopPropagation(),this.open()};#d=t=>{t.key==="Escape"&&this.#o&&(t.preventDefault(),this.close())};#y=()=>{this.#B(),this.setState("input-debounce-pending",!0),this.#h=setTimeout(()=>{this.setState("input-debounce-pending",!1),this.#g(this.#r.value)},e.#e)};#w=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#L(this.#c+1);break;case"ArrowUp":t.preventDefault(),this.#L(this.#c-1);break;case"Enter":t.preventDefault(),this.#c>=0&&this.#a[this.#c]&&this.#S(this.#a[this.#c]);break}};#v=t=>{let i=t.target.closest("[data-result-index]");if(i){let s=parseInt(i.dataset.resultIndex,10);this.#a[s]&&this.#S(this.#a[s])}};async#b(){if(!this.#f)try{this.#f=await import("/pagefind/pagefind.js"),await this.#f.options({excerptLength:20})}catch{console.warn("Pagefind not available. Run `npm run search:index` to build the search index."),this.#f=null}}async#g(t){if(!t.trim()){this.#C([]);return}if(await this.#b(),!this.#f){this.#N();return}try{this.#n.innerHTML='<div class="loading">Searching...</div>';let i=await this.#f.search(t),s=await Promise.all(i.results.slice(0,e.#t).map(n=>n.data()));this.#a=s,this.#C(s)}catch(i){console.error("Search error:",i),this.#n.innerHTML='<div class="error">Search error. Please try again.</div>'}}#C(t){if(this.#c=-1,t.length===0){this.#r.value.trim()?this.#n.innerHTML='<div class="empty">No results found</div>':this.#n.innerHTML="";return}this.#n.innerHTML=t.map((i,s)=>`
115
+ `,this.appendChild(this.#s),this.#r=this.#s.querySelector(".input"),this.#n=this.#s.querySelector(".results")}#u(){this.#i.addEventListener("click",this.#p),la().includes("meta+k")||(this.#m=pt("meta+k",()=>{this.#l?this.close():this.open()},{global:!0})),this.listen(document,"keydown",this.#d),this.#s.querySelector(".backdrop")?.addEventListener("click",()=>this.close()),this.#r.addEventListener("input",this.#b),this.#r.addEventListener("keydown",this.#g),this.#n.addEventListener("click",this.#S)}#p=t=>{t.stopPropagation(),this.open()};#d=t=>{t.key==="Escape"&&this.#l&&(t.preventDefault(),this.close())};#b=()=>{this.#O(),this.setState("input-debounce-pending",!0),this.#f=setTimeout(()=>{this.setState("input-debounce-pending",!1),this.#w(this.#r.value)},e.#e)};#g=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#y(this.#o+1);break;case"ArrowUp":t.preventDefault(),this.#y(this.#o-1);break;case"Enter":t.preventDefault(),this.#o>=0&&this.#a[this.#o]&&this.#k(this.#a[this.#o]);break}};#S=t=>{let i=t.target.closest("[data-result-index]");if(i){let s=parseInt(i.dataset.resultIndex,10);this.#a[s]&&this.#k(this.#a[s])}};async#A(){if(!this.#c)try{this.#c=await import("/pagefind/pagefind.js"),await this.#c.options({excerptLength:20})}catch{console.warn("Pagefind not available. Run `npm run search:index` to build the search index."),this.#c=null}}async#w(t){if(!t.trim()){this.#v([]);return}if(await this.#A(),!this.#c){this.#E();return}try{this.#n.innerHTML='<div class="loading">Searching...</div>';let i=await this.#c.search(t),s=await Promise.all(i.results.slice(0,e.#t).map(n=>n.data()));this.#a=s,this.#v(s)}catch(i){console.error("Search error:",i),this.#n.innerHTML='<div class="error">Search error. Please try again.</div>'}}#v(t){if(this.#o=-1,t.length===0){this.#r.value.trim()?this.#n.innerHTML='<div class="empty">No results found</div>':this.#n.innerHTML="";return}this.#n.innerHTML=t.map((i,s)=>`
116
116
  <a
117
117
  id="search-result-${s}"
118
118
  href="${i.url}"
@@ -124,12 +124,12 @@ svg {
124
124
  <span class="result-title">${i.meta?.title||"Untitled"}</span>
125
125
  <span class="result-excerpt">${i.excerpt||""}</span>
126
126
  </a>
127
- `).join("")}#N(){this.#n.innerHTML=`
127
+ `).join("")}#E(){this.#n.innerHTML=`
128
128
  <div class="error">
129
129
  Search index not found.<br>
130
130
  Run <code>npm run search:index</code> after building.
131
131
  </div>
132
- `}#L(t){if(this.#a.length===0)return;t<0&&(t=this.#a.length-1),t>=this.#a.length&&(t=0);let i=this.#n.querySelector("[data-active]");i&&i.removeAttribute("data-active"),this.#r?.removeAttribute("aria-activedescendant"),this.#c=t;let s=this.#n.querySelector(`[data-result-index="${t}"]`);s&&(s.setAttribute("data-active",""),this.#r?.setAttribute("aria-activedescendant",s.id),s.scrollIntoView({block:"nearest"}))}#S(t){t.url&&(this.close(),window.location.href=t.url)}#B(){this.#h&&(clearTimeout(this.#h),this.#h=null,this.setState("input-debounce-pending",!1))}open(){this.#o||(this.#o=!0,this.setAttribute("open",""),this.#i?.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden",requestAnimationFrame(()=>{this.#r?.focus(),this.#r?.select()}),this.#b(),this.dispatchEvent(new CustomEvent("site-search:open",{bubbles:!0})))}close(){this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#i?.setAttribute("aria-expanded","false"),document.body.style.overflow="",this.#B(),this.#r.value="",this.#r?.removeAttribute("aria-activedescendant"),this.#a=[],this.#c=-1,this.#n.innerHTML="",this.#i?.focus(),this.dispatchEvent(new CustomEvent("site-search:close",{bubbles:!0})))}get isOpen(){return this.#o}};b("site-search",vi);function yi(e){if(!e||typeof e!="string")return"";let t=document.createElement("template");return t.innerHTML=e,t.content.querySelectorAll("script, iframe, object, embed, form, base, link, meta, noscript").forEach(n=>n.remove()),t.content.querySelectorAll("*").forEach(n=>{for(let r of[...n.attributes]){if(r.name.startsWith("on")){n.removeAttribute(r.name);continue}if(["href","src","action","formaction","xlink:href"].includes(r.name)){let a=r.value.trim().toLowerCase();(a.startsWith("javascript:")||a.startsWith("data:text/html"))&&n.removeAttribute(r.name);continue}(r.name==="srcdoc"||r.name==="data"&&n.tagName==="OBJECT")&&n.removeAttribute(r.name)}}),t.innerHTML}var pd=/^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*|\[\d+\])*$/;function Xr(e){return!e||typeof e!="string"?!1:pd.test(e.trim())}function _t(e,t){if(!Xr(t)){console.warn(`[card-list] Unsafe property path rejected: "${t}"`);return}let s=t.replace(/\[(\d+)\]/g,".$1").split("."),n=e;for(let r of s){if(n==null)return;n=n[r]}return n}function md(e){return e?e.split(",").map(t=>{let[i,s]=t.split(":").map(n=>n.trim());return{attr:i,path:s}}).filter(({attr:t,path:i})=>t&&i):[]}var wi=class extends g{#e=null;#t=[];#i="id";#s=new Map;static get observedAttributes(){return["src","data-items","data-key"]}setup(){if(this.#e=this.querySelector("template"),!this.#e)return console.warn("[card-list] No template found"),!1;this.#i=this.getAttribute("data-key")||"id";let t=this.getAttribute("data-items");if(t){try{this.#t=JSON.parse(t),this.#n()}catch(s){console.error("[card-list] Invalid JSON in data-items:",s)}return}let i=this.getAttribute("src");return i&&this.#r(i),!0}attributeChangedCallback(t,i,s){if(i!==s)if(t==="data-items"&&s)try{this.#t=JSON.parse(s),this.#n()}catch(n){console.error("[card-list] Invalid JSON in data-items:",n)}else t==="src"&&s?this.#r(s):t==="data-key"&&(this.#i=s||"id",this.#n())}async#r(t){try{this.setAttribute("data-loading","");let i=await fetch(t);if(!i.ok)throw new Error(`HTTP ${i.status}`);let s=await i.json();this.#t=Array.isArray(s)?s:s.items||s.data||[],this.#n()}catch(i){console.error("[card-list] Fetch error:",i),this.setAttribute("data-error",i.message)}finally{this.removeAttribute("data-loading")}}#n(t="internal"){if(!this.#e)return;if([...this.#e.content.children].length!==1){this.querySelectorAll(":scope > :not(template)").forEach(r=>r.remove()),this.#s.clear();let n=document.createDocumentFragment();for(let r of this.#t){let a=this.#e.content.cloneNode(!0);this.#a(a,r),n.appendChild(a)}this.appendChild(n)}else{let s=re({newItems:this.#t,nodes:this.#s,keyOf:r=>r?.[this.#i],renderItem:r=>{if(!this.#e)throw new Error("card-list: missing template");let o=this.#e.content.cloneNode(!0).firstElementChild;return this.#a(o,r),o},containerFor:()=>this}),n=new Set(s.added);for(let r of this.#t){let a=r?.[this.#i];if(n.has(a))continue;let o=this.#s.get(a);o&&this.#a(o,r)}}this.dispatchEvent(new CustomEvent("card-list:rendered",{detail:{count:this.#t.length},bubbles:!0})),this.dispatchEvent(new CustomEvent("card-list:items-changed",{detail:{items:this.#t,source:t},bubbles:!0}))}#a(t,i){t.querySelectorAll("[data-field]").forEach(s=>{let n=s.getAttribute("data-field"),r=_t(i,n);s.textContent=r??""}),t.querySelectorAll("[data-field-attr]").forEach(s=>{let n=md(s.getAttribute("data-field-attr"));for(let{attr:r,path:a}of n){if(!Xr(a))continue;let o=_t(i,a);o!=null&&s.setAttribute(r,o)}}),t.querySelectorAll("[data-field-html]").forEach(s=>{let n=s.getAttribute("data-field-html"),r=_t(i,n);s.innerHTML=yi(r)}),t.querySelectorAll("[data-field-if]").forEach(s=>{let n=s.getAttribute("data-field-if");_t(i,n)||s.remove()}),t.querySelectorAll("[data-field-unless]").forEach(s=>{let n=s.getAttribute("data-field-unless");_t(i,n)&&s.remove()})}get items(){return this.#t}set items(t){this.#t=Array.isArray(t)?t:[],this.#n("api")}setItems(t){this.items=t}getItems(){return[...this.#t]}};b("card-list",wi);var Jr=`
132
+ `}#y(t){if(this.#a.length===0)return;t<0&&(t=this.#a.length-1),t>=this.#a.length&&(t=0);let i=this.#n.querySelector("[data-active]");i&&i.removeAttribute("data-active"),this.#r?.removeAttribute("aria-activedescendant"),this.#o=t;let s=this.#n.querySelector(`[data-result-index="${t}"]`);s&&(s.setAttribute("data-active",""),this.#r?.setAttribute("aria-activedescendant",s.id),s.scrollIntoView({block:"nearest"}))}#k(t){t.url&&(this.close(),window.location.href=t.url)}#O(){this.#f&&(clearTimeout(this.#f),this.#f=null,this.setState("input-debounce-pending",!1))}open(){this.#l||(this.#l=!0,this.setAttribute("open",""),this.#i?.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden",requestAnimationFrame(()=>{this.#r?.focus(),this.#r?.select()}),this.#A(),this.dispatchEvent(new CustomEvent("site-search:open",{bubbles:!0})))}close(){this.#l&&(this.#l=!1,this.removeAttribute("open"),this.#i?.setAttribute("aria-expanded","false"),document.body.style.overflow="",this.#O(),this.#r.value="",this.#r?.removeAttribute("aria-activedescendant"),this.#a=[],this.#o=-1,this.#n.innerHTML="",this.#i?.focus(),this.dispatchEvent(new CustomEvent("site-search:close",{bubbles:!0})))}get isOpen(){return this.#l}};m("site-search",ki);function Ti(e){if(!e||typeof e!="string")return"";let t=document.createElement("template");return t.innerHTML=e,t.content.querySelectorAll("script, iframe, object, embed, form, base, link, meta, noscript").forEach(n=>n.remove()),t.content.querySelectorAll("*").forEach(n=>{for(let r of[...n.attributes]){if(r.name.startsWith("on")){n.removeAttribute(r.name);continue}if(["href","src","action","formaction","xlink:href"].includes(r.name)){let a=r.value.trim().toLowerCase();(a.startsWith("javascript:")||a.startsWith("data:text/html"))&&n.removeAttribute(r.name);continue}(r.name==="srcdoc"||r.name==="data"&&n.tagName==="OBJECT")&&n.removeAttribute(r.name)}}),t.innerHTML}var qd=/^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*|\[\d+\])*$/;function ua(e){return!e||typeof e!="string"?!1:qd.test(e.trim())}function It(e,t){if(!ua(t)){console.warn(`[card-list] Unsafe property path rejected: "${t}"`);return}let s=String(t).replace(/\[(\d+)\]/g,".$1").split("."),n=e;for(let r of s){if(n==null)return;n=n[r]}return n}function $d(e){return e?e.split(",").map(t=>{let[i,s]=t.split(":").map(n=>n.trim());return{attr:(i||"").toLowerCase(),path:s}}).filter(({attr:t,path:i})=>t&&i):[]}var Bd=new Set(["href","src","action","formaction","xlink:href","poster","cite","background","ping","data","manifest","longdesc","codebase"]),ha=new Set(["srcdoc","style","is"]),Pd=new Set(["http:","https:","mailto:","tel:"]);function fa(e){let t=String(e).replace(/[\u0000-\u0020\u007f]+/g,"");if(!t)return!0;let i=/^([a-z][a-z0-9+.-]*):/i.exec(t);return i?Pd.has(`${i[1].toLowerCase()}:`):!0}function Fd(e){return String(e).split(",").every(t=>fa(t.trim().split(/\s+/)[0]||""))}function Rd(e,t){return e.startsWith("on")||ha.has(e)||!/^[a-z_][a-z0-9_.:-]*$/.test(e)?!1:e==="srcset"||e==="imagesrcset"?Fd(t):Bd.has(e)?fa(t):!0}function Hd(e,t){let i=new Set;return e.map((s,n)=>{let r=s!=null&&typeof s=="object"?s[t]:void 0,a=r==null?null:`k:${String(r)}`;return a==null||i.has(a)?`i:${n}`:(i.add(a),a)})}var da=":scope > [data-card-list-status]",Li=class extends b{#e=null;#t=[];#i="id";#s=new Map;#r=!1;#n=null;#a=null;static get observedAttributes(){return["src","data-items","data-key"]}setup(){if(this.#e=this.querySelector(":scope > template")||this.querySelector("template"),!this.#e)return console.warn("[card-list] No template found"),!1;if(this.#i=this.getAttribute("data-key")||"id",this.#r)return this.#n&&this.#h(this.#n),this.#n=null,!0;let t=this.getAttribute("data-items");if(t)return this.#o(t),!0;let i=this.getAttribute("src");return i&&this.#m(i),!0}teardown(){this.#l()}attributeChangedCallback(t,i,s){i!==s&&this.hasAttribute("data-upgraded")&&(t==="data-items"?s&&this.#o(s):t==="src"?s?this.#m(s):this.#l():t==="data-key"&&(this.#i=s||"id",this.#h("attribute")))}#o(t){this.#l();try{let i=JSON.parse(t);this.#t=Array.isArray(i)?i:[],this.#r=!0,this.#h("attribute")}catch(i){console.error("[card-list] Invalid JSON in data-items:",i)}}#l(){this.#a&&(this.#a.abort(),this.#a=null,this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.#f(""))}#c(){let t=this.querySelector(da);return t||(t=document.createElement("p"),t.setAttribute("role","status"),t.setAttribute("data-card-list-status",""),this.append(t)),t}#f(t){let i=this.querySelector(da);!i&&!t||((i||this.#c()).textContent=t)}async#m(t){this.#l();let i=new AbortController;this.#a=i,this.removeAttribute("data-error"),this.setAttribute("data-loading",""),this.setAttribute("aria-busy","true"),this.#c().textContent="Loading\u2026";try{let s=await fetch(t,{signal:i.signal});if(!s.ok)throw new Error(`HTTP ${s.status}`);let n=await s.json();if(i.signal.aborted)return;this.#t=Array.isArray(n)?n:n?.items||n?.data||[],this.#r=!0,this.#f(""),this.#h("attribute")}catch(s){if(i.signal.aborted)return;let n=s instanceof Error?s.message:String(s);console.error("[card-list] Fetch error:",s),this.setAttribute("data-error",n),this.#f(`Error: ${n}`)}finally{this.#a===i&&(this.#a=null,this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"))}}#h(t){if(!this.#e)return;this.querySelectorAll(":scope > [data-fallback]").forEach(n=>n.remove());let i=this.#e;if([...i.content.children].length!==1){this.querySelectorAll(":scope > :not(template, [data-card-list-status])").forEach(r=>r.remove()),this.#s.clear();let n=document.createDocumentFragment();for(let r of this.#t){let a=i.content.cloneNode(!0);this.#u(a,r),n.appendChild(a)}this.prepend(n)}else{let n=Hd(this.#t,this.#i),r=this.#t.map((c,l)=>({item:c,key:n[l]})),a=le({newItems:r,nodes:this.#s,keyOf:c=>c.key,renderItem:c=>{let d=i.content.cloneNode(!0).firstElementChild;return this.#u(d,c.item),d},containerFor:()=>this}),o=new Set(a.added);for(let{item:c,key:l}of r){if(o.has(l))continue;let d=this.#s.get(l);d&&this.#u(d,c)}}this.dispatchEvent(new CustomEvent("card-list:rendered",{detail:{count:this.#t.length},bubbles:!0})),this.dispatchEvent(new CustomEvent("card-list:items-changed",{detail:{items:this.#t,source:t},bubbles:!0}))}#u(t,i){let s=n=>{let r=[...t.querySelectorAll(n)];return t instanceof Element&&t.matches(n)&&r.unshift(t),r};s("[data-field]").forEach(n=>{let r=It(i,n.getAttribute("data-field"));n.textContent=r??""}),s("[data-field-attr]").forEach(n=>{for(let{attr:r,path:a}of $d(n.getAttribute("data-field-attr"))){if(!ua(a))continue;let o=It(i,a);if(r.startsWith("on")||ha.has(r)){console.warn(`[card-list] Refusing to bind "${r}" from data`);continue}let c=r.startsWith("aria-");o==null||o===!1&&!c?n.removeAttribute(r):Rd(r,o)?n.setAttribute(r,o===!0&&!c?"":String(o)):(console.warn(`[card-list] Unsafe value refused for "${r}"`),n.removeAttribute(r))}}),s("[data-field-html]").forEach(n=>{n.innerHTML=Ti(It(i,n.getAttribute("data-field-html")))}),s("[data-field-if]").forEach(n=>{n.hidden=!It(i,n.getAttribute("data-field-if"))}),s("[data-field-unless]").forEach(n=>{n.hidden=!!It(i,n.getAttribute("data-field-unless"))})}get items(){return this.#t}set items(t){this.#l(),this.#t=Array.isArray(t)?t:[],this.#r=!0,this.#e&&this.hasAttribute("data-upgraded")?this.#h("api"):this.#n="api"}};m("card-list",Li);var pa=`
133
133
  :host {
134
134
  --_padding: var(--score-card-padding, var(--size-l, 1.5rem));
135
135
  --_radius: var(--score-card-radius, var(--radius-m, 0.5rem));
@@ -314,8 +314,8 @@ svg {
314
314
  background: color-mix(in oklch, var(--_muted) 18%, transparent);
315
315
  }
316
316
  }
317
- `;var bd=new Set(["up","down","flat"]),Zr=["change","sparkline","description","icon"],gd=`
318
- <style>${Jr}</style>
317
+ `;var zd=new Set(["up","down","flat"]),ma=["change","sparkline","description","icon"],Vd=`
318
+ <style>${pa}</style>
319
319
  <div class="card" part="card">
320
320
  <span class="title" part="title"><slot name="title"></slot></span>
321
321
  <span class="value" part="value"><slot name="value"><slot></slot></slot></span>
@@ -324,7 +324,7 @@ svg {
324
324
  <span class="description" part="description"><slot name="description" data-slot="description"></slot></span>
325
325
  <span class="icon" part="icon"><slot name="icon" data-slot="icon"></slot></span>
326
326
  </div>
327
- `,Ei=class extends g{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of Zr){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#e(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=gd;for(let i of Zr){let s=t.querySelector(`slot[name="${i}"]`);s?.addEventListener("slotchange",()=>this.#e(i,s)),this.#e(i,s)}}this.#t(),this.#i(),this.#s()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#t():t==="loading"&&this.#i())}#e(t,i){let s=!!i&&i.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#t(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let i of bd)this.setState(`trend-${i}`,i===t)}#i(){this.setState("loading",this.hasAttribute("loading"))}#s(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};b("score-card",Ei);var vd=0;function le(e,t){return e.matches("content-swap")?t:`data-${t}`}function ce(e){e.style.viewTransitionName||(e.style.viewTransitionName=`content-swap-${++vd}`);let t=e.querySelector(':scope > [data-face="front"]'),i=e.querySelector(':scope > [data-face="back"]');if(!t||!i)return;let s=[];function n(o,c,d,l){o.addEventListener(c,d,l),s.push(()=>o.removeEventListener(c,d,l))}let r=[...e.querySelectorAll("[data-swap]")].filter(o=>o!==e&&o.closest("content-swap, [data-swap]")===e);return r.length===0?(e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.getAttribute("aria-label")||e.setAttribute("aria-label","Toggle content"),n(e,"click",()=>rt(e,"pointer")),n(e,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),rt(e,"keyboard"))})):r.forEach(o=>{n(o,"click",c=>{c.stopPropagation(),rt(e,"pointer")}),n(o,"keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),rt(e,"keyboard"))})}),e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(n(e,"swipe-left",()=>rt(e,"pointer")),n(e,"swipe-right",()=>rt(e,"pointer"))),ea(e,t,i),()=>{for(let o of s)o();s.length=0}}function ea(e,t,i){let s=e.hasAttribute(le(e,"swapped"));t.inert=s,i.inert=!s}function yd(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Dt(e,t,i="api"){let{front:s,back:n}=yd(e);if(!s||!n)return;let r=le(e,"swapped");if(t&&e.hasAttribute(r)||!t&&!e.hasAttribute(r))return;let a=()=>{t?e.setAttribute(r,""):e.removeAttribute(r),ea(e,s,n),wd(e,i);let d=t?n:s,l=d.querySelector("[autofocus]");l?l.focus():i==="keyboard"&&Ed(d)},o=d=>{let l=e;typeof l.setState=="function"&&l.setState("transition-running",d)};o(!0);let c=U(a);c&&c.finished&&typeof c.finished.finally=="function"?c.finished.finally(()=>o(!1)):o(!1)}function rt(e,t="api"){Dt(e,!e.hasAttribute(le(e,"swapped")),t)}function wd(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(le(e,"swapped")),source:t},bubbles:!0}))}function Ed(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var Ai=class extends g{#e=null;setup(){this.#e=ce(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){Dt(this,!0)}unflip(){Dt(this,!1)}toggle(){rt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Dt(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Dt(this,!!t)}};b("content-swap",Ai);function Qr(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&(ce(e),e.setAttribute("data-swap-init",""))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Qr):Qr();var ta=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&(ce(s),s.setAttribute("data-swap-init","")),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&(ce(n),n.setAttribute("data-swap-init",""))})}});document.body?ta.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{ta.observe(document.body,{childList:!0,subtree:!0})});var Si=class extends g{#e=null;#t=!1;#i=null;setup(){this.hasAttribute("role")||this.setAttribute("role","navigation"),this.#n("pathname"),this.listen(window,"popstate",this.#r)}get items(){return this.#e?this.#e.map(t=>({...t})):Array.from(this.#s()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let i=t.map(s=>({...s}));this.#e&&this.#h(this.#e,i)||(this.#e=i,this.#o(i),this.#n(this.#t?"property":"pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#t)return this.#i;for(let t of this.#s())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let i=this.current,s=t==null?null:String(t);this.#t=!0,this.#i=s,this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#t&&(this.#t=!1,this.#i=null,this.#n("pathname"))}refresh(){this.#t||this.#n("pathname")}#s(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#r=()=>{this.#t||this.#n("popstate")};#n(t){let i=this.current,s=this.#a();this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:t},bubbles:!0,composed:!0}))}#a(){let t=window.location.pathname,i=Array.from(this.#s());if(i.length===0)return null;let s=this.getAttribute("data-match")==="exact",n=null,r=null,a=-1;for(let c of i){let d=c.getAttribute("href");if(!d||/^[a-z]+:/i.test(d)||d.startsWith("//"))continue;let l=d.split("?")[0].split("#")[0];if(l===t&&n==null){n=c;continue}!s&&l!=="/"&&(t===l||t.startsWith(l.replace(/\/$/,"")+"/"))&&l.length>a&&(r=c,a=l.length)}let o=n||r;return o?o.getAttribute("data-route")||o.getAttribute("href"):null}#c(t){let i=this.#s();for(let s of i){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#o(t){this.#s().forEach(n=>n.remove());let s=document.createDocumentFragment();for(let n of t)s.appendChild(this.#f(n));this.appendChild(s)}#f(t){let i=document.createElement("a");if(i.href=t.href||"#",t.route&&i.setAttribute("data-route",t.route),t.external&&(i.target="_blank",i.rel="noopener noreferrer"),t.icon){let s=document.createElement("icon-wc");s.setAttribute("name",String(t.icon)),s.setAttribute("size","sm"),i.appendChild(s)}if(i.appendChild(document.createTextNode(t.label||"")),t.external){let s=document.createElement("span");s.className="sr-only",s.textContent=" (opens in new tab)",i.appendChild(s)}if(t.badge!=null){let s=document.createElement("span");s.className="badge",s.textContent=String(t.badge),i.appendChild(s)}return i}#h(t,i){if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(i[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==i[s][r[a]])return!1}return!0}};b("nav-bar",Si);var Sd=0,Ti=class extends g{#e;#t=[];#i;#s;#r;#n;#a;#c=null;#o=0;#f=0;#h=!1;#p=!1;#u=!1;#l=null;get currentIndex(){return this.#o}get slideCount(){return this.#t.length}get playing(){return this.#c!==null}setup(){let t=[...this.children];if(t.length===0)return!1;if(this.#p=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#u=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#u&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Carousel"),this.#e=document.createElement("div"),this.#e.className="carousel-track",this.#e.setAttribute("tabindex","0"),this.#e.setAttribute("aria-label","Slides"),t.forEach((r,a)=>{r.setAttribute("role","group"),r.setAttribute("aria-roledescription","slide"),r.setAttribute("aria-label",`${a+1} of ${t.length}`),this.#e.appendChild(r)}),this.#t=[...this.#e.children],this.#i=document.createElement("button"),this.#i.className="carousel-prev",this.#i.setAttribute("aria-label","Previous slide"),this.#i.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#s=document.createElement("button"),this.#s.className="carousel-next",this.#s.setAttribute("aria-label","Next slide"),this.#s.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#r=document.createElement("div"),this.#r.className="carousel-indicators",this.#r.setAttribute("aria-label","Slide indicators"),this.#t.forEach((r,a)=>{let o=document.createElement("button");o.className="carousel-dot",o.setAttribute("aria-label",`Go to slide ${a+1}`),o.setAttribute("aria-current",a===0?"true":"false"),this.listen(o,"click",()=>this.goTo(a)),this.#r.appendChild(o)})),this.#n=document.createElement("div"),this.#n.className="carousel-live",this.#n.setAttribute("aria-live","polite"),this.#n.setAttribute("aria-atomic","true"),this.appendChild(this.#i),this.appendChild(this.#e),this.appendChild(this.#s),this.#r&&this.appendChild(this.#r),this.appendChild(this.#n),this.listen(this.#i,"click",()=>this.prev()),this.listen(this.#s,"click",()=>this.next()),this.listen(this.#e,"keydown",this.#b),this.#u){let r=++Sd,a=this.getAttribute("transition")||"fade",o=a==="slide"?"vt-carousel-slide":a==="scale"?"vt-carousel-scale":"vt-carousel";this.#e.style.viewTransitionName=`carousel-${r}`,this.#e.style.viewTransitionClass=o}this.#u&&Promise.resolve().then(()=>(ki(),Ci)).then(({addSwipeListener:r})=>{this.#l=r(this.#e,{threshold:40}),this.listen(this.#e,"swipe-left",()=>this.next()),this.listen(this.#e,"swipe-right",()=>this.prev())}),this.#u||(this.#a=new IntersectionObserver(this.#v,{root:this.#e,threshold:.5}),this.#t.forEach(r=>this.#a.observe(r)),"onscrollend"in window&&this.listen(this.#e,"scrollend",()=>{this.#h=!1,this.#y()}));let n=this.#C()??(Number(this.getAttribute("start"))||0);if(this.#u){let r=n>0&&n<this.#t.length?n:0;this.#t.forEach((a,o)=>{a.hidden=o!==r}),this.#d(r)}else n>0&&n<this.#t.length&&this.goTo(n,!1);return this.#w(),this.hasAttribute("autoplay")&&!this.#p&&this.#g(),!0}teardown(){this.pause(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#l&&(this.#l(),this.#l=null),this.#e?.parentElement===this&&[...this.#e.children].forEach(t=>this.appendChild(t)),this.#e?.remove(),this.#i?.remove(),this.#s?.remove(),this.#r?.remove(),this.#n?.remove(),this.#e=this.#i=this.#s=this.#r=this.#n=null,this.#t=[],this.#u=!1,this.#o=0,this.#f=0,this.#h=!1}get slides(){return this.#t.map((t,i)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${i+1} of ${this.#t.length}`}))}set slides(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of i){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:i,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#o<this.#t.length-1?this.goTo(this.#o+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#o>0?this.goTo(this.#o-1):t&&this.goTo(this.#t.length-1)}goTo(t,i=!0){if(!(t<0||t>=this.#t.length)){if(this.#u)if(i&&t!==this.#o){let s=t>this.#o?"forward":"backward";document.documentElement.dataset.vtDirection=s,U(()=>{this.#m(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#m(t);else{let s=this.#t[t].offsetLeft-this.#e.offsetLeft,n=i&&!this.#p?"smooth":"instant";this.#e.scrollTo({left:s,behavior:n})}this.#d(t)}}#m(t){this.#t.forEach((i,s)=>{i.hidden=s!==t})}play(){if(this.#c||this.#p)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#c=setInterval(()=>this.next(),t),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}pause(){this.#c&&(clearInterval(this.#c),this.#c=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#L()}#d(t){this.#o=t,this.#w(),this.#N(),this.#n&&(this.#n.textContent=`Slide ${t+1} of ${this.#t.length}`),!this.#h&&(this.#y(),!this.#u&&"onscrollend"in window&&(this.#h=!0))}#y(){this.#o!==this.#f&&(this.#f=this.#o,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#o,slide:this.#t[this.#o]},bubbles:!0})))}#w(){let t=this.hasAttribute("loop"),i=this.#o===0,s=this.#o===this.#t.length-1;if(this.#i&&(this.#i.disabled=!t&&i),this.#s&&(this.#s.disabled=!t&&s),this.#r){let n=this.#r.children;for(let r=0;r<n.length;r++){let a=r===this.#o;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#v=t=>{for(let i of t)if(i.isIntersecting){let s=this.#t.indexOf(i.target);s!==-1&&s!==this.#o&&this.#d(s)}};#b=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#t.length-1);break}};#g(){this.play(),this.listen(this,"mouseenter",()=>this.pause()),this.listen(this,"mouseleave",()=>{this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"focusin",()=>this.pause()),this.listen(this,"focusout",t=>{!this.contains(t.relatedTarget)&&this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"touchstart",()=>this.pause(),{passive:!0})}#C(){let t=this.getAttribute("persist");if(!t)return null;try{let i=localStorage.getItem(`carousel:${t}`);return i!==null?Number(i):null}catch{return null}}#N(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#o))}catch{}}#L(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};b("carousel-wc",Ti);function ca(e,t,i){"role"in ElementInternals.prototype?t.role=i:e.setAttribute("role",i)}var xd=0,Li=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r=[];#n=[];#a=-1;#c=!1;#o="";#f="";#h="";#p;#u;#l=[];constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}get#m(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#t=t;let i=this.querySelector("ul, ol");if(!i)return!1;if(this.#i=i,this.#m){let o=this.querySelector(":scope > .tags-input-area");if(!o){o=document.createElement("div"),o.className="tags-input-area";let d=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(o,d)}this.#p=o,this.#t.parentNode!==this.#p&&this.#p.appendChild(this.#t);let c=this.querySelector(":scope > [data-combobox-live]");c||(c=document.createElement("div"),c.setAttribute("aria-live","polite"),c.setAttribute("aria-atomic","true"),c.setAttribute("data-combobox-live",""),c.className="visually-hidden",this.appendChild(c)),this.#u=c}let s=this.getAttribute("placeholder");s&&!this.#t.getAttribute("placeholder")&&this.#t.setAttribute("placeholder",s);let n=`cb${++xd}`;this.#i.id||(this.#i.id=`combobox-listbox-${n}`),ca(this.#t,this.#e,"combobox"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-autocomplete","list"),this.#t.setAttribute("aria-controls",this.#i.id),this.#t.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#m&&this.#i.setAttribute("aria-multiselectable","true");let r=this.#m?this.#p:this.#t;r.id||(r.id=`combobox-anchor-${n}`);let a=this.querySelector(":scope > pop-over[data-combobox-host]");if(a?this.#s=a:(this.#s=document.createElement("pop-over"),this.#s.setAttribute("data-combobox-host",""),this.#s.id=`combobox-pop-${n}`,this.#s.dataset.mode="manual",this.#s.dataset.position="bottom-start",this.#s.dataset.anchor=r.id,this.#s.appendChild(this.#i),this.appendChild(this.#s)),this.#s.dataset.anchor=r.id,this.#i.parentElement!==this.#s&&this.#s.appendChild(this.#i),this.#d(),!this.#m){let o=this.getAttribute("value");o&&this.#T(o,!1),this.#h=this.#o}return this.listen(this.#t,"input",this.#g),this.listen(this.#t,"keydown",this.#C),this.listen(this.#t,"focus",this.#N),this.listen(this.#t,"click",this.#L),this.listen(this.#i,"click",this.#S),this.listen(this.#i,"pointerdown",this.#B),this.listen(document,"click",this.#q),this.listen(this.#s,"pop-over:hide",this.#x),this.#A(),this.#M(),this.#E(),!0}teardown(){}#d(){this.#r=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#r.forEach((t,i)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${i}`)}),this.#n=[...this.#r]}#y(t,i){if(this.#l.some(o=>o.value===t))return;let s=this.#v();if(s&&this.#l.length>=s)return;this.#l.push({value:t,label:i});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=i+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${i}`),r.innerHTML="&times;",r.addEventListener("click",o=>{o.stopPropagation(),this.#w(t)}),n.appendChild(r),this.#p.insertBefore(n,this.#t);let a=this.#r.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#b(`${i} added`),this.#t.value="",this.#k(""),this.#A(),this.#M(),this.#H(),s&&this.#l.length>=s&&(this.#t.disabled=!0,this.#E())}#w(t){let i=this.#l.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#l.splice(i,1)[0],n=this.#p.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#r.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#b(`${s.label} removed`),this.#v()&&this.#t.disabled&&(this.#t.disabled=!1),this.#k(this.#t.value.trim()),this.#A(),this.#M(),this.#H(),this.#t.focus()}#v(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#b(t){this.#u&&(this.#u.textContent="",requestAnimationFrame(()=>{this.#u.textContent=t}))}#g=()=>{let t=this.#t.value.trim();if(!this.#m&&this.#o){let i=this.#i.querySelector('[aria-selected="true"]');i&&i.setAttribute("aria-selected","false"),this.#o="",this.#f="",this.removeAttribute("value"),this.#A(),this.#M()}this.#k(t),this.#_()};#C=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#c||this.#_(),this.#I(this.#a+1);break;case"ArrowUp":t.preventDefault(),this.#c||this.#_(),this.#I(this.#a-1);break;case"Home":this.#c&&(t.preventDefault(),this.#I(0));break;case"End":this.#c&&(t.preventDefault(),this.#I(this.#n.length-1));break;case"Enter":if(t.preventDefault(),this.#c&&this.#a>=0&&this.#n[this.#a]){let i=this.#n[this.#a];this.#m?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#R(i)}else if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){let i=this.#t.value.trim();this.#y(i,i)}break;case"Backspace":if(this.#m&&!this.#t.value&&this.#l.length>0){let i=this.#l[this.#l.length-1];this.#w(i.value)}break;case",":if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let i=this.#t.value.trim();this.#y(i,i)}break;case"Escape":this.#c&&(t.preventDefault(),t.stopPropagation(),this.#E(),this.#t.focus());break;case"Tab":this.#c&&this.#E();break}};#N=()=>{this.#m?(this.#k(this.#t.value.trim()),this.#_()):(this.#t.value||!this.#o)&&(this.#k(this.#t.value.trim()),this.#_())};#L=()=>{this.#c||(this.#k(this.#t.value.trim()),this.#_())};#S=t=>{let i=t.target.closest("li[data-value]");i&&this.#n.includes(i)&&(this.#m?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#R(i))};#B=t=>{t.preventDefault()};#q=t=>{this.#c&&!this.contains(t.target)&&this.#E()};#k(t){let i=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#m?new Set(this.#l.map(r=>r.value)):null;this.#n=[],this.#r.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?i==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#n.push(r)}),this.#a=-1,this.#$(),this.setState("no-matches",this.#n.length===0)}#I(t){if(this.#n.length===0)return;t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#a>=0&&this.#n[this.#a]&&this.#n[this.#a].removeAttribute("data-active"),this.#a=t;let i=this.#n[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",i.id)}#$(){this.#r.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#R(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();this.#o!==s&&(this.#r.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#o=s,this.#f=n,this.#t.value=n,this.setAttribute("value",s),this.#A(),this.#M(),this.#E(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}})))}#T(t,i=!0,s="api"){let n=this.#r.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#R(n,s):(n.setAttribute("aria-selected","true"),this.#o=t,this.#f=n.textContent.trim(),this.#t.value=this.#f,this.setAttribute("value",t)))}#_(){this.#c||(this.#c=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#s?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#E(){this.#c&&(this.#c=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#$(),this.#s?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#x=()=>{this.#c&&(this.#c=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#$(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#A(){if(this.#m)if(this.#l.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#l)t.append(i,s.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#o?this.#e.setFormValue(this.#o,this.#f):this.#e.setFormValue(null)}#M(){this.hasAttribute("required")?this.#m?this.#l.length===0?this.#e.setValidity({valueMissing:!0},"Please select at least one option",this.#t):this.#e.setValidity({}):this.#o?this.#e.setValidity({}):this.#e.setValidity({valueMissing:!0},"Please select an option",this.#t):this.#e.setValidity({})}#H(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#l.map(t=>t.value),labels:this.#l.map(t=>t.label)}}))}formResetCallback(){this.#m?(this.#p.querySelectorAll(".tag").forEach(t=>t.remove()),this.#l=[],this.#t.value="",this.#t.disabled=!1):(this.#o="",this.#f="",this.#t.value="",this.removeAttribute("value")),this.#r.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#n=[...this.#r],this.#a=-1,this.#$(),this.#E(),!this.#m&&this.#h&&this.#T(this.#h,!1),this.#A(),this.#M()}formStateRestoreCallback(t){t&&(this.#m||(this.#T(t,!1),this.#A(),this.#M()))}get value(){return this.#o}set value(t){t?this.#T(t):(this.#r.forEach(i=>i.setAttribute("aria-selected","false")),this.#o="",this.#f="",this.#t.value="",this.removeAttribute("value"),this.#A(),this.#M())}get label(){return this.#f}get values(){return this.#l.map(t=>t.value)}get labels(){return this.#l.map(t=>t.label)}static get observedAttributes(){return["value"]}attributeChangedCallback(t,i,s){t==="value"&&this.#t&&s!==this.#o&&s&&(this.#T(s,!1),this.#A(),this.#M())}};b("combo-box",Li);function Cd(){try{let e=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return e.hourCycle==="h12"||e.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function F(e){return String(e).padStart(2,"0")}function bt(e){if(!e)return null;let t=e.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function It(e,t,i,s){return s?`${F(e)}:${F(t)}:${F(i)}`:`${F(e)}:${F(t)}`}function kd(e,t,i,s,n){if(n==="12h"){let r=e>=12?"PM":"AM",a=e%12||12;return s?`${a}:${F(t)}:${F(i)} ${r}`:`${a}:${F(t)} ${r}`}return It(e,t,i,s)}function la(e){let t=e.trim();if(!t)return null;let i=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),s=null,n=t;i&&(s=i[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,i.index).trim());let r=n.split(/[:.]/);if(r.length<1||r.length>3)return null;let a=Number(r[0]),o=r.length>1?Number(r[1]):0,c=r.length>2?Number(r[2]):0;if(isNaN(a)||isNaN(o)||isNaN(c)||o<0||o>59||c<0||c>59)return null;let d=a;if(s){if(d<1||d>12)return null;s==="AM"?d=d===12?0:d:d=d===12?12:d+12}else if(d<0||d>23)return null;return{h:d,m:o,s:c}}function Td(e,t,i){return e>i?t:e<t?i:e}var Ni=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a=[];#c;#o;#f;#h=0;#p=0;#u=0;#l="AM";#m=null;#d=null;#y=60;#w;#v=0;#b=!1;#g;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="time"]'),!this.#t)return!1;this.#y=Number(this.#t.getAttribute("step"))||60,this.#f=this.#y<60,this.#m=bt(this.#t.getAttribute("min")),this.#d=bt(this.#t.getAttribute("max")),this.#o=this.getAttribute("data-format")||Cd();let t=bt(this.#t.value);return t&&(this.#h=t.h,this.#p=t.m,this.#u=t.s),this.#w=this.#t.value,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#C(),this.#N(),this.#H(),this.#F(),this.#P(),this.#V(),this.listen(document,"click",this.#k),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}#C(){if(this.#s?.parentNode===this)return;this.#s=document.createElement("div"),this.#s.className="time-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="time-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","listbox"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a time\u2026"),this.#s.appendChild(this.#i),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label","Toggle time spinner"),this.#r.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","clock"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#r.appendChild(t),this.#s.appendChild(this.#r),this.appendChild(this.#s),this.listen(this.#r,"click",i=>{i.stopPropagation(),this.#b?this.#q():this.#B(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"keydown",this.#I),this.listen(this.#i,"blur",this.#$)}#N(){if(this.#n?.parentNode===this)return;this.#g=`tp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="time-panel",this.#n.id=this.#g,this.#n.setAttribute("role","group"),this.#n.setAttribute("aria-label","Time spinners"),this.#i.setAttribute("aria-controls",this.#g);let t=this.#o==="12h"?1:0,i=this.#o==="12h"?12:23,s=this.#L("Hours",t,i,1);this.#n.appendChild(s.el),this.#a.push(s),this.#n.appendChild(this.#S());let n=this.#y>=60?Math.max(1,Math.round(this.#y/60)):1,r=this.#L("Minutes",0,59,n);if(this.#n.appendChild(r.el),this.#a.push(r),this.#f){this.#n.appendChild(this.#S());let a=this.#L("Seconds",0,59,this.#y);this.#n.appendChild(a.el),this.#a.push(a)}this.#o==="12h"&&(this.#c=document.createElement("button"),this.#c.type="button",this.#c.className="period-toggle",this.#c.setAttribute("aria-label","Toggle AM/PM"),this.#c.textContent=this.#l,this.#n.appendChild(this.#c),this.listen(this.#c,"click",()=>{this.#l=this.#l==="AM"?"PM":"AM",this.#c.textContent=this.#l,this.#h=this.#O(this.#D(),this.#l),this.#M()}),this.listen(this.#c,"keydown",a=>{let o=a;o.key==="ArrowLeft"&&(o.preventDefault(),this.#z(this.#a.length-1)),o.key==="Escape"&&(o.preventDefault(),this.#q(),this.#i.focus())})),this.appendChild(this.#n)}#L(t,i,s,n){let r=document.createElement("div");r.className="time-spinner",r.setAttribute("role","spinbutton"),r.setAttribute("aria-label",t),r.setAttribute("aria-valuemin",String(i)),r.setAttribute("aria-valuemax",String(s)),r.setAttribute("tabindex","0");let a=document.createElement("button");a.type="button",a.className="time-inc",a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.innerHTML="&#x25B2;";let o=document.createElement("span");o.className="time-value";let c=document.createElement("button");c.type="button",c.className="time-dec",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.innerHTML="&#x25BC;",r.appendChild(a),r.appendChild(o),r.appendChild(c);let d={el:r,valueEl:o,label:t,min:i,max:s,step:n};return this.listen(a,"click",()=>{this.#x(d,n)}),this.listen(c,"click",()=>{this.#x(d,-n)}),this.listen(r,"keydown",l=>{this.#R(l,d)}),this.listen(r,"focus",()=>{this.#v=this.#a.indexOf(d)}),d}#S(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#B(){this.#b||(this.#b=!0,this.#n.setAttribute("data-open",""),this.#i.setAttribute("aria-expanded","true"))}#q(){this.#b&&(this.#b=!1,this.#n.removeAttribute("data-open"),this.#i.setAttribute("aria-expanded","false"))}#k=t=>{this.#b&&!this.contains(t.target)&&this.#q()};#I=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let i=la(this.#i.value);i&&(this.#h=i.h,this.#p=i.m,this.#u=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M()),this.#F(),this.#b&&this.#q();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#b||this.#B(),requestAnimationFrame(()=>this.#z(0));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#b&&this.#q(),this.#F();return;case"Tab":this.#b&&this.#q();return}};#$=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let i=this.#i.value.trim();if(i){let s=la(i);s&&(this.#h=s.h,this.#p=s.m,this.#u=s.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:It(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u}})))}this.#F(),this.#b&&this.#q(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#R=(t,i)=>{let s=this.#a.indexOf(i);switch(t.key){case"ArrowUp":t.preventDefault(),this.#x(i,i.step);break;case"ArrowDown":t.preventDefault(),this.#x(i,-i.step);break;case"ArrowRight":t.preventDefault(),s<this.#a.length-1?this.#z(s+1):this.#c&&this.#c.focus();break;case"ArrowLeft":t.preventDefault(),s>0&&this.#z(s-1);break;case"PageUp":t.preventDefault(),this.#x(i,i.step*(i.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#x(i,-i.step*(i.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#A(i,i.min);break;case"End":t.preventDefault(),this.#A(i,i.max);break;case"Escape":t.preventDefault(),this.#q(),this.#i.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#E(t.key,i))}};#T="";#_=0;#E(t,i){clearTimeout(this.#_),this.#T+=t;let s=Number(this.#T);if(this.#T.length>=2||s*10>i.max){let n=Math.min(Math.max(s,i.min),i.max);this.#A(i,n),this.#T=""}else this.#_=setTimeout(()=>{let n=Number(this.#T),r=Math.min(Math.max(n,i.min),i.max);this.#A(i,r),this.#T=""},800)}#x(t,i){let s;t.label==="Hours"?s=this.#o==="12h"?this.#D():this.#h:t.label==="Minutes"?s=this.#p:s=this.#u;let n=Td(s+i,t.min,t.max);this.#A(t,n)}#A(t,i){t.label==="Hours"?this.#o==="12h"?this.#h=this.#O(i,this.#l):this.#h=i:t.label==="Minutes"?this.#p=i:this.#u=i,this.#M()}#M(t="internal"){this.#H(),this.#F(),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:It(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u,source:t}}))}#H(){let t=this.#o==="12h"?this.#D():this.#h;this.#a[0].valueEl.textContent=F(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#o==="12h"?`${t} ${this.#l}`:String(t)),this.#a[1].valueEl.textContent=F(this.#p),this.#a[1].el.setAttribute("aria-valuenow",String(this.#p)),this.#f&&this.#a[2]&&(this.#a[2].valueEl.textContent=F(this.#u),this.#a[2].el.setAttribute("aria-valuenow",String(this.#u))),this.#c&&(this.#c.textContent=this.#l)}#F(){this.#h!==void 0&&(this.#i.value=kd(this.#h,this.#p,this.#u,this.#f,this.#o))}#P(){let t=It(this.#h,this.#p,this.#u,this.#f);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#V(){if((this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#t.value){this.#e.setValidity({valueMissing:!0},"Please select a time",this.#i||this);return}this.#e.setValidity({})}#O(t,i){return i==="AM"?t===12?0:t:t===12?12:t+12}#D(){if(this.#o==="24h")return this.#h;let t=this.#h%12;return t===0?12:t}#z(t){this.#a[t]?.el.focus()}formResetCallback(){let t=bt(this.#w);t?(this.#h=t.h,this.#p=t.m,this.#u=t.s):(this.#h=0,this.#p=0,this.#u=0),this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M()}formStateRestoreCallback(t){if(!t)return;let i=bt(t);i&&(this.#h=i.h,this.#p=i.m,this.#u=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M())}get value(){return It(this.#h,this.#p,this.#u,this.#f)}set value(t){let i=bt(t);i&&(i.h===this.#h&&i.m===this.#p&&i.s===this.#u||(this.#h=i.h,this.#p=i.m,this.#u=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M("api")))}};b("time-picker",Ni);var ue="popover"in HTMLElement.prototype;var Ld=["Su","Mo","Tu","We","Th","Fr","Sa"],Nd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Di=["january","february","march","april","may","june","july","august","september","october","november","december"];function B(e){let t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function R(e){if(!e)return null;let[t,i,s]=e.split("-").map(Number);return new Date(t,i-1,s)}function he(e,t){return new Date(e,t+1,0).getDate()}function Md(){try{let e=new Intl.Locale(navigator.language);if(e.weekInfo)return e.weekInfo.firstDay%7}catch{}return 0}function _d(e){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return B(e)}}function fe(e,t){return e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Dd(){let e=new Map;Di.forEach((t,i)=>{e.set(t,i),e.set(t.slice(0,3),i)});try{for(let t=0;t<12;t++){let i=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(2e3,t,1)).toLowerCase(),s=new Intl.DateTimeFormat(void 0,{month:"short"}).format(new Date(2e3,t,1)).toLowerCase().replace(".","");e.set(i,t),e.set(s,t)}}catch{}return e}var Mi=Dd();function _i(e){let t=e.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=R(t);return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}if(/^\d{4}\/\d{2}\/\d{2}$/.test(t)){let a=R(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let i=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,s=t.match(i);if(s){let a=Mi.get(s[1].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[2]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let n=/^(\d{1,2})\s+([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(n),s){let a=Mi.get(s[2].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[1]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let r=/^([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(r),s){let a=Mi.get(s[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(s[2]),month:a}}}return{date:null,partial:null}}var Ii=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#c;#o;#f;#h=!1;#p=!1;#u=null;#l=null;#m=new Date().getFullYear();#d=new Date().getMonth();#y=null;#w=null;#v=new Map;#b=new Map;#g=null;#C=0;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="date"]'),!this.#t)return!1;this.#y=R(this.#t.getAttribute("min")),this.#w=R(this.#t.getAttribute("max")),this.#C=Md();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#v.set(r,a||"")});let i=this.getAttribute("data-highlight-dates");i&&i.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#b.set(r,a||"")}),this.#u=R(this.#t.value),this.#g=this.#t.value;let s=new Date;return this.#w&&s>this.#w&&(s=this.#w),this.#y&&s<this.#y&&(s=this.#y),this.#m=this.#u?this.#u.getFullYear():s.getFullYear(),this.#d=this.#u?this.#u.getMonth():s.getMonth(),this.#l=this.#u||s,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#N(),this.#L(),this.#T(),this.#D(),this.#z(),this.#p=ue,this.#p&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#P),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}teardown(){window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}#N(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="date-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a date\u2026"),this.#r.appendChild(this.#i),this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="date-trigger-icon",this.#s.setAttribute("aria-label","Toggle calendar"),this.#s.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#s.appendChild(t),this.#r.appendChild(this.#s),this.appendChild(this.#r),this.listen(this.#s,"click",i=>{i.stopPropagation(),this.#h?this.#E():this.#_(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"input",this.#M),this.listen(this.#i,"keydown",this.#H),this.listen(this.#i,"blur",this.#F)}#L(){this.#a=`dp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="calendar",this.#n.id=this.#a,this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-modal","false"),this.#n.setAttribute("aria-label","Choose date"),this.#n.hidden=!0,this.#i.setAttribute("aria-controls",this.#a);let t=document.createElement("div");t.className="calendar-header";let i=document.createElement("button");i.type="button",i.className="calendar-nav",i.setAttribute("aria-label","Previous month");let s=document.createElement("icon-wc");s.setAttribute("name","chevron-left"),s.setAttribute("size","sm"),s.setAttribute("aria-hidden","true"),i.appendChild(s);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#o=document.createElement("span"),this.#o.className="calendar-month",this.#f=document.createElement("select"),this.#f.className="calendar-year",this.#f.setAttribute("aria-label","Year"),this.#k(),n.appendChild(this.#o),n.appendChild(this.#f);let r=document.createElement("button");r.type="button",r.className="calendar-nav",r.setAttribute("aria-label","Next month");let a=document.createElement("icon-wc");a.setAttribute("name","chevron-right"),a.setAttribute("size","sm"),a.setAttribute("aria-hidden","true"),r.appendChild(a),t.appendChild(i),t.appendChild(n),t.appendChild(r),this.#n.appendChild(t);let o=document.createElement("table");o.setAttribute("role","grid"),o.setAttribute("aria-labelledby",`${this.#a}-title`);let c=document.createElement("thead"),d=document.createElement("tr");for(let l=0;l<7;l++){let u=(this.#C+l)%7,h=document.createElement("th");h.setAttribute("abbr",Nd[u]),h.setAttribute("scope","col"),h.textContent=Ld[u],d.appendChild(h)}c.appendChild(d),o.appendChild(c),this.#c=document.createElement("tbody"),o.appendChild(this.#c),this.#n.appendChild(o),this.appendChild(this.#n),this.#S(),this.listen(i,"click",()=>this.#I(-1)),this.listen(r,"click",()=>this.#I(1)),this.listen(this.#f,"change",()=>{this.#m=Number(this.#f.value);let l=he(this.#m,this.#d),u=Math.min(this.#l?.getDate()??1,l);this.#l=new Date(this.#m,this.#d,u),this.#S()}),this.listen(this.#c,"click",this.#V),this.listen(this.#n,"keydown",this.#O)}#S(){try{this.#o.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#m,this.#d,1))}catch{this.#o.textContent=Di[this.#d].charAt(0).toUpperCase()+Di[this.#d].slice(1)}this.#f.querySelector(`option[value="${this.#m}"]`)||this.#k(),this.#f.value=String(this.#m),this.#c.innerHTML="";let t=he(this.#m,this.#d),s=(new Date(this.#m,this.#d,1).getDay()-this.#C+7)%7,n=new Date,r=document.createElement("tr");for(let o=0;o<s;o++)r.appendChild(document.createElement("td"));for(let o=1;o<=t;o++){let c=new Date(this.#m,this.#d,o),d=B(c),l=document.createElement("td"),u=document.createElement("button");u.type="button",u.setAttribute("data-date",d),u.textContent=String(o),fe(c,n)&&u.setAttribute("aria-current","date"),fe(c,this.#u)&&u.setAttribute("aria-selected","true");let h=this.#q(c,d);if(h.disabled&&(u.setAttribute("aria-disabled","true"),u.setAttribute("disabled",""),h.reason&&u.setAttribute("data-disabled-reason",h.reason)),this.#b.has(d)){let f=this.#b.get(d);u.setAttribute("data-highlight",f||"")}fe(c,this.#l)?(u.setAttribute("tabindex","0"),fe(c,this.#u)||u.setAttribute("data-focused","")):u.setAttribute("tabindex","-1"),l.appendChild(u),r.appendChild(l),(s+o)%7===0&&(this.#c.appendChild(r),r=document.createElement("tr"))}let a=(s+t)%7;if(a>0){for(let o=a;o<7;o++)r.appendChild(document.createElement("td"));this.#c.appendChild(r)}}#B(t,i){return this.#q(t,i).disabled}#q(t,i){return this.#v.has(i)?{disabled:!0,reason:this.#v.get(i)}:this.#y&&t<this.#y?{disabled:!0,reason:null}:this.#w&&t>this.#w?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#k(){this.#f.innerHTML="";let t=new Date().getFullYear(),i=this.#y?this.#y.getFullYear():t-100,s=this.#w?this.#w.getFullYear():t+10;for(let n=i;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#f.appendChild(r)}}#I(t){this.#d+=t,this.#d>11?(this.#d=0,this.#m++):this.#d<0&&(this.#d=11,this.#m--);let i=he(this.#m,this.#d),s=Math.min(this.#l?.getDate()??1,i);this.#l=new Date(this.#m,this.#d,s),this.#S(),this.#R(this.#l)}#$(t,i="internal"){let s=B(t);this.#B(t,s)||this.#u&&B(this.#u)===s||(this.#u=t,this.#l=t,this.#T(),this.#D(),this.#z(),this.#S(),this.#E(),this.#i.focus(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:s,date:new Date(t),source:i}})))}#R(t){let i=B(t),s=this.#c.querySelector(`[data-date="${i}"]`);s&&(this.#c.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),s.setAttribute("tabindex","0"),s.focus())}#T(){this.#u?this.#i.value=_d(this.#u):this.#i.value=""}#_(){if(!this.#h){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#n.hidden=!1,this.#l&&(this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth()),this.#S(),this.#p){try{this.#n.showPopover()}catch{}this.#x(),window.addEventListener("scroll",this.#A,{capture:!0,passive:!0}),window.addEventListener("resize",this.#A,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#E(){if(this.#h){if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#n.hidden=!0,this.#p){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#x(){if(!this.#p)return;let t=this.#r.getBoundingClientRect(),i=this.#n.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,d;o<i.height&&c>o?(d=t.top-i.height-s,this.#n.dataset.placement="top"):(d=t.bottom+s,delete this.#n.dataset.placement);let l=t.left;l+i.width>a-n&&(l=a-i.width-n),l<n&&(l=n),this.#n.style.setProperty("--calendar-top",`${d}px`),this.#n.style.setProperty("--calendar-left",`${l}px`)}#A=()=>{this.#h&&this.#x()};#M=()=>{let t=this.#i.value,{date:i,partial:s}=_i(t);if(i)this.#l=i,this.#m=i.getFullYear(),this.#d=i.getMonth(),this.#S();else if(s){this.#m=s.year,this.#d=s.month;let n=he(s.year,s.month),r=Math.min(this.#l?.getDate()??1,n);this.#l=new Date(s.year,s.month,r),this.#S()}!this.#h&&t.length>0&&this.#_()};#H=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:i}=_i(this.#i.value);i&&!this.#B(i,B(i))&&this.#$(i);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#h||this.#_(),requestAnimationFrame(()=>this.#R(this.#l));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#h&&this.#E(),this.#T();return;case"Tab":this.#h&&this.#E();return}};#F=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let i=this.#i.value.trim();if(i){let{date:s}=_i(i);s&&!this.#B(s,B(s))&&(this.#u=s,this.#l=s,this.#D(),this.#z(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:B(s),date:new Date(s)}})))}this.#T(),this.#h&&this.#E(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#P=t=>{this.#h&&!this.contains(t.target)&&this.#E()};#V=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.hasAttribute("disabled"))return;let n=R(s.getAttribute("data-date"));n&&this.#$(n)};#O=t=>{if(t.key==="Tab"){this.#E();return}let i=this.#l;if(!i)return;let s;switch(t.key){case"ArrowRight":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+1);break;case"ArrowLeft":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-1);break;case"ArrowDown":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+7);break;case"ArrowUp":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-7);break;case"PageDown":t.shiftKey?s=new Date(i.getFullYear()+1,i.getMonth(),i.getDate()):s=new Date(i.getFullYear(),i.getMonth()+1,i.getDate());break;case"PageUp":t.shiftKey?s=new Date(i.getFullYear()-1,i.getMonth(),i.getDate()):s=new Date(i.getFullYear(),i.getMonth()-1,i.getDate());break;case"Home":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+this.#C);break;case"End":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+(6-i.getDay()+this.#C));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#$(i);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#E(),this.#i.focus();return;default:return}t.preventDefault(),t.stopPropagation(),s&&(this.#y&&s<this.#y&&(s=this.#y),this.#w&&s>this.#w&&(s=this.#w),this.#l=s,(s.getMonth()!==this.#d||s.getFullYear()!==this.#m)&&(this.#d=s.getMonth(),this.#m=s.getFullYear(),this.#S()),this.#R(s))};#D(){let t=this.#u?B(this.#u):"";this.#e.setFormValue(t||null),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#z(){(this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#u?this.#e.setValidity({valueMissing:!0},"Please select a date",this.#i||this):this.#e.setValidity({})}formResetCallback(){this.#u=R(this.#g);let t=new Date;this.#l=this.#u||t,this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth(),this.#T(),this.#D(),this.#z(),this.#h&&this.#S()}formStateRestoreCallback(t){t&&(this.#u=R(t),this.#u&&(this.#l=this.#u,this.#m=this.#u.getFullYear(),this.#d=this.#u.getMonth(),this.#T(),this.#D(),this.#z()))}get value(){return this.#u?B(this.#u):""}set value(t){let i=R(t);i&&this.#$(i,"api")}get min(){return this.#y?B(this.#y):""}set min(t){this.#y=t?R(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#S()}get max(){return this.#w?B(this.#w):""}set max(t){this.#w=t?R(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#S()}};b("date-picker",Ii);Nt();function gt(e,t,i){t/=100,i/=100;let s=a=>(a+e/30)%12,n=t*Math.min(i,1-i),r=a=>i-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function pe(e,t,i){e/=255,t/=255,i/=255;let s=Math.max(e,t,i),n=Math.min(e,t,i),r=(s+n)/2,a=0,o=0;if(s!==n){let c=s-n;switch(o=r>.5?c/(2-s-n):c/(s+n),s){case e:a=((t-i)/c+(t<i?6:0))/6;break;case t:a=((i-e)/c+2)/6;break;case i:a=((e-t)/c+4)/6;break}}return{h:Math.round(a*360),s:Math.round(o*100),l:Math.round(r*100)}}function Id(e){e=e.replace(/^#/,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function Od(e,t,i){return"#"+[e,t,i].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function J(e){let{r:t,g:i,b:s}=Id(e);return pe(t,i,s)}function Z(e,t,i){let{r:s,g:n,b:r}=gt(e,t,i);return Od(s,n,r)}function M(e,t,i){return Math.max(t,Math.min(i,e))}function Oi(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function qi(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(M(t,0,1)*255)}function qd(e,t,i){let s=Oi(e),n=Oi(t),r=Oi(i),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,d=Math.cbrt(a),l=Math.cbrt(o),u=Math.cbrt(c),h=.2104542553*d+.793617785*l-.0040720468*u,f=1.9779984951*d-2.428592205*l+.4505937099*u,v=.0259040371*d+.7827717662*l-.808675766*u,p=Math.sqrt(f*f+v*v),m=Math.atan2(v,f)*180/Math.PI;return m<0&&(m+=360),p<1e-4&&(m=0),{L:h,C:p,H:m}}function $d(e,t,i){let s=i*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=e+.3963377774*n+.2158037573*r,o=e-.1055613458*n-.0638541728*r,c=e-.0894841775*n-1.291485548*r,d=a**3,l=o**3,u=c**3,h=4.0767416621*d-3.3077115913*l+.2309699292*u,f=-1.2684380046*d+2.6097574011*l-.3413193965*u,v=-.0041960863*d-.7034186147*l+1.707614701*u;return{r:qi(h),g:qi(f),b:qi(v)}}function $i(e,t,i){let s=gt(e,t,i);return qd(s.r,s.g,s.b)}function da(e,t,i){let{r:s,g:n,b:r}=$d(e,t,i);return pe(s,n,r)}function Bd(e,t,i){return Z(e,t,i)}function Pd(e,t,i){let{r:s,g:n,b:r}=gt(e,t,i);return`rgb(${s} ${n} ${r})`}function Fd(e,t,i){return`hsl(${e}deg ${t}% ${i}%)`}function Rd(e,t,i){let{L:s,C:n,H:r}=$i(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function ua(e,t,i,s){switch(e){case"rgb":return Pd(t,i,s);case"hsl":return Fd(t,i,s);case"oklch":return Rd(t,i,s);default:return Bd(t,i,s)}}var vt=["hex","rgb","hsl","oklch"],Hd="hex",Bi=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#c;#o;#f;#h;#p={};#u=Hd;#l;#m;#d;#y=!1;#w=!1;#v=0;#b=100;#g=50;#C;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="color"]'),!this.#t)return!1;let t=this.getAttribute("format");t&&vt.includes(t)&&(this.#u=t);let i=this.#t.value||"#000000";this.#C=i;let s=J(i);return this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#N(),this.#L(),this.#D(),this.#j(),this.#w=ue,this.#w&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#G),(this.#t.disabled||this.hasAttribute("disabled"))&&this.setAttribute("data-disabled",""),!0}teardown(){window.removeEventListener("scroll",this.#U,{capture:!0}),window.removeEventListener("resize",this.#U)}#N(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#s=document.createElement("span"),this.#s.className="color-swatch",this.#r=document.createElement("span"),this.#r.className="color-hex",this.#i.appendChild(this.#s),this.#i.appendChild(this.#r),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#y?this.#W():this.#z()})}#L(){this.#n=document.createElement("div"),this.#n.className="color-panel",this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-label","Color picker"),this.#a=document.createElement("div"),this.#a.className="color-area",this.#a.setAttribute("role","slider"),this.#a.setAttribute("aria-label","Saturation and lightness"),this.#a.setAttribute("tabindex","0"),this.#c=document.createElement("div"),this.#c.className="color-area-thumb",this.#a.appendChild(this.#c),this.#n.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#o=document.createElement("div"),this.#o.className="color-hue",this.#o.setAttribute("role","slider"),this.#o.setAttribute("aria-label","Hue"),this.#o.setAttribute("aria-valuemin","0"),this.#o.setAttribute("aria-valuemax","360"),this.#o.setAttribute("tabindex","0"),this.#f=document.createElement("div"),this.#f.className="color-hue-thumb",this.#o.appendChild(this.#f),t.appendChild(this.#o),this.#n.appendChild(t);let i=document.createElement("div");i.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#h=document.createElement("select"),this.#h.className="color-format-select";for(let o of vt){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#h.appendChild(c)}this.#h.value=this.#u,s.appendChild(n),s.appendChild(this.#h),i.appendChild(s),this.#n.appendChild(i),this.listen(this.#h,"change",this.#q),this.#p.hex=this.#S("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#p.rgb=this.#S("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#p.hsl=this.#S("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#p.oklch=this.#S("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of vt)this.#n.appendChild(this.#p[o].wrapper);this.#B();let r=this.querySelector(":scope > datalist");if(r){this.#l=document.createElement("div"),this.#l.className="color-swatches",this.#l.setAttribute("role","listbox"),this.#l.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("role","option"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#l.appendChild(c)}this.#n.appendChild(this.#l),this.listen(this.#l,"click",this.#F)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-eyedropper",this.#m.setAttribute("aria-label","Pick color from screen"),this.#m.textContent="\u{1F4A7}",a.appendChild(this.#m),this.listen(this.#m,"click",this.#P)),this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-copy",this.#d.setAttribute("aria-label","Copy hex value"),this.#d.textContent="Copy",a.appendChild(this.#d),this.listen(this.#d,"click",this.#V),this.#n.appendChild(a),this.appendChild(this.#n),this.listen(this.#a,"pointerdown",this.#k),this.listen(this.#a,"keydown",this.#$),this.listen(this.#o,"pointerdown",this.#R),this.listen(this.#o,"keydown",this.#_);for(let o of vt){let c=o==="hex"?this.#x:o==="rgb"?this.#A:o==="hsl"?this.#M:this.#H;for(let{el:d}of this.#p[o].inputs)this.listen(d,"change",c)}}#S(t,i){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of i){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#B(){for(let t of vt)this.#p[t].wrapper.hidden=t!==this.#u;this.#d&&this.#d.setAttribute("aria-label",`Copy ${this.#u.toUpperCase()} value`)}#q=()=>{let t=this.#h.value;vt.includes(t)&&(this.#u=t,this.#B(),this.#D())};#k=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#I(t);let i=n=>this.#I(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",i),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",i),this.#a.addEventListener("pointerup",s)};#I(t){let i=this.#a.getBoundingClientRect(),s=M((t.clientX-i.left)/i.width,0,1),n=M((t.clientY-i.top)/i.height,0,1);this.#b=Math.round(s*100),this.#g=Math.round((1-n)*100),this.#O()}#$=t=>{let i=t.shiftKey?10:1;switch(t.key){case"ArrowRight":t.preventDefault(),this.#b=M(this.#b+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#b=M(this.#b-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#g=M(this.#g+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#g=M(this.#g-i,0,100);break;default:return}this.#O()};#R=t=>{t.preventDefault(),this.#o.setPointerCapture(t.pointerId),this.#T(t);let i=n=>this.#T(n),s=n=>{this.#o.releasePointerCapture(n.pointerId),this.#o.removeEventListener("pointermove",i),this.#o.removeEventListener("pointerup",s)};this.#o.addEventListener("pointermove",i),this.#o.addEventListener("pointerup",s)};#T(t){let i=this.#o.getBoundingClientRect(),s=M((t.clientX-i.left)/i.width,0,1);this.#v=Math.round(s*360),this.#O()}#_=t=>{let i=t.shiftKey?10:1;switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#v=(this.#v+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#v=(this.#v-i+361)%361;break;default:return}this.#O()};#E(t,i){return this.#p[t].inputs.find(s=>s.channel===i)?.el}#x=()=>{let t=this.#E("hex","hex");if(!t)return;let i=t.value.trim();if(i.startsWith("#")||(i="#"+i),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(i)){let s=J(i);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#O()}};#A=()=>{let t=M(Number(this.#E("rgb","r").value)||0,0,255),i=M(Number(this.#E("rgb","g").value)||0,0,255),s=M(Number(this.#E("rgb","b").value)||0,0,255),n=pe(t,i,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O()};#M=()=>{let t=M(Number(this.#E("hsl","h").value)||0,0,360)%361,i=M(Number(this.#E("hsl","s").value)||0,0,100),s=M(Number(this.#E("hsl","l").value)||0,0,100);this.#v=t,this.#b=i,this.#g=s,this.#O()};#H=()=>{let t=M(Number(this.#E("oklch","oL").value)||0,0,100)/100,i=M(Number(this.#E("oklch","oC").value)||0,0,.4),s=M(Number(this.#E("oklch","oH").value)||0,0,360),n=da(t,i,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O()};#F=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=J(s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O()};#P=async()=>{try{let i=await new window.EyeDropper().open(),s=J(i.sRGBHex);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#O()}catch{}};#V=()=>{let t=ua(this.#u,this.#v,this.#b,this.#g);nt(t,{button:this.#d,announceMessage:"Color copied"})};#O(t="internal"){this.#D(),this.#j();let i=Z(this.#v,this.#b,this.#g),s=gt(this.#v,this.#b,this.#g);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:i,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:this.#v,s:this.#b,l:this.#g},source:t}}))}#D(){let t=Z(this.#v,this.#b,this.#g),i=gt(this.#v,this.#b,this.#g),s=Z(this.#v,100,50);this.#s.style.background=t,this.#r.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#c.style.insetInlineStart=`${this.#b}%`,this.#c.style.insetBlockStart=`${100-this.#g}%`,this.#c.style.background=t,this.#a.setAttribute("aria-valuetext",`Saturation ${this.#b}%, Lightness ${this.#g}%`),this.#f.style.insetInlineStart=`${this.#v/360*100}%`,this.#o.setAttribute("aria-valuenow",String(this.#v)),this.#o.setAttribute("aria-valuetext",`Hue ${this.#v}\xB0`);let n=(a,o,c)=>{let d=this.#E(a,o);d&&(d.value=String(c))};n("hex","hex",t),n("rgb","r",i.r),n("rgb","g",i.g),n("rgb","b",i.b),n("hsl","h",this.#v),n("hsl","s",this.#b),n("hsl","l",this.#g);let r=$i(this.#v,this.#b,this.#g);n("oklch","oL",(r.L*100).toFixed(1)),n("oklch","oC",r.C.toFixed(3)),n("oklch","oH",r.H.toFixed(1))}#z(){if(!this.#y){if(this.#y=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#w){this.#Y();try{this.#n.showPopover()}catch{}window.addEventListener("scroll",this.#U,{capture:!0,passive:!0}),window.addEventListener("resize",this.#U,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#W(){if(this.#y){if(this.#y=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#w){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#U,{capture:!0}),window.removeEventListener("resize",this.#U)}this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}}#Y(){if(!this.#w)return;let t=this.#i.getBoundingClientRect();this.#n.style.setProperty("--panel-top",`${t.bottom+4}px`),this.#n.style.setProperty("--panel-left",`${t.left}px`)}#U=()=>{this.#y&&this.#Y()};#G=t=>{this.#y&&!this.contains(t.target)&&this.#W()};#j(){let t=Z(this.#v,this.#b,this.#g);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){let t=J(this.#C);this.#v=t.h,this.#b=t.s,this.#g=t.l,this.#D(),this.#j()}formStateRestoreCallback(t){if(!t)return;let i=J(t);this.#v=i.h,this.#b=i.s,this.#g=i.l,this.#D(),this.#j()}get value(){return Z(this.#v,this.#b,this.#g)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=Z(this.#v,this.#b,this.#g).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=J(t);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O("api")}};b("color-picker",Bi);var zd='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"/></svg>',Vd='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function Ud(e){if(!e)return[];let t=e.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(i=>{let s=i.trim();return{value:s,label:s}})}function Wd(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function jd(e){let t=Math.max(0,Math.round(e)),i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return i>0?`${i}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Yd(e,t){let i=Number(e)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(i);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${i<0?"-":""}${a.format(r)} ${s[n]}`}function Gd(){return document.documentElement.lang||void 0}function Pi(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var Fi=class extends g{static formAssociated=!0;static observedAttributes=["value","disabled","readonly"];#e;#t;#i=-1/0;#s=1/0;#r=1;#n=[];#a=[];#c;#o;#f="";#h=!1;#p=!1;#u;#l;#m;#d;#y;#w;#v;#b;#g;#C=0;#N=0;#L=!1;#S=!1;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){this.#B(),this.#q(),this.#$();let t=this.getAttribute("value");this.#m=t,this.#P(t??this.#I(),"init")}attributeChangedCallback(t,i,s){!this.isConnected||!this.#d||(t==="value"?this.#P(s??this.#I(),"attr"):(t==="disabled"||t==="readonly")&&this.#E())}#B(){this.hasAttribute("data-options")?this.#t="enum":this.hasAttribute("data-values")?this.#t="token":this.hasAttribute("data-format")||this.hasAttribute("data-suffix")?this.#t="formatted":(this.#t="numeric",console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/concepts/numeric-inputs/'))}#q(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#s=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#r=Number(this.getAttribute("data-step"))||1,this.#n=Wd(this.getAttribute("data-values")),this.#a=Ud(this.getAttribute("data-options")),this.#c=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#o=this.getAttribute("data-currency")||"USD",this.#f=this.getAttribute("data-suffix")||"",this.#h=this.hasAttribute("data-show-label"),this.#p=this.hasAttribute("data-accelerate"),this.#u=Gd(),this.#g=this.#k()}#k(){if(!this.#c)return null;let t=Pi(this.#r);return this.#c==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#c==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#o}):this.#c==="percent"?new Intl.NumberFormat(this.#u,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#I(){return this.#t==="enum"?this.#a[0]?.value??"":this.#t==="token"?this.#n[0]??"":"0"}#$(){this.replaceChildren(),this.#v=document.createElement("button"),this.#v.type="button",this.#v.className="stepper-dec",this.#v.setAttribute("aria-label","Decrease"),this.#v.setAttribute("tabindex","-1"),this.#v.innerHTML=zd,this.#b=document.createElement("button"),this.#b.type="button",this.#b.className="stepper-inc",this.#b.setAttribute("aria-label","Increase"),this.#b.setAttribute("tabindex","-1"),this.#b.innerHTML=Vd,this.#d=document.createElement("span"),this.#d.className="stepper-value",this.#d.setAttribute("role","spinbutton"),this.#d.setAttribute("tabindex","0"),this.#y=document.createElement("span"),this.#y.className="stepper-value-display",this.#d.appendChild(this.#y),this.#w=new Set;for(let t of this.#z())this.#W(t);this.appendChild(this.#v),this.appendChild(this.#d),this.appendChild(this.#b),this.#R(this.#v,-1),this.#R(this.#b,1),this.listen(this.#d,"keydown",this.#T),this.#E()}#R(t,i){if(this.listen(t,"click",n=>{if(this.#S){this.#S=!1,n.preventDefault();return}this.#x(i,1)}),!this.#p)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#_()||(this.#L=!1,this.#C=window.setTimeout(()=>{this.#L=!0,this.#N=window.setInterval(()=>this.#x(i,1),100),this.#C=window.setTimeout(()=>{window.clearInterval(this.#N),this.#N=window.setInterval(()=>this.#x(i,5),50)},1e3)},500))});let s=()=>{window.clearTimeout(this.#C),window.clearInterval(this.#N),this.#C=0,this.#N=0,this.#L&&(this.#S=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T=t=>{if(!this.#_())switch(t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#x(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#x(-1,1);break;case"PageUp":t.preventDefault(),this.#x(1,10);break;case"PageDown":t.preventDefault(),this.#x(-1,10);break;case"Home":t.preventDefault(),this.#A("min");break;case"End":t.preventDefault(),this.#A("max");break;default:}};#_(){return this.hasAttribute("disabled")||this.hasAttribute("readonly")}#E(){let t=this.hasAttribute("disabled");this.#v.disabled=t,this.#b.disabled=t,this.#d.setAttribute("aria-disabled",String(t)),t?this.#d.removeAttribute("tabindex"):this.#d.setAttribute("tabindex","0")}#x(t,i){if(this.#_())return;let s=this.#M(t,i);s===null||s===this.#l||this.#P(s,"step")}#A(t){if(this.#t==="enum"){let s=t==="min"?0:this.#a.length-1;this.#P(this.#a[s]?.value,"step");return}if(this.#t==="token"){let s=t==="min"?0:this.#n.length-1;this.#P(this.#n[s],"step");return}let i=t==="min"?this.#i===-1/0?this.#l:this.#i:this.#s===1/0?this.#l:this.#s;this.#P(String(i),"step")}#M(t,i){if(this.#t==="enum"){let c=this.#a.findIndex(u=>u.value===this.#l),d=c===-1?0:c,l=Math.min(this.#a.length-1,Math.max(0,d+t*i));return this.#a[l]?.value}if(this.#t==="token"){let d=this.#H(this.#l);d===-1&&(d=this.#F(this.#l));let l=Math.min(this.#n.length-1,Math.max(0,d+t*i));return this.#n[l]}let s=Number(this.#l)||0,n=Pi(this.#r),r=s+t*this.#r*i,a=Number(r.toFixed(n)),o=Math.min(this.#s,Math.max(this.#i,a));return String(o)}#H(t){if(t==null)return-1;let i=this.#n.indexOf(String(t));if(i!==-1)return i;let s=Number(t);if(Number.isFinite(s)){let n=this.#n.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#F(t){let i=Number(t);if(!Number.isFinite(i))return 0;let s=0,n=1/0;return this.#n.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-i);c<n&&(n=c,s=a)}),s}#P(t,i){let s=this.#V(t),n=s!==this.#l;this.#l=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#O(),this.#Y(),this.#U(),this.#X(),this.#K(),n&&i!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#V(t){if(t==null)return this.#I();if(this.#t==="enum"){let n=String(t);return this.#a.find(a=>a.value===n)?n:this.#a[0]?.value??""}if(this.#t==="token")return String(t);let i=Number(t);if(!Number.isFinite(i))return String(this.#i===-1/0?0:this.#i);let s=Pi(this.#r);return String(Number(Math.min(this.#s,Math.max(this.#i,i)).toFixed(s)))}#O(){let t=this.#D();this.#y.textContent=t,this.#W(t)}#D(t=this.#l){if(this.#t==="enum")return this.#a.find(s=>s.value===t)?.label??t??"";if(this.#t==="token"){let i=this.#h?String(t).replace(/^--/,""):String(t);return this.#f?`${i}${this.#f}`:i}if(this.#t==="formatted"){let i=Number(t)||0;if(this.#c==="duration")return jd(i);if(this.#c==="bytes")return Yd(i,this.#u);if(this.#g){let s=this.#c==="percent"?i/100:i,n=this.#g.format(s);return this.#f&&this.#c==="number"?`${n}${this.#f}`:n}return this.#f?`${i}${this.#f}`:String(i)}return String(t??"")}#z(){if(this.#t==="enum")return this.#a.map(s=>this.#D(s.value));if(this.#t==="token")return this.#n.map(s=>this.#D(s));let t=new Set,i=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&i(this.#i),this.#s!==1/0&&i(this.#s),i(Number(this.getAttribute("value"))||0),this.#s===1/0){let s=[10,100,1e3,1e4];for(let n of s)i(n);if(this.#c==="bytes")for(let n of[999,999e3,999e6,999e9])i(n)}return[...t].map(s=>this.#D(String(s)))}#W(t){let i=String(t??"");if(!i||this.#w.has(i))return;this.#w.add(i);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=i,this.#d.appendChild(s)}recomputeWidth(){if(this.#d){this.#d.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#w=new Set;for(let t of this.#z())this.#W(t)}}#Y(){if(this.#t==="enum"){let i=this.#a.findIndex(s=>s.value===this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#a.length)),this.#d.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}if(this.#t==="token"){let i=this.#H(this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#n.length)),this.#d.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}let t=Number(this.#l)||0;this.#i!==-1/0?this.#d.setAttribute("aria-valuemin",String(this.#i)):this.#d.removeAttribute("aria-valuemin"),this.#s!==1/0?this.#d.setAttribute("aria-valuemax",String(this.#s)):this.#d.removeAttribute("aria-valuemax"),this.#d.setAttribute("aria-valuenow",String(t)),this.#d.setAttribute("aria-valuetext",this.#D())}#U(){let t=this.#G(),i=this.#j();this.#v.disabled=t||this.hasAttribute("disabled"),this.#b.disabled=i||this.hasAttribute("disabled")}#G(){return this.#t==="enum"?this.#l===this.#a[0]?.value:this.#t==="token"?this.#H(this.#l)===0:this.#i!==-1/0&&Number(this.#l)<=this.#i}#j(){return this.#t==="enum"?this.#l===this.#a[this.#a.length-1]?.value:this.#t==="token"?this.#H(this.#l)===this.#n.length-1:this.#s!==1/0&&Number(this.#l)>=this.#s}#X(){this.#e.setFormValue(String(this.#l??""))}#K(){this.setState("at-min",this.#G()),this.setState("at-max",this.#j())}formResetCallback(){this.#P(this.#m??this.#I(),"reset")}formStateRestoreCallback(t){t!=null&&this.#P(t,"restore")}get displayText(){return this.#y?.textContent??""}get value(){return this.#l==null?"":String(this.#l)}set value(t){String(t)!==String(this.#l)&&this.#P(t,"api")}get form(){return this.#e.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#e.validity}get validationMessage(){return this.#e.validationMessage}checkValidity(){return this.#e.checkValidity()}reportValidity(){return this.#e.reportValidity()}};b("stepper-wc",Fi);var Kd=new Set(["live","recording","streaming","error","online","running","away","paused","busy","offline","stopped"]),Ri=class extends g{static observedAttributes=["data-variant","data-live"];#e;setup(){let t=document.createElement("span");for(t.className="status-dot",t.setAttribute("aria-hidden","true"),this.#e=document.createElement("span"),this.#e.className="status-label";this.firstChild;)this.#e.appendChild(this.firstChild);this.appendChild(t),this.appendChild(this.#e),this.#t(),this.#i(),this.#r()}attributeChangedCallback(t,i,s){!this.isConnected||i===s||(t==="data-variant"?(this.#i(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:i}}))):t==="data-live"&&this.#t())}#t(){this.getAttribute("data-live")==="off"?(this.removeAttribute("role"),this.removeAttribute("aria-live")):(this.hasAttribute("role")||this.setAttribute("role","status"),this.hasAttribute("aria-live")||this.setAttribute("aria-live","polite"))}#i(){let t=this.getAttribute("data-variant");t&&(Kd.has(t)||this.#s(t)||console.info(`[status-wc] data-variant="${t}" is not a built-in; add a CSS rule (status-wc[data-variant="${t}"] { --status-dot-color: \u2026; }) or use a built-in.`))}#s(t){let i=this.querySelector(".status-dot");if(!i)return!0;let s=getComputedStyle(i).getPropertyValue("--status-dot-color").trim();return s&&s!==""}#r(){let t=this.#e?.textContent.trim(),i=this.hasAttribute("aria-label");!t&&!i&&console.warn("[status-wc] needs slot text or aria-label for accessibility.")}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};b("status-wc",Ri);ae();oe();var ha=0,Hi=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=[];setup(){let t=this.querySelector(":scope > [data-trigger]"),i=this.querySelector('menu, ul[role="menu"]');if(!t||!i)return!1;this.#e=t,this.#t=i;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");return s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++ha}`,this.#i.dataset.mode="auto",this.#i.appendChild(this.#t),this.appendChild(this.#i)),this.#t.parentElement!==this.#i&&this.#i.appendChild(this.#t),this.#e?.setAttribute("aria-expanded","false"),this.#t.setAttribute("role","menu"),this.#t.id||(this.#t.id=`ctx-menu-list-${++ha}`),this.#t.querySelectorAll(":scope > li[data-group]").forEach(n=>{n.setAttribute("role","presentation"),n.classList.add("ctx-group-label")}),this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(n=>!n.disabled&&!n.hasAttribute("data-disabled")),this.#s.forEach(n=>{n.setAttribute("role","menuitem"),n.setAttribute("tabindex","-1"),this.listen(n,"click",this.#h);let r=n.getAttribute("data-shortcut");if(r){let a=document.createElement("kbd");a.className="ctx-kbd",a.textContent=Wr(r),n.appendChild(a);let o=mt(r,()=>n.click());this.#a.push(o)}}),this.#t.querySelectorAll('li:empty:not([data-group]), [role="separator"], hr').forEach(n=>{n.setAttribute("role","separator")}),this.listen(this.#e,"contextmenu",this.#c),this.listen(this.#t,"keydown",this.#f),this.listen(window,"scroll",this.#u,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#p),!0}teardown(){this.#a.forEach(t=>t()),this.#a=[]}get items(){if(!this.#t)return[];let t=[];for(let i of this.#t.querySelectorAll(":scope > li")){if(i.hasAttribute("data-group")){t.push({group:i.textContent.trim()});continue}if(i.matches(':empty, [role="separator"]')||i.querySelector("hr")){t.push({separator:!0});continue}let s=i.querySelector('button, a, [role="menuitem"]');s&&t.push({label:s.textContent.trim().replace(/\s+/g," "),value:s.getAttribute("data-value")||void 0,href:s.tagName==="A"?s.getAttribute("href"):void 0,shortcut:s.getAttribute("data-shortcut")||void 0,disabled:s.disabled||s.hasAttribute("data-disabled")||void 0})}return t}set items(t){let i=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&(a.tagName==="BUTTON"?a.disabled=!0:a.setAttribute("data-disabled","")),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#c=t=>{t.preventDefault(),t.buttons!==0?this.listen(window,"pointerup",()=>{setTimeout(()=>this.#o(t.clientX,t.clientY),0)},{once:!0,capture:!0}):this.#o(t.clientX,t.clientY)};#o(t,i){this.#n=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#i.style.top=`${i}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let s=this.#i.getBoundingClientRect(),n=t+s.width>window.innerWidth?t-s.width:t,r=i+s.height>window.innerHeight?i-s.height:i;this.#i.style.top=`${Math.max(0,r)}px`,this.#i.style.left=`${Math.max(0,n)}px`}),this.#r=-1,this.#l(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.#i?.hide(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))}#f=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#l(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#l(this.#r-1);break;case"Home":t.preventDefault(),this.#l(0);break;case"End":t.preventDefault(),this.#l(this.#s.length-1);break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break;case"Tab":this.close();break}};#h=()=>{this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:this.#s[this.#r]}}))};#p=()=>{this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#u=()=>{this.#n&&this.close()};#l(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}get isOpen(){return this.#n}};b("context-menu",Hi);var zi=class extends g{#e;#t;#i=null;#s=!1;setup(){if(this.#s)return;let t=this.getAttribute("src");return t?(this.#i===null&&(this.#i=this.innerHTML),this.hasAttribute("lazy")?this.#n():this.#a(t),!0):!1}teardown(){this.#e?.disconnect(),this.#t?.abort()}get src(){return this.getAttribute("src")||""}set src(t){let i=t==null?"":String(t);this.src!==i&&(i?this.setAttribute("src",i):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:i,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,i,s){t==="src"&&s&&i!==s&&this.isConnected&&(this.hasAttribute("lazy")&&!this.#r()?this.#n():this.#a(s))}#r(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#n(){this.#e?.disconnect(),this.#e=new IntersectionObserver(t=>{for(let i of t)if(i.isIntersecting){this.#e.disconnect();let s=this.getAttribute("src");s&&this.#a(s)}},{rootMargin:"200px"}),this.#e.observe(this)}async#a(t){this.#t?.abort(),this.#t=new AbortController,this.setAttribute("data-loading",""),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let i=await fetch(t,{signal:this.#t.signal});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);let s=await i.text(),n=this.getAttribute("mode")||"replace";n==="replace"?this.innerHTML=s:n==="append"?this.insertAdjacentHTML("beforeend",s):n==="prepend"&&this.insertAdjacentHTML("afterbegin",s),this.hasAttribute("allow-scripts")?this.querySelectorAll("script").forEach(r=>{let a=document.createElement("script");for(let o of r.attributes)a.setAttribute(o.name,o.value);a.textContent=r.textContent,r.replaceWith(a)}):this.querySelectorAll("script").forEach(r=>r.remove()),this.removeAttribute("data-loading"),this.setAttribute("data-loaded",""),this.#s=!0,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,html:s}}))}catch(i){if(i.name==="AbortError")return;this.removeAttribute("data-loading"),this.setAttribute("data-error",""),(this.getAttribute("mode")||"replace")==="replace"&&this.#i!==null&&!this.#s&&(this.innerHTML=this.#i),this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:i.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};b("include-file",zi);X();var fa="environment",pa="preferences",Vi={timeOfDay:!1,seasonal:!1},Xd=900*1e3,Q={...Vi};function at(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var Ot={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await S.get(fa,pa);Q=e?{...Vi,...e}:{...Vi},(Q.timeOfDay||Q.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...Q}},save(e){return Q={...Q,...e},S.set(fa,pa,Q).catch(()=>{}),{...Q}},setTimeOverride(e){this._timeOverride=e,this._hasActiveSource()&&this._update()},setMonthOverride(e){this._monthOverride=e,this._hasActiveSource()&&this._update()},setSource(e,t){let i=this.save({[e]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(i)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(e){let t=e||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent");let t=e.getAttribute("data-theme");if(t){let i=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(i)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let e=this.load(),t=0;e.timeOfDay&&(t+=this._getTimeOfDayOffset()),e.seasonal&&(t+=this._getSeasonalOffset());let i=document.documentElement;t!==0&&this._baseHues?(i.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),i.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),i.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let e=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return e<5?-20:e<7?at(-20,20,(e-5)/2):e<10?at(20,5,(e-7)/3):e<14?at(5,0,(e-10)/4):e<17?at(0,-5,(e-14)/3):e<19?at(-5,15,(e-17)/2):e<21?at(15,-10,(e-19)/2):at(-10,-20,(e-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let e=this._monthOverride??new Date().getMonth(),i=this._getHemisphere()==="south"?(e+6)%12:e;return i>=2&&i<=4?5:i>=5&&i<=7?10:i>=8&&i<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),Xd))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var me=null;function ba(){return"0.4.0-513cbce1"}function Jd(){let e=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let i of e){let s=i.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function ga(){return me||(me=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),me}function va(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?ma(navigator.serviceWorker.controller,e,t,i):ga().then(s=>{let n=s.active||s.waiting||s.installing;n?ma(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function ma(e,t,i,s){let n=new MessageChannel;n.port1.onmessage=r=>i(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),e.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function ya(){return va("GET_STATUS")}async function wa(){return va("CLEAR_CACHE")}async function Ea(){let e=await ga();return await e.update(),{updated:!!e.waiting}}function Zd(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Zd()){let e=Jd();window.addEventListener("load",()=>{me=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}X();var yt=null,H="settings",$t={motionFx:!0,sounds:!1},Gi=class extends g{#e=null;#t=null;#i=!1;#s=[];#r={...$t};#n=!1;setup(){return this.#a(),!0}async#a(){await this.#c(),this.#v(),this.#g(),this.#V(),this.listen(window,"vb:theme-change",this.#P),this.listen(window,"vb:extensions-change",this.#P),this.listen(window,"vb:a11y-themes-change",this.#P)}teardown(){this.#t?.remove(),this.#t=null}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#r},sticky:this.#n}}set data(t){if(!t||typeof t!="object")return;let i=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],i.push(S.set(H,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#r={...$t,...t.extensions},i.push(S.set(H,"extensions",this.#r))),t.sticky!=null&&(this.#n=!!t.sticky,i.push(S.set(H,"sticky",this.#n?"on":"off"))),Promise.all(i).then(()=>{this.#V?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#c(){let[t,i,s]=await Promise.all([S.get(H,"a11y"),S.get(H,"extensions"),S.get(H,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#r={...$t,...i??{}},this.#n=s==="on"}#o(t){return t!==""&&t!==void 0}#f(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,i){return t?i==="compact"?"compact":i==="spacious"?"spacious":"default":""}#p(){return this.#n}#u(t){return t!==""&&t!==void 0}#l(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#m(t,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#d(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#y(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,i){let s=[];return t&&t!=="card"&&s.push(t),i&&s.push("fixed"),s.join(" ")||"card"}#v(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.setAttribute("data-trigger",""),this.#e.setAttribute("aria-label","Site settings"),this.#e.className="settings-trigger",this.#e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#t=document.createElement("div"),this.#t.className="settings-panel",this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#t.id=t,this.#e.setAttribute("aria-controls",t),this.#t.innerHTML=this.#b(),this.appendChild(this.#t)}#b(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:d,pageBgGradDir:l}=x.getState(),u=this.#W(),h=this.#X(),f=this.#o(s),v=this.#f(s),p=this.#u(n),m=this.#l(n);return`
327
+ `,Mi=class extends b{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of ma){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#e(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=Vd;for(let i of ma){let s=t.querySelector(`slot[name="${i}"]`);s?.addEventListener("slotchange",()=>this.#e(i,s)),this.#e(i,s)}}this.#t(),this.#i(),this.#s()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#t():t==="loading"&&this.#i())}#e(t,i){let s=!!i&&i.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#t(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let i of zd)this.setState(`trend-${i}`,i===t)}#i(){this.setState("loading",this.hasAttribute("loading"))}#s(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};m("score-card",Mi);var Ud=0;function pe(e,t){return e.matches("content-swap")?t:`data-${t}`}function he(e){let t=e.querySelector(':scope > [data-face="front"]'),i=e.querySelector(':scope > [data-face="back"]');if(!t||!i)return;e.style.viewTransitionName||(e.style.viewTransitionName=`content-swap-${++Ud}`);let s=e.matches("content-swap");s||e.setAttribute("data-swap-init","");let n=[];function r(l,d,u,h){l.addEventListener(d,u,h),n.push(()=>l.removeEventListener(d,u,h))}let a=[...e.querySelectorAll("[data-swap]")].filter(l=>l.parentElement?.closest("content-swap, [data-swap]")===e),o=a.length===0,c=e.querySelector(":scope > [data-swap-toggle]");if(o){if(!c){let l=document.createElement("button");l.type="button",l.setAttribute("data-swap-toggle",""),l.textContent="Show back",e.append(l),c=l}r(c,"click",l=>{l.stopPropagation(),at(e,l.detail===0?"keyboard":"pointer")}),r(e,"click",l=>{let u=l.target.closest?.(Wd);u&&u!==e&&e.contains(u)||at(e,"pointer")})}else c&&!c.hasAttribute("data-swap")&&c.remove(),c=null,a.forEach(l=>{r(l,"click",d=>{d.stopPropagation(),at(e,"pointer")}),r(l,"keydown",d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),at(e,"keyboard"))})});if(e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(r(e,"swipe-left",()=>at(e,"pointer")),r(e,"swipe-right",()=>at(e,"pointer"))),!s){let l=new MutationObserver(()=>fe(e,t,i));l.observe(e,{attributes:!0,attributeFilter:["data-swapped"]}),n.push(()=>l.disconnect())}return fe(e,t,i),jd([t,i]),()=>{for(let l of n)l();n.length=0}}var Wd='a[href], button, input, select, textarea, label, summary, [contenteditable=""], [contenteditable="true"], [tabindex]';function jd(e){let t=e.map(i=>i.style.transition);for(let i of e)i.style.transition="none";for(let i of e)getComputedStyle(i).transform;e.forEach((i,s)=>{i.style.transition=t[s]})}function fe(e,t,i){let s=e.hasAttribute(pe(e,"swapped"));t.inert=s,i.inert=!s,e.querySelector(":scope > [data-swap-toggle]")?.setAttribute("aria-pressed",String(s))}function va(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Ot(e,t,i="api"){let{front:s,back:n}=va(e);if(!s||!n)return;let r=pe(e,"swapped");if(t&&e.hasAttribute(r)||!t&&!e.hasAttribute(r))return;let a=document.activeElement,o=()=>{t?e.setAttribute(r,""):e.removeAttribute(r),fe(e,s,n),Yd(e,i);let d=t?n:s,u=t?s:n,h=d.querySelector("[autofocus]");h?h.focus():i==="keyboard"&&u.contains(a)&&Gd(d)},c=d=>{let u=e;typeof u.setState=="function"&&u.setState("transition-running",d)};c(!0);let l=V(o);l&&l.finished&&typeof l.finished.finally=="function"?l.finished.finally(()=>c(!1)):c(!1)}function at(e,t="api"){Ot(e,!e.hasAttribute(pe(e,"swapped")),t)}function Yd(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(pe(e,"swapped")),source:t},bubbles:!0}))}function Gd(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var Ni=class extends b{static observedAttributes=["swapped"];#e=null;attributeChangedCallback(){if(!this.isConnected)return;let{front:t,back:i}=va(this);t&&i&&fe(this,t,i)}setup(){this.#e=he(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){Ot(this,!0)}unflip(){Ot(this,!1)}toggle(){at(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Ot(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Ot(this,!!t)}};m("content-swap",Ni);function ba(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&he(e)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ba):ba();var ga=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&he(s),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&he(n)})}});document.body?ga.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{ga.observe(document.body,{childList:!0,subtree:!0})});var _i=class extends b{#e=null;#t=!1;#i=null;setup(){this.hasAttribute("role")||this.setAttribute("role","navigation"),this.#n("pathname"),this.listen(window,"popstate",this.#r)}get items(){return this.#e?this.#e.map(t=>({...t})):Array.from(this.#s()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let i=t.map(s=>({...s}));this.#e&&this.#f(this.#e,i)||(this.#e=i,this.#l(i),this.#n(this.#t?"property":"pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#t)return this.#i;for(let t of this.#s())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let i=this.current,s=t==null?null:String(t);this.#t=!0,this.#i=s,this.#o(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#t&&(this.#t=!1,this.#i=null,this.#n("pathname"))}refresh(){this.#t||this.#n("pathname")}#s(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#r=()=>{this.#t||this.#n("popstate")};#n(t){let i=this.current,s=this.#a();this.#o(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:t},bubbles:!0,composed:!0}))}#a(){let t=window.location.pathname,i=Array.from(this.#s());if(i.length===0)return null;let s=this.getAttribute("data-match")==="exact",n=null,r=null,a=-1;for(let c of i){let l=c.getAttribute("href");if(!l||/^[a-z]+:/i.test(l)||l.startsWith("//"))continue;let d=l.split("?")[0].split("#")[0];if(d===t&&n==null){n=c;continue}!s&&d!=="/"&&(t===d||t.startsWith(d.replace(/\/$/,"")+"/"))&&d.length>a&&(r=c,a=d.length)}let o=n||r;return o?o.getAttribute("data-route")||o.getAttribute("href"):null}#o(t){let i=this.#s();for(let s of i){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#l(t){this.#s().forEach(n=>n.remove());let s=document.createDocumentFragment();for(let n of t)s.appendChild(this.#c(n));this.appendChild(s)}#c(t){let i=document.createElement("a");if(i.href=t.href||"#",t.route&&i.setAttribute("data-route",t.route),t.external&&(i.target="_blank",i.rel="noopener noreferrer"),t.icon){let s=document.createElement("icon-wc");s.setAttribute("name",String(t.icon)),s.setAttribute("size","sm"),i.appendChild(s)}if(i.appendChild(document.createTextNode(t.label||"")),t.external){let s=document.createElement("span");s.className="sr-only",s.textContent=" (opens in new tab)",i.appendChild(s)}if(t.badge!=null){let s=document.createElement("span");s.className="badge",s.textContent=String(t.badge),i.appendChild(s)}return i}#f(t,i){if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(i[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==i[s][r[a]])return!1}return!0}};m("nav-bar",_i);var Xd=0,qi=class extends b{#e;#t=[];#i;#s;#r;#n;#a;#o;#l=null;#c=0;#f=0;#m=!1;#h=!1;#u=!1;#p=null;#d=!1;#b=!1;#g=!1;#S=!1;#A=new WeakSet;get currentIndex(){return this.#c}get slideCount(){return this.#t.length}get playing(){return this.#l!==null}setup(){let t=[...this.children];if(t.length===0)return!1;this.#h=window.matchMedia("(prefers-reduced-motion: reduce)").matches||document.documentElement.hasAttribute("data-motion-reduced"),this.#u=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#u&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label","Carousel"),this.#e=document.createElement("div"),this.#e.className="carousel-track",this.#e.setAttribute("tabindex","0");let i=this.getAttribute("item-width");if(i&&i!=="auto"&&i!=="full"&&CSS.supports("inline-size",i)&&this.#e.style.setProperty("--_item-width",i),t.forEach((a,o)=>{a.setAttribute("role","group"),a.setAttribute("aria-roledescription","slide"),a.hasAttribute("aria-label")||(a.setAttribute("aria-label",`${o+1} of ${t.length}`),this.#A.add(a)),this.#e.appendChild(a)}),this.#t=[...this.#e.children],this.hasAttribute("autoplay")&&!this.#h&&this.#v(),this.#s=document.createElement("button"),this.#s.className="carousel-prev",this.#s.setAttribute("aria-label","Previous slide"),this.#s.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#r=document.createElement("button"),this.#r.className="carousel-next",this.#r.setAttribute("aria-label","Next slide"),this.#r.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#n=document.createElement("div"),this.#n.className="carousel-indicators",this.#n.setAttribute("role","group"),this.#n.setAttribute("aria-label","Slide indicators"),this.#t.forEach((a,o)=>{let c=document.createElement("button");c.className="carousel-dot",c.setAttribute("aria-label",`Go to slide ${o+1}`),c.setAttribute("aria-current",o===0?"true":"false"),this.listen(c,"click",()=>this.goTo(o)),this.#n.appendChild(c)})),this.#a=document.createElement("div"),this.#a.className="carousel-live",this.#a.setAttribute("aria-live","polite"),this.#a.setAttribute("aria-atomic","true"),this.#i&&this.appendChild(this.#i),this.appendChild(this.#s),this.appendChild(this.#e),this.appendChild(this.#r),this.#n&&this.appendChild(this.#n),this.appendChild(this.#a),this.listen(this.#s,"click",()=>this.prev()),this.listen(this.#r,"click",()=>this.next()),this.listen(this.#e,"keydown",this.#L),this.listen(this,"mouseenter",()=>{this.#g=!0,this.#y()}),this.listen(this,"mouseleave",()=>{this.#g=!1,this.#y()}),this.listen(this,"touchstart",()=>{this.#g=!0,this.#y()},{passive:!0}),this.listen(this,"focusin",()=>{this.#S=!0,this.#y()}),this.listen(this,"focusout",a=>{this.contains(a.relatedTarget)||(this.#S=!1,this.#y())}),this.#u){let a=++Xd,o=this.getAttribute("transition")||"fade",c=o==="slide"?"vt-carousel-slide":o==="scale"?"vt-carousel-scale":"vt-carousel";this.#e.style.viewTransitionName=`carousel-${a}`,this.#e.style.viewTransitionClass=c}if(this.#u){let a=this.#e;Promise.resolve().then(()=>(Oi(),Ii)).then(({addSwipeListener:o})=>{!this.isConnected||this.#e!==a||(this.#p=o(a,{threshold:40}),this.listen(a,"swipe-left",()=>this.#N()?this.prev():this.next()),this.listen(a,"swipe-right",()=>this.#N()?this.next():this.prev()))})}this.#u||(this.#o=new IntersectionObserver(this.#D,{root:this.#e,threshold:.5}),this.#t.forEach(a=>this.#o.observe(a)),"onscrollend"in window&&this.listen(this.#e,"scrollend",()=>{this.#m=!1,this.#B()}));let r=this.#$()??(Number(this.getAttribute("start"))||0);if(this.#u){let a=r>0&&r<this.#t.length?r:0;this.#t.forEach((o,c)=>{o.hidden=c!==a}),this.#_(a)}else r>0&&r<this.#t.length&&this.goTo(r,!1);return this.#P(),this.#g=this.#S=!1,this.#d=this.hasAttribute("autoplay")&&!this.#h&&!this.#b,this.#y(),!0}teardown(){this.#d=!1,this.#O(),this.#o&&(this.#o.disconnect(),this.#o=null),this.#p&&(this.#p(),this.#p=null),this.#e?.parentElement===this&&[...this.#e.children].forEach(t=>this.appendChild(t)),this.#t.forEach(t=>{this.#A.has(t)&&t.removeAttribute("aria-label")}),this.#e?.remove(),this.#i?.remove(),this.#s?.remove(),this.#r?.remove(),this.#n?.remove(),this.#a?.remove(),this.#e=this.#i=this.#s=this.#r=this.#n=this.#a=null,this.#t=[],this.#u=!1,this.#c=0,this.#f=0,this.#m=!1}get slides(){return this.#t.map((t,i)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${i+1} of ${this.#t.length}`}))}set slides(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of i){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this._reinit(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:i,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#c<this.#t.length-1?this.goTo(this.#c+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#c>0?this.goTo(this.#c-1):t&&this.goTo(this.#t.length-1)}goTo(t,i=!0){if(!(t<0||t>=this.#t.length)){if(this.#u)if(i&&t!==this.#c){let s=t>this.#c?"forward":"backward";document.documentElement.dataset.vtDirection=s,V(()=>{this.#w(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#w(t);else{let s=this.#t[t].getBoundingClientRect(),n=this.#e.getBoundingClientRect(),r=this.#N()?s.right-n.right:s.left-n.left,a=i&&!this.#h?"smooth":"instant";this.#e.scrollTo({left:this.#e.scrollLeft+r,behavior:a})}this.#_(t)}}#w(t){this.#t.forEach((i,s)=>{i.hidden=s!==t})}play(){this.#h||!this.#e||(this.#b=!1,this.#d=!0,this.#g=this.#S=!1,this.#i||(this.#v(),this.insertBefore(this.#i,this.firstChild)),this.#y())}pause(){this.#b=!0,this.#d=!1,this.#y()}#v(){let t=document.createElement("button");t.type="button",t.className="carousel-rotate",this.listen(t,"click",()=>{this.#d?this.pause():this.play()}),this.#i=t,this.#E()}#E(){let t=this.#i;if(!t)return;let i=this.#d?"Pause automatic slide show":"Start automatic slide show";t.getAttribute("aria-label")!==i&&(t.setAttribute("aria-label",i),t.innerHTML=`<icon-wc name="${this.#d?"pause":"play"}" size="sm"></icon-wc>`)}#y(){this.#d&&!this.#g&&!this.#S&&!this.#h&&this.isConnected&&!!this.#e?this.#k():this.#O(),this.#E()}#k(){if(this.#l)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#l=setInterval(()=>this.next(),t),this.#a?.setAttribute("aria-live","off"),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}#O(){this.#a?.setAttribute("aria-live","polite"),this.#l&&(clearInterval(this.#l),this.#l=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}#N(){return getComputedStyle(this).direction==="rtl"}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#C()}#_(t){this.#c=t,this.#P(),this.#I(),this.#a&&(this.#a.textContent=`Slide ${t+1} of ${this.#t.length}`),!this.#m&&(this.#B(),!this.#u&&"onscrollend"in window&&(this.#m=!0))}#B(){this.#c!==this.#f&&(this.#f=this.#c,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#c,slide:this.#t[this.#c]},bubbles:!0})))}#P(){let t=this.hasAttribute("loop"),i=this.#c===0,s=this.#c===this.#t.length-1;if(this.#s&&(this.#s.disabled=!t&&i),this.#r&&(this.#r.disabled=!t&&s),this.#n){let n=this.#n.children;for(let r=0;r<n.length;r++){let a=r===this.#c;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#D=t=>{for(let i of t)if(i.isIntersecting){let s=this.#t.indexOf(i.target);s!==-1&&s!==this.#c&&this.#_(s)}};#L=t=>{let i=(t.key==="ArrowLeft"||t.key==="ArrowRight")&&this.#N();switch(t.key){case"ArrowLeft":t.preventDefault(),i?this.next():this.prev();break;case"ArrowRight":t.preventDefault(),i?this.prev():this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#t.length-1);break}};#$(){let t=this.getAttribute("persist");if(!t)return null;try{let i=localStorage.getItem(`carousel:${t}`);return i!==null?Number(i):null}catch{return null}}#I(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#C(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};m("carousel-wc",qi);var Jd=0,$i=class extends b{static formAssociated=!0;#e;#t;#i;#s;#r=[];#n=[];#a=-1;#o=!1;#l="";#c="";#f;#m=!1;#h;#u;#p=[];constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}get#d(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#t=t;let i=this.#t.getAttribute("name");i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#t.removeAttribute("name"));let s=this.querySelector("ul, ol");if(!s)return!1;if(this.#i=s,this.#d){let c=this.querySelector(":scope > .tags-input-area");if(!c){c=document.createElement("div"),c.className="tags-input-area";let d=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(c,d)}this.#h=c,this.#t.parentNode!==this.#h&&this.#h.appendChild(this.#t);let l=this.querySelector(":scope > [data-combobox-live]");l||(l=document.createElement("div"),l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),l.setAttribute("data-combobox-live",""),l.className="visually-hidden",this.appendChild(l)),this.#u=l}let n=this.getAttribute("placeholder");n&&!this.#t.getAttribute("placeholder")&&this.#t.setAttribute("placeholder",n);let r=`cb${++Jd}`;this.#i.id||(this.#i.id=`combobox-listbox-${r}`),this.#t.setAttribute("role","combobox"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-autocomplete","list"),this.#t.setAttribute("aria-controls",this.#i.id),this.#t.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#d&&this.#i.setAttribute("aria-multiselectable","true");let a=this.#d?this.#h:this.#t;a.id||(a.id=`combobox-anchor-${r}`);let o=this.querySelector(":scope > pop-over[data-combobox-host]");if(o?this.#s=o:(this.#s=document.createElement("pop-over"),this.#s.setAttribute("data-combobox-host",""),this.#s.id=`combobox-pop-${r}`,this.#s.dataset.mode="manual",this.#s.dataset.position="bottom-start",this.#s.dataset.anchor=a.id,this.#s.appendChild(this.#i),this.appendChild(this.#s)),this.#s.dataset.anchor=a.id,this.#i.parentElement!==this.#s&&this.#s.appendChild(this.#i),this.#S(),!this.#d){let c=this.getAttribute("value");c&&this.#C(c,!1),this.#f===void 0&&(this.#f=this.#l)}return this.listen(this.#t,"input",this.#y),this.listen(this.#t,"keydown",this.#k),this.listen(this.#t,"focus",this.#O),this.listen(this.#t,"click",this.#N),this.listen(this.#i,"click",this.#_),this.listen(this.#i,"pointerdown",this.#B),this.listen(document,"click",this.#P),this.listen(this.#s,"pop-over:hide",this.#H),this.listen(this,"invalid",this.#b),this.#M(),this.#x(),this.#q(),this.#g(this.matches(":disabled")),!0}teardown(){}#b=()=>{this.#t.setAttribute("aria-invalid","true")};formDisabledCallback(t){this.#t&&this.#g(t)}#g(t){this.#m=t,t&&this.#q();let i=this.#v(),s=this.#d&&i>0&&this.#p.length>=i;if(this.#t.disabled=t||s,this.#h)for(let n of this.#h.querySelectorAll(".tag button"))n.disabled=t}#S(){this.#r=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#r.forEach((t,i)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${i}`)}),this.#n=[...this.#r]}#A(t,i){if(this.#p.some(o=>o.value===t))return;let s=this.#v();if(s&&this.#p.length>=s)return;this.#p.push({value:t,label:i});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=i+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${i}`),r.innerHTML="&times;",r.disabled=this.#m,r.addEventListener("click",o=>{o.stopPropagation(),this.#w(t)}),n.appendChild(r),this.#h.insertBefore(n,this.#t);let a=this.#r.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#E(`${i} added`),this.#t.value="",this.#D(""),this.#M(),this.#x(),this.#R(),s&&this.#p.length>=s&&(this.#t.disabled=!0,this.#q())}#w(t){let i=this.#p.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#p.splice(i,1)[0],n=this.#h.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#r.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#E(`${s.label} removed`),this.#v()&&this.#t.disabled&&(this.#t.disabled=this.#m),this.#D(this.#t.value.trim()),this.#M(),this.#x(),this.#R(),this.#t.focus()}#v(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#E(t){this.#u&&(this.#u.textContent="",requestAnimationFrame(()=>{this.#u.textContent=t}))}#y=()=>{let t=this.#t.value.trim();if(!this.#d&&this.#l){let i=this.#i.querySelector('[aria-selected="true"]');i&&i.setAttribute("aria-selected","false"),this.#l="",this.#c="",this.removeAttribute("value"),this.#M(),this.#x()}this.#D(t),this.#T()};#k=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#o||this.#T(),this.#L(this.#a+1);break;case"ArrowUp":t.preventDefault(),this.#o||this.#T(),this.#L(this.#a-1);break;case"Home":this.#o&&(t.preventDefault(),this.#L(0));break;case"End":this.#o&&(t.preventDefault(),this.#L(this.#n.length-1));break;case"Enter":if(t.preventDefault(),this.#o&&this.#a>=0&&this.#n[this.#a]){let i=this.#n[this.#a];this.#d?this.#A(i.getAttribute("data-value"),i.textContent.trim()):this.#I(i)}else if(this.#d&&this.hasAttribute("custom")&&this.#t.value.trim()){let i=this.#t.value.trim();this.#A(i,i)}break;case"Backspace":if(this.#d&&!this.#t.value&&this.#p.length>0){let i=this.#p[this.#p.length-1];this.#w(i.value)}break;case",":if(this.#d&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let i=this.#t.value.trim();this.#A(i,i)}break;case"Escape":this.#o&&(t.preventDefault(),t.stopPropagation(),this.#q(),this.#t.focus());break;case"Tab":this.#o&&this.#q();break}};#O=()=>{this.#d?(this.#D(this.#t.value.trim()),this.#T()):(this.#t.value||!this.#l)&&(this.#D(this.#t.value.trim()),this.#T())};#N=()=>{this.#o||(this.#D(this.#t.value.trim()),this.#T())};#_=t=>{let i=t.target.closest("li[data-value]");i&&this.#n.includes(i)&&(this.#d?this.#A(i.getAttribute("data-value"),i.textContent.trim()):this.#I(i))};#B=t=>{t.preventDefault()};#P=t=>{this.#o&&!this.contains(t.target)&&this.#q()};#D(t){let i=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#d?new Set(this.#p.map(r=>r.value)):null;this.#n=[],this.#r.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?i==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#n.push(r)}),this.#a=-1,this.#$(),this.setState("no-matches",this.#n.length===0)}#L(t){if(this.#n.length===0)return;t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#a>=0&&this.#n[this.#a]&&this.#n[this.#a].removeAttribute("data-active"),this.#a=t;let i=this.#n[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",i.id)}#$(){this.#r.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#I(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();if(this.#l===s){this.#t.value=n,this.#q(),this.#t.focus();return}this.#r.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#l=s,this.#c=n,this.#t.value=n,this.setAttribute("value",s),this.#M(),this.#x(),this.#q(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}}))}#C(t,i=!0,s="api"){let n=this.#r.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#I(n,s):(this.#r.forEach(r=>r.setAttribute("aria-selected","false")),n.setAttribute("aria-selected","true"),this.#l=t,this.#c=n.textContent.trim(),this.#t.value=this.#c,this.setAttribute("value",t)))}#T(){this.#o||this.#m||(this.#o=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#s?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#q(){this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#$(),this.#s?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#H=()=>{this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#$(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#M(){if(this.#d)if(this.#p.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#p)t.append(i,s.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#l?this.#e.setFormValue(this.#l,this.#c):this.#e.setFormValue(null)}#x(){this.hasAttribute("required")?this.#d?this.#p.length===0?this.#e.setValidity({valueMissing:!0},"Please select at least one option",this.#t):this.#e.setValidity({}):this.#l?this.#e.setValidity({}):this.#e.setValidity({valueMissing:!0},"Please select an option",this.#t):this.#e.setValidity({}),this.#e.validity.valid&&this.#t.removeAttribute("aria-invalid")}#R(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#p.map(t=>t.value),labels:this.#p.map(t=>t.label),source:"internal"}}))}formResetCallback(){this.#d?(this.#h.querySelectorAll(".tag").forEach(t=>t.remove()),this.#p=[],this.#t.value="",this.#t.disabled=this.#m):(this.#l="",this.#c="",this.#t.value="",this.removeAttribute("value")),this.#r.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#n=[...this.#r],this.#a=-1,this.#$(),this.#q(),this.#t.removeAttribute("aria-invalid"),!this.#d&&this.#f&&this.#C(this.#f,!1),this.#M(),this.#x()}formStateRestoreCallback(t){t&&(this.#d||(this.#C(t,!1),this.#M(),this.#x()))}get value(){return this.#l}set value(t){t?this.#C(t):this.#V()}#V(){this.#r.forEach(t=>t.setAttribute("aria-selected","false")),this.#l="",this.#c="",this.#t&&(this.#t.value=""),this.removeAttribute("value"),this.#M(),this.#x()}get label(){return this.#c}get values(){return this.#p.map(t=>t.value)}get labels(){return this.#p.map(t=>t.label)}static get observedAttributes(){return["value","disabled"]}attributeChangedCallback(t,i,s){if(!this.#t)return;if(t==="disabled"){this.#g(this.matches(":disabled"));return}let n=s??"";t==="value"&&n!==this.#l&&(n?(this.#C(n,!1),this.#M(),this.#x()):this.#V())}};m("combo-box",$i);function Zd(){try{let e=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return e.hourCycle==="h12"||e.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function R(e){return String(e).padStart(2,"0")}function mt(e){if(!e)return null;let t=e.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function qt(e,t,i,s){return s?`${R(e)}:${R(t)}:${R(i)}`:`${R(e)}:${R(t)}`}function Qd(e,t,i,s,n){if(n==="12h"){let r=e>=12?"PM":"AM",a=e%12||12;return s?`${a}:${R(t)}:${R(i)} ${r}`:`${a}:${R(t)} ${r}`}return qt(e,t,i,s)}function Ca(e){let t=e.trim();if(!t)return null;let i=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),s=null,n=t;i&&(s=i[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,i.index).trim());let r=n.split(/[:.]/);if(r.length<1||r.length>3)return null;let a=Number(r[0]),o=r.length>1?Number(r[1]):0,c=r.length>2?Number(r[2]):0;if(isNaN(a)||isNaN(o)||isNaN(c)||o<0||o>59||c<0||c>59)return null;let l=a;if(s){if(l<1||l>12)return null;s==="AM"?l=l===12?0:l:l=l===12?12:l+12}else if(l<0||l>23)return null;return{h:l,m:o,s:c}}function tu(e,t,i){return e>i?t:e<t?i:e}var Bi=class extends b{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a=[];#o;#l;#c;#f=0;#m=0;#h=0;#u="AM";#p=null;#d=null;#b=60;#g;#S=0;#A=!1;#w;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="time"]'),!this.#t)return!1;this.#b=Number(this.#t.getAttribute("step"))||60,this.#c=this.#b<60,this.#p=mt(this.#t.getAttribute("min")),this.#d=mt(this.#t.getAttribute("max")),this.#l=this.getAttribute("data-format")||Zd();let t=mt(this.#t.value);return t&&(this.#f=t.h,this.#m=t.m,this.#h=t.s),this.#g=this.#t.value,this.#l==="12h"&&(this.#u=this.#f>=12?"PM":"AM"),this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#v(),this.#E(),this.#H(),this.#M(),this.#x(),this.#R(),this.listen(document,"click",this.#_),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}#v(){if(this.#s?.parentNode===this)return;this.#s=document.createElement("div"),this.#s.className="time-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="time-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","listbox"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a time\u2026"),this.#s.appendChild(this.#i),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label","Toggle time spinner"),this.#r.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","clock"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#r.appendChild(t),this.#s.appendChild(this.#r),this.appendChild(this.#s),this.listen(this.#r,"click",i=>{i.stopPropagation(),this.#A?this.#N():this.#O(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"keydown",this.#B),this.listen(this.#i,"blur",this.#P)}#E(){if(this.#n?.parentNode===this)return;this.#w=`tp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="time-panel",this.#n.id=this.#w,this.#n.setAttribute("role","group"),this.#n.setAttribute("aria-label","Time spinners"),this.#i.setAttribute("aria-controls",this.#w);let t=this.#l==="12h"?1:0,i=this.#l==="12h"?12:23,s=this.#y("Hours",t,i,1);this.#n.appendChild(s.el),this.#a.push(s),this.#n.appendChild(this.#k());let n=this.#b>=60?Math.max(1,Math.round(this.#b/60)):1,r=this.#y("Minutes",0,59,n);if(this.#n.appendChild(r.el),this.#a.push(r),this.#c){this.#n.appendChild(this.#k());let a=this.#y("Seconds",0,59,this.#b);this.#n.appendChild(a.el),this.#a.push(a)}this.#l==="12h"&&(this.#o=document.createElement("button"),this.#o.type="button",this.#o.className="period-toggle",this.#o.setAttribute("aria-label","Toggle AM/PM"),this.#o.textContent=this.#u,this.#n.appendChild(this.#o),this.listen(this.#o,"click",()=>{this.#u=this.#u==="AM"?"PM":"AM",this.#o.textContent=this.#u,this.#f=this.#V(this.#F(),this.#u),this.#q()}),this.listen(this.#o,"keydown",a=>{let o=a;o.key==="ArrowLeft"&&(o.preventDefault(),this.#z(this.#a.length-1)),o.key==="Escape"&&(o.preventDefault(),this.#N(),this.#i.focus())})),this.appendChild(this.#n)}#y(t,i,s,n){let r=document.createElement("div");r.className="time-spinner",r.setAttribute("role","spinbutton"),r.setAttribute("aria-label",t),r.setAttribute("aria-valuemin",String(i)),r.setAttribute("aria-valuemax",String(s)),r.setAttribute("tabindex","0");let a=document.createElement("button");a.type="button",a.className="time-inc",a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.innerHTML="&#x25B2;";let o=document.createElement("span");o.className="time-value";let c=document.createElement("button");c.type="button",c.className="time-dec",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.innerHTML="&#x25BC;",r.appendChild(a),r.appendChild(o),r.appendChild(c);let l={el:r,valueEl:o,label:t,min:i,max:s,step:n};return this.listen(a,"click",()=>{this.#C(l,n)}),this.listen(c,"click",()=>{this.#C(l,-n)}),this.listen(r,"keydown",d=>{this.#D(d,l)}),this.listen(r,"focus",()=>{this.#S=this.#a.indexOf(l)}),l}#k(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#O(){this.#A||(this.#A=!0,this.#n.setAttribute("data-open",""),this.#i.setAttribute("aria-expanded","true"))}#N(){this.#A&&(this.#A=!1,this.#n.removeAttribute("data-open"),this.#i.setAttribute("aria-expanded","false"))}#_=t=>{this.#A&&!this.contains(t.target)&&this.#N()};#B=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let i=Ca(this.#i.value);i&&(this.#f=i.h,this.#m=i.m,this.#h=i.s,this.#l==="12h"&&(this.#u=this.#f>=12?"PM":"AM"),this.#q()),this.#M(),this.#A&&this.#N();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#A||this.#O(),requestAnimationFrame(()=>this.#z(0));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#A&&this.#N(),this.#M();return;case"Tab":this.#A&&this.#N();return}};#P=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let i=this.#i.value.trim();if(i){let s=Ca(i);s&&(this.#f=s.h,this.#m=s.m,this.#h=s.s,this.#l==="12h"&&(this.#u=this.#f>=12?"PM":"AM"),this.#x(),this.#R(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:qt(this.#f,this.#m,this.#h,this.#c),hours:this.#f,minutes:this.#m,seconds:this.#h}})))}this.#M(),this.#A&&this.#N(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#D=(t,i)=>{let s=this.#a.indexOf(i);switch(t.key){case"ArrowUp":t.preventDefault(),this.#C(i,i.step);break;case"ArrowDown":t.preventDefault(),this.#C(i,-i.step);break;case"ArrowRight":t.preventDefault(),s<this.#a.length-1?this.#z(s+1):this.#o&&this.#o.focus();break;case"ArrowLeft":t.preventDefault(),s>0&&this.#z(s-1);break;case"PageUp":t.preventDefault(),this.#C(i,i.step*(i.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#C(i,-i.step*(i.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#T(i,i.min);break;case"End":t.preventDefault(),this.#T(i,i.max);break;case"Escape":t.preventDefault(),this.#N(),this.#i.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#I(t.key,i))}};#L="";#$=0;#I(t,i){clearTimeout(this.#$),this.#L+=t;let s=Number(this.#L);if(this.#L.length>=2||s*10>i.max){let n=Math.min(Math.max(s,i.min),i.max);this.#T(i,n),this.#L=""}else this.#$=setTimeout(()=>{let n=Number(this.#L),r=Math.min(Math.max(n,i.min),i.max);this.#T(i,r),this.#L=""},800)}#C(t,i){let s;t.label==="Hours"?s=this.#l==="12h"?this.#F():this.#f:t.label==="Minutes"?s=this.#m:s=this.#h;let n=tu(s+i,t.min,t.max);this.#T(t,n)}#T(t,i){t.label==="Hours"?this.#l==="12h"?this.#f=this.#V(i,this.#u):this.#f=i:t.label==="Minutes"?this.#m=i:this.#h=i,this.#q()}#q(t="internal"){this.#H(),this.#M(),this.#x(),this.#R(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:qt(this.#f,this.#m,this.#h,this.#c),hours:this.#f,minutes:this.#m,seconds:this.#h,source:t}}))}#H(){let t=this.#l==="12h"?this.#F():this.#f;this.#a[0].valueEl.textContent=R(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#l==="12h"?`${t} ${this.#u}`:String(t)),this.#a[1].valueEl.textContent=R(this.#m),this.#a[1].el.setAttribute("aria-valuenow",String(this.#m)),this.#c&&this.#a[2]&&(this.#a[2].valueEl.textContent=R(this.#h),this.#a[2].el.setAttribute("aria-valuenow",String(this.#h))),this.#o&&(this.#o.textContent=this.#u)}#M(){this.#f!==void 0&&(this.#i.value=Qd(this.#f,this.#m,this.#h,this.#c,this.#l))}#x(){let t=qt(this.#f,this.#m,this.#h,this.#c);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#R(){if((this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#t.value){this.#e.setValidity({valueMissing:!0},"Please select a time",this.#i||this);return}this.#e.setValidity({})}#V(t,i){return i==="AM"?t===12?0:t:t===12?12:t+12}#F(){if(this.#l==="24h")return this.#f;let t=this.#f%12;return t===0?12:t}#z(t){this.#a[t]?.el.focus()}formResetCallback(){let t=mt(this.#g);t?(this.#f=t.h,this.#m=t.m,this.#h=t.s):(this.#f=0,this.#m=0,this.#h=0),this.#l==="12h"&&(this.#u=this.#f>=12?"PM":"AM"),this.#q()}formStateRestoreCallback(t){if(!t)return;let i=mt(t);i&&(this.#f=i.h,this.#m=i.m,this.#h=i.s,this.#l==="12h"&&(this.#u=this.#f>=12?"PM":"AM"),this.#q())}get value(){return qt(this.#f,this.#m,this.#h,this.#c)}set value(t){let i=mt(t);i&&(i.h===this.#f&&i.m===this.#m&&i.s===this.#h||(this.#f=i.h,this.#m=i.m,this.#h=i.s,this.#l==="12h"&&(this.#u=this.#f>=12?"PM":"AM"),this.#q("api")))}};m("time-picker",Bi);var be="popover"in HTMLElement.prototype;var eu=["Su","Mo","Tu","We","Th","Fr","Sa"],iu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ri=["january","february","march","april","may","june","july","august","september","october","november","december"];function P(e){let t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function H(e){if(!e)return null;let[t,i,s]=e.split("-").map(Number);return new Date(t,i-1,s)}function ge(e,t){return new Date(e,t+1,0).getDate()}function su(){try{let e=new Intl.Locale(navigator.language);if(e.weekInfo)return e.weekInfo.firstDay%7}catch{}return 0}function nu(e){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return P(e)}}function ve(e,t){return e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function ru(){let e=new Map;Ri.forEach((t,i)=>{e.set(t,i),e.set(t.slice(0,3),i)});try{for(let t=0;t<12;t++){let i=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(2e3,t,1)).toLowerCase(),s=new Intl.DateTimeFormat(void 0,{month:"short"}).format(new Date(2e3,t,1)).toLowerCase().replace(".","");e.set(i,t),e.set(s,t)}}catch{}return e}var Pi=ru();function Fi(e){let t=e.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=H(t);return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}if(/^\d{4}\/\d{2}\/\d{2}$/.test(t)){let a=H(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let i=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,s=t.match(i);if(s){let a=Pi.get(s[1].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[2]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let n=/^(\d{1,2})\s+([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(n),s){let a=Pi.get(s[2].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[1]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let r=/^([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(r),s){let a=Pi.get(s[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(s[2]),month:a}}}return{date:null,partial:null}}var Hi=class extends b{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#l;#c;#f=!1;#m=!1;#h=null;#u=null;#p=new Date().getFullYear();#d=new Date().getMonth();#b=null;#g=null;#S=new Map;#A=new Map;#w=null;#v=0;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="date"]'),!this.#t)return!1;this.#b=H(this.#t.getAttribute("min")),this.#g=H(this.#t.getAttribute("max")),this.#v=su();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#S.set(r,a||"")});let i=this.getAttribute("data-highlight-dates");i&&i.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#A.set(r,a||"")}),this.#h=H(this.#t.value),this.#w=this.#t.value;let s=new Date;return this.#g&&s>this.#g&&(s=this.#g),this.#b&&s<this.#b&&(s=this.#b),this.#p=this.#h?this.#h.getFullYear():s.getFullYear(),this.#d=this.#h?this.#h.getMonth():s.getMonth(),this.#u=this.#h||s,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#E(),this.#y(),this.#L(),this.#F(),this.#z(),this.#m=be,this.#m&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#x),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}teardown(){window.removeEventListener("scroll",this.#T,{capture:!0}),window.removeEventListener("resize",this.#T)}#E(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="date-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a date\u2026"),this.#r.appendChild(this.#i),this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="date-trigger-icon",this.#s.setAttribute("aria-label","Toggle calendar"),this.#s.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#s.appendChild(t),this.#r.appendChild(this.#s),this.appendChild(this.#r),this.listen(this.#s,"click",i=>{i.stopPropagation(),this.#f?this.#I():this.#$(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"input",this.#q),this.listen(this.#i,"keydown",this.#H),this.listen(this.#i,"blur",this.#M)}#y(){this.#a=`dp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="calendar",this.#n.id=this.#a,this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-modal","false"),this.#n.setAttribute("aria-label","Choose date"),this.#n.hidden=!0,this.#i.setAttribute("aria-controls",this.#a);let t=document.createElement("div");t.className="calendar-header";let i=document.createElement("button");i.type="button",i.className="calendar-nav",i.setAttribute("aria-label","Previous month");let s=document.createElement("icon-wc");s.setAttribute("name","chevron-left"),s.setAttribute("size","sm"),s.setAttribute("aria-hidden","true"),i.appendChild(s);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#l=document.createElement("span"),this.#l.className="calendar-month",this.#c=document.createElement("select"),this.#c.className="calendar-year",this.#c.setAttribute("aria-label","Year"),this.#_(),n.appendChild(this.#l),n.appendChild(this.#c);let r=document.createElement("button");r.type="button",r.className="calendar-nav",r.setAttribute("aria-label","Next month");let a=document.createElement("icon-wc");a.setAttribute("name","chevron-right"),a.setAttribute("size","sm"),a.setAttribute("aria-hidden","true"),r.appendChild(a),t.appendChild(i),t.appendChild(n),t.appendChild(r),this.#n.appendChild(t);let o=document.createElement("table");o.setAttribute("role","grid"),o.setAttribute("aria-labelledby",`${this.#a}-title`);let c=document.createElement("thead"),l=document.createElement("tr");for(let d=0;d<7;d++){let u=(this.#v+d)%7,h=document.createElement("th");h.setAttribute("abbr",iu[u]),h.setAttribute("scope","col"),h.textContent=eu[u],l.appendChild(h)}c.appendChild(l),o.appendChild(c),this.#o=document.createElement("tbody"),o.appendChild(this.#o),this.#n.appendChild(o),this.appendChild(this.#n),this.#k(),this.listen(i,"click",()=>this.#B(-1)),this.listen(r,"click",()=>this.#B(1)),this.listen(this.#c,"change",()=>{this.#p=Number(this.#c.value);let d=ge(this.#p,this.#d),u=Math.min(this.#u?.getDate()??1,d);this.#u=new Date(this.#p,this.#d,u),this.#k()}),this.listen(this.#o,"click",this.#R),this.listen(this.#n,"keydown",this.#V)}#k(){try{this.#l.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#p,this.#d,1))}catch{this.#l.textContent=Ri[this.#d].charAt(0).toUpperCase()+Ri[this.#d].slice(1)}this.#c.querySelector(`option[value="${this.#p}"]`)||this.#_(),this.#c.value=String(this.#p),this.#o.innerHTML="";let t=ge(this.#p,this.#d),s=(new Date(this.#p,this.#d,1).getDay()-this.#v+7)%7,n=new Date,r=document.createElement("tr");for(let o=0;o<s;o++)r.appendChild(document.createElement("td"));for(let o=1;o<=t;o++){let c=new Date(this.#p,this.#d,o),l=P(c),d=document.createElement("td"),u=document.createElement("button");u.type="button",u.setAttribute("data-date",l),u.textContent=String(o),ve(c,n)&&u.setAttribute("aria-current","date"),ve(c,this.#h)&&u.setAttribute("aria-selected","true");let h=this.#N(c,l);if(h.disabled&&(u.setAttribute("aria-disabled","true"),u.setAttribute("disabled",""),h.reason&&u.setAttribute("data-disabled-reason",h.reason)),this.#A.has(l)){let f=this.#A.get(l);u.setAttribute("data-highlight",f||"")}ve(c,this.#u)?(u.setAttribute("tabindex","0"),ve(c,this.#h)||u.setAttribute("data-focused","")):u.setAttribute("tabindex","-1"),d.appendChild(u),r.appendChild(d),(s+o)%7===0&&(this.#o.appendChild(r),r=document.createElement("tr"))}let a=(s+t)%7;if(a>0){for(let o=a;o<7;o++)r.appendChild(document.createElement("td"));this.#o.appendChild(r)}}#O(t,i){return this.#N(t,i).disabled}#N(t,i){return this.#S.has(i)?{disabled:!0,reason:this.#S.get(i)}:this.#b&&t<this.#b?{disabled:!0,reason:null}:this.#g&&t>this.#g?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#_(){this.#c.innerHTML="";let t=new Date().getFullYear(),i=this.#b?this.#b.getFullYear():t-100,s=this.#g?this.#g.getFullYear():t+10;for(let n=i;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#c.appendChild(r)}}#B(t){this.#d+=t,this.#d>11?(this.#d=0,this.#p++):this.#d<0&&(this.#d=11,this.#p--);let i=ge(this.#p,this.#d),s=Math.min(this.#u?.getDate()??1,i);this.#u=new Date(this.#p,this.#d,s),this.#k(),this.#D(this.#u)}#P(t,i="internal"){let s=P(t);this.#O(t,s)||this.#h&&P(this.#h)===s||(this.#h=t,this.#u=t,this.#L(),this.#F(),this.#z(),this.#k(),this.#I(),this.#i.focus(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:s,date:new Date(t),source:i}})))}#D(t){let i=P(t),s=this.#o.querySelector(`[data-date="${i}"]`);s&&(this.#o.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),s.setAttribute("tabindex","0"),s.focus())}#L(){this.#h?this.#i.value=nu(this.#h):this.#i.value=""}#$(){if(!this.#f){if(this.#f=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#n.hidden=!1,this.#u&&(this.#p=this.#u.getFullYear(),this.#d=this.#u.getMonth()),this.#k(),this.#m){try{this.#n.showPopover()}catch{}this.#C(),window.addEventListener("scroll",this.#T,{capture:!0,passive:!0}),window.addEventListener("resize",this.#T,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#I(){if(this.#f){if(this.#f=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#n.hidden=!0,this.#m){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#T,{capture:!0}),window.removeEventListener("resize",this.#T)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#C(){if(!this.#m)return;let t=this.#r.getBoundingClientRect(),i=this.#n.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,l;o<i.height&&c>o?(l=t.top-i.height-s,this.#n.dataset.placement="top"):(l=t.bottom+s,delete this.#n.dataset.placement);let d=t.left;d+i.width>a-n&&(d=a-i.width-n),d<n&&(d=n),this.#n.style.setProperty("--calendar-top",`${l}px`),this.#n.style.setProperty("--calendar-left",`${d}px`)}#T=()=>{this.#f&&this.#C()};#q=()=>{let t=this.#i.value,{date:i,partial:s}=Fi(t);if(i)this.#u=i,this.#p=i.getFullYear(),this.#d=i.getMonth(),this.#k();else if(s){this.#p=s.year,this.#d=s.month;let n=ge(s.year,s.month),r=Math.min(this.#u?.getDate()??1,n);this.#u=new Date(s.year,s.month,r),this.#k()}!this.#f&&t.length>0&&this.#$()};#H=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:i}=Fi(this.#i.value);i&&!this.#O(i,P(i))&&this.#P(i);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#f||this.#$(),requestAnimationFrame(()=>this.#D(this.#u));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#f&&this.#I(),this.#L();return;case"Tab":this.#f&&this.#I();return}};#M=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let i=this.#i.value.trim();if(i){let{date:s}=Fi(i);s&&!this.#O(s,P(s))&&(this.#h=s,this.#u=s,this.#F(),this.#z(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:P(s),date:new Date(s)}})))}this.#L(),this.#f&&this.#I(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#x=t=>{this.#f&&!this.contains(t.target)&&this.#I()};#R=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.hasAttribute("disabled"))return;let n=H(s.getAttribute("data-date"));n&&this.#P(n)};#V=t=>{if(t.key==="Tab"){this.#I();return}let i=this.#u;if(!i)return;let s;switch(t.key){case"ArrowRight":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+1);break;case"ArrowLeft":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-1);break;case"ArrowDown":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+7);break;case"ArrowUp":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-7);break;case"PageDown":t.shiftKey?s=new Date(i.getFullYear()+1,i.getMonth(),i.getDate()):s=new Date(i.getFullYear(),i.getMonth()+1,i.getDate());break;case"PageUp":t.shiftKey?s=new Date(i.getFullYear()-1,i.getMonth(),i.getDate()):s=new Date(i.getFullYear(),i.getMonth()-1,i.getDate());break;case"Home":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+this.#v);break;case"End":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+(6-i.getDay()+this.#v));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#P(i);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#I(),this.#i.focus();return;default:return}t.preventDefault(),t.stopPropagation(),s&&(this.#b&&s<this.#b&&(s=this.#b),this.#g&&s>this.#g&&(s=this.#g),this.#u=s,(s.getMonth()!==this.#d||s.getFullYear()!==this.#p)&&(this.#d=s.getMonth(),this.#p=s.getFullYear(),this.#k()),this.#D(s))};#F(){let t=this.#h?P(this.#h):"";this.#e.setFormValue(t||null),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#z(){(this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#h?this.#e.setValidity({valueMissing:!0},"Please select a date",this.#i||this):this.#e.setValidity({})}formResetCallback(){this.#h=H(this.#w);let t=new Date;this.#u=this.#h||t,this.#p=this.#u.getFullYear(),this.#d=this.#u.getMonth(),this.#L(),this.#F(),this.#z(),this.#f&&this.#k()}formStateRestoreCallback(t){t&&(this.#h=H(t),this.#h&&(this.#u=this.#h,this.#p=this.#h.getFullYear(),this.#d=this.#h.getMonth(),this.#L(),this.#F(),this.#z()))}get value(){return this.#h?P(this.#h):""}set value(t){let i=H(t);i&&this.#P(i,"api")}get min(){return this.#b?P(this.#b):""}set min(t){this.#b=t?H(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#k()}get max(){return this.#g?P(this.#g):""}set max(t){this.#g=t?H(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#k()}};m("date-picker",Hi);_t();function bt(e,t,i){t/=100,i/=100;let s=a=>(a+e/30)%12,n=t*Math.min(i,1-i),r=a=>i-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function ye(e,t,i,s=!1){e/=255,t/=255,i/=255;let n=Math.max(e,t,i),r=Math.min(e,t,i),a=(n+r)/2,o=0,c=0;if(n!==r){let l=n-r;switch(c=a>.5?l/(2-n-r):l/(n+r),n){case e:o=((t-i)/l+(t<i?6:0))/6;break;case t:o=((i-e)/l+2)/6;break;case i:o=((e-t)/l+4)/6;break}}return s?{h:o*360,s:c*100,l:a*100}:{h:Math.round(o*360),s:Math.round(c*100),l:Math.round(a*100)}}function au(e){e=e.replace(/^#/,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function ou(e,t,i){return"#"+[e,t,i].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function J(e,t=!1){let{r:i,g:s,b:n}=au(e);return ye(i,s,n,t)}function Z(e,t,i){let{r:s,g:n,b:r}=bt(e,t,i);return ou(s,n,r)}function N(e,t,i){return Math.max(t,Math.min(i,e))}function zi(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Vi(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(N(t,0,1)*255)}function cu(e,t,i){let s=zi(e),n=zi(t),r=zi(i),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,l=Math.cbrt(a),d=Math.cbrt(o),u=Math.cbrt(c),h=.2104542553*l+.793617785*d-.0040720468*u,f=1.9779984951*l-2.428592205*d+.4505937099*u,g=.0259040371*l+.7827717662*d-.808675766*u,p=Math.sqrt(f*f+g*g),v=Math.atan2(g,f)*180/Math.PI;return v<0&&(v+=360),p<1e-4&&(v=0),{L:h,C:p,H:v}}function lu(e,t,i){let s=i*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=e+.3963377774*n+.2158037573*r,o=e-.1055613458*n-.0638541728*r,c=e-.0894841775*n-1.291485548*r,l=a**3,d=o**3,u=c**3,h=4.0767416621*l-3.3077115913*d+.2309699292*u,f=-1.2684380046*l+2.6097574011*d-.3413193965*u,g=-.0041960863*l-.7034186147*d+1.707614701*u;return{r:Vi(h),g:Vi(f),b:Vi(g)}}function Ui(e,t,i){let s=bt(e,t,i);return cu(s.r,s.g,s.b)}function ka(e,t,i,s=!1){let{r:n,g:r,b:a}=lu(e,t,i);return ye(n,r,a,s)}function du(e,t,i){return Z(e,t,i)}function uu(e,t,i){let{r:s,g:n,b:r}=bt(e,t,i);return`rgb(${s} ${n} ${r})`}function hu(e,t,i){return`hsl(${Math.round(e)}deg ${Math.round(t)}% ${Math.round(i)}%)`}function fu(e,t,i){let{L:s,C:n,H:r}=Ui(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function Ta(e,t,i,s){switch(e){case"rgb":return uu(t,i,s);case"hsl":return hu(t,i,s);case"oklch":return fu(t,i,s);default:return du(t,i,s)}}var gt=["hex","rgb","hsl","oklch"],pu="hex",mu=/^#[0-9a-fA-F]{6}$/,vt=8,bu=0,Wi=class extends b{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#l;#c;#f;#m;#h={};#u=pu;#p;#d;#b;#g=!1;#S=!1;#A=!1;#w=`cp${++bu}`;#v=0;#E=100;#y=50;#k;static get observedAttributes(){return["disabled"]}constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="color"]'),!this.#t)return!1;if(!this.#A){let s=this.getAttribute("format");s&&gt.includes(s)&&(this.#u=s),this.#A=!0}if(this.#k===void 0){let s=this.#t.defaultValue;this.#k=mu.test(s)?s.toLowerCase():this.#t.value||"#000000"}let t=J(this.#t.value||this.#k,!0);this.#v=t.h,this.#E=t.s,this.#y=t.l;let i=this.#t.getAttribute("name");return i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#t.removeAttribute("name")),this.#t.hasAttribute("disabled")&&(this.#t.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled","")),this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(this.#t,"click",this.#N),this.#B(),this.#P(),this.#W(),this.#Q(),this.#S=be,this.#S&&this.#a.setAttribute("popover","manual"),this.listen(document,"click",this.#tt),this.listen(this,"keydown",this.#_),this.#O(this.matches(":disabled")),!0}teardown(){this.#g=!1,this.removeAttribute("open"),window.removeEventListener("scroll",this.#Z,{capture:!0}),window.removeEventListener("resize",this.#Z),this.#i?.remove(),this.#a?.remove()}attributeChangedCallback(t){t==="disabled"&&this.#i&&this.#O(this.matches(":disabled"))}formDisabledCallback(t){this.#i&&this.#O(t)}#O(t){this.#i.disabled=t,t&&this.#j()}#N=t=>{t.preventDefault(),this.#i.disabled||this.#i.focus()};#_=t=>{t.key!=="Escape"||!this.#g||(t.preventDefault(),t.stopPropagation(),this.#j(),this.#i.focus())};#B(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#s=document.createElement("span"),this.#s.className="color-swatch",this.#r=document.createElement("span"),this.#r.className="color-hex",this.#r.id=`${this.#w}-value`,this.#i.appendChild(this.#s),this.#i.appendChild(this.#r);let t=[];for(let i of Array.from(this.#t.labels||[]))i.id||(i.id=`${this.#w}-label-${t.length}`),t.push(i.id);t.length===0&&(this.#n=document.createElement("span"),this.#n.className="visually-hidden",this.#n.id=`${this.#w}-name`,this.#n.textContent=this.#t.getAttribute("aria-label")||this.getAttribute("aria-label")||"Color",this.#i.prepend(this.#n),t.push(this.#n.id)),this.#i.setAttribute("aria-labelledby",[...t,this.#r.id].join(" ")),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#g?this.#j():this.#X()})}#P(){this.#p=void 0,this.#d=void 0,this.#a=document.createElement("div"),this.#a.className="color-panel",this.#a.setAttribute("role","dialog"),this.#a.setAttribute("aria-label","Color picker"),this.#o=document.createElement("div"),this.#o.className="color-area",this.#o.setAttribute("role","slider"),this.#o.setAttribute("aria-label","Saturation and lightness"),this.#o.setAttribute("aria-valuemin","0"),this.#o.setAttribute("aria-valuemax","100"),this.#o.setAttribute("tabindex","0"),this.#l=document.createElement("div"),this.#l.className="color-area-thumb",this.#o.appendChild(this.#l),this.#a.appendChild(this.#o);let t=document.createElement("div");t.className="color-hue-wrap",this.#c=document.createElement("div"),this.#c.className="color-hue",this.#c.setAttribute("role","slider"),this.#c.setAttribute("aria-label","Hue"),this.#c.setAttribute("aria-valuemin","0"),this.#c.setAttribute("aria-valuemax","360"),this.#c.setAttribute("tabindex","0"),this.#f=document.createElement("div"),this.#f.className="color-hue-thumb",this.#c.appendChild(this.#f),t.appendChild(this.#c),this.#a.appendChild(t);let i=document.createElement("div");i.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#m=document.createElement("select"),this.#m.className="color-format-select";for(let o of gt){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#m.appendChild(c)}this.#m.value=this.#u,s.appendChild(n),s.appendChild(this.#m),i.appendChild(s),this.#a.appendChild(i),this.listen(this.#m,"change",this.#$),this.#h.hex=this.#D("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#h.rgb=this.#D("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#h.hsl=this.#D("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#h.oklch=this.#D("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of gt)this.#a.appendChild(this.#h[o].wrapper);this.#L();let r=this.querySelector(":scope > datalist");if(r){this.#p=document.createElement("div"),this.#p.className="color-swatches",this.#p.setAttribute("role","group"),this.#p.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("aria-pressed","false"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#p.appendChild(c)}this.#a.appendChild(this.#p),this.listen(this.#p,"click",this.#Y)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-eyedropper",this.#d.setAttribute("aria-label","Pick color from screen"),this.#d.textContent="\u{1F4A7}",a.appendChild(this.#d),this.listen(this.#d,"click",this.#K)),this.#b=document.createElement("button"),this.#b.type="button",this.#b.className="color-copy",this.#b.setAttribute("aria-label","Copy hex value"),this.#b.textContent="Copy",a.appendChild(this.#b),this.listen(this.#b,"click",this.#G),this.#a.appendChild(a),this.appendChild(this.#a),this.listen(this.#o,"pointerdown",this.#I),this.listen(this.#o,"keydown",this.#T),this.listen(this.#c,"pointerdown",this.#q),this.listen(this.#c,"keydown",this.#M);for(let o of gt){let c=o==="hex"?this.#R:o==="rgb"?this.#V:o==="hsl"?this.#F:this.#z;for(let{el:l}of this.#h[o].inputs)this.listen(l,"change",c)}}#D(t,i){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of i){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#L(){for(let t of gt)this.#h[t].wrapper.hidden=t!==this.#u;this.#b&&this.#b.setAttribute("aria-label",`Copy ${this.#u.toUpperCase()} value`)}#$=()=>{let t=this.#m.value;gt.includes(t)&&(this.#u=t,this.#L(),this.#W())};#I=t=>{t.preventDefault(),this.#o.setPointerCapture(t.pointerId),this.#C(t);let i=n=>this.#C(n),s=n=>{this.#o.releasePointerCapture(n.pointerId),this.#o.removeEventListener("pointermove",i),this.#o.removeEventListener("pointerup",s)};this.#o.addEventListener("pointermove",i),this.#o.addEventListener("pointerup",s)};#C(t){let i=this.#o.getBoundingClientRect(),s=N((t.clientX-i.left)/i.width,0,1),n=N((t.clientY-i.top)/i.height,0,1);this.#E=Math.round(s*100),this.#y=Math.round((1-n)*100),this.#U("pointer")}#T=t=>{let i=t.shiftKey?10:1;switch(this.#E=Math.round(this.#E),this.#y=Math.round(this.#y),t.key){case"ArrowRight":t.preventDefault(),this.#E=N(this.#E+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#E=N(this.#E-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#y=N(this.#y+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#y=N(this.#y-i,0,100);break;default:return}this.#U("keyboard")};#q=t=>{t.preventDefault(),this.#c.setPointerCapture(t.pointerId),this.#H(t);let i=n=>this.#H(n),s=n=>{this.#c.releasePointerCapture(n.pointerId),this.#c.removeEventListener("pointermove",i),this.#c.removeEventListener("pointerup",s)};this.#c.addEventListener("pointermove",i),this.#c.addEventListener("pointerup",s)};#H(t){let i=this.#c.getBoundingClientRect(),s=N((t.clientX-i.left)/i.width,0,1);this.#v=Math.round(s*360),this.#U("pointer")}#M=t=>{let i=t.shiftKey?10:1;switch(this.#v=Math.round(this.#v),t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#v=(this.#v+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#v=(this.#v-i+361)%361;break;default:return}this.#U("keyboard")};#x(t,i){return this.#h[t].inputs.find(s=>s.channel===i)?.el}#R=()=>{let t=this.#x("hex","hex");if(!t)return;let i=t.value.trim();if(i.startsWith("#")||(i="#"+i),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(i)){let s=J(i,!0);this.#v=s.h,this.#E=s.s,this.#y=s.l,this.#U()}};#V=()=>{let t=N(Number(this.#x("rgb","r").value)||0,0,255),i=N(Number(this.#x("rgb","g").value)||0,0,255),s=N(Number(this.#x("rgb","b").value)||0,0,255),n=ye(t,i,s,!0);this.#v=n.h,this.#E=n.s,this.#y=n.l,this.#U()};#F=()=>{let t=N(Number(this.#x("hsl","h").value)||0,0,360)%361,i=N(Number(this.#x("hsl","s").value)||0,0,100),s=N(Number(this.#x("hsl","l").value)||0,0,100);this.#v=t,this.#E=i,this.#y=s,this.#U()};#z=()=>{let t=N(Number(this.#x("oklch","oL").value)||0,0,100)/100,i=N(Number(this.#x("oklch","oC").value)||0,0,.4),s=N(Number(this.#x("oklch","oH").value)||0,0,360),n=ka(t,i,s,!0);this.#v=n.h,this.#E=n.s,this.#y=n.l,this.#U()};#Y=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=J(s,!0);this.#v=n.h,this.#E=n.s,this.#y=n.l,this.#U()};#K=async()=>{try{let i=await new window.EyeDropper().open(),s=J(i.sRGBHex,!0);this.#v=s.h,this.#E=s.s,this.#y=s.l,this.#U()}catch{}};#G=()=>{let t=Ta(this.#u,this.#v,this.#E,this.#y);rt(t,{button:this.#b,announceMessage:"Color copied"})};#U(t="internal"){this.#W(),this.#Q();let i=Z(this.#v,this.#E,this.#y),s=bt(this.#v,this.#E,this.#y);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:i,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:Math.round(this.#v),s:Math.round(this.#E),l:Math.round(this.#y)},source:t}}))}#W(){let t=Z(this.#v,this.#E,this.#y),i=bt(this.#v,this.#E,this.#y),s=Z(this.#v,100,50);this.#s.style.background=t,this.#r.textContent=t,this.#o.style.setProperty("--area-hue",s),this.#l.style.left=`${this.#E}%`,this.#l.style.top=`${100-this.#y}%`,this.#l.style.background=t;let n=Math.round(this.#v),r=Math.round(this.#E),a=Math.round(this.#y);this.#o.setAttribute("aria-valuenow",String(r)),this.#o.setAttribute("aria-valuetext",`Saturation ${r}%, lightness ${a}%`),this.#f.style.left=`${this.#v/360*100}%`,this.#c.setAttribute("aria-valuenow",String(n)),this.#c.setAttribute("aria-valuetext",`Hue ${n}\xB0`);let o=(l,d,u)=>{let h=this.#x(l,d);h&&(h.value=String(u))};o("hex","hex",t),o("rgb","r",i.r),o("rgb","g",i.g),o("rgb","b",i.b),o("hsl","h",n),o("hsl","s",r),o("hsl","l",a);let c=Ui(this.#v,this.#E,this.#y);if(o("oklch","oL",(c.L*100).toFixed(1)),o("oklch","oC",c.C.toFixed(3)),o("oklch","oH",c.H.toFixed(1)),this.#p)for(let l of this.#p.querySelectorAll("button[data-color]")){let d=(l.getAttribute("data-color")||"").toLowerCase()===t.toLowerCase();l.setAttribute("aria-pressed",String(d))}}#X(){if(!(this.#g||this.#i.disabled)){if(this.#g=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#S){try{this.#a.showPopover()}catch{}this.#J(),window.addEventListener("scroll",this.#Z,{capture:!0,passive:!0}),window.addEventListener("resize",this.#Z,{passive:!0})}requestAnimationFrame(()=>this.#o.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#j(){if(this.#g){if(this.#g=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#S){try{this.#a.hidePopover()}catch{}window.removeEventListener("scroll",this.#Z,{capture:!0}),window.removeEventListener("resize",this.#Z)}this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}}#J(){if(!this.#S)return;let t=this.#i.getBoundingClientRect(),i=this.#a.offsetWidth,s=this.#a.offsetHeight,n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,o=getComputedStyle(this).direction==="rtl"?t.right-i:t.left;o=Math.min(o,n-i-vt),o=Math.max(o,vt);let c=t.bottom+4;c+s>r-vt&&t.top-s-4>=vt&&(c=t.top-s-4),c=Math.max(vt,Math.min(c,r-s-vt)),this.#a.style.setProperty("--panel-top",`${Math.round(c)}px`),this.#a.style.setProperty("--panel-left",`${Math.round(o)}px`)}#Z=()=>{this.#g&&this.#J()};#tt=t=>{this.#g&&!this.contains(t.target)&&this.#j()};#Q(){let t=Z(this.#v,this.#E,this.#y);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){if(!this.#i)return;let t=J(this.#k,!0);this.#v=t.h,this.#E=t.s,this.#y=t.l,this.#W(),this.#Q()}formStateRestoreCallback(t){if(!t||!this.#i)return;let i=J(t,!0);this.#v=i.h,this.#E=i.s,this.#y=i.l,this.#W(),this.#Q()}get value(){return Z(this.#v,this.#E,this.#y)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=Z(this.#v,this.#E,this.#y).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=J(t,!0);this.#v=n.h,this.#E=n.s,this.#y=n.l,this.#U("api")}};m("color-picker",Wi);var gu='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"/></svg>',vu='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function yu(e){if(!e)return[];let t=e.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(i=>{let s=i.trim();return{value:s,label:s}})}function wu(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function Au(e){let t=Math.max(0,Math.round(e)),i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return i>0?`${i}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Eu(e,t){let i=Number(e)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(i);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${i<0?"-":""}${a.format(r)} ${s[n]}`}function Su(){return document.documentElement.lang||void 0}function ji(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var Yi=class extends b{static formAssociated=!0;static observedAttributes=["value","disabled","readonly"];#e;#t;#i=-1/0;#s=1/0;#r=1;#n=[];#a=[];#o;#l;#c="";#f=!1;#m=!1;#h;#u;#p;#d;#b;#g;#S;#A;#w;#v=0;#E=0;#y=!1;#k=!1;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){this.#O(),this.#N(),this.#P();let t=this.getAttribute("value");this.#p=t,this.#x(t??this.#B(),"init")}attributeChangedCallback(t,i,s){!this.isConnected||!this.#d||(t==="value"?this.#x(s??this.#B(),"attr"):(t==="disabled"||t==="readonly")&&this.#I())}#O(){this.hasAttribute("data-options")?this.#t="enum":this.hasAttribute("data-values")?this.#t="token":this.hasAttribute("data-format")||this.hasAttribute("data-suffix")?this.#t="formatted":(this.#t="numeric",console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/concepts/numeric-inputs/'))}#N(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#s=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#r=Number(this.getAttribute("data-step"))||1,this.#n=wu(this.getAttribute("data-values")),this.#a=yu(this.getAttribute("data-options")),this.#o=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#l=this.getAttribute("data-currency")||"USD",this.#c=this.getAttribute("data-suffix")||"",this.#f=this.hasAttribute("data-show-label"),this.#m=this.hasAttribute("data-accelerate"),this.#h=Su(),this.#w=this.#_()}#_(){if(!this.#o)return null;let t=ji(this.#r);return this.#o==="number"?new Intl.NumberFormat(this.#h,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#o==="currency"?new Intl.NumberFormat(this.#h,{style:"currency",currency:this.#l}):this.#o==="percent"?new Intl.NumberFormat(this.#h,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#B(){return this.#t==="enum"?this.#a[0]?.value??"":this.#t==="token"?this.#n[0]??"":"0"}#P(){this.replaceChildren(),this.#S=document.createElement("button"),this.#S.type="button",this.#S.className="stepper-dec",this.#S.setAttribute("aria-label","Decrease"),this.#S.setAttribute("tabindex","-1"),this.#S.innerHTML=gu,this.#A=document.createElement("button"),this.#A.type="button",this.#A.className="stepper-inc",this.#A.setAttribute("aria-label","Increase"),this.#A.setAttribute("tabindex","-1"),this.#A.innerHTML=vu,this.#d=document.createElement("span"),this.#d.className="stepper-value",this.#d.setAttribute("role","spinbutton"),this.#d.setAttribute("tabindex","0"),this.#b=document.createElement("span"),this.#b.className="stepper-value-display",this.#d.appendChild(this.#b),this.#g=new Set;for(let t of this.#z())this.#Y(t);this.appendChild(this.#S),this.appendChild(this.#d),this.appendChild(this.#A),this.#D(this.#S,-1),this.#D(this.#A,1),this.listen(this.#d,"keydown",this.#L),this.#I()}#D(t,i){if(this.listen(t,"click",n=>{if(this.#k){this.#k=!1,n.preventDefault();return}this.#C(i,1)}),!this.#m)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#$()||(this.#y=!1,this.#v=window.setTimeout(()=>{this.#y=!0,this.#E=window.setInterval(()=>this.#C(i,1),100),this.#v=window.setTimeout(()=>{window.clearInterval(this.#E),this.#E=window.setInterval(()=>this.#C(i,5),50)},1e3)},500))});let s=()=>{window.clearTimeout(this.#v),window.clearInterval(this.#E),this.#v=0,this.#E=0,this.#y&&(this.#k=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#L=t=>{if(!this.#$())switch(t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#C(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#C(-1,1);break;case"PageUp":t.preventDefault(),this.#C(1,10);break;case"PageDown":t.preventDefault(),this.#C(-1,10);break;case"Home":t.preventDefault(),this.#T("min");break;case"End":t.preventDefault(),this.#T("max");break;default:}};#$(){return this.hasAttribute("disabled")||this.hasAttribute("readonly")}#I(){let t=this.hasAttribute("disabled");this.#S.disabled=t,this.#A.disabled=t,this.#d.setAttribute("aria-disabled",String(t)),t?this.#d.removeAttribute("tabindex"):this.#d.setAttribute("tabindex","0")}#C(t,i){if(this.#$())return;let s=this.#q(t,i);s===null||s===this.#u||this.#x(s,"step")}#T(t){if(this.#t==="enum"){let s=t==="min"?0:this.#a.length-1;this.#x(this.#a[s]?.value,"step");return}if(this.#t==="token"){let s=t==="min"?0:this.#n.length-1;this.#x(this.#n[s],"step");return}let i=t==="min"?this.#i===-1/0?this.#u:this.#i:this.#s===1/0?this.#u:this.#s;this.#x(String(i),"step")}#q(t,i){if(this.#t==="enum"){let c=this.#a.findIndex(u=>u.value===this.#u),l=c===-1?0:c,d=Math.min(this.#a.length-1,Math.max(0,l+t*i));return this.#a[d]?.value}if(this.#t==="token"){let l=this.#H(this.#u);l===-1&&(l=this.#M(this.#u));let d=Math.min(this.#n.length-1,Math.max(0,l+t*i));return this.#n[d]}let s=Number(this.#u)||0,n=ji(this.#r),r=s+t*this.#r*i,a=Number(r.toFixed(n)),o=Math.min(this.#s,Math.max(this.#i,a));return String(o)}#H(t){if(t==null)return-1;let i=this.#n.indexOf(String(t));if(i!==-1)return i;let s=Number(t);if(Number.isFinite(s)){let n=this.#n.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#M(t){let i=Number(t);if(!Number.isFinite(i))return 0;let s=0,n=1/0;return this.#n.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-i);c<n&&(n=c,s=a)}),s}#x(t,i){let s=this.#R(t),n=s!==this.#u;this.#u=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#V(),this.#K(),this.#G(),this.#X(),this.#j(),n&&i!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#R(t){if(t==null)return this.#B();if(this.#t==="enum"){let n=String(t);return this.#a.find(a=>a.value===n)?n:this.#a[0]?.value??""}if(this.#t==="token")return String(t);let i=Number(t);if(!Number.isFinite(i))return String(this.#i===-1/0?0:this.#i);let s=ji(this.#r);return String(Number(Math.min(this.#s,Math.max(this.#i,i)).toFixed(s)))}#V(){let t=this.#F();this.#b.textContent=t,this.#Y(t)}#F(t=this.#u){if(this.#t==="enum")return this.#a.find(s=>s.value===t)?.label??t??"";if(this.#t==="token"){let i=this.#f?String(t).replace(/^--/,""):String(t);return this.#c?`${i}${this.#c}`:i}if(this.#t==="formatted"){let i=Number(t)||0;if(this.#o==="duration")return Au(i);if(this.#o==="bytes")return Eu(i,this.#h);if(this.#w){let s=this.#o==="percent"?i/100:i,n=this.#w.format(s);return this.#c&&this.#o==="number"?`${n}${this.#c}`:n}return this.#c?`${i}${this.#c}`:String(i)}return String(t??"")}#z(){if(this.#t==="enum")return this.#a.map(s=>this.#F(s.value));if(this.#t==="token")return this.#n.map(s=>this.#F(s));let t=new Set,i=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&i(this.#i),this.#s!==1/0&&i(this.#s),i(Number(this.getAttribute("value"))||0),this.#s===1/0){let s=[10,100,1e3,1e4];for(let n of s)i(n);if(this.#o==="bytes")for(let n of[999,999e3,999e6,999e9])i(n)}return[...t].map(s=>this.#F(String(s)))}#Y(t){let i=String(t??"");if(!i||this.#g.has(i))return;this.#g.add(i);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=i,this.#d.appendChild(s)}recomputeWidth(){if(this.#d){this.#d.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#g=new Set;for(let t of this.#z())this.#Y(t)}}#K(){if(this.#t==="enum"){let i=this.#a.findIndex(s=>s.value===this.#u);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#a.length)),this.#d.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#d.setAttribute("aria-valuetext",this.#F());return}if(this.#t==="token"){let i=this.#H(this.#u);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#n.length)),this.#d.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#d.setAttribute("aria-valuetext",this.#F());return}let t=Number(this.#u)||0;this.#i!==-1/0?this.#d.setAttribute("aria-valuemin",String(this.#i)):this.#d.removeAttribute("aria-valuemin"),this.#s!==1/0?this.#d.setAttribute("aria-valuemax",String(this.#s)):this.#d.removeAttribute("aria-valuemax"),this.#d.setAttribute("aria-valuenow",String(t)),this.#d.setAttribute("aria-valuetext",this.#F())}#G(){let t=this.#U(),i=this.#W();this.#S.disabled=t||this.hasAttribute("disabled"),this.#A.disabled=i||this.hasAttribute("disabled")}#U(){return this.#t==="enum"?this.#u===this.#a[0]?.value:this.#t==="token"?this.#H(this.#u)===0:this.#i!==-1/0&&Number(this.#u)<=this.#i}#W(){return this.#t==="enum"?this.#u===this.#a[this.#a.length-1]?.value:this.#t==="token"?this.#H(this.#u)===this.#n.length-1:this.#s!==1/0&&Number(this.#u)>=this.#s}#X(){this.#e.setFormValue(String(this.#u??""))}#j(){this.setState("at-min",this.#U()),this.setState("at-max",this.#W())}formResetCallback(){this.#x(this.#p??this.#B(),"reset")}formStateRestoreCallback(t){t!=null&&this.#x(t,"restore")}get displayText(){return this.#b?.textContent??""}get value(){return this.#u==null?"":String(this.#u)}set value(t){String(t)!==String(this.#u)&&this.#x(t,"api")}get form(){return this.#e.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#e.validity}get validationMessage(){return this.#e.validationMessage}checkValidity(){return this.#e.checkValidity()}reportValidity(){return this.#e.reportValidity()}};m("stepper-wc",Yi);var xu=new Set(["live","recording","streaming","error","online","running","away","paused","busy","offline","stopped"]),Gi=class extends b{static observedAttributes=["data-variant","data-live"];#e;setup(){let t=document.createElement("span");for(t.className="status-dot",t.setAttribute("aria-hidden","true"),this.#e=document.createElement("span"),this.#e.className="status-label";this.firstChild;)this.#e.appendChild(this.firstChild);this.appendChild(t),this.appendChild(this.#e),this.#t(),this.#i(),this.#r()}attributeChangedCallback(t,i,s){!this.isConnected||i===s||(t==="data-variant"?(this.#i(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:i}}))):t==="data-live"&&this.#t())}#t(){this.getAttribute("data-live")==="off"?(this.removeAttribute("role"),this.removeAttribute("aria-live")):(this.hasAttribute("role")||this.setAttribute("role","status"),this.hasAttribute("aria-live")||this.setAttribute("aria-live","polite"))}#i(){let t=this.getAttribute("data-variant");t&&(xu.has(t)||this.#s(t)||console.info(`[status-wc] data-variant="${t}" is not a built-in; add a CSS rule (status-wc[data-variant="${t}"] { --status-dot-color: \u2026; }) or use a built-in.`))}#s(t){let i=this.querySelector(".status-dot");if(!i)return!0;let s=getComputedStyle(i).getPropertyValue("--status-dot-color").trim();return s&&s!==""}#r(){let t=this.#e?.textContent.trim(),i=this.hasAttribute("aria-label");!t&&!i&&console.warn("[status-wc] needs slot text or aria-label for accessibility.")}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};m("status-wc",Gi);de();ue();var Ki=0,Cu='a[href], button, input, select, textarea, summary, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])';function we(e){return e.hasAttribute("data-disabled")||e.getAttribute("aria-disabled")==="true"||!!e.disabled}function ku(e){return e.split("+").map(t=>{let i=t.trim().toLowerCase();return i==="meta"||i==="cmd"?X?"Meta":"Control":i==="ctrl"?"Control":i==="alt"?"Alt":i==="shift"?"Shift":i.length===1?i.toUpperCase():i.charAt(0).toUpperCase()+i.slice(1)}).join("+")}function Tu(e){return e.pointerType===""||e.pointerId===-1||e.button===-1||e.clientX===0&&e.clientY===0&&e.buttons===0}var Xi=class extends b{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=[];setup(){let t=this.querySelector(":scope > [data-trigger]"),i=this.querySelector('menu, ul[role="menu"]');if(!t||!i)return!1;this.#e=t,this.#t=i;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++Ki}`,this.#i.dataset.mode="auto",this.#i.appendChild(this.#t),this.appendChild(this.#i)),this.#t.parentElement!==this.#i&&this.#i.appendChild(this.#t),this.#t.setAttribute("role","menu"),this.#t.id||(this.#t.id=`ctx-menu-list-${++Ki}`),this.#e.setAttribute("aria-haspopup","menu"),this.#e.setAttribute("aria-expanded","false"),this.#e.setAttribute("aria-controls",this.#t.id),this.#e.matches(Cu)||this.#e.setAttribute("tabindex","0"),this.#t.querySelectorAll(':scope > li:empty:not([data-group]), :scope > [role="separator"], :scope > hr').forEach(r=>{r.setAttribute("role","separator")}),this.#o();let n=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]'));return n.forEach(r=>{r.setAttribute("role","menuitem"),r.setAttribute("tabindex","-1")}),this.#s=n.filter(r=>!r.disabled),this.#t.querySelectorAll("li").forEach(r=>{r.querySelector(':scope > :is(button, a, [role="menuitem"])')&&r.setAttribute("role","none")}),this.#s.forEach(r=>{r.hasAttribute("data-disabled")&&r.setAttribute("aria-disabled","true"),this.listen(r,"click",this.#g);let a=r.getAttribute("data-shortcut");if(a){if(!r.querySelector(":scope > .ctx-kbd")){let c=document.createElement("kbd");c.className="ctx-kbd",c.setAttribute("aria-hidden","true"),c.textContent=ra(a),r.appendChild(c)}r.setAttribute("aria-keyshortcuts",ku(a));let o=pt(a,()=>{we(r)||r.click()});this.#a.push(o)}}),this.listen(this.#e,"contextmenu",this.#c),this.listen(this.#e,"keydown",this.#f),this.listen(this.#t,"keydown",this.#d),this.listen(this.#t,"click",this.#b,{capture:!0}),this.listen(window,"scroll",this.#A,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#S),!0}teardown(){this.#a.forEach(t=>t()),this.#a=[],this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#i?.hide?.()),this.#r=-1,this.#s=[],this.#t?.querySelectorAll(".ctx-kbd").forEach(t=>t.remove()),this.#l()}#o(){let t=this.#t;for(let i of Array.from(t.querySelectorAll(":scope > li[data-group]"))){i.id||(i.id=`ctx-group-${++Ki}`),i.classList.add("ctx-group-label"),i.setAttribute("aria-hidden","true");let s=document.createElement("li");s.setAttribute("role","group"),s.setAttribute("aria-labelledby",i.id),s.setAttribute("data-ctx-group","");let n=document.createElement("ul");n.setAttribute("role","none"),s.appendChild(n),t.insertBefore(s,i),n.appendChild(i);let r=s.nextElementSibling;for(;r&&!r.hasAttribute("data-group")&&r.getAttribute("role")!=="separator";){let a=r;r=r.nextElementSibling,n.appendChild(a)}}}#l(){let t=this.#t;if(t)for(let i of Array.from(t.querySelectorAll(":scope > li[data-ctx-group]"))){let s=i.querySelector(":scope > ul");if(s)for(let n of Array.from(s.children))t.insertBefore(n,i);i.remove()}}get items(){if(!this.#t)return[];let t=[],i=this.#t.querySelectorAll(":scope > li:not([data-ctx-group]), :scope > li[data-ctx-group] > ul > li");for(let s of i){if(s.hasAttribute("data-group")){t.push({group:s.textContent.trim()});continue}if(s.matches(':empty, [role="separator"]')||s.querySelector("hr")){t.push({separator:!0});continue}let n=s.querySelector('button, a, [role="menuitem"]');if(!n)continue;let r=Array.from(n.childNodes).filter(a=>!(a instanceof Element&&a.classList.contains("ctx-kbd"))).map(a=>a.textContent).join("");t.push({label:r.trim().replace(/\s+/g," "),value:n.getAttribute("data-value")||void 0,href:n.tagName==="A"?n.getAttribute("href"):void 0,shortcut:n.getAttribute("data-shortcut")||void 0,disabled:n.disabled||n.hasAttribute("data-disabled")||void 0})}return t}set items(t){let i=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&a.setAttribute("data-disabled",""),a.tagName==="BUTTON"&&a.setAttribute("type","button"),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this._reinit(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#c=t=>{if(t.preventDefault(),Tu(t)){this.#n||this.#m();return}t.buttons!==0?this.listen(window,"pointerup",()=>{setTimeout(()=>this.#h(t.clientX,t.clientY),0)},{once:!0,capture:!0}):this.#h(t.clientX,t.clientY)};#f=t=>{t.target===this.#e&&(t.key==="ContextMenu"||t.key==="F10"&&t.shiftKey)&&(t.preventDefault(),this.#n||this.#m())};#m(){let t=this.#e.getBoundingClientRect();this.#h(t.left,t.bottom)}#h(t,i){this.#n=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#i.style.top=`${i}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let s=this.#i.getBoundingClientRect(),n=t+s.width>window.innerWidth?t-s.width:t,r=i+s.height>window.innerHeight?i-s.height:i;this.#i.style.top=`${Math.max(0,r)}px`,this.#i.style.left=`${Math.max(0,n)}px`}),this.#r=-1,this.#w(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){if(!this.#n)return;let t=this.#u();this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.#i?.hide(),t&&this.#p(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0}))}#u(){let t=document.activeElement;return!t||t===document.body||!!this.#i?.contains(t)}#p(){this.#e?.isConnected&&this.#e.focus({preventScroll:!0})}#d=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#w(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#w(this.#r-1);break;case"Home":t.preventDefault(),this.#w(0);break;case"End":t.preventDefault(),this.#w(this.#s.length-1);break;case"Enter":case" ":{t.preventDefault();let i=this.#s[this.#r];i&&!we(i)&&i.click();break}case"Tab":this.close();break}};#b=t=>{let i=t.target.closest?.('button, a, [role="menuitem"]');i&&this.#t.contains(i)&&we(i)&&(t.preventDefault(),t.stopPropagation())};#g=t=>{let i=t.currentTarget;we(i)||(this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:i,value:i.getAttribute("data-value")||void 0}})))};#S=()=>{this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.#u()&&this.#p(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#A=()=>{this.#n&&this.close()};#w(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}get isOpen(){return this.#n}};m("context-menu",Xi);var Ji=class extends b{#e;#t;#i=null;#s=!1;setup(){if(this.#s)return;let t=this.getAttribute("src");return t?(this.#i===null&&(this.#i=this.innerHTML),this.hasAttribute("lazy")?this.#n():this.#a(t),!0):!1}teardown(){this.#e?.disconnect(),this.#t?.abort()}get src(){return this.getAttribute("src")||""}set src(t){let i=t==null?"":String(t);this.src!==i&&(i?this.setAttribute("src",i):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:i,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,i,s){t==="src"&&s&&i!==s&&this.isConnected&&(this.hasAttribute("lazy")&&!this.#r()?this.#n():this.#a(s))}#r(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#n(){this.#e?.disconnect(),this.#e=new IntersectionObserver(t=>{for(let i of t)if(i.isIntersecting){this.#e.disconnect();let s=this.getAttribute("src");s&&this.#a(s)}},{rootMargin:"200px"}),this.#e.observe(this)}async#a(t){this.#t?.abort(),this.#t=new AbortController,this.setAttribute("data-loading",""),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let i=await fetch(t,{signal:this.#t.signal});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);let s=await i.text(),n=this.getAttribute("mode")||"replace";n==="replace"?this.innerHTML=s:n==="append"?this.insertAdjacentHTML("beforeend",s):n==="prepend"&&this.insertAdjacentHTML("afterbegin",s),this.hasAttribute("allow-scripts")?this.querySelectorAll("script").forEach(r=>{let a=document.createElement("script");for(let o of r.attributes)a.setAttribute(o.name,o.value);a.textContent=r.textContent,r.replaceWith(a)}):this.querySelectorAll("script").forEach(r=>r.remove()),this.removeAttribute("data-loading"),this.setAttribute("data-loaded",""),this.#s=!0,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,html:s}}))}catch(i){if(i.name==="AbortError")return;this.removeAttribute("data-loading"),this.setAttribute("data-error",""),(this.getAttribute("mode")||"replace")==="replace"&&this.#i!==null&&!this.#s&&(this.innerHTML=this.#i),this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:i.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};m("include-file",Ji);Y();var La="environment",Ma="preferences",Zi={timeOfDay:!1,seasonal:!1},Lu=900*1e3,Q={...Zi};function ot(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var $t={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await E.get(La,Ma);Q=e?{...Zi,...e}:{...Zi},(Q.timeOfDay||Q.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...Q}},save(e){return Q={...Q,...e},E.set(La,Ma,Q).catch(()=>{}),{...Q}},setTimeOverride(e){this._timeOverride=e,this._hasActiveSource()&&this._update()},setMonthOverride(e){this._monthOverride=e,this._hasActiveSource()&&this._update()},setSource(e,t){let i=this.save({[e]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(i)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(e){let t=e||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent");let t=e.getAttribute("data-theme");if(t){let i=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(i)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let e=this.load(),t=0;e.timeOfDay&&(t+=this._getTimeOfDayOffset()),e.seasonal&&(t+=this._getSeasonalOffset());let i=document.documentElement;t!==0&&this._baseHues?(i.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),i.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),i.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let e=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return e<5?-20:e<7?ot(-20,20,(e-5)/2):e<10?ot(20,5,(e-7)/3):e<14?ot(5,0,(e-10)/4):e<17?ot(0,-5,(e-14)/3):e<19?ot(-5,15,(e-17)/2):e<21?ot(15,-10,(e-19)/2):ot(-10,-20,(e-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let e=this._monthOverride??new Date().getMonth(),i=this._getHemisphere()==="south"?(e+6)%12:e;return i>=2&&i<=4?5:i>=5&&i<=7?10:i>=8&&i<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),Lu))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var Ae=null;function _a(){return"0.5.0-c9fb648d"}function Mu(){let e=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let i of e){let s=i.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function Da(){return Ae||(Ae=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),Ae}function Ia(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?Na(navigator.serviceWorker.controller,e,t,i):Da().then(s=>{let n=s.active||s.waiting||s.installing;n?Na(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function Na(e,t,i,s){let n=new MessageChannel;n.port1.onmessage=r=>i(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),e.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function Oa(){return Ia("GET_STATUS")}async function qa(){return Ia("CLEAR_CACHE")}async function $a(){let e=await Da();return await e.update(),{updated:!!e.waiting}}function Nu(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Nu()){let e=Mu();window.addEventListener("load",()=>{Ae=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}Y();var yt=null,z="settings",Pt={motionFx:!0,sounds:!1},ss=class extends b{#e=null;#t=null;#i=!1;#s=[];#r={...Pt};#n=!1;setup(){return this.#a(),!0}async#a(){await this.#o(),this.#S(),this.#w(),this.#R(),this.listen(window,"vb:theme-change",this.#x),this.listen(window,"vb:extensions-change",this.#x),this.listen(window,"vb:a11y-themes-change",this.#x)}teardown(){this.#t?.remove(),this.#t=null}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#r},sticky:this.#n}}set data(t){if(!t||typeof t!="object")return;let i=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],i.push(E.set(z,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#r={...Pt,...t.extensions},i.push(E.set(z,"extensions",this.#r))),t.sticky!=null&&(this.#n=!!t.sticky,i.push(E.set(z,"sticky",this.#n?"on":"off"))),Promise.all(i).then(()=>{this.#R?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#o(){let[t,i,s]=await Promise.all([E.get(z,"a11y"),E.get(z,"extensions"),E.get(z,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#r={...Pt,...i??{}},this.#n=s==="on"}#l(t){return t!==""&&t!==void 0}#c(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#f(t,i){return t?i==="compact"?"compact":i==="spacious"?"spacious":"default":""}#m(){return this.#n}#h(t){return t!==""&&t!==void 0}#u(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#p(t,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#d(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#b(t){return t?t.split(/\s+/).includes("fixed"):!1}#g(t,i){let s=[];return t&&t!=="card"&&s.push(t),i&&s.push("fixed"),s.join(" ")||"card"}#S(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.setAttribute("data-trigger",""),this.#e.setAttribute("aria-label","Site settings"),this.#e.className="settings-trigger",this.#e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#t=document.createElement("div"),this.#t.className="settings-panel",this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#t.id=t,this.#e.setAttribute("aria-controls",t),this.#t.innerHTML=this.#A(),this.appendChild(this.#t)}#A(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:d}=x.getState(),u=this.#Y(),h=this.#X(),f=this.#l(s),g=this.#c(s),p=this.#h(n),v=this.#u(n);return`
328
328
  <header class="settings-header">
329
329
  <strong>Settings</strong>
330
330
  <button type="button" class="settings-close" aria-label="Close settings">
@@ -340,20 +340,20 @@ svg {
340
340
  <span class="settings-label">Color Mode</span>
341
341
  <fieldset data-segmented>
342
342
  <legend class="visually-hidden">Color mode</legend>
343
- ${[{id:"auto",name:"Auto",icon:"monitor"},{id:"light",name:"Light",icon:"sun"},{id:"dark",name:"Dark",icon:"moon"}].map(y=>`
343
+ ${[{id:"auto",name:"Auto",icon:"monitor"},{id:"light",name:"Light",icon:"sun"},{id:"dark",name:"Dark",icon:"moon"}].map(w=>`
344
344
  <label>
345
- <input type="radio" name="settings-mode" value="${y.id}" ${t===y.id?"checked":""} />
346
- <icon-wc name="${y.icon}" size="xs"></icon-wc> ${y.name}
345
+ <input type="radio" name="settings-mode" value="${w.id}" ${t===w.id?"checked":""} />
346
+ <icon-wc name="${w.icon}" size="xs"></icon-wc> ${w.name}
347
347
  </label>
348
348
  `).join("")}
349
349
  </fieldset>
350
350
 
351
351
  <label class="settings-label" for="settings-theme">Theme</label>
352
352
  <select id="settings-theme" name="settings-theme">
353
- ${Lr.map(y=>`
354
- <optgroup label="${y.label}">
355
- ${y.themes.map(k=>`
356
- <option value="${k.id}" ${i===k.id?"selected":""}>${k.name}</option>
353
+ ${zr.map(w=>`
354
+ <optgroup label="${w.label}">
355
+ ${w.themes.map(T=>`
356
+ <option value="${T.id}" ${i===T.id?"selected":""}>${T.name}</option>
357
357
  `).join("")}
358
358
  </optgroup>
359
359
  `).join("")}
@@ -392,10 +392,10 @@ svg {
392
392
  <span class="settings-label">Density</span>
393
393
  <fieldset data-segmented>
394
394
  <legend class="visually-hidden">Density</legend>
395
- ${["compact","default","spacious"].map(y=>`
395
+ ${["compact","default","spacious"].map(w=>`
396
396
  <label>
397
- <input type="radio" name="settings-density" value="${y}" ${v===y?"checked":""} />
398
- ${y[0].toUpperCase()+y.slice(1)}
397
+ <input type="radio" name="settings-density" value="${w}" ${g===w?"checked":""} />
398
+ ${w[0].toUpperCase()+w.slice(1)}
399
399
  </label>
400
400
  `).join("")}
401
401
  </fieldset>
@@ -409,10 +409,10 @@ svg {
409
409
  <span class="settings-label">Style</span>
410
410
  <fieldset data-segmented>
411
411
  <legend class="visually-hidden">Backdrop style</legend>
412
- ${["default","flush","elevated"].map(y=>`
412
+ ${["default","flush","elevated"].map(w=>`
413
413
  <label>
414
- <input type="radio" name="settings-backdrop" value="${y}" ${m===y?"checked":""} />
415
- ${y[0].toUpperCase()+y.slice(1)}
414
+ <input type="radio" name="settings-backdrop" value="${w}" ${v===w?"checked":""} />
415
+ ${w[0].toUpperCase()+w.slice(1)}
416
416
  </label>
417
417
  `).join("")}
418
418
  </fieldset>
@@ -421,10 +421,10 @@ svg {
421
421
  <span class="settings-label">Chrome</span>
422
422
  <fieldset data-segmented>
423
423
  <legend class="visually-hidden">Backdrop chrome mode</legend>
424
- ${["card","stretch","integrated"].map(y=>`
424
+ ${["card","stretch","integrated"].map(w=>`
425
425
  <label>
426
- <input type="radio" name="settings-backdrop-chrome" value="${y}" ${this.#d(r)===y?"checked":""} />
427
- ${y[0].toUpperCase()+y.slice(1)}
426
+ <input type="radio" name="settings-backdrop-chrome" value="${w}" ${this.#d(r)===w?"checked":""} />
427
+ ${w[0].toUpperCase()+w.slice(1)}
428
428
  </label>
429
429
  `).join("")}
430
430
  </fieldset>
@@ -432,7 +432,7 @@ svg {
432
432
  <div class="backdrop-row" ${p?"":"hidden"}>
433
433
  <label class="toggle-row">
434
434
  <span>Fixed Header</span>
435
- <input type="checkbox" name="settings-backdrop-fixed" data-switch="sm" data-backdrop-fixed ${this.#y(r)?"checked":""} />
435
+ <input type="checkbox" name="settings-backdrop-fixed" data-switch="sm" data-backdrop-fixed ${this.#b(r)?"checked":""} />
436
436
  </label>
437
437
  </div>
438
438
  <div class="backdrop-row" ${p?"":"hidden"}>
@@ -451,21 +451,21 @@ svg {
451
451
  <span class="settings-label">Start</span>
452
452
  <input type="color" name="settings-page-bg-grad-start" value="${c||"#1a1a2e"}" />
453
453
  <span class="settings-label">End</span>
454
- <input type="color" name="settings-page-bg-grad-end" value="${d||"#16213e"}" />
454
+ <input type="color" name="settings-page-bg-grad-end" value="${l||"#16213e"}" />
455
455
  </div>
456
456
  <div class="page-bg-grad-dir-row backdrop-row" ${a==="gradient"&&p?"":"hidden"}>
457
457
  <span class="settings-label">Direction</span>
458
458
  <select name="settings-page-bg-grad-dir">
459
- <option value="to bottom" ${(l||"to bottom")==="to bottom"?"selected":""}>Top \u2192 Bottom</option>
460
- <option value="to right" ${l==="to right"?"selected":""}>Left \u2192 Right</option>
461
- <option value="135deg" ${l==="135deg"?"selected":""}>Diagonal \u2198</option>
462
- <option value="45deg" ${l==="45deg"?"selected":""}>Diagonal \u2197</option>
459
+ <option value="to bottom" ${(d||"to bottom")==="to bottom"?"selected":""}>Top \u2192 Bottom</option>
460
+ <option value="to right" ${d==="to right"?"selected":""}>Left \u2192 Right</option>
461
+ <option value="135deg" ${d==="135deg"?"selected":""}>Diagonal \u2198</option>
462
+ <option value="45deg" ${d==="45deg"?"selected":""}>Diagonal \u2197</option>
463
463
  </select>
464
464
  </div>
465
465
 
466
466
  <label class="toggle-row">
467
467
  <span>Sticky Navigation</span>
468
- <input type="checkbox" name="sticky-nav" data-switch="sm" data-sticky-toggle ${this.#p()?"checked":""} />
468
+ <input type="checkbox" name="sticky-nav" data-switch="sm" data-sticky-toggle ${this.#m()?"checked":""} />
469
469
  </label>
470
470
  </div>
471
471
  </details>
@@ -491,11 +491,11 @@ svg {
491
491
  <div class="settings-section">
492
492
  <label class="toggle-row">
493
493
  <span>Time-of-Day Shifts</span>
494
- <input type="checkbox" name="env-timeOfDay" data-switch="sm" data-env="timeOfDay" ${this.#j().timeOfDay?"checked":""} />
494
+ <input type="checkbox" name="env-timeOfDay" data-switch="sm" data-env="timeOfDay" ${this.#W().timeOfDay?"checked":""} />
495
495
  </label>
496
496
  <label class="toggle-row">
497
497
  <span>Seasonal Tinting</span>
498
- <input type="checkbox" name="env-seasonal" data-switch="sm" data-env="seasonal" ${this.#j().seasonal?"checked":""} />
498
+ <input type="checkbox" name="env-seasonal" data-switch="sm" data-env="seasonal" ${this.#W().seasonal?"checked":""} />
499
499
  </label>
500
500
  </div>
501
501
  </details>
@@ -504,7 +504,7 @@ svg {
504
504
  <details name="settings">
505
505
  <summary>System</summary>
506
506
  <div class="settings-section system-info">
507
- <p class="system-version">Vanilla Breeze <code>v${ba()}</code></p>
507
+ <p class="system-version">Vanilla Breeze <code>v${_a()}</code></p>
508
508
  <p class="system-sw-status" data-sw-status>Service Worker: <span>checking\u2026</span></p>
509
509
  <footer class="system-actions">
510
510
  <button type="button" data-action="clear-cache">Clear Cache</button>
@@ -517,7 +517,7 @@ svg {
517
517
  <footer class="settings-footer">
518
518
  <button type="button" class="settings-reset">Reset to Defaults</button>
519
519
  </footer>
520
- `}#g(){this.#e.addEventListener("click",this.#C),this.listen(document,"click",this.#N),this.listen(document,"keydown",this.#L),this.#t.querySelector(".settings-close")?.addEventListener("click",()=>this.close()),this.#t.querySelectorAll('input[name="settings-mode"]').forEach(t=>{t.addEventListener("change",this.#S)}),this.#t.querySelector("#settings-theme")?.addEventListener("change",this.#B),this.#t.querySelector("input[data-fluid-toggle]")?.addEventListener("change",this.#q),this.#t.querySelectorAll('input[name="settings-density"]').forEach(t=>{t.addEventListener("change",this.#k)}),this.#t.querySelector("input[data-backdrop-toggle]")?.addEventListener("change",this.#I),this.#t.querySelectorAll('input[name="settings-backdrop"]').forEach(t=>{t.addEventListener("change",this.#$)}),this.#t.querySelectorAll('input[name="settings-backdrop-chrome"]').forEach(t=>{t.addEventListener("change",this.#R)}),this.#t.querySelector("input[data-backdrop-fixed]")?.addEventListener("change",this.#T),this.#t.querySelector("input[data-sticky-toggle]")?.addEventListener("change",this.#_),this.#t.querySelector('[name="settings-page-bg"]')?.addEventListener("change",this.#E),this.#t.querySelector('[name="settings-page-bg-color"]')?.addEventListener("input",this.#x),this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.addEventListener("input",this.#x),this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.addEventListener("input",this.#x),this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.addEventListener("change",this.#x),this.#t.querySelectorAll("input[data-a11y]").forEach(t=>{t.addEventListener("change",this.#A)}),this.#t.querySelectorAll("input[data-ext]").forEach(t=>{t.addEventListener("change",this.#M)}),this.#t.querySelectorAll("input[data-env]").forEach(t=>{t.addEventListener("change",this.#H)}),this.#t.querySelector(".settings-reset")?.addEventListener("click",this.#F),this.#t.querySelector('[data-action="clear-cache"]')?.addEventListener("click",this.#Q),this.#t.querySelector('[data-action="check-update"]')?.addEventListener("click",this.#tt),this.#Z()}#C=t=>{t.stopPropagation(),this.toggle()};#N=t=>{this.#i&&!this.contains(t.target)&&this.close()};#L=t=>{t.key==="Escape"&&this.#i&&(t.preventDefault(),this.close(),this.#e?.focus())};#S=t=>{x.setMode(t.target.value)};#B=async t=>{let i=t.target;i.disabled=!0;try{await x.setBrand(i.value),this.#G()}catch{console.warn("[VB] Theme load failed, using default")}finally{i.disabled=!1}};#q=t=>{let i=t.target.checked,s=this.#f(x.getState().fluid)||"default";x.setFluid(this.#h(i,s)),this.#O(i)};#k=t=>{x.setFluid(this.#h(!0,t.target.value))};#I=t=>{let i=t.target.checked,s=this.#l(x.getState().backdrop)||"default";x.setBackdrop(this.#m(i,s)),this.#D(i)};#$=t=>{x.setBackdrop(this.#m(!0,t.target.value))};#R=t=>{let i=this.#y(x.getState().backdropChrome);x.setBackdropChrome(this.#w(t.target.value,i))};#T=t=>{let i=this.#d(x.getState().backdropChrome);x.setBackdropChrome(this.#w(i,t.target.checked))};#_=async t=>{let i=t.target.checked;this.#n=i,await S.set(H,"sticky",i?"on":"off");let s=document.querySelector("header");if(i){document.documentElement.dataset.sticky="",s&&(s.dataset.sticky="");let{initStickyManager:n}=await Promise.resolve().then(()=>(qt(),ge));n()}else{delete document.documentElement.dataset.sticky,s&&delete s.dataset.sticky;let{destroyStickyManager:n}=await Promise.resolve().then(()=>(qt(),ge));n()}};#E=t=>{let i=t.target.value;if(this.#z(i),i==="color"){let s=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"#1a1a2e";x.setPageBg({type:i,color:s})}else if(i==="gradient"){let s=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"#1a1a2e",n=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"#16213e",r=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";x.setPageBg({type:i,gradStart:s,gradEnd:n,gradDir:r})}else x.setPageBg({})};#x=()=>{let t=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";if(t==="color"){let i=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"";x.setPageBg({type:t,color:i})}else if(t==="gradient"){let i=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"",s=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"",n=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";x.setPageBg({type:t,gradStart:i,gradEnd:s,gradDir:n})}};#A=t=>{let i=t.target.dataset.a11y,s=this.#W();if(t.target.checked&&!s.includes(i))s.push(i);else if(!t.target.checked){let n=s.indexOf(i);n!==-1&&s.splice(n,1)}this.#Y(s),this.#U(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:s}))};#M=t=>{let i=t.target.dataset.ext,s=t.target.checked;this.#K(i,s),this.#J()};#H=t=>{let i=t.target.dataset.env,s=t.target.checked;Ot.setSource(i,s)};#F=()=>{confirm("Reset all settings to defaults?")&&(x.reset(),this.#Y([]),this.#U(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[]})),this.#r={...$t},S.remove(H,"extensions").catch(()=>{}),this.#J(),this.#n=!1,S.remove(H,"sticky").catch(()=>{}),delete document.documentElement.dataset.sticky,Promise.resolve().then(()=>(qt(),ge)).then(t=>t.destroyStickyManager()).catch(()=>{}),Ot.setSource("timeOfDay",!1),Ot.setSource("seasonal",!1),this.#V())};#P=()=>{this.#V()};#V(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:d,pageBgGradDir:l}=x.getState(),u=this.#W(),h=this.#X(),f=this.#o(s),v=this.#f(s),p=this.#u(n),m=this.#l(n),y=this.#t.querySelector(`input[name="settings-mode"][value="${t}"]`);y&&(y.checked=!0);let k=this.#t.querySelector("#settings-theme");k&&(k.value=i||"default");let L=this.#t.querySelector("input[data-fluid-toggle]");L&&(L.checked=f);let V=this.#t.querySelector(`input[name="settings-density"][value="${v}"]`);V&&(V.checked=!0),this.#O(f);let Y=this.#t.querySelector("input[data-backdrop-toggle]");Y&&(Y.checked=p);let Qt=this.#t.querySelector(`input[name="settings-backdrop"][value="${m}"]`);Qt&&(Qt.checked=!0);let zl=this.#d(r),pr=this.#t.querySelector(`input[name="settings-backdrop-chrome"][value="${zl}"]`);pr&&(pr.checked=!0);let mr=this.#t.querySelector("input[data-backdrop-fixed]");mr&&(mr.checked=this.#y(r)),this.#D(p);let br=this.#t.querySelector('[name="settings-page-bg"]');br&&(br.value=a||"");let gr=this.#t.querySelector('[name="settings-page-bg-color"]');gr&&o&&(gr.value=o);let vr=this.#t.querySelector('[name="settings-page-bg-grad-start"]');vr&&c&&(vr.value=c);let yr=this.#t.querySelector('[name="settings-page-bg-grad-end"]');yr&&d&&(yr.value=d);let wr=this.#t.querySelector('[name="settings-page-bg-grad-dir"]');wr&&l&&(wr.value=l),p&&this.#z(a||""),this.#t.querySelectorAll("input[data-a11y]").forEach(Ct=>{let K=Ct;K.checked=u.includes(K.dataset.a11y||"")}),this.#t.querySelectorAll("input[data-ext]").forEach(Ct=>{let K=Ct,te=K.dataset.ext,Ul=h[te];K.checked=Ul??$t[te]});let Er=this.#t.querySelector("input[data-sticky-toggle]");Er&&(Er.checked=this.#p());let Vl=this.#j();this.#t.querySelectorAll("input[data-env]").forEach(Ct=>{let K=Ct,te=K.dataset.env;K.checked=Vl[te]??!1})}#O(t){let i=this.#t.querySelector(".density-row");i&&(i.hidden=!t)}#D(t){if(this.#t.querySelectorAll(".backdrop-row").forEach(i=>{i.hidden=!t}),t){let i=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";this.#z(i)}}#z(t){let i=this.#t.querySelector(".page-bg-color-row"),s=this.#t.querySelector(".page-bg-grad-row"),n=this.#t.querySelector(".page-bg-grad-dir-row");i&&(i.hidden=t!=="color"),s&&(s.hidden=t!=="gradient"),n&&(n.hidden=t!=="gradient")}#W(){return[...this.#s]}#Y(t){this.#s=[...t],S.set(H,"a11y",this.#s).catch(()=>{})}#U(){let t=this.#W(),{brand:i}=x.getState(),s=document.documentElement,n=i!=="default"?[i,...t]:[...t];n.length?s.dataset.theme=n.join(" "):delete s.dataset.theme}#G(){this.#U()}#j(){return Ot.load()}#X(){return{...this.#r}}#K(t,i){this.#r={...this.#r,[t]:i},S.set(H,"extensions",this.#r).catch(()=>{})}async#J(){let t=this.#X(),i=document.documentElement;t.motionFx?delete i.dataset.motionReduced:i.dataset.motionReduced="",t.sounds?(yt||(yt=(await Promise.resolve().then(()=>(Ca(),xa))).SoundManager),yt.init(),yt.enable()):yt&&yt.disable(),window.dispatchEvent(new CustomEvent("vb:extensions-change",{detail:t}))}async#Z(){let t=this.#t.querySelector("[data-sw-status] span");if(t){if(!("serviceWorker"in navigator)){t.textContent="Not supported";return}try{let s=(await ya()).cachedURLs?.length??0;t.textContent=`Active (${s} cached files)`}catch{t.textContent="Not registered"}}}#Q=async t=>{let i=t.target;i.disabled=!0,i.textContent="Clearing\u2026";try{await wa(),i.textContent="Cleared!",this.#Z(),setTimeout(()=>{i.textContent="Clear Cache",i.disabled=!1},2e3)}catch{i.textContent="Failed",setTimeout(()=>{i.textContent="Clear Cache",i.disabled=!1},2e3)}};#tt=async t=>{let i=t.target;i.disabled=!0,i.textContent="Checking\u2026";try{let{updated:s}=await Ea();i.textContent=s?"Update available!":"Up to date",setTimeout(()=>{i.textContent="Check for Updates",i.disabled=!1},2e3)}catch{i.textContent="Failed",setTimeout(()=>{i.textContent="Check for Updates",i.disabled=!1},2e3)}};open(){this.#i||(this.#i=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#V(),this.#et())}#et(){let t=this.getBoundingClientRect(),i=this.#t;i.style.removeProperty("top"),i.style.removeProperty("bottom"),i.style.removeProperty("left"),i.style.removeProperty("right");let s=i.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,a=t.top,o=r-t.bottom;a<s.height&&o>a?(i.style.top="calc(100% + 8px)",i.style.bottom="auto"):(i.style.bottom="calc(100% + 8px)",i.style.top="auto");let c=n-t.right,d=t.left,l=s.width;t.right<l&&d<c?(i.style.left="0",i.style.right="auto"):(i.style.right="0",i.style.left="auto")}close(){this.#i&&(this.#i=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"))}toggle(){this.#i?this.close():this.open()}};b("settings-panel",Gi);X();Bt();var su={update:"package",alert:"alert-triangle",watch:"eye",system:"settings",message:"mail",stewardship:"shield"};function O(e){return String(e??"").replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}var Ki=class extends g{#e="panel";#t=null;#i=null;#s=null;#r=null;#n=new Set;#a=[];#c=!1;#o=null;#f=new Set;#h="all";#p=[];setup(){return this.#e=this.getAttribute("mode")==="banner"?"banner":"panel",this.#e==="banner"?this.#u():this.#m(),!0}teardown(){this.#o!=null&&(clearInterval(this.#o),this.#o=null)}get notifications(){return[...this.#a]}set notifications(t){this.#e==="panel"&&(this.#a=Array.isArray(t)?t:[],typeof this.#g=="function"&&this.#g(),typeof this.#N=="function"&&this.#N(),this.dispatchEvent(new CustomEvent("notification-wc:notifications-changed",{detail:{notifications:this.#a,source:"property"},bubbles:!0})))}async#u(){let t=this.getAttribute("persist");if(t||console.warn("[notification-wc] banner mode requires a persist attribute"),this.dataset.mode="banner",this.dataset.variant=this.getAttribute("variant")||"info",this.dataset.position=this.getAttribute("position")||"top",t){let s=Number(this.getAttribute("expires")??""),n=Number.isFinite(s)&&s>0?s*864e5:void 0,r=await S.get("notifications",t,n?{maxAge:n}:void 0);if(r&&r.dismissed){this.hidden=!0;return}}let i=this.querySelector('[value="dismiss"], [data-dismiss]');i&&(this.#t=i,this.listen(i,"click",this.#l))}#l=async t=>{t.preventDefault();let i=this.getAttribute("persist");i&&await S.set("notifications",i,{dismissed:!0}),this.dispatchEvent(new CustomEvent("notification-wc:dismiss",{bubbles:!0,composed:!0,detail:{id:i}})),this.hidden=!0};async#m(){if(this.dataset.mode="panel",await this.#d(),this.#w(),this.#v(),await this.#L(),this.#N(),this.listen(document,"click",this.#$),this.listen(document,"keydown",this.#R),this.listen(document,"page-watch:add",()=>this.#L()),this.listen(document,"page-watch:remove",()=>this.#L()),this.getAttribute("src")){await this.#A();let t=Number(this.getAttribute("poll"));Number.isFinite(t)&&t>0&&(this.#o=setInterval(()=>this.#A(),t))}}async#d(){let t=this.getAttribute("storage-key")||"notifications",i=await S.get(t,"read-ids");Array.isArray(i)&&(this.#n=new Set(i.filter(s=>typeof s=="string")))}async#y(){let t=this.getAttribute("storage-key")||"notifications";await S.set(t,"read-ids",Array.from(this.#n))}#w(){if(this.#i=this.querySelector(":scope > [data-trigger]"),this.#i){let t=this.#i.querySelector(".notification-badge");t||(t=document.createElement("span"),t.className="notification-badge",t.hidden=!0,this.#i.appendChild(t))}else{let t=document.createElement("button");t.type="button",t.setAttribute("data-trigger",""),t.className="notification-trigger",t.setAttribute("aria-label","Notifications"),t.innerHTML='<icon-wc name="bell" size="sm"></icon-wc><span class="notification-badge" hidden>0</span>',this.#i=t,this.prepend(t)}this.#r=this.#i.querySelector(".notification-badge"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.listen(this.#i,"click",this.#I)}#v(){this.#s=document.createElement("div"),this.#s.className="notification-panel",this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-label","Notifications"),this.#s.hidden=!0;let t=`notification-panel-${crypto.randomUUID().slice(0,8)}`;this.#s.id=t,this.#i?.setAttribute("aria-controls",t),this.#s.innerHTML=`
520
+ `}#w(){this.#e.addEventListener("click",this.#v),this.listen(document,"click",this.#E),this.listen(document,"keydown",this.#y),this.#t.querySelector(".settings-close")?.addEventListener("click",()=>this.close()),this.#t.querySelectorAll('input[name="settings-mode"]').forEach(t=>{t.addEventListener("change",this.#k)}),this.#t.querySelector("#settings-theme")?.addEventListener("change",this.#O),this.#t.querySelector("input[data-fluid-toggle]")?.addEventListener("change",this.#N),this.#t.querySelectorAll('input[name="settings-density"]').forEach(t=>{t.addEventListener("change",this.#_)}),this.#t.querySelector("input[data-backdrop-toggle]")?.addEventListener("change",this.#B),this.#t.querySelectorAll('input[name="settings-backdrop"]').forEach(t=>{t.addEventListener("change",this.#P)}),this.#t.querySelectorAll('input[name="settings-backdrop-chrome"]').forEach(t=>{t.addEventListener("change",this.#D)}),this.#t.querySelector("input[data-backdrop-fixed]")?.addEventListener("change",this.#L),this.#t.querySelector("input[data-sticky-toggle]")?.addEventListener("change",this.#$),this.#t.querySelector('[name="settings-page-bg"]')?.addEventListener("change",this.#I),this.#t.querySelector('[name="settings-page-bg-color"]')?.addEventListener("input",this.#C),this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.addEventListener("input",this.#C),this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.addEventListener("input",this.#C),this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.addEventListener("change",this.#C),this.#t.querySelectorAll("input[data-a11y]").forEach(t=>{t.addEventListener("change",this.#T)}),this.#t.querySelectorAll("input[data-ext]").forEach(t=>{t.addEventListener("change",this.#q)}),this.#t.querySelectorAll("input[data-env]").forEach(t=>{t.addEventListener("change",this.#H)}),this.#t.querySelector(".settings-reset")?.addEventListener("click",this.#M),this.#t.querySelector('[data-action="clear-cache"]')?.addEventListener("click",this.#tt),this.#t.querySelector('[data-action="check-update"]')?.addEventListener("click",this.#Q),this.#Z()}#v=t=>{t.stopPropagation(),this.toggle()};#E=t=>{this.#i&&!this.contains(t.target)&&this.close()};#y=t=>{t.key==="Escape"&&this.#i&&(t.preventDefault(),this.close(),this.#e?.focus())};#k=t=>{x.setMode(t.target.value)};#O=async t=>{let i=t.target;i.disabled=!0;try{await x.setBrand(i.value),this.#U()}catch{console.warn("[VB] Theme load failed, using default")}finally{i.disabled=!1}};#N=t=>{let i=t.target.checked,s=this.#c(x.getState().fluid)||"default";x.setFluid(this.#f(i,s)),this.#V(i)};#_=t=>{x.setFluid(this.#f(!0,t.target.value))};#B=t=>{let i=t.target.checked,s=this.#u(x.getState().backdrop)||"default";x.setBackdrop(this.#p(i,s)),this.#F(i)};#P=t=>{x.setBackdrop(this.#p(!0,t.target.value))};#D=t=>{let i=this.#b(x.getState().backdropChrome);x.setBackdropChrome(this.#g(t.target.value,i))};#L=t=>{let i=this.#d(x.getState().backdropChrome);x.setBackdropChrome(this.#g(i,t.target.checked))};#$=async t=>{let i=t.target.checked;this.#n=i,await E.set(z,"sticky",i?"on":"off");let s=document.querySelector("header");if(i){document.documentElement.dataset.sticky="",s&&(s.dataset.sticky="");let{initStickyManager:n}=await Promise.resolve().then(()=>(Bt(),Se));n()}else{delete document.documentElement.dataset.sticky,s&&delete s.dataset.sticky;let{destroyStickyManager:n}=await Promise.resolve().then(()=>(Bt(),Se));n()}};#I=t=>{let i=t.target.value;if(this.#z(i),i==="color"){let s=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"#1a1a2e";x.setPageBg({type:i,color:s})}else if(i==="gradient"){let s=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"#1a1a2e",n=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"#16213e",r=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";x.setPageBg({type:i,gradStart:s,gradEnd:n,gradDir:r})}else x.setPageBg({})};#C=()=>{let t=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";if(t==="color"){let i=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"";x.setPageBg({type:t,color:i})}else if(t==="gradient"){let i=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"",s=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"",n=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";x.setPageBg({type:t,gradStart:i,gradEnd:s,gradDir:n})}};#T=t=>{let i=t.target.dataset.a11y,s=this.#Y();if(t.target.checked&&!s.includes(i))s.push(i);else if(!t.target.checked){let n=s.indexOf(i);n!==-1&&s.splice(n,1)}this.#K(s),this.#G(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:s}))};#q=t=>{let i=t.target.dataset.ext,s=t.target.checked;this.#j(i,s),this.#J()};#H=t=>{let i=t.target.dataset.env,s=t.target.checked;$t.setSource(i,s)};#M=()=>{confirm("Reset all settings to defaults?")&&(x.reset(),this.#K([]),this.#G(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[]})),this.#r={...Pt},E.remove(z,"extensions").catch(()=>{}),this.#J(),this.#n=!1,E.remove(z,"sticky").catch(()=>{}),delete document.documentElement.dataset.sticky,Promise.resolve().then(()=>(Bt(),Se)).then(t=>t.destroyStickyManager()).catch(()=>{}),$t.setSource("timeOfDay",!1),$t.setSource("seasonal",!1),this.#R())};#x=()=>{this.#R()};#R(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:d}=x.getState(),u=this.#Y(),h=this.#X(),f=this.#l(s),g=this.#c(s),p=this.#h(n),v=this.#u(n),w=this.#t.querySelector(`input[name="settings-mode"][value="${t}"]`);w&&(w.checked=!0);let T=this.#t.querySelector("#settings-theme");T&&(T.value=i||"default");let M=this.#t.querySelector("input[data-fluid-toggle]");M&&(M.checked=f);let G=this.#t.querySelector(`input[name="settings-density"][value="${g}"]`);G&&(G.checked=!0),this.#V(f);let W=this.#t.querySelector("input[data-backdrop-toggle]");W&&(W.checked=p);let ie=this.#t.querySelector(`input[name="settings-backdrop"][value="${v}"]`);ie&&(ie.checked=!0);let ld=this.#d(r),Lr=this.#t.querySelector(`input[name="settings-backdrop-chrome"][value="${ld}"]`);Lr&&(Lr.checked=!0);let Mr=this.#t.querySelector("input[data-backdrop-fixed]");Mr&&(Mr.checked=this.#b(r)),this.#F(p);let Nr=this.#t.querySelector('[name="settings-page-bg"]');Nr&&(Nr.value=a||"");let _r=this.#t.querySelector('[name="settings-page-bg-color"]');_r&&o&&(_r.value=o);let Dr=this.#t.querySelector('[name="settings-page-bg-grad-start"]');Dr&&c&&(Dr.value=c);let Ir=this.#t.querySelector('[name="settings-page-bg-grad-end"]');Ir&&l&&(Ir.value=l);let Or=this.#t.querySelector('[name="settings-page-bg-grad-dir"]');Or&&d&&(Or.value=d),p&&this.#z(a||""),this.#t.querySelectorAll("input[data-a11y]").forEach(Tt=>{let K=Tt;K.checked=u.includes(K.dataset.a11y||"")}),this.#t.querySelectorAll("input[data-ext]").forEach(Tt=>{let K=Tt,se=K.dataset.ext,ud=h[se];K.checked=ud??Pt[se]});let qr=this.#t.querySelector("input[data-sticky-toggle]");qr&&(qr.checked=this.#m());let dd=this.#W();this.#t.querySelectorAll("input[data-env]").forEach(Tt=>{let K=Tt,se=K.dataset.env;K.checked=dd[se]??!1})}#V(t){let i=this.#t.querySelector(".density-row");i&&(i.hidden=!t)}#F(t){if(this.#t.querySelectorAll(".backdrop-row").forEach(i=>{i.hidden=!t}),t){let i=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";this.#z(i)}}#z(t){let i=this.#t.querySelector(".page-bg-color-row"),s=this.#t.querySelector(".page-bg-grad-row"),n=this.#t.querySelector(".page-bg-grad-dir-row");i&&(i.hidden=t!=="color"),s&&(s.hidden=t!=="gradient"),n&&(n.hidden=t!=="gradient")}#Y(){return[...this.#s]}#K(t){this.#s=[...t],E.set(z,"a11y",this.#s).catch(()=>{})}#G(){let t=this.#Y(),{brand:i}=x.getState(),s=document.documentElement,n=i!=="default"?[i,...t]:[...t];n.length?s.dataset.theme=n.join(" "):delete s.dataset.theme}#U(){this.#G()}#W(){return $t.load()}#X(){return{...this.#r}}#j(t,i){this.#r={...this.#r,[t]:i},E.set(z,"extensions",this.#r).catch(()=>{})}async#J(){let t=this.#X(),i=document.documentElement;t.motionFx?delete i.dataset.motionReduced:i.dataset.motionReduced="",t.sounds?(yt||(yt=(await Promise.resolve().then(()=>(Ra(),Fa))).SoundManager),yt.init(),yt.enable()):yt&&yt.disable(),window.dispatchEvent(new CustomEvent("vb:extensions-change",{detail:t}))}async#Z(){let t=this.#t.querySelector("[data-sw-status] span");if(t){if(!("serviceWorker"in navigator)){t.textContent="Not supported";return}try{let s=(await Oa()).cachedURLs?.length??0;t.textContent=`Active (${s} cached files)`}catch{t.textContent="Not registered"}}}#tt=async t=>{let i=t.target;i.disabled=!0,i.textContent="Clearing\u2026";try{await qa(),i.textContent="Cleared!",this.#Z(),setTimeout(()=>{i.textContent="Clear Cache",i.disabled=!1},2e3)}catch{i.textContent="Failed",setTimeout(()=>{i.textContent="Clear Cache",i.disabled=!1},2e3)}};#Q=async t=>{let i=t.target;i.disabled=!0,i.textContent="Checking\u2026";try{let{updated:s}=await $a();i.textContent=s?"Update available!":"Up to date",setTimeout(()=>{i.textContent="Check for Updates",i.disabled=!1},2e3)}catch{i.textContent="Failed",setTimeout(()=>{i.textContent="Check for Updates",i.disabled=!1},2e3)}};open(){this.#i||(this.#i=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#R(),this.#et())}#et(){let t=this.getBoundingClientRect(),i=this.#t;i.style.removeProperty("top"),i.style.removeProperty("bottom"),i.style.removeProperty("left"),i.style.removeProperty("right");let s=i.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,a=t.top,o=r-t.bottom;a<s.height&&o>a?(i.style.top="calc(100% + 8px)",i.style.bottom="auto"):(i.style.bottom="calc(100% + 8px)",i.style.top="auto");let c=n-t.right,l=t.left,d=s.width;t.right<d&&l<c?(i.style.left="0",i.style.right="auto"):(i.style.right="0",i.style.left="auto")}close(){this.#i&&(this.#i=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"))}toggle(){this.#i?this.close():this.open()}};m("settings-panel",ss);Y();wt();var qu={update:"package",alert:"alert-triangle",watch:"eye",system:"settings",message:"mail",stewardship:"shield"};function q(e){return String(e??"").replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}var rs=class extends b{#e="panel";#t=null;#i=null;#s=null;#r=null;#n=new Set;#a=[];#o=!1;#l=null;#c=new Set;#f="all";#m=[];setup(){return this.#e=this.getAttribute("mode")==="banner"?"banner":"panel",this.#e==="banner"?this.#h():this.#p(),!0}teardown(){this.#l!=null&&(clearInterval(this.#l),this.#l=null)}get notifications(){return[...this.#a]}set notifications(t){this.#e==="panel"&&(this.#a=Array.isArray(t)?t:[],typeof this.#w=="function"&&this.#w(),typeof this.#E=="function"&&this.#E(),this.dispatchEvent(new CustomEvent("notification-wc:notifications-changed",{detail:{notifications:this.#a,source:"property"},bubbles:!0})))}async#h(){let t=this.getAttribute("persist");if(t||console.warn("[notification-wc] banner mode requires a persist attribute"),this.dataset.mode="banner",this.dataset.variant=this.getAttribute("variant")||"info",this.dataset.position=this.getAttribute("position")||"top",t){let s=Number(this.getAttribute("expires")??""),n=Number.isFinite(s)&&s>0?s*864e5:void 0,r=await E.get("notifications",t,n?{maxAge:n}:void 0);if(r&&r.dismissed){this.hidden=!0;return}}let i=this.querySelector('[value="dismiss"], [data-dismiss]');i&&(this.#t=i,this.listen(i,"click",this.#u))}#u=async t=>{t.preventDefault();let i=this.getAttribute("persist");i&&await E.set("notifications",i,{dismissed:!0}),this.dispatchEvent(new CustomEvent("notification-wc:dismiss",{bubbles:!0,composed:!0,detail:{id:i}})),this.hidden=!0};async#p(){if(this.dataset.mode="panel",await this.#d(),this.#g(),this.#S(),await this.#y(),this.#E(),this.listen(document,"click",this.#P),this.listen(document,"keydown",this.#D),this.listen(document,"page-watch:add",()=>this.#y()),this.listen(document,"page-watch:remove",()=>this.#y()),this.getAttribute("src")){await this.#T();let t=Number(this.getAttribute("poll"));Number.isFinite(t)&&t>0&&(this.#l=setInterval(()=>this.#T(),t))}}async#d(){let t=this.getAttribute("storage-key")||"notifications",i=await E.get(t,"read-ids");Array.isArray(i)&&(this.#n=new Set(i.filter(s=>typeof s=="string")))}async#b(){let t=this.getAttribute("storage-key")||"notifications";await E.set(t,"read-ids",Array.from(this.#n))}#g(){if(this.#i=this.querySelector(":scope > [data-trigger]"),this.#i){let t=this.#i.querySelector(".notification-badge");t||(t=document.createElement("span"),t.className="notification-badge",t.hidden=!0,this.#i.appendChild(t))}else{let t=document.createElement("button");t.type="button",t.setAttribute("data-trigger",""),t.className="notification-trigger",t.setAttribute("aria-label","Notifications"),t.innerHTML='<icon-wc name="bell" size="sm"></icon-wc><span class="notification-badge" hidden>0</span>',this.#i=t,this.prepend(t)}this.#r=this.#i.querySelector(".notification-badge"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.listen(this.#i,"click",this.#B)}#S(){this.#s=document.createElement("div"),this.#s.className="notification-panel",this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-label","Notifications"),this.#s.hidden=!0;let t=`notification-panel-${crypto.randomUUID().slice(0,8)}`;this.#s.id=t,this.#i?.setAttribute("aria-controls",t),this.#s.innerHTML=`
521
521
  <header class="notification-header">
522
522
  <strong>Notifications</strong>
523
523
  <button type="button" class="notification-mark-all">Mark all read</button>
@@ -531,63 +531,61 @@ svg {
531
531
  <footer class="notification-footer" hidden>
532
532
  <em>No notifications</em>
533
533
  </footer>
534
- `,this.appendChild(this.#s);let i=this.#s.querySelector(".notification-mark-all");i&&this.listen(i,"click",this.#_);for(let s of this.#s.querySelectorAll('[role="tab"]'))this.listen(s,"click",this.#q);this.#g()}#b(){let t=Array.from(this.querySelectorAll(":scope > article")),i=new Map;for(let s of t){let n=s.getAttribute("data-id")||s.id||`static-${i.size}`,r=s.getAttribute("data-type")||"update",a=s.getAttribute("data-date")||"",o=s.querySelector("h1, h2, h3, h4, h5, h6")?.textContent?.trim()||n,d=s.querySelector("p")?.textContent?.trim()||"",l=s.querySelector("a");i.set(n,{id:n,type:r,date:a,title:o,body:d,url:l?.getAttribute("href")||null,source:"static"})}for(let s of this.#a)if(!(!s||typeof s.id!="string")){if(s.dismissed){i.delete(s.id);continue}i.set(s.id,{...i.get(s.id),...s,source:"dynamic"})}return Array.from(i.values()).sort((s,n)=>{let r=s.date?Date.parse(s.date):0;return(n.date?Date.parse(n.date):0)-r})}#g(){if(!this.#s)return;let t=this.#s.querySelector(".notification-list"),i=this.#s.querySelector(".notification-footer");if(!t)return;let s=this.#b();t.innerHTML=s.map(n=>this.#C(n)).join(""),i&&(i.hidden=s.length>0);for(let n of t.querySelectorAll("[data-notification-id]"))this.listen(n,"click",this.#T);this.#N()}#C(t){let i=su[t.type]||"bell",s=this.#n.has(t.id),n=t.date?new Date(t.date).toLocaleString():"",r=`
535
- <icon-wc class="notification-type-icon" name="${O(i)}" size="sm"></icon-wc>
534
+ `,this.appendChild(this.#s);let i=this.#s.querySelector(".notification-mark-all");i&&this.listen(i,"click",this.#$);for(let s of this.#s.querySelectorAll('[role="tab"]'))this.listen(s,"click",this.#N);this.#w()}#A(){let t=Array.from(this.querySelectorAll(":scope > article")),i=new Map;for(let s of t){let n=s.getAttribute("data-id")||s.id||`static-${i.size}`,r=s.getAttribute("data-type")||"update",a=s.getAttribute("data-date")||"",o=s.querySelector("h1, h2, h3, h4, h5, h6")?.textContent?.trim()||n,l=s.querySelector("p")?.textContent?.trim()||"",d=s.querySelector("a");i.set(n,{id:n,type:r,date:a,title:o,body:l,url:d?.getAttribute("href")||null,source:"static"})}for(let s of this.#a)if(!(!s||typeof s.id!="string")){if(s.dismissed){i.delete(s.id);continue}i.set(s.id,{...i.get(s.id),...s,source:"dynamic"})}return Array.from(i.values()).sort((s,n)=>{let r=s.date?Date.parse(s.date):0;return(n.date?Date.parse(n.date):0)-r})}#w(){if(!this.#s)return;let t=this.#s.querySelector(".notification-list"),i=this.#s.querySelector(".notification-footer");if(!t)return;let s=this.#A();t.innerHTML=s.map(n=>this.#v(n)).join(""),i&&(i.hidden=s.length>0);for(let n of t.querySelectorAll("[data-notification-id]"))this.listen(n,"click",this.#L);this.#E()}#v(t){let i=qu[t.type]||"bell",s=this.#n.has(t.id),n=t.date?new Date(t.date).toLocaleString():"",r=`
535
+ <icon-wc class="notification-type-icon" name="${q(i)}" size="sm"></icon-wc>
536
536
  <div class="notification-body">
537
- <h4>${O(t.title)}</h4>
538
- ${t.body?`<p>${O(t.body)}</p>`:""}
539
- ${n?`<time datetime="${O(t.date)}">${O(n)}</time>`:""}
537
+ <h4>${q(t.title)}</h4>
538
+ ${t.body?`<p>${q(t.body)}</p>`:""}
539
+ ${n?`<time datetime="${q(t.date)}">${q(n)}</time>`:""}
540
540
  </div>
541
- `,a=t.url?"a":"button",o=t.url?`href="${O(t.url)}"`:'type="button"';return`<li role="listitem" data-notification-id="${O(t.id)}" data-type="${O(t.type||"update")}"${s?" data-read":""}>
541
+ `,a=t.url?"a":"button",o=t.url?`href="${q(t.url)}"`:'type="button"';return`<li role="listitem" data-notification-id="${q(t.id)}" data-type="${q(t.type||"update")}"${s?" data-read":""}>
542
542
  <${a} class="notification-row" ${o}>${r}</${a}>
543
- </li>`}#N(){if(!this.#r)return;let i=this.#b().filter(s=>!this.#n.has(s.id)).length;i>0?(this.#r.textContent=String(i),this.#r.hidden=!1,this.#i?.querySelector("icon-wc")?.setAttribute("name","bell-dot")):(this.#r.hidden=!0,this.#i?.querySelector("icon-wc")?.setAttribute("name","bell"))}async#L(){try{this.#p=await S.list("watches")}catch{this.#p=[]}this.#S()}#S(){if(!this.#s)return;let t=this.#s.querySelector(".notification-watch-list"),i=this.#s.querySelector(".notification-tab-count");if(t){if(t.innerHTML=this.#p.map(s=>this.#B(s)).join("")||`<li class="notification-empty"><em>You aren't watching any pages yet. Use the &ldquo;Watch&rdquo; button on a page to start.</em></li>`,i){let s=this.#p.length;s>0?(i.textContent=String(s),i.hidden=!1):i.hidden=!0}for(let s of t.querySelectorAll("[data-watch-unwatch]"))this.listen(s,"click",this.#k)}}#B(t){let i=t.data||{},s=i.url||t.key,n=i.title||s,r=i.lastChecked?new Date(i.lastChecked).toLocaleString():"\u2014",a=!!i.lastChanged;return`<li class="notification-watch-item"${a?" data-changed":""}>
544
- <a class="notification-watch-row" href="${O(s)}">
543
+ </li>`}#E(){if(!this.#r)return;let i=this.#A().filter(s=>!this.#n.has(s.id)).length;i>0?(this.#r.textContent=String(i),this.#r.hidden=!1,this.#i?.querySelector("icon-wc")?.setAttribute("name","bell-dot")):(this.#r.hidden=!0,this.#i?.querySelector("icon-wc")?.setAttribute("name","bell"))}async#y(){try{this.#m=await E.list("watches")}catch{this.#m=[]}this.#k()}#k(){if(!this.#s)return;let t=this.#s.querySelector(".notification-watch-list"),i=this.#s.querySelector(".notification-tab-count");if(t){if(t.innerHTML=this.#m.map(s=>this.#O(s)).join("")||`<li class="notification-empty"><em>You aren't watching any pages yet. Use the &ldquo;Watch&rdquo; button on a page to start.</em></li>`,i){let s=this.#m.length;s>0?(i.textContent=String(s),i.hidden=!1):i.hidden=!0}for(let s of t.querySelectorAll("[data-watch-unwatch]"))this.listen(s,"click",this.#_)}}#O(t){let i=t.data||{},s=i.url||t.key,n=i.title||s,r=i.lastChecked?new Date(i.lastChecked).toLocaleString():"\u2014",a=!!i.lastChanged;return`<li class="notification-watch-item"${a?" data-changed":""}>
544
+ <a class="notification-watch-row" href="${q(s)}">
545
545
  <icon-wc class="notification-type-icon" name="eye" size="sm"></icon-wc>
546
546
  <div class="notification-body">
547
- <h4>${O(n)}${a?' <span class="notification-changed-badge">Changed</span>':""}</h4>
548
- <p>${O(s)}</p>
549
- <time>Last checked: ${O(r)}</time>
547
+ <h4>${q(n)}${a?' <span class="notification-changed-badge">Changed</span>':""}</h4>
548
+ <p>${q(s)}</p>
549
+ <time>Last checked: ${q(r)}</time>
550
550
  </div>
551
551
  </a>
552
- <button type="button" class="notification-unwatch" data-watch-unwatch data-watch-key="${O(t.key)}" aria-label="Unwatch ${O(n)}">
552
+ <button type="button" class="notification-unwatch" data-watch-unwatch data-watch-key="${q(t.key)}" aria-label="Unwatch ${q(n)}">
553
553
  <icon-wc name="x" size="xs"></icon-wc>
554
554
  </button>
555
- </li>`}#q=t=>{let i=t.currentTarget.dataset.tab;if(!i||i===this.#h||(this.#h=i,!this.#s))return;for(let n of this.#s.querySelectorAll('[role="tab"]')){let r=n.dataset.tab===i;n.setAttribute("aria-selected",r?"true":"false")}for(let n of this.#s.querySelectorAll("[data-tab-panel]"))n.hidden=n.dataset.tabPanel!==i;let s=this.#s.querySelector(".notification-footer");s&&(s.hidden=!0)};#k=async t=>{t.preventDefault(),t.stopPropagation();let s=t.currentTarget.getAttribute("data-watch-key");if(!s)return;let n=this.#p.find(r=>r.key===s);await S.remove("watches",s),this.#p=this.#p.filter(r=>r.key!==s),this.#S(),this.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:n?.data?.url||s,subscriptionId:n?.data?.subscriptionId||null}}))};#I=t=>{t.stopPropagation(),this.#c?this.#x():this.#E()};#$=t=>{this.#c&&!this.contains(t.target)&&this.#x()};#R=t=>{t.key==="Escape"&&this.#c&&(t.preventDefault(),this.#x(),this.#i?.focus())};#T=async t=>{let i=t.currentTarget.closest("[data-notification-id]");if(!i)return;let s=i.getAttribute("data-notification-id");s&&(this.#n.has(s)||(this.#n.add(s),i.setAttribute("data-read",""),await this.#y(),this.#N(),this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:s}}))))};#_=async()=>{let t=this.#b();for(let i of t)this.#n.add(i.id);await this.#y(),this.#g();for(let i of t)this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:i.id}}))};#E(){this.#s&&(this.#c=!0,this.#s.hidden=!1,this.#i?.setAttribute("aria-expanded","true"),this.#L(),this.dispatchEvent(new CustomEvent("notification-wc:open",{bubbles:!0,composed:!0})))}#x(){this.#s&&(this.#c=!1,this.#s.hidden=!0,this.#i?.setAttribute("aria-expanded","false"),this.dispatchEvent(new CustomEvent("notification-wc:close",{bubbles:!0,composed:!0})))}async#A(){let t=this.getAttribute("src");if(!t)return;let i,s=0;try{if(t.startsWith("http")||t.startsWith("/")){let c=await fetch(t,{headers:{accept:"application/json"}});if(s=c.status,!c.ok)throw new Error(`${c.status}`);i=await c.json()}else i=await new z(t).get("/")}catch(c){let d=c instanceof I?c.status:s;if(d===404||d===503)return;let l=c instanceof I?`${c.status}`:String(c);console.warn("[notification-wc] failed to fetch",t,l);return}let n=Array.isArray(i)?i:Array.isArray(i?.notifications)?i.notifications:[],r=this.#f,a=r.size===0,o=this.hasAttribute("toast-new")?document.querySelector("toast-msg"):null;for(let c of n)c?.id&&(r.has(c.id)||(this.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:c}})),!a&&o&&typeof o.show=="function"&&o.show({message:c.title||c.body||"New notification",variant:c.type==="alert"||c.type==="stewardship"?"warning":"info",duration:5e3})),r.add(c.id));this.#a=n,this.#g()}};b("notification-wc",Ki);var Ia="Watch for updates",gu="Watching",ls=class extends g{#e=null;setup(){if(this.hasAttribute("server-sync")){let i=window;i.vbPageWatch={...i.vbPageWatch??{},serverSync:!0}}let t=this.#t();this.dataset.variant=t;for(let i of Array.from(this.children))i.hasAttribute?.("data-watch-page")&&i.remove();this.#e=this.#i(t),this.appendChild(this.#e),this.listen(document,"page-watch:add",this.#s),this.listen(document,"page-watch:remove",this.#s)}teardown(){this.#e&&(this.#e.remove(),this.#e=null)}#t(){let t=this.getAttribute("variant");return t==="compact"||t==="button"?t:"icon"}#i(t){let i=document.createElement("button");i.type="button",i.setAttribute("data-watch-page",""),i.className="ghost",i.setAttribute("aria-label","Watch this page for updates");let s=t==="icon"?"sm":"xs",n=this.getAttribute("label")??Ia;return t==="icon"?i.innerHTML=`<icon-wc name="bookmark" size="${s}"></icon-wc>`:(i.innerHTML=`<icon-wc name="bookmark" size="${s}"></icon-wc><span>${this.#r(n)}</span>`,i.setAttribute("data-watch-label-locked","")),i}#s=async()=>{if(this.#e)try{let{readWatch:t}=await Promise.resolve().then(()=>(cs(),os)),s=!!await t();this.#e.setAttribute("aria-pressed",s?"true":"false");let n=this.#e.querySelector("icon-wc");n&&n.setAttribute("name",s?"bookmark-check":"bookmark");let r=this.#e.querySelector("span");if(r&&this.#t()!=="icon"){let a=this.getAttribute("label");r.textContent=a||(s?gu:Ia)}this.#e.setAttribute("title",s?"Stop watching this page":"Watch this page for content updates")}catch{}};#r(t){let i=document.createElement("div");return i.textContent=t,i.innerHTML}};b("watch-wc",ls);var lt={optout:"vb_optout",sessionCount:"vb_sc",eventQueue:"vb_q"};function vu(e){return String(e).replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}function yu(e){return typeof e!="number"||e<=0?"\u2014":e<6e4?`${Math.round(e/1e3)}s`:`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}var ds=class extends g{setup(){this.#s(),this.listen(this,"click",this.#e)}get isOptedOut(){try{return sessionStorage.getItem(lt.optout)==="1"}catch{return!1}}get sessionCounter(){try{let t=sessionStorage.getItem(lt.sessionCount);return t?JSON.parse(t):null}catch{return null}}get queuedEvents(){try{let t=sessionStorage.getItem(lt.eventQueue);return t?JSON.parse(t):[]}catch{return[]}}get hasSessionData(){return this.sessionCounter!=null||this.queuedEvents.length>0}#e=t=>{let i=t.target?.closest?.("[data-analytics-action]");if(!i||!this.contains(i))return;let s=i.dataset.analyticsAction;s==="clear"&&this.#t(),s==="optout"&&this.#i(),s==="refresh"&&this.#s()};#t(){try{sessionStorage.removeItem(lt.sessionCount),sessionStorage.removeItem(lt.eventQueue)}catch{}this.dispatchEvent(new CustomEvent("analytics-panel:cleared",{bubbles:!0,composed:!0})),this.#s()}#i(){let t=!this.isOptedOut;try{t?sessionStorage.setItem(lt.optout,"1"):sessionStorage.removeItem(lt.optout)}catch{}this.dispatchEvent(new CustomEvent(t?"analytics-panel:optout":"analytics-panel:optin",{bubbles:!0,composed:!0})),t?this.#t():this.#s()}#s(){let t=this.getAttribute("title")||"Analytics data",i=this.isOptedOut,s=this.hasSessionData;this.innerHTML=`
555
+ </li>`}#N=t=>{let i=t.currentTarget.dataset.tab;if(!i||i===this.#f||(this.#f=i,!this.#s))return;for(let n of this.#s.querySelectorAll('[role="tab"]')){let r=n.dataset.tab===i;n.setAttribute("aria-selected",r?"true":"false")}for(let n of this.#s.querySelectorAll("[data-tab-panel]"))n.hidden=n.dataset.tabPanel!==i;let s=this.#s.querySelector(".notification-footer");s&&(s.hidden=!0)};#_=async t=>{t.preventDefault(),t.stopPropagation();let s=t.currentTarget.getAttribute("data-watch-key");if(!s)return;let n=this.#m.find(r=>r.key===s);await E.remove("watches",s),this.#m=this.#m.filter(r=>r.key!==s),this.#k(),this.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:n?.data?.url||s,subscriptionId:n?.data?.subscriptionId||null}}))};#B=t=>{t.stopPropagation(),this.#o?this.#C():this.#I()};#P=t=>{this.#o&&!this.contains(t.target)&&this.#C()};#D=t=>{t.key==="Escape"&&this.#o&&(t.preventDefault(),this.#C(),this.#i?.focus())};#L=async t=>{let i=t.currentTarget.closest("[data-notification-id]");if(!i)return;let s=i.getAttribute("data-notification-id");s&&(this.#n.has(s)||(this.#n.add(s),i.setAttribute("data-read",""),await this.#b(),this.#E(),this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:s}}))))};#$=async()=>{let t=this.#A();for(let i of t)this.#n.add(i.id);await this.#b(),this.#w();for(let i of t)this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:i.id}}))};#I(){this.#s&&(this.#o=!0,this.#s.hidden=!1,this.#i?.setAttribute("aria-expanded","true"),this.#y(),this.dispatchEvent(new CustomEvent("notification-wc:open",{bubbles:!0,composed:!0})))}#C(){this.#s&&(this.#o=!1,this.#s.hidden=!0,this.#i?.setAttribute("aria-expanded","false"),this.dispatchEvent(new CustomEvent("notification-wc:close",{bubbles:!0,composed:!0})))}async#T(){let t=this.getAttribute("src");if(!t)return;let i,s=0;try{if(t.startsWith("http")||t.startsWith("/")){let c=await fetch(t,{headers:{accept:"application/json"}});if(s=c.status,!c.ok)throw new Error(`${c.status}`);i=await c.json()}else i=await new B(t).get("/")}catch(c){let l=c instanceof D?c.status:s;if(l===404||l===503)return;let d=c instanceof D?`${c.status}`:String(c);console.warn("[notification-wc] failed to fetch",t,d);return}let n=Array.isArray(i)?i:Array.isArray(i?.notifications)?i.notifications:[],r=this.#c,a=r.size===0,o=this.hasAttribute("toast-new")?document.querySelector("toast-msg"):null;for(let c of n)c?.id&&(r.has(c.id)||(this.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:c}})),!a&&o&&typeof o.show=="function"&&o.show({message:c.title||c.body||"New notification",variant:c.type==="alert"||c.type==="stewardship"?"warning":"info",duration:5e3})),r.add(c.id));this.#a=n,this.#w()}};m("notification-wc",rs);var Za="Watch for updates",Xu="Watching",ys=class extends b{#e=null;setup(){if(this.hasAttribute("server-sync")){let i=window;i.vbPageWatch={...i.vbPageWatch??{},serverSync:!0}}let t=this.#t();this.dataset.variant=t;for(let i of Array.from(this.children))i.hasAttribute?.("data-watch-page")&&i.remove();this.#e=this.#i(t),this.appendChild(this.#e),this.listen(document,"page-watch:add",this.#s),this.listen(document,"page-watch:remove",this.#s)}teardown(){this.#e&&(this.#e.remove(),this.#e=null)}#t(){let t=this.getAttribute("variant");return t==="compact"||t==="button"?t:"icon"}#i(t){let i=document.createElement("button");i.type="button",i.setAttribute("data-watch-page",""),i.className="ghost",i.setAttribute("aria-label","Watch this page for updates");let s=t==="icon"?"sm":"xs",n=this.getAttribute("label")??Za;return t==="icon"?i.innerHTML=`<icon-wc name="bookmark" size="${s}"></icon-wc>`:(i.innerHTML=`<icon-wc name="bookmark" size="${s}"></icon-wc><span>${this.#r(n)}</span>`,i.setAttribute("data-watch-label-locked","")),i}#s=async()=>{if(this.#e)try{let{readWatch:t}=await Promise.resolve().then(()=>(vs(),gs)),s=!!await t();this.#e.setAttribute("aria-pressed",s?"true":"false");let n=this.#e.querySelector("icon-wc");n&&n.setAttribute("name",s?"bookmark-check":"bookmark");let r=this.#e.querySelector("span");if(r&&this.#t()!=="icon"){let a=this.getAttribute("label");r.textContent=a||(s?Xu:Za)}this.#e.setAttribute("title",s?"Stop watching this page":"Watch this page for content updates")}catch{}};#r(t){let i=document.createElement("div");return i.textContent=t,i.innerHTML}};m("watch-wc",ys);et();var oh="Analytics on this page",ch=2;function lh(e){let t=Number.parseInt(e??"",10);return Number.isInteger(t)&&t>=1&&t<=6?t:ch}var ao={gpc:"your browser sends a Global Privacy Control signal",dnt:"your browser sends Do Not Track",consent:"this site has not been given consent to collect analytics"};function dh(e){if(!e||!e.initialized)return{state:"off",reason:"uninitialized",text:"Off. The analytics runtime is not running on this page, so nothing is sent."};if(e.inIframe)return{state:"off",reason:"iframe",text:"Off. Analytics does not run inside embedded frames, so nothing is sent."};if(e.reason==="user")return{state:"paused",reason:"user",text:"Paused for this tab. Nothing is being sent."};if(e.reason){let i=ao[e.reason];return{state:"off",reason:e.reason,text:`Off because ${i}. Nothing is sent.`}}if(e.transport==="disabled")return{state:"off",reason:"disabled",text:"Off. This site has analytics switched off, so nothing is sent."};if(e.transport==="console")return{state:"debug",reason:null,text:"Debug mode. Events are written to this browser\u2019s console, not sent anywhere."};let t=typeof e.sampleRate=="number"&&e.sampleRate<1?` (a ${Math.round(e.sampleRate*100)}% sample)`:"";return{state:"active",reason:null,text:`Active. Events from this page are sent to ${e.endpoint}${t}.`}}function uh(e){return e?.signals?["gpc","dnt","consent"].filter(t=>e.signals[t]):[]}var Cs=class extends b{static get observedAttributes(){return["heading","heading-level"]}#e={};setup(){(!this.#e.status||!this.contains(this.#e.status))&&this.#r(),this.listen(this,"click",this.#i),this.listen(document,Es,()=>this.refresh()),this.refresh()}attributeChangedCallback(t){this.#e.heading&&(t==="heading"&&(this.#e.heading.textContent=this.#t),t==="heading-level"&&this.#n())}get#t(){return this.getAttribute("heading")||oh}get status(){let t=xs();return typeof t?.getStatus=="function"?t.getStatus():null}#i=t=>{let i=t.target?.closest?.("[data-analytics-action]");if(!i||!this.contains(i)||i.getAttribute("aria-disabled")==="true")return;let s=i.dataset.analyticsAction;s==="toggle"&&this.#s(),s==="refresh"&&this.refresh()};#s(){let t=!this.status?.signals?.user;xs().setConsent(!t),this.dispatchEvent(new CustomEvent(t?"analytics-panel:optout":"analytics-panel:optin",{bubbles:!0,composed:!0})),this.refresh()}#r(){let t=`analytics-panel-${Math.random().toString(36).slice(2,8)}`;this.innerHTML=`
556
556
  <header class="analytics-panel__header">
557
- <h3>${vu(t)}</h3>
557
+ <h2 data-part="heading"></h2>
558
558
  <p class="analytics-panel__status" role="status">
559
- <span class="analytics-panel__dot analytics-panel__dot--${i?"paused":"active"}" aria-hidden="true"></span>
560
- ${i?"Analytics paused for this tab. No data is being collected.":"Analytics active. Only aggregate, device-scoped data is collected."}
559
+ <span class="analytics-panel__dot" aria-hidden="true"></span>
560
+ <span data-part="status"></span>
561
561
  </p>
562
562
  </header>
563
563
 
564
- <section class="analytics-panel__body">
565
- <h4>Stored on this device (this session only)</h4>
566
- ${this.#r()}
564
+ <section class="analytics-panel__body" aria-labelledby="${t}-fields">
565
+ <h3 id="${t}-fields" data-part="fields-heading">What an event from this page contains</h3>
566
+ <dl class="analytics-panel__data" data-part="data"></dl>
567
+ <p class="analytics-panel__empty" data-part="empty" hidden></p>
567
568
  </section>
568
569
 
569
570
  <footer class="analytics-panel__actions">
570
- ${s?`
571
- <button type="button" data-analytics-action="clear" class="analytics-panel__action analytics-panel__action--danger">
572
- Clear my data
573
- </button>
574
- `:""}
575
- <button type="button" data-analytics-action="optout" class="analytics-panel__action analytics-panel__action--toggle">
576
- ${i?"Resume analytics":"Pause analytics"}
577
- </button>
578
- <button type="button" data-analytics-action="refresh" class="analytics-panel__action">
579
- Refresh
580
- </button>
571
+ <button type="button" data-analytics-action="toggle" data-part="toggle"
572
+ class="analytics-panel__action analytics-panel__action--toggle"></button>
573
+ <button type="button" data-analytics-action="refresh" class="analytics-panel__action">Refresh</button>
574
+ <p class="analytics-panel__hint" id="${t}-hint" data-part="hint" hidden></p>
581
575
  </footer>
582
576
 
583
577
  <p class="analytics-panel__note">
584
- No cookies, no cross-site identifiers, no IP address stored.
585
- Data is cleared automatically when you close this tab.
578
+ No cookies and no visitor ID. The only thing stored on this device is
579
+ the pause setting, kept in this tab&rsquo;s session storage until you
580
+ close it. Events already sent are stored on the server without an
581
+ identifier, so they cannot be looked up or deleted from here. The
582
+ server records your country from the request; your IP address is not
583
+ stored.
586
584
  </p>
587
- `}#r(){if(!this.hasSessionData)return'<p class="analytics-panel__empty">No data stored on this device in this session.</p>';let t=this.sessionCounter,i=this.queuedEvents,s=i.find(o=>o?.id==="__scroll"),n=i.find(o=>o?.id==="__attention"),r=i.filter(o=>!o?.id?.startsWith?.("__")).length,a=[];return t?.v!=null&&a.push(`<dt>Pages this session</dt><dd>${t.v}</dd>`),s&&a.push(`<dt>Max scroll depth</dt><dd>${s.params?.depth??"?"}%</dd>`),n&&a.push(`<dt>Active reading time</dt><dd>${yu(n.params?.ms)}</dd>`),r>0&&a.push(`<dt>Queued events</dt><dd>${r}</dd>`),`<dl class="analytics-panel__data">${a.join("")}</dl>`}};b("analytics-panel",ds);var us=class extends g{static observedAttributes=["src","src-dark","src-compact","alt","wordmark","height"];#e="";#t=null;#i=null;#s=!1;setup(){this.#e=this.#o(),this.hasAttribute("src-dark")&&this.#n(),this.#c()}teardown(){this.#t?.removeEventListener("change",this.#a),this.#t=null,this.#i?.disconnect(),this.#i=null,this.#s&&(window.removeEventListener("vb:theme-change",this.#a),this.#s=!1)}attributeChangedCallback(t,i,s){i!==s&&(!this.isConnected||!this.hasAttribute("data-upgraded")||(t==="src-dark"&&(s?this.#n():(this.#t?.removeEventListener("change",this.#a),this.#i?.disconnect(),this.#s&&(window.removeEventListener("vb:theme-change",this.#a),this.#s=!1))),this.#c()))}#r(){let t=document.documentElement.getAttribute("data-mode");if(t==="dark")return!0;if(t==="light")return!1;let i=getComputedStyle(this).colorScheme||"";return/\bdark\b/.test(i)&&!/\blight\b/.test(i)?!0:/\blight\b/.test(i)&&!/\bdark\b/.test(i)?!1:this.#t?.matches??!1}#n(){this.#t||(this.#t=matchMedia("(prefers-color-scheme: dark)"),this.#t.addEventListener("change",this.#a)),this.#i||(this.#i=new MutationObserver(()=>this.#a(void 0)),this.#i.observe(document.documentElement,{attributes:!0,attributeFilter:["data-mode","data-theme"]})),this.#s||(window.addEventListener("vb:theme-change",this.#a),this.#s=!0)}#a=()=>{this.isConnected&&this.#c()};#c(){let t=this.getAttribute("src"),i=this.getAttribute("src-dark"),s=i&&this.#r()?i:t;if(!s){this.#e&&this.querySelector("img")&&(this.replaceChildren(document.createTextNode(this.#e)),this.removeAttribute("aria-label"));return}let n=this.#e||this.getAttribute("alt")||"",r=this.hasAttribute("wordmark"),a=this.getAttribute("height");if(this.querySelector("img")?.getAttribute("src")===s){let d=this.querySelector(".brand-mark-wordmark");if(r&&!d){let l=document.createElement("span");l.className="brand-mark-wordmark",l.textContent=n,this.appendChild(l)}else!r&&d&&d.remove();return}let c=document.createElement("img");if(c.src=s,c.alt=r?"":n,c.decoding="async",a&&(c.height=parseInt(a,10)),r){let d=document.createElement("span");d.className="brand-mark-wordmark",d.textContent=n,this.replaceChildren(c,d)}else this.replaceChildren(c),this.getAttribute("alt")||this.setAttribute("aria-label",n)}#o(){let t="";for(let i of this.childNodes)(i.nodeType===Node.TEXT_NODE||i.nodeType===Node.ELEMENT_NODE&&i.tagName!=="IMG")&&(t+=i.textContent);return t.trim()}};b("brand-mark",us);var wu="52rem",hs=class extends HTMLElement{#e=null;connectedCallback(){let t=this.getAttribute("breakpoint")||wu;this.#e=matchMedia(`(max-width: ${t})`),this.#e.addEventListener("change",this.#t),this.#t(void 0)}disconnectedCallback(){this.#e?.removeEventListener("change",this.#t),this.#e=null}#t=t=>{let i=this.#e?.matches??!1;if(i)this.setAttribute("data-mobile","");else{this.removeAttribute("data-mobile");let n=this.querySelector("[popover]");n?.matches(":popover-open")&&n.hidePopover?.()}let s=this.closest("header");if(s)for(let n of s.children)n!==this&&n.matches("nav, nav-bar, site-tools")&&(n.style.display=i?"none":"")}};customElements.get("mobile-menu")||customElements.define("mobile-menu",hs);var D="interestfor",Ba="interestForElement"in HTMLButtonElement.prototype,_=new WeakMap,Et=new WeakMap,Ae=new Set,ms=!1,bs=CSS.supports?.("anchor-name","--a")??!1;function Oa(e){let t=String(e).trim(),i=t.match(/^([\d.]+)s$/);if(i)return parseFloat(i[1])*1e3;let s=t.match(/^([\d.]+)ms$/);return s?parseFloat(s[1]):parseFloat(t)||0}function Pa(e,t){let i=getComputedStyle(e),s=i.getPropertyValue(t).trim();if(s.toLowerCase()!=="normal")return Oa(s);let n=i.getPropertyValue("--interest-delay").trim();if(n&&n.toLowerCase()!=="normal"){let r=n.split(/\s+/).filter(a=>a.length>0);if(r.length>0){let a=t==="--interest-delay-start"?r[0]:r[1]||r[0];if(a.toLowerCase()!=="normal")return Oa(a)}}return t==="--interest-delay-start"?500:250}var Eu=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(","),Au="h1,h2,h3,h4,h5,h6,ul,ol,li,table,nav,header,footer,main,aside,article,section,form,blockquote,details,summary,dialog";function gs(e){if(e.getAttribute("popover")?.toLowerCase()!=="hint"||e.querySelector(Eu)||e.querySelector(Au))return!1;for(let t of e.querySelectorAll("[role]")){let i=t.getAttribute("role").toLowerCase();if(!["presentation","none","generic","image"].includes(i))return!1}return!0}function Su(e,t){gs(t)?e.setAttribute("aria-describedby",t.id):(e.setAttribute("aria-details",t.id),e.setAttribute("aria-expanded","false"),t.hasAttribute("role")||t.setAttribute("role","tooltip"))}function j(e){let t=e.getAttribute(D);return t?document.getElementById(t):null}function Ee(e){let t=Et.get(e);return t?.invoker&&_.get(t.invoker)?.state==="full"?t.invoker:null}function Vt(e){if(_.has(e))return _.get(e);let t={state:"none",gainedTimer:null,lostTimer:null,longPressTimer:null};_.set(e,t);let i=j(e);return i&&Su(e,i),t}function Fa(e,t){if(!e||!t||!e.isConnected||j(e)!==t)return!1;let i=Ee(t);if(i){if(i===e)return clearTimeout(_.get(i).lostTimer),!1;if(!zt(i,t)||!e.isConnected||j(e)!==t)return!1}let s=Vt(e);if(s.state!=="none")return!1;let n=new CustomEvent("interest",{bubbles:!1,cancelable:!0,detail:{source:e}});if(t.dispatchEvent(n),t.hasAttribute("popover")){try{t.showPopover()}catch{}Cu(e,t)}s.state="full",Et.has(t)||Et.set(t,{});let r=Et.get(t);if(r.invoker=e,t.hasAttribute("popover")){let a=o=>{o.newState==="closed"&&zt(e,t)};r.toggleListener=a,t.addEventListener("toggle",a)}return Ae.add(e),e.classList.add("interest-source"),t.classList.add("interest-target"),gs(t)||e.setAttribute("aria-expanded","true"),!0}function zt(e,t){if(!e||!t||j(e)!==t||Ee(t)!==e)return!1;let i=_.get(e);if(!i||i.state==="none")return!1;if(clearTimeout(i.gainedTimer),clearTimeout(i.lostTimer),t.dispatchEvent(new CustomEvent("loseinterest",{bubbles:!1,detail:{source:e}})),t.hasAttribute("popover"))try{t.hidePopover()}catch{}let s=Et.get(t);return s?.toggleListener&&t.removeEventListener("toggle",s.toggleListener),Et.delete(t),Ae.delete(e),e.classList.remove("interest-source"),t.classList.remove("interest-target"),gs(t)||e.setAttribute("aria-expanded","false"),i.state="none",!0}function xu(e){let t=Vt(e);clearTimeout(t.gainedTimer);let i=Pa(e,"--interest-delay-start");t.gainedTimer=setTimeout(()=>{let s=j(e);s&&Fa(e,s)},i)}function fs(e){let t=_.get(e);if(!t)return;clearTimeout(t.lostTimer);let i=Pa(e,"--interest-delay-end");t.lostTimer=setTimeout(()=>{let s=j(e);s&&zt(e,s)},i)}function Ht(e){if(!bs)return;let t=e.getAttribute(D),i=t?document.getElementById(t):null;if(!i?.id)return;let s=`--interest-${i.id}`;e.style.anchorName=s,i.style.positionAnchor=s}function Cu(e,t){if(bs)return;let i=e.getBoundingClientRect(),s=t.getBoundingClientRect(),n=8,r=8,a=i.top-s.height-n,o=i.left+(i.width-s.width)/2;a<r&&(a=i.bottom+n),o=Math.max(r,Math.min(o,window.innerWidth-s.width-r)),a=Math.max(r,Math.min(a,window.innerHeight-s.height-r)),t.style.top=`${a}px`,t.style.left=`${o}px`,t.style.margin="0"}function ku(e,t){if(ms||!e.isConnected)return;if(!j(e)){let r=e.closest(".interest-target");if(r){let a=Ee(r);a&&(t?clearTimeout(_.get(a)?.lostTimer):fs(a))}return}let s=Vt(e),n=Ee(e);if(t)clearTimeout(s.lostTimer),n&&clearTimeout(_.get(n)?.lostTimer),xu(e);else if(clearTimeout(s.gainedTimer),s.state!=="none"&&fs(e),n){let r=_.get(n);r&&clearTimeout(r.gainedTimer),fs(n)}}function Tu(){let e=(s,n)=>{for(let r=s.target;r;r=r.parentElement)ku(r,n)};document.body.addEventListener("mouseover",s=>e(s,!0)),document.body.addEventListener("mouseout",s=>e(s,!1)),document.body.addEventListener("focusin",s=>e(s,!0)),document.body.addEventListener("focusout",s=>e(s,!1)),document.body.addEventListener("keydown",s=>{if(s.key==="Escape")for(let n of Ae){let r=j(n);r&&zt(n,r)}});let t=500;document.body.addEventListener("touchstart",s=>{ms=!0;let n=s.target.closest(`button[${D}]`);if(!n)return;let r=Vt(n);r.longPressTimer=setTimeout(()=>{let a=j(n);a&&Fa(n,a),r.longPressTimer=null},t)});let i=s=>{let n=s.target.closest(`button[${D}]`);if(!n)return;let r=_.get(n);r?.longPressTimer&&(clearTimeout(r.longPressTimer),r.longPressTimer=null)};document.body.addEventListener("touchend",s=>{i(s),ms=!1}),document.body.addEventListener("touchmove",i)}function Lu(){let e=document.createElement("style");e.textContent=['@property --interest-delay-start { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay-end { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay { syntax: "*"; inherits: false; initial-value: normal; }'].join(`
588
- `),document.head.appendChild(e)}function we(e){Vt(e),Ht(e)}function ps(e){let t=_.get(e);if(t){if(clearTimeout(t.gainedTimer),clearTimeout(t.lostTimer),clearTimeout(t.longPressTimer),t.state!=="none"){let i=j(e);i&&zt(e,i)}e.classList.remove("interest-source"),_.delete(e),Ae.delete(e)}}function qa(e=document){e.querySelectorAll(`[${D}]`).forEach(we)}var $a=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute(D)&&we(s),s.querySelectorAll(`[${D}]`).forEach(we)}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;_.has(s)&&ps(s),s.querySelectorAll(`[${D}]`).forEach(n=>{_.has(n)&&ps(n)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let i=t.target;i.hasAttribute(D)?_.has(i)||we(i):_.has(i)&&ps(i)}}});Ba||(Lu(),Tu(),document.documentElement.setAttribute("data-interest-polyfill",""),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{qa(),$a.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[D]})}):(qa(),$a.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[D]})));if(Ba&&bs){let e=()=>{document.querySelectorAll(`[${D}]`).forEach(Ht),new MutationObserver(t=>{for(let i of t){for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.hasAttribute(D)&&Ht(n),n.querySelectorAll(`[${D}]`).forEach(Ht)}i.type==="attributes"&&i.target.hasAttribute?.(D)&&Ht(i.target)}}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[D]})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}Nt();Es();ae();var As="kbd[data-hotkey]";function Wa(e=document){e.querySelectorAll(As).forEach(Ss)}function Ss(e){if(e.hasAttribute("data-hotkey-init"))return;e.setAttribute("data-hotkey-init","");let t=e.dataset.hotkey;if(!t)return;let i=ft?Mt.mac:Mt.other,s=t.toLowerCase().split("+").map(r=>r.trim()),n=document.createDocumentFragment();s.forEach((r,a)=>{let o=document.createElement("kbd");o.textContent=i[r]??r.toUpperCase(),n.appendChild(o),a<s.length-1&&!ft&&n.appendChild(document.createTextNode("+"))}),e.replaceChildren(n),e.setAttribute("aria-label",e.textContent)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Wa()):Wa();var Du=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(As)&&Ss(s),s.querySelectorAll(As).forEach(n=>Ss(n))}});Du.observe(document.documentElement,{childList:!0,subtree:!0});Ts();Ms();qs();Fs();Vs();Ys();Ks();Xs();Qs();tn();rn();dn();un();hn();bn();gn();var vn='input[type="color"][data-color]';function yn(e){if(e.hasAttribute("data-color-init")||e.closest("color-picker"))return;e.setAttribute("data-color-init","");let t=document.createElement("div");t.className="color-wrapper",e.parentNode.insertBefore(t,e),t.appendChild(e);let i=document.createElement("button");i.type="button",i.className="color-display";let s=document.createElement("span");s.className="color-swatch";let n=document.createElement("span");n.className="color-hex",i.appendChild(s),i.appendChild(n),t.appendChild(i);function r(){s.style.background=e.value,n.textContent=e.value}i.addEventListener("click",()=>e.click()),e.addEventListener("input",r),r()}function Do(e=document){e.querySelectorAll(vn).forEach(yn)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Do()):Do();var gh=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(vn)&&yn(s),s.querySelectorAll(vn).forEach(yn)}});gh.observe(document.documentElement,{childList:!0,subtree:!0});var vh=window.matchMedia("(prefers-reduced-motion: reduce)");function Io(){return vh.matches||document.documentElement.hasAttribute("data-motion-reduced")}var Oo=0,yh=new Map([["vb-fade-in","entrance"],["vb-slide-up","entrance"],["vb-pop","entrance"],["vb-slide-in-ltr","entrance"],["vb-slide-in-rtl","entrance"],["vb-fade-slide-up","entrance"],["vb-shadow-lift","entrance"],["vb-fade-out","exit"],["vb-collapse","exit"],["vb-slide-out-ltr","exit"],["vb-slide-out-rtl","exit"],["vb-shake","attention"],["vb-pulse","attention"],["vb-bounce","attention"],["vb-blink","attention"],["vb-neon-pulse","decoration"],["vb-3d-shift","decoration"],["vb-outline-glow-pulse","decoration"],["vb-rainbow","decoration"],["vb-gradient-flow","decoration"],["vb-shimmer","decoration"],["vb-shimmer-gradient","decoration"],["vb-glow","decoration"],["vb-float","decoration"]]),qo="__vbEffectsRuntime",$o=globalThis,$=$o[qo]??{_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_wiredTriggers:new WeakMap,_transitionCleanups:new WeakMap,_keyframePhase:yh,_observer:null,_animationEndHandler:null,_autoBooted:!1,effect(e,t){this._effects.set(e,t),document.querySelectorAll("[data-effect]").forEach(i=>{if(!(i.getAttribute("data-effect")||"").split(/\s+/).includes(e))return;let n=!this._instances.get(i)?.has(e);this._initEffect(i,e),n&&i.hasAttribute("data-effect-active")&&this._instances.get(i)?.get(e)?.activate?.()})},trigger(e,t){this._triggers.set(e,t),document.querySelectorAll("[data-effect-processed][data-trigger]").forEach(i=>{let s=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(i,s)})},transition(e,t){this._transitions.set(e,t)},uid(e){return e.id?e.id:(e._vbUid||(Oo++,e._vbUid=`vb-${Oo}`),e._vbUid)},theme(e,t){this._themes=this._themes||new Map,this._themes.set(e,t)},applyTheme(e,t=document.documentElement){let i=this._themes?.get(e);if(i)for(let[s,n]of Object.entries(i))t.style.setProperty(s,n)},swap(e){if(!document.startViewTransition){e(),queueMicrotask(()=>this._dispatchVtDone(document.body));return}let t=document.startViewTransition(e);return t.updateCallbackDone.then(()=>{this._dispatchVtDone(document.body)}).catch(()=>{}),t},_dispatchVtDone(e){e.querySelectorAll('[data-trigger~="vt"]').forEach(t=>{this.emit(t,"vb:vt-update-done",{})})},activate(e){this._activateEffects(e)},deactivate(e){e.hasAttribute("data-effect-active")&&(e.removeAttribute("data-effect-active"),this.emit(e,"vb:phase-change",{active:!1}))},onPhaseEnd(e,t,i){let s=n=>{n.detail?.phase===t&&i(n.detail)};return e.addEventListener("vb:effect-phase-end",s),()=>e.removeEventListener("vb:effect-phase-end",s)},registerKeyframe(e,t){this._keyframePhase.set(e,t)},observe(e=document){if(e.querySelectorAll("[data-effect]").forEach(i=>this._processElement(i)),e.querySelectorAll("[data-stagger]").forEach(i=>this._processStagger(i)),e.querySelectorAll("[data-transition]").forEach(i=>this._processTransition(i)),this._observer)return;this._observer=new MutationObserver(i=>{for(let s of i){if(s.type==="childList"){for(let n of s.addedNodes)n.nodeType===Node.ELEMENT_NODE&&this._processTree(n);for(let n of s.removedNodes)n.nodeType===Node.ELEMENT_NODE&&(n.isConnected||this._cleanupTree(n))}if(s.type==="attributes"){let n=s.target;s.attributeName==="data-effect"&&this._reconcileEffects(n),s.attributeName==="data-trigger"&&this._reconcileTrigger(n),s.attributeName==="data-stagger"&&this._processStagger(n),s.attributeName==="data-transition"&&this._processTransition(n)}}});let t=e===document?document.body:e;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]}),this._animationEndHandler||(this._animationEndHandler=i=>{let s=i.target;if(!(s instanceof Element)||!s.hasAttribute("data-effect"))return;let n=this._keyframePhase.get(i.animationName);n&&this.emit(s,"vb:effect-phase-end",{phase:n,animationName:i.animationName})},document.addEventListener("animationend",this._animationEndHandler))},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null),this._animationEndHandler&&(document.removeEventListener("animationend",this._animationEndHandler),this._animationEndHandler=null)},params(e){let t=getComputedStyle(e);return{get(i){return t.getPropertyValue(`--vb-${i}`).trim()},getNumber(i,s=0){let n=t.getPropertyValue(`--vb-${i}`).trim();return n?parseFloat(n):s},getTime(i,s=0){let n=t.getPropertyValue(`--vb-${i}`).trim();if(!n)return s;let r=parseFloat(n);return Number.isFinite(r)?/s\s*$/.test(n)&&!/ms\s*$/.test(n)?r*1e3:r:s},hasClass(i){return e.classList.contains(i)}}},emit(e,t,i={}){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))},prefersReducedMotion:Io,_processTree(e){e.hasAttribute?.("data-effect")&&this._processElement(e),e.hasAttribute?.("data-stagger")&&this._processStagger(e),e.hasAttribute?.("data-transition")&&this._processTransition(e),e.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),e.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),e.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(e){e.hasAttribute?.("data-effect")&&this._cleanupElement(e),e.hasAttribute?.("data-transition")&&this._cleanupTransition(e),e.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),e.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(e){if(e.hasAttribute("data-effect-processed"))return;e.setAttribute("data-effect-processed","");let t=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let i of t)this._initEffect(e,i);this._wireTrigger(e,t)},_initEffect(e,t){let i=this._effects.get(t);if(!i)return;let s=this._instances.get(e);if(s?.has(t))return;Io();let n=i(e);n&&(s||(s=new Map,this._instances.set(e,s)),typeof n=="function"?s.set(t,{cleanup:n}):s.set(t,n))},_wireTrigger(e,t){let i=e.getAttribute("data-trigger");if(!i){this._activateEffects(e);return}let s=i.split(/\s+/).filter(Boolean);this._wiredTriggers??=new WeakMap;let n=this._wiredTriggers.get(e);n||(n=new Set,this._wiredTriggers.set(e,n));for(let r of s){if(n.has(r))continue;let a=r.indexOf(":"),o=a>-1?r.slice(0,a):r,c=a>-1?r.slice(a+1):null,d=this._triggers.get(o);if(!d)continue;n.add(r);let l=d(e,()=>this._activateEffects(e),c);if(l){let u=this._triggerCleanups.get(e);if(u){let h=u;this._triggerCleanups.set(e,()=>{h(),l()})}else this._triggerCleanups.set(e,l)}}},_activateEffects(e){e.setAttribute("data-effect-active",""),this.emit(e,"vb:phase-change",{active:!0});let t=this._instances.get(e);if(t)for(let[,i]of t)i.activate&&i.activate()},_cleanupElement(e){let t=this._instances.get(e);if(t){for(let[,s]of t)s.cleanup&&s.cleanup();this._instances.delete(e)}let i=this._triggerCleanups.get(e);i&&(i(),this._triggerCleanups.delete(e)),this._wiredTriggers?.delete(e)},_reconcileEffects(e){let t=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],i=this._instances.get(e);if(i)for(let[s,n]of i)t.includes(s)||(n.cleanup&&n.cleanup(),i.delete(s));for(let s of t)i?.has(s)||this._initEffect(e,s);e.hasAttribute("data-effect-processed")||(e.setAttribute("data-effect-processed",""),this._wireTrigger(e,t))},_reconcileTrigger(e){let t=this._triggerCleanups.get(e);t&&(t(),this._triggerCleanups.delete(e)),this._wiredTriggers?.delete(e);let i=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(e,i)},_processStagger(e){let t=e.getAttribute("data-stagger")||"",i=e.children,s=i.length,n;if(t==="reverse")n=Array.from({length:s},(r,a)=>s-1-a);else if(t==="random"){let r=this._hashString(this.uid(e));n=Array.from({length:s},(o,c)=>c);let a=r;for(let o=s-1;o>0;o--){a^=a<<13,a^=a>>>17,a^=a<<5;let c=Math.abs(a)%(o+1);[n[o],n[c]]=[n[c],n[o]]}}else if(t==="grid"){let r=[];for(let a=0;a<s;a++){let o=getComputedStyle(i[a]),c=parseInt(o.gridRowStart,10),d=parseInt(o.gridColumnStart,10);r.push({i:a,dist:Number.isFinite(c)&&Number.isFinite(d)?c-1+(d-1):a})}r.sort((a,o)=>a.dist-o.dist),n=new Array(s),r.forEach((a,o)=>{n[a.i]=o})}else n=Array.from({length:s},(r,a)=>a);for(let r=0;r<s;r++)i[r].style.setProperty("--vb-stagger-index",String(n[r]))},_hashString(e){let t=5381;for(let i=0;i<e.length;i++)t=(t<<5)+t^e.charCodeAt(i);return t|0},_processTransition(e){if(e.hasAttribute("data-transition-processed"))return;e.setAttribute("data-transition-processed","");let t=e.getAttribute("data-transition");if(!t)return;let i=t.indexOf(":"),s=i>-1?t.slice(0,i):t,n=i>-1?t.slice(i+1):null,r=this._transitions.get(s);if(r){let a=r(e,n);a&&this._transitionCleanups.set(e,a)}else e.style.viewTransitionName=`${t}-${this.uid(e)}`},_cleanupTransition(e){let t=this._transitionCleanups.get(e);t&&(t(),this._transitionCleanups.delete(e)),e.style.viewTransitionName=""}};$o[qo]=$;typeof window<"u"&&(window.VB=$);typeof document<"u"&&!$._autoBooted&&($._autoBooted=!0,document.body?$.observe():document.addEventListener("DOMContentLoaded",()=>$.observe(),{once:!0}));function wh(e){let t=e.textContent;e.setAttribute("aria-label",t),e.innerHTML="",t.split(/(\s+)/).forEach((s,n)=>{if(/^\s+$/.test(s)){e.appendChild(document.createTextNode(s));return}let r=document.createElement("span");r.className="vb-reveal-chunk",r.textContent=s,r.style.setProperty("--i",String(Math.floor(n/2))),r.setAttribute("aria-hidden","true"),e.appendChild(r)})}function Eh(e){let t=e.textContent;e.setAttribute("aria-label",t);let i=document.createElement("div");i.style.cssText=getComputedStyle(e).cssText,i.style.position="absolute",i.style.visibility="hidden",i.style.whiteSpace="normal",document.body.appendChild(i);let s=t.split(/\s+/).filter(Boolean),n=[],r="";s.forEach(a=>{let o=r?r+" "+a:a;i.textContent=o,i.style.width=getComputedStyle(e).width,i.scrollWidth>i.clientWidth&&r?(n.push(r),r=a):r=o}),r&&n.push(r),document.body.removeChild(i),n.length===0&&n.push(t),e.innerHTML="",n.forEach((a,o)=>{let c=document.createElement("span");c.className="vb-reveal-chunk",c.textContent=a,c.style.setProperty("--i",String(o)),c.setAttribute("aria-hidden","true"),e.appendChild(c),o<n.length-1&&e.appendChild(document.createTextNode(" "))})}$.effect("reveal",e=>{if(e.hasAttribute("data-effect-reveal-init")||(e.setAttribute("data-effect-reveal-init",""),$.prefersReducedMotion()))return;let t=e.classList.contains("line")?"line":"word",i=$.params(e),s=i.get("reveal-delay")||"80ms",n=i.get("reveal-duration")||"400ms";return e.style.setProperty("--reveal-delay",s),e.style.setProperty("--reveal-duration",n),t==="line"?Eh(e):wh(e),{activate(){e.setAttribute("data-effect-active","")},cleanup(){}}});$.effect("highlight",e=>{if(e.hasAttribute("data-effect-highlight-init"))return;e.setAttribute("data-effect-highlight-init","");let i=getComputedStyle(e).getPropertyValue("--vb-highlight-color").trim();return i&&e.style.setProperty("--highlight-color",i),$.prefersReducedMotion()&&e.setAttribute("data-effect-active",""),{activate(){e.setAttribute("data-effect-active","")},cleanup(){}}});Sn();Tn();var Ro="vb:recently-visited",Th="vb:recently-visited:paused";function Lh(){try{return localStorage.getItem(Th)==="1"}catch{return!1}}function Nh(){return!!document.querySelector('meta[name="vb:no-track-history"]')}function Mh(){try{let e=localStorage.getItem(Ro);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function _h(e){try{localStorage.setItem(Ro,JSON.stringify(e))}catch{}}function Dh(e){if(!e)return"";let t=e.slice(1);if(!t)return"";let i=null;try{i=document.getElementById(t)}catch{}return i&&(i.textContent||"").trim().slice(0,80)||t}function Ln(){if(Lh()||Nh()||location.protocol==="file:"||location.protocol==="about:")return;let e=location.pathname+location.search,t=location.hash,i=(document.title||"").trim();if(!i)return;let s=Dh(t),n=Date.now(),r=Mh(),a=e+t;if((r[0]?r[0].url+(r[0].hash||""):"")===a)return;let c=r.filter(d=>d.url+(d.hash||"")!==a);c.unshift({url:e,hash:t,title:i,hashTitle:s,ts:n}),_h(c.slice(0,100))}var Nn=typeof document<"u"?document.documentElement:null;Nn&&!Nn.hasAttribute("data-vb-recently-visited-init")&&(Nn.setAttribute("data-vb-recently-visited-init",""),Ln(),window.addEventListener("pageshow",e=>{e.persisted&&Ln()}),window.addEventListener("hashchange",Ln));var Ih=CSS.supports("anchor-name","--test"),Oh=new Set(["BUTTON","A","AREA"]);function qh(e){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?Oh.has(e.tagName):!1}function Mn(e,t){if(qh(e)){e.setAttribute("interestfor",t.id),t.addEventListener("toggle",d=>{d.newState==="open"&&De(e,t)});return}let i=null,s=null,n=t,r=()=>{clearTimeout(s),i=setTimeout(()=>{n.showPopover(),De(e,t)},200)},a=()=>{clearTimeout(i),s=setTimeout(()=>{n.hidePopover()},100)},o=()=>{clearTimeout(s),n.showPopover(),De(e,t)},c=()=>{clearTimeout(i),n.hidePopover()};e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",a),e.addEventListener("focus",o),e.addEventListener("blur",c),t.addEventListener("mouseenter",()=>clearTimeout(s)),t.addEventListener("mouseleave",a)}function _n(e,t){if(!Ih)return;let i=`--tooltip-anchor-${t.id}`;e.style.anchorName=i,t.style.positionAnchor=i,t.setAttribute("data-anchor","")}function $h(e){let t=e.getAttribute("title");if(!t)return;e.removeAttribute("title");let i=document.createElement("div");i.setAttribute("role","tooltip"),i.setAttribute("popover","hint"),i.id=`tooltip-${crypto.randomUUID().slice(0,8)}`,i.textContent=t;let s=e.dataset.tooltipPosition||"top";i.dataset.tooltipPosition=s;let n=document.createElement("span");n.className="tooltip-arrow",n.setAttribute("aria-hidden","true"),i.appendChild(n),e.after(i),e.setAttribute("aria-describedby",i.id),_n(e,i),Mn(e,i)}function Bh(e,t){let i=document.getElementById(t);i?.hasAttribute("popover")&&(e.hasAttribute("title")&&e.removeAttribute("title"),e.hasAttribute("aria-describedby")||e.setAttribute("aria-describedby",t),_n(e,i),Mn(e,i))}function Ho(e=document){e.querySelectorAll("[data-tooltip]").forEach(t=>{if(t.closest("tool-tip")||t.hasAttribute("data-tooltip-init"))return;t.setAttribute("data-tooltip-init","");let i=t.dataset.tooltip;i?Bh(t,i):$h(t)}),e.querySelectorAll("[aria-describedby]").forEach(t=>{let i=t.getAttribute("aria-describedby")??"",s=document.getElementById(i);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||t.closest("tool-tip")||t.hasAttribute("data-tooltip-init")||(t.setAttribute("data-tooltip-init",""),_n(t,s),Mn(t,s))}),e.querySelectorAll("[popovertarget]").forEach(t=>{let i=t.getAttribute("popovertarget")??"",s=document.getElementById(i);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||s.hasAttribute("data-tooltip-click-init")||(s.setAttribute("data-tooltip-click-init",""),s.addEventListener("toggle",n=>{n.newState==="open"&&De(t,s)}))})}function De(e,t){if(t.hasAttribute("data-anchor"))return;let i=e.getBoundingClientRect(),s=t.dataset.tooltipPosition||"top",n=8,r=t.getBoundingClientRect(),a,o;switch(s){case"bottom":a=i.bottom+n,o=i.left+(i.width-r.width)/2;break;case"left":a=i.top+(i.height-r.height)/2,o=i.left-r.width-n;break;case"right":a=i.top+(i.height-r.height)/2,o=i.right+n;break;default:a=i.top-r.height-n,o=i.left+(i.width-r.width)/2;break}let c=8;o=Math.max(c,Math.min(o,window.innerWidth-r.width-c)),a=Math.max(c,Math.min(a,window.innerHeight-r.height-c)),t.style.top=`${a}px`,t.style.left=`${o}px`}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ho()):Ho();var Dn="[data-vt-name]";function In(e){e.hasAttribute("data-vt-name-init")||(e.setAttribute("data-vt-name-init",""),e.style.viewTransitionName=e.dataset.vtName)}function zo(e=document){e.querySelectorAll(Dn).forEach(In)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>zo()):zo();var Ph=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Dn)&&In(s),s.querySelectorAll(Dn).forEach(In)}});Ph.observe(document.documentElement,{childList:!0,subtree:!0});var Ie='progress[data-type="ring"]',Vo={xs:"2em",s:"3em",m:"4em",l:"6em",xl:"8em"};function Wo(e){let t=e.max||100,i=e.value;return t>0?Math.round(i/t*100):0}function jo(e){let t=Wo(e);e.style.setProperty("--progress",String(t));let i=e.parentElement?.querySelector(".progress-ring-label");i&&!e.dataset.label&&(i.textContent=t+"%")}function On(e){if(e.hasAttribute("data-enhanced"))return;e.setAttribute("data-enhanced",""),jo(e);let t=e.dataset.label,i=t==="none",s=!e.hasAttribute("value");if(!i&&!s){let n=document.createElement("div");n.className="progress-ring-wrap";let r=e.dataset.size;r&&Vo[r]&&n.style.setProperty("--progress-ring-size",Vo[r]),e.parentNode?.insertBefore(n,e),n.appendChild(e);let a=document.createElement("span");a.className="progress-ring-label",a.textContent=t||Wo(e)+"%",a.setAttribute("aria-hidden","true"),n.appendChild(a)}}function Uo(e=document){e.querySelectorAll(Ie).forEach(t=>On(t))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Uo()):Uo();var Fh=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Ie)&&On(s),s.querySelectorAll(Ie).forEach(n=>On(n))}if(t.type==="attributes"&&t.attributeName==="value"){let i=t.target;i.matches(Ie)&&i.hasAttribute("data-enhanced")&&jo(i)}}});Fh.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]});function Yo(e){document.querySelectorAll("browser-window").forEach(t=>{t.setAttribute("mode",e)}),document.querySelectorAll("code-block").forEach(t=>{t.setAttribute("theme",e)})}function Go(){let{effectiveMode:e}=x.getState();Yo(e),window.addEventListener("vb:theme-change",i=>{Yo(i.detail.effectiveMode)}),new MutationObserver(i=>{let{effectiveMode:s}=x.getState();for(let n of i)for(let r of n.addedNodes){if(r.nodeType!==Node.ELEMENT_NODE)continue;let a=r;a.tagName==="BROWSER-WINDOW"?a.setAttribute("mode",s):a.tagName==="CODE-BLOCK"&&a.setAttribute("theme",s),a.querySelectorAll("browser-window").forEach(o=>{o.setAttribute("mode",s)}),a.querySelectorAll("code-block").forEach(o=>{o.setAttribute("theme",s)})}}).observe(document.body,{childList:!0,subtree:!0})}var $f=[{selector:"[data-wizard]",load:()=>Promise.resolve().then(()=>(Jo(),Xo))},{selector:"[data-gesture]",load:()=>Promise.resolve().then(()=>(ki(),Ci))},{selector:"[data-keyboard-aware]",load:()=>Promise.resolve().then(()=>(tc(),Qo))},{selector:"[data-focus-trap]",load:()=>Promise.resolve().then(()=>(sc(),ic))},{selector:"[data-scroll-hide]",load:()=>Promise.resolve().then(()=>(nc(),Uh))},{selector:"[data-spotlight]",load:()=>Promise.resolve().then(()=>(oc(),ac))},{selector:"[data-splitter]",load:()=>Promise.resolve().then(()=>(Vs(),eo))},{selector:"[data-back-to-top]",load:()=>Promise.resolve().then(()=>(Es(),Ua))},{selector:"[data-hotkey]:not(kbd)",load:()=>Promise.resolve().then(()=>(fc(),hc))},{selector:'a[target="_blank"]',load:()=>Promise.resolve().then(()=>(gc(),bc))},{selector:"[data-watch-page], watch-wc",load:()=>Promise.resolve().then(()=>(cs(),os))},{selector:"img[data-responsive]",load:()=>Promise.resolve().then(()=>(Ec(),wc))},{selector:"form-field[data-floating-label]",load:()=>Promise.resolve().then(()=>(Cc(),xc))},{selector:"button[data-loading]",load:()=>Promise.resolve().then(()=>(Lc(),Tc))},{selector:"input[data-mask]",load:()=>Promise.resolve().then(()=>(un(),xo))},{selector:"input[data-accept]",load:()=>Promise.resolve().then(()=>(hn(),To))},{selector:'input[type="file"][data-upload]',load:()=>Promise.resolve().then(()=>(rn(),bo))},{selector:'input[type="range"][data-range]',load:()=>Promise.resolve().then(()=>(tn(),mo))},{selector:'input[type="number"][data-stepper]',load:()=>Promise.resolve().then(()=>(gn(),_o))},{selector:'input[type="checkbox"][data-switch]',load:()=>Promise.resolve().then(()=>(Ys(),io))},{selector:"textarea[data-grow]",load:()=>Promise.resolve().then(()=>(Xs(),co))},{selector:"textarea[data-count]",load:()=>Promise.resolve().then(()=>(Ks(),ro))},{selector:"fieldset[data-toggle-tags][data-max]",load:()=>Promise.resolve().then(()=>(bn(),Lo))},{selector:"form[data-autosave]",load:()=>Promise.resolve().then(()=>(dn(),vo))},{selector:"form[data-vb-email-form]",load:()=>Promise.resolve().then(()=>(_c(),Mc))},{selector:"form[data-vb-newsletter-form]",load:()=>Promise.resolve().then(()=>(Pc(),Bc))},{selector:"[data-copy], [data-copy-target], [data-paste-target]",load:()=>Promise.resolve().then(()=>(Nt(),Ur))},{selector:"[data-select-all]",load:()=>Promise.resolve().then(()=>(Sn(),Bo))},{selector:"[data-show-when], [data-hide-when]",load:()=>Promise.resolve().then(()=>(Qs(),ho))},{selector:"[data-spoiler]",load:()=>Promise.resolve().then(()=>(Fs(),to))},{selector:"[data-math], code.language-math",load:()=>Promise.resolve().then(()=>(Tn(),Fo))},{selector:"time[data-format-date]",load:()=>Promise.resolve().then(()=>(Ms(),Xa))},{selector:"data[data-format-number]",load:()=>Promise.resolve().then(()=>(Ts(),ja))},{selector:"data[data-format-bytes]",load:()=>Promise.resolve().then(()=>(qs(),Ja))},{selector:"[data-paged]",load:()=>Promise.resolve().then(()=>(Yc(),jc))},{selector:"[data-sortable], [data-sort-target]",load:()=>Promise.resolve().then(()=>(sl(),il))},{selector:"[data-toggle]",load:()=>Promise.resolve().then(()=>(ul(),dl))}];function Bf(e,t=document){for(let i of e)t.querySelector(i.selector)&&i.load()}function hl(e=document){Bf($f,e)}qt();function Jt(e){return[...e.querySelectorAll("input, select, textarea")].filter(t=>t.type!=="submit"&&t.type!=="button"&&t.type!=="hidden"&&!("honeypot"in t.dataset))}function ml(e){return[...e.querySelectorAll("form-field[data-upgraded]")]}function Pf(e){return e.labels?.[0]?.textContent?.trim()??e.getAttribute("aria-label")??e.name??e.id}function Xt(e,t){let i=e.dataset.match;if(!i)return;let s=t.querySelector(`#${CSS.escape(i)}`)??t.querySelector(`[name="${CSS.escape(i)}"]`);if(s){if(e.setCustomValidity(""),e.value&&s.value&&e.value!==s.value){let n=e.dataset.messageMatch??"Values do not match";e.setCustomValidity(n);let r=fl(e);r&&(r.textContent=n)}else if(e.validity.valid){let n=fl(e);n&&(n.textContent="")}}}function fl(e){let t=e.getAttribute("aria-describedby")?.split(/\s+/)??[];for(let s of t){let n=document.getElementById(s);if(n?.tagName==="OUTPUT"&&n.classList.contains("error"))return n}return e.closest("form-field")?.querySelector("output.error")??null}function pl(e){let i=[...e.querySelectorAll('input[type="checkbox"]')].filter(o=>o.checked).length,s=parseInt(e.dataset.minChecked??"0",10),n=parseInt(e.dataset.maxChecked??"999",10),r=e.querySelector(":scope > output"),a=null;return i<s&&(a=e.dataset.messageMinChecked??`Select at least ${s}`),i>n&&(a=e.dataset.messageMaxChecked??`Select no more than ${n}`),r&&(r.textContent=a??""),a?e.dataset.invalid="":delete e.dataset.invalid,!a}function bl(e){let t=e.querySelector("[data-form-summary]");if(t)return{el:t,type:"authored"};let i=e.querySelector("output.error-summary");return i?{el:i,type:"legacy"}:null}function He(e,t,{focus:i=!1}={}){if(!t)return;let s=[];for(let n of Jt(e))n.validity.valid||s.push({id:n.id||n.name,label:Pf(n),message:n.validationMessage});for(let n of e.querySelectorAll("fieldset[data-invalid]")){let r=n.querySelector(":scope > output");s.push({id:n.id||"",label:n.querySelector("legend")?.textContent?.trim()??"Group",message:r?.textContent||"Invalid selection"})}if(s.length===0){gl(t);return}if(t.type==="authored"){let n=t.el.querySelector("[data-summary-list]");if(n){n.innerHTML="";for(let r of s){let a=document.createElement("li"),o=document.createElement("a");o.href=r.id?`#${r.id}`:"#",o.textContent=`${r.label}: ${r.message}`,a.appendChild(o),n.appendChild(a)}}t.el.removeAttribute("hidden"),t.el.dataset.visible=""}else{let n=s.length,r=s.map(a=>`<li><a href="${a.id?`#${a.id}`:"#"}">${a.label}: ${a.message}</a></li>`).join(`
585
+ `;for(let i of this.querySelectorAll("[data-part]"))this.#e[i.dataset.part??""]=i;this.#e.heading.textContent=this.#t,this.#n()}#n(){let t=lh(this.getAttribute("heading-level")),i={heading:t,"fields-heading":Math.min(t+1,6)};for(let[s,n]of Object.entries(i)){let r=this.#e[s];if(!r||r.localName===`h${n}`)continue;let a=document.createElement(`h${n}`);for(let{name:o,value:c}of r.attributes)a.setAttribute(o,c);a.textContent=r.textContent,r.replaceWith(a),this.#e[s]=a}}refresh(){if(!this.#e.status)return;let t=this.status,i=dh(t),s=this.#e;this.setAttribute("data-state",i.state),i.reason?this.setAttribute("data-reason",i.reason):this.removeAttribute("data-reason"),s.status.textContent!==i.text&&(s.status.textContent=i.text),this.#a(t);let n=!!t?.signals?.user,r=uh(t),a=n?"Resume analytics":"Pause analytics";if(s.toggle.textContent!==a&&(s.toggle.textContent=a),s.toggle.setAttribute("aria-pressed",String(n)),n&&r.length>0?s.toggle.setAttribute("aria-disabled","true"):s.toggle.removeAttribute("aria-disabled"),r.length){let c=r.map(l=>ao[l]).join(" and ");s.hint.textContent=n?`Resume is unavailable because ${c}.`:`Analytics stays off because ${c}; pausing as well changes nothing.`,s.hint.hidden=!1,s.toggle.setAttribute("aria-describedby",s.hint.id)}else s.hint.textContent="",s.hint.hidden=!0,s.toggle.removeAttribute("aria-describedby")}#a(t){let{data:i,empty:s}=this.#e;if(!t?.initialized||!t.preview){i.hidden=!0,i.replaceChildren(),s.hidden=!1,s.textContent="Nothing to show: the analytics runtime has not started on this page.";return}s.hidden=!0,i.hidden=!1;let n=[["Fields",t.collects.join(", ")],["Page path",t.preview.path],["Referrer",t.preview.referrer||"(none)"],["Page context",t.contextKeys.length?t.contextKeys.join(", "):"(none)"]];t.transport==="beacon"?(n.push(["Sent to",t.endpoint]),n.push(["Sent from this page",String(t.sent)])):t.transport==="console"&&n.push(["Logged on this page",String(t.logged)]),t.queued>0&&n.push(["Waiting to send",String(t.queued)]),t.outboundLinks&&n.push(["Outbound link clicks","Reported (site, page path, destination)"]);let r=document.createDocumentFragment();for(let[a,o]of n){let c=document.createElement("dt");c.textContent=a;let l=document.createElement("dd");l.textContent=o,r.append(c,l)}i.replaceChildren(r)}};m("analytics-panel",Cs);var ks="data-brand-mark-img",hh="(width < 48rem)",Ts=class extends b{static observedAttributes=["src","src-dark","src-compact","compact-media","alt","wordmark","height"];#e=null;#t=null;#i=null;#s=!1;setup(){this.#o(),this.hasAttribute("src-dark")&&this.#n(),this.#c(),this.#t=new MutationObserver(()=>this.#f()),this.#t.observe(this,{childList:!0,characterData:!0,subtree:!0})}teardown(){this.#e?.disconnect(),this.#e=null,this.#t?.disconnect(),this.#t=null,this.#i=null,this.#s=!1}attributeChangedCallback(t,i,s){if(i!==s&&!(!this.isConnected||!this.hasAttribute("data-upgraded"))){if(t==="height"){this.#o();return}t==="src-dark"&&s!==null&&this.#n(),this.#c()}}#r(){let t=document.documentElement.getAttribute("data-mode");if(t==="dark")return!0;if(t==="light")return!1;let i=getComputedStyle(this).colorScheme||"";return/\bdark\b/.test(i)&&!/\blight\b/.test(i)?!0:/\blight\b/.test(i)&&!/\bdark\b/.test(i)?!1:(this.#i??matchMedia("(prefers-color-scheme: dark)")).matches}#n(){this.#s||(this.#s=!0,this.#i=matchMedia("(prefers-color-scheme: dark)"),this.listen(this.#i,"change",this.#a),this.listen(window,"vb:theme-change",this.#a),this.#e=new MutationObserver(this.#a),this.#e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-mode","data-theme"]}))}#a=()=>{this.isConnected&&this.#c()};#o(){let t=this.getAttribute("height")?.trim();if(!t){this.style.removeProperty("--brand-mark-height"),this.getAttribute("style")||this.removeAttribute("style");return}this.style.setProperty("--brand-mark-height",/^\d+(\.\d+)?$/.test(t)?`${t}px`:t)}#l(){return this.querySelector(`:scope > [${ks}]`)}#c(){let t=this.getAttribute("src"),i=this.#l();if(!t){i?.remove();return}let s=this.getAttribute("src-dark"),n=s&&this.#r()?s:t;if(!(i instanceof HTMLPictureElement)||!i.querySelector(":scope > img")){i?.remove(),i=document.createElement("picture"),i.setAttribute(ks,"");let c=document.createElement("img");c.decoding="async",i.append(c),this.prepend(i)}let r=i.querySelector(":scope > img");r.getAttribute("src")!==n&&r.setAttribute("src",n);let a=this.getAttribute("src-compact"),o=i.querySelector(":scope > source");if(a){o||(o=document.createElement("source"),i.prepend(o));let c=this.getAttribute("compact-media")||hh;o.getAttribute("media")!==c&&o.setAttribute("media",c),o.getAttribute("srcset")!==a&&o.setAttribute("srcset",a)}else o?.remove();this.#f()}#f(){let t=this.#l()?.querySelector(":scope > img");if(!t)return;let i=this.getAttribute("alt"),s=!this.hasAttribute("wordmark"),n;s&&i?n=i:this.#m()?n="":n=i??"",t.getAttribute("alt")!==n&&t.setAttribute("alt",n)}#m(){for(let t of this.childNodes)if(!(t instanceof Element&&t.hasAttribute(ks))&&t.textContent?.trim())return!0;return!1}};m("brand-mark",Ts);var fh="52rem",Ls=class extends HTMLElement{#e=null;connectedCallback(){let t=this.getAttribute("breakpoint")||fh;this.#e=matchMedia(`(max-width: ${t})`),this.#e.addEventListener("change",this.#t),this.#t(void 0)}disconnectedCallback(){this.#e?.removeEventListener("change",this.#t),this.#e=null}#t=t=>{let i=this.#e?.matches??!1;if(i)this.setAttribute("data-mobile","");else{this.removeAttribute("data-mobile");let n=this.querySelector("[popover]");n?.matches(":popover-open")&&n.hidePopover?.()}let s=this.closest("header");if(s)for(let n of s.children)n!==this&&n.matches("nav, nav-bar, site-tools")&&(n.style.display=i?"none":"")}};customElements.get("mobile-menu")||customElements.define("mobile-menu",Ls);var I="interestfor",uo="interestForElement"in HTMLButtonElement.prototype,_=new WeakMap,St=new WeakMap,De=new Set,_s=!1,Ds=CSS.supports?.("anchor-name","--a")??!1;function oo(e){let t=String(e).trim(),i=t.match(/^([\d.]+)s$/);if(i)return parseFloat(i[1])*1e3;let s=t.match(/^([\d.]+)ms$/);return s?parseFloat(s[1]):parseFloat(t)||0}function ho(e,t){let i=getComputedStyle(e),s=i.getPropertyValue(t).trim();if(s.toLowerCase()!=="normal")return oo(s);let n=i.getPropertyValue("--interest-delay").trim();if(n&&n.toLowerCase()!=="normal"){let r=n.split(/\s+/).filter(a=>a.length>0);if(r.length>0){let a=t==="--interest-delay-start"?r[0]:r[1]||r[0];if(a.toLowerCase()!=="normal")return oo(a)}}return t==="--interest-delay-start"?500:250}var ph=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(","),mh="h1,h2,h3,h4,h5,h6,ul,ol,li,table,nav,header,footer,main,aside,article,section,form,blockquote,details,summary,dialog";function Is(e){if(e.getAttribute("popover")?.toLowerCase()!=="hint"||e.querySelector(ph)||e.querySelector(mh))return!1;for(let t of e.querySelectorAll("[role]")){let i=t.getAttribute("role").toLowerCase();if(!["presentation","none","generic","image"].includes(i))return!1}return!0}function bh(e,t){Is(t)?e.setAttribute("aria-describedby",t.id):(e.setAttribute("aria-details",t.id),e.setAttribute("aria-expanded","false"),t.hasAttribute("role")||t.setAttribute("role","tooltip"))}function U(e){let t=e.getAttribute(I);return t?document.getElementById(t):null}function _e(e){let t=St.get(e);return t?.invoker&&_.get(t.invoker)?.state==="full"?t.invoker:null}function jt(e){if(_.has(e))return _.get(e);let t={state:"none",gainedTimer:null,lostTimer:null,longPressTimer:null};_.set(e,t);let i=U(e);return i&&bh(e,i),t}function fo(e,t){if(!e||!t||!e.isConnected||U(e)!==t)return!1;let i=_e(t);if(i){if(i===e)return clearTimeout(_.get(i).lostTimer),!1;if(!Wt(i,t)||!e.isConnected||U(e)!==t)return!1}let s=jt(e);if(s.state!=="none")return!1;let n=new CustomEvent("interest",{bubbles:!1,cancelable:!0,detail:{source:e}});if(t.dispatchEvent(n),t.hasAttribute("popover")){try{t.showPopover()}catch{}vh(e,t)}s.state="full",St.has(t)||St.set(t,{});let r=St.get(t);if(r.invoker=e,t.hasAttribute("popover")){let a=o=>{o.newState==="closed"&&Wt(e,t)};r.toggleListener=a,t.addEventListener("toggle",a)}return De.add(e),e.classList.add("interest-source"),t.classList.add("interest-target"),Is(t)||e.setAttribute("aria-expanded","true"),!0}function Wt(e,t){if(!e||!t||U(e)!==t||_e(t)!==e)return!1;let i=_.get(e);if(!i||i.state==="none")return!1;if(clearTimeout(i.gainedTimer),clearTimeout(i.lostTimer),t.dispatchEvent(new CustomEvent("loseinterest",{bubbles:!1,detail:{source:e}})),t.hasAttribute("popover"))try{t.hidePopover()}catch{}let s=St.get(t);return s?.toggleListener&&t.removeEventListener("toggle",s.toggleListener),St.delete(t),De.delete(e),e.classList.remove("interest-source"),t.classList.remove("interest-target"),Is(t)||e.setAttribute("aria-expanded","false"),i.state="none",!0}function gh(e){let t=jt(e);clearTimeout(t.gainedTimer);let i=ho(e,"--interest-delay-start");t.gainedTimer=setTimeout(()=>{let s=U(e);s&&fo(e,s)},i)}function Ms(e){let t=_.get(e);if(!t)return;clearTimeout(t.lostTimer);let i=ho(e,"--interest-delay-end");t.lostTimer=setTimeout(()=>{let s=U(e);s&&Wt(e,s)},i)}function Ut(e){if(!Ds)return;let t=e.getAttribute(I),i=t?document.getElementById(t):null;if(!i?.id)return;let s=`--interest-${i.id}`;e.style.anchorName=s,i.style.positionAnchor=s}function vh(e,t){if(Ds)return;let i=e.getBoundingClientRect(),s=t.getBoundingClientRect(),n=8,r=8,a=i.top-s.height-n,o=i.left+(i.width-s.width)/2;a<r&&(a=i.bottom+n),o=Math.max(r,Math.min(o,window.innerWidth-s.width-r)),a=Math.max(r,Math.min(a,window.innerHeight-s.height-r)),t.style.top=`${a}px`,t.style.left=`${o}px`,t.style.margin="0"}function yh(e,t){if(_s||!e.isConnected)return;if(!U(e)){let r=e.closest(".interest-target");if(r){let a=_e(r);a&&(t?clearTimeout(_.get(a)?.lostTimer):Ms(a))}return}let s=jt(e),n=_e(e);if(t)clearTimeout(s.lostTimer),n&&clearTimeout(_.get(n)?.lostTimer),gh(e);else if(clearTimeout(s.gainedTimer),s.state!=="none"&&Ms(e),n){let r=_.get(n);r&&clearTimeout(r.gainedTimer),Ms(n)}}function wh(){let e=(s,n)=>{for(let r=s.target;r;r=r.parentElement)yh(r,n)};document.body.addEventListener("mouseover",s=>e(s,!0)),document.body.addEventListener("mouseout",s=>e(s,!1)),document.body.addEventListener("focusin",s=>e(s,!0)),document.body.addEventListener("focusout",s=>e(s,!1)),document.body.addEventListener("keydown",s=>{if(s.key==="Escape")for(let n of De){let r=U(n);r&&Wt(n,r)}});let t=500;document.body.addEventListener("touchstart",s=>{_s=!0;let n=s.target.closest(`button[${I}]`);if(!n)return;let r=jt(n);r.longPressTimer=setTimeout(()=>{let a=U(n);a&&fo(n,a),r.longPressTimer=null},t)});let i=s=>{let n=s.target.closest(`button[${I}]`);if(!n)return;let r=_.get(n);r?.longPressTimer&&(clearTimeout(r.longPressTimer),r.longPressTimer=null)};document.body.addEventListener("touchend",s=>{i(s),_s=!1}),document.body.addEventListener("touchmove",i)}function Ah(){let e=document.createElement("style");e.textContent=['@property --interest-delay-start { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay-end { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay { syntax: "*"; inherits: false; initial-value: normal; }'].join(`
586
+ `),document.head.appendChild(e)}function Ne(e){jt(e),Ut(e)}function Ns(e){let t=_.get(e);if(t){if(clearTimeout(t.gainedTimer),clearTimeout(t.lostTimer),clearTimeout(t.longPressTimer),t.state!=="none"){let i=U(e);i&&Wt(e,i)}e.classList.remove("interest-source"),_.delete(e),De.delete(e)}}function co(e=document){e.querySelectorAll(`[${I}]`).forEach(Ne)}var lo=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute(I)&&Ne(s),s.querySelectorAll(`[${I}]`).forEach(Ne)}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;_.has(s)&&Ns(s),s.querySelectorAll(`[${I}]`).forEach(n=>{_.has(n)&&Ns(n)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let i=t.target;i.hasAttribute(I)?_.has(i)||Ne(i):_.has(i)&&Ns(i)}}});uo||(Ah(),wh(),document.documentElement.setAttribute("data-interest-polyfill",""),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{co(),lo.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[I]})}):(co(),lo.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[I]})));if(uo&&Ds){let e=()=>{document.querySelectorAll(`[${I}]`).forEach(Ut),new MutationObserver(t=>{for(let i of t){for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.hasAttribute(I)&&Ut(n),n.querySelectorAll(`[${I}]`).forEach(Ut)}i.type==="attributes"&&i.target.hasAttribute?.(I)&&Ut(i.target)}}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[I]})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}_t();Bs();de();var Ps="kbd[data-hotkey]";function yo(e=document){e.querySelectorAll(Ps).forEach(Fs)}function Fs(e){if(e.hasAttribute("data-hotkey-init"))return;e.setAttribute("data-hotkey-init","");let t=e.dataset.hotkey;if(!t)return;let i=X?Dt.mac:Dt.other,s=t.toLowerCase().split("+").map(r=>r.trim()),n=document.createDocumentFragment();s.forEach((r,a)=>{let o=document.createElement("kbd");o.textContent=i[r]??r.toUpperCase(),n.appendChild(o),a<s.length-1&&!X&&n.appendChild(document.createTextNode("+"))}),e.replaceChildren(n),e.setAttribute("aria-label",e.textContent)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>yo()):yo();var Ch=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Ps)&&Fs(s),s.querySelectorAll(Ps).forEach(n=>Fs(n))}});Ch.observe(document.documentElement,{childList:!0,subtree:!0});Vs();js();Js();en();an();dn();hn();fn();bn();gn();An();kn();Tn();Ln();Dn();In();var On='input[type="color"][data-color]';function qn(e){if(e.hasAttribute("data-color-init")||e.closest("color-picker"))return;e.setAttribute("data-color-init","");let t=document.createElement("div");t.className="color-wrapper",e.parentNode.insertBefore(t,e),t.appendChild(e);let i=document.createElement("button");i.type="button",i.className="color-display";let s=document.createElement("span");s.className="color-swatch";let n=document.createElement("span");n.className="color-hex",i.appendChild(s),i.appendChild(n),t.appendChild(i);function r(){s.style.background=e.value,n.textContent=e.value}i.addEventListener("click",()=>e.click()),e.addEventListener("input",r),r()}function rc(e=document){e.querySelectorAll(On).forEach(qn)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>rc()):rc();var uf=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(On)&&qn(s),s.querySelectorAll(On).forEach(qn)}});uf.observe(document.documentElement,{childList:!0,subtree:!0});var hf=window.matchMedia("(prefers-reduced-motion: reduce)");function ac(){return hf.matches||document.documentElement.hasAttribute("data-motion-reduced")}var oc=0,ff=new Map([["vb-fade-in","entrance"],["vb-slide-up","entrance"],["vb-pop","entrance"],["vb-slide-in-ltr","entrance"],["vb-slide-in-rtl","entrance"],["vb-fade-slide-up","entrance"],["vb-shadow-lift","entrance"],["vb-fade-out","exit"],["vb-collapse","exit"],["vb-slide-out-ltr","exit"],["vb-slide-out-rtl","exit"],["vb-shake","attention"],["vb-pulse","attention"],["vb-bounce","attention"],["vb-blink","attention"],["vb-neon-pulse","decoration"],["vb-3d-shift","decoration"],["vb-outline-glow-pulse","decoration"],["vb-rainbow","decoration"],["vb-gradient-flow","decoration"],["vb-shimmer","decoration"],["vb-shimmer-gradient","decoration"],["vb-glow","decoration"],["vb-float","decoration"]]),cc="__vbEffectsRuntime",lc=globalThis,O=lc[cc]??{_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_wiredTriggers:new WeakMap,_transitionCleanups:new WeakMap,_transitionFallback:new WeakSet,_keyframePhase:ff,_observer:null,_animationEndHandler:null,_autoBooted:!1,effect(e,t){this._effects.set(e,t),document.querySelectorAll("[data-effect]").forEach(i=>{if(!(i.getAttribute("data-effect")||"").split(/\s+/).includes(e))return;let n=!this._instances.get(i)?.has(e);this._initEffect(i,e),n&&i.hasAttribute("data-effect-active")&&this._instances.get(i)?.get(e)?.activate?.()})},trigger(e,t){this._triggers.set(e,t),document.querySelectorAll("[data-effect-processed][data-trigger]").forEach(i=>{let s=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(i,s)})},transition(e,t){this._transitions.set(e,t),document.querySelectorAll("[data-transition-processed][data-transition]").forEach(i=>{if(!this._transitionFallback.has(i))return;let s=i.getAttribute("data-transition")||"",n=s.indexOf(":");if((n>-1?s.slice(0,n):s)!==e)return;this._transitionFallback.delete(i);let r=i;r.style.viewTransitionName="";let a=t(i,n>-1?s.slice(n+1):null);a&&this._transitionCleanups.set(i,a)})},uid(e){return e.id?e.id:(e._vbUid||(oc++,e._vbUid=`vb-${oc}`),e._vbUid)},theme(e,t){this._themes=this._themes||new Map,this._themes.set(e,t)},applyTheme(e,t=document.documentElement){let i=this._themes?.get(e);if(i)for(let[s,n]of Object.entries(i))t.style.setProperty(s,n)},swap(e){if(!document.startViewTransition){e(),queueMicrotask(()=>this._dispatchVtDone(document.body));return}let t=document.startViewTransition(e);return t.updateCallbackDone.then(()=>{this._dispatchVtDone(document.body)}).catch(()=>{}),t},_dispatchVtDone(e){e.querySelectorAll('[data-trigger~="vt"]').forEach(t=>{this.emit(t,"vb:vt-update-done",{})})},activate(e){this._activateEffects(e)},deactivate(e){e.hasAttribute("data-effect-active")&&(e.removeAttribute("data-effect-active"),this.emit(e,"vb:phase-change",{active:!1}))},onPhaseEnd(e,t,i){let s=n=>{n.detail?.phase===t&&i(n.detail)};return e.addEventListener("vb:effect-phase-end",s),()=>e.removeEventListener("vb:effect-phase-end",s)},registerKeyframe(e,t){this._keyframePhase.set(e,t)},observe(e=document){if(e.querySelectorAll("[data-effect]").forEach(i=>this._processElement(i)),e.querySelectorAll("[data-stagger]").forEach(i=>this._processStagger(i)),e.querySelectorAll("[data-transition]").forEach(i=>this._processTransition(i)),this._observer)return;this._observer=new MutationObserver(i=>{for(let s of i){if(s.type==="childList"){for(let n of s.addedNodes)n.nodeType===Node.ELEMENT_NODE&&this._processTree(n);for(let n of s.removedNodes)n.nodeType===Node.ELEMENT_NODE&&(n.isConnected||this._cleanupTree(n))}if(s.type==="attributes"){let n=s.target;s.attributeName==="data-effect"&&this._reconcileEffects(n),s.attributeName==="data-trigger"&&this._reconcileTrigger(n),s.attributeName==="data-stagger"&&this._processStagger(n),s.attributeName==="data-transition"&&this._processTransition(n)}}});let t=e===document?document.body:e;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]}),this._animationEndHandler||(this._animationEndHandler=i=>{let s=i.target;if(!(s instanceof Element)||!s.hasAttribute("data-effect"))return;let n=this._keyframePhase.get(i.animationName);n&&this.emit(s,"vb:effect-phase-end",{phase:n,animationName:i.animationName})},document.addEventListener("animationend",this._animationEndHandler))},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null),this._animationEndHandler&&(document.removeEventListener("animationend",this._animationEndHandler),this._animationEndHandler=null)},params(e){let t=getComputedStyle(e);return{get(i){return t.getPropertyValue(`--vb-${i}`).trim()},getNumber(i,s=0){let n=t.getPropertyValue(`--vb-${i}`).trim();return n?parseFloat(n):s},getTime(i,s=0){let n=t.getPropertyValue(`--vb-${i}`).trim();if(!n)return s;let r=parseFloat(n);return Number.isFinite(r)?/s\s*$/.test(n)&&!/ms\s*$/.test(n)?r*1e3:r:s},hasClass(i){return e.classList.contains(i)}}},emit(e,t,i={}){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))},prefersReducedMotion:ac,_processTree(e){e.hasAttribute?.("data-effect")&&this._processElement(e),e.hasAttribute?.("data-stagger")&&this._processStagger(e),e.hasAttribute?.("data-transition")&&this._processTransition(e),e.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),e.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),e.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(e){e.hasAttribute?.("data-effect")&&this._cleanupElement(e),e.hasAttribute?.("data-transition")&&this._cleanupTransition(e),e.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),e.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(e){if(e.hasAttribute("data-effect-processed"))return;e.setAttribute("data-effect-processed","");let t=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let i of t)this._initEffect(e,i);this._wireTrigger(e,t)},_initEffect(e,t){let i=this._effects.get(t);if(!i)return;let s=this._instances.get(e);if(s?.has(t))return;ac();let n=i(e);n&&(s||(s=new Map,this._instances.set(e,s)),typeof n=="function"?s.set(t,{cleanup:n}):s.set(t,n))},_wireTrigger(e,t){let i=e.getAttribute("data-trigger");if(!i){this._activateEffects(e);return}let s=i.split(/\s+/).filter(Boolean);this._wiredTriggers??=new WeakMap;let n=this._wiredTriggers.get(e);n||(n=new Set,this._wiredTriggers.set(e,n));for(let r of s){if(n.has(r))continue;let a=r.indexOf(":"),o=a>-1?r.slice(0,a):r,c=a>-1?r.slice(a+1):null,l=this._triggers.get(o);if(!l)continue;n.add(r);let d=l(e,()=>this._activateEffects(e),c);if(d){let u=this._triggerCleanups.get(e);if(u){let h=u;this._triggerCleanups.set(e,()=>{h(),d()})}else this._triggerCleanups.set(e,d)}}},_activateEffects(e){e.setAttribute("data-effect-active",""),this.emit(e,"vb:phase-change",{active:!0});let t=this._instances.get(e);if(t)for(let[,i]of t)i.activate&&i.activate()},_cleanupElement(e){let t=this._instances.get(e);if(t){for(let[,s]of t)s.cleanup&&s.cleanup();this._instances.delete(e)}let i=this._triggerCleanups.get(e);i&&(i(),this._triggerCleanups.delete(e)),this._wiredTriggers?.delete(e)},_reconcileEffects(e){let t=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],i=this._instances.get(e);if(i)for(let[s,n]of i)t.includes(s)||(n.cleanup&&n.cleanup(),i.delete(s));for(let s of t)i?.has(s)||this._initEffect(e,s);e.hasAttribute("data-effect-processed")||(e.setAttribute("data-effect-processed",""),this._wireTrigger(e,t))},_reconcileTrigger(e){let t=this._triggerCleanups.get(e);t&&(t(),this._triggerCleanups.delete(e)),this._wiredTriggers?.delete(e);let i=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(e,i)},_processStagger(e){let t=e.getAttribute("data-stagger")||"",i=e.children,s=i.length,n;if(t==="reverse")n=Array.from({length:s},(r,a)=>s-1-a);else if(t==="random"){let r=this._hashString(this.uid(e));n=Array.from({length:s},(o,c)=>c);let a=r;for(let o=s-1;o>0;o--){a^=a<<13,a^=a>>>17,a^=a<<5;let c=Math.abs(a)%(o+1);[n[o],n[c]]=[n[c],n[o]]}}else if(t==="grid"){let r=[];for(let a=0;a<s;a++){let o=getComputedStyle(i[a]),c=parseInt(o.gridRowStart,10),l=parseInt(o.gridColumnStart,10);r.push({i:a,dist:Number.isFinite(c)&&Number.isFinite(l)?c-1+(l-1):a})}r.sort((a,o)=>a.dist-o.dist),n=new Array(s),r.forEach((a,o)=>{n[a.i]=o})}else n=Array.from({length:s},(r,a)=>a);for(let r=0;r<s;r++)i[r].style.setProperty("--vb-stagger-index",String(n[r]))},_hashString(e){let t=5381;for(let i=0;i<e.length;i++)t=(t<<5)+t^e.charCodeAt(i);return t|0},_processTransition(e){if(e.hasAttribute("data-transition-processed"))return;e.setAttribute("data-transition-processed","");let t=e.getAttribute("data-transition");if(!t)return;let i=t.indexOf(":"),s=i>-1?t.slice(0,i):t,n=i>-1?t.slice(i+1):null,r=this._transitions.get(s);if(r){let a=r(e,n);a&&this._transitionCleanups.set(e,a)}else e.style.viewTransitionName=`${t}-${this.uid(e)}`,this._transitionFallback.add(e)},_cleanupTransition(e){let t=this._transitionCleanups.get(e);t&&(t(),this._transitionCleanups.delete(e)),this._transitionFallback.delete(e),e.style.viewTransitionName=""}};lc[cc]=O;if(typeof window<"u"){let e=window.VB;if(e&&e!==O)for(let t of Object.keys(e))t in O||(O[t]=e[t]);window.VB=O}typeof document<"u"&&!O._autoBooted&&(O._autoBooted=!0,document.body?O.observe():document.addEventListener("DOMContentLoaded",()=>O.observe(),{once:!0}));function pf(e){let t=e.textContent;e.setAttribute("aria-label",t),e.innerHTML="",t.split(/(\s+)/).forEach((s,n)=>{if(/^\s+$/.test(s)){e.appendChild(document.createTextNode(s));return}let r=document.createElement("span");r.className="vb-reveal-chunk",r.textContent=s,r.style.setProperty("--i",String(Math.floor(n/2))),r.setAttribute("aria-hidden","true"),e.appendChild(r)})}function mf(e){let t=e.textContent;e.setAttribute("aria-label",t);let i=document.createElement("div");i.style.cssText=getComputedStyle(e).cssText,i.style.position="absolute",i.style.visibility="hidden",i.style.whiteSpace="normal",document.body.appendChild(i);let s=t.split(/\s+/).filter(Boolean),n=[],r="";s.forEach(a=>{let o=r?r+" "+a:a;i.textContent=o,i.style.width=getComputedStyle(e).width,i.scrollWidth>i.clientWidth&&r?(n.push(r),r=a):r=o}),r&&n.push(r),document.body.removeChild(i),n.length===0&&n.push(t),e.innerHTML="",n.forEach((a,o)=>{let c=document.createElement("span");c.className="vb-reveal-chunk",c.textContent=a,c.style.setProperty("--i",String(o)),c.setAttribute("aria-hidden","true"),e.appendChild(c),o<n.length-1&&e.appendChild(document.createTextNode(" "))})}O.effect("reveal",e=>{if(e.hasAttribute("data-effect-reveal-init")||(e.setAttribute("data-effect-reveal-init",""),O.prefersReducedMotion()))return;let t=e.classList.contains("line")?"line":"word",i=O.params(e),s=i.get("reveal-delay")||"80ms",n=i.get("reveal-duration")||"400ms";return e.style.setProperty("--reveal-delay",s),e.style.setProperty("--reveal-duration",n),t==="line"?mf(e):pf(e),{activate(){e.setAttribute("data-effect-active","")},cleanup(){}}});O.effect("highlight",e=>{if(e.hasAttribute("data-effect-highlight-init"))return;e.setAttribute("data-effect-highlight-init","");let i=getComputedStyle(e).getPropertyValue("--vb-highlight-color").trim();return i&&e.style.setProperty("--highlight-color",i),O.prefersReducedMotion()&&e.setAttribute("data-effect-active",""),{activate(){e.setAttribute("data-effect-active","")},cleanup(){}}});Fn();Vn();var fc="vb:recently-visited",Af="vb:recently-visited:paused";function Ef(){try{return localStorage.getItem(Af)==="1"}catch{return!1}}function Sf(){return!!document.querySelector('meta[name="vb:no-track-history"]')}function xf(){try{let e=localStorage.getItem(fc);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function Cf(e){try{localStorage.setItem(fc,JSON.stringify(e))}catch{}}function kf(e){if(!e)return"";let t=e.slice(1);if(!t)return"";let i=null;try{i=document.getElementById(t)}catch{}return i&&(i.textContent||"").trim().slice(0,80)||t}function Un(){if(Ef()||Sf()||location.protocol==="file:"||location.protocol==="about:")return;let e=location.pathname+location.search,t=location.hash,i=(document.title||"").trim();if(!i)return;let s=kf(t),n=Date.now(),r=xf(),a=e+t;if((r[0]?r[0].url+(r[0].hash||""):"")===a)return;let c=r.filter(l=>l.url+(l.hash||"")!==a);c.unshift({url:e,hash:t,title:i,hashTitle:s,ts:n}),Cf(c.slice(0,100))}var Wn=typeof document<"u"?document.documentElement:null;Wn&&!Wn.hasAttribute("data-vb-recently-visited-init")&&(Wn.setAttribute("data-vb-recently-visited-init",""),Un(),window.addEventListener("pageshow",e=>{e.persisted&&Un()}),window.addEventListener("hashchange",Un));var Tf=CSS.supports("anchor-name","--test"),Lf=new Set(["BUTTON","A","AREA"]);function Mf(e){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?Lf.has(e.tagName):!1}function jn(e,t){if(Mf(e)){e.setAttribute("interestfor",t.id),t.addEventListener("toggle",l=>{l.newState==="open"&&ze(e,t)});return}let i=null,s=null,n=t,r=()=>{clearTimeout(s),i=setTimeout(()=>{n.showPopover(),ze(e,t)},200)},a=()=>{clearTimeout(i),s=setTimeout(()=>{n.hidePopover()},100)},o=()=>{clearTimeout(s),n.showPopover(),ze(e,t)},c=()=>{clearTimeout(i),n.hidePopover()};e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",a),e.addEventListener("focus",o),e.addEventListener("blur",c),t.addEventListener("mouseenter",()=>clearTimeout(s)),t.addEventListener("mouseleave",a)}function Yn(e,t){if(!Tf)return;let i=`--tooltip-anchor-${t.id}`;e.style.anchorName=i,t.style.positionAnchor=i,t.setAttribute("data-anchor","")}function Nf(e){let t=e.getAttribute("title");if(!t)return;e.removeAttribute("title");let i=document.createElement("div");i.setAttribute("role","tooltip"),i.setAttribute("popover","hint"),i.id=`tooltip-${crypto.randomUUID().slice(0,8)}`,i.textContent=t;let s=e.dataset.tooltipPosition||"top";i.dataset.tooltipPosition=s;let n=document.createElement("span");n.className="tooltip-arrow",n.setAttribute("aria-hidden","true"),i.appendChild(n),e.after(i),e.setAttribute("aria-describedby",i.id),Yn(e,i),jn(e,i)}function _f(e,t){let i=document.getElementById(t);i?.hasAttribute("popover")&&(e.hasAttribute("title")&&e.removeAttribute("title"),e.hasAttribute("aria-describedby")||e.setAttribute("aria-describedby",t),Yn(e,i),jn(e,i))}function pc(e=document){e.querySelectorAll("[data-tooltip]").forEach(t=>{if(t.closest("tool-tip")||t.hasAttribute("data-tooltip-init"))return;t.setAttribute("data-tooltip-init","");let i=t.dataset.tooltip;i?_f(t,i):Nf(t)}),e.querySelectorAll("[aria-describedby]").forEach(t=>{let i=t.getAttribute("aria-describedby")??"",s=document.getElementById(i);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||t.closest("tool-tip")||t.hasAttribute("data-tooltip-init")||(t.setAttribute("data-tooltip-init",""),Yn(t,s),jn(t,s))}),e.querySelectorAll("[popovertarget]").forEach(t=>{let i=t.getAttribute("popovertarget")??"",s=document.getElementById(i);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||s.hasAttribute("data-tooltip-click-init")||(s.setAttribute("data-tooltip-click-init",""),s.addEventListener("toggle",n=>{n.newState==="open"&&ze(t,s)}))})}function ze(e,t){if(t.hasAttribute("data-anchor"))return;let i=e.getBoundingClientRect(),s=t.dataset.tooltipPosition||"top",n=8,r=t.getBoundingClientRect(),a,o;switch(s){case"bottom":a=i.bottom+n,o=i.left+(i.width-r.width)/2;break;case"left":a=i.top+(i.height-r.height)/2,o=i.left-r.width-n;break;case"right":a=i.top+(i.height-r.height)/2,o=i.right+n;break;default:a=i.top-r.height-n,o=i.left+(i.width-r.width)/2;break}let c=8;o=Math.max(c,Math.min(o,window.innerWidth-r.width-c)),a=Math.max(c,Math.min(a,window.innerHeight-r.height-c)),t.style.top=`${a}px`,t.style.left=`${o}px`}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>pc()):pc();var Gn="[data-vt-name]";function Kn(e){e.hasAttribute("data-vt-name-init")||(e.setAttribute("data-vt-name-init",""),e.style.viewTransitionName=e.dataset.vtName)}function mc(e=document){e.querySelectorAll(Gn).forEach(Kn)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>mc()):mc();var Df=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Gn)&&Kn(s),s.querySelectorAll(Gn).forEach(Kn)}});Df.observe(document.documentElement,{childList:!0,subtree:!0});var Ve='progress[data-type="ring"]',bc={xs:"2em",s:"3em",m:"4em",l:"6em",xl:"8em"};function vc(e){let t=e.max||100,i=e.value;return t>0?Math.round(i/t*100):0}function yc(e){let t=vc(e);e.style.setProperty("--progress",String(t));let i=e.parentElement?.querySelector(".progress-ring-label");i&&!e.dataset.label&&(i.textContent=t+"%")}function Xn(e){if(e.hasAttribute("data-enhanced"))return;e.setAttribute("data-enhanced",""),yc(e);let t=e.dataset.label,i=t==="none",s=!e.hasAttribute("value");if(!i&&!s){let n=document.createElement("div");n.className="progress-ring-wrap";let r=e.dataset.size;r&&bc[r]&&n.style.setProperty("--progress-ring-size",bc[r]),e.parentNode?.insertBefore(n,e),n.appendChild(e);let a=document.createElement("span");a.className="progress-ring-label",a.textContent=t||vc(e)+"%",a.setAttribute("aria-hidden","true"),n.appendChild(a)}}function gc(e=document){e.querySelectorAll(Ve).forEach(t=>Xn(t))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>gc()):gc();var If=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Ve)&&Xn(s),s.querySelectorAll(Ve).forEach(n=>Xn(n))}if(t.type==="attributes"&&t.attributeName==="value"){let i=t.target;i.matches(Ve)&&i.hasAttribute("data-enhanced")&&yc(i)}}});If.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]});function wc(e){document.querySelectorAll("browser-window").forEach(t=>{t.setAttribute("mode",e)}),document.querySelectorAll("code-block").forEach(t=>{t.setAttribute("theme",e)})}function Ac(){let{effectiveMode:e}=x.getState();wc(e),window.addEventListener("vb:theme-change",i=>{wc(i.detail.effectiveMode)}),new MutationObserver(i=>{let{effectiveMode:s}=x.getState();for(let n of i)for(let r of n.addedNodes){if(r.nodeType!==Node.ELEMENT_NODE)continue;let a=r;a.tagName==="BROWSER-WINDOW"?a.setAttribute("mode",s):a.tagName==="CODE-BLOCK"&&a.setAttribute("theme",s),a.querySelectorAll("browser-window").forEach(o=>{o.setAttribute("mode",s)}),a.querySelectorAll("code-block").forEach(o=>{o.setAttribute("theme",s)})}}).observe(document.body,{childList:!0,subtree:!0})}var Mp=[{selector:"[data-wizard]",load:()=>Promise.resolve().then(()=>(xc(),Sc))},{selector:"[data-gesture]",load:()=>Promise.resolve().then(()=>(Oi(),Ii))},{selector:"[data-keyboard-aware]",load:()=>Promise.resolve().then(()=>(Tc(),kc))},{selector:"[data-focus-trap]",load:()=>Promise.resolve().then(()=>(Nc(),Mc))},{selector:"[data-scroll-hide]",load:()=>Promise.resolve().then(()=>(_c(),Pf))},{selector:"[data-spotlight]",load:()=>Promise.resolve().then(()=>(Oc(),Ic))},{selector:"[data-splitter]",load:()=>Promise.resolve().then(()=>(an(),Mo))},{selector:"[data-back-to-top]",load:()=>Promise.resolve().then(()=>(Bs(),vo))},{selector:"[data-hotkey]:not(kbd)",load:()=>Promise.resolve().then(()=>(Rc(),Fc))},{selector:'a[target="_blank"]',load:()=>Promise.resolve().then(()=>(Uc(),Vc))},{selector:"[data-watch-page], watch-wc",load:()=>Promise.resolve().then(()=>(vs(),gs))},{selector:"img[data-responsive]",load:()=>Promise.resolve().then(()=>(Gc(),Yc))},{selector:"form-field[data-floating-label]",load:()=>Promise.resolve().then(()=>(Zc(),Jc))},{selector:"button[data-loading]",load:()=>Promise.resolve().then(()=>(el(),tl))},{selector:"input[data-mask]",load:()=>Promise.resolve().then(()=>(Tn(),Jo))},{selector:"input[data-accept]",load:()=>Promise.resolve().then(()=>(Ln(),tc))},{selector:'input[type="file"][data-upload]',load:()=>Promise.resolve().then(()=>(An(),Vo))},{selector:'input[type="range"][data-range]',load:()=>Promise.resolve().then(()=>(gn(),zo))},{selector:'input[type="number"][data-stepper]',load:()=>Promise.resolve().then(()=>(In(),nc))},{selector:'input[type="checkbox"][data-switch]',load:()=>Promise.resolve().then(()=>(dn(),No))},{selector:"textarea[data-grow]",load:()=>Promise.resolve().then(()=>(fn(),$o))},{selector:"textarea[data-count]",load:()=>Promise.resolve().then(()=>(hn(),Io))},{selector:"fieldset[data-toggle-tags][data-max]",load:()=>Promise.resolve().then(()=>(Dn(),ec))},{selector:"form[data-autosave]",load:()=>Promise.resolve().then(()=>(kn(),Wo))},{selector:"form[data-vb-email-form]",load:()=>Promise.resolve().then(()=>(nl(),sl))},{selector:"form[data-vb-newsletter-form]",load:()=>Promise.resolve().then(()=>(ul(),dl))},{selector:"[data-copy], [data-copy-target], [data-paste-target]",load:()=>Promise.resolve().then(()=>(_t(),na))},{selector:"[data-select-all]",load:()=>Promise.resolve().then(()=>(Fn(),dc))},{selector:"[data-show-when], [data-hide-when]",load:()=>Promise.resolve().then(()=>(bn(),Fo))},{selector:"[data-spoiler]",load:()=>Promise.resolve().then(()=>(en(),Lo))},{selector:"[data-math], code.language-math",load:()=>Promise.resolve().then(()=>(Vn(),hc))},{selector:"time[data-format-date]",load:()=>Promise.resolve().then(()=>(js(),xo))},{selector:"data[data-format-number]",load:()=>Promise.resolve().then(()=>(Vs(),wo))},{selector:"data[data-format-bytes]",load:()=>Promise.resolve().then(()=>(Js(),Co))},{selector:"[data-paged]",load:()=>Promise.resolve().then(()=>(wl(),yl))},{selector:"[data-sortable], [data-sort-target]",load:()=>Promise.resolve().then(()=>(Nl(),Ml))},{selector:"[data-toggle]",load:()=>Promise.resolve().then(()=>(Pl(),Bl))}];function Np(e,t=document){for(let i of e)t.querySelector(i.selector)&&i.load()}function Fl(e=document){Np(Mp,e)}Bt();function te(e){return[...e.querySelectorAll("input, select, textarea")].filter(t=>t.type!=="submit"&&t.type!=="button"&&t.type!=="hidden"&&!("honeypot"in t.dataset))}function zl(e){return[...e.querySelectorAll("form-field[data-upgraded]")]}function _p(e){return e.labels?.[0]?.textContent?.trim()??e.getAttribute("aria-label")??e.name??e.id}function Qt(e,t){let i=e.dataset.match;if(!i)return;let s=t.querySelector(`#${CSS.escape(i)}`)??t.querySelector(`[name="${CSS.escape(i)}"]`);if(s){if(e.setCustomValidity(""),e.value&&s.value&&e.value!==s.value){let n=e.dataset.messageMatch??"Values do not match";e.setCustomValidity(n);let r=Rl(e);r&&(r.textContent=n)}else if(e.validity.valid){let n=Rl(e);n&&(n.textContent="")}}}function Rl(e){let t=e.getAttribute("aria-describedby")?.split(/\s+/)??[];for(let s of t){let n=document.getElementById(s);if(n?.tagName==="OUTPUT"&&n.classList.contains("error"))return n}return e.closest("form-field")?.querySelector("output.error")??null}function Hl(e){let i=[...e.querySelectorAll('input[type="checkbox"]')].filter(o=>o.checked).length,s=parseInt(e.dataset.minChecked??"0",10),n=parseInt(e.dataset.maxChecked??"999",10),r=e.querySelector(":scope > output"),a=null;return i<s&&(a=e.dataset.messageMinChecked??`Select at least ${s}`),i>n&&(a=e.dataset.messageMaxChecked??`Select no more than ${n}`),r&&(r.textContent=a??""),a?e.dataset.invalid="":delete e.dataset.invalid,!a}function Vl(e){let t=e.querySelector("[data-form-summary]");if(t)return{el:t,type:"authored"};let i=e.querySelector("output.error-summary");return i?{el:i,type:"legacy"}:null}function Je(e,t,{focus:i=!1}={}){if(!t)return;let s=[];for(let n of te(e))n.validity.valid||s.push({id:n.id||n.name,label:_p(n),message:n.validationMessage});for(let n of e.querySelectorAll("fieldset[data-invalid]")){let r=n.querySelector(":scope > output");s.push({id:n.id||"",label:n.querySelector("legend")?.textContent?.trim()??"Group",message:r?.textContent||"Invalid selection"})}if(s.length===0){Ul(t);return}if(t.type==="authored"){let n=t.el.querySelector("[data-summary-list]");if(n){n.innerHTML="";for(let r of s){let a=document.createElement("li"),o=document.createElement("a");o.href=r.id?`#${r.id}`:"#",o.textContent=`${r.label}: ${r.message}`,a.appendChild(o),n.appendChild(a)}}t.el.removeAttribute("hidden"),t.el.dataset.visible=""}else{let n=s.length,r=s.map(a=>`<li><a href="${a.id?`#${a.id}`:"#"}">${a.label}: ${a.message}</a></li>`).join(`
589
587
  `);t.el.innerHTML=`<p>Please fix ${n} error${n===1?"":"s"}:</p>
590
588
  <ul>
591
589
  ${r}
592
- </ul>`}i&&t.el.focus()}function gl(e){if(e)if(e.type==="authored"){delete e.el.dataset.visible;let t=e.el.querySelector("[data-summary-list]");t&&e.el.addEventListener("transitionend",()=>{e.el.dataset.visible||(t.innerHTML="")},{once:!0})}else e.el.innerHTML=""}function Ff(e){e&&e.el.addEventListener("click",t=>{let i=t.target.closest('a[href^="#"]');if(!i)return;t.preventDefault();let s=i.getAttribute("href").slice(1),n=document.getElementById(s);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus())})}function Rf(e){for(let t of Jt(e))t.focus({preventScroll:!0}),t.blur()}async function Hf(e){let t=e.querySelector('[type="submit"]');e.dataset.submitting="",delete e.dataset.error,t&&t.setAttribute("aria-disabled","true");try{let i=new FormData(e),s=await fetch(e.action,{method:e.method||"post",body:i});if(delete e.dataset.submitting,t&&t.removeAttribute("aria-disabled"),!s.ok){if((s.headers.get("content-type")??"").includes("application/json")){let a=await s.json();if(a.errors){zf(e,a.errors);return}}throw new Error(`Server error: ${s.status}`)}e.dataset.success="";let n=e.querySelector("[data-form-success]");n&&(n.hidden=!1,n.focus())}catch{delete e.dataset.submitting,t&&t.removeAttribute("aria-disabled"),e.dataset.error="network"}}function zf(e,t){e.dataset.error="";let i=ml(e),s=[];for(let n of i){let r=n.querySelector("input, textarea, select");if(!r)continue;let a=t[r.name];a&&(n.setError(a),s.push(n))}if(s.length>0){let n=bl(e);He(e,n,{focus:!0})}for(let n of i)n.querySelector("input, textarea, select")?.addEventListener("input",()=>n.clearError(),{once:!0})}function sr(e){if(e.hasAttribute("data-vb-enhanced"))return;e.setAttribute("novalidate",""),e.setAttribute("data-vb-enhanced","");let t=bl(e);t&&Ff(t);for(let i of Jt(e))if(i.dataset.match){i.addEventListener("input",()=>Xt(i,e)),i.addEventListener("blur",()=>Xt(i,e));let s=i.dataset.match,n=e.querySelector(`#${CSS.escape(s)}`)??e.querySelector(`[name="${CSS.escape(s)}"]`);n&&n.addEventListener("input",()=>Xt(i,e))}for(let i of e.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))i.addEventListener("change",()=>{pl(i),t&&He(e,t)});e.addEventListener("submit",i=>{i.preventDefault();let s=ml(e);for(let o of s)o.validate();for(let o of Jt(e))o.dataset.match&&Xt(o,e);for(let o of e.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))pl(o);if(Rf(e),!(e.checkValidity()&&![...e.querySelectorAll("fieldset[data-invalid]")].length)){if(t)He(e,t,{focus:!0});else{let o=e.querySelector(":invalid");o&&(o.scrollIntoView({behavior:"smooth",block:"center"}),o.focus())}return}gl(t);let r=new CustomEvent("vb:beforesubmit",{bubbles:!0,cancelable:!0,detail:{form:e}});if(e.dispatchEvent(r),r.defaultPrevented)return;let a=e.dataset.submit??"native";if(a==="fetch")Hf(e);else if(a==="event"){let o=new CustomEvent("vb:submit",{bubbles:!0,cancelable:!0,detail:new FormData(e)});e.dispatchEvent(o)}else e.submit()}),t&&e.addEventListener("input",()=>{requestAnimationFrame(()=>{for(let i of Jt(e))i.dataset.match&&Xt(i,e);He(e,t)})})}function vl(){for(let t of document.querySelectorAll("form[data-validate]"))sr(t);new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-validate]")&&sr(n),n.querySelectorAll?.("form[data-validate]").forEach(r=>sr(r))}}).observe(document.body,{childList:!0,subtree:!0})}var yl='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>',Vf='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/></svg>';function nr(e){let t=e.querySelector('input[type="password"]');if(!t||e.dataset.enhanced==="password")return;e.dataset.enhanced="password";let i=document.createElement("div");i.className="password-wrapper",t.parentNode.insertBefore(i,t),i.appendChild(t);let s=document.createElement("button");s.type="button",s.className="password-toggle",s.setAttribute("aria-label","Show password"),s.setAttribute("aria-pressed","false"),s.innerHTML=yl,i.appendChild(s),s.addEventListener("click",()=>{let n=t.type==="password";t.type=n?"text":"password",s.setAttribute("aria-pressed",String(n)),s.setAttribute("aria-label",n?"Hide password":"Show password"),s.innerHTML=n?Vf:yl})}function rr(e){let t=e.querySelector('input[data-type="otp"], input[data-type="pin"]');if(!t||e.dataset.enhanced==="otp")return;e.dataset.enhanced="otp";let i=parseInt(t.dataset.length||"6",10);t.type="hidden",t.removeAttribute("inputmode"),t.removeAttribute("pattern");let s=document.createElement("div");s.className="otp-wrapper",t.parentNode.insertBefore(s,t.nextSibling);let n=[];for(let a=0;a<i;a++){let o=document.createElement("input");o.type="text",o.inputMode="numeric",o.maxLength=1,o.pattern="[0-9]",o.className="otp-digit",o.setAttribute("aria-label",`Digit ${a+1} of ${i}`),n.push(o),s.appendChild(o)}function r(){t.value=n.map(a=>a.value).join(""),t.dispatchEvent(new Event("input",{bubbles:!0}))}n.forEach((a,o)=>{a.addEventListener("input",c=>{let d=c.target.value;if(d&&!/^\d$/.test(d)){c.target.value="";return}d&&o<n.length-1&&n[o+1].focus(),r()}),a.addEventListener("keydown",c=>{c.key==="Backspace"&&!c.target.value&&o>0&&n[o-1].focus(),c.key==="ArrowLeft"&&o>0&&(c.preventDefault(),n[o-1].focus()),c.key==="ArrowRight"&&o<n.length-1&&(c.preventDefault(),n[o+1].focus())}),a.addEventListener("paste",c=>{c.preventDefault();let l=((c.clipboardData||window.clipboardData)?.getData("text")??"").replace(/\D/g,"").slice(0,i).split("");l.forEach((h,f)=>{n[f]&&(n[f].value=h)});let u=n.findIndex(h=>!h.value);u!==-1?n[u].focus():l.length>0&&n[Math.min(l.length-1,i-1)].focus(),r()}),a.addEventListener("focus",()=>{a.select()})}),e.addEventListener("click",a=>{a.target===e&&n[0].focus()})}function ar(e){let t=e.querySelector("input[data-strength]");if(!t||e.dataset.enhanced==="strength")return;e.dataset.enhanced="strength";let i=t.dataset.rules||"length:8",s=Uf(i),n=document.createElement("div");n.className="strength-meter";let r=document.createElement("meter");r.min=0,r.max=s.length,r.low=Math.ceil(s.length*.4),r.high=Math.ceil(s.length*.75),r.optimum=s.length,r.value=0,r.className="xs";let a=document.createElement("span");a.className="strength-label",a.textContent="",n.appendChild(r),n.appendChild(a);let o=document.createElement("ul");o.className="strength-rules",o.setAttribute("aria-label","Password requirements"),s.forEach(d=>{let l=document.createElement("li");l.dataset.rule=d.type,l.textContent=d.label,o.appendChild(l)}),(e.querySelector(".password-wrapper")||t).insertAdjacentElement("afterend",n),n.insertAdjacentElement("afterend",o),t.addEventListener("input",()=>{let d=t.value,l=0;s.forEach((h,f)=>{let v=Wf(h,d),p=o.children[f];p.dataset.met=v?"":void 0,v?(p.setAttribute("data-met",""),l++):p.removeAttribute("data-met")}),r.value=l;let u=l/s.length;d.length===0?(a.textContent="",n.dataset.level=""):u<.4?(a.textContent="Weak",n.dataset.level="weak"):u<.75?(a.textContent="Fair",n.dataset.level="fair"):u<1?(a.textContent="Good",n.dataset.level="good"):(a.textContent="Strong",n.dataset.level="strong")})}function Uf(e){return e.split(",").map(t=>{let[i,s]=t.trim().split(":");switch(i){case"length":return{type:i,param:parseInt(s)||8,label:`At least ${s||8} characters`};case"uppercase":return{type:i,label:"One uppercase letter"};case"lowercase":return{type:i,label:"One lowercase letter"};case"number":return{type:i,label:"One number"};case"special":return{type:i,label:"One special character"};default:return{type:i,label:i}}})}function Wf(e,t){switch(e.type){case"length":return t.length>=(e.param||8);case"uppercase":return/[A-Z]/.test(t);case"lowercase":return/[a-z]/.test(t);case"number":return/\d/.test(t);case"special":return/[^A-Za-z0-9]/.test(t);default:return!1}}function jf(){document.querySelectorAll('form-field:has(input[type="password"])').forEach(nr)}function Yf(){document.querySelectorAll('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])').forEach(rr)}function Gf(){document.querySelectorAll("form-field:has(input[data-strength])").forEach(ar)}function wl(){jf(),Yf(),Gf(),new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.('form-field:has(input[type="password"])')&&nr(n),(n.matches?.('form-field:has(input[data-type="otp"])')||n.matches?.('form-field:has(input[data-type="pin"])'))&&rr(n),n.matches?.("form-field:has(input[data-strength])")&&ar(n),n.querySelectorAll?.('form-field:has(input[type="password"])')?.forEach(nr),n.querySelectorAll?.('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])')?.forEach(rr),n.querySelectorAll?.("form-field:has(input[data-strength])")?.forEach(ar)}}).observe(document.body,{childList:!0,subtree:!0})}function Kf(e){let t=Date.now(),i=e*7+t%9973&65535;return btoa(JSON.stringify({s:e,t,c:i}))}function Xf(e,t,i){let s=0,n=e.submitAt-(e.firstInteractionAt??e.submitAt),r=t.querySelector("[data-honeypot]");return r&&r.value.trim()&&(s+=80),[...t.querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], textarea')].filter(o=>o.value.trim()&&!("honeypot"in o.dataset)).length>0&&e.keyboardEventCount===0&&(s+=30),e.fieldFocusCount===0&&(s+=40),!i&&!e.mouseMovedInForm&&(s+=20),n<1e3?s+=80:n<3e3&&(s+=50),Math.min(s,100)}function Jf(e){return new Promise((t,i)=>{let s=document.createElement("script");s.src=e,s.async=!0,s.onload=t,s.onerror=i,document.head.appendChild(s)})}async function Zf(e,t){if(!document.querySelector("[data-cf-turnstile-loaded]"))try{await Jf("https://challenges.cloudflare.com/turnstile/v0/api.js"),document.head.dataset.cfTurnstileLoaded="";let i=document.createElement("div");i.className="cf-turnstile",i.dataset.sitekey=t,i.dataset.size="invisible",e.appendChild(i)}catch{}}function or(e){if(e.hasAttribute("data-bot-enhanced"))return;e.setAttribute("data-bot-enhanced","");let t={fieldFocusCount:0,keyboardEventCount:0,mouseMovedInForm:!1,firstInteractionAt:null,submitAt:null},i=navigator.maxTouchPoints>0;e.addEventListener("focusin",s=>{s.target.matches("input, textarea, select")&&!("honeypot"in s.target.dataset)&&(t.fieldFocusCount++,t.firstInteractionAt??=Date.now())},{capture:!0}),e.addEventListener("keydown",s=>{s.target.matches("input, textarea")&&t.keyboardEventCount++},{capture:!0}),i||e.addEventListener("mousemove",()=>{t.mouseMovedInForm=!0},{once:!0}),e.addEventListener("vb:beforesubmit",s=>{t.submitAt=Date.now();let n=Xf(t,e,i),r=e.querySelector("[data-bot-score-field]");if(r||(r=document.createElement("input"),r.type="hidden",r.name="_vb_score",r.dataset.botScoreField="",e.appendChild(r)),r.value=Kf(n),n>=80){s.preventDefault(),e.dispatchEvent(new CustomEvent("vb:botblocked",{bubbles:!0,detail:{score:n}}));return}n>=60&&e.dataset.turnstileSitekey&&Zf(e,e.dataset.turnstileSitekey)})}function El(){for(let t of document.querySelectorAll("form[data-bot-protection]"))or(t);new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-bot-protection]")&&or(n),n.querySelectorAll?.("form[data-bot-protection]").forEach(r=>or(r))}}).observe(document.body,{childList:!0,subtree:!0})}ht();ht();var lp=1e3,Ll=new Map;function dr(e,t){return i=>{let s=JSON.stringify(i.detail??null),n=Ll.get(e),r=Date.now();n&&n.key===s&&r-n.at<lp||(Ll.set(e,{key:s,at:r}),t(i))}}var dp={"vb:submit":e=>E.track("form.submit_valid",{formId:e.detail?.formId}),"wizard:step-change":e=>E.track("form.wizard_step",{from:e.detail?.from,to:e.detail?.to,direction:e.detail?.direction}),"wizard:complete":e=>E.track("form.wizard_complete",{steps:e.detail?.steps}),"wizard:reset":()=>E.track("form.wizard_reset"),"data-table:sort":e=>E.track("table.sort",{column:e.detail?.column,direction:e.detail?.direction,columnName:e.detail?.columnName}),"data-table:filter":e=>E.track("table.filter",{column:e.detail?.column,hasValue:!!e.detail?.value,length:e.detail?.value?.length??0}),"data-table:page":e=>E.track("table.paginate",{page:e.detail?.page}),"vb:theme-change":dr("vb:theme-change",e=>E.track("ui.theme_change",{theme:e.detail?.brand??e.detail?.theme,mode:e.detail?.mode})),"vb:a11y-themes-change":dr("vb:a11y-themes-change",e=>E.track("ui.a11y_theme",{themes:e.detail})),"vb:extensions-change":dr("vb:extensions-change",e=>E.track("ui.extension_toggle",{extensions:e.detail})),"heading-links:navigate":e=>E.track("docs.anchor_navigate",{id:e.detail?.id}),"page-toc:navigate":e=>E.track("docs.toc_navigate",{id:e.detail?.id}),"site-search:open":()=>E.track("search.open"),"site-search:close":e=>E.track("search.close",{hasQuery:e.detail?.hasQuery}),"theme-composer:change":e=>E.track("theme.compose",{dimension:e.detail?.dimension,source:e.detail?.source,token:e.detail?.token})},up={"accordion-wc:toggle":e=>E.track("ui.accordion_toggle",{open:e.detail?.open,index:e.detail?.index}),"tab-set:change":e=>E.track("ui.tab_change",{tab:e.detail?.tab}),"carousel-wc:change":e=>E.track("ui.carousel_slide",{index:e.detail?.index}),"carousel-wc:play":()=>E.track("ui.carousel_play"),"carousel-wc:pause":()=>E.track("ui.carousel_pause"),"data-table:expand":e=>E.track("table.row_expand",{row:e.detail?.row}),"data-table:selection":e=>E.track("table.row_select",{count:e.detail?.count??e.detail?.rows?.length??0}),"theme-picker:open":()=>E.track("ui.theme_picker_open"),"theme-picker:close":()=>E.track("ui.theme_picker_close"),"color-palette:select":e=>E.track("palette.color_select",{name:e.detail?.name,index:e.detail?.index}),"color-palette:change":e=>E.track("palette.color_edit",{name:e.detail?.name,index:e.detail?.index}),"semantic-palette:change":e=>E.track("palette.semantic_change",{role:e.detail?.role}),"token-specimen:change":e=>E.track("tokens.edit",{token:e.detail?.token}),"spacing-specimen:change":e=>E.track("tokens.spacing_edit",{token:e.detail?.token}),"type-specimen:change":e=>E.track("tokens.type_edit",{token:e.detail?.token}),"theme-export:change":e=>E.track("theme.export_format",{format:e.detail?.format})};function Nl(e){for(let[t,i]of Object.entries(e))(t.startsWith("vb:theme-change")||t==="vb:a11y-themes-change"||t==="vb:extensions-change"?window:document).addEventListener(t,i)}function Ml({tiers:e=["tier1","tier2"]}={}){e.includes("tier1")&&Nl(dp),e.includes("tier2")&&Nl(up)}ht();await x.init();document.documentElement.hasAttribute("data-sticky")&&ji();Go();vl();wl();El();E.init({siteId:globalThis.vbAnalyticsConfig?.siteId??"vb-docs",transport:globalThis.vbAnalyticsConfig?.transport??"console",endpoint:globalThis.vbAnalyticsConfig?.endpoint??"/api/analytics"});Ml();Promise.resolve().then(()=>Dl());Promise.resolve().then(()=>Ol());Promise.resolve().then(()=>Hl());hl();export{E as Analytics};
590
+ </ul>`}i&&t.el.focus()}function Ul(e){if(e)if(e.type==="authored"){delete e.el.dataset.visible;let t=e.el.querySelector("[data-summary-list]");t&&e.el.addEventListener("transitionend",()=>{e.el.dataset.visible||(t.innerHTML="")},{once:!0})}else e.el.innerHTML=""}function Dp(e){e&&e.el.addEventListener("click",t=>{let i=t.target.closest('a[href^="#"]');if(!i)return;t.preventDefault();let s=i.getAttribute("href").slice(1),n=document.getElementById(s);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus())})}function Ip(e){for(let t of te(e))t.focus({preventScroll:!0}),t.blur()}async function Op(e){let t=e.querySelector('[type="submit"]');e.dataset.submitting="",delete e.dataset.error,t&&t.setAttribute("aria-disabled","true");try{let i=new FormData(e),s=await fetch(e.action,{method:e.method||"post",body:i});if(delete e.dataset.submitting,t&&t.removeAttribute("aria-disabled"),!s.ok){if((s.headers.get("content-type")??"").includes("application/json")){let a=await s.json();if(a.errors){qp(e,a.errors);return}}throw new Error(`Server error: ${s.status}`)}e.dataset.success="";let n=e.querySelector("[data-form-success]");n&&(n.hidden=!1,n.focus())}catch{delete e.dataset.submitting,t&&t.removeAttribute("aria-disabled"),e.dataset.error="network"}}function qp(e,t){e.dataset.error="";let i=zl(e),s=[];for(let n of i){let r=n.querySelector("input, textarea, select");if(!r)continue;let a=t[r.name];a&&(n.setError(a),s.push(n))}if(s.length>0){let n=Vl(e);Je(e,n,{focus:!0})}for(let n of i)n.querySelector("input, textarea, select")?.addEventListener("input",()=>n.clearError(),{once:!0})}function yr(e){if(e.hasAttribute("data-vb-enhanced"))return;e.setAttribute("novalidate",""),e.setAttribute("data-vb-enhanced","");let t=Vl(e);t&&Dp(t);for(let i of te(e))if(i.dataset.match){i.addEventListener("input",()=>Qt(i,e)),i.addEventListener("blur",()=>Qt(i,e));let s=i.dataset.match,n=e.querySelector(`#${CSS.escape(s)}`)??e.querySelector(`[name="${CSS.escape(s)}"]`);n&&n.addEventListener("input",()=>Qt(i,e))}for(let i of e.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))i.addEventListener("change",()=>{Hl(i),t&&Je(e,t)});e.addEventListener("submit",i=>{i.preventDefault();let s=zl(e);for(let o of s)o.validate();for(let o of te(e))o.dataset.match&&Qt(o,e);for(let o of e.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))Hl(o);if(Ip(e),!(e.checkValidity()&&![...e.querySelectorAll("fieldset[data-invalid]")].length)){if(t)Je(e,t,{focus:!0});else{let o=e.querySelector(":invalid");o&&(o.scrollIntoView({behavior:"smooth",block:"center"}),o.focus())}return}Ul(t);let r=new CustomEvent("vb:beforesubmit",{bubbles:!0,cancelable:!0,detail:{form:e}});if(e.dispatchEvent(r),r.defaultPrevented)return;let a=e.dataset.submit??"native";if(a==="fetch")Op(e);else if(a==="event"){let o=new CustomEvent("vb:submit",{bubbles:!0,cancelable:!0,detail:new FormData(e)});e.dispatchEvent(o)}else e.submit()}),t&&e.addEventListener("input",()=>{requestAnimationFrame(()=>{for(let i of te(e))i.dataset.match&&Qt(i,e);Je(e,t)})})}function Wl(){for(let t of document.querySelectorAll("form[data-validate]"))yr(t);new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-validate]")&&yr(n),n.querySelectorAll?.("form[data-validate]").forEach(r=>yr(r))}}).observe(document.body,{childList:!0,subtree:!0})}var jl='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>',$p='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/></svg>';function wr(e){let t=e.querySelector('input[type="password"]');if(!t||e.dataset.enhanced==="password")return;e.dataset.enhanced="password";let i=document.createElement("div");i.className="password-wrapper",t.parentNode.insertBefore(i,t),i.appendChild(t);let s=document.createElement("button");s.type="button",s.className="password-toggle",s.setAttribute("aria-label","Show password"),s.setAttribute("aria-pressed","false"),s.innerHTML=jl,i.appendChild(s),s.addEventListener("click",()=>{let n=t.type==="password";t.type=n?"text":"password",s.setAttribute("aria-pressed",String(n)),s.setAttribute("aria-label",n?"Hide password":"Show password"),s.innerHTML=n?$p:jl})}function Ar(e){let t=e.querySelector('input[data-type="otp"], input[data-type="pin"]');if(!t||e.dataset.enhanced==="otp")return;e.dataset.enhanced="otp";let i=parseInt(t.dataset.length||"6",10);t.type="hidden",t.removeAttribute("inputmode"),t.removeAttribute("pattern");let s=document.createElement("div");s.className="otp-wrapper",t.parentNode.insertBefore(s,t.nextSibling);let n=[];for(let a=0;a<i;a++){let o=document.createElement("input");o.type="text",o.inputMode="numeric",o.maxLength=1,o.pattern="[0-9]",o.className="otp-digit",o.setAttribute("aria-label",`Digit ${a+1} of ${i}`),n.push(o),s.appendChild(o)}function r(){t.value=n.map(a=>a.value).join(""),t.dispatchEvent(new Event("input",{bubbles:!0}))}n.forEach((a,o)=>{a.addEventListener("input",c=>{let l=c.target.value;if(l&&!/^\d$/.test(l)){c.target.value="";return}l&&o<n.length-1&&n[o+1].focus(),r()}),a.addEventListener("keydown",c=>{c.key==="Backspace"&&!c.target.value&&o>0&&n[o-1].focus(),c.key==="ArrowLeft"&&o>0&&(c.preventDefault(),n[o-1].focus()),c.key==="ArrowRight"&&o<n.length-1&&(c.preventDefault(),n[o+1].focus())}),a.addEventListener("paste",c=>{c.preventDefault();let d=((c.clipboardData||window.clipboardData)?.getData("text")??"").replace(/\D/g,"").slice(0,i).split("");d.forEach((h,f)=>{n[f]&&(n[f].value=h)});let u=n.findIndex(h=>!h.value);u!==-1?n[u].focus():d.length>0&&n[Math.min(d.length-1,i-1)].focus(),r()}),a.addEventListener("focus",()=>{a.select()})}),e.addEventListener("click",a=>{a.target===e&&n[0].focus()})}function Er(e){let t=e.querySelector("input[data-strength]");if(!t||e.dataset.enhanced==="strength")return;e.dataset.enhanced="strength";let i=t.dataset.rules||"length:8",s=Bp(i),n=document.createElement("div");n.className="strength-meter";let r=document.createElement("meter");r.min=0,r.max=s.length,r.low=Math.ceil(s.length*.4),r.high=Math.ceil(s.length*.75),r.optimum=s.length,r.value=0,r.className="xs";let a=document.createElement("span");a.className="strength-label",a.textContent="",n.appendChild(r),n.appendChild(a);let o=document.createElement("ul");o.className="strength-rules",o.setAttribute("aria-label","Password requirements"),s.forEach(l=>{let d=document.createElement("li");d.dataset.rule=l.type,d.textContent=l.label,o.appendChild(d)}),(e.querySelector(".password-wrapper")||t).insertAdjacentElement("afterend",n),n.insertAdjacentElement("afterend",o),t.addEventListener("input",()=>{let l=t.value,d=0;s.forEach((h,f)=>{let g=Pp(h,l),p=o.children[f];p.dataset.met=g?"":void 0,g?(p.setAttribute("data-met",""),d++):p.removeAttribute("data-met")}),r.value=d;let u=d/s.length;l.length===0?(a.textContent="",n.dataset.level=""):u<.4?(a.textContent="Weak",n.dataset.level="weak"):u<.75?(a.textContent="Fair",n.dataset.level="fair"):u<1?(a.textContent="Good",n.dataset.level="good"):(a.textContent="Strong",n.dataset.level="strong")})}function Bp(e){return e.split(",").map(t=>{let[i,s]=t.trim().split(":");switch(i){case"length":return{type:i,param:parseInt(s)||8,label:`At least ${s||8} characters`};case"uppercase":return{type:i,label:"One uppercase letter"};case"lowercase":return{type:i,label:"One lowercase letter"};case"number":return{type:i,label:"One number"};case"special":return{type:i,label:"One special character"};default:return{type:i,label:i}}})}function Pp(e,t){switch(e.type){case"length":return t.length>=(e.param||8);case"uppercase":return/[A-Z]/.test(t);case"lowercase":return/[a-z]/.test(t);case"number":return/\d/.test(t);case"special":return/[^A-Za-z0-9]/.test(t);default:return!1}}function Fp(){document.querySelectorAll('form-field:has(input[type="password"])').forEach(wr)}function Rp(){document.querySelectorAll('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])').forEach(Ar)}function Hp(){document.querySelectorAll("form-field:has(input[data-strength])").forEach(Er)}function Yl(){Fp(),Rp(),Hp(),new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.('form-field:has(input[type="password"])')&&wr(n),(n.matches?.('form-field:has(input[data-type="otp"])')||n.matches?.('form-field:has(input[data-type="pin"])'))&&Ar(n),n.matches?.("form-field:has(input[data-strength])")&&Er(n),n.querySelectorAll?.('form-field:has(input[type="password"])')?.forEach(wr),n.querySelectorAll?.('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])')?.forEach(Ar),n.querySelectorAll?.("form-field:has(input[data-strength])")?.forEach(Er)}}).observe(document.body,{childList:!0,subtree:!0})}function zp(e){let t=Date.now(),i=e*7+t%9973&65535;return btoa(JSON.stringify({s:e,t,c:i}))}function Vp(e,t,i){let s=0,n=e.submitAt-(e.firstInteractionAt??e.submitAt),r=t.querySelector("[data-honeypot]");return r&&r.value.trim()&&(s+=80),[...t.querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], textarea')].filter(o=>o.value.trim()&&!("honeypot"in o.dataset)).length>0&&e.keyboardEventCount===0&&(s+=30),e.fieldFocusCount===0&&(s+=40),!i&&!e.mouseMovedInForm&&(s+=20),n<1e3?s+=80:n<3e3&&(s+=50),Math.min(s,100)}function Up(e){return new Promise((t,i)=>{let s=document.createElement("script");s.src=e,s.async=!0,s.onload=t,s.onerror=i,document.head.appendChild(s)})}async function Wp(e,t){if(!document.querySelector("[data-cf-turnstile-loaded]"))try{await Up("https://challenges.cloudflare.com/turnstile/v0/api.js"),document.head.dataset.cfTurnstileLoaded="";let i=document.createElement("div");i.className="cf-turnstile",i.dataset.sitekey=t,i.dataset.size="invisible",e.appendChild(i)}catch{}}function Sr(e){if(e.hasAttribute("data-bot-enhanced"))return;e.setAttribute("data-bot-enhanced","");let t={fieldFocusCount:0,keyboardEventCount:0,mouseMovedInForm:!1,firstInteractionAt:null,submitAt:null},i=navigator.maxTouchPoints>0;e.addEventListener("focusin",s=>{s.target.matches("input, textarea, select")&&!("honeypot"in s.target.dataset)&&(t.fieldFocusCount++,t.firstInteractionAt??=Date.now())},{capture:!0}),e.addEventListener("keydown",s=>{s.target.matches("input, textarea")&&t.keyboardEventCount++},{capture:!0}),i||e.addEventListener("mousemove",()=>{t.mouseMovedInForm=!0},{once:!0}),e.addEventListener("vb:beforesubmit",s=>{t.submitAt=Date.now();let n=Vp(t,e,i),r=e.querySelector("[data-bot-score-field]");if(r||(r=document.createElement("input"),r.type="hidden",r.name="_vb_score",r.dataset.botScoreField="",e.appendChild(r)),r.value=zp(n),n>=80){s.preventDefault(),e.dispatchEvent(new CustomEvent("vb:botblocked",{bubbles:!0,detail:{score:n}}));return}n>=60&&e.dataset.turnstileSitekey&&Wp(e,e.dataset.turnstileSitekey)})}function Gl(){for(let t of document.querySelectorAll("form[data-bot-protection]"))Sr(t);new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-bot-protection]")&&Sr(n),n.querySelectorAll?.("form[data-bot-protection]").forEach(r=>Sr(r))}}).observe(document.body,{childList:!0,subtree:!0})}et();et();var jp=1e3,Kl=new Map;function xr(e,t){return i=>{let s=JSON.stringify(i.detail??null),n=Kl.get(e),r=Date.now();n&&n.key===s&&r-n.at<jp||(Kl.set(e,{key:s,at:r}),t(i))}}var Yp={"vb:submit":e=>A.track("form.submit_valid",{formId:e.detail?.formId}),"wizard:step-change":e=>A.track("form.wizard_step",{from:e.detail?.from,to:e.detail?.to,direction:e.detail?.direction}),"wizard:complete":e=>A.track("form.wizard_complete",{steps:e.detail?.steps}),"wizard:reset":()=>A.track("form.wizard_reset"),"data-table:sort":e=>A.track("table.sort",{column:e.detail?.column,direction:e.detail?.direction,columnName:e.detail?.columnName}),"data-table:filter":e=>A.track("table.filter",{column:e.detail?.column,hasValue:!!e.detail?.value,length:e.detail?.value?.length??0}),"data-table:page":e=>A.track("table.paginate",{page:e.detail?.page}),"vb:theme-change":xr("vb:theme-change",e=>A.track("ui.theme_change",{theme:e.detail?.brand??e.detail?.theme,mode:e.detail?.mode})),"vb:a11y-themes-change":xr("vb:a11y-themes-change",e=>A.track("ui.a11y_theme",{themes:e.detail})),"vb:extensions-change":xr("vb:extensions-change",e=>A.track("ui.extension_toggle",{extensions:e.detail})),"heading-links:navigate":e=>A.track("docs.anchor_navigate",{id:e.detail?.id}),"page-toc:navigate":e=>A.track("docs.toc_navigate",{id:e.detail?.id}),"site-search:open":()=>A.track("search.open"),"site-search:close":e=>A.track("search.close",{hasQuery:e.detail?.hasQuery}),"theme-composer:change":e=>A.track("theme.compose",{dimension:e.detail?.dimension,source:e.detail?.source,token:e.detail?.token})},Gp={"accordion-wc:toggle":e=>A.track("ui.accordion_toggle",{open:e.detail?.open,index:e.detail?.index}),"tab-set:change":e=>A.track("ui.tab_change",{tab:e.detail?.tab}),"carousel-wc:change":e=>A.track("ui.carousel_slide",{index:e.detail?.index}),"carousel-wc:play":()=>A.track("ui.carousel_play"),"carousel-wc:pause":()=>A.track("ui.carousel_pause"),"data-table:expand":e=>A.track("table.row_expand",{row:e.detail?.row}),"data-table:selection":e=>A.track("table.row_select",{count:e.detail?.count??e.detail?.rows?.length??0}),"theme-picker:open":()=>A.track("ui.theme_picker_open"),"theme-picker:close":()=>A.track("ui.theme_picker_close"),"color-palette:select":e=>A.track("palette.color_select",{name:e.detail?.name,index:e.detail?.index}),"color-palette:change":e=>A.track("palette.color_edit",{name:e.detail?.name,index:e.detail?.index}),"semantic-palette:change":e=>A.track("palette.semantic_change",{role:e.detail?.role}),"token-specimen:change":e=>A.track("tokens.edit",{token:e.detail?.token}),"spacing-specimen:change":e=>A.track("tokens.spacing_edit",{token:e.detail?.token}),"type-specimen:change":e=>A.track("tokens.type_edit",{token:e.detail?.token}),"theme-export:change":e=>A.track("theme.export_format",{format:e.detail?.format})};function Xl(e){for(let[t,i]of Object.entries(e))(t.startsWith("vb:theme-change")||t==="vb:a11y-themes-change"||t==="vb:extensions-change"?window:document).addEventListener(t,i)}function Jl({tiers:e=["tier1","tier2"]}={}){e.includes("tier1")&&Xl(Yp),e.includes("tier2")&&Xl(Gp)}et();Y();wt();await x.init();document.documentElement.hasAttribute("data-sticky")&&es();Ac();Wl();Yl();Gl();A.init({siteId:globalThis.vbAnalyticsConfig?.siteId??"vb-docs",transport:globalThis.vbAnalyticsConfig?.transport??"console",endpoint:globalThis.vbAnalyticsConfig?.endpoint??"/api/analytics"});Jl();Promise.resolve().then(()=>Ql());Promise.resolve().then(()=>ed());Promise.resolve().then(()=>cd());Fl();export{A as Analytics,B as VBService,D as VBServiceError,E as VBStore};
593
591
  //# sourceMappingURL=vanilla-breeze-core.js.map