blecsd 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/LICENSE +4 -2
  2. package/README.md +209 -66
  3. package/dist/3d/index.d.ts +2 -2
  4. package/dist/3d/index.js +1 -1
  5. package/dist/audio/index.d.ts +2 -2
  6. package/dist/{border-D_Jb4ZJV.d.ts → border-Jb7TrMob.d.ts} +20 -10
  7. package/dist/chunk-2IEMMRUO.js +1 -0
  8. package/dist/chunk-3AV52GY5.js +1 -0
  9. package/dist/chunk-3LHLSY3Y.js +1 -0
  10. package/dist/chunk-3O4TQHGK.js +4 -0
  11. package/dist/chunk-3UJWZ5ZN.js +1 -0
  12. package/dist/chunk-5N3O25O7.js +1 -0
  13. package/dist/chunk-6M2J5QUA.js +1 -0
  14. package/dist/chunk-7IQEUVGF.js +1 -0
  15. package/dist/chunk-A6M6TFBL.js +1 -0
  16. package/dist/chunk-CUEUJAHK.js +3 -0
  17. package/dist/chunk-D42Q2KKR.js +1 -0
  18. package/dist/chunk-DYEXOFUU.js +2 -0
  19. package/dist/chunk-DYU72XLL.js +1 -0
  20. package/dist/chunk-E4CJRSND.js +1 -0
  21. package/dist/chunk-EAY7B5GL.js +1 -0
  22. package/dist/chunk-FCMTWFSE.js +1 -0
  23. package/dist/chunk-FL56THSI.js +25 -0
  24. package/dist/{chunk-2UBBZFE4.js → chunk-G437VE43.js} +1 -1
  25. package/dist/chunk-GGXNWT36.js +8 -0
  26. package/dist/chunk-HLFORKXS.js +1 -0
  27. package/dist/chunk-J7MBKEBY.js +1 -0
  28. package/dist/{chunk-TYMY2TBR.js → chunk-JHCKPCUH.js} +3 -3
  29. package/dist/chunk-K3SX2LY5.js +1 -0
  30. package/dist/chunk-LDAFEXN5.js +1 -0
  31. package/dist/chunk-MKMFUXLB.js +33 -0
  32. package/dist/chunk-MQWPHPUM.js +1 -0
  33. package/dist/chunk-MTI376CU.js +5 -0
  34. package/dist/chunk-MTV2RJZD.js +1 -0
  35. package/dist/chunk-NPDPBAW6.js +4 -0
  36. package/dist/chunk-OB66FB4F.js +1 -0
  37. package/dist/chunk-OR3BZY7C.js +1 -0
  38. package/dist/{chunk-VNZ6CWJA.js → chunk-R7AICVRN.js} +2 -2
  39. package/dist/{chunk-3B7MIVW6.js → chunk-RZ7FGVI6.js} +1 -1
  40. package/dist/chunk-UMGTXSQB.js +11 -0
  41. package/dist/chunk-X3Q3T2SS.js +4 -0
  42. package/dist/{chunk-JKVHO4LH.js → chunk-XZJRWFOS.js} +1 -1
  43. package/dist/chunk-ZAHG7Y3X.js +1 -0
  44. package/dist/cli/init.d.ts +1 -1
  45. package/dist/componentStorage-CJTh-TPO.d.ts +246 -0
  46. package/dist/components/index.d.ts +1942 -514
  47. package/dist/components/index.js +1 -1
  48. package/dist/core/index.d.ts +857 -259
  49. package/dist/core/index.js +1 -1
  50. package/dist/debug/index.d.ts +491 -98
  51. package/dist/debug/index.js +1 -1
  52. package/dist/dirtyTracking-C4v8MmM9.d.ts +235 -0
  53. package/dist/errors/index.d.ts +12 -12
  54. package/dist/errors/index.js +1 -1
  55. package/dist/{events-BbbxkgvX.d.ts → events-9ForpTfM.d.ts} +75 -2
  56. package/dist/game/index.d.ts +7 -7
  57. package/dist/game/index.js +1 -1
  58. package/dist/{gameLoop-BIPW7-OY.d.ts → gameLoop-C-Ez_i54.d.ts} +2 -2
  59. package/dist/{index-zSGJ2eUk.d.ts → index-DBS5Uefn.d.ts} +2 -2
  60. package/dist/index.d.ts +283 -20
  61. package/dist/index.js +3 -1
  62. package/dist/input/index.d.ts +1 -1
  63. package/dist/input/index.js +1 -1
  64. package/dist/{inputActions-CefRUBuT.d.ts → inputActions-CRsUtTHM.d.ts} +10 -721
  65. package/dist/packedStore-BgvnEdE7.d.ts +191 -0
  66. package/dist/{renderable-jTMOA-GK.d.ts → renderable-CwqGwrEV.d.ts} +9 -9
  67. package/dist/{scheduler-DcfoFuum.d.ts → scheduler-CMcYew9Z.d.ts} +65 -3
  68. package/dist/systems/index.d.ts +356 -55
  69. package/dist/systems/index.js +1 -1
  70. package/dist/terminal/index.d.ts +2233 -2299
  71. package/dist/terminal/index.js +1 -1
  72. package/dist/{tilemap-D1HJvKy3.d.ts → tilemap-BirMJdbu.d.ts} +92 -3
  73. package/dist/{types-BcsvoKzf.d.ts → types-CPB4CpbH.d.ts} +2 -2
  74. package/dist/utils/index.d.ts +27 -180
  75. package/dist/utils/index.js +1 -1
  76. package/dist/{virtualScrollback-DvZTRU8a.d.ts → virtualScrollback-D9uLFe8l.d.ts} +4 -4
  77. package/dist/{virtualViewport-Dx2iJliO.d.ts → virtualViewport-Bpv6jlKt.d.ts} +283 -761
  78. package/dist/widgets/bigText.d.ts +1 -1
  79. package/dist/widgets/bigText.js +1 -1
  80. package/dist/widgets/index.d.ts +10519 -5463
  81. package/dist/widgets/index.js +1 -1
  82. package/package.json +102 -6
  83. package/dist/chunk-35I22JJO.js +0 -1
  84. package/dist/chunk-3EGGGI5J.js +0 -3
  85. package/dist/chunk-4X4N4HNQ.js +0 -2
  86. package/dist/chunk-AQ7LW75B.js +0 -1
  87. package/dist/chunk-AXZQAH4X.js +0 -1
  88. package/dist/chunk-BCADUCOZ.js +0 -1
  89. package/dist/chunk-EJ5WVDDZ.js +0 -6
  90. package/dist/chunk-FT7BMYSN.js +0 -1
  91. package/dist/chunk-FYEBZAWN.js +0 -1
  92. package/dist/chunk-GYHI26UE.js +0 -1
  93. package/dist/chunk-H2YAOJDW.js +0 -1
  94. package/dist/chunk-K2B2OXQ5.js +0 -5
  95. package/dist/chunk-K37L3G4Z.js +0 -4
  96. package/dist/chunk-KD55INV7.js +0 -1
  97. package/dist/chunk-KFAK4A3G.js +0 -1
  98. package/dist/chunk-LCN2ZITE.js +0 -1
  99. package/dist/chunk-OUXUPF3V.js +0 -33
  100. package/dist/chunk-P6CJO3BC.js +0 -1
  101. package/dist/chunk-PI5UOHOH.js +0 -1
  102. package/dist/chunk-PSXXMBVJ.js +0 -1
  103. package/dist/chunk-TRK4422V.js +0 -12
  104. package/dist/chunk-W5OU7Z6J.js +0 -1
  105. package/dist/chunk-WNG4A3K7.js +0 -4
  106. package/dist/chunk-XRJNAHNG.js +0 -19
  107. package/dist/chunk-XZA63ZPO.js +0 -1
  108. package/dist/chunk-YAMOSPWB.js +0 -4
  109. package/dist/chunk-YD6ULIUR.js +0 -1
  110. package/dist/{keyParser-Bwm8-l7v.d.ts → keyParser-BnHbg2iD.d.ts} +1 -1
@@ -1 +1 @@
1
- export{Ud as BorderConfigSchema,b as Box,a as BoxConfigSchema,Bb as CLOSE_BUTTON_CHAR,Cb as COLLAPSE_CHAR,L as DEFAULT_CURSOR_OFFSET_X,M as DEFAULT_CURSOR_OFFSET_Y,K as DEFAULT_HIDE_DELAY,ma as DEFAULT_HORIZONTAL_CHAR,J as DEFAULT_HOVER_DELAY,oa as DEFAULT_LINE_LENGTH,Ia as DEFAULT_LOADING_BG,Ha as DEFAULT_LOADING_FG,ab as DEFAULT_MESSAGE_PADDING,bb as DEFAULT_MESSAGE_STYLES,$a as DEFAULT_MESSAGE_TIMEOUT,Ab as DEFAULT_PANEL_TITLE,Pb as DEFAULT_PROMPT_BG,Ob as DEFAULT_PROMPT_FG,Rb as DEFAULT_PROMPT_HEIGHT,Qb as DEFAULT_PROMPT_WIDTH,bc as DEFAULT_QUESTION_BG,ac as DEFAULT_QUESTION_FG,dc as DEFAULT_QUESTION_HEIGHT,cc as DEFAULT_QUESTION_WIDTH,yc as DEFAULT_TAB_POSITION,O as DEFAULT_TOOLTIP_BG,P as DEFAULT_TOOLTIP_BORDER,N as DEFAULT_TOOLTIP_FG,na as DEFAULT_VERTICAL_CHAR,Db as EXPAND_CHAR,C as FileManager,B as FileManagerConfigSchema,Z as Image,Y as ImageConfigSchema,ea as Layout,da as LayoutConfigSchema,qa as Line,pa as LineConfigSchema,Ea as ListTableWidgetConfigSchema,xa as ListWidgetConfigSchema,Aa as ListbarWidgetConfigSchema,Ka as LoadingConfigSchema,Ja as LoadingStyleConfigSchema,Ta as Log,Sa as LogConfigSchema,Hd as MPLAYER_SEARCH_PATHS,Gd as MPV_SEARCH_PATHS,cb as Message,_a as MessageConfigSchema,pb as Modal,ob as ModalConfigSchema,Fb as Panel,Eb as PanelConfigSchema,Vb as Prompt,Sb as PromptBorderConfigSchema,Ub as PromptConfigSchema,Tb as PromptPaddingConfigSchema,fc as Question,ec as QuestionConfigSchema,oc as ScrollableBox,nc as ScrollableBoxConfigSchema,dd as SplitPane,cd as SplitPaneConfigSchema,md as StreamingTextConfigSchema,Ac as TAB_CLOSE_CHAR,zc as TAB_SEPARATOR,vc as TableWidgetConfigSchema,Cc as Tabs,Bc as TabsConfigSchema,xd as Terminal,wd as TerminalConfigSchema,Lc as Text,Kc as TextConfigSchema,Rc as TreeWidgetConfigSchema,Fd as Video,Ed as VideoConfigSchema,Vc as Viewport3DTag,Vd as VirtualizedListConfigSchema,Td as VirtualizedListStyleSchema,qd as appendToState,ic as ask,Kd as buildMplayerArgs,Jd as buildMpvArgs,Ld as buildPlayerArgs,ha as calculateFlexLayout,ga as calculateGridLayout,fa as calculateInlineLayout,V as clearAllHoverText,S as clearHoverText,t as clearLines,rd as clearState,tb as closeAllModals,sb as closeModal,jc as confirm,c as createBox,E as createFileManager,Q as createHoverTextManager,_ as createImage,ia as createLayout,ra as createLine,ya as createList,Fa as createListTable,Ca as createListbar,La as createLoading,Ua as createLog,db as createMessage,qb as createModal,Gb as createPanel,Xb as createPrompt,hc as createQuestion,pc as createScrollableBox,uc as createScrollableText,hd as createSharedTextBuffer,ed as createSplitPane,pd as createStreamingState,vd as createStreamingText,wc as createTable,Dc as createTabs,yd as createTerminal,Mc as createText,Tc as createTree,Od as createVideo,Wc as createViewport3D,Wd as createVirtualizedList,Yc as createWidgetRegistry,_c as defaultRegistry,s as deleteBottom,q as deleteLine,r as deleteTop,Id as detectVideoPlayer,D as fileManagerStateMap,Fc as getActiveTabIndex,l as getBaseLine,e as getBoxContent,kd as getDividerRenderInfo,T as getHoverText,W as getHoverTextCount,aa as getImageBitmap,ba as getImageCellMap,ka as getLayoutMode,j as getLine,ta as getLineChar,i as getLineCount,va as getLineOrientation,h as getLines,vb as getModalStack,Ib as getPanelTitle,Lb as getPanelTitleAlign,Ya as getScrollback,id as getSharedTextBuffer,gd as getSplitDirection,sd as getStreamVisibleLines,Gc as getTabCount,Hc as getTabPosition,Oc as getTextContent,Qd as getVideoPlaybackState,Rd as getVideoPlayer,$c as getWidgetTypes,bd as getWidgetsByTag,F as handleFileManagerKey,lb as handleMessageClick,mb as handleMessageKey,yb as handleModalBackdropClick,zb as handleModalEscape,$b as handlePromptKey,lc as handleQuestionKey,zd as handleTerminalKey,Xd as handleVirtualizedListKey,Yd as handleVirtualizedListWheel,U as hasHoverText,Na as hideLoading,jd as hitTestDivider,p as insertBottom,n as insertLine,o as insertTop,f as isBox,jb as isDismissOnClick,kb as isDismissOnKey,G as isFileManager,$ as isImage,sc as isKeysScrollEnabled,ja as isLayout,sa as isLine,Ga as isListTableWidget,za as isListWidget,Da as isListbarWidget,Pa as isLoadingWidget,Va as isLog,Xa as isLogKeysScrollEnabled,Wa as isLogMouseScrollEnabled,ib as isMessage,wb as isModal,ub as isModalOpen,rc as isMouseScrollEnabled,Hb as isPanel,Kb as isPanelCollapsed,Zb as isPrompt,kc as isQuestion,qc as isScrollableBox,qc as isScrollableText,fd as isSplitPane,xc as isTableWidget,Ec as isTabs,Ad as isTerminal,Cd as isTerminalKeysEnabled,Bd as isTerminalMouseEnabled,Pc as isText,Uc as isTreeWidget,Pd as isVideo,Xc as isViewport3DWidget,Zd as isVirtualizedList,ad as isWidgetType,rb as openModal,w as popLine,Yb as prompt,Wb as promptStateMap,v as pushLine,gc as questionStateMap,Zc as registerBuiltinWidgets,Mb as renderPanelTitleBar,Ic as renderTabBar,z as replaceLines,g as resetBoxStore,H as resetFileManagerStore,X as resetHoverTextStore,ca as resetImageStore,la as resetLayoutStore,wa as resetLineStore,Ba as resetListbarStore,Ra as resetLoadingStore,Za as resetLogStore,nb as resetMessageStore,xb as resetModalStore,Nb as resetPanelStore,_b as resetPromptStore,mc as resetQuestionStore,tc as resetScrollableBoxStore,ld as resetSplitPaneStore,Jc as resetTabsStore,Dd as resetTerminalStore,Qc as resetTextStore,Sc as resetTreeStore,Sd as resetVideoStore,ud as scrollByLines,td as scrollToLine,Md as sendPauseCommand,Nd as sendSeekCommand,m as setBaseLine,d as setBoxContent,R as setHoverText,k as setLine,ua as setLineChar,u as setLines,Oa as setLoadingMessage,Jb as setPanelTitle,I as setReadDirFn,Nc as setTextContent,x as shiftLine,gb as showError,eb as showInfo,Ma as showLoading,hb as showSuccess,fb as showWarning,A as spliceLines,od as stripAnsiSequences,y as unshiftLine,Qa as updateLoadingAnimation,nd as wrapLine}from'../chunk-XRJNAHNG.js';import'../chunk-35I22JJO.js';import'../chunk-4LWWONFK.js';import'../chunk-AXZQAH4X.js';export{b as BigText,a as BigTextConfigSchema,e as createBigText,g as isBigText,h as resetBigTextStore,f as setText}from'../chunk-3EGGGI5J.js';export{b as BitmapFontSchema,a as CharBitmapSchema,c as createFontNotFoundError,f as getCharBitmap,d as loadFont,g as renderChar}from'../chunk-DNRXW56C.js';import'../chunk-LYSK5S63.js';import'../chunk-K37L3G4Z.js';import'../chunk-TWSWTBYL.js';import'../chunk-AEJIX2MW.js';import'../chunk-C5PCEQ6G.js';import'../chunk-TYMY2TBR.js';import'../chunk-VOCM5T2G.js';import'../chunk-XZA63ZPO.js';import'../chunk-KFAK4A3G.js';import'../chunk-BCADUCOZ.js';import'../chunk-PSXXMBVJ.js';import'../chunk-LCN2ZITE.js';import'../chunk-FYEBZAWN.js';import'../chunk-W5OU7Z6J.js';import'../chunk-Z4EZERNE.js';import'../chunk-WNG4A3K7.js';import'../chunk-SHUC6JWA.js';import'../chunk-G7GIWWLE.js';import'../chunk-PXXGH3BV.js';import'../chunk-5PELJRUQ.js';
1
+ export{x as Accordion,k as AccordionConfigSchema,y as Autocomplete,z as AutocompleteConfigSchema,D as BRAILLE_BASE,E as BRAILLE_DOTS,U as BarChart,T as BarChartConfigSchema,Rg as BorderConfigSchema,e as Box,d as BoxConfigSchema,Z as ButtonWidgetComponent,Y as ButtonWidgetConfigSchema,M as CHART_COLORS,Ud as CLOSE_BUTTON_CHAR,Vd as COLLAPSE_CHAR,ia as Canvas,ja as CanvasConfigSchema,va as CheckboxWidgetComponent,ua as CheckboxWidgetConfigSchema,l as CollapsibleConfigSchema,Ca as CommandPalette,Da as CommandPaletteConfigSchema,ac as DEFAULT_CURSOR_OFFSET_X,bc as DEFAULT_CURSOR_OFFSET_Y,$b as DEFAULT_HIDE_DELAY,Dc as DEFAULT_HORIZONTAL_CHAR,_b as DEFAULT_HOVER_DELAY,Fc as DEFAULT_LINE_LENGTH,$c as DEFAULT_LOADING_BG,_c as DEFAULT_LOADING_FG,td as DEFAULT_MESSAGE_PADDING,ud as DEFAULT_MESSAGE_STYLES,sd as DEFAULT_MESSAGE_TIMEOUT,Td as DEFAULT_PANEL_TITLE,le as DEFAULT_PROMPT_BG,ke as DEFAULT_PROMPT_FG,ne as DEFAULT_PROMPT_HEIGHT,me as DEFAULT_PROMPT_WIDTH,ze as DEFAULT_QUESTION_BG,ye as DEFAULT_QUESTION_FG,Be as DEFAULT_QUESTION_HEIGHT,Ae as DEFAULT_QUESTION_WIDTH,$a as DEFAULT_TAB_POSITION,qg as DEFAULT_TOAST_PADDING,sg as DEFAULT_TOAST_STYLES,pg as DEFAULT_TOAST_TIMEOUT,dc as DEFAULT_TOOLTIP_BG,ec as DEFAULT_TOOLTIP_BORDER,cc as DEFAULT_TOOLTIP_FG,Ec as DEFAULT_VERTICAL_CHAR,lb as DevTools,mb as DevToolsConfigSchema,Wd as EXPAND_CHAR,rb as FileManager,qb as FileManagerConfigSchema,yb as FlexContainer,zb as FlexContainerConfigSchema,Eb as Footer,Fb as FooterConfigSchema,Ib as FormComponent,Hb as FormWidgetConfigSchema,Nb as Gauge,Mb as GaugeConfigSchema,Rb as Grid,Sb as GridConfigSchema,R as HORIZONTAL_BLOCKS,Xb as Header,Yb as HeaderConfigSchema,oc as Image,nc as ImageConfigSchema,vc as Layout,uc as LayoutConfigSchema,Hc as Line,Pc as LineChart,Oc as LineChartConfigSchema,Gc as LineConfigSchema,Xc as ListTableWidgetConfigSchema,za as ListWidgetConfigSchema,Tc as ListbarWidgetConfigSchema,bd as LoadingConfigSchema,ad as LoadingStyleConfigSchema,kd as Log,jd as LogConfigSchema,Eg as MPLAYER_SEARCH_PATHS,Dg as MPV_SEARCH_PATHS,vd as Message,rd as MessageConfigSchema,Id as Modal,Hd as ModalConfigSchema,Yd as Panel,Xd as PanelConfigSchema,ge as ProgressBarComponent,fe as ProgressBarWidgetConfigSchema,re as Prompt,oe as PromptBorderConfigSchema,qe as PromptConfigSchema,pe as PromptPaddingConfigSchema,Wf as PtyOptionsSchema,De as Question,Ce as QuestionConfigSchema,Oe as RadioButtonWidgetComponent,Me as RadioButtonWidgetConfigSchema,Ne as RadioGroupWidgetComponent,Le as RadioGroupWidgetConfigSchema,Ve as ScrollableBox,Ue as ScrollableBoxConfigSchema,rf as Sparkline,qf as SparklineConfigSchema,wf as SplitPane,vf as SplitPaneConfigSchema,gg as StopwatchComponent,eg as StopwatchConfigSchema,Ff as StreamingTextConfigSchema,Qf as Switch,Pf as SwitchConfigSchema,bb as TAB_CLOSE_CHAR,ab as TAB_SEPARATOR,rg as TOAST_STACK_SPACING,af as TableWidgetConfigSchema,db as Tabs,cb as TabsConfigSchema,Yf as Terminal,Xf as TerminalConfigSchema,ca as Text,ba as TextConfigSchema,fg as TimerComponent,dg as TimerConfigSchema,tg as Toast,og as ToastConfigSchema,df as TreeWidgetConfigSchema,S as VERTICAL_BLOCKS,Cg as Video,Bg as VideoConfigSchema,hf as Viewport3DTag,Sg as VirtualizedListConfigSchema,Qg as VirtualizedListStyleSchema,Bb as addFlexChild,Ub as addToGrid,Jf as appendToState,Ge as ask,F as brailleChar,Hg as buildMplayerArgs,Gg as buildMpvArgs,Ig as buildPlayerArgs,yc as calculateFlexLayout,xc as calculateGridLayout,wc as calculateInlineLayout,H as calculateTickInterval,kc as clearAllHoverText,pa as clearCanvas,hc as clearHoverText,Ta as clearLines,Kf as clearState,Md as closeAllModals,Ld as closeModal,r as collapseAllSections,G as combineBrailleDots,He as confirm,n as createAccordion,A as createAutocomplete,V as createBarChart,f as createBox,_ as createButton,ra as createCanvas,wa as createCheckbox,t as createCollapsible,Fa as createCommandPalette,nb as createDevTools,tb as createFileManager,Ab as createFlexContainer,Gb as createFooter,Jb as createForm,Ob as createGauge,Tb as createGrid,Zb as createHeader,fc as createHoverTextManager,pc as createImage,zc as createLayout,Ic as createLine,Qc as createLineChart,Aa as createList,Yc as createListTable,Vc as createListbar,cd as createLoading,ld as createLog,wd as createMessage,Jd as createModal,Zd as createPanel,he as createProgressBar,te as createPrompt,Fe as createQuestion,Qe as createRadioButton,Pe as createRadioGroup,We as createScrollableBox,$e as createScrollableText,Af as createSharedTextBuffer,sf as createSparkline,xf as createSplitPane,ig as createStopwatch,If as createStreamingState,Of as createStreamingText,Rf as createSwitch,bf as createTable,eb as createTabs,Zf as createTerminal,da as createText,hg as createTimer,ug as createToast,ff as createTree,Lg as createVideo,if as createViewport3D,Tg as createVirtualizedList,kf as createWidgetRegistry,mf as defaultRegistry,Sa as deleteBottom,Qa as deleteLine,Ra as deleteTop,Fg as detectVideoPlayer,na as drawCircle,la as drawLine,ma as drawRect,oa as drawText,q as expandAllSections,p as expandSection,sb as fileManagerStateMap,K as formatNumber,L as formatPercentage,I as generateTicks,gb as getActiveTabIndex,La as getBaseLine,h as getBoxContent,qa as getCanvasContent,N as getChartColor,Df as getDividerRenderInfo,s as getExpandedSections,ic as getHoverText,lc as getHoverTextCount,rc as getImageBitmap,sc as getImageCellMap,Bc as getLayoutMode,Ja as getLine,Kc as getLineChar,Ia as getLineCount,Mc as getLineOrientation,Ha as getLines,Od as getModalStack,$d as getPanelTitle,ce as getPanelTitleAlign,pd as getScrollback,Bf as getSharedTextBuffer,zf as getSplitDirection,Lf as getStreamVisibleLines,hb as getTabCount,ib as getTabPosition,fa as getTextContent,Ng as getVideoPlaybackState,Og as getVideoPlayer,nf as getWidgetTypes,pf as getWidgetsByTag,ub as handleFileManagerKey,Ed as handleMessageClick,Fd as handleMessageKey,Rd as handleModalBackdropClick,Sd as handleModalEscape,xe as handlePromptKey,Je as handleQuestionKey,Uf as handleSwitchClick,Tf as handleSwitchKey,_f as handleTerminalKey,Ug as handleVirtualizedListKey,Vg as handleVirtualizedListWheel,jc as hasHoverText,ed as hideLoading,Cf as hitTestDivider,Pa as insertBottom,Na as insertLine,Oa as insertTop,O as interpolateChartColor,v as isAccordion,B as isAutocomplete,W as isBarChart,i as isBox,$ as isButtonWidget,sa as isCanvas,xa as isCheckboxWidget,w as isCollapsible,Ga as isCommandPalette,ob as isDevTools,Cd as isDismissOnClick,Dd as isDismissOnKey,vb as isFileManager,Cb as isFlexContainer,Kb as isFormWidget,Pb as isGauge,Vb as isGrid,qc as isImage,Ze as isKeysScrollEnabled,Ac as isLayout,Jc as isLine,Rc as isLineChart,Zc as isListTableWidget,Ba as isListWidget,Wc as isListbarWidget,gd as isLoadingWidget,md as isLog,od as isLogKeysScrollEnabled,nd as isLogMouseScrollEnabled,Bd as isMessage,Pd as isModal,Nd as isModalOpen,Ye as isMouseScrollEnabled,_d as isPanel,be as isPanelCollapsed,ie as isProgressBarWidget,ve as isPrompt,Ie as isQuestion,Se as isRadioButtonWidget,Re as isRadioGroupWidget,Xe as isScrollableBox,Xe as isScrollableText,tf as isSparkline,yf as isSplitPane,lg as isStopwatch,Sf as isSwitch,cf as isTableWidget,fb as isTabs,$f as isTerminal,bg as isTerminalKeysEnabled,ag as isTerminalMouseEnabled,ga as isText,kg as isTimer,zg as isToast,gf as isTreeWidget,Mg as isVideo,jf as isViewport3DWidget,Wg as isVirtualizedList,of as isWidgetType,Kd as openModal,Wa as popLine,ue as prompt,se as promptStateMap,Va as pushLine,Ee as questionStateMap,lf as registerBuiltinWidgets,de as renderPanelTitleBar,jb as renderTabBar,P as renderXAxisLabel,Q as renderYAxisLabel,Za as replaceLines,m as resetAccordionStore,C as resetAutocompleteStore,X as resetBarChartStore,j as resetBoxStore,aa as resetButtonWidgetStore,ta as resetCanvasStore,ya as resetCheckboxWidgetStore,Ea as resetCommandPaletteStore,pb as resetDevToolsStore,wb as resetFileManagerStore,Db as resetFlexContainerStore,Lb as resetFormWidgetStore,Qb as resetGaugeStore,Wb as resetGridStore,mc as resetHoverTextStore,tc as resetImageStore,Cc as resetLayoutStore,Sc as resetLineChartStore,Nc as resetLineStore,Uc as resetListbarStore,id as resetLoadingStore,qd as resetLogStore,Gd as resetMessageStore,Qd as resetModalStore,ee as resetPanelStore,je as resetProgressBarWidgetStore,we as resetPromptStore,Ke as resetQuestionStore,Te as resetRadioWidgetStore,_e as resetScrollableBoxStore,uf as resetSparklineStore,Ef as resetSplitPaneStore,ng as resetStopwatchWidgetStore,Vf as resetSwitchStore,kb as resetTabsStore,cg as resetTerminalStore,ha as resetTextStore,mg as resetTimerWidgetStore,Ag as resetToastStore,ef as resetTreeStore,Pg as resetVideoStore,J as scaleValue,Nf as scrollByLines,Mf as scrollToLine,Jg as sendPauseCommand,Kg as sendSeekCommand,Ma as setBaseLine,g as setBoxContent,gc as setHoverText,Ka as setLine,Lc as setLineChar,Ua as setLines,fd as setLoadingMessage,ae as setPanelTitle,ka as setPixel,xb as setReadDirFn,ea as setTextContent,Xa as shiftLine,zd as showError,yg as showErrorToast,xd as showInfo,vg as showInfoToast,dd as showLoading,Ad as showSuccess,wg as showSuccessToast,yd as showWarning,xg as showWarningToast,_a as spliceLines,Hf as stripAnsiSequences,u as toggleCollapsible,o as toggleSection,Ya as unshiftLine,hd as updateLoadingAnimation,jg as updateTimeWidgets,Gf as wrapLine}from'../chunk-FL56THSI.js';import'../chunk-3UJWZ5ZN.js';import'../chunk-4LWWONFK.js';import'../chunk-2IEMMRUO.js';export{b as BigText,a as BigTextConfigSchema,e as createBigText,g as isBigText,h as resetBigTextStore,f as setText}from'../chunk-CUEUJAHK.js';export{b as BitmapFontSchema,a as CharBitmapSchema,c as createFontNotFoundError,f as getCharBitmap,d as loadFont,g as renderChar}from'../chunk-DNRXW56C.js';import'../chunk-LYSK5S63.js';import'../chunk-3O4TQHGK.js';import'../chunk-TWSWTBYL.js';import'../chunk-AEJIX2MW.js';import'../chunk-C5PCEQ6G.js';import'../chunk-JHCKPCUH.js';import'../chunk-VOCM5T2G.js';import'../chunk-3AV52GY5.js';import'../chunk-5N3O25O7.js';import'../chunk-A6M6TFBL.js';import'../chunk-6M2J5QUA.js';import'../chunk-EAY7B5GL.js';import'../chunk-K3SX2LY5.js';import'../chunk-3LHLSY3Y.js';import'../chunk-OR3BZY7C.js';import'../chunk-DYU72XLL.js';import'../chunk-FCMTWFSE.js';import'../chunk-ZAHG7Y3X.js';import'../chunk-Z4EZERNE.js';import'../chunk-NPDPBAW6.js';import'../chunk-SHUC6JWA.js';import'../chunk-G7GIWWLE.js';import'../chunk-PXXGH3BV.js';import'../chunk-5PELJRUQ.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blecsd",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "A modern, high-performance terminal UI library built on TypeScript and ECS architecture",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -138,33 +138,128 @@
138
138
  "bench": "vitest bench",
139
139
  "bench:run": "vitest bench --run",
140
140
  "bench:json": "vitest bench --run --outputFile=benchmark-results.json",
141
+ "bench:scenarios": "vitest bench benchmarks/scenarios",
142
+ "bench:ci": "vitest bench benchmarks/ci.bench.ts",
143
+ "bench:startup": "vitest bench benchmarks/startup.bench.ts",
144
+ "bench:widgets": "vitest bench benchmarks/widgets.bench.ts",
145
+ "bench:memory": "node --expose-gc node_modules/.bin/vitest bench benchmarks/memory.bench.ts",
146
+ "bench:leak-check": "node --expose-gc node_modules/.bin/vitest bench benchmarks/memory-leak.bench.ts",
147
+ "bench:render-cycle": "vitest bench benchmarks/render-cycle.bench.ts",
148
+ "bench:animation": "vitest bench benchmarks/animation.bench.ts",
149
+ "bench:layout": "vitest bench benchmarks/layout.bench.ts",
150
+ "bench:text": "vitest bench benchmarks/text-rendering.bench.ts",
151
+ "bench:update-baseline": "tsx scripts/update-baseline.ts",
152
+ "bench:check-regression": "vitest bench benchmarks/ci.bench.ts --run --outputFile=benchmark-results.json && tsx scripts/check-perf-regression.ts benchmark-results.json",
141
153
  "lint": "biome check . && ./scripts/check-bitecs-imports.sh",
142
154
  "lint:fix": "biome check --write .",
143
155
  "format": "biome format --write .",
144
156
  "typecheck": "tsc --noEmit",
157
+ "check:circular": "madge --circular --extensions ts,tsx src/",
145
158
  "prepare": "husky",
146
159
  "prepublishOnly": "pnpm run build:publish",
147
160
  "build:publish": "tsup --no-sourcemap --minify",
148
161
  "size": "size-limit",
149
- "size:check": "size-limit --check",
162
+ "size:why": "size-limit --why",
150
163
  "verify-pack": "./scripts/verify-pack.sh",
151
- "doccheck": "tsx scripts/doccheck.ts"
164
+ "doccheck": "tsx scripts/doccheck.ts",
165
+ "playground": "tsx playground/index.ts"
152
166
  },
153
167
  "size-limit": [
154
168
  {
155
169
  "path": "dist/index.js",
156
170
  "limit": "500 KB",
157
- "ignore": ["fs", "path", "os", "util", "child_process", "net", "tty", "stream", "events", "readline", "module", "url", "https", "node:fs", "node:path", "node:os", "node:util", "node:child_process", "node:net", "node:tty", "node:stream", "node:events", "node:readline", "node:module", "node:url", "node:https"]
171
+ "ignore": [
172
+ "fs",
173
+ "path",
174
+ "os",
175
+ "util",
176
+ "child_process",
177
+ "net",
178
+ "tty",
179
+ "stream",
180
+ "events",
181
+ "readline",
182
+ "module",
183
+ "url",
184
+ "https",
185
+ "node:fs",
186
+ "node:path",
187
+ "node:os",
188
+ "node:util",
189
+ "node:child_process",
190
+ "node:net",
191
+ "node:tty",
192
+ "node:stream",
193
+ "node:events",
194
+ "node:readline",
195
+ "node:module",
196
+ "node:url",
197
+ "node:https"
198
+ ]
158
199
  },
159
200
  {
160
201
  "path": "dist/core/index.js",
161
202
  "limit": "100 KB",
162
- "ignore": ["fs", "path", "os", "util", "child_process", "net", "tty", "stream", "events", "readline", "module", "url", "https", "node:fs", "node:path", "node:os", "node:util", "node:child_process", "node:net", "node:tty", "node:stream", "node:events", "node:readline", "node:module", "node:url", "node:https"]
203
+ "ignore": [
204
+ "fs",
205
+ "path",
206
+ "os",
207
+ "util",
208
+ "child_process",
209
+ "net",
210
+ "tty",
211
+ "stream",
212
+ "events",
213
+ "readline",
214
+ "module",
215
+ "url",
216
+ "https",
217
+ "node:fs",
218
+ "node:path",
219
+ "node:os",
220
+ "node:util",
221
+ "node:child_process",
222
+ "node:net",
223
+ "node:tty",
224
+ "node:stream",
225
+ "node:events",
226
+ "node:readline",
227
+ "node:module",
228
+ "node:url",
229
+ "node:https"
230
+ ]
163
231
  },
164
232
  {
165
233
  "path": "dist/components/index.js",
166
234
  "limit": "200 KB",
167
- "ignore": ["fs", "path", "os", "util", "child_process", "net", "tty", "stream", "events", "readline", "module", "url", "https", "node:fs", "node:path", "node:os", "node:util", "node:child_process", "node:net", "node:tty", "node:stream", "node:events", "node:readline", "node:module", "node:url", "node:https"]
235
+ "ignore": [
236
+ "fs",
237
+ "path",
238
+ "os",
239
+ "util",
240
+ "child_process",
241
+ "net",
242
+ "tty",
243
+ "stream",
244
+ "events",
245
+ "readline",
246
+ "module",
247
+ "url",
248
+ "https",
249
+ "node:fs",
250
+ "node:path",
251
+ "node:os",
252
+ "node:util",
253
+ "node:child_process",
254
+ "node:net",
255
+ "node:tty",
256
+ "node:stream",
257
+ "node:events",
258
+ "node:readline",
259
+ "node:module",
260
+ "node:url",
261
+ "node:https"
262
+ ]
168
263
  }
169
264
  ],
170
265
  "keywords": [
@@ -201,6 +296,7 @@
201
296
  "@types/node": "^25.2.0",
202
297
  "@vitest/coverage-v8": "^4.0.18",
203
298
  "husky": "^9.0.0",
299
+ "madge": "^8.0.0",
204
300
  "size-limit": "^12.0.0",
205
301
  "tsup": "^8.5.1",
206
302
  "tsx": "^4.21.0",
@@ -1 +0,0 @@
1
- import {b,d as d$2}from'./chunk-4LWWONFK.js';import {d as d$1,A,i,B as B$1}from'./chunk-TWSWTBYL.js';import {a,e as e$1,r as r$1,o,t}from'./chunk-C5PCEQ6G.js';import {k as k$1}from'./chunk-VOCM5T2G.js';import {c as c$1,a as a$1}from'./chunk-XZA63ZPO.js';import {s,n as n$1,i as i$1}from'./chunk-LCN2ZITE.js';import {r,c,p as p$1,h,e}from'./chunk-W5OU7Z6J.js';import {n,k,i as i$2}from'./chunk-PXXGH3BV.js';import {z}from'zod';s();n();var d=z.number().int().min(0).max(4294967295),J=z.number().int().min(0).max(65535),ne=z.object({fg:d.optional(),bg:d.optional(),selectedFg:d.optional(),selectedBg:d.optional(),cursorFg:d.optional(),cursorBg:d.optional(),showLineNumbers:z.boolean().optional(),lineNumberWidth:z.number().int().nonnegative().max(20).optional(),attrs:J.optional()}),Re=z.object({fg:d.default(4294967295),bg:d.default(255),selectedFg:d.default(255),selectedBg:d.default(4294967295),cursorFg:d.default(255),cursorBg:d.default(16711935),showLineNumbers:z.boolean().default(false),lineNumberWidth:z.number().int().nonnegative().max(20).default(0),attrs:J.default(a.NONE)}),Q={fg:4294967295,bg:255,selectedFg:255,selectedBg:4294967295,cursorFg:255,cursorBg:16711935,showLineNumbers:false,lineNumberWidth:0,attrs:a.NONE},p=null,L=new Map,B=new Map;function Ne(t){p=t;}function Se(){return p}function Ve(){p=null;}function ve(t,e){L.set(t,e);}function we(t){return L.get(t)}function De(t){L.delete(t);}function ze(t,e){L.set(t,e);}function We(t,e){let r=ne.parse(e),f={};for(let[n,o]of Object.entries(r))o!==void 0&&(f[n]=o);let i=B.get(t)??Q;B.set(t,{...i,...f});}function re(t){return B.get(t)??Q}function Fe(t){B.delete(t);}function ie(t,e){if(!i$2(t,e,c))return a.NONE;let r=a.NONE;return c.bold[e]===1&&(r|=a.BOLD),c.underline[e]===1&&(r|=a.UNDERLINE),c.blink[e]===1&&(r|=a.BLINK),c.inverse[e]===1&&(r|=a.INVERSE),r}function oe(t,e){if(c$1(t,e))return {x:a$1.x[e],y:a$1.y[e],width:a$1.width[e],height:a$1.height[e]}}function fe(t,e){return n$1(t,e)?{top:i$1.top[e]===1?1:0,right:i$1.right[e]===1?1:0,bottom:i$1.bottom[e]===1?1:0,left:i$1.left[e]===1?1:0}:{top:0,right:0,bottom:0,left:0}}function ue(t,e){return {x:t.x+e.left,y:t.y+e.top,width:Math.max(0,t.width-e.left-e.right),height:Math.max(0,t.height-e.top-e.bottom)}}function M(t$1,e,r,f,i,n,o$1,u){let m=e$1(" ",n,o$1,u);for(let l=0;l<f;l++)o(t$1,e+l,r,m);let a=i.length>f?i.slice(0,f):i;a.length>0&&t(t$1,e,r,a,n,o$1,u);}function le(t$1,e,r,f,i,n,o){let u=`${String(i+1).padStart(f-1," ")} `;t(t$1,e,r,u.slice(0,f),n,o,a.DIM);}function ae(t,e,r,f,i,n){let{buffer:o}=t,{x:u,y:m,width:a$1,height:l}=r,x=k$1(i,f.start,f.end),S=n.showLineNumbers?u+n.lineNumberWidth:u,V=n.showLineNumbers?Math.max(0,a$1-n.lineNumberWidth):a$1,b=d$1.selectedLine[e],v=d$1.cursorLine[e];for(let c=0;c<x.lines.length;c++){let E=m+c;if(c>=l)break;let D=x.startLine+c,Z=x.lines[c]??"",z=n.fg,W=n.bg;D===v?(z=n.cursorFg,W=n.cursorBg):D===b&&(z=n.selectedFg,W=n.selectedBg),n.showLineNumbers&&le(o,u,E,n.lineNumberWidth,D,n.fg,n.bg),M(o,S,E,V,Z,z,W,n.attrs);}let T=Math.min(x.lines.length,l);for(let c=T;c<l;c++){let E=m+c;n.showLineNumbers&&M(o,u,E,n.lineNumberWidth,"",n.fg,n.bg,a.NONE),M(o,S,E,V,"",n.fg,n.bg,a.NONE);}}function se(t,e,r,f,i){if(r<=i)return;let{buffer:n}=t,o$1=e.height,u=e.x+e.width-1,m=e.y,a=i/r,l=Math.max(1,Math.floor(o$1*a)),x=Math.floor(f/r*o$1),S=e$1("\u2502",1717987071,255);for(let b=0;b<o$1;b++)o(n,u,m+b,S);let V=e$1("\u2588",2863311615,255);for(let b=0;b<l;b++){let v=m+x+b;v<m+o$1&&o(n,u,v,V);}}function de(t,e$2,r){let{world:f,buffer:i}=t,n=e(f,e$2);if(!n||n.transparent)return;let o=ie(f,e$2),u=e$1(" ",n.fg,n.bg,o);r$1(i,r.x,r.y,r.width,r.height,u);}function me(t,e){let{world:r,doubleBuffer:f}=t,i$1=oe(r,e);if(!i$1||i$1.width<=0||i$1.height<=0)return;let n=L.get(e);if(!n)return;let o=i(r,e);if(!o)return;let u=re(e);de(t,e,i$1);let m=fe(r,e),a=ue(i$1,m);a.width>0&&a.height>0&&ae(t,e,a,o,n,u);let l={firstVisibleLine:d$1.firstVisibleLine[e],visibleLineCount:d$1.visibleLineCount[e],totalLineCount:d$1.totalLineCount[e]};l.totalLineCount>l.visibleLineCount&&se(t,a,l.totalLineCount,l.firstVisibleLine,l.visibleLineCount),d$2(f,i$1.x,i$1.y,i$1.width,i$1.height),B$1(r,e),h(r,e);}var ce=t=>{if(!p)return t;let e=b(p),r$1={world:t,buffer:e,doubleBuffer:p},f=k(t,[d$1,r,c]);for(let i of f)p$1(t,i)&&(!A(t,i)&&c.dirty[i]!==1||me(r$1,i));return t};function Me(){return ce}function Oe(){p=null,L.clear(),B.clear();}function ke(t){L.delete(t),B.delete(t);}export{Re as a,Ne as b,Se as c,Ve as d,ve as e,we as f,De as g,ze as h,We as i,re as j,Fe as k,ce as l,Me as m,Oe as n,ke as o};
@@ -1,3 +0,0 @@
1
- import {b,e as e$3,d as d$2,f as f$3,g as g$1}from'./chunk-DNRXW56C.js';import {e}from'./chunk-FYEBZAWN.js';import {W,g,Y as Y$1,$,_ as _$1,s,x,j as j$1,L,O,d as d$1}from'./chunk-W5OU7Z6J.js';import {f as f$1,e as e$2}from'./chunk-SHUC6JWA.js';import {f as f$2,d}from'./chunk-G7GIWWLE.js';import {n,e as e$1}from'./chunk-PXXGH3BV.js';import {readFileSync}from'fs';import {z}from'zod';n();f$1();var N=z.union([z.number(),z.string().regex(/^\d+(\.\d+)?%$/,'Percentage must be in format "50%"'),z.literal("auto")]),f=z.union([z.number(),z.string().regex(/^\d+(\.\d+)?%$/,'Percentage must be in format "50%"'),z.enum(["center","left","right","top","bottom"])]),J=z.object({left:f.optional(),top:f.optional(),right:f.optional(),bottom:f.optional(),width:N.optional(),height:N.optional(),fg:z.union([z.string(),z.number()]).optional(),bg:z.union([z.string(),z.number()]).optional(),text:z.string(),font:z.union([z.string(),b]).optional(),shrink:z.boolean().optional()}),Y=1e4,c={isBigText:new Uint8Array(Y)},U="terminus-14-bold",T=new Map,a=new Map;function _(t){if(t===void 0)return 0;if(typeof t=="number")return t;switch(t){case "left":case "top":return 0;case "center":return 0;case "right":case "bottom":return 0}return 0}function M(t){return t===void 0||typeof t=="string"&&t==="auto"?"auto":t}async function j(t){return t?typeof t!="string"?t:t==="terminus-14-bold"||t==="terminus-14-normal"?d$2(t):H(t):d$2(U)}function q(t){return t?typeof t!="string"?t:t==="terminus-14-bold"||t==="terminus-14-normal"?e$3(t):T.get(t):e$3(U)}function K(t,i){let n=" ".repeat(t);return Array.from({length:i},()=>n)}function Q(t,i){let n=t.charHeight,r=Array.from({length:n},()=>"");for(let e of Array.from(i)){let u=f$3(t,e)?g$1(t,e):K(t.charWidth,t.charHeight);for(let g=0;g<n;g+=1){let O=u[g]??"";r[g]=`${r[g]}${O}`;}}return r}function B(t,i){let n=i.split(`
2
- `),r=[];for(let e of n)r.push(...Q(t,e));return r.join(`
3
- `)}function H(t){let i=T.get(t);if(i)return i;let n=readFileSync(t,"utf8"),r=JSON.parse(n),e=b.parse(r);return T.set(t,e),e}var ft=H;function R(t,i,n){let r=_(n.left),e=_(n.top);s(t,i,r,e);let s$1=M(n.width),u=M(n.height);L(t,i,s$1,u);let g=n.shrink!==false;O(t,i,g);}function X(t,i,n){n.fg===void 0&&n.bg===void 0||d$1(t,i,{fg:n.fg!==void 0?e$2(n.fg):void 0,bg:n.bg!==void 0?e$2(n.bg):void 0});}async function Z(t,i,n){let r=await j(n.font),e$1=B(r,n.text);a.set(i,n.text),e(t,i,e$1);}async function ct(t,i,n){let r=J.parse(n),e=i;c.isBigText[e]=1,R(t,e,r),X(t,e,r),await Z(t,e,r),W(t,e,{focusable:true});let s$1={eid:e,show(){return j$1(t,e,true),s$1},hide(){return j$1(t,e,false),s$1},move(u,g$1){return x(t,e,u,g$1),g(t,e),s$1},setPosition(u,g$1){return s(t,e,u,g$1),g(t,e),s$1},setText(u){return tt(t,e,u,r.font),s$1},getText(){return a.get(e)??""},focus(){return _$1(t,e),s$1},blur(){return $(t,e),s$1},isFocused(){return Y$1(t,e)},append(u){return d(t,e,u),s$1},getChildren(){return f$2(t,e)},destroy(){c.isBigText[e]=0,a.delete(e),e$1(t,e);}};return s$1}function w(t,i,n,r){let e$1=q(r);if(e$1){let s=B(e$1,n);a.set(i,n),e(t,i,s),g(t,i);return}j(r).then(s=>{let u=B(s,n);a.set(i,n),e(t,i,u),g(t,i);});}function tt(t,i,n,r){return w(t,i,n,r),i}function pt(t,i){return c.isBigText[i]===1}function lt(){c.isBigText.fill(0),a.clear();}export{J as a,c as b,H as c,ft as d,ct as e,w as f,pt as g,lt as h};
@@ -1,2 +0,0 @@
1
- import {c as c$4}from'./chunk-H2YAOJDW.js';import {O,v,u,x,Z,Ja,X,W as W$2,Nc,nd,Ld,le,pe,$a,db,Bb,ub,Pb,fc,lc,vc,Ac,wc,qe}from'./chunk-P6CJO3BC.js';import {d as d$3,c as c$3,e as e$1}from'./chunk-BCADUCOZ.js';import {c as c$1,d as d$2}from'./chunk-KD55INV7.js';import {k,a,b as b$1,l}from'./chunk-PSXXMBVJ.js';import {s,i,j as j$1}from'./chunk-LCN2ZITE.js';import {d as d$1,e}from'./chunk-FYEBZAWN.js';import {V as V$1,W as W$1,r,K,c as c$2,d as d$4}from'./chunk-W5OU7Z6J.js';import {c,b}from'./chunk-G7GIWWLE.js';import {n,d,h}from'./chunk-PXXGH3BV.js';import {z as z$1}from'zod';s();n();var j=z$1.object({x:z$1.number().optional(),y:z$1.number().optional(),z:z$1.number().optional(),absolute:z$1.boolean().optional()}),R=z$1.object({width:z$1.union([z$1.number(),z$1.string()]).optional(),height:z$1.union([z$1.number(),z$1.string()]).optional(),minWidth:z$1.number().optional(),maxWidth:z$1.number().optional(),minHeight:z$1.number().optional(),maxHeight:z$1.number().optional(),shrink:z$1.boolean().optional()}),L=z$1.object({fg:z$1.number().optional(),bg:z$1.number().optional(),bold:z$1.boolean().optional(),italic:z$1.boolean().optional(),underline:z$1.boolean().optional(),strikethrough:z$1.boolean().optional(),dim:z$1.boolean().optional(),inverse:z$1.boolean().optional(),blink:z$1.boolean().optional(),visible:z$1.boolean().optional()}),W=z$1.object({type:z$1.number().optional(),left:z$1.boolean().optional(),right:z$1.boolean().optional(),top:z$1.boolean().optional(),bottom:z$1.boolean().optional(),fg:z$1.number().optional(),bg:z$1.number().optional(),chars:z$1.custom().optional()}),N=z$1.object({left:z$1.number().optional(),right:z$1.number().optional(),top:z$1.number().optional(),bottom:z$1.number().optional()}),ft=z$1.object({text:z$1.string().optional(),align:z$1.number().optional(),valign:z$1.number().optional(),wrap:z$1.boolean().optional(),parseTags:z$1.boolean().optional()}),ee=z$1.object({clickable:z$1.boolean().optional(),draggable:z$1.boolean().optional(),hoverable:z$1.boolean().optional(),keyable:z$1.boolean().optional(),hoverEffectFg:z$1.number().optional(),hoverEffectBg:z$1.number().optional()}),Q=z$1.object({focusable:z$1.boolean().optional(),tabIndex:z$1.number().optional(),focusEffectFg:z$1.number().optional(),focusEffectBg:z$1.number().optional()}),et=z$1.object({scrollable:z$1.boolean().optional(),scrollX:z$1.number().optional(),scrollY:z$1.number().optional(),scrollWidth:z$1.number().optional(),scrollHeight:z$1.number().optional(),scrollbarVisible:z$1.number().optional()}),dt=z$1.object({parent:z$1.number().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L),pt=z$1.object({parent:z$1.number().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(ft),ct=z$1.object({parent:z$1.number().optional(),label:z$1.string().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(ee).merge(Q),mt=z$1.object({width:z$1.number().int().positive(),height:z$1.number().int().positive(),title:z$1.string().optional(),cursorVisible:z$1.boolean().optional(),cursorShape:z$1.number().int().min(0).max(5).optional(),fullUnicode:z$1.boolean().optional(),autoPadding:z$1.boolean().optional()}),gt=z$1.object({parent:z$1.number().optional(),value:z$1.string().optional(),placeholder:z$1.string().optional(),maxLength:z$1.number().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(ee).merge(Q),bt=z$1.object({parent:z$1.number().optional(),items:z$1.array(z$1.string()).optional(),selectedIndex:z$1.number().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(et).merge(Q),yt=z$1.object({parent:z$1.number().optional(),label:z$1.string().optional(),checked:z$1.boolean().optional(),checkedChar:z$1.string().optional(),uncheckedChar:z$1.string().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(ee).merge(Q),vt=z$1.object({parent:z$1.number().optional(),value:z$1.string().optional(),placeholder:z$1.string().optional(),secret:z$1.boolean().optional(),censor:z$1.string().optional(),maxLength:z$1.number().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(ee).merge(Q),ht=z$1.object({parent:z$1.number().optional(),value:z$1.string().optional(),placeholder:z$1.string().optional(),maxLength:z$1.number().optional(),scrollable:z$1.boolean().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(ee).merge(Q).merge(et),Et=z$1.object({parent:z$1.number().optional(),options:z$1.array(z$1.object({label:z$1.string(),value:z$1.string()})).optional(),selectedIndex:z$1.number().optional(),placeholder:z$1.string().optional(),closedIndicator:z$1.string().optional(),openIndicator:z$1.string().optional(),selectedMark:z$1.string().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(ee).merge(Q),St=z$1.object({parent:z$1.number().optional(),min:z$1.number().optional(),max:z$1.number().optional(),value:z$1.number().optional(),step:z$1.number().optional(),orientation:z$1.number().optional(),showValue:z$1.boolean().optional(),trackChar:z$1.string().optional(),thumbChar:z$1.string().optional(),fillChar:z$1.string().optional(),trackFg:z$1.number().optional(),trackBg:z$1.number().optional(),thumbFg:z$1.number().optional(),thumbBg:z$1.number().optional(),fillFg:z$1.number().optional(),fillBg:z$1.number().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(ee).merge(Q),xt=z$1.object({parent:z$1.number().optional(),keys:z$1.boolean().optional(),submitOnEnter:z$1.boolean().optional(),fields:z$1.array(z$1.object({name:z$1.string(),entity:z$1.number(),initialValue:z$1.unknown().optional()})).optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L),Bt=z$1.object({parent:z$1.number().optional(),value:z$1.number().optional(),min:z$1.number().optional(),max:z$1.number().optional(),orientation:z$1.number().optional(),showPercentage:z$1.boolean().optional(),fillChar:z$1.string().optional(),emptyChar:z$1.string().optional(),fillFg:z$1.number().optional(),fillBg:z$1.number().optional(),emptyFg:z$1.number().optional(),emptyBg:z$1.number().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L),kt=z$1.object({parent:z$1.number().optional(),selectedIndex:z$1.number().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L),Ct=z$1.object({parent:z$1.number().optional(),radioSet:z$1.number().optional(),value:z$1.string().optional(),label:z$1.string().optional(),selected:z$1.boolean().optional(),selectedChar:z$1.string().optional(),unselectedChar:z$1.string().optional(),border:W.optional(),padding:N.optional()}).merge(j).merge(R).merge(L).merge(ee).merge(Q);function P(n,o){h(n,o,r),h(n,o,K),h(n,o,c$2),h(n,o,b),r.x[o]=0,r.y[o]=0,r.z[o]=0,r.absolute[o]=0,K.width[o]=0,K.height[o]=0,K.minWidth[o]=0,K.minHeight[o]=0,K.maxWidth[o]=Number.POSITIVE_INFINITY,K.maxHeight[o]=Number.POSITIVE_INFINITY,K.shrink[o]=0,c$2.visible[o]=1,c$2.dirty[o]=1,c$2.fg[o]=4294967295,c$2.bg[o]=255,c$2.bold[o]=0,c$2.underline[o]=0,c$2.blink[o]=0,c$2.inverse[o]=0,c$2.transparent[o]=0,b.parent[o]=0,b.firstChild[o]=0,b.nextSibling[o]=0,b.prevSibling[o]=0,b.childCount[o]=0,b.depth[o]=0;}function z(n,o){o.x!==void 0&&(r.x[n]=o.x),o.y!==void 0&&(r.y[n]=o.y),o.z!==void 0&&(r.z[n]=o.z),o.absolute!==void 0&&(r.absolute[n]=o.absolute?1:0);}function Ze(n){return typeof n=="string"&&n.endsWith("%")?-(Number.parseFloat(n)+2):n==="auto"?-1:n}function Tt(n,o){o.minWidth!==void 0&&(K.minWidth[n]=o.minWidth),o.maxWidth!==void 0&&(K.maxWidth[n]=o.maxWidth),o.minHeight!==void 0&&(K.minHeight[n]=o.minHeight),o.maxHeight!==void 0&&(K.maxHeight[n]=o.maxHeight),o.shrink!==void 0&&(K.shrink[n]=o.shrink?1:0);}function U(n,o){o.width!==void 0&&(K.width[n]=Ze(o.width)),o.height!==void 0&&(K.height[n]=Ze(o.height)),Tt(n,o);}function H(n,o,e){let t={};e.fg!==void 0&&(t.fg=e.fg),e.bg!==void 0&&(t.bg=e.bg),e.bold!==void 0&&(t.bold=e.bold),e.underline!==void 0&&(t.underline=e.underline),e.inverse!==void 0&&(t.inverse=e.inverse),e.blink!==void 0&&(t.blink=e.blink),Object.keys(t).length>0&&d$4(n,o,t),e.visible!==void 0&&(c$2.visible[o]=e.visible?1:0);}function V(n,o,e){if(!e||!(e.type!==void 0||e.left!==void 0||e.right!==void 0||e.top!==void 0||e.bottom!==void 0||e.fg!==void 0||e.bg!==void 0||e.chars!==void 0))return;i.type[o]=e.type??0,i.left[o]=0,i.right[o]=0,i.top[o]=0,i.bottom[o]=0,i.fg[o]=4294967295,i.bg[o]=255;let l={};e.type!==void 0&&(l.type=e.type),e.left!==void 0&&(l.left=e.left),e.right!==void 0&&(l.right=e.right),e.top!==void 0&&(l.top=e.top),e.bottom!==void 0&&(l.bottom=e.bottom),e.fg!==void 0&&(l.fg=e.fg),e.bg!==void 0&&(l.bg=e.bg),e.chars!==void 0&&(l.chars=e.chars),j$1(n,o,l);}function Y(n,o,e){if(!e||!(e.left!==void 0||e.right!==void 0||e.top!==void 0||e.bottom!==void 0))return;a.left[o]=0,a.right[o]=0,a.top[o]=0,a.bottom[o]=0;let l={};e.left!==void 0&&(l.left=e.left),e.right!==void 0&&(l.right=e.right),e.top!==void 0&&(l.top=e.top),e.bottom!==void 0&&(l.bottom=e.bottom),b$1(n,o,l);}function pn(n,o={}){let e=dt.parse(o),t=d(n);return P(n,t),z(t,e),U(t,e),H(n,t,e),V(n,t,e.border),Y(n,t,e.padding),e.parent!==void 0&&c(n,t,e.parent),t}function te(n,o){h(n,o,d$1),d$1.align[o]=0,d$1.valign[o]=0,d$1.wrap[o]=0,d$1.parseTags[o]=0,d$1.length[o]=0,d$1.hash[o]=0,d$1.contentId[o]=0;}function It(n,o){o.align!==void 0&&(d$1.align[n]=o.align),o.valign!==void 0&&(d$1.valign[n]=o.valign),o.wrap!==void 0&&(d$1.wrap[n]=o.wrap?1:0),o.parseTags!==void 0&&(d$1.parseTags[n]=o.parseTags?1:0);}function Ft(n,o,e$1){if(e$1.text!==void 0){let t={};e$1.align!==void 0&&(t.align=e$1.align),e$1.valign!==void 0&&(t.valign=e$1.valign),e$1.wrap!==void 0&&(t.wrap=e$1.wrap),e$1.parseTags!==void 0&&(t.parseTags=e$1.parseTags),e(n,o,e$1.text,t);}else It(o,e$1);}function cn(n,o={}){let e=pt.parse(o),t=d(n);return P(n,t),z(t,e),U(t,e),H(n,t,e),V(n,t,e.border),Y(n,t,e.padding),te(n,t),Ft(n,t,e),e.parent!==void 0&&c(n,t,e.parent),t}function mn(n,o={}){let e$1=ct.parse(o),t=d(n);P(n,t),z(t,e$1),U(t,e$1),H(n,t,e$1),V(n,t,e$1.border),Y(n,t,e$1.padding),d$1.align[t]=1,d$1.valign[t]=1,d$1.wrap[t]=0,d$1.parseTags[t]=0,d$1.length[t]=0,d$1.hash[t]=0,e$1.label!==void 0&&e(n,t,e$1.label),h(n,t,c$1),c$1.clickable[t]=1,c$1.draggable[t]=0,c$1.hoverable[t]=1,c$1.hovered[t]=0,c$1.pressed[t]=0,c$1.keyable[t]=1,c$1.hoverEffectFg[t]=4294967295,c$1.hoverEffectBg[t]=1145324799;let l={};e$1.clickable!==void 0&&(l.clickable=e$1.clickable),e$1.draggable!==void 0&&(l.draggable=e$1.draggable),e$1.hoverable!==void 0&&(l.hoverable=e$1.hoverable),e$1.keyable!==void 0&&(l.keyable=e$1.keyable),e$1.hoverEffectFg!==void 0&&(l.hoverEffectFg=e$1.hoverEffectFg),e$1.hoverEffectBg!==void 0&&(l.hoverEffectBg=e$1.hoverEffectBg),Object.keys(l).length>0&&d$2(n,t,l),h(n,t,V$1),V$1.focusable[t]=1,V$1.focused[t]=0,V$1.tabIndex[t]=0,V$1.focusEffectFg[t]=4294967295,V$1.focusEffectBg[t]=6750207;let u={};return e$1.focusable!==void 0&&(u.focusable=e$1.focusable),e$1.tabIndex!==void 0&&(u.tabIndex=e$1.tabIndex),e$1.focusEffectFg!==void 0&&(u.focusEffectFg=e$1.focusEffectFg),e$1.focusEffectBg!==void 0&&(u.focusEffectBg=e$1.focusEffectBg),Object.keys(u).length>0&&W$1(n,t,u),e$1.parent!==void 0&&c(n,t,e$1.parent),t}function gn(n,o){if(d$3(n))throw new Error("A screen already exists in this world. Only one screen is allowed.");let e=mt.parse(o),t=d(n);return P(n,t),r.x[t]=0,r.y[t]=0,r.z[t]=0,r.absolute[t]=0,K.width[t]=e.width,K.height[t]=e.height,c$2.visible[t]=1,c$2.dirty[t]=1,b.parent[t]=0,b.depth[t]=0,c$3(n,t,{cursorVisible:e.cursorVisible,cursorShape:e.cursorShape,fullUnicode:e.fullUnicode,autoPadding:e.autoPadding}),e$1(n,t),t}function bn(n,o={}){let e$1=gt.parse(o),t=d(n);P(n,t),z(t,e$1),U(t,e$1),H(n,t,e$1),V(n,t,e$1.border),Y(n,t,e$1.padding),d$1.align[t]=0,d$1.valign[t]=1,d$1.wrap[t]=0,d$1.parseTags[t]=0,d$1.length[t]=0,d$1.hash[t]=0,e$1.value!==void 0&&e(n,t,e$1.value),c$1.clickable[t]=1,c$1.draggable[t]=0,c$1.hoverable[t]=1,c$1.hovered[t]=0,c$1.pressed[t]=0,c$1.keyable[t]=1,c$1.hoverEffectFg[t]=4294967295,c$1.hoverEffectBg[t]=858993663;let l={};e$1.clickable!==void 0&&(l.clickable=e$1.clickable),e$1.draggable!==void 0&&(l.draggable=e$1.draggable),e$1.hoverable!==void 0&&(l.hoverable=e$1.hoverable),e$1.keyable!==void 0&&(l.keyable=e$1.keyable),e$1.hoverEffectFg!==void 0&&(l.hoverEffectFg=e$1.hoverEffectFg),e$1.hoverEffectBg!==void 0&&(l.hoverEffectBg=e$1.hoverEffectBg),Object.keys(l).length>0&&d$2(n,t,l),h(n,t,V$1),V$1.focusable[t]=1,V$1.focused[t]=0,V$1.tabIndex[t]=0,V$1.focusEffectFg[t]=4294967295,V$1.focusEffectBg[t]=6750207;let u={};return e$1.focusable!==void 0&&(u.focusable=e$1.focusable),e$1.tabIndex!==void 0&&(u.tabIndex=e$1.tabIndex),e$1.focusEffectFg!==void 0&&(u.focusEffectFg=e$1.focusEffectFg),e$1.focusEffectBg!==void 0&&(u.focusEffectBg=e$1.focusEffectBg),Object.keys(u).length>0&&W$1(n,t,u),e$1.parent!==void 0&&c(n,t,e$1.parent),t}function Mt(n,o,e){h(n,o,k),k.scrollX[o]=0,k.scrollY[o]=0,k.scrollWidth[o]=0,k.scrollHeight[o]=e,k.scrollbarVisible[o]=2;}function At(n,o,e){let t={};e.scrollable!==void 0&&(t.scrollX=0),e.scrollX!==void 0&&(t.scrollX=e.scrollX),e.scrollY!==void 0&&(t.scrollY=e.scrollY),e.scrollWidth!==void 0&&(t.scrollWidth=e.scrollWidth),e.scrollHeight!==void 0&&(t.scrollHeight=e.scrollHeight),e.scrollbarVisible!==void 0&&(t.scrollbarVisible=e.scrollbarVisible),Object.keys(t).length>0&&l(n,o,t);}function Pt(n){c$1.clickable[n]=1,c$1.draggable[n]=0,c$1.hoverable[n]=0,c$1.hovered[n]=0,c$1.pressed[n]=0,c$1.keyable[n]=1,c$1.hoverEffectFg[n]=4294967295,c$1.hoverEffectBg[n]=1145324799;}function Dt(n,o){h(n,o,V$1),V$1.focusable[o]=1,V$1.focused[o]=0,V$1.tabIndex[o]=0,V$1.focusEffectFg[o]=4294967295,V$1.focusEffectBg[o]=6750207;}function ne(n,o,e){let t={};e.focusable!==void 0&&(t.focusable=e.focusable),e.tabIndex!==void 0&&(t.tabIndex=e.tabIndex),e.focusEffectFg!==void 0&&(t.focusEffectFg=e.focusEffectFg),e.focusEffectBg!==void 0&&(t.focusEffectBg=e.focusEffectBg),Object.keys(t).length>0&&W$1(n,o,t);}function ie(n,o,e){let t={};e.clickable!==void 0&&(t.clickable=e.clickable),e.draggable!==void 0&&(t.draggable=e.draggable),e.hoverable!==void 0&&(t.hoverable=e.hoverable),e.keyable!==void 0&&(t.keyable=e.keyable),e.hoverEffectFg!==void 0&&(t.hoverEffectFg=e.hoverEffectFg),e.hoverEffectBg!==void 0&&(t.hoverEffectBg=e.hoverEffectBg),Object.keys(t).length>0&&d$2(n,o,t);}function ae(n,o){h(n,o,c$1),c$1.clickable[o]=1,c$1.draggable[o]=0,c$1.hoverable[o]=1,c$1.hovered[o]=0,c$1.pressed[o]=0,c$1.keyable[o]=1,c$1.hoverEffectFg[o]=4294967295,c$1.hoverEffectBg[o]=1145324799;}function re(n,o){h(n,o,V$1),V$1.focusable[o]=1,V$1.focused[o]=0,V$1.tabIndex[o]=0,V$1.focusEffectFg[o]=4294967295,V$1.focusEffectBg[o]=6750207;}function Kt(n,o,e){let t={};e.scrollX!==void 0&&(t.scrollX=e.scrollX),e.scrollY!==void 0&&(t.scrollY=e.scrollY),e.scrollWidth!==void 0&&(t.scrollWidth=e.scrollWidth),e.scrollHeight!==void 0&&(t.scrollHeight=e.scrollHeight),e.scrollbarVisible!==void 0&&(t.scrollbarVisible=e.scrollbarVisible),Object.keys(t).length>0&&l(n,o,t);}function Ot(n,o){let e={};o.trackChar!==void 0&&(e.trackChar=o.trackChar),o.thumbChar!==void 0&&(e.thumbChar=o.thumbChar),o.fillChar!==void 0&&(e.fillChar=o.fillChar),o.trackFg!==void 0&&(e.trackFg=o.trackFg),o.trackBg!==void 0&&(e.trackBg=o.trackBg),o.thumbFg!==void 0&&(e.thumbFg=o.thumbFg),o.thumbBg!==void 0&&(e.thumbBg=o.thumbBg),o.fillFg!==void 0&&(e.fillFg=o.fillFg),o.fillBg!==void 0&&(e.fillBg=o.fillBg),qe(n,e);}function yn(n,o={}){let e$1=bt.parse(o),t=d(n);return P(n,t),z(t,e$1),U(t,e$1),H(n,t,e$1),V(n,t,e$1.border),Y(n,t,e$1.padding),te(n,t),e$1.items!==void 0&&e$1.items.length>0&&e(n,t,e$1.items.join(`
2
- `)),Mt(n,t,e$1.items?.length??0),At(n,t,e$1),Dt(n,t),ne(n,t,e$1),Pt(t),e$1.parent!==void 0&&c(n,t,e$1.parent),t}function vn(n,o={}){let e$1=yt.parse(o),t=d(n);return P(n,t),z(t,e$1),U(t,e$1),H(n,t,e$1),V(n,t,e$1.border),Y(n,t,e$1.padding),te(n,t),d$1.align[t]=0,d$1.valign[t]=1,e$1.label!==void 0&&e(n,t,e$1.label),ae(n,t),ie(n,t,e$1),re(n,t),ne(n,t,e$1),O(t,{checkedChar:e$1.checkedChar??u,uncheckedChar:e$1.uncheckedChar??v}),x(n,t,e$1.checked??false),e$1.parent!==void 0&&c(n,t,e$1.parent),t}function hn(n,o={}){let e$1=vt.parse(o),t=d(n);return P(n,t),z(t,e$1),U(t,e$1),H(n,t,e$1),V(n,t,e$1.border),Y(n,t,e$1.padding),te(n,t),d$1.align[t]=0,d$1.valign[t]=1,e$1.value!==void 0&&e(n,t,e$1.value),ae(n,t),c$1.hoverEffectBg[t]=858993663,ie(n,t,e$1),re(n,t),ne(n,t,e$1),Z(n,t),Ja(t,{secret:e$1.secret??false,censor:e$1.censor??W$2,placeholder:e$1.placeholder??X,maxLength:e$1.maxLength??0}),e$1.parent!==void 0&&c(n,t,e$1.parent),t}function En(n,o={}){let e$1=ht.parse(o),t=d(n);return P(n,t),z(t,e$1),U(t,e$1),H(n,t,e$1),V(n,t,e$1.border),Y(n,t,e$1.padding),te(n,t),d$1.align[t]=0,d$1.valign[t]=0,e$1.value!==void 0&&e(n,t,e$1.value),ae(n,t),c$1.hoverEffectBg[t]=858993663,ie(n,t,e$1),re(n,t),ne(n,t,e$1),e$1.scrollable&&(h(n,t,k),k.scrollX[t]=0,k.scrollY[t]=0,k.scrollWidth[t]=0,k.scrollHeight[t]=0,k.scrollbarVisible[t]=2,Kt(n,t,e$1)),Z(n,t),Ja(t,{secret:false,censor:"",placeholder:e$1.placeholder??X,maxLength:e$1.maxLength??0,multiline:true}),e$1.parent!==void 0&&c(n,t,e$1.parent),t}function Sn(n,o={}){let e$1=Et.parse(o),t=d(n);P(n,t),z(t,e$1),U(t,e$1),H(n,t,e$1),V(n,t,e$1.border),Y(n,t,e$1.padding),te(n,t),d$1.align[t]=0,d$1.valign[t]=1,ae(n,t),c$1.hoverEffectBg[t]=858993663,ie(n,t,e$1),re(n,t),ne(n,t,e$1);let l=e$1.options??[],u=e$1.selectedIndex??-1;Nc(n,t,l,u);let b={};return e$1.closedIndicator!==void 0&&(b.closedIndicator=e$1.closedIndicator),e$1.openIndicator!==void 0&&(b.openIndicator=e$1.openIndicator),e$1.selectedMark!==void 0&&(b.selectedMark=e$1.selectedMark),nd(t,b),u>=0&&l[u]?e(n,t,l[u].label):e$1.placeholder&&e(n,t,e$1.placeholder),e$1.parent!==void 0&&c(n,t,e$1.parent),t}function xn(n,o={}){let e=St.parse(o),t=d(n);P(n,t),z(t,e),U(t,e),H(n,t,e),V(n,t,e.border),Y(n,t,e.padding),ae(n,t),c$1.draggable[t]=1,c$1.hoverEffectBg[t]=858993663,ie(n,t,e),re(n,t),ne(n,t,e);let l=e.min??0,u=e.max??100,b=e.value??0,y=e.step??1;return Ld(n,t,l,u,b,y),e.orientation!==void 0&&le(n,t,e.orientation),e.showValue!==void 0&&pe(n,t,e.showValue),Ot(t,e),e.parent!==void 0&&c(n,t,e.parent),t}function Bn(n,o={}){let e=xt.parse(o),t=d(n);if(P(n,t),z(t,e),U(t,e),H(n,t,e),V(n,t,e.border),Y(n,t,e.padding),$a(n,t,{keys:e.keys??true,submitOnEnter:e.submitOnEnter??true}),e.fields)for(let l of e.fields)db(n,t,l.entity,l.name,l.initialValue);return e.parent!==void 0&&c(n,t,e.parent),t}function kn(n,o={}){let e=Bt.parse(o),t=d(n);return P(n,t),z(t,e),U(t,e),H(n,t,e),V(n,t,e.border),Y(n,t,e.padding),Bb(n,t,{value:e.value??0,min:e.min??0,max:e.max??100,orientation:e.orientation??ub.Horizontal,showPercentage:e.showPercentage??false}),(e.fillChar!==void 0||e.emptyChar!==void 0||e.fillFg!==void 0||e.fillBg!==void 0||e.emptyFg!==void 0||e.emptyBg!==void 0)&&Pb(t,{fillChar:e.fillChar,emptyChar:e.emptyChar,fillFg:e.fillFg,fillBg:e.fillBg,emptyFg:e.emptyFg,emptyBg:e.emptyBg}),e.parent!==void 0&&c(n,t,e.parent),t}function Cn(n,o={}){let e=kt.parse(o),t=d(n);return P(n,t),z(t,e),U(t,e),H(n,t,e),V(n,t,e.border),Y(n,t,e.padding),fc(n,t),e.parent!==void 0&&c(n,t,e.parent),t}function Tn(n,o={}){let e$1=Ct.parse(o),t=d(n);return P(n,t),z(t,e$1),U(t,e$1),H(n,t,e$1),V(n,t,e$1.border),Y(n,t,e$1.padding),te(n,t),d$1.align[t]=0,d$1.valign[t]=1,e$1.label!==void 0&&e(n,t,e$1.label),ae(n,t),c$1.hoverEffectBg[t]=858993663,ie(n,t,e$1),re(n,t),ne(n,t,e$1),lc(n,t,e$1.radioSet),e$1.value!==void 0&&vc(t,e$1.value),(e$1.selectedChar!==void 0||e$1.unselectedChar!==void 0)&&Ac(t,{selectedChar:e$1.selectedChar,unselectedChar:e$1.unselectedChar}),e$1.parent!==void 0&&c(n,t,e$1.parent),e$1.selected&&wc(n,t),t}var jt=(t=>(t[t.STOPPED=0]="STOPPED",t[t.RUNNING=1]="RUNNING",t[t.PAUSED=2]="PAUSED",t))(jt||{});function ue(){let[n,o]=process.hrtime();return n+o/1e9}function Mn(n,o={},e={}){let t=n,l=c$4(),u={...e},b=0,y={targetFPS:o.targetFPS??60,fixedTimestep:o.fixedTimestep??true,maxDeltaTime:o.maxDeltaTime??.1,fixedTimestepMode:o.fixedTimestepMode},B=0,_=y.targetFPS>0?1/y.targetFPS:0,M=0,r=0,s=0,f=0,x=0,k=0,I=0,E=y.fixedTimestepMode?1/y.fixedTimestepMode.tickRate:1/60,q=0,oe=0,a=0,d=0,g=0,h=null,X=null;function Ee(){if(y.targetFPS===0)h=setImmediate(()=>me());else {let S=ue()-B,$=Math.max(0,_-S);$>.001?X=setTimeout(()=>me(),$*1e3):h=setImmediate(()=>me());}}function Se(){h!==null&&(clearImmediate(h),h=null),X!==null&&(clearTimeout(X),X=null);}function xe(p){u.onBeforeInput?.(t,p),t=l.run(t,p),u.onAfterInput?.(t,p),u.onBeforeUpdate?.(t,p),u.onAfterUpdate?.(t,p),u.onBeforeRender?.(t,p),u.onAfterRender?.(t,p),M++;}function Be(p){let S=y.fixedTimestepMode;if(!S)return;u.onBeforeInput?.(t,p),t=l.runInputOnly(t,p),u.onAfterInput?.(t,p),I+=p,g=0;let $=0;for(;I>=E;){if($>=S.maxUpdatesPerFrame){g=Math.floor(I/E),I=I%E;break}u.onBeforeFixedUpdate?.(t,E,q),u.onBeforeUpdate?.(t,E),t=l.runFixedUpdatePhases(t,E),u.onAfterUpdate?.(t,E),u.onAfterFixedUpdate?.(t,E,q),I-=E,q++,oe++,$++;}d=S.interpolate?I/E:0,S.interpolate&&u.onInterpolate&&u.onInterpolate(t,d),u.onBeforeRender?.(t,p),t=l.runRenderPhases(t,p),u.onAfterRender?.(t,p),M++;}function st(p,S){k=S*1e3,f++,p-s>=1&&(x=f,a=oe,f=0,oe=0,s=p);}function me(){if(b!==1)return;let p=ue(),S=p-B;B=p,S>y.maxDeltaTime&&(S=y.maxDeltaTime),y.fixedTimestepMode?Be(S):xe(S),st(p,S),Ee();}let ke={getState(){return b},isRunning(){return b===1},isPaused(){return b===2},isStopped(){return b===0},getStats(){return {fps:x,frameTime:k,frameCount:M,runningTime:b!==0?ue()-r:0,tickCount:q,ticksPerSecond:a,interpolationAlpha:d,skippedUpdates:g}},getInterpolationAlpha(){return d},getFixedTimestepConfig(){return y.fixedTimestepMode},isFixedTimestepMode(){return y.fixedTimestepMode!==void 0},getScheduler(){return l},getWorld(){return t},setWorld(p){if(b!==0)throw new Error("Cannot change world while loop is running");t=p;},setTargetFPS(p){y.targetFPS=p,_=p>0?1/p:0;},getTargetFPS(){return y.targetFPS},registerSystem(p,S,$=0){l.registerSystem(p,S,$);},unregisterSystem(p){l.unregisterSystem(p);},registerInputSystem(p,S=0){l.registerInputSystem(p,S);},setHooks(p){u={...u,...p};},start(){if(b===1)return;let p=b===0;b=1,B=ue(),p?(M=0,r=B,s=B,f=0,I=0,q=0,oe=0,a=0,d=0,g=0,u.onStart?.()):u.onResume?.(),Ee();},stop(){b!==0&&(Se(),b=0,u.onStop?.());},pause(){b===1&&(Se(),b=2,u.onPause?.());},resume(){b===2&&ke.start();},step(p){let S=ue(),$=p??(B>0?S-B:1/60);B=S;let fe=Math.min($,y.maxDeltaTime);y.fixedTimestepMode?Be(fe):xe(fe),k=fe*1e3;},stepFixed(){if(!y.fixedTimestepMode)throw new Error("stepFixed() requires fixedTimestepMode to be enabled");u.onBeforeFixedUpdate?.(t,E,q),u.onBeforeUpdate?.(t,E),t=l.runFixedUpdatePhases(t,E),u.onAfterUpdate?.(t,E),u.onAfterFixedUpdate?.(t,E,q),q++;}};return ke}function An(n){return n?.isRunning()??false}function Pn(n){return n?.isPaused()??false}var Rt=z$1.object({action:z$1.string().min(1,"Action name is required"),keys:z$1.array(z$1.string()).default([]),mouseButtons:z$1.array(z$1.enum(["left","right","middle","wheelUp","wheelDown","unknown"])).optional(),continuous:z$1.boolean().default(false),deadzone:z$1.number().min(0).max(1).default(.1)}),Lt=z$1.object({version:z$1.number().int().positive(),bindings:z$1.array(z$1.object({action:z$1.string(),keys:z$1.array(z$1.string()),mouseButtons:z$1.array(z$1.string()).optional(),continuous:z$1.boolean().optional()}))}),tt={active:false,justActivated:false,justDeactivated:false,activeTime:0,value:0},Wt=1;function Nt(n,o){for(let e of n.keys)if(o.isKeyDown(e))return true;for(let e of n.mouseButtons)if(o.isMouseButtonDown(e))return true;return false}function On(n){let o=new Map,e=new Map,t=new Map,l=new Set;function u(r,s,f){r.active=true,r.justActivated=true,r.activeTime=0,r.value=1,_(s,r,f);}function b(r,s,f){r.active=false,r.justDeactivated=true,r.value=0,_(s,r,f);}function y(r,s,f,x,k){r.activeTime+=x,r.value=1,s.continuous&&_(f,r,k);}function B(r,s,f,x,k){f.justActivated=false,f.justDeactivated=false;let I=f.active,E=Nt(s,k);E&&!I?u(f,r,k):!E&&I?b(f,r,k):E&&y(f,s,r,x,k);}function _(r,s,f){let x=t.get(r);if(x)for(let k of x)k(r,s,f);for(let k of l)k(r,s,f);}let M={register(r){let s=Rt.parse(r),f={action:s.action,keys:[...s.keys],mouseButtons:s.mouseButtons?[...s.mouseButtons]:[],continuous:s.continuous??false,deadzone:s.deadzone??.1};return o.set(s.action,f),e.has(s.action)||e.set(s.action,{...tt}),M},registerAll(r){for(let s of r)M.register(s);return M},unregister(r){let s=o.delete(r);return e.delete(r),t.delete(r),s},hasAction(r){return o.has(r)},getActions(){return [...o.keys()]},getBinding(r){let s=o.get(r);if(s)return {action:s.action,keys:[...s.keys],mouseButtons:s.mouseButtons.length>0?[...s.mouseButtons]:void 0,continuous:s.continuous,deadzone:s.deadzone}},update(r,s){let f=s*1e3;for(let[x,k]of o){let I=e.get(x);I&&B(x,k,I,f,r);}},isActive(r){return e.get(r)?.active??false},isJustActivated(r){return e.get(r)?.justActivated??false},isJustDeactivated(r){return e.get(r)?.justDeactivated??false},getValue(r){return e.get(r)?.value??0},getActiveTime(r){return e.get(r)?.activeTime??0},getState(r){return e.get(r)??tt},getActiveActions(){let r=[];for(let[s,f]of e)f.active&&r.push(s);return r},rebindKeys(r,s){let f=o.get(r);return f?(f.keys=[...s],true):false},rebindMouseButtons(r,s){let f=o.get(r);return f?(f.mouseButtons=[...s],true):false},addKey(r,s){let f=o.get(r);return f?(f.keys.includes(s)||f.keys.push(s),true):false},removeKey(r,s){let f=o.get(r);if(!f)return false;let x=f.keys.indexOf(s);return x!==-1?(f.keys.splice(x,1),true):false},getKeysForAction(r){let s=o.get(r);return s?[...s.keys]:[]},getMouseButtonsForAction(r){let s=o.get(r);return s?[...s.mouseButtons]:[]},getActionsForKey(r){let s=[];for(let[f,x]of o)x.keys.includes(r)&&s.push(f);return s},onAction(r,s){let f=t.get(r);return f||(f=new Set,t.set(r,f)),f.add(s),()=>{f?.delete(s);}},onAnyAction(r){return l.add(r),()=>{l.delete(r);}},saveBindings(){let r=[];for(let[,s]of o)r.push({action:s.action,keys:[...s.keys],mouseButtons:s.mouseButtons.length>0?[...s.mouseButtons]:void 0,continuous:s.continuous||void 0});return {version:Wt,bindings:r}},loadBindings(r){let s=Lt.parse(r);o.clear(),e.clear();for(let f of s.bindings)M.register({action:f.action,keys:f.keys,mouseButtons:f.mouseButtons,continuous:f.continuous});},toJSON(r=false){let s=M.saveBindings();return r?JSON.stringify(s,null,2):JSON.stringify(s)},fromJSON(r){let s=JSON.parse(r);M.loadBindings(s);},resetStates(){for(let r of e.values())r.active=false,r.justActivated=false,r.justDeactivated=false,r.activeTime=0,r.value=0;},clear(){o.clear(),e.clear(),t.clear(),l.clear();}};return n&&M.registerAll(n),M}var jn={platformer:[{action:"move_left",keys:["a","left"],continuous:true},{action:"move_right",keys:["d","right"],continuous:true},{action:"jump",keys:["space","w","up"]},{action:"crouch",keys:["s","down"],continuous:true},{action:"attack",keys:["j","enter"]}],topDown:[{action:"move_up",keys:["w","up"],continuous:true},{action:"move_down",keys:["s","down"],continuous:true},{action:"move_left",keys:["a","left"],continuous:true},{action:"move_right",keys:["d","right"],continuous:true},{action:"action",keys:["space","enter"]}],menu:[{action:"up",keys:["w","up"]},{action:"down",keys:["s","down"]},{action:"left",keys:["a","left"]},{action:"right",keys:["d","right"]},{action:"confirm",keys:["enter","space"]},{action:"cancel",keys:["escape","backspace"]}]};function ce(){return performance.now()}function he(n){return n.length===0?0:n.reduce((e,t)=>e+t,0)/n.length}function nt(n,o){if(n.length===0)return 0;if(n.length===1)return n[0]??0;let e=Math.ceil(o*n.length)-1;return n[Math.max(0,Math.min(e,n.length-1))]??0}function zt(n,o){o&&console.warn(`[InputEventBuffer] Dropped ${n} events due to buffer overflow`);}function Ut(n={}){let o=n.warnOnOverflow??true;return {keyEvents:[],mouseEvents:[],latencySamples:[],frameProcessingTimes:[],frameStartTime:0,totalKeyEvents:0,totalMouseEvents:0,droppedEvents:0,config:{maxBufferSize:n.maxBufferSize??1e3,maxLatencySamples:n.maxLatencySamples??1e3,maxFrameSamples:n.maxFrameSamples??100,warnOnOverflow:o,onOverflow:n.onOverflow??(e=>zt(e,o))}}}function ot(n,o){let e=n.config.maxBufferSize;if(e<=0)return 0;if(o.length>e){let t=o.length-e;return o.splice(0,t),n.droppedEvents+=t,n.config.onOverflow(t),t}return 0}function Ln(n,o,e){n.totalKeyEvents++;let t={type:"key",event:o,timestamp:e??ce()};n.keyEvents.push(t),ot(n,n.keyEvents);}function Wn(n,o,e){n.totalMouseEvents++;let t={type:"mouse",event:o,timestamp:e??ce()};n.mouseEvents.push(t),ot(n,n.mouseEvents);}function Ht(n){let o=n.keyEvents;return n.keyEvents=[],o}function Vt(n){let o=n.mouseEvents;return n.mouseEvents=[],o}function Nn(n){let o=Ht(n),e=Vt(n),t=[...o,...e];return t.sort((l,u)=>l.timestamp-u.timestamp),t}function zn(n){let o=[...n.keyEvents,...n.mouseEvents];return o.sort((e,t)=>e.timestamp-t.timestamp),o}function Un(n){return n.keyEvents}function Hn(n){return n.mouseEvents}function Vn(n){n.keyEvents=[],n.mouseEvents=[];}function Yn(n){return n.keyEvents.length}function _n(n){return n.mouseEvents.length}function Xn(n){return n.keyEvents.length+n.mouseEvents.length}function Gn(n){return n.keyEvents.length>0||n.mouseEvents.length>0}function Jn(n){return {totalKeyEvents:n.totalKeyEvents,totalMouseEvents:n.totalMouseEvents,pendingKeyEvents:n.keyEvents.length,pendingMouseEvents:n.mouseEvents.length,droppedEvents:n.droppedEvents,maxBufferSize:n.config.maxBufferSize}}function qn(n){n.totalKeyEvents=0,n.totalMouseEvents=0,n.droppedEvents=0;}function wn(n){n.frameStartTime=ce();}function $n(n){let e=ce()-n.frameStartTime;return n.frameProcessingTimes.push(e),n.frameProcessingTimes.length>n.config.maxFrameSamples&&n.frameProcessingTimes.shift(),e}function Qn(n,o){n.latencySamples.push(o),n.latencySamples.length>n.config.maxLatencySamples&&n.latencySamples.shift();}function Zn(n,o,e){for(let t=0;t<Math.min(e,10);t++)n.latencySamples.push(o);for(;n.latencySamples.length>n.config.maxLatencySamples;)n.latencySamples.shift();}function it(n){let o=n.latencySamples,e=n.frameProcessingTimes;if(o.length===0)return {min:0,max:0,avg:0,p95:0,p99:0,sampleCount:0,lastFrameProcessingTime:e[e.length-1]??0,avgFrameProcessingTime:he(e)};let t=[...o].sort((l,u)=>l-u);return {min:t[0]??0,max:t[t.length-1]??0,avg:he(t),p95:nt(t,.95),p99:nt(t,.99),sampleCount:t.length,lastFrameProcessingTime:e[e.length-1]??0,avgFrameProcessingTime:he(e)}}function eo(n){n.latencySamples=[],n.frameProcessingTimes=[];}function to(n,o=16){return it(n).p95<=o}function no(n,o=1){return it(n).avgFrameProcessingTime<=o}var oo=Ut();var at={pressed:false,justPressed:false,justReleased:false,heldTime:0,repeatCount:0,lastEventTime:0},se={pressed:false,justPressed:false,justReleased:false,heldTime:0,lastEventTime:0};function rt(){return {x:0,y:0,deltaX:0,deltaY:0,wheelDelta:0,buttons:{left:{...se},right:{...se},middle:{...se},wheelUp:{...se},wheelDown:{...se},unknown:{...se}}}}function Yt(n,o){return n.toLowerCase()}function ao(n={}){let o={trackRepeats:n.trackRepeats??true,debounceTime:n.debounceTime??0,customRepeatRate:n.customRepeatRate??0,customRepeatDelay:n.customRepeatDelay??500},e=new Map,t=rt(),l=0,u=0,b=0,y=false,B=false,_=false;function M(){for(let a of e.values())a.justPressed=false,a.justReleased=false;for(let a of Object.values(t.buttons))a.justPressed=false,a.justReleased=false;}function r(a){for(let d of e.values())d.pressed&&(d.heldTime+=a);}function s(a,d){return o.debounceTime<=0||a.lastEventTime<=0?false:d-a.lastEventTime<o.debounceTime}function f(a){o.trackRepeats&&a.repeatCount++;}function x(a){a.pressed=true,a.justPressed=true,a.justReleased=false,a.heldTime=0,a.repeatCount=0;}function k(a,d){let g=Yt(a.name),h=e.get(g);h||(h={...at},e.set(g,h)),!s(h,d)&&(h.pressed?f(h):x(h),h.lastEventTime=d,a.ctrl&&!h.pressed&&(y=true),a.meta&&!h.pressed&&(B=true),a.shift&&!h.pressed&&(_=true));}function I(a,d){let g=e.get(a);!g||!g.pressed||(g.pressed=false,g.justPressed=false,g.justReleased=true,g.lastEventTime=d,a==="ctrl"&&(y=false),a==="alt"&&(B=false),a==="shift"&&(_=false));}function E(a){let d=t.x,g=t.y;t.x=a.x,t.y=a.y,t.deltaX+=a.x-d,t.deltaY+=a.y-g;}function q(a,d,g){d==="press"&&!a.pressed?(a.pressed=true,a.justPressed=true,a.justReleased=false,a.heldTime=0):d==="release"&&a.pressed&&(a.pressed=false,a.justPressed=false,a.justReleased=true),a.lastEventTime=g;}function oe(a,d){E(a),a.button==="wheelUp"?t.wheelDelta+=1:a.button==="wheelDown"&&(t.wheelDelta-=1);let g=t.buttons[a.button];g&&q(g,a.action,d);}return {update(a,d,g){l++,u=a.length,b=d.length;let h=g*1e3;M(),r(h);for(let X of a)k(X.event,X.timestamp);t.deltaX=0,t.deltaY=0,t.wheelDelta=0;for(let X of d)oe(X.event,X.timestamp);for(let X of Object.values(t.buttons))X.pressed&&(X.heldTime+=h);},isKeyDown(a){return e.get(a.toLowerCase())?.pressed??false},isKeyPressed(a){return e.get(a.toLowerCase())?.justPressed??false},isKeyReleased(a){return e.get(a.toLowerCase())?.justReleased??false},getKeyHeldTime(a){return e.get(a.toLowerCase())?.heldTime??0},getKeyState(a){return e.get(a.toLowerCase())??at},getKeyRepeatCount(a){return e.get(a.toLowerCase())?.repeatCount??0},getPressedKeys(){let a=[];for(let[d,g]of e)g.pressed&&a.push(d);return a},getJustPressedKeys(){let a=[];for(let[d,g]of e)g.justPressed&&a.push(d);return a},getJustReleasedKeys(){let a=[];for(let[d,g]of e)g.justReleased&&a.push(d);return a},isCtrlDown(){return y},isAltDown(){return B},isShiftDown(){return _},hasModifier(){return y||B||_},isMouseButtonDown(a){return t.buttons[a]?.pressed??false},isMouseButtonPressed(a){return t.buttons[a]?.justPressed??false},isMouseButtonReleased(a){return t.buttons[a]?.justReleased??false},getMouseX(){return t.x},getMouseY(){return t.y},getMousePosition(){return {x:t.x,y:t.y}},getMouseDelta(){return {deltaX:t.deltaX,deltaY:t.deltaY}},getWheelDelta(){return t.wheelDelta},getMouseState(){return t},releaseKey(a){I(a.toLowerCase(),performance.now());},releaseAllKeys(){let a=performance.now();for(let[d,g]of e)g.pressed&&I(d,a);y=false,B=false,_=false;},releaseAllMouseButtons(){let a=performance.now();for(let d of Object.values(t.buttons))d.pressed&&(d.pressed=false,d.justReleased=true,d.lastEventTime=a);},releaseAll(){this.releaseAllKeys(),this.releaseAllMouseButtons();},getStats(){let a=0,d=0,g=0;for(let h of e.values())h.pressed&&a++,h.justPressed&&d++,h.justReleased&&g++;return {keysDown:a,keysPressed:d,keysReleased:g,keyEventsThisFrame:u,mouseEventsThisFrame:b,frameCount:l}},getFrameCount(){return l},reset(){e.clear(),t=rt(),l=0,u=0,b=0,y=false,B=false,_=false;}}}function ro(n,o){for(let e of o)if(n.isKeyDown(e))return true;return false}function so(n,o){for(let e of o)if(!n.isKeyDown(e))return false;return true}function lo(n,o){for(let e of o)if(n.isKeyPressed(e))return true;return false}function uo(n){let o=0,e=0;return (n.isKeyDown("a")||n.isKeyDown("left"))&&(o-=1),(n.isKeyDown("d")||n.isKeyDown("right"))&&(o+=1),(n.isKeyDown("w")||n.isKeyDown("up"))&&(e-=1),(n.isKeyDown("s")||n.isKeyDown("down"))&&(e+=1),{x:o,y:e}}export{qn as $,Bn as A,kn as B,Cn as C,Tn as D,jt as E,Mn as F,An as G,Pn as H,Rt as I,Lt as J,On as K,jn as L,Ut as M,Ln as N,Wn as O,Ht as P,Vt as Q,Nn as R,zn as S,Un as T,Hn as U,Vn as V,Yn as W,_n as X,Xn as Y,Gn as Z,Jn as _,dt as a,wn as aa,pt as b,$n as ba,ct as c,Qn as ca,mt as d,Zn as da,gt as e,it as ea,bt as f,eo as fa,yt as g,to as ga,vt as h,no as ha,ht as i,oo as ia,Et as j,ao as ja,St as k,ro as ka,xt as l,so as la,Bt as m,lo as ma,kt as n,uo as na,Ct as o,pn as p,cn as q,mn as r,gn as s,bn as t,yn as u,vn as v,hn as w,En as x,Sn as y,xn as z};
@@ -1 +0,0 @@
1
- import {r,c as c$1}from'./chunk-W5OU7Z6J.js';import {n,k as k$1}from'./chunk-PXXGH3BV.js';function c(){let e=new Map;function a(n,o,t){let r=e.get(n);r||(r=new Set,e.set(n,r));let s={handler:o,once:t};return r.add(s),()=>{r.delete(s),r.size===0&&e.delete(n);}}let d={on(n,o){return a(n,o,false)},once(n,o){return a(n,o,true)},off(n,o){let t=e.get(n);if(!t)return d;for(let r of t)if(r.handler===o){t.delete(r);break}return t.size===0&&e.delete(n),d},emit(n,o){let t=e.get(n);if(!t||t.size===0)return false;let r=[];for(let s of t)s.handler(o),s.once&&r.push(s);for(let s of r)t.delete(s);return t.size===0&&e.delete(n),true},removeAllListeners(n){return n===void 0?e.clear():e.delete(n),d},listenerCount(n){return e.get(n)?.size??0},eventNames(){return Array.from(e.keys())},hasListeners(n){return d.listenerCount(n)>0}};return d}n();function b(e){return k$1(e,[r,c$1])}var u={type:"bitecs",queryRenderables:b},l=new WeakMap;function x(e={}){return {...u,...e,type:e.type??u.type,queryRenderables:e.queryRenderables??u.queryRenderables}}function E(e,a){l.set(e,a);}function k(e){return l.get(e)??u}function A(e){l.delete(e);}export{c as a,u as b,x as c,E as d,k as e,A as f};
@@ -1 +0,0 @@
1
- var a={YYYY:t=>t.getFullYear().toString(),YY:t=>t.getFullYear().toString().slice(-2),MM:t=>(t.getMonth()+1).toString().padStart(2,"0"),DD:t=>t.getDate().toString().padStart(2,"0"),HH:t=>t.getHours().toString().padStart(2,"0"),hh:t=>{let e=t.getHours()%12;return (e===0?12:e).toString().padStart(2,"0")},mm:t=>t.getMinutes().toString().padStart(2,"0"),ss:t=>t.getSeconds().toString().padStart(2,"0"),SSS:t=>t.getMilliseconds().toString().padStart(3,"0"),SS:t=>Math.floor(t.getMilliseconds()/10).toString().padStart(2,"0"),AA:t=>t.getHours()<12?"AM":"PM",aa:t=>t.getHours()<12?"am":"pm"},o=new RegExp(Object.keys(a).sort((t,e)=>e.length-t.length).join("|"),"g");function g(t,e){return e.replace(o,r=>{let n=a[r];return n?n(t):r})}function i(t=new Date){return Math.floor(t.getTime()/1e3)}function s(t=new Date){return t.getTime()}export{g as a,i as b,s as c};
@@ -1 +0,0 @@
1
- import {M as M$1,L as L$1,c}from'./chunk-W5OU7Z6J.js';import {a as a$1}from'./chunk-G7GIWWLE.js';import {n,h,i}from'./chunk-PXXGH3BV.js';n();var l=1e4,b={BLOCK:0,UNDERLINE:1,BAR:2,BLINKING_BLOCK:3,BLINKING_UNDERLINE:4,BLINKING_BAR:5},o={cursorX:new Uint16Array(l),cursorY:new Uint16Array(l),cursorVisible:new Uint8Array(l),cursorShape:new Uint8Array(l),focused:new Uint32Array(l),hovered:new Uint32Array(l),fullUnicode:new Uint8Array(l),autoPadding:new Uint8Array(l)},a=new WeakMap;function g(r,e,n={}){h(r,e,o),o.cursorX[e]=0,o.cursorY[e]=0,o.cursorVisible[e]=n.cursorVisible!==false?1:0,o.cursorShape[e]=n.cursorShape??b.BLOCK,o.focused[e]=a$1,o.hovered[e]=a$1,o.fullUnicode[e]=n.fullUnicode!==false?1:0,o.autoPadding[e]=n.autoPadding===true?1:0;}function W(r){return a.has(r)}function C(r,e){if(a.has(r))throw new Error("A screen already exists in this world. Only one screen is allowed.");a.set(r,e);}function U(r){return a.get(r)??null}function v(r,e){return a.get(r)===e}function t(r,e){return i(r,e,o)}function A(r,e){if(t(r,e))return {x:o.cursorX[e],y:o.cursorY[e],visible:o.cursorVisible[e]===1,shape:o.cursorShape[e]}}function V(r,e,n,s){return t(r,e)?(o.cursorX[e]=Math.max(0,Math.floor(n)),o.cursorY[e]=Math.max(0,Math.floor(s)),true):false}function w(r,e,n){return t(r,e)?(o.cursorVisible[e]=n?1:0,true):false}function N(r,e,n){return t(r,e)?(o.cursorShape[e]=n,true):false}function P(r,e){if(!t(r,e))return null;let n=o.focused[e];return n===a$1?null:n}function L(r,e,n){return t(r,e)?(o.focused[e]=n??a$1,true):false}function I(r,e){if(!t(r,e))return null;let n=o.hovered[e];return n===a$1?null:n}function B(r,e,n){return t(r,e)?(o.hovered[e]=n??a$1,true):false}function D(r,e){if(!t(r,e))return;let n=M$1(r,e),s=o.focused[e],c=o.hovered[e];return {cursor:{x:o.cursorX[e],y:o.cursorY[e],visible:o.cursorVisible[e]===1,shape:o.cursorShape[e]},focused:s===a$1?null:s,hovered:c===a$1?null:c,fullUnicode:o.fullUnicode[e]===1,autoPadding:o.autoPadding[e]===1,width:n?.width??0,height:n?.height??0}}function Y(r,e){if(!t(r,e))return;let n=M$1(r,e);if(n)return {width:n.width,height:n.height}}function K(r,e,n,s){return !t(r,e)||n<=0||s<=0?false:(L$1(r,e,n,s),c.dirty[e]=1,true)}function M(r,e){return t(r,e)?o.fullUnicode[e]===1:false}function O(r,e,n){return t(r,e)?(o.fullUnicode[e]=n?1:0,true):false}function F(r,e){return t(r,e)?o.autoPadding[e]===1:false}function R(r,e,n){return t(r,e)?(o.autoPadding[e]=n?1:0,true):false}function X(r){return a.get(r)===void 0?false:(a.delete(r),true)}function _(r){a.delete(r);}export{b as a,o as b,g as c,W as d,C as e,U as f,v as g,t as h,A as i,V as j,w as k,N as l,P as m,L as n,I as o,B as p,D as q,Y as r,K as s,M as t,O as u,F as v,R as w,X as x,_ as y};
@@ -1,6 +0,0 @@
1
- import {i as i$1}from'./chunk-CIK4AMUA.js';import {ha,A,Q,I}from'./chunk-JKVHO4LH.js';import {c as c$2,a as a$1,b as b$2}from'./chunk-OMMJ7B5P.js';import {c as c$1,i as i$4,j}from'./chunk-KD55INV7.js';import {a,k}from'./chunk-PSXXMBVJ.js';import {s,i,m as m$1}from'./chunk-LCN2ZITE.js';import {d,e}from'./chunk-FYEBZAWN.js';import {r,K,c,V,s as s$1,L as L$1,d as d$2,m,n as n$1,Y}from'./chunk-W5OU7Z6J.js';import {b as b$1}from'./chunk-SHUC6JWA.js';import {b,i as i$3,f}from'./chunk-G7GIWWLE.js';import {n,i as i$2,g,d as d$1,e as e$1}from'./chunk-PXXGH3BV.js';s();n();n();var Se={snapshotInterval:5e3,maxSnapshots:100,entityLeakThreshold:10,heapLeakThreshold:1024*1024,trackedComponents:[]};function xe(t){let e={...Se,...t},n=[],o=null;function r(s){let a=g(s),u={};for(let{component:C,name:R}of e.trackedComponents){let $=0;for(let M of a)i$2(s,M,C)&&$++;u[R]=$;}let l=process.memoryUsage(),f={timestamp:Date.now(),entityCount:a.length,componentCounts:u,heapUsed:l.heapUsed,heapTotal:l.heapTotal,rss:l.rss,external:l.external};for(n.push(f);n.length>e.maxSnapshots;)n.shift();return f}function m(s,a){let u={},l=new Set([...Object.keys(s.componentCounts),...Object.keys(a.componentCounts)]);for(let f of l)u[f]=(a.componentCounts[f]??0)-(s.componentCounts[f]??0);return u}function c(s,a,u,l){let f=s/a;return f<=e.entityLeakThreshold?null:{type:"entity",message:`Entity count growing at ${f.toFixed(1)}/sec (${u.entityCount} -> ${l.entityCount})`,growthRate:f}}function g$1(s,a){let u=s/a;return u<=e.heapLeakThreshold?null:{type:"heap",message:`Heap growing at ${(u/1024).toFixed(1)}KB/sec`,growthRate:u}}function b(s,a){let u=[];for(let[l,f]of Object.entries(s)){let C=f/a;C>e.entityLeakThreshold&&u.push({type:"component",message:`${l} component growing at ${C.toFixed(1)}/sec`,growthRate:C});}return u}function d(s,a){let u=a.timestamp-s.timestamp,l=u/1e3,f=a.entityCount-s.entityCount,C=a.heapUsed-s.heapUsed,R=a.rss-s.rss,$=m(s,a),M=[];if(l>0){let N=c(f,l,s,a);N&&M.push(N);let K=g$1(C,l);K&&M.push(K);let he=b($,l);M.push(...he);}return {elapsed:u,entityCountDelta:f,componentDeltas:$,heapUsedDelta:C,rssDelta:R,possibleLeaks:M}}function i(s){return Math.abs(s)<1024?`${s}B`:Math.abs(s)<1024*1024?`${(s/1024).toFixed(1)}KB`:`${(s/(1024*1024)).toFixed(1)}MB`}function p(s,a){s.push("Memory Profile Report"),s.push("\u2550".repeat(40)),s.push(`Entities: ${a.entityCount}`),s.push(`Heap Used: ${i(a.heapUsed)}`),s.push(`Heap Total: ${i(a.heapTotal)}`),s.push(`RSS: ${i(a.rss)}`),s.push(`External: ${i(a.external)}`);}function S(s,a){if(Object.keys(a.componentCounts).length!==0){s.push(""),s.push("Component Counts:");for(let[u,l]of Object.entries(a.componentCounts))s.push(` ${u}: ${l}`);}}function x(s,a){if(n.length<2)return;let u=n[0];if(!u)return;let l=d(u,a);if(s.push(""),s.push(`Trends (over ${(l.elapsed/1e3).toFixed(0)}s):`),s.push(` Entity delta: ${l.entityCountDelta>0?"+":""}${l.entityCountDelta}`),s.push(` Heap delta: ${l.heapUsedDelta>0?"+":""}${i(l.heapUsedDelta)}`),l.possibleLeaks.length>0){s.push(""),s.push("WARNINGS:");for(let f of l.possibleLeaks)s.push(` [${f.type}] ${f.message}`);}}return {snapshot(s){return r(s)},diff(s,a){return d(s,a)},getSnapshots(){return n},getLatestSnapshot(){return n.length>0?n[n.length-1]??null:null},getReport(s){let a=r(s),u=[];return p(u,a),S(u,a),x(u,a),u.join(`
2
- `)},startAutoSnapshot(s){o===null&&(e.snapshotInterval<=0||(r(s),o=setInterval(()=>{r(s);},e.snapshotInterval)));},stopAutoSnapshot(){o!==null&&(clearInterval(o),o=null);},reset(){n.length=0,o!==null&&(clearInterval(o),o=null);}}}n();var Ce={x:0,y:0,width:35,toggleKey:"F12",showFPS:true,showEntityCount:true,showMemory:true,showSystemTimings:true,maxSystemsShown:5,bgColor:33023,fgColor:4294967295,visibleOnStart:false};function Me(t,e$2={}){let n={...Ce,...e$2},o=n.visibleOnStart,r=null;n.showSystemTimings&&!ye()&&ge(true);function m$1(){let i=d$1(t);return s$1(t,i,n.x,n.y,9999),L$1(t,i,n.width,10),d$2(t,i,{fg:n.fgColor,bg:n.bgColor}),m(t,i),e(t,i,"Loading..."),b$2(i,"name","__debug_overlay__"),i}function c(i,p){return `\u2502 FPS: \x1B[${i>=55?"32":i>=30?"33":"31"}m${i.toString().padStart(3)}\x1B[0m (${p.toFixed(1)}ms)`}function g(i){let p=H(),S=Object.entries(p).filter(([,s])=>s>0).sort(([,s],[,a])=>a-s).slice(0,i);if(S.length===0)return [];let x=["\u251C\u2500 Systems \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"];for(let[s,a]of S){let u=a.toFixed(2).padStart(6),l=s.length>20?`${s.slice(0,17)}...`:s;x.push(`\u2502 ${l.padEnd(20)} ${u}ms`);}return x}function b(i){let p=["\u250C\u2500 Debug \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"];return n.showFPS&&p.push(c(i.fps,i.frameTime)),n.showEntityCount&&p.push(`\u2502 Entities: ${i.entityCount}`),n.showMemory&&i.memoryUsageMB!==null&&p.push(`\u2502 Memory: ${i.memoryUsageMB.toFixed(1)}MB`),n.showSystemTimings&&p.push(...g(n.maxSystemsShown)),p.push(`\u2502 Frame: ${i.frameCount}`),p.push(`\u2502 Time: ${i.runningTime.toFixed(1)}s`),p.push("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),p.join(`
3
- `)}let d={get visible(){return o},get entity(){return r},get config(){return n},show(){o=true,r||(r=m$1()),m(t,r);},hide(){o=false,r&&n$1(t,r);},toggle(){o?d.hide():d.show();},update(i,p){if(!o||!r)return;let S=de(i,p),x=b(S);e(i,r,x);let s=x.split(`
4
- `).length;L$1(i,r,n.width,s);},destroy(){r&&(e$1(t,r),r=null),o=false;}};return o&&(r=m$1()),d}function Ee(t=20){let e=[];return {get entries(){return e},get maxEntries(){return t},log(n,o){for(e.push({type:n,detail:o,timestamp:Date.now()});e.length>t;)e.shift();},clear(){e.length=0;},getRecentEntries(n=5){return e.slice(-n)}}}function ve(){let t=new Map,e=new Map;return {start(n){t.set(n,performance.now());},end(n){let o=t.get(n);if(o===void 0)return 0;let r=performance.now()-o;t.delete(n);let m=e.get(n);return m?(m.total+=r,m.min=Math.min(m.min,r),m.max=Math.max(m.max,r),m.count++):e.set(n,{total:r,min:r,max:r,count:1}),r},getAverage(n){let o=e.get(n);return !o||o.count===0?0:o.total/o.count},getAll(){let n={};for(let[o,r]of e)n[o]={avg:r.count>0?r.total/r.count:0,min:r.min,max:r.max,count:r.count};return n},reset(){t.clear(),e.clear();}}}function Te(t=60){let e=[],n=0;return {addSample(o){for(e.push(o),n+=o;e.length>t;){let r=e.shift();r!==void 0&&(n-=r);}},getSamples(){return e},getCurrentFPS(){if(e.length===0)return 0;let o=e[e.length-1]??0;return o>0?1e3/o:0},getAverageFPS(){if(e.length===0)return 0;let o=n/e.length;return o>0?1e3/o:0},getMinMaxFPS(){if(e.length===0)return {min:0,max:0};let o=Number.MAX_VALUE,r=0;for(let m of e)o=Math.min(o,m),r=Math.max(r,m);return {min:r>0?1e3/r:0,max:o>0?1e3/o:0}},reset(){e.length=0,n=0;}}}var L=false,P=new Map,w=null,G=0,$e=100,_=[{component:r,name:"Position"},{component:K,name:"Dimensions"},{component:c,name:"Renderable"},{component:d,name:"Content"},{component:i,name:"Border"},{component:a,name:"Padding"},{component:b,name:"Hierarchy"},{component:c$1,name:"Interactive"},{component:V,name:"Focusable"},{component:k,name:"Scrollable"},{component:ha,name:"Velocity"},{component:A,name:"Animation"},{component:Q,name:"Collider"},{component:i$1,name:"Shadow"}];function De(t,e,n,o){if(!i$2(t,e,n))return null;let r={},m=n;for(let[c,g]of Object.entries(m))if(ArrayBuffer.isView(g)||Array.isArray(g)){let b=g;r[c]=b[e];}return {name:o,data:r}}function we(t,e){let n=[];for(let{component:c,name:g}of _){let b=De(t,e,c,g);b&&n.push(b);}let o=i$2(t,e,b)?i$3(t,e):null,r=i$2(t,e,b)?f(t,e):[],m=c$2(e,"name")?a$1(e,"name")??null:null;return {entity:e,name:m,components:n,parent:o===0?null:o,children:r}}function Pe(t){let e=[],n=t.name?` (${t.name})`:"";e.push(`Entity ${t.entity}${n}`),t.parent!==null&&e.push(`\u251C\u2500 Parent: ${t.parent}`),t.children.length>0&&e.push(`\u251C\u2500 Children: [${t.children.join(", ")}]`);let o=t.components.length;return t.components.forEach((r,m)=>{let g=m===o-1?"\u2514\u2500":"\u251C\u2500",b=Object.entries(r.data).map(([d,i])=>{if(typeof i=="number"){if(d==="fg"||d==="bg"){let{r:p,g:S,b:x,a:s}=b$1(i>>>0),a=u=>u.toString(16).padStart(2,"0");return `${d}=#${a(p)}${a(S)}${a(x)}${a(Math.round(s*255))}`}if(!Number.isInteger(i))return `${d}=${i.toFixed(2)}`}return `${d}=${i}`}).join(", ");e.push(`${g} ${r.name}: ${b}`);}),e.join(`
5
- `)}function Le(t){let e=g(t),n={},o=[];for(let{name:r}of _)n[r]=0;for(let r of e){for(let{component:m,name:c}of _)if(i$2(t,r,m)){let g=n[c]??0;n[c]=g+1;}i$2(t,r,b)&&i$3(t,r)===0&&o.push(r);}return {entityCount:e.length,componentCounts:n,hierarchyRoots:o}}function Re(t){let e=[];e.push("World Statistics"),e.push("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),e.push(`Entities: ${t.entityCount}`),e.push(""),e.push("Components:");let n=Object.entries(t.componentCounts).filter(([,o])=>o>0).sort(([,o],[,r])=>r-o);for(let[o,r]of n){let m=(r/t.entityCount*100).toFixed(0);e.push(` ${o}: ${r} (${m}%)`);}return t.hierarchyRoots.length>0&&(e.push(""),e.push(`Hierarchy Roots: [${t.hierarchyRoots.join(", ")}]`)),e.join(`
6
- `)}function ge(t){L=t,t||P.clear();}function ye(){return L}function ke(t,e){if(!L)return;let n=P.get(t);n?(n.totalTime+=e,n.callCount++):P.set(t,{name:t,totalTime:e,callCount:1});}function an(t,e){return(o=>{if(!L)return e(o);let r=performance.now(),m=e(o),c=performance.now()-r;return ke(t,c),m})}function H(){let t={};for(let[e,n]of P)t[e]=n.callCount>0?n.totalTime/n.callCount:0;return t}function mn(){P.clear();}function un(){w=null,G=0;}function de(t,e){let n=performance.now();if(w&&n-G<$e)return w;let o=e?.getStats()??{fps:0,frameTime:0,frameCount:0,runningTime:0},m=g(t).length,c=null;typeof process<"u"&&process.memoryUsage&&(c=process.memoryUsage().heapUsed/(1024*1024));let g$1=H();return w={fps:o.fps,frameTime:o.frameTime,frameCount:o.frameCount,runningTime:o.runningTime,entityCount:m,memoryUsageMB:c,systemTimings:g$1},G=n,w}var h={enabled:false,showHitboxes:true,showPadding:false,showMargins:false,color:4278255360};function ln(t,e){h.enabled=t,e&&(h.showHitboxes=e.showHitboxes??h.showHitboxes,h.showPadding=e.showPadding??h.showPadding,h.showMargins=e.showMargins??h.showMargins,h.color=e.color??h.color);}function cn(){return h.enabled}function pn(){return {...h}}function fn(t){return h.enabled?g(t).filter(n=>i$2(t,n,r)&&i$2(t,n,K)):[]}function We(t,e){let n=[];return i$2(t,e,V)&&Y(t,e)&&n.push("focused"),i$2(t,e,c$1)&&(i$4(t,e)&&n.push("hovered"),j(t,e)&&n.push("pressed")),I(t,e)&&n.push("animated"),m$1(t,e)&&n.push("bordered"),n}function gn(t,e){let n=[],o=c$2(e,"name")?a$1(e,"name"):null;if(n.push(`Entity ${e}${o?` (${o})`:""}`),i$2(t,e,r)){let m=Math.round(r.x[e]??0),c=Math.round(r.y[e]??0);n.push(`@ ${m},${c}`);}i$2(t,e,K)&&n.push(`[${K.width[e]}x${K.height[e]}]`);let r$1=We(t,e);return r$1.length>0&&n.push(r$1.join(" ")),n.join(" ")}function yn(t,e){let n=we(t,e),o=Pe(n);console.log(`[DEBUG] ${o}`);}function dn(t){let e=Le(t),n=Re(e);console.log(`[DEBUG] ${n}`);}export{xe as a,Me as b,Ee as c,ve as d,Te as e,_ as f,we as g,Pe as h,Le as i,Re as j,ge as k,ye as l,ke as m,an as n,H as o,mn as p,un as q,de as r,ln as s,cn as t,pn as u,fn as v,gn as w,yn as x,dn as y};
@@ -1 +0,0 @@
1
- import {f,c as c$1,e,b as b$1,d as d$1}from'./chunk-4LWWONFK.js';import {k as k$1,m as m$1,p,s as s$2,i as i$2,c as c$3,n as n$2,r as r$2}from'./chunk-FGHEFXLK.js';import {a as a$1,e as e$2,r as r$1,t,o as o$1}from'./chunk-C5PCEQ6G.js';import {a,e as e$3}from'./chunk-AQ7LW75B.js';import {c as c$4,a as a$2}from'./chunk-XZA63ZPO.js';import {v as v$1,c,o,m as m$2,p as p$2,k as k$2}from'./chunk-KD55INV7.js';import {s as s$1,n as n$1,l as l$1,i as i$3}from'./chunk-LCN2ZITE.js';import {r,K,V,e as e$1,p as p$1,i as i$1,c as c$2,ca,ia,ha,h,Z,_}from'./chunk-W5OU7Z6J.js';import {n,i,k}from'./chunk-PXXGH3BV.js';n();var s={eventQueue:[],capturedEntity:null,lastMouseX:0,lastMouseY:0,lastHoveredEntity:null,eventBus:a()};function ae(){s.eventQueue=[],s.capturedEntity=null,s.lastMouseX=0,s.lastMouseY=0,s.lastHoveredEntity=null;}function le(t){s.eventQueue.push({type:"key",event:t,timestamp:Date.now()});}function ce(t){s.eventQueue.push({type:"mouse",event:t,timestamp:Date.now()});}function me(){return s.eventQueue}function pe(){s.eventQueue=[];}function ye(){return s.eventBus}function de(t){s.capturedEntity=t;}function vt(){s.capturedEntity=null;}function Ee(){return s.capturedEntity!==null}function be(){return s.capturedEntity}function Bt(t,e,n,r$1){if(!i(t,e,r)||!i(t,e,K))return false;let o=r.x[e]??0,u=r.y[e]??0,i$1=K.width[e]??0,f=K.height[e]??0;return i$1<=0||f<=0?false:n>=o&&n<o+i$1&&r$1>=u&&r$1<u+f}function St(t,e,n){let r$1=[],o=Array.from(k(t,[r,K]));for(let u of o){if(!Bt(t,u,e,n))continue;let i=r.x[u]??0,f=r.y[u]??0,c=r.z[u]??0;r$1.push({entity:u,localX:e-i,localY:n-f,zIndex:c});}return r$1.sort((u,i)=>i.zIndex-u.zIndex),r$1}function xt(t,e,n){let r=St(t,e,n);for(let o of r)if(v$1(t,o.entity))return o.entity;return null}function It(t){switch(t){case "left":return c$3.LEFT;case "middle":return c$3.MIDDLE;case "right":return c$3.RIGHT;case "wheelUp":return c$3.WHEEL_UP;case "wheelDown":return c$3.WHEEL_DOWN;default:return c$3.NONE}}function Dt(t,e){let n=ca();if(e.name==="tab"){let r=Array.from(k(t,[V]));e.shift?ia(t,r):ha(t,r);return}if(n!==null){let r=e.raw.length>0?e.raw[0]??0:0;i$2(t,n,{lastKeyCode:r,lastKeyTime:Date.now(),ctrl:e.ctrl,meta:e.meta,shift:e.shift}),s.eventBus.emit("keypress",{key:e.name,ctrl:e.ctrl,meta:e.meta,shift:e.shift});}}function Ct(t,e,n,r,o$1){e!==n&&(e!==null&&v$1(t,e)&&(o(t,e,false),s.eventBus.emit("mouseleave",{x:r,y:o$1})),n!==null&&v$1(t,n)&&m$2(t,n)&&(o(t,n,true),s.eventBus.emit("mouseenter",{x:r,y:o$1})),s.lastHoveredEntity=n);}function Rt(t,e,n,r,o){p(t,e)&&(n$2(t,e,{x:n,y:r,button:o,pressed:true}),r$2(t,e,n,r,o)),v$1(t,e)&&p$2(t,e,true),s.eventBus.emit("mousedown",{x:n,y:r,button:o}),Z(t,e)&&_(t,e);}function Nt(t,e,n,r,o){p(t,e)&&n$2(t,e,{x:n,y:r,button:o,pressed:false}),v$1(t,e)&&p$2(t,e,false),s.eventBus.emit("mouseup",{x:n,y:r,button:o}),k$2(t,e)&&s.eventBus.emit("click",{x:n,y:r,button:o}),s.capturedEntity!==null&&vt();}function Mt(t,e){let n=e.x,r=e.y,o=It(e.button);s.lastMouseX=n,s.lastMouseY=r;let u=s.capturedEntity;if(u===null&&(u=xt(t,n,r)),Ct(t,s.lastHoveredEntity,u,n,r),s.eventBus.emit("mousemove",{x:n,y:r}),u!==null)switch(e.action){case "press":Rt(t,u,n,r,o);break;case "release":Nt(t,u,n,r,o);break;case "move":p(t,u)&&n$2(t,u,{x:n,y:r});break;case "wheel":{let i=o===c$3.WHEEL_UP?"up":"down";s.eventBus.emit("scroll",{direction:i,amount:1});break}}}var yt=t=>{let e=[...s.eventQueue];s.eventQueue=[];for(let n of e)n.type==="key"?Dt(t,n.event):n.type==="mouse"&&Mt(t,n.event);return t};function he(){return yt}function ge(t,e=0){t.registerInputSystem(yt,e);}function ve(t,e){k$1(t,e)&&m$1(t,e),p(t,e)&&s$2(t,e);}function Be(t){let e=Array.from(k(t,[c])),n=Array.from(k(t,[V])),r=new Set([...e,...n]);return Array.from(r)}var m="\x1B[",l={RESET:0,BOLD:1,DIM:2,ITALIC:3,UNDERLINE:4,BLINK:5,INVERSE:7,HIDDEN:8,STRIKETHROUGH:9,FG_256:38,BG_256:48};function dt(){return {lastX:-1,lastY:-1,lastFg:-1,lastBg:-1,lastAttrs:-1,alternateScreen:false}}function b(...t){return `${m}${t.join(";")}m`}function Ot(t,e){return `${m}${e+1};${t+1}H`}function Wt(t){return `${m}${t+1}G`}function At(t){return t===1?`${m}C`:`${m}${t}C`}function Et(t){return {a:t>>>24&255,r:t>>>16&255,g:t>>>8&255,b:t&255}}function Tt(t){let{r:e,g:n,b:r,a:o}=Et(t);return o===0?b(39):b(l.FG_256,2,e,n,r)}function Lt(t){let{r:e,g:n,b:r,a:o}=Et(t);return o===0?b(49):b(l.BG_256,2,e,n,r)}function Ht(t){let e=[];return t===a$1.NONE||(t&a$1.BOLD&&e.push(l.BOLD),t&a$1.DIM&&e.push(l.DIM),t&a$1.ITALIC&&e.push(l.ITALIC),t&a$1.UNDERLINE&&e.push(l.UNDERLINE),t&a$1.BLINK&&e.push(l.BLINK),t&a$1.INVERSE&&e.push(l.INVERSE),t&a$1.HIDDEN&&e.push(l.HIDDEN),t&a$1.STRIKETHROUGH&&e.push(l.STRIKETHROUGH),e.length===0)?"":b(...e)}function Kt(t,e,n){if(t.lastX===e&&t.lastY===n)return "";if(t.lastY===n){let r=e-t.lastX;return r===1?"":r>0&&r<=4?At(r):Wt(e)}return Ot(e,n)}function Pt(t,e){let n="";return t.lastAttrs!==-1&&t.lastAttrs!==a$1.NONE&&e.attrs===a$1.NONE&&(n+=b(l.RESET),t.lastFg=-1,t.lastBg=-1,t.lastAttrs=-1),e.attrs!==t.lastAttrs&&e.attrs!==a$1.NONE?(t.lastAttrs!==-1&&t.lastAttrs!==a$1.NONE&&(n+=b(l.RESET),t.lastFg=-1,t.lastBg=-1),n+=Ht(e.attrs),t.lastAttrs=e.attrs):e.attrs===a$1.NONE&&t.lastAttrs===-1&&(t.lastAttrs=a$1.NONE),e.fg!==t.lastFg&&(n+=Tt(e.fg),t.lastFg=e.fg),e.bg!==t.lastBg&&(n+=Lt(e.bg),t.lastBg=e.bg),n}function kt(t,e){let{x:n,y:r,cell:o}=e,u="";return u+=Kt(t,n,r),u+=Pt(t,o),u+=o.char,t.lastX=n+1,t.lastY=r,u}function Qt(t,e){if(e.length===0)return "";let n="",r=[...e].sort((o,u)=>o.y!==u.y?o.y-u.y:o.x-u.x);for(let o of r)n+=kt(t,o);return n}var T=null,g=null,d=null;function De(t){g=t;}function Ce(){return g}function Re(){g=null;}function Ne(t){d=t;}function Me(){return d}function Oe(){d=null;}function S(){return T||(T=dt()),T}function We(){T=dt();}var $t=t=>{if(!g||!d)return t;let e$1=f(d);if(e$1.length===0)return c$1(d),e(d),t;let n=S(),r=Qt(n,e$1);return r.length>0&&g.write(r),c$1(d),e(d),t};function Ae(){return $t}function v(t){g&&g.write(t);}function Te(){v(`${m}?25l`);}function Ut(){v(`${m}?25h`);}function Le(){v(`${m}?1049h`);let t=S();t.alternateScreen=true;}function Ft(){v(`${m}?1049l`);let t=S();t.alternateScreen=false;}function He(){v(`${m}2J`);}function Xt(){v(`${m}H`);let t=S();t.lastX=0,t.lastY=0;}function Yt(){v(b(l.RESET));let t=S();t.lastFg=-1,t.lastBg=-1,t.lastAttrs=-1;}function Ke(){S().alternateScreen&&Ft(),Yt(),Ut(),Xt();}s$1();n();function zt(t,e){if(!i(t,e,c$2))return a$1.NONE;let n=a$1.NONE;return c$2.bold[e]===1&&(n|=a$1.BOLD),c$2.underline[e]===1&&(n|=a$1.UNDERLINE),c$2.blink[e]===1&&(n|=a$1.BLINK),c$2.inverse[e]===1&&(n|=a$1.INVERSE),n}function _t(t,e){if(c$4(t,e))return {x:a$2.x[e],y:a$2.y[e],width:a$2.width[e],height:a$2.height[e]}}function Gt(t,e){return n$1(t,e)?{top:i$3.top[e]===1?1:0,right:i$3.right[e]===1?1:0,bottom:i$3.bottom[e]===1?1:0,left:i$3.left[e]===1?1:0}:{top:0,right:0,bottom:0,left:0}}function qt(t,e){return {x:t.x+e.left,y:t.y+e.top,width:Math.max(0,t.width-e.left-e.right),height:Math.max(0,t.height-e.top-e.bottom)}}function Vt(t,e,n){let{world:r,buffer:o}=t,u=e$1(r,e);if(!u||u.transparent)return;let i=zt(r,e),f=e$2(" ",u.fg,u.bg,i);r$1(o,n.x,n.y,n.width,n.height,f);}function L(t,e,n,r,o,u){let i=String.fromCodePoint(r);o$1(t,e,n,e$2(i,o,u));}function bt(t,e,n,r,o,u,i){let f=String.fromCodePoint(o),c=e$2(f,u,i);for(let p=0;p<r;p++)o$1(t,e+p,n,c);}function ht(t,e,n,r,o,u,i){let f=String.fromCodePoint(o),c=e$2(f,u,i);for(let p=0;p<r;p++)o$1(t,e,n+p,c);}function jt(t,e,n,r,o,u){if(!e)return;let{x:i,y:f,width:c,height:p}=n;r.top&&r.left&&L(t,i,f,e.charTopLeft,o,u),r.top&&r.right&&L(t,i+c-1,f,e.charTopRight,o,u),r.bottom&&r.left&&L(t,i,f+p-1,e.charBottomLeft,o,u),r.bottom&&r.right&&L(t,i+c-1,f+p-1,e.charBottomRight,o,u);}function wt(t,e,n,r,o,u){let i=r.left?1:0,f=n.width-i-(r.right?1:0);f<=0||(r.top&&bt(t,n.x+i,n.y,f,e,o,u),r.bottom&&bt(t,n.x+i,n.y+n.height-1,f,e,o,u));}function Jt(t,e,n,r,o,u){let i=r.top?1:0,f=n.height-i-(r.bottom?1:0);f<=0||(r.left&&ht(t,n.x,n.y+i,f,e,o,u),r.right&&ht(t,n.x+n.width-1,n.y+i,f,e,o,u));}function Zt(t,e,n){let{world:r,buffer:o}=t;if(!n$1(r,e))return;let u=l$1(r,e);if(!u||u.type===0||n.width<1||n.height<1)return;let{fg:i,bg:f}=u,c={left:u.left,top:u.top,right:u.right,bottom:u.bottom};jt(o,u,n,c,i,f),wt(o,u.charHorizontal,n,c,i,f),Jt(o,u.charVertical,n,c,i,f);}function Ge(t,e,n){}function qe(t,e,n){}function te(t,e){let{world:n,doubleBuffer:r}=t,o=_t(n,e);if(!o||o.width<=0||o.height<=0)return;Vt(t,e,o),Zt(t,e,o);let u=Gt(n,e);qt(o,u);d$1(r,o.x,o.y,o.width,o.height),h(n,e);}var x=null;function Ve(t){x=t;}function je(){return x}function we(){x=null;}var ee=t=>{if(!x)return t;let e=b$1(x),n={world:t,buffer:e,doubleBuffer:x},o=e$3(t).queryRenderables(t),u=[];for(let i of o)p$1(t,i)&&i$1(t,i)&&u.push({eid:i,z:r.z[i]});u.sort((i,f)=>i.z-f.z);for(let{eid:i}of u)te(n,i);return t};function Je(){return ee}function Ze(t$1,e,n,r,o,u,i=a$1.NONE){return t(t$1,e,n,r,o,u,i)}function tn(t,e,n,r,o,u){r$1(t,e,n,r,o,u);}function en(t){let n=e$3(t).queryRenderables(t);for(let r of n)c$2.dirty[r]=1;}export{Oe as A,S as B,We as C,$t as D,Ae as E,v as F,Te as G,Ut as H,Le as I,Ft as J,He as K,Xt as L,Yt as M,Ke as N,Vt as O,Zt as P,Ge as Q,qe as R,Ve as S,je as T,we as U,ee as V,Je as W,Ze as X,tn as Y,en as Z,s as a,ae as b,le as c,ce as d,me as e,pe as f,ye as g,de as h,vt as i,Ee as j,be as k,Bt as l,St as m,xt as n,yt as o,he as p,ge as q,ve as r,Be as s,dt as t,Qt as u,De as v,Ce as w,Re as x,Ne as y,Me as z};
@@ -1 +0,0 @@
1
- import {a}from'./chunk-WNG4A3K7.js';import {n,i as i$1,h as h$1}from'./chunk-PXXGH3BV.js';n();var i=1e4,E=(o=>(o[o.Left=0]="Left",o[o.Center=1]="Center",o[o.Right=2]="Right",o))(E||{}),m=(o=>(o[o.Top=0]="Top",o[o.Middle=1]="Middle",o[o.Bottom=2]="Bottom",o))(m||{}),u=new Map,f=1,s={set(t,n){let e=f++;return u.set(e,n),e},get(t){return u.get(t)??""},delete(t){u.delete(t);},clear(){u.clear(),f=1;}};function C(t){let n=5381;for(let e=0;e<t.length;e++)n=(n<<5)+n^t.charCodeAt(e);return n>>>0}var r={contentId:new Uint32Array(i),length:new Uint32Array(i),hash:new Uint32Array(i),wrap:new Uint8Array(i),align:new Uint8Array(i),valign:new Uint8Array(i),parseTags:new Uint8Array(i)};function b(t){r.contentId[t]=0,r.length[t]=0,r.hash[t]=0,r.wrap[t]=0,r.align[t]=0,r.valign[t]=0,r.parseTags[t]=0;}function l(t,n){i$1(t,n,r)||(h$1(t,n,r),b(n));}function T(t,n){n.wrap!==void 0&&(r.wrap[t]=n.wrap?1:0),n.align!==void 0&&(r.align[t]=n.align),n.valign!==void 0&&(r.valign[t]=n.valign),n.parseTags!==void 0&&(r.parseTags[t]=n.parseTags?1:0);}function y(t,n,e,o){l(t,n);let g=s.set(n,e);return r.contentId[n]=g,r.length[n]=e.length,r.hash[n]=C(e),o&&T(n,o),n}function h(t,n){if(!i$1(t,n,r))return "";let e=r.contentId[n];return s.get(e)}function w(t,n){if(!i$1(t,n,r))return;let e=r.contentId[n];return {text:s.get(e),length:r.length[n],hash:r.hash[n],wrap:r.wrap[n]===1,align:r.align[n],valign:r.valign[n],parseTags:r.parseTags[n]===1}}function v(t,n,e,o){let g=a(e);return y(t,n,g,o)}function I(t,n){let e=h(t,n);return a(e)}function A(t,n,e){let o=h(t,n);return y(t,n,o+e)}function U(t,n){if(!i$1(t,n,r))return n;let e=r.contentId[n];return e!==0&&s.delete(e),r.contentId[n]=0,r.length[n]=0,r.hash[n]=0,n}function O(t,n){return i$1(t,n,r)}function D(t,n){return i$1(t,n,r)?r.length[n]:0}function L(t,n){return i$1(t,n,r)?r.hash[n]:0}function P(t,n,e){return l(t,n),r.align[n]=e,n}function S(t,n,e){return l(t,n),r.valign[n]=e,n}function M(t,n,e){return l(t,n),r.wrap[n]=e?1:0,n}function _(t,n){return i$1(t,n,r)?r.wrap[n]===1:false}function B(t,n,e){return l(t,n),r.parseTags[n]=e?1:0,n}function F(t,n){return i$1(t,n,r)?r.parseTags[n]===1:false}function H(){s.clear();}export{E as a,m as b,s as c,r as d,y as e,h as f,w as g,v as h,I as i,A as j,U as k,O as l,D as m,L as n,P as o,S as p,M as q,_ as r,B as s,F as t,H as u};
@@ -1 +0,0 @@
1
- var f={enabled:false,scrollStep:1,horizontalStep:1,viewportHeight:24};function d(){return {mode:"normal",searchBuffer:"",lastSearch:"",lastSearchDirection:"forward",countPrefix:0,gPending:false}}function m(e){return {...f,...e}}function h(e,r,n){return n.enabled?r.mode==="search"?b(e,r):x(e,r,n):[{type:"none"},r]}function p(e,r,n){if(!n.enabled)return false;if(r.mode==="search")return true;let t=e.name;if(!e.ctrl&&!e.meta&&t>="1"&&t<="9"||r.countPrefix>0&&t==="0")return true;let i=new Set(["j","k","h","l","g","/","n"]);return !!(!e.ctrl&&!e.meta&&!e.shift&&i.has(t)||e.shift&&(t==="g"||t==="h"||t==="m"||t==="l"||t==="n")||e.ctrl&&(t==="d"||t==="u"||t==="f"||t==="b"))}function s(e,r){let n=e.name;if(!e.ctrl&&!e.meta&&!e.shift&&n>="1"&&n<="9"){let t=Number(n);return [{type:"none"},{...r,countPrefix:r.countPrefix*10+t,gPending:false}]}return r.countPrefix>0&&n==="0"&&!e.ctrl&&!e.meta?[{type:"none"},{...r,countPrefix:r.countPrefix*10}]:null}function g(e,r,n,t){let i=e.name,o=!e.ctrl&&!e.meta&&!e.shift;return i==="j"&&o?[{type:"scroll",direction:"down",amount:r*n.scrollStep},t]:i==="k"&&o?[{type:"scroll",direction:"up",amount:r*n.scrollStep},t]:i==="h"&&o?[{type:"scroll",direction:"left",amount:r*n.horizontalStep},t]:i==="l"&&o?[{type:"scroll",direction:"right",amount:r*n.horizontalStep},t]:null}function V(e,r,n){let t=e.name;return t==="g"&&!e.ctrl&&!e.meta&&!e.shift?r.gPending?[{type:"jump",target:"top"},n]:[{type:"none"},{...r,gPending:true}]:e.shift&&t==="g"?[{type:"jump",target:"bottom"},n]:e.shift&&t==="h"?[{type:"jump",target:"high"},n]:e.shift&&t==="m"?[{type:"jump",target:"middle"},n]:e.shift&&t==="l"?[{type:"jump",target:"low"},n]:null}function y(e,r){let n=e.name;return e.ctrl&&n==="d"?[{type:"page",direction:"down",amount:"half"},r]:e.ctrl&&n==="u"?[{type:"page",direction:"up",amount:"half"},r]:e.ctrl&&n==="f"?[{type:"page",direction:"down",amount:"full"},r]:e.ctrl&&n==="b"?[{type:"page",direction:"up",amount:"full"},r]:null}function S(e,r,n){let t=e.name;return t==="/"&&!e.ctrl&&!e.meta&&!e.shift?[{type:"enterSearch"},{...n,mode:"search",searchBuffer:""}]:t==="n"&&!e.ctrl&&!e.meta&&!e.shift?r.lastSearch?[{type:"searchNext",direction:r.lastSearchDirection},n]:[{type:"none"},n]:e.shift&&t==="n"?r.lastSearch?[{type:"searchNext",direction:r.lastSearchDirection==="forward"?"backward":"forward"},n]:[{type:"none"},n]:null}function x(e,r,n){let t=s(e,r);if(t)return t;let i=r.countPrefix>0?r.countPrefix:1,o={...r,countPrefix:0,gPending:false},a=g(e,i,n,o);if(a)return a;let u=V(e,r,o);if(u)return u;let c=y(e,o);if(c)return c;let l=S(e,r,o);return l||[{type:"none"},o]}function b(e,r){if(e.name==="return"||e.name==="enter")return r.searchBuffer.length===0?[{type:"exitSearch"},{...r,mode:"normal"}]:[{type:"search",query:r.searchBuffer,direction:"forward"},{...r,mode:"normal",lastSearch:r.searchBuffer,lastSearchDirection:"forward",searchBuffer:""}];if(e.name==="escape")return [{type:"exitSearch"},{...r,mode:"normal",searchBuffer:""}];if(e.name==="backspace")return r.searchBuffer.length===0?[{type:"exitSearch"},{...r,mode:"normal"}]:[{type:"none"},{...r,searchBuffer:r.searchBuffer.slice(0,-1)}];if(e.sequence.length===1&&!e.ctrl&&!e.meta){let n=r.searchBuffer+e.sequence;return [{type:"searchInput",char:e.sequence},{...r,searchBuffer:n}]}return [{type:"none"},r]}function w(e,r){return e==="half"?Math.max(1,Math.floor(r/2)):Math.max(1,r-1)}function P(e,r,n,t){switch(e){case "top":return 0;case "bottom":return Math.max(0,t-1);case "high":return r;case "middle":return r+Math.floor(n/2);case "low":return r+n-1}}export{d as a,m as b,h as c,p as d,w as e,P as f};
@@ -1 +0,0 @@
1
- var d=(r=>(r[r.INPUT=0]="INPUT",r[r.EARLY_UPDATE=1]="EARLY_UPDATE",r[r.UPDATE=2]="UPDATE",r[r.LATE_UPDATE=3]="LATE_UPDATE",r[r.PHYSICS=4]="PHYSICS",r[r.LAYOUT=5]="LAYOUT",r[r.RENDER=6]="RENDER",r[r.POST_RENDER=7]="POST_RENDER",r))(d||{});var u=0;function f(){return u}function l(o){o.sort((m,e)=>m.priority-e.priority);}function a(){let o=new Map,m=[];for(let e=0;e<=7;e++)o.set(e,[]);return {registerSystem(e,t,s=0){if(e===0)throw new Error("Cannot register systems to INPUT phase. INPUT phase is protected and always runs first.");let n=o.get(e);n&&(n.push({system:t,priority:s}),l(n));},registerInputSystem(e,t=0){m.push({system:e,priority:t}),l(m);},unregisterSystem(e){for(let[t,s]of o){if(t===0)continue;let n=s.findIndex(y=>y.system===e);n!==-1&&s.splice(n,1);}},unregisterInputSystem(e){let t=m.findIndex(s=>s.system===e);t!==-1&&m.splice(t,1);},run(e,t){u=t;let s=e;for(let n of m)s=n.system(s);for(let n=0;n<=7;n++){let y=o.get(n);if(y)for(let i of y)s=i.system(s);}return s},runInputOnly(e,t){u=t;let s=e;for(let y of m)s=y.system(s);let n=o.get(0);if(n)for(let y of n)s=y.system(s);return s},runFixedUpdatePhases(e,t){u=t;let s=e,n=[1,2,3,4];for(let y of n){let i=o.get(y);if(i)for(let r of i)s=r.system(s);}return s},runRenderPhases(e,t){u=t;let s=e,n=[5,6,7];for(let y of n){let i=o.get(y);if(i)for(let r of i)s=r.system(s);}return s},getSystemsForPhase(e){if(e===0)return m.map(s=>s.system);let t=o.get(e);return t?t.map(s=>s.system):[]},getSystemCount(e){if(e===0)return m.length;let t=o.get(e);return t?t.length:0},getTotalSystemCount(){let e=m.length;for(let t of o.values())e+=t.length;return e},hasSystem(e){if(m.some(t=>t.system===e))return true;for(let t of o.values())if(t.some(s=>s.system===e))return true;return false},clearPhase(e){if(e===0)throw new Error("Cannot clear INPUT phase. INPUT phase is protected.");let t=o.get(e);t&&(t.length=0);},clearAllSystems(){for(let[e,t]of o)e!==0&&(t.length=0);}}}export{d as a,f as b,a as c};
@@ -1,5 +0,0 @@
1
- import {i as i$2,k as k$1}from'./chunk-VOCM5T2G.js';import {s}from'./chunk-LCN2ZITE.js';import {n,i as i$1,h,j as j$1,k as k$2}from'./chunk-PXXGH3BV.js';import {z as z$1}from'zod';s();n();var I=1e4,i={current:new Float32Array(I),max:new Float32Array(I),regen:new Float32Array(I),invulnerable:new Uint8Array(I),invulnerableTime:new Float32Array(I)};function G(t){i.current[t]=0,i.max[t]=0,i.regen[t]=0,i.invulnerable[t]=0,i.invulnerableTime[t]=0;}function K(t,e,r){return i$1(t,e,i)||(h(t,e,i),G(e)),i.max[e]=r.max,i.current[e]=r.current??r.max,i.regen[e]=r.regen??0,e}function Y(t,e){if(i$1(t,e,i))return {current:i.current[e],max:i.max[e],regen:i.regen[e],invulnerable:i.invulnerable[e]===1,invulnerableTime:i.invulnerableTime[e]}}function z(t,e){return i$1(t,e,i)}function X(t,e){return i$1(t,e,i)&&j$1(t,e,i),e}function Z(t,e,r){return i$1(t,e,i)?r<=0?i.current[e]<=0:i.invulnerable[e]===1?false:(i.current[e]=Math.max(0,i.current[e]-r),i.current[e]<=0):false}function Q(t,e,r){i$1(t,e,i)&&(r<=0||(i.current[e]=Math.min(i.max[e],i.current[e]+r)));}function j(t,e,r){i$1(t,e,i)&&(i.invulnerable[e]=1,i.invulnerableTime[e]=r);}function q(t,e){i$1(t,e,i)&&(i.invulnerable[e]=0,i.invulnerableTime[e]=0);}function J(t,e){return i$1(t,e,i)?i.current[e]<=0:false}function $(t,e){return i$1(t,e,i)?i.invulnerable[e]===1:false}function ee(t,e){if(!i$1(t,e,i))return 0;let r=i.max[e];return r<=0?0:i.current[e]/r}function te(t,e,r){i$1(t,e,i)&&(i.current[e]=Math.max(0,Math.min(i.max[e],r)));}function re(t,e,r){i$1(t,e,i)&&(i.max[e]=r,i.current[e]>r&&(i.current[e]=r));}function ne(t,e,r){i$1(t,e,i)&&(i.regen[e]=r);}function oe(t,e,r){if(!i$1(t,e,i))return;if(i.invulnerable[e]===1){let a=i.invulnerableTime[e];a>0&&(i.invulnerableTime[e]=a-r,i.invulnerableTime[e]<=0&&(i.invulnerable[e]=0,i.invulnerableTime[e]=0));}let n=i.regen[e];n>0&&i.current[e]<i.max[e]&&(i.current[e]=Math.min(i.max[e],i.current[e]+n*r));}n();var _=1e4,V=(c=>(c[c.TopLeft=0]="TopLeft",c[c.TopCenter=1]="TopCenter",c[c.TopRight=2]="TopRight",c[c.BottomLeft=3]="BottomLeft",c[c.BottomCenter=4]="BottomCenter",c[c.BottomRight=5]="BottomRight",c[c.Left=6]="Left",c[c.Right=7]="Right",c))(V||{}),v=new Map,H=1,g={set(t){let e=H++;return v.set(e,t),e},update(t,e){t>0&&v.set(t,e);},get(t){return v.get(t)??""},delete(t){v.delete(t);},clear(){v.clear(),H=1;}};function ie(){g.clear();}var u={labelId:new Uint32Array(_),position:new Uint8Array(_),offsetX:new Int8Array(_),offsetY:new Int8Array(_)};function ae(t,e){return i$1(t,e,u)}function le(t,e,r,n={}){i$1(t,e,u)||(h(t,e,u),u.labelId[e]=0,u.position[e]=0,u.offsetX[e]=0,u.offsetY[e]=0);let a=u.labelId[e]??0;return a>0?g.update(a,r):u.labelId[e]=g.set(r),n.position!==void 0&&(u.position[e]=n.position),n.offsetX!==void 0&&(u.offsetX[e]=n.offsetX),n.offsetY!==void 0&&(u.offsetY[e]=n.offsetY),e}function se(t,e){if(!i$1(t,e,u))return "";let r=u.labelId[e]??0;return g.get(r)}function ce(t,e){return i$1(t,e,u)?{text:g.get(u.labelId[e]??0),position:u.position[e]??0,offsetX:u.offsetX[e]??0,offsetY:u.offsetY[e]??0}:null}function ue(t,e){return i$1(t,e,u)?u.position[e]:0}function me(t,e,r){return i$1(t,e,u)&&(u.position[e]=r),e}function pe(t,e,r,n){return i$1(t,e,u)&&(u.offsetX[e]=r,u.offsetY[e]=n),e}function de(t,e){if(!i$1(t,e,u))return e;let r=u.labelId[e]??0;return r>0&&g.delete(r),j$1(t,e,u),e}function Se(t,e){if(!i$1(t,e,u))return false;let r=u.labelId[e]??0;return r>0&&g.get(r).length>0}var fe=5e4,U=1e4,ge=2**31-1;function d(t){if(!Number.isFinite(t))return 0;let e=Math.trunc(t);return Math.max(0,Math.min(e,ge))}var be=z$1.object({line:z$1.number().int().nonnegative(),col:z$1.number().int().nonnegative()}),Ce=z$1.enum(["stream","rectangular"]),B=new Map;function k(){return {anchorLine:0,anchorCol:0,focusLine:0,focusCol:0,active:false,mode:"stream"}}function Te(t){let e=k();return B.set(t,e),e}function he(t){return B.get(t)}function xe(t){return B.has(t)}function ye(t){B.delete(t);}function Le(){B.clear();}function Ee(t,e,r,n="stream"){let a=d(e),l=d(r);t.anchorLine=a,t.anchorCol=l,t.focusLine=a,t.focusCol=l,t.active=true,t.mode=n;}function De(t,e,r){t.active&&(t.focusLine=d(e),t.focusCol=d(r));}function Ae(t){t.active=false,t.anchorLine=0,t.anchorCol=0,t.focusLine=0,t.focusCol=0,t.mode="stream";}function Ie(t){return t.active?t.anchorLine!==t.focusLine||t.anchorCol!==t.focusCol:false}function ve(t,e,r){let n=d(e),a=d(r);t.anchorLine=n,t.anchorCol=0,t.focusLine=n,t.focusCol=a,t.active=true,t.mode="stream";}function Be(t,e,r,n){let a=d(e),l=d(r),m=d(n);t.anchorLine=a,t.anchorCol=0,t.focusLine=l,t.focusCol=m,t.active=true,t.mode="stream";}function _e(t,e,r){let n=d(e);if(n===0)return;let a=d(r);t.anchorLine=0,t.anchorCol=0,t.focusLine=n-1,t.focusCol=a,t.active=true,t.mode="stream";}function Fe(t,e){t.mode=e;}function f(t){return t.active?t.anchorLine<t.focusLine||t.anchorLine===t.focusLine&&t.anchorCol<=t.focusCol?{start:{line:t.anchorLine,col:t.anchorCol},end:{line:t.focusLine,col:t.focusCol},mode:t.mode}:{start:{line:t.focusLine,col:t.focusCol},end:{line:t.anchorLine,col:t.anchorCol},mode:t.mode}:null}function Re(t){let e=f(t);return e?e.end.line-e.start.line+1:0}function Pe(t,e){let r=f(t);return r?e>=r.start.line&&e<=r.end.line:false}function Oe(t,e,r){let n=f(t);if(!n||e<n.start.line||e>n.end.line)return {fullLine:false,startCol:-1,endCol:-1};if(n.mode==="rectangular"){let l=Math.min(n.start.col,n.end.col),m=Math.max(n.start.col,n.end.col),p=Math.min(l,r),c=Math.min(m,r);return {fullLine:p===0&&c>=r,startCol:p,endCol:c}}return n.start.line===n.end.line?{fullLine:n.start.col===0&&n.end.col>=r,startCol:Math.min(n.start.col,r),endCol:Math.min(n.end.col,r)}:e===n.start.line?{fullLine:n.start.col===0,startCol:Math.min(n.start.col,r),endCol:r}:e===n.end.line?{fullLine:n.end.col>=r,startCol:0,endCol:Math.min(n.end.col,r)}:{fullLine:true,startCol:0,endCol:r}}function Me(t,e,r){let n=f(t);if(!n)return [];let a=Math.max(n.start.line,e),l=Math.min(n.end.line,r-1);if(a>l)return [];let m=[];for(let p=a;p<=l;p++)m.push(p);return m}function He(t,e){let r=f(t);if(!r)return "";let n=e.lineCount-1;if(n<0)return "";let a={start:{line:Math.max(0,Math.min(r.start.line,n)),col:r.start.col},end:{line:Math.max(0,Math.min(r.end.line,n)),col:r.end.col},mode:r.mode};return a.start.line>a.end.line?"":a.mode==="rectangular"?Ue(a,e):Ve(a,e)}function Ve(t,e){let{start:r,end:n}=t;if(r.line===n.line){let p=i$2(e,r.line);return p?p.slice(r.col,n.col):""}let a=[],l=i$2(e,r.line);if(a.push(l!==void 0?l.slice(r.col):""),n.line-r.line>1){let p=k$1(e,r.line+1,n.line);for(let c of p.lines)a.push(c);}let m=i$2(e,n.line);return a.push(m!==void 0?m.slice(0,n.col):""),a.join(`
2
- `)}function Ue(t,e){let r=Math.min(t.start.col,t.end.col),n=Math.max(t.start.col,t.end.col),a=k$1(e,t.start.line,t.end.line+1),l=[];for(let m of a.lines){let p=Math.min(r,m.length),c=Math.min(n,m.length);l.push(m.slice(p,c));}return l.join(`
3
- `)}function ke(t,e){let r=e.lineCount-1;if(r<0)return null;let n=Math.max(0,Math.min(t.start.line,r)),a=Math.max(0,Math.min(t.end.line,r));return n>a?null:{startLine:n,endLine:a,totalLines:a-n+1}}function*Ne(t,e,r,n,a,l){let m=Math.min(t.start.col,t.end.col),p=Math.max(t.start.col,t.end.col),c=[],x=0;for(let S=r;S<=n;S+=l){let y=Math.min(S+l,n+1),T=k$1(e,S,y);for(let h of T.lines){let R=Math.min(m,h.length),P=Math.min(p,h.length);c.push(h.slice(R,P));}x+=y-S,y<=n&&(yield {done:false,linesProcessed:x,totalLines:a,text:""});}yield {done:true,linesProcessed:x,totalLines:a,text:c.join(`
4
- `)};}function*we(t,e,r,n,a,l){let m=[],p=0,c=i$2(e,r);if(c!==void 0){if(r===n){m.push(c.slice(t.start.col,t.end.col)),yield {done:true,linesProcessed:1,totalLines:a,text:m[0]??""};return}m.push(c.slice(t.start.col));}p=1;let x=r+1,S=n;for(let T=x;T<S;T+=l){let h=Math.min(T+l,S),R=k$1(e,T,h);for(let P of R.lines)m.push(P);p+=h-T,h<S&&(yield {done:false,linesProcessed:p,totalLines:a,text:""});}let y=i$2(e,n);y!==void 0&&m.push(y.slice(0,t.end.col)),p=a,yield {done:true,linesProcessed:p,totalLines:a,text:m.join(`
5
- `)};}function*We(t,e,r=U){let n=f(t);if(!n){yield {done:true,linesProcessed:0,totalLines:0,text:""};return}let a=ke(n,e);if(!a){yield {done:true,linesProcessed:0,totalLines:0,text:""};return}let{startLine:l,endLine:m,totalLines:p}=a;if(n.mode==="rectangular"){yield*Ne(n,e,l,m,p,r);return}yield*we(n,e,l,m,p,r);}function Ge(t,e,r,n){let a=[],l=Math.min(t.start.line,e.start.line);l<r&&a.push([l,r-1]);let m=Math.max(t.end.line,e.end.line);return n<m&&a.push([n+1,m]),a}function Ke(t,e,r,n){if(r>n)return [];if(t.mode==="rectangular")return t.start.col!==e.start.col||t.end.col!==e.end.col?[[r,n]]:[];let a=[],l=t.start.line===e.start.line,m=t.start.col!==e.start.col;l&&m&&a.push([t.start.line,t.start.line]);let p=t.end.line===e.end.line,c=t.end.col!==e.end.col;return p&&c&&a.push([t.end.line,t.end.line]),a}function Ye(t,e){if(t.mode!==e.mode)return [[Math.min(t.start.line,e.start.line),Math.max(t.end.line,e.end.line)]];let r=Math.max(t.start.line,e.start.line),n=Math.min(t.end.line,e.end.line),a=[...Ge(t,e,r,n),...Ke(t,e,r,n)];return ze(a)}function ze(t){if(t.length<=1)return t;t.sort((r,n)=>r[0]-n[0]);let e=[];for(let r of t){let n=e[e.length-1];if(!n){e.push(r);continue}r[0]<=n[1]+1?r[1]>n[1]&&(n[1]=r[1]):e.push(r);}return e}function Xe(t,e){let r=t?f(t):null,n=f(e);return !r&&!n?[]:!r&&n?[[n.start.line,n.end.line]]:r&&!n?[[r.start.line,r.end.line]]:r&&n?Ye(r,n):[]}function Ze(t){return {anchorLine:t.anchorLine,anchorCol:t.anchorCol,focusLine:t.focusLine,focusCol:t.focusCol,active:t.active,mode:t.mode}}n();var b=1e4,o={duration:new Float32Array(b),elapsed:new Float32Array(b),remaining:new Float32Array(b),repeat:new Uint16Array(b),repeatCount:new Uint16Array(b),active:new Uint8Array(b),paused:new Uint8Array(b),autoDestroy:new Uint8Array(b)},N=65535,C=new Map;function Qe(t){o.duration[t]=0,o.elapsed[t]=0,o.remaining[t]=0,o.repeat[t]=0,o.repeatCount[t]=0,o.active[t]=0,o.paused[t]=0,o.autoDestroy[t]=0;}function je(t,e,r){return i$1(t,e,o)||(h(t,e,o),Qe(e)),o.duration[e]=r.duration,o.elapsed[e]=0,o.remaining[e]=r.duration,o.repeat[e]=r.repeat??0,o.repeatCount[e]=0,o.active[e]=r.active!==false?1:0,o.autoDestroy[e]=r.autoDestroy?1:0,o.paused[e]=0,e}function qe(t,e){i$1(t,e,o)&&(o.active[e]=1,o.paused[e]=0);}function Je(t,e){i$1(t,e,o)&&(o.paused[e]=1);}function $e(t,e){i$1(t,e,o)&&(o.paused[e]=0);}function et(t,e){i$1(t,e,o)&&(o.active[e]=0,o.paused[e]=0,o.elapsed[e]=0,o.remaining[e]=o.duration[e],o.repeatCount[e]=0);}function tt(t,e){i$1(t,e,o)&&(o.elapsed[e]=0,o.remaining[e]=o.duration[e],o.repeatCount[e]=0,o.active[e]=1,o.paused[e]=0);}function w(t,e){i$1(t,e,o)&&j$1(t,e,o),C.delete(e);}function rt(t,e){if(i$1(t,e,o))return {duration:o.duration[e],elapsed:o.elapsed[e],remaining:o.remaining[e],repeat:o.repeat[e],repeatCount:o.repeatCount[e],active:o.active[e]===1,paused:o.paused[e]===1,autoDestroy:o.autoDestroy[e]===1}}function nt(t,e){return i$1(t,e,o)}function ot(t,e){return i$1(t,e,o)?o.active[e]===1&&o.paused[e]===0:false}function it(t,e){return i$1(t,e,o)?o.active[e]===0&&o.elapsed[e]>0:false}function at(t,e){if(!i$1(t,e,o))return 0;let r=o.duration[e];if(r<=0)return 0;let n=o.remaining[e];return Math.max(0,Math.min(1,1-n/r))}function lt(t,e){let r=C.get(t)??{};r.onFire=e,C.set(t,r);}function st(t,e){let r=C.get(t)??{};r.onComplete=e,C.set(t,r);}function ct(t){C.delete(t);}function ut(){C.clear();}function mt(t,e){let r=[],n=[],a=dt(t);for(let l of a)o.active[l]!==1||o.paused[l]===1||(o.elapsed[l]=o.elapsed[l]+e,o.remaining[l]=o.remaining[l]-e,o.remaining[l]<=0&&(r.push(l),pt(t,l,n)));for(let l of n)w(t,l);return r}function pt(t,e,r){o.repeatCount[e]=o.repeatCount[e]+1;let n=C.get(e);n?.onFire&&n.onFire(t,e);let a=o.repeat[e],l=o.repeatCount[e];if(a===N||l<=a){o.remaining[e]=o.duration[e];return}o.active[e]=0,o.remaining[e]=0,n?.onComplete&&n.onComplete(t,e),o.autoDestroy[e]===1&&r.push(e);}function dt(t){return k$2(t,[o])}export{We as $,pe as A,de as B,Se as C,fe as D,U as E,be as F,Ce as G,k as H,Te as I,he as J,xe as K,ye as L,Le as M,Ee as N,De as O,Ae as P,Ie as Q,ve as R,Be as S,_e as T,Fe as U,f as V,Re as W,Pe as X,Oe as Y,Me as Z,He as _,i as a,Xe as aa,K as b,Ze as ba,Y as c,o as ca,z as d,N as da,X as e,je as ea,Z as f,qe as fa,Q as g,Je as ga,j as h,$e as ha,q as i,et as ia,J as j,tt as ja,$ as k,w as ka,ee as l,rt as la,te as m,nt as ma,re as n,ot as na,ne as o,it as oa,oe as p,at as pa,V as q,lt as qa,g as r,st as ra,ie as s,ct as sa,u as t,ut as ta,ae as u,mt as ua,le as v,se as w,ce as x,ue as y,me as z};
@@ -1,4 +0,0 @@
1
- import {f as f$2,e as e$1}from'./chunk-AEJIX2MW.js';import {e,f as f$4,k as k$2,c,b as b$1}from'./chunk-C5PCEQ6G.js';import {f as f$3,e as e$2,g as g$1,j}from'./chunk-TYMY2TBR.js';import {b,k as k$1,d as d$1,f as f$1}from'./chunk-KFAK4A3G.js';import {g}from'./chunk-W5OU7Z6J.js';import {q as q$1,p as p$1}from'./chunk-Z4EZERNE.js';import {z as z$1}from'zod';var mt="> ",gt=" ",pt=4294967295,dt=6750207,yt=3435973887,ht=255,xt=1717987071,S=1e4,i={isList:new Uint8Array(S),selectedIndex:new Int32Array(S).fill(-1),itemCount:new Uint32Array(S),firstVisible:new Uint32Array(S),visibleCount:new Uint32Array(S),interactive:new Uint8Array(S),mouse:new Uint8Array(S),keys:new Uint8Array(S),searchEnabled:new Uint8Array(S),totalCount:new Uint32Array(S),isLoading:new Uint8Array(S)},p=new Map,P=new Map,H=new Map,J=new Map,Xt="Loading...",V=new Map,k=new Map,D=new Map,I=new Map,M=new Map,Vt={initial:"idle",states:{idle:{on:{focus:"focused",disable:"disabled"}},focused:{on:{blur:"idle",startSelect:"selecting",startSearch:"searching",disable:"disabled"}},selecting:{on:{endSelect:"focused",blur:"idle",disable:"disabled"}},searching:{on:{endSearch:"focused",blur:"idle",disable:"disabled"}},disabled:{on:{enable:"idle"}}}};function tn(e,t,n=[],r={}){z$1.array(q$1).parse(n),p$1.parse(r),i.isList[t]=1,i.selectedIndex[t]=r.selectedIndex??-1,i.itemCount[t]=n.length,i.firstVisible[t]=0,i.visibleCount[t]=r.visibleCount??n.length,i.interactive[t]=r.interactive!==false?1:0,i.mouse[t]=r.mouse!==false?1:0,i.keys[t]=r.keys!==false?1:0,i.searchEnabled[t]=r.search===true?1:0,p.set(t,[...n]),b(e,t,Vt);}function G(e,t){return i.isList[t]===1&&k$1(e,t)}function Et(e,t){return d$1(e,t)??"idle"}function Ct(e,t,n){return Et(e,t)===n}function en(e,t){let n=Et(e,t);return n==="focused"||n==="selecting"}function Pt(e,t){return Ct(e,t,"disabled")}function U(e,t,n){if(!G(e,t))return false;let r=f$1(e,t,n);return r&&g(e,t),r}function nn(e,t){return U(e,t,"focus")}function rn(e,t){return U(e,t,"blur")}function on(e,t){return U(e,t,"disable")}function ln(e,t){return U(e,t,"enable")}function sn(e){return p.get(e)??[]}function an(e,t,n){p.set(t,[...n]),i.itemCount[t]=n.length,(i.selectedIndex[t]??-1)>=n.length&&(i.selectedIndex[t]=n.length>0?n.length-1:-1),(i.firstVisible[t]??0)>=n.length&&(i.firstVisible[t]=Math.max(0,n.length-1)),g(e,t);}function cn(e,t,n,r){let o=p.get(t)??[],l=r??o.length;o.splice(l,0,n),p.set(t,o),i.itemCount[t]=o.length;let s=i.selectedIndex[t]??-1;s>=0&&l<=s&&(i.selectedIndex[t]=s+1),g(e,t);}function un(e,t,n){let r=p.get(t)??[];if(n<0||n>=r.length)return;let o=r.splice(n,1)[0];i.itemCount[t]=r.length;let l=i.selectedIndex[t]??-1;return l>=0&&(n<l?i.selectedIndex[t]=l-1:n===l&&(i.selectedIndex[t]=r.length>0?Math.min(n,r.length-1):-1)),g(e,t),o}function w(e,t){return p.get(e)?.[t]}function fn(e,t,n,r){let o=p.get(t);return !o||n<0||n>=o.length?false:(o[n]=r,g(e,t),true)}function bn(e){return i.itemCount[e]??0}function mn(e,t){p.set(t,[]),i.itemCount[t]=0,i.selectedIndex[t]=-1,i.firstVisible[t]=0,g(e,t);}function gn(e){return i.selectedIndex[e]??-1}function pn(e){let t=i.selectedIndex[e]??-1;if(!(t<0))return w(e,t)}function Yt(e,t,n){return t<-1||t>=n?false:t<0?true:!w(e,t)?.disabled}function Nt(e,t){if(t<0)return;let n=w(e,t);if(!n)return;let r=k.get(e);if(r)for(let o of r)o(t,n);}function L(e,t,n){let r=i.itemCount[t]??0,o=i.selectedIndex[t]??-1;return !Yt(t,n,r)||o===n?false:(i.selectedIndex[t]=n,g(e,t),Nt(t,n),Ot(e,t,n),true)}function dn(e,t,n=true){let r=i.itemCount[t]??0;if(r===0)return false;let o=i.selectedIndex[t]??-1,l=o;do{if(o--,o<0)if(n)o=r-1;else return false;if(!w(t,o)?.disabled)return L(e,t,o)}while(o!==l);return false}function yn(e,t,n=true){let r=i.itemCount[t]??0;if(r===0)return false;let o=i.selectedIndex[t]??-1,l=o;do{if(o++,o>=r)if(n)o=0;else return false;if(!w(t,o)?.disabled)return L(e,t,o)}while(o!==l);return false}function hn(e,t){let n=i.itemCount[t]??0;for(let r=0;r<n;r++)if(!w(t,r)?.disabled)return L(e,t,r);return false}function xn(e,t){let n=i.itemCount[t]??0;for(let r=n-1;r>=0;r--)if(!w(t,r)?.disabled)return L(e,t,r);return false}function En(e,t,n){let o=(p.get(t)??[]).findIndex(l=>l.value===n);return o>=0?L(e,t,o):false}function Cn(e,t){L(e,t,-1);}function Sn(e,t){let n=i.selectedIndex[t]??-1;if(n<0)return false;let r=w(t,n);if(!r||r.disabled)return false;let o=D.get(t);if(o)for(let l of o)l(n,r);return true}function vn(e){return i.firstVisible[e]??0}function Z(e,t,n){let r=i.itemCount[t]??0,o=i.totalCount[t]??r,l=Math.max(0,Math.max(r,o)-1),s=Math.max(0,Math.min(n,l));i.firstVisible[t]=s,g(e,t),zt(t);}function Ln(e){return i.visibleCount[e]??0}function Tn(e,t,n){i.visibleCount[t]=Math.max(1,n),g(e,t);}function Ot(e,t,n){if(n<0)return;let r=i.firstVisible[t]??0,o=i.visibleCount[t]??0,l=r+o-1;n<r?Z(e,t,n):n>l&&Z(e,t,n-o+1);}function An(e,t,n){let r=i.firstVisible[t]??0,o=i.visibleCount[t]??0,l=i.itemCount[t]??0,s=r+n*o;if(s<0||s>=l)return false;Z(e,t,s);let c=i.selectedIndex[t]??-1;if(c>=0){let b=c+n*o;L(e,t,Math.max(0,Math.min(b,l-1)));}return true}function Ht(e){let t=p.get(e)??[],n=i.firstVisible[e]??0,r=i.visibleCount[e]??t.length,o=[];for(let l=0;l<r&&n+l<t.length;l++){let s=n+l,c=t[s];c&&o.push({index:s,item:c});}return o}function In(e,t,n){i.totalCount[t]=n,g(e,t);}function Gt(e){let t=i.totalCount[e]??0;return t===0?i.itemCount[e]??0:t}function wn(e,t){P.set(e,t);}function Bn(e){return P.get(e)}function Wn(e){P.delete(e);}function Fn(e,t){let n=H.get(e);return n||(n=new Set,H.set(e,n)),n.add(t),()=>{n?.delete(t);}}function zt(e,t){let n=H.get(e);if(!n||n.size===0)return;let r=i.firstVisible[e]??0,o=i.visibleCount[e]??0,l=i.itemCount[e]??0,s=i.totalCount[e]??l,c=o,b={firstVisible:r,visibleCount:o,loadedCount:l,totalCount:s,nearEnd:r+o>=l-c,nearStart:r<=c};for(let g of n)g(b);}function bt(e,t,n){i.isLoading[t]=n?1:0,g(e,t);}function kn(e){return i.isLoading[e]===1}function Dn(e,t){J.set(e,t);}function Mn(e){return J.get(e)??Xt}async function Un(e,t,n,r){let o=P.get(t);if(o&&i.isLoading[t]!==1){bt(e,t,true);try{let l=await o(n,r),s=p.get(t)??[];for(;s.length<n+l.length;)s.push({text:"",disabled:!0});for(let c=0;c<l.length;c++){let b=l[c];b&&(s[n+c]=b);}p.set(t,s),i.itemCount[t]=s.length,g(e,t);}finally{bt(e,t,false);}}}function Rn(e){let t=i.firstVisible[e]??0,n=i.visibleCount[e]??0,r=i.totalCount[e]??0,o=p.get(e)??[],l=Math.min(t+n,r);for(let s=t;s<l;s++){let c=o[s];if(!c||c.text==="")return {needsLoad:true,startIndex:t,count:n}}return {needsLoad:false,startIndex:0,count:0}}function _n(e,t){let n=i.firstVisible[e]??0,r=i.visibleCount[e]??0,o=i.itemCount[e]??0,l=Gt(e),s=t??r;return {firstVisible:n,visibleCount:r,loadedCount:o,totalCount:l,nearEnd:n+r>=o-s,nearStart:n<=s}}function Xn(e,t,n){let r=p.get(t)??[];r.push(...n),p.set(t,r),i.itemCount[t]=r.length,g(e,t);}function Vn(e,t){let n=V.get(e);V.set(e,{selectedPrefix:t.selectedPrefix??n?.selectedPrefix??mt,unselectedPrefix:t.unselectedPrefix??n?.unselectedPrefix??gt,selectedFg:t.selectedFg??n?.selectedFg??pt,selectedBg:t.selectedBg??n?.selectedBg??dt,itemFg:t.itemFg??n?.itemFg??yt,itemBg:t.itemBg??n?.itemBg??ht,disabledFg:t.disabledFg??n?.disabledFg??xt});}function Kt(e){return V.get(e)??{selectedPrefix:mt,unselectedPrefix:gt,selectedFg:pt,selectedBg:dt,itemFg:yt,itemBg:ht,disabledFg:xt}}function Pn(e){V.delete(e);}function Yn(e){return i.interactive[e]===1}function Nn(e,t,n){i.interactive[t]=n?1:0,g(e,t);}function On(e){return i.mouse[e]===1}function Hn(e,t,n){i.mouse[t]=n?1:0,g(e,t);}function Qt(e){return i.keys[e]===1}function Gn(e,t,n){i.keys[t]=n?1:0,g(e,t);}function jt(e){return i.searchEnabled[e]===1}function zn(e,t,n){i.searchEnabled[t]=n?1:0,g(e,t);}function $t(e,t){return Ct(e,t,"searching")}function Kn(e,t){if(!G(e,t)||!jt(t))return false;let n=U(e,t,"startSearch");return n&&I.set(t,""),n}function Qn(e,t){if(!G(e,t))return false;let n=U(e,t,"endSearch");return n&&I.delete(t),n}function jn(e){return I.get(e)??""}function q(e,t,n){I.set(t,n),g(e,t);let r=M.get(t);if(r)for(let o of r)o(n);return n.length>0?Zt(e,t,n):false}function $n(e,t,n){let r=I.get(t)??"";return q(e,t,r+n)}function Zn(e,t){let n=I.get(t)??"";return n.length===0?false:q(e,t,n.slice(0,-1))}function Jn(e,t){q(e,t,"");}function Zt(e,t,n){let r=p.get(t)??[],o=n.toLowerCase();for(let l=0;l<r.length;l++){let s=r[l];if(s&&!s.disabled&&s.text.toLowerCase().startsWith(o))return L(e,t,l)}return false}function qn(e,t){let n=I.get(t);if(!n||n.length===0)return false;let r=p.get(t)??[],o=i.selectedIndex[t]??-1,l=n.toLowerCase();for(let s=o+1;s<r.length;s++){let c=r[s];if(c&&!c.disabled&&c.text.toLowerCase().startsWith(l))return L(e,t,s)}for(let s=0;s<=o;s++){let c=r[s];if(c&&!c.disabled&&c.text.toLowerCase().startsWith(l))return L(e,t,s)}return false}function tr(e,t){let n=M.get(e)??[];return n.push(t),M.set(e,n),()=>{let r=M.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1);}}}function er(e,t){let n=k.get(e)??[];return n.push(t),k.set(e,n),()=>{let r=k.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1);}}}function nr(e,t){let n=D.get(e)??[];return n.push(t),D.set(e,n),()=>{let r=D.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1);}}}function rr(e){k.delete(e),D.delete(e),M.delete(e);}function or(e,t,n){if(!G(e,t)||Pt(e,t)||!Qt(t))return null;if($t(e,t))return Jt(n);switch(n){case "up":case "k":return {type:"selectPrev"};case "down":case "j":return {type:"selectNext"};case "home":case "g":return {type:"selectFirst"};case "end":case "G":return {type:"selectLast"};case "pageup":return {type:"pageUp"};case "pagedown":return {type:"pageDown"};case "enter":case "space":return {type:"confirm"};case "escape":return {type:"cancel"};case "/":return {type:"startSearch"};default:return null}}function Jt(e){switch(e){case "escape":return {type:"endSearch"};case "enter":return {type:"endSearch"};case "backspace":return {type:"searchBackspace"};case "up":case "down":return {type:"endSearch"};case "tab":case "C-n":return {type:"searchNextMatch"};default:return e.length===1&&e>=" "?{type:"searchChar",char:e}:null}}function lr(e,t){let n=Kt(e),r=Ht(e),o=i.selectedIndex[e]??-1,l=[];for(let{index:s,item:c}of r){let g=s===o?n.selectedPrefix:n.unselectedPrefix,y=c.text,E=t-g.length,C=y.length>E?`${y.slice(0,E-1)}\u2026`:y;l.push(g+C);}return l}function sr(){i.isList.fill(0),i.selectedIndex.fill(-1),i.itemCount.fill(0),i.firstVisible.fill(0),i.visibleCount.fill(0),i.interactive.fill(0),i.mouse.fill(0),i.keys.fill(0),i.searchEnabled.fill(0),i.totalCount.fill(0),i.isLoading.fill(0),p.clear(),V.clear(),k.clear(),D.clear(),I.clear(),M.clear(),P.clear(),H.clear(),J.clear();}var qt=["|","/","-","\\"],ir=[". ",".. ","..."," .."," ."," "],cr=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],ur=["\u2596","\u2598","\u259D","\u2597"],fr=100,m={frame:new Uint8Array(1e4),frameCount:new Uint8Array(1e4),interval:new Uint16Array(1e4),elapsed:new Float32Array(1e4)},R=new Map,Y=new Set;function br(e,t,n={}){let r=n.frames??qt,o=n.interval??100;m.frame[t]=0,m.frameCount[t]=r.length,m.interval[t]=o,m.elapsed[t]=0,R.set(t,r),Y.add(t);}function mr(e,t){Y.has(t)&&(m.frame[t]=0,m.frameCount[t]=0,m.interval[t]=0,m.elapsed[t]=0,R.delete(t),Y.delete(t));}function gr(e,t){return Y.has(t)}function pr(e){let t=R.get(e);if(!t)return "";let n=m.frame[e]??0;return t[n%t.length]??""}function dr(e){let t=R.get(e);return t?{frame:m.frame[e]??0,frameCount:m.frameCount[e]??0,interval:m.interval[e]??100,elapsed:m.elapsed[e]??0,frames:t}:null}function yr(e,t){m.interval[e]=t;}function hr(e,t){R.set(e,t),m.frameCount[e]=t.length,(m.frame[e]??0)>=t.length&&(m.frame[e]=0);}function te(e){let t=m.frameCount[e]??1,n=((m.frame[e]??0)+1)%t;return m.frame[e]=n,n}function xr(e,t){let n=(m.elapsed[e]??0)+t,r=m.interval[e]??100;return n>=r?(te(e),m.elapsed[e]=n%r,true):(m.elapsed[e]=n,false)}function Er(e){m.frame[e]=0,m.elapsed[e]=0;}function Cr(){R.clear(),Y.clear();}var St=4294967295,vt=858993663,Lt=3435973887,Tt=255,At=1717987071,It=255,v=1e4,T={rowCount:new Uint32Array(v),colCount:new Uint16Array(v),headerRows:new Uint8Array(v).fill(1),pad:new Uint8Array(v).fill(1),cellBorders:new Uint8Array(v)},f={isTable:new Uint8Array(v),rowCount:new Uint32Array(v),colCount:new Uint16Array(v),headerRows:new Uint8Array(v).fill(1),pad:new Uint8Array(v).fill(1),cellBorders:new Uint8Array(v)},d=new Map,X=new Map,_=new Map;function Lr(e,t,n={}){f.isTable[t]=1,f.rowCount[t]=0,f.colCount[t]=0,f.headerRows[t]=n.headerRows??1,f.pad[t]=n.pad??1,f.cellBorders[t]=n.cellBorders===true?1:0,T.rowCount[t]=0,T.colCount[t]=0,T.headerRows[t]=n.headerRows??1,T.pad[t]=n.pad??1,T.cellBorders[t]=n.cellBorders===true?1:0,d.set(t,[]),X.set(t,[]);}function Tr(e,t){return f.isTable[t]===1}function Ar(e,t){f.isTable[t]=0,f.rowCount[t]=0,f.colCount[t]=0,f.headerRows[t]=1,f.pad[t]=1,f.cellBorders[t]=0,T.rowCount[t]=0,T.colCount[t]=0,T.headerRows[t]=1,T.pad[t]=1,T.cellBorders[t]=0,d.delete(t),X.delete(t),_.delete(t);}function Ir(e,t,n){let r=n.map(o=>o.map(l=>typeof l=="string"?{value:l}:l));d.set(t,r),f.rowCount[t]=r.length,f.colCount[t]=r.reduce((o,l)=>Math.max(o,l.length),0),g(e,t);}function wr(e){return d.get(e)??[]}function Br(e){return (d.get(e)??[]).map(n=>n.map(r=>r.value))}function Wr(e,t,n,r,o){let l=d.get(t);if(!l||n<0||r<0)return false;for(;l.length<=n;)l.push([]);let s=l[n];if(!s)return false;for(;s.length<=r;)s.push({value:""});s[r]=typeof o=="string"?{value:o}:o;let c=l.reduce((b,g)=>Math.max(b,g.length),0);return f.colCount[t]=c,f.rowCount[t]=l.length,g(e,t),true}function ee(e,t,n){let r=d.get(e);if(!(!r||t<0||n<0))return r[t]?.[n]}function Fr(e,t,n){return ee(e,t,n)?.value}function kr(e,t){return d.get(e)?.[t]}function Dr(e,t){return (d.get(e)??[]).map(r=>r[t]??{value:""})}function Mr(e){return f.rowCount[e]??0}function Ur(e){return f.colCount[e]??0}function Rr(e,t,n){let r=d.get(t)??[],o=n.map(l=>typeof l=="string"?{value:l}:l);r.push(o),f.rowCount[t]=r.length,f.colCount[t]=Math.max(f.colCount[t]??0,o.length),g(e,t);}function _r(e,t,n,r){let o=d.get(t)??[],l=r.map(c=>typeof c=="string"?{value:c}:c),s=Math.max(0,Math.min(n,o.length));o.splice(s,0,l),f.rowCount[t]=o.length,f.colCount[t]=Math.max(f.colCount[t]??0,l.length),g(e,t);}function Xr(e,t,n){let r=d.get(t);if(!r||n<0||n>=r.length)return;let o=r.splice(n,1)[0];return f.rowCount[t]=r.length,f.colCount[t]=r.reduce((l,s)=>Math.max(l,s.length),0),g(e,t),o}function Vr(e,t){d.set(t,[]),f.rowCount[t]=0,f.colCount[t]=0,g(e,t);}function Pr(e,t,n){X.set(t,[...n]);let r=d.get(t)??[];if((f.headerRows[t]??1)>0){let l=n.map(s=>({value:s.header,align:s.align??"left"}));r.length===0?r.unshift(l):r[0]=l,f.rowCount[t]=r.length,f.colCount[t]=n.length;}g(e,t);}function Yr(e){return X.get(e)??[]}function Nr(e){let t=d.get(e)??[],n=f.headerRows[e]??1;return t.slice(0,n)}function Or(e){let t=d.get(e)??[],n=f.headerRows[e]??1;return t.slice(n)}function Hr(e,t,n){f.headerRows[t]=Math.max(0,Math.min(255,n)),g(e,t);}function Gr(e){return f.headerRows[e]??1}function zr(e,t){let n=_.get(e),r=t.altRowBg??n?.altRowBg,o=t.selectedFg??n?.selectedFg,l=t.selectedBg??n?.selectedBg,s={headerFg:t.headerFg??n?.headerFg??St,headerBg:t.headerBg??n?.headerBg??vt,cellFg:t.cellFg??n?.cellFg??Lt,cellBg:t.cellBg??n?.cellBg??Tt,borderFg:t.borderFg??n?.borderFg??At,borderBg:t.borderBg??n?.borderBg??It,...r!==void 0&&{altRowBg:r},...o!==void 0&&{selectedFg:o},...l!==void 0&&{selectedBg:l}};_.set(e,s);}function Kr(e){return _.get(e)??{headerFg:St,headerBg:vt,cellFg:Lt,cellBg:Tt,borderFg:At,borderBg:It}}function Qr(e){_.delete(e);}function jr(e){return f.pad[e]??1}function $r(e,t,n){f.pad[t]=Math.max(0,Math.min(255,n)),g(e,t);}function Zr(e){return f.cellBorders[e]===1}function Jr(e,t,n){f.cellBorders[t]=n?1:0,g(e,t);}function ne(e,t,n){let r=new Array(t).fill(0);for(let o of e)for(let l=0;l<o.length;l++){let s=o[l];s&&(r[l]=Math.max(r[l]??0,s.value.length+n*2));}return r}function re(e,t){for(let n=0;n<t.length;n++){let r=t[n];r&&(r.width!==void 0?e[n]=r.width:(r.minWidth!==void 0&&(e[n]=Math.max(e[n]??0,r.minWidth)),r.maxWidth!==void 0&&(e[n]=Math.min(e[n]??0,r.maxWidth))));}}function oe(e,t){let n=e.reduce((r,o)=>r+o,0);if(n>t){let r=t/n;for(let o=0;o<e.length;o++)e[o]=Math.floor((e[o]??0)*r);}}function le(e,t){let n=d.get(e)??[],r=X.get(e)??[],o=f.colCount[e]??0,l=f.pad[e]??1,s=ne(n,o,l);return re(s,r),t!==void 0&&oe(s,t),s}function se(e,t,n){if(n==="right")return e.padStart(t);if(n==="center"){let r=Math.floor((t-e.length)/2);return e.padStart(r+e.length).padEnd(t)}return e.padEnd(t)}function ae(e,t,n,r){let o=t-n*2,l=e.value;l.length>o&&(l=`${l.slice(0,o-1)}\u2026`);let s=se(l,o,e.align??"left");return r+s+r}function ie(e,t,n,r){let o=" ".repeat(n),l=r?"\u2502":"",s="";for(let c=0;c<t.length;c++){let b=e[c]??{value:""};c>0&&r&&(s+=l),s+=ae(b,t[c]??0,n,o);}return s}function qr(e,t){let n=d.get(e)??[],r=le(e,t),o=f.pad[e]??1,l=f.cellBorders[e]===1,s=f.headerRows[e]??1,c=[];for(let b=0;b<n.length;b++)c.push(ie(n[b]??[],r,o,l)),l&&b===s-1&&b<n.length-1&&c.push(r.map(g=>"\u2500".repeat(g)).join("\u253C"));return c}function to(){f.isTable.fill(0),f.rowCount.fill(0),f.colCount.fill(0),f.headerRows.fill(1),f.pad.fill(1),f.cellBorders.fill(0),d.clear(),X.clear(),_.clear();}var B=1e4,ce=80,ue=24,fe=1e3,a={isTerminal:new Uint8Array(B),width:new Uint16Array(B),height:new Uint16Array(B),cursorX:new Uint16Array(B),cursorY:new Uint16Array(B),cursorVisible:new Uint8Array(B),scrollOffset:new Uint32Array(B),altScreenActive:new Uint8Array(B)},x=new Map,be=z$1.object({width:z$1.number().int().positive().default(ce),height:z$1.number().int().positive().default(ue),scrollbackLines:z$1.number().int().nonnegative().default(fe),cursorVisible:z$1.boolean().default(true),cursorShape:z$1.enum(["block","underline","bar"]).default("block"),cursorBlink:z$1.boolean().default(true)});function me(e,t,n,r,o){let l={maxLines:n,chunkSize:Math.min(n,1e3)};return {buffer:k$2(e,t),scrollback:e$2(l),currentAttr:e$1(),escapeBuffer:"",inEscape:false,savedCursorX:0,savedCursorY:0,savedAttr:e$1(),altBuffer:null,cursorShape:r,cursorBlink:o}}function ge(e,t,n){return n*e+t}function pe(e){let t=b$1,n=c,r=[255,2852126975,11141375,2863268095,43775,2852170495,11184895,2863311615,1431655935,4283782655,1442797055,4294923775,1431699455,4283826175,1442840575,4294967295];return e.fg.type===1?t=r[e.fg.value]??b$1:e.fg.type===3&&(t=e.fg.value<<8|255),e.bg.type===1?n=r[e.bg.value]??c:e.bg.type===3&&(n=e.bg.value<<8|255),{fg:t,bg:n,attrs:e.styles}}function et(e$1,t,n){let r=de(e$1.buffer,0,t);g$1(e$1.scrollback,r);for(let l=0;l<n-1;l++)for(let s=0;s<t;s++){let c=(l+1)*t+s,b=l*t+s,g=e$1.buffer.cells[c];g&&(e$1.buffer.cells[b]=f$4(g));}let o=e();for(let l=0;l<t;l++){let s=(n-1)*t+l;e$1.buffer.cells[s]=f$4(o);}}function de(e,t,n){let r="";for(let o=0;o<n;o++){let l=t*n+o,s=e.cells[l];r+=s?.char??" ";}return r.trimEnd()}function ao(e,t,n={}){let r=be.parse(n);a.isTerminal[t]=1,a.width[t]=r.width,a.height[t]=r.height,a.cursorX[t]=0,a.cursorY[t]=0,a.cursorVisible[t]=r.cursorVisible?1:0,a.scrollOffset[t]=0,a.altScreenActive[t]=0;let o=me(r.width,r.height,r.scrollbackLines,r.cursorShape,r.cursorBlink);x.set(t,o),g(e,t);}function ye(e){return a.isTerminal[e]===1}function io(e){return x.get(e)}function co(e){if(ye(e))return {width:a.width[e]??0,height:a.height[e]??0,cursorX:a.cursorX[e]??0,cursorY:a.cursorY[e]??0,cursorVisible:a.cursorVisible[e]===1,scrollOffset:a.scrollOffset[e]??0}}function he(e,t,n,r,o){let l=(a.cursorY[t]??0)+1;l>=o&&(et(n,r,o),l=o-1),a.cursorX[t]=0,a.cursorY[t]=l,g(e,t);}function xe(e,t,n){let r=a.cursorX[t]??0,o=Math.min((Math.floor(r/8)+1)*8,n-1);a.cursorX[t]=o,g(e,t);}function Ee(e$1,t,n,r,o,l){let s=a.cursorX[t]??0,c=a.cursorY[t]??0,{fg:b,bg:g$1,attrs:y}=pe(n.currentAttr),E=ge(o,s,c);n.buffer.cells[E]=e(r,b,g$1,y);let C=s+1;C>=o&&(C=0,c++,c>=l&&(et(n,o,l),c=l-1)),a.cursorX[t]=C,a.cursorY[t]=c,g(e$1,t);}function Ce(e,t,n){let r=x.get(t);if(!r)return;let o=a.width[t]??0,l=a.height[t]??0;if(n===`
2
- `){he(e,t,r,o,l);return}if(n==="\r"){a.cursorX[t]=0,g(e,t);return}if(n==="\b"){let s=a.cursorX[t]??0;s>0&&(a.cursorX[t]=s-1),g(e,t);return}if(n===" "){xe(e,t,o);return}Ee(e,t,r,n,o,l);}function uo(e,t,n){let r=x.get(t);if(r)for(let o=0;o<n.length;o++){let l=n[o];if(l!==void 0){if(l==="\x1B"){r.inEscape=true,r.escapeBuffer=l;continue}if(r.inEscape){r.escapeBuffer+=l,Se(r.escapeBuffer)&&(ve(e,t,r,r.escapeBuffer),r.inEscape=false,r.escapeBuffer="");continue}Ce(e,t,l);}}}function Se(e){if(e.length<2)return false;if(e[1]==="["){let t=e[e.length-1];return t===void 0?false:/[A-Za-z@`~]/.test(t)}return e[1]==="]"?e.endsWith("\x07")||e.endsWith("\x1B\\"):e.length>=2}function ve(e,t,n,r){if(r.length<2)return;let o=r[1];if(o==="["){Le(e,t,n,r);return}switch(o){case "c":Ke(e,t);break;case "7":n.savedCursorX=a.cursorX[t]??0,n.savedCursorY=a.cursorY[t]??0,n.savedAttr=f$2(n.currentAttr);break;case "8":a.cursorX[t]=n.savedCursorX,a.cursorY[t]=n.savedCursorY,n.currentAttr=f$2(n.savedAttr),g(e,t);break;case "D":z(e,t,n,1);break;case "M":tt(e,t,1);break;case "E":a.cursorX[t]=0,z(e,t,n,1);break}}function Le(e,t,n,r){let o=r.match(/^\x1b\[(\??[\d;]*)([A-Za-z@`~])$/);if(!o)return;let l=o[1]??"",s=o[2],c=l===""?[]:l.split(";").map(C=>parseInt(C,10)||0),b=c[0]??1,g$1=c[1]??1,y=a.width[t]??0,E=a.height[t]??0;switch(s){case "A":tt(e,t,b);break;case "B":z(e,t,n,b);break;case "C":we(e,t,b,y);break;case "D":Be(e,t,b);break;case "E":a.cursorX[t]=0,z(e,t,n,b);break;case "F":a.cursorX[t]=0,tt(e,t,b);break;case "G":a.cursorX[t]=Math.min(Math.max(b-1,0),y-1),g(e,t);break;case "H":case "f":a.cursorY[t]=Math.min(Math.max(b-1,0),E-1),a.cursorX[t]=Math.min(Math.max(g$1-1,0),y-1),g(e,t);break;case "J":ke(e,t,n,c[0]??0);break;case "K":De(e,t,n,c[0]??0);break;case "m":Ge(n,c.length===0?[0]:c);break;case "h":wt(e,t,n,l,true);break;case "l":wt(e,t,n,l,false);break;case "s":n.savedCursorX=a.cursorX[t]??0,n.savedCursorY=a.cursorY[t]??0;break;case "u":a.cursorX[t]=n.savedCursorX,a.cursorY[t]=n.savedCursorY,g(e,t);break}}function Te(e,t,n){a.cursorVisible[t]=n?1:0,g(e,t);}function Ae(e,t,n,r){r?(n.savedCursorX=a.cursorX[t]??0,n.savedCursorY=a.cursorY[t]??0,Wt(e,t,n)):(Ft(e,t,n),a.cursorX[t]=n.savedCursorX,a.cursorY[t]=n.savedCursorY),g(e,t);}function Ie(e,t,n,r,o){o?(Wt(e,t,n),r==="1047"&&kt(n,0,n.buffer.cells.length)):Ft(e,t,n),g(e,t);}function wt(e,t,n,r,o){let l=r.startsWith("?")?r.slice(1):r;if(l==="25"){Te(e,t,o);return}if(l==="1049"){Ae(e,t,n,o);return}if(l==="47"||l==="1047"){Ie(e,t,n,l,o);return}}function Wt(e$1,t,n){if(a.altScreenActive[t]===1)return;let r=a.width[t]??0,o=a.height[t]??0;n.altBuffer||(n.altBuffer=k$2(r,o));for(let s=0;s<n.buffer.cells.length&&s<n.altBuffer.cells.length;s++){let c=n.buffer.cells[s];c&&(n.altBuffer.cells[s]=f$4(c));}let l=e();for(let s=0;s<n.buffer.cells.length;s++)n.buffer.cells[s]=f$4(l);a.cursorX[t]=0,a.cursorY[t]=0,a.altScreenActive[t]=1;}function Ft(e,t,n){if(a.altScreenActive[t]!==0){if(n.altBuffer)for(let r=0;r<n.altBuffer.cells.length&&r<n.buffer.cells.length;r++){let o=n.altBuffer.cells[r];o&&(n.buffer.cells[r]=f$4(o));}a.altScreenActive[t]=0;}}function tt(e,t,n){let r=a.cursorY[t]??0;a.cursorY[t]=Math.max(0,r-n),g(e,t);}function z(e,t,n,r){let o=a.width[t]??0,l=a.height[t]??0,s=a.cursorY[t]??0;for(s+=r;s>=l;)et(n,o,l),s--;a.cursorY[t]=s,g(e,t);}function we(e,t,n,r){let o=a.cursorX[t]??0;a.cursorX[t]=Math.min(r-1,o+n),g(e,t);}function Be(e,t,n){let r=a.cursorX[t]??0;a.cursorX[t]=Math.max(0,r-n),g(e,t);}function kt(e$1,t,n){let r=e();for(let o=t;o<n;o++)e$1.buffer.cells[o]=f$4(r);}function Dt(e$1,t,n,r,o){let l=e();for(let s=r;s<=o;s++){let c=n*t+s;e$1.buffer.cells[c]=f$4(l);}}function Mt(e$1,t,n,r){let o=e();for(let l=n;l<r;l++)for(let s=0;s<t;s++){let c=l*t+s;e$1.buffer.cells[c]=f$4(o);}}function We(e,t,n,r,o){Dt(e,t,o,r,t-1),Mt(e,t,o+1,n);}function Fe(e,t,n,r){Mt(e,t,0,r),Dt(e,t,r,0,n);}function ke(e,t,n,r){let o=a.width[t]??0,l=a.height[t]??0,s=a.cursorX[t]??0,c=a.cursorY[t]??0;r===0?We(n,o,l,s,c):r===1?Fe(n,o,s,c):(r===2||r===3)&&(kt(n,0,n.buffer.cells.length),r===3&&f$3(n.scrollback)),g(e,t);}function De(e$1,t,n,r){let o=a.width[t]??0,l=a.cursorX[t]??0,s=a.cursorY[t]??0,c=e();switch(r){case 0:for(let b=l;b<o;b++){let g=s*o+b;n.buffer.cells[g]=f$4(c);}break;case 1:for(let b=0;b<=l;b++){let g=s*o+b;n.buffer.cells[g]=f$4(c);}break;case 2:for(let b=0;b<o;b++){let g=s*o+b;n.buffer.cells[g]=f$4(c);}break}g(e$1,t);}function Me(e){return e.currentAttr=e$1(),1}function Ue(e,t,n){let r=t[n]??0;return e.currentAttr.styles|=1<<r-1,1}function Re(e,t,n){let r=t[n]??0;return e.currentAttr.styles&=~(1<<r-22+1),1}function _e(e,t,n){let r=t[n]??0;return e.currentAttr.fg={type:1,value:r-30},1}function Xe(e){return e.currentAttr.fg={type:0,value:0},1}function Ve(e,t,n){let r=t[n]??0;return e.currentAttr.bg={type:1,value:r-40},1}function Pe(e){return e.currentAttr.bg={type:0,value:0},1}function Ye(e,t,n){let r=t[n]??0;return e.currentAttr.fg={type:1,value:r-90+8},1}function Ne(e,t,n){let r=t[n]??0;return e.currentAttr.bg={type:1,value:r-100+8},1}function Oe(e){return e===0?Me:e>=1&&e<=9?Ue:e>=22&&e<=29?Re:e>=30&&e<=37?_e:e===39?Xe:e>=90&&e<=97?Ye:e>=40&&e<=47?Ve:e===49?Pe:e>=100&&e<=107?Ne:null}function He(e,t,n){let r=t[n]??0;if(r===38){let l=Bt(e,t,n,"fg");return l>0?l:1}if(r===48){let l=Bt(e,t,n,"bg");return l>0?l:1}let o=Oe(r);return o?o(e,t,n):1}function Bt(e,t,n,r){if(n+1>=t.length)return 0;let o=t[n+1];if(o===5&&n+2<t.length){let l=t[n+2]??0;return e.currentAttr[r]={type:2,value:l},3}if(o===2&&n+4<t.length){let l=t[n+2]??0,s=t[n+3]??0,c=t[n+4]??0;return e.currentAttr[r]={type:3,value:l<<16|s<<8|c},5}return 0}function Ge(e,t){let n=0;for(;n<t.length;){let r=He(e,t,n);n+=r;}}function ze(e$2,t){let n=x.get(t);if(!n)return;let r=e();for(let o=0;o<n.buffer.cells.length;o++)n.buffer.cells[o]=f$4(r);a.cursorX[t]=0,a.cursorY[t]=0,n.currentAttr=e$1(),g(e$2,t);}function Ke(e,t){let n=x.get(t);n&&(ze(e,t),f$3(n.scrollback),n.escapeBuffer="",n.inEscape=false,n.savedCursorX=0,n.savedCursorY=0,n.savedAttr=e$1(),a.cursorVisible[t]=1,a.scrollOffset[t]=0,g(e,t));}function fo(e,t,n,r){let o=a.width[t]??0,l=a.height[t]??0;a.cursorX[t]=Math.min(Math.max(n,0),o-1),a.cursorY[t]=Math.min(Math.max(r,0),l-1),g(e,t);}function bo(e,t,n){a.cursorVisible[t]=n?1:0,g(e,t);}function mo(e,t,n){let r=x.get(t);if(!r)return;let o=a.scrollOffset[t]??0,l=r.scrollback.totalLines;a.scrollOffset[t]=Math.min(o+n,l),g(e,t);}function go(e,t,n){let r=a.scrollOffset[t]??0;a.scrollOffset[t]=Math.max(0,r-n),g(e,t);}function po(e,t){let n=x.get(t);n&&(a.scrollOffset[t]=n.scrollback.totalLines,g(e,t));}function yo(e,t){a.scrollOffset[t]=0,g(e,t);}function ho(e,t,n,r){let o=x.get(t);if(!o)return;let l=a.width[t]??0,s=a.height[t]??0,c=k$2(n,r),b=Math.min(l,n),g$1=Math.min(s,r);for(let C=0;C<g$1;C++)for(let N=0;N<b;N++){let Ut=C*l+N,Rt=C*n+N,nt=o.buffer.cells[Ut];nt&&(c.cells[Rt]=f$4(nt));}o.buffer=c,a.width[t]=n,a.height[t]=r;let y=a.cursorX[t]??0,E=a.cursorY[t]??0;a.cursorX[t]=Math.min(y,n-1),a.cursorY[t]=Math.min(E,r-1),g(e,t);}function xo(e){a.isTerminal[e]=0,a.width[e]=0,a.height[e]=0,a.cursorX[e]=0,a.cursorY[e]=0,a.cursorVisible[e]=0,a.scrollOffset[e]=0,a.altScreenActive[e]=0,x.delete(e);}function Qe(e,t,n){let r=j(e.scrollback,e.scrollback.totalLines-n,e.scrollback.totalLines-n+t),o="";for(let l of r.lines)o+=l.ansi??l.text,o+=`
3
- `;return o}function je(e,t){let n="";return (e.fg!==t.fg||e.bg!==t.bg)&&(n+="\x1B[0m",t.fg=e.fg,t.bg=e.bg),n+=e.char,{output:n,fg:t.fg,bg:t.bg}}function Eo(e){let t=x.get(e);if(!t)return "";let n=a.width[e]??0,r=a.height[e]??0,o=a.scrollOffset[e]??0;if(o>0)return Qe(t,r,o);let l="",s={fg:-1,bg:-1};for(let c=0;c<r;c++){for(let b=0;b<n;b++){let g=c*n+b,y=t.buffer.cells[g];if(!y)continue;let E=je(y,s);l+=E.output,s.fg=E.fg,s.bg=E.bg;}c<r-1&&(l+=`
4
- `);}return l}function Co(e){return x.get(e)?.buffer.cells}function So(){a.isTerminal.fill(0),a.width.fill(0),a.height.fill(0),a.cursorX.fill(0),a.cursorY.fill(0),a.cursorVisible.fill(0),a.scrollOffset.fill(0),a.altScreenActive.fill(0),x.clear();}export{Dn as $,Tt as $a,go as $b,bn as A,tr as Aa,Gr as Ab,mn as B,er as Ba,zr as Bb,gn as C,nr as Ca,Kr as Cb,pn as D,rr as Da,Qr as Db,L as E,or as Ea,jr as Eb,dn as F,lr as Fa,$r as Fb,yn as G,sr as Ga,Zr as Gb,hn as H,qt as Ha,Jr as Hb,xn as I,ir as Ia,le as Ib,En as J,cr as Ja,qr as Jb,Cn as K,ur as Ka,to as Kb,Sn as L,fr as La,ce as Lb,vn as M,m as Ma,ue as Mb,Z as N,br as Na,fe as Nb,Ln as O,mr as Oa,a as Ob,Tn as P,gr as Pa,be as Pb,Ot as Q,pr as Qa,ao as Qb,An as R,dr as Ra,ye as Rb,Ht as S,yr as Sa,io as Sb,In as T,hr as Ta,co as Tb,Gt as U,te as Ua,Ce as Ub,wn as V,xr as Va,uo as Vb,Bn as W,Er as Wa,ze as Wb,Wn as X,Cr as Xa,Ke as Xb,Fn as Y,St as Ya,fo as Yb,bt as Z,vt as Za,bo as Zb,kn as _,Lt as _a,mo as _b,mt as a,Mn as aa,At as ab,po as ac,gt as b,Un as ba,It as bb,yo as bc,pt as c,Rn as ca,T as cb,ho as cc,dt as d,_n as da,f as db,xo as dc,yt as e,Xn as ea,Lr as eb,Eo as ec,ht as f,Vn as fa,Tr as fb,Co as fc,xt as g,Kt as ga,Ar as gb,So as gc,i as h,Pn as ha,Ir as hb,Vt as i,Yn as ia,wr as ib,tn as j,Nn as ja,Br as jb,G as k,On as ka,Wr as kb,Et as l,Hn as la,ee as lb,Ct as m,Qt as ma,Fr as mb,en as n,Gn as na,kr as nb,Pt as o,jt as oa,Dr as ob,U as p,zn as pa,Mr as pb,nn as q,$t as qa,Ur as qb,rn as r,Kn as ra,Rr as rb,on as s,Qn as sa,_r as sb,ln as t,jn as ta,Xr as tb,sn as u,q as ua,Vr as ub,an as v,$n as va,Pr as vb,cn as w,Zn as wa,Yr as wb,un as x,Jn as xa,Nr as xb,w as y,Zt as ya,Or as yb,fn as z,qn as za,Hr as zb};
@@ -1 +0,0 @@
1
- import {n,i as i$1,h as h$1}from'./chunk-PXXGH3BV.js';n();var a=1e4,y=4294967295,E=0,t={clickable:new Uint8Array(a),draggable:new Uint8Array(a),hoverable:new Uint8Array(a),hovered:new Uint8Array(a),pressed:new Uint8Array(a),keyable:new Uint8Array(a),focusable:new Uint8Array(a),focused:new Uint8Array(a),tabIndex:new Int16Array(a),hoverEffectFg:new Uint32Array(a),hoverEffectBg:new Uint32Array(a),focusEffectFg:new Uint32Array(a),focusEffectBg:new Uint32Array(a)},i=4278255615,g=0;function v(n){t.clickable[n]=0,t.draggable[n]=0,t.hoverable[n]=0,t.hovered[n]=0,t.pressed[n]=0,t.keyable[n]=0,t.focusable[n]=0,t.focused[n]=0,t.tabIndex[n]=0,t.hoverEffectFg[n]=y,t.hoverEffectBg[n]=E,t.focusEffectFg[n]=i,t.focusEffectBg[n]=g;}function f(n,e){i$1(n,e,t)||(h$1(n,e,t),v(e));}function l(n,e,r){r!==void 0&&(e[n]=r?1:0);}function c(n,e,r){r!==void 0&&(e[n]=r);}function p(n,e,r){return f(n,e),l(e,t.clickable,r.clickable),l(e,t.draggable,r.draggable),l(e,t.hoverable,r.hoverable),l(e,t.keyable,r.keyable),l(e,t.focusable,r.focusable),c(e,t.tabIndex,r.tabIndex),c(e,t.hoverEffectFg,r.hoverEffectFg),c(e,t.hoverEffectBg,r.hoverEffectBg),c(e,t.focusEffectFg,r.focusEffectFg),c(e,t.focusEffectBg,r.focusEffectBg),e}function h(n,e,r){return f(n,e),t.clickable[e]=r?1:0,e}function W(n,e,r){return f(n,e),t.draggable[e]=r?1:0,e}function k(n,e,r){return f(n,e),t.hoverable[e]=r?1:0,e}function F(n,e,r){return f(n,e),t.keyable[e]=r?1:0,e}function m(n,e){return i$1(n,e,t)?t.hovered[e]===1:false}function I(n,e){return i$1(n,e,t)?t.pressed[e]===1:false}function d(n,e){return i$1(n,e,t)?t.clickable[e]===1:false}function A(n,e){return i$1(n,e,t)?t.draggable[e]===1:false}function B(n,e){return i$1(n,e,t)?t.hoverable[e]===1:false}function U(n,e){return i$1(n,e,t)?t.keyable[e]===1:false}function w(n,e,r){return f(n,e),t.hovered[e]=r?1:0,e}function D(n,e,r){return f(n,e),t.pressed[e]=r?1:0,e}function _(n,e){return i$1(n,e,t)?t.focusable[e]===1:false}function C(n,e,r){return f(n,e),t.focused[e]=r?1:0,e}function O(n,e){if(i$1(n,e,t))return {fg:t.focusEffectFg[e],bg:t.focusEffectBg[e]}}function T(n,e,r,b){return f(n,e),t.focusEffectFg[e]=r,t.focusEffectBg[e]=b,e}function H(n,e){if(i$1(n,e,t))return {clickable:t.clickable[e]===1,draggable:t.draggable[e]===1,hoverable:t.hoverable[e]===1,hovered:t.hovered[e]===1,pressed:t.pressed[e]===1,keyable:t.keyable[e]===1,focusable:t.focusable[e]===1,focused:t.focused[e]===1,tabIndex:t.tabIndex[e],hoverEffectFg:t.hoverEffectFg[e],hoverEffectBg:t.hoverEffectBg[e],focusEffectFg:t.focusEffectFg[e],focusEffectBg:t.focusEffectBg[e]}}function K(n,e){return i$1(n,e,t)}function L(n,e){return i$1(n,e,t)&&(t.hovered[e]=0,t.pressed[e]=0,t.focused[e]=0),e}function G(n,e){return f(n,e),t.clickable[e]=1,t.hoverable[e]=1,e}function S(n,e){return i$1(n,e,t)&&(t.clickable[e]=0,t.hoverable[e]=0),e}function M(n,e){return f(n,e),t.keyable[e]=1,e}function P(n,e){return i$1(n,e,t)&&(t.keyable[e]=0),e}function R(n,e){return f(n,e),t.clickable[e]=1,t.hoverable[e]=1,t.keyable[e]=1,e}function V(n,e){return i$1(n,e,t)&&(t.clickable[e]=0,t.hoverable[e]=0,t.keyable[e]=0),e}function N(n,e){return i$1(n,e,t)?t.clickable[e]===1||t.hoverable[e]===1:false}function Y(n,e){return i$1(n,e,t)?t.keyable[e]===1:false}function j(n,e){return i$1(n,e,t)?t.clickable[e]===1||t.hoverable[e]===1||t.keyable[e]===1:false}export{P as A,R as B,V as C,N as D,Y as E,j as F,y as a,E as b,t as c,p as d,h as e,W as f,k as g,F as h,m as i,I as j,d as k,A as l,B as m,U as n,w as o,D as p,_ as q,C as r,O as s,T as t,H as u,K as v,L as w,G as x,S as y,M as z};
@@ -1 +0,0 @@
1
- import {n,h as h$1,i,j as j$1,l as l$1,m}from'./chunk-PXXGH3BV.js';import {z}from'zod';n();function A(t){return typeof t=="string"?{target:t}:t}function I(t){let e=t.initial,n=t.context,a=new Set;function r(o){if(o)for(let u of o)u(n);}function i(o){if(o!==e)for(let u of a)u(e,o);}let d=t.states[e];if(d?.entry)for(let o of d.entry)o(n);let p={get current(){return e},get context(){return n},send(o){let u=t.states[e];if(!u?.on)return false;let x=u.on[o];if(x===void 0)return false;let{target:m,actions:U,guard:b}=A(x);if(b&&!b(n))return false;let T=e;return r(u.exit),r(U),e=m,r(t.states[e]?.entry),i(T),true},can(o){let u=t.states[e];if(!u?.on)return false;let x=u.on[o];if(x===void 0)return false;let{guard:m}=A(x);return !(m&&!m(n))},matches(o){return e===o},subscribe(o){return a.add(o),()=>{a.delete(o);}},validEvents(){let o=t.states[e];if(!o?.on)return [];let u=[];for(let x of Object.keys(o.on))p.can(x)&&u.push(x);return u},reset(){let o=e;r(t.states[e]?.exit),e=t.initial,r(t.states[e]?.entry),i(o);}};return p}var R=z.union([z.string(),z.object({target:z.string()})]),j=z.object({entry:z.array(z.function()).optional(),exit:z.array(z.function()).optional(),on:z.record(z.string(),R).optional()});z.object({initial:z.string(),states:z.record(z.string(),j),context:z.unknown().optional()});var D=1e4;function N(t=D){return {machineId:new Uint32Array(t),currentState:new Uint16Array(t),previousState:new Uint16Array(t),stateAge:new Float32Array(t)}}var s=N(),k=new WeakSet,w=null;function g(t){return k.has(t)||(w=l$1(t,m(()=>s)),k.add(t)),w}var h=new Map,l=new Map,C=new Map,W=1,f={register(t){let e=W++,n=I(t);h.set(e,n);let a=Object.keys(t.states),r=new Map;for(let i=0;i<a.length;i++){let d=a[i];d!==void 0&&r.set(d,i);}return l.set(e,r),C.set(e,a),e},getMachine(t){return h.get(t)},getStateIndex(t,e){return l.get(t)?.get(e)??0},getStateName(t,e){return C.get(t)?.[e]??""},unregister(t){h.delete(t),l.delete(t),C.delete(t);},clear(){h.clear(),l.clear(),C.clear(),W=1;}};function Y(t,e,n){let a=g(t),r=f.register(n),i=f.getStateIndex(r,n.initial);return h$1(t,e,a),s.machineId[e]=r,s.currentState[e]=i,s.previousState[e]=i,s.stateAge[e]=0,r}function q(t,e){let n=g(t);if(!i(t,e,n))return;let a=s.machineId[e]??0;f.unregister(a),j$1(t,e,n);}function _(t,e){let n=g(t);if(!i(t,e,n))return "";let a=s.machineId[e]??0,r=s.currentState[e]??0;return f.getStateName(a,r)}function B(t,e){let n=g(t);if(!i(t,e,n))return "";let a=s.machineId[e]??0,r=s.previousState[e]??0;return f.getStateName(a,r)}function H(t,e,n){let a=g(t);if(!i(t,e,a))return false;let r=s.machineId[e]??0,i$1=f.getMachine(r);if(!i$1)return false;let d=i$1.current,p=i$1.send(n);if(p){let o=f.getStateIndex(r,i$1.current),u=f.getStateIndex(r,d);s.previousState[e]=u,s.currentState[e]=o,s.stateAge[e]=0;}return p}function J(t,e,n){let a=g(t);if(!i(t,e,a))return false;let r=s.machineId[e]??0,i$1=f.getMachine(r);return i$1?i$1.can(n):false}function K(t,e){let n=g(t);return i(t,e,n)?s.stateAge[e]??0:0}function Q(t,e,n){return _(t,e)===n}function V(t,e,n){let a=g(t);for(let r of e)if(i(t,r,a)){let i=s.stateAge[r]??0;s.stateAge[r]=i+n;}}function X(t,e){let n=g(t);return i(t,e,n)}export{f as a,Y as b,q as c,_ as d,B as e,H as f,J as g,K as h,Q as i,V as j,X as k};
@@ -1 +0,0 @@
1
- import {f,e as e$1}from'./chunk-SHUC6JWA.js';import {i,n,h}from'./chunk-PXXGH3BV.js';import {c,b as b$1}from'./chunk-5PELJRUQ.js';var _={};c(_,{BORDER_ASCII:()=>E,BORDER_BOLD:()=>L,BORDER_DOUBLE:()=>R,BORDER_ROUNDED:()=>s,BORDER_SINGLE:()=>a,Border:()=>r,BorderType:()=>b,DEFAULT_BORDER_BG:()=>p,DEFAULT_BORDER_FG:()=>m,disableAllBorders:()=>w,enableAllBorders:()=>T,getBorder:()=>D,getBorderChar:()=>W,hasBorder:()=>v,hasBorderVisible:()=>O,setBorder:()=>U,setBorderChars:()=>z});function d(o){r.type[o]=0,r.left[o]=1,r.top[o]=1,r.right[o]=1,r.bottom[o]=1,r.fg[o]=m,r.bg[o]=p,r.charTopLeft[o]=a.topLeft,r.charTopRight[o]=a.topRight,r.charBottomLeft[o]=a.bottomLeft,r.charBottomRight[o]=a.bottomRight,r.charHorizontal[o]=a.horizontal,r.charVertical[o]=a.vertical;}function l(o,t){i(o,t,r)||(h(o,t,r),d(t));}function A(o,t){t.left!==void 0&&(r.left[o]=t.left?1:0),t.top!==void 0&&(r.top[o]=t.top?1:0),t.right!==void 0&&(r.right[o]=t.right?1:0),t.bottom!==void 0&&(r.bottom[o]=t.bottom?1:0);}function C(o,t){t.type!==void 0&&(r.type[o]=t.type),A(o,t),t.fg!==void 0&&(r.fg[o]=e$1(t.fg)),t.bg!==void 0&&(r.bg[o]=e$1(t.bg)),t.chars!==void 0&&u(o,t.chars);}function U(o,t,f){return l(o,t),C(t,f),t}function u(o,t){r.charTopLeft[o]=t.topLeft,r.charTopRight[o]=t.topRight,r.charBottomLeft[o]=t.bottomLeft,r.charBottomRight[o]=t.bottomRight,r.charHorizontal[o]=t.horizontal,r.charVertical[o]=t.vertical;}function z(o,t,f){return l(o,t),u(t,f),t}function D(o,t){if(i(o,t,r))return {type:r.type[t],left:r.left[t]===1,top:r.top[t]===1,right:r.right[t]===1,bottom:r.bottom[t]===1,fg:r.fg[t],bg:r.bg[t],charTopLeft:r.charTopLeft[t],charTopRight:r.charTopRight[t],charBottomLeft:r.charBottomLeft[t],charBottomRight:r.charBottomRight[t],charHorizontal:r.charHorizontal[t],charVertical:r.charVertical[t]}}function v(o,t){return i(o,t,r)}function O(o,t){return !i(o,t,r)||r.type[t]===0?false:r.left[t]===1||r.top[t]===1||r.right[t]===1||r.bottom[t]===1}function T(o,t){return l(o,t),r.left[t]=1,r.top[t]=1,r.right[t]=1,r.bottom[t]=1,t}function w(o,t){return l(o,t),r.left[t]=0,r.top[t]=0,r.right[t]=0,r.bottom[t]=0,t}function W(o,t,f){if(i(o,t,r))switch(f){case "topLeft":return r.charTopLeft[t];case "topRight":return r.charTopRight[t];case "bottomLeft":return r.charBottomLeft[t];case "bottomRight":return r.charBottomRight[t];case "horizontal":return r.charHorizontal[t];case "vertical":return r.charVertical[t]}}var e,b,a,R,s,L,E,m,p,r,V=b$1(()=>{n();f();e=1e4,b=(n=>(n[n.None=0]="None",n[n.Line=1]="Line",n[n.Background=2]="Background",n[n.Custom=3]="Custom",n))(b||{}),a={topLeft:9484,topRight:9488,bottomLeft:9492,bottomRight:9496,horizontal:9472,vertical:9474},R={topLeft:9556,topRight:9559,bottomLeft:9562,bottomRight:9565,horizontal:9552,vertical:9553},s={topLeft:9581,topRight:9582,bottomLeft:9584,bottomRight:9583,horizontal:9472,vertical:9474},L={topLeft:9487,topRight:9491,bottomLeft:9495,bottomRight:9499,horizontal:9473,vertical:9475},E={topLeft:43,topRight:43,bottomLeft:43,bottomRight:43,horizontal:45,vertical:124},m=4294967295,p=0,r={type:new Uint8Array(e),left:new Uint8Array(e),top:new Uint8Array(e),right:new Uint8Array(e),bottom:new Uint8Array(e),fg:new Uint32Array(e),bg:new Uint32Array(e),charTopLeft:new Uint32Array(e),charTopRight:new Uint32Array(e),charBottomLeft:new Uint32Array(e),charBottomRight:new Uint32Array(e),charHorizontal:new Uint32Array(e),charVertical:new Uint32Array(e)};});export{b as a,a as b,R as c,s as d,L as e,E as f,m as g,p as h,r as i,U as j,z as k,D as l,v as m,O as n,T as o,w as p,W as q,_ as r,V as s};