@vuetify/nightly 3.6.13-3.7.0-beta.0.0-dev.2024-07-12 → 3.6.13-3.7.0-beta.0.0-dev.2024-07-25

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 (174) hide show
  1. package/CHANGELOG.md +0 -13
  2. package/dist/json/attributes.json +30 -22
  3. package/dist/json/importMap-labs.json +18 -18
  4. package/dist/json/importMap.json +152 -152
  5. package/dist/json/tags.json +2 -0
  6. package/dist/json/web-types.json +53 -42
  7. package/dist/vuetify-labs.css +1255 -1257
  8. package/dist/vuetify-labs.d.ts +12304 -12192
  9. package/dist/vuetify-labs.esm.js +118 -68
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +118 -68
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +1293 -1295
  14. package/dist/vuetify.d.ts +10496 -10404
  15. package/dist/vuetify.esm.js +110 -64
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +110 -64
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +1078 -1080
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/components/VAlert/index.d.mts +55 -55
  23. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  24. package/lib/components/VAppBar/index.d.mts +169 -169
  25. package/lib/components/VAutocomplete/VAutocomplete.mjs +15 -8
  26. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  27. package/lib/components/VAutocomplete/index.d.mts +615 -609
  28. package/lib/components/VAvatar/index.d.mts +36 -36
  29. package/lib/components/VBadge/index.d.mts +58 -58
  30. package/lib/components/VBanner/index.d.mts +59 -59
  31. package/lib/components/VBottomNavigation/index.d.mts +58 -58
  32. package/lib/components/VBottomSheet/index.d.mts +118 -118
  33. package/lib/components/VBreadcrumbs/index.d.mts +34 -34
  34. package/lib/components/VBtn/VBtn.css +3 -0
  35. package/lib/components/VBtn/VBtn.sass +3 -0
  36. package/lib/components/VBtn/index.d.mts +107 -107
  37. package/lib/components/VBtnGroup/index.d.mts +23 -23
  38. package/lib/components/VBtnToggle/index.d.mts +40 -40
  39. package/lib/components/VCard/index.d.mts +93 -93
  40. package/lib/components/VCarousel/index.d.mts +128 -128
  41. package/lib/components/VCheckbox/index.d.mts +174 -168
  42. package/lib/components/VChip/index.d.mts +86 -86
  43. package/lib/components/VChipGroup/index.d.mts +46 -46
  44. package/lib/components/VColorPicker/index.d.mts +96 -96
  45. package/lib/components/VCombobox/VCombobox.mjs +15 -8
  46. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  47. package/lib/components/VCombobox/index.d.mts +615 -609
  48. package/lib/components/VConfirmEdit/index.d.mts +2 -2
  49. package/lib/components/VCounter/index.d.mts +27 -27
  50. package/lib/components/VDataIterator/index.d.mts +51 -50
  51. package/lib/components/VDataTable/VDataTable.mjs +10 -3
  52. package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
  53. package/lib/components/VDataTable/VDataTableServer.mjs +6 -2
  54. package/lib/components/VDataTable/VDataTableServer.mjs.map +1 -1
  55. package/lib/components/VDataTable/VDataTableVirtual.mjs +10 -3
  56. package/lib/components/VDataTable/VDataTableVirtual.mjs.map +1 -1
  57. package/lib/components/VDataTable/composables/group.mjs +2 -1
  58. package/lib/components/VDataTable/composables/group.mjs.map +1 -1
  59. package/lib/components/VDataTable/composables/sort.mjs +4 -4
  60. package/lib/components/VDataTable/composables/sort.mjs.map +1 -1
  61. package/lib/components/VDataTable/index.d.mts +275 -274
  62. package/lib/components/VDatePicker/VDatePickerMonth.mjs +3 -0
  63. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  64. package/lib/components/VDatePicker/index.d.mts +134 -134
  65. package/lib/components/VDialog/index.d.mts +353 -353
  66. package/lib/components/VDivider/index.d.mts +15 -15
  67. package/lib/components/VEmptyState/index.d.mts +47 -47
  68. package/lib/components/VExpansionPanel/index.d.mts +134 -134
  69. package/lib/components/VFab/index.d.mts +227 -227
  70. package/lib/components/VField/VField.css +6 -11
  71. package/lib/components/VField/VField.mjs +7 -5
  72. package/lib/components/VField/VField.mjs.map +1 -1
  73. package/lib/components/VField/VField.sass +2 -6
  74. package/lib/components/VField/index.d.mts +58 -52
  75. package/lib/components/VFileInput/index.d.mts +255 -249
  76. package/lib/components/VFooter/index.d.mts +50 -50
  77. package/lib/components/VForm/index.d.mts +9 -9
  78. package/lib/components/VGrid/index.d.mts +150 -150
  79. package/lib/components/VIcon/index.d.mts +24 -24
  80. package/lib/components/VImg/index.d.mts +85 -85
  81. package/lib/components/VInfiniteScroll/index.d.mts +22 -22
  82. package/lib/components/VInput/VInput.css +5 -5
  83. package/lib/components/VInput/VInput.mjs +4 -1
  84. package/lib/components/VInput/VInput.mjs.map +1 -1
  85. package/lib/components/VInput/VInput.sass +1 -1
  86. package/lib/components/VInput/index.d.mts +61 -55
  87. package/lib/components/VItemGroup/index.d.mts +17 -17
  88. package/lib/components/VLabel/index.d.mts +8 -8
  89. package/lib/components/VLayout/index.d.mts +36 -36
  90. package/lib/components/VLazy/index.d.mts +31 -31
  91. package/lib/components/VList/index.d.mts +178 -178
  92. package/lib/components/VLocaleProvider/index.d.mts +7 -7
  93. package/lib/components/VMain/index.d.mts +10 -10
  94. package/lib/components/VMenu/VMenu.mjs +7 -5
  95. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  96. package/lib/components/VMenu/index.d.mts +396 -396
  97. package/lib/components/VMessages/index.d.mts +20 -20
  98. package/lib/components/VNavigationDrawer/index.d.mts +72 -72
  99. package/lib/components/VNavigationDrawer/sticky.mjs.map +1 -1
  100. package/lib/components/VOtpInput/VOtpInput.mjs +1 -1
  101. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  102. package/lib/components/VOtpInput/index.d.mts +88 -88
  103. package/lib/components/VOverlay/index.d.mts +97 -97
  104. package/lib/components/VOverlay/locationStrategies.mjs +0 -6
  105. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  106. package/lib/components/VPagination/index.d.mts +55 -55
  107. package/lib/components/VParallax/index.d.mts +7 -7
  108. package/lib/components/VProgressCircular/index.d.mts +24 -24
  109. package/lib/components/VProgressLinear/index.d.mts +52 -52
  110. package/lib/components/VRadio/index.d.mts +41 -41
  111. package/lib/components/VRadioGroup/index.d.mts +105 -99
  112. package/lib/components/VRangeSlider/index.d.mts +102 -96
  113. package/lib/components/VRating/index.d.mts +22 -22
  114. package/lib/components/VResponsive/index.d.mts +23 -23
  115. package/lib/components/VSelect/VSelect.mjs +15 -13
  116. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  117. package/lib/components/VSelect/index.d.mts +615 -609
  118. package/lib/components/VSelect/useScrolling.mjs +3 -3
  119. package/lib/components/VSelect/useScrolling.mjs.map +1 -1
  120. package/lib/components/VSelectionControl/index.d.mts +43 -43
  121. package/lib/components/VSelectionControlGroup/index.d.mts +39 -39
  122. package/lib/components/VSheet/index.d.mts +34 -34
  123. package/lib/components/VSkeletonLoader/index.d.mts +17 -17
  124. package/lib/components/VSlideGroup/index.d.mts +33 -33
  125. package/lib/components/VSlider/index.d.mts +95 -89
  126. package/lib/components/VSnackbar/index.d.mts +411 -411
  127. package/lib/components/VSparkline/index.d.mts +38 -38
  128. package/lib/components/VSpeedDial/index.d.mts +176 -176
  129. package/lib/components/VStepper/index.d.mts +119 -119
  130. package/lib/components/VSwitch/index.d.mts +108 -102
  131. package/lib/components/VSystemBar/index.d.mts +39 -39
  132. package/lib/components/VTable/index.d.mts +4 -4
  133. package/lib/components/VTabs/index.d.mts +512 -512
  134. package/lib/components/VTextField/VTextField.mjs +1 -1
  135. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  136. package/lib/components/VTextField/index.d.mts +421 -415
  137. package/lib/components/VTextarea/VTextarea.mjs +5 -5
  138. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  139. package/lib/components/VTextarea/index.d.mts +359 -344
  140. package/lib/components/VTimeline/index.d.mts +26 -26
  141. package/lib/components/VToolbar/index.d.mts +53 -53
  142. package/lib/components/VTooltip/index.d.mts +424 -424
  143. package/lib/components/VValidation/index.d.mts +19 -19
  144. package/lib/components/VVirtualScroll/VVirtualScroll.mjs +2 -0
  145. package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
  146. package/lib/components/VVirtualScroll/index.d.mts +13 -10
  147. package/lib/components/VWindow/index.d.mts +31 -31
  148. package/lib/components/index.d.mts +10657 -10566
  149. package/lib/components/transitions/index.d.mts +200 -200
  150. package/lib/composables/nested/nested.mjs +0 -1
  151. package/lib/composables/nested/nested.mjs.map +1 -1
  152. package/lib/composables/virtual.mjs +1 -0
  153. package/lib/composables/virtual.mjs.map +1 -1
  154. package/lib/entry-bundler.mjs +1 -1
  155. package/lib/framework.mjs +1 -1
  156. package/lib/index.d.mts +81 -80
  157. package/lib/labs/VCalendar/index.d.mts +52 -52
  158. package/lib/labs/VDateInput/VDateInput.mjs +6 -3
  159. package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
  160. package/lib/labs/VDateInput/index.d.mts +256 -250
  161. package/lib/labs/VNumberInput/index.d.mts +247 -241
  162. package/lib/labs/VPicker/index.d.mts +45 -45
  163. package/lib/labs/VSnackbarQueue/index.d.mts +611 -611
  164. package/lib/labs/VStepperVertical/index.d.mts +212 -212
  165. package/lib/labs/VTimePicker/VTimePickerClock.mjs +0 -1
  166. package/lib/labs/VTimePicker/VTimePickerClock.mjs.map +1 -1
  167. package/lib/labs/VTimePicker/VTimePickerControls.mjs +2 -1
  168. package/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
  169. package/lib/labs/VTimePicker/index.d.mts +131 -122
  170. package/lib/labs/VTreeview/index.d.mts +199 -199
  171. package/lib/labs/components.d.mts +1754 -1733
  172. package/lib/util/helpers.mjs +5 -0
  173. package/lib/util/helpers.mjs.map +1 -1
  174. package/package.json +9 -4
@@ -92,21 +92,21 @@ declare function repositionScrollStrategy(data: ScrollStrategyData, props: Strat
92
92
 
93
93
  declare const VOverlay: {
94
94
  new (...args: any[]): vue.CreateComponentPublicInstance<{
95
- style: vue.StyleValue;
96
- disabled: boolean;
97
95
  absolute: boolean;
96
+ location: Anchor;
97
+ origin: "auto" | Anchor | "overlap";
98
98
  transition: string | boolean | (vue.TransitionProps & {
99
99
  component?: vue.Component | undefined;
100
100
  });
101
101
  zIndex: string | number;
102
+ style: vue.StyleValue;
102
103
  eager: boolean;
104
+ disabled: boolean;
103
105
  modelValue: boolean;
104
- origin: Anchor | "auto" | "overlap";
105
- location: Anchor;
106
- locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
106
+ locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
107
107
  updateLocation: (e?: Event | undefined) => void;
108
- } | undefined) | "connected";
109
- scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
108
+ } | undefined);
109
+ scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
110
110
  activatorProps: Record<string, any>;
111
111
  openOnHover: boolean;
112
112
  closeOnContentClick: boolean;
@@ -117,19 +117,19 @@ declare const VOverlay: {
117
117
  scrim: string | boolean;
118
118
  _disableGlobalStack: boolean;
119
119
  } & {
120
- class?: any;
121
- width?: string | number | undefined;
122
- height?: string | number | undefined;
123
- theme?: string | undefined;
124
- target?: Element | vue.ComponentPublicInstance | (string & {}) | "parent" | "cursor" | [x: number, y: number] | undefined;
125
120
  offset?: string | number | number[] | undefined;
126
- contentClass?: any;
127
- opacity?: string | number | undefined;
121
+ height?: string | number | undefined;
122
+ width?: string | number | undefined;
128
123
  maxHeight?: string | number | undefined;
129
124
  maxWidth?: string | number | undefined;
130
125
  minHeight?: string | number | undefined;
131
126
  minWidth?: string | number | undefined;
132
- activator?: Element | vue.ComponentPublicInstance | (string & {}) | "parent" | undefined;
127
+ opacity?: string | number | undefined;
128
+ target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
129
+ class?: any;
130
+ theme?: string | undefined;
131
+ contentClass?: any;
132
+ activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
133
133
  closeDelay?: string | number | undefined;
134
134
  openDelay?: string | number | undefined;
135
135
  openOnClick?: boolean | undefined;
@@ -169,9 +169,9 @@ declare const VOverlay: {
169
169
  targetRef: TemplateRef;
170
170
  }) => vue.VNodeChild) | undefined;
171
171
  } & {
172
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
173
172
  onAfterEnter?: (() => any) | undefined;
174
173
  onAfterLeave?: (() => any) | undefined;
174
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
175
175
  "onClick:outside"?: ((e: MouseEvent) => any) | undefined;
176
176
  }, {
177
177
  activatorEl: Ref<HTMLElement | undefined>;
@@ -188,21 +188,21 @@ declare const VOverlay: {
188
188
  afterEnter: () => true;
189
189
  afterLeave: () => true;
190
190
  }, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
191
- style: vue.StyleValue;
192
- disabled: boolean;
193
191
  absolute: boolean;
192
+ location: Anchor;
193
+ origin: "auto" | Anchor | "overlap";
194
194
  transition: string | boolean | (vue.TransitionProps & {
195
195
  component?: vue.Component | undefined;
196
196
  });
197
197
  zIndex: string | number;
198
+ style: vue.StyleValue;
198
199
  eager: boolean;
200
+ disabled: boolean;
199
201
  modelValue: boolean;
200
- origin: Anchor | "auto" | "overlap";
201
- location: Anchor;
202
- locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
202
+ locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
203
203
  updateLocation: (e?: Event | undefined) => void;
204
- } | undefined) | "connected";
205
- scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
204
+ } | undefined);
205
+ scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
206
206
  activatorProps: Record<string, any>;
207
207
  openOnHover: boolean;
208
208
  closeOnContentClick: boolean;
@@ -213,19 +213,19 @@ declare const VOverlay: {
213
213
  scrim: string | boolean;
214
214
  _disableGlobalStack: boolean;
215
215
  } & {
216
- class?: any;
217
- width?: string | number | undefined;
218
- height?: string | number | undefined;
219
- theme?: string | undefined;
220
- target?: Element | vue.ComponentPublicInstance | (string & {}) | "parent" | "cursor" | [x: number, y: number] | undefined;
221
216
  offset?: string | number | number[] | undefined;
222
- contentClass?: any;
223
- opacity?: string | number | undefined;
217
+ height?: string | number | undefined;
218
+ width?: string | number | undefined;
224
219
  maxHeight?: string | number | undefined;
225
220
  maxWidth?: string | number | undefined;
226
221
  minHeight?: string | number | undefined;
227
222
  minWidth?: string | number | undefined;
228
- activator?: Element | vue.ComponentPublicInstance | (string & {}) | "parent" | undefined;
223
+ opacity?: string | number | undefined;
224
+ target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
225
+ class?: any;
226
+ theme?: string | undefined;
227
+ contentClass?: any;
228
+ activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
229
229
  closeDelay?: string | number | undefined;
230
230
  openDelay?: string | number | undefined;
231
231
  openOnClick?: boolean | undefined;
@@ -265,26 +265,26 @@ declare const VOverlay: {
265
265
  targetRef: TemplateRef;
266
266
  }) => vue.VNodeChild) | undefined;
267
267
  } & {
268
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
269
268
  onAfterEnter?: (() => any) | undefined;
270
269
  onAfterLeave?: (() => any) | undefined;
270
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
271
271
  "onClick:outside"?: ((e: MouseEvent) => any) | undefined;
272
272
  }, {
273
- style: vue.StyleValue;
274
- disabled: boolean;
275
273
  absolute: boolean;
274
+ location: Anchor;
275
+ origin: "auto" | Anchor | "overlap";
276
276
  transition: string | boolean | (vue.TransitionProps & {
277
277
  component?: vue.Component | undefined;
278
278
  });
279
279
  zIndex: string | number;
280
+ style: vue.StyleValue;
280
281
  eager: boolean;
282
+ disabled: boolean;
281
283
  modelValue: boolean;
282
- origin: Anchor | "auto" | "overlap";
283
- location: Anchor;
284
- locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
284
+ locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
285
285
  updateLocation: (e?: Event | undefined) => void;
286
- } | undefined) | "connected";
287
- scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
286
+ } | undefined);
287
+ scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
288
288
  activatorProps: Record<string, any>;
289
289
  openOnClick: boolean;
290
290
  openOnHover: boolean;
@@ -317,21 +317,21 @@ declare const VOverlay: {
317
317
  M: {};
318
318
  Defaults: {};
319
319
  }, {
320
- style: vue.StyleValue;
321
- disabled: boolean;
322
320
  absolute: boolean;
321
+ location: Anchor;
322
+ origin: "auto" | Anchor | "overlap";
323
323
  transition: string | boolean | (vue.TransitionProps & {
324
324
  component?: vue.Component | undefined;
325
325
  });
326
326
  zIndex: string | number;
327
+ style: vue.StyleValue;
327
328
  eager: boolean;
329
+ disabled: boolean;
328
330
  modelValue: boolean;
329
- origin: Anchor | "auto" | "overlap";
330
- location: Anchor;
331
- locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
331
+ locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
332
332
  updateLocation: (e?: Event | undefined) => void;
333
- } | undefined) | "connected";
334
- scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
333
+ } | undefined);
334
+ scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
335
335
  activatorProps: Record<string, any>;
336
336
  openOnHover: boolean;
337
337
  closeOnContentClick: boolean;
@@ -342,19 +342,19 @@ declare const VOverlay: {
342
342
  scrim: string | boolean;
343
343
  _disableGlobalStack: boolean;
344
344
  } & {
345
- class?: any;
346
- width?: string | number | undefined;
347
- height?: string | number | undefined;
348
- theme?: string | undefined;
349
- target?: Element | vue.ComponentPublicInstance | (string & {}) | "parent" | "cursor" | [x: number, y: number] | undefined;
350
345
  offset?: string | number | number[] | undefined;
351
- contentClass?: any;
352
- opacity?: string | number | undefined;
346
+ height?: string | number | undefined;
347
+ width?: string | number | undefined;
353
348
  maxHeight?: string | number | undefined;
354
349
  maxWidth?: string | number | undefined;
355
350
  minHeight?: string | number | undefined;
356
351
  minWidth?: string | number | undefined;
357
- activator?: Element | vue.ComponentPublicInstance | (string & {}) | "parent" | undefined;
352
+ opacity?: string | number | undefined;
353
+ target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
354
+ class?: any;
355
+ theme?: string | undefined;
356
+ contentClass?: any;
357
+ activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
358
358
  closeDelay?: string | number | undefined;
359
359
  openDelay?: string | number | undefined;
360
360
  openOnClick?: boolean | undefined;
@@ -394,9 +394,9 @@ declare const VOverlay: {
394
394
  targetRef: TemplateRef;
395
395
  }) => vue.VNodeChild) | undefined;
396
396
  } & {
397
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
398
397
  onAfterEnter?: (() => any) | undefined;
399
398
  onAfterLeave?: (() => any) | undefined;
399
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
400
400
  "onClick:outside"?: ((e: MouseEvent) => any) | undefined;
401
401
  }, {
402
402
  activatorEl: Ref<HTMLElement | undefined>;
@@ -408,21 +408,21 @@ declare const VOverlay: {
408
408
  localTop: vue.ComputedRef<boolean>;
409
409
  updateLocation: Ref<((e: Event) => void) | undefined>;
410
410
  }, {}, {}, {}, {
411
- style: vue.StyleValue;
412
- disabled: boolean;
413
411
  absolute: boolean;
412
+ location: Anchor;
413
+ origin: "auto" | Anchor | "overlap";
414
414
  transition: string | boolean | (vue.TransitionProps & {
415
415
  component?: vue.Component | undefined;
416
416
  });
417
417
  zIndex: string | number;
418
+ style: vue.StyleValue;
418
419
  eager: boolean;
420
+ disabled: boolean;
419
421
  modelValue: boolean;
420
- origin: Anchor | "auto" | "overlap";
421
- location: Anchor;
422
- locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
422
+ locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
423
423
  updateLocation: (e?: Event | undefined) => void;
424
- } | undefined) | "connected";
425
- scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
424
+ } | undefined);
425
+ scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
426
426
  activatorProps: Record<string, any>;
427
427
  openOnClick: boolean;
428
428
  openOnHover: boolean;
@@ -439,21 +439,21 @@ declare const VOverlay: {
439
439
  __isTeleport?: undefined;
440
440
  __isSuspense?: undefined;
441
441
  } & vue.ComponentOptionsBase<{
442
- style: vue.StyleValue;
443
- disabled: boolean;
444
442
  absolute: boolean;
443
+ location: Anchor;
444
+ origin: "auto" | Anchor | "overlap";
445
445
  transition: string | boolean | (vue.TransitionProps & {
446
446
  component?: vue.Component | undefined;
447
447
  });
448
448
  zIndex: string | number;
449
+ style: vue.StyleValue;
449
450
  eager: boolean;
451
+ disabled: boolean;
450
452
  modelValue: boolean;
451
- origin: Anchor | "auto" | "overlap";
452
- location: Anchor;
453
- locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
453
+ locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
454
454
  updateLocation: (e?: Event | undefined) => void;
455
- } | undefined) | "connected";
456
- scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
455
+ } | undefined);
456
+ scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
457
457
  activatorProps: Record<string, any>;
458
458
  openOnHover: boolean;
459
459
  closeOnContentClick: boolean;
@@ -464,19 +464,19 @@ declare const VOverlay: {
464
464
  scrim: string | boolean;
465
465
  _disableGlobalStack: boolean;
466
466
  } & {
467
- class?: any;
468
- width?: string | number | undefined;
469
- height?: string | number | undefined;
470
- theme?: string | undefined;
471
- target?: Element | vue.ComponentPublicInstance | (string & {}) | "parent" | "cursor" | [x: number, y: number] | undefined;
472
467
  offset?: string | number | number[] | undefined;
473
- contentClass?: any;
474
- opacity?: string | number | undefined;
468
+ height?: string | number | undefined;
469
+ width?: string | number | undefined;
475
470
  maxHeight?: string | number | undefined;
476
471
  maxWidth?: string | number | undefined;
477
472
  minHeight?: string | number | undefined;
478
473
  minWidth?: string | number | undefined;
479
- activator?: Element | vue.ComponentPublicInstance | (string & {}) | "parent" | undefined;
474
+ opacity?: string | number | undefined;
475
+ target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
476
+ class?: any;
477
+ theme?: string | undefined;
478
+ contentClass?: any;
479
+ activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
480
480
  closeDelay?: string | number | undefined;
481
481
  openDelay?: string | number | undefined;
482
482
  openOnClick?: boolean | undefined;
@@ -516,9 +516,9 @@ declare const VOverlay: {
516
516
  targetRef: TemplateRef;
517
517
  }) => vue.VNodeChild) | undefined;
518
518
  } & {
519
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
520
519
  onAfterEnter?: (() => any) | undefined;
521
520
  onAfterLeave?: (() => any) | undefined;
521
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
522
522
  "onClick:outside"?: ((e: MouseEvent) => any) | undefined;
523
523
  }, {
524
524
  activatorEl: Ref<HTMLElement | undefined>;
@@ -535,21 +535,21 @@ declare const VOverlay: {
535
535
  afterEnter: () => true;
536
536
  afterLeave: () => true;
537
537
  }, string, {
538
- style: vue.StyleValue;
539
- disabled: boolean;
540
538
  absolute: boolean;
539
+ location: Anchor;
540
+ origin: "auto" | Anchor | "overlap";
541
541
  transition: string | boolean | (vue.TransitionProps & {
542
542
  component?: vue.Component | undefined;
543
543
  });
544
544
  zIndex: string | number;
545
+ style: vue.StyleValue;
545
546
  eager: boolean;
547
+ disabled: boolean;
546
548
  modelValue: boolean;
547
- origin: Anchor | "auto" | "overlap";
548
- location: Anchor;
549
- locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
549
+ locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
550
550
  updateLocation: (e?: Event | undefined) => void;
551
- } | undefined) | "connected";
552
- scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
551
+ } | undefined);
552
+ scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
553
553
  activatorProps: Record<string, any>;
554
554
  openOnClick: boolean;
555
555
  openOnHover: boolean;
@@ -584,14 +584,14 @@ declare const VOverlay: {
584
584
  };
585
585
  theme: StringConstructor;
586
586
  scrollStrategy: {
587
- type: PropType<"close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
587
+ type: PropType<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
588
588
  default: string;
589
589
  validator: (val: any) => boolean;
590
590
  };
591
591
  locationStrategy: {
592
- type: PropType<"static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
592
+ type: PropType<"connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
593
593
  updateLocation: (e?: Event | undefined) => void;
594
- } | undefined) | "connected">;
594
+ } | undefined)>;
595
595
  default: string;
596
596
  validator: (val: any) => boolean;
597
597
  };
@@ -600,7 +600,7 @@ declare const VOverlay: {
600
600
  default: string;
601
601
  };
602
602
  origin: {
603
- type: PropType<Anchor | "auto" | "overlap">;
603
+ type: PropType<"auto" | Anchor | "overlap">;
604
604
  default: string;
605
605
  };
606
606
  offset: PropType<string | number | number[] | undefined>;
@@ -618,8 +618,8 @@ declare const VOverlay: {
618
618
  };
619
619
  closeDelay: (StringConstructor | NumberConstructor)[];
620
620
  openDelay: (StringConstructor | NumberConstructor)[];
621
- target: PropType<Element | vue.ComponentPublicInstance | (string & {}) | "parent" | "cursor" | [x: number, y: number] | undefined>;
622
- activator: PropType<Element | vue.ComponentPublicInstance | (string & {}) | "parent" | undefined>;
621
+ target: PropType<Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined>;
622
+ activator: PropType<Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined>;
623
623
  activatorProps: {
624
624
  type: PropType<Record<string, any>>;
625
625
  default: () => {};
@@ -667,14 +667,14 @@ declare const VOverlay: {
667
667
  };
668
668
  theme: StringConstructor;
669
669
  scrollStrategy: {
670
- type: PropType<"close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
670
+ type: PropType<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
671
671
  default: string;
672
672
  validator: (val: any) => boolean;
673
673
  };
674
674
  locationStrategy: {
675
- type: PropType<"static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
675
+ type: PropType<"connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
676
676
  updateLocation: (e?: Event | undefined) => void;
677
- } | undefined) | "connected">;
677
+ } | undefined)>;
678
678
  default: string;
679
679
  validator: (val: any) => boolean;
680
680
  };
@@ -683,7 +683,7 @@ declare const VOverlay: {
683
683
  default: string;
684
684
  };
685
685
  origin: {
686
- type: PropType<Anchor | "auto" | "overlap">;
686
+ type: PropType<"auto" | Anchor | "overlap">;
687
687
  default: string;
688
688
  };
689
689
  offset: PropType<string | number | number[] | undefined>;
@@ -701,8 +701,8 @@ declare const VOverlay: {
701
701
  };
702
702
  closeDelay: (StringConstructor | NumberConstructor)[];
703
703
  openDelay: (StringConstructor | NumberConstructor)[];
704
- target: PropType<Element | vue.ComponentPublicInstance | (string & {}) | "parent" | "cursor" | [x: number, y: number] | undefined>;
705
- activator: PropType<Element | vue.ComponentPublicInstance | (string & {}) | "parent" | undefined>;
704
+ target: PropType<Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined>;
705
+ activator: PropType<Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined>;
706
706
  activatorProps: {
707
707
  type: PropType<Record<string, any>>;
708
708
  default: () => {};
@@ -73,12 +73,6 @@ function getIntrinsicSize(el, isRtl) {
73
73
  // el.style.removeProperty('max-width')
74
74
  // el.style.removeProperty('max-height')
75
75
 
76
- if (isRtl) {
77
- el.style.removeProperty('left');
78
- } else {
79
- el.style.removeProperty('right');
80
- }
81
-
82
76
  /* eslint-disable-next-line sonarjs/prefer-immediate-return */
83
77
  const contentBox = nullifyTransforms(el);
84
78
  if (isRtl) {
@@ -1 +1 @@
1
- {"version":3,"file":"locationStrategies.mjs","names":["useToggleScope","computed","nextTick","onScopeDispose","ref","watch","anchorToPoint","getOffset","clamp","consoleError","convertToUnit","destructComputed","flipAlign","flipCorner","flipSide","getAxis","getScrollParents","IN_BROWSER","isFixedPosition","nullifyTransforms","parseAnchor","propsFactory","Box","getOverflow","getTargetBox","locationStrategies","static","staticLocationStrategy","connected","connectedLocationStrategy","makeLocationStrategyProps","locationStrategy","type","String","Function","default","validator","val","location","origin","offset","Number","Array","useLocationStrategies","props","data","contentStyles","updateLocation","isActive","value","reset","window","removeEventListener","onResize","undefined","addEventListener","passive","e","getIntrinsicSize","el","isRtl","style","removeProperty","contentBox","x","parseFloat","right","left","y","top","activatorFixed","isArray","target","Object","assign","position","preferredAnchor","preferredOrigin","parsedAnchor","parsedOrigin","side","align","minWidth","minHeight","maxWidth","maxHeight","map","key","isNaN","Infinity","split","length","push","observe","observer","ResizeObserver","contentEl","_ref","_ref2","newTarget","newContentEl","oldTarget","oldContentEl","unobserve","immediate","disconnect","requestAnimationFrame","targetBox","scrollParents","viewportMargin","document","documentElement","getPropertyValue","viewport","reduce","box","rect","getBoundingClientRect","scrollBox","width","clientWidth","height","clientHeight","Math","max","min","bottom","placement","anchor","checkOverflow","_placement","targetPoint","contentPoint","overflows","available","flipped","resets","_x","_y","axis","hasOverflowX","before","after","hasOverflowY","forEach","newPlacement","flip","newOverflows","transformOrigin","pixelRound","pixelCeil","result","round","devicePixelRatio","ceil"],"sources":["../../../src/components/VOverlay/locationStrategies.ts"],"sourcesContent":["// Composables\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onScopeDispose, ref, watch } from 'vue'\nimport { anchorToPoint, getOffset } from './util/point'\nimport {\n clamp,\n consoleError,\n convertToUnit,\n destructComputed,\n flipAlign,\n flipCorner,\n flipSide,\n getAxis,\n getScrollParents,\n IN_BROWSER,\n isFixedPosition,\n nullifyTransforms,\n parseAnchor,\n propsFactory,\n} from '@/util'\nimport { Box, getOverflow, getTargetBox } from '@/util/box'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { Anchor } from '@/util'\n\nexport interface LocationStrategyData {\n contentEl: Ref<HTMLElement | undefined>\n target: Ref<HTMLElement | [x: number, y: number] | undefined>\n isActive: Ref<boolean>\n isRtl: Ref<boolean>\n}\n\ntype LocationStrategyFn = (\n data: LocationStrategyData,\n props: StrategyProps,\n contentStyles: Ref<Record<string, string>>\n) => undefined | { updateLocation: (e?: Event) => void }\n\nconst locationStrategies = {\n static: staticLocationStrategy, // specific viewport position, usually centered\n connected: connectedLocationStrategy, // connected to a certain element\n}\n\nexport interface StrategyProps {\n locationStrategy: keyof typeof locationStrategies | LocationStrategyFn\n location: Anchor\n origin: Anchor | 'auto' | 'overlap'\n offset?: number | string | number[]\n maxHeight?: number | string\n maxWidth?: number | string\n minHeight?: number | string\n minWidth?: number | string\n}\n\nexport const makeLocationStrategyProps = propsFactory({\n locationStrategy: {\n type: [String, Function] as PropType<StrategyProps['locationStrategy']>,\n default: 'static',\n validator: (val: any) => typeof val === 'function' || val in locationStrategies,\n },\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom',\n },\n origin: {\n type: String as PropType<StrategyProps['origin']>,\n default: 'auto',\n },\n offset: [Number, String, Array] as PropType<StrategyProps['offset']>,\n}, 'VOverlay-location-strategies')\n\nexport function useLocationStrategies (\n props: StrategyProps,\n data: LocationStrategyData\n) {\n const contentStyles = ref({})\n const updateLocation = ref<(e: Event) => void>()\n\n if (IN_BROWSER) {\n useToggleScope(() => !!(data.isActive.value && props.locationStrategy), reset => {\n watch(() => props.locationStrategy, reset)\n onScopeDispose(() => {\n window.removeEventListener('resize', onResize)\n updateLocation.value = undefined\n })\n\n window.addEventListener('resize', onResize, { passive: true })\n\n if (typeof props.locationStrategy === 'function') {\n updateLocation.value = props.locationStrategy(data, props, contentStyles)?.updateLocation\n } else {\n updateLocation.value = locationStrategies[props.locationStrategy](data, props, contentStyles)?.updateLocation\n }\n })\n }\n\n function onResize (e: Event) {\n updateLocation.value?.(e)\n }\n\n return {\n contentStyles,\n updateLocation,\n }\n}\n\nfunction staticLocationStrategy () {\n // TODO\n}\n\n/** Get size of element ignoring max-width/max-height */\nfunction getIntrinsicSize (el: HTMLElement, isRtl: boolean) {\n // const scrollables = new Map<Element, [number, number]>()\n // el.querySelectorAll('*').forEach(el => {\n // const x = el.scrollLeft\n // const y = el.scrollTop\n // if (x || y) {\n // scrollables.set(el, [x, y])\n // }\n // })\n\n // const initialMaxWidth = el.style.maxWidth\n // const initialMaxHeight = el.style.maxHeight\n // el.style.removeProperty('max-width')\n // el.style.removeProperty('max-height')\n\n if (isRtl) {\n el.style.removeProperty('left')\n } else {\n el.style.removeProperty('right')\n }\n\n /* eslint-disable-next-line sonarjs/prefer-immediate-return */\n const contentBox = nullifyTransforms(el)\n\n if (isRtl) {\n contentBox.x += parseFloat(el.style.right || 0)\n } else {\n contentBox.x -= parseFloat(el.style.left || 0)\n }\n contentBox.y -= parseFloat(el.style.top || 0)\n\n // el.style.maxWidth = initialMaxWidth\n // el.style.maxHeight = initialMaxHeight\n // scrollables.forEach((position, el) => {\n // el.scrollTo(...position)\n // })\n\n return contentBox\n}\n\nfunction connectedLocationStrategy (data: LocationStrategyData, props: StrategyProps, contentStyles: Ref<Record<string, string>>) {\n const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value)\n if (activatorFixed) {\n Object.assign(contentStyles.value, {\n position: 'fixed',\n top: 0,\n [data.isRtl.value ? 'right' : 'left']: 0,\n })\n }\n\n const { preferredAnchor, preferredOrigin } = destructComputed(() => {\n const parsedAnchor = parseAnchor(props.location, data.isRtl.value)\n const parsedOrigin =\n props.origin === 'overlap' ? parsedAnchor\n : props.origin === 'auto' ? flipSide(parsedAnchor)\n : parseAnchor(props.origin, data.isRtl.value)\n\n // Some combinations of props may produce an invalid origin\n if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) {\n return {\n preferredAnchor: flipCorner(parsedAnchor),\n preferredOrigin: flipCorner(parsedOrigin),\n }\n } else {\n return {\n preferredAnchor: parsedAnchor,\n preferredOrigin: parsedOrigin,\n }\n }\n })\n\n const [minWidth, minHeight, maxWidth, maxHeight] =\n (['minWidth', 'minHeight', 'maxWidth', 'maxHeight'] as const).map(key => {\n return computed(() => {\n const val = parseFloat(props[key]!)\n return isNaN(val) ? Infinity : val\n })\n })\n\n const offset = computed(() => {\n if (Array.isArray(props.offset)) {\n return props.offset\n }\n if (typeof props.offset === 'string') {\n const offset = props.offset.split(' ').map(parseFloat)\n if (offset.length < 2) offset.push(0)\n return offset\n }\n return typeof props.offset === 'number' ? [props.offset, 0] : [0, 0]\n })\n\n let observe = false\n const observer = new ResizeObserver(() => {\n if (observe) updateLocation()\n })\n\n watch([data.target, data.contentEl], ([newTarget, newContentEl], [oldTarget, oldContentEl]) => {\n if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget)\n if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget)\n\n if (oldContentEl) observer.unobserve(oldContentEl)\n if (newContentEl) observer.observe(newContentEl)\n }, {\n immediate: true,\n })\n\n onScopeDispose(() => {\n observer.disconnect()\n })\n\n // eslint-disable-next-line max-statements\n function updateLocation () {\n observe = false\n requestAnimationFrame(() => observe = true)\n\n if (!data.target.value || !data.contentEl.value) return\n\n const targetBox = getTargetBox(data.target.value)\n const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value)\n const scrollParents = getScrollParents(data.contentEl.value)\n const viewportMargin = 12\n\n if (!scrollParents.length) {\n scrollParents.push(document.documentElement)\n if (!(data.contentEl.value.style.top && data.contentEl.value.style.left)) {\n contentBox.x -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-x') || 0)\n contentBox.y -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-y') || 0)\n }\n }\n\n const viewport = scrollParents.reduce<Box>((box: Box | undefined, el) => {\n const rect = el.getBoundingClientRect()\n const scrollBox = new Box({\n x: el === document.documentElement ? 0 : rect.x,\n y: el === document.documentElement ? 0 : rect.y,\n width: el.clientWidth,\n height: el.clientHeight,\n })\n\n if (box) {\n return new Box({\n x: Math.max(box.left, scrollBox.left),\n y: Math.max(box.top, scrollBox.top),\n width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left),\n height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top),\n })\n }\n return scrollBox\n }, undefined!)\n viewport.x += viewportMargin\n viewport.y += viewportMargin\n viewport.width -= viewportMargin * 2\n viewport.height -= viewportMargin * 2\n\n let placement = {\n anchor: preferredAnchor.value,\n origin: preferredOrigin.value,\n }\n\n function checkOverflow (_placement: typeof placement) {\n const box = new Box(contentBox)\n const targetPoint = anchorToPoint(_placement.anchor, targetBox)\n const contentPoint = anchorToPoint(_placement.origin, box)\n\n let { x, y } = getOffset(targetPoint, contentPoint)\n\n switch (_placement.anchor.side) {\n case 'top': y -= offset.value[0]; break\n case 'bottom': y += offset.value[0]; break\n case 'left': x -= offset.value[0]; break\n case 'right': x += offset.value[0]; break\n }\n\n switch (_placement.anchor.align) {\n case 'top': y -= offset.value[1]; break\n case 'bottom': y += offset.value[1]; break\n case 'left': x -= offset.value[1]; break\n case 'right': x += offset.value[1]; break\n }\n\n box.x += x\n box.y += y\n\n box.width = Math.min(box.width, maxWidth.value)\n box.height = Math.min(box.height, maxHeight.value)\n\n const overflows = getOverflow(box, viewport)\n\n return { overflows, x, y }\n }\n\n let x = 0; let y = 0\n const available = { x: 0, y: 0 }\n const flipped = { x: false, y: false }\n let resets = -1\n while (true) {\n if (resets++ > 10) {\n consoleError('Infinite loop detected in connectedLocationStrategy')\n break\n }\n\n const { x: _x, y: _y, overflows } = checkOverflow(placement)\n\n x += _x\n y += _y\n\n contentBox.x += _x\n contentBox.y += _y\n\n // flip\n {\n const axis = getAxis(placement.anchor)\n const hasOverflowX = overflows.x.before || overflows.x.after\n const hasOverflowY = overflows.y.before || overflows.y.after\n\n let reset = false\n ;['x', 'y'].forEach(key => {\n if (\n (key === 'x' && hasOverflowX && !flipped.x) ||\n (key === 'y' && hasOverflowY && !flipped.y)\n ) {\n const newPlacement = { anchor: { ...placement.anchor }, origin: { ...placement.origin } }\n const flip = key === 'x'\n ? axis === 'y' ? flipAlign : flipSide\n : axis === 'y' ? flipSide : flipAlign\n newPlacement.anchor = flip(newPlacement.anchor)\n newPlacement.origin = flip(newPlacement.origin)\n const { overflows: newOverflows } = checkOverflow(newPlacement)\n if (\n (newOverflows[key].before <= overflows[key].before &&\n newOverflows[key].after <= overflows[key].after) ||\n (newOverflows[key].before + newOverflows[key].after <\n (overflows[key].before + overflows[key].after) / 2)\n ) {\n placement = newPlacement\n reset = flipped[key] = true\n }\n }\n })\n if (reset) continue\n }\n\n // shift\n if (overflows.x.before) {\n x += overflows.x.before\n contentBox.x += overflows.x.before\n }\n if (overflows.x.after) {\n x -= overflows.x.after\n contentBox.x -= overflows.x.after\n }\n if (overflows.y.before) {\n y += overflows.y.before\n contentBox.y += overflows.y.before\n }\n if (overflows.y.after) {\n y -= overflows.y.after\n contentBox.y -= overflows.y.after\n }\n\n // size\n {\n const overflows = getOverflow(contentBox, viewport)\n available.x = viewport.width - overflows.x.before - overflows.x.after\n available.y = viewport.height - overflows.y.before - overflows.y.after\n\n x += overflows.x.before\n contentBox.x += overflows.x.before\n y += overflows.y.before\n contentBox.y += overflows.y.before\n }\n\n break\n }\n\n const axis = getAxis(placement.anchor)\n\n Object.assign(contentStyles.value, {\n '--v-overlay-anchor-origin': `${placement.anchor.side} ${placement.anchor.align}`,\n transformOrigin: `${placement.origin.side} ${placement.origin.align}`,\n // transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,\n top: convertToUnit(pixelRound(y)),\n left: data.isRtl.value ? undefined : convertToUnit(pixelRound(x)),\n right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : undefined,\n minWidth: convertToUnit(axis === 'y' ? Math.min(minWidth.value, targetBox.width) : minWidth.value),\n maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),\n maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value))),\n })\n\n return {\n available,\n contentBox,\n }\n }\n\n watch(\n () => [\n preferredAnchor.value,\n preferredOrigin.value,\n props.offset,\n props.minWidth,\n props.minHeight,\n props.maxWidth,\n props.maxHeight,\n ],\n () => updateLocation(),\n )\n\n nextTick(() => {\n const result = updateLocation()\n\n // TODO: overflowing content should only require a single updateLocation call\n // Icky hack to make sure the content is positioned consistently\n if (!result) return\n const { available, contentBox } = result\n if (contentBox.height > available.y) {\n requestAnimationFrame(() => {\n updateLocation()\n requestAnimationFrame(() => {\n updateLocation()\n })\n })\n }\n })\n\n return { updateLocation }\n}\n\nfunction pixelRound (val: number) {\n return Math.round(val * devicePixelRatio) / devicePixelRatio\n}\n\nfunction pixelCeil (val: number) {\n return Math.ceil(val * devicePixelRatio) / devicePixelRatio\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc,6CAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC3DC,aAAa,EAAEC,SAAS;AAAA,SAE/BC,KAAK,EACLC,YAAY,EACZC,aAAa,EACbC,gBAAgB,EAChBC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EAChBC,UAAU,EACVC,eAAe,EACfC,iBAAiB,EACjBC,WAAW,EACXC,YAAY;AAAA,SAELC,GAAG,EAAEC,WAAW,EAAEC,YAAY,8BAEvC;AAiBA,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAEC,sBAA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ACfvC,KAAK,CAACwC,QAAQ,EACdxC,KAAK,CAACyC,SAAS,CAChB,EACD,MAAMtC,cAAc,CAAC,CACvB,CAAC;EAED7C,QAAQ,CAAC,MAAM;IACb,MAAMqJ,MAAM,GAAGxG,cAAc,CAAC,CAAC;;IAE/B;IACA;IACA,IAAI,CAACwG,MAAM,EAAE;IACb,MAAM;MAAEjB,SAAS;MAAEvE;IAAW,CAAC,GAAGwF,MAAM;IACxC,IAAIxF,UAAU,CAAC0D,MAAM,GAAGa,SAAS,CAAClE,CAAC,EAAE;MACnCsC,qBAAqB,CAAC,MAAM;QAC1B3D,cAAc,CAAC,CAAC;QAChB2D,qBAAqB,CAAC,MAAM;UAC1B3D,cAAc,CAAC,CAAC;QAClB,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;EAEF,OAAO;IAAEA;EAAe,CAAC;AAC3B;AAEA,SAASsG,UAAUA,CAAEhH,GAAW,EAAE;EAChC,OAAOsF,IAAI,CAAC6B,KAAK,CAACnH,GAAG,GAAGoH,gBAAgB,CAAC,GAAGA,gBAAgB;AAC9D;AAEA,SAASH,SAASA,CAAEjH,GAAW,EAAE;EAC/B,OAAOsF,IAAI,CAAC+B,IAAI,CAACrH,GAAG,GAAGoH,gBAAgB,CAAC,GAAGA,gBAAgB;AAC7D","ignoreList":[]}
1
+ {"version":3,"file":"locationStrategies.mjs","names":["useToggleScope","computed","nextTick","onScopeDispose","ref","watch","anchorToPoint","getOffset","clamp","consoleError","convertToUnit","destructComputed","flipAlign","flipCorner","flipSide","getAxis","getScrollParents","IN_BROWSER","isFixedPosition","nullifyTransforms","parseAnchor","propsFactory","Box","getOverflow","getTargetBox","locationStrategies","static","staticLocationStrategy","connected","connectedLocationStrategy","makeLocationStrategyProps","locationStrategy","type","String","Function","default","validator","val","location","origin","offset","Number","Array","useLocationStrategies","props","data","contentStyles","updateLocation","isActive","value","reset","window","removeEventListener","onResize","undefined","addEventListener","passive","e","getIntrinsicSize","el","isRtl","contentBox","x","parseFloat","style","right","left","y","top","activatorFixed","isArray","target","Object","assign","position","preferredAnchor","preferredOrigin","parsedAnchor","parsedOrigin","side","align","minWidth","minHeight","maxWidth","maxHeight","map","key","isNaN","Infinity","split","length","push","observe","observer","ResizeObserver","contentEl","_ref","_ref2","newTarget","newContentEl","oldTarget","oldContentEl","unobserve","immediate","disconnect","requestAnimationFrame","targetBox","scrollParents","viewportMargin","document","documentElement","getPropertyValue","viewport","reduce","box","rect","getBoundingClientRect","scrollBox","width","clientWidth","height","clientHeight","Math","max","min","bottom","placement","anchor","checkOverflow","_placement","targetPoint","contentPoint","overflows","available","flipped","resets","_x","_y","axis","hasOverflowX","before","after","hasOverflowY","forEach","newPlacement","flip","newOverflows","transformOrigin","pixelRound","pixelCeil","result","round","devicePixelRatio","ceil"],"sources":["../../../src/components/VOverlay/locationStrategies.ts"],"sourcesContent":["// Composables\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onScopeDispose, ref, watch } from 'vue'\nimport { anchorToPoint, getOffset } from './util/point'\nimport {\n clamp,\n consoleError,\n convertToUnit,\n destructComputed,\n flipAlign,\n flipCorner,\n flipSide,\n getAxis,\n getScrollParents,\n IN_BROWSER,\n isFixedPosition,\n nullifyTransforms,\n parseAnchor,\n propsFactory,\n} from '@/util'\nimport { Box, getOverflow, getTargetBox } from '@/util/box'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { Anchor } from '@/util'\n\nexport interface LocationStrategyData {\n contentEl: Ref<HTMLElement | undefined>\n target: Ref<HTMLElement | [x: number, y: number] | undefined>\n isActive: Ref<boolean>\n isRtl: Ref<boolean>\n}\n\ntype LocationStrategyFn = (\n data: LocationStrategyData,\n props: StrategyProps,\n contentStyles: Ref<Record<string, string>>\n) => undefined | { updateLocation: (e?: Event) => void }\n\nconst locationStrategies = {\n static: staticLocationStrategy, // specific viewport position, usually centered\n connected: connectedLocationStrategy, // connected to a certain element\n}\n\nexport interface StrategyProps {\n locationStrategy: keyof typeof locationStrategies | LocationStrategyFn\n location: Anchor\n origin: Anchor | 'auto' | 'overlap'\n offset?: number | string | number[]\n maxHeight?: number | string\n maxWidth?: number | string\n minHeight?: number | string\n minWidth?: number | string\n}\n\nexport const makeLocationStrategyProps = propsFactory({\n locationStrategy: {\n type: [String, Function] as PropType<StrategyProps['locationStrategy']>,\n default: 'static',\n validator: (val: any) => typeof val === 'function' || val in locationStrategies,\n },\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom',\n },\n origin: {\n type: String as PropType<StrategyProps['origin']>,\n default: 'auto',\n },\n offset: [Number, String, Array] as PropType<StrategyProps['offset']>,\n}, 'VOverlay-location-strategies')\n\nexport function useLocationStrategies (\n props: StrategyProps,\n data: LocationStrategyData\n) {\n const contentStyles = ref({})\n const updateLocation = ref<(e: Event) => void>()\n\n if (IN_BROWSER) {\n useToggleScope(() => !!(data.isActive.value && props.locationStrategy), reset => {\n watch(() => props.locationStrategy, reset)\n onScopeDispose(() => {\n window.removeEventListener('resize', onResize)\n updateLocation.value = undefined\n })\n\n window.addEventListener('resize', onResize, { passive: true })\n\n if (typeof props.locationStrategy === 'function') {\n updateLocation.value = props.locationStrategy(data, props, contentStyles)?.updateLocation\n } else {\n updateLocation.value = locationStrategies[props.locationStrategy](data, props, contentStyles)?.updateLocation\n }\n })\n }\n\n function onResize (e: Event) {\n updateLocation.value?.(e)\n }\n\n return {\n contentStyles,\n updateLocation,\n }\n}\n\nfunction staticLocationStrategy () {\n // TODO\n}\n\n/** Get size of element ignoring max-width/max-height */\nfunction getIntrinsicSize (el: HTMLElement, isRtl: boolean) {\n // const scrollables = new Map<Element, [number, number]>()\n // el.querySelectorAll('*').forEach(el => {\n // const x = el.scrollLeft\n // const y = el.scrollTop\n // if (x || y) {\n // scrollables.set(el, [x, y])\n // }\n // })\n\n // const initialMaxWidth = el.style.maxWidth\n // const initialMaxHeight = el.style.maxHeight\n // el.style.removeProperty('max-width')\n // el.style.removeProperty('max-height')\n\n /* eslint-disable-next-line sonarjs/prefer-immediate-return */\n const contentBox = nullifyTransforms(el)\n\n if (isRtl) {\n contentBox.x += parseFloat(el.style.right || 0)\n } else {\n contentBox.x -= parseFloat(el.style.left || 0)\n }\n contentBox.y -= parseFloat(el.style.top || 0)\n\n // el.style.maxWidth = initialMaxWidth\n // el.style.maxHeight = initialMaxHeight\n // scrollables.forEach((position, el) => {\n // el.scrollTo(...position)\n // })\n\n return contentBox\n}\n\nfunction connectedLocationStrategy (data: LocationStrategyData, props: StrategyProps, contentStyles: Ref<Record<string, string>>) {\n const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value)\n if (activatorFixed) {\n Object.assign(contentStyles.value, {\n position: 'fixed',\n top: 0,\n [data.isRtl.value ? 'right' : 'left']: 0,\n })\n }\n\n const { preferredAnchor, preferredOrigin } = destructComputed(() => {\n const parsedAnchor = parseAnchor(props.location, data.isRtl.value)\n const parsedOrigin =\n props.origin === 'overlap' ? parsedAnchor\n : props.origin === 'auto' ? flipSide(parsedAnchor)\n : parseAnchor(props.origin, data.isRtl.value)\n\n // Some combinations of props may produce an invalid origin\n if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) {\n return {\n preferredAnchor: flipCorner(parsedAnchor),\n preferredOrigin: flipCorner(parsedOrigin),\n }\n } else {\n return {\n preferredAnchor: parsedAnchor,\n preferredOrigin: parsedOrigin,\n }\n }\n })\n\n const [minWidth, minHeight, maxWidth, maxHeight] =\n (['minWidth', 'minHeight', 'maxWidth', 'maxHeight'] as const).map(key => {\n return computed(() => {\n const val = parseFloat(props[key]!)\n return isNaN(val) ? Infinity : val\n })\n })\n\n const offset = computed(() => {\n if (Array.isArray(props.offset)) {\n return props.offset\n }\n if (typeof props.offset === 'string') {\n const offset = props.offset.split(' ').map(parseFloat)\n if (offset.length < 2) offset.push(0)\n return offset\n }\n return typeof props.offset === 'number' ? [props.offset, 0] : [0, 0]\n })\n\n let observe = false\n const observer = new ResizeObserver(() => {\n if (observe) updateLocation()\n })\n\n watch([data.target, data.contentEl], ([newTarget, newContentEl], [oldTarget, oldContentEl]) => {\n if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget)\n if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget)\n\n if (oldContentEl) observer.unobserve(oldContentEl)\n if (newContentEl) observer.observe(newContentEl)\n }, {\n immediate: true,\n })\n\n onScopeDispose(() => {\n observer.disconnect()\n })\n\n // eslint-disable-next-line max-statements\n function updateLocation () {\n observe = false\n requestAnimationFrame(() => observe = true)\n\n if (!data.target.value || !data.contentEl.value) return\n\n const targetBox = getTargetBox(data.target.value)\n const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value)\n const scrollParents = getScrollParents(data.contentEl.value)\n const viewportMargin = 12\n\n if (!scrollParents.length) {\n scrollParents.push(document.documentElement)\n if (!(data.contentEl.value.style.top && data.contentEl.value.style.left)) {\n contentBox.x -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-x') || 0)\n contentBox.y -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-y') || 0)\n }\n }\n\n const viewport = scrollParents.reduce<Box>((box: Box | undefined, el) => {\n const rect = el.getBoundingClientRect()\n const scrollBox = new Box({\n x: el === document.documentElement ? 0 : rect.x,\n y: el === document.documentElement ? 0 : rect.y,\n width: el.clientWidth,\n height: el.clientHeight,\n })\n\n if (box) {\n return new Box({\n x: Math.max(box.left, scrollBox.left),\n y: Math.max(box.top, scrollBox.top),\n width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left),\n height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top),\n })\n }\n return scrollBox\n }, undefined!)\n viewport.x += viewportMargin\n viewport.y += viewportMargin\n viewport.width -= viewportMargin * 2\n viewport.height -= viewportMargin * 2\n\n let placement = {\n anchor: preferredAnchor.value,\n origin: preferredOrigin.value,\n }\n\n function checkOverflow (_placement: typeof placement) {\n const box = new Box(contentBox)\n const targetPoint = anchorToPoint(_placement.anchor, targetBox)\n const contentPoint = anchorToPoint(_placement.origin, box)\n\n let { x, y } = getOffset(targetPoint, contentPoint)\n\n switch (_placement.anchor.side) {\n case 'top': y -= offset.value[0]; break\n case 'bottom': y += offset.value[0]; break\n case 'left': x -= offset.value[0]; break\n case 'right': x += offset.value[0]; break\n }\n\n switch (_placement.anchor.align) {\n case 'top': y -= offset.value[1]; break\n case 'bottom': y += offset.value[1]; break\n case 'left': x -= offset.value[1]; break\n case 'right': x += offset.value[1]; break\n }\n\n box.x += x\n box.y += y\n\n box.width = Math.min(box.width, maxWidth.value)\n box.height = Math.min(box.height, maxHeight.value)\n\n const overflows = getOverflow(box, viewport)\n\n return { overflows, x, y }\n }\n\n let x = 0; let y = 0\n const available = { x: 0, y: 0 }\n const flipped = { x: false, y: false }\n let resets = -1\n while (true) {\n if (resets++ > 10) {\n consoleError('Infinite loop detected in connectedLocationStrategy')\n break\n }\n\n const { x: _x, y: _y, overflows } = checkOverflow(placement)\n\n x += _x\n y += _y\n\n contentBox.x += _x\n contentBox.y += _y\n\n // flip\n {\n const axis = getAxis(placement.anchor)\n const hasOverflowX = overflows.x.before || overflows.x.after\n const hasOverflowY = overflows.y.before || overflows.y.after\n\n let reset = false\n ;['x', 'y'].forEach(key => {\n if (\n (key === 'x' && hasOverflowX && !flipped.x) ||\n (key === 'y' && hasOverflowY && !flipped.y)\n ) {\n const newPlacement = { anchor: { ...placement.anchor }, origin: { ...placement.origin } }\n const flip = key === 'x'\n ? axis === 'y' ? flipAlign : flipSide\n : axis === 'y' ? flipSide : flipAlign\n newPlacement.anchor = flip(newPlacement.anchor)\n newPlacement.origin = flip(newPlacement.origin)\n const { overflows: newOverflows } = checkOverflow(newPlacement)\n if (\n (newOverflows[key].before <= overflows[key].before &&\n newOverflows[key].after <= overflows[key].after) ||\n (newOverflows[key].before + newOverflows[key].after <\n (overflows[key].before + overflows[key].after) / 2)\n ) {\n placement = newPlacement\n reset = flipped[key] = true\n }\n }\n })\n if (reset) continue\n }\n\n // shift\n if (overflows.x.before) {\n x += overflows.x.before\n contentBox.x += overflows.x.before\n }\n if (overflows.x.after) {\n x -= overflows.x.after\n contentBox.x -= overflows.x.after\n }\n if (overflows.y.before) {\n y += overflows.y.before\n contentBox.y += overflows.y.before\n }\n if (overflows.y.after) {\n y -= overflows.y.after\n contentBox.y -= overflows.y.after\n }\n\n // size\n {\n const overflows = getOverflow(contentBox, viewport)\n available.x = viewport.width - overflows.x.before - overflows.x.after\n available.y = viewport.height - overflows.y.before - overflows.y.after\n\n x += overflows.x.before\n contentBox.x += overflows.x.before\n y += overflows.y.before\n contentBox.y += overflows.y.before\n }\n\n break\n }\n\n const axis = getAxis(placement.anchor)\n\n Object.assign(contentStyles.value, {\n '--v-overlay-anchor-origin': `${placement.anchor.side} ${placement.anchor.align}`,\n transformOrigin: `${placement.origin.side} ${placement.origin.align}`,\n // transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,\n top: convertToUnit(pixelRound(y)),\n left: data.isRtl.value ? undefined : convertToUnit(pixelRound(x)),\n right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : undefined,\n minWidth: convertToUnit(axis === 'y' ? Math.min(minWidth.value, targetBox.width) : minWidth.value),\n maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),\n maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value))),\n })\n\n return {\n available,\n contentBox,\n }\n }\n\n watch(\n () => [\n preferredAnchor.value,\n preferredOrigin.value,\n props.offset,\n props.minWidth,\n props.minHeight,\n props.maxWidth,\n props.maxHeight,\n ],\n () => updateLocation(),\n )\n\n nextTick(() => {\n const result = updateLocation()\n\n // TODO: overflowing content should only require a single updateLocation call\n // Icky hack to make sure the content is positioned consistently\n if (!result) return\n const { available, contentBox } = result\n if (contentBox.height > available.y) {\n requestAnimationFrame(() => {\n updateLocation()\n requestAnimationFrame(() => {\n updateLocation()\n })\n })\n }\n })\n\n return { updateLocation }\n}\n\nfunction pixelRound (val: number) {\n return Math.round(val * devicePixelRatio) / devicePixelRatio\n}\n\nfunction pixelCeil (val: number) {\n return Math.ceil(val * devicePixelRatio) / devicePixelRatio\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc,6CAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC3DC,aAAa,EAAEC,SAAS;AAAA,SAE/BC,KAAK,EACLC,YAAY,EACZC,aAAa,EACbC,gBAAgB,EAChBC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EAChBC,UAAU,EACVC,eAAe,EACfC,iBAAiB,EACjBC,WAAW,EACXC,YAAY;AAAA,SAELC,GAAG,EAAEC,WAAW,EAAEC,YAAY,8BAEvC;AAiBA,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAEC,sBAAsB;EAAE;EAChCC,SAAS,EAAEC,yBAAyB,CAAE;AACxC,CAAC;AAaD,OAAO,MAAMC,yBAAyB,GAAGT,YAAY,CAAC;EACpDU,gBAAgB,EAAE;IAChBC,IAAI,EAAE,CAACC,MAAM,EAAEC,QAAQ,CAAgD;IACvEC,OAAO,EAAE,QAAQ;IACjBC,SAAS,EAAGC,GAAQ,IAAK,OAAOA,GAAG,KAAK,UAAU,IAAIA,GAAG,IAAIZ;EAC/D,CAAC;EACDa,QAAQ,EAAE;IACRN,IAAI,EAAEC,MAA6C;IACnDE,OAAO,EAAE;EACX,CAAC;EACDI,MAAM,EAAE;IACNP,IAAI,EAAEC,MAA2C;IACjDE,OAAO,EAAE;EACX,CAAC;EACDK,MAAM,EAAE,CAACC,MAAM,EAAER,MAAM,EAAES,KAAK;AAChC,CAAC,EAAE,8BAA8B,CAAC;AAElC,OAAO,SAASC,qBAAqBA,CACnCC,KAAoB,EACpBC,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