@vibes.diy/use-vibes-base 0.0.0-dev-fresh-data

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 (164) hide show
  1. package/LICENSE.md +232 -0
  2. package/ManualRedirectStrategy.d.ts +24 -0
  3. package/ManualRedirectStrategy.js +289 -0
  4. package/ManualRedirectStrategy.js.map +1 -0
  5. package/README.md +549 -0
  6. package/components/AuthWall/AuthWall.d.ts +8 -0
  7. package/components/AuthWall/AuthWall.js +161 -0
  8. package/components/AuthWall/AuthWall.js.map +1 -0
  9. package/components/AuthWall/AuthWall.styles.d.ts +24 -0
  10. package/components/AuthWall/AuthWall.styles.js +82 -0
  11. package/components/AuthWall/AuthWall.styles.js.map +1 -0
  12. package/components/BrutalistCard/BrutalistCard.d.ts +8 -0
  13. package/components/BrutalistCard/BrutalistCard.js +11 -0
  14. package/components/BrutalistCard/BrutalistCard.js.map +1 -0
  15. package/components/BrutalistCard/BrutalistCard.styles.d.ts +4 -0
  16. package/components/BrutalistCard/BrutalistCard.styles.js +66 -0
  17. package/components/BrutalistCard/BrutalistCard.styles.js.map +1 -0
  18. package/components/BrutalistCard/index.d.ts +3 -0
  19. package/components/BrutalistCard/index.js +2 -0
  20. package/components/BrutalistCard/index.js.map +1 -0
  21. package/components/ControlsBar.d.ts +20 -0
  22. package/components/ControlsBar.js +108 -0
  23. package/components/ControlsBar.js.map +1 -0
  24. package/components/HiddenMenuWrapper/HiddenMenuWrapper.d.ts +7 -0
  25. package/components/HiddenMenuWrapper/HiddenMenuWrapper.js +103 -0
  26. package/components/HiddenMenuWrapper/HiddenMenuWrapper.js.map +1 -0
  27. package/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.d.ts +31 -0
  28. package/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.js +86 -0
  29. package/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.js.map +1 -0
  30. package/components/ImgGen.css +675 -0
  31. package/components/ImgGen.d.ts +23 -0
  32. package/components/ImgGen.js +260 -0
  33. package/components/ImgGen.js.map +1 -0
  34. package/components/ImgGenUtils/AsyncImg.d.ts +7 -0
  35. package/components/ImgGenUtils/AsyncImg.js +41 -0
  36. package/components/ImgGenUtils/AsyncImg.js.map +1 -0
  37. package/components/ImgGenUtils/ImgGenDisplay.d.ts +3 -0
  38. package/components/ImgGenUtils/ImgGenDisplay.js +240 -0
  39. package/components/ImgGenUtils/ImgGenDisplay.js.map +1 -0
  40. package/components/ImgGenUtils/ImgGenDisplayPlaceholder.d.ts +3 -0
  41. package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js +99 -0
  42. package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js.map +1 -0
  43. package/components/ImgGenUtils/ImgGenDisplayUtils.d.ts +27 -0
  44. package/components/ImgGenUtils/ImgGenDisplayUtils.js +95 -0
  45. package/components/ImgGenUtils/ImgGenDisplayUtils.js.map +1 -0
  46. package/components/ImgGenUtils/ImgGenError.d.ts +3 -0
  47. package/components/ImgGenUtils/ImgGenError.js +9 -0
  48. package/components/ImgGenUtils/ImgGenError.js.map +1 -0
  49. package/components/ImgGenUtils/ImgGenFileDrop.d.ts +11 -0
  50. package/components/ImgGenUtils/ImgGenFileDrop.js +56 -0
  51. package/components/ImgGenUtils/ImgGenFileDrop.js.map +1 -0
  52. package/components/ImgGenUtils/ImgGenModal.d.ts +25 -0
  53. package/components/ImgGenUtils/ImgGenModal.js +67 -0
  54. package/components/ImgGenUtils/ImgGenModal.js.map +1 -0
  55. package/components/ImgGenUtils/ImgGenModeUtils.d.ts +9 -0
  56. package/components/ImgGenUtils/ImgGenModeUtils.js +59 -0
  57. package/components/ImgGenUtils/ImgGenModeUtils.js.map +1 -0
  58. package/components/ImgGenUtils/ImgGenPromptWaiting.d.ts +11 -0
  59. package/components/ImgGenUtils/ImgGenPromptWaiting.js +40 -0
  60. package/components/ImgGenUtils/ImgGenPromptWaiting.js.map +1 -0
  61. package/components/ImgGenUtils/ImgGenUploadWaiting.d.ts +16 -0
  62. package/components/ImgGenUtils/ImgGenUploadWaiting.js +155 -0
  63. package/components/ImgGenUtils/ImgGenUploadWaiting.js.map +1 -0
  64. package/components/ImgGenUtils/index.d.ts +6 -0
  65. package/components/ImgGenUtils/index.js +7 -0
  66. package/components/ImgGenUtils/index.js.map +1 -0
  67. package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.d.ts +9 -0
  68. package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.js +31 -0
  69. package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.js.map +1 -0
  70. package/components/ImgGenUtils/overlays/ImageOverlay.d.ts +22 -0
  71. package/components/ImgGenUtils/overlays/ImageOverlay.js +11 -0
  72. package/components/ImgGenUtils/overlays/ImageOverlay.js.map +1 -0
  73. package/components/ImgGenUtils/types.d.ts +29 -0
  74. package/components/ImgGenUtils/types.js +2 -0
  75. package/components/ImgGenUtils/types.js.map +1 -0
  76. package/components/ImgGenUtils.d.ts +2 -0
  77. package/components/ImgGenUtils.js +3 -0
  78. package/components/ImgGenUtils.js.map +1 -0
  79. package/components/PromptBar.d.ts +11 -0
  80. package/components/PromptBar.js +24 -0
  81. package/components/PromptBar.js.map +1 -0
  82. package/components/VibeControl.d.ts +13 -0
  83. package/components/VibeControl.js +74 -0
  84. package/components/VibeControl.js.map +1 -0
  85. package/components/VibesButton/VibesButton.d.ts +10 -0
  86. package/components/VibesButton/VibesButton.js +20 -0
  87. package/components/VibesButton/VibesButton.js.map +1 -0
  88. package/components/VibesButton/VibesButton.styles.d.ts +6 -0
  89. package/components/VibesButton/VibesButton.styles.js +35 -0
  90. package/components/VibesButton/VibesButton.styles.js.map +1 -0
  91. package/components/VibesPanel/VibesPanel.d.ts +6 -0
  92. package/components/VibesPanel/VibesPanel.js +115 -0
  93. package/components/VibesPanel/VibesPanel.js.map +1 -0
  94. package/components/VibesPanel/index.d.ts +1 -0
  95. package/components/VibesPanel/index.js +2 -0
  96. package/components/VibesPanel/index.js.map +1 -0
  97. package/components/VibesSwitch/VibesSwitch.d.ts +6 -0
  98. package/components/VibesSwitch/VibesSwitch.js +54 -0
  99. package/components/VibesSwitch/VibesSwitch.js.map +1 -0
  100. package/components/VibesSwitch/VibesSwitch.styles.d.ts +4 -0
  101. package/components/VibesSwitch/VibesSwitch.styles.js +5 -0
  102. package/components/VibesSwitch/VibesSwitch.styles.js.map +1 -0
  103. package/constants.d.ts +4 -0
  104. package/constants.js +5 -0
  105. package/constants.js.map +1 -0
  106. package/events.d.ts +7 -0
  107. package/events.js +4 -0
  108. package/events.js.map +1 -0
  109. package/hooks/image-gen/image-generator.d.ts +11 -0
  110. package/hooks/image-gen/image-generator.js +146 -0
  111. package/hooks/image-gen/image-generator.js.map +1 -0
  112. package/hooks/image-gen/index.d.ts +7 -0
  113. package/hooks/image-gen/index.js +6 -0
  114. package/hooks/image-gen/index.js.map +1 -0
  115. package/hooks/image-gen/use-image-gen.d.ts +2 -0
  116. package/hooks/image-gen/use-image-gen.js +554 -0
  117. package/hooks/image-gen/use-image-gen.js.map +1 -0
  118. package/hooks/image-gen/utils.d.ts +19 -0
  119. package/hooks/image-gen/utils.js +150 -0
  120. package/hooks/image-gen/utils.js.map +1 -0
  121. package/hooks/use-image-gen.d.ts +1 -0
  122. package/hooks/use-image-gen.js +2 -0
  123. package/hooks/use-image-gen.js.map +1 -0
  124. package/hooks/vibes-gen/IframeVibesComponent.d.ts +10 -0
  125. package/hooks/vibes-gen/IframeVibesComponent.js +67 -0
  126. package/hooks/vibes-gen/IframeVibesComponent.js.map +1 -0
  127. package/hooks/vibes-gen/index.d.ts +2 -0
  128. package/hooks/vibes-gen/index.js +2 -0
  129. package/hooks/vibes-gen/index.js.map +1 -0
  130. package/hooks/vibes-gen/use-vibes.d.ts +3 -0
  131. package/hooks/vibes-gen/use-vibes.js +185 -0
  132. package/hooks/vibes-gen/use-vibes.js.map +1 -0
  133. package/index.d.ts +68 -0
  134. package/index.js +340 -0
  135. package/index.js.map +1 -0
  136. package/install-tracker.d.ts +30 -0
  137. package/install-tracker.js +246 -0
  138. package/install-tracker.js.map +1 -0
  139. package/package.json +47 -0
  140. package/stories/VibeControl.stories.d.ts +13 -0
  141. package/stories/VibeControl.stories.js +195 -0
  142. package/stories/VibeControl.stories.js.map +1 -0
  143. package/tsconfig.json +18 -0
  144. package/utils/appSlug.d.ts +17 -0
  145. package/utils/appSlug.js +175 -0
  146. package/utils/appSlug.js.map +1 -0
  147. package/utils/base64.d.ts +1 -0
  148. package/utils/base64.js +13 -0
  149. package/utils/base64.js.map +1 -0
  150. package/utils/debug.d.ts +2 -0
  151. package/utils/debug.js +8 -0
  152. package/utils/debug.js.map +1 -0
  153. package/utils/style-utils.d.ts +4 -0
  154. package/utils/style-utils.js +15 -0
  155. package/utils/style-utils.js.map +1 -0
  156. package/utils/styles.d.ts +325 -0
  157. package/utils/styles.js +328 -0
  158. package/utils/styles.js.map +1 -0
  159. package/utils/vibe-control-styles.d.ts +148 -0
  160. package/utils/vibe-control-styles.js +170 -0
  161. package/utils/vibe-control-styles.js.map +1 -0
  162. package/vibe-app-mount.d.ts +13 -0
  163. package/vibe-app-mount.js +124 -0
  164. package/vibe-app-mount.js.map +1 -0
@@ -0,0 +1,103 @@
1
+ import React, { useRef, useState, useEffect } from 'react';
2
+ import { getWrapperStyle, getMenuStyle, getContentWrapperStyle, getContentStyle, getToggleButtonStyle, getInnerContentWrapperStyle, } from './HiddenMenuWrapper.styles.js';
3
+ import { VibesSwitch } from '../VibesSwitch/VibesSwitch.js';
4
+ export function HiddenMenuWrapper({ children, menuContent, triggerBounce, }) {
5
+ const [menuOpen, setMenuOpen] = useState(false);
6
+ const [menuHeight, setMenuHeight] = useState(0);
7
+ const menuRef = useRef(null);
8
+ const buttonRef = useRef(null);
9
+ const menuContainerRef = useRef(null);
10
+ const [isBouncing, setIsBouncing] = useState(false);
11
+ const [hasBouncedOnMount, setHasBouncedOnMount] = useState(false);
12
+ useEffect(() => {
13
+ if (!hasBouncedOnMount && !menuOpen) {
14
+ const prefersReducedMotion = window.matchMedia?.('(prefers-reduced-motion: reduce)')?.matches || false;
15
+ if (!prefersReducedMotion) {
16
+ setIsBouncing(true);
17
+ setTimeout(() => setIsBouncing(false), 800);
18
+ }
19
+ setHasBouncedOnMount(true);
20
+ }
21
+ }, [hasBouncedOnMount, menuOpen]);
22
+ useEffect(() => {
23
+ const styleId = 'vibes-drop-to-close-keyframes';
24
+ const existingStyle = document.getElementById(styleId);
25
+ if (!existingStyle) {
26
+ const style = document.createElement('style');
27
+ style.id = styleId;
28
+ style.textContent = `
29
+ @keyframes vibes-drop-to-close {
30
+ 0% { transform: translateY(-400px); } /* Start pushed up */
31
+ 10% { transform: translateY(0); } /* First big drop */
32
+ 25% { transform: translateY(-175px); } /* First bounce back up */
33
+ 35% { transform: translateY(0); } /* Second drop */
34
+ 48% { transform: translateY(-75px); } /* Second bounce back up */
35
+ 62% { transform: translateY(0); } /* Third drop */
36
+ 72% { transform: translateY(-25px); } /* Third bounce back up */
37
+ 80% { transform: translateY(0); } /* Fourth drop - faster */
38
+ 82% { transform: translateY(-10px); } /* Fourth bounce back up - much faster */
39
+ 88% { transform: translateY(0); } /* Fifth drop */
40
+ 91% { transform: translateY(-5px); } /* Final tiny bounce back up */
41
+ 95% { transform: translateY(0); } /* Final settle */
42
+ 100% { transform: translateY(0); }
43
+ }
44
+ `;
45
+ document.head.appendChild(style);
46
+ }
47
+ }, []);
48
+ useEffect(() => {
49
+ if (triggerBounce) {
50
+ setIsBouncing(true);
51
+ const timeout = setTimeout(() => setIsBouncing(false), 800);
52
+ return () => clearTimeout(timeout);
53
+ }
54
+ }, [triggerBounce]);
55
+ useEffect(() => {
56
+ if (menuRef.current) {
57
+ setMenuHeight(menuRef.current.offsetHeight);
58
+ }
59
+ }, [menuContent]);
60
+ useEffect(() => {
61
+ const handleKeyDown = (e) => {
62
+ if (e.key === 'Escape' && menuOpen) {
63
+ setMenuOpen(false);
64
+ buttonRef.current?.focus();
65
+ }
66
+ if (menuOpen && e.key === 'Tab' && menuContainerRef.current) {
67
+ const focusableElements = menuContainerRef.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
68
+ const first = focusableElements[0];
69
+ const last = focusableElements[focusableElements.length - 1];
70
+ if (!first || !last)
71
+ return;
72
+ if (e.shiftKey) {
73
+ if (document.activeElement === first) {
74
+ e.preventDefault();
75
+ last.focus();
76
+ }
77
+ }
78
+ else {
79
+ if (document.activeElement === last) {
80
+ e.preventDefault();
81
+ first.focus();
82
+ }
83
+ }
84
+ }
85
+ };
86
+ document.addEventListener('keydown', handleKeyDown);
87
+ return () => document.removeEventListener('keydown', handleKeyDown);
88
+ }, [menuOpen]);
89
+ useEffect(() => {
90
+ if (menuOpen) {
91
+ const firstFocusable = menuRef.current?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
92
+ firstFocusable?.focus();
93
+ }
94
+ }, [menuOpen]);
95
+ return (React.createElement("div", { style: getWrapperStyle() },
96
+ React.createElement("div", { id: "hidden-menu", role: "dialog", "aria-modal": "true", "aria-label": "Hidden menu", "aria-hidden": !menuOpen, ref: menuRef, style: getMenuStyle() }, menuContent),
97
+ React.createElement("div", { style: getContentWrapperStyle(menuHeight, menuOpen, isBouncing), ref: menuContainerRef },
98
+ React.createElement("div", { style: getInnerContentWrapperStyle(menuOpen) },
99
+ React.createElement("div", { style: getContentStyle() }, children))),
100
+ React.createElement("button", { "aria-haspopup": "dialog", "aria-expanded": menuOpen, "aria-controls": "hidden-menu", ref: buttonRef, onClick: () => setMenuOpen(!menuOpen), style: getToggleButtonStyle() },
101
+ React.createElement(VibesSwitch, { size: 80 }))));
102
+ }
103
+ //# sourceMappingURL=HiddenMenuWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HiddenMenuWrapper.js","sourceRoot":"","sources":["../../../jsr/components/HiddenMenuWrapper/HiddenMenuWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,M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AAC;IAAA,CACF,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,6BAAK,KAAK,EAAE,eAAe,EAAE;QAE3B,6BACE,EAAE,EAAC,aAAa,EAChB,IAAI,EAAC,QAAQ,gBACF,MAAM,gBACN,aAAa,iBACX,CAAC,QAAQ,EACtB,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,YAAY,EAAE,IAEpB,WAAW,CACR;QAGN,6BAAK,KAAK,EAAE,sBAAsB,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,GAAG,EAAE,gBAAgB;YACzF,6BAAK,KAAK,EAAE,2BAA2B,CAAC,QAAQ,CAAC;gBAC/C,6BAAK,KAAK,EAAE,eAAe,EAAE,IAAG,QAAQ,CAAO,CAC3C,CACF;QAGN,iDACgB,QAAQ,mBACP,QAAQ,mBACT,aAAa,EAC3B,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,EACrC,KAAK,EAAE,oBAAoB,EAAE;YAE7B,oBAAC,WAAW,IAAC,IAAI,EAAE,EAAE,GAAI,CAClB,CACL,CACP,CAAC;AAAA,CACH"}
@@ -0,0 +1,31 @@
1
+ import type { CSSProperties } from 'react';
2
+ export declare const hiddenMenuTheme: {
3
+ colors: {
4
+ menuBg: string;
5
+ menuText: string;
6
+ contentBg: string;
7
+ shadow: string;
8
+ gridLineColor: string;
9
+ };
10
+ zIndex: {
11
+ menu: number;
12
+ content: number;
13
+ toggle: number;
14
+ };
15
+ dimensions: {
16
+ gridSize: string;
17
+ padding: string;
18
+ bottomOffset: string;
19
+ };
20
+ animation: {
21
+ duration: string;
22
+ easing: string;
23
+ blurAmount: string;
24
+ };
25
+ };
26
+ export declare const getWrapperStyle: () => CSSProperties;
27
+ export declare const getMenuStyle: () => CSSProperties;
28
+ export declare const getContentStyle: () => CSSProperties;
29
+ export declare const getContentWrapperStyle: (menuHeight: number, menuOpen: boolean, isBouncing: boolean) => CSSProperties;
30
+ export declare const getInnerContentWrapperStyle: (menuOpen: boolean) => CSSProperties;
31
+ export declare const getToggleButtonStyle: () => CSSProperties;
@@ -0,0 +1,86 @@
1
+ export const hiddenMenuTheme = {
2
+ colors: {
3
+ menuBg: 'var(--hm-menu-bg, #d4d4d4)',
4
+ menuText: 'var(--hm-menu-text, white)',
5
+ contentBg: 'var(--hm-content-bg, #1e1e1e)',
6
+ shadow: 'var(--hm-shadow, rgba(0, 0, 0, 0.3))',
7
+ gridLineColor: 'var(--hm-grid-line, rgba(255, 255, 255, 0.5))',
8
+ },
9
+ zIndex: {
10
+ menu: 5,
11
+ content: 10,
12
+ toggle: 20,
13
+ },
14
+ dimensions: {
15
+ gridSize: '40px',
16
+ padding: '24px',
17
+ bottomOffset: '16px',
18
+ },
19
+ animation: {
20
+ duration: '0.4s',
21
+ easing: 'ease',
22
+ blurAmount: '4px',
23
+ },
24
+ };
25
+ export const getWrapperStyle = () => ({
26
+ position: 'relative',
27
+ overflow: 'hidden',
28
+ });
29
+ export const getMenuStyle = () => ({
30
+ position: 'fixed',
31
+ bottom: 0,
32
+ left: 0,
33
+ right: 0,
34
+ zIndex: hiddenMenuTheme.zIndex.menu,
35
+ color: hiddenMenuTheme.colors.menuText,
36
+ padding: hiddenMenuTheme.dimensions.padding,
37
+ boxShadow: `0 -2px 10px ${hiddenMenuTheme.colors.shadow}`,
38
+ backgroundColor: hiddenMenuTheme.colors.menuBg,
39
+ backgroundImage: `
40
+ linear-gradient(${hiddenMenuTheme.colors.gridLineColor} 1px, transparent 1px),
41
+ linear-gradient(90deg, ${hiddenMenuTheme.colors.gridLineColor} 1px, transparent 1px)
42
+ `,
43
+ backgroundSize: hiddenMenuTheme.dimensions.gridSize + ' ' + hiddenMenuTheme.dimensions.gridSize,
44
+ });
45
+ export const getContentStyle = () => ({
46
+ filter: 'none',
47
+ width: '100%',
48
+ height: '100%',
49
+ });
50
+ export const getContentWrapperStyle = (menuHeight, menuOpen, isBouncing) => ({
51
+ position: 'fixed',
52
+ top: 0,
53
+ left: 0,
54
+ right: 0,
55
+ bottom: 0,
56
+ zIndex: hiddenMenuTheme.zIndex.content,
57
+ transition: isBouncing
58
+ ? `filter 0.3s ${hiddenMenuTheme.animation.easing}`
59
+ : `transform ${hiddenMenuTheme.animation.duration} ${hiddenMenuTheme.animation.easing}, filter 0.3s ${hiddenMenuTheme.animation.easing}`,
60
+ transform: menuOpen ? `translateY(-${menuHeight}px)` : 'translateY(0)',
61
+ overflowY: 'auto',
62
+ borderTopColor: hiddenMenuTheme.colors.menuBg,
63
+ borderTopWidth: '1px',
64
+ borderTopStyle: 'solid',
65
+ boxShadow: `0 -2px 10px ${hiddenMenuTheme.colors.shadow}`,
66
+ backgroundColor: hiddenMenuTheme.colors.contentBg,
67
+ animation: isBouncing
68
+ ? 'vibes-drop-to-close 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94)'
69
+ : undefined,
70
+ willChange: isBouncing ? 'transform' : undefined,
71
+ });
72
+ export const getInnerContentWrapperStyle = (menuOpen) => ({
73
+ filter: menuOpen ? `blur(${hiddenMenuTheme.animation.blurAmount})` : 'none',
74
+ width: '100%',
75
+ height: '100%',
76
+ });
77
+ export const getToggleButtonStyle = () => ({
78
+ position: 'fixed',
79
+ bottom: hiddenMenuTheme.dimensions.bottomOffset,
80
+ right: 0,
81
+ zIndex: hiddenMenuTheme.zIndex.toggle,
82
+ backgroundColor: 'transparent',
83
+ border: 'none',
84
+ cursor: 'pointer',
85
+ });
86
+ //# sourceMappingURL=HiddenMenuWrapper.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HiddenMenuWrapper.styles.js","sourceRoot":"","sources":["../../../jsr/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.ts"],"names":[],"mappings":"AAoBA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE;QACN,MAAM,EAAE,4BAA4B;QACpC,QAAQ,EAAE,4BAA4B;QACtC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